@templatical/editor 0.6.7 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -1
- package/dist/{AccessibilityPanel-B2MT0M58.js → AccessibilityPanel-D-PqmHdH.js} +2 -2
- package/dist/{AiChatSidebar-w5ek3Z76.js → AiChatSidebar-BwLECwsO.js} +1 -1
- package/dist/{AiFeatureMenu-ChlAWywJ.js → AiFeatureMenu-CVHKharv.js} +3 -3
- package/dist/{BlockA11yBadge-C0S6kPC4.js → BlockA11yBadge-BFIw0h1m.js} +2 -2
- package/dist/{CloudEditor-DYYaScFe.js → CloudEditor-S7AzuNwC.js} +30 -21
- package/dist/{CollaboratorBar-Bo8vtPId.js → CollaboratorBar-VZKOv_Zn.js} +2 -2
- package/dist/{CommentsSidebar-BQROg36f.js → CommentsSidebar-BiRtaXYD.js} +3 -3
- package/dist/{CountdownBlock-Bxqe7zwL.js → CountdownBlock-Cq8A8WrM.js} +1 -1
- package/dist/{CountdownToolbar-CpFAnjSo.js → CountdownToolbar-CojjlZet.js} +2 -2
- package/dist/{DesignReferenceSidebar-CfqpcWX6.js → DesignReferenceSidebar-Ci9HIGbf.js} +2 -2
- package/dist/ModuleBrowserModal-D7IYx1Nh.js +206 -0
- package/dist/{ModulePreviewCanvas-Cw9GeGus.js → ModulePreviewCanvas-I-uMcK5G.js} +2 -2
- package/dist/{NumberWithSuffix-Dw8dN1Pt.js → NumberWithSuffix-CLTBb2Rj.js} +1 -1
- package/dist/{ParagraphEditor-DjDiUzmv.js → ParagraphEditor-BRQTNDFO.js} +156 -151
- package/dist/{RichTextEditorContent-CK3Om7ES.js → RichTextEditorContent-C3QSg7gd.js} +32 -28
- package/dist/{SaveModuleDialog-CSUPmfRP.js → SaveModuleDialog-DGGGNZfm.js} +6 -6
- package/dist/{SnapshotHistory-DwX2fj6N.js → SnapshotHistory-C97Iw6xw.js} +3 -3
- package/dist/{TemplateScoringPanel-BIAeCAEP.js → TemplateScoringPanel-V79yrEPC.js} +3 -3
- package/dist/{TestEmailModal-CIlBvWWn.js → TestEmailModal-B7S8H-VG.js} +3 -3
- package/dist/{TitleEditor-BCV5k6wj.js → TitleEditor-DhFTYzrw.js} +65 -60
- package/dist/{TplModal-C3Hq9b58.js → TplModal-BgABm6ju.js} +21 -17
- package/dist/{blockTypeIcons-iUurP50H.js → blockTypeIcons-BSf-3RJ-.js} +1 -1
- package/dist/bundle-stats.json +7 -7
- package/dist/cdn/chunks/{AccessibilityPanel-DnNB30b0.js → AccessibilityPanel-kgNBRaZV.js} +28 -28
- package/dist/cdn/chunks/{AccessibilityPanel-DnNB30b0.js.map → AccessibilityPanel-kgNBRaZV.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-BKBh_ueF.js → AiFeatureMenu-CRkzwdMg.js} +15 -15
- package/dist/cdn/chunks/{AiFeatureMenu-BKBh_ueF.js.map → AiFeatureMenu-CRkzwdMg.js.map} +1 -1
- package/dist/cdn/chunks/{BlockA11yBadge-CnBu14Fj.js → BlockA11yBadge-BfuH2Hrg.js} +9 -9
- package/dist/cdn/chunks/{BlockA11yBadge-CnBu14Fj.js.map → BlockA11yBadge-BfuH2Hrg.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-CmR17piA.js → CloudEditor-BGiN3M_f.js} +252 -243
- package/dist/cdn/chunks/CloudEditor-BGiN3M_f.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-BejZaFtY.js → CollaboratorBar-CMl3lAZU.js} +15 -15
- package/dist/cdn/chunks/{CollaboratorBar-BejZaFtY.js.map → CollaboratorBar-CMl3lAZU.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CjvUEHhE.js → CountdownBlock-D1RoaOgF.js} +18 -18
- package/dist/cdn/chunks/{CountdownBlock-CjvUEHhE.js.map → CountdownBlock-D1RoaOgF.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Caokkqsg.js → CountdownToolbar-DltwuOer.js} +42 -42
- package/dist/cdn/chunks/{CountdownToolbar-Caokkqsg.js.map → CountdownToolbar-DltwuOer.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-Tb9a7L-K.js → ModuleBrowserModal-3uu2mXR9.js} +36 -36
- package/dist/cdn/chunks/{ModuleBrowserModal-Tb9a7L-K.js.map → ModuleBrowserModal-3uu2mXR9.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-JWIEv5oS.js → ModulePreviewCanvas-K9CQFr7p.js} +37 -37
- package/dist/cdn/chunks/{ModulePreviewCanvas-JWIEv5oS.js.map → ModulePreviewCanvas-K9CQFr7p.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-DrV8eumz.js → NumberWithSuffix-BIFgtqGs.js} +74 -74
- package/dist/cdn/chunks/{NumberWithSuffix-DrV8eumz.js.map → NumberWithSuffix-BIFgtqGs.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CSfShBAO.js → ParagraphEditor-DlpZX_x4.js} +180 -176
- package/dist/cdn/chunks/ParagraphEditor-DlpZX_x4.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DgqZzl8n.js → RichTextEditorContent-CPGT8h-O.js} +40 -37
- package/dist/cdn/chunks/RichTextEditorContent-CPGT8h-O.js.map +1 -0
- package/dist/cdn/chunks/{SaveModuleDialog-CxTwrIgx.js → SaveModuleDialog-_uaJscj1.js} +24 -24
- package/dist/cdn/chunks/{SaveModuleDialog-CxTwrIgx.js.map → SaveModuleDialog-_uaJscj1.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-Kerz6US8.js +175 -0
- package/dist/cdn/chunks/TitleEditor-Kerz6US8.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-DMt-2qR6.js → blockTypeIcons-BeOhGtoo.js} +7 -7
- package/dist/cdn/chunks/{blockTypeIcons-DMt-2qR6.js.map → blockTypeIcons-BeOhGtoo.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-CNhyCGIO.js → draggable-P6QWzy4g.js} +1182 -1171
- package/dist/cdn/chunks/{draggable-CNhyCGIO.js.map → draggable-P6QWzy4g.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-CUvwrffu.js → extensions-BZYkPlKr.js} +107 -108
- package/dist/cdn/chunks/extensions-BZYkPlKr.js.map +1 -0
- package/dist/cdn/chunks/{features-U3nzKc-R.js → features-DzIN-Nua.js} +925 -896
- package/dist/cdn/chunks/features-DzIN-Nua.js.map +1 -0
- package/dist/cdn/chunks/{icons-QcjADKIW.js → icons-Nvr6w13E.js} +2 -2
- package/dist/cdn/chunks/{icons-QcjADKIW.js.map → icons-Nvr6w13E.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-Zcd_GInj.js → media-library-BzT7BoGU.js} +1189 -1183
- package/dist/cdn/chunks/media-library-BzT7BoGU.js.map +1 -0
- package/dist/cdn/chunks/{quality-8eo6DM3p.js → quality-C328caFm.js} +45 -45
- package/dist/cdn/chunks/{quality-8eo6DM3p.js.map → quality-C328caFm.js.map} +1 -1
- package/dist/cdn/chunks/renderer-eDlxzlJI.js +501 -0
- package/dist/cdn/chunks/renderer-eDlxzlJI.js.map +1 -0
- package/dist/cdn/chunks/{src-CthVYW_o.js → src-DKNTQJVO.js} +144 -144
- package/dist/cdn/chunks/{src-CthVYW_o.js.map → src-DKNTQJVO.js.map} +1 -1
- package/dist/cdn/chunks/{styles-CV5w3kjq.js → styles-lcwmaOou.js} +969 -958
- package/dist/cdn/chunks/styles-lcwmaOou.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-IyIsncxY.js → tiptap-BwTCLVWl.js} +7 -7
- package/dist/cdn/chunks/{tiptap-IyIsncxY.js.map → tiptap-BwTCLVWl.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +197 -146
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{extensions-BF39Siqk.js → extensions-D-J02CiP.js} +50 -51
- package/dist/index.d.ts +51 -6
- package/dist/{keys-Bqs_0du9.js → keys-B5SJtPWf.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/{styles-BgmKdc2x.js → styles-DeNciUTX.js} +586 -575
- package/dist/templatical-editor.js +182 -131
- package/dist/{useCloudI18n-CL_AwWwi.js → useCloudI18n-ByEMykjO.js} +1 -1
- package/dist/{useEditorCore-CnXrv71D.js → useEditorCore-uCU9Ny0M.js} +637 -619
- package/dist/{useI18n-CgmQftNf.js → useI18n-PEB8ioi_.js} +1 -1
- package/dist/{useMergeTag-vpwrZ9eQ.js → useMergeTag-C47xwU7X.js} +2 -2
- package/dist/usePopoverRoot-BxJrqnMD.js +8 -0
- package/package.json +7 -7
- package/dist/ModuleBrowserModal-CKhsaPnA.js +0 -206
- package/dist/cdn/chunks/CloudEditor-CmR17piA.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-CSfShBAO.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-DgqZzl8n.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-DlqV7ODD.js +0 -171
- package/dist/cdn/chunks/TitleEditor-DlqV7ODD.js.map +0 -1
- package/dist/cdn/chunks/extensions-CUvwrffu.js.map +0 -1
- package/dist/cdn/chunks/features-U3nzKc-R.js.map +0 -1
- package/dist/cdn/chunks/media-library-Zcd_GInj.js.map +0 -1
- package/dist/cdn/chunks/renderer-eHJyPiJH.js +0 -548
- package/dist/cdn/chunks/renderer-eHJyPiJH.js.map +0 -1
- package/dist/cdn/chunks/styles-CV5w3kjq.js.map +0 -1
- /package/dist/{de-DcVOh9Fp.js → de-BhIWu_bO.js} +0 -0
- /package/dist/{de-DCaaCE5s.js → de-Di4MEjjx.js} +0 -0
- /package/dist/{emojiData-PQyVa4bU.js → emojiData-DX3E0XT-.js} +0 -0
- /package/dist/{en-DXCyK4-X.js → en-BSuzi-Pd.js} +0 -0
- /package/dist/{en-TZVJ_f6v.js → en-D7HRbYah.js} +0 -0
- /package/dist/{pt-BR-Vq7D7c11.js → pt-BR-CCVBRais.js} +0 -0
- /package/dist/{pt-BR-BMGasLBa.js → pt-BR-K32lt6YP.js} +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { A as e, B as t, D as n, E as r, F as i, G as a, J as o, L as s, M as c, N as l, O as u, Q as d, S as f, U as p, V as m, X as h, Y as g, _, at as v, b as y, c as b, d as x, et as S, f as C, h as w, it as T, j as E, k as ee, l as D, m as O, nt as k, o as te, ot as A, p as ne, q as re, rt as j, s as ie, st as M, v as N, w as ae, x as oe, y as se, z as ce } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
|
|
2
2
|
import { A as le, S as ue, T as de, _ as fe, a as pe, b as me, c as he, d as ge, f as _e, g as ve, h as ye, j as be, k as xe, l as Se, m as Ce, o as we, p as Te, s as Ee, t as De, u as Oe, v as ke, x as Ae, y as je } from "./dist-DJmnUmW9.js";
|
|
3
3
|
import { a as Me, c as Ne, i as Pe, l as Fe, n as Ie, r as Le, s as Re } from "./dist-BzRLLpfq.js";
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
4
|
+
import { A as ze, C as Be, D as Ve, O as He, S as Ue, _ as We, a as Ge, b as Ke, c as qe, d as Je, f as Ye, g as Xe, h as Ze, k as Qe, m as $e, o as et, p as tt, r as nt, s as rt, t as it, v as at, w as ot, x as st, y as ct } from "./keys-B5SJtPWf.js";
|
|
5
|
+
import { t as lt } from "./useI18n-PEB8ioi_.js";
|
|
6
6
|
import { t as P } from "./createLucideIcon-Di4mqmGn.js";
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import "./useCloudI18n-
|
|
13
|
-
import { t as
|
|
7
|
+
import { t as ut } from "./message-circle-gzy2ZGJ3.js";
|
|
8
|
+
import { t as dt } from "./trash-2-424iqbpN.js";
|
|
9
|
+
import { t as ft } from "./triangle-alert-DWQySIE2.js";
|
|
10
|
+
import { t as pt } from "./LoadingTrack-CFkDkjBb.js";
|
|
11
|
+
import { t as mt } from "./_plugin-vue_export-helper-B0hnzhyu.js";
|
|
12
|
+
import "./useCloudI18n-ByEMykjO.js";
|
|
13
|
+
import { t as ht } from "./useMergeTag-C47xwU7X.js";
|
|
14
14
|
//#region ../core/dist/index.js
|
|
15
|
-
function
|
|
15
|
+
function gt(e) {
|
|
16
16
|
let t = o({
|
|
17
17
|
content: e.content ?? Oe(e.defaultFontFamily, e.templateDefaults),
|
|
18
18
|
selectedBlockId: null,
|
|
@@ -141,9 +141,9 @@ function mt(e) {
|
|
|
141
141
|
markDirty: x
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
var
|
|
145
|
-
function
|
|
146
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
144
|
+
var _t = 50, vt = 300, yt = 1500;
|
|
145
|
+
function bt(e) {
|
|
146
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = _t } = e, a = h([]), o = h([]), s = h(!1), c = null, l = null, u = m(() => a.value.length > 0), d = m(() => o.value.length > 0);
|
|
147
147
|
function f() {
|
|
148
148
|
return JSON.parse(JSON.stringify(t.value));
|
|
149
149
|
}
|
|
@@ -161,21 +161,21 @@ function vt(e) {
|
|
|
161
161
|
if (l && l.blockId === e) {
|
|
162
162
|
clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
|
|
163
163
|
l = null;
|
|
164
|
-
},
|
|
164
|
+
}, vt);
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
167
|
g(), p(f()), o.value = [], l = {
|
|
168
168
|
blockId: e,
|
|
169
169
|
timeoutId: setTimeout(() => {
|
|
170
170
|
l = null;
|
|
171
|
-
},
|
|
171
|
+
}, vt)
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
function y() {
|
|
176
176
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
177
177
|
s.value = !1, c = null;
|
|
178
|
-
},
|
|
178
|
+
}, yt);
|
|
179
179
|
}
|
|
180
180
|
function b() {
|
|
181
181
|
if (a.value.length === 0) return;
|
|
@@ -207,7 +207,7 @@ function vt(e) {
|
|
|
207
207
|
destroy: C
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function xt(e) {
|
|
211
211
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i } = e;
|
|
212
212
|
function a(n, r, a) {
|
|
213
213
|
let o = we(n, e.blockDefaults);
|
|
@@ -233,7 +233,7 @@ function yt(e) {
|
|
|
233
233
|
updateBlockProperty: c
|
|
234
234
|
};
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function St(e) {
|
|
237
237
|
let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
|
|
238
238
|
function c() {
|
|
239
239
|
return typeof a == "function" ? a() : a;
|
|
@@ -269,7 +269,7 @@ function bt(e) {
|
|
|
269
269
|
destroy: h
|
|
270
270
|
};
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function Ct(e) {
|
|
273
273
|
let t = o(/* @__PURE__ */ new Set()), n = m(() => t.size > 0);
|
|
274
274
|
function r(e) {
|
|
275
275
|
return t.has(e);
|
|
@@ -287,7 +287,7 @@ function xt(e) {
|
|
|
287
287
|
hasHiddenBlocks: n
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function wt(e) {
|
|
291
291
|
let t = h(!1), n = h(!1), r = m(() => !!e.definition.value?.dataSource), i = m(() => r.value && !e.block.value.dataSourceFetched);
|
|
292
292
|
async function a() {
|
|
293
293
|
let r = e.definition.value;
|
|
@@ -317,7 +317,7 @@ function St(e) {
|
|
|
317
317
|
needsFetch: i
|
|
318
318
|
};
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Tt(e, t) {
|
|
321
321
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
322
322
|
e.addBlock = (r, i, a, o) => {
|
|
323
323
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -333,7 +333,7 @@ function Ct(e, t) {
|
|
|
333
333
|
}
|
|
334
334
|
//#endregion
|
|
335
335
|
//#region src/composables/useAccessibilityLint.ts
|
|
336
|
-
function
|
|
336
|
+
function Et(e) {
|
|
337
337
|
let t = h([]), n = h(!1), r = h(!1), i = d(null), a = e.options.disabled === !0, o = null, c = !1;
|
|
338
338
|
a || l();
|
|
339
339
|
async function l() {
|
|
@@ -374,12 +374,12 @@ function wt(e) {
|
|
|
374
374
|
}
|
|
375
375
|
//#endregion
|
|
376
376
|
//#region src/utils/blockTypeLabels.ts
|
|
377
|
-
function
|
|
377
|
+
function Dt(e, t) {
|
|
378
378
|
return t.blocks[e] ?? e;
|
|
379
379
|
}
|
|
380
380
|
//#endregion
|
|
381
381
|
//#region src/composables/useKeyboardReorder.ts
|
|
382
|
-
function
|
|
382
|
+
function Ot(e, t) {
|
|
383
383
|
let n = h(null), r = h(""), i = null;
|
|
384
384
|
function a(t) {
|
|
385
385
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -406,7 +406,7 @@ function Et(e, t) {
|
|
|
406
406
|
let r = a(n);
|
|
407
407
|
if (!r) return "";
|
|
408
408
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
409
|
-
return i ?
|
|
409
|
+
return i ? Dt(i.type, t.t) : "";
|
|
410
410
|
}
|
|
411
411
|
function s(t, n) {
|
|
412
412
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -475,13 +475,13 @@ function Et(e, t) {
|
|
|
475
475
|
}
|
|
476
476
|
//#endregion
|
|
477
477
|
//#region src/composables/useUiTheme.ts
|
|
478
|
-
function
|
|
478
|
+
function kt(e) {
|
|
479
479
|
let t = Pe("(prefers-color-scheme: dark)");
|
|
480
480
|
return { resolvedTheme: x(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
481
481
|
}
|
|
482
482
|
//#endregion
|
|
483
483
|
//#region src/composables/useThemeStyles.ts
|
|
484
|
-
var
|
|
484
|
+
var At = {
|
|
485
485
|
bg: "--tpl-bg",
|
|
486
486
|
bgElevated: "--tpl-bg-elevated",
|
|
487
487
|
bgHover: "--tpl-bg-hover",
|
|
@@ -505,10 +505,10 @@ var Ot = {
|
|
|
505
505
|
dangerLight: "--tpl-danger-light",
|
|
506
506
|
canvasBg: "--tpl-canvas-bg"
|
|
507
507
|
};
|
|
508
|
-
function
|
|
508
|
+
function jt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
509
509
|
return { themeStyles: x(() => {
|
|
510
510
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
511
|
-
if (a) for (let [e, t] of Object.entries(
|
|
511
|
+
if (a) for (let [e, t] of Object.entries(At)) {
|
|
512
512
|
let n = a[e];
|
|
513
513
|
n && (r[t] = n);
|
|
514
514
|
}
|
|
@@ -517,27 +517,27 @@ function kt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
517
517
|
}
|
|
518
518
|
//#endregion
|
|
519
519
|
//#region src/utils/logger.ts
|
|
520
|
-
var
|
|
521
|
-
function
|
|
520
|
+
var Mt = "[Templatical]";
|
|
521
|
+
function Nt() {
|
|
522
522
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
523
523
|
}
|
|
524
|
-
var
|
|
524
|
+
var Pt = {
|
|
525
525
|
warn(...e) {
|
|
526
|
-
console.warn(
|
|
526
|
+
console.warn(Mt, ...e);
|
|
527
527
|
},
|
|
528
528
|
error(...e) {
|
|
529
|
-
console.error(
|
|
529
|
+
console.error(Mt, ...e);
|
|
530
530
|
},
|
|
531
531
|
debug(...e) {
|
|
532
|
-
|
|
532
|
+
Nt() || console.debug(Mt, ...e);
|
|
533
533
|
},
|
|
534
534
|
info(...e) {
|
|
535
|
-
|
|
535
|
+
Nt() || console.info(Mt, ...e);
|
|
536
536
|
}
|
|
537
537
|
};
|
|
538
538
|
//#endregion
|
|
539
539
|
//#region src/composables/useBlockRegistry.ts
|
|
540
|
-
function
|
|
540
|
+
function Ft() {
|
|
541
541
|
let e = d(/* @__PURE__ */ new Map());
|
|
542
542
|
function t(t, n) {
|
|
543
543
|
e.value.set(t, n), k(e);
|
|
@@ -589,7 +589,7 @@ function Nt() {
|
|
|
589
589
|
strictFilters: !1
|
|
590
590
|
}).parseAndRender(t.template, e.fieldValues);
|
|
591
591
|
} catch (t) {
|
|
592
|
-
return
|
|
592
|
+
return Pt.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
595
|
function l(t) {
|
|
@@ -608,7 +608,7 @@ function Nt() {
|
|
|
608
608
|
}
|
|
609
609
|
//#endregion
|
|
610
610
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
611
|
-
var
|
|
611
|
+
var It = [
|
|
612
612
|
{
|
|
613
613
|
type: "section",
|
|
614
614
|
label: "Section",
|
|
@@ -675,8 +675,8 @@ var Pt = [
|
|
|
675
675
|
createBlock: he
|
|
676
676
|
}
|
|
677
677
|
];
|
|
678
|
-
function
|
|
679
|
-
for (let n of
|
|
678
|
+
function Lt(e, t) {
|
|
679
|
+
for (let n of It) {
|
|
680
680
|
let r = t[n.type];
|
|
681
681
|
r && e.registerBuiltIn(n.type, {
|
|
682
682
|
component: r,
|
|
@@ -691,18 +691,23 @@ function Ft(e, t) {
|
|
|
691
691
|
}
|
|
692
692
|
//#endregion
|
|
693
693
|
//#region src/utils/keyboardShortcuts.ts
|
|
694
|
-
function
|
|
695
|
-
let t
|
|
696
|
-
|
|
694
|
+
function Rt(e) {
|
|
695
|
+
for (let t of e.composedPath()) {
|
|
696
|
+
if (!(t instanceof HTMLElement)) continue;
|
|
697
|
+
if (t.isContentEditable) return !0;
|
|
698
|
+
let e = t.tagName;
|
|
699
|
+
if (e === "INPUT" || e === "TEXTAREA" || e === "SELECT") return !0;
|
|
700
|
+
}
|
|
701
|
+
return !1;
|
|
697
702
|
}
|
|
698
|
-
function
|
|
703
|
+
function zt(e, t) {
|
|
699
704
|
let n = e.metaKey || e.ctrlKey;
|
|
700
705
|
if (n && e.key.toLowerCase() === "s") {
|
|
701
706
|
e.preventDefault(), t.onSave?.();
|
|
702
707
|
return;
|
|
703
708
|
}
|
|
704
709
|
if (n && e.key.toLowerCase() === "z") {
|
|
705
|
-
if (
|
|
710
|
+
if (Rt(e)) return;
|
|
706
711
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
707
712
|
return;
|
|
708
713
|
}
|
|
@@ -710,11 +715,11 @@ function Lt(e, t) {
|
|
|
710
715
|
t.selectBlock(null);
|
|
711
716
|
return;
|
|
712
717
|
}
|
|
713
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
718
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Rt(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
714
719
|
}
|
|
715
720
|
//#endregion
|
|
716
721
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
717
|
-
var
|
|
722
|
+
var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
|
|
718
723
|
__name: "ButtonBlock",
|
|
719
724
|
props: {
|
|
720
725
|
block: {},
|
|
@@ -735,17 +740,17 @@ var Rt = { class: "tpl:text-center" }, zt = ["href"], Bt = /* @__PURE__ */ y({
|
|
|
735
740
|
};
|
|
736
741
|
return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
|
|
737
742
|
});
|
|
738
|
-
return (n, i) => (e(), w("div",
|
|
743
|
+
return (n, i) => (e(), w("div", Bt, [C("a", {
|
|
739
744
|
href: t.block.url || "#",
|
|
740
745
|
style: A(r.value),
|
|
741
746
|
class: "tpl:cursor-default",
|
|
742
747
|
onClick: i[0] ||= b(() => {}, ["prevent"])
|
|
743
|
-
}, M(t.block.text), 13,
|
|
748
|
+
}, M(t.block.text), 13, Vt)]));
|
|
744
749
|
}
|
|
745
|
-
}),
|
|
750
|
+
}), Ut = P("bookmark", [["path", {
|
|
746
751
|
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",
|
|
747
752
|
key: "oz39mx"
|
|
748
|
-
}]]),
|
|
753
|
+
}]]), Wt = P("box", [
|
|
749
754
|
["path", {
|
|
750
755
|
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",
|
|
751
756
|
key: "hh9hay"
|
|
@@ -758,13 +763,13 @@ var Rt = { class: "tpl:text-center" }, zt = ["href"], Bt = /* @__PURE__ */ y({
|
|
|
758
763
|
d: "M12 22V12",
|
|
759
764
|
key: "d0xqtd"
|
|
760
765
|
}]
|
|
761
|
-
]),
|
|
766
|
+
]), Gt = P("code", [["path", {
|
|
762
767
|
d: "m16 18 6-6-6-6",
|
|
763
768
|
key: "eg8j8"
|
|
764
769
|
}], ["path", {
|
|
765
770
|
d: "m8 6-6 6 6 6",
|
|
766
771
|
key: "ppft3o"
|
|
767
|
-
}]]),
|
|
772
|
+
}]]), Kt = P("copy", [["rect", {
|
|
768
773
|
width: "14",
|
|
769
774
|
height: "14",
|
|
770
775
|
x: "8",
|
|
@@ -775,7 +780,7 @@ var Rt = { class: "tpl:text-center" }, zt = ["href"], Bt = /* @__PURE__ */ y({
|
|
|
775
780
|
}], ["path", {
|
|
776
781
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
777
782
|
key: "zix9uf"
|
|
778
|
-
}]]),
|
|
783
|
+
}]]), qt = P("eye-off", [
|
|
779
784
|
["path", {
|
|
780
785
|
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",
|
|
781
786
|
key: "ct8e1f"
|
|
@@ -792,10 +797,10 @@ var Rt = { class: "tpl:text-center" }, zt = ["href"], Bt = /* @__PURE__ */ y({
|
|
|
792
797
|
d: "m2 2 20 20",
|
|
793
798
|
key: "1ooewy"
|
|
794
799
|
}]
|
|
795
|
-
]),
|
|
800
|
+
]), Jt = P("funnel", [["path", {
|
|
796
801
|
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",
|
|
797
802
|
key: "sc7q7i"
|
|
798
|
-
}]]),
|
|
803
|
+
}]]), Yt = P("grip-vertical", [
|
|
799
804
|
["circle", {
|
|
800
805
|
cx: "9",
|
|
801
806
|
cy: "12",
|
|
@@ -832,7 +837,7 @@ var Rt = { class: "tpl:text-center" }, zt = ["href"], Bt = /* @__PURE__ */ y({
|
|
|
832
837
|
r: "1",
|
|
833
838
|
key: "f4zoj3"
|
|
834
839
|
}]
|
|
835
|
-
]),
|
|
840
|
+
]), Xt = P("image", [
|
|
836
841
|
["rect", {
|
|
837
842
|
width: "18",
|
|
838
843
|
height: "18",
|
|
@@ -852,13 +857,13 @@ var Rt = { class: "tpl:text-center" }, zt = ["href"], Bt = /* @__PURE__ */ y({
|
|
|
852
857
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
853
858
|
key: "1xmnt7"
|
|
854
859
|
}]
|
|
855
|
-
]),
|
|
860
|
+
]), Zt = P("navigation", [["polygon", {
|
|
856
861
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
857
862
|
key: "1ltx0t"
|
|
858
|
-
}]]),
|
|
863
|
+
}]]), Qt = P("puzzle", [["path", {
|
|
859
864
|
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",
|
|
860
865
|
key: "w46dr5"
|
|
861
|
-
}]]),
|
|
866
|
+
}]]), $t = P("share-2", [
|
|
862
867
|
["circle", {
|
|
863
868
|
cx: "18",
|
|
864
869
|
cy: "5",
|
|
@@ -891,7 +896,7 @@ var Rt = { class: "tpl:text-center" }, zt = ["href"], Bt = /* @__PURE__ */ y({
|
|
|
891
896
|
y2: "10.49",
|
|
892
897
|
key: "1n3mei"
|
|
893
898
|
}]
|
|
894
|
-
]),
|
|
899
|
+
]), en = P("table", [
|
|
895
900
|
["path", {
|
|
896
901
|
d: "M12 3v18",
|
|
897
902
|
key: "108xh3"
|
|
@@ -912,7 +917,7 @@ var Rt = { class: "tpl:text-center" }, zt = ["href"], Bt = /* @__PURE__ */ y({
|
|
|
912
917
|
d: "M3 15h18",
|
|
913
918
|
key: "5xshup"
|
|
914
919
|
}]
|
|
915
|
-
]),
|
|
920
|
+
]), tn = P("video", [["path", {
|
|
916
921
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
917
922
|
key: "ftymec"
|
|
918
923
|
}], ["rect", {
|
|
@@ -922,11 +927,11 @@ var Rt = { class: "tpl:text-center" }, zt = ["href"], Bt = /* @__PURE__ */ y({
|
|
|
922
927
|
height: "12",
|
|
923
928
|
rx: "2",
|
|
924
929
|
key: "158x01"
|
|
925
|
-
}]]),
|
|
930
|
+
}]]), nn = ["innerHTML"], rn = [
|
|
926
931
|
"src",
|
|
927
932
|
"width",
|
|
928
933
|
"height"
|
|
929
|
-
],
|
|
934
|
+
], an = /* @__PURE__ */ y({
|
|
930
935
|
__name: "CustomBlockIcon",
|
|
931
936
|
props: {
|
|
932
937
|
icon: {},
|
|
@@ -942,60 +947,68 @@ var Rt = { class: "tpl:text-center" }, zt = ["href"], Bt = /* @__PURE__ */ y({
|
|
|
942
947
|
height: `${r.value}px`
|
|
943
948
|
}),
|
|
944
949
|
innerHTML: t.icon
|
|
945
|
-
}, null, 12,
|
|
950
|
+
}, null, 12, nn)) : a.value ? (e(), w("img", {
|
|
946
951
|
key: 1,
|
|
947
952
|
src: t.icon,
|
|
948
953
|
width: r.value,
|
|
949
954
|
height: r.value,
|
|
950
955
|
class: "tpl:inline-block",
|
|
951
956
|
alt: ""
|
|
952
|
-
}, null, 8,
|
|
957
|
+
}, null, 8, rn)) : (e(), ne(j(Wt), {
|
|
953
958
|
key: 2,
|
|
954
959
|
size: r.value,
|
|
955
960
|
"stroke-width": 1.5
|
|
956
961
|
}, null, 8, ["size"]));
|
|
957
962
|
}
|
|
958
|
-
})
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
+
});
|
|
964
|
+
//#endregion
|
|
965
|
+
//#region src/composables/useEditorRoot.ts
|
|
966
|
+
function on() {
|
|
967
|
+
return ae(Ze, document) ?? document;
|
|
968
|
+
}
|
|
969
|
+
//#endregion
|
|
970
|
+
//#region src/composables/useFocusTrap.ts
|
|
971
|
+
var sn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
972
|
+
function cn(e, t) {
|
|
973
|
+
let n = on(), r = null, i = null, a = null;
|
|
974
|
+
function o() {
|
|
975
|
+
return e.value ? Array.from(e.value.querySelectorAll(sn)).filter((e) => e.offsetParent !== null) : [];
|
|
963
976
|
}
|
|
964
|
-
function
|
|
977
|
+
function c(e) {
|
|
965
978
|
if (e.key !== "Tab") return;
|
|
966
|
-
let t =
|
|
979
|
+
let t = o();
|
|
967
980
|
if (t.length === 0) return;
|
|
968
|
-
let
|
|
969
|
-
e.shiftKey ?
|
|
981
|
+
let r = t[0], i = t[t.length - 1];
|
|
982
|
+
e.shiftKey ? n.activeElement === r && (e.preventDefault(), i.focus()) : n.activeElement === i && (e.preventDefault(), r.focus());
|
|
970
983
|
}
|
|
971
|
-
function
|
|
972
|
-
let t =
|
|
973
|
-
t &&
|
|
974
|
-
|
|
975
|
-
let t =
|
|
984
|
+
function l() {
|
|
985
|
+
let t = i !== null || a !== null;
|
|
986
|
+
t && u({ restoreFocus: !1 }), t || (r = n.activeElement), a = requestAnimationFrame(() => {
|
|
987
|
+
a = null;
|
|
988
|
+
let t = o();
|
|
976
989
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
977
|
-
}),
|
|
990
|
+
}), i = Le(e, "keydown", c);
|
|
978
991
|
}
|
|
979
|
-
function
|
|
992
|
+
function u(e = {}) {
|
|
980
993
|
let t = e.restoreFocus !== !1;
|
|
981
|
-
|
|
994
|
+
a !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(a), a = null), i?.(), i = null, t && r && r.focus && (r.focus(), r = null);
|
|
982
995
|
}
|
|
983
|
-
let
|
|
984
|
-
e && t ?
|
|
996
|
+
let d = s([t, e], ([e, t]) => {
|
|
997
|
+
e && t ? l() : u();
|
|
985
998
|
}, { flush: "post" });
|
|
986
999
|
re(() => {
|
|
987
|
-
|
|
1000
|
+
d(), u();
|
|
988
1001
|
});
|
|
989
1002
|
}
|
|
990
1003
|
//#endregion
|
|
991
1004
|
//#region src/composables/useEmoji.ts
|
|
992
|
-
function
|
|
1005
|
+
function ln() {
|
|
993
1006
|
let [e, t] = Ne(!1), n = d([]), r = !1;
|
|
994
1007
|
re(() => {
|
|
995
1008
|
r = !0;
|
|
996
1009
|
}), s(e, async (e) => {
|
|
997
1010
|
if (e && n.value.length === 0) {
|
|
998
|
-
let { emojiCategories: e } = await import("./emojiData-
|
|
1011
|
+
let { emojiCategories: e } = await import("./emojiData-DX3E0XT-.js");
|
|
999
1012
|
if (r) return;
|
|
1000
1013
|
n.value = e;
|
|
1001
1014
|
}
|
|
@@ -1015,7 +1028,7 @@ function on() {
|
|
|
1015
1028
|
}
|
|
1016
1029
|
//#endregion
|
|
1017
1030
|
//#region src/composables/useDragDrop.ts
|
|
1018
|
-
function
|
|
1031
|
+
function un(e) {
|
|
1019
1032
|
let { onBlockMove: t, onBlockAdd: n } = e, r = h(!1), i = h(null), a = h(null);
|
|
1020
1033
|
function o(e) {
|
|
1021
1034
|
r.value = !0, i.value = e;
|
|
@@ -1065,7 +1078,7 @@ function sn(e) {
|
|
|
1065
1078
|
}
|
|
1066
1079
|
//#endregion
|
|
1067
1080
|
//#region src/composables/useFonts.ts
|
|
1068
|
-
var
|
|
1081
|
+
var dn = [
|
|
1069
1082
|
{
|
|
1070
1083
|
value: "Arial",
|
|
1071
1084
|
label: "Arial"
|
|
@@ -1094,7 +1107,7 @@ var cn = [
|
|
|
1094
1107
|
value: "Courier New",
|
|
1095
1108
|
label: "Courier New"
|
|
1096
1109
|
}
|
|
1097
|
-
],
|
|
1110
|
+
], fn = {
|
|
1098
1111
|
arial: "Arial, sans-serif",
|
|
1099
1112
|
helvetica: "Helvetica, sans-serif",
|
|
1100
1113
|
georgia: "Georgia, serif",
|
|
@@ -1102,14 +1115,14 @@ var cn = [
|
|
|
1102
1115
|
verdana: "Verdana, sans-serif",
|
|
1103
1116
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1104
1117
|
"courier new": "'Courier New', monospace"
|
|
1105
|
-
},
|
|
1106
|
-
function
|
|
1107
|
-
let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ??
|
|
1118
|
+
}, pn = "Arial, sans-serif";
|
|
1119
|
+
function mn(e) {
|
|
1120
|
+
let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ?? pn);
|
|
1108
1121
|
function a(e) {
|
|
1109
1122
|
n.value = e;
|
|
1110
1123
|
}
|
|
1111
1124
|
let o = x(() => {
|
|
1112
|
-
let e = [...
|
|
1125
|
+
let e = [...dn];
|
|
1113
1126
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
1114
1127
|
let r = t.value.map((e) => ({
|
|
1115
1128
|
value: e.name,
|
|
@@ -1122,17 +1135,17 @@ function dn(e) {
|
|
|
1122
1135
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1123
1136
|
}
|
|
1124
1137
|
function c(e) {
|
|
1125
|
-
return
|
|
1138
|
+
return dn.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1126
1139
|
}
|
|
1127
1140
|
function l() {
|
|
1128
1141
|
if (e?.defaultFont) {
|
|
1129
|
-
if (!n.value && !c(e.defaultFont)) return
|
|
1142
|
+
if (!n.value && !c(e.defaultFont)) return pn;
|
|
1130
1143
|
if (s(e.defaultFont)) {
|
|
1131
1144
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1132
1145
|
if (t) return t.value;
|
|
1133
1146
|
}
|
|
1134
1147
|
}
|
|
1135
|
-
return
|
|
1148
|
+
return pn;
|
|
1136
1149
|
}
|
|
1137
1150
|
let u = x(() => l());
|
|
1138
1151
|
function d(e) {
|
|
@@ -1142,7 +1155,7 @@ function dn(e) {
|
|
|
1142
1155
|
let e = n.fallback ?? i.value;
|
|
1143
1156
|
return `'${n.name}', ${e}`;
|
|
1144
1157
|
}
|
|
1145
|
-
return
|
|
1158
|
+
return fn[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1146
1159
|
}
|
|
1147
1160
|
let f = [];
|
|
1148
1161
|
async function m() {
|
|
@@ -1158,7 +1171,7 @@ function dn(e) {
|
|
|
1158
1171
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1159
1172
|
});
|
|
1160
1173
|
} catch (t) {
|
|
1161
|
-
|
|
1174
|
+
Pt.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1162
1175
|
}
|
|
1163
1176
|
});
|
|
1164
1177
|
await Promise.allSettled(e), r.value = !0;
|
|
@@ -1183,9 +1196,9 @@ function dn(e) {
|
|
|
1183
1196
|
}
|
|
1184
1197
|
//#endregion
|
|
1185
1198
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1186
|
-
function
|
|
1199
|
+
function hn(e) {
|
|
1187
1200
|
let t = h(!1), n = h(""), r = h(null);
|
|
1188
|
-
|
|
1201
|
+
cn(r, t);
|
|
1189
1202
|
function i() {
|
|
1190
1203
|
n.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
1191
1204
|
}
|
|
@@ -1221,8 +1234,8 @@ function fn(e) {
|
|
|
1221
1234
|
}
|
|
1222
1235
|
//#endregion
|
|
1223
1236
|
//#region src/composables/useRichTextEditor.ts
|
|
1224
|
-
function
|
|
1225
|
-
let t = ae(
|
|
1237
|
+
function gn(e) {
|
|
1238
|
+
let t = ae($e, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = ht(), f = ae(He, null), p = (a(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = de(l), g = d(null), { showLinkDialog: _, linkUrl: v, linkDialogRef: y, openLinkDialog: b, insertLink: x, removeLink: S, closeLinkDialog: C, handleLinkKeydown: w } = hn(g), { start: T, stop: E } = Re(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ee = d(null), D = h(!0), O = h(null), k = !1;
|
|
1226
1239
|
async function te() {
|
|
1227
1240
|
O.value = null, D.value = !0;
|
|
1228
1241
|
try {
|
|
@@ -1252,7 +1265,7 @@ function pn(e) {
|
|
|
1252
1265
|
g.value = s, D.value = !1, T();
|
|
1253
1266
|
} catch (t) {
|
|
1254
1267
|
if (k) return;
|
|
1255
|
-
|
|
1268
|
+
Pt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), O.value = t instanceof Error ? t.message : "Failed to load editor", D.value = !1;
|
|
1256
1269
|
}
|
|
1257
1270
|
}
|
|
1258
1271
|
function A() {
|
|
@@ -1264,8 +1277,8 @@ function pn(e) {
|
|
|
1264
1277
|
});
|
|
1265
1278
|
function re(t) {
|
|
1266
1279
|
if (o.value) return;
|
|
1267
|
-
let n = t.
|
|
1268
|
-
e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone();
|
|
1280
|
+
let n = t.composedPath().find((e) => e instanceof HTMLElement);
|
|
1281
|
+
n && (e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone());
|
|
1269
1282
|
}
|
|
1270
1283
|
Le(document, "mousedown", re), n(() => {
|
|
1271
1284
|
k = !0, ne(), E(), g.value?.destroy();
|
|
@@ -1300,20 +1313,20 @@ function pn(e) {
|
|
|
1300
1313
|
}
|
|
1301
1314
|
//#endregion
|
|
1302
1315
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1303
|
-
var
|
|
1316
|
+
var _n = { class: "tpl:w-full" }, vn = {
|
|
1304
1317
|
key: 0,
|
|
1305
1318
|
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)]"
|
|
1306
|
-
},
|
|
1319
|
+
}, yn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, bn = {
|
|
1307
1320
|
key: 1,
|
|
1308
1321
|
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)]"
|
|
1309
|
-
},
|
|
1322
|
+
}, xn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Sn = {
|
|
1310
1323
|
key: 2,
|
|
1311
1324
|
class: "tpl:relative"
|
|
1312
|
-
},
|
|
1325
|
+
}, Cn = ["innerHTML"], wn = {
|
|
1313
1326
|
key: 0,
|
|
1314
1327
|
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]",
|
|
1315
1328
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1316
|
-
},
|
|
1329
|
+
}, Tn = /* @__PURE__ */ y({
|
|
1317
1330
|
__name: "CustomBlock",
|
|
1318
1331
|
props: {
|
|
1319
1332
|
block: {},
|
|
@@ -1321,7 +1334,7 @@ var mn = { class: "tpl:w-full" }, hn = {
|
|
|
1321
1334
|
},
|
|
1322
1335
|
emits: ["fetchData"],
|
|
1323
1336
|
setup(t, { emit: n }) {
|
|
1324
|
-
let r = t, i = n, { t: a } =
|
|
1337
|
+
let r = t, i = n, { t: a } = lt(), o = ae(rt, 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 } = wt({
|
|
1325
1338
|
definition: d,
|
|
1326
1339
|
block: x(() => r.block),
|
|
1327
1340
|
onUpdate: (e, t) => {
|
|
@@ -1347,10 +1360,10 @@ var mn = { class: "tpl:w-full" }, hn = {
|
|
|
1347
1360
|
y();
|
|
1348
1361
|
}), s(() => r.block.fieldValues, () => {
|
|
1349
1362
|
S();
|
|
1350
|
-
}, { deep: !0 }), (t, n) => (e(), w("div",
|
|
1363
|
+
}, { deep: !0 }), (t, n) => (e(), w("div", _n, [f.value ? l.value ? (e(), w("div", bn, [N(j(ft), {
|
|
1351
1364
|
size: 24,
|
|
1352
1365
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1353
|
-
}), C("span",
|
|
1366
|
+
}), C("span", xn, M(j(a).customBlocks.renderError), 1)])) : (e(), w("div", Sn, [C("div", { innerHTML: c.value }, null, 8, Cn), j(v) && j(g) ? (e(), w("div", wn, [j(p) ? (e(), ne(pt, {
|
|
1354
1367
|
key: 1,
|
|
1355
1368
|
class: "tpl:w-48"
|
|
1356
1369
|
})) : (e(), w("button", {
|
|
@@ -1358,16 +1371,16 @@ var mn = { class: "tpl:w-full" }, hn = {
|
|
|
1358
1371
|
type: "button",
|
|
1359
1372
|
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)]",
|
|
1360
1373
|
onClick: n[0] ||= b((...e) => j(m) && j(m)(...e), ["stop"])
|
|
1361
|
-
}, [d.value?.icon ? (e(), ne(
|
|
1374
|
+
}, [d.value?.icon ? (e(), ne(an, {
|
|
1362
1375
|
key: 0,
|
|
1363
1376
|
icon: d.value.icon,
|
|
1364
1377
|
size: 16
|
|
1365
|
-
}, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div",
|
|
1378
|
+
}, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div", vn, [N(j(Qt), {
|
|
1366
1379
|
size: 24,
|
|
1367
1380
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1368
|
-
}), C("span",
|
|
1381
|
+
}), C("span", yn, M(j(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1369
1382
|
}
|
|
1370
|
-
}),
|
|
1383
|
+
}), En = { class: "tpl:w-full" }, Dn = /* @__PURE__ */ y({
|
|
1371
1384
|
__name: "DividerBlock",
|
|
1372
1385
|
props: {
|
|
1373
1386
|
block: {},
|
|
@@ -1379,37 +1392,37 @@ var mn = { class: "tpl:w-full" }, hn = {
|
|
|
1379
1392
|
width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
|
|
1380
1393
|
margin: n.block.width === "full" ? "0" : "0 auto"
|
|
1381
1394
|
}));
|
|
1382
|
-
return (t, n) => (e(), w("div",
|
|
1395
|
+
return (t, n) => (e(), w("div", En, [C("hr", {
|
|
1383
1396
|
class: "tpl:m-0 tpl:border-none",
|
|
1384
1397
|
style: A(r.value)
|
|
1385
1398
|
}, null, 4)]));
|
|
1386
1399
|
}
|
|
1387
|
-
}),
|
|
1400
|
+
}), On = { class: "tpl:w-full" }, kn = { 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)]" }, An = {
|
|
1388
1401
|
key: 0,
|
|
1389
1402
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1390
|
-
},
|
|
1403
|
+
}, jn = {
|
|
1391
1404
|
key: 1,
|
|
1392
1405
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1393
|
-
},
|
|
1406
|
+
}, Mn = /* @__PURE__ */ y({
|
|
1394
1407
|
__name: "HtmlBlock",
|
|
1395
1408
|
props: {
|
|
1396
1409
|
block: {},
|
|
1397
1410
|
viewport: {}
|
|
1398
1411
|
},
|
|
1399
1412
|
setup(t) {
|
|
1400
|
-
let n = t, { t: r } =
|
|
1401
|
-
return (t, n) => (e(), w("div",
|
|
1413
|
+
let n = t, { t: r } = lt(), i = x(() => n.block.content.trim().length > 0);
|
|
1414
|
+
return (t, n) => (e(), w("div", On, [C("div", kn, [N(j(Gt), {
|
|
1402
1415
|
size: 24,
|
|
1403
1416
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1404
|
-
}), i.value ? (e(), w("span",
|
|
1417
|
+
}), i.value ? (e(), w("span", An, M(j(r).html.preview), 1)) : (e(), w("span", jn, M(j(r).html.empty), 1))])]));
|
|
1405
1418
|
}
|
|
1406
|
-
}),
|
|
1419
|
+
}), Nn = ["href"], Pn = ["src", "alt"], Fn = ["src", "alt"], In = {
|
|
1407
1420
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1408
1421
|
style: { opacity: "0.7" }
|
|
1409
|
-
},
|
|
1422
|
+
}, Ln = ["href"], Rn = ["src", "alt"], zn = ["src", "alt"], Bn = {
|
|
1410
1423
|
key: 3,
|
|
1411
1424
|
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)]"
|
|
1412
|
-
},
|
|
1425
|
+
}, Vn = ["aria-label"], Hn = { key: 1 }, Un = /* @__PURE__ */ y({
|
|
1413
1426
|
__name: "ImageBlock",
|
|
1414
1427
|
props: {
|
|
1415
1428
|
block: {},
|
|
@@ -1417,7 +1430,7 @@ var mn = { class: "tpl:w-full" }, hn = {
|
|
|
1417
1430
|
},
|
|
1418
1431
|
emits: ["update"],
|
|
1419
1432
|
setup(t, { emit: n }) {
|
|
1420
|
-
let r = t, i = n, { t: a } =
|
|
1433
|
+
let r = t, i = n, { t: a } = lt(), { syntax: o } = ht(), s = ae(Ue, null), c = x(() => !!s);
|
|
1421
1434
|
async function l() {
|
|
1422
1435
|
let e = await s?.({ accept: ["images"] });
|
|
1423
1436
|
if (e) {
|
|
@@ -1447,22 +1460,22 @@ var mn = { class: "tpl:w-full" }, hn = {
|
|
|
1447
1460
|
src: t.block.placeholderUrl,
|
|
1448
1461
|
alt: t.block.alt || j(a).image.altTextPlaceholder,
|
|
1449
1462
|
style: A(d.value)
|
|
1450
|
-
}, null, 12,
|
|
1463
|
+
}, null, 12, Pn)], 8, Nn)) : (e(), w("img", {
|
|
1451
1464
|
key: 1,
|
|
1452
1465
|
class: "tpl:border-0",
|
|
1453
1466
|
src: t.block.placeholderUrl,
|
|
1454
1467
|
alt: t.block.alt,
|
|
1455
1468
|
style: A(d.value)
|
|
1456
|
-
}, null, 12,
|
|
1469
|
+
}, null, 12, Fn))], 64)) : t.block.src && f.value ? (e(), w("div", {
|
|
1457
1470
|
key: 1,
|
|
1458
1471
|
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)]",
|
|
1459
1472
|
style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
1460
|
-
}, [N(j(
|
|
1473
|
+
}, [N(j(Xt), {
|
|
1461
1474
|
size: 32,
|
|
1462
1475
|
"stroke-width": 1.5,
|
|
1463
1476
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1464
1477
|
style: { opacity: "0.5" }
|
|
1465
|
-
}), C("span",
|
|
1478
|
+
}), C("span", In, M(t.block.src), 1)], 4)) : t.block.src ? (e(), w(D, { key: 2 }, [t.block.linkUrl ? (e(), w("a", {
|
|
1466
1479
|
key: 0,
|
|
1467
1480
|
href: t.block.linkUrl,
|
|
1468
1481
|
target: "_blank",
|
|
@@ -1474,33 +1487,33 @@ var mn = { class: "tpl:w-full" }, hn = {
|
|
|
1474
1487
|
src: t.block.src,
|
|
1475
1488
|
alt: t.block.alt || j(a).image.altTextPlaceholder,
|
|
1476
1489
|
style: A(d.value)
|
|
1477
|
-
}, null, 12,
|
|
1490
|
+
}, null, 12, Rn)], 8, Ln)) : (e(), w("img", {
|
|
1478
1491
|
key: 1,
|
|
1479
1492
|
class: "tpl:border-0",
|
|
1480
1493
|
src: t.block.src,
|
|
1481
1494
|
alt: t.block.alt,
|
|
1482
1495
|
style: A(d.value)
|
|
1483
|
-
}, null, 12,
|
|
1496
|
+
}, null, 12, zn))], 64)) : (e(), w("div", Bn, [c.value ? (e(), w("button", {
|
|
1484
1497
|
key: 0,
|
|
1485
1498
|
"aria-label": j(a).image.browseMedia,
|
|
1486
1499
|
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)]",
|
|
1487
1500
|
onClick: b(l, ["stop"])
|
|
1488
|
-
}, [N(j(
|
|
1501
|
+
}, [N(j(Xt), {
|
|
1489
1502
|
size: 14,
|
|
1490
1503
|
"stroke-width": 1.5
|
|
1491
|
-
}), _(" " + M(j(a).image.browseMedia), 1)], 8,
|
|
1504
|
+
}), _(" " + M(j(a).image.browseMedia), 1)], 8, Vn)) : (e(), w("span", Hn, M(j(a).image.clickToAdd), 1))]))], 4));
|
|
1492
1505
|
}
|
|
1493
|
-
}),
|
|
1506
|
+
}), Wn = { class: "tpl:w-full" }, Gn = ["href"], Kn = {
|
|
1494
1507
|
key: 1,
|
|
1495
1508
|
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)]"
|
|
1496
|
-
},
|
|
1509
|
+
}, qn = /* @__PURE__ */ y({
|
|
1497
1510
|
__name: "MenuBlock",
|
|
1498
1511
|
props: {
|
|
1499
1512
|
block: {},
|
|
1500
1513
|
viewport: {}
|
|
1501
1514
|
},
|
|
1502
1515
|
setup(t) {
|
|
1503
|
-
let n = t, { t: r } =
|
|
1516
|
+
let n = t, { t: r } = lt(), i = x(() => ({
|
|
1504
1517
|
display: "flex",
|
|
1505
1518
|
flexWrap: "wrap",
|
|
1506
1519
|
gap: `0 ${n.block.spacing}px`,
|
|
@@ -1512,7 +1525,7 @@ var mn = { class: "tpl:w-full" }, hn = {
|
|
|
1512
1525
|
function o(e) {
|
|
1513
1526
|
return e || n.block.linkColor || n.block.color;
|
|
1514
1527
|
}
|
|
1515
|
-
return (n, s) => (e(), w("div",
|
|
1528
|
+
return (n, s) => (e(), w("div", Wn, [a.value ? (e(), w("div", {
|
|
1516
1529
|
key: 0,
|
|
1517
1530
|
style: A(i.value)
|
|
1518
1531
|
}, [(e(!0), w(D, null, c(t.block.items, (n, r) => (e(), w(D, { key: n.id }, [C("a", {
|
|
@@ -1524,19 +1537,19 @@ var mn = { class: "tpl:w-full" }, hn = {
|
|
|
1524
1537
|
textDecoration: n.underline ? "underline" : "none"
|
|
1525
1538
|
}),
|
|
1526
1539
|
onClick: s[0] ||= b(() => {}, ["prevent"])
|
|
1527
|
-
}, M(n.text || "..."), 13,
|
|
1540
|
+
}, M(n.text || "..."), 13, Gn), r < t.block.items.length - 1 ? (e(), w("span", {
|
|
1528
1541
|
key: 0,
|
|
1529
1542
|
style: A({
|
|
1530
1543
|
color: t.block.separatorColor,
|
|
1531
1544
|
padding: `0 ${t.block.spacing}px`
|
|
1532
1545
|
})
|
|
1533
|
-
}, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div",
|
|
1546
|
+
}, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div", Kn, [N(j(Zt), { size: 16 }), C("span", null, M(j(r).menu.addLinks), 1)]))]));
|
|
1534
1547
|
}
|
|
1535
1548
|
});
|
|
1536
1549
|
//#endregion
|
|
1537
1550
|
//#region src/composables/useEditableTextBlock.ts
|
|
1538
|
-
function
|
|
1539
|
-
let t = ae(
|
|
1551
|
+
function Jn(e) {
|
|
1552
|
+
let t = ae(ct, []), { syntax: n } = ht(), r = x(() => xe(le(e(), t), n)), i = h(!1), a = h(null), { top: o, left: s } = Ie(a), c = x(() => ({
|
|
1540
1553
|
top: o.value - 8,
|
|
1541
1554
|
left: s.value
|
|
1542
1555
|
}));
|
|
@@ -1557,14 +1570,14 @@ function Gn(e) {
|
|
|
1557
1570
|
}
|
|
1558
1571
|
//#endregion
|
|
1559
1572
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1560
|
-
var
|
|
1573
|
+
var Yn = ["innerHTML"], Xn = /* @__PURE__ */ y({
|
|
1561
1574
|
__name: "ParagraphBlock",
|
|
1562
1575
|
props: {
|
|
1563
1576
|
block: {},
|
|
1564
1577
|
viewport: {}
|
|
1565
1578
|
},
|
|
1566
1579
|
setup(t) {
|
|
1567
|
-
let n = t, r = se(() => import("./ParagraphEditor-
|
|
1580
|
+
let n = t, r = se(() => import("./ParagraphEditor-BRQTNDFO.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Jn(() => n.block.content);
|
|
1568
1581
|
return (n, u) => (e(), w("div", {
|
|
1569
1582
|
ref_key: "blockRef",
|
|
1570
1583
|
ref: a,
|
|
@@ -1583,19 +1596,19 @@ var Kn = ["innerHTML"], qn = /* @__PURE__ */ y({
|
|
|
1583
1596
|
key: 1,
|
|
1584
1597
|
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",
|
|
1585
1598
|
innerHTML: j(s)
|
|
1586
|
-
}, null, 8,
|
|
1599
|
+
}, null, 8, Yn))], 544));
|
|
1587
1600
|
}
|
|
1588
1601
|
});
|
|
1589
1602
|
//#endregion
|
|
1590
1603
|
//#region src/utils/blockComponentResolver.ts
|
|
1591
|
-
function
|
|
1604
|
+
function Zn(e, t, n) {
|
|
1592
1605
|
if (t) {
|
|
1593
1606
|
let n = t.getComponent(e);
|
|
1594
1607
|
if (n) return n;
|
|
1595
1608
|
}
|
|
1596
1609
|
return n[e.type] ?? null;
|
|
1597
1610
|
}
|
|
1598
|
-
function
|
|
1611
|
+
function Qn(e) {
|
|
1599
1612
|
let { padding: t, margin: n, backgroundColor: r } = e.styles;
|
|
1600
1613
|
return {
|
|
1601
1614
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
@@ -1605,20 +1618,20 @@ function Yn(e) {
|
|
|
1605
1618
|
}
|
|
1606
1619
|
//#endregion
|
|
1607
1620
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
1608
|
-
var
|
|
1621
|
+
var $n = ["data-block-id", "data-block-type"], er = ["aria-label"], tr = [
|
|
1609
1622
|
"aria-label",
|
|
1610
1623
|
"aria-pressed",
|
|
1611
1624
|
"title"
|
|
1612
|
-
],
|
|
1625
|
+
], nr = ["aria-label", "title"], rr = ["aria-label", "title"], ir = ["aria-label", "title"], ar = {
|
|
1613
1626
|
key: 1,
|
|
1614
1627
|
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"
|
|
1615
|
-
},
|
|
1628
|
+
}, or = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, sr = {
|
|
1616
1629
|
key: 2,
|
|
1617
1630
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1618
|
-
},
|
|
1631
|
+
}, cr = ["aria-label", "title"], lr = {
|
|
1619
1632
|
key: 3,
|
|
1620
1633
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1621
|
-
},
|
|
1634
|
+
}, ur = ["aria-label"], dr = /* @__PURE__ */ mt(/* @__PURE__ */ y({
|
|
1622
1635
|
__name: "BlockWrapper",
|
|
1623
1636
|
props: {
|
|
1624
1637
|
block: {},
|
|
@@ -1628,7 +1641,7 @@ var Xn = ["data-block-id", "data-block-type"], Zn = ["aria-label"], Qn = [
|
|
|
1628
1641
|
},
|
|
1629
1642
|
emits: ["select"],
|
|
1630
1643
|
setup(t, { emit: n }) {
|
|
1631
|
-
let i = se(() => import("./BlockA11yBadge-
|
|
1644
|
+
let i = se(() => import("./BlockA11yBadge-BFIw0h1m.js")), a = t, o = n, { t: s, format: c } = lt(), u = ae(at, 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);
|
|
1632
1645
|
async function m() {
|
|
1633
1646
|
await r(), d.value?.focus();
|
|
1634
1647
|
}
|
|
@@ -1655,7 +1668,7 @@ var Xn = ["data-block-id", "data-block-type"], Zn = ["aria-label"], Qn = [
|
|
|
1655
1668
|
desktop: s.viewport.desktop,
|
|
1656
1669
|
tablet: s.viewport.tablet,
|
|
1657
1670
|
mobile: s.viewport.mobile
|
|
1658
|
-
}[a.viewport] ?? a.viewport : ""), T = x(() => !!a.block.displayCondition), E = ae(Ge, null), ee = ae(Je, null), D = ae(qe, {}), k = x(() => !!D.savedModules), te = x(() => D.comments?.getBlockCount(a.block.id) ?? 0), ne = x(() =>
|
|
1671
|
+
}[a.viewport] ?? a.viewport : ""), T = x(() => !!a.block.displayCondition), E = ae(Ge, null), ee = ae(Je, null), D = ae(qe, {}), k = x(() => !!D.savedModules), te = x(() => D.comments?.getBlockCount(a.block.id) ?? 0), ne = x(() => Qn(a.block));
|
|
1659
1672
|
function re(e) {
|
|
1660
1673
|
a.previewMode || (e.stopPropagation(), o("select"));
|
|
1661
1674
|
}
|
|
@@ -1699,87 +1712,87 @@ var Xn = ["data-block-id", "data-block-type"], Zn = ["aria-label"], Qn = [
|
|
|
1699
1712
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1700
1713
|
title: j(s).blockActions.drag,
|
|
1701
1714
|
onKeydown: g
|
|
1702
|
-
}, [N(j(
|
|
1715
|
+
}, [N(j(Yt), {
|
|
1703
1716
|
size: 14,
|
|
1704
1717
|
"stroke-width": 1.5
|
|
1705
|
-
})], 40,
|
|
1718
|
+
})], 40, tr),
|
|
1706
1719
|
C("button", {
|
|
1707
1720
|
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",
|
|
1708
1721
|
"aria-label": j(s).blockActions.duplicate,
|
|
1709
1722
|
title: j(s).blockActions.duplicate,
|
|
1710
1723
|
onClick: b(oe, ["stop"])
|
|
1711
|
-
}, [N(j(
|
|
1724
|
+
}, [N(j(Kt), {
|
|
1712
1725
|
size: 14,
|
|
1713
1726
|
"stroke-width": 1.5
|
|
1714
|
-
})], 8,
|
|
1727
|
+
})], 8, nr),
|
|
1715
1728
|
k.value ? (e(), w("button", {
|
|
1716
1729
|
key: 0,
|
|
1717
1730
|
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",
|
|
1718
1731
|
"aria-label": j(s).blockActions.saveAsModule,
|
|
1719
1732
|
title: j(s).blockActions.saveAsModule,
|
|
1720
1733
|
onClick: b(ce, ["stop"])
|
|
1721
|
-
}, [N(j(
|
|
1734
|
+
}, [N(j(Ut), {
|
|
1722
1735
|
size: 14,
|
|
1723
1736
|
"stroke-width": 1.5
|
|
1724
|
-
})], 8,
|
|
1737
|
+
})], 8, rr)) : O("", !0),
|
|
1725
1738
|
C("button", {
|
|
1726
1739
|
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",
|
|
1727
1740
|
"aria-label": j(s).blockActions.delete,
|
|
1728
1741
|
title: j(s).blockActions.delete,
|
|
1729
1742
|
onClick: b(ie, ["stop"])
|
|
1730
|
-
}, [N(j(
|
|
1743
|
+
}, [N(j(dt), {
|
|
1731
1744
|
size: 14,
|
|
1732
1745
|
"stroke-width": 1.5
|
|
1733
|
-
})], 8,
|
|
1734
|
-
], 8,
|
|
1735
|
-
y.value ? (e(), w("div",
|
|
1746
|
+
})], 8, ir)
|
|
1747
|
+
], 8, er)) : O("", !0),
|
|
1748
|
+
y.value ? (e(), w("div", ar, [C("span", or, [N(j(qt), {
|
|
1736
1749
|
size: 12,
|
|
1737
1750
|
"stroke-width": 1.5
|
|
1738
1751
|
}), _(" " + M(j(c)(j(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : O("", !0),
|
|
1739
|
-
T.value && !y.value ? (e(), w("div",
|
|
1752
|
+
T.value && !y.value ? (e(), w("div", sr, [C("button", {
|
|
1740
1753
|
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)]",
|
|
1741
1754
|
"aria-label": j(s).blockActions.conditionToggle,
|
|
1742
1755
|
title: t.block.displayCondition?.label,
|
|
1743
1756
|
onClick: b(le, ["stop"])
|
|
1744
|
-
}, [N(j(
|
|
1757
|
+
}, [N(j(Jt), {
|
|
1745
1758
|
size: 12,
|
|
1746
1759
|
"stroke-width": 2
|
|
1747
|
-
})], 8,
|
|
1748
|
-
te.value > 0 && !y.value ? (e(), w("div",
|
|
1760
|
+
})], 8, cr)])) : O("", !0),
|
|
1761
|
+
te.value > 0 && !y.value ? (e(), w("div", lr, [C("button", {
|
|
1749
1762
|
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)]",
|
|
1750
1763
|
"aria-label": j(c)(j(s).blockActions.comments, { count: String(te.value) }),
|
|
1751
1764
|
onClick: r[0] ||= b((e) => j(D).comments?.openForBlock(t.block.id), ["stop"])
|
|
1752
|
-
}, [N(j(
|
|
1765
|
+
}, [N(j(ut), {
|
|
1753
1766
|
size: 12,
|
|
1754
1767
|
"stroke-width": 2.5
|
|
1755
|
-
}), _(" " + M(te.value), 1)], 8,
|
|
1768
|
+
}), _(" " + M(te.value), 1)], 8, ur)])) : O("", !0),
|
|
1756
1769
|
l(n.$slots, "default", {}, void 0, !0)
|
|
1757
|
-
], 14,
|
|
1770
|
+
], 14, $n));
|
|
1758
1771
|
}
|
|
1759
1772
|
}), [["__scopeId", "data-v-850614e7"]]);
|
|
1760
1773
|
//#endregion
|
|
1761
1774
|
//#region src/utils/unwrapParagraph.ts
|
|
1762
|
-
function
|
|
1775
|
+
function fr(e) {
|
|
1763
1776
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
1764
1777
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
1765
1778
|
}
|
|
1766
1779
|
//#endregion
|
|
1767
1780
|
//#region src/components/blocks/TitleBlock.vue
|
|
1768
|
-
var
|
|
1781
|
+
var pr = /* @__PURE__ */ y({
|
|
1769
1782
|
__name: "TitleBlock",
|
|
1770
1783
|
props: {
|
|
1771
1784
|
block: {},
|
|
1772
1785
|
viewport: {}
|
|
1773
1786
|
},
|
|
1774
1787
|
setup(t) {
|
|
1775
|
-
let n = t, r = se(() => import("./TitleEditor-
|
|
1788
|
+
let n = t, r = se(() => import("./TitleEditor-DhFTYzrw.js")), { isEditing: a, blockRef: o, toolbarPosition: s, resolvedContent: c, handleDoubleClick: l, handleEditorDone: u } = Jn(() => n.block.content), d = x(() => {
|
|
1776
1789
|
let e = {
|
|
1777
1790
|
fontSize: `${De[n.block.level]}px`,
|
|
1778
1791
|
color: n.block.color,
|
|
1779
1792
|
textAlign: n.block.textAlign
|
|
1780
1793
|
};
|
|
1781
1794
|
return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
|
|
1782
|
-
}), f = x(() => `h${n.block.level}`), p = x(() =>
|
|
1795
|
+
}), f = x(() => `h${n.block.level}`), p = x(() => fr(c.value));
|
|
1783
1796
|
return (n, c) => (e(), w("div", {
|
|
1784
1797
|
ref_key: "blockRef",
|
|
1785
1798
|
ref: o,
|
|
@@ -1802,83 +1815,83 @@ var ur = /* @__PURE__ */ y({
|
|
|
1802
1815
|
innerHTML: p.value
|
|
1803
1816
|
}, null, 8, ["innerHTML"]))], 36));
|
|
1804
1817
|
}
|
|
1805
|
-
}),
|
|
1818
|
+
}), mr = Object.defineProperty, hr = Object.getOwnPropertySymbols, gr = Object.prototype.hasOwnProperty, _r = Object.prototype.propertyIsEnumerable, vr = (e, t, n) => t in e ? mr(e, t, {
|
|
1806
1819
|
enumerable: !0,
|
|
1807
1820
|
configurable: !0,
|
|
1808
1821
|
writable: !0,
|
|
1809
1822
|
value: n
|
|
1810
|
-
}) : e[t] = n,
|
|
1811
|
-
for (var n in t ||= {})
|
|
1812
|
-
if (
|
|
1823
|
+
}) : e[t] = n, yr = (e, t) => {
|
|
1824
|
+
for (var n in t ||= {}) gr.call(t, n) && vr(e, n, t[n]);
|
|
1825
|
+
if (hr) for (var n of hr(t)) _r.call(t, n) && vr(e, n, t[n]);
|
|
1813
1826
|
return e;
|
|
1814
|
-
},
|
|
1827
|
+
}, br = (e, t) => {
|
|
1815
1828
|
var n = {};
|
|
1816
|
-
for (var r in e)
|
|
1817
|
-
if (e != null &&
|
|
1829
|
+
for (var r in e) gr.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
1830
|
+
if (e != null && hr) for (var r of hr(e)) t.indexOf(r) < 0 && _r.call(e, r) && (n[r] = e[r]);
|
|
1818
1831
|
return n;
|
|
1819
|
-
},
|
|
1820
|
-
function
|
|
1821
|
-
console.warn(
|
|
1832
|
+
}, xr = "[vue-draggable-plus]: ";
|
|
1833
|
+
function Sr(e) {
|
|
1834
|
+
console.warn(xr + e);
|
|
1822
1835
|
}
|
|
1823
|
-
function
|
|
1824
|
-
console.error(
|
|
1836
|
+
function Cr(e) {
|
|
1837
|
+
console.error(xr + e);
|
|
1825
1838
|
}
|
|
1826
|
-
function
|
|
1839
|
+
function wr(e, t, n) {
|
|
1827
1840
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
1828
1841
|
}
|
|
1829
|
-
function
|
|
1842
|
+
function Tr(e) {
|
|
1830
1843
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
1831
1844
|
}
|
|
1832
|
-
function
|
|
1833
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
1845
|
+
function Er(e) {
|
|
1846
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Tr(n)] = e[n]), t), {});
|
|
1834
1847
|
}
|
|
1835
|
-
function
|
|
1848
|
+
function Dr(e, t) {
|
|
1836
1849
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
1837
1850
|
}
|
|
1838
|
-
function
|
|
1851
|
+
function Or(e, t, n) {
|
|
1839
1852
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
1840
1853
|
}
|
|
1841
|
-
function
|
|
1854
|
+
function kr(e) {
|
|
1842
1855
|
return e === void 0;
|
|
1843
1856
|
}
|
|
1844
|
-
function
|
|
1857
|
+
function Ar(e) {
|
|
1845
1858
|
return typeof e == "string";
|
|
1846
1859
|
}
|
|
1847
|
-
function
|
|
1860
|
+
function jr(e, t, n) {
|
|
1848
1861
|
let r = e.children[n];
|
|
1849
1862
|
e.insertBefore(t, r);
|
|
1850
1863
|
}
|
|
1851
|
-
function
|
|
1864
|
+
function Mr(e) {
|
|
1852
1865
|
e.parentNode && e.parentNode.removeChild(e);
|
|
1853
1866
|
}
|
|
1854
|
-
function
|
|
1867
|
+
function Nr(e, t = document) {
|
|
1855
1868
|
let n = null;
|
|
1856
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
1869
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Sr(`Element not found: ${e}`), n;
|
|
1857
1870
|
}
|
|
1858
|
-
function
|
|
1871
|
+
function Pr(e, t, n = null) {
|
|
1859
1872
|
return function(...r) {
|
|
1860
1873
|
return e.apply(n, r), t.apply(n, r);
|
|
1861
1874
|
};
|
|
1862
1875
|
}
|
|
1863
|
-
function
|
|
1864
|
-
let n =
|
|
1876
|
+
function Fr(e, t) {
|
|
1877
|
+
let n = yr({}, e);
|
|
1865
1878
|
return Object.keys(t).forEach((r) => {
|
|
1866
|
-
n[r] ? n[r] =
|
|
1879
|
+
n[r] ? n[r] = Pr(e[r], t[r]) : n[r] = t[r];
|
|
1867
1880
|
}), n;
|
|
1868
1881
|
}
|
|
1869
|
-
function
|
|
1882
|
+
function Ir(e) {
|
|
1870
1883
|
return e instanceof HTMLElement;
|
|
1871
1884
|
}
|
|
1872
|
-
function
|
|
1885
|
+
function Lr(e, t) {
|
|
1873
1886
|
Object.keys(e).forEach((n) => {
|
|
1874
1887
|
t(n, e[n]);
|
|
1875
1888
|
});
|
|
1876
1889
|
}
|
|
1877
|
-
function
|
|
1890
|
+
function Rr(e) {
|
|
1878
1891
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
1879
1892
|
}
|
|
1880
|
-
var
|
|
1881
|
-
function
|
|
1893
|
+
var zr = Object.assign;
|
|
1894
|
+
function Br(e, t) {
|
|
1882
1895
|
var n = Object.keys(e);
|
|
1883
1896
|
if (Object.getOwnPropertySymbols) {
|
|
1884
1897
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -1888,26 +1901,26 @@ function Lr(e, t) {
|
|
|
1888
1901
|
}
|
|
1889
1902
|
return n;
|
|
1890
1903
|
}
|
|
1891
|
-
function
|
|
1904
|
+
function Vr(e) {
|
|
1892
1905
|
for (var t = 1; t < arguments.length; t++) {
|
|
1893
1906
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
1894
|
-
t % 2 ?
|
|
1895
|
-
|
|
1896
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
1907
|
+
t % 2 ? Br(Object(n), !0).forEach(function(t) {
|
|
1908
|
+
Ur(e, t, n[t]);
|
|
1909
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Br(Object(n)).forEach(function(t) {
|
|
1897
1910
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
1898
1911
|
});
|
|
1899
1912
|
}
|
|
1900
1913
|
return e;
|
|
1901
1914
|
}
|
|
1902
|
-
function
|
|
1915
|
+
function Hr(e) {
|
|
1903
1916
|
"@babel/helpers - typeof";
|
|
1904
|
-
return
|
|
1917
|
+
return Hr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1905
1918
|
return typeof e;
|
|
1906
1919
|
} : function(e) {
|
|
1907
1920
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1908
|
-
},
|
|
1921
|
+
}, Hr(e);
|
|
1909
1922
|
}
|
|
1910
|
-
function
|
|
1923
|
+
function Ur(e, t, n) {
|
|
1911
1924
|
return t in e ? Object.defineProperty(e, t, {
|
|
1912
1925
|
value: n,
|
|
1913
1926
|
enumerable: !0,
|
|
@@ -1915,45 +1928,45 @@ function Br(e, t, n) {
|
|
|
1915
1928
|
writable: !0
|
|
1916
1929
|
}) : e[t] = n, e;
|
|
1917
1930
|
}
|
|
1918
|
-
function
|
|
1919
|
-
return
|
|
1931
|
+
function Wr() {
|
|
1932
|
+
return Wr = Object.assign || function(e) {
|
|
1920
1933
|
for (var t = 1; t < arguments.length; t++) {
|
|
1921
1934
|
var n = arguments[t];
|
|
1922
1935
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
1923
1936
|
}
|
|
1924
1937
|
return e;
|
|
1925
|
-
},
|
|
1938
|
+
}, Wr.apply(this, arguments);
|
|
1926
1939
|
}
|
|
1927
|
-
function
|
|
1940
|
+
function Gr(e, t) {
|
|
1928
1941
|
if (e == null) return {};
|
|
1929
1942
|
var n = {}, r = Object.keys(e), i, a;
|
|
1930
1943
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
1931
1944
|
return n;
|
|
1932
1945
|
}
|
|
1933
|
-
function
|
|
1946
|
+
function Kr(e, t) {
|
|
1934
1947
|
if (e == null) return {};
|
|
1935
|
-
var n =
|
|
1948
|
+
var n = Gr(e, t), r, i;
|
|
1936
1949
|
if (Object.getOwnPropertySymbols) {
|
|
1937
1950
|
var a = Object.getOwnPropertySymbols(e);
|
|
1938
1951
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
1939
1952
|
}
|
|
1940
1953
|
return n;
|
|
1941
1954
|
}
|
|
1942
|
-
var
|
|
1943
|
-
function
|
|
1955
|
+
var qr = "1.15.2";
|
|
1956
|
+
function Jr(e) {
|
|
1944
1957
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
1945
1958
|
}
|
|
1946
|
-
var
|
|
1959
|
+
var Yr = Jr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Xr = Jr(/Edge/i), Zr = Jr(/firefox/i), Qr = Jr(/safari/i) && !Jr(/chrome/i) && !Jr(/android/i), $r = Jr(/iP(ad|od|hone)/i), ei = Jr(/chrome/i) && Jr(/android/i), ti = {
|
|
1947
1960
|
capture: !1,
|
|
1948
1961
|
passive: !1
|
|
1949
1962
|
};
|
|
1950
1963
|
function F(e, t, n) {
|
|
1951
|
-
e.addEventListener(t, n, !
|
|
1964
|
+
e.addEventListener(t, n, !Yr && ti);
|
|
1952
1965
|
}
|
|
1953
1966
|
function I(e, t, n) {
|
|
1954
|
-
e.removeEventListener(t, n, !
|
|
1967
|
+
e.removeEventListener(t, n, !Yr && ti);
|
|
1955
1968
|
}
|
|
1956
|
-
function
|
|
1969
|
+
function ni(e, t) {
|
|
1957
1970
|
if (t) {
|
|
1958
1971
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
1959
1972
|
if (e.matches) return e.matches(t);
|
|
@@ -1965,22 +1978,22 @@ function $r(e, t) {
|
|
|
1965
1978
|
return !1;
|
|
1966
1979
|
}
|
|
1967
1980
|
}
|
|
1968
|
-
function
|
|
1981
|
+
function ri(e) {
|
|
1969
1982
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
1970
1983
|
}
|
|
1971
|
-
function
|
|
1984
|
+
function ii(e, t, n, r) {
|
|
1972
1985
|
if (e) {
|
|
1973
1986
|
n ||= document;
|
|
1974
1987
|
do {
|
|
1975
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
1988
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && ni(e, t) : ni(e, t)) || r && e === n) return e;
|
|
1976
1989
|
if (e === n) break;
|
|
1977
|
-
} while (e =
|
|
1990
|
+
} while (e = ri(e));
|
|
1978
1991
|
}
|
|
1979
1992
|
return null;
|
|
1980
1993
|
}
|
|
1981
|
-
var
|
|
1994
|
+
var ai = /\s+/g;
|
|
1982
1995
|
function L(e, t, n) {
|
|
1983
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
1996
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(ai, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(ai, " "));
|
|
1984
1997
|
}
|
|
1985
1998
|
function R(e, t, n) {
|
|
1986
1999
|
var r = e && e.style;
|
|
@@ -1989,7 +2002,7 @@ function R(e, t, n) {
|
|
|
1989
2002
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
1990
2003
|
}
|
|
1991
2004
|
}
|
|
1992
|
-
function
|
|
2005
|
+
function oi(e, t) {
|
|
1993
2006
|
var n = "";
|
|
1994
2007
|
if (typeof e == "string") n = e;
|
|
1995
2008
|
else do {
|
|
@@ -1999,7 +2012,7 @@ function ri(e, t) {
|
|
|
1999
2012
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2000
2013
|
return i && new i(n);
|
|
2001
2014
|
}
|
|
2002
|
-
function
|
|
2015
|
+
function si(e, t, n) {
|
|
2003
2016
|
if (e) {
|
|
2004
2017
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2005
2018
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2007,13 +2020,13 @@ function ii(e, t, n) {
|
|
|
2007
2020
|
}
|
|
2008
2021
|
return [];
|
|
2009
2022
|
}
|
|
2010
|
-
function
|
|
2023
|
+
function ci() {
|
|
2011
2024
|
return document.scrollingElement || document.documentElement;
|
|
2012
2025
|
}
|
|
2013
2026
|
function z(e, t, n, r, i) {
|
|
2014
2027
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2015
2028
|
var a, o, s, c, l, u, d;
|
|
2016
|
-
if (e !== window && e.parentNode && e !==
|
|
2029
|
+
if (e !== window && e.parentNode && e !== ci() ? (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, !Yr)) do
|
|
2017
2030
|
if (i && i.getBoundingClientRect && (R(i, "transform") !== "none" || n && R(i, "position") !== "static")) {
|
|
2018
2031
|
var f = i.getBoundingClientRect();
|
|
2019
2032
|
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;
|
|
@@ -2021,7 +2034,7 @@ function z(e, t, n, r, i) {
|
|
|
2021
2034
|
}
|
|
2022
2035
|
while (i = i.parentNode);
|
|
2023
2036
|
if (r && e !== window) {
|
|
2024
|
-
var p =
|
|
2037
|
+
var p = oi(i || e), m = p && p.a, h = p && p.d;
|
|
2025
2038
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2026
2039
|
}
|
|
2027
2040
|
return {
|
|
@@ -2034,18 +2047,18 @@ function z(e, t, n, r, i) {
|
|
|
2034
2047
|
};
|
|
2035
2048
|
}
|
|
2036
2049
|
}
|
|
2037
|
-
function
|
|
2038
|
-
for (var r =
|
|
2050
|
+
function li(e, t, n) {
|
|
2051
|
+
for (var r = mi(e, !0), i = z(e)[t]; r;) {
|
|
2039
2052
|
var a = z(r)[n], o = void 0;
|
|
2040
2053
|
if (o = i >= a, !o) return r;
|
|
2041
|
-
if (r ===
|
|
2042
|
-
r =
|
|
2054
|
+
if (r === ci()) break;
|
|
2055
|
+
r = mi(r, !1);
|
|
2043
2056
|
}
|
|
2044
2057
|
return !1;
|
|
2045
2058
|
}
|
|
2046
|
-
function
|
|
2059
|
+
function ui(e, t, n, r) {
|
|
2047
2060
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2048
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2061
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && ii(o[a], n.draggable, e, !1)) {
|
|
2049
2062
|
if (i === t) return o[a];
|
|
2050
2063
|
i++;
|
|
2051
2064
|
}
|
|
@@ -2053,84 +2066,84 @@ function si(e, t, n, r) {
|
|
|
2053
2066
|
}
|
|
2054
2067
|
return null;
|
|
2055
2068
|
}
|
|
2056
|
-
function
|
|
2057
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || R(n, "display") === "none" || t &&
|
|
2069
|
+
function di(e, t) {
|
|
2070
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || R(n, "display") === "none" || t && !ni(n, t));) n = n.previousElementSibling;
|
|
2058
2071
|
return n || null;
|
|
2059
2072
|
}
|
|
2060
2073
|
function B(e, t) {
|
|
2061
2074
|
var n = 0;
|
|
2062
2075
|
if (!e || !e.parentNode) return -1;
|
|
2063
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2076
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || ni(e, t)) && n++;
|
|
2064
2077
|
return n;
|
|
2065
2078
|
}
|
|
2066
|
-
function
|
|
2067
|
-
var t = 0, n = 0, r =
|
|
2079
|
+
function fi(e) {
|
|
2080
|
+
var t = 0, n = 0, r = ci();
|
|
2068
2081
|
if (e) do {
|
|
2069
|
-
var i =
|
|
2082
|
+
var i = oi(e), a = i.a, o = i.d;
|
|
2070
2083
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2071
2084
|
} while (e !== r && (e = e.parentNode));
|
|
2072
2085
|
return [t, n];
|
|
2073
2086
|
}
|
|
2074
|
-
function
|
|
2087
|
+
function pi(e, t) {
|
|
2075
2088
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2076
2089
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2077
2090
|
}
|
|
2078
2091
|
return -1;
|
|
2079
2092
|
}
|
|
2080
|
-
function
|
|
2081
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2093
|
+
function mi(e, t) {
|
|
2094
|
+
if (!e || !e.getBoundingClientRect) return ci();
|
|
2082
2095
|
var n = e, r = !1;
|
|
2083
2096
|
do
|
|
2084
2097
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2085
2098
|
var i = R(n);
|
|
2086
2099
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2087
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2100
|
+
if (!n.getBoundingClientRect || n === document.body) return ci();
|
|
2088
2101
|
if (r || t) return n;
|
|
2089
2102
|
r = !0;
|
|
2090
2103
|
}
|
|
2091
2104
|
}
|
|
2092
2105
|
while (n = n.parentNode);
|
|
2093
|
-
return
|
|
2106
|
+
return ci();
|
|
2094
2107
|
}
|
|
2095
|
-
function
|
|
2108
|
+
function hi(e, t) {
|
|
2096
2109
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2097
2110
|
return e;
|
|
2098
2111
|
}
|
|
2099
|
-
function
|
|
2112
|
+
function gi(e, t) {
|
|
2100
2113
|
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);
|
|
2101
2114
|
}
|
|
2102
|
-
var
|
|
2103
|
-
function
|
|
2115
|
+
var _i;
|
|
2116
|
+
function vi(e, t) {
|
|
2104
2117
|
return function() {
|
|
2105
|
-
if (!
|
|
2118
|
+
if (!_i) {
|
|
2106
2119
|
var n = arguments, r = this;
|
|
2107
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2108
|
-
|
|
2120
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), _i = setTimeout(function() {
|
|
2121
|
+
_i = void 0;
|
|
2109
2122
|
}, t);
|
|
2110
2123
|
}
|
|
2111
2124
|
};
|
|
2112
2125
|
}
|
|
2113
|
-
function
|
|
2114
|
-
clearTimeout(
|
|
2126
|
+
function yi() {
|
|
2127
|
+
clearTimeout(_i), _i = void 0;
|
|
2115
2128
|
}
|
|
2116
|
-
function
|
|
2129
|
+
function bi(e, t, n) {
|
|
2117
2130
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2118
2131
|
}
|
|
2119
|
-
function
|
|
2132
|
+
function xi(e) {
|
|
2120
2133
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2121
2134
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2122
2135
|
}
|
|
2123
|
-
function
|
|
2136
|
+
function Si(e, t, n) {
|
|
2124
2137
|
var r = {};
|
|
2125
2138
|
return Array.from(e.children).forEach(function(i) {
|
|
2126
|
-
if (!(!
|
|
2139
|
+
if (!(!ii(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
2127
2140
|
var a = z(i);
|
|
2128
2141
|
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);
|
|
2129
2142
|
}
|
|
2130
2143
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2131
2144
|
}
|
|
2132
2145
|
var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2133
|
-
function
|
|
2146
|
+
function Ci() {
|
|
2134
2147
|
var e = [], t;
|
|
2135
2148
|
return {
|
|
2136
2149
|
captureAnimationState: function() {
|
|
@@ -2140,9 +2153,9 @@ function bi() {
|
|
|
2140
2153
|
target: t,
|
|
2141
2154
|
rect: z(t)
|
|
2142
2155
|
});
|
|
2143
|
-
var n =
|
|
2156
|
+
var n = Vr({}, e[e.length - 1].rect);
|
|
2144
2157
|
if (t.thisAnimationDuration) {
|
|
2145
|
-
var r =
|
|
2158
|
+
var r = oi(t, !0);
|
|
2146
2159
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2147
2160
|
}
|
|
2148
2161
|
t.fromRect = n;
|
|
@@ -2153,7 +2166,7 @@ function bi() {
|
|
|
2153
2166
|
e.push(t);
|
|
2154
2167
|
},
|
|
2155
2168
|
removeAnimationState: function(t) {
|
|
2156
|
-
e.splice(
|
|
2169
|
+
e.splice(pi(e, { target: t }), 1);
|
|
2157
2170
|
},
|
|
2158
2171
|
animateAll: function(n) {
|
|
2159
2172
|
var r = this;
|
|
@@ -2163,8 +2176,8 @@ function bi() {
|
|
|
2163
2176
|
}
|
|
2164
2177
|
var i = !1, a = 0;
|
|
2165
2178
|
e.forEach(function(e) {
|
|
2166
|
-
var t = 0, n = e.target, o = n.fromRect, s = z(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
2167
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2179
|
+
var t = 0, n = e.target, o = n.fromRect, s = z(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = oi(n, !0);
|
|
2180
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && gi(c, s) && !gi(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ti(u, c, l, r.options)), gi(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() {
|
|
2168
2181
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2169
2182
|
}, t), n.thisAnimationDuration = t);
|
|
2170
2183
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2174,26 +2187,26 @@ function bi() {
|
|
|
2174
2187
|
animate: function(e, t, n, r) {
|
|
2175
2188
|
if (r) {
|
|
2176
2189
|
R(e, "transition", ""), R(e, "transform", "");
|
|
2177
|
-
var i =
|
|
2178
|
-
e.animatingX = !!s, e.animatingY = !!c, R(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
2190
|
+
var i = oi(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2191
|
+
e.animatingX = !!s, e.animatingY = !!c, R(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = wi(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() {
|
|
2179
2192
|
R(e, "transition", ""), R(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2180
2193
|
}, r);
|
|
2181
2194
|
}
|
|
2182
2195
|
}
|
|
2183
2196
|
};
|
|
2184
2197
|
}
|
|
2185
|
-
function
|
|
2198
|
+
function wi(e) {
|
|
2186
2199
|
return e.offsetWidth;
|
|
2187
2200
|
}
|
|
2188
|
-
function
|
|
2201
|
+
function Ti(e, t, n, r) {
|
|
2189
2202
|
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;
|
|
2190
2203
|
}
|
|
2191
|
-
var
|
|
2204
|
+
var Ei = [], Di = { initializeByDefault: !0 }, Oi = {
|
|
2192
2205
|
mount: function(e) {
|
|
2193
|
-
for (var t in
|
|
2194
|
-
|
|
2206
|
+
for (var t in Di) Di.hasOwnProperty(t) && !(t in e) && (e[t] = Di[t]);
|
|
2207
|
+
Ei.forEach(function(t) {
|
|
2195
2208
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2196
|
-
}),
|
|
2209
|
+
}), Ei.push(e);
|
|
2197
2210
|
},
|
|
2198
2211
|
pluginEvent: function(e, t, n) {
|
|
2199
2212
|
var r = this;
|
|
@@ -2201,16 +2214,16 @@ var Ci = [], wi = { initializeByDefault: !0 }, Ti = {
|
|
|
2201
2214
|
r.eventCanceled = !0;
|
|
2202
2215
|
};
|
|
2203
2216
|
var i = e + "Global";
|
|
2204
|
-
|
|
2205
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2217
|
+
Ei.forEach(function(r) {
|
|
2218
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Vr({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Vr({ sortable: t }, n)));
|
|
2206
2219
|
});
|
|
2207
2220
|
},
|
|
2208
2221
|
initializePlugins: function(e, t, n, r) {
|
|
2209
|
-
for (var i in
|
|
2222
|
+
for (var i in Ei.forEach(function(r) {
|
|
2210
2223
|
var i = r.pluginName;
|
|
2211
2224
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
2212
2225
|
var a = new r(e, t, e.options);
|
|
2213
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2226
|
+
a.sortable = e, a.options = e.options, e[i] = a, Wr(n, a.defaults);
|
|
2214
2227
|
}
|
|
2215
2228
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2216
2229
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2219,56 +2232,56 @@ var Ci = [], wi = { initializeByDefault: !0 }, Ti = {
|
|
|
2219
2232
|
},
|
|
2220
2233
|
getEventProperties: function(e, t) {
|
|
2221
2234
|
var n = {};
|
|
2222
|
-
return
|
|
2223
|
-
typeof r.eventProperties == "function" &&
|
|
2235
|
+
return Ei.forEach(function(r) {
|
|
2236
|
+
typeof r.eventProperties == "function" && Wr(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2224
2237
|
}), n;
|
|
2225
2238
|
},
|
|
2226
2239
|
modifyOption: function(e, t, n) {
|
|
2227
2240
|
var r;
|
|
2228
|
-
return
|
|
2241
|
+
return Ei.forEach(function(i) {
|
|
2229
2242
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2230
2243
|
}), r;
|
|
2231
2244
|
}
|
|
2232
2245
|
};
|
|
2233
|
-
function
|
|
2246
|
+
function ki(e) {
|
|
2234
2247
|
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;
|
|
2235
2248
|
if (t ||= n && n[V], t) {
|
|
2236
2249
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2237
|
-
window.CustomEvent && !
|
|
2250
|
+
window.CustomEvent && !Yr && !Xr ? h = new CustomEvent(r, {
|
|
2238
2251
|
bubbles: !0,
|
|
2239
2252
|
cancelable: !0
|
|
2240
2253
|
}) : (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;
|
|
2241
|
-
var v =
|
|
2254
|
+
var v = Vr(Vr({}, m), Oi.getEventProperties(r, t));
|
|
2242
2255
|
for (var y in v) h[y] = v[y];
|
|
2243
2256
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2244
2257
|
}
|
|
2245
2258
|
}
|
|
2246
|
-
var
|
|
2247
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2248
|
-
|
|
2259
|
+
var Ai = ["evt"], H = function(e, t) {
|
|
2260
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Kr(n, Ai);
|
|
2261
|
+
Oi.pluginEvent.bind(Q)(e, t, Vr({
|
|
2249
2262
|
dragEl: W,
|
|
2250
2263
|
parentEl: G,
|
|
2251
2264
|
ghostEl: K,
|
|
2252
2265
|
rootEl: q,
|
|
2253
|
-
nextEl:
|
|
2254
|
-
lastDownEl:
|
|
2266
|
+
nextEl: ji,
|
|
2267
|
+
lastDownEl: Mi,
|
|
2255
2268
|
cloneEl: J,
|
|
2256
|
-
cloneHidden:
|
|
2257
|
-
dragStarted:
|
|
2269
|
+
cloneHidden: Ni,
|
|
2270
|
+
dragStarted: qi,
|
|
2258
2271
|
putSortable: X,
|
|
2259
2272
|
activeSortable: Q.active,
|
|
2260
2273
|
originalEvent: r,
|
|
2261
|
-
oldIndex:
|
|
2262
|
-
oldDraggableIndex:
|
|
2274
|
+
oldIndex: Pi,
|
|
2275
|
+
oldDraggableIndex: Fi,
|
|
2263
2276
|
newIndex: Y,
|
|
2264
|
-
newDraggableIndex:
|
|
2265
|
-
hideGhostForTarget:
|
|
2266
|
-
unhideGhostForTarget:
|
|
2277
|
+
newDraggableIndex: Ii,
|
|
2278
|
+
hideGhostForTarget: da,
|
|
2279
|
+
unhideGhostForTarget: fa,
|
|
2267
2280
|
cloneNowHidden: function() {
|
|
2268
|
-
|
|
2281
|
+
Ni = !0;
|
|
2269
2282
|
},
|
|
2270
2283
|
cloneNowShown: function() {
|
|
2271
|
-
|
|
2284
|
+
Ni = !1;
|
|
2272
2285
|
},
|
|
2273
2286
|
dispatchSortableEvent: function(e) {
|
|
2274
2287
|
U({
|
|
@@ -2280,45 +2293,45 @@ var Di = ["evt"], H = function(e, t) {
|
|
|
2280
2293
|
}, i));
|
|
2281
2294
|
};
|
|
2282
2295
|
function U(e) {
|
|
2283
|
-
|
|
2296
|
+
ki(Vr({
|
|
2284
2297
|
putSortable: X,
|
|
2285
2298
|
cloneEl: J,
|
|
2286
2299
|
targetEl: W,
|
|
2287
2300
|
rootEl: q,
|
|
2288
|
-
oldIndex:
|
|
2289
|
-
oldDraggableIndex:
|
|
2301
|
+
oldIndex: Pi,
|
|
2302
|
+
oldDraggableIndex: Fi,
|
|
2290
2303
|
newIndex: Y,
|
|
2291
|
-
newDraggableIndex:
|
|
2304
|
+
newDraggableIndex: Ii
|
|
2292
2305
|
}, e));
|
|
2293
2306
|
}
|
|
2294
|
-
var W, G, K, q,
|
|
2295
|
-
if (
|
|
2296
|
-
if (
|
|
2307
|
+
var W, G, K, q, ji, Mi, J, Ni, Pi, Y, Fi, Ii, Li, X, Ri = !1, zi = !1, Bi = [], Vi, Hi, Ui, Wi, Gi, Ki, qi, Ji, Yi, Xi = !1, Zi = !1, Qi, Z, $i = [], ea = !1, ta = [], na = typeof document < "u", ra = $r, ia = Xr || Yr ? "cssFloat" : "float", aa = na && !ei && !$r && "draggable" in document.createElement("div"), oa = function() {
|
|
2308
|
+
if (na) {
|
|
2309
|
+
if (Yr) return !1;
|
|
2297
2310
|
var e = document.createElement("x");
|
|
2298
2311
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2299
2312
|
}
|
|
2300
|
-
}(),
|
|
2301
|
-
var n = R(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
2313
|
+
}(), sa = function(e, t) {
|
|
2314
|
+
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;
|
|
2302
2315
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2303
2316
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2304
2317
|
if (i && o.float && o.float !== "none") {
|
|
2305
2318
|
var u = o.float === "left" ? "left" : "right";
|
|
2306
2319
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2307
2320
|
}
|
|
2308
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2309
|
-
},
|
|
2321
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[ia] === "none" || a && n[ia] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2322
|
+
}, ca = function(e, t, n) {
|
|
2310
2323
|
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;
|
|
2311
2324
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2312
|
-
},
|
|
2325
|
+
}, la = function(e, t) {
|
|
2313
2326
|
var n;
|
|
2314
|
-
return
|
|
2327
|
+
return Bi.some(function(r) {
|
|
2315
2328
|
var i = r[V].options.emptyInsertThreshold;
|
|
2316
|
-
if (!(!i ||
|
|
2329
|
+
if (!(!i || di(r))) {
|
|
2317
2330
|
var a = z(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2318
2331
|
if (o && s) return n = r;
|
|
2319
2332
|
}
|
|
2320
2333
|
}), n;
|
|
2321
|
-
},
|
|
2334
|
+
}, ua = function(e) {
|
|
2322
2335
|
function t(e, n) {
|
|
2323
2336
|
return function(r, i, a, o) {
|
|
2324
2337
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2331,31 +2344,31 @@ var W, G, K, q, Oi, ki, J, Ai, ji, Y, Mi, Ni, Pi, X, Fi = !1, Ii = !1, Li = [],
|
|
|
2331
2344
|
};
|
|
2332
2345
|
}
|
|
2333
2346
|
var n = {}, r = e.group;
|
|
2334
|
-
(!r ||
|
|
2335
|
-
},
|
|
2336
|
-
!
|
|
2337
|
-
},
|
|
2338
|
-
!
|
|
2347
|
+
(!r || Hr(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;
|
|
2348
|
+
}, da = function() {
|
|
2349
|
+
!oa && K && R(K, "display", "none");
|
|
2350
|
+
}, fa = function() {
|
|
2351
|
+
!oa && K && R(K, "display", "");
|
|
2339
2352
|
};
|
|
2340
|
-
|
|
2341
|
-
if (
|
|
2353
|
+
na && !ei && document.addEventListener("click", function(e) {
|
|
2354
|
+
if (zi) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), zi = !1, !1;
|
|
2342
2355
|
}, !0);
|
|
2343
|
-
var
|
|
2356
|
+
var pa = function(e) {
|
|
2344
2357
|
if (W) {
|
|
2345
2358
|
e = e.touches ? e.touches[0] : e;
|
|
2346
|
-
var t =
|
|
2359
|
+
var t = la(e.clientX, e.clientY);
|
|
2347
2360
|
if (t) {
|
|
2348
2361
|
var n = {};
|
|
2349
2362
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2350
2363
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
|
|
2351
2364
|
}
|
|
2352
2365
|
}
|
|
2353
|
-
},
|
|
2366
|
+
}, ma = function(e) {
|
|
2354
2367
|
W && W.parentNode[V]._isOutsideThisEl(e.target);
|
|
2355
2368
|
};
|
|
2356
2369
|
function Q(e, t) {
|
|
2357
2370
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2358
|
-
this.el = e, this.options = t =
|
|
2371
|
+
this.el = e, this.options = t = Wr({}, t), e[V] = this;
|
|
2359
2372
|
var n = {
|
|
2360
2373
|
group: null,
|
|
2361
2374
|
sort: !0,
|
|
@@ -2368,7 +2381,7 @@ function Q(e, t) {
|
|
|
2368
2381
|
invertedSwapThreshold: null,
|
|
2369
2382
|
removeCloneOnHide: !0,
|
|
2370
2383
|
direction: function() {
|
|
2371
|
-
return
|
|
2384
|
+
return sa(e, this.options);
|
|
2372
2385
|
},
|
|
2373
2386
|
ghostClass: "sortable-ghost",
|
|
2374
2387
|
chosenClass: "sortable-chosen",
|
|
@@ -2395,17 +2408,17 @@ function Q(e, t) {
|
|
|
2395
2408
|
x: 0,
|
|
2396
2409
|
y: 0
|
|
2397
2410
|
},
|
|
2398
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
2411
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Qr,
|
|
2399
2412
|
emptyInsertThreshold: 5
|
|
2400
2413
|
};
|
|
2401
|
-
for (var r in
|
|
2402
|
-
for (var i in
|
|
2403
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
2414
|
+
for (var r in Oi.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
2415
|
+
for (var i in ua(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
2416
|
+
this.nativeDraggable = t.forceFallback ? !1 : aa, 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)), Bi.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Wr(this, Ci());
|
|
2404
2417
|
}
|
|
2405
2418
|
Q.prototype = {
|
|
2406
2419
|
constructor: Q,
|
|
2407
2420
|
_isOutsideThisEl: function(e) {
|
|
2408
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2421
|
+
!this.el.contains(e) && e !== this.el && (Ji = null);
|
|
2409
2422
|
},
|
|
2410
2423
|
_getDirection: function(e, t) {
|
|
2411
2424
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
|
|
@@ -2413,8 +2426,8 @@ Q.prototype = {
|
|
|
2413
2426
|
_onTapStart: function(e) {
|
|
2414
2427
|
if (e.cancelable) {
|
|
2415
2428
|
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;
|
|
2416
|
-
if (
|
|
2417
|
-
if (
|
|
2429
|
+
if (wa(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Qr && s && s.tagName.toUpperCase() === "SELECT") && (s = ii(s, r.draggable, n, !1), !(s && s.animated) && Mi !== s)) {
|
|
2430
|
+
if (Pi = B(s), Fi = B(s, r.draggable), typeof l == "function") {
|
|
2418
2431
|
if (l.call(this, e, s, this)) {
|
|
2419
2432
|
U({
|
|
2420
2433
|
sortable: t,
|
|
@@ -2427,7 +2440,7 @@ Q.prototype = {
|
|
|
2427
2440
|
return;
|
|
2428
2441
|
}
|
|
2429
2442
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2430
|
-
if (r =
|
|
2443
|
+
if (r = ii(c, r.trim(), n, !1), r) return U({
|
|
2431
2444
|
sortable: t,
|
|
2432
2445
|
rootEl: r,
|
|
2433
2446
|
name: "filter",
|
|
@@ -2439,7 +2452,7 @@ Q.prototype = {
|
|
|
2439
2452
|
i && e.cancelable && e.preventDefault();
|
|
2440
2453
|
return;
|
|
2441
2454
|
}
|
|
2442
|
-
r.handle && !
|
|
2455
|
+
r.handle && !ii(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2443
2456
|
}
|
|
2444
2457
|
}
|
|
2445
2458
|
},
|
|
@@ -2447,23 +2460,23 @@ Q.prototype = {
|
|
|
2447
2460
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2448
2461
|
if (n && !W && n.parentNode === i) {
|
|
2449
2462
|
var c = z(n);
|
|
2450
|
-
if (q = i, W = n, G = W.parentNode,
|
|
2463
|
+
if (q = i, W = n, G = W.parentNode, ji = W.nextSibling, Mi = n, Li = a.group, Q.dragged = W, Vi = {
|
|
2451
2464
|
target: W,
|
|
2452
2465
|
clientX: (t || e).clientX,
|
|
2453
2466
|
clientY: (t || e).clientY
|
|
2454
|
-
},
|
|
2467
|
+
}, Gi = Vi.clientX - c.left, Ki = Vi.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
|
|
2455
2468
|
if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
2456
2469
|
r._onDrop();
|
|
2457
2470
|
return;
|
|
2458
2471
|
}
|
|
2459
|
-
r._disableDelayedDragEvents(), !
|
|
2472
|
+
r._disableDelayedDragEvents(), !Zr && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
|
|
2460
2473
|
sortable: r,
|
|
2461
2474
|
name: "choose",
|
|
2462
2475
|
originalEvent: e
|
|
2463
2476
|
}), L(W, a.chosenClass, !0);
|
|
2464
2477
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2465
|
-
|
|
2466
|
-
}), F(o, "dragover",
|
|
2478
|
+
si(W, e.trim(), _a);
|
|
2479
|
+
}), F(o, "dragover", pa), F(o, "mousemove", pa), F(o, "touchmove", pa), F(o, "mouseup", r._onDrop), F(o, "touchend", r._onDrop), F(o, "touchcancel", r._onDrop), Zr && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Xr || Yr))) {
|
|
2467
2480
|
if (Q.eventCanceled) {
|
|
2468
2481
|
this._onDrop();
|
|
2469
2482
|
return;
|
|
@@ -2477,7 +2490,7 @@ Q.prototype = {
|
|
|
2477
2490
|
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();
|
|
2478
2491
|
},
|
|
2479
2492
|
_disableDelayedDrag: function() {
|
|
2480
|
-
W &&
|
|
2493
|
+
W && _a(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2481
2494
|
},
|
|
2482
2495
|
_disableDelayedDragEvents: function() {
|
|
2483
2496
|
var e = this.el.ownerDocument;
|
|
@@ -2486,14 +2499,14 @@ Q.prototype = {
|
|
|
2486
2499
|
_triggerDragStart: function(e, t) {
|
|
2487
2500
|
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));
|
|
2488
2501
|
try {
|
|
2489
|
-
document.selection ?
|
|
2502
|
+
document.selection ? Ta(function() {
|
|
2490
2503
|
document.selection.empty();
|
|
2491
2504
|
}) : window.getSelection().removeAllRanges();
|
|
2492
2505
|
} catch {}
|
|
2493
2506
|
},
|
|
2494
2507
|
_dragStarted: function(e, t) {
|
|
2495
|
-
if (
|
|
2496
|
-
H("dragStarted", this, { evt: t }), this.nativeDraggable && F(document, "dragover",
|
|
2508
|
+
if (Ri = !1, q && W) {
|
|
2509
|
+
H("dragStarted", this, { evt: t }), this.nativeDraggable && F(document, "dragover", ma);
|
|
2497
2510
|
var n = this.options;
|
|
2498
2511
|
!e && L(W, n.dragClass, !1), L(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
|
|
2499
2512
|
sortable: this,
|
|
@@ -2503,33 +2516,33 @@ Q.prototype = {
|
|
|
2503
2516
|
} else this._nulling();
|
|
2504
2517
|
},
|
|
2505
2518
|
_emulateDragOver: function() {
|
|
2506
|
-
if (
|
|
2507
|
-
this._lastX =
|
|
2508
|
-
for (var e = document.elementFromPoint(
|
|
2519
|
+
if (Hi) {
|
|
2520
|
+
this._lastX = Hi.clientX, this._lastY = Hi.clientY, da();
|
|
2521
|
+
for (var e = document.elementFromPoint(Hi.clientX, Hi.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Hi.clientX, Hi.clientY), e !== t);) t = e;
|
|
2509
2522
|
if (W.parentNode[V]._isOutsideThisEl(e), t) do {
|
|
2510
2523
|
if (t[V]) {
|
|
2511
2524
|
var n = void 0;
|
|
2512
2525
|
if (n = t[V]._onDragOver({
|
|
2513
|
-
clientX:
|
|
2514
|
-
clientY:
|
|
2526
|
+
clientX: Hi.clientX,
|
|
2527
|
+
clientY: Hi.clientY,
|
|
2515
2528
|
target: e,
|
|
2516
2529
|
rootEl: t
|
|
2517
2530
|
}), n && !this.options.dragoverBubble) break;
|
|
2518
2531
|
}
|
|
2519
2532
|
e = t;
|
|
2520
2533
|
} while (t = t.parentNode);
|
|
2521
|
-
|
|
2534
|
+
fa();
|
|
2522
2535
|
}
|
|
2523
2536
|
},
|
|
2524
2537
|
_onTouchMove: function(e) {
|
|
2525
|
-
if (
|
|
2526
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K &&
|
|
2527
|
-
if (!Q.active && !
|
|
2538
|
+
if (Vi) {
|
|
2539
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && oi(K, !0), o = K && a && a.a, s = K && a && a.d, c = ra && Z && fi(Z), l = (i.clientX - Vi.clientX + r.x) / (o || 1) + (c ? c[0] - $i[0] : 0) / (o || 1), u = (i.clientY - Vi.clientY + r.y) / (s || 1) + (c ? c[1] - $i[1] : 0) / (s || 1);
|
|
2540
|
+
if (!Q.active && !Ri) {
|
|
2528
2541
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2529
2542
|
this._onDragStart(e, !0);
|
|
2530
2543
|
}
|
|
2531
2544
|
if (K) {
|
|
2532
|
-
a ? (a.e += l - (
|
|
2545
|
+
a ? (a.e += l - (Ui || 0), a.f += u - (Wi || 0)) : a = {
|
|
2533
2546
|
a: 1,
|
|
2534
2547
|
b: 0,
|
|
2535
2548
|
c: 0,
|
|
@@ -2538,19 +2551,19 @@ Q.prototype = {
|
|
|
2538
2551
|
f: u
|
|
2539
2552
|
};
|
|
2540
2553
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2541
|
-
R(K, "webkitTransform", d), R(K, "mozTransform", d), R(K, "msTransform", d), R(K, "transform", d),
|
|
2554
|
+
R(K, "webkitTransform", d), R(K, "mozTransform", d), R(K, "msTransform", d), R(K, "transform", d), Ui = l, Wi = u, Hi = i;
|
|
2542
2555
|
}
|
|
2543
2556
|
e.cancelable && e.preventDefault();
|
|
2544
2557
|
}
|
|
2545
2558
|
},
|
|
2546
2559
|
_appendGhost: function() {
|
|
2547
2560
|
if (!K) {
|
|
2548
|
-
var e = this.options.fallbackOnBody ? document.body : q, t = z(W, !0,
|
|
2549
|
-
if (
|
|
2561
|
+
var e = this.options.fallbackOnBody ? document.body : q, t = z(W, !0, ra, !0, e), n = this.options;
|
|
2562
|
+
if (ra) {
|
|
2550
2563
|
for (Z = e; R(Z, "position") === "static" && R(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
2551
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
2564
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = ci()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = ci(), $i = fi(Z);
|
|
2552
2565
|
}
|
|
2553
|
-
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",
|
|
2566
|
+
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", ra ? "absolute" : "fixed"), R(K, "zIndex", "100000"), R(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), R(K, "transform-origin", Gi / parseInt(K.style.width) * 100 + "% " + Ki / parseInt(K.style.height) * 100 + "%");
|
|
2554
2567
|
}
|
|
2555
2568
|
},
|
|
2556
2569
|
_onDragStart: function(e, t) {
|
|
@@ -2559,18 +2572,18 @@ Q.prototype = {
|
|
|
2559
2572
|
this._onDrop();
|
|
2560
2573
|
return;
|
|
2561
2574
|
}
|
|
2562
|
-
H("setupClone", this), Q.eventCanceled || (J =
|
|
2575
|
+
H("setupClone", this), Q.eventCanceled || (J = xi(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), L(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = Ta(function() {
|
|
2563
2576
|
H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
|
|
2564
2577
|
sortable: n,
|
|
2565
2578
|
name: "clone"
|
|
2566
2579
|
}));
|
|
2567
|
-
}), !t && L(W, i.dragClass, !0), t ? (
|
|
2580
|
+
}), !t && L(W, i.dragClass, !0), t ? (zi = !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)")), Ri = !0, n._dragStartId = Ta(n._dragStarted.bind(n, t, e)), F(document, "selectstart", n), qi = !0, Qr && R(document.body, "user-select", "none");
|
|
2568
2581
|
},
|
|
2569
2582
|
_onDragOver: function(e) {
|
|
2570
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
2571
|
-
if (
|
|
2583
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Li === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
2584
|
+
if (ea) return;
|
|
2572
2585
|
function h(o, s) {
|
|
2573
|
-
H(o, p,
|
|
2586
|
+
H(o, p, Vr({
|
|
2574
2587
|
evt: e,
|
|
2575
2588
|
isOwner: l,
|
|
2576
2589
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2582,7 +2595,7 @@ Q.prototype = {
|
|
|
2582
2595
|
target: n,
|
|
2583
2596
|
completed: _,
|
|
2584
2597
|
onMove: function(n, i) {
|
|
2585
|
-
return
|
|
2598
|
+
return ga(q, t, W, r, n, z(n), e, i);
|
|
2586
2599
|
},
|
|
2587
2600
|
changed: v
|
|
2588
2601
|
}, s));
|
|
@@ -2593,35 +2606,35 @@ Q.prototype = {
|
|
|
2593
2606
|
function _(r) {
|
|
2594
2607
|
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() {
|
|
2595
2608
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
2596
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (
|
|
2609
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (Ji = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && pa(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
2597
2610
|
}
|
|
2598
2611
|
function v() {
|
|
2599
|
-
Y = B(W),
|
|
2612
|
+
Y = B(W), Ii = B(W, o.draggable), U({
|
|
2600
2613
|
sortable: p,
|
|
2601
2614
|
name: "change",
|
|
2602
2615
|
toEl: t,
|
|
2603
2616
|
newIndex: Y,
|
|
2604
|
-
newDraggableIndex:
|
|
2617
|
+
newDraggableIndex: Ii,
|
|
2605
2618
|
originalEvent: e
|
|
2606
2619
|
});
|
|
2607
2620
|
}
|
|
2608
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
2621
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = ii(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
2609
2622
|
if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
2610
|
-
if (
|
|
2623
|
+
if (zi = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = Li.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
|
|
2611
2624
|
if (f = this._getDirection(e, n) === "vertical", r = z(W), h("dragOverValid"), Q.eventCanceled) return m;
|
|
2612
|
-
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
2613
|
-
var y =
|
|
2614
|
-
if (!y ||
|
|
2625
|
+
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (ji ? q.insertBefore(W, ji) : q.appendChild(W)), _(!0);
|
|
2626
|
+
var y = di(t, o.draggable);
|
|
2627
|
+
if (!y || ba(e, f, this) && !y.animated) {
|
|
2615
2628
|
if (y === W) return _(!1);
|
|
2616
|
-
if (y && t === e.target && (n = y), n && (i = z(n)),
|
|
2617
|
-
} else if (y &&
|
|
2618
|
-
var b =
|
|
2629
|
+
if (y && t === e.target && (n = y), n && (i = z(n)), ga(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);
|
|
2630
|
+
} else if (y && ya(e, f, this)) {
|
|
2631
|
+
var b = ui(t, 0, o, !0);
|
|
2619
2632
|
if (b === W) return _(!1);
|
|
2620
|
-
if (n = b, i = z(n),
|
|
2633
|
+
if (n = b, i = z(n), ga(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
|
|
2621
2634
|
} else if (n.parentNode === t) {
|
|
2622
2635
|
i = z(n);
|
|
2623
|
-
var x = 0, S, C = W.parentNode !== t, w = !
|
|
2624
|
-
|
|
2636
|
+
var x = 0, S, C = W.parentNode !== t, w = !ca(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = li(n, "top", "top") || li(W, "top", "top"), ee = E ? E.scrollTop : void 0;
|
|
2637
|
+
Ji !== n && (S = i[T], Xi = !1, Zi = !w && o.invertSwap || C), x = xa(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Zi, Ji === n);
|
|
2625
2638
|
var D;
|
|
2626
2639
|
if (x !== 0) {
|
|
2627
2640
|
var O = B(W);
|
|
@@ -2630,11 +2643,11 @@ Q.prototype = {
|
|
|
2630
2643
|
while (D && (R(D, "display") === "none" || D === K));
|
|
2631
2644
|
}
|
|
2632
2645
|
if (x === 0 || D === n) return _(!1);
|
|
2633
|
-
|
|
2646
|
+
Ji = n, Yi = x;
|
|
2634
2647
|
var k = n.nextElementSibling, te = !1;
|
|
2635
2648
|
te = x === 1;
|
|
2636
|
-
var A =
|
|
2637
|
-
if (A !== !1) return (A === 1 || A === -1) && (te = A === 1),
|
|
2649
|
+
var A = ga(q, t, W, r, n, i, e, te);
|
|
2650
|
+
if (A !== !1) return (A === 1 || A === -1) && (te = A === 1), ea = !0, setTimeout(va, 30), g(), te && !k ? t.appendChild(W) : n.parentNode.insertBefore(W, te ? k : n), E && bi(E, 0, ee - E.scrollTop), G = W.parentNode, S !== void 0 && !Zi && (Qi = Math.abs(S - z(n)[T])), v(), _(!0);
|
|
2638
2651
|
}
|
|
2639
2652
|
if (t.contains(W)) return _(!1);
|
|
2640
2653
|
}
|
|
@@ -2642,7 +2655,7 @@ Q.prototype = {
|
|
|
2642
2655
|
},
|
|
2643
2656
|
_ignoreWhileAnimating: null,
|
|
2644
2657
|
_offMoveEvents: function() {
|
|
2645
|
-
I(document, "mousemove", this._onTouchMove), I(document, "touchmove", this._onTouchMove), I(document, "pointermove", this._onTouchMove), I(document, "dragover",
|
|
2658
|
+
I(document, "mousemove", this._onTouchMove), I(document, "touchmove", this._onTouchMove), I(document, "pointermove", this._onTouchMove), I(document, "dragover", pa), I(document, "mousemove", pa), I(document, "touchmove", pa);
|
|
2646
2659
|
},
|
|
2647
2660
|
_offUpEvents: function() {
|
|
2648
2661
|
var e = this.el.ownerDocument;
|
|
@@ -2650,18 +2663,18 @@ Q.prototype = {
|
|
|
2650
2663
|
},
|
|
2651
2664
|
_onDrop: function(e) {
|
|
2652
2665
|
var t = this.el, n = this.options;
|
|
2653
|
-
if (Y = B(W),
|
|
2666
|
+
if (Y = B(W), Ii = B(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = B(W), Ii = B(W, n.draggable), Q.eventCanceled) {
|
|
2654
2667
|
this._nulling();
|
|
2655
2668
|
return;
|
|
2656
2669
|
}
|
|
2657
|
-
|
|
2670
|
+
Ri = !1, Zi = !1, Xi = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ea(this.cloneId), Ea(this._dragStartId), this.nativeDraggable && (I(document, "drop", this), I(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Qr && R(document.body, "user-select", ""), R(W, "transform", ""), e && (qi && (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), _a(W), W.style["will-change"] = "", qi && !Ri && L(W, X ? X.options.ghostClass : this.options.ghostClass, !1), L(W, this.options.chosenClass, !1), U({
|
|
2658
2671
|
sortable: this,
|
|
2659
2672
|
name: "unchoose",
|
|
2660
2673
|
toEl: G,
|
|
2661
2674
|
newIndex: null,
|
|
2662
2675
|
newDraggableIndex: null,
|
|
2663
2676
|
originalEvent: e
|
|
2664
|
-
}), q === G ? Y !==
|
|
2677
|
+
}), q === G ? Y !== Pi && Y >= 0 && (U({
|
|
2665
2678
|
sortable: this,
|
|
2666
2679
|
name: "update",
|
|
2667
2680
|
toEl: G,
|
|
@@ -2693,7 +2706,7 @@ Q.prototype = {
|
|
|
2693
2706
|
name: "sort",
|
|
2694
2707
|
toEl: G,
|
|
2695
2708
|
originalEvent: e
|
|
2696
|
-
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y =
|
|
2709
|
+
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = Pi, Ii = Fi), U({
|
|
2697
2710
|
sortable: this,
|
|
2698
2711
|
name: "end",
|
|
2699
2712
|
toEl: G,
|
|
@@ -2701,9 +2714,9 @@ Q.prototype = {
|
|
|
2701
2714
|
}), this.save()))), this._nulling();
|
|
2702
2715
|
},
|
|
2703
2716
|
_nulling: function() {
|
|
2704
|
-
H("nulling", this), q = W = G = K =
|
|
2717
|
+
H("nulling", this), q = W = G = K = ji = J = Mi = Ni = Vi = Hi = qi = Y = Ii = Pi = Fi = Ji = Yi = X = Li = Q.dragged = Q.ghost = Q.clone = Q.active = null, ta.forEach(function(e) {
|
|
2705
2718
|
e.checked = !0;
|
|
2706
|
-
}),
|
|
2719
|
+
}), ta.length = Ui = Wi = 0;
|
|
2707
2720
|
},
|
|
2708
2721
|
handleEvent: function(e) {
|
|
2709
2722
|
switch (e.type) {
|
|
@@ -2713,7 +2726,7 @@ Q.prototype = {
|
|
|
2713
2726
|
break;
|
|
2714
2727
|
case "dragenter":
|
|
2715
2728
|
case "dragover":
|
|
2716
|
-
W && (this._onDragOver(e),
|
|
2729
|
+
W && (this._onDragOver(e), ha(e));
|
|
2717
2730
|
break;
|
|
2718
2731
|
case "selectstart":
|
|
2719
2732
|
e.preventDefault();
|
|
@@ -2721,14 +2734,14 @@ Q.prototype = {
|
|
|
2721
2734
|
}
|
|
2722
2735
|
},
|
|
2723
2736
|
toArray: function() {
|
|
2724
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
2737
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], ii(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Ca(t));
|
|
2725
2738
|
return e;
|
|
2726
2739
|
},
|
|
2727
2740
|
sort: function(e, t) {
|
|
2728
2741
|
var n = {}, r = this.el;
|
|
2729
2742
|
this.toArray().forEach(function(e, t) {
|
|
2730
2743
|
var i = r.children[t];
|
|
2731
|
-
|
|
2744
|
+
ii(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
2732
2745
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
2733
2746
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
2734
2747
|
}), t && this.animateAll();
|
|
@@ -2738,25 +2751,25 @@ Q.prototype = {
|
|
|
2738
2751
|
e && e.set && e.set(this);
|
|
2739
2752
|
},
|
|
2740
2753
|
closest: function(e, t) {
|
|
2741
|
-
return
|
|
2754
|
+
return ii(e, t || this.options.draggable, this.el, !1);
|
|
2742
2755
|
},
|
|
2743
2756
|
option: function(e, t) {
|
|
2744
2757
|
var n = this.options;
|
|
2745
2758
|
if (t === void 0) return n[e];
|
|
2746
|
-
var r =
|
|
2747
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
2759
|
+
var r = Oi.modifyOption(this, e, t);
|
|
2760
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && ua(n);
|
|
2748
2761
|
},
|
|
2749
2762
|
destroy: function() {
|
|
2750
2763
|
H("destroy", this);
|
|
2751
2764
|
var e = this.el;
|
|
2752
2765
|
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) {
|
|
2753
2766
|
e.removeAttribute("draggable");
|
|
2754
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
2767
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), Bi.splice(Bi.indexOf(this.el), 1), this.el = e = null;
|
|
2755
2768
|
},
|
|
2756
2769
|
_hideClone: function() {
|
|
2757
|
-
if (!
|
|
2770
|
+
if (!Ni) {
|
|
2758
2771
|
if (H("hideClone", this), Q.eventCanceled) return;
|
|
2759
|
-
R(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J),
|
|
2772
|
+
R(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), Ni = !0;
|
|
2760
2773
|
}
|
|
2761
2774
|
},
|
|
2762
2775
|
_showClone: function(e) {
|
|
@@ -2764,99 +2777,99 @@ Q.prototype = {
|
|
|
2764
2777
|
this._hideClone();
|
|
2765
2778
|
return;
|
|
2766
2779
|
}
|
|
2767
|
-
if (
|
|
2780
|
+
if (Ni) {
|
|
2768
2781
|
if (H("showClone", this), Q.eventCanceled) return;
|
|
2769
|
-
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) :
|
|
2782
|
+
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : ji ? q.insertBefore(J, ji) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), R(J, "display", ""), Ni = !1;
|
|
2770
2783
|
}
|
|
2771
2784
|
}
|
|
2772
2785
|
};
|
|
2773
|
-
function
|
|
2786
|
+
function ha(e) {
|
|
2774
2787
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
2775
2788
|
}
|
|
2776
|
-
function
|
|
2789
|
+
function ga(e, t, n, r, i, a, o, s) {
|
|
2777
2790
|
var c, l = e[V], u = l.options.onMove, d;
|
|
2778
|
-
return window.CustomEvent && !
|
|
2791
|
+
return window.CustomEvent && !Yr && !Xr ? c = new CustomEvent("move", {
|
|
2779
2792
|
bubbles: !0,
|
|
2780
2793
|
cancelable: !0
|
|
2781
2794
|
}) : (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;
|
|
2782
2795
|
}
|
|
2783
|
-
function
|
|
2796
|
+
function _a(e) {
|
|
2784
2797
|
e.draggable = !1;
|
|
2785
2798
|
}
|
|
2786
|
-
function
|
|
2787
|
-
|
|
2799
|
+
function va() {
|
|
2800
|
+
ea = !1;
|
|
2788
2801
|
}
|
|
2789
|
-
function
|
|
2790
|
-
var r = z(
|
|
2802
|
+
function ya(e, t, n) {
|
|
2803
|
+
var r = z(ui(n.el, 0, n.options, !0)), i = Si(n.el, n.options, K), a = 10;
|
|
2791
2804
|
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;
|
|
2792
2805
|
}
|
|
2793
|
-
function
|
|
2794
|
-
var r = z(
|
|
2806
|
+
function ba(e, t, n) {
|
|
2807
|
+
var r = z(di(n.el, n.options.draggable)), i = Si(n.el, n.options, K), a = 10;
|
|
2795
2808
|
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;
|
|
2796
2809
|
}
|
|
2797
|
-
function
|
|
2810
|
+
function xa(e, t, n, r, i, a, o, s) {
|
|
2798
2811
|
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;
|
|
2799
2812
|
if (!o) {
|
|
2800
|
-
if (s &&
|
|
2801
|
-
if (!
|
|
2802
|
-
else if (
|
|
2803
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
2813
|
+
if (s && Qi < l * i) {
|
|
2814
|
+
if (!Xi && (Yi === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Xi = !0), Xi) f = !0;
|
|
2815
|
+
else if (Yi === 1 ? c < u + Qi : c > d - Qi) return -Yi;
|
|
2816
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Sa(t);
|
|
2804
2817
|
}
|
|
2805
2818
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
2806
2819
|
}
|
|
2807
|
-
function
|
|
2820
|
+
function Sa(e) {
|
|
2808
2821
|
return B(W) < B(e) ? 1 : -1;
|
|
2809
2822
|
}
|
|
2810
|
-
function
|
|
2823
|
+
function Ca(e) {
|
|
2811
2824
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
2812
2825
|
return r.toString(36);
|
|
2813
2826
|
}
|
|
2814
|
-
function
|
|
2815
|
-
|
|
2827
|
+
function wa(e) {
|
|
2828
|
+
ta.length = 0;
|
|
2816
2829
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
2817
2830
|
var r = t[n];
|
|
2818
|
-
r.checked &&
|
|
2831
|
+
r.checked && ta.push(r);
|
|
2819
2832
|
}
|
|
2820
2833
|
}
|
|
2821
|
-
function
|
|
2834
|
+
function Ta(e) {
|
|
2822
2835
|
return setTimeout(e, 0);
|
|
2823
2836
|
}
|
|
2824
|
-
function
|
|
2837
|
+
function Ea(e) {
|
|
2825
2838
|
return clearTimeout(e);
|
|
2826
2839
|
}
|
|
2827
|
-
|
|
2828
|
-
(Q.active ||
|
|
2840
|
+
na && F(document, "touchmove", function(e) {
|
|
2841
|
+
(Q.active || Ri) && e.cancelable && e.preventDefault();
|
|
2829
2842
|
}), Q.utils = {
|
|
2830
2843
|
on: F,
|
|
2831
2844
|
off: I,
|
|
2832
2845
|
css: R,
|
|
2833
|
-
find:
|
|
2846
|
+
find: si,
|
|
2834
2847
|
is: function(e, t) {
|
|
2835
|
-
return !!
|
|
2848
|
+
return !!ii(e, t, e, !1);
|
|
2836
2849
|
},
|
|
2837
|
-
extend:
|
|
2838
|
-
throttle:
|
|
2839
|
-
closest:
|
|
2850
|
+
extend: hi,
|
|
2851
|
+
throttle: vi,
|
|
2852
|
+
closest: ii,
|
|
2840
2853
|
toggleClass: L,
|
|
2841
|
-
clone:
|
|
2854
|
+
clone: xi,
|
|
2842
2855
|
index: B,
|
|
2843
|
-
nextTick:
|
|
2844
|
-
cancelNextTick:
|
|
2845
|
-
detectDirection:
|
|
2846
|
-
getChild:
|
|
2856
|
+
nextTick: Ta,
|
|
2857
|
+
cancelNextTick: Ea,
|
|
2858
|
+
detectDirection: sa,
|
|
2859
|
+
getChild: ui
|
|
2847
2860
|
}, Q.get = function(e) {
|
|
2848
2861
|
return e[V];
|
|
2849
2862
|
}, Q.mount = function() {
|
|
2850
2863
|
var e = [...arguments];
|
|
2851
2864
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
2852
2865
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
2853
|
-
e.utils && (Q.utils =
|
|
2866
|
+
e.utils && (Q.utils = Vr(Vr({}, Q.utils), e.utils)), Oi.mount(e);
|
|
2854
2867
|
});
|
|
2855
2868
|
}, Q.create = function(e, t) {
|
|
2856
2869
|
return new Q(e, t);
|
|
2857
|
-
}, Q.version =
|
|
2858
|
-
var $ = [],
|
|
2859
|
-
function
|
|
2870
|
+
}, Q.version = qr;
|
|
2871
|
+
var $ = [], Da, Oa, ka = !1, Aa, ja, Ma, Na;
|
|
2872
|
+
function Pa() {
|
|
2860
2873
|
function e() {
|
|
2861
2874
|
for (var e in this.defaults = {
|
|
2862
2875
|
scroll: !0,
|
|
@@ -2876,63 +2889,63 @@ function ja() {
|
|
|
2876
2889
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
2877
2890
|
},
|
|
2878
2891
|
drop: function() {
|
|
2879
|
-
this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : (I(document, "pointermove", this._handleFallbackAutoScroll), I(document, "touchmove", this._handleFallbackAutoScroll), I(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
2892
|
+
this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : (I(document, "pointermove", this._handleFallbackAutoScroll), I(document, "touchmove", this._handleFallbackAutoScroll), I(document, "mousemove", this._handleFallbackAutoScroll)), Ia(), Fa(), yi();
|
|
2880
2893
|
},
|
|
2881
2894
|
nulling: function() {
|
|
2882
|
-
|
|
2895
|
+
Ma = Oa = Da = ka = Na = Aa = ja = null, $.length = 0;
|
|
2883
2896
|
},
|
|
2884
2897
|
_handleFallbackAutoScroll: function(e) {
|
|
2885
2898
|
this._handleAutoScroll(e, !0);
|
|
2886
2899
|
},
|
|
2887
2900
|
_handleAutoScroll: function(e, t) {
|
|
2888
2901
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
2889
|
-
if (
|
|
2890
|
-
|
|
2891
|
-
var o =
|
|
2892
|
-
|
|
2893
|
-
var a =
|
|
2894
|
-
a !== o && (o = a,
|
|
2895
|
-
}, 10),
|
|
2902
|
+
if (Ma = e, t || this.options.forceAutoScrollFallback || Xr || Yr || Qr) {
|
|
2903
|
+
La(e, this.options, a, t);
|
|
2904
|
+
var o = mi(a, !0);
|
|
2905
|
+
ka && (!Na || r !== Aa || i !== ja) && (Na && Ia(), Na = setInterval(function() {
|
|
2906
|
+
var a = mi(document.elementFromPoint(r, i), !0);
|
|
2907
|
+
a !== o && (o = a, Fa()), La(e, n.options, a, t);
|
|
2908
|
+
}, 10), Aa = r, ja = i);
|
|
2896
2909
|
} else {
|
|
2897
|
-
if (!this.options.bubbleScroll ||
|
|
2898
|
-
|
|
2910
|
+
if (!this.options.bubbleScroll || mi(a, !0) === ci()) {
|
|
2911
|
+
Fa();
|
|
2899
2912
|
return;
|
|
2900
2913
|
}
|
|
2901
|
-
|
|
2914
|
+
La(e, this.options, mi(a, !1), !1);
|
|
2902
2915
|
}
|
|
2903
2916
|
}
|
|
2904
|
-
},
|
|
2917
|
+
}, Wr(e, {
|
|
2905
2918
|
pluginName: "scroll",
|
|
2906
2919
|
initializeByDefault: !0
|
|
2907
2920
|
});
|
|
2908
2921
|
}
|
|
2909
|
-
function
|
|
2922
|
+
function Fa() {
|
|
2910
2923
|
$.forEach(function(e) {
|
|
2911
2924
|
clearInterval(e.pid);
|
|
2912
2925
|
}), $ = [];
|
|
2913
2926
|
}
|
|
2914
|
-
function
|
|
2915
|
-
clearInterval(
|
|
2927
|
+
function Ia() {
|
|
2928
|
+
clearInterval(Na);
|
|
2916
2929
|
}
|
|
2917
|
-
var
|
|
2930
|
+
var La = vi(function(e, t, n, r) {
|
|
2918
2931
|
if (t.scroll) {
|
|
2919
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
2920
|
-
|
|
2921
|
-
var d = 0, f =
|
|
2932
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = ci(), l = !1, u;
|
|
2933
|
+
Oa !== n && (Oa = n, Fa(), Da = t.scroll, u = t.scrollFn, Da === !0 && (Da = mi(n, !0)));
|
|
2934
|
+
var d = 0, f = Da;
|
|
2922
2935
|
do {
|
|
2923
2936
|
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;
|
|
2924
2937
|
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"));
|
|
2925
2938
|
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);
|
|
2926
2939
|
if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
|
|
2927
2940
|
($[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() {
|
|
2928
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
2941
|
+
r && this.layer === 0 && Q.active._onTouchMove(Ma);
|
|
2929
2942
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
2930
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e,
|
|
2943
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, Ma, $[this.layer].el) !== "continue" || bi($[this.layer].el, n, t);
|
|
2931
2944
|
}.bind({ layer: d }), 24))), d++;
|
|
2932
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
2933
|
-
|
|
2945
|
+
} while (t.bubbleScroll && f !== c && (f = mi(f, !1)));
|
|
2946
|
+
ka = l;
|
|
2934
2947
|
}
|
|
2935
|
-
}, 30),
|
|
2948
|
+
}, 30), Ra = function(e) {
|
|
2936
2949
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
2937
2950
|
if (t) {
|
|
2938
2951
|
var c = n || i;
|
|
@@ -2944,8 +2957,8 @@ var Pa = hi(function(e, t, n, r) {
|
|
|
2944
2957
|
}));
|
|
2945
2958
|
}
|
|
2946
2959
|
};
|
|
2947
|
-
function
|
|
2948
|
-
|
|
2960
|
+
function za() {}
|
|
2961
|
+
za.prototype = {
|
|
2949
2962
|
startIndex: null,
|
|
2950
2963
|
dragStart: function(e) {
|
|
2951
2964
|
var t = e.oldDraggableIndex;
|
|
@@ -2954,72 +2967,72 @@ Ia.prototype = {
|
|
|
2954
2967
|
onSpill: function(e) {
|
|
2955
2968
|
var t = e.dragEl, n = e.putSortable;
|
|
2956
2969
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
2957
|
-
var r =
|
|
2970
|
+
var r = ui(this.sortable.el, this.startIndex, this.options);
|
|
2958
2971
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
2959
2972
|
},
|
|
2960
|
-
drop:
|
|
2961
|
-
},
|
|
2962
|
-
function
|
|
2963
|
-
|
|
2973
|
+
drop: Ra
|
|
2974
|
+
}, Wr(za, { pluginName: "revertOnSpill" });
|
|
2975
|
+
function Ba() {}
|
|
2976
|
+
Ba.prototype = {
|
|
2964
2977
|
onSpill: function(e) {
|
|
2965
2978
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
2966
2979
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
2967
2980
|
},
|
|
2968
|
-
drop:
|
|
2969
|
-
},
|
|
2970
|
-
function
|
|
2981
|
+
drop: Ra
|
|
2982
|
+
}, Wr(Ba, { pluginName: "removeOnSpill" }), Q.mount(new Pa()), Q.mount(Ba, za);
|
|
2983
|
+
function Va(e) {
|
|
2971
2984
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
2972
2985
|
}
|
|
2973
|
-
function
|
|
2986
|
+
function Ha(e) {
|
|
2974
2987
|
oe() && ee(e);
|
|
2975
2988
|
}
|
|
2976
|
-
function
|
|
2989
|
+
function Ua(e) {
|
|
2977
2990
|
oe() ? u(e) : r(e);
|
|
2978
2991
|
}
|
|
2979
|
-
var
|
|
2980
|
-
function
|
|
2981
|
-
|
|
2992
|
+
var Wa = null, Ga = null;
|
|
2993
|
+
function Ka(e = null, t = null) {
|
|
2994
|
+
Wa = e, Ga = t;
|
|
2982
2995
|
}
|
|
2983
|
-
function
|
|
2996
|
+
function qa() {
|
|
2984
2997
|
return {
|
|
2985
|
-
data:
|
|
2986
|
-
clonedData:
|
|
2998
|
+
data: Wa,
|
|
2999
|
+
clonedData: Ga
|
|
2987
3000
|
};
|
|
2988
3001
|
}
|
|
2989
|
-
var
|
|
2990
|
-
function
|
|
3002
|
+
var Ja = Symbol("cloneElement");
|
|
3003
|
+
function Ya(...e) {
|
|
2991
3004
|
let t = oe()?.proxy, n = null, i = e[0], [, o, c] = e;
|
|
2992
3005
|
Array.isArray(j(o)) || (c = o, o = null);
|
|
2993
|
-
let l = null, { immediate: u = !0, clone: d =
|
|
3006
|
+
let l = null, { immediate: u = !0, clone: d = Va, forceFallback: f, fallbackOnBody: p, customUpdate: m } = j(c) ?? {};
|
|
2994
3007
|
function h(e) {
|
|
2995
3008
|
let { from: t, oldIndex: r, item: i } = e, a = Array.from(t.childNodes);
|
|
2996
3009
|
n = f && !p ? a.slice(0, -1) : a;
|
|
2997
3010
|
let s = j(j(o)?.[r]), c = d(s);
|
|
2998
|
-
|
|
3011
|
+
Ka(s, c), i[Ja] = c;
|
|
2999
3012
|
}
|
|
3000
3013
|
function g(e) {
|
|
3001
|
-
let t = e.item[
|
|
3002
|
-
if (!
|
|
3003
|
-
if (
|
|
3014
|
+
let t = e.item[Ja];
|
|
3015
|
+
if (!kr(t)) {
|
|
3016
|
+
if (Mr(e.item), a(o)) {
|
|
3004
3017
|
let n = [...j(o)];
|
|
3005
|
-
o.value =
|
|
3018
|
+
o.value = Or(n, e.newDraggableIndex, t);
|
|
3006
3019
|
return;
|
|
3007
3020
|
}
|
|
3008
|
-
|
|
3021
|
+
Or(j(o), e.newDraggableIndex, t);
|
|
3009
3022
|
}
|
|
3010
3023
|
}
|
|
3011
3024
|
function _(e) {
|
|
3012
3025
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, pullMode: s, clone: c } = e;
|
|
3013
|
-
if (
|
|
3014
|
-
|
|
3026
|
+
if (jr(t, n, r), s === "clone") {
|
|
3027
|
+
Mr(c);
|
|
3015
3028
|
return;
|
|
3016
3029
|
}
|
|
3017
3030
|
if (a(o)) {
|
|
3018
3031
|
let e = [...j(o)];
|
|
3019
|
-
o.value =
|
|
3032
|
+
o.value = Dr(e, i);
|
|
3020
3033
|
return;
|
|
3021
3034
|
}
|
|
3022
|
-
|
|
3035
|
+
Dr(j(o), i);
|
|
3023
3036
|
}
|
|
3024
3037
|
function v(e) {
|
|
3025
3038
|
if (m) {
|
|
@@ -3027,12 +3040,12 @@ function Ka(...e) {
|
|
|
3027
3040
|
return;
|
|
3028
3041
|
}
|
|
3029
3042
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, newDraggableIndex: s } = e;
|
|
3030
|
-
if (
|
|
3043
|
+
if (Mr(n), jr(t, n, r), a(o)) {
|
|
3031
3044
|
let e = [...j(o)];
|
|
3032
|
-
o.value =
|
|
3045
|
+
o.value = wr(e, i, s);
|
|
3033
3046
|
return;
|
|
3034
3047
|
}
|
|
3035
|
-
|
|
3048
|
+
wr(j(o), i, s);
|
|
3036
3049
|
}
|
|
3037
3050
|
function y(e) {
|
|
3038
3051
|
let { newIndex: t, oldIndex: i, from: a, to: o } = e, s = null, c = t === i && a === o;
|
|
@@ -3051,7 +3064,7 @@ function Ka(...e) {
|
|
|
3051
3064
|
n = null;
|
|
3052
3065
|
}
|
|
3053
3066
|
r(() => {
|
|
3054
|
-
if (
|
|
3067
|
+
if (Ka(), s) throw s;
|
|
3055
3068
|
});
|
|
3056
3069
|
}
|
|
3057
3070
|
let b = {
|
|
@@ -3063,19 +3076,19 @@ function Ka(...e) {
|
|
|
3063
3076
|
};
|
|
3064
3077
|
function x(e) {
|
|
3065
3078
|
let n = j(i);
|
|
3066
|
-
return e ||=
|
|
3079
|
+
return e ||= Ar(n) ? Nr(n, t?.$el) : n, e && !Ir(e) && (e = e.$el), e || Cr("Root element not found"), e;
|
|
3067
3080
|
}
|
|
3068
3081
|
function S() {
|
|
3069
|
-
let e = j(c) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3070
|
-
return
|
|
3071
|
-
|
|
3072
|
-
}),
|
|
3082
|
+
let e = j(c) ?? {}, { immediate: t, clone: n } = e, r = br(e, ["immediate", "clone"]);
|
|
3083
|
+
return Lr(r, (e, t) => {
|
|
3084
|
+
Rr(e) && (r[e] = (e, ...n) => (zr(e, qa()), t(e, ...n)));
|
|
3085
|
+
}), Fr(o === null ? {} : b, r);
|
|
3073
3086
|
}
|
|
3074
3087
|
let C = (e) => {
|
|
3075
3088
|
e = x(e), l && w.destroy(), l = new Q(e, S());
|
|
3076
3089
|
};
|
|
3077
3090
|
s(() => c, () => {
|
|
3078
|
-
l &&
|
|
3091
|
+
l && Lr(S(), (e, t) => {
|
|
3079
3092
|
l?.option(e, t);
|
|
3080
3093
|
});
|
|
3081
3094
|
}, { deep: !0 });
|
|
@@ -3088,15 +3101,15 @@ function Ka(...e) {
|
|
|
3088
3101
|
toArray: () => l?.toArray(),
|
|
3089
3102
|
closest: (...e) => l?.closest(...e)
|
|
3090
3103
|
};
|
|
3091
|
-
return
|
|
3104
|
+
return Ua(() => {
|
|
3092
3105
|
u && C();
|
|
3093
|
-
}),
|
|
3106
|
+
}), Ha(w.destroy), yr({
|
|
3094
3107
|
start: C,
|
|
3095
3108
|
pause: () => w?.option("disabled", !0),
|
|
3096
3109
|
resume: () => w?.option("disabled", !1)
|
|
3097
3110
|
}, w);
|
|
3098
3111
|
}
|
|
3099
|
-
var
|
|
3112
|
+
var Xa = [
|
|
3100
3113
|
"update",
|
|
3101
3114
|
"start",
|
|
3102
3115
|
"add",
|
|
@@ -3109,7 +3122,7 @@ var qa = [
|
|
|
3109
3122
|
"clone",
|
|
3110
3123
|
"move",
|
|
3111
3124
|
"change"
|
|
3112
|
-
],
|
|
3125
|
+
], Za = y({
|
|
3113
3126
|
name: "VueDraggable",
|
|
3114
3127
|
model: {
|
|
3115
3128
|
prop: "modelValue",
|
|
@@ -3159,37 +3172,37 @@ var qa = [
|
|
|
3159
3172
|
"tag",
|
|
3160
3173
|
"target",
|
|
3161
3174
|
"customUpdate",
|
|
3162
|
-
...
|
|
3175
|
+
...Xa.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3163
3176
|
],
|
|
3164
|
-
emits: ["update:modelValue", ...
|
|
3177
|
+
emits: ["update:modelValue", ...Xa],
|
|
3165
3178
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3166
|
-
let a =
|
|
3179
|
+
let a = Xa.reduce((e, t) => {
|
|
3167
3180
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3168
3181
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3169
3182
|
}, {}), s = x(() => {
|
|
3170
|
-
let t = S(e), { modelValue: n } = t, r =
|
|
3183
|
+
let t = S(e), { modelValue: n } = t, r = br(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3171
3184
|
let r = j(n);
|
|
3172
3185
|
return r !== void 0 && (e[t] = r), e;
|
|
3173
3186
|
}, {});
|
|
3174
|
-
return
|
|
3187
|
+
return yr(yr({}, a), Er(yr(yr({}, i), o)));
|
|
3175
3188
|
}), c = x({
|
|
3176
3189
|
get: () => e.modelValue,
|
|
3177
3190
|
set: (e) => n("update:modelValue", e)
|
|
3178
|
-
}), l = h(), u = o(
|
|
3191
|
+
}), l = h(), u = o(Ya(e.target || l, c, s));
|
|
3179
3192
|
return r(u), () => f(e.tag || "div", { ref: l }, (t?.default)?.call(t, u));
|
|
3180
3193
|
}
|
|
3181
|
-
}),
|
|
3194
|
+
}), Qa = {
|
|
3182
3195
|
mounted: "mounted",
|
|
3183
3196
|
unmounted: "unmounted"
|
|
3184
3197
|
};
|
|
3185
|
-
|
|
3198
|
+
Qa.mounted, Qa.unmounted;
|
|
3186
3199
|
//#endregion
|
|
3187
3200
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3188
|
-
var
|
|
3201
|
+
var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
3189
3202
|
key: 0,
|
|
3190
3203
|
"data-testid": "section-drop-hint",
|
|
3191
3204
|
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)]"
|
|
3192
|
-
},
|
|
3205
|
+
}, no = /* @__PURE__ */ y({
|
|
3193
3206
|
__name: "SectionBlock",
|
|
3194
3207
|
props: {
|
|
3195
3208
|
block: {},
|
|
@@ -3197,13 +3210,13 @@ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
|
3197
3210
|
},
|
|
3198
3211
|
setup(n) {
|
|
3199
3212
|
let r = {
|
|
3200
|
-
title:
|
|
3201
|
-
paragraph:
|
|
3202
|
-
image:
|
|
3203
|
-
button:
|
|
3204
|
-
divider:
|
|
3205
|
-
custom:
|
|
3206
|
-
}, a = n, { t: o } =
|
|
3213
|
+
title: pr,
|
|
3214
|
+
paragraph: Xn,
|
|
3215
|
+
image: Un,
|
|
3216
|
+
button: Ht,
|
|
3217
|
+
divider: Dn,
|
|
3218
|
+
custom: Tn
|
|
3219
|
+
}, a = n, { t: o } = lt(), s = ze($e, "SectionBlock"), l = ae(Je, null), u = ae(rt, null), d = x(() => {
|
|
3207
3220
|
switch (a.block.columns) {
|
|
3208
3221
|
case "2": return ["50%", "50%"];
|
|
3209
3222
|
case "3": return [
|
|
@@ -3229,7 +3242,7 @@ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
|
3229
3242
|
n[e] = t, s.updateBlock(a.block.id, { children: n });
|
|
3230
3243
|
}
|
|
3231
3244
|
function h(e) {
|
|
3232
|
-
return
|
|
3245
|
+
return Zn(e, u, r);
|
|
3233
3246
|
}
|
|
3234
3247
|
function g(e, t) {
|
|
3235
3248
|
e.type === "custom" && s.updateBlock(e.id, {
|
|
@@ -3237,11 +3250,11 @@ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
|
3237
3250
|
dataSourceFetched: t.dataSourceFetched
|
|
3238
3251
|
});
|
|
3239
3252
|
}
|
|
3240
|
-
return (r, a) => (e(), w("div",
|
|
3253
|
+
return (r, a) => (e(), w("div", $a, [C("div", eo, [(e(!0), w(D, null, c(f.value, (r, a) => (e(), w("div", {
|
|
3241
3254
|
key: a,
|
|
3242
3255
|
class: v(["tpl:relative tpl:min-h-[60px] tpl:rounded", p(a).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3243
3256
|
style: A({ width: d.value[a] })
|
|
3244
|
-
}, [N(j(
|
|
3257
|
+
}, [N(j(Za), {
|
|
3245
3258
|
"model-value": p(a),
|
|
3246
3259
|
group: {
|
|
3247
3260
|
name: "blocks",
|
|
@@ -3250,11 +3263,13 @@ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
|
3250
3263
|
},
|
|
3251
3264
|
animation: 150,
|
|
3252
3265
|
"ghost-class": "tpl-ghost",
|
|
3266
|
+
"invert-swap": !0,
|
|
3267
|
+
"inverted-swap-threshold": .65,
|
|
3253
3268
|
"empty-insert-threshold": 20,
|
|
3254
3269
|
class: "tpl:min-h-[60px]",
|
|
3255
3270
|
"onUpdate:modelValue": (e) => m(a, e)
|
|
3256
3271
|
}, {
|
|
3257
|
-
default: ce(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [N(
|
|
3272
|
+
default: ce(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [N(dr, {
|
|
3258
3273
|
block: r,
|
|
3259
3274
|
"is-selected": j(s).state.selectedBlockId === r.id,
|
|
3260
3275
|
viewport: n.viewport,
|
|
@@ -3281,9 +3296,9 @@ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
|
3281
3296
|
"model-value",
|
|
3282
3297
|
"group",
|
|
3283
3298
|
"onUpdate:modelValue"
|
|
3284
|
-
]), p(a).length === 0 ? (e(), w("div",
|
|
3299
|
+
]), p(a).length === 0 ? (e(), w("div", to, [C("span", null, M(j(o).section.dropHere), 1)])) : O("", !0)], 6))), 128))])]));
|
|
3285
3300
|
}
|
|
3286
|
-
}),
|
|
3301
|
+
}), ro = {
|
|
3287
3302
|
facebook: {
|
|
3288
3303
|
name: "Facebook",
|
|
3289
3304
|
color: "#1877F2",
|
|
@@ -3364,11 +3379,11 @@ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
|
3364
3379
|
color: "#1769FF",
|
|
3365
3380
|
path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
|
|
3366
3381
|
}
|
|
3367
|
-
},
|
|
3382
|
+
}, io = {
|
|
3368
3383
|
small: 24,
|
|
3369
3384
|
medium: 32,
|
|
3370
3385
|
large: 48
|
|
3371
|
-
},
|
|
3386
|
+
}, ao = [
|
|
3372
3387
|
"facebook",
|
|
3373
3388
|
"twitter",
|
|
3374
3389
|
"instagram",
|
|
@@ -3385,11 +3400,11 @@ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
|
3385
3400
|
"github",
|
|
3386
3401
|
"dribbble",
|
|
3387
3402
|
"behance"
|
|
3388
|
-
],
|
|
3403
|
+
], oo = [
|
|
3389
3404
|
"width",
|
|
3390
3405
|
"height",
|
|
3391
3406
|
"fill"
|
|
3392
|
-
],
|
|
3407
|
+
], so = ["d"], co = /* @__PURE__ */ y({
|
|
3393
3408
|
__name: "SocialIconSvg",
|
|
3394
3409
|
props: {
|
|
3395
3410
|
platform: {},
|
|
@@ -3397,7 +3412,7 @@ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
|
3397
3412
|
iconSize: {}
|
|
3398
3413
|
},
|
|
3399
3414
|
setup(t) {
|
|
3400
|
-
let n = t, r = x(() =>
|
|
3415
|
+
let n = t, r = x(() => ro[n.platform]), i = x(() => io[n.iconSize]), a = x(() => {
|
|
3401
3416
|
let e = {
|
|
3402
3417
|
display: "inline-flex",
|
|
3403
3418
|
alignItems: "center",
|
|
@@ -3441,25 +3456,25 @@ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
|
3441
3456
|
viewBox: "0 0 24 24",
|
|
3442
3457
|
fill: s.value,
|
|
3443
3458
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3444
|
-
}, [C("path", { d: r.value.path }, null, 8,
|
|
3459
|
+
}, [C("path", { d: r.value.path }, null, 8, so)], 8, oo))], 4));
|
|
3445
3460
|
}
|
|
3446
|
-
}),
|
|
3461
|
+
}), lo = { class: "tpl:w-full" }, uo = ["href"], fo = {
|
|
3447
3462
|
key: 1,
|
|
3448
3463
|
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)]"
|
|
3449
|
-
},
|
|
3464
|
+
}, po = /* @__PURE__ */ y({
|
|
3450
3465
|
__name: "SocialIconsBlock",
|
|
3451
3466
|
props: {
|
|
3452
3467
|
block: {},
|
|
3453
3468
|
viewport: {}
|
|
3454
3469
|
},
|
|
3455
3470
|
setup(t) {
|
|
3456
|
-
let n = t, { t: r } =
|
|
3471
|
+
let n = t, { t: r } = lt(), i = x(() => ({
|
|
3457
3472
|
display: "flex",
|
|
3458
3473
|
flexWrap: "wrap",
|
|
3459
3474
|
gap: `${n.block.spacing}px`,
|
|
3460
3475
|
justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
|
|
3461
3476
|
})), a = x(() => n.block.icons.length > 0);
|
|
3462
|
-
return (n, o) => (e(), w("div",
|
|
3477
|
+
return (n, o) => (e(), w("div", lo, [a.value ? (e(), w("div", {
|
|
3463
3478
|
key: 0,
|
|
3464
3479
|
style: A(i.value)
|
|
3465
3480
|
}, [(e(!0), w(D, null, c(t.block.icons, (n) => (e(), w("a", {
|
|
@@ -3467,7 +3482,7 @@ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
|
3467
3482
|
href: n.url || "#",
|
|
3468
3483
|
class: "tpl:cursor-default",
|
|
3469
3484
|
onClick: o[0] ||= b(() => {}, ["prevent"])
|
|
3470
|
-
}, [N(
|
|
3485
|
+
}, [N(co, {
|
|
3471
3486
|
platform: n.platform,
|
|
3472
3487
|
"icon-style": t.block.iconStyle,
|
|
3473
3488
|
"icon-size": t.block.iconSize
|
|
@@ -3475,44 +3490,44 @@ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
|
3475
3490
|
"platform",
|
|
3476
3491
|
"icon-style",
|
|
3477
3492
|
"icon-size"
|
|
3478
|
-
])], 8,
|
|
3493
|
+
])], 8, uo))), 128))], 4)) : (e(), w("div", fo, [N(j($t), { size: 16 }), C("span", null, M(j(r).social.addIcons), 1)]))]));
|
|
3479
3494
|
}
|
|
3480
|
-
}),
|
|
3495
|
+
}), mo = { class: "tpl:w-full" }, ho = {
|
|
3481
3496
|
key: 0,
|
|
3482
3497
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3483
3498
|
style: {
|
|
3484
3499
|
"background-color": "var(--tpl-bg-hover)",
|
|
3485
3500
|
color: "var(--tpl-text-dim)"
|
|
3486
3501
|
}
|
|
3487
|
-
},
|
|
3502
|
+
}, go = /* @__PURE__ */ y({
|
|
3488
3503
|
__name: "SpacerBlock",
|
|
3489
3504
|
props: {
|
|
3490
3505
|
block: {},
|
|
3491
3506
|
viewport: {}
|
|
3492
3507
|
},
|
|
3493
3508
|
setup(t) {
|
|
3494
|
-
let n = t, r =
|
|
3509
|
+
let n = t, r = ze($e, "SpacerBlock"), i = x(() => ({
|
|
3495
3510
|
height: `${n.block.height}px`,
|
|
3496
3511
|
minHeight: `${n.block.height}px`,
|
|
3497
3512
|
...r.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3498
3513
|
}));
|
|
3499
|
-
return (n, a) => (e(), w("div",
|
|
3514
|
+
return (n, a) => (e(), w("div", mo, [C("div", {
|
|
3500
3515
|
style: A(i.value),
|
|
3501
3516
|
class: v(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(r).state.previewMode }])
|
|
3502
|
-
}, [j(r).state.previewMode ? O("", !0) : (e(), w("span",
|
|
3517
|
+
}, [j(r).state.previewMode ? O("", !0) : (e(), w("span", ho, M(t.block.height) + "px ", 1))], 6)]));
|
|
3503
3518
|
}
|
|
3504
|
-
}),
|
|
3519
|
+
}), _o = { class: "tpl:w-full" }, vo = { key: 0 }, yo = [
|
|
3505
3520
|
"aria-label",
|
|
3506
3521
|
"data-placeholder",
|
|
3507
3522
|
"onBlur"
|
|
3508
|
-
],
|
|
3523
|
+
], bo = [
|
|
3509
3524
|
"aria-label",
|
|
3510
3525
|
"data-placeholder",
|
|
3511
3526
|
"onBlur"
|
|
3512
|
-
],
|
|
3527
|
+
], xo = {
|
|
3513
3528
|
key: 1,
|
|
3514
3529
|
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)]"
|
|
3515
|
-
},
|
|
3530
|
+
}, So = /* @__PURE__ */ mt(/* @__PURE__ */ y({
|
|
3516
3531
|
__name: "TableBlock",
|
|
3517
3532
|
props: {
|
|
3518
3533
|
block: {},
|
|
@@ -3526,7 +3541,7 @@ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
|
3526
3541
|
updated(e, t) {
|
|
3527
3542
|
t.value !== t.oldValue && e.ownerDocument.activeElement !== e && (e.textContent = t.value ?? "");
|
|
3528
3543
|
}
|
|
3529
|
-
}, i = n, { t: a } =
|
|
3544
|
+
}, i = n, { t: a } = lt(), o = ze($e, "TableBlock"), s = x(() => i.block.rows.length > 0), l = x(() => ({
|
|
3530
3545
|
width: "100%",
|
|
3531
3546
|
borderCollapse: "collapse",
|
|
3532
3547
|
fontSize: `${i.block.fontSize}px`,
|
|
@@ -3555,11 +3570,11 @@ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
|
3555
3570
|
} : n);
|
|
3556
3571
|
o.updateBlock(i.block.id, { rows: a });
|
|
3557
3572
|
}
|
|
3558
|
-
return (n, i) => (e(), w("div",
|
|
3573
|
+
return (n, i) => (e(), w("div", _o, [s.value ? (e(), w("table", {
|
|
3559
3574
|
key: 0,
|
|
3560
3575
|
style: A(l.value),
|
|
3561
3576
|
class: "tpl-table-editable"
|
|
3562
|
-
}, [f.value ? (e(), w("thead",
|
|
3577
|
+
}, [f.value ? (e(), w("thead", vo, [C("tr", null, [(e(!0), w(D, null, c(f.value.cells, (n) => t((e(), w("th", {
|
|
3563
3578
|
key: n.id,
|
|
3564
3579
|
style: A(d.value),
|
|
3565
3580
|
"aria-label": j(a).table.cellPlaceholder,
|
|
@@ -3568,7 +3583,7 @@ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
|
3568
3583
|
onBlur: (e) => h(f.value.id, n.id, e),
|
|
3569
3584
|
onKeydown: i[0] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3570
3585
|
onClick: b(m, ["stop"])
|
|
3571
|
-
}, null, 44,
|
|
3586
|
+
}, null, 44, yo)), [[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", {
|
|
3572
3587
|
key: o.id,
|
|
3573
3588
|
style: A(u.value),
|
|
3574
3589
|
"aria-label": j(a).table.cellPlaceholder,
|
|
@@ -3577,9 +3592,9 @@ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
|
3577
3592
|
onBlur: (e) => h(n.id, o.id, e),
|
|
3578
3593
|
onKeydown: i[1] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3579
3594
|
onClick: b(m, ["stop"])
|
|
3580
|
-
}, null, 44,
|
|
3595
|
+
}, null, 44, bo)), [[r, o.content]])), 128))]))), 128))])], 4)) : (e(), w("div", xo, [N(j(en), { size: 16 }), C("span", null, M(j(a).table.empty), 1)]))]));
|
|
3581
3596
|
}
|
|
3582
|
-
}), [["__scopeId", "data-v-4f49860b"]]),
|
|
3597
|
+
}), [["__scopeId", "data-v-4f49860b"]]), Co = /* @__PURE__ */ y({
|
|
3583
3598
|
__name: "VideoPlayButton",
|
|
3584
3599
|
props: { hoverEffect: {
|
|
3585
3600
|
type: Boolean,
|
|
@@ -3597,7 +3612,7 @@ var Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
|
3597
3612
|
});
|
|
3598
3613
|
//#endregion
|
|
3599
3614
|
//#region src/utils/videoThumbnail.ts
|
|
3600
|
-
function
|
|
3615
|
+
function wo(e) {
|
|
3601
3616
|
if (!e) return {
|
|
3602
3617
|
platform: "unknown",
|
|
3603
3618
|
videoId: null,
|
|
@@ -3629,25 +3644,25 @@ function xo(e) {
|
|
|
3629
3644
|
thumbnailUrl: null
|
|
3630
3645
|
};
|
|
3631
3646
|
}
|
|
3632
|
-
function
|
|
3633
|
-
return t ||
|
|
3647
|
+
function To(e, t) {
|
|
3648
|
+
return t || wo(e).thumbnailUrl;
|
|
3634
3649
|
}
|
|
3635
3650
|
//#endregion
|
|
3636
3651
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3637
|
-
var
|
|
3652
|
+
var Eo = ["src", "alt"], Do = {
|
|
3638
3653
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3639
3654
|
style: { opacity: "0.7" }
|
|
3640
|
-
},
|
|
3655
|
+
}, Oo = ["href"], ko = ["src", "alt"], Ao = ["src", "alt"], jo = {
|
|
3641
3656
|
key: 3,
|
|
3642
3657
|
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)]"
|
|
3643
|
-
},
|
|
3658
|
+
}, Mo = /* @__PURE__ */ y({
|
|
3644
3659
|
__name: "VideoBlock",
|
|
3645
3660
|
props: {
|
|
3646
3661
|
block: {},
|
|
3647
3662
|
viewport: {}
|
|
3648
3663
|
},
|
|
3649
3664
|
setup(t) {
|
|
3650
|
-
let n = t, { t: r } =
|
|
3665
|
+
let n = t, { t: r } = lt(), { syntax: i } = ht(), a = x(() => pe(n.block.url, i) || pe(n.block.thumbnailUrl, i)), o = x(() => a.value ? null : To(n.block.url, n.block.thumbnailUrl)), s = x(() => ({ textAlign: n.block.align })), c = x(() => ({
|
|
3651
3666
|
maxWidth: "100%",
|
|
3652
3667
|
width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
|
|
3653
3668
|
display: "block",
|
|
@@ -3665,16 +3680,16 @@ var Co = ["src", "alt"], wo = {
|
|
|
3665
3680
|
class: "tpl:w-full tpl:border-0",
|
|
3666
3681
|
src: t.block.placeholderUrl,
|
|
3667
3682
|
alt: t.block.alt
|
|
3668
|
-
}, null, 8,
|
|
3683
|
+
}, null, 8, Eo), N(Co)], 4)) : a.value ? (e(), w("div", {
|
|
3669
3684
|
key: 1,
|
|
3670
3685
|
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)]",
|
|
3671
3686
|
style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
|
|
3672
|
-
}, [N(j(
|
|
3687
|
+
}, [N(j(tn), {
|
|
3673
3688
|
size: 36,
|
|
3674
3689
|
"stroke-width": 1.5,
|
|
3675
3690
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3676
3691
|
style: { opacity: "0.5" }
|
|
3677
|
-
}), C("span",
|
|
3692
|
+
}), C("span", Do, M(l.value), 1)], 4)) : o.value ? (e(), w(D, { key: 2 }, [t.block.url ? (e(), w("a", {
|
|
3678
3693
|
key: 0,
|
|
3679
3694
|
href: t.block.url,
|
|
3680
3695
|
target: "_blank",
|
|
@@ -3686,7 +3701,7 @@ var Co = ["src", "alt"], wo = {
|
|
|
3686
3701
|
class: "tpl:w-full tpl:border-0",
|
|
3687
3702
|
src: o.value,
|
|
3688
3703
|
alt: t.block.alt
|
|
3689
|
-
}, null, 8,
|
|
3704
|
+
}, null, 8, ko), N(Co, { "hover-effect": "" })], 12, Oo)) : (e(), w("div", {
|
|
3690
3705
|
key: 1,
|
|
3691
3706
|
class: "tpl:relative tpl:inline-block",
|
|
3692
3707
|
style: A(c.value)
|
|
@@ -3694,47 +3709,47 @@ var Co = ["src", "alt"], wo = {
|
|
|
3694
3709
|
class: "tpl:w-full tpl:border-0",
|
|
3695
3710
|
src: o.value,
|
|
3696
3711
|
alt: t.block.alt
|
|
3697
|
-
}, null, 8,
|
|
3712
|
+
}, null, 8, Ao), N(Co)], 4))], 64)) : (e(), w("div", jo, [N(j(tn), {
|
|
3698
3713
|
size: 40,
|
|
3699
3714
|
"stroke-width": 1.5,
|
|
3700
3715
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3701
3716
|
}), C("span", null, M(j(r).video.addVideo), 1)]))], 4));
|
|
3702
3717
|
}
|
|
3703
|
-
}),
|
|
3704
|
-
section:
|
|
3705
|
-
title:
|
|
3706
|
-
paragraph:
|
|
3707
|
-
image:
|
|
3708
|
-
button:
|
|
3709
|
-
divider:
|
|
3710
|
-
video:
|
|
3711
|
-
social:
|
|
3712
|
-
menu:
|
|
3713
|
-
table:
|
|
3714
|
-
spacer:
|
|
3715
|
-
html:
|
|
3716
|
-
countdown: se(() => import("./CountdownBlock-
|
|
3718
|
+
}), No = {
|
|
3719
|
+
section: no,
|
|
3720
|
+
title: pr,
|
|
3721
|
+
paragraph: Xn,
|
|
3722
|
+
image: Un,
|
|
3723
|
+
button: Ht,
|
|
3724
|
+
divider: Dn,
|
|
3725
|
+
video: Mo,
|
|
3726
|
+
social: po,
|
|
3727
|
+
menu: qn,
|
|
3728
|
+
table: So,
|
|
3729
|
+
spacer: go,
|
|
3730
|
+
html: Mn,
|
|
3731
|
+
countdown: se(() => import("./CountdownBlock-Cq8A8WrM.js").then((e) => e.n))
|
|
3717
3732
|
};
|
|
3718
|
-
function
|
|
3719
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } =
|
|
3733
|
+
function Po(e) {
|
|
3734
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = lt(r);
|
|
3720
3735
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
3721
|
-
let { resolvedTheme: c } =
|
|
3736
|
+
let { resolvedTheme: c } = kt(x(() => t.state.uiTheme)), l = h(n.theme ?? {}), { themeStyles: u } = jt({
|
|
3722
3737
|
themeOverrides: l,
|
|
3723
3738
|
resolvedTheme: c,
|
|
3724
3739
|
extraStyles: e.themeExtraStyles
|
|
3725
|
-
}), d =
|
|
3740
|
+
}), d = bt({
|
|
3726
3741
|
content: t.content,
|
|
3727
3742
|
setContent: (e, n) => t.setContent(e, n),
|
|
3728
3743
|
...e.historyOptions
|
|
3729
3744
|
});
|
|
3730
|
-
|
|
3731
|
-
let f =
|
|
3745
|
+
Tt(t, d);
|
|
3746
|
+
let f = xt({
|
|
3732
3747
|
addBlock: t.addBlock,
|
|
3733
3748
|
removeBlock: t.removeBlock,
|
|
3734
3749
|
updateBlock: t.updateBlock,
|
|
3735
3750
|
selectBlock: t.selectBlock,
|
|
3736
3751
|
blockDefaults: n.blockDefaults
|
|
3737
|
-
}), p =
|
|
3752
|
+
}), p = Ct(t), m = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? St({
|
|
3738
3753
|
content: t.content,
|
|
3739
3754
|
isDirty: () => t.state.isDirty,
|
|
3740
3755
|
...e.autoSaveOptions
|
|
@@ -3742,16 +3757,16 @@ function jo(e) {
|
|
|
3742
3757
|
m && (g = s(d.isNavigating, (e) => {
|
|
3743
3758
|
e ? m.pause() : m.resume();
|
|
3744
3759
|
}));
|
|
3745
|
-
let _ =
|
|
3760
|
+
let _ = Ot(t, {
|
|
3746
3761
|
t: a,
|
|
3747
3762
|
format: o
|
|
3748
|
-
}), v =
|
|
3749
|
-
if (
|
|
3763
|
+
}), v = Ft();
|
|
3764
|
+
if (Lt(v, No), n.customBlocks?.length) for (let e of n.customBlocks) v.registerCustom(e, Tn);
|
|
3750
3765
|
function y(e) {
|
|
3751
|
-
for (let t of e) v.registerCustom(t,
|
|
3766
|
+
for (let t of e) v.registerCustom(t, Tn);
|
|
3752
3767
|
}
|
|
3753
3768
|
function b(r) {
|
|
3754
|
-
|
|
3769
|
+
zt(r, {
|
|
3755
3770
|
history: d,
|
|
3756
3771
|
selectBlock: (e) => t.selectBlock(e),
|
|
3757
3772
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -3760,18 +3775,20 @@ function jo(e) {
|
|
|
3760
3775
|
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
3761
3776
|
});
|
|
3762
3777
|
}
|
|
3763
|
-
Le(document, "keydown", b)
|
|
3764
|
-
let S =
|
|
3765
|
-
E(
|
|
3766
|
-
let C = n.
|
|
3778
|
+
Le(document, "keydown", b);
|
|
3779
|
+
let S = h(null);
|
|
3780
|
+
E(Ze, e.editorRoot ?? document), E(ot, S), E(He, r), E($e, t), E(We, d), E(Ge, f), E(Je, p), E(Xe, i), E(Ve, u), E(Qe, c), E(et, n.blockDefaults), E(rt, v), E(Ye, n.customBlocks ?? []);
|
|
3781
|
+
let C = be(n.mergeTags?.syntax);
|
|
3782
|
+
E(ct, n.mergeTags?.tags ?? []), E(st, C), E(Be, n.mergeTags?.onRequest ?? null), E(Ke, n.mergeTags?.autocomplete !== !1), E(Ue, n.onRequestMedia ?? null), E(tt, n.displayConditions?.conditions ?? []), E(nt, n.displayConditions?.allowCustom ?? !1), E(qe, e.capabilities ?? {}), E(at, _);
|
|
3783
|
+
let w = n.accessibility?.disabled === !0 ? null : Et({
|
|
3767
3784
|
content: t.content,
|
|
3768
3785
|
options: n.accessibility ?? {},
|
|
3769
3786
|
updateBlock: t.updateBlock,
|
|
3770
3787
|
updateSettings: t.updateSettings
|
|
3771
3788
|
});
|
|
3772
|
-
E(
|
|
3773
|
-
function
|
|
3774
|
-
g?.(),
|
|
3789
|
+
E(it, w);
|
|
3790
|
+
function T() {
|
|
3791
|
+
g?.(), w?.destroy(), m?.destroy(), d.destroy();
|
|
3775
3792
|
}
|
|
3776
3793
|
return {
|
|
3777
3794
|
t: a,
|
|
@@ -3785,10 +3802,11 @@ function jo(e) {
|
|
|
3785
3802
|
themeOverrides: l,
|
|
3786
3803
|
registry: v,
|
|
3787
3804
|
keyboardReorder: _,
|
|
3788
|
-
accessibilityLint:
|
|
3805
|
+
accessibilityLint: w,
|
|
3806
|
+
popoverRoot: S,
|
|
3789
3807
|
registerCustomBlocks: y,
|
|
3790
|
-
destroy:
|
|
3808
|
+
destroy: T
|
|
3791
3809
|
};
|
|
3792
3810
|
}
|
|
3793
3811
|
//#endregion
|
|
3794
|
-
export {
|
|
3812
|
+
export { qt as A, ln as C, $t as D, en as E, Dt as F, wt as I, gt as L, Gt as M, Ht as N, Zt as O, Pt as P, un as S, an as T, Mn as _, po as a, gn as b, no as c, dr as d, Qn as f, Un as g, qn as h, go as i, Kt as j, Xt as k, Za as l, Xn as m, Mo as n, ro as o, Zn as p, So as r, ao as s, Po as t, pr as u, Dn as v, cn as w, mn as x, Tn as y };
|