@harbour-enterprises/superdoc 0.9.33 → 0.10.2
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-8ZIOYegI.es.js +1676 -0
- package/dist/chunks/index-C4-w9MLl.cjs +1 -0
- package/dist/chunks/{index--PIRPKWt.cjs → index-ChNh-3hE.cjs} +1 -1
- package/dist/chunks/{index-B5GDfEJg.es.js → index-DlBXCtmW.es.js} +1 -1
- package/dist/chunks/{super-editor.es-B8noCvT1.es.js → super-editor.es-BJjuGvyp.es.js} +453 -465
- package/dist/chunks/{super-editor.es-y2QD_ueu.cjs → super-editor.es-BR6yWvHn.cjs} +40 -40
- package/dist/chunks/{url-BDmRlERW.es.js → url-B0oWkmAx.es.js} +1 -1
- package/dist/chunks/{url-C5DCBLAS.cjs → url-CzUL97Mg.cjs} +1 -1
- package/dist/chunks/xml-js-DLnxZypp.es.js +1764 -0
- package/dist/chunks/xml-js-zfoNze4t.cjs +10 -0
- package/dist/super-editor/chunks/{converter-CdhiEvSA.js → converter-C35FY5VQ.js} +4 -6
- package/dist/super-editor/chunks/{docx-zipper-Cb4eXMOp.js → docx-zipper-UI40aP31.js} +1 -1
- package/dist/super-editor/chunks/{editor-Czx51mKu.js → editor-CO6h1K8S.js} +302 -312
- package/dist/super-editor/chunks/{toolbar-BE-PZVKR.js → toolbar-CM60amWZ.js} +2 -2
- package/dist/super-editor/converter.es.js +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/tests/e2e/test-app/vite.config.d.ts +1 -1
- 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 +878 -890
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/index-Bq_aNm9n.es.js +0 -473
- package/dist/chunks/index-DrgTIkvI.cjs +0 -1
- package/dist/chunks/xml-js-DMX8C2aY.es.js +0 -2965
- package/dist/chunks/xml-js-DN6JJ8Mw.cjs +0 -10
- package/dist/super-editor/tests/e2e/test-app/dist/assets/index-DX0vnkoa.d.ts +0 -3
- package/dist/super-editor/tests/e2e/test-app/dist/assets/index-DX0vnkoa.d.ts.map +0 -1
|
@@ -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
|
}
|
|
@@ -13650,7 +13648,7 @@ const HE = (t, e) => ({
|
|
|
13650
13648
|
colgroupValues: f
|
|
13651
13649
|
};
|
|
13652
13650
|
};
|
|
13653
|
-
function
|
|
13651
|
+
function zi(t) {
|
|
13654
13652
|
const { type: e } = t.node || {}, n = {
|
|
13655
13653
|
doc: r4,
|
|
13656
13654
|
body: t4,
|
|
@@ -13678,17 +13676,17 @@ function t4(t) {
|
|
|
13678
13676
|
if (t.converter) {
|
|
13679
13677
|
const n = t.converter.pageStyles.pageMargins, r = e.elements.find((i) => i.name === "w:pgMar"), { attributes: o } = r;
|
|
13680
13678
|
Object.entries(n).forEach(([i, s]) => {
|
|
13681
|
-
const a =
|
|
13679
|
+
const a = xi(s);
|
|
13682
13680
|
o[`w:${i}`] = a;
|
|
13683
13681
|
}), r.attributes = o;
|
|
13684
13682
|
}
|
|
13685
13683
|
return {
|
|
13686
13684
|
name: "w:body",
|
|
13687
|
-
elements: [...
|
|
13685
|
+
elements: [...ji(t), e]
|
|
13688
13686
|
};
|
|
13689
13687
|
}
|
|
13690
13688
|
function Hv(t) {
|
|
13691
|
-
const e =
|
|
13689
|
+
const e = ji(t), n = e.find((i) => i.name === "htmlAnnotation");
|
|
13692
13690
|
if (e.length === 1 && n)
|
|
13693
13691
|
return n.elements;
|
|
13694
13692
|
const r = n4(t.node);
|
|
@@ -13715,7 +13713,7 @@ function n4(t) {
|
|
|
13715
13713
|
}
|
|
13716
13714
|
if (i) {
|
|
13717
13715
|
const { left: d, right: f, firstLine: p, hanging: h } = i, m = {};
|
|
13718
|
-
(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"] =
|
|
13716
|
+
(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));
|
|
13719
13717
|
const y = {
|
|
13720
13718
|
name: "w:ind",
|
|
13721
13719
|
attributes: m
|
|
@@ -13725,7 +13723,7 @@ function n4(t) {
|
|
|
13725
13723
|
const d = {
|
|
13726
13724
|
name: "w:ind",
|
|
13727
13725
|
attributes: {
|
|
13728
|
-
"w:left":
|
|
13726
|
+
"w:left": xi(a)
|
|
13729
13727
|
}
|
|
13730
13728
|
};
|
|
13731
13729
|
n.push(d);
|
|
@@ -13759,16 +13757,16 @@ function r4(t) {
|
|
|
13759
13757
|
};
|
|
13760
13758
|
return [{
|
|
13761
13759
|
name: "w:document",
|
|
13762
|
-
elements: [
|
|
13760
|
+
elements: [zi({ ...t, node: e })],
|
|
13763
13761
|
attributes: FE
|
|
13764
13762
|
}, t];
|
|
13765
13763
|
}
|
|
13766
|
-
function
|
|
13764
|
+
function ji(t) {
|
|
13767
13765
|
const { content: e } = t.node;
|
|
13768
13766
|
if (!e) return [];
|
|
13769
13767
|
const n = [];
|
|
13770
13768
|
return e.forEach((r) => {
|
|
13771
|
-
const o =
|
|
13769
|
+
const o = zi({ ...t, node: r });
|
|
13772
13770
|
o instanceof Array ? n.push(...o) : n.push(o);
|
|
13773
13771
|
}), n.filter((r) => r);
|
|
13774
13772
|
}
|
|
@@ -13805,7 +13803,7 @@ function i4(t) {
|
|
|
13805
13803
|
function s4(t) {
|
|
13806
13804
|
const { node: e } = t, n = e.marks, r = [Wt, yt, $t], o = n.find((l) => r.includes(l.type)), i = o.type === Wt, s = i4(n);
|
|
13807
13805
|
e.marks = n.filter((l) => !r.includes(l.type)), s && e.marks.push(s);
|
|
13808
|
-
const a =
|
|
13806
|
+
const a = zi({ ...t, node: e });
|
|
13809
13807
|
if (!i) {
|
|
13810
13808
|
const l = a.elements.find((c) => c.name === "w:t");
|
|
13811
13809
|
l.name = "w:delText";
|
|
@@ -13845,7 +13843,7 @@ function a4(t) {
|
|
|
13845
13843
|
const { node: e } = t, n = e.marks.find((s) => s.type === "link"), r = n.attrs.href;
|
|
13846
13844
|
let o = n.attrs.rId;
|
|
13847
13845
|
o || (o = Gv(t, r)), e.marks = e.marks.filter((s) => s.type !== "link");
|
|
13848
|
-
const i =
|
|
13846
|
+
const i = zi({ ...t, node: e });
|
|
13849
13847
|
return {
|
|
13850
13848
|
name: "w:hyperlink",
|
|
13851
13849
|
type: "element",
|
|
@@ -13890,7 +13888,7 @@ function Pg(t) {
|
|
|
13890
13888
|
...h.attrs,
|
|
13891
13889
|
...o.attrs
|
|
13892
13890
|
};
|
|
13893
|
-
const m =
|
|
13891
|
+
const m = zi({ ...t, node: h });
|
|
13894
13892
|
m.elements || (m.elements = []);
|
|
13895
13893
|
const y = m.elements.findIndex((x) => x.name === "w:pPr");
|
|
13896
13894
|
if (!m.elements.filter((x) => x.name !== "w:pPr").length) {
|
|
@@ -13992,7 +13990,7 @@ function d4(t) {
|
|
|
13992
13990
|
}
|
|
13993
13991
|
function f4(t) {
|
|
13994
13992
|
t.node = p4(t.node, t);
|
|
13995
|
-
const e =
|
|
13993
|
+
const e = ji(t), n = m4(t.node), r = y4(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 y4(t, e) {
|
|
|
14133
14131
|
};
|
|
14134
14132
|
}
|
|
14135
14133
|
function w4(t) {
|
|
14136
|
-
const e =
|
|
14134
|
+
const e = ji(t), n = b4(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 b4(t) {
|
|
|
14156
14154
|
};
|
|
14157
14155
|
}
|
|
14158
14156
|
function v4(t) {
|
|
14159
|
-
const e =
|
|
14157
|
+
const e = ji({
|
|
14160
14158
|
...t,
|
|
14161
14159
|
tableCell: t.node
|
|
14162
14160
|
}), n = x4(t.node);
|
|
@@ -14168,7 +14166,7 @@ function v4(t) {
|
|
|
14168
14166
|
function x4(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 } = A4(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 } = C4(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 } = I4(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,7 @@ function T4(t) {
|
|
|
14522
14520
|
}).doc.toJSON();
|
|
14523
14521
|
return {
|
|
14524
14522
|
name: "htmlAnnotation",
|
|
14525
|
-
elements:
|
|
14523
|
+
elements: ji({
|
|
14526
14524
|
node: r
|
|
14527
14525
|
})
|
|
14528
14526
|
};
|
|
@@ -14931,7 +14929,7 @@ const H4 = {
|
|
|
14931
14929
|
handlerName: "drawingNodeHandler",
|
|
14932
14930
|
handler: V4
|
|
14933
14931
|
};
|
|
14934
|
-
function
|
|
14932
|
+
function ki(t, e = [], n = null) {
|
|
14935
14933
|
const r = [], o = /* @__PURE__ */ new Set();
|
|
14936
14934
|
return t?.elements?.forEach((i) => {
|
|
14937
14935
|
const s = Io.markTypes.filter((a) => a.name === i.name);
|
|
@@ -14972,7 +14970,7 @@ function W4(t, e) {
|
|
|
14972
14970
|
date: r["w:date"],
|
|
14973
14971
|
author: r["w:author"],
|
|
14974
14972
|
authorEmail: r["w:authorEmail"]
|
|
14975
|
-
}, i =
|
|
14973
|
+
}, i = ki(n);
|
|
14976
14974
|
return [{ type: $t, attrs: { ...o, before: i, after: [...e] } }];
|
|
14977
14975
|
}
|
|
14978
14976
|
function jd(t) {
|
|
@@ -15021,9 +15019,9 @@ function X4(t) {
|
|
|
15021
15019
|
function Y4(t) {
|
|
15022
15020
|
return t["w:fill"] ? `#${t["w:fill"]}` : _E(t?.["w:val"]) ? `#${t["w:val"]}` : DE(t?.["w:val"]) || null;
|
|
15023
15021
|
}
|
|
15024
|
-
function
|
|
15022
|
+
function qi(t, e) {
|
|
15025
15023
|
const n = [], r = [], { attributes: o = {}, elements: i = [] } = t, { nodes: s, paragraphProperties: a = {}, runProperties: l = {} } = Z4(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(...
|
|
15024
|
+
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(...W4(l, n)), a && a.elements?.length && (o.paragraphProperties = a), n && t.name === "w:p" && n.forEach((c) => {
|
|
15027
15025
|
const u = Object.keys(c.attrs ?? {})[0];
|
|
15028
15026
|
if (u) {
|
|
15029
15027
|
const d = c.attrs[u];
|
|
@@ -15051,7 +15049,7 @@ const eT = (t) => {
|
|
|
15051
15049
|
const { nodes: e, nodeListHandler: n } = t;
|
|
15052
15050
|
if (e.length === 0 || !(e[0].name === "w:del" || e[0].name === "w:ins"))
|
|
15053
15051
|
return { nodes: [], consumed: 0 };
|
|
15054
|
-
const r = e[0], { name: o } = r, { attributes: i, elements: s } =
|
|
15052
|
+
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
15053
|
id: i["w:id"],
|
|
15056
15054
|
date: i["w:date"],
|
|
15057
15055
|
author: i["w:author"],
|
|
@@ -15093,7 +15091,7 @@ const eT = (t) => {
|
|
|
15093
15091
|
let a = n.handler(s)?.filter((u) => u) || [];
|
|
15094
15092
|
const l = i.elements?.some((u) => u.name === "w:rPr"), c = iT(o, r);
|
|
15095
15093
|
if (l) {
|
|
15096
|
-
const { marks: u = [], attributes: d = {} } =
|
|
15094
|
+
const { marks: u = [], attributes: d = {} } = qi(i), f = u.find((h) => h.type === "textStyle"), p = f && Object.keys(f.attrs).length > 0;
|
|
15097
15095
|
c.marks && !p && u.push(...c.marks), i.marks && u.push(...i.marks), a = a.map((h) => ({ ...h, marks: jd(u), attributes: d }));
|
|
15098
15096
|
} else c.marks && (a = a.map((u) => ({ ...u, marks: jd(c.marks) })));
|
|
15099
15097
|
return { nodes: a, consumed: 1 };
|
|
@@ -15102,7 +15100,7 @@ const eT = (t) => {
|
|
|
15102
15100
|
if (!n)
|
|
15103
15101
|
return {};
|
|
15104
15102
|
const r = n.elements[0].elements.filter((o) => o.name === "w:style").find((o) => o.attributes["w:styleId"] === e) || {};
|
|
15105
|
-
return r ?
|
|
15103
|
+
return r ? qi(r) : {};
|
|
15106
15104
|
}, sT = {
|
|
15107
15105
|
handlerName: "runNodeHandler",
|
|
15108
15106
|
handler: oT
|
|
@@ -15110,7 +15108,7 @@ const eT = (t) => {
|
|
|
15110
15108
|
const { nodes: e, insideTrackChange: n } = t;
|
|
15111
15109
|
if (e.length === 0 || !(e[0].name === "w:t" || n && e[0].name === "w:delText"))
|
|
15112
15110
|
return { nodes: [], consumed: 0 };
|
|
15113
|
-
const r = e[0], { type: o } = r, { attributes: i, elements: s, marks: a = [] } =
|
|
15111
|
+
const r = e[0], { type: o } = r, { attributes: i, elements: s, marks: a = [] } = qi(r);
|
|
15114
15112
|
let l;
|
|
15115
15113
|
if (s.length === 1) l = s[0].text;
|
|
15116
15114
|
else if (!s.length && "attributes" in r && r.attributes["xml:space"] === "preserve")
|
|
@@ -15131,7 +15129,7 @@ const eT = (t) => {
|
|
|
15131
15129
|
handlerName: "textNodeHandler",
|
|
15132
15130
|
handler: aT
|
|
15133
15131
|
}, t1 = (t) => Object.prototype.toString.call(t) === "[object RegExp]";
|
|
15134
|
-
function
|
|
15132
|
+
function Si(t, e, n = { strict: !0 }) {
|
|
15135
15133
|
const r = Object.keys(e);
|
|
15136
15134
|
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
15135
|
}
|
|
@@ -15154,7 +15152,7 @@ const n1 = (t) => {
|
|
|
15154
15152
|
if (n[o].type !== r[o].type || !uT(n[o].attrs, r[o].attrs))
|
|
15155
15153
|
return !1;
|
|
15156
15154
|
return !0;
|
|
15157
|
-
}, uT = (t = {}, e = {}) =>
|
|
15155
|
+
}, uT = (t = {}, e = {}) => Si(t, e);
|
|
15158
15156
|
function r1(t, e, n) {
|
|
15159
15157
|
this.name = t, this.message = e || "", this.details = n;
|
|
15160
15158
|
const r = new Error(this.message);
|
|
@@ -15202,7 +15200,7 @@ function o1({
|
|
|
15202
15200
|
if (!h)
|
|
15203
15201
|
return console.error("Standard node handler not found"), { nodes: [], consumed: 0 };
|
|
15204
15202
|
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 =
|
|
15203
|
+
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
15204
|
let g = 0;
|
|
15207
15205
|
for (let [x, w] of t.entries()) {
|
|
15208
15206
|
if (w.seen) continue;
|
|
@@ -15211,7 +15209,7 @@ function o1({
|
|
|
15211
15209
|
Z && d[d.length - 1]?.content.push(Z), w.seen = !0;
|
|
15212
15210
|
continue;
|
|
15213
15211
|
}
|
|
15214
|
-
const { attributes: T, elements: O, marks: M = [] } =
|
|
15212
|
+
const { attributes: T, elements: O, marks: M = [] } = qi(w), N = M.find((Z) => Z.type === "textStyle"), {
|
|
15215
15213
|
listType: S,
|
|
15216
15214
|
listOrderingType: W,
|
|
15217
15215
|
ilvl: oe,
|
|
@@ -15316,19 +15314,19 @@ function qd(t, e) {
|
|
|
15316
15314
|
const { elements: n } = t, r = n?.find((l) => l.name === "w:pPr");
|
|
15317
15315
|
if (!r) return !1;
|
|
15318
15316
|
const o = r.elements?.find((l) => l.name === "w:pStyle");
|
|
15319
|
-
let i = r.elements?.find((l) => l.name === "w:numPr"), s =
|
|
15317
|
+
let i = r.elements?.find((l) => l.name === "w:numPr"), s = Ai(i);
|
|
15320
15318
|
const a = o?.attributes["w:val"];
|
|
15321
|
-
return a && !s && (i = sc({ node: t, styleId: a, docx: e }), s =
|
|
15319
|
+
return a && !s && (i = sc({ node: t, styleId: a, docx: e }), s = Ai(i)), !!s;
|
|
15322
15320
|
}
|
|
15323
|
-
const
|
|
15321
|
+
const Ai = (t) => t?.elements?.find((e) => e.name === "w:numId")?.attributes["w:val"];
|
|
15324
15322
|
function s1(t, e) {
|
|
15325
15323
|
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
15324
|
}
|
|
15327
15325
|
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 =
|
|
15326
|
+
let o = t?.elements?.find((l) => l.name === "w:pPr")?.elements?.find((l) => l.name === "w:numPr"), i = Ai(o);
|
|
15329
15327
|
if (i) return o;
|
|
15330
15328
|
const s = s1(e, n);
|
|
15331
|
-
o = s?.elements?.find((l) => l.name === "w:pPr")?.elements?.find((l) => l.name === "w:numPr"), i =
|
|
15329
|
+
o = s?.elements?.find((l) => l.name === "w:pPr")?.elements?.find((l) => l.name === "w:numPr"), i = Ai(o);
|
|
15332
15330
|
const a = s?.elements?.find((l) => l.name === "w:basedOn");
|
|
15333
15331
|
if (!i && !r.has(e)) {
|
|
15334
15332
|
const l = a?.attributes["w:val"];
|
|
@@ -15392,7 +15390,7 @@ const pT = [
|
|
|
15392
15390
|
if (!s) return null;
|
|
15393
15391
|
let a = s?.elements?.find((h) => h.name === "w:numPr");
|
|
15394
15392
|
if (!a) return null;
|
|
15395
|
-
let l = a?.elements?.find((h) => h.name === "w:numId") || {}, c =
|
|
15393
|
+
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
15394
|
const f = i?.elements?.find((h) => h.name === "w:basedOn")?.attributes?.["w:val"];
|
|
15397
15395
|
let p = 0;
|
|
15398
15396
|
for (; a && !c && p < 10; )
|
|
@@ -15506,7 +15504,7 @@ const vT = (t) => {
|
|
|
15506
15504
|
const c = { ...t, nodes: [i] }, u = l(c);
|
|
15507
15505
|
u.nodes.length === 1 && (s = u.nodes[0]);
|
|
15508
15506
|
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 =
|
|
15507
|
+
if (p && (s.attrs.marksAttrs = ki(p, [])), f && (s.attrs.styleId = f.attributes["w:val"]), n) {
|
|
15510
15508
|
const g = xT(i, n, s.attrs.styleId);
|
|
15511
15509
|
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
15510
|
}
|
|
@@ -15600,7 +15598,7 @@ function ST(t, e) {
|
|
|
15600
15598
|
outlineLevel: O ? parseInt(M) : null,
|
|
15601
15599
|
pageBreakBefore: !!S,
|
|
15602
15600
|
pageBreakAfter: !!oe
|
|
15603
|
-
}, V = s.elements.find((se) => se.name === "w:rPr"), C =
|
|
15601
|
+
}, V = s.elements.find((se) => se.name === "w:rPr"), C = ki(V, [], e) || {}, G = {
|
|
15604
15602
|
spacing: { lineSpaceAfter: h, lineSpaceBefore: p, line: m },
|
|
15605
15603
|
textAlign: y,
|
|
15606
15604
|
indent: { leftIndent: g, rightIndent: v, firstLine: x }
|
|
@@ -15728,7 +15726,7 @@ const Gg = (t = []) => {
|
|
|
15728
15726
|
}, TT = (t = {}) => {
|
|
15729
15727
|
const e = t.elements?.find((i) => i.name === "w:r")?.elements?.find((i) => i.name === "w:rPr");
|
|
15730
15728
|
if (!e) return {};
|
|
15731
|
-
const n =
|
|
15729
|
+
const n = ki(e, []) || [], r = [];
|
|
15732
15730
|
n.forEach((i) => {
|
|
15733
15731
|
const { type: s } = i;
|
|
15734
15732
|
if (s === "textStyle") {
|
|
@@ -15754,7 +15752,7 @@ const Gg = (t = []) => {
|
|
|
15754
15752
|
const { nodes: e, docx: n, nodeListHandler: r } = t;
|
|
15755
15753
|
if (!e || e.length === 0)
|
|
15756
15754
|
return { nodes: [], consumed: 0 };
|
|
15757
|
-
const o = e[0], { name: i } = o, { attributes: s, elements: a, marks: l = [] } =
|
|
15755
|
+
const o = e[0], { name: i } = o, { attributes: s, elements: a, marks: l = [] } = qi(o);
|
|
15758
15756
|
if (i === "w:sdt")
|
|
15759
15757
|
return { nodes: [], consumed: 0 };
|
|
15760
15758
|
if (Q4(o))
|
|
@@ -16189,7 +16187,7 @@ const ZT = (t) => {
|
|
|
16189
16187
|
return !!n.find((r) => r.name === "w:evenAndOddHeaders");
|
|
16190
16188
|
};
|
|
16191
16189
|
var oi, d1, f1, p1, h1;
|
|
16192
|
-
const
|
|
16190
|
+
const ds = class m1 {
|
|
16193
16191
|
constructor(e = null) {
|
|
16194
16192
|
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
16193
|
}
|
|
@@ -16214,7 +16212,7 @@ const fs = class m1 {
|
|
|
16214
16212
|
return;
|
|
16215
16213
|
}
|
|
16216
16214
|
}
|
|
16217
|
-
static updateDocumentVersion(e = this.convertedXml, n = "0.
|
|
16215
|
+
static updateDocumentVersion(e = this.convertedXml, n = "0.10.2") {
|
|
16218
16216
|
const r = "docProps/custom.xml";
|
|
16219
16217
|
e[r] || (e[r] = g1());
|
|
16220
16218
|
const o = e["docProps/custom.xml"];
|
|
@@ -16320,7 +16318,7 @@ const fs = class m1 {
|
|
|
16320
16318
|
commentsExportType: i = "clean",
|
|
16321
16319
|
isFinalDoc: s = !1
|
|
16322
16320
|
}) {
|
|
16323
|
-
const a = this.savedTagsToRestore.find((u) => u.name === "w:body"), [l, c] =
|
|
16321
|
+
const a = this.savedTagsToRestore.find((u) => u.name === "w:body"), [l, c] = zi({
|
|
16324
16322
|
node: e,
|
|
16325
16323
|
bodyNode: a,
|
|
16326
16324
|
relationships: [],
|
|
@@ -16374,7 +16372,7 @@ f1 = function({ defs: t, exportType: e, commentsWithParaIds: n }) {
|
|
|
16374
16372
|
...this.convertedXml.media,
|
|
16375
16373
|
...e
|
|
16376
16374
|
}, this.media = this.convertedXml.media, this.addedMedia = e;
|
|
16377
|
-
}, ha(
|
|
16375
|
+
}, ha(ds, "allowedElements", Object.freeze({
|
|
16378
16376
|
"w:document": "doc",
|
|
16379
16377
|
"w:body": "body",
|
|
16380
16378
|
"w:p": "paragraph",
|
|
@@ -16395,7 +16393,7 @@ f1 = function({ defs: t, exportType: e, commentsWithParaIds: n }) {
|
|
|
16395
16393
|
"w:commentRangeStart": "commentRangeStart",
|
|
16396
16394
|
"w:commentRangeEnd": "commentRangeEnd",
|
|
16397
16395
|
"w:commentReference": "commentReference"
|
|
16398
|
-
})), ha(
|
|
16396
|
+
})), ha(ds, "markTypes", [
|
|
16399
16397
|
{ name: "w:b", type: "bold" },
|
|
16400
16398
|
{ name: "w:bCs", type: "bold" },
|
|
16401
16399
|
{ name: "w:i", type: "italic" },
|
|
@@ -16412,14 +16410,14 @@ f1 = function({ defs: t, exportType: e, commentsWithParaIds: n }) {
|
|
|
16412
16410
|
{ name: "link", type: "link", mark: "link", property: "href" },
|
|
16413
16411
|
{ name: "w:highlight", type: "highlight", mark: "highlight", property: "color" }
|
|
16414
16412
|
// { name: 'w:shd', type: 'highlight', mark: 'highlight', property: 'color'}
|
|
16415
|
-
]), ha(
|
|
16413
|
+
]), ha(ds, "propertyTypes", Object.freeze({
|
|
16416
16414
|
"w:pPr": "paragraphProperties",
|
|
16417
16415
|
"w:rPr": "runProperties",
|
|
16418
16416
|
"w:sectPr": "sectionProperties",
|
|
16419
16417
|
"w:numPr": "numberingProperties",
|
|
16420
16418
|
"w:tcPr": "tableCellProperties"
|
|
16421
|
-
})), ha(
|
|
16422
|
-
let Io =
|
|
16419
|
+
})), ha(ds, "elements", /* @__PURE__ */ new Set(["w:document", "w:body", "w:p", "w:r", "w:t", "w:delText"]));
|
|
16420
|
+
let Io = ds;
|
|
16423
16421
|
function QT(t) {
|
|
16424
16422
|
const e = "docProps/custom.xml";
|
|
16425
16423
|
t[e] || (t[e] = g1());
|
|
@@ -16439,7 +16437,7 @@ function QT(t) {
|
|
|
16439
16437
|
function g1() {
|
|
16440
16438
|
return RE;
|
|
16441
16439
|
}
|
|
16442
|
-
function y1(t = 2, e = "0.
|
|
16440
|
+
function y1(t = 2, e = "0.10.2") {
|
|
16443
16441
|
return {
|
|
16444
16442
|
type: "element",
|
|
16445
16443
|
name: "property",
|
|
@@ -19065,7 +19063,7 @@ var o6 = /* @__PURE__ */ function(t) {
|
|
|
19065
19063
|
}, e;
|
|
19066
19064
|
}(Ot);
|
|
19067
19065
|
const i6 = 500;
|
|
19068
|
-
let
|
|
19066
|
+
let Ns = class ii {
|
|
19069
19067
|
constructor(e, n) {
|
|
19070
19068
|
this.items = e, this.eventCount = n;
|
|
19071
19069
|
}
|
|
@@ -19109,7 +19107,7 @@ let Fs = class ii {
|
|
|
19109
19107
|
return c > a6 && (a = s6(a, c), s -= c), new ii(a.append(i), s);
|
|
19110
19108
|
}
|
|
19111
19109
|
remapping(e, n) {
|
|
19112
|
-
let r = new
|
|
19110
|
+
let r = new bi();
|
|
19113
19111
|
return this.items.forEach((o, i) => {
|
|
19114
19112
|
let s = o.mirrorOffset != null && i - o.mirrorOffset >= e ? r.maps.length - o.mirrorOffset : void 0;
|
|
19115
19113
|
r.appendMap(o.map, s);
|
|
@@ -19177,7 +19175,7 @@ let Fs = class ii {
|
|
|
19177
19175
|
}, this.items.length, 0), new ii(Ot.from(o.reverse()), i);
|
|
19178
19176
|
}
|
|
19179
19177
|
};
|
|
19180
|
-
|
|
19178
|
+
Ns.empty = new Ns(Ot.empty, 0);
|
|
19181
19179
|
function s6(t, e) {
|
|
19182
19180
|
let n;
|
|
19183
19181
|
return t.forEach((r, o) => {
|
|
@@ -19214,7 +19212,7 @@ function l6(t, e, n, r) {
|
|
|
19214
19212
|
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
19213
|
if (n.getMeta("addToHistory") !== !1 && !(s && s.getMeta("addToHistory") === !1)) {
|
|
19216
19214
|
let a = n.getMeta("composition"), l = t.prevTime == 0 || !s && t.prevComposition != a && (t.prevTime < (n.time || 0) - r.newGroupDelay || !c6(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)),
|
|
19215
|
+
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
19216
|
} 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
19217
|
}
|
|
19220
19218
|
function c6(t, e) {
|
|
@@ -19273,7 +19271,7 @@ function f6(t = {}) {
|
|
|
19273
19271
|
key: kr,
|
|
19274
19272
|
state: {
|
|
19275
19273
|
init() {
|
|
19276
|
-
return new Br(
|
|
19274
|
+
return new Br(Ns.empty, Ns.empty, null, 0, -1);
|
|
19277
19275
|
},
|
|
19278
19276
|
apply(e, n, r) {
|
|
19279
19277
|
return l6(n, r, e, t);
|
|
@@ -19372,7 +19370,7 @@ const m6 = dt.create({
|
|
|
19372
19370
|
for (var e = 0; ; e++)
|
|
19373
19371
|
if (t = t.previousSibling, !t)
|
|
19374
19372
|
return e;
|
|
19375
|
-
},
|
|
19373
|
+
}, Ci = function(t) {
|
|
19376
19374
|
let e = t.assignedSlot || t.parentNode;
|
|
19377
19375
|
return e && e.nodeType == 11 ? e.host : e;
|
|
19378
19376
|
};
|
|
@@ -19478,7 +19476,7 @@ function k6(t, e, n) {
|
|
|
19478
19476
|
}
|
|
19479
19477
|
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
19478
|
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),
|
|
19479
|
+
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), S6 = rr ? /Win/.test(rr.platform) : !1, vr = /Android \d/.test(ro), aa = !!ty && "webkitFontSmoothing" in ty.documentElement.style, A6 = aa ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
19482
19480
|
function C6(t) {
|
|
19483
19481
|
let e = t.defaultView && t.defaultView.visualViewport;
|
|
19484
19482
|
return e ? {
|
|
@@ -19509,7 +19507,7 @@ function ny(t, e, n) {
|
|
|
19509
19507
|
let r = t.someProp("scrollThreshold") || 0, o = t.someProp("scrollMargin") || 5, i = t.dom.ownerDocument;
|
|
19510
19508
|
for (let s = n || t.dom; s; ) {
|
|
19511
19509
|
if (s.nodeType != 1) {
|
|
19512
|
-
s =
|
|
19510
|
+
s = Ci(s);
|
|
19513
19511
|
continue;
|
|
19514
19512
|
}
|
|
19515
19513
|
let a = s, l = a == i.body, c = l ? C6(i) : E6(a), u = 0, d = 0;
|
|
@@ -19525,7 +19523,7 @@ function ny(t, e, n) {
|
|
|
19525
19523
|
let f = l ? "fixed" : getComputedStyle(s).position;
|
|
19526
19524
|
if (/^(fixed|sticky)$/.test(f))
|
|
19527
19525
|
break;
|
|
19528
|
-
s = f == "absolute" ? s.offsetParent :
|
|
19526
|
+
s = f == "absolute" ? s.offsetParent : Ci(s);
|
|
19529
19527
|
}
|
|
19530
19528
|
}
|
|
19531
19529
|
function T6(t) {
|
|
@@ -19544,7 +19542,7 @@ function T6(t) {
|
|
|
19544
19542
|
}
|
|
19545
19543
|
function M1(t) {
|
|
19546
19544
|
let e = [], n = t.ownerDocument;
|
|
19547
|
-
for (let r = t; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), t != n); r =
|
|
19545
|
+
for (let r = t; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), t != n); r = Ci(r))
|
|
19548
19546
|
;
|
|
19549
19547
|
return e;
|
|
19550
19548
|
}
|
|
@@ -19665,7 +19663,7 @@ function N6(t, e) {
|
|
|
19665
19663
|
return null;
|
|
19666
19664
|
}
|
|
19667
19665
|
if (Qt)
|
|
19668
|
-
for (let c = s; r && c; c =
|
|
19666
|
+
for (let c = s; r && c; c = Ci(c))
|
|
19669
19667
|
c.draggable && (r = void 0);
|
|
19670
19668
|
if (s = D6(s, e), r) {
|
|
19671
19669
|
if (Ln && r.nodeType == 1 && (o = Math.min(o, r.childNodes.length), o < r.childNodes.length)) {
|
|
@@ -19702,13 +19700,13 @@ function N1(t, e, n) {
|
|
|
19702
19700
|
if (l.top == a.top) {
|
|
19703
19701
|
let c = Nr(hr(r, o, o + 1), -1);
|
|
19704
19702
|
if (c.top != a.top)
|
|
19705
|
-
return
|
|
19703
|
+
return Ji(c, c.left < l.left);
|
|
19706
19704
|
}
|
|
19707
19705
|
}
|
|
19708
19706
|
return a;
|
|
19709
19707
|
} else {
|
|
19710
19708
|
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++,
|
|
19709
|
+
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
19710
|
}
|
|
19713
19711
|
if (!t.state.doc.resolve(e - (i || 0)).parent.inlineContent) {
|
|
19714
19712
|
if (i == null && o && (n < 0 || o == $n(r))) {
|
|
@@ -19726,7 +19724,7 @@ function N1(t, e, n) {
|
|
|
19726
19724
|
if (i == null && o && (n < 0 || o == $n(r))) {
|
|
19727
19725
|
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
19726
|
if (l)
|
|
19729
|
-
return
|
|
19727
|
+
return Ji(Nr(l, 1), !1);
|
|
19730
19728
|
}
|
|
19731
19729
|
if (i == null && o < $n(r)) {
|
|
19732
19730
|
let a = r.childNodes[o];
|
|
@@ -19734,11 +19732,11 @@ function N1(t, e, n) {
|
|
|
19734
19732
|
a = a.nextSibling;
|
|
19735
19733
|
let l = a ? a.nodeType == 3 ? hr(a, 0, s ? 0 : 1) : a.nodeType == 1 ? a : null : null;
|
|
19736
19734
|
if (l)
|
|
19737
|
-
return
|
|
19735
|
+
return Ji(Nr(l, -1), !0);
|
|
19738
19736
|
}
|
|
19739
|
-
return
|
|
19737
|
+
return Ji(Nr(r.nodeType == 3 ? hr(r) : r, -n), n >= 0);
|
|
19740
19738
|
}
|
|
19741
|
-
function
|
|
19739
|
+
function Ji(t, e) {
|
|
19742
19740
|
if (t.width == 0)
|
|
19743
19741
|
return t;
|
|
19744
19742
|
let n = e ? t.left : t.right;
|
|
@@ -20215,7 +20213,7 @@ let R1 = class extends la {
|
|
|
20215
20213
|
}
|
|
20216
20214
|
static create(e, n, r, o) {
|
|
20217
20215
|
let i = o.nodeViews[n.type.name], s = i && i(n, o, r);
|
|
20218
|
-
return (!s || !s.dom) && (s =
|
|
20216
|
+
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
20217
|
}
|
|
20220
20218
|
parseRule() {
|
|
20221
20219
|
return this.dirty & or || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
|
|
@@ -20269,7 +20267,7 @@ let R1 = class extends la {
|
|
|
20269
20267
|
u = document.createTextNode(n.text);
|
|
20270
20268
|
else if (u.nodeType != 3)
|
|
20271
20269
|
throw new RangeError("Text must be rendered as a DOM text node");
|
|
20272
|
-
} else u || ({ dom: u, contentDOM: d } =
|
|
20270
|
+
} else u || ({ dom: u, contentDOM: d } = Pi.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
|
|
20273
20271
|
!d && !n.isText && u.nodeName != "BR" && (u.hasAttribute("contenteditable") || (u.contentEditable = "false"), n.type.spec.draggable && (u.draggable = !0));
|
|
20274
20272
|
let f = u;
|
|
20275
20273
|
return u = U1(u, r, n), c ? l = new j6(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 +20313,7 @@ let R1 = class extends la {
|
|
|
20315
20313
|
l.syncToMarks(c.marks, r, e);
|
|
20316
20314
|
let p;
|
|
20317
20315
|
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),
|
|
20316
|
+
}), 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 && G6(this.dom));
|
|
20319
20317
|
}
|
|
20320
20318
|
localCompositionInfo(e, n) {
|
|
20321
20319
|
let { from: r, to: o } = e.state.selection;
|
|
@@ -20483,22 +20481,22 @@ function j1(t, e, n) {
|
|
|
20483
20481
|
r = cy(r), o = !0;
|
|
20484
20482
|
o && n.trackWrites == t && (n.trackWrites = null);
|
|
20485
20483
|
}
|
|
20486
|
-
const
|
|
20484
|
+
const bs = function(t) {
|
|
20487
20485
|
t && (this.nodeName = t);
|
|
20488
20486
|
};
|
|
20489
|
-
|
|
20490
|
-
const go = [new
|
|
20487
|
+
bs.prototype = /* @__PURE__ */ Object.create(null);
|
|
20488
|
+
const go = [new bs()];
|
|
20491
20489
|
function Jd(t, e, n) {
|
|
20492
20490
|
if (t.length == 0)
|
|
20493
20491
|
return go;
|
|
20494
|
-
let r = n ? go[0] : new
|
|
20492
|
+
let r = n ? go[0] : new bs(), o = [r];
|
|
20495
20493
|
for (let i = 0; i < t.length; i++) {
|
|
20496
20494
|
let s = t[i].type.attrs;
|
|
20497
20495
|
if (s) {
|
|
20498
|
-
s.nodeName && o.push(r = new
|
|
20496
|
+
s.nodeName && o.push(r = new bs(s.nodeName));
|
|
20499
20497
|
for (let a in s) {
|
|
20500
20498
|
let l = s[a];
|
|
20501
|
-
l != null && (n && o.length == 1 && o.push(r = new
|
|
20499
|
+
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
20500
|
}
|
|
20503
20501
|
}
|
|
20504
20502
|
}
|
|
@@ -20986,7 +20984,7 @@ function my(t, e, n) {
|
|
|
20986
20984
|
function Al(t) {
|
|
20987
20985
|
return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
|
|
20988
20986
|
}
|
|
20989
|
-
function
|
|
20987
|
+
function vs(t, e) {
|
|
20990
20988
|
let n = t.pmViewDesc;
|
|
20991
20989
|
return n && n.size == 0 && (e < 0 || t.nextSibling || t.nodeName != "BR");
|
|
20992
20990
|
}
|
|
@@ -20998,13 +20996,13 @@ function Z6(t) {
|
|
|
20998
20996
|
if (!n)
|
|
20999
20997
|
return;
|
|
21000
20998
|
let o, i, s = !1;
|
|
21001
|
-
for (Ln && n.nodeType == 1 && r < Al(n) &&
|
|
20999
|
+
for (Ln && n.nodeType == 1 && r < Al(n) && vs(n.childNodes[r], -1) && (s = !0); ; )
|
|
21002
21000
|
if (r > 0) {
|
|
21003
21001
|
if (n.nodeType != 1)
|
|
21004
21002
|
break;
|
|
21005
21003
|
{
|
|
21006
21004
|
let a = n.childNodes[r - 1];
|
|
21007
|
-
if (
|
|
21005
|
+
if (vs(a, -1))
|
|
21008
21006
|
o = n, i = --r;
|
|
21009
21007
|
else if (a.nodeType == 3)
|
|
21010
21008
|
n = a, r = n.nodeValue.length;
|
|
@@ -21016,7 +21014,7 @@ function Z6(t) {
|
|
|
21016
21014
|
break;
|
|
21017
21015
|
{
|
|
21018
21016
|
let a = n.previousSibling;
|
|
21019
|
-
for (; a &&
|
|
21017
|
+
for (; a && vs(a, -1); )
|
|
21020
21018
|
o = n.parentNode, i = Lt(a), a = a.previousSibling;
|
|
21021
21019
|
if (a)
|
|
21022
21020
|
n = a, r = Al(n);
|
|
@@ -21039,7 +21037,7 @@ function Q6(t) {
|
|
|
21039
21037
|
if (n.nodeType != 1)
|
|
21040
21038
|
break;
|
|
21041
21039
|
let a = n.childNodes[r];
|
|
21042
|
-
if (
|
|
21040
|
+
if (vs(a, 1))
|
|
21043
21041
|
i = n, s = ++r;
|
|
21044
21042
|
else
|
|
21045
21043
|
break;
|
|
@@ -21048,7 +21046,7 @@ function Q6(t) {
|
|
|
21048
21046
|
break;
|
|
21049
21047
|
{
|
|
21050
21048
|
let a = n.nextSibling;
|
|
21051
|
-
for (; a &&
|
|
21049
|
+
for (; a && vs(a, 1); )
|
|
21052
21050
|
i = a.parentNode, s = Lt(a) + 1, a = a.nextSibling;
|
|
21053
21051
|
if (a)
|
|
21054
21052
|
n = a, r = 0, o = Al(n);
|
|
@@ -21208,7 +21206,7 @@ function Sp(t, e) {
|
|
|
21208
21206
|
let p = r.firstChild;
|
|
21209
21207
|
n.push(p.type.name, p.attrs != p.type.defaultAttrs ? p.attrs : null), r = p.content;
|
|
21210
21208
|
}
|
|
21211
|
-
let s = t.someProp("clipboardSerializer") ||
|
|
21209
|
+
let s = t.someProp("clipboardSerializer") || Pi.fromSchema(t.state.schema), a = Q1(), l = a.createElement("div");
|
|
21212
21210
|
l.appendChild(s.serializeFragment(r, { document: a }));
|
|
21213
21211
|
let c = l.firstChild, u, d = 0;
|
|
21214
21212
|
for (; c && c.nodeType == 1 && (u = Z1[c.nodeName.toLowerCase()]); ) {
|
|
@@ -21241,7 +21239,7 @@ function K1(t, e, n, r, o) {
|
|
|
21241
21239
|
if (d)
|
|
21242
21240
|
a = d;
|
|
21243
21241
|
else {
|
|
21244
|
-
let f = o.marks(), { schema: p } = t.state, h =
|
|
21242
|
+
let f = o.marks(), { schema: p } = t.state, h = Pi.fromSchema(p);
|
|
21245
21243
|
s = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((m) => {
|
|
21246
21244
|
let y = s.appendChild(document.createElement("p"));
|
|
21247
21245
|
m && y.appendChild(h.serializeNode(p.text(m, f)));
|
|
@@ -21438,7 +21436,7 @@ function g$(t, e) {
|
|
|
21438
21436
|
tn.keydown = (t, e) => {
|
|
21439
21437
|
let n = e;
|
|
21440
21438
|
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(),
|
|
21439
|
+
if (n.keyCode != 229 && t.domObserver.forceFlush(), Ei && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
|
|
21442
21440
|
let r = Date.now();
|
|
21443
21441
|
t.input.lastIOSEnter = r, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
21444
21442
|
t.input.lastIOSEnter == r && (t.someProp("handleKeyDown", (o) => o(t, fo(13, "Enter"))), t.input.lastIOSEnter = 0);
|
|
@@ -21677,12 +21675,12 @@ function $$(t, e) {
|
|
|
21677
21675
|
n.parentNode && n.parentNode.removeChild(n), t.focus();
|
|
21678
21676
|
}, 50);
|
|
21679
21677
|
}
|
|
21680
|
-
const
|
|
21678
|
+
const Fs = ln && Jr < 15 || Ei && A6 < 604;
|
|
21681
21679
|
en.copy = tn.cut = (t, e) => {
|
|
21682
21680
|
let n = e, r = t.state.selection, o = n.type == "cut";
|
|
21683
21681
|
if (r.empty)
|
|
21684
21682
|
return;
|
|
21685
|
-
let i =
|
|
21683
|
+
let i = Fs ? null : n.clipboardData, s = r.content(), { dom: a, text: l } = Sp(t, s);
|
|
21686
21684
|
i ? (n.preventDefault(), i.clearData(), i.setData("text/html", a.innerHTML), i.setData("text/plain", l)) : $$(t, a), o && t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
|
|
21687
21685
|
};
|
|
21688
21686
|
function O$(t) {
|
|
@@ -21695,10 +21693,10 @@ function M$(t, e) {
|
|
|
21695
21693
|
n || (r.contentEditable = "true"), r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.focus();
|
|
21696
21694
|
let o = t.input.shiftKey && t.input.lastKeyCode != 45;
|
|
21697
21695
|
setTimeout(() => {
|
|
21698
|
-
t.focus(), r.parentNode && r.parentNode.removeChild(r), n ?
|
|
21696
|
+
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
21697
|
}, 50);
|
|
21700
21698
|
}
|
|
21701
|
-
function
|
|
21699
|
+
function Rs(t, e, n, r, o) {
|
|
21702
21700
|
let i = K1(t, e, n, r, t.state.selection.$from);
|
|
21703
21701
|
if (t.someProp("handlePaste", (l) => l(t, o, i || xe.empty)))
|
|
21704
21702
|
return !0;
|
|
@@ -21718,8 +21716,8 @@ tn.paste = (t, e) => {
|
|
|
21718
21716
|
let n = e;
|
|
21719
21717
|
if (t.composing && !vr)
|
|
21720
21718
|
return;
|
|
21721
|
-
let r =
|
|
21722
|
-
r &&
|
|
21719
|
+
let r = Fs ? null : n.clipboardData, o = t.input.shiftKey && t.input.lastKeyCode != 45;
|
|
21720
|
+
r && Rs(t, o2(r), r.getData("text/html"), o, n) ? n.preventDefault() : M$(t, n);
|
|
21723
21721
|
};
|
|
21724
21722
|
let i2 = class {
|
|
21725
21723
|
constructor(e, n, r) {
|
|
@@ -21744,7 +21742,7 @@ en.dragstart = (t, e) => {
|
|
|
21744
21742
|
}
|
|
21745
21743
|
}
|
|
21746
21744
|
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(
|
|
21745
|
+
(!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
21746
|
};
|
|
21749
21747
|
en.dragend = (t) => {
|
|
21750
21748
|
let e = t.dragging;
|
|
@@ -21763,7 +21761,7 @@ tn.drop = (t, e) => {
|
|
|
21763
21761
|
let i = t.state.doc.resolve(o.pos), s = r && r.slice;
|
|
21764
21762
|
s ? t.someProp("transformPasted", (h) => {
|
|
21765
21763
|
s = h(s, t);
|
|
21766
|
-
}) : s = K1(t, o2(n.dataTransfer),
|
|
21764
|
+
}) : s = K1(t, o2(n.dataTransfer), Fs ? null : n.dataTransfer.getData("text/html"), !1, i);
|
|
21767
21765
|
let a = !!(r && s2(t, n));
|
|
21768
21766
|
if (t.someProp("handleDrop", (h) => h(t, n, s || xe.empty, a))) {
|
|
21769
21767
|
n.preventDefault();
|
|
@@ -21814,7 +21812,7 @@ en.beforeinput = (t, e) => {
|
|
|
21814
21812
|
};
|
|
21815
21813
|
for (let t in tn)
|
|
21816
21814
|
en[t] = tn[t];
|
|
21817
|
-
function
|
|
21815
|
+
function Ls(t, e) {
|
|
21818
21816
|
if (t == e)
|
|
21819
21817
|
return !0;
|
|
21820
21818
|
for (let n in t)
|
|
@@ -21837,12 +21835,12 @@ let ky = class a2 {
|
|
|
21837
21835
|
return !0;
|
|
21838
21836
|
}
|
|
21839
21837
|
eq(e) {
|
|
21840
|
-
return this == e || e instanceof a2 && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM &&
|
|
21838
|
+
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
21839
|
}
|
|
21842
21840
|
destroy(e) {
|
|
21843
21841
|
this.spec.destroy && this.spec.destroy(e);
|
|
21844
21842
|
}
|
|
21845
|
-
},
|
|
21843
|
+
}, xs = class tf {
|
|
21846
21844
|
constructor(e, n) {
|
|
21847
21845
|
this.attrs = e, this.spec = n || So;
|
|
21848
21846
|
}
|
|
@@ -21854,7 +21852,7 @@ let ky = class a2 {
|
|
|
21854
21852
|
return n.from < n.to;
|
|
21855
21853
|
}
|
|
21856
21854
|
eq(e) {
|
|
21857
|
-
return this == e || e instanceof tf &&
|
|
21855
|
+
return this == e || e instanceof tf && Ls(this.attrs, e.attrs) && Ls(this.spec, e.spec);
|
|
21858
21856
|
}
|
|
21859
21857
|
static is(e) {
|
|
21860
21858
|
return e.type instanceof tf;
|
|
@@ -21878,7 +21876,7 @@ class Tp {
|
|
|
21878
21876
|
return o == n.from && !(i = e.child(r)).isText && o + i.nodeSize == n.to;
|
|
21879
21877
|
}
|
|
21880
21878
|
eq(e) {
|
|
21881
|
-
return this == e || e instanceof Tp &&
|
|
21879
|
+
return this == e || e instanceof Tp && Ls(this.attrs, e.attrs) && Ls(this.spec, e.spec);
|
|
21882
21880
|
}
|
|
21883
21881
|
destroy() {
|
|
21884
21882
|
}
|
|
@@ -21924,7 +21922,7 @@ class He {
|
|
|
21924
21922
|
each inline node between `from` and `to`.
|
|
21925
21923
|
*/
|
|
21926
21924
|
static inline(e, n, r, o) {
|
|
21927
|
-
return new He(e, n, new
|
|
21925
|
+
return new He(e, n, new xs(r, o));
|
|
21928
21926
|
}
|
|
21929
21927
|
/**
|
|
21930
21928
|
Creates a node decoration. `from` and `to` should point precisely
|
|
@@ -21945,7 +21943,7 @@ class He {
|
|
|
21945
21943
|
@internal
|
|
21946
21944
|
*/
|
|
21947
21945
|
get inline() {
|
|
21948
|
-
return this.type instanceof
|
|
21946
|
+
return this.type instanceof xs;
|
|
21949
21947
|
}
|
|
21950
21948
|
/**
|
|
21951
21949
|
@internal
|
|
@@ -22076,7 +22074,7 @@ class Ue {
|
|
|
22076
22074
|
let i = e + 1, s = i + n.content.size;
|
|
22077
22075
|
for (let a = 0; a < this.local.length; a++) {
|
|
22078
22076
|
let l = this.local[a];
|
|
22079
|
-
if (l.from < s && l.to > i && l.type instanceof
|
|
22077
|
+
if (l.from < s && l.to > i && l.type instanceof xs) {
|
|
22080
22078
|
let c = Math.max(i, l.from) - i, u = Math.min(s, l.to) - i;
|
|
22081
22079
|
c < u && (o || (o = [])).push(l.copy(c, u));
|
|
22082
22080
|
}
|
|
@@ -22115,11 +22113,11 @@ class Ue {
|
|
|
22115
22113
|
localsInner(e) {
|
|
22116
22114
|
if (this == jt)
|
|
22117
22115
|
return si;
|
|
22118
|
-
if (e.inlineContent || !this.local.some(
|
|
22116
|
+
if (e.inlineContent || !this.local.some(xs.is))
|
|
22119
22117
|
return this.local;
|
|
22120
22118
|
let n = [];
|
|
22121
22119
|
for (let r = 0; r < this.local.length; r++)
|
|
22122
|
-
this.local[r].type instanceof
|
|
22120
|
+
this.local[r].type instanceof xs || n.push(this.local[r]);
|
|
22123
22121
|
return n;
|
|
22124
22122
|
}
|
|
22125
22123
|
forEachSet(e) {
|
|
@@ -22403,9 +22401,9 @@ let R$ = class {
|
|
|
22403
22401
|
if (!e.focusNode)
|
|
22404
22402
|
return !0;
|
|
22405
22403
|
let n = /* @__PURE__ */ new Set(), r;
|
|
22406
|
-
for (let i = e.focusNode; i; i =
|
|
22404
|
+
for (let i = e.focusNode; i; i = Ci(i))
|
|
22407
22405
|
n.add(i);
|
|
22408
|
-
for (let i = e.anchorNode; i; i =
|
|
22406
|
+
for (let i = e.anchorNode; i; i = Ci(i))
|
|
22409
22407
|
if (n.has(i)) {
|
|
22410
22408
|
r = i;
|
|
22411
22409
|
break;
|
|
@@ -22576,7 +22574,7 @@ function V$(t, e, n, r, o) {
|
|
|
22576
22574
|
let l = t.state.selection, c = j$(t, e, n), u = t.state.doc, d = u.slice(c.from, c.to), f, p;
|
|
22577
22575
|
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
22576
|
let h = G$(d.content, c.doc.content, c.from, f, p);
|
|
22579
|
-
if (h && t.input.domChangeCount++, (
|
|
22577
|
+
if (h && t.input.domChangeCount++, (Ei && t.input.lastIOSEnter > Date.now() - 225 || vr) && o.some((S) => S.nodeType == 1 && !U$.test(S.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (S) => S(t, fo(13, "Enter")))) {
|
|
22580
22578
|
t.input.lastIOSEnter = 0;
|
|
22581
22579
|
return;
|
|
22582
22580
|
}
|
|
@@ -22595,7 +22593,7 @@ function V$(t, e, n, r, o) {
|
|
|
22595
22593
|
}
|
|
22596
22594
|
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
22595
|
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 ((
|
|
22596
|
+
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
22597
|
t.input.lastIOSEnter = 0;
|
|
22600
22598
|
return;
|
|
22601
22599
|
}
|
|
@@ -22980,13 +22978,13 @@ let d2 = class {
|
|
|
22980
22978
|
[`handlePaste`](https://prosemirror.net/docs/ref/#view.EditorProps.handlePaste) hook.
|
|
22981
22979
|
*/
|
|
22982
22980
|
pasteHTML(e, n) {
|
|
22983
|
-
return
|
|
22981
|
+
return Rs(this, "", e, !1, n || new ClipboardEvent("paste"));
|
|
22984
22982
|
}
|
|
22985
22983
|
/**
|
|
22986
22984
|
Run the editor's paste logic with the given plain-text input.
|
|
22987
22985
|
*/
|
|
22988
22986
|
pasteText(e, n) {
|
|
22989
|
-
return
|
|
22987
|
+
return Rs(this, e, null, !0, n || new ClipboardEvent("paste"));
|
|
22990
22988
|
}
|
|
22991
22989
|
/**
|
|
22992
22990
|
Serialize the given slice as it would be if it was copied from
|
|
@@ -23092,16 +23090,16 @@ function Iy(t) {
|
|
|
23092
23090
|
if (t.spec.state || t.spec.filterTransaction || t.spec.appendTransaction)
|
|
23093
23091
|
throw new RangeError("Plugins passed directly to the view must not have a state component");
|
|
23094
23092
|
}
|
|
23095
|
-
const
|
|
23093
|
+
const Bs = Math.floor, X$ = Math.abs, Xr = (t, e) => t < e ? t : e, Ti = (t, e) => t > e ? t : e, Y$ = (t) => t !== 0 ? t < 0 : 1 / t < 0, Z$ = 64, Ps = 128, Q$ = 1 << 29, Ny = 63, ks = 127, eO = 2147483647, tO = Number.isInteger || ((t) => typeof t == "number" && isFinite(t) && Bs(t) === t), nO = () => /* @__PURE__ */ new Set(), rO = Array.isArray, oO = String.fromCharCode, iO = (t) => t.toLowerCase(), sO = /^\s*/g, aO = (t) => t.replace(sO, ""), lO = /([A-Z])/g, Fy = (t, e) => aO(t.replace(lO, (n) => `${e}${iO(n)}`)), cO = (t) => {
|
|
23096
23094
|
const e = unescape(encodeURIComponent(t)), n = e.length, r = new Uint8Array(n);
|
|
23097
23095
|
for (let o = 0; o < n; o++)
|
|
23098
23096
|
r[o] = /** @type {number} */
|
|
23099
23097
|
e.codePointAt(o);
|
|
23100
23098
|
return r;
|
|
23101
|
-
},
|
|
23099
|
+
}, zs = (
|
|
23102
23100
|
/** @type {TextEncoder} */
|
|
23103
23101
|
typeof TextEncoder < "u" ? new TextEncoder() : null
|
|
23104
|
-
), uO = (t) =>
|
|
23102
|
+
), uO = (t) => zs.encode(t), dO = zs ? uO : cO;
|
|
23105
23103
|
let Bu = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8", { fatal: !0, ignoreBOM: !0 });
|
|
23106
23104
|
Bu && Bu.decode(new Uint8Array()).length === 1 && (Bu = null);
|
|
23107
23105
|
let fO = class {
|
|
@@ -23127,41 +23125,41 @@ const pO = () => new fO(), hO = (t) => {
|
|
|
23127
23125
|
return e.set(new Uint8Array(t.cbuf.buffer, 0, t.cpos), n), e;
|
|
23128
23126
|
}, yO = (t, e) => {
|
|
23129
23127
|
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(
|
|
23128
|
+
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
23129
|
}, It = (t, e) => {
|
|
23132
23130
|
const n = t.cbuf.length;
|
|
23133
23131
|
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,
|
|
23132
|
+
}, js = (t, e) => {
|
|
23133
|
+
for (; e > ks; )
|
|
23134
|
+
It(t, Ps | ks & e), e = Bs(e / 128);
|
|
23135
|
+
It(t, ks & e);
|
|
23138
23136
|
}, wO = (t, e) => {
|
|
23139
23137
|
const n = Y$(e);
|
|
23140
|
-
for (n && (e = -e), It(t, (e > Ny ?
|
|
23141
|
-
It(t, (e >
|
|
23138
|
+
for (n && (e = -e), It(t, (e > Ny ? Ps : 0) | (n ? Z$ : 0) | Ny & e), e = Bs(e / 64); e > 0; )
|
|
23139
|
+
It(t, (e > ks ? Ps : 0) | ks & e), e = Bs(e / 128);
|
|
23142
23140
|
}, nf = new Uint8Array(3e4), bO = nf.length / 3, vO = (t, e) => {
|
|
23143
23141
|
if (e.length < bO) {
|
|
23144
|
-
const n =
|
|
23145
|
-
|
|
23142
|
+
const n = zs.encodeInto(e, nf).written || 0;
|
|
23143
|
+
js(t, n);
|
|
23146
23144
|
for (let r = 0; r < n; r++)
|
|
23147
23145
|
It(t, nf[r]);
|
|
23148
23146
|
} else
|
|
23149
23147
|
f2(t, dO(e));
|
|
23150
23148
|
}, xO = (t, e) => {
|
|
23151
23149
|
const n = unescape(encodeURIComponent(e)), r = n.length;
|
|
23152
|
-
|
|
23150
|
+
js(t, r);
|
|
23153
23151
|
for (let o = 0; o < r; o++)
|
|
23154
23152
|
It(
|
|
23155
23153
|
t,
|
|
23156
23154
|
/** @type {number} */
|
|
23157
23155
|
n.codePointAt(o)
|
|
23158
23156
|
);
|
|
23159
|
-
}, Ry =
|
|
23160
|
-
|
|
23157
|
+
}, Ry = zs && /** @type {any} */
|
|
23158
|
+
zs.encodeInto ? vO : xO, kO = (t, e) => {
|
|
23161
23159
|
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(
|
|
23160
|
+
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
23161
|
}, f2 = (t, e) => {
|
|
23164
|
-
|
|
23162
|
+
js(t, e.byteLength), kO(t, e);
|
|
23165
23163
|
}, Op = (t, e) => {
|
|
23166
23164
|
yO(t, e);
|
|
23167
23165
|
const n = new DataView(t.cbuf.buffer, t.cpos, e);
|
|
@@ -23184,7 +23182,7 @@ js.encodeInto ? vO : xO, kO = (t, e) => {
|
|
|
23184
23182
|
if (e === null)
|
|
23185
23183
|
It(t, 126);
|
|
23186
23184
|
else if (rO(e)) {
|
|
23187
|
-
It(t, 117),
|
|
23185
|
+
It(t, 117), js(t, e.length);
|
|
23188
23186
|
for (let n = 0; n < e.length; n++)
|
|
23189
23187
|
rf(t, e[n]);
|
|
23190
23188
|
} else if (e instanceof Uint8Array)
|
|
@@ -23192,7 +23190,7 @@ js.encodeInto ? vO : xO, kO = (t, e) => {
|
|
|
23192
23190
|
else {
|
|
23193
23191
|
It(t, 118);
|
|
23194
23192
|
const n = Object.keys(e);
|
|
23195
|
-
|
|
23193
|
+
js(t, n.length);
|
|
23196
23194
|
for (let r = 0; r < n.length; r++) {
|
|
23197
23195
|
const o = n[r];
|
|
23198
23196
|
Ry(t, o), rf(t, e[o]);
|
|
@@ -23240,7 +23238,7 @@ js.encodeInto ? vO : xO, kO = (t, e) => {
|
|
|
23240
23238
|
remove: t.length - n - r,
|
|
23241
23239
|
insert: e.slice(n, e.length - r)
|
|
23242
23240
|
};
|
|
23243
|
-
}, FO = NO, ct = new lt("y-sync"), Yr = new lt("y-undo"), ka = new lt("yjs-cursor"), RO = Math.random, LO = (t) => t[
|
|
23241
|
+
}, FO = NO, ct = new lt("y-sync"), Yr = new lt("y-undo"), ka = new lt("yjs-cursor"), RO = Math.random, LO = (t) => t[Bs(RO() * t.length)], BO = (t) => t === void 0 ? null : t;
|
|
23244
23242
|
class PO {
|
|
23245
23243
|
constructor() {
|
|
23246
23244
|
this.map = /* @__PURE__ */ new Map();
|
|
@@ -23264,11 +23262,11 @@ try {
|
|
|
23264
23262
|
typeof localStorage < "u" && localStorage && (g2 = localStorage, zO = !1);
|
|
23265
23263
|
} catch {
|
|
23266
23264
|
}
|
|
23267
|
-
const jO = g2,
|
|
23265
|
+
const jO = 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
23266
|
let qn;
|
|
23269
23267
|
const qO = () => {
|
|
23270
23268
|
if (qn === void 0)
|
|
23271
|
-
if (
|
|
23269
|
+
if ($i) {
|
|
23272
23270
|
qn = Qa();
|
|
23273
23271
|
const t = Te.argv;
|
|
23274
23272
|
let e = null;
|
|
@@ -23284,11 +23282,11 @@ const qO = () => {
|
|
|
23284
23282
|
}
|
|
23285
23283
|
})) : qn = Qa();
|
|
23286
23284
|
return qn;
|
|
23287
|
-
}, of = (t) => qO().has(t), sf = (t) => BO(
|
|
23285
|
+
}, of = (t) => qO().has(t), sf = (t) => BO($i ? Te.env[t.toUpperCase().replaceAll("-", "_")] : jO.getItem(t)), w2 = (t) => of("--" + t) || sf(t) !== null;
|
|
23288
23286
|
w2("production");
|
|
23289
|
-
const UO =
|
|
23287
|
+
const UO = $i && MO(Te.env.FORCE_COLOR, ["true", "1", "2"]);
|
|
23290
23288
|
UO || !of("--no-colors") && // @todo deprecate --no-colors
|
|
23291
|
-
!w2("no-color") && (
|
|
23289
|
+
!w2("no-color") && (!$i || Te.stdout.isTTY) && (!$i || of("--color") || sf("COLORTERM") !== null || (sf("TERM") || "").includes("color"));
|
|
23292
23290
|
const VO = (
|
|
23293
23291
|
/** @type {Document} */
|
|
23294
23292
|
typeof document < "u" ? document : {}
|
|
@@ -23407,7 +23405,7 @@ class QO {
|
|
|
23407
23405
|
if (n % 64 !== 0) {
|
|
23408
23406
|
for (this._W.fill(0, s, 16); n < e.length; )
|
|
23409
23407
|
this._W[s] |= e[n] << (3 - n % 4) * 8, n++;
|
|
23410
|
-
this._W[s] |=
|
|
23408
|
+
this._W[s] |= Ps << (3 - n % 4) * 8;
|
|
23411
23409
|
}
|
|
23412
23410
|
this._updateHash();
|
|
23413
23411
|
}
|
|
@@ -23417,7 +23415,7 @@ class QO {
|
|
|
23417
23415
|
for (; n < e.length; o++)
|
|
23418
23416
|
for (let s = 3; s >= 0 && n < e.length; s--)
|
|
23419
23417
|
this._W[o] |= e[n++] << s * 8;
|
|
23420
|
-
r || (this._W[o - (n % 4 === 0 ? 0 : 1)] |=
|
|
23418
|
+
r || (this._W[o - (n % 4 === 0 ? 0 : 1)] |= Ps << (3 - n % 4) * 8), this._W[14] = e.byteLength / Q$, this._W[15] = e.byteLength * 8, this._updateHash();
|
|
23421
23419
|
const i = new Uint8Array(32);
|
|
23422
23420
|
for (let s = 0; s < this._H.length; s++)
|
|
23423
23421
|
for (let a = 0; a < 4; a++)
|
|
@@ -23538,27 +23536,19 @@ e.sv.get(t.id.client) > t.id.clock && !Me.isDeleted(e.ds, t.id), l5 = [{ light:
|
|
|
23538
23536
|
if (e !== null && e.anchor !== null && e.head !== null)
|
|
23539
23537
|
if (e.type === "all")
|
|
23540
23538
|
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(
|
|
23539
|
+
else {
|
|
23540
|
+
const r = Us(
|
|
23551
23541
|
n.doc,
|
|
23552
23542
|
n.type,
|
|
23553
23543
|
e.anchor,
|
|
23554
23544
|
n.mapping
|
|
23555
|
-
), o =
|
|
23545
|
+
), o = Us(
|
|
23556
23546
|
n.doc,
|
|
23557
23547
|
n.type,
|
|
23558
23548
|
e.head,
|
|
23559
23549
|
n.mapping
|
|
23560
23550
|
);
|
|
23561
|
-
r !== null && o !== null && t.setSelection(Ve.
|
|
23551
|
+
r !== null && o !== null && (t = t.setSelection(Ve.create(t.doc, r, o)));
|
|
23562
23552
|
}
|
|
23563
23553
|
}, af = (t, e) => ({
|
|
23564
23554
|
type: (
|
|
@@ -23624,7 +23614,7 @@ class f5 {
|
|
|
23624
23614
|
unrenderSnapshot() {
|
|
23625
23615
|
this.mapping.clear(), this.mux(() => {
|
|
23626
23616
|
const e = this.type.toArray().map(
|
|
23627
|
-
(r) =>
|
|
23617
|
+
(r) => Ss(
|
|
23628
23618
|
/** @type {Y.XmlElement} */
|
|
23629
23619
|
r,
|
|
23630
23620
|
this.prosemirrorView.state.schema,
|
|
@@ -23641,7 +23631,7 @@ class f5 {
|
|
|
23641
23631
|
_forceRerender() {
|
|
23642
23632
|
this.mapping.clear(), this.mux(() => {
|
|
23643
23633
|
const e = this.beforeTransactionSelection !== null ? null : this.prosemirrorView.state.selection, n = this.type.toArray().map(
|
|
23644
|
-
(o) =>
|
|
23634
|
+
(o) => Ss(
|
|
23645
23635
|
/** @type {Y.XmlElement} */
|
|
23646
23636
|
o,
|
|
23647
23637
|
this.prosemirrorView.state.schema,
|
|
@@ -23653,7 +23643,7 @@ class f5 {
|
|
|
23653
23643
|
new xe(ge.from(n), 0, 0)
|
|
23654
23644
|
);
|
|
23655
23645
|
if (e) {
|
|
23656
|
-
const o = Xr(
|
|
23646
|
+
const o = Xr(Ti(e.anchor, 0), r.doc.content.size), i = Xr(Ti(e.head, 0), r.doc.content.size);
|
|
23657
23647
|
r.setSelection(Ve.create(r.doc, o, i));
|
|
23658
23648
|
}
|
|
23659
23649
|
this.prosemirrorView.dispatch(
|
|
@@ -23705,7 +23695,7 @@ class f5 {
|
|
|
23705
23695
|
}, c = Me.typeListToArraySnapshot(
|
|
23706
23696
|
i,
|
|
23707
23697
|
new Me.Snapshot(n.ds, e.sv)
|
|
23708
|
-
).map((d) => !d._item.deleted || Tl(d._item, e) || Tl(d._item, n) ?
|
|
23698
|
+
).map((d) => !d._item.deleted || Tl(d._item, e) || Tl(d._item, n) ? Ss(
|
|
23709
23699
|
d,
|
|
23710
23700
|
this.prosemirrorView.state.schema,
|
|
23711
23701
|
{ mapping: /* @__PURE__ */ new Map(), isOMark: /* @__PURE__ */ new Map() },
|
|
@@ -23795,7 +23785,7 @@ const b2 = (t, e, n, r, o, i) => {
|
|
|
23795
23785
|
);
|
|
23796
23786
|
if (s === void 0) {
|
|
23797
23787
|
if (t instanceof Me.XmlElement)
|
|
23798
|
-
return
|
|
23788
|
+
return Ss(
|
|
23799
23789
|
t,
|
|
23800
23790
|
e,
|
|
23801
23791
|
n,
|
|
@@ -23806,7 +23796,7 @@ const b2 = (t, e, n, r, o, i) => {
|
|
|
23806
23796
|
throw TO();
|
|
23807
23797
|
}
|
|
23808
23798
|
return s;
|
|
23809
|
-
},
|
|
23799
|
+
}, Ss = (t, e, n, r, o, i) => {
|
|
23810
23800
|
const s = [], a = (l) => {
|
|
23811
23801
|
if (l instanceof Me.XmlElement) {
|
|
23812
23802
|
const c = b2(
|
|
@@ -23935,11 +23925,11 @@ const b2 = (t, e, n, r, o, i) => {
|
|
|
23935
23925
|
)?.attrs);
|
|
23936
23926
|
})
|
|
23937
23927
|
);
|
|
23938
|
-
},
|
|
23928
|
+
}, qs = (t, e) => {
|
|
23939
23929
|
if (t instanceof Me.XmlElement && !(e instanceof Array) && uf(t, e)) {
|
|
23940
23930
|
const n = dc(e);
|
|
23941
23931
|
return t._length === n.length && Dp(t.getAttributes(), e.attrs) && t.toArray().every(
|
|
23942
|
-
(r, o) =>
|
|
23932
|
+
(r, o) => qs(r, n[o])
|
|
23943
23933
|
);
|
|
23944
23934
|
}
|
|
23945
23935
|
return t instanceof Me.XmlText && e instanceof Array && v2(t, e);
|
|
@@ -23952,14 +23942,14 @@ const b2 = (t, e, n, r, o, i) => {
|
|
|
23952
23942
|
const d = r[l], f = o[l];
|
|
23953
23943
|
if ($l(n.mapping.get(d), f))
|
|
23954
23944
|
u = !0;
|
|
23955
|
-
else if (!
|
|
23945
|
+
else if (!qs(d, f))
|
|
23956
23946
|
break;
|
|
23957
23947
|
}
|
|
23958
23948
|
for (; l + c < a; c++) {
|
|
23959
23949
|
const d = r[s - c - 1], f = o[i - c - 1];
|
|
23960
23950
|
if ($l(n.mapping.get(d), f))
|
|
23961
23951
|
u = !0;
|
|
23962
|
-
else if (!
|
|
23952
|
+
else if (!qs(d, f))
|
|
23963
23953
|
break;
|
|
23964
23954
|
}
|
|
23965
23955
|
return {
|
|
@@ -24018,7 +24008,7 @@ const b2 = (t, e, n, r, o, i) => {
|
|
|
24018
24008
|
for (; c < l; c++) {
|
|
24019
24009
|
const d = s[c], f = o[c];
|
|
24020
24010
|
if (!$l(r.mapping.get(d), f))
|
|
24021
|
-
if (
|
|
24011
|
+
if (qs(d, f))
|
|
24022
24012
|
r.mapping.set(d, f);
|
|
24023
24013
|
else
|
|
24024
24014
|
break;
|
|
@@ -24026,7 +24016,7 @@ const b2 = (t, e, n, r, o, i) => {
|
|
|
24026
24016
|
for (; u + c + 1 < l; u++) {
|
|
24027
24017
|
const d = s[a - u - 1], f = o[i - u - 1];
|
|
24028
24018
|
if (!$l(r.mapping.get(d), f))
|
|
24029
|
-
if (
|
|
24019
|
+
if (qs(d, f))
|
|
24030
24020
|
r.mapping.set(d, f);
|
|
24031
24021
|
else
|
|
24032
24022
|
break;
|
|
@@ -24082,20 +24072,20 @@ const b2 = (t, e, n, r, o, i) => {
|
|
|
24082
24072
|
}
|
|
24083
24073
|
}, ct);
|
|
24084
24074
|
}, uf = (t, e) => !(e instanceof Array) && t.nodeName === e.type.name;
|
|
24085
|
-
let
|
|
24075
|
+
let As = null;
|
|
24086
24076
|
const v5 = () => {
|
|
24087
24077
|
const t = (
|
|
24088
24078
|
/** @type {Map<EditorView, Map<any, any>>} */
|
|
24089
|
-
|
|
24079
|
+
As
|
|
24090
24080
|
);
|
|
24091
|
-
|
|
24081
|
+
As = null, t.forEach((e, n) => {
|
|
24092
24082
|
const r = n.state.tr, o = ct.getState(n.state);
|
|
24093
24083
|
o && o.binding && !o.binding.isDestroyed && (e.forEach((i, s) => {
|
|
24094
24084
|
r.setMeta(s, i);
|
|
24095
24085
|
}), n.dispatch(r));
|
|
24096
24086
|
});
|
|
24097
24087
|
}, x5 = (t, e, n) => {
|
|
24098
|
-
|
|
24088
|
+
As || (As = /* @__PURE__ */ new Map(), Mp(0, v5)), m2(As, t, Qa).set(e, n);
|
|
24099
24089
|
}, Ol = (t, e, n) => {
|
|
24100
24090
|
if (t === 0)
|
|
24101
24091
|
return Me.createRelativePositionFromTypeIndex(e, 0, -1);
|
|
@@ -24158,7 +24148,7 @@ const v5 = () => {
|
|
|
24158
24148
|
}, k5 = (t, e) => {
|
|
24159
24149
|
let n = null, r = null;
|
|
24160
24150
|
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
|
-
},
|
|
24151
|
+
}, Us = (t, e, n, r) => {
|
|
24162
24152
|
const o = Me.createAbsolutePositionFromRelativePosition(n, t);
|
|
24163
24153
|
if (o === null || o.type !== e && !Me.isParentOf(e, o.type._item))
|
|
24164
24154
|
return null;
|
|
@@ -24206,7 +24196,7 @@ const v5 = () => {
|
|
|
24206
24196
|
return s - 1;
|
|
24207
24197
|
}, S5 = (t, e) => {
|
|
24208
24198
|
const n = t.toArray().map(
|
|
24209
|
-
(r) =>
|
|
24199
|
+
(r) => Ss(
|
|
24210
24200
|
/** @type {Y.XmlElement} */
|
|
24211
24201
|
r,
|
|
24212
24202
|
e,
|
|
@@ -24230,26 +24220,26 @@ const v5 = () => {
|
|
|
24230
24220
|
if (n(s.clientID, c, l) && l.cursor != null) {
|
|
24231
24221
|
const u = l.user || {};
|
|
24232
24222
|
u.color == null ? u.color = "#ffa500" : $5.test(u.color) || console.warn("A user uses an unsupported color format", u), u.name == null && (u.name = `User: ${c}`);
|
|
24233
|
-
let d =
|
|
24223
|
+
let d = Us(
|
|
24234
24224
|
s,
|
|
24235
24225
|
i.type,
|
|
24236
24226
|
Me.createRelativePositionFromJSON(l.cursor.anchor),
|
|
24237
24227
|
i.binding.mapping
|
|
24238
|
-
), f =
|
|
24228
|
+
), f = Us(
|
|
24239
24229
|
s,
|
|
24240
24230
|
i.type,
|
|
24241
24231
|
Me.createRelativePositionFromJSON(l.cursor.head),
|
|
24242
24232
|
i.binding.mapping
|
|
24243
24233
|
);
|
|
24244
24234
|
if (d !== null && f !== null) {
|
|
24245
|
-
const p =
|
|
24235
|
+
const p = Ti(t.doc.content.size - 1, 0);
|
|
24246
24236
|
d = Xr(d, p), f = Xr(f, p), a.push(
|
|
24247
24237
|
He.widget(f, () => r(u, c), {
|
|
24248
24238
|
key: c + "",
|
|
24249
24239
|
side: 10
|
|
24250
24240
|
})
|
|
24251
24241
|
);
|
|
24252
|
-
const h = Xr(d, f), m =
|
|
24242
|
+
const h = Xr(d, f), m = Ti(d, f);
|
|
24253
24243
|
a.push(
|
|
24254
24244
|
He.inline(h, m, o(u, c), {
|
|
24255
24245
|
inclusiveEnd: !0,
|
|
@@ -24315,7 +24305,7 @@ const v5 = () => {
|
|
|
24315
24305
|
anchor: f,
|
|
24316
24306
|
head: p
|
|
24317
24307
|
});
|
|
24318
|
-
} else u.cursor != null &&
|
|
24308
|
+
} else u.cursor != null && Us(
|
|
24319
24309
|
c.doc,
|
|
24320
24310
|
c.type,
|
|
24321
24311
|
Me.createRelativePositionFromJSON(u.cursor.anchor),
|
|
@@ -24982,7 +24972,7 @@ let $2 = class O2 {
|
|
|
24982
24972
|
}
|
|
24983
24973
|
};
|
|
24984
24974
|
function W5(t, e) {
|
|
24985
|
-
const n =
|
|
24975
|
+
const n = Pi.fromSchema(e).serializeFragment(t), r = document.implementation.createHTMLDocument().createElement("div");
|
|
24986
24976
|
return r.appendChild(n), r.innerHTML;
|
|
24987
24977
|
}
|
|
24988
24978
|
const G5 = (t, e = 500) => {
|
|
@@ -25120,16 +25110,16 @@ const J5 = (t, e) => {
|
|
|
25120
25110
|
return n;
|
|
25121
25111
|
};
|
|
25122
25112
|
var Il, M2, jy;
|
|
25123
|
-
const Y5 = class
|
|
25113
|
+
const Y5 = class fs {
|
|
25124
25114
|
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 =
|
|
25115
|
+
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 = V5.createSchemaByExtensions(this.extensions, r), Be(this, Il, M2).call(this);
|
|
25126
25116
|
}
|
|
25127
25117
|
/**
|
|
25128
25118
|
* Static method for creating ExtensionService.
|
|
25129
25119
|
* @param args Arguments for the constructor.
|
|
25130
25120
|
*/
|
|
25131
25121
|
static create(...e) {
|
|
25132
|
-
return new
|
|
25122
|
+
return new fs(...e);
|
|
25133
25123
|
}
|
|
25134
25124
|
/**
|
|
25135
25125
|
* Get an array of resolved extensions (e.g. sorted by priority).
|
|
@@ -25137,7 +25127,7 @@ const Y5 = class ps {
|
|
|
25137
25127
|
* @returns Array of resolved extensions.
|
|
25138
25128
|
*/
|
|
25139
25129
|
static getResolvedExtensions(e) {
|
|
25140
|
-
return
|
|
25130
|
+
return fs.sortByPriority(e);
|
|
25141
25131
|
}
|
|
25142
25132
|
/**
|
|
25143
25133
|
* Sort extensions by priority.
|
|
@@ -25184,7 +25174,7 @@ const Y5 = class ps {
|
|
|
25184
25174
|
* @returns Array of PM plugins.
|
|
25185
25175
|
*/
|
|
25186
25176
|
get plugins() {
|
|
25187
|
-
const e = this.editor, n =
|
|
25177
|
+
const e = this.editor, n = fs.sortByPriority([...this.extensions].reverse()), r = [], o = n.map((i) => {
|
|
25188
25178
|
const s = {
|
|
25189
25179
|
name: i.name,
|
|
25190
25180
|
options: i.options,
|
|
@@ -25303,13 +25293,13 @@ const D2 = (t, e, n) => {
|
|
|
25303
25293
|
let i = o.nodeBefore;
|
|
25304
25294
|
if (z2(t, o, e, -1))
|
|
25305
25295
|
return !0;
|
|
25306
|
-
if (r.parent.content.size == 0 && (
|
|
25296
|
+
if (r.parent.content.size == 0 && (Oi(i, "end") || Le.isSelectable(i)))
|
|
25307
25297
|
for (let s = r.depth; ; s--) {
|
|
25308
25298
|
let a = gp(t.doc, r.before(s), r.after(s), xe.empty);
|
|
25309
25299
|
if (a && a.slice.size < a.to - a.from) {
|
|
25310
25300
|
if (e) {
|
|
25311
25301
|
let l = t.tr.step(a);
|
|
25312
|
-
l.setSelection(
|
|
25302
|
+
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
25303
|
}
|
|
25314
25304
|
return !0;
|
|
25315
25305
|
}
|
|
@@ -25318,7 +25308,7 @@ const D2 = (t, e, n) => {
|
|
|
25318
25308
|
}
|
|
25319
25309
|
return i.isAtom && o.depth == r.depth - 1 ? (e && e(t.tr.delete(o.pos - i.nodeSize, o.pos).scrollIntoView()), !0) : !1;
|
|
25320
25310
|
};
|
|
25321
|
-
function
|
|
25311
|
+
function Oi(t, e, n = !1) {
|
|
25322
25312
|
for (let r = t; r; r = e == "start" ? r.firstChild : r.lastChild) {
|
|
25323
25313
|
if (r.isTextblock)
|
|
25324
25314
|
return !0;
|
|
@@ -25363,12 +25353,12 @@ const N2 = (t, e, n) => {
|
|
|
25363
25353
|
let i = o.nodeAfter;
|
|
25364
25354
|
if (z2(t, o, e, 1))
|
|
25365
25355
|
return !0;
|
|
25366
|
-
if (r.parent.content.size == 0 && (
|
|
25356
|
+
if (r.parent.content.size == 0 && (Oi(i, "start") || Le.isSelectable(i))) {
|
|
25367
25357
|
let s = gp(t.doc, r.before(), r.after(), xe.empty);
|
|
25368
25358
|
if (s && s.slice.size < s.to - s.from) {
|
|
25369
25359
|
if (e) {
|
|
25370
25360
|
let a = t.tr.step(s);
|
|
25371
|
-
a.setSelection(
|
|
25361
|
+
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
25362
|
}
|
|
25373
25363
|
return !0;
|
|
25374
25364
|
}
|
|
@@ -25488,9 +25478,7 @@ function cM(t) {
|
|
|
25488
25478
|
let u = e.tr;
|
|
25489
25479
|
(e.selection instanceof Ve || e.selection instanceof Qn) && u.deleteSelection();
|
|
25490
25480
|
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) {
|
|
25481
|
+
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
25482
|
let p = u.mapping.map(r.before(s)), h = u.doc.resolve(p);
|
|
25495
25483
|
a && r.node(s - 1).canReplaceWith(h.index(), h.index() + 1, a) && u.setNodeMarkup(u.mapping.map(r.before(s)), a);
|
|
25496
25484
|
}
|
|
@@ -25521,7 +25509,7 @@ function z2(t, e, n, r) {
|
|
|
25521
25509
|
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
25510
|
if (f != null && f >= e.depth)
|
|
25523
25511
|
return n && n(t.tr.lift(d, f).scrollIntoView()), !0;
|
|
25524
|
-
if (c &&
|
|
25512
|
+
if (c && Oi(i, "start", !0) && Oi(o, "end")) {
|
|
25525
25513
|
let p = o, h = [];
|
|
25526
25514
|
for (; h.push(p), !p.isTextblock; )
|
|
25527
25515
|
p = p.lastChild;
|
|
@@ -25677,7 +25665,7 @@ const xM = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
25677
25665
|
return vM(r, n, l);
|
|
25678
25666
|
};
|
|
25679
25667
|
function pf(t, e, n = {}) {
|
|
25680
|
-
return t.find((r) => r.type === e &&
|
|
25668
|
+
return t.find((r) => r.type === e && Si(r.attrs, n));
|
|
25681
25669
|
}
|
|
25682
25670
|
function kM(t, e, n = {}) {
|
|
25683
25671
|
return !!pf(t, e, n);
|
|
@@ -25716,7 +25704,7 @@ const SM = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
25716
25704
|
function Nl(t, e, n = {}) {
|
|
25717
25705
|
const { empty: r, ranges: o } = t.selection, i = e ? $r(e, t.schema) : null;
|
|
25718
25706
|
if (r)
|
|
25719
|
-
return !!(t.storedMarks || t.selection.$from.marks()).filter((u) => i ? i.name === u.type.name : !0).find((u) =>
|
|
25707
|
+
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
25708
|
let s = 0;
|
|
25721
25709
|
const a = [];
|
|
25722
25710
|
if (o.forEach(({ $from: u, $to: d }) => {
|
|
@@ -25733,7 +25721,7 @@ function Nl(t, e, n = {}) {
|
|
|
25733
25721
|
);
|
|
25734
25722
|
});
|
|
25735
25723
|
}), s === 0) return !1;
|
|
25736
|
-
const l = a.filter((u) => i ? i.name === u.mark.type.name : !0).filter((u) =>
|
|
25724
|
+
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
25725
|
return (l > 0 ? l + c : l) >= s;
|
|
25738
25726
|
}
|
|
25739
25727
|
const CM = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
|
|
@@ -25769,7 +25757,7 @@ function Fl(t, e, n = {}) {
|
|
|
25769
25757
|
to: p
|
|
25770
25758
|
});
|
|
25771
25759
|
});
|
|
25772
|
-
const l = o - r, c = a.filter((u) => s ? s.name === u.node.type.name : !0).filter((u) =>
|
|
25760
|
+
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
25761
|
return i ? !!c.length : c.reduce((u, d) => u + d.to - d.from, 0) >= l;
|
|
25774
25762
|
}
|
|
25775
25763
|
const $M = (t, e, n = {}) => ({ state: r, commands: o }) => {
|
|
@@ -27359,7 +27347,7 @@ const QM = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
27359
27347
|
() => e.liftEmptyBlock(),
|
|
27360
27348
|
() => e.splitBlock()
|
|
27361
27349
|
]);
|
|
27362
|
-
},
|
|
27350
|
+
}, Xi = (t) => {
|
|
27363
27351
|
t.commands.first(({ commands: e, tr: n }) => [
|
|
27364
27352
|
() => e.undoInputRule(),
|
|
27365
27353
|
() => (n.setMeta("inputType", "deleteContentBackward"), !1),
|
|
@@ -27379,9 +27367,9 @@ const QM = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
27379
27367
|
const t = {
|
|
27380
27368
|
Enter: () => fD(this.editor),
|
|
27381
27369
|
"Mod-Enter": () => this.editor.commands.exitCode(),
|
|
27382
|
-
Backspace: () =>
|
|
27383
|
-
"Mod-Backspace": () =>
|
|
27384
|
-
"Shift-Backspace": () =>
|
|
27370
|
+
Backspace: () => Xi(this.editor),
|
|
27371
|
+
"Mod-Backspace": () => Xi(this.editor),
|
|
27372
|
+
"Shift-Backspace": () => Xi(this.editor),
|
|
27385
27373
|
Delete: () => Ko(this.editor),
|
|
27386
27374
|
"Mod-Delete": () => Ko(this.editor),
|
|
27387
27375
|
"Mod-a": () => this.editor.commands.selectAll(),
|
|
@@ -27390,8 +27378,8 @@ const QM = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
27390
27378
|
...t
|
|
27391
27379
|
}, n = {
|
|
27392
27380
|
...t,
|
|
27393
|
-
"Ctrl-h": () =>
|
|
27394
|
-
"Alt-Backspace": () =>
|
|
27381
|
+
"Ctrl-h": () => Xi(this.editor),
|
|
27382
|
+
"Alt-Backspace": () => Xi(this.editor),
|
|
27395
27383
|
"Ctrl-d": () => Ko(this.editor),
|
|
27396
27384
|
"Ctrl-Alt-Backspace": () => Ko(this.editor),
|
|
27397
27385
|
"Alt-Delete": () => Ko(this.editor),
|
|
@@ -27508,7 +27496,7 @@ const Bp = ({
|
|
|
27508
27496
|
author: r.name,
|
|
27509
27497
|
authorEmail: r.email,
|
|
27510
27498
|
date: o
|
|
27511
|
-
}), l = new
|
|
27499
|
+
}), l = new bi();
|
|
27512
27500
|
let c = [];
|
|
27513
27501
|
return t.doc.nodesBetween(e, n, (u, d) => {
|
|
27514
27502
|
if (!u.type.name.includes("table"))
|
|
@@ -28386,7 +28374,7 @@ const nx = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
28386
28374
|
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
28375
|
const p = c.marks.find((y) => y.type.name === $t);
|
|
28388
28376
|
let h = [], m = [];
|
|
28389
|
-
if (p ? p.attrs.before.find((y) => y.type === "textStyle" ? y.type === n.mark.type.name &&
|
|
28377
|
+
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
28378
|
...p.attrs.after,
|
|
28391
28379
|
{
|
|
28392
28380
|
type: n.mark.type.name,
|
|
@@ -28461,7 +28449,7 @@ const nx = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
28461
28449
|
const r = ["inputType", "uiEvent", "paste", "pointer"], o = ["historyUndo", "historyRedo", "acceptReject"];
|
|
28462
28450
|
if (!t.steps.length || t.meta && !Object.keys(t.meta).every((c) => r.includes(c)) || o.includes(t.getMeta("inputType")) || t.getMeta(Nt))
|
|
28463
28451
|
return t;
|
|
28464
|
-
const i = e.tr, s = new
|
|
28452
|
+
const i = e.tr, s = new bi(), a = Math.floor(Date.now() / 6e5) * 6e5, l = new Date(a).toISOString();
|
|
28465
28453
|
if (t.steps.forEach((c, u) => {
|
|
28466
28454
|
const d = c.map(s), { doc: f } = i;
|
|
28467
28455
|
d && (d instanceof Pt ? (nx({
|
|
@@ -28535,7 +28523,7 @@ const nx = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
28535
28523
|
}, Jy = (t) => {
|
|
28536
28524
|
if (t === "initial" || t === "0.4.14") return Object.values(RD);
|
|
28537
28525
|
};
|
|
28538
|
-
var ci, sx, Ke, ax, lx, Vu, cx, gf, yf, Hu, Wu, wf, bf, Gu, Ku, Ju, Xy,
|
|
28526
|
+
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
28527
|
const LD = class fx extends F5 {
|
|
28540
28528
|
constructor(e) {
|
|
28541
28529
|
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 +28799,7 @@ const LD = class fx extends F5 {
|
|
|
28811
28799
|
* Get HTML string of the document
|
|
28812
28800
|
*/
|
|
28813
28801
|
getHTML() {
|
|
28814
|
-
const e = document.createElement("div"), n =
|
|
28802
|
+
const e = document.createElement("div"), n = Pi.fromSchema(this.schema).serializeFragment(this.state.doc.content);
|
|
28815
28803
|
return e.appendChild(n), e.innerHTML;
|
|
28816
28804
|
}
|
|
28817
28805
|
/**
|
|
@@ -28889,7 +28877,7 @@ const LD = class fx extends F5 {
|
|
|
28889
28877
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
28890
28878
|
*/
|
|
28891
28879
|
processCollaborationMigrations() {
|
|
28892
|
-
if (console.debug("[checkVersionMigrations] Current editor version", "0.
|
|
28880
|
+
if (console.debug("[checkVersionMigrations] Current editor version", "0.10.2"), !this.options.ydoc) return;
|
|
28893
28881
|
let e = this.options.ydoc.getMap("meta").get("version");
|
|
28894
28882
|
e || (e = "initial"), console.debug("[checkVersionMigrations] Document version", e);
|
|
28895
28883
|
const n = Jy(e) || [], r = this.state.plugins.find((i) => i.key.startsWith("y-sync"));
|
|
@@ -28911,11 +28899,11 @@ const LD = class fx extends F5 {
|
|
|
28911
28899
|
isNewFile: !0,
|
|
28912
28900
|
shouldLoadComments: !0,
|
|
28913
28901
|
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,
|
|
28902
|
+
}), 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
28903
|
}
|
|
28916
28904
|
};
|
|
28917
28905
|
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,
|
|
28906
|
+
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
28907
|
this.isDestroyed || this.emit("create", { editor: this });
|
|
28920
28908
|
}, 0));
|
|
28921
28909
|
}, lx = function(t) {
|
|
@@ -28935,7 +28923,7 @@ gf = function() {
|
|
|
28935
28923
|
this.options.isNewFile = !1;
|
|
28936
28924
|
const t = Be(this, Ke, Ku).call(this), e = this.state.tr.replaceWith(0, this.state.doc.content.size, t);
|
|
28937
28925
|
this.view.dispatch(e), setTimeout(() => {
|
|
28938
|
-
Be(this, Ke,
|
|
28926
|
+
Be(this, Ke, hs).call(this), Be(this, Ke, ps).call(this);
|
|
28939
28927
|
}, 50);
|
|
28940
28928
|
}, yf = function(t) {
|
|
28941
28929
|
const e = this.extensionService?.plugins.find((r) => r.key.startsWith(t)), n = this.state.plugins.find((r) => r.key.startsWith(t));
|
|
@@ -29022,11 +29010,11 @@ Ju = function() {
|
|
|
29022
29010
|
const r = this.view.dom;
|
|
29023
29011
|
r.editor = this, this.options.telemetry?.sendReport();
|
|
29024
29012
|
}, 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,
|
|
29013
|
+
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
29014
|
}, /**
|
|
29027
29015
|
* Initialize comments plugin
|
|
29028
29016
|
*/
|
|
29029
|
-
|
|
29017
|
+
ps = function() {
|
|
29030
29018
|
if (!this.options.isCommentsEnabled || this.options.isHeadless || !this.options.shouldLoadComments) return;
|
|
29031
29019
|
const t = this.options.replacedFile;
|
|
29032
29020
|
this.emit("commentsLoaded", { editor: this, replacedFile: t, comments: this.converter.comments || [] }), setTimeout(() => {
|
|
@@ -29034,7 +29022,7 @@ hs = function() {
|
|
|
29034
29022
|
const { state: e, dispatch: n } = this.view, r = e.tr.setMeta(Nt, { type: "force" });
|
|
29035
29023
|
n(r);
|
|
29036
29024
|
}, 50);
|
|
29037
|
-
},
|
|
29025
|
+
}, hs = async function() {
|
|
29038
29026
|
if (!(this.options.isHeadless || !this.extensionService) && this.options.extensions.find((t) => t.name === "pagination") && this.options.pagination) {
|
|
29039
29027
|
console.debug("🔗 [super-editor] Initializing pagination");
|
|
29040
29028
|
const t = await ED(this);
|
|
@@ -31317,7 +31305,7 @@ function Gt(t) {
|
|
|
31317
31305
|
return e;
|
|
31318
31306
|
}
|
|
31319
31307
|
var qr = new lt("selectingCells");
|
|
31320
|
-
function
|
|
31308
|
+
function Ui(t) {
|
|
31321
31309
|
for (let e = t.depth - 1; e > 0; e--)
|
|
31322
31310
|
if (t.node(e).type.spec.tableRole == "row")
|
|
31323
31311
|
return t.node(0).resolve(t.before(e + 1));
|
|
@@ -31342,7 +31330,7 @@ function pc(t) {
|
|
|
31342
31330
|
return e.$anchorCell.pos > e.$headCell.pos ? e.$anchorCell : e.$headCell;
|
|
31343
31331
|
if ("node" in e && e.node && e.node.type.spec.tableRole == "cell")
|
|
31344
31332
|
return e.$anchor;
|
|
31345
|
-
const n =
|
|
31333
|
+
const n = Ui(e.$head) || U_(e.$head);
|
|
31346
31334
|
if (n)
|
|
31347
31335
|
return n;
|
|
31348
31336
|
throw new RangeError(`No cell found around position ${e.head}`);
|
|
@@ -31929,7 +31917,7 @@ function c8(t) {
|
|
|
31929
31917
|
i = o.$anchorCell.nodeAfter, s = o.$anchorCell.pos;
|
|
31930
31918
|
} else {
|
|
31931
31919
|
if (i = q_(o.$from), !i) return !1;
|
|
31932
|
-
s = (r =
|
|
31920
|
+
s = (r = Ui(o.$from)) == null ? void 0 : r.pos;
|
|
31933
31921
|
}
|
|
31934
31922
|
if (i == null || s == null || i.attrs.colspan == 1 && i.attrs.rowspan == 1)
|
|
31935
31923
|
return !1;
|
|
@@ -32394,7 +32382,7 @@ function Ta(t, e) {
|
|
|
32394
32382
|
};
|
|
32395
32383
|
}
|
|
32396
32384
|
function v8(t, e) {
|
|
32397
|
-
const n = t.state.doc, r =
|
|
32385
|
+
const n = t.state.doc, r = Ui(n.resolve(e));
|
|
32398
32386
|
return r ? (t.dispatch(t.state.tr.setSelection(new nt(r))), !0) : !1;
|
|
32399
32387
|
}
|
|
32400
32388
|
function x8(t, e, n) {
|
|
@@ -32435,7 +32423,7 @@ function k8(t, e) {
|
|
|
32435
32423
|
let o;
|
|
32436
32424
|
if (e.shiftKey && t.state.selection instanceof nt)
|
|
32437
32425
|
i(t.state.selection.$anchorCell, e), e.preventDefault();
|
|
32438
|
-
else if (e.shiftKey && r && (o =
|
|
32426
|
+
else if (e.shiftKey && r && (o = Ui(t.state.selection.$anchor)) != null && ((n = Yu(t, e)) == null ? void 0 : n.pos) != o.pos)
|
|
32439
32427
|
i(o, e), e.preventDefault();
|
|
32440
32428
|
else if (!r)
|
|
32441
32429
|
return;
|
|
@@ -32489,7 +32477,7 @@ function Yu(t, e) {
|
|
|
32489
32477
|
left: e.clientX,
|
|
32490
32478
|
top: e.clientY
|
|
32491
32479
|
});
|
|
32492
|
-
return n && n ?
|
|
32480
|
+
return n && n ? Ui(t.state.doc.resolve(n.pos)) : null;
|
|
32493
32481
|
}
|
|
32494
32482
|
var S8 = class {
|
|
32495
32483
|
constructor(t, e) {
|
|
@@ -32688,7 +32676,7 @@ function bw(t, e, n, r) {
|
|
|
32688
32676
|
top: e.clientY
|
|
32689
32677
|
});
|
|
32690
32678
|
if (!i) return -1;
|
|
32691
|
-
const { pos: s } = i, a =
|
|
32679
|
+
const { pos: s } = i, a = Ui(t.state.doc.resolve(s));
|
|
32692
32680
|
if (!a) return -1;
|
|
32693
32681
|
if (n == "right") return a.pos;
|
|
32694
32682
|
const l = mt.get(a.node(-1)), c = a.start(-1), u = l.map.indexOf(a.pos - c);
|
|
@@ -33439,9 +33427,9 @@ class H8 extends Error {
|
|
|
33439
33427
|
super(`Failed to parse color: "${e}"`);
|
|
33440
33428
|
}
|
|
33441
33429
|
}
|
|
33442
|
-
var
|
|
33430
|
+
var ms = H8;
|
|
33443
33431
|
function W8(t) {
|
|
33444
|
-
if (typeof t != "string") throw new
|
|
33432
|
+
if (typeof t != "string") throw new ms(t);
|
|
33445
33433
|
if (t.trim().toLowerCase() === "transparent") return [0, 0, 0, 0];
|
|
33446
33434
|
let e = t.trim();
|
|
33447
33435
|
e = eI.test(t) ? J8(t) : t;
|
|
@@ -33463,11 +33451,11 @@ function W8(t) {
|
|
|
33463
33451
|
const i = Q8.exec(e);
|
|
33464
33452
|
if (i) {
|
|
33465
33453
|
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
|
|
33454
|
+
if (Cf(0, 100, a) !== a) throw new ms(t);
|
|
33455
|
+
if (Cf(0, 100, l) !== l) throw new ms(t);
|
|
33468
33456
|
return [...tI(s, a, l), Number.isNaN(c) ? 1 : c];
|
|
33469
33457
|
}
|
|
33470
|
-
throw new
|
|
33458
|
+
throw new ms(t);
|
|
33471
33459
|
}
|
|
33472
33460
|
function G8(t) {
|
|
33473
33461
|
let e = 5381, n = t.length;
|
|
@@ -33484,7 +33472,7 @@ const kw = (t) => parseInt(t.replace(/_/g, ""), 36), K8 = "1q29ehhb 1n09sgk7 1kl
|
|
|
33484
33472
|
}, {});
|
|
33485
33473
|
function J8(t) {
|
|
33486
33474
|
const e = t.toLowerCase().trim(), n = K8[G8(e)];
|
|
33487
|
-
if (!n) throw new
|
|
33475
|
+
if (!n) throw new ms(t);
|
|
33488
33476
|
return `#${n}`;
|
|
33489
33477
|
}
|
|
33490
33478
|
const Ws = (t, e) => Array.from(Array(e)).map(() => t).join(""), X8 = new RegExp(`^#${Ws("([a-f0-9])", 3)}([a-f0-9])?$`, "i"), Y8 = new RegExp(`^#${Ws("([a-f0-9]{2})", 3)}([a-f0-9]{2})?$`, "i"), Z8 = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Ws(",\\s*(\\d+)\\s*", 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, "i"), Q8 = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i, eI = /^[a-z]+$/i, Sw = (t) => Math.round(t * 255), tI = (t, e, n) => {
|
|
@@ -34668,7 +34656,7 @@ const uI = "track-insert", dk = Pn.create({
|
|
|
34668
34656
|
acceptTrackedChangesBetween: (t, e) => ({ state: n, dispatch: r }) => {
|
|
34669
34657
|
let { tr: o, doc: i } = n;
|
|
34670
34658
|
o.setMeta("acceptReject", !0);
|
|
34671
|
-
const s = new
|
|
34659
|
+
const s = new bi();
|
|
34672
34660
|
return i.nodesBetween(t, e, (a, l) => {
|
|
34673
34661
|
if (a.marks && a.marks.find((c) => c.type.name === yt)) {
|
|
34674
34662
|
const c = new Pt(
|
|
@@ -34701,7 +34689,7 @@ const uI = "track-insert", dk = Pn.create({
|
|
|
34701
34689
|
rejectTrackedChangesBetween: (t, e) => ({ state: n, dispatch: r }) => {
|
|
34702
34690
|
const { tr: o, doc: i } = n;
|
|
34703
34691
|
o.setMeta("acceptReject", !0);
|
|
34704
|
-
const s = new
|
|
34692
|
+
const s = new bi();
|
|
34705
34693
|
return i.nodesBetween(t, e, (a, l) => {
|
|
34706
34694
|
if (a.marks && a.marks.find((c) => c.type.name === yt)) {
|
|
34707
34695
|
const c = a.marks.find((u) => u.type.name === yt);
|
|
@@ -34861,10 +34849,10 @@ const uI = "track-insert", dk = Pn.create({
|
|
|
34861
34849
|
})];
|
|
34862
34850
|
}
|
|
34863
34851
|
});
|
|
34864
|
-
var un = "top", _n = "bottom", In = "right", dn = "left", Wp = "auto", ua = [un, _n, In, dn],
|
|
34865
|
-
return t.concat([e + "-" +
|
|
34852
|
+
var un = "top", _n = "bottom", In = "right", dn = "left", Wp = "auto", ua = [un, _n, In, dn], Mi = "start", Gs = "end", hI = "clippingParents", mk = "viewport", Yi = "popper", mI = "reference", Ew = /* @__PURE__ */ ua.reduce(function(t, e) {
|
|
34853
|
+
return t.concat([e + "-" + Mi, e + "-" + Gs]);
|
|
34866
34854
|
}, []), gk = /* @__PURE__ */ [].concat(ua, [Wp]).reduce(function(t, e) {
|
|
34867
|
-
return t.concat([e, e + "-" +
|
|
34855
|
+
return t.concat([e, e + "-" + Mi, e + "-" + Gs]);
|
|
34868
34856
|
}, []), gI = "beforeRead", yI = "read", wI = "afterRead", bI = "beforeMain", vI = "main", xI = "afterMain", kI = "beforeWrite", SI = "write", AI = "afterWrite", CI = [gI, yI, wI, bI, vI, xI, kI, SI, AI];
|
|
34869
34857
|
function ir(t) {
|
|
34870
34858
|
return t ? (t.nodeName || "").toLowerCase() : null;
|
|
@@ -34937,7 +34925,7 @@ const yk = {
|
|
|
34937
34925
|
function tr(t) {
|
|
34938
34926
|
return t.split("-")[0];
|
|
34939
34927
|
}
|
|
34940
|
-
var To = Math.max, Pl = Math.min,
|
|
34928
|
+
var To = Math.max, Pl = Math.min, Di = Math.round;
|
|
34941
34929
|
function $f() {
|
|
34942
34930
|
var t = navigator.userAgentData;
|
|
34943
34931
|
return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
|
|
@@ -34947,10 +34935,10 @@ function $f() {
|
|
|
34947
34935
|
function wk() {
|
|
34948
34936
|
return !/^((?!chrome|android).)*safari/i.test($f());
|
|
34949
34937
|
}
|
|
34950
|
-
function
|
|
34938
|
+
function _i(t, e, n) {
|
|
34951
34939
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
34952
34940
|
var r = t.getBoundingClientRect(), o = 1, i = 1;
|
|
34953
|
-
e && Dn(t) && (o = t.offsetWidth > 0 &&
|
|
34941
|
+
e && Dn(t) && (o = t.offsetWidth > 0 && Di(r.width) / t.offsetWidth || 1, i = t.offsetHeight > 0 && Di(r.height) / t.offsetHeight || 1);
|
|
34954
34942
|
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
34943
|
return {
|
|
34956
34944
|
width: d,
|
|
@@ -34964,7 +34952,7 @@ function Ii(t, e, n) {
|
|
|
34964
34952
|
};
|
|
34965
34953
|
}
|
|
34966
34954
|
function Kp(t) {
|
|
34967
|
-
var e =
|
|
34955
|
+
var e = _i(t), n = t.offsetWidth, r = t.offsetHeight;
|
|
34968
34956
|
return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), {
|
|
34969
34957
|
x: t.offsetLeft,
|
|
34970
34958
|
y: t.offsetTop,
|
|
@@ -35038,11 +35026,11 @@ function da(t) {
|
|
|
35038
35026
|
function Jp(t) {
|
|
35039
35027
|
return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
|
|
35040
35028
|
}
|
|
35041
|
-
function
|
|
35029
|
+
function Cs(t, e, n) {
|
|
35042
35030
|
return To(t, Pl(e, n));
|
|
35043
35031
|
}
|
|
35044
35032
|
function MI(t, e, n) {
|
|
35045
|
-
var r =
|
|
35033
|
+
var r = Cs(t, e, n);
|
|
35046
35034
|
return r > n ? n : r;
|
|
35047
35035
|
}
|
|
35048
35036
|
function vk() {
|
|
@@ -35069,7 +35057,7 @@ var DI = function(t, e) {
|
|
|
35069
35057
|
function _I(t) {
|
|
35070
35058
|
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
35059
|
if (!(!i || !s)) {
|
|
35072
|
-
var d = DI(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 =
|
|
35060
|
+
var d = DI(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
35061
|
n.modifiersData[r] = (e = {}, e[N] = M, e.centerOffset = M - O, e);
|
|
35074
35062
|
}
|
|
35075
35063
|
}
|
|
@@ -35086,7 +35074,7 @@ const NI = {
|
|
|
35086
35074
|
requires: ["popperOffsets"],
|
|
35087
35075
|
requiresIfExists: ["preventOverflow"]
|
|
35088
35076
|
};
|
|
35089
|
-
function
|
|
35077
|
+
function Ii(t) {
|
|
35090
35078
|
return t.split("-")[1];
|
|
35091
35079
|
}
|
|
35092
35080
|
var FI = {
|
|
@@ -35098,8 +35086,8 @@ var FI = {
|
|
|
35098
35086
|
function RI(t, e) {
|
|
35099
35087
|
var n = t.x, r = t.y, o = e.devicePixelRatio || 1;
|
|
35100
35088
|
return {
|
|
35101
|
-
x:
|
|
35102
|
-
y:
|
|
35089
|
+
x: Di(n * o) / o || 0,
|
|
35090
|
+
y: Di(r * o) / o || 0
|
|
35103
35091
|
};
|
|
35104
35092
|
}
|
|
35105
35093
|
function $w(t) {
|
|
@@ -35149,7 +35137,7 @@ function $w(t) {
|
|
|
35149
35137
|
function LI(t) {
|
|
35150
35138
|
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
35139
|
placement: tr(e.placement),
|
|
35152
|
-
variation:
|
|
35140
|
+
variation: Ii(e.placement),
|
|
35153
35141
|
popper: e.elements.popper,
|
|
35154
35142
|
popperRect: e.rects.popper,
|
|
35155
35143
|
gpuAcceleration: o,
|
|
@@ -35226,7 +35214,7 @@ function Xp(t) {
|
|
|
35226
35214
|
};
|
|
35227
35215
|
}
|
|
35228
35216
|
function Yp(t) {
|
|
35229
|
-
return
|
|
35217
|
+
return _i(oo(t)).left + Xp(t).scrollLeft;
|
|
35230
35218
|
}
|
|
35231
35219
|
function UI(t, e) {
|
|
35232
35220
|
var n = Sn(t), r = oo(t), o = n.visualViewport, i = r.clientWidth, s = r.clientHeight, a = 0, l = 0;
|
|
@@ -35258,13 +35246,13 @@ function Zp(t) {
|
|
|
35258
35246
|
function Sk(t) {
|
|
35259
35247
|
return ["html", "body", "#document"].indexOf(ir(t)) >= 0 ? t.ownerDocument.body : Dn(t) && Zp(t) ? t : Sk(hc(t));
|
|
35260
35248
|
}
|
|
35261
|
-
function
|
|
35249
|
+
function Es(t, e) {
|
|
35262
35250
|
var n;
|
|
35263
35251
|
e === void 0 && (e = []);
|
|
35264
35252
|
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
35253
|
return o ? a : (
|
|
35266
35254
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
35267
|
-
a.concat(
|
|
35255
|
+
a.concat(Es(hc(s)))
|
|
35268
35256
|
);
|
|
35269
35257
|
}
|
|
35270
35258
|
function Of(t) {
|
|
@@ -35276,14 +35264,14 @@ function Of(t) {
|
|
|
35276
35264
|
});
|
|
35277
35265
|
}
|
|
35278
35266
|
function HI(t, e) {
|
|
35279
|
-
var n =
|
|
35267
|
+
var n = _i(t, !1, e === "fixed");
|
|
35280
35268
|
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
35269
|
}
|
|
35282
35270
|
function Mw(t, e, n) {
|
|
35283
35271
|
return e === mk ? Of(UI(t, n)) : Ro(e) ? HI(e, n) : Of(VI(oo(t)));
|
|
35284
35272
|
}
|
|
35285
35273
|
function WI(t) {
|
|
35286
|
-
var e =
|
|
35274
|
+
var e = Es(hc(t)), n = ["absolute", "fixed"].indexOf(Er(t).position) >= 0, r = n && Dn(t) ? da(t) : t;
|
|
35287
35275
|
return Ro(r) ? e.filter(function(o) {
|
|
35288
35276
|
return Ro(o) && bk(o, r) && ir(o) !== "body";
|
|
35289
35277
|
}) : [];
|
|
@@ -35296,7 +35284,7 @@ function GI(t, e, n, r) {
|
|
|
35296
35284
|
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
35297
35285
|
}
|
|
35298
35286
|
function Ak(t) {
|
|
35299
|
-
var e = t.reference, n = t.element, r = t.placement, o = r ? tr(r) : null, i = r ?
|
|
35287
|
+
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
35288
|
switch (o) {
|
|
35301
35289
|
case un:
|
|
35302
35290
|
l = {
|
|
@@ -35332,7 +35320,7 @@ function Ak(t) {
|
|
|
35332
35320
|
if (c != null) {
|
|
35333
35321
|
var u = c === "y" ? "height" : "width";
|
|
35334
35322
|
switch (i) {
|
|
35335
|
-
case
|
|
35323
|
+
case Mi:
|
|
35336
35324
|
l[c] = l[c] - (e[u] / 2 - n[u] / 2);
|
|
35337
35325
|
break;
|
|
35338
35326
|
case Gs:
|
|
@@ -35344,17 +35332,17 @@ function Ak(t) {
|
|
|
35344
35332
|
}
|
|
35345
35333
|
function Ks(t, e) {
|
|
35346
35334
|
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 ? hI : a, c = n.rootBoundary, u = c === void 0 ? mk : c, d = n.elementContext, f = d === void 0 ?
|
|
35335
|
+
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 ? hI : 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 ? mI : Yi, x = t.rects.popper, w = t.elements[h ? v : f], T = GI(Ro(w) ? w : w.contextElement || oo(t.elements.popper), l, u, s), O = _i(t.elements.reference), M = Ak({
|
|
35348
35336
|
reference: O,
|
|
35349
35337
|
element: x,
|
|
35350
35338
|
placement: o
|
|
35351
|
-
}), N = Of(Object.assign({}, x, M)), S = f ===
|
|
35339
|
+
}), N = Of(Object.assign({}, x, M)), S = f === Yi ? N : O, W = {
|
|
35352
35340
|
top: T.top - S.top + g.top,
|
|
35353
35341
|
bottom: S.bottom - T.bottom + g.bottom,
|
|
35354
35342
|
left: T.left - S.left + g.left,
|
|
35355
35343
|
right: S.right - T.right + g.right
|
|
35356
35344
|
}, oe = t.modifiersData.offset;
|
|
35357
|
-
if (f ===
|
|
35345
|
+
if (f === Yi && oe) {
|
|
35358
35346
|
var _ = oe[o];
|
|
35359
35347
|
Object.keys(W).forEach(function(V) {
|
|
35360
35348
|
var C = [In, _n].indexOf(V) >= 0 ? 1 : -1, G = [un, _n].indexOf(V) >= 0 ? "y" : "x";
|
|
@@ -35365,8 +35353,8 @@ function Ks(t, e) {
|
|
|
35365
35353
|
}
|
|
35366
35354
|
function KI(t, e) {
|
|
35367
35355
|
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
|
|
35356
|
+
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) {
|
|
35357
|
+
return Ii(h) === u;
|
|
35370
35358
|
}) : ua, f = d.filter(function(h) {
|
|
35371
35359
|
return c.indexOf(h) >= 0;
|
|
35372
35360
|
});
|
|
@@ -35402,7 +35390,7 @@ function XI(t) {
|
|
|
35402
35390
|
allowedAutoPlacements: m
|
|
35403
35391
|
}) : ne);
|
|
35404
35392
|
}, []), 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 =
|
|
35393
|
+
var oe = w[W], _ = tr(oe), V = Ii(oe) === Mi, C = [un, _n].indexOf(_) >= 0, G = C ? "width" : "height", se = Ks(e, {
|
|
35406
35394
|
placement: oe,
|
|
35407
35395
|
boundary: u,
|
|
35408
35396
|
rootBoundary: d,
|
|
@@ -35535,7 +35523,7 @@ function sN(t) {
|
|
|
35535
35523
|
rootBoundary: c,
|
|
35536
35524
|
padding: d,
|
|
35537
35525
|
altBoundary: u
|
|
35538
|
-
}), g = tr(e.placement), v =
|
|
35526
|
+
}), g = tr(e.placement), v = Ii(e.placement), x = !v, w = Jp(g), T = iN(w), O = e.modifiersData.popperOffsets, M = e.rects.reference, N = e.rects.popper, S = typeof m == "function" ? m(Object.assign({}, e.rects, {
|
|
35539
35527
|
placement: e.placement
|
|
35540
35528
|
})) : m, W = typeof S == "number" ? {
|
|
35541
35529
|
mainAxis: S,
|
|
@@ -35549,14 +35537,14 @@ function sN(t) {
|
|
|
35549
35537
|
};
|
|
35550
35538
|
if (O) {
|
|
35551
35539
|
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 ===
|
|
35540
|
+
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
35541
|
width: 0,
|
|
35554
35542
|
height: 0
|
|
35555
|
-
}, ne = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : vk(), K = ne[C], E = ne[G], A =
|
|
35543
|
+
}, 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
35544
|
O[w] = ee, _[w] = ee - U;
|
|
35557
35545
|
}
|
|
35558
35546
|
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 ? MI(be, de, Re) :
|
|
35547
|
+
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 ? MI(be, de, Re) : Cs(p ? be : ie, de, p ? Re : me);
|
|
35560
35548
|
O[T] = $e, _[T] = $e - de;
|
|
35561
35549
|
}
|
|
35562
35550
|
e.modifiersData[r] = _;
|
|
@@ -35579,12 +35567,12 @@ function cN(t) {
|
|
|
35579
35567
|
return t === Sn(t) || !Dn(t) ? Xp(t) : lN(t);
|
|
35580
35568
|
}
|
|
35581
35569
|
function uN(t) {
|
|
35582
|
-
var e = t.getBoundingClientRect(), n =
|
|
35570
|
+
var e = t.getBoundingClientRect(), n = Di(e.width) / t.offsetWidth || 1, r = Di(e.height) / t.offsetHeight || 1;
|
|
35583
35571
|
return n !== 1 || r !== 1;
|
|
35584
35572
|
}
|
|
35585
35573
|
function dN(t, e, n) {
|
|
35586
35574
|
n === void 0 && (n = !1);
|
|
35587
|
-
var r = Dn(e), o = Dn(e) && uN(e), i = oo(e), s =
|
|
35575
|
+
var r = Dn(e), o = Dn(e) && uN(e), i = oo(e), s = _i(t, o, n), a = {
|
|
35588
35576
|
scrollLeft: 0,
|
|
35589
35577
|
scrollTop: 0
|
|
35590
35578
|
}, l = {
|
|
@@ -35592,7 +35580,7 @@ function dN(t, e, n) {
|
|
|
35592
35580
|
y: 0
|
|
35593
35581
|
};
|
|
35594
35582
|
return (r || !r && !n) && ((ir(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
35595
|
-
Zp(i)) && (a = cN(e)), Dn(e) ? (l =
|
|
35583
|
+
Zp(i)) && (a = cN(e)), Dn(e) ? (l = _i(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : i && (l.x = Yp(i))), {
|
|
35596
35584
|
x: s.left + a.scrollLeft - l.x,
|
|
35597
35585
|
y: s.top + a.scrollTop - l.y,
|
|
35598
35586
|
width: s.width,
|
|
@@ -35681,8 +35669,8 @@ function gN(t) {
|
|
|
35681
35669
|
setOptions: function(m) {
|
|
35682
35670
|
var y = typeof m == "function" ? m(c.options) : m;
|
|
35683
35671
|
h(), c.options = Object.assign({}, i, c.options, y), c.scrollParents = {
|
|
35684
|
-
reference: Ro(s) ?
|
|
35685
|
-
popper:
|
|
35672
|
+
reference: Ro(s) ? Es(s) : s.contextElement ? Es(s.contextElement) : [],
|
|
35673
|
+
popper: Es(a)
|
|
35686
35674
|
};
|
|
35687
35675
|
var g = pN(mN([].concat(r, c.options.modifiers)));
|
|
35688
35676
|
return c.orderedModifiers = g.filter(function(v) {
|
|
@@ -35825,7 +35813,7 @@ function Lw(t) {
|
|
|
35825
35813
|
return t[n] !== void 0 && (e[n] = t[n]), e;
|
|
35826
35814
|
}, {});
|
|
35827
35815
|
}
|
|
35828
|
-
function
|
|
35816
|
+
function Ts() {
|
|
35829
35817
|
return document.createElement("div");
|
|
35830
35818
|
}
|
|
35831
35819
|
function Js(t) {
|
|
@@ -36086,7 +36074,7 @@ function Df(t, e) {
|
|
|
36086
36074
|
t[VN()] = e;
|
|
36087
36075
|
}
|
|
36088
36076
|
function Uw(t) {
|
|
36089
|
-
var e =
|
|
36077
|
+
var e = Ts();
|
|
36090
36078
|
return t === !0 ? e.className = Ek : (e.className = Tk, Js(t) ? e.appendChild(t) : Df(e, t)), e;
|
|
36091
36079
|
}
|
|
36092
36080
|
function Vw(t, e) {
|
|
@@ -36108,9 +36096,9 @@ function _f(t) {
|
|
|
36108
36096
|
};
|
|
36109
36097
|
}
|
|
36110
36098
|
function Fk(t) {
|
|
36111
|
-
var e =
|
|
36099
|
+
var e = Ts(), n = Ts();
|
|
36112
36100
|
n.className = bN, n.setAttribute("data-state", "hidden"), n.setAttribute("tabindex", "-1");
|
|
36113
|
-
var r =
|
|
36101
|
+
var r = Ts();
|
|
36114
36102
|
r.className = Ck, r.setAttribute("data-state", "hidden"), Vw(r, t.props), e.appendChild(n), n.appendChild(r), o(t.props, t.props);
|
|
36115
36103
|
function o(i, s) {
|
|
36116
36104
|
var a = _f(e), l = a.box, c = a.content, u = a.arrow;
|
|
@@ -36139,7 +36127,7 @@ function WN(t, e) {
|
|
|
36139
36127
|
// properties
|
|
36140
36128
|
id: y,
|
|
36141
36129
|
reference: t,
|
|
36142
|
-
popper:
|
|
36130
|
+
popper: Ts(),
|
|
36143
36131
|
popperInstance: g,
|
|
36144
36132
|
props: n,
|
|
36145
36133
|
state: x,
|
|
@@ -36369,9 +36357,9 @@ function WN(t, e) {
|
|
|
36369
36357
|
fn: function(jn) {
|
|
36370
36358
|
var Dr = jn.state;
|
|
36371
36359
|
if (_()) {
|
|
36372
|
-
var Ec = G(),
|
|
36360
|
+
var Ec = G(), Gi = Ec.box;
|
|
36373
36361
|
["placement", "reference-hidden", "escaped"].forEach(function(Vo) {
|
|
36374
|
-
Vo === "placement" ?
|
|
36362
|
+
Vo === "placement" ? Gi.setAttribute("data-placement", Dr.placement) : Dr.attributes.popper["data-popper-" + Vo] ? Gi.setAttribute("data-" + Vo, "") : Gi.removeAttribute("data-" + Vo);
|
|
36375
36363
|
}), Dr.attributes.popper = {};
|
|
36376
36364
|
}
|
|
36377
36365
|
}
|
|
@@ -37297,7 +37285,7 @@ const Gw = (t) => {
|
|
|
37297
37285
|
}
|
|
37298
37286
|
},
|
|
37299
37287
|
setup(t) {
|
|
37300
|
-
const { proxy: e } =
|
|
37288
|
+
const { proxy: e } = Fi(), n = t, r = we(!1), o = Ae(() => ({
|
|
37301
37289
|
...n.toolbarItem,
|
|
37302
37290
|
active: r
|
|
37303
37291
|
})), i = () => {
|
|
@@ -37673,7 +37661,7 @@ const {
|
|
|
37673
37661
|
cB: tt,
|
|
37674
37662
|
cE: Xt,
|
|
37675
37663
|
cM: pt,
|
|
37676
|
-
cNotM:
|
|
37664
|
+
cNotM: $s
|
|
37677
37665
|
} = Uk, FR = (...t) => We(">", [tt(...t)]);
|
|
37678
37666
|
function Lr(t, e) {
|
|
37679
37667
|
return t + (e === "default" ? "" : e.replace(/^[a-z]/, (n) => n.toUpperCase()));
|
|
@@ -37705,7 +37693,7 @@ function n0(t) {
|
|
|
37705
37693
|
if (t != null)
|
|
37706
37694
|
return typeof t == "number" ? `${t}px` : t.endsWith("px") ? t : `${t}px`;
|
|
37707
37695
|
}
|
|
37708
|
-
function
|
|
37696
|
+
function gs(t, e) {
|
|
37709
37697
|
const n = t.trim().split(/\s+/g), r = {
|
|
37710
37698
|
top: n[0]
|
|
37711
37699
|
};
|
|
@@ -38266,23 +38254,23 @@ function Cr(t) {
|
|
|
38266
38254
|
};
|
|
38267
38255
|
}
|
|
38268
38256
|
function iL() {
|
|
38269
|
-
return
|
|
38257
|
+
return Fi() !== null;
|
|
38270
38258
|
}
|
|
38271
38259
|
const sL = typeof window < "u";
|
|
38272
|
-
let al,
|
|
38260
|
+
let al, Os;
|
|
38273
38261
|
const aL = () => {
|
|
38274
38262
|
var t, e;
|
|
38275
|
-
al = sL ? (e = (t = document) === null || t === void 0 ? void 0 : t.fonts) === null || e === void 0 ? void 0 : e.ready : void 0,
|
|
38276
|
-
|
|
38277
|
-
}) :
|
|
38263
|
+
al = sL ? (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(() => {
|
|
38264
|
+
Os = !0;
|
|
38265
|
+
}) : Os = !0;
|
|
38278
38266
|
};
|
|
38279
38267
|
aL();
|
|
38280
38268
|
function lL(t) {
|
|
38281
|
-
if (
|
|
38269
|
+
if (Os)
|
|
38282
38270
|
return;
|
|
38283
38271
|
let e = !1;
|
|
38284
38272
|
An(() => {
|
|
38285
|
-
|
|
38273
|
+
Os || al?.then(() => {
|
|
38286
38274
|
e || t();
|
|
38287
38275
|
});
|
|
38288
38276
|
}), Bn(() => {
|
|
@@ -38382,7 +38370,7 @@ function fL(t = {}, e) {
|
|
|
38382
38370
|
})) : a(), dl(n);
|
|
38383
38371
|
}
|
|
38384
38372
|
const pL = "n-internal-select-menu-body", eh = "n-drawer-body", th = "n-modal-body", gc = "n-popover-body", Qk = "__disabled__";
|
|
38385
|
-
function
|
|
38373
|
+
function Ni(t) {
|
|
38386
38374
|
const e = vt(th, null), n = vt(eh, null), r = vt(gc, null), o = vt(pL, null), i = we();
|
|
38387
38375
|
if (typeof document < "u") {
|
|
38388
38376
|
i.value = document.fullscreenElement;
|
|
@@ -38403,8 +38391,8 @@ function Fi(t) {
|
|
|
38403
38391
|
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
38392
|
});
|
|
38405
38393
|
}
|
|
38406
|
-
|
|
38407
|
-
|
|
38394
|
+
Ni.tdkey = Qk;
|
|
38395
|
+
Ni.propTo = {
|
|
38408
38396
|
type: [String, Object, Boolean],
|
|
38409
38397
|
default: void 0
|
|
38410
38398
|
};
|
|
@@ -38461,7 +38449,7 @@ function Bf(t, e = !0, n = []) {
|
|
|
38461
38449
|
return t.forEach((r) => {
|
|
38462
38450
|
if (r !== null) {
|
|
38463
38451
|
if (typeof r != "object") {
|
|
38464
|
-
(typeof r == "string" || typeof r == "number") && n.push(
|
|
38452
|
+
(typeof r == "string" || typeof r == "number") && n.push(gi(String(r)));
|
|
38465
38453
|
return;
|
|
38466
38454
|
}
|
|
38467
38455
|
if (Array.isArray(r)) {
|
|
@@ -38545,7 +38533,7 @@ const n3 = wt({
|
|
|
38545
38533
|
},
|
|
38546
38534
|
setup(t) {
|
|
38547
38535
|
var e;
|
|
38548
|
-
Rn("VBinder", (e =
|
|
38536
|
+
Rn("VBinder", (e = Fi()) === null || e === void 0 ? void 0 : e.proxy);
|
|
38549
38537
|
const n = vt("VBinder", null), r = we(null), o = (g) => {
|
|
38550
38538
|
r.value = g, n && t.syncTargetWithParent && n.setTargetRef(g);
|
|
38551
38539
|
};
|
|
@@ -39242,14 +39230,14 @@ var Mo = function(t) {
|
|
|
39242
39230
|
return !0;
|
|
39243
39231
|
}
|
|
39244
39232
|
return !1;
|
|
39245
|
-
},
|
|
39233
|
+
}, Ms = typeof window < "u" ? window : {}, La = /* @__PURE__ */ new WeakMap(), h0 = /auto|scroll/, jL = /^tb|vertical/, qL = /msie|trident/i.test(Ms.navigator && Ms.navigator.userAgent), Un = function(t) {
|
|
39246
39234
|
return parseFloat(t || "0");
|
|
39247
|
-
},
|
|
39235
|
+
}, mi = function(t, e, n) {
|
|
39248
39236
|
return t === void 0 && (t = 0), e === void 0 && (e = 0), n === void 0 && (n = !1), new PL((n ? e : t) || 0, (n ? t : e) || 0);
|
|
39249
39237
|
}, m0 = Mo({
|
|
39250
|
-
devicePixelContentBoxSize:
|
|
39251
|
-
borderBoxSize:
|
|
39252
|
-
contentBoxSize:
|
|
39238
|
+
devicePixelContentBoxSize: mi(),
|
|
39239
|
+
borderBoxSize: mi(),
|
|
39240
|
+
contentBoxSize: mi(),
|
|
39253
39241
|
contentRect: new s3(0, 0, 0, 0)
|
|
39254
39242
|
}), l3 = function(t, e) {
|
|
39255
39243
|
if (e === void 0 && (e = !1), La.has(t) && !e)
|
|
@@ -39257,9 +39245,9 @@ var Mo = function(t) {
|
|
|
39257
39245
|
if (a3(t))
|
|
39258
39246
|
return La.set(t, m0), m0;
|
|
39259
39247
|
var n = getComputedStyle(t), r = nh(t) && t.ownerSVGElement && t.getBBox(), o = !qL && n.boxSizing === "border-box", i = jL.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:
|
|
39248
|
+
devicePixelContentBoxSize: mi(Math.round(N * devicePixelRatio), Math.round(S * devicePixelRatio), i),
|
|
39249
|
+
borderBoxSize: mi(W, oe, i),
|
|
39250
|
+
contentBoxSize: mi(N, S, i),
|
|
39263
39251
|
contentRect: new s3(d, l, N, S)
|
|
39264
39252
|
});
|
|
39265
39253
|
return La.set(t, _), _;
|
|
@@ -39380,16 +39368,16 @@ var Mo = function(t) {
|
|
|
39380
39368
|
var e = this, n = function() {
|
|
39381
39369
|
return e.observer && e.observer.observe(document.body, YL);
|
|
39382
39370
|
};
|
|
39383
|
-
document.body ? n() :
|
|
39371
|
+
document.body ? n() : Ms.addEventListener("DOMContentLoaded", n);
|
|
39384
39372
|
}, t.prototype.start = function() {
|
|
39385
39373
|
var e = this;
|
|
39386
39374
|
this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), y0.forEach(function(n) {
|
|
39387
|
-
return
|
|
39375
|
+
return Ms.addEventListener(n, e.listener, !0);
|
|
39388
39376
|
}));
|
|
39389
39377
|
}, t.prototype.stop = function() {
|
|
39390
39378
|
var e = this;
|
|
39391
39379
|
this.stopped || (this.observer && this.observer.disconnect(), y0.forEach(function(n) {
|
|
39392
|
-
return
|
|
39380
|
+
return Ms.removeEventListener(n, e.listener, !0);
|
|
39393
39381
|
}), this.stopped = !0);
|
|
39394
39382
|
}, t;
|
|
39395
39383
|
}(), Pf = new ZL(), b0 = function(t) {
|
|
@@ -39485,7 +39473,7 @@ const x0 = new rB(), k0 = wt({
|
|
|
39485
39473
|
},
|
|
39486
39474
|
setup(t) {
|
|
39487
39475
|
let e = !1;
|
|
39488
|
-
const n =
|
|
39476
|
+
const n = Fi().proxy;
|
|
39489
39477
|
function r(o) {
|
|
39490
39478
|
const { onResize: i } = t;
|
|
39491
39479
|
i !== void 0 && i(o);
|
|
@@ -39555,7 +39543,7 @@ function oB(t) {
|
|
|
39555
39543
|
return !1;
|
|
39556
39544
|
}
|
|
39557
39545
|
}
|
|
39558
|
-
let
|
|
39546
|
+
let Zi = [];
|
|
39559
39547
|
const iB = wt({
|
|
39560
39548
|
name: "FocusTrap",
|
|
39561
39549
|
props: {
|
|
@@ -39578,7 +39566,7 @@ const iB = wt({
|
|
|
39578
39566
|
let o = !1, i = !1;
|
|
39579
39567
|
const s = typeof document > "u" ? null : document.activeElement;
|
|
39580
39568
|
function a() {
|
|
39581
|
-
return
|
|
39569
|
+
return Zi[Zi.length - 1] === e;
|
|
39582
39570
|
}
|
|
39583
39571
|
function l(y) {
|
|
39584
39572
|
var g;
|
|
@@ -39613,7 +39601,7 @@ const iB = wt({
|
|
|
39613
39601
|
function d() {
|
|
39614
39602
|
var y;
|
|
39615
39603
|
if (!t.disabled) {
|
|
39616
|
-
if (
|
|
39604
|
+
if (Zi.push(e), t.autoFocus) {
|
|
39617
39605
|
const { initialFocusTo: g } = t;
|
|
39618
39606
|
g === void 0 ? p("first") : (y = l0(g)) === null || y === void 0 || y.focus({ preventScroll: !0 });
|
|
39619
39607
|
}
|
|
@@ -39622,7 +39610,7 @@ const iB = wt({
|
|
|
39622
39610
|
}
|
|
39623
39611
|
function f() {
|
|
39624
39612
|
var y;
|
|
39625
|
-
if (t.disabled || (document.removeEventListener("focus", c, !0),
|
|
39613
|
+
if (t.disabled || (document.removeEventListener("focus", c, !0), Zi = Zi.filter((v) => v !== e), a()))
|
|
39626
39614
|
return;
|
|
39627
39615
|
const { finalFocusTo: g } = t;
|
|
39628
39616
|
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 +39697,7 @@ function A0(t) {
|
|
|
39709
39697
|
right: n,
|
|
39710
39698
|
top: r,
|
|
39711
39699
|
bottom: o
|
|
39712
|
-
} =
|
|
39700
|
+
} = gs(t);
|
|
39713
39701
|
return `${r} ${e} ${o} ${n}`;
|
|
39714
39702
|
}
|
|
39715
39703
|
let fd;
|
|
@@ -39717,7 +39705,7 @@ function aB() {
|
|
|
39717
39705
|
return fd === void 0 && (fd = navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom")), fd;
|
|
39718
39706
|
}
|
|
39719
39707
|
const C0 = /* @__PURE__ */ new Set();
|
|
39720
|
-
function
|
|
39708
|
+
function Qi(t, e) {
|
|
39721
39709
|
const n = `[naive/${t}]: ${e}`;
|
|
39722
39710
|
C0.has(n) || (C0.add(n), console.error(n));
|
|
39723
39711
|
}
|
|
@@ -39742,7 +39730,7 @@ function zf(t, e = !0, n = []) {
|
|
|
39742
39730
|
return t.forEach((r) => {
|
|
39743
39731
|
if (r !== null) {
|
|
39744
39732
|
if (typeof r != "object") {
|
|
39745
|
-
(typeof r == "string" || typeof r == "number") && n.push(
|
|
39733
|
+
(typeof r == "string" || typeof r == "number") && n.push(gi(String(r)));
|
|
39746
39734
|
return;
|
|
39747
39735
|
}
|
|
39748
39736
|
if (Array.isArray(r)) {
|
|
@@ -39773,7 +39761,7 @@ function g3(t, e = [], n) {
|
|
|
39773
39761
|
}), Object.assign(r, n);
|
|
39774
39762
|
}
|
|
39775
39763
|
function Hl(t, ...e) {
|
|
39776
|
-
return typeof t == "function" ? t(...e) : typeof t == "string" ?
|
|
39764
|
+
return typeof t == "function" ? t(...e) : typeof t == "string" ? gi(t) : typeof t == "number" ? gi(String(t)) : null;
|
|
39777
39765
|
}
|
|
39778
39766
|
function rh(t) {
|
|
39779
39767
|
return t.some((e) => TS(e) ? !(e.type === tp || e.type === gt && !rh(e.children)) : !0) ? t : null;
|
|
@@ -39791,7 +39779,7 @@ const T0 = wt({
|
|
|
39791
39779
|
return (e = (t = this.$slots).default) === null || e === void 0 ? void 0 : e.call(t);
|
|
39792
39780
|
}
|
|
39793
39781
|
}), wc = "n-config-provider", dB = "n";
|
|
39794
|
-
function
|
|
39782
|
+
function Vi(t = {}, e = {
|
|
39795
39783
|
defaultBordered: !0
|
|
39796
39784
|
}) {
|
|
39797
39785
|
const n = vt(wc, null);
|
|
@@ -39836,7 +39824,7 @@ function bc(t, e, n, r) {
|
|
|
39836
39824
|
}), c = void 0;
|
|
39837
39825
|
};
|
|
39838
39826
|
};
|
|
39839
|
-
return
|
|
39827
|
+
return yi(() => {
|
|
39840
39828
|
d();
|
|
39841
39829
|
}), {
|
|
39842
39830
|
themeClass: a,
|
|
@@ -39845,16 +39833,16 @@ function bc(t, e, n, r) {
|
|
|
39845
39833
|
}
|
|
39846
39834
|
};
|
|
39847
39835
|
}
|
|
39848
|
-
var y3 = typeof ho == "object" && ho && ho.Object === Object && ho, fB = typeof self == "object" && self && self.Object === Object && self, cr = y3 || fB || Function("return this")(), eo = cr.Symbol, w3 = Object.prototype, pB = w3.hasOwnProperty, hB = w3.toString,
|
|
39836
|
+
var y3 = typeof ho == "object" && ho && ho.Object === Object && ho, fB = typeof self == "object" && self && self.Object === Object && self, cr = y3 || fB || Function("return this")(), eo = cr.Symbol, w3 = Object.prototype, pB = w3.hasOwnProperty, hB = w3.toString, es = eo ? eo.toStringTag : void 0;
|
|
39849
39837
|
function mB(t) {
|
|
39850
|
-
var e = pB.call(t,
|
|
39838
|
+
var e = pB.call(t, es), n = t[es];
|
|
39851
39839
|
try {
|
|
39852
|
-
t[
|
|
39840
|
+
t[es] = void 0;
|
|
39853
39841
|
var r = !0;
|
|
39854
39842
|
} catch {
|
|
39855
39843
|
}
|
|
39856
39844
|
var o = hB.call(t);
|
|
39857
|
-
return r && (e ? t[
|
|
39845
|
+
return r && (e ? t[es] = n : delete t[es]), o;
|
|
39858
39846
|
}
|
|
39859
39847
|
var gB = Object.prototype, yB = gB.toString;
|
|
39860
39848
|
function wB(t) {
|
|
@@ -40049,14 +40037,14 @@ var nP = 9007199254740991;
|
|
|
40049
40037
|
function ch(t) {
|
|
40050
40038
|
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= nP;
|
|
40051
40039
|
}
|
|
40052
|
-
function
|
|
40040
|
+
function Hi(t) {
|
|
40053
40041
|
return t != null && ch(t.length) && !sh(t);
|
|
40054
40042
|
}
|
|
40055
40043
|
function rP(t, e, n) {
|
|
40056
40044
|
if (!io(n))
|
|
40057
40045
|
return !1;
|
|
40058
40046
|
var r = typeof e;
|
|
40059
|
-
return (r == "number" ?
|
|
40047
|
+
return (r == "number" ? Hi(n) && ah(e, n.length) : r == "string" && e in n) ? pa(n[e], t) : !1;
|
|
40060
40048
|
}
|
|
40061
40049
|
function oP(t) {
|
|
40062
40050
|
return tP(function(e, n) {
|
|
@@ -40101,9 +40089,9 @@ function BP(t) {
|
|
|
40101
40089
|
return t(e);
|
|
40102
40090
|
};
|
|
40103
40091
|
}
|
|
40104
|
-
var S3 = typeof exports == "object" && exports && !exports.nodeType && exports,
|
|
40092
|
+
var S3 = typeof exports == "object" && exports && !exports.nodeType && exports, Ds = S3 && typeof module == "object" && module && !module.nodeType && module, PP = Ds && Ds.exports === S3, md = PP && y3.process, L0 = function() {
|
|
40105
40093
|
try {
|
|
40106
|
-
var t =
|
|
40094
|
+
var t = Ds && Ds.require && Ds.require("util").types;
|
|
40107
40095
|
return t || md && md.binding && md.binding("util");
|
|
40108
40096
|
} catch {
|
|
40109
40097
|
}
|
|
@@ -40133,7 +40121,7 @@ function HP(t) {
|
|
|
40133
40121
|
return e;
|
|
40134
40122
|
}
|
|
40135
40123
|
function fh(t) {
|
|
40136
|
-
return
|
|
40124
|
+
return Hi(t) ? A3(t) : HP(t);
|
|
40137
40125
|
}
|
|
40138
40126
|
function WP(t) {
|
|
40139
40127
|
var e = [];
|
|
@@ -40152,7 +40140,7 @@ function JP(t) {
|
|
|
40152
40140
|
return n;
|
|
40153
40141
|
}
|
|
40154
40142
|
function E3(t) {
|
|
40155
|
-
return
|
|
40143
|
+
return Hi(t) ? A3(t, !0) : JP(t);
|
|
40156
40144
|
}
|
|
40157
40145
|
var XP = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, YP = /^\w*$/;
|
|
40158
40146
|
function ph(t, e) {
|
|
@@ -40699,7 +40687,7 @@ function Qz(t, e) {
|
|
|
40699
40687
|
return function(n, r) {
|
|
40700
40688
|
if (n == null)
|
|
40701
40689
|
return n;
|
|
40702
|
-
if (!
|
|
40690
|
+
if (!Hi(n))
|
|
40703
40691
|
return t(n, r);
|
|
40704
40692
|
for (var o = n.length, i = -1, s = Object(n); ++i < o && r(s[i], i, s) !== !1; )
|
|
40705
40693
|
;
|
|
@@ -40711,7 +40699,7 @@ function Hf(t, e, n) {
|
|
|
40711
40699
|
(n !== void 0 && !pa(t[e], n) || n === void 0 && !(e in t)) && lh(t, e, n);
|
|
40712
40700
|
}
|
|
40713
40701
|
function t7(t) {
|
|
40714
|
-
return to(t) &&
|
|
40702
|
+
return to(t) && Hi(t);
|
|
40715
40703
|
}
|
|
40716
40704
|
function Wf(t, e) {
|
|
40717
40705
|
if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
|
|
@@ -40744,7 +40732,7 @@ function R3(t, e, n, r, o) {
|
|
|
40744
40732
|
}, E3);
|
|
40745
40733
|
}
|
|
40746
40734
|
function o7(t, e) {
|
|
40747
|
-
var n = -1, r =
|
|
40735
|
+
var n = -1, r = Hi(t) ? Array(t.length) : [];
|
|
40748
40736
|
return e7(t, function(o, i, s) {
|
|
40749
40737
|
r[++n] = e(o, i, s);
|
|
40750
40738
|
}), r;
|
|
@@ -40769,7 +40757,7 @@ function s7(t, e, n) {
|
|
|
40769
40757
|
if (l)
|
|
40770
40758
|
return l;
|
|
40771
40759
|
}), i = vt(wc, null), s = () => {
|
|
40772
|
-
|
|
40760
|
+
yi(() => {
|
|
40773
40761
|
const {
|
|
40774
40762
|
value: a
|
|
40775
40763
|
} = n, l = `${a}${t}Rtl`;
|
|
@@ -40988,7 +40976,7 @@ function zt(t) {
|
|
|
40988
40976
|
const e = Array.from(L3);
|
|
40989
40977
|
return e[3] = Number(t), Jk(p7, e);
|
|
40990
40978
|
}
|
|
40991
|
-
const
|
|
40979
|
+
const Wi = Object.assign(Object.assign({
|
|
40992
40980
|
name: "common"
|
|
40993
40981
|
}, Sc), {
|
|
40994
40982
|
baseColor: _e.neutralBase,
|
|
@@ -41115,7 +41103,7 @@ function g7(t) {
|
|
|
41115
41103
|
});
|
|
41116
41104
|
}
|
|
41117
41105
|
const y7 = {
|
|
41118
|
-
common:
|
|
41106
|
+
common: Wi,
|
|
41119
41107
|
self: g7
|
|
41120
41108
|
}, w7 = tt("scrollbar", `
|
|
41121
41109
|
overflow: hidden;
|
|
@@ -41232,7 +41220,7 @@ const y7 = {
|
|
|
41232
41220
|
mergedClsPrefixRef: e,
|
|
41233
41221
|
inlineThemeDisabled: n,
|
|
41234
41222
|
mergedRtlRef: r
|
|
41235
|
-
} =
|
|
41223
|
+
} = Vi(t), o = s7("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
41224
|
let w = !1, T = !1, O, M, N = 0, S = 0, W = 0, oe = 0;
|
|
41237
41225
|
const _ = dL(), V = hn("Scrollbar", "-scrollbar", w7, y7, t, e), C = Ae(() => {
|
|
41238
41226
|
const {
|
|
@@ -41509,7 +41497,7 @@ const y7 = {
|
|
|
41509
41497
|
function D(q) {
|
|
41510
41498
|
q.preventDefault(), q.stopPropagation(), ut("mousemove", window, $, !0), ut("mouseup", window, D, !0), w = !1, ce(), be(q) && ee();
|
|
41511
41499
|
}
|
|
41512
|
-
|
|
41500
|
+
yi(() => {
|
|
41513
41501
|
const {
|
|
41514
41502
|
value: q
|
|
41515
41503
|
} = Y, {
|
|
@@ -41546,25 +41534,25 @@ const y7 = {
|
|
|
41546
41534
|
}
|
|
41547
41535
|
} = V.value, {
|
|
41548
41536
|
top: Ec,
|
|
41549
|
-
right:
|
|
41537
|
+
right: Gi,
|
|
41550
41538
|
bottom: Vo,
|
|
41551
41539
|
left: nS
|
|
41552
|
-
} =
|
|
41540
|
+
} = gs(Ne), {
|
|
41553
41541
|
top: rS,
|
|
41554
41542
|
right: oS,
|
|
41555
41543
|
bottom: iS,
|
|
41556
41544
|
left: sS
|
|
41557
|
-
} =
|
|
41545
|
+
} = gs(Ze), {
|
|
41558
41546
|
top: aS,
|
|
41559
41547
|
right: lS,
|
|
41560
41548
|
bottom: cS,
|
|
41561
41549
|
left: uS
|
|
41562
|
-
} =
|
|
41550
|
+
} = gs(o?.value ? A0(ft) : ft), {
|
|
41563
41551
|
top: dS,
|
|
41564
41552
|
right: fS,
|
|
41565
41553
|
bottom: pS,
|
|
41566
41554
|
left: hS
|
|
41567
|
-
} =
|
|
41555
|
+
} = gs(o?.value ? A0(jn) : jn);
|
|
41568
41556
|
return {
|
|
41569
41557
|
"--n-scrollbar-bezier": q,
|
|
41570
41558
|
"--n-scrollbar-color": te,
|
|
@@ -41573,7 +41561,7 @@ const y7 = {
|
|
|
41573
41561
|
"--n-scrollbar-width": Ee,
|
|
41574
41562
|
"--n-scrollbar-height": ke,
|
|
41575
41563
|
"--n-scrollbar-rail-top-horizontal-top": Ec,
|
|
41576
|
-
"--n-scrollbar-rail-right-horizontal-top":
|
|
41564
|
+
"--n-scrollbar-rail-right-horizontal-top": Gi,
|
|
41577
41565
|
"--n-scrollbar-rail-bottom-horizontal-top": Vo,
|
|
41578
41566
|
"--n-scrollbar-rail-left-horizontal-top": nS,
|
|
41579
41567
|
"--n-scrollbar-rail-top-horizontal-bottom": rS,
|
|
@@ -41658,7 +41646,7 @@ const y7 = {
|
|
|
41658
41646
|
}) : null
|
|
41659
41647
|
})), d = () => {
|
|
41660
41648
|
var p, h;
|
|
41661
|
-
return (p = this.onRender) === null || p === void 0 || p.call(this), ve("div",
|
|
41649
|
+
return (p = this.onRender) === null || p === void 0 || p.call(this), ve("div", Ri(this.$attrs, {
|
|
41662
41650
|
role: "none",
|
|
41663
41651
|
ref: "wrapperRef",
|
|
41664
41652
|
class: [`${n}-scrollbar`, this.themeClass, o && `${n}-scrollbar--rtl`],
|
|
@@ -42177,7 +42165,7 @@ function K7(t) {
|
|
|
42177
42165
|
}
|
|
42178
42166
|
const yh = {
|
|
42179
42167
|
name: "Popover",
|
|
42180
|
-
common:
|
|
42168
|
+
common: Wi,
|
|
42181
42169
|
self: K7
|
|
42182
42170
|
}, vd = {
|
|
42183
42171
|
top: "bottom",
|
|
@@ -42197,10 +42185,10 @@ const yh = {
|
|
|
42197
42185
|
`, [We(">", [tt("scrollbar", `
|
|
42198
42186
|
height: inherit;
|
|
42199
42187
|
max-height: inherit;
|
|
42200
|
-
`)]),
|
|
42188
|
+
`)]), $s("raw", `
|
|
42201
42189
|
background-color: var(--n-color);
|
|
42202
42190
|
border-radius: var(--n-border-radius);
|
|
42203
|
-
`, [
|
|
42191
|
+
`, [$s("scrollable", [$s("show-header-or-footer", "padding: var(--n-padding);")])]), Xt("header", `
|
|
42204
42192
|
padding: var(--n-padding);
|
|
42205
42193
|
border-bottom: 1px solid var(--n-divider-color);
|
|
42206
42194
|
transition: border-color .3s var(--n-bezier);
|
|
@@ -42327,7 +42315,7 @@ function Cn(t, e) {
|
|
|
42327
42315
|
`, [tt("popover-arrow", e)])])]);
|
|
42328
42316
|
}
|
|
42329
42317
|
const j3 = Object.assign(Object.assign({}, hn.props), {
|
|
42330
|
-
to:
|
|
42318
|
+
to: Ni.propTo,
|
|
42331
42319
|
show: Boolean,
|
|
42332
42320
|
trigger: String,
|
|
42333
42321
|
showArrow: Boolean,
|
|
@@ -42392,8 +42380,8 @@ const X7 = wt({
|
|
|
42392
42380
|
namespaceRef: r,
|
|
42393
42381
|
mergedClsPrefixRef: o,
|
|
42394
42382
|
inlineThemeDisabled: i
|
|
42395
|
-
} =
|
|
42396
|
-
|
|
42383
|
+
} = Vi(t), s = hn("Popover", "-popover", J7, yh, t, o), a = we(null), l = vt("NPopover"), c = we(null), u = we(t.show), d = we(!1);
|
|
42384
|
+
yi(() => {
|
|
42397
42385
|
const {
|
|
42398
42386
|
show: M
|
|
42399
42387
|
} = t;
|
|
@@ -42545,7 +42533,7 @@ const X7 = wt({
|
|
|
42545
42533
|
}) : null;
|
|
42546
42534
|
return [U, ue];
|
|
42547
42535
|
};
|
|
42548
|
-
M = ve("div",
|
|
42536
|
+
M = ve("div", Ri({
|
|
42549
42537
|
class: [`${S}-popover`, `${S}-popover-shared`, m?.themeClass.value, W.map((C) => `${S}-${C}`), {
|
|
42550
42538
|
[`${S}-popover--scrollable`]: t.scrollable,
|
|
42551
42539
|
[`${S}-popover--show-header-or-footer`]: _,
|
|
@@ -42574,7 +42562,7 @@ const X7 = wt({
|
|
|
42574
42562
|
isMounted: l.isMountedRef,
|
|
42575
42563
|
zIndex: l.zIndexRef,
|
|
42576
42564
|
followerRef: a,
|
|
42577
|
-
adjustedTo:
|
|
42565
|
+
adjustedTo: Ni(t),
|
|
42578
42566
|
followerEnabled: u,
|
|
42579
42567
|
renderContentNode: O
|
|
42580
42568
|
};
|
|
@@ -42593,7 +42581,7 @@ const X7 = wt({
|
|
|
42593
42581
|
containerClass: this.namespace,
|
|
42594
42582
|
overlap: this.overlap,
|
|
42595
42583
|
width: this.width === "trigger" ? "target" : void 0,
|
|
42596
|
-
teleportDisabled: this.adjustedTo ===
|
|
42584
|
+
teleportDisabled: this.adjustedTo === Ni.tdkey
|
|
42597
42585
|
}, {
|
|
42598
42586
|
default: () => this.animated ? ve(fl, {
|
|
42599
42587
|
name: "popover-transition",
|
|
@@ -42686,7 +42674,7 @@ const Ac = {
|
|
|
42686
42674
|
default: !0
|
|
42687
42675
|
},
|
|
42688
42676
|
zIndex: Number,
|
|
42689
|
-
to:
|
|
42677
|
+
to: Ni.propTo,
|
|
42690
42678
|
scrollable: Boolean,
|
|
42691
42679
|
contentClass: String,
|
|
42692
42680
|
contentStyle: [Object, String],
|
|
@@ -42729,8 +42717,8 @@ const Ac = {
|
|
|
42729
42717
|
slots: Object,
|
|
42730
42718
|
__popover__: !0,
|
|
42731
42719
|
setup(t) {
|
|
42732
|
-
Te.env.NODE_ENV !== "production" &&
|
|
42733
|
-
t.maxWidth !== void 0 &&
|
|
42720
|
+
Te.env.NODE_ENV !== "production" && yi(() => {
|
|
42721
|
+
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
42722
|
});
|
|
42735
42723
|
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
42724
|
if (t.disabled) return !0;
|
|
@@ -42843,7 +42831,7 @@ const Ac = {
|
|
|
42843
42831
|
zIndexRef: Rt(t, "zIndex"),
|
|
42844
42832
|
extraClassRef: Rt(t, "internalExtraClass"),
|
|
42845
42833
|
internalRenderBodyRef: Rt(t, "internalRenderBody")
|
|
42846
|
-
}),
|
|
42834
|
+
}), yi(() => {
|
|
42847
42835
|
i.value && a() && m(!1);
|
|
42848
42836
|
}), {
|
|
42849
42837
|
binderInstRef: n,
|
|
@@ -43040,7 +43028,7 @@ function nj(t) {
|
|
|
43040
43028
|
});
|
|
43041
43029
|
}
|
|
43042
43030
|
const rj = {
|
|
43043
|
-
common:
|
|
43031
|
+
common: Wi,
|
|
43044
43032
|
peers: {
|
|
43045
43033
|
Popover: yh
|
|
43046
43034
|
},
|
|
@@ -43062,7 +43050,7 @@ function ij(t) {
|
|
|
43062
43050
|
});
|
|
43063
43051
|
}
|
|
43064
43052
|
const sj = {
|
|
43065
|
-
common:
|
|
43053
|
+
common: Wi,
|
|
43066
43054
|
peers: {
|
|
43067
43055
|
Popover: yh
|
|
43068
43056
|
},
|
|
@@ -43075,7 +43063,7 @@ const sj = {
|
|
|
43075
43063
|
setup(t) {
|
|
43076
43064
|
const {
|
|
43077
43065
|
mergedClsPrefixRef: e
|
|
43078
|
-
} =
|
|
43066
|
+
} = Vi(t), n = hn("Tooltip", "-tooltip", void 0, sj, t, e), r = we(null);
|
|
43079
43067
|
return Object.assign(Object.assign({}, {
|
|
43080
43068
|
syncPosition() {
|
|
43081
43069
|
r.value.syncPosition();
|
|
@@ -43196,7 +43184,7 @@ function uj(t) {
|
|
|
43196
43184
|
};
|
|
43197
43185
|
}
|
|
43198
43186
|
const dj = {
|
|
43199
|
-
common:
|
|
43187
|
+
common: Wi,
|
|
43200
43188
|
self: uj
|
|
43201
43189
|
}, fj = tt("icon", `
|
|
43202
43190
|
height: 1em;
|
|
@@ -43231,7 +43219,7 @@ const dj = {
|
|
|
43231
43219
|
const {
|
|
43232
43220
|
mergedClsPrefixRef: e,
|
|
43233
43221
|
inlineThemeDisabled: n
|
|
43234
|
-
} =
|
|
43222
|
+
} = Vi(t), r = hn("Icon", "-icon", fj, dj, t, e), o = Ae(() => {
|
|
43235
43223
|
const {
|
|
43236
43224
|
depth: s
|
|
43237
43225
|
} = t, {
|
|
@@ -43284,7 +43272,7 @@ const dj = {
|
|
|
43284
43272
|
onRender: i,
|
|
43285
43273
|
themeClass: s
|
|
43286
43274
|
} = 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",
|
|
43275
|
+
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
43276
|
role: "img",
|
|
43289
43277
|
class: [`${r}-icon`, s, {
|
|
43290
43278
|
[`${r}-icon--depth`]: n,
|
|
@@ -43495,7 +43483,7 @@ const W3 = wt({
|
|
|
43495
43483
|
}, y = d?.(r), g = ve("div", Object.assign({
|
|
43496
43484
|
class: [`${i}-dropdown-option`, y?.class],
|
|
43497
43485
|
"data-dropdown-option": !0
|
|
43498
|
-
}, y), ve("div",
|
|
43486
|
+
}, y), ve("div", Ri(m, f), [ve("div", {
|
|
43499
43487
|
class: [`${i}-dropdown-option-body__prefix`, s && `${i}-dropdown-option-body__prefix--show-icon`]
|
|
43500
43488
|
}, [c ? c(r) : Hl(r.icon)]), ve("div", {
|
|
43501
43489
|
"data-dropdown-option": !0,
|
|
@@ -43738,7 +43726,7 @@ const W3 = wt({
|
|
|
43738
43726
|
right: 4px;
|
|
43739
43727
|
transition: background-color .3s var(--n-bezier);
|
|
43740
43728
|
border-radius: var(--n-border-radius);
|
|
43741
|
-
`),
|
|
43729
|
+
`), $s("disabled", [pt("pending", `
|
|
43742
43730
|
color: var(--n-option-text-color-hover);
|
|
43743
43731
|
`, [Xt("prefix, suffix", `
|
|
43744
43732
|
color: var(--n-option-text-color-hover);
|
|
@@ -43810,7 +43798,7 @@ const W3 = wt({
|
|
|
43810
43798
|
`), We(">", [tt("scrollbar", `
|
|
43811
43799
|
height: inherit;
|
|
43812
43800
|
max-height: inherit;
|
|
43813
|
-
`)]),
|
|
43801
|
+
`)]), $s("scrollable", `
|
|
43814
43802
|
padding: var(--n-padding);
|
|
43815
43803
|
`), pt("scrollable", [Xt("content", `
|
|
43816
43804
|
padding: var(--n-padding);
|
|
@@ -43913,7 +43901,7 @@ const W3 = wt({
|
|
|
43913
43901
|
const {
|
|
43914
43902
|
mergedClsPrefixRef: f,
|
|
43915
43903
|
inlineThemeDisabled: p
|
|
43916
|
-
} =
|
|
43904
|
+
} = Vi(t), h = hn("Dropdown", "-dropdown", bj, rj, t, f);
|
|
43917
43905
|
Rn(Cc, {
|
|
43918
43906
|
labelFieldRef: Rt(t, "labelField"),
|
|
43919
43907
|
childrenFieldRef: Rt(t, "childrenField"),
|
|
@@ -44087,7 +44075,7 @@ const W3 = wt({
|
|
|
44087
44075
|
onMouseenter: s,
|
|
44088
44076
|
onMouseleave: a
|
|
44089
44077
|
};
|
|
44090
|
-
return ve(G3,
|
|
44078
|
+
return ve(G3, Ri(this.$attrs, f, d));
|
|
44091
44079
|
}, {
|
|
44092
44080
|
mergedTheme: e
|
|
44093
44081
|
} = this, n = {
|
|
@@ -44124,7 +44112,7 @@ function Aj(t) {
|
|
|
44124
44112
|
};
|
|
44125
44113
|
}
|
|
44126
44114
|
const Cj = {
|
|
44127
|
-
common:
|
|
44115
|
+
common: Wi,
|
|
44128
44116
|
self: Aj
|
|
44129
44117
|
}, Ej = We([tt("skeleton", `
|
|
44130
44118
|
height: 1em;
|
|
@@ -44175,7 +44163,7 @@ const Cj = {
|
|
|
44175
44163
|
gL();
|
|
44176
44164
|
const {
|
|
44177
44165
|
mergedClsPrefixRef: e
|
|
44178
|
-
} =
|
|
44166
|
+
} = Vi(t), n = hn("Skeleton", "-skeleton", Ej, Cj, t, e);
|
|
44179
44167
|
return {
|
|
44180
44168
|
mergedClsPrefix: e,
|
|
44181
44169
|
style: Ae(() => {
|
|
@@ -44222,7 +44210,7 @@ const Cj = {
|
|
|
44222
44210
|
style: e,
|
|
44223
44211
|
mergedClsPrefix: n,
|
|
44224
44212
|
$attrs: r
|
|
44225
|
-
} = this, o = ve("div",
|
|
44213
|
+
} = this, o = ve("div", Ri({
|
|
44226
44214
|
class: `${n}-skeleton`,
|
|
44227
44215
|
style: e
|
|
44228
44216
|
}, r));
|
|
@@ -44319,7 +44307,7 @@ const Cj = {
|
|
|
44319
44307
|
]),
|
|
44320
44308
|
default: Tc(() => [
|
|
44321
44309
|
x.tooltip ? (Se(), Ce("div", $j, [
|
|
44322
|
-
|
|
44310
|
+
gi(an(x.tooltip) + " ", 1),
|
|
44323
44311
|
x.disabled.value ? (Se(), Ce("span", Oj, "(disabled)")) : st("", !0)
|
|
44324
44312
|
])) : st("", !0)
|
|
44325
44313
|
]),
|
|
@@ -44337,7 +44325,7 @@ const Cj = {
|
|
|
44337
44325
|
__name: "Toolbar",
|
|
44338
44326
|
emits: ["command", "toggle", "select"],
|
|
44339
44327
|
setup(t, { emit: e }) {
|
|
44340
|
-
const { proxy: n } =
|
|
44328
|
+
const { proxy: n } = Fi();
|
|
44341
44329
|
let r = we(1);
|
|
44342
44330
|
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
44331
|
An(() => {
|
|
@@ -44647,7 +44635,7 @@ const Je = (t) => {
|
|
|
44647
44635
|
},
|
|
44648
44636
|
emits: ["submit", "cancel"],
|
|
44649
44637
|
setup(t, { emit: e }) {
|
|
44650
|
-
const n = e, r = t, { proxy: o } =
|
|
44638
|
+
const n = e, r = t, { proxy: o } = Fi(), i = () => {
|
|
44651
44639
|
if (o?.$submit instanceof Function && o.$submit(), c.value && d.value) {
|
|
44652
44640
|
n("submit", { text: l.value, href: u.value });
|
|
44653
44641
|
return;
|
|
@@ -44712,7 +44700,7 @@ const Je = (t) => {
|
|
|
44712
44700
|
class: "remove-btn__icon",
|
|
44713
44701
|
innerHTML: ze(vn).removeLink
|
|
44714
44702
|
}, null, 8, nq),
|
|
44715
|
-
w[3] || (w[3] =
|
|
44703
|
+
w[3] || (w[3] = gi(" Remove "))
|
|
44716
44704
|
])) : st("", !0),
|
|
44717
44705
|
h.value ? (Se(), Ce("button", {
|
|
44718
44706
|
key: 1,
|
|
@@ -45792,7 +45780,7 @@ const Je = (t) => {
|
|
|
45792
45780
|
}
|
|
45793
45781
|
);
|
|
45794
45782
|
};
|
|
45795
|
-
var Jt, Z3,
|
|
45783
|
+
var Jt, Z3, ys, Yf, Q3, eS, Zf, tS, li;
|
|
45796
45784
|
class HU extends Rj {
|
|
45797
45785
|
constructor(e) {
|
|
45798
45786
|
super(), sb(this, Jt), ib(this, "config", {
|
|
@@ -45805,7 +45793,7 @@ class HU extends Rj {
|
|
|
45805
45793
|
excludeItems: [],
|
|
45806
45794
|
groups: null,
|
|
45807
45795
|
editor: null
|
|
45808
|
-
}), sb(this,
|
|
45796
|
+
}), sb(this, ys, {
|
|
45809
45797
|
setZoom: ({ item: r, argument: o }) => {
|
|
45810
45798
|
if (!o) return;
|
|
45811
45799
|
r.onActivate({ zoom: o }), this.emit("superdoc-command", { item: r, argument: o });
|
|
@@ -45905,7 +45893,7 @@ class HU extends Rj {
|
|
|
45905
45893
|
}
|
|
45906
45894
|
setZoom(e) {
|
|
45907
45895
|
const n = [...this.toolbarItems, ...this.overflowItems].find((r) => r.name.value === "zoom");
|
|
45908
|
-
xd(this,
|
|
45896
|
+
xd(this, ys).setZoom({ item: n, argument: e });
|
|
45909
45897
|
}
|
|
45910
45898
|
/**
|
|
45911
45899
|
* The toolbar expects an active Super Editor instance.
|
|
@@ -45949,8 +45937,8 @@ class HU extends Rj {
|
|
|
45949
45937
|
emitCommand({ item: e, argument: n }) {
|
|
45950
45938
|
const { command: r } = e;
|
|
45951
45939
|
if (r) {
|
|
45952
|
-
if (this.log("(emmitCommand) Command:", r, e, n), r in xd(this,
|
|
45953
|
-
return xd(this,
|
|
45940
|
+
if (this.log("(emmitCommand) Command:", r, e, n), r in xd(this, ys))
|
|
45941
|
+
return xd(this, ys)[r]({ item: e, argument: n });
|
|
45954
45942
|
if (r in this.activeEditor?.commands)
|
|
45955
45943
|
this.activeEditor.commands[r](n), this.updateToolbarState();
|
|
45956
45944
|
else
|
|
@@ -45960,7 +45948,7 @@ class HU extends Rj {
|
|
|
45960
45948
|
}
|
|
45961
45949
|
Jt = /* @__PURE__ */ new WeakSet(), Z3 = function() {
|
|
45962
45950
|
this.config.groups && !Array.isArray(this.config.groups) && Object.keys(this.config.groups).length && (this.config.toolbarGroups = Object.keys(this.config.groups));
|
|
45963
|
-
},
|
|
45951
|
+
}, ys = /* @__PURE__ */ new WeakMap(), Yf = function(t, e, n = !1) {
|
|
45964
45952
|
const r = document.documentElement.clientWidth, { defaultItems: o, overflowItems: i } = zq(t, n, r, this.role, e);
|
|
45965
45953
|
let s = [
|
|
45966
45954
|
...o.map((l) => l.name.value),
|