@harbour-enterprises/superdoc 0.9.34 → 0.9.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{index-Da1nm1Nx.cjs → index-DHS2ANjv.cjs} +1 -1
- package/dist/chunks/{index-CFw3GWZb.es.js → index-Dd_ce0Er.es.js} +1 -1
- package/dist/chunks/index-XHRxRUhd.es.js +1676 -0
- package/dist/chunks/index-YqE5-6V1.cjs +1 -0
- package/dist/chunks/{super-editor.es-CPySz799.es.js → super-editor.es-BAc4W6Tu.es.js} +455 -466
- package/dist/chunks/{super-editor.es-BBj7vFp-.cjs → super-editor.es-BBgPdIMs.cjs} +36 -36
- package/dist/chunks/{url-BBWjYHis.es.js → url-BWFemt_V.es.js} +1 -1
- package/dist/chunks/{url-CsA0aP-j.cjs → url-Cqg7fbSS.cjs} +1 -1
- package/dist/chunks/xml-js-Bzw8Bo_u.es.js +1739 -0
- package/dist/chunks/xml-js-Zwb1wsIy.cjs +10 -0
- package/dist/super-editor/chunks/{converter-A8jhEHAV.js → converter-UkRnMuKc.js} +6 -7
- package/dist/super-editor/chunks/{docx-zipper-ChOmGxQY.js → docx-zipper-BiMOTpMh.js} +1 -1
- package/dist/super-editor/chunks/{editor-CPeWTjoI.js → editor-BLRcEmYR.js} +302 -312
- package/dist/super-editor/chunks/{toolbar-DS4sA_rD.js → toolbar-DWm-EjAe.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +3 -3
- package/dist/superdoc.es.js +6 -6
- package/dist/superdoc.umd.js +880 -891
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/index-BR0d39LK.es.js +0 -473
- package/dist/chunks/index-zi2PhUgG.cjs +0 -1
- package/dist/chunks/xml-js-BK8neRFY.es.js +0 -2961
- package/dist/chunks/xml-js-Dl3GDIvM.cjs +0 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Me from "yjs";
|
|
2
2
|
import { UndoManager as mS, Item as gS, ContentType as yS, Text as wS, XmlElement as bS } from "yjs";
|
|
3
|
-
import { g as bh, c as lb, r as we, a as Ae, b as Ce, o as Se, F as gt, d as On, n as sn, w as Zn, e as st, t as an, f as Ge, i as vt, h as Qf, j as An, k as Bn, l as wn, m as wt, q as
|
|
3
|
+
import { g as bh, c as lb, r as we, a as Ae, b as Ce, o as Se, F as gt, d as On, n as sn, w as Zn, e as st, t as an, f as Ge, i as vt, h as Qf, j as An, k as Bn, l as wn, m as wt, q as Fi, s as cb, u as Ur, v as Ft, x as ze, y as Tc, z as gi, A as on, B as ve, C as Rt, D as Rn, E as Ri, G as Do, H as kd, I as Sd, J as vS, T as xS, K as yi, L as Ad, M as dl, N as ep, O as fl, P as kS, Q as tp, R as SS, S as AS, U as CS, V as ES, W as TS, X as $S } from "./vue-BDbTsTMu.es.js";
|
|
4
4
|
var OS = Object.defineProperty, ub = (t) => {
|
|
5
5
|
throw TypeError(t);
|
|
6
6
|
}, MS = (t, e, n) => e in t ? OS(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ha = (t, e, n) => MS(t, typeof e != "symbol" ? e + "" : e, n), DS = (t, e, n) => e.has(t) || ub("Cannot " + n), db = (t, e, n) => e.has(t) ? ub("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), wr = (t, e, n) => (DS(t, e, "access private method"), n), Yt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof bh < "u" ? bh : typeof self < "u" ? self : {};
|
|
@@ -1533,7 +1533,7 @@ function kA() {
|
|
|
1533
1533
|
return am || (am = 1, sm = Object.getOwnPropertyDescriptor), sm;
|
|
1534
1534
|
}
|
|
1535
1535
|
var _c, lm;
|
|
1536
|
-
function
|
|
1536
|
+
function Li() {
|
|
1537
1537
|
if (lm) return _c;
|
|
1538
1538
|
lm = 1;
|
|
1539
1539
|
var t = kA();
|
|
@@ -1664,7 +1664,7 @@ var zc, Am;
|
|
|
1664
1664
|
function EA() {
|
|
1665
1665
|
if (Am) return zc;
|
|
1666
1666
|
Am = 1;
|
|
1667
|
-
var t = sp(), e =
|
|
1667
|
+
var t = sp(), e = Li(), n;
|
|
1668
1668
|
try {
|
|
1669
1669
|
n = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
1670
1670
|
[].__proto__ === Array.prototype;
|
|
@@ -1715,7 +1715,7 @@ function Eb() {
|
|
|
1715
1715
|
return y('"use strict"; return (' + H + ").constructor;")();
|
|
1716
1716
|
} catch {
|
|
1717
1717
|
}
|
|
1718
|
-
}, v =
|
|
1718
|
+
}, v = Li(), x = nc(), w = function() {
|
|
1719
1719
|
throw new a();
|
|
1720
1720
|
}, T = v ? function() {
|
|
1721
1721
|
try {
|
|
@@ -1976,7 +1976,7 @@ var Wc, Mm;
|
|
|
1976
1976
|
function $A() {
|
|
1977
1977
|
if (Mm) return Wc;
|
|
1978
1978
|
Mm = 1;
|
|
1979
|
-
var t = na(), e = tc()(), n = Cb(), r =
|
|
1979
|
+
var t = na(), e = tc()(), n = Cb(), r = Li(), o;
|
|
1980
1980
|
if (e) {
|
|
1981
1981
|
var i = t("RegExp.prototype.exec"), s = {}, a = function() {
|
|
1982
1982
|
throw s;
|
|
@@ -2190,7 +2190,7 @@ var Bm = { exports: {} }, Zc, Pm;
|
|
|
2190
2190
|
function FA() {
|
|
2191
2191
|
if (Pm) return Zc;
|
|
2192
2192
|
Pm = 1;
|
|
2193
|
-
var t = nc(), e = xb(), n = ea(), r =
|
|
2193
|
+
var t = nc(), e = xb(), n = ea(), r = Li();
|
|
2194
2194
|
return Zc = function(o, i, s) {
|
|
2195
2195
|
if (!o || typeof o != "object" && typeof o != "function")
|
|
2196
2196
|
throw new n("`obj` must be an object or a function`");
|
|
@@ -2239,7 +2239,7 @@ var eu, jm;
|
|
|
2239
2239
|
function LA() {
|
|
2240
2240
|
if (jm) return eu;
|
|
2241
2241
|
jm = 1;
|
|
2242
|
-
var t = Eb(), e = FA(), n = RA()(), r =
|
|
2242
|
+
var t = Eb(), e = FA(), n = RA()(), r = Li(), o = ea(), i = t("%Math.floor%");
|
|
2243
2243
|
return eu = function(s, a) {
|
|
2244
2244
|
if (typeof s != "function")
|
|
2245
2245
|
throw new o("`fn` is not a function");
|
|
@@ -2292,7 +2292,7 @@ var nu, Vm;
|
|
|
2292
2292
|
function Tb() {
|
|
2293
2293
|
if (Vm) return nu;
|
|
2294
2294
|
Vm = 1;
|
|
2295
|
-
var t = _A(), e = NA(), n = PA(), r = na(), o =
|
|
2295
|
+
var t = _A(), e = NA(), n = PA(), r = na(), o = Li(), i = ap(), s = r("Object.prototype.toString"), a = tc()(), l = typeof globalThis > "u" ? Yt : globalThis, c = e(), u = r("String.prototype.slice"), d = r("Array.prototype.indexOf", !0) || function(m, y) {
|
|
2296
2296
|
for (var g = 0; g < m.length; g += 1)
|
|
2297
2297
|
if (m[g] === y)
|
|
2298
2298
|
return g;
|
|
@@ -3152,7 +3152,7 @@ function Ob() {
|
|
|
3152
3152
|
}, iu;
|
|
3153
3153
|
}
|
|
3154
3154
|
var su = {}, Zm;
|
|
3155
|
-
function
|
|
3155
|
+
function Bi() {
|
|
3156
3156
|
if (Zm) return su;
|
|
3157
3157
|
Zm = 1;
|
|
3158
3158
|
function t(a, l) {
|
|
@@ -3216,7 +3216,7 @@ var au, Qm;
|
|
|
3216
3216
|
function Mb() {
|
|
3217
3217
|
if (Qm) return au;
|
|
3218
3218
|
Qm = 1;
|
|
3219
|
-
var t =
|
|
3219
|
+
var t = Bi().codes.ERR_INVALID_OPT_VALUE;
|
|
3220
3220
|
function e(r, o, i) {
|
|
3221
3221
|
return r.highWaterMark != null ? r.highWaterMark : o ? r[i] : null;
|
|
3222
3222
|
}
|
|
@@ -3286,12 +3286,12 @@ function Db() {
|
|
|
3286
3286
|
function a(K) {
|
|
3287
3287
|
return o.isBuffer(K) || K instanceof i;
|
|
3288
3288
|
}
|
|
3289
|
-
var l = Ob(), c = Mb(), u = c.getHighWaterMark, d =
|
|
3289
|
+
var l = Ob(), c = Mb(), u = c.getHighWaterMark, d = Bi().codes, f = d.ERR_INVALID_ARG_TYPE, p = d.ERR_METHOD_NOT_IMPLEMENTED, h = d.ERR_MULTIPLE_CALLBACK, m = d.ERR_STREAM_CANNOT_PIPE, y = d.ERR_STREAM_DESTROYED, g = d.ERR_STREAM_NULL_VALUES, v = d.ERR_STREAM_WRITE_AFTER_END, x = d.ERR_UNKNOWN_ENCODING, w = l.errorOrDestroy;
|
|
3290
3290
|
Po()(N, r);
|
|
3291
3291
|
function T() {
|
|
3292
3292
|
}
|
|
3293
3293
|
function O(K, E, A) {
|
|
3294
|
-
e = e ||
|
|
3294
|
+
e = e || wi(), K = K || {}, typeof A != "boolean" && (A = E instanceof e), this.objectMode = !!K.objectMode, A && (this.objectMode = this.objectMode || !!K.writableObjectMode), this.highWaterMark = u(this, K, "writableHighWaterMark", A), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
|
|
3295
3295
|
var H = K.decodeStrings === !1;
|
|
3296
3296
|
this.decodeStrings = !H, this.defaultEncoding = K.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(B) {
|
|
3297
3297
|
se(E, B);
|
|
@@ -3320,7 +3320,7 @@ function Db() {
|
|
|
3320
3320
|
return K instanceof this;
|
|
3321
3321
|
};
|
|
3322
3322
|
function N(K) {
|
|
3323
|
-
e = e ||
|
|
3323
|
+
e = e || wi();
|
|
3324
3324
|
var E = this instanceof e;
|
|
3325
3325
|
if (!E && !M.call(N, this)) return new N(K);
|
|
3326
3326
|
this._writableState = new O(K, this, E), this.writable = !0, K && (typeof K.write == "function" && (this._write = K.write), typeof K.writev == "function" && (this._writev = K.writev), typeof K.destroy == "function" && (this._destroy = K.destroy), typeof K.final == "function" && (this._final = K.final)), r.call(this);
|
|
@@ -3492,7 +3492,7 @@ function Db() {
|
|
|
3492
3492
|
}, cu;
|
|
3493
3493
|
}
|
|
3494
3494
|
var uu, ng;
|
|
3495
|
-
function
|
|
3495
|
+
function wi() {
|
|
3496
3496
|
if (ng) return uu;
|
|
3497
3497
|
ng = 1;
|
|
3498
3498
|
var t = Object.keys || function(c) {
|
|
@@ -3555,9 +3555,7 @@ function bi() {
|
|
|
3555
3555
|
}
|
|
3556
3556
|
}), uu;
|
|
3557
3557
|
}
|
|
3558
|
-
var du = {}, fu = { exports: {} };
|
|
3559
|
-
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
3560
|
-
var rg;
|
|
3558
|
+
var du = {}, fu = { exports: {} }, rg;
|
|
3561
3559
|
function HA() {
|
|
3562
3560
|
return rg || (rg = 1, function(t, e) {
|
|
3563
3561
|
var n = ec, r = n.Buffer;
|
|
@@ -3569,7 +3567,7 @@ function HA() {
|
|
|
3569
3567
|
function i(s, a, l) {
|
|
3570
3568
|
return r(s, a, l);
|
|
3571
3569
|
}
|
|
3572
|
-
|
|
3570
|
+
o(r, i), i.from = function(s, a, l) {
|
|
3573
3571
|
if (typeof s == "number")
|
|
3574
3572
|
throw new TypeError("Argument must not be a number");
|
|
3575
3573
|
return r(s, a, l);
|
|
@@ -3751,7 +3749,7 @@ var pu, ig;
|
|
|
3751
3749
|
function lp() {
|
|
3752
3750
|
if (ig) return pu;
|
|
3753
3751
|
ig = 1;
|
|
3754
|
-
var t =
|
|
3752
|
+
var t = Bi().codes.ERR_STREAM_PREMATURE_CLOSE;
|
|
3755
3753
|
function e(i) {
|
|
3756
3754
|
var s = !1;
|
|
3757
3755
|
return function() {
|
|
@@ -3945,7 +3943,7 @@ function _b() {
|
|
|
3945
3943
|
var a = $b(), l;
|
|
3946
3944
|
a && a.debuglog ? l = a.debuglog("stream") : l = function() {
|
|
3947
3945
|
};
|
|
3948
|
-
var c = UA(), u = Ob(), d = Mb(), f = d.getHighWaterMark, p =
|
|
3946
|
+
var c = UA(), u = Ob(), d = Mb(), f = d.getHighWaterMark, p = Bi().codes, h = p.ERR_INVALID_ARG_TYPE, m = p.ERR_STREAM_PUSH_AFTER_EOF, y = p.ERR_METHOD_NOT_IMPLEMENTED, g = p.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, v, x, w;
|
|
3949
3947
|
Po()(S, n);
|
|
3950
3948
|
var T = u.errorOrDestroy, O = ["error", "close", "destroy", "pause", "resume"];
|
|
3951
3949
|
function M(I, R, ae) {
|
|
@@ -3953,10 +3951,10 @@ function _b() {
|
|
|
3953
3951
|
!I._events || !I._events[R] ? I.on(R, ae) : Array.isArray(I._events[R]) ? I._events[R].unshift(ae) : I._events[R] = [ae, I._events[R]];
|
|
3954
3952
|
}
|
|
3955
3953
|
function N(I, R, ae) {
|
|
3956
|
-
t = t ||
|
|
3954
|
+
t = t || wi(), I = I || {}, typeof ae != "boolean" && (ae = R instanceof t), this.objectMode = !!I.objectMode, ae && (this.objectMode = this.objectMode || !!I.readableObjectMode), this.highWaterMark = f(this, I, "readableHighWaterMark", ae), this.buffer = new c(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = I.emitClose !== !1, this.autoDestroy = !!I.autoDestroy, this.destroyed = !1, this.defaultEncoding = I.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, I.encoding && (v || (v = Td().StringDecoder), this.decoder = new v(I.encoding), this.encoding = I.encoding);
|
|
3957
3955
|
}
|
|
3958
3956
|
function S(I) {
|
|
3959
|
-
if (t = t ||
|
|
3957
|
+
if (t = t || wi(), !(this instanceof S)) return new S(I);
|
|
3960
3958
|
var R = this instanceof t;
|
|
3961
3959
|
this._readableState = new N(I, this, R), this.readable = !0, I && (typeof I.read == "function" && (this._read = I.read), typeof I.destroy == "function" && (this._destroy = I.destroy)), n.call(this);
|
|
3962
3960
|
}
|
|
@@ -4268,7 +4266,7 @@ var gu, ug;
|
|
|
4268
4266
|
function Ib() {
|
|
4269
4267
|
if (ug) return gu;
|
|
4270
4268
|
ug = 1, gu = a;
|
|
4271
|
-
var t =
|
|
4269
|
+
var t = Bi().codes, e = t.ERR_METHOD_NOT_IMPLEMENTED, n = t.ERR_MULTIPLE_CALLBACK, r = t.ERR_TRANSFORM_ALREADY_TRANSFORMING, o = t.ERR_TRANSFORM_WITH_LENGTH_0, i = wi();
|
|
4272
4270
|
Po()(a, i);
|
|
4273
4271
|
function s(u, d) {
|
|
4274
4272
|
var f = this._transformState;
|
|
@@ -4348,7 +4346,7 @@ function JA() {
|
|
|
4348
4346
|
p || (p = !0, f.apply(void 0, arguments));
|
|
4349
4347
|
};
|
|
4350
4348
|
}
|
|
4351
|
-
var n =
|
|
4349
|
+
var n = Bi().codes, r = n.ERR_MISSING_ARGS, o = n.ERR_STREAM_DESTROYED;
|
|
4352
4350
|
function i(f) {
|
|
4353
4351
|
if (f) throw f;
|
|
4354
4352
|
}
|
|
@@ -4406,7 +4404,7 @@ function XA() {
|
|
|
4406
4404
|
if (pg) return bu;
|
|
4407
4405
|
pg = 1, bu = n;
|
|
4408
4406
|
var t = rp().EventEmitter, e = Po();
|
|
4409
|
-
e(n, t), n.Readable = _b(), n.Writable = Db(), n.Duplex =
|
|
4407
|
+
e(n, t), n.Readable = _b(), n.Writable = Db(), n.Duplex = wi(), n.Transform = Ib(), n.PassThrough = KA(), n.finished = lp(), n.pipeline = JA(), n.Stream = n;
|
|
4410
4408
|
function n() {
|
|
4411
4409
|
t.call(this);
|
|
4412
4410
|
}
|
|
@@ -6478,7 +6476,7 @@ function bo(t, e) {
|
|
|
6478
6476
|
let n = e.length - 1;
|
|
6479
6477
|
n >= 0 && t.isText && t.sameMarkup(e[n]) ? e[n] = t.withText(e[n].text + t.text) : e.push(t);
|
|
6480
6478
|
}
|
|
6481
|
-
function
|
|
6479
|
+
function ws(t, e, n, r) {
|
|
6482
6480
|
let o = (e || t).node(n), i = 0, s = e ? e.index(n) : o.childCount;
|
|
6483
6481
|
t && (i = t.index(n), t.depth > n ? i++ : t.textOffset && (bo(t.nodeAfter, r), i++));
|
|
6484
6482
|
for (let a = i; a < s; a++)
|
|
@@ -6490,15 +6488,15 @@ function vo(t, e) {
|
|
|
6490
6488
|
}
|
|
6491
6489
|
function Qb(t, e, n, r, o) {
|
|
6492
6490
|
let i = t.depth > o && Od(t, e, o + 1), s = r.depth > o && Od(n, r, o + 1), a = [];
|
|
6493
|
-
return
|
|
6491
|
+
return ws(null, t, o, a), i && s && e.index(o) == n.index(o) ? (Zb(i, s), bo(vo(i, Qb(t, e, n, r, o + 1)), a)) : (i && bo(vo(i, gl(t, e, o + 1)), a), ws(e, n, o, a), s && bo(vo(s, gl(n, r, o + 1)), a)), ws(r, null, o, a), new ge(a);
|
|
6494
6492
|
}
|
|
6495
6493
|
function gl(t, e, n) {
|
|
6496
6494
|
let r = [];
|
|
6497
|
-
if (
|
|
6495
|
+
if (ws(null, t, n, r), t.depth > n) {
|
|
6498
6496
|
let o = Od(t, e, n + 1);
|
|
6499
6497
|
bo(vo(o, gl(t, e, n + 1)), r);
|
|
6500
6498
|
}
|
|
6501
|
-
return
|
|
6499
|
+
return ws(e, null, n, r), new ge(r);
|
|
6502
6500
|
}
|
|
6503
6501
|
function DC(t, e) {
|
|
6504
6502
|
let n = e.depth - t.openStart, r = e.node(n).copy(t.content);
|
|
@@ -7215,7 +7213,7 @@ function ev(t, e) {
|
|
|
7215
7213
|
e = t[n].type.name + "(" + e + ")";
|
|
7216
7214
|
return e;
|
|
7217
7215
|
}
|
|
7218
|
-
let
|
|
7216
|
+
let _s = class tv {
|
|
7219
7217
|
/**
|
|
7220
7218
|
@internal
|
|
7221
7219
|
*/
|
|
@@ -7377,7 +7375,7 @@ let Is = class tv {
|
|
|
7377
7375
|
`);
|
|
7378
7376
|
}
|
|
7379
7377
|
};
|
|
7380
|
-
|
|
7378
|
+
_s.empty = new _s(!0);
|
|
7381
7379
|
let RC = class {
|
|
7382
7380
|
constructor(e, n) {
|
|
7383
7381
|
this.string = e, this.nodeTypes = n, this.inline = null, this.pos = 0, this.tokens = e.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
|
|
@@ -7540,7 +7538,7 @@ function UC(t) {
|
|
|
7540
7538
|
});
|
|
7541
7539
|
});
|
|
7542
7540
|
});
|
|
7543
|
-
let i = e[r.join(",")] = new
|
|
7541
|
+
let i = e[r.join(",")] = new _s(r.indexOf(t.length - 1) > -1);
|
|
7544
7542
|
for (let s = 0; s < o.length; s++) {
|
|
7545
7543
|
let a = o[s][1].sort(rv);
|
|
7546
7544
|
i.next.push({ type: o[s][0], next: e[a.join(",")] || n(a) });
|
|
@@ -7623,7 +7621,7 @@ let bg = class lv {
|
|
|
7623
7621
|
True for node types that allow no content.
|
|
7624
7622
|
*/
|
|
7625
7623
|
get isLeaf() {
|
|
7626
|
-
return this.contentMatch ==
|
|
7624
|
+
return this.contentMatch == _s.empty;
|
|
7627
7625
|
}
|
|
7628
7626
|
/**
|
|
7629
7627
|
True when this node is an atom, i.e. when it does not have
|
|
@@ -7862,7 +7860,7 @@ let WC = class {
|
|
|
7862
7860
|
if (o in this.marks)
|
|
7863
7861
|
throw new RangeError(o + " can not be both a node and a mark");
|
|
7864
7862
|
let i = this.nodes[o], s = i.spec.content || "", a = i.spec.marks;
|
|
7865
|
-
if (i.contentMatch = r[s] || (r[s] =
|
|
7863
|
+
if (i.contentMatch = r[s] || (r[s] = _s.parse(s, this.nodes)), i.inlineContent = i.contentMatch.inlineContent, i.spec.linebreakReplacement) {
|
|
7866
7864
|
if (this.linebreakReplacement)
|
|
7867
7865
|
throw new RangeError("Multiple linebreak nodes defined");
|
|
7868
7866
|
if (!i.isInline || !i.isLeaf)
|
|
@@ -8107,9 +8105,9 @@ const fv = {
|
|
|
8107
8105
|
script: !0,
|
|
8108
8106
|
style: !0,
|
|
8109
8107
|
title: !0
|
|
8110
|
-
}, pv = { ol: !0, ul: !0 },
|
|
8108
|
+
}, pv = { ol: !0, ul: !0 }, Is = 1, Nd = 2, Va = 4;
|
|
8111
8109
|
function xg(t, e, n) {
|
|
8112
|
-
return e != null ? (e ?
|
|
8110
|
+
return e != null ? (e ? Is : 0) | (e === "full" ? Nd : 0) : t && t.whitespace == "pre" ? Is | Nd : n & -5;
|
|
8113
8111
|
}
|
|
8114
8112
|
let wa = class {
|
|
8115
8113
|
constructor(e, n, r, o, i, s) {
|
|
@@ -8130,7 +8128,7 @@ let wa = class {
|
|
|
8130
8128
|
return this.match.findWrapping(e.type);
|
|
8131
8129
|
}
|
|
8132
8130
|
finish(e) {
|
|
8133
|
-
if (!(this.options &
|
|
8131
|
+
if (!(this.options & Is)) {
|
|
8134
8132
|
let r = this.content[this.content.length - 1], o;
|
|
8135
8133
|
if (r && r.isText && (o = /[ \t\r\n\u000c]+$/.exec(r.text))) {
|
|
8136
8134
|
let i = r;
|
|
@@ -8159,7 +8157,7 @@ let wa = class {
|
|
|
8159
8157
|
e.nodeType == 3 ? this.addTextNode(e, n) : e.nodeType == 1 && this.addElement(e, n);
|
|
8160
8158
|
}
|
|
8161
8159
|
addTextNode(e, n) {
|
|
8162
|
-
let r = e.nodeValue, o = this.top, i = o.options & Nd ? "full" : this.localPreserveWS || (o.options &
|
|
8160
|
+
let r = e.nodeValue, o = this.top, i = o.options & Nd ? "full" : this.localPreserveWS || (o.options & Is) > 0;
|
|
8163
8161
|
if (i === "full" || o.inlineContext(e) || /[^ \t\r\n\u000c]/.test(r)) {
|
|
8164
8162
|
if (i)
|
|
8165
8163
|
i !== "full" ? r = r.replace(/\r?\n|\r/g, " ") : r = r.replace(/\r\n?/g, `
|
|
@@ -8337,7 +8335,7 @@ let wa = class {
|
|
|
8337
8335
|
for (let n = this.open; n >= 0; n--) {
|
|
8338
8336
|
if (this.nodes[n] == e)
|
|
8339
8337
|
return this.open = n, !0;
|
|
8340
|
-
this.localPreserveWS && (this.nodes[n].options |=
|
|
8338
|
+
this.localPreserveWS && (this.nodes[n].options |= Is);
|
|
8341
8339
|
}
|
|
8342
8340
|
return !1;
|
|
8343
8341
|
}
|
|
@@ -8445,7 +8443,7 @@ function Ag(t, e) {
|
|
|
8445
8443
|
return !0;
|
|
8446
8444
|
}
|
|
8447
8445
|
}
|
|
8448
|
-
let
|
|
8446
|
+
let Pi = class hv {
|
|
8449
8447
|
/**
|
|
8450
8448
|
Create a serializer. `nodes` should map node names to functions
|
|
8451
8449
|
that take a node and return a description of the corresponding
|
|
@@ -8764,7 +8762,7 @@ let Fd = class {
|
|
|
8764
8762
|
}
|
|
8765
8763
|
};
|
|
8766
8764
|
_o.empty = new _o([]);
|
|
8767
|
-
let
|
|
8765
|
+
let bi = class Rd {
|
|
8768
8766
|
/**
|
|
8769
8767
|
Create a new mapping with the given position maps.
|
|
8770
8768
|
*/
|
|
@@ -8912,7 +8910,7 @@ let Kt = class {
|
|
|
8912
8910
|
throw new RangeError("Duplicate use of step JSON ID " + e);
|
|
8913
8911
|
return Su[e] = n, n.prototype.jsonID = e, n;
|
|
8914
8912
|
}
|
|
8915
|
-
}, Zt = class
|
|
8913
|
+
}, Zt = class ts {
|
|
8916
8914
|
/**
|
|
8917
8915
|
@internal
|
|
8918
8916
|
*/
|
|
@@ -8923,13 +8921,13 @@ let Kt = class {
|
|
|
8923
8921
|
Create a successful step result.
|
|
8924
8922
|
*/
|
|
8925
8923
|
static ok(e) {
|
|
8926
|
-
return new
|
|
8924
|
+
return new ts(e, null);
|
|
8927
8925
|
}
|
|
8928
8926
|
/**
|
|
8929
8927
|
Create a failed step result.
|
|
8930
8928
|
*/
|
|
8931
8929
|
static fail(e) {
|
|
8932
|
-
return new
|
|
8930
|
+
return new ts(null, e);
|
|
8933
8931
|
}
|
|
8934
8932
|
/**
|
|
8935
8933
|
Call [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) with the given
|
|
@@ -8938,10 +8936,10 @@ let Kt = class {
|
|
|
8938
8936
|
*/
|
|
8939
8937
|
static fromReplace(e, n, r, o) {
|
|
8940
8938
|
try {
|
|
8941
|
-
return
|
|
8939
|
+
return ts.ok(e.replace(n, r, o));
|
|
8942
8940
|
} catch (i) {
|
|
8943
8941
|
if (i instanceof ml)
|
|
8944
|
-
return
|
|
8942
|
+
return ts.fail(i.message);
|
|
8945
8943
|
throw i;
|
|
8946
8944
|
}
|
|
8947
8945
|
}
|
|
@@ -8954,7 +8952,7 @@ function fp(t, e, n) {
|
|
|
8954
8952
|
}
|
|
8955
8953
|
return ge.fromArray(r);
|
|
8956
8954
|
}
|
|
8957
|
-
let oa = class
|
|
8955
|
+
let oa = class ns extends Kt {
|
|
8958
8956
|
/**
|
|
8959
8957
|
Create a mark step.
|
|
8960
8958
|
*/
|
|
@@ -8970,10 +8968,10 @@ let oa = class rs extends Kt {
|
|
|
8970
8968
|
}
|
|
8971
8969
|
map(e) {
|
|
8972
8970
|
let n = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
|
|
8973
|
-
return n.deleted && r.deleted || n.pos >= r.pos ? null : new
|
|
8971
|
+
return n.deleted && r.deleted || n.pos >= r.pos ? null : new ns(n.pos, r.pos, this.mark);
|
|
8974
8972
|
}
|
|
8975
8973
|
merge(e) {
|
|
8976
|
-
return e instanceof
|
|
8974
|
+
return e instanceof ns && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new ns(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
|
|
8977
8975
|
}
|
|
8978
8976
|
toJSON() {
|
|
8979
8977
|
return {
|
|
@@ -8989,11 +8987,11 @@ let oa = class rs extends Kt {
|
|
|
8989
8987
|
static fromJSON(e, n) {
|
|
8990
8988
|
if (typeof n.from != "number" || typeof n.to != "number")
|
|
8991
8989
|
throw new RangeError("Invalid input for AddMarkStep.fromJSON");
|
|
8992
|
-
return new
|
|
8990
|
+
return new ns(n.from, n.to, e.markFromJSON(n.mark));
|
|
8993
8991
|
}
|
|
8994
8992
|
};
|
|
8995
8993
|
Kt.jsonID("addMark", oa);
|
|
8996
|
-
let Fn = class
|
|
8994
|
+
let Fn = class rs extends Kt {
|
|
8997
8995
|
/**
|
|
8998
8996
|
Create a mark-removing step.
|
|
8999
8997
|
*/
|
|
@@ -9009,10 +9007,10 @@ let Fn = class is extends Kt {
|
|
|
9009
9007
|
}
|
|
9010
9008
|
map(e) {
|
|
9011
9009
|
let n = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
|
|
9012
|
-
return n.deleted && r.deleted || n.pos >= r.pos ? null : new
|
|
9010
|
+
return n.deleted && r.deleted || n.pos >= r.pos ? null : new rs(n.pos, r.pos, this.mark);
|
|
9013
9011
|
}
|
|
9014
9012
|
merge(e) {
|
|
9015
|
-
return e instanceof
|
|
9013
|
+
return e instanceof rs && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new rs(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
|
|
9016
9014
|
}
|
|
9017
9015
|
toJSON() {
|
|
9018
9016
|
return {
|
|
@@ -9028,11 +9026,11 @@ let Fn = class is extends Kt {
|
|
|
9028
9026
|
static fromJSON(e, n) {
|
|
9029
9027
|
if (typeof n.from != "number" || typeof n.to != "number")
|
|
9030
9028
|
throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
|
|
9031
|
-
return new
|
|
9029
|
+
return new rs(n.from, n.to, e.markFromJSON(n.mark));
|
|
9032
9030
|
}
|
|
9033
9031
|
};
|
|
9034
9032
|
Kt.jsonID("removeMark", Fn);
|
|
9035
|
-
let pp = class
|
|
9033
|
+
let pp = class is extends Kt {
|
|
9036
9034
|
/**
|
|
9037
9035
|
Create a node mark step.
|
|
9038
9036
|
*/
|
|
@@ -9053,15 +9051,15 @@ let pp = class ss extends Kt {
|
|
|
9053
9051
|
if (r.length == n.marks.length) {
|
|
9054
9052
|
for (let o = 0; o < n.marks.length; o++)
|
|
9055
9053
|
if (!n.marks[o].isInSet(r))
|
|
9056
|
-
return new
|
|
9057
|
-
return new
|
|
9054
|
+
return new is(this.pos, n.marks[o]);
|
|
9055
|
+
return new is(this.pos, this.mark);
|
|
9058
9056
|
}
|
|
9059
9057
|
}
|
|
9060
9058
|
return new hp(this.pos, this.mark);
|
|
9061
9059
|
}
|
|
9062
9060
|
map(e) {
|
|
9063
9061
|
let n = e.mapResult(this.pos, 1);
|
|
9064
|
-
return n.deletedAfter ? null : new
|
|
9062
|
+
return n.deletedAfter ? null : new is(n.pos, this.mark);
|
|
9065
9063
|
}
|
|
9066
9064
|
toJSON() {
|
|
9067
9065
|
return { stepType: "addNodeMark", pos: this.pos, mark: this.mark.toJSON() };
|
|
@@ -9072,7 +9070,7 @@ let pp = class ss extends Kt {
|
|
|
9072
9070
|
static fromJSON(e, n) {
|
|
9073
9071
|
if (typeof n.pos != "number")
|
|
9074
9072
|
throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");
|
|
9075
|
-
return new
|
|
9073
|
+
return new is(n.pos, e.markFromJSON(n.mark));
|
|
9076
9074
|
}
|
|
9077
9075
|
};
|
|
9078
9076
|
Kt.jsonID("addNodeMark", pp);
|
|
@@ -9604,9 +9602,9 @@ let gE = class {
|
|
|
9604
9602
|
let { content: e, openStart: n, openEnd: r } = this.unplaced, o = Au(e, n);
|
|
9605
9603
|
if (o.childCount <= 1 && n > 0) {
|
|
9606
9604
|
let i = e.size - n <= n + o.size;
|
|
9607
|
-
this.unplaced = new xe(
|
|
9605
|
+
this.unplaced = new xe(ss(e, n - 1, 1), n - 1, i ? n - 1 : r);
|
|
9608
9606
|
} else
|
|
9609
|
-
this.unplaced = new xe(
|
|
9607
|
+
this.unplaced = new xe(ss(e, n, 1), n, r);
|
|
9610
9608
|
}
|
|
9611
9609
|
// Move content from the unplaced slice at `sliceDepth` to the
|
|
9612
9610
|
// frontier node at `frontierDepth`. Close that frontier node when
|
|
@@ -9631,12 +9629,12 @@ let gE = class {
|
|
|
9631
9629
|
c++, (c > 1 || l == 0 || m.content.size) && (d = y, u.push(Tv(m.mark(f.allowedMarks(m.marks)), c == 1 ? l : 0, c == a.childCount ? p : -1)));
|
|
9632
9630
|
}
|
|
9633
9631
|
let h = c == a.childCount;
|
|
9634
|
-
h || (p = -1), this.placed =
|
|
9632
|
+
h || (p = -1), this.placed = as(this.placed, n, ge.from(u)), this.frontier[n].match = d, h && p < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
|
|
9635
9633
|
for (let m = 0, y = a; m < p; m++) {
|
|
9636
9634
|
let g = y.lastChild;
|
|
9637
9635
|
this.frontier.push({ type: g.type, match: g.contentMatchAt(g.childCount) }), y = g.content;
|
|
9638
9636
|
}
|
|
9639
|
-
this.unplaced = h ? e == 0 ? xe.empty : new xe(
|
|
9637
|
+
this.unplaced = h ? e == 0 ? xe.empty : new xe(ss(s.content, e - 1, 1), e - 1, p < 0 ? s.openEnd : e - 1) : new xe(ss(s.content, e, c), s.openStart, s.openEnd);
|
|
9640
9638
|
}
|
|
9641
9639
|
mustMoveInline() {
|
|
9642
9640
|
if (!this.$to.parent.isTextblock)
|
|
@@ -9668,7 +9666,7 @@ let gE = class {
|
|
|
9668
9666
|
return null;
|
|
9669
9667
|
for (; this.depth > n.depth; )
|
|
9670
9668
|
this.closeFrontierNode();
|
|
9671
|
-
n.fit.childCount && (this.placed =
|
|
9669
|
+
n.fit.childCount && (this.placed = as(this.placed, n.depth, n.fit)), e = n.move;
|
|
9672
9670
|
for (let r = n.depth + 1; r <= e.depth; r++) {
|
|
9673
9671
|
let o = e.node(r), i = o.type.contentMatch.fillBefore(o.content, !0, e.index(r));
|
|
9674
9672
|
this.openFrontierNode(o.type, o.attrs, i);
|
|
@@ -9677,18 +9675,18 @@ let gE = class {
|
|
|
9677
9675
|
}
|
|
9678
9676
|
openFrontierNode(e, n = null, r) {
|
|
9679
9677
|
let o = this.frontier[this.depth];
|
|
9680
|
-
o.match = o.match.matchType(e), this.placed =
|
|
9678
|
+
o.match = o.match.matchType(e), this.placed = as(this.placed, this.depth, ge.from(e.create(n, r))), this.frontier.push({ type: e, match: e.contentMatch });
|
|
9681
9679
|
}
|
|
9682
9680
|
closeFrontierNode() {
|
|
9683
9681
|
let e = this.frontier.pop().match.fillBefore(ge.empty, !0);
|
|
9684
|
-
e.childCount && (this.placed =
|
|
9682
|
+
e.childCount && (this.placed = as(this.placed, this.frontier.length, e));
|
|
9685
9683
|
}
|
|
9686
9684
|
};
|
|
9687
|
-
function
|
|
9688
|
-
return e == 0 ? t.cutByIndex(n, t.childCount) : t.replaceChild(0, t.firstChild.copy(
|
|
9685
|
+
function ss(t, e, n) {
|
|
9686
|
+
return e == 0 ? t.cutByIndex(n, t.childCount) : t.replaceChild(0, t.firstChild.copy(ss(t.firstChild.content, e - 1, n)));
|
|
9689
9687
|
}
|
|
9690
|
-
function
|
|
9691
|
-
return e == 0 ? t.append(n) : t.replaceChild(t.childCount - 1, t.lastChild.copy(
|
|
9688
|
+
function as(t, e, n) {
|
|
9689
|
+
return e == 0 ? t.append(n) : t.replaceChild(t.childCount - 1, t.lastChild.copy(as(t.lastChild.content, e - 1, n)));
|
|
9692
9690
|
}
|
|
9693
9691
|
function Au(t, e) {
|
|
9694
9692
|
for (let n = 0; n < e; n++)
|
|
@@ -9878,21 +9876,21 @@ let Dv = class Pd extends Kt {
|
|
|
9878
9876
|
}
|
|
9879
9877
|
};
|
|
9880
9878
|
Kt.jsonID("docAttr", Dv);
|
|
9881
|
-
let
|
|
9879
|
+
let vi = class extends Error {
|
|
9882
9880
|
};
|
|
9883
|
-
|
|
9881
|
+
vi = function t(e) {
|
|
9884
9882
|
let n = Error.call(this, e);
|
|
9885
9883
|
return n.__proto__ = t.prototype, n;
|
|
9886
9884
|
};
|
|
9887
|
-
|
|
9888
|
-
|
|
9889
|
-
|
|
9885
|
+
vi.prototype = Object.create(Error.prototype);
|
|
9886
|
+
vi.prototype.constructor = vi;
|
|
9887
|
+
vi.prototype.name = "TransformError";
|
|
9890
9888
|
let _v = class {
|
|
9891
9889
|
/**
|
|
9892
9890
|
Create a transform that starts with the given document.
|
|
9893
9891
|
*/
|
|
9894
9892
|
constructor(e) {
|
|
9895
|
-
this.doc = e, this.steps = [], this.docs = [], this.mapping = new
|
|
9893
|
+
this.doc = e, this.steps = [], this.docs = [], this.mapping = new bi();
|
|
9896
9894
|
}
|
|
9897
9895
|
/**
|
|
9898
9896
|
The starting document.
|
|
@@ -9907,7 +9905,7 @@ let _v = class {
|
|
|
9907
9905
|
step(e) {
|
|
9908
9906
|
let n = this.maybeStep(e);
|
|
9909
9907
|
if (n.failed)
|
|
9910
|
-
throw new
|
|
9908
|
+
throw new vi(n.failed);
|
|
9911
9909
|
return this;
|
|
9912
9910
|
}
|
|
9913
9911
|
/**
|
|
@@ -10284,7 +10282,7 @@ let Iv = class {
|
|
|
10284
10282
|
function Mg(t) {
|
|
10285
10283
|
!Og && !t.parent.inlineContent && (Og = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + t.parent.type.name + ")"));
|
|
10286
10284
|
}
|
|
10287
|
-
let Ve = class
|
|
10285
|
+
let Ve = class ls extends qe {
|
|
10288
10286
|
/**
|
|
10289
10287
|
Construct a text selection between the given points.
|
|
10290
10288
|
*/
|
|
@@ -10303,7 +10301,7 @@ let Ve = class cs extends qe {
|
|
|
10303
10301
|
if (!r.parent.inlineContent)
|
|
10304
10302
|
return qe.near(r);
|
|
10305
10303
|
let o = e.resolve(n.map(this.anchor));
|
|
10306
|
-
return new
|
|
10304
|
+
return new ls(o.parent.inlineContent ? o : r, r);
|
|
10307
10305
|
}
|
|
10308
10306
|
replace(e, n = xe.empty) {
|
|
10309
10307
|
if (super.replace(e, n), n == xe.empty) {
|
|
@@ -10312,7 +10310,7 @@ let Ve = class cs extends qe {
|
|
|
10312
10310
|
}
|
|
10313
10311
|
}
|
|
10314
10312
|
eq(e) {
|
|
10315
|
-
return e instanceof
|
|
10313
|
+
return e instanceof ls && e.anchor == this.anchor && e.head == this.head;
|
|
10316
10314
|
}
|
|
10317
10315
|
getBookmark() {
|
|
10318
10316
|
return new Nv(this.anchor, this.head);
|
|
@@ -10326,7 +10324,7 @@ let Ve = class cs extends qe {
|
|
|
10326
10324
|
static fromJSON(e, n) {
|
|
10327
10325
|
if (typeof n.anchor != "number" || typeof n.head != "number")
|
|
10328
10326
|
throw new RangeError("Invalid input for TextSelection.fromJSON");
|
|
10329
|
-
return new
|
|
10327
|
+
return new ls(e.resolve(n.anchor), e.resolve(n.head));
|
|
10330
10328
|
}
|
|
10331
10329
|
/**
|
|
10332
10330
|
Create a text selection from non-resolved positions.
|
|
@@ -10352,7 +10350,7 @@ let Ve = class cs extends qe {
|
|
|
10352
10350
|
else
|
|
10353
10351
|
return qe.near(n, r);
|
|
10354
10352
|
}
|
|
10355
|
-
return e.parent.inlineContent || (o == 0 ? e = n : (e = (qe.findFrom(e, -r, !0) || qe.findFrom(e, r, !0)).$anchor, e.pos < n.pos != o < 0 && (e = n))), new
|
|
10353
|
+
return e.parent.inlineContent || (o == 0 ? e = n : (e = (qe.findFrom(e, -r, !0) || qe.findFrom(e, r, !0)).$anchor, e.pos < n.pos != o < 0 && (e = n))), new ls(e, n);
|
|
10356
10354
|
}
|
|
10357
10355
|
};
|
|
10358
10356
|
qe.jsonID("text", Ve);
|
|
@@ -10366,7 +10364,7 @@ let Nv = class Fv {
|
|
|
10366
10364
|
resolve(e) {
|
|
10367
10365
|
return Ve.between(e.resolve(this.anchor), e.resolve(this.head));
|
|
10368
10366
|
}
|
|
10369
|
-
}, Le = class
|
|
10367
|
+
}, Le = class cs extends qe {
|
|
10370
10368
|
/**
|
|
10371
10369
|
Create a node selection. Does not verify the validity of its
|
|
10372
10370
|
argument.
|
|
@@ -10377,13 +10375,13 @@ let Nv = class Fv {
|
|
|
10377
10375
|
}
|
|
10378
10376
|
map(e, n) {
|
|
10379
10377
|
let { deleted: r, pos: o } = n.mapResult(this.anchor), i = e.resolve(o);
|
|
10380
|
-
return r ? qe.near(i) : new
|
|
10378
|
+
return r ? qe.near(i) : new cs(i);
|
|
10381
10379
|
}
|
|
10382
10380
|
content() {
|
|
10383
10381
|
return new xe(ge.from(this.node), 0, 0);
|
|
10384
10382
|
}
|
|
10385
10383
|
eq(e) {
|
|
10386
|
-
return e instanceof
|
|
10384
|
+
return e instanceof cs && e.anchor == this.anchor;
|
|
10387
10385
|
}
|
|
10388
10386
|
toJSON() {
|
|
10389
10387
|
return { type: "node", anchor: this.anchor };
|
|
@@ -10397,13 +10395,13 @@ let Nv = class Fv {
|
|
|
10397
10395
|
static fromJSON(e, n) {
|
|
10398
10396
|
if (typeof n.anchor != "number")
|
|
10399
10397
|
throw new RangeError("Invalid input for NodeSelection.fromJSON");
|
|
10400
|
-
return new
|
|
10398
|
+
return new cs(e.resolve(n.anchor));
|
|
10401
10399
|
}
|
|
10402
10400
|
/**
|
|
10403
10401
|
Create a node selection from non-resolved positions.
|
|
10404
10402
|
*/
|
|
10405
10403
|
static create(e, n) {
|
|
10406
|
-
return new
|
|
10404
|
+
return new cs(e.resolve(n));
|
|
10407
10405
|
}
|
|
10408
10406
|
/**
|
|
10409
10407
|
Determines whether the given node may be selected as a node
|
|
@@ -10654,13 +10652,13 @@ let AE = class extends _v {
|
|
|
10654
10652
|
function Fg(t, e) {
|
|
10655
10653
|
return !e || !t ? t : t.bind(e);
|
|
10656
10654
|
}
|
|
10657
|
-
let
|
|
10655
|
+
let us = class {
|
|
10658
10656
|
constructor(e, n, r) {
|
|
10659
10657
|
this.name = e, this.init = Fg(n.init, r), this.apply = Fg(n.apply, r);
|
|
10660
10658
|
}
|
|
10661
10659
|
};
|
|
10662
10660
|
const CE = [
|
|
10663
|
-
new
|
|
10661
|
+
new us("doc", {
|
|
10664
10662
|
init(t) {
|
|
10665
10663
|
return t.doc || t.schema.topNodeType.createAndFill();
|
|
10666
10664
|
},
|
|
@@ -10668,7 +10666,7 @@ const CE = [
|
|
|
10668
10666
|
return t.doc;
|
|
10669
10667
|
}
|
|
10670
10668
|
}),
|
|
10671
|
-
new
|
|
10669
|
+
new us("selection", {
|
|
10672
10670
|
init(t, e) {
|
|
10673
10671
|
return t.selection || qe.atStart(e.doc);
|
|
10674
10672
|
},
|
|
@@ -10676,7 +10674,7 @@ const CE = [
|
|
|
10676
10674
|
return t.selection;
|
|
10677
10675
|
}
|
|
10678
10676
|
}),
|
|
10679
|
-
new
|
|
10677
|
+
new us("storedMarks", {
|
|
10680
10678
|
init(t) {
|
|
10681
10679
|
return t.storedMarks || null;
|
|
10682
10680
|
},
|
|
@@ -10684,7 +10682,7 @@ const CE = [
|
|
|
10684
10682
|
return r.selection.$cursor ? t.storedMarks : null;
|
|
10685
10683
|
}
|
|
10686
10684
|
}),
|
|
10687
|
-
new
|
|
10685
|
+
new us("scrollToSelection", {
|
|
10688
10686
|
init() {
|
|
10689
10687
|
return 0;
|
|
10690
10688
|
},
|
|
@@ -10698,7 +10696,7 @@ let Tu = class {
|
|
|
10698
10696
|
this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = CE.slice(), n && n.forEach((r) => {
|
|
10699
10697
|
if (this.pluginsByKey[r.key])
|
|
10700
10698
|
throw new RangeError("Adding different instances of a keyed plugin (" + r.key + ")");
|
|
10701
|
-
this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new
|
|
10699
|
+
this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new us(r.key, r.spec.state, r));
|
|
10702
10700
|
});
|
|
10703
10701
|
}
|
|
10704
10702
|
};
|
|
@@ -10937,7 +10935,7 @@ const wl = (t) => t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), EE = (t) =>
|
|
|
10937
10935
|
document.removeEventListener("click", t.__clickOutsideHandler), delete t.__clickOutsideHandler;
|
|
10938
10936
|
}
|
|
10939
10937
|
};
|
|
10940
|
-
function
|
|
10938
|
+
function xi(t) {
|
|
10941
10939
|
if (t != null)
|
|
10942
10940
|
return typeof t == "string" && (t = parseFloat(t)), Math.round(t * 1440);
|
|
10943
10941
|
}
|
|
@@ -10951,7 +10949,7 @@ function at(t) {
|
|
|
10951
10949
|
}
|
|
10952
10950
|
function ht(t) {
|
|
10953
10951
|
if (t != null)
|
|
10954
|
-
return t = t / 96,
|
|
10952
|
+
return t = t / 96, xi(t);
|
|
10955
10953
|
}
|
|
10956
10954
|
function fi(t) {
|
|
10957
10955
|
if (t != null)
|
|
@@ -10971,7 +10969,7 @@ function Hn(t) {
|
|
|
10971
10969
|
const e = t * 96 / 914400;
|
|
10972
10970
|
return Math.round(e);
|
|
10973
10971
|
}
|
|
10974
|
-
function
|
|
10972
|
+
function Ki(t) {
|
|
10975
10973
|
if (t != null)
|
|
10976
10974
|
return typeof t == "string" && (t = parseFloat(t)), Math.round(t * 9525);
|
|
10977
10975
|
}
|
|
@@ -13658,7 +13656,7 @@ const GE = (t, e) => ({
|
|
|
13658
13656
|
colgroupValues: f
|
|
13659
13657
|
};
|
|
13660
13658
|
};
|
|
13661
|
-
function
|
|
13659
|
+
function zi(t) {
|
|
13662
13660
|
const { type: e } = t.node || {}, n = {
|
|
13663
13661
|
doc: i4,
|
|
13664
13662
|
body: r4,
|
|
@@ -13686,17 +13684,17 @@ function r4(t) {
|
|
|
13686
13684
|
if (t.converter) {
|
|
13687
13685
|
const n = t.converter.pageStyles.pageMargins, r = e.elements.find((i) => i.name === "w:pgMar"), { attributes: o } = r;
|
|
13688
13686
|
Object.entries(n).forEach(([i, s]) => {
|
|
13689
|
-
const a =
|
|
13687
|
+
const a = xi(s);
|
|
13690
13688
|
o[`w:${i}`] = a;
|
|
13691
13689
|
}), r.attributes = o;
|
|
13692
13690
|
}
|
|
13693
13691
|
return {
|
|
13694
13692
|
name: "w:body",
|
|
13695
|
-
elements: [...
|
|
13693
|
+
elements: [...ji(t), e]
|
|
13696
13694
|
};
|
|
13697
13695
|
}
|
|
13698
13696
|
function Hv(t) {
|
|
13699
|
-
const e =
|
|
13697
|
+
const e = ji(t), n = e.find((i) => i.name === "htmlAnnotation");
|
|
13700
13698
|
if (e.length === 1 && n)
|
|
13701
13699
|
return n.elements;
|
|
13702
13700
|
const r = o4(t.node);
|
|
@@ -13723,7 +13721,7 @@ function o4(t) {
|
|
|
13723
13721
|
}
|
|
13724
13722
|
if (i) {
|
|
13725
13723
|
const { left: d, right: f, firstLine: p, hanging: h } = i, m = {};
|
|
13726
|
-
(d || d === 0) && (m["w:left"] = ht(d)), (f || f === 0) && (m["w:right"] = ht(f)), (p || p === 0) && (m["w:firstLine"] = ht(p)), (h || h === 0) && (m["w:hanging"] = ht(h)), a && !m["w:left"] && (m["w:left"] =
|
|
13724
|
+
(d || d === 0) && (m["w:left"] = ht(d)), (f || f === 0) && (m["w:right"] = ht(f)), (p || p === 0) && (m["w:firstLine"] = ht(p)), (h || h === 0) && (m["w:hanging"] = ht(h)), a && !m["w:left"] && (m["w:left"] = xi(a));
|
|
13727
13725
|
const y = {
|
|
13728
13726
|
name: "w:ind",
|
|
13729
13727
|
attributes: m
|
|
@@ -13733,7 +13731,7 @@ function o4(t) {
|
|
|
13733
13731
|
const d = {
|
|
13734
13732
|
name: "w:ind",
|
|
13735
13733
|
attributes: {
|
|
13736
|
-
"w:left":
|
|
13734
|
+
"w:left": xi(a)
|
|
13737
13735
|
}
|
|
13738
13736
|
};
|
|
13739
13737
|
n.push(d);
|
|
@@ -13767,16 +13765,16 @@ function i4(t) {
|
|
|
13767
13765
|
};
|
|
13768
13766
|
return [{
|
|
13769
13767
|
name: "w:document",
|
|
13770
|
-
elements: [
|
|
13768
|
+
elements: [zi({ ...t, node: e })],
|
|
13771
13769
|
attributes: FE
|
|
13772
13770
|
}, t];
|
|
13773
13771
|
}
|
|
13774
|
-
function
|
|
13772
|
+
function ji(t) {
|
|
13775
13773
|
const { content: e } = t.node;
|
|
13776
13774
|
if (!e) return [];
|
|
13777
13775
|
const n = [];
|
|
13778
13776
|
return e.forEach((r) => {
|
|
13779
|
-
const o =
|
|
13777
|
+
const o = zi({ ...t, node: r });
|
|
13780
13778
|
o instanceof Array ? n.push(...o) : n.push(o);
|
|
13781
13779
|
}), n.filter((r) => r);
|
|
13782
13780
|
}
|
|
@@ -13813,7 +13811,7 @@ function a4(t) {
|
|
|
13813
13811
|
function l4(t) {
|
|
13814
13812
|
const { node: e } = t, n = e.marks, r = [Wt, yt, $t], o = n.find((l) => r.includes(l.type)), i = o.type === Wt, s = a4(n);
|
|
13815
13813
|
e.marks = n.filter((l) => !r.includes(l.type)), s && e.marks.push(s);
|
|
13816
|
-
const a =
|
|
13814
|
+
const a = zi({ ...t, node: e });
|
|
13817
13815
|
if (!i) {
|
|
13818
13816
|
const l = a.elements.find((c) => c.name === "w:t");
|
|
13819
13817
|
l.name = "w:delText";
|
|
@@ -13853,7 +13851,7 @@ function c4(t) {
|
|
|
13853
13851
|
const { node: e } = t, n = e.marks.find((s) => s.type === "link"), r = n.attrs.href;
|
|
13854
13852
|
let o = n.attrs.rId;
|
|
13855
13853
|
o || (o = Gv(t, r)), e.marks = e.marks.filter((s) => s.type !== "link");
|
|
13856
|
-
const i =
|
|
13854
|
+
const i = zi({ ...t, node: e });
|
|
13857
13855
|
return {
|
|
13858
13856
|
name: "w:hyperlink",
|
|
13859
13857
|
type: "element",
|
|
@@ -13898,7 +13896,7 @@ function Pg(t) {
|
|
|
13898
13896
|
...h.attrs,
|
|
13899
13897
|
...o.attrs
|
|
13900
13898
|
};
|
|
13901
|
-
const m =
|
|
13899
|
+
const m = zi({ ...t, node: h });
|
|
13902
13900
|
m.elements || (m.elements = []);
|
|
13903
13901
|
const y = m.elements.findIndex((x) => x.name === "w:pPr");
|
|
13904
13902
|
if (!m.elements.filter((x) => x.name !== "w:pPr").length) {
|
|
@@ -13923,7 +13921,7 @@ function Pg(t) {
|
|
|
13923
13921
|
}), r;
|
|
13924
13922
|
}
|
|
13925
13923
|
function u4(t, e) {
|
|
13926
|
-
const n = d4(t.converter
|
|
13924
|
+
const n = d4(t.converter?.numbering?.definitions), r = e === "bullet" ? WE : HE, o = n, i = r.attributes["w:abstractNumId"], s = {
|
|
13927
13925
|
type: "element",
|
|
13928
13926
|
name: "w:num",
|
|
13929
13927
|
attributes: {
|
|
@@ -13992,7 +13990,7 @@ function h4(t) {
|
|
|
13992
13990
|
}
|
|
13993
13991
|
function m4(t) {
|
|
13994
13992
|
t.node = g4(t.node, t);
|
|
13995
|
-
const e =
|
|
13993
|
+
const e = ji(t), n = w4(t.node), r = v4(t.node, t);
|
|
13996
13994
|
return e.unshift(n), e.unshift(r), {
|
|
13997
13995
|
name: "w:tbl",
|
|
13998
13996
|
elements: e
|
|
@@ -14133,7 +14131,7 @@ function v4(t, e) {
|
|
|
14133
14131
|
};
|
|
14134
14132
|
}
|
|
14135
14133
|
function x4(t) {
|
|
14136
|
-
const e =
|
|
14134
|
+
const e = ji(t), n = k4(t.node);
|
|
14137
14135
|
return n.elements.length && e.unshift(n), {
|
|
14138
14136
|
name: "w:tr",
|
|
14139
14137
|
elements: e
|
|
@@ -14156,7 +14154,7 @@ function k4(t) {
|
|
|
14156
14154
|
};
|
|
14157
14155
|
}
|
|
14158
14156
|
function S4(t) {
|
|
14159
|
-
const e =
|
|
14157
|
+
const e = ji({
|
|
14160
14158
|
...t,
|
|
14161
14159
|
tableCell: t.node
|
|
14162
14160
|
}), n = A4(t.node);
|
|
@@ -14168,7 +14166,7 @@ function S4(t) {
|
|
|
14168
14166
|
function A4(t) {
|
|
14169
14167
|
const e = [], { attrs: n } = t, { colwidth: r = [], cellWidthType: o = "dxa", background: i = {}, colspan: s, rowspan: a, widthUnit: l } = n, c = r.reduce((m, y) => m + y, 0), u = {
|
|
14170
14168
|
name: "w:tcW",
|
|
14171
|
-
attributes: { "w:w": l === "px" ? ht(c) :
|
|
14169
|
+
attributes: { "w:w": l === "px" ? ht(c) : xi(c), "w:type": o }
|
|
14172
14170
|
};
|
|
14173
14171
|
if (e.push(u), s) {
|
|
14174
14172
|
const m = {
|
|
@@ -14290,7 +14288,7 @@ function zg(t) {
|
|
|
14290
14288
|
n.attributes["w:val"] = r.textAlign;
|
|
14291
14289
|
break;
|
|
14292
14290
|
case "textIndent":
|
|
14293
|
-
n.attributes["w:firstline"] =
|
|
14291
|
+
n.attributes["w:firstline"] = xi(r.textIndent);
|
|
14294
14292
|
break;
|
|
14295
14293
|
case "lineHeight":
|
|
14296
14294
|
n.attributes["w:line"] = Pv(r.lineHeight);
|
|
@@ -14327,18 +14325,18 @@ function Kv(t, e) {
|
|
|
14327
14325
|
let i = n.rId;
|
|
14328
14326
|
const s = n.src || n.imageSrc, { originalWidth: a, originalHeight: l } = T4(s);
|
|
14329
14327
|
let c = n.size ? {
|
|
14330
|
-
w:
|
|
14331
|
-
h:
|
|
14328
|
+
w: Ki(n.size.width),
|
|
14329
|
+
h: Ki(n.size.height)
|
|
14332
14330
|
} : e;
|
|
14333
14331
|
if (a && l) {
|
|
14334
14332
|
const p = Hn(c.w), h = Hn(c.h), { scaledWidth: m, scaledHeight: y } = $4(a, l, p, h);
|
|
14335
14333
|
c = {
|
|
14336
|
-
w:
|
|
14337
|
-
h:
|
|
14334
|
+
w: Ki(m),
|
|
14335
|
+
h: Ki(y)
|
|
14338
14336
|
};
|
|
14339
14337
|
}
|
|
14340
14338
|
if (o) {
|
|
14341
|
-
const p = o.attrs.colwidth.reduce((x, w) => x + w, 0), h = o.attrs.cellMargins?.left || 8, m = o.attrs.cellMargins?.right || 8, y =
|
|
14339
|
+
const p = o.attrs.colwidth.reduce((x, w) => x + w, 0), h = o.attrs.cellMargins?.left || 8, m = o.attrs.cellMargins?.right || 8, y = Ki(p - (h + m)), { width: g, height: v } = R4(c.w, c.h, y);
|
|
14342
14340
|
g && v && (c = { w: g, h: v });
|
|
14343
14341
|
}
|
|
14344
14342
|
if (t.node.type === "image" && !i) {
|
|
@@ -14522,7 +14520,8 @@ function M4(t) {
|
|
|
14522
14520
|
}).doc.toJSON();
|
|
14523
14521
|
return {
|
|
14524
14522
|
name: "htmlAnnotation",
|
|
14525
|
-
elements:
|
|
14523
|
+
elements: ji({
|
|
14524
|
+
...t,
|
|
14526
14525
|
node: r
|
|
14527
14526
|
})
|
|
14528
14527
|
};
|
|
@@ -14931,7 +14930,7 @@ const K4 = {
|
|
|
14931
14930
|
handlerName: "drawingNodeHandler",
|
|
14932
14931
|
handler: G4
|
|
14933
14932
|
};
|
|
14934
|
-
function
|
|
14933
|
+
function ki(t, e = [], n = null) {
|
|
14935
14934
|
const r = [], o = /* @__PURE__ */ new Set();
|
|
14936
14935
|
return t?.elements?.forEach((i) => {
|
|
14937
14936
|
const s = Io.markTypes.filter((a) => a.name === i.name);
|
|
@@ -14972,7 +14971,7 @@ function J4(t, e) {
|
|
|
14972
14971
|
date: r["w:date"],
|
|
14973
14972
|
author: r["w:author"],
|
|
14974
14973
|
authorEmail: r["w:authorEmail"]
|
|
14975
|
-
}, i =
|
|
14974
|
+
}, i = ki(n);
|
|
14976
14975
|
return [{ type: $t, attrs: { ...o, before: i, after: [...e] } }];
|
|
14977
14976
|
}
|
|
14978
14977
|
function jd(t) {
|
|
@@ -15021,9 +15020,9 @@ function Q4(t) {
|
|
|
15021
15020
|
function eT(t) {
|
|
15022
15021
|
return t["w:fill"] ? `#${t["w:fill"]}` : _E(t?.["w:val"]) ? `#${t["w:val"]}` : DE(t?.["w:val"]) || null;
|
|
15023
15022
|
}
|
|
15024
|
-
function
|
|
15023
|
+
function qi(t, e) {
|
|
15025
15024
|
const n = [], r = [], { attributes: o = {}, elements: i = [] } = t, { nodes: s, paragraphProperties: a = {}, runProperties: l = {} } = tT(i);
|
|
15026
|
-
return i.find((c) => c.name === "w:r") && (a.elements = a?.elements?.filter((c) => c.name !== "w:rPr")), l && l?.elements?.length && n.push(...
|
|
15025
|
+
return i.find((c) => c.name === "w:r") && (a.elements = a?.elements?.filter((c) => c.name !== "w:rPr")), l && l?.elements?.length && n.push(...ki(l, r)), a && a.elements?.length && n.push(...ki(a, r)), n.push(...J4(l, n)), a && a.elements?.length && (o.paragraphProperties = a), n && t.name === "w:p" && n.forEach((c) => {
|
|
15027
15026
|
const u = Object.keys(c.attrs ?? {})[0];
|
|
15028
15027
|
if (u) {
|
|
15029
15028
|
const d = c.attrs[u];
|
|
@@ -15051,7 +15050,7 @@ const rT = (t) => {
|
|
|
15051
15050
|
const { nodes: e, nodeListHandler: n } = t;
|
|
15052
15051
|
if (e.length === 0 || !(e[0].name === "w:del" || e[0].name === "w:ins"))
|
|
15053
15052
|
return { nodes: [], consumed: 0 };
|
|
15054
|
-
const r = e[0], { name: o } = r, { attributes: i, elements: s } =
|
|
15053
|
+
const r = e[0], { name: o } = r, { attributes: i, elements: s } = qi(r), a = n.handler({ ...t, insideTrackChange: !0, nodes: s }), l = o === "w:del" ? yt : Wt, c = {
|
|
15055
15054
|
id: i["w:id"],
|
|
15056
15055
|
date: i["w:date"],
|
|
15057
15056
|
author: i["w:author"],
|
|
@@ -15093,7 +15092,7 @@ const rT = (t) => {
|
|
|
15093
15092
|
let a = n.handler(s)?.filter((u) => u) || [];
|
|
15094
15093
|
const l = i.elements?.some((u) => u.name === "w:rPr"), c = lT(o, r);
|
|
15095
15094
|
if (l) {
|
|
15096
|
-
const { marks: u = [], attributes: d = {} } =
|
|
15095
|
+
const { marks: u = [], attributes: d = {} } = qi(i), f = u.find((h) => h.type === "textStyle"), p = f && Object.keys(f.attrs).length > 0;
|
|
15097
15096
|
c.marks && !p && u.push(...c.marks), i.marks && u.push(...i.marks), a = a.map((h) => ({ ...h, marks: jd(u), attributes: d }));
|
|
15098
15097
|
} else c.marks && (a = a.map((u) => ({ ...u, marks: jd(c.marks) })));
|
|
15099
15098
|
return { nodes: a, consumed: 1 };
|
|
@@ -15102,7 +15101,7 @@ const rT = (t) => {
|
|
|
15102
15101
|
if (!n)
|
|
15103
15102
|
return {};
|
|
15104
15103
|
const r = n.elements[0].elements.filter((o) => o.name === "w:style").find((o) => o.attributes["w:styleId"] === e) || {};
|
|
15105
|
-
return r ?
|
|
15104
|
+
return r ? qi(r) : {};
|
|
15106
15105
|
}, cT = {
|
|
15107
15106
|
handlerName: "runNodeHandler",
|
|
15108
15107
|
handler: aT
|
|
@@ -15110,7 +15109,7 @@ const rT = (t) => {
|
|
|
15110
15109
|
const { nodes: e, insideTrackChange: n } = t;
|
|
15111
15110
|
if (e.length === 0 || !(e[0].name === "w:t" || n && e[0].name === "w:delText"))
|
|
15112
15111
|
return { nodes: [], consumed: 0 };
|
|
15113
|
-
const r = e[0], { type: o } = r, { attributes: i, elements: s, marks: a = [] } =
|
|
15112
|
+
const r = e[0], { type: o } = r, { attributes: i, elements: s, marks: a = [] } = qi(r);
|
|
15114
15113
|
let l;
|
|
15115
15114
|
if (s.length === 1) l = s[0].text;
|
|
15116
15115
|
else if (!s.length && "attributes" in r && r.attributes["xml:space"] === "preserve")
|
|
@@ -15131,7 +15130,7 @@ const rT = (t) => {
|
|
|
15131
15130
|
handlerName: "textNodeHandler",
|
|
15132
15131
|
handler: uT
|
|
15133
15132
|
}, t1 = (t) => Object.prototype.toString.call(t) === "[object RegExp]";
|
|
15134
|
-
function
|
|
15133
|
+
function Si(t, e, n = { strict: !0 }) {
|
|
15135
15134
|
const r = Object.keys(e);
|
|
15136
15135
|
return r.length ? r.every((o) => n.strict ? e[o] === t[o] : t1(e[o]) ? e[o].test(t[o]) : e[o] === t[o]) : !0;
|
|
15137
15136
|
}
|
|
@@ -15154,7 +15153,7 @@ const n1 = (t) => {
|
|
|
15154
15153
|
if (n[o].type !== r[o].type || !pT(n[o].attrs, r[o].attrs))
|
|
15155
15154
|
return !1;
|
|
15156
15155
|
return !0;
|
|
15157
|
-
}, pT = (t = {}, e = {}) =>
|
|
15156
|
+
}, pT = (t = {}, e = {}) => Si(t, e);
|
|
15158
15157
|
function r1(t, e, n) {
|
|
15159
15158
|
this.name = t, this.message = e || "", this.details = n;
|
|
15160
15159
|
const r = new Error(this.message);
|
|
@@ -15202,7 +15201,7 @@ function o1({
|
|
|
15202
15201
|
if (!h)
|
|
15203
15202
|
return console.error("Standard node handler not found"), { nodes: [], consumed: 0 };
|
|
15204
15203
|
const m = t[0].elements.find((x) => x.name === "w:pPr")?.elements?.find((x) => x.name === "w:pStyle")?.attributes["w:val"], y = sc({ node: t[0], styleId: m, docx: l });
|
|
15205
|
-
i =
|
|
15204
|
+
i = Ai(y), o = parseInt(y?.elements?.find((x) => x.name === "w:ilvl")?.attributes["w:val"]) || 0, o === void 0 && (o = i1(m, l));
|
|
15206
15205
|
let g = 0;
|
|
15207
15206
|
for (let [x, w] of t.entries()) {
|
|
15208
15207
|
if (w.seen) continue;
|
|
@@ -15211,7 +15210,7 @@ function o1({
|
|
|
15211
15210
|
Z && d[d.length - 1]?.content.push(Z), w.seen = !0;
|
|
15212
15211
|
continue;
|
|
15213
15212
|
}
|
|
15214
|
-
const { attributes: T, elements: O, marks: M = [] } =
|
|
15213
|
+
const { attributes: T, elements: O, marks: M = [] } = qi(w), N = M.find((Z) => Z.type === "textStyle"), {
|
|
15215
15214
|
listType: S,
|
|
15216
15215
|
listOrderingType: W,
|
|
15217
15216
|
ilvl: oe,
|
|
@@ -15316,19 +15315,19 @@ function qd(t, e) {
|
|
|
15316
15315
|
const { elements: n } = t, r = n?.find((l) => l.name === "w:pPr");
|
|
15317
15316
|
if (!r) return !1;
|
|
15318
15317
|
const o = r.elements?.find((l) => l.name === "w:pStyle");
|
|
15319
|
-
let i = r.elements?.find((l) => l.name === "w:numPr"), s =
|
|
15318
|
+
let i = r.elements?.find((l) => l.name === "w:numPr"), s = Ai(i);
|
|
15320
15319
|
const a = o?.attributes["w:val"];
|
|
15321
|
-
return a && !s && (i = sc({ node: t, styleId: a, docx: e }), s =
|
|
15320
|
+
return a && !s && (i = sc({ node: t, styleId: a, docx: e }), s = Ai(i)), !!s;
|
|
15322
15321
|
}
|
|
15323
|
-
const
|
|
15322
|
+
const Ai = (t) => t?.elements?.find((e) => e.name === "w:numId")?.attributes["w:val"];
|
|
15324
15323
|
function s1(t, e) {
|
|
15325
15324
|
return e["word/styles.xml"].elements.find((n) => n.name === "w:styles").elements.filter((n) => n.name === "w:style").find((n) => n.attributes["w:styleId"] === t);
|
|
15326
15325
|
}
|
|
15327
15326
|
function sc({ node: t, styleId: e, docx: n, seenStyleIds: r = /* @__PURE__ */ new Set() }) {
|
|
15328
|
-
let o = t?.elements?.find((l) => l.name === "w:pPr")?.elements?.find((l) => l.name === "w:numPr"), i =
|
|
15327
|
+
let o = t?.elements?.find((l) => l.name === "w:pPr")?.elements?.find((l) => l.name === "w:numPr"), i = Ai(o);
|
|
15329
15328
|
if (i) return o;
|
|
15330
15329
|
const s = s1(e, n);
|
|
15331
|
-
o = s?.elements?.find((l) => l.name === "w:pPr")?.elements?.find((l) => l.name === "w:numPr"), i =
|
|
15330
|
+
o = s?.elements?.find((l) => l.name === "w:pPr")?.elements?.find((l) => l.name === "w:numPr"), i = Ai(o);
|
|
15332
15331
|
const a = s?.elements?.find((l) => l.name === "w:basedOn");
|
|
15333
15332
|
if (!i && !r.has(e)) {
|
|
15334
15333
|
const l = a?.attributes["w:val"];
|
|
@@ -15392,7 +15391,7 @@ const gT = [
|
|
|
15392
15391
|
if (!s) return null;
|
|
15393
15392
|
let a = s?.elements?.find((h) => h.name === "w:numPr");
|
|
15394
15393
|
if (!a) return null;
|
|
15395
|
-
let l = a?.elements?.find((h) => h.name === "w:numId") || {}, c =
|
|
15394
|
+
let l = a?.elements?.find((h) => h.name === "w:numId") || {}, c = Ai(a), u = a?.elements?.find((h) => h.name === "w:ilvl"), d = u?.attributes?.["w:val"];
|
|
15396
15395
|
const f = i?.elements?.find((h) => h.name === "w:basedOn")?.attributes?.["w:val"];
|
|
15397
15396
|
let p = 0;
|
|
15398
15397
|
for (; a && !c && p < 10; )
|
|
@@ -15506,7 +15505,7 @@ const ST = (t) => {
|
|
|
15506
15505
|
const c = { ...t, nodes: [i] }, u = l(c);
|
|
15507
15506
|
u.nodes.length === 1 && (s = u.nodes[0]);
|
|
15508
15507
|
const d = i.elements?.find((g) => g.name === "w:pPr"), f = d?.elements?.find((g) => g.name === "w:pStyle"), p = d?.elements?.find((g) => g.name === "w:rPr");
|
|
15509
|
-
if (p && (s.attrs.marksAttrs =
|
|
15508
|
+
if (p && (s.attrs.marksAttrs = ki(p, [])), f && (s.attrs.styleId = f.attributes["w:val"]), n) {
|
|
15510
15509
|
const g = AT(i, n, s.attrs.styleId);
|
|
15511
15510
|
s.attrs.indent || (s.attrs.indent = {}), g.left && (s.attrs.indent.left = g.left), g.right && (s.attrs.indent.right = g.right), g.firstLine && (s.attrs.indent.firstLine = g.firstLine), g.hanging && (s.attrs.indent.hanging = g.hanging), g.textIndent && (s.attrs.textIndent = `${g.textIndent}in`);
|
|
15512
15511
|
}
|
|
@@ -15600,7 +15599,7 @@ function ET(t, e) {
|
|
|
15600
15599
|
outlineLevel: O ? parseInt(M) : null,
|
|
15601
15600
|
pageBreakBefore: !!S,
|
|
15602
15601
|
pageBreakAfter: !!oe
|
|
15603
|
-
}, V = s.elements.find((se) => se.name === "w:rPr"), C =
|
|
15602
|
+
}, V = s.elements.find((se) => se.name === "w:rPr"), C = ki(V, [], e) || {}, G = {
|
|
15604
15603
|
spacing: { lineSpaceAfter: h, lineSpaceBefore: p, line: m },
|
|
15605
15604
|
textAlign: y,
|
|
15606
15605
|
indent: { leftIndent: g, rightIndent: v, firstLine: x }
|
|
@@ -15728,7 +15727,7 @@ const Gg = (t = []) => {
|
|
|
15728
15727
|
}, MT = (t = {}) => {
|
|
15729
15728
|
const e = t.elements?.find((i) => i.name === "w:r")?.elements?.find((i) => i.name === "w:rPr");
|
|
15730
15729
|
if (!e) return {};
|
|
15731
|
-
const n =
|
|
15730
|
+
const n = ki(e, []) || [], r = [];
|
|
15732
15731
|
n.forEach((i) => {
|
|
15733
15732
|
const { type: s } = i;
|
|
15734
15733
|
if (s === "textStyle") {
|
|
@@ -15754,7 +15753,7 @@ const Gg = (t = []) => {
|
|
|
15754
15753
|
const { nodes: e, docx: n, nodeListHandler: r } = t;
|
|
15755
15754
|
if (!e || e.length === 0)
|
|
15756
15755
|
return { nodes: [], consumed: 0 };
|
|
15757
|
-
const o = e[0], { name: i } = o, { attributes: s, elements: a, marks: l = [] } =
|
|
15756
|
+
const o = e[0], { name: i } = o, { attributes: s, elements: a, marks: l = [] } = qi(o);
|
|
15758
15757
|
if (i === "w:sdt")
|
|
15759
15758
|
return { nodes: [], consumed: 0 };
|
|
15760
15759
|
if (nT(o))
|
|
@@ -16189,7 +16188,7 @@ const t6 = (t) => {
|
|
|
16189
16188
|
return !!n.find((r) => r.name === "w:evenAndOddHeaders");
|
|
16190
16189
|
};
|
|
16191
16190
|
var oi, d1, f1, p1, h1;
|
|
16192
|
-
const
|
|
16191
|
+
const ds = class m1 {
|
|
16193
16192
|
constructor(e = null) {
|
|
16194
16193
|
db(this, oi), this.debug = e?.debug || !1, this.declaration = null, this.documentAttributes = null, this.convertedXml = {}, this.docx = e?.docx || [], this.media = e?.media || {}, this.addedMedia = {}, this.comments = [], this.docHiglightColors = /* @__PURE__ */ new Set([]), this.xml = e?.xml, this.declaration = null, this.numbering = {}, this.numbering = null, this.pageStyles = null, this.initialJSON = null, this.headers = {}, this.headerIds = { default: null, even: null, odd: null, first: null }, this.footers = {}, this.footerIds = { default: null, even: null, odd: null, first: null }, this.linkedStyles = [], this.json = e?.json, this.tagsNotInSchema = ["w:body"], this.savedTagsToRestore = [], this.telemetry = e?.telemetry || null, this.documentInternalId = null, this.fileSource = e?.fileSource || null, this.documentId = e?.documentId || null, (this.docx.length || this.xml) && this.parseFromXml();
|
|
16195
16194
|
}
|
|
@@ -16214,7 +16213,7 @@ const fs = class m1 {
|
|
|
16214
16213
|
return;
|
|
16215
16214
|
}
|
|
16216
16215
|
}
|
|
16217
|
-
static updateDocumentVersion(e = this.convertedXml, n = "0.9.
|
|
16216
|
+
static updateDocumentVersion(e = this.convertedXml, n = "0.9.35") {
|
|
16218
16217
|
const r = "docProps/custom.xml";
|
|
16219
16218
|
e[r] || (e[r] = g1());
|
|
16220
16219
|
const o = e["docProps/custom.xml"];
|
|
@@ -16320,7 +16319,7 @@ const fs = class m1 {
|
|
|
16320
16319
|
commentsExportType: i = "clean",
|
|
16321
16320
|
isFinalDoc: s = !1
|
|
16322
16321
|
}) {
|
|
16323
|
-
const a = this.savedTagsToRestore.find((u) => u.name === "w:body"), [l, c] =
|
|
16322
|
+
const a = this.savedTagsToRestore.find((u) => u.name === "w:body"), [l, c] = zi({
|
|
16324
16323
|
node: e,
|
|
16325
16324
|
bodyNode: a,
|
|
16326
16325
|
relationships: [],
|
|
@@ -16374,7 +16373,7 @@ f1 = function({ defs: t, exportType: e, commentsWithParaIds: n }) {
|
|
|
16374
16373
|
...this.convertedXml.media,
|
|
16375
16374
|
...e
|
|
16376
16375
|
}, this.media = this.convertedXml.media, this.addedMedia = e;
|
|
16377
|
-
}, ha(
|
|
16376
|
+
}, ha(ds, "allowedElements", Object.freeze({
|
|
16378
16377
|
"w:document": "doc",
|
|
16379
16378
|
"w:body": "body",
|
|
16380
16379
|
"w:p": "paragraph",
|
|
@@ -16395,7 +16394,7 @@ f1 = function({ defs: t, exportType: e, commentsWithParaIds: n }) {
|
|
|
16395
16394
|
"w:commentRangeStart": "commentRangeStart",
|
|
16396
16395
|
"w:commentRangeEnd": "commentRangeEnd",
|
|
16397
16396
|
"w:commentReference": "commentReference"
|
|
16398
|
-
})), ha(
|
|
16397
|
+
})), ha(ds, "markTypes", [
|
|
16399
16398
|
{ name: "w:b", type: "bold" },
|
|
16400
16399
|
{ name: "w:bCs", type: "bold" },
|
|
16401
16400
|
{ name: "w:i", type: "italic" },
|
|
@@ -16412,14 +16411,14 @@ f1 = function({ defs: t, exportType: e, commentsWithParaIds: n }) {
|
|
|
16412
16411
|
{ name: "link", type: "link", mark: "link", property: "href" },
|
|
16413
16412
|
{ name: "w:highlight", type: "highlight", mark: "highlight", property: "color" }
|
|
16414
16413
|
// { name: 'w:shd', type: 'highlight', mark: 'highlight', property: 'color'}
|
|
16415
|
-
]), ha(
|
|
16414
|
+
]), ha(ds, "propertyTypes", Object.freeze({
|
|
16416
16415
|
"w:pPr": "paragraphProperties",
|
|
16417
16416
|
"w:rPr": "runProperties",
|
|
16418
16417
|
"w:sectPr": "sectionProperties",
|
|
16419
16418
|
"w:numPr": "numberingProperties",
|
|
16420
16419
|
"w:tcPr": "tableCellProperties"
|
|
16421
|
-
})), ha(
|
|
16422
|
-
let Io =
|
|
16420
|
+
})), ha(ds, "elements", /* @__PURE__ */ new Set(["w:document", "w:body", "w:p", "w:r", "w:t", "w:delText"]));
|
|
16421
|
+
let Io = ds;
|
|
16423
16422
|
function n6(t) {
|
|
16424
16423
|
const e = "docProps/custom.xml";
|
|
16425
16424
|
t[e] || (t[e] = g1());
|
|
@@ -16439,7 +16438,7 @@ function n6(t) {
|
|
|
16439
16438
|
function g1() {
|
|
16440
16439
|
return RE;
|
|
16441
16440
|
}
|
|
16442
|
-
function y1(t = 2, e = "0.9.
|
|
16441
|
+
function y1(t = 2, e = "0.9.35") {
|
|
16443
16442
|
return {
|
|
16444
16443
|
type: "element",
|
|
16445
16444
|
name: "property",
|
|
@@ -19065,7 +19064,7 @@ var a6 = /* @__PURE__ */ function(t) {
|
|
|
19065
19064
|
}, e;
|
|
19066
19065
|
}(Ot);
|
|
19067
19066
|
const l6 = 500;
|
|
19068
|
-
let
|
|
19067
|
+
let Ns = class ii {
|
|
19069
19068
|
constructor(e, n) {
|
|
19070
19069
|
this.items = e, this.eventCount = n;
|
|
19071
19070
|
}
|
|
@@ -19109,7 +19108,7 @@ let Fs = class ii {
|
|
|
19109
19108
|
return c > u6 && (a = c6(a, c), s -= c), new ii(a.append(i), s);
|
|
19110
19109
|
}
|
|
19111
19110
|
remapping(e, n) {
|
|
19112
|
-
let r = new
|
|
19111
|
+
let r = new bi();
|
|
19113
19112
|
return this.items.forEach((o, i) => {
|
|
19114
19113
|
let s = o.mirrorOffset != null && i - o.mirrorOffset >= e ? r.maps.length - o.mirrorOffset : void 0;
|
|
19115
19114
|
r.appendMap(o.map, s);
|
|
@@ -19177,7 +19176,7 @@ let Fs = class ii {
|
|
|
19177
19176
|
}, this.items.length, 0), new ii(Ot.from(o.reverse()), i);
|
|
19178
19177
|
}
|
|
19179
19178
|
};
|
|
19180
|
-
|
|
19179
|
+
Ns.empty = new Ns(Ot.empty, 0);
|
|
19181
19180
|
function c6(t, e) {
|
|
19182
19181
|
let n;
|
|
19183
19182
|
return t.forEach((r, o) => {
|
|
@@ -19214,7 +19213,7 @@ function d6(t, e, n, r) {
|
|
|
19214
19213
|
return s.getMeta(kr).redo ? new Br(t.done.addTransform(n, void 0, r, Za(e)), t.undone, Zg(n.mapping.maps), t.prevTime, t.prevComposition) : new Br(t.done, t.undone.addTransform(n, void 0, r, Za(e)), null, t.prevTime, t.prevComposition);
|
|
19215
19214
|
if (n.getMeta("addToHistory") !== !1 && !(s && s.getMeta("addToHistory") === !1)) {
|
|
19216
19215
|
let a = n.getMeta("composition"), l = t.prevTime == 0 || !s && t.prevComposition != a && (t.prevTime < (n.time || 0) - r.newGroupDelay || !f6(n, t.prevRanges)), c = s ? Du(t.prevRanges, n.mapping) : Zg(n.mapping.maps);
|
|
19217
|
-
return new Br(t.done.addTransform(n, l ? e.selection.getBookmark() : void 0, r, Za(e)),
|
|
19216
|
+
return new Br(t.done.addTransform(n, l ? e.selection.getBookmark() : void 0, r, Za(e)), Ns.empty, c, n.time, a ?? t.prevComposition);
|
|
19218
19217
|
} else return (i = n.getMeta("rebased")) ? new Br(t.done.rebased(n, i), t.undone.rebased(n, i), Du(t.prevRanges, n.mapping), t.prevTime, t.prevComposition) : new Br(t.done.addMaps(n.mapping.maps), t.undone.addMaps(n.mapping.maps), Du(t.prevRanges, n.mapping), t.prevTime, t.prevComposition);
|
|
19219
19218
|
}
|
|
19220
19219
|
function f6(t, e) {
|
|
@@ -19273,7 +19272,7 @@ function m6(t = {}) {
|
|
|
19273
19272
|
key: kr,
|
|
19274
19273
|
state: {
|
|
19275
19274
|
init() {
|
|
19276
|
-
return new Br(
|
|
19275
|
+
return new Br(Ns.empty, Ns.empty, null, 0, -1);
|
|
19277
19276
|
},
|
|
19278
19277
|
apply(e, n, r) {
|
|
19279
19278
|
return d6(n, r, e, t);
|
|
@@ -19372,7 +19371,7 @@ const w6 = dt.create({
|
|
|
19372
19371
|
for (var e = 0; ; e++)
|
|
19373
19372
|
if (t = t.previousSibling, !t)
|
|
19374
19373
|
return e;
|
|
19375
|
-
},
|
|
19374
|
+
}, Ci = function(t) {
|
|
19376
19375
|
let e = t.assignedSlot || t.parentNode;
|
|
19377
19376
|
return e && e.nodeType == 11 ? e.host : e;
|
|
19378
19377
|
};
|
|
@@ -19478,7 +19477,7 @@ function C6(t, e, n) {
|
|
|
19478
19477
|
}
|
|
19479
19478
|
const rr = typeof navigator < "u" ? navigator : null, ty = typeof document < "u" ? document : null, ro = rr && rr.userAgent || "", Hd = /Edge\/(\d+)/.exec(ro), $1 = /MSIE \d/.exec(ro), Wd = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ro), ln = !!($1 || Wd || Hd), Jr = $1 ? document.documentMode : Wd ? +Wd[1] : Hd ? +Hd[1] : 0, Ln = !ln && /gecko\/(\d+)/i.test(ro);
|
|
19480
19479
|
Ln && +(/Firefox\/(\d+)/.exec(ro) || [0, 0])[1];
|
|
19481
|
-
const Gd = !ln && /Chrome\/(\d+)/.exec(ro), Ut = !!Gd, O1 = Gd ? +Gd[1] : 0, Qt = !ln && !!rr && /Apple Computer/.test(rr.vendor),
|
|
19480
|
+
const Gd = !ln && /Chrome\/(\d+)/.exec(ro), Ut = !!Gd, O1 = Gd ? +Gd[1] : 0, Qt = !ln && !!rr && /Apple Computer/.test(rr.vendor), Ei = Qt && (/Mobile\/\w+/.test(ro) || !!rr && rr.maxTouchPoints > 2), Tn = Ei || (rr ? /Mac/.test(rr.platform) : !1), E6 = rr ? /Win/.test(rr.platform) : !1, vr = /Android \d/.test(ro), aa = !!ty && "webkitFontSmoothing" in ty.documentElement.style, T6 = aa ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
19482
19481
|
function $6(t) {
|
|
19483
19482
|
let e = t.defaultView && t.defaultView.visualViewport;
|
|
19484
19483
|
return e ? {
|
|
@@ -19509,7 +19508,7 @@ function ny(t, e, n) {
|
|
|
19509
19508
|
let r = t.someProp("scrollThreshold") || 0, o = t.someProp("scrollMargin") || 5, i = t.dom.ownerDocument;
|
|
19510
19509
|
for (let s = n || t.dom; s; ) {
|
|
19511
19510
|
if (s.nodeType != 1) {
|
|
19512
|
-
s =
|
|
19511
|
+
s = Ci(s);
|
|
19513
19512
|
continue;
|
|
19514
19513
|
}
|
|
19515
19514
|
let a = s, l = a == i.body, c = l ? $6(i) : O6(a), u = 0, d = 0;
|
|
@@ -19525,7 +19524,7 @@ function ny(t, e, n) {
|
|
|
19525
19524
|
let f = l ? "fixed" : getComputedStyle(s).position;
|
|
19526
19525
|
if (/^(fixed|sticky)$/.test(f))
|
|
19527
19526
|
break;
|
|
19528
|
-
s = f == "absolute" ? s.offsetParent :
|
|
19527
|
+
s = f == "absolute" ? s.offsetParent : Ci(s);
|
|
19529
19528
|
}
|
|
19530
19529
|
}
|
|
19531
19530
|
function M6(t) {
|
|
@@ -19544,7 +19543,7 @@ function M6(t) {
|
|
|
19544
19543
|
}
|
|
19545
19544
|
function M1(t) {
|
|
19546
19545
|
let e = [], n = t.ownerDocument;
|
|
19547
|
-
for (let r = t; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), t != n); r =
|
|
19546
|
+
for (let r = t; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), t != n); r = Ci(r))
|
|
19548
19547
|
;
|
|
19549
19548
|
return e;
|
|
19550
19549
|
}
|
|
@@ -19665,7 +19664,7 @@ function L6(t, e) {
|
|
|
19665
19664
|
return null;
|
|
19666
19665
|
}
|
|
19667
19666
|
if (Qt)
|
|
19668
|
-
for (let c = s; r && c; c =
|
|
19667
|
+
for (let c = s; r && c; c = Ci(c))
|
|
19669
19668
|
c.draggable && (r = void 0);
|
|
19670
19669
|
if (s = N6(s, e), r) {
|
|
19671
19670
|
if (Ln && r.nodeType == 1 && (o = Math.min(o, r.childNodes.length), o < r.childNodes.length)) {
|
|
@@ -19702,13 +19701,13 @@ function N1(t, e, n) {
|
|
|
19702
19701
|
if (l.top == a.top) {
|
|
19703
19702
|
let c = Nr(hr(r, o, o + 1), -1);
|
|
19704
19703
|
if (c.top != a.top)
|
|
19705
|
-
return
|
|
19704
|
+
return Ji(c, c.left < l.left);
|
|
19706
19705
|
}
|
|
19707
19706
|
}
|
|
19708
19707
|
return a;
|
|
19709
19708
|
} else {
|
|
19710
19709
|
let a = o, l = o, c = n < 0 ? 1 : -1;
|
|
19711
|
-
return n < 0 && !o ? (l++, c = -1) : n >= 0 && o == r.nodeValue.length ? (a--, c = 1) : n < 0 ? a-- : l++,
|
|
19710
|
+
return n < 0 && !o ? (l++, c = -1) : n >= 0 && o == r.nodeValue.length ? (a--, c = 1) : n < 0 ? a-- : l++, Ji(Nr(hr(r, a, l), c), c < 0);
|
|
19712
19711
|
}
|
|
19713
19712
|
if (!t.state.doc.resolve(e - (i || 0)).parent.inlineContent) {
|
|
19714
19713
|
if (i == null && o && (n < 0 || o == $n(r))) {
|
|
@@ -19726,7 +19725,7 @@ function N1(t, e, n) {
|
|
|
19726
19725
|
if (i == null && o && (n < 0 || o == $n(r))) {
|
|
19727
19726
|
let a = r.childNodes[o - 1], l = a.nodeType == 3 ? hr(a, $n(a) - (s ? 0 : 1)) : a.nodeType == 1 && (a.nodeName != "BR" || !a.nextSibling) ? a : null;
|
|
19728
19727
|
if (l)
|
|
19729
|
-
return
|
|
19728
|
+
return Ji(Nr(l, 1), !1);
|
|
19730
19729
|
}
|
|
19731
19730
|
if (i == null && o < $n(r)) {
|
|
19732
19731
|
let a = r.childNodes[o];
|
|
@@ -19734,11 +19733,11 @@ function N1(t, e, n) {
|
|
|
19734
19733
|
a = a.nextSibling;
|
|
19735
19734
|
let l = a ? a.nodeType == 3 ? hr(a, 0, s ? 0 : 1) : a.nodeType == 1 ? a : null : null;
|
|
19736
19735
|
if (l)
|
|
19737
|
-
return
|
|
19736
|
+
return Ji(Nr(l, -1), !0);
|
|
19738
19737
|
}
|
|
19739
|
-
return
|
|
19738
|
+
return Ji(Nr(r.nodeType == 3 ? hr(r) : r, -n), n >= 0);
|
|
19740
19739
|
}
|
|
19741
|
-
function
|
|
19740
|
+
function Ji(t, e) {
|
|
19742
19741
|
if (t.width == 0)
|
|
19743
19742
|
return t;
|
|
19744
19743
|
let n = e ? t.left : t.right;
|
|
@@ -20215,7 +20214,7 @@ let R1 = class extends la {
|
|
|
20215
20214
|
}
|
|
20216
20215
|
static create(e, n, r, o) {
|
|
20217
20216
|
let i = o.nodeViews[n.type.name], s = i && i(n, o, r);
|
|
20218
|
-
return (!s || !s.dom) && (s =
|
|
20217
|
+
return (!s || !s.dom) && (s = Pi.renderSpec(document, n.type.spec.toDOM(n, r), null, n.attrs)), new Kd(e, n, s.dom, s.contentDOM || s.dom, s);
|
|
20219
20218
|
}
|
|
20220
20219
|
parseRule() {
|
|
20221
20220
|
return this.dirty & or || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
|
|
@@ -20269,7 +20268,7 @@ let R1 = class extends la {
|
|
|
20269
20268
|
u = document.createTextNode(n.text);
|
|
20270
20269
|
else if (u.nodeType != 3)
|
|
20271
20270
|
throw new RangeError("Text must be rendered as a DOM text node");
|
|
20272
|
-
} else u || ({ dom: u, contentDOM: d } =
|
|
20271
|
+
} else u || ({ dom: u, contentDOM: d } = Pi.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
|
|
20273
20272
|
!d && !n.isText && u.nodeName != "BR" && (u.hasAttribute("contenteditable") || (u.contentEditable = "false"), n.type.spec.draggable && (u.draggable = !0));
|
|
20274
20273
|
let f = u;
|
|
20275
20274
|
return u = U1(u, r, n), c ? l = new V6(e, n, r, o, u, d || null, f, c, i, s + 1) : n.isText ? new B1(e, n, r, o, u, f, i) : new L1(e, n, r, o, u, d || null, f, i, s + 1);
|
|
@@ -20315,7 +20314,7 @@ let R1 = class extends la {
|
|
|
20315
20314
|
l.syncToMarks(c.marks, r, e);
|
|
20316
20315
|
let p;
|
|
20317
20316
|
l.findNodeMatch(c, u, d, f) || a && e.state.selection.from > o && e.state.selection.to < o + c.nodeSize && (p = l.findIndexWithChild(i.node)) > -1 && l.updateNodeAt(c, u, d, p, e) || l.updateNextNode(c, u, d, e, f, o) || l.addNode(c, u, d, e, o), o += c.nodeSize;
|
|
20318
|
-
}), l.syncToMarks([], r, e), this.node.isTextblock && l.addTextblockHacks(), l.destroyRest(), (l.changed || this.dirty == mo) && (s && this.protectLocalComposition(e, s), j1(this.contentDOM, this.children, e),
|
|
20317
|
+
}), l.syncToMarks([], r, e), this.node.isTextblock && l.addTextblockHacks(), l.destroyRest(), (l.changed || this.dirty == mo) && (s && this.protectLocalComposition(e, s), j1(this.contentDOM, this.children, e), Ei && X6(this.dom));
|
|
20319
20318
|
}
|
|
20320
20319
|
localCompositionInfo(e, n) {
|
|
20321
20320
|
let { from: r, to: o } = e.state.selection;
|
|
@@ -20483,22 +20482,22 @@ function j1(t, e, n) {
|
|
|
20483
20482
|
r = cy(r), o = !0;
|
|
20484
20483
|
o && n.trackWrites == t && (n.trackWrites = null);
|
|
20485
20484
|
}
|
|
20486
|
-
const
|
|
20485
|
+
const bs = function(t) {
|
|
20487
20486
|
t && (this.nodeName = t);
|
|
20488
20487
|
};
|
|
20489
|
-
|
|
20490
|
-
const go = [new
|
|
20488
|
+
bs.prototype = /* @__PURE__ */ Object.create(null);
|
|
20489
|
+
const go = [new bs()];
|
|
20491
20490
|
function Jd(t, e, n) {
|
|
20492
20491
|
if (t.length == 0)
|
|
20493
20492
|
return go;
|
|
20494
|
-
let r = n ? go[0] : new
|
|
20493
|
+
let r = n ? go[0] : new bs(), o = [r];
|
|
20495
20494
|
for (let i = 0; i < t.length; i++) {
|
|
20496
20495
|
let s = t[i].type.attrs;
|
|
20497
20496
|
if (s) {
|
|
20498
|
-
s.nodeName && o.push(r = new
|
|
20497
|
+
s.nodeName && o.push(r = new bs(s.nodeName));
|
|
20499
20498
|
for (let a in s) {
|
|
20500
20499
|
let l = s[a];
|
|
20501
|
-
l != null && (n && o.length == 1 && o.push(r = new
|
|
20500
|
+
l != null && (n && o.length == 1 && o.push(r = new bs(e.isInline ? "span" : "div")), a == "class" ? r.class = (r.class ? r.class + " " : "") + l : a == "style" ? r.style = (r.style ? r.style + ";" : "") + l : a != "nodeName" && (r[a] = l));
|
|
20502
20501
|
}
|
|
20503
20502
|
}
|
|
20504
20503
|
}
|
|
@@ -20986,7 +20985,7 @@ function my(t, e, n) {
|
|
|
20986
20985
|
function Al(t) {
|
|
20987
20986
|
return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
|
|
20988
20987
|
}
|
|
20989
|
-
function
|
|
20988
|
+
function vs(t, e) {
|
|
20990
20989
|
let n = t.pmViewDesc;
|
|
20991
20990
|
return n && n.size == 0 && (e < 0 || t.nextSibling || t.nodeName != "BR");
|
|
20992
20991
|
}
|
|
@@ -20998,13 +20997,13 @@ function t$(t) {
|
|
|
20998
20997
|
if (!n)
|
|
20999
20998
|
return;
|
|
21000
20999
|
let o, i, s = !1;
|
|
21001
|
-
for (Ln && n.nodeType == 1 && r < Al(n) &&
|
|
21000
|
+
for (Ln && n.nodeType == 1 && r < Al(n) && vs(n.childNodes[r], -1) && (s = !0); ; )
|
|
21002
21001
|
if (r > 0) {
|
|
21003
21002
|
if (n.nodeType != 1)
|
|
21004
21003
|
break;
|
|
21005
21004
|
{
|
|
21006
21005
|
let a = n.childNodes[r - 1];
|
|
21007
|
-
if (
|
|
21006
|
+
if (vs(a, -1))
|
|
21008
21007
|
o = n, i = --r;
|
|
21009
21008
|
else if (a.nodeType == 3)
|
|
21010
21009
|
n = a, r = n.nodeValue.length;
|
|
@@ -21016,7 +21015,7 @@ function t$(t) {
|
|
|
21016
21015
|
break;
|
|
21017
21016
|
{
|
|
21018
21017
|
let a = n.previousSibling;
|
|
21019
|
-
for (; a &&
|
|
21018
|
+
for (; a && vs(a, -1); )
|
|
21020
21019
|
o = n.parentNode, i = Lt(a), a = a.previousSibling;
|
|
21021
21020
|
if (a)
|
|
21022
21021
|
n = a, r = Al(n);
|
|
@@ -21039,7 +21038,7 @@ function n$(t) {
|
|
|
21039
21038
|
if (n.nodeType != 1)
|
|
21040
21039
|
break;
|
|
21041
21040
|
let a = n.childNodes[r];
|
|
21042
|
-
if (
|
|
21041
|
+
if (vs(a, 1))
|
|
21043
21042
|
i = n, s = ++r;
|
|
21044
21043
|
else
|
|
21045
21044
|
break;
|
|
@@ -21048,7 +21047,7 @@ function n$(t) {
|
|
|
21048
21047
|
break;
|
|
21049
21048
|
{
|
|
21050
21049
|
let a = n.nextSibling;
|
|
21051
|
-
for (; a &&
|
|
21050
|
+
for (; a && vs(a, 1); )
|
|
21052
21051
|
i = a.parentNode, s = Lt(a) + 1, a = a.nextSibling;
|
|
21053
21052
|
if (a)
|
|
21054
21053
|
n = a, r = 0, o = Al(n);
|
|
@@ -21208,7 +21207,7 @@ function Sp(t, e) {
|
|
|
21208
21207
|
let p = r.firstChild;
|
|
21209
21208
|
n.push(p.type.name, p.attrs != p.type.defaultAttrs ? p.attrs : null), r = p.content;
|
|
21210
21209
|
}
|
|
21211
|
-
let s = t.someProp("clipboardSerializer") ||
|
|
21210
|
+
let s = t.someProp("clipboardSerializer") || Pi.fromSchema(t.state.schema), a = Q1(), l = a.createElement("div");
|
|
21212
21211
|
l.appendChild(s.serializeFragment(r, { document: a }));
|
|
21213
21212
|
let c = l.firstChild, u, d = 0;
|
|
21214
21213
|
for (; c && c.nodeType == 1 && (u = Z1[c.nodeName.toLowerCase()]); ) {
|
|
@@ -21241,7 +21240,7 @@ function K1(t, e, n, r, o) {
|
|
|
21241
21240
|
if (d)
|
|
21242
21241
|
a = d;
|
|
21243
21242
|
else {
|
|
21244
|
-
let f = o.marks(), { schema: p } = t.state, h =
|
|
21243
|
+
let f = o.marks(), { schema: p } = t.state, h = Pi.fromSchema(p);
|
|
21245
21244
|
s = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((m) => {
|
|
21246
21245
|
let y = s.appendChild(document.createElement("p"));
|
|
21247
21246
|
m && y.appendChild(h.serializeNode(p.text(m, f)));
|
|
@@ -21438,7 +21437,7 @@ function b$(t, e) {
|
|
|
21438
21437
|
tn.keydown = (t, e) => {
|
|
21439
21438
|
let n = e;
|
|
21440
21439
|
if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !t2(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(vr && Ut && n.keyCode == 13)))
|
|
21441
|
-
if (n.keyCode != 229 && t.domObserver.forceFlush(),
|
|
21440
|
+
if (n.keyCode != 229 && t.domObserver.forceFlush(), Ei && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
|
|
21442
21441
|
let r = Date.now();
|
|
21443
21442
|
t.input.lastIOSEnter = r, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
21444
21443
|
t.input.lastIOSEnter == r && (t.someProp("handleKeyDown", (o) => o(t, fo(13, "Enter"))), t.input.lastIOSEnter = 0);
|
|
@@ -21677,12 +21676,12 @@ function D$(t, e) {
|
|
|
21677
21676
|
n.parentNode && n.parentNode.removeChild(n), t.focus();
|
|
21678
21677
|
}, 50);
|
|
21679
21678
|
}
|
|
21680
|
-
const
|
|
21679
|
+
const Fs = ln && Jr < 15 || Ei && T6 < 604;
|
|
21681
21680
|
en.copy = tn.cut = (t, e) => {
|
|
21682
21681
|
let n = e, r = t.state.selection, o = n.type == "cut";
|
|
21683
21682
|
if (r.empty)
|
|
21684
21683
|
return;
|
|
21685
|
-
let i =
|
|
21684
|
+
let i = Fs ? null : n.clipboardData, s = r.content(), { dom: a, text: l } = Sp(t, s);
|
|
21686
21685
|
i ? (n.preventDefault(), i.clearData(), i.setData("text/html", a.innerHTML), i.setData("text/plain", l)) : D$(t, a), o && t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
|
|
21687
21686
|
};
|
|
21688
21687
|
function _$(t) {
|
|
@@ -21695,10 +21694,10 @@ function I$(t, e) {
|
|
|
21695
21694
|
n || (r.contentEditable = "true"), r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.focus();
|
|
21696
21695
|
let o = t.input.shiftKey && t.input.lastKeyCode != 45;
|
|
21697
21696
|
setTimeout(() => {
|
|
21698
|
-
t.focus(), r.parentNode && r.parentNode.removeChild(r), n ?
|
|
21697
|
+
t.focus(), r.parentNode && r.parentNode.removeChild(r), n ? Rs(t, r.value, null, o, e) : Rs(t, r.textContent, r.innerHTML, o, e);
|
|
21699
21698
|
}, 50);
|
|
21700
21699
|
}
|
|
21701
|
-
function
|
|
21700
|
+
function Rs(t, e, n, r, o) {
|
|
21702
21701
|
let i = K1(t, e, n, r, t.state.selection.$from);
|
|
21703
21702
|
if (t.someProp("handlePaste", (l) => l(t, o, i || xe.empty)))
|
|
21704
21703
|
return !0;
|
|
@@ -21718,8 +21717,8 @@ tn.paste = (t, e) => {
|
|
|
21718
21717
|
let n = e;
|
|
21719
21718
|
if (t.composing && !vr)
|
|
21720
21719
|
return;
|
|
21721
|
-
let r =
|
|
21722
|
-
r &&
|
|
21720
|
+
let r = Fs ? null : n.clipboardData, o = t.input.shiftKey && t.input.lastKeyCode != 45;
|
|
21721
|
+
r && Rs(t, o2(r), r.getData("text/html"), o, n) ? n.preventDefault() : I$(t, n);
|
|
21723
21722
|
};
|
|
21724
21723
|
let i2 = class {
|
|
21725
21724
|
constructor(e, n, r) {
|
|
@@ -21744,7 +21743,7 @@ en.dragstart = (t, e) => {
|
|
|
21744
21743
|
}
|
|
21745
21744
|
}
|
|
21746
21745
|
let a = (s || t.state.selection).content(), { dom: l, text: c, slice: u } = Sp(t, a);
|
|
21747
|
-
(!n.dataTransfer.files.length || !Ut || O1 > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(
|
|
21746
|
+
(!n.dataTransfer.files.length || !Ut || O1 > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(Fs ? "Text" : "text/html", l.innerHTML), n.dataTransfer.effectAllowed = "copyMove", Fs || n.dataTransfer.setData("text/plain", c), t.dragging = new i2(u, s2(t, n), s);
|
|
21748
21747
|
};
|
|
21749
21748
|
en.dragend = (t) => {
|
|
21750
21749
|
let e = t.dragging;
|
|
@@ -21763,7 +21762,7 @@ tn.drop = (t, e) => {
|
|
|
21763
21762
|
let i = t.state.doc.resolve(o.pos), s = r && r.slice;
|
|
21764
21763
|
s ? t.someProp("transformPasted", (h) => {
|
|
21765
21764
|
s = h(s, t);
|
|
21766
|
-
}) : s = K1(t, o2(n.dataTransfer),
|
|
21765
|
+
}) : s = K1(t, o2(n.dataTransfer), Fs ? null : n.dataTransfer.getData("text/html"), !1, i);
|
|
21767
21766
|
let a = !!(r && s2(t, n));
|
|
21768
21767
|
if (t.someProp("handleDrop", (h) => h(t, n, s || xe.empty, a))) {
|
|
21769
21768
|
n.preventDefault();
|
|
@@ -21814,7 +21813,7 @@ en.beforeinput = (t, e) => {
|
|
|
21814
21813
|
};
|
|
21815
21814
|
for (let t in tn)
|
|
21816
21815
|
en[t] = tn[t];
|
|
21817
|
-
function
|
|
21816
|
+
function Ls(t, e) {
|
|
21818
21817
|
if (t == e)
|
|
21819
21818
|
return !0;
|
|
21820
21819
|
for (let n in t)
|
|
@@ -21837,12 +21836,12 @@ let ky = class a2 {
|
|
|
21837
21836
|
return !0;
|
|
21838
21837
|
}
|
|
21839
21838
|
eq(e) {
|
|
21840
|
-
return this == e || e instanceof a2 && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM &&
|
|
21839
|
+
return this == e || e instanceof a2 && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && Ls(this.spec, e.spec));
|
|
21841
21840
|
}
|
|
21842
21841
|
destroy(e) {
|
|
21843
21842
|
this.spec.destroy && this.spec.destroy(e);
|
|
21844
21843
|
}
|
|
21845
|
-
},
|
|
21844
|
+
}, xs = class tf {
|
|
21846
21845
|
constructor(e, n) {
|
|
21847
21846
|
this.attrs = e, this.spec = n || So;
|
|
21848
21847
|
}
|
|
@@ -21854,7 +21853,7 @@ let ky = class a2 {
|
|
|
21854
21853
|
return n.from < n.to;
|
|
21855
21854
|
}
|
|
21856
21855
|
eq(e) {
|
|
21857
|
-
return this == e || e instanceof tf &&
|
|
21856
|
+
return this == e || e instanceof tf && Ls(this.attrs, e.attrs) && Ls(this.spec, e.spec);
|
|
21858
21857
|
}
|
|
21859
21858
|
static is(e) {
|
|
21860
21859
|
return e.type instanceof tf;
|
|
@@ -21878,7 +21877,7 @@ class Tp {
|
|
|
21878
21877
|
return o == n.from && !(i = e.child(r)).isText && o + i.nodeSize == n.to;
|
|
21879
21878
|
}
|
|
21880
21879
|
eq(e) {
|
|
21881
|
-
return this == e || e instanceof Tp &&
|
|
21880
|
+
return this == e || e instanceof Tp && Ls(this.attrs, e.attrs) && Ls(this.spec, e.spec);
|
|
21882
21881
|
}
|
|
21883
21882
|
destroy() {
|
|
21884
21883
|
}
|
|
@@ -21924,7 +21923,7 @@ class He {
|
|
|
21924
21923
|
each inline node between `from` and `to`.
|
|
21925
21924
|
*/
|
|
21926
21925
|
static inline(e, n, r, o) {
|
|
21927
|
-
return new He(e, n, new
|
|
21926
|
+
return new He(e, n, new xs(r, o));
|
|
21928
21927
|
}
|
|
21929
21928
|
/**
|
|
21930
21929
|
Creates a node decoration. `from` and `to` should point precisely
|
|
@@ -21945,7 +21944,7 @@ class He {
|
|
|
21945
21944
|
@internal
|
|
21946
21945
|
*/
|
|
21947
21946
|
get inline() {
|
|
21948
|
-
return this.type instanceof
|
|
21947
|
+
return this.type instanceof xs;
|
|
21949
21948
|
}
|
|
21950
21949
|
/**
|
|
21951
21950
|
@internal
|
|
@@ -22076,7 +22075,7 @@ class Ue {
|
|
|
22076
22075
|
let i = e + 1, s = i + n.content.size;
|
|
22077
22076
|
for (let a = 0; a < this.local.length; a++) {
|
|
22078
22077
|
let l = this.local[a];
|
|
22079
|
-
if (l.from < s && l.to > i && l.type instanceof
|
|
22078
|
+
if (l.from < s && l.to > i && l.type instanceof xs) {
|
|
22080
22079
|
let c = Math.max(i, l.from) - i, u = Math.min(s, l.to) - i;
|
|
22081
22080
|
c < u && (o || (o = [])).push(l.copy(c, u));
|
|
22082
22081
|
}
|
|
@@ -22115,11 +22114,11 @@ class Ue {
|
|
|
22115
22114
|
localsInner(e) {
|
|
22116
22115
|
if (this == jt)
|
|
22117
22116
|
return si;
|
|
22118
|
-
if (e.inlineContent || !this.local.some(
|
|
22117
|
+
if (e.inlineContent || !this.local.some(xs.is))
|
|
22119
22118
|
return this.local;
|
|
22120
22119
|
let n = [];
|
|
22121
22120
|
for (let r = 0; r < this.local.length; r++)
|
|
22122
|
-
this.local[r].type instanceof
|
|
22121
|
+
this.local[r].type instanceof xs || n.push(this.local[r]);
|
|
22123
22122
|
return n;
|
|
22124
22123
|
}
|
|
22125
22124
|
forEachSet(e) {
|
|
@@ -22403,9 +22402,9 @@ let P$ = class {
|
|
|
22403
22402
|
if (!e.focusNode)
|
|
22404
22403
|
return !0;
|
|
22405
22404
|
let n = /* @__PURE__ */ new Set(), r;
|
|
22406
|
-
for (let i = e.focusNode; i; i =
|
|
22405
|
+
for (let i = e.focusNode; i; i = Ci(i))
|
|
22407
22406
|
n.add(i);
|
|
22408
|
-
for (let i = e.anchorNode; i; i =
|
|
22407
|
+
for (let i = e.anchorNode; i; i = Ci(i))
|
|
22409
22408
|
if (n.has(i)) {
|
|
22410
22409
|
r = i;
|
|
22411
22410
|
break;
|
|
@@ -22576,7 +22575,7 @@ function G$(t, e, n, r, o) {
|
|
|
22576
22575
|
let l = t.state.selection, c = V$(t, e, n), u = t.state.doc, d = u.slice(c.from, c.to), f, p;
|
|
22577
22576
|
t.input.lastKeyCode === 8 && Date.now() - 100 < t.input.lastKeyCodeTime ? (f = t.state.selection.to, p = "end") : (f = t.state.selection.from, p = "start"), t.input.lastKeyCode = null;
|
|
22578
22577
|
let h = X$(d.content, c.doc.content, c.from, f, p);
|
|
22579
|
-
if (h && t.input.domChangeCount++, (
|
|
22578
|
+
if (h && t.input.domChangeCount++, (Ei && t.input.lastIOSEnter > Date.now() - 225 || vr) && o.some((S) => S.nodeType == 1 && !W$.test(S.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (S) => S(t, fo(13, "Enter")))) {
|
|
22580
22579
|
t.input.lastIOSEnter = 0;
|
|
22581
22580
|
return;
|
|
22582
22581
|
}
|
|
@@ -22595,7 +22594,7 @@ function G$(t, e, n, r, o) {
|
|
|
22595
22594
|
}
|
|
22596
22595
|
t.state.selection.from < t.state.selection.to && h.start == h.endB && t.state.selection instanceof Ve && (h.start > t.state.selection.from && h.start <= t.state.selection.from + 2 && t.state.selection.from >= c.from ? h.start = t.state.selection.from : h.endA < t.state.selection.to && h.endA >= t.state.selection.to - 2 && t.state.selection.to <= c.to && (h.endB += t.state.selection.to - h.endA, h.endA = t.state.selection.to)), ln && Jr <= 11 && h.endB == h.start + 1 && h.endA == h.start && h.start > c.from && c.doc.textBetween(h.start - c.from - 1, h.start - c.from + 1) == " " && (h.start--, h.endA--, h.endB--);
|
|
22597
22596
|
let m = c.doc.resolveNoCache(h.start - c.from), y = c.doc.resolveNoCache(h.endB - c.from), g = u.resolve(h.start), v = m.sameParent(y) && m.parent.inlineContent && g.end() >= h.endA, x;
|
|
22598
|
-
if ((
|
|
22597
|
+
if ((Ei && t.input.lastIOSEnter > Date.now() - 225 && (!v || o.some((S) => S.nodeName == "DIV" || S.nodeName == "P")) || !v && m.pos < c.doc.content.size && (!m.sameParent(y) || !m.parent.inlineContent) && (x = qe.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && x.head > m.pos) && t.someProp("handleKeyDown", (S) => S(t, fo(13, "Enter")))) {
|
|
22599
22598
|
t.input.lastIOSEnter = 0;
|
|
22600
22599
|
return;
|
|
22601
22600
|
}
|
|
@@ -22980,13 +22979,13 @@ let d2 = class {
|
|
|
22980
22979
|
[`handlePaste`](https://prosemirror.net/docs/ref/#view.EditorProps.handlePaste) hook.
|
|
22981
22980
|
*/
|
|
22982
22981
|
pasteHTML(e, n) {
|
|
22983
|
-
return
|
|
22982
|
+
return Rs(this, "", e, !1, n || new ClipboardEvent("paste"));
|
|
22984
22983
|
}
|
|
22985
22984
|
/**
|
|
22986
22985
|
Run the editor's paste logic with the given plain-text input.
|
|
22987
22986
|
*/
|
|
22988
22987
|
pasteText(e, n) {
|
|
22989
|
-
return
|
|
22988
|
+
return Rs(this, e, null, !0, n || new ClipboardEvent("paste"));
|
|
22990
22989
|
}
|
|
22991
22990
|
/**
|
|
22992
22991
|
Serialize the given slice as it would be if it was copied from
|
|
@@ -23092,16 +23091,16 @@ function Iy(t) {
|
|
|
23092
23091
|
if (t.spec.state || t.spec.filterTransaction || t.spec.appendTransaction)
|
|
23093
23092
|
throw new RangeError("Plugins passed directly to the view must not have a state component");
|
|
23094
23093
|
}
|
|
23095
|
-
const
|
|
23094
|
+
const Bs = Math.floor, Q$ = Math.abs, Xr = (t, e) => t < e ? t : e, Ti = (t, e) => t > e ? t : e, eO = (t) => t !== 0 ? t < 0 : 1 / t < 0, tO = 64, Ps = 128, nO = 1 << 29, Ny = 63, ks = 127, rO = 2147483647, oO = Number.isInteger || ((t) => typeof t == "number" && isFinite(t) && Bs(t) === t), iO = () => /* @__PURE__ */ new Set(), sO = Array.isArray, aO = String.fromCharCode, lO = (t) => t.toLowerCase(), cO = /^\s*/g, uO = (t) => t.replace(cO, ""), dO = /([A-Z])/g, Fy = (t, e) => uO(t.replace(dO, (n) => `${e}${lO(n)}`)), fO = (t) => {
|
|
23096
23095
|
const e = unescape(encodeURIComponent(t)), n = e.length, r = new Uint8Array(n);
|
|
23097
23096
|
for (let o = 0; o < n; o++)
|
|
23098
23097
|
r[o] = /** @type {number} */
|
|
23099
23098
|
e.codePointAt(o);
|
|
23100
23099
|
return r;
|
|
23101
|
-
},
|
|
23100
|
+
}, zs = (
|
|
23102
23101
|
/** @type {TextEncoder} */
|
|
23103
23102
|
typeof TextEncoder < "u" ? new TextEncoder() : null
|
|
23104
|
-
), pO = (t) =>
|
|
23103
|
+
), pO = (t) => zs.encode(t), hO = zs ? pO : fO;
|
|
23105
23104
|
let Bu = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8", { fatal: !0, ignoreBOM: !0 });
|
|
23106
23105
|
Bu && Bu.decode(new Uint8Array()).length === 1 && (Bu = null);
|
|
23107
23106
|
let mO = class {
|
|
@@ -23127,41 +23126,41 @@ const gO = () => new mO(), yO = (t) => {
|
|
|
23127
23126
|
return e.set(new Uint8Array(t.cbuf.buffer, 0, t.cpos), n), e;
|
|
23128
23127
|
}, vO = (t, e) => {
|
|
23129
23128
|
const n = t.cbuf.length;
|
|
23130
|
-
n - t.cpos < e && (t.bufs.push(new Uint8Array(t.cbuf.buffer, 0, t.cpos)), t.cbuf = new Uint8Array(
|
|
23129
|
+
n - t.cpos < e && (t.bufs.push(new Uint8Array(t.cbuf.buffer, 0, t.cpos)), t.cbuf = new Uint8Array(Ti(n, e) * 2), t.cpos = 0);
|
|
23131
23130
|
}, It = (t, e) => {
|
|
23132
23131
|
const n = t.cbuf.length;
|
|
23133
23132
|
t.cpos === n && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(n * 2), t.cpos = 0), t.cbuf[t.cpos++] = e;
|
|
23134
|
-
},
|
|
23135
|
-
for (; e >
|
|
23136
|
-
It(t,
|
|
23137
|
-
It(t,
|
|
23133
|
+
}, js = (t, e) => {
|
|
23134
|
+
for (; e > ks; )
|
|
23135
|
+
It(t, Ps | ks & e), e = Bs(e / 128);
|
|
23136
|
+
It(t, ks & e);
|
|
23138
23137
|
}, xO = (t, e) => {
|
|
23139
23138
|
const n = eO(e);
|
|
23140
|
-
for (n && (e = -e), It(t, (e > Ny ?
|
|
23141
|
-
It(t, (e >
|
|
23139
|
+
for (n && (e = -e), It(t, (e > Ny ? Ps : 0) | (n ? tO : 0) | Ny & e), e = Bs(e / 64); e > 0; )
|
|
23140
|
+
It(t, (e > ks ? Ps : 0) | ks & e), e = Bs(e / 128);
|
|
23142
23141
|
}, nf = new Uint8Array(3e4), kO = nf.length / 3, SO = (t, e) => {
|
|
23143
23142
|
if (e.length < kO) {
|
|
23144
|
-
const n =
|
|
23145
|
-
|
|
23143
|
+
const n = zs.encodeInto(e, nf).written || 0;
|
|
23144
|
+
js(t, n);
|
|
23146
23145
|
for (let r = 0; r < n; r++)
|
|
23147
23146
|
It(t, nf[r]);
|
|
23148
23147
|
} else
|
|
23149
23148
|
f2(t, hO(e));
|
|
23150
23149
|
}, AO = (t, e) => {
|
|
23151
23150
|
const n = unescape(encodeURIComponent(e)), r = n.length;
|
|
23152
|
-
|
|
23151
|
+
js(t, r);
|
|
23153
23152
|
for (let o = 0; o < r; o++)
|
|
23154
23153
|
It(
|
|
23155
23154
|
t,
|
|
23156
23155
|
/** @type {number} */
|
|
23157
23156
|
n.codePointAt(o)
|
|
23158
23157
|
);
|
|
23159
|
-
}, Ry =
|
|
23160
|
-
|
|
23158
|
+
}, Ry = zs && /** @type {any} */
|
|
23159
|
+
zs.encodeInto ? SO : AO, CO = (t, e) => {
|
|
23161
23160
|
const n = t.cbuf.length, r = t.cpos, o = Xr(n - r, e.length), i = e.length - o;
|
|
23162
|
-
t.cbuf.set(e.subarray(0, o), r), t.cpos += o, i > 0 && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(
|
|
23161
|
+
t.cbuf.set(e.subarray(0, o), r), t.cpos += o, i > 0 && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(Ti(n * 2, i)), t.cbuf.set(e.subarray(o)), t.cpos = i);
|
|
23163
23162
|
}, f2 = (t, e) => {
|
|
23164
|
-
|
|
23163
|
+
js(t, e.byteLength), CO(t, e);
|
|
23165
23164
|
}, Op = (t, e) => {
|
|
23166
23165
|
vO(t, e);
|
|
23167
23166
|
const n = new DataView(t.cbuf.buffer, t.cpos, e);
|
|
@@ -23184,7 +23183,7 @@ js.encodeInto ? SO : AO, CO = (t, e) => {
|
|
|
23184
23183
|
if (e === null)
|
|
23185
23184
|
It(t, 126);
|
|
23186
23185
|
else if (sO(e)) {
|
|
23187
|
-
It(t, 117),
|
|
23186
|
+
It(t, 117), js(t, e.length);
|
|
23188
23187
|
for (let n = 0; n < e.length; n++)
|
|
23189
23188
|
rf(t, e[n]);
|
|
23190
23189
|
} else if (e instanceof Uint8Array)
|
|
@@ -23192,7 +23191,7 @@ js.encodeInto ? SO : AO, CO = (t, e) => {
|
|
|
23192
23191
|
else {
|
|
23193
23192
|
It(t, 118);
|
|
23194
23193
|
const n = Object.keys(e);
|
|
23195
|
-
|
|
23194
|
+
js(t, n.length);
|
|
23196
23195
|
for (let r = 0; r < n.length; r++) {
|
|
23197
23196
|
const o = n[r];
|
|
23198
23197
|
Ry(t, o), rf(t, e[o]);
|
|
@@ -23240,7 +23239,7 @@ js.encodeInto ? SO : AO, CO = (t, e) => {
|
|
|
23240
23239
|
remove: t.length - n - r,
|
|
23241
23240
|
insert: e.slice(n, e.length - r)
|
|
23242
23241
|
};
|
|
23243
|
-
}, BO = LO, ct = new lt("y-sync"), Yr = new lt("y-undo"), ka = new lt("yjs-cursor"), PO = Math.random, zO = (t) => t[
|
|
23242
|
+
}, BO = LO, ct = new lt("y-sync"), Yr = new lt("y-undo"), ka = new lt("yjs-cursor"), PO = Math.random, zO = (t) => t[Bs(PO() * t.length)], jO = (t) => t === void 0 ? null : t;
|
|
23244
23243
|
class qO {
|
|
23245
23244
|
constructor() {
|
|
23246
23245
|
this.map = /* @__PURE__ */ new Map();
|
|
@@ -23264,11 +23263,11 @@ try {
|
|
|
23264
23263
|
typeof localStorage < "u" && localStorage && (g2 = localStorage, UO = !1);
|
|
23265
23264
|
} catch {
|
|
23266
23265
|
}
|
|
23267
|
-
const VO = g2,
|
|
23266
|
+
const VO = g2, $i = typeof Te < "u" && Te.release && /node|io\.js/.test(Te.release.name) && Object.prototype.toString.call(typeof Te < "u" ? Te : 0) === "[object process]", y2 = typeof window < "u" && typeof document < "u" && !$i;
|
|
23268
23267
|
let qn;
|
|
23269
23268
|
const HO = () => {
|
|
23270
23269
|
if (qn === void 0)
|
|
23271
|
-
if (
|
|
23270
|
+
if ($i) {
|
|
23272
23271
|
qn = Qa();
|
|
23273
23272
|
const t = Te.argv;
|
|
23274
23273
|
let e = null;
|
|
@@ -23284,11 +23283,11 @@ const HO = () => {
|
|
|
23284
23283
|
}
|
|
23285
23284
|
})) : qn = Qa();
|
|
23286
23285
|
return qn;
|
|
23287
|
-
}, of = (t) => HO().has(t), sf = (t) => jO(
|
|
23286
|
+
}, of = (t) => HO().has(t), sf = (t) => jO($i ? Te.env[t.toUpperCase().replaceAll("-", "_")] : VO.getItem(t)), w2 = (t) => of("--" + t) || sf(t) !== null;
|
|
23288
23287
|
w2("production");
|
|
23289
|
-
const WO =
|
|
23288
|
+
const WO = $i && IO(Te.env.FORCE_COLOR, ["true", "1", "2"]);
|
|
23290
23289
|
WO || !of("--no-colors") && // @todo deprecate --no-colors
|
|
23291
|
-
!w2("no-color") && (
|
|
23290
|
+
!w2("no-color") && (!$i || Te.stdout.isTTY) && (!$i || of("--color") || sf("COLORTERM") !== null || (sf("TERM") || "").includes("color"));
|
|
23292
23291
|
const GO = (
|
|
23293
23292
|
/** @type {Document} */
|
|
23294
23293
|
typeof document < "u" ? document : {}
|
|
@@ -23407,7 +23406,7 @@ class n5 {
|
|
|
23407
23406
|
if (n % 64 !== 0) {
|
|
23408
23407
|
for (this._W.fill(0, s, 16); n < e.length; )
|
|
23409
23408
|
this._W[s] |= e[n] << (3 - n % 4) * 8, n++;
|
|
23410
|
-
this._W[s] |=
|
|
23409
|
+
this._W[s] |= Ps << (3 - n % 4) * 8;
|
|
23411
23410
|
}
|
|
23412
23411
|
this._updateHash();
|
|
23413
23412
|
}
|
|
@@ -23417,7 +23416,7 @@ class n5 {
|
|
|
23417
23416
|
for (; n < e.length; o++)
|
|
23418
23417
|
for (let s = 3; s >= 0 && n < e.length; s--)
|
|
23419
23418
|
this._W[o] |= e[n++] << s * 8;
|
|
23420
|
-
r || (this._W[o - (n % 4 === 0 ? 0 : 1)] |=
|
|
23419
|
+
r || (this._W[o - (n % 4 === 0 ? 0 : 1)] |= Ps << (3 - n % 4) * 8), this._W[14] = e.byteLength / nO, this._W[15] = e.byteLength * 8, this._updateHash();
|
|
23421
23420
|
const i = new Uint8Array(32);
|
|
23422
23421
|
for (let s = 0; s < this._H.length; s++)
|
|
23423
23422
|
for (let a = 0; a < 4; a++)
|
|
@@ -23538,27 +23537,19 @@ e.sv.get(t.id.client) > t.id.clock && !Me.isDeleted(e.ds, t.id), d5 = [{ light:
|
|
|
23538
23537
|
if (e !== null && e.anchor !== null && e.head !== null)
|
|
23539
23538
|
if (e.type === "all")
|
|
23540
23539
|
t.setSelection(new Qn(t.doc));
|
|
23541
|
-
else
|
|
23542
|
-
const r =
|
|
23543
|
-
n.doc,
|
|
23544
|
-
n.type,
|
|
23545
|
-
e.anchor,
|
|
23546
|
-
n.mapping
|
|
23547
|
-
);
|
|
23548
|
-
t.setSelection(Le.create(t.doc, r));
|
|
23549
|
-
} else {
|
|
23550
|
-
const r = mi(
|
|
23540
|
+
else {
|
|
23541
|
+
const r = Us(
|
|
23551
23542
|
n.doc,
|
|
23552
23543
|
n.type,
|
|
23553
23544
|
e.anchor,
|
|
23554
23545
|
n.mapping
|
|
23555
|
-
), o =
|
|
23546
|
+
), o = Us(
|
|
23556
23547
|
n.doc,
|
|
23557
23548
|
n.type,
|
|
23558
23549
|
e.head,
|
|
23559
23550
|
n.mapping
|
|
23560
23551
|
);
|
|
23561
|
-
r !== null && o !== null && t.setSelection(Ve.
|
|
23552
|
+
r !== null && o !== null && (t = t.setSelection(Ve.create(t.doc, r, o)));
|
|
23562
23553
|
}
|
|
23563
23554
|
}, af = (t, e) => ({
|
|
23564
23555
|
type: (
|
|
@@ -23624,7 +23615,7 @@ class m5 {
|
|
|
23624
23615
|
unrenderSnapshot() {
|
|
23625
23616
|
this.mapping.clear(), this.mux(() => {
|
|
23626
23617
|
const e = this.type.toArray().map(
|
|
23627
|
-
(r) =>
|
|
23618
|
+
(r) => Ss(
|
|
23628
23619
|
/** @type {Y.XmlElement} */
|
|
23629
23620
|
r,
|
|
23630
23621
|
this.prosemirrorView.state.schema,
|
|
@@ -23641,7 +23632,7 @@ class m5 {
|
|
|
23641
23632
|
_forceRerender() {
|
|
23642
23633
|
this.mapping.clear(), this.mux(() => {
|
|
23643
23634
|
const e = this.beforeTransactionSelection !== null ? null : this.prosemirrorView.state.selection, n = this.type.toArray().map(
|
|
23644
|
-
(o) =>
|
|
23635
|
+
(o) => Ss(
|
|
23645
23636
|
/** @type {Y.XmlElement} */
|
|
23646
23637
|
o,
|
|
23647
23638
|
this.prosemirrorView.state.schema,
|
|
@@ -23653,7 +23644,7 @@ class m5 {
|
|
|
23653
23644
|
new xe(ge.from(n), 0, 0)
|
|
23654
23645
|
);
|
|
23655
23646
|
if (e) {
|
|
23656
|
-
const o = Xr(
|
|
23647
|
+
const o = Xr(Ti(e.anchor, 0), r.doc.content.size), i = Xr(Ti(e.head, 0), r.doc.content.size);
|
|
23657
23648
|
r.setSelection(Ve.create(r.doc, o, i));
|
|
23658
23649
|
}
|
|
23659
23650
|
this.prosemirrorView.dispatch(
|
|
@@ -23705,7 +23696,7 @@ class m5 {
|
|
|
23705
23696
|
}, c = Me.typeListToArraySnapshot(
|
|
23706
23697
|
i,
|
|
23707
23698
|
new Me.Snapshot(n.ds, e.sv)
|
|
23708
|
-
).map((d) => !d._item.deleted || Tl(d._item, e) || Tl(d._item, n) ?
|
|
23699
|
+
).map((d) => !d._item.deleted || Tl(d._item, e) || Tl(d._item, n) ? Ss(
|
|
23709
23700
|
d,
|
|
23710
23701
|
this.prosemirrorView.state.schema,
|
|
23711
23702
|
{ mapping: /* @__PURE__ */ new Map(), isOMark: /* @__PURE__ */ new Map() },
|
|
@@ -23795,7 +23786,7 @@ const b2 = (t, e, n, r, o, i) => {
|
|
|
23795
23786
|
);
|
|
23796
23787
|
if (s === void 0) {
|
|
23797
23788
|
if (t instanceof Me.XmlElement)
|
|
23798
|
-
return
|
|
23789
|
+
return Ss(
|
|
23799
23790
|
t,
|
|
23800
23791
|
e,
|
|
23801
23792
|
n,
|
|
@@ -23806,7 +23797,7 @@ const b2 = (t, e, n, r, o, i) => {
|
|
|
23806
23797
|
throw MO();
|
|
23807
23798
|
}
|
|
23808
23799
|
return s;
|
|
23809
|
-
},
|
|
23800
|
+
}, Ss = (t, e, n, r, o, i) => {
|
|
23810
23801
|
const s = [], a = (l) => {
|
|
23811
23802
|
if (l instanceof Me.XmlElement) {
|
|
23812
23803
|
const c = b2(
|
|
@@ -23935,11 +23926,11 @@ const b2 = (t, e, n, r, o, i) => {
|
|
|
23935
23926
|
)?.attrs);
|
|
23936
23927
|
})
|
|
23937
23928
|
);
|
|
23938
|
-
},
|
|
23929
|
+
}, qs = (t, e) => {
|
|
23939
23930
|
if (t instanceof Me.XmlElement && !(e instanceof Array) && uf(t, e)) {
|
|
23940
23931
|
const n = dc(e);
|
|
23941
23932
|
return t._length === n.length && Dp(t.getAttributes(), e.attrs) && t.toArray().every(
|
|
23942
|
-
(r, o) =>
|
|
23933
|
+
(r, o) => qs(r, n[o])
|
|
23943
23934
|
);
|
|
23944
23935
|
}
|
|
23945
23936
|
return t instanceof Me.XmlText && e instanceof Array && v2(t, e);
|
|
@@ -23952,14 +23943,14 @@ const b2 = (t, e, n, r, o, i) => {
|
|
|
23952
23943
|
const d = r[l], f = o[l];
|
|
23953
23944
|
if ($l(n.mapping.get(d), f))
|
|
23954
23945
|
u = !0;
|
|
23955
|
-
else if (!
|
|
23946
|
+
else if (!qs(d, f))
|
|
23956
23947
|
break;
|
|
23957
23948
|
}
|
|
23958
23949
|
for (; l + c < a; c++) {
|
|
23959
23950
|
const d = r[s - c - 1], f = o[i - c - 1];
|
|
23960
23951
|
if ($l(n.mapping.get(d), f))
|
|
23961
23952
|
u = !0;
|
|
23962
|
-
else if (!
|
|
23953
|
+
else if (!qs(d, f))
|
|
23963
23954
|
break;
|
|
23964
23955
|
}
|
|
23965
23956
|
return {
|
|
@@ -24018,7 +24009,7 @@ const b2 = (t, e, n, r, o, i) => {
|
|
|
24018
24009
|
for (; c < l; c++) {
|
|
24019
24010
|
const d = s[c], f = o[c];
|
|
24020
24011
|
if (!$l(r.mapping.get(d), f))
|
|
24021
|
-
if (
|
|
24012
|
+
if (qs(d, f))
|
|
24022
24013
|
r.mapping.set(d, f);
|
|
24023
24014
|
else
|
|
24024
24015
|
break;
|
|
@@ -24026,7 +24017,7 @@ const b2 = (t, e, n, r, o, i) => {
|
|
|
24026
24017
|
for (; u + c + 1 < l; u++) {
|
|
24027
24018
|
const d = s[a - u - 1], f = o[i - u - 1];
|
|
24028
24019
|
if (!$l(r.mapping.get(d), f))
|
|
24029
|
-
if (
|
|
24020
|
+
if (qs(d, f))
|
|
24030
24021
|
r.mapping.set(d, f);
|
|
24031
24022
|
else
|
|
24032
24023
|
break;
|
|
@@ -24082,20 +24073,20 @@ const b2 = (t, e, n, r, o, i) => {
|
|
|
24082
24073
|
}
|
|
24083
24074
|
}, ct);
|
|
24084
24075
|
}, uf = (t, e) => !(e instanceof Array) && t.nodeName === e.type.name;
|
|
24085
|
-
let
|
|
24076
|
+
let As = null;
|
|
24086
24077
|
const S5 = () => {
|
|
24087
24078
|
const t = (
|
|
24088
24079
|
/** @type {Map<EditorView, Map<any, any>>} */
|
|
24089
|
-
|
|
24080
|
+
As
|
|
24090
24081
|
);
|
|
24091
|
-
|
|
24082
|
+
As = null, t.forEach((e, n) => {
|
|
24092
24083
|
const r = n.state.tr, o = ct.getState(n.state);
|
|
24093
24084
|
o && o.binding && !o.binding.isDestroyed && (e.forEach((i, s) => {
|
|
24094
24085
|
r.setMeta(s, i);
|
|
24095
24086
|
}), n.dispatch(r));
|
|
24096
24087
|
});
|
|
24097
24088
|
}, A5 = (t, e, n) => {
|
|
24098
|
-
|
|
24089
|
+
As || (As = /* @__PURE__ */ new Map(), Mp(0, S5)), m2(As, t, Qa).set(e, n);
|
|
24099
24090
|
}, Ol = (t, e, n) => {
|
|
24100
24091
|
if (t === 0)
|
|
24101
24092
|
return Me.createRelativePositionFromTypeIndex(e, 0, -1);
|
|
@@ -24158,7 +24149,7 @@ const S5 = () => {
|
|
|
24158
24149
|
}, C5 = (t, e) => {
|
|
24159
24150
|
let n = null, r = null;
|
|
24160
24151
|
return t._item === null ? r = Me.findRootTypeKey(t) : n = Me.createID(t._item.id.client, t._item.id.clock), new Me.RelativePosition(n, r, e.id);
|
|
24161
|
-
},
|
|
24152
|
+
}, Us = (t, e, n, r) => {
|
|
24162
24153
|
const o = Me.createAbsolutePositionFromRelativePosition(n, t);
|
|
24163
24154
|
if (o === null || o.type !== e && !Me.isParentOf(e, o.type._item))
|
|
24164
24155
|
return null;
|
|
@@ -24206,7 +24197,7 @@ const S5 = () => {
|
|
|
24206
24197
|
return s - 1;
|
|
24207
24198
|
}, E5 = (t, e) => {
|
|
24208
24199
|
const n = t.toArray().map(
|
|
24209
|
-
(r) =>
|
|
24200
|
+
(r) => Ss(
|
|
24210
24201
|
/** @type {Y.XmlElement} */
|
|
24211
24202
|
r,
|
|
24212
24203
|
e,
|
|
@@ -24230,26 +24221,26 @@ const S5 = () => {
|
|
|
24230
24221
|
if (n(s.clientID, c, l) && l.cursor != null) {
|
|
24231
24222
|
const u = l.user || {};
|
|
24232
24223
|
u.color == null ? u.color = "#ffa500" : D5.test(u.color) || console.warn("A user uses an unsupported color format", u), u.name == null && (u.name = `User: ${c}`);
|
|
24233
|
-
let d =
|
|
24224
|
+
let d = Us(
|
|
24234
24225
|
s,
|
|
24235
24226
|
i.type,
|
|
24236
24227
|
Me.createRelativePositionFromJSON(l.cursor.anchor),
|
|
24237
24228
|
i.binding.mapping
|
|
24238
|
-
), f =
|
|
24229
|
+
), f = Us(
|
|
24239
24230
|
s,
|
|
24240
24231
|
i.type,
|
|
24241
24232
|
Me.createRelativePositionFromJSON(l.cursor.head),
|
|
24242
24233
|
i.binding.mapping
|
|
24243
24234
|
);
|
|
24244
24235
|
if (d !== null && f !== null) {
|
|
24245
|
-
const p =
|
|
24236
|
+
const p = Ti(t.doc.content.size - 1, 0);
|
|
24246
24237
|
d = Xr(d, p), f = Xr(f, p), a.push(
|
|
24247
24238
|
He.widget(f, () => r(u, c), {
|
|
24248
24239
|
key: c + "",
|
|
24249
24240
|
side: 10
|
|
24250
24241
|
})
|
|
24251
24242
|
);
|
|
24252
|
-
const h = Xr(d, f), m =
|
|
24243
|
+
const h = Xr(d, f), m = Ti(d, f);
|
|
24253
24244
|
a.push(
|
|
24254
24245
|
He.inline(h, m, o(u, c), {
|
|
24255
24246
|
inclusiveEnd: !0,
|
|
@@ -24315,7 +24306,7 @@ const S5 = () => {
|
|
|
24315
24306
|
anchor: f,
|
|
24316
24307
|
head: p
|
|
24317
24308
|
});
|
|
24318
|
-
} else u.cursor != null &&
|
|
24309
|
+
} else u.cursor != null && Us(
|
|
24319
24310
|
c.doc,
|
|
24320
24311
|
c.type,
|
|
24321
24312
|
Me.createRelativePositionFromJSON(u.cursor.anchor),
|
|
@@ -24982,7 +24973,7 @@ let $2 = class O2 {
|
|
|
24982
24973
|
}
|
|
24983
24974
|
};
|
|
24984
24975
|
function J5(t, e) {
|
|
24985
|
-
const n =
|
|
24976
|
+
const n = Pi.fromSchema(e).serializeFragment(t), r = document.implementation.createHTMLDocument().createElement("div");
|
|
24986
24977
|
return r.appendChild(n), r.innerHTML;
|
|
24987
24978
|
}
|
|
24988
24979
|
const X5 = (t, e = 500) => {
|
|
@@ -25120,16 +25111,16 @@ const Z5 = (t, e) => {
|
|
|
25120
25111
|
return n;
|
|
25121
25112
|
};
|
|
25122
25113
|
var Il, M2, jy;
|
|
25123
|
-
const eM = class
|
|
25114
|
+
const eM = class fs {
|
|
25124
25115
|
constructor(e, n, r) {
|
|
25125
|
-
Kr(this, Il), Pe(this, "editor"), Pe(this, "schema"), Pe(this, "extensions"), Pe(this, "externalExtensions", []), Pe(this, "splittableMarks", []), this.editor = r, this.externalExtensions = n || [], this.extensions =
|
|
25116
|
+
Kr(this, Il), Pe(this, "editor"), Pe(this, "schema"), Pe(this, "extensions"), Pe(this, "externalExtensions", []), Pe(this, "splittableMarks", []), this.editor = r, this.externalExtensions = n || [], this.extensions = fs.getResolvedExtensions([...e, ...this.externalExtensions]), this.schema = G5.createSchemaByExtensions(this.extensions, r), Be(this, Il, M2).call(this);
|
|
25126
25117
|
}
|
|
25127
25118
|
/**
|
|
25128
25119
|
* Static method for creating ExtensionService.
|
|
25129
25120
|
* @param args Arguments for the constructor.
|
|
25130
25121
|
*/
|
|
25131
25122
|
static create(...e) {
|
|
25132
|
-
return new
|
|
25123
|
+
return new fs(...e);
|
|
25133
25124
|
}
|
|
25134
25125
|
/**
|
|
25135
25126
|
* Get an array of resolved extensions (e.g. sorted by priority).
|
|
@@ -25137,7 +25128,7 @@ const eM = class ps {
|
|
|
25137
25128
|
* @returns Array of resolved extensions.
|
|
25138
25129
|
*/
|
|
25139
25130
|
static getResolvedExtensions(e) {
|
|
25140
|
-
return
|
|
25131
|
+
return fs.sortByPriority(e);
|
|
25141
25132
|
}
|
|
25142
25133
|
/**
|
|
25143
25134
|
* Sort extensions by priority.
|
|
@@ -25184,7 +25175,7 @@ const eM = class ps {
|
|
|
25184
25175
|
* @returns Array of PM plugins.
|
|
25185
25176
|
*/
|
|
25186
25177
|
get plugins() {
|
|
25187
|
-
const e = this.editor, n =
|
|
25178
|
+
const e = this.editor, n = fs.sortByPriority([...this.extensions].reverse()), r = [], o = n.map((i) => {
|
|
25188
25179
|
const s = {
|
|
25189
25180
|
name: i.name,
|
|
25190
25181
|
options: i.options,
|
|
@@ -25303,13 +25294,13 @@ const D2 = (t, e, n) => {
|
|
|
25303
25294
|
let i = o.nodeBefore;
|
|
25304
25295
|
if (z2(t, o, e, -1))
|
|
25305
25296
|
return !0;
|
|
25306
|
-
if (r.parent.content.size == 0 && (
|
|
25297
|
+
if (r.parent.content.size == 0 && (Oi(i, "end") || Le.isSelectable(i)))
|
|
25307
25298
|
for (let s = r.depth; ; s--) {
|
|
25308
25299
|
let a = gp(t.doc, r.before(s), r.after(s), xe.empty);
|
|
25309
25300
|
if (a && a.slice.size < a.to - a.from) {
|
|
25310
25301
|
if (e) {
|
|
25311
25302
|
let l = t.tr.step(a);
|
|
25312
|
-
l.setSelection(
|
|
25303
|
+
l.setSelection(Oi(i, "end") ? qe.findFrom(l.doc.resolve(l.mapping.map(o.pos, -1)), -1) : Le.create(l.doc, o.pos - i.nodeSize)), e(l.scrollIntoView());
|
|
25313
25304
|
}
|
|
25314
25305
|
return !0;
|
|
25315
25306
|
}
|
|
@@ -25318,7 +25309,7 @@ const D2 = (t, e, n) => {
|
|
|
25318
25309
|
}
|
|
25319
25310
|
return i.isAtom && o.depth == r.depth - 1 ? (e && e(t.tr.delete(o.pos - i.nodeSize, o.pos).scrollIntoView()), !0) : !1;
|
|
25320
25311
|
};
|
|
25321
|
-
function
|
|
25312
|
+
function Oi(t, e, n = !1) {
|
|
25322
25313
|
for (let r = t; r; r = e == "start" ? r.firstChild : r.lastChild) {
|
|
25323
25314
|
if (r.isTextblock)
|
|
25324
25315
|
return !0;
|
|
@@ -25363,12 +25354,12 @@ const N2 = (t, e, n) => {
|
|
|
25363
25354
|
let i = o.nodeAfter;
|
|
25364
25355
|
if (z2(t, o, e, 1))
|
|
25365
25356
|
return !0;
|
|
25366
|
-
if (r.parent.content.size == 0 && (
|
|
25357
|
+
if (r.parent.content.size == 0 && (Oi(i, "start") || Le.isSelectable(i))) {
|
|
25367
25358
|
let s = gp(t.doc, r.before(), r.after(), xe.empty);
|
|
25368
25359
|
if (s && s.slice.size < s.to - s.from) {
|
|
25369
25360
|
if (e) {
|
|
25370
25361
|
let a = t.tr.step(s);
|
|
25371
|
-
a.setSelection(
|
|
25362
|
+
a.setSelection(Oi(i, "start") ? qe.findFrom(a.doc.resolve(a.mapping.map(o.pos)), 1) : Le.create(a.doc, a.mapping.map(o.pos))), e(a.scrollIntoView());
|
|
25372
25363
|
}
|
|
25373
25364
|
return !0;
|
|
25374
25365
|
}
|
|
@@ -25488,9 +25479,7 @@ function fM(t) {
|
|
|
25488
25479
|
let u = e.tr;
|
|
25489
25480
|
(e.selection instanceof Ve || e.selection instanceof Qn) && u.deleteSelection();
|
|
25490
25481
|
let d = u.mapping.map(r.pos), f = xr(u.doc, d, i.length, i);
|
|
25491
|
-
if (f || (i[0] = a ? { type: a } : null, f = xr(u.doc, d, i.length, i)), !
|
|
25492
|
-
return !1;
|
|
25493
|
-
if (u.split(d, i.length, i), !l && c && r.node(s).type != a) {
|
|
25482
|
+
if (f || (i[0] = a ? { type: a } : null, f = xr(u.doc, d, i.length, i)), u.split(d, i.length, i), !l && c && r.node(s).type != a) {
|
|
25494
25483
|
let p = u.mapping.map(r.before(s)), h = u.doc.resolve(p);
|
|
25495
25484
|
a && r.node(s - 1).canReplaceWith(h.index(), h.index() + 1, a) && u.setNodeMarkup(u.mapping.map(r.before(s)), a);
|
|
25496
25485
|
}
|
|
@@ -25521,7 +25510,7 @@ function z2(t, e, n, r) {
|
|
|
25521
25510
|
let u = i.type.spec.isolating || r > 0 && l ? null : qe.findFrom(e, 1), d = u && u.$from.blockRange(u.$to), f = d && ia(d);
|
|
25522
25511
|
if (f != null && f >= e.depth)
|
|
25523
25512
|
return n && n(t.tr.lift(d, f).scrollIntoView()), !0;
|
|
25524
|
-
if (c &&
|
|
25513
|
+
if (c && Oi(i, "start", !0) && Oi(o, "end")) {
|
|
25525
25514
|
let p = o, h = [];
|
|
25526
25515
|
for (; h.push(p), !p.isTextblock; )
|
|
25527
25516
|
p = p.lastChild;
|
|
@@ -25677,7 +25666,7 @@ const AM = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
25677
25666
|
return SM(r, n, l);
|
|
25678
25667
|
};
|
|
25679
25668
|
function pf(t, e, n = {}) {
|
|
25680
|
-
return t.find((r) => r.type === e &&
|
|
25669
|
+
return t.find((r) => r.type === e && Si(r.attrs, n));
|
|
25681
25670
|
}
|
|
25682
25671
|
function CM(t, e, n = {}) {
|
|
25683
25672
|
return !!pf(t, e, n);
|
|
@@ -25716,7 +25705,7 @@ const EM = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
25716
25705
|
function Nl(t, e, n = {}) {
|
|
25717
25706
|
const { empty: r, ranges: o } = t.selection, i = e ? $r(e, t.schema) : null;
|
|
25718
25707
|
if (r)
|
|
25719
|
-
return !!(t.storedMarks || t.selection.$from.marks()).filter((u) => i ? i.name === u.type.name : !0).find((u) =>
|
|
25708
|
+
return !!(t.storedMarks || t.selection.$from.marks()).filter((u) => i ? i.name === u.type.name : !0).find((u) => Si(u.attrs, n, { strict: !1 }));
|
|
25720
25709
|
let s = 0;
|
|
25721
25710
|
const a = [];
|
|
25722
25711
|
if (o.forEach(({ $from: u, $to: d }) => {
|
|
@@ -25733,7 +25722,7 @@ function Nl(t, e, n = {}) {
|
|
|
25733
25722
|
);
|
|
25734
25723
|
});
|
|
25735
25724
|
}), s === 0) return !1;
|
|
25736
|
-
const l = a.filter((u) => i ? i.name === u.mark.type.name : !0).filter((u) =>
|
|
25725
|
+
const l = a.filter((u) => i ? i.name === u.mark.type.name : !0).filter((u) => Si(u.mark.attrs, n, { strict: !1 })).reduce((u, d) => u + d.to - d.from, 0), c = a.filter((u) => i ? u.mark.type !== i && u.mark.type.excludes(i) : !0).reduce((u, d) => u + d.to - d.from, 0);
|
|
25737
25726
|
return (l > 0 ? l + c : l) >= s;
|
|
25738
25727
|
}
|
|
25739
25728
|
const $M = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
|
|
@@ -25769,7 +25758,7 @@ function Fl(t, e, n = {}) {
|
|
|
25769
25758
|
to: p
|
|
25770
25759
|
});
|
|
25771
25760
|
});
|
|
25772
|
-
const l = o - r, c = a.filter((u) => s ? s.name === u.node.type.name : !0).filter((u) =>
|
|
25761
|
+
const l = o - r, c = a.filter((u) => s ? s.name === u.node.type.name : !0).filter((u) => Si(u.node.attrs, n, { strict: !1 }));
|
|
25773
25762
|
return i ? !!c.length : c.reduce((u, d) => u + d.to - d.from, 0) >= l;
|
|
25774
25763
|
}
|
|
25775
25764
|
const DM = (t, e, n = {}) => ({ state: r, commands: o }) => {
|
|
@@ -27359,7 +27348,7 @@ const nD = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
27359
27348
|
() => e.liftEmptyBlock(),
|
|
27360
27349
|
() => e.splitBlock()
|
|
27361
27350
|
]);
|
|
27362
|
-
},
|
|
27351
|
+
}, Xi = (t) => {
|
|
27363
27352
|
t.commands.first(({ commands: e, tr: n }) => [
|
|
27364
27353
|
() => e.undoInputRule(),
|
|
27365
27354
|
() => (n.setMeta("inputType", "deleteContentBackward"), !1),
|
|
@@ -27379,9 +27368,9 @@ const nD = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
27379
27368
|
const t = {
|
|
27380
27369
|
Enter: () => mD(this.editor),
|
|
27381
27370
|
"Mod-Enter": () => this.editor.commands.exitCode(),
|
|
27382
|
-
Backspace: () =>
|
|
27383
|
-
"Mod-Backspace": () =>
|
|
27384
|
-
"Shift-Backspace": () =>
|
|
27371
|
+
Backspace: () => Xi(this.editor),
|
|
27372
|
+
"Mod-Backspace": () => Xi(this.editor),
|
|
27373
|
+
"Shift-Backspace": () => Xi(this.editor),
|
|
27385
27374
|
Delete: () => Ko(this.editor),
|
|
27386
27375
|
"Mod-Delete": () => Ko(this.editor),
|
|
27387
27376
|
"Mod-a": () => this.editor.commands.selectAll(),
|
|
@@ -27390,8 +27379,8 @@ const nD = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
27390
27379
|
...t
|
|
27391
27380
|
}, n = {
|
|
27392
27381
|
...t,
|
|
27393
|
-
"Ctrl-h": () =>
|
|
27394
|
-
"Alt-Backspace": () =>
|
|
27382
|
+
"Ctrl-h": () => Xi(this.editor),
|
|
27383
|
+
"Alt-Backspace": () => Xi(this.editor),
|
|
27395
27384
|
"Ctrl-d": () => Ko(this.editor),
|
|
27396
27385
|
"Ctrl-Alt-Backspace": () => Ko(this.editor),
|
|
27397
27386
|
"Alt-Delete": () => Ko(this.editor),
|
|
@@ -27508,7 +27497,7 @@ const Bp = ({
|
|
|
27508
27497
|
author: r.name,
|
|
27509
27498
|
authorEmail: r.email,
|
|
27510
27499
|
date: o
|
|
27511
|
-
}), l = new
|
|
27500
|
+
}), l = new bi();
|
|
27512
27501
|
let c = [];
|
|
27513
27502
|
return t.doc.nodesBetween(e, n, (u, d) => {
|
|
27514
27503
|
if (!u.type.name.includes("table"))
|
|
@@ -28386,7 +28375,7 @@ const nx = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
28386
28375
|
if (r.addMark(Math.max(n.from, u), Math.min(n.to, u + c.nodeSize), n.mark), ["bold", "italic", "strike", "underline", "textStyle"].includes(n.mark.type.name) && !c.marks.find((p) => p.type === n.mark.type)) {
|
|
28387
28376
|
const p = c.marks.find((y) => y.type.name === $t);
|
|
28388
28377
|
let h = [], m = [];
|
|
28389
|
-
if (p ? p.attrs.before.find((y) => y.type === "textStyle" ? y.type === n.mark.type.name &&
|
|
28378
|
+
if (p ? p.attrs.before.find((y) => y.type === "textStyle" ? y.type === n.mark.type.name && Si(y.attrs, n.mark.attrs) : y.type === n.mark.type.name) ? (m = [...p.attrs.before.filter((y) => y.type !== n.mark.type.name)], h = [...p.attrs.after]) : (m = [...p.attrs.before], h = [
|
|
28390
28379
|
...p.attrs.after,
|
|
28391
28380
|
{
|
|
28392
28381
|
type: n.mark.type.name,
|
|
@@ -28461,7 +28450,7 @@ const nx = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
28461
28450
|
const r = ["inputType", "uiEvent", "paste", "pointer"], o = ["historyUndo", "historyRedo", "acceptReject"];
|
|
28462
28451
|
if (!t.steps.length || t.meta && !Object.keys(t.meta).every((c) => r.includes(c)) || o.includes(t.getMeta("inputType")) || t.getMeta(Nt))
|
|
28463
28452
|
return t;
|
|
28464
|
-
const i = e.tr, s = new
|
|
28453
|
+
const i = e.tr, s = new bi(), a = Math.floor(Date.now() / 6e5) * 6e5, l = new Date(a).toISOString();
|
|
28465
28454
|
if (t.steps.forEach((c, u) => {
|
|
28466
28455
|
const d = c.map(s), { doc: f } = i;
|
|
28467
28456
|
d && (d instanceof Pt ? (nx({
|
|
@@ -28535,7 +28524,7 @@ const nx = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
28535
28524
|
}, Jy = (t) => {
|
|
28536
28525
|
if (t === "initial" || t === "0.4.14") return Object.values(PD);
|
|
28537
28526
|
};
|
|
28538
|
-
var ci, sx, Ke, ax, lx, Vu, cx, gf, yf, Hu, Wu, wf, bf, Gu, Ku, Ju, Xy,
|
|
28527
|
+
var ci, sx, Ke, ax, lx, Vu, cx, gf, yf, Hu, Wu, wf, bf, Gu, Ku, Ju, Xy, ps, hs, Yy, Zy, ux, dx;
|
|
28539
28528
|
const zD = class fx extends B5 {
|
|
28540
28529
|
constructor(e) {
|
|
28541
28530
|
super(), Kr(this, Ke), Kr(this, ci), Pe(this, "extensionService"), Pe(this, "extensionStorage", {}), Pe(this, "schema"), Pe(this, "view"), Pe(this, "isFocused", !1), Kr(this, sx), Pe(this, "options", {
|
|
@@ -28811,7 +28800,7 @@ const zD = class fx extends B5 {
|
|
|
28811
28800
|
* Get HTML string of the document
|
|
28812
28801
|
*/
|
|
28813
28802
|
getHTML() {
|
|
28814
|
-
const e = document.createElement("div"), n =
|
|
28803
|
+
const e = document.createElement("div"), n = Pi.fromSchema(this.schema).serializeFragment(this.state.doc.content);
|
|
28815
28804
|
return e.appendChild(n), e.innerHTML;
|
|
28816
28805
|
}
|
|
28817
28806
|
/**
|
|
@@ -28889,7 +28878,7 @@ const zD = class fx extends B5 {
|
|
|
28889
28878
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
28890
28879
|
*/
|
|
28891
28880
|
processCollaborationMigrations() {
|
|
28892
|
-
if (console.debug("[checkVersionMigrations] Current editor version", "0.9.
|
|
28881
|
+
if (console.debug("[checkVersionMigrations] Current editor version", "0.9.35"), !this.options.ydoc) return;
|
|
28893
28882
|
let e = this.options.ydoc.getMap("meta").get("version");
|
|
28894
28883
|
e || (e = "initial"), console.debug("[checkVersionMigrations] Document version", e);
|
|
28895
28884
|
const n = Jy(e) || [], r = this.state.plugins.find((i) => i.key.startsWith("y-sync"));
|
|
@@ -28911,11 +28900,11 @@ const zD = class fx extends B5 {
|
|
|
28911
28900
|
isNewFile: !0,
|
|
28912
28901
|
shouldLoadComments: !0,
|
|
28913
28902
|
replacedFile: !0
|
|
28914
|
-
}), Be(this, Ke, wf).call(this), Be(this, Ke, bf).call(this), this.initDefaultStyles(), this.initializeCollaborationData(!0), this.options.ydoc || (Be(this, Ke,
|
|
28903
|
+
}), Be(this, Ke, wf).call(this), Be(this, Ke, bf).call(this), this.initDefaultStyles(), this.initializeCollaborationData(!0), this.options.ydoc || (Be(this, Ke, hs).call(this), Be(this, Ke, ps).call(this));
|
|
28915
28904
|
}
|
|
28916
28905
|
};
|
|
28917
28906
|
ci = /* @__PURE__ */ new WeakMap(), sx = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakSet(), ax = function(t) {
|
|
28918
|
-
Be(this, Ke, Hu).call(this), Be(this, Ke, Wu).call(this), Be(this, Ke, Gu).call(this), Be(this, Ke, wf).call(this), Be(this, Ke, bf).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), this.on("exception", this.options.onException), Be(this, Ke, Ju).call(this), this.initDefaultStyles(), this.setDocumentMode(t.documentMode), !this.options.isHeadless && (this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", Be(this, Ke, Vu)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("trackedChangesUpdate", this.options.onTrackedChangesUpdate), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("commentsUpdate", this.options.onCommentsUpdate), this.on("locked", this.options.onDocumentLocked), this.on("collaborationReady", Be(this, Ke, Xy)), this.on("paginationUpdate", this.options.onPaginationUpdate), this.on("comment-positions", this.options.onCommentLocationsUpdate), this.initializeCollaborationData(), this.options.ydoc || (Be(this, Ke,
|
|
28907
|
+
Be(this, Ke, Hu).call(this), Be(this, Ke, Wu).call(this), Be(this, Ke, Gu).call(this), Be(this, Ke, wf).call(this), Be(this, Ke, bf).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), this.on("exception", this.options.onException), Be(this, Ke, Ju).call(this), this.initDefaultStyles(), this.setDocumentMode(t.documentMode), !this.options.isHeadless && (this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", Be(this, Ke, Vu)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("trackedChangesUpdate", this.options.onTrackedChangesUpdate), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("commentsUpdate", this.options.onCommentsUpdate), this.on("locked", this.options.onDocumentLocked), this.on("collaborationReady", Be(this, Ke, Xy)), this.on("paginationUpdate", this.options.onPaginationUpdate), this.on("comment-positions", this.options.onCommentLocationsUpdate), this.initializeCollaborationData(), this.options.ydoc || (Be(this, Ke, hs).call(this), Be(this, Ke, ps).call(this)), window.setTimeout(() => {
|
|
28919
28908
|
this.isDestroyed || this.emit("create", { editor: this });
|
|
28920
28909
|
}, 0));
|
|
28921
28910
|
}, lx = function(t) {
|
|
@@ -28935,7 +28924,7 @@ gf = function() {
|
|
|
28935
28924
|
this.options.isNewFile = !1;
|
|
28936
28925
|
const t = Be(this, Ke, Ku).call(this), e = this.state.tr.replaceWith(0, this.state.doc.content.size, t);
|
|
28937
28926
|
this.view.dispatch(e), setTimeout(() => {
|
|
28938
|
-
Be(this, Ke,
|
|
28927
|
+
Be(this, Ke, hs).call(this), Be(this, Ke, ps).call(this);
|
|
28939
28928
|
}, 50);
|
|
28940
28929
|
}, yf = function(t) {
|
|
28941
28930
|
const e = this.extensionService?.plugins.find((r) => r.key.startsWith(t)), n = this.state.plugins.find((r) => r.key.startsWith(t));
|
|
@@ -29022,11 +29011,11 @@ Ju = function() {
|
|
|
29022
29011
|
const r = this.view.dom;
|
|
29023
29012
|
r.editor = this, this.options.telemetry?.sendReport();
|
|
29024
29013
|
}, Xy = function({ editor: t, ydoc: e }) {
|
|
29025
|
-
this.options.collaborationIsReady || (console.debug("🔗 [super-editor] Collaboration ready"), this.options.onCollaborationReady({ editor: t, ydoc: e }), this.options.collaborationIsReady = !0, this.options.isNewFile || (Be(this, Ke,
|
|
29014
|
+
this.options.collaborationIsReady || (console.debug("🔗 [super-editor] Collaboration ready"), this.options.onCollaborationReady({ editor: t, ydoc: e }), this.options.collaborationIsReady = !0, this.options.isNewFile || (Be(this, Ke, hs).call(this), Be(this, Ke, ps).call(this)));
|
|
29026
29015
|
}, /**
|
|
29027
29016
|
* Initialize comments plugin
|
|
29028
29017
|
*/
|
|
29029
|
-
|
|
29018
|
+
ps = function() {
|
|
29030
29019
|
if (!this.options.isCommentsEnabled || this.options.isHeadless || !this.options.shouldLoadComments) return;
|
|
29031
29020
|
const t = this.options.replacedFile;
|
|
29032
29021
|
this.emit("commentsLoaded", { editor: this, replacedFile: t, comments: this.converter.comments || [] }), setTimeout(() => {
|
|
@@ -29034,7 +29023,7 @@ hs = function() {
|
|
|
29034
29023
|
const { state: e, dispatch: n } = this.view, r = e.tr.setMeta(Nt, { type: "force" });
|
|
29035
29024
|
n(r);
|
|
29036
29025
|
}, 50);
|
|
29037
|
-
},
|
|
29026
|
+
}, hs = async function() {
|
|
29038
29027
|
if (!(this.options.isHeadless || !this.extensionService) && this.options.extensions.find((t) => t.name === "pagination") && this.options.pagination) {
|
|
29039
29028
|
console.debug("🔗 [super-editor] Initializing pagination");
|
|
29040
29029
|
const t = await OD(this);
|
|
@@ -31317,7 +31306,7 @@ function Gt(t) {
|
|
|
31317
31306
|
return e;
|
|
31318
31307
|
}
|
|
31319
31308
|
var qr = new lt("selectingCells");
|
|
31320
|
-
function
|
|
31309
|
+
function Ui(t) {
|
|
31321
31310
|
for (let e = t.depth - 1; e > 0; e--)
|
|
31322
31311
|
if (t.node(e).type.spec.tableRole == "row")
|
|
31323
31312
|
return t.node(0).resolve(t.before(e + 1));
|
|
@@ -31342,7 +31331,7 @@ function pc(t) {
|
|
|
31342
31331
|
return e.$anchorCell.pos > e.$headCell.pos ? e.$anchorCell : e.$headCell;
|
|
31343
31332
|
if ("node" in e && e.node && e.node.type.spec.tableRole == "cell")
|
|
31344
31333
|
return e.$anchor;
|
|
31345
|
-
const n =
|
|
31334
|
+
const n = Ui(e.$head) || W_(e.$head);
|
|
31346
31335
|
if (n)
|
|
31347
31336
|
return n;
|
|
31348
31337
|
throw new RangeError(`No cell found around position ${e.head}`);
|
|
@@ -31929,7 +31918,7 @@ function f8(t) {
|
|
|
31929
31918
|
i = o.$anchorCell.nodeAfter, s = o.$anchorCell.pos;
|
|
31930
31919
|
} else {
|
|
31931
31920
|
if (i = H_(o.$from), !i) return !1;
|
|
31932
|
-
s = (r =
|
|
31921
|
+
s = (r = Ui(o.$from)) == null ? void 0 : r.pos;
|
|
31933
31922
|
}
|
|
31934
31923
|
if (i == null || s == null || i.attrs.colspan == 1 && i.attrs.rowspan == 1)
|
|
31935
31924
|
return !1;
|
|
@@ -32394,7 +32383,7 @@ function Ta(t, e) {
|
|
|
32394
32383
|
};
|
|
32395
32384
|
}
|
|
32396
32385
|
function S8(t, e) {
|
|
32397
|
-
const n = t.state.doc, r =
|
|
32386
|
+
const n = t.state.doc, r = Ui(n.resolve(e));
|
|
32398
32387
|
return r ? (t.dispatch(t.state.tr.setSelection(new nt(r))), !0) : !1;
|
|
32399
32388
|
}
|
|
32400
32389
|
function A8(t, e, n) {
|
|
@@ -32435,7 +32424,7 @@ function C8(t, e) {
|
|
|
32435
32424
|
let o;
|
|
32436
32425
|
if (e.shiftKey && t.state.selection instanceof nt)
|
|
32437
32426
|
i(t.state.selection.$anchorCell, e), e.preventDefault();
|
|
32438
|
-
else if (e.shiftKey && r && (o =
|
|
32427
|
+
else if (e.shiftKey && r && (o = Ui(t.state.selection.$anchor)) != null && ((n = Yu(t, e)) == null ? void 0 : n.pos) != o.pos)
|
|
32439
32428
|
i(o, e), e.preventDefault();
|
|
32440
32429
|
else if (!r)
|
|
32441
32430
|
return;
|
|
@@ -32489,7 +32478,7 @@ function Yu(t, e) {
|
|
|
32489
32478
|
left: e.clientX,
|
|
32490
32479
|
top: e.clientY
|
|
32491
32480
|
});
|
|
32492
|
-
return n && n ?
|
|
32481
|
+
return n && n ? Ui(t.state.doc.resolve(n.pos)) : null;
|
|
32493
32482
|
}
|
|
32494
32483
|
var E8 = class {
|
|
32495
32484
|
constructor(t, e) {
|
|
@@ -32688,7 +32677,7 @@ function bw(t, e, n, r) {
|
|
|
32688
32677
|
top: e.clientY
|
|
32689
32678
|
});
|
|
32690
32679
|
if (!i) return -1;
|
|
32691
|
-
const { pos: s } = i, a =
|
|
32680
|
+
const { pos: s } = i, a = Ui(t.state.doc.resolve(s));
|
|
32692
32681
|
if (!a) return -1;
|
|
32693
32682
|
if (n == "right") return a.pos;
|
|
32694
32683
|
const l = mt.get(a.node(-1)), c = a.start(-1), u = l.map.indexOf(a.pos - c);
|
|
@@ -33439,9 +33428,9 @@ class K8 extends Error {
|
|
|
33439
33428
|
super(`Failed to parse color: "${e}"`);
|
|
33440
33429
|
}
|
|
33441
33430
|
}
|
|
33442
|
-
var
|
|
33431
|
+
var ms = K8;
|
|
33443
33432
|
function J8(t) {
|
|
33444
|
-
if (typeof t != "string") throw new
|
|
33433
|
+
if (typeof t != "string") throw new ms(t);
|
|
33445
33434
|
if (t.trim().toLowerCase() === "transparent") return [0, 0, 0, 0];
|
|
33446
33435
|
let e = t.trim();
|
|
33447
33436
|
e = rI.test(t) ? Z8(t) : t;
|
|
@@ -33463,11 +33452,11 @@ function J8(t) {
|
|
|
33463
33452
|
const i = nI.exec(e);
|
|
33464
33453
|
if (i) {
|
|
33465
33454
|
const [s, a, l, c] = Array.from(i).slice(1).map(parseFloat);
|
|
33466
|
-
if (Cf(0, 100, a) !== a) throw new
|
|
33467
|
-
if (Cf(0, 100, l) !== l) throw new
|
|
33455
|
+
if (Cf(0, 100, a) !== a) throw new ms(t);
|
|
33456
|
+
if (Cf(0, 100, l) !== l) throw new ms(t);
|
|
33468
33457
|
return [...oI(s, a, l), Number.isNaN(c) ? 1 : c];
|
|
33469
33458
|
}
|
|
33470
|
-
throw new
|
|
33459
|
+
throw new ms(t);
|
|
33471
33460
|
}
|
|
33472
33461
|
function X8(t) {
|
|
33473
33462
|
let e = 5381, n = t.length;
|
|
@@ -33484,7 +33473,7 @@ const kw = (t) => parseInt(t.replace(/_/g, ""), 36), Y8 = "1q29ehhb 1n09sgk7 1kl
|
|
|
33484
33473
|
}, {});
|
|
33485
33474
|
function Z8(t) {
|
|
33486
33475
|
const e = t.toLowerCase().trim(), n = Y8[X8(e)];
|
|
33487
|
-
if (!n) throw new
|
|
33476
|
+
if (!n) throw new ms(t);
|
|
33488
33477
|
return `#${n}`;
|
|
33489
33478
|
}
|
|
33490
33479
|
const Ws = (t, e) => Array.from(Array(e)).map(() => t).join(""), Q8 = new RegExp(`^#${Ws("([a-f0-9])", 3)}([a-f0-9])?$`, "i"), eI = new RegExp(`^#${Ws("([a-f0-9]{2})", 3)}([a-f0-9]{2})?$`, "i"), tI = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Ws(",\\s*(\\d+)\\s*", 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, "i"), nI = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i, rI = /^[a-z]+$/i, Sw = (t) => Math.round(t * 255), oI = (t, e, n) => {
|
|
@@ -34668,7 +34657,7 @@ const pI = "track-insert", dk = Pn.create({
|
|
|
34668
34657
|
acceptTrackedChangesBetween: (t, e) => ({ state: n, dispatch: r }) => {
|
|
34669
34658
|
let { tr: o, doc: i } = n;
|
|
34670
34659
|
o.setMeta("acceptReject", !0);
|
|
34671
|
-
const s = new
|
|
34660
|
+
const s = new bi();
|
|
34672
34661
|
return i.nodesBetween(t, e, (a, l) => {
|
|
34673
34662
|
if (a.marks && a.marks.find((c) => c.type.name === yt)) {
|
|
34674
34663
|
const c = new Pt(
|
|
@@ -34701,7 +34690,7 @@ const pI = "track-insert", dk = Pn.create({
|
|
|
34701
34690
|
rejectTrackedChangesBetween: (t, e) => ({ state: n, dispatch: r }) => {
|
|
34702
34691
|
const { tr: o, doc: i } = n;
|
|
34703
34692
|
o.setMeta("acceptReject", !0);
|
|
34704
|
-
const s = new
|
|
34693
|
+
const s = new bi();
|
|
34705
34694
|
return i.nodesBetween(t, e, (a, l) => {
|
|
34706
34695
|
if (a.marks && a.marks.find((c) => c.type.name === yt)) {
|
|
34707
34696
|
const c = a.marks.find((u) => u.type.name === yt);
|
|
@@ -34861,10 +34850,10 @@ const pI = "track-insert", dk = Pn.create({
|
|
|
34861
34850
|
})];
|
|
34862
34851
|
}
|
|
34863
34852
|
});
|
|
34864
|
-
var un = "top", _n = "bottom", In = "right", dn = "left", Wp = "auto", ua = [un, _n, In, dn],
|
|
34865
|
-
return t.concat([e + "-" +
|
|
34853
|
+
var un = "top", _n = "bottom", In = "right", dn = "left", Wp = "auto", ua = [un, _n, In, dn], Mi = "start", Gs = "end", yI = "clippingParents", mk = "viewport", Yi = "popper", wI = "reference", Ew = /* @__PURE__ */ ua.reduce(function(t, e) {
|
|
34854
|
+
return t.concat([e + "-" + Mi, e + "-" + Gs]);
|
|
34866
34855
|
}, []), gk = /* @__PURE__ */ [].concat(ua, [Wp]).reduce(function(t, e) {
|
|
34867
|
-
return t.concat([e, e + "-" +
|
|
34856
|
+
return t.concat([e, e + "-" + Mi, e + "-" + Gs]);
|
|
34868
34857
|
}, []), bI = "beforeRead", vI = "read", xI = "afterRead", kI = "beforeMain", SI = "main", AI = "afterMain", CI = "beforeWrite", EI = "write", TI = "afterWrite", $I = [bI, vI, xI, kI, SI, AI, CI, EI, TI];
|
|
34869
34858
|
function ir(t) {
|
|
34870
34859
|
return t ? (t.nodeName || "").toLowerCase() : null;
|
|
@@ -34937,7 +34926,7 @@ const yk = {
|
|
|
34937
34926
|
function tr(t) {
|
|
34938
34927
|
return t.split("-")[0];
|
|
34939
34928
|
}
|
|
34940
|
-
var To = Math.max, Pl = Math.min,
|
|
34929
|
+
var To = Math.max, Pl = Math.min, Di = Math.round;
|
|
34941
34930
|
function $f() {
|
|
34942
34931
|
var t = navigator.userAgentData;
|
|
34943
34932
|
return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
|
|
@@ -34947,10 +34936,10 @@ function $f() {
|
|
|
34947
34936
|
function wk() {
|
|
34948
34937
|
return !/^((?!chrome|android).)*safari/i.test($f());
|
|
34949
34938
|
}
|
|
34950
|
-
function
|
|
34939
|
+
function _i(t, e, n) {
|
|
34951
34940
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
34952
34941
|
var r = t.getBoundingClientRect(), o = 1, i = 1;
|
|
34953
|
-
e && Dn(t) && (o = t.offsetWidth > 0 &&
|
|
34942
|
+
e && Dn(t) && (o = t.offsetWidth > 0 && Di(r.width) / t.offsetWidth || 1, i = t.offsetHeight > 0 && Di(r.height) / t.offsetHeight || 1);
|
|
34954
34943
|
var s = Ro(t) ? Sn(t) : window, a = s.visualViewport, l = !wk() && n, c = (r.left + (l && a ? a.offsetLeft : 0)) / o, u = (r.top + (l && a ? a.offsetTop : 0)) / i, d = r.width / o, f = r.height / i;
|
|
34955
34944
|
return {
|
|
34956
34945
|
width: d,
|
|
@@ -34964,7 +34953,7 @@ function Ii(t, e, n) {
|
|
|
34964
34953
|
};
|
|
34965
34954
|
}
|
|
34966
34955
|
function Kp(t) {
|
|
34967
|
-
var e =
|
|
34956
|
+
var e = _i(t), n = t.offsetWidth, r = t.offsetHeight;
|
|
34968
34957
|
return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), {
|
|
34969
34958
|
x: t.offsetLeft,
|
|
34970
34959
|
y: t.offsetTop,
|
|
@@ -35038,11 +35027,11 @@ function da(t) {
|
|
|
35038
35027
|
function Jp(t) {
|
|
35039
35028
|
return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
|
|
35040
35029
|
}
|
|
35041
|
-
function
|
|
35030
|
+
function Cs(t, e, n) {
|
|
35042
35031
|
return To(t, Pl(e, n));
|
|
35043
35032
|
}
|
|
35044
35033
|
function II(t, e, n) {
|
|
35045
|
-
var r =
|
|
35034
|
+
var r = Cs(t, e, n);
|
|
35046
35035
|
return r > n ? n : r;
|
|
35047
35036
|
}
|
|
35048
35037
|
function vk() {
|
|
@@ -35069,7 +35058,7 @@ var NI = function(t, e) {
|
|
|
35069
35058
|
function FI(t) {
|
|
35070
35059
|
var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, s = n.modifiersData.popperOffsets, a = tr(n.placement), l = Jp(a), c = [dn, In].indexOf(a) >= 0, u = c ? "height" : "width";
|
|
35071
35060
|
if (!(!i || !s)) {
|
|
35072
|
-
var d = NI(o.padding, n), f = Kp(i), p = l === "y" ? un : dn, h = l === "y" ? _n : In, m = n.rects.reference[u] + n.rects.reference[l] - s[l] - n.rects.popper[u], y = s[l] - n.rects.reference[l], g = da(i), v = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = m / 2 - y / 2, w = d[p], T = v - f[u] - d[h], O = v / 2 - f[u] / 2 + x, M =
|
|
35061
|
+
var d = NI(o.padding, n), f = Kp(i), p = l === "y" ? un : dn, h = l === "y" ? _n : In, m = n.rects.reference[u] + n.rects.reference[l] - s[l] - n.rects.popper[u], y = s[l] - n.rects.reference[l], g = da(i), v = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = m / 2 - y / 2, w = d[p], T = v - f[u] - d[h], O = v / 2 - f[u] / 2 + x, M = Cs(w, O, T), N = l;
|
|
35073
35062
|
n.modifiersData[r] = (e = {}, e[N] = M, e.centerOffset = M - O, e);
|
|
35074
35063
|
}
|
|
35075
35064
|
}
|
|
@@ -35086,7 +35075,7 @@ const LI = {
|
|
|
35086
35075
|
requires: ["popperOffsets"],
|
|
35087
35076
|
requiresIfExists: ["preventOverflow"]
|
|
35088
35077
|
};
|
|
35089
|
-
function
|
|
35078
|
+
function Ii(t) {
|
|
35090
35079
|
return t.split("-")[1];
|
|
35091
35080
|
}
|
|
35092
35081
|
var BI = {
|
|
@@ -35098,8 +35087,8 @@ var BI = {
|
|
|
35098
35087
|
function PI(t, e) {
|
|
35099
35088
|
var n = t.x, r = t.y, o = e.devicePixelRatio || 1;
|
|
35100
35089
|
return {
|
|
35101
|
-
x:
|
|
35102
|
-
y:
|
|
35090
|
+
x: Di(n * o) / o || 0,
|
|
35091
|
+
y: Di(r * o) / o || 0
|
|
35103
35092
|
};
|
|
35104
35093
|
}
|
|
35105
35094
|
function $w(t) {
|
|
@@ -35149,7 +35138,7 @@ function $w(t) {
|
|
|
35149
35138
|
function zI(t) {
|
|
35150
35139
|
var e = t.state, n = t.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, i = n.adaptive, s = i === void 0 ? !0 : i, a = n.roundOffsets, l = a === void 0 ? !0 : a, c = {
|
|
35151
35140
|
placement: tr(e.placement),
|
|
35152
|
-
variation:
|
|
35141
|
+
variation: Ii(e.placement),
|
|
35153
35142
|
popper: e.elements.popper,
|
|
35154
35143
|
popperRect: e.rects.popper,
|
|
35155
35144
|
gpuAcceleration: o,
|
|
@@ -35226,7 +35215,7 @@ function Xp(t) {
|
|
|
35226
35215
|
};
|
|
35227
35216
|
}
|
|
35228
35217
|
function Yp(t) {
|
|
35229
|
-
return
|
|
35218
|
+
return _i(oo(t)).left + Xp(t).scrollLeft;
|
|
35230
35219
|
}
|
|
35231
35220
|
function WI(t, e) {
|
|
35232
35221
|
var n = Sn(t), r = oo(t), o = n.visualViewport, i = r.clientWidth, s = r.clientHeight, a = 0, l = 0;
|
|
@@ -35258,13 +35247,13 @@ function Zp(t) {
|
|
|
35258
35247
|
function Sk(t) {
|
|
35259
35248
|
return ["html", "body", "#document"].indexOf(ir(t)) >= 0 ? t.ownerDocument.body : Dn(t) && Zp(t) ? t : Sk(hc(t));
|
|
35260
35249
|
}
|
|
35261
|
-
function
|
|
35250
|
+
function Es(t, e) {
|
|
35262
35251
|
var n;
|
|
35263
35252
|
e === void 0 && (e = []);
|
|
35264
35253
|
var r = Sk(t), o = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i = Sn(r), s = o ? [i].concat(i.visualViewport || [], Zp(r) ? r : []) : r, a = e.concat(s);
|
|
35265
35254
|
return o ? a : (
|
|
35266
35255
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
35267
|
-
a.concat(
|
|
35256
|
+
a.concat(Es(hc(s)))
|
|
35268
35257
|
);
|
|
35269
35258
|
}
|
|
35270
35259
|
function Of(t) {
|
|
@@ -35276,14 +35265,14 @@ function Of(t) {
|
|
|
35276
35265
|
});
|
|
35277
35266
|
}
|
|
35278
35267
|
function KI(t, e) {
|
|
35279
|
-
var n =
|
|
35268
|
+
var n = _i(t, !1, e === "fixed");
|
|
35280
35269
|
return n.top = n.top + t.clientTop, n.left = n.left + t.clientLeft, n.bottom = n.top + t.clientHeight, n.right = n.left + t.clientWidth, n.width = t.clientWidth, n.height = t.clientHeight, n.x = n.left, n.y = n.top, n;
|
|
35281
35270
|
}
|
|
35282
35271
|
function Mw(t, e, n) {
|
|
35283
35272
|
return e === mk ? Of(WI(t, n)) : Ro(e) ? KI(e, n) : Of(GI(oo(t)));
|
|
35284
35273
|
}
|
|
35285
35274
|
function JI(t) {
|
|
35286
|
-
var e =
|
|
35275
|
+
var e = Es(hc(t)), n = ["absolute", "fixed"].indexOf(Er(t).position) >= 0, r = n && Dn(t) ? da(t) : t;
|
|
35287
35276
|
return Ro(r) ? e.filter(function(o) {
|
|
35288
35277
|
return Ro(o) && bk(o, r) && ir(o) !== "body";
|
|
35289
35278
|
}) : [];
|
|
@@ -35296,7 +35285,7 @@ function XI(t, e, n, r) {
|
|
|
35296
35285
|
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
35297
35286
|
}
|
|
35298
35287
|
function Ak(t) {
|
|
35299
|
-
var e = t.reference, n = t.element, r = t.placement, o = r ? tr(r) : null, i = r ?
|
|
35288
|
+
var e = t.reference, n = t.element, r = t.placement, o = r ? tr(r) : null, i = r ? Ii(r) : null, s = e.x + e.width / 2 - n.width / 2, a = e.y + e.height / 2 - n.height / 2, l;
|
|
35300
35289
|
switch (o) {
|
|
35301
35290
|
case un:
|
|
35302
35291
|
l = {
|
|
@@ -35332,7 +35321,7 @@ function Ak(t) {
|
|
|
35332
35321
|
if (c != null) {
|
|
35333
35322
|
var u = c === "y" ? "height" : "width";
|
|
35334
35323
|
switch (i) {
|
|
35335
|
-
case
|
|
35324
|
+
case Mi:
|
|
35336
35325
|
l[c] = l[c] - (e[u] / 2 - n[u] / 2);
|
|
35337
35326
|
break;
|
|
35338
35327
|
case Gs:
|
|
@@ -35344,17 +35333,17 @@ function Ak(t) {
|
|
|
35344
35333
|
}
|
|
35345
35334
|
function Ks(t, e) {
|
|
35346
35335
|
e === void 0 && (e = {});
|
|
35347
|
-
var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, s = i === void 0 ? t.strategy : i, a = n.boundary, l = a === void 0 ? yI : a, c = n.rootBoundary, u = c === void 0 ? mk : c, d = n.elementContext, f = d === void 0 ?
|
|
35336
|
+
var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, s = i === void 0 ? t.strategy : i, a = n.boundary, l = a === void 0 ? yI : a, c = n.rootBoundary, u = c === void 0 ? mk : c, d = n.elementContext, f = d === void 0 ? Yi : d, p = n.altBoundary, h = p === void 0 ? !1 : p, m = n.padding, y = m === void 0 ? 0 : m, g = xk(typeof y != "number" ? y : kk(y, ua)), v = f === Yi ? wI : Yi, x = t.rects.popper, w = t.elements[h ? v : f], T = XI(Ro(w) ? w : w.contextElement || oo(t.elements.popper), l, u, s), O = _i(t.elements.reference), M = Ak({
|
|
35348
35337
|
reference: O,
|
|
35349
35338
|
element: x,
|
|
35350
35339
|
placement: o
|
|
35351
|
-
}), N = Of(Object.assign({}, x, M)), S = f ===
|
|
35340
|
+
}), N = Of(Object.assign({}, x, M)), S = f === Yi ? N : O, W = {
|
|
35352
35341
|
top: T.top - S.top + g.top,
|
|
35353
35342
|
bottom: S.bottom - T.bottom + g.bottom,
|
|
35354
35343
|
left: T.left - S.left + g.left,
|
|
35355
35344
|
right: S.right - T.right + g.right
|
|
35356
35345
|
}, oe = t.modifiersData.offset;
|
|
35357
|
-
if (f ===
|
|
35346
|
+
if (f === Yi && oe) {
|
|
35358
35347
|
var _ = oe[o];
|
|
35359
35348
|
Object.keys(W).forEach(function(V) {
|
|
35360
35349
|
var C = [In, _n].indexOf(V) >= 0 ? 1 : -1, G = [un, _n].indexOf(V) >= 0 ? "y" : "x";
|
|
@@ -35365,8 +35354,8 @@ function Ks(t, e) {
|
|
|
35365
35354
|
}
|
|
35366
35355
|
function YI(t, e) {
|
|
35367
35356
|
e === void 0 && (e = {});
|
|
35368
|
-
var n = e, r = n.placement, o = n.boundary, i = n.rootBoundary, s = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ? gk : l, u =
|
|
35369
|
-
return
|
|
35357
|
+
var n = e, r = n.placement, o = n.boundary, i = n.rootBoundary, s = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ? gk : l, u = Ii(r), d = u ? a ? Ew : Ew.filter(function(h) {
|
|
35358
|
+
return Ii(h) === u;
|
|
35370
35359
|
}) : ua, f = d.filter(function(h) {
|
|
35371
35360
|
return c.indexOf(h) >= 0;
|
|
35372
35361
|
});
|
|
@@ -35402,7 +35391,7 @@ function QI(t) {
|
|
|
35402
35391
|
allowedAutoPlacements: m
|
|
35403
35392
|
}) : ne);
|
|
35404
35393
|
}, []), T = e.rects.reference, O = e.rects.popper, M = /* @__PURE__ */ new Map(), N = !0, S = w[0], W = 0; W < w.length; W++) {
|
|
35405
|
-
var oe = w[W], _ = tr(oe), V =
|
|
35394
|
+
var oe = w[W], _ = tr(oe), V = Ii(oe) === Mi, C = [un, _n].indexOf(_) >= 0, G = C ? "width" : "height", se = Ks(e, {
|
|
35406
35395
|
placement: oe,
|
|
35407
35396
|
boundary: u,
|
|
35408
35397
|
rootBoundary: d,
|
|
@@ -35535,7 +35524,7 @@ function cN(t) {
|
|
|
35535
35524
|
rootBoundary: c,
|
|
35536
35525
|
padding: d,
|
|
35537
35526
|
altBoundary: u
|
|
35538
|
-
}), g = tr(e.placement), v =
|
|
35527
|
+
}), g = tr(e.placement), v = Ii(e.placement), x = !v, w = Jp(g), T = lN(w), O = e.modifiersData.popperOffsets, M = e.rects.reference, N = e.rects.popper, S = typeof m == "function" ? m(Object.assign({}, e.rects, {
|
|
35539
35528
|
placement: e.placement
|
|
35540
35529
|
})) : m, W = typeof S == "number" ? {
|
|
35541
35530
|
mainAxis: S,
|
|
@@ -35549,14 +35538,14 @@ function cN(t) {
|
|
|
35549
35538
|
};
|
|
35550
35539
|
if (O) {
|
|
35551
35540
|
if (i) {
|
|
35552
|
-
var V, C = w === "y" ? un : dn, G = w === "y" ? _n : In, se = w === "y" ? "height" : "width", U = O[w], ue = U + y[C], X = U - y[G], fe = p ? -N[se] / 2 : 0, Q = v ===
|
|
35541
|
+
var V, C = w === "y" ? un : dn, G = w === "y" ? _n : In, se = w === "y" ? "height" : "width", U = O[w], ue = U + y[C], X = U - y[G], fe = p ? -N[se] / 2 : 0, Q = v === Mi ? M[se] : N[se], F = v === Mi ? -N[se] : -M[se], Y = e.elements.arrow, Z = p && Y ? Kp(Y) : {
|
|
35553
35542
|
width: 0,
|
|
35554
35543
|
height: 0
|
|
35555
|
-
}, ne = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : vk(), K = ne[C], E = ne[G], A =
|
|
35544
|
+
}, ne = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : vk(), K = ne[C], E = ne[G], A = Cs(0, M[se], Z[se]), H = x ? M[se] / 2 - fe - A - K - W.mainAxis : Q - A - K - W.mainAxis, B = x ? -M[se] / 2 + fe + A + E + W.mainAxis : F + A + E + W.mainAxis, I = e.elements.arrow && da(e.elements.arrow), R = I ? w === "y" ? I.clientTop || 0 : I.clientLeft || 0 : 0, ae = (V = oe?.[w]) != null ? V : 0, k = U + H - ae - R, re = U + B - ae, ee = Cs(p ? Pl(ue, k) : ue, U, p ? To(X, re) : X);
|
|
35556
35545
|
O[w] = ee, _[w] = ee - U;
|
|
35557
35546
|
}
|
|
35558
35547
|
if (a) {
|
|
35559
|
-
var L, z = w === "x" ? un : dn, P = w === "x" ? _n : In, de = O[T], he = T === "y" ? "height" : "width", ie = de + y[z], me = de - y[P], le = [un, dn].indexOf(g) !== -1, ce = (L = oe?.[T]) != null ? L : 0, be = le ? ie : de - M[he] - N[he] - ce + W.altAxis, Re = le ? de + M[he] + N[he] - ce - W.altAxis : me, $e = p && le ? II(be, de, Re) :
|
|
35548
|
+
var L, z = w === "x" ? un : dn, P = w === "x" ? _n : In, de = O[T], he = T === "y" ? "height" : "width", ie = de + y[z], me = de - y[P], le = [un, dn].indexOf(g) !== -1, ce = (L = oe?.[T]) != null ? L : 0, be = le ? ie : de - M[he] - N[he] - ce + W.altAxis, Re = le ? de + M[he] + N[he] - ce - W.altAxis : me, $e = p && le ? II(be, de, Re) : Cs(p ? be : ie, de, p ? Re : me);
|
|
35560
35549
|
O[T] = $e, _[T] = $e - de;
|
|
35561
35550
|
}
|
|
35562
35551
|
e.modifiersData[r] = _;
|
|
@@ -35579,12 +35568,12 @@ function fN(t) {
|
|
|
35579
35568
|
return t === Sn(t) || !Dn(t) ? Xp(t) : dN(t);
|
|
35580
35569
|
}
|
|
35581
35570
|
function pN(t) {
|
|
35582
|
-
var e = t.getBoundingClientRect(), n =
|
|
35571
|
+
var e = t.getBoundingClientRect(), n = Di(e.width) / t.offsetWidth || 1, r = Di(e.height) / t.offsetHeight || 1;
|
|
35583
35572
|
return n !== 1 || r !== 1;
|
|
35584
35573
|
}
|
|
35585
35574
|
function hN(t, e, n) {
|
|
35586
35575
|
n === void 0 && (n = !1);
|
|
35587
|
-
var r = Dn(e), o = Dn(e) && pN(e), i = oo(e), s =
|
|
35576
|
+
var r = Dn(e), o = Dn(e) && pN(e), i = oo(e), s = _i(t, o, n), a = {
|
|
35588
35577
|
scrollLeft: 0,
|
|
35589
35578
|
scrollTop: 0
|
|
35590
35579
|
}, l = {
|
|
@@ -35592,7 +35581,7 @@ function hN(t, e, n) {
|
|
|
35592
35581
|
y: 0
|
|
35593
35582
|
};
|
|
35594
35583
|
return (r || !r && !n) && ((ir(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
35595
|
-
Zp(i)) && (a = fN(e)), Dn(e) ? (l =
|
|
35584
|
+
Zp(i)) && (a = fN(e)), Dn(e) ? (l = _i(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : i && (l.x = Yp(i))), {
|
|
35596
35585
|
x: s.left + a.scrollLeft - l.x,
|
|
35597
35586
|
y: s.top + a.scrollTop - l.y,
|
|
35598
35587
|
width: s.width,
|
|
@@ -35681,8 +35670,8 @@ function bN(t) {
|
|
|
35681
35670
|
setOptions: function(m) {
|
|
35682
35671
|
var y = typeof m == "function" ? m(c.options) : m;
|
|
35683
35672
|
h(), c.options = Object.assign({}, i, c.options, y), c.scrollParents = {
|
|
35684
|
-
reference: Ro(s) ?
|
|
35685
|
-
popper:
|
|
35673
|
+
reference: Ro(s) ? Es(s) : s.contextElement ? Es(s.contextElement) : [],
|
|
35674
|
+
popper: Es(a)
|
|
35686
35675
|
};
|
|
35687
35676
|
var g = gN(wN([].concat(r, c.options.modifiers)));
|
|
35688
35677
|
return c.orderedModifiers = g.filter(function(v) {
|
|
@@ -35825,7 +35814,7 @@ function Lw(t) {
|
|
|
35825
35814
|
return t[n] !== void 0 && (e[n] = t[n]), e;
|
|
35826
35815
|
}, {});
|
|
35827
35816
|
}
|
|
35828
|
-
function
|
|
35817
|
+
function Ts() {
|
|
35829
35818
|
return document.createElement("div");
|
|
35830
35819
|
}
|
|
35831
35820
|
function Js(t) {
|
|
@@ -36086,7 +36075,7 @@ function Df(t, e) {
|
|
|
36086
36075
|
t[GN()] = e;
|
|
36087
36076
|
}
|
|
36088
36077
|
function Uw(t) {
|
|
36089
|
-
var e =
|
|
36078
|
+
var e = Ts();
|
|
36090
36079
|
return t === !0 ? e.className = Ek : (e.className = Tk, Js(t) ? e.appendChild(t) : Df(e, t)), e;
|
|
36091
36080
|
}
|
|
36092
36081
|
function Vw(t, e) {
|
|
@@ -36108,9 +36097,9 @@ function _f(t) {
|
|
|
36108
36097
|
};
|
|
36109
36098
|
}
|
|
36110
36099
|
function Fk(t) {
|
|
36111
|
-
var e =
|
|
36100
|
+
var e = Ts(), n = Ts();
|
|
36112
36101
|
n.className = kN, n.setAttribute("data-state", "hidden"), n.setAttribute("tabindex", "-1");
|
|
36113
|
-
var r =
|
|
36102
|
+
var r = Ts();
|
|
36114
36103
|
r.className = Ck, r.setAttribute("data-state", "hidden"), Vw(r, t.props), e.appendChild(n), n.appendChild(r), o(t.props, t.props);
|
|
36115
36104
|
function o(i, s) {
|
|
36116
36105
|
var a = _f(e), l = a.box, c = a.content, u = a.arrow;
|
|
@@ -36139,7 +36128,7 @@ function JN(t, e) {
|
|
|
36139
36128
|
// properties
|
|
36140
36129
|
id: y,
|
|
36141
36130
|
reference: t,
|
|
36142
|
-
popper:
|
|
36131
|
+
popper: Ts(),
|
|
36143
36132
|
popperInstance: g,
|
|
36144
36133
|
props: n,
|
|
36145
36134
|
state: x,
|
|
@@ -36369,9 +36358,9 @@ function JN(t, e) {
|
|
|
36369
36358
|
fn: function(jn) {
|
|
36370
36359
|
var Dr = jn.state;
|
|
36371
36360
|
if (_()) {
|
|
36372
|
-
var Ec = G(),
|
|
36361
|
+
var Ec = G(), Gi = Ec.box;
|
|
36373
36362
|
["placement", "reference-hidden", "escaped"].forEach(function(Vo) {
|
|
36374
|
-
Vo === "placement" ?
|
|
36363
|
+
Vo === "placement" ? Gi.setAttribute("data-placement", Dr.placement) : Dr.attributes.popper["data-popper-" + Vo] ? Gi.setAttribute("data-" + Vo, "") : Gi.removeAttribute("data-" + Vo);
|
|
36375
36364
|
}), Dr.attributes.popper = {};
|
|
36376
36365
|
}
|
|
36377
36366
|
}
|
|
@@ -37297,7 +37286,7 @@ const Gw = (t) => {
|
|
|
37297
37286
|
}
|
|
37298
37287
|
},
|
|
37299
37288
|
setup(t) {
|
|
37300
|
-
const { proxy: e } =
|
|
37289
|
+
const { proxy: e } = Fi(), n = t, r = we(!1), o = Ae(() => ({
|
|
37301
37290
|
...n.toolbarItem,
|
|
37302
37291
|
active: r
|
|
37303
37292
|
})), i = () => {
|
|
@@ -37673,7 +37662,7 @@ const {
|
|
|
37673
37662
|
cB: tt,
|
|
37674
37663
|
cE: Xt,
|
|
37675
37664
|
cM: pt,
|
|
37676
|
-
cNotM:
|
|
37665
|
+
cNotM: $s
|
|
37677
37666
|
} = Uk, BR = (...t) => We(">", [tt(...t)]);
|
|
37678
37667
|
function Lr(t, e) {
|
|
37679
37668
|
return t + (e === "default" ? "" : e.replace(/^[a-z]/, (n) => n.toUpperCase()));
|
|
@@ -37705,7 +37694,7 @@ function n0(t) {
|
|
|
37705
37694
|
if (t != null)
|
|
37706
37695
|
return typeof t == "number" ? `${t}px` : t.endsWith("px") ? t : `${t}px`;
|
|
37707
37696
|
}
|
|
37708
|
-
function
|
|
37697
|
+
function gs(t, e) {
|
|
37709
37698
|
const n = t.trim().split(/\s+/g), r = {
|
|
37710
37699
|
top: n[0]
|
|
37711
37700
|
};
|
|
@@ -38266,23 +38255,23 @@ function Cr(t) {
|
|
|
38266
38255
|
};
|
|
38267
38256
|
}
|
|
38268
38257
|
function lL() {
|
|
38269
|
-
return
|
|
38258
|
+
return Fi() !== null;
|
|
38270
38259
|
}
|
|
38271
38260
|
const cL = typeof window < "u";
|
|
38272
|
-
let al,
|
|
38261
|
+
let al, Os;
|
|
38273
38262
|
const uL = () => {
|
|
38274
38263
|
var t, e;
|
|
38275
|
-
al = cL ? (e = (t = document) === null || t === void 0 ? void 0 : t.fonts) === null || e === void 0 ? void 0 : e.ready : void 0,
|
|
38276
|
-
|
|
38277
|
-
}) :
|
|
38264
|
+
al = cL ? (e = (t = document) === null || t === void 0 ? void 0 : t.fonts) === null || e === void 0 ? void 0 : e.ready : void 0, Os = !1, al !== void 0 ? al.then(() => {
|
|
38265
|
+
Os = !0;
|
|
38266
|
+
}) : Os = !0;
|
|
38278
38267
|
};
|
|
38279
38268
|
uL();
|
|
38280
38269
|
function dL(t) {
|
|
38281
|
-
if (
|
|
38270
|
+
if (Os)
|
|
38282
38271
|
return;
|
|
38283
38272
|
let e = !1;
|
|
38284
38273
|
An(() => {
|
|
38285
|
-
|
|
38274
|
+
Os || al?.then(() => {
|
|
38286
38275
|
e || t();
|
|
38287
38276
|
});
|
|
38288
38277
|
}), Bn(() => {
|
|
@@ -38382,7 +38371,7 @@ function mL(t = {}, e) {
|
|
|
38382
38371
|
})) : a(), dl(n);
|
|
38383
38372
|
}
|
|
38384
38373
|
const gL = "n-internal-select-menu-body", eh = "n-drawer-body", th = "n-modal-body", gc = "n-popover-body", Qk = "__disabled__";
|
|
38385
|
-
function
|
|
38374
|
+
function Ni(t) {
|
|
38386
38375
|
const e = vt(th, null), n = vt(eh, null), r = vt(gc, null), o = vt(gL, null), i = we();
|
|
38387
38376
|
if (typeof document < "u") {
|
|
38388
38377
|
i.value = document.fullscreenElement;
|
|
@@ -38403,8 +38392,8 @@ function Fi(t) {
|
|
|
38403
38392
|
return a !== void 0 ? a === !1 ? Qk : a === !0 ? i.value || "body" : a : e?.value ? (s = e.value.$el) !== null && s !== void 0 ? s : e.value : n?.value ? n.value : r?.value ? r.value : o?.value ? o.value : a ?? (i.value || "body");
|
|
38404
38393
|
});
|
|
38405
38394
|
}
|
|
38406
|
-
|
|
38407
|
-
|
|
38395
|
+
Ni.tdkey = Qk;
|
|
38396
|
+
Ni.propTo = {
|
|
38408
38397
|
type: [String, Object, Boolean],
|
|
38409
38398
|
default: void 0
|
|
38410
38399
|
};
|
|
@@ -38461,7 +38450,7 @@ function Bf(t, e = !0, n = []) {
|
|
|
38461
38450
|
return t.forEach((r) => {
|
|
38462
38451
|
if (r !== null) {
|
|
38463
38452
|
if (typeof r != "object") {
|
|
38464
|
-
(typeof r == "string" || typeof r == "number") && n.push(
|
|
38453
|
+
(typeof r == "string" || typeof r == "number") && n.push(gi(String(r)));
|
|
38465
38454
|
return;
|
|
38466
38455
|
}
|
|
38467
38456
|
if (Array.isArray(r)) {
|
|
@@ -38545,7 +38534,7 @@ const n3 = wt({
|
|
|
38545
38534
|
},
|
|
38546
38535
|
setup(t) {
|
|
38547
38536
|
var e;
|
|
38548
|
-
Rn("VBinder", (e =
|
|
38537
|
+
Rn("VBinder", (e = Fi()) === null || e === void 0 ? void 0 : e.proxy);
|
|
38549
38538
|
const n = vt("VBinder", null), r = we(null), o = (g) => {
|
|
38550
38539
|
r.value = g, n && t.syncTargetWithParent && n.setTargetRef(g);
|
|
38551
38540
|
};
|
|
@@ -39242,14 +39231,14 @@ var Mo = function(t) {
|
|
|
39242
39231
|
return !0;
|
|
39243
39232
|
}
|
|
39244
39233
|
return !1;
|
|
39245
|
-
},
|
|
39234
|
+
}, Ms = typeof window < "u" ? window : {}, La = /* @__PURE__ */ new WeakMap(), h0 = /auto|scroll/, VL = /^tb|vertical/, HL = /msie|trident/i.test(Ms.navigator && Ms.navigator.userAgent), Un = function(t) {
|
|
39246
39235
|
return parseFloat(t || "0");
|
|
39247
|
-
},
|
|
39236
|
+
}, mi = function(t, e, n) {
|
|
39248
39237
|
return t === void 0 && (t = 0), e === void 0 && (e = 0), n === void 0 && (n = !1), new qL((n ? e : t) || 0, (n ? t : e) || 0);
|
|
39249
39238
|
}, m0 = Mo({
|
|
39250
|
-
devicePixelContentBoxSize:
|
|
39251
|
-
borderBoxSize:
|
|
39252
|
-
contentBoxSize:
|
|
39239
|
+
devicePixelContentBoxSize: mi(),
|
|
39240
|
+
borderBoxSize: mi(),
|
|
39241
|
+
contentBoxSize: mi(),
|
|
39253
39242
|
contentRect: new s3(0, 0, 0, 0)
|
|
39254
39243
|
}), l3 = function(t, e) {
|
|
39255
39244
|
if (e === void 0 && (e = !1), La.has(t) && !e)
|
|
@@ -39257,9 +39246,9 @@ var Mo = function(t) {
|
|
|
39257
39246
|
if (a3(t))
|
|
39258
39247
|
return La.set(t, m0), m0;
|
|
39259
39248
|
var n = getComputedStyle(t), r = nh(t) && t.ownerSVGElement && t.getBBox(), o = !HL && n.boxSizing === "border-box", i = VL.test(n.writingMode || ""), s = !r && h0.test(n.overflowY || ""), a = !r && h0.test(n.overflowX || ""), l = r ? 0 : Un(n.paddingTop), c = r ? 0 : Un(n.paddingRight), u = r ? 0 : Un(n.paddingBottom), d = r ? 0 : Un(n.paddingLeft), f = r ? 0 : Un(n.borderTopWidth), p = r ? 0 : Un(n.borderRightWidth), h = r ? 0 : Un(n.borderBottomWidth), m = r ? 0 : Un(n.borderLeftWidth), y = d + c, g = l + u, v = m + p, x = f + h, w = a ? t.offsetHeight - x - t.clientHeight : 0, T = s ? t.offsetWidth - v - t.clientWidth : 0, O = o ? y + v : 0, M = o ? g + x : 0, N = r ? r.width : Un(n.width) - O - T, S = r ? r.height : Un(n.height) - M - w, W = N + y + T + v, oe = S + g + w + x, _ = Mo({
|
|
39260
|
-
devicePixelContentBoxSize:
|
|
39261
|
-
borderBoxSize:
|
|
39262
|
-
contentBoxSize:
|
|
39249
|
+
devicePixelContentBoxSize: mi(Math.round(N * devicePixelRatio), Math.round(S * devicePixelRatio), i),
|
|
39250
|
+
borderBoxSize: mi(W, oe, i),
|
|
39251
|
+
contentBoxSize: mi(N, S, i),
|
|
39263
39252
|
contentRect: new s3(d, l, N, S)
|
|
39264
39253
|
});
|
|
39265
39254
|
return La.set(t, _), _;
|
|
@@ -39380,16 +39369,16 @@ var Mo = function(t) {
|
|
|
39380
39369
|
var e = this, n = function() {
|
|
39381
39370
|
return e.observer && e.observer.observe(document.body, eB);
|
|
39382
39371
|
};
|
|
39383
|
-
document.body ? n() :
|
|
39372
|
+
document.body ? n() : Ms.addEventListener("DOMContentLoaded", n);
|
|
39384
39373
|
}, t.prototype.start = function() {
|
|
39385
39374
|
var e = this;
|
|
39386
39375
|
this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), y0.forEach(function(n) {
|
|
39387
|
-
return
|
|
39376
|
+
return Ms.addEventListener(n, e.listener, !0);
|
|
39388
39377
|
}));
|
|
39389
39378
|
}, t.prototype.stop = function() {
|
|
39390
39379
|
var e = this;
|
|
39391
39380
|
this.stopped || (this.observer && this.observer.disconnect(), y0.forEach(function(n) {
|
|
39392
|
-
return
|
|
39381
|
+
return Ms.removeEventListener(n, e.listener, !0);
|
|
39393
39382
|
}), this.stopped = !0);
|
|
39394
39383
|
}, t;
|
|
39395
39384
|
}(), Pf = new tB(), b0 = function(t) {
|
|
@@ -39485,7 +39474,7 @@ const x0 = new sB(), k0 = wt({
|
|
|
39485
39474
|
},
|
|
39486
39475
|
setup(t) {
|
|
39487
39476
|
let e = !1;
|
|
39488
|
-
const n =
|
|
39477
|
+
const n = Fi().proxy;
|
|
39489
39478
|
function r(o) {
|
|
39490
39479
|
const { onResize: i } = t;
|
|
39491
39480
|
i !== void 0 && i(o);
|
|
@@ -39555,7 +39544,7 @@ function aB(t) {
|
|
|
39555
39544
|
return !1;
|
|
39556
39545
|
}
|
|
39557
39546
|
}
|
|
39558
|
-
let
|
|
39547
|
+
let Zi = [];
|
|
39559
39548
|
const lB = wt({
|
|
39560
39549
|
name: "FocusTrap",
|
|
39561
39550
|
props: {
|
|
@@ -39578,7 +39567,7 @@ const lB = wt({
|
|
|
39578
39567
|
let o = !1, i = !1;
|
|
39579
39568
|
const s = typeof document > "u" ? null : document.activeElement;
|
|
39580
39569
|
function a() {
|
|
39581
|
-
return
|
|
39570
|
+
return Zi[Zi.length - 1] === e;
|
|
39582
39571
|
}
|
|
39583
39572
|
function l(y) {
|
|
39584
39573
|
var g;
|
|
@@ -39613,7 +39602,7 @@ const lB = wt({
|
|
|
39613
39602
|
function d() {
|
|
39614
39603
|
var y;
|
|
39615
39604
|
if (!t.disabled) {
|
|
39616
|
-
if (
|
|
39605
|
+
if (Zi.push(e), t.autoFocus) {
|
|
39617
39606
|
const { initialFocusTo: g } = t;
|
|
39618
39607
|
g === void 0 ? p("first") : (y = l0(g)) === null || y === void 0 || y.focus({ preventScroll: !0 });
|
|
39619
39608
|
}
|
|
@@ -39622,7 +39611,7 @@ const lB = wt({
|
|
|
39622
39611
|
}
|
|
39623
39612
|
function f() {
|
|
39624
39613
|
var y;
|
|
39625
|
-
if (t.disabled || (document.removeEventListener("focus", c, !0),
|
|
39614
|
+
if (t.disabled || (document.removeEventListener("focus", c, !0), Zi = Zi.filter((v) => v !== e), a()))
|
|
39626
39615
|
return;
|
|
39627
39616
|
const { finalFocusTo: g } = t;
|
|
39628
39617
|
g !== void 0 ? (y = l0(g)) === null || y === void 0 || y.focus({ preventScroll: !0 }) : t.returnFocusOnDeactivated && s instanceof HTMLElement && (i = !0, s.focus({ preventScroll: !0 }), i = !1);
|
|
@@ -39709,7 +39698,7 @@ function A0(t) {
|
|
|
39709
39698
|
right: n,
|
|
39710
39699
|
top: r,
|
|
39711
39700
|
bottom: o
|
|
39712
|
-
} =
|
|
39701
|
+
} = gs(t);
|
|
39713
39702
|
return `${r} ${e} ${o} ${n}`;
|
|
39714
39703
|
}
|
|
39715
39704
|
let fd;
|
|
@@ -39717,7 +39706,7 @@ function uB() {
|
|
|
39717
39706
|
return fd === void 0 && (fd = navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom")), fd;
|
|
39718
39707
|
}
|
|
39719
39708
|
const C0 = /* @__PURE__ */ new Set();
|
|
39720
|
-
function
|
|
39709
|
+
function Qi(t, e) {
|
|
39721
39710
|
const n = `[naive/${t}]: ${e}`;
|
|
39722
39711
|
C0.has(n) || (C0.add(n), console.error(n));
|
|
39723
39712
|
}
|
|
@@ -39742,7 +39731,7 @@ function zf(t, e = !0, n = []) {
|
|
|
39742
39731
|
return t.forEach((r) => {
|
|
39743
39732
|
if (r !== null) {
|
|
39744
39733
|
if (typeof r != "object") {
|
|
39745
|
-
(typeof r == "string" || typeof r == "number") && n.push(
|
|
39734
|
+
(typeof r == "string" || typeof r == "number") && n.push(gi(String(r)));
|
|
39746
39735
|
return;
|
|
39747
39736
|
}
|
|
39748
39737
|
if (Array.isArray(r)) {
|
|
@@ -39773,7 +39762,7 @@ function g3(t, e = [], n) {
|
|
|
39773
39762
|
}), Object.assign(r, n);
|
|
39774
39763
|
}
|
|
39775
39764
|
function Hl(t, ...e) {
|
|
39776
|
-
return typeof t == "function" ? t(...e) : typeof t == "string" ?
|
|
39765
|
+
return typeof t == "function" ? t(...e) : typeof t == "string" ? gi(t) : typeof t == "number" ? gi(String(t)) : null;
|
|
39777
39766
|
}
|
|
39778
39767
|
function rh(t) {
|
|
39779
39768
|
return t.some((e) => TS(e) ? !(e.type === tp || e.type === gt && !rh(e.children)) : !0) ? t : null;
|
|
@@ -39791,7 +39780,7 @@ const T0 = wt({
|
|
|
39791
39780
|
return (e = (t = this.$slots).default) === null || e === void 0 ? void 0 : e.call(t);
|
|
39792
39781
|
}
|
|
39793
39782
|
}), wc = "n-config-provider", hB = "n";
|
|
39794
|
-
function
|
|
39783
|
+
function Vi(t = {}, e = {
|
|
39795
39784
|
defaultBordered: !0
|
|
39796
39785
|
}) {
|
|
39797
39786
|
const n = vt(wc, null);
|
|
@@ -39836,7 +39825,7 @@ function bc(t, e, n, r) {
|
|
|
39836
39825
|
}), c = void 0;
|
|
39837
39826
|
};
|
|
39838
39827
|
};
|
|
39839
|
-
return
|
|
39828
|
+
return yi(() => {
|
|
39840
39829
|
d();
|
|
39841
39830
|
}), {
|
|
39842
39831
|
themeClass: a,
|
|
@@ -39845,16 +39834,16 @@ function bc(t, e, n, r) {
|
|
|
39845
39834
|
}
|
|
39846
39835
|
};
|
|
39847
39836
|
}
|
|
39848
|
-
var y3 = typeof ho == "object" && ho && ho.Object === Object && ho, mB = typeof self == "object" && self && self.Object === Object && self, cr = y3 || mB || Function("return this")(), eo = cr.Symbol, w3 = Object.prototype, gB = w3.hasOwnProperty, yB = w3.toString,
|
|
39837
|
+
var y3 = typeof ho == "object" && ho && ho.Object === Object && ho, mB = typeof self == "object" && self && self.Object === Object && self, cr = y3 || mB || Function("return this")(), eo = cr.Symbol, w3 = Object.prototype, gB = w3.hasOwnProperty, yB = w3.toString, es = eo ? eo.toStringTag : void 0;
|
|
39849
39838
|
function wB(t) {
|
|
39850
|
-
var e = gB.call(t,
|
|
39839
|
+
var e = gB.call(t, es), n = t[es];
|
|
39851
39840
|
try {
|
|
39852
|
-
t[
|
|
39841
|
+
t[es] = void 0;
|
|
39853
39842
|
var r = !0;
|
|
39854
39843
|
} catch {
|
|
39855
39844
|
}
|
|
39856
39845
|
var o = yB.call(t);
|
|
39857
|
-
return r && (e ? t[
|
|
39846
|
+
return r && (e ? t[es] = n : delete t[es]), o;
|
|
39858
39847
|
}
|
|
39859
39848
|
var bB = Object.prototype, vB = bB.toString;
|
|
39860
39849
|
function xB(t) {
|
|
@@ -40049,14 +40038,14 @@ var iP = 9007199254740991;
|
|
|
40049
40038
|
function ch(t) {
|
|
40050
40039
|
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= iP;
|
|
40051
40040
|
}
|
|
40052
|
-
function
|
|
40041
|
+
function Hi(t) {
|
|
40053
40042
|
return t != null && ch(t.length) && !sh(t);
|
|
40054
40043
|
}
|
|
40055
40044
|
function sP(t, e, n) {
|
|
40056
40045
|
if (!io(n))
|
|
40057
40046
|
return !1;
|
|
40058
40047
|
var r = typeof e;
|
|
40059
|
-
return (r == "number" ?
|
|
40048
|
+
return (r == "number" ? Hi(n) && ah(e, n.length) : r == "string" && e in n) ? pa(n[e], t) : !1;
|
|
40060
40049
|
}
|
|
40061
40050
|
function aP(t) {
|
|
40062
40051
|
return oP(function(e, n) {
|
|
@@ -40101,9 +40090,9 @@ function jP(t) {
|
|
|
40101
40090
|
return t(e);
|
|
40102
40091
|
};
|
|
40103
40092
|
}
|
|
40104
|
-
var S3 = typeof exports == "object" && exports && !exports.nodeType && exports,
|
|
40093
|
+
var S3 = typeof exports == "object" && exports && !exports.nodeType && exports, Ds = S3 && typeof module == "object" && module && !module.nodeType && module, qP = Ds && Ds.exports === S3, md = qP && y3.process, L0 = function() {
|
|
40105
40094
|
try {
|
|
40106
|
-
var t =
|
|
40095
|
+
var t = Ds && Ds.require && Ds.require("util").types;
|
|
40107
40096
|
return t || md && md.binding && md.binding("util");
|
|
40108
40097
|
} catch {
|
|
40109
40098
|
}
|
|
@@ -40133,7 +40122,7 @@ function KP(t) {
|
|
|
40133
40122
|
return e;
|
|
40134
40123
|
}
|
|
40135
40124
|
function fh(t) {
|
|
40136
|
-
return
|
|
40125
|
+
return Hi(t) ? A3(t) : KP(t);
|
|
40137
40126
|
}
|
|
40138
40127
|
function JP(t) {
|
|
40139
40128
|
var e = [];
|
|
@@ -40152,7 +40141,7 @@ function ZP(t) {
|
|
|
40152
40141
|
return n;
|
|
40153
40142
|
}
|
|
40154
40143
|
function E3(t) {
|
|
40155
|
-
return
|
|
40144
|
+
return Hi(t) ? A3(t, !0) : ZP(t);
|
|
40156
40145
|
}
|
|
40157
40146
|
var QP = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, e9 = /^\w*$/;
|
|
40158
40147
|
function ph(t, e) {
|
|
@@ -40699,7 +40688,7 @@ function n7(t, e) {
|
|
|
40699
40688
|
return function(n, r) {
|
|
40700
40689
|
if (n == null)
|
|
40701
40690
|
return n;
|
|
40702
|
-
if (!
|
|
40691
|
+
if (!Hi(n))
|
|
40703
40692
|
return t(n, r);
|
|
40704
40693
|
for (var o = n.length, i = -1, s = Object(n); ++i < o && r(s[i], i, s) !== !1; )
|
|
40705
40694
|
;
|
|
@@ -40711,7 +40700,7 @@ function Hf(t, e, n) {
|
|
|
40711
40700
|
(n !== void 0 && !pa(t[e], n) || n === void 0 && !(e in t)) && lh(t, e, n);
|
|
40712
40701
|
}
|
|
40713
40702
|
function o7(t) {
|
|
40714
|
-
return to(t) &&
|
|
40703
|
+
return to(t) && Hi(t);
|
|
40715
40704
|
}
|
|
40716
40705
|
function Wf(t, e) {
|
|
40717
40706
|
if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
|
|
@@ -40744,7 +40733,7 @@ function R3(t, e, n, r, o) {
|
|
|
40744
40733
|
}, E3);
|
|
40745
40734
|
}
|
|
40746
40735
|
function a7(t, e) {
|
|
40747
|
-
var n = -1, r =
|
|
40736
|
+
var n = -1, r = Hi(t) ? Array(t.length) : [];
|
|
40748
40737
|
return r7(t, function(o, i, s) {
|
|
40749
40738
|
r[++n] = e(o, i, s);
|
|
40750
40739
|
}), r;
|
|
@@ -40769,7 +40758,7 @@ function c7(t, e, n) {
|
|
|
40769
40758
|
if (l)
|
|
40770
40759
|
return l;
|
|
40771
40760
|
}), i = vt(wc, null), s = () => {
|
|
40772
|
-
|
|
40761
|
+
yi(() => {
|
|
40773
40762
|
const {
|
|
40774
40763
|
value: a
|
|
40775
40764
|
} = n, l = `${a}${t}Rtl`;
|
|
@@ -40988,7 +40977,7 @@ function zt(t) {
|
|
|
40988
40977
|
const e = Array.from(L3);
|
|
40989
40978
|
return e[3] = Number(t), Jk(g7, e);
|
|
40990
40979
|
}
|
|
40991
|
-
const
|
|
40980
|
+
const Wi = Object.assign(Object.assign({
|
|
40992
40981
|
name: "common"
|
|
40993
40982
|
}, Sc), {
|
|
40994
40983
|
baseColor: _e.neutralBase,
|
|
@@ -41115,7 +41104,7 @@ function b7(t) {
|
|
|
41115
41104
|
});
|
|
41116
41105
|
}
|
|
41117
41106
|
const v7 = {
|
|
41118
|
-
common:
|
|
41107
|
+
common: Wi,
|
|
41119
41108
|
self: b7
|
|
41120
41109
|
}, x7 = tt("scrollbar", `
|
|
41121
41110
|
overflow: hidden;
|
|
@@ -41232,7 +41221,7 @@ const v7 = {
|
|
|
41232
41221
|
mergedClsPrefixRef: e,
|
|
41233
41222
|
inlineThemeDisabled: n,
|
|
41234
41223
|
mergedRtlRef: r
|
|
41235
|
-
} =
|
|
41224
|
+
} = Vi(t), o = c7("Scrollbar", r, e), i = we(null), s = we(null), a = we(null), l = we(null), c = we(null), u = we(null), d = we(null), f = we(null), p = we(null), h = we(null), m = we(null), y = we(0), g = we(0), v = we(!1), x = we(!1);
|
|
41236
41225
|
let w = !1, T = !1, O, M, N = 0, S = 0, W = 0, oe = 0;
|
|
41237
41226
|
const _ = hL(), V = hn("Scrollbar", "-scrollbar", x7, v7, t, e), C = Ae(() => {
|
|
41238
41227
|
const {
|
|
@@ -41509,7 +41498,7 @@ const v7 = {
|
|
|
41509
41498
|
function D(q) {
|
|
41510
41499
|
q.preventDefault(), q.stopPropagation(), ut("mousemove", window, $, !0), ut("mouseup", window, D, !0), w = !1, ce(), be(q) && ee();
|
|
41511
41500
|
}
|
|
41512
|
-
|
|
41501
|
+
yi(() => {
|
|
41513
41502
|
const {
|
|
41514
41503
|
value: q
|
|
41515
41504
|
} = Y, {
|
|
@@ -41546,25 +41535,25 @@ const v7 = {
|
|
|
41546
41535
|
}
|
|
41547
41536
|
} = V.value, {
|
|
41548
41537
|
top: Ec,
|
|
41549
|
-
right:
|
|
41538
|
+
right: Gi,
|
|
41550
41539
|
bottom: Vo,
|
|
41551
41540
|
left: nS
|
|
41552
|
-
} =
|
|
41541
|
+
} = gs(Ne), {
|
|
41553
41542
|
top: rS,
|
|
41554
41543
|
right: oS,
|
|
41555
41544
|
bottom: iS,
|
|
41556
41545
|
left: sS
|
|
41557
|
-
} =
|
|
41546
|
+
} = gs(Ze), {
|
|
41558
41547
|
top: aS,
|
|
41559
41548
|
right: lS,
|
|
41560
41549
|
bottom: cS,
|
|
41561
41550
|
left: uS
|
|
41562
|
-
} =
|
|
41551
|
+
} = gs(o?.value ? A0(ft) : ft), {
|
|
41563
41552
|
top: dS,
|
|
41564
41553
|
right: fS,
|
|
41565
41554
|
bottom: pS,
|
|
41566
41555
|
left: hS
|
|
41567
|
-
} =
|
|
41556
|
+
} = gs(o?.value ? A0(jn) : jn);
|
|
41568
41557
|
return {
|
|
41569
41558
|
"--n-scrollbar-bezier": q,
|
|
41570
41559
|
"--n-scrollbar-color": te,
|
|
@@ -41573,7 +41562,7 @@ const v7 = {
|
|
|
41573
41562
|
"--n-scrollbar-width": Ee,
|
|
41574
41563
|
"--n-scrollbar-height": ke,
|
|
41575
41564
|
"--n-scrollbar-rail-top-horizontal-top": Ec,
|
|
41576
|
-
"--n-scrollbar-rail-right-horizontal-top":
|
|
41565
|
+
"--n-scrollbar-rail-right-horizontal-top": Gi,
|
|
41577
41566
|
"--n-scrollbar-rail-bottom-horizontal-top": Vo,
|
|
41578
41567
|
"--n-scrollbar-rail-left-horizontal-top": nS,
|
|
41579
41568
|
"--n-scrollbar-rail-top-horizontal-bottom": rS,
|
|
@@ -41658,7 +41647,7 @@ const v7 = {
|
|
|
41658
41647
|
}) : null
|
|
41659
41648
|
})), d = () => {
|
|
41660
41649
|
var p, h;
|
|
41661
|
-
return (p = this.onRender) === null || p === void 0 || p.call(this), ve("div",
|
|
41650
|
+
return (p = this.onRender) === null || p === void 0 || p.call(this), ve("div", Ri(this.$attrs, {
|
|
41662
41651
|
role: "none",
|
|
41663
41652
|
ref: "wrapperRef",
|
|
41664
41653
|
class: [`${n}-scrollbar`, this.themeClass, o && `${n}-scrollbar--rtl`],
|
|
@@ -42177,7 +42166,7 @@ function Y7(t) {
|
|
|
42177
42166
|
}
|
|
42178
42167
|
const yh = {
|
|
42179
42168
|
name: "Popover",
|
|
42180
|
-
common:
|
|
42169
|
+
common: Wi,
|
|
42181
42170
|
self: Y7
|
|
42182
42171
|
}, vd = {
|
|
42183
42172
|
top: "bottom",
|
|
@@ -42197,10 +42186,10 @@ const yh = {
|
|
|
42197
42186
|
`, [We(">", [tt("scrollbar", `
|
|
42198
42187
|
height: inherit;
|
|
42199
42188
|
max-height: inherit;
|
|
42200
|
-
`)]),
|
|
42189
|
+
`)]), $s("raw", `
|
|
42201
42190
|
background-color: var(--n-color);
|
|
42202
42191
|
border-radius: var(--n-border-radius);
|
|
42203
|
-
`, [
|
|
42192
|
+
`, [$s("scrollable", [$s("show-header-or-footer", "padding: var(--n-padding);")])]), Xt("header", `
|
|
42204
42193
|
padding: var(--n-padding);
|
|
42205
42194
|
border-bottom: 1px solid var(--n-divider-color);
|
|
42206
42195
|
transition: border-color .3s var(--n-bezier);
|
|
@@ -42327,7 +42316,7 @@ function Cn(t, e) {
|
|
|
42327
42316
|
`, [tt("popover-arrow", e)])])]);
|
|
42328
42317
|
}
|
|
42329
42318
|
const j3 = Object.assign(Object.assign({}, hn.props), {
|
|
42330
|
-
to:
|
|
42319
|
+
to: Ni.propTo,
|
|
42331
42320
|
show: Boolean,
|
|
42332
42321
|
trigger: String,
|
|
42333
42322
|
showArrow: Boolean,
|
|
@@ -42392,8 +42381,8 @@ const Q7 = wt({
|
|
|
42392
42381
|
namespaceRef: r,
|
|
42393
42382
|
mergedClsPrefixRef: o,
|
|
42394
42383
|
inlineThemeDisabled: i
|
|
42395
|
-
} =
|
|
42396
|
-
|
|
42384
|
+
} = Vi(t), s = hn("Popover", "-popover", Z7, yh, t, o), a = we(null), l = vt("NPopover"), c = we(null), u = we(t.show), d = we(!1);
|
|
42385
|
+
yi(() => {
|
|
42397
42386
|
const {
|
|
42398
42387
|
show: M
|
|
42399
42388
|
} = t;
|
|
@@ -42545,7 +42534,7 @@ const Q7 = wt({
|
|
|
42545
42534
|
}) : null;
|
|
42546
42535
|
return [U, ue];
|
|
42547
42536
|
};
|
|
42548
|
-
M = ve("div",
|
|
42537
|
+
M = ve("div", Ri({
|
|
42549
42538
|
class: [`${S}-popover`, `${S}-popover-shared`, m?.themeClass.value, W.map((C) => `${S}-${C}`), {
|
|
42550
42539
|
[`${S}-popover--scrollable`]: t.scrollable,
|
|
42551
42540
|
[`${S}-popover--show-header-or-footer`]: _,
|
|
@@ -42574,7 +42563,7 @@ const Q7 = wt({
|
|
|
42574
42563
|
isMounted: l.isMountedRef,
|
|
42575
42564
|
zIndex: l.zIndexRef,
|
|
42576
42565
|
followerRef: a,
|
|
42577
|
-
adjustedTo:
|
|
42566
|
+
adjustedTo: Ni(t),
|
|
42578
42567
|
followerEnabled: u,
|
|
42579
42568
|
renderContentNode: O
|
|
42580
42569
|
};
|
|
@@ -42593,7 +42582,7 @@ const Q7 = wt({
|
|
|
42593
42582
|
containerClass: this.namespace,
|
|
42594
42583
|
overlap: this.overlap,
|
|
42595
42584
|
width: this.width === "trigger" ? "target" : void 0,
|
|
42596
|
-
teleportDisabled: this.adjustedTo ===
|
|
42585
|
+
teleportDisabled: this.adjustedTo === Ni.tdkey
|
|
42597
42586
|
}, {
|
|
42598
42587
|
default: () => this.animated ? ve(fl, {
|
|
42599
42588
|
name: "popover-transition",
|
|
@@ -42686,7 +42675,7 @@ const Ac = {
|
|
|
42686
42675
|
default: !0
|
|
42687
42676
|
},
|
|
42688
42677
|
zIndex: Number,
|
|
42689
|
-
to:
|
|
42678
|
+
to: Ni.propTo,
|
|
42690
42679
|
scrollable: Boolean,
|
|
42691
42680
|
contentClass: String,
|
|
42692
42681
|
contentStyle: [Object, String],
|
|
@@ -42729,8 +42718,8 @@ const Ac = {
|
|
|
42729
42718
|
slots: Object,
|
|
42730
42719
|
__popover__: !0,
|
|
42731
42720
|
setup(t) {
|
|
42732
|
-
Te.env.NODE_ENV !== "production" &&
|
|
42733
|
-
t.maxWidth !== void 0 &&
|
|
42721
|
+
Te.env.NODE_ENV !== "production" && yi(() => {
|
|
42722
|
+
t.maxWidth !== void 0 && Qi("popover", "`max-width` is deprecated, please use `style` instead."), t.minWidth !== void 0 && Qi("popover", "`min-width` is deprecated, please use `style` instead."), t.arrow !== void 0 && Qi("popover", "`arrow` is deprecated, please use `showArrow` instead."), t.onHide !== void 0 && Qi("popover", "`on-hide` is deprecated, please use `on-update:show` instead."), t.onShow !== void 0 && Qi("popover", "`on-show` is deprecated, please use `on-update:show` instead.");
|
|
42734
42723
|
});
|
|
42735
42724
|
const e = Zk(), n = we(null), r = Ae(() => t.show), o = we(t.defaultShow), i = Yk(r, o), s = Cr(() => t.disabled ? !1 : i.value), a = () => {
|
|
42736
42725
|
if (t.disabled) return !0;
|
|
@@ -42843,7 +42832,7 @@ const Ac = {
|
|
|
42843
42832
|
zIndexRef: Rt(t, "zIndex"),
|
|
42844
42833
|
extraClassRef: Rt(t, "internalExtraClass"),
|
|
42845
42834
|
internalRenderBodyRef: Rt(t, "internalRenderBody")
|
|
42846
|
-
}),
|
|
42835
|
+
}), yi(() => {
|
|
42847
42836
|
i.value && a() && m(!1);
|
|
42848
42837
|
}), {
|
|
42849
42838
|
binderInstRef: n,
|
|
@@ -43040,7 +43029,7 @@ function ij(t) {
|
|
|
43040
43029
|
});
|
|
43041
43030
|
}
|
|
43042
43031
|
const sj = {
|
|
43043
|
-
common:
|
|
43032
|
+
common: Wi,
|
|
43044
43033
|
peers: {
|
|
43045
43034
|
Popover: yh
|
|
43046
43035
|
},
|
|
@@ -43062,7 +43051,7 @@ function lj(t) {
|
|
|
43062
43051
|
});
|
|
43063
43052
|
}
|
|
43064
43053
|
const cj = {
|
|
43065
|
-
common:
|
|
43054
|
+
common: Wi,
|
|
43066
43055
|
peers: {
|
|
43067
43056
|
Popover: yh
|
|
43068
43057
|
},
|
|
@@ -43075,7 +43064,7 @@ const cj = {
|
|
|
43075
43064
|
setup(t) {
|
|
43076
43065
|
const {
|
|
43077
43066
|
mergedClsPrefixRef: e
|
|
43078
|
-
} =
|
|
43067
|
+
} = Vi(t), n = hn("Tooltip", "-tooltip", void 0, cj, t, e), r = we(null);
|
|
43079
43068
|
return Object.assign(Object.assign({}, {
|
|
43080
43069
|
syncPosition() {
|
|
43081
43070
|
r.value.syncPosition();
|
|
@@ -43196,7 +43185,7 @@ function pj(t) {
|
|
|
43196
43185
|
};
|
|
43197
43186
|
}
|
|
43198
43187
|
const hj = {
|
|
43199
|
-
common:
|
|
43188
|
+
common: Wi,
|
|
43200
43189
|
self: pj
|
|
43201
43190
|
}, mj = tt("icon", `
|
|
43202
43191
|
height: 1em;
|
|
@@ -43231,7 +43220,7 @@ const hj = {
|
|
|
43231
43220
|
const {
|
|
43232
43221
|
mergedClsPrefixRef: e,
|
|
43233
43222
|
inlineThemeDisabled: n
|
|
43234
|
-
} =
|
|
43223
|
+
} = Vi(t), r = hn("Icon", "-icon", mj, hj, t, e), o = Ae(() => {
|
|
43235
43224
|
const {
|
|
43236
43225
|
depth: s
|
|
43237
43226
|
} = t, {
|
|
@@ -43284,7 +43273,7 @@ const hj = {
|
|
|
43284
43273
|
onRender: i,
|
|
43285
43274
|
themeClass: s
|
|
43286
43275
|
} = this;
|
|
43287
|
-
return !((t = e?.$options) === null || t === void 0) && t._n_icon__ && Vl("icon", "don't wrap `n-icon` inside `n-icon`"), i?.(), ve("i",
|
|
43276
|
+
return !((t = e?.$options) === null || t === void 0) && t._n_icon__ && Vl("icon", "don't wrap `n-icon` inside `n-icon`"), i?.(), ve("i", Ri(this.$attrs, {
|
|
43288
43277
|
role: "img",
|
|
43289
43278
|
class: [`${r}-icon`, s, {
|
|
43290
43279
|
[`${r}-icon--depth`]: n,
|
|
@@ -43495,7 +43484,7 @@ const W3 = wt({
|
|
|
43495
43484
|
}, y = d?.(r), g = ve("div", Object.assign({
|
|
43496
43485
|
class: [`${i}-dropdown-option`, y?.class],
|
|
43497
43486
|
"data-dropdown-option": !0
|
|
43498
|
-
}, y), ve("div",
|
|
43487
|
+
}, y), ve("div", Ri(m, f), [ve("div", {
|
|
43499
43488
|
class: [`${i}-dropdown-option-body__prefix`, s && `${i}-dropdown-option-body__prefix--show-icon`]
|
|
43500
43489
|
}, [c ? c(r) : Hl(r.icon)]), ve("div", {
|
|
43501
43490
|
"data-dropdown-option": !0,
|
|
@@ -43738,7 +43727,7 @@ const W3 = wt({
|
|
|
43738
43727
|
right: 4px;
|
|
43739
43728
|
transition: background-color .3s var(--n-bezier);
|
|
43740
43729
|
border-radius: var(--n-border-radius);
|
|
43741
|
-
`),
|
|
43730
|
+
`), $s("disabled", [pt("pending", `
|
|
43742
43731
|
color: var(--n-option-text-color-hover);
|
|
43743
43732
|
`, [Xt("prefix, suffix", `
|
|
43744
43733
|
color: var(--n-option-text-color-hover);
|
|
@@ -43810,7 +43799,7 @@ const W3 = wt({
|
|
|
43810
43799
|
`), We(">", [tt("scrollbar", `
|
|
43811
43800
|
height: inherit;
|
|
43812
43801
|
max-height: inherit;
|
|
43813
|
-
`)]),
|
|
43802
|
+
`)]), $s("scrollable", `
|
|
43814
43803
|
padding: var(--n-padding);
|
|
43815
43804
|
`), pt("scrollable", [Xt("content", `
|
|
43816
43805
|
padding: var(--n-padding);
|
|
@@ -43913,7 +43902,7 @@ const W3 = wt({
|
|
|
43913
43902
|
const {
|
|
43914
43903
|
mergedClsPrefixRef: f,
|
|
43915
43904
|
inlineThemeDisabled: p
|
|
43916
|
-
} =
|
|
43905
|
+
} = Vi(t), h = hn("Dropdown", "-dropdown", kj, sj, t, f);
|
|
43917
43906
|
Rn(Cc, {
|
|
43918
43907
|
labelFieldRef: Rt(t, "labelField"),
|
|
43919
43908
|
childrenFieldRef: Rt(t, "childrenField"),
|
|
@@ -44087,7 +44076,7 @@ const W3 = wt({
|
|
|
44087
44076
|
onMouseenter: s,
|
|
44088
44077
|
onMouseleave: a
|
|
44089
44078
|
};
|
|
44090
|
-
return ve(G3,
|
|
44079
|
+
return ve(G3, Ri(this.$attrs, f, d));
|
|
44091
44080
|
}, {
|
|
44092
44081
|
mergedTheme: e
|
|
44093
44082
|
} = this, n = {
|
|
@@ -44124,7 +44113,7 @@ function Tj(t) {
|
|
|
44124
44113
|
};
|
|
44125
44114
|
}
|
|
44126
44115
|
const $j = {
|
|
44127
|
-
common:
|
|
44116
|
+
common: Wi,
|
|
44128
44117
|
self: Tj
|
|
44129
44118
|
}, Oj = We([tt("skeleton", `
|
|
44130
44119
|
height: 1em;
|
|
@@ -44175,7 +44164,7 @@ const $j = {
|
|
|
44175
44164
|
bL();
|
|
44176
44165
|
const {
|
|
44177
44166
|
mergedClsPrefixRef: e
|
|
44178
|
-
} =
|
|
44167
|
+
} = Vi(t), n = hn("Skeleton", "-skeleton", Oj, $j, t, e);
|
|
44179
44168
|
return {
|
|
44180
44169
|
mergedClsPrefix: e,
|
|
44181
44170
|
style: Ae(() => {
|
|
@@ -44222,7 +44211,7 @@ const $j = {
|
|
|
44222
44211
|
style: e,
|
|
44223
44212
|
mergedClsPrefix: n,
|
|
44224
44213
|
$attrs: r
|
|
44225
|
-
} = this, o = ve("div",
|
|
44214
|
+
} = this, o = ve("div", Ri({
|
|
44226
44215
|
class: `${n}-skeleton`,
|
|
44227
44216
|
style: e
|
|
44228
44217
|
}, r));
|
|
@@ -44319,7 +44308,7 @@ const $j = {
|
|
|
44319
44308
|
]),
|
|
44320
44309
|
default: Tc(() => [
|
|
44321
44310
|
x.tooltip ? (Se(), Ce("div", Dj, [
|
|
44322
|
-
|
|
44311
|
+
gi(an(x.tooltip) + " ", 1),
|
|
44323
44312
|
x.disabled.value ? (Se(), Ce("span", _j, "(disabled)")) : st("", !0)
|
|
44324
44313
|
])) : st("", !0)
|
|
44325
44314
|
]),
|
|
@@ -44337,7 +44326,7 @@ const $j = {
|
|
|
44337
44326
|
__name: "Toolbar",
|
|
44338
44327
|
emits: ["command", "toggle", "select"],
|
|
44339
44328
|
setup(t, { emit: e }) {
|
|
44340
|
-
const { proxy: n } =
|
|
44329
|
+
const { proxy: n } = Fi();
|
|
44341
44330
|
let r = we(1);
|
|
44342
44331
|
const o = n.$toolbar.config?.toolbarGroups?.includes("left"), i = n.$toolbar.config?.toolbarGroups?.includes("right"), s = n.$toolbar.config?.toolbarButtonsExclude || [], a = (u) => n.$toolbar.getToolbarItemByGroup(u).filter((d) => !s.includes(d.name.value));
|
|
44343
44332
|
An(() => {
|
|
@@ -44647,7 +44636,7 @@ const Je = (t) => {
|
|
|
44647
44636
|
},
|
|
44648
44637
|
emits: ["submit", "cancel"],
|
|
44649
44638
|
setup(t, { emit: e }) {
|
|
44650
|
-
const n = e, r = t, { proxy: o } =
|
|
44639
|
+
const n = e, r = t, { proxy: o } = Fi(), i = () => {
|
|
44651
44640
|
if (o?.$submit instanceof Function && o.$submit(), c.value && d.value) {
|
|
44652
44641
|
n("submit", { text: l.value, href: u.value });
|
|
44653
44642
|
return;
|
|
@@ -44712,7 +44701,7 @@ const Je = (t) => {
|
|
|
44712
44701
|
class: "remove-btn__icon",
|
|
44713
44702
|
innerHTML: ze(vn).removeLink
|
|
44714
44703
|
}, null, 8, iq),
|
|
44715
|
-
w[3] || (w[3] =
|
|
44704
|
+
w[3] || (w[3] = gi(" Remove "))
|
|
44716
44705
|
])) : st("", !0),
|
|
44717
44706
|
h.value ? (Se(), Ce("button", {
|
|
44718
44707
|
key: 1,
|
|
@@ -45792,7 +45781,7 @@ const Je = (t) => {
|
|
|
45792
45781
|
}
|
|
45793
45782
|
);
|
|
45794
45783
|
};
|
|
45795
|
-
var Jt, Z3,
|
|
45784
|
+
var Jt, Z3, ys, Yf, Q3, eS, Zf, tS, li;
|
|
45796
45785
|
class KU extends Pj {
|
|
45797
45786
|
constructor(e) {
|
|
45798
45787
|
super(), sb(this, Jt), ib(this, "config", {
|
|
@@ -45805,7 +45794,7 @@ class KU extends Pj {
|
|
|
45805
45794
|
excludeItems: [],
|
|
45806
45795
|
groups: null,
|
|
45807
45796
|
editor: null
|
|
45808
|
-
}), sb(this,
|
|
45797
|
+
}), sb(this, ys, {
|
|
45809
45798
|
setZoom: ({ item: r, argument: o }) => {
|
|
45810
45799
|
if (!o) return;
|
|
45811
45800
|
r.onActivate({ zoom: o }), this.emit("superdoc-command", { item: r, argument: o });
|
|
@@ -45905,7 +45894,7 @@ class KU extends Pj {
|
|
|
45905
45894
|
}
|
|
45906
45895
|
setZoom(e) {
|
|
45907
45896
|
const n = [...this.toolbarItems, ...this.overflowItems].find((r) => r.name.value === "zoom");
|
|
45908
|
-
xd(this,
|
|
45897
|
+
xd(this, ys).setZoom({ item: n, argument: e });
|
|
45909
45898
|
}
|
|
45910
45899
|
/**
|
|
45911
45900
|
* The toolbar expects an active Super Editor instance.
|
|
@@ -45949,8 +45938,8 @@ class KU extends Pj {
|
|
|
45949
45938
|
emitCommand({ item: e, argument: n }) {
|
|
45950
45939
|
const { command: r } = e;
|
|
45951
45940
|
if (r) {
|
|
45952
|
-
if (this.log("(emmitCommand) Command:", r, e, n), r in xd(this,
|
|
45953
|
-
return xd(this,
|
|
45941
|
+
if (this.log("(emmitCommand) Command:", r, e, n), r in xd(this, ys))
|
|
45942
|
+
return xd(this, ys)[r]({ item: e, argument: n });
|
|
45954
45943
|
if (r in this.activeEditor?.commands)
|
|
45955
45944
|
this.activeEditor.commands[r](n), this.updateToolbarState();
|
|
45956
45945
|
else
|
|
@@ -45960,7 +45949,7 @@ class KU extends Pj {
|
|
|
45960
45949
|
}
|
|
45961
45950
|
Jt = /* @__PURE__ */ new WeakSet(), Z3 = function() {
|
|
45962
45951
|
this.config.groups && !Array.isArray(this.config.groups) && Object.keys(this.config.groups).length && (this.config.toolbarGroups = Object.keys(this.config.groups));
|
|
45963
|
-
},
|
|
45952
|
+
}, ys = /* @__PURE__ */ new WeakMap(), Yf = function(t, e, n = !1) {
|
|
45964
45953
|
const r = document.documentElement.clientWidth, { defaultItems: o, overflowItems: i } = Uq(t, n, r, this.role, e);
|
|
45965
45954
|
let s = [
|
|
45966
45955
|
...o.map((l) => l.name.value),
|