@oneclick.dev/cms-core-modules 0.0.91 → 0.0.93
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as ie, inject as re, ref as C, openBlock as D, createElementBlock as B, unref as w, Fragment as ee, createElementVNode as y, createTextVNode as $, toDisplayString as Q, createCommentVNode as P, resolveComponent as N, withDirectives as yi, withKeys as Pt, isRef as Rt, vModelText as tr, createBlock as R, withCtx as v, createVNode as p, normalizeClass as ae, reactive as qi, watch as Ze, renderList as he, shallowRef as _c, onMounted as we, onBeforeUnmount as
|
|
1
|
+
import { defineComponent as ie, inject as re, ref as C, openBlock as D, createElementBlock as B, unref as w, Fragment as ee, createElementVNode as y, createTextVNode as $, toDisplayString as Q, createCommentVNode as P, resolveComponent as N, withDirectives as yi, withKeys as Pt, isRef as Rt, vModelText as tr, createBlock as R, withCtx as v, createVNode as p, normalizeClass as ae, reactive as qi, watch as Ze, renderList as he, shallowRef as _c, onMounted as we, onBeforeUnmount as Bt, h as oi, getCurrentInstance as cc, watchEffect as hc, nextTick as mt, markRaw as of, provide as ce, customRef as mc, render as ru, toRaw as ca, computed as ue, toValue as Fc, toRef as dt, normalizeStyle as ge, renderSlot as aa, normalizeProps as ft, mergeProps as Ft, resolveDynamicComponent as ka, withModifiers as _t, guardReactiveProps as rf, vModelCheckbox as pc, vShow as bc, onUnmounted as yc, createStaticVNode as kc, onActivated as wc, KeepAlive as Dc } from "vue";
|
|
2
2
|
import { useModulePermissions as Gs, useConfirmation as Ys, useModule as Xs, useFirebaseIntegration as sf, useModuleStorage as vc, useModuleRoute as xc, useModuleBreadcrumbs as Ec } from "@oneclick.dev/cms-kit";
|
|
3
3
|
import { i as un } from "./interpolation-BBwG_ON6.mjs";
|
|
4
|
-
import { Link as lf, Loader2 as wr, ChevronDown as Un, Plus as no, Braces as Cc, ArrowUp as Bc, ArrowDown as Sc, Cog as jc, List as qc, ListOrdered as Ac, MousePointerClick as Mc, CornerDownLeft as Tc, Pilcrow as su, icons as lu, Heading1 as uf, Columns3 as Nc, Rows3 as Oc, LayoutPanelTop as Lc, Square as Ic, Minus as Pc, Maximize as zc, ListCollapse as Rc, Image as $c, Clapperboard as Hc, Smile as Vc, MapPin as Wc, ExternalLink as df, SwatchBook as Uc, Copy as as, Trash2 as ff, RotateCcw as gf, ImageIcon as Kc, VideoIcon as Jc, ArrowLeft as _f, Unlink as Gc, Check as Yc, ChevronsUpDownIcon as cf, CheckIcon as hf, X as mf, Zap as Xc, Bold as Qc, Italic as Zc, Underline as eh, Strikethrough as th, AlignStartVertical as
|
|
4
|
+
import { Link as lf, Loader2 as wr, ChevronDown as Un, Plus as no, Braces as Cc, ArrowUp as Bc, ArrowDown as Sc, Cog as jc, List as qc, ListOrdered as Ac, MousePointerClick as Mc, CornerDownLeft as Tc, Pilcrow as su, icons as lu, Heading1 as uf, Columns3 as Nc, Rows3 as Oc, LayoutPanelTop as Lc, Square as Ic, Minus as Pc, Maximize as zc, ListCollapse as Rc, Image as $c, Clapperboard as Hc, Smile as Vc, MapPin as Wc, ExternalLink as df, SwatchBook as Uc, Copy as as, Trash2 as ff, RotateCcw as gf, ImageIcon as Kc, VideoIcon as Jc, ArrowLeft as _f, Unlink as Gc, Check as Yc, ChevronsUpDownIcon as cf, CheckIcon as hf, X as mf, Zap as Xc, Bold as Qc, Italic as Zc, Underline as eh, Strikethrough as th, AlignStartVertical as qa, AlignCenterVertical as Aa, AlignEndVertical as Ma, MoveRight as ah, MoveDown as ih, AlignHorizontalSpaceBetween as nh, AlignStartHorizontal as oh, AlignCenterHorizontal as rh, AlignEndHorizontal as sh, ImagePlus as lh, ChevronRight as uu, SendToBack as uh, Globe as dh } from "lucide-vue-next";
|
|
5
5
|
import { _ as De } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
6
6
|
import { c as du } from "./utils-BVKy9S2J.mjs";
|
|
7
7
|
import { e as Ff } from "./index-CrGjxSwa.mjs";
|
|
@@ -1663,7 +1663,7 @@ class lo {
|
|
|
1663
1663
|
}
|
|
1664
1664
|
}
|
|
1665
1665
|
const am = /* @__PURE__ */ Object.create(null);
|
|
1666
|
-
let
|
|
1666
|
+
let Da = class rs {
|
|
1667
1667
|
/**
|
|
1668
1668
|
@internal
|
|
1669
1669
|
*/
|
|
@@ -2032,8 +2032,8 @@ let wa = class rs {
|
|
|
2032
2032
|
return o.type.checkAttrs(o.attrs), o;
|
|
2033
2033
|
}
|
|
2034
2034
|
};
|
|
2035
|
-
|
|
2036
|
-
class uo extends
|
|
2035
|
+
Da.prototype.text = void 0;
|
|
2036
|
+
class uo extends Da {
|
|
2037
2037
|
/**
|
|
2038
2038
|
@internal
|
|
2039
2039
|
*/
|
|
@@ -2539,7 +2539,7 @@ let cu = class Mf {
|
|
|
2539
2539
|
create(e = null, t, i) {
|
|
2540
2540
|
if (this.isText)
|
|
2541
2541
|
throw new Error("NodeType.create can't construct text nodes");
|
|
2542
|
-
return new
|
|
2542
|
+
return new Da(this, this.computeAttrs(e), V.from(t), ke.setFrom(i));
|
|
2543
2543
|
}
|
|
2544
2544
|
/**
|
|
2545
2545
|
Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content
|
|
@@ -2547,7 +2547,7 @@ let cu = class Mf {
|
|
|
2547
2547
|
if it doesn't match.
|
|
2548
2548
|
*/
|
|
2549
2549
|
createChecked(e = null, t, i) {
|
|
2550
|
-
return t = V.from(t), this.checkContent(t), new
|
|
2550
|
+
return t = V.from(t), this.checkContent(t), new Da(this, this.computeAttrs(e), t, ke.setFrom(i));
|
|
2551
2551
|
}
|
|
2552
2552
|
/**
|
|
2553
2553
|
Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is
|
|
@@ -2565,7 +2565,7 @@ let cu = class Mf {
|
|
|
2565
2565
|
t = r.append(t);
|
|
2566
2566
|
}
|
|
2567
2567
|
let n = this.contentMatch.matchFragment(t), o = n && n.fillBefore(V.empty, !0);
|
|
2568
|
-
return o ? new
|
|
2568
|
+
return o ? new Da(this, e, t.append(o), ke.setFrom(i)) : null;
|
|
2569
2569
|
}
|
|
2570
2570
|
/**
|
|
2571
2571
|
Returns true if the given fragment is valid content for this node
|
|
@@ -2738,7 +2738,7 @@ class Tf {
|
|
|
2738
2738
|
let o = this.marks[n], r = o.spec.excludes;
|
|
2739
2739
|
o.excluded = r == null ? [o] : r == "" ? [] : hu(this, r.split(" "));
|
|
2740
2740
|
}
|
|
2741
|
-
this.nodeFromJSON = (n) =>
|
|
2741
|
+
this.nodeFromJSON = (n) => Da.fromJSON(this, n), this.markFromJSON = (n) => ke.fromJSON(this, n), this.topNodeType = this.nodes[this.spec.topNode || "doc"], this.cached.wrappings = /* @__PURE__ */ Object.create(null);
|
|
2742
2742
|
}
|
|
2743
2743
|
/**
|
|
2744
2744
|
Create a node in this schema. The `type` may be a string or a
|
|
@@ -2801,7 +2801,7 @@ function cm(a) {
|
|
|
2801
2801
|
function hm(a) {
|
|
2802
2802
|
return a.style != null;
|
|
2803
2803
|
}
|
|
2804
|
-
class
|
|
2804
|
+
class va {
|
|
2805
2805
|
/**
|
|
2806
2806
|
Create a parser that targets the given schema, using the given
|
|
2807
2807
|
parsing rules.
|
|
@@ -2913,7 +2913,7 @@ class Da {
|
|
|
2913
2913
|
[priority](https://prosemirror.net/docs/ref/#model.GenericParseRule.priority).
|
|
2914
2914
|
*/
|
|
2915
2915
|
static fromSchema(e) {
|
|
2916
|
-
return e.cached.domParser || (e.cached.domParser = new
|
|
2916
|
+
return e.cached.domParser || (e.cached.domParser = new va(e, va.schemaRules(e)));
|
|
2917
2917
|
}
|
|
2918
2918
|
}
|
|
2919
2919
|
const Nf = {
|
|
@@ -3974,7 +3974,7 @@ let fo = class us extends Je {
|
|
|
3974
3974
|
}
|
|
3975
3975
|
};
|
|
3976
3976
|
Je.jsonID("removeNodeMark", fo);
|
|
3977
|
-
let
|
|
3977
|
+
let Et = class ga extends Je {
|
|
3978
3978
|
/**
|
|
3979
3979
|
The given `slice` should fit the 'gap' between `from` and
|
|
3980
3980
|
`to`—the depths must line up, and the surrounding nodes must be
|
|
@@ -3994,21 +3994,21 @@ let jt = class Ra extends Je {
|
|
|
3994
3994
|
return new ti([this.from, this.to - this.from, this.slice.size]);
|
|
3995
3995
|
}
|
|
3996
3996
|
invert(e) {
|
|
3997
|
-
return new
|
|
3997
|
+
return new ga(this.from, this.from + this.slice.size, e.slice(this.from, this.to));
|
|
3998
3998
|
}
|
|
3999
3999
|
map(e) {
|
|
4000
|
-
let t = e.mapResult(this.
|
|
4001
|
-
return
|
|
4000
|
+
let t = e.mapResult(this.to, -1), i = this.from == this.to && ga.MAP_BIAS < 0 ? t : e.mapResult(this.from, 1);
|
|
4001
|
+
return i.deletedAcross && t.deletedAcross ? null : new ga(i.pos, Math.max(i.pos, t.pos), this.slice, this.structure);
|
|
4002
4002
|
}
|
|
4003
4003
|
merge(e) {
|
|
4004
|
-
if (!(e instanceof
|
|
4004
|
+
if (!(e instanceof ga) || e.structure || this.structure)
|
|
4005
4005
|
return null;
|
|
4006
4006
|
if (this.from + this.slice.size == e.from && !this.slice.openEnd && !e.slice.openStart) {
|
|
4007
4007
|
let t = this.slice.size + e.slice.size == 0 ? G.empty : new G(this.slice.content.append(e.slice.content), this.slice.openStart, e.slice.openEnd);
|
|
4008
|
-
return new
|
|
4008
|
+
return new ga(this.from, this.to + (e.to - e.from), t, this.structure);
|
|
4009
4009
|
} else if (e.to == this.from && !this.slice.openStart && !e.slice.openEnd) {
|
|
4010
4010
|
let t = this.slice.size + e.slice.size == 0 ? G.empty : new G(e.slice.content.append(this.slice.content), e.slice.openStart, this.slice.openEnd);
|
|
4011
|
-
return new
|
|
4011
|
+
return new ga(e.from, this.to, t, this.structure);
|
|
4012
4012
|
} else
|
|
4013
4013
|
return null;
|
|
4014
4014
|
}
|
|
@@ -4022,10 +4022,11 @@ let jt = class Ra extends Je {
|
|
|
4022
4022
|
static fromJSON(e, t) {
|
|
4023
4023
|
if (typeof t.from != "number" || typeof t.to != "number")
|
|
4024
4024
|
throw new RangeError("Invalid input for ReplaceStep.fromJSON");
|
|
4025
|
-
return new
|
|
4025
|
+
return new ga(t.from, t.to, G.fromJSON(e, t.slice), !!t.structure);
|
|
4026
4026
|
}
|
|
4027
4027
|
};
|
|
4028
|
-
|
|
4028
|
+
Et.MAP_BIAS = 1;
|
|
4029
|
+
Je.jsonID("replace", Et);
|
|
4029
4030
|
let ut = class Gn extends Je {
|
|
4030
4031
|
/**
|
|
4031
4032
|
Create a replace-around step with the given range and gap.
|
|
@@ -4142,7 +4143,7 @@ function tl(a, e, t, i = t.contentMatch, n = !0) {
|
|
|
4142
4143
|
for (let l = 0; l < o.childCount; l++) {
|
|
4143
4144
|
let u = o.child(l), d = s + u.nodeSize, f = i.matchType(u.type);
|
|
4144
4145
|
if (!f)
|
|
4145
|
-
r.push(new
|
|
4146
|
+
r.push(new Et(s, d, G.empty));
|
|
4146
4147
|
else {
|
|
4147
4148
|
i = f;
|
|
4148
4149
|
for (let g = 0; g < u.marks.length; g++)
|
|
@@ -4150,7 +4151,7 @@ function tl(a, e, t, i = t.contentMatch, n = !0) {
|
|
|
4150
4151
|
if (n && u.isText && t.whitespace != "pre") {
|
|
4151
4152
|
let g, _ = /\r?\n|\r/g, c;
|
|
4152
4153
|
for (; g = _.exec(u.text); )
|
|
4153
|
-
c || (c = new G(V.from(t.schema.text(" ", t.allowedMarks(u.marks))), 0, 0)), r.push(new
|
|
4154
|
+
c || (c = new G(V.from(t.schema.text(" ", t.allowedMarks(u.marks))), 0, 0)), r.push(new Et(s + g.index, s + g.index + g[0].length, c));
|
|
4154
4155
|
}
|
|
4155
4156
|
}
|
|
4156
4157
|
s = d;
|
|
@@ -4300,9 +4301,9 @@ function Mm(a, e, t = 1, i) {
|
|
|
4300
4301
|
let d = i && i[u];
|
|
4301
4302
|
r = V.from(d ? d.type.create(d.attrs, r) : n.node(s).copy(r));
|
|
4302
4303
|
}
|
|
4303
|
-
a.step(new
|
|
4304
|
+
a.step(new Et(e, e, new G(o.append(r), t, t), !0));
|
|
4304
4305
|
}
|
|
4305
|
-
function
|
|
4306
|
+
function Ta(a, e) {
|
|
4306
4307
|
let t = a.resolve(e), i = t.index();
|
|
4307
4308
|
return Vf(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(i, i + 1);
|
|
4308
4309
|
}
|
|
@@ -4343,7 +4344,7 @@ function Nm(a, e, t) {
|
|
|
4343
4344
|
}
|
|
4344
4345
|
r.inlineContent && tl(a, e + t - 1, r, o.node().contentMatchAt(o.index()), i == null);
|
|
4345
4346
|
let l = a.mapping.slice(s), u = l.map(e - t);
|
|
4346
|
-
if (a.step(new
|
|
4347
|
+
if (a.step(new Et(u, l.map(e + t, -1), G.empty, !0)), i === !0) {
|
|
4347
4348
|
let d = a.doc.resolve(u);
|
|
4348
4349
|
$f(a, d.node(), d.before(), a.steps.length);
|
|
4349
4350
|
}
|
|
@@ -4396,7 +4397,7 @@ function nr(a, e, t = e, i = G.empty) {
|
|
|
4396
4397
|
if (e == t && !i.size)
|
|
4397
4398
|
return null;
|
|
4398
4399
|
let n = a.resolve(e), o = a.resolve(t);
|
|
4399
|
-
return Uf(n, o, i) ? new
|
|
4400
|
+
return Uf(n, o, i) ? new Et(e, t, i) : new Lm(n, o, i).fit();
|
|
4400
4401
|
}
|
|
4401
4402
|
function Uf(a, e, t) {
|
|
4402
4403
|
return !t.openStart && !t.openEnd && a.start() == e.start() && a.parent.canReplace(a.index(), e.index(), t.content);
|
|
@@ -4429,7 +4430,7 @@ class Lm {
|
|
|
4429
4430
|
for (; r && s && o.childCount == 1; )
|
|
4430
4431
|
o = o.firstChild.content, r--, s--;
|
|
4431
4432
|
let l = new G(o, r, s);
|
|
4432
|
-
return e > -1 ? new ut(i.pos, e, this.$to.pos, this.$to.end(), l, t) : l.size || i.pos != this.$to.pos ? new
|
|
4433
|
+
return e > -1 ? new ut(i.pos, e, this.$to.pos, this.$to.end(), l, t) : l.size || i.pos != this.$to.pos ? new Et(i.pos, n.pos, l) : null;
|
|
4433
4434
|
}
|
|
4434
4435
|
// Find a position on the start spine of `this.unplaced` that has
|
|
4435
4436
|
// content that can be moved somewhere on the frontier. Returns two
|
|
@@ -4586,7 +4587,7 @@ function zm(a, e, t, i) {
|
|
|
4586
4587
|
return a.deleteRange(e, t);
|
|
4587
4588
|
let n = a.doc.resolve(e), o = a.doc.resolve(t);
|
|
4588
4589
|
if (Uf(n, o, i))
|
|
4589
|
-
return a.step(new
|
|
4590
|
+
return a.step(new Et(e, t, i));
|
|
4590
4591
|
let r = Gf(n, o);
|
|
4591
4592
|
r[r.length - 1] == 0 && r.pop();
|
|
4592
4593
|
let s = -(n.depth + 1);
|
|
@@ -4647,7 +4648,22 @@ function Rm(a, e, t, i) {
|
|
|
4647
4648
|
a.replaceRange(e, t, new G(V.from(i), 0, 0));
|
|
4648
4649
|
}
|
|
4649
4650
|
function $m(a, e, t) {
|
|
4650
|
-
let i = a.doc.resolve(e), n = a.doc.resolve(t)
|
|
4651
|
+
let i = a.doc.resolve(e), n = a.doc.resolve(t);
|
|
4652
|
+
if (i.parent.isTextblock && n.parent.isTextblock && i.start() != n.start() && i.parentOffset == 0 && n.parentOffset == 0) {
|
|
4653
|
+
let r = i.sharedDepth(t), s = !1;
|
|
4654
|
+
for (let l = i.depth; l > r; l--)
|
|
4655
|
+
i.node(l).type.spec.isolating && (s = !0);
|
|
4656
|
+
for (let l = n.depth; l > r; l--)
|
|
4657
|
+
n.node(l).type.spec.isolating && (s = !0);
|
|
4658
|
+
if (!s) {
|
|
4659
|
+
for (let l = i.depth; l > 0 && e == i.start(l); l--)
|
|
4660
|
+
e = i.before(l);
|
|
4661
|
+
for (let l = n.depth; l > 0 && t == n.start(l); l--)
|
|
4662
|
+
t = n.before(l);
|
|
4663
|
+
i = a.doc.resolve(e), n = a.doc.resolve(t);
|
|
4664
|
+
}
|
|
4665
|
+
}
|
|
4666
|
+
let o = Gf(i, n);
|
|
4651
4667
|
for (let r = 0; r < o.length; r++) {
|
|
4652
4668
|
let s = o[r], l = r == o.length - 1;
|
|
4653
4669
|
if (l && s == 0 || i.node(s).type.contentMatch.validEnd)
|
|
@@ -5380,7 +5396,7 @@ function Eu(a, e, t) {
|
|
|
5380
5396
|
if (i < e)
|
|
5381
5397
|
return;
|
|
5382
5398
|
let n = a.steps[i];
|
|
5383
|
-
if (!(n instanceof
|
|
5399
|
+
if (!(n instanceof Et || n instanceof ut))
|
|
5384
5400
|
return;
|
|
5385
5401
|
let o = a.mapping.maps[i], r;
|
|
5386
5402
|
o.forEach((s, l, u, d) => {
|
|
@@ -5736,7 +5752,7 @@ class mi {
|
|
|
5736
5752
|
let n = new Sr(e.schema, e.plugins), o = new mi(n);
|
|
5737
5753
|
return n.fields.forEach((r) => {
|
|
5738
5754
|
if (r.name == "doc")
|
|
5739
|
-
o.doc =
|
|
5755
|
+
o.doc = Da.fromJSON(e.schema, t.doc);
|
|
5740
5756
|
else if (r.name == "selection")
|
|
5741
5757
|
o.selection = le.fromJSON(o.doc, t.selection);
|
|
5742
5758
|
else if (r.name == "storedMarks")
|
|
@@ -5865,7 +5881,7 @@ function ng(a, e, t) {
|
|
|
5865
5881
|
s = d;
|
|
5866
5882
|
}
|
|
5867
5883
|
let u = nr(a.doc, o, l, G.empty);
|
|
5868
|
-
if (!u || u.from != o || u instanceof
|
|
5884
|
+
if (!u || u.from != o || u instanceof Et && u.slice.size >= l - o)
|
|
5869
5885
|
return !1;
|
|
5870
5886
|
if (t) {
|
|
5871
5887
|
let d = a.tr.step(u);
|
|
@@ -5955,7 +5971,7 @@ function rl(a) {
|
|
|
5955
5971
|
const Jm = (a, e) => {
|
|
5956
5972
|
let t = a.selection, i = t instanceof X, n;
|
|
5957
5973
|
if (i) {
|
|
5958
|
-
if (t.node.isTextblock || !
|
|
5974
|
+
if (t.node.isTextblock || !Ta(a.doc, t.from))
|
|
5959
5975
|
return !1;
|
|
5960
5976
|
n = t.from;
|
|
5961
5977
|
} else if (n = ir(a.doc, t.from, -1), n == null)
|
|
@@ -5968,7 +5984,7 @@ const Jm = (a, e) => {
|
|
|
5968
5984
|
}, Gm = (a, e) => {
|
|
5969
5985
|
let t = a.selection, i;
|
|
5970
5986
|
if (t instanceof X) {
|
|
5971
|
-
if (t.node.isTextblock || !
|
|
5987
|
+
if (t.node.isTextblock || !Ta(a.doc, t.to))
|
|
5972
5988
|
return !1;
|
|
5973
5989
|
i = t.to;
|
|
5974
5990
|
} else if (i = ir(a.doc, t.to, 1), i == null)
|
|
@@ -6061,7 +6077,7 @@ const Zm = Qm(), eF = (a, e) => {
|
|
|
6061
6077
|
};
|
|
6062
6078
|
function tF(a, e, t) {
|
|
6063
6079
|
let i = e.nodeBefore, n = e.nodeAfter, o = e.index();
|
|
6064
|
-
return !i || !n || !i.type.compatibleContent(n.type) ? !1 : !i.content.size && e.parent.canReplace(o - 1, o) ? (t && t(a.tr.delete(e.pos - i.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(o, o + 1) || !(n.isTextblock ||
|
|
6080
|
+
return !i || !n || !i.type.compatibleContent(n.type) ? !1 : !i.content.size && e.parent.canReplace(o - 1, o) ? (t && t(a.tr.delete(e.pos - i.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(o, o + 1) || !(n.isTextblock || Ta(a.doc, e.pos)) ? !1 : (t && t(a.tr.join(e.pos).scrollIntoView()), !0);
|
|
6065
6081
|
}
|
|
6066
6082
|
function gg(a, e, t, i) {
|
|
6067
6083
|
let n = e.nodeBefore, o = e.nodeAfter, r, s, l = n.type.spec.isolating || o.type.spec.isolating;
|
|
@@ -6075,7 +6091,7 @@ function gg(a, e, t, i) {
|
|
|
6075
6091
|
c = V.from(r[F].create(null, c));
|
|
6076
6092
|
c = V.from(n.copy(c));
|
|
6077
6093
|
let h = a.tr.step(new ut(e.pos - 1, _, e.pos, _, new G(c, 1, 0), r.length, !0)), m = h.doc.resolve(_ + 2 * r.length);
|
|
6078
|
-
m.nodeAfter && m.nodeAfter.type == n.type &&
|
|
6094
|
+
m.nodeAfter && m.nodeAfter.type == n.type && Ta(h.doc, m.pos) && h.join(m.pos), t(h.scrollIntoView());
|
|
6079
6095
|
}
|
|
6080
6096
|
return !0;
|
|
6081
6097
|
}
|
|
@@ -6209,7 +6225,7 @@ function uF(a, e, t, i) {
|
|
|
6209
6225
|
return !1;
|
|
6210
6226
|
n.lift(i, s);
|
|
6211
6227
|
let l = n.doc.resolve(n.mapping.map(o, -1) - 1);
|
|
6212
|
-
return
|
|
6228
|
+
return Ta(n.doc, l.pos) && l.nodeBefore.type == l.nodeAfter.type && n.join(l.pos), e(n.scrollIntoView()), !0;
|
|
6213
6229
|
}
|
|
6214
6230
|
function dF(a, e, t) {
|
|
6215
6231
|
let i = a.tr, n = t.parent;
|
|
@@ -6355,9 +6371,9 @@ function pF(a, e, t) {
|
|
|
6355
6371
|
return { node: i.startContainer, offset: Math.min(Dt(i.startContainer), i.startOffset) };
|
|
6356
6372
|
}
|
|
6357
6373
|
}
|
|
6358
|
-
const Vt = typeof navigator < "u" ? navigator : null, Au = typeof document < "u" ? document : null,
|
|
6359
|
-
vt && +(/Firefox\/(\d+)/.exec(
|
|
6360
|
-
const hs = !lt && /Chrome\/(\d+)/.exec(
|
|
6374
|
+
const Vt = typeof navigator < "u" ? navigator : null, Au = typeof document < "u" ? document : null, Na = Vt && Vt.userAgent || "", _s = /Edge\/(\d+)/.exec(Na), cg = /MSIE \d/.exec(Na), cs = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Na), lt = !!(cg || cs || _s), xa = cg ? document.documentMode : cs ? +cs[1] : _s ? +_s[1] : 0, vt = !lt && /gecko\/(\d+)/i.test(Na);
|
|
6375
|
+
vt && +(/Firefox\/(\d+)/.exec(Na) || [0, 0])[1];
|
|
6376
|
+
const hs = !lt && /Chrome\/(\d+)/.exec(Na), $e = !!hs, hg = hs ? +hs[1] : 0, Ke = !lt && !!Vt && /Apple Computer/.test(Vt.vendor), vi = Ke && (/Mobile\/\w+/.test(Na) || !!Vt && Vt.maxTouchPoints > 2), kt = vi || (Vt ? /Mac/.test(Vt.platform) : !1), mg = Vt ? /Win/.test(Vt.platform) : !1, ea = /Android \d/.test(Na), xn = !!Au && "webkitFontSmoothing" in Au.documentElement.style, bF = xn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
6361
6377
|
function yF(a) {
|
|
6362
6378
|
let e = a.defaultView && a.defaultView.visualViewport;
|
|
6363
6379
|
return e ? {
|
|
@@ -6482,7 +6498,7 @@ function xF(a, e) {
|
|
|
6482
6498
|
let t = a.nodeValue.length, i = document.createRange(), n;
|
|
6483
6499
|
for (let o = 0; o < t; o++) {
|
|
6484
6500
|
i.setEnd(a, o + 1), i.setStart(a, o);
|
|
6485
|
-
let r =
|
|
6501
|
+
let r = _a(i, 1);
|
|
6486
6502
|
if (r.top != r.bottom && ul(e, r)) {
|
|
6487
6503
|
n = { node: a, offset: o + (e.left >= (r.left + r.right) / 2 ? 1 : 0) };
|
|
6488
6504
|
break;
|
|
@@ -6563,7 +6579,7 @@ function SF(a, e) {
|
|
|
6563
6579
|
function Tu(a) {
|
|
6564
6580
|
return a.top < a.bottom || a.left < a.right;
|
|
6565
6581
|
}
|
|
6566
|
-
function
|
|
6582
|
+
function _a(a, e) {
|
|
6567
6583
|
let t = a.getClientRects();
|
|
6568
6584
|
if (t.length) {
|
|
6569
6585
|
let i = t[e < 0 ? 0 : t.length - 1];
|
|
@@ -6577,11 +6593,11 @@ function kg(a, e, t) {
|
|
|
6577
6593
|
let { node: i, offset: n, atom: o } = a.docView.domFromPos(e, t < 0 ? -1 : 1), r = xn || vt;
|
|
6578
6594
|
if (i.nodeType == 3)
|
|
6579
6595
|
if (r && (jF.test(i.nodeValue) || (t < 0 ? !n : n == i.nodeValue.length))) {
|
|
6580
|
-
let l =
|
|
6596
|
+
let l = _a(Qt(i, n, n), t);
|
|
6581
6597
|
if (vt && n && /\s/.test(i.nodeValue[n - 1]) && n < i.nodeValue.length) {
|
|
6582
|
-
let u =
|
|
6598
|
+
let u = _a(Qt(i, n - 1, n - 1), -1);
|
|
6583
6599
|
if (u.top == l.top) {
|
|
6584
|
-
let d =
|
|
6600
|
+
let d = _a(Qt(i, n, n + 1), -1);
|
|
6585
6601
|
if (d.top != l.top)
|
|
6586
6602
|
return Ni(d, d.left < u.left);
|
|
6587
6603
|
}
|
|
@@ -6589,7 +6605,7 @@ function kg(a, e, t) {
|
|
|
6589
6605
|
return l;
|
|
6590
6606
|
} else {
|
|
6591
6607
|
let l = n, u = n, d = t < 0 ? 1 : -1;
|
|
6592
|
-
return t < 0 && !n ? (u++, d = -1) : t >= 0 && n == i.nodeValue.length ? (l--, d = 1) : t < 0 ? l-- : u++, Ni(
|
|
6608
|
+
return t < 0 && !n ? (u++, d = -1) : t >= 0 && n == i.nodeValue.length ? (l--, d = 1) : t < 0 ? l-- : u++, Ni(_a(Qt(i, l, u), d), d < 0);
|
|
6593
6609
|
}
|
|
6594
6610
|
if (!a.state.doc.resolve(e - (o || 0)).parent.inlineContent) {
|
|
6595
6611
|
if (o == null && n && (t < 0 || n == Dt(i))) {
|
|
@@ -6607,7 +6623,7 @@ function kg(a, e, t) {
|
|
|
6607
6623
|
if (o == null && n && (t < 0 || n == Dt(i))) {
|
|
6608
6624
|
let l = i.childNodes[n - 1], u = l.nodeType == 3 ? Qt(l, Dt(l) - (r ? 0 : 1)) : l.nodeType == 1 && (l.nodeName != "BR" || !l.nextSibling) ? l : null;
|
|
6609
6625
|
if (u)
|
|
6610
|
-
return Ni(
|
|
6626
|
+
return Ni(_a(u, 1), !1);
|
|
6611
6627
|
}
|
|
6612
6628
|
if (o == null && n < Dt(i)) {
|
|
6613
6629
|
let l = i.childNodes[n];
|
|
@@ -6615,9 +6631,9 @@ function kg(a, e, t) {
|
|
|
6615
6631
|
l = l.nextSibling;
|
|
6616
6632
|
let u = l ? l.nodeType == 3 ? Qt(l, 0, r ? 0 : 1) : l.nodeType == 1 ? l : null : null;
|
|
6617
6633
|
if (u)
|
|
6618
|
-
return Ni(
|
|
6634
|
+
return Ni(_a(u, -1), !0);
|
|
6619
6635
|
}
|
|
6620
|
-
return Ni(
|
|
6636
|
+
return Ni(_a(i.nodeType == 3 ? Qt(i) : i, -t), t >= 0);
|
|
6621
6637
|
}
|
|
6622
6638
|
function Ni(a, e) {
|
|
6623
6639
|
if (a.width == 0)
|
|
@@ -7134,7 +7150,7 @@ class ii extends En {
|
|
|
7134
7150
|
this.spec.destroy && this.spec.destroy(), super.destroy();
|
|
7135
7151
|
}
|
|
7136
7152
|
}
|
|
7137
|
-
class
|
|
7153
|
+
class Ea extends En {
|
|
7138
7154
|
constructor(e, t, i, n, o, r, s, l, u) {
|
|
7139
7155
|
super(e, [], o, r), this.node = t, this.outerDeco = i, this.innerDeco = n, this.nodeDOM = s;
|
|
7140
7156
|
}
|
|
@@ -7162,7 +7178,7 @@ class xa extends En {
|
|
|
7162
7178
|
} else d || ({ dom: d, contentDOM: f } = ri.renderSpec(document, t.type.spec.toDOM(t), null, t.attrs));
|
|
7163
7179
|
!f && !t.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), t.type.spec.draggable && (d.draggable = !0));
|
|
7164
7180
|
let g = d;
|
|
7165
|
-
return d = Cg(d, i, t), u ? l = new OF(e, t, i, n, d, f || null, g, u, o, r + 1) : t.isText ? new sr(e, t, i, n, d, g, o) : new
|
|
7181
|
+
return d = Cg(d, i, t), u ? l = new OF(e, t, i, n, d, f || null, g, u, o, r + 1) : t.isText ? new sr(e, t, i, n, d, g, o) : new Ea(e, t, i, n, d, f || null, g, o, r + 1);
|
|
7166
7182
|
}
|
|
7167
7183
|
parseRule() {
|
|
7168
7184
|
if (this.node.type.spec.reparseInView)
|
|
@@ -7262,10 +7278,10 @@ class xa extends En {
|
|
|
7262
7278
|
}
|
|
7263
7279
|
function Pu(a, e, t, i, n) {
|
|
7264
7280
|
Cg(i, e, a);
|
|
7265
|
-
let o = new
|
|
7281
|
+
let o = new Ea(void 0, a, e, t, i, i, i, n, 0);
|
|
7266
7282
|
return o.contentDOM && o.updateChildren(n, 0), o;
|
|
7267
7283
|
}
|
|
7268
|
-
class sr extends
|
|
7284
|
+
class sr extends Ea {
|
|
7269
7285
|
constructor(e, t, i, n, o, r, s) {
|
|
7270
7286
|
super(e, t, i, n, o, null, r, s, 0);
|
|
7271
7287
|
}
|
|
@@ -7322,7 +7338,7 @@ class vg extends En {
|
|
|
7322
7338
|
return this.dom.nodeName == "IMG";
|
|
7323
7339
|
}
|
|
7324
7340
|
}
|
|
7325
|
-
class OF extends
|
|
7341
|
+
class OF extends Ea {
|
|
7326
7342
|
constructor(e, t, i, n, o, r, s, l, u, d) {
|
|
7327
7343
|
super(e, t, i, n, o, r, s, u, d), this.spec = l;
|
|
7328
7344
|
}
|
|
@@ -7534,7 +7550,7 @@ class IF {
|
|
|
7534
7550
|
updateNextNode(e, t, i, n, o, r) {
|
|
7535
7551
|
for (let s = this.index; s < this.top.children.length; s++) {
|
|
7536
7552
|
let l = this.top.children[s];
|
|
7537
|
-
if (l instanceof
|
|
7553
|
+
if (l instanceof Ea) {
|
|
7538
7554
|
let u = this.preMatch.matched.get(l);
|
|
7539
7555
|
if (u != null && u != o)
|
|
7540
7556
|
return !1;
|
|
@@ -7553,7 +7569,7 @@ class IF {
|
|
|
7553
7569
|
recreateWrapper(e, t, i, n, o, r) {
|
|
7554
7570
|
if (e.dirty || t.isAtom || !e.children.length || !e.node.content.eq(t.content) || !go(i, e.outerDeco) || !n.eq(e.innerDeco))
|
|
7555
7571
|
return null;
|
|
7556
|
-
let s =
|
|
7572
|
+
let s = Ea.create(this.top, t, i, n, o, r);
|
|
7557
7573
|
if (s.contentDOM) {
|
|
7558
7574
|
s.children = e.children, e.children = [];
|
|
7559
7575
|
for (let l of s.children)
|
|
@@ -7563,7 +7579,7 @@ class IF {
|
|
|
7563
7579
|
}
|
|
7564
7580
|
// Insert the node as a newly created node desc.
|
|
7565
7581
|
addNode(e, t, i, n, o) {
|
|
7566
|
-
let r =
|
|
7582
|
+
let r = Ea.create(this.top, e, t, i, n, o);
|
|
7567
7583
|
r.contentDOM && r.updateChildren(n, o + 1), this.top.children.splice(this.index++, 0, r), this.changed = !0;
|
|
7568
7584
|
}
|
|
7569
7585
|
placeWidget(e, t, i) {
|
|
@@ -7807,7 +7823,7 @@ function WF(a) {
|
|
|
7807
7823
|
if (!e)
|
|
7808
7824
|
return;
|
|
7809
7825
|
let t = a.cursorWrapper.dom, i = t.nodeName == "IMG";
|
|
7810
|
-
i ? e.collapse(t.parentNode, ze(t) + 1) : e.collapse(t, 0), !i && !a.state.selection.visible && lt &&
|
|
7826
|
+
i ? e.collapse(t.parentNode, ze(t) + 1) : e.collapse(t, 0), !i && !a.state.selection.visible && lt && xa <= 11 && (t.disabled = !0, t.disabled = !1);
|
|
7811
7827
|
}
|
|
7812
7828
|
function Sg(a, e) {
|
|
7813
7829
|
if (e instanceof X) {
|
|
@@ -7843,7 +7859,7 @@ function ps(a, e) {
|
|
|
7843
7859
|
let { $anchor: t, $head: i } = a.selection, n = e > 0 ? t.max(i) : t.min(i), o = n.parent.inlineContent ? n.depth ? a.doc.resolve(e > 0 ? n.after() : n.before()) : null : n;
|
|
7844
7860
|
return o && le.findFrom(o, e);
|
|
7845
7861
|
}
|
|
7846
|
-
function
|
|
7862
|
+
function ha(a, e) {
|
|
7847
7863
|
return a.dispatch(a.state.tr.setSelection(e).scrollIntoView()), !0;
|
|
7848
7864
|
}
|
|
7849
7865
|
function Uu(a, e, t) {
|
|
@@ -7854,25 +7870,25 @@ function Uu(a, e, t) {
|
|
|
7854
7870
|
if (!o || o.isText || !o.isLeaf)
|
|
7855
7871
|
return !1;
|
|
7856
7872
|
let r = a.state.doc.resolve(n.pos + o.nodeSize * (e < 0 ? -1 : 1));
|
|
7857
|
-
return
|
|
7873
|
+
return ha(a, new Z(i.$anchor, r));
|
|
7858
7874
|
} else if (i.empty) {
|
|
7859
7875
|
if (a.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
7860
7876
|
let n = ps(a.state, e);
|
|
7861
|
-
return n && n instanceof X ?
|
|
7877
|
+
return n && n instanceof X ? ha(a, n) : !1;
|
|
7862
7878
|
} else if (!(kt && t.indexOf("m") > -1)) {
|
|
7863
7879
|
let n = i.$head, o = n.textOffset ? null : e < 0 ? n.nodeBefore : n.nodeAfter, r;
|
|
7864
7880
|
if (!o || o.isText)
|
|
7865
7881
|
return !1;
|
|
7866
7882
|
let s = e < 0 ? n.pos - o.nodeSize : n.pos;
|
|
7867
|
-
return o.isAtom || (r = a.docView.descAt(s)) && !r.contentDOM ? X.isSelectable(o) ?
|
|
7883
|
+
return o.isAtom || (r = a.docView.descAt(s)) && !r.contentDOM ? X.isSelectable(o) ? ha(a, new X(e < 0 ? a.state.doc.resolve(n.pos - o.nodeSize) : n)) : xn ? ha(a, new Z(a.state.doc.resolve(e < 0 ? s : s + o.nodeSize))) : !1 : !1;
|
|
7868
7884
|
}
|
|
7869
7885
|
} else return !1;
|
|
7870
7886
|
else {
|
|
7871
7887
|
if (i instanceof X && i.node.isInline)
|
|
7872
|
-
return
|
|
7888
|
+
return ha(a, new Z(e > 0 ? i.$to : i.$from));
|
|
7873
7889
|
{
|
|
7874
7890
|
let n = ps(a.state, e);
|
|
7875
|
-
return n ?
|
|
7891
|
+
return n ? ha(a, n) : !1;
|
|
7876
7892
|
}
|
|
7877
7893
|
}
|
|
7878
7894
|
}
|
|
@@ -8025,11 +8041,11 @@ function Ju(a, e, t) {
|
|
|
8025
8041
|
if (!n.parent.inlineContent || a.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
8026
8042
|
let r = ps(a.state, e);
|
|
8027
8043
|
if (r && r instanceof X)
|
|
8028
|
-
return
|
|
8044
|
+
return ha(a, r);
|
|
8029
8045
|
}
|
|
8030
8046
|
if (!n.parent.inlineContent) {
|
|
8031
8047
|
let r = e < 0 ? n : o, s = i instanceof ct ? le.near(r, e) : le.findFrom(r, e);
|
|
8032
|
-
return s ?
|
|
8048
|
+
return s ? ha(a, s) : !1;
|
|
8033
8049
|
}
|
|
8034
8050
|
return !1;
|
|
8035
8051
|
}
|
|
@@ -8156,7 +8172,7 @@ function Ag(a, e, t, i, n) {
|
|
|
8156
8172
|
break;
|
|
8157
8173
|
r = g;
|
|
8158
8174
|
}
|
|
8159
|
-
if (s || (s = (a.someProp("clipboardParser") || a.someProp("domParser") ||
|
|
8175
|
+
if (s || (s = (a.someProp("clipboardParser") || a.someProp("domParser") || va.fromSchema(a.state.schema)).parseSlice(r, {
|
|
8160
8176
|
preserveWhitespace: !!(l || d),
|
|
8161
8177
|
context: n,
|
|
8162
8178
|
ruleFromNode(g) {
|
|
@@ -8296,7 +8312,7 @@ function l0(a) {
|
|
|
8296
8312
|
}
|
|
8297
8313
|
Ke && a.dom.addEventListener("input", () => null), ks(a);
|
|
8298
8314
|
}
|
|
8299
|
-
function
|
|
8315
|
+
function wa(a, e) {
|
|
8300
8316
|
a.input.lastSelectionOrigin = e, a.input.lastSelectionTime = Date.now();
|
|
8301
8317
|
}
|
|
8302
8318
|
function u0(a) {
|
|
@@ -8338,7 +8354,7 @@ it.keydown = (a, e) => {
|
|
|
8338
8354
|
a.input.lastIOSEnter = i, a.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
8339
8355
|
a.input.lastIOSEnter == i && (a.someProp("handleKeyDown", (n) => n(a, $a(13, "Enter"))), a.input.lastIOSEnter = 0);
|
|
8340
8356
|
}, 200);
|
|
8341
|
-
} else a.someProp("handleKeyDown", (i) => i(a, t)) || ZF(a, t) ? t.preventDefault() :
|
|
8357
|
+
} else a.someProp("handleKeyDown", (i) => i(a, t)) || ZF(a, t) ? t.preventDefault() : wa(a, "key");
|
|
8342
8358
|
};
|
|
8343
8359
|
it.keyup = (a, e) => {
|
|
8344
8360
|
e.keyCode == 16 && (a.input.shiftKey = !1);
|
|
@@ -8437,7 +8453,7 @@ at.mousedown = (a, e) => {
|
|
|
8437
8453
|
let i = hl(a), n = Date.now(), o = "singleClick";
|
|
8438
8454
|
n - a.input.lastClick.time < 500 && g0(t, a.input.lastClick) && !t[Ig] && a.input.lastClick.button == t.button && (a.input.lastClick.type == "singleClick" ? o = "doubleClick" : a.input.lastClick.type == "doubleClick" && (o = "tripleClick")), a.input.lastClick = { time: n, x: t.clientX, y: t.clientY, type: o, button: t.button };
|
|
8439
8455
|
let r = a.posAtCoords(lr(t));
|
|
8440
|
-
r && (o == "singleClick" ? (a.input.mouseDown && a.input.mouseDown.done(), a.input.mouseDown = new b0(a, r, t, !!i)) : (o == "doubleClick" ? m0 : F0)(a, r.pos, r.inside, t) ? t.preventDefault() :
|
|
8456
|
+
r && (o == "singleClick" ? (a.input.mouseDown && a.input.mouseDown.done(), a.input.mouseDown = new b0(a, r, t, !!i)) : (o == "doubleClick" ? m0 : F0)(a, r.pos, r.inside, t) ? t.preventDefault() : wa(a, "pointer"));
|
|
8441
8457
|
};
|
|
8442
8458
|
class b0 {
|
|
8443
8459
|
constructor(e, t, i, n) {
|
|
@@ -8459,7 +8475,7 @@ class b0 {
|
|
|
8459
8475
|
setUneditable: !!(this.target && vt && !this.target.hasAttribute("contentEditable"))
|
|
8460
8476
|
}), this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable) && (this.view.domObserver.stop(), this.mightDrag.addAttr && (this.target.draggable = !0), this.mightDrag.setUneditable && setTimeout(() => {
|
|
8461
8477
|
this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
|
|
8462
|
-
}, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)),
|
|
8478
|
+
}, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), wa(e, "pointer");
|
|
8463
8479
|
}
|
|
8464
8480
|
done() {
|
|
8465
8481
|
this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() => na(this.view)), this.view.input.mouseDown = null;
|
|
@@ -8468,7 +8484,7 @@ class b0 {
|
|
|
8468
8484
|
if (this.done(), !this.view.dom.contains(e.target))
|
|
8469
8485
|
return;
|
|
8470
8486
|
let t = this.pos;
|
|
8471
|
-
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(lr(e))), this.updateAllowDefault(e), this.allowDefault || !t ?
|
|
8487
|
+
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(lr(e))), this.updateAllowDefault(e), this.allowDefault || !t ? wa(this.view, "pointer") : h0(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
8472
8488
|
Ke && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
8473
8489
|
// cursor, but still report that the node is selected
|
|
8474
8490
|
// when asked through getSelection. You'll then get a
|
|
@@ -8476,20 +8492,20 @@ class b0 {
|
|
|
8476
8492
|
// (hidden) cursor is doesn't change the selection, and
|
|
8477
8493
|
// thus doesn't get a reaction from ProseMirror. This
|
|
8478
8494
|
// works around that.
|
|
8479
|
-
$e && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (Fi(this.view, le.near(this.view.state.doc.resolve(t.pos))), e.preventDefault()) :
|
|
8495
|
+
$e && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (Fi(this.view, le.near(this.view.state.doc.resolve(t.pos))), e.preventDefault()) : wa(this.view, "pointer");
|
|
8480
8496
|
}
|
|
8481
8497
|
move(e) {
|
|
8482
|
-
this.updateAllowDefault(e),
|
|
8498
|
+
this.updateAllowDefault(e), wa(this.view, "pointer"), e.buttons == 0 && this.done();
|
|
8483
8499
|
}
|
|
8484
8500
|
updateAllowDefault(e) {
|
|
8485
8501
|
!this.allowDefault && (Math.abs(this.event.x - e.clientX) > 4 || Math.abs(this.event.y - e.clientY) > 4) && (this.allowDefault = !0);
|
|
8486
8502
|
}
|
|
8487
8503
|
}
|
|
8488
8504
|
at.touchstart = (a) => {
|
|
8489
|
-
a.input.lastTouch = Date.now(), hl(a),
|
|
8505
|
+
a.input.lastTouch = Date.now(), hl(a), wa(a, "pointer");
|
|
8490
8506
|
};
|
|
8491
8507
|
at.touchmove = (a) => {
|
|
8492
|
-
a.input.lastTouch = Date.now(),
|
|
8508
|
+
a.input.lastTouch = Date.now(), wa(a, "pointer");
|
|
8493
8509
|
};
|
|
8494
8510
|
at.contextmenu = (a) => hl(a);
|
|
8495
8511
|
function Pg(a, e) {
|
|
@@ -8579,7 +8595,7 @@ function v0(a, e) {
|
|
|
8579
8595
|
t.parentNode && t.parentNode.removeChild(t), a.focus();
|
|
8580
8596
|
}, 50);
|
|
8581
8597
|
}
|
|
8582
|
-
const _n = lt &&
|
|
8598
|
+
const _n = lt && xa < 15 || vi && bF < 604;
|
|
8583
8599
|
at.copy = it.cut = (a, e) => {
|
|
8584
8600
|
let t = e, i = a.state.selection, n = t.type == "cut";
|
|
8585
8601
|
if (i.empty)
|
|
@@ -8752,7 +8768,7 @@ class ho {
|
|
|
8752
8768
|
this.spec.destroy && this.spec.destroy(e);
|
|
8753
8769
|
}
|
|
8754
8770
|
}
|
|
8755
|
-
class
|
|
8771
|
+
class Ca {
|
|
8756
8772
|
constructor(e, t) {
|
|
8757
8773
|
this.attrs = e, this.spec = t || Xa;
|
|
8758
8774
|
}
|
|
@@ -8764,10 +8780,10 @@ class Ea {
|
|
|
8764
8780
|
return t.from < t.to;
|
|
8765
8781
|
}
|
|
8766
8782
|
eq(e) {
|
|
8767
|
-
return this == e || e instanceof
|
|
8783
|
+
return this == e || e instanceof Ca && hn(this.attrs, e.attrs) && hn(this.spec, e.spec);
|
|
8768
8784
|
}
|
|
8769
8785
|
static is(e) {
|
|
8770
|
-
return e.type instanceof
|
|
8786
|
+
return e.type instanceof Ca;
|
|
8771
8787
|
}
|
|
8772
8788
|
destroy() {
|
|
8773
8789
|
}
|
|
@@ -8834,7 +8850,7 @@ class tt {
|
|
|
8834
8850
|
each inline node between `from` and `to`.
|
|
8835
8851
|
*/
|
|
8836
8852
|
static inline(e, t, i, n) {
|
|
8837
|
-
return new tt(e, t, new
|
|
8853
|
+
return new tt(e, t, new Ca(i, n));
|
|
8838
8854
|
}
|
|
8839
8855
|
/**
|
|
8840
8856
|
Creates a node decoration. `from` and `to` should point precisely
|
|
@@ -8855,7 +8871,7 @@ class tt {
|
|
|
8855
8871
|
@internal
|
|
8856
8872
|
*/
|
|
8857
8873
|
get inline() {
|
|
8858
|
-
return this.type instanceof
|
|
8874
|
+
return this.type instanceof Ca;
|
|
8859
8875
|
}
|
|
8860
8876
|
/**
|
|
8861
8877
|
@internal
|
|
@@ -8986,14 +9002,14 @@ class Be {
|
|
|
8986
9002
|
let o = e + 1, r = o + t.content.size;
|
|
8987
9003
|
for (let s = 0; s < this.local.length; s++) {
|
|
8988
9004
|
let l = this.local[s];
|
|
8989
|
-
if (l.from < r && l.to > o && l.type instanceof
|
|
9005
|
+
if (l.from < r && l.to > o && l.type instanceof Ca) {
|
|
8990
9006
|
let u = Math.max(o, l.from) - o, d = Math.min(r, l.to) - o;
|
|
8991
9007
|
u < d && (n || (n = [])).push(l.copy(u, d));
|
|
8992
9008
|
}
|
|
8993
9009
|
}
|
|
8994
9010
|
if (n) {
|
|
8995
9011
|
let s = new Be(n.sort(Qa), ci);
|
|
8996
|
-
return i ? new
|
|
9012
|
+
return i ? new ba([s, i]) : s;
|
|
8997
9013
|
}
|
|
8998
9014
|
return i || We;
|
|
8999
9015
|
}
|
|
@@ -9025,11 +9041,11 @@ class Be {
|
|
|
9025
9041
|
localsInner(e) {
|
|
9026
9042
|
if (this == We)
|
|
9027
9043
|
return ci;
|
|
9028
|
-
if (e.inlineContent || !this.local.some(
|
|
9044
|
+
if (e.inlineContent || !this.local.some(Ca.is))
|
|
9029
9045
|
return this.local;
|
|
9030
9046
|
let t = [];
|
|
9031
9047
|
for (let i = 0; i < this.local.length; i++)
|
|
9032
|
-
this.local[i].type instanceof
|
|
9048
|
+
this.local[i].type instanceof Ca || t.push(this.local[i]);
|
|
9033
9049
|
return t;
|
|
9034
9050
|
}
|
|
9035
9051
|
forEachSet(e) {
|
|
@@ -9039,13 +9055,13 @@ class Be {
|
|
|
9039
9055
|
Be.empty = new Be([], []);
|
|
9040
9056
|
Be.removeOverlap = Fl;
|
|
9041
9057
|
const We = Be.empty;
|
|
9042
|
-
class
|
|
9058
|
+
class ba {
|
|
9043
9059
|
constructor(e) {
|
|
9044
9060
|
this.members = e;
|
|
9045
9061
|
}
|
|
9046
9062
|
map(e, t) {
|
|
9047
9063
|
const i = this.members.map((n) => n.map(e, t, Xa));
|
|
9048
|
-
return
|
|
9064
|
+
return ba.from(i);
|
|
9049
9065
|
}
|
|
9050
9066
|
forChild(e, t) {
|
|
9051
9067
|
if (t.isLeaf)
|
|
@@ -9053,12 +9069,12 @@ class pa {
|
|
|
9053
9069
|
let i = [];
|
|
9054
9070
|
for (let n = 0; n < this.members.length; n++) {
|
|
9055
9071
|
let o = this.members[n].forChild(e, t);
|
|
9056
|
-
o != We && (o instanceof
|
|
9072
|
+
o != We && (o instanceof ba ? i = i.concat(o.members) : i.push(o));
|
|
9057
9073
|
}
|
|
9058
|
-
return
|
|
9074
|
+
return ba.from(i);
|
|
9059
9075
|
}
|
|
9060
9076
|
eq(e) {
|
|
9061
|
-
if (!(e instanceof
|
|
9077
|
+
if (!(e instanceof ba) || e.members.length != this.members.length)
|
|
9062
9078
|
return !1;
|
|
9063
9079
|
for (let t = 0; t < this.members.length; t++)
|
|
9064
9080
|
if (!this.members[t].eq(e.members[t]))
|
|
@@ -9089,7 +9105,7 @@ class pa {
|
|
|
9089
9105
|
case 1:
|
|
9090
9106
|
return e[0];
|
|
9091
9107
|
default:
|
|
9092
|
-
return new
|
|
9108
|
+
return new ba(e.every((t) => t instanceof Be) ? e : e.reduce((t, i) => t.concat(i instanceof Be ? i : i.members), []));
|
|
9093
9109
|
}
|
|
9094
9110
|
}
|
|
9095
9111
|
forEachSet(e) {
|
|
@@ -9229,7 +9245,7 @@ function Tr(a) {
|
|
|
9229
9245
|
return a.someProp("decorations", (t) => {
|
|
9230
9246
|
let i = t(a.state);
|
|
9231
9247
|
i && i != We && e.push(i);
|
|
9232
|
-
}), a.cursorWrapper && e.push(Be.create(a.state.doc, [a.cursorWrapper.deco])),
|
|
9248
|
+
}), a.cursorWrapper && e.push(Be.create(a.state.doc, [a.cursorWrapper.deco])), ba.from(e);
|
|
9233
9249
|
}
|
|
9234
9250
|
const q0 = {
|
|
9235
9251
|
childList: !0,
|
|
@@ -9238,7 +9254,7 @@ const q0 = {
|
|
|
9238
9254
|
attributes: !0,
|
|
9239
9255
|
attributeOldValue: !0,
|
|
9240
9256
|
subtree: !0
|
|
9241
|
-
}, A0 = lt &&
|
|
9257
|
+
}, A0 = lt && xa <= 11;
|
|
9242
9258
|
class M0 {
|
|
9243
9259
|
constructor() {
|
|
9244
9260
|
this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
|
|
@@ -9258,7 +9274,7 @@ class T0 {
|
|
|
9258
9274
|
this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new M0(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((i) => {
|
|
9259
9275
|
for (let n = 0; n < i.length; n++)
|
|
9260
9276
|
this.queue.push(i[n]);
|
|
9261
|
-
lt &&
|
|
9277
|
+
lt && xa <= 11 && i.some((n) => n.type == "childList" && n.removedNodes.length || n.type == "characterData" && n.oldValue.length > n.target.nodeValue.length) ? this.flushSoon() : Ke && e.composing && i.some((n) => n.type == "childList" && n.target.nodeName == "TR") ? (e.input.badSafariComposition = !0, this.flushSoon()) : this.flush();
|
|
9262
9278
|
}), A0 && (this.onCharData = (i) => {
|
|
9263
9279
|
this.queue.push({ target: i.target, type: "characterData", oldValue: i.prevValue }), this.flushSoon();
|
|
9264
9280
|
}), this.onSelectionChange = this.onSelectionChange.bind(this);
|
|
@@ -9299,7 +9315,7 @@ class T0 {
|
|
|
9299
9315
|
if (Wu(this.view)) {
|
|
9300
9316
|
if (this.suppressingSelectionUpdates)
|
|
9301
9317
|
return na(this.view);
|
|
9302
|
-
if (lt &&
|
|
9318
|
+
if (lt && xa <= 11 && !this.view.state.selection.empty) {
|
|
9303
9319
|
let e = this.view.domSelectionRange();
|
|
9304
9320
|
if (e.focusNode && ai(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
|
|
9305
9321
|
return this.flushSoon();
|
|
@@ -9389,7 +9405,7 @@ class T0 {
|
|
|
9389
9405
|
if (i.contentDOM && i.contentDOM != i.dom && !i.contentDOM.contains(e.target))
|
|
9390
9406
|
return { from: i.posBefore, to: i.posAfter };
|
|
9391
9407
|
let n = e.previousSibling, o = e.nextSibling;
|
|
9392
|
-
if (lt &&
|
|
9408
|
+
if (lt && xa <= 11 && e.addedNodes.length)
|
|
9393
9409
|
for (let d = 0; d < e.addedNodes.length; d++) {
|
|
9394
9410
|
let { previousSibling: f, nextSibling: g } = e.addedNodes[d];
|
|
9395
9411
|
(!f || Array.prototype.indexOf.call(e.addedNodes, f) < 0) && (n = f), (!g || Array.prototype.indexOf.call(e.addedNodes, g) < 0) && (o = g);
|
|
@@ -9472,7 +9488,7 @@ function P0(a, e, t) {
|
|
|
9472
9488
|
if (!b || b.size)
|
|
9473
9489
|
break;
|
|
9474
9490
|
}
|
|
9475
|
-
let f = a.state.doc, g = a.someProp("domParser") ||
|
|
9491
|
+
let f = a.state.doc, g = a.someProp("domParser") || va.fromSchema(a.state.schema), _ = f.resolve(r), c = null, h = g.parse(i, {
|
|
9476
9492
|
topNode: _.parent,
|
|
9477
9493
|
topMatch: _.parent.contentMatchAt(_.index()),
|
|
9478
9494
|
topOpen: !0,
|
|
@@ -9538,7 +9554,7 @@ function $0(a, e, t, i, n) {
|
|
|
9538
9554
|
}
|
|
9539
9555
|
return;
|
|
9540
9556
|
}
|
|
9541
|
-
a.state.selection.from < a.state.selection.to && c.start == c.endB && a.state.selection instanceof Z && (c.start > a.state.selection.from && c.start <= a.state.selection.from + 2 && a.state.selection.from >= u.from ? c.start = a.state.selection.from : c.endA < a.state.selection.to && c.endA >= a.state.selection.to - 2 && a.state.selection.to <= u.to && (c.endB += a.state.selection.to - c.endA, c.endA = a.state.selection.to)), lt &&
|
|
9557
|
+
a.state.selection.from < a.state.selection.to && c.start == c.endB && a.state.selection instanceof Z && (c.start > a.state.selection.from && c.start <= a.state.selection.from + 2 && a.state.selection.from >= u.from ? c.start = a.state.selection.from : c.endA < a.state.selection.to && c.endA >= a.state.selection.to - 2 && a.state.selection.to <= u.to && (c.endB += a.state.selection.to - c.endA, c.endA = a.state.selection.to)), lt && xa <= 11 && c.endB == c.start + 1 && c.endA == c.start && c.start > u.from && u.doc.textBetween(c.start - u.from - 1, c.start - u.from + 1) == " " && (c.start--, c.endA--, c.endB--);
|
|
9542
9558
|
let h = u.doc.resolveNoCache(c.start - u.from), m = u.doc.resolveNoCache(c.endB - u.from), F = d.resolve(c.start), b = h.sameParent(m) && h.parent.inlineContent && F.end() >= c.endA;
|
|
9543
9559
|
if ((vi && a.input.lastIOSEnter > Date.now() - 225 && (!b || n.some((j) => j.nodeName == "DIV" || j.nodeName == "P")) || !b && h.pos < u.doc.content.size && (!h.sameParent(m) || !h.parent.inlineContent) && h.pos < m.pos && !/\S/.test(u.doc.textBetween(h.pos, m.pos, "", ""))) && a.someProp("handleKeyDown", (j) => j(a, $a(13, "Enter")))) {
|
|
9544
9560
|
a.input.lastIOSEnter = 0;
|
|
@@ -9563,7 +9579,7 @@ function $0(a, e, t, i, n) {
|
|
|
9563
9579
|
}, S;
|
|
9564
9580
|
if (b)
|
|
9565
9581
|
if (h.pos == m.pos) {
|
|
9566
|
-
lt &&
|
|
9582
|
+
lt && xa <= 11 && h.parentOffset == 0 && (a.domObserver.suppressSelectionUpdates(), setTimeout(() => na(a), 20));
|
|
9567
9583
|
let j = E(a.state.tr.delete(k, x)), q = d.resolve(c.start).marksAcross(d.resolve(c.endA));
|
|
9568
9584
|
q && j.ensureMarks(q), a.dispatch(j);
|
|
9569
9585
|
} else if (
|
|
@@ -10034,7 +10050,7 @@ function ud(a) {
|
|
|
10034
10050
|
if (a.spec.state || a.spec.filterTransaction || a.spec.appendTransaction)
|
|
10035
10051
|
throw new RangeError("Plugins passed directly to the view must not have a state component");
|
|
10036
10052
|
}
|
|
10037
|
-
var
|
|
10053
|
+
var Ba = {
|
|
10038
10054
|
8: "Backspace",
|
|
10039
10055
|
9: "Tab",
|
|
10040
10056
|
10: "Enter",
|
|
@@ -10113,13 +10129,13 @@ var Ca = {
|
|
|
10113
10129
|
221: "}",
|
|
10114
10130
|
222: '"'
|
|
10115
10131
|
}, J0 = typeof navigator < "u" && /Mac/.test(navigator.platform), G0 = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
10116
|
-
for (var Re = 0; Re < 10; Re++)
|
|
10117
|
-
for (var Re = 1; Re <= 24; Re++)
|
|
10132
|
+
for (var Re = 0; Re < 10; Re++) Ba[48 + Re] = Ba[96 + Re] = String(Re);
|
|
10133
|
+
for (var Re = 1; Re <= 24; Re++) Ba[Re + 111] = "F" + Re;
|
|
10118
10134
|
for (var Re = 65; Re <= 90; Re++)
|
|
10119
|
-
|
|
10120
|
-
for (var Or in
|
|
10135
|
+
Ba[Re] = String.fromCharCode(Re + 32), Fo[Re] = String.fromCharCode(Re);
|
|
10136
|
+
for (var Or in Ba) Fo.hasOwnProperty(Or) || (Fo[Or] = Ba[Or]);
|
|
10121
10137
|
function Y0(a) {
|
|
10122
|
-
var e = J0 && a.metaKey && a.shiftKey && !a.ctrlKey && !a.altKey || G0 && a.shiftKey && a.key && a.key.length == 1 || a.key == "Unidentified", t = !e && a.key || (a.shiftKey ? Fo :
|
|
10138
|
+
var e = J0 && a.metaKey && a.shiftKey && !a.ctrlKey && !a.altKey || G0 && a.shiftKey && a.key && a.key.length == 1 || a.key == "Unidentified", t = !e && a.key || (a.shiftKey ? Fo : Ba)[a.keyCode] || a.key || "Unidentified";
|
|
10123
10139
|
return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
|
|
10124
10140
|
}
|
|
10125
10141
|
const X0 = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), Q0 = typeof navigator < "u" && /Win/.test(navigator.platform);
|
|
@@ -10169,7 +10185,7 @@ function pl(a) {
|
|
|
10169
10185
|
return !0;
|
|
10170
10186
|
}
|
|
10171
10187
|
if ((i.altKey || i.metaKey || i.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
|
|
10172
|
-
!(Q0 && i.ctrlKey && i.altKey) && (o =
|
|
10188
|
+
!(Q0 && i.ctrlKey && i.altKey) && (o = Ba[i.keyCode]) && o != n) {
|
|
10173
10189
|
let s = e[Lr(o, i)];
|
|
10174
10190
|
if (s && s(t.state, t.dispatch, t))
|
|
10175
10191
|
return !0;
|
|
@@ -10521,7 +10537,7 @@ function An(a) {
|
|
|
10521
10537
|
return Qg(t);
|
|
10522
10538
|
}
|
|
10523
10539
|
function Fn(a, e, t) {
|
|
10524
|
-
if (a instanceof
|
|
10540
|
+
if (a instanceof Da || a instanceof V)
|
|
10525
10541
|
return a;
|
|
10526
10542
|
t = {
|
|
10527
10543
|
slice: !0,
|
|
@@ -10561,12 +10577,12 @@ function Fn(a, e, t) {
|
|
|
10561
10577
|
}
|
|
10562
10578
|
})
|
|
10563
10579
|
});
|
|
10564
|
-
if (t.slice ?
|
|
10580
|
+
if (t.slice ? va.fromSchema(l).parseSlice(An(a), t.parseOptions) : va.fromSchema(l).parse(An(a), t.parseOptions), t.errorOnInvalidContent && r)
|
|
10565
10581
|
throw new Error("[tiptap error]: Invalid HTML content", {
|
|
10566
10582
|
cause: new Error(`Invalid element found: ${s}`)
|
|
10567
10583
|
});
|
|
10568
10584
|
}
|
|
10569
|
-
const o =
|
|
10585
|
+
const o = va.fromSchema(e);
|
|
10570
10586
|
return t.slice ? o.parseSlice(An(a), t.parseOptions).content : o.parse(An(a), t.parseOptions);
|
|
10571
10587
|
}
|
|
10572
10588
|
return Fn("", e, t);
|
|
@@ -10576,7 +10592,7 @@ function kp(a, e, t) {
|
|
|
10576
10592
|
if (i < e)
|
|
10577
10593
|
return;
|
|
10578
10594
|
const n = a.steps[i];
|
|
10579
|
-
if (!(n instanceof
|
|
10595
|
+
if (!(n instanceof Et || n instanceof ut))
|
|
10580
10596
|
return;
|
|
10581
10597
|
const o = a.mapping.maps[i];
|
|
10582
10598
|
let r = 0;
|
|
@@ -10707,7 +10723,7 @@ var Mp = (a) => ({ editor: e, view: t, tr: i, dispatch: n }) => {
|
|
|
10707
10723
|
d && n && i.maybeStep(d);
|
|
10708
10724
|
}), !0;
|
|
10709
10725
|
};
|
|
10710
|
-
function
|
|
10726
|
+
function Sa(a, e, t = {}) {
|
|
10711
10727
|
const { from: i, to: n, empty: o } = a.selection, r = e ? je(e, a.schema) : null, s = [];
|
|
10712
10728
|
a.doc.nodesBetween(i, n, (f, g) => {
|
|
10713
10729
|
if (f.isText)
|
|
@@ -10724,7 +10740,7 @@ function Ba(a, e, t = {}) {
|
|
|
10724
10740
|
}
|
|
10725
10741
|
var Tp = (a, e = {}) => ({ state: t, dispatch: i }) => {
|
|
10726
10742
|
const n = je(a, t.schema);
|
|
10727
|
-
return
|
|
10743
|
+
return Sa(t, n, e) ? Ym(t, i) : !1;
|
|
10728
10744
|
}, Np = () => ({ state: a, dispatch: e }) => fg(a, e), Op = (a) => ({ state: e, dispatch: t }) => {
|
|
10729
10745
|
const i = je(a, e.schema);
|
|
10730
10746
|
return lF(i)(e, t);
|
|
@@ -11266,9 +11282,9 @@ function vs(a, e, t = {}) {
|
|
|
11266
11282
|
}
|
|
11267
11283
|
function Wi(a, e, t = {}) {
|
|
11268
11284
|
if (!e)
|
|
11269
|
-
return
|
|
11285
|
+
return Sa(a, null, t) || vs(a, null, t);
|
|
11270
11286
|
const i = fr(e, a.schema);
|
|
11271
|
-
return i === "node" ?
|
|
11287
|
+
return i === "node" ? Sa(a, e, t) : i === "mark" ? vs(a, e, t) : !1;
|
|
11272
11288
|
}
|
|
11273
11289
|
var i2 = (a, e) => {
|
|
11274
11290
|
const { $from: t, $to: i, $anchor: n } = a.selection;
|
|
@@ -11550,7 +11566,7 @@ var h2 = ({ keepMarks: a = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
|
|
|
11550
11566
|
if (i === void 0)
|
|
11551
11567
|
return !0;
|
|
11552
11568
|
const n = a.doc.nodeAt(i);
|
|
11553
|
-
return t.node.type === n?.type &&
|
|
11569
|
+
return t.node.type === n?.type && Ta(a.doc, t.pos) && a.join(t.pos), !0;
|
|
11554
11570
|
}, Pr = (a, e) => {
|
|
11555
11571
|
const t = si((r) => r.type === e)(a.selection);
|
|
11556
11572
|
if (!t)
|
|
@@ -11559,7 +11575,7 @@ var h2 = ({ keepMarks: a = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
|
|
|
11559
11575
|
if (i === void 0)
|
|
11560
11576
|
return !0;
|
|
11561
11577
|
const n = a.doc.nodeAt(i);
|
|
11562
|
-
return t.node.type === n?.type &&
|
|
11578
|
+
return t.node.type === n?.type && Ta(a.doc, i) && a.join(i), !0;
|
|
11563
11579
|
}, F2 = (a, e, t, i = {}) => ({ editor: n, tr: o, state: r, dispatch: s, chain: l, commands: u, can: d }) => {
|
|
11564
11580
|
const { extensions: f, splittableMarks: g } = n.extensionManager, _ = je(a, r.schema), c = je(e, r.schema), { selection: h, storedMarks: m } = r, { $from: F, $to: b } = h, k = F.blockRange(b), x = m || h.$to.parentOffset && h.$from.marks();
|
|
11565
11581
|
if (!k)
|
|
@@ -11579,12 +11595,12 @@ var h2 = ({ keepMarks: a = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
|
|
|
11579
11595
|
const { extendEmptyMarkRange: o = !1 } = t, r = oa(a, i.schema);
|
|
11580
11596
|
return vs(i, r, e) ? n.unsetMark(r, { extendEmptyMarkRange: o }) : n.setMark(r, e);
|
|
11581
11597
|
}, b2 = (a, e, t = {}) => ({ state: i, commands: n }) => {
|
|
11582
|
-
const o = je(a, i.schema), r = je(e, i.schema), s =
|
|
11598
|
+
const o = je(a, i.schema), r = je(e, i.schema), s = Sa(i, o, t);
|
|
11583
11599
|
let l;
|
|
11584
11600
|
return i.selection.$anchor.sameParent(i.selection.$head) && (l = i.selection.$anchor.parent.attrs), s ? n.setNode(r, l) : n.setNode(o, { ...l, ...t });
|
|
11585
11601
|
}, y2 = (a, e = {}) => ({ state: t, commands: i }) => {
|
|
11586
11602
|
const n = je(a, t.schema);
|
|
11587
|
-
return
|
|
11603
|
+
return Sa(t, n, e) ? i.lift(n) : i.wrapIn(n, e);
|
|
11588
11604
|
}, k2 = () => ({ state: a, dispatch: e }) => {
|
|
11589
11605
|
const t = a.plugins;
|
|
11590
11606
|
for (let i = 0; i < t.length; i += 1) {
|
|
@@ -11890,7 +11906,7 @@ var jl = class {
|
|
|
11890
11906
|
const e = new this.constructor({ ...this.config, ...a });
|
|
11891
11907
|
return e.parent = this, this.child = e, e.name = "name" in a ? a.name : e.parent.name, e;
|
|
11892
11908
|
}
|
|
11893
|
-
},
|
|
11909
|
+
}, Oa = class g_ extends jl {
|
|
11894
11910
|
constructor() {
|
|
11895
11911
|
super(...arguments), this.type = "mark";
|
|
11896
11912
|
}
|
|
@@ -12117,7 +12133,7 @@ var cr = class {
|
|
|
12117
12133
|
n
|
|
12118
12134
|
);
|
|
12119
12135
|
let s = {};
|
|
12120
|
-
if (i.type === "mark" && oe(i, "exitable", n) && (s.ArrowRight = () =>
|
|
12136
|
+
if (i.type === "mark" && oe(i, "exitable", n) && (s.ArrowRight = () => Oa.handleExit({ editor: a, mark: i })), r) {
|
|
12121
12137
|
const g = Object.fromEntries(
|
|
12122
12138
|
Object.entries(r()).map(([_, c]) => [_, () => c({ editor: a })])
|
|
12123
12139
|
);
|
|
@@ -13348,7 +13364,7 @@ function Ci(a) {
|
|
|
13348
13364
|
n().updateAttributes(f, o).run();
|
|
13349
13365
|
}
|
|
13350
13366
|
const d = r.doc.resolve(t.from - 1).nodeBefore;
|
|
13351
|
-
d && d.type === a.type &&
|
|
13367
|
+
d && d.type === a.type && Ta(r.doc, t.from - 1) && (!a.joinPredicate || a.joinPredicate(i, d)) && r.join(t.from - 1);
|
|
13352
13368
|
},
|
|
13353
13369
|
undoable: a.undoable
|
|
13354
13370
|
});
|
|
@@ -13952,7 +13968,7 @@ var Oe = class extends $2 {
|
|
|
13952
13968
|
element: o
|
|
13953
13969
|
}), i.createNodeViews();
|
|
13954
13970
|
});
|
|
13955
|
-
}),
|
|
13971
|
+
}), Bt(() => {
|
|
13956
13972
|
const i = a.editor;
|
|
13957
13973
|
i && (i.contentComponent = null, i.appContext = null);
|
|
13958
13974
|
}), { rootEl: e };
|
|
@@ -13964,7 +13980,7 @@ var Oe = class extends $2 {
|
|
|
13964
13980
|
}
|
|
13965
13981
|
});
|
|
13966
13982
|
}
|
|
13967
|
-
}),
|
|
13983
|
+
}), La = ie({
|
|
13968
13984
|
name: "NodeViewContent",
|
|
13969
13985
|
props: {
|
|
13970
13986
|
as: {
|
|
@@ -14010,7 +14026,7 @@ var Oe = class extends $2 {
|
|
|
14010
14026
|
const e = _c();
|
|
14011
14027
|
return we(() => {
|
|
14012
14028
|
e.value = new Oe(a);
|
|
14013
|
-
}),
|
|
14029
|
+
}), Bt(() => {
|
|
14014
14030
|
var t, i, n, o;
|
|
14015
14031
|
const r = (i = (t = e.value) == null ? void 0 : t.view.dom) == null ? void 0 : i.parentNode, s = r?.cloneNode(!0);
|
|
14016
14032
|
(n = r?.parentNode) == null || n.replaceChild(s, r), (o = e.value) == null || o.destroy();
|
|
@@ -14325,7 +14341,7 @@ ${t}
|
|
|
14325
14341
|
})
|
|
14326
14342
|
];
|
|
14327
14343
|
}
|
|
14328
|
-
}), o3 = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, r3 = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, s3 = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, l3 = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, u3 =
|
|
14344
|
+
}), o3 = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, r3 = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, s3 = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, l3 = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, u3 = Oa.create({
|
|
14329
14345
|
name: "bold",
|
|
14330
14346
|
addOptions() {
|
|
14331
14347
|
return {
|
|
@@ -14400,7 +14416,7 @@ ${t}
|
|
|
14400
14416
|
})
|
|
14401
14417
|
];
|
|
14402
14418
|
}
|
|
14403
|
-
}), d3 = /(^|[^`])`([^`]+)`(?!`)$/, f3 = /(^|[^`])`([^`]+)`(?!`)/g, g3 =
|
|
14419
|
+
}), d3 = /(^|[^`])`([^`]+)`(?!`)$/, f3 = /(^|[^`])`([^`]+)`(?!`)/g, g3 = Oa.create({
|
|
14404
14420
|
name: "code",
|
|
14405
14421
|
addOptions() {
|
|
14406
14422
|
return {
|
|
@@ -14825,7 +14841,7 @@ ${t}
|
|
|
14825
14841
|
})
|
|
14826
14842
|
];
|
|
14827
14843
|
}
|
|
14828
|
-
}), b3 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, y3 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, k3 = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, w3 = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, D3 =
|
|
14844
|
+
}), b3 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, y3 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, k3 = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, w3 = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, D3 = Oa.create({
|
|
14829
14845
|
name: "italic",
|
|
14830
14846
|
addOptions() {
|
|
14831
14847
|
return {
|
|
@@ -15041,7 +15057,7 @@ st.prototype = {
|
|
|
15041
15057
|
return n.j[a] = r, r;
|
|
15042
15058
|
}
|
|
15043
15059
|
};
|
|
15044
|
-
const de = (a, e, t, i, n) => a.ta(e, t, i, n), Se = (a, e, t, i, n) => a.tr(e, t, i, n), bd = (a, e, t, i, n) => a.ts(e, t, i, n), H = (a, e, t, i, n) => a.tt(e, t, i, n), Yt = "WORD", qs = "UWORD", B_ = "ASCIINUMERICAL", S_ = "ALPHANUMERICAL", bn = "LOCALHOST", As = "TLD", Ms = "UTLD", Qn = "SCHEME", hi = "SLASH_SCHEME", Tl = "NUM", Ts = "WS", Nl = "NL", tn = "OPENBRACE", an = "CLOSEBRACE", ko = "OPENBRACKET", wo = "CLOSEBRACKET", Do = "OPENPAREN", vo = "CLOSEPAREN", xo = "OPENANGLEBRACKET", Eo = "CLOSEANGLEBRACKET", Co = "FULLWIDTHLEFTPAREN", Bo = "FULLWIDTHRIGHTPAREN", So = "LEFTCORNERBRACKET", jo = "RIGHTCORNERBRACKET", qo = "LEFTWHITECORNERBRACKET", Ao = "RIGHTWHITECORNERBRACKET", Mo = "FULLWIDTHLESSTHAN", To = "FULLWIDTHGREATERTHAN", No = "AMPERSAND", Oo = "APOSTROPHE", Lo = "ASTERISK",
|
|
15060
|
+
const de = (a, e, t, i, n) => a.ta(e, t, i, n), Se = (a, e, t, i, n) => a.tr(e, t, i, n), bd = (a, e, t, i, n) => a.ts(e, t, i, n), H = (a, e, t, i, n) => a.tt(e, t, i, n), Yt = "WORD", qs = "UWORD", B_ = "ASCIINUMERICAL", S_ = "ALPHANUMERICAL", bn = "LOCALHOST", As = "TLD", Ms = "UTLD", Qn = "SCHEME", hi = "SLASH_SCHEME", Tl = "NUM", Ts = "WS", Nl = "NL", tn = "OPENBRACE", an = "CLOSEBRACE", ko = "OPENBRACKET", wo = "CLOSEBRACKET", Do = "OPENPAREN", vo = "CLOSEPAREN", xo = "OPENANGLEBRACKET", Eo = "CLOSEANGLEBRACKET", Co = "FULLWIDTHLEFTPAREN", Bo = "FULLWIDTHRIGHTPAREN", So = "LEFTCORNERBRACKET", jo = "RIGHTCORNERBRACKET", qo = "LEFTWHITECORNERBRACKET", Ao = "RIGHTWHITECORNERBRACKET", Mo = "FULLWIDTHLESSTHAN", To = "FULLWIDTHGREATERTHAN", No = "AMPERSAND", Oo = "APOSTROPHE", Lo = "ASTERISK", ma = "AT", Io = "BACKSLASH", Po = "BACKTICK", zo = "CARET", ya = "COLON", Ol = "COMMA", Ro = "DOLLAR", Nt = "DOT", $o = "EQUALS", Ll = "EXCLAMATION", yt = "HYPHEN", nn = "PERCENT", Ho = "PIPE", Vo = "PLUS", Wo = "POUND", on = "QUERY", Il = "QUOTE", j_ = "FULLWIDTHMIDDLEDOT", Pl = "SEMI", Ot = "SLASH", rn = "TILDE", Uo = "UNDERSCORE", q_ = "EMOJI", Ko = "SYM";
|
|
15045
15061
|
var A_ = /* @__PURE__ */ Object.freeze({
|
|
15046
15062
|
__proto__: null,
|
|
15047
15063
|
ALPHANUMERICAL: S_,
|
|
@@ -15049,7 +15065,7 @@ var A_ = /* @__PURE__ */ Object.freeze({
|
|
|
15049
15065
|
APOSTROPHE: Oo,
|
|
15050
15066
|
ASCIINUMERICAL: B_,
|
|
15051
15067
|
ASTERISK: Lo,
|
|
15052
|
-
AT:
|
|
15068
|
+
AT: ma,
|
|
15053
15069
|
BACKSLASH: Io,
|
|
15054
15070
|
BACKTICK: Po,
|
|
15055
15071
|
CARET: zo,
|
|
@@ -15057,7 +15073,7 @@ var A_ = /* @__PURE__ */ Object.freeze({
|
|
|
15057
15073
|
CLOSEBRACE: an,
|
|
15058
15074
|
CLOSEBRACKET: wo,
|
|
15059
15075
|
CLOSEPAREN: vo,
|
|
15060
|
-
COLON:
|
|
15076
|
+
COLON: ya,
|
|
15061
15077
|
COMMA: Ol,
|
|
15062
15078
|
DOLLAR: Ro,
|
|
15063
15079
|
DOT: Nt,
|
|
@@ -15107,7 +15123,7 @@ function A3(a = []) {
|
|
|
15107
15123
|
const e = {};
|
|
15108
15124
|
st.groups = e;
|
|
15109
15125
|
const t = new st();
|
|
15110
|
-
On == null && (On = kd(v3)), Ln == null && (Ln = kd(x3)), H(t, "'", Oo), H(t, "{", tn), H(t, "}", an), H(t, "[", ko), H(t, "]", wo), H(t, "(", Do), H(t, ")", vo), H(t, "<", xo), H(t, ">", Eo), H(t, "(", Co), H(t, ")", Bo), H(t, "「", So), H(t, "」", jo), H(t, "『", qo), H(t, "』", Ao), H(t, "<", Mo), H(t, ">", To), H(t, "&", No), H(t, "*", Lo), H(t, "@",
|
|
15126
|
+
On == null && (On = kd(v3)), Ln == null && (Ln = kd(x3)), H(t, "'", Oo), H(t, "{", tn), H(t, "}", an), H(t, "[", ko), H(t, "]", wo), H(t, "(", Do), H(t, ")", vo), H(t, "<", xo), H(t, ">", Eo), H(t, "(", Co), H(t, ")", Bo), H(t, "「", So), H(t, "」", jo), H(t, "『", qo), H(t, "』", Ao), H(t, "<", Mo), H(t, ">", To), H(t, "&", No), H(t, "*", Lo), H(t, "@", ma), H(t, "`", Po), H(t, "^", zo), H(t, ":", ya), H(t, ",", Ol), H(t, "$", Ro), H(t, ".", Nt), H(t, "=", $o), H(t, "!", Ll), H(t, "-", yt), H(t, "%", nn), H(t, "|", Ho), H(t, "+", Vo), H(t, "#", Wo), H(t, "?", on), H(t, '"', Il), H(t, "/", Ot), H(t, ";", Pl), H(t, "~", rn), H(t, "_", Uo), H(t, "\\", Io), H(t, "・", j_);
|
|
15111
15127
|
const i = Se(t, Gt, Tl, {
|
|
15112
15128
|
[Cs]: !0
|
|
15113
15129
|
});
|
|
@@ -15457,18 +15473,18 @@ const Dd = hr("email", {
|
|
|
15457
15473
|
*/
|
|
15458
15474
|
hasProtocol() {
|
|
15459
15475
|
const a = this.tk;
|
|
15460
|
-
return a.length >= 2 && a[0].t !== bn && a[1].t ===
|
|
15476
|
+
return a.length >= 2 && a[0].t !== bn && a[1].t === ya;
|
|
15461
15477
|
}
|
|
15462
15478
|
}), bt = (a) => new st(a);
|
|
15463
15479
|
function N3({
|
|
15464
15480
|
groups: a
|
|
15465
15481
|
}) {
|
|
15466
|
-
const e = a.domain.concat([No, Lo,
|
|
15482
|
+
const e = a.domain.concat([No, Lo, ma, Io, Po, zo, Ro, $o, yt, Tl, nn, Ho, Vo, Wo, Ot, Ko, rn, Uo]), t = [Oo, ya, Ol, Nt, Ll, nn, on, Il, Pl, xo, Eo, tn, an, wo, ko, Do, vo, Co, Bo, So, jo, qo, Ao, Mo, To], i = [No, Oo, Lo, Io, Po, zo, Ro, $o, yt, tn, an, nn, Ho, Vo, Wo, on, Ot, Ko, rn, Uo], n = bt(), o = H(n, rn);
|
|
15467
15483
|
de(o, i, o), de(o, a.domain, o);
|
|
15468
15484
|
const r = bt(), s = bt(), l = bt();
|
|
15469
15485
|
de(n, a.domain, r), de(n, a.scheme, s), de(n, a.slashscheme, l), de(r, i, o), de(r, a.domain, r);
|
|
15470
|
-
const u = H(r,
|
|
15471
|
-
H(o,
|
|
15486
|
+
const u = H(r, ma);
|
|
15487
|
+
H(o, ma, u), H(s, ma, u), H(l, ma, u);
|
|
15472
15488
|
const d = H(o, Nt);
|
|
15473
15489
|
de(d, i, o), de(d, a.domain, o);
|
|
15474
15490
|
const f = bt();
|
|
@@ -15479,17 +15495,17 @@ function N3({
|
|
|
15479
15495
|
de(g, a.tld, _), de(g, a.utld, _), H(u, bn, _);
|
|
15480
15496
|
const c = H(f, yt);
|
|
15481
15497
|
H(c, yt, c), de(c, a.domain, f), de(_, a.domain, f), H(_, Nt, g), H(_, yt, c);
|
|
15482
|
-
const h = H(_,
|
|
15498
|
+
const h = H(_, ya);
|
|
15483
15499
|
de(h, a.numeric, Dd);
|
|
15484
15500
|
const m = H(r, yt), F = H(r, Nt);
|
|
15485
15501
|
H(m, yt, m), de(m, a.domain, r), de(F, i, o), de(F, a.domain, r);
|
|
15486
15502
|
const b = bt(In);
|
|
15487
|
-
de(F, a.tld, b), de(F, a.utld, b), de(b, a.domain, r), de(b, i, o), H(b, Nt, F), H(b, yt, m), H(b,
|
|
15488
|
-
const k = H(b,
|
|
15503
|
+
de(F, a.tld, b), de(F, a.utld, b), de(b, a.domain, r), de(b, i, o), H(b, Nt, F), H(b, yt, m), H(b, ma, u);
|
|
15504
|
+
const k = H(b, ya), x = bt(In);
|
|
15489
15505
|
de(k, a.numeric, x);
|
|
15490
15506
|
const E = bt(In), S = bt();
|
|
15491
15507
|
de(E, e, E), de(E, t, S), de(S, e, E), de(S, t, S), H(b, Ot, E), H(x, Ot, E);
|
|
15492
|
-
const j = H(s,
|
|
15508
|
+
const j = H(s, ya), q = H(l, ya), A = H(q, Ot), I = H(A, Ot);
|
|
15493
15509
|
de(s, a.domain, r), H(s, Nt, F), H(s, yt, m), de(l, a.domain, r), H(l, Nt, F), H(l, yt, m), de(j, a.domain, E), H(j, Ot, E), H(j, on, E), de(I, a.domain, E), de(I, e, E), H(I, Ot, E);
|
|
15494
15510
|
const z = [
|
|
15495
15511
|
[tn, an],
|
|
@@ -15704,7 +15720,7 @@ function K3(a) {
|
|
|
15704
15720
|
}
|
|
15705
15721
|
});
|
|
15706
15722
|
}
|
|
15707
|
-
function
|
|
15723
|
+
function Ia(a, e) {
|
|
15708
15724
|
const t = ["http", "https", "ftp", "ftps", "mailto", "tel", "callto", "sms", "cid", "xmpp"];
|
|
15709
15725
|
return e && e.forEach((i) => {
|
|
15710
15726
|
const n = typeof i == "string" ? i : i.scheme;
|
|
@@ -15717,7 +15733,7 @@ function La(a, e) {
|
|
|
15717
15733
|
)
|
|
15718
15734
|
);
|
|
15719
15735
|
}
|
|
15720
|
-
var O_ =
|
|
15736
|
+
var O_ = Oa.create({
|
|
15721
15737
|
name: "link",
|
|
15722
15738
|
priority: 1e3,
|
|
15723
15739
|
keepOnSplit: !1,
|
|
@@ -15750,7 +15766,7 @@ var O_ = Na.create({
|
|
|
15750
15766
|
rel: "noopener noreferrer nofollow",
|
|
15751
15767
|
class: null
|
|
15752
15768
|
},
|
|
15753
|
-
isAllowedUri: (a, e) => !!
|
|
15769
|
+
isAllowedUri: (a, e) => !!Ia(a, e.protocols),
|
|
15754
15770
|
validate: (a) => !!a,
|
|
15755
15771
|
shouldAutoLink: (a) => {
|
|
15756
15772
|
const e = /^[a-z][a-z0-9+.-]*:\/\//i.test(a), t = /^[a-z][a-z0-9+.-]*:/i.test(a);
|
|
@@ -15790,7 +15806,7 @@ var O_ = Na.create({
|
|
|
15790
15806
|
getAttrs: (a) => {
|
|
15791
15807
|
const e = a.getAttribute("href");
|
|
15792
15808
|
return !e || !this.options.isAllowedUri(e, {
|
|
15793
|
-
defaultValidate: (t) => !!
|
|
15809
|
+
defaultValidate: (t) => !!Ia(t, this.options.protocols),
|
|
15794
15810
|
protocols: this.options.protocols,
|
|
15795
15811
|
defaultProtocol: this.options.defaultProtocol
|
|
15796
15812
|
}) ? !1 : null;
|
|
@@ -15800,7 +15816,7 @@ var O_ = Na.create({
|
|
|
15800
15816
|
},
|
|
15801
15817
|
renderHTML({ HTMLAttributes: a }) {
|
|
15802
15818
|
return this.options.isAllowedUri(a.href, {
|
|
15803
|
-
defaultValidate: (e) => !!
|
|
15819
|
+
defaultValidate: (e) => !!Ia(e, this.options.protocols),
|
|
15804
15820
|
protocols: this.options.protocols,
|
|
15805
15821
|
defaultProtocol: this.options.defaultProtocol
|
|
15806
15822
|
}) ? ["a", fe(this.options.HTMLAttributes, a), 0] : ["a", fe(this.options.HTMLAttributes, { ...a, href: "" }), 0];
|
|
@@ -15820,7 +15836,7 @@ var O_ = Na.create({
|
|
|
15820
15836
|
setLink: (a) => ({ chain: e }) => {
|
|
15821
15837
|
const { href: t } = a;
|
|
15822
15838
|
return this.options.isAllowedUri(t, {
|
|
15823
|
-
defaultValidate: (i) => !!
|
|
15839
|
+
defaultValidate: (i) => !!Ia(i, this.options.protocols),
|
|
15824
15840
|
protocols: this.options.protocols,
|
|
15825
15841
|
defaultProtocol: this.options.defaultProtocol
|
|
15826
15842
|
}) ? e().setMark(this.name, a).setMeta("preventAutolink", !0).run() : !1;
|
|
@@ -15828,7 +15844,7 @@ var O_ = Na.create({
|
|
|
15828
15844
|
toggleLink: (a) => ({ chain: e }) => {
|
|
15829
15845
|
const { href: t } = a || {};
|
|
15830
15846
|
return t && !this.options.isAllowedUri(t, {
|
|
15831
|
-
defaultValidate: (i) => !!
|
|
15847
|
+
defaultValidate: (i) => !!Ia(i, this.options.protocols),
|
|
15832
15848
|
protocols: this.options.protocols,
|
|
15833
15849
|
defaultProtocol: this.options.defaultProtocol
|
|
15834
15850
|
}) ? !1 : e().toggleMark(this.name, a, { extendEmptyMarkRange: !0 }).setMeta("preventAutolink", !0).run();
|
|
@@ -15844,7 +15860,7 @@ var O_ = Na.create({
|
|
|
15844
15860
|
if (a) {
|
|
15845
15861
|
const { protocols: t, defaultProtocol: i } = this.options, n = N_(a).filter(
|
|
15846
15862
|
(o) => o.isLink && this.options.isAllowedUri(o.value, {
|
|
15847
|
-
defaultValidate: (r) => !!
|
|
15863
|
+
defaultValidate: (r) => !!Ia(r, t),
|
|
15848
15864
|
protocols: t,
|
|
15849
15865
|
defaultProtocol: i
|
|
15850
15866
|
})
|
|
@@ -15878,7 +15894,7 @@ var O_ = Na.create({
|
|
|
15878
15894
|
type: this.type,
|
|
15879
15895
|
defaultProtocol: this.options.defaultProtocol,
|
|
15880
15896
|
validate: (i) => this.options.isAllowedUri(i, {
|
|
15881
|
-
defaultValidate: (n) => !!
|
|
15897
|
+
defaultValidate: (n) => !!Ia(n, e),
|
|
15882
15898
|
protocols: e,
|
|
15883
15899
|
defaultProtocol: t
|
|
15884
15900
|
}),
|
|
@@ -16074,7 +16090,7 @@ var Cn = (a, e) => {
|
|
|
16074
16090
|
return !0;
|
|
16075
16091
|
if (a.state.selection.from !== a.state.selection.to)
|
|
16076
16092
|
return !1;
|
|
16077
|
-
if (!
|
|
16093
|
+
if (!Sa(a.state, e) && P_(a.state, e, t)) {
|
|
16078
16094
|
const { $anchor: s } = a.state.selection, l = a.state.doc.resolve(s.before() - 1), u = [];
|
|
16079
16095
|
l.node().descendants((g, _) => {
|
|
16080
16096
|
g.type.name === e && u.push({ node: g, pos: _ });
|
|
@@ -16085,7 +16101,7 @@ var Cn = (a, e) => {
|
|
|
16085
16101
|
const f = a.state.doc.resolve(l.start() + d.pos + 1);
|
|
16086
16102
|
return a.chain().cut({ from: s.start() - 1, to: s.end() + 1 }, f.end()).joinForward().run();
|
|
16087
16103
|
}
|
|
16088
|
-
if (!
|
|
16104
|
+
if (!Sa(a.state, e) || !n2(a.state))
|
|
16089
16105
|
return !1;
|
|
16090
16106
|
const i = Cn(e, a.state);
|
|
16091
16107
|
if (!i)
|
|
@@ -16099,7 +16115,7 @@ var Cn = (a, e) => {
|
|
|
16099
16115
|
const t = Hl(a, e), i = Cn(a, e);
|
|
16100
16116
|
return !i || !t ? !1 : t < i.depth;
|
|
16101
16117
|
}, Os = (a, e) => {
|
|
16102
|
-
if (!
|
|
16118
|
+
if (!Sa(a.state, e) || !i2(a.state, e))
|
|
16103
16119
|
return !1;
|
|
16104
16120
|
const { selection: t } = a.state, { $from: i, $to: n } = t;
|
|
16105
16121
|
return !t.empty && i.sameParent(n) ? !1 : $_(e, a.state) ? a.chain().focus(a.state.selection.from + 4).lift(e).joinBackward().run() : H_(e, a.state) ? a.chain().joinForward().joinBackward().run() : a.commands.joinItemForward();
|
|
@@ -16661,7 +16677,7 @@ var qd = " ", sb = " ", lb = Fe.create({
|
|
|
16661
16677
|
"Mod-Alt-0": () => this.editor.commands.setParagraph()
|
|
16662
16678
|
};
|
|
16663
16679
|
}
|
|
16664
|
-
}), ub = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, db = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, fb =
|
|
16680
|
+
}), ub = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, db = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, fb = Oa.create({
|
|
16665
16681
|
name: "strike",
|
|
16666
16682
|
addOptions() {
|
|
16667
16683
|
return {
|
|
@@ -16728,7 +16744,7 @@ var qd = " ", sb = " ", lb = Fe.create({
|
|
|
16728
16744
|
text: a.text || ""
|
|
16729
16745
|
}),
|
|
16730
16746
|
renderMarkdown: (a) => a.text || ""
|
|
16731
|
-
}), K_ =
|
|
16747
|
+
}), K_ = Oa.create({
|
|
16732
16748
|
name: "underline",
|
|
16733
16749
|
addOptions() {
|
|
16734
16750
|
return {
|
|
@@ -17164,7 +17180,7 @@ var Db = /* @__PURE__ */ (function(a) {
|
|
|
17164
17180
|
}, e;
|
|
17165
17181
|
})(Ne);
|
|
17166
17182
|
const vb = 500;
|
|
17167
|
-
class
|
|
17183
|
+
class St {
|
|
17168
17184
|
constructor(e, t) {
|
|
17169
17185
|
this.items = e, this.eventCount = t;
|
|
17170
17186
|
}
|
|
@@ -17194,7 +17210,7 @@ class Bt {
|
|
|
17194
17210
|
} else
|
|
17195
17211
|
r.maybeStep(f.step);
|
|
17196
17212
|
if (f.selection)
|
|
17197
|
-
return s = n ? f.selection.map(n.slice(o)) : f.selection, l = new
|
|
17213
|
+
return s = n ? f.selection.map(n.slice(o)) : f.selection, l = new St(this.items.slice(0, i).append(d.reverse().concat(u)), this.eventCount - 1), !1;
|
|
17198
17214
|
}, this.items.length, 0), { remaining: l, transform: r, selection: s };
|
|
17199
17215
|
}
|
|
17200
17216
|
// Create a new branch with the given transform added.
|
|
@@ -17205,7 +17221,7 @@ class Bt {
|
|
|
17205
17221
|
(_ = l && l.merge(g)) && (g = _, d ? o.pop() : s = s.slice(0, s.length - 1)), o.push(g), t && (r++, t = void 0), n || (l = g);
|
|
17206
17222
|
}
|
|
17207
17223
|
let u = r - i.depth;
|
|
17208
|
-
return u > Eb && (s = xb(s, u), r -= u), new
|
|
17224
|
+
return u > Eb && (s = xb(s, u), r -= u), new St(s.append(o), r);
|
|
17209
17225
|
}
|
|
17210
17226
|
remapping(e, t) {
|
|
17211
17227
|
let i = new gn();
|
|
@@ -17215,7 +17231,7 @@ class Bt {
|
|
|
17215
17231
|
}, e, t), i;
|
|
17216
17232
|
}
|
|
17217
17233
|
addMaps(e) {
|
|
17218
|
-
return this.eventCount == 0 ? this : new
|
|
17234
|
+
return this.eventCount == 0 ? this : new St(this.items.append(e.map((t) => new Lt(t))), this.eventCount);
|
|
17219
17235
|
}
|
|
17220
17236
|
// When the collab module receives remote changes, the history has
|
|
17221
17237
|
// to know about those, so that it can adjust the steps that were
|
|
@@ -17244,7 +17260,7 @@ class Bt {
|
|
|
17244
17260
|
let u = [];
|
|
17245
17261
|
for (let g = t; g < r; g++)
|
|
17246
17262
|
u.push(new Lt(o.maps[g]));
|
|
17247
|
-
let d = this.items.slice(0, n).append(u).append(i), f = new
|
|
17263
|
+
let d = this.items.slice(0, n).append(u).append(i), f = new St(d, s);
|
|
17248
17264
|
return f.emptyItemCount() > vb && (f = f.compress(this.items.length - i.length)), f;
|
|
17249
17265
|
}
|
|
17250
17266
|
emptyItemCount() {
|
|
@@ -17273,10 +17289,10 @@ class Bt {
|
|
|
17273
17289
|
(g = n.length && n[_].merge(f)) ? n[_] = g : n.push(f);
|
|
17274
17290
|
}
|
|
17275
17291
|
} else r.map && i--;
|
|
17276
|
-
}, this.items.length, 0), new
|
|
17292
|
+
}, this.items.length, 0), new St(Ne.from(n.reverse()), o);
|
|
17277
17293
|
}
|
|
17278
17294
|
}
|
|
17279
|
-
|
|
17295
|
+
St.empty = new St(Ne.empty, 0);
|
|
17280
17296
|
function xb(a, e) {
|
|
17281
17297
|
let t;
|
|
17282
17298
|
return a.forEach((i, n) => {
|
|
@@ -17296,7 +17312,7 @@ class Lt {
|
|
|
17296
17312
|
}
|
|
17297
17313
|
}
|
|
17298
17314
|
}
|
|
17299
|
-
class
|
|
17315
|
+
class Fa {
|
|
17300
17316
|
constructor(e, t, i, n, o) {
|
|
17301
17317
|
this.done = e, this.undone = t, this.prevRanges = i, this.prevTime = n, this.prevComposition = o;
|
|
17302
17318
|
}
|
|
@@ -17306,16 +17322,16 @@ function Cb(a, e, t, i) {
|
|
|
17306
17322
|
let n = t.getMeta(Za), o;
|
|
17307
17323
|
if (n)
|
|
17308
17324
|
return n.historyState;
|
|
17309
|
-
t.getMeta(jb) && (a = new
|
|
17325
|
+
t.getMeta(jb) && (a = new Fa(a.done, a.undone, null, 0, -1));
|
|
17310
17326
|
let r = t.getMeta("appendedTransaction");
|
|
17311
17327
|
if (t.steps.length == 0)
|
|
17312
17328
|
return a;
|
|
17313
17329
|
if (r && r.getMeta(Za))
|
|
17314
|
-
return r.getMeta(Za).redo ? new
|
|
17330
|
+
return r.getMeta(Za).redo ? new Fa(a.done.addTransform(t, void 0, i, Zn(e)), a.undone, Ad(t.mapping.maps), a.prevTime, a.prevComposition) : new Fa(a.done, a.undone.addTransform(t, void 0, i, Zn(e)), null, a.prevTime, a.prevComposition);
|
|
17315
17331
|
if (t.getMeta("addToHistory") !== !1 && !(r && r.getMeta("addToHistory") === !1)) {
|
|
17316
17332
|
let s = t.getMeta("composition"), l = a.prevTime == 0 || !r && a.prevComposition != s && (a.prevTime < (t.time || 0) - i.newGroupDelay || !Bb(t, a.prevRanges)), u = r ? Kr(a.prevRanges, t.mapping) : Ad(t.mapping.maps);
|
|
17317
|
-
return new
|
|
17318
|
-
} else return (o = t.getMeta("rebased")) ? new
|
|
17333
|
+
return new Fa(a.done.addTransform(t, l ? e.selection.getBookmark() : void 0, i, Zn(e)), St.empty, u, t.time, s ?? a.prevComposition);
|
|
17334
|
+
} else return (o = t.getMeta("rebased")) ? new Fa(a.done.rebased(t, o), a.undone.rebased(t, o), Kr(a.prevRanges, t.mapping), a.prevTime, a.prevComposition) : new Fa(a.done.addMaps(t.mapping.maps), a.undone.addMaps(t.mapping.maps), Kr(a.prevRanges, t.mapping), a.prevTime, a.prevComposition);
|
|
17319
17335
|
}
|
|
17320
17336
|
function Bb(a, e) {
|
|
17321
17337
|
if (!e)
|
|
@@ -17348,7 +17364,7 @@ function Sb(a, e, t) {
|
|
|
17348
17364
|
let i = Zn(e), n = Za.get(e).spec.config, o = (t ? a.undone : a.done).popEvent(e, i);
|
|
17349
17365
|
if (!o)
|
|
17350
17366
|
return null;
|
|
17351
|
-
let r = o.selection.resolve(o.transform.doc), s = (t ? a.done : a.undone).addTransform(o.transform, e.selection.getBookmark(), n, i), l = new
|
|
17367
|
+
let r = o.selection.resolve(o.transform.doc), s = (t ? a.done : a.undone).addTransform(o.transform, e.selection.getBookmark(), n, i), l = new Fa(t ? s : o.remaining, t ? o.remaining : s, null, 0, -1);
|
|
17352
17368
|
return o.transform.setSelection(r).setMeta(Za, { redo: t, historyState: l });
|
|
17353
17369
|
}
|
|
17354
17370
|
let Jr = !1, Md = null;
|
|
@@ -17373,7 +17389,7 @@ function qb(a = {}) {
|
|
|
17373
17389
|
key: Za,
|
|
17374
17390
|
state: {
|
|
17375
17391
|
init() {
|
|
17376
|
-
return new
|
|
17392
|
+
return new Fa(St.empty, St.empty, null, 0, -1);
|
|
17377
17393
|
},
|
|
17378
17394
|
apply(e, t, i) {
|
|
17379
17395
|
return Cb(t, i, e, a);
|
|
@@ -18676,7 +18692,7 @@ class kn extends Ge {
|
|
|
18676
18692
|
}
|
|
18677
18693
|
}
|
|
18678
18694
|
Ge.jsonID("removeNodeMark", kn);
|
|
18679
|
-
class
|
|
18695
|
+
class pa extends Ge {
|
|
18680
18696
|
/**
|
|
18681
18697
|
The given `slice` should fit the 'gap' between `from` and
|
|
18682
18698
|
`to`—the depths must line up, and the surrounding nodes must be
|
|
@@ -18696,21 +18712,21 @@ class Fa extends Ge {
|
|
|
18696
18712
|
return new gt([this.from, this.to - this.from, this.slice.size]);
|
|
18697
18713
|
}
|
|
18698
18714
|
invert(e) {
|
|
18699
|
-
return new
|
|
18715
|
+
return new pa(this.from, this.from + this.slice.size, e.slice(this.from, this.to));
|
|
18700
18716
|
}
|
|
18701
18717
|
map(e) {
|
|
18702
18718
|
let t = e.mapResult(this.from, 1), i = e.mapResult(this.to, -1);
|
|
18703
|
-
return t.deletedAcross && i.deletedAcross ? null : new
|
|
18719
|
+
return t.deletedAcross && i.deletedAcross ? null : new pa(t.pos, Math.max(t.pos, i.pos), this.slice);
|
|
18704
18720
|
}
|
|
18705
18721
|
merge(e) {
|
|
18706
|
-
if (!(e instanceof
|
|
18722
|
+
if (!(e instanceof pa) || e.structure || this.structure)
|
|
18707
18723
|
return null;
|
|
18708
18724
|
if (this.from + this.slice.size == e.from && !this.slice.openEnd && !e.slice.openStart) {
|
|
18709
18725
|
let t = this.slice.size + e.slice.size == 0 ? Te.empty : new Te(this.slice.content.append(e.slice.content), this.slice.openStart, e.slice.openEnd);
|
|
18710
|
-
return new
|
|
18726
|
+
return new pa(this.from, this.to + (e.to - e.from), t, this.structure);
|
|
18711
18727
|
} else if (e.to == this.from && !this.slice.openStart && !e.slice.openEnd) {
|
|
18712
18728
|
let t = this.slice.size + e.slice.size == 0 ? Te.empty : new Te(e.slice.content.append(this.slice.content), e.slice.openStart, this.slice.openEnd);
|
|
18713
|
-
return new
|
|
18729
|
+
return new pa(e.from, this.to, t, this.structure);
|
|
18714
18730
|
} else
|
|
18715
18731
|
return null;
|
|
18716
18732
|
}
|
|
@@ -18724,10 +18740,10 @@ class Fa extends Ge {
|
|
|
18724
18740
|
static fromJSON(e, t) {
|
|
18725
18741
|
if (typeof t.from != "number" || typeof t.to != "number")
|
|
18726
18742
|
throw new RangeError("Invalid input for ReplaceStep.fromJSON");
|
|
18727
|
-
return new
|
|
18743
|
+
return new pa(t.from, t.to, Te.fromJSON(e, t.slice), !!t.structure);
|
|
18728
18744
|
}
|
|
18729
18745
|
}
|
|
18730
|
-
Ge.jsonID("replace",
|
|
18746
|
+
Ge.jsonID("replace", pa);
|
|
18731
18747
|
class sn extends Ge {
|
|
18732
18748
|
/**
|
|
18733
18749
|
Create a replace-around step with the given range and gap.
|
|
@@ -19019,7 +19035,7 @@ const t4 = ve.create({
|
|
|
19019
19035
|
});
|
|
19020
19036
|
},
|
|
19021
19037
|
setFormValues(a) {
|
|
19022
|
-
const e =
|
|
19038
|
+
const e = ca(a);
|
|
19023
19039
|
this.$props.editor.commands.setFormValues({
|
|
19024
19040
|
id: this.$props.node.attrs.id,
|
|
19025
19041
|
values: JSON.parse(JSON.stringify(e)),
|
|
@@ -19027,7 +19043,7 @@ const t4 = ve.create({
|
|
|
19027
19043
|
});
|
|
19028
19044
|
},
|
|
19029
19045
|
setOutput(a) {
|
|
19030
|
-
const e =
|
|
19046
|
+
const e = ca(a);
|
|
19031
19047
|
this.$props.editor.commands.setOutput({
|
|
19032
19048
|
id: this.$props.node.attrs.id,
|
|
19033
19049
|
values: JSON.parse(JSON.stringify(e)),
|
|
@@ -19162,7 +19178,7 @@ const o4 = /* @__PURE__ */ De(a4, [["render", n4], ["__scopeId", "data-v-a5a2678
|
|
|
19162
19178
|
}
|
|
19163
19179
|
return we(() => {
|
|
19164
19180
|
r(), e.editor.on("transaction", r);
|
|
19165
|
-
}),
|
|
19181
|
+
}), Bt(() => {
|
|
19166
19182
|
e.editor.off("transaction", r);
|
|
19167
19183
|
}), (l, u) => (D(), B("div", {
|
|
19168
19184
|
"data-id": l.node.attrs.id,
|
|
@@ -19654,7 +19670,7 @@ const $n = /* @__PURE__ */ De(h4, [["render", p4]]), b4 = { class: "flex flex-co
|
|
|
19654
19670
|
window.addEventListener("keydown", te), t.isSlashMenuMode || document.querySelector("#content-manager-editor-slash-menu button")?.focus(), mt(() => {
|
|
19655
19671
|
t.editor.commands.setMeta("floatingMenu", "updatePosition");
|
|
19656
19672
|
});
|
|
19657
|
-
}),
|
|
19673
|
+
}), Bt(() => {
|
|
19658
19674
|
window.removeEventListener("keydown", te);
|
|
19659
19675
|
}), (O, M) => {
|
|
19660
19676
|
const se = N("Kbd");
|
|
@@ -19670,7 +19686,7 @@ const $n = /* @__PURE__ */ De(h4, [["render", p4]]), b4 = { class: "flex flex-co
|
|
|
19670
19686
|
onClick: K.onClick
|
|
19671
19687
|
}, {
|
|
19672
19688
|
default: v(() => [
|
|
19673
|
-
(D(), R(
|
|
19689
|
+
(D(), R(ka(K.icon), { class: "size-4" })),
|
|
19674
19690
|
$(" " + Q(K.label), 1)
|
|
19675
19691
|
]),
|
|
19676
19692
|
_: 2
|
|
@@ -19687,7 +19703,7 @@ const $n = /* @__PURE__ */ De(h4, [["render", p4]]), b4 = { class: "flex flex-co
|
|
|
19687
19703
|
onClick: K.onClick
|
|
19688
19704
|
}, {
|
|
19689
19705
|
default: v(() => [
|
|
19690
|
-
(D(), R(
|
|
19706
|
+
(D(), R(ka(K.icon), { class: "size-4" })),
|
|
19691
19707
|
$(" " + Q(K.label), 1)
|
|
19692
19708
|
]),
|
|
19693
19709
|
_: 2
|
|
@@ -19704,7 +19720,7 @@ const $n = /* @__PURE__ */ De(h4, [["render", p4]]), b4 = { class: "flex flex-co
|
|
|
19704
19720
|
onClick: K.onClick
|
|
19705
19721
|
}, {
|
|
19706
19722
|
default: v(() => [
|
|
19707
|
-
(D(), R(
|
|
19723
|
+
(D(), R(ka(K.icon), { class: "size-4" })),
|
|
19708
19724
|
$(" " + Q(K.label), 1)
|
|
19709
19725
|
]),
|
|
19710
19726
|
_: 2
|
|
@@ -19725,7 +19741,7 @@ const $n = /* @__PURE__ */ De(h4, [["render", p4]]), b4 = { class: "flex flex-co
|
|
|
19725
19741
|
y("div", {
|
|
19726
19742
|
class: ae(["absolute size-5 rounded top-0 left-0 opacity-40 group-hover:opacity-90 transition-all duration-300", `bg-${K.tint}`])
|
|
19727
19743
|
}, null, 2),
|
|
19728
|
-
(D(), R(
|
|
19744
|
+
(D(), R(ka(w(lu)[K.icon]), { class: "relative size-4" }))
|
|
19729
19745
|
]),
|
|
19730
19746
|
$(" " + Q(K.displayName), 1)
|
|
19731
19747
|
]),
|
|
@@ -20030,7 +20046,7 @@ const $n = /* @__PURE__ */ De(h4, [["render", p4]]), b4 = { class: "flex flex-co
|
|
|
20030
20046
|
y("div", z4, Q(q.node.attrs.paddingTop), 1)
|
|
20031
20047
|
], 6),
|
|
20032
20048
|
y("div", R4, [
|
|
20033
|
-
p(w(
|
|
20049
|
+
p(w(La), { class: "flex flex-col flex-1 min-h-12 focus-visible:outline-none" })
|
|
20034
20050
|
]),
|
|
20035
20051
|
y("div", {
|
|
20036
20052
|
class: ae(["tiptap-container-padding-resizer -bottom mt-4", { "-resizing": u.value, "-hovering-dragger": l.value }]),
|
|
@@ -20522,7 +20538,7 @@ const $n = /* @__PURE__ */ De(h4, [["render", p4]]), b4 = { class: "flex flex-co
|
|
|
20522
20538
|
};
|
|
20523
20539
|
return we(() => {
|
|
20524
20540
|
F(), e.editor.on("selectionUpdate", F), e.editor.on("focus", F), e.editor.on("blur", F), e.editor.on("transaction", F);
|
|
20525
|
-
}),
|
|
20541
|
+
}), Bt(() => {
|
|
20526
20542
|
e.editor.off("selectionUpdate", F), e.editor.off("focus", F), e.editor.off("blur", F), e.editor.off("transaction", F);
|
|
20527
20543
|
}), (b, k) => (D(), R(w(nt), {
|
|
20528
20544
|
ref_key: "el",
|
|
@@ -20546,7 +20562,7 @@ const $n = /* @__PURE__ */ De(h4, [["render", p4]]), b4 = { class: "flex flex-co
|
|
|
20546
20562
|
_: 1
|
|
20547
20563
|
}, 16)),
|
|
20548
20564
|
y("div", Z4, [
|
|
20549
|
-
p(w(
|
|
20565
|
+
p(w(La), {
|
|
20550
20566
|
style: ge(g()),
|
|
20551
20567
|
class: "flex flex-1 min-h-[100px]"
|
|
20552
20568
|
}, null, 8, ["style"])
|
|
@@ -20822,7 +20838,7 @@ const $n = /* @__PURE__ */ De(h4, [["render", p4]]), b4 = { class: "flex flex-co
|
|
|
20822
20838
|
};
|
|
20823
20839
|
return we(() => {
|
|
20824
20840
|
S(), e.editor.on("selectionUpdate", S), e.editor.on("focus", S), e.editor.on("blur", S), e.editor.on("transaction", S);
|
|
20825
|
-
}),
|
|
20841
|
+
}), Bt(() => {
|
|
20826
20842
|
e.editor.off("selectionUpdate", S), e.editor.off("focus", S), e.editor.off("blur", S), e.editor.off("transaction", S);
|
|
20827
20843
|
}), (j, q) => (D(), R(w(nt), {
|
|
20828
20844
|
ref_key: "el",
|
|
@@ -20846,7 +20862,7 @@ const $n = /* @__PURE__ */ De(h4, [["render", p4]]), b4 = { class: "flex flex-co
|
|
|
20846
20862
|
_: 1
|
|
20847
20863
|
}, 16)),
|
|
20848
20864
|
y("div", ny, [
|
|
20849
|
-
p(w(
|
|
20865
|
+
p(w(La), {
|
|
20850
20866
|
style: ge({ gap: `${c.value}px`, flexWrap: e.node.attrs.wrap === "YES" ? "wrap" : "nowrap" }),
|
|
20851
20867
|
class: ae(["flex flex-1 min-h-[100px]", g.value ? "flex-col" : ""])
|
|
20852
20868
|
}, null, 8, ["style", "class"])
|
|
@@ -21079,7 +21095,7 @@ const $n = /* @__PURE__ */ De(h4, [["render", p4]]), b4 = { class: "flex flex-co
|
|
|
21079
21095
|
])]),
|
|
21080
21096
|
_: 1
|
|
21081
21097
|
}, 16)),
|
|
21082
|
-
p(w(
|
|
21098
|
+
p(w(La), { class: "w-full" })
|
|
21083
21099
|
]),
|
|
21084
21100
|
_: 1
|
|
21085
21101
|
}, 8, ["data-id", "class"]));
|
|
@@ -21273,7 +21289,7 @@ const $n = /* @__PURE__ */ De(h4, [["render", p4]]), b4 = { class: "flex flex-co
|
|
|
21273
21289
|
class: "relative shadow-sm rounded-lg border border-current w-full p-4",
|
|
21274
21290
|
style: ge(d(w(u)))
|
|
21275
21291
|
}, [
|
|
21276
|
-
p(w(
|
|
21292
|
+
p(w(La), { class: "w-full" }),
|
|
21277
21293
|
f.node.childCount === 0 && f.editor.isEditable ? (D(), B("span", gy, Q(w(t) && !w(i) ? "Type / for commands" : "Empty text"), 1)) : P("", !0),
|
|
21278
21294
|
!w(n) && !w(t) && f.editor.isEditable ? (D(), B("div", {
|
|
21279
21295
|
key: 1,
|
|
@@ -22025,15 +22041,15 @@ const $n = /* @__PURE__ */ De(h4, [["render", p4]]), b4 = { class: "flex flex-co
|
|
|
22025
22041
|
]),
|
|
22026
22042
|
_: 1
|
|
22027
22043
|
}, 16)),
|
|
22028
|
-
(D(), R(
|
|
22044
|
+
(D(), R(ka(`h${s.node.attrs.level}`), { class: "w-full text-[var(--title-color)]" }, {
|
|
22029
22045
|
default: v(() => [
|
|
22030
|
-
p(w(
|
|
22046
|
+
p(w(La), {
|
|
22031
22047
|
class: ae(["w-full", { "pointer-events-none": !w(i) && s.editor.isEditable }])
|
|
22032
22048
|
}, null, 8, ["class"])
|
|
22033
22049
|
]),
|
|
22034
22050
|
_: 1
|
|
22035
22051
|
})),
|
|
22036
|
-
s.node.childCount === 0 && s.editor.isEditable ? (D(), R(
|
|
22052
|
+
s.node.childCount === 0 && s.editor.isEditable ? (D(), R(ka(`h${s.node.attrs.level}`), {
|
|
22037
22053
|
key: 2,
|
|
22038
22054
|
class: "absolute left-2 w-full pointer-events-none text-muted-foreground truncate",
|
|
22039
22055
|
contenteditable: "false"
|
|
@@ -22173,7 +22189,7 @@ const $n = /* @__PURE__ */ De(h4, [["render", p4]]), b4 = { class: "flex flex-co
|
|
|
22173
22189
|
])]),
|
|
22174
22190
|
_: 1
|
|
22175
22191
|
}, 16)),
|
|
22176
|
-
p(w(
|
|
22192
|
+
p(w(La), {
|
|
22177
22193
|
class: ae(["w-full", { "pointer-events-none": !w(i) && s.editor.isEditable }])
|
|
22178
22194
|
}, null, 8, ["class"]),
|
|
22179
22195
|
s.node.childCount === 0 && s.editor.isEditable ? (D(), B("span", zy, Q(w(i) && !w(t) ? "Type / for commands" : "Empty text"), 1)) : P("", !0),
|
|
@@ -22466,7 +22482,7 @@ const $n = /* @__PURE__ */ De(h4, [["render", p4]]), b4 = { class: "flex flex-co
|
|
|
22466
22482
|
contenteditable: "false"
|
|
22467
22483
|
}),
|
|
22468
22484
|
y("div", Jy, [
|
|
22469
|
-
p(w(
|
|
22485
|
+
p(w(La))
|
|
22470
22486
|
]),
|
|
22471
22487
|
!w(i) && !w(t) && l.editor.isEditable ? (D(), B("button", {
|
|
22472
22488
|
key: 2,
|
|
@@ -22768,7 +22784,7 @@ const $n = /* @__PURE__ */ De(h4, [["render", p4]]), b4 = { class: "flex flex-co
|
|
|
22768
22784
|
}
|
|
22769
22785
|
}), zd = 3, tk = 400, ak = 0.35, ik = "transform 0.25s cubic-bezier(.4,1.6,.6,1)", nk = 0, ok = -12;
|
|
22770
22786
|
let Ue = null, Ps = 0, zs = 0, It = 0, pi = 0, to = null;
|
|
22771
|
-
function
|
|
22787
|
+
function Pa() {
|
|
22772
22788
|
document.body.classList.remove("tiptap-node-dragging"), document.querySelectorAll(".tiptap-node--dragged").forEach((a) => {
|
|
22773
22789
|
a.classList.remove("tiptap-node--dragged");
|
|
22774
22790
|
}), lk();
|
|
@@ -22835,10 +22851,10 @@ function uk(a, e) {
|
|
|
22835
22851
|
const dk = ve.create({
|
|
22836
22852
|
name: "nodeDragPointerEventsFix",
|
|
22837
22853
|
addProseMirrorPlugins() {
|
|
22838
|
-
const a = () =>
|
|
22854
|
+
const a = () => Pa(), e = () => Pa(), t = (n) => {
|
|
22839
22855
|
n.clientX === 0 && n.clientY === 0 || sk(n.clientX, n.clientY);
|
|
22840
22856
|
}, i = () => {
|
|
22841
|
-
document.body.classList.contains("tiptap-node-dragging") &&
|
|
22857
|
+
document.body.classList.contains("tiptap-node-dragging") && Pa();
|
|
22842
22858
|
};
|
|
22843
22859
|
return document.addEventListener("dragend", a, !0), document.addEventListener("drop", e, !0), document.addEventListener("drag", t, !0), document.addEventListener("mousedown", i, !0), [
|
|
22844
22860
|
new _e({
|
|
@@ -22848,21 +22864,21 @@ const dk = ve.create({
|
|
|
22848
22864
|
const r = o, s = r.target;
|
|
22849
22865
|
if (!s) return !1;
|
|
22850
22866
|
if (uk(n, s))
|
|
22851
|
-
return r.preventDefault(),
|
|
22867
|
+
return r.preventDefault(), Pa(), !0;
|
|
22852
22868
|
r.dataTransfer && (r.dataTransfer.effectAllowed = "move", r.dataTransfer.setDragImage(f1, 0, 0));
|
|
22853
22869
|
const l = s.closest?.("[data-node-view-wrapper]");
|
|
22854
22870
|
return document.body.classList.add("tiptap-node-dragging"), l && (l.classList.add("tiptap-node--dragged"), rk(l, r.clientX, r.clientY)), !1;
|
|
22855
22871
|
},
|
|
22856
22872
|
dragend() {
|
|
22857
|
-
return
|
|
22873
|
+
return Pa(), !1;
|
|
22858
22874
|
},
|
|
22859
22875
|
drop() {
|
|
22860
|
-
return
|
|
22876
|
+
return Pa(), !1;
|
|
22861
22877
|
}
|
|
22862
22878
|
}
|
|
22863
22879
|
},
|
|
22864
22880
|
destroy() {
|
|
22865
|
-
|
|
22881
|
+
Pa(), document.removeEventListener("dragend", a, !0), document.removeEventListener("drop", e, !0), document.removeEventListener("drag", t, !0), document.removeEventListener("mousedown", i, !0);
|
|
22866
22882
|
}
|
|
22867
22883
|
})
|
|
22868
22884
|
];
|
|
@@ -22891,7 +22907,7 @@ const dk = ve.create({
|
|
|
22891
22907
|
}
|
|
22892
22908
|
};
|
|
22893
22909
|
}
|
|
22894
|
-
}), gk =
|
|
22910
|
+
}), gk = Oa.create({
|
|
22895
22911
|
name: "customClass",
|
|
22896
22912
|
addOptions() {
|
|
22897
22913
|
return {
|
|
@@ -22938,10 +22954,10 @@ function Rs(a, e, t) {
|
|
|
22938
22954
|
function sa(a, e) {
|
|
22939
22955
|
return typeof a == "function" ? a(e) : a;
|
|
22940
22956
|
}
|
|
22941
|
-
function
|
|
22957
|
+
function Ct(a) {
|
|
22942
22958
|
return a.split("-")[0];
|
|
22943
22959
|
}
|
|
22944
|
-
function
|
|
22960
|
+
function jt(a) {
|
|
22945
22961
|
return a.split("-")[1];
|
|
22946
22962
|
}
|
|
22947
22963
|
function _1(a) {
|
|
@@ -22959,7 +22975,7 @@ function Kl(a) {
|
|
|
22959
22975
|
}
|
|
22960
22976
|
function c1(a, e, t) {
|
|
22961
22977
|
t === void 0 && (t = !1);
|
|
22962
|
-
const i =
|
|
22978
|
+
const i = jt(a), n = Kl(a), o = Ul(n);
|
|
22963
22979
|
let r = n === "x" ? i === (t ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
22964
22980
|
return e.reference[o] > e.floating[o] && (r = Zo(r)), [r, Zo(r)];
|
|
22965
22981
|
}
|
|
@@ -22984,12 +23000,12 @@ function Fk(a, e, t) {
|
|
|
22984
23000
|
}
|
|
22985
23001
|
}
|
|
22986
23002
|
function pk(a, e, t, i) {
|
|
22987
|
-
const n =
|
|
22988
|
-
let o = Fk(
|
|
23003
|
+
const n = jt(a);
|
|
23004
|
+
let o = Fk(Ct(a), t === "start", i);
|
|
22989
23005
|
return n && (o = o.map((r) => r + "-" + n), e && (o = o.concat(o.map(Qo)))), o;
|
|
22990
23006
|
}
|
|
22991
23007
|
function Zo(a) {
|
|
22992
|
-
const e =
|
|
23008
|
+
const e = Ct(a);
|
|
22993
23009
|
return _k[e] + a.slice(e.length);
|
|
22994
23010
|
}
|
|
22995
23011
|
function bk(a) {
|
|
@@ -23032,7 +23048,7 @@ function Wd(a, e, t) {
|
|
|
23032
23048
|
reference: i,
|
|
23033
23049
|
floating: n
|
|
23034
23050
|
} = a;
|
|
23035
|
-
const o = zt(e), r = Kl(e), s = Ul(r), l =
|
|
23051
|
+
const o = zt(e), r = Kl(e), s = Ul(r), l = Ct(e), u = o === "y", d = i.x + i.width / 2 - n.width / 2, f = i.y + i.height / 2 - n.height / 2, g = i[s] / 2 - n[s] / 2;
|
|
23036
23052
|
let _;
|
|
23037
23053
|
switch (l) {
|
|
23038
23054
|
case "top":
|
|
@@ -23065,7 +23081,7 @@ function Wd(a, e, t) {
|
|
|
23065
23081
|
y: i.y
|
|
23066
23082
|
};
|
|
23067
23083
|
}
|
|
23068
|
-
switch (
|
|
23084
|
+
switch (jt(e)) {
|
|
23069
23085
|
case "start":
|
|
23070
23086
|
_[r] -= g * (t && u ? -1 : 1);
|
|
23071
23087
|
break;
|
|
@@ -23208,7 +23224,7 @@ const kk = 50, wk = async (a, e, t) => {
|
|
|
23208
23224
|
}, _ = Kl(n), c = Ul(_), h = await r.getDimensions(u), m = _ === "y", F = m ? "top" : "left", b = m ? "bottom" : "right", k = m ? "clientHeight" : "clientWidth", x = o.reference[c] + o.reference[_] - g[_] - o.floating[c], E = g[_] - o.reference[_], S = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(u));
|
|
23209
23225
|
let j = S ? S[k] : 0;
|
|
23210
23226
|
(!j || !await (r.isElement == null ? void 0 : r.isElement(S))) && (j = s.floating[k] || o.floating[c]);
|
|
23211
|
-
const q = x / 2 - E / 2, A = j / 2 - h[c] / 2 - 1, I = Ut(f[F], A), z = Ut(f[b], A), W = I, T = j - h[c] - z, L = j / 2 - h[c] / 2 + q, te = Rs(W, L, T), O = !l.arrow &&
|
|
23227
|
+
const q = x / 2 - E / 2, A = j / 2 - h[c] / 2 - 1, I = Ut(f[F], A), z = Ut(f[b], A), W = I, T = j - h[c] - z, L = j / 2 - h[c] / 2 + q, te = Rs(W, L, T), O = !l.arrow && jt(n) != null && L !== te && o.reference[c] / 2 - (L < W ? I : z) - h[c] / 2 < 0, M = O ? L < W ? L - W : L - T : 0;
|
|
23212
23228
|
return {
|
|
23213
23229
|
[_]: g[_] + M,
|
|
23214
23230
|
data: {
|
|
@@ -23223,7 +23239,7 @@ const kk = 50, wk = async (a, e, t) => {
|
|
|
23223
23239
|
}
|
|
23224
23240
|
});
|
|
23225
23241
|
function vk(a, e, t) {
|
|
23226
|
-
return (a ? [...t.filter((n) =>
|
|
23242
|
+
return (a ? [...t.filter((n) => jt(n) === a), ...t.filter((n) => jt(n) !== a)] : t.filter((n) => Ct(n) === n)).filter((n) => a ? jt(n) === a || (e ? Qo(n) !== n : !1) : !0);
|
|
23227
23243
|
}
|
|
23228
23244
|
const xk = function(a) {
|
|
23229
23245
|
return a === void 0 && (a = {}), {
|
|
@@ -23253,7 +23269,7 @@ const xk = function(a) {
|
|
|
23253
23269
|
placement: h[0]
|
|
23254
23270
|
}
|
|
23255
23271
|
};
|
|
23256
|
-
const x = [m[
|
|
23272
|
+
const x = [m[Ct(b)], m[k[0]], m[k[1]]], E = [...((i = r.autoPlacement) == null ? void 0 : i.overflows) || [], {
|
|
23257
23273
|
placement: b,
|
|
23258
23274
|
overflows: x
|
|
23259
23275
|
}], S = h[F + 1];
|
|
@@ -23268,7 +23284,7 @@ const xk = function(a) {
|
|
|
23268
23284
|
}
|
|
23269
23285
|
};
|
|
23270
23286
|
const j = E.map((I) => {
|
|
23271
|
-
const z =
|
|
23287
|
+
const z = jt(I.placement);
|
|
23272
23288
|
return [I.placement, z && d ? (
|
|
23273
23289
|
// Check along the mainAxis and main crossAxis side.
|
|
23274
23290
|
I.overflows.slice(0, 2).reduce((W, T) => W + T, 0)
|
|
@@ -23280,7 +23296,7 @@ const xk = function(a) {
|
|
|
23280
23296
|
0,
|
|
23281
23297
|
// Aligned placements should not check their opposite crossAxis
|
|
23282
23298
|
// side.
|
|
23283
|
-
|
|
23299
|
+
jt(I[0]) ? 2 : 3
|
|
23284
23300
|
).every((z) => z <= 0))[0]) == null ? void 0 : n[0]) || j[0][0];
|
|
23285
23301
|
return A !== s ? {
|
|
23286
23302
|
data: {
|
|
@@ -23317,7 +23333,7 @@ const xk = function(a) {
|
|
|
23317
23333
|
} = sa(a, e);
|
|
23318
23334
|
if ((t = o.arrow) != null && t.alignmentOffset)
|
|
23319
23335
|
return {};
|
|
23320
|
-
const F =
|
|
23336
|
+
const F = Ct(n), b = zt(s), k = Ct(s) === s, x = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), E = g || (k || !h ? [Zo(s)] : ck(s)), S = c !== "none";
|
|
23321
23337
|
!g && S && E.push(...pk(s, h, c, x));
|
|
23322
23338
|
const j = [s, ...E], q = await l.detectOverflow(e, m), A = [];
|
|
23323
23339
|
let I = ((i = o.flip) == null ? void 0 : i.overflows) || [];
|
|
@@ -23468,7 +23484,7 @@ const Sk = function(a) {
|
|
|
23468
23484
|
return f.find((m) => l > m.left - _.left && l < m.right + _.right && u > m.top - _.top && u < m.bottom + _.bottom) || g;
|
|
23469
23485
|
if (f.length >= 2) {
|
|
23470
23486
|
if (zt(t) === "y") {
|
|
23471
|
-
const I = f[0], z = f[f.length - 1], W =
|
|
23487
|
+
const I = f[0], z = f[f.length - 1], W = Ct(t) === "top", T = I.top, L = z.bottom, te = W ? I.left : z.left, O = W ? I.right : z.right, M = O - te, se = L - T;
|
|
23472
23488
|
return {
|
|
23473
23489
|
top: T,
|
|
23474
23490
|
bottom: L,
|
|
@@ -23480,7 +23496,7 @@ const Sk = function(a) {
|
|
|
23480
23496
|
y: T
|
|
23481
23497
|
};
|
|
23482
23498
|
}
|
|
23483
|
-
const m =
|
|
23499
|
+
const m = Ct(t) === "left", F = Qe(...f.map((I) => I.right)), b = Ut(...f.map((I) => I.left)), k = f.filter((I) => m ? I.left === b : I.right === F), x = k[0].top, E = k[k.length - 1].bottom, S = b, j = F, q = j - S, A = E - x;
|
|
23484
23500
|
return {
|
|
23485
23501
|
top: x,
|
|
23486
23502
|
bottom: E,
|
|
@@ -23514,7 +23530,7 @@ async function qk(a, e) {
|
|
|
23514
23530
|
placement: t,
|
|
23515
23531
|
platform: i,
|
|
23516
23532
|
elements: n
|
|
23517
|
-
} = a, o = await (i.isRTL == null ? void 0 : i.isRTL(n.floating)), r =
|
|
23533
|
+
} = a, o = await (i.isRTL == null ? void 0 : i.isRTL(n.floating)), r = Ct(t), s = jt(t), l = zt(t) === "y", u = jk.has(r) ? -1 : 1, d = o && l ? -1 : 1, f = sa(e, a);
|
|
23518
23534
|
let {
|
|
23519
23535
|
mainAxis: g,
|
|
23520
23536
|
crossAxis: _,
|
|
@@ -23587,7 +23603,7 @@ const Ak = function(a) {
|
|
|
23587
23603
|
} = sa(a, e), d = {
|
|
23588
23604
|
x: t,
|
|
23589
23605
|
y: i
|
|
23590
|
-
}, f = await o.detectOverflow(e, u), g = zt(
|
|
23606
|
+
}, f = await o.detectOverflow(e, u), g = zt(Ct(n)), _ = _1(g);
|
|
23591
23607
|
let c = d[_], h = d[g];
|
|
23592
23608
|
if (r) {
|
|
23593
23609
|
const F = _ === "y" ? "top" : "left", b = _ === "y" ? "bottom" : "right", k = c + f[F], x = c - f[b];
|
|
@@ -23630,7 +23646,7 @@ const Ak = function(a) {
|
|
|
23630
23646
|
apply: l = () => {
|
|
23631
23647
|
},
|
|
23632
23648
|
...u
|
|
23633
|
-
} = sa(a, e), d = await r.detectOverflow(e, u), f =
|
|
23649
|
+
} = sa(a, e), d = await r.detectOverflow(e, u), f = Ct(n), g = jt(n), _ = zt(n) === "y", {
|
|
23634
23650
|
width: c,
|
|
23635
23651
|
height: h
|
|
23636
23652
|
} = o.floating;
|
|
@@ -23706,20 +23722,20 @@ function Fr(a) {
|
|
|
23706
23722
|
return !1;
|
|
23707
23723
|
}
|
|
23708
23724
|
}
|
|
23709
|
-
const Ok = /transform|translate|scale|rotate|perspective|filter/, Lk = /paint|layout|strict|content/,
|
|
23725
|
+
const Ok = /transform|translate|scale|rotate|perspective|filter/, Lk = /paint|layout|strict|content/, za = (a) => !!a && a !== "none";
|
|
23710
23726
|
let Qr;
|
|
23711
23727
|
function Gl(a) {
|
|
23712
23728
|
const e = qt(a) ? At(a) : a;
|
|
23713
|
-
return
|
|
23729
|
+
return za(e.transform) || za(e.translate) || za(e.scale) || za(e.rotate) || za(e.perspective) || !Yl() && (za(e.backdropFilter) || za(e.filter)) || Ok.test(e.willChange || "") || Lk.test(e.contain || "");
|
|
23714
23730
|
}
|
|
23715
23731
|
function Ik(a) {
|
|
23716
|
-
let e =
|
|
23732
|
+
let e = ja(a);
|
|
23717
23733
|
for (; ua(e) && !Si(e); ) {
|
|
23718
23734
|
if (Gl(e))
|
|
23719
23735
|
return e;
|
|
23720
23736
|
if (Fr(e))
|
|
23721
23737
|
return null;
|
|
23722
|
-
e =
|
|
23738
|
+
e = ja(e);
|
|
23723
23739
|
}
|
|
23724
23740
|
return null;
|
|
23725
23741
|
}
|
|
@@ -23741,7 +23757,7 @@ function pr(a) {
|
|
|
23741
23757
|
scrollTop: a.scrollY
|
|
23742
23758
|
};
|
|
23743
23759
|
}
|
|
23744
|
-
function
|
|
23760
|
+
function ja(a) {
|
|
23745
23761
|
if (Ti(a) === "html")
|
|
23746
23762
|
return a;
|
|
23747
23763
|
const e = (
|
|
@@ -23754,7 +23770,7 @@ function Sa(a) {
|
|
|
23754
23770
|
return Jd(e) ? e.host : e;
|
|
23755
23771
|
}
|
|
23756
23772
|
function F1(a) {
|
|
23757
|
-
const e =
|
|
23773
|
+
const e = ja(a);
|
|
23758
23774
|
return Si(e) ? a.ownerDocument ? a.ownerDocument.body : a.body : ua(e) && Bn(e) ? e : F1(e);
|
|
23759
23775
|
}
|
|
23760
23776
|
function p1(a, e, t) {
|
|
@@ -23929,7 +23945,7 @@ function Yd(a, e, t) {
|
|
|
23929
23945
|
return Bi(i);
|
|
23930
23946
|
}
|
|
23931
23947
|
function D1(a, e) {
|
|
23932
|
-
const t =
|
|
23948
|
+
const t = ja(a);
|
|
23933
23949
|
return t === e || !qt(t) || Si(t) ? !1 : At(t).position === "fixed" || D1(t, e);
|
|
23934
23950
|
}
|
|
23935
23951
|
function Uk(a, e) {
|
|
@@ -23938,10 +23954,10 @@ function Uk(a, e) {
|
|
|
23938
23954
|
return t;
|
|
23939
23955
|
let i = p1(a, []).filter((s) => qt(s) && Ti(s) !== "body"), n = null;
|
|
23940
23956
|
const o = At(a).position === "fixed";
|
|
23941
|
-
let r = o ?
|
|
23957
|
+
let r = o ? ja(a) : a;
|
|
23942
23958
|
for (; qt(r) && !Si(r); ) {
|
|
23943
23959
|
const s = At(r), l = Gl(r);
|
|
23944
|
-
!l && s.position === "fixed" && (n = null), (o ? !l && !n : !l && s.position === "static" && !!n && (n.position === "absolute" || n.position === "fixed") || Bn(r) && !l && D1(a, r)) ? i = i.filter((d) => d !== r) : n = s, r =
|
|
23960
|
+
!l && s.position === "fixed" && (n = null), (o ? !l && !n : !l && s.position === "static" && !!n && (n.position === "absolute" || n.position === "fixed") || Bn(r) && !l && D1(a, r)) ? i = i.filter((d) => d !== r) : n = s, r = ja(r);
|
|
23945
23961
|
}
|
|
23946
23962
|
return e.set(a, i), i;
|
|
23947
23963
|
}
|
|
@@ -24015,11 +24031,11 @@ function v1(a, e) {
|
|
|
24015
24031
|
if (Fr(a))
|
|
24016
24032
|
return t;
|
|
24017
24033
|
if (!ua(a)) {
|
|
24018
|
-
let n =
|
|
24034
|
+
let n = ja(a);
|
|
24019
24035
|
for (; n && !Si(n); ) {
|
|
24020
24036
|
if (qt(n) && !Zr(n))
|
|
24021
24037
|
return n;
|
|
24022
|
-
n =
|
|
24038
|
+
n = ja(n);
|
|
24023
24039
|
}
|
|
24024
24040
|
return t;
|
|
24025
24041
|
}
|
|
@@ -24822,7 +24838,7 @@ var u6 = class {
|
|
|
24822
24838
|
})
|
|
24823
24839
|
);
|
|
24824
24840
|
}));
|
|
24825
|
-
}),
|
|
24841
|
+
}), Bt(() => {
|
|
24826
24842
|
const { pluginKey: n, editor: o } = a;
|
|
24827
24843
|
o.unregisterPlugin(n);
|
|
24828
24844
|
}), () => {
|
|
@@ -25019,7 +25035,7 @@ var u6 = class {
|
|
|
25019
25035
|
shouldShow: d
|
|
25020
25036
|
})
|
|
25021
25037
|
));
|
|
25022
|
-
}),
|
|
25038
|
+
}), Bt(() => {
|
|
25023
25039
|
const { pluginKey: n, editor: o } = a;
|
|
25024
25040
|
o.unregisterPlugin(n);
|
|
25025
25041
|
}), () => {
|
|
@@ -25028,7 +25044,7 @@ var u6 = class {
|
|
|
25028
25044
|
};
|
|
25029
25045
|
}
|
|
25030
25046
|
});
|
|
25031
|
-
const
|
|
25047
|
+
const Ra = /* @__PURE__ */ ie({
|
|
25032
25048
|
__name: "BubbleMenuToggleButton",
|
|
25033
25049
|
props: {
|
|
25034
25050
|
isActive: {
|
|
@@ -25368,7 +25384,7 @@ const za = /* @__PURE__ */ ie({
|
|
|
25368
25384
|
y("button", S6, [
|
|
25369
25385
|
p(w(Xc), { class: "size-4" })
|
|
25370
25386
|
]),
|
|
25371
|
-
p(
|
|
25387
|
+
p(Ra, {
|
|
25372
25388
|
isActive: a.editor.isActive("heading", { level: 1 }),
|
|
25373
25389
|
onClick: o[0] || (o[0] = (r) => a.editor.chain().focus().toggleHeading({ level: 1 }).run())
|
|
25374
25390
|
}, {
|
|
@@ -25377,7 +25393,7 @@ const za = /* @__PURE__ */ ie({
|
|
|
25377
25393
|
]),
|
|
25378
25394
|
_: 1
|
|
25379
25395
|
}, 8, ["isActive"]),
|
|
25380
|
-
p(
|
|
25396
|
+
p(Ra, {
|
|
25381
25397
|
isActive: a.editor.isActive("bold"),
|
|
25382
25398
|
onClick: o[1] || (o[1] = (r) => a.editor.chain().focus().toggleBold().run())
|
|
25383
25399
|
}, {
|
|
@@ -25386,7 +25402,7 @@ const za = /* @__PURE__ */ ie({
|
|
|
25386
25402
|
]),
|
|
25387
25403
|
_: 1
|
|
25388
25404
|
}, 8, ["isActive"]),
|
|
25389
|
-
p(
|
|
25405
|
+
p(Ra, {
|
|
25390
25406
|
isActive: a.editor.isActive("italic"),
|
|
25391
25407
|
onClick: o[2] || (o[2] = (r) => a.editor.chain().focus().toggleItalic().run())
|
|
25392
25408
|
}, {
|
|
@@ -25395,7 +25411,7 @@ const za = /* @__PURE__ */ ie({
|
|
|
25395
25411
|
]),
|
|
25396
25412
|
_: 1
|
|
25397
25413
|
}, 8, ["isActive"]),
|
|
25398
|
-
p(
|
|
25414
|
+
p(Ra, {
|
|
25399
25415
|
isActive: a.editor.isActive("underline"),
|
|
25400
25416
|
onClick: o[3] || (o[3] = (r) => a.editor.chain().focus().toggleUnderline().run())
|
|
25401
25417
|
}, {
|
|
@@ -25404,7 +25420,7 @@ const za = /* @__PURE__ */ ie({
|
|
|
25404
25420
|
]),
|
|
25405
25421
|
_: 1
|
|
25406
25422
|
}, 8, ["isActive"]),
|
|
25407
|
-
p(
|
|
25423
|
+
p(Ra, {
|
|
25408
25424
|
isActive: a.editor.isActive("strike"),
|
|
25409
25425
|
onClick: o[4] || (o[4] = (r) => a.editor.chain().focus().toggleStrike().run())
|
|
25410
25426
|
}, {
|
|
@@ -25413,7 +25429,7 @@ const za = /* @__PURE__ */ ie({
|
|
|
25413
25429
|
]),
|
|
25414
25430
|
_: 1
|
|
25415
25431
|
}, 8, ["isActive"]),
|
|
25416
|
-
p(
|
|
25432
|
+
p(Ra, {
|
|
25417
25433
|
isActive: a.editor.isActive("link"),
|
|
25418
25434
|
onClick: o[5] || (o[5] = (r) => t.value = "link-builder")
|
|
25419
25435
|
}, {
|
|
@@ -25422,7 +25438,7 @@ const za = /* @__PURE__ */ ie({
|
|
|
25422
25438
|
]),
|
|
25423
25439
|
_: 1
|
|
25424
25440
|
}, 8, ["isActive"]),
|
|
25425
|
-
p(
|
|
25441
|
+
p(Ra, {
|
|
25426
25442
|
onClick: o[6] || (o[6] = (r) => t.value = "class-builder")
|
|
25427
25443
|
}, {
|
|
25428
25444
|
default: v(() => [...o[9] || (o[9] = [
|
|
@@ -25520,7 +25536,7 @@ const za = /* @__PURE__ */ ie({
|
|
|
25520
25536
|
}
|
|
25521
25537
|
we(() => {
|
|
25522
25538
|
window.addEventListener("keydown", c), e.editor.on("selectionUpdate", _), e.editor.on("update", r);
|
|
25523
|
-
}),
|
|
25539
|
+
}), Bt(() => {
|
|
25524
25540
|
window.removeEventListener("keydown", c), e.editor?.off?.("selectionUpdate", _), e.editor?.off?.("update", r);
|
|
25525
25541
|
});
|
|
25526
25542
|
const m = document.body;
|
|
@@ -26220,7 +26236,7 @@ const sw = {
|
|
|
26220
26236
|
}
|
|
26221
26237
|
};
|
|
26222
26238
|
function dw(a, e, t, i, n, o) {
|
|
26223
|
-
return o.view.canRender ? (D(), R(
|
|
26239
|
+
return o.view.canRender ? (D(), R(ka(a.tag), {
|
|
26224
26240
|
key: 0,
|
|
26225
26241
|
title: o.view.title,
|
|
26226
26242
|
"aria-label": o.view.ariaLabel,
|
|
@@ -26989,7 +27005,7 @@ const Yw = /* @__PURE__ */ De(Ww, [["render", Gw]]), Xw = { class: "flex flex-co
|
|
|
26989
27005
|
}
|
|
26990
27006
|
we(() => {
|
|
26991
27007
|
window.addEventListener("keydown", h), t.editor.on("selectionUpdate", c), t.editor.on("update", l);
|
|
26992
|
-
}),
|
|
27008
|
+
}), Bt(() => {
|
|
26993
27009
|
window.removeEventListener("keydown", h), t.editor?.off?.("selectionUpdate", c), t.editor?.off?.("update", l);
|
|
26994
27010
|
});
|
|
26995
27011
|
function F(b) {
|
|
@@ -27263,19 +27279,19 @@ const Yw = /* @__PURE__ */ De(Ww, [["render", Gw]]), Xw = { class: "flex flex-co
|
|
|
27263
27279
|
default: v(() => [
|
|
27264
27280
|
p(h, { value: "left" }, {
|
|
27265
27281
|
default: v(() => [
|
|
27266
|
-
p(w(
|
|
27282
|
+
p(w(qa), { class: "size-4 mx-auto" })
|
|
27267
27283
|
]),
|
|
27268
27284
|
_: 1
|
|
27269
27285
|
}),
|
|
27270
27286
|
p(h, { value: "center" }, {
|
|
27271
27287
|
default: v(() => [
|
|
27272
|
-
p(w(
|
|
27288
|
+
p(w(Aa), { class: "size-4 mx-auto" })
|
|
27273
27289
|
]),
|
|
27274
27290
|
_: 1
|
|
27275
27291
|
}),
|
|
27276
27292
|
p(h, { value: "right" }, {
|
|
27277
27293
|
default: v(() => [
|
|
27278
|
-
p(w(
|
|
27294
|
+
p(w(Ma), { class: "size-4 mx-auto" })
|
|
27279
27295
|
]),
|
|
27280
27296
|
_: 1
|
|
27281
27297
|
})
|
|
@@ -27375,19 +27391,19 @@ const Yw = /* @__PURE__ */ De(Ww, [["render", Gw]]), Xw = { class: "flex flex-co
|
|
|
27375
27391
|
default: v(() => [
|
|
27376
27392
|
p(_, { value: "left" }, {
|
|
27377
27393
|
default: v(() => [
|
|
27378
|
-
p(w(
|
|
27394
|
+
p(w(qa), { class: "size-4 mx-auto" })
|
|
27379
27395
|
]),
|
|
27380
27396
|
_: 1
|
|
27381
27397
|
}),
|
|
27382
27398
|
p(_, { value: "center" }, {
|
|
27383
27399
|
default: v(() => [
|
|
27384
|
-
p(w(
|
|
27400
|
+
p(w(Aa), { class: "size-4 mx-auto" })
|
|
27385
27401
|
]),
|
|
27386
27402
|
_: 1
|
|
27387
27403
|
}),
|
|
27388
27404
|
p(_, { value: "right" }, {
|
|
27389
27405
|
default: v(() => [
|
|
27390
|
-
p(w(
|
|
27406
|
+
p(w(Ma), { class: "size-4 mx-auto" })
|
|
27391
27407
|
]),
|
|
27392
27408
|
_: 1
|
|
27393
27409
|
})
|
|
@@ -27478,19 +27494,19 @@ const Yw = /* @__PURE__ */ De(Ww, [["render", Gw]]), Xw = { class: "flex flex-co
|
|
|
27478
27494
|
default: v(() => [
|
|
27479
27495
|
p(_, { value: "left" }, {
|
|
27480
27496
|
default: v(() => [
|
|
27481
|
-
p(w(
|
|
27497
|
+
p(w(qa), { class: "size-4 mx-auto" })
|
|
27482
27498
|
]),
|
|
27483
27499
|
_: 1
|
|
27484
27500
|
}),
|
|
27485
27501
|
p(_, { value: "center" }, {
|
|
27486
27502
|
default: v(() => [
|
|
27487
|
-
p(w(
|
|
27503
|
+
p(w(Aa), { class: "size-4 mx-auto" })
|
|
27488
27504
|
]),
|
|
27489
27505
|
_: 1
|
|
27490
27506
|
}),
|
|
27491
27507
|
p(_, { value: "right" }, {
|
|
27492
27508
|
default: v(() => [
|
|
27493
|
-
p(w(
|
|
27509
|
+
p(w(Ma), { class: "size-4 mx-auto" })
|
|
27494
27510
|
]),
|
|
27495
27511
|
_: 1
|
|
27496
27512
|
})
|
|
@@ -27648,19 +27664,19 @@ const Yw = /* @__PURE__ */ De(Ww, [["render", Gw]]), Xw = { class: "flex flex-co
|
|
|
27648
27664
|
default: v(() => [
|
|
27649
27665
|
p(c, { value: "start" }, {
|
|
27650
27666
|
default: v(() => [
|
|
27651
|
-
p(w(
|
|
27667
|
+
p(w(qa), { class: "size-4 mx-auto" })
|
|
27652
27668
|
]),
|
|
27653
27669
|
_: 1
|
|
27654
27670
|
}),
|
|
27655
27671
|
p(c, { value: "center" }, {
|
|
27656
27672
|
default: v(() => [
|
|
27657
|
-
p(w(
|
|
27673
|
+
p(w(Aa), { class: "size-4 mx-auto" })
|
|
27658
27674
|
]),
|
|
27659
27675
|
_: 1
|
|
27660
27676
|
}),
|
|
27661
27677
|
p(c, { value: "end" }, {
|
|
27662
27678
|
default: v(() => [
|
|
27663
|
-
p(w(
|
|
27679
|
+
p(w(Ma), { class: "size-4 mx-auto" })
|
|
27664
27680
|
]),
|
|
27665
27681
|
_: 1
|
|
27666
27682
|
}),
|
|
@@ -27895,19 +27911,19 @@ const Yw = /* @__PURE__ */ De(Ww, [["render", Gw]]), Xw = { class: "flex flex-co
|
|
|
27895
27911
|
default: v(() => [
|
|
27896
27912
|
p(f, { value: "left" }, {
|
|
27897
27913
|
default: v(() => [
|
|
27898
|
-
p(w(
|
|
27914
|
+
p(w(qa), { class: "size-4 mx-auto" })
|
|
27899
27915
|
]),
|
|
27900
27916
|
_: 1
|
|
27901
27917
|
}),
|
|
27902
27918
|
p(f, { value: "center" }, {
|
|
27903
27919
|
default: v(() => [
|
|
27904
|
-
p(w(
|
|
27920
|
+
p(w(Aa), { class: "size-4 mx-auto" })
|
|
27905
27921
|
]),
|
|
27906
27922
|
_: 1
|
|
27907
27923
|
}),
|
|
27908
27924
|
p(f, { value: "right" }, {
|
|
27909
27925
|
default: v(() => [
|
|
27910
|
-
p(w(
|
|
27926
|
+
p(w(Ma), { class: "size-4 mx-auto" })
|
|
27911
27927
|
]),
|
|
27912
27928
|
_: 1
|
|
27913
27929
|
})
|
|
@@ -28074,19 +28090,19 @@ const Yw = /* @__PURE__ */ De(Ww, [["render", Gw]]), Xw = { class: "flex flex-co
|
|
|
28074
28090
|
default: v(() => [
|
|
28075
28091
|
p(l, { value: "left" }, {
|
|
28076
28092
|
default: v(() => [
|
|
28077
|
-
p(w(
|
|
28093
|
+
p(w(qa), { class: "size-4 mx-auto" })
|
|
28078
28094
|
]),
|
|
28079
28095
|
_: 1
|
|
28080
28096
|
}),
|
|
28081
28097
|
p(l, { value: "center" }, {
|
|
28082
28098
|
default: v(() => [
|
|
28083
|
-
p(w(
|
|
28099
|
+
p(w(Aa), { class: "size-4 mx-auto" })
|
|
28084
28100
|
]),
|
|
28085
28101
|
_: 1
|
|
28086
28102
|
}),
|
|
28087
28103
|
p(l, { value: "right" }, {
|
|
28088
28104
|
default: v(() => [
|
|
28089
|
-
p(w(
|
|
28105
|
+
p(w(Ma), { class: "size-4 mx-auto" })
|
|
28090
28106
|
]),
|
|
28091
28107
|
_: 1
|
|
28092
28108
|
})
|
|
@@ -28161,19 +28177,19 @@ const Yw = /* @__PURE__ */ De(Ww, [["render", Gw]]), Xw = { class: "flex flex-co
|
|
|
28161
28177
|
default: v(() => [
|
|
28162
28178
|
p(u, { value: "left" }, {
|
|
28163
28179
|
default: v(() => [
|
|
28164
|
-
p(w(
|
|
28180
|
+
p(w(qa), { class: "size-4 mx-auto" })
|
|
28165
28181
|
]),
|
|
28166
28182
|
_: 1
|
|
28167
28183
|
}),
|
|
28168
28184
|
p(u, { value: "center" }, {
|
|
28169
28185
|
default: v(() => [
|
|
28170
|
-
p(w(
|
|
28186
|
+
p(w(Aa), { class: "size-4 mx-auto" })
|
|
28171
28187
|
]),
|
|
28172
28188
|
_: 1
|
|
28173
28189
|
}),
|
|
28174
28190
|
p(u, { value: "right" }, {
|
|
28175
28191
|
default: v(() => [
|
|
28176
|
-
p(w(
|
|
28192
|
+
p(w(Ma), { class: "size-4 mx-auto" })
|
|
28177
28193
|
]),
|
|
28178
28194
|
_: 1
|
|
28179
28195
|
})
|
|
@@ -28334,19 +28350,19 @@ const Yw = /* @__PURE__ */ De(Ww, [["render", Gw]]), Xw = { class: "flex flex-co
|
|
|
28334
28350
|
default: v(() => [
|
|
28335
28351
|
p(m, { value: "left" }, {
|
|
28336
28352
|
default: v(() => [
|
|
28337
|
-
p(w(
|
|
28353
|
+
p(w(qa), { class: "size-4 mx-auto" })
|
|
28338
28354
|
]),
|
|
28339
28355
|
_: 1
|
|
28340
28356
|
}),
|
|
28341
28357
|
p(m, { value: "center" }, {
|
|
28342
28358
|
default: v(() => [
|
|
28343
|
-
p(w(
|
|
28359
|
+
p(w(Aa), { class: "size-4 mx-auto" })
|
|
28344
28360
|
]),
|
|
28345
28361
|
_: 1
|
|
28346
28362
|
}),
|
|
28347
28363
|
p(m, { value: "right" }, {
|
|
28348
28364
|
default: v(() => [
|
|
28349
|
-
p(w(
|
|
28365
|
+
p(w(Ma), { class: "size-4 mx-auto" })
|
|
28350
28366
|
]),
|
|
28351
28367
|
_: 1
|
|
28352
28368
|
})
|
|
@@ -28441,7 +28457,7 @@ const Yw = /* @__PURE__ */ De(Ww, [["render", Gw]]), Xw = { class: "flex flex-co
|
|
|
28441
28457
|
_.value = !t.editor.isFocused;
|
|
28442
28458
|
}, 500);
|
|
28443
28459
|
};
|
|
28444
|
-
m.on("focus", F), m.on("blur", b),
|
|
28460
|
+
m.on("focus", F), m.on("blur", b), Bt(() => {
|
|
28445
28461
|
m.off("focus", F), m.off("blur", b), c && clearTimeout(c);
|
|
28446
28462
|
});
|
|
28447
28463
|
}
|
|
@@ -28485,7 +28501,7 @@ const Yw = /* @__PURE__ */ De(Ww, [["render", Gw]]), Xw = { class: "flex flex-co
|
|
|
28485
28501
|
])
|
|
28486
28502
|
]),
|
|
28487
28503
|
F[0] || (F[0] = y("div", { class: "w-full h-[1px] bg-black/10 dark:bg-muted mb-2" }, null, -1)),
|
|
28488
|
-
(D(), R(
|
|
28504
|
+
(D(), R(ka(l.value?.settingsView), {
|
|
28489
28505
|
editor: a.editor,
|
|
28490
28506
|
key: s.value?.node?.attrs?.id || s.value?.pos
|
|
28491
28507
|
}, null, 8, ["editor"]))
|
|
@@ -29053,7 +29069,7 @@ const Yw = /* @__PURE__ */ De(Ww, [["render", Gw]]), Xw = { class: "flex flex-co
|
|
|
29053
29069
|
}
|
|
29054
29070
|
return we(() => {
|
|
29055
29071
|
window.addEventListener("message", W), u.value = Math.round(t.value?.clientWidth * 0.8) || 320, d.value = Math.round(t.value?.clientHeight * 0.8) || 480;
|
|
29056
|
-
}),
|
|
29072
|
+
}), Bt(() => {
|
|
29057
29073
|
window.removeEventListener("message", W);
|
|
29058
29074
|
}), (T, L) => {
|
|
29059
29075
|
const te = N("SelectValue"), O = N("SelectTrigger"), M = N("SelectItem"), se = N("SelectGroup"), K = N("SelectSeparator"), qe = N("SelectContent"), Ye = N("Select"), Ve = N("Input"), da = N("Button");
|
|
@@ -30033,7 +30049,7 @@ export class SupabaseService {
|
|
|
30033
30049
|
try {
|
|
30034
30050
|
let ne;
|
|
30035
30051
|
f.value = !0;
|
|
30036
|
-
let J =
|
|
30052
|
+
let J = ca(T.value);
|
|
30037
30053
|
J.forEach((me) => {
|
|
30038
30054
|
me.type === "componentEditorNode" && delete me.attrs.formLayout;
|
|
30039
30055
|
}), J = JSON.stringify(J), g.value === "new" && (g.value = await Z1()), _.value ? (await nu(J), ne = _.value) : (ne = await ec(J), Y.skipNavigation || o(`/collections/${n.value.collectionId}/${g.value}`));
|
|
@@ -30067,7 +30083,7 @@ export class SupabaseService {
|
|
|
30067
30083
|
at: /* @__PURE__ */ new Date()
|
|
30068
30084
|
}
|
|
30069
30085
|
};
|
|
30070
|
-
s() && (ne.structuredContentSections =
|
|
30086
|
+
s() && (ne.structuredContentSections = ca(S.value ?? []), ne.entrySettings || (ne.entrySettings = {}), ne.entrySettings.disableSettings = j.value, ne.entrySettings.disableContent = q.value, ne.entrySettings.disableSlug = A.value), await u.update(e.config.contentCollection, g.value, ne);
|
|
30071
30087
|
} catch (U) {
|
|
30072
30088
|
throw U;
|
|
30073
30089
|
}
|
|
@@ -30088,9 +30104,9 @@ export class SupabaseService {
|
|
|
30088
30104
|
liveKeys: J.liveByLocale?.map((Le) => Le.slug + "_" + Le.locale) || [],
|
|
30089
30105
|
draftByLocale: J.draftByLocale,
|
|
30090
30106
|
latestByLocale: J.latestByLocale,
|
|
30091
|
-
structuredContentSections:
|
|
30107
|
+
structuredContentSections: ca(S.value ?? [])
|
|
30092
30108
|
};
|
|
30093
|
-
return U === (e.config.defaultLanguage || "en") && (me.title = c.value), s() && (me.structuredContentSections =
|
|
30109
|
+
return U === (e.config.defaultLanguage || "en") && (me.title = c.value), s() && (me.structuredContentSections = ca(S.value ?? []), me.entrySettings || (me.entrySettings = {}), me.entrySettings.disableSettings = j.value, me.entrySettings.disableContent = q.value, me.entrySettings.disableSlug = A.value), await u.update(e.config.contentCollection, g.value, me), ne.id;
|
|
30094
30110
|
} catch (U) {
|
|
30095
30111
|
throw U;
|
|
30096
30112
|
}
|
|
@@ -30103,7 +30119,7 @@ export class SupabaseService {
|
|
|
30103
30119
|
let Y = Date.now();
|
|
30104
30120
|
try {
|
|
30105
30121
|
f.value = !0;
|
|
30106
|
-
let U =
|
|
30122
|
+
let U = ca(T.value);
|
|
30107
30123
|
U.forEach((J) => {
|
|
30108
30124
|
J.type === "componentEditorNode" && delete J.attrs.formLayout;
|
|
30109
30125
|
}), U = JSON.stringify(U), _.value ? await nu(U) : await ic(U), e.config.githubIntegration && e.config.githubRepo && e.config.githubOwner && await ac();
|
|
@@ -30140,7 +30156,7 @@ export class SupabaseService {
|
|
|
30140
30156
|
liveKeys: me,
|
|
30141
30157
|
latestByLocale: J.latestByLocale
|
|
30142
30158
|
};
|
|
30143
|
-
U === (e.config.defaultLanguage || "en") && (Le.title = c.value), s() && (Le.structuredContentSections =
|
|
30159
|
+
U === (e.config.defaultLanguage || "en") && (Le.title = c.value), s() && (Le.structuredContentSections = ca(S.value ?? []), Le.entrySettings || (Le.entrySettings = {}), Le.entrySettings.disableSettings = j.value, Le.entrySettings.disableContent = q.value, Le.entrySettings.disableSlug = A.value), await u.update(e.config.contentCollection, g.value, Le), await Tt(g.value);
|
|
30144
30160
|
} catch (U) {
|
|
30145
30161
|
throw alert("Error publishing from draft: " + U), U;
|
|
30146
30162
|
}
|