@sobree/core 0.1.7 → 0.1.8
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/embed/viewport.d.ts +7 -6
- package/dist/index.d.ts +4 -7
- package/dist/index.js +366 -392
- package/dist/index.js.map +1 -1
- package/dist/sobree.d.ts +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37,7 +37,7 @@ const qt = {
|
|
|
37
37
|
Letter: { width: 215.9, height: 279.4 },
|
|
38
38
|
Legal: { width: 215.9, height: 355.6 },
|
|
39
39
|
Tabloid: { width: 279.4, height: 431.8 }
|
|
40
|
-
},
|
|
40
|
+
}, kr = {
|
|
41
41
|
size: "A4",
|
|
42
42
|
orientation: "portrait",
|
|
43
43
|
margins: { top: 25, right: 20, bottom: 25, left: 20 },
|
|
@@ -57,17 +57,17 @@ const qt = {
|
|
|
57
57
|
},
|
|
58
58
|
verticalAlign: "top"
|
|
59
59
|
};
|
|
60
|
-
function
|
|
60
|
+
function vr(t) {
|
|
61
61
|
const { width: e, height: n } = qt[t.size];
|
|
62
62
|
return t.orientation === "landscape" ? { widthMM: n, heightMM: e } : { widthMM: e, heightMM: n };
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function pn(t, e) {
|
|
65
65
|
return t.replace(/\{page\}/g, String(e.page)).replace(/\{pages\}/g, String(e.pages));
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function gn(t, e, n) {
|
|
68
68
|
return e === 1 && t.differentFirst ? t.first : e === n && t.differentLast && n > 1 ? t.last : t.default;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function xr(t) {
|
|
71
71
|
const e = Gi(t);
|
|
72
72
|
if (e === 0)
|
|
73
73
|
return [
|
|
@@ -88,7 +88,7 @@ function Er(t) {
|
|
|
88
88
|
endCharOffset: e
|
|
89
89
|
}
|
|
90
90
|
];
|
|
91
|
-
const i =
|
|
91
|
+
const i = Tr(Array.from(n.getClientRects())), o = t.offsetHeight;
|
|
92
92
|
if (i.length <= 1)
|
|
93
93
|
return [
|
|
94
94
|
{
|
|
@@ -119,10 +119,10 @@ function Xi(t, e, n) {
|
|
|
119
119
|
return Math.max(0, i - 1);
|
|
120
120
|
}
|
|
121
121
|
function Vi(t, e, n) {
|
|
122
|
-
const r =
|
|
123
|
-
return r ? (n.setStart(t, 0), n.setEnd(r.node, r.offset),
|
|
122
|
+
const r = Sr(t, e);
|
|
123
|
+
return r ? (n.setStart(t, 0), n.setEnd(r.node, r.offset), Tr(Array.from(n.getClientRects())).length) : 1;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Sr(t, e) {
|
|
126
126
|
const n = document.createTreeWalker(t, NodeFilter.SHOW_TEXT);
|
|
127
127
|
let r = 0, i = n.nextNode();
|
|
128
128
|
for (; i; ) {
|
|
@@ -144,7 +144,7 @@ function Gi(t) {
|
|
|
144
144
|
n += r.length, r = e.nextNode();
|
|
145
145
|
return n;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function Tr(t) {
|
|
148
148
|
const e = [];
|
|
149
149
|
for (const n of t) {
|
|
150
150
|
if (n.width === 0 && n.height === 0) continue;
|
|
@@ -161,11 +161,11 @@ function qi(t) {
|
|
|
161
161
|
const i = t[r];
|
|
162
162
|
if (!i) continue;
|
|
163
163
|
const o = getComputedStyle(i), s = o.position === "absolute" || o.position === "fixed", a = s ? 0 : Math.max(0, i.offsetTop - n);
|
|
164
|
-
(r > 0 || a > 0) && e.push({ type: "glue", height: a }), ro(i) ? (e.push({ type: "penalty", cost: Number.NEGATIVE_INFINITY }), e.push({ type: "box", height: 0, el: i, monolithic: !0 })) : io(i) ? (ke(i) && e.push({ type: "penalty", cost: Number.NEGATIVE_INFINITY }), e.push(re(i, { monolithic: !0 }))) : i.tagName === "P" ? (ke(i) && e.push({ type: "penalty", cost: Number.NEGATIVE_INFINITY }), e.push(...
|
|
164
|
+
(r > 0 || a > 0) && e.push({ type: "glue", height: a }), ro(i) ? (e.push({ type: "penalty", cost: Number.NEGATIVE_INFINITY }), e.push({ type: "box", height: 0, el: i, monolithic: !0 })) : io(i) ? (ke(i) && e.push({ type: "penalty", cost: Number.NEGATIVE_INFINITY }), e.push(re(i, { monolithic: !0 }))) : i.tagName === "P" ? (ke(i) && e.push({ type: "penalty", cost: Number.NEGATIVE_INFINITY }), e.push(...Ar(i, Er(i)))) : i.tagName === "OL" || i.tagName === "UL" ? (ke(i) && e.push({ type: "penalty", cost: Number.NEGATIVE_INFINITY }), e.push(...to(i, Ji(i)))) : i.tagName === "TABLE" ? (ke(i) && e.push({ type: "penalty", cost: Number.NEGATIVE_INFINITY }), e.push(...Qi(i, Zi(i)))) : (ke(i) && e.push({ type: "penalty", cost: Number.NEGATIVE_INFINITY }), e.push(re(i, no(i)))), s || (n = i.offsetTop + i.offsetHeight);
|
|
165
165
|
}
|
|
166
166
|
return e;
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function Er(t) {
|
|
169
169
|
const e = t.dataset.pagPid;
|
|
170
170
|
if (e) return e;
|
|
171
171
|
const n = `p${Math.random().toString(36).slice(2, 10)}`;
|
|
@@ -220,7 +220,7 @@ function eo(t) {
|
|
|
220
220
|
const a = i[s];
|
|
221
221
|
o.push({
|
|
222
222
|
type: "box",
|
|
223
|
-
height:
|
|
223
|
+
height: Cr(a),
|
|
224
224
|
el: a,
|
|
225
225
|
cellTr: t,
|
|
226
226
|
isFirstLineOfParagraph: !0,
|
|
@@ -244,7 +244,7 @@ function to(t, e) {
|
|
|
244
244
|
return [re(t, {})];
|
|
245
245
|
const r = [];
|
|
246
246
|
for (let i = 0; i < n.length; i++) {
|
|
247
|
-
const o = n[i], s =
|
|
247
|
+
const o = n[i], s = Er(o), a = Ar(o, s);
|
|
248
248
|
if (r.push(...a), i < n.length - 1) {
|
|
249
249
|
const l = n[i + 1].offsetTop - (o.offsetTop + o.offsetHeight);
|
|
250
250
|
r.push({ type: "glue", height: l >= 2 ? l : 0 });
|
|
@@ -252,8 +252,8 @@ function to(t, e) {
|
|
|
252
252
|
}
|
|
253
253
|
return r;
|
|
254
254
|
}
|
|
255
|
-
function
|
|
256
|
-
const n =
|
|
255
|
+
function Ar(t, e) {
|
|
256
|
+
const n = xr(t), r = t.hasAttribute("data-keep-next");
|
|
257
257
|
if (n.length <= 1)
|
|
258
258
|
return [
|
|
259
259
|
re(t, {
|
|
@@ -283,7 +283,7 @@ function Pr(t, e) {
|
|
|
283
283
|
function re(t, e) {
|
|
284
284
|
return {
|
|
285
285
|
type: "box",
|
|
286
|
-
height:
|
|
286
|
+
height: Cr(t),
|
|
287
287
|
el: t,
|
|
288
288
|
isFirstLineOfParagraph: !0,
|
|
289
289
|
isLastLineOfParagraph: !0,
|
|
@@ -294,7 +294,7 @@ function no(t) {
|
|
|
294
294
|
const e = t.tagName.toLowerCase(), n = {};
|
|
295
295
|
return /^h[1-6]$/.test(e) && (n.keepWithNext = !0), t.hasAttribute("data-keep-next") && (n.keepWithNext = !0), e === "pre" && (n.monolithic = !0), n;
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function Cr(t) {
|
|
298
298
|
const e = getComputedStyle(t);
|
|
299
299
|
if (e.position === "absolute" || e.position === "fixed") return 0;
|
|
300
300
|
const n = Number.parseFloat(e.marginTop) || 0;
|
|
@@ -311,7 +311,7 @@ function io(t) {
|
|
|
311
311
|
}
|
|
312
312
|
function oo(t, e) {
|
|
313
313
|
var s;
|
|
314
|
-
const n =
|
|
314
|
+
const n = Sr(t, e);
|
|
315
315
|
if (!n) return t;
|
|
316
316
|
const r = document.createRange();
|
|
317
317
|
r.setStart(n.node, n.offset), r.setEnd(t, t.childNodes.length);
|
|
@@ -345,7 +345,7 @@ function ao(t) {
|
|
|
345
345
|
for (const [l] of n) {
|
|
346
346
|
if (l.tagName !== "LI") continue;
|
|
347
347
|
const u = l.parentElement;
|
|
348
|
-
!u || !
|
|
348
|
+
!u || !mn(u) || i.has(u) || (i.add(u), uo(u, r));
|
|
349
349
|
}
|
|
350
350
|
const o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), a = [];
|
|
351
351
|
for (let l = 0; l < t.length; l++) {
|
|
@@ -362,7 +362,7 @@ function ao(t) {
|
|
|
362
362
|
f.push(x), d = null, h = null, p = null, m = null;
|
|
363
363
|
continue;
|
|
364
364
|
}
|
|
365
|
-
E !== d && (h =
|
|
365
|
+
E !== d && (h = bn(E), f.push(h), d = E, o.add(E), p = null, m = null), v !== p && (m = lo(v), h.querySelector(":scope > tbody").appendChild(m), p = v, s.add(v));
|
|
366
366
|
const I = x.closest("td, th");
|
|
367
367
|
if (!I) {
|
|
368
368
|
f.push(x);
|
|
@@ -384,12 +384,12 @@ function ao(t) {
|
|
|
384
384
|
}
|
|
385
385
|
if (x.tagName === "LI") {
|
|
386
386
|
const v = x.parentElement;
|
|
387
|
-
if (!v || !
|
|
387
|
+
if (!v || !mn(v)) {
|
|
388
388
|
f.push(x), d = null, h = null;
|
|
389
389
|
continue;
|
|
390
390
|
}
|
|
391
391
|
if (v !== d) {
|
|
392
|
-
const E = r.get(x) ??
|
|
392
|
+
const E = r.get(x) ?? Nr(v);
|
|
393
393
|
h = fo(v, E), f.push(h), d = v, o.add(v);
|
|
394
394
|
}
|
|
395
395
|
x.dataset.pagContinuation === "1" ? x.classList.add("sobree-li-continuation") : x.classList.remove("sobree-li-continuation"), h.appendChild(x);
|
|
@@ -399,7 +399,7 @@ function ao(t) {
|
|
|
399
399
|
f.push(x), d = null, h = null;
|
|
400
400
|
continue;
|
|
401
401
|
}
|
|
402
|
-
E !== d && (h =
|
|
402
|
+
E !== d && (h = bn(E), f.push(h), d = E, o.add(E));
|
|
403
403
|
const N = (v == null ? void 0 : v.tagName) === "THEAD";
|
|
404
404
|
let I;
|
|
405
405
|
if (N) {
|
|
@@ -436,7 +436,7 @@ function co(t) {
|
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
function
|
|
439
|
+
function mn(t) {
|
|
440
440
|
return t.tagName === "OL" || t.tagName === "UL";
|
|
441
441
|
}
|
|
442
442
|
function lo(t) {
|
|
@@ -452,7 +452,7 @@ function lo(t) {
|
|
|
452
452
|
}
|
|
453
453
|
return e;
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function bn(t) {
|
|
456
456
|
const e = document.createElement("table");
|
|
457
457
|
for (const r of Array.from(t.attributes))
|
|
458
458
|
e.setAttribute(r.name, r.value);
|
|
@@ -466,14 +466,14 @@ function kn(t) {
|
|
|
466
466
|
e.appendChild(document.createElement("tbody"));
|
|
467
467
|
return e;
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function Nr(t) {
|
|
470
470
|
const e = t.getAttribute("start");
|
|
471
471
|
if (!e) return 1;
|
|
472
472
|
const n = Number.parseInt(e, 10);
|
|
473
473
|
return Number.isFinite(n) ? n : 1;
|
|
474
474
|
}
|
|
475
475
|
function uo(t, e) {
|
|
476
|
-
let n =
|
|
476
|
+
let n = Nr(t), r, i = !1;
|
|
477
477
|
for (const o of Array.from(t.children)) {
|
|
478
478
|
if (o.tagName !== "LI") continue;
|
|
479
479
|
const s = o, a = s.dataset.pagPid;
|
|
@@ -497,7 +497,7 @@ function ho(t, e) {
|
|
|
497
497
|
if (r.set(e.get(n[0]), t), i.length === 0) return r;
|
|
498
498
|
let s = t, a = 0;
|
|
499
499
|
for (const l of i) {
|
|
500
|
-
const u = l - a, d = (c =
|
|
500
|
+
const u = l - a, d = (c = xr(s)[u]) == null ? void 0 : c.startCharOffset;
|
|
501
501
|
if (d === void 0 || d === 0) continue;
|
|
502
502
|
const h = so(s, d);
|
|
503
503
|
if (h === 0) continue;
|
|
@@ -774,7 +774,7 @@ function Bo(t) {
|
|
|
774
774
|
function j(t) {
|
|
775
775
|
return Math.round(t / Ro * Fo);
|
|
776
776
|
}
|
|
777
|
-
function
|
|
777
|
+
function Pr(t, e) {
|
|
778
778
|
const n = Array.isArray(t) ? t : t.styles, r = Do(n, e);
|
|
779
779
|
let i = {}, o = {};
|
|
780
780
|
for (let s = r.length - 1; s >= 0; s--) {
|
|
@@ -838,7 +838,7 @@ function $o(t) {
|
|
|
838
838
|
(i) => i.type === "paragraph" && i.basedOn === "DocDefaults"
|
|
839
839
|
);
|
|
840
840
|
}
|
|
841
|
-
const
|
|
841
|
+
const yn = [
|
|
842
842
|
// Calibri & relatives — modern sans-serif.
|
|
843
843
|
//
|
|
844
844
|
// Carlito is Google's open-source, metric-compatible clone of
|
|
@@ -882,7 +882,7 @@ function Oe(t) {
|
|
|
882
882
|
var a;
|
|
883
883
|
const e = t.trim();
|
|
884
884
|
if (e.length === 0) return { stack: e };
|
|
885
|
-
for (const { match: c, chain: l } of
|
|
885
|
+
for (const { match: c, chain: l } of yn)
|
|
886
886
|
if (c.test(e)) return { stack: l };
|
|
887
887
|
const n = e.split(/\s+/);
|
|
888
888
|
let r, i;
|
|
@@ -893,7 +893,7 @@ function Oe(t) {
|
|
|
893
893
|
}
|
|
894
894
|
const o = n.join(" ");
|
|
895
895
|
if (o !== e) {
|
|
896
|
-
const c = (a =
|
|
896
|
+
const c = (a = yn.find(({ match: f }) => f.test(o))) == null ? void 0 : a.chain, l = Tt(e) ? `'${e}'` : e;
|
|
897
897
|
return {
|
|
898
898
|
stack: c ? `${l}, ${c}` : `${l}, ${Tt(o) ? `'${o}'` : o}, serif`,
|
|
899
899
|
...r !== void 0 ? { weight: r } : {},
|
|
@@ -986,8 +986,8 @@ function Wo(t, e, n = []) {
|
|
|
986
986
|
function Yo(t, e) {
|
|
987
987
|
const n = document.createElement("img");
|
|
988
988
|
n.setAttribute("data-part", t.partPath), t.altText && n.setAttribute("alt", t.altText);
|
|
989
|
-
const r =
|
|
990
|
-
return r && n.setAttribute("src", r), t.widthEmu > 0 && (n.style.width = `${
|
|
989
|
+
const r = Ir(t.partPath, e);
|
|
990
|
+
return r && n.setAttribute("src", r), t.widthEmu > 0 && (n.style.width = `${kn(t.widthEmu)}px`), t.heightEmu > 0 && (n.style.height = `${kn(t.heightEmu)}px`), t.verticalAlign === "middle" && (n.style.verticalAlign = "middle"), t.placement === "anchor" && t.anchor ? Vo(n, t.anchor) : (t.placement === "floatLeft" || t.placement === "floatRight") && Xo(n, t), n;
|
|
991
991
|
}
|
|
992
992
|
function Xo(t, e) {
|
|
993
993
|
t.style.float = e.placement === "floatLeft" ? "left" : "right";
|
|
@@ -1000,9 +1000,9 @@ function Vo(t, e) {
|
|
|
1000
1000
|
function de(t) {
|
|
1001
1001
|
return Math.round(t / 914400 * 25.4 * 100) / 100;
|
|
1002
1002
|
}
|
|
1003
|
-
function
|
|
1003
|
+
function Ir(t, e) {
|
|
1004
1004
|
const n = e[t];
|
|
1005
|
-
return n ? typeof URL > "u" || typeof URL.createObjectURL != "function" ? `data:${
|
|
1005
|
+
return n ? typeof URL > "u" || typeof URL.createObjectURL != "function" ? `data:${wn(t)};base64,${Go(n)}` : Ko(n, wn(t)) : null;
|
|
1006
1006
|
}
|
|
1007
1007
|
function Go(t) {
|
|
1008
1008
|
let e = "";
|
|
@@ -1013,7 +1013,7 @@ function Go(t) {
|
|
|
1013
1013
|
if (!r) throw new Error("bytesToBase64: no `btoa` or `Buffer` available.");
|
|
1014
1014
|
return r.from(e, "binary").toString("base64");
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1016
|
+
function wn(t) {
|
|
1017
1017
|
var n;
|
|
1018
1018
|
const e = ((n = t.split(".").pop()) == null ? void 0 : n.toLowerCase()) ?? "";
|
|
1019
1019
|
return e === "png" ? "image/png" : e === "jpg" || e === "jpeg" ? "image/jpeg" : e === "gif" ? "image/gif" : e === "webp" ? "image/webp" : e === "svg" ? "image/svg+xml" : "application/octet-stream";
|
|
@@ -1024,7 +1024,7 @@ function Ko(t, e) {
|
|
|
1024
1024
|
const r = new Blob([n], { type: e });
|
|
1025
1025
|
return URL.createObjectURL(r);
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1027
|
+
function kn(t) {
|
|
1028
1028
|
return Math.round(t / 914400 * 96);
|
|
1029
1029
|
}
|
|
1030
1030
|
function le(t, e) {
|
|
@@ -1058,7 +1058,7 @@ function Zo(t, e, n = [], r = [], i = {}) {
|
|
|
1058
1058
|
const l = document.createElement("thead");
|
|
1059
1059
|
for (const { r: u, i: f } of a)
|
|
1060
1060
|
l.appendChild(
|
|
1061
|
-
|
|
1061
|
+
vn(u, f, "th", s, n, r, i, e)
|
|
1062
1062
|
);
|
|
1063
1063
|
o.appendChild(l);
|
|
1064
1064
|
}
|
|
@@ -1066,13 +1066,13 @@ function Zo(t, e, n = [], r = [], i = {}) {
|
|
|
1066
1066
|
const l = document.createElement("tbody");
|
|
1067
1067
|
for (const { r: u, i: f } of c)
|
|
1068
1068
|
l.appendChild(
|
|
1069
|
-
|
|
1069
|
+
vn(u, f, "td", s, n, r, i, e)
|
|
1070
1070
|
);
|
|
1071
1071
|
o.appendChild(l);
|
|
1072
1072
|
}
|
|
1073
1073
|
return o;
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1075
|
+
function vn(t, e, n, r, i, o, s, a) {
|
|
1076
1076
|
const c = document.createElement("tr");
|
|
1077
1077
|
let l = 0;
|
|
1078
1078
|
for (const u of t.cells) {
|
|
@@ -1147,7 +1147,7 @@ function ns(t) {
|
|
|
1147
1147
|
}
|
|
1148
1148
|
function Jt(t, e, n = []) {
|
|
1149
1149
|
var l, u, f, d, h, p;
|
|
1150
|
-
const r = e.styleId ?? "Normal", { runDefaults: i, paragraphDefaults: o } = n.length > 0 ?
|
|
1150
|
+
const r = e.styleId ?? "Normal", { runDefaults: i, paragraphDefaults: o } = n.length > 0 ? Pr(n, r) : { runDefaults: {}, paragraphDefaults: {} }, s = rs(o, e), a = { ...i, ...e.runDefaults ?? {} };
|
|
1151
1151
|
if (a.fontFamily) {
|
|
1152
1152
|
const m = Oe(a.fontFamily);
|
|
1153
1153
|
t.style.fontFamily = m.stack, m.weight !== void 0 && (t.style.fontWeight = String(m.weight)), m.italic && (t.style.fontStyle = "italic");
|
|
@@ -1258,7 +1258,7 @@ function ds(t, e, n, r, i) {
|
|
|
1258
1258
|
const s = t.groupExtentEmu.wEmu, a = t.groupExtentEmu.hEmu, c = (p) => s > 0 ? p / s * 100 : 0, l = (p) => a > 0 ? p / a * 100 : 0, u = t.textboxes.length > 1 || t.textboxes.length === 1 && t.pictures.length === 0 && t.shapes.length === 0;
|
|
1259
1259
|
if (!u)
|
|
1260
1260
|
for (const p of t.pictures) {
|
|
1261
|
-
const m =
|
|
1261
|
+
const m = Ir(p.partPath, r);
|
|
1262
1262
|
if (!m) continue;
|
|
1263
1263
|
const y = document.createElement("img");
|
|
1264
1264
|
y.src = m, y.alt = p.altText ?? "", y.style.position = "absolute", y.style.left = `${c(p.offsetEmu.xEmu)}%`, y.style.top = `${l(p.offsetEmu.yEmu)}%`, y.style.width = `${c(p.sizeEmu.wEmu)}%`, y.style.height = `${l(p.sizeEmu.hEmu)}%`, y.style.objectFit = "fill", o.appendChild(y);
|
|
@@ -1305,24 +1305,24 @@ function gs(t, e) {
|
|
|
1305
1305
|
const r = t[n], i = t.slice();
|
|
1306
1306
|
return i[n] = { ...r, runs: [...e, ...r.runs] }, i;
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function Rr(t, e) {
|
|
1309
1309
|
var n, r, i;
|
|
1310
1310
|
if (((n = e.block) == null ? void 0 : n.call(e, t)) !== !1) {
|
|
1311
1311
|
if (t.kind === "paragraph") {
|
|
1312
1312
|
if (((r = e.paragraph) == null ? void 0 : r.call(e, t)) === !1) return;
|
|
1313
|
-
for (const o of t.runs)
|
|
1313
|
+
for (const o of t.runs) Fr(o, e);
|
|
1314
1314
|
} else if (t.kind === "table") {
|
|
1315
1315
|
if (((i = e.table) == null ? void 0 : i.call(e, t)) === !1) return;
|
|
1316
1316
|
for (const o of t.rows)
|
|
1317
1317
|
for (const s of o.cells)
|
|
1318
|
-
for (const a of s.content)
|
|
1318
|
+
for (const a of s.content) Rr(a, e);
|
|
1319
1319
|
}
|
|
1320
1320
|
}
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1322
|
+
function Fr(t, e) {
|
|
1323
1323
|
var n;
|
|
1324
1324
|
if (((n = e.run) == null ? void 0 : n.call(e, t)) !== !1 && t.kind === "hyperlink")
|
|
1325
|
-
for (const r of t.children)
|
|
1325
|
+
for (const r of t.children) Fr(r, e);
|
|
1326
1326
|
}
|
|
1327
1327
|
function me(t) {
|
|
1328
1328
|
let e = "";
|
|
@@ -1388,13 +1388,13 @@ function ks(t, e) {
|
|
|
1388
1388
|
}
|
|
1389
1389
|
r !== void 0 && !t.style.fontSize && (t.style.fontSize = `${r}pt`);
|
|
1390
1390
|
}
|
|
1391
|
-
function
|
|
1391
|
+
function xn(t, e) {
|
|
1392
1392
|
const n = e == null ? void 0 : e.columns;
|
|
1393
1393
|
if (!n || n.count <= 1) return t;
|
|
1394
1394
|
const r = document.createElement("div");
|
|
1395
1395
|
return r.className = "sobree-section-cols", r.style.columnCount = String(n.count), n.spaceTwips !== void 0 && (r.style.columnGap = `${j(n.spaceTwips)}mm`), t.appendChild(r), r;
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1397
|
+
function Sn(t, e) {
|
|
1398
1398
|
if (!t.classList.contains("sobree-section-cols")) return;
|
|
1399
1399
|
const n = [];
|
|
1400
1400
|
for (; t.lastElementChild; ) {
|
|
@@ -1414,7 +1414,7 @@ function xs(t) {
|
|
|
1414
1414
|
return !(t.tagName !== "P" && t.tagName !== "LI" || (t.textContent ?? "").trim().length > 0 || t.querySelector("img, svg, table") !== null);
|
|
1415
1415
|
}
|
|
1416
1416
|
function be(t, e, n, r = [], i = {}, o, s = []) {
|
|
1417
|
-
let a = null, c = 0, l =
|
|
1417
|
+
let a = null, c = 0, l = xn(e, s[0]), u = !1;
|
|
1418
1418
|
const f = (h) => {
|
|
1419
1419
|
if (h.kind === "section_break" || h.kind === "table" || h.kind !== "paragraph") return !1;
|
|
1420
1420
|
for (const p of h.runs)
|
|
@@ -1435,7 +1435,7 @@ function be(t, e, n, r = [], i = {}, o, s = []) {
|
|
|
1435
1435
|
l.appendChild(E), a = { el: E, numId: y.numId };
|
|
1436
1436
|
}
|
|
1437
1437
|
const v = document.createElement("li");
|
|
1438
|
-
m && (v.dataset.blockId = m), v.dataset.sectionIndex = String(c), v.dataset.blockIndex = String(h), Jt(v, p.properties, r), ls(v, p, n),
|
|
1438
|
+
m && (v.dataset.blockId = m), v.dataset.sectionIndex = String(c), v.dataset.blockIndex = String(h), Jt(v, p.properties, r), ls(v, p, n), Tn(v, p.properties), Pe(v, p.runs, i, r), a.el.appendChild(v);
|
|
1439
1439
|
continue;
|
|
1440
1440
|
}
|
|
1441
1441
|
d();
|
|
@@ -1446,9 +1446,9 @@ function be(t, e, n, r = [], i = {}, o, s = []) {
|
|
|
1446
1446
|
i,
|
|
1447
1447
|
S
|
|
1448
1448
|
);
|
|
1449
|
-
x && (m && (x.dataset.blockId = m), x.dataset.sectionIndex = String(c), x.dataset.blockIndex = String(h), p.kind === "paragraph" &&
|
|
1449
|
+
x && (m && (x.dataset.blockId = m), x.dataset.sectionIndex = String(c), x.dataset.blockIndex = String(h), p.kind === "paragraph" && Tn(x, p.properties), p.kind === "section_break" ? (Sn(l, e), e.appendChild(x)) : l.appendChild(x)), p.kind === "section_break" && (vs(e), c += 1, l = xn(e, s[c]));
|
|
1450
1450
|
}
|
|
1451
|
-
|
|
1451
|
+
Sn(l, e);
|
|
1452
1452
|
}
|
|
1453
1453
|
function Ss(t, e, n, r, i) {
|
|
1454
1454
|
return t.kind === "paragraph" ? ms(t, n, r) : t.kind === "table" ? Zo(t, be, e, n, r) : t.kind === "section_break" ? Ts(i) : t.kind === "inline_frame" ? ds(t, e, n, r, be) : null;
|
|
@@ -1463,7 +1463,7 @@ function Ts(t) {
|
|
|
1463
1463
|
const i = n ? "Section break · continuous" : "Section break · next page";
|
|
1464
1464
|
return e.innerHTML = `<span class="sobree-section-break__label" aria-hidden="true">${i}</span>`, e;
|
|
1465
1465
|
}
|
|
1466
|
-
function
|
|
1466
|
+
function Tn(t, e) {
|
|
1467
1467
|
const n = e.revision;
|
|
1468
1468
|
n && (t.dataset.blockRevision = n.type, n.author !== void 0 && (t.dataset.blockRevisionAuthor = n.author), n.date !== void 0 && (t.dataset.blockRevisionDate = n.date));
|
|
1469
1469
|
}
|
|
@@ -1471,10 +1471,10 @@ function Es(t, e) {
|
|
|
1471
1471
|
const n = document.createElement("div");
|
|
1472
1472
|
n.className = "paper-anchors", n.style.position = "absolute", n.style.inset = "0", n.style.isolation = "isolate", n.style.pointerEvents = "none";
|
|
1473
1473
|
for (const r of t)
|
|
1474
|
-
n.appendChild(
|
|
1474
|
+
n.appendChild(Lr(r, e));
|
|
1475
1475
|
return n;
|
|
1476
1476
|
}
|
|
1477
|
-
function
|
|
1477
|
+
function Lr(t, e) {
|
|
1478
1478
|
const n = document.createElement("div");
|
|
1479
1479
|
return n.className = "paper-anchor", n.dataset.anchorId = t.id, n.style.position = "absolute", n.style.left = `${H(t.offsetXEmu)}mm`, n.style.top = `${H(t.offsetYEmu)}mm`, n.style.width = `${H(t.widthEmu)}mm`, n.style.height = `${H(t.heightEmu)}mm`, n.style.overflow = "hidden", n.style.boxSizing = "border-box", t.zIndex !== void 0 && (n.style.zIndex = String(t.zIndex)), n.style.pointerEvents = "none", As(n, t, e), n;
|
|
1480
1480
|
}
|
|
@@ -1498,7 +1498,7 @@ function Cs(t, e, n) {
|
|
|
1498
1498
|
i.src = r, i.alt = e.altText ?? "", i.style.width = "100%", i.style.height = "100%", i.style.display = "block", i.style.objectFit = "fill", t.appendChild(i);
|
|
1499
1499
|
}
|
|
1500
1500
|
function Ns(t, e) {
|
|
1501
|
-
switch (e.fill && (t.style.background = e.fill), e.border &&
|
|
1501
|
+
switch (e.fill && (t.style.background = e.fill), e.border && Br(t, e.border), e.geometry) {
|
|
1502
1502
|
case "ellipse":
|
|
1503
1503
|
t.style.borderRadius = "50%";
|
|
1504
1504
|
break;
|
|
@@ -1508,7 +1508,7 @@ function Ns(t, e) {
|
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
1510
|
function Ps(t, e, n) {
|
|
1511
|
-
if (e.fill && (t.style.background = e.fill), e.border &&
|
|
1511
|
+
if (e.fill && (t.style.background = e.fill), e.border && Br(t, e.border), e.padding) {
|
|
1512
1512
|
const r = e.padding;
|
|
1513
1513
|
t.style.padding = `${H(r.topEmu)}mm ${H(r.rightEmu)}mm ${H(r.bottomEmu)}mm ${H(r.leftEmu)}mm`;
|
|
1514
1514
|
}
|
|
@@ -1524,7 +1524,7 @@ function Ps(t, e, n) {
|
|
|
1524
1524
|
function Is(t, e, n, r, i) {
|
|
1525
1525
|
const o = e.childCoordSystemCx > 0 ? n / e.childCoordSystemCx : 1, s = e.childCoordSystemCy > 0 ? r / e.childCoordSystemCy : 1;
|
|
1526
1526
|
for (const a of e.children) {
|
|
1527
|
-
const c =
|
|
1527
|
+
const c = Lr(
|
|
1528
1528
|
{
|
|
1529
1529
|
...a,
|
|
1530
1530
|
offsetXEmu: a.offsetXEmu * o,
|
|
@@ -1537,7 +1537,7 @@ function Is(t, e, n, r, i) {
|
|
|
1537
1537
|
t.appendChild(c);
|
|
1538
1538
|
}
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1540
|
+
function Br(t, e) {
|
|
1541
1541
|
const n = Math.max(1, Math.round(Bo(e.widthEmu)));
|
|
1542
1542
|
t.style.border = `${n}px ${e.style} ${e.color}`;
|
|
1543
1543
|
}
|
|
@@ -1566,7 +1566,7 @@ function Fs(t) {
|
|
|
1566
1566
|
return "application/octet-stream";
|
|
1567
1567
|
}
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1569
|
+
function En(t, e) {
|
|
1570
1570
|
if (t.replaceChildren(), e.blocks.length === 0) {
|
|
1571
1571
|
t.classList.add("is-empty");
|
|
1572
1572
|
return;
|
|
@@ -1579,7 +1579,7 @@ function ue(t, e, n) {
|
|
|
1579
1579
|
const r = Es(e, n);
|
|
1580
1580
|
t.replaceChildren(...Array.from(r.children)), t.classList.toggle("is-empty", e.length === 0);
|
|
1581
1581
|
}
|
|
1582
|
-
function
|
|
1582
|
+
function An(t, e) {
|
|
1583
1583
|
t.textContent = e, t.classList.toggle("is-empty", e.trim() === "");
|
|
1584
1584
|
}
|
|
1585
1585
|
function Ls(t, e, n) {
|
|
@@ -1669,8 +1669,8 @@ class Bs {
|
|
|
1669
1669
|
), this.comments = document.createElement("div"), this.comments.className = "paper-comments is-empty", this.comments.contentEditable = "false", this.outer.append(this.root, this.comments), e.appendChild(this.outer), this.applySetup(n);
|
|
1670
1670
|
}
|
|
1671
1671
|
applySetup(e) {
|
|
1672
|
-
const { widthMM: n, heightMM: r } =
|
|
1673
|
-
o.width = `${n}mm`, o.height = `${r}mm`, o.setProperty("--margin-top", `${i.top}mm`), o.setProperty("--margin-right", `${i.right}mm`), o.setProperty("--margin-bottom", `${i.bottom}mm`), o.setProperty("--margin-left", `${i.left}mm`),
|
|
1672
|
+
const { widthMM: n, heightMM: r } = vr(e), i = e.margins, o = this.root.style;
|
|
1673
|
+
o.width = `${n}mm`, o.height = `${r}mm`, o.setProperty("--margin-top", `${i.top}mm`), o.setProperty("--margin-right", `${i.right}mm`), o.setProperty("--margin-bottom", `${i.bottom}mm`), o.setProperty("--margin-left", `${i.left}mm`), Cn(this.content, e.verticalAlign);
|
|
1674
1674
|
}
|
|
1675
1675
|
/**
|
|
1676
1676
|
* Apply per-section settings on top of the base PageSetup. Currently
|
|
@@ -1679,7 +1679,7 @@ class Bs {
|
|
|
1679
1679
|
* PaperStack after pagination distributes content.
|
|
1680
1680
|
*/
|
|
1681
1681
|
applySectionOverride(e) {
|
|
1682
|
-
|
|
1682
|
+
Cn(this.content, e.vAlign);
|
|
1683
1683
|
const n = e.pageMargins;
|
|
1684
1684
|
if ((n == null ? void 0 : n.headerTwips) !== void 0) {
|
|
1685
1685
|
const r = n.headerTwips / 1440 * 25.4;
|
|
@@ -1697,10 +1697,10 @@ class Bs {
|
|
|
1697
1697
|
* substituted with this paper's page number / the total count.
|
|
1698
1698
|
*/
|
|
1699
1699
|
setHeaderBlocks(e) {
|
|
1700
|
-
|
|
1700
|
+
En(this.header, e), this.applyZoneOverflowPadding();
|
|
1701
1701
|
}
|
|
1702
1702
|
setFooterBlocks(e) {
|
|
1703
|
-
|
|
1703
|
+
En(this.footer, e), this.applyZoneOverflowPadding();
|
|
1704
1704
|
}
|
|
1705
1705
|
/**
|
|
1706
1706
|
* Paint the header zone's floating frames. Resolved against the header
|
|
@@ -1774,10 +1774,10 @@ class Bs {
|
|
|
1774
1774
|
* paragraph; kept as a separate method to keep the call sites obvious.
|
|
1775
1775
|
*/
|
|
1776
1776
|
setHeaderText(e) {
|
|
1777
|
-
|
|
1777
|
+
An(this.header, e);
|
|
1778
1778
|
}
|
|
1779
1779
|
setFooterText(e) {
|
|
1780
|
-
|
|
1780
|
+
An(this.footer, e);
|
|
1781
1781
|
}
|
|
1782
1782
|
/**
|
|
1783
1783
|
* Replace the anchor layer with frames whose anchor resolves to this
|
|
@@ -1813,7 +1813,7 @@ function ze(t) {
|
|
|
1813
1813
|
}
|
|
1814
1814
|
return 0;
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1816
|
+
function Cn(t, e) {
|
|
1817
1817
|
e === "center" || e === "bottom" || e === "both" ? (t.style.display = "flex", t.style.flexDirection = "column", t.style.justifyContent = Ds(e)) : (t.style.display = "", t.style.flexDirection = "", t.style.justifyContent = "");
|
|
1818
1818
|
}
|
|
1819
1819
|
function Ds(t) {
|
|
@@ -2148,7 +2148,7 @@ class js {
|
|
|
2148
2148
|
const o = e.content.offsetHeight;
|
|
2149
2149
|
if (o > 0) return o;
|
|
2150
2150
|
}
|
|
2151
|
-
const { heightMM: n } =
|
|
2151
|
+
const { heightMM: n } = vr(this.setup), { top: r, bottom: i } = this.setup.margins;
|
|
2152
2152
|
return (n - r - i) * _s;
|
|
2153
2153
|
}
|
|
2154
2154
|
collectAllBlocks() {
|
|
@@ -2181,8 +2181,8 @@ class js {
|
|
|
2181
2181
|
totalPages: e
|
|
2182
2182
|
}), i.setHeaderFrames(((f = n.headerFooterFrames) == null ? void 0 : f[l.partId]) ?? [], r);
|
|
2183
2183
|
else {
|
|
2184
|
-
const h =
|
|
2185
|
-
i.setHeaderText(
|
|
2184
|
+
const h = gn(this.setup.header, s, e);
|
|
2185
|
+
i.setHeaderText(pn(h, { page: s, pages: e })), i.setHeaderFrames([], this.emptyAnchorCtx());
|
|
2186
2186
|
}
|
|
2187
2187
|
if (n && r && u !== null)
|
|
2188
2188
|
i.setFooterBlocks({
|
|
@@ -2194,8 +2194,8 @@ class js {
|
|
|
2194
2194
|
totalPages: e
|
|
2195
2195
|
}), i.setFooterFrames(((d = n.headerFooterFrames) == null ? void 0 : d[u.partId]) ?? [], r);
|
|
2196
2196
|
else {
|
|
2197
|
-
const h =
|
|
2198
|
-
i.setFooterText(
|
|
2197
|
+
const h = gn(this.setup.footer, s, e);
|
|
2198
|
+
i.setFooterText(pn(h, { page: s, pages: e })), i.setFooterFrames([], this.emptyAnchorCtx());
|
|
2199
2199
|
}
|
|
2200
2200
|
}), this.paintAnchorLayers();
|
|
2201
2201
|
}
|
|
@@ -2318,7 +2318,7 @@ function Ws(t) {
|
|
|
2318
2318
|
for (; e; ) {
|
|
2319
2319
|
const n = e.nextElementSibling;
|
|
2320
2320
|
if (n && Ys(e, n)) {
|
|
2321
|
-
|
|
2321
|
+
Mr(e, n), n.remove();
|
|
2322
2322
|
continue;
|
|
2323
2323
|
}
|
|
2324
2324
|
e = n;
|
|
@@ -2348,13 +2348,13 @@ function Vs(t) {
|
|
|
2348
2348
|
for (; e; ) {
|
|
2349
2349
|
const n = e.nextElementSibling;
|
|
2350
2350
|
if (n && e.tagName === "LI" && n.tagName === "LI" && e.dataset.pagPid && e.dataset.pagPid === n.dataset.pagPid) {
|
|
2351
|
-
|
|
2351
|
+
Mr(e, n), n.remove();
|
|
2352
2352
|
continue;
|
|
2353
2353
|
}
|
|
2354
2354
|
e = n;
|
|
2355
2355
|
}
|
|
2356
2356
|
}
|
|
2357
|
-
function
|
|
2357
|
+
function Mr(t, e) {
|
|
2358
2358
|
for (; e.firstChild; ) t.appendChild(e.firstChild);
|
|
2359
2359
|
delete t.dataset.pagContinuation, t.classList.remove("sobree-li-continuation");
|
|
2360
2360
|
}
|
|
@@ -2368,18 +2368,18 @@ function Gs(t) {
|
|
|
2368
2368
|
const e = t.map((n) => n.slice());
|
|
2369
2369
|
for (; e.length >= 2; ) {
|
|
2370
2370
|
const n = e[e.length - 1];
|
|
2371
|
-
if (!n || !n.every(
|
|
2371
|
+
if (!n || !n.every(Nn)) break;
|
|
2372
2372
|
e[e.length - 2].push(...n), e.pop();
|
|
2373
2373
|
}
|
|
2374
2374
|
for (let n = e.length - 2; n >= 0; n--) {
|
|
2375
2375
|
const r = e[n];
|
|
2376
|
-
if (r.length === 0 || !r.every(
|
|
2376
|
+
if (r.length === 0 || !r.every(Nn)) continue;
|
|
2377
2377
|
const i = e[n + 1];
|
|
2378
2378
|
i && (i.unshift(...r), e.splice(n, 1));
|
|
2379
2379
|
}
|
|
2380
2380
|
return e;
|
|
2381
2381
|
}
|
|
2382
|
-
function
|
|
2382
|
+
function Nn(t) {
|
|
2383
2383
|
const e = t.tagName;
|
|
2384
2384
|
return !(e !== "P" && e !== "LI" && e !== "H1" && e !== "H2" && e !== "H3" && e !== "H4" && e !== "H5" && e !== "H6" || (t.textContent ?? "").trim().length > 0 || t.querySelector(
|
|
2385
2385
|
"img, svg, table, canvas, iframe, video, [class*='sobree-section-frame'], [data-sobree-drawing]"
|
|
@@ -2391,7 +2391,7 @@ function Ks(t, e) {
|
|
|
2391
2391
|
if (t[n] !== e[n]) return !1;
|
|
2392
2392
|
return !0;
|
|
2393
2393
|
}
|
|
2394
|
-
const qs = 11906, Js = 16838, Ae = 1440,
|
|
2394
|
+
const qs = 11906, Js = 16838, Ae = 1440, Pn = Ae / 2, Zs = 240, In = 11;
|
|
2395
2395
|
function Qt() {
|
|
2396
2396
|
return {
|
|
2397
2397
|
body: [Re()],
|
|
@@ -2420,8 +2420,8 @@ function ta() {
|
|
|
2420
2420
|
rightTwips: Ae,
|
|
2421
2421
|
bottomTwips: Ae,
|
|
2422
2422
|
leftTwips: Ae,
|
|
2423
|
-
headerTwips:
|
|
2424
|
-
footerTwips:
|
|
2423
|
+
headerTwips: Pn,
|
|
2424
|
+
footerTwips: Pn,
|
|
2425
2425
|
gutterTwips: 0
|
|
2426
2426
|
};
|
|
2427
2427
|
}
|
|
@@ -2455,7 +2455,7 @@ function en() {
|
|
|
2455
2455
|
displayName: "Normal",
|
|
2456
2456
|
runDefaults: {
|
|
2457
2457
|
fontFamily: "Helvetica",
|
|
2458
|
-
fontSizePt:
|
|
2458
|
+
fontSizePt: In
|
|
2459
2459
|
},
|
|
2460
2460
|
// Word hardcoded default — single line, zero before/after.
|
|
2461
2461
|
paragraphDefaults: {
|
|
@@ -2464,7 +2464,7 @@ function en() {
|
|
|
2464
2464
|
}
|
|
2465
2465
|
];
|
|
2466
2466
|
for (let n = 1; n <= 6; n++) {
|
|
2467
|
-
const r = t[n - 1] ??
|
|
2467
|
+
const r = t[n - 1] ?? In;
|
|
2468
2468
|
e.push({
|
|
2469
2469
|
id: `Heading${n}`,
|
|
2470
2470
|
type: "paragraph",
|
|
@@ -2523,7 +2523,7 @@ function je(t) {
|
|
|
2523
2523
|
const l = { type: s, partId: c };
|
|
2524
2524
|
o === "header" ? e.headerRefs.push(l) : e.footerRefs.push(l), n[c] = sa(a);
|
|
2525
2525
|
};
|
|
2526
|
-
return
|
|
2526
|
+
return Fn(t.header) && (i("header", "default", t.header.default), t.header.differentFirst && t.header.first && i("header", "first", t.header.first)), Fn(t.footer) && (i("footer", "default", t.footer.default), t.footer.differentFirst && t.footer.first && i("footer", "first", t.footer.first)), (t.header.differentFirst || t.footer.differentFirst) && (e.titlePage = !0), { section: e, headerFooterBodies: n };
|
|
2527
2527
|
}
|
|
2528
2528
|
function Dt(t, e) {
|
|
2529
2529
|
const n = {}, { size: r, orientation: i } = oa(t.pageSize.wTwips, t.pageSize.hTwips);
|
|
@@ -2533,12 +2533,12 @@ function Dt(t, e) {
|
|
|
2533
2533
|
bottom: We(t.pageMargins.bottomTwips),
|
|
2534
2534
|
left: We(t.pageMargins.leftTwips)
|
|
2535
2535
|
};
|
|
2536
|
-
const o =
|
|
2536
|
+
const o = Rn(t.headerRefs, e, t.titlePage === !0);
|
|
2537
2537
|
o && (n.header = o);
|
|
2538
|
-
const s =
|
|
2538
|
+
const s = Rn(t.footerRefs, e, t.titlePage === !0);
|
|
2539
2539
|
return s && (n.footer = s), t.vAlign && (n.verticalAlign = t.vAlign), n;
|
|
2540
2540
|
}
|
|
2541
|
-
function
|
|
2541
|
+
function Rn(t, e, n) {
|
|
2542
2542
|
if (t.length === 0) return null;
|
|
2543
2543
|
const r = {
|
|
2544
2544
|
default: "",
|
|
@@ -2584,7 +2584,7 @@ function oa(t, e) {
|
|
|
2584
2584
|
}
|
|
2585
2585
|
return { size: a, orientation: i ? "portrait" : "landscape" };
|
|
2586
2586
|
}
|
|
2587
|
-
function
|
|
2587
|
+
function Fn(t) {
|
|
2588
2588
|
return t.default.length > 0 || t.differentFirst && t.first.length > 0;
|
|
2589
2589
|
}
|
|
2590
2590
|
function We(t) {
|
|
@@ -2853,29 +2853,29 @@ function xa(t, e, n) {
|
|
|
2853
2853
|
b("w:drawing", { "xmlns:wp": g.wp }, y)
|
|
2854
2854
|
);
|
|
2855
2855
|
}
|
|
2856
|
-
const
|
|
2857
|
-
function
|
|
2856
|
+
const Or = (t) => t / 2, Dr = (t) => Math.round(t * 2), Sa = 240, Ta = (t) => t / Sa;
|
|
2857
|
+
function $r(t, e, n) {
|
|
2858
2858
|
const r = [];
|
|
2859
2859
|
let i = 0;
|
|
2860
2860
|
for (; i < t.length; ) {
|
|
2861
|
-
const o = t[i], s =
|
|
2861
|
+
const o = t[i], s = Ln(o);
|
|
2862
2862
|
if (!s) {
|
|
2863
|
-
r.push(
|
|
2863
|
+
r.push(Bn(o, e, n)), i += 1;
|
|
2864
2864
|
continue;
|
|
2865
2865
|
}
|
|
2866
2866
|
let a = i + 1;
|
|
2867
2867
|
for (; a < t.length; ) {
|
|
2868
|
-
const l =
|
|
2868
|
+
const l = Ln(t[a]);
|
|
2869
2869
|
if (!l || l.type !== s.type || l.author !== s.author || l.date !== s.date)
|
|
2870
2870
|
break;
|
|
2871
2871
|
a += 1;
|
|
2872
2872
|
}
|
|
2873
|
-
const c = t.slice(i, a).map((l) =>
|
|
2873
|
+
const c = t.slice(i, a).map((l) => Bn(l, e, n, s.type === "del")).join("");
|
|
2874
2874
|
r.push(Ea(s, c, e)), i = a;
|
|
2875
2875
|
}
|
|
2876
2876
|
return r.join("");
|
|
2877
2877
|
}
|
|
2878
|
-
function
|
|
2878
|
+
function Ln(t) {
|
|
2879
2879
|
if (t.kind === "text")
|
|
2880
2880
|
return t.properties.revision;
|
|
2881
2881
|
}
|
|
@@ -2885,14 +2885,14 @@ function Ea(t, e, n) {
|
|
|
2885
2885
|
};
|
|
2886
2886
|
return t.author !== void 0 && (i["w:author"] = t.author), t.date !== void 0 && (i["w:date"] = t.date), b(r, i, e);
|
|
2887
2887
|
}
|
|
2888
|
-
function
|
|
2888
|
+
function Bn(t, e, n, r = !1) {
|
|
2889
2889
|
switch (t.kind) {
|
|
2890
2890
|
case "text":
|
|
2891
|
-
return
|
|
2891
|
+
return Hr(t.text, t.properties, e, r);
|
|
2892
2892
|
case "break":
|
|
2893
2893
|
return Na(t.type);
|
|
2894
2894
|
case "tab":
|
|
2895
|
-
return
|
|
2895
|
+
return _r([b("w:tab")], t.properties, e);
|
|
2896
2896
|
case "field":
|
|
2897
2897
|
return Pa(t.instruction, t.cached ?? "", t.properties, e);
|
|
2898
2898
|
case "hyperlink":
|
|
@@ -2904,18 +2904,18 @@ function Dn(t, e, n, r = !1) {
|
|
|
2904
2904
|
}
|
|
2905
2905
|
}
|
|
2906
2906
|
function Aa(t, e, n) {
|
|
2907
|
-
const r =
|
|
2907
|
+
const r = $r(t.children, e, n);
|
|
2908
2908
|
if (!t.href) return r;
|
|
2909
2909
|
const i = ha(e, t.href);
|
|
2910
2910
|
return b("w:hyperlink", { "r:id": i, "w:history": 1 }, r);
|
|
2911
2911
|
}
|
|
2912
2912
|
function Ca(t, e, n) {
|
|
2913
2913
|
const r = ua(e, t.partPath, n);
|
|
2914
|
-
return r ? xa(t, r, da(e)) : t.altText ?
|
|
2914
|
+
return r ? xa(t, r, da(e)) : t.altText ? Hr(t.altText, {}, e) : "";
|
|
2915
2915
|
}
|
|
2916
|
-
function
|
|
2916
|
+
function Hr(t, e, n, r = !1) {
|
|
2917
2917
|
const o = b(r ? "w:delText" : "w:t", { "xml:space": "preserve" }, at(t));
|
|
2918
|
-
return
|
|
2918
|
+
return _r([o], e, n);
|
|
2919
2919
|
}
|
|
2920
2920
|
function Na(t) {
|
|
2921
2921
|
return b("w:r", null, b("w:br", (t === "line" ? void 0 : { "w:type": t === "page" ? "page" : "column" }) ?? null));
|
|
@@ -2929,29 +2929,29 @@ function Pa(t, e, n, r) {
|
|
|
2929
2929
|
"w:r",
|
|
2930
2930
|
null,
|
|
2931
2931
|
[
|
|
2932
|
-
|
|
2932
|
+
Ur(n ?? {}, r),
|
|
2933
2933
|
b("w:t", { "xml:space": "preserve" }, at(e))
|
|
2934
2934
|
].join("")
|
|
2935
2935
|
)
|
|
2936
2936
|
);
|
|
2937
2937
|
}
|
|
2938
|
-
function
|
|
2939
|
-
const r =
|
|
2938
|
+
function _r(t, e, n) {
|
|
2939
|
+
const r = Ur(e ?? {}, n);
|
|
2940
2940
|
return b("w:r", null, `${r}${t.join("")}`);
|
|
2941
2941
|
}
|
|
2942
|
-
function
|
|
2943
|
-
const n =
|
|
2942
|
+
function Ur(t, e) {
|
|
2943
|
+
const n = Mn(t);
|
|
2944
2944
|
if (t.revisionFormat && e) {
|
|
2945
2945
|
const r = t.revisionFormat, i = {
|
|
2946
2946
|
"w:id": tn(e)
|
|
2947
2947
|
};
|
|
2948
2948
|
r.author !== void 0 && (i["w:author"] = r.author), r.date !== void 0 && (i["w:date"] = r.date);
|
|
2949
|
-
const o =
|
|
2949
|
+
const o = Mn(r.before), s = o.length > 0 ? b("w:rPr", null, o) : b("w:rPr");
|
|
2950
2950
|
n.push(b("w:rPrChange", i, s));
|
|
2951
2951
|
}
|
|
2952
2952
|
return n.length > 0 ? b("w:rPr", null, n) : "";
|
|
2953
2953
|
}
|
|
2954
|
-
function
|
|
2954
|
+
function Mn(t) {
|
|
2955
2955
|
const e = [];
|
|
2956
2956
|
if (t.styleId && e.push(b("w:rStyle", { "w:val": t.styleId })), t.bold && e.push(b("w:b")), t.italic && e.push(b("w:i")), t.strike && e.push(b("w:strike")), t.doubleStrike && e.push(b("w:dstrike")), t.underline && t.underline !== "none" && e.push(b("w:u", { "w:val": t.underline })), t.color && e.push(b("w:color", { "w:val": Ia(t.color) })), t.highlight && e.push(b("w:highlight", { "w:val": Ra(t.highlight) })), t.fontFamily && e.push(
|
|
2957
2957
|
b("w:rFonts", {
|
|
@@ -2960,7 +2960,7 @@ function $n(t) {
|
|
|
2960
2960
|
"w:cs": t.fontFamily
|
|
2961
2961
|
})
|
|
2962
2962
|
), t.fontSizePt) {
|
|
2963
|
-
const n =
|
|
2963
|
+
const n = Dr(t.fontSizePt);
|
|
2964
2964
|
e.push(b("w:sz", { "w:val": n })), e.push(b("w:szCs", { "w:val": n }));
|
|
2965
2965
|
}
|
|
2966
2966
|
return t.verticalAlign && e.push(b("w:vertAlign", { "w:val": t.verticalAlign })), t.caps && e.push(b("w:caps")), t.smallCaps && e.push(b("w:smallCaps")), t.hidden && e.push(b("w:vanish")), e;
|
|
@@ -2987,7 +2987,7 @@ function Fa(t, e, n) {
|
|
|
2987
2987
|
if (c && c.kind !== "section_break")
|
|
2988
2988
|
if (c.kind === "paragraph") {
|
|
2989
2989
|
const l = r.get(a);
|
|
2990
|
-
o.push(
|
|
2990
|
+
o.push(zr(c, n, t, l));
|
|
2991
2991
|
} else
|
|
2992
2992
|
o.push(...nn(c, n, t));
|
|
2993
2993
|
}
|
|
@@ -3025,7 +3025,7 @@ function Ba(t, e, n) {
|
|
|
3025
3025
|
function nn(t, e, n) {
|
|
3026
3026
|
switch (t.kind) {
|
|
3027
3027
|
case "paragraph":
|
|
3028
|
-
return [
|
|
3028
|
+
return [zr(t, e, n)];
|
|
3029
3029
|
case "table":
|
|
3030
3030
|
return [Oa(t, e, n)];
|
|
3031
3031
|
case "section_break":
|
|
@@ -3034,8 +3034,8 @@ function nn(t, e, n) {
|
|
|
3034
3034
|
return [];
|
|
3035
3035
|
}
|
|
3036
3036
|
}
|
|
3037
|
-
function
|
|
3038
|
-
const i = Ma(t.properties, e, r), o =
|
|
3037
|
+
function zr(t, e, n, r) {
|
|
3038
|
+
const i = Ma(t.properties, e, r), o = $r(t.runs, e, n);
|
|
3039
3039
|
return b("w:p", null, `${i}${o}`);
|
|
3040
3040
|
}
|
|
3041
3041
|
function Ma(t, e, n) {
|
|
@@ -3214,12 +3214,12 @@ function Va(t) {
|
|
|
3214
3214
|
null,
|
|
3215
3215
|
[b("w:rPrDefault", null, b("w:rPr", null, "")), b("w:pPrDefault", null, b("w:pPr", null, ""))]
|
|
3216
3216
|
)
|
|
3217
|
-
), t.some((r) => r.id === "Normal") || e.push(
|
|
3217
|
+
), t.some((r) => r.id === "Normal") || e.push(On({ id: "Normal", type: "paragraph", displayName: "Normal" }, !0));
|
|
3218
3218
|
for (const r of t)
|
|
3219
|
-
e.push(
|
|
3219
|
+
e.push(On(r, r.id === "Normal"));
|
|
3220
3220
|
return te(b("w:styles", { "xmlns:w": g.w }, e));
|
|
3221
3221
|
}
|
|
3222
|
-
function
|
|
3222
|
+
function On(t, e) {
|
|
3223
3223
|
const n = {
|
|
3224
3224
|
"w:type": t.type,
|
|
3225
3225
|
"w:styleId": t.id
|
|
@@ -3241,7 +3241,7 @@ function Ga(t) {
|
|
|
3241
3241
|
"w:cs": t.fontFamily
|
|
3242
3242
|
})
|
|
3243
3243
|
), t.fontSizePt) {
|
|
3244
|
-
const n =
|
|
3244
|
+
const n = Dr(t.fontSizePt);
|
|
3245
3245
|
e.push(b("w:sz", { "w:val": n })), e.push(b("w:szCs", { "w:val": n }));
|
|
3246
3246
|
}
|
|
3247
3247
|
return e.length > 0 ? b("w:rPr", null, e) : "";
|
|
@@ -3262,7 +3262,7 @@ function Za(t) {
|
|
|
3262
3262
|
r != null && r.partPath && e.add(r.partPath);
|
|
3263
3263
|
return e;
|
|
3264
3264
|
}
|
|
3265
|
-
function
|
|
3265
|
+
function jr(t) {
|
|
3266
3266
|
const e = /* @__PURE__ */ new Set();
|
|
3267
3267
|
for (const n of t.body) $t(n, e);
|
|
3268
3268
|
for (const n of Object.values(t.headerFooterBodies))
|
|
@@ -3274,7 +3274,7 @@ function Xr(t) {
|
|
|
3274
3274
|
return e;
|
|
3275
3275
|
}
|
|
3276
3276
|
function $t(t, e) {
|
|
3277
|
-
|
|
3277
|
+
Rr(t, {
|
|
3278
3278
|
run: (n) => {
|
|
3279
3279
|
n.kind === "drawing" && n.partPath && e.add(n.partPath);
|
|
3280
3280
|
}
|
|
@@ -3297,7 +3297,7 @@ function Ht(t, e) {
|
|
|
3297
3297
|
}
|
|
3298
3298
|
}
|
|
3299
3299
|
function Qa(t) {
|
|
3300
|
-
const e =
|
|
3300
|
+
const e = jr(t), n = {}, r = [];
|
|
3301
3301
|
for (const [i, o] of Object.entries(t.rawParts))
|
|
3302
3302
|
e.has(i) ? n[i] = o : r.push(i);
|
|
3303
3303
|
return {
|
|
@@ -3308,10 +3308,10 @@ function Qa(t) {
|
|
|
3308
3308
|
}
|
|
3309
3309
|
const ec = "{00000000-0000-0000-0000-000000000000}";
|
|
3310
3310
|
function tc(t, e) {
|
|
3311
|
-
return
|
|
3311
|
+
return Wr(t, e);
|
|
3312
3312
|
}
|
|
3313
3313
|
function nc(t, e) {
|
|
3314
|
-
return
|
|
3314
|
+
return Wr(t, e);
|
|
3315
3315
|
}
|
|
3316
3316
|
function rc() {
|
|
3317
3317
|
const t = new Uint8Array(16);
|
|
@@ -3324,9 +3324,9 @@ function rc() {
|
|
|
3324
3324
|
return `{${e.slice(0, 8)}-${e.slice(8, 12)}-${e.slice(12, 16)}-${e.slice(16, 20)}-${e.slice(20, 32)}}`;
|
|
3325
3325
|
}
|
|
3326
3326
|
function ic(t) {
|
|
3327
|
-
return t ?
|
|
3327
|
+
return t ? Yr(t) === ec.replace(/[^0-9a-f]/gi, "") : !0;
|
|
3328
3328
|
}
|
|
3329
|
-
function
|
|
3329
|
+
function Wr(t, e) {
|
|
3330
3330
|
const n = new Uint8Array(t.length);
|
|
3331
3331
|
n.set(t);
|
|
3332
3332
|
const r = oc(e), i = Math.min(n.length, 32);
|
|
@@ -3335,7 +3335,7 @@ function Vr(t, e) {
|
|
|
3335
3335
|
return n;
|
|
3336
3336
|
}
|
|
3337
3337
|
function oc(t) {
|
|
3338
|
-
const e =
|
|
3338
|
+
const e = Yr(t);
|
|
3339
3339
|
if (e.length !== 32)
|
|
3340
3340
|
throw new Error(`Invalid fontKey "${t}" (expected 32 hex chars after stripping)`);
|
|
3341
3341
|
const n = new Uint8Array(16);
|
|
@@ -3345,7 +3345,7 @@ function oc(t) {
|
|
|
3345
3345
|
for (let i = 0; i < 16; i++) r[i] = n[15 - i] ?? 0;
|
|
3346
3346
|
return r;
|
|
3347
3347
|
}
|
|
3348
|
-
function
|
|
3348
|
+
function Yr(t) {
|
|
3349
3349
|
return t.replace(/[{}\-]/g, "").toLowerCase();
|
|
3350
3350
|
}
|
|
3351
3351
|
function sc(t) {
|
|
@@ -3667,7 +3667,7 @@ function Ec(t) {
|
|
|
3667
3667
|
})
|
|
3668
3668
|
);
|
|
3669
3669
|
}
|
|
3670
|
-
function
|
|
3670
|
+
function Xr(t) {
|
|
3671
3671
|
const e = [], n = la(2), r = ja(t, n), i = Fa(t, r, n), o = Ha(t.numbering);
|
|
3672
3672
|
o && (n.parts["word/numbering.xml"] = o, n.contentTypeOverrides.push({
|
|
3673
3673
|
partName: "/word/numbering.xml",
|
|
@@ -3677,7 +3677,7 @@ function Kr(t) {
|
|
|
3677
3677
|
type: "numbering",
|
|
3678
3678
|
target: "numbering.xml"
|
|
3679
3679
|
})), gc(t, n);
|
|
3680
|
-
const s =
|
|
3680
|
+
const s = jr(t);
|
|
3681
3681
|
for (const l of s) {
|
|
3682
3682
|
if (n.parts[l]) continue;
|
|
3683
3683
|
const u = t.rawParts[l];
|
|
@@ -3730,11 +3730,11 @@ function Ct(t) {
|
|
|
3730
3730
|
for (const l of Array.from(t.children))
|
|
3731
3731
|
l.namespaceURI === g.w && (l.localName === "t" || l.localName === "delText" ? s += l.textContent ?? "" : l.localName === "tab" && (s += " "));
|
|
3732
3732
|
s = Ac(s);
|
|
3733
|
-
const a = k(t, "rPr"), c = a ?
|
|
3733
|
+
const a = k(t, "rPr"), c = a ? Dn(a) : {};
|
|
3734
3734
|
if (a) {
|
|
3735
3735
|
const l = k(a, "rPrChange");
|
|
3736
3736
|
if (l) {
|
|
3737
|
-
const u = k(l, "rPr"), f = u ?
|
|
3737
|
+
const u = k(l, "rPr"), f = u ? Dn(u) : {}, d = l.getAttributeNS(g.w, "author") ?? l.getAttribute("w:author") ?? void 0, h = l.getAttributeNS(g.w, "date") ?? l.getAttribute("w:date") ?? void 0;
|
|
3738
3738
|
c.revisionFormat = {
|
|
3739
3739
|
before: f,
|
|
3740
3740
|
...d !== void 0 ? { author: d } : {},
|
|
@@ -3747,7 +3747,7 @@ function Ct(t) {
|
|
|
3747
3747
|
function Ac(t) {
|
|
3748
3748
|
return !t || t.includes(" ") ? t : t.length >= 4 && /^[ \u00A0]+$/.test(t) ? " " : t;
|
|
3749
3749
|
}
|
|
3750
|
-
function
|
|
3750
|
+
function Dn(t) {
|
|
3751
3751
|
const e = {}, n = A(k(t, "rStyle"));
|
|
3752
3752
|
n && (e.styleId = n), Ye(t, "b") && (e.bold = !0), Ye(t, "i") && (e.italic = !0), Ye(t, "strike") && (e.strike = !0), Ye(t, "caps") && (e.caps = !0);
|
|
3753
3753
|
const r = k(t, "u");
|
|
@@ -3763,7 +3763,7 @@ function _n(t) {
|
|
|
3763
3763
|
}
|
|
3764
3764
|
const c = A(k(t, "sz"));
|
|
3765
3765
|
if (c) {
|
|
3766
|
-
const u =
|
|
3766
|
+
const u = Or(Number(c));
|
|
3767
3767
|
Number.isFinite(u) && u > 0 && (e.fontSizePt = u);
|
|
3768
3768
|
}
|
|
3769
3769
|
const l = A(k(t, "vertAlign"));
|
|
@@ -3774,10 +3774,10 @@ function Cc(t) {
|
|
|
3774
3774
|
if (!n) return null;
|
|
3775
3775
|
const r = n.getAttributeNS(g.r, "id") ?? n.getAttribute("r:id");
|
|
3776
3776
|
if (!r) return null;
|
|
3777
|
-
const i = { embedRelId: r }, o = t.getElementsByTagNameNS(e, "shape")[0], s = (o == null ? void 0 : o.getAttribute("style")) ?? "", a =
|
|
3777
|
+
const i = { embedRelId: r }, o = t.getElementsByTagNameNS(e, "shape")[0], s = (o == null ? void 0 : o.getAttribute("style")) ?? "", a = $n(s.match(/width:\s*([\d.]+)([a-z%]*)/i)), c = $n(s.match(/height:\s*([\d.]+)([a-z%]*)/i));
|
|
3778
3778
|
return a > 0 && (i.widthEmu = Math.round(a * 12700)), c > 0 && (i.heightEmu = Math.round(c * 12700)), i;
|
|
3779
3779
|
}
|
|
3780
|
-
function
|
|
3780
|
+
function $n(t) {
|
|
3781
3781
|
if (!t) return 0;
|
|
3782
3782
|
const e = Number(t[1]);
|
|
3783
3783
|
if (!Number.isFinite(e) || e <= 0) return 0;
|
|
@@ -3816,8 +3816,8 @@ function Nc(t) {
|
|
|
3816
3816
|
}
|
|
3817
3817
|
function Pc(t) {
|
|
3818
3818
|
const e = t.getElementsByTagNameNS(g.wp, "positionH")[0], n = t.getElementsByTagNameNS(g.wp, "positionV")[0], r = t.getAttribute("behindDoc") === "1", i = {
|
|
3819
|
-
offsetXEmu:
|
|
3820
|
-
offsetYEmu:
|
|
3819
|
+
offsetXEmu: Hn(e),
|
|
3820
|
+
offsetYEmu: Hn(n),
|
|
3821
3821
|
relativeFromH: Ic(
|
|
3822
3822
|
(e == null ? void 0 : e.getAttribute("relativeFrom")) ?? "column"
|
|
3823
3823
|
),
|
|
@@ -3827,7 +3827,7 @@ function Pc(t) {
|
|
|
3827
3827
|
};
|
|
3828
3828
|
return r && (i.behindDoc = !0), i;
|
|
3829
3829
|
}
|
|
3830
|
-
function
|
|
3830
|
+
function Hn(t) {
|
|
3831
3831
|
if (!t) return 0;
|
|
3832
3832
|
const e = t.getElementsByTagNameNS(g.wp, "posOffset")[0];
|
|
3833
3833
|
if (!e) return 0;
|
|
@@ -3866,7 +3866,7 @@ const Fc = {
|
|
|
3866
3866
|
function Xe(t, e) {
|
|
3867
3867
|
return t.getAttributeNS(g.w, e) ?? t.getAttribute(`w:${e}`);
|
|
3868
3868
|
}
|
|
3869
|
-
function
|
|
3869
|
+
function Vr(t) {
|
|
3870
3870
|
const e = k(t, "pBdr");
|
|
3871
3871
|
if (!e) return;
|
|
3872
3872
|
const n = {};
|
|
@@ -3960,10 +3960,10 @@ function _t(t, e, n, r) {
|
|
|
3960
3960
|
};
|
|
3961
3961
|
_t(u, e, f, r);
|
|
3962
3962
|
} else if (u.localName === "commentRangeStart") {
|
|
3963
|
-
const f =
|
|
3963
|
+
const f = _n(u);
|
|
3964
3964
|
f !== null && r.add(f);
|
|
3965
3965
|
} else if (u.localName === "commentRangeEnd") {
|
|
3966
|
-
const f =
|
|
3966
|
+
const f = _n(u);
|
|
3967
3967
|
f !== null && r.delete(f);
|
|
3968
3968
|
} else if (u.localName === "fldSimple") {
|
|
3969
3969
|
const f = u.getAttributeNS(g.w, "instr") ?? u.getAttribute("w:instr") ?? "", d = k(u, "r"), h = d ? ((l = k(d, "t")) == null ? void 0 : l.textContent) ?? "" : "", p = {
|
|
@@ -3981,7 +3981,7 @@ function Bc(t) {
|
|
|
3981
3981
|
const e = t.replace(/^\s*HYPERLINK\b/i, ""), n = /\\l\s+"([^"]*)"/.exec(e), r = /(?:^|[^\\\w])\s*"([^"]*)"/.exec(e.replace(/\\\w\s+"[^"]*"/g, ""));
|
|
3982
3982
|
return r != null && r[1] ? n != null && n[1] ? `${r[1]}#${n[1]}` : r[1] : n != null && n[1] ? `#${n[1]}` : null;
|
|
3983
3983
|
}
|
|
3984
|
-
function
|
|
3984
|
+
function _n(t) {
|
|
3985
3985
|
const e = t.getAttributeNS(g.w, "id") ?? t.getAttribute("w:id");
|
|
3986
3986
|
if (e === null) return null;
|
|
3987
3987
|
const n = Number(e);
|
|
@@ -3995,7 +3995,7 @@ function Mc(t) {
|
|
|
3995
3995
|
}
|
|
3996
3996
|
const r = A(k(t, "sz"));
|
|
3997
3997
|
if (r) {
|
|
3998
|
-
const i =
|
|
3998
|
+
const i = Or(Number(r));
|
|
3999
3999
|
Number.isFinite(i) && i > 0 && (e.fontSizePt = i);
|
|
4000
4000
|
}
|
|
4001
4001
|
return e;
|
|
@@ -4067,7 +4067,7 @@ function Dc(t) {
|
|
|
4067
4067
|
...m !== void 0 ? { hangingTwips: m } : {}
|
|
4068
4068
|
});
|
|
4069
4069
|
}
|
|
4070
|
-
const c =
|
|
4070
|
+
const c = Vr(t);
|
|
4071
4071
|
c && (e.borders = c);
|
|
4072
4072
|
const l = rn(t);
|
|
4073
4073
|
l && (e.shading = l);
|
|
@@ -4119,10 +4119,10 @@ function _c(t, e) {
|
|
|
4119
4119
|
const n = [];
|
|
4120
4120
|
for (const r of t)
|
|
4121
4121
|
if (r.kind === "run")
|
|
4122
|
-
|
|
4122
|
+
Un(r.run, e, n);
|
|
4123
4123
|
else {
|
|
4124
4124
|
const i = [];
|
|
4125
|
-
for (const a of r.runs)
|
|
4125
|
+
for (const a of r.runs) Un(a, e, i);
|
|
4126
4126
|
const s = {
|
|
4127
4127
|
kind: "hyperlink",
|
|
4128
4128
|
href: r.href ?? (r.relId ? e.rels.get(r.relId) : void 0) ?? "#",
|
|
@@ -4132,7 +4132,7 @@ function _c(t, e) {
|
|
|
4132
4132
|
}
|
|
4133
4133
|
return n;
|
|
4134
4134
|
}
|
|
4135
|
-
function
|
|
4135
|
+
function Un(t, e, n) {
|
|
4136
4136
|
if (t.drawing) {
|
|
4137
4137
|
const i = Uc(t.drawing, e);
|
|
4138
4138
|
i && n.push(i);
|
|
@@ -4156,7 +4156,7 @@ function Wn(t, e, n) {
|
|
|
4156
4156
|
return;
|
|
4157
4157
|
}
|
|
4158
4158
|
if (t.text === "") return;
|
|
4159
|
-
const r =
|
|
4159
|
+
const r = Gr(t.format);
|
|
4160
4160
|
t.revision && (r.revision = t.revision), t.commentIds && t.commentIds.length > 0 && (r.commentIds = t.commentIds), n.push(jc(t.text, r));
|
|
4161
4161
|
}
|
|
4162
4162
|
function Uc(t, e) {
|
|
@@ -4184,10 +4184,10 @@ function zc(t) {
|
|
|
4184
4184
|
function jc(t, e) {
|
|
4185
4185
|
return { kind: "text", text: t, properties: e };
|
|
4186
4186
|
}
|
|
4187
|
-
function
|
|
4187
|
+
function Gr(t) {
|
|
4188
4188
|
const e = {};
|
|
4189
4189
|
if (t.styleId && (e.styleId = t.styleId), t.bold && (e.bold = !0), t.italic && (e.italic = !0), t.strike && (e.strike = !0), t.caps && (e.caps = !0), t.underline && (e.underline = "single"), t.color && (e.color = t.color.startsWith("#") ? t.color : `#${t.color}`), t.highlight && (e.highlight = t.highlight), t.fontFamily && (e.fontFamily = t.fontFamily), t.fontSizePt !== void 0 && (e.fontSizePt = t.fontSizePt), t.verticalAlign && (e.verticalAlign = t.verticalAlign), t.revisionFormat) {
|
|
4190
|
-
const n =
|
|
4190
|
+
const n = Gr(t.revisionFormat.before), { author: r, date: i } = t.revisionFormat;
|
|
4191
4191
|
e.revisionFormat = {
|
|
4192
4192
|
before: n,
|
|
4193
4193
|
...r !== void 0 ? { author: r } : {},
|
|
@@ -4289,7 +4289,7 @@ function Gc(t, e, n) {
|
|
|
4289
4289
|
function Fe(t, e, n) {
|
|
4290
4290
|
const r = [], i = [], o = [];
|
|
4291
4291
|
let s = 0;
|
|
4292
|
-
const a = /* @__PURE__ */ new Set(), c =
|
|
4292
|
+
const a = /* @__PURE__ */ new Set(), c = Kr(Array.from(t.children)), l = e.replaceParagraphs ?? (n == null ? void 0 : n.replaceParagraphs);
|
|
4293
4293
|
for (const u of c) {
|
|
4294
4294
|
if (u.namespaceURI === null) continue;
|
|
4295
4295
|
const f = u.localName;
|
|
@@ -4302,12 +4302,12 @@ function Fe(t, e, n) {
|
|
|
4302
4302
|
}
|
|
4303
4303
|
return { body: i, warnings: r, sectPrEls: o };
|
|
4304
4304
|
}
|
|
4305
|
-
function
|
|
4305
|
+
function Kr(t) {
|
|
4306
4306
|
const e = [];
|
|
4307
4307
|
for (const n of t)
|
|
4308
4308
|
if (n.namespaceURI !== null && n.localName === "sdt") {
|
|
4309
4309
|
const r = k(n, "sdtContent");
|
|
4310
|
-
r && e.push(...
|
|
4310
|
+
r && e.push(...Kr(Array.from(r.children)));
|
|
4311
4311
|
} else
|
|
4312
4312
|
e.push(n);
|
|
4313
4313
|
return e;
|
|
@@ -4347,8 +4347,8 @@ function qc(t, e) {
|
|
|
4347
4347
|
footerTwips: z(r, "footer") ?? 720,
|
|
4348
4348
|
gutterTwips: z(r, "gutter") ?? 0
|
|
4349
4349
|
},
|
|
4350
|
-
headerRefs:
|
|
4351
|
-
footerRefs:
|
|
4350
|
+
headerRefs: zn(t, "headerReference", e),
|
|
4351
|
+
footerRefs: zn(t, "footerReference", e)
|
|
4352
4352
|
};
|
|
4353
4353
|
(i === "top" || i === "center" || i === "bottom" || i === "both") && (l.vAlign = i), k(t, "titlePg") && (l.titlePage = !0), (o === "continuous" || o === "nextPage" || o === "evenPage" || o === "oddPage") && (l.type = o);
|
|
4354
4354
|
const u = k(t, "cols");
|
|
@@ -4361,7 +4361,7 @@ function qc(t, e) {
|
|
|
4361
4361
|
}
|
|
4362
4362
|
return l;
|
|
4363
4363
|
}
|
|
4364
|
-
function
|
|
4364
|
+
function zn(t, e, n) {
|
|
4365
4365
|
const r = [];
|
|
4366
4366
|
for (const i of De(t, e)) {
|
|
4367
4367
|
const o = i.getAttributeNS(g.w, "type") ?? i.getAttribute("w:type") ?? "default", s = i.getAttributeNS(g.r, "id") ?? i.getAttribute("r:id");
|
|
@@ -4479,12 +4479,12 @@ function mt(t, e) {
|
|
|
4479
4479
|
const n = ct(t, "srgbClr");
|
|
4480
4480
|
if (n) {
|
|
4481
4481
|
const i = n.getAttribute("val");
|
|
4482
|
-
return !i || !/^[0-9A-Fa-f]{6}$/.test(i) ? void 0 :
|
|
4482
|
+
return !i || !/^[0-9A-Fa-f]{6}$/.test(i) ? void 0 : jn(`#${i.toUpperCase()}`, n);
|
|
4483
4483
|
}
|
|
4484
4484
|
const r = ct(t, "schemeClr");
|
|
4485
4485
|
if (r) {
|
|
4486
4486
|
const i = ol(r.getAttribute("val")), o = i && e ? e[i] : void 0;
|
|
4487
|
-
return o ?
|
|
4487
|
+
return o ? jn(o, r) : void 0;
|
|
4488
4488
|
}
|
|
4489
4489
|
}
|
|
4490
4490
|
function ol(t) {
|
|
@@ -4501,7 +4501,7 @@ function ol(t) {
|
|
|
4501
4501
|
return t;
|
|
4502
4502
|
}
|
|
4503
4503
|
}
|
|
4504
|
-
function
|
|
4504
|
+
function jn(t, e) {
|
|
4505
4505
|
let [n, r, i] = sl(t), o = null;
|
|
4506
4506
|
for (const s of Array.from(e.children)) {
|
|
4507
4507
|
if (s.namespaceURI !== g.a) continue;
|
|
@@ -4525,12 +4525,12 @@ function Xn(t, e) {
|
|
|
4525
4525
|
break;
|
|
4526
4526
|
case "shade": {
|
|
4527
4527
|
const c = a / 1e5;
|
|
4528
|
-
o =
|
|
4528
|
+
o = Wn(o ?? Nt(n, r, i), c, 0);
|
|
4529
4529
|
break;
|
|
4530
4530
|
}
|
|
4531
4531
|
case "tint": {
|
|
4532
4532
|
const c = a / 1e5;
|
|
4533
|
-
o =
|
|
4533
|
+
o = Wn(o ?? Nt(n, r, i), c, 255);
|
|
4534
4534
|
break;
|
|
4535
4535
|
}
|
|
4536
4536
|
}
|
|
@@ -4540,11 +4540,11 @@ function Xn(t, e) {
|
|
|
4540
4540
|
function Ge(t) {
|
|
4541
4541
|
return Math.min(1, Math.max(0, t));
|
|
4542
4542
|
}
|
|
4543
|
-
function
|
|
4544
|
-
const [r, i, o] =
|
|
4543
|
+
function Wn(t, e, n) {
|
|
4544
|
+
const [r, i, o] = qr(t), s = (a) => Math.round(a * e + n * (1 - e));
|
|
4545
4545
|
return zt(s(r), s(i), s(o));
|
|
4546
4546
|
}
|
|
4547
|
-
function
|
|
4547
|
+
function qr(t) {
|
|
4548
4548
|
return [
|
|
4549
4549
|
Number.parseInt(t.slice(1, 3), 16),
|
|
4550
4550
|
Number.parseInt(t.slice(3, 5), 16),
|
|
@@ -4556,7 +4556,7 @@ function zt(t, e, n) {
|
|
|
4556
4556
|
return `#${r(t)}${r(e)}${r(n)}`;
|
|
4557
4557
|
}
|
|
4558
4558
|
function sl(t) {
|
|
4559
|
-
const [e, n, r] =
|
|
4559
|
+
const [e, n, r] = qr(t), i = e / 255, o = n / 255, s = r / 255, a = Math.max(i, o, s), c = Math.min(i, o, s), l = (a + c) / 2;
|
|
4560
4560
|
if (a === c) return [0, 0, l];
|
|
4561
4561
|
const u = a - c, f = l > 0.5 ? u / (2 - a - c) : u / (a + c);
|
|
4562
4562
|
let d;
|
|
@@ -4637,7 +4637,7 @@ function ll(t, e = { doNotUseHTMLParagraphAutoSpacing: !1 }) {
|
|
|
4637
4637
|
}
|
|
4638
4638
|
const r = [], i = k(n, "docDefaults");
|
|
4639
4639
|
if (i) {
|
|
4640
|
-
const o = k(i, "rPrDefault"), s = k(i, "pPrDefault"), a = o ? k(o, "rPr") : null, c = s ? k(s, "pPr") : null, l = a ?
|
|
4640
|
+
const o = k(i, "rPrDefault"), s = k(i, "pPrDefault"), a = o ? k(o, "rPr") : null, c = s ? k(s, "pPr") : null, l = a ? Yn(a) : void 0, u = c ? Xn(c) : void 0;
|
|
4641
4641
|
(l || u) && r.push({
|
|
4642
4642
|
id: "DocDefaults",
|
|
4643
4643
|
type: "paragraph",
|
|
@@ -4651,7 +4651,7 @@ function ll(t, e = { doNotUseHTMLParagraphAutoSpacing: !1 }) {
|
|
|
4651
4651
|
if (!s) continue;
|
|
4652
4652
|
const a = Pt(s), c = o.getAttributeNS(g.w, "type") ?? o.getAttribute("w:type"), l = fl(c);
|
|
4653
4653
|
if (!l) continue;
|
|
4654
|
-
const u = A(k(o, "name")) ?? s, f = A(k(o, "basedOn")), d = A(k(o, "next")), h = k(o, "rPr"), p = k(o, "pPr"), m = h ?
|
|
4654
|
+
const u = A(k(o, "name")) ?? s, f = A(k(o, "basedOn")), d = A(k(o, "next")), h = k(o, "rPr"), p = k(o, "pPr"), m = h ? Yn(h) : void 0, y = p ? Xn(p) : void 0;
|
|
4655
4655
|
r.push({
|
|
4656
4656
|
id: a,
|
|
4657
4657
|
type: l,
|
|
@@ -4690,7 +4690,7 @@ function ul(t, e, n) {
|
|
|
4690
4690
|
for (const u of t)
|
|
4691
4691
|
u === i || u.id === "DocDefaults" || u.type === "paragraph" && (u.basedOn || (u.basedOn = r));
|
|
4692
4692
|
}
|
|
4693
|
-
const o =
|
|
4693
|
+
const o = Pr(t, r), s = i.runDefaults ?? {}, a = o.runDefaults.fontFamily, c = o.runDefaults.fontSizePt;
|
|
4694
4694
|
i.runDefaults = {
|
|
4695
4695
|
...s,
|
|
4696
4696
|
...a === void 0 ? { fontFamily: "Calibri" } : {},
|
|
@@ -4733,7 +4733,7 @@ function fl(t) {
|
|
|
4733
4733
|
return null;
|
|
4734
4734
|
}
|
|
4735
4735
|
}
|
|
4736
|
-
function
|
|
4736
|
+
function Yn(t) {
|
|
4737
4737
|
const e = {}, n = k(t, "rFonts");
|
|
4738
4738
|
if (n) {
|
|
4739
4739
|
const a = n.getAttributeNS(g.w, "ascii") ?? n.getAttribute("w:ascii");
|
|
@@ -4756,7 +4756,7 @@ function Gn(t) {
|
|
|
4756
4756
|
const s = A(k(t, "vertAlign"));
|
|
4757
4757
|
return (s === "superscript" || s === "subscript") && (e.verticalAlign = s), Object.keys(e).length > 0 ? e : void 0;
|
|
4758
4758
|
}
|
|
4759
|
-
function
|
|
4759
|
+
function Xn(t) {
|
|
4760
4760
|
const e = {}, n = A(k(t, "jc")), r = dl(n);
|
|
4761
4761
|
r && (e.alignment = r);
|
|
4762
4762
|
const i = k(t, "spacing");
|
|
@@ -4778,7 +4778,7 @@ function Kn(t) {
|
|
|
4778
4778
|
u !== null && (c.rightTwips = u), Object.keys(c).length > 0 && (e.indent = c);
|
|
4779
4779
|
}
|
|
4780
4780
|
ga(t, "pageBreakBefore") && (e.pageBreakBefore = !0);
|
|
4781
|
-
const s =
|
|
4781
|
+
const s = Vr(t);
|
|
4782
4782
|
s && (e.borders = s);
|
|
4783
4783
|
const a = rn(t);
|
|
4784
4784
|
return a && (e.shading = a), Object.keys(e).length > 0 ? e : void 0;
|
|
@@ -4923,7 +4923,7 @@ function ml(t, e) {
|
|
|
4923
4923
|
return o[i] ? o[i] : n && i === 61623 ? "•" : r;
|
|
4924
4924
|
});
|
|
4925
4925
|
}
|
|
4926
|
-
function
|
|
4926
|
+
function Jr(t, e, n = !0) {
|
|
4927
4927
|
var a;
|
|
4928
4928
|
const r = [], i = [], o = Array.from(t.getElementsByTagNameNS(g.w, "drawing"));
|
|
4929
4929
|
let s = 0;
|
|
@@ -5006,13 +5006,13 @@ function Je(t) {
|
|
|
5006
5006
|
}
|
|
5007
5007
|
function vl(t, e, n) {
|
|
5008
5008
|
const r = R(t, g.wpg, "wgp");
|
|
5009
|
-
if (r) return
|
|
5009
|
+
if (r) return Zr(r, e, n);
|
|
5010
5010
|
const i = R(t, g.wps, "wsp");
|
|
5011
|
-
if (i) return
|
|
5011
|
+
if (i) return Qr(i, e);
|
|
5012
5012
|
const o = R(t, g.pic, "pic");
|
|
5013
|
-
return o ?
|
|
5013
|
+
return o ? ei(o, e) : null;
|
|
5014
5014
|
}
|
|
5015
|
-
function
|
|
5015
|
+
function Zr(t, e, n) {
|
|
5016
5016
|
const r = R(t, g.wpg, "grpSpPr"), i = r ? r.getElementsByTagNameNS(g.a, "xfrm")[0] : void 0, o = i ? i.getElementsByTagNameNS(g.a, "chExt")[0] : void 0, s = o ? Z(o, "cx") : 0, a = o ? Z(o, "cy") : 0, c = [];
|
|
5017
5017
|
for (const l of Array.from(t.children))
|
|
5018
5018
|
if (l.namespaceURI === g.wps && l.localName === "wsp") {
|
|
@@ -5035,7 +5035,7 @@ function ti(t, e, n) {
|
|
|
5035
5035
|
function xl(t, e, n) {
|
|
5036
5036
|
const { off: r, ext: i } = on(t);
|
|
5037
5037
|
if (!i) return null;
|
|
5038
|
-
const o =
|
|
5038
|
+
const o = Qr(t, e);
|
|
5039
5039
|
return {
|
|
5040
5040
|
id: n(),
|
|
5041
5041
|
anchor: { sectionIndex: 0, horizontalFrom: "page", verticalFrom: "page" },
|
|
@@ -5047,7 +5047,7 @@ function xl(t, e, n) {
|
|
|
5047
5047
|
};
|
|
5048
5048
|
}
|
|
5049
5049
|
function Sl(t, e, n) {
|
|
5050
|
-
const { off: r, ext: i } = on(t), o =
|
|
5050
|
+
const { off: r, ext: i } = on(t), o = ei(t, e);
|
|
5051
5051
|
return !o || !i ? null : {
|
|
5052
5052
|
id: n(),
|
|
5053
5053
|
anchor: { sectionIndex: 0, horizontalFrom: "page", verticalFrom: "page" },
|
|
@@ -5061,7 +5061,7 @@ function Sl(t, e, n) {
|
|
|
5061
5061
|
function Tl(t, e, n) {
|
|
5062
5062
|
const { off: r, ext: i } = on(t);
|
|
5063
5063
|
if (!i) return null;
|
|
5064
|
-
const o =
|
|
5064
|
+
const o = Zr(t, e, n);
|
|
5065
5065
|
return {
|
|
5066
5066
|
id: n(),
|
|
5067
5067
|
anchor: { sectionIndex: 0, horizontalFrom: "page", verticalFrom: "page" },
|
|
@@ -5091,7 +5091,7 @@ function El(t) {
|
|
|
5091
5091
|
bottomEmu: s ?? c
|
|
5092
5092
|
};
|
|
5093
5093
|
}
|
|
5094
|
-
function
|
|
5094
|
+
function Qr(t, e) {
|
|
5095
5095
|
const n = R(t, g.wps, "txbx");
|
|
5096
5096
|
if (n) {
|
|
5097
5097
|
const s = R(n, g.w, "txbxContent");
|
|
@@ -5099,9 +5099,9 @@ function ni(t, e) {
|
|
|
5099
5099
|
const a = {
|
|
5100
5100
|
kind: "textbox",
|
|
5101
5101
|
body: Al(s, e)
|
|
5102
|
-
}, c =
|
|
5102
|
+
}, c = Gn(t, e.theme);
|
|
5103
5103
|
c !== void 0 && (a.fill = c);
|
|
5104
|
-
const l =
|
|
5104
|
+
const l = Kn(t, e.theme);
|
|
5105
5105
|
l !== void 0 && (a.border = l);
|
|
5106
5106
|
const u = El(t);
|
|
5107
5107
|
return u !== void 0 && (a.padding = u), a;
|
|
@@ -5110,12 +5110,12 @@ function ni(t, e) {
|
|
|
5110
5110
|
const r = {
|
|
5111
5111
|
kind: "shape",
|
|
5112
5112
|
geometry: Pl(t)
|
|
5113
|
-
}, i =
|
|
5113
|
+
}, i = Gn(t, e.theme);
|
|
5114
5114
|
i !== void 0 && (r.fill = i);
|
|
5115
|
-
const o =
|
|
5115
|
+
const o = Kn(t, e.theme);
|
|
5116
5116
|
return o !== void 0 && (r.border = o), r;
|
|
5117
5117
|
}
|
|
5118
|
-
function
|
|
5118
|
+
function ei(t, e) {
|
|
5119
5119
|
const n = t.getElementsByTagNameNS(g.a, "blip")[0];
|
|
5120
5120
|
if (!n) return null;
|
|
5121
5121
|
const r = n.getAttributeNS(g.r, "embed") ?? n.getAttribute("r:embed");
|
|
@@ -5158,11 +5158,11 @@ function Cl(t, e, n) {
|
|
|
5158
5158
|
function Nl(t) {
|
|
5159
5159
|
const e = R(t, g.wp, "positionH"), n = R(t, g.wp, "positionV");
|
|
5160
5160
|
return {
|
|
5161
|
-
x:
|
|
5162
|
-
y:
|
|
5161
|
+
x: Vn(e),
|
|
5162
|
+
y: Vn(n)
|
|
5163
5163
|
};
|
|
5164
5164
|
}
|
|
5165
|
-
function
|
|
5165
|
+
function Vn(t) {
|
|
5166
5166
|
if (!t) return 0;
|
|
5167
5167
|
const e = R(t, g.wp, "posOffset");
|
|
5168
5168
|
if (!e) return 0;
|
|
@@ -5197,7 +5197,7 @@ function Pl(t) {
|
|
|
5197
5197
|
return "rect";
|
|
5198
5198
|
}
|
|
5199
5199
|
}
|
|
5200
|
-
function
|
|
5200
|
+
function Gn(t, e) {
|
|
5201
5201
|
const n = R(t, g.wps, "spPr") ?? R(t, g.pic, "spPr");
|
|
5202
5202
|
if (n) {
|
|
5203
5203
|
for (const r of Array.from(n.children))
|
|
@@ -5205,7 +5205,7 @@ function Jn(t, e) {
|
|
|
5205
5205
|
return mt(r, e);
|
|
5206
5206
|
}
|
|
5207
5207
|
}
|
|
5208
|
-
function
|
|
5208
|
+
function Kn(t, e) {
|
|
5209
5209
|
const n = R(t, g.wps, "spPr") ?? R(t, g.pic, "spPr");
|
|
5210
5210
|
if (!n) return;
|
|
5211
5211
|
const r = R(n, g.a, "ln");
|
|
@@ -5271,15 +5271,15 @@ function Bl(t) {
|
|
|
5271
5271
|
default:
|
|
5272
5272
|
return !1;
|
|
5273
5273
|
}
|
|
5274
|
-
return
|
|
5274
|
+
return ti(t.content) ? !1 : ni(t.content);
|
|
5275
5275
|
}
|
|
5276
|
-
function
|
|
5276
|
+
function ti(t) {
|
|
5277
5277
|
switch (t.kind) {
|
|
5278
5278
|
case "textbox":
|
|
5279
5279
|
case "shape":
|
|
5280
5280
|
return t.border !== void 0 ? !0 : t.fill !== void 0 && !Ml(t.fill);
|
|
5281
5281
|
case "group":
|
|
5282
|
-
return t.children.some((e) =>
|
|
5282
|
+
return t.children.some((e) => ti(e.content));
|
|
5283
5283
|
default:
|
|
5284
5284
|
return !1;
|
|
5285
5285
|
}
|
|
@@ -5288,20 +5288,20 @@ function Ml(t) {
|
|
|
5288
5288
|
const e = t.trim().toLowerCase();
|
|
5289
5289
|
return e === "#ffffff" || e === "#fff" || e === "white";
|
|
5290
5290
|
}
|
|
5291
|
-
function
|
|
5291
|
+
function ni(t) {
|
|
5292
5292
|
switch (t.kind) {
|
|
5293
5293
|
case "textbox":
|
|
5294
5294
|
return !0;
|
|
5295
5295
|
case "group":
|
|
5296
|
-
return t.children.some((e) =>
|
|
5296
|
+
return t.children.some((e) => ni(e.content));
|
|
5297
5297
|
default:
|
|
5298
5298
|
return !1;
|
|
5299
5299
|
}
|
|
5300
5300
|
}
|
|
5301
5301
|
function Ol(t) {
|
|
5302
|
-
return
|
|
5302
|
+
return ri(t.content, t.widthEmu, t.heightEmu);
|
|
5303
5303
|
}
|
|
5304
|
-
function
|
|
5304
|
+
function ri(t, e, n) {
|
|
5305
5305
|
switch (t.kind) {
|
|
5306
5306
|
case "textbox":
|
|
5307
5307
|
return t.body;
|
|
@@ -5318,7 +5318,7 @@ function Dl(t, e, n) {
|
|
|
5318
5318
|
let i = [];
|
|
5319
5319
|
for (const o of t) {
|
|
5320
5320
|
const s = o.widthEmu * e, a = o.heightEmu * n, c = o.content;
|
|
5321
|
-
c.kind === "picture" ? i.push($l(c, s, a)) : c.kind === "textbox" ? (r.push(...
|
|
5321
|
+
c.kind === "picture" ? i.push($l(c, s, a)) : c.kind === "textbox" ? (r.push(...qn(c.body, i)), i = []) : c.kind === "group" && (r.push(...qn(ri(c, s, a), i)), i = []);
|
|
5322
5322
|
}
|
|
5323
5323
|
return r;
|
|
5324
5324
|
}
|
|
@@ -5336,7 +5336,7 @@ function $l(t, e, n) {
|
|
|
5336
5336
|
};
|
|
5337
5337
|
return t.altText !== void 0 && (r.altText = t.altText), r;
|
|
5338
5338
|
}
|
|
5339
|
-
function
|
|
5339
|
+
function qn(t, e) {
|
|
5340
5340
|
if (e.length === 0) return t;
|
|
5341
5341
|
const n = t.findIndex((s) => s.kind === "paragraph");
|
|
5342
5342
|
if (n === -1) return t;
|
|
@@ -5479,7 +5479,7 @@ function Yl(t, e, n, r) {
|
|
|
5479
5479
|
} else {
|
|
5480
5480
|
const { off: N, ext: I } = rt(v);
|
|
5481
5481
|
if (I.cx <= 0 || I.cy <= 0) continue;
|
|
5482
|
-
const F =
|
|
5482
|
+
const F = ii(v), L = jt(v, n.theme), M = Wt(v, n.theme), B = {
|
|
5483
5483
|
geometry: F,
|
|
5484
5484
|
offsetEmu: { xEmu: N.x, yEmu: N.y },
|
|
5485
5485
|
sizeEmu: { wEmu: I.cx, hEmu: I.cy }
|
|
@@ -5518,7 +5518,7 @@ function Xl(t, e, n, r) {
|
|
|
5518
5518
|
const i = P(t, g.wp, "extent"), o = $(i, "cx"), s = $(i, "cy");
|
|
5519
5519
|
if (o <= 0 || s <= 0) return null;
|
|
5520
5520
|
const { off: a, ext: c } = rt(e), l = {
|
|
5521
|
-
geometry:
|
|
5521
|
+
geometry: ii(e),
|
|
5522
5522
|
offsetEmu: { xEmu: a.x, yEmu: a.y },
|
|
5523
5523
|
sizeEmu: { wEmu: c.cx > 0 ? c.cx : o, hEmu: c.cy > 0 ? c.cy : s }
|
|
5524
5524
|
}, u = jt(e, r.theme);
|
|
@@ -5546,7 +5546,7 @@ function rt(t) {
|
|
|
5546
5546
|
ext: i ? { cx: $(i, "cx"), cy: $(i, "cy") } : { cx: 0, cy: 0 }
|
|
5547
5547
|
};
|
|
5548
5548
|
}
|
|
5549
|
-
function
|
|
5549
|
+
function ii(t) {
|
|
5550
5550
|
const e = t.getElementsByTagNameNS(g.a, "prstGeom")[0];
|
|
5551
5551
|
switch (e == null ? void 0 : e.getAttribute("prst")) {
|
|
5552
5552
|
case "ellipse":
|
|
@@ -5646,8 +5646,8 @@ async function Zl(t) {
|
|
|
5646
5646
|
if (!n)
|
|
5647
5647
|
throw new Error("Not a valid .docx file — missing word/document.xml");
|
|
5648
5648
|
const r = Y(n);
|
|
5649
|
-
|
|
5650
|
-
const i = e.text["word/_rels/document.xml.rels"], o = i ? Ut(i) : /* @__PURE__ */ new Map(), s = il(e.text["word/theme/theme1.xml"]), a = tu(r), c =
|
|
5649
|
+
si(r);
|
|
5650
|
+
const i = e.text["word/_rels/document.xml.rels"], o = i ? Ut(i) : /* @__PURE__ */ new Map(), s = il(e.text["word/theme/theme1.xml"]), a = tu(r), c = Jr(r, {
|
|
5651
5651
|
rels: o,
|
|
5652
5652
|
bodyParagraphIndexByElement: a,
|
|
5653
5653
|
// Parse textbox bodies through the full body walker so their real
|
|
@@ -5676,7 +5676,7 @@ async function Zl(t) {
|
|
|
5676
5676
|
), { bodies: F, frames: L } = Ql(E, e.text, o, s), M = {};
|
|
5677
5677
|
for (const [U, _e] of Object.entries(e.binary))
|
|
5678
5678
|
M[U] = _e;
|
|
5679
|
-
const B = cc(e.text, Ut), O = al(e.text["word/settings.xml"]), K = ll(e.text["word/styles.xml"], O),
|
|
5679
|
+
const B = cc(e.text, Ut), O = al(e.text["word/settings.xml"]), K = ll(e.text["word/styles.xml"], O), dn = el(e.text["word/footnotes.xml"], { rels: o }), hn = nl(
|
|
5680
5680
|
e.text["word/comments.xml"],
|
|
5681
5681
|
{ rels: o },
|
|
5682
5682
|
e.text["word/commentsExtended.xml"]
|
|
@@ -5691,8 +5691,8 @@ async function Zl(t) {
|
|
|
5691
5691
|
numbering: hl(e.text["word/numbering.xml"]),
|
|
5692
5692
|
rawParts: M,
|
|
5693
5693
|
fonts: B,
|
|
5694
|
-
...Object.keys(
|
|
5695
|
-
...Object.keys(
|
|
5694
|
+
...Object.keys(dn).length > 0 ? { footnotes: dn } : {},
|
|
5695
|
+
...Object.keys(hn).length > 0 ? { comments: hn } : {},
|
|
5696
5696
|
// Surface document-wide layout settings (e.g. defaultTabStop) so
|
|
5697
5697
|
// the renderer can apply per-document tab geometry instead of
|
|
5698
5698
|
// falling back to CSS's 8-char default.
|
|
@@ -5712,10 +5712,10 @@ function Ql(t, e, n, r) {
|
|
|
5712
5712
|
const l = e[`word/${c.partId}`];
|
|
5713
5713
|
if (!l) continue;
|
|
5714
5714
|
const u = Y(l);
|
|
5715
|
-
|
|
5716
|
-
const f = e[`word/_rels/${c.partId}.rels`], d = f ? eu(Ut(f), n) : n, h = u.documentElement, p =
|
|
5715
|
+
si(u);
|
|
5716
|
+
const f = e[`word/_rels/${c.partId}.rels`], d = f ? eu(Ut(f), n) : n, h = u.documentElement, p = Jr(u, {
|
|
5717
5717
|
rels: d,
|
|
5718
|
-
bodyParagraphIndexByElement:
|
|
5718
|
+
bodyParagraphIndexByElement: oi(h),
|
|
5719
5719
|
parseBlockBody: (y) => Fe(y, { rels: d }).body,
|
|
5720
5720
|
...r ? { theme: r } : {}
|
|
5721
5721
|
});
|
|
@@ -5732,16 +5732,16 @@ function eu(t, e) {
|
|
|
5732
5732
|
}
|
|
5733
5733
|
function tu(t) {
|
|
5734
5734
|
const n = t.getElementsByTagNameNS("http://schemas.openxmlformats.org/wordprocessingml/2006/main", "body")[0];
|
|
5735
|
-
return n ?
|
|
5735
|
+
return n ? oi(n) : /* @__PURE__ */ new Map();
|
|
5736
5736
|
}
|
|
5737
|
-
function
|
|
5737
|
+
function oi(t) {
|
|
5738
5738
|
const e = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", n = /* @__PURE__ */ new Map();
|
|
5739
5739
|
let r = 0;
|
|
5740
5740
|
for (const i of Array.from(t.children))
|
|
5741
5741
|
i.namespaceURI === e && i.localName === "p" ? (n.set(i, r), r++) : i.namespaceURI === e && i.localName === "tbl" && r++;
|
|
5742
5742
|
return n;
|
|
5743
5743
|
}
|
|
5744
|
-
function
|
|
5744
|
+
function si(t) {
|
|
5745
5745
|
var r;
|
|
5746
5746
|
const n = Array.from(t.getElementsByTagNameNS("http://schemas.openxmlformats.org/markup-compatibility/2006", "Fallback"));
|
|
5747
5747
|
for (const i of n) (r = i.parentNode) == null || r.removeChild(i);
|
|
@@ -5809,12 +5809,12 @@ const au = (() => {
|
|
|
5809
5809
|
t[e] = e.toString(16).padStart(2, "0");
|
|
5810
5810
|
return t;
|
|
5811
5811
|
})();
|
|
5812
|
-
function
|
|
5812
|
+
function ai(t) {
|
|
5813
5813
|
return t.length === 64 && /^[0-9a-f]{64}$/.test(t);
|
|
5814
5814
|
}
|
|
5815
5815
|
const cu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5816
5816
|
__proto__: null,
|
|
5817
|
-
isBlobHash:
|
|
5817
|
+
isBlobHash: ai,
|
|
5818
5818
|
sha256Hex: sn
|
|
5819
5819
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5820
5820
|
function rh() {
|
|
@@ -5843,7 +5843,7 @@ function ih(t) {
|
|
|
5843
5843
|
"fetchBlobStore: no global `fetch` available. Pass one via opts.fetch."
|
|
5844
5844
|
);
|
|
5845
5845
|
const r = async (o) => ({ ...t.headers ? await t.headers() : {}, ...o }), i = (o) => {
|
|
5846
|
-
if (!
|
|
5846
|
+
if (!ai(o))
|
|
5847
5847
|
throw new Te(`fetchBlobStore: invalid hash ${JSON.stringify(o)}`);
|
|
5848
5848
|
return `${e}/${o}`;
|
|
5849
5849
|
};
|
|
@@ -5903,7 +5903,7 @@ function ih(t) {
|
|
|
5903
5903
|
}
|
|
5904
5904
|
};
|
|
5905
5905
|
}
|
|
5906
|
-
class
|
|
5906
|
+
class ci {
|
|
5907
5907
|
constructor(e) {
|
|
5908
5908
|
w(this, "store");
|
|
5909
5909
|
w(this, "onResolved");
|
|
@@ -5993,15 +5993,15 @@ function He(t, e = []) {
|
|
|
5993
5993
|
function T(t) {
|
|
5994
5994
|
return { ok: !1, error: t };
|
|
5995
5995
|
}
|
|
5996
|
-
function
|
|
5996
|
+
function li(t) {
|
|
5997
5997
|
return T({ code: "optimistic-lock", conflicts: t });
|
|
5998
5998
|
}
|
|
5999
5999
|
const lu = {
|
|
6000
6000
|
maxDepth: 100,
|
|
6001
6001
|
maxBytesEstimate: 10 * 1024 * 1024,
|
|
6002
6002
|
coalesceIdleMs: 1e3
|
|
6003
|
-
},
|
|
6004
|
-
class
|
|
6003
|
+
}, Jn = "sobree:selection";
|
|
6004
|
+
class ui {
|
|
6005
6005
|
constructor(e) {
|
|
6006
6006
|
w(this, "mgr");
|
|
6007
6007
|
w(this, "listeners", /* @__PURE__ */ new Set());
|
|
@@ -6017,9 +6017,9 @@ class hi {
|
|
|
6017
6017
|
captureTimeout: n,
|
|
6018
6018
|
trackedOrigins: /* @__PURE__ */ new Set([r])
|
|
6019
6019
|
}), this.mgr.on("stack-item-added", ({ stackItem: o }) => {
|
|
6020
|
-
o.meta.set(
|
|
6020
|
+
o.meta.set(Jn, this.captureSelection()), this.fire();
|
|
6021
6021
|
}), this.mgr.on("stack-item-popped", ({ stackItem: o }) => {
|
|
6022
|
-
const s = o.meta.get(
|
|
6022
|
+
const s = o.meta.get(Jn);
|
|
6023
6023
|
s !== void 0 && this.restoreSelection(s), this.fire();
|
|
6024
6024
|
});
|
|
6025
6025
|
}
|
|
@@ -6147,7 +6147,7 @@ function D(t) {
|
|
|
6147
6147
|
}
|
|
6148
6148
|
return e;
|
|
6149
6149
|
}
|
|
6150
|
-
const
|
|
6150
|
+
const fi = {
|
|
6151
6151
|
strong: "bold",
|
|
6152
6152
|
em: "italic",
|
|
6153
6153
|
u: "underline",
|
|
@@ -6174,36 +6174,36 @@ function gu(t, e, n) {
|
|
|
6174
6174
|
t.wrapRange(e, n);
|
|
6175
6175
|
return;
|
|
6176
6176
|
}
|
|
6177
|
-
if (
|
|
6178
|
-
const r =
|
|
6177
|
+
if (di(t, e, n)) {
|
|
6178
|
+
const r = fi[n];
|
|
6179
6179
|
if (!r) return;
|
|
6180
6180
|
t.applyRunProperties(e, { [r]: void 0 });
|
|
6181
6181
|
} else
|
|
6182
6182
|
t.wrapRange(e, n);
|
|
6183
6183
|
}
|
|
6184
|
-
function
|
|
6185
|
-
const r =
|
|
6184
|
+
function di(t, e, n) {
|
|
6185
|
+
const r = fi[n], i = hu[n];
|
|
6186
6186
|
if (!r || e.from.block.id !== e.to.block.id) return !1;
|
|
6187
6187
|
const o = t.getBlockById(e.from.block.id);
|
|
6188
6188
|
if (!o || o.kind !== "paragraph") return !1;
|
|
6189
6189
|
const a = t.getDocument().body[o.index];
|
|
6190
6190
|
if (!a || a.kind !== "paragraph") return !1;
|
|
6191
6191
|
const c = e.from.offset, l = e.to.offset, u = c === l ? a.runs : uu(a.runs, c, l);
|
|
6192
|
-
return u.length === 0 ? !1 :
|
|
6192
|
+
return u.length === 0 ? !1 : hi(u, r, i);
|
|
6193
6193
|
}
|
|
6194
|
-
function
|
|
6194
|
+
function hi(t, e, n) {
|
|
6195
6195
|
let r = !1;
|
|
6196
6196
|
for (const i of t)
|
|
6197
6197
|
if (i.kind === "text") {
|
|
6198
6198
|
if (i.text.length === 0) continue;
|
|
6199
6199
|
if (r = !0, i.properties[e] !== n) return !1;
|
|
6200
6200
|
} else if (i.kind === "hyperlink") {
|
|
6201
|
-
if (!
|
|
6201
|
+
if (!hi(i.children, e, n)) return !1;
|
|
6202
6202
|
r = !0;
|
|
6203
6203
|
}
|
|
6204
6204
|
return r;
|
|
6205
6205
|
}
|
|
6206
|
-
function
|
|
6206
|
+
function Zn(t) {
|
|
6207
6207
|
const e = t.selection.currentRange();
|
|
6208
6208
|
if (e) return e;
|
|
6209
6209
|
const n = t.selection.currentCaret();
|
|
@@ -6219,7 +6219,7 @@ function tr(t) {
|
|
|
6219
6219
|
to: { block: r, offset: o }
|
|
6220
6220
|
};
|
|
6221
6221
|
}
|
|
6222
|
-
const cn = "body", ln = "meta", yt = "parts",
|
|
6222
|
+
const cn = "body", ln = "meta", yt = "parts", pi = "partRefs", Q = "id", ye = "kind", ie = "text", lt = "props", ce = "_ast", C = {
|
|
6223
6223
|
sections: "sections",
|
|
6224
6224
|
headerFooterBodies: "headerFooterBodies",
|
|
6225
6225
|
// Floating layer (absolute-positioned drawings). Persisted alongside the
|
|
@@ -6239,18 +6239,18 @@ const cn = "body", ln = "meta", yt = "parts", bi = "partRefs", Q = "id", ye = "k
|
|
|
6239
6239
|
numbering: "numbering",
|
|
6240
6240
|
fonts: "fonts"
|
|
6241
6241
|
};
|
|
6242
|
-
function
|
|
6242
|
+
function gi(t) {
|
|
6243
6243
|
const e = [];
|
|
6244
|
-
return
|
|
6244
|
+
return mi(t, e, void 0), e;
|
|
6245
6245
|
}
|
|
6246
|
-
function
|
|
6246
|
+
function mi(t, e, n) {
|
|
6247
6247
|
for (const r of t)
|
|
6248
6248
|
mu(r, e, n);
|
|
6249
6249
|
}
|
|
6250
6250
|
function mu(t, e, n) {
|
|
6251
6251
|
if (t.kind === "text") {
|
|
6252
6252
|
const a = Rt(n, Ft(t.properties));
|
|
6253
|
-
|
|
6253
|
+
Qn(e, t.text, a);
|
|
6254
6254
|
return;
|
|
6255
6255
|
}
|
|
6256
6256
|
if (t.kind === "hyperlink") {
|
|
@@ -6258,13 +6258,13 @@ function mu(t, e, n) {
|
|
|
6258
6258
|
...Ft(t.properties),
|
|
6259
6259
|
link: a
|
|
6260
6260
|
});
|
|
6261
|
-
|
|
6261
|
+
mi(t.children, e, c);
|
|
6262
6262
|
return;
|
|
6263
6263
|
}
|
|
6264
6264
|
const { kind: r, properties: i, ...o } = t, s = Rt(n, Ft(i));
|
|
6265
|
-
|
|
6265
|
+
Qn(e, { __sobree: r, ...o }, s);
|
|
6266
6266
|
}
|
|
6267
|
-
function
|
|
6267
|
+
function Qn(t, e, n) {
|
|
6268
6268
|
const r = { insert: e };
|
|
6269
6269
|
n && Object.keys(n).length > 0 && (r.attributes = n), t.push(r);
|
|
6270
6270
|
}
|
|
@@ -6272,7 +6272,7 @@ function Rt(t, e) {
|
|
|
6272
6272
|
if (!(!t && !e))
|
|
6273
6273
|
return t ? e ? { ...t, ...e } : t : e;
|
|
6274
6274
|
}
|
|
6275
|
-
function
|
|
6275
|
+
function bi(t) {
|
|
6276
6276
|
const e = [];
|
|
6277
6277
|
let n = 0;
|
|
6278
6278
|
for (; n < t.length; ) {
|
|
@@ -6281,21 +6281,21 @@ function ki(t) {
|
|
|
6281
6281
|
n++;
|
|
6282
6282
|
continue;
|
|
6283
6283
|
}
|
|
6284
|
-
const i =
|
|
6284
|
+
const i = er(r.attributes);
|
|
6285
6285
|
if (i) {
|
|
6286
6286
|
const o = [];
|
|
6287
6287
|
let s = n;
|
|
6288
6288
|
for (; s < t.length; ) {
|
|
6289
6289
|
const c = t[s];
|
|
6290
6290
|
if (!c) break;
|
|
6291
|
-
const l =
|
|
6291
|
+
const l = er(c.attributes);
|
|
6292
6292
|
if (!l || l.href !== i.href) break;
|
|
6293
6293
|
const u = { insert: c.insert }, f = c.attributes;
|
|
6294
6294
|
if (f) {
|
|
6295
6295
|
const d = yu(f, "link");
|
|
6296
6296
|
Object.keys(d).length > 0 && (u.attributes = d);
|
|
6297
6297
|
}
|
|
6298
|
-
o.push(...
|
|
6298
|
+
o.push(...bi([u])), s++;
|
|
6299
6299
|
}
|
|
6300
6300
|
const a = {
|
|
6301
6301
|
kind: "hyperlink",
|
|
@@ -6311,7 +6311,7 @@ function ki(t) {
|
|
|
6311
6311
|
}
|
|
6312
6312
|
function bu(t) {
|
|
6313
6313
|
if (typeof t.insert == "string") {
|
|
6314
|
-
const s =
|
|
6314
|
+
const s = tr(t.attributes);
|
|
6315
6315
|
return { kind: "text", text: t.insert, properties: s };
|
|
6316
6316
|
}
|
|
6317
6317
|
const e = t.insert;
|
|
@@ -6320,10 +6320,10 @@ function bu(t) {
|
|
|
6320
6320
|
const { __sobree: n, ...r } = e;
|
|
6321
6321
|
if (typeof n != "string")
|
|
6322
6322
|
return { kind: "text", text: "", properties: {} };
|
|
6323
|
-
const i =
|
|
6323
|
+
const i = tr(t.attributes), o = { kind: n, ...r };
|
|
6324
6324
|
return Object.keys(i).length > 0 && (o.properties = i), o;
|
|
6325
6325
|
}
|
|
6326
|
-
function
|
|
6326
|
+
function er(t) {
|
|
6327
6327
|
if (!t) return null;
|
|
6328
6328
|
const e = t.link;
|
|
6329
6329
|
if (!e || typeof e != "object") return null;
|
|
@@ -6345,7 +6345,7 @@ function Ft(t) {
|
|
|
6345
6345
|
}
|
|
6346
6346
|
return Object.keys(e).length > 0 ? e : void 0;
|
|
6347
6347
|
}
|
|
6348
|
-
function
|
|
6348
|
+
function tr(t) {
|
|
6349
6349
|
if (!t) return {};
|
|
6350
6350
|
const e = {};
|
|
6351
6351
|
for (const [n, r] of Object.entries(t))
|
|
@@ -6367,7 +6367,7 @@ function oe(t, e) {
|
|
|
6367
6367
|
if (!oe(n[s], r[s])) return !1;
|
|
6368
6368
|
return !0;
|
|
6369
6369
|
}
|
|
6370
|
-
function
|
|
6370
|
+
function yi(t, e, n) {
|
|
6371
6371
|
if (n.length !== e.body.length)
|
|
6372
6372
|
throw new Error(
|
|
6373
6373
|
`seedYDoc: ids length (${n.length}) !== body length (${e.body.length})`
|
|
@@ -6379,11 +6379,11 @@ function vi(t, e, n) {
|
|
|
6379
6379
|
for (const a of [...i.keys()]) i.delete(a);
|
|
6380
6380
|
for (const a of [...o.keys()]) o.delete(a);
|
|
6381
6381
|
const s = e.body.map(
|
|
6382
|
-
(a, c) =>
|
|
6382
|
+
(a, c) => wi(n[c] ?? "", a)
|
|
6383
6383
|
);
|
|
6384
6384
|
s.length > 0 && r.insert(0, s);
|
|
6385
6385
|
for (let a = 0; a < e.body.length; a++)
|
|
6386
|
-
|
|
6386
|
+
ki(s[a], e.body[a]);
|
|
6387
6387
|
i.set(C.sections, JSON.stringify(e.sections)), i.set(C.headerFooterBodies, JSON.stringify(e.headerFooterBodies)), i.set(C.anchoredFrames, JSON.stringify(e.anchoredFrames ?? [])), i.set(C.headerFooterFrames, JSON.stringify(e.headerFooterFrames ?? {})), i.set(C.footnotes, JSON.stringify(e.footnotes ?? {})), i.set(C.comments, JSON.stringify(e.comments ?? {})), i.set(C.settings, JSON.stringify(e.settings ?? {})), i.set(C.styles, JSON.stringify(e.styles)), i.set(C.numbering, JSON.stringify(e.numbering)), i.set(C.fonts, JSON.stringify(e.fonts));
|
|
6388
6388
|
for (const [a, c] of Object.entries(e.rawParts))
|
|
6389
6389
|
o.set(a, c);
|
|
@@ -6392,29 +6392,24 @@ function vi(t, e, n) {
|
|
|
6392
6392
|
"seed"
|
|
6393
6393
|
);
|
|
6394
6394
|
}
|
|
6395
|
-
function
|
|
6395
|
+
function wi(t, e) {
|
|
6396
6396
|
const n = new W.Map();
|
|
6397
6397
|
return n.set(Q, t), e.kind === "paragraph" && (n.set(ye, "paragraph"), n.set(ie, new W.Text())), n;
|
|
6398
6398
|
}
|
|
6399
|
-
function
|
|
6400
|
-
e.kind === "paragraph" ?
|
|
6399
|
+
function ki(t, e) {
|
|
6400
|
+
e.kind === "paragraph" ? vi(t, e) : t.set(ce, JSON.stringify(e));
|
|
6401
6401
|
}
|
|
6402
|
-
function
|
|
6402
|
+
function vi(t, e) {
|
|
6403
6403
|
t.set(lt, JSON.stringify(e.properties));
|
|
6404
6404
|
let n = t.get(ie);
|
|
6405
6405
|
n instanceof W.Text || (n = new W.Text(), t.set(ie, n));
|
|
6406
|
-
const r =
|
|
6406
|
+
const r = gi(e.runs);
|
|
6407
6407
|
r.length > 0 && n.applyDelta(
|
|
6408
6408
|
r
|
|
6409
6409
|
);
|
|
6410
6410
|
}
|
|
6411
|
-
function oh(t, e) {
|
|
6412
|
-
const n = un(t, e);
|
|
6413
|
-
return fn(n, e), n;
|
|
6414
|
-
}
|
|
6415
|
-
const sh = dn;
|
|
6416
6411
|
function ut(t) {
|
|
6417
|
-
const e = t.getArray(cn), n = t.getMap(ln), r = t.getMap(yt), i = t.getMap(
|
|
6412
|
+
const e = t.getArray(cn), n = t.getMap(ln), r = t.getMap(yt), i = t.getMap(pi), o = [], s = [];
|
|
6418
6413
|
e.forEach((v) => {
|
|
6419
6414
|
const E = v.get(Q) ?? "", N = wu(v);
|
|
6420
6415
|
N && (o.push(N), s.push(E));
|
|
@@ -6478,7 +6473,7 @@ function ku(t) {
|
|
|
6478
6473
|
} catch {
|
|
6479
6474
|
r = {};
|
|
6480
6475
|
}
|
|
6481
|
-
const i = e.toDelta(), o =
|
|
6476
|
+
const i = e.toDelta(), o = bi(i);
|
|
6482
6477
|
return { kind: "paragraph", properties: r, runs: o };
|
|
6483
6478
|
}
|
|
6484
6479
|
function X(t, e, n) {
|
|
@@ -6491,7 +6486,7 @@ function X(t, e, n) {
|
|
|
6491
6486
|
}
|
|
6492
6487
|
}
|
|
6493
6488
|
function vu(t, e) {
|
|
6494
|
-
const n = t.toDelta(), r =
|
|
6489
|
+
const n = t.toDelta(), r = nr(n), i = nr(e);
|
|
6495
6490
|
if (!xu(r, i)) {
|
|
6496
6491
|
if (r.length === i.length && r.every((o, s) => xi(o, i[s]))) {
|
|
6497
6492
|
Su(t, r, i);
|
|
@@ -6500,7 +6495,7 @@ function vu(t, e) {
|
|
|
6500
6495
|
Tu(t, r, i);
|
|
6501
6496
|
}
|
|
6502
6497
|
}
|
|
6503
|
-
function
|
|
6498
|
+
function nr(t) {
|
|
6504
6499
|
const e = [];
|
|
6505
6500
|
for (const n of t) {
|
|
6506
6501
|
const r = n.attributes ?? {};
|
|
@@ -6541,17 +6536,17 @@ function Su(t, e, n) {
|
|
|
6541
6536
|
r++;
|
|
6542
6537
|
continue;
|
|
6543
6538
|
}
|
|
6544
|
-
const s =
|
|
6539
|
+
const s = rr(i, o);
|
|
6545
6540
|
let a = r + 1;
|
|
6546
6541
|
for (; a < n.length; ) {
|
|
6547
|
-
const c =
|
|
6542
|
+
const c = rr(e[a].attrs, n[a].attrs);
|
|
6548
6543
|
if (!oe(s, c)) break;
|
|
6549
6544
|
a++;
|
|
6550
6545
|
}
|
|
6551
6546
|
t.format(r, a - r, s), r = a;
|
|
6552
6547
|
}
|
|
6553
6548
|
}
|
|
6554
|
-
function
|
|
6549
|
+
function rr(t, e) {
|
|
6555
6550
|
const n = {};
|
|
6556
6551
|
for (const [r, i] of Object.entries(e))
|
|
6557
6552
|
oe(t[r], i) || (n[r] = i);
|
|
@@ -6622,10 +6617,10 @@ function Cu(t, e, n) {
|
|
|
6622
6617
|
}
|
|
6623
6618
|
const l = Iu(t, o, i);
|
|
6624
6619
|
if (l !== -1) {
|
|
6625
|
-
t.delete(l, 1),
|
|
6620
|
+
t.delete(l, 1), ir(t, i, o, s);
|
|
6626
6621
|
continue;
|
|
6627
6622
|
}
|
|
6628
|
-
|
|
6623
|
+
ir(t, i, o, s);
|
|
6629
6624
|
}
|
|
6630
6625
|
for (; t.length > e.length; )
|
|
6631
6626
|
t.delete(t.length - 1, 1);
|
|
@@ -6644,18 +6639,18 @@ function Nu(t, e) {
|
|
|
6644
6639
|
const o = t.get(Q) ?? "";
|
|
6645
6640
|
for (const s of [...t.keys()])
|
|
6646
6641
|
s !== Q && t.delete(s);
|
|
6647
|
-
i ? (t.set(ye, "paragraph"), t.set(ie, new W.Text()),
|
|
6642
|
+
i ? (t.set(ye, "paragraph"), t.set(ie, new W.Text()), vi(t, e)) : t.set(ce, JSON.stringify(e)), t.has(Q) || t.set(Q, o);
|
|
6648
6643
|
}
|
|
6649
6644
|
function Pu(t, e) {
|
|
6650
6645
|
t.get(ye) !== "paragraph" && t.set(ye, "paragraph");
|
|
6651
6646
|
let n = t.get(ie);
|
|
6652
|
-
n instanceof W.Text || (n = new W.Text(), t.set(ie, n), t.has(ce) && t.delete(ce)), vu(n,
|
|
6647
|
+
n instanceof W.Text || (n = new W.Text(), t.set(ie, n), t.has(ce) && t.delete(ce)), vu(n, gi(e.runs));
|
|
6653
6648
|
const r = JSON.stringify(e.properties);
|
|
6654
6649
|
t.get(lt) !== r && t.set(lt, r);
|
|
6655
6650
|
}
|
|
6656
|
-
function
|
|
6657
|
-
const i =
|
|
6658
|
-
t.insert(e, [i]),
|
|
6651
|
+
function ir(t, e, n, r) {
|
|
6652
|
+
const i = wi(n, r);
|
|
6653
|
+
t.insert(e, [i]), ki(i, r);
|
|
6659
6654
|
}
|
|
6660
6655
|
function Iu(t, e, n) {
|
|
6661
6656
|
for (let r = n; r < t.length; r++)
|
|
@@ -6696,7 +6691,7 @@ function Lu(t, e) {
|
|
|
6696
6691
|
return !0;
|
|
6697
6692
|
}
|
|
6698
6693
|
function Bu(t, e, n = "applyPartRefs") {
|
|
6699
|
-
const r = t.getMap(
|
|
6694
|
+
const r = t.getMap(pi);
|
|
6700
6695
|
t.transact(() => {
|
|
6701
6696
|
for (const [i, o] of Object.entries(e))
|
|
6702
6697
|
r.get(i) !== o && r.set(i, o);
|
|
@@ -6972,7 +6967,7 @@ const Ou = /* @__PURE__ */ new Set([
|
|
|
6972
6967
|
"pre",
|
|
6973
6968
|
"dl"
|
|
6974
6969
|
]), Le = /* @__PURE__ */ new Set(["ul", "ol"]);
|
|
6975
|
-
function
|
|
6970
|
+
function or(t, e, n, r) {
|
|
6976
6971
|
if (!t.some((a) => a.contains(n) || a === n)) return null;
|
|
6977
6972
|
const { blockEl: i, blockIndex: o } = zu(n, t);
|
|
6978
6973
|
if (!i || o < 0) return null;
|
|
@@ -6980,7 +6975,7 @@ function cr(t, e, n, r) {
|
|
|
6980
6975
|
return ju(i) ? s = 0 : s = Yu(i, n, r), { block: e.refAt(o), offset: s };
|
|
6981
6976
|
}
|
|
6982
6977
|
function Hu(t, e, n) {
|
|
6983
|
-
const r =
|
|
6978
|
+
const r = or(t, e, n.startContainer, n.startOffset), i = or(t, e, n.endContainer, n.endOffset);
|
|
6984
6979
|
return !r || !i ? null : { from: r, to: i };
|
|
6985
6980
|
}
|
|
6986
6981
|
function _u(t, e) {
|
|
@@ -7201,7 +7196,7 @@ function Ku(t, e) {
|
|
|
7201
7196
|
for (; t.rawParts[`word/media/image${n}.${e}`]; ) n += 1;
|
|
7202
7197
|
return `word/media/image${n}.${e}`;
|
|
7203
7198
|
}
|
|
7204
|
-
function
|
|
7199
|
+
function sr(t) {
|
|
7205
7200
|
return Math.round(t / 96 * 914400);
|
|
7206
7201
|
}
|
|
7207
7202
|
function qu(t, e, n) {
|
|
@@ -7619,8 +7614,8 @@ function Mi(t, e, n, r) {
|
|
|
7619
7614
|
const s = r.widthPx ?? 200, a = r.heightPx ?? 150, c = {
|
|
7620
7615
|
kind: "drawing",
|
|
7621
7616
|
partPath: o,
|
|
7622
|
-
widthEmu:
|
|
7623
|
-
heightEmu:
|
|
7617
|
+
widthEmu: sr(s),
|
|
7618
|
+
heightEmu: sr(a),
|
|
7624
7619
|
placement: "inline"
|
|
7625
7620
|
};
|
|
7626
7621
|
return r.altText && (c.altText = r.altText), he(t, e, c);
|
|
@@ -7802,7 +7797,7 @@ function Lf(t, e) {
|
|
|
7802
7797
|
const { revision: s, ...a } = i.properties, c = t.doc.body.slice();
|
|
7803
7798
|
return c[r] = { ...i, properties: a }, t.commit({ body: c }, [{ type: "bump", index: r }]);
|
|
7804
7799
|
}
|
|
7805
|
-
return
|
|
7800
|
+
return un(t, r);
|
|
7806
7801
|
}
|
|
7807
7802
|
function Bf(t, e) {
|
|
7808
7803
|
t.ensureCurrent();
|
|
@@ -7818,9 +7813,9 @@ function Bf(t, e) {
|
|
|
7818
7813
|
const { revision: s, ...a } = i.properties, c = t.doc.body.slice();
|
|
7819
7814
|
return c[r] = { ...i, properties: a }, t.commit({ body: c }, [{ type: "bump", index: r }]);
|
|
7820
7815
|
}
|
|
7821
|
-
return
|
|
7816
|
+
return un(t, r);
|
|
7822
7817
|
}
|
|
7823
|
-
function
|
|
7818
|
+
function un(t, e) {
|
|
7824
7819
|
if (e <= 0)
|
|
7825
7820
|
return Mf(t, e);
|
|
7826
7821
|
const n = t.doc.body[e - 1], r = t.doc.body[e];
|
|
@@ -7854,7 +7849,7 @@ function Of(t, e) {
|
|
|
7854
7849
|
return T({ code: "invalid-position", details: "target is not a paragraph" });
|
|
7855
7850
|
const r = t.trackChanges.author, i = n.properties.revision;
|
|
7856
7851
|
if ((i == null ? void 0 : i.type) === "ins" && i.author === r)
|
|
7857
|
-
return
|
|
7852
|
+
return un(t, e);
|
|
7858
7853
|
if (i)
|
|
7859
7854
|
return He(void 0, []);
|
|
7860
7855
|
const o = r === void 0 ? { type: "del" } : { type: "del", author: r }, s = t.doc.body.slice();
|
|
@@ -7874,16 +7869,16 @@ function Df(t) {
|
|
|
7874
7869
|
for (const c of r.rows)
|
|
7875
7870
|
for (const l of c.cells)
|
|
7876
7871
|
for (const u of l.content)
|
|
7877
|
-
u.kind === "paragraph" &&
|
|
7872
|
+
u.kind === "paragraph" && ar(u, a, e);
|
|
7878
7873
|
continue;
|
|
7879
7874
|
}
|
|
7880
7875
|
if (r.kind !== "paragraph") continue;
|
|
7881
7876
|
const i = ht(t, n), o = { id: i.id, version: i.version };
|
|
7882
|
-
|
|
7877
|
+
ar(r, o, e);
|
|
7883
7878
|
}
|
|
7884
7879
|
return e;
|
|
7885
7880
|
}
|
|
7886
|
-
function
|
|
7881
|
+
function ar(t, e, n) {
|
|
7887
7882
|
const r = bt(t.runs), i = t.properties.revision;
|
|
7888
7883
|
i && n.push({
|
|
7889
7884
|
range: {
|
|
@@ -8247,7 +8242,7 @@ class Wf {
|
|
|
8247
8242
|
insertRow(e, n) {
|
|
8248
8243
|
const r = this.getTable(e);
|
|
8249
8244
|
if (!r) return T({ code: "invalid-state", details: "target is not a table" });
|
|
8250
|
-
const i = Ee(r), o = n.cells ??
|
|
8245
|
+
const i = Ee(r), o = n.cells ?? cr(i);
|
|
8251
8246
|
if (o.length > i)
|
|
8252
8247
|
return T({
|
|
8253
8248
|
code: "invalid-state",
|
|
@@ -8265,7 +8260,7 @@ class Wf {
|
|
|
8265
8260
|
if (n < 0 || n >= r.rows.length)
|
|
8266
8261
|
return T({ code: "invalid-position", details: `row ${n} out of range` });
|
|
8267
8262
|
const i = r.rows.slice(), o = i[n];
|
|
8268
|
-
return i.splice(n, 1), o && Jf(i, n, o), i.length === 0 && i.push({ cells:
|
|
8263
|
+
return i.splice(n, 1), o && Jf(i, n, o), i.length === 0 && i.push({ cells: cr(Ee(r)) }), this.editor.replaceBlock(e, { ...r, rows: i });
|
|
8269
8264
|
}
|
|
8270
8265
|
// === column operations ===
|
|
8271
8266
|
insertColumn(e, n) {
|
|
@@ -8392,7 +8387,7 @@ function Ee(t) {
|
|
|
8392
8387
|
function ne() {
|
|
8393
8388
|
return { content: [{ kind: "paragraph", properties: {}, runs: [] }] };
|
|
8394
8389
|
}
|
|
8395
|
-
function
|
|
8390
|
+
function cr(t) {
|
|
8396
8391
|
return Array.from({ length: t }, () => ne());
|
|
8397
8392
|
}
|
|
8398
8393
|
function Yf(t, e) {
|
|
@@ -8594,10 +8589,10 @@ function id(t, e, n) {
|
|
|
8594
8589
|
}
|
|
8595
8590
|
function Ie(t) {
|
|
8596
8591
|
const e = [];
|
|
8597
|
-
for (const n of Array.from(t.childNodes))
|
|
8592
|
+
for (const n of Array.from(t.childNodes)) fn(n, {}, e);
|
|
8598
8593
|
return e;
|
|
8599
8594
|
}
|
|
8600
|
-
function
|
|
8595
|
+
function fn(t, e, n) {
|
|
8601
8596
|
if (t.nodeType === Node.TEXT_NODE) {
|
|
8602
8597
|
const i = t.textContent ?? "";
|
|
8603
8598
|
if (i === "") return;
|
|
@@ -8614,7 +8609,7 @@ function pn(t, e, n) {
|
|
|
8614
8609
|
n.push({ kind: "break", type: "line" });
|
|
8615
8610
|
return;
|
|
8616
8611
|
case "img": {
|
|
8617
|
-
const i = t.getAttribute("alt") ?? "", o =
|
|
8612
|
+
const i = t.getAttribute("alt") ?? "", o = lr(t.style.width, t.getAttribute("width")), s = lr(t.style.height, t.getAttribute("height")), a = {
|
|
8618
8613
|
kind: "drawing",
|
|
8619
8614
|
partPath: t.dataset.part ?? "",
|
|
8620
8615
|
widthEmu: o > 0 ? Math.round(o / 96 * 914400) : 0,
|
|
@@ -8626,7 +8621,7 @@ function pn(t, e, n) {
|
|
|
8626
8621
|
}
|
|
8627
8622
|
case "a": {
|
|
8628
8623
|
const i = t.getAttribute("href") ?? "", o = [];
|
|
8629
|
-
for (const a of Array.from(t.childNodes))
|
|
8624
|
+
for (const a of Array.from(t.childNodes)) fn(a, e, o);
|
|
8630
8625
|
const s = { kind: "hyperlink", href: i, children: o };
|
|
8631
8626
|
n.push(s);
|
|
8632
8627
|
return;
|
|
@@ -8661,19 +8656,19 @@ function pn(t, e, n) {
|
|
|
8661
8656
|
G(t, { ...e, fontFamily: "Consolas" }, n);
|
|
8662
8657
|
return;
|
|
8663
8658
|
case "span": {
|
|
8664
|
-
const i =
|
|
8659
|
+
const i = ur(e, t.getAttribute("style"));
|
|
8665
8660
|
G(t, i, n);
|
|
8666
8661
|
return;
|
|
8667
8662
|
}
|
|
8668
8663
|
default:
|
|
8669
|
-
G(t,
|
|
8664
|
+
G(t, ur(e, t.getAttribute("style")), n);
|
|
8670
8665
|
return;
|
|
8671
8666
|
}
|
|
8672
8667
|
}
|
|
8673
8668
|
function G(t, e, n) {
|
|
8674
|
-
for (const r of Array.from(t.childNodes))
|
|
8669
|
+
for (const r of Array.from(t.childNodes)) fn(r, e, n);
|
|
8675
8670
|
}
|
|
8676
|
-
function
|
|
8671
|
+
function lr(t, e) {
|
|
8677
8672
|
const n = t.trim();
|
|
8678
8673
|
if (n) {
|
|
8679
8674
|
const r = n.match(/^([\d.]+)\s*(px)?$/i);
|
|
@@ -8688,7 +8683,7 @@ function dr(t, e) {
|
|
|
8688
8683
|
}
|
|
8689
8684
|
return 0;
|
|
8690
8685
|
}
|
|
8691
|
-
function
|
|
8686
|
+
function ur(t, e) {
|
|
8692
8687
|
var r;
|
|
8693
8688
|
if (!e) return t;
|
|
8694
8689
|
const n = { ...t };
|
|
@@ -8737,7 +8732,7 @@ function sd(t, e) {
|
|
|
8737
8732
|
}
|
|
8738
8733
|
const u = n[s++];
|
|
8739
8734
|
if (!u) break;
|
|
8740
|
-
const f =
|
|
8735
|
+
const f = fr(u.getAttribute("colspan")), d = fr(u.getAttribute("rowspan")), h = ad(u);
|
|
8741
8736
|
if (f > 1 && (h.gridSpan = f), d > 1) {
|
|
8742
8737
|
h.vMerge = "restart";
|
|
8743
8738
|
for (let p = 0; p < f; p++) e.set(o + p, d - 1);
|
|
@@ -8748,7 +8743,7 @@ function sd(t, e) {
|
|
|
8748
8743
|
return r && (a.isHeader = !0), a;
|
|
8749
8744
|
}
|
|
8750
8745
|
function ad(t) {
|
|
8751
|
-
const e =
|
|
8746
|
+
const e = dr(t.style.textAlign), n = e ? { alignment: e } : {}, r = Array.from(t.children).some((o) => {
|
|
8752
8747
|
const s = o.tagName;
|
|
8753
8748
|
return s === "P" || s === "OL" || s === "UL" || s === "TABLE";
|
|
8754
8749
|
}), i = [];
|
|
@@ -8756,7 +8751,7 @@ function ad(t) {
|
|
|
8756
8751
|
for (const o of Array.from(t.children)) {
|
|
8757
8752
|
const s = o.tagName;
|
|
8758
8753
|
if (s === "P") {
|
|
8759
|
-
const a =
|
|
8754
|
+
const a = dr(o.style.textAlign) ?? e;
|
|
8760
8755
|
i.push({
|
|
8761
8756
|
kind: "paragraph",
|
|
8762
8757
|
properties: a ? { alignment: a } : {},
|
|
@@ -8807,12 +8802,12 @@ function ud(t) {
|
|
|
8807
8802
|
for (const n of t) e += n.gridSpan ?? 1;
|
|
8808
8803
|
return e;
|
|
8809
8804
|
}
|
|
8810
|
-
function
|
|
8805
|
+
function fr(t) {
|
|
8811
8806
|
if (!t) return 1;
|
|
8812
8807
|
const e = Number(t);
|
|
8813
8808
|
return Number.isFinite(e) && e >= 1 ? e : 1;
|
|
8814
8809
|
}
|
|
8815
|
-
function
|
|
8810
|
+
function dr(t) {
|
|
8816
8811
|
const e = t.trim().toLowerCase();
|
|
8817
8812
|
if (e === "left" || e === "right" || e === "center") return e;
|
|
8818
8813
|
if (e === "justify") return "both";
|
|
@@ -8878,17 +8873,17 @@ function fd(t, e) {
|
|
|
8878
8873
|
if (i === "blockquote") {
|
|
8879
8874
|
for (const s of Array.from(r.children)) {
|
|
8880
8875
|
if (!(s instanceof HTMLElement)) continue;
|
|
8881
|
-
const a =
|
|
8876
|
+
const a = hr(s, "Quote");
|
|
8882
8877
|
a && n.push(a);
|
|
8883
8878
|
}
|
|
8884
8879
|
continue;
|
|
8885
8880
|
}
|
|
8886
|
-
const o =
|
|
8881
|
+
const o = hr(r);
|
|
8887
8882
|
o && n.push(o);
|
|
8888
8883
|
}
|
|
8889
8884
|
return n;
|
|
8890
8885
|
}
|
|
8891
|
-
function
|
|
8886
|
+
function hr(t, e) {
|
|
8892
8887
|
const n = t.tagName.toLowerCase(), r = {};
|
|
8893
8888
|
if (e)
|
|
8894
8889
|
r.styleId = e;
|
|
@@ -9096,10 +9091,10 @@ class gd {
|
|
|
9096
9091
|
w(this, "ctx");
|
|
9097
9092
|
if (this.host = e, this.debounceMs = n.changeDebounceMs ?? 200, this.getContentHosts = n.contentHosts ?? (() => [e]), n.trackChanges && (this.trackChanges = { ...n.trackChanges }), this.ydoc = n.ydoc ?? new W.Doc(), this.registry = new Ei({
|
|
9098
9093
|
idPrefix: `${this.ydoc.clientID.toString(36)}_`
|
|
9099
|
-
}), this.blobStore = n.blobStore ?? null, this.blobCache = this.blobStore ? new
|
|
9094
|
+
}), this.blobStore = n.blobStore ?? null, this.blobCache = this.blobStore ? new ci({
|
|
9100
9095
|
store: this.blobStore,
|
|
9101
9096
|
onResolved: (o) => rf(this.ctx, o)
|
|
9102
|
-
}) : null, this.selection = new zf(this), this.table = new Wf(this), this.commands = new Ti(), this.history = new
|
|
9097
|
+
}) : null, this.selection = new zf(this), this.table = new Wf(this), this.commands = new Ti(), this.history = new ui({
|
|
9103
9098
|
ydoc: this.ydoc,
|
|
9104
9099
|
localOrigin: "local",
|
|
9105
9100
|
captureSelection: () => this.selection.get(),
|
|
@@ -9107,7 +9102,7 @@ class gd {
|
|
|
9107
9102
|
o && Vt(this._hosts(), this.registry, o);
|
|
9108
9103
|
}
|
|
9109
9104
|
}), this.ctx = this.buildContext(), this.trackedInput = Uf(this.ctx), this.ydoc.getArray("body").length === 0)
|
|
9110
|
-
this.doc = n.initialDocument ?? Qt(), this.registry.reset(this.doc.body.length), this.lastSerialisedBlocks = this.doc.body.map((o) => JSON.stringify(o)),
|
|
9105
|
+
this.doc = n.initialDocument ?? Qt(), this.registry.reset(this.doc.body.length), this.lastSerialisedBlocks = this.doc.body.map((o) => JSON.stringify(o)), yi(this.ydoc, this.doc, this.allBlockIds()), this.lastPartRefs = {};
|
|
9111
9106
|
else {
|
|
9112
9107
|
const o = ut(this.ydoc);
|
|
9113
9108
|
this.doc = o.doc, this.registry.adoptIds(o.ids), this.lastSerialisedBlocks = this.doc.body.map((s) => JSON.stringify(s)), this.lastPartRefs = o.partRefs, Gt(this.ctx, this.doc);
|
|
@@ -9134,12 +9129,12 @@ class gd {
|
|
|
9134
9129
|
name: o,
|
|
9135
9130
|
title: s,
|
|
9136
9131
|
run: () => {
|
|
9137
|
-
const c =
|
|
9132
|
+
const c = Zn(this);
|
|
9138
9133
|
c && gu(this, c, a);
|
|
9139
9134
|
},
|
|
9140
9135
|
isActive: () => {
|
|
9141
|
-
const c =
|
|
9142
|
-
return !!c &&
|
|
9136
|
+
const c = Zn(this);
|
|
9137
|
+
return !!c && di(this, c, a);
|
|
9143
9138
|
},
|
|
9144
9139
|
isAvailable: () => this.getBlocks().length > 0
|
|
9145
9140
|
});
|
|
@@ -9615,7 +9610,7 @@ class gd {
|
|
|
9615
9610
|
}
|
|
9616
9611
|
i.version !== r.version && n.push({ blockId: r.id, expected: r.version, actual: i.version });
|
|
9617
9612
|
}
|
|
9618
|
-
return n.length > 0 ?
|
|
9613
|
+
return n.length > 0 ? li(n) : null;
|
|
9619
9614
|
}
|
|
9620
9615
|
checkRange(e, n) {
|
|
9621
9616
|
const r = [e.from.block, e.to.block];
|
|
@@ -9813,7 +9808,10 @@ class bd {
|
|
|
9813
9808
|
get firstPaperRow() {
|
|
9814
9809
|
return this.stack.firstPaperRow;
|
|
9815
9810
|
}
|
|
9816
|
-
/**
|
|
9811
|
+
/** @deprecated Inert in practice — Viewport's render tier is
|
|
9812
|
+
* permanently 1 and `onRenderTierChange` never fires (layout-side
|
|
9813
|
+
* zoom tiers are retired; zoom never changes layout). Retained so
|
|
9814
|
+
* existing wiring compiles. */
|
|
9817
9815
|
setRenderTier(e) {
|
|
9818
9816
|
this.stack.setRenderTier(e);
|
|
9819
9817
|
}
|
|
@@ -9843,7 +9841,7 @@ class bd {
|
|
|
9843
9841
|
n,
|
|
9844
9842
|
this.editor.getDocument().headerFooterBodies
|
|
9845
9843
|
);
|
|
9846
|
-
return { ...structuredClone(
|
|
9844
|
+
return { ...structuredClone(kr), ...r };
|
|
9847
9845
|
}
|
|
9848
9846
|
/**
|
|
9849
9847
|
* Write back to section `index`. Section 0 funnels through
|
|
@@ -9983,7 +9981,7 @@ class bd {
|
|
|
9983
9981
|
exportDocx() {
|
|
9984
9982
|
const e = this.editor.getDocument(), { section: n, headerFooterBodies: r } = je(this.setup);
|
|
9985
9983
|
e.sections = [n, ...e.sections.slice(1)], e.headerFooterBodies = { ...e.headerFooterBodies, ...r };
|
|
9986
|
-
const { blob: i, warnings: o } =
|
|
9984
|
+
const { blob: i, warnings: o } = Xr(e);
|
|
9987
9985
|
for (const s of this.listeners["docx:export"])
|
|
9988
9986
|
try {
|
|
9989
9987
|
s({ warnings: o });
|
|
@@ -10071,7 +10069,7 @@ class bd {
|
|
|
10071
10069
|
}
|
|
10072
10070
|
}
|
|
10073
10071
|
function yd(t) {
|
|
10074
|
-
const e = structuredClone(
|
|
10072
|
+
const e = structuredClone(kr);
|
|
10075
10073
|
if (!t) return e;
|
|
10076
10074
|
const n = t.sections[0];
|
|
10077
10075
|
if (!n) return e;
|
|
@@ -10119,11 +10117,11 @@ class xd {
|
|
|
10119
10117
|
w(this, "onClickCapture", (e) => {
|
|
10120
10118
|
this.suppressNextClick && (this.suppressNextClick = !1, e.stopPropagation(), e.preventDefault());
|
|
10121
10119
|
});
|
|
10122
|
-
this.container = e, this.host = n, e.addEventListener("pointerdown", this.onPointerDown), e.addEventListener("pointermove", this.onPointerMove), e.addEventListener("pointerup", this.onPointerEnd), e.addEventListener("pointercancel", this.onPointerEnd), e.addEventListener("click", this.onClickCapture, { capture: !0 }), e.addEventListener("gesturestart",
|
|
10120
|
+
this.container = e, this.host = n, e.addEventListener("pointerdown", this.onPointerDown), e.addEventListener("pointermove", this.onPointerMove), e.addEventListener("pointerup", this.onPointerEnd), e.addEventListener("pointercancel", this.onPointerEnd), e.addEventListener("click", this.onClickCapture, { capture: !0 }), e.addEventListener("gesturestart", pr);
|
|
10123
10121
|
}
|
|
10124
10122
|
destroy() {
|
|
10125
10123
|
const e = this.container;
|
|
10126
|
-
e.removeEventListener("pointerdown", this.onPointerDown), e.removeEventListener("pointermove", this.onPointerMove), e.removeEventListener("pointerup", this.onPointerEnd), e.removeEventListener("pointercancel", this.onPointerEnd), e.removeEventListener("click", this.onClickCapture, { capture: !0 }), e.removeEventListener("gesturestart",
|
|
10124
|
+
e.removeEventListener("pointerdown", this.onPointerDown), e.removeEventListener("pointermove", this.onPointerMove), e.removeEventListener("pointerup", this.onPointerEnd), e.removeEventListener("pointercancel", this.onPointerEnd), e.removeEventListener("click", this.onClickCapture, { capture: !0 }), e.removeEventListener("gesturestart", pr);
|
|
10127
10125
|
}
|
|
10128
10126
|
handleDown(e) {
|
|
10129
10127
|
this.suppressNextClick = !1, e.pointerType === "touch" && (this.points.set(e.pointerId, { x: e.clientX, y: e.clientY }), this.points.size === 1 ? (this.mode = "tap", this.startX = e.clientX, this.startY = e.clientY) : this.points.size === 2 && this.beginPinch());
|
|
@@ -10154,10 +10152,10 @@ class xd {
|
|
|
10154
10152
|
!e || !n || (this.mode = "pinch", this.pinchStartDist = Math.max(Math.hypot(e.x - n.x, e.y - n.y), 1), this.pinchStartScale = this.host.getScale());
|
|
10155
10153
|
}
|
|
10156
10154
|
}
|
|
10157
|
-
function
|
|
10155
|
+
function pr(t) {
|
|
10158
10156
|
t.preventDefault();
|
|
10159
10157
|
}
|
|
10160
|
-
const Sd = 150, Td = 60, Ed = 2,
|
|
10158
|
+
const Sd = 150, Td = 60, Ed = 2, gr = 2;
|
|
10161
10159
|
class Ad {
|
|
10162
10160
|
constructor(e, n, r) {
|
|
10163
10161
|
w(this, "container");
|
|
@@ -10223,7 +10221,7 @@ class Ad {
|
|
|
10223
10221
|
return this.horizontalLock = !1, this.gesturePrimaryAxis = null, { dx: e, dy: n };
|
|
10224
10222
|
let i = e, o = n;
|
|
10225
10223
|
const s = Math.abs(i), a = Math.abs(o);
|
|
10226
|
-
return this.gesturePrimaryAxis === null && s + a > Ed && (s *
|
|
10224
|
+
return this.gesturePrimaryAxis === null && s + a > Ed && (s * gr < a ? this.gesturePrimaryAxis = "y" : a * gr < s && (this.gesturePrimaryAxis = "x")), this.gesturePrimaryAxis === "y" ? i = 0 : this.gesturePrimaryAxis === "x" && (o = 0), this.horizontalLock && (i = 0), { dx: i, dy: o };
|
|
10227
10225
|
}
|
|
10228
10226
|
}
|
|
10229
10227
|
class Cd {
|
|
@@ -10260,7 +10258,8 @@ class Cd {
|
|
|
10260
10258
|
getScale() {
|
|
10261
10259
|
return this.scale;
|
|
10262
10260
|
}
|
|
10263
|
-
/**
|
|
10261
|
+
/** @deprecated Always `1` — layout-side zoom tiers are retired (see
|
|
10262
|
+
* `pickRenderTier`). Retained so existing wiring compiles. */
|
|
10264
10263
|
getRenderTier() {
|
|
10265
10264
|
return this.renderTier;
|
|
10266
10265
|
}
|
|
@@ -10275,7 +10274,7 @@ class Cd {
|
|
|
10275
10274
|
*/
|
|
10276
10275
|
fitTo(e, n, r = !1) {
|
|
10277
10276
|
var E;
|
|
10278
|
-
const i = this.container.getBoundingClientRect(), o = e.getBoundingClientRect(), s = this.stage.getBoundingClientRect(), a = this.scale, c = o.width / a, l = o.height / a, u = (o.left - s.left) / a, f = (o.top - s.top) / a, d = 32, h = i.width - d * 2, p = i.height - d * 2, m = h / c, y = p / l, S =
|
|
10277
|
+
const i = this.container.getBoundingClientRect(), o = e.getBoundingClientRect(), s = this.stage.getBoundingClientRect(), a = this.scale, c = o.width / a, l = o.height / a, u = (o.left - s.left) / a, f = (o.top - s.top) / a, d = 32, h = i.width - d * 2, p = i.height - d * 2, m = h / c, y = p / l, S = mr(n === "width" ? m : Math.min(m, y), this.minScale, this.maxScale), x = i.width / 2 - (u + c / 2) * S;
|
|
10279
10278
|
let v;
|
|
10280
10279
|
if (n === "width") {
|
|
10281
10280
|
const N = (i.height / 2 - this.ty) / a;
|
|
@@ -10295,7 +10294,7 @@ class Cd {
|
|
|
10295
10294
|
/** Zoom to `nextScale`, anchoring the point at (clientX, clientY) in container space. */
|
|
10296
10295
|
zoomTo(e, n, r) {
|
|
10297
10296
|
var u;
|
|
10298
|
-
const i =
|
|
10297
|
+
const i = mr(e, this.minScale, this.maxScale);
|
|
10299
10298
|
if (i === this.scale) return;
|
|
10300
10299
|
const o = this.container.getBoundingClientRect(), s = n - o.left, a = r - o.top, c = (s - this.tx) / this.scale, l = (a - this.ty) / this.scale;
|
|
10301
10300
|
this.scale = i, this.tx = s - c * i, this.ty = a - l * i, this.applyTransform(), (u = this.onScaleChange) == null || u.call(this, this.scale);
|
|
@@ -10305,7 +10304,7 @@ class Cd {
|
|
|
10305
10304
|
}
|
|
10306
10305
|
applyTransform() {
|
|
10307
10306
|
var n, r;
|
|
10308
|
-
const e =
|
|
10307
|
+
const e = br(this.scale);
|
|
10309
10308
|
e !== this.renderTier && (this.renderTier = e, this.stage.style.zoom = String(e), (n = this.onRenderTierChange) == null || n.call(this, e)), this.stage.classList.add("is-gesturing"), this.stage.style.transform = this.transformCss(!0), this.scheduleSettle(), this.constructed && ((r = this.onTransformChange) == null || r.call(this));
|
|
10310
10309
|
}
|
|
10311
10310
|
/**
|
|
@@ -10357,7 +10356,7 @@ class Cd {
|
|
|
10357
10356
|
*/
|
|
10358
10357
|
applyTransformAnimated() {
|
|
10359
10358
|
var c;
|
|
10360
|
-
const e = this.stage, r =
|
|
10359
|
+
const e = this.stage, r = br(this.scale) !== this.renderTier;
|
|
10361
10360
|
e.classList.add("is-animating"), r ? (e.style.transform = this.transformCss(!0), (c = this.onTransformChange) == null || c.call(this)) : this.applyTransform();
|
|
10362
10361
|
let i = !1, o = 0;
|
|
10363
10362
|
const s = () => {
|
|
@@ -10372,7 +10371,7 @@ class Cd {
|
|
|
10372
10371
|
e.addEventListener("transitionend", a), window.setTimeout(a, Fd);
|
|
10373
10372
|
}
|
|
10374
10373
|
}
|
|
10375
|
-
function
|
|
10374
|
+
function mr(t, e, n) {
|
|
10376
10375
|
return Math.min(n, Math.max(e, t));
|
|
10377
10376
|
}
|
|
10378
10377
|
const Nd = {
|
|
@@ -10394,7 +10393,7 @@ function Id() {
|
|
|
10394
10393
|
return e.className = "sobree-viewport__slot", t.appendChild(e), t;
|
|
10395
10394
|
}
|
|
10396
10395
|
const Rd = 180, Fd = 400;
|
|
10397
|
-
function
|
|
10396
|
+
function br(t) {
|
|
10398
10397
|
return 1;
|
|
10399
10398
|
}
|
|
10400
10399
|
function Hi(t) {
|
|
@@ -10558,7 +10557,7 @@ function Dd(t) {
|
|
|
10558
10557
|
};
|
|
10559
10558
|
}
|
|
10560
10559
|
}
|
|
10561
|
-
function
|
|
10560
|
+
function oh(t, e = {}) {
|
|
10562
10561
|
const n = $d(t), { initialDocument: r, deferredDocx: i } = Hd(e.content), o = new Cd(n), s = {
|
|
10563
10562
|
...r && { initialDocument: r },
|
|
10564
10563
|
...e.pageSetup && { pageSetup: e.pageSetup },
|
|
@@ -10585,7 +10584,7 @@ function ah(t, e = {}) {
|
|
|
10585
10584
|
}
|
|
10586
10585
|
let u;
|
|
10587
10586
|
if (i) {
|
|
10588
|
-
const h =
|
|
10587
|
+
const h = yr(a);
|
|
10589
10588
|
u = a.openDocx(i).then(() => ({ warnings: h.warnings }));
|
|
10590
10589
|
} else
|
|
10591
10590
|
u = Promise.resolve({ warnings: [] });
|
|
@@ -10616,10 +10615,10 @@ function ah(t, e = {}) {
|
|
|
10616
10615
|
setDocument: (h) => a.editor.setDocument(h),
|
|
10617
10616
|
loadMarkdown: (h) => a.editor.setDocument(Hi(h)),
|
|
10618
10617
|
loadDocx: async (h) => {
|
|
10619
|
-
const p =
|
|
10618
|
+
const p = yr(a);
|
|
10620
10619
|
return await a.openDocx(h), { warnings: p.warnings };
|
|
10621
10620
|
},
|
|
10622
|
-
toDocx: () =>
|
|
10621
|
+
toDocx: () => Xr(a.editor.getDocument()),
|
|
10623
10622
|
ensurePartsLoaded: () => a.editor.ensurePartsLoaded(),
|
|
10624
10623
|
getPageSetup: () => a.getPageSetup(),
|
|
10625
10624
|
setPageSetup: (h) => a.setPageSetup(h),
|
|
@@ -10660,14 +10659,14 @@ function Hd(t) {
|
|
|
10660
10659
|
function _d(t) {
|
|
10661
10660
|
return typeof Blob < "u" && t instanceof Blob || t instanceof ArrayBuffer || t instanceof Uint8Array;
|
|
10662
10661
|
}
|
|
10663
|
-
function
|
|
10662
|
+
function yr(t) {
|
|
10664
10663
|
const e = { warnings: [] }, n = t.on("docx:import", (r) => {
|
|
10665
10664
|
e.warnings = r.warnings, n();
|
|
10666
10665
|
});
|
|
10667
10666
|
return e;
|
|
10668
10667
|
}
|
|
10669
10668
|
const et = 12, Ud = 8;
|
|
10670
|
-
function
|
|
10669
|
+
function sh(t, e) {
|
|
10671
10670
|
const n = `:scope > .sobree-floating-corner[data-placement="${e}"]`, r = t.querySelector(n);
|
|
10672
10671
|
if (r) return r;
|
|
10673
10672
|
const i = document.createElement("div");
|
|
@@ -10688,7 +10687,7 @@ function ch(t, e) {
|
|
|
10688
10687
|
s.style.pointerEvents = "auto";
|
|
10689
10688
|
}).observe(i, { childList: !0 }), t.appendChild(i), i;
|
|
10690
10689
|
}
|
|
10691
|
-
function
|
|
10690
|
+
function ah(t) {
|
|
10692
10691
|
const { zone: e, kind: n, stackRoot: r, getSetup: i, setSetup: o, onExit: s } = t, a = zd(e, n, r, i()), l = i()[n][a];
|
|
10693
10692
|
e.replaceChildren();
|
|
10694
10693
|
const u = document.createTextNode(l);
|
|
@@ -10723,7 +10722,7 @@ function jd(t) {
|
|
|
10723
10722
|
const n = window.getSelection();
|
|
10724
10723
|
n == null || n.removeAllRanges(), n == null || n.addRange(e);
|
|
10725
10724
|
}
|
|
10726
|
-
class
|
|
10725
|
+
class ch {
|
|
10727
10726
|
constructor(e, n = {}) {
|
|
10728
10727
|
w(this, "ydoc");
|
|
10729
10728
|
w(this, "commands");
|
|
@@ -10744,16 +10743,16 @@ class uh {
|
|
|
10744
10743
|
w(this, "ydocUpdateListener", null);
|
|
10745
10744
|
if (this.ydoc = e, this.origin = n.origin ?? "headless", this.commands = new Ti(), this.registry = new Ei({
|
|
10746
10745
|
idPrefix: n.idPrefix ?? `${e.clientID.toString(36)}_`
|
|
10747
|
-
}), this.blobStore = n.blobStore ?? null, this.blobCache = this.blobStore ? new
|
|
10746
|
+
}), this.blobStore = n.blobStore ?? null, this.blobCache = this.blobStore ? new ci({
|
|
10748
10747
|
store: this.blobStore,
|
|
10749
10748
|
onResolved: (i) => this.onBlobResolved(i)
|
|
10750
10749
|
}) : null, this.ydoc.getArray("body").length === 0)
|
|
10751
|
-
this.doc = n.initialDocument ?? Qt(), this.registry.reset(this.doc.body.length),
|
|
10750
|
+
this.doc = n.initialDocument ?? Qt(), this.registry.reset(this.doc.body.length), yi(this.ydoc, this.doc, this.allBlockIds()), this.lastPartRefs = {};
|
|
10752
10751
|
else {
|
|
10753
10752
|
const i = ut(this.ydoc);
|
|
10754
10753
|
this.doc = i.doc, this.registry.adoptIds(i.ids), this.lastPartRefs = i.partRefs, this.resolveCachedPartRefsInto(this.doc);
|
|
10755
10754
|
}
|
|
10756
|
-
this.history = new
|
|
10755
|
+
this.history = new ui({
|
|
10757
10756
|
ydoc: this.ydoc,
|
|
10758
10757
|
localOrigin: this.origin,
|
|
10759
10758
|
captureSelection: () => this.currentSelection,
|
|
@@ -10955,7 +10954,7 @@ class uh {
|
|
|
10955
10954
|
details: `block id ${n.id} not found`
|
|
10956
10955
|
});
|
|
10957
10956
|
if (r.version !== n.version)
|
|
10958
|
-
return
|
|
10957
|
+
return li([
|
|
10959
10958
|
{ blockId: n.id, expected: n.version, actual: r.version }
|
|
10960
10959
|
]);
|
|
10961
10960
|
}
|
|
@@ -11007,7 +11006,7 @@ class uh {
|
|
|
11007
11006
|
};
|
|
11008
11007
|
}
|
|
11009
11008
|
}
|
|
11010
|
-
function
|
|
11009
|
+
function wr(t) {
|
|
11011
11010
|
if (!t) return null;
|
|
11012
11011
|
if (t.kind === "caret")
|
|
11013
11012
|
return {
|
|
@@ -11039,7 +11038,7 @@ function Wd(t) {
|
|
|
11039
11038
|
function Yd(t, e, n) {
|
|
11040
11039
|
const r = n.publishOwnSelection ?? !0, i = {
|
|
11041
11040
|
user: n.user,
|
|
11042
|
-
selection: r ?
|
|
11041
|
+
selection: r ? wr(t.selection.get()) : null
|
|
11043
11042
|
};
|
|
11044
11043
|
e.setLocalState(i);
|
|
11045
11044
|
let o = null;
|
|
@@ -11047,7 +11046,7 @@ function Yd(t, e, n) {
|
|
|
11047
11046
|
const c = t.selection.get();
|
|
11048
11047
|
e.setLocalStateField(
|
|
11049
11048
|
"selection",
|
|
11050
|
-
|
|
11049
|
+
wr(c)
|
|
11051
11050
|
);
|
|
11052
11051
|
}));
|
|
11053
11052
|
const s = () => {
|
|
@@ -11075,7 +11074,7 @@ function Yd(t, e, n) {
|
|
|
11075
11074
|
};
|
|
11076
11075
|
}
|
|
11077
11076
|
const Xd = "sobree-presence-overlay";
|
|
11078
|
-
function
|
|
11077
|
+
function lh(t, e, n) {
|
|
11079
11078
|
const r = n.container, i = n.blockHost ?? r;
|
|
11080
11079
|
getComputedStyle(r).position === "static" && (r.style.position = "relative");
|
|
11081
11080
|
const s = document.createElement("div");
|
|
@@ -11114,91 +11113,66 @@ function Vd(t) {
|
|
|
11114
11113
|
return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/(["\\])/g, "\\$1");
|
|
11115
11114
|
}
|
|
11116
11115
|
export {
|
|
11117
|
-
|
|
11116
|
+
ci as BlobCache,
|
|
11118
11117
|
Te as BlobStoreError,
|
|
11119
11118
|
lu as DEFAULT_HISTORY_CONFIG,
|
|
11120
|
-
|
|
11119
|
+
kr as DEFAULT_PAGE_SETUP,
|
|
11121
11120
|
gd as Editor,
|
|
11122
11121
|
xc as FontFaceRegistry,
|
|
11123
|
-
|
|
11124
|
-
|
|
11122
|
+
ch as HeadlessSobree,
|
|
11123
|
+
ui as History,
|
|
11125
11124
|
pu as MARK_COMMAND_DEFS,
|
|
11126
11125
|
hu as MARK_ON,
|
|
11127
|
-
|
|
11126
|
+
fi as MARK_PROP,
|
|
11128
11127
|
qt as PAGE_SIZES,
|
|
11129
11128
|
Bs as Paper,
|
|
11130
11129
|
js as PaperStack,
|
|
11131
11130
|
bd as Sobree,
|
|
11132
11131
|
Cd as Viewport,
|
|
11133
|
-
ce as Y_BLOCK_AST_KEY,
|
|
11134
|
-
Q as Y_BLOCK_ID_KEY,
|
|
11135
|
-
ye as Y_BLOCK_KIND_KEY,
|
|
11136
|
-
lt as Y_BLOCK_PROPS_KEY,
|
|
11137
|
-
ie as Y_BLOCK_TEXT_KEY,
|
|
11138
|
-
cn as Y_BODY_KEY,
|
|
11139
|
-
C as Y_META_FIELDS,
|
|
11140
|
-
ln as Y_META_KEY,
|
|
11141
|
-
yt as Y_PARTS_KEY,
|
|
11142
11132
|
At as appendBlock,
|
|
11143
11133
|
Si as applyDocumentToYDoc,
|
|
11144
11134
|
Yd as attachPresence,
|
|
11145
|
-
|
|
11135
|
+
lh as attachPresenceOverlay,
|
|
11146
11136
|
Wi as attachSections,
|
|
11147
|
-
ir as attrsToRunProps,
|
|
11148
11137
|
ca as blocksToTemplate,
|
|
11149
|
-
oh as buildBlockYMap,
|
|
11150
11138
|
ac as canEmbed,
|
|
11151
|
-
|
|
11152
|
-
ah as createSobree,
|
|
11139
|
+
oh as createSobree,
|
|
11153
11140
|
ta as defaultMargins,
|
|
11154
11141
|
ea as defaultPageSize,
|
|
11155
11142
|
Qs as defaultSection,
|
|
11156
11143
|
en as defaultStyles,
|
|
11157
|
-
ki as deltaToRuns,
|
|
11158
11144
|
tc as deobfuscate,
|
|
11159
|
-
vu as diffApplyText,
|
|
11160
11145
|
wc as embedFontIntoDoc,
|
|
11161
11146
|
qd as emphasis,
|
|
11162
11147
|
Qt as emptyDocument,
|
|
11163
|
-
|
|
11148
|
+
ah as enterZoneEdit,
|
|
11164
11149
|
ih as fetchBlobStore,
|
|
11165
11150
|
rc as generateFontKey,
|
|
11166
|
-
|
|
11151
|
+
sh as getFloatingCorner,
|
|
11167
11152
|
na as heading,
|
|
11168
11153
|
rh as inMemoryBlobStore,
|
|
11169
|
-
|
|
11170
|
-
|
|
11154
|
+
ai as isBlobHash,
|
|
11155
|
+
di as isMarkActive,
|
|
11171
11156
|
th as isParagraph,
|
|
11172
11157
|
Wd as isPresenceState,
|
|
11173
11158
|
nh as isTable,
|
|
11174
|
-
ic as isUnobfuscated,
|
|
11175
11159
|
eh as makeHeaderFooterRef,
|
|
11176
11160
|
nc as obfuscate,
|
|
11177
11161
|
Qd as pageBreak,
|
|
11178
|
-
je as pageSetupToSection,
|
|
11179
11162
|
Re as paragraph,
|
|
11180
11163
|
Hi as parseMarkdown,
|
|
11181
|
-
|
|
11182
|
-
xr as presenceSelectionFromEditor,
|
|
11183
|
-
wu as projectBlock,
|
|
11164
|
+
wr as presenceSelectionFromEditor,
|
|
11184
11165
|
ut as projectYDoc,
|
|
11185
|
-
|
|
11186
|
-
tr as rangeAtSelection,
|
|
11166
|
+
Zn as rangeAtSelection,
|
|
11187
11167
|
sc as readFsType,
|
|
11188
11168
|
kc as removeFontFromDoc,
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
Ft as runPropsToAttrs,
|
|
11192
|
-
yi as runsToDelta,
|
|
11193
|
-
Dt as sectionToPageSetup,
|
|
11194
|
-
vi as seedYDoc,
|
|
11169
|
+
Pr as resolveStyleCascade,
|
|
11170
|
+
yi as seedYDoc,
|
|
11195
11171
|
sn as sha256Hex,
|
|
11196
11172
|
Zd as softBreak,
|
|
11197
11173
|
Jd as strong,
|
|
11198
|
-
bn as substituteVariables,
|
|
11199
11174
|
sa as templateToBlocks,
|
|
11200
11175
|
st as text,
|
|
11201
|
-
gu as toggleMark
|
|
11202
|
-
yn as zoneTemplateFor
|
|
11176
|
+
gu as toggleMark
|
|
11203
11177
|
};
|
|
11204
11178
|
//# sourceMappingURL=index.js.map
|