@harbour-enterprises/superdoc 0.11.32 → 0.11.34
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/{eventemitter3-CRfwKE7Z.es.js → eventemitter3-C9iBZY5R.es.js} +1 -1
- package/dist/chunks/{eventemitter3-D38HWRLP.cjs → eventemitter3-Cj9ZwxFw.cjs} +1 -1
- package/dist/chunks/{index-CPZ-IxHT.es.js → index-BTkgQgI7.es.js} +2 -2
- package/dist/chunks/{index-BXKGjuVW.cjs → index-C6SLw2ph.cjs} +1 -1
- package/dist/chunks/{index-CqRwYOdx.cjs → index-CbUTRvRk.cjs} +1 -1
- package/dist/chunks/{index-Y7BlAr93.es.js → index-kWwSELc2.es.js} +4 -4
- package/dist/chunks/{jszip-ChlzEvf9.cjs → jszip-D9YbjC4E.cjs} +1 -1
- package/dist/chunks/{jszip-DO3il9iI.es.js → jszip-OpmRHhd4.es.js} +1 -1
- package/dist/chunks/{super-editor.es-ZJ0ylc_0.cjs → super-editor.es-CYMQ40x9.cjs} +65 -65
- package/dist/chunks/{super-editor.es-Bs9UaxnP.es.js → super-editor.es-SDc8qWY8.es.js} +11447 -11035
- package/dist/chunks/{url-t15h9onH.es.js → url-C29KYeaj.es.js} +2 -2
- package/dist/chunks/{url-6Xu7gR4T.cjs → url-DRGmEUtI.cjs} +1 -1
- package/dist/chunks/vue-BQCc2YbW.cjs +13 -0
- package/dist/chunks/{vue-DXpzqXur.es.js → vue-DKS68Dra.es.js} +1159 -1140
- package/dist/chunks/{xml-js-zhwNEV5e.cjs → xml-js-CMQ3QRee.cjs} +1 -1
- package/dist/chunks/{xml-js-kwrvzyhm.es.js → xml-js-CgHhGhcJ.es.js} +2 -2
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-ajcAkpke.js → converter-DnveZphs.js} +681 -651
- package/dist/super-editor/chunks/{docx-zipper-BQ70zniM.js → docx-zipper-B-azX40c.js} +1 -1
- package/dist/super-editor/chunks/{editor-CI9Y8Eul.js → editor-XSjyC_V1.js} +10613 -10390
- package/dist/super-editor/chunks/{toolbar-DhThnUPN.js → toolbar-DhWBLihJ.js} +2 -2
- package/dist/super-editor/components/toolbar/super-toolbar.d.ts +454 -83
- package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/Attribute.d.ts +2 -2
- package/dist/super-editor/core/Editor.d.ts +470 -45
- package/dist/super-editor/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/core/Schema.d.ts +2 -2
- package/dist/super-editor/core/index.d.ts +3 -3
- package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +225 -27
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +2 -2
- package/dist/superdoc.cjs +5 -5
- package/dist/superdoc.es.js +9 -9
- package/dist/superdoc.umd.js +11412 -10964
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/vue-Ckf0DkDN.cjs +0 -13
|
@@ -34,11 +34,11 @@ var Fe = {}, Dr = {};
|
|
|
34
34
|
Dr.byteLength = _u;
|
|
35
35
|
Dr.toByteArray = Mu;
|
|
36
36
|
Dr.fromByteArray = Hu;
|
|
37
|
-
var Qe = [],
|
|
38
|
-
for (var
|
|
39
|
-
Qe[
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
var Qe = [], ze = [], Ou = typeof Uint8Array < "u" ? Uint8Array : Array, Rr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
38
|
+
for (var Dt = 0, Lu = Rr.length; Dt < Lu; ++Dt)
|
|
39
|
+
Qe[Dt] = Rr[Dt], ze[Rr.charCodeAt(Dt)] = Dt;
|
|
40
|
+
ze[45] = 62;
|
|
41
|
+
ze[95] = 63;
|
|
42
42
|
function Mo(r) {
|
|
43
43
|
var e = r.length;
|
|
44
44
|
if (e % 4 > 0)
|
|
@@ -58,8 +58,8 @@ function qu(r, e, t) {
|
|
|
58
58
|
function Mu(r) {
|
|
59
59
|
var e, t = Mo(r), n = t[0], i = t[1], s = new Ou(qu(r, n, i)), o = 0, a = i > 0 ? n - 4 : n, u;
|
|
60
60
|
for (u = 0; u < a; u += 4)
|
|
61
|
-
e =
|
|
62
|
-
return i === 2 && (e =
|
|
61
|
+
e = ze[r.charCodeAt(u)] << 18 | ze[r.charCodeAt(u + 1)] << 12 | ze[r.charCodeAt(u + 2)] << 6 | ze[r.charCodeAt(u + 3)], s[o++] = e >> 16 & 255, s[o++] = e >> 8 & 255, s[o++] = e & 255;
|
|
62
|
+
return i === 2 && (e = ze[r.charCodeAt(u)] << 2 | ze[r.charCodeAt(u + 1)] >> 4, s[o++] = e & 255), i === 1 && (e = ze[r.charCodeAt(u)] << 10 | ze[r.charCodeAt(u + 1)] << 4 | ze[r.charCodeAt(u + 2)] >> 2, s[o++] = e >> 8 & 255, s[o++] = e & 255), s;
|
|
63
63
|
}
|
|
64
64
|
function Uu(r) {
|
|
65
65
|
return Qe[r >> 18 & 63] + Qe[r >> 12 & 63] + Qe[r >> 6 & 63] + Qe[r & 63];
|
|
@@ -372,7 +372,7 @@ bi.write = function(r, e, t, n, i, s) {
|
|
|
372
372
|
case "ucs-2":
|
|
373
373
|
case "utf16le":
|
|
374
374
|
case "utf-16le":
|
|
375
|
-
return
|
|
375
|
+
return V(this, f, d);
|
|
376
376
|
default:
|
|
377
377
|
if (T) throw new TypeError("Unknown encoding: " + y);
|
|
378
378
|
y = (y + "").toLowerCase(), T = !0;
|
|
@@ -512,7 +512,7 @@ bi.write = function(r, e, t, n, i, s) {
|
|
|
512
512
|
return Ue(Ge(f), y, d, T);
|
|
513
513
|
}
|
|
514
514
|
function se(y, f, d, T) {
|
|
515
|
-
return Ue(
|
|
515
|
+
return Ue(Ve(f, y.length - d), y, d, T);
|
|
516
516
|
}
|
|
517
517
|
l.prototype.write = function(f, d, T, O) {
|
|
518
518
|
if (d === void 0)
|
|
@@ -623,7 +623,7 @@ bi.write = function(r, e, t, n, i, s) {
|
|
|
623
623
|
O += lt[y[H]];
|
|
624
624
|
return O;
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function V(y, f, d) {
|
|
627
627
|
const T = y.slice(f, d);
|
|
628
628
|
let O = "";
|
|
629
629
|
for (let H = 0; H < T.length - 1; H += 2)
|
|
@@ -945,7 +945,7 @@ bi.write = function(r, e, t, n, i, s) {
|
|
|
945
945
|
);
|
|
946
946
|
}
|
|
947
947
|
const ue = /[^+/0-9A-Za-z-_]/g;
|
|
948
|
-
function
|
|
948
|
+
function z(y) {
|
|
949
949
|
if (y = y.split("=")[0], y = y.trim().replace(ue, ""), y.length < 2) return "";
|
|
950
950
|
for (; y.length % 4 !== 0; )
|
|
951
951
|
y = y + "=";
|
|
@@ -1011,7 +1011,7 @@ bi.write = function(r, e, t, n, i, s) {
|
|
|
1011
1011
|
f.push(y.charCodeAt(d) & 255);
|
|
1012
1012
|
return f;
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1014
|
+
function Ve(y, f) {
|
|
1015
1015
|
let d, T, O;
|
|
1016
1016
|
const H = [];
|
|
1017
1017
|
for (let G = 0; G < y.length && !((f -= 2) < 0); ++G)
|
|
@@ -1019,7 +1019,7 @@ bi.write = function(r, e, t, n, i, s) {
|
|
|
1019
1019
|
return H;
|
|
1020
1020
|
}
|
|
1021
1021
|
function Ge(y) {
|
|
1022
|
-
return e.toByteArray(
|
|
1022
|
+
return e.toByteArray(z(y));
|
|
1023
1023
|
}
|
|
1024
1024
|
function Ue(y, f, d, T) {
|
|
1025
1025
|
let O;
|
|
@@ -1049,10 +1049,10 @@ bi.write = function(r, e, t, n, i, s) {
|
|
|
1049
1049
|
throw new Error("BigInt not supported");
|
|
1050
1050
|
}
|
|
1051
1051
|
})(Fe);
|
|
1052
|
-
const
|
|
1052
|
+
const St = Fe.Buffer, Vu = Fe.Blob, zu = Fe.BlobOptions, Gu = Fe.Buffer, Wu = Fe.File, Ju = Fe.FileOptions, $u = Fe.INSPECT_MAX_BYTES, Ku = Fe.SlowBuffer, Xu = Fe.TranscodeEncoding, Yu = Fe.atob, Zu = Fe.btoa, Qu = Fe.constants, el = Fe.isAscii, tl = Fe.isUtf8, rl = Fe.kMaxLength, nl = Fe.kStringMaxLength, il = Fe.resolveObjectURL, sl = Fe.transcode, ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1053
1053
|
__proto__: null,
|
|
1054
|
-
Blob:
|
|
1055
|
-
BlobOptions:
|
|
1054
|
+
Blob: Vu,
|
|
1055
|
+
BlobOptions: zu,
|
|
1056
1056
|
Buffer: Gu,
|
|
1057
1057
|
File: Wu,
|
|
1058
1058
|
FileOptions: Ju,
|
|
@@ -1062,7 +1062,7 @@ const Ct = Fe.Buffer, zu = Fe.Blob, Vu = Fe.BlobOptions, Gu = Fe.Buffer, Wu = Fe
|
|
|
1062
1062
|
atob: Yu,
|
|
1063
1063
|
btoa: Zu,
|
|
1064
1064
|
constants: Qu,
|
|
1065
|
-
default:
|
|
1065
|
+
default: St,
|
|
1066
1066
|
isAscii: el,
|
|
1067
1067
|
isUtf8: tl,
|
|
1068
1068
|
kMaxLength: rl,
|
|
@@ -1283,7 +1283,7 @@ function xi() {
|
|
|
1283
1283
|
return Qt.exports;
|
|
1284
1284
|
}
|
|
1285
1285
|
var er = { exports: {} }, Mi;
|
|
1286
|
-
function
|
|
1286
|
+
function At() {
|
|
1287
1287
|
return Mi || (Mi = 1, typeof Object.create == "function" ? er.exports = function(e, t) {
|
|
1288
1288
|
t && (e.super_ = t, e.prototype = Object.create(t.prototype, {
|
|
1289
1289
|
constructor: {
|
|
@@ -1354,20 +1354,20 @@ function ul(r) {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
}
|
|
1356
1356
|
}
|
|
1357
|
-
var ot = [],
|
|
1357
|
+
var ot = [], Tt = !1, ht, ar = -1;
|
|
1358
1358
|
function ll() {
|
|
1359
|
-
!
|
|
1359
|
+
!Tt || !ht || (Tt = !1, ht.length ? ot = ht.concat(ot) : ar = -1, ot.length && Vo());
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1362
|
-
if (!
|
|
1361
|
+
function Vo() {
|
|
1362
|
+
if (!Tt) {
|
|
1363
1363
|
var r = Ho(ll);
|
|
1364
|
-
|
|
1364
|
+
Tt = !0;
|
|
1365
1365
|
for (var e = ot.length; e; ) {
|
|
1366
1366
|
for (ht = ot, ot = []; ++ar < e; )
|
|
1367
1367
|
ht && ht[ar].run();
|
|
1368
1368
|
ar = -1, e = ot.length;
|
|
1369
1369
|
}
|
|
1370
|
-
ht = null,
|
|
1370
|
+
ht = null, Tt = !1, ul(r);
|
|
1371
1371
|
}
|
|
1372
1372
|
}
|
|
1373
1373
|
ve.nextTick = function(r) {
|
|
@@ -1375,12 +1375,12 @@ ve.nextTick = function(r) {
|
|
|
1375
1375
|
if (arguments.length > 1)
|
|
1376
1376
|
for (var t = 1; t < arguments.length; t++)
|
|
1377
1377
|
e[t - 1] = arguments[t];
|
|
1378
|
-
ot.push(new
|
|
1378
|
+
ot.push(new zo(r, e)), ot.length === 1 && !Tt && Ho(Vo);
|
|
1379
1379
|
};
|
|
1380
|
-
function
|
|
1380
|
+
function zo(r, e) {
|
|
1381
1381
|
this.fun = r, this.array = e;
|
|
1382
1382
|
}
|
|
1383
|
-
|
|
1383
|
+
zo.prototype.run = function() {
|
|
1384
1384
|
this.fun.apply(null, this.array);
|
|
1385
1385
|
};
|
|
1386
1386
|
ve.title = "browser";
|
|
@@ -1461,13 +1461,13 @@ function Er() {
|
|
|
1461
1461
|
return r() && !!Symbol.toStringTag;
|
|
1462
1462
|
}, qr;
|
|
1463
1463
|
}
|
|
1464
|
-
var Mr,
|
|
1464
|
+
var Mr, Vi;
|
|
1465
1465
|
function Jo() {
|
|
1466
|
-
return
|
|
1466
|
+
return Vi || (Vi = 1, Mr = Object), Mr;
|
|
1467
1467
|
}
|
|
1468
|
-
var Ur,
|
|
1468
|
+
var Ur, zi;
|
|
1469
1469
|
function fl() {
|
|
1470
|
-
return
|
|
1470
|
+
return zi || (zi = 1, Ur = Error), Ur;
|
|
1471
1471
|
}
|
|
1472
1472
|
var jr, Gi;
|
|
1473
1473
|
function dl() {
|
|
@@ -1477,13 +1477,13 @@ var Hr, Wi;
|
|
|
1477
1477
|
function ml() {
|
|
1478
1478
|
return Wi || (Wi = 1, Hr = RangeError), Hr;
|
|
1479
1479
|
}
|
|
1480
|
-
var
|
|
1480
|
+
var Vr, Ji;
|
|
1481
1481
|
function pl() {
|
|
1482
|
-
return Ji || (Ji = 1,
|
|
1482
|
+
return Ji || (Ji = 1, Vr = ReferenceError), Vr;
|
|
1483
1483
|
}
|
|
1484
|
-
var
|
|
1484
|
+
var zr, $i;
|
|
1485
1485
|
function $o() {
|
|
1486
|
-
return $i || ($i = 1,
|
|
1486
|
+
return $i || ($i = 1, zr = SyntaxError), zr;
|
|
1487
1487
|
}
|
|
1488
1488
|
var Gr, Ki;
|
|
1489
1489
|
function $t() {
|
|
@@ -1891,8 +1891,8 @@ function Qo() {
|
|
|
1891
1891
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
1892
1892
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
1893
1893
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
1894
|
-
}, ce = Kt(), $ = Zo(), re = ce.call(oe, Array.prototype.concat), ie = ce.call(J, Array.prototype.splice), L = ce.call(oe, String.prototype.replace),
|
|
1895
|
-
var b =
|
|
1894
|
+
}, ce = Kt(), $ = Zo(), re = ce.call(oe, Array.prototype.concat), ie = ce.call(J, Array.prototype.splice), L = ce.call(oe, String.prototype.replace), V = ce.call(oe, String.prototype.slice), q = ce.call(oe, RegExp.prototype.exec), K = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, P = /\\(\\)?/g, p = function(S) {
|
|
1895
|
+
var b = V(S, 0, 1), x = V(S, -1);
|
|
1896
1896
|
if (b === "%" && x !== "%")
|
|
1897
1897
|
throw new o("invalid intrinsic syntax, expected closing `%`");
|
|
1898
1898
|
if (x === "%" && b !== "%")
|
|
@@ -1924,9 +1924,9 @@ function Qo() {
|
|
|
1924
1924
|
throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
1925
1925
|
var x = p(S), U = x.length > 0 ? x[0] : "", W = m("%" + U + "%", b), ee = W.name, X = W.value, te = !1, ue = W.alias;
|
|
1926
1926
|
ue && (U = ue[0], ie(x, re([0, 1], ue)));
|
|
1927
|
-
for (var
|
|
1928
|
-
var Be = x[
|
|
1929
|
-
if ((
|
|
1927
|
+
for (var z = 1, Se = !0; z < x.length; z += 1) {
|
|
1928
|
+
var Be = x[z], Ve = V(Be, 0, 1), Ge = V(Be, -1);
|
|
1929
|
+
if ((Ve === '"' || Ve === "'" || Ve === "`" || Ge === '"' || Ge === "'" || Ge === "`") && Ve !== Ge)
|
|
1930
1930
|
throw new o("property names with quotes must have matching quotes");
|
|
1931
1931
|
if ((Be === "constructor" || !Se) && (te = !0), U += "." + Be, ee = "%" + U + "%", $(de, ee))
|
|
1932
1932
|
X = de[ee];
|
|
@@ -1936,7 +1936,7 @@ function Qo() {
|
|
|
1936
1936
|
throw new a("base intrinsic for " + S + " exists, but the property is not available.");
|
|
1937
1937
|
return;
|
|
1938
1938
|
}
|
|
1939
|
-
if (B &&
|
|
1939
|
+
if (B && z + 1 >= x.length) {
|
|
1940
1940
|
var Ue = B(X, Be);
|
|
1941
1941
|
Se = !!Ue, Se && "get" in Ue && !("originalValue" in Ue.get) ? X = Ue.get : X = X[Be];
|
|
1942
1942
|
} else
|
|
@@ -2372,194 +2372,194 @@ function Hl() {
|
|
|
2372
2372
|
}, Pn;
|
|
2373
2373
|
}
|
|
2374
2374
|
var qs;
|
|
2375
|
-
function
|
|
2375
|
+
function Vl() {
|
|
2376
2376
|
return qs || (qs = 1, function(r) {
|
|
2377
2377
|
var e = Bl(), t = Il(), n = ea(), i = Hl();
|
|
2378
|
-
function s(
|
|
2379
|
-
return
|
|
2378
|
+
function s(z) {
|
|
2379
|
+
return z.call.bind(z);
|
|
2380
2380
|
}
|
|
2381
2381
|
var o = typeof BigInt < "u", a = typeof Symbol < "u", u = s(Object.prototype.toString), c = s(Number.prototype.valueOf), l = s(String.prototype.valueOf), h = s(Boolean.prototype.valueOf);
|
|
2382
2382
|
if (o)
|
|
2383
2383
|
var g = s(BigInt.prototype.valueOf);
|
|
2384
2384
|
if (a)
|
|
2385
2385
|
var E = s(Symbol.prototype.valueOf);
|
|
2386
|
-
function A(
|
|
2387
|
-
if (typeof
|
|
2386
|
+
function A(z, Se) {
|
|
2387
|
+
if (typeof z != "object")
|
|
2388
2388
|
return !1;
|
|
2389
2389
|
try {
|
|
2390
|
-
return Se(
|
|
2390
|
+
return Se(z), !0;
|
|
2391
2391
|
} catch {
|
|
2392
2392
|
return !1;
|
|
2393
2393
|
}
|
|
2394
2394
|
}
|
|
2395
2395
|
r.isArgumentsObject = e, r.isGeneratorFunction = t, r.isTypedArray = i;
|
|
2396
|
-
function v(
|
|
2397
|
-
return typeof Promise < "u" &&
|
|
2396
|
+
function v(z) {
|
|
2397
|
+
return typeof Promise < "u" && z instanceof Promise || z !== null && typeof z == "object" && typeof z.then == "function" && typeof z.catch == "function";
|
|
2398
2398
|
}
|
|
2399
2399
|
r.isPromise = v;
|
|
2400
|
-
function F(
|
|
2401
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(
|
|
2400
|
+
function F(z) {
|
|
2401
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(z) : i(z) || V(z);
|
|
2402
2402
|
}
|
|
2403
2403
|
r.isArrayBufferView = F;
|
|
2404
|
-
function w(
|
|
2405
|
-
return n(
|
|
2404
|
+
function w(z) {
|
|
2405
|
+
return n(z) === "Uint8Array";
|
|
2406
2406
|
}
|
|
2407
2407
|
r.isUint8Array = w;
|
|
2408
|
-
function B(
|
|
2409
|
-
return n(
|
|
2408
|
+
function B(z) {
|
|
2409
|
+
return n(z) === "Uint8ClampedArray";
|
|
2410
2410
|
}
|
|
2411
2411
|
r.isUint8ClampedArray = B;
|
|
2412
|
-
function R(
|
|
2413
|
-
return n(
|
|
2412
|
+
function R(z) {
|
|
2413
|
+
return n(z) === "Uint16Array";
|
|
2414
2414
|
}
|
|
2415
2415
|
r.isUint16Array = R;
|
|
2416
|
-
function D(
|
|
2417
|
-
return n(
|
|
2416
|
+
function D(z) {
|
|
2417
|
+
return n(z) === "Uint32Array";
|
|
2418
2418
|
}
|
|
2419
2419
|
r.isUint32Array = D;
|
|
2420
|
-
function k(
|
|
2421
|
-
return n(
|
|
2420
|
+
function k(z) {
|
|
2421
|
+
return n(z) === "Int8Array";
|
|
2422
2422
|
}
|
|
2423
2423
|
r.isInt8Array = k;
|
|
2424
|
-
function N(
|
|
2425
|
-
return n(
|
|
2424
|
+
function N(z) {
|
|
2425
|
+
return n(z) === "Int16Array";
|
|
2426
2426
|
}
|
|
2427
2427
|
r.isInt16Array = N;
|
|
2428
|
-
function M(
|
|
2429
|
-
return n(
|
|
2428
|
+
function M(z) {
|
|
2429
|
+
return n(z) === "Int32Array";
|
|
2430
2430
|
}
|
|
2431
2431
|
r.isInt32Array = M;
|
|
2432
|
-
function _(
|
|
2433
|
-
return n(
|
|
2432
|
+
function _(z) {
|
|
2433
|
+
return n(z) === "Float32Array";
|
|
2434
2434
|
}
|
|
2435
2435
|
r.isFloat32Array = _;
|
|
2436
|
-
function C(
|
|
2437
|
-
return n(
|
|
2436
|
+
function C(z) {
|
|
2437
|
+
return n(z) === "Float64Array";
|
|
2438
2438
|
}
|
|
2439
2439
|
r.isFloat64Array = C;
|
|
2440
|
-
function J(
|
|
2441
|
-
return n(
|
|
2440
|
+
function J(z) {
|
|
2441
|
+
return n(z) === "BigInt64Array";
|
|
2442
2442
|
}
|
|
2443
2443
|
r.isBigInt64Array = J;
|
|
2444
|
-
function oe(
|
|
2445
|
-
return n(
|
|
2444
|
+
function oe(z) {
|
|
2445
|
+
return n(z) === "BigUint64Array";
|
|
2446
2446
|
}
|
|
2447
2447
|
r.isBigUint64Array = oe;
|
|
2448
|
-
function Z(
|
|
2449
|
-
return u(
|
|
2448
|
+
function Z(z) {
|
|
2449
|
+
return u(z) === "[object Map]";
|
|
2450
2450
|
}
|
|
2451
2451
|
Z.working = typeof Map < "u" && Z(/* @__PURE__ */ new Map());
|
|
2452
|
-
function fe(
|
|
2453
|
-
return typeof Map > "u" ? !1 : Z.working ? Z(
|
|
2452
|
+
function fe(z) {
|
|
2453
|
+
return typeof Map > "u" ? !1 : Z.working ? Z(z) : z instanceof Map;
|
|
2454
2454
|
}
|
|
2455
2455
|
r.isMap = fe;
|
|
2456
|
-
function de(
|
|
2457
|
-
return u(
|
|
2456
|
+
function de(z) {
|
|
2457
|
+
return u(z) === "[object Set]";
|
|
2458
2458
|
}
|
|
2459
2459
|
de.working = typeof Set < "u" && de(/* @__PURE__ */ new Set());
|
|
2460
|
-
function se(
|
|
2461
|
-
return typeof Set > "u" ? !1 : de.working ? de(
|
|
2460
|
+
function se(z) {
|
|
2461
|
+
return typeof Set > "u" ? !1 : de.working ? de(z) : z instanceof Set;
|
|
2462
2462
|
}
|
|
2463
2463
|
r.isSet = se;
|
|
2464
|
-
function ne(
|
|
2465
|
-
return u(
|
|
2464
|
+
function ne(z) {
|
|
2465
|
+
return u(z) === "[object WeakMap]";
|
|
2466
2466
|
}
|
|
2467
2467
|
ne.working = typeof WeakMap < "u" && ne(/* @__PURE__ */ new WeakMap());
|
|
2468
|
-
function Y(
|
|
2469
|
-
return typeof WeakMap > "u" ? !1 : ne.working ? ne(
|
|
2468
|
+
function Y(z) {
|
|
2469
|
+
return typeof WeakMap > "u" ? !1 : ne.working ? ne(z) : z instanceof WeakMap;
|
|
2470
2470
|
}
|
|
2471
2471
|
r.isWeakMap = Y;
|
|
2472
|
-
function ce(
|
|
2473
|
-
return u(
|
|
2472
|
+
function ce(z) {
|
|
2473
|
+
return u(z) === "[object WeakSet]";
|
|
2474
2474
|
}
|
|
2475
2475
|
ce.working = typeof WeakSet < "u" && ce(/* @__PURE__ */ new WeakSet());
|
|
2476
|
-
function $(
|
|
2477
|
-
return ce(
|
|
2476
|
+
function $(z) {
|
|
2477
|
+
return ce(z);
|
|
2478
2478
|
}
|
|
2479
2479
|
r.isWeakSet = $;
|
|
2480
|
-
function re(
|
|
2481
|
-
return u(
|
|
2480
|
+
function re(z) {
|
|
2481
|
+
return u(z) === "[object ArrayBuffer]";
|
|
2482
2482
|
}
|
|
2483
2483
|
re.working = typeof ArrayBuffer < "u" && re(new ArrayBuffer());
|
|
2484
|
-
function ie(
|
|
2485
|
-
return typeof ArrayBuffer > "u" ? !1 : re.working ? re(
|
|
2484
|
+
function ie(z) {
|
|
2485
|
+
return typeof ArrayBuffer > "u" ? !1 : re.working ? re(z) : z instanceof ArrayBuffer;
|
|
2486
2486
|
}
|
|
2487
2487
|
r.isArrayBuffer = ie;
|
|
2488
|
-
function L(
|
|
2489
|
-
return u(
|
|
2488
|
+
function L(z) {
|
|
2489
|
+
return u(z) === "[object DataView]";
|
|
2490
2490
|
}
|
|
2491
2491
|
L.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && L(new DataView(new ArrayBuffer(1), 0, 1));
|
|
2492
|
-
function z
|
|
2493
|
-
return typeof DataView > "u" ? !1 : L.working ? L(
|
|
2492
|
+
function V(z) {
|
|
2493
|
+
return typeof DataView > "u" ? !1 : L.working ? L(z) : z instanceof DataView;
|
|
2494
2494
|
}
|
|
2495
|
-
r.isDataView =
|
|
2495
|
+
r.isDataView = V;
|
|
2496
2496
|
var q = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
|
|
2497
|
-
function K(
|
|
2498
|
-
return u(
|
|
2497
|
+
function K(z) {
|
|
2498
|
+
return u(z) === "[object SharedArrayBuffer]";
|
|
2499
2499
|
}
|
|
2500
|
-
function P(
|
|
2501
|
-
return typeof q > "u" ? !1 : (typeof K.working > "u" && (K.working = K(new q())), K.working ? K(
|
|
2500
|
+
function P(z) {
|
|
2501
|
+
return typeof q > "u" ? !1 : (typeof K.working > "u" && (K.working = K(new q())), K.working ? K(z) : z instanceof q);
|
|
2502
2502
|
}
|
|
2503
2503
|
r.isSharedArrayBuffer = P;
|
|
2504
|
-
function p(
|
|
2505
|
-
return u(
|
|
2504
|
+
function p(z) {
|
|
2505
|
+
return u(z) === "[object AsyncFunction]";
|
|
2506
2506
|
}
|
|
2507
2507
|
r.isAsyncFunction = p;
|
|
2508
|
-
function m(
|
|
2509
|
-
return u(
|
|
2508
|
+
function m(z) {
|
|
2509
|
+
return u(z) === "[object Map Iterator]";
|
|
2510
2510
|
}
|
|
2511
2511
|
r.isMapIterator = m;
|
|
2512
|
-
function I(
|
|
2513
|
-
return u(
|
|
2512
|
+
function I(z) {
|
|
2513
|
+
return u(z) === "[object Set Iterator]";
|
|
2514
2514
|
}
|
|
2515
2515
|
r.isSetIterator = I;
|
|
2516
|
-
function S(
|
|
2517
|
-
return u(
|
|
2516
|
+
function S(z) {
|
|
2517
|
+
return u(z) === "[object Generator]";
|
|
2518
2518
|
}
|
|
2519
2519
|
r.isGeneratorObject = S;
|
|
2520
|
-
function b(
|
|
2521
|
-
return u(
|
|
2520
|
+
function b(z) {
|
|
2521
|
+
return u(z) === "[object WebAssembly.Module]";
|
|
2522
2522
|
}
|
|
2523
2523
|
r.isWebAssemblyCompiledModule = b;
|
|
2524
|
-
function x(
|
|
2525
|
-
return A(
|
|
2524
|
+
function x(z) {
|
|
2525
|
+
return A(z, c);
|
|
2526
2526
|
}
|
|
2527
2527
|
r.isNumberObject = x;
|
|
2528
|
-
function U(
|
|
2529
|
-
return A(
|
|
2528
|
+
function U(z) {
|
|
2529
|
+
return A(z, l);
|
|
2530
2530
|
}
|
|
2531
2531
|
r.isStringObject = U;
|
|
2532
|
-
function W(
|
|
2533
|
-
return A(
|
|
2532
|
+
function W(z) {
|
|
2533
|
+
return A(z, h);
|
|
2534
2534
|
}
|
|
2535
2535
|
r.isBooleanObject = W;
|
|
2536
|
-
function ee(
|
|
2537
|
-
return o && A(
|
|
2536
|
+
function ee(z) {
|
|
2537
|
+
return o && A(z, g);
|
|
2538
2538
|
}
|
|
2539
2539
|
r.isBigIntObject = ee;
|
|
2540
|
-
function X(
|
|
2541
|
-
return a && A(
|
|
2540
|
+
function X(z) {
|
|
2541
|
+
return a && A(z, E);
|
|
2542
2542
|
}
|
|
2543
2543
|
r.isSymbolObject = X;
|
|
2544
|
-
function te(
|
|
2545
|
-
return x(
|
|
2544
|
+
function te(z) {
|
|
2545
|
+
return x(z) || U(z) || W(z) || ee(z) || X(z);
|
|
2546
2546
|
}
|
|
2547
2547
|
r.isBoxedPrimitive = te;
|
|
2548
|
-
function ue(
|
|
2549
|
-
return typeof Uint8Array < "u" && (ie(
|
|
2548
|
+
function ue(z) {
|
|
2549
|
+
return typeof Uint8Array < "u" && (ie(z) || P(z));
|
|
2550
2550
|
}
|
|
2551
|
-
r.isAnyArrayBuffer = ue, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(
|
|
2552
|
-
Object.defineProperty(r,
|
|
2551
|
+
r.isAnyArrayBuffer = ue, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(z) {
|
|
2552
|
+
Object.defineProperty(r, z, {
|
|
2553
2553
|
enumerable: !1,
|
|
2554
2554
|
value: function() {
|
|
2555
|
-
throw new Error(
|
|
2555
|
+
throw new Error(z + " is not supported in userland");
|
|
2556
2556
|
}
|
|
2557
2557
|
});
|
|
2558
2558
|
});
|
|
2559
2559
|
}(Lr)), Lr;
|
|
2560
2560
|
}
|
|
2561
2561
|
var On, Ms;
|
|
2562
|
-
function
|
|
2562
|
+
function zl() {
|
|
2563
2563
|
return Ms || (Ms = 1, On = function(e) {
|
|
2564
2564
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
2565
2565
|
}), On;
|
|
@@ -2567,16 +2567,16 @@ function Vl() {
|
|
|
2567
2567
|
var Us;
|
|
2568
2568
|
function ta() {
|
|
2569
2569
|
return Us || (Us = 1, function(r) {
|
|
2570
|
-
var e = Object.getOwnPropertyDescriptors || function(
|
|
2571
|
-
for (var q = Object.keys(
|
|
2572
|
-
K[q[P]] = Object.getOwnPropertyDescriptor(
|
|
2570
|
+
var e = Object.getOwnPropertyDescriptors || function(V) {
|
|
2571
|
+
for (var q = Object.keys(V), K = {}, P = 0; P < q.length; P++)
|
|
2572
|
+
K[q[P]] = Object.getOwnPropertyDescriptor(V, q[P]);
|
|
2573
2573
|
return K;
|
|
2574
2574
|
}, t = /%[sdj%]/g;
|
|
2575
2575
|
r.format = function(L) {
|
|
2576
2576
|
if (!k(L)) {
|
|
2577
|
-
for (var
|
|
2578
|
-
|
|
2579
|
-
return
|
|
2577
|
+
for (var V = [], q = 0; q < arguments.length; q++)
|
|
2578
|
+
V.push(o(arguments[q]));
|
|
2579
|
+
return V.join(" ");
|
|
2580
2580
|
}
|
|
2581
2581
|
for (var q = 1, K = arguments, P = K.length, p = String(L).replace(t, function(I) {
|
|
2582
2582
|
if (I === "%%") return "%";
|
|
@@ -2598,19 +2598,19 @@ function ta() {
|
|
|
2598
2598
|
}), m = K[q]; q < P; m = K[++q])
|
|
2599
2599
|
B(m) || !C(m) ? p += " " + m : p += " " + o(m);
|
|
2600
2600
|
return p;
|
|
2601
|
-
}, r.deprecate = function(L,
|
|
2601
|
+
}, r.deprecate = function(L, V) {
|
|
2602
2602
|
if (typeof ge < "u" && ge.noDeprecation === !0)
|
|
2603
2603
|
return L;
|
|
2604
2604
|
if (typeof ge > "u")
|
|
2605
2605
|
return function() {
|
|
2606
|
-
return r.deprecate(L,
|
|
2606
|
+
return r.deprecate(L, V).apply(this, arguments);
|
|
2607
2607
|
};
|
|
2608
2608
|
var q = !1;
|
|
2609
2609
|
function K() {
|
|
2610
2610
|
if (!q) {
|
|
2611
2611
|
if (ge.throwDeprecation)
|
|
2612
|
-
throw new Error(
|
|
2613
|
-
ge.traceDeprecation ? console.trace(
|
|
2612
|
+
throw new Error(V);
|
|
2613
|
+
ge.traceDeprecation ? console.trace(V) : console.error(V), q = !0;
|
|
2614
2614
|
}
|
|
2615
2615
|
return L.apply(this, arguments);
|
|
2616
2616
|
}
|
|
@@ -2624,22 +2624,22 @@ function ta() {
|
|
|
2624
2624
|
r.debuglog = function(L) {
|
|
2625
2625
|
if (L = L.toUpperCase(), !n[L])
|
|
2626
2626
|
if (i.test(L)) {
|
|
2627
|
-
var
|
|
2627
|
+
var V = ge.pid;
|
|
2628
2628
|
n[L] = function() {
|
|
2629
2629
|
var q = r.format.apply(r, arguments);
|
|
2630
|
-
console.error("%s %d: %s", L,
|
|
2630
|
+
console.error("%s %d: %s", L, V, q);
|
|
2631
2631
|
};
|
|
2632
2632
|
} else
|
|
2633
2633
|
n[L] = function() {
|
|
2634
2634
|
};
|
|
2635
2635
|
return n[L];
|
|
2636
2636
|
};
|
|
2637
|
-
function o(L,
|
|
2637
|
+
function o(L, V) {
|
|
2638
2638
|
var q = {
|
|
2639
2639
|
seen: [],
|
|
2640
2640
|
stylize: u
|
|
2641
2641
|
};
|
|
2642
|
-
return arguments.length >= 3 && (q.depth = arguments[2]), arguments.length >= 4 && (q.colors = arguments[3]), w(
|
|
2642
|
+
return arguments.length >= 3 && (q.depth = arguments[2]), arguments.length >= 4 && (q.colors = arguments[3]), w(V) ? q.showHidden = V : V && r._extend(q, V), M(q.showHidden) && (q.showHidden = !1), M(q.depth) && (q.depth = 2), M(q.colors) && (q.colors = !1), M(q.customInspect) && (q.customInspect = !0), q.colors && (q.stylize = a), l(q, L, q.depth);
|
|
2643
2643
|
}
|
|
2644
2644
|
r.inspect = o, o.colors = {
|
|
2645
2645
|
bold: [1, 22],
|
|
@@ -2666,81 +2666,81 @@ function ta() {
|
|
|
2666
2666
|
// "name": intentionally not styling
|
|
2667
2667
|
regexp: "red"
|
|
2668
2668
|
};
|
|
2669
|
-
function a(L,
|
|
2670
|
-
var q = o.styles[
|
|
2669
|
+
function a(L, V) {
|
|
2670
|
+
var q = o.styles[V];
|
|
2671
2671
|
return q ? "\x1B[" + o.colors[q][0] + "m" + L + "\x1B[" + o.colors[q][1] + "m" : L;
|
|
2672
2672
|
}
|
|
2673
|
-
function u(L,
|
|
2673
|
+
function u(L, V) {
|
|
2674
2674
|
return L;
|
|
2675
2675
|
}
|
|
2676
2676
|
function c(L) {
|
|
2677
|
-
var
|
|
2677
|
+
var V = {};
|
|
2678
2678
|
return L.forEach(function(q, K) {
|
|
2679
|
-
|
|
2680
|
-
}),
|
|
2681
|
-
}
|
|
2682
|
-
function l(L,
|
|
2683
|
-
if (L.customInspect &&
|
|
2684
|
-
|
|
2685
|
-
!(
|
|
2686
|
-
var K =
|
|
2679
|
+
V[q] = !0;
|
|
2680
|
+
}), V;
|
|
2681
|
+
}
|
|
2682
|
+
function l(L, V, q) {
|
|
2683
|
+
if (L.customInspect && V && Z(V.inspect) && // Filter out the util module, it's inspect function is special
|
|
2684
|
+
V.inspect !== r.inspect && // Also filter out any prototype objects using the circular check.
|
|
2685
|
+
!(V.constructor && V.constructor.prototype === V)) {
|
|
2686
|
+
var K = V.inspect(q, L);
|
|
2687
2687
|
return k(K) || (K = l(L, K, q)), K;
|
|
2688
2688
|
}
|
|
2689
|
-
var P = h(L,
|
|
2689
|
+
var P = h(L, V);
|
|
2690
2690
|
if (P)
|
|
2691
2691
|
return P;
|
|
2692
|
-
var p = Object.keys(
|
|
2693
|
-
if (L.showHidden && (p = Object.getOwnPropertyNames(
|
|
2694
|
-
return g(
|
|
2692
|
+
var p = Object.keys(V), m = c(p);
|
|
2693
|
+
if (L.showHidden && (p = Object.getOwnPropertyNames(V)), oe(V) && (p.indexOf("message") >= 0 || p.indexOf("description") >= 0))
|
|
2694
|
+
return g(V);
|
|
2695
2695
|
if (p.length === 0) {
|
|
2696
|
-
if (Z(
|
|
2697
|
-
var I =
|
|
2696
|
+
if (Z(V)) {
|
|
2697
|
+
var I = V.name ? ": " + V.name : "";
|
|
2698
2698
|
return L.stylize("[Function" + I + "]", "special");
|
|
2699
2699
|
}
|
|
2700
|
-
if (_(
|
|
2701
|
-
return L.stylize(RegExp.prototype.toString.call(
|
|
2702
|
-
if (J(
|
|
2703
|
-
return L.stylize(Date.prototype.toString.call(
|
|
2704
|
-
if (oe(
|
|
2705
|
-
return g(
|
|
2700
|
+
if (_(V))
|
|
2701
|
+
return L.stylize(RegExp.prototype.toString.call(V), "regexp");
|
|
2702
|
+
if (J(V))
|
|
2703
|
+
return L.stylize(Date.prototype.toString.call(V), "date");
|
|
2704
|
+
if (oe(V))
|
|
2705
|
+
return g(V);
|
|
2706
2706
|
}
|
|
2707
2707
|
var S = "", b = !1, x = ["{", "}"];
|
|
2708
|
-
if (F(
|
|
2709
|
-
var U =
|
|
2708
|
+
if (F(V) && (b = !0, x = ["[", "]"]), Z(V)) {
|
|
2709
|
+
var U = V.name ? ": " + V.name : "";
|
|
2710
2710
|
S = " [Function" + U + "]";
|
|
2711
2711
|
}
|
|
2712
|
-
if (_(
|
|
2712
|
+
if (_(V) && (S = " " + RegExp.prototype.toString.call(V)), J(V) && (S = " " + Date.prototype.toUTCString.call(V)), oe(V) && (S = " " + g(V)), p.length === 0 && (!b || V.length == 0))
|
|
2713
2713
|
return x[0] + S + x[1];
|
|
2714
2714
|
if (q < 0)
|
|
2715
|
-
return _(
|
|
2716
|
-
L.seen.push(
|
|
2715
|
+
return _(V) ? L.stylize(RegExp.prototype.toString.call(V), "regexp") : L.stylize("[Object]", "special");
|
|
2716
|
+
L.seen.push(V);
|
|
2717
2717
|
var W;
|
|
2718
|
-
return b ? W = E(L,
|
|
2719
|
-
return A(L,
|
|
2718
|
+
return b ? W = E(L, V, q, m, p) : W = p.map(function(ee) {
|
|
2719
|
+
return A(L, V, q, m, ee, b);
|
|
2720
2720
|
}), L.seen.pop(), v(W, S, x);
|
|
2721
2721
|
}
|
|
2722
|
-
function h(L,
|
|
2723
|
-
if (M(
|
|
2722
|
+
function h(L, V) {
|
|
2723
|
+
if (M(V))
|
|
2724
2724
|
return L.stylize("undefined", "undefined");
|
|
2725
|
-
if (k(
|
|
2726
|
-
var q = "'" + JSON.stringify(
|
|
2725
|
+
if (k(V)) {
|
|
2726
|
+
var q = "'" + JSON.stringify(V).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
2727
2727
|
return L.stylize(q, "string");
|
|
2728
2728
|
}
|
|
2729
|
-
if (D(
|
|
2730
|
-
return L.stylize("" +
|
|
2731
|
-
if (w(
|
|
2732
|
-
return L.stylize("" +
|
|
2733
|
-
if (B(
|
|
2729
|
+
if (D(V))
|
|
2730
|
+
return L.stylize("" + V, "number");
|
|
2731
|
+
if (w(V))
|
|
2732
|
+
return L.stylize("" + V, "boolean");
|
|
2733
|
+
if (B(V))
|
|
2734
2734
|
return L.stylize("null", "null");
|
|
2735
2735
|
}
|
|
2736
2736
|
function g(L) {
|
|
2737
2737
|
return "[" + Error.prototype.toString.call(L) + "]";
|
|
2738
2738
|
}
|
|
2739
|
-
function E(L,
|
|
2740
|
-
for (var p = [], m = 0, I =
|
|
2741
|
-
ce(
|
|
2739
|
+
function E(L, V, q, K, P) {
|
|
2740
|
+
for (var p = [], m = 0, I = V.length; m < I; ++m)
|
|
2741
|
+
ce(V, String(m)) ? p.push(A(
|
|
2742
2742
|
L,
|
|
2743
|
-
|
|
2743
|
+
V,
|
|
2744
2744
|
q,
|
|
2745
2745
|
K,
|
|
2746
2746
|
String(m),
|
|
@@ -2749,7 +2749,7 @@ function ta() {
|
|
|
2749
2749
|
return P.forEach(function(S) {
|
|
2750
2750
|
S.match(/^\d+$/) || p.push(A(
|
|
2751
2751
|
L,
|
|
2752
|
-
|
|
2752
|
+
V,
|
|
2753
2753
|
q,
|
|
2754
2754
|
K,
|
|
2755
2755
|
S,
|
|
@@ -2757,9 +2757,9 @@ function ta() {
|
|
|
2757
2757
|
));
|
|
2758
2758
|
}), p;
|
|
2759
2759
|
}
|
|
2760
|
-
function A(L,
|
|
2760
|
+
function A(L, V, q, K, P, p) {
|
|
2761
2761
|
var m, I, S;
|
|
2762
|
-
if (S = Object.getOwnPropertyDescriptor(
|
|
2762
|
+
if (S = Object.getOwnPropertyDescriptor(V, P) || { value: V[P] }, S.get ? S.set ? I = L.stylize("[Getter/Setter]", "special") : I = L.stylize("[Getter]", "special") : S.set && (I = L.stylize("[Setter]", "special")), ce(K, P) || (m = "[" + P + "]"), I || (L.seen.indexOf(S.value) < 0 ? (B(q) ? I = l(L, S.value, null) : I = l(L, S.value, q - 1), I.indexOf(`
|
|
2763
2763
|
`) > -1 && (p ? I = I.split(`
|
|
2764
2764
|
`).map(function(b) {
|
|
2765
2765
|
return " " + b;
|
|
@@ -2776,16 +2776,16 @@ function ta() {
|
|
|
2776
2776
|
}
|
|
2777
2777
|
return m + ": " + I;
|
|
2778
2778
|
}
|
|
2779
|
-
function v(L,
|
|
2779
|
+
function v(L, V, q) {
|
|
2780
2780
|
var K = L.reduce(function(P, p) {
|
|
2781
2781
|
return p.indexOf(`
|
|
2782
2782
|
`) >= 0, P + p.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
2783
2783
|
}, 0);
|
|
2784
|
-
return K > 60 ? q[0] + (
|
|
2784
|
+
return K > 60 ? q[0] + (V === "" ? "" : V + `
|
|
2785
2785
|
`) + " " + L.join(`,
|
|
2786
|
-
`) + " " + q[1] : q[0] +
|
|
2786
|
+
`) + " " + q[1] : q[0] + V + " " + L.join(", ") + " " + q[1];
|
|
2787
2787
|
}
|
|
2788
|
-
r.types =
|
|
2788
|
+
r.types = Vl();
|
|
2789
2789
|
function F(L) {
|
|
2790
2790
|
return Array.isArray(L);
|
|
2791
2791
|
}
|
|
@@ -2842,7 +2842,7 @@ function ta() {
|
|
|
2842
2842
|
return L === null || typeof L == "boolean" || typeof L == "number" || typeof L == "string" || typeof L == "symbol" || // ES6 symbol
|
|
2843
2843
|
typeof L > "u";
|
|
2844
2844
|
}
|
|
2845
|
-
r.isPrimitive = fe, r.isBuffer =
|
|
2845
|
+
r.isPrimitive = fe, r.isBuffer = zl();
|
|
2846
2846
|
function de(L) {
|
|
2847
2847
|
return Object.prototype.toString.call(L);
|
|
2848
2848
|
}
|
|
@@ -2864,30 +2864,30 @@ function ta() {
|
|
|
2864
2864
|
"Dec"
|
|
2865
2865
|
];
|
|
2866
2866
|
function Y() {
|
|
2867
|
-
var L = /* @__PURE__ */ new Date(),
|
|
2867
|
+
var L = /* @__PURE__ */ new Date(), V = [
|
|
2868
2868
|
se(L.getHours()),
|
|
2869
2869
|
se(L.getMinutes()),
|
|
2870
2870
|
se(L.getSeconds())
|
|
2871
2871
|
].join(":");
|
|
2872
|
-
return [L.getDate(), ne[L.getMonth()],
|
|
2872
|
+
return [L.getDate(), ne[L.getMonth()], V].join(" ");
|
|
2873
2873
|
}
|
|
2874
2874
|
r.log = function() {
|
|
2875
2875
|
console.log("%s - %s", Y(), r.format.apply(r, arguments));
|
|
2876
|
-
}, r.inherits =
|
|
2877
|
-
if (!
|
|
2878
|
-
for (var q = Object.keys(
|
|
2879
|
-
L[q[K]] =
|
|
2876
|
+
}, r.inherits = At(), r._extend = function(L, V) {
|
|
2877
|
+
if (!V || !C(V)) return L;
|
|
2878
|
+
for (var q = Object.keys(V), K = q.length; K--; )
|
|
2879
|
+
L[q[K]] = V[q[K]];
|
|
2880
2880
|
return L;
|
|
2881
2881
|
};
|
|
2882
|
-
function ce(L,
|
|
2883
|
-
return Object.prototype.hasOwnProperty.call(L,
|
|
2882
|
+
function ce(L, V) {
|
|
2883
|
+
return Object.prototype.hasOwnProperty.call(L, V);
|
|
2884
2884
|
}
|
|
2885
2885
|
var $ = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
|
|
2886
|
-
r.promisify = function(
|
|
2887
|
-
if (typeof
|
|
2886
|
+
r.promisify = function(V) {
|
|
2887
|
+
if (typeof V != "function")
|
|
2888
2888
|
throw new TypeError('The "original" argument must be of type Function');
|
|
2889
|
-
if ($ &&
|
|
2890
|
-
var q =
|
|
2889
|
+
if ($ && V[$]) {
|
|
2890
|
+
var q = V[$];
|
|
2891
2891
|
if (typeof q != "function")
|
|
2892
2892
|
throw new TypeError('The "util.promisify.custom" argument must be of type Function');
|
|
2893
2893
|
return Object.defineProperty(q, $, {
|
|
@@ -2906,33 +2906,33 @@ function ta() {
|
|
|
2906
2906
|
S ? P(S) : K(b);
|
|
2907
2907
|
});
|
|
2908
2908
|
try {
|
|
2909
|
-
|
|
2909
|
+
V.apply(this, m);
|
|
2910
2910
|
} catch (S) {
|
|
2911
2911
|
P(S);
|
|
2912
2912
|
}
|
|
2913
2913
|
return p;
|
|
2914
2914
|
}
|
|
2915
|
-
return Object.setPrototypeOf(q, Object.getPrototypeOf(
|
|
2915
|
+
return Object.setPrototypeOf(q, Object.getPrototypeOf(V)), $ && Object.defineProperty(q, $, {
|
|
2916
2916
|
value: q,
|
|
2917
2917
|
enumerable: !1,
|
|
2918
2918
|
writable: !1,
|
|
2919
2919
|
configurable: !0
|
|
2920
2920
|
}), Object.defineProperties(
|
|
2921
2921
|
q,
|
|
2922
|
-
e(
|
|
2922
|
+
e(V)
|
|
2923
2923
|
);
|
|
2924
2924
|
}, r.promisify.custom = $;
|
|
2925
|
-
function re(L,
|
|
2925
|
+
function re(L, V) {
|
|
2926
2926
|
if (!L) {
|
|
2927
2927
|
var q = new Error("Promise was rejected with a falsy value");
|
|
2928
2928
|
q.reason = L, L = q;
|
|
2929
2929
|
}
|
|
2930
|
-
return
|
|
2930
|
+
return V(L);
|
|
2931
2931
|
}
|
|
2932
2932
|
function ie(L) {
|
|
2933
2933
|
if (typeof L != "function")
|
|
2934
2934
|
throw new TypeError('The "original" argument must be of type Function');
|
|
2935
|
-
function
|
|
2935
|
+
function V() {
|
|
2936
2936
|
for (var q = [], K = 0; K < arguments.length; K++)
|
|
2937
2937
|
q.push(arguments[K]);
|
|
2938
2938
|
var P = q.pop();
|
|
@@ -2950,10 +2950,10 @@ function ta() {
|
|
|
2950
2950
|
}
|
|
2951
2951
|
);
|
|
2952
2952
|
}
|
|
2953
|
-
return Object.setPrototypeOf(
|
|
2954
|
-
|
|
2953
|
+
return Object.setPrototypeOf(V, Object.getPrototypeOf(L)), Object.defineProperties(
|
|
2954
|
+
V,
|
|
2955
2955
|
e(L)
|
|
2956
|
-
),
|
|
2956
|
+
), V;
|
|
2957
2957
|
}
|
|
2958
2958
|
r.callbackify = ie;
|
|
2959
2959
|
}(Or)), Or;
|
|
@@ -3155,10 +3155,10 @@ function ra() {
|
|
|
3155
3155
|
errorOrDestroy: s
|
|
3156
3156
|
}, _n;
|
|
3157
3157
|
}
|
|
3158
|
-
var qn = {},
|
|
3158
|
+
var qn = {}, Vs;
|
|
3159
3159
|
function _t() {
|
|
3160
|
-
if (
|
|
3161
|
-
|
|
3160
|
+
if (Vs) return qn;
|
|
3161
|
+
Vs = 1;
|
|
3162
3162
|
function r(a, u) {
|
|
3163
3163
|
a.prototype = Object.create(u.prototype), a.prototype.constructor = a, a.__proto__ = u;
|
|
3164
3164
|
}
|
|
@@ -3216,10 +3216,10 @@ function _t() {
|
|
|
3216
3216
|
return "Unknown encoding: " + a;
|
|
3217
3217
|
}, TypeError), t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"), qn.codes = e, qn;
|
|
3218
3218
|
}
|
|
3219
|
-
var Mn,
|
|
3219
|
+
var Mn, zs;
|
|
3220
3220
|
function na() {
|
|
3221
|
-
if (
|
|
3222
|
-
|
|
3221
|
+
if (zs) return Mn;
|
|
3222
|
+
zs = 1;
|
|
3223
3223
|
var r = _t().codes.ERR_INVALID_OPT_VALUE;
|
|
3224
3224
|
function e(n, i, s) {
|
|
3225
3225
|
return n.highWaterMark != null ? n.highWaterMark : i ? n[s] : null;
|
|
@@ -3291,11 +3291,11 @@ function ia() {
|
|
|
3291
3291
|
return i.isBuffer(P) || P instanceof s;
|
|
3292
3292
|
}
|
|
3293
3293
|
var u = ra(), c = na(), l = c.getHighWaterMark, h = _t().codes, g = h.ERR_INVALID_ARG_TYPE, E = h.ERR_METHOD_NOT_IMPLEMENTED, A = h.ERR_MULTIPLE_CALLBACK, v = h.ERR_STREAM_CANNOT_PIPE, F = h.ERR_STREAM_DESTROYED, w = h.ERR_STREAM_NULL_VALUES, B = h.ERR_STREAM_WRITE_AFTER_END, R = h.ERR_UNKNOWN_ENCODING, D = u.errorOrDestroy;
|
|
3294
|
-
|
|
3294
|
+
At()(_, n);
|
|
3295
3295
|
function k() {
|
|
3296
3296
|
}
|
|
3297
3297
|
function N(P, p, m) {
|
|
3298
|
-
e = e ||
|
|
3298
|
+
e = e || kt(), P = P || {}, typeof m != "boolean" && (m = p instanceof e), this.objectMode = !!P.objectMode, m && (this.objectMode = this.objectMode || !!P.writableObjectMode), this.highWaterMark = l(this, P, "writableHighWaterMark", m), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
|
|
3299
3299
|
var I = P.decodeStrings === !1;
|
|
3300
3300
|
this.decodeStrings = !I, this.defaultEncoding = P.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(S) {
|
|
3301
3301
|
ne(p, S);
|
|
@@ -3324,7 +3324,7 @@ function ia() {
|
|
|
3324
3324
|
return p instanceof this;
|
|
3325
3325
|
};
|
|
3326
3326
|
function _(P) {
|
|
3327
|
-
e = e ||
|
|
3327
|
+
e = e || kt();
|
|
3328
3328
|
var p = this instanceof e;
|
|
3329
3329
|
if (!p && !M.call(_, this)) return new _(P);
|
|
3330
3330
|
this._writableState = new N(P, this, p), this.writable = !0, P && (typeof P.write == "function" && (this._write = P.write), typeof P.writev == "function" && (this._writev = P.writev), typeof P.destroy == "function" && (this._destroy = P.destroy), typeof P.final == "function" && (this._final = P.final)), n.call(this);
|
|
@@ -3397,7 +3397,7 @@ function ia() {
|
|
|
3397
3397
|
p.writelen = I, p.writecb = x, p.writing = !0, p.sync = !0, p.destroyed ? p.onwrite(new F("write")) : m ? P._writev(S, p.onwrite) : P._write(S, b, p.onwrite), p.sync = !1;
|
|
3398
3398
|
}
|
|
3399
3399
|
function de(P, p, m, I, S) {
|
|
3400
|
-
--p.pendingcb, m ? (ge.nextTick(S, I), ge.nextTick(
|
|
3400
|
+
--p.pendingcb, m ? (ge.nextTick(S, I), ge.nextTick(V, P, p), P._writableState.errorEmitted = !0, D(P, I)) : (S(I), P._writableState.errorEmitted = !0, D(P, I), V(P, p));
|
|
3401
3401
|
}
|
|
3402
3402
|
function se(P) {
|
|
3403
3403
|
P.writing = !1, P.writecb = null, P.length -= P.writelen, P.writelen = 0;
|
|
@@ -3412,7 +3412,7 @@ function ia() {
|
|
|
3412
3412
|
}
|
|
3413
3413
|
}
|
|
3414
3414
|
function Y(P, p, m, I) {
|
|
3415
|
-
m || ce(P, p), p.pendingcb--, I(),
|
|
3415
|
+
m || ce(P, p), p.pendingcb--, I(), V(P, p);
|
|
3416
3416
|
}
|
|
3417
3417
|
function ce(P, p) {
|
|
3418
3418
|
p.length === 0 && p.needDrain && (p.needDrain = !1, P.emit("drain"));
|
|
@@ -3455,13 +3455,13 @@ function ia() {
|
|
|
3455
3455
|
}
|
|
3456
3456
|
function ie(P, p) {
|
|
3457
3457
|
P._final(function(m) {
|
|
3458
|
-
p.pendingcb--, m && D(P, m), p.prefinished = !0, P.emit("prefinish"),
|
|
3458
|
+
p.pendingcb--, m && D(P, m), p.prefinished = !0, P.emit("prefinish"), V(P, p);
|
|
3459
3459
|
});
|
|
3460
3460
|
}
|
|
3461
3461
|
function L(P, p) {
|
|
3462
3462
|
!p.prefinished && !p.finalCalled && (typeof P._final == "function" && !p.destroyed ? (p.pendingcb++, p.finalCalled = !0, ge.nextTick(ie, P, p)) : (p.prefinished = !0, P.emit("prefinish")));
|
|
3463
3463
|
}
|
|
3464
|
-
function
|
|
3464
|
+
function V(P, p) {
|
|
3465
3465
|
var m = re(p);
|
|
3466
3466
|
if (m && (L(P, p), p.pendingcb === 0 && (p.finished = !0, P.emit("finish"), p.autoDestroy))) {
|
|
3467
3467
|
var I = P._readableState;
|
|
@@ -3470,7 +3470,7 @@ function ia() {
|
|
|
3470
3470
|
return m;
|
|
3471
3471
|
}
|
|
3472
3472
|
function q(P, p, m) {
|
|
3473
|
-
p.ending = !0,
|
|
3473
|
+
p.ending = !0, V(P, p), m && (p.finished ? ge.nextTick(m) : P.once("finish", m)), p.ended = !0, P.writable = !1;
|
|
3474
3474
|
}
|
|
3475
3475
|
function K(P, p, m) {
|
|
3476
3476
|
var I = P.entry;
|
|
@@ -3496,7 +3496,7 @@ function ia() {
|
|
|
3496
3496
|
}, jn;
|
|
3497
3497
|
}
|
|
3498
3498
|
var Hn, Js;
|
|
3499
|
-
function
|
|
3499
|
+
function kt() {
|
|
3500
3500
|
if (Js) return Hn;
|
|
3501
3501
|
Js = 1;
|
|
3502
3502
|
var r = Object.keys || function(c) {
|
|
@@ -3506,7 +3506,7 @@ function Bt() {
|
|
|
3506
3506
|
};
|
|
3507
3507
|
Hn = o;
|
|
3508
3508
|
var e = sa(), t = ia();
|
|
3509
|
-
|
|
3509
|
+
At()(o, e);
|
|
3510
3510
|
for (var n = r(t.prototype), i = 0; i < n.length; i++) {
|
|
3511
3511
|
var s = n[i];
|
|
3512
3512
|
o.prototype[s] || (o.prototype[s] = t.prototype[s]);
|
|
@@ -3559,7 +3559,7 @@ function Bt() {
|
|
|
3559
3559
|
}
|
|
3560
3560
|
}), Hn;
|
|
3561
3561
|
}
|
|
3562
|
-
var
|
|
3562
|
+
var Vn = {}, tr = { exports: {} }, $s;
|
|
3563
3563
|
function Jl() {
|
|
3564
3564
|
return $s || ($s = 1, function(r, e) {
|
|
3565
3565
|
var t = vr, n = t.Buffer;
|
|
@@ -3593,7 +3593,7 @@ function Jl() {
|
|
|
3593
3593
|
}
|
|
3594
3594
|
var Ks;
|
|
3595
3595
|
function li() {
|
|
3596
|
-
if (Ks) return
|
|
3596
|
+
if (Ks) return Vn;
|
|
3597
3597
|
Ks = 1;
|
|
3598
3598
|
var r = Jl().Buffer, e = r.isEncoding || function(w) {
|
|
3599
3599
|
switch (w = "" + w, w && w.toLowerCase()) {
|
|
@@ -3642,7 +3642,7 @@ function li() {
|
|
|
3642
3642
|
if (typeof B != "string" && (r.isEncoding === e || !e(w))) throw new Error("Unknown encoding: " + w);
|
|
3643
3643
|
return B || w;
|
|
3644
3644
|
}
|
|
3645
|
-
|
|
3645
|
+
Vn.StringDecoder = i;
|
|
3646
3646
|
function i(w) {
|
|
3647
3647
|
this.encoding = n(w);
|
|
3648
3648
|
var B;
|
|
@@ -3747,11 +3747,11 @@ function li() {
|
|
|
3747
3747
|
function F(w) {
|
|
3748
3748
|
return w && w.length ? this.write(w) : "";
|
|
3749
3749
|
}
|
|
3750
|
-
return
|
|
3750
|
+
return Vn;
|
|
3751
3751
|
}
|
|
3752
|
-
var
|
|
3752
|
+
var zn, Xs;
|
|
3753
3753
|
function Ci() {
|
|
3754
|
-
if (Xs) return
|
|
3754
|
+
if (Xs) return zn;
|
|
3755
3755
|
Xs = 1;
|
|
3756
3756
|
var r = _t().codes.ERR_STREAM_PREMATURE_CLOSE;
|
|
3757
3757
|
function e(s) {
|
|
@@ -3794,7 +3794,7 @@ function Ci() {
|
|
|
3794
3794
|
s.removeListener("complete", g), s.removeListener("abort", F), s.removeListener("request", w), s.req && s.req.removeListener("finish", g), s.removeListener("end", l), s.removeListener("close", l), s.removeListener("finish", g), s.removeListener("end", A), s.removeListener("error", v), s.removeListener("close", F);
|
|
3795
3795
|
};
|
|
3796
3796
|
}
|
|
3797
|
-
return
|
|
3797
|
+
return zn = i, zn;
|
|
3798
3798
|
}
|
|
3799
3799
|
var Gn, Ys;
|
|
3800
3800
|
function $l() {
|
|
@@ -3948,17 +3948,17 @@ function sa() {
|
|
|
3948
3948
|
a && a.debuglog ? u = a.debuglog("stream") : u = function() {
|
|
3949
3949
|
};
|
|
3950
3950
|
var c = Gl(), l = ra(), h = na(), g = h.getHighWaterMark, E = _t().codes, A = E.ERR_INVALID_ARG_TYPE, v = E.ERR_STREAM_PUSH_AFTER_EOF, F = E.ERR_METHOD_NOT_IMPLEMENTED, w = E.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, B, R, D;
|
|
3951
|
-
|
|
3951
|
+
At()(C, t);
|
|
3952
3952
|
var k = l.errorOrDestroy, N = ["error", "close", "destroy", "pause", "resume"];
|
|
3953
3953
|
function M(b, x, U) {
|
|
3954
3954
|
if (typeof b.prependListener == "function") return b.prependListener(x, U);
|
|
3955
3955
|
!b._events || !b._events[x] ? b.on(x, U) : Array.isArray(b._events[x]) ? b._events[x].unshift(U) : b._events[x] = [U, b._events[x]];
|
|
3956
3956
|
}
|
|
3957
3957
|
function _(b, x, U) {
|
|
3958
|
-
r = r ||
|
|
3958
|
+
r = r || kt(), b = b || {}, typeof U != "boolean" && (U = x instanceof r), this.objectMode = !!b.objectMode, U && (this.objectMode = this.objectMode || !!b.readableObjectMode), this.highWaterMark = g(this, b, "readableHighWaterMark", U), this.buffer = new c(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = b.emitClose !== !1, this.autoDestroy = !!b.autoDestroy, this.destroyed = !1, this.defaultEncoding = b.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, b.encoding && (B || (B = li().StringDecoder), this.decoder = new B(b.encoding), this.encoding = b.encoding);
|
|
3959
3959
|
}
|
|
3960
3960
|
function C(b) {
|
|
3961
|
-
if (r = r ||
|
|
3961
|
+
if (r = r || kt(), !(this instanceof C)) return new C(b);
|
|
3962
3962
|
var x = this instanceof r;
|
|
3963
3963
|
this._readableState = new _(b, this, x), this.readable = !0, b && (typeof b.read == "function" && (this._read = b.read), typeof b.destroy == "function" && (this._destroy = b.destroy)), t.call(this);
|
|
3964
3964
|
}
|
|
@@ -4092,14 +4092,14 @@ function sa() {
|
|
|
4092
4092
|
function ue() {
|
|
4093
4093
|
u("onend"), b.end();
|
|
4094
4094
|
}
|
|
4095
|
-
var
|
|
4096
|
-
b.on("drain",
|
|
4095
|
+
var z = ie(U);
|
|
4096
|
+
b.on("drain", z);
|
|
4097
4097
|
var Se = !1;
|
|
4098
4098
|
function Be() {
|
|
4099
|
-
u("cleanup"), b.removeListener("close", Ue), b.removeListener("finish", _e), b.removeListener("drain",
|
|
4099
|
+
u("cleanup"), b.removeListener("close", Ue), b.removeListener("finish", _e), b.removeListener("drain", z), b.removeListener("error", Ge), b.removeListener("unpipe", te), U.removeListener("end", ue), U.removeListener("end", st), U.removeListener("data", Ve), Se = !0, W.awaitDrain && (!b._writableState || b._writableState.needDrain) && z();
|
|
4100
4100
|
}
|
|
4101
|
-
U.on("data",
|
|
4102
|
-
function
|
|
4101
|
+
U.on("data", Ve);
|
|
4102
|
+
function Ve(lt) {
|
|
4103
4103
|
u("ondata");
|
|
4104
4104
|
var Le = b.write(lt);
|
|
4105
4105
|
u("dest.write", Le), Le === !1 && ((W.pipesCount === 1 && W.pipes === b || W.pipesCount > 1 && S(W.pipes, b) !== -1) && !Se && (u("false write response, pause", W.awaitDrain), W.awaitDrain++), U.pause());
|
|
@@ -4146,7 +4146,7 @@ function sa() {
|
|
|
4146
4146
|
return te === -1 ? this : (x.pipes.splice(te, 1), x.pipesCount -= 1, x.pipesCount === 1 && (x.pipes = x.pipes[0]), b.emit("unpipe", this, U), this);
|
|
4147
4147
|
}, C.prototype.on = function(b, x) {
|
|
4148
4148
|
var U = t.prototype.on.call(this, b, x), W = this._readableState;
|
|
4149
|
-
return b === "data" ? (W.readableListening = this.listenerCount("readable") > 0, W.flowing !== !1 && this.resume()) : b === "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 ? Y(this) : W.reading || ge.nextTick(
|
|
4149
|
+
return b === "data" ? (W.readableListening = this.listenerCount("readable") > 0, W.flowing !== !1 && this.resume()) : b === "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 ? Y(this) : W.reading || ge.nextTick(V, this)), U;
|
|
4150
4150
|
}, C.prototype.addListener = C.prototype.on, C.prototype.removeListener = function(b, x) {
|
|
4151
4151
|
var U = t.prototype.removeListener.call(this, b, x);
|
|
4152
4152
|
return b === "readable" && ge.nextTick(L, this), U;
|
|
@@ -4158,7 +4158,7 @@ function sa() {
|
|
|
4158
4158
|
var x = b._readableState;
|
|
4159
4159
|
x.readableListening = b.listenerCount("readable") > 0, x.resumeScheduled && !x.paused ? x.flowing = !0 : b.listenerCount("data") > 0 && b.resume();
|
|
4160
4160
|
}
|
|
4161
|
-
function
|
|
4161
|
+
function V(b) {
|
|
4162
4162
|
u("readable nexttick read 0"), b.read(0);
|
|
4163
4163
|
}
|
|
4164
4164
|
C.prototype.resume = function() {
|
|
@@ -4270,8 +4270,8 @@ var $n, eo;
|
|
|
4270
4270
|
function oa() {
|
|
4271
4271
|
if (eo) return $n;
|
|
4272
4272
|
eo = 1, $n = a;
|
|
4273
|
-
var r = _t().codes, e = r.ERR_METHOD_NOT_IMPLEMENTED, t = r.ERR_MULTIPLE_CALLBACK, n = r.ERR_TRANSFORM_ALREADY_TRANSFORMING, i = r.ERR_TRANSFORM_WITH_LENGTH_0, s =
|
|
4274
|
-
|
|
4273
|
+
var r = _t().codes, e = r.ERR_METHOD_NOT_IMPLEMENTED, t = r.ERR_MULTIPLE_CALLBACK, n = r.ERR_TRANSFORM_ALREADY_TRANSFORMING, i = r.ERR_TRANSFORM_WITH_LENGTH_0, s = kt();
|
|
4274
|
+
At()(a, s);
|
|
4275
4275
|
function o(l, h) {
|
|
4276
4276
|
var g = this._transformState;
|
|
4277
4277
|
g.transforming = !1;
|
|
@@ -4330,7 +4330,7 @@ function Xl() {
|
|
|
4330
4330
|
if (to) return Kn;
|
|
4331
4331
|
to = 1, Kn = e;
|
|
4332
4332
|
var r = oa();
|
|
4333
|
-
|
|
4333
|
+
At()(e, r);
|
|
4334
4334
|
function e(t) {
|
|
4335
4335
|
if (!(this instanceof e)) return new e(t);
|
|
4336
4336
|
r.call(this, t);
|
|
@@ -4407,8 +4407,8 @@ var Yn, no;
|
|
|
4407
4407
|
function Zl() {
|
|
4408
4408
|
if (no) return Yn;
|
|
4409
4409
|
no = 1, Yn = t;
|
|
4410
|
-
var r = xi().EventEmitter, e =
|
|
4411
|
-
e(t, r), t.Readable = sa(), t.Writable = ia(), t.Duplex =
|
|
4410
|
+
var r = xi().EventEmitter, e = At();
|
|
4411
|
+
e(t, r), t.Readable = sa(), t.Writable = ia(), t.Duplex = kt(), t.Transform = oa(), t.PassThrough = Xl(), t.finished = Ci(), t.pipeline = Yl(), t.Stream = t;
|
|
4412
4412
|
function t() {
|
|
4413
4413
|
r.call(this);
|
|
4414
4414
|
}
|
|
@@ -4584,7 +4584,7 @@ function Zl() {
|
|
|
4584
4584
|
value: l
|
|
4585
4585
|
}
|
|
4586
4586
|
}), l.prototype.write = function(p) {
|
|
4587
|
-
if (typeof
|
|
4587
|
+
if (typeof St == "function" && typeof St.isBuffer == "function" && St.isBuffer(p)) {
|
|
4588
4588
|
if (!this._decoder) {
|
|
4589
4589
|
var m = li().StringDecoder;
|
|
4590
4590
|
this._decoder = new m("utf8");
|
|
@@ -5031,18 +5031,18 @@ Actual: ` + p.attribValue
|
|
|
5031
5031
|
var I = p.tag, S = $(p.tagName);
|
|
5032
5032
|
I.prefix = S.prefix, I.local = S.local, I.uri = I.ns[S.prefix] || "", I.prefix && !I.uri && (Y(p, "Unbound namespace prefix: " + JSON.stringify(p.tagName)), I.uri = S.prefix);
|
|
5033
5033
|
var b = p.tags[p.tags.length - 1] || p;
|
|
5034
|
-
I.ns && b.ns !== I.ns && Object.keys(I.ns).forEach(function(
|
|
5034
|
+
I.ns && b.ns !== I.ns && Object.keys(I.ns).forEach(function(Ve) {
|
|
5035
5035
|
Z(p, "onopennamespace", {
|
|
5036
|
-
prefix:
|
|
5037
|
-
uri: I.ns[
|
|
5036
|
+
prefix: Ve,
|
|
5037
|
+
uri: I.ns[Ve]
|
|
5038
5038
|
});
|
|
5039
5039
|
});
|
|
5040
5040
|
for (var x = 0, U = p.attribList.length; x < U; x++) {
|
|
5041
|
-
var W = p.attribList[x], ee = W[0], X = W[1], te = $(ee, !0), ue = te.prefix,
|
|
5041
|
+
var W = p.attribList[x], ee = W[0], X = W[1], te = $(ee, !0), ue = te.prefix, z = te.local, Se = ue === "" ? "" : I.ns[ue] || "", Be = {
|
|
5042
5042
|
name: ee,
|
|
5043
5043
|
value: X,
|
|
5044
5044
|
prefix: ue,
|
|
5045
|
-
local:
|
|
5045
|
+
local: z,
|
|
5046
5046
|
uri: Se
|
|
5047
5047
|
};
|
|
5048
5048
|
ue && ue !== "xmlns" && !Se && (Y(p, "Unbound namespace prefix: " + JSON.stringify(ue)), Be.uri = ue), p.tag.attributes[ee] = Be, Z(p, "onattribute", Be);
|
|
@@ -5091,7 +5091,7 @@ Actual: ` + p.attribValue
|
|
|
5091
5091
|
}
|
|
5092
5092
|
m === 0 && (p.closedRoot = !0), p.tagName = p.attribValue = p.attribName = "", p.attribList.length = 0, p.state = C.TEXT;
|
|
5093
5093
|
}
|
|
5094
|
-
function
|
|
5094
|
+
function V(p) {
|
|
5095
5095
|
var m = p.entity, I = m.toLowerCase(), S, b = "";
|
|
5096
5096
|
return p.ENTITIES[m] ? p.ENTITIES[m] : p.ENTITIES[I] ? p.ENTITIES[I] : (m = I, m.charAt(0) === "#" && (m.charAt(1) === "x" ? (m = m.slice(2), S = parseInt(m, 16), b = S.toString(16)) : (m = m.slice(1), S = parseInt(m, 10), b = S.toString(10))), m = m.replace(/^0+/, ""), isNaN(S) || b.toLowerCase() !== m ? (Y(p, "Invalid character entity"), "&" + p.entity + ";") : String.fromCodePoint(S));
|
|
5097
5097
|
}
|
|
@@ -5292,7 +5292,7 @@ Actual: ` + p.attribValue
|
|
|
5292
5292
|
break;
|
|
5293
5293
|
}
|
|
5294
5294
|
if (S === ";") {
|
|
5295
|
-
var ee =
|
|
5295
|
+
var ee = V(m);
|
|
5296
5296
|
m.opt.unparsedEntities && !Object.values(e.XML_ENTITIES).includes(ee) ? (m.entity = "", m.state = U, m.write(ee)) : (m[W] += ee, m.entity = "", m.state = U);
|
|
5297
5297
|
} else M(m.entity.length ? R : B, S) ? m.entity += S : (Y(m, "Invalid character in entity name"), m[W] += "&" + m.entity + S, m.entity = "", m.state = U);
|
|
5298
5298
|
continue;
|
|
@@ -5352,7 +5352,7 @@ var Si = {
|
|
|
5352
5352
|
checkFnExists: function(r, e) {
|
|
5353
5353
|
return r + "Fn" in e;
|
|
5354
5354
|
}
|
|
5355
|
-
}, ec = Uo, me = Ti,
|
|
5355
|
+
}, ec = Uo, me = Ti, Ft = Si.isArray, j, le;
|
|
5356
5356
|
function tc(r) {
|
|
5357
5357
|
return j = me.copyOptions(r), me.ensureFlagExists("ignoreDeclaration", j), me.ensureFlagExists("ignoreInstruction", j), me.ensureFlagExists("ignoreAttributes", j), me.ensureFlagExists("ignoreText", j), me.ensureFlagExists("ignoreComment", j), me.ensureFlagExists("ignoreCdata", j), me.ensureFlagExists("ignoreDoctype", j), me.ensureFlagExists("compact", j), me.ensureFlagExists("alwaysChildren", j), me.ensureFlagExists("addParent", j), me.ensureFlagExists("trim", j), me.ensureFlagExists("nativeType", j), me.ensureFlagExists("nativeTypeAttributes", j), me.ensureFlagExists("sanitize", j), me.ensureFlagExists("instructionHasAttributes", j), me.ensureFlagExists("captureSpacesBetweenElements", j), me.ensureAlwaysArrayExists(j), me.ensureKeyExists("declaration", j), me.ensureKeyExists("instruction", j), me.ensureKeyExists("attributes", j), me.ensureKeyExists("text", j), me.ensureKeyExists("comment", j), me.ensureKeyExists("cdata", j), me.ensureKeyExists("doctype", j), me.ensureKeyExists("type", j), me.ensureKeyExists("name", j), me.ensureKeyExists("elements", j), me.ensureKeyExists("parent", j), me.checkFnExists("doctype", j), me.checkFnExists("instruction", j), me.checkFnExists("cdata", j), me.checkFnExists("comment", j), me.checkFnExists("text", j), me.checkFnExists("instructionName", j), me.checkFnExists("elementName", j), me.checkFnExists("attributeName", j), me.checkFnExists("attributeValue", j), me.checkFnExists("attributes", j), j;
|
|
5358
5358
|
}
|
|
@@ -5366,7 +5366,7 @@ function aa(r) {
|
|
|
5366
5366
|
function Yt(r, e) {
|
|
5367
5367
|
var t;
|
|
5368
5368
|
if (j.compact) {
|
|
5369
|
-
if (!le[j[r + "Key"]] && (
|
|
5369
|
+
if (!le[j[r + "Key"]] && (Ft(j.alwaysArray) ? j.alwaysArray.indexOf(j[r + "Key"]) !== -1 : j.alwaysArray) && (le[j[r + "Key"]] = []), le[j[r + "Key"]] && !Ft(le[j[r + "Key"]]) && (le[j[r + "Key"]] = [le[j[r + "Key"]]]), r + "Fn" in j && typeof e == "string" && (e = j[r + "Fn"](e, le)), r === "instruction" && ("instructionFn" in j || "instructionNameFn" in j)) {
|
|
5370
5370
|
for (t in e)
|
|
5371
5371
|
if (e.hasOwnProperty(t))
|
|
5372
5372
|
if ("instructionFn" in j)
|
|
@@ -5376,7 +5376,7 @@ function Yt(r, e) {
|
|
|
5376
5376
|
delete e[t], e[j.instructionNameFn(t, n, le)] = n;
|
|
5377
5377
|
}
|
|
5378
5378
|
}
|
|
5379
|
-
|
|
5379
|
+
Ft(le[j[r + "Key"]]) ? le[j[r + "Key"]].push(e) : le[j[r + "Key"]] = e;
|
|
5380
5380
|
} else {
|
|
5381
5381
|
le[j.elementsKey] || (le[j.elementsKey] = []);
|
|
5382
5382
|
var i = {};
|
|
@@ -5429,7 +5429,7 @@ function nc(r, e) {
|
|
|
5429
5429
|
for (n in e)
|
|
5430
5430
|
e.hasOwnProperty(n) && (t[j.attributesKey][n] = e[n]);
|
|
5431
5431
|
}
|
|
5432
|
-
!(r in le) && (
|
|
5432
|
+
!(r in le) && (Ft(j.alwaysArray) ? j.alwaysArray.indexOf(r) !== -1 : j.alwaysArray) && (le[r] = []), le[r] && !Ft(le[r]) && (le[r] = [le[r]]), Ft(le[r]) ? le[r].push(t) : le[r] = t;
|
|
5433
5433
|
} else
|
|
5434
5434
|
le[j.elementsKey] || (le[j.elementsKey] = []), t = {}, t[j.typeKey] = "element", t[j.nameKey] = r, !j.ignoreAttributes && e && Object.keys(e).length && (t[j.attributesKey] = e), j.alwaysChildren && (t[j.elementsKey] = []), le[j.elementsKey].push(t);
|
|
5435
5435
|
t[j.parentKey] = le, le = t;
|
|
@@ -5655,7 +5655,7 @@ var ya = function(r, e) {
|
|
|
5655
5655
|
var t = [];
|
|
5656
5656
|
return Re = r, Pe = "_root_", e.compact ? t.push(wa(r, e, 0, !0)) : (r[e.declarationKey] && t.push(ca(r[e.declarationKey], e, 0)), r[e.elementsKey] && r[e.elementsKey].length && t.push(ha(r[e.elementsKey], e, 0, !t.length))), t.join("");
|
|
5657
5657
|
}, yc = ya, bc = function(r, e) {
|
|
5658
|
-
r instanceof
|
|
5658
|
+
r instanceof St && (r = r.toString());
|
|
5659
5659
|
var t = null;
|
|
5660
5660
|
if (typeof r == "string")
|
|
5661
5661
|
try {
|
|
@@ -5747,14 +5747,14 @@ dr.exports;
|
|
|
5747
5747
|
re = C(re, de.options);
|
|
5748
5748
|
var ie = re.strict;
|
|
5749
5749
|
ie && A.test($) && fe("forbidden code point");
|
|
5750
|
-
var L = re.encodeEverything,
|
|
5750
|
+
var L = re.encodeEverything, V = re.useNamedReferences, q = re.allowUnsafeSymbols, K = re.decimal ? Z : oe, P = function(p) {
|
|
5751
5751
|
return K(p.charCodeAt(0));
|
|
5752
5752
|
};
|
|
5753
5753
|
return L ? ($ = $.replace(a, function(p) {
|
|
5754
|
-
return
|
|
5755
|
-
}),
|
|
5754
|
+
return V && M(l, p) ? "&" + l[p] + ";" : P(p);
|
|
5755
|
+
}), V && ($ = $.replace(/>\u20D2/g, ">⃒").replace(/<\u20D2/g, "<⃒").replace(/fj/g, "fj")), V && ($ = $.replace(c, function(p) {
|
|
5756
5756
|
return "&" + l[p] + ";";
|
|
5757
|
-
}))) :
|
|
5757
|
+
}))) : V ? (q || ($ = $.replace(h, function(p) {
|
|
5758
5758
|
return "&" + l[p] + ";";
|
|
5759
5759
|
})), $ = $.replace(/>\u20D2/g, ">⃒").replace(/<\u20D2/g, "<⃒"), $ = $.replace(c, function(p) {
|
|
5760
5760
|
return "&" + l[p] + ";";
|
|
@@ -5773,9 +5773,9 @@ dr.exports;
|
|
|
5773
5773
|
var se = function($, re) {
|
|
5774
5774
|
re = C(re, se.options);
|
|
5775
5775
|
var ie = re.strict;
|
|
5776
|
-
return ie && E.test($) && fe("malformed character reference"), $.replace(v, function(L,
|
|
5776
|
+
return ie && E.test($) && fe("malformed character reference"), $.replace(v, function(L, V, q, K, P, p, m, I, S) {
|
|
5777
5777
|
var b, x, U, W, ee, X;
|
|
5778
|
-
return
|
|
5778
|
+
return V ? (ee = V, F[ee]) : q ? (ee = q, X = K, X && re.isAttributeValue ? (ie && X == "=" && fe("`&` did not start a character reference"), L) : (ie && fe(
|
|
5779
5779
|
"named character reference was not terminated by a semicolon"
|
|
5780
5780
|
), w[ee] + (X || ""))) : P ? (U = P, x = p, ie && !x && fe("character reference was not terminated by a semicolon"), b = parseInt(U, 10), J(b, ie)) : m ? (W = m, x = I, ie && !x && fe("character reference was not terminated by a semicolon"), b = parseInt(W, 16), J(b, ie)) : (ie && fe(
|
|
5781
5781
|
"named character reference was not terminated by a semicolon"
|
|
@@ -6480,7 +6480,7 @@ function gt(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
|
-
function
|
|
6483
|
+
function Vt(r, e, t, n) {
|
|
6484
6484
|
let i = (e || r).node(t), s = 0, o = e ? e.index(t) : i.childCount;
|
|
6485
6485
|
r && (s = r.index(t), r.depth > t ? s++ : r.textOffset && (gt(r.nodeAfter, n), s++));
|
|
6486
6486
|
for (let a = s; a < o; a++)
|
|
@@ -6492,15 +6492,15 @@ function wt(r, e) {
|
|
|
6492
6492
|
}
|
|
6493
6493
|
function Ta(r, e, t, n, i) {
|
|
6494
6494
|
let s = r.depth > i && ci(r, e, i + 1), o = n.depth > i && ci(t, n, i + 1), a = [];
|
|
6495
|
-
return
|
|
6495
|
+
return Vt(null, r, i, a), s && o && e.index(i) == t.index(i) ? (Sa(s, o), gt(wt(s, Ta(r, e, t, n, i + 1)), a)) : (s && gt(wt(s, hr(r, e, i + 1)), a), Vt(e, t, i, a), o && gt(wt(o, hr(t, n, i + 1)), a)), Vt(n, null, i, a), new Q(a);
|
|
6496
6496
|
}
|
|
6497
6497
|
function hr(r, e, t) {
|
|
6498
6498
|
let n = [];
|
|
6499
|
-
if (
|
|
6499
|
+
if (Vt(null, r, t, n), r.depth > t) {
|
|
6500
6500
|
let i = ci(r, e, t + 1);
|
|
6501
6501
|
gt(wt(i, hr(r, e, t + 1)), n);
|
|
6502
6502
|
}
|
|
6503
|
-
return
|
|
6503
|
+
return Vt(e, null, t, n), new Q(n);
|
|
6504
6504
|
}
|
|
6505
6505
|
function Rc(r, e) {
|
|
6506
6506
|
let t = e.depth - r.openStart, i = e.node(t).copy(r.content);
|
|
@@ -6511,7 +6511,7 @@ function Rc(r, e) {
|
|
|
6511
6511
|
end: i.resolveNoCache(i.content.size - r.openEnd - t)
|
|
6512
6512
|
};
|
|
6513
6513
|
}
|
|
6514
|
-
class
|
|
6514
|
+
class zt {
|
|
6515
6515
|
/**
|
|
6516
6516
|
@internal
|
|
6517
6517
|
*/
|
|
@@ -6739,7 +6739,7 @@ class Vt {
|
|
|
6739
6739
|
break;
|
|
6740
6740
|
s = c - 1, i += u + 1;
|
|
6741
6741
|
}
|
|
6742
|
-
return new
|
|
6742
|
+
return new zt(t, n, s);
|
|
6743
6743
|
}
|
|
6744
6744
|
/**
|
|
6745
6745
|
@internal
|
|
@@ -6754,7 +6754,7 @@ class Vt {
|
|
|
6754
6754
|
}
|
|
6755
6755
|
else
|
|
6756
6756
|
so.set(e, n = new Pc());
|
|
6757
|
-
let i = n.elts[n.i] =
|
|
6757
|
+
let i = n.elts[n.i] = zt.resolve(e, t);
|
|
6758
6758
|
return n.i = (n.i + 1) % Oc, i;
|
|
6759
6759
|
}
|
|
6760
6760
|
}
|
|
@@ -7009,13 +7009,13 @@ class rt {
|
|
|
7009
7009
|
[object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context.
|
|
7010
7010
|
*/
|
|
7011
7011
|
resolve(e) {
|
|
7012
|
-
return
|
|
7012
|
+
return zt.resolveCached(this, e);
|
|
7013
7013
|
}
|
|
7014
7014
|
/**
|
|
7015
7015
|
@internal
|
|
7016
7016
|
*/
|
|
7017
7017
|
resolveNoCache(e) {
|
|
7018
|
-
return
|
|
7018
|
+
return zt.resolve(this, e);
|
|
7019
7019
|
}
|
|
7020
7020
|
/**
|
|
7021
7021
|
Test whether a given mark or mark type occurs in this document
|
|
@@ -7234,7 +7234,7 @@ class yt {
|
|
|
7234
7234
|
return yt.empty;
|
|
7235
7235
|
let i = Ba(n);
|
|
7236
7236
|
n.next && n.err("Unexpected trailing text");
|
|
7237
|
-
let s = Gc(
|
|
7237
|
+
let s = Gc(zc(i));
|
|
7238
7238
|
return Wc(s, n), s;
|
|
7239
7239
|
}
|
|
7240
7240
|
/**
|
|
@@ -7410,7 +7410,7 @@ function Mc(r) {
|
|
|
7410
7410
|
return e.length == 1 ? e[0] : { type: "seq", exprs: e };
|
|
7411
7411
|
}
|
|
7412
7412
|
function Uc(r) {
|
|
7413
|
-
let e =
|
|
7413
|
+
let e = Vc(r);
|
|
7414
7414
|
for (; ; )
|
|
7415
7415
|
if (r.eat("+"))
|
|
7416
7416
|
e = { type: "plus", expr: e };
|
|
@@ -7444,7 +7444,7 @@ function Hc(r, e) {
|
|
|
7444
7444
|
}
|
|
7445
7445
|
return i.length == 0 && r.err("No node type or group '" + e + "' found"), i;
|
|
7446
7446
|
}
|
|
7447
|
-
function
|
|
7447
|
+
function Vc(r) {
|
|
7448
7448
|
if (r.eat("(")) {
|
|
7449
7449
|
let e = Ba(r);
|
|
7450
7450
|
return r.eat(")") || r.err("Missing closing paren"), e;
|
|
@@ -7455,7 +7455,7 @@ function zc(r) {
|
|
|
7455
7455
|
return r.pos++, e.length == 1 ? e[0] : { type: "choice", exprs: e };
|
|
7456
7456
|
}
|
|
7457
7457
|
}
|
|
7458
|
-
function
|
|
7458
|
+
function zc(r) {
|
|
7459
7459
|
let e = [[]];
|
|
7460
7460
|
return i(s(r, 0), t()), e;
|
|
7461
7461
|
function t() {
|
|
@@ -7852,7 +7852,7 @@ class Tr {
|
|
|
7852
7852
|
return this.excluded.indexOf(e) > -1;
|
|
7853
7853
|
}
|
|
7854
7854
|
}
|
|
7855
|
-
let
|
|
7855
|
+
let kp = class {
|
|
7856
7856
|
/**
|
|
7857
7857
|
Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
|
|
7858
7858
|
*/
|
|
@@ -8174,7 +8174,7 @@ class co {
|
|
|
8174
8174
|
let o = i.content[i.content.length - 1], a = e.previousSibling;
|
|
8175
8175
|
(!o || a && a.nodeName == "BR" || o.isText && /[ \t\r\n\u000c]$/.test(o.text)) && (n = n.slice(1));
|
|
8176
8176
|
}
|
|
8177
|
-
n && this.insertNode(this.parser.schema.text(n), t), this.findInText(e);
|
|
8177
|
+
n && this.insertNode(this.parser.schema.text(n), t, !/\S/.test(n)), this.findInText(e);
|
|
8178
8178
|
} else
|
|
8179
8179
|
this.findInside(e);
|
|
8180
8180
|
}
|
|
@@ -8212,7 +8212,7 @@ class co {
|
|
|
8212
8212
|
}
|
|
8213
8213
|
// Called for ignored nodes
|
|
8214
8214
|
ignoreFallback(e, t) {
|
|
8215
|
-
e.nodeName == "BR" && (!this.top.type || !this.top.type.inlineContent) && this.findPlace(this.parser.schema.text("-"), t);
|
|
8215
|
+
e.nodeName == "BR" && (!this.top.type || !this.top.type.inlineContent) && this.findPlace(this.parser.schema.text("-"), t, !0);
|
|
8216
8216
|
}
|
|
8217
8217
|
// Run any style parser associated with the node's styles. Either
|
|
8218
8218
|
// return an updated array of marks, or null to indicate some of the
|
|
@@ -8244,7 +8244,7 @@ class co {
|
|
|
8244
8244
|
let s, o;
|
|
8245
8245
|
if (t.node)
|
|
8246
8246
|
if (o = this.parser.schema.nodes[t.node], o.isLeaf)
|
|
8247
|
-
this.insertNode(o.create(t.attrs), n) || this.leafFallback(e, n);
|
|
8247
|
+
this.insertNode(o.create(t.attrs), n, e.nodeName == "BR") || this.leafFallback(e, n);
|
|
8248
8248
|
else {
|
|
8249
8249
|
let u = this.enter(o, t.attrs || null, n, t.preserveWhitespace);
|
|
8250
8250
|
u && (s = !0, n = u);
|
|
@@ -8259,7 +8259,7 @@ class co {
|
|
|
8259
8259
|
else if (i)
|
|
8260
8260
|
this.addElement(e, n, i);
|
|
8261
8261
|
else if (t.getContent)
|
|
8262
|
-
this.findInside(e), t.getContent(e, this.parser.schema).forEach((u) => this.insertNode(u, n));
|
|
8262
|
+
this.findInside(e), t.getContent(e, this.parser.schema).forEach((u) => this.insertNode(u, n, !1));
|
|
8263
8263
|
else {
|
|
8264
8264
|
let u = e;
|
|
8265
8265
|
typeof t.contentElement == "string" ? u = e.querySelector(t.contentElement) : typeof t.contentElement == "function" ? u = t.contentElement(e) : t.contentElement && (u = t.contentElement), this.findAround(e, u, !0), this.addAll(u, n), this.findAround(e, u, !1);
|
|
@@ -8278,42 +8278,47 @@ class co {
|
|
|
8278
8278
|
// Try to find a way to fit the given node type into the current
|
|
8279
8279
|
// context. May add intermediate wrappers and/or leave non-solid
|
|
8280
8280
|
// nodes that we're in.
|
|
8281
|
-
findPlace(e, t) {
|
|
8282
|
-
let
|
|
8283
|
-
for (let
|
|
8284
|
-
let
|
|
8285
|
-
if (
|
|
8281
|
+
findPlace(e, t, n) {
|
|
8282
|
+
let i, s;
|
|
8283
|
+
for (let o = this.open, a = 0; o >= 0; o--) {
|
|
8284
|
+
let u = this.nodes[o], c = u.findWrapping(e);
|
|
8285
|
+
if (c && (!i || i.length > c.length + a) && (i = c, s = u, !c.length))
|
|
8286
8286
|
break;
|
|
8287
|
+
if (u.solid) {
|
|
8288
|
+
if (n)
|
|
8289
|
+
break;
|
|
8290
|
+
a += 2;
|
|
8291
|
+
}
|
|
8287
8292
|
}
|
|
8288
|
-
if (!
|
|
8293
|
+
if (!i)
|
|
8289
8294
|
return null;
|
|
8290
|
-
this.sync(
|
|
8291
|
-
for (let
|
|
8292
|
-
t = this.enterInner(
|
|
8295
|
+
this.sync(s);
|
|
8296
|
+
for (let o = 0; o < i.length; o++)
|
|
8297
|
+
t = this.enterInner(i[o], null, t, !1);
|
|
8293
8298
|
return t;
|
|
8294
8299
|
}
|
|
8295
8300
|
// Try to insert the given node, adjusting the context when needed.
|
|
8296
|
-
insertNode(e, t) {
|
|
8301
|
+
insertNode(e, t, n) {
|
|
8297
8302
|
if (e.isInline && this.needsBlock && !this.top.type) {
|
|
8298
|
-
let
|
|
8299
|
-
|
|
8303
|
+
let s = this.textblockFromContext();
|
|
8304
|
+
s && (t = this.enterInner(s, null, t));
|
|
8300
8305
|
}
|
|
8301
|
-
let
|
|
8302
|
-
if (
|
|
8306
|
+
let i = this.findPlace(e, t, n);
|
|
8307
|
+
if (i) {
|
|
8303
8308
|
this.closeExtra();
|
|
8304
|
-
let
|
|
8305
|
-
|
|
8306
|
-
let
|
|
8307
|
-
for (let
|
|
8308
|
-
(
|
|
8309
|
-
return
|
|
8309
|
+
let s = this.top;
|
|
8310
|
+
s.match && (s.match = s.match.matchType(e.type));
|
|
8311
|
+
let o = we.none;
|
|
8312
|
+
for (let a of i.concat(e.marks))
|
|
8313
|
+
(s.type ? s.type.allowsMarkType(a.type) : mo(a.type, e.type)) && (o = a.addToSet(o));
|
|
8314
|
+
return s.content.push(e.mark(o)), !0;
|
|
8310
8315
|
}
|
|
8311
8316
|
return !1;
|
|
8312
8317
|
}
|
|
8313
8318
|
// Try to start a node of the given type, adjusting the context when
|
|
8314
8319
|
// necessary.
|
|
8315
8320
|
enter(e, t, n, i) {
|
|
8316
|
-
let s = this.findPlace(e.create(t), n);
|
|
8321
|
+
let s = this.findPlace(e.create(t), n, !1);
|
|
8317
8322
|
return s && (s = this.enterInner(e, t, n, !0, i)), s;
|
|
8318
8323
|
}
|
|
8319
8324
|
// Open a node of the given type
|
|
@@ -9065,7 +9070,7 @@ class ft extends Oe {
|
|
|
9065
9070
|
return new ft(this.pos, this.mark);
|
|
9066
9071
|
}
|
|
9067
9072
|
}
|
|
9068
|
-
return new
|
|
9073
|
+
return new bt(this.pos, this.mark);
|
|
9069
9074
|
}
|
|
9070
9075
|
map(e) {
|
|
9071
9076
|
let t = e.mapResult(this.pos, 1);
|
|
@@ -9084,7 +9089,7 @@ class ft extends Oe {
|
|
|
9084
9089
|
}
|
|
9085
9090
|
}
|
|
9086
9091
|
Oe.jsonID("addNodeMark", ft);
|
|
9087
|
-
class
|
|
9092
|
+
class bt extends Oe {
|
|
9088
9093
|
/**
|
|
9089
9094
|
Create a mark-removing step.
|
|
9090
9095
|
*/
|
|
@@ -9104,7 +9109,7 @@ class kt extends Oe {
|
|
|
9104
9109
|
}
|
|
9105
9110
|
map(e) {
|
|
9106
9111
|
let t = e.mapResult(this.pos, 1);
|
|
9107
|
-
return t.deletedAfter ? null : new
|
|
9112
|
+
return t.deletedAfter ? null : new bt(t.pos, this.mark);
|
|
9108
9113
|
}
|
|
9109
9114
|
toJSON() {
|
|
9110
9115
|
return { stepType: "removeNodeMark", pos: this.pos, mark: this.mark.toJSON() };
|
|
@@ -9115,10 +9120,10 @@ class kt extends Oe {
|
|
|
9115
9120
|
static fromJSON(e, t) {
|
|
9116
9121
|
if (typeof t.pos != "number")
|
|
9117
9122
|
throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");
|
|
9118
|
-
return new
|
|
9123
|
+
return new bt(t.pos, e.markFromJSON(t.mark));
|
|
9119
9124
|
}
|
|
9120
9125
|
}
|
|
9121
|
-
Oe.jsonID("removeNodeMark",
|
|
9126
|
+
Oe.jsonID("removeNodeMark", bt);
|
|
9122
9127
|
class Ie extends Oe {
|
|
9123
9128
|
/**
|
|
9124
9129
|
The given `slice` should fit the 'gap' between `from` and
|
|
@@ -9143,7 +9148,7 @@ class Ie extends Oe {
|
|
|
9143
9148
|
}
|
|
9144
9149
|
map(e) {
|
|
9145
9150
|
let t = e.mapResult(this.from, 1), n = e.mapResult(this.to, -1);
|
|
9146
|
-
return t.deletedAcross && n.deletedAcross ? null : new Ie(t.pos, Math.max(t.pos, n.pos), this.slice);
|
|
9151
|
+
return t.deletedAcross && n.deletedAcross ? null : new Ie(t.pos, Math.max(t.pos, n.pos), this.slice, this.structure);
|
|
9147
9152
|
}
|
|
9148
9153
|
merge(e) {
|
|
9149
9154
|
if (!(e instanceof Ie) || e.structure || this.structure)
|
|
@@ -9310,7 +9315,7 @@ function ki(r, e, t, n = t.contentMatch, i = !0) {
|
|
|
9310
9315
|
function af(r, e, t) {
|
|
9311
9316
|
return (e == 0 || r.canReplace(e, r.childCount)) && (t == r.childCount || r.canReplace(0, t));
|
|
9312
9317
|
}
|
|
9313
|
-
function
|
|
9318
|
+
function Ip(r) {
|
|
9314
9319
|
let t = r.parent.content.cutByIndex(r.startIndex, r.endIndex);
|
|
9315
9320
|
for (let n = r.depth; ; --n) {
|
|
9316
9321
|
let i = r.$from.node(n), s = r.$from.index(n), o = r.$to.indexAfter(n);
|
|
@@ -9330,7 +9335,7 @@ function uf(r, e, t) {
|
|
|
9330
9335
|
v || i.after(A + 1) < i.end(A) ? (v = !0, g = Q.from(i.node(A).copy(g)), E++) : c++;
|
|
9331
9336
|
r.step(new $e(u, c, o, a, new ae(l.append(g), h, E), l.size - h, !0));
|
|
9332
9337
|
}
|
|
9333
|
-
function
|
|
9338
|
+
function Rp(r, e, t = null, n = r) {
|
|
9334
9339
|
let i = lf(r, e), s = i && cf(n, e);
|
|
9335
9340
|
return s ? i.map(wo).concat({ type: e, attrs: t }).concat(s.map(wo)) : null;
|
|
9336
9341
|
}
|
|
@@ -9378,13 +9383,13 @@ function df(r, e, t, n, i) {
|
|
|
9378
9383
|
let E = n.whitespace == "pre", A = !!n.contentMatch.matchType(n.schema.linebreakReplacement);
|
|
9379
9384
|
E && !A ? c = !1 : !E && A && (c = !0);
|
|
9380
9385
|
}
|
|
9381
|
-
c === !1 &&
|
|
9386
|
+
c === !1 && za(r, o, a, s), ki(r, r.mapping.slice(s).map(a, 1), n, void 0, c === null);
|
|
9382
9387
|
let l = r.mapping.slice(s), h = l.map(a, 1), g = l.map(a + o.nodeSize, 1);
|
|
9383
|
-
return r.step(new $e(h, g, h + 1, g - 1, new ae(Q.from(n.create(u, null, o.marks)), 0, 0), 1, !0)), c === !0 &&
|
|
9388
|
+
return r.step(new $e(h, g, h + 1, g - 1, new ae(Q.from(n.create(u, null, o.marks)), 0, 0), 1, !0)), c === !0 && Va(r, o, a, s), !1;
|
|
9384
9389
|
}
|
|
9385
9390
|
});
|
|
9386
9391
|
}
|
|
9387
|
-
function
|
|
9392
|
+
function Va(r, e, t, n) {
|
|
9388
9393
|
e.forEach((i, s) => {
|
|
9389
9394
|
if (i.isText) {
|
|
9390
9395
|
let o, a = /\r?\n|\r/g;
|
|
@@ -9395,7 +9400,7 @@ function za(r, e, t, n) {
|
|
|
9395
9400
|
}
|
|
9396
9401
|
});
|
|
9397
9402
|
}
|
|
9398
|
-
function
|
|
9403
|
+
function za(r, e, t, n) {
|
|
9399
9404
|
e.forEach((i, s) => {
|
|
9400
9405
|
if (i.type == i.type.schema.linebreakReplacement) {
|
|
9401
9406
|
let o = r.mapping.slice(n).map(t + 1 + s);
|
|
@@ -9420,7 +9425,7 @@ function pf(r, e, t, n, i) {
|
|
|
9420
9425
|
throw new RangeError("Invalid content for node type " + t.name);
|
|
9421
9426
|
r.step(new $e(e, e + s.nodeSize, e + 1, e + s.nodeSize - 1, new ae(Q.from(o), 0, 0), 1, !0));
|
|
9422
9427
|
}
|
|
9423
|
-
function
|
|
9428
|
+
function Pp(r, e, t = 1, n) {
|
|
9424
9429
|
let i = r.resolve(e), s = i.depth - t, o = n && n[n.length - 1] || i.parent;
|
|
9425
9430
|
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
9431
|
return !1;
|
|
@@ -9446,7 +9451,7 @@ function hf(r, e, t = 1, n) {
|
|
|
9446
9451
|
}
|
|
9447
9452
|
r.step(new Ie(e, e, new ae(s.append(o), t, t), !0));
|
|
9448
9453
|
}
|
|
9449
|
-
function
|
|
9454
|
+
function Op(r, e) {
|
|
9450
9455
|
let t = r.resolve(e), n = t.index();
|
|
9451
9456
|
return Ga(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(n, n + 1);
|
|
9452
9457
|
}
|
|
@@ -9463,7 +9468,7 @@ function gf(r, e) {
|
|
|
9463
9468
|
function Ga(r, e) {
|
|
9464
9469
|
return !!(r && e && !r.isLeaf && gf(r, e));
|
|
9465
9470
|
}
|
|
9466
|
-
function
|
|
9471
|
+
function Lp(r, e, t = -1) {
|
|
9467
9472
|
let n = r.resolve(e);
|
|
9468
9473
|
for (let i = n.depth; ; i--) {
|
|
9469
9474
|
let s, o, a = n.index(i);
|
|
@@ -9483,13 +9488,13 @@ function wf(r, e, t) {
|
|
|
9483
9488
|
let a = r.steps.length;
|
|
9484
9489
|
if (n === !1) {
|
|
9485
9490
|
let l = r.doc.resolve(e + t);
|
|
9486
|
-
|
|
9491
|
+
za(r, l.node(), l.before(), a);
|
|
9487
9492
|
}
|
|
9488
9493
|
o.inlineContent && ki(r, e + t - 1, o, s.node().contentMatchAt(s.index()), n == null);
|
|
9489
9494
|
let u = r.mapping.slice(a), c = u.map(e - t);
|
|
9490
9495
|
if (r.step(new Ie(c, u.map(e + t, -1), ae.empty, !0)), n === !0) {
|
|
9491
9496
|
let l = r.doc.resolve(c);
|
|
9492
|
-
|
|
9497
|
+
Va(r, l.node(), l.before(), r.steps.length);
|
|
9493
9498
|
}
|
|
9494
9499
|
return r;
|
|
9495
9500
|
}
|
|
@@ -9515,7 +9520,7 @@ function yf(r, e, t) {
|
|
|
9515
9520
|
}
|
|
9516
9521
|
return null;
|
|
9517
9522
|
}
|
|
9518
|
-
function
|
|
9523
|
+
function _p(r, e, t) {
|
|
9519
9524
|
let n = r.resolve(e);
|
|
9520
9525
|
if (!t.content.size)
|
|
9521
9526
|
return e;
|
|
@@ -9814,7 +9819,7 @@ function Ka(r, e) {
|
|
|
9814
9819
|
}
|
|
9815
9820
|
return t;
|
|
9816
9821
|
}
|
|
9817
|
-
class
|
|
9822
|
+
class Bt extends Oe {
|
|
9818
9823
|
/**
|
|
9819
9824
|
Construct an attribute step.
|
|
9820
9825
|
*/
|
|
@@ -9836,11 +9841,11 @@ class Ft extends Oe {
|
|
|
9836
9841
|
return je.empty;
|
|
9837
9842
|
}
|
|
9838
9843
|
invert(e) {
|
|
9839
|
-
return new
|
|
9844
|
+
return new Bt(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
|
|
9840
9845
|
}
|
|
9841
9846
|
map(e) {
|
|
9842
9847
|
let t = e.mapResult(this.pos, 1);
|
|
9843
|
-
return t.deletedAfter ? null : new
|
|
9848
|
+
return t.deletedAfter ? null : new Bt(t.pos, this.attr, this.value);
|
|
9844
9849
|
}
|
|
9845
9850
|
toJSON() {
|
|
9846
9851
|
return { stepType: "attr", pos: this.pos, attr: this.attr, value: this.value };
|
|
@@ -9848,10 +9853,10 @@ class Ft extends Oe {
|
|
|
9848
9853
|
static fromJSON(e, t) {
|
|
9849
9854
|
if (typeof t.pos != "number" || typeof t.attr != "string")
|
|
9850
9855
|
throw new RangeError("Invalid input for AttrStep.fromJSON");
|
|
9851
|
-
return new
|
|
9856
|
+
return new Bt(t.pos, t.attr, t.value);
|
|
9852
9857
|
}
|
|
9853
9858
|
}
|
|
9854
|
-
Oe.jsonID("attr",
|
|
9859
|
+
Oe.jsonID("attr", Bt);
|
|
9855
9860
|
class Wt extends Oe {
|
|
9856
9861
|
/**
|
|
9857
9862
|
Construct an attribute step.
|
|
@@ -10052,7 +10057,7 @@ class Sf {
|
|
|
10052
10057
|
to set attributes on the document itself.
|
|
10053
10058
|
*/
|
|
10054
10059
|
setNodeAttribute(e, t, n) {
|
|
10055
|
-
return this.step(new
|
|
10060
|
+
return this.step(new Bt(e, t, n)), this;
|
|
10056
10061
|
}
|
|
10057
10062
|
/**
|
|
10058
10063
|
Set a single attribute on the document to a new value.
|
|
@@ -10067,18 +10072,23 @@ class Sf {
|
|
|
10067
10072
|
return this.step(new ft(e, t)), this;
|
|
10068
10073
|
}
|
|
10069
10074
|
/**
|
|
10070
|
-
Remove a mark (or
|
|
10075
|
+
Remove a mark (or all marks of the given type) from the node at
|
|
10071
10076
|
position `pos`.
|
|
10072
10077
|
*/
|
|
10073
10078
|
removeNodeMark(e, t) {
|
|
10074
|
-
|
|
10075
|
-
|
|
10076
|
-
|
|
10077
|
-
|
|
10078
|
-
|
|
10079
|
-
|
|
10079
|
+
let n = this.doc.nodeAt(e);
|
|
10080
|
+
if (!n)
|
|
10081
|
+
throw new RangeError("No node at position " + e);
|
|
10082
|
+
if (t instanceof we)
|
|
10083
|
+
t.isInSet(n.marks) && this.step(new bt(e, t));
|
|
10084
|
+
else {
|
|
10085
|
+
let i = n.marks, s, o = [];
|
|
10086
|
+
for (; s = t.isInSet(i); )
|
|
10087
|
+
o.push(new bt(e, s)), i = s.removeFromSet(i);
|
|
10088
|
+
for (let a = o.length - 1; a >= 0; a--)
|
|
10089
|
+
this.step(o[a]);
|
|
10080
10090
|
}
|
|
10081
|
-
return this
|
|
10091
|
+
return this;
|
|
10082
10092
|
}
|
|
10083
10093
|
/**
|
|
10084
10094
|
Split the node at the given position, and optionally, if `depth` is
|
|
@@ -10210,11 +10220,11 @@ class Ee {
|
|
|
10210
10220
|
found.
|
|
10211
10221
|
*/
|
|
10212
10222
|
static findFrom(e, t, n = !1) {
|
|
10213
|
-
let i = e.parent.inlineContent ? new tt(e) :
|
|
10223
|
+
let i = e.parent.inlineContent ? new tt(e) : vt(e.node(0), e.parent, e.pos, e.index(), t, n);
|
|
10214
10224
|
if (i)
|
|
10215
10225
|
return i;
|
|
10216
10226
|
for (let s = e.depth - 1; s >= 0; s--) {
|
|
10217
|
-
let o = t < 0 ?
|
|
10227
|
+
let o = t < 0 ? vt(e.node(0), e.node(s), e.before(s + 1), e.index(s), t, n) : vt(e.node(0), e.node(s), e.after(s + 1), e.index(s) + 1, t, n);
|
|
10218
10228
|
if (o)
|
|
10219
10229
|
return o;
|
|
10220
10230
|
}
|
|
@@ -10235,14 +10245,14 @@ class Ee {
|
|
|
10235
10245
|
exists.
|
|
10236
10246
|
*/
|
|
10237
10247
|
static atStart(e) {
|
|
10238
|
-
return
|
|
10248
|
+
return vt(e, e, 0, 0, 1) || new at(e);
|
|
10239
10249
|
}
|
|
10240
10250
|
/**
|
|
10241
10251
|
Find the cursor or leaf node selection closest to the end of the
|
|
10242
10252
|
given document.
|
|
10243
10253
|
*/
|
|
10244
10254
|
static atEnd(e) {
|
|
10245
|
-
return
|
|
10255
|
+
return vt(e, e, e.content.size, e.childCount, -1) || new at(e);
|
|
10246
10256
|
}
|
|
10247
10257
|
/**
|
|
10248
10258
|
Deserialize the JSON representation of a selection. Must be
|
|
@@ -10481,7 +10491,7 @@ const Ff = {
|
|
|
10481
10491
|
return new at(r);
|
|
10482
10492
|
}
|
|
10483
10493
|
};
|
|
10484
|
-
function
|
|
10494
|
+
function vt(r, e, t, n, i, s = !1) {
|
|
10485
10495
|
if (e.inlineContent)
|
|
10486
10496
|
return tt.create(r, t);
|
|
10487
10497
|
for (let o = n - (i > 0 ? 0 : 1); i > 0 ? o < e.childCount : o >= 0; o += i) {
|
|
@@ -10490,7 +10500,7 @@ function Dt(r, e, t, n, i, s = !1) {
|
|
|
10490
10500
|
if (!s && We.isSelectable(a))
|
|
10491
10501
|
return We.create(r, t - (i < 0 ? a.nodeSize : 0));
|
|
10492
10502
|
} else {
|
|
10493
|
-
let u =
|
|
10503
|
+
let u = vt(r, a, t + i, i < 0 ? a.childCount : 0, i, s);
|
|
10494
10504
|
if (u)
|
|
10495
10505
|
return u;
|
|
10496
10506
|
}
|
|
@@ -10713,7 +10723,7 @@ class si {
|
|
|
10713
10723
|
});
|
|
10714
10724
|
}
|
|
10715
10725
|
}
|
|
10716
|
-
class
|
|
10726
|
+
class Ct {
|
|
10717
10727
|
/**
|
|
10718
10728
|
@internal
|
|
10719
10729
|
*/
|
|
@@ -10788,7 +10798,7 @@ class Et {
|
|
|
10788
10798
|
applyInner(e) {
|
|
10789
10799
|
if (!e.before.eq(this.doc))
|
|
10790
10800
|
throw new RangeError("Applying a mismatched transaction");
|
|
10791
|
-
let t = new
|
|
10801
|
+
let t = new Ct(this.config), n = this.config.fields;
|
|
10792
10802
|
for (let i = 0; i < n.length; i++) {
|
|
10793
10803
|
let s = n[i];
|
|
10794
10804
|
t[s.name] = s.apply(e, this[s.name], this, t);
|
|
@@ -10805,7 +10815,7 @@ class Et {
|
|
|
10805
10815
|
Create a new state.
|
|
10806
10816
|
*/
|
|
10807
10817
|
static create(e) {
|
|
10808
|
-
let t = new si(e.doc ? e.doc.type.schema : e.schema, e.plugins), n = new
|
|
10818
|
+
let t = new si(e.doc ? e.doc.type.schema : e.schema, e.plugins), n = new Ct(t);
|
|
10809
10819
|
for (let i = 0; i < t.fields.length; i++)
|
|
10810
10820
|
n[t.fields[i].name] = t.fields[i].init(e, n);
|
|
10811
10821
|
return n;
|
|
@@ -10819,7 +10829,7 @@ class Et {
|
|
|
10819
10829
|
configuration object..
|
|
10820
10830
|
*/
|
|
10821
10831
|
reconfigure(e) {
|
|
10822
|
-
let t = new si(this.schema, e.plugins), n = t.fields, i = new
|
|
10832
|
+
let t = new si(this.schema, e.plugins), n = t.fields, i = new Ct(t);
|
|
10823
10833
|
for (let s = 0; s < n.length; s++) {
|
|
10824
10834
|
let o = n[s].name;
|
|
10825
10835
|
i[o] = this.hasOwnProperty(o) ? this[o] : n[s].init(e, i);
|
|
@@ -10856,7 +10866,7 @@ class Et {
|
|
|
10856
10866
|
throw new RangeError("Invalid input for EditorState.fromJSON");
|
|
10857
10867
|
if (!e.schema)
|
|
10858
10868
|
throw new RangeError("Required config field 'schema' missing");
|
|
10859
|
-
let i = new si(e.schema, e.plugins), s = new
|
|
10869
|
+
let i = new si(e.schema, e.plugins), s = new Ct(i);
|
|
10860
10870
|
return i.fields.forEach((o) => {
|
|
10861
10871
|
if (o.name == "doc")
|
|
10862
10872
|
s.doc = rt.fromJSON(e.schema, t.doc);
|
|
@@ -10885,7 +10895,7 @@ function Xa(r, e, t) {
|
|
|
10885
10895
|
}
|
|
10886
10896
|
return t;
|
|
10887
10897
|
}
|
|
10888
|
-
class
|
|
10898
|
+
class qp {
|
|
10889
10899
|
/**
|
|
10890
10900
|
Create a plugin.
|
|
10891
10901
|
*/
|
|
@@ -10903,7 +10913,7 @@ const oi = /* @__PURE__ */ Object.create(null);
|
|
|
10903
10913
|
function Ya(r) {
|
|
10904
10914
|
return r in oi ? r + "$" + ++oi[r] : (oi[r] = 0, r + "$");
|
|
10905
10915
|
}
|
|
10906
|
-
class
|
|
10916
|
+
class Mp {
|
|
10907
10917
|
/**
|
|
10908
10918
|
Create a plugin key.
|
|
10909
10919
|
*/
|
|
@@ -10924,7 +10934,7 @@ class qp {
|
|
|
10924
10934
|
return e[this.key];
|
|
10925
10935
|
}
|
|
10926
10936
|
}
|
|
10927
|
-
const Za = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`),
|
|
10937
|
+
const Za = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Up = (r) => Za(r), jp = Object.freeze({
|
|
10928
10938
|
RESOLVED: "resolved",
|
|
10929
10939
|
NEW: "new",
|
|
10930
10940
|
ADD: "add",
|
|
@@ -10937,7 +10947,7 @@ const Za = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Mp = (r) =>
|
|
|
10937
10947
|
// Tracked changes
|
|
10938
10948
|
CHANGE_ACCEPTED: "change-accepted",
|
|
10939
10949
|
CHANGE_REJECTED: "change-rejected"
|
|
10940
|
-
}),
|
|
10950
|
+
}), Hp = {
|
|
10941
10951
|
mounted(r, e, t) {
|
|
10942
10952
|
const n = (i) => {
|
|
10943
10953
|
r.contains(i.target) || e.value(i);
|
|
@@ -10948,20 +10958,20 @@ const Za = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Mp = (r) =>
|
|
|
10948
10958
|
document.removeEventListener("click", r.__clickOutsideHandler), delete r.__clickOutsideHandler;
|
|
10949
10959
|
}
|
|
10950
10960
|
};
|
|
10951
|
-
function
|
|
10961
|
+
function Vp(r, e = null, ...t) {
|
|
10952
10962
|
return typeof r == "function" ? e ? r.bind(e)(...t) : r(...t) : r;
|
|
10953
10963
|
}
|
|
10954
10964
|
function zp(r = {}) {
|
|
10955
10965
|
return Object.keys(r).length === 0 && r.constructor === Object;
|
|
10956
10966
|
}
|
|
10957
|
-
const
|
|
10967
|
+
const Gp = () => typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1, Wp = () => ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(
|
|
10958
10968
|
navigator.platform
|
|
10959
10969
|
), Nf = (r) => Object.prototype.toString.call(r) === "[object RegExp]";
|
|
10960
10970
|
function If(r, e, t = { strict: !0 }) {
|
|
10961
10971
|
const n = Object.keys(e);
|
|
10962
10972
|
return n.length ? n.every((i) => t.strict ? e[i] === r[i] : Nf(e[i]) ? e[i].test(r[i]) : e[i] === r[i]) : !0;
|
|
10963
10973
|
}
|
|
10964
|
-
function
|
|
10974
|
+
function Jp(r, e) {
|
|
10965
10975
|
const n = typeof e == "string" ? [e] : e;
|
|
10966
10976
|
return Object.keys(r).reduce((i, s) => (n.includes(s) || (i[s] = r[s]), i), {});
|
|
10967
10977
|
}
|
|
@@ -10970,7 +10980,7 @@ function Of(r = "0") {
|
|
|
10970
10980
|
const e = r.toString() || "0", t = Number.parseFloat(e), i = (e.match(Rf)?.[1] ?? "").toLowerCase();
|
|
10971
10981
|
return [t, Pf.includes(i) ? i : null];
|
|
10972
10982
|
}
|
|
10973
|
-
function
|
|
10983
|
+
function $p(r = 0, e = 0, t = 0) {
|
|
10974
10984
|
return Math.min(Math.max(r, e), t);
|
|
10975
10985
|
}
|
|
10976
10986
|
function It(r) {
|
|
@@ -11034,12 +11044,12 @@ const qf = async (r) => {
|
|
|
11034
11044
|
s[o] = n.charCodeAt(o);
|
|
11035
11045
|
return s.buffer;
|
|
11036
11046
|
}
|
|
11037
|
-
const t =
|
|
11047
|
+
const t = St.from(e, "base64");
|
|
11038
11048
|
return t.buffer.slice(
|
|
11039
11049
|
t.byteOffset,
|
|
11040
11050
|
t.byteOffset + t.byteLength
|
|
11041
11051
|
);
|
|
11042
|
-
},
|
|
11052
|
+
}, Kp = (r) => {
|
|
11043
11053
|
const n = new window.DOMParser().parseFromString(r, "text/xml").querySelectorAll("Default");
|
|
11044
11054
|
return Array.from(n).map((i) => i.getAttribute("Extension"));
|
|
11045
11055
|
}, Mf = (r) => (/* @__PURE__ */ new Map([
|
|
@@ -11075,10 +11085,10 @@ function Uf(r) {
|
|
|
11075
11085
|
const jf = (r) => {
|
|
11076
11086
|
const e = Number(r).toString(16);
|
|
11077
11087
|
return e.length === 1 ? "0" + e : e;
|
|
11078
|
-
}, Hf = (r) => "#" + r.match(/\d+/g).map(jf).join(""),
|
|
11088
|
+
}, Hf = (r) => "#" + r.match(/\d+/g).map(jf).join(""), Xp = (r, e, t = "", n = !1) => {
|
|
11079
11089
|
let [i, s] = Of(r);
|
|
11080
11090
|
return Number.isNaN(i) || i === 0 ? {} : t === "atLeast" && i < 1 ? {} : (s = s || e, i += s ? 4 : 0.2, n ? { "line-height": `${i}${s}` } : `line-height: ${i}${s}`);
|
|
11081
|
-
},
|
|
11091
|
+
}, Vf = (r, e) => {
|
|
11082
11092
|
const t = new Uint8Array(r), n = e.replace(/[-{}]/g, "");
|
|
11083
11093
|
if (n.length !== 32) {
|
|
11084
11094
|
console.error("Invalid GUID");
|
|
@@ -11107,7 +11117,7 @@ function Ri(r = 8) {
|
|
|
11107
11117
|
function ru() {
|
|
11108
11118
|
return Math.floor(Math.random() * 2147483647).toString(16).toUpperCase().padStart(8, "0");
|
|
11109
11119
|
}
|
|
11110
|
-
const
|
|
11120
|
+
const zf = {
|
|
11111
11121
|
"xmlns:wpc": "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
|
|
11112
11122
|
"xmlns:cx": "http://schemas.microsoft.com/office/drawing/2014/chartex",
|
|
11113
11123
|
"xmlns:cx1": "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",
|
|
@@ -12303,7 +12313,7 @@ const Vf = {
|
|
|
12303
12313
|
]
|
|
12304
12314
|
}
|
|
12305
12315
|
]
|
|
12306
|
-
},
|
|
12316
|
+
}, Et = {
|
|
12307
12317
|
COMMENTS_XML_DEF: $f,
|
|
12308
12318
|
COMMENTS_EXTENDED_XML_DEF: Kf,
|
|
12309
12319
|
COMMENTS_EXTENSIBLE_XML_DEF: Xf,
|
|
@@ -13682,11 +13692,11 @@ const rd = (r, e) => ({
|
|
|
13682
13692
|
};
|
|
13683
13693
|
}, ld = (r) => {
|
|
13684
13694
|
const e = He(r);
|
|
13685
|
-
return e["word/comments.xml"] =
|
|
13695
|
+
return e["word/comments.xml"] = Et.COMMENTS_XML_DEF, e["word/commentsExtended.xml"] = Et.COMMENTS_EXTENDED_XML_DEF, e["word/commentsExtensible.xml"] = Et.COMMENTS_EXTENSIBLE_XML_DEF, e["word/commentsIds.xml"] = Et.COMMENTS_IDS_XML_DEF, e["[Content_Types].xml"] = Et.CONTENT_TYPES, e;
|
|
13686
13696
|
}, cd = (r) => {
|
|
13687
13697
|
const e = He(r);
|
|
13688
13698
|
return delete e["word/comments.xml"], delete e["word/commentsExtended.xml"], delete e["word/commentsExtensible.xml"], delete e["word/commentsIds.xml"], e;
|
|
13689
|
-
}, sr = (r) => ({ ...
|
|
13699
|
+
}, sr = (r) => ({ ...Et.DOCUMENT_RELS_XML_DEF.elements[0].elements.find((n) => n.attributes.Target === r) }), fd = ({
|
|
13690
13700
|
convertedXml: r,
|
|
13691
13701
|
defs: e,
|
|
13692
13702
|
commentsWithParaIds: t,
|
|
@@ -13739,24 +13749,24 @@ function qt(r) {
|
|
|
13739
13749
|
doc: gd,
|
|
13740
13750
|
body: pd,
|
|
13741
13751
|
paragraph: su,
|
|
13742
|
-
text:
|
|
13752
|
+
text: yd,
|
|
13743
13753
|
bulletList: Fo,
|
|
13744
13754
|
orderedList: Fo,
|
|
13745
|
-
lineBreak:
|
|
13746
|
-
table:
|
|
13747
|
-
tableRow:
|
|
13748
|
-
tableCell:
|
|
13749
|
-
bookmarkStart:
|
|
13750
|
-
fieldAnnotation:
|
|
13751
|
-
tab:
|
|
13755
|
+
lineBreak: Sd,
|
|
13756
|
+
table: Td,
|
|
13757
|
+
tableRow: Rd,
|
|
13758
|
+
tableCell: Od,
|
|
13759
|
+
bookmarkStart: qd,
|
|
13760
|
+
fieldAnnotation: Gd,
|
|
13761
|
+
tab: Bd,
|
|
13752
13762
|
image: uu,
|
|
13753
|
-
hardBreak:
|
|
13763
|
+
hardBreak: Wd,
|
|
13754
13764
|
commentRangeStart: () => So(r, "Start"),
|
|
13755
13765
|
commentRangeEnd: () => So(r, "End"),
|
|
13756
13766
|
commentReference: () => null,
|
|
13757
|
-
shapeContainer:
|
|
13758
|
-
shapeTextbox:
|
|
13759
|
-
contentBlock:
|
|
13767
|
+
shapeContainer: Jd,
|
|
13768
|
+
shapeTextbox: $d,
|
|
13769
|
+
contentBlock: Kd
|
|
13760
13770
|
};
|
|
13761
13771
|
return t[e] ? t[e](r) : (console.error("No translation function found for node type:", e), null);
|
|
13762
13772
|
}
|
|
@@ -13776,7 +13786,7 @@ function pd(r) {
|
|
|
13776
13786
|
}
|
|
13777
13787
|
function su(r) {
|
|
13778
13788
|
const e = dt(r), t = e.find((s) => s.name === "htmlAnnotation");
|
|
13779
|
-
if (
|
|
13789
|
+
if (t)
|
|
13780
13790
|
return t.elements;
|
|
13781
13791
|
const n = hd(r.node);
|
|
13782
13792
|
n && e.unshift(n);
|
|
@@ -13829,7 +13839,7 @@ function hd(r) {
|
|
|
13829
13839
|
if (o) {
|
|
13830
13840
|
const A = {
|
|
13831
13841
|
name: "w:jc",
|
|
13832
|
-
attributes: { "w:val": o }
|
|
13842
|
+
attributes: { "w:val": o === "justify" ? "both" : o }
|
|
13833
13843
|
};
|
|
13834
13844
|
t.push(A);
|
|
13835
13845
|
}
|
|
@@ -13867,7 +13877,7 @@ function gd(r) {
|
|
|
13867
13877
|
return [{
|
|
13868
13878
|
name: "w:document",
|
|
13869
13879
|
elements: [qt({ ...r, node: e })],
|
|
13870
|
-
attributes:
|
|
13880
|
+
attributes: zf
|
|
13871
13881
|
}, r];
|
|
13872
13882
|
}
|
|
13873
13883
|
function dt(r) {
|
|
@@ -13875,10 +13885,29 @@ function dt(r) {
|
|
|
13875
13885
|
if (!e) return [];
|
|
13876
13886
|
const t = [];
|
|
13877
13887
|
return e.forEach((n) => {
|
|
13878
|
-
|
|
13879
|
-
i instanceof Array ? t.push(...i) : t.push(i);
|
|
13888
|
+
let i = qt({ ...r, node: n });
|
|
13889
|
+
i = wd(i), i instanceof Array ? t.push(...i) : t.push(i);
|
|
13880
13890
|
}), t.filter((n) => n);
|
|
13881
13891
|
}
|
|
13892
|
+
const wd = (r) => {
|
|
13893
|
+
if (!r) return r;
|
|
13894
|
+
const e = r.elements?.some((i) => i.name === "w:r"), t = r.elements?.some((i) => i.name === "w:sdt");
|
|
13895
|
+
let n = r;
|
|
13896
|
+
if (e && t) {
|
|
13897
|
+
const i = r.elements.filter((a) => a.name === "w:sdt"), s = r.elements.filter((a) => a.name !== "w:sdt");
|
|
13898
|
+
n = [
|
|
13899
|
+
...s.filter((a) => a.name === "w:r").every((a) => a.elements.filter((c) => c.name === "w:t")?.every((c) => c.elements[0].text.trim().length > 0)) ? [{
|
|
13900
|
+
...r,
|
|
13901
|
+
elements: s
|
|
13902
|
+
}] : [],
|
|
13903
|
+
{
|
|
13904
|
+
name: "w:p",
|
|
13905
|
+
elements: i
|
|
13906
|
+
}
|
|
13907
|
+
];
|
|
13908
|
+
}
|
|
13909
|
+
return n;
|
|
13910
|
+
};
|
|
13882
13911
|
function Br(r, e, t) {
|
|
13883
13912
|
const i = /^\s|\s$/.test(r) ? "preserve" : null, s = i ? { "xml:space": i } : null, o = [], a = kr(e);
|
|
13884
13913
|
if (o.push({
|
|
@@ -13914,14 +13943,14 @@ function Br(r, e, t) {
|
|
|
13914
13943
|
}
|
|
13915
13944
|
return Zt(o, a);
|
|
13916
13945
|
}
|
|
13917
|
-
function
|
|
13946
|
+
function yd(r) {
|
|
13918
13947
|
const { node: e } = r, t = [xr, Pi];
|
|
13919
|
-
if (e.marks?.some((a) => t.includes(a.type))) return
|
|
13920
|
-
if (e.marks?.some((a) => a.type === "link")) return
|
|
13948
|
+
if (e.marks?.some((a) => t.includes(a.type))) return xd(r);
|
|
13949
|
+
if (e.marks?.some((a) => a.type === "link")) return Ad(r);
|
|
13921
13950
|
const { text: s, marks: o = [] } = e;
|
|
13922
13951
|
return Br(s, o, r);
|
|
13923
13952
|
}
|
|
13924
|
-
function
|
|
13953
|
+
function bd(r) {
|
|
13925
13954
|
const e = r.find((t) => t.type === Oi);
|
|
13926
13955
|
if (e)
|
|
13927
13956
|
return {
|
|
@@ -13936,8 +13965,8 @@ function yd(r) {
|
|
|
13936
13965
|
elements: e.attrs.before.map((n) => kr([n])).filter((n) => n !== void 0)
|
|
13937
13966
|
};
|
|
13938
13967
|
}
|
|
13939
|
-
function
|
|
13940
|
-
const { node: e } = r, t = e.marks, n = [xr, Pi, Oi], i = t.find((c) => n.includes(c.type)), s = i.type === xr, o =
|
|
13968
|
+
function xd(r) {
|
|
13969
|
+
const { node: e } = r, t = e.marks, n = [xr, Pi, Oi], i = t.find((c) => n.includes(c.type)), s = i.type === xr, o = bd(t);
|
|
13941
13970
|
e.marks = t.filter((c) => !n.includes(c.type)), o && e.marks.push(o);
|
|
13942
13971
|
const a = qt({ ...r, node: e });
|
|
13943
13972
|
if (!s) {
|
|
@@ -13975,7 +14004,7 @@ function kr(r = []) {
|
|
|
13975
14004
|
return Bo(i);
|
|
13976
14005
|
}) : Bo(e));
|
|
13977
14006
|
}
|
|
13978
|
-
function
|
|
14007
|
+
function Ad(r) {
|
|
13979
14008
|
const { node: e } = r, t = e.marks.find((a) => a.type === "link"), n = t.attrs.href;
|
|
13980
14009
|
let i = t.attrs.rId;
|
|
13981
14010
|
i || (i = au(r, n)), e.marks = e.marks.filter((a) => a.type !== "link");
|
|
@@ -14015,9 +14044,9 @@ function To(r, e) {
|
|
|
14015
14044
|
return r.relationships.push(n), t;
|
|
14016
14045
|
}
|
|
14017
14046
|
function Fo(r) {
|
|
14018
|
-
const { type: e } = r.node, t =
|
|
14047
|
+
const { type: e } = r.node, t = Cd(r), n = [];
|
|
14019
14048
|
return t.forEach((i) => {
|
|
14020
|
-
const { level: s, listType: o, pPrs: a, content: u, attrs: c = {} } = i, g = (i.attrs.numId || i.listId) ??
|
|
14049
|
+
const { level: s, listType: o, pPrs: a, content: u, attrs: c = {} } = i, g = (i.attrs.numId || i.listId) ?? Dd(r, o), E = Ed(s, g, a);
|
|
14021
14050
|
u.forEach((A, v) => {
|
|
14022
14051
|
const F = Object.assign({}, A);
|
|
14023
14052
|
F.attrs = {
|
|
@@ -14053,8 +14082,8 @@ function Fo(r) {
|
|
|
14053
14082
|
});
|
|
14054
14083
|
}), n;
|
|
14055
14084
|
}
|
|
14056
|
-
function
|
|
14057
|
-
const t =
|
|
14085
|
+
function Dd(r, e) {
|
|
14086
|
+
const t = vd(r.converter?.numbering?.definitions), n = e === "bullet" ? td : ed, i = t, s = n.attributes["w:abstractNumId"], o = {
|
|
14058
14087
|
type: "element",
|
|
14059
14088
|
name: "w:num",
|
|
14060
14089
|
attributes: {
|
|
@@ -14067,8 +14096,8 @@ function Ad(r, e) {
|
|
|
14067
14096
|
};
|
|
14068
14097
|
return r.converter.numbering.definitions[i] = o, i;
|
|
14069
14098
|
}
|
|
14070
|
-
const
|
|
14071
|
-
function
|
|
14099
|
+
const vd = (r) => !r || !Object.keys(r).length ? 0 : Math.max(...Object.keys(r).map((t) => parseInt(t, 10))) + 1;
|
|
14100
|
+
function Ed(r, e, t = []) {
|
|
14072
14101
|
return {
|
|
14073
14102
|
name: "w:pPr",
|
|
14074
14103
|
type: "element",
|
|
@@ -14093,7 +14122,7 @@ function vd(r, e, t = []) {
|
|
|
14093
14122
|
]
|
|
14094
14123
|
};
|
|
14095
14124
|
}
|
|
14096
|
-
function
|
|
14125
|
+
function Cd({ node: r }) {
|
|
14097
14126
|
const { content: e, attrs: t = {} } = r, { listId: n, syncId: i } = r.attrs || {}, s = r.attrs["list-style-type"], { attributes: o = {} } = t, a = o?.parentAttributes?.paragraphProperties?.elements?.filter((l) => l.name !== "w:numPr") || [], u = [];
|
|
14098
14127
|
function c(l, h = 0) {
|
|
14099
14128
|
!l || !l.length || l.forEach((g) => {
|
|
@@ -14114,22 +14143,22 @@ function Ed({ node: r }) {
|
|
|
14114
14143
|
}
|
|
14115
14144
|
return c(e), u;
|
|
14116
14145
|
}
|
|
14117
|
-
function
|
|
14146
|
+
function Sd(r) {
|
|
14118
14147
|
const e = {}, { lineBreakType: t } = r.node?.attrs || {};
|
|
14119
14148
|
return t && (e["w:type"] = t), {
|
|
14120
14149
|
name: "w:br",
|
|
14121
14150
|
attributes: e
|
|
14122
14151
|
};
|
|
14123
14152
|
}
|
|
14124
|
-
function
|
|
14125
|
-
r.node =
|
|
14126
|
-
const e = dt(r), t =
|
|
14153
|
+
function Td(r) {
|
|
14154
|
+
r.node = Fd(r.node, r);
|
|
14155
|
+
const e = dt(r), t = kd(r.node), n = Id(r.node, r);
|
|
14127
14156
|
return e.unshift(t), e.unshift(n), {
|
|
14128
14157
|
name: "w:tbl",
|
|
14129
14158
|
elements: e
|
|
14130
14159
|
};
|
|
14131
14160
|
}
|
|
14132
|
-
function
|
|
14161
|
+
function Fd(r, { editorSchema: e }) {
|
|
14133
14162
|
const { content: t } = r;
|
|
14134
14163
|
for (let n = 0; n < t.length; n++) {
|
|
14135
14164
|
const i = t[n];
|
|
@@ -14165,13 +14194,13 @@ function Td(r, { editorSchema: e }) {
|
|
|
14165
14194
|
}
|
|
14166
14195
|
return r;
|
|
14167
14196
|
}
|
|
14168
|
-
function
|
|
14197
|
+
function Bd(r) {
|
|
14169
14198
|
const { marks: e = [] } = r.node, t = kr(e);
|
|
14170
14199
|
return Zt({
|
|
14171
14200
|
name: "w:tab"
|
|
14172
14201
|
}, t);
|
|
14173
14202
|
}
|
|
14174
|
-
function
|
|
14203
|
+
function kd(r) {
|
|
14175
14204
|
const e = [], { attrs: t } = r, { tableWidth: n, tableWidthType: i, tableStyleId: s, borders: o, tableIndent: a, tableLayout: u, tableCellSpacing: c } = t;
|
|
14176
14205
|
if (s) {
|
|
14177
14206
|
const l = {
|
|
@@ -14181,7 +14210,7 @@ function Bd(r) {
|
|
|
14181
14210
|
e.push(l);
|
|
14182
14211
|
}
|
|
14183
14212
|
if (o) {
|
|
14184
|
-
const l =
|
|
14213
|
+
const l = Nd(r);
|
|
14185
14214
|
e.push(l);
|
|
14186
14215
|
}
|
|
14187
14216
|
if (a) {
|
|
@@ -14216,7 +14245,7 @@ function Bd(r) {
|
|
|
14216
14245
|
elements: e
|
|
14217
14246
|
};
|
|
14218
14247
|
}
|
|
14219
|
-
function
|
|
14248
|
+
function Nd(r) {
|
|
14220
14249
|
const { borders: e } = r.attrs, t = [];
|
|
14221
14250
|
return e ? (["top", "bottom", "left", "right", "insideH", "insideV"].forEach((i) => {
|
|
14222
14251
|
const s = e[i];
|
|
@@ -14240,7 +14269,7 @@ function kd(r) {
|
|
|
14240
14269
|
elements: t
|
|
14241
14270
|
}) : void 0;
|
|
14242
14271
|
}
|
|
14243
|
-
function
|
|
14272
|
+
function Id(r, e) {
|
|
14244
14273
|
const { editorSchema: t } = e;
|
|
14245
14274
|
let n = [];
|
|
14246
14275
|
try {
|
|
@@ -14263,14 +14292,14 @@ function Nd(r, e) {
|
|
|
14263
14292
|
elements: i
|
|
14264
14293
|
};
|
|
14265
14294
|
}
|
|
14266
|
-
function
|
|
14267
|
-
const e = dt(r), t =
|
|
14295
|
+
function Rd(r) {
|
|
14296
|
+
const e = dt(r), t = Pd(r.node);
|
|
14268
14297
|
return t.elements.length && e.unshift(t), {
|
|
14269
14298
|
name: "w:tr",
|
|
14270
14299
|
elements: e
|
|
14271
14300
|
};
|
|
14272
14301
|
}
|
|
14273
|
-
function
|
|
14302
|
+
function Pd(r) {
|
|
14274
14303
|
const { attrs: e } = r, t = [], { rowHeight: n, rowHeightType: i } = e;
|
|
14275
14304
|
if (n) {
|
|
14276
14305
|
const s = { "w:val": Te(n) };
|
|
@@ -14286,17 +14315,17 @@ function Rd(r) {
|
|
|
14286
14315
|
elements: t
|
|
14287
14316
|
};
|
|
14288
14317
|
}
|
|
14289
|
-
function
|
|
14318
|
+
function Od(r) {
|
|
14290
14319
|
const e = dt({
|
|
14291
14320
|
...r,
|
|
14292
14321
|
tableCell: r.node
|
|
14293
|
-
}), t =
|
|
14322
|
+
}), t = Ld(r.node);
|
|
14294
14323
|
return e.unshift(t), {
|
|
14295
14324
|
name: "w:tc",
|
|
14296
14325
|
elements: e
|
|
14297
14326
|
};
|
|
14298
14327
|
}
|
|
14299
|
-
function
|
|
14328
|
+
function Ld(r) {
|
|
14300
14329
|
const e = [], { attrs: t } = r, { colwidth: n = [], cellWidthType: i = "dxa", background: s = {}, colspan: o, rowspan: a, widthUnit: u } = t, c = n.reduce((v, F) => v + F, 0), l = {
|
|
14301
14330
|
name: "w:tcW",
|
|
14302
14331
|
attributes: { "w:w": u === "px" ? Te(c) : It(c), "w:type": i }
|
|
@@ -14320,7 +14349,7 @@ function Od(r) {
|
|
|
14320
14349
|
if (g) {
|
|
14321
14350
|
const v = {
|
|
14322
14351
|
name: "w:tcMar",
|
|
14323
|
-
elements:
|
|
14352
|
+
elements: _d(g)
|
|
14324
14353
|
};
|
|
14325
14354
|
e.push(v);
|
|
14326
14355
|
}
|
|
@@ -14372,11 +14401,11 @@ function Od(r) {
|
|
|
14372
14401
|
elements: e
|
|
14373
14402
|
};
|
|
14374
14403
|
}
|
|
14375
|
-
function
|
|
14404
|
+
function _d(r) {
|
|
14376
14405
|
const e = [], { top: t, right: n, bottom: i, left: s } = r;
|
|
14377
14406
|
return t != null && e.push({ name: "w:top", attributes: { "w:w": Te(t) } }), n != null && e.push({ name: "w:right", attributes: { "w:w": Te(n) } }), i != null && e.push({ name: "w:bottom", attributes: { "w:w": Te(i) } }), s != null && e.push({ name: "w:left", attributes: { "w:w": Te(s) } }), e;
|
|
14378
14407
|
}
|
|
14379
|
-
function
|
|
14408
|
+
function qd(r) {
|
|
14380
14409
|
const e = {
|
|
14381
14410
|
name: "w:bookmarkStart",
|
|
14382
14411
|
attributes: {
|
|
@@ -14410,7 +14439,8 @@ function Bo(r) {
|
|
|
14410
14439
|
break;
|
|
14411
14440
|
case "fontFamily":
|
|
14412
14441
|
i = n.fontFamily, ["w:ascii", "w:eastAsia", "w:hAnsi", "w:cs"].forEach((o) => {
|
|
14413
|
-
|
|
14442
|
+
const a = i.split(", ");
|
|
14443
|
+
t.attributes[o] = a[0] ? a[0] : i;
|
|
14414
14444
|
});
|
|
14415
14445
|
break;
|
|
14416
14446
|
case "color":
|
|
@@ -14432,7 +14462,7 @@ function Bo(r) {
|
|
|
14432
14462
|
}
|
|
14433
14463
|
return t;
|
|
14434
14464
|
}
|
|
14435
|
-
function
|
|
14465
|
+
function Md(r) {
|
|
14436
14466
|
if (!r) return {};
|
|
14437
14467
|
const e = r.split(";")[0].split("/")[1];
|
|
14438
14468
|
if (!r || e !== "png")
|
|
@@ -14446,7 +14476,7 @@ function qd(r) {
|
|
|
14446
14476
|
originalHeight: i.getInt32(20)
|
|
14447
14477
|
};
|
|
14448
14478
|
}
|
|
14449
|
-
function
|
|
14479
|
+
function Ud(r, e, t, n) {
|
|
14450
14480
|
let i = r, s = e, o = Math.min(t / r, n / e);
|
|
14451
14481
|
return i = Math.round(i * o), s = Math.round(s * o), { scaledWidth: i, scaledHeight: s };
|
|
14452
14482
|
}
|
|
@@ -14456,20 +14486,20 @@ function uu(r, e) {
|
|
|
14456
14486
|
tableCell: i
|
|
14457
14487
|
} = r;
|
|
14458
14488
|
let s = t.rId;
|
|
14459
|
-
const o = t.src || t.imageSrc, { originalWidth: a, originalHeight: u } =
|
|
14489
|
+
const o = t.src || t.imageSrc, { originalWidth: a, originalHeight: u } = Md(o);
|
|
14460
14490
|
let c = t.size ? {
|
|
14461
14491
|
w: mt(t.size.width),
|
|
14462
14492
|
h: mt(t.size.height)
|
|
14463
14493
|
} : e;
|
|
14464
14494
|
if (a && u) {
|
|
14465
|
-
const F = Me(c.w), w = Me(c.h), { scaledWidth: B, scaledHeight: R } =
|
|
14495
|
+
const F = Me(c.w), w = Me(c.h), { scaledWidth: B, scaledHeight: R } = Ud(a, u, F, w);
|
|
14466
14496
|
c = {
|
|
14467
14497
|
w: mt(B),
|
|
14468
14498
|
h: mt(R)
|
|
14469
14499
|
};
|
|
14470
14500
|
}
|
|
14471
14501
|
if (i) {
|
|
14472
|
-
const F = i.attrs.colwidth.reduce((N, M) => N + M, 0), w = i.attrs.cellMargins?.left || 8, B = i.attrs.cellMargins?.right || 8, R = mt(F - (w + B)), { width: D, height: k } =
|
|
14502
|
+
const F = i.attrs.colwidth.reduce((N, M) => N + M, 0), w = i.attrs.cellMargins?.left || 8, B = i.attrs.cellMargins?.right || 8, R = mt(F - (w + B)), { width: D, height: k } = Xd(c.w, c.h, R);
|
|
14473
14503
|
D && k && (c = { w: D, h: k });
|
|
14474
14504
|
}
|
|
14475
14505
|
if (r.node.type === "image" && !s) {
|
|
@@ -14710,21 +14740,21 @@ function lu(r) {
|
|
|
14710
14740
|
} = r, n = cu(e);
|
|
14711
14741
|
return Br(e.displayLabel, [...t, ...n], r);
|
|
14712
14742
|
}
|
|
14713
|
-
function
|
|
14743
|
+
function jd(r) {
|
|
14714
14744
|
const {
|
|
14715
14745
|
node: { attrs: e = {}, marks: t = [] }
|
|
14716
14746
|
} = r, n = Nc.decode(e.displayLabel);
|
|
14717
14747
|
return Br(n, t, r);
|
|
14718
14748
|
}
|
|
14719
|
-
function
|
|
14749
|
+
function Hd(r) {
|
|
14720
14750
|
const {
|
|
14721
14751
|
node: { attrs: e = {}, marks: t = [] },
|
|
14722
14752
|
editorSchema: n
|
|
14723
14753
|
} = r, s = new window.DOMParser().parseFromString(e.rawHtml || e.displayLabel, "text/html"), o = cu(e), a = [...t, ...o];
|
|
14724
|
-
let u =
|
|
14754
|
+
let u = Ct.create({
|
|
14725
14755
|
doc: yr.fromSchema(n).parse(s)
|
|
14726
14756
|
});
|
|
14727
|
-
a.length && (u =
|
|
14757
|
+
a.length && (u = Yd(u, a));
|
|
14728
14758
|
const c = u.doc.toJSON();
|
|
14729
14759
|
return {
|
|
14730
14760
|
name: "htmlAnnotation",
|
|
@@ -14737,7 +14767,7 @@ function jd(r) {
|
|
|
14737
14767
|
function ko(r, e) {
|
|
14738
14768
|
return uu(r, e);
|
|
14739
14769
|
}
|
|
14740
|
-
function
|
|
14770
|
+
function Vd(r) {
|
|
14741
14771
|
const {
|
|
14742
14772
|
node: { attrs: e = {}, marks: t = [] }
|
|
14743
14773
|
} = r, n = au(r, e.linkUrl), i = Br(e.linkUrl, t, r);
|
|
@@ -14763,9 +14793,9 @@ function zd(r) {
|
|
|
14763
14793
|
text: lu,
|
|
14764
14794
|
image: (i) => ko(i, e),
|
|
14765
14795
|
signature: (i) => ko(i, t),
|
|
14766
|
-
checkbox:
|
|
14767
|
-
html:
|
|
14768
|
-
link:
|
|
14796
|
+
checkbox: jd,
|
|
14797
|
+
html: Hd,
|
|
14798
|
+
link: Vd
|
|
14769
14799
|
}[r];
|
|
14770
14800
|
}
|
|
14771
14801
|
const cu = (r = {}) => {
|
|
@@ -14780,7 +14810,7 @@ const cu = (r = {}) => {
|
|
|
14780
14810
|
} = r, u = [];
|
|
14781
14811
|
return e && u.push({ type: "fontFamily", attrs: { fontFamily: e } }), t && u.push({ type: "fontSize", attrs: { fontSize: t } }), n && u.push({ type: "bold", attrs: {} }), i && u.push({ type: "underline", attrs: {} }), s && u.push({ type: "italic", attrs: {} }), o && u.push({ type: "color", attrs: { color: o } }), a && u.push({ type: "highlight", attrs: { color: a } }), u;
|
|
14782
14812
|
};
|
|
14783
|
-
function
|
|
14813
|
+
function Gd(r) {
|
|
14784
14814
|
const { node: e, isFinalDoc: t } = r, { attrs: n = {} } = e, i = zd(n.type);
|
|
14785
14815
|
if (!i) return {};
|
|
14786
14816
|
let s, o;
|
|
@@ -14861,7 +14891,7 @@ function Vd(r) {
|
|
|
14861
14891
|
]
|
|
14862
14892
|
};
|
|
14863
14893
|
}
|
|
14864
|
-
function
|
|
14894
|
+
function Wd(r) {
|
|
14865
14895
|
const { node: e = {} } = r, { attrs: t = {} } = e, { pageBreakSource: n } = t;
|
|
14866
14896
|
return n === "sectPr" ? null : {
|
|
14867
14897
|
name: "w:r",
|
|
@@ -14872,7 +14902,7 @@ function Gd(r) {
|
|
|
14872
14902
|
}]
|
|
14873
14903
|
};
|
|
14874
14904
|
}
|
|
14875
|
-
function
|
|
14905
|
+
function Jd(r) {
|
|
14876
14906
|
const { node: e } = r, t = dt(r), n = {
|
|
14877
14907
|
name: "v:shape",
|
|
14878
14908
|
attributes: {
|
|
@@ -14898,7 +14928,7 @@ function Wd(r) {
|
|
|
14898
14928
|
elements: [Zt(i)]
|
|
14899
14929
|
};
|
|
14900
14930
|
}
|
|
14901
|
-
function
|
|
14931
|
+
function $d(r) {
|
|
14902
14932
|
const { node: e } = r, n = {
|
|
14903
14933
|
name: "w:txbxContent",
|
|
14904
14934
|
elements: dt(r)
|
|
@@ -14911,7 +14941,7 @@ function Jd(r) {
|
|
|
14911
14941
|
elements: [n]
|
|
14912
14942
|
};
|
|
14913
14943
|
}
|
|
14914
|
-
function
|
|
14944
|
+
function Kd(r) {
|
|
14915
14945
|
const { node: e } = r, { drawingContent: t } = e.attrs, n = {
|
|
14916
14946
|
name: "w:drawing",
|
|
14917
14947
|
elements: [
|
|
@@ -14978,14 +15008,14 @@ nt = new WeakSet(), fu = function(e, t = falase) {
|
|
|
14978
15008
|
}
|
|
14979
15009
|
return a || u.push(`</${n}>`), u;
|
|
14980
15010
|
};
|
|
14981
|
-
function
|
|
15011
|
+
function Xd(r, e, t) {
|
|
14982
15012
|
if (r > t) {
|
|
14983
15013
|
let n = t / r, i = Math.round(e * n);
|
|
14984
15014
|
return { width: t, height: i };
|
|
14985
15015
|
}
|
|
14986
15016
|
return { width: r, height: e };
|
|
14987
15017
|
}
|
|
14988
|
-
function
|
|
15018
|
+
function Yd(r, e) {
|
|
14989
15019
|
const { tr: t, doc: n, schema: i } = r, s = ["fontFamily", "fontSize", "highlight"];
|
|
14990
15020
|
if (!e.some((h) => s.includes(h.type)))
|
|
14991
15021
|
return r;
|
|
@@ -15007,21 +15037,21 @@ function Xd(r, e) {
|
|
|
15007
15037
|
}));
|
|
15008
15038
|
}), r.apply(t);
|
|
15009
15039
|
}
|
|
15010
|
-
const
|
|
15040
|
+
const Zd = '<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh wp14"><w:body></w:body></w:document>', Qd = (r) => JSON.parse(ba.xml2json(r, null, 2)), em = (r, e = Zd) => r["word/document.xml"] || Qd(e), tm = (r) => {
|
|
15011
15041
|
const { nodes: e } = r;
|
|
15012
15042
|
if (e.length === 0)
|
|
15013
15043
|
return { nodes: [], consumed: 0 };
|
|
15014
15044
|
const t = e[0];
|
|
15015
15045
|
switch (t.name) {
|
|
15016
15046
|
case "w:tbl":
|
|
15017
|
-
return { nodes: [
|
|
15047
|
+
return { nodes: [nm(t, r)], consumed: 1 };
|
|
15018
15048
|
}
|
|
15019
15049
|
return { nodes: [], consumed: 0 };
|
|
15020
|
-
},
|
|
15050
|
+
}, rm = {
|
|
15021
15051
|
handlerName: "tableNodeHandler",
|
|
15022
|
-
handler:
|
|
15052
|
+
handler: tm
|
|
15023
15053
|
};
|
|
15024
|
-
function
|
|
15054
|
+
function nm(r, e) {
|
|
15025
15055
|
const { docx: t, nodeListHandler: n } = e, i = r.elements.find((k) => k.name === "w:tblPr"), o = i.elements.find((k) => k.name === "w:tblBorders")?.elements || [], { borders: a, rowBorders: u } = mu(o), c = i.elements.find((k) => k.name === "w:tblStyle"), h = { tableStyleId: c?.attributes["w:val"] }, g = i?.elements.find((k) => k.name === "w:tblInd");
|
|
15026
15056
|
if (g) {
|
|
15027
15057
|
const { "w:w": k, "w:type": N } = g.attributes;
|
|
@@ -15046,7 +15076,7 @@ function rm(r, e) {
|
|
|
15046
15076
|
h.borders = B;
|
|
15047
15077
|
const D = [];
|
|
15048
15078
|
return w.forEach((k) => {
|
|
15049
|
-
const N =
|
|
15079
|
+
const N = om(k, r, R, c, e);
|
|
15050
15080
|
N.content?.length && D.push(N);
|
|
15051
15081
|
}), {
|
|
15052
15082
|
type: "table",
|
|
@@ -15054,15 +15084,15 @@ function rm(r, e) {
|
|
|
15054
15084
|
attrs: h
|
|
15055
15085
|
};
|
|
15056
15086
|
}
|
|
15057
|
-
function
|
|
15058
|
-
const { docx: u, nodeListHandler: c } = o, l = r.elements.find((se) => se.name === "w:tcPr"), h = l?.elements?.find((se) => se.name === "w:tcBorders"), g =
|
|
15087
|
+
function im(r, e, t, n, i = null, s, o, a) {
|
|
15088
|
+
const { docx: u, nodeListHandler: c } = o, l = r.elements.find((se) => se.name === "w:tcPr"), h = l?.elements?.find((se) => se.name === "w:tcBorders"), g = sm(h, n), E = pu(t), A = l?.elements?.find((se) => se.name === "w:tcW");
|
|
15059
15089
|
let v = A ? be(A.attributes["w:w"]) : null;
|
|
15060
15090
|
const F = A?.attributes["w:type"];
|
|
15061
15091
|
!v && i && (v = i);
|
|
15062
15092
|
const w = Io(r), { attributes: B } = w || {}, D = {
|
|
15063
15093
|
color: l?.elements?.find((se) => se.name === "w:shd")?.attributes["w:fill"]
|
|
15064
15094
|
}, N = l?.elements?.find((se) => se.name === "w:gridSpan")?.attributes["w:val"], M = l?.elements?.find((se) => se.name === "w:tcMar"), C = l?.elements?.find((se) => se.name === "w:vAlign")?.attributes["w:val"] || "top", J = {}, oe = du(s, u) || {};
|
|
15065
|
-
J.cellMargins =
|
|
15095
|
+
J.cellMargins = am(M, oe);
|
|
15066
15096
|
const { fontSize: Z, fonts: fe = {} } = oe, de = fe.ascii;
|
|
15067
15097
|
if (v) {
|
|
15068
15098
|
J.colwidth = [v], J.widthUnit = "px";
|
|
@@ -15080,9 +15110,9 @@ function nm(r, e, t, n, i = null, s, o, a) {
|
|
|
15080
15110
|
const se = t.elements.filter((ie) => ie.name === "w:tr"), ne = se.findIndex((ie) => ie === e), Y = se.slice(ne + 1);
|
|
15081
15111
|
let $ = e.elements.filter((ie) => ie.name === "w:tc").findIndex((ie) => ie === r), re = 1;
|
|
15082
15112
|
for (let ie of Y) {
|
|
15083
|
-
const L = ie.elements.findIndex((P) => P.name === "w:tc"),
|
|
15084
|
-
if (!
|
|
15085
|
-
const q = Io(
|
|
15113
|
+
const L = ie.elements.findIndex((P) => P.name === "w:tc"), V = ie.elements[L + $];
|
|
15114
|
+
if (!V) break;
|
|
15115
|
+
const q = Io(V), { attributes: K } = q || {};
|
|
15086
15116
|
if (!q && !K || K && K["w:val"] === "restart")
|
|
15087
15117
|
break;
|
|
15088
15118
|
re++, ie.elements.splice(L + $, 1);
|
|
@@ -15108,7 +15138,7 @@ const Io = (r) => r.elements.find((n) => n.name === "w:tcPr")?.elements?.find((n
|
|
|
15108
15138
|
return Object.keys(i) ? (i.val = "none", i) : null;
|
|
15109
15139
|
}
|
|
15110
15140
|
return null;
|
|
15111
|
-
},
|
|
15141
|
+
}, sm = (r, e) => {
|
|
15112
15142
|
if (!r) return null;
|
|
15113
15143
|
const t = {}, n = or(r, "bottom", e);
|
|
15114
15144
|
n && (t.bottom = n);
|
|
@@ -15176,7 +15206,7 @@ function mu(r) {
|
|
|
15176
15206
|
rowBorders: t
|
|
15177
15207
|
};
|
|
15178
15208
|
}
|
|
15179
|
-
function
|
|
15209
|
+
function om(r, e, t, n, i) {
|
|
15180
15210
|
const s = {}, a = r.elements.find((A) => A.name === "w:trPr")?.elements?.find((A) => A.name === "w:trHeight"), u = a?.attributes["w:val"];
|
|
15181
15211
|
a?.attributes["w:hRule"];
|
|
15182
15212
|
const c = {};
|
|
@@ -15186,12 +15216,12 @@ function sm(r, e, t, n, i) {
|
|
|
15186
15216
|
type: "tableRow",
|
|
15187
15217
|
content: h?.map((A, v) => {
|
|
15188
15218
|
const F = h.length > 1 ? l[v] : null;
|
|
15189
|
-
return
|
|
15219
|
+
return im(A, r, e, c, F, n, i, v);
|
|
15190
15220
|
}) || [],
|
|
15191
15221
|
attrs: s
|
|
15192
15222
|
};
|
|
15193
15223
|
}
|
|
15194
|
-
const
|
|
15224
|
+
const am = (r, e) => {
|
|
15195
15225
|
const t = r?.elements?.find((F) => F.name === "w:left"), n = r?.elements?.find((F) => F.name === "w:right"), i = r?.elements?.find((F) => F.name === "w:top"), s = r?.elements?.find((F) => F.name === "w:bottom"), o = t?.attributes["w:w"], a = n?.attributes["w:w"], u = i?.attributes["w:w"], c = s?.attributes["w:w"], { cellMargins: l = {} } = e, {
|
|
15196
15226
|
marginLeft: h,
|
|
15197
15227
|
marginRight: g,
|
|
@@ -15204,7 +15234,7 @@ const om = (r, e) => {
|
|
|
15204
15234
|
top: be(u ?? E),
|
|
15205
15235
|
bottom: be(c ?? A)
|
|
15206
15236
|
};
|
|
15207
|
-
}, pu = (r) => r.elements.find((t) => t.name === "w:tblGrid")?.elements?.flatMap((t) => t.name !== "w:gridCol" ? [] : be(t.attributes["w:w"])) || [],
|
|
15237
|
+
}, pu = (r) => r.elements.find((t) => t.name === "w:tblGrid")?.elements?.flatMap((t) => t.name !== "w:gridCol" ? [] : be(t.attributes["w:w"])) || [], um = (r) => {
|
|
15208
15238
|
const { nodes: e, filename: t } = r, n = ["w:drawing", "w:p"];
|
|
15209
15239
|
if (e.length === 0 || !n.includes(e[0].name))
|
|
15210
15240
|
return { nodes: [], consumed: 0 };
|
|
@@ -15228,7 +15258,7 @@ function Ro(r, e, t) {
|
|
|
15228
15258
|
height: Me(o.attributes?.cy)
|
|
15229
15259
|
}, c = r.elements.find((q) => q.name === "a:graphic").elements.find((q) => q.name === "a:graphicData"), { uri: l } = c?.attributes;
|
|
15230
15260
|
if (l && l === "http://schemas.microsoft.com/office/word/2010/wordprocessingShape")
|
|
15231
|
-
return
|
|
15261
|
+
return lm(t, r, c);
|
|
15232
15262
|
const g = c.elements.find((q) => q.name === "pic:pic");
|
|
15233
15263
|
if (!g || !g.elements) return null;
|
|
15234
15264
|
const A = g.elements.find((q) => q.name === "pic:blipFill").elements.find((q) => q.name === "a:blip"), v = r.elements.find((q) => q.name === "wp:positionH"), F = v?.elements.find((q) => q.name === "wp:posOffset"), w = Me(F?.elements[0]?.text), B = v?.attributes.relativeFrom, R = v?.elements.find((q) => q.name === "wp:align")?.elements[0]?.text, D = r.elements.find((q) => q.name === "wp:positionV"), k = D?.elements.find((q) => q.name === "wp:posOffset"), N = Me(k?.elements[0]?.text), M = D?.attributes.relativeFrom, _ = D?.elements.find((q) => q.name === "wp:align")?.elements[0]?.text, C = r.elements.find((q) => q.name === "wp:simplePos"), J = r.elements.find((q) => q.name === "wp:wrapSquare"), oe = r.elements.find((q) => q.name === "wp:wrapTopAndBottom"), Z = r.elements.find((q) => q.name === "wp:docPr");
|
|
@@ -15279,12 +15309,12 @@ function Ro(r, e, t) {
|
|
|
15279
15309
|
}
|
|
15280
15310
|
};
|
|
15281
15311
|
}
|
|
15282
|
-
const
|
|
15312
|
+
const lm = (r, e, t) => {
|
|
15283
15313
|
const n = t.elements.find((l) => l.name === "wps:wsp"), s = n.elements.find((l) => l.name === "wps:txbx")?.elements?.find((l) => l.name === "w:txbxContent");
|
|
15284
15314
|
e.elements.find((l) => l.name === "wp:docPr");
|
|
15285
15315
|
const o = n.elements.find((l) => l.name === "wps:spPr"), a = o?.elements.find((l) => l.name === "a:prstGeom");
|
|
15286
15316
|
if (a && a.attributes.prst === "rect")
|
|
15287
|
-
return
|
|
15317
|
+
return cm(r, o);
|
|
15288
15318
|
if (!s)
|
|
15289
15319
|
return null;
|
|
15290
15320
|
const { nodeListHandler: u } = r;
|
|
@@ -15293,7 +15323,7 @@ const um = (r, e, t) => {
|
|
|
15293
15323
|
node: s.elements[0],
|
|
15294
15324
|
nodes: s.elements
|
|
15295
15325
|
})[0];
|
|
15296
|
-
},
|
|
15326
|
+
}, cm = (r, e) => {
|
|
15297
15327
|
const t = {}, [n] = r.nodes;
|
|
15298
15328
|
n?.name === "w:drawing" && (t.drawingContent = n);
|
|
15299
15329
|
const i = e.elements.find((l) => l.name === "a:xfrm"), s = i.elements.find((l) => l.name === "a:off"), o = i.elements.find((l) => l.name === "a:ext");
|
|
@@ -15310,9 +15340,9 @@ const um = (r, e, t) => {
|
|
|
15310
15340
|
type: "contentBlock",
|
|
15311
15341
|
attrs: t
|
|
15312
15342
|
};
|
|
15313
|
-
},
|
|
15343
|
+
}, fm = {
|
|
15314
15344
|
handlerName: "drawingNodeHandler",
|
|
15315
|
-
handler:
|
|
15345
|
+
handler: um
|
|
15316
15346
|
};
|
|
15317
15347
|
function Rt(r, e = [], t = null) {
|
|
15318
15348
|
const n = [], i = /* @__PURE__ */ new Set();
|
|
@@ -15337,7 +15367,7 @@ function Rt(r, e = [], t = null) {
|
|
|
15337
15367
|
const { attributes: u = {} } = s, c = { type: a.type };
|
|
15338
15368
|
if (!(u["w:val"] == "0" || u["w:val"] === "none")) {
|
|
15339
15369
|
if (a.mark && (c.type = a.mark), Object.keys(u).length) {
|
|
15340
|
-
const l =
|
|
15370
|
+
const l = mm(a.type, u, t);
|
|
15341
15371
|
if (l == null) return;
|
|
15342
15372
|
c.attrs = {}, c.attrs[a.property] = l;
|
|
15343
15373
|
}
|
|
@@ -15346,7 +15376,7 @@ function Rt(r, e = [], t = null) {
|
|
|
15346
15376
|
});
|
|
15347
15377
|
}), wi(n);
|
|
15348
15378
|
}
|
|
15349
|
-
function
|
|
15379
|
+
function dm(r, e) {
|
|
15350
15380
|
const t = r.elements?.find((o) => o.name === "w:rPrChange");
|
|
15351
15381
|
if (!t)
|
|
15352
15382
|
return [];
|
|
@@ -15367,25 +15397,25 @@ function wi(r) {
|
|
|
15367
15397
|
});
|
|
15368
15398
|
}), [...t, { type: "textStyle", attrs: n }];
|
|
15369
15399
|
}
|
|
15370
|
-
function
|
|
15400
|
+
function mm(r, e, t) {
|
|
15371
15401
|
r === "tabs" && (r = "textIndent");
|
|
15372
15402
|
const n = {
|
|
15373
15403
|
color: () => `#${e["w:val"]}`,
|
|
15374
15404
|
fontSize: () => `${e["w:val"] / 2}pt`,
|
|
15375
|
-
textIndent: () =>
|
|
15376
|
-
fontFamily: () =>
|
|
15377
|
-
lineHeight: () =>
|
|
15405
|
+
textIndent: () => hm(e),
|
|
15406
|
+
fontFamily: () => pm(e, t),
|
|
15407
|
+
lineHeight: () => gm(e),
|
|
15378
15408
|
textAlign: () => e["w:val"],
|
|
15379
15409
|
link: () => e.href,
|
|
15380
15410
|
underline: () => e["w:val"],
|
|
15381
15411
|
bold: () => e?.["w:val"] || null,
|
|
15382
15412
|
italic: () => e?.["w:val"] || null,
|
|
15383
|
-
highlight: () =>
|
|
15413
|
+
highlight: () => wm(e)
|
|
15384
15414
|
};
|
|
15385
15415
|
if (r in n || console.debug("❗️❗️ No value mapper for:", r, "Attributes:", e), r in n)
|
|
15386
15416
|
return n[r], n[r]();
|
|
15387
15417
|
}
|
|
15388
|
-
function
|
|
15418
|
+
function pm(r, e) {
|
|
15389
15419
|
const t = r["w:ascii"], n = r["w:asciiTheme"];
|
|
15390
15420
|
if (!e || !n) return t;
|
|
15391
15421
|
const i = e["word/theme/theme1.xml"];
|
|
@@ -15393,21 +15423,21 @@ function mm(r, e) {
|
|
|
15393
15423
|
const { elements: s } = i, { elements: o } = s[0];
|
|
15394
15424
|
return o.find((g) => g.name === "a:themeElements").elements.find((g) => g.name === "a:fontScheme").elements.find((g) => g.name === "a:majorFont").elements.find((g) => g.name === "a:latin").attributes.typeface;
|
|
15395
15425
|
}
|
|
15396
|
-
function
|
|
15426
|
+
function hm(r) {
|
|
15397
15427
|
let e = r["w:left"];
|
|
15398
15428
|
return e ? `${qe(e)}in` : null;
|
|
15399
15429
|
}
|
|
15400
|
-
function
|
|
15430
|
+
function gm(r) {
|
|
15401
15431
|
const e = r["w:line"], t = r["w:lineRule"];
|
|
15402
15432
|
return !e || e === "0" ? null : t === "exact" ? `${tu(e)}pt` : `${Ii(e)}`;
|
|
15403
15433
|
}
|
|
15404
|
-
function
|
|
15434
|
+
function wm(r) {
|
|
15405
15435
|
const e = r["w:fill"];
|
|
15406
15436
|
return e && e !== "auto" ? `#${e}` : Uf(r?.["w:val"]) ? `#${r["w:val"]}` : Mf(r?.["w:val"]) || null;
|
|
15407
15437
|
}
|
|
15408
|
-
function
|
|
15409
|
-
const t = [], n = [], { attributes: i = {}, elements: s = [] } = r, { nodes: o, paragraphProperties: a = {}, runProperties: u = {} } =
|
|
15410
|
-
return s.find((l) => l.name === "w:r") && (a.elements = a?.elements?.filter((l) => l.name !== "w:rPr")), u && u?.elements?.length && t.push(...Rt(u, n)), a && a.elements?.length && t.push(...Rt(a, n)), t.push(...
|
|
15438
|
+
function xt(r, e) {
|
|
15439
|
+
const t = [], n = [], { attributes: i = {}, elements: s = [] } = r, { nodes: o, paragraphProperties: a = {}, runProperties: u = {} } = ym(s);
|
|
15440
|
+
return s.find((l) => l.name === "w:r") && (a.elements = a?.elements?.filter((l) => l.name !== "w:rPr")), u && u?.elements?.length && t.push(...Rt(u, n)), a && a.elements?.length && t.push(...Rt(a, n)), t.push(...dm(u, t)), a && a.elements?.length && (i.paragraphProperties = a), t && r.name === "w:p" && t.forEach((l) => {
|
|
15411
15441
|
const h = Object.keys(l.attrs ?? {})[0];
|
|
15412
15442
|
if (h) {
|
|
15413
15443
|
const g = l.attrs[h];
|
|
@@ -15415,7 +15445,7 @@ function bt(r, e) {
|
|
|
15415
15445
|
}
|
|
15416
15446
|
}), { elements: o, attributes: i, marks: t, unknownMarks: n };
|
|
15417
15447
|
}
|
|
15418
|
-
function
|
|
15448
|
+
function ym(r) {
|
|
15419
15449
|
const e = r.find((s) => s.name === "w:pPr"), t = r.find((s) => s.name === "w:rPr"), n = r.find((s) => s.name === "w:sectPr");
|
|
15420
15450
|
return {
|
|
15421
15451
|
nodes: r.filter((s) => s.name !== "w:pPr" && s.name !== "w:rPr" && s.name !== "w:sectPr"),
|
|
@@ -15427,11 +15457,11 @@ function wm(r) {
|
|
|
15427
15457
|
function fr(r) {
|
|
15428
15458
|
return Ot.allowedElements[r.name || r.type];
|
|
15429
15459
|
}
|
|
15430
|
-
const
|
|
15460
|
+
const bm = (r) => !!Ot.propertyTypes[r.name || r.type];
|
|
15431
15461
|
function hu(r) {
|
|
15432
15462
|
return r.filter((n) => n.name === "w:r").some((n) => n.elements.some((i) => i.name === "w:t"));
|
|
15433
15463
|
}
|
|
15434
|
-
const
|
|
15464
|
+
const xm = (r) => {
|
|
15435
15465
|
const { nodes: e, nodeListHandler: t } = r;
|
|
15436
15466
|
if (e.length === 0 || !(e[0].name === "w:del" || e[0].name === "w:ins" || e[0].name === "w:sdt"))
|
|
15437
15467
|
return { nodes: [], consumed: 0 };
|
|
@@ -15445,7 +15475,7 @@ const bm = (r) => {
|
|
|
15445
15475
|
}
|
|
15446
15476
|
if (!i)
|
|
15447
15477
|
return { nodes: [], consumed: 0 };
|
|
15448
|
-
const { name: s } = i, { attributes: o, elements: a } =
|
|
15478
|
+
const { name: s } = i, { attributes: o, elements: a } = xt(i), u = t.handler({ ...r, insideTrackChange: !0, nodes: a }), c = s === "w:del" ? Pi : xr, l = {
|
|
15449
15479
|
id: o["w:id"],
|
|
15450
15480
|
date: o["w:date"],
|
|
15451
15481
|
author: o["w:author"],
|
|
@@ -15454,10 +15484,10 @@ const bm = (r) => {
|
|
|
15454
15484
|
return u.forEach((h) => {
|
|
15455
15485
|
h.marks === void 0 && (h.marks = []), h.marks.push({ type: c, attrs: l });
|
|
15456
15486
|
}), { nodes: u, consumed: 1 };
|
|
15457
|
-
},
|
|
15487
|
+
}, Am = {
|
|
15458
15488
|
handlerName: "trackChangeNodeHandler",
|
|
15459
|
-
handler:
|
|
15460
|
-
},
|
|
15489
|
+
handler: xm
|
|
15490
|
+
}, Dm = (r) => {
|
|
15461
15491
|
const { nodes: e, docx: t, nodeListHandler: n } = r;
|
|
15462
15492
|
if (e.length === 0 || e[0].name !== "w:hyperlink")
|
|
15463
15493
|
return { nodes: [], consumed: 0 };
|
|
@@ -15476,18 +15506,18 @@ const bm = (r) => {
|
|
|
15476
15506
|
}
|
|
15477
15507
|
}
|
|
15478
15508
|
return { nodes: n.handler({ ...r, nodes: A }), consumed: 1 };
|
|
15479
|
-
},
|
|
15509
|
+
}, vm = {
|
|
15480
15510
|
handlerName: "hyperlinkNodeHandler",
|
|
15481
|
-
handler:
|
|
15482
|
-
},
|
|
15511
|
+
handler: Dm
|
|
15512
|
+
}, Em = (r) => {
|
|
15483
15513
|
const { nodes: e, nodeListHandler: t, parentStyleId: n, docx: i } = r;
|
|
15484
15514
|
if (e.length === 0 || e[0].name !== "w:r")
|
|
15485
15515
|
return { nodes: [], consumed: 0 };
|
|
15486
15516
|
const s = e[0], o = { ...r, nodes: s.elements };
|
|
15487
15517
|
let a = t.handler(o)?.filter((l) => l) || [];
|
|
15488
|
-
const u = s.elements?.some((l) => l.name === "w:rPr"), c =
|
|
15518
|
+
const u = s.elements?.some((l) => l.name === "w:rPr"), c = Cm(i, n);
|
|
15489
15519
|
if (u) {
|
|
15490
|
-
const { marks: l = [], attributes: h = {} } =
|
|
15520
|
+
const { marks: l = [], attributes: h = {} } = xt(s), g = l.find((v) => v.type === "textStyle"), E = g && Object.keys(g.attrs).length > 0;
|
|
15491
15521
|
c.marks && !E && l.push(...c.marks), s.marks && l.push(...s.marks);
|
|
15492
15522
|
const A = wi(l);
|
|
15493
15523
|
a = a.map((v) => {
|
|
@@ -15496,20 +15526,20 @@ const bm = (r) => {
|
|
|
15496
15526
|
});
|
|
15497
15527
|
} else c.marks && (a = a.map((l) => ({ ...l, marks: wi(c.marks) })));
|
|
15498
15528
|
return { nodes: a, consumed: 1 };
|
|
15499
|
-
},
|
|
15529
|
+
}, Cm = (r, e) => {
|
|
15500
15530
|
const t = r?.["word/styles.xml"];
|
|
15501
15531
|
if (!t)
|
|
15502
15532
|
return {};
|
|
15503
15533
|
const i = t.elements[0].elements.filter((s) => s.name === "w:style").find((s) => s.attributes["w:styleId"] === e) || {};
|
|
15504
|
-
return i ?
|
|
15505
|
-
},
|
|
15534
|
+
return i ? xt(i) : {};
|
|
15535
|
+
}, Sm = {
|
|
15506
15536
|
handlerName: "runNodeHandler",
|
|
15507
|
-
handler:
|
|
15508
|
-
},
|
|
15537
|
+
handler: Em
|
|
15538
|
+
}, Tm = (r) => {
|
|
15509
15539
|
const { nodes: e, insideTrackChange: t } = r;
|
|
15510
15540
|
if (e.length === 0 || !(e[0].name === "w:t" || t && e[0].name === "w:delText"))
|
|
15511
15541
|
return { nodes: [], consumed: 0 };
|
|
15512
|
-
const n = e[0], { type: i } = n, { attributes: s, elements: o, marks: a = [] } =
|
|
15542
|
+
const n = e[0], { type: i } = n, { attributes: s, elements: o, marks: a = [] } = xt(n);
|
|
15513
15543
|
let u;
|
|
15514
15544
|
if (o.length === 1) u = o[0].text;
|
|
15515
15545
|
else if (!o.length && "attributes" in n && n.attributes["xml:space"] === "preserve")
|
|
@@ -15526,29 +15556,29 @@ const bm = (r) => {
|
|
|
15526
15556
|
],
|
|
15527
15557
|
consumed: 1
|
|
15528
15558
|
};
|
|
15529
|
-
},
|
|
15559
|
+
}, Fm = {
|
|
15530
15560
|
handlerName: "textNodeHandler",
|
|
15531
|
-
handler:
|
|
15561
|
+
handler: Tm
|
|
15532
15562
|
}, gu = (r) => {
|
|
15533
15563
|
if (!r || !Array.isArray(r))
|
|
15534
15564
|
return r;
|
|
15535
15565
|
let e = [], t = null;
|
|
15536
15566
|
for (let n of r)
|
|
15537
|
-
n.type === "text" ? t &&
|
|
15567
|
+
n.type === "text" ? t && Bm(t, n) ? t = {
|
|
15538
15568
|
...t,
|
|
15539
15569
|
text: t.text += n.text
|
|
15540
15570
|
} : (t && e.push(t), t = { ...n }) : (t && (e.push(t), t = null), e.push(n));
|
|
15541
15571
|
return t && e.push(t), e;
|
|
15542
|
-
},
|
|
15572
|
+
}, Bm = (r, e) => {
|
|
15543
15573
|
if (!r || !e) return !1;
|
|
15544
15574
|
let t = r.marks ?? [], n = e.marks ?? [];
|
|
15545
15575
|
if (t.length !== n.length)
|
|
15546
15576
|
return !1;
|
|
15547
15577
|
for (let i = 0; i < t.length; i++)
|
|
15548
|
-
if (t[i].attrs || (t[i].attrs = {}), n[i].attrs || (n[i].attrs = {}), t[i].type !== n[i].type || Object.keys(t[i].attrs).length !== Object.keys(n[i].attrs).length || !
|
|
15578
|
+
if (t[i].attrs || (t[i].attrs = {}), n[i].attrs || (n[i].attrs = {}), t[i].type !== n[i].type || Object.keys(t[i].attrs).length !== Object.keys(n[i].attrs).length || !km(t[i].attrs, n[i].attrs))
|
|
15549
15579
|
return !1;
|
|
15550
15580
|
return !0;
|
|
15551
|
-
},
|
|
15581
|
+
}, km = (r = {}, e = {}) => If(r, e), Nm = (r) => {
|
|
15552
15582
|
const { nodes: e, lists: t, docx: n } = r;
|
|
15553
15583
|
if (e.length === 0 || e[0].name !== "w:p")
|
|
15554
15584
|
return { nodes: [], consumed: 0 };
|
|
@@ -15567,9 +15597,9 @@ const bm = (r) => {
|
|
|
15567
15597
|
};
|
|
15568
15598
|
} else
|
|
15569
15599
|
return { nodes: [], consumed: 0, lists: t };
|
|
15570
|
-
},
|
|
15600
|
+
}, Im = {
|
|
15571
15601
|
handlerName: "listHandler",
|
|
15572
|
-
handler:
|
|
15602
|
+
handler: Nm
|
|
15573
15603
|
};
|
|
15574
15604
|
function wu({
|
|
15575
15605
|
listItems: r,
|
|
@@ -15598,7 +15628,7 @@ function wu({
|
|
|
15598
15628
|
I && h[h.length - 1]?.content.push(I), N.seen = !0;
|
|
15599
15629
|
continue;
|
|
15600
15630
|
}
|
|
15601
|
-
const { attributes: M, elements: _, marks: C = [] } =
|
|
15631
|
+
const { attributes: M, elements: _, marks: C = [] } = xt(N), J = Li(w, u) || {}, { marks: oe } = xt(J), Z = C.find((I) => I.type === "textStyle"), fe = oe?.find((I) => I.type === "textStyle"), {
|
|
15602
15632
|
listType: de,
|
|
15603
15633
|
listOrderingType: se,
|
|
15604
15634
|
ilvl: ne,
|
|
@@ -15608,15 +15638,15 @@ function wu({
|
|
|
15608
15638
|
lvlText: re,
|
|
15609
15639
|
lvlJc: ie,
|
|
15610
15640
|
numId: L
|
|
15611
|
-
} =
|
|
15641
|
+
} = Lm(N, n, u);
|
|
15612
15642
|
E = se;
|
|
15613
|
-
const
|
|
15643
|
+
const V = parseInt(ne), q = i === V && L === s, K = Om({
|
|
15614
15644
|
firstListId: L,
|
|
15615
15645
|
secondListId: s,
|
|
15616
|
-
level:
|
|
15646
|
+
level: V,
|
|
15617
15647
|
pStyleId: null,
|
|
15618
15648
|
docx: u
|
|
15619
|
-
}), P = L !== s && !K, p = n <
|
|
15649
|
+
}), P = L !== s && !K, p = n < V || n === V && P && R === n;
|
|
15620
15650
|
l[s] || (l[s] = {}), l[s][n] || (l[s][n] = Number($));
|
|
15621
15651
|
const m = {};
|
|
15622
15652
|
if (q && !p) {
|
|
@@ -15639,10 +15669,10 @@ function wu({
|
|
|
15639
15669
|
if (E !== "bullet" && (b = [...o, l[s][n]], l[s][i]++), !o.length && i > 0) {
|
|
15640
15670
|
const ue = l[s];
|
|
15641
15671
|
if (ue) {
|
|
15642
|
-
const
|
|
15672
|
+
const z = [];
|
|
15643
15673
|
Object.keys(ue).forEach((Se) => {
|
|
15644
|
-
|
|
15645
|
-
}), b =
|
|
15674
|
+
z.push(ue[Se]);
|
|
15675
|
+
}), b = z;
|
|
15646
15676
|
}
|
|
15647
15677
|
}
|
|
15648
15678
|
let U = N.elements.find((ue) => ue.name === "w:pPr")?.elements.find((ue) => ue.name === "w:ind");
|
|
@@ -15734,7 +15764,7 @@ function Po(r, e, t) {
|
|
|
15734
15764
|
marks: t
|
|
15735
15765
|
};
|
|
15736
15766
|
}
|
|
15737
|
-
const
|
|
15767
|
+
const Rm = [
|
|
15738
15768
|
"decimal",
|
|
15739
15769
|
// eg: 1, 2, 3, 4, 5, ...
|
|
15740
15770
|
"decimalZero",
|
|
@@ -15759,7 +15789,7 @@ const Im = [
|
|
|
15759
15789
|
// eg: (0, 1, 2, ..., 9, 10, 11, 12, ..., 19, 1A, 1B, 1C, ..., 1Z, 20, 21, ..., 2Z)
|
|
15760
15790
|
"none"
|
|
15761
15791
|
// No bullet
|
|
15762
|
-
],
|
|
15792
|
+
], Pm = [
|
|
15763
15793
|
"bullet",
|
|
15764
15794
|
// A standard bullet point (•)
|
|
15765
15795
|
"square",
|
|
@@ -15768,7 +15798,7 @@ const Im = [
|
|
|
15768
15798
|
// Circle bullets (◦)
|
|
15769
15799
|
"disc"
|
|
15770
15800
|
// Disc bullets (●)
|
|
15771
|
-
],
|
|
15801
|
+
], Om = ({ firstListId: r, secondListId: e, level: t, pStyleId: n, docx: i }) => {
|
|
15772
15802
|
const { numFmt: s, lvlText: o, lvlJc: a } = Ar(r, t, n, i), {
|
|
15773
15803
|
numFmt: u,
|
|
15774
15804
|
lvlText: c,
|
|
@@ -15798,7 +15828,7 @@ const Im = [
|
|
|
15798
15828
|
}
|
|
15799
15829
|
const a = o.elements, u = a.filter((N) => N.name === "w:abstractNum"), h = a.filter((N) => N.name === "w:num").find((N) => N.attributes["w:numId"] === r)?.elements[0].attributes["w:val"], g = u?.find(
|
|
15800
15830
|
(N) => N.attributes["w:abstractNumId"] === h
|
|
15801
|
-
), E =
|
|
15831
|
+
), E = _m(g, e), v = g?.elements?.find((N) => N.name === "w:numStyleLink")?.attributes["w:val"];
|
|
15802
15832
|
if (v) {
|
|
15803
15833
|
const N = Oo(v, n);
|
|
15804
15834
|
return Ar(N.numId, e, null, n);
|
|
@@ -15806,7 +15836,7 @@ const Im = [
|
|
|
15806
15836
|
const F = E?.elements?.find((N) => N.name === "w:start")?.attributes["w:val"], w = E?.elements?.find((N) => N.name === "w:numFmt")?.attributes["w:val"], B = E?.elements?.find((N) => N.name === "w:lvlText").attributes["w:val"], R = E?.elements?.find((N) => N.name === "w:lvlJc").attributes["w:val"], D = E?.elements?.find((N) => N.name === "w:pPr"), k = E?.elements?.find((N) => N.name === "w:rPr");
|
|
15807
15837
|
return { start: F, numFmt: w, lvlText: B, lvlJc: R, pPr: D, rPr: k };
|
|
15808
15838
|
};
|
|
15809
|
-
function
|
|
15839
|
+
function Lm(r, e, t) {
|
|
15810
15840
|
if (!r) return;
|
|
15811
15841
|
const { attributes: n = {} } = r, { paragraphProperties: i = {} } = n, { elements: s = [] } = i, u = r.elements.find((C) => C.name === "w:pPr")?.elements?.find((C) => C.name === "w:pStyle")?.attributes["w:val"], c = Nr({ node: r, styleId: u, docx: t });
|
|
15812
15842
|
if (!c) return {};
|
|
@@ -15819,17 +15849,17 @@ function Om(r, e, t) {
|
|
|
15819
15849
|
rPr: k
|
|
15820
15850
|
} = Ar(h, e, v, t);
|
|
15821
15851
|
let N, M;
|
|
15822
|
-
D && (N =
|
|
15852
|
+
D && (N = qm(D)), k && (M = Mm(k));
|
|
15823
15853
|
let _;
|
|
15824
|
-
if (
|
|
15825
|
-
else if (
|
|
15854
|
+
if (Pm.includes(w?.toLowerCase())) _ = "bulletList";
|
|
15855
|
+
else if (Rm.includes(w)) _ = "orderedList";
|
|
15826
15856
|
else return {};
|
|
15827
15857
|
return { listType: _, listOrderingType: w, ilvl: E, numId: h, listrPrs: M, listpPrs: N, start: F, lvlText: B, lvlJc: R };
|
|
15828
15858
|
}
|
|
15829
|
-
function
|
|
15859
|
+
function _m(r, e) {
|
|
15830
15860
|
return r?.elements?.find((t) => Number(t.attributes["w:ilvl"]) === e);
|
|
15831
15861
|
}
|
|
15832
|
-
function
|
|
15862
|
+
function qm(r) {
|
|
15833
15863
|
const { elements: e } = r, t = ["w:ind", "w:jc", "w:tabs"], n = {};
|
|
15834
15864
|
return e && e.forEach((i) => {
|
|
15835
15865
|
t.includes(i.name);
|
|
@@ -15839,7 +15869,7 @@ function _m(r) {
|
|
|
15839
15869
|
});
|
|
15840
15870
|
}), n;
|
|
15841
15871
|
}
|
|
15842
|
-
function
|
|
15872
|
+
function Mm(r) {
|
|
15843
15873
|
const { elements: e } = r, t = [
|
|
15844
15874
|
"w:rFonts",
|
|
15845
15875
|
"w:b",
|
|
@@ -15896,7 +15926,7 @@ const bu = (r) => {
|
|
|
15896
15926
|
}
|
|
15897
15927
|
let v;
|
|
15898
15928
|
if (g && (v = g.attributes["w:val"], o.attrs.styleId = v), t) {
|
|
15899
|
-
const D =
|
|
15929
|
+
const D = Um(s, t, v);
|
|
15900
15930
|
o.attrs.indent || (o.attrs.indent = {}), (D.left || D.left === 0) && (o.attrs.indent.left = D.left), (D.right || D.right === 0) && (o.attrs.indent.right = D.right), (D.firstLine || D.firstLine === 0) && (o.attrs.indent.firstLine = D.firstLine), (D.hanging || D.hanging === 0) && (o.attrs.indent.hanging = D.hanging), (D.textIndent || D.textIndent === 0) && (o.attrs.textIndent = `${D.textIndent}in`);
|
|
15901
15931
|
}
|
|
15902
15932
|
const F = h?.elements?.find((D) => D.name === "w:jc");
|
|
@@ -15920,7 +15950,7 @@ const bu = (r) => {
|
|
|
15920
15950
|
});
|
|
15921
15951
|
const R = h?.elements?.find((D) => D.name === "w:sectPr");
|
|
15922
15952
|
return R && (o.attrs.paragraphProperties || (o.attrs.paragraphProperties = {}), o.attrs.paragraphProperties.sectPr = R, o.attrs.pageBreakSource = "sectPr"), { nodes: o ? [o] : [], consumed: 1 };
|
|
15923
|
-
},
|
|
15953
|
+
}, Um = (r, e, t = "") => {
|
|
15924
15954
|
const n = {
|
|
15925
15955
|
left: 0,
|
|
15926
15956
|
right: 0,
|
|
@@ -15963,11 +15993,11 @@ const bu = (r) => {
|
|
|
15963
15993
|
indent: k || R || D,
|
|
15964
15994
|
justify: B
|
|
15965
15995
|
};
|
|
15966
|
-
},
|
|
15996
|
+
}, jm = {
|
|
15967
15997
|
handlerName: "paragraphNodeHandler",
|
|
15968
15998
|
handler: bu
|
|
15969
15999
|
};
|
|
15970
|
-
function
|
|
16000
|
+
function Hm(r, e) {
|
|
15971
16001
|
const t = { lineSpaceBefore: null, lineSpaceAfter: null };
|
|
15972
16002
|
if (!r) return t;
|
|
15973
16003
|
const n = e["word/styles.xml"];
|
|
@@ -16031,14 +16061,14 @@ function Du(r = []) {
|
|
|
16031
16061
|
continue;
|
|
16032
16062
|
}
|
|
16033
16063
|
if (o === "end" && n) {
|
|
16034
|
-
t.push(i), e.push(...
|
|
16064
|
+
t.push(i), e.push(...Vm(t)), t = [], n = !1;
|
|
16035
16065
|
continue;
|
|
16036
16066
|
}
|
|
16037
16067
|
n ? t.push(i) : e.push(i);
|
|
16038
16068
|
}
|
|
16039
16069
|
return t.length && e.push(...t), e;
|
|
16040
16070
|
}
|
|
16041
|
-
const
|
|
16071
|
+
const Vm = (r = []) => {
|
|
16042
16072
|
let e = [], t = !1, n = !1;
|
|
16043
16073
|
const i = r.findIndex(
|
|
16044
16074
|
(h) => h.elements?.some((g) => g.name === "w:fldChar" && g.attributes["w:fldCharType"] === "separate")
|
|
@@ -16075,7 +16105,7 @@ const Hm = (r = []) => {
|
|
|
16075
16105
|
});
|
|
16076
16106
|
}
|
|
16077
16107
|
return e;
|
|
16078
|
-
}, zm = (r) => nodeListHandler.handler({ ...r, nodes: node.elements }),
|
|
16108
|
+
}, zm = (r) => nodeListHandler.handler({ ...r, nodes: node.elements }), Gm = (r) => {
|
|
16079
16109
|
const { nodes: e } = r;
|
|
16080
16110
|
if (e.length === 0 || e[0].name !== "w:sdt")
|
|
16081
16111
|
return { nodes: [], consumed: 0 };
|
|
@@ -16091,13 +16121,13 @@ const Hm = (r = []) => {
|
|
|
16091
16121
|
};
|
|
16092
16122
|
}, Lo = {
|
|
16093
16123
|
"Table of Contents": zm
|
|
16094
|
-
},
|
|
16124
|
+
}, Wm = (r) => {
|
|
16095
16125
|
const { nodes: e, docx: t, nodeListHandler: n, insideTrackChange: i } = r;
|
|
16096
16126
|
if (e.length === 0 || e[0].name !== "w:sdt")
|
|
16097
16127
|
return { nodes: [], consumed: 0 };
|
|
16098
|
-
const s = e[0], o = s.elements.find((_) => _.name === "w:sdtPr"), a = s.elements.find((_) => _.name === "w:sdtContent"), u = o?.elements.find((_) => _.name === "w:fieldTypeShort")?.attributes["w:val"], { attrs: c, marks: l } =
|
|
16128
|
+
const s = e[0], o = s.elements.find((_) => _.name === "w:sdtPr"), a = s.elements.find((_) => _.name === "w:sdtContent"), u = o?.elements.find((_) => _.name === "w:fieldTypeShort")?.attributes["w:val"], { attrs: c, marks: l } = Jm(a);
|
|
16099
16129
|
if (o?.elements.find((_) => _.name === "w:docPartObj"))
|
|
16100
|
-
return
|
|
16130
|
+
return Gm({ nodes: e, docx: t, nodeListHandler: n, insideTrackChange: i });
|
|
16101
16131
|
const g = o?.elements.find((_) => _.name === "w:alias"), E = o?.elements.find((_) => _.name === "w:tag"), A = o?.elements.find((_) => _.name === "w:fieldType")?.attributes["w:val"], v = o?.elements.find((_) => _.name === "w:fieldColor")?.attributes["w:val"], F = o?.elements.find((_) => _.name === "w:fieldMultipleImage")?.attributes["w:val"], w = o?.elements.find((_) => _.name === "w:fieldFontFamily")?.attributes["w:val"], B = o?.elements.find((_) => _.name === "w:fieldFontSize")?.attributes["w:val"], R = o?.elements.find((_) => _.name === "w:fieldTextColor")?.attributes["w:val"], D = o?.elements.find((_) => _.name === "w:fieldTextHighlight")?.attributes["w:val"], k = {
|
|
16102
16132
|
type: u,
|
|
16103
16133
|
fieldId: E?.attributes["w:val"],
|
|
@@ -16125,7 +16155,7 @@ const Hm = (r = []) => {
|
|
|
16125
16155
|
nodes: [M],
|
|
16126
16156
|
consumed: 1
|
|
16127
16157
|
};
|
|
16128
|
-
},
|
|
16158
|
+
}, Jm = (r = {}, e) => {
|
|
16129
16159
|
const i = r.elements?.find((c) => c.name === "w:r")?.elements?.find((c) => c.name === "w:rPr");
|
|
16130
16160
|
if (!i) return {};
|
|
16131
16161
|
const o = Rt(i, []) || [], a = [];
|
|
@@ -16147,17 +16177,17 @@ const Hm = (r = []) => {
|
|
|
16147
16177
|
attrs: u,
|
|
16148
16178
|
marks: o
|
|
16149
16179
|
};
|
|
16150
|
-
},
|
|
16180
|
+
}, $m = {
|
|
16151
16181
|
handlerName: "annotationNodeHandler",
|
|
16152
|
-
handler:
|
|
16153
|
-
},
|
|
16182
|
+
handler: Wm
|
|
16183
|
+
}, Km = (r) => {
|
|
16154
16184
|
const { nodes: e, docx: t, nodeListHandler: n } = r;
|
|
16155
16185
|
if (!e || e.length === 0)
|
|
16156
16186
|
return { nodes: [], consumed: 0 };
|
|
16157
|
-
const i = e[0], { name: s } = i, { attributes: o, elements: a, marks: u = [] } =
|
|
16187
|
+
const i = e[0], { name: s } = i, { attributes: o, elements: a, marks: u = [] } = xt(i);
|
|
16158
16188
|
if (s === "w:sdt")
|
|
16159
16189
|
return { nodes: [], consumed: 0 };
|
|
16160
|
-
if (
|
|
16190
|
+
if (bm(i))
|
|
16161
16191
|
return {
|
|
16162
16192
|
nodes: [{
|
|
16163
16193
|
type: fr(i),
|
|
@@ -16177,7 +16207,7 @@ const Hm = (r = []) => {
|
|
|
16177
16207
|
consumed: 0,
|
|
16178
16208
|
unhandled: !0
|
|
16179
16209
|
};
|
|
16180
|
-
const c = [], l =
|
|
16210
|
+
const c = [], l = Xm(i);
|
|
16181
16211
|
if (a && a.length) {
|
|
16182
16212
|
const g = a.map((v) => (v.marks || (v.marks = []), v.marks.push(...u), v)), E = { ...r, nodes: g, parentStyleId: l }, A = n.handler(E);
|
|
16183
16213
|
c.push(...A);
|
|
@@ -16188,13 +16218,13 @@ const Hm = (r = []) => {
|
|
|
16188
16218
|
attrs: { ...o },
|
|
16189
16219
|
marks: []
|
|
16190
16220
|
}], consumed: 1 };
|
|
16191
|
-
},
|
|
16221
|
+
}, Xm = (r) => {
|
|
16192
16222
|
const t = r.elements?.find((n) => n.name === "w:pPr")?.elements?.find((n) => n.name === "w:pStyle");
|
|
16193
16223
|
return t ? t.attributes["w:val"] : null;
|
|
16194
|
-
},
|
|
16224
|
+
}, Ym = {
|
|
16195
16225
|
handlerName: "standardNodeHandler",
|
|
16196
|
-
handler:
|
|
16197
|
-
},
|
|
16226
|
+
handler: Km
|
|
16227
|
+
}, Zm = (r) => {
|
|
16198
16228
|
const { nodes: e } = r;
|
|
16199
16229
|
return e.length === 0 || e[0].name !== "w:br" ? { nodes: [], consumed: 0 } : {
|
|
16200
16230
|
nodes: [{
|
|
@@ -16202,10 +16232,10 @@ const Hm = (r = []) => {
|
|
|
16202
16232
|
}],
|
|
16203
16233
|
consumed: 1
|
|
16204
16234
|
};
|
|
16205
|
-
},
|
|
16235
|
+
}, Qm = {
|
|
16206
16236
|
handlerName: "lineBreakNodeHandler",
|
|
16207
|
-
handler:
|
|
16208
|
-
},
|
|
16237
|
+
handler: Zm
|
|
16238
|
+
}, ep = (r) => {
|
|
16209
16239
|
const { nodes: e, nodeListHandler: t, editor: n } = r;
|
|
16210
16240
|
if (e.length === 0 || e[0].name !== "w:bookmarkStart")
|
|
16211
16241
|
return { nodes: [], consumed: 0 };
|
|
@@ -16234,10 +16264,10 @@ const Hm = (r = []) => {
|
|
|
16234
16264
|
}
|
|
16235
16265
|
const c = { ...r, nodes: [i] }, l = s(c);
|
|
16236
16266
|
return l.nodes.length === 1 && (l.nodes[0].attrs.name = i.attributes["w:name"], l.nodes[0].attrs.id = i.attributes["w:id"]), l;
|
|
16237
|
-
},
|
|
16267
|
+
}, tp = {
|
|
16238
16268
|
handlerName: "bookmarkNodeHandler",
|
|
16239
|
-
handler:
|
|
16240
|
-
},
|
|
16269
|
+
handler: ep
|
|
16270
|
+
}, rp = (r) => {
|
|
16241
16271
|
const e = { nodes: [], consumed: 0 }, { nodes: t, nodeListHandler: n, parentStyleId: i, docx: s } = r;
|
|
16242
16272
|
if (t.length === 0 || t[0].name !== "w:p")
|
|
16243
16273
|
return e;
|
|
@@ -16256,26 +16286,26 @@ const Hm = (r = []) => {
|
|
|
16256
16286
|
...r,
|
|
16257
16287
|
nodes: g
|
|
16258
16288
|
}), consumed: 1 };
|
|
16259
|
-
},
|
|
16289
|
+
}, np = {
|
|
16260
16290
|
handlerName: "alternateChoiceHandler",
|
|
16261
|
-
handler:
|
|
16262
|
-
},
|
|
16291
|
+
handler: rp
|
|
16292
|
+
}, ip = (r) => {
|
|
16263
16293
|
const { nodes: e } = r;
|
|
16264
16294
|
return e.length === 0 || e[0].name !== "sd:autoPageNumber" ? { nodes: [], consumed: 0 } : { nodes: [{
|
|
16265
16295
|
type: "page-number"
|
|
16266
16296
|
}], consumed: 1 };
|
|
16267
|
-
},
|
|
16297
|
+
}, sp = {
|
|
16268
16298
|
handlerName: "autoPageNumberHandler",
|
|
16269
|
-
handler:
|
|
16270
|
-
},
|
|
16299
|
+
handler: ip
|
|
16300
|
+
}, op = (r) => {
|
|
16271
16301
|
const { nodes: e } = r;
|
|
16272
16302
|
return e.length === 0 || e[0].name !== "sd:totalPageNumber" ? { nodes: [], consumed: 0 } : { nodes: [{
|
|
16273
16303
|
type: "total-page-number"
|
|
16274
16304
|
}], consumed: 1 };
|
|
16275
|
-
},
|
|
16305
|
+
}, ap = {
|
|
16276
16306
|
handlerName: "autoTotalPageCountEntity",
|
|
16277
|
-
handler:
|
|
16278
|
-
},
|
|
16307
|
+
handler: op
|
|
16308
|
+
}, up = (r) => {
|
|
16279
16309
|
const { nodes: e, docx: t, parentStyleId: n } = r;
|
|
16280
16310
|
if (e.length === 0 || e[0].name !== "w:tab")
|
|
16281
16311
|
return { nodes: [], consumed: 0 };
|
|
@@ -16292,10 +16322,10 @@ const Hm = (r = []) => {
|
|
|
16292
16322
|
},
|
|
16293
16323
|
content: []
|
|
16294
16324
|
}], consumed: 1 };
|
|
16295
|
-
},
|
|
16325
|
+
}, lp = {
|
|
16296
16326
|
handlerName: "tabNodeHandler",
|
|
16297
|
-
handler:
|
|
16298
|
-
},
|
|
16327
|
+
handler: up
|
|
16328
|
+
}, cp = (r) => {
|
|
16299
16329
|
const { nodes: e } = r;
|
|
16300
16330
|
if (!e.length || e[0].name !== "w:p")
|
|
16301
16331
|
return { nodes: [], consumed: 0 };
|
|
@@ -16308,14 +16338,14 @@ const Hm = (r = []) => {
|
|
|
16308
16338
|
if (!o && !a)
|
|
16309
16339
|
return { nodes: [], consumed: 0 };
|
|
16310
16340
|
let u = null;
|
|
16311
|
-
return a && !o ? u = null : o.elements?.find((h) => h.name === "v:textbox") && (u =
|
|
16341
|
+
return a && !o ? u = null : o.elements?.find((h) => h.name === "v:textbox") && (u = fp({
|
|
16312
16342
|
pict: i,
|
|
16313
16343
|
pNode: t,
|
|
16314
16344
|
shape: o,
|
|
16315
16345
|
params: r
|
|
16316
16346
|
})), { nodes: u ? [u] : [], consumed: 1 };
|
|
16317
16347
|
};
|
|
16318
|
-
function
|
|
16348
|
+
function fp({
|
|
16319
16349
|
pict: r,
|
|
16320
16350
|
pNode: e,
|
|
16321
16351
|
shape: t,
|
|
@@ -16323,7 +16353,7 @@ function cp({
|
|
|
16323
16353
|
}) {
|
|
16324
16354
|
const i = {}, s = {}, o = t.attributes || {};
|
|
16325
16355
|
i.attributes = o, o.fillcolor && (i.fillcolor = o.fillcolor);
|
|
16326
|
-
const a =
|
|
16356
|
+
const a = dp(o.style), u = mp(a);
|
|
16327
16357
|
u && (i.style = u);
|
|
16328
16358
|
const c = t.elements?.find((w) => w.name === "v:textbox"), l = t.elements?.find((w) => w.name === "w10:wrap");
|
|
16329
16359
|
l?.attributes && (i.wrapAttributes = l.attributes), c?.attributes && (s.attributes = c.attributes);
|
|
@@ -16342,13 +16372,13 @@ function cp({
|
|
|
16342
16372
|
}]
|
|
16343
16373
|
};
|
|
16344
16374
|
}
|
|
16345
|
-
function
|
|
16375
|
+
function dp(r) {
|
|
16346
16376
|
return r ? r.split(";").filter((e) => !!e.trim()).reduce((e, t) => {
|
|
16347
16377
|
const [n, i] = t.split(":").map((s) => s.trim());
|
|
16348
16378
|
return n && i && (e[n] = i), e;
|
|
16349
16379
|
}, {}) : {};
|
|
16350
16380
|
}
|
|
16351
|
-
function
|
|
16381
|
+
function mp(r) {
|
|
16352
16382
|
const e = [
|
|
16353
16383
|
"width",
|
|
16354
16384
|
"height"
|
|
@@ -16366,11 +16396,11 @@ function dp(r) {
|
|
|
16366
16396
|
e.includes(n) && (t += `${n}: ${i};`);
|
|
16367
16397
|
return t;
|
|
16368
16398
|
}
|
|
16369
|
-
const
|
|
16399
|
+
const pp = {
|
|
16370
16400
|
handlerName: "handlePictNode",
|
|
16371
|
-
handler:
|
|
16401
|
+
handler: cp
|
|
16372
16402
|
};
|
|
16373
|
-
function
|
|
16403
|
+
function hp({ docx: r }) {
|
|
16374
16404
|
const e = Jt(), t = r["word/comments.xml"];
|
|
16375
16405
|
if (!t) return;
|
|
16376
16406
|
const { elements: n } = t;
|
|
@@ -16396,16 +16426,16 @@ function pp({ docx: r }) {
|
|
|
16396
16426
|
trackedDeletedText: B
|
|
16397
16427
|
};
|
|
16398
16428
|
});
|
|
16399
|
-
return
|
|
16429
|
+
return gp({ docx: r, comments: s });
|
|
16400
16430
|
}
|
|
16401
|
-
const
|
|
16431
|
+
const gp = ({ docx: r, comments: e }) => {
|
|
16402
16432
|
const t = r["word/commentsExtended.xml"];
|
|
16403
16433
|
if (!t) return [];
|
|
16404
16434
|
const { elements: n } = t, { elements: i } = n[0], s = i.filter((o) => o.name === "w15:commentEx");
|
|
16405
16435
|
return e.map((o) => {
|
|
16406
16436
|
const a = s.find((g) => g.attributes["w15:paraId"] === o.paraId);
|
|
16407
16437
|
if (!a) return { ...o };
|
|
16408
|
-
const { isDone: u, paraIdParent: c } =
|
|
16438
|
+
const { isDone: u, paraIdParent: c } = wp(a);
|
|
16409
16439
|
let l;
|
|
16410
16440
|
return c && (l = e.find((g) => g.paraId === c)), {
|
|
16411
16441
|
...o,
|
|
@@ -16413,11 +16443,11 @@ const hp = ({ docx: r, comments: e }) => {
|
|
|
16413
16443
|
parentCommentId: l?.commentId
|
|
16414
16444
|
};
|
|
16415
16445
|
});
|
|
16416
|
-
},
|
|
16446
|
+
}, wp = (r) => {
|
|
16417
16447
|
const { attributes: e } = r, t = e["w15:paraId"], n = e["w15:done"] === "1", i = e["w15:paraIdParent"];
|
|
16418
16448
|
return { paraId: t, isDone: n, paraIdParent: i };
|
|
16419
|
-
},
|
|
16420
|
-
const n = He(
|
|
16449
|
+
}, yp = (r, e, t) => {
|
|
16450
|
+
const n = He(em(r));
|
|
16421
16451
|
if (!n) return null;
|
|
16422
16452
|
if (e?.telemetry) {
|
|
16423
16453
|
const o = Object.keys(r).map((a) => {
|
|
@@ -16442,7 +16472,7 @@ const hp = ({ docx: r, comments: e }) => {
|
|
|
16442
16472
|
}
|
|
16443
16473
|
const i = Jt(), s = n.elements[0].elements.find((o) => o.name === "w:body");
|
|
16444
16474
|
if (s) {
|
|
16445
|
-
const o = s, a = ["w:sectPr"], u = o.elements?.filter((E) => !a.includes(E.name)) ?? [], c =
|
|
16475
|
+
const o = s, a = ["w:sectPr"], u = o.elements?.filter((E) => !a.includes(E.name)) ?? [], c = hp({ docx: r }), l = {}, g = {
|
|
16446
16476
|
type: "doc",
|
|
16447
16477
|
content: i.handler({
|
|
16448
16478
|
nodes: u,
|
|
@@ -16465,39 +16495,39 @@ const hp = ({ docx: r, comments: e }) => {
|
|
|
16465
16495
|
), {
|
|
16466
16496
|
pmDoc: g,
|
|
16467
16497
|
savedTagsToRestore: o,
|
|
16468
|
-
pageStyles:
|
|
16498
|
+
pageStyles: xp(o, r, e, t),
|
|
16469
16499
|
comments: c,
|
|
16470
|
-
linkedStyles:
|
|
16471
|
-
numbering:
|
|
16500
|
+
linkedStyles: Ap(r),
|
|
16501
|
+
numbering: Ep(r)
|
|
16472
16502
|
};
|
|
16473
16503
|
}
|
|
16474
16504
|
return null;
|
|
16475
16505
|
}, Jt = () => {
|
|
16476
16506
|
const r = [
|
|
16477
|
-
|
|
16478
|
-
|
|
16479
|
-
|
|
16480
|
-
|
|
16481
|
-
|
|
16482
|
-
|
|
16483
|
-
|
|
16484
|
-
|
|
16485
|
-
|
|
16486
|
-
|
|
16487
|
-
|
|
16488
|
-
|
|
16489
|
-
|
|
16490
|
-
|
|
16491
|
-
|
|
16492
|
-
|
|
16493
|
-
|
|
16507
|
+
np,
|
|
16508
|
+
Sm,
|
|
16509
|
+
pp,
|
|
16510
|
+
jm,
|
|
16511
|
+
Im,
|
|
16512
|
+
Fm,
|
|
16513
|
+
Qm,
|
|
16514
|
+
$m,
|
|
16515
|
+
tp,
|
|
16516
|
+
vm,
|
|
16517
|
+
fm,
|
|
16518
|
+
Am,
|
|
16519
|
+
rm,
|
|
16520
|
+
lp,
|
|
16521
|
+
sp,
|
|
16522
|
+
ap,
|
|
16523
|
+
Ym
|
|
16494
16524
|
//this should be the last one, bcs this parses everything!!!
|
|
16495
16525
|
];
|
|
16496
16526
|
return {
|
|
16497
|
-
handler:
|
|
16527
|
+
handler: bp(r),
|
|
16498
16528
|
handlerEntities: r
|
|
16499
16529
|
};
|
|
16500
|
-
},
|
|
16530
|
+
}, bp = (r) => {
|
|
16501
16531
|
const e = (n, i, s, o) => !n || i < 0 || i >= n.length ? {
|
|
16502
16532
|
elementIndex: i,
|
|
16503
16533
|
error: "index_out_of_bounds",
|
|
@@ -16582,7 +16612,7 @@ const hp = ({ docx: r, comments: e }) => {
|
|
|
16582
16612
|
};
|
|
16583
16613
|
return t;
|
|
16584
16614
|
};
|
|
16585
|
-
function
|
|
16615
|
+
function xp(r, e, t, n) {
|
|
16586
16616
|
const i = r.elements?.find((o) => o.name === "w:sectPr"), s = {};
|
|
16587
16617
|
return i?.elements?.forEach((o) => {
|
|
16588
16618
|
const { name: a, attributes: u } = o;
|
|
@@ -16620,9 +16650,9 @@ function bp(r, e, t, n) {
|
|
|
16620
16650
|
case "w:titlePg":
|
|
16621
16651
|
t.headerIds.titlePg = !0;
|
|
16622
16652
|
}
|
|
16623
|
-
}),
|
|
16653
|
+
}), vp(e, t, n), s.alternateHeaders = Cp(e), s;
|
|
16624
16654
|
}
|
|
16625
|
-
function
|
|
16655
|
+
function Ap(r) {
|
|
16626
16656
|
const e = r["word/styles.xml"];
|
|
16627
16657
|
if (!e) return [];
|
|
16628
16658
|
const { elements: t } = e.elements[0], n = t.filter((o) => o.name === "w:style");
|
|
@@ -16632,7 +16662,7 @@ function xp(r) {
|
|
|
16632
16662
|
});
|
|
16633
16663
|
const s = [];
|
|
16634
16664
|
return n.forEach((o) => {
|
|
16635
|
-
const a = o.attributes["w:styleId"], u =
|
|
16665
|
+
const a = o.attributes["w:styleId"], u = Hm(a, r), c = {
|
|
16636
16666
|
id: o.attributes["w:styleId"],
|
|
16637
16667
|
type: o.attributes["w:type"],
|
|
16638
16668
|
definition: u,
|
|
@@ -16641,7 +16671,7 @@ function xp(r) {
|
|
|
16641
16671
|
s.push(c);
|
|
16642
16672
|
}), s;
|
|
16643
16673
|
}
|
|
16644
|
-
function
|
|
16674
|
+
function Dp(r) {
|
|
16645
16675
|
if (!r) return null;
|
|
16646
16676
|
const e = He(r), { elements: t } = e.elements[0];
|
|
16647
16677
|
return Object.keys(Co).forEach((n) => {
|
|
@@ -16651,7 +16681,7 @@ function Ap(r) {
|
|
|
16651
16681
|
}
|
|
16652
16682
|
}), e;
|
|
16653
16683
|
}
|
|
16654
|
-
const
|
|
16684
|
+
const vp = (r, e, t) => {
|
|
16655
16685
|
const i = r["word/_rels/document.xml.rels"].elements.find((g) => g.name === "Relationships"), { elements: s } = i, o = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", a = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", u = s.filter((g) => g.attributes.Type === o), c = s.filter((g) => g.attributes.Type === a), h = (vu(r["word/document.xml"]) || []).flatMap((g) => g.elements);
|
|
16656
16686
|
u.forEach((g) => {
|
|
16657
16687
|
const { rId: E, referenceFile: A, currentFileName: v } = _o(g, r);
|
|
@@ -16689,7 +16719,7 @@ const Dp = (r, e, t) => {
|
|
|
16689
16719
|
currentFileName: n
|
|
16690
16720
|
};
|
|
16691
16721
|
};
|
|
16692
|
-
function
|
|
16722
|
+
function Ep(r) {
|
|
16693
16723
|
let e = r["word/numbering.xml"];
|
|
16694
16724
|
(!e || !e.elements?.length || !e.elements[0].elements?.length) && (e = nu);
|
|
16695
16725
|
const t = e.elements[0].elements, n = t.filter((a) => a.name === "w:abstractNum"), i = t.filter((a) => a.name === "w:num"), s = {};
|
|
@@ -16706,7 +16736,7 @@ function vp(r) {
|
|
|
16706
16736
|
definitions: o
|
|
16707
16737
|
};
|
|
16708
16738
|
}
|
|
16709
|
-
const
|
|
16739
|
+
const Cp = (r) => {
|
|
16710
16740
|
const e = r["word/settings.xml"];
|
|
16711
16741
|
if (!e || !e.elements?.length) return !1;
|
|
16712
16742
|
const { elements: t = [] } = e.elements[0];
|
|
@@ -16720,7 +16750,7 @@ const pt = class pt {
|
|
|
16720
16750
|
}
|
|
16721
16751
|
parseFromXml() {
|
|
16722
16752
|
this.docx?.forEach((e) => {
|
|
16723
|
-
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] =
|
|
16753
|
+
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] = Dp(this.convertedXml[e.name]));
|
|
16724
16754
|
}), this.initialJSON = this.convertedXml["word/document.xml"], this.initialJSON || (this.initialJSON = this.parseXmlToJson(this.xml)), this.declaration = this.initialJSON?.declaration;
|
|
16725
16755
|
}
|
|
16726
16756
|
parseXmlToJson(e) {
|
|
@@ -16739,7 +16769,7 @@ const pt = class pt {
|
|
|
16739
16769
|
return;
|
|
16740
16770
|
}
|
|
16741
16771
|
}
|
|
16742
|
-
static updateDocumentVersion(e = this.convertedXml, t = "0.11.
|
|
16772
|
+
static updateDocumentVersion(e = this.convertedXml, t = "0.11.34") {
|
|
16743
16773
|
const n = "docProps/custom.xml";
|
|
16744
16774
|
e[n] || (e[n] = Fu());
|
|
16745
16775
|
const i = e["docProps/custom.xml"];
|
|
@@ -16792,7 +16822,7 @@ const pt = class pt {
|
|
|
16792
16822
|
if (!l) return;
|
|
16793
16823
|
const g = this.fonts[`word/${l}`]?.buffer;
|
|
16794
16824
|
if (!g) return;
|
|
16795
|
-
const E =
|
|
16825
|
+
const E = Vf(g, c.attributes["w:fontKey"]);
|
|
16796
16826
|
if (!E) return;
|
|
16797
16827
|
const A = new Blob([E], { type: "font/ttf" }), v = URL.createObjectURL(A), F = c.name.includes("Regular"), w = c.name.includes("Bold"), B = c.name.includes("Italic"), R = c.name.includes("Light");
|
|
16798
16828
|
u += `
|
|
@@ -16841,7 +16871,7 @@ const pt = class pt {
|
|
|
16841
16871
|
}
|
|
16842
16872
|
getSchema(e) {
|
|
16843
16873
|
this.getDocumentInternalId();
|
|
16844
|
-
const t =
|
|
16874
|
+
const t = yp({ ...this.convertedXml, media: this.media }, this, e);
|
|
16845
16875
|
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;
|
|
16846
16876
|
}
|
|
16847
16877
|
schemaToXml(e, t = !1) {
|
|
@@ -16871,7 +16901,7 @@ const pt = class pt {
|
|
|
16871
16901
|
});
|
|
16872
16902
|
A = { ...F }, v = w;
|
|
16873
16903
|
}
|
|
16874
|
-
return this.convertedXml = { ...this.convertedXml, ...A }, Ke(this, it, Su).call(this, [...h.relationships, ...v]),
|
|
16904
|
+
return this.convertedXml = { ...this.convertedXml, ...A }, Ke(this, it, Su).call(this, [...h.relationships, ...v]), Sp(this.convertedXml), Ke(this, it, Eu).call(this, h), E;
|
|
16875
16905
|
}
|
|
16876
16906
|
exportToXmlJson({
|
|
16877
16907
|
data: e,
|
|
@@ -16983,7 +17013,7 @@ Cu = function({ defs: e, exportType: t, commentsWithParaIds: n }) {
|
|
|
16983
17013
|
"w:tcPr": "tableCellProperties"
|
|
16984
17014
|
})), Mt(pt, "elements", /* @__PURE__ */ new Set(["w:document", "w:body", "w:p", "w:r", "w:t", "w:delText"]));
|
|
16985
17015
|
let Ot = pt;
|
|
16986
|
-
function
|
|
17016
|
+
function Sp(r) {
|
|
16987
17017
|
const e = "docProps/custom.xml";
|
|
16988
17018
|
r[e] || (r[e] = Fu());
|
|
16989
17019
|
const n = r[e].elements.find((a) => a.name === "Properties");
|
|
@@ -17002,7 +17032,7 @@ function Cp(r) {
|
|
|
17002
17032
|
function Fu() {
|
|
17003
17033
|
return Gf;
|
|
17004
17034
|
}
|
|
17005
|
-
function Bu(r = 2, e = "0.11.
|
|
17035
|
+
function Bu(r = 2, e = "0.11.34") {
|
|
17006
17036
|
return {
|
|
17007
17037
|
type: "element",
|
|
17008
17038
|
name: "property",
|
|
@@ -17028,13 +17058,13 @@ function Bu(r = 2, e = "0.11.32") {
|
|
|
17028
17058
|
export {
|
|
17029
17059
|
md as $,
|
|
17030
17060
|
at as A,
|
|
17031
|
-
|
|
17032
|
-
|
|
17033
|
-
|
|
17034
|
-
|
|
17061
|
+
St as B,
|
|
17062
|
+
xr as C,
|
|
17063
|
+
yr as D,
|
|
17064
|
+
xa as E,
|
|
17035
17065
|
Q as F,
|
|
17036
17066
|
Oi as G,
|
|
17037
|
-
|
|
17067
|
+
jp as H,
|
|
17038
17068
|
ct as I,
|
|
17039
17069
|
et as J,
|
|
17040
17070
|
Ii as K,
|
|
@@ -17042,46 +17072,46 @@ export {
|
|
|
17042
17072
|
br as M,
|
|
17043
17073
|
We as N,
|
|
17044
17074
|
Ot as O,
|
|
17045
|
-
|
|
17046
|
-
|
|
17075
|
+
Mp as P,
|
|
17076
|
+
Ct as Q,
|
|
17047
17077
|
$e as R,
|
|
17048
|
-
|
|
17078
|
+
kp as S,
|
|
17049
17079
|
tt as T,
|
|
17050
17080
|
Of as U,
|
|
17051
|
-
|
|
17052
|
-
|
|
17081
|
+
Xp as V,
|
|
17082
|
+
Up as W,
|
|
17053
17083
|
Za as X,
|
|
17054
17084
|
dd as Y,
|
|
17055
17085
|
Tf as Z,
|
|
17056
17086
|
Sf as _,
|
|
17057
|
-
|
|
17087
|
+
qp as a,
|
|
17058
17088
|
Je as a0,
|
|
17059
17089
|
qo as a1,
|
|
17060
|
-
|
|
17061
|
-
|
|
17062
|
-
|
|
17063
|
-
|
|
17064
|
-
|
|
17065
|
-
|
|
17066
|
-
|
|
17067
|
-
|
|
17068
|
-
|
|
17090
|
+
Kp as a2,
|
|
17091
|
+
Hp as a3,
|
|
17092
|
+
Pp as b,
|
|
17093
|
+
Vp as c,
|
|
17094
|
+
Op as d,
|
|
17095
|
+
Ee as e,
|
|
17096
|
+
ae as f,
|
|
17097
|
+
Jp as g,
|
|
17098
|
+
Ie as h,
|
|
17069
17099
|
zp as i,
|
|
17070
|
-
|
|
17071
|
-
|
|
17072
|
-
|
|
17073
|
-
|
|
17074
|
-
|
|
17100
|
+
Lp as j,
|
|
17101
|
+
Lc as k,
|
|
17102
|
+
Ip as l,
|
|
17103
|
+
Rp as m,
|
|
17104
|
+
Gp as n,
|
|
17075
17105
|
If as o,
|
|
17076
|
-
|
|
17077
|
-
|
|
17106
|
+
Wp as p,
|
|
17107
|
+
Ri as q,
|
|
17078
17108
|
bf as r,
|
|
17079
|
-
|
|
17080
|
-
|
|
17081
|
-
|
|
17082
|
-
|
|
17083
|
-
|
|
17084
|
-
|
|
17085
|
-
|
|
17086
|
-
|
|
17109
|
+
$p as s,
|
|
17110
|
+
ru as t,
|
|
17111
|
+
_a as u,
|
|
17112
|
+
we as v,
|
|
17113
|
+
_p as w,
|
|
17114
|
+
ge as x,
|
|
17115
|
+
Nf as y,
|
|
17116
|
+
Pi as z
|
|
17087
17117
|
};
|