@harbour-enterprises/superdoc 0.9.15 → 0.9.16
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/{super-editor.es-DuYBhMYe.es.js → super-editor.es-DHMvsb6g.es.js} +4 -4
- package/dist/chunks/{super-editor.es-DvZXJuGP.cjs → super-editor.es-TCX4UBkY.cjs} +2 -2
- package/dist/super-editor/chunks/{converter-Rx70Oyy_.js → converter-MQO9fSne.js} +620 -620
- package/dist/super-editor/chunks/{docx-zipper-C3CdrwGR.js → docx-zipper-BP5RW1jI.js} +1 -1
- package/dist/super-editor/chunks/{editor-BmA670kK.js → editor-7ArOKaK2.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-DARtdvYp.js → toolbar-CQXO2s93.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/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +713 -713
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -78,9 +78,9 @@ function Pu(r) {
|
|
|
78
78
|
Ze[e >> 10] + Ze[e >> 4 & 63] + Ze[e << 2 & 63] + "="
|
|
79
79
|
)), i.join("");
|
|
80
80
|
}
|
|
81
|
-
var
|
|
81
|
+
var pi = {};
|
|
82
82
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
83
|
-
|
|
83
|
+
pi.read = function(r, e, t, n, i) {
|
|
84
84
|
var s, o, a = i * 8 - n - 1, u = (1 << a) - 1, f = u >> 1, c = -7, g = t ? i - 1 : 0, h = t ? -1 : 1, S = r[e + g];
|
|
85
85
|
for (g += h, s = S & (1 << -c) - 1, S >>= -c, c += a; c > 0; s = s * 256 + r[e + g], g += h, c -= 8)
|
|
86
86
|
;
|
|
@@ -95,7 +95,7 @@ mi.read = function(r, e, t, n, i) {
|
|
|
95
95
|
}
|
|
96
96
|
return (S ? -1 : 1) * o * Math.pow(2, s - n);
|
|
97
97
|
};
|
|
98
|
-
|
|
98
|
+
pi.write = function(r, e, t, n, i, s) {
|
|
99
99
|
var o, a, u, f = s * 8 - i - 1, c = (1 << f) - 1, g = c >> 1, h = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, S = n ? 0 : s - 1, T = n ? 1 : -1, A = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
100
100
|
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (a = isNaN(e) ? 1 : 0, o = c) : (o = Math.floor(Math.log(e) / Math.LN2), e * (u = Math.pow(2, -o)) < 1 && (o--, u *= 2), o + g >= 1 ? e += h / u : e += h * Math.pow(2, 1 - g), e * u >= 2 && (o++, u /= 2), o + g >= c ? (a = 0, o = c) : o + g >= 1 ? (a = (e * u - 1) * Math.pow(2, i), o = o + g) : (a = e * Math.pow(2, g - 1) * Math.pow(2, i), o = 0)); i >= 8; r[t + S] = a & 255, S += T, a /= 256, i -= 8)
|
|
101
101
|
;
|
|
@@ -110,7 +110,7 @@ mi.write = function(r, e, t, n, i, s) {
|
|
|
110
110
|
* @license MIT
|
|
111
111
|
*/
|
|
112
112
|
(function(r) {
|
|
113
|
-
const e = br, t =
|
|
113
|
+
const e = br, t = pi, n = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
114
114
|
r.Buffer = c, r.SlowBuffer = B, r.INSPECT_MAX_BYTES = 50;
|
|
115
115
|
const i = 2147483647;
|
|
116
116
|
r.kMaxLength = i;
|
|
@@ -588,16 +588,16 @@ mi.write = function(r, e, t, n, i, s) {
|
|
|
588
588
|
}
|
|
589
589
|
return J(E);
|
|
590
590
|
}
|
|
591
|
-
const
|
|
591
|
+
const pe = 4096;
|
|
592
592
|
function J(w) {
|
|
593
593
|
const l = w.length;
|
|
594
|
-
if (l <=
|
|
594
|
+
if (l <= pe)
|
|
595
595
|
return String.fromCharCode.apply(String, w);
|
|
596
596
|
let d = "", E = 0;
|
|
597
597
|
for (; E < l; )
|
|
598
598
|
d += String.fromCharCode.apply(
|
|
599
599
|
String,
|
|
600
|
-
w.slice(E, E +=
|
|
600
|
+
w.slice(E, E += pe)
|
|
601
601
|
);
|
|
602
602
|
return d;
|
|
603
603
|
}
|
|
@@ -763,7 +763,7 @@ mi.write = function(r, e, t, n, i, s) {
|
|
|
763
763
|
let G = Number(l >> BigInt(32) & BigInt(4294967295));
|
|
764
764
|
return w[d++] = G, G = G >> 8, w[d++] = G, G = G >> 8, w[d++] = G, G = G >> 8, w[d++] = G, d;
|
|
765
765
|
}
|
|
766
|
-
function
|
|
766
|
+
function p(w, l, d, E, P) {
|
|
767
767
|
te(l, E, P, w, d, 7);
|
|
768
768
|
let j = Number(l & BigInt(4294967295));
|
|
769
769
|
w[d + 7] = j, j = j >> 8, w[d + 6] = j, j = j >> 8, w[d + 5] = j, j = j >> 8, w[d + 4] = j;
|
|
@@ -773,7 +773,7 @@ mi.write = function(r, e, t, n, i, s) {
|
|
|
773
773
|
c.prototype.writeBigUInt64LE = Le(function(l, d = 0) {
|
|
774
774
|
return O(this, l, d, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
775
775
|
}), c.prototype.writeBigUInt64BE = Le(function(l, d = 0) {
|
|
776
|
-
return
|
|
776
|
+
return p(this, l, d, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
777
777
|
}), c.prototype.writeIntLE = function(l, d, E, P) {
|
|
778
778
|
if (l = +l, d = d >>> 0, !P) {
|
|
779
779
|
const Ae = Math.pow(2, 8 * E - 1);
|
|
@@ -805,14 +805,14 @@ mi.write = function(r, e, t, n, i, s) {
|
|
|
805
805
|
}, c.prototype.writeBigInt64LE = Le(function(l, d = 0) {
|
|
806
806
|
return O(this, l, d, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
807
807
|
}), c.prototype.writeBigInt64BE = Le(function(l, d = 0) {
|
|
808
|
-
return
|
|
808
|
+
return p(this, l, d, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
809
809
|
});
|
|
810
|
-
function
|
|
810
|
+
function m(w, l, d, E, P, j) {
|
|
811
811
|
if (d + E > w.length) throw new RangeError("Index out of range");
|
|
812
812
|
if (d < 0) throw new RangeError("Index out of range");
|
|
813
813
|
}
|
|
814
814
|
function N(w, l, d, E, P) {
|
|
815
|
-
return l = +l, d = d >>> 0, P ||
|
|
815
|
+
return l = +l, d = d >>> 0, P || m(w, l, d, 4), t.write(w, l, d, E, 23, 4), d + 4;
|
|
816
816
|
}
|
|
817
817
|
c.prototype.writeFloatLE = function(l, d, E) {
|
|
818
818
|
return N(this, l, d, !0, E);
|
|
@@ -820,7 +820,7 @@ mi.write = function(r, e, t, n, i, s) {
|
|
|
820
820
|
return N(this, l, d, !1, E);
|
|
821
821
|
};
|
|
822
822
|
function D(w, l, d, E, P) {
|
|
823
|
-
return l = +l, d = d >>> 0, P ||
|
|
823
|
+
return l = +l, d = d >>> 0, P || m(w, l, d, 8), t.write(w, l, d, E, 52, 8), d + 8;
|
|
824
824
|
}
|
|
825
825
|
c.prototype.writeDoubleLE = function(l, d, E) {
|
|
826
826
|
return D(this, l, d, !0, E);
|
|
@@ -1354,20 +1354,20 @@ function tl(r) {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
}
|
|
1356
1356
|
}
|
|
1357
|
-
var ot = [], Et = !1,
|
|
1357
|
+
var ot = [], Et = !1, mt, ir = -1;
|
|
1358
1358
|
function rl() {
|
|
1359
|
-
!Et || !
|
|
1359
|
+
!Et || !mt || (Et = !1, mt.length ? ot = mt.concat(ot) : ir = -1, ot.length && Mo());
|
|
1360
1360
|
}
|
|
1361
1361
|
function Mo() {
|
|
1362
1362
|
if (!Et) {
|
|
1363
1363
|
var r = qo(rl);
|
|
1364
1364
|
Et = !0;
|
|
1365
1365
|
for (var e = ot.length; e; ) {
|
|
1366
|
-
for (
|
|
1367
|
-
|
|
1366
|
+
for (mt = ot, ot = []; ++ir < e; )
|
|
1367
|
+
mt && mt[ir].run();
|
|
1368
1368
|
ir = -1, e = ot.length;
|
|
1369
1369
|
}
|
|
1370
|
-
|
|
1370
|
+
mt = null, Et = !1, tl(r);
|
|
1371
1371
|
}
|
|
1372
1372
|
}
|
|
1373
1373
|
Ee.nextTick = function(r) {
|
|
@@ -1416,7 +1416,7 @@ Ee.umask = function() {
|
|
|
1416
1416
|
return 0;
|
|
1417
1417
|
};
|
|
1418
1418
|
var nl = _o.exports;
|
|
1419
|
-
const
|
|
1419
|
+
const me = /* @__PURE__ */ el(nl);
|
|
1420
1420
|
var kr, Li;
|
|
1421
1421
|
function jo() {
|
|
1422
1422
|
return Li || (Li = 1, kr = hi().EventEmitter), kr;
|
|
@@ -1510,11 +1510,11 @@ function dl() {
|
|
|
1510
1510
|
return Xi || (Xi = 1, Wr = Math.min), Wr;
|
|
1511
1511
|
}
|
|
1512
1512
|
var Jr, Yi;
|
|
1513
|
-
function
|
|
1513
|
+
function ml() {
|
|
1514
1514
|
return Yi || (Yi = 1, Jr = Math.pow), Jr;
|
|
1515
1515
|
}
|
|
1516
1516
|
var Kr, Qi;
|
|
1517
|
-
function
|
|
1517
|
+
function pl() {
|
|
1518
1518
|
return Qi || (Qi = 1, Kr = Math.round), Kr;
|
|
1519
1519
|
}
|
|
1520
1520
|
var $r, Zi;
|
|
@@ -1653,10 +1653,10 @@ function Jo() {
|
|
|
1653
1653
|
var r = Jt(), e = wi(), t = gi(), n = xl();
|
|
1654
1654
|
return ln = n || r.call(t, e), ln;
|
|
1655
1655
|
}
|
|
1656
|
-
var cn,
|
|
1656
|
+
var cn, ms;
|
|
1657
1657
|
function yi() {
|
|
1658
|
-
if (
|
|
1659
|
-
|
|
1658
|
+
if (ms) return cn;
|
|
1659
|
+
ms = 1;
|
|
1660
1660
|
var r = Jt(), e = Wt(), t = gi(), n = Jo();
|
|
1661
1661
|
return cn = function(s) {
|
|
1662
1662
|
if (s.length < 1 || typeof s[0] != "function")
|
|
@@ -1664,10 +1664,10 @@ function yi() {
|
|
|
1664
1664
|
return n(r, t, s);
|
|
1665
1665
|
}, cn;
|
|
1666
1666
|
}
|
|
1667
|
-
var fn,
|
|
1667
|
+
var fn, ps;
|
|
1668
1668
|
function Al() {
|
|
1669
|
-
if (
|
|
1670
|
-
|
|
1669
|
+
if (ps) return fn;
|
|
1670
|
+
ps = 1;
|
|
1671
1671
|
var r = yi(), e = Nt(), t;
|
|
1672
1672
|
try {
|
|
1673
1673
|
t = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
@@ -1703,18 +1703,18 @@ function bi() {
|
|
|
1703
1703
|
return t(i);
|
|
1704
1704
|
} : null, dn;
|
|
1705
1705
|
}
|
|
1706
|
-
var
|
|
1706
|
+
var mn, gs;
|
|
1707
1707
|
function Ko() {
|
|
1708
|
-
if (gs) return
|
|
1708
|
+
if (gs) return mn;
|
|
1709
1709
|
gs = 1;
|
|
1710
1710
|
var r = Function.prototype.call, e = Object.prototype.hasOwnProperty, t = Jt();
|
|
1711
|
-
return
|
|
1711
|
+
return mn = t.call(r, e), mn;
|
|
1712
1712
|
}
|
|
1713
|
-
var
|
|
1713
|
+
var pn, ws;
|
|
1714
1714
|
function $o() {
|
|
1715
|
-
if (ws) return
|
|
1715
|
+
if (ws) return pn;
|
|
1716
1716
|
ws = 1;
|
|
1717
|
-
var r, e = Vo(), t = il(), n = sl(), i = ol(), s = al(), o = zo(), a = Wt(), u = ul(), f = ll(), c = cl(), g = fl(), h = dl(), S =
|
|
1717
|
+
var r, e = Vo(), t = il(), n = sl(), i = ol(), s = al(), o = zo(), a = Wt(), u = ul(), f = ll(), c = cl(), g = fl(), h = dl(), S = ml(), T = pl(), A = gl(), k = Function, b = function(N) {
|
|
1718
1718
|
try {
|
|
1719
1719
|
return k('"use strict"; return (' + N + ").constructor;")();
|
|
1720
1720
|
} catch {
|
|
@@ -1891,7 +1891,7 @@ function $o() {
|
|
|
1891
1891
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
1892
1892
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
1893
1893
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
1894
|
-
},
|
|
1894
|
+
}, pe = Jt(), J = Ko(), ne = pe.call(ie, Array.prototype.concat), ae = pe.call($, Array.prototype.splice), L = pe.call(ie, String.prototype.replace), H = pe.call(ie, String.prototype.slice), V = pe.call(ie, RegExp.prototype.exec), K = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, O = /\\(\\)?/g, p = function(D) {
|
|
1895
1895
|
var y = H(D, 0, 1), x = H(D, -1);
|
|
1896
1896
|
if (y === "%" && x !== "%")
|
|
1897
1897
|
throw new o("invalid intrinsic syntax, expected closing `%`");
|
|
@@ -1901,7 +1901,7 @@ function $o() {
|
|
|
1901
1901
|
return L(D, K, function(W, te, Y, re) {
|
|
1902
1902
|
M[M.length] = Y ? L(re, O, "$1") : te || W;
|
|
1903
1903
|
}), M;
|
|
1904
|
-
},
|
|
1904
|
+
}, m = function(D, y) {
|
|
1905
1905
|
var x = D, M;
|
|
1906
1906
|
if (J(Q, x) && (M = Q[x], x = "%" + M[0] + "%"), J(ce, x)) {
|
|
1907
1907
|
var W = ce[x];
|
|
@@ -1915,14 +1915,14 @@ function $o() {
|
|
|
1915
1915
|
}
|
|
1916
1916
|
throw new o("intrinsic " + D + " does not exist!");
|
|
1917
1917
|
};
|
|
1918
|
-
return
|
|
1918
|
+
return pn = function(D, y) {
|
|
1919
1919
|
if (typeof D != "string" || D.length === 0)
|
|
1920
1920
|
throw new a("intrinsic name must be a non-empty string");
|
|
1921
1921
|
if (arguments.length > 1 && typeof y != "boolean")
|
|
1922
1922
|
throw new a('"allowMissing" argument must be a boolean');
|
|
1923
1923
|
if (V(/^%?[^%]*%?$/, D) === null)
|
|
1924
1924
|
throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
1925
|
-
var x =
|
|
1925
|
+
var x = p(D), M = x.length > 0 ? x[0] : "", W = m("%" + M + "%", y), te = W.name, Y = W.value, re = !1, ye = W.alias;
|
|
1926
1926
|
ye && (M = ye[0], ae(x, ne([0, 1], ye)));
|
|
1927
1927
|
for (var z = 1, Be = !0; z < x.length; z += 1) {
|
|
1928
1928
|
var Te = x[z], He = H(Te, 0, 1), ze = H(Te, -1);
|
|
@@ -1945,7 +1945,7 @@ function $o() {
|
|
|
1945
1945
|
}
|
|
1946
1946
|
}
|
|
1947
1947
|
return Y;
|
|
1948
|
-
},
|
|
1948
|
+
}, pn;
|
|
1949
1949
|
}
|
|
1950
1950
|
var hn, ys;
|
|
1951
1951
|
function Kt() {
|
|
@@ -2469,12 +2469,12 @@ function Ll() {
|
|
|
2469
2469
|
return typeof WeakMap > "u" ? !1 : se.working ? se(z) : z instanceof WeakMap;
|
|
2470
2470
|
}
|
|
2471
2471
|
r.isWeakMap = Q;
|
|
2472
|
-
function
|
|
2472
|
+
function pe(z) {
|
|
2473
2473
|
return u(z) === "[object WeakSet]";
|
|
2474
2474
|
}
|
|
2475
|
-
|
|
2475
|
+
pe.working = typeof WeakSet < "u" && pe(/* @__PURE__ */ new WeakSet());
|
|
2476
2476
|
function J(z) {
|
|
2477
|
-
return
|
|
2477
|
+
return pe(z);
|
|
2478
2478
|
}
|
|
2479
2479
|
r.isWeakSet = J;
|
|
2480
2480
|
function ne(z) {
|
|
@@ -2501,14 +2501,14 @@ function Ll() {
|
|
|
2501
2501
|
return typeof V > "u" ? !1 : (typeof K.working > "u" && (K.working = K(new V())), K.working ? K(z) : z instanceof V);
|
|
2502
2502
|
}
|
|
2503
2503
|
r.isSharedArrayBuffer = O;
|
|
2504
|
-
function
|
|
2504
|
+
function p(z) {
|
|
2505
2505
|
return u(z) === "[object AsyncFunction]";
|
|
2506
2506
|
}
|
|
2507
|
-
r.isAsyncFunction =
|
|
2508
|
-
function
|
|
2507
|
+
r.isAsyncFunction = p;
|
|
2508
|
+
function m(z) {
|
|
2509
2509
|
return u(z) === "[object Map Iterator]";
|
|
2510
2510
|
}
|
|
2511
|
-
r.isMapIterator =
|
|
2511
|
+
r.isMapIterator = m;
|
|
2512
2512
|
function N(z) {
|
|
2513
2513
|
return u(z) === "[object Set Iterator]";
|
|
2514
2514
|
}
|
|
@@ -2578,7 +2578,7 @@ function Yo() {
|
|
|
2578
2578
|
H.push(o(arguments[V]));
|
|
2579
2579
|
return H.join(" ");
|
|
2580
2580
|
}
|
|
2581
|
-
for (var V = 1, K = arguments, O = K.length,
|
|
2581
|
+
for (var V = 1, K = arguments, O = K.length, p = String(L).replace(t, function(N) {
|
|
2582
2582
|
if (N === "%%") return "%";
|
|
2583
2583
|
if (V >= O) return N;
|
|
2584
2584
|
switch (N) {
|
|
@@ -2595,36 +2595,36 @@ function Yo() {
|
|
|
2595
2595
|
default:
|
|
2596
2596
|
return N;
|
|
2597
2597
|
}
|
|
2598
|
-
}),
|
|
2599
|
-
F(
|
|
2600
|
-
return
|
|
2598
|
+
}), m = K[V]; V < O; m = K[++V])
|
|
2599
|
+
F(m) || !v(m) ? p += " " + m : p += " " + o(m);
|
|
2600
|
+
return p;
|
|
2601
2601
|
}, r.deprecate = function(L, H) {
|
|
2602
|
-
if (typeof
|
|
2602
|
+
if (typeof me < "u" && me.noDeprecation === !0)
|
|
2603
2603
|
return L;
|
|
2604
|
-
if (typeof
|
|
2604
|
+
if (typeof me > "u")
|
|
2605
2605
|
return function() {
|
|
2606
2606
|
return r.deprecate(L, H).apply(this, arguments);
|
|
2607
2607
|
};
|
|
2608
2608
|
var V = !1;
|
|
2609
2609
|
function K() {
|
|
2610
2610
|
if (!V) {
|
|
2611
|
-
if (
|
|
2611
|
+
if (me.throwDeprecation)
|
|
2612
2612
|
throw new Error(H);
|
|
2613
|
-
|
|
2613
|
+
me.traceDeprecation ? console.trace(H) : console.error(H), V = !0;
|
|
2614
2614
|
}
|
|
2615
2615
|
return L.apply(this, arguments);
|
|
2616
2616
|
}
|
|
2617
2617
|
return K;
|
|
2618
2618
|
};
|
|
2619
2619
|
var n = {}, i = /^$/;
|
|
2620
|
-
if (
|
|
2621
|
-
var s =
|
|
2620
|
+
if (me.env.NODE_DEBUG) {
|
|
2621
|
+
var s = me.env.NODE_DEBUG;
|
|
2622
2622
|
s = s.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), i = new RegExp("^" + s + "$", "i");
|
|
2623
2623
|
}
|
|
2624
2624
|
r.debuglog = function(L) {
|
|
2625
2625
|
if (L = L.toUpperCase(), !n[L])
|
|
2626
2626
|
if (i.test(L)) {
|
|
2627
|
-
var H =
|
|
2627
|
+
var H = me.pid;
|
|
2628
2628
|
n[L] = function() {
|
|
2629
2629
|
var V = r.format.apply(r, arguments);
|
|
2630
2630
|
console.error("%s %d: %s", L, H, V);
|
|
@@ -2689,10 +2689,10 @@ function Yo() {
|
|
|
2689
2689
|
var O = g(L, H);
|
|
2690
2690
|
if (O)
|
|
2691
2691
|
return O;
|
|
2692
|
-
var
|
|
2693
|
-
if (L.showHidden && (
|
|
2692
|
+
var p = Object.keys(H), m = f(p);
|
|
2693
|
+
if (L.showHidden && (p = Object.getOwnPropertyNames(H)), ie(H) && (p.indexOf("message") >= 0 || p.indexOf("description") >= 0))
|
|
2694
2694
|
return h(H);
|
|
2695
|
-
if (
|
|
2695
|
+
if (p.length === 0) {
|
|
2696
2696
|
if (ee(H)) {
|
|
2697
2697
|
var N = H.name ? ": " + H.name : "";
|
|
2698
2698
|
return L.stylize("[Function" + N + "]", "special");
|
|
@@ -2709,14 +2709,14 @@ function Yo() {
|
|
|
2709
2709
|
var M = H.name ? ": " + H.name : "";
|
|
2710
2710
|
D = " [Function" + M + "]";
|
|
2711
2711
|
}
|
|
2712
|
-
if (q(H) && (D = " " + RegExp.prototype.toString.call(H)), $(H) && (D = " " + Date.prototype.toUTCString.call(H)), ie(H) && (D = " " + h(H)),
|
|
2712
|
+
if (q(H) && (D = " " + RegExp.prototype.toString.call(H)), $(H) && (D = " " + Date.prototype.toUTCString.call(H)), ie(H) && (D = " " + h(H)), p.length === 0 && (!y || H.length == 0))
|
|
2713
2713
|
return x[0] + D + x[1];
|
|
2714
2714
|
if (V < 0)
|
|
2715
2715
|
return q(H) ? L.stylize(RegExp.prototype.toString.call(H), "regexp") : L.stylize("[Object]", "special");
|
|
2716
2716
|
L.seen.push(H);
|
|
2717
2717
|
var W;
|
|
2718
|
-
return y ? W = S(L, H, V,
|
|
2719
|
-
return T(L, H, V,
|
|
2718
|
+
return y ? W = S(L, H, V, m, p) : W = p.map(function(te) {
|
|
2719
|
+
return T(L, H, V, m, te, y);
|
|
2720
2720
|
}), L.seen.pop(), A(W, D, x);
|
|
2721
2721
|
}
|
|
2722
2722
|
function g(L, H) {
|
|
@@ -2737,17 +2737,17 @@ function Yo() {
|
|
|
2737
2737
|
return "[" + Error.prototype.toString.call(L) + "]";
|
|
2738
2738
|
}
|
|
2739
2739
|
function S(L, H, V, K, O) {
|
|
2740
|
-
for (var
|
|
2741
|
-
|
|
2740
|
+
for (var p = [], m = 0, N = H.length; m < N; ++m)
|
|
2741
|
+
pe(H, String(m)) ? p.push(T(
|
|
2742
2742
|
L,
|
|
2743
2743
|
H,
|
|
2744
2744
|
V,
|
|
2745
2745
|
K,
|
|
2746
|
-
String(
|
|
2746
|
+
String(m),
|
|
2747
2747
|
!0
|
|
2748
|
-
)) :
|
|
2748
|
+
)) : p.push("");
|
|
2749
2749
|
return O.forEach(function(D) {
|
|
2750
|
-
D.match(/^\d+$/) ||
|
|
2750
|
+
D.match(/^\d+$/) || p.push(T(
|
|
2751
2751
|
L,
|
|
2752
2752
|
H,
|
|
2753
2753
|
V,
|
|
@@ -2755,12 +2755,12 @@ function Yo() {
|
|
|
2755
2755
|
D,
|
|
2756
2756
|
!0
|
|
2757
2757
|
));
|
|
2758
|
-
}),
|
|
2758
|
+
}), p;
|
|
2759
2759
|
}
|
|
2760
|
-
function T(L, H, V, K, O,
|
|
2761
|
-
var
|
|
2762
|
-
if (D = Object.getOwnPropertyDescriptor(H, O) || { value: H[O] }, D.get ? D.set ? N = L.stylize("[Getter/Setter]", "special") : N = L.stylize("[Getter]", "special") : D.set && (N = L.stylize("[Setter]", "special")),
|
|
2763
|
-
`) > -1 && (
|
|
2760
|
+
function T(L, H, V, K, O, p) {
|
|
2761
|
+
var m, N, D;
|
|
2762
|
+
if (D = Object.getOwnPropertyDescriptor(H, O) || { value: H[O] }, D.get ? D.set ? N = L.stylize("[Getter/Setter]", "special") : N = L.stylize("[Getter]", "special") : D.set && (N = L.stylize("[Setter]", "special")), pe(K, O) || (m = "[" + O + "]"), N || (L.seen.indexOf(D.value) < 0 ? (F(V) ? N = c(L, D.value, null) : N = c(L, D.value, V - 1), N.indexOf(`
|
|
2763
|
+
`) > -1 && (p ? N = N.split(`
|
|
2764
2764
|
`).map(function(y) {
|
|
2765
2765
|
return " " + y;
|
|
2766
2766
|
}).join(`
|
|
@@ -2769,17 +2769,17 @@ function Yo() {
|
|
|
2769
2769
|
`).map(function(y) {
|
|
2770
2770
|
return " " + y;
|
|
2771
2771
|
}).join(`
|
|
2772
|
-
`))) : N = L.stylize("[Circular]", "special")), _(
|
|
2773
|
-
if (
|
|
2772
|
+
`))) : N = L.stylize("[Circular]", "special")), _(m)) {
|
|
2773
|
+
if (p && O.match(/^\d+$/))
|
|
2774
2774
|
return N;
|
|
2775
|
-
|
|
2775
|
+
m = JSON.stringify("" + O), m.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (m = m.slice(1, -1), m = L.stylize(m, "name")) : (m = m.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), m = L.stylize(m, "string"));
|
|
2776
2776
|
}
|
|
2777
|
-
return
|
|
2777
|
+
return m + ": " + N;
|
|
2778
2778
|
}
|
|
2779
2779
|
function A(L, H, V) {
|
|
2780
|
-
var K = L.reduce(function(O,
|
|
2781
|
-
return
|
|
2782
|
-
`) >= 0, O +
|
|
2780
|
+
var K = L.reduce(function(O, p) {
|
|
2781
|
+
return p.indexOf(`
|
|
2782
|
+
`) >= 0, O + p.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
2783
2783
|
}, 0);
|
|
2784
2784
|
return K > 60 ? V[0] + (H === "" ? "" : H + `
|
|
2785
2785
|
`) + " " + L.join(`,
|
|
@@ -2879,7 +2879,7 @@ function Yo() {
|
|
|
2879
2879
|
L[V[K]] = H[V[K]];
|
|
2880
2880
|
return L;
|
|
2881
2881
|
};
|
|
2882
|
-
function
|
|
2882
|
+
function pe(L, H) {
|
|
2883
2883
|
return Object.prototype.hasOwnProperty.call(L, H);
|
|
2884
2884
|
}
|
|
2885
2885
|
var J = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
|
|
@@ -2898,19 +2898,19 @@ function Yo() {
|
|
|
2898
2898
|
}), V;
|
|
2899
2899
|
}
|
|
2900
2900
|
function V() {
|
|
2901
|
-
for (var K, O,
|
|
2901
|
+
for (var K, O, p = new Promise(function(D, y) {
|
|
2902
2902
|
K = D, O = y;
|
|
2903
|
-
}),
|
|
2904
|
-
|
|
2905
|
-
|
|
2903
|
+
}), m = [], N = 0; N < arguments.length; N++)
|
|
2904
|
+
m.push(arguments[N]);
|
|
2905
|
+
m.push(function(D, y) {
|
|
2906
2906
|
D ? O(D) : K(y);
|
|
2907
2907
|
});
|
|
2908
2908
|
try {
|
|
2909
|
-
H.apply(this,
|
|
2909
|
+
H.apply(this, m);
|
|
2910
2910
|
} catch (D) {
|
|
2911
2911
|
O(D);
|
|
2912
2912
|
}
|
|
2913
|
-
return
|
|
2913
|
+
return p;
|
|
2914
2914
|
}
|
|
2915
2915
|
return Object.setPrototypeOf(V, Object.getPrototypeOf(H)), J && Object.defineProperty(V, J, {
|
|
2916
2916
|
value: V,
|
|
@@ -2938,15 +2938,15 @@ function Yo() {
|
|
|
2938
2938
|
var O = V.pop();
|
|
2939
2939
|
if (typeof O != "function")
|
|
2940
2940
|
throw new TypeError("The last argument must be of type Function");
|
|
2941
|
-
var
|
|
2942
|
-
return O.apply(
|
|
2941
|
+
var p = this, m = function() {
|
|
2942
|
+
return O.apply(p, arguments);
|
|
2943
2943
|
};
|
|
2944
2944
|
L.apply(this, V).then(
|
|
2945
2945
|
function(N) {
|
|
2946
|
-
|
|
2946
|
+
me.nextTick(m.bind(null, null, N));
|
|
2947
2947
|
},
|
|
2948
2948
|
function(N) {
|
|
2949
|
-
|
|
2949
|
+
me.nextTick(ne.bind(null, N, m));
|
|
2950
2950
|
}
|
|
2951
2951
|
);
|
|
2952
2952
|
}
|
|
@@ -3129,8 +3129,8 @@ function Qo() {
|
|
|
3129
3129
|
qs = 1;
|
|
3130
3130
|
function r(o, a) {
|
|
3131
3131
|
var u = this, f = this._readableState && this._readableState.destroyed, c = this._writableState && this._writableState.destroyed;
|
|
3132
|
-
return f || c ? (a ? a(o) : o && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0,
|
|
3133
|
-
!a && g ? u._writableState ? u._writableState.errorEmitted ?
|
|
3132
|
+
return f || c ? (a ? a(o) : o && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, me.nextTick(i, this, o)) : me.nextTick(i, this, o)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(o || null, function(g) {
|
|
3133
|
+
!a && g ? u._writableState ? u._writableState.errorEmitted ? me.nextTick(t, u) : (u._writableState.errorEmitted = !0, me.nextTick(e, u, g)) : me.nextTick(e, u, g) : a ? (me.nextTick(t, u), a(g)) : me.nextTick(t, u);
|
|
3134
3134
|
}), this);
|
|
3135
3135
|
}
|
|
3136
3136
|
function e(o, a) {
|
|
@@ -3273,9 +3273,9 @@ function ea() {
|
|
|
3273
3273
|
if (Hs) return _n;
|
|
3274
3274
|
Hs = 1, _n = q;
|
|
3275
3275
|
function r(O) {
|
|
3276
|
-
var
|
|
3276
|
+
var p = this;
|
|
3277
3277
|
this.next = null, this.entry = null, this.finish = function() {
|
|
3278
|
-
K(
|
|
3278
|
+
K(p, O);
|
|
3279
3279
|
};
|
|
3280
3280
|
}
|
|
3281
3281
|
var e;
|
|
@@ -3294,17 +3294,17 @@ function ea() {
|
|
|
3294
3294
|
yt()(q, n);
|
|
3295
3295
|
function B() {
|
|
3296
3296
|
}
|
|
3297
|
-
function I(O,
|
|
3298
|
-
e = e || St(), O = O || {}, typeof
|
|
3297
|
+
function I(O, p, m) {
|
|
3298
|
+
e = e || St(), O = O || {}, typeof m != "boolean" && (m = p instanceof e), this.objectMode = !!O.objectMode, m && (this.objectMode = this.objectMode || !!O.writableObjectMode), this.highWaterMark = c(this, O, "writableHighWaterMark", m), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
|
|
3299
3299
|
var N = O.decodeStrings === !1;
|
|
3300
3300
|
this.decodeStrings = !N, this.defaultEncoding = O.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(D) {
|
|
3301
|
-
se(
|
|
3301
|
+
se(p, D);
|
|
3302
3302
|
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = O.emitClose !== !1, this.autoDestroy = !!O.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new r(this);
|
|
3303
3303
|
}
|
|
3304
3304
|
I.prototype.getBuffer = function() {
|
|
3305
|
-
for (var
|
|
3306
|
-
|
|
3307
|
-
return
|
|
3305
|
+
for (var p = this.bufferedRequest, m = []; p; )
|
|
3306
|
+
m.push(p), p = p.next;
|
|
3307
|
+
return m;
|
|
3308
3308
|
}, function() {
|
|
3309
3309
|
try {
|
|
3310
3310
|
Object.defineProperty(I.prototype, "buffer", {
|
|
@@ -3317,40 +3317,40 @@ function ea() {
|
|
|
3317
3317
|
}();
|
|
3318
3318
|
var _;
|
|
3319
3319
|
typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (_ = Function.prototype[Symbol.hasInstance], Object.defineProperty(q, Symbol.hasInstance, {
|
|
3320
|
-
value: function(
|
|
3321
|
-
return _.call(this,
|
|
3320
|
+
value: function(p) {
|
|
3321
|
+
return _.call(this, p) ? !0 : this !== q ? !1 : p && p._writableState instanceof I;
|
|
3322
3322
|
}
|
|
3323
|
-
})) : _ = function(
|
|
3324
|
-
return
|
|
3323
|
+
})) : _ = function(p) {
|
|
3324
|
+
return p instanceof this;
|
|
3325
3325
|
};
|
|
3326
3326
|
function q(O) {
|
|
3327
3327
|
e = e || St();
|
|
3328
|
-
var
|
|
3329
|
-
if (!
|
|
3330
|
-
this._writableState = new I(O, this,
|
|
3328
|
+
var p = this instanceof e;
|
|
3329
|
+
if (!p && !_.call(q, this)) return new q(O);
|
|
3330
|
+
this._writableState = new I(O, this, p), this.writable = !0, O && (typeof O.write == "function" && (this._write = O.write), typeof O.writev == "function" && (this._writev = O.writev), typeof O.destroy == "function" && (this._destroy = O.destroy), typeof O.final == "function" && (this._final = O.final)), n.call(this);
|
|
3331
3331
|
}
|
|
3332
3332
|
q.prototype.pipe = function() {
|
|
3333
3333
|
C(this, new A());
|
|
3334
3334
|
};
|
|
3335
|
-
function v(O,
|
|
3336
|
-
var
|
|
3337
|
-
C(O,
|
|
3335
|
+
function v(O, p) {
|
|
3336
|
+
var m = new F();
|
|
3337
|
+
C(O, m), me.nextTick(p, m);
|
|
3338
3338
|
}
|
|
3339
|
-
function $(O,
|
|
3339
|
+
function $(O, p, m, N) {
|
|
3340
3340
|
var D;
|
|
3341
|
-
return
|
|
3341
|
+
return m === null ? D = new b() : typeof m != "string" && !p.objectMode && (D = new h("chunk", ["string", "Buffer"], m)), D ? (C(O, D), me.nextTick(N, D), !1) : !0;
|
|
3342
3342
|
}
|
|
3343
|
-
q.prototype.write = function(O,
|
|
3343
|
+
q.prototype.write = function(O, p, m) {
|
|
3344
3344
|
var N = this._writableState, D = !1, y = !N.objectMode && a(O);
|
|
3345
|
-
return y && !i.isBuffer(O) && (O = o(O)), typeof
|
|
3345
|
+
return y && !i.isBuffer(O) && (O = o(O)), typeof p == "function" && (m = p, p = null), y ? p = "buffer" : p || (p = N.defaultEncoding), typeof m != "function" && (m = B), N.ending ? v(this, m) : (y || $(this, N, O, m)) && (N.pendingcb++, D = ee(this, N, y, O, p, m)), D;
|
|
3346
3346
|
}, q.prototype.cork = function() {
|
|
3347
3347
|
this._writableState.corked++;
|
|
3348
3348
|
}, q.prototype.uncork = function() {
|
|
3349
3349
|
var O = this._writableState;
|
|
3350
3350
|
O.corked && (O.corked--, !O.writing && !O.corked && !O.bufferProcessing && O.bufferedRequest && J(this, O));
|
|
3351
|
-
}, q.prototype.setDefaultEncoding = function(
|
|
3352
|
-
if (typeof
|
|
3353
|
-
return this._writableState.defaultEncoding =
|
|
3351
|
+
}, q.prototype.setDefaultEncoding = function(p) {
|
|
3352
|
+
if (typeof p == "string" && (p = p.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((p + "").toLowerCase()) > -1)) throw new R(p);
|
|
3353
|
+
return this._writableState.defaultEncoding = p, this;
|
|
3354
3354
|
}, Object.defineProperty(q.prototype, "writableBuffer", {
|
|
3355
3355
|
// making it explicit this property is not enumerable
|
|
3356
3356
|
// because otherwise some prototype manipulation in
|
|
@@ -3360,8 +3360,8 @@ function ea() {
|
|
|
3360
3360
|
return this._writableState && this._writableState.getBuffer();
|
|
3361
3361
|
}
|
|
3362
3362
|
});
|
|
3363
|
-
function ie(O,
|
|
3364
|
-
return !O.objectMode && O.decodeStrings !== !1 && typeof
|
|
3363
|
+
function ie(O, p, m) {
|
|
3364
|
+
return !O.objectMode && O.decodeStrings !== !1 && typeof p == "string" && (p = i.from(p, m)), p;
|
|
3365
3365
|
}
|
|
3366
3366
|
Object.defineProperty(q.prototype, "writableHighWaterMark", {
|
|
3367
3367
|
// making it explicit this property is not enumerable
|
|
@@ -3372,75 +3372,75 @@ function ea() {
|
|
|
3372
3372
|
return this._writableState.highWaterMark;
|
|
3373
3373
|
}
|
|
3374
3374
|
});
|
|
3375
|
-
function ee(O,
|
|
3376
|
-
if (!
|
|
3377
|
-
var x = ie(
|
|
3378
|
-
N !== x && (
|
|
3379
|
-
}
|
|
3380
|
-
var M =
|
|
3381
|
-
|
|
3382
|
-
var W =
|
|
3383
|
-
if (W || (
|
|
3384
|
-
var te =
|
|
3385
|
-
|
|
3375
|
+
function ee(O, p, m, N, D, y) {
|
|
3376
|
+
if (!m) {
|
|
3377
|
+
var x = ie(p, N, D);
|
|
3378
|
+
N !== x && (m = !0, D = "buffer", N = x);
|
|
3379
|
+
}
|
|
3380
|
+
var M = p.objectMode ? 1 : N.length;
|
|
3381
|
+
p.length += M;
|
|
3382
|
+
var W = p.length < p.highWaterMark;
|
|
3383
|
+
if (W || (p.needDrain = !0), p.writing || p.corked) {
|
|
3384
|
+
var te = p.lastBufferedRequest;
|
|
3385
|
+
p.lastBufferedRequest = {
|
|
3386
3386
|
chunk: N,
|
|
3387
3387
|
encoding: D,
|
|
3388
|
-
isBuf:
|
|
3388
|
+
isBuf: m,
|
|
3389
3389
|
callback: y,
|
|
3390
3390
|
next: null
|
|
3391
|
-
}, te ? te.next =
|
|
3391
|
+
}, te ? te.next = p.lastBufferedRequest : p.bufferedRequest = p.lastBufferedRequest, p.bufferedRequestCount += 1;
|
|
3392
3392
|
} else
|
|
3393
|
-
X(O,
|
|
3393
|
+
X(O, p, !1, M, N, D, y);
|
|
3394
3394
|
return W;
|
|
3395
3395
|
}
|
|
3396
|
-
function X(O,
|
|
3397
|
-
|
|
3396
|
+
function X(O, p, m, N, D, y, x) {
|
|
3397
|
+
p.writelen = N, p.writecb = x, p.writing = !0, p.sync = !0, p.destroyed ? p.onwrite(new k("write")) : m ? O._writev(D, p.onwrite) : O._write(D, y, p.onwrite), p.sync = !1;
|
|
3398
3398
|
}
|
|
3399
|
-
function ce(O,
|
|
3400
|
-
--
|
|
3399
|
+
function ce(O, p, m, N, D) {
|
|
3400
|
+
--p.pendingcb, m ? (me.nextTick(D, N), me.nextTick(H, O, p), O._writableState.errorEmitted = !0, C(O, N)) : (D(N), O._writableState.errorEmitted = !0, C(O, N), H(O, p));
|
|
3401
3401
|
}
|
|
3402
3402
|
function he(O) {
|
|
3403
3403
|
O.writing = !1, O.writecb = null, O.length -= O.writelen, O.writelen = 0;
|
|
3404
3404
|
}
|
|
3405
|
-
function se(O,
|
|
3406
|
-
var
|
|
3405
|
+
function se(O, p) {
|
|
3406
|
+
var m = O._writableState, N = m.sync, D = m.writecb;
|
|
3407
3407
|
if (typeof D != "function") throw new T();
|
|
3408
|
-
if (he(
|
|
3408
|
+
if (he(m), p) ce(O, m, N, p, D);
|
|
3409
3409
|
else {
|
|
3410
|
-
var y = ne(
|
|
3411
|
-
!y && !
|
|
3410
|
+
var y = ne(m) || O.destroyed;
|
|
3411
|
+
!y && !m.corked && !m.bufferProcessing && m.bufferedRequest && J(O, m), N ? me.nextTick(Q, O, m, y, D) : Q(O, m, y, D);
|
|
3412
3412
|
}
|
|
3413
3413
|
}
|
|
3414
|
-
function Q(O,
|
|
3415
|
-
|
|
3414
|
+
function Q(O, p, m, N) {
|
|
3415
|
+
m || pe(O, p), p.pendingcb--, N(), H(O, p);
|
|
3416
3416
|
}
|
|
3417
|
-
function
|
|
3418
|
-
|
|
3417
|
+
function pe(O, p) {
|
|
3418
|
+
p.length === 0 && p.needDrain && (p.needDrain = !1, O.emit("drain"));
|
|
3419
3419
|
}
|
|
3420
|
-
function J(O,
|
|
3421
|
-
|
|
3422
|
-
var
|
|
3423
|
-
if (O._writev &&
|
|
3424
|
-
var N =
|
|
3425
|
-
y.entry =
|
|
3426
|
-
for (var x = 0, M = !0;
|
|
3427
|
-
D[x] =
|
|
3428
|
-
D.allBuffers = M, X(O,
|
|
3420
|
+
function J(O, p) {
|
|
3421
|
+
p.bufferProcessing = !0;
|
|
3422
|
+
var m = p.bufferedRequest;
|
|
3423
|
+
if (O._writev && m && m.next) {
|
|
3424
|
+
var N = p.bufferedRequestCount, D = new Array(N), y = p.corkedRequestsFree;
|
|
3425
|
+
y.entry = m;
|
|
3426
|
+
for (var x = 0, M = !0; m; )
|
|
3427
|
+
D[x] = m, m.isBuf || (M = !1), m = m.next, x += 1;
|
|
3428
|
+
D.allBuffers = M, X(O, p, !0, p.length, D, "", y.finish), p.pendingcb++, p.lastBufferedRequest = null, y.next ? (p.corkedRequestsFree = y.next, y.next = null) : p.corkedRequestsFree = new r(p), p.bufferedRequestCount = 0;
|
|
3429
3429
|
} else {
|
|
3430
|
-
for (;
|
|
3431
|
-
var W =
|
|
3432
|
-
if (X(O,
|
|
3430
|
+
for (; m; ) {
|
|
3431
|
+
var W = m.chunk, te = m.encoding, Y = m.callback, re = p.objectMode ? 1 : W.length;
|
|
3432
|
+
if (X(O, p, !1, re, W, te, Y), m = m.next, p.bufferedRequestCount--, p.writing)
|
|
3433
3433
|
break;
|
|
3434
3434
|
}
|
|
3435
|
-
|
|
3435
|
+
m === null && (p.lastBufferedRequest = null);
|
|
3436
3436
|
}
|
|
3437
|
-
|
|
3437
|
+
p.bufferedRequest = m, p.bufferProcessing = !1;
|
|
3438
3438
|
}
|
|
3439
|
-
q.prototype._write = function(O,
|
|
3440
|
-
|
|
3441
|
-
}, q.prototype._writev = null, q.prototype.end = function(O,
|
|
3439
|
+
q.prototype._write = function(O, p, m) {
|
|
3440
|
+
m(new S("_write()"));
|
|
3441
|
+
}, q.prototype._writev = null, q.prototype.end = function(O, p, m) {
|
|
3442
3442
|
var N = this._writableState;
|
|
3443
|
-
return typeof O == "function" ? (
|
|
3443
|
+
return typeof O == "function" ? (m = O, O = null, p = null) : typeof p == "function" && (m = p, p = null), O != null && this.write(O, p), N.corked && (N.corked = 1, this.uncork()), N.ending || V(this, N, m), this;
|
|
3444
3444
|
}, Object.defineProperty(q.prototype, "writableLength", {
|
|
3445
3445
|
// making it explicit this property is not enumerable
|
|
3446
3446
|
// because otherwise some prototype manipulation in
|
|
@@ -3453,32 +3453,32 @@ function ea() {
|
|
|
3453
3453
|
function ne(O) {
|
|
3454
3454
|
return O.ending && O.length === 0 && O.bufferedRequest === null && !O.finished && !O.writing;
|
|
3455
3455
|
}
|
|
3456
|
-
function ae(O,
|
|
3457
|
-
O._final(function(
|
|
3458
|
-
|
|
3456
|
+
function ae(O, p) {
|
|
3457
|
+
O._final(function(m) {
|
|
3458
|
+
p.pendingcb--, m && C(O, m), p.prefinished = !0, O.emit("prefinish"), H(O, p);
|
|
3459
3459
|
});
|
|
3460
3460
|
}
|
|
3461
|
-
function L(O,
|
|
3462
|
-
!
|
|
3461
|
+
function L(O, p) {
|
|
3462
|
+
!p.prefinished && !p.finalCalled && (typeof O._final == "function" && !p.destroyed ? (p.pendingcb++, p.finalCalled = !0, me.nextTick(ae, O, p)) : (p.prefinished = !0, O.emit("prefinish")));
|
|
3463
3463
|
}
|
|
3464
|
-
function H(O,
|
|
3465
|
-
var
|
|
3466
|
-
if (
|
|
3464
|
+
function H(O, p) {
|
|
3465
|
+
var m = ne(p);
|
|
3466
|
+
if (m && (L(O, p), p.pendingcb === 0 && (p.finished = !0, O.emit("finish"), p.autoDestroy))) {
|
|
3467
3467
|
var N = O._readableState;
|
|
3468
3468
|
(!N || N.autoDestroy && N.endEmitted) && O.destroy();
|
|
3469
3469
|
}
|
|
3470
|
-
return
|
|
3470
|
+
return m;
|
|
3471
3471
|
}
|
|
3472
|
-
function V(O,
|
|
3473
|
-
|
|
3472
|
+
function V(O, p, m) {
|
|
3473
|
+
p.ending = !0, H(O, p), m && (p.finished ? me.nextTick(m) : O.once("finish", m)), p.ended = !0, O.writable = !1;
|
|
3474
3474
|
}
|
|
3475
|
-
function K(O,
|
|
3475
|
+
function K(O, p, m) {
|
|
3476
3476
|
var N = O.entry;
|
|
3477
3477
|
for (O.entry = null; N; ) {
|
|
3478
3478
|
var D = N.callback;
|
|
3479
|
-
|
|
3479
|
+
p.pendingcb--, D(m), N = N.next;
|
|
3480
3480
|
}
|
|
3481
|
-
|
|
3481
|
+
p.corkedRequestsFree.next = O;
|
|
3482
3482
|
}
|
|
3483
3483
|
return Object.defineProperty(q.prototype, "destroyed", {
|
|
3484
3484
|
// making it explicit this property is not enumerable
|
|
@@ -3488,11 +3488,11 @@ function ea() {
|
|
|
3488
3488
|
get: function() {
|
|
3489
3489
|
return this._writableState === void 0 ? !1 : this._writableState.destroyed;
|
|
3490
3490
|
},
|
|
3491
|
-
set: function(
|
|
3492
|
-
this._writableState && (this._writableState.destroyed =
|
|
3491
|
+
set: function(p) {
|
|
3492
|
+
this._writableState && (this._writableState.destroyed = p);
|
|
3493
3493
|
}
|
|
3494
|
-
}), q.prototype.destroy = u.destroy, q.prototype._undestroy = u.undestroy, q.prototype._destroy = function(O,
|
|
3495
|
-
|
|
3494
|
+
}), q.prototype.destroy = u.destroy, q.prototype._undestroy = u.undestroy, q.prototype._destroy = function(O, p) {
|
|
3495
|
+
p(O);
|
|
3496
3496
|
}, _n;
|
|
3497
3497
|
}
|
|
3498
3498
|
var qn, Vs;
|
|
@@ -3541,7 +3541,7 @@ function St() {
|
|
|
3541
3541
|
}
|
|
3542
3542
|
});
|
|
3543
3543
|
function a() {
|
|
3544
|
-
this._writableState.ended ||
|
|
3544
|
+
this._writableState.ended || me.nextTick(u, this);
|
|
3545
3545
|
}
|
|
3546
3546
|
function u(f) {
|
|
3547
3547
|
f.end();
|
|
@@ -3833,7 +3833,7 @@ function jl() {
|
|
|
3833
3833
|
}
|
|
3834
3834
|
}
|
|
3835
3835
|
function T(R) {
|
|
3836
|
-
|
|
3836
|
+
me.nextTick(S, R);
|
|
3837
3837
|
}
|
|
3838
3838
|
function A(R, C) {
|
|
3839
3839
|
return function(B, I) {
|
|
@@ -3859,7 +3859,7 @@ function jl() {
|
|
|
3859
3859
|
return Promise.resolve(h(void 0, !0));
|
|
3860
3860
|
if (this[g].destroyed)
|
|
3861
3861
|
return new Promise(function(v, $) {
|
|
3862
|
-
|
|
3862
|
+
me.nextTick(function() {
|
|
3863
3863
|
C[a] ? $(C[a]) : v(h(void 0, !0));
|
|
3864
3864
|
});
|
|
3865
3865
|
});
|
|
@@ -4032,13 +4032,13 @@ function ta() {
|
|
|
4032
4032
|
u("read", y), y = parseInt(y, 10);
|
|
4033
4033
|
var x = this._readableState, M = y;
|
|
4034
4034
|
if (y !== 0 && (x.emittedReadable = !1), y === 0 && x.needReadable && ((x.highWaterMark !== 0 ? x.length >= x.highWaterMark : x.length > 0) || x.ended))
|
|
4035
|
-
return u("read: emitReadable", x.length, x.ended), x.length === 0 && x.ended ?
|
|
4035
|
+
return u("read: emitReadable", x.length, x.ended), x.length === 0 && x.ended ? m(this) : Q(this), null;
|
|
4036
4036
|
if (y = he(y, x), y === 0 && x.ended)
|
|
4037
|
-
return x.length === 0 &&
|
|
4037
|
+
return x.length === 0 && m(this), null;
|
|
4038
4038
|
var W = x.needReadable;
|
|
4039
4039
|
u("need readable", W), (x.length === 0 || x.length - y < x.highWaterMark) && (W = !0, u("length less than watermark", W)), x.ended || x.reading ? (W = !1, u("reading or ended", W)) : W && (u("do read"), x.reading = !0, x.sync = !0, x.length === 0 && (x.needReadable = !0), this._read(x.highWaterMark), x.sync = !1, x.reading || (y = he(M, x)));
|
|
4040
4040
|
var te;
|
|
4041
|
-
return y > 0 ? te =
|
|
4041
|
+
return y > 0 ? te = p(y, x) : te = null, te === null ? (x.needReadable = x.length <= x.highWaterMark, y = 0) : (x.length -= y, x.awaitDrain = 0), x.length === 0 && (x.ended || (x.needReadable = !0), M !== y && x.ended && m(this)), te !== null && this.emit("data", te), te;
|
|
4042
4042
|
};
|
|
4043
4043
|
function se(y, x) {
|
|
4044
4044
|
if (u("onEofChunk"), !x.ended) {
|
|
@@ -4046,19 +4046,19 @@ function ta() {
|
|
|
4046
4046
|
var M = x.decoder.end();
|
|
4047
4047
|
M && M.length && (x.buffer.push(M), x.length += x.objectMode ? 1 : M.length);
|
|
4048
4048
|
}
|
|
4049
|
-
x.ended = !0, x.sync ? Q(y) : (x.needReadable = !1, x.emittedReadable || (x.emittedReadable = !0,
|
|
4049
|
+
x.ended = !0, x.sync ? Q(y) : (x.needReadable = !1, x.emittedReadable || (x.emittedReadable = !0, pe(y)));
|
|
4050
4050
|
}
|
|
4051
4051
|
}
|
|
4052
4052
|
function Q(y) {
|
|
4053
4053
|
var x = y._readableState;
|
|
4054
|
-
u("emitReadable", x.needReadable, x.emittedReadable), x.needReadable = !1, x.emittedReadable || (u("emitReadable", x.flowing), x.emittedReadable = !0,
|
|
4054
|
+
u("emitReadable", x.needReadable, x.emittedReadable), x.needReadable = !1, x.emittedReadable || (u("emitReadable", x.flowing), x.emittedReadable = !0, me.nextTick(pe, y));
|
|
4055
4055
|
}
|
|
4056
|
-
function
|
|
4056
|
+
function pe(y) {
|
|
4057
4057
|
var x = y._readableState;
|
|
4058
4058
|
u("emitReadable_", x.destroyed, x.length, x.ended), !x.destroyed && (x.length || x.ended) && (y.emit("readable"), x.emittedReadable = !1), x.needReadable = !x.flowing && !x.ended && x.length <= x.highWaterMark, O(y);
|
|
4059
4059
|
}
|
|
4060
4060
|
function J(y, x) {
|
|
4061
|
-
x.readingMore || (x.readingMore = !0,
|
|
4061
|
+
x.readingMore || (x.readingMore = !0, me.nextTick(ne, y, x));
|
|
4062
4062
|
}
|
|
4063
4063
|
function ne(y, x) {
|
|
4064
4064
|
for (; !x.reading && !x.ended && (x.length < x.highWaterMark || x.flowing && x.length === 0); ) {
|
|
@@ -4084,8 +4084,8 @@ function ta() {
|
|
|
4084
4084
|
break;
|
|
4085
4085
|
}
|
|
4086
4086
|
W.pipesCount += 1, u("pipe count=%d opts=%j", W.pipesCount, x);
|
|
4087
|
-
var te = (!x || x.end !== !1) && y !==
|
|
4088
|
-
W.endEmitted ?
|
|
4087
|
+
var te = (!x || x.end !== !1) && y !== me.stdout && y !== me.stderr, Y = te ? ye : st;
|
|
4088
|
+
W.endEmitted ? me.nextTick(Y) : M.once("end", Y), y.on("unpipe", re);
|
|
4089
4089
|
function re(lt, Le) {
|
|
4090
4090
|
u("onunpipe"), lt === M && Le && Le.hasUnpiped === !1 && (Le.hasUnpiped = !0, Te());
|
|
4091
4091
|
}
|
|
@@ -4146,13 +4146,13 @@ function ta() {
|
|
|
4146
4146
|
return re === -1 ? this : (x.pipes.splice(re, 1), x.pipesCount -= 1, x.pipesCount === 1 && (x.pipes = x.pipes[0]), y.emit("unpipe", this, M), this);
|
|
4147
4147
|
}, v.prototype.on = function(y, x) {
|
|
4148
4148
|
var M = t.prototype.on.call(this, y, x), W = this._readableState;
|
|
4149
|
-
return y === "data" ? (W.readableListening = this.listenerCount("readable") > 0, W.flowing !== !1 && this.resume()) : y === "readable" && !W.endEmitted && !W.readableListening && (W.readableListening = W.needReadable = !0, W.flowing = !1, W.emittedReadable = !1, u("on readable", W.length, W.reading), W.length ? Q(this) : W.reading ||
|
|
4149
|
+
return y === "data" ? (W.readableListening = this.listenerCount("readable") > 0, W.flowing !== !1 && this.resume()) : y === "readable" && !W.endEmitted && !W.readableListening && (W.readableListening = W.needReadable = !0, W.flowing = !1, W.emittedReadable = !1, u("on readable", W.length, W.reading), W.length ? Q(this) : W.reading || me.nextTick(H, this)), M;
|
|
4150
4150
|
}, v.prototype.addListener = v.prototype.on, v.prototype.removeListener = function(y, x) {
|
|
4151
4151
|
var M = t.prototype.removeListener.call(this, y, x);
|
|
4152
|
-
return y === "readable" &&
|
|
4152
|
+
return y === "readable" && me.nextTick(L, this), M;
|
|
4153
4153
|
}, v.prototype.removeAllListeners = function(y) {
|
|
4154
4154
|
var x = t.prototype.removeAllListeners.apply(this, arguments);
|
|
4155
|
-
return (y === "readable" || y === void 0) &&
|
|
4155
|
+
return (y === "readable" || y === void 0) && me.nextTick(L, this), x;
|
|
4156
4156
|
};
|
|
4157
4157
|
function L(y) {
|
|
4158
4158
|
var x = y._readableState;
|
|
@@ -4166,7 +4166,7 @@ function ta() {
|
|
|
4166
4166
|
return y.flowing || (u("resume"), y.flowing = !y.readableListening, V(this, y)), y.paused = !1, this;
|
|
4167
4167
|
};
|
|
4168
4168
|
function V(y, x) {
|
|
4169
|
-
x.resumeScheduled || (x.resumeScheduled = !0,
|
|
4169
|
+
x.resumeScheduled || (x.resumeScheduled = !0, me.nextTick(K, y, x));
|
|
4170
4170
|
}
|
|
4171
4171
|
function K(y, x) {
|
|
4172
4172
|
u("resume", x.reading), x.reading || y.read(0), x.resumeScheduled = !1, y.emit("resume"), O(y), x.flowing && !x.reading && y.read(0);
|
|
@@ -4232,7 +4232,7 @@ function ta() {
|
|
|
4232
4232
|
set: function(x) {
|
|
4233
4233
|
this._readableState && (this._readableState.flowing = x);
|
|
4234
4234
|
}
|
|
4235
|
-
}), v._fromList =
|
|
4235
|
+
}), v._fromList = p, Object.defineProperty(v.prototype, "readableLength", {
|
|
4236
4236
|
// making it explicit this property is not enumerable
|
|
4237
4237
|
// because otherwise some prototype manipulation in
|
|
4238
4238
|
// userland will fail
|
|
@@ -4241,14 +4241,14 @@ function ta() {
|
|
|
4241
4241
|
return this._readableState.length;
|
|
4242
4242
|
}
|
|
4243
4243
|
});
|
|
4244
|
-
function
|
|
4244
|
+
function p(y, x) {
|
|
4245
4245
|
if (x.length === 0) return null;
|
|
4246
4246
|
var M;
|
|
4247
4247
|
return x.objectMode ? M = x.buffer.shift() : !y || y >= x.length ? (x.decoder ? M = x.buffer.join("") : x.buffer.length === 1 ? M = x.buffer.first() : M = x.buffer.concat(x.length), x.buffer.clear()) : M = x.buffer.consume(y, x.decoder), M;
|
|
4248
4248
|
}
|
|
4249
|
-
function
|
|
4249
|
+
function m(y) {
|
|
4250
4250
|
var x = y._readableState;
|
|
4251
|
-
u("endReadable", x.endEmitted), x.endEmitted || (x.ended = !0,
|
|
4251
|
+
u("endReadable", x.endEmitted), x.endEmitted || (x.ended = !0, me.nextTick(N, x, y));
|
|
4252
4252
|
}
|
|
4253
4253
|
function N(y, x) {
|
|
4254
4254
|
if (u("endReadableNT", y.endEmitted, y.length), !y.endEmitted && y.length === 0 && (y.endEmitted = !0, x.readable = !1, x.emit("end"), y.autoDestroy)) {
|
|
@@ -4442,8 +4442,8 @@ function Gl() {
|
|
|
4442
4442
|
}
|
|
4443
4443
|
(function(r) {
|
|
4444
4444
|
(function(e) {
|
|
4445
|
-
e.parser = function(
|
|
4446
|
-
return new n(
|
|
4445
|
+
e.parser = function(p, m) {
|
|
4446
|
+
return new n(p, m);
|
|
4447
4447
|
}, e.SAXParser = n, e.SAXStream = c, e.createStream = f, e.MAX_BUFFER_LENGTH = 64 * 1024;
|
|
4448
4448
|
var t = [
|
|
4449
4449
|
"comment",
|
|
@@ -4479,51 +4479,51 @@ function Gl() {
|
|
|
4479
4479
|
"opennamespace",
|
|
4480
4480
|
"closenamespace"
|
|
4481
4481
|
];
|
|
4482
|
-
function n(
|
|
4482
|
+
function n(p, m) {
|
|
4483
4483
|
if (!(this instanceof n))
|
|
4484
|
-
return new n(
|
|
4484
|
+
return new n(p, m);
|
|
4485
4485
|
var N = this;
|
|
4486
|
-
s(N), N.q = N.c = "", N.bufferCheckPosition = e.MAX_BUFFER_LENGTH, N.opt =
|
|
4486
|
+
s(N), N.q = N.c = "", N.bufferCheckPosition = e.MAX_BUFFER_LENGTH, N.opt = m || {}, N.opt.lowercase = N.opt.lowercase || N.opt.lowercasetags, N.looseCase = N.opt.lowercase ? "toLowerCase" : "toUpperCase", N.tags = [], N.closed = N.closedRoot = N.sawRoot = !1, N.tag = N.error = null, N.strict = !!p, N.noscript = !!(p || N.opt.noscript), N.state = v.BEGIN, N.strictEntities = N.opt.strictEntities, N.ENTITIES = N.strictEntities ? Object.create(e.XML_ENTITIES) : Object.create(e.ENTITIES), N.attribList = [], N.opt.xmlns && (N.ns = Object.create(A)), N.opt.unquotedAttributeValues === void 0 && (N.opt.unquotedAttributeValues = !p), N.trackPosition = N.opt.position !== !1, N.trackPosition && (N.position = N.line = N.column = 0), ie(N, "onready");
|
|
4487
4487
|
}
|
|
4488
|
-
Object.create || (Object.create = function(
|
|
4489
|
-
function
|
|
4488
|
+
Object.create || (Object.create = function(p) {
|
|
4489
|
+
function m() {
|
|
4490
4490
|
}
|
|
4491
|
-
|
|
4492
|
-
var N = new
|
|
4491
|
+
m.prototype = p;
|
|
4492
|
+
var N = new m();
|
|
4493
4493
|
return N;
|
|
4494
|
-
}), Object.keys || (Object.keys = function(
|
|
4495
|
-
var
|
|
4496
|
-
for (var N in
|
|
4497
|
-
return
|
|
4494
|
+
}), Object.keys || (Object.keys = function(p) {
|
|
4495
|
+
var m = [];
|
|
4496
|
+
for (var N in p) p.hasOwnProperty(N) && m.push(N);
|
|
4497
|
+
return m;
|
|
4498
4498
|
});
|
|
4499
|
-
function i(
|
|
4500
|
-
for (var
|
|
4501
|
-
var x =
|
|
4502
|
-
if (x >
|
|
4499
|
+
function i(p) {
|
|
4500
|
+
for (var m = Math.max(e.MAX_BUFFER_LENGTH, 10), N = 0, D = 0, y = t.length; D < y; D++) {
|
|
4501
|
+
var x = p[t[D]].length;
|
|
4502
|
+
if (x > m)
|
|
4503
4503
|
switch (t[D]) {
|
|
4504
4504
|
case "textNode":
|
|
4505
|
-
X(
|
|
4505
|
+
X(p);
|
|
4506
4506
|
break;
|
|
4507
4507
|
case "cdata":
|
|
4508
|
-
ee(
|
|
4508
|
+
ee(p, "oncdata", p.cdata), p.cdata = "";
|
|
4509
4509
|
break;
|
|
4510
4510
|
case "script":
|
|
4511
|
-
ee(
|
|
4511
|
+
ee(p, "onscript", p.script), p.script = "";
|
|
4512
4512
|
break;
|
|
4513
4513
|
default:
|
|
4514
|
-
he(
|
|
4514
|
+
he(p, "Max buffer length exceeded: " + t[D]);
|
|
4515
4515
|
}
|
|
4516
4516
|
N = Math.max(N, x);
|
|
4517
4517
|
}
|
|
4518
4518
|
var M = e.MAX_BUFFER_LENGTH - N;
|
|
4519
|
-
|
|
4519
|
+
p.bufferCheckPosition = M + p.position;
|
|
4520
4520
|
}
|
|
4521
|
-
function s(
|
|
4522
|
-
for (var
|
|
4523
|
-
|
|
4521
|
+
function s(p) {
|
|
4522
|
+
for (var m = 0, N = t.length; m < N; m++)
|
|
4523
|
+
p[t[m]] = "";
|
|
4524
4524
|
}
|
|
4525
|
-
function o(
|
|
4526
|
-
X(
|
|
4525
|
+
function o(p) {
|
|
4526
|
+
X(p), p.cdata !== "" && (ee(p, "oncdata", p.cdata), p.cdata = ""), p.script !== "" && (ee(p, "onscript", p.script), p.script = "");
|
|
4527
4527
|
}
|
|
4528
4528
|
n.prototype = {
|
|
4529
4529
|
end: function() {
|
|
@@ -4549,16 +4549,16 @@ function Gl() {
|
|
|
4549
4549
|
}
|
|
4550
4550
|
a || (a = function() {
|
|
4551
4551
|
});
|
|
4552
|
-
var u = e.EVENTS.filter(function(
|
|
4553
|
-
return
|
|
4552
|
+
var u = e.EVENTS.filter(function(p) {
|
|
4553
|
+
return p !== "error" && p !== "end";
|
|
4554
4554
|
});
|
|
4555
|
-
function f(
|
|
4556
|
-
return new c(
|
|
4555
|
+
function f(p, m) {
|
|
4556
|
+
return new c(p, m);
|
|
4557
4557
|
}
|
|
4558
|
-
function c(
|
|
4558
|
+
function c(p, m) {
|
|
4559
4559
|
if (!(this instanceof c))
|
|
4560
|
-
return new c(
|
|
4561
|
-
a.apply(this), this._parser = new n(
|
|
4560
|
+
return new c(p, m);
|
|
4561
|
+
a.apply(this), this._parser = new n(p, m), this.writable = !0, this.readable = !0;
|
|
4562
4562
|
var N = this;
|
|
4563
4563
|
this._parser.onend = function() {
|
|
4564
4564
|
N.emit("end");
|
|
@@ -4583,40 +4583,40 @@ function Gl() {
|
|
|
4583
4583
|
constructor: {
|
|
4584
4584
|
value: c
|
|
4585
4585
|
}
|
|
4586
|
-
}), c.prototype.write = function(
|
|
4587
|
-
if (typeof jt == "function" && typeof jt.isBuffer == "function" && jt.isBuffer(
|
|
4586
|
+
}), c.prototype.write = function(p) {
|
|
4587
|
+
if (typeof jt == "function" && typeof jt.isBuffer == "function" && jt.isBuffer(p)) {
|
|
4588
4588
|
if (!this._decoder) {
|
|
4589
|
-
var
|
|
4590
|
-
this._decoder = new
|
|
4589
|
+
var m = si().StringDecoder;
|
|
4590
|
+
this._decoder = new m("utf8");
|
|
4591
4591
|
}
|
|
4592
|
-
|
|
4592
|
+
p = this._decoder.write(p);
|
|
4593
4593
|
}
|
|
4594
|
-
return this._parser.write(
|
|
4595
|
-
}, c.prototype.end = function(
|
|
4596
|
-
return
|
|
4597
|
-
}, c.prototype.on = function(
|
|
4594
|
+
return this._parser.write(p.toString()), this.emit("data", p), !0;
|
|
4595
|
+
}, c.prototype.end = function(p) {
|
|
4596
|
+
return p && p.length && this.write(p), this._parser.end(), !0;
|
|
4597
|
+
}, c.prototype.on = function(p, m) {
|
|
4598
4598
|
var N = this;
|
|
4599
|
-
return !N._parser["on" +
|
|
4599
|
+
return !N._parser["on" + p] && u.indexOf(p) !== -1 && (N._parser["on" + p] = function() {
|
|
4600
4600
|
var D = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
|
|
4601
|
-
D.splice(0, 0,
|
|
4602
|
-
}), a.prototype.on.call(N,
|
|
4601
|
+
D.splice(0, 0, p), N.emit.apply(N, D);
|
|
4602
|
+
}), a.prototype.on.call(N, p, m);
|
|
4603
4603
|
};
|
|
4604
4604
|
var g = "[CDATA[", h = "DOCTYPE", S = "http://www.w3.org/XML/1998/namespace", T = "http://www.w3.org/2000/xmlns/", A = { xml: S, xmlns: T }, k = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, b = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/, F = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, R = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
|
|
4605
|
-
function C(
|
|
4606
|
-
return
|
|
4607
|
-
` ||
|
|
4605
|
+
function C(p) {
|
|
4606
|
+
return p === " " || p === `
|
|
4607
|
+
` || p === "\r" || p === " ";
|
|
4608
4608
|
}
|
|
4609
|
-
function B(
|
|
4610
|
-
return
|
|
4609
|
+
function B(p) {
|
|
4610
|
+
return p === '"' || p === "'";
|
|
4611
4611
|
}
|
|
4612
|
-
function I(
|
|
4613
|
-
return
|
|
4612
|
+
function I(p) {
|
|
4613
|
+
return p === ">" || C(p);
|
|
4614
4614
|
}
|
|
4615
|
-
function _(
|
|
4616
|
-
return
|
|
4615
|
+
function _(p, m) {
|
|
4616
|
+
return p.test(m);
|
|
4617
4617
|
}
|
|
4618
|
-
function q(
|
|
4619
|
-
return !_(
|
|
4618
|
+
function q(p, m) {
|
|
4619
|
+
return !_(p, m);
|
|
4620
4620
|
}
|
|
4621
4621
|
var v = 0;
|
|
4622
4622
|
e.STATE = {
|
|
@@ -4952,335 +4952,335 @@ function Gl() {
|
|
|
4952
4952
|
clubs: 9827,
|
|
4953
4953
|
hearts: 9829,
|
|
4954
4954
|
diams: 9830
|
|
4955
|
-
}, Object.keys(e.ENTITIES).forEach(function(
|
|
4956
|
-
var
|
|
4957
|
-
e.ENTITIES[
|
|
4955
|
+
}, Object.keys(e.ENTITIES).forEach(function(p) {
|
|
4956
|
+
var m = e.ENTITIES[p], N = typeof m == "number" ? String.fromCharCode(m) : m;
|
|
4957
|
+
e.ENTITIES[p] = N;
|
|
4958
4958
|
});
|
|
4959
4959
|
for (var $ in e.STATE)
|
|
4960
4960
|
e.STATE[e.STATE[$]] = $;
|
|
4961
4961
|
v = e.STATE;
|
|
4962
|
-
function ie(
|
|
4963
|
-
m
|
|
4962
|
+
function ie(p, m, N) {
|
|
4963
|
+
p[m] && p[m](N);
|
|
4964
4964
|
}
|
|
4965
|
-
function ee(
|
|
4966
|
-
|
|
4965
|
+
function ee(p, m, N) {
|
|
4966
|
+
p.textNode && X(p), ie(p, m, N);
|
|
4967
4967
|
}
|
|
4968
|
-
function X(
|
|
4969
|
-
|
|
4968
|
+
function X(p) {
|
|
4969
|
+
p.textNode = ce(p.opt, p.textNode), p.textNode && ie(p, "ontext", p.textNode), p.textNode = "";
|
|
4970
4970
|
}
|
|
4971
|
-
function ce(
|
|
4972
|
-
return
|
|
4971
|
+
function ce(p, m) {
|
|
4972
|
+
return p.trim && (m = m.trim()), p.normalize && (m = m.replace(/\s+/g, " ")), m;
|
|
4973
4973
|
}
|
|
4974
|
-
function he(
|
|
4975
|
-
return X(
|
|
4976
|
-
Line: ` +
|
|
4977
|
-
Column: ` +
|
|
4978
|
-
Char: ` +
|
|
4974
|
+
function he(p, m) {
|
|
4975
|
+
return X(p), p.trackPosition && (m += `
|
|
4976
|
+
Line: ` + p.line + `
|
|
4977
|
+
Column: ` + p.column + `
|
|
4978
|
+
Char: ` + p.c), m = new Error(m), p.error = m, ie(p, "onerror", m), p;
|
|
4979
4979
|
}
|
|
4980
|
-
function se(
|
|
4981
|
-
return
|
|
4980
|
+
function se(p) {
|
|
4981
|
+
return p.sawRoot && !p.closedRoot && Q(p, "Unclosed root tag"), p.state !== v.BEGIN && p.state !== v.BEGIN_WHITESPACE && p.state !== v.TEXT && he(p, "Unexpected end"), X(p), p.c = "", p.closed = !0, ie(p, "onend"), n.call(p, p.strict, p.opt), p;
|
|
4982
4982
|
}
|
|
4983
|
-
function Q(
|
|
4984
|
-
if (typeof
|
|
4983
|
+
function Q(p, m) {
|
|
4984
|
+
if (typeof p != "object" || !(p instanceof n))
|
|
4985
4985
|
throw new Error("bad call to strictFail");
|
|
4986
|
-
|
|
4986
|
+
p.strict && he(p, m);
|
|
4987
4987
|
}
|
|
4988
|
-
function
|
|
4989
|
-
|
|
4990
|
-
var
|
|
4991
|
-
|
|
4988
|
+
function pe(p) {
|
|
4989
|
+
p.strict || (p.tagName = p.tagName[p.looseCase]());
|
|
4990
|
+
var m = p.tags[p.tags.length - 1] || p, N = p.tag = { name: p.tagName, attributes: {} };
|
|
4991
|
+
p.opt.xmlns && (N.ns = m.ns), p.attribList.length = 0, ee(p, "onopentagstart", N);
|
|
4992
4992
|
}
|
|
4993
|
-
function J(
|
|
4994
|
-
var N =
|
|
4995
|
-
return
|
|
4993
|
+
function J(p, m) {
|
|
4994
|
+
var N = p.indexOf(":"), D = N < 0 ? ["", p] : p.split(":"), y = D[0], x = D[1];
|
|
4995
|
+
return m && p === "xmlns" && (y = "xmlns", x = ""), { prefix: y, local: x };
|
|
4996
4996
|
}
|
|
4997
|
-
function ne(
|
|
4998
|
-
if (
|
|
4999
|
-
|
|
4997
|
+
function ne(p) {
|
|
4998
|
+
if (p.strict || (p.attribName = p.attribName[p.looseCase]()), p.attribList.indexOf(p.attribName) !== -1 || p.tag.attributes.hasOwnProperty(p.attribName)) {
|
|
4999
|
+
p.attribName = p.attribValue = "";
|
|
5000
5000
|
return;
|
|
5001
5001
|
}
|
|
5002
|
-
if (
|
|
5003
|
-
var
|
|
5002
|
+
if (p.opt.xmlns) {
|
|
5003
|
+
var m = J(p.attribName, !0), N = m.prefix, D = m.local;
|
|
5004
5004
|
if (N === "xmlns")
|
|
5005
|
-
if (D === "xml" &&
|
|
5005
|
+
if (D === "xml" && p.attribValue !== S)
|
|
5006
5006
|
Q(
|
|
5007
|
-
|
|
5007
|
+
p,
|
|
5008
5008
|
"xml: prefix must be bound to " + S + `
|
|
5009
|
-
Actual: ` +
|
|
5009
|
+
Actual: ` + p.attribValue
|
|
5010
5010
|
);
|
|
5011
|
-
else if (D === "xmlns" &&
|
|
5011
|
+
else if (D === "xmlns" && p.attribValue !== T)
|
|
5012
5012
|
Q(
|
|
5013
|
-
|
|
5013
|
+
p,
|
|
5014
5014
|
"xmlns: prefix must be bound to " + T + `
|
|
5015
|
-
Actual: ` +
|
|
5015
|
+
Actual: ` + p.attribValue
|
|
5016
5016
|
);
|
|
5017
5017
|
else {
|
|
5018
|
-
var y =
|
|
5019
|
-
y.ns === x.ns && (y.ns = Object.create(x.ns)), y.ns[D] =
|
|
5018
|
+
var y = p.tag, x = p.tags[p.tags.length - 1] || p;
|
|
5019
|
+
y.ns === x.ns && (y.ns = Object.create(x.ns)), y.ns[D] = p.attribValue;
|
|
5020
5020
|
}
|
|
5021
|
-
|
|
5021
|
+
p.attribList.push([p.attribName, p.attribValue]);
|
|
5022
5022
|
} else
|
|
5023
|
-
|
|
5024
|
-
name:
|
|
5025
|
-
value:
|
|
5023
|
+
p.tag.attributes[p.attribName] = p.attribValue, ee(p, "onattribute", {
|
|
5024
|
+
name: p.attribName,
|
|
5025
|
+
value: p.attribValue
|
|
5026
5026
|
});
|
|
5027
|
-
|
|
5027
|
+
p.attribName = p.attribValue = "";
|
|
5028
5028
|
}
|
|
5029
|
-
function ae(
|
|
5030
|
-
if (
|
|
5031
|
-
var N =
|
|
5032
|
-
N.prefix = D.prefix, N.local = D.local, N.uri = N.ns[D.prefix] || "", N.prefix && !N.uri && (Q(
|
|
5033
|
-
var y =
|
|
5029
|
+
function ae(p, m) {
|
|
5030
|
+
if (p.opt.xmlns) {
|
|
5031
|
+
var N = p.tag, D = J(p.tagName);
|
|
5032
|
+
N.prefix = D.prefix, N.local = D.local, N.uri = N.ns[D.prefix] || "", N.prefix && !N.uri && (Q(p, "Unbound namespace prefix: " + JSON.stringify(p.tagName)), N.uri = D.prefix);
|
|
5033
|
+
var y = p.tags[p.tags.length - 1] || p;
|
|
5034
5034
|
N.ns && y.ns !== N.ns && Object.keys(N.ns).forEach(function(He) {
|
|
5035
|
-
ee(
|
|
5035
|
+
ee(p, "onopennamespace", {
|
|
5036
5036
|
prefix: He,
|
|
5037
5037
|
uri: N.ns[He]
|
|
5038
5038
|
});
|
|
5039
5039
|
});
|
|
5040
|
-
for (var x = 0, M =
|
|
5041
|
-
var W =
|
|
5040
|
+
for (var x = 0, M = p.attribList.length; x < M; x++) {
|
|
5041
|
+
var W = p.attribList[x], te = W[0], Y = W[1], re = J(te, !0), ye = re.prefix, z = re.local, Be = ye === "" ? "" : N.ns[ye] || "", Te = {
|
|
5042
5042
|
name: te,
|
|
5043
5043
|
value: Y,
|
|
5044
5044
|
prefix: ye,
|
|
5045
5045
|
local: z,
|
|
5046
5046
|
uri: Be
|
|
5047
5047
|
};
|
|
5048
|
-
ye && ye !== "xmlns" && !Be && (Q(
|
|
5048
|
+
ye && ye !== "xmlns" && !Be && (Q(p, "Unbound namespace prefix: " + JSON.stringify(ye)), Te.uri = ye), p.tag.attributes[te] = Te, ee(p, "onattribute", Te);
|
|
5049
5049
|
}
|
|
5050
|
-
|
|
5050
|
+
p.attribList.length = 0;
|
|
5051
5051
|
}
|
|
5052
|
-
|
|
5052
|
+
p.tag.isSelfClosing = !!m, p.sawRoot = !0, p.tags.push(p.tag), ee(p, "onopentag", p.tag), m || (!p.noscript && p.tagName.toLowerCase() === "script" ? p.state = v.SCRIPT : p.state = v.TEXT, p.tag = null, p.tagName = ""), p.attribName = p.attribValue = "", p.attribList.length = 0;
|
|
5053
5053
|
}
|
|
5054
|
-
function L(
|
|
5055
|
-
if (!
|
|
5056
|
-
Q(
|
|
5054
|
+
function L(p) {
|
|
5055
|
+
if (!p.tagName) {
|
|
5056
|
+
Q(p, "Weird empty close tag."), p.textNode += "</>", p.state = v.TEXT;
|
|
5057
5057
|
return;
|
|
5058
5058
|
}
|
|
5059
|
-
if (
|
|
5060
|
-
if (
|
|
5061
|
-
|
|
5059
|
+
if (p.script) {
|
|
5060
|
+
if (p.tagName !== "script") {
|
|
5061
|
+
p.script += "</" + p.tagName + ">", p.tagName = "", p.state = v.SCRIPT;
|
|
5062
5062
|
return;
|
|
5063
5063
|
}
|
|
5064
|
-
ee(
|
|
5064
|
+
ee(p, "onscript", p.script), p.script = "";
|
|
5065
5065
|
}
|
|
5066
|
-
var
|
|
5067
|
-
|
|
5068
|
-
for (var D = N;
|
|
5069
|
-
var y =
|
|
5066
|
+
var m = p.tags.length, N = p.tagName;
|
|
5067
|
+
p.strict || (N = N[p.looseCase]());
|
|
5068
|
+
for (var D = N; m--; ) {
|
|
5069
|
+
var y = p.tags[m];
|
|
5070
5070
|
if (y.name !== D)
|
|
5071
|
-
Q(
|
|
5071
|
+
Q(p, "Unexpected close tag");
|
|
5072
5072
|
else
|
|
5073
5073
|
break;
|
|
5074
5074
|
}
|
|
5075
|
-
if (
|
|
5076
|
-
Q(
|
|
5075
|
+
if (m < 0) {
|
|
5076
|
+
Q(p, "Unmatched closing tag: " + p.tagName), p.textNode += "</" + p.tagName + ">", p.state = v.TEXT;
|
|
5077
5077
|
return;
|
|
5078
5078
|
}
|
|
5079
|
-
|
|
5080
|
-
for (var x =
|
|
5081
|
-
var M =
|
|
5082
|
-
|
|
5079
|
+
p.tagName = N;
|
|
5080
|
+
for (var x = p.tags.length; x-- > m; ) {
|
|
5081
|
+
var M = p.tag = p.tags.pop();
|
|
5082
|
+
p.tagName = p.tag.name, ee(p, "onclosetag", p.tagName);
|
|
5083
5083
|
var W = {};
|
|
5084
5084
|
for (var te in M.ns)
|
|
5085
5085
|
W[te] = M.ns[te];
|
|
5086
|
-
var Y =
|
|
5087
|
-
|
|
5086
|
+
var Y = p.tags[p.tags.length - 1] || p;
|
|
5087
|
+
p.opt.xmlns && M.ns !== Y.ns && Object.keys(M.ns).forEach(function(re) {
|
|
5088
5088
|
var ye = M.ns[re];
|
|
5089
|
-
ee(
|
|
5089
|
+
ee(p, "onclosenamespace", { prefix: re, uri: ye });
|
|
5090
5090
|
});
|
|
5091
5091
|
}
|
|
5092
|
-
|
|
5092
|
+
m === 0 && (p.closedRoot = !0), p.tagName = p.attribValue = p.attribName = "", p.attribList.length = 0, p.state = v.TEXT;
|
|
5093
5093
|
}
|
|
5094
|
-
function H(
|
|
5095
|
-
var
|
|
5096
|
-
return
|
|
5094
|
+
function H(p) {
|
|
5095
|
+
var m = p.entity, N = m.toLowerCase(), D, y = "";
|
|
5096
|
+
return p.ENTITIES[m] ? p.ENTITIES[m] : p.ENTITIES[N] ? p.ENTITIES[N] : (m = N, m.charAt(0) === "#" && (m.charAt(1) === "x" ? (m = m.slice(2), D = parseInt(m, 16), y = D.toString(16)) : (m = m.slice(1), D = parseInt(m, 10), y = D.toString(10))), m = m.replace(/^0+/, ""), isNaN(D) || y.toLowerCase() !== m ? (Q(p, "Invalid character entity"), "&" + p.entity + ";") : String.fromCodePoint(D));
|
|
5097
5097
|
}
|
|
5098
|
-
function V(
|
|
5099
|
-
|
|
5098
|
+
function V(p, m) {
|
|
5099
|
+
m === "<" ? (p.state = v.OPEN_WAKA, p.startTagPosition = p.position) : C(m) || (Q(p, "Non-whitespace before first tag."), p.textNode = m, p.state = v.TEXT);
|
|
5100
5100
|
}
|
|
5101
|
-
function K(
|
|
5101
|
+
function K(p, m) {
|
|
5102
5102
|
var N = "";
|
|
5103
|
-
return
|
|
5103
|
+
return m < p.length && (N = p.charAt(m)), N;
|
|
5104
5104
|
}
|
|
5105
|
-
function O(
|
|
5106
|
-
var
|
|
5105
|
+
function O(p) {
|
|
5106
|
+
var m = this;
|
|
5107
5107
|
if (this.error)
|
|
5108
5108
|
throw this.error;
|
|
5109
|
-
if (
|
|
5109
|
+
if (m.closed)
|
|
5110
5110
|
return he(
|
|
5111
|
-
|
|
5111
|
+
m,
|
|
5112
5112
|
"Cannot write after close. Assign an onready handler."
|
|
5113
5113
|
);
|
|
5114
|
-
if (
|
|
5115
|
-
return se(
|
|
5116
|
-
typeof
|
|
5117
|
-
for (var N = 0, D = ""; D = K(
|
|
5118
|
-
switch (
|
|
5119
|
-
` ? (
|
|
5114
|
+
if (p === null)
|
|
5115
|
+
return se(m);
|
|
5116
|
+
typeof p == "object" && (p = p.toString());
|
|
5117
|
+
for (var N = 0, D = ""; D = K(p, N++), m.c = D, !!D; )
|
|
5118
|
+
switch (m.trackPosition && (m.position++, D === `
|
|
5119
|
+
` ? (m.line++, m.column = 0) : m.column++), m.state) {
|
|
5120
5120
|
case v.BEGIN:
|
|
5121
|
-
if (
|
|
5121
|
+
if (m.state = v.BEGIN_WHITESPACE, D === "\uFEFF")
|
|
5122
5122
|
continue;
|
|
5123
|
-
V(
|
|
5123
|
+
V(m, D);
|
|
5124
5124
|
continue;
|
|
5125
5125
|
case v.BEGIN_WHITESPACE:
|
|
5126
|
-
V(
|
|
5126
|
+
V(m, D);
|
|
5127
5127
|
continue;
|
|
5128
5128
|
case v.TEXT:
|
|
5129
|
-
if (
|
|
5129
|
+
if (m.sawRoot && !m.closedRoot) {
|
|
5130
5130
|
for (var y = N - 1; D && D !== "<" && D !== "&"; )
|
|
5131
|
-
D = K(
|
|
5132
|
-
` ? (
|
|
5133
|
-
|
|
5131
|
+
D = K(p, N++), D && m.trackPosition && (m.position++, D === `
|
|
5132
|
+
` ? (m.line++, m.column = 0) : m.column++);
|
|
5133
|
+
m.textNode += p.substring(y, N - 1);
|
|
5134
5134
|
}
|
|
5135
|
-
D === "<" && !(
|
|
5135
|
+
D === "<" && !(m.sawRoot && m.closedRoot && !m.strict) ? (m.state = v.OPEN_WAKA, m.startTagPosition = m.position) : (!C(D) && (!m.sawRoot || m.closedRoot) && Q(m, "Text data outside of root node."), D === "&" ? m.state = v.TEXT_ENTITY : m.textNode += D);
|
|
5136
5136
|
continue;
|
|
5137
5137
|
case v.SCRIPT:
|
|
5138
|
-
D === "<" ?
|
|
5138
|
+
D === "<" ? m.state = v.SCRIPT_ENDING : m.script += D;
|
|
5139
5139
|
continue;
|
|
5140
5140
|
case v.SCRIPT_ENDING:
|
|
5141
|
-
D === "/" ?
|
|
5141
|
+
D === "/" ? m.state = v.CLOSE_TAG : (m.script += "<" + D, m.state = v.SCRIPT);
|
|
5142
5142
|
continue;
|
|
5143
5143
|
case v.OPEN_WAKA:
|
|
5144
5144
|
if (D === "!")
|
|
5145
|
-
|
|
5145
|
+
m.state = v.SGML_DECL, m.sgmlDecl = "";
|
|
5146
5146
|
else if (!C(D)) if (_(k, D))
|
|
5147
|
-
|
|
5147
|
+
m.state = v.OPEN_TAG, m.tagName = D;
|
|
5148
5148
|
else if (D === "/")
|
|
5149
|
-
|
|
5149
|
+
m.state = v.CLOSE_TAG, m.tagName = "";
|
|
5150
5150
|
else if (D === "?")
|
|
5151
|
-
|
|
5151
|
+
m.state = v.PROC_INST, m.procInstName = m.procInstBody = "";
|
|
5152
5152
|
else {
|
|
5153
|
-
if (Q(
|
|
5154
|
-
var x =
|
|
5153
|
+
if (Q(m, "Unencoded <"), m.startTagPosition + 1 < m.position) {
|
|
5154
|
+
var x = m.position - m.startTagPosition;
|
|
5155
5155
|
D = new Array(x).join(" ") + D;
|
|
5156
5156
|
}
|
|
5157
|
-
|
|
5157
|
+
m.textNode += "<" + D, m.state = v.TEXT;
|
|
5158
5158
|
}
|
|
5159
5159
|
continue;
|
|
5160
5160
|
case v.SGML_DECL:
|
|
5161
|
-
if (
|
|
5162
|
-
|
|
5161
|
+
if (m.sgmlDecl + D === "--") {
|
|
5162
|
+
m.state = v.COMMENT, m.comment = "", m.sgmlDecl = "";
|
|
5163
5163
|
continue;
|
|
5164
5164
|
}
|
|
5165
|
-
|
|
5166
|
-
|
|
5165
|
+
m.doctype && m.doctype !== !0 && m.sgmlDecl ? (m.state = v.DOCTYPE_DTD, m.doctype += "<!" + m.sgmlDecl + D, m.sgmlDecl = "") : (m.sgmlDecl + D).toUpperCase() === g ? (ee(m, "onopencdata"), m.state = v.CDATA, m.sgmlDecl = "", m.cdata = "") : (m.sgmlDecl + D).toUpperCase() === h ? (m.state = v.DOCTYPE, (m.doctype || m.sawRoot) && Q(
|
|
5166
|
+
m,
|
|
5167
5167
|
"Inappropriately located doctype declaration"
|
|
5168
|
-
),
|
|
5168
|
+
), m.doctype = "", m.sgmlDecl = "") : D === ">" ? (ee(m, "onsgmldeclaration", m.sgmlDecl), m.sgmlDecl = "", m.state = v.TEXT) : (B(D) && (m.state = v.SGML_DECL_QUOTED), m.sgmlDecl += D);
|
|
5169
5169
|
continue;
|
|
5170
5170
|
case v.SGML_DECL_QUOTED:
|
|
5171
|
-
D ===
|
|
5171
|
+
D === m.q && (m.state = v.SGML_DECL, m.q = ""), m.sgmlDecl += D;
|
|
5172
5172
|
continue;
|
|
5173
5173
|
case v.DOCTYPE:
|
|
5174
|
-
D === ">" ? (
|
|
5174
|
+
D === ">" ? (m.state = v.TEXT, ee(m, "ondoctype", m.doctype), m.doctype = !0) : (m.doctype += D, D === "[" ? m.state = v.DOCTYPE_DTD : B(D) && (m.state = v.DOCTYPE_QUOTED, m.q = D));
|
|
5175
5175
|
continue;
|
|
5176
5176
|
case v.DOCTYPE_QUOTED:
|
|
5177
|
-
|
|
5177
|
+
m.doctype += D, D === m.q && (m.q = "", m.state = v.DOCTYPE);
|
|
5178
5178
|
continue;
|
|
5179
5179
|
case v.DOCTYPE_DTD:
|
|
5180
|
-
D === "]" ? (
|
|
5180
|
+
D === "]" ? (m.doctype += D, m.state = v.DOCTYPE) : D === "<" ? (m.state = v.OPEN_WAKA, m.startTagPosition = m.position) : B(D) ? (m.doctype += D, m.state = v.DOCTYPE_DTD_QUOTED, m.q = D) : m.doctype += D;
|
|
5181
5181
|
continue;
|
|
5182
5182
|
case v.DOCTYPE_DTD_QUOTED:
|
|
5183
|
-
|
|
5183
|
+
m.doctype += D, D === m.q && (m.state = v.DOCTYPE_DTD, m.q = "");
|
|
5184
5184
|
continue;
|
|
5185
5185
|
case v.COMMENT:
|
|
5186
|
-
D === "-" ?
|
|
5186
|
+
D === "-" ? m.state = v.COMMENT_ENDING : m.comment += D;
|
|
5187
5187
|
continue;
|
|
5188
5188
|
case v.COMMENT_ENDING:
|
|
5189
|
-
D === "-" ? (
|
|
5189
|
+
D === "-" ? (m.state = v.COMMENT_ENDED, m.comment = ce(m.opt, m.comment), m.comment && ee(m, "oncomment", m.comment), m.comment = "") : (m.comment += "-" + D, m.state = v.COMMENT);
|
|
5190
5190
|
continue;
|
|
5191
5191
|
case v.COMMENT_ENDED:
|
|
5192
|
-
D !== ">" ? (Q(
|
|
5192
|
+
D !== ">" ? (Q(m, "Malformed comment"), m.comment += "--" + D, m.state = v.COMMENT) : m.doctype && m.doctype !== !0 ? m.state = v.DOCTYPE_DTD : m.state = v.TEXT;
|
|
5193
5193
|
continue;
|
|
5194
5194
|
case v.CDATA:
|
|
5195
|
-
D === "]" ?
|
|
5195
|
+
D === "]" ? m.state = v.CDATA_ENDING : m.cdata += D;
|
|
5196
5196
|
continue;
|
|
5197
5197
|
case v.CDATA_ENDING:
|
|
5198
|
-
D === "]" ?
|
|
5198
|
+
D === "]" ? m.state = v.CDATA_ENDING_2 : (m.cdata += "]" + D, m.state = v.CDATA);
|
|
5199
5199
|
continue;
|
|
5200
5200
|
case v.CDATA_ENDING_2:
|
|
5201
|
-
D === ">" ? (
|
|
5201
|
+
D === ">" ? (m.cdata && ee(m, "oncdata", m.cdata), ee(m, "onclosecdata"), m.cdata = "", m.state = v.TEXT) : D === "]" ? m.cdata += "]" : (m.cdata += "]]" + D, m.state = v.CDATA);
|
|
5202
5202
|
continue;
|
|
5203
5203
|
case v.PROC_INST:
|
|
5204
|
-
D === "?" ?
|
|
5204
|
+
D === "?" ? m.state = v.PROC_INST_ENDING : C(D) ? m.state = v.PROC_INST_BODY : m.procInstName += D;
|
|
5205
5205
|
continue;
|
|
5206
5206
|
case v.PROC_INST_BODY:
|
|
5207
|
-
if (!
|
|
5207
|
+
if (!m.procInstBody && C(D))
|
|
5208
5208
|
continue;
|
|
5209
|
-
D === "?" ?
|
|
5209
|
+
D === "?" ? m.state = v.PROC_INST_ENDING : m.procInstBody += D;
|
|
5210
5210
|
continue;
|
|
5211
5211
|
case v.PROC_INST_ENDING:
|
|
5212
|
-
D === ">" ? (ee(
|
|
5213
|
-
name:
|
|
5214
|
-
body:
|
|
5215
|
-
}),
|
|
5212
|
+
D === ">" ? (ee(m, "onprocessinginstruction", {
|
|
5213
|
+
name: m.procInstName,
|
|
5214
|
+
body: m.procInstBody
|
|
5215
|
+
}), m.procInstName = m.procInstBody = "", m.state = v.TEXT) : (m.procInstBody += "?" + D, m.state = v.PROC_INST_BODY);
|
|
5216
5216
|
continue;
|
|
5217
5217
|
case v.OPEN_TAG:
|
|
5218
|
-
_(b, D) ?
|
|
5218
|
+
_(b, D) ? m.tagName += D : (pe(m), D === ">" ? ae(m) : D === "/" ? m.state = v.OPEN_TAG_SLASH : (C(D) || Q(m, "Invalid character in tag name"), m.state = v.ATTRIB));
|
|
5219
5219
|
continue;
|
|
5220
5220
|
case v.OPEN_TAG_SLASH:
|
|
5221
|
-
D === ">" ? (ae(
|
|
5221
|
+
D === ">" ? (ae(m, !0), L(m)) : (Q(m, "Forward-slash in opening tag not followed by >"), m.state = v.ATTRIB);
|
|
5222
5222
|
continue;
|
|
5223
5223
|
case v.ATTRIB:
|
|
5224
5224
|
if (C(D))
|
|
5225
5225
|
continue;
|
|
5226
|
-
D === ">" ? ae(
|
|
5226
|
+
D === ">" ? ae(m) : D === "/" ? m.state = v.OPEN_TAG_SLASH : _(k, D) ? (m.attribName = D, m.attribValue = "", m.state = v.ATTRIB_NAME) : Q(m, "Invalid attribute name");
|
|
5227
5227
|
continue;
|
|
5228
5228
|
case v.ATTRIB_NAME:
|
|
5229
|
-
D === "=" ?
|
|
5229
|
+
D === "=" ? m.state = v.ATTRIB_VALUE : D === ">" ? (Q(m, "Attribute without value"), m.attribValue = m.attribName, ne(m), ae(m)) : C(D) ? m.state = v.ATTRIB_NAME_SAW_WHITE : _(b, D) ? m.attribName += D : Q(m, "Invalid attribute name");
|
|
5230
5230
|
continue;
|
|
5231
5231
|
case v.ATTRIB_NAME_SAW_WHITE:
|
|
5232
5232
|
if (D === "=")
|
|
5233
|
-
|
|
5233
|
+
m.state = v.ATTRIB_VALUE;
|
|
5234
5234
|
else {
|
|
5235
5235
|
if (C(D))
|
|
5236
5236
|
continue;
|
|
5237
|
-
Q(
|
|
5238
|
-
name:
|
|
5237
|
+
Q(m, "Attribute without value"), m.tag.attributes[m.attribName] = "", m.attribValue = "", ee(m, "onattribute", {
|
|
5238
|
+
name: m.attribName,
|
|
5239
5239
|
value: ""
|
|
5240
|
-
}),
|
|
5240
|
+
}), m.attribName = "", D === ">" ? ae(m) : _(k, D) ? (m.attribName = D, m.state = v.ATTRIB_NAME) : (Q(m, "Invalid attribute name"), m.state = v.ATTRIB);
|
|
5241
5241
|
}
|
|
5242
5242
|
continue;
|
|
5243
5243
|
case v.ATTRIB_VALUE:
|
|
5244
5244
|
if (C(D))
|
|
5245
5245
|
continue;
|
|
5246
|
-
B(D) ? (
|
|
5246
|
+
B(D) ? (m.q = D, m.state = v.ATTRIB_VALUE_QUOTED) : (m.opt.unquotedAttributeValues || he(m, "Unquoted attribute value"), m.state = v.ATTRIB_VALUE_UNQUOTED, m.attribValue = D);
|
|
5247
5247
|
continue;
|
|
5248
5248
|
case v.ATTRIB_VALUE_QUOTED:
|
|
5249
|
-
if (D !==
|
|
5250
|
-
D === "&" ?
|
|
5249
|
+
if (D !== m.q) {
|
|
5250
|
+
D === "&" ? m.state = v.ATTRIB_VALUE_ENTITY_Q : m.attribValue += D;
|
|
5251
5251
|
continue;
|
|
5252
5252
|
}
|
|
5253
|
-
ne(
|
|
5253
|
+
ne(m), m.q = "", m.state = v.ATTRIB_VALUE_CLOSED;
|
|
5254
5254
|
continue;
|
|
5255
5255
|
case v.ATTRIB_VALUE_CLOSED:
|
|
5256
|
-
C(D) ?
|
|
5256
|
+
C(D) ? m.state = v.ATTRIB : D === ">" ? ae(m) : D === "/" ? m.state = v.OPEN_TAG_SLASH : _(k, D) ? (Q(m, "No whitespace between attributes"), m.attribName = D, m.attribValue = "", m.state = v.ATTRIB_NAME) : Q(m, "Invalid attribute name");
|
|
5257
5257
|
continue;
|
|
5258
5258
|
case v.ATTRIB_VALUE_UNQUOTED:
|
|
5259
5259
|
if (!I(D)) {
|
|
5260
|
-
D === "&" ?
|
|
5260
|
+
D === "&" ? m.state = v.ATTRIB_VALUE_ENTITY_U : m.attribValue += D;
|
|
5261
5261
|
continue;
|
|
5262
5262
|
}
|
|
5263
|
-
ne(
|
|
5263
|
+
ne(m), D === ">" ? ae(m) : m.state = v.ATTRIB;
|
|
5264
5264
|
continue;
|
|
5265
5265
|
case v.CLOSE_TAG:
|
|
5266
|
-
if (
|
|
5267
|
-
D === ">" ? L(
|
|
5266
|
+
if (m.tagName)
|
|
5267
|
+
D === ">" ? L(m) : _(b, D) ? m.tagName += D : m.script ? (m.script += "</" + m.tagName, m.tagName = "", m.state = v.SCRIPT) : (C(D) || Q(m, "Invalid tagname in closing tag"), m.state = v.CLOSE_TAG_SAW_WHITE);
|
|
5268
5268
|
else {
|
|
5269
5269
|
if (C(D))
|
|
5270
5270
|
continue;
|
|
5271
|
-
q(k, D) ?
|
|
5271
|
+
q(k, D) ? m.script ? (m.script += "</" + D, m.state = v.SCRIPT) : Q(m, "Invalid tagname in closing tag.") : m.tagName = D;
|
|
5272
5272
|
}
|
|
5273
5273
|
continue;
|
|
5274
5274
|
case v.CLOSE_TAG_SAW_WHITE:
|
|
5275
5275
|
if (C(D))
|
|
5276
5276
|
continue;
|
|
5277
|
-
D === ">" ? L(
|
|
5277
|
+
D === ">" ? L(m) : Q(m, "Invalid characters in closing tag");
|
|
5278
5278
|
continue;
|
|
5279
5279
|
case v.TEXT_ENTITY:
|
|
5280
5280
|
case v.ATTRIB_VALUE_ENTITY_Q:
|
|
5281
5281
|
case v.ATTRIB_VALUE_ENTITY_U:
|
|
5282
5282
|
var M, W;
|
|
5283
|
-
switch (
|
|
5283
|
+
switch (m.state) {
|
|
5284
5284
|
case v.TEXT_ENTITY:
|
|
5285
5285
|
M = v.TEXT, W = "textNode";
|
|
5286
5286
|
break;
|
|
@@ -5292,18 +5292,18 @@ Actual: ` + m.attribValue
|
|
|
5292
5292
|
break;
|
|
5293
5293
|
}
|
|
5294
5294
|
if (D === ";") {
|
|
5295
|
-
var te = H(
|
|
5296
|
-
|
|
5297
|
-
} else _(
|
|
5295
|
+
var te = H(m);
|
|
5296
|
+
m.opt.unparsedEntities && !Object.values(e.XML_ENTITIES).includes(te) ? (m.entity = "", m.state = M, m.write(te)) : (m[W] += te, m.entity = "", m.state = M);
|
|
5297
|
+
} else _(m.entity.length ? R : F, D) ? m.entity += D : (Q(m, "Invalid character in entity name"), m[W] += "&" + m.entity + D, m.entity = "", m.state = M);
|
|
5298
5298
|
continue;
|
|
5299
5299
|
default:
|
|
5300
|
-
throw new Error(
|
|
5300
|
+
throw new Error(m, "Unknown state: " + m.state);
|
|
5301
5301
|
}
|
|
5302
|
-
return
|
|
5302
|
+
return m.position >= m.bufferCheckPosition && i(m), m;
|
|
5303
5303
|
}
|
|
5304
5304
|
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
|
|
5305
5305
|
String.fromCodePoint || function() {
|
|
5306
|
-
var
|
|
5306
|
+
var p = String.fromCharCode, m = Math.floor, N = function() {
|
|
5307
5307
|
var D = 16384, y = [], x, M, W = -1, te = arguments.length;
|
|
5308
5308
|
if (!te)
|
|
5309
5309
|
return "";
|
|
@@ -5312,9 +5312,9 @@ Actual: ` + m.attribValue
|
|
|
5312
5312
|
if (!isFinite(re) || // `NaN`, `+Infinity`, or `-Infinity`
|
|
5313
5313
|
re < 0 || // not a valid Unicode code point
|
|
5314
5314
|
re > 1114111 || // not a valid Unicode code point
|
|
5315
|
-
|
|
5315
|
+
m(re) !== re)
|
|
5316
5316
|
throw RangeError("Invalid code point: " + re);
|
|
5317
|
-
re <= 65535 ? y.push(re) : (re -= 65536, x = (re >> 10) + 55296, M = re % 1024 + 56320, y.push(x, M)), (W + 1 === te || y.length > D) && (Y +=
|
|
5317
|
+
re <= 65535 ? y.push(re) : (re -= 65536, x = (re >> 10) + 55296, M = re % 1024 + 56320, y.push(x, M)), (W + 1 === te || y.length > D) && (Y += p.apply(null, y), y.length = 0);
|
|
5318
5318
|
}
|
|
5319
5319
|
return Y;
|
|
5320
5320
|
};
|
|
@@ -5614,9 +5614,9 @@ function cc(r, e, t, n, i) {
|
|
|
5614
5614
|
else
|
|
5615
5615
|
return o.push("/>"), o.join("");
|
|
5616
5616
|
}
|
|
5617
|
-
return o.push(
|
|
5617
|
+
return o.push(ma(r, t, n + 1, !1)), Re = r, Oe = e, e && o.push((i ? Qe(t, n, !1) : "") + "</" + s + ">"), o.join("");
|
|
5618
5618
|
}
|
|
5619
|
-
function
|
|
5619
|
+
function ma(r, e, t, n) {
|
|
5620
5620
|
var i, s, o, a = [];
|
|
5621
5621
|
for (s in r)
|
|
5622
5622
|
if (r.hasOwnProperty(s))
|
|
@@ -5650,11 +5650,11 @@ function pa(r, e, t, n) {
|
|
|
5650
5650
|
}
|
|
5651
5651
|
return a.join("");
|
|
5652
5652
|
}
|
|
5653
|
-
var
|
|
5653
|
+
var pa = function(r, e) {
|
|
5654
5654
|
e = ac(e);
|
|
5655
5655
|
var t = [];
|
|
5656
|
-
return Re = r, Oe = "_root_", e.compact ? t.push(
|
|
5657
|
-
}, fc =
|
|
5656
|
+
return Re = r, Oe = "_root_", e.compact ? t.push(ma(r, e, 0, !0)) : (r[e.declarationKey] && t.push(oa(r[e.declarationKey], e, 0)), r[e.elementsKey] && r[e.elementsKey].length && t.push(fa(r[e.elementsKey], e, 0, !t.length))), t.join("");
|
|
5657
|
+
}, fc = pa, dc = function(r, e) {
|
|
5658
5658
|
r instanceof jt && (r = r.toString());
|
|
5659
5659
|
var t = null;
|
|
5660
5660
|
if (typeof r == "string")
|
|
@@ -5666,9 +5666,9 @@ var ma = function(r, e) {
|
|
|
5666
5666
|
else
|
|
5667
5667
|
t = r;
|
|
5668
5668
|
return fc(t, e);
|
|
5669
|
-
},
|
|
5670
|
-
xml2js:
|
|
5671
|
-
xml2json:
|
|
5669
|
+
}, mc = sa, pc = sc, hc = pa, gc = dc, wc = {
|
|
5670
|
+
xml2js: mc,
|
|
5671
|
+
xml2json: pc,
|
|
5672
5672
|
js2xml: hc,
|
|
5673
5673
|
json2xml: gc
|
|
5674
5674
|
};
|
|
@@ -5747,19 +5747,19 @@ lr.exports;
|
|
|
5747
5747
|
ne = v(ne, ce.options);
|
|
5748
5748
|
var ae = ne.strict;
|
|
5749
5749
|
ae && T.test(J) && X("forbidden code point");
|
|
5750
|
-
var L = ne.encodeEverything, H = ne.useNamedReferences, V = ne.allowUnsafeSymbols, K = ne.decimal ? ee : ie, O = function(
|
|
5751
|
-
return K(
|
|
5750
|
+
var L = ne.encodeEverything, H = ne.useNamedReferences, V = ne.allowUnsafeSymbols, K = ne.decimal ? ee : ie, O = function(p) {
|
|
5751
|
+
return K(p.charCodeAt(0));
|
|
5752
5752
|
};
|
|
5753
|
-
return L ? (J = J.replace(a, function(
|
|
5754
|
-
return H && _(c,
|
|
5755
|
-
}), H && (J = J.replace(/>\u20D2/g, ">⃒").replace(/<\u20D2/g, "<⃒").replace(/fj/g, "fj")), H && (J = J.replace(f, function(
|
|
5756
|
-
return "&" + c[
|
|
5757
|
-
}))) : H ? (V || (J = J.replace(g, function(
|
|
5758
|
-
return "&" + c[
|
|
5759
|
-
})), J = J.replace(/>\u20D2/g, ">⃒").replace(/<\u20D2/g, "<⃒"), J = J.replace(f, function(
|
|
5760
|
-
return "&" + c[
|
|
5761
|
-
})) : V || (J = J.replace(g, O)), J.replace(o, function(
|
|
5762
|
-
var
|
|
5753
|
+
return L ? (J = J.replace(a, function(p) {
|
|
5754
|
+
return H && _(c, p) ? "&" + c[p] + ";" : O(p);
|
|
5755
|
+
}), H && (J = J.replace(/>\u20D2/g, ">⃒").replace(/<\u20D2/g, "<⃒").replace(/fj/g, "fj")), H && (J = J.replace(f, function(p) {
|
|
5756
|
+
return "&" + c[p] + ";";
|
|
5757
|
+
}))) : H ? (V || (J = J.replace(g, function(p) {
|
|
5758
|
+
return "&" + c[p] + ";";
|
|
5759
|
+
})), J = J.replace(/>\u20D2/g, ">⃒").replace(/<\u20D2/g, "<⃒"), J = J.replace(f, function(p) {
|
|
5760
|
+
return "&" + c[p] + ";";
|
|
5761
|
+
})) : V || (J = J.replace(g, O)), J.replace(o, function(p) {
|
|
5762
|
+
var m = p.charCodeAt(0), N = p.charCodeAt(1), D = (m - 55296) * 1024 + N - 56320 + 65536;
|
|
5763
5763
|
return K(D);
|
|
5764
5764
|
}).replace(u, O);
|
|
5765
5765
|
};
|
|
@@ -5773,11 +5773,11 @@ lr.exports;
|
|
|
5773
5773
|
var he = function(J, ne) {
|
|
5774
5774
|
ne = v(ne, he.options);
|
|
5775
5775
|
var ae = ne.strict;
|
|
5776
|
-
return ae && S.test(J) && X("malformed character reference"), J.replace(A, function(L, H, V, K, O,
|
|
5776
|
+
return ae && S.test(J) && X("malformed character reference"), J.replace(A, function(L, H, V, K, O, p, m, N, D) {
|
|
5777
5777
|
var y, x, M, W, te, Y;
|
|
5778
5778
|
return H ? (te = H, k[te]) : V ? (te = V, Y = K, Y && ne.isAttributeValue ? (ae && Y == "=" && X("`&` did not start a character reference"), L) : (ae && X(
|
|
5779
5779
|
"named character reference was not terminated by a semicolon"
|
|
5780
|
-
), b[te] + (Y || ""))) : O ? (M = O, x =
|
|
5780
|
+
), b[te] + (Y || ""))) : O ? (M = O, x = p, ae && !x && X("character reference was not terminated by a semicolon"), y = parseInt(M, 10), $(y, ae)) : m ? (W = m, x = N, ae && !x && X("character reference was not terminated by a semicolon"), y = parseInt(W, 16), $(y, ae)) : (ae && X(
|
|
5781
5781
|
"named character reference was not terminated by a semicolon"
|
|
5782
5782
|
), L);
|
|
5783
5783
|
});
|
|
@@ -5801,8 +5801,8 @@ lr.exports;
|
|
|
5801
5801
|
if (i)
|
|
5802
5802
|
i.exports = Q;
|
|
5803
5803
|
else
|
|
5804
|
-
for (var
|
|
5805
|
-
_(Q,
|
|
5804
|
+
for (var pe in Q)
|
|
5805
|
+
_(Q, pe) && (n[pe] = Q[pe]);
|
|
5806
5806
|
else
|
|
5807
5807
|
t.he = Q;
|
|
5808
5808
|
})(We);
|
|
@@ -6476,29 +6476,29 @@ function oi(r, e, t) {
|
|
|
6476
6476
|
let n = r.node(t);
|
|
6477
6477
|
return Da(n, e.node(t)), n;
|
|
6478
6478
|
}
|
|
6479
|
-
function
|
|
6479
|
+
function pt(r, e) {
|
|
6480
6480
|
let t = e.length - 1;
|
|
6481
6481
|
t >= 0 && r.isText && r.sameMarkup(e[t]) ? e[t] = r.withText(e[t].text + r.text) : e.push(r);
|
|
6482
6482
|
}
|
|
6483
6483
|
function Ht(r, e, t, n) {
|
|
6484
6484
|
let i = (e || r).node(t), s = 0, o = e ? e.index(t) : i.childCount;
|
|
6485
|
-
r && (s = r.index(t), r.depth > t ? s++ : r.textOffset && (
|
|
6485
|
+
r && (s = r.index(t), r.depth > t ? s++ : r.textOffset && (pt(r.nodeAfter, n), s++));
|
|
6486
6486
|
for (let a = s; a < o; a++)
|
|
6487
|
-
|
|
6488
|
-
e && e.depth == t && e.textOffset &&
|
|
6487
|
+
pt(i.child(a), n);
|
|
6488
|
+
e && e.depth == t && e.textOffset && pt(e.nodeBefore, n);
|
|
6489
6489
|
}
|
|
6490
6490
|
function ht(r, e) {
|
|
6491
6491
|
return r.type.checkContent(e), r.copy(e);
|
|
6492
6492
|
}
|
|
6493
6493
|
function Ea(r, e, t, n, i) {
|
|
6494
6494
|
let s = r.depth > i && oi(r, e, i + 1), o = n.depth > i && oi(t, n, i + 1), a = [];
|
|
6495
|
-
return Ht(null, r, i, a), s && o && e.index(i) == t.index(i) ? (Da(s, o),
|
|
6495
|
+
return Ht(null, r, i, a), s && o && e.index(i) == t.index(i) ? (Da(s, o), pt(ht(s, Ea(r, e, t, n, i + 1)), a)) : (s && pt(ht(s, dr(r, e, i + 1)), a), Ht(e, t, i, a), o && pt(ht(o, dr(t, n, i + 1)), a)), Ht(n, null, i, a), new Z(a);
|
|
6496
6496
|
}
|
|
6497
6497
|
function dr(r, e, t) {
|
|
6498
6498
|
let n = [];
|
|
6499
6499
|
if (Ht(null, r, t, n), r.depth > t) {
|
|
6500
6500
|
let i = oi(r, e, t + 1);
|
|
6501
|
-
|
|
6501
|
+
pt(ht(i, dr(r, e, t + 1)), n);
|
|
6502
6502
|
}
|
|
6503
6503
|
return Ht(e, null, t, n), new Z(n);
|
|
6504
6504
|
}
|
|
@@ -7175,7 +7175,7 @@ class rt {
|
|
|
7175
7175
|
}
|
|
7176
7176
|
}
|
|
7177
7177
|
rt.prototype.text = void 0;
|
|
7178
|
-
class
|
|
7178
|
+
class mr extends rt {
|
|
7179
7179
|
/**
|
|
7180
7180
|
@internal
|
|
7181
7181
|
*/
|
|
@@ -7197,10 +7197,10 @@ class pr extends rt {
|
|
|
7197
7197
|
return this.text.length;
|
|
7198
7198
|
}
|
|
7199
7199
|
mark(e) {
|
|
7200
|
-
return e == this.marks ? this : new
|
|
7200
|
+
return e == this.marks ? this : new mr(this.type, this.attrs, this.text, e);
|
|
7201
7201
|
}
|
|
7202
7202
|
withText(e) {
|
|
7203
|
-
return e == this.text ? this : new
|
|
7203
|
+
return e == this.text ? this : new mr(this.type, this.attrs, e, this.marks);
|
|
7204
7204
|
}
|
|
7205
7205
|
cut(e = 0, t = this.text.length) {
|
|
7206
7206
|
return e == 0 && t == this.text.length ? this : this.withText(this.text.slice(e, t));
|
|
@@ -7602,7 +7602,7 @@ function ka(r, e) {
|
|
|
7602
7602
|
t[n] = new jc(r, n, e[n]);
|
|
7603
7603
|
return t;
|
|
7604
7604
|
}
|
|
7605
|
-
class
|
|
7605
|
+
class pr {
|
|
7606
7606
|
/**
|
|
7607
7607
|
@internal
|
|
7608
7608
|
*/
|
|
@@ -7770,7 +7770,7 @@ class mr {
|
|
|
7770
7770
|
*/
|
|
7771
7771
|
static compile(e, t) {
|
|
7772
7772
|
let n = /* @__PURE__ */ Object.create(null);
|
|
7773
|
-
e.forEach((s, o) => n[s] = new
|
|
7773
|
+
e.forEach((s, o) => n[s] = new pr(s, t, o));
|
|
7774
7774
|
let i = t.spec.topNode || "doc";
|
|
7775
7775
|
if (!n[i])
|
|
7776
7776
|
throw new RangeError("Schema is missing its top node type ('" + i + "')");
|
|
@@ -7852,7 +7852,7 @@ class vr {
|
|
|
7852
7852
|
return this.excluded.indexOf(e) > -1;
|
|
7853
7853
|
}
|
|
7854
7854
|
}
|
|
7855
|
-
let
|
|
7855
|
+
let Km = class {
|
|
7856
7856
|
/**
|
|
7857
7857
|
Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
|
|
7858
7858
|
*/
|
|
@@ -7861,7 +7861,7 @@ let Kp = class {
|
|
|
7861
7861
|
let t = this.spec = {};
|
|
7862
7862
|
for (let i in e)
|
|
7863
7863
|
t[i] = e[i];
|
|
7864
|
-
t.nodes = Ne.from(e.nodes), t.marks = Ne.from(e.marks || {}), this.nodes =
|
|
7864
|
+
t.nodes = Ne.from(e.nodes), t.marks = Ne.from(e.marks || {}), this.nodes = pr.compile(this.spec.nodes, this), this.marks = vr.compile(this.spec.marks, this);
|
|
7865
7865
|
let n = /* @__PURE__ */ Object.create(null);
|
|
7866
7866
|
for (let i in this.nodes) {
|
|
7867
7867
|
if (i in this.marks)
|
|
@@ -7891,7 +7891,7 @@ let Kp = class {
|
|
|
7891
7891
|
node(e, t = null, n, i) {
|
|
7892
7892
|
if (typeof e == "string")
|
|
7893
7893
|
e = this.nodeType(e);
|
|
7894
|
-
else if (e instanceof
|
|
7894
|
+
else if (e instanceof pr) {
|
|
7895
7895
|
if (e.schema != this)
|
|
7896
7896
|
throw new RangeError("Node type from different schema used (" + e.name + ")");
|
|
7897
7897
|
} else throw new RangeError("Invalid node type: " + e);
|
|
@@ -7903,7 +7903,7 @@ let Kp = class {
|
|
|
7903
7903
|
*/
|
|
7904
7904
|
text(e, t) {
|
|
7905
7905
|
let n = this.nodes.text;
|
|
7906
|
-
return new
|
|
7906
|
+
return new mr(n, n.defaultAttrs, e, ge.setFrom(t));
|
|
7907
7907
|
}
|
|
7908
7908
|
/**
|
|
7909
7909
|
Create a mark with the given type and attributes.
|
|
@@ -9310,7 +9310,7 @@ function Ci(r, e, t, n = t.contentMatch, i = !0) {
|
|
|
9310
9310
|
function Zc(r, e, t) {
|
|
9311
9311
|
return (e == 0 || r.canReplace(e, r.childCount)) && (t == r.childCount || r.canReplace(0, t));
|
|
9312
9312
|
}
|
|
9313
|
-
function
|
|
9313
|
+
function Xm(r) {
|
|
9314
9314
|
let t = r.parent.content.cutByIndex(r.startIndex, r.endIndex);
|
|
9315
9315
|
for (let n = r.depth; ; --n) {
|
|
9316
9316
|
let i = r.$from.node(n), s = r.$from.index(n), o = r.$to.indexAfter(n);
|
|
@@ -9330,11 +9330,11 @@ function ef(r, e, t) {
|
|
|
9330
9330
|
A || i.after(T + 1) < i.end(T) ? (A = !0, h = Z.from(i.node(T).copy(h)), S++) : f++;
|
|
9331
9331
|
r.step(new Je(u, f, o, a, new oe(c.append(h), g, S), c.size - g, !0));
|
|
9332
9332
|
}
|
|
9333
|
-
function
|
|
9333
|
+
function Ym(r, e, t = null, n = r) {
|
|
9334
9334
|
let i = tf(r, e), s = i && rf(n, e);
|
|
9335
|
-
return s ? i.map(
|
|
9335
|
+
return s ? i.map(mo).concat({ type: e, attrs: t }).concat(s.map(mo)) : null;
|
|
9336
9336
|
}
|
|
9337
|
-
function
|
|
9337
|
+
function mo(r) {
|
|
9338
9338
|
return { type: r, attrs: null };
|
|
9339
9339
|
}
|
|
9340
9340
|
function tf(r, e) {
|
|
@@ -9420,7 +9420,7 @@ function af(r, e, t, n, i) {
|
|
|
9420
9420
|
throw new RangeError("Invalid content for node type " + t.name);
|
|
9421
9421
|
r.step(new Je(e, e + s.nodeSize, e + 1, e + s.nodeSize - 1, new oe(Z.from(o), 0, 0), 1, !0));
|
|
9422
9422
|
}
|
|
9423
|
-
function
|
|
9423
|
+
function Qm(r, e, t = 1, n) {
|
|
9424
9424
|
let i = r.resolve(e), s = i.depth - t, o = n && n[n.length - 1] || i.parent;
|
|
9425
9425
|
if (s < 0 || i.parent.type.spec.isolating || !i.parent.canReplace(i.index(), i.parent.childCount) || !o.type.validContent(i.parent.content.cutByIndex(i.index(), i.parent.childCount)))
|
|
9426
9426
|
return !1;
|
|
@@ -9446,7 +9446,7 @@ function uf(r, e, t = 1, n) {
|
|
|
9446
9446
|
}
|
|
9447
9447
|
r.step(new Ie(e, e, new oe(s.append(o), t, t), !0));
|
|
9448
9448
|
}
|
|
9449
|
-
function
|
|
9449
|
+
function Zm(r, e) {
|
|
9450
9450
|
let t = r.resolve(e), n = t.index();
|
|
9451
9451
|
return ja(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(n, n + 1);
|
|
9452
9452
|
}
|
|
@@ -9463,7 +9463,7 @@ function lf(r, e) {
|
|
|
9463
9463
|
function ja(r, e) {
|
|
9464
9464
|
return !!(r && e && !r.isLeaf && lf(r, e));
|
|
9465
9465
|
}
|
|
9466
|
-
function
|
|
9466
|
+
function ep(r, e, t = -1) {
|
|
9467
9467
|
let n = r.resolve(e);
|
|
9468
9468
|
for (let i = n.depth; ; i--) {
|
|
9469
9469
|
let s, o, a = n.index(i);
|
|
@@ -9515,7 +9515,7 @@ function ff(r, e, t) {
|
|
|
9515
9515
|
}
|
|
9516
9516
|
return null;
|
|
9517
9517
|
}
|
|
9518
|
-
function
|
|
9518
|
+
function tp(r, e, t) {
|
|
9519
9519
|
let n = r.resolve(e);
|
|
9520
9520
|
if (!t.content.size)
|
|
9521
9521
|
return e;
|
|
@@ -9540,12 +9540,12 @@ function df(r, e, t = e, n = oe.empty) {
|
|
|
9540
9540
|
if (e == t && !n.size)
|
|
9541
9541
|
return null;
|
|
9542
9542
|
let i = r.resolve(e), s = r.resolve(t);
|
|
9543
|
-
return Ha(i, s, n) ? new Ie(e, t, n) : new
|
|
9543
|
+
return Ha(i, s, n) ? new Ie(e, t, n) : new mf(i, s, n).fit();
|
|
9544
9544
|
}
|
|
9545
9545
|
function Ha(r, e, t) {
|
|
9546
9546
|
return !t.openStart && !t.openEnd && r.start() == e.start() && r.parent.canReplace(r.index(), e.index(), t.content);
|
|
9547
9547
|
}
|
|
9548
|
-
class
|
|
9548
|
+
class mf {
|
|
9549
9549
|
constructor(e, t, n) {
|
|
9550
9550
|
this.$from = e, this.$to = t, this.unplaced = n, this.frontier = [], this.placed = Z.empty;
|
|
9551
9551
|
for (let i = 0; i <= e.depth; i++) {
|
|
@@ -9714,9 +9714,9 @@ function Zn(r, e, t, n, i) {
|
|
|
9714
9714
|
if (o == s.childCount && !t.compatibleContent(s.type))
|
|
9715
9715
|
return null;
|
|
9716
9716
|
let a = n.fillBefore(s.content, !0, o);
|
|
9717
|
-
return a && !
|
|
9717
|
+
return a && !pf(t, s.content, o) ? a : null;
|
|
9718
9718
|
}
|
|
9719
|
-
function
|
|
9719
|
+
function pf(r, e, t) {
|
|
9720
9720
|
for (let n = t; n < e.childCount; n++)
|
|
9721
9721
|
if (!r.allowsMarks(e.child(n).marks))
|
|
9722
9722
|
return !0;
|
|
@@ -10289,9 +10289,9 @@ class xf {
|
|
|
10289
10289
|
this.$from = e, this.$to = t;
|
|
10290
10290
|
}
|
|
10291
10291
|
}
|
|
10292
|
-
let
|
|
10292
|
+
let po = !1;
|
|
10293
10293
|
function ho(r) {
|
|
10294
|
-
!
|
|
10294
|
+
!po && !r.parent.inlineContent && (po = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + r.parent.type.name + ")"));
|
|
10295
10295
|
}
|
|
10296
10296
|
class tt extends ve {
|
|
10297
10297
|
/**
|
|
@@ -10885,7 +10885,7 @@ function Wa(r, e, t) {
|
|
|
10885
10885
|
}
|
|
10886
10886
|
return t;
|
|
10887
10887
|
}
|
|
10888
|
-
class
|
|
10888
|
+
class rp {
|
|
10889
10889
|
/**
|
|
10890
10890
|
Create a plugin.
|
|
10891
10891
|
*/
|
|
@@ -10903,7 +10903,7 @@ const ri = /* @__PURE__ */ Object.create(null);
|
|
|
10903
10903
|
function Ja(r) {
|
|
10904
10904
|
return r in ri ? r + "$" + ++ri[r] : (ri[r] = 0, r + "$");
|
|
10905
10905
|
}
|
|
10906
|
-
class
|
|
10906
|
+
class np {
|
|
10907
10907
|
/**
|
|
10908
10908
|
Create a plugin key.
|
|
10909
10909
|
*/
|
|
@@ -10924,7 +10924,7 @@ class nm {
|
|
|
10924
10924
|
return e[this.key];
|
|
10925
10925
|
}
|
|
10926
10926
|
}
|
|
10927
|
-
const Ka = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`),
|
|
10927
|
+
const Ka = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), ip = (r) => Ka(r), sp = Object.freeze({
|
|
10928
10928
|
RESOLVED: "resolved",
|
|
10929
10929
|
NEW: "new",
|
|
10930
10930
|
ADD: "add",
|
|
@@ -10937,7 +10937,7 @@ const Ka = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), im = (r) =>
|
|
|
10937
10937
|
// Tracked changes
|
|
10938
10938
|
CHANGE_ACCEPTED: "change-accepted",
|
|
10939
10939
|
CHANGE_REJECTED: "change-rejected"
|
|
10940
|
-
}),
|
|
10940
|
+
}), op = {
|
|
10941
10941
|
mounted(r, e, t) {
|
|
10942
10942
|
const n = (i) => {
|
|
10943
10943
|
r.contains(i.target) || e.value(i);
|
|
@@ -10993,7 +10993,7 @@ function Ya(r) {
|
|
|
10993
10993
|
if (r != null)
|
|
10994
10994
|
return Math.round(r * 6);
|
|
10995
10995
|
}
|
|
10996
|
-
const Cf = async (r) => await (await fetch(r)).arrayBuffer(),
|
|
10996
|
+
const Cf = async (r) => await (await fetch(r)).arrayBuffer(), ap = (r) => {
|
|
10997
10997
|
const n = new window.DOMParser().parseFromString(r, "text/xml").querySelectorAll("Default");
|
|
10998
10998
|
return Array.from(n).map((i) => i.getAttribute("Extension"));
|
|
10999
10999
|
}, Sf = (r) => (/* @__PURE__ */ new Map([
|
|
@@ -13651,7 +13651,7 @@ function Rt(r) {
|
|
|
13651
13651
|
orderedList: vo,
|
|
13652
13652
|
lineBreak: od,
|
|
13653
13653
|
table: ad,
|
|
13654
|
-
tableRow:
|
|
13654
|
+
tableRow: md,
|
|
13655
13655
|
tableCell: hd,
|
|
13656
13656
|
bookmarkStart: yd,
|
|
13657
13657
|
fieldAnnotation: Sd,
|
|
@@ -14112,14 +14112,14 @@ function dd(r) {
|
|
|
14112
14112
|
elements: t
|
|
14113
14113
|
};
|
|
14114
14114
|
}
|
|
14115
|
-
function
|
|
14116
|
-
const e = Ot(r), t =
|
|
14115
|
+
function md(r) {
|
|
14116
|
+
const e = Ot(r), t = pd(r.node);
|
|
14117
14117
|
return t.elements.length && e.unshift(t), {
|
|
14118
14118
|
name: "w:tr",
|
|
14119
14119
|
elements: e
|
|
14120
14120
|
};
|
|
14121
14121
|
}
|
|
14122
|
-
function
|
|
14122
|
+
function pd(r) {
|
|
14123
14123
|
const { attrs: e } = r, t = [], { rowHeight: n, rowHeightType: i } = e;
|
|
14124
14124
|
if (n) {
|
|
14125
14125
|
const s = { "w:val": Fe(n) };
|
|
@@ -14724,16 +14724,16 @@ function Pd(r, e, t, n, i = null, s, o) {
|
|
|
14724
14724
|
const { fontSize: $, fonts: ie = {} } = v, ee = ie.ascii;
|
|
14725
14725
|
if (S && (q.colwidth = [S], q.widthUnit = "px"), T && (q.widthType = T), C && (q.colspan = Number(C)), F && (q.background = F), q.verticalAlign = _, $ && (q.fontSize = $), ee && (q.fontFamily = ee.ascii), n && (q.borders = { ...n }), g && (q.borders = Object.assign(q.borders || {}, g)), k && k["w:val"] === "restart") {
|
|
14726
14726
|
const X = t.elements.filter((J) => J.name === "w:tr"), ce = X.findIndex((J) => J === e), he = X.slice(ce + 1);
|
|
14727
|
-
let Q = e.elements.filter((J) => J.name === "w:tc").findIndex((J) => J === r),
|
|
14727
|
+
let Q = e.elements.filter((J) => J.name === "w:tc").findIndex((J) => J === r), pe = 1;
|
|
14728
14728
|
for (let J of he) {
|
|
14729
14729
|
const ne = J.elements.findIndex((V) => V.name === "w:tc"), ae = J.elements[ne + Q];
|
|
14730
14730
|
if (!ae) break;
|
|
14731
14731
|
const L = Fo(ae), { attributes: H } = L || {};
|
|
14732
14732
|
if (!L && !H || H && H["w:val"] === "restart")
|
|
14733
14733
|
break;
|
|
14734
|
-
|
|
14734
|
+
pe++, J.elements.splice(ne + Q, 1);
|
|
14735
14735
|
}
|
|
14736
|
-
q.rowspan =
|
|
14736
|
+
q.rowspan = pe;
|
|
14737
14737
|
}
|
|
14738
14738
|
return {
|
|
14739
14739
|
type: "tableCell",
|
|
@@ -15062,22 +15062,22 @@ const $d = (r) => {
|
|
|
15062
15062
|
return { nodes: [], consumed: 0 };
|
|
15063
15063
|
const s = e[0], o = { ...r, nodes: s.elements };
|
|
15064
15064
|
let a = t.handler(o)?.filter((c) => c) || [];
|
|
15065
|
-
const u = s.elements?.some((c) => c.name === "w:rPr"), f =
|
|
15065
|
+
const u = s.elements?.some((c) => c.name === "w:rPr"), f = em(i, n);
|
|
15066
15066
|
if (u) {
|
|
15067
15067
|
const { marks: c = [], attributes: g = {} } = Pt(s), h = c.find((T) => T.type === "textStyle"), S = h && Object.keys(h.attrs).length > 0;
|
|
15068
15068
|
f.marks && !S && c.push(...f.marks), s.marks && c.push(...s.marks), a = a.map((T) => ({ ...T, marks: di(c), attributes: g }));
|
|
15069
15069
|
} else f.marks && (a = a.map((c) => ({ ...c, marks: di(f.marks) })));
|
|
15070
15070
|
return { nodes: a, consumed: 1 };
|
|
15071
|
-
},
|
|
15071
|
+
}, em = (r, e) => {
|
|
15072
15072
|
const t = r?.["word/styles.xml"];
|
|
15073
15073
|
if (!t)
|
|
15074
15074
|
return {};
|
|
15075
15075
|
const i = t.elements[0].elements.filter((s) => s.name === "w:style").find((s) => s.attributes["w:styleId"] === e) || {};
|
|
15076
15076
|
return i ? Pt(i) : {};
|
|
15077
|
-
},
|
|
15077
|
+
}, tm = {
|
|
15078
15078
|
handlerName: "runNodeHandler",
|
|
15079
15079
|
handler: Zd
|
|
15080
|
-
},
|
|
15080
|
+
}, rm = (r) => {
|
|
15081
15081
|
const { nodes: e, insideTrackChange: t } = r;
|
|
15082
15082
|
if (e.length === 0 || !(e[0].name === "w:t" || t && e[0].name === "w:delText"))
|
|
15083
15083
|
return { nodes: [], consumed: 0 };
|
|
@@ -15098,64 +15098,64 @@ const $d = (r) => {
|
|
|
15098
15098
|
],
|
|
15099
15099
|
consumed: 1
|
|
15100
15100
|
};
|
|
15101
|
-
},
|
|
15101
|
+
}, nm = {
|
|
15102
15102
|
handlerName: "textNodeHandler",
|
|
15103
|
-
handler:
|
|
15104
|
-
},
|
|
15105
|
-
function
|
|
15103
|
+
handler: rm
|
|
15104
|
+
}, im = (r) => Object.prototype.toString.call(r) === "[object RegExp]";
|
|
15105
|
+
function sm(r, e, t = { strict: !0 }) {
|
|
15106
15106
|
const n = Object.keys(e);
|
|
15107
|
-
return n.length ? n.every((i) => t.strict ? e[i] === r[i] :
|
|
15107
|
+
return n.length ? n.every((i) => t.strict ? e[i] === r[i] : im(e[i]) ? e[i].test(r[i]) : e[i] === r[i]) : !0;
|
|
15108
15108
|
}
|
|
15109
15109
|
const fu = (r) => {
|
|
15110
15110
|
if (!r || !Array.isArray(r))
|
|
15111
15111
|
return r;
|
|
15112
15112
|
let e = [], t = null;
|
|
15113
15113
|
for (let n of r)
|
|
15114
|
-
n.type === "text" ? t &&
|
|
15114
|
+
n.type === "text" ? t && om(t, n) ? t = {
|
|
15115
15115
|
...t,
|
|
15116
15116
|
text: t.text += n.text
|
|
15117
15117
|
} : (t && e.push(t), t = { ...n }) : (t && (e.push(t), t = null), e.push(n));
|
|
15118
15118
|
return t && e.push(t), e;
|
|
15119
|
-
},
|
|
15119
|
+
}, om = (r, e) => {
|
|
15120
15120
|
if (!r || !e) return !1;
|
|
15121
15121
|
let t = r.marks ?? [], n = e.marks ?? [];
|
|
15122
15122
|
if (t.length !== n.length)
|
|
15123
15123
|
return !1;
|
|
15124
15124
|
for (let i = 0; i < t.length; i++)
|
|
15125
|
-
if (t[i].type !== n[i].type || !
|
|
15125
|
+
if (t[i].type !== n[i].type || !am(t[i].attrs, n[i].attrs))
|
|
15126
15126
|
return !1;
|
|
15127
15127
|
return !0;
|
|
15128
|
-
},
|
|
15128
|
+
}, am = (r = {}, e = {}) => sm(r, e);
|
|
15129
15129
|
function du(r, e, t) {
|
|
15130
15130
|
this.name = r, this.message = e || "", this.details = t;
|
|
15131
15131
|
const n = new Error(this.message);
|
|
15132
15132
|
this.stack = n.stack, n.name = this.name;
|
|
15133
15133
|
}
|
|
15134
15134
|
du.prototype = Object.create(Error.prototype);
|
|
15135
|
-
const
|
|
15135
|
+
const um = (r) => {
|
|
15136
15136
|
const { nodes: e, lists: t } = r;
|
|
15137
15137
|
if (e.length === 0 || e[0].name !== "w:p")
|
|
15138
15138
|
return { nodes: [], consumed: 0 };
|
|
15139
15139
|
const n = je(e[0]), i = gu(n.elements);
|
|
15140
15140
|
n.elements = i;
|
|
15141
15141
|
const s = n.elements.find((o) => o.name === "w:pPr");
|
|
15142
|
-
if (
|
|
15142
|
+
if (mi(n)) {
|
|
15143
15143
|
const o = je(e), a = [];
|
|
15144
15144
|
let u = o.shift();
|
|
15145
|
-
for (; u &&
|
|
15145
|
+
for (; u && mi(u, !0); )
|
|
15146
15146
|
a.push(u), u = o.shift(), u?.elements && !cu(u.elements) && (a.push(u), u = o.shift());
|
|
15147
15147
|
return {
|
|
15148
|
-
nodes: [
|
|
15148
|
+
nodes: [mu({ listItems: a, params: r, originalPpr: s })],
|
|
15149
15149
|
consumed: a.filter((c) => c.seen).length,
|
|
15150
15150
|
lists: t
|
|
15151
15151
|
};
|
|
15152
15152
|
} else
|
|
15153
15153
|
return { nodes: [], consumed: 0, lists: t };
|
|
15154
|
-
},
|
|
15154
|
+
}, lm = {
|
|
15155
15155
|
handlerName: "listHandler",
|
|
15156
|
-
handler:
|
|
15156
|
+
handler: um
|
|
15157
15157
|
};
|
|
15158
|
-
function
|
|
15158
|
+
function mu({
|
|
15159
15159
|
listItems: r,
|
|
15160
15160
|
originalPpr: e,
|
|
15161
15161
|
params: t,
|
|
@@ -15182,9 +15182,9 @@ function pu({
|
|
|
15182
15182
|
O && g[g.length - 1]?.content.push(O), I.seen = !0;
|
|
15183
15183
|
continue;
|
|
15184
15184
|
}
|
|
15185
|
-
const { attributes: _, elements: q, marks: v = [] } = Pt(I), $ = v.find((O) => O.type === "textStyle"), { listType: ie, listOrderingType: ee, ilvl: X, listrPrs: ce, listpPrs: he, start: se, lvlText: Q, lvlJc:
|
|
15185
|
+
const { attributes: _, elements: q, marks: v = [] } = Pt(I), $ = v.find((O) => O.type === "textStyle"), { listType: ie, listOrderingType: ee, ilvl: X, listrPrs: ce, listpPrs: he, start: se, lvlText: Q, lvlJc: pe, numId: J } = mm(_, n, u);
|
|
15186
15186
|
S = ee;
|
|
15187
|
-
const ne = parseInt(X), ae = i === ne && J === s, L =
|
|
15187
|
+
const ne = parseInt(X), ae = i === ne && J === s, L = dm({
|
|
15188
15188
|
firstListId: J,
|
|
15189
15189
|
secondListId: s,
|
|
15190
15190
|
level: ne,
|
|
@@ -15196,26 +15196,26 @@ function pu({
|
|
|
15196
15196
|
if (ae && !V) {
|
|
15197
15197
|
c[s][i]++, h = ie, I.seen = !0;
|
|
15198
15198
|
const O = [];
|
|
15199
|
-
let
|
|
15199
|
+
let p = {
|
|
15200
15200
|
type: "paragraph",
|
|
15201
15201
|
content: f.handler({ ...t, nodes: [_.paragraphProperties, ...q] })?.filter((x) => x)
|
|
15202
15202
|
};
|
|
15203
|
-
|
|
15204
|
-
...
|
|
15203
|
+
p.content && (p = {
|
|
15204
|
+
...p,
|
|
15205
15205
|
attrs: {
|
|
15206
15206
|
textAlign: $?.attrs.textAlign || null,
|
|
15207
15207
|
rsidRDefault: _?.["w:rsidRDefault"] || null
|
|
15208
15208
|
},
|
|
15209
|
-
content: fu(
|
|
15210
|
-
}), O.push(
|
|
15211
|
-
let
|
|
15212
|
-
if (S !== "bullet" && (
|
|
15209
|
+
content: fu(p.content)
|
|
15210
|
+
}), O.push(p), R = n;
|
|
15211
|
+
let m = [];
|
|
15212
|
+
if (S !== "bullet" && (m = [...o, c[s][n]]), !o.length && i > 0) {
|
|
15213
15213
|
const x = c[s];
|
|
15214
15214
|
if (x) {
|
|
15215
15215
|
const M = [];
|
|
15216
15216
|
Object.keys(x).forEach((W) => {
|
|
15217
15217
|
M.push(x[W]);
|
|
15218
|
-
}),
|
|
15218
|
+
}), m = M;
|
|
15219
15219
|
}
|
|
15220
15220
|
}
|
|
15221
15221
|
const D = I.elements.find((x) => x.name === "w:pPr")?.elements.find((x) => x.name === "w:ind");
|
|
@@ -15223,14 +15223,14 @@ function pu({
|
|
|
15223
15223
|
const x = {};
|
|
15224
15224
|
D.attributes["w:left"] !== void 0 && (x.left = xe(D.attributes["w:left"])), D.attributes["w:right"] !== void 0 && (x.right = xe(D.attributes["w:right"])), D.attributes["w:firstLine"] !== void 0 && (x.firstLine = xe(D.attributes["w:firstLine"])), D.attributes["w:hanging"] !== void 0 && (x.hanging = xe(D.attributes["w:hanging"])), K.indent = x;
|
|
15225
15225
|
}
|
|
15226
|
-
he && (K.listParagraphProperties = he), ce && (K.listRunProperties = ce), K.textStyle = $, K.order = se, K.lvlText = Q, K.lvlJc = $?.attrs.textAlign, K.listLevel =
|
|
15226
|
+
he && (K.listParagraphProperties = he), ce && (K.listRunProperties = ce), K.textStyle = $, K.order = se, K.lvlText = Q, K.lvlJc = $?.attrs.textAlign, K.listLevel = m, K.listNumberingType = ee, K.attributes = {
|
|
15227
15227
|
parentAttributes: I?.attributes || null,
|
|
15228
15228
|
originalInlineRunProps: e?.elements?.find((x) => x.name === "w:rPr")
|
|
15229
|
-
}, K.numId = J, u && (K.spacing =
|
|
15229
|
+
}, K.numId = J, u && (K.spacing = pu(I, u));
|
|
15230
15230
|
const y = ko(O, K, []);
|
|
15231
15231
|
g.push(y);
|
|
15232
15232
|
} else if (V) {
|
|
15233
|
-
const O = [...o, c[s][n]],
|
|
15233
|
+
const O = [...o, c[s][n]], p = mu({
|
|
15234
15234
|
listItems: r.slice(B),
|
|
15235
15235
|
originalPpr: e,
|
|
15236
15236
|
params: t,
|
|
@@ -15240,9 +15240,9 @@ function pu({
|
|
|
15240
15240
|
path: O,
|
|
15241
15241
|
isNested: !0
|
|
15242
15242
|
});
|
|
15243
|
-
R =
|
|
15244
|
-
const
|
|
15245
|
-
|
|
15243
|
+
R = p.lastNestedListLevel, delete p.lastNestedListLevel;
|
|
15244
|
+
const m = g[g.length - 1];
|
|
15245
|
+
m ? m.content.push(p) : g.push(ko([p], K, []));
|
|
15246
15246
|
} else if (J) {
|
|
15247
15247
|
R = n, n > 0 && I.elements[0].elements.find((O) => O.name === "w:numPr") && (c[s][n] = 0);
|
|
15248
15248
|
break;
|
|
@@ -15266,7 +15266,7 @@ function pu({
|
|
|
15266
15266
|
};
|
|
15267
15267
|
return a && (C.lastNestedListLevel = R), C;
|
|
15268
15268
|
}
|
|
15269
|
-
function
|
|
15269
|
+
function mi(r, e = !1) {
|
|
15270
15270
|
const { elements: t } = r, n = t?.find((a) => a.name === "w:pPr");
|
|
15271
15271
|
if (!n) return !1;
|
|
15272
15272
|
const s = n.elements?.find((a) => a.name === "w:pStyle")?.attributes["w:val"] === "ListParagraph", o = n.elements?.find((a) => a.name === "w:numPr");
|
|
@@ -15280,7 +15280,7 @@ function ko(r, e, t) {
|
|
|
15280
15280
|
marks: t
|
|
15281
15281
|
};
|
|
15282
15282
|
}
|
|
15283
|
-
const
|
|
15283
|
+
const cm = [
|
|
15284
15284
|
"decimal",
|
|
15285
15285
|
// eg: 1, 2, 3, 4, 5, ...
|
|
15286
15286
|
"decimalZero",
|
|
@@ -15305,7 +15305,7 @@ const cp = [
|
|
|
15305
15305
|
// eg: (0, 1, 2, ..., 9, 10, 11, 12, ..., 19, 1A, 1B, 1C, ..., 1Z, 20, 21, ..., 2Z)
|
|
15306
15306
|
"none"
|
|
15307
15307
|
// No bullet
|
|
15308
|
-
],
|
|
15308
|
+
], fm = [
|
|
15309
15309
|
"bullet",
|
|
15310
15310
|
// A standard bullet point (•)
|
|
15311
15311
|
"square",
|
|
@@ -15314,7 +15314,7 @@ const cp = [
|
|
|
15314
15314
|
// Circle bullets (◦)
|
|
15315
15315
|
"disc"
|
|
15316
15316
|
// Disc bullets (●)
|
|
15317
|
-
],
|
|
15317
|
+
], dm = ({ firstListId: r, secondListId: e, level: t, pStyleId: n, docx: i }) => {
|
|
15318
15318
|
const { numFmt: s, lvlText: o, lvlJc: a } = yr(r, t, n, i), {
|
|
15319
15319
|
numFmt: u,
|
|
15320
15320
|
lvlText: f,
|
|
@@ -15344,7 +15344,7 @@ const cp = [
|
|
|
15344
15344
|
}
|
|
15345
15345
|
const a = o.elements, u = a.filter((I) => I.name === "w:abstractNum"), g = a.filter((I) => I.name === "w:num").find((I) => I.attributes["w:numId"] === r)?.elements[0].attributes["w:val"], h = u?.find(
|
|
15346
15346
|
(I) => I.attributes["w:abstractNumId"] === g
|
|
15347
|
-
), S =
|
|
15347
|
+
), S = pm(h, e), A = h?.elements?.find((I) => I.name === "w:numStyleLink")?.attributes["w:val"];
|
|
15348
15348
|
if (A) {
|
|
15349
15349
|
const I = No(A, n);
|
|
15350
15350
|
return yr(I.numId, e, null, n);
|
|
@@ -15352,7 +15352,7 @@ const cp = [
|
|
|
15352
15352
|
const k = S?.elements?.find((I) => I.name === "w:start")?.attributes["w:val"], b = S?.elements?.find((I) => I.name === "w:numFmt")?.attributes["w:val"], F = S?.elements?.find((I) => I.name === "w:lvlText").attributes["w:val"], R = S?.elements?.find((I) => I.name === "w:lvlJc").attributes["w:val"], C = S?.elements?.find((I) => I.name === "w:pPr"), B = S?.elements?.find((I) => I.name === "w:rPr");
|
|
15353
15353
|
return { start: k, numFmt: b, lvlText: F, lvlJc: R, pPr: C, rPr: B };
|
|
15354
15354
|
};
|
|
15355
|
-
function
|
|
15355
|
+
function mm(r, e, t) {
|
|
15356
15356
|
if (!r) return;
|
|
15357
15357
|
const { paragraphProperties: n = {} } = r, { elements: i = [] } = n, s = i.find((B) => B.name === "w:numPr");
|
|
15358
15358
|
if (!s)
|
|
@@ -15366,10 +15366,10 @@ function pp(r, e, t) {
|
|
|
15366
15366
|
rPr: b
|
|
15367
15367
|
} = yr(f, e, g, t);
|
|
15368
15368
|
let F, R;
|
|
15369
|
-
k && (F =
|
|
15369
|
+
k && (F = hm(k)), b && (R = gm(b));
|
|
15370
15370
|
let C;
|
|
15371
|
-
if (
|
|
15372
|
-
else if (
|
|
15371
|
+
if (fm.includes(S?.toLowerCase())) C = "bulletList";
|
|
15372
|
+
else if (cm.includes(S)) C = "orderedList";
|
|
15373
15373
|
else
|
|
15374
15374
|
throw new du("ListParsingError", `Unknown list type found during import: ${S}`, {
|
|
15375
15375
|
listOrderingType: S,
|
|
@@ -15383,10 +15383,10 @@ function pp(r, e, t) {
|
|
|
15383
15383
|
});
|
|
15384
15384
|
return { listType: C, listOrderingType: S, ilvl: a, numId: f, listrPrs: R, listpPrs: F, start: h, lvlText: T, lvlJc: A };
|
|
15385
15385
|
}
|
|
15386
|
-
function
|
|
15386
|
+
function pm(r, e) {
|
|
15387
15387
|
return r?.elements?.find((t) => Number(t.attributes["w:ilvl"]) === e);
|
|
15388
15388
|
}
|
|
15389
|
-
function
|
|
15389
|
+
function hm(r) {
|
|
15390
15390
|
const { elements: e } = r, t = ["w:ind", "w:jc", "w:tabs"], n = {};
|
|
15391
15391
|
return e && e.forEach((i) => {
|
|
15392
15392
|
t.includes(i.name);
|
|
@@ -15396,7 +15396,7 @@ function hp(r) {
|
|
|
15396
15396
|
});
|
|
15397
15397
|
}), n;
|
|
15398
15398
|
}
|
|
15399
|
-
function
|
|
15399
|
+
function gm(r) {
|
|
15400
15400
|
const { elements: e } = r, t = [
|
|
15401
15401
|
"w:rFonts",
|
|
15402
15402
|
"w:b",
|
|
@@ -15427,14 +15427,14 @@ function gp(r) {
|
|
|
15427
15427
|
});
|
|
15428
15428
|
}), n;
|
|
15429
15429
|
}
|
|
15430
|
-
const
|
|
15430
|
+
const wm = (r) => {
|
|
15431
15431
|
const { nodes: e, docx: t, nodeListHandler: n, filename: i, lists: s } = r;
|
|
15432
15432
|
if (e.length === 0 || e[0].name !== "w:p")
|
|
15433
15433
|
return { nodes: [], consumed: 0 };
|
|
15434
15434
|
const o = je(e[0]);
|
|
15435
15435
|
let a;
|
|
15436
15436
|
const u = gu(o.elements);
|
|
15437
|
-
if (o.elements = u,
|
|
15437
|
+
if (o.elements = u, mi(o))
|
|
15438
15438
|
return { nodes: [], consumed: 0 };
|
|
15439
15439
|
const f = n.handlerEntities.find(
|
|
15440
15440
|
(F) => F.handlerName === "standardNodeHandler"
|
|
@@ -15445,7 +15445,7 @@ const wp = (r) => {
|
|
|
15445
15445
|
g.nodes.length === 1 && (a = g.nodes[0]);
|
|
15446
15446
|
const h = o.elements?.find((F) => F.name === "w:pPr"), S = h?.elements?.find((F) => F.name === "w:pStyle"), T = h?.elements?.find((F) => F.name === "w:rPr");
|
|
15447
15447
|
if (T && (a.attrs.marksAttrs = Bt(T, [])), S && (a.attrs.styleId = S.attributes["w:val"]), t) {
|
|
15448
|
-
const F =
|
|
15448
|
+
const F = ym(o, t, a.attrs.styleId);
|
|
15449
15449
|
a.attrs.indent || (a.attrs.indent = {}), F.left && (a.attrs.indent.left = F.left), F.right && (a.attrs.indent.right = F.right), F.firstLine && (a.attrs.indent.firstLine = F.firstLine), F.hanging && (a.attrs.indent.hanging = F.hanging), F.textIndent && (a.attrs.textIndent = `${F.textIndent}in`);
|
|
15450
15450
|
}
|
|
15451
15451
|
const A = h?.elements?.find((F) => F.name === "w:jc");
|
|
@@ -15455,13 +15455,13 @@ const wp = (r) => {
|
|
|
15455
15455
|
const b = h?.elements?.find((F) => F.name === "w:keepNext");
|
|
15456
15456
|
if (b && b.attributes && (a.attrs.keepNext = b.attributes["w:val"]), t) {
|
|
15457
15457
|
const F = o.attributes?.["w:rsidRDefault"];
|
|
15458
|
-
a.attrs.spacing =
|
|
15458
|
+
a.attrs.spacing = pu(o, t, a.attrs.styleId, a.attrs.marksAttrs), a.attrs.rsidRDefault = F;
|
|
15459
15459
|
}
|
|
15460
15460
|
return a.attrs.filename = i, a && a.content && (a = {
|
|
15461
15461
|
...a,
|
|
15462
15462
|
content: fu(a.content)
|
|
15463
15463
|
}), { nodes: a ? [a] : [], consumed: 1 };
|
|
15464
|
-
},
|
|
15464
|
+
}, ym = (r, e, t = "") => {
|
|
15465
15465
|
const n = {
|
|
15466
15466
|
left: 0,
|
|
15467
15467
|
right: 0,
|
|
@@ -15472,7 +15472,7 @@ const wp = (r) => {
|
|
|
15472
15472
|
u && (n.left = xe(u)), f && (n.right = xe(f)), c && (n.firstLine = xe(c)), g && (n.hanging = xe(g));
|
|
15473
15473
|
const h = u - parseInt(g || 0) || 0;
|
|
15474
15474
|
return h && (n.textIndent = qe(h)), n;
|
|
15475
|
-
},
|
|
15475
|
+
}, pu = (r, e, t = "", n = []) => {
|
|
15476
15476
|
const i = {
|
|
15477
15477
|
lineSpaceAfter: 0,
|
|
15478
15478
|
lineSpaceBefore: 0,
|
|
@@ -15503,11 +15503,11 @@ const wp = (r) => {
|
|
|
15503
15503
|
spacing: k || T || A,
|
|
15504
15504
|
indent: R || b || F
|
|
15505
15505
|
};
|
|
15506
|
-
},
|
|
15506
|
+
}, bm = {
|
|
15507
15507
|
handlerName: "paragraphNodeHandler",
|
|
15508
|
-
handler:
|
|
15508
|
+
handler: wm
|
|
15509
15509
|
};
|
|
15510
|
-
function
|
|
15510
|
+
function xm(r, e) {
|
|
15511
15511
|
const t = { lineSpaceBefore: null, lineSpaceAfter: null };
|
|
15512
15512
|
if (!r) return t;
|
|
15513
15513
|
const n = e["word/styles.xml"];
|
|
@@ -15517,7 +15517,7 @@ function xp(r, e) {
|
|
|
15517
15517
|
return Q && Q["w:styleId"] === r;
|
|
15518
15518
|
}), o = s[0];
|
|
15519
15519
|
if (!o) return t;
|
|
15520
|
-
const a = s.find((se) => se.elements.find((
|
|
15520
|
+
const a = s.find((se) => se.elements.find((pe) => pe.name === "w:qFormat")), u = s.find(
|
|
15521
15521
|
(se) => se.elements.some((Q) => Q.name === "w:name")
|
|
15522
15522
|
)?.elements.find((se) => se.name === "w:name")?.attributes["w:val"], f = o.elements.find((se) => se.name === "w:pPr"), c = f?.elements?.find((se) => se.name === "w:spacing"), g = f?.elements?.find((se) => se.name === "w:jc"), h = f?.elements?.find((se) => se.name === "w:ind");
|
|
15523
15523
|
let S, T, A;
|
|
@@ -15544,14 +15544,14 @@ function xp(r, e) {
|
|
|
15544
15544
|
indent: { leftIndent: b, rightIndent: F, firstLine: R }
|
|
15545
15545
|
};
|
|
15546
15546
|
return ce.forEach((se) => {
|
|
15547
|
-
const { type: Q, attrs:
|
|
15547
|
+
const { type: Q, attrs: pe } = se;
|
|
15548
15548
|
if (Q === "textStyle") {
|
|
15549
|
-
Object.entries(
|
|
15549
|
+
Object.entries(pe).forEach(([J, ne]) => {
|
|
15550
15550
|
he[Ka(J)] = ne;
|
|
15551
15551
|
});
|
|
15552
15552
|
return;
|
|
15553
15553
|
}
|
|
15554
|
-
he[Q] =
|
|
15554
|
+
he[Q] = pe;
|
|
15555
15555
|
}), {
|
|
15556
15556
|
attrs: ee,
|
|
15557
15557
|
styles: he
|
|
@@ -15594,7 +15594,7 @@ function gu(r) {
|
|
|
15594
15594
|
}
|
|
15595
15595
|
}), e;
|
|
15596
15596
|
}
|
|
15597
|
-
const
|
|
15597
|
+
const Am = (r) => nodeListHandler.handler({ ...r, nodes: node.elements }), Dm = (r) => {
|
|
15598
15598
|
const { nodes: e } = r;
|
|
15599
15599
|
if (e.length === 0 || e[0].name !== "w:sdt")
|
|
15600
15600
|
return { nodes: [], consumed: 0 };
|
|
@@ -15609,14 +15609,14 @@ const Ap = (r) => nodeListHandler.handler({ ...r, nodes: node.elements }), Dp =
|
|
|
15609
15609
|
consumed: 1
|
|
15610
15610
|
};
|
|
15611
15611
|
}, Io = {
|
|
15612
|
-
"Table of Contents":
|
|
15613
|
-
},
|
|
15612
|
+
"Table of Contents": Am
|
|
15613
|
+
}, Em = (r) => {
|
|
15614
15614
|
const { nodes: e, docx: t, nodeListHandler: n, insideTrackChange: i } = r;
|
|
15615
15615
|
if (e.length === 0 || e[0].name !== "w:sdt")
|
|
15616
15616
|
return { nodes: [], consumed: 0 };
|
|
15617
|
-
const s = e[0], o = s.elements.find((R) => R.name === "w:sdtPr"), a = s.elements.find((R) => R.name === "w:sdtContent"), { attrs: u, marks: f } =
|
|
15617
|
+
const s = e[0], o = s.elements.find((R) => R.name === "w:sdtPr"), a = s.elements.find((R) => R.name === "w:sdtContent"), { attrs: u, marks: f } = vm(a);
|
|
15618
15618
|
if (o?.elements.find((R) => R.name === "w:docPartObj"))
|
|
15619
|
-
return
|
|
15619
|
+
return Dm({ nodes: e, docx: t, nodeListHandler: n, insideTrackChange: i });
|
|
15620
15620
|
const g = o?.elements.find((R) => R.name === "w:alias"), h = o?.elements.find((R) => R.name === "w:tag"), S = o?.elements.find((R) => R.name === "w:fieldType")?.attributes["w:val"], T = o?.elements.find((R) => R.name === "w:fieldTypeShort")?.attributes["w:val"], A = o?.elements.find((R) => R.name === "w:fieldColor")?.attributes["w:val"], k = o?.elements.find((R) => R.name === "w:fieldMultipleImage")?.attributes["w:val"], b = {
|
|
15621
15621
|
type: T,
|
|
15622
15622
|
fieldId: h?.attributes["w:val"],
|
|
@@ -15640,7 +15640,7 @@ const Ap = (r) => nodeListHandler.handler({ ...r, nodes: node.elements }), Dp =
|
|
|
15640
15640
|
nodes: [F],
|
|
15641
15641
|
consumed: 1
|
|
15642
15642
|
};
|
|
15643
|
-
},
|
|
15643
|
+
}, vm = (r = {}) => {
|
|
15644
15644
|
const t = r.elements?.find((a) => a.name === "w:r")?.elements?.find((a) => a.name === "w:rPr");
|
|
15645
15645
|
if (!t) return {};
|
|
15646
15646
|
const i = Bt(t, []) || [], s = [];
|
|
@@ -15662,10 +15662,10 @@ const Ap = (r) => nodeListHandler.handler({ ...r, nodes: node.elements }), Dp =
|
|
|
15662
15662
|
attrs: o,
|
|
15663
15663
|
marks: i
|
|
15664
15664
|
};
|
|
15665
|
-
},
|
|
15665
|
+
}, Cm = {
|
|
15666
15666
|
handlerName: "annotationNodeHandler",
|
|
15667
|
-
handler:
|
|
15668
|
-
},
|
|
15667
|
+
handler: Em
|
|
15668
|
+
}, Sm = (r) => {
|
|
15669
15669
|
const { nodes: e, docx: t, nodeListHandler: n } = r;
|
|
15670
15670
|
if (!e || e.length === 0)
|
|
15671
15671
|
return { nodes: [], consumed: 0 };
|
|
@@ -15692,7 +15692,7 @@ const Ap = (r) => nodeListHandler.handler({ ...r, nodes: node.elements }), Dp =
|
|
|
15692
15692
|
consumed: 0,
|
|
15693
15693
|
unhandled: !0
|
|
15694
15694
|
};
|
|
15695
|
-
const f = [], c =
|
|
15695
|
+
const f = [], c = Tm(i);
|
|
15696
15696
|
if (a && a.length) {
|
|
15697
15697
|
const h = a.map((A) => (A.marks || (A.marks = []), A.marks.push(...u), A)), S = { ...r, nodes: h, parentStyleId: c }, T = n.handler(S);
|
|
15698
15698
|
f.push(...T);
|
|
@@ -15703,13 +15703,13 @@ const Ap = (r) => nodeListHandler.handler({ ...r, nodes: node.elements }), Dp =
|
|
|
15703
15703
|
attrs: { ...o },
|
|
15704
15704
|
marks: []
|
|
15705
15705
|
}], consumed: 1 };
|
|
15706
|
-
},
|
|
15706
|
+
}, Tm = (r) => {
|
|
15707
15707
|
const t = r.elements?.find((n) => n.name === "w:pPr")?.elements?.find((n) => n.name === "w:pStyle");
|
|
15708
15708
|
return t ? t.attributes["w:val"] : null;
|
|
15709
|
-
},
|
|
15709
|
+
}, Fm = {
|
|
15710
15710
|
handlerName: "standardNodeHandler",
|
|
15711
|
-
handler:
|
|
15712
|
-
},
|
|
15711
|
+
handler: Sm
|
|
15712
|
+
}, Bm = (r) => {
|
|
15713
15713
|
const { nodes: e } = r;
|
|
15714
15714
|
return e.length === 0 || e[0].name !== "w:br" ? { nodes: [], consumed: 0 } : {
|
|
15715
15715
|
nodes: [{
|
|
@@ -15717,10 +15717,10 @@ const Ap = (r) => nodeListHandler.handler({ ...r, nodes: node.elements }), Dp =
|
|
|
15717
15717
|
}],
|
|
15718
15718
|
consumed: 1
|
|
15719
15719
|
};
|
|
15720
|
-
},
|
|
15720
|
+
}, km = {
|
|
15721
15721
|
handlerName: "lineBreakNodeHandler",
|
|
15722
|
-
handler:
|
|
15723
|
-
},
|
|
15722
|
+
handler: Bm
|
|
15723
|
+
}, Nm = (r) => {
|
|
15724
15724
|
const { nodes: e, nodeListHandler: t } = r;
|
|
15725
15725
|
if (e.length === 0 || e[0].name !== "w:bookmarkStart")
|
|
15726
15726
|
return { nodes: [], consumed: 0 };
|
|
@@ -15731,10 +15731,10 @@ const Ap = (r) => nodeListHandler.handler({ ...r, nodes: node.elements }), Dp =
|
|
|
15731
15731
|
return console.error("Standard node handler not found"), { nodes: [], consumed: 0 };
|
|
15732
15732
|
const s = { ...r, nodes: [n] }, o = i(s);
|
|
15733
15733
|
return o.nodes.length === 1 && (o.nodes[0].attrs.name = n.attributes["w:name"], o.nodes[0].attrs.id = n.attributes["w:id"]), o;
|
|
15734
|
-
},
|
|
15734
|
+
}, Im = {
|
|
15735
15735
|
handlerName: "bookmarkNodeHandler",
|
|
15736
|
-
handler:
|
|
15737
|
-
},
|
|
15736
|
+
handler: Nm
|
|
15737
|
+
}, Rm = (r) => {
|
|
15738
15738
|
const { nodes: e } = r;
|
|
15739
15739
|
if (e.length === 0 || e[0].name !== "w:tab")
|
|
15740
15740
|
return { nodes: [], consumed: 0 };
|
|
@@ -15746,11 +15746,11 @@ const Ap = (r) => nodeListHandler.handler({ ...r, nodes: node.elements }), Dp =
|
|
|
15746
15746
|
},
|
|
15747
15747
|
content: []
|
|
15748
15748
|
}], consumed: 1 };
|
|
15749
|
-
},
|
|
15749
|
+
}, Om = {
|
|
15750
15750
|
handlerName: "runNodeHandler",
|
|
15751
|
-
handler:
|
|
15751
|
+
handler: Rm
|
|
15752
15752
|
};
|
|
15753
|
-
function
|
|
15753
|
+
function Pm({ docx: r }) {
|
|
15754
15754
|
const e = Ii(), t = r["word/comments.xml"];
|
|
15755
15755
|
if (!t) return;
|
|
15756
15756
|
const { elements: n } = t;
|
|
@@ -15776,16 +15776,16 @@ function Pp({ docx: r }) {
|
|
|
15776
15776
|
trackedDeletedText: F
|
|
15777
15777
|
};
|
|
15778
15778
|
});
|
|
15779
|
-
return
|
|
15779
|
+
return Lm({ docx: r, comments: s });
|
|
15780
15780
|
}
|
|
15781
|
-
const
|
|
15781
|
+
const Lm = ({ docx: r, comments: e }) => {
|
|
15782
15782
|
const t = r["word/commentsExtended.xml"];
|
|
15783
15783
|
if (!t) return [];
|
|
15784
15784
|
const { elements: n } = t, { elements: i } = n[0], s = i.filter((o) => o.name === "w15:commentEx");
|
|
15785
15785
|
return e.map((o) => {
|
|
15786
15786
|
const a = s.find((h) => h.attributes["w15:paraId"] === o.paraId);
|
|
15787
15787
|
if (!a) return { ...o };
|
|
15788
|
-
const { isDone: u, paraIdParent: f } =
|
|
15788
|
+
const { isDone: u, paraIdParent: f } = _m(a);
|
|
15789
15789
|
let c;
|
|
15790
15790
|
return f && (c = e.find((h) => h.paraId === f)), {
|
|
15791
15791
|
...o,
|
|
@@ -15793,10 +15793,10 @@ const Lp = ({ docx: r, comments: e }) => {
|
|
|
15793
15793
|
parentCommentId: c?.commentId
|
|
15794
15794
|
};
|
|
15795
15795
|
});
|
|
15796
|
-
},
|
|
15796
|
+
}, _m = (r) => {
|
|
15797
15797
|
const { attributes: e } = r, t = e["w15:paraId"], n = e["w15:done"] === "1", i = e["w15:paraIdParent"];
|
|
15798
15798
|
return { paraId: t, isDone: n, paraIdParent: i };
|
|
15799
|
-
},
|
|
15799
|
+
}, qm = (r, e, t) => {
|
|
15800
15800
|
const n = je(Nd(r));
|
|
15801
15801
|
if (!n) return null;
|
|
15802
15802
|
if (e?.telemetry) {
|
|
@@ -15822,7 +15822,7 @@ const Lp = ({ docx: r, comments: e }) => {
|
|
|
15822
15822
|
}
|
|
15823
15823
|
const i = Ii(), s = n.elements[0].elements.find((o) => o.name === "w:body");
|
|
15824
15824
|
if (s) {
|
|
15825
|
-
const o = s, a = ["w:sectPr"], u = o.elements?.filter((S) => !a.includes(S.name)) ?? [], f =
|
|
15825
|
+
const o = s, a = ["w:sectPr"], u = o.elements?.filter((S) => !a.includes(S.name)) ?? [], f = Pm({ docx: r }), c = {}, h = {
|
|
15826
15826
|
type: "doc",
|
|
15827
15827
|
content: i.handler({
|
|
15828
15828
|
nodes: u,
|
|
@@ -15845,35 +15845,35 @@ const Lp = ({ docx: r, comments: e }) => {
|
|
|
15845
15845
|
), {
|
|
15846
15846
|
pmDoc: h,
|
|
15847
15847
|
savedTagsToRestore: o,
|
|
15848
|
-
pageStyles:
|
|
15848
|
+
pageStyles: Um(o, r, e, t),
|
|
15849
15849
|
comments: f,
|
|
15850
|
-
linkedStyles:
|
|
15851
|
-
numbering:
|
|
15850
|
+
linkedStyles: jm(r),
|
|
15851
|
+
numbering: Vm(r)
|
|
15852
15852
|
};
|
|
15853
15853
|
}
|
|
15854
15854
|
return null;
|
|
15855
15855
|
}, Ii = () => {
|
|
15856
15856
|
const r = [
|
|
15857
|
-
|
|
15858
|
-
|
|
15859
|
-
|
|
15860
|
-
|
|
15861
|
-
|
|
15862
|
-
|
|
15863
|
-
|
|
15857
|
+
tm,
|
|
15858
|
+
bm,
|
|
15859
|
+
lm,
|
|
15860
|
+
nm,
|
|
15861
|
+
km,
|
|
15862
|
+
Cm,
|
|
15863
|
+
Im,
|
|
15864
15864
|
Qd,
|
|
15865
15865
|
Ud,
|
|
15866
15866
|
Xd,
|
|
15867
15867
|
Rd,
|
|
15868
|
-
|
|
15869
|
-
|
|
15868
|
+
Om,
|
|
15869
|
+
Fm
|
|
15870
15870
|
//this should be the last one, bcs this parses everything!!!
|
|
15871
15871
|
];
|
|
15872
15872
|
return {
|
|
15873
|
-
handler:
|
|
15873
|
+
handler: Mm(r),
|
|
15874
15874
|
handlerEntities: r
|
|
15875
15875
|
};
|
|
15876
|
-
},
|
|
15876
|
+
}, Mm = (r) => {
|
|
15877
15877
|
const e = (n, i, s, o) => !n || i < 0 || i >= n.length ? {
|
|
15878
15878
|
elementIndex: i,
|
|
15879
15879
|
error: "index_out_of_bounds",
|
|
@@ -15949,7 +15949,7 @@ const Lp = ({ docx: r, comments: e }) => {
|
|
|
15949
15949
|
};
|
|
15950
15950
|
return t;
|
|
15951
15951
|
};
|
|
15952
|
-
function
|
|
15952
|
+
function Um(r, e, t, n) {
|
|
15953
15953
|
const i = r.elements?.find((o) => o.name === "w:sectPr"), s = {};
|
|
15954
15954
|
return i?.elements?.forEach((o) => {
|
|
15955
15955
|
const { name: a, attributes: u } = o;
|
|
@@ -15995,7 +15995,7 @@ function Up(r, e, t, n) {
|
|
|
15995
15995
|
}
|
|
15996
15996
|
}), s;
|
|
15997
15997
|
}
|
|
15998
|
-
function
|
|
15998
|
+
function jm(r) {
|
|
15999
15999
|
const e = r["word/styles.xml"];
|
|
16000
16000
|
if (!e) return [];
|
|
16001
16001
|
const { elements: t } = e.elements[0], n = t.filter((o) => o.name === "w:style");
|
|
@@ -16005,7 +16005,7 @@ function jp(r) {
|
|
|
16005
16005
|
});
|
|
16006
16006
|
const s = [];
|
|
16007
16007
|
return n.forEach((o) => {
|
|
16008
|
-
const a = o.attributes["w:styleId"], u =
|
|
16008
|
+
const a = o.attributes["w:styleId"], u = xm(a, r), f = {
|
|
16009
16009
|
id: o.attributes["w:styleId"],
|
|
16010
16010
|
type: o.attributes["w:type"],
|
|
16011
16011
|
definition: u,
|
|
@@ -16014,7 +16014,7 @@ function jp(r) {
|
|
|
16014
16014
|
s.push(f);
|
|
16015
16015
|
}), s;
|
|
16016
16016
|
}
|
|
16017
|
-
function
|
|
16017
|
+
function Hm(r) {
|
|
16018
16018
|
if (!r) return null;
|
|
16019
16019
|
const e = je(r), { elements: t } = e.elements[0];
|
|
16020
16020
|
return Object.keys(Ao).forEach((n) => {
|
|
@@ -16036,9 +16036,9 @@ function Ro(r, e, t, n, i) {
|
|
|
16036
16036
|
let k, b;
|
|
16037
16037
|
e === "header" ? (k = n.headers, b = n.headerIds) : e === "footer" && (k = n.footers, b = n.footerIds), k[f] = { type: "doc", content: [...A] }, b[u] = f;
|
|
16038
16038
|
}
|
|
16039
|
-
function
|
|
16039
|
+
function Vm(r) {
|
|
16040
16040
|
let e = r["word/numbering.xml"];
|
|
16041
|
-
e || (e = Za);
|
|
16041
|
+
(!e || !e.elements?.length || !e.elements[0].elements?.length) && (e = Za);
|
|
16042
16042
|
const t = e.elements[0].elements, n = t.filter((a) => a.name === "w:abstractNum"), i = t.filter((a) => a.name === "w:num"), s = {};
|
|
16043
16043
|
n.forEach((a) => {
|
|
16044
16044
|
const u = Number(a.attributes["w:abstractNumId"]);
|
|
@@ -16061,7 +16061,7 @@ const dt = class dt {
|
|
|
16061
16061
|
}
|
|
16062
16062
|
parseFromXml() {
|
|
16063
16063
|
this.docx?.forEach((e) => {
|
|
16064
|
-
this.convertedXml[e.name] = this.parseXmlToJson(e.content), e.name === "word/document.xml" && (this.documentAttributes = this.convertedXml[e.name].elements[0]?.attributes), e.name === "word/styles.xml" && (this.convertedXml[e.name] =
|
|
16064
|
+
this.convertedXml[e.name] = this.parseXmlToJson(e.content), e.name === "word/document.xml" && (this.documentAttributes = this.convertedXml[e.name].elements[0]?.attributes), e.name === "word/styles.xml" && (this.convertedXml[e.name] = Hm(this.convertedXml[e.name]));
|
|
16065
16065
|
}), this.initialJSON = this.convertedXml["word/document.xml"], this.initialJSON || (this.initialJSON = this.parseXmlToJson(this.xml)), this.declaration = this.initialJSON?.declaration;
|
|
16066
16066
|
}
|
|
16067
16067
|
parseXmlToJson(e) {
|
|
@@ -16080,7 +16080,7 @@ const dt = class dt {
|
|
|
16080
16080
|
return;
|
|
16081
16081
|
}
|
|
16082
16082
|
}
|
|
16083
|
-
static updateDocumentVersion(e = this.convertedXml, t = "0.9.
|
|
16083
|
+
static updateDocumentVersion(e = this.convertedXml, t = "0.9.16") {
|
|
16084
16084
|
const n = "docProps/custom.xml";
|
|
16085
16085
|
e[n] || (e[n] = Au());
|
|
16086
16086
|
const i = e["docProps/custom.xml"];
|
|
@@ -16147,7 +16147,7 @@ const dt = class dt {
|
|
|
16147
16147
|
}
|
|
16148
16148
|
getSchema(e) {
|
|
16149
16149
|
this.getDocumentInternalId();
|
|
16150
|
-
const t =
|
|
16150
|
+
const t = qm({ ...this.convertedXml, media: this.media }, this, e);
|
|
16151
16151
|
return t ? (this.savedTagsToRestore.push({ ...t.savedTagsToRestore }), this.pageStyles = t.pageStyles, this.numbering = t.numbering, this.comments = t.comments, this.linkedStyles = t.linkedStyles, t.pmDoc) : null;
|
|
16152
16152
|
}
|
|
16153
16153
|
schemaToXml(e, t = !1) {
|
|
@@ -16176,7 +16176,7 @@ const dt = class dt {
|
|
|
16176
16176
|
});
|
|
16177
16177
|
S = { ...A }, T = k;
|
|
16178
16178
|
}
|
|
16179
|
-
return this.convertedXml = { ...this.convertedXml, ...S }, Ke(this, it, bu).call(this, [...c.relationships, ...T]),
|
|
16179
|
+
return this.convertedXml = { ...this.convertedXml, ...S }, Ke(this, it, bu).call(this, [...c.relationships, ...T]), zm(this.convertedXml), Ke(this, it, wu).call(this, c), h;
|
|
16180
16180
|
}
|
|
16181
16181
|
exportToXmlJson({
|
|
16182
16182
|
data: e,
|
|
@@ -16286,7 +16286,7 @@ yu = function({ defs: e, exportType: t, commentsWithParaIds: n }) {
|
|
|
16286
16286
|
"w:tcPr": "tableCellProperties"
|
|
16287
16287
|
})), Lt(dt, "elements", /* @__PURE__ */ new Set(["w:document", "w:body", "w:p", "w:r", "w:t", "w:delText"]));
|
|
16288
16288
|
let kt = dt;
|
|
16289
|
-
function
|
|
16289
|
+
function zm(r) {
|
|
16290
16290
|
const e = "docProps/custom.xml";
|
|
16291
16291
|
r[e] || (r[e] = Au());
|
|
16292
16292
|
const n = r[e].elements.find((a) => a.name === "Properties");
|
|
@@ -16305,7 +16305,7 @@ function zp(r) {
|
|
|
16305
16305
|
function Au() {
|
|
16306
16306
|
return Nf;
|
|
16307
16307
|
}
|
|
16308
|
-
function Du(r = 2, e = "0.9.
|
|
16308
|
+
function Du(r = 2, e = "0.9.16") {
|
|
16309
16309
|
return {
|
|
16310
16310
|
type: "element",
|
|
16311
16311
|
name: "property",
|
|
@@ -16337,36 +16337,36 @@ export {
|
|
|
16337
16337
|
Z as F,
|
|
16338
16338
|
kt as G,
|
|
16339
16339
|
Dt as H,
|
|
16340
|
-
|
|
16340
|
+
ip as I,
|
|
16341
16341
|
Ka as J,
|
|
16342
16342
|
xf as K,
|
|
16343
16343
|
bf as L,
|
|
16344
16344
|
gr as M,
|
|
16345
16345
|
Ge as N,
|
|
16346
16346
|
We as O,
|
|
16347
|
-
|
|
16347
|
+
np as P,
|
|
16348
16348
|
Oo as Q,
|
|
16349
16349
|
Je as R,
|
|
16350
16350
|
ve as S,
|
|
16351
16351
|
tt as T,
|
|
16352
|
-
|
|
16353
|
-
|
|
16354
|
-
|
|
16352
|
+
ap as U,
|
|
16353
|
+
op as V,
|
|
16354
|
+
rp as a,
|
|
16355
16355
|
oe as b,
|
|
16356
16356
|
hr as c,
|
|
16357
16357
|
ge as d,
|
|
16358
|
-
|
|
16359
|
-
|
|
16360
|
-
|
|
16361
|
-
|
|
16362
|
-
|
|
16363
|
-
|
|
16358
|
+
tp as e,
|
|
16359
|
+
Km as f,
|
|
16360
|
+
Qm as g,
|
|
16361
|
+
Zm as h,
|
|
16362
|
+
im as i,
|
|
16363
|
+
ep as j,
|
|
16364
16364
|
Ie as k,
|
|
16365
|
-
|
|
16365
|
+
Xm as l,
|
|
16366
16366
|
Bc as m,
|
|
16367
|
-
|
|
16368
|
-
|
|
16369
|
-
|
|
16367
|
+
Ym as n,
|
|
16368
|
+
sm as o,
|
|
16369
|
+
me as p,
|
|
16370
16370
|
Bi as q,
|
|
16371
16371
|
df as r,
|
|
16372
16372
|
wr as s,
|
|
@@ -16374,7 +16374,7 @@ export {
|
|
|
16374
16374
|
Qa as u,
|
|
16375
16375
|
ga as v,
|
|
16376
16376
|
ki as w,
|
|
16377
|
-
|
|
16377
|
+
sp as x,
|
|
16378
16378
|
ct as y,
|
|
16379
16379
|
et as z
|
|
16380
16380
|
};
|