@harbour-enterprises/superdoc 0.24.0-next.1 → 0.24.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{PdfViewer-DbOqZXrQ.es.js → PdfViewer-DEWI6Uts.es.js} +1 -1
- package/dist/chunks/{PdfViewer-JCz8O4m9.cjs → PdfViewer-skWUtg2N.cjs} +1 -1
- package/dist/chunks/{index-BppAJo0E.cjs → index-2QL0aZ2S.cjs} +2 -2
- package/dist/chunks/{index-BRpb9ulj.es.js → index-C_AMhrHP.es.js} +2 -2
- package/dist/chunks/{super-editor.es-B6zt2zq-.cjs → super-editor.es-CfK_qBM9.cjs} +1496 -897
- package/dist/chunks/{super-editor.es-BkjovEJQ.es.js → super-editor.es-iMAoOYOw.es.js} +1496 -897
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/style.css +5 -4
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-CTR0TlK4.js → converter-BueCftlx.js} +1179 -858
- package/dist/super-editor/chunks/{docx-zipper-DUHu_gKU.js → docx-zipper-C9jmfWYZ.js} +1 -1
- package/dist/super-editor/chunks/{editor-uVrxFmWV.js → editor-BsuNqVvp.js} +332 -53
- package/dist/super-editor/chunks/{toolbar-CotoiG3_.js → toolbar-DxhfgAoa.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +5 -4
- package/dist/super-editor/super-editor/src/core/super-converter/exporter.d.ts +5 -0
- package/dist/super-editor/super-editor/src/core/super-converter/helpers.d.ts +22 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/docxImporter.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/trackChangesImporter.d.ts +5 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/types/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/helpers.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/del/del-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/del/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ins/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ins/ins-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/extensions/image/image.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/image/imageHelpers/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/extensions/image/imageHelpers/legacyAttributes.d.ts +17 -0
- package/dist/super-editor/super-editor.es.js +7 -7
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +1496 -897
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -15088,14 +15088,21 @@ function twipsToInches(twips) {
|
|
|
15088
15088
|
function twipsToPixels(twips) {
|
|
15089
15089
|
if (twips == null) return;
|
|
15090
15090
|
const inches = twipsToInches(twips);
|
|
15091
|
+
return inchesToPixels(inches);
|
|
15092
|
+
}
|
|
15093
|
+
function pixelsToTwips(pixels) {
|
|
15094
|
+
const inches = pixelsToInches(pixels);
|
|
15095
|
+
return inchesToTwips(inches);
|
|
15096
|
+
}
|
|
15097
|
+
function inchesToPixels(inches) {
|
|
15091
15098
|
if (inches == null) return;
|
|
15092
15099
|
const pixels = inches * 96;
|
|
15093
15100
|
return Math.round(pixels * 1e3) / 1e3;
|
|
15094
15101
|
}
|
|
15095
|
-
function
|
|
15102
|
+
function pixelsToInches(pixels) {
|
|
15096
15103
|
if (pixels == null) return;
|
|
15097
15104
|
const inches = Number(pixels) / 96;
|
|
15098
|
-
return
|
|
15105
|
+
return inches;
|
|
15099
15106
|
}
|
|
15100
15107
|
function twipsToLines(twips) {
|
|
15101
15108
|
if (twips == null) return;
|
|
@@ -15146,6 +15153,71 @@ function degreesToRot(degrees) {
|
|
|
15146
15153
|
if (degrees == null) return;
|
|
15147
15154
|
return degrees * 6e4;
|
|
15148
15155
|
}
|
|
15156
|
+
function pixelsToPolygonUnits(pixels) {
|
|
15157
|
+
if (pixels == null) return;
|
|
15158
|
+
const pu = pixels * 96;
|
|
15159
|
+
return Math.round(pu);
|
|
15160
|
+
}
|
|
15161
|
+
function polygonUnitsToPixels(pu) {
|
|
15162
|
+
if (pu == null) return;
|
|
15163
|
+
const pixels = Number(pu) / 96;
|
|
15164
|
+
return Math.round(pixels * 1e3) / 1e3;
|
|
15165
|
+
}
|
|
15166
|
+
function polygonToObj(polygonNode) {
|
|
15167
|
+
if (!polygonNode) return null;
|
|
15168
|
+
const points = [];
|
|
15169
|
+
polygonNode.elements.forEach((element) => {
|
|
15170
|
+
if (["wp:start", "wp:lineTo"].includes(element.name)) {
|
|
15171
|
+
const { x, y: y2 } = element.attributes;
|
|
15172
|
+
points.push([polygonUnitsToPixels(x), polygonUnitsToPixels(y2)]);
|
|
15173
|
+
}
|
|
15174
|
+
});
|
|
15175
|
+
if (points.length > 1) {
|
|
15176
|
+
const firstPoint = points[0];
|
|
15177
|
+
const lastPoint = points[points.length - 1];
|
|
15178
|
+
if (firstPoint[0] === lastPoint[0] && firstPoint[1] === lastPoint[1]) {
|
|
15179
|
+
points.pop();
|
|
15180
|
+
}
|
|
15181
|
+
}
|
|
15182
|
+
return points;
|
|
15183
|
+
}
|
|
15184
|
+
function objToPolygon(points) {
|
|
15185
|
+
if (!points || !Array.isArray(points)) return null;
|
|
15186
|
+
const polygonNode = {
|
|
15187
|
+
name: "wp:wrapPolygon",
|
|
15188
|
+
type: "wp:wrapPolygon",
|
|
15189
|
+
attributes: {
|
|
15190
|
+
edited: "0"
|
|
15191
|
+
},
|
|
15192
|
+
elements: []
|
|
15193
|
+
};
|
|
15194
|
+
points.forEach((point, index2) => {
|
|
15195
|
+
const [x, y2] = point;
|
|
15196
|
+
const tagName = index2 === 0 ? "wp:start" : "wp:lineTo";
|
|
15197
|
+
const pointNode = {
|
|
15198
|
+
name: tagName,
|
|
15199
|
+
type: tagName,
|
|
15200
|
+
attributes: {
|
|
15201
|
+
x: pixelsToPolygonUnits(x),
|
|
15202
|
+
y: pixelsToPolygonUnits(y2)
|
|
15203
|
+
}
|
|
15204
|
+
};
|
|
15205
|
+
polygonNode.elements.push(pointNode);
|
|
15206
|
+
});
|
|
15207
|
+
if (points.length > 0) {
|
|
15208
|
+
const [startX, startY] = points[0];
|
|
15209
|
+
const closePointNode = {
|
|
15210
|
+
name: "wp:lineTo",
|
|
15211
|
+
type: "wp:lineTo",
|
|
15212
|
+
attributes: {
|
|
15213
|
+
x: pixelsToPolygonUnits(startX),
|
|
15214
|
+
y: pixelsToPolygonUnits(startY)
|
|
15215
|
+
}
|
|
15216
|
+
};
|
|
15217
|
+
polygonNode.elements.push(closePointNode);
|
|
15218
|
+
}
|
|
15219
|
+
return polygonNode;
|
|
15220
|
+
}
|
|
15149
15221
|
const getTextIndentExportValue = (indent) => {
|
|
15150
15222
|
const [value, unit] = parseSizeUnit(indent);
|
|
15151
15223
|
const functionsMap = {
|
|
@@ -24470,37 +24542,37 @@ const _NodeTranslator = class _NodeTranslator {
|
|
|
24470
24542
|
/** @type {typeof TranslatorTypes} */
|
|
24471
24543
|
__publicField(_NodeTranslator, "translatorTypes", TranslatorTypes);
|
|
24472
24544
|
let NodeTranslator = _NodeTranslator;
|
|
24473
|
-
const encode$
|
|
24545
|
+
const encode$1e = (attributes) => {
|
|
24474
24546
|
return attributes["w:type"];
|
|
24475
24547
|
};
|
|
24476
|
-
const decode$
|
|
24548
|
+
const decode$16 = (attrs) => {
|
|
24477
24549
|
const { lineBreakType } = attrs;
|
|
24478
24550
|
return lineBreakType;
|
|
24479
24551
|
};
|
|
24480
24552
|
const attrConfig$G = Object.freeze({
|
|
24481
24553
|
xmlName: "w:type",
|
|
24482
24554
|
sdName: "lineBreakType",
|
|
24483
|
-
encode: encode$
|
|
24484
|
-
decode: decode$
|
|
24555
|
+
encode: encode$1e,
|
|
24556
|
+
decode: decode$16
|
|
24485
24557
|
});
|
|
24486
|
-
const encode$
|
|
24558
|
+
const encode$1d = (attributes) => {
|
|
24487
24559
|
const xmlAttrValue = attributes["w:clear"];
|
|
24488
24560
|
return xmlAttrValue;
|
|
24489
24561
|
};
|
|
24490
|
-
const decode$
|
|
24562
|
+
const decode$15 = (attrs) => {
|
|
24491
24563
|
const { clear } = attrs;
|
|
24492
24564
|
return clear;
|
|
24493
24565
|
};
|
|
24494
24566
|
const attrConfig$F = Object.freeze({
|
|
24495
24567
|
xmlName: "w:clear",
|
|
24496
24568
|
sdName: "clear",
|
|
24497
|
-
encode: encode$
|
|
24498
|
-
decode: decode$
|
|
24569
|
+
encode: encode$1d,
|
|
24570
|
+
decode: decode$15
|
|
24499
24571
|
});
|
|
24500
|
-
const validXmlAttributes$
|
|
24501
|
-
const XML_NODE_NAME$
|
|
24572
|
+
const validXmlAttributes$p = [attrConfig$G, attrConfig$F];
|
|
24573
|
+
const XML_NODE_NAME$B = "w:br";
|
|
24502
24574
|
const SD_NODE_NAME$h = "lineBreak";
|
|
24503
|
-
const encode$
|
|
24575
|
+
const encode$1c = (_2, encodedAttrs) => {
|
|
24504
24576
|
const isPageBreak = encodedAttrs?.lineBreakType === "page";
|
|
24505
24577
|
const translated = {
|
|
24506
24578
|
type: isPageBreak ? "hardBreak" : "lineBreak"
|
|
@@ -24510,7 +24582,7 @@ const encode$1a = (_2, encodedAttrs) => {
|
|
|
24510
24582
|
}
|
|
24511
24583
|
return translated;
|
|
24512
24584
|
};
|
|
24513
|
-
const decode$
|
|
24585
|
+
const decode$14 = (params, decodedAttrs) => {
|
|
24514
24586
|
const { node } = params;
|
|
24515
24587
|
if (!node) return;
|
|
24516
24588
|
const wBreak = { name: "w:br" };
|
|
@@ -24527,39 +24599,39 @@ const decode$12 = (params, decodedAttrs) => {
|
|
|
24527
24599
|
};
|
|
24528
24600
|
return translated;
|
|
24529
24601
|
};
|
|
24530
|
-
const config$
|
|
24531
|
-
xmlName: XML_NODE_NAME$
|
|
24602
|
+
const config$y = {
|
|
24603
|
+
xmlName: XML_NODE_NAME$B,
|
|
24532
24604
|
sdNodeOrKeyName: SD_NODE_NAME$h,
|
|
24533
24605
|
type: NodeTranslator.translatorTypes.NODE,
|
|
24534
|
-
encode: encode$
|
|
24535
|
-
decode: decode$
|
|
24536
|
-
attributes: validXmlAttributes$
|
|
24606
|
+
encode: encode$1c,
|
|
24607
|
+
decode: decode$14,
|
|
24608
|
+
attributes: validXmlAttributes$p
|
|
24537
24609
|
};
|
|
24538
|
-
const translator$
|
|
24539
|
-
const encode$
|
|
24540
|
-
const decode$
|
|
24610
|
+
const translator$1c = NodeTranslator.from(config$y);
|
|
24611
|
+
const encode$1b = (attributes) => attributes?.["w:val"];
|
|
24612
|
+
const decode$13 = (attrs) => attrs?.highlight;
|
|
24541
24613
|
const attrConfig$E = Object.freeze({
|
|
24542
24614
|
xmlName: "w:val",
|
|
24543
24615
|
sdName: "highlight",
|
|
24544
|
-
encode: encode$
|
|
24545
|
-
decode: decode$
|
|
24616
|
+
encode: encode$1b,
|
|
24617
|
+
decode: decode$13
|
|
24546
24618
|
});
|
|
24547
|
-
const validXmlAttributes$
|
|
24548
|
-
const XML_NODE_NAME$
|
|
24549
|
-
const SD_ATTR_KEY$
|
|
24619
|
+
const validXmlAttributes$o = [attrConfig$E];
|
|
24620
|
+
const XML_NODE_NAME$A = "w:highlight";
|
|
24621
|
+
const SD_ATTR_KEY$i = "highlight";
|
|
24550
24622
|
const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
|
|
24551
|
-
const encode$
|
|
24623
|
+
const encode$1a = (params, encodedAttrs = {}) => {
|
|
24552
24624
|
const { nodes } = params;
|
|
24553
24625
|
const node = nodes?.[0];
|
|
24554
24626
|
const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
|
|
24555
24627
|
return {
|
|
24556
24628
|
type: "attr",
|
|
24557
|
-
xmlName: XML_NODE_NAME$
|
|
24558
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
24629
|
+
xmlName: XML_NODE_NAME$A,
|
|
24630
|
+
sdNodeOrKeyName: SD_ATTR_KEY$i,
|
|
24559
24631
|
attributes: { "w:val": value ?? null }
|
|
24560
24632
|
};
|
|
24561
24633
|
};
|
|
24562
|
-
const decode$
|
|
24634
|
+
const decode$12 = (params) => {
|
|
24563
24635
|
const attrs = params?.node?.attrs || {};
|
|
24564
24636
|
const highlightValue = attrs.highlight ?? attrs.color ?? null;
|
|
24565
24637
|
if (!highlightValue) return void 0;
|
|
@@ -24567,14 +24639,14 @@ const decode$10 = (params) => {
|
|
|
24567
24639
|
if (!normalizedValue) return void 0;
|
|
24568
24640
|
if (DISABLED_TOKENS.has(normalizedValue)) {
|
|
24569
24641
|
return {
|
|
24570
|
-
name: XML_NODE_NAME$
|
|
24642
|
+
name: XML_NODE_NAME$A,
|
|
24571
24643
|
attributes: { "w:val": "none" }
|
|
24572
24644
|
};
|
|
24573
24645
|
}
|
|
24574
24646
|
const keyword = getDocxHighlightKeywordFromHex(highlightValue);
|
|
24575
24647
|
if (keyword) {
|
|
24576
24648
|
return {
|
|
24577
|
-
name: XML_NODE_NAME$
|
|
24649
|
+
name: XML_NODE_NAME$A,
|
|
24578
24650
|
attributes: { "w:val": keyword }
|
|
24579
24651
|
};
|
|
24580
24652
|
}
|
|
@@ -24589,63 +24661,63 @@ const decode$10 = (params) => {
|
|
|
24589
24661
|
}
|
|
24590
24662
|
};
|
|
24591
24663
|
};
|
|
24592
|
-
const config$
|
|
24593
|
-
xmlName: XML_NODE_NAME$
|
|
24594
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
24664
|
+
const config$x = {
|
|
24665
|
+
xmlName: XML_NODE_NAME$A,
|
|
24666
|
+
sdNodeOrKeyName: SD_ATTR_KEY$i,
|
|
24595
24667
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
24596
|
-
encode: encode$
|
|
24597
|
-
decode: decode$
|
|
24598
|
-
attributes: validXmlAttributes$
|
|
24668
|
+
encode: encode$1a,
|
|
24669
|
+
decode: decode$12,
|
|
24670
|
+
attributes: validXmlAttributes$o
|
|
24599
24671
|
};
|
|
24600
|
-
const translator$
|
|
24601
|
-
const encode$
|
|
24672
|
+
const translator$1b = NodeTranslator.from(config$x);
|
|
24673
|
+
const encode$19 = (attributes) => {
|
|
24602
24674
|
return attributes["w:val"];
|
|
24603
24675
|
};
|
|
24604
|
-
const decode
|
|
24676
|
+
const decode$11 = (attrs) => {
|
|
24605
24677
|
const { tabSize } = attrs || {};
|
|
24606
24678
|
return tabSize;
|
|
24607
24679
|
};
|
|
24608
24680
|
const attrConfig$D = Object.freeze({
|
|
24609
24681
|
xmlName: "w:val",
|
|
24610
24682
|
sdName: "tabSize",
|
|
24611
|
-
encode: encode$
|
|
24612
|
-
decode: decode
|
|
24683
|
+
encode: encode$19,
|
|
24684
|
+
decode: decode$11
|
|
24613
24685
|
});
|
|
24614
|
-
const encode$
|
|
24686
|
+
const encode$18 = (attributes) => {
|
|
24615
24687
|
return attributes["w:leader"];
|
|
24616
24688
|
};
|
|
24617
|
-
const decode$
|
|
24689
|
+
const decode$10 = (attrs) => {
|
|
24618
24690
|
const { leader } = attrs || {};
|
|
24619
24691
|
return leader;
|
|
24620
24692
|
};
|
|
24621
24693
|
const attrConfig$C = Object.freeze({
|
|
24622
24694
|
xmlName: "w:leader",
|
|
24623
24695
|
sdName: "leader",
|
|
24624
|
-
encode: encode$
|
|
24625
|
-
decode: decode$
|
|
24696
|
+
encode: encode$18,
|
|
24697
|
+
decode: decode$10
|
|
24626
24698
|
});
|
|
24627
|
-
const encode$
|
|
24699
|
+
const encode$17 = (attributes) => {
|
|
24628
24700
|
return attributes["w:pos"];
|
|
24629
24701
|
};
|
|
24630
|
-
const decode
|
|
24702
|
+
const decode$$ = (attrs) => {
|
|
24631
24703
|
const { pos } = attrs || {};
|
|
24632
24704
|
return pos;
|
|
24633
24705
|
};
|
|
24634
24706
|
const attrConfig$B = Object.freeze({
|
|
24635
24707
|
xmlName: "w:pos",
|
|
24636
24708
|
sdName: "pos",
|
|
24637
|
-
encode: encode$
|
|
24638
|
-
decode: decode
|
|
24709
|
+
encode: encode$17,
|
|
24710
|
+
decode: decode$$
|
|
24639
24711
|
});
|
|
24640
|
-
const validXmlAttributes$
|
|
24641
|
-
const XML_NODE_NAME$
|
|
24712
|
+
const validXmlAttributes$n = [attrConfig$D, attrConfig$B, attrConfig$C];
|
|
24713
|
+
const XML_NODE_NAME$z = "w:tab";
|
|
24642
24714
|
const SD_NODE_NAME$g = "tab";
|
|
24643
|
-
const encode$
|
|
24715
|
+
const encode$16 = (_2, encodedAttrs = {}) => {
|
|
24644
24716
|
const translated = { type: "tab" };
|
|
24645
24717
|
if (encodedAttrs) translated.attrs = { ...encodedAttrs };
|
|
24646
24718
|
return translated;
|
|
24647
24719
|
};
|
|
24648
|
-
const decode$
|
|
24720
|
+
const decode$_ = (params, decodedAttrs = {}) => {
|
|
24649
24721
|
const { node } = params || {};
|
|
24650
24722
|
if (!node) return;
|
|
24651
24723
|
const wTab = { name: "w:tab" };
|
|
@@ -24661,15 +24733,15 @@ const decode$Y = (params, decodedAttrs = {}) => {
|
|
|
24661
24733
|
}
|
|
24662
24734
|
return translated;
|
|
24663
24735
|
};
|
|
24664
|
-
const config$
|
|
24665
|
-
xmlName: XML_NODE_NAME$
|
|
24736
|
+
const config$w = {
|
|
24737
|
+
xmlName: XML_NODE_NAME$z,
|
|
24666
24738
|
sdNodeOrKeyName: SD_NODE_NAME$g,
|
|
24667
24739
|
type: NodeTranslator.translatorTypes.NODE,
|
|
24668
|
-
encode: encode$
|
|
24669
|
-
decode: decode$
|
|
24670
|
-
attributes: validXmlAttributes$
|
|
24740
|
+
encode: encode$16,
|
|
24741
|
+
decode: decode$_,
|
|
24742
|
+
attributes: validXmlAttributes$n
|
|
24671
24743
|
};
|
|
24672
|
-
const translator$
|
|
24744
|
+
const translator$1a = NodeTranslator.from(config$w);
|
|
24673
24745
|
const mergeTextNodes = (nodes) => {
|
|
24674
24746
|
if (!nodes || !Array.isArray(nodes)) {
|
|
24675
24747
|
return nodes;
|
|
@@ -25187,91 +25259,91 @@ const handleParagraphNode$1 = (params) => {
|
|
|
25187
25259
|
}
|
|
25188
25260
|
return schemaNode;
|
|
25189
25261
|
};
|
|
25190
|
-
const encode$
|
|
25262
|
+
const encode$15 = (attributes) => {
|
|
25191
25263
|
return attributes["w:rsidDel"];
|
|
25192
25264
|
};
|
|
25193
|
-
const decode$
|
|
25265
|
+
const decode$Z = (attrs) => {
|
|
25194
25266
|
return attrs.rsidDel;
|
|
25195
25267
|
};
|
|
25196
25268
|
const attrConfig$A = Object.freeze({
|
|
25197
25269
|
xmlName: "w:rsidDel",
|
|
25198
25270
|
sdName: "rsidDel",
|
|
25199
|
-
encode: encode$
|
|
25200
|
-
decode: decode$
|
|
25271
|
+
encode: encode$15,
|
|
25272
|
+
decode: decode$Z
|
|
25201
25273
|
});
|
|
25202
|
-
const encode$
|
|
25274
|
+
const encode$14 = (attributes) => {
|
|
25203
25275
|
return attributes["w:rsidP"];
|
|
25204
25276
|
};
|
|
25205
|
-
const decode$
|
|
25277
|
+
const decode$Y = (attrs) => {
|
|
25206
25278
|
return attrs.rsidP;
|
|
25207
25279
|
};
|
|
25208
25280
|
const attrConfig$z = Object.freeze({
|
|
25209
25281
|
xmlName: "w:rsidP",
|
|
25210
25282
|
sdName: "rsidP",
|
|
25211
|
-
encode: encode$
|
|
25212
|
-
decode: decode$
|
|
25283
|
+
encode: encode$14,
|
|
25284
|
+
decode: decode$Y
|
|
25213
25285
|
});
|
|
25214
|
-
const encode$
|
|
25286
|
+
const encode$13 = (attributes) => {
|
|
25215
25287
|
return attributes["w:rsidR"];
|
|
25216
25288
|
};
|
|
25217
|
-
const decode$
|
|
25289
|
+
const decode$X = (attrs) => {
|
|
25218
25290
|
return attrs.rsidR;
|
|
25219
25291
|
};
|
|
25220
25292
|
const attrConfig$y = Object.freeze({
|
|
25221
25293
|
xmlName: "w:rsidR",
|
|
25222
25294
|
sdName: "rsidR",
|
|
25223
|
-
encode: encode$
|
|
25224
|
-
decode: decode$
|
|
25295
|
+
encode: encode$13,
|
|
25296
|
+
decode: decode$X
|
|
25225
25297
|
});
|
|
25226
|
-
const encode$
|
|
25298
|
+
const encode$12 = (attributes) => {
|
|
25227
25299
|
return attributes["w:rsidRPr"];
|
|
25228
25300
|
};
|
|
25229
|
-
const decode$
|
|
25301
|
+
const decode$W = (attrs) => {
|
|
25230
25302
|
return attrs.rsidRPr;
|
|
25231
25303
|
};
|
|
25232
25304
|
const attrConfig$x = Object.freeze({
|
|
25233
25305
|
xmlName: "w:rsidRPr",
|
|
25234
25306
|
sdName: "rsidRPr",
|
|
25235
|
-
encode: encode$
|
|
25236
|
-
decode: decode$
|
|
25307
|
+
encode: encode$12,
|
|
25308
|
+
decode: decode$W
|
|
25237
25309
|
});
|
|
25238
|
-
const encode
|
|
25310
|
+
const encode$11 = (attributes) => {
|
|
25239
25311
|
return attributes["w:rsidRDefault"];
|
|
25240
25312
|
};
|
|
25241
|
-
const decode$
|
|
25313
|
+
const decode$V = (attrs) => {
|
|
25242
25314
|
return attrs.rsidRDefault;
|
|
25243
25315
|
};
|
|
25244
25316
|
const attrConfig$w = Object.freeze({
|
|
25245
25317
|
xmlName: "w:rsidRDefault",
|
|
25246
25318
|
sdName: "rsidRDefault",
|
|
25247
|
-
encode: encode
|
|
25248
|
-
decode: decode$
|
|
25319
|
+
encode: encode$11,
|
|
25320
|
+
decode: decode$V
|
|
25249
25321
|
});
|
|
25250
|
-
const encode$
|
|
25322
|
+
const encode$10 = (attributes) => {
|
|
25251
25323
|
return attributes["w14:paraId"];
|
|
25252
25324
|
};
|
|
25253
|
-
const decode$
|
|
25325
|
+
const decode$U = (attrs) => {
|
|
25254
25326
|
return attrs.paraId;
|
|
25255
25327
|
};
|
|
25256
25328
|
const attrConfig$v = Object.freeze({
|
|
25257
25329
|
xmlName: "w14:paraId",
|
|
25258
25330
|
sdName: "paraId",
|
|
25259
|
-
encode: encode$
|
|
25260
|
-
decode: decode$
|
|
25331
|
+
encode: encode$10,
|
|
25332
|
+
decode: decode$U
|
|
25261
25333
|
});
|
|
25262
|
-
const encode
|
|
25334
|
+
const encode$$ = (attributes) => {
|
|
25263
25335
|
return attributes["w14:textId"];
|
|
25264
25336
|
};
|
|
25265
|
-
const decode$
|
|
25337
|
+
const decode$T = (attrs) => {
|
|
25266
25338
|
return attrs.textId;
|
|
25267
25339
|
};
|
|
25268
25340
|
const attrConfig$u = Object.freeze({
|
|
25269
25341
|
xmlName: "w14:textId",
|
|
25270
25342
|
sdName: "textId",
|
|
25271
|
-
encode: encode
|
|
25272
|
-
decode: decode$
|
|
25343
|
+
encode: encode$$,
|
|
25344
|
+
decode: decode$T
|
|
25273
25345
|
});
|
|
25274
|
-
const validXmlAttributes$
|
|
25346
|
+
const validXmlAttributes$m = [
|
|
25275
25347
|
attrConfig$v,
|
|
25276
25348
|
attrConfig$u,
|
|
25277
25349
|
attrConfig$y,
|
|
@@ -25280,9 +25352,9 @@ const validXmlAttributes$k = [
|
|
|
25280
25352
|
attrConfig$x,
|
|
25281
25353
|
attrConfig$A
|
|
25282
25354
|
];
|
|
25283
|
-
const XML_NODE_NAME$
|
|
25355
|
+
const XML_NODE_NAME$y = "w:p";
|
|
25284
25356
|
const SD_NODE_NAME$f = "paragraph";
|
|
25285
|
-
const encode$
|
|
25357
|
+
const encode$_ = (params, encodedAttrs = {}) => {
|
|
25286
25358
|
const node = handleParagraphNode$1(params);
|
|
25287
25359
|
if (!node) return void 0;
|
|
25288
25360
|
if (encodedAttrs && Object.keys(encodedAttrs).length) {
|
|
@@ -25290,7 +25362,7 @@ const encode$Y = (params, encodedAttrs = {}) => {
|
|
|
25290
25362
|
}
|
|
25291
25363
|
return node;
|
|
25292
25364
|
};
|
|
25293
|
-
const decode$
|
|
25365
|
+
const decode$S = (params, decodedAttrs = {}) => {
|
|
25294
25366
|
const translated = translateParagraphNode(params);
|
|
25295
25367
|
if (!translated) return void 0;
|
|
25296
25368
|
if (decodedAttrs && Object.keys(decodedAttrs).length) {
|
|
@@ -25298,16 +25370,16 @@ const decode$Q = (params, decodedAttrs = {}) => {
|
|
|
25298
25370
|
}
|
|
25299
25371
|
return translated;
|
|
25300
25372
|
};
|
|
25301
|
-
const config$
|
|
25302
|
-
xmlName: XML_NODE_NAME$
|
|
25373
|
+
const config$v = {
|
|
25374
|
+
xmlName: XML_NODE_NAME$y,
|
|
25303
25375
|
sdNodeOrKeyName: SD_NODE_NAME$f,
|
|
25304
25376
|
type: NodeTranslator.translatorTypes.NODE,
|
|
25305
|
-
encode: encode$
|
|
25306
|
-
decode: decode$
|
|
25307
|
-
attributes: validXmlAttributes$
|
|
25377
|
+
encode: encode$_,
|
|
25378
|
+
decode: decode$S,
|
|
25379
|
+
attributes: validXmlAttributes$m
|
|
25308
25380
|
};
|
|
25309
|
-
const translator$
|
|
25310
|
-
const encode$
|
|
25381
|
+
const translator$19 = NodeTranslator.from(config$v);
|
|
25382
|
+
const encode$Z = (attributes) => {
|
|
25311
25383
|
const raw = attributes?.["w:val"];
|
|
25312
25384
|
if (raw === void 0 || raw === null) return void 0;
|
|
25313
25385
|
if (typeof raw === "boolean") return raw;
|
|
@@ -25317,24 +25389,24 @@ const encode$X = (attributes) => {
|
|
|
25317
25389
|
if (val === "1" || val === "true" || val === "on") return true;
|
|
25318
25390
|
return void 0;
|
|
25319
25391
|
};
|
|
25320
|
-
const decode$
|
|
25392
|
+
const decode$R = (runProps) => {
|
|
25321
25393
|
if (runProps?.bold === false) return "0";
|
|
25322
25394
|
return void 0;
|
|
25323
25395
|
};
|
|
25324
25396
|
const attrConfig$t = Object.freeze({
|
|
25325
25397
|
xmlName: "w:val",
|
|
25326
25398
|
sdName: "bold",
|
|
25327
|
-
encode: encode$
|
|
25328
|
-
decode: decode$
|
|
25399
|
+
encode: encode$Z,
|
|
25400
|
+
decode: decode$R
|
|
25329
25401
|
});
|
|
25330
|
-
const validXmlAttributes$
|
|
25331
|
-
const XML_NODE_NAME$
|
|
25332
|
-
const SD_ATTR_KEY$
|
|
25333
|
-
const encode$
|
|
25402
|
+
const validXmlAttributes$l = [attrConfig$t];
|
|
25403
|
+
const XML_NODE_NAME$x = "w:b";
|
|
25404
|
+
const SD_ATTR_KEY$h = "bold";
|
|
25405
|
+
const encode$Y = (params, encodedAttrs = {}) => {
|
|
25334
25406
|
const { nodes } = params;
|
|
25335
25407
|
const node = nodes[0];
|
|
25336
25408
|
if (!node) return void 0;
|
|
25337
|
-
const val = encodedAttrs?.[SD_ATTR_KEY$
|
|
25409
|
+
const val = encodedAttrs?.[SD_ATTR_KEY$h];
|
|
25338
25410
|
let attributes;
|
|
25339
25411
|
if (val === false) attributes = { "w:val": "0" };
|
|
25340
25412
|
else if (val === true)
|
|
@@ -25342,85 +25414,85 @@ const encode$W = (params, encodedAttrs = {}) => {
|
|
|
25342
25414
|
else attributes = node.attributes || {};
|
|
25343
25415
|
return {
|
|
25344
25416
|
type: "attr",
|
|
25345
|
-
xmlName: XML_NODE_NAME$
|
|
25346
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25417
|
+
xmlName: XML_NODE_NAME$x,
|
|
25418
|
+
sdNodeOrKeyName: SD_ATTR_KEY$h,
|
|
25347
25419
|
attributes
|
|
25348
25420
|
};
|
|
25349
25421
|
};
|
|
25350
|
-
const config$
|
|
25351
|
-
xmlName: XML_NODE_NAME$
|
|
25352
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25422
|
+
const config$u = {
|
|
25423
|
+
xmlName: XML_NODE_NAME$x,
|
|
25424
|
+
sdNodeOrKeyName: SD_ATTR_KEY$h,
|
|
25353
25425
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25354
|
-
encode: encode$
|
|
25355
|
-
attributes: validXmlAttributes$
|
|
25426
|
+
encode: encode$Y,
|
|
25427
|
+
attributes: validXmlAttributes$l
|
|
25356
25428
|
};
|
|
25357
|
-
const translator$
|
|
25358
|
-
const XML_NODE_NAME$
|
|
25359
|
-
const SD_ATTR_KEY$
|
|
25360
|
-
const encode$
|
|
25429
|
+
const translator$18 = NodeTranslator.from(config$u);
|
|
25430
|
+
const XML_NODE_NAME$w = "w:i";
|
|
25431
|
+
const SD_ATTR_KEY$g = "italic";
|
|
25432
|
+
const encode$X = (params) => {
|
|
25361
25433
|
const { nodes } = params;
|
|
25362
25434
|
const node = nodes?.[0];
|
|
25363
25435
|
if (!node) return void 0;
|
|
25364
25436
|
return {
|
|
25365
25437
|
type: "attr",
|
|
25366
|
-
xmlName: XML_NODE_NAME$
|
|
25367
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25438
|
+
xmlName: XML_NODE_NAME$w,
|
|
25439
|
+
sdNodeOrKeyName: SD_ATTR_KEY$g,
|
|
25368
25440
|
attributes: {
|
|
25369
25441
|
"w:val": node.attributes?.["w:val"] ?? null
|
|
25370
25442
|
}
|
|
25371
25443
|
};
|
|
25372
25444
|
};
|
|
25373
|
-
const config$
|
|
25374
|
-
xmlName: XML_NODE_NAME$
|
|
25375
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25445
|
+
const config$t = {
|
|
25446
|
+
xmlName: XML_NODE_NAME$w,
|
|
25447
|
+
sdNodeOrKeyName: SD_ATTR_KEY$g,
|
|
25376
25448
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25377
|
-
encode: encode$
|
|
25449
|
+
encode: encode$X
|
|
25378
25450
|
};
|
|
25379
|
-
const translator$
|
|
25380
|
-
const encode$
|
|
25381
|
-
const decode$
|
|
25451
|
+
const translator$17 = NodeTranslator.from(config$t);
|
|
25452
|
+
const encode$W = (attributes) => attributes?.["w:val"];
|
|
25453
|
+
const decode$Q = (attrs) => attrs?.underline;
|
|
25382
25454
|
const attrConfig$s = Object.freeze({
|
|
25383
25455
|
xmlName: "w:val",
|
|
25384
25456
|
sdName: "underline",
|
|
25385
|
-
encode: encode$
|
|
25386
|
-
decode: decode$
|
|
25457
|
+
encode: encode$W,
|
|
25458
|
+
decode: decode$Q
|
|
25387
25459
|
});
|
|
25388
|
-
const encode$
|
|
25389
|
-
const decode$
|
|
25460
|
+
const encode$V = (attributes) => attributes?.["w:color"];
|
|
25461
|
+
const decode$P = (attrs) => attrs?.color;
|
|
25390
25462
|
const attrConfig$r = Object.freeze({
|
|
25391
25463
|
xmlName: "w:color",
|
|
25392
25464
|
sdName: "color",
|
|
25393
|
-
encode: encode$
|
|
25394
|
-
decode: decode$
|
|
25465
|
+
encode: encode$V,
|
|
25466
|
+
decode: decode$P
|
|
25395
25467
|
});
|
|
25396
|
-
const encode$
|
|
25397
|
-
const decode$
|
|
25468
|
+
const encode$U = (attributes) => attributes?.["w:themeColor"];
|
|
25469
|
+
const decode$O = (attrs) => attrs?.themeColor;
|
|
25398
25470
|
const attrConfig$q = Object.freeze({
|
|
25399
25471
|
xmlName: "w:themeColor",
|
|
25400
25472
|
sdName: "themeColor",
|
|
25401
|
-
encode: encode$
|
|
25402
|
-
decode: decode$
|
|
25473
|
+
encode: encode$U,
|
|
25474
|
+
decode: decode$O
|
|
25403
25475
|
});
|
|
25404
|
-
const encode$
|
|
25405
|
-
const decode$
|
|
25476
|
+
const encode$T = (attributes) => attributes?.["w:themeTint"];
|
|
25477
|
+
const decode$N = (attrs) => attrs?.themeTint;
|
|
25406
25478
|
const attrConfig$p = Object.freeze({
|
|
25407
25479
|
xmlName: "w:themeTint",
|
|
25408
25480
|
sdName: "themeTint",
|
|
25409
|
-
encode: encode$
|
|
25410
|
-
decode: decode$
|
|
25481
|
+
encode: encode$T,
|
|
25482
|
+
decode: decode$N
|
|
25411
25483
|
});
|
|
25412
|
-
const encode$
|
|
25413
|
-
const decode$
|
|
25484
|
+
const encode$S = (attributes) => attributes?.["w:themeShade"];
|
|
25485
|
+
const decode$M = (attrs) => attrs?.themeShade;
|
|
25414
25486
|
const attrConfig$o = Object.freeze({
|
|
25415
25487
|
xmlName: "w:themeShade",
|
|
25416
25488
|
sdName: "themeShade",
|
|
25417
|
-
encode: encode$
|
|
25418
|
-
decode: decode$
|
|
25489
|
+
encode: encode$S,
|
|
25490
|
+
decode: decode$M
|
|
25419
25491
|
});
|
|
25420
|
-
const validXmlAttributes$
|
|
25421
|
-
const XML_NODE_NAME$
|
|
25422
|
-
const SD_ATTR_KEY$
|
|
25423
|
-
const encode$
|
|
25492
|
+
const validXmlAttributes$k = [attrConfig$s, attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o];
|
|
25493
|
+
const XML_NODE_NAME$v = "w:u";
|
|
25494
|
+
const SD_ATTR_KEY$f = "underline";
|
|
25495
|
+
const encode$R = (params, encodedAttrs = {}) => {
|
|
25424
25496
|
const { nodes } = params;
|
|
25425
25497
|
const node = nodes?.[0];
|
|
25426
25498
|
const sourceAttrs = node?.attributes || {};
|
|
@@ -25436,12 +25508,12 @@ const encode$P = (params, encodedAttrs = {}) => {
|
|
|
25436
25508
|
if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
|
|
25437
25509
|
return {
|
|
25438
25510
|
type: "attr",
|
|
25439
|
-
xmlName: XML_NODE_NAME$
|
|
25440
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25511
|
+
xmlName: XML_NODE_NAME$v,
|
|
25512
|
+
sdNodeOrKeyName: SD_ATTR_KEY$f,
|
|
25441
25513
|
attributes
|
|
25442
25514
|
};
|
|
25443
25515
|
};
|
|
25444
|
-
const decode$
|
|
25516
|
+
const decode$L = (params) => {
|
|
25445
25517
|
const attrs = params?.node?.attrs || {};
|
|
25446
25518
|
const underlineType = attrs.underlineType ?? attrs.underline ?? null;
|
|
25447
25519
|
const color = attrs.underlineColor ?? attrs.color ?? null;
|
|
@@ -25459,20 +25531,20 @@ const decode$J = (params) => {
|
|
|
25459
25531
|
if (themeTint) attributes["w:themeTint"] = themeTint;
|
|
25460
25532
|
if (themeShade) attributes["w:themeShade"] = themeShade;
|
|
25461
25533
|
return {
|
|
25462
|
-
name: XML_NODE_NAME$
|
|
25534
|
+
name: XML_NODE_NAME$v,
|
|
25463
25535
|
attributes
|
|
25464
25536
|
};
|
|
25465
25537
|
};
|
|
25466
|
-
const config$
|
|
25467
|
-
xmlName: XML_NODE_NAME$
|
|
25468
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25538
|
+
const config$s = {
|
|
25539
|
+
xmlName: XML_NODE_NAME$v,
|
|
25540
|
+
sdNodeOrKeyName: SD_ATTR_KEY$f,
|
|
25469
25541
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25470
|
-
encode: encode$
|
|
25471
|
-
decode: decode$
|
|
25472
|
-
attributes: validXmlAttributes$
|
|
25542
|
+
encode: encode$R,
|
|
25543
|
+
decode: decode$L,
|
|
25544
|
+
attributes: validXmlAttributes$k
|
|
25473
25545
|
};
|
|
25474
|
-
const translator$
|
|
25475
|
-
const encode$
|
|
25546
|
+
const translator$16 = NodeTranslator.from(config$s);
|
|
25547
|
+
const encode$Q = (attributes) => {
|
|
25476
25548
|
const raw = attributes?.["w:val"];
|
|
25477
25549
|
if (raw === void 0 || raw === null) return void 0;
|
|
25478
25550
|
if (typeof raw === "boolean") return raw;
|
|
@@ -25482,24 +25554,24 @@ const encode$O = (attributes) => {
|
|
|
25482
25554
|
if (val === "1" || val === "true" || val === "on") return true;
|
|
25483
25555
|
return void 0;
|
|
25484
25556
|
};
|
|
25485
|
-
const decode$
|
|
25557
|
+
const decode$K = (attrs) => {
|
|
25486
25558
|
if (attrs?.strike === false) return "0";
|
|
25487
25559
|
return void 0;
|
|
25488
25560
|
};
|
|
25489
25561
|
const attrConfig$n = Object.freeze({
|
|
25490
25562
|
xmlName: "w:val",
|
|
25491
25563
|
sdName: "strike",
|
|
25492
|
-
encode: encode$
|
|
25493
|
-
decode: decode$
|
|
25564
|
+
encode: encode$Q,
|
|
25565
|
+
decode: decode$K
|
|
25494
25566
|
});
|
|
25495
|
-
const validXmlAttributes$
|
|
25496
|
-
const XML_NODE_NAME$
|
|
25497
|
-
const SD_ATTR_KEY$
|
|
25498
|
-
const encode$
|
|
25567
|
+
const validXmlAttributes$j = [attrConfig$n];
|
|
25568
|
+
const XML_NODE_NAME$u = "w:strike";
|
|
25569
|
+
const SD_ATTR_KEY$e = "strike";
|
|
25570
|
+
const encode$P = (params, encodedAttrs = {}) => {
|
|
25499
25571
|
const { nodes } = params;
|
|
25500
25572
|
const node = nodes?.[0];
|
|
25501
25573
|
if (!node) return void 0;
|
|
25502
|
-
const val = encodedAttrs?.[SD_ATTR_KEY$
|
|
25574
|
+
const val = encodedAttrs?.[SD_ATTR_KEY$e];
|
|
25503
25575
|
let attributes;
|
|
25504
25576
|
if (val === false) attributes = { "w:val": "0" };
|
|
25505
25577
|
else if (val === true) attributes = {};
|
|
@@ -25508,55 +25580,55 @@ const encode$N = (params, encodedAttrs = {}) => {
|
|
|
25508
25580
|
else if (val === true && attributes["w:val"] === void 0) delete attributes["w:val"];
|
|
25509
25581
|
return {
|
|
25510
25582
|
type: "attr",
|
|
25511
|
-
xmlName: XML_NODE_NAME$
|
|
25512
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25583
|
+
xmlName: XML_NODE_NAME$u,
|
|
25584
|
+
sdNodeOrKeyName: SD_ATTR_KEY$e,
|
|
25513
25585
|
attributes
|
|
25514
25586
|
};
|
|
25515
25587
|
};
|
|
25516
|
-
const config$
|
|
25517
|
-
xmlName: XML_NODE_NAME$
|
|
25518
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25588
|
+
const config$r = {
|
|
25589
|
+
xmlName: XML_NODE_NAME$u,
|
|
25590
|
+
sdNodeOrKeyName: SD_ATTR_KEY$e,
|
|
25519
25591
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25520
|
-
encode: encode$
|
|
25521
|
-
attributes: validXmlAttributes$
|
|
25592
|
+
encode: encode$P,
|
|
25593
|
+
attributes: validXmlAttributes$j
|
|
25522
25594
|
};
|
|
25523
|
-
const translator$
|
|
25524
|
-
const encode$
|
|
25525
|
-
const decode$
|
|
25595
|
+
const translator$15 = NodeTranslator.from(config$r);
|
|
25596
|
+
const encode$O = (attributes) => attributes?.["w:val"];
|
|
25597
|
+
const decode$J = (attrs) => attrs?.color;
|
|
25526
25598
|
const attrConfig$m = Object.freeze({
|
|
25527
25599
|
xmlName: "w:val",
|
|
25528
25600
|
sdName: "color",
|
|
25529
|
-
encode: encode$
|
|
25530
|
-
decode: decode$
|
|
25601
|
+
encode: encode$O,
|
|
25602
|
+
decode: decode$J
|
|
25531
25603
|
});
|
|
25532
|
-
const encode$
|
|
25533
|
-
const decode$
|
|
25604
|
+
const encode$N = (attributes) => attributes?.["w:themeColor"];
|
|
25605
|
+
const decode$I = (attrs) => attrs?.themeColor;
|
|
25534
25606
|
const attrConfig$l = Object.freeze({
|
|
25535
25607
|
xmlName: "w:themeColor",
|
|
25536
25608
|
sdName: "themeColor",
|
|
25537
|
-
encode: encode$
|
|
25538
|
-
decode: decode$
|
|
25609
|
+
encode: encode$N,
|
|
25610
|
+
decode: decode$I
|
|
25539
25611
|
});
|
|
25540
|
-
const encode$
|
|
25541
|
-
const decode$
|
|
25612
|
+
const encode$M = (attributes) => attributes?.["w:themeTint"];
|
|
25613
|
+
const decode$H = (attrs) => attrs?.themeTint;
|
|
25542
25614
|
const attrConfig$k = Object.freeze({
|
|
25543
25615
|
xmlName: "w:themeTint",
|
|
25544
25616
|
sdName: "themeTint",
|
|
25545
|
-
encode: encode$
|
|
25546
|
-
decode: decode$
|
|
25617
|
+
encode: encode$M,
|
|
25618
|
+
decode: decode$H
|
|
25547
25619
|
});
|
|
25548
|
-
const encode$
|
|
25549
|
-
const decode$
|
|
25620
|
+
const encode$L = (attributes) => attributes?.["w:themeShade"];
|
|
25621
|
+
const decode$G = (attrs) => attrs?.themeShade;
|
|
25550
25622
|
const attrConfig$j = Object.freeze({
|
|
25551
25623
|
xmlName: "w:themeShade",
|
|
25552
25624
|
sdName: "themeShade",
|
|
25553
|
-
encode: encode$
|
|
25554
|
-
decode: decode$
|
|
25625
|
+
encode: encode$L,
|
|
25626
|
+
decode: decode$G
|
|
25555
25627
|
});
|
|
25556
|
-
const validXmlAttributes$
|
|
25557
|
-
const XML_NODE_NAME$
|
|
25558
|
-
const SD_ATTR_KEY$
|
|
25559
|
-
const encode$
|
|
25628
|
+
const validXmlAttributes$i = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j];
|
|
25629
|
+
const XML_NODE_NAME$t = "w:color";
|
|
25630
|
+
const SD_ATTR_KEY$d = "color";
|
|
25631
|
+
const encode$K = (params, encodedAttrs = {}) => {
|
|
25560
25632
|
const { nodes } = params;
|
|
25561
25633
|
const node = nodes?.[0];
|
|
25562
25634
|
const sourceAttrs = node?.attributes || {};
|
|
@@ -25571,63 +25643,63 @@ const encode$I = (params, encodedAttrs = {}) => {
|
|
|
25571
25643
|
if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
|
|
25572
25644
|
return {
|
|
25573
25645
|
type: "attr",
|
|
25574
|
-
xmlName: XML_NODE_NAME$
|
|
25575
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25646
|
+
xmlName: XML_NODE_NAME$t,
|
|
25647
|
+
sdNodeOrKeyName: SD_ATTR_KEY$d,
|
|
25576
25648
|
attributes
|
|
25577
25649
|
};
|
|
25578
25650
|
};
|
|
25579
|
-
const config$
|
|
25580
|
-
xmlName: XML_NODE_NAME$
|
|
25581
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25651
|
+
const config$q = {
|
|
25652
|
+
xmlName: XML_NODE_NAME$t,
|
|
25653
|
+
sdNodeOrKeyName: SD_ATTR_KEY$d,
|
|
25582
25654
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25583
|
-
encode: encode$
|
|
25584
|
-
attributes: validXmlAttributes$
|
|
25655
|
+
encode: encode$K,
|
|
25656
|
+
attributes: validXmlAttributes$i
|
|
25585
25657
|
};
|
|
25586
|
-
const translator$
|
|
25587
|
-
const encode$
|
|
25588
|
-
const decode$
|
|
25658
|
+
const translator$14 = NodeTranslator.from(config$q);
|
|
25659
|
+
const encode$J = (attributes) => attributes?.["w:eastAsia"];
|
|
25660
|
+
const decode$F = (attrs) => attrs?.eastAsia;
|
|
25589
25661
|
const attrConfig$i = Object.freeze({
|
|
25590
25662
|
xmlName: "w:eastAsia",
|
|
25591
25663
|
sdName: "eastAsia",
|
|
25592
|
-
encode: encode$
|
|
25593
|
-
decode: decode$
|
|
25664
|
+
encode: encode$J,
|
|
25665
|
+
decode: decode$F
|
|
25594
25666
|
});
|
|
25595
|
-
const encode$
|
|
25596
|
-
const decode$
|
|
25667
|
+
const encode$I = (attributes) => attributes?.["w:ascii"];
|
|
25668
|
+
const decode$E = (attrs) => attrs?.ascii;
|
|
25597
25669
|
const attrConfig$h = Object.freeze({
|
|
25598
25670
|
xmlName: "w:ascii",
|
|
25599
25671
|
sdName: "ascii",
|
|
25600
|
-
encode: encode$
|
|
25601
|
-
decode: decode$
|
|
25672
|
+
encode: encode$I,
|
|
25673
|
+
decode: decode$E
|
|
25602
25674
|
});
|
|
25603
|
-
const encode$
|
|
25604
|
-
const decode$
|
|
25675
|
+
const encode$H = (attributes) => attributes?.["w:hAnsi"];
|
|
25676
|
+
const decode$D = (attrs) => attrs?.hAnsi;
|
|
25605
25677
|
const attrConfig$g = Object.freeze({
|
|
25606
25678
|
xmlName: "w:hAnsi",
|
|
25607
25679
|
sdName: "hAnsi",
|
|
25608
|
-
encode: encode$
|
|
25609
|
-
decode: decode$
|
|
25680
|
+
encode: encode$H,
|
|
25681
|
+
decode: decode$D
|
|
25610
25682
|
});
|
|
25611
|
-
const encode$
|
|
25612
|
-
const decode$
|
|
25683
|
+
const encode$G = (attributes) => attributes?.["w:cs"];
|
|
25684
|
+
const decode$C = (attrs) => attrs?.cs;
|
|
25613
25685
|
const attrConfig$f = Object.freeze({
|
|
25614
25686
|
xmlName: "w:cs",
|
|
25615
25687
|
sdName: "cs",
|
|
25616
|
-
encode: encode$
|
|
25617
|
-
decode: decode$
|
|
25688
|
+
encode: encode$G,
|
|
25689
|
+
decode: decode$C
|
|
25618
25690
|
});
|
|
25619
|
-
const encode$
|
|
25620
|
-
const decode$
|
|
25691
|
+
const encode$F = (attributes) => attributes?.["w:val"];
|
|
25692
|
+
const decode$B = (attrs) => attrs?.value;
|
|
25621
25693
|
const attrConfig$e = Object.freeze({
|
|
25622
25694
|
xmlName: "w:val",
|
|
25623
25695
|
sdName: "value",
|
|
25624
|
-
encode: encode$
|
|
25625
|
-
decode: decode$
|
|
25696
|
+
encode: encode$F,
|
|
25697
|
+
decode: decode$B
|
|
25626
25698
|
});
|
|
25627
|
-
const validXmlAttributes$
|
|
25628
|
-
const XML_NODE_NAME$
|
|
25629
|
-
const SD_ATTR_KEY$
|
|
25630
|
-
const encode$
|
|
25699
|
+
const validXmlAttributes$h = [attrConfig$i, attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e];
|
|
25700
|
+
const XML_NODE_NAME$s = "w:rFonts";
|
|
25701
|
+
const SD_ATTR_KEY$c = "fontFamily";
|
|
25702
|
+
const encode$E = (params, encodedAttrs = {}) => {
|
|
25631
25703
|
const { nodes } = params;
|
|
25632
25704
|
const node = nodes?.[0];
|
|
25633
25705
|
const sourceAttrs = node?.attributes || {};
|
|
@@ -25653,109 +25725,109 @@ const encode$C = (params, encodedAttrs = {}) => {
|
|
|
25653
25725
|
if (attributes["w:val"] === void 0) delete attributes["w:val"];
|
|
25654
25726
|
return {
|
|
25655
25727
|
type: "attr",
|
|
25656
|
-
xmlName: XML_NODE_NAME$
|
|
25657
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25728
|
+
xmlName: XML_NODE_NAME$s,
|
|
25729
|
+
sdNodeOrKeyName: SD_ATTR_KEY$c,
|
|
25658
25730
|
attributes
|
|
25659
25731
|
};
|
|
25660
25732
|
};
|
|
25661
|
-
const config$
|
|
25662
|
-
xmlName: XML_NODE_NAME$
|
|
25663
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25733
|
+
const config$p = {
|
|
25734
|
+
xmlName: XML_NODE_NAME$s,
|
|
25735
|
+
sdNodeOrKeyName: SD_ATTR_KEY$c,
|
|
25664
25736
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25665
|
-
encode: encode$
|
|
25666
|
-
attributes: validXmlAttributes$
|
|
25737
|
+
encode: encode$E,
|
|
25738
|
+
attributes: validXmlAttributes$h
|
|
25667
25739
|
};
|
|
25668
|
-
const translator$
|
|
25669
|
-
const encode$
|
|
25670
|
-
const decode$
|
|
25740
|
+
const translator$13 = NodeTranslator.from(config$p);
|
|
25741
|
+
const encode$D = (attributes) => attributes?.["w:val"];
|
|
25742
|
+
const decode$A = (attrs) => attrs?.styleId;
|
|
25671
25743
|
const attrConfig$d = Object.freeze({
|
|
25672
25744
|
xmlName: "w:val",
|
|
25673
25745
|
sdName: "styleId",
|
|
25674
|
-
encode: encode$
|
|
25675
|
-
decode: decode$
|
|
25746
|
+
encode: encode$D,
|
|
25747
|
+
decode: decode$A
|
|
25676
25748
|
});
|
|
25677
|
-
const validXmlAttributes$
|
|
25678
|
-
const XML_NODE_NAME$
|
|
25679
|
-
const SD_ATTR_KEY$
|
|
25680
|
-
const encode$
|
|
25749
|
+
const validXmlAttributes$g = [attrConfig$d];
|
|
25750
|
+
const XML_NODE_NAME$r = "w:rStyle";
|
|
25751
|
+
const SD_ATTR_KEY$b = "styleId";
|
|
25752
|
+
const encode$C = (params, encodedAttrs = {}) => {
|
|
25681
25753
|
const { nodes } = params;
|
|
25682
25754
|
const node = nodes?.[0];
|
|
25683
25755
|
const value = encodedAttrs.styleId ?? node?.attributes?.["w:val"];
|
|
25684
25756
|
return {
|
|
25685
25757
|
type: "attr",
|
|
25686
|
-
xmlName: XML_NODE_NAME$
|
|
25687
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25758
|
+
xmlName: XML_NODE_NAME$r,
|
|
25759
|
+
sdNodeOrKeyName: SD_ATTR_KEY$b,
|
|
25688
25760
|
attributes: { "w:val": value ?? null }
|
|
25689
25761
|
};
|
|
25690
25762
|
};
|
|
25691
|
-
const config$
|
|
25692
|
-
xmlName: XML_NODE_NAME$
|
|
25693
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25763
|
+
const config$o = {
|
|
25764
|
+
xmlName: XML_NODE_NAME$r,
|
|
25765
|
+
sdNodeOrKeyName: SD_ATTR_KEY$b,
|
|
25694
25766
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25695
|
-
encode: encode$
|
|
25696
|
-
attributes: validXmlAttributes$
|
|
25767
|
+
encode: encode$C,
|
|
25768
|
+
attributes: validXmlAttributes$g
|
|
25697
25769
|
};
|
|
25698
|
-
const translator$
|
|
25699
|
-
const encode$
|
|
25700
|
-
const decode$
|
|
25770
|
+
const translator$12 = NodeTranslator.from(config$o);
|
|
25771
|
+
const encode$B = (attributes) => attributes?.["w:val"];
|
|
25772
|
+
const decode$z = (attrs) => attrs?.fontSize;
|
|
25701
25773
|
const attrConfig$c = Object.freeze({
|
|
25702
25774
|
xmlName: "w:val",
|
|
25703
25775
|
sdName: "fontSize",
|
|
25704
|
-
encode: encode$
|
|
25705
|
-
decode: decode$
|
|
25776
|
+
encode: encode$B,
|
|
25777
|
+
decode: decode$z
|
|
25706
25778
|
});
|
|
25707
|
-
const validXmlAttributes$
|
|
25708
|
-
const XML_NODE_NAME$
|
|
25709
|
-
const SD_ATTR_KEY$
|
|
25710
|
-
const encode$
|
|
25779
|
+
const validXmlAttributes$f = [attrConfig$c];
|
|
25780
|
+
const XML_NODE_NAME$q = "w:sz";
|
|
25781
|
+
const SD_ATTR_KEY$a = "fontSize";
|
|
25782
|
+
const encode$A = (params, encodedAttrs = {}) => {
|
|
25711
25783
|
const { nodes } = params;
|
|
25712
25784
|
const node = nodes?.[0];
|
|
25713
25785
|
const value = encodedAttrs.fontSize ?? node?.attributes?.["w:val"];
|
|
25714
25786
|
return {
|
|
25715
25787
|
type: "attr",
|
|
25716
|
-
xmlName: XML_NODE_NAME$
|
|
25717
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25788
|
+
xmlName: XML_NODE_NAME$q,
|
|
25789
|
+
sdNodeOrKeyName: SD_ATTR_KEY$a,
|
|
25718
25790
|
attributes: { "w:val": value ?? null }
|
|
25719
25791
|
};
|
|
25720
25792
|
};
|
|
25721
|
-
const config$
|
|
25722
|
-
xmlName: XML_NODE_NAME$
|
|
25723
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25793
|
+
const config$n = {
|
|
25794
|
+
xmlName: XML_NODE_NAME$q,
|
|
25795
|
+
sdNodeOrKeyName: SD_ATTR_KEY$a,
|
|
25724
25796
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25725
|
-
encode: encode$
|
|
25726
|
-
attributes: validXmlAttributes$
|
|
25797
|
+
encode: encode$A,
|
|
25798
|
+
attributes: validXmlAttributes$f
|
|
25727
25799
|
};
|
|
25728
|
-
const translator
|
|
25729
|
-
const encode$
|
|
25730
|
-
const decode$
|
|
25800
|
+
const translator$11 = NodeTranslator.from(config$n);
|
|
25801
|
+
const encode$z = (attributes) => attributes?.["w:val"];
|
|
25802
|
+
const decode$y = (attrs) => attrs?.fontSizeCs;
|
|
25731
25803
|
const attrConfig$b = Object.freeze({
|
|
25732
25804
|
xmlName: "w:val",
|
|
25733
25805
|
sdName: "fontSizeCs",
|
|
25734
|
-
encode: encode$
|
|
25735
|
-
decode: decode$
|
|
25806
|
+
encode: encode$z,
|
|
25807
|
+
decode: decode$y
|
|
25736
25808
|
});
|
|
25737
|
-
const validXmlAttributes$
|
|
25738
|
-
const XML_NODE_NAME$
|
|
25739
|
-
const SD_ATTR_KEY$
|
|
25740
|
-
const encode$
|
|
25809
|
+
const validXmlAttributes$e = [attrConfig$b];
|
|
25810
|
+
const XML_NODE_NAME$p = "w:szCs";
|
|
25811
|
+
const SD_ATTR_KEY$9 = "fontSizeCs";
|
|
25812
|
+
const encode$y = (params, encodedAttrs = {}) => {
|
|
25741
25813
|
const { nodes } = params;
|
|
25742
25814
|
const node = nodes?.[0];
|
|
25743
25815
|
const value = encodedAttrs.fontSizeCs ?? node?.attributes?.["w:val"];
|
|
25744
25816
|
return {
|
|
25745
25817
|
type: "attr",
|
|
25746
|
-
xmlName: XML_NODE_NAME$
|
|
25747
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25818
|
+
xmlName: XML_NODE_NAME$p,
|
|
25819
|
+
sdNodeOrKeyName: SD_ATTR_KEY$9,
|
|
25748
25820
|
attributes: { "w:val": value ?? null }
|
|
25749
25821
|
};
|
|
25750
25822
|
};
|
|
25751
|
-
const config$
|
|
25752
|
-
xmlName: XML_NODE_NAME$
|
|
25753
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25823
|
+
const config$m = {
|
|
25824
|
+
xmlName: XML_NODE_NAME$p,
|
|
25825
|
+
sdNodeOrKeyName: SD_ATTR_KEY$9,
|
|
25754
25826
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25755
|
-
encode: encode$
|
|
25756
|
-
attributes: validXmlAttributes$
|
|
25827
|
+
encode: encode$y,
|
|
25828
|
+
attributes: validXmlAttributes$e
|
|
25757
25829
|
};
|
|
25758
|
-
const translator$
|
|
25830
|
+
const translator$10 = NodeTranslator.from(config$m);
|
|
25759
25831
|
const generateV2HandlerEntity = (handlerName, translator2) => ({
|
|
25760
25832
|
handlerName,
|
|
25761
25833
|
handler: (params) => {
|
|
@@ -25889,9 +25961,9 @@ const integerToString = (value) => {
|
|
|
25889
25961
|
const intValue = parseInteger(value);
|
|
25890
25962
|
return intValue != void 0 ? String(intValue) : void 0;
|
|
25891
25963
|
};
|
|
25892
|
-
const XML_NODE_NAME$
|
|
25893
|
-
const SD_ATTR_KEY$
|
|
25894
|
-
const encode$
|
|
25964
|
+
const XML_NODE_NAME$o = "w:caps";
|
|
25965
|
+
const SD_ATTR_KEY$8 = "textTransform";
|
|
25966
|
+
const encode$x = (params, encodedAttrs = {}) => {
|
|
25895
25967
|
const { nodes } = params;
|
|
25896
25968
|
const node = nodes[0];
|
|
25897
25969
|
if (!node) return void 0;
|
|
@@ -25903,31 +25975,31 @@ const encode$v = (params, encodedAttrs = {}) => {
|
|
|
25903
25975
|
}
|
|
25904
25976
|
return {
|
|
25905
25977
|
type: "attr",
|
|
25906
|
-
xmlName: XML_NODE_NAME$
|
|
25907
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25908
|
-
attributes: { [SD_ATTR_KEY$
|
|
25978
|
+
xmlName: XML_NODE_NAME$o,
|
|
25979
|
+
sdNodeOrKeyName: SD_ATTR_KEY$8,
|
|
25980
|
+
attributes: { [SD_ATTR_KEY$8]: result }
|
|
25909
25981
|
};
|
|
25910
25982
|
};
|
|
25911
|
-
const config$
|
|
25912
|
-
xmlName: XML_NODE_NAME$
|
|
25913
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25983
|
+
const config$l = {
|
|
25984
|
+
xmlName: XML_NODE_NAME$o,
|
|
25985
|
+
sdNodeOrKeyName: SD_ATTR_KEY$8,
|
|
25914
25986
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25915
|
-
encode: encode$
|
|
25987
|
+
encode: encode$x,
|
|
25916
25988
|
attributes: [createAttributeHandler("w:val")]
|
|
25917
25989
|
};
|
|
25918
|
-
const translator
|
|
25990
|
+
const translator$$ = NodeTranslator.from(config$l);
|
|
25919
25991
|
const runPropertyTranslators = Object.freeze({
|
|
25920
|
-
"w:b": translator$
|
|
25921
|
-
"w:i": translator$
|
|
25922
|
-
"w:u": translator$
|
|
25923
|
-
"w:strike": translator$
|
|
25924
|
-
"w:color": translator$
|
|
25925
|
-
"w:highlight": translator$
|
|
25926
|
-
"w:rFonts": translator$
|
|
25927
|
-
"w:rStyle": translator$
|
|
25928
|
-
"w:sz": translator
|
|
25929
|
-
"w:szCs": translator$
|
|
25930
|
-
"w:caps": translator
|
|
25992
|
+
"w:b": translator$18,
|
|
25993
|
+
"w:i": translator$17,
|
|
25994
|
+
"w:u": translator$16,
|
|
25995
|
+
"w:strike": translator$15,
|
|
25996
|
+
"w:color": translator$14,
|
|
25997
|
+
"w:highlight": translator$1b,
|
|
25998
|
+
"w:rFonts": translator$13,
|
|
25999
|
+
"w:rStyle": translator$12,
|
|
26000
|
+
"w:sz": translator$11,
|
|
26001
|
+
"w:szCs": translator$10,
|
|
26002
|
+
"w:caps": translator$$
|
|
25931
26003
|
});
|
|
25932
26004
|
const rawRunPropertyXmlNames = Object.freeze(["w:lang", "w:shd"]);
|
|
25933
26005
|
const RAW_CHILD_NAME_SET = new Set(rawRunPropertyXmlNames);
|
|
@@ -25941,9 +26013,9 @@ const toRunPropertyEntry = (candidate) => {
|
|
|
25941
26013
|
attributes: { ...candidate.attributes || {} }
|
|
25942
26014
|
};
|
|
25943
26015
|
};
|
|
25944
|
-
const XML_NODE_NAME$
|
|
25945
|
-
const SD_ATTR_KEY$
|
|
25946
|
-
const encode$
|
|
26016
|
+
const XML_NODE_NAME$n = "w:rPr";
|
|
26017
|
+
const SD_ATTR_KEY$7 = "runProperties";
|
|
26018
|
+
const encode$w = (params) => {
|
|
25947
26019
|
const { nodes } = params;
|
|
25948
26020
|
const node = nodes?.[0] || {};
|
|
25949
26021
|
const contents = Array.isArray(node.elements) ? node.elements : [];
|
|
@@ -25977,16 +26049,16 @@ const encode$u = (params) => {
|
|
|
25977
26049
|
attributes: runPropsArray
|
|
25978
26050
|
};
|
|
25979
26051
|
};
|
|
25980
|
-
const config$
|
|
25981
|
-
xmlName: XML_NODE_NAME$
|
|
25982
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
26052
|
+
const config$k = {
|
|
26053
|
+
xmlName: XML_NODE_NAME$n,
|
|
26054
|
+
sdNodeOrKeyName: SD_ATTR_KEY$7,
|
|
25983
26055
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25984
|
-
encode: encode$
|
|
26056
|
+
encode: encode$w
|
|
25985
26057
|
};
|
|
25986
|
-
const translator$
|
|
26058
|
+
const translator$_ = NodeTranslator.from(config$k);
|
|
25987
26059
|
const EAST_ASIAN_CHARACTER_REGEX = /[\u1100-\u11FF\u2E80-\u2EFF\u2F00-\u2FDF\u3040-\u30FF\u3100-\u312F\u3130-\u318F\u31A0-\u31BF\u3400-\u4DBF\u4E00-\u9FFF\uA960-\uA97F\uAC00-\uD7AF\uF900-\uFAFF\uFF00-\uFFEF]/u;
|
|
25988
26060
|
const containsEastAsianCharacters = (text) => EAST_ASIAN_CHARACTER_REGEX.test(text);
|
|
25989
|
-
const collectRunProperties = (params, rPrNode, translator2 = translator$
|
|
26061
|
+
const collectRunProperties = (params, rPrNode, translator2 = translator$_) => {
|
|
25990
26062
|
if (!rPrNode) return { entries: [], hadRPr: false, styleChangeMarks: [] };
|
|
25991
26063
|
const result = translator2.encode({ ...params, nodes: [rPrNode] }) || {};
|
|
25992
26064
|
let entries = [];
|
|
@@ -26459,7 +26531,7 @@ const ensureTrackedWrapper = (runs, trackingMarksByType = /* @__PURE__ */ new Ma
|
|
|
26459
26531
|
}
|
|
26460
26532
|
return runs;
|
|
26461
26533
|
};
|
|
26462
|
-
const XML_NODE_NAME$
|
|
26534
|
+
const XML_NODE_NAME$m = "w:hyperlink";
|
|
26463
26535
|
const SD_NODE_NAME$e = "link";
|
|
26464
26536
|
const _createAttributeHandler = (xmlName, sdName) => ({
|
|
26465
26537
|
xmlName,
|
|
@@ -26467,7 +26539,7 @@ const _createAttributeHandler = (xmlName, sdName) => ({
|
|
|
26467
26539
|
encode: (attributes) => attributes[xmlName],
|
|
26468
26540
|
decode: (attributes) => attributes[sdName]
|
|
26469
26541
|
});
|
|
26470
|
-
const validXmlAttributes$
|
|
26542
|
+
const validXmlAttributes$d = [
|
|
26471
26543
|
_createAttributeHandler("w:anchor", "anchor"),
|
|
26472
26544
|
_createAttributeHandler("w:docLocation", "docLocation"),
|
|
26473
26545
|
{
|
|
@@ -26480,7 +26552,7 @@ const validXmlAttributes$b = [
|
|
|
26480
26552
|
_createAttributeHandler("r:id", "rId"),
|
|
26481
26553
|
_createAttributeHandler("w:tgtFrame", "target")
|
|
26482
26554
|
];
|
|
26483
|
-
const encode$
|
|
26555
|
+
const encode$v = (params, encodedAttrs) => {
|
|
26484
26556
|
const { nodes, docx, nodeListHandler } = params;
|
|
26485
26557
|
const node = nodes[0];
|
|
26486
26558
|
let href = _resolveHref(docx, encodedAttrs);
|
|
@@ -26514,7 +26586,7 @@ const _resolveHref = (docx, encodedAttrs) => {
|
|
|
26514
26586
|
}
|
|
26515
26587
|
return href;
|
|
26516
26588
|
};
|
|
26517
|
-
function decode$
|
|
26589
|
+
function decode$x(params) {
|
|
26518
26590
|
const { hyperlinkGroup = [params.node] } = params.extraParams || {};
|
|
26519
26591
|
const node = hyperlinkGroup[0];
|
|
26520
26592
|
const linkMark = node.marks.find((m2) => m2.type === "link");
|
|
@@ -26563,55 +26635,55 @@ function _addNewLinkRelationship(params, link) {
|
|
|
26563
26635
|
});
|
|
26564
26636
|
return id;
|
|
26565
26637
|
}
|
|
26566
|
-
const config$
|
|
26567
|
-
xmlName: XML_NODE_NAME$
|
|
26638
|
+
const config$j = {
|
|
26639
|
+
xmlName: XML_NODE_NAME$m,
|
|
26568
26640
|
sdNodeOrKeyName: SD_NODE_NAME$e,
|
|
26569
26641
|
type: NodeTranslator.translatorTypes.NODE,
|
|
26570
|
-
encode: encode$
|
|
26571
|
-
decode: decode$
|
|
26572
|
-
attributes: validXmlAttributes$
|
|
26642
|
+
encode: encode$v,
|
|
26643
|
+
decode: decode$x,
|
|
26644
|
+
attributes: validXmlAttributes$d
|
|
26573
26645
|
};
|
|
26574
|
-
const translator$
|
|
26575
|
-
const encode$
|
|
26646
|
+
const translator$Z = NodeTranslator.from(config$j);
|
|
26647
|
+
const encode$u = (attributes) => {
|
|
26576
26648
|
return attributes["w:rsidR"];
|
|
26577
26649
|
};
|
|
26578
|
-
const decode$
|
|
26650
|
+
const decode$w = (attrs) => {
|
|
26579
26651
|
return attrs.rsidR;
|
|
26580
26652
|
};
|
|
26581
26653
|
const attrConfig$a = Object.freeze({
|
|
26582
26654
|
xmlName: "w:rsidR",
|
|
26583
26655
|
sdName: "rsidR",
|
|
26584
|
-
encode: encode$
|
|
26585
|
-
decode: decode$
|
|
26656
|
+
encode: encode$u,
|
|
26657
|
+
decode: decode$w
|
|
26586
26658
|
});
|
|
26587
|
-
const encode$
|
|
26659
|
+
const encode$t = (attributes) => {
|
|
26588
26660
|
return attributes["w:rsidRPr"];
|
|
26589
26661
|
};
|
|
26590
|
-
const decode$
|
|
26662
|
+
const decode$v = (attrs) => {
|
|
26591
26663
|
return attrs.rsidRPr;
|
|
26592
26664
|
};
|
|
26593
26665
|
const attrConfig$9 = Object.freeze({
|
|
26594
26666
|
xmlName: "w:rsidRPr",
|
|
26595
26667
|
sdName: "rsidRPr",
|
|
26596
|
-
encode: encode$
|
|
26597
|
-
decode: decode$
|
|
26668
|
+
encode: encode$t,
|
|
26669
|
+
decode: decode$v
|
|
26598
26670
|
});
|
|
26599
|
-
const encode$
|
|
26671
|
+
const encode$s = (attributes) => {
|
|
26600
26672
|
return attributes["w:rsidDel"];
|
|
26601
26673
|
};
|
|
26602
|
-
const decode$
|
|
26674
|
+
const decode$u = (attrs) => {
|
|
26603
26675
|
return attrs.rsidDel;
|
|
26604
26676
|
};
|
|
26605
26677
|
const attrConfig$8 = Object.freeze({
|
|
26606
26678
|
xmlName: "w:rsidDel",
|
|
26607
26679
|
sdName: "rsidDel",
|
|
26608
|
-
encode: encode$
|
|
26609
|
-
decode: decode$
|
|
26680
|
+
encode: encode$s,
|
|
26681
|
+
decode: decode$u
|
|
26610
26682
|
});
|
|
26611
|
-
const validXmlAttributes$
|
|
26612
|
-
const XML_NODE_NAME$
|
|
26683
|
+
const validXmlAttributes$c = [attrConfig$a, attrConfig$9, attrConfig$8];
|
|
26684
|
+
const XML_NODE_NAME$l = "w:r";
|
|
26613
26685
|
const SD_KEY_NAME = "run";
|
|
26614
|
-
const encode$
|
|
26686
|
+
const encode$r = (params, encodedAttrs = {}) => {
|
|
26615
26687
|
const { nodes = [], nodeListHandler } = params || {};
|
|
26616
26688
|
const runNode = nodes[0];
|
|
26617
26689
|
if (!runNode) return void 0;
|
|
@@ -26659,11 +26731,17 @@ const encode$p = (params, encodedAttrs = {}) => {
|
|
|
26659
26731
|
}
|
|
26660
26732
|
return runNodeResult;
|
|
26661
26733
|
};
|
|
26662
|
-
const decode$
|
|
26734
|
+
const decode$t = (params, decodedAttrs = {}) => {
|
|
26663
26735
|
const { node } = params || {};
|
|
26664
26736
|
if (!node) return void 0;
|
|
26665
26737
|
const isLinkNode = node.marks?.some((m2) => m2.type === "link");
|
|
26666
|
-
if (isLinkNode)
|
|
26738
|
+
if (isLinkNode) {
|
|
26739
|
+
const extraParams = {
|
|
26740
|
+
...params.extraParams,
|
|
26741
|
+
linkProcessed: true
|
|
26742
|
+
};
|
|
26743
|
+
return translator$Z.decode({ ...params, extraParams });
|
|
26744
|
+
}
|
|
26667
26745
|
const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node);
|
|
26668
26746
|
const runAttrs = runNodeForExport.attrs || {};
|
|
26669
26747
|
const runProperties = Array.isArray(runAttrs.runProperties) ? runAttrs.runProperties : [];
|
|
@@ -26718,7 +26796,7 @@ const decode$r = (params, decodedAttrs = {}) => {
|
|
|
26718
26796
|
runs.push(trackedClone);
|
|
26719
26797
|
return;
|
|
26720
26798
|
}
|
|
26721
|
-
const runWrapper = { name: XML_NODE_NAME$
|
|
26799
|
+
const runWrapper = { name: XML_NODE_NAME$l, elements: [] };
|
|
26722
26800
|
applyBaseRunProps(runWrapper);
|
|
26723
26801
|
if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
|
|
26724
26802
|
runWrapper.elements.push(cloneXmlNode(child));
|
|
@@ -26726,7 +26804,7 @@ const decode$r = (params, decodedAttrs = {}) => {
|
|
|
26726
26804
|
});
|
|
26727
26805
|
const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
|
|
26728
26806
|
if (!trackedRuns.length) {
|
|
26729
|
-
const emptyRun = { name: XML_NODE_NAME$
|
|
26807
|
+
const emptyRun = { name: XML_NODE_NAME$l, elements: [] };
|
|
26730
26808
|
applyBaseRunProps(emptyRun);
|
|
26731
26809
|
trackedRuns.push(emptyRun);
|
|
26732
26810
|
}
|
|
@@ -26740,15 +26818,15 @@ const decode$r = (params, decodedAttrs = {}) => {
|
|
|
26740
26818
|
}
|
|
26741
26819
|
return trackedRuns;
|
|
26742
26820
|
};
|
|
26743
|
-
const config$
|
|
26744
|
-
xmlName: XML_NODE_NAME$
|
|
26821
|
+
const config$i = {
|
|
26822
|
+
xmlName: XML_NODE_NAME$l,
|
|
26745
26823
|
sdNodeOrKeyName: SD_KEY_NAME,
|
|
26746
26824
|
type: NodeTranslator.translatorTypes.NODE,
|
|
26747
|
-
encode: encode$
|
|
26748
|
-
decode: decode$
|
|
26749
|
-
attributes: validXmlAttributes$
|
|
26825
|
+
encode: encode$r,
|
|
26826
|
+
decode: decode$t,
|
|
26827
|
+
attributes: validXmlAttributes$c
|
|
26750
26828
|
};
|
|
26751
|
-
const translator$
|
|
26829
|
+
const translator$Y = NodeTranslator.from(config$i);
|
|
26752
26830
|
function preProcessVerticalMergeCells(table, { editorSchema }) {
|
|
26753
26831
|
if (!table || !Array.isArray(table.content)) {
|
|
26754
26832
|
return table;
|
|
@@ -26789,13 +26867,13 @@ function preProcessVerticalMergeCells(table, { editorSchema }) {
|
|
|
26789
26867
|
}
|
|
26790
26868
|
return table;
|
|
26791
26869
|
}
|
|
26792
|
-
const translator$
|
|
26870
|
+
const translator$X = NodeTranslator.from({
|
|
26793
26871
|
xmlName: "w:cantSplit",
|
|
26794
26872
|
sdNodeOrKeyName: "cantSplit",
|
|
26795
26873
|
encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
26796
26874
|
decode: ({ node }) => node.attrs?.cantSplit ? { attributes: {} } : void 0
|
|
26797
26875
|
});
|
|
26798
|
-
const translator$
|
|
26876
|
+
const translator$W = NodeTranslator.from({
|
|
26799
26877
|
xmlName: "w:cnfStyle",
|
|
26800
26878
|
sdNodeOrKeyName: "cnfStyle",
|
|
26801
26879
|
attributes: [
|
|
@@ -26821,8 +26899,8 @@ const translator$U = NodeTranslator.from({
|
|
|
26821
26899
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
26822
26900
|
}
|
|
26823
26901
|
});
|
|
26824
|
-
const translator$
|
|
26825
|
-
const translator$
|
|
26902
|
+
const translator$V = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
|
|
26903
|
+
const translator$U = NodeTranslator.from(
|
|
26826
26904
|
createSingleAttrPropertyHandler(
|
|
26827
26905
|
"w:gridAfter",
|
|
26828
26906
|
null,
|
|
@@ -26831,7 +26909,7 @@ const translator$S = NodeTranslator.from(
|
|
|
26831
26909
|
(v2) => integerToString(v2)
|
|
26832
26910
|
)
|
|
26833
26911
|
);
|
|
26834
|
-
const translator$
|
|
26912
|
+
const translator$T = NodeTranslator.from(
|
|
26835
26913
|
createSingleAttrPropertyHandler(
|
|
26836
26914
|
"w:gridBefore",
|
|
26837
26915
|
null,
|
|
@@ -26840,21 +26918,21 @@ const translator$R = NodeTranslator.from(
|
|
|
26840
26918
|
(v2) => integerToString(v2)
|
|
26841
26919
|
)
|
|
26842
26920
|
);
|
|
26843
|
-
const translator$
|
|
26921
|
+
const translator$S = NodeTranslator.from({
|
|
26844
26922
|
xmlName: "w:hidden",
|
|
26845
26923
|
sdNodeOrKeyName: "hidden",
|
|
26846
26924
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
26847
26925
|
decode: ({ node }) => node.attrs.hidden ? { attributes: {} } : void 0
|
|
26848
26926
|
});
|
|
26849
|
-
const translator$
|
|
26850
|
-
const translator$
|
|
26851
|
-
const translator$
|
|
26927
|
+
const translator$R = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
|
|
26928
|
+
const translator$Q = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
|
|
26929
|
+
const translator$P = NodeTranslator.from({
|
|
26852
26930
|
xmlName: "w:tblHeader",
|
|
26853
26931
|
sdNodeOrKeyName: "repeatHeader",
|
|
26854
26932
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
26855
26933
|
decode: ({ node }) => node.attrs.repeatHeader ? { attributes: {} } : void 0
|
|
26856
26934
|
});
|
|
26857
|
-
const translator$
|
|
26935
|
+
const translator$O = NodeTranslator.from({
|
|
26858
26936
|
xmlName: "w:trHeight",
|
|
26859
26937
|
sdNodeOrKeyName: "rowHeight",
|
|
26860
26938
|
encode: ({ nodes }) => {
|
|
@@ -26881,11 +26959,11 @@ const translator$M = NodeTranslator.from({
|
|
|
26881
26959
|
return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
|
|
26882
26960
|
}
|
|
26883
26961
|
});
|
|
26884
|
-
const translator$
|
|
26885
|
-
const translator$
|
|
26886
|
-
const XML_NODE_NAME$
|
|
26887
|
-
const SD_ATTR_KEY$
|
|
26888
|
-
const encode$
|
|
26962
|
+
const translator$N = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
|
|
26963
|
+
const translator$M = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
|
|
26964
|
+
const XML_NODE_NAME$k = "w:trPr";
|
|
26965
|
+
const SD_ATTR_KEY$6 = "tableRowProperties";
|
|
26966
|
+
const encode$q = (params) => {
|
|
26889
26967
|
const { nodes } = params;
|
|
26890
26968
|
const node = nodes[0];
|
|
26891
26969
|
let attributes = {
|
|
@@ -26899,12 +26977,12 @@ const encode$o = (params) => {
|
|
|
26899
26977
|
};
|
|
26900
26978
|
return {
|
|
26901
26979
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
26902
|
-
xmlName: XML_NODE_NAME$
|
|
26903
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
26980
|
+
xmlName: XML_NODE_NAME$k,
|
|
26981
|
+
sdNodeOrKeyName: SD_ATTR_KEY$6,
|
|
26904
26982
|
attributes
|
|
26905
26983
|
};
|
|
26906
26984
|
};
|
|
26907
|
-
const decode$
|
|
26985
|
+
const decode$s = (params) => {
|
|
26908
26986
|
const { tableRowProperties = {} } = params.node.attrs || {};
|
|
26909
26987
|
const elements = decodeProperties(propertyTranslatorsBySdName$2, tableRowProperties);
|
|
26910
26988
|
const newNode = {
|
|
@@ -26916,6 +26994,8 @@ const decode$q = (params) => {
|
|
|
26916
26994
|
return newNode;
|
|
26917
26995
|
};
|
|
26918
26996
|
const propertyTranslators$3 = [
|
|
26997
|
+
translator$X,
|
|
26998
|
+
translator$W,
|
|
26919
26999
|
translator$V,
|
|
26920
27000
|
translator$U,
|
|
26921
27001
|
translator$T,
|
|
@@ -26925,9 +27005,7 @@ const propertyTranslators$3 = [
|
|
|
26925
27005
|
translator$P,
|
|
26926
27006
|
translator$O,
|
|
26927
27007
|
translator$N,
|
|
26928
|
-
translator$M
|
|
26929
|
-
translator$L,
|
|
26930
|
-
translator$K
|
|
27008
|
+
translator$M
|
|
26931
27009
|
];
|
|
26932
27010
|
const propertyTranslatorsByXmlName$2 = {};
|
|
26933
27011
|
propertyTranslators$3.forEach((translator2) => {
|
|
@@ -26937,25 +27015,25 @@ const propertyTranslatorsBySdName$2 = {};
|
|
|
26937
27015
|
propertyTranslators$3.forEach((translator2) => {
|
|
26938
27016
|
propertyTranslatorsBySdName$2[translator2.sdNodeOrKeyName] = translator2;
|
|
26939
27017
|
});
|
|
26940
|
-
const config$
|
|
26941
|
-
xmlName: XML_NODE_NAME$
|
|
26942
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
27018
|
+
const config$h = {
|
|
27019
|
+
xmlName: XML_NODE_NAME$k,
|
|
27020
|
+
sdNodeOrKeyName: SD_ATTR_KEY$6,
|
|
26943
27021
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
26944
|
-
encode: encode$
|
|
26945
|
-
decode: decode$
|
|
27022
|
+
encode: encode$q,
|
|
27023
|
+
decode: decode$s
|
|
26946
27024
|
};
|
|
26947
|
-
const translator$
|
|
26948
|
-
const XML_NODE_NAME$
|
|
27025
|
+
const translator$L = NodeTranslator.from(config$h);
|
|
27026
|
+
const XML_NODE_NAME$j = "w:tr";
|
|
26949
27027
|
const SD_NODE_NAME$d = "tableRow";
|
|
26950
|
-
const validXmlAttributes$
|
|
27028
|
+
const validXmlAttributes$b = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
|
|
26951
27029
|
(xmlName) => createAttributeHandler(xmlName)
|
|
26952
27030
|
);
|
|
26953
|
-
const encode$
|
|
27031
|
+
const encode$p = (params, encodedAttrs) => {
|
|
26954
27032
|
const { row } = params.extraParams;
|
|
26955
27033
|
let tableRowProperties = {};
|
|
26956
27034
|
const tPr = row.elements.find((el) => el.name === "w:trPr");
|
|
26957
27035
|
if (tPr) {
|
|
26958
|
-
({ attributes: tableRowProperties } = translator$
|
|
27036
|
+
({ attributes: tableRowProperties } = translator$L.encode({
|
|
26959
27037
|
...params,
|
|
26960
27038
|
nodes: [tPr]
|
|
26961
27039
|
}));
|
|
@@ -26968,7 +27046,7 @@ const encode$n = (params, encodedAttrs) => {
|
|
|
26968
27046
|
let currentColumnIndex = 0;
|
|
26969
27047
|
const content = cellNodes?.map((n) => {
|
|
26970
27048
|
let columnWidth = gridColumnWidths?.[currentColumnIndex] || null;
|
|
26971
|
-
const result = translator$
|
|
27049
|
+
const result = translator$c.encode({
|
|
26972
27050
|
...params,
|
|
26973
27051
|
extraParams: {
|
|
26974
27052
|
...params.extraParams,
|
|
@@ -26990,7 +27068,7 @@ const encode$n = (params, encodedAttrs) => {
|
|
|
26990
27068
|
};
|
|
26991
27069
|
return newNode;
|
|
26992
27070
|
};
|
|
26993
|
-
const decode$
|
|
27071
|
+
const decode$r = (params, decodedAttrs) => {
|
|
26994
27072
|
const { node } = params;
|
|
26995
27073
|
const elements = translateChildNodes(params);
|
|
26996
27074
|
if (node.attrs?.tableRowProperties) {
|
|
@@ -27002,7 +27080,7 @@ const decode$p = (params, decodedAttrs) => {
|
|
|
27002
27080
|
}
|
|
27003
27081
|
}
|
|
27004
27082
|
tableRowProperties["cantSplit"] = node.attrs["cantSplit"];
|
|
27005
|
-
const trPr = translator$
|
|
27083
|
+
const trPr = translator$L.decode({
|
|
27006
27084
|
...params,
|
|
27007
27085
|
node: { ...node, attrs: { ...node.attrs, tableRowProperties } }
|
|
27008
27086
|
});
|
|
@@ -27014,22 +27092,22 @@ const decode$p = (params, decodedAttrs) => {
|
|
|
27014
27092
|
elements
|
|
27015
27093
|
};
|
|
27016
27094
|
};
|
|
27017
|
-
const config$
|
|
27018
|
-
xmlName: XML_NODE_NAME$
|
|
27095
|
+
const config$g = {
|
|
27096
|
+
xmlName: XML_NODE_NAME$j,
|
|
27019
27097
|
sdNodeOrKeyName: SD_NODE_NAME$d,
|
|
27020
27098
|
type: NodeTranslator.translatorTypes.NODE,
|
|
27021
|
-
encode: encode$
|
|
27022
|
-
decode: decode$
|
|
27023
|
-
attributes: validXmlAttributes$
|
|
27099
|
+
encode: encode$p,
|
|
27100
|
+
decode: decode$r,
|
|
27101
|
+
attributes: validXmlAttributes$b
|
|
27024
27102
|
};
|
|
27025
|
-
const translator$
|
|
27026
|
-
const translator$
|
|
27103
|
+
const translator$K = NodeTranslator.from(config$g);
|
|
27104
|
+
const translator$J = NodeTranslator.from({
|
|
27027
27105
|
xmlName: "w:bidiVisual",
|
|
27028
27106
|
sdNodeOrKeyName: "rightToLeft",
|
|
27029
27107
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
27030
27108
|
decode: ({ node }) => node.attrs.rightToLeft ? { attributes: {} } : void 0
|
|
27031
27109
|
});
|
|
27032
|
-
const translator$
|
|
27110
|
+
const translator$I = NodeTranslator.from({
|
|
27033
27111
|
xmlName: "w:shd",
|
|
27034
27112
|
sdNodeOrKeyName: "shading",
|
|
27035
27113
|
attributes: [
|
|
@@ -27051,11 +27129,11 @@ const translator$G = NodeTranslator.from({
|
|
|
27051
27129
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
27052
27130
|
}
|
|
27053
27131
|
});
|
|
27054
|
-
const translator$
|
|
27055
|
-
const translator$
|
|
27056
|
-
const translator$
|
|
27057
|
-
const translator$
|
|
27058
|
-
const translator$
|
|
27132
|
+
const translator$H = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
|
|
27133
|
+
const translator$G = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
|
|
27134
|
+
const translator$F = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
|
|
27135
|
+
const translator$E = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
|
|
27136
|
+
const translator$D = NodeTranslator.from({
|
|
27059
27137
|
xmlName: "w:tblLook",
|
|
27060
27138
|
sdNodeOrKeyName: "tblLook",
|
|
27061
27139
|
attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
|
|
@@ -27067,16 +27145,16 @@ const translator$B = NodeTranslator.from({
|
|
|
27067
27145
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
27068
27146
|
}
|
|
27069
27147
|
});
|
|
27070
|
-
const translator$
|
|
27071
|
-
const translator$
|
|
27072
|
-
const translator$
|
|
27148
|
+
const translator$C = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
|
|
27149
|
+
const translator$B = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
|
|
27150
|
+
const translator$A = NodeTranslator.from(
|
|
27073
27151
|
createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
|
|
27074
27152
|
);
|
|
27075
|
-
const translator$
|
|
27153
|
+
const translator$z = NodeTranslator.from(
|
|
27076
27154
|
createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
|
|
27077
27155
|
);
|
|
27078
|
-
const translator$
|
|
27079
|
-
const translator$
|
|
27156
|
+
const translator$y = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
|
|
27157
|
+
const translator$x = NodeTranslator.from({
|
|
27080
27158
|
xmlName: "w:tblpPr",
|
|
27081
27159
|
sdNodeOrKeyName: "floatingTableProperties",
|
|
27082
27160
|
attributes: ["w:leftFromText", "w:rightFromText", "w:topFromText", "w:bottomFromText", "w:tblpX", "w:tblpY"].map((attr) => createAttributeHandler(attr, null, parseInteger, integerToString)).concat(["w:horzAnchor", "w:vertAnchor", "w:tblpXSpec", "w:tblpYSpec"].map((attr) => createAttributeHandler(attr))),
|
|
@@ -27088,29 +27166,29 @@ const translator$v = NodeTranslator.from({
|
|
|
27088
27166
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
27089
27167
|
}
|
|
27090
27168
|
});
|
|
27091
|
-
const translator$
|
|
27092
|
-
const translator$
|
|
27093
|
-
const translator$
|
|
27094
|
-
const translator$
|
|
27095
|
-
const translator$
|
|
27096
|
-
const translator$
|
|
27097
|
-
const translator$
|
|
27098
|
-
const translator$
|
|
27099
|
-
const translator$
|
|
27100
|
-
const translator$
|
|
27101
|
-
const translator$
|
|
27102
|
-
const translator$
|
|
27103
|
-
const translator$
|
|
27104
|
-
const translator$
|
|
27105
|
-
const XML_NODE_NAME$
|
|
27106
|
-
const SD_ATTR_KEY$
|
|
27107
|
-
const encode$
|
|
27169
|
+
const translator$w = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
|
|
27170
|
+
const translator$v = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
|
|
27171
|
+
const translator$u = NodeTranslator.from(createBorderPropertyHandler("w:end"));
|
|
27172
|
+
const translator$t = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
|
|
27173
|
+
const translator$s = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
|
|
27174
|
+
const translator$r = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
|
|
27175
|
+
const translator$q = NodeTranslator.from(createBorderPropertyHandler("w:left"));
|
|
27176
|
+
const translator$p = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
|
|
27177
|
+
const translator$o = NodeTranslator.from(createBorderPropertyHandler("w:right"));
|
|
27178
|
+
const translator$n = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
|
|
27179
|
+
const translator$m = NodeTranslator.from(createBorderPropertyHandler("w:start"));
|
|
27180
|
+
const translator$l = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
|
|
27181
|
+
const translator$k = NodeTranslator.from(createBorderPropertyHandler("w:top"));
|
|
27182
|
+
const translator$j = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
|
|
27183
|
+
const XML_NODE_NAME$i = "w:tblBorders";
|
|
27184
|
+
const SD_ATTR_KEY$5 = "borders";
|
|
27185
|
+
const encode$o = (params) => {
|
|
27108
27186
|
const { nodes } = params;
|
|
27109
27187
|
const node = nodes[0];
|
|
27110
27188
|
const attributes = encodeProperties(node, tblBordersTranslatorsByXmlName);
|
|
27111
27189
|
return Object.keys(attributes).length > 0 ? attributes : void 0;
|
|
27112
27190
|
};
|
|
27113
|
-
const decode$
|
|
27191
|
+
const decode$q = (params) => {
|
|
27114
27192
|
const { borders = {} } = params.node.attrs || {};
|
|
27115
27193
|
const elements = decodeProperties(tblBordersTranslatorsBySdName, borders);
|
|
27116
27194
|
const newNode = {
|
|
@@ -27122,14 +27200,14 @@ const decode$o = (params) => {
|
|
|
27122
27200
|
return newNode;
|
|
27123
27201
|
};
|
|
27124
27202
|
const propertyTranslators$2 = [
|
|
27203
|
+
translator$w,
|
|
27125
27204
|
translator$u,
|
|
27126
27205
|
translator$s,
|
|
27206
|
+
translator$r,
|
|
27127
27207
|
translator$q,
|
|
27128
|
-
translator$p,
|
|
27129
27208
|
translator$o,
|
|
27130
27209
|
translator$m,
|
|
27131
|
-
translator$k
|
|
27132
|
-
translator$i
|
|
27210
|
+
translator$k
|
|
27133
27211
|
];
|
|
27134
27212
|
const tblBordersTranslatorsByXmlName = {};
|
|
27135
27213
|
const tblBordersTranslatorsBySdName = {};
|
|
@@ -27137,27 +27215,27 @@ propertyTranslators$2.forEach((translator2) => {
|
|
|
27137
27215
|
tblBordersTranslatorsByXmlName[translator2.xmlName] = translator2;
|
|
27138
27216
|
tblBordersTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
|
|
27139
27217
|
});
|
|
27140
|
-
const translator$
|
|
27141
|
-
xmlName: XML_NODE_NAME$
|
|
27142
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
27218
|
+
const translator$i = NodeTranslator.from({
|
|
27219
|
+
xmlName: XML_NODE_NAME$i,
|
|
27220
|
+
sdNodeOrKeyName: SD_ATTR_KEY$5,
|
|
27143
27221
|
type: NodeTranslator.translatorTypes.NODE,
|
|
27144
27222
|
attributes: [],
|
|
27145
|
-
encode: encode$
|
|
27146
|
-
decode: decode$
|
|
27223
|
+
encode: encode$o,
|
|
27224
|
+
decode: decode$q
|
|
27147
27225
|
});
|
|
27148
|
-
const XML_NODE_NAME$
|
|
27149
|
-
const SD_ATTR_KEY$
|
|
27150
|
-
const encode$
|
|
27226
|
+
const XML_NODE_NAME$h = "w:tblCellMar";
|
|
27227
|
+
const SD_ATTR_KEY$4 = "cellMargins";
|
|
27228
|
+
const encode$n = (params) => {
|
|
27151
27229
|
const { nodes } = params;
|
|
27152
27230
|
const node = nodes[0];
|
|
27153
27231
|
const attributes = encodeProperties(node, propertyTranslatorsByXmlName$1);
|
|
27154
27232
|
return Object.keys(attributes).length > 0 ? attributes : void 0;
|
|
27155
27233
|
};
|
|
27156
|
-
const decode$
|
|
27234
|
+
const decode$p = (params) => {
|
|
27157
27235
|
const { cellMargins = {} } = params.node.attrs || {};
|
|
27158
27236
|
const elements = decodeProperties(propertyTranslatorsBySdName$1, cellMargins);
|
|
27159
27237
|
const newNode = {
|
|
27160
|
-
name: XML_NODE_NAME$
|
|
27238
|
+
name: XML_NODE_NAME$h,
|
|
27161
27239
|
type: "element",
|
|
27162
27240
|
attributes: {},
|
|
27163
27241
|
elements
|
|
@@ -27165,12 +27243,12 @@ const decode$n = (params) => {
|
|
|
27165
27243
|
return newNode;
|
|
27166
27244
|
};
|
|
27167
27245
|
const propertyTranslators$1 = [
|
|
27246
|
+
translator$v,
|
|
27168
27247
|
translator$t,
|
|
27169
|
-
translator$
|
|
27248
|
+
translator$p,
|
|
27170
27249
|
translator$n,
|
|
27171
27250
|
translator$l,
|
|
27172
|
-
translator$j
|
|
27173
|
-
translator$h
|
|
27251
|
+
translator$j
|
|
27174
27252
|
];
|
|
27175
27253
|
const propertyTranslatorsByXmlName$1 = {};
|
|
27176
27254
|
const propertyTranslatorsBySdName$1 = {};
|
|
@@ -27178,27 +27256,27 @@ propertyTranslators$1.forEach((translator2) => {
|
|
|
27178
27256
|
propertyTranslatorsByXmlName$1[translator2.xmlName] = translator2;
|
|
27179
27257
|
propertyTranslatorsBySdName$1[translator2.sdNodeOrKeyName] = translator2;
|
|
27180
27258
|
});
|
|
27181
|
-
const translator$
|
|
27182
|
-
xmlName: XML_NODE_NAME$
|
|
27183
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
27259
|
+
const translator$h = NodeTranslator.from({
|
|
27260
|
+
xmlName: XML_NODE_NAME$h,
|
|
27261
|
+
sdNodeOrKeyName: SD_ATTR_KEY$4,
|
|
27184
27262
|
type: NodeTranslator.translatorTypes.NODE,
|
|
27185
27263
|
attributes: [],
|
|
27186
|
-
encode: encode$
|
|
27187
|
-
decode: decode$
|
|
27264
|
+
encode: encode$n,
|
|
27265
|
+
decode: decode$p
|
|
27188
27266
|
});
|
|
27189
|
-
const XML_NODE_NAME$
|
|
27190
|
-
const SD_ATTR_KEY$
|
|
27191
|
-
const encode$
|
|
27267
|
+
const XML_NODE_NAME$g = "w:tblPr";
|
|
27268
|
+
const SD_ATTR_KEY$3 = "tableProperties";
|
|
27269
|
+
const encode$m = (params) => {
|
|
27192
27270
|
const { nodes } = params;
|
|
27193
27271
|
const node = nodes[0];
|
|
27194
27272
|
const attributes = encodeProperties(node, propertyTranslatorsByXmlName);
|
|
27195
27273
|
return {
|
|
27196
|
-
xmlName: XML_NODE_NAME$
|
|
27197
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
27274
|
+
xmlName: XML_NODE_NAME$g,
|
|
27275
|
+
sdNodeOrKeyName: SD_ATTR_KEY$3,
|
|
27198
27276
|
attributes
|
|
27199
27277
|
};
|
|
27200
27278
|
};
|
|
27201
|
-
const decode$
|
|
27279
|
+
const decode$o = (params) => {
|
|
27202
27280
|
const { tableProperties = {} } = params.node.attrs || {};
|
|
27203
27281
|
const elements = decodeProperties(propertyTranslatorsBySdName, tableProperties);
|
|
27204
27282
|
const newNode = {
|
|
@@ -27210,11 +27288,13 @@ const decode$m = (params) => {
|
|
|
27210
27288
|
return newNode;
|
|
27211
27289
|
};
|
|
27212
27290
|
const propertyTranslators = [
|
|
27291
|
+
translator$J,
|
|
27292
|
+
translator$R,
|
|
27293
|
+
translator$I,
|
|
27213
27294
|
translator$H,
|
|
27214
|
-
translator$
|
|
27295
|
+
translator$Q,
|
|
27215
27296
|
translator$G,
|
|
27216
27297
|
translator$F,
|
|
27217
|
-
translator$O,
|
|
27218
27298
|
translator$E,
|
|
27219
27299
|
translator$D,
|
|
27220
27300
|
translator$C,
|
|
@@ -27223,10 +27303,8 @@ const propertyTranslators = [
|
|
|
27223
27303
|
translator$z,
|
|
27224
27304
|
translator$y,
|
|
27225
27305
|
translator$x,
|
|
27226
|
-
translator$
|
|
27227
|
-
translator$
|
|
27228
|
-
translator$g,
|
|
27229
|
-
translator$f
|
|
27306
|
+
translator$i,
|
|
27307
|
+
translator$h
|
|
27230
27308
|
];
|
|
27231
27309
|
const propertyTranslatorsByXmlName = {};
|
|
27232
27310
|
const propertyTranslatorsBySdName = {};
|
|
@@ -27234,14 +27312,14 @@ propertyTranslators.forEach((translator2) => {
|
|
|
27234
27312
|
propertyTranslatorsByXmlName[translator2.xmlName] = translator2;
|
|
27235
27313
|
propertyTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
|
|
27236
27314
|
});
|
|
27237
|
-
const config$
|
|
27238
|
-
xmlName: XML_NODE_NAME$
|
|
27239
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
27240
|
-
encode: encode$
|
|
27241
|
-
decode: decode$
|
|
27315
|
+
const config$f = {
|
|
27316
|
+
xmlName: XML_NODE_NAME$g,
|
|
27317
|
+
sdNodeOrKeyName: SD_ATTR_KEY$3,
|
|
27318
|
+
encode: encode$m,
|
|
27319
|
+
decode: decode$o
|
|
27242
27320
|
};
|
|
27243
|
-
const translator$
|
|
27244
|
-
const translator$
|
|
27321
|
+
const translator$g = NodeTranslator.from(config$f);
|
|
27322
|
+
const translator$f = NodeTranslator.from(
|
|
27245
27323
|
createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
|
|
27246
27324
|
);
|
|
27247
27325
|
const DEFAULT_COLUMN_WIDTH_PX = 100;
|
|
@@ -27291,20 +27369,20 @@ const resolveFallbackColumnWidthTwips = (params, totalColumns, cellMinWidthTwips
|
|
|
27291
27369
|
}
|
|
27292
27370
|
return Math.max(fallbackWidthTwips, cellMinWidthTwips);
|
|
27293
27371
|
};
|
|
27294
|
-
const XML_NODE_NAME$
|
|
27295
|
-
const SD_ATTR_KEY = "grid";
|
|
27372
|
+
const XML_NODE_NAME$f = "w:tblGrid";
|
|
27373
|
+
const SD_ATTR_KEY$2 = "grid";
|
|
27296
27374
|
const cellMinWidth = pixelsToTwips(10);
|
|
27297
|
-
const encode$
|
|
27375
|
+
const encode$l = (params) => {
|
|
27298
27376
|
const { nodes } = params;
|
|
27299
27377
|
const node = nodes[0];
|
|
27300
|
-
const attributes = encodeProperties(node, { [translator$
|
|
27378
|
+
const attributes = encodeProperties(node, { [translator$f.xmlName]: translator$f }, true);
|
|
27301
27379
|
return {
|
|
27302
|
-
xmlName: XML_NODE_NAME$
|
|
27303
|
-
sdNodeOrKeyName: SD_ATTR_KEY,
|
|
27380
|
+
xmlName: XML_NODE_NAME$f,
|
|
27381
|
+
sdNodeOrKeyName: SD_ATTR_KEY$2,
|
|
27304
27382
|
attributes
|
|
27305
27383
|
};
|
|
27306
27384
|
};
|
|
27307
|
-
const decode$
|
|
27385
|
+
const decode$n = (params) => {
|
|
27308
27386
|
const { grid: rawGrid } = params.node.attrs || {};
|
|
27309
27387
|
const grid = Array.isArray(rawGrid) ? rawGrid : [];
|
|
27310
27388
|
const { firstRow = {} } = params.extraParams || {};
|
|
@@ -27323,10 +27401,10 @@ const decode$l = (params) => {
|
|
|
27323
27401
|
numericWidth = fallbackColumnWidthTwips;
|
|
27324
27402
|
}
|
|
27325
27403
|
numericWidth = Math.max(numericWidth, cellMinWidth);
|
|
27326
|
-
const decoded = translator$
|
|
27404
|
+
const decoded = translator$f.decode({
|
|
27327
27405
|
node: { type: (
|
|
27328
27406
|
/** @type {string} */
|
|
27329
|
-
translator$
|
|
27407
|
+
translator$f.sdNodeOrKeyName
|
|
27330
27408
|
), attrs: { col: numericWidth } }
|
|
27331
27409
|
});
|
|
27332
27410
|
if (decoded) elements.push(decoded);
|
|
@@ -27361,19 +27439,19 @@ const decode$l = (params) => {
|
|
|
27361
27439
|
columnIndex++;
|
|
27362
27440
|
}
|
|
27363
27441
|
const newNode = {
|
|
27364
|
-
name: XML_NODE_NAME$
|
|
27442
|
+
name: XML_NODE_NAME$f,
|
|
27365
27443
|
attributes: {},
|
|
27366
27444
|
elements
|
|
27367
27445
|
};
|
|
27368
27446
|
return newNode;
|
|
27369
27447
|
};
|
|
27370
|
-
const config$
|
|
27371
|
-
xmlName: XML_NODE_NAME$
|
|
27372
|
-
sdNodeOrKeyName: SD_ATTR_KEY,
|
|
27373
|
-
encode: encode$
|
|
27374
|
-
decode: decode$
|
|
27448
|
+
const config$e = {
|
|
27449
|
+
xmlName: XML_NODE_NAME$f,
|
|
27450
|
+
sdNodeOrKeyName: SD_ATTR_KEY$2,
|
|
27451
|
+
encode: encode$l,
|
|
27452
|
+
decode: decode$n
|
|
27375
27453
|
};
|
|
27376
|
-
const translator$
|
|
27454
|
+
const translator$e = NodeTranslator.from(config$e);
|
|
27377
27455
|
const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
|
|
27378
27456
|
const DEFAULT_PAGE_MARGIN_TWIPS = 1440;
|
|
27379
27457
|
const DEFAULT_CONTENT_WIDTH_TWIPS = DEFAULT_PAGE_WIDTH_TWIPS - 2 * DEFAULT_PAGE_MARGIN_TWIPS;
|
|
@@ -27436,19 +27514,19 @@ const buildFallbackGridForTable = ({ params, rows, tableWidth, tableWidthMeasure
|
|
|
27436
27514
|
columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
|
|
27437
27515
|
};
|
|
27438
27516
|
};
|
|
27439
|
-
const XML_NODE_NAME$
|
|
27517
|
+
const XML_NODE_NAME$e = "w:tbl";
|
|
27440
27518
|
const SD_NODE_NAME$c = "table";
|
|
27441
|
-
const encode$
|
|
27519
|
+
const encode$k = (params, encodedAttrs) => {
|
|
27442
27520
|
const { nodes } = params;
|
|
27443
27521
|
const node = nodes[0];
|
|
27444
27522
|
const tblPr = node.elements.find((el) => el.name === "w:tblPr");
|
|
27445
27523
|
if (tblPr) {
|
|
27446
|
-
const encodedProperties = translator$
|
|
27524
|
+
const encodedProperties = translator$g.encode({ ...params, nodes: [tblPr] });
|
|
27447
27525
|
encodedAttrs["tableProperties"] = encodedProperties?.attributes || {};
|
|
27448
27526
|
}
|
|
27449
27527
|
const tblGrid = node.elements.find((el) => el.name === "w:tblGrid");
|
|
27450
27528
|
if (tblGrid) {
|
|
27451
|
-
encodedAttrs["grid"] = translator$
|
|
27529
|
+
encodedAttrs["grid"] = translator$e.encode({ ...params, nodes: [tblGrid] }).attributes;
|
|
27452
27530
|
}
|
|
27453
27531
|
[
|
|
27454
27532
|
"tableStyleId",
|
|
@@ -27515,7 +27593,7 @@ const encode$i = (params, encodedAttrs) => {
|
|
|
27515
27593
|
}
|
|
27516
27594
|
const content = [];
|
|
27517
27595
|
rows.forEach((row) => {
|
|
27518
|
-
const result = translator$
|
|
27596
|
+
const result = translator$K.encode({
|
|
27519
27597
|
...params,
|
|
27520
27598
|
nodes: [row],
|
|
27521
27599
|
extraParams: {
|
|
@@ -27534,13 +27612,13 @@ const encode$i = (params, encodedAttrs) => {
|
|
|
27534
27612
|
attrs: encodedAttrs
|
|
27535
27613
|
};
|
|
27536
27614
|
};
|
|
27537
|
-
const decode$
|
|
27615
|
+
const decode$m = (params, decodedAttrs) => {
|
|
27538
27616
|
params.node = preProcessVerticalMergeCells(params.node, params);
|
|
27539
27617
|
const { node } = params;
|
|
27540
27618
|
const elements = translateChildNodes(params);
|
|
27541
27619
|
const firstRow = node.content?.find((n) => n.type === "tableRow");
|
|
27542
27620
|
const properties = node.attrs.grid;
|
|
27543
|
-
const element = translator$
|
|
27621
|
+
const element = translator$e.decode({
|
|
27544
27622
|
...params,
|
|
27545
27623
|
node: { ...node, attrs: { ...node.attrs, grid: properties } },
|
|
27546
27624
|
extraParams: {
|
|
@@ -27550,7 +27628,7 @@ const decode$k = (params, decodedAttrs) => {
|
|
|
27550
27628
|
if (element) elements.unshift(element);
|
|
27551
27629
|
if (node.attrs?.tableProperties) {
|
|
27552
27630
|
const properties2 = { ...node.attrs.tableProperties };
|
|
27553
|
-
const element2 = translator$
|
|
27631
|
+
const element2 = translator$g.decode({
|
|
27554
27632
|
...params,
|
|
27555
27633
|
node: { ...node, attrs: { ...node.attrs, tableProperties: properties2 } }
|
|
27556
27634
|
});
|
|
@@ -27616,7 +27694,7 @@ function _getReferencedTableStyles(tableStyleReference, params) {
|
|
|
27616
27694
|
if (baseTblPr && baseTblPr.elements) {
|
|
27617
27695
|
tblPr.elements.push(...baseTblPr.elements);
|
|
27618
27696
|
}
|
|
27619
|
-
const tableProperties = translator$
|
|
27697
|
+
const tableProperties = translator$g.encode({ ...params, nodes: [tblPr] }).attributes;
|
|
27620
27698
|
const { borders, rowBorders } = _processTableBorders(tableProperties.borders || {});
|
|
27621
27699
|
if (borders) stylesToReturn.borders = borders;
|
|
27622
27700
|
if (rowBorders) stylesToReturn.rowBorders = rowBorders;
|
|
@@ -27633,16 +27711,16 @@ function _getReferencedTableStyles(tableStyleReference, params) {
|
|
|
27633
27711
|
}
|
|
27634
27712
|
return stylesToReturn;
|
|
27635
27713
|
}
|
|
27636
|
-
const config$
|
|
27637
|
-
xmlName: XML_NODE_NAME$
|
|
27714
|
+
const config$d = {
|
|
27715
|
+
xmlName: XML_NODE_NAME$e,
|
|
27638
27716
|
sdNodeOrKeyName: SD_NODE_NAME$c,
|
|
27639
27717
|
type: NodeTranslator.translatorTypes.NODE,
|
|
27640
|
-
encode: encode$
|
|
27641
|
-
decode: decode$
|
|
27718
|
+
encode: encode$k,
|
|
27719
|
+
decode: decode$m,
|
|
27642
27720
|
attributes: []
|
|
27643
27721
|
};
|
|
27644
|
-
const translator$
|
|
27645
|
-
const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$
|
|
27722
|
+
const translator$d = NodeTranslator.from(config$d);
|
|
27723
|
+
const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$d);
|
|
27646
27724
|
function getReferencedTableStyles(tblStyleTag, docx) {
|
|
27647
27725
|
if (!tblStyleTag) return null;
|
|
27648
27726
|
const stylesToReturn = {};
|
|
@@ -28004,10 +28082,10 @@ function generateCellMargins(cellMargins) {
|
|
|
28004
28082
|
if (left != null) elements.push({ name: "w:left", attributes: { "w:w": pixelsToTwips(left) } });
|
|
28005
28083
|
return elements;
|
|
28006
28084
|
}
|
|
28007
|
-
const XML_NODE_NAME$
|
|
28085
|
+
const XML_NODE_NAME$d = "w:tc";
|
|
28008
28086
|
const SD_NODE_NAME$b = "tableCell";
|
|
28009
|
-
const validXmlAttributes$
|
|
28010
|
-
function encode$
|
|
28087
|
+
const validXmlAttributes$a = [];
|
|
28088
|
+
function encode$j(params, encodedAttrs) {
|
|
28011
28089
|
const {
|
|
28012
28090
|
node,
|
|
28013
28091
|
table,
|
|
@@ -28034,22 +28112,22 @@ function encode$h(params, encodedAttrs) {
|
|
|
28034
28112
|
}
|
|
28035
28113
|
return schemaNode;
|
|
28036
28114
|
}
|
|
28037
|
-
function decode$
|
|
28115
|
+
function decode$l(params, decodedAttrs) {
|
|
28038
28116
|
const translated = translateTableCell(params);
|
|
28039
28117
|
if (decodedAttrs && Object.keys(decodedAttrs).length) {
|
|
28040
28118
|
translated.attributes = { ...translated.attributes || {}, ...decodedAttrs };
|
|
28041
28119
|
}
|
|
28042
28120
|
return translated;
|
|
28043
28121
|
}
|
|
28044
|
-
const config$
|
|
28045
|
-
xmlName: XML_NODE_NAME$
|
|
28122
|
+
const config$c = {
|
|
28123
|
+
xmlName: XML_NODE_NAME$d,
|
|
28046
28124
|
sdNodeOrKeyName: SD_NODE_NAME$b,
|
|
28047
28125
|
type: NodeTranslator.translatorTypes.NODE,
|
|
28048
|
-
encode: encode$
|
|
28049
|
-
decode: decode$
|
|
28050
|
-
attributes: validXmlAttributes$
|
|
28126
|
+
encode: encode$j,
|
|
28127
|
+
decode: decode$l,
|
|
28128
|
+
attributes: validXmlAttributes$a
|
|
28051
28129
|
};
|
|
28052
|
-
const translator$
|
|
28130
|
+
const translator$c = NodeTranslator.from(config$c);
|
|
28053
28131
|
function parseTagValueJSON(json) {
|
|
28054
28132
|
if (typeof json !== "string") {
|
|
28055
28133
|
return {};
|
|
@@ -28476,8 +28554,64 @@ function handleImageNode(node, params, isAnchor) {
|
|
|
28476
28554
|
const vRelativeFrom = positionVTag?.attributes.relativeFrom;
|
|
28477
28555
|
const alignV = positionVTag?.elements?.find((el) => el.name === "wp:align")?.elements[0]?.text;
|
|
28478
28556
|
const simplePos = node.elements.find((el) => el.name === "wp:simplePos");
|
|
28479
|
-
const
|
|
28480
|
-
|
|
28557
|
+
const wrapNode = isAnchor ? node.elements.find(
|
|
28558
|
+
(el) => ["wp:wrapNone", "wp:wrapSquare", "wp:wrapThrough", "wp:wrapTight", "wp:wrapTopAndBottom"].includes(el.name)
|
|
28559
|
+
) : null;
|
|
28560
|
+
const wrap2 = isAnchor ? { type: wrapNode?.name.slice(7) || "None", attrs: {} } : { type: "Inline" };
|
|
28561
|
+
switch (wrap2.type) {
|
|
28562
|
+
case "Square":
|
|
28563
|
+
wrap2.attrs.wrapText = wrapNode.attributes.wrapText;
|
|
28564
|
+
if ("distB" in (wrapNode.attributes || {})) {
|
|
28565
|
+
wrap2.attrs.distBottom = emuToPixels(wrapNode.attributes.distB);
|
|
28566
|
+
}
|
|
28567
|
+
if ("distL" in (wrapNode.attributes || {})) {
|
|
28568
|
+
wrap2.attrs.distLeft = emuToPixels(wrapNode.attributes.distL);
|
|
28569
|
+
}
|
|
28570
|
+
if ("distR" in (wrapNode.attributes || {})) {
|
|
28571
|
+
wrap2.attrs.distRight = emuToPixels(wrapNode.attributes.distR);
|
|
28572
|
+
}
|
|
28573
|
+
if ("distT" in (wrapNode.attributes || {})) {
|
|
28574
|
+
wrap2.attrs.distTop = emuToPixels(wrapNode.attributes.distT);
|
|
28575
|
+
}
|
|
28576
|
+
break;
|
|
28577
|
+
case "Tight":
|
|
28578
|
+
case "Through": {
|
|
28579
|
+
if ("distL" in (wrapNode.attributes || {})) {
|
|
28580
|
+
wrap2.attrs.distLeft = emuToPixels(wrapNode.attributes.distL);
|
|
28581
|
+
}
|
|
28582
|
+
if ("distR" in (wrapNode.attributes || {})) {
|
|
28583
|
+
wrap2.attrs.distRight = emuToPixels(wrapNode.attributes.distR);
|
|
28584
|
+
}
|
|
28585
|
+
if ("distT" in (wrapNode.attributes || {})) {
|
|
28586
|
+
wrap2.attrs.distTop = emuToPixels(wrapNode.attributes.distT);
|
|
28587
|
+
}
|
|
28588
|
+
if ("distB" in (wrapNode.attributes || {})) {
|
|
28589
|
+
wrap2.attrs.distBottom = emuToPixels(wrapNode.attributes.distB);
|
|
28590
|
+
}
|
|
28591
|
+
if ("wrapText" in (wrapNode.attributes || {})) {
|
|
28592
|
+
wrap2.attrs.wrapText = wrapNode.attributes.wrapText;
|
|
28593
|
+
}
|
|
28594
|
+
const polygon = wrapNode.elements?.find((el) => el.name === "wp:wrapPolygon");
|
|
28595
|
+
if (polygon) {
|
|
28596
|
+
wrap2.attrs.polygon = polygonToObj(polygon);
|
|
28597
|
+
if (polygon.attributes?.edited !== void 0) {
|
|
28598
|
+
wrap2.attrs.polygonEdited = polygon.attributes.edited;
|
|
28599
|
+
}
|
|
28600
|
+
}
|
|
28601
|
+
break;
|
|
28602
|
+
}
|
|
28603
|
+
case "TopAndBottom":
|
|
28604
|
+
if ("distB" in (wrapNode.attributes || {})) {
|
|
28605
|
+
wrap2.attrs.distBottom = emuToPixels(wrapNode.attributes.distB);
|
|
28606
|
+
}
|
|
28607
|
+
if ("distT" in (wrapNode.attributes || {})) {
|
|
28608
|
+
wrap2.attrs.distTop = emuToPixels(wrapNode.attributes.distT);
|
|
28609
|
+
}
|
|
28610
|
+
break;
|
|
28611
|
+
case "None":
|
|
28612
|
+
wrap2.attrs.behindDoc = node.attributes?.behindDoc === "1";
|
|
28613
|
+
break;
|
|
28614
|
+
}
|
|
28481
28615
|
const docPr = node.elements.find((el) => el.name === "wp:docPr");
|
|
28482
28616
|
let anchorData = null;
|
|
28483
28617
|
if (hRelativeFrom || alignH || vRelativeFrom || alignV) {
|
|
@@ -28489,7 +28623,7 @@ function handleImageNode(node, params, isAnchor) {
|
|
|
28489
28623
|
};
|
|
28490
28624
|
}
|
|
28491
28625
|
const marginOffset = {
|
|
28492
|
-
|
|
28626
|
+
horizontal: positionHValue,
|
|
28493
28627
|
top: positionVValue
|
|
28494
28628
|
};
|
|
28495
28629
|
const { attributes: blipAttributes = {} } = blip;
|
|
@@ -28528,10 +28662,7 @@ function handleImageNode(node, params, isAnchor) {
|
|
|
28528
28662
|
y: simplePos.attributes.y
|
|
28529
28663
|
}
|
|
28530
28664
|
},
|
|
28531
|
-
|
|
28532
|
-
wrapText: wrapSquare.attributes.wrapText
|
|
28533
|
-
},
|
|
28534
|
-
wrapTopAndBottom: !!wrapTopAndBottom,
|
|
28665
|
+
wrap: wrap2,
|
|
28535
28666
|
originalPadding: {
|
|
28536
28667
|
distT: attributes["distT"],
|
|
28537
28668
|
distB: attributes["distB"],
|
|
@@ -28879,7 +29010,6 @@ function addNewImageRelationship(params, imagePath) {
|
|
|
28879
29010
|
function translateAnchorNode(params) {
|
|
28880
29011
|
const { attrs } = params.node;
|
|
28881
29012
|
const anchorElements = [];
|
|
28882
|
-
const wrapElements = [];
|
|
28883
29013
|
if (attrs.simplePos) {
|
|
28884
29014
|
anchorElements.push({
|
|
28885
29015
|
name: "wp:simplePos",
|
|
@@ -28891,10 +29021,10 @@ function translateAnchorNode(params) {
|
|
|
28891
29021
|
}
|
|
28892
29022
|
if (attrs.anchorData) {
|
|
28893
29023
|
const hElements = [];
|
|
28894
|
-
if (attrs.marginOffset.
|
|
29024
|
+
if (attrs.marginOffset.horizontal !== void 0) {
|
|
28895
29025
|
hElements.push({
|
|
28896
29026
|
name: "wp:posOffset",
|
|
28897
|
-
elements: [{ type: "text", text: pixelsToEmu(attrs.marginOffset.
|
|
29027
|
+
elements: [{ type: "text", text: pixelsToEmu(attrs.marginOffset.horizontal).toString() }]
|
|
28898
29028
|
});
|
|
28899
29029
|
}
|
|
28900
29030
|
if (attrs.anchorData.alignH) {
|
|
@@ -28927,38 +29057,110 @@ function translateAnchorNode(params) {
|
|
|
28927
29057
|
...vElements.length && { elements: vElements }
|
|
28928
29058
|
});
|
|
28929
29059
|
}
|
|
28930
|
-
|
|
28931
|
-
|
|
28932
|
-
|
|
28933
|
-
|
|
28934
|
-
|
|
28935
|
-
|
|
28936
|
-
|
|
29060
|
+
const nodeElements = translateImageNode(params);
|
|
29061
|
+
const inlineAttrs = {
|
|
29062
|
+
...attrs.originalAttributes || {},
|
|
29063
|
+
...nodeElements.attributes || {}
|
|
29064
|
+
};
|
|
29065
|
+
if (inlineAttrs.relativeHeight == null) {
|
|
29066
|
+
inlineAttrs.relativeHeight = 1;
|
|
28937
29067
|
}
|
|
28938
|
-
if (attrs.
|
|
28939
|
-
|
|
28940
|
-
|
|
28941
|
-
|
|
29068
|
+
if (attrs.originalAttributes?.simplePos !== void 0) {
|
|
29069
|
+
inlineAttrs.simplePos = attrs.originalAttributes.simplePos;
|
|
29070
|
+
} else if (attrs.simplePos !== void 0) {
|
|
29071
|
+
inlineAttrs.simplePos = attrs.simplePos;
|
|
28942
29072
|
}
|
|
28943
|
-
if (
|
|
28944
|
-
|
|
28945
|
-
name: "wp:wrapNone"
|
|
28946
|
-
});
|
|
29073
|
+
if (attrs.originalAttributes?.locked !== void 0) {
|
|
29074
|
+
inlineAttrs.locked = attrs.originalAttributes.locked;
|
|
28947
29075
|
}
|
|
28948
|
-
|
|
28949
|
-
|
|
28950
|
-
|
|
28951
|
-
|
|
28952
|
-
|
|
28953
|
-
|
|
28954
|
-
|
|
28955
|
-
|
|
28956
|
-
|
|
29076
|
+
if (attrs.originalAttributes?.layoutInCell !== void 0) {
|
|
29077
|
+
inlineAttrs.layoutInCell = attrs.originalAttributes.layoutInCell;
|
|
29078
|
+
}
|
|
29079
|
+
if (attrs.originalAttributes?.allowOverlap !== void 0) {
|
|
29080
|
+
inlineAttrs.allowOverlap = attrs.originalAttributes.allowOverlap;
|
|
29081
|
+
}
|
|
29082
|
+
const wrapElement = {
|
|
29083
|
+
name: `wp:wrap${attrs.wrap?.type || "None"}`
|
|
29084
|
+
// Important: wp:anchor will break if no wrapping is specified. We need to use wrapNone.
|
|
28957
29085
|
};
|
|
29086
|
+
switch (attrs.wrap?.type) {
|
|
29087
|
+
case "Square":
|
|
29088
|
+
wrapElement.attributes = {
|
|
29089
|
+
wrapText: attrs.wrap.attrs.wrapText
|
|
29090
|
+
};
|
|
29091
|
+
if ("distBottom" in (attrs.wrap.attrs || {})) {
|
|
29092
|
+
wrapElement.attributes.distB = pixelsToEmu(attrs.wrap.attrs.distBottom);
|
|
29093
|
+
}
|
|
29094
|
+
if ("distLeft" in (attrs.wrap.attrs || {})) {
|
|
29095
|
+
wrapElement.attributes.distL = pixelsToEmu(attrs.wrap.attrs.distLeft);
|
|
29096
|
+
}
|
|
29097
|
+
if ("distRight" in (attrs.wrap.attrs || {})) {
|
|
29098
|
+
wrapElement.attributes.distR = pixelsToEmu(attrs.wrap.attrs.distRight);
|
|
29099
|
+
}
|
|
29100
|
+
if ("distTop" in (attrs.wrap.attrs || {})) {
|
|
29101
|
+
wrapElement.attributes.distT = pixelsToEmu(attrs.wrap.attrs.distTop);
|
|
29102
|
+
}
|
|
29103
|
+
break;
|
|
29104
|
+
case "TopAndBottom": {
|
|
29105
|
+
const attributes = {};
|
|
29106
|
+
let hasKeys = false;
|
|
29107
|
+
if ("distBottom" in (attrs.wrap.attrs || {})) {
|
|
29108
|
+
attributes.distB = pixelsToEmu(attrs.wrap.attrs.distBottom);
|
|
29109
|
+
hasKeys = true;
|
|
29110
|
+
}
|
|
29111
|
+
if ("distTop" in (attrs.wrap.attrs || {})) {
|
|
29112
|
+
attributes.distT = pixelsToEmu(attrs.wrap.attrs.distTop);
|
|
29113
|
+
hasKeys = true;
|
|
29114
|
+
}
|
|
29115
|
+
if (hasKeys) {
|
|
29116
|
+
wrapElement.attributes = attributes;
|
|
29117
|
+
}
|
|
29118
|
+
break;
|
|
29119
|
+
}
|
|
29120
|
+
case "Through":
|
|
29121
|
+
case "Tight": {
|
|
29122
|
+
const attributes = {};
|
|
29123
|
+
if ("distLeft" in (attrs.wrap.attrs || {})) {
|
|
29124
|
+
attributes.distL = pixelsToEmu(attrs.wrap.attrs.distLeft);
|
|
29125
|
+
}
|
|
29126
|
+
if ("distRight" in (attrs.wrap.attrs || {})) {
|
|
29127
|
+
attributes.distR = pixelsToEmu(attrs.wrap.attrs.distRight);
|
|
29128
|
+
}
|
|
29129
|
+
if ("distTop" in (attrs.wrap.attrs || {})) {
|
|
29130
|
+
attributes.distT = pixelsToEmu(attrs.wrap.attrs.distTop);
|
|
29131
|
+
}
|
|
29132
|
+
if ("distBottom" in (attrs.wrap.attrs || {})) {
|
|
29133
|
+
attributes.distB = pixelsToEmu(attrs.wrap.attrs.distBottom);
|
|
29134
|
+
}
|
|
29135
|
+
const wrapText = attrs.wrap.attrs?.wrapText || "bothSides";
|
|
29136
|
+
{
|
|
29137
|
+
attributes.wrapText = wrapText;
|
|
29138
|
+
}
|
|
29139
|
+
if (Object.keys(attributes).length) {
|
|
29140
|
+
wrapElement.attributes = attributes;
|
|
29141
|
+
}
|
|
29142
|
+
if (attrs.wrap.attrs?.polygon) {
|
|
29143
|
+
const polygonNode = objToPolygon(attrs.wrap.attrs.polygon);
|
|
29144
|
+
if (polygonNode) {
|
|
29145
|
+
if (attrs.wrap.attrs?.polygonEdited !== void 0) {
|
|
29146
|
+
polygonNode.attributes = {
|
|
29147
|
+
...polygonNode.attributes || {},
|
|
29148
|
+
edited: String(attrs.wrap.attrs.polygonEdited)
|
|
29149
|
+
};
|
|
29150
|
+
}
|
|
29151
|
+
wrapElement.elements = [polygonNode];
|
|
29152
|
+
}
|
|
29153
|
+
}
|
|
29154
|
+
break;
|
|
29155
|
+
}
|
|
29156
|
+
case "None":
|
|
29157
|
+
inlineAttrs.behindDoc = attrs.wrap.attrs?.behindDoc ? "1" : "0";
|
|
29158
|
+
break;
|
|
29159
|
+
}
|
|
28958
29160
|
const effectIndex = nodeElements.elements.findIndex((el) => el.name === "wp:effectExtent");
|
|
28959
29161
|
const elementsWithWrap = [
|
|
28960
29162
|
...nodeElements.elements.slice(0, effectIndex + 1),
|
|
28961
|
-
|
|
29163
|
+
wrapElement,
|
|
28962
29164
|
...nodeElements.elements.slice(effectIndex + 1)
|
|
28963
29165
|
];
|
|
28964
29166
|
return {
|
|
@@ -28967,32 +29169,32 @@ function translateAnchorNode(params) {
|
|
|
28967
29169
|
elements: [...anchorElements, ...elementsWithWrap]
|
|
28968
29170
|
};
|
|
28969
29171
|
}
|
|
28970
|
-
const XML_NODE_NAME$
|
|
29172
|
+
const XML_NODE_NAME$c = "wp:anchor";
|
|
28971
29173
|
const SD_NODE_NAME$a = ["image"];
|
|
28972
|
-
const validXmlAttributes$
|
|
28973
|
-
function encode$
|
|
29174
|
+
const validXmlAttributes$9 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
|
|
29175
|
+
function encode$i(params) {
|
|
28974
29176
|
const { node } = params.extraParams;
|
|
28975
29177
|
if (!node || !node.type) {
|
|
28976
29178
|
return null;
|
|
28977
29179
|
}
|
|
28978
29180
|
return handleAnchorNode(params);
|
|
28979
29181
|
}
|
|
28980
|
-
function decode$
|
|
29182
|
+
function decode$k(params) {
|
|
28981
29183
|
const { node } = params;
|
|
28982
29184
|
if (!node || !node.type) {
|
|
28983
29185
|
return null;
|
|
28984
29186
|
}
|
|
28985
29187
|
return translateAnchorNode(params);
|
|
28986
29188
|
}
|
|
28987
|
-
const config$
|
|
28988
|
-
xmlName: XML_NODE_NAME$
|
|
29189
|
+
const config$b = {
|
|
29190
|
+
xmlName: XML_NODE_NAME$c,
|
|
28989
29191
|
sdNodeOrKeyName: SD_NODE_NAME$a,
|
|
28990
29192
|
type: NodeTranslator.translatorTypes.NODE,
|
|
28991
|
-
encode: encode$
|
|
28992
|
-
decode: decode$
|
|
28993
|
-
attributes: validXmlAttributes$
|
|
29193
|
+
encode: encode$i,
|
|
29194
|
+
decode: decode$k,
|
|
29195
|
+
attributes: validXmlAttributes$9
|
|
28994
29196
|
};
|
|
28995
|
-
const translator$
|
|
29197
|
+
const translator$b = NodeTranslator.from(config$b);
|
|
28996
29198
|
function handleInlineNode(params) {
|
|
28997
29199
|
const { node } = params.extraParams;
|
|
28998
29200
|
if (node.name !== "wp:inline") {
|
|
@@ -29008,41 +29210,41 @@ function translateInlineNode(params) {
|
|
|
29008
29210
|
elements: nodeElements.elements
|
|
29009
29211
|
};
|
|
29010
29212
|
}
|
|
29011
|
-
const XML_NODE_NAME$
|
|
29213
|
+
const XML_NODE_NAME$b = "wp:inline";
|
|
29012
29214
|
const SD_NODE_NAME$9 = ["image"];
|
|
29013
|
-
const validXmlAttributes$
|
|
29014
|
-
function encode$
|
|
29215
|
+
const validXmlAttributes$8 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
|
|
29216
|
+
function encode$h(params) {
|
|
29015
29217
|
const { node } = params.extraParams;
|
|
29016
29218
|
if (!node || !node.type) {
|
|
29017
29219
|
return null;
|
|
29018
29220
|
}
|
|
29019
29221
|
return handleInlineNode(params);
|
|
29020
29222
|
}
|
|
29021
|
-
function decode$
|
|
29223
|
+
function decode$j(params) {
|
|
29022
29224
|
const { node } = params;
|
|
29023
29225
|
if (!node || !node.type) {
|
|
29024
29226
|
return null;
|
|
29025
29227
|
}
|
|
29026
29228
|
return translateInlineNode(params);
|
|
29027
29229
|
}
|
|
29028
|
-
const config$
|
|
29029
|
-
xmlName: XML_NODE_NAME$
|
|
29230
|
+
const config$a = {
|
|
29231
|
+
xmlName: XML_NODE_NAME$b,
|
|
29030
29232
|
sdNodeOrKeyName: SD_NODE_NAME$9,
|
|
29031
29233
|
type: NodeTranslator.translatorTypes.NODE,
|
|
29032
|
-
encode: encode$
|
|
29033
|
-
decode: decode$
|
|
29034
|
-
attributes: validXmlAttributes$
|
|
29234
|
+
encode: encode$h,
|
|
29235
|
+
decode: decode$j,
|
|
29236
|
+
attributes: validXmlAttributes$8
|
|
29035
29237
|
};
|
|
29036
|
-
const translator$
|
|
29037
|
-
const XML_NODE_NAME$
|
|
29238
|
+
const translator$a = NodeTranslator.from(config$a);
|
|
29239
|
+
const XML_NODE_NAME$a = "w:drawing";
|
|
29038
29240
|
const SD_NODE_NAME$8 = [];
|
|
29039
|
-
const validXmlAttributes$
|
|
29040
|
-
function encode$
|
|
29241
|
+
const validXmlAttributes$7 = [];
|
|
29242
|
+
function encode$g(params) {
|
|
29041
29243
|
const nodes = params.nodes;
|
|
29042
29244
|
const node = nodes[0];
|
|
29043
29245
|
const translatorByChildName = {
|
|
29044
|
-
"wp:anchor": translator$
|
|
29045
|
-
"wp:inline": translator$
|
|
29246
|
+
"wp:anchor": translator$b,
|
|
29247
|
+
"wp:inline": translator$a
|
|
29046
29248
|
};
|
|
29047
29249
|
return node.elements.reduce((acc, child) => {
|
|
29048
29250
|
if (acc) return acc;
|
|
@@ -29051,12 +29253,12 @@ function encode$e(params) {
|
|
|
29051
29253
|
return translator2.encode({ ...params, extraParams: { node: child } }) || acc;
|
|
29052
29254
|
}, null);
|
|
29053
29255
|
}
|
|
29054
|
-
function decode$
|
|
29256
|
+
function decode$i(params) {
|
|
29055
29257
|
const { node } = params;
|
|
29056
29258
|
if (!node || !node.type) {
|
|
29057
29259
|
return null;
|
|
29058
29260
|
}
|
|
29059
|
-
const childTranslator = node.attrs.isAnchor ? translator$
|
|
29261
|
+
const childTranslator = node.attrs.isAnchor ? translator$b : translator$a;
|
|
29060
29262
|
const resultNode = childTranslator.decode(params);
|
|
29061
29263
|
return wrapTextInRun(
|
|
29062
29264
|
{
|
|
@@ -29066,15 +29268,15 @@ function decode$g(params) {
|
|
|
29066
29268
|
[]
|
|
29067
29269
|
);
|
|
29068
29270
|
}
|
|
29069
|
-
const config$
|
|
29070
|
-
xmlName: XML_NODE_NAME$
|
|
29271
|
+
const config$9 = {
|
|
29272
|
+
xmlName: XML_NODE_NAME$a,
|
|
29071
29273
|
sdNodeOrKeyName: SD_NODE_NAME$8,
|
|
29072
29274
|
type: NodeTranslator.translatorTypes.NODE,
|
|
29073
|
-
encode: encode$
|
|
29074
|
-
decode: decode$
|
|
29075
|
-
attributes: validXmlAttributes$
|
|
29275
|
+
encode: encode$g,
|
|
29276
|
+
decode: decode$i,
|
|
29277
|
+
attributes: validXmlAttributes$7
|
|
29076
29278
|
};
|
|
29077
|
-
const translator$
|
|
29279
|
+
const translator$9 = NodeTranslator.from(config$9);
|
|
29078
29280
|
class CommandService {
|
|
29079
29281
|
/**
|
|
29080
29282
|
* @param {import('./commands/types/index.js').CommandServiceOptions} props
|
|
@@ -30422,7 +30624,7 @@ function prepareTextAnnotation(params) {
|
|
|
30422
30624
|
return getTextNodeForExport(attrs.displayLabel, [...marks, ...marksFromAttrs], params);
|
|
30423
30625
|
}
|
|
30424
30626
|
function prepareImageAnnotation(params, imageSize) {
|
|
30425
|
-
return translator$
|
|
30627
|
+
return translator$9.decode({
|
|
30426
30628
|
...params,
|
|
30427
30629
|
imageSize
|
|
30428
30630
|
});
|
|
@@ -30737,10 +30939,10 @@ function generateSdtPrTagForStructuredContent({ node }) {
|
|
|
30737
30939
|
};
|
|
30738
30940
|
return result;
|
|
30739
30941
|
}
|
|
30740
|
-
const XML_NODE_NAME$
|
|
30942
|
+
const XML_NODE_NAME$9 = "w:sdt";
|
|
30741
30943
|
const SD_NODE_NAME$7 = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
|
|
30742
|
-
const validXmlAttributes$
|
|
30743
|
-
function encode$
|
|
30944
|
+
const validXmlAttributes$6 = [];
|
|
30945
|
+
function encode$f(params) {
|
|
30744
30946
|
const nodes = params.nodes;
|
|
30745
30947
|
const node = nodes[0];
|
|
30746
30948
|
const { type: sdtType, handler: handler2 } = sdtNodeTypeStrategy(node);
|
|
@@ -30750,7 +30952,7 @@ function encode$d(params) {
|
|
|
30750
30952
|
const result = handler2(params);
|
|
30751
30953
|
return result;
|
|
30752
30954
|
}
|
|
30753
|
-
function decode$
|
|
30955
|
+
function decode$h(params) {
|
|
30754
30956
|
const { node } = params;
|
|
30755
30957
|
if (!node || !node.type) {
|
|
30756
30958
|
return null;
|
|
@@ -30768,85 +30970,85 @@ function decode$f(params) {
|
|
|
30768
30970
|
const result = decoder();
|
|
30769
30971
|
return result;
|
|
30770
30972
|
}
|
|
30771
|
-
const config$
|
|
30772
|
-
xmlName: XML_NODE_NAME$
|
|
30973
|
+
const config$8 = {
|
|
30974
|
+
xmlName: XML_NODE_NAME$9,
|
|
30773
30975
|
sdNodeOrKeyName: SD_NODE_NAME$7,
|
|
30774
30976
|
type: NodeTranslator.translatorTypes.NODE,
|
|
30775
|
-
encode: encode$
|
|
30776
|
-
decode: decode$
|
|
30777
|
-
attributes: validXmlAttributes$
|
|
30977
|
+
encode: encode$f,
|
|
30978
|
+
decode: decode$h,
|
|
30979
|
+
attributes: validXmlAttributes$6
|
|
30778
30980
|
};
|
|
30779
|
-
const translator$
|
|
30780
|
-
const encode$
|
|
30981
|
+
const translator$8 = NodeTranslator.from(config$8);
|
|
30982
|
+
const encode$e = (attributes) => {
|
|
30781
30983
|
return attributes["w:id"];
|
|
30782
30984
|
};
|
|
30783
|
-
const decode$
|
|
30985
|
+
const decode$g = (attrs) => {
|
|
30784
30986
|
return attrs.id;
|
|
30785
30987
|
};
|
|
30786
30988
|
const attrConfig$7 = Object.freeze({
|
|
30787
30989
|
xmlName: "w:id",
|
|
30788
30990
|
sdName: "id",
|
|
30789
|
-
encode: encode$
|
|
30790
|
-
decode: decode$
|
|
30991
|
+
encode: encode$e,
|
|
30992
|
+
decode: decode$g
|
|
30791
30993
|
});
|
|
30792
|
-
const encode$
|
|
30994
|
+
const encode$d = (attributes) => {
|
|
30793
30995
|
return attributes["w:name"];
|
|
30794
30996
|
};
|
|
30795
|
-
const decode$
|
|
30997
|
+
const decode$f = (attrs) => {
|
|
30796
30998
|
return attrs.name;
|
|
30797
30999
|
};
|
|
30798
31000
|
const attrConfig$6 = Object.freeze({
|
|
30799
31001
|
xmlName: "w:name",
|
|
30800
31002
|
sdName: "name",
|
|
30801
|
-
encode: encode$
|
|
30802
|
-
decode: decode$
|
|
31003
|
+
encode: encode$d,
|
|
31004
|
+
decode: decode$f
|
|
30803
31005
|
});
|
|
30804
|
-
const encode$
|
|
31006
|
+
const encode$c = (attributes) => {
|
|
30805
31007
|
return attributes["w:colFirst"];
|
|
30806
31008
|
};
|
|
30807
|
-
const decode$
|
|
31009
|
+
const decode$e = (attrs) => {
|
|
30808
31010
|
return attrs.colFirst;
|
|
30809
31011
|
};
|
|
30810
31012
|
const attrConfig$5 = Object.freeze({
|
|
30811
31013
|
xmlName: "w:colFirst",
|
|
30812
31014
|
sdName: "colFirst",
|
|
30813
|
-
encode: encode$
|
|
30814
|
-
decode: decode$
|
|
31015
|
+
encode: encode$c,
|
|
31016
|
+
decode: decode$e
|
|
30815
31017
|
});
|
|
30816
|
-
const encode$
|
|
31018
|
+
const encode$b = (attributes) => {
|
|
30817
31019
|
return attributes["w:colLast"];
|
|
30818
31020
|
};
|
|
30819
|
-
const decode$
|
|
31021
|
+
const decode$d = (attrs) => {
|
|
30820
31022
|
return attrs.colLast;
|
|
30821
31023
|
};
|
|
30822
31024
|
const attrConfig$4 = Object.freeze({
|
|
30823
31025
|
xmlName: "w:colLast",
|
|
30824
31026
|
sdName: "colLast",
|
|
30825
|
-
encode: encode$
|
|
30826
|
-
decode: decode$
|
|
31027
|
+
encode: encode$b,
|
|
31028
|
+
decode: decode$d
|
|
30827
31029
|
});
|
|
30828
|
-
const encode$
|
|
31030
|
+
const encode$a = (attributes) => {
|
|
30829
31031
|
return attributes["w:displacedByCustomXml"];
|
|
30830
31032
|
};
|
|
30831
|
-
const decode$
|
|
31033
|
+
const decode$c = (attrs) => {
|
|
30832
31034
|
return attrs.displacedByCustomXml;
|
|
30833
31035
|
};
|
|
30834
31036
|
const attrConfig$3 = Object.freeze({
|
|
30835
31037
|
xmlName: "w:displacedByCustomXml",
|
|
30836
31038
|
sdName: "displacedByCustomXml",
|
|
30837
|
-
encode: encode$
|
|
30838
|
-
decode: decode$
|
|
31039
|
+
encode: encode$a,
|
|
31040
|
+
decode: decode$c
|
|
30839
31041
|
});
|
|
30840
|
-
const validXmlAttributes$
|
|
30841
|
-
const XML_NODE_NAME$
|
|
31042
|
+
const validXmlAttributes$5 = [attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3];
|
|
31043
|
+
const XML_NODE_NAME$8 = "w:bookmarkStart";
|
|
30842
31044
|
const SD_NODE_NAME$6 = "bookmarkStart";
|
|
30843
|
-
const encode$
|
|
31045
|
+
const encode$9 = (params, encodedAttrs = {}) => {
|
|
30844
31046
|
return {
|
|
30845
31047
|
type: "bookmarkStart",
|
|
30846
31048
|
attrs: encodedAttrs
|
|
30847
31049
|
};
|
|
30848
31050
|
};
|
|
30849
|
-
const decode$
|
|
31051
|
+
const decode$b = (params, decodedAttrs = {}) => {
|
|
30850
31052
|
const result = {
|
|
30851
31053
|
name: "w:bookmarkStart",
|
|
30852
31054
|
elements: []
|
|
@@ -30856,49 +31058,49 @@ const decode$9 = (params, decodedAttrs = {}) => {
|
|
|
30856
31058
|
}
|
|
30857
31059
|
return result;
|
|
30858
31060
|
};
|
|
30859
|
-
const config$
|
|
30860
|
-
xmlName: XML_NODE_NAME$
|
|
31061
|
+
const config$7 = {
|
|
31062
|
+
xmlName: XML_NODE_NAME$8,
|
|
30861
31063
|
sdNodeOrKeyName: SD_NODE_NAME$6,
|
|
30862
31064
|
type: NodeTranslator.translatorTypes.NODE,
|
|
30863
|
-
encode: encode$
|
|
30864
|
-
decode: decode$
|
|
30865
|
-
attributes: validXmlAttributes$
|
|
31065
|
+
encode: encode$9,
|
|
31066
|
+
decode: decode$b,
|
|
31067
|
+
attributes: validXmlAttributes$5
|
|
30866
31068
|
};
|
|
30867
|
-
const translator$
|
|
30868
|
-
const encode$
|
|
31069
|
+
const translator$7 = NodeTranslator.from(config$7);
|
|
31070
|
+
const encode$8 = (attributes) => {
|
|
30869
31071
|
return attributes["w:id"];
|
|
30870
31072
|
};
|
|
30871
|
-
const decode$
|
|
31073
|
+
const decode$a = (attrs) => {
|
|
30872
31074
|
return attrs.id;
|
|
30873
31075
|
};
|
|
30874
31076
|
const attrConfig$2 = Object.freeze({
|
|
30875
31077
|
xmlName: "w:id",
|
|
30876
31078
|
sdName: "id",
|
|
30877
|
-
encode: encode$
|
|
30878
|
-
decode: decode$
|
|
31079
|
+
encode: encode$8,
|
|
31080
|
+
decode: decode$a
|
|
30879
31081
|
});
|
|
30880
|
-
const encode$
|
|
31082
|
+
const encode$7 = (attributes) => {
|
|
30881
31083
|
return attributes["w:displacedByCustomXml"];
|
|
30882
31084
|
};
|
|
30883
|
-
const decode$
|
|
31085
|
+
const decode$9 = (attrs) => {
|
|
30884
31086
|
return attrs.displacedByCustomXml;
|
|
30885
31087
|
};
|
|
30886
31088
|
const attrConfig$1 = Object.freeze({
|
|
30887
31089
|
xmlName: "w:displacedByCustomXml",
|
|
30888
31090
|
sdName: "displacedByCustomXml",
|
|
30889
|
-
encode: encode$
|
|
30890
|
-
decode: decode$
|
|
31091
|
+
encode: encode$7,
|
|
31092
|
+
decode: decode$9
|
|
30891
31093
|
});
|
|
30892
|
-
const validXmlAttributes$
|
|
30893
|
-
const XML_NODE_NAME$
|
|
31094
|
+
const validXmlAttributes$4 = [attrConfig$2, attrConfig$1];
|
|
31095
|
+
const XML_NODE_NAME$7 = "w:bookmarkEnd";
|
|
30894
31096
|
const SD_NODE_NAME$5 = "bookmarkEnd";
|
|
30895
|
-
const encode$
|
|
31097
|
+
const encode$6 = (params, encodedAttrs = {}) => {
|
|
30896
31098
|
return {
|
|
30897
31099
|
type: "bookmarkEnd",
|
|
30898
31100
|
attrs: encodedAttrs
|
|
30899
31101
|
};
|
|
30900
31102
|
};
|
|
30901
|
-
const decode$
|
|
31103
|
+
const decode$8 = (params, decodedAttrs = {}) => {
|
|
30902
31104
|
const result = {
|
|
30903
31105
|
name: "w:bookmarkEnd",
|
|
30904
31106
|
elements: []
|
|
@@ -30908,27 +31110,27 @@ const decode$6 = (params, decodedAttrs = {}) => {
|
|
|
30908
31110
|
}
|
|
30909
31111
|
return result;
|
|
30910
31112
|
};
|
|
30911
|
-
const config$
|
|
30912
|
-
xmlName: XML_NODE_NAME$
|
|
31113
|
+
const config$6 = {
|
|
31114
|
+
xmlName: XML_NODE_NAME$7,
|
|
30913
31115
|
sdNodeOrKeyName: SD_NODE_NAME$5,
|
|
30914
31116
|
type: NodeTranslator.translatorTypes.NODE,
|
|
30915
|
-
encode: encode$
|
|
30916
|
-
decode: decode$
|
|
30917
|
-
attributes: validXmlAttributes$
|
|
31117
|
+
encode: encode$6,
|
|
31118
|
+
decode: decode$8,
|
|
31119
|
+
attributes: validXmlAttributes$4
|
|
30918
31120
|
};
|
|
30919
|
-
const translator$
|
|
30920
|
-
const decode$
|
|
31121
|
+
const translator$6 = NodeTranslator.from(config$6);
|
|
31122
|
+
const decode$7 = (attrs) => attrs?.["w:id"];
|
|
30921
31123
|
const attrConfig = Object.freeze({
|
|
30922
31124
|
xmlName: "w:id",
|
|
30923
31125
|
sdName: "w:id",
|
|
30924
31126
|
// We do not translate it from 'w:id' to 'id' when encoding, so the name is the same
|
|
30925
31127
|
encode: () => {
|
|
30926
31128
|
},
|
|
30927
|
-
decode: decode$
|
|
31129
|
+
decode: decode$7
|
|
30928
31130
|
});
|
|
30929
|
-
const XML_NODE_NAME$
|
|
31131
|
+
const XML_NODE_NAME$6 = "w:commentRange";
|
|
30930
31132
|
const SD_NODE_NAME$4 = "commentRange";
|
|
30931
|
-
const decode$
|
|
31133
|
+
const decode$6 = (params) => {
|
|
30932
31134
|
const { node, comments, commentsExportType, exportedCommentDefs } = params;
|
|
30933
31135
|
if (!node) return;
|
|
30934
31136
|
if (!comments) return;
|
|
@@ -30971,19 +31173,19 @@ const getCommentSchema = (type2, commentIndex) => {
|
|
|
30971
31173
|
};
|
|
30972
31174
|
};
|
|
30973
31175
|
const getConfig = (type2) => ({
|
|
30974
|
-
xmlName: `${XML_NODE_NAME$
|
|
31176
|
+
xmlName: `${XML_NODE_NAME$6}${type2}`,
|
|
30975
31177
|
sdNodeOrKeyName: `${SD_NODE_NAME$4}${type2}`,
|
|
30976
31178
|
type: NodeTranslator.translatorTypes.NODE,
|
|
30977
31179
|
encode: () => {
|
|
30978
31180
|
},
|
|
30979
|
-
decode: decode$
|
|
31181
|
+
decode: decode$6,
|
|
30980
31182
|
attributes: [attrConfig]
|
|
30981
31183
|
});
|
|
30982
31184
|
const commentRangeStartTranslator = NodeTranslator.from(getConfig("Start"));
|
|
30983
31185
|
const commentRangeEndTranslator = NodeTranslator.from(getConfig("End"));
|
|
30984
|
-
const XML_NODE_NAME$
|
|
31186
|
+
const XML_NODE_NAME$5 = "sd:pageReference";
|
|
30985
31187
|
const SD_NODE_NAME$3 = "pageReference";
|
|
30986
|
-
const encode$
|
|
31188
|
+
const encode$5 = (params) => {
|
|
30987
31189
|
const { nodes = [], nodeListHandler } = params || {};
|
|
30988
31190
|
const node = nodes[0];
|
|
30989
31191
|
const processedText = nodeListHandler.handler({
|
|
@@ -31000,7 +31202,7 @@ const encode$3 = (params) => {
|
|
|
31000
31202
|
};
|
|
31001
31203
|
return processedNode;
|
|
31002
31204
|
};
|
|
31003
|
-
const decode$
|
|
31205
|
+
const decode$5 = (params) => {
|
|
31004
31206
|
const { node } = params;
|
|
31005
31207
|
const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
|
|
31006
31208
|
const contentNodes = (node.content ?? []).flatMap((n) => exportSchemaToJson({ ...params, node: n }));
|
|
@@ -31073,17 +31275,17 @@ const decode$3 = (params) => {
|
|
|
31073
31275
|
];
|
|
31074
31276
|
return translated;
|
|
31075
31277
|
};
|
|
31076
|
-
const config$
|
|
31077
|
-
xmlName: XML_NODE_NAME$
|
|
31278
|
+
const config$5 = {
|
|
31279
|
+
xmlName: XML_NODE_NAME$5,
|
|
31078
31280
|
sdNodeOrKeyName: SD_NODE_NAME$3,
|
|
31079
31281
|
type: NodeTranslator.translatorTypes.NODE,
|
|
31080
|
-
encode: encode$
|
|
31081
|
-
decode: decode$
|
|
31282
|
+
encode: encode$5,
|
|
31283
|
+
decode: decode$5
|
|
31082
31284
|
};
|
|
31083
|
-
const translator$
|
|
31084
|
-
const XML_NODE_NAME$
|
|
31285
|
+
const translator$5 = NodeTranslator.from(config$5);
|
|
31286
|
+
const XML_NODE_NAME$4 = "sd:tableOfContents";
|
|
31085
31287
|
const SD_NODE_NAME$2 = "tableOfContents";
|
|
31086
|
-
const encode$
|
|
31288
|
+
const encode$4 = (params) => {
|
|
31087
31289
|
const { nodes = [], nodeListHandler } = params || {};
|
|
31088
31290
|
const node = nodes[0];
|
|
31089
31291
|
const processedContent = nodeListHandler.handler({
|
|
@@ -31099,7 +31301,7 @@ const encode$2 = (params) => {
|
|
|
31099
31301
|
};
|
|
31100
31302
|
return processedNode;
|
|
31101
31303
|
};
|
|
31102
|
-
const decode$
|
|
31304
|
+
const decode$4 = (params) => {
|
|
31103
31305
|
const { node } = params;
|
|
31104
31306
|
const contentNodes = node.content.map((n) => exportSchemaToJson({ ...params, node: n }));
|
|
31105
31307
|
const tocBeginElements = [
|
|
@@ -31146,14 +31348,14 @@ const decode$2 = (params) => {
|
|
|
31146
31348
|
}
|
|
31147
31349
|
return contentNodes;
|
|
31148
31350
|
};
|
|
31149
|
-
const config$
|
|
31150
|
-
xmlName: XML_NODE_NAME$
|
|
31351
|
+
const config$4 = {
|
|
31352
|
+
xmlName: XML_NODE_NAME$4,
|
|
31151
31353
|
sdNodeOrKeyName: SD_NODE_NAME$2,
|
|
31152
31354
|
type: NodeTranslator.translatorTypes.NODE,
|
|
31153
|
-
encode: encode$
|
|
31154
|
-
decode: decode$
|
|
31355
|
+
encode: encode$4,
|
|
31356
|
+
decode: decode$4
|
|
31155
31357
|
};
|
|
31156
|
-
const translator$
|
|
31358
|
+
const translator$4 = NodeTranslator.from(config$4);
|
|
31157
31359
|
function parseInlineStyles(styleString) {
|
|
31158
31360
|
if (!styleString) return {};
|
|
31159
31361
|
return styleString.split(";").filter((style) => !!style.trim()).reduce((acc, style) => {
|
|
@@ -31287,7 +31489,7 @@ const handleDrawingNode = (params) => {
|
|
|
31287
31489
|
if (mainNode.name === "w:drawing") node = mainNode;
|
|
31288
31490
|
else node = mainNode.elements.find((el) => el.name === "w:drawing");
|
|
31289
31491
|
if (!node) return { nodes: [], consumed: 0 };
|
|
31290
|
-
const schemaNode = translator$
|
|
31492
|
+
const schemaNode = translator$9.encode(params);
|
|
31291
31493
|
const newNodes = schemaNode ? [schemaNode] : [];
|
|
31292
31494
|
return { nodes: newNodes, consumed: 1 };
|
|
31293
31495
|
};
|
|
@@ -31295,6 +31497,203 @@ const drawingNodeHandlerEntity = {
|
|
|
31295
31497
|
handlerName: "drawingNodeHandler",
|
|
31296
31498
|
handler: handleDrawingNode
|
|
31297
31499
|
};
|
|
31500
|
+
const createTrackStyleMark = (marks) => {
|
|
31501
|
+
const trackStyleMark = marks.find((mark) => mark.type === "trackFormat");
|
|
31502
|
+
if (trackStyleMark) {
|
|
31503
|
+
return {
|
|
31504
|
+
type: "element",
|
|
31505
|
+
name: "w:rPrChange",
|
|
31506
|
+
attributes: {
|
|
31507
|
+
"w:id": trackStyleMark.attrs.id,
|
|
31508
|
+
"w:author": trackStyleMark.attrs.author,
|
|
31509
|
+
"w:authorEmail": trackStyleMark.attrs.authorEmail,
|
|
31510
|
+
"w:date": trackStyleMark.attrs.date
|
|
31511
|
+
},
|
|
31512
|
+
elements: trackStyleMark.attrs.before.map((mark) => processOutputMarks([mark])).filter((r) => r !== void 0)
|
|
31513
|
+
};
|
|
31514
|
+
}
|
|
31515
|
+
return void 0;
|
|
31516
|
+
};
|
|
31517
|
+
const XML_NODE_NAME$3 = "w:del";
|
|
31518
|
+
const SD_ATTR_KEY$1 = "trackDelete";
|
|
31519
|
+
const validXmlAttributes$3 = [
|
|
31520
|
+
createAttributeHandler("w:id", "id"),
|
|
31521
|
+
createAttributeHandler("w:date", "date"),
|
|
31522
|
+
createAttributeHandler("w:author", "author"),
|
|
31523
|
+
createAttributeHandler("w:authorEmail", "authorEmail")
|
|
31524
|
+
];
|
|
31525
|
+
const encode$3 = (params, encodedAttrs = {}) => {
|
|
31526
|
+
const { nodeListHandler, extraParams = {} } = params;
|
|
31527
|
+
const { node } = extraParams;
|
|
31528
|
+
const subs = nodeListHandler.handler({
|
|
31529
|
+
...params,
|
|
31530
|
+
insideTrackChange: true,
|
|
31531
|
+
nodes: node.elements,
|
|
31532
|
+
path: [...params.path || [], node]
|
|
31533
|
+
});
|
|
31534
|
+
encodedAttrs.importedAuthor = `${encodedAttrs.author} (imported)`;
|
|
31535
|
+
subs.forEach((subElement) => {
|
|
31536
|
+
if (subElement.marks === void 0) subElement.marks = [];
|
|
31537
|
+
subElement.marks.push({ type: "trackDelete", attrs: encodedAttrs });
|
|
31538
|
+
});
|
|
31539
|
+
return subs;
|
|
31540
|
+
};
|
|
31541
|
+
function decode$3(params) {
|
|
31542
|
+
const { node } = params;
|
|
31543
|
+
if (!node || !node.type) {
|
|
31544
|
+
return null;
|
|
31545
|
+
}
|
|
31546
|
+
const trackingMarks = ["trackInsert", "trackFormat", "trackDelete"];
|
|
31547
|
+
const marks = node.marks;
|
|
31548
|
+
const trackedMark = marks.find((m2) => m2.type === "trackDelete");
|
|
31549
|
+
const trackStyleMark = createTrackStyleMark(marks);
|
|
31550
|
+
node.marks = marks.filter((m2) => !trackingMarks.includes(m2.type));
|
|
31551
|
+
if (trackStyleMark) {
|
|
31552
|
+
node.marks.push(trackStyleMark);
|
|
31553
|
+
}
|
|
31554
|
+
const translatedTextNode = exportSchemaToJson({ ...params, node });
|
|
31555
|
+
const textNode = translatedTextNode.elements.find((n) => n.name === "w:t");
|
|
31556
|
+
textNode.name = "w:delText";
|
|
31557
|
+
return {
|
|
31558
|
+
name: "w:del",
|
|
31559
|
+
attributes: {
|
|
31560
|
+
"w:id": trackedMark.attrs.id,
|
|
31561
|
+
"w:author": trackedMark.attrs.author,
|
|
31562
|
+
"w:authorEmail": trackedMark.attrs.authorEmail,
|
|
31563
|
+
"w:date": trackedMark.attrs.date
|
|
31564
|
+
},
|
|
31565
|
+
elements: [translatedTextNode]
|
|
31566
|
+
};
|
|
31567
|
+
}
|
|
31568
|
+
const config$3 = {
|
|
31569
|
+
xmlName: XML_NODE_NAME$3,
|
|
31570
|
+
sdNodeOrKeyName: SD_ATTR_KEY$1,
|
|
31571
|
+
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
31572
|
+
encode: encode$3,
|
|
31573
|
+
decode: decode$3,
|
|
31574
|
+
attributes: validXmlAttributes$3
|
|
31575
|
+
};
|
|
31576
|
+
const translator$3 = NodeTranslator.from(config$3);
|
|
31577
|
+
const XML_NODE_NAME$2 = "w:ins";
|
|
31578
|
+
const SD_ATTR_KEY = "trackInsert";
|
|
31579
|
+
const validXmlAttributes$2 = [
|
|
31580
|
+
createAttributeHandler("w:id", "id"),
|
|
31581
|
+
createAttributeHandler("w:date", "date"),
|
|
31582
|
+
createAttributeHandler("w:author", "author"),
|
|
31583
|
+
createAttributeHandler("w:authorEmail", "authorEmail")
|
|
31584
|
+
];
|
|
31585
|
+
const encode$2 = (params, encodedAttrs = {}) => {
|
|
31586
|
+
const { nodeListHandler, extraParams = {} } = params;
|
|
31587
|
+
const { node } = extraParams;
|
|
31588
|
+
const subs = nodeListHandler.handler({
|
|
31589
|
+
...params,
|
|
31590
|
+
insideTrackChange: true,
|
|
31591
|
+
nodes: node.elements,
|
|
31592
|
+
path: [...params.path || [], node]
|
|
31593
|
+
});
|
|
31594
|
+
encodedAttrs.importedAuthor = `${encodedAttrs.author} (imported)`;
|
|
31595
|
+
subs.forEach((subElement) => {
|
|
31596
|
+
if (subElement.marks === void 0) subElement.marks = [];
|
|
31597
|
+
subElement.marks.push({ type: "trackInsert", attrs: encodedAttrs });
|
|
31598
|
+
});
|
|
31599
|
+
return subs;
|
|
31600
|
+
};
|
|
31601
|
+
function decode$2(params) {
|
|
31602
|
+
const { node } = params;
|
|
31603
|
+
if (!node || !node.type) {
|
|
31604
|
+
return null;
|
|
31605
|
+
}
|
|
31606
|
+
const trackingMarks = ["trackInsert", "trackFormat", "trackDelete"];
|
|
31607
|
+
const marks = node.marks;
|
|
31608
|
+
const trackedMark = marks.find((m2) => m2.type === "trackInsert");
|
|
31609
|
+
const trackStyleMark = createTrackStyleMark(marks);
|
|
31610
|
+
node.marks = marks.filter((m2) => !trackingMarks.includes(m2.type));
|
|
31611
|
+
if (trackStyleMark) {
|
|
31612
|
+
node.marks.push(trackStyleMark);
|
|
31613
|
+
}
|
|
31614
|
+
const translatedTextNode = exportSchemaToJson({ ...params, node });
|
|
31615
|
+
return {
|
|
31616
|
+
name: "w:ins",
|
|
31617
|
+
attributes: {
|
|
31618
|
+
"w:id": trackedMark.attrs.id,
|
|
31619
|
+
"w:author": trackedMark.attrs.author,
|
|
31620
|
+
"w:authorEmail": trackedMark.attrs.authorEmail,
|
|
31621
|
+
"w:date": trackedMark.attrs.date
|
|
31622
|
+
},
|
|
31623
|
+
elements: [translatedTextNode]
|
|
31624
|
+
};
|
|
31625
|
+
}
|
|
31626
|
+
const config$2 = {
|
|
31627
|
+
xmlName: XML_NODE_NAME$2,
|
|
31628
|
+
sdNodeOrKeyName: SD_ATTR_KEY,
|
|
31629
|
+
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
31630
|
+
encode: encode$2,
|
|
31631
|
+
decode: decode$2,
|
|
31632
|
+
attributes: validXmlAttributes$2
|
|
31633
|
+
};
|
|
31634
|
+
const translator$2 = NodeTranslator.from(config$2);
|
|
31635
|
+
const isTrackChangeElement = (node) => node?.name === "w:del" || node?.name === "w:ins";
|
|
31636
|
+
const unwrapTrackChangeNode = (node) => {
|
|
31637
|
+
if (!node) {
|
|
31638
|
+
return null;
|
|
31639
|
+
}
|
|
31640
|
+
if (isTrackChangeElement(node)) {
|
|
31641
|
+
return node;
|
|
31642
|
+
}
|
|
31643
|
+
if (node.name === "w:sdt") {
|
|
31644
|
+
const content = node.elements?.find((element) => element.name === "w:sdtContent");
|
|
31645
|
+
if (!content?.elements?.length) {
|
|
31646
|
+
return null;
|
|
31647
|
+
}
|
|
31648
|
+
for (const child of content.elements) {
|
|
31649
|
+
const trackChange = unwrapTrackChangeNode(child);
|
|
31650
|
+
if (trackChange) {
|
|
31651
|
+
return trackChange;
|
|
31652
|
+
}
|
|
31653
|
+
}
|
|
31654
|
+
}
|
|
31655
|
+
return null;
|
|
31656
|
+
};
|
|
31657
|
+
const handleTrackChangeNode = (params) => {
|
|
31658
|
+
const { nodes } = params;
|
|
31659
|
+
if (nodes.length === 0) {
|
|
31660
|
+
return { nodes: [], consumed: 0 };
|
|
31661
|
+
}
|
|
31662
|
+
const mainNode = unwrapTrackChangeNode(nodes[0]);
|
|
31663
|
+
if (!mainNode) {
|
|
31664
|
+
return { nodes: [], consumed: 0 };
|
|
31665
|
+
}
|
|
31666
|
+
let result;
|
|
31667
|
+
const translatorParams = {
|
|
31668
|
+
...params,
|
|
31669
|
+
nodes: [mainNode]
|
|
31670
|
+
};
|
|
31671
|
+
switch (mainNode.name) {
|
|
31672
|
+
case "w:del":
|
|
31673
|
+
result = translator$3.encode({
|
|
31674
|
+
extraParams: {
|
|
31675
|
+
node: mainNode
|
|
31676
|
+
},
|
|
31677
|
+
...translatorParams
|
|
31678
|
+
});
|
|
31679
|
+
break;
|
|
31680
|
+
case "w:ins":
|
|
31681
|
+
result = translator$2.encode({
|
|
31682
|
+
extraParams: {
|
|
31683
|
+
node: mainNode
|
|
31684
|
+
},
|
|
31685
|
+
...translatorParams
|
|
31686
|
+
});
|
|
31687
|
+
break;
|
|
31688
|
+
}
|
|
31689
|
+
return { nodes: result, consumed: 1 };
|
|
31690
|
+
};
|
|
31691
|
+
const trackChangeNodeHandlerEntity = {
|
|
31692
|
+
handlerName: "trackChangeNodeHandler",
|
|
31693
|
+
handler: handleTrackChangeNode
|
|
31694
|
+
};
|
|
31695
|
+
const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$Z);
|
|
31696
|
+
const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$Y);
|
|
31298
31697
|
function parseProperties(node) {
|
|
31299
31698
|
const marks = [];
|
|
31300
31699
|
const unknownMarks = [];
|
|
@@ -31346,51 +31745,6 @@ function getElementName(element) {
|
|
|
31346
31745
|
const isPropertiesElement = (element) => {
|
|
31347
31746
|
return !!SuperConverter.propertyTypes[element.name || element.type];
|
|
31348
31747
|
};
|
|
31349
|
-
const handleTrackChangeNode = (params) => {
|
|
31350
|
-
const { nodes, nodeListHandler } = params;
|
|
31351
|
-
if (nodes.length === 0 || !(nodes[0].name === "w:del" || nodes[0].name === "w:ins" || nodes[0].name === "w:sdt")) {
|
|
31352
|
-
return { nodes: [], consumed: 0 };
|
|
31353
|
-
}
|
|
31354
|
-
const mainNode = nodes[0];
|
|
31355
|
-
let node;
|
|
31356
|
-
if (["w:ins", "w:del"].includes(mainNode.name)) {
|
|
31357
|
-
node = mainNode;
|
|
31358
|
-
} else {
|
|
31359
|
-
const sdtContent = mainNode.elements.find((el) => el.name === "w:sdtContent");
|
|
31360
|
-
const trackedChange = sdtContent?.elements.find((el) => ["w:ins", "w:del"].includes(el.name));
|
|
31361
|
-
if (trackedChange) node = trackedChange;
|
|
31362
|
-
}
|
|
31363
|
-
if (!node) {
|
|
31364
|
-
return { nodes: [], consumed: 0 };
|
|
31365
|
-
}
|
|
31366
|
-
const { name } = node;
|
|
31367
|
-
const { attributes, elements } = parseProperties(node);
|
|
31368
|
-
const subs = nodeListHandler.handler({
|
|
31369
|
-
...params,
|
|
31370
|
-
insideTrackChange: true,
|
|
31371
|
-
nodes: elements,
|
|
31372
|
-
path: [...params.path || [], node]
|
|
31373
|
-
});
|
|
31374
|
-
const changeType = name === "w:del" ? TrackDeleteMarkName : TrackInsertMarkName;
|
|
31375
|
-
const mappedAttributes = {
|
|
31376
|
-
id: attributes["w:id"],
|
|
31377
|
-
date: attributes["w:date"],
|
|
31378
|
-
author: attributes["w:author"],
|
|
31379
|
-
authorEmail: attributes["w:authorEmail"],
|
|
31380
|
-
importedAuthor: `${attributes["w:author"]} (imported)`
|
|
31381
|
-
};
|
|
31382
|
-
subs.forEach((subElement) => {
|
|
31383
|
-
if (subElement.marks === void 0) subElement.marks = [];
|
|
31384
|
-
subElement.marks.push({ type: changeType, attrs: mappedAttributes });
|
|
31385
|
-
});
|
|
31386
|
-
return { nodes: subs, consumed: 1 };
|
|
31387
|
-
};
|
|
31388
|
-
const trackChangeNodeHandlerEntity = {
|
|
31389
|
-
handlerName: "trackChangeNodeHandler",
|
|
31390
|
-
handler: handleTrackChangeNode
|
|
31391
|
-
};
|
|
31392
|
-
const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$X);
|
|
31393
|
-
const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$W);
|
|
31394
31748
|
const handleTextNode = (params) => {
|
|
31395
31749
|
const { nodes, insideTrackChange } = params;
|
|
31396
31750
|
if (nodes.length === 0 || !(nodes[0].name === "w:t" || insideTrackChange && nodes[0].name === "w:delText")) {
|
|
@@ -31431,7 +31785,7 @@ const handleParagraphNode = (params) => {
|
|
|
31431
31785
|
if (nodes.length === 0 || nodes[0].name !== "w:p") {
|
|
31432
31786
|
return { nodes: [], consumed: 0 };
|
|
31433
31787
|
}
|
|
31434
|
-
const schemaNode = translator$
|
|
31788
|
+
const schemaNode = translator$19.encode(params);
|
|
31435
31789
|
const newNodes = schemaNode ? [schemaNode] : [];
|
|
31436
31790
|
return { nodes: newNodes, consumed: 1 };
|
|
31437
31791
|
};
|
|
@@ -31444,7 +31798,7 @@ const handleSdtNode = (params) => {
|
|
|
31444
31798
|
if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
|
|
31445
31799
|
return { nodes: [], consumed: 0 };
|
|
31446
31800
|
}
|
|
31447
|
-
const result = translator$
|
|
31801
|
+
const result = translator$8.encode(params);
|
|
31448
31802
|
if (!result) {
|
|
31449
31803
|
return { nodes: [], consumed: 0 };
|
|
31450
31804
|
}
|
|
@@ -31534,7 +31888,7 @@ const handler = (params) => {
|
|
|
31534
31888
|
if (nodes.length === 0 || nodes[0].name !== "w:br") {
|
|
31535
31889
|
return { nodes: [], consumed: 0 };
|
|
31536
31890
|
}
|
|
31537
|
-
const result = translator$
|
|
31891
|
+
const result = translator$1c.encode(params);
|
|
31538
31892
|
if (!result) return { nodes: [], consumed: 0 };
|
|
31539
31893
|
return {
|
|
31540
31894
|
nodes: [result],
|
|
@@ -31606,7 +31960,7 @@ const handleBookmarkStartNode = (params) => {
|
|
|
31606
31960
|
if (isCustomMarkBookmark(nodes[0], params.editor)) {
|
|
31607
31961
|
return handleBookmarkNode(params);
|
|
31608
31962
|
}
|
|
31609
|
-
const node = translator$
|
|
31963
|
+
const node = translator$7.encode(params);
|
|
31610
31964
|
if (!node) return { nodes: [], consumed: 0 };
|
|
31611
31965
|
return { nodes: [node], consumed: 1 };
|
|
31612
31966
|
};
|
|
@@ -31638,7 +31992,7 @@ const handleBookmarkEndNode = (params) => {
|
|
|
31638
31992
|
if (!nodes.length || nodes[0].name !== "w:bookmarkEnd") {
|
|
31639
31993
|
return { nodes: [], consumed: 0 };
|
|
31640
31994
|
}
|
|
31641
|
-
const node = translator$
|
|
31995
|
+
const node = translator$6.encode(params);
|
|
31642
31996
|
if (!node) return { nodes: [], consumed: 0 };
|
|
31643
31997
|
return { nodes: [node], consumed: 1 };
|
|
31644
31998
|
};
|
|
@@ -31771,7 +32125,7 @@ const autoTotalPageCountEntity = {
|
|
|
31771
32125
|
handlerName: "autoTotalPageCountEntity",
|
|
31772
32126
|
handler: handleAutoTotalPageNumber
|
|
31773
32127
|
};
|
|
31774
|
-
const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$
|
|
32128
|
+
const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$5);
|
|
31775
32129
|
const handlePictNode = (params) => {
|
|
31776
32130
|
const { nodes } = params;
|
|
31777
32131
|
if (!nodes.length || nodes[0].name !== "w:p") {
|
|
@@ -32160,14 +32514,14 @@ const handleTabNode = (params) => {
|
|
|
32160
32514
|
if (!nodes.length || nodes[0].name !== "w:tab") {
|
|
32161
32515
|
return { nodes: [], consumed: 0 };
|
|
32162
32516
|
}
|
|
32163
|
-
const node = translator$
|
|
32517
|
+
const node = translator$1a.encode(params);
|
|
32164
32518
|
return { nodes: [node], consumed: 1 };
|
|
32165
32519
|
};
|
|
32166
32520
|
const tabNodeEntityHandler = {
|
|
32167
32521
|
handlerName: "w:tabTranslator",
|
|
32168
32522
|
handler: handleTabNode
|
|
32169
32523
|
};
|
|
32170
|
-
const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$
|
|
32524
|
+
const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$4);
|
|
32171
32525
|
function preProcessPageInstruction(nodesToCombine) {
|
|
32172
32526
|
const pageNumNode = {
|
|
32173
32527
|
name: "sd:autoPageNumber",
|
|
@@ -33216,35 +33570,35 @@ function exportSchemaToJson(params) {
|
|
|
33216
33570
|
doc: translateDocumentNode,
|
|
33217
33571
|
body: translateBodyNode,
|
|
33218
33572
|
heading: translateHeadingNode,
|
|
33219
|
-
paragraph: translator$
|
|
33220
|
-
run: translator$
|
|
33573
|
+
paragraph: translator$19,
|
|
33574
|
+
run: translator$Y,
|
|
33221
33575
|
text: translateTextNode,
|
|
33222
33576
|
bulletList: translateList,
|
|
33223
33577
|
orderedList: translateList,
|
|
33224
|
-
lineBreak: translator$
|
|
33225
|
-
table: translator$
|
|
33226
|
-
tableRow: translator$
|
|
33227
|
-
tableCell: translator$
|
|
33228
|
-
bookmarkStart: translator$
|
|
33229
|
-
bookmarkEnd: translator$
|
|
33230
|
-
fieldAnnotation: translator$
|
|
33231
|
-
tab: translator$
|
|
33232
|
-
image: translator$
|
|
33233
|
-
hardBreak: translator$
|
|
33578
|
+
lineBreak: translator$1c,
|
|
33579
|
+
table: translator$d,
|
|
33580
|
+
tableRow: translator$K,
|
|
33581
|
+
tableCell: translator$c,
|
|
33582
|
+
bookmarkStart: translator$7,
|
|
33583
|
+
bookmarkEnd: translator$6,
|
|
33584
|
+
fieldAnnotation: translator$8,
|
|
33585
|
+
tab: translator$1a,
|
|
33586
|
+
image: translator$9,
|
|
33587
|
+
hardBreak: translator$1c,
|
|
33234
33588
|
commentRangeStart: commentRangeStartTranslator,
|
|
33235
33589
|
commentRangeEnd: commentRangeEndTranslator,
|
|
33236
33590
|
commentReference: () => null,
|
|
33237
33591
|
shapeContainer: translator,
|
|
33238
33592
|
shapeTextbox: translator,
|
|
33239
33593
|
contentBlock: translator,
|
|
33240
|
-
structuredContent: translator$
|
|
33241
|
-
structuredContentBlock: translator$
|
|
33242
|
-
documentPartObject: translator$
|
|
33243
|
-
documentSection: translator$
|
|
33594
|
+
structuredContent: translator$8,
|
|
33595
|
+
structuredContentBlock: translator$8,
|
|
33596
|
+
documentPartObject: translator$8,
|
|
33597
|
+
documentSection: translator$8,
|
|
33244
33598
|
"page-number": translatePageNumberNode,
|
|
33245
33599
|
"total-page-number": translateTotalPageNumberNode,
|
|
33246
|
-
pageReference: translator$
|
|
33247
|
-
tableOfContents: translator$
|
|
33600
|
+
pageReference: translator$5,
|
|
33601
|
+
tableOfContents: translator$4
|
|
33248
33602
|
};
|
|
33249
33603
|
let handler2 = router[type2];
|
|
33250
33604
|
if (handler2 && "decode" in handler2 && typeof handler2.decode === "function") {
|
|
@@ -33578,59 +33932,23 @@ function getTextNodeForExport(text, marks, params) {
|
|
|
33578
33932
|
return wrapTextInRun(textNodes, outputMarks);
|
|
33579
33933
|
}
|
|
33580
33934
|
function translateTextNode(params) {
|
|
33581
|
-
const { node } = params;
|
|
33935
|
+
const { node, extraParams } = params;
|
|
33582
33936
|
const trackedMarks = [TrackInsertMarkName, TrackDeleteMarkName];
|
|
33583
|
-
const
|
|
33584
|
-
if (
|
|
33585
|
-
|
|
33586
|
-
|
|
33587
|
-
|
|
33588
|
-
|
|
33589
|
-
|
|
33590
|
-
|
|
33591
|
-
const markElement = {
|
|
33592
|
-
type: "element",
|
|
33593
|
-
name: "w:rPrChange",
|
|
33594
|
-
attributes: {
|
|
33595
|
-
"w:id": trackStyleMark.attrs.id,
|
|
33596
|
-
"w:author": trackStyleMark.attrs.author,
|
|
33597
|
-
"w:authorEmail": trackStyleMark.attrs.authorEmail,
|
|
33598
|
-
"w:date": trackStyleMark.attrs.date
|
|
33599
|
-
},
|
|
33600
|
-
elements: trackStyleMark.attrs.before.map((mark) => processOutputMarks([mark])).filter((r) => r !== void 0)
|
|
33601
|
-
};
|
|
33602
|
-
return markElement;
|
|
33603
|
-
}
|
|
33604
|
-
return void 0;
|
|
33605
|
-
}
|
|
33606
|
-
function translateTrackedNode(params) {
|
|
33607
|
-
const { node } = params;
|
|
33608
|
-
const marks = node.marks;
|
|
33609
|
-
const trackingMarks = [TrackInsertMarkName, TrackDeleteMarkName, TrackFormatMarkName];
|
|
33610
|
-
const trackedMark = marks.find((m2) => trackingMarks.includes(m2.type));
|
|
33611
|
-
const isInsert = trackedMark.type === TrackInsertMarkName;
|
|
33612
|
-
const trackStyleMark = createTrackStyleMark(marks);
|
|
33613
|
-
node.marks = marks.filter((m2) => !trackingMarks.includes(m2.type));
|
|
33614
|
-
if (trackStyleMark) {
|
|
33615
|
-
node.marks.push(trackStyleMark);
|
|
33937
|
+
const trackedMark = node.marks?.find((m2) => trackedMarks.includes(m2.type));
|
|
33938
|
+
if (trackedMark) {
|
|
33939
|
+
switch (trackedMark.type) {
|
|
33940
|
+
case "trackDelete":
|
|
33941
|
+
return translator$3.decode(params);
|
|
33942
|
+
case "trackInsert":
|
|
33943
|
+
return translator$2.decode(params);
|
|
33944
|
+
}
|
|
33616
33945
|
}
|
|
33617
|
-
const
|
|
33618
|
-
if (!
|
|
33619
|
-
|
|
33620
|
-
textNode.name = "w:delText";
|
|
33946
|
+
const isLinkNode = node.marks?.some((m2) => m2.type === "link");
|
|
33947
|
+
if (isLinkNode && !extraParams?.linkProcessed) {
|
|
33948
|
+
return translator$Z.decode(params);
|
|
33621
33949
|
}
|
|
33622
|
-
const
|
|
33623
|
-
|
|
33624
|
-
type: "element",
|
|
33625
|
-
attributes: {
|
|
33626
|
-
"w:id": trackedMark.attrs.id,
|
|
33627
|
-
"w:author": trackedMark.attrs.author,
|
|
33628
|
-
"w:authorEmail": trackedMark.attrs.authorEmail,
|
|
33629
|
-
"w:date": trackedMark.attrs.date
|
|
33630
|
-
},
|
|
33631
|
-
elements: [translatedTextNode]
|
|
33632
|
-
};
|
|
33633
|
-
return trackedNode;
|
|
33950
|
+
const { text, marks = [] } = node;
|
|
33951
|
+
return getTextNodeForExport(text, marks, params);
|
|
33634
33952
|
}
|
|
33635
33953
|
function wrapTextInRun(nodeOrNodes, marks) {
|
|
33636
33954
|
let elements = [];
|
|
@@ -33887,7 +34205,7 @@ function translateMark(mark) {
|
|
|
33887
34205
|
markElement.type = "element";
|
|
33888
34206
|
break;
|
|
33889
34207
|
case "underline": {
|
|
33890
|
-
const translated = translator$
|
|
34208
|
+
const translated = translator$16.decode({
|
|
33891
34209
|
node: {
|
|
33892
34210
|
attrs: {
|
|
33893
34211
|
underlineType: attrs.underlineType ?? attrs.underline ?? null,
|
|
@@ -33951,9 +34269,11 @@ function translateMark(mark) {
|
|
|
33951
34269
|
break;
|
|
33952
34270
|
case "highlight": {
|
|
33953
34271
|
const highlightValue = attrs.color ?? attrs.highlight ?? null;
|
|
33954
|
-
const translated = translator$
|
|
34272
|
+
const translated = translator$1b.decode({ node: { attrs: { highlight: highlightValue } } });
|
|
33955
34273
|
return translated || {};
|
|
33956
34274
|
}
|
|
34275
|
+
case "link":
|
|
34276
|
+
return {};
|
|
33957
34277
|
}
|
|
33958
34278
|
return markElement;
|
|
33959
34279
|
}
|
|
@@ -35083,7 +35403,7 @@ export {
|
|
|
35083
35403
|
objectIncludes as Z,
|
|
35084
35404
|
AddMarkStep as _,
|
|
35085
35405
|
Plugin as a,
|
|
35086
|
-
translator$
|
|
35406
|
+
translator$E as a$,
|
|
35087
35407
|
twipsToLines as a0,
|
|
35088
35408
|
pixelsToTwips as a1,
|
|
35089
35409
|
helpers as a2,
|
|
@@ -35094,33 +35414,33 @@ export {
|
|
|
35094
35414
|
createDocFromMarkdown as a7,
|
|
35095
35415
|
createDocFromHTML as a8,
|
|
35096
35416
|
EditorState as a9,
|
|
35097
|
-
|
|
35098
|
-
|
|
35099
|
-
|
|
35100
|
-
|
|
35101
|
-
|
|
35102
|
-
|
|
35103
|
-
|
|
35104
|
-
|
|
35105
|
-
|
|
35106
|
-
translator$
|
|
35107
|
-
translator$
|
|
35108
|
-
translator$
|
|
35109
|
-
translator$
|
|
35110
|
-
translator$
|
|
35111
|
-
translator$
|
|
35112
|
-
translator$
|
|
35113
|
-
translator$
|
|
35114
|
-
translator$
|
|
35115
|
-
translator$
|
|
35116
|
-
translator$
|
|
35117
|
-
translator$
|
|
35118
|
-
translator$
|
|
35119
|
-
translator$
|
|
35120
|
-
translator$
|
|
35121
|
-
translator$
|
|
35122
|
-
translator$
|
|
35123
|
-
translator$
|
|
35417
|
+
xmljs as aA,
|
|
35418
|
+
vClickOutside as aB,
|
|
35419
|
+
getActiveFormatting as aC,
|
|
35420
|
+
readFromClipboard as aD,
|
|
35421
|
+
handleClipboardPaste as aE,
|
|
35422
|
+
getFileObject as aF,
|
|
35423
|
+
runPropertyTranslators as aG,
|
|
35424
|
+
commentRangeEndTranslator as aH,
|
|
35425
|
+
commentRangeStartTranslator as aI,
|
|
35426
|
+
translator$a as aJ,
|
|
35427
|
+
translator$b as aK,
|
|
35428
|
+
translator$M as aL,
|
|
35429
|
+
translator$N as aM,
|
|
35430
|
+
translator$16 as aN,
|
|
35431
|
+
translator$L as aO,
|
|
35432
|
+
translator$O as aP,
|
|
35433
|
+
translator$K as aQ,
|
|
35434
|
+
translator$k as aR,
|
|
35435
|
+
translator$c as aS,
|
|
35436
|
+
translator$x as aT,
|
|
35437
|
+
translator$y as aU,
|
|
35438
|
+
translator$z as aV,
|
|
35439
|
+
translator$A as aW,
|
|
35440
|
+
translator$B as aX,
|
|
35441
|
+
translator$g as aY,
|
|
35442
|
+
translator$C as aZ,
|
|
35443
|
+
translator$D as a_,
|
|
35124
35444
|
hasSomeParentWithClass as aa,
|
|
35125
35445
|
isActive as ab,
|
|
35126
35446
|
unflattenListsInHtml as ac,
|
|
@@ -35143,59 +35463,60 @@ export {
|
|
|
35143
35463
|
isInTable as at,
|
|
35144
35464
|
generateDocxRandomId as au,
|
|
35145
35465
|
insertNewRelationship as av,
|
|
35146
|
-
|
|
35147
|
-
|
|
35148
|
-
|
|
35149
|
-
|
|
35466
|
+
inchesToPixels as aw,
|
|
35467
|
+
commonjsGlobal as ax,
|
|
35468
|
+
getDefaultExportFromCjs$2 as ay,
|
|
35469
|
+
getContentTypesFromXml as az,
|
|
35150
35470
|
Slice as b,
|
|
35151
|
-
translator$
|
|
35152
|
-
translator$
|
|
35153
|
-
translator$
|
|
35154
|
-
translator$
|
|
35155
|
-
translator$
|
|
35156
|
-
translator$
|
|
35157
|
-
translator$
|
|
35158
|
-
translator$
|
|
35159
|
-
translator$
|
|
35160
|
-
translator$
|
|
35161
|
-
translator$
|
|
35162
|
-
translator$
|
|
35163
|
-
translator$
|
|
35164
|
-
translator$
|
|
35165
|
-
translator$
|
|
35166
|
-
translator$
|
|
35167
|
-
translator$
|
|
35168
|
-
translator$
|
|
35169
|
-
translator$
|
|
35170
|
-
translator$
|
|
35171
|
-
translator$
|
|
35172
|
-
|
|
35173
|
-
|
|
35174
|
-
translator$
|
|
35175
|
-
translator$
|
|
35176
|
-
translator$
|
|
35177
|
-
translator$
|
|
35178
|
-
translator$
|
|
35179
|
-
translator$
|
|
35180
|
-
translator$
|
|
35181
|
-
translator$
|
|
35182
|
-
translator$
|
|
35183
|
-
translator$
|
|
35184
|
-
translator$
|
|
35185
|
-
translator$
|
|
35186
|
-
translator$
|
|
35187
|
-
translator$
|
|
35188
|
-
translator$
|
|
35189
|
-
translator$
|
|
35190
|
-
translator$
|
|
35191
|
-
translator$
|
|
35192
|
-
translator$
|
|
35193
|
-
translator$
|
|
35194
|
-
translator$
|
|
35195
|
-
translator$
|
|
35196
|
-
translator$
|
|
35197
|
-
translator$
|
|
35198
|
-
translator$
|
|
35471
|
+
translator$F as b0,
|
|
35472
|
+
translator$P as b1,
|
|
35473
|
+
translator$e as b2,
|
|
35474
|
+
translator$G as b3,
|
|
35475
|
+
translator$Q as b4,
|
|
35476
|
+
translator$h as b5,
|
|
35477
|
+
translator$H as b6,
|
|
35478
|
+
translator$i as b7,
|
|
35479
|
+
translator$d as b8,
|
|
35480
|
+
translator$1a as b9,
|
|
35481
|
+
translator$14 as bA,
|
|
35482
|
+
translator$W as bB,
|
|
35483
|
+
translator$X as bC,
|
|
35484
|
+
translator$1c as bD,
|
|
35485
|
+
translator$w as bE,
|
|
35486
|
+
translator$7 as bF,
|
|
35487
|
+
translator$6 as bG,
|
|
35488
|
+
translator$J as bH,
|
|
35489
|
+
translator$18 as bI,
|
|
35490
|
+
translator$4 as bJ,
|
|
35491
|
+
translator$5 as bK,
|
|
35492
|
+
translator$1 as bL,
|
|
35493
|
+
_sfc_main as bM,
|
|
35494
|
+
translator$10 as ba,
|
|
35495
|
+
translator$11 as bb,
|
|
35496
|
+
translator$15 as bc,
|
|
35497
|
+
translator$m as bd,
|
|
35498
|
+
translator$I as be,
|
|
35499
|
+
translator$8 as bf,
|
|
35500
|
+
translator$o as bg,
|
|
35501
|
+
translator$12 as bh,
|
|
35502
|
+
translator$_ as bi,
|
|
35503
|
+
translator$13 as bj,
|
|
35504
|
+
translator$Y as bk,
|
|
35505
|
+
translator$19 as bl,
|
|
35506
|
+
translator$q as bm,
|
|
35507
|
+
translator$R as bn,
|
|
35508
|
+
translator$r as bo,
|
|
35509
|
+
translator$s as bp,
|
|
35510
|
+
translator$17 as bq,
|
|
35511
|
+
translator$Z as br,
|
|
35512
|
+
translator$1b as bs,
|
|
35513
|
+
translator$S as bt,
|
|
35514
|
+
translator$f as bu,
|
|
35515
|
+
translator$T as bv,
|
|
35516
|
+
translator$U as bw,
|
|
35517
|
+
translator$u as bx,
|
|
35518
|
+
translator$9 as by,
|
|
35519
|
+
translator$V as bz,
|
|
35199
35520
|
DOMParser$1 as c,
|
|
35200
35521
|
Mark as d,
|
|
35201
35522
|
dropPoint as e,
|