mhz-ui 1.0.95 → 1.0.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/UiEditor/UiEditor.js +414 -409
- package/dist/UiFlex/UiFlex.css +1 -1
- package/dist/UiFlex/UiFlex.js +15 -15
- package/package.json +11 -11
|
@@ -9285,20 +9285,25 @@ function zo(n, e = null) {
|
|
|
9285
9285
|
typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
|
|
9286
9286
|
function qf(n, e = null) {
|
|
9287
9287
|
return function(t, r) {
|
|
9288
|
-
let { $from: i, $to: s } = t.selection, o = i.blockRange(s)
|
|
9288
|
+
let { $from: i, $to: s } = t.selection, o = i.blockRange(s);
|
|
9289
9289
|
if (!o)
|
|
9290
9290
|
return !1;
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
return !1;
|
|
9294
|
-
let u = t.doc.resolve(o.start - 2);
|
|
9295
|
-
a = new Ar(u, u, o.depth), o.endIndex < o.parent.childCount && (o = new Ar(i, t.doc.resolve(s.end(o.depth)), o.depth)), l = !0;
|
|
9296
|
-
}
|
|
9297
|
-
let c = ss(a, n, e, o);
|
|
9298
|
-
return c ? (r && r(Kf(t.tr, o, c, l, n).scrollIntoView()), !0) : !1;
|
|
9291
|
+
let l = r ? t.tr : null;
|
|
9292
|
+
return Kf(l, o, n, e) ? (r && r(l.scrollIntoView()), !0) : !1;
|
|
9299
9293
|
};
|
|
9300
9294
|
}
|
|
9301
|
-
function Kf(n, e, t, r
|
|
9295
|
+
function Kf(n, e, t, r = null) {
|
|
9296
|
+
let i = !1, s = e, o = e.$from.doc;
|
|
9297
|
+
if (e.depth >= 2 && e.$from.node(e.depth - 1).type.compatibleContent(t) && e.startIndex == 0) {
|
|
9298
|
+
if (e.$from.index(e.depth - 1) == 0)
|
|
9299
|
+
return !1;
|
|
9300
|
+
let a = o.resolve(e.start - 2);
|
|
9301
|
+
s = new Ar(a, a, e.depth), e.endIndex < e.parent.childCount && (e = new Ar(e.$from, o.resolve(e.$to.end(e.depth)), e.depth)), i = !0;
|
|
9302
|
+
}
|
|
9303
|
+
let l = ss(s, t, r, e);
|
|
9304
|
+
return l ? (n && _f(n, e, l, i, t), !0) : !1;
|
|
9305
|
+
}
|
|
9306
|
+
function _f(n, e, t, r, i) {
|
|
9302
9307
|
let s = x.empty;
|
|
9303
9308
|
for (let u = t.length - 1; u >= 0; u--)
|
|
9304
9309
|
s = x.from(t[u].type.create(t[u].attrs, s));
|
|
@@ -9311,13 +9316,13 @@ function Kf(n, e, t, r, i) {
|
|
|
9311
9316
|
!f && tn(n.doc, a, l) && (n.split(a, l), a += 2 * l), a += c.child(u).nodeSize;
|
|
9312
9317
|
return n;
|
|
9313
9318
|
}
|
|
9314
|
-
function
|
|
9319
|
+
function Jf(n) {
|
|
9315
9320
|
return function(e, t) {
|
|
9316
9321
|
let { $from: r, $to: i } = e.selection, s = r.blockRange(i, (o) => o.childCount > 0 && o.firstChild.type == n);
|
|
9317
|
-
return s ? t ? r.node(s.depth - 1).type == n ?
|
|
9322
|
+
return s ? t ? r.node(s.depth - 1).type == n ? Uf(e, t, n, s) : Gf(e, t, s) : !0 : !1;
|
|
9318
9323
|
};
|
|
9319
9324
|
}
|
|
9320
|
-
function
|
|
9325
|
+
function Uf(n, e, t, r) {
|
|
9321
9326
|
let i = n.tr, s = r.end, o = r.$to.end(r.depth);
|
|
9322
9327
|
s < o && (i.step(new J(s - 1, o, s, o, new S(x.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new Ar(i.doc.resolve(r.$from.pos), i.doc.resolve(o), r.depth));
|
|
9323
9328
|
const l = gn(r);
|
|
@@ -9327,7 +9332,7 @@ function Jf(n, e, t, r) {
|
|
|
9327
9332
|
let a = i.mapping.map(s, -1) - 1;
|
|
9328
9333
|
return yt(i.doc, a) && i.join(a), e(i.scrollIntoView()), !0;
|
|
9329
9334
|
}
|
|
9330
|
-
function
|
|
9335
|
+
function Gf(n, e, t) {
|
|
9331
9336
|
let r = n.tr, i = t.parent;
|
|
9332
9337
|
for (let p = t.end, h = t.endIndex - 1, m = t.startIndex; h > m; h--)
|
|
9333
9338
|
p -= i.child(h).nodeSize, r.delete(p - 1, p + 1);
|
|
@@ -9340,7 +9345,7 @@ function Uf(n, e, t) {
|
|
|
9340
9345
|
let d = s.pos, f = d + o.nodeSize;
|
|
9341
9346
|
return r.step(new J(d - (l ? 1 : 0), f + (a ? 1 : 0), d + 1, f - 1, new S((l ? x.empty : x.from(i.copy(x.empty))).append(a ? x.empty : x.from(i.copy(x.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(r.scrollIntoView()), !0;
|
|
9342
9347
|
}
|
|
9343
|
-
function
|
|
9348
|
+
function Yf(n) {
|
|
9344
9349
|
return function(e, t) {
|
|
9345
9350
|
let { $from: r, $to: i } = e.selection, s = r.blockRange(i, (c) => c.childCount > 0 && c.firstChild.type == n);
|
|
9346
9351
|
if (!s)
|
|
@@ -9443,7 +9448,7 @@ class Zr {
|
|
|
9443
9448
|
return l;
|
|
9444
9449
|
}
|
|
9445
9450
|
}
|
|
9446
|
-
class
|
|
9451
|
+
class Xf {
|
|
9447
9452
|
constructor() {
|
|
9448
9453
|
this.callbacks = {};
|
|
9449
9454
|
}
|
|
@@ -9580,10 +9585,10 @@ function Va(n) {
|
|
|
9580
9585
|
function P(n, e = void 0, ...t) {
|
|
9581
9586
|
return Va(n) ? e ? n.bind(e)(...t) : n(...t) : n;
|
|
9582
9587
|
}
|
|
9583
|
-
function
|
|
9588
|
+
function Zf(n = {}) {
|
|
9584
9589
|
return Object.keys(n).length === 0 && n.constructor === Object;
|
|
9585
9590
|
}
|
|
9586
|
-
function
|
|
9591
|
+
function Qf(n) {
|
|
9587
9592
|
return typeof n != "string" ? n : n.match(/^[+-]?(?:\d*\.)?\d+$/) ? Number(n) : n === "true" ? !0 : n === "false" ? !1 : n;
|
|
9588
9593
|
}
|
|
9589
9594
|
function Vo(n, e) {
|
|
@@ -9594,7 +9599,7 @@ function Vo(n, e) {
|
|
|
9594
9599
|
if (r === !1)
|
|
9595
9600
|
return !1;
|
|
9596
9601
|
const i = e.reduce((s, o) => {
|
|
9597
|
-
const l = o.attribute.parseHTML ? o.attribute.parseHTML(t) :
|
|
9602
|
+
const l = o.attribute.parseHTML ? o.attribute.parseHTML(t) : Qf(t.getAttribute(o.name));
|
|
9598
9603
|
return l == null ? s : {
|
|
9599
9604
|
...s,
|
|
9600
9605
|
[o.name]: l
|
|
@@ -9607,10 +9612,10 @@ function Vo(n, e) {
|
|
|
9607
9612
|
function Fo(n) {
|
|
9608
9613
|
return Object.fromEntries(
|
|
9609
9614
|
// @ts-ignore
|
|
9610
|
-
Object.entries(n).filter(([e, t]) => e === "attrs" &&
|
|
9615
|
+
Object.entries(n).filter(([e, t]) => e === "attrs" && Zf(t) ? !1 : t != null)
|
|
9611
9616
|
);
|
|
9612
9617
|
}
|
|
9613
|
-
function
|
|
9618
|
+
function ep(n, e) {
|
|
9614
9619
|
var t;
|
|
9615
9620
|
const r = za(n), { nodeExtensions: i, markExtensions: s } = Qr(n), o = (t = i.find((c) => C(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
|
|
9616
9621
|
const u = r.filter((b) => b.type === c.name), d = {
|
|
@@ -9698,7 +9703,7 @@ function bs(n, e) {
|
|
|
9698
9703
|
const t = $t.fromSchema(e).serializeFragment(n), i = document.implementation.createHTMLDocument().createElement("div");
|
|
9699
9704
|
return i.appendChild(t), i.innerHTML;
|
|
9700
9705
|
}
|
|
9701
|
-
const
|
|
9706
|
+
const tp = (n, e = 500) => {
|
|
9702
9707
|
let t = "";
|
|
9703
9708
|
const r = n.parentOffset;
|
|
9704
9709
|
return n.parent.nodesBetween(Math.max(0, r - e), r, (i, s, o, l) => {
|
|
@@ -9720,7 +9725,7 @@ class ei {
|
|
|
9720
9725
|
this.find = e.find, this.handler = e.handler;
|
|
9721
9726
|
}
|
|
9722
9727
|
}
|
|
9723
|
-
const
|
|
9728
|
+
const np = (n, e) => {
|
|
9724
9729
|
if (vs(e))
|
|
9725
9730
|
return e.exec(n);
|
|
9726
9731
|
const t = e(n);
|
|
@@ -9741,11 +9746,11 @@ function mr(n) {
|
|
|
9741
9746
|
)
|
|
9742
9747
|
return !1;
|
|
9743
9748
|
let u = !1;
|
|
9744
|
-
const d =
|
|
9749
|
+
const d = tp(c) + s;
|
|
9745
9750
|
return o.forEach((f) => {
|
|
9746
9751
|
if (u)
|
|
9747
9752
|
return;
|
|
9748
|
-
const p =
|
|
9753
|
+
const p = np(d, f.find);
|
|
9749
9754
|
if (!p)
|
|
9750
9755
|
return;
|
|
9751
9756
|
const h = a.state.tr, m = Xr({
|
|
@@ -9773,7 +9778,7 @@ function mr(n) {
|
|
|
9773
9778
|
}), a.dispatch(h), u = !0);
|
|
9774
9779
|
}), u;
|
|
9775
9780
|
}
|
|
9776
|
-
function
|
|
9781
|
+
function rp(n) {
|
|
9777
9782
|
const { editor: e, rules: t } = n, r = new oe({
|
|
9778
9783
|
state: {
|
|
9779
9784
|
init() {
|
|
@@ -9845,11 +9850,11 @@ function np(n) {
|
|
|
9845
9850
|
});
|
|
9846
9851
|
return r;
|
|
9847
9852
|
}
|
|
9848
|
-
function
|
|
9853
|
+
function ip(n) {
|
|
9849
9854
|
return Object.prototype.toString.call(n).slice(8, -1);
|
|
9850
9855
|
}
|
|
9851
9856
|
function gr(n) {
|
|
9852
|
-
return
|
|
9857
|
+
return ip(n) !== "Object" ? !1 : n.constructor === Object && Object.getPrototypeOf(n) === Object.prototype;
|
|
9853
9858
|
}
|
|
9854
9859
|
function ti(n, e) {
|
|
9855
9860
|
const t = { ...n };
|
|
@@ -9903,15 +9908,15 @@ class gt {
|
|
|
9903
9908
|
return !1;
|
|
9904
9909
|
}
|
|
9905
9910
|
}
|
|
9906
|
-
function
|
|
9911
|
+
function sp(n) {
|
|
9907
9912
|
return typeof n == "number";
|
|
9908
9913
|
}
|
|
9909
|
-
class
|
|
9914
|
+
class op {
|
|
9910
9915
|
constructor(e) {
|
|
9911
9916
|
this.find = e.find, this.handler = e.handler;
|
|
9912
9917
|
}
|
|
9913
9918
|
}
|
|
9914
|
-
const
|
|
9919
|
+
const lp = (n, e, t) => {
|
|
9915
9920
|
if (vs(e))
|
|
9916
9921
|
return [...n.matchAll(e)];
|
|
9917
9922
|
const r = e(n, t);
|
|
@@ -9920,7 +9925,7 @@ const op = (n, e, t) => {
|
|
|
9920
9925
|
return s.index = i.index, s.input = n, s.data = i.data, i.replaceWith && (i.text.includes(i.replaceWith) || console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'), s.push(i.replaceWith)), s;
|
|
9921
9926
|
}) : [];
|
|
9922
9927
|
};
|
|
9923
|
-
function
|
|
9928
|
+
function ap(n) {
|
|
9924
9929
|
const { editor: e, state: t, from: r, to: i, rule: s, pasteEvent: o, dropEvent: l } = n, { commands: a, chain: c, can: u } = new Zr({
|
|
9925
9930
|
editor: e,
|
|
9926
9931
|
state: t
|
|
@@ -9929,7 +9934,7 @@ function lp(n) {
|
|
|
9929
9934
|
if (!p.isTextblock || p.type.spec.code)
|
|
9930
9935
|
return;
|
|
9931
9936
|
const m = Math.max(r, h), g = Math.min(i, h + p.content.size), b = p.textBetween(m - h, g - h, void 0, "");
|
|
9932
|
-
|
|
9937
|
+
lp(b, s.find, o).forEach((M) => {
|
|
9933
9938
|
if (M.index === void 0)
|
|
9934
9939
|
return;
|
|
9935
9940
|
const y = m + M.index + 1, O = y + M[0].length, k = {
|
|
@@ -9949,14 +9954,14 @@ function lp(n) {
|
|
|
9949
9954
|
});
|
|
9950
9955
|
}), d.every((p) => p !== null);
|
|
9951
9956
|
}
|
|
9952
|
-
const
|
|
9957
|
+
const cp = (n) => {
|
|
9953
9958
|
var e;
|
|
9954
9959
|
const t = new ClipboardEvent("paste", {
|
|
9955
9960
|
clipboardData: new DataTransfer()
|
|
9956
9961
|
});
|
|
9957
9962
|
return (e = t.clipboardData) === null || e === void 0 || e.setData("text/html", n), t;
|
|
9958
9963
|
};
|
|
9959
|
-
function
|
|
9964
|
+
function up(n) {
|
|
9960
9965
|
const { editor: e, rules: t } = n;
|
|
9961
9966
|
let r = null, i = !1, s = !1, o = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, l;
|
|
9962
9967
|
try {
|
|
@@ -9969,7 +9974,7 @@ function cp(n) {
|
|
|
9969
9974
|
state: u,
|
|
9970
9975
|
transaction: m
|
|
9971
9976
|
});
|
|
9972
|
-
if (!(!
|
|
9977
|
+
if (!(!ap({
|
|
9973
9978
|
editor: e,
|
|
9974
9979
|
state: g,
|
|
9975
9980
|
from: Math.max(d - 1, 0),
|
|
@@ -10016,7 +10021,7 @@ function cp(n) {
|
|
|
10016
10021
|
if (w) {
|
|
10017
10022
|
let { text: O } = b;
|
|
10018
10023
|
typeof O == "string" ? O = O : O = bs(x.from(O), p.schema);
|
|
10019
|
-
const { from: k } = b, I = k + O.length, B =
|
|
10024
|
+
const { from: k } = b, I = k + O.length, B = cp(O);
|
|
10020
10025
|
return a({
|
|
10021
10026
|
rule: u,
|
|
10022
10027
|
state: p,
|
|
@@ -10026,7 +10031,7 @@ function cp(n) {
|
|
|
10026
10031
|
});
|
|
10027
10032
|
}
|
|
10028
10033
|
const M = f.doc.content.findDiffStart(p.doc.content), y = f.doc.content.findDiffEnd(p.doc.content);
|
|
10029
|
-
if (!(!
|
|
10034
|
+
if (!(!sp(M) || !y || M === y.b))
|
|
10030
10035
|
return a({
|
|
10031
10036
|
rule: u,
|
|
10032
10037
|
state: p,
|
|
@@ -10037,13 +10042,13 @@ function cp(n) {
|
|
|
10037
10042
|
}
|
|
10038
10043
|
}));
|
|
10039
10044
|
}
|
|
10040
|
-
function
|
|
10045
|
+
function dp(n) {
|
|
10041
10046
|
const e = n.filter((t, r) => n.indexOf(t) !== r);
|
|
10042
10047
|
return Array.from(new Set(e));
|
|
10043
10048
|
}
|
|
10044
10049
|
class Qt {
|
|
10045
10050
|
constructor(e, t) {
|
|
10046
|
-
this.splittableMarks = [], this.editor = t, this.extensions = Qt.resolve(e), this.schema =
|
|
10051
|
+
this.splittableMarks = [], this.editor = t, this.extensions = Qt.resolve(e), this.schema = ep(this.extensions, t), this.setupExtensions();
|
|
10047
10052
|
}
|
|
10048
10053
|
/**
|
|
10049
10054
|
* Returns a flattened and sorted extension list while
|
|
@@ -10052,7 +10057,7 @@ class Qt {
|
|
|
10052
10057
|
* @returns An flattened and sorted array of Tiptap extensions
|
|
10053
10058
|
*/
|
|
10054
10059
|
static resolve(e) {
|
|
10055
|
-
const t = Qt.sort(Qt.flatten(e)), r =
|
|
10060
|
+
const t = Qt.sort(Qt.flatten(e)), r = dp(t.map((i) => i.name));
|
|
10056
10061
|
return r.length && console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map((i) => `'${i}'`).join(", ")}]. This can lead to issues.`), t;
|
|
10057
10062
|
}
|
|
10058
10063
|
/**
|
|
@@ -10132,11 +10137,11 @@ class Qt {
|
|
|
10132
10137
|
return a;
|
|
10133
10138
|
}).flat();
|
|
10134
10139
|
return [
|
|
10135
|
-
|
|
10140
|
+
rp({
|
|
10136
10141
|
editor: e,
|
|
10137
10142
|
rules: r
|
|
10138
10143
|
}),
|
|
10139
|
-
...
|
|
10144
|
+
...up({
|
|
10140
10145
|
editor: e,
|
|
10141
10146
|
rules: i
|
|
10142
10147
|
}),
|
|
@@ -10263,7 +10268,7 @@ function Fa(n, e, t) {
|
|
|
10263
10268
|
function $a(n) {
|
|
10264
10269
|
return Object.fromEntries(Object.entries(n.nodes).filter(([, e]) => e.spec.toText).map(([e, t]) => [e, t.spec.toText]));
|
|
10265
10270
|
}
|
|
10266
|
-
const
|
|
10271
|
+
const fp = ee.create({
|
|
10267
10272
|
name: "clipboardTextSerializer",
|
|
10268
10273
|
addOptions() {
|
|
10269
10274
|
return {
|
|
@@ -10286,10 +10291,10 @@ const dp = ee.create({
|
|
|
10286
10291
|
})
|
|
10287
10292
|
];
|
|
10288
10293
|
}
|
|
10289
|
-
}),
|
|
10294
|
+
}), pp = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
|
|
10290
10295
|
var t;
|
|
10291
10296
|
n.isDestroyed || (e.dom.blur(), (t = window?.getSelection()) === null || t === void 0 || t.removeAllRanges());
|
|
10292
|
-
}), !0),
|
|
10297
|
+
}), !0), hp = (n = !1) => ({ commands: e }) => e.setContent("", n), mp = () => ({ state: n, tr: e, dispatch: t }) => {
|
|
10293
10298
|
const { selection: r } = e, { ranges: i } = r;
|
|
10294
10299
|
return t && i.forEach(({ $from: s, $to: o }) => {
|
|
10295
10300
|
n.doc.nodesBetween(s.pos, o.pos, (l, a) => {
|
|
@@ -10306,12 +10311,12 @@ const dp = ee.create({
|
|
|
10306
10311
|
(h || h === 0) && e.lift(p, h);
|
|
10307
10312
|
});
|
|
10308
10313
|
}), !0;
|
|
10309
|
-
},
|
|
10314
|
+
}, gp = (n) => (e) => n(e), yp = () => ({ state: n, dispatch: e }) => zf(n, e), bp = (n, e) => ({ editor: t, tr: r }) => {
|
|
10310
10315
|
const { state: i } = t, s = i.doc.slice(n.from, n.to);
|
|
10311
10316
|
r.deleteRange(n.from, n.to);
|
|
10312
10317
|
const o = r.mapping.map(e);
|
|
10313
10318
|
return r.insert(o, s.content), r.setSelection(new D(r.doc.resolve(o - 1))), !0;
|
|
10314
|
-
},
|
|
10319
|
+
}, vp = () => ({ tr: n, dispatch: e }) => {
|
|
10315
10320
|
const { selection: t } = n, r = t.$anchor.node();
|
|
10316
10321
|
if (r.content.size > 0)
|
|
10317
10322
|
return !1;
|
|
@@ -10325,7 +10330,7 @@ const dp = ee.create({
|
|
|
10325
10330
|
return !0;
|
|
10326
10331
|
}
|
|
10327
10332
|
return !1;
|
|
10328
|
-
},
|
|
10333
|
+
}, kp = (n) => ({ tr: e, state: t, dispatch: r }) => {
|
|
10329
10334
|
const i = G(n, t.schema), s = e.selection.$anchor;
|
|
10330
10335
|
for (let o = s.depth; o > 0; o -= 1)
|
|
10331
10336
|
if (s.node(o).type === i) {
|
|
@@ -10336,10 +10341,10 @@ const dp = ee.create({
|
|
|
10336
10341
|
return !0;
|
|
10337
10342
|
}
|
|
10338
10343
|
return !1;
|
|
10339
|
-
},
|
|
10344
|
+
}, xp = (n) => ({ tr: e, dispatch: t }) => {
|
|
10340
10345
|
const { from: r, to: i } = n;
|
|
10341
10346
|
return t && e.delete(r, i), !0;
|
|
10342
|
-
},
|
|
10347
|
+
}, wp = () => ({ state: n, dispatch: e }) => Cf(n, e), Sp = () => ({ commands: n }) => n.keyboardShortcut("Enter"), Mp = () => ({ state: n, dispatch: e }) => Lf(n, e);
|
|
10343
10348
|
function Fr(n, e, t = { strict: !0 }) {
|
|
10344
10349
|
const r = Object.keys(e);
|
|
10345
10350
|
return r.length ? r.every((i) => t.strict ? e[i] === n[i] : vs(e[i]) ? e[i].test(n[i]) : e[i] === n[i]) : !0;
|
|
@@ -10379,7 +10384,7 @@ function vt(n, e) {
|
|
|
10379
10384
|
}
|
|
10380
10385
|
return n;
|
|
10381
10386
|
}
|
|
10382
|
-
const
|
|
10387
|
+
const Cp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
10383
10388
|
const s = vt(n, r.schema), { doc: o, selection: l } = t, { $from: a, from: c, to: u } = l;
|
|
10384
10389
|
if (i) {
|
|
10385
10390
|
const d = ks(a, s, e);
|
|
@@ -10389,7 +10394,7 @@ const Mp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
10389
10394
|
}
|
|
10390
10395
|
}
|
|
10391
10396
|
return !0;
|
|
10392
|
-
},
|
|
10397
|
+
}, Op = (n) => (e) => {
|
|
10393
10398
|
const t = typeof n == "function" ? n(e) : n;
|
|
10394
10399
|
for (let r = 0; r < t.length; r += 1)
|
|
10395
10400
|
if (t[r](e))
|
|
@@ -10423,7 +10428,7 @@ function ws() {
|
|
|
10423
10428
|
"iPod"
|
|
10424
10429
|
].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
|
|
10425
10430
|
}
|
|
10426
|
-
const
|
|
10431
|
+
const Tp = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) => {
|
|
10427
10432
|
e = {
|
|
10428
10433
|
scrollIntoView: !0,
|
|
10429
10434
|
...e
|
|
@@ -10439,7 +10444,7 @@ const Op = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) =>
|
|
|
10439
10444
|
return o(), !0;
|
|
10440
10445
|
const l = ja(i.doc, n) || t.state.selection, a = t.state.selection.eq(l);
|
|
10441
10446
|
return s && (a || i.setSelection(l), a && i.storedMarks && i.setStoredMarks(i.storedMarks), o()), !0;
|
|
10442
|
-
},
|
|
10447
|
+
}, Ep = (n, e) => (t) => n.every((r, i) => e(r, { ...t, index: i })), Ap = (n, e) => ({ tr: t, commands: r }) => r.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e), Wa = (n) => {
|
|
10443
10448
|
const e = n.childNodes;
|
|
10444
10449
|
for (let t = e.length - 1; t >= 0; t -= 1) {
|
|
10445
10450
|
const r = e[t];
|
|
@@ -10500,7 +10505,7 @@ function $r(n, e, t) {
|
|
|
10500
10505
|
}
|
|
10501
10506
|
return $r("", e, t);
|
|
10502
10507
|
}
|
|
10503
|
-
function
|
|
10508
|
+
function Np(n, e, t) {
|
|
10504
10509
|
const r = n.steps.length - 1;
|
|
10505
10510
|
if (r < e)
|
|
10506
10511
|
return;
|
|
@@ -10513,7 +10518,7 @@ function Ap(n, e, t) {
|
|
|
10513
10518
|
o === 0 && (o = u);
|
|
10514
10519
|
}), n.setSelection(R.near(n.doc.resolve(o), t));
|
|
10515
10520
|
}
|
|
10516
|
-
const
|
|
10521
|
+
const Dp = (n) => !("type" in n), Ip = (n, e, t) => ({ tr: r, dispatch: i, editor: s }) => {
|
|
10517
10522
|
var o;
|
|
10518
10523
|
if (i) {
|
|
10519
10524
|
t = {
|
|
@@ -10542,7 +10547,7 @@ const Np = (n) => !("type" in n), Dp = (n, e, t) => ({ tr: r, dispatch: i, edito
|
|
|
10542
10547
|
}), !1;
|
|
10543
10548
|
}
|
|
10544
10549
|
let { from: a, to: c } = typeof n == "number" ? { from: n, to: n } : { from: n.from, to: n.to }, u = !0, d = !0;
|
|
10545
|
-
if ((
|
|
10550
|
+
if ((Dp(l) ? l : [l]).forEach((h) => {
|
|
10546
10551
|
h.check(), u = u ? h.isText && h.marks.length === 0 : !1, d = d ? h.isBlock : !1;
|
|
10547
10552
|
}), a === c && d) {
|
|
10548
10553
|
const { parent: h } = r.doc.resolve(a);
|
|
@@ -10561,28 +10566,28 @@ const Np = (n) => !("type" in n), Dp = (n, e, t) => ({ tr: r, dispatch: i, edito
|
|
|
10561
10566
|
r.insertText(p, a, c);
|
|
10562
10567
|
} else
|
|
10563
10568
|
p = l, r.replaceWith(a, c, p);
|
|
10564
|
-
t.updateSelection &&
|
|
10569
|
+
t.updateSelection && Np(r, r.steps.length - 1, -1), t.applyInputRules && r.setMeta("applyInputRules", { from: a, text: p }), t.applyPasteRules && r.setMeta("applyPasteRules", { from: a, text: p });
|
|
10565
10570
|
}
|
|
10566
10571
|
return !0;
|
|
10567
|
-
},
|
|
10572
|
+
}, Rp = () => ({ state: n, dispatch: e }) => If(n, e), Pp = () => ({ state: n, dispatch: e }) => Rf(n, e), Bp = () => ({ state: n, dispatch: e }) => Of(n, e), Lp = () => ({ state: n, dispatch: e }) => Nf(n, e), zp = () => ({ state: n, dispatch: e, tr: t }) => {
|
|
10568
10573
|
try {
|
|
10569
10574
|
const r = Kr(n.doc, n.selection.$from.pos, -1);
|
|
10570
10575
|
return r == null ? !1 : (t.join(r, 2), e && e(t), !0);
|
|
10571
10576
|
} catch {
|
|
10572
10577
|
return !1;
|
|
10573
10578
|
}
|
|
10574
|
-
},
|
|
10579
|
+
}, Vp = () => ({ state: n, dispatch: e, tr: t }) => {
|
|
10575
10580
|
try {
|
|
10576
10581
|
const r = Kr(n.doc, n.selection.$from.pos, 1);
|
|
10577
10582
|
return r == null ? !1 : (t.join(r, 2), e && e(t), !0);
|
|
10578
10583
|
} catch {
|
|
10579
10584
|
return !1;
|
|
10580
10585
|
}
|
|
10581
|
-
},
|
|
10586
|
+
}, Fp = () => ({ state: n, dispatch: e }) => Tf(n, e), $p = () => ({ state: n, dispatch: e }) => Ef(n, e);
|
|
10582
10587
|
function qa() {
|
|
10583
10588
|
return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
|
|
10584
10589
|
}
|
|
10585
|
-
function
|
|
10590
|
+
function Hp(n) {
|
|
10586
10591
|
const e = n.split(/-(?!$)/);
|
|
10587
10592
|
let t = e[e.length - 1];
|
|
10588
10593
|
t === "Space" && (t = " ");
|
|
@@ -10604,8 +10609,8 @@ function $p(n) {
|
|
|
10604
10609
|
}
|
|
10605
10610
|
return r && (t = `Alt-${t}`), i && (t = `Ctrl-${t}`), o && (t = `Meta-${t}`), s && (t = `Shift-${t}`), t;
|
|
10606
10611
|
}
|
|
10607
|
-
const
|
|
10608
|
-
const s =
|
|
10612
|
+
const jp = (n) => ({ editor: e, view: t, tr: r, dispatch: i }) => {
|
|
10613
|
+
const s = Hp(n).split(/-(?!$)/), o = s.find((c) => !["Alt", "Ctrl", "Meta", "Shift"].includes(c)), l = new KeyboardEvent("keydown", {
|
|
10609
10614
|
key: o === "Space" ? " " : o,
|
|
10610
10615
|
altKey: s.includes("Alt"),
|
|
10611
10616
|
ctrlKey: s.includes("Ctrl"),
|
|
@@ -10636,13 +10641,13 @@ function Hn(n, e, t = {}) {
|
|
|
10636
10641
|
const a = i - r, c = l.filter((d) => o ? o.name === d.node.type.name : !0).filter((d) => Fr(d.node.attrs, t, { strict: !1 }));
|
|
10637
10642
|
return s ? !!c.length : c.reduce((d, f) => d + f.to - f.from, 0) >= a;
|
|
10638
10643
|
}
|
|
10639
|
-
const
|
|
10644
|
+
const Wp = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
10640
10645
|
const i = G(n, t.schema);
|
|
10641
10646
|
return Hn(t, i, e) ? Pf(t, r) : !1;
|
|
10642
|
-
},
|
|
10647
|
+
}, qp = () => ({ state: n, dispatch: e }) => Vf(n, e), Kp = (n) => ({ state: e, dispatch: t }) => {
|
|
10643
10648
|
const r = G(n, e.schema);
|
|
10644
|
-
return
|
|
10645
|
-
},
|
|
10649
|
+
return Jf(r)(e, t);
|
|
10650
|
+
}, _p = () => ({ state: n, dispatch: e }) => Bf(n, e);
|
|
10646
10651
|
function ni(n, e) {
|
|
10647
10652
|
return e.nodes[n] ? "node" : e.marks[n] ? "mark" : null;
|
|
10648
10653
|
}
|
|
@@ -10650,7 +10655,7 @@ function jo(n, e) {
|
|
|
10650
10655
|
const t = typeof e == "string" ? [e] : e;
|
|
10651
10656
|
return Object.keys(n).reduce((r, i) => (t.includes(i) || (r[i] = n[i]), r), {});
|
|
10652
10657
|
}
|
|
10653
|
-
const
|
|
10658
|
+
const Jp = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
|
|
10654
10659
|
let s = null, o = null;
|
|
10655
10660
|
const l = ni(typeof n == "string" ? n : n.name, r.schema);
|
|
10656
10661
|
return l ? (l === "node" && (s = G(n, r.schema)), l === "mark" && (o = vt(n, r.schema)), i && t.selection.ranges.forEach((a) => {
|
|
@@ -10660,10 +10665,10 @@ const _p = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
10660
10665
|
});
|
|
10661
10666
|
});
|
|
10662
10667
|
}), !0) : !1;
|
|
10663
|
-
},
|
|
10668
|
+
}, Up = () => ({ tr: n, dispatch: e }) => (e && n.scrollIntoView(), !0), Gp = () => ({ tr: n, commands: e }) => e.setTextSelection({
|
|
10664
10669
|
from: 0,
|
|
10665
10670
|
to: n.doc.content.size
|
|
10666
|
-
}),
|
|
10671
|
+
}), Yp = () => ({ state: n, dispatch: e }) => Af(n, e), Xp = () => ({ state: n, dispatch: e }) => Df(n, e), Zp = () => ({ state: n, dispatch: e }) => Ff(n, e), Qp = () => ({ state: n, dispatch: e }) => jf(n, e), eh = () => ({ state: n, dispatch: e }) => Hf(n, e);
|
|
10667
10672
|
function Ji(n, e, t = {}, r = {}) {
|
|
10668
10673
|
return $r(n, e, {
|
|
10669
10674
|
slice: !1,
|
|
@@ -10671,7 +10676,7 @@ function Ji(n, e, t = {}, r = {}) {
|
|
|
10671
10676
|
errorOnInvalidContent: r.errorOnInvalidContent
|
|
10672
10677
|
});
|
|
10673
10678
|
}
|
|
10674
|
-
const
|
|
10679
|
+
const th = (n, e = !1, t = {}, r = {}) => ({ editor: i, tr: s, dispatch: o, commands: l }) => {
|
|
10675
10680
|
var a, c;
|
|
10676
10681
|
const { doc: u } = s;
|
|
10677
10682
|
if (t.preserveWhitespace !== "full") {
|
|
@@ -10693,7 +10698,7 @@ function Ka(n, e) {
|
|
|
10693
10698
|
const l = o.find((a) => a.type.name === t.name);
|
|
10694
10699
|
return l ? { ...l.attrs } : {};
|
|
10695
10700
|
}
|
|
10696
|
-
function
|
|
10701
|
+
function nh(n) {
|
|
10697
10702
|
for (let e = 0; e < n.edgeCount; e += 1) {
|
|
10698
10703
|
const { type: t } = n.edge(e);
|
|
10699
10704
|
if (t.isTextblock && !t.hasRequiredAttrs())
|
|
@@ -10701,7 +10706,7 @@ function th(n) {
|
|
|
10701
10706
|
}
|
|
10702
10707
|
return null;
|
|
10703
10708
|
}
|
|
10704
|
-
function
|
|
10709
|
+
function rh(n, e) {
|
|
10705
10710
|
for (let t = n.depth; t > 0; t -= 1) {
|
|
10706
10711
|
const r = n.node(t);
|
|
10707
10712
|
if (e(r))
|
|
@@ -10714,16 +10719,16 @@ function nh(n, e) {
|
|
|
10714
10719
|
}
|
|
10715
10720
|
}
|
|
10716
10721
|
function Ss(n) {
|
|
10717
|
-
return (e) =>
|
|
10722
|
+
return (e) => rh(e.$from, n);
|
|
10718
10723
|
}
|
|
10719
|
-
function
|
|
10724
|
+
function ih(n, e) {
|
|
10720
10725
|
const t = {
|
|
10721
10726
|
from: 0,
|
|
10722
10727
|
to: n.content.size
|
|
10723
10728
|
};
|
|
10724
10729
|
return Fa(n, t, e);
|
|
10725
10730
|
}
|
|
10726
|
-
function
|
|
10731
|
+
function sh(n, e) {
|
|
10727
10732
|
const t = G(e, n.schema), { from: r, to: i } = n.selection, s = [];
|
|
10728
10733
|
n.doc.nodesBetween(r, i, (l) => {
|
|
10729
10734
|
s.push(l);
|
|
@@ -10731,9 +10736,9 @@ function ih(n, e) {
|
|
|
10731
10736
|
const o = s.reverse().find((l) => l.type.name === t.name);
|
|
10732
10737
|
return o ? { ...o.attrs } : {};
|
|
10733
10738
|
}
|
|
10734
|
-
function
|
|
10739
|
+
function oh(n, e) {
|
|
10735
10740
|
const t = ni(typeof e == "string" ? e : e.name, n.schema);
|
|
10736
|
-
return t === "node" ?
|
|
10741
|
+
return t === "node" ? sh(n, e) : t === "mark" ? Ka(n, e) : {};
|
|
10737
10742
|
}
|
|
10738
10743
|
function _a(n, e, t) {
|
|
10739
10744
|
const r = [];
|
|
@@ -10780,7 +10785,7 @@ function Ui(n, e, t = {}) {
|
|
|
10780
10785
|
const a = l.filter((d) => s ? s.name === d.mark.type.name : !0).filter((d) => Fr(d.mark.attrs, t, { strict: !1 })).reduce((d, f) => d + f.to - f.from, 0), c = l.filter((d) => s ? d.mark.type !== s && d.mark.type.excludes(s) : !0).reduce((d, f) => d + f.to - f.from, 0);
|
|
10781
10786
|
return (a > 0 ? a + c : a) >= o;
|
|
10782
10787
|
}
|
|
10783
|
-
function
|
|
10788
|
+
function lh(n, e, t = {}) {
|
|
10784
10789
|
if (!e)
|
|
10785
10790
|
return Hn(n, null, t) || Ui(n, null, t);
|
|
10786
10791
|
const r = ni(e, n.schema);
|
|
@@ -10838,7 +10843,7 @@ function Ua(n, e, t) {
|
|
|
10838
10843
|
toJSON: () => b
|
|
10839
10844
|
};
|
|
10840
10845
|
}
|
|
10841
|
-
function
|
|
10846
|
+
function ah(n, e, t) {
|
|
10842
10847
|
var r;
|
|
10843
10848
|
const { selection: i } = e;
|
|
10844
10849
|
let s = null;
|
|
@@ -10860,7 +10865,7 @@ function lh(n, e, t) {
|
|
|
10860
10865
|
}), c;
|
|
10861
10866
|
});
|
|
10862
10867
|
}
|
|
10863
|
-
const
|
|
10868
|
+
const ch = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
10864
10869
|
const { selection: s } = t, { empty: o, ranges: l } = s, a = vt(n, r.schema);
|
|
10865
10870
|
if (i)
|
|
10866
10871
|
if (o) {
|
|
@@ -10882,26 +10887,26 @@ const ah = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
10882
10887
|
}) : t.addMark(h, m, a.create(e));
|
|
10883
10888
|
});
|
|
10884
10889
|
});
|
|
10885
|
-
return
|
|
10886
|
-
},
|
|
10890
|
+
return ah(r, t, a);
|
|
10891
|
+
}, uh = (n, e) => ({ tr: t }) => (t.setMeta(n, e), !0), dh = (n, e = {}) => ({ state: t, dispatch: r, chain: i }) => {
|
|
10887
10892
|
const s = G(n, t.schema);
|
|
10888
10893
|
let o;
|
|
10889
10894
|
return t.selection.$anchor.sameParent(t.selection.$head) && (o = t.selection.$anchor.parent.attrs), s.isTextblock ? i().command(({ commands: l }) => zo(s, { ...o, ...e })(t) ? !0 : l.clearNodes()).command(({ state: l }) => zo(s, { ...o, ...e })(l, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
|
|
10890
|
-
},
|
|
10895
|
+
}, fh = (n) => ({ tr: e, dispatch: t }) => {
|
|
10891
10896
|
if (t) {
|
|
10892
10897
|
const { doc: r } = e, i = Ze(n, 0, r.content.size), s = A.create(r, i);
|
|
10893
10898
|
e.setSelection(s);
|
|
10894
10899
|
}
|
|
10895
10900
|
return !0;
|
|
10896
|
-
},
|
|
10901
|
+
}, ph = (n) => ({ tr: e, dispatch: t }) => {
|
|
10897
10902
|
if (t) {
|
|
10898
10903
|
const { doc: r } = e, { from: i, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = D.atStart(r).from, l = D.atEnd(r).to, a = Ze(i, o, l), c = Ze(s, o, l), u = D.create(r, a, c);
|
|
10899
10904
|
e.setSelection(u);
|
|
10900
10905
|
}
|
|
10901
10906
|
return !0;
|
|
10902
|
-
},
|
|
10907
|
+
}, hh = (n) => ({ state: e, dispatch: t }) => {
|
|
10903
10908
|
const r = G(n, e.schema);
|
|
10904
|
-
return
|
|
10909
|
+
return Yf(r)(e, t);
|
|
10905
10910
|
};
|
|
10906
10911
|
function qo(n, e) {
|
|
10907
10912
|
const t = n.storedMarks || n.selection.$to.parentOffset && n.selection.$from.marks();
|
|
@@ -10910,13 +10915,13 @@ function qo(n, e) {
|
|
|
10910
10915
|
n.tr.ensureMarks(r);
|
|
10911
10916
|
}
|
|
10912
10917
|
}
|
|
10913
|
-
const
|
|
10918
|
+
const mh = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
|
|
10914
10919
|
const { selection: s, doc: o } = e, { $from: l, $to: a } = s, c = i.extensionManager.attributes, u = Sr(c, l.node().type.name, l.node().attrs);
|
|
10915
10920
|
if (s instanceof A && s.node.isBlock)
|
|
10916
10921
|
return !l.parentOffset || !tn(o, l.pos) ? !1 : (r && (n && qo(t, i.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
|
|
10917
10922
|
if (!l.parent.isBlock)
|
|
10918
10923
|
return !1;
|
|
10919
|
-
const d = a.parentOffset === a.parent.content.size, f = l.depth === 0 ? void 0 :
|
|
10924
|
+
const d = a.parentOffset === a.parent.content.size, f = l.depth === 0 ? void 0 : nh(l.node(-1).contentMatchAt(l.indexAfter(-1)));
|
|
10920
10925
|
let p = d && f ? [
|
|
10921
10926
|
{
|
|
10922
10927
|
type: f,
|
|
@@ -10936,7 +10941,7 @@ const hh = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
10936
10941
|
n && qo(t, i.extensionManager.splittableMarks), e.scrollIntoView();
|
|
10937
10942
|
}
|
|
10938
10943
|
return h;
|
|
10939
|
-
},
|
|
10944
|
+
}, gh = (n, e = {}) => ({ tr: t, state: r, dispatch: i, editor: s }) => {
|
|
10940
10945
|
var o;
|
|
10941
10946
|
const l = G(n, r.schema), { $from: a, $to: c } = r.selection, u = r.selection.node;
|
|
10942
10947
|
if (u && u.isBlock || a.depth < 2 || !a.sameParent(c))
|
|
@@ -11009,7 +11014,7 @@ const hh = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
11009
11014
|
return !0;
|
|
11010
11015
|
const i = n.doc.nodeAt(r);
|
|
11011
11016
|
return t.node.type === i?.type && yt(n.doc, r) && n.join(r), !0;
|
|
11012
|
-
},
|
|
11017
|
+
}, yh = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: u }) => {
|
|
11013
11018
|
const { extensions: d, splittableMarks: f } = i.extensionManager, p = G(n, o.schema), h = G(e, o.schema), { selection: m, storedMarks: g } = o, { $from: b, $to: w } = m, M = b.blockRange(w), y = g || m.$to.parentOffset && m.$from.marks();
|
|
11014
11019
|
if (!M)
|
|
11015
11020
|
return !1;
|
|
@@ -11024,17 +11029,17 @@ const hh = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
11024
11029
|
const k = u().wrapInList(p, r), I = y.filter((B) => f.includes(B.type.name));
|
|
11025
11030
|
return s.ensureMarks(I), k ? !0 : c.clearNodes();
|
|
11026
11031
|
}).wrapInList(p, r).command(() => wi(s, p)).command(() => Si(s, p)).run();
|
|
11027
|
-
},
|
|
11032
|
+
}, bh = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
|
|
11028
11033
|
const { extendEmptyMarkRange: s = !1 } = t, o = vt(n, r.schema);
|
|
11029
11034
|
return Ui(r, o, e) ? i.unsetMark(o, { extendEmptyMarkRange: s }) : i.setMark(o, e);
|
|
11030
|
-
},
|
|
11035
|
+
}, vh = (n, e, t = {}) => ({ state: r, commands: i }) => {
|
|
11031
11036
|
const s = G(n, r.schema), o = G(e, r.schema), l = Hn(r, s, t);
|
|
11032
11037
|
let a;
|
|
11033
11038
|
return r.selection.$anchor.sameParent(r.selection.$head) && (a = r.selection.$anchor.parent.attrs), l ? i.setNode(o, a) : i.setNode(s, { ...a, ...t });
|
|
11034
|
-
},
|
|
11039
|
+
}, kh = (n, e = {}) => ({ state: t, commands: r }) => {
|
|
11035
11040
|
const i = G(n, t.schema);
|
|
11036
11041
|
return Hn(t, i, e) ? r.lift(i) : r.wrapIn(i, e);
|
|
11037
|
-
},
|
|
11042
|
+
}, xh = () => ({ state: n, dispatch: e }) => {
|
|
11038
11043
|
const t = n.plugins;
|
|
11039
11044
|
for (let r = 0; r < t.length; r += 1) {
|
|
11040
11045
|
const i = t[r];
|
|
@@ -11054,12 +11059,12 @@ const hh = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
11054
11059
|
}
|
|
11055
11060
|
}
|
|
11056
11061
|
return !1;
|
|
11057
|
-
},
|
|
11062
|
+
}, wh = () => ({ tr: n, dispatch: e }) => {
|
|
11058
11063
|
const { selection: t } = n, { empty: r, ranges: i } = t;
|
|
11059
11064
|
return r || e && i.forEach((s) => {
|
|
11060
11065
|
n.removeMark(s.$from.pos, s.$to.pos);
|
|
11061
11066
|
}), !0;
|
|
11062
|
-
},
|
|
11067
|
+
}, Sh = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
11063
11068
|
var s;
|
|
11064
11069
|
const { extendEmptyMarkRange: o = !1 } = e, { selection: l } = t, a = vt(n, r.schema), { $from: c, empty: u, ranges: d } = l;
|
|
11065
11070
|
if (!i)
|
|
@@ -11073,7 +11078,7 @@ const hh = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
11073
11078
|
t.removeMark(f.$from.pos, f.$to.pos, a);
|
|
11074
11079
|
});
|
|
11075
11080
|
return t.removeStoredMark(a), !0;
|
|
11076
|
-
},
|
|
11081
|
+
}, Mh = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
11077
11082
|
let s = null, o = null;
|
|
11078
11083
|
const l = ni(typeof n == "string" ? n : n.name, r.schema);
|
|
11079
11084
|
return l ? (l === "node" && (s = G(n, r.schema)), l === "mark" && (o = vt(n, r.schema)), i && t.selection.ranges.forEach((a) => {
|
|
@@ -11104,82 +11109,82 @@ const hh = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
11104
11109
|
}));
|
|
11105
11110
|
}));
|
|
11106
11111
|
}), !0) : !1;
|
|
11107
|
-
},
|
|
11112
|
+
}, Ch = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
11108
11113
|
const i = G(n, t.schema);
|
|
11109
11114
|
return Wf(i, e)(t, r);
|
|
11110
|
-
},
|
|
11115
|
+
}, Oh = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
11111
11116
|
const i = G(n, t.schema);
|
|
11112
11117
|
return qf(i, e)(t, r);
|
|
11113
11118
|
};
|
|
11114
|
-
var
|
|
11119
|
+
var Th = /* @__PURE__ */ Object.freeze({
|
|
11115
11120
|
__proto__: null,
|
|
11116
|
-
blur:
|
|
11117
|
-
clearContent:
|
|
11118
|
-
clearNodes:
|
|
11119
|
-
command:
|
|
11120
|
-
createParagraphNear:
|
|
11121
|
-
cut:
|
|
11122
|
-
deleteCurrentNode:
|
|
11123
|
-
deleteNode:
|
|
11124
|
-
deleteRange:
|
|
11125
|
-
deleteSelection:
|
|
11126
|
-
enter:
|
|
11127
|
-
exitCode:
|
|
11128
|
-
extendMarkRange:
|
|
11129
|
-
first:
|
|
11130
|
-
focus:
|
|
11131
|
-
forEach:
|
|
11132
|
-
insertContent:
|
|
11133
|
-
insertContentAt:
|
|
11134
|
-
joinBackward:
|
|
11135
|
-
joinDown:
|
|
11136
|
-
joinForward:
|
|
11137
|
-
joinItemBackward:
|
|
11138
|
-
joinItemForward:
|
|
11139
|
-
joinTextblockBackward:
|
|
11140
|
-
joinTextblockForward:
|
|
11141
|
-
joinUp:
|
|
11142
|
-
keyboardShortcut:
|
|
11143
|
-
lift:
|
|
11144
|
-
liftEmptyBlock:
|
|
11145
|
-
liftListItem:
|
|
11146
|
-
newlineInCode:
|
|
11147
|
-
resetAttributes:
|
|
11148
|
-
scrollIntoView:
|
|
11149
|
-
selectAll:
|
|
11150
|
-
selectNodeBackward:
|
|
11151
|
-
selectNodeForward:
|
|
11152
|
-
selectParentNode:
|
|
11153
|
-
selectTextblockEnd:
|
|
11154
|
-
selectTextblockStart:
|
|
11155
|
-
setContent:
|
|
11156
|
-
setMark:
|
|
11157
|
-
setMeta:
|
|
11158
|
-
setNode:
|
|
11159
|
-
setNodeSelection:
|
|
11160
|
-
setTextSelection:
|
|
11161
|
-
sinkListItem:
|
|
11162
|
-
splitBlock:
|
|
11163
|
-
splitListItem:
|
|
11164
|
-
toggleList:
|
|
11165
|
-
toggleMark:
|
|
11166
|
-
toggleNode:
|
|
11167
|
-
toggleWrap:
|
|
11168
|
-
undoInputRule:
|
|
11169
|
-
unsetAllMarks:
|
|
11170
|
-
unsetMark:
|
|
11171
|
-
updateAttributes:
|
|
11172
|
-
wrapIn:
|
|
11173
|
-
wrapInList:
|
|
11121
|
+
blur: pp,
|
|
11122
|
+
clearContent: hp,
|
|
11123
|
+
clearNodes: mp,
|
|
11124
|
+
command: gp,
|
|
11125
|
+
createParagraphNear: yp,
|
|
11126
|
+
cut: bp,
|
|
11127
|
+
deleteCurrentNode: vp,
|
|
11128
|
+
deleteNode: kp,
|
|
11129
|
+
deleteRange: xp,
|
|
11130
|
+
deleteSelection: wp,
|
|
11131
|
+
enter: Sp,
|
|
11132
|
+
exitCode: Mp,
|
|
11133
|
+
extendMarkRange: Cp,
|
|
11134
|
+
first: Op,
|
|
11135
|
+
focus: Tp,
|
|
11136
|
+
forEach: Ep,
|
|
11137
|
+
insertContent: Ap,
|
|
11138
|
+
insertContentAt: Ip,
|
|
11139
|
+
joinBackward: Bp,
|
|
11140
|
+
joinDown: Pp,
|
|
11141
|
+
joinForward: Lp,
|
|
11142
|
+
joinItemBackward: zp,
|
|
11143
|
+
joinItemForward: Vp,
|
|
11144
|
+
joinTextblockBackward: Fp,
|
|
11145
|
+
joinTextblockForward: $p,
|
|
11146
|
+
joinUp: Rp,
|
|
11147
|
+
keyboardShortcut: jp,
|
|
11148
|
+
lift: Wp,
|
|
11149
|
+
liftEmptyBlock: qp,
|
|
11150
|
+
liftListItem: Kp,
|
|
11151
|
+
newlineInCode: _p,
|
|
11152
|
+
resetAttributes: Jp,
|
|
11153
|
+
scrollIntoView: Up,
|
|
11154
|
+
selectAll: Gp,
|
|
11155
|
+
selectNodeBackward: Yp,
|
|
11156
|
+
selectNodeForward: Xp,
|
|
11157
|
+
selectParentNode: Zp,
|
|
11158
|
+
selectTextblockEnd: Qp,
|
|
11159
|
+
selectTextblockStart: eh,
|
|
11160
|
+
setContent: th,
|
|
11161
|
+
setMark: ch,
|
|
11162
|
+
setMeta: uh,
|
|
11163
|
+
setNode: dh,
|
|
11164
|
+
setNodeSelection: fh,
|
|
11165
|
+
setTextSelection: ph,
|
|
11166
|
+
sinkListItem: hh,
|
|
11167
|
+
splitBlock: mh,
|
|
11168
|
+
splitListItem: gh,
|
|
11169
|
+
toggleList: yh,
|
|
11170
|
+
toggleMark: bh,
|
|
11171
|
+
toggleNode: vh,
|
|
11172
|
+
toggleWrap: kh,
|
|
11173
|
+
undoInputRule: xh,
|
|
11174
|
+
unsetAllMarks: wh,
|
|
11175
|
+
unsetMark: Sh,
|
|
11176
|
+
updateAttributes: Mh,
|
|
11177
|
+
wrapIn: Ch,
|
|
11178
|
+
wrapInList: Oh
|
|
11174
11179
|
});
|
|
11175
|
-
const
|
|
11180
|
+
const Eh = ee.create({
|
|
11176
11181
|
name: "commands",
|
|
11177
11182
|
addCommands() {
|
|
11178
11183
|
return {
|
|
11179
|
-
...
|
|
11184
|
+
...Th
|
|
11180
11185
|
};
|
|
11181
11186
|
}
|
|
11182
|
-
}),
|
|
11187
|
+
}), Ah = ee.create({
|
|
11183
11188
|
name: "drop",
|
|
11184
11189
|
addProseMirrorPlugins() {
|
|
11185
11190
|
return [
|
|
@@ -11198,7 +11203,7 @@ const Th = ee.create({
|
|
|
11198
11203
|
})
|
|
11199
11204
|
];
|
|
11200
11205
|
}
|
|
11201
|
-
}),
|
|
11206
|
+
}), Nh = ee.create({
|
|
11202
11207
|
name: "editable",
|
|
11203
11208
|
addProseMirrorPlugins() {
|
|
11204
11209
|
return [
|
|
@@ -11210,7 +11215,7 @@ const Th = ee.create({
|
|
|
11210
11215
|
})
|
|
11211
11216
|
];
|
|
11212
11217
|
}
|
|
11213
|
-
}),
|
|
11218
|
+
}), Dh = ee.create({
|
|
11214
11219
|
name: "focusEvents",
|
|
11215
11220
|
addProseMirrorPlugins() {
|
|
11216
11221
|
const { editor: n } = this;
|
|
@@ -11234,7 +11239,7 @@ const Th = ee.create({
|
|
|
11234
11239
|
})
|
|
11235
11240
|
];
|
|
11236
11241
|
}
|
|
11237
|
-
}),
|
|
11242
|
+
}), Ih = ee.create({
|
|
11238
11243
|
name: "keymap",
|
|
11239
11244
|
addKeyboardShortcuts() {
|
|
11240
11245
|
const n = () => this.editor.commands.first(({ commands: o }) => [
|
|
@@ -11310,7 +11315,7 @@ const Th = ee.create({
|
|
|
11310
11315
|
})
|
|
11311
11316
|
];
|
|
11312
11317
|
}
|
|
11313
|
-
}),
|
|
11318
|
+
}), Rh = ee.create({
|
|
11314
11319
|
name: "paste",
|
|
11315
11320
|
addProseMirrorPlugins() {
|
|
11316
11321
|
return [
|
|
@@ -11328,7 +11333,7 @@ const Th = ee.create({
|
|
|
11328
11333
|
})
|
|
11329
11334
|
];
|
|
11330
11335
|
}
|
|
11331
|
-
}),
|
|
11336
|
+
}), Ph = ee.create({
|
|
11332
11337
|
name: "tabindex",
|
|
11333
11338
|
addProseMirrorPlugins() {
|
|
11334
11339
|
return [
|
|
@@ -11464,7 +11469,7 @@ class Tt {
|
|
|
11464
11469
|
}), this.editor.view.dispatch(t);
|
|
11465
11470
|
}
|
|
11466
11471
|
}
|
|
11467
|
-
const
|
|
11472
|
+
const Bh = `.ProseMirror {
|
|
11468
11473
|
position: relative;
|
|
11469
11474
|
}
|
|
11470
11475
|
|
|
@@ -11539,14 +11544,14 @@ img.ProseMirror-separator {
|
|
|
11539
11544
|
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
11540
11545
|
opacity: 0
|
|
11541
11546
|
}`;
|
|
11542
|
-
function
|
|
11547
|
+
function Lh(n, e, t) {
|
|
11543
11548
|
const r = document.querySelector("style[data-tiptap-style]");
|
|
11544
11549
|
if (r !== null)
|
|
11545
11550
|
return r;
|
|
11546
11551
|
const i = document.createElement("style");
|
|
11547
11552
|
return e && i.setAttribute("nonce", e), i.setAttribute("data-tiptap-style", ""), i.innerHTML = n, document.getElementsByTagName("head")[0].appendChild(i), i;
|
|
11548
11553
|
}
|
|
11549
|
-
let
|
|
11554
|
+
let zh = class extends Xf {
|
|
11550
11555
|
constructor(e = {}) {
|
|
11551
11556
|
super(), this.isFocused = !1, this.isInitialized = !1, this.extensionStorage = {}, this.options = {
|
|
11552
11557
|
element: document.createElement("div"),
|
|
@@ -11608,7 +11613,7 @@ let Lh = class extends Yf {
|
|
|
11608
11613
|
* Inject CSS styles.
|
|
11609
11614
|
*/
|
|
11610
11615
|
injectCSS() {
|
|
11611
|
-
this.options.injectCSS && document && (this.css = Bh
|
|
11616
|
+
this.options.injectCSS && document && (this.css = Lh(Bh, this.options.injectNonce));
|
|
11612
11617
|
}
|
|
11613
11618
|
/**
|
|
11614
11619
|
* Update editor options.
|
|
@@ -11677,16 +11682,16 @@ let Lh = class extends Yf {
|
|
|
11677
11682
|
createExtensionManager() {
|
|
11678
11683
|
var e, t;
|
|
11679
11684
|
const i = [...this.options.enableCoreExtensions ? [
|
|
11680
|
-
|
|
11681
|
-
|
|
11685
|
+
Nh,
|
|
11686
|
+
fp.configure({
|
|
11682
11687
|
blockSeparator: (t = (e = this.options.coreExtensionOptions) === null || e === void 0 ? void 0 : e.clipboardTextSerializer) === null || t === void 0 ? void 0 : t.blockSeparator
|
|
11683
11688
|
}),
|
|
11684
|
-
Th,
|
|
11685
|
-
Nh,
|
|
11686
|
-
Dh,
|
|
11687
|
-
Rh,
|
|
11688
11689
|
Eh,
|
|
11689
|
-
|
|
11690
|
+
Dh,
|
|
11691
|
+
Ih,
|
|
11692
|
+
Ph,
|
|
11693
|
+
Ah,
|
|
11694
|
+
Rh
|
|
11690
11695
|
].filter((s) => typeof this.options.enableCoreExtensions == "object" ? this.options.enableCoreExtensions[s.name] !== !1 : !0) : [], ...this.options.extensions].filter((s) => ["extension", "node", "mark"].includes(s?.type));
|
|
11691
11696
|
this.extensionManager = new Qt(i, this);
|
|
11692
11697
|
}
|
|
@@ -11812,11 +11817,11 @@ let Lh = class extends Yf {
|
|
|
11812
11817
|
* Get attributes of the currently selected node or mark.
|
|
11813
11818
|
*/
|
|
11814
11819
|
getAttributes(e) {
|
|
11815
|
-
return
|
|
11820
|
+
return oh(this.state, e);
|
|
11816
11821
|
}
|
|
11817
11822
|
isActive(e, t) {
|
|
11818
11823
|
const r = typeof e == "string" ? e : null, i = typeof e == "string" ? t : e;
|
|
11819
|
-
return
|
|
11824
|
+
return lh(this.state, r, i);
|
|
11820
11825
|
}
|
|
11821
11826
|
/**
|
|
11822
11827
|
* Get the document as JSON.
|
|
@@ -11837,7 +11842,7 @@ let Lh = class extends Yf {
|
|
|
11837
11842
|
const { blockSeparator: t = `
|
|
11838
11843
|
|
|
11839
11844
|
`, textSerializers: r = {} } = e || {};
|
|
11840
|
-
return
|
|
11845
|
+
return ih(this.state.doc, {
|
|
11841
11846
|
blockSeparator: t,
|
|
11842
11847
|
textSerializers: {
|
|
11843
11848
|
...$a(this.schema),
|
|
@@ -11911,7 +11916,7 @@ function cn(n) {
|
|
|
11911
11916
|
}
|
|
11912
11917
|
});
|
|
11913
11918
|
}
|
|
11914
|
-
function
|
|
11919
|
+
function Vh(n) {
|
|
11915
11920
|
return new ei({
|
|
11916
11921
|
find: n.find,
|
|
11917
11922
|
handler: ({ state: e, range: t, match: r }) => {
|
|
@@ -12002,7 +12007,7 @@ class me {
|
|
|
12002
12007
|
}
|
|
12003
12008
|
}
|
|
12004
12009
|
function un(n) {
|
|
12005
|
-
return new
|
|
12010
|
+
return new op({
|
|
12006
12011
|
find: n.find,
|
|
12007
12012
|
handler: ({ state: e, range: t, match: r, pasteEvent: i }) => {
|
|
12008
12013
|
const s = P(n.getAttributes, void 0, r, i);
|
|
@@ -12019,11 +12024,11 @@ function un(n) {
|
|
|
12019
12024
|
}
|
|
12020
12025
|
});
|
|
12021
12026
|
}
|
|
12022
|
-
var pe = "top", Te = "bottom", Ee = "right", he = "left", Cs = "auto", Zn = [pe, Te, Ee, he], dn = "start", Wn = "end",
|
|
12027
|
+
var pe = "top", Te = "bottom", Ee = "right", he = "left", Cs = "auto", Zn = [pe, Te, Ee, he], dn = "start", Wn = "end", Fh = "clippingParents", Ga = "viewport", Mn = "popper", $h = "reference", Ko = /* @__PURE__ */ Zn.reduce(function(n, e) {
|
|
12023
12028
|
return n.concat([e + "-" + dn, e + "-" + Wn]);
|
|
12024
12029
|
}, []), Ya = /* @__PURE__ */ [].concat(Zn, [Cs]).reduce(function(n, e) {
|
|
12025
12030
|
return n.concat([e, e + "-" + dn, e + "-" + Wn]);
|
|
12026
|
-
}, []),
|
|
12031
|
+
}, []), Hh = "beforeRead", jh = "read", Wh = "afterRead", qh = "beforeMain", Kh = "main", _h = "afterMain", Jh = "beforeWrite", Uh = "write", Gh = "afterWrite", Yh = [Hh, jh, Wh, qh, Kh, _h, Jh, Uh, Gh];
|
|
12027
12032
|
function qe(n) {
|
|
12028
12033
|
return n ? (n.nodeName || "").toLowerCase() : null;
|
|
12029
12034
|
}
|
|
@@ -12050,7 +12055,7 @@ function Os(n) {
|
|
|
12050
12055
|
var e = ke(n).ShadowRoot;
|
|
12051
12056
|
return n instanceof e || n instanceof ShadowRoot;
|
|
12052
12057
|
}
|
|
12053
|
-
function
|
|
12058
|
+
function Xh(n) {
|
|
12054
12059
|
var e = n.state;
|
|
12055
12060
|
Object.keys(e.elements).forEach(function(t) {
|
|
12056
12061
|
var r = e.styles[t] || {}, i = e.attributes[t] || {}, s = e.elements[t];
|
|
@@ -12060,7 +12065,7 @@ function Yh(n) {
|
|
|
12060
12065
|
}));
|
|
12061
12066
|
});
|
|
12062
12067
|
}
|
|
12063
|
-
function
|
|
12068
|
+
function Zh(n) {
|
|
12064
12069
|
var e = n.state, t = {
|
|
12065
12070
|
popper: {
|
|
12066
12071
|
position: e.options.strategy,
|
|
@@ -12088,8 +12093,8 @@ const Xa = {
|
|
|
12088
12093
|
name: "applyStyles",
|
|
12089
12094
|
enabled: !0,
|
|
12090
12095
|
phase: "write",
|
|
12091
|
-
fn:
|
|
12092
|
-
effect:
|
|
12096
|
+
fn: Xh,
|
|
12097
|
+
effect: Zh,
|
|
12093
12098
|
requires: ["computeStyles"]
|
|
12094
12099
|
};
|
|
12095
12100
|
function He(n) {
|
|
@@ -12147,7 +12152,7 @@ function Qa(n, e) {
|
|
|
12147
12152
|
function et(n) {
|
|
12148
12153
|
return ke(n).getComputedStyle(n);
|
|
12149
12154
|
}
|
|
12150
|
-
function
|
|
12155
|
+
function Qh(n) {
|
|
12151
12156
|
return ["table", "td", "th"].indexOf(qe(n)) >= 0;
|
|
12152
12157
|
}
|
|
12153
12158
|
function kt(n) {
|
|
@@ -12172,7 +12177,7 @@ function _o(n) {
|
|
|
12172
12177
|
return !Oe(n) || // https://github.com/popperjs/popper-core/issues/837
|
|
12173
12178
|
et(n).position === "fixed" ? null : n.offsetParent;
|
|
12174
12179
|
}
|
|
12175
|
-
function
|
|
12180
|
+
function em(n) {
|
|
12176
12181
|
var e = /firefox/i.test(Yi()), t = /Trident/i.test(Yi());
|
|
12177
12182
|
if (t && Oe(n)) {
|
|
12178
12183
|
var r = et(n);
|
|
@@ -12189,9 +12194,9 @@ function Qh(n) {
|
|
|
12189
12194
|
return null;
|
|
12190
12195
|
}
|
|
12191
12196
|
function Qn(n) {
|
|
12192
|
-
for (var e = ke(n), t = _o(n); t &&
|
|
12197
|
+
for (var e = ke(n), t = _o(n); t && Qh(t) && et(t).position === "static"; )
|
|
12193
12198
|
t = _o(t);
|
|
12194
|
-
return t && (qe(t) === "html" || qe(t) === "body" && et(t).position === "static") ? e : t ||
|
|
12199
|
+
return t && (qe(t) === "html" || qe(t) === "body" && et(t).position === "static") ? e : t || em(n) || e;
|
|
12195
12200
|
}
|
|
12196
12201
|
function Es(n) {
|
|
12197
12202
|
return ["top", "bottom"].indexOf(n) >= 0 ? "x" : "y";
|
|
@@ -12199,7 +12204,7 @@ function Es(n) {
|
|
|
12199
12204
|
function In(n, e, t) {
|
|
12200
12205
|
return Pt(n, Hr(e, t));
|
|
12201
12206
|
}
|
|
12202
|
-
function
|
|
12207
|
+
function tm(n, e, t) {
|
|
12203
12208
|
var r = In(n, e, t);
|
|
12204
12209
|
return r > t ? t : r;
|
|
12205
12210
|
}
|
|
@@ -12219,41 +12224,41 @@ function nc(n, e) {
|
|
|
12219
12224
|
return t[r] = n, t;
|
|
12220
12225
|
}, {});
|
|
12221
12226
|
}
|
|
12222
|
-
var
|
|
12227
|
+
var nm = function(e, t) {
|
|
12223
12228
|
return e = typeof e == "function" ? e(Object.assign({}, t.rects, {
|
|
12224
12229
|
placement: t.placement
|
|
12225
12230
|
})) : e, tc(typeof e != "number" ? e : nc(e, Zn));
|
|
12226
12231
|
};
|
|
12227
|
-
function
|
|
12232
|
+
function rm(n) {
|
|
12228
12233
|
var e, t = n.state, r = n.name, i = n.options, s = t.elements.arrow, o = t.modifiersData.popperOffsets, l = He(t.placement), a = Es(l), c = [he, Ee].indexOf(l) >= 0, u = c ? "height" : "width";
|
|
12229
12234
|
if (!(!s || !o)) {
|
|
12230
|
-
var d =
|
|
12235
|
+
var d = nm(i.padding, t), f = Ts(s), p = a === "y" ? pe : he, h = a === "y" ? Te : Ee, m = t.rects.reference[u] + t.rects.reference[a] - o[a] - t.rects.popper[u], g = o[a] - t.rects.reference[a], b = Qn(s), w = b ? a === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, M = m / 2 - g / 2, y = d[p], O = w - f[u] - d[h], k = w / 2 - f[u] / 2 + M, I = In(y, k, O), B = a;
|
|
12231
12236
|
t.modifiersData[r] = (e = {}, e[B] = I, e.centerOffset = I - k, e);
|
|
12232
12237
|
}
|
|
12233
12238
|
}
|
|
12234
|
-
function
|
|
12239
|
+
function im(n) {
|
|
12235
12240
|
var e = n.state, t = n.options, r = t.element, i = r === void 0 ? "[data-popper-arrow]" : r;
|
|
12236
12241
|
i != null && (typeof i == "string" && (i = e.elements.popper.querySelector(i), !i) || Qa(e.elements.popper, i) && (e.elements.arrow = i));
|
|
12237
12242
|
}
|
|
12238
|
-
const
|
|
12243
|
+
const sm = {
|
|
12239
12244
|
name: "arrow",
|
|
12240
12245
|
enabled: !0,
|
|
12241
12246
|
phase: "main",
|
|
12242
|
-
fn:
|
|
12243
|
-
effect:
|
|
12247
|
+
fn: rm,
|
|
12248
|
+
effect: im,
|
|
12244
12249
|
requires: ["popperOffsets"],
|
|
12245
12250
|
requiresIfExists: ["preventOverflow"]
|
|
12246
12251
|
};
|
|
12247
12252
|
function hn(n) {
|
|
12248
12253
|
return n.split("-")[1];
|
|
12249
12254
|
}
|
|
12250
|
-
var
|
|
12255
|
+
var om = {
|
|
12251
12256
|
top: "auto",
|
|
12252
12257
|
right: "auto",
|
|
12253
12258
|
bottom: "auto",
|
|
12254
12259
|
left: "auto"
|
|
12255
12260
|
};
|
|
12256
|
-
function
|
|
12261
|
+
function lm(n, e) {
|
|
12257
12262
|
var t = n.x, r = n.y, i = e.devicePixelRatio || 1;
|
|
12258
12263
|
return {
|
|
12259
12264
|
x: fn(t * i) / i || 0,
|
|
@@ -12291,7 +12296,7 @@ function Jo(n) {
|
|
|
12291
12296
|
}
|
|
12292
12297
|
var $ = Object.assign({
|
|
12293
12298
|
position: l
|
|
12294
|
-
}, c &&
|
|
12299
|
+
}, c && om), H = u === !0 ? lm({
|
|
12295
12300
|
x: p,
|
|
12296
12301
|
y: m
|
|
12297
12302
|
}, ke(t)) : {
|
|
@@ -12304,7 +12309,7 @@ function Jo(n) {
|
|
|
12304
12309
|
}
|
|
12305
12310
|
return Object.assign({}, $, (e = {}, e[y] = w ? m + "px" : "", e[M] = b ? p + "px" : "", e.transform = "", e));
|
|
12306
12311
|
}
|
|
12307
|
-
function
|
|
12312
|
+
function am(n) {
|
|
12308
12313
|
var e = n.state, t = n.options, r = t.gpuAcceleration, i = r === void 0 ? !0 : r, s = t.adaptive, o = s === void 0 ? !0 : s, l = t.roundOffsets, a = l === void 0 ? !0 : l, c = {
|
|
12309
12314
|
placement: He(e.placement),
|
|
12310
12315
|
variation: hn(e.placement),
|
|
@@ -12327,17 +12332,17 @@ function lm(n) {
|
|
|
12327
12332
|
"data-popper-placement": e.placement
|
|
12328
12333
|
});
|
|
12329
12334
|
}
|
|
12330
|
-
const
|
|
12335
|
+
const cm = {
|
|
12331
12336
|
name: "computeStyles",
|
|
12332
12337
|
enabled: !0,
|
|
12333
12338
|
phase: "beforeWrite",
|
|
12334
|
-
fn:
|
|
12339
|
+
fn: am,
|
|
12335
12340
|
data: {}
|
|
12336
12341
|
};
|
|
12337
12342
|
var br = {
|
|
12338
12343
|
passive: !0
|
|
12339
12344
|
};
|
|
12340
|
-
function
|
|
12345
|
+
function um(n) {
|
|
12341
12346
|
var e = n.state, t = n.instance, r = n.options, i = r.scroll, s = i === void 0 ? !0 : i, o = r.resize, l = o === void 0 ? !0 : o, a = ke(e.elements.popper), c = [].concat(e.scrollParents.reference, e.scrollParents.popper);
|
|
12342
12347
|
return s && c.forEach(function(u) {
|
|
12343
12348
|
u.addEventListener("scroll", t.update, br);
|
|
@@ -12347,16 +12352,16 @@ function cm(n) {
|
|
|
12347
12352
|
}), l && a.removeEventListener("resize", t.update, br);
|
|
12348
12353
|
};
|
|
12349
12354
|
}
|
|
12350
|
-
const
|
|
12355
|
+
const dm = {
|
|
12351
12356
|
name: "eventListeners",
|
|
12352
12357
|
enabled: !0,
|
|
12353
12358
|
phase: "write",
|
|
12354
12359
|
fn: function() {
|
|
12355
12360
|
},
|
|
12356
|
-
effect:
|
|
12361
|
+
effect: um,
|
|
12357
12362
|
data: {}
|
|
12358
12363
|
};
|
|
12359
|
-
var
|
|
12364
|
+
var fm = {
|
|
12360
12365
|
left: "right",
|
|
12361
12366
|
right: "left",
|
|
12362
12367
|
bottom: "top",
|
|
@@ -12364,16 +12369,16 @@ var dm = {
|
|
|
12364
12369
|
};
|
|
12365
12370
|
function Mr(n) {
|
|
12366
12371
|
return n.replace(/left|right|bottom|top/g, function(e) {
|
|
12367
|
-
return
|
|
12372
|
+
return fm[e];
|
|
12368
12373
|
});
|
|
12369
12374
|
}
|
|
12370
|
-
var
|
|
12375
|
+
var pm = {
|
|
12371
12376
|
start: "end",
|
|
12372
12377
|
end: "start"
|
|
12373
12378
|
};
|
|
12374
12379
|
function Uo(n) {
|
|
12375
12380
|
return n.replace(/start|end/g, function(e) {
|
|
12376
|
-
return
|
|
12381
|
+
return pm[e];
|
|
12377
12382
|
});
|
|
12378
12383
|
}
|
|
12379
12384
|
function As(n) {
|
|
@@ -12386,7 +12391,7 @@ function As(n) {
|
|
|
12386
12391
|
function Ns(n) {
|
|
12387
12392
|
return pn(kt(n)).left + As(n).scrollLeft;
|
|
12388
12393
|
}
|
|
12389
|
-
function
|
|
12394
|
+
function hm(n, e) {
|
|
12390
12395
|
var t = ke(n), r = kt(n), i = t.visualViewport, s = r.clientWidth, o = r.clientHeight, l = 0, a = 0;
|
|
12391
12396
|
if (i) {
|
|
12392
12397
|
s = i.width, o = i.height;
|
|
@@ -12400,7 +12405,7 @@ function pm(n, e) {
|
|
|
12400
12405
|
y: a
|
|
12401
12406
|
};
|
|
12402
12407
|
}
|
|
12403
|
-
function
|
|
12408
|
+
function mm(n) {
|
|
12404
12409
|
var e, t = kt(n), r = As(n), i = (e = n.ownerDocument) == null ? void 0 : e.body, s = Pt(t.scrollWidth, t.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), o = Pt(t.scrollHeight, t.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), l = -r.scrollLeft + Ns(n), a = -r.scrollTop;
|
|
12405
12410
|
return et(i || t).direction === "rtl" && (l += Pt(t.clientWidth, i ? i.clientWidth : 0) - s), {
|
|
12406
12411
|
width: s,
|
|
@@ -12433,21 +12438,21 @@ function Xi(n) {
|
|
|
12433
12438
|
bottom: n.y + n.height
|
|
12434
12439
|
});
|
|
12435
12440
|
}
|
|
12436
|
-
function
|
|
12441
|
+
function gm(n, e) {
|
|
12437
12442
|
var t = pn(n, !1, e === "fixed");
|
|
12438
12443
|
return t.top = t.top + n.clientTop, t.left = t.left + n.clientLeft, t.bottom = t.top + n.clientHeight, t.right = t.left + n.clientWidth, t.width = n.clientWidth, t.height = n.clientHeight, t.x = t.left, t.y = t.top, t;
|
|
12439
12444
|
}
|
|
12440
12445
|
function Go(n, e, t) {
|
|
12441
|
-
return e === Ga ? Xi(
|
|
12446
|
+
return e === Ga ? Xi(hm(n, t)) : Ft(e) ? gm(e, t) : Xi(mm(kt(n)));
|
|
12442
12447
|
}
|
|
12443
|
-
function
|
|
12448
|
+
function ym(n) {
|
|
12444
12449
|
var e = Rn(ri(n)), t = ["absolute", "fixed"].indexOf(et(n).position) >= 0, r = t && Oe(n) ? Qn(n) : n;
|
|
12445
12450
|
return Ft(r) ? e.filter(function(i) {
|
|
12446
12451
|
return Ft(i) && Qa(i, r) && qe(i) !== "body";
|
|
12447
12452
|
}) : [];
|
|
12448
12453
|
}
|
|
12449
|
-
function
|
|
12450
|
-
var i = e === "clippingParents" ?
|
|
12454
|
+
function bm(n, e, t, r) {
|
|
12455
|
+
var i = e === "clippingParents" ? ym(n) : [].concat(e), s = [].concat(i, [t]), o = s[0], l = s.reduce(function(a, c) {
|
|
12451
12456
|
var u = Go(n, c, r);
|
|
12452
12457
|
return a.top = Pt(u.top, a.top), a.right = Hr(u.right, a.right), a.bottom = Hr(u.bottom, a.bottom), a.left = Pt(u.left, a.left), a;
|
|
12453
12458
|
}, Go(n, o, r));
|
|
@@ -12502,7 +12507,7 @@ function ic(n) {
|
|
|
12502
12507
|
}
|
|
12503
12508
|
function qn(n, e) {
|
|
12504
12509
|
e === void 0 && (e = {});
|
|
12505
|
-
var t = e, r = t.placement, i = r === void 0 ? n.placement : r, s = t.strategy, o = s === void 0 ? n.strategy : s, l = t.boundary, a = l === void 0 ?
|
|
12510
|
+
var t = e, r = t.placement, i = r === void 0 ? n.placement : r, s = t.strategy, o = s === void 0 ? n.strategy : s, l = t.boundary, a = l === void 0 ? Fh : l, c = t.rootBoundary, u = c === void 0 ? Ga : c, d = t.elementContext, f = d === void 0 ? Mn : d, p = t.altBoundary, h = p === void 0 ? !1 : p, m = t.padding, g = m === void 0 ? 0 : m, b = tc(typeof g != "number" ? g : nc(g, Zn)), w = f === Mn ? $h : Mn, M = n.rects.popper, y = n.elements[h ? w : f], O = bm(Ft(y) ? y : y.contextElement || kt(n.elements.popper), a, u, o), k = pn(n.elements.reference), I = ic({
|
|
12506
12511
|
reference: k,
|
|
12507
12512
|
element: M,
|
|
12508
12513
|
strategy: "absolute",
|
|
@@ -12522,7 +12527,7 @@ function qn(n, e) {
|
|
|
12522
12527
|
}
|
|
12523
12528
|
return z;
|
|
12524
12529
|
}
|
|
12525
|
-
function
|
|
12530
|
+
function vm(n, e) {
|
|
12526
12531
|
e === void 0 && (e = {});
|
|
12527
12532
|
var t = e, r = t.placement, i = t.boundary, s = t.rootBoundary, o = t.padding, l = t.flipVariations, a = t.allowedAutoPlacements, c = a === void 0 ? Ya : a, u = hn(r), d = u ? l ? Ko : Ko.filter(function(h) {
|
|
12528
12533
|
return hn(h) === u;
|
|
@@ -12542,17 +12547,17 @@ function bm(n, e) {
|
|
|
12542
12547
|
return p[h] - p[m];
|
|
12543
12548
|
});
|
|
12544
12549
|
}
|
|
12545
|
-
function
|
|
12550
|
+
function km(n) {
|
|
12546
12551
|
if (He(n) === Cs)
|
|
12547
12552
|
return [];
|
|
12548
12553
|
var e = Mr(n);
|
|
12549
12554
|
return [Uo(n), e, Uo(e)];
|
|
12550
12555
|
}
|
|
12551
|
-
function
|
|
12556
|
+
function xm(n) {
|
|
12552
12557
|
var e = n.state, t = n.options, r = n.name;
|
|
12553
12558
|
if (!e.modifiersData[r]._skip) {
|
|
12554
|
-
for (var i = t.mainAxis, s = i === void 0 ? !0 : i, o = t.altAxis, l = o === void 0 ? !0 : o, a = t.fallbackPlacements, c = t.padding, u = t.boundary, d = t.rootBoundary, f = t.altBoundary, p = t.flipVariations, h = p === void 0 ? !0 : p, m = t.allowedAutoPlacements, g = e.options.placement, b = He(g), w = b === g, M = a || (w || !h ? [Mr(g)] :
|
|
12555
|
-
return Ke.concat(He(Ne) === Cs ?
|
|
12559
|
+
for (var i = t.mainAxis, s = i === void 0 ? !0 : i, o = t.altAxis, l = o === void 0 ? !0 : o, a = t.fallbackPlacements, c = t.padding, u = t.boundary, d = t.rootBoundary, f = t.altBoundary, p = t.flipVariations, h = p === void 0 ? !0 : p, m = t.allowedAutoPlacements, g = e.options.placement, b = He(g), w = b === g, M = a || (w || !h ? [Mr(g)] : km(g)), y = [g].concat(M).reduce(function(Ke, Ne) {
|
|
12560
|
+
return Ke.concat(He(Ne) === Cs ? vm(e, {
|
|
12556
12561
|
placement: Ne,
|
|
12557
12562
|
boundary: u,
|
|
12558
12563
|
rootBoundary: d,
|
|
@@ -12596,11 +12601,11 @@ function km(n) {
|
|
|
12596
12601
|
e.placement !== E && (e.modifiersData[r]._skip = !0, e.placement = E, e.reset = !0);
|
|
12597
12602
|
}
|
|
12598
12603
|
}
|
|
12599
|
-
const
|
|
12604
|
+
const wm = {
|
|
12600
12605
|
name: "flip",
|
|
12601
12606
|
enabled: !0,
|
|
12602
12607
|
phase: "main",
|
|
12603
|
-
fn:
|
|
12608
|
+
fn: xm,
|
|
12604
12609
|
requiresIfExists: ["offset"],
|
|
12605
12610
|
data: {
|
|
12606
12611
|
_skip: !1
|
|
@@ -12622,7 +12627,7 @@ function Xo(n) {
|
|
|
12622
12627
|
return n[e] >= 0;
|
|
12623
12628
|
});
|
|
12624
12629
|
}
|
|
12625
|
-
function
|
|
12630
|
+
function Sm(n) {
|
|
12626
12631
|
var e = n.state, t = n.name, r = e.rects.reference, i = e.rects.popper, s = e.modifiersData.preventOverflow, o = qn(e, {
|
|
12627
12632
|
elementContext: "reference"
|
|
12628
12633
|
}), l = qn(e, {
|
|
@@ -12638,14 +12643,14 @@ function wm(n) {
|
|
|
12638
12643
|
"data-popper-escaped": d
|
|
12639
12644
|
});
|
|
12640
12645
|
}
|
|
12641
|
-
const
|
|
12646
|
+
const Mm = {
|
|
12642
12647
|
name: "hide",
|
|
12643
12648
|
enabled: !0,
|
|
12644
12649
|
phase: "main",
|
|
12645
12650
|
requiresIfExists: ["preventOverflow"],
|
|
12646
|
-
fn:
|
|
12651
|
+
fn: Sm
|
|
12647
12652
|
};
|
|
12648
|
-
function
|
|
12653
|
+
function Cm(n, e, t) {
|
|
12649
12654
|
var r = He(n), i = [he, pe].indexOf(r) >= 0 ? -1 : 1, s = typeof t == "function" ? t(Object.assign({}, e, {
|
|
12650
12655
|
placement: n
|
|
12651
12656
|
})) : t, o = s[0], l = s[1];
|
|
@@ -12657,20 +12662,20 @@ function Mm(n, e, t) {
|
|
|
12657
12662
|
y: l
|
|
12658
12663
|
};
|
|
12659
12664
|
}
|
|
12660
|
-
function
|
|
12665
|
+
function Om(n) {
|
|
12661
12666
|
var e = n.state, t = n.options, r = n.name, i = t.offset, s = i === void 0 ? [0, 0] : i, o = Ya.reduce(function(u, d) {
|
|
12662
|
-
return u[d] =
|
|
12667
|
+
return u[d] = Cm(d, e.rects, s), u;
|
|
12663
12668
|
}, {}), l = o[e.placement], a = l.x, c = l.y;
|
|
12664
12669
|
e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += a, e.modifiersData.popperOffsets.y += c), e.modifiersData[r] = o;
|
|
12665
12670
|
}
|
|
12666
|
-
const
|
|
12671
|
+
const Tm = {
|
|
12667
12672
|
name: "offset",
|
|
12668
12673
|
enabled: !0,
|
|
12669
12674
|
phase: "main",
|
|
12670
12675
|
requires: ["popperOffsets"],
|
|
12671
|
-
fn:
|
|
12676
|
+
fn: Om
|
|
12672
12677
|
};
|
|
12673
|
-
function
|
|
12678
|
+
function Em(n) {
|
|
12674
12679
|
var e = n.state, t = n.name;
|
|
12675
12680
|
e.modifiersData[t] = ic({
|
|
12676
12681
|
reference: e.rects.reference,
|
|
@@ -12679,23 +12684,23 @@ function Tm(n) {
|
|
|
12679
12684
|
placement: e.placement
|
|
12680
12685
|
});
|
|
12681
12686
|
}
|
|
12682
|
-
const
|
|
12687
|
+
const Am = {
|
|
12683
12688
|
name: "popperOffsets",
|
|
12684
12689
|
enabled: !0,
|
|
12685
12690
|
phase: "read",
|
|
12686
|
-
fn:
|
|
12691
|
+
fn: Em,
|
|
12687
12692
|
data: {}
|
|
12688
12693
|
};
|
|
12689
|
-
function
|
|
12694
|
+
function Nm(n) {
|
|
12690
12695
|
return n === "x" ? "y" : "x";
|
|
12691
12696
|
}
|
|
12692
|
-
function
|
|
12697
|
+
function Dm(n) {
|
|
12693
12698
|
var e = n.state, t = n.options, r = n.name, i = t.mainAxis, s = i === void 0 ? !0 : i, o = t.altAxis, l = o === void 0 ? !1 : o, a = t.boundary, c = t.rootBoundary, u = t.altBoundary, d = t.padding, f = t.tether, p = f === void 0 ? !0 : f, h = t.tetherOffset, m = h === void 0 ? 0 : h, g = qn(e, {
|
|
12694
12699
|
boundary: a,
|
|
12695
12700
|
rootBoundary: c,
|
|
12696
12701
|
padding: d,
|
|
12697
12702
|
altBoundary: u
|
|
12698
|
-
}), b = He(e.placement), w = hn(e.placement), M = !w, y = Es(b), O =
|
|
12703
|
+
}), b = He(e.placement), w = hn(e.placement), M = !w, y = Es(b), O = Nm(y), k = e.modifiersData.popperOffsets, I = e.rects.reference, B = e.rects.popper, E = typeof m == "function" ? m(Object.assign({}, e.rects, {
|
|
12699
12704
|
placement: e.placement
|
|
12700
12705
|
})) : m, z = typeof E == "number" ? {
|
|
12701
12706
|
mainAxis: E,
|
|
@@ -12716,35 +12721,35 @@ function Nm(n) {
|
|
|
12716
12721
|
k[y] = vn, H[y] = vn - ne;
|
|
12717
12722
|
}
|
|
12718
12723
|
if (l) {
|
|
12719
|
-
var kn, rr = y === "x" ? pe : he, ir = y === "x" ? Te : Ee, Ue = k[O], nt = O === "y" ? "height" : "width", xn = Ue + g[rr], St = Ue - g[ir], wn = [pe, he].indexOf(b) !== -1, sr = (kn = $?.[O]) != null ? kn : 0, or = wn ? xn : Ue - I[nt] - B[nt] - sr + z.altAxis, lr = wn ? Ue + I[nt] + B[nt] - sr - z.altAxis : St, ar = p && wn ?
|
|
12724
|
+
var kn, rr = y === "x" ? pe : he, ir = y === "x" ? Te : Ee, Ue = k[O], nt = O === "y" ? "height" : "width", xn = Ue + g[rr], St = Ue - g[ir], wn = [pe, he].indexOf(b) !== -1, sr = (kn = $?.[O]) != null ? kn : 0, or = wn ? xn : Ue - I[nt] - B[nt] - sr + z.altAxis, lr = wn ? Ue + I[nt] + B[nt] - sr - z.altAxis : St, ar = p && wn ? tm(or, Ue, lr) : In(p ? or : xn, Ue, p ? lr : St);
|
|
12720
12725
|
k[O] = ar, H[O] = ar - Ue;
|
|
12721
12726
|
}
|
|
12722
12727
|
e.modifiersData[r] = H;
|
|
12723
12728
|
}
|
|
12724
12729
|
}
|
|
12725
|
-
const
|
|
12730
|
+
const Im = {
|
|
12726
12731
|
name: "preventOverflow",
|
|
12727
12732
|
enabled: !0,
|
|
12728
12733
|
phase: "main",
|
|
12729
|
-
fn:
|
|
12734
|
+
fn: Dm,
|
|
12730
12735
|
requiresIfExists: ["offset"]
|
|
12731
12736
|
};
|
|
12732
|
-
function
|
|
12737
|
+
function Rm(n) {
|
|
12733
12738
|
return {
|
|
12734
12739
|
scrollLeft: n.scrollLeft,
|
|
12735
12740
|
scrollTop: n.scrollTop
|
|
12736
12741
|
};
|
|
12737
12742
|
}
|
|
12738
|
-
function Rm(n) {
|
|
12739
|
-
return n === ke(n) || !Oe(n) ? As(n) : Im(n);
|
|
12740
|
-
}
|
|
12741
12743
|
function Pm(n) {
|
|
12744
|
+
return n === ke(n) || !Oe(n) ? As(n) : Rm(n);
|
|
12745
|
+
}
|
|
12746
|
+
function Bm(n) {
|
|
12742
12747
|
var e = n.getBoundingClientRect(), t = fn(e.width) / n.offsetWidth || 1, r = fn(e.height) / n.offsetHeight || 1;
|
|
12743
12748
|
return t !== 1 || r !== 1;
|
|
12744
12749
|
}
|
|
12745
|
-
function
|
|
12750
|
+
function Lm(n, e, t) {
|
|
12746
12751
|
t === void 0 && (t = !1);
|
|
12747
|
-
var r = Oe(e), i = Oe(e) &&
|
|
12752
|
+
var r = Oe(e), i = Oe(e) && Bm(e), s = kt(e), o = pn(n, i, t), l = {
|
|
12748
12753
|
scrollLeft: 0,
|
|
12749
12754
|
scrollTop: 0
|
|
12750
12755
|
}, a = {
|
|
@@ -12752,14 +12757,14 @@ function Bm(n, e, t) {
|
|
|
12752
12757
|
y: 0
|
|
12753
12758
|
};
|
|
12754
12759
|
return (r || !r && !t) && ((qe(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
12755
|
-
Ds(s)) && (l =
|
|
12760
|
+
Ds(s)) && (l = Pm(e)), Oe(e) ? (a = pn(e, !0), a.x += e.clientLeft, a.y += e.clientTop) : s && (a.x = Ns(s))), {
|
|
12756
12761
|
x: o.left + l.scrollLeft - a.x,
|
|
12757
12762
|
y: o.top + l.scrollTop - a.y,
|
|
12758
12763
|
width: o.width,
|
|
12759
12764
|
height: o.height
|
|
12760
12765
|
};
|
|
12761
12766
|
}
|
|
12762
|
-
function
|
|
12767
|
+
function zm(n) {
|
|
12763
12768
|
var e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), r = [];
|
|
12764
12769
|
n.forEach(function(s) {
|
|
12765
12770
|
e.set(s.name, s);
|
|
@@ -12778,15 +12783,15 @@ function Lm(n) {
|
|
|
12778
12783
|
t.has(s.name) || i(s);
|
|
12779
12784
|
}), r;
|
|
12780
12785
|
}
|
|
12781
|
-
function
|
|
12782
|
-
var e =
|
|
12783
|
-
return
|
|
12786
|
+
function Vm(n) {
|
|
12787
|
+
var e = zm(n);
|
|
12788
|
+
return Yh.reduce(function(t, r) {
|
|
12784
12789
|
return t.concat(e.filter(function(i) {
|
|
12785
12790
|
return i.phase === r;
|
|
12786
12791
|
}));
|
|
12787
12792
|
}, []);
|
|
12788
12793
|
}
|
|
12789
|
-
function
|
|
12794
|
+
function Fm(n) {
|
|
12790
12795
|
var e;
|
|
12791
12796
|
return function() {
|
|
12792
12797
|
return e || (e = new Promise(function(t) {
|
|
@@ -12796,7 +12801,7 @@ function Vm(n) {
|
|
|
12796
12801
|
})), e;
|
|
12797
12802
|
};
|
|
12798
12803
|
}
|
|
12799
|
-
function
|
|
12804
|
+
function $m(n) {
|
|
12800
12805
|
var e = n.reduce(function(t, r) {
|
|
12801
12806
|
var i = t[r.name];
|
|
12802
12807
|
return t[r.name] = i ? Object.assign({}, i, r, {
|
|
@@ -12820,7 +12825,7 @@ function Qo() {
|
|
|
12820
12825
|
return !(r && typeof r.getBoundingClientRect == "function");
|
|
12821
12826
|
});
|
|
12822
12827
|
}
|
|
12823
|
-
function
|
|
12828
|
+
function Hm(n) {
|
|
12824
12829
|
n === void 0 && (n = {});
|
|
12825
12830
|
var e = n, t = e.defaultModifiers, r = t === void 0 ? [] : t, i = e.defaultOptions, s = i === void 0 ? Zo : i;
|
|
12826
12831
|
return function(l, a, c) {
|
|
@@ -12844,7 +12849,7 @@ function $m(n) {
|
|
|
12844
12849
|
reference: Ft(l) ? Rn(l) : l.contextElement ? Rn(l.contextElement) : [],
|
|
12845
12850
|
popper: Rn(a)
|
|
12846
12851
|
};
|
|
12847
|
-
var M =
|
|
12852
|
+
var M = Vm($m([].concat(r, u.options.modifiers)));
|
|
12848
12853
|
return u.orderedModifiers = M.filter(function(y) {
|
|
12849
12854
|
return y.enabled;
|
|
12850
12855
|
}), h(), p.update();
|
|
@@ -12859,7 +12864,7 @@ function $m(n) {
|
|
|
12859
12864
|
var b = u.elements, w = b.reference, M = b.popper;
|
|
12860
12865
|
if (Qo(w, M)) {
|
|
12861
12866
|
u.rects = {
|
|
12862
|
-
reference:
|
|
12867
|
+
reference: Lm(w, Qn(M), u.options.strategy === "fixed"),
|
|
12863
12868
|
popper: Ts(M)
|
|
12864
12869
|
}, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(z) {
|
|
12865
12870
|
return u.modifiersData[z.name] = Object.assign({}, z.data);
|
|
@@ -12882,7 +12887,7 @@ function $m(n) {
|
|
|
12882
12887
|
},
|
|
12883
12888
|
// Async and optimistically optimized update – it will not be executed if
|
|
12884
12889
|
// not necessary (debounced to run at most once-per-tick)
|
|
12885
|
-
update:
|
|
12890
|
+
update: Fm(function() {
|
|
12886
12891
|
return new Promise(function(g) {
|
|
12887
12892
|
p.forceUpdate(), g(u);
|
|
12888
12893
|
});
|
|
@@ -12919,15 +12924,15 @@ function $m(n) {
|
|
|
12919
12924
|
return p;
|
|
12920
12925
|
};
|
|
12921
12926
|
}
|
|
12922
|
-
var
|
|
12923
|
-
defaultModifiers:
|
|
12924
|
-
}),
|
|
12927
|
+
var jm = [dm, Am, cm, Xa, Tm, wm, Im, sm, Mm], Wm = /* @__PURE__ */ Hm({
|
|
12928
|
+
defaultModifiers: jm
|
|
12929
|
+
}), qm = "tippy-box", sc = "tippy-content", Km = "tippy-backdrop", oc = "tippy-arrow", lc = "tippy-svg-arrow", Ct = {
|
|
12925
12930
|
passive: !0,
|
|
12926
12931
|
capture: !0
|
|
12927
12932
|
}, ac = function() {
|
|
12928
12933
|
return document.body;
|
|
12929
12934
|
};
|
|
12930
|
-
function
|
|
12935
|
+
function _m(n, e) {
|
|
12931
12936
|
return {}.hasOwnProperty.call(n, e);
|
|
12932
12937
|
}
|
|
12933
12938
|
function Mi(n, e, t) {
|
|
@@ -12954,13 +12959,13 @@ function el(n, e) {
|
|
|
12954
12959
|
}, e);
|
|
12955
12960
|
};
|
|
12956
12961
|
}
|
|
12957
|
-
function
|
|
12962
|
+
function Jm(n, e) {
|
|
12958
12963
|
var t = Object.assign({}, n);
|
|
12959
12964
|
return e.forEach(function(r) {
|
|
12960
12965
|
delete t[r];
|
|
12961
12966
|
}), t;
|
|
12962
12967
|
}
|
|
12963
|
-
function
|
|
12968
|
+
function Um(n) {
|
|
12964
12969
|
return n.split(/\s+/).filter(Boolean);
|
|
12965
12970
|
}
|
|
12966
12971
|
function Xt(n) {
|
|
@@ -12969,12 +12974,12 @@ function Xt(n) {
|
|
|
12969
12974
|
function tl(n, e) {
|
|
12970
12975
|
n.indexOf(e) === -1 && n.push(e);
|
|
12971
12976
|
}
|
|
12972
|
-
function
|
|
12977
|
+
function Gm(n) {
|
|
12973
12978
|
return n.filter(function(e, t) {
|
|
12974
12979
|
return n.indexOf(e) === t;
|
|
12975
12980
|
});
|
|
12976
12981
|
}
|
|
12977
|
-
function
|
|
12982
|
+
function Ym(n) {
|
|
12978
12983
|
return n.split("-")[0];
|
|
12979
12984
|
}
|
|
12980
12985
|
function jr(n) {
|
|
@@ -12993,17 +12998,17 @@ function Kn(n) {
|
|
|
12993
12998
|
return Is(n, e);
|
|
12994
12999
|
});
|
|
12995
13000
|
}
|
|
12996
|
-
function
|
|
13001
|
+
function Xm(n) {
|
|
12997
13002
|
return Is(n, "NodeList");
|
|
12998
13003
|
}
|
|
12999
|
-
function
|
|
13004
|
+
function Zm(n) {
|
|
13000
13005
|
return Is(n, "MouseEvent");
|
|
13001
13006
|
}
|
|
13002
|
-
function
|
|
13007
|
+
function Qm(n) {
|
|
13003
13008
|
return !!(n && n._tippy && n._tippy.reference === n);
|
|
13004
13009
|
}
|
|
13005
|
-
function
|
|
13006
|
-
return Kn(n) ? [n] :
|
|
13010
|
+
function eg(n) {
|
|
13011
|
+
return Kn(n) ? [n] : Xm(n) ? jr(n) : Array.isArray(n) ? n : jr(document.querySelectorAll(n));
|
|
13007
13012
|
}
|
|
13008
13013
|
function Ci(n, e) {
|
|
13009
13014
|
n.forEach(function(t) {
|
|
@@ -13015,14 +13020,14 @@ function rl(n, e) {
|
|
|
13015
13020
|
t && t.setAttribute("data-state", e);
|
|
13016
13021
|
});
|
|
13017
13022
|
}
|
|
13018
|
-
function
|
|
13023
|
+
function tg(n) {
|
|
13019
13024
|
var e, t = Xt(n), r = t[0];
|
|
13020
13025
|
return r != null && (e = r.ownerDocument) != null && e.body ? r.ownerDocument : document;
|
|
13021
13026
|
}
|
|
13022
|
-
function
|
|
13027
|
+
function ng(n, e) {
|
|
13023
13028
|
var t = e.clientX, r = e.clientY;
|
|
13024
13029
|
return n.every(function(i) {
|
|
13025
|
-
var s = i.popperRect, o = i.popperState, l = i.props, a = l.interactiveBorder, c =
|
|
13030
|
+
var s = i.popperRect, o = i.popperState, l = i.props, a = l.interactiveBorder, c = Ym(o.placement), u = o.modifiersData.offset;
|
|
13026
13031
|
if (!u)
|
|
13027
13032
|
return !0;
|
|
13028
13033
|
var d = c === "bottom" ? u.top.y : 0, f = c === "top" ? u.bottom.y : 0, p = c === "right" ? u.left.x : 0, h = c === "left" ? u.right.x : 0, m = s.top - r + d > a, g = r - s.bottom - f > a, b = s.left - t + p > a, w = t - s.right - h > a;
|
|
@@ -13047,24 +13052,24 @@ function il(n, e) {
|
|
|
13047
13052
|
var Fe = {
|
|
13048
13053
|
isTouch: !1
|
|
13049
13054
|
}, sl = 0;
|
|
13050
|
-
function
|
|
13055
|
+
function rg() {
|
|
13051
13056
|
Fe.isTouch || (Fe.isTouch = !0, window.performance && document.addEventListener("mousemove", uc));
|
|
13052
13057
|
}
|
|
13053
13058
|
function uc() {
|
|
13054
13059
|
var n = performance.now();
|
|
13055
13060
|
n - sl < 20 && (Fe.isTouch = !1, document.removeEventListener("mousemove", uc)), sl = n;
|
|
13056
13061
|
}
|
|
13057
|
-
function
|
|
13062
|
+
function ig() {
|
|
13058
13063
|
var n = document.activeElement;
|
|
13059
|
-
if (
|
|
13064
|
+
if (Qm(n)) {
|
|
13060
13065
|
var e = n._tippy;
|
|
13061
13066
|
n.blur && !e.state.isVisible && n.blur();
|
|
13062
13067
|
}
|
|
13063
13068
|
}
|
|
13064
|
-
function
|
|
13065
|
-
document.addEventListener("touchstart",
|
|
13069
|
+
function sg() {
|
|
13070
|
+
document.addEventListener("touchstart", rg, Ct), window.addEventListener("blur", ig);
|
|
13066
13071
|
}
|
|
13067
|
-
var
|
|
13072
|
+
var og = typeof window < "u" && typeof document < "u", lg = og ? (
|
|
13068
13073
|
// @ts-ignore
|
|
13069
13074
|
!!window.msCrypto
|
|
13070
13075
|
) : !1;
|
|
@@ -13076,7 +13081,7 @@ function ol(n) {
|
|
|
13076
13081
|
var e = /[ \t]{2,}/g, t = /^[ \t]*/gm;
|
|
13077
13082
|
return n.replace(e, " ").replace(t, "").trim();
|
|
13078
13083
|
}
|
|
13079
|
-
function
|
|
13084
|
+
function ag(n) {
|
|
13080
13085
|
return ol(`
|
|
13081
13086
|
%ctippy.js
|
|
13082
13087
|
|
|
@@ -13087,7 +13092,7 @@ function lg(n) {
|
|
|
13087
13092
|
}
|
|
13088
13093
|
function dc(n) {
|
|
13089
13094
|
return [
|
|
13090
|
-
|
|
13095
|
+
ag(n),
|
|
13091
13096
|
// title
|
|
13092
13097
|
"color: #00C584; font-size: 1.3em; font-weight: bold;",
|
|
13093
13098
|
// message
|
|
@@ -13097,8 +13102,8 @@ function dc(n) {
|
|
|
13097
13102
|
];
|
|
13098
13103
|
}
|
|
13099
13104
|
var _n;
|
|
13100
|
-
process.env.NODE_ENV !== "production" &&
|
|
13101
|
-
function
|
|
13105
|
+
process.env.NODE_ENV !== "production" && cg();
|
|
13106
|
+
function cg() {
|
|
13102
13107
|
_n = /* @__PURE__ */ new Set();
|
|
13103
13108
|
}
|
|
13104
13109
|
function Xe(n, e) {
|
|
@@ -13113,7 +13118,7 @@ function Zi(n, e) {
|
|
|
13113
13118
|
_n.add(e), (t = console).error.apply(t, dc(e));
|
|
13114
13119
|
}
|
|
13115
13120
|
}
|
|
13116
|
-
function
|
|
13121
|
+
function ug(n) {
|
|
13117
13122
|
var e = !n, t = Object.prototype.toString.call(n) === "[object Object]" && !n.addEventListener;
|
|
13118
13123
|
Zi(e, ["tippy() was passed", "`" + String(n) + "`", "as its targets (first) argument. Valid types are: String, Element,", "Element[], or NodeList."].join(" ")), Zi(t, ["tippy() was passed a plain object which is not supported as an argument", "for virtual positioning. Use props.getReferenceClientRect instead."].join(" "));
|
|
13119
13124
|
}
|
|
@@ -13122,7 +13127,7 @@ var fc = {
|
|
|
13122
13127
|
followCursor: !1,
|
|
13123
13128
|
inlinePositioning: !1,
|
|
13124
13129
|
sticky: !1
|
|
13125
|
-
},
|
|
13130
|
+
}, dg = {
|
|
13126
13131
|
allowHTML: !1,
|
|
13127
13132
|
animation: "fade",
|
|
13128
13133
|
arrow: !0,
|
|
@@ -13180,7 +13185,7 @@ var fc = {
|
|
|
13180
13185
|
touch: !0,
|
|
13181
13186
|
trigger: "mouseenter focus",
|
|
13182
13187
|
triggerTarget: null
|
|
13183
|
-
}, fc,
|
|
13188
|
+
}, fc, dg), fg = Object.keys(ve), pg = function(e) {
|
|
13184
13189
|
process.env.NODE_ENV !== "production" && hc(e, []);
|
|
13185
13190
|
var t = Object.keys(e);
|
|
13186
13191
|
t.forEach(function(r) {
|
|
@@ -13198,10 +13203,10 @@ function pc(n) {
|
|
|
13198
13203
|
}, {});
|
|
13199
13204
|
return Object.assign({}, n, t);
|
|
13200
13205
|
}
|
|
13201
|
-
function
|
|
13206
|
+
function hg(n, e) {
|
|
13202
13207
|
var t = e ? Object.keys(pc(Object.assign({}, ve, {
|
|
13203
13208
|
plugins: e
|
|
13204
|
-
}))) :
|
|
13209
|
+
}))) : fg, r = t.reduce(function(i, s) {
|
|
13205
13210
|
var o = (n.getAttribute("data-tippy-" + s) || "").trim();
|
|
13206
13211
|
if (!o)
|
|
13207
13212
|
return i;
|
|
@@ -13220,7 +13225,7 @@ function pg(n, e) {
|
|
|
13220
13225
|
function ll(n, e) {
|
|
13221
13226
|
var t = Object.assign({}, e, {
|
|
13222
13227
|
content: cc(e.content, [n])
|
|
13223
|
-
}, e.ignoreAttributes ? {} :
|
|
13228
|
+
}, e.ignoreAttributes ? {} : hg(n, e.plugins));
|
|
13224
13229
|
return t.aria = Object.assign({}, ve.aria, t.aria), t.aria = {
|
|
13225
13230
|
expanded: t.aria.expanded === "auto" ? e.interactive : t.aria.expanded,
|
|
13226
13231
|
content: t.aria.content === "auto" ? e.interactive ? null : "describedby" : t.aria.content
|
|
@@ -13230,7 +13235,7 @@ function hc(n, e) {
|
|
|
13230
13235
|
n === void 0 && (n = {}), e === void 0 && (e = []);
|
|
13231
13236
|
var t = Object.keys(n);
|
|
13232
13237
|
t.forEach(function(r) {
|
|
13233
|
-
var i =
|
|
13238
|
+
var i = Jm(ve, Object.keys(fc)), s = !_m(i, r);
|
|
13234
13239
|
s && (s = e.filter(function(o) {
|
|
13235
13240
|
return o.name === r;
|
|
13236
13241
|
}).length === 0), Xe(s, ["`" + r + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
|
|
@@ -13239,11 +13244,11 @@ function hc(n, e) {
|
|
|
13239
13244
|
`, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
|
|
13240
13245
|
});
|
|
13241
13246
|
}
|
|
13242
|
-
var
|
|
13247
|
+
var mg = function() {
|
|
13243
13248
|
return "innerHTML";
|
|
13244
13249
|
};
|
|
13245
13250
|
function Qi(n, e) {
|
|
13246
|
-
n[
|
|
13251
|
+
n[mg()] = e;
|
|
13247
13252
|
}
|
|
13248
13253
|
function al(n) {
|
|
13249
13254
|
var e = Pn();
|
|
@@ -13263,13 +13268,13 @@ function es(n) {
|
|
|
13263
13268
|
return r.classList.contains(oc) || r.classList.contains(lc);
|
|
13264
13269
|
}),
|
|
13265
13270
|
backdrop: t.find(function(r) {
|
|
13266
|
-
return r.classList.contains(
|
|
13271
|
+
return r.classList.contains(Km);
|
|
13267
13272
|
})
|
|
13268
13273
|
};
|
|
13269
13274
|
}
|
|
13270
13275
|
function mc(n) {
|
|
13271
13276
|
var e = Pn(), t = Pn();
|
|
13272
|
-
t.className =
|
|
13277
|
+
t.className = qm, t.setAttribute("data-state", "hidden"), t.setAttribute("tabindex", "-1");
|
|
13273
13278
|
var r = Pn();
|
|
13274
13279
|
r.className = sc, r.setAttribute("data-state", "hidden"), cl(r, n.props), e.appendChild(t), t.appendChild(r), i(n.props, n.props);
|
|
13275
13280
|
function i(s, o) {
|
|
@@ -13282,9 +13287,9 @@ function mc(n) {
|
|
|
13282
13287
|
};
|
|
13283
13288
|
}
|
|
13284
13289
|
mc.$$tippy = !0;
|
|
13285
|
-
var
|
|
13286
|
-
function
|
|
13287
|
-
var t = ll(n, Object.assign({}, ve, pc(nl(e)))), r, i, s, o = !1, l = !1, a = !1, c = !1, u, d, f, p = [], h = el(tr, t.interactiveDebounce), m, g =
|
|
13290
|
+
var gg = 1, vr = [], Ti = [];
|
|
13291
|
+
function yg(n, e) {
|
|
13292
|
+
var t = ll(n, Object.assign({}, ve, pc(nl(e)))), r, i, s, o = !1, l = !1, a = !1, c = !1, u, d, f, p = [], h = el(tr, t.interactiveDebounce), m, g = gg++, b = null, w = Gm(t.plugins), M = {
|
|
13288
13293
|
// Is the instance currently enabled?
|
|
13289
13294
|
isEnabled: !0,
|
|
13290
13295
|
// Is the tippy currently showing and not transitioning out?
|
|
@@ -13344,7 +13349,7 @@ function gg(n, e) {
|
|
|
13344
13349
|
}
|
|
13345
13350
|
function ge() {
|
|
13346
13351
|
var v = j().parentNode;
|
|
13347
|
-
return v ?
|
|
13352
|
+
return v ? tg(v) : document;
|
|
13348
13353
|
}
|
|
13349
13354
|
function ye() {
|
|
13350
13355
|
return es(k);
|
|
@@ -13456,14 +13461,14 @@ function gg(n, e) {
|
|
|
13456
13461
|
passive: !0
|
|
13457
13462
|
}), tt("touchend", nr, {
|
|
13458
13463
|
passive: !0
|
|
13459
|
-
})),
|
|
13464
|
+
})), Um(y.props.trigger).forEach(function(v) {
|
|
13460
13465
|
if (v !== "manual")
|
|
13461
13466
|
switch (tt(v, bn), v) {
|
|
13462
13467
|
case "mouseenter":
|
|
13463
13468
|
tt("mouseleave", nr);
|
|
13464
13469
|
break;
|
|
13465
13470
|
case "focus":
|
|
13466
|
-
tt(
|
|
13471
|
+
tt(lg ? "focusout" : "blur", vn);
|
|
13467
13472
|
break;
|
|
13468
13473
|
case "focusin":
|
|
13469
13474
|
tt("focusout", vn);
|
|
@@ -13481,7 +13486,7 @@ function gg(n, e) {
|
|
|
13481
13486
|
var T, N = !1;
|
|
13482
13487
|
if (!(!y.state.isEnabled || kn(v) || l)) {
|
|
13483
13488
|
var V = ((T = u) == null ? void 0 : T.type) === "focus";
|
|
13484
|
-
u = v, m = v.currentTarget, Le(), !y.state.isVisible &&
|
|
13489
|
+
u = v, m = v.currentTarget, Le(), !y.state.isVisible && Zm(v) && vr.forEach(function(L) {
|
|
13485
13490
|
return L(v);
|
|
13486
13491
|
}), v.type === "click" && (y.props.trigger.indexOf("mouseenter") < 0 || o) && y.props.hideOnClick !== !1 && y.state.isVisible ? N = !0 : xn(v), v.type === "click" && (o = !N), N && !V && St(v);
|
|
13487
13492
|
}
|
|
@@ -13497,7 +13502,7 @@ function gg(n, e) {
|
|
|
13497
13502
|
props: t
|
|
13498
13503
|
} : null;
|
|
13499
13504
|
}).filter(Boolean);
|
|
13500
|
-
|
|
13505
|
+
ng(V, v) && (xt(), St(v));
|
|
13501
13506
|
}
|
|
13502
13507
|
}
|
|
13503
13508
|
function nr(v) {
|
|
@@ -13567,7 +13572,7 @@ function gg(n, e) {
|
|
|
13567
13572
|
element: xe,
|
|
13568
13573
|
padding: 3
|
|
13569
13574
|
}
|
|
13570
|
-
}), Mt.push.apply(Mt, T?.modifiers || []), y.popperInstance =
|
|
13575
|
+
}), Mt.push.apply(Mt, T?.modifiers || []), y.popperInstance = Wm(qt, k, Object.assign({}, T, {
|
|
13571
13576
|
placement: N,
|
|
13572
13577
|
onFirstUpdate: f,
|
|
13573
13578
|
modifiers: Mt
|
|
@@ -13687,10 +13692,10 @@ function gg(n, e) {
|
|
|
13687
13692
|
function yn(n, e) {
|
|
13688
13693
|
e === void 0 && (e = {});
|
|
13689
13694
|
var t = ve.plugins.concat(e.plugins || []);
|
|
13690
|
-
process.env.NODE_ENV !== "production" && (
|
|
13695
|
+
process.env.NODE_ENV !== "production" && (ug(n), hc(e, t)), sg();
|
|
13691
13696
|
var r = Object.assign({}, e, {
|
|
13692
13697
|
plugins: t
|
|
13693
|
-
}), i =
|
|
13698
|
+
}), i = eg(n);
|
|
13694
13699
|
if (process.env.NODE_ENV !== "production") {
|
|
13695
13700
|
var s = Kn(r.content), o = i.length > 1;
|
|
13696
13701
|
Xe(s && o, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
|
|
@@ -13701,13 +13706,13 @@ function yn(n, e) {
|
|
|
13701
13706
|
`, "2) content: () => element.cloneNode(true)"].join(" "));
|
|
13702
13707
|
}
|
|
13703
13708
|
var l = i.reduce(function(a, c) {
|
|
13704
|
-
var u = c &&
|
|
13709
|
+
var u = c && yg(c, r);
|
|
13705
13710
|
return u && a.push(u), a;
|
|
13706
13711
|
}, []);
|
|
13707
13712
|
return Kn(n) ? l[0] : l;
|
|
13708
13713
|
}
|
|
13709
13714
|
yn.defaultProps = ve;
|
|
13710
|
-
yn.setDefaultProps =
|
|
13715
|
+
yn.setDefaultProps = pg;
|
|
13711
13716
|
yn.currentInput = Fe;
|
|
13712
13717
|
Object.assign({}, Xa, {
|
|
13713
13718
|
effect: function(e) {
|
|
@@ -13729,7 +13734,7 @@ Object.assign({}, Xa, {
|
|
|
13729
13734
|
yn.setDefaultProps({
|
|
13730
13735
|
render: mc
|
|
13731
13736
|
});
|
|
13732
|
-
class
|
|
13737
|
+
class bg {
|
|
13733
13738
|
constructor({ editor: e, element: t, view: r, tippyOptions: i = {}, updateDelay: s = 250, shouldShow: o }) {
|
|
13734
13739
|
this.preventHide = !1, this.shouldShow = ({ view: l, state: a, from: c, to: u }) => {
|
|
13735
13740
|
const { doc: d, selection: f } = a, { empty: p } = f, h = !d.textBetween(c, u).length && xs(a.selection), m = this.element.contains(document.activeElement);
|
|
@@ -13825,7 +13830,7 @@ class yg {
|
|
|
13825
13830
|
}
|
|
13826
13831
|
const gc = (n) => new oe({
|
|
13827
13832
|
key: typeof n.pluginKey == "string" ? new Ae(n.pluginKey) : n.pluginKey,
|
|
13828
|
-
view: (e) => new
|
|
13833
|
+
view: (e) => new bg({ view: e, ...n })
|
|
13829
13834
|
});
|
|
13830
13835
|
ee.create({
|
|
13831
13836
|
name: "bubbleMenu",
|
|
@@ -13851,7 +13856,7 @@ ee.create({
|
|
|
13851
13856
|
] : [];
|
|
13852
13857
|
}
|
|
13853
13858
|
});
|
|
13854
|
-
class
|
|
13859
|
+
class vg {
|
|
13855
13860
|
constructor({ editor: e, element: t, view: r, tippyOptions: i = {}, shouldShow: s }) {
|
|
13856
13861
|
this.preventHide = !1, this.shouldShow = ({ view: o, state: l }) => {
|
|
13857
13862
|
const { selection: a } = l, { $anchor: c, empty: u } = a, d = c.depth === 1, f = c.parent.isTextblock && !c.parent.type.spec.code && !c.parent.textContent;
|
|
@@ -13917,7 +13922,7 @@ class bg {
|
|
|
13917
13922
|
}
|
|
13918
13923
|
const yc = (n) => new oe({
|
|
13919
13924
|
key: typeof n.pluginKey == "string" ? new Ae(n.pluginKey) : n.pluginKey,
|
|
13920
|
-
view: (e) => new
|
|
13925
|
+
view: (e) => new vg({ view: e, ...n })
|
|
13921
13926
|
});
|
|
13922
13927
|
ee.create({
|
|
13923
13928
|
name: "floatingMenu",
|
|
@@ -14000,7 +14005,7 @@ function ul(n) {
|
|
|
14000
14005
|
}
|
|
14001
14006
|
}));
|
|
14002
14007
|
}
|
|
14003
|
-
class
|
|
14008
|
+
class kg extends zh {
|
|
14004
14009
|
constructor(e = {}) {
|
|
14005
14010
|
return super(e), this.contentComponent = null, this.appContext = null, this.reactiveState = ul(this.view.state), this.reactiveExtensionStorage = ul(this.extensionStorage), this.on("beforeTransaction", ({ nextState: t }) => {
|
|
14006
14011
|
this.reactiveState.value = t, this.reactiveExtensionStorage.value = this.extensionStorage;
|
|
@@ -14027,7 +14032,7 @@ class vg extends Lh {
|
|
|
14027
14032
|
return this.reactiveState && t && (this.reactiveState.value = t), t;
|
|
14028
14033
|
}
|
|
14029
14034
|
}
|
|
14030
|
-
const
|
|
14035
|
+
const xg = mn({
|
|
14031
14036
|
name: "EditorContent",
|
|
14032
14037
|
props: {
|
|
14033
14038
|
editor: {
|
|
@@ -14148,16 +14153,16 @@ mn({
|
|
|
14148
14153
|
}, (e = (n = this.$slots).default) === null || e === void 0 ? void 0 : e.call(n));
|
|
14149
14154
|
}
|
|
14150
14155
|
});
|
|
14151
|
-
const
|
|
14156
|
+
const wg = (n = {}) => {
|
|
14152
14157
|
const e = Dc();
|
|
14153
14158
|
return ns(() => {
|
|
14154
|
-
e.value = new
|
|
14159
|
+
e.value = new kg(n);
|
|
14155
14160
|
}), Jn(() => {
|
|
14156
14161
|
var t, r, i;
|
|
14157
14162
|
const s = (t = e.value) === null || t === void 0 ? void 0 : t.options.element, o = s?.cloneNode(!0);
|
|
14158
14163
|
(r = s?.parentNode) === null || r === void 0 || r.replaceChild(o, s), (i = e.value) === null || i === void 0 || i.destroy();
|
|
14159
14164
|
}), e;
|
|
14160
|
-
},
|
|
14165
|
+
}, Sg = /^\s*>\s$/, Mg = me.create({
|
|
14161
14166
|
name: "blockquote",
|
|
14162
14167
|
addOptions() {
|
|
14163
14168
|
return {
|
|
@@ -14190,12 +14195,12 @@ const xg = (n = {}) => {
|
|
|
14190
14195
|
addInputRules() {
|
|
14191
14196
|
return [
|
|
14192
14197
|
jn({
|
|
14193
|
-
find:
|
|
14198
|
+
find: Sg,
|
|
14194
14199
|
type: this.type
|
|
14195
14200
|
})
|
|
14196
14201
|
];
|
|
14197
14202
|
}
|
|
14198
|
-
}),
|
|
14203
|
+
}), Cg = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Og = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, Tg = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, Eg = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Ag = gt.create({
|
|
14199
14204
|
name: "bold",
|
|
14200
14205
|
addOptions() {
|
|
14201
14206
|
return {
|
|
@@ -14240,11 +14245,11 @@ const xg = (n = {}) => {
|
|
|
14240
14245
|
addInputRules() {
|
|
14241
14246
|
return [
|
|
14242
14247
|
cn({
|
|
14243
|
-
find:
|
|
14248
|
+
find: Cg,
|
|
14244
14249
|
type: this.type
|
|
14245
14250
|
}),
|
|
14246
14251
|
cn({
|
|
14247
|
-
find:
|
|
14252
|
+
find: Tg,
|
|
14248
14253
|
type: this.type
|
|
14249
14254
|
})
|
|
14250
14255
|
];
|
|
@@ -14252,16 +14257,16 @@ const xg = (n = {}) => {
|
|
|
14252
14257
|
addPasteRules() {
|
|
14253
14258
|
return [
|
|
14254
14259
|
un({
|
|
14255
|
-
find:
|
|
14260
|
+
find: Og,
|
|
14256
14261
|
type: this.type
|
|
14257
14262
|
}),
|
|
14258
14263
|
un({
|
|
14259
|
-
find:
|
|
14264
|
+
find: Eg,
|
|
14260
14265
|
type: this.type
|
|
14261
14266
|
})
|
|
14262
14267
|
];
|
|
14263
14268
|
}
|
|
14264
|
-
}),
|
|
14269
|
+
}), Ng = "listItem", dl = "textStyle", fl = /^\s*([-+*])\s$/, Dg = me.create({
|
|
14265
14270
|
name: "bulletList",
|
|
14266
14271
|
addOptions() {
|
|
14267
14272
|
return {
|
|
@@ -14285,7 +14290,7 @@ const xg = (n = {}) => {
|
|
|
14285
14290
|
},
|
|
14286
14291
|
addCommands() {
|
|
14287
14292
|
return {
|
|
14288
|
-
toggleBulletList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
14293
|
+
toggleBulletList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Ng, this.editor.getAttributes(dl)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
|
|
14289
14294
|
};
|
|
14290
14295
|
},
|
|
14291
14296
|
addKeyboardShortcuts() {
|
|
@@ -14309,7 +14314,7 @@ const xg = (n = {}) => {
|
|
|
14309
14314
|
n
|
|
14310
14315
|
];
|
|
14311
14316
|
}
|
|
14312
|
-
}),
|
|
14317
|
+
}), Ig = /(?<!`)`([^`]+)`(?!`)/, Rg = /(?<!`)`([^`]+)`(?!`)/g, Pg = gt.create({
|
|
14313
14318
|
name: "code",
|
|
14314
14319
|
addOptions() {
|
|
14315
14320
|
return {
|
|
@@ -14342,7 +14347,7 @@ const xg = (n = {}) => {
|
|
|
14342
14347
|
addInputRules() {
|
|
14343
14348
|
return [
|
|
14344
14349
|
cn({
|
|
14345
|
-
find:
|
|
14350
|
+
find: Ig,
|
|
14346
14351
|
type: this.type
|
|
14347
14352
|
})
|
|
14348
14353
|
];
|
|
@@ -14350,12 +14355,12 @@ const xg = (n = {}) => {
|
|
|
14350
14355
|
addPasteRules() {
|
|
14351
14356
|
return [
|
|
14352
14357
|
un({
|
|
14353
|
-
find:
|
|
14358
|
+
find: Rg,
|
|
14354
14359
|
type: this.type
|
|
14355
14360
|
})
|
|
14356
14361
|
];
|
|
14357
14362
|
}
|
|
14358
|
-
}),
|
|
14363
|
+
}), Bg = /^```([a-z]+)?[\s\n]$/, Lg = /^~~~([a-z]+)?[\s\n]$/, zg = me.create({
|
|
14359
14364
|
name: "codeBlock",
|
|
14360
14365
|
addOptions() {
|
|
14361
14366
|
return {
|
|
@@ -14446,14 +14451,14 @@ const xg = (n = {}) => {
|
|
|
14446
14451
|
addInputRules() {
|
|
14447
14452
|
return [
|
|
14448
14453
|
Gi({
|
|
14449
|
-
find:
|
|
14454
|
+
find: Bg,
|
|
14450
14455
|
type: this.type,
|
|
14451
14456
|
getAttributes: (n) => ({
|
|
14452
14457
|
language: n[1]
|
|
14453
14458
|
})
|
|
14454
14459
|
}),
|
|
14455
14460
|
Gi({
|
|
14456
|
-
find:
|
|
14461
|
+
find: Lg,
|
|
14457
14462
|
type: this.type,
|
|
14458
14463
|
getAttributes: (n) => ({
|
|
14459
14464
|
language: n[1]
|
|
@@ -14482,19 +14487,19 @@ const xg = (n = {}) => {
|
|
|
14482
14487
|
})
|
|
14483
14488
|
];
|
|
14484
14489
|
}
|
|
14485
|
-
}),
|
|
14490
|
+
}), Vg = me.create({
|
|
14486
14491
|
name: "doc",
|
|
14487
14492
|
topNode: !0,
|
|
14488
14493
|
content: "block+"
|
|
14489
14494
|
});
|
|
14490
|
-
function
|
|
14495
|
+
function Fg(n = {}) {
|
|
14491
14496
|
return new oe({
|
|
14492
14497
|
view(e) {
|
|
14493
|
-
return new
|
|
14498
|
+
return new $g(e, n);
|
|
14494
14499
|
}
|
|
14495
14500
|
});
|
|
14496
14501
|
}
|
|
14497
|
-
class
|
|
14502
|
+
class $g {
|
|
14498
14503
|
constructor(e, t) {
|
|
14499
14504
|
var r;
|
|
14500
14505
|
this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.width = (r = t.width) !== null && r !== void 0 ? r : 1, this.color = t.color === !1 ? void 0 : t.color || "black", this.class = t.class, this.handlers = ["dragover", "dragend", "drop", "dragleave"].map((i) => {
|
|
@@ -14566,7 +14571,7 @@ class Fg {
|
|
|
14566
14571
|
(e.target == this.editorView.dom || !this.editorView.dom.contains(e.relatedTarget)) && this.setCursor(null);
|
|
14567
14572
|
}
|
|
14568
14573
|
}
|
|
14569
|
-
const
|
|
14574
|
+
const Hg = ee.create({
|
|
14570
14575
|
name: "dropCursor",
|
|
14571
14576
|
addOptions() {
|
|
14572
14577
|
return {
|
|
@@ -14577,7 +14582,7 @@ const $g = ee.create({
|
|
|
14577
14582
|
},
|
|
14578
14583
|
addProseMirrorPlugins() {
|
|
14579
14584
|
return [
|
|
14580
|
-
|
|
14585
|
+
Fg(this.options)
|
|
14581
14586
|
];
|
|
14582
14587
|
}
|
|
14583
14588
|
});
|
|
@@ -14620,7 +14625,7 @@ class W extends R {
|
|
|
14620
14625
|
*/
|
|
14621
14626
|
static valid(e) {
|
|
14622
14627
|
let t = e.parent;
|
|
14623
|
-
if (t.isTextblock || !
|
|
14628
|
+
if (t.isTextblock || !jg(e) || !Wg(e))
|
|
14624
14629
|
return !1;
|
|
14625
14630
|
let r = t.type.spec.allowGapCursor;
|
|
14626
14631
|
if (r != null)
|
|
@@ -14681,7 +14686,7 @@ class Rs {
|
|
|
14681
14686
|
return W.valid(t) ? new W(t) : R.near(t);
|
|
14682
14687
|
}
|
|
14683
14688
|
}
|
|
14684
|
-
function
|
|
14689
|
+
function jg(n) {
|
|
14685
14690
|
for (let e = n.depth; e >= 0; e--) {
|
|
14686
14691
|
let t = n.index(e), r = n.node(e);
|
|
14687
14692
|
if (t == 0) {
|
|
@@ -14698,7 +14703,7 @@ function Hg(n) {
|
|
|
14698
14703
|
}
|
|
14699
14704
|
return !0;
|
|
14700
14705
|
}
|
|
14701
|
-
function
|
|
14706
|
+
function Wg(n) {
|
|
14702
14707
|
for (let e = n.depth; e >= 0; e--) {
|
|
14703
14708
|
let t = n.indexAfter(e), r = n.node(e);
|
|
14704
14709
|
if (t == r.childCount) {
|
|
@@ -14715,20 +14720,20 @@ function jg(n) {
|
|
|
14715
14720
|
}
|
|
14716
14721
|
return !0;
|
|
14717
14722
|
}
|
|
14718
|
-
function
|
|
14723
|
+
function qg() {
|
|
14719
14724
|
return new oe({
|
|
14720
14725
|
props: {
|
|
14721
|
-
decorations:
|
|
14726
|
+
decorations: Ug,
|
|
14722
14727
|
createSelectionBetween(n, e, t) {
|
|
14723
14728
|
return e.pos == t.pos && W.valid(t) ? new W(t) : null;
|
|
14724
14729
|
},
|
|
14725
|
-
handleClick:
|
|
14726
|
-
handleKeyDown:
|
|
14727
|
-
handleDOMEvents: { beforeinput:
|
|
14730
|
+
handleClick: _g,
|
|
14731
|
+
handleKeyDown: Kg,
|
|
14732
|
+
handleDOMEvents: { beforeinput: Jg }
|
|
14728
14733
|
}
|
|
14729
14734
|
});
|
|
14730
14735
|
}
|
|
14731
|
-
const
|
|
14736
|
+
const Kg = Na({
|
|
14732
14737
|
ArrowLeft: kr("horiz", -1),
|
|
14733
14738
|
ArrowRight: kr("horiz", 1),
|
|
14734
14739
|
ArrowUp: kr("vert", -1),
|
|
@@ -14747,7 +14752,7 @@ function kr(n, e) {
|
|
|
14747
14752
|
return c ? (i && i(r.tr.setSelection(new W(c))), !0) : !1;
|
|
14748
14753
|
};
|
|
14749
14754
|
}
|
|
14750
|
-
function
|
|
14755
|
+
function _g(n, e, t) {
|
|
14751
14756
|
if (!n || !n.editable)
|
|
14752
14757
|
return !1;
|
|
14753
14758
|
let r = n.state.doc.resolve(e);
|
|
@@ -14756,7 +14761,7 @@ function Kg(n, e, t) {
|
|
|
14756
14761
|
let i = n.posAtCoords({ left: t.clientX, top: t.clientY });
|
|
14757
14762
|
return i && i.inside > -1 && A.isSelectable(n.state.doc.nodeAt(i.inside)) ? !1 : (n.dispatch(n.state.tr.setSelection(new W(r))), !0);
|
|
14758
14763
|
}
|
|
14759
|
-
function
|
|
14764
|
+
function Jg(n, e) {
|
|
14760
14765
|
if (e.inputType != "insertCompositionText" || !(n.state.selection instanceof W))
|
|
14761
14766
|
return !1;
|
|
14762
14767
|
let { $from: t } = n.state.selection, r = t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);
|
|
@@ -14768,17 +14773,17 @@ function _g(n, e) {
|
|
|
14768
14773
|
let s = n.state.tr.replace(t.pos, t.pos, new S(i, 0, 0));
|
|
14769
14774
|
return s.setSelection(D.near(s.doc.resolve(t.pos + 1))), n.dispatch(s), !1;
|
|
14770
14775
|
}
|
|
14771
|
-
function
|
|
14776
|
+
function Ug(n) {
|
|
14772
14777
|
if (!(n.selection instanceof W))
|
|
14773
14778
|
return null;
|
|
14774
14779
|
let e = document.createElement("div");
|
|
14775
14780
|
return e.className = "ProseMirror-gapcursor", K.create(n.doc, [Me.widget(n.selection.head, e, { key: "gapcursor" })]);
|
|
14776
14781
|
}
|
|
14777
|
-
const
|
|
14782
|
+
const Gg = ee.create({
|
|
14778
14783
|
name: "gapCursor",
|
|
14779
14784
|
addProseMirrorPlugins() {
|
|
14780
14785
|
return [
|
|
14781
|
-
|
|
14786
|
+
qg()
|
|
14782
14787
|
];
|
|
14783
14788
|
},
|
|
14784
14789
|
extendNodeSchema(n) {
|
|
@@ -14792,7 +14797,7 @@ const Ug = ee.create({
|
|
|
14792
14797
|
allowGapCursor: (e = P(C(n, "allowGapCursor", t))) !== null && e !== void 0 ? e : null
|
|
14793
14798
|
};
|
|
14794
14799
|
}
|
|
14795
|
-
}),
|
|
14800
|
+
}), Yg = me.create({
|
|
14796
14801
|
name: "hardBreak",
|
|
14797
14802
|
addOptions() {
|
|
14798
14803
|
return {
|
|
@@ -14842,7 +14847,7 @@ const Ug = ee.create({
|
|
|
14842
14847
|
"Shift-Enter": () => this.editor.commands.setHardBreak()
|
|
14843
14848
|
};
|
|
14844
14849
|
}
|
|
14845
|
-
}),
|
|
14850
|
+
}), Xg = me.create({
|
|
14846
14851
|
name: "heading",
|
|
14847
14852
|
addOptions() {
|
|
14848
14853
|
return {
|
|
@@ -14901,7 +14906,7 @@ U.prototype.prepend = function(e) {
|
|
|
14901
14906
|
return e.length ? U.from(e).append(this) : this;
|
|
14902
14907
|
};
|
|
14903
14908
|
U.prototype.appendInner = function(e) {
|
|
14904
|
-
return new
|
|
14909
|
+
return new Zg(this, e);
|
|
14905
14910
|
};
|
|
14906
14911
|
U.prototype.slice = function(e, t) {
|
|
14907
14912
|
return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ? U.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, t));
|
|
@@ -14956,7 +14961,7 @@ var bc = /* @__PURE__ */ function(n) {
|
|
|
14956
14961
|
}, Object.defineProperties(e.prototype, t), e;
|
|
14957
14962
|
}(U);
|
|
14958
14963
|
U.empty = new bc([]);
|
|
14959
|
-
var
|
|
14964
|
+
var Zg = /* @__PURE__ */ function(n) {
|
|
14960
14965
|
function e(t, r) {
|
|
14961
14966
|
n.call(this), this.left = t, this.right = r, this.length = t.length + r.length, this.depth = Math.max(t.depth, r.depth) + 1;
|
|
14962
14967
|
}
|
|
@@ -14989,7 +14994,7 @@ var Xg = /* @__PURE__ */ function(n) {
|
|
|
14989
14994
|
return this.left.depth >= Math.max(this.right.depth, r.depth) + 1 ? new e(this.left, new e(this.right, r)) : new e(this, r);
|
|
14990
14995
|
}, e;
|
|
14991
14996
|
}(U);
|
|
14992
|
-
const
|
|
14997
|
+
const Qg = 500;
|
|
14993
14998
|
class Ie {
|
|
14994
14999
|
constructor(e, t) {
|
|
14995
15000
|
this.items = e, this.eventCount = t;
|
|
@@ -15031,7 +15036,7 @@ class Ie {
|
|
|
15031
15036
|
(p = a && a.merge(f)) && (f = p, u ? s.pop() : l = l.slice(0, l.length - 1)), s.push(f), t && (o++, t = void 0), i || (a = f);
|
|
15032
15037
|
}
|
|
15033
15038
|
let c = o - r.depth;
|
|
15034
|
-
return c >
|
|
15039
|
+
return c > ty && (l = ey(l, c), o -= c), new Ie(l.append(s), o);
|
|
15035
15040
|
}
|
|
15036
15041
|
remapping(e, t) {
|
|
15037
15042
|
let r = new en();
|
|
@@ -15071,7 +15076,7 @@ class Ie {
|
|
|
15071
15076
|
for (let f = t; f < o; f++)
|
|
15072
15077
|
c.push(new Ve(s.maps[f]));
|
|
15073
15078
|
let u = this.items.slice(0, i).append(c).append(r), d = new Ie(u, l);
|
|
15074
|
-
return d.emptyItemCount() >
|
|
15079
|
+
return d.emptyItemCount() > Qg && (d = d.compress(this.items.length - r.length)), d;
|
|
15075
15080
|
}
|
|
15076
15081
|
emptyItemCount() {
|
|
15077
15082
|
let e = 0;
|
|
@@ -15103,7 +15108,7 @@ class Ie {
|
|
|
15103
15108
|
}
|
|
15104
15109
|
}
|
|
15105
15110
|
Ie.empty = new Ie(U.empty, 0);
|
|
15106
|
-
function
|
|
15111
|
+
function ey(n, e) {
|
|
15107
15112
|
let t;
|
|
15108
15113
|
return n.forEach((r, i) => {
|
|
15109
15114
|
if (r.selection && e-- == 0)
|
|
@@ -15127,23 +15132,23 @@ class st {
|
|
|
15127
15132
|
this.done = e, this.undone = t, this.prevRanges = r, this.prevTime = i, this.prevComposition = s;
|
|
15128
15133
|
}
|
|
15129
15134
|
}
|
|
15130
|
-
const
|
|
15131
|
-
function
|
|
15135
|
+
const ty = 20;
|
|
15136
|
+
function ny(n, e, t, r) {
|
|
15132
15137
|
let i = t.getMeta(Bt), s;
|
|
15133
15138
|
if (i)
|
|
15134
15139
|
return i.historyState;
|
|
15135
|
-
t.getMeta(
|
|
15140
|
+
t.getMeta(sy) && (n = new st(n.done, n.undone, null, 0, -1));
|
|
15136
15141
|
let o = t.getMeta("appendedTransaction");
|
|
15137
15142
|
if (t.steps.length == 0)
|
|
15138
15143
|
return n;
|
|
15139
15144
|
if (o && o.getMeta(Bt))
|
|
15140
15145
|
return o.getMeta(Bt).redo ? new st(n.done.addTransform(t, void 0, r, Cr(e)), n.undone, pl(t.mapping.maps), n.prevTime, n.prevComposition) : new st(n.done, n.undone.addTransform(t, void 0, r, Cr(e)), null, n.prevTime, n.prevComposition);
|
|
15141
15146
|
if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
|
|
15142
|
-
let l = t.getMeta("composition"), a = n.prevTime == 0 || !o && n.prevComposition != l && (n.prevTime < (t.time || 0) - r.newGroupDelay || !
|
|
15147
|
+
let l = t.getMeta("composition"), a = n.prevTime == 0 || !o && n.prevComposition != l && (n.prevTime < (t.time || 0) - r.newGroupDelay || !ry(t, n.prevRanges)), c = o ? Ei(n.prevRanges, t.mapping) : pl(t.mapping.maps);
|
|
15143
15148
|
return new st(n.done.addTransform(t, a ? e.selection.getBookmark() : void 0, r, Cr(e)), Ie.empty, c, t.time, l ?? n.prevComposition);
|
|
15144
15149
|
} else return (s = t.getMeta("rebased")) ? new st(n.done.rebased(t, s), n.undone.rebased(t, s), Ei(n.prevRanges, t.mapping), n.prevTime, n.prevComposition) : new st(n.done.addMaps(t.mapping.maps), n.undone.addMaps(t.mapping.maps), Ei(n.prevRanges, t.mapping), n.prevTime, n.prevComposition);
|
|
15145
15150
|
}
|
|
15146
|
-
function
|
|
15151
|
+
function ry(n, e) {
|
|
15147
15152
|
if (!e)
|
|
15148
15153
|
return !1;
|
|
15149
15154
|
if (!n.docChanged)
|
|
@@ -15170,7 +15175,7 @@ function Ei(n, e) {
|
|
|
15170
15175
|
}
|
|
15171
15176
|
return t;
|
|
15172
15177
|
}
|
|
15173
|
-
function
|
|
15178
|
+
function iy(n, e, t) {
|
|
15174
15179
|
let r = Cr(e), i = Bt.get(e).spec.config, s = (t ? n.undone : n.done).popEvent(e, r);
|
|
15175
15180
|
if (!s)
|
|
15176
15181
|
return null;
|
|
@@ -15190,8 +15195,8 @@ function Cr(n) {
|
|
|
15190
15195
|
}
|
|
15191
15196
|
return Ai;
|
|
15192
15197
|
}
|
|
15193
|
-
const Bt = new Ae("history"),
|
|
15194
|
-
function
|
|
15198
|
+
const Bt = new Ae("history"), sy = new Ae("closeHistory");
|
|
15199
|
+
function oy(n = {}) {
|
|
15195
15200
|
return n = {
|
|
15196
15201
|
depth: n.depth || 100,
|
|
15197
15202
|
newGroupDelay: n.newGroupDelay || 500
|
|
@@ -15202,7 +15207,7 @@ function sy(n = {}) {
|
|
|
15202
15207
|
return new st(Ie.empty, Ie.empty, null, 0, -1);
|
|
15203
15208
|
},
|
|
15204
15209
|
apply(e, t, r) {
|
|
15205
|
-
return
|
|
15210
|
+
return ny(t, r, e, n);
|
|
15206
15211
|
}
|
|
15207
15212
|
},
|
|
15208
15213
|
config: n,
|
|
@@ -15222,13 +15227,13 @@ function vc(n, e) {
|
|
|
15222
15227
|
if (!i || (n ? i.undone : i.done).eventCount == 0)
|
|
15223
15228
|
return !1;
|
|
15224
15229
|
if (r) {
|
|
15225
|
-
let s =
|
|
15230
|
+
let s = iy(i, t, n);
|
|
15226
15231
|
s && r(e ? s.scrollIntoView() : s);
|
|
15227
15232
|
}
|
|
15228
15233
|
return !0;
|
|
15229
15234
|
};
|
|
15230
15235
|
}
|
|
15231
|
-
const kc = vc(!1, !0), xc = vc(!0, !0),
|
|
15236
|
+
const kc = vc(!1, !0), xc = vc(!0, !0), ly = ee.create({
|
|
15232
15237
|
name: "history",
|
|
15233
15238
|
addOptions() {
|
|
15234
15239
|
return {
|
|
@@ -15244,7 +15249,7 @@ const kc = vc(!1, !0), xc = vc(!0, !0), oy = ee.create({
|
|
|
15244
15249
|
},
|
|
15245
15250
|
addProseMirrorPlugins() {
|
|
15246
15251
|
return [
|
|
15247
|
-
|
|
15252
|
+
oy(this.options)
|
|
15248
15253
|
];
|
|
15249
15254
|
},
|
|
15250
15255
|
addKeyboardShortcuts() {
|
|
@@ -15257,7 +15262,7 @@ const kc = vc(!1, !0), xc = vc(!0, !0), oy = ee.create({
|
|
|
15257
15262
|
"Shift-Mod-я": () => this.editor.commands.redo()
|
|
15258
15263
|
};
|
|
15259
15264
|
}
|
|
15260
|
-
}),
|
|
15265
|
+
}), ay = me.create({
|
|
15261
15266
|
name: "horizontalRule",
|
|
15262
15267
|
addOptions() {
|
|
15263
15268
|
return {
|
|
@@ -15301,13 +15306,13 @@ const kc = vc(!1, !0), xc = vc(!0, !0), oy = ee.create({
|
|
|
15301
15306
|
},
|
|
15302
15307
|
addInputRules() {
|
|
15303
15308
|
return [
|
|
15304
|
-
|
|
15309
|
+
Vh({
|
|
15305
15310
|
find: /^(?:---|—-|___\s|\*\*\*\s)$/,
|
|
15306
15311
|
type: this.type
|
|
15307
15312
|
})
|
|
15308
15313
|
];
|
|
15309
15314
|
}
|
|
15310
|
-
}),
|
|
15315
|
+
}), cy = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, uy = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, dy = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, fy = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, py = gt.create({
|
|
15311
15316
|
name: "italic",
|
|
15312
15317
|
addOptions() {
|
|
15313
15318
|
return {
|
|
@@ -15351,11 +15356,11 @@ const kc = vc(!1, !0), xc = vc(!0, !0), oy = ee.create({
|
|
|
15351
15356
|
addInputRules() {
|
|
15352
15357
|
return [
|
|
15353
15358
|
cn({
|
|
15354
|
-
find:
|
|
15359
|
+
find: cy,
|
|
15355
15360
|
type: this.type
|
|
15356
15361
|
}),
|
|
15357
15362
|
cn({
|
|
15358
|
-
find:
|
|
15363
|
+
find: dy,
|
|
15359
15364
|
type: this.type
|
|
15360
15365
|
})
|
|
15361
15366
|
];
|
|
@@ -15363,16 +15368,16 @@ const kc = vc(!1, !0), xc = vc(!0, !0), oy = ee.create({
|
|
|
15363
15368
|
addPasteRules() {
|
|
15364
15369
|
return [
|
|
15365
15370
|
un({
|
|
15366
|
-
find:
|
|
15371
|
+
find: uy,
|
|
15367
15372
|
type: this.type
|
|
15368
15373
|
}),
|
|
15369
15374
|
un({
|
|
15370
|
-
find:
|
|
15375
|
+
find: fy,
|
|
15371
15376
|
type: this.type
|
|
15372
15377
|
})
|
|
15373
15378
|
];
|
|
15374
15379
|
}
|
|
15375
|
-
}),
|
|
15380
|
+
}), hy = me.create({
|
|
15376
15381
|
name: "listItem",
|
|
15377
15382
|
addOptions() {
|
|
15378
15383
|
return {
|
|
@@ -15400,7 +15405,7 @@ const kc = vc(!1, !0), xc = vc(!0, !0), oy = ee.create({
|
|
|
15400
15405
|
"Shift-Tab": () => this.editor.commands.liftListItem(this.name)
|
|
15401
15406
|
};
|
|
15402
15407
|
}
|
|
15403
|
-
}),
|
|
15408
|
+
}), my = "listItem", ml = "textStyle", gl = /^(\d+)\.\s$/, gy = me.create({
|
|
15404
15409
|
name: "orderedList",
|
|
15405
15410
|
addOptions() {
|
|
15406
15411
|
return {
|
|
@@ -15439,7 +15444,7 @@ const kc = vc(!1, !0), xc = vc(!0, !0), oy = ee.create({
|
|
|
15439
15444
|
},
|
|
15440
15445
|
addCommands() {
|
|
15441
15446
|
return {
|
|
15442
|
-
toggleOrderedList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
15447
|
+
toggleOrderedList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(my, this.editor.getAttributes(ml)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
|
|
15443
15448
|
};
|
|
15444
15449
|
},
|
|
15445
15450
|
addKeyboardShortcuts() {
|
|
@@ -15466,7 +15471,7 @@ const kc = vc(!1, !0), xc = vc(!0, !0), oy = ee.create({
|
|
|
15466
15471
|
n
|
|
15467
15472
|
];
|
|
15468
15473
|
}
|
|
15469
|
-
}),
|
|
15474
|
+
}), yy = me.create({
|
|
15470
15475
|
name: "paragraph",
|
|
15471
15476
|
priority: 1e3,
|
|
15472
15477
|
addOptions() {
|
|
@@ -15494,7 +15499,7 @@ const kc = vc(!1, !0), xc = vc(!0, !0), oy = ee.create({
|
|
|
15494
15499
|
"Mod-Alt-0": () => this.editor.commands.setParagraph()
|
|
15495
15500
|
};
|
|
15496
15501
|
}
|
|
15497
|
-
}),
|
|
15502
|
+
}), by = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, vy = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, ky = gt.create({
|
|
15498
15503
|
name: "strike",
|
|
15499
15504
|
addOptions() {
|
|
15500
15505
|
return {
|
|
@@ -15537,7 +15542,7 @@ const kc = vc(!1, !0), xc = vc(!0, !0), oy = ee.create({
|
|
|
15537
15542
|
addInputRules() {
|
|
15538
15543
|
return [
|
|
15539
15544
|
cn({
|
|
15540
|
-
find:
|
|
15545
|
+
find: by,
|
|
15541
15546
|
type: this.type
|
|
15542
15547
|
})
|
|
15543
15548
|
];
|
|
@@ -15545,31 +15550,31 @@ const kc = vc(!1, !0), xc = vc(!0, !0), oy = ee.create({
|
|
|
15545
15550
|
addPasteRules() {
|
|
15546
15551
|
return [
|
|
15547
15552
|
un({
|
|
15548
|
-
find:
|
|
15553
|
+
find: vy,
|
|
15549
15554
|
type: this.type
|
|
15550
15555
|
})
|
|
15551
15556
|
];
|
|
15552
15557
|
}
|
|
15553
|
-
}),
|
|
15558
|
+
}), xy = me.create({
|
|
15554
15559
|
name: "text",
|
|
15555
15560
|
group: "inline"
|
|
15556
|
-
}),
|
|
15561
|
+
}), wy = ee.create({
|
|
15557
15562
|
name: "starterKit",
|
|
15558
15563
|
addExtensions() {
|
|
15559
15564
|
var n, e, t, r, i, s, o, l, a, c, u, d, f, p, h, m, g, b;
|
|
15560
15565
|
const w = [];
|
|
15561
|
-
return this.options.bold !== !1 && w.push(
|
|
15566
|
+
return this.options.bold !== !1 && w.push(Ag.configure((n = this.options) === null || n === void 0 ? void 0 : n.bold)), this.options.blockquote !== !1 && w.push(Mg.configure((e = this.options) === null || e === void 0 ? void 0 : e.blockquote)), this.options.bulletList !== !1 && w.push(Dg.configure((t = this.options) === null || t === void 0 ? void 0 : t.bulletList)), this.options.code !== !1 && w.push(Pg.configure((r = this.options) === null || r === void 0 ? void 0 : r.code)), this.options.codeBlock !== !1 && w.push(zg.configure((i = this.options) === null || i === void 0 ? void 0 : i.codeBlock)), this.options.document !== !1 && w.push(Vg.configure((s = this.options) === null || s === void 0 ? void 0 : s.document)), this.options.dropcursor !== !1 && w.push(Hg.configure((o = this.options) === null || o === void 0 ? void 0 : o.dropcursor)), this.options.gapcursor !== !1 && w.push(Gg.configure((l = this.options) === null || l === void 0 ? void 0 : l.gapcursor)), this.options.hardBreak !== !1 && w.push(Yg.configure((a = this.options) === null || a === void 0 ? void 0 : a.hardBreak)), this.options.heading !== !1 && w.push(Xg.configure((c = this.options) === null || c === void 0 ? void 0 : c.heading)), this.options.history !== !1 && w.push(ly.configure((u = this.options) === null || u === void 0 ? void 0 : u.history)), this.options.horizontalRule !== !1 && w.push(ay.configure((d = this.options) === null || d === void 0 ? void 0 : d.horizontalRule)), this.options.italic !== !1 && w.push(py.configure((f = this.options) === null || f === void 0 ? void 0 : f.italic)), this.options.listItem !== !1 && w.push(hy.configure((p = this.options) === null || p === void 0 ? void 0 : p.listItem)), this.options.orderedList !== !1 && w.push(gy.configure((h = this.options) === null || h === void 0 ? void 0 : h.orderedList)), this.options.paragraph !== !1 && w.push(yy.configure((m = this.options) === null || m === void 0 ? void 0 : m.paragraph)), this.options.strike !== !1 && w.push(ky.configure((g = this.options) === null || g === void 0 ? void 0 : g.strike)), this.options.text !== !1 && w.push(xy.configure((b = this.options) === null || b === void 0 ? void 0 : b.text)), w;
|
|
15562
15567
|
}
|
|
15563
|
-
}),
|
|
15568
|
+
}), Sy = ["onClick"], My = /* @__PURE__ */ mn({
|
|
15564
15569
|
__name: "UiEditor",
|
|
15565
15570
|
props: {
|
|
15566
15571
|
modelValue: {}
|
|
15567
15572
|
},
|
|
15568
15573
|
emits: ["update:modelValue"],
|
|
15569
15574
|
setup(n, { emit: e }) {
|
|
15570
|
-
const t = n, r = e, i = Pc(() => t.modelValue), s =
|
|
15575
|
+
const t = n, r = e, i = Pc(() => t.modelValue), s = wg({
|
|
15571
15576
|
content: i.value,
|
|
15572
|
-
extensions: [
|
|
15577
|
+
extensions: [wy],
|
|
15573
15578
|
onUpdate: () => {
|
|
15574
15579
|
r("update:modelValue", s.value?.getHTML());
|
|
15575
15580
|
}
|
|
@@ -15597,22 +15602,22 @@ const kc = vc(!1, !0), xc = vc(!0, !0), oy = ee.create({
|
|
|
15597
15602
|
onClick: (u) => c.method(),
|
|
15598
15603
|
class: dr(l.$style.action),
|
|
15599
15604
|
type: "button"
|
|
15600
|
-
}, Vc(c.name), 11,
|
|
15605
|
+
}, Vc(c.name), 11, Sy)), 64))
|
|
15601
15606
|
], 2),
|
|
15602
|
-
Fc(Ni(
|
|
15607
|
+
Fc(Ni(xg), {
|
|
15603
15608
|
editor: Ni(s),
|
|
15604
15609
|
class: dr(l.$style.editor)
|
|
15605
15610
|
}, null, 8, ["editor", "class"])
|
|
15606
15611
|
], 2));
|
|
15607
15612
|
}
|
|
15608
|
-
}),
|
|
15609
|
-
container:
|
|
15610
|
-
actions:
|
|
15611
|
-
action:
|
|
15612
|
-
editor:
|
|
15613
|
-
},
|
|
15614
|
-
$style:
|
|
15615
|
-
},
|
|
15613
|
+
}), Cy = "_container_1jv52_1", Oy = "_actions_1jv52_18", Ty = "_action_1jv52_18", Ey = "_editor_1jv52_41", Ay = {
|
|
15614
|
+
container: Cy,
|
|
15615
|
+
actions: Oy,
|
|
15616
|
+
action: Ty,
|
|
15617
|
+
editor: Ey
|
|
15618
|
+
}, Ny = {
|
|
15619
|
+
$style: Ay
|
|
15620
|
+
}, Py = /* @__PURE__ */ $c(My, [["__cssModules", Ny]]);
|
|
15616
15621
|
export {
|
|
15617
|
-
|
|
15622
|
+
Py as default
|
|
15618
15623
|
};
|