@harbour-enterprises/superdoc 0.24.0-next.2 → 0.24.0-next.4

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.
Files changed (82) hide show
  1. package/dist/chunks/{PdfViewer--Z8scsXq.es.js → PdfViewer-D7C8g2G4.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-CYiJzT44.cjs → PdfViewer-kOVuv-4I.cjs} +1 -1
  3. package/dist/chunks/blank-docx-ABm6XYAA.es.js +4 -0
  4. package/dist/chunks/blank-docx-DfW3Eeh2.cjs +3 -0
  5. package/dist/chunks/{index-CBSXpA57.cjs → index-BFKwBQjS.cjs} +12 -4
  6. package/dist/chunks/{index-CCf_X9Jy.es.js → index-CnEAVnHQ.es.js} +12 -4
  7. package/dist/chunks/{super-editor.es-CZFQdEKI.cjs → super-editor.es-BmGTQ05x.cjs} +1954 -1216
  8. package/dist/chunks/{super-editor.es-BFco6Gra.es.js → super-editor.es-CBPoWvjs.es.js} +1954 -1216
  9. package/dist/core/SuperDoc.d.ts.map +1 -1
  10. package/dist/core/types/index.d.ts.map +1 -1
  11. package/dist/style.css +32 -31
  12. package/dist/super-editor/ai-writer.es.js +2 -2
  13. package/dist/super-editor/chunks/{converter-nWAUAQ83.js → converter-DpPj67OW.js} +1537 -1175
  14. package/dist/super-editor/chunks/{docx-zipper-B2uMUaj9.js → docx-zipper-6Kc95yG-.js} +1 -1
  15. package/dist/super-editor/chunks/{editor-DAyiX5AL.js → editor-Dx6AhT5N.js} +454 -57
  16. package/dist/super-editor/chunks/{toolbar-LmzuO_YJ.js → toolbar-CXSg2lJ9.js} +2 -2
  17. package/dist/super-editor/converter.es.js +1 -1
  18. package/dist/super-editor/docx-zipper.es.js +2 -2
  19. package/dist/super-editor/editor.es.js +3 -3
  20. package/dist/super-editor/file-zipper.es.js +1 -1
  21. package/dist/super-editor/style.css +5 -4
  22. package/dist/super-editor/super-editor/src/core/Editor.d.ts +11 -0
  23. package/dist/super-editor/super-editor/src/core/helpers/canRenderFont.d.ts +12 -0
  24. package/dist/super-editor/super-editor/src/core/super-converter/SuperConverter.d.ts +6 -1
  25. package/dist/super-editor/super-editor/src/core/super-converter/helpers.d.ts +23 -1
  26. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/docxImporter.d.ts +3 -1
  27. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/tableImporter.d.ts +5 -3
  28. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/trackChangesImporter.d.ts +5 -0
  29. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/types/index.d.ts +5 -0
  30. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/helpers.d.ts +1 -0
  31. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/utils.d.ts +9 -0
  32. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/del/del-translator.d.ts +7 -0
  33. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/del/index.d.ts +1 -0
  34. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/gridSpan/gridSpan-translator.d.ts +6 -0
  35. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/gridSpan/index.d.ts +1 -0
  36. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/header/header-translator.d.ts +6 -0
  37. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/header/index.d.ts +1 -0
  38. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/headers/headers-translator.d.ts +7 -0
  39. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/headers/index.d.ts +1 -0
  40. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/hideMark/hideMark-translator.d.ts +6 -0
  41. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/hideMark/index.d.ts +1 -0
  42. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ins/index.d.ts +1 -0
  43. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ins/ins-translator.d.ts +7 -0
  44. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/noWrap/index.d.ts +1 -0
  45. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/noWrap/noWrap-translator.d.ts +6 -0
  46. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/shd/shd-translator.d.ts +1 -1
  47. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tc/helpers/translate-table-cell.d.ts +0 -5
  48. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcBorders/index.d.ts +1 -0
  49. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcBorders/tcBorders-translator.d.ts +6 -0
  50. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcFitText/index.d.ts +1 -0
  51. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcFitText/tcFitText-translator.d.ts +6 -0
  52. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcMar/index.d.ts +1 -0
  53. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcMar/tcMar-translator.d.ts +6 -0
  54. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcPr/index.d.ts +1 -0
  55. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcPr/tcPr-translator.d.ts +5 -0
  56. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcW/index.d.ts +1 -0
  57. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcW/tcW-translator.d.ts +6 -0
  58. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/textDirection/index.d.ts +1 -0
  59. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/textDirection/textDirection-translator.d.ts +6 -0
  60. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tl2br/index.d.ts +1 -0
  61. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tl2br/tl2br-translator.d.ts +6 -0
  62. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tr2bl/index.d.ts +1 -0
  63. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tr2bl/tr2bl-translator.d.ts +6 -0
  64. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/vAlign/index.d.ts +1 -0
  65. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/vAlign/vAlign-translator.d.ts +6 -0
  66. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/vMerge/index.d.ts +1 -0
  67. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/vMerge/vMerge-translator.d.ts +6 -0
  68. package/dist/super-editor/super-editor/src/extensions/image/image.d.ts +1 -1
  69. package/dist/super-editor/super-editor/src/extensions/image/imageHelpers/index.d.ts +1 -0
  70. package/dist/super-editor/super-editor/src/extensions/image/imageHelpers/legacyAttributes.d.ts +17 -0
  71. package/dist/super-editor/super-editor/src/extensions/table-cell/table-cell.d.ts +112 -0
  72. package/dist/super-editor/super-editor.es.js +91 -76
  73. package/dist/super-editor/toolbar.es.js +2 -2
  74. package/dist/super-editor.cjs +1 -1
  75. package/dist/super-editor.es.js +1 -1
  76. package/dist/superdoc.cjs +3 -3
  77. package/dist/superdoc.es.js +3 -3
  78. package/dist/superdoc.umd.js +1964 -1218
  79. package/dist/superdoc.umd.js.map +1 -1
  80. package/package.json +1 -1
  81. package/dist/chunks/blank-docx-CPqX9RF5.cjs +0 -3
  82. package/dist/chunks/blank-docx-iwdyG9RH.es.js +0 -4
@@ -15090,14 +15090,21 @@ function twipsToInches(twips) {
15090
15090
  function twipsToPixels(twips) {
15091
15091
  if (twips == null) return;
15092
15092
  const inches = twipsToInches(twips);
15093
+ return inchesToPixels(inches);
15094
+ }
15095
+ function pixelsToTwips(pixels) {
15096
+ const inches = pixelsToInches(pixels);
15097
+ return inchesToTwips(inches);
15098
+ }
15099
+ function inchesToPixels(inches) {
15093
15100
  if (inches == null) return;
15094
15101
  const pixels = inches * 96;
15095
15102
  return Math.round(pixels * 1e3) / 1e3;
15096
15103
  }
15097
- function pixelsToTwips(pixels) {
15104
+ function pixelsToInches(pixels) {
15098
15105
  if (pixels == null) return;
15099
15106
  const inches = Number(pixels) / 96;
15100
- return inchesToTwips(inches);
15107
+ return inches;
15101
15108
  }
15102
15109
  function twipsToLines(twips) {
15103
15110
  if (twips == null) return;
@@ -15122,9 +15129,9 @@ function pixelsToEmu(px) {
15122
15129
  if (typeof px === "string") px = parseFloat(px);
15123
15130
  return Math.round(px * 9525);
15124
15131
  }
15125
- function eigthPointsToPixels(eigthPoints) {
15126
- if (eigthPoints == null) return;
15127
- const points = parseFloat(eigthPoints) / 8;
15132
+ function eighthPointsToPixels(eighthPoints) {
15133
+ if (eighthPoints == null) return;
15134
+ const points = parseFloat(eighthPoints) / 8;
15128
15135
  const pixels = points * 1.3333;
15129
15136
  return pixels;
15130
15137
  }
@@ -15148,6 +15155,71 @@ function degreesToRot(degrees) {
15148
15155
  if (degrees == null) return;
15149
15156
  return degrees * 6e4;
15150
15157
  }
15158
+ function pixelsToPolygonUnits(pixels) {
15159
+ if (pixels == null) return;
15160
+ const pu = pixels * 96;
15161
+ return Math.round(pu);
15162
+ }
15163
+ function polygonUnitsToPixels(pu) {
15164
+ if (pu == null) return;
15165
+ const pixels = Number(pu) / 96;
15166
+ return Math.round(pixels * 1e3) / 1e3;
15167
+ }
15168
+ function polygonToObj(polygonNode) {
15169
+ if (!polygonNode) return null;
15170
+ const points = [];
15171
+ polygonNode.elements.forEach((element) => {
15172
+ if (["wp:start", "wp:lineTo"].includes(element.name)) {
15173
+ const { x, y: y2 } = element.attributes;
15174
+ points.push([polygonUnitsToPixels(x), polygonUnitsToPixels(y2)]);
15175
+ }
15176
+ });
15177
+ if (points.length > 1) {
15178
+ const firstPoint = points[0];
15179
+ const lastPoint = points[points.length - 1];
15180
+ if (firstPoint[0] === lastPoint[0] && firstPoint[1] === lastPoint[1]) {
15181
+ points.pop();
15182
+ }
15183
+ }
15184
+ return points;
15185
+ }
15186
+ function objToPolygon(points) {
15187
+ if (!points || !Array.isArray(points)) return null;
15188
+ const polygonNode = {
15189
+ name: "wp:wrapPolygon",
15190
+ type: "wp:wrapPolygon",
15191
+ attributes: {
15192
+ edited: "0"
15193
+ },
15194
+ elements: []
15195
+ };
15196
+ points.forEach((point, index2) => {
15197
+ const [x, y2] = point;
15198
+ const tagName = index2 === 0 ? "wp:start" : "wp:lineTo";
15199
+ const pointNode = {
15200
+ name: tagName,
15201
+ type: tagName,
15202
+ attributes: {
15203
+ x: pixelsToPolygonUnits(x),
15204
+ y: pixelsToPolygonUnits(y2)
15205
+ }
15206
+ };
15207
+ polygonNode.elements.push(pointNode);
15208
+ });
15209
+ if (points.length > 0) {
15210
+ const [startX, startY] = points[0];
15211
+ const closePointNode = {
15212
+ name: "wp:lineTo",
15213
+ type: "wp:lineTo",
15214
+ attributes: {
15215
+ x: pixelsToPolygonUnits(startX),
15216
+ y: pixelsToPolygonUnits(startY)
15217
+ }
15218
+ };
15219
+ polygonNode.elements.push(closePointNode);
15220
+ }
15221
+ return polygonNode;
15222
+ }
15151
15223
  const getTextIndentExportValue = (indent) => {
15152
15224
  const [value, unit] = parseSizeUnit(indent);
15153
15225
  const functionsMap = {
@@ -24463,37 +24535,37 @@ const _NodeTranslator = class _NodeTranslator2 {
24463
24535
  };
24464
24536
  __publicField$2(_NodeTranslator, "translatorTypes", TranslatorTypes);
24465
24537
  let NodeTranslator = _NodeTranslator;
24466
- const encode$1c = (attributes) => {
24538
+ const encode$1b = (attributes) => {
24467
24539
  return attributes["w:type"];
24468
24540
  };
24469
- const decode$14 = (attrs) => {
24541
+ const decode$13 = (attrs) => {
24470
24542
  const { lineBreakType } = attrs;
24471
24543
  return lineBreakType;
24472
24544
  };
24473
24545
  const attrConfig$G = Object.freeze({
24474
24546
  xmlName: "w:type",
24475
24547
  sdName: "lineBreakType",
24476
- encode: encode$1c,
24477
- decode: decode$14
24548
+ encode: encode$1b,
24549
+ decode: decode$13
24478
24550
  });
24479
- const encode$1b = (attributes) => {
24551
+ const encode$1a = (attributes) => {
24480
24552
  const xmlAttrValue = attributes["w:clear"];
24481
24553
  return xmlAttrValue;
24482
24554
  };
24483
- const decode$13 = (attrs) => {
24555
+ const decode$12 = (attrs) => {
24484
24556
  const { clear } = attrs;
24485
24557
  return clear;
24486
24558
  };
24487
24559
  const attrConfig$F = Object.freeze({
24488
24560
  xmlName: "w:clear",
24489
24561
  sdName: "clear",
24490
- encode: encode$1b,
24491
- decode: decode$13
24562
+ encode: encode$1a,
24563
+ decode: decode$12
24492
24564
  });
24493
- const validXmlAttributes$n = [attrConfig$G, attrConfig$F];
24494
- const XML_NODE_NAME$z = "w:br";
24565
+ const validXmlAttributes$p = [attrConfig$G, attrConfig$F];
24566
+ const XML_NODE_NAME$y = "w:br";
24495
24567
  const SD_NODE_NAME$h = "lineBreak";
24496
- const encode$1a = (_2, encodedAttrs) => {
24568
+ const encode$19 = (_2, encodedAttrs) => {
24497
24569
  const isPageBreak = encodedAttrs?.lineBreakType === "page";
24498
24570
  const translated = {
24499
24571
  type: isPageBreak ? "hardBreak" : "lineBreak"
@@ -24503,7 +24575,7 @@ const encode$1a = (_2, encodedAttrs) => {
24503
24575
  }
24504
24576
  return translated;
24505
24577
  };
24506
- const decode$12 = (params2, decodedAttrs) => {
24578
+ const decode$11 = (params2, decodedAttrs) => {
24507
24579
  const { node } = params2;
24508
24580
  if (!node) return;
24509
24581
  const wBreak = { name: "w:br" };
@@ -24520,39 +24592,39 @@ const decode$12 = (params2, decodedAttrs) => {
24520
24592
  };
24521
24593
  return translated;
24522
24594
  };
24523
- const config$w = {
24524
- xmlName: XML_NODE_NAME$z,
24595
+ const config$x = {
24596
+ xmlName: XML_NODE_NAME$y,
24525
24597
  sdNodeOrKeyName: SD_NODE_NAME$h,
24526
24598
  type: NodeTranslator.translatorTypes.NODE,
24527
- encode: encode$1a,
24528
- decode: decode$12,
24529
- attributes: validXmlAttributes$n
24599
+ encode: encode$19,
24600
+ decode: decode$11,
24601
+ attributes: validXmlAttributes$p
24530
24602
  };
24531
- const translator$1a = NodeTranslator.from(config$w);
24532
- const encode$19 = (attributes) => attributes?.["w:val"];
24533
- const decode$11 = (attrs) => attrs?.highlight;
24603
+ const translator$1r = NodeTranslator.from(config$x);
24604
+ const encode$18 = (attributes) => attributes?.["w:val"];
24605
+ const decode$10 = (attrs) => attrs?.highlight;
24534
24606
  const attrConfig$E = Object.freeze({
24535
24607
  xmlName: "w:val",
24536
24608
  sdName: "highlight",
24537
- encode: encode$19,
24538
- decode: decode$11
24609
+ encode: encode$18,
24610
+ decode: decode$10
24539
24611
  });
24540
- const validXmlAttributes$m = [attrConfig$E];
24541
- const XML_NODE_NAME$y = "w:highlight";
24542
- const SD_ATTR_KEY$g = "highlight";
24612
+ const validXmlAttributes$o = [attrConfig$E];
24613
+ const XML_NODE_NAME$x = "w:highlight";
24614
+ const SD_ATTR_KEY$f = "highlight";
24543
24615
  const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
24544
- const encode$18 = (params2, encodedAttrs = {}) => {
24616
+ const encode$17 = (params2, encodedAttrs = {}) => {
24545
24617
  const { nodes } = params2;
24546
24618
  const node = nodes?.[0];
24547
24619
  const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
24548
24620
  return {
24549
24621
  type: "attr",
24550
- xmlName: XML_NODE_NAME$y,
24551
- sdNodeOrKeyName: SD_ATTR_KEY$g,
24622
+ xmlName: XML_NODE_NAME$x,
24623
+ sdNodeOrKeyName: SD_ATTR_KEY$f,
24552
24624
  attributes: { "w:val": value ?? null }
24553
24625
  };
24554
24626
  };
24555
- const decode$10 = (params2) => {
24627
+ const decode$$ = (params2) => {
24556
24628
  const attrs = params2?.node?.attrs || {};
24557
24629
  const highlightValue = attrs.highlight ?? attrs.color ?? null;
24558
24630
  if (!highlightValue) return void 0;
@@ -24560,14 +24632,14 @@ const decode$10 = (params2) => {
24560
24632
  if (!normalizedValue) return void 0;
24561
24633
  if (DISABLED_TOKENS.has(normalizedValue)) {
24562
24634
  return {
24563
- name: XML_NODE_NAME$y,
24635
+ name: XML_NODE_NAME$x,
24564
24636
  attributes: { "w:val": "none" }
24565
24637
  };
24566
24638
  }
24567
24639
  const keyword = getDocxHighlightKeywordFromHex(highlightValue);
24568
24640
  if (keyword) {
24569
24641
  return {
24570
- name: XML_NODE_NAME$y,
24642
+ name: XML_NODE_NAME$x,
24571
24643
  attributes: { "w:val": keyword }
24572
24644
  };
24573
24645
  }
@@ -24582,63 +24654,63 @@ const decode$10 = (params2) => {
24582
24654
  }
24583
24655
  };
24584
24656
  };
24585
- const config$v = {
24586
- xmlName: XML_NODE_NAME$y,
24587
- sdNodeOrKeyName: SD_ATTR_KEY$g,
24657
+ const config$w = {
24658
+ xmlName: XML_NODE_NAME$x,
24659
+ sdNodeOrKeyName: SD_ATTR_KEY$f,
24588
24660
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
24589
- encode: encode$18,
24590
- decode: decode$10,
24591
- attributes: validXmlAttributes$m
24661
+ encode: encode$17,
24662
+ decode: decode$$,
24663
+ attributes: validXmlAttributes$o
24592
24664
  };
24593
- const translator$19 = NodeTranslator.from(config$v);
24594
- const encode$17 = (attributes) => {
24665
+ const translator$1q = NodeTranslator.from(config$w);
24666
+ const encode$16 = (attributes) => {
24595
24667
  return attributes["w:val"];
24596
24668
  };
24597
- const decode$$ = (attrs) => {
24669
+ const decode$_ = (attrs) => {
24598
24670
  const { tabSize } = attrs || {};
24599
24671
  return tabSize;
24600
24672
  };
24601
24673
  const attrConfig$D = Object.freeze({
24602
24674
  xmlName: "w:val",
24603
24675
  sdName: "tabSize",
24604
- encode: encode$17,
24605
- decode: decode$$
24676
+ encode: encode$16,
24677
+ decode: decode$_
24606
24678
  });
24607
- const encode$16 = (attributes) => {
24679
+ const encode$15 = (attributes) => {
24608
24680
  return attributes["w:leader"];
24609
24681
  };
24610
- const decode$_ = (attrs) => {
24682
+ const decode$Z = (attrs) => {
24611
24683
  const { leader } = attrs || {};
24612
24684
  return leader;
24613
24685
  };
24614
24686
  const attrConfig$C = Object.freeze({
24615
24687
  xmlName: "w:leader",
24616
24688
  sdName: "leader",
24617
- encode: encode$16,
24618
- decode: decode$_
24689
+ encode: encode$15,
24690
+ decode: decode$Z
24619
24691
  });
24620
- const encode$15 = (attributes) => {
24692
+ const encode$14 = (attributes) => {
24621
24693
  return attributes["w:pos"];
24622
24694
  };
24623
- const decode$Z = (attrs) => {
24695
+ const decode$Y = (attrs) => {
24624
24696
  const { pos } = attrs || {};
24625
24697
  return pos;
24626
24698
  };
24627
24699
  const attrConfig$B = Object.freeze({
24628
24700
  xmlName: "w:pos",
24629
24701
  sdName: "pos",
24630
- encode: encode$15,
24631
- decode: decode$Z
24702
+ encode: encode$14,
24703
+ decode: decode$Y
24632
24704
  });
24633
- const validXmlAttributes$l = [attrConfig$D, attrConfig$B, attrConfig$C];
24634
- const XML_NODE_NAME$x = "w:tab";
24705
+ const validXmlAttributes$n = [attrConfig$D, attrConfig$B, attrConfig$C];
24706
+ const XML_NODE_NAME$w = "w:tab";
24635
24707
  const SD_NODE_NAME$g = "tab";
24636
- const encode$14 = (_2, encodedAttrs = {}) => {
24708
+ const encode$13 = (_2, encodedAttrs = {}) => {
24637
24709
  const translated = { type: "tab" };
24638
24710
  if (encodedAttrs) translated.attrs = { ...encodedAttrs };
24639
24711
  return translated;
24640
24712
  };
24641
- const decode$Y = (params2, decodedAttrs = {}) => {
24713
+ const decode$X = (params2, decodedAttrs = {}) => {
24642
24714
  const { node } = params2 || {};
24643
24715
  if (!node) return;
24644
24716
  const wTab = { name: "w:tab" };
@@ -24654,15 +24726,15 @@ const decode$Y = (params2, decodedAttrs = {}) => {
24654
24726
  }
24655
24727
  return translated;
24656
24728
  };
24657
- const config$u = {
24658
- xmlName: XML_NODE_NAME$x,
24729
+ const config$v = {
24730
+ xmlName: XML_NODE_NAME$w,
24659
24731
  sdNodeOrKeyName: SD_NODE_NAME$g,
24660
24732
  type: NodeTranslator.translatorTypes.NODE,
24661
- encode: encode$14,
24662
- decode: decode$Y,
24663
- attributes: validXmlAttributes$l
24733
+ encode: encode$13,
24734
+ decode: decode$X,
24735
+ attributes: validXmlAttributes$n
24664
24736
  };
24665
- const translator$18 = NodeTranslator.from(config$u);
24737
+ const translator$1p = NodeTranslator.from(config$v);
24666
24738
  const mergeTextNodes = (nodes) => {
24667
24739
  if (!nodes || !Array.isArray(nodes)) {
24668
24740
  return nodes;
@@ -24888,9 +24960,9 @@ const parseParagraphBorders = (pBdr) => {
24888
24960
  const { attributes: a } = el;
24889
24961
  if (a["w:val"] === "nil" || a["w:val"] === void 0) return;
24890
24962
  let sizePx;
24891
- if (a["w:sz"] !== void 0) sizePx = eigthPointsToPixels(a["w:sz"]);
24963
+ if (a["w:sz"] !== void 0) sizePx = eighthPointsToPixels(a["w:sz"]);
24892
24964
  let spacePx;
24893
- if (a["w:space"] !== void 0) spacePx = eigthPointsToPixels(a["w:space"]);
24965
+ if (a["w:space"] !== void 0) spacePx = eighthPointsToPixels(a["w:space"]);
24894
24966
  result[side] = {
24895
24967
  val: a["w:val"],
24896
24968
  size: sizePx,
@@ -25180,91 +25252,91 @@ const handleParagraphNode$1 = (params2) => {
25180
25252
  }
25181
25253
  return schemaNode;
25182
25254
  };
25183
- const encode$13 = (attributes) => {
25255
+ const encode$12 = (attributes) => {
25184
25256
  return attributes["w:rsidDel"];
25185
25257
  };
25186
- const decode$X = (attrs) => {
25258
+ const decode$W = (attrs) => {
25187
25259
  return attrs.rsidDel;
25188
25260
  };
25189
25261
  const attrConfig$A = Object.freeze({
25190
25262
  xmlName: "w:rsidDel",
25191
25263
  sdName: "rsidDel",
25192
- encode: encode$13,
25193
- decode: decode$X
25264
+ encode: encode$12,
25265
+ decode: decode$W
25194
25266
  });
25195
- const encode$12 = (attributes) => {
25267
+ const encode$11 = (attributes) => {
25196
25268
  return attributes["w:rsidP"];
25197
25269
  };
25198
- const decode$W = (attrs) => {
25270
+ const decode$V = (attrs) => {
25199
25271
  return attrs.rsidP;
25200
25272
  };
25201
25273
  const attrConfig$z = Object.freeze({
25202
25274
  xmlName: "w:rsidP",
25203
25275
  sdName: "rsidP",
25204
- encode: encode$12,
25205
- decode: decode$W
25276
+ encode: encode$11,
25277
+ decode: decode$V
25206
25278
  });
25207
- const encode$11 = (attributes) => {
25279
+ const encode$10 = (attributes) => {
25208
25280
  return attributes["w:rsidR"];
25209
25281
  };
25210
- const decode$V = (attrs) => {
25282
+ const decode$U = (attrs) => {
25211
25283
  return attrs.rsidR;
25212
25284
  };
25213
25285
  const attrConfig$y = Object.freeze({
25214
25286
  xmlName: "w:rsidR",
25215
25287
  sdName: "rsidR",
25216
- encode: encode$11,
25217
- decode: decode$V
25288
+ encode: encode$10,
25289
+ decode: decode$U
25218
25290
  });
25219
- const encode$10 = (attributes) => {
25291
+ const encode$$ = (attributes) => {
25220
25292
  return attributes["w:rsidRPr"];
25221
25293
  };
25222
- const decode$U = (attrs) => {
25294
+ const decode$T = (attrs) => {
25223
25295
  return attrs.rsidRPr;
25224
25296
  };
25225
25297
  const attrConfig$x = Object.freeze({
25226
25298
  xmlName: "w:rsidRPr",
25227
25299
  sdName: "rsidRPr",
25228
- encode: encode$10,
25229
- decode: decode$U
25300
+ encode: encode$$,
25301
+ decode: decode$T
25230
25302
  });
25231
- const encode$$ = (attributes) => {
25303
+ const encode$_ = (attributes) => {
25232
25304
  return attributes["w:rsidRDefault"];
25233
25305
  };
25234
- const decode$T = (attrs) => {
25306
+ const decode$S = (attrs) => {
25235
25307
  return attrs.rsidRDefault;
25236
25308
  };
25237
25309
  const attrConfig$w = Object.freeze({
25238
25310
  xmlName: "w:rsidRDefault",
25239
25311
  sdName: "rsidRDefault",
25240
- encode: encode$$,
25241
- decode: decode$T
25312
+ encode: encode$_,
25313
+ decode: decode$S
25242
25314
  });
25243
- const encode$_ = (attributes) => {
25315
+ const encode$Z = (attributes) => {
25244
25316
  return attributes["w14:paraId"];
25245
25317
  };
25246
- const decode$S = (attrs) => {
25318
+ const decode$R = (attrs) => {
25247
25319
  return attrs.paraId;
25248
25320
  };
25249
25321
  const attrConfig$v = Object.freeze({
25250
25322
  xmlName: "w14:paraId",
25251
25323
  sdName: "paraId",
25252
- encode: encode$_,
25253
- decode: decode$S
25324
+ encode: encode$Z,
25325
+ decode: decode$R
25254
25326
  });
25255
- const encode$Z = (attributes) => {
25327
+ const encode$Y = (attributes) => {
25256
25328
  return attributes["w14:textId"];
25257
25329
  };
25258
- const decode$R = (attrs) => {
25330
+ const decode$Q = (attrs) => {
25259
25331
  return attrs.textId;
25260
25332
  };
25261
25333
  const attrConfig$u = Object.freeze({
25262
25334
  xmlName: "w14:textId",
25263
25335
  sdName: "textId",
25264
- encode: encode$Z,
25265
- decode: decode$R
25336
+ encode: encode$Y,
25337
+ decode: decode$Q
25266
25338
  });
25267
- const validXmlAttributes$k = [
25339
+ const validXmlAttributes$m = [
25268
25340
  attrConfig$v,
25269
25341
  attrConfig$u,
25270
25342
  attrConfig$y,
@@ -25273,9 +25345,9 @@ const validXmlAttributes$k = [
25273
25345
  attrConfig$x,
25274
25346
  attrConfig$A
25275
25347
  ];
25276
- const XML_NODE_NAME$w = "w:p";
25348
+ const XML_NODE_NAME$v = "w:p";
25277
25349
  const SD_NODE_NAME$f = "paragraph";
25278
- const encode$Y = (params2, encodedAttrs = {}) => {
25350
+ const encode$X = (params2, encodedAttrs = {}) => {
25279
25351
  const node = handleParagraphNode$1(params2);
25280
25352
  if (!node) return void 0;
25281
25353
  if (encodedAttrs && Object.keys(encodedAttrs).length) {
@@ -25283,7 +25355,7 @@ const encode$Y = (params2, encodedAttrs = {}) => {
25283
25355
  }
25284
25356
  return node;
25285
25357
  };
25286
- const decode$Q = (params2, decodedAttrs = {}) => {
25358
+ const decode$P = (params2, decodedAttrs = {}) => {
25287
25359
  const translated = translateParagraphNode(params2);
25288
25360
  if (!translated) return void 0;
25289
25361
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -25291,16 +25363,16 @@ const decode$Q = (params2, decodedAttrs = {}) => {
25291
25363
  }
25292
25364
  return translated;
25293
25365
  };
25294
- const config$t = {
25295
- xmlName: XML_NODE_NAME$w,
25366
+ const config$u = {
25367
+ xmlName: XML_NODE_NAME$v,
25296
25368
  sdNodeOrKeyName: SD_NODE_NAME$f,
25297
25369
  type: NodeTranslator.translatorTypes.NODE,
25298
- encode: encode$Y,
25299
- decode: decode$Q,
25300
- attributes: validXmlAttributes$k
25370
+ encode: encode$X,
25371
+ decode: decode$P,
25372
+ attributes: validXmlAttributes$m
25301
25373
  };
25302
- const translator$17 = NodeTranslator.from(config$t);
25303
- const encode$X = (attributes) => {
25374
+ const translator$1o = NodeTranslator.from(config$u);
25375
+ const encode$W = (attributes) => {
25304
25376
  const raw = attributes?.["w:val"];
25305
25377
  if (raw === void 0 || raw === null) return void 0;
25306
25378
  if (typeof raw === "boolean") return raw;
@@ -25310,24 +25382,24 @@ const encode$X = (attributes) => {
25310
25382
  if (val === "1" || val === "true" || val === "on") return true;
25311
25383
  return void 0;
25312
25384
  };
25313
- const decode$P = (runProps) => {
25385
+ const decode$O = (runProps) => {
25314
25386
  if (runProps?.bold === false) return "0";
25315
25387
  return void 0;
25316
25388
  };
25317
25389
  const attrConfig$t = Object.freeze({
25318
25390
  xmlName: "w:val",
25319
25391
  sdName: "bold",
25320
- encode: encode$X,
25321
- decode: decode$P
25392
+ encode: encode$W,
25393
+ decode: decode$O
25322
25394
  });
25323
- const validXmlAttributes$j = [attrConfig$t];
25324
- const XML_NODE_NAME$v = "w:b";
25325
- const SD_ATTR_KEY$f = "bold";
25326
- const encode$W = (params2, encodedAttrs = {}) => {
25395
+ const validXmlAttributes$l = [attrConfig$t];
25396
+ const XML_NODE_NAME$u = "w:b";
25397
+ const SD_ATTR_KEY$e = "bold";
25398
+ const encode$V = (params2, encodedAttrs = {}) => {
25327
25399
  const { nodes } = params2;
25328
25400
  const node = nodes[0];
25329
25401
  if (!node) return void 0;
25330
- const val = encodedAttrs?.[SD_ATTR_KEY$f];
25402
+ const val = encodedAttrs?.[SD_ATTR_KEY$e];
25331
25403
  let attributes;
25332
25404
  if (val === false) attributes = { "w:val": "0" };
25333
25405
  else if (val === true)
@@ -25335,85 +25407,85 @@ const encode$W = (params2, encodedAttrs = {}) => {
25335
25407
  else attributes = node.attributes || {};
25336
25408
  return {
25337
25409
  type: "attr",
25338
- xmlName: XML_NODE_NAME$v,
25339
- sdNodeOrKeyName: SD_ATTR_KEY$f,
25410
+ xmlName: XML_NODE_NAME$u,
25411
+ sdNodeOrKeyName: SD_ATTR_KEY$e,
25340
25412
  attributes
25341
25413
  };
25342
25414
  };
25343
- const config$s = {
25344
- xmlName: XML_NODE_NAME$v,
25345
- sdNodeOrKeyName: SD_ATTR_KEY$f,
25415
+ const config$t = {
25416
+ xmlName: XML_NODE_NAME$u,
25417
+ sdNodeOrKeyName: SD_ATTR_KEY$e,
25346
25418
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25347
- encode: encode$W,
25348
- attributes: validXmlAttributes$j
25419
+ encode: encode$V,
25420
+ attributes: validXmlAttributes$l
25349
25421
  };
25350
- const translator$16 = NodeTranslator.from(config$s);
25351
- const XML_NODE_NAME$u = "w:i";
25352
- const SD_ATTR_KEY$e = "italic";
25353
- const encode$V = (params2) => {
25422
+ const translator$1n = NodeTranslator.from(config$t);
25423
+ const XML_NODE_NAME$t = "w:i";
25424
+ const SD_ATTR_KEY$d = "italic";
25425
+ const encode$U = (params2) => {
25354
25426
  const { nodes } = params2;
25355
25427
  const node = nodes?.[0];
25356
25428
  if (!node) return void 0;
25357
25429
  return {
25358
25430
  type: "attr",
25359
- xmlName: XML_NODE_NAME$u,
25360
- sdNodeOrKeyName: SD_ATTR_KEY$e,
25431
+ xmlName: XML_NODE_NAME$t,
25432
+ sdNodeOrKeyName: SD_ATTR_KEY$d,
25361
25433
  attributes: {
25362
25434
  "w:val": node.attributes?.["w:val"] ?? null
25363
25435
  }
25364
25436
  };
25365
25437
  };
25366
- const config$r = {
25367
- xmlName: XML_NODE_NAME$u,
25368
- sdNodeOrKeyName: SD_ATTR_KEY$e,
25438
+ const config$s = {
25439
+ xmlName: XML_NODE_NAME$t,
25440
+ sdNodeOrKeyName: SD_ATTR_KEY$d,
25369
25441
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25370
- encode: encode$V
25442
+ encode: encode$U
25371
25443
  };
25372
- const translator$15 = NodeTranslator.from(config$r);
25373
- const encode$U = (attributes) => attributes?.["w:val"];
25374
- const decode$O = (attrs) => attrs?.underline;
25444
+ const translator$1m = NodeTranslator.from(config$s);
25445
+ const encode$T = (attributes) => attributes?.["w:val"];
25446
+ const decode$N = (attrs) => attrs?.underline;
25375
25447
  const attrConfig$s = Object.freeze({
25376
25448
  xmlName: "w:val",
25377
25449
  sdName: "underline",
25378
- encode: encode$U,
25379
- decode: decode$O
25450
+ encode: encode$T,
25451
+ decode: decode$N
25380
25452
  });
25381
- const encode$T = (attributes) => attributes?.["w:color"];
25382
- const decode$N = (attrs) => attrs?.color;
25453
+ const encode$S = (attributes) => attributes?.["w:color"];
25454
+ const decode$M = (attrs) => attrs?.color;
25383
25455
  const attrConfig$r = Object.freeze({
25384
25456
  xmlName: "w:color",
25385
25457
  sdName: "color",
25386
- encode: encode$T,
25387
- decode: decode$N
25458
+ encode: encode$S,
25459
+ decode: decode$M
25388
25460
  });
25389
- const encode$S = (attributes) => attributes?.["w:themeColor"];
25390
- const decode$M = (attrs) => attrs?.themeColor;
25461
+ const encode$R = (attributes) => attributes?.["w:themeColor"];
25462
+ const decode$L = (attrs) => attrs?.themeColor;
25391
25463
  const attrConfig$q = Object.freeze({
25392
25464
  xmlName: "w:themeColor",
25393
25465
  sdName: "themeColor",
25394
- encode: encode$S,
25395
- decode: decode$M
25466
+ encode: encode$R,
25467
+ decode: decode$L
25396
25468
  });
25397
- const encode$R = (attributes) => attributes?.["w:themeTint"];
25398
- const decode$L = (attrs) => attrs?.themeTint;
25469
+ const encode$Q = (attributes) => attributes?.["w:themeTint"];
25470
+ const decode$K = (attrs) => attrs?.themeTint;
25399
25471
  const attrConfig$p = Object.freeze({
25400
25472
  xmlName: "w:themeTint",
25401
25473
  sdName: "themeTint",
25402
- encode: encode$R,
25403
- decode: decode$L
25474
+ encode: encode$Q,
25475
+ decode: decode$K
25404
25476
  });
25405
- const encode$Q = (attributes) => attributes?.["w:themeShade"];
25406
- const decode$K = (attrs) => attrs?.themeShade;
25477
+ const encode$P = (attributes) => attributes?.["w:themeShade"];
25478
+ const decode$J = (attrs) => attrs?.themeShade;
25407
25479
  const attrConfig$o = Object.freeze({
25408
25480
  xmlName: "w:themeShade",
25409
25481
  sdName: "themeShade",
25410
- encode: encode$Q,
25411
- decode: decode$K
25482
+ encode: encode$P,
25483
+ decode: decode$J
25412
25484
  });
25413
- const validXmlAttributes$i = [attrConfig$s, attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o];
25414
- const XML_NODE_NAME$t = "w:u";
25415
- const SD_ATTR_KEY$d = "underline";
25416
- const encode$P = (params2, encodedAttrs = {}) => {
25485
+ const validXmlAttributes$k = [attrConfig$s, attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o];
25486
+ const XML_NODE_NAME$s = "w:u";
25487
+ const SD_ATTR_KEY$c = "underline";
25488
+ const encode$O = (params2, encodedAttrs = {}) => {
25417
25489
  const { nodes } = params2;
25418
25490
  const node = nodes?.[0];
25419
25491
  const sourceAttrs = node?.attributes || {};
@@ -25429,12 +25501,12 @@ const encode$P = (params2, encodedAttrs = {}) => {
25429
25501
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
25430
25502
  return {
25431
25503
  type: "attr",
25432
- xmlName: XML_NODE_NAME$t,
25433
- sdNodeOrKeyName: SD_ATTR_KEY$d,
25504
+ xmlName: XML_NODE_NAME$s,
25505
+ sdNodeOrKeyName: SD_ATTR_KEY$c,
25434
25506
  attributes
25435
25507
  };
25436
25508
  };
25437
- const decode$J = (params2) => {
25509
+ const decode$I = (params2) => {
25438
25510
  const attrs = params2?.node?.attrs || {};
25439
25511
  const underlineType = attrs.underlineType ?? attrs.underline ?? null;
25440
25512
  const color = attrs.underlineColor ?? attrs.color ?? null;
@@ -25452,20 +25524,20 @@ const decode$J = (params2) => {
25452
25524
  if (themeTint) attributes["w:themeTint"] = themeTint;
25453
25525
  if (themeShade) attributes["w:themeShade"] = themeShade;
25454
25526
  return {
25455
- name: XML_NODE_NAME$t,
25527
+ name: XML_NODE_NAME$s,
25456
25528
  attributes
25457
25529
  };
25458
25530
  };
25459
- const config$q = {
25460
- xmlName: XML_NODE_NAME$t,
25461
- sdNodeOrKeyName: SD_ATTR_KEY$d,
25531
+ const config$r = {
25532
+ xmlName: XML_NODE_NAME$s,
25533
+ sdNodeOrKeyName: SD_ATTR_KEY$c,
25462
25534
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25463
- encode: encode$P,
25464
- decode: decode$J,
25465
- attributes: validXmlAttributes$i
25535
+ encode: encode$O,
25536
+ decode: decode$I,
25537
+ attributes: validXmlAttributes$k
25466
25538
  };
25467
- const translator$14 = NodeTranslator.from(config$q);
25468
- const encode$O = (attributes) => {
25539
+ const translator$1l = NodeTranslator.from(config$r);
25540
+ const encode$N = (attributes) => {
25469
25541
  const raw = attributes?.["w:val"];
25470
25542
  if (raw === void 0 || raw === null) return void 0;
25471
25543
  if (typeof raw === "boolean") return raw;
@@ -25475,24 +25547,24 @@ const encode$O = (attributes) => {
25475
25547
  if (val === "1" || val === "true" || val === "on") return true;
25476
25548
  return void 0;
25477
25549
  };
25478
- const decode$I = (attrs) => {
25550
+ const decode$H = (attrs) => {
25479
25551
  if (attrs?.strike === false) return "0";
25480
25552
  return void 0;
25481
25553
  };
25482
25554
  const attrConfig$n = Object.freeze({
25483
25555
  xmlName: "w:val",
25484
25556
  sdName: "strike",
25485
- encode: encode$O,
25486
- decode: decode$I
25557
+ encode: encode$N,
25558
+ decode: decode$H
25487
25559
  });
25488
- const validXmlAttributes$h = [attrConfig$n];
25489
- const XML_NODE_NAME$s = "w:strike";
25490
- const SD_ATTR_KEY$c = "strike";
25491
- const encode$N = (params2, encodedAttrs = {}) => {
25560
+ const validXmlAttributes$j = [attrConfig$n];
25561
+ const XML_NODE_NAME$r = "w:strike";
25562
+ const SD_ATTR_KEY$b = "strike";
25563
+ const encode$M = (params2, encodedAttrs = {}) => {
25492
25564
  const { nodes } = params2;
25493
25565
  const node = nodes?.[0];
25494
25566
  if (!node) return void 0;
25495
- const val = encodedAttrs?.[SD_ATTR_KEY$c];
25567
+ const val = encodedAttrs?.[SD_ATTR_KEY$b];
25496
25568
  let attributes;
25497
25569
  if (val === false) attributes = { "w:val": "0" };
25498
25570
  else if (val === true) attributes = {};
@@ -25501,55 +25573,55 @@ const encode$N = (params2, encodedAttrs = {}) => {
25501
25573
  else if (val === true && attributes["w:val"] === void 0) delete attributes["w:val"];
25502
25574
  return {
25503
25575
  type: "attr",
25504
- xmlName: XML_NODE_NAME$s,
25505
- sdNodeOrKeyName: SD_ATTR_KEY$c,
25576
+ xmlName: XML_NODE_NAME$r,
25577
+ sdNodeOrKeyName: SD_ATTR_KEY$b,
25506
25578
  attributes
25507
25579
  };
25508
25580
  };
25509
- const config$p = {
25510
- xmlName: XML_NODE_NAME$s,
25511
- sdNodeOrKeyName: SD_ATTR_KEY$c,
25581
+ const config$q = {
25582
+ xmlName: XML_NODE_NAME$r,
25583
+ sdNodeOrKeyName: SD_ATTR_KEY$b,
25512
25584
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25513
- encode: encode$N,
25514
- attributes: validXmlAttributes$h
25585
+ encode: encode$M,
25586
+ attributes: validXmlAttributes$j
25515
25587
  };
25516
- const translator$13 = NodeTranslator.from(config$p);
25517
- const encode$M = (attributes) => attributes?.["w:val"];
25518
- const decode$H = (attrs) => attrs?.color;
25588
+ const translator$1k = NodeTranslator.from(config$q);
25589
+ const encode$L = (attributes) => attributes?.["w:val"];
25590
+ const decode$G = (attrs) => attrs?.color;
25519
25591
  const attrConfig$m = Object.freeze({
25520
25592
  xmlName: "w:val",
25521
25593
  sdName: "color",
25522
- encode: encode$M,
25523
- decode: decode$H
25594
+ encode: encode$L,
25595
+ decode: decode$G
25524
25596
  });
25525
- const encode$L = (attributes) => attributes?.["w:themeColor"];
25526
- const decode$G = (attrs) => attrs?.themeColor;
25597
+ const encode$K = (attributes) => attributes?.["w:themeColor"];
25598
+ const decode$F = (attrs) => attrs?.themeColor;
25527
25599
  const attrConfig$l = Object.freeze({
25528
25600
  xmlName: "w:themeColor",
25529
25601
  sdName: "themeColor",
25530
- encode: encode$L,
25531
- decode: decode$G
25602
+ encode: encode$K,
25603
+ decode: decode$F
25532
25604
  });
25533
- const encode$K = (attributes) => attributes?.["w:themeTint"];
25534
- const decode$F = (attrs) => attrs?.themeTint;
25605
+ const encode$J = (attributes) => attributes?.["w:themeTint"];
25606
+ const decode$E = (attrs) => attrs?.themeTint;
25535
25607
  const attrConfig$k = Object.freeze({
25536
25608
  xmlName: "w:themeTint",
25537
25609
  sdName: "themeTint",
25538
- encode: encode$K,
25539
- decode: decode$F
25610
+ encode: encode$J,
25611
+ decode: decode$E
25540
25612
  });
25541
- const encode$J = (attributes) => attributes?.["w:themeShade"];
25542
- const decode$E = (attrs) => attrs?.themeShade;
25613
+ const encode$I = (attributes) => attributes?.["w:themeShade"];
25614
+ const decode$D = (attrs) => attrs?.themeShade;
25543
25615
  const attrConfig$j = Object.freeze({
25544
25616
  xmlName: "w:themeShade",
25545
25617
  sdName: "themeShade",
25546
- encode: encode$J,
25547
- decode: decode$E
25618
+ encode: encode$I,
25619
+ decode: decode$D
25548
25620
  });
25549
- const validXmlAttributes$g = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j];
25550
- const XML_NODE_NAME$r = "w:color";
25551
- const SD_ATTR_KEY$b = "color";
25552
- const encode$I = (params2, encodedAttrs = {}) => {
25621
+ const validXmlAttributes$i = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j];
25622
+ const XML_NODE_NAME$q = "w:color";
25623
+ const SD_ATTR_KEY$a = "color";
25624
+ const encode$H = (params2, encodedAttrs = {}) => {
25553
25625
  const { nodes } = params2;
25554
25626
  const node = nodes?.[0];
25555
25627
  const sourceAttrs = node?.attributes || {};
@@ -25564,63 +25636,63 @@ const encode$I = (params2, encodedAttrs = {}) => {
25564
25636
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
25565
25637
  return {
25566
25638
  type: "attr",
25567
- xmlName: XML_NODE_NAME$r,
25568
- sdNodeOrKeyName: SD_ATTR_KEY$b,
25639
+ xmlName: XML_NODE_NAME$q,
25640
+ sdNodeOrKeyName: SD_ATTR_KEY$a,
25569
25641
  attributes
25570
25642
  };
25571
25643
  };
25572
- const config$o = {
25573
- xmlName: XML_NODE_NAME$r,
25574
- sdNodeOrKeyName: SD_ATTR_KEY$b,
25644
+ const config$p = {
25645
+ xmlName: XML_NODE_NAME$q,
25646
+ sdNodeOrKeyName: SD_ATTR_KEY$a,
25575
25647
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25576
- encode: encode$I,
25577
- attributes: validXmlAttributes$g
25648
+ encode: encode$H,
25649
+ attributes: validXmlAttributes$i
25578
25650
  };
25579
- const translator$12 = NodeTranslator.from(config$o);
25580
- const encode$H = (attributes) => attributes?.["w:eastAsia"];
25581
- const decode$D = (attrs) => attrs?.eastAsia;
25651
+ const translator$1j = NodeTranslator.from(config$p);
25652
+ const encode$G = (attributes) => attributes?.["w:eastAsia"];
25653
+ const decode$C = (attrs) => attrs?.eastAsia;
25582
25654
  const attrConfig$i = Object.freeze({
25583
25655
  xmlName: "w:eastAsia",
25584
25656
  sdName: "eastAsia",
25585
- encode: encode$H,
25586
- decode: decode$D
25657
+ encode: encode$G,
25658
+ decode: decode$C
25587
25659
  });
25588
- const encode$G = (attributes) => attributes?.["w:ascii"];
25589
- const decode$C = (attrs) => attrs?.ascii;
25660
+ const encode$F = (attributes) => attributes?.["w:ascii"];
25661
+ const decode$B = (attrs) => attrs?.ascii;
25590
25662
  const attrConfig$h = Object.freeze({
25591
25663
  xmlName: "w:ascii",
25592
25664
  sdName: "ascii",
25593
- encode: encode$G,
25594
- decode: decode$C
25665
+ encode: encode$F,
25666
+ decode: decode$B
25595
25667
  });
25596
- const encode$F = (attributes) => attributes?.["w:hAnsi"];
25597
- const decode$B = (attrs) => attrs?.hAnsi;
25668
+ const encode$E = (attributes) => attributes?.["w:hAnsi"];
25669
+ const decode$A = (attrs) => attrs?.hAnsi;
25598
25670
  const attrConfig$g = Object.freeze({
25599
25671
  xmlName: "w:hAnsi",
25600
25672
  sdName: "hAnsi",
25601
- encode: encode$F,
25602
- decode: decode$B
25673
+ encode: encode$E,
25674
+ decode: decode$A
25603
25675
  });
25604
- const encode$E = (attributes) => attributes?.["w:cs"];
25605
- const decode$A = (attrs) => attrs?.cs;
25676
+ const encode$D = (attributes) => attributes?.["w:cs"];
25677
+ const decode$z = (attrs) => attrs?.cs;
25606
25678
  const attrConfig$f = Object.freeze({
25607
25679
  xmlName: "w:cs",
25608
25680
  sdName: "cs",
25609
- encode: encode$E,
25610
- decode: decode$A
25681
+ encode: encode$D,
25682
+ decode: decode$z
25611
25683
  });
25612
- const encode$D = (attributes) => attributes?.["w:val"];
25613
- const decode$z = (attrs) => attrs?.value;
25684
+ const encode$C = (attributes) => attributes?.["w:val"];
25685
+ const decode$y = (attrs) => attrs?.value;
25614
25686
  const attrConfig$e = Object.freeze({
25615
25687
  xmlName: "w:val",
25616
25688
  sdName: "value",
25617
- encode: encode$D,
25618
- decode: decode$z
25689
+ encode: encode$C,
25690
+ decode: decode$y
25619
25691
  });
25620
- const validXmlAttributes$f = [attrConfig$i, attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e];
25621
- const XML_NODE_NAME$q = "w:rFonts";
25622
- const SD_ATTR_KEY$a = "fontFamily";
25623
- const encode$C = (params2, encodedAttrs = {}) => {
25692
+ const validXmlAttributes$h = [attrConfig$i, attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e];
25693
+ const XML_NODE_NAME$p = "w:rFonts";
25694
+ const SD_ATTR_KEY$9 = "fontFamily";
25695
+ const encode$B = (params2, encodedAttrs = {}) => {
25624
25696
  const { nodes } = params2;
25625
25697
  const node = nodes?.[0];
25626
25698
  const sourceAttrs = node?.attributes || {};
@@ -25644,111 +25716,119 @@ const encode$C = (params2, encodedAttrs = {}) => {
25644
25716
  attributes["w:val"] = attributes["w:eastAsia"];
25645
25717
  }
25646
25718
  if (attributes["w:val"] === void 0) delete attributes["w:val"];
25719
+ if (params2.inlineDocumentFonts) {
25720
+ const font = attributes["w:ascii"];
25721
+ if (font) {
25722
+ if (!params2.inlineDocumentFonts.includes(font)) {
25723
+ params2.inlineDocumentFonts.push(font);
25724
+ }
25725
+ }
25726
+ }
25647
25727
  return {
25648
25728
  type: "attr",
25649
- xmlName: XML_NODE_NAME$q,
25650
- sdNodeOrKeyName: SD_ATTR_KEY$a,
25729
+ xmlName: XML_NODE_NAME$p,
25730
+ sdNodeOrKeyName: SD_ATTR_KEY$9,
25651
25731
  attributes
25652
25732
  };
25653
25733
  };
25654
- const config$n = {
25655
- xmlName: XML_NODE_NAME$q,
25656
- sdNodeOrKeyName: SD_ATTR_KEY$a,
25734
+ const config$o = {
25735
+ xmlName: XML_NODE_NAME$p,
25736
+ sdNodeOrKeyName: SD_ATTR_KEY$9,
25657
25737
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25658
- encode: encode$C,
25659
- attributes: validXmlAttributes$f
25738
+ encode: encode$B,
25739
+ attributes: validXmlAttributes$h
25660
25740
  };
25661
- const translator$11 = NodeTranslator.from(config$n);
25662
- const encode$B = (attributes) => attributes?.["w:val"];
25663
- const decode$y = (attrs) => attrs?.styleId;
25741
+ const translator$1i = NodeTranslator.from(config$o);
25742
+ const encode$A = (attributes) => attributes?.["w:val"];
25743
+ const decode$x = (attrs) => attrs?.styleId;
25664
25744
  const attrConfig$d = Object.freeze({
25665
25745
  xmlName: "w:val",
25666
25746
  sdName: "styleId",
25667
- encode: encode$B,
25668
- decode: decode$y
25747
+ encode: encode$A,
25748
+ decode: decode$x
25669
25749
  });
25670
- const validXmlAttributes$e = [attrConfig$d];
25671
- const XML_NODE_NAME$p = "w:rStyle";
25672
- const SD_ATTR_KEY$9 = "styleId";
25673
- const encode$A = (params2, encodedAttrs = {}) => {
25750
+ const validXmlAttributes$g = [attrConfig$d];
25751
+ const XML_NODE_NAME$o = "w:rStyle";
25752
+ const SD_ATTR_KEY$8 = "styleId";
25753
+ const encode$z = (params2, encodedAttrs = {}) => {
25674
25754
  const { nodes } = params2;
25675
25755
  const node = nodes?.[0];
25676
25756
  const value = encodedAttrs.styleId ?? node?.attributes?.["w:val"];
25677
25757
  return {
25678
25758
  type: "attr",
25679
- xmlName: XML_NODE_NAME$p,
25680
- sdNodeOrKeyName: SD_ATTR_KEY$9,
25759
+ xmlName: XML_NODE_NAME$o,
25760
+ sdNodeOrKeyName: SD_ATTR_KEY$8,
25681
25761
  attributes: { "w:val": value ?? null }
25682
25762
  };
25683
25763
  };
25684
- const config$m = {
25685
- xmlName: XML_NODE_NAME$p,
25686
- sdNodeOrKeyName: SD_ATTR_KEY$9,
25764
+ const config$n = {
25765
+ xmlName: XML_NODE_NAME$o,
25766
+ sdNodeOrKeyName: SD_ATTR_KEY$8,
25687
25767
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25688
- encode: encode$A,
25689
- attributes: validXmlAttributes$e
25768
+ encode: encode$z,
25769
+ attributes: validXmlAttributes$g
25690
25770
  };
25691
- const translator$10 = NodeTranslator.from(config$m);
25692
- const encode$z = (attributes) => attributes?.["w:val"];
25693
- const decode$x = (attrs) => attrs?.fontSize;
25771
+ const translator$1h = NodeTranslator.from(config$n);
25772
+ const encode$y = (attributes) => attributes?.["w:val"];
25773
+ const decode$w = (attrs) => attrs?.fontSize;
25694
25774
  const attrConfig$c = Object.freeze({
25695
25775
  xmlName: "w:val",
25696
25776
  sdName: "fontSize",
25697
- encode: encode$z,
25698
- decode: decode$x
25777
+ encode: encode$y,
25778
+ decode: decode$w
25699
25779
  });
25700
- const validXmlAttributes$d = [attrConfig$c];
25701
- const XML_NODE_NAME$o = "w:sz";
25702
- const SD_ATTR_KEY$8 = "fontSize";
25703
- const encode$y = (params2, encodedAttrs = {}) => {
25780
+ const validXmlAttributes$f = [attrConfig$c];
25781
+ const XML_NODE_NAME$n = "w:sz";
25782
+ const SD_ATTR_KEY$7 = "fontSize";
25783
+ const encode$x = (params2, encodedAttrs = {}) => {
25704
25784
  const { nodes } = params2;
25705
25785
  const node = nodes?.[0];
25706
25786
  const value = encodedAttrs.fontSize ?? node?.attributes?.["w:val"];
25707
25787
  return {
25708
25788
  type: "attr",
25709
- xmlName: XML_NODE_NAME$o,
25710
- sdNodeOrKeyName: SD_ATTR_KEY$8,
25789
+ xmlName: XML_NODE_NAME$n,
25790
+ sdNodeOrKeyName: SD_ATTR_KEY$7,
25711
25791
  attributes: { "w:val": value ?? null }
25712
25792
  };
25713
25793
  };
25714
- const config$l = {
25715
- xmlName: XML_NODE_NAME$o,
25716
- sdNodeOrKeyName: SD_ATTR_KEY$8,
25794
+ const config$m = {
25795
+ xmlName: XML_NODE_NAME$n,
25796
+ sdNodeOrKeyName: SD_ATTR_KEY$7,
25717
25797
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25718
- encode: encode$y,
25719
- attributes: validXmlAttributes$d
25798
+ encode: encode$x,
25799
+ attributes: validXmlAttributes$f
25720
25800
  };
25721
- const translator$$ = NodeTranslator.from(config$l);
25722
- const encode$x = (attributes) => attributes?.["w:val"];
25723
- const decode$w = (attrs) => attrs?.fontSizeCs;
25801
+ const translator$1g = NodeTranslator.from(config$m);
25802
+ const encode$w = (attributes) => attributes?.["w:val"];
25803
+ const decode$v = (attrs) => attrs?.fontSizeCs;
25724
25804
  const attrConfig$b = Object.freeze({
25725
25805
  xmlName: "w:val",
25726
25806
  sdName: "fontSizeCs",
25727
- encode: encode$x,
25728
- decode: decode$w
25807
+ encode: encode$w,
25808
+ decode: decode$v
25729
25809
  });
25730
- const validXmlAttributes$c = [attrConfig$b];
25731
- const XML_NODE_NAME$n = "w:szCs";
25732
- const SD_ATTR_KEY$7 = "fontSizeCs";
25733
- const encode$w = (params2, encodedAttrs = {}) => {
25810
+ const validXmlAttributes$e = [attrConfig$b];
25811
+ const XML_NODE_NAME$m = "w:szCs";
25812
+ const SD_ATTR_KEY$6 = "fontSizeCs";
25813
+ const encode$v = (params2, encodedAttrs = {}) => {
25734
25814
  const { nodes } = params2;
25735
25815
  const node = nodes?.[0];
25736
25816
  const value = encodedAttrs.fontSizeCs ?? node?.attributes?.["w:val"];
25737
25817
  return {
25738
25818
  type: "attr",
25739
- xmlName: XML_NODE_NAME$n,
25740
- sdNodeOrKeyName: SD_ATTR_KEY$7,
25819
+ xmlName: XML_NODE_NAME$m,
25820
+ sdNodeOrKeyName: SD_ATTR_KEY$6,
25741
25821
  attributes: { "w:val": value ?? null }
25742
25822
  };
25743
25823
  };
25744
- const config$k = {
25745
- xmlName: XML_NODE_NAME$n,
25746
- sdNodeOrKeyName: SD_ATTR_KEY$7,
25824
+ const config$l = {
25825
+ xmlName: XML_NODE_NAME$m,
25826
+ sdNodeOrKeyName: SD_ATTR_KEY$6,
25747
25827
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25748
- encode: encode$w,
25749
- attributes: validXmlAttributes$c
25828
+ encode: encode$v,
25829
+ attributes: validXmlAttributes$e
25750
25830
  };
25751
- const translator$_ = NodeTranslator.from(config$k);
25831
+ const translator$1f = NodeTranslator.from(config$l);
25752
25832
  const generateV2HandlerEntity = (handlerName, translator2) => ({
25753
25833
  handlerName,
25754
25834
  handler: (params2) => {
@@ -25772,7 +25852,7 @@ function createSingleAttrPropertyHandler(xmlName, sdName = null, attrName = "w:v
25772
25852
  xmlName,
25773
25853
  sdNodeOrKeyName: sdName,
25774
25854
  encode: ({ nodes }) => {
25775
- return transformEncode(nodes[0].attributes[attrName]) ?? void 0;
25855
+ return transformEncode(nodes[0]?.attributes?.[attrName]) ?? void 0;
25776
25856
  },
25777
25857
  decode: ({ node }) => {
25778
25858
  const value = node.attrs?.[sdName] != null ? transformDecode(node.attrs[sdName]) : void 0;
@@ -25804,8 +25884,32 @@ function createBorderPropertyHandler(xmlName, sdName = null) {
25804
25884
  xmlName,
25805
25885
  sdNodeOrKeyName: sdName,
25806
25886
  attributes: [
25807
- createAttributeHandler("w:val"),
25808
- createAttributeHandler("w:color"),
25887
+ createAttributeHandler(
25888
+ "w:val",
25889
+ "val",
25890
+ (v2) => v2 === "nil" ? "none" : v2,
25891
+ (v2) => v2 === "none" ? "nil" : v2
25892
+ ),
25893
+ createAttributeHandler(
25894
+ "w:color",
25895
+ "color",
25896
+ (v2) => {
25897
+ if (v2 === "auto") {
25898
+ return null;
25899
+ } else if (v2) {
25900
+ return `#${v2}`;
25901
+ } else {
25902
+ return void 0;
25903
+ }
25904
+ },
25905
+ (v2) => {
25906
+ if (v2) {
25907
+ return v2.replace("#", "");
25908
+ } else {
25909
+ return void 0;
25910
+ }
25911
+ }
25912
+ ),
25809
25913
  createAttributeHandler("w:themeColor"),
25810
25914
  createAttributeHandler("w:themeTint"),
25811
25915
  createAttributeHandler("w:themeShade"),
@@ -25871,6 +25975,37 @@ function decodeProperties(translatorsBySdName, properties) {
25871
25975
  });
25872
25976
  return elements;
25873
25977
  }
25978
+ function createNestedPropertiesTranslator(xmlName, sdName, propertyTranslators2, defaultEncodedAttrs = {}) {
25979
+ const propertyTranslatorsByXmlName = {};
25980
+ const propertyTranslatorsBySdName = {};
25981
+ propertyTranslators2.forEach((translator2) => {
25982
+ propertyTranslatorsByXmlName[translator2.xmlName] = translator2;
25983
+ propertyTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
25984
+ });
25985
+ return {
25986
+ xmlName,
25987
+ sdNodeOrKeyName: sdName,
25988
+ type: NodeTranslator.translatorTypes.NODE,
25989
+ attributes: [],
25990
+ encode: (params2) => {
25991
+ const { nodes } = params2;
25992
+ const node = nodes[0];
25993
+ const attributes = { ...defaultEncodedAttrs, ...encodeProperties(node, propertyTranslatorsByXmlName) };
25994
+ return Object.keys(attributes).length > 0 ? attributes : void 0;
25995
+ },
25996
+ decode: (params2) => {
25997
+ const currentValue = params2.node.attrs?.[sdName];
25998
+ const elements = decodeProperties(propertyTranslatorsBySdName, currentValue);
25999
+ const newNode = {
26000
+ name: xmlName,
26001
+ type: "element",
26002
+ attributes: {},
26003
+ elements
26004
+ };
26005
+ return newNode;
26006
+ }
26007
+ };
26008
+ }
25874
26009
  const parseBoolean = (value) => value != null ? ["1", "true"].includes(value) : void 0;
25875
26010
  const booleanToString = (value) => value != null ? value ? "1" : "0" : void 0;
25876
26011
  const parseInteger = (value) => {
@@ -25882,9 +26017,9 @@ const integerToString = (value) => {
25882
26017
  const intValue = parseInteger(value);
25883
26018
  return intValue != void 0 ? String(intValue) : void 0;
25884
26019
  };
25885
- const XML_NODE_NAME$m = "w:caps";
25886
- const SD_ATTR_KEY$6 = "textTransform";
25887
- const encode$v = (params2, encodedAttrs = {}) => {
26020
+ const XML_NODE_NAME$l = "w:caps";
26021
+ const SD_ATTR_KEY$5 = "textTransform";
26022
+ const encode$u = (params2, encodedAttrs = {}) => {
25888
26023
  const { nodes } = params2;
25889
26024
  const node = nodes[0];
25890
26025
  if (!node) return void 0;
@@ -25896,31 +26031,31 @@ const encode$v = (params2, encodedAttrs = {}) => {
25896
26031
  }
25897
26032
  return {
25898
26033
  type: "attr",
25899
- xmlName: XML_NODE_NAME$m,
25900
- sdNodeOrKeyName: SD_ATTR_KEY$6,
25901
- attributes: { [SD_ATTR_KEY$6]: result }
26034
+ xmlName: XML_NODE_NAME$l,
26035
+ sdNodeOrKeyName: SD_ATTR_KEY$5,
26036
+ attributes: { [SD_ATTR_KEY$5]: result }
25902
26037
  };
25903
26038
  };
25904
- const config$j = {
25905
- xmlName: XML_NODE_NAME$m,
25906
- sdNodeOrKeyName: SD_ATTR_KEY$6,
26039
+ const config$k = {
26040
+ xmlName: XML_NODE_NAME$l,
26041
+ sdNodeOrKeyName: SD_ATTR_KEY$5,
25907
26042
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25908
- encode: encode$v,
26043
+ encode: encode$u,
25909
26044
  attributes: [createAttributeHandler("w:val")]
25910
26045
  };
25911
- const translator$Z = NodeTranslator.from(config$j);
26046
+ const translator$1e = NodeTranslator.from(config$k);
25912
26047
  const runPropertyTranslators = Object.freeze({
25913
- "w:b": translator$16,
25914
- "w:i": translator$15,
25915
- "w:u": translator$14,
25916
- "w:strike": translator$13,
25917
- "w:color": translator$12,
25918
- "w:highlight": translator$19,
25919
- "w:rFonts": translator$11,
25920
- "w:rStyle": translator$10,
25921
- "w:sz": translator$$,
25922
- "w:szCs": translator$_,
25923
- "w:caps": translator$Z
26048
+ "w:b": translator$1n,
26049
+ "w:i": translator$1m,
26050
+ "w:u": translator$1l,
26051
+ "w:strike": translator$1k,
26052
+ "w:color": translator$1j,
26053
+ "w:highlight": translator$1q,
26054
+ "w:rFonts": translator$1i,
26055
+ "w:rStyle": translator$1h,
26056
+ "w:sz": translator$1g,
26057
+ "w:szCs": translator$1f,
26058
+ "w:caps": translator$1e
25924
26059
  });
25925
26060
  const rawRunPropertyXmlNames = Object.freeze(["w:lang", "w:shd"]);
25926
26061
  const RAW_CHILD_NAME_SET = new Set(rawRunPropertyXmlNames);
@@ -25934,9 +26069,9 @@ const toRunPropertyEntry = (candidate) => {
25934
26069
  attributes: { ...candidate.attributes || {} }
25935
26070
  };
25936
26071
  };
25937
- const XML_NODE_NAME$l = "w:rPr";
25938
- const SD_ATTR_KEY$5 = "runProperties";
25939
- const encode$u = (params2) => {
26072
+ const XML_NODE_NAME$k = "w:rPr";
26073
+ const SD_ATTR_KEY$4 = "runProperties";
26074
+ const encode$t = (params2) => {
25940
26075
  const { nodes } = params2;
25941
26076
  const node = nodes?.[0] || {};
25942
26077
  const contents = Array.isArray(node.elements) ? node.elements : [];
@@ -25970,16 +26105,16 @@ const encode$u = (params2) => {
25970
26105
  attributes: runPropsArray
25971
26106
  };
25972
26107
  };
25973
- const config$i = {
25974
- xmlName: XML_NODE_NAME$l,
25975
- sdNodeOrKeyName: SD_ATTR_KEY$5,
26108
+ const config$j = {
26109
+ xmlName: XML_NODE_NAME$k,
26110
+ sdNodeOrKeyName: SD_ATTR_KEY$4,
25976
26111
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25977
- encode: encode$u
26112
+ encode: encode$t
25978
26113
  };
25979
- const translator$Y = NodeTranslator.from(config$i);
26114
+ const translator$1d = NodeTranslator.from(config$j);
25980
26115
  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;
25981
26116
  const containsEastAsianCharacters = (text) => EAST_ASIAN_CHARACTER_REGEX.test(text);
25982
- const collectRunProperties = (params2, rPrNode, translator2 = translator$Y) => {
26117
+ const collectRunProperties = (params2, rPrNode, translator2 = translator$1d) => {
25983
26118
  if (!rPrNode) return { entries: [], hadRPr: false, styleChangeMarks: [] };
25984
26119
  const result = translator2.encode({ ...params2, nodes: [rPrNode] }) || {};
25985
26120
  let entries = [];
@@ -26452,7 +26587,7 @@ const ensureTrackedWrapper = (runs, trackingMarksByType = /* @__PURE__ */ new Ma
26452
26587
  }
26453
26588
  return runs;
26454
26589
  };
26455
- const XML_NODE_NAME$k = "w:hyperlink";
26590
+ const XML_NODE_NAME$j = "w:hyperlink";
26456
26591
  const SD_NODE_NAME$e = "link";
26457
26592
  const _createAttributeHandler = (xmlName, sdName) => ({
26458
26593
  xmlName,
@@ -26460,7 +26595,7 @@ const _createAttributeHandler = (xmlName, sdName) => ({
26460
26595
  encode: (attributes) => attributes[xmlName],
26461
26596
  decode: (attributes) => attributes[sdName]
26462
26597
  });
26463
- const validXmlAttributes$b = [
26598
+ const validXmlAttributes$d = [
26464
26599
  _createAttributeHandler("w:anchor", "anchor"),
26465
26600
  _createAttributeHandler("w:docLocation", "docLocation"),
26466
26601
  {
@@ -26473,7 +26608,7 @@ const validXmlAttributes$b = [
26473
26608
  _createAttributeHandler("r:id", "rId"),
26474
26609
  _createAttributeHandler("w:tgtFrame", "target")
26475
26610
  ];
26476
- const encode$t = (params2, encodedAttrs) => {
26611
+ const encode$s = (params2, encodedAttrs) => {
26477
26612
  const { nodes, docx, nodeListHandler } = params2;
26478
26613
  const node = nodes[0];
26479
26614
  let href = _resolveHref(docx, encodedAttrs);
@@ -26507,7 +26642,7 @@ const _resolveHref = (docx, encodedAttrs) => {
26507
26642
  }
26508
26643
  return href;
26509
26644
  };
26510
- function decode$v(params2) {
26645
+ function decode$u(params2) {
26511
26646
  const { hyperlinkGroup = [params2.node] } = params2.extraParams || {};
26512
26647
  const node = hyperlinkGroup[0];
26513
26648
  const linkMark = node.marks.find((m2) => m2.type === "link");
@@ -26556,55 +26691,55 @@ function _addNewLinkRelationship(params2, link) {
26556
26691
  });
26557
26692
  return id;
26558
26693
  }
26559
- const config$h = {
26560
- xmlName: XML_NODE_NAME$k,
26694
+ const config$i = {
26695
+ xmlName: XML_NODE_NAME$j,
26561
26696
  sdNodeOrKeyName: SD_NODE_NAME$e,
26562
26697
  type: NodeTranslator.translatorTypes.NODE,
26563
- encode: encode$t,
26564
- decode: decode$v,
26565
- attributes: validXmlAttributes$b
26698
+ encode: encode$s,
26699
+ decode: decode$u,
26700
+ attributes: validXmlAttributes$d
26566
26701
  };
26567
- const translator$X = NodeTranslator.from(config$h);
26568
- const encode$s = (attributes) => {
26702
+ const translator$1c = NodeTranslator.from(config$i);
26703
+ const encode$r = (attributes) => {
26569
26704
  return attributes["w:rsidR"];
26570
26705
  };
26571
- const decode$u = (attrs) => {
26706
+ const decode$t = (attrs) => {
26572
26707
  return attrs.rsidR;
26573
26708
  };
26574
26709
  const attrConfig$a = Object.freeze({
26575
26710
  xmlName: "w:rsidR",
26576
26711
  sdName: "rsidR",
26577
- encode: encode$s,
26578
- decode: decode$u
26712
+ encode: encode$r,
26713
+ decode: decode$t
26579
26714
  });
26580
- const encode$r = (attributes) => {
26715
+ const encode$q = (attributes) => {
26581
26716
  return attributes["w:rsidRPr"];
26582
26717
  };
26583
- const decode$t = (attrs) => {
26718
+ const decode$s = (attrs) => {
26584
26719
  return attrs.rsidRPr;
26585
26720
  };
26586
26721
  const attrConfig$9 = Object.freeze({
26587
26722
  xmlName: "w:rsidRPr",
26588
26723
  sdName: "rsidRPr",
26589
- encode: encode$r,
26590
- decode: decode$t
26724
+ encode: encode$q,
26725
+ decode: decode$s
26591
26726
  });
26592
- const encode$q = (attributes) => {
26727
+ const encode$p = (attributes) => {
26593
26728
  return attributes["w:rsidDel"];
26594
26729
  };
26595
- const decode$s = (attrs) => {
26730
+ const decode$r = (attrs) => {
26596
26731
  return attrs.rsidDel;
26597
26732
  };
26598
26733
  const attrConfig$8 = Object.freeze({
26599
26734
  xmlName: "w:rsidDel",
26600
26735
  sdName: "rsidDel",
26601
- encode: encode$q,
26602
- decode: decode$s
26736
+ encode: encode$p,
26737
+ decode: decode$r
26603
26738
  });
26604
- const validXmlAttributes$a = [attrConfig$a, attrConfig$9, attrConfig$8];
26605
- const XML_NODE_NAME$j = "w:r";
26739
+ const validXmlAttributes$c = [attrConfig$a, attrConfig$9, attrConfig$8];
26740
+ const XML_NODE_NAME$i = "w:r";
26606
26741
  const SD_KEY_NAME = "run";
26607
- const encode$p = (params2, encodedAttrs = {}) => {
26742
+ const encode$o = (params2, encodedAttrs = {}) => {
26608
26743
  const { nodes = [], nodeListHandler } = params2 || {};
26609
26744
  const runNode = nodes[0];
26610
26745
  if (!runNode) return void 0;
@@ -26652,7 +26787,7 @@ const encode$p = (params2, encodedAttrs = {}) => {
26652
26787
  }
26653
26788
  return runNodeResult;
26654
26789
  };
26655
- const decode$r = (params2, decodedAttrs = {}) => {
26790
+ const decode$q = (params2, decodedAttrs = {}) => {
26656
26791
  const { node } = params2 || {};
26657
26792
  if (!node) return void 0;
26658
26793
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
@@ -26661,7 +26796,7 @@ const decode$r = (params2, decodedAttrs = {}) => {
26661
26796
  ...params2.extraParams,
26662
26797
  linkProcessed: true
26663
26798
  };
26664
- return translator$X.decode({ ...params2, extraParams });
26799
+ return translator$1c.decode({ ...params2, extraParams });
26665
26800
  }
26666
26801
  const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node);
26667
26802
  const runAttrs = runNodeForExport.attrs || {};
@@ -26717,7 +26852,7 @@ const decode$r = (params2, decodedAttrs = {}) => {
26717
26852
  runs.push(trackedClone);
26718
26853
  return;
26719
26854
  }
26720
- const runWrapper = { name: XML_NODE_NAME$j, elements: [] };
26855
+ const runWrapper = { name: XML_NODE_NAME$i, elements: [] };
26721
26856
  applyBaseRunProps(runWrapper);
26722
26857
  if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
26723
26858
  runWrapper.elements.push(cloneXmlNode(child));
@@ -26725,7 +26860,7 @@ const decode$r = (params2, decodedAttrs = {}) => {
26725
26860
  });
26726
26861
  const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
26727
26862
  if (!trackedRuns.length) {
26728
- const emptyRun = { name: XML_NODE_NAME$j, elements: [] };
26863
+ const emptyRun = { name: XML_NODE_NAME$i, elements: [] };
26729
26864
  applyBaseRunProps(emptyRun);
26730
26865
  trackedRuns.push(emptyRun);
26731
26866
  }
@@ -26739,15 +26874,15 @@ const decode$r = (params2, decodedAttrs = {}) => {
26739
26874
  }
26740
26875
  return trackedRuns;
26741
26876
  };
26742
- const config$g = {
26743
- xmlName: XML_NODE_NAME$j,
26877
+ const config$h = {
26878
+ xmlName: XML_NODE_NAME$i,
26744
26879
  sdNodeOrKeyName: SD_KEY_NAME,
26745
26880
  type: NodeTranslator.translatorTypes.NODE,
26746
- encode: encode$p,
26747
- decode: decode$r,
26748
- attributes: validXmlAttributes$a
26881
+ encode: encode$o,
26882
+ decode: decode$q,
26883
+ attributes: validXmlAttributes$c
26749
26884
  };
26750
- const translator$W = NodeTranslator.from(config$g);
26885
+ const translator$1b = NodeTranslator.from(config$h);
26751
26886
  function preProcessVerticalMergeCells(table, { editorSchema }) {
26752
26887
  if (!table || !Array.isArray(table.content)) {
26753
26888
  return table;
@@ -26788,13 +26923,13 @@ function preProcessVerticalMergeCells(table, { editorSchema }) {
26788
26923
  }
26789
26924
  return table;
26790
26925
  }
26791
- const translator$V = NodeTranslator.from({
26926
+ const translator$1a = NodeTranslator.from({
26792
26927
  xmlName: "w:cantSplit",
26793
26928
  sdNodeOrKeyName: "cantSplit",
26794
26929
  encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
26795
26930
  decode: ({ node }) => node.attrs?.cantSplit ? { attributes: {} } : void 0
26796
26931
  });
26797
- const translator$U = NodeTranslator.from({
26932
+ const translator$19 = NodeTranslator.from({
26798
26933
  xmlName: "w:cnfStyle",
26799
26934
  sdNodeOrKeyName: "cnfStyle",
26800
26935
  attributes: [
@@ -26820,8 +26955,8 @@ const translator$U = NodeTranslator.from({
26820
26955
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
26821
26956
  }
26822
26957
  });
26823
- const translator$T = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
26824
- const translator$S = NodeTranslator.from(
26958
+ const translator$18 = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
26959
+ const translator$17 = NodeTranslator.from(
26825
26960
  createSingleAttrPropertyHandler(
26826
26961
  "w:gridAfter",
26827
26962
  null,
@@ -26830,7 +26965,7 @@ const translator$S = NodeTranslator.from(
26830
26965
  (v2) => integerToString(v2)
26831
26966
  )
26832
26967
  );
26833
- const translator$R = NodeTranslator.from(
26968
+ const translator$16 = NodeTranslator.from(
26834
26969
  createSingleAttrPropertyHandler(
26835
26970
  "w:gridBefore",
26836
26971
  null,
@@ -26839,21 +26974,21 @@ const translator$R = NodeTranslator.from(
26839
26974
  (v2) => integerToString(v2)
26840
26975
  )
26841
26976
  );
26842
- const translator$Q = NodeTranslator.from({
26977
+ const translator$15 = NodeTranslator.from({
26843
26978
  xmlName: "w:hidden",
26844
26979
  sdNodeOrKeyName: "hidden",
26845
26980
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
26846
26981
  decode: ({ node }) => node.attrs.hidden ? { attributes: {} } : void 0
26847
26982
  });
26848
- const translator$P = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
26849
- const translator$O = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
26850
- const translator$N = NodeTranslator.from({
26983
+ const translator$14 = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
26984
+ const translator$13 = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
26985
+ const translator$12 = NodeTranslator.from({
26851
26986
  xmlName: "w:tblHeader",
26852
26987
  sdNodeOrKeyName: "repeatHeader",
26853
26988
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
26854
26989
  decode: ({ node }) => node.attrs.repeatHeader ? { attributes: {} } : void 0
26855
26990
  });
26856
- const translator$M = NodeTranslator.from({
26991
+ const translator$11 = NodeTranslator.from({
26857
26992
  xmlName: "w:trHeight",
26858
26993
  sdNodeOrKeyName: "rowHeight",
26859
26994
  encode: ({ nodes }) => {
@@ -26880,73 +27015,32 @@ const translator$M = NodeTranslator.from({
26880
27015
  return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
26881
27016
  }
26882
27017
  });
26883
- const translator$L = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
26884
- const translator$K = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
26885
- const XML_NODE_NAME$i = "w:trPr";
26886
- const SD_ATTR_KEY$4 = "tableRowProperties";
26887
- const encode$o = (params2) => {
26888
- const { nodes } = params2;
26889
- const node = nodes[0];
26890
- let attributes = {
27018
+ const translator$10 = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
27019
+ const translator$$ = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
27020
+ const propertyTranslators$6 = [
27021
+ translator$1a,
27022
+ translator$19,
27023
+ translator$18,
27024
+ translator$17,
27025
+ translator$16,
27026
+ translator$15,
27027
+ translator$14,
27028
+ translator$13,
27029
+ translator$12,
27030
+ translator$11,
27031
+ translator$10,
27032
+ translator$$
27033
+ ];
27034
+ const translator$_ = NodeTranslator.from(
27035
+ createNestedPropertiesTranslator("w:trPr", "tableRowProperties", propertyTranslators$6, {
26891
27036
  cantSplit: false,
26892
27037
  hidden: false,
26893
27038
  repeatHeader: false
26894
- };
26895
- attributes = {
26896
- ...attributes,
26897
- ...encodeProperties(node, propertyTranslatorsByXmlName$2)
26898
- };
26899
- return {
26900
- type: NodeTranslator.translatorTypes.ATTRIBUTE,
26901
- xmlName: XML_NODE_NAME$i,
26902
- sdNodeOrKeyName: SD_ATTR_KEY$4,
26903
- attributes
26904
- };
26905
- };
26906
- const decode$q = (params2) => {
26907
- const { tableRowProperties = {} } = params2.node.attrs || {};
26908
- const elements = decodeProperties(propertyTranslatorsBySdName$2, tableRowProperties);
26909
- const newNode = {
26910
- name: "w:trPr",
26911
- type: "element",
26912
- attributes: {},
26913
- elements
26914
- };
26915
- return newNode;
26916
- };
26917
- const propertyTranslators$3 = [
26918
- translator$V,
26919
- translator$U,
26920
- translator$T,
26921
- translator$S,
26922
- translator$R,
26923
- translator$Q,
26924
- translator$P,
26925
- translator$O,
26926
- translator$N,
26927
- translator$M,
26928
- translator$L,
26929
- translator$K
26930
- ];
26931
- const propertyTranslatorsByXmlName$2 = {};
26932
- propertyTranslators$3.forEach((translator2) => {
26933
- propertyTranslatorsByXmlName$2[translator2.xmlName] = translator2;
26934
- });
26935
- const propertyTranslatorsBySdName$2 = {};
26936
- propertyTranslators$3.forEach((translator2) => {
26937
- propertyTranslatorsBySdName$2[translator2.sdNodeOrKeyName] = translator2;
26938
- });
26939
- const config$f = {
26940
- xmlName: XML_NODE_NAME$i,
26941
- sdNodeOrKeyName: SD_ATTR_KEY$4,
26942
- type: NodeTranslator.translatorTypes.ATTRIBUTE,
26943
- encode: encode$o,
26944
- decode: decode$q
26945
- };
26946
- const translator$J = NodeTranslator.from(config$f);
27039
+ })
27040
+ );
26947
27041
  const XML_NODE_NAME$h = "w:tr";
26948
27042
  const SD_NODE_NAME$d = "tableRow";
26949
- const validXmlAttributes$9 = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
27043
+ const validXmlAttributes$b = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
26950
27044
  (xmlName) => createAttributeHandler(xmlName)
26951
27045
  );
26952
27046
  const encode$n = (params2, encodedAttrs) => {
@@ -26954,10 +27048,10 @@ const encode$n = (params2, encodedAttrs) => {
26954
27048
  let tableRowProperties = {};
26955
27049
  const tPr = row.elements.find((el) => el.name === "w:trPr");
26956
27050
  if (tPr) {
26957
- ({ attributes: tableRowProperties } = translator$J.encode({
27051
+ tableRowProperties = translator$_.encode({
26958
27052
  ...params2,
26959
27053
  nodes: [tPr]
26960
- }));
27054
+ });
26961
27055
  }
26962
27056
  encodedAttrs["tableRowProperties"] = Object.freeze(tableRowProperties);
26963
27057
  encodedAttrs["rowHeight"] = twipsToPixels(tableRowProperties["rowHeight"]?.value);
@@ -26967,7 +27061,7 @@ const encode$n = (params2, encodedAttrs) => {
26967
27061
  let currentColumnIndex = 0;
26968
27062
  const content = cellNodes?.map((n) => {
26969
27063
  let columnWidth = gridColumnWidths?.[currentColumnIndex] || null;
26970
- const result = translator$a.encode({
27064
+ const result = translator$c.encode({
26971
27065
  ...params2,
26972
27066
  extraParams: {
26973
27067
  ...params2.extraParams,
@@ -27001,7 +27095,7 @@ const decode$p = (params2, decodedAttrs) => {
27001
27095
  }
27002
27096
  }
27003
27097
  tableRowProperties["cantSplit"] = node.attrs["cantSplit"];
27004
- const trPr = translator$J.decode({
27098
+ const trPr = translator$_.decode({
27005
27099
  ...params2,
27006
27100
  node: { ...node, attrs: { ...node.attrs, tableRowProperties } }
27007
27101
  });
@@ -27013,22 +27107,22 @@ const decode$p = (params2, decodedAttrs) => {
27013
27107
  elements
27014
27108
  };
27015
27109
  };
27016
- const config$e = {
27110
+ const config$g = {
27017
27111
  xmlName: XML_NODE_NAME$h,
27018
27112
  sdNodeOrKeyName: SD_NODE_NAME$d,
27019
27113
  type: NodeTranslator.translatorTypes.NODE,
27020
27114
  encode: encode$n,
27021
27115
  decode: decode$p,
27022
- attributes: validXmlAttributes$9
27116
+ attributes: validXmlAttributes$b
27023
27117
  };
27024
- const translator$I = NodeTranslator.from(config$e);
27025
- const translator$H = NodeTranslator.from({
27118
+ const translator$Z = NodeTranslator.from(config$g);
27119
+ const translator$Y = NodeTranslator.from({
27026
27120
  xmlName: "w:bidiVisual",
27027
27121
  sdNodeOrKeyName: "rightToLeft",
27028
27122
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
27029
27123
  decode: ({ node }) => node.attrs.rightToLeft ? { attributes: {} } : void 0
27030
27124
  });
27031
- const translator$G = NodeTranslator.from({
27125
+ const translator$X = NodeTranslator.from({
27032
27126
  xmlName: "w:shd",
27033
27127
  sdNodeOrKeyName: "shading",
27034
27128
  attributes: [
@@ -27050,11 +27144,11 @@ const translator$G = NodeTranslator.from({
27050
27144
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
27051
27145
  }
27052
27146
  });
27053
- const translator$F = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
27054
- const translator$E = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
27055
- const translator$D = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
27056
- const translator$C = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
27057
- const translator$B = NodeTranslator.from({
27147
+ const translator$W = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
27148
+ const translator$V = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
27149
+ const translator$U = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
27150
+ const translator$T = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
27151
+ const translator$S = NodeTranslator.from({
27058
27152
  xmlName: "w:tblLook",
27059
27153
  sdNodeOrKeyName: "tblLook",
27060
27154
  attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
@@ -27066,16 +27160,16 @@ const translator$B = NodeTranslator.from({
27066
27160
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
27067
27161
  }
27068
27162
  });
27069
- const translator$A = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
27070
- const translator$z = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
27071
- const translator$y = NodeTranslator.from(
27163
+ const translator$R = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
27164
+ const translator$Q = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
27165
+ const translator$P = NodeTranslator.from(
27072
27166
  createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
27073
27167
  );
27074
- const translator$x = NodeTranslator.from(
27168
+ const translator$O = NodeTranslator.from(
27075
27169
  createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
27076
27170
  );
27077
- const translator$w = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
27078
- const translator$v = NodeTranslator.from({
27171
+ const translator$N = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
27172
+ const translator$M = NodeTranslator.from({
27079
27173
  xmlName: "w:tblpPr",
27080
27174
  sdNodeOrKeyName: "floatingTableProperties",
27081
27175
  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))),
@@ -27087,160 +27181,67 @@ const translator$v = NodeTranslator.from({
27087
27181
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
27088
27182
  }
27089
27183
  });
27090
- const translator$u = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
27091
- const translator$t = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
27092
- const translator$s = NodeTranslator.from(createBorderPropertyHandler("w:end"));
27093
- const translator$r = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
27094
- const translator$q = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
27095
- const translator$p = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
27096
- const translator$o = NodeTranslator.from(createBorderPropertyHandler("w:left"));
27097
- const translator$n = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
27098
- const translator$m = NodeTranslator.from(createBorderPropertyHandler("w:right"));
27099
- const translator$l = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
27100
- const translator$k = NodeTranslator.from(createBorderPropertyHandler("w:start"));
27101
- const translator$j = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
27102
- const translator$i = NodeTranslator.from(createBorderPropertyHandler("w:top"));
27103
- const translator$h = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
27104
- const XML_NODE_NAME$g = "w:tblBorders";
27105
- const SD_ATTR_KEY$3 = "borders";
27106
- const encode$m = (params2) => {
27107
- const { nodes } = params2;
27108
- const node = nodes[0];
27109
- const attributes = encodeProperties(node, tblBordersTranslatorsByXmlName);
27110
- return Object.keys(attributes).length > 0 ? attributes : void 0;
27111
- };
27112
- const decode$o = (params2) => {
27113
- const { borders = {} } = params2.node.attrs || {};
27114
- const elements = decodeProperties(tblBordersTranslatorsBySdName, borders);
27115
- const newNode = {
27116
- name: "w:tblBorders",
27117
- type: "element",
27118
- attributes: {},
27119
- elements
27120
- };
27121
- return newNode;
27122
- };
27123
- const propertyTranslators$2 = [
27124
- translator$u,
27125
- translator$s,
27126
- translator$q,
27127
- translator$p,
27128
- translator$o,
27129
- translator$m,
27130
- translator$k,
27131
- translator$i
27132
- ];
27133
- const tblBordersTranslatorsByXmlName = {};
27134
- const tblBordersTranslatorsBySdName = {};
27135
- propertyTranslators$2.forEach((translator2) => {
27136
- tblBordersTranslatorsByXmlName[translator2.xmlName] = translator2;
27137
- tblBordersTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
27138
- });
27139
- const translator$g = NodeTranslator.from({
27140
- xmlName: XML_NODE_NAME$g,
27141
- sdNodeOrKeyName: SD_ATTR_KEY$3,
27142
- type: NodeTranslator.translatorTypes.NODE,
27143
- attributes: [],
27144
- encode: encode$m,
27145
- decode: decode$o
27146
- });
27147
- const XML_NODE_NAME$f = "w:tblCellMar";
27148
- const SD_ATTR_KEY$2 = "cellMargins";
27149
- const encode$l = (params2) => {
27150
- const { nodes } = params2;
27151
- const node = nodes[0];
27152
- const attributes = encodeProperties(node, propertyTranslatorsByXmlName$1);
27153
- return Object.keys(attributes).length > 0 ? attributes : void 0;
27154
- };
27155
- const decode$n = (params2) => {
27156
- const { cellMargins = {} } = params2.node.attrs || {};
27157
- const elements = decodeProperties(propertyTranslatorsBySdName$1, cellMargins);
27158
- const newNode = {
27159
- name: XML_NODE_NAME$f,
27160
- type: "element",
27161
- attributes: {},
27162
- elements
27163
- };
27164
- return newNode;
27165
- };
27166
- const propertyTranslators$1 = [
27167
- translator$t,
27168
- translator$r,
27169
- translator$n,
27170
- translator$l,
27171
- translator$j,
27172
- translator$h
27173
- ];
27174
- const propertyTranslatorsByXmlName$1 = {};
27175
- const propertyTranslatorsBySdName$1 = {};
27176
- propertyTranslators$1.forEach((translator2) => {
27177
- propertyTranslatorsByXmlName$1[translator2.xmlName] = translator2;
27178
- propertyTranslatorsBySdName$1[translator2.sdNodeOrKeyName] = translator2;
27179
- });
27180
- const translator$f = NodeTranslator.from({
27181
- xmlName: XML_NODE_NAME$f,
27182
- sdNodeOrKeyName: SD_ATTR_KEY$2,
27183
- type: NodeTranslator.translatorTypes.NODE,
27184
- attributes: [],
27185
- encode: encode$l,
27186
- decode: decode$n
27187
- });
27188
- const XML_NODE_NAME$e = "w:tblPr";
27189
- const SD_ATTR_KEY$1 = "tableProperties";
27190
- const encode$k = (params2) => {
27191
- const { nodes } = params2;
27192
- const node = nodes[0];
27193
- const attributes = encodeProperties(node, propertyTranslatorsByXmlName);
27194
- return {
27195
- xmlName: XML_NODE_NAME$e,
27196
- sdNodeOrKeyName: SD_ATTR_KEY$1,
27197
- attributes
27198
- };
27199
- };
27200
- const decode$m = (params2) => {
27201
- const { tableProperties = {} } = params2.node.attrs || {};
27202
- const elements = decodeProperties(propertyTranslatorsBySdName, tableProperties);
27203
- const newNode = {
27204
- name: "w:tblPr",
27205
- type: "element",
27206
- attributes: {},
27207
- elements
27208
- };
27209
- return newNode;
27210
- };
27211
- const propertyTranslators = [
27184
+ const translator$L = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
27185
+ const translator$K = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
27186
+ const translator$J = NodeTranslator.from(createBorderPropertyHandler("w:end"));
27187
+ const translator$I = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
27188
+ const translator$H = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
27189
+ const translator$G = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
27190
+ const translator$F = NodeTranslator.from(createBorderPropertyHandler("w:left"));
27191
+ const translator$E = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
27192
+ const translator$D = NodeTranslator.from(createBorderPropertyHandler("w:right"));
27193
+ const translator$C = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
27194
+ const translator$B = NodeTranslator.from(createBorderPropertyHandler("w:start"));
27195
+ const translator$A = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
27196
+ const translator$z = NodeTranslator.from(createBorderPropertyHandler("w:top"));
27197
+ const translator$y = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
27198
+ const propertyTranslators$5 = [
27199
+ translator$L,
27200
+ translator$J,
27212
27201
  translator$H,
27213
- translator$P,
27214
27202
  translator$G,
27215
27203
  translator$F,
27216
- translator$O,
27217
- translator$E,
27218
27204
  translator$D,
27219
- translator$C,
27220
27205
  translator$B,
27206
+ translator$z
27207
+ ];
27208
+ const translator$x = NodeTranslator.from(
27209
+ createNestedPropertiesTranslator("w:tblBorders", "borders", propertyTranslators$5)
27210
+ );
27211
+ const propertyTranslators$4 = [
27212
+ translator$K,
27213
+ translator$I,
27214
+ translator$E,
27215
+ translator$C,
27221
27216
  translator$A,
27222
- translator$z,
27223
- translator$y,
27217
+ translator$y
27218
+ ];
27219
+ const translator$w = NodeTranslator.from(
27220
+ createNestedPropertiesTranslator("w:tblCellMar", "cellMargins", propertyTranslators$4)
27221
+ );
27222
+ const propertyTranslators$3 = [
27223
+ translator$Y,
27224
+ translator$14,
27225
+ translator$X,
27226
+ translator$W,
27227
+ translator$13,
27228
+ translator$V,
27229
+ translator$U,
27230
+ translator$T,
27231
+ translator$S,
27232
+ translator$R,
27233
+ translator$Q,
27234
+ translator$P,
27235
+ translator$O,
27236
+ translator$N,
27237
+ translator$M,
27224
27238
  translator$x,
27225
- translator$w,
27226
- translator$v,
27227
- translator$g,
27228
- translator$f
27239
+ translator$w
27229
27240
  ];
27230
- const propertyTranslatorsByXmlName = {};
27231
- const propertyTranslatorsBySdName = {};
27232
- propertyTranslators.forEach((translator2) => {
27233
- propertyTranslatorsByXmlName[translator2.xmlName] = translator2;
27234
- propertyTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
27235
- });
27236
- const config$d = {
27237
- xmlName: XML_NODE_NAME$e,
27238
- sdNodeOrKeyName: SD_ATTR_KEY$1,
27239
- encode: encode$k,
27240
- decode: decode$m
27241
- };
27242
- const translator$e = NodeTranslator.from(config$d);
27243
- const translator$d = NodeTranslator.from(
27241
+ const translator$v = NodeTranslator.from(
27242
+ createNestedPropertiesTranslator("w:tblPr", "tableProperties", propertyTranslators$3)
27243
+ );
27244
+ const translator$u = NodeTranslator.from(
27244
27245
  createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
27245
27246
  );
27246
27247
  const DEFAULT_COLUMN_WIDTH_PX = 100;
@@ -27290,20 +27291,20 @@ const resolveFallbackColumnWidthTwips = (params2, totalColumns, cellMinWidthTwip
27290
27291
  }
27291
27292
  return Math.max(fallbackWidthTwips, cellMinWidthTwips);
27292
27293
  };
27293
- const XML_NODE_NAME$d = "w:tblGrid";
27294
- const SD_ATTR_KEY = "grid";
27294
+ const XML_NODE_NAME$g = "w:tblGrid";
27295
+ const SD_ATTR_KEY$3 = "grid";
27295
27296
  const cellMinWidth = pixelsToTwips(10);
27296
- const encode$j = (params2) => {
27297
+ const encode$m = (params2) => {
27297
27298
  const { nodes } = params2;
27298
27299
  const node = nodes[0];
27299
- const attributes = encodeProperties(node, { [translator$d.xmlName]: translator$d }, true);
27300
+ const attributes = encodeProperties(node, { [translator$u.xmlName]: translator$u }, true);
27300
27301
  return {
27301
- xmlName: XML_NODE_NAME$d,
27302
- sdNodeOrKeyName: SD_ATTR_KEY,
27302
+ xmlName: XML_NODE_NAME$g,
27303
+ sdNodeOrKeyName: SD_ATTR_KEY$3,
27303
27304
  attributes
27304
27305
  };
27305
27306
  };
27306
- const decode$l = (params2) => {
27307
+ const decode$o = (params2) => {
27307
27308
  const { grid: rawGrid } = params2.node.attrs || {};
27308
27309
  const grid = Array.isArray(rawGrid) ? rawGrid : [];
27309
27310
  const { firstRow = {} } = params2.extraParams || {};
@@ -27322,10 +27323,10 @@ const decode$l = (params2) => {
27322
27323
  numericWidth = fallbackColumnWidthTwips;
27323
27324
  }
27324
27325
  numericWidth = Math.max(numericWidth, cellMinWidth);
27325
- const decoded = translator$d.decode({
27326
+ const decoded = translator$u.decode({
27326
27327
  node: { type: (
27327
27328
  /** @type {string} */
27328
- translator$d.sdNodeOrKeyName
27329
+ translator$u.sdNodeOrKeyName
27329
27330
  ), attrs: { col: numericWidth } }
27330
27331
  });
27331
27332
  if (decoded) elements.push(decoded);
@@ -27360,19 +27361,19 @@ const decode$l = (params2) => {
27360
27361
  columnIndex++;
27361
27362
  }
27362
27363
  const newNode = {
27363
- name: XML_NODE_NAME$d,
27364
+ name: XML_NODE_NAME$g,
27364
27365
  attributes: {},
27365
27366
  elements
27366
27367
  };
27367
27368
  return newNode;
27368
27369
  };
27369
- const config$c = {
27370
- xmlName: XML_NODE_NAME$d,
27371
- sdNodeOrKeyName: SD_ATTR_KEY,
27372
- encode: encode$j,
27373
- decode: decode$l
27370
+ const config$f = {
27371
+ xmlName: XML_NODE_NAME$g,
27372
+ sdNodeOrKeyName: SD_ATTR_KEY$3,
27373
+ encode: encode$m,
27374
+ decode: decode$o
27374
27375
  };
27375
- const translator$c = NodeTranslator.from(config$c);
27376
+ const translator$t = NodeTranslator.from(config$f);
27376
27377
  const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
27377
27378
  const DEFAULT_PAGE_MARGIN_TWIPS = 1440;
27378
27379
  const DEFAULT_CONTENT_WIDTH_TWIPS = DEFAULT_PAGE_WIDTH_TWIPS - 2 * DEFAULT_PAGE_MARGIN_TWIPS;
@@ -27435,19 +27436,19 @@ const buildFallbackGridForTable = ({ params: params2, rows, tableWidth, tableWid
27435
27436
  columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
27436
27437
  };
27437
27438
  };
27438
- const XML_NODE_NAME$c = "w:tbl";
27439
+ const XML_NODE_NAME$f = "w:tbl";
27439
27440
  const SD_NODE_NAME$c = "table";
27440
- const encode$i = (params2, encodedAttrs) => {
27441
+ const encode$l = (params2, encodedAttrs) => {
27441
27442
  const { nodes } = params2;
27442
27443
  const node = nodes[0];
27443
27444
  const tblPr = node.elements.find((el) => el.name === "w:tblPr");
27444
27445
  if (tblPr) {
27445
- const encodedProperties = translator$e.encode({ ...params2, nodes: [tblPr] });
27446
- encodedAttrs["tableProperties"] = encodedProperties?.attributes || {};
27446
+ const encodedProperties = translator$v.encode({ ...params2, nodes: [tblPr] });
27447
+ encodedAttrs["tableProperties"] = encodedProperties || {};
27447
27448
  }
27448
27449
  const tblGrid = node.elements.find((el) => el.name === "w:tblGrid");
27449
27450
  if (tblGrid) {
27450
- encodedAttrs["grid"] = translator$c.encode({ ...params2, nodes: [tblGrid] }).attributes;
27451
+ encodedAttrs["grid"] = translator$t.encode({ ...params2, nodes: [tblGrid] }).attributes;
27451
27452
  }
27452
27453
  [
27453
27454
  "tableStyleId",
@@ -27514,7 +27515,7 @@ const encode$i = (params2, encodedAttrs) => {
27514
27515
  }
27515
27516
  const content = [];
27516
27517
  rows.forEach((row) => {
27517
- const result = translator$I.encode({
27518
+ const result = translator$Z.encode({
27518
27519
  ...params2,
27519
27520
  nodes: [row],
27520
27521
  extraParams: {
@@ -27533,13 +27534,13 @@ const encode$i = (params2, encodedAttrs) => {
27533
27534
  attrs: encodedAttrs
27534
27535
  };
27535
27536
  };
27536
- const decode$k = (params2, decodedAttrs) => {
27537
+ const decode$n = (params2, decodedAttrs) => {
27537
27538
  params2.node = preProcessVerticalMergeCells(params2.node, params2);
27538
27539
  const { node } = params2;
27539
27540
  const elements = translateChildNodes(params2);
27540
27541
  const firstRow = node.content?.find((n) => n.type === "tableRow");
27541
27542
  const properties = node.attrs.grid;
27542
- const element = translator$c.decode({
27543
+ const element = translator$t.decode({
27543
27544
  ...params2,
27544
27545
  node: { ...node, attrs: { ...node.attrs, grid: properties } },
27545
27546
  extraParams: {
@@ -27549,7 +27550,7 @@ const decode$k = (params2, decodedAttrs) => {
27549
27550
  if (element) elements.unshift(element);
27550
27551
  if (node.attrs?.tableProperties) {
27551
27552
  const properties2 = { ...node.attrs.tableProperties };
27552
- const element2 = translator$e.decode({
27553
+ const element2 = translator$v.decode({
27553
27554
  ...params2,
27554
27555
  node: { ...node, attrs: { ...node.attrs, tableProperties: properties2 } }
27555
27556
  });
@@ -27569,7 +27570,7 @@ function _processTableBorders(rawBorders) {
27569
27570
  const color = attributes.color;
27570
27571
  const size2 = attributes.size;
27571
27572
  if (color && color !== "auto") attrs["color"] = color.startsWith("#") ? color : `#${color}`;
27572
- if (size2 && size2 !== "auto") attrs["size"] = eigthPointsToPixels(size2);
27573
+ if (size2 && size2 !== "auto") attrs["size"] = eighthPointsToPixels(size2);
27573
27574
  const rowBorderNames = ["insideH", "insideV"];
27574
27575
  if (rowBorderNames.includes(name)) rowBorders[name] = attrs;
27575
27576
  borders[name] = attrs;
@@ -27615,7 +27616,7 @@ function _getReferencedTableStyles(tableStyleReference, params2) {
27615
27616
  if (baseTblPr && baseTblPr.elements) {
27616
27617
  tblPr.elements.push(...baseTblPr.elements);
27617
27618
  }
27618
- const tableProperties = translator$e.encode({ ...params2, nodes: [tblPr] }).attributes;
27619
+ const tableProperties = translator$v.encode({ ...params2, nodes: [tblPr] });
27619
27620
  const { borders, rowBorders } = _processTableBorders(tableProperties.borders || {});
27620
27621
  if (borders) stylesToReturn.borders = borders;
27621
27622
  if (rowBorders) stylesToReturn.rowBorders = rowBorders;
@@ -27632,16 +27633,16 @@ function _getReferencedTableStyles(tableStyleReference, params2) {
27632
27633
  }
27633
27634
  return stylesToReturn;
27634
27635
  }
27635
- const config$b = {
27636
- xmlName: XML_NODE_NAME$c,
27636
+ const config$e = {
27637
+ xmlName: XML_NODE_NAME$f,
27637
27638
  sdNodeOrKeyName: SD_NODE_NAME$c,
27638
27639
  type: NodeTranslator.translatorTypes.NODE,
27639
- encode: encode$i,
27640
- decode: decode$k,
27640
+ encode: encode$l,
27641
+ decode: decode$n,
27641
27642
  attributes: []
27642
27643
  };
27643
- const translator$b = NodeTranslator.from(config$b);
27644
- const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$b);
27644
+ const translator$s = NodeTranslator.from(config$e);
27645
+ const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$s);
27645
27646
  function getReferencedTableStyles(tblStyleTag, docx) {
27646
27647
  if (!tblStyleTag) return null;
27647
27648
  const stylesToReturn = {};
@@ -27712,7 +27713,7 @@ function processTableBorders(borderElements) {
27712
27713
  const color = attributes["w:color"];
27713
27714
  const size2 = attributes["w:sz"];
27714
27715
  if (color && color !== "auto") attrs["color"] = color.startsWith("#") ? color : `#${color}`;
27715
- if (size2 && size2 !== "auto") attrs["size"] = eigthPointsToPixels(size2);
27716
+ if (size2 && size2 !== "auto") attrs["size"] = eighthPointsToPixels(size2);
27716
27717
  const rowBorderNames = ["insideH", "insideV"];
27717
27718
  if (rowBorderNames.includes(borderName)) rowBorders[borderName] = attrs;
27718
27719
  borders[borderName] = attrs;
@@ -27722,6 +27723,125 @@ function processTableBorders(borderElements) {
27722
27723
  rowBorders
27723
27724
  };
27724
27725
  }
27726
+ const translator$r = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
27727
+ const translator$q = NodeTranslator.from(
27728
+ createSingleAttrPropertyHandler(
27729
+ "w:gridSpan",
27730
+ null,
27731
+ "w:val",
27732
+ (v2) => parseInteger(v2) ?? void 0,
27733
+ (v2) => integerToString(v2)
27734
+ )
27735
+ );
27736
+ const translator$p = NodeTranslator.from(createSingleAttrPropertyHandler("w:vMerge"));
27737
+ const translator$o = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
27738
+ const translator$n = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
27739
+ const propertyTranslators$2 = [
27740
+ translator$z,
27741
+ translator$B,
27742
+ translator$F,
27743
+ translator$L,
27744
+ translator$J,
27745
+ translator$D,
27746
+ translator$H,
27747
+ translator$G,
27748
+ translator$o,
27749
+ translator$n
27750
+ ];
27751
+ const translator$m = NodeTranslator.from(
27752
+ createNestedPropertiesTranslator("w:tcBorders", "borders", propertyTranslators$2)
27753
+ );
27754
+ const translator$l = NodeTranslator.from(
27755
+ createSingleAttrPropertyHandler(
27756
+ "w:noWrap",
27757
+ null,
27758
+ "w:val",
27759
+ (v2) => parseBoolean(v2 ?? "true"),
27760
+ (v2) => booleanToString(v2)
27761
+ )
27762
+ );
27763
+ const propertyTranslators$1 = [
27764
+ translator$K,
27765
+ translator$I,
27766
+ translator$E,
27767
+ translator$C,
27768
+ translator$A,
27769
+ translator$y
27770
+ ];
27771
+ const translator$k = NodeTranslator.from(
27772
+ createNestedPropertiesTranslator("w:tcMar", "cellMargins", propertyTranslators$1)
27773
+ );
27774
+ const translator$j = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
27775
+ const translator$i = NodeTranslator.from(
27776
+ createSingleAttrPropertyHandler(
27777
+ "w:tcFitText",
27778
+ null,
27779
+ "w:val",
27780
+ (v2) => parseBoolean(v2 ?? "true"),
27781
+ (v2) => booleanToString(v2)
27782
+ )
27783
+ );
27784
+ const translator$h = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
27785
+ const translator$g = NodeTranslator.from(
27786
+ createSingleAttrPropertyHandler(
27787
+ "w:hideMark",
27788
+ null,
27789
+ "w:val",
27790
+ (v2) => parseBoolean(v2 ?? "true"),
27791
+ (v2) => booleanToString(v2)
27792
+ )
27793
+ );
27794
+ const translator$f = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
27795
+ const XML_NODE_NAME$e = "w:headers";
27796
+ const SD_ATTR_KEY$2 = "headers";
27797
+ const encode$k = (params2) => {
27798
+ const { nodes } = params2;
27799
+ const node = nodes[0];
27800
+ const attributes = encodeProperties(node, { [translator$f.xmlName]: translator$f }, true);
27801
+ return {
27802
+ xmlName: XML_NODE_NAME$e,
27803
+ sdNodeOrKeyName: SD_ATTR_KEY$2,
27804
+ attributes
27805
+ };
27806
+ };
27807
+ const decode$m = (params2) => {
27808
+ const { headers = [] } = params2.node.attrs || {};
27809
+ const newNode = {
27810
+ name: XML_NODE_NAME$e,
27811
+ attributes: {},
27812
+ elements: headers.map(
27813
+ (header) => translator$f.decode({
27814
+ node: { type: "header", attrs: header }
27815
+ })
27816
+ )
27817
+ };
27818
+ return newNode;
27819
+ };
27820
+ const config$d = {
27821
+ xmlName: XML_NODE_NAME$e,
27822
+ sdNodeOrKeyName: SD_ATTR_KEY$2,
27823
+ encode: encode$k,
27824
+ decode: decode$m
27825
+ };
27826
+ const translator$e = NodeTranslator.from(config$d);
27827
+ const propertyTranslators = [
27828
+ translator$19,
27829
+ translator$r,
27830
+ translator$q,
27831
+ translator$p,
27832
+ translator$m,
27833
+ translator$X,
27834
+ translator$l,
27835
+ translator$k,
27836
+ translator$j,
27837
+ translator$i,
27838
+ translator$h,
27839
+ translator$g,
27840
+ translator$e
27841
+ ];
27842
+ const translator$d = NodeTranslator.from(
27843
+ createNestedPropertiesTranslator("w:tcPr", "tableCellProperties", propertyTranslators)
27844
+ );
27725
27845
  function handleTableCellNode({
27726
27846
  params: params2,
27727
27847
  node,
@@ -27734,8 +27854,10 @@ function handleTableCellNode({
27734
27854
  allColumnWidths = []
27735
27855
  }) {
27736
27856
  const { docx, nodeListHandler } = params2;
27857
+ const attributes = {};
27737
27858
  const tcPr = node.elements.find((el) => el.name === "w:tcPr");
27738
- const borders = tcPr?.elements?.find((el) => el.name === "w:tcBorders");
27859
+ const tableCellProperties = tcPr ? translator$d.encode({ ...params2, nodes: [tcPr] }) ?? {} : {};
27860
+ attributes["tableCellProperties"] = tableCellProperties;
27739
27861
  if (rowBorders?.insideH) {
27740
27862
  rowBorders["bottom"] = rowBorders.insideH;
27741
27863
  delete rowBorders.insideH;
@@ -27744,33 +27866,20 @@ function handleTableCellNode({
27744
27866
  rowBorders["right"] = rowBorders.insideV;
27745
27867
  delete rowBorders?.insideV;
27746
27868
  }
27747
- const inlineBorders = processInlineCellBorders(borders, rowBorders);
27748
- const gridColumnWidths = allColumnWidths;
27749
- const tcWidth = tcPr?.elements?.find((el) => el.name === "w:tcW");
27750
- let width = tcWidth ? twipsToPixels(tcWidth.attributes["w:w"]) : null;
27751
- const widthType = tcWidth?.attributes["w:type"];
27869
+ if (rowBorders) attributes["borders"] = { ...rowBorders };
27870
+ const inlineBorders = processInlineCellBorders(tableCellProperties.borders, rowBorders);
27871
+ if (inlineBorders) attributes["borders"] = Object.assign(attributes["borders"] || {}, inlineBorders);
27872
+ const colspan = tableCellProperties.gridSpan;
27873
+ if (colspan && !isNaN(parseInt(colspan, 10))) attributes["colspan"] = parseInt(colspan, 10);
27874
+ let width = tableCellProperties.cellWidth?.value ? twipsToPixels(tableCellProperties.cellWidth?.value) : null;
27875
+ const widthType = tableCellProperties.cellWidth?.type;
27876
+ if (widthType) attributes["widthType"] = widthType;
27752
27877
  if (!width && columnWidth) width = columnWidth;
27753
- const vMerge = getTableCellMergeTag(node);
27754
- const { attributes: vMergeAttrs } = vMerge || {};
27755
- const backgroundColor = tcPr?.elements?.find((el) => el.name === "w:shd");
27756
- const background = {
27757
- color: backgroundColor?.attributes["w:fill"]
27758
- };
27759
- const colspanTag = tcPr?.elements?.find((el) => el.name === "w:gridSpan");
27760
- const colspan = colspanTag?.attributes["w:val"];
27761
- const marginTag = tcPr?.elements?.find((el) => el.name === "w:tcMar");
27762
- const verticalAlignTag = tcPr?.elements?.find((el) => el.name === "w:vAlign");
27763
- const verticalAlign = verticalAlignTag?.attributes["w:val"] || "top";
27764
- const attributes = {};
27765
- const referencedStyles = getReferencedTableStyles(styleTag, docx) || {};
27766
- attributes.cellMargins = getTableCellMargins(marginTag, referencedStyles);
27767
- const { fontSize: fontSize2, fonts = {} } = referencedStyles;
27768
- const fontFamily2 = fonts["ascii"];
27769
27878
  if (width) {
27770
27879
  attributes["colwidth"] = [width];
27771
27880
  attributes["widthUnit"] = "px";
27772
- const defaultColWidths = gridColumnWidths;
27773
- const hasDefaultColWidths = gridColumnWidths && gridColumnWidths.length > 0;
27881
+ const defaultColWidths = allColumnWidths;
27882
+ const hasDefaultColWidths = allColumnWidths && allColumnWidths.length > 0;
27774
27883
  const colspanNum = parseInt(colspan || 1, 10);
27775
27884
  if (colspanNum && colspanNum > 1 && hasDefaultColWidths) {
27776
27885
  let colwidth = [];
@@ -27788,15 +27897,19 @@ function handleTableCellNode({
27788
27897
  }
27789
27898
  }
27790
27899
  }
27791
- if (widthType) attributes["widthType"] = widthType;
27792
- if (colspan) attributes["colspan"] = parseInt(colspan, 10);
27793
- if (background) attributes["background"] = background;
27794
- attributes["verticalAlign"] = verticalAlign;
27900
+ const background = {
27901
+ color: tableCellProperties.shading?.fill
27902
+ };
27903
+ if (background.color) attributes["background"] = background;
27904
+ const verticalAlign = tableCellProperties.vAlign;
27905
+ if (verticalAlign) attributes["verticalAlign"] = verticalAlign;
27906
+ const referencedStyles = getReferencedTableStyles(styleTag, docx) || { fontSize: null, fonts: {}, cellMargins: {} };
27907
+ attributes.cellMargins = getTableCellMargins(tableCellProperties.cellMargins, referencedStyles);
27908
+ const { fontSize: fontSize2, fonts = {} } = referencedStyles;
27909
+ const fontFamily2 = fonts["ascii"];
27795
27910
  if (fontSize2) attributes["fontSize"] = fontSize2;
27796
- if (fontFamily2) attributes["fontFamily"] = fontFamily2["ascii"];
27797
- if (rowBorders) attributes["borders"] = { ...rowBorders };
27798
- if (inlineBorders) attributes["borders"] = Object.assign(attributes["borders"] || {}, inlineBorders);
27799
- if (vMergeAttrs && vMergeAttrs["w:val"] === "restart") {
27911
+ if (fontFamily2) attributes["fontFamily"] = fontFamily2;
27912
+ if (tableCellProperties.vMerge === "restart") {
27800
27913
  const rows = table.elements.filter((el) => el.name === "w:tr");
27801
27914
  const currentRowIndex = rows.findIndex((r2) => r2 === row);
27802
27915
  const remainingRows = rows.slice(currentRowIndex + 1);
@@ -27807,9 +27920,8 @@ function handleTableCellNode({
27807
27920
  const firstCell = remainingRow.elements.findIndex((el) => el.name === "w:tc");
27808
27921
  const cellAtIndex = remainingRow.elements[firstCell + cellIndex];
27809
27922
  if (!cellAtIndex) break;
27810
- const vMerge2 = getTableCellMergeTag(cellAtIndex);
27811
- const { attributes: currentCellMergeAttrs } = vMerge2 || {};
27812
- if (!vMerge2 && !currentCellMergeAttrs || currentCellMergeAttrs && currentCellMergeAttrs["w:val"] === "restart") {
27923
+ const vMerge = getTableCellVMerge(cellAtIndex);
27924
+ if (!vMerge || vMerge === "restart") {
27813
27925
  break;
27814
27926
  }
27815
27927
  rowspan++;
@@ -27829,69 +27941,52 @@ function handleTableCellNode({
27829
27941
  }
27830
27942
  const processInlineCellBorders = (borders, rowBorders) => {
27831
27943
  if (!borders) return null;
27832
- const processedBorders = {};
27833
- const inlineBorderBottom = processBorder(borders, "bottom", rowBorders);
27834
- if (inlineBorderBottom) processedBorders["bottom"] = inlineBorderBottom;
27835
- const inlineBorderTop = processBorder(borders, "top", rowBorders);
27836
- if (inlineBorderTop) processedBorders["top"] = inlineBorderTop;
27837
- const inlineBorderLeft = processBorder(borders, "left", rowBorders);
27838
- if (inlineBorderLeft) processedBorders["left"] = inlineBorderLeft;
27839
- const inlineBorderRight = processBorder(borders, "right", rowBorders);
27840
- if (inlineBorderRight) processedBorders["right"] = inlineBorderRight;
27841
- return processedBorders;
27842
- };
27843
- const processBorder = (borders, direction, rowBorders = {}) => {
27844
- const borderAttrs = borders?.elements?.find((el) => el.name === `w:${direction}`)?.attributes;
27845
- if (borderAttrs && borderAttrs["w:val"] !== "nil") {
27846
- const border = {};
27847
- const color = borderAttrs["w:color"];
27848
- if (color) border["color"] = color === "auto" ? "#000000" : `#${color}`;
27849
- const size2 = borderAttrs["w:sz"];
27850
- if (size2) border["size"] = eigthPointsToPixels(size2);
27851
- return border;
27852
- }
27853
- if (borderAttrs && borderAttrs["w:val"] === "nil") {
27854
- const border = Object.assign({}, rowBorders[direction] || {});
27855
- if (!Object.keys(border)) return null;
27856
- border["val"] = "none";
27857
- return border;
27858
- }
27859
- return null;
27944
+ return ["bottom", "top", "left", "right"].reduce((acc, direction) => {
27945
+ const borderAttrs = borders[direction];
27946
+ const rowBorderAttrs = rowBorders[direction];
27947
+ if (borderAttrs && borderAttrs["val"] !== "nil") {
27948
+ const color = borderAttrs["color"];
27949
+ let size2 = borderAttrs["size"];
27950
+ if (size2) size2 = eighthPointsToPixels(size2);
27951
+ acc[direction] = { color, size: size2, val: borderAttrs["val"] };
27952
+ return acc;
27953
+ }
27954
+ if (borderAttrs && borderAttrs["val"] === "nil") {
27955
+ const border = Object.assign({}, rowBorderAttrs || {});
27956
+ if (!Object.keys(border).length) {
27957
+ return acc;
27958
+ } else {
27959
+ border["val"] = "none";
27960
+ acc[direction] = border;
27961
+ return acc;
27962
+ }
27963
+ }
27964
+ return acc;
27965
+ }, {});
27860
27966
  };
27861
- const getTableCellMergeTag = (node) => {
27967
+ const getTableCellVMerge = (node) => {
27862
27968
  const tcPr = node.elements.find((el) => el.name === "w:tcPr");
27863
27969
  const vMerge = tcPr?.elements?.find((el) => el.name === "w:vMerge");
27864
- return vMerge;
27865
- };
27866
- const getTableCellMargins = (marginTag, referencedStyles) => {
27867
- const inlineMarginLeftTag = marginTag?.elements?.find((el) => el.name === "w:left");
27868
- const inlineMarginRightTag = marginTag?.elements?.find((el) => el.name === "w:right");
27869
- const inlineMarginTopTag = marginTag?.elements?.find((el) => el.name === "w:top");
27870
- const inlineMarginBottomTag = marginTag?.elements?.find((el) => el.name === "w:bottom");
27871
- const inlineMarginLeftValue = inlineMarginLeftTag?.attributes["w:w"];
27872
- const inlineMarginRightValue = inlineMarginRightTag?.attributes["w:w"];
27873
- const inlineMarginTopValue = inlineMarginTopTag?.attributes["w:w"];
27874
- const inlineMarginBottomValue = inlineMarginBottomTag?.attributes["w:w"];
27970
+ if (!vMerge) return null;
27971
+ return vMerge.attributes?.["w:val"] || "continue";
27972
+ };
27973
+ const getTableCellMargins = (inlineMargins, referencedStyles) => {
27875
27974
  const { cellMargins = {} } = referencedStyles;
27876
- const {
27877
- marginLeft: marginLeftStyle,
27878
- marginRight: marginRightStyle,
27879
- marginTop: marginTopStyle,
27880
- marginBottom: marginBottomStyle
27881
- } = cellMargins;
27882
- const resolveMargin = (inlineValue, styleValue) => {
27883
- if (inlineValue != null) return inlineValue;
27884
- if (styleValue == null) return void 0;
27885
- if (typeof styleValue === "object") return styleValue.value;
27886
- return styleValue;
27887
- };
27888
- const margins = {
27889
- left: twipsToPixels(resolveMargin(inlineMarginLeftValue, marginLeftStyle)),
27890
- right: twipsToPixels(resolveMargin(inlineMarginRightValue, marginRightStyle)),
27891
- top: twipsToPixels(resolveMargin(inlineMarginTopValue, marginTopStyle)),
27892
- bottom: twipsToPixels(resolveMargin(inlineMarginBottomValue, marginBottomStyle))
27893
- };
27894
- return margins;
27975
+ return ["left", "right", "top", "bottom"].reduce((acc, direction) => {
27976
+ const key2 = `margin${direction.charAt(0).toUpperCase() + direction.slice(1)}`;
27977
+ const inlineValue = inlineMargins ? inlineMargins?.[key2]?.value : null;
27978
+ const styleValue = cellMargins ? cellMargins[key2] : null;
27979
+ if (inlineValue != null) {
27980
+ acc[direction] = twipsToPixels(inlineValue);
27981
+ } else if (styleValue == null) {
27982
+ acc[direction] = void 0;
27983
+ } else if (typeof styleValue === "object") {
27984
+ acc[direction] = twipsToPixels(styleValue.value);
27985
+ } else {
27986
+ acc[direction] = twipsToPixels(styleValue);
27987
+ }
27988
+ return acc;
27989
+ }, {});
27895
27990
  };
27896
27991
  function translateTableCell(params2) {
27897
27992
  const elements = translateChildNodes({
@@ -27906,107 +28001,91 @@ function translateTableCell(params2) {
27906
28001
  };
27907
28002
  }
27908
28003
  function generateTableCellProperties(node) {
27909
- const elements = [];
28004
+ const tableCellProperties = { ...node.attrs?.tableCellProperties || {} };
27910
28005
  const { attrs } = node;
27911
- const { colwidth = [], cellWidthType = "dxa", background = {}, colspan, rowspan, widthUnit } = attrs;
28006
+ const { colwidth = [], cellWidthType = "dxa", widthUnit } = attrs;
27912
28007
  const colwidthSum = colwidth.reduce((acc, curr) => acc + curr, 0);
27913
- const cellWidthElement = {
27914
- name: "w:tcW",
27915
- attributes: {
27916
- "w:w": widthUnit === "px" ? pixelsToTwips(colwidthSum) : inchesToTwips(colwidthSum),
27917
- "w:type": cellWidthType
27918
- }
27919
- };
27920
- elements.push(cellWidthElement);
27921
- if (colspan) {
27922
- const gridSpanElement = {
27923
- name: "w:gridSpan",
27924
- attributes: { "w:val": `${colspan}` }
28008
+ const propertiesWidthPixels = twipsToPixels(tableCellProperties.cellWidth?.value);
28009
+ if (propertiesWidthPixels !== colwidthSum) {
28010
+ tableCellProperties["cellWidth"] = {
28011
+ value: widthUnit === "px" ? pixelsToTwips(colwidthSum) : inchesToTwips(colwidthSum),
28012
+ type: cellWidthType
27925
28013
  };
27926
- elements.push(gridSpanElement);
27927
28014
  }
27928
- const { color } = background || {};
27929
- if (color) {
27930
- const cellBgElement = {
27931
- name: "w:shd",
27932
- attributes: { "w:fill": color }
27933
- };
27934
- elements.push(cellBgElement);
28015
+ const { colspan } = attrs;
28016
+ if (colspan > 1 && tableCellProperties.gridSpan !== colspan) {
28017
+ tableCellProperties["gridSpan"] = colspan;
28018
+ } else if (!colspan || tableCellProperties?.gridSpan === 1) {
28019
+ delete tableCellProperties.gridSpan;
28020
+ }
28021
+ const { background = {} } = attrs;
28022
+ if (background?.color && tableCellProperties.shading?.fill !== background?.color) {
28023
+ tableCellProperties["shading"] = { fill: background.color };
28024
+ } else if (!background?.color && tableCellProperties?.shading?.fill) {
28025
+ delete tableCellProperties.shading;
27935
28026
  }
27936
28027
  const { cellMargins } = attrs;
27937
28028
  if (cellMargins) {
27938
- const cellMarginsElement = {
27939
- name: "w:tcMar",
27940
- elements: generateCellMargins(cellMargins)
27941
- };
27942
- elements.push(cellMarginsElement);
28029
+ ["left", "right", "top", "bottom"].forEach((side) => {
28030
+ const key2 = `margin${side.charAt(0).toUpperCase() + side.slice(1)}`;
28031
+ if (cellMargins[side] != null) {
28032
+ if (!tableCellProperties.cellMargins) tableCellProperties["cellMargins"] = {};
28033
+ let currentPropertyValuePixels = twipsToPixels(tableCellProperties.cellMargins?.[key2]?.value);
28034
+ if (currentPropertyValuePixels !== cellMargins[side]) {
28035
+ tableCellProperties.cellMargins[key2] = { value: pixelsToTwips(cellMargins[side]), type: "dxa" };
28036
+ }
28037
+ } else if (tableCellProperties?.cellMargins?.[key2]) {
28038
+ delete tableCellProperties.cellMargins[key2];
28039
+ }
28040
+ });
27943
28041
  }
27944
28042
  const { verticalAlign } = attrs;
27945
- if (verticalAlign) {
27946
- const vertAlignElement = {
27947
- name: "w:vAlign",
27948
- attributes: { "w:val": verticalAlign }
27949
- };
27950
- elements.push(vertAlignElement);
27951
- }
27952
- if (rowspan && rowspan > 1) {
27953
- const vMergeElement = {
27954
- name: "w:vMerge",
27955
- type: "element",
27956
- attributes: { "w:val": "restart" }
27957
- };
27958
- elements.push(vMergeElement);
28043
+ if (verticalAlign && verticalAlign !== tableCellProperties.vAlign) {
28044
+ tableCellProperties["vAlign"] = verticalAlign;
28045
+ } else if (!verticalAlign && tableCellProperties?.vAlign) {
28046
+ delete tableCellProperties.vAlign;
28047
+ }
28048
+ const { rowspan } = attrs;
28049
+ if (rowspan && rowspan > 1 && tableCellProperties.vMerge !== "restart") {
28050
+ tableCellProperties["vMerge"] = "restart";
27959
28051
  } else if (attrs.continueMerge) {
27960
- const vMergeElement = {
27961
- name: "w:vMerge",
27962
- type: "element"
27963
- };
27964
- elements.push(vMergeElement);
28052
+ tableCellProperties["vMerge"] = "continue";
28053
+ } else if (tableCellProperties?.vMerge) {
28054
+ delete tableCellProperties.vMerge;
27965
28055
  }
27966
28056
  const { borders = {} } = attrs;
27967
28057
  if (!!borders && Object.keys(borders).length) {
27968
- const cellBordersElement = {
27969
- name: "w:tcBorders",
27970
- elements: Object.entries(borders).map(([key2, value]) => {
27971
- if (!value.size || value.val === "none") {
27972
- return {
27973
- name: `w:${key2}`,
27974
- attributes: {
27975
- "w:val": "nil"
27976
- }
28058
+ ["top", "bottom", "left", "right"].forEach((side) => {
28059
+ if (borders[side]) {
28060
+ let currentPropertyValue = tableCellProperties.borders?.[side];
28061
+ let currentPropertySizePixels = eighthPointsToPixels(currentPropertyValue?.size);
28062
+ let color = borders[side].color;
28063
+ if (borders[side].color && color === "#000000") {
28064
+ color = "auto";
28065
+ }
28066
+ if (currentPropertySizePixels !== borders[side].size || currentPropertyValue?.color !== color || borders[side].val !== currentPropertyValue?.val) {
28067
+ if (!tableCellProperties.borders) tableCellProperties["borders"] = {};
28068
+ tableCellProperties.borders[side] = {
28069
+ size: pixelsToEightPoints(borders[side].size || 0),
28070
+ color,
28071
+ space: borders[side].space || 0,
28072
+ val: borders[side].val || "single"
27977
28073
  };
27978
28074
  }
27979
- return {
27980
- name: `w:${key2}`,
27981
- attributes: {
27982
- "w:val": "single",
27983
- "w:color": value.color ? value.color.substring(1) : "auto",
27984
- "w:sz": pixelsToEightPoints(value.size),
27985
- "w:space": value.space || 0
27986
- }
27987
- };
27988
- })
27989
- };
27990
- elements.push(cellBordersElement);
28075
+ } else if (tableCellProperties.borders?.[side]) {
28076
+ delete tableCellProperties.borders[side];
28077
+ }
28078
+ });
28079
+ } else if (tableCellProperties?.borders) {
28080
+ delete tableCellProperties.borders;
27991
28081
  }
27992
- return {
27993
- name: "w:tcPr",
27994
- elements
27995
- };
27996
- }
27997
- function generateCellMargins(cellMargins) {
27998
- const elements = [];
27999
- const { top: top2, right: right2, bottom: bottom2, left: left2 } = cellMargins;
28000
- if (top2 != null) elements.push({ name: "w:top", attributes: { "w:w": pixelsToTwips(top2) } });
28001
- if (right2 != null) elements.push({ name: "w:right", attributes: { "w:w": pixelsToTwips(right2) } });
28002
- if (bottom2 != null) elements.push({ name: "w:bottom", attributes: { "w:w": pixelsToTwips(bottom2) } });
28003
- if (left2 != null) elements.push({ name: "w:left", attributes: { "w:w": pixelsToTwips(left2) } });
28004
- return elements;
28082
+ const result = translator$d.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
28083
+ return result;
28005
28084
  }
28006
- const XML_NODE_NAME$b = "w:tc";
28085
+ const XML_NODE_NAME$d = "w:tc";
28007
28086
  const SD_NODE_NAME$b = "tableCell";
28008
- const validXmlAttributes$8 = [];
28009
- function encode$h(params2, encodedAttrs) {
28087
+ const validXmlAttributes$a = [];
28088
+ function encode$j(params2, encodedAttrs) {
28010
28089
  const {
28011
28090
  node,
28012
28091
  table,
@@ -28033,22 +28112,22 @@ function encode$h(params2, encodedAttrs) {
28033
28112
  }
28034
28113
  return schemaNode;
28035
28114
  }
28036
- function decode$j(params2, decodedAttrs) {
28115
+ function decode$l(params2, decodedAttrs) {
28037
28116
  const translated = translateTableCell(params2);
28038
28117
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
28039
28118
  translated.attributes = { ...translated.attributes || {}, ...decodedAttrs };
28040
28119
  }
28041
28120
  return translated;
28042
28121
  }
28043
- const config$a = {
28044
- xmlName: XML_NODE_NAME$b,
28122
+ const config$c = {
28123
+ xmlName: XML_NODE_NAME$d,
28045
28124
  sdNodeOrKeyName: SD_NODE_NAME$b,
28046
28125
  type: NodeTranslator.translatorTypes.NODE,
28047
- encode: encode$h,
28048
- decode: decode$j,
28049
- attributes: validXmlAttributes$8
28126
+ encode: encode$j,
28127
+ decode: decode$l,
28128
+ attributes: validXmlAttributes$a
28050
28129
  };
28051
- const translator$a = NodeTranslator.from(config$a);
28130
+ const translator$c = NodeTranslator.from(config$c);
28052
28131
  function parseTagValueJSON(json) {
28053
28132
  if (typeof json !== "string") {
28054
28133
  return {};
@@ -28475,8 +28554,64 @@ function handleImageNode(node, params2, isAnchor) {
28475
28554
  const vRelativeFrom = positionVTag?.attributes.relativeFrom;
28476
28555
  const alignV = positionVTag?.elements?.find((el) => el.name === "wp:align")?.elements[0]?.text;
28477
28556
  const simplePos = node.elements.find((el) => el.name === "wp:simplePos");
28478
- const wrapSquare = node.elements.find((el) => el.name === "wp:wrapSquare");
28479
- const wrapTopAndBottom = node.elements.find((el) => el.name === "wp:wrapTopAndBottom");
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
+ }
28480
28615
  const docPr = node.elements.find((el) => el.name === "wp:docPr");
28481
28616
  let anchorData = null;
28482
28617
  if (hRelativeFrom || alignH || vRelativeFrom || alignV) {
@@ -28488,7 +28623,7 @@ function handleImageNode(node, params2, isAnchor) {
28488
28623
  };
28489
28624
  }
28490
28625
  const marginOffset = {
28491
- left: positionHValue,
28626
+ horizontal: positionHValue,
28492
28627
  top: positionVValue
28493
28628
  };
28494
28629
  const { attributes: blipAttributes = {} } = blip;
@@ -28527,10 +28662,7 @@ function handleImageNode(node, params2, isAnchor) {
28527
28662
  y: simplePos.attributes.y
28528
28663
  }
28529
28664
  },
28530
- ...wrapSquare && {
28531
- wrapText: wrapSquare.attributes.wrapText
28532
- },
28533
- wrapTopAndBottom: !!wrapTopAndBottom,
28665
+ wrap: wrap2,
28534
28666
  originalPadding: {
28535
28667
  distT: attributes["distT"],
28536
28668
  distB: attributes["distB"],
@@ -28878,7 +29010,6 @@ function addNewImageRelationship(params2, imagePath) {
28878
29010
  function translateAnchorNode(params2) {
28879
29011
  const { attrs } = params2.node;
28880
29012
  const anchorElements = [];
28881
- const wrapElements = [];
28882
29013
  if (attrs.simplePos) {
28883
29014
  anchorElements.push({
28884
29015
  name: "wp:simplePos",
@@ -28890,10 +29021,10 @@ function translateAnchorNode(params2) {
28890
29021
  }
28891
29022
  if (attrs.anchorData) {
28892
29023
  const hElements = [];
28893
- if (attrs.marginOffset.left !== void 0) {
29024
+ if (attrs.marginOffset.horizontal !== void 0) {
28894
29025
  hElements.push({
28895
29026
  name: "wp:posOffset",
28896
- elements: [{ type: "text", text: pixelsToEmu(attrs.marginOffset.left).toString() }]
29027
+ elements: [{ type: "text", text: pixelsToEmu(attrs.marginOffset.horizontal).toString() }]
28897
29028
  });
28898
29029
  }
28899
29030
  if (attrs.anchorData.alignH) {
@@ -28926,38 +29057,110 @@ function translateAnchorNode(params2) {
28926
29057
  ...vElements.length && { elements: vElements }
28927
29058
  });
28928
29059
  }
28929
- if (attrs.wrapText) {
28930
- wrapElements.push({
28931
- name: "wp:wrapSquare",
28932
- attributes: {
28933
- wrapText: attrs.wrapText
28934
- }
28935
- });
29060
+ const nodeElements = translateImageNode(params2);
29061
+ const inlineAttrs = {
29062
+ ...attrs.originalAttributes || {},
29063
+ ...nodeElements.attributes || {}
29064
+ };
29065
+ if (inlineAttrs.relativeHeight == null) {
29066
+ inlineAttrs.relativeHeight = 1;
28936
29067
  }
28937
- if (attrs.wrapTopAndBottom) {
28938
- wrapElements.push({
28939
- name: "wp:wrapTopAndBottom"
28940
- });
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;
28941
29072
  }
28942
- if (!wrapElements.length) {
28943
- wrapElements.push({
28944
- name: "wp:wrapNone"
28945
- });
29073
+ if (attrs.originalAttributes?.locked !== void 0) {
29074
+ inlineAttrs.locked = attrs.originalAttributes.locked;
28946
29075
  }
28947
- const nodeElements = translateImageNode(params2);
28948
- const inlineAttrs = {
28949
- ...nodeElements.attributes,
28950
- simplePos: attrs.originalAttributes?.simplePos,
28951
- relativeHeight: 1,
28952
- behindDoc: attrs.originalAttributes?.behindDoc,
28953
- locked: attrs.originalAttributes?.locked,
28954
- layoutInCell: attrs.originalAttributes?.layoutInCell,
28955
- allowOverlap: attrs.originalAttributes?.allowOverlap
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.
28956
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
+ }
28957
29160
  const effectIndex = nodeElements.elements.findIndex((el) => el.name === "wp:effectExtent");
28958
29161
  const elementsWithWrap = [
28959
29162
  ...nodeElements.elements.slice(0, effectIndex + 1),
28960
- ...wrapElements,
29163
+ wrapElement,
28961
29164
  ...nodeElements.elements.slice(effectIndex + 1)
28962
29165
  ];
28963
29166
  return {
@@ -28966,32 +29169,32 @@ function translateAnchorNode(params2) {
28966
29169
  elements: [...anchorElements, ...elementsWithWrap]
28967
29170
  };
28968
29171
  }
28969
- const XML_NODE_NAME$a = "wp:anchor";
29172
+ const XML_NODE_NAME$c = "wp:anchor";
28970
29173
  const SD_NODE_NAME$a = ["image"];
28971
- const validXmlAttributes$7 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
28972
- function encode$g(params2) {
29174
+ const validXmlAttributes$9 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
29175
+ function encode$i(params2) {
28973
29176
  const { node } = params2.extraParams;
28974
29177
  if (!node || !node.type) {
28975
29178
  return null;
28976
29179
  }
28977
29180
  return handleAnchorNode(params2);
28978
29181
  }
28979
- function decode$i(params2) {
29182
+ function decode$k(params2) {
28980
29183
  const { node } = params2;
28981
29184
  if (!node || !node.type) {
28982
29185
  return null;
28983
29186
  }
28984
29187
  return translateAnchorNode(params2);
28985
29188
  }
28986
- const config$9 = {
28987
- xmlName: XML_NODE_NAME$a,
29189
+ const config$b = {
29190
+ xmlName: XML_NODE_NAME$c,
28988
29191
  sdNodeOrKeyName: SD_NODE_NAME$a,
28989
29192
  type: NodeTranslator.translatorTypes.NODE,
28990
- encode: encode$g,
28991
- decode: decode$i,
28992
- attributes: validXmlAttributes$7
29193
+ encode: encode$i,
29194
+ decode: decode$k,
29195
+ attributes: validXmlAttributes$9
28993
29196
  };
28994
- const translator$9 = NodeTranslator.from(config$9);
29197
+ const translator$b = NodeTranslator.from(config$b);
28995
29198
  function handleInlineNode(params2) {
28996
29199
  const { node } = params2.extraParams;
28997
29200
  if (node.name !== "wp:inline") {
@@ -29007,41 +29210,41 @@ function translateInlineNode(params2) {
29007
29210
  elements: nodeElements.elements
29008
29211
  };
29009
29212
  }
29010
- const XML_NODE_NAME$9 = "wp:inline";
29213
+ const XML_NODE_NAME$b = "wp:inline";
29011
29214
  const SD_NODE_NAME$9 = ["image"];
29012
- const validXmlAttributes$6 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
29013
- function encode$f(params2) {
29215
+ const validXmlAttributes$8 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
29216
+ function encode$h(params2) {
29014
29217
  const { node } = params2.extraParams;
29015
29218
  if (!node || !node.type) {
29016
29219
  return null;
29017
29220
  }
29018
29221
  return handleInlineNode(params2);
29019
29222
  }
29020
- function decode$h(params2) {
29223
+ function decode$j(params2) {
29021
29224
  const { node } = params2;
29022
29225
  if (!node || !node.type) {
29023
29226
  return null;
29024
29227
  }
29025
29228
  return translateInlineNode(params2);
29026
29229
  }
29027
- const config$8 = {
29028
- xmlName: XML_NODE_NAME$9,
29230
+ const config$a = {
29231
+ xmlName: XML_NODE_NAME$b,
29029
29232
  sdNodeOrKeyName: SD_NODE_NAME$9,
29030
29233
  type: NodeTranslator.translatorTypes.NODE,
29031
- encode: encode$f,
29032
- decode: decode$h,
29033
- attributes: validXmlAttributes$6
29234
+ encode: encode$h,
29235
+ decode: decode$j,
29236
+ attributes: validXmlAttributes$8
29034
29237
  };
29035
- const translator$8 = NodeTranslator.from(config$8);
29036
- const XML_NODE_NAME$8 = "w:drawing";
29238
+ const translator$a = NodeTranslator.from(config$a);
29239
+ const XML_NODE_NAME$a = "w:drawing";
29037
29240
  const SD_NODE_NAME$8 = [];
29038
- const validXmlAttributes$5 = [];
29039
- function encode$e(params2) {
29241
+ const validXmlAttributes$7 = [];
29242
+ function encode$g(params2) {
29040
29243
  const nodes = params2.nodes;
29041
29244
  const node = nodes[0];
29042
29245
  const translatorByChildName = {
29043
- "wp:anchor": translator$9,
29044
- "wp:inline": translator$8
29246
+ "wp:anchor": translator$b,
29247
+ "wp:inline": translator$a
29045
29248
  };
29046
29249
  return node.elements.reduce((acc, child) => {
29047
29250
  if (acc) return acc;
@@ -29050,12 +29253,12 @@ function encode$e(params2) {
29050
29253
  return translator2.encode({ ...params2, extraParams: { node: child } }) || acc;
29051
29254
  }, null);
29052
29255
  }
29053
- function decode$g(params2) {
29256
+ function decode$i(params2) {
29054
29257
  const { node } = params2;
29055
29258
  if (!node || !node.type) {
29056
29259
  return null;
29057
29260
  }
29058
- const childTranslator = node.attrs.isAnchor ? translator$9 : translator$8;
29261
+ const childTranslator = node.attrs.isAnchor ? translator$b : translator$a;
29059
29262
  const resultNode = childTranslator.decode(params2);
29060
29263
  return wrapTextInRun(
29061
29264
  {
@@ -29065,15 +29268,15 @@ function decode$g(params2) {
29065
29268
  []
29066
29269
  );
29067
29270
  }
29068
- const config$7 = {
29069
- xmlName: XML_NODE_NAME$8,
29271
+ const config$9 = {
29272
+ xmlName: XML_NODE_NAME$a,
29070
29273
  sdNodeOrKeyName: SD_NODE_NAME$8,
29071
29274
  type: NodeTranslator.translatorTypes.NODE,
29072
- encode: encode$e,
29073
- decode: decode$g,
29074
- attributes: validXmlAttributes$5
29275
+ encode: encode$g,
29276
+ decode: decode$i,
29277
+ attributes: validXmlAttributes$7
29075
29278
  };
29076
- const translator$7 = NodeTranslator.from(config$7);
29279
+ const translator$9 = NodeTranslator.from(config$9);
29077
29280
  class CommandService {
29078
29281
  /**
29079
29282
  * @param {import('./commands/types/index.js').CommandServiceOptions} props
@@ -30421,7 +30624,7 @@ function prepareTextAnnotation(params2) {
30421
30624
  return getTextNodeForExport(attrs.displayLabel, [...marks, ...marksFromAttrs], params2);
30422
30625
  }
30423
30626
  function prepareImageAnnotation(params2, imageSize) {
30424
- return translator$7.decode({
30627
+ return translator$9.decode({
30425
30628
  ...params2,
30426
30629
  imageSize
30427
30630
  });
@@ -30736,10 +30939,10 @@ function generateSdtPrTagForStructuredContent({ node }) {
30736
30939
  };
30737
30940
  return result;
30738
30941
  }
30739
- const XML_NODE_NAME$7 = "w:sdt";
30942
+ const XML_NODE_NAME$9 = "w:sdt";
30740
30943
  const SD_NODE_NAME$7 = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
30741
- const validXmlAttributes$4 = [];
30742
- function encode$d(params2) {
30944
+ const validXmlAttributes$6 = [];
30945
+ function encode$f(params2) {
30743
30946
  const nodes = params2.nodes;
30744
30947
  const node = nodes[0];
30745
30948
  const { type: sdtType, handler: handler2 } = sdtNodeTypeStrategy(node);
@@ -30749,7 +30952,7 @@ function encode$d(params2) {
30749
30952
  const result = handler2(params2);
30750
30953
  return result;
30751
30954
  }
30752
- function decode$f(params2) {
30955
+ function decode$h(params2) {
30753
30956
  const { node } = params2;
30754
30957
  if (!node || !node.type) {
30755
30958
  return null;
@@ -30767,85 +30970,85 @@ function decode$f(params2) {
30767
30970
  const result = decoder();
30768
30971
  return result;
30769
30972
  }
30770
- const config$6 = {
30771
- xmlName: XML_NODE_NAME$7,
30973
+ const config$8 = {
30974
+ xmlName: XML_NODE_NAME$9,
30772
30975
  sdNodeOrKeyName: SD_NODE_NAME$7,
30773
30976
  type: NodeTranslator.translatorTypes.NODE,
30774
- encode: encode$d,
30775
- decode: decode$f,
30776
- attributes: validXmlAttributes$4
30977
+ encode: encode$f,
30978
+ decode: decode$h,
30979
+ attributes: validXmlAttributes$6
30777
30980
  };
30778
- const translator$6 = NodeTranslator.from(config$6);
30779
- const encode$c = (attributes) => {
30981
+ const translator$8 = NodeTranslator.from(config$8);
30982
+ const encode$e = (attributes) => {
30780
30983
  return attributes["w:id"];
30781
30984
  };
30782
- const decode$e = (attrs) => {
30985
+ const decode$g = (attrs) => {
30783
30986
  return attrs.id;
30784
30987
  };
30785
30988
  const attrConfig$7 = Object.freeze({
30786
30989
  xmlName: "w:id",
30787
30990
  sdName: "id",
30788
- encode: encode$c,
30789
- decode: decode$e
30991
+ encode: encode$e,
30992
+ decode: decode$g
30790
30993
  });
30791
- const encode$b = (attributes) => {
30994
+ const encode$d = (attributes) => {
30792
30995
  return attributes["w:name"];
30793
30996
  };
30794
- const decode$d = (attrs) => {
30997
+ const decode$f = (attrs) => {
30795
30998
  return attrs.name;
30796
30999
  };
30797
31000
  const attrConfig$6 = Object.freeze({
30798
31001
  xmlName: "w:name",
30799
31002
  sdName: "name",
30800
- encode: encode$b,
30801
- decode: decode$d
31003
+ encode: encode$d,
31004
+ decode: decode$f
30802
31005
  });
30803
- const encode$a = (attributes) => {
31006
+ const encode$c = (attributes) => {
30804
31007
  return attributes["w:colFirst"];
30805
31008
  };
30806
- const decode$c = (attrs) => {
31009
+ const decode$e = (attrs) => {
30807
31010
  return attrs.colFirst;
30808
31011
  };
30809
31012
  const attrConfig$5 = Object.freeze({
30810
31013
  xmlName: "w:colFirst",
30811
31014
  sdName: "colFirst",
30812
- encode: encode$a,
30813
- decode: decode$c
31015
+ encode: encode$c,
31016
+ decode: decode$e
30814
31017
  });
30815
- const encode$9 = (attributes) => {
31018
+ const encode$b = (attributes) => {
30816
31019
  return attributes["w:colLast"];
30817
31020
  };
30818
- const decode$b = (attrs) => {
31021
+ const decode$d = (attrs) => {
30819
31022
  return attrs.colLast;
30820
31023
  };
30821
31024
  const attrConfig$4 = Object.freeze({
30822
31025
  xmlName: "w:colLast",
30823
31026
  sdName: "colLast",
30824
- encode: encode$9,
30825
- decode: decode$b
31027
+ encode: encode$b,
31028
+ decode: decode$d
30826
31029
  });
30827
- const encode$8 = (attributes) => {
31030
+ const encode$a = (attributes) => {
30828
31031
  return attributes["w:displacedByCustomXml"];
30829
31032
  };
30830
- const decode$a = (attrs) => {
31033
+ const decode$c = (attrs) => {
30831
31034
  return attrs.displacedByCustomXml;
30832
31035
  };
30833
31036
  const attrConfig$3 = Object.freeze({
30834
31037
  xmlName: "w:displacedByCustomXml",
30835
31038
  sdName: "displacedByCustomXml",
30836
- encode: encode$8,
30837
- decode: decode$a
31039
+ encode: encode$a,
31040
+ decode: decode$c
30838
31041
  });
30839
- const validXmlAttributes$3 = [attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3];
30840
- const XML_NODE_NAME$6 = "w:bookmarkStart";
31042
+ const validXmlAttributes$5 = [attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3];
31043
+ const XML_NODE_NAME$8 = "w:bookmarkStart";
30841
31044
  const SD_NODE_NAME$6 = "bookmarkStart";
30842
- const encode$7 = (params2, encodedAttrs = {}) => {
31045
+ const encode$9 = (params2, encodedAttrs = {}) => {
30843
31046
  return {
30844
31047
  type: "bookmarkStart",
30845
31048
  attrs: encodedAttrs
30846
31049
  };
30847
31050
  };
30848
- const decode$9 = (params2, decodedAttrs = {}) => {
31051
+ const decode$b = (params2, decodedAttrs = {}) => {
30849
31052
  const result = {
30850
31053
  name: "w:bookmarkStart",
30851
31054
  elements: []
@@ -30855,49 +31058,49 @@ const decode$9 = (params2, decodedAttrs = {}) => {
30855
31058
  }
30856
31059
  return result;
30857
31060
  };
30858
- const config$5 = {
30859
- xmlName: XML_NODE_NAME$6,
31061
+ const config$7 = {
31062
+ xmlName: XML_NODE_NAME$8,
30860
31063
  sdNodeOrKeyName: SD_NODE_NAME$6,
30861
31064
  type: NodeTranslator.translatorTypes.NODE,
30862
- encode: encode$7,
30863
- decode: decode$9,
30864
- attributes: validXmlAttributes$3
31065
+ encode: encode$9,
31066
+ decode: decode$b,
31067
+ attributes: validXmlAttributes$5
30865
31068
  };
30866
- const translator$5 = NodeTranslator.from(config$5);
30867
- const encode$6 = (attributes) => {
31069
+ const translator$7 = NodeTranslator.from(config$7);
31070
+ const encode$8 = (attributes) => {
30868
31071
  return attributes["w:id"];
30869
31072
  };
30870
- const decode$8 = (attrs) => {
31073
+ const decode$a = (attrs) => {
30871
31074
  return attrs.id;
30872
31075
  };
30873
31076
  const attrConfig$2 = Object.freeze({
30874
31077
  xmlName: "w:id",
30875
31078
  sdName: "id",
30876
- encode: encode$6,
30877
- decode: decode$8
31079
+ encode: encode$8,
31080
+ decode: decode$a
30878
31081
  });
30879
- const encode$5 = (attributes) => {
31082
+ const encode$7 = (attributes) => {
30880
31083
  return attributes["w:displacedByCustomXml"];
30881
31084
  };
30882
- const decode$7 = (attrs) => {
31085
+ const decode$9 = (attrs) => {
30883
31086
  return attrs.displacedByCustomXml;
30884
31087
  };
30885
31088
  const attrConfig$1 = Object.freeze({
30886
31089
  xmlName: "w:displacedByCustomXml",
30887
31090
  sdName: "displacedByCustomXml",
30888
- encode: encode$5,
30889
- decode: decode$7
31091
+ encode: encode$7,
31092
+ decode: decode$9
30890
31093
  });
30891
- const validXmlAttributes$2 = [attrConfig$2, attrConfig$1];
30892
- const XML_NODE_NAME$5 = "w:bookmarkEnd";
31094
+ const validXmlAttributes$4 = [attrConfig$2, attrConfig$1];
31095
+ const XML_NODE_NAME$7 = "w:bookmarkEnd";
30893
31096
  const SD_NODE_NAME$5 = "bookmarkEnd";
30894
- const encode$4 = (params2, encodedAttrs = {}) => {
31097
+ const encode$6 = (params2, encodedAttrs = {}) => {
30895
31098
  return {
30896
31099
  type: "bookmarkEnd",
30897
31100
  attrs: encodedAttrs
30898
31101
  };
30899
31102
  };
30900
- const decode$6 = (params2, decodedAttrs = {}) => {
31103
+ const decode$8 = (params2, decodedAttrs = {}) => {
30901
31104
  const result = {
30902
31105
  name: "w:bookmarkEnd",
30903
31106
  elements: []
@@ -30907,27 +31110,27 @@ const decode$6 = (params2, decodedAttrs = {}) => {
30907
31110
  }
30908
31111
  return result;
30909
31112
  };
30910
- const config$4 = {
30911
- xmlName: XML_NODE_NAME$5,
31113
+ const config$6 = {
31114
+ xmlName: XML_NODE_NAME$7,
30912
31115
  sdNodeOrKeyName: SD_NODE_NAME$5,
30913
31116
  type: NodeTranslator.translatorTypes.NODE,
30914
- encode: encode$4,
30915
- decode: decode$6,
30916
- attributes: validXmlAttributes$2
31117
+ encode: encode$6,
31118
+ decode: decode$8,
31119
+ attributes: validXmlAttributes$4
30917
31120
  };
30918
- const translator$4 = NodeTranslator.from(config$4);
30919
- const decode$5 = (attrs) => attrs?.["w:id"];
31121
+ const translator$6 = NodeTranslator.from(config$6);
31122
+ const decode$7 = (attrs) => attrs?.["w:id"];
30920
31123
  const attrConfig = Object.freeze({
30921
31124
  xmlName: "w:id",
30922
31125
  sdName: "w:id",
30923
31126
  // We do not translate it from 'w:id' to 'id' when encoding, so the name is the same
30924
31127
  encode: () => {
30925
31128
  },
30926
- decode: decode$5
31129
+ decode: decode$7
30927
31130
  });
30928
- const XML_NODE_NAME$4 = "w:commentRange";
31131
+ const XML_NODE_NAME$6 = "w:commentRange";
30929
31132
  const SD_NODE_NAME$4 = "commentRange";
30930
- const decode$4 = (params2) => {
31133
+ const decode$6 = (params2) => {
30931
31134
  const { node, comments, commentsExportType, exportedCommentDefs } = params2;
30932
31135
  if (!node) return;
30933
31136
  if (!comments) return;
@@ -30970,19 +31173,19 @@ const getCommentSchema = (type2, commentIndex) => {
30970
31173
  };
30971
31174
  };
30972
31175
  const getConfig = (type2) => ({
30973
- xmlName: `${XML_NODE_NAME$4}${type2}`,
31176
+ xmlName: `${XML_NODE_NAME$6}${type2}`,
30974
31177
  sdNodeOrKeyName: `${SD_NODE_NAME$4}${type2}`,
30975
31178
  type: NodeTranslator.translatorTypes.NODE,
30976
31179
  encode: () => {
30977
31180
  },
30978
- decode: decode$4,
31181
+ decode: decode$6,
30979
31182
  attributes: [attrConfig]
30980
31183
  });
30981
31184
  const commentRangeStartTranslator = NodeTranslator.from(getConfig("Start"));
30982
31185
  const commentRangeEndTranslator = NodeTranslator.from(getConfig("End"));
30983
- const XML_NODE_NAME$3 = "sd:pageReference";
31186
+ const XML_NODE_NAME$5 = "sd:pageReference";
30984
31187
  const SD_NODE_NAME$3 = "pageReference";
30985
- const encode$3 = (params2) => {
31188
+ const encode$5 = (params2) => {
30986
31189
  const { nodes = [], nodeListHandler } = params2 || {};
30987
31190
  const node = nodes[0];
30988
31191
  const processedText = nodeListHandler.handler({
@@ -30999,7 +31202,7 @@ const encode$3 = (params2) => {
30999
31202
  };
31000
31203
  return processedNode;
31001
31204
  };
31002
- const decode$3 = (params2) => {
31205
+ const decode$5 = (params2) => {
31003
31206
  const { node } = params2;
31004
31207
  const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
31005
31208
  const contentNodes = (node.content ?? []).flatMap((n) => exportSchemaToJson({ ...params2, node: n }));
@@ -31072,17 +31275,17 @@ const decode$3 = (params2) => {
31072
31275
  ];
31073
31276
  return translated;
31074
31277
  };
31075
- const config$3 = {
31076
- xmlName: XML_NODE_NAME$3,
31278
+ const config$5 = {
31279
+ xmlName: XML_NODE_NAME$5,
31077
31280
  sdNodeOrKeyName: SD_NODE_NAME$3,
31078
31281
  type: NodeTranslator.translatorTypes.NODE,
31079
- encode: encode$3,
31080
- decode: decode$3
31282
+ encode: encode$5,
31283
+ decode: decode$5
31081
31284
  };
31082
- const translator$3 = NodeTranslator.from(config$3);
31083
- const XML_NODE_NAME$2 = "sd:tableOfContents";
31285
+ const translator$5 = NodeTranslator.from(config$5);
31286
+ const XML_NODE_NAME$4 = "sd:tableOfContents";
31084
31287
  const SD_NODE_NAME$2 = "tableOfContents";
31085
- const encode$2 = (params2) => {
31288
+ const encode$4 = (params2) => {
31086
31289
  const { nodes = [], nodeListHandler } = params2 || {};
31087
31290
  const node = nodes[0];
31088
31291
  const processedContent = nodeListHandler.handler({
@@ -31098,7 +31301,7 @@ const encode$2 = (params2) => {
31098
31301
  };
31099
31302
  return processedNode;
31100
31303
  };
31101
- const decode$2 = (params2) => {
31304
+ const decode$4 = (params2) => {
31102
31305
  const { node } = params2;
31103
31306
  const contentNodes = node.content.map((n) => exportSchemaToJson({ ...params2, node: n }));
31104
31307
  const tocBeginElements = [
@@ -31145,14 +31348,14 @@ const decode$2 = (params2) => {
31145
31348
  }
31146
31349
  return contentNodes;
31147
31350
  };
31148
- const config$2 = {
31149
- xmlName: XML_NODE_NAME$2,
31351
+ const config$4 = {
31352
+ xmlName: XML_NODE_NAME$4,
31150
31353
  sdNodeOrKeyName: SD_NODE_NAME$2,
31151
31354
  type: NodeTranslator.translatorTypes.NODE,
31152
- encode: encode$2,
31153
- decode: decode$2
31355
+ encode: encode$4,
31356
+ decode: decode$4
31154
31357
  };
31155
- const translator$2 = NodeTranslator.from(config$2);
31358
+ const translator$4 = NodeTranslator.from(config$4);
31156
31359
  function parseInlineStyles(styleString) {
31157
31360
  if (!styleString) return {};
31158
31361
  return styleString.split(";").filter((style2) => !!style2.trim()).reduce((acc, style2) => {
@@ -31286,7 +31489,7 @@ const handleDrawingNode = (params2) => {
31286
31489
  if (mainNode.name === "w:drawing") node = mainNode;
31287
31490
  else node = mainNode.elements.find((el) => el.name === "w:drawing");
31288
31491
  if (!node) return { nodes: [], consumed: 0 };
31289
- const schemaNode = translator$7.encode(params2);
31492
+ const schemaNode = translator$9.encode(params2);
31290
31493
  const newNodes = schemaNode ? [schemaNode] : [];
31291
31494
  return { nodes: newNodes, consumed: 1 };
31292
31495
  };
@@ -31294,6 +31497,203 @@ const drawingNodeHandlerEntity = {
31294
31497
  handlerName: "drawingNodeHandler",
31295
31498
  handler: handleDrawingNode
31296
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((r2) => r2 !== 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 = (params2, encodedAttrs = {}) => {
31526
+ const { nodeListHandler, extraParams = {} } = params2;
31527
+ const { node } = extraParams;
31528
+ const subs = nodeListHandler.handler({
31529
+ ...params2,
31530
+ insideTrackChange: true,
31531
+ nodes: node.elements,
31532
+ path: [...params2.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(params2) {
31542
+ const { node } = params2;
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({ ...params2, 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 = (params2, encodedAttrs = {}) => {
31586
+ const { nodeListHandler, extraParams = {} } = params2;
31587
+ const { node } = extraParams;
31588
+ const subs = nodeListHandler.handler({
31589
+ ...params2,
31590
+ insideTrackChange: true,
31591
+ nodes: node.elements,
31592
+ path: [...params2.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(params2) {
31602
+ const { node } = params2;
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({ ...params2, 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 = (params2) => {
31658
+ const { nodes } = params2;
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
+ ...params2,
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$1c);
31696
+ const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$1b);
31297
31697
  function parseProperties(node) {
31298
31698
  const marks = [];
31299
31699
  const unknownMarks = [];
@@ -31345,51 +31745,6 @@ function getElementName(element) {
31345
31745
  const isPropertiesElement = (element) => {
31346
31746
  return !!SuperConverter.propertyTypes[element.name || element.type];
31347
31747
  };
31348
- const handleTrackChangeNode = (params2) => {
31349
- const { nodes, nodeListHandler } = params2;
31350
- if (nodes.length === 0 || !(nodes[0].name === "w:del" || nodes[0].name === "w:ins" || nodes[0].name === "w:sdt")) {
31351
- return { nodes: [], consumed: 0 };
31352
- }
31353
- const mainNode = nodes[0];
31354
- let node;
31355
- if (["w:ins", "w:del"].includes(mainNode.name)) {
31356
- node = mainNode;
31357
- } else {
31358
- const sdtContent = mainNode.elements.find((el) => el.name === "w:sdtContent");
31359
- const trackedChange = sdtContent?.elements.find((el) => ["w:ins", "w:del"].includes(el.name));
31360
- if (trackedChange) node = trackedChange;
31361
- }
31362
- if (!node) {
31363
- return { nodes: [], consumed: 0 };
31364
- }
31365
- const { name } = node;
31366
- const { attributes, elements } = parseProperties(node);
31367
- const subs = nodeListHandler.handler({
31368
- ...params2,
31369
- insideTrackChange: true,
31370
- nodes: elements,
31371
- path: [...params2.path || [], node]
31372
- });
31373
- const changeType = name === "w:del" ? TrackDeleteMarkName : TrackInsertMarkName;
31374
- const mappedAttributes = {
31375
- id: attributes["w:id"],
31376
- date: attributes["w:date"],
31377
- author: attributes["w:author"],
31378
- authorEmail: attributes["w:authorEmail"],
31379
- importedAuthor: `${attributes["w:author"]} (imported)`
31380
- };
31381
- subs.forEach((subElement) => {
31382
- if (subElement.marks === void 0) subElement.marks = [];
31383
- subElement.marks.push({ type: changeType, attrs: mappedAttributes });
31384
- });
31385
- return { nodes: subs, consumed: 1 };
31386
- };
31387
- const trackChangeNodeHandlerEntity = {
31388
- handlerName: "trackChangeNodeHandler",
31389
- handler: handleTrackChangeNode
31390
- };
31391
- const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$X);
31392
- const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$W);
31393
31748
  const handleTextNode = (params2) => {
31394
31749
  const { nodes, insideTrackChange } = params2;
31395
31750
  if (nodes.length === 0 || !(nodes[0].name === "w:t" || insideTrackChange && nodes[0].name === "w:delText")) {
@@ -31430,7 +31785,7 @@ const handleParagraphNode = (params2) => {
31430
31785
  if (nodes.length === 0 || nodes[0].name !== "w:p") {
31431
31786
  return { nodes: [], consumed: 0 };
31432
31787
  }
31433
- const schemaNode = translator$17.encode(params2);
31788
+ const schemaNode = translator$1o.encode(params2);
31434
31789
  const newNodes = schemaNode ? [schemaNode] : [];
31435
31790
  return { nodes: newNodes, consumed: 1 };
31436
31791
  };
@@ -31443,7 +31798,7 @@ const handleSdtNode = (params2) => {
31443
31798
  if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
31444
31799
  return { nodes: [], consumed: 0 };
31445
31800
  }
31446
- const result = translator$6.encode(params2);
31801
+ const result = translator$8.encode(params2);
31447
31802
  if (!result) {
31448
31803
  return { nodes: [], consumed: 0 };
31449
31804
  }
@@ -31533,7 +31888,7 @@ const handler = (params2) => {
31533
31888
  if (nodes.length === 0 || nodes[0].name !== "w:br") {
31534
31889
  return { nodes: [], consumed: 0 };
31535
31890
  }
31536
- const result = translator$1a.encode(params2);
31891
+ const result = translator$1r.encode(params2);
31537
31892
  if (!result) return { nodes: [], consumed: 0 };
31538
31893
  return {
31539
31894
  nodes: [result],
@@ -31605,7 +31960,7 @@ const handleBookmarkStartNode = (params2) => {
31605
31960
  if (isCustomMarkBookmark(nodes[0], params2.editor)) {
31606
31961
  return handleBookmarkNode(params2);
31607
31962
  }
31608
- const node = translator$5.encode(params2);
31963
+ const node = translator$7.encode(params2);
31609
31964
  if (!node) return { nodes: [], consumed: 0 };
31610
31965
  return { nodes: [node], consumed: 1 };
31611
31966
  };
@@ -31637,7 +31992,7 @@ const handleBookmarkEndNode = (params2) => {
31637
31992
  if (!nodes.length || nodes[0].name !== "w:bookmarkEnd") {
31638
31993
  return { nodes: [], consumed: 0 };
31639
31994
  }
31640
- const node = translator$4.encode(params2);
31995
+ const node = translator$6.encode(params2);
31641
31996
  if (!node) return { nodes: [], consumed: 0 };
31642
31997
  return { nodes: [node], consumed: 1 };
31643
31998
  };
@@ -31770,7 +32125,7 @@ const autoTotalPageCountEntity = {
31770
32125
  handlerName: "autoTotalPageCountEntity",
31771
32126
  handler: handleAutoTotalPageNumber
31772
32127
  };
31773
- const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$3);
32128
+ const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$5);
31774
32129
  const handlePictNode = (params2) => {
31775
32130
  const { nodes } = params2;
31776
32131
  if (!nodes.length || nodes[0].name !== "w:p") {
@@ -32159,14 +32514,14 @@ const handleTabNode = (params2) => {
32159
32514
  if (!nodes.length || nodes[0].name !== "w:tab") {
32160
32515
  return { nodes: [], consumed: 0 };
32161
32516
  }
32162
- const node = translator$18.encode(params2);
32517
+ const node = translator$1p.encode(params2);
32163
32518
  return { nodes: [node], consumed: 1 };
32164
32519
  };
32165
32520
  const tabNodeEntityHandler = {
32166
32521
  handlerName: "w:tabTranslator",
32167
32522
  handler: handleTabNode
32168
32523
  };
32169
- const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$2);
32524
+ const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$4);
32170
32525
  function preProcessPageInstruction(nodesToCombine) {
32171
32526
  const pageNumNode = {
32172
32527
  name: "sd:autoPageNumber",
@@ -32411,12 +32766,14 @@ const createDocumentJson = (docx, converter, editor) => {
32411
32766
  const content = pruneIgnoredNodes(contentElements);
32412
32767
  const comments = importCommentData({ docx, converter, editor });
32413
32768
  const lists = {};
32769
+ const inlineDocumentFonts = [];
32414
32770
  let parsedContent = nodeListHandler.handler({
32415
32771
  nodes: content,
32416
32772
  nodeListHandler,
32417
32773
  docx,
32418
32774
  converter,
32419
32775
  editor,
32776
+ inlineDocumentFonts,
32420
32777
  lists,
32421
32778
  path: []
32422
32779
  });
@@ -32439,6 +32796,7 @@ const createDocumentJson = (docx, converter, editor) => {
32439
32796
  savedTagsToRestore: node,
32440
32797
  pageStyles: getDocumentStyles(node, docx, converter, editor),
32441
32798
  comments,
32799
+ inlineDocumentFonts,
32442
32800
  linkedStyles: getStyleDefinitions(docx),
32443
32801
  numbering: getNumberingDefinitions(docx)
32444
32802
  };
@@ -32502,6 +32860,7 @@ const createNodeListHandler = (nodeHandlers) => {
32502
32860
  filename,
32503
32861
  parentStyleId,
32504
32862
  lists,
32863
+ inlineDocumentFonts,
32505
32864
  path = []
32506
32865
  }) => {
32507
32866
  if (!elements || !elements.length) return [];
@@ -32528,6 +32887,7 @@ const createNodeListHandler = (nodeHandlers) => {
32528
32887
  filename,
32529
32888
  parentStyleId,
32530
32889
  lists,
32890
+ inlineDocumentFonts,
32531
32891
  path
32532
32892
  });
32533
32893
  },
@@ -33107,7 +33467,7 @@ function translateVRectContentBlock(params2) {
33107
33467
  const XML_NODE_NAME = "w:pict";
33108
33468
  const SD_NODE_NAME = ["shapeContainer", "contentBlock"];
33109
33469
  const validXmlAttributes = [];
33110
- function encode$1d(params2) {
33470
+ function encode$1c(params2) {
33111
33471
  const { node, pNode } = params2.extraParams;
33112
33472
  const { type: pictType, handler: handler2 } = pictNodeTypeStrategy(node);
33113
33473
  if (!handler2 || pictType === "unknown") {
@@ -33139,7 +33499,7 @@ const config = {
33139
33499
  xmlName: XML_NODE_NAME,
33140
33500
  sdNodeOrKeyName: SD_NODE_NAME,
33141
33501
  type: NodeTranslator.translatorTypes.NODE,
33142
- encode: encode$1d,
33502
+ encode: encode$1c,
33143
33503
  decode,
33144
33504
  attributes: validXmlAttributes
33145
33505
  };
@@ -33215,35 +33575,35 @@ function exportSchemaToJson(params2) {
33215
33575
  doc: translateDocumentNode,
33216
33576
  body: translateBodyNode,
33217
33577
  heading: translateHeadingNode,
33218
- paragraph: translator$17,
33219
- run: translator$W,
33578
+ paragraph: translator$1o,
33579
+ run: translator$1b,
33220
33580
  text: translateTextNode,
33221
33581
  bulletList: translateList,
33222
33582
  orderedList: translateList,
33223
- lineBreak: translator$1a,
33224
- table: translator$b,
33225
- tableRow: translator$I,
33226
- tableCell: translator$a,
33227
- bookmarkStart: translator$5,
33228
- bookmarkEnd: translator$4,
33229
- fieldAnnotation: translator$6,
33230
- tab: translator$18,
33231
- image: translator$7,
33232
- hardBreak: translator$1a,
33583
+ lineBreak: translator$1r,
33584
+ table: translator$s,
33585
+ tableRow: translator$Z,
33586
+ tableCell: translator$c,
33587
+ bookmarkStart: translator$7,
33588
+ bookmarkEnd: translator$6,
33589
+ fieldAnnotation: translator$8,
33590
+ tab: translator$1p,
33591
+ image: translator$9,
33592
+ hardBreak: translator$1r,
33233
33593
  commentRangeStart: commentRangeStartTranslator,
33234
33594
  commentRangeEnd: commentRangeEndTranslator,
33235
33595
  commentReference: () => null,
33236
33596
  shapeContainer: translator,
33237
33597
  shapeTextbox: translator,
33238
33598
  contentBlock: translator,
33239
- structuredContent: translator$6,
33240
- structuredContentBlock: translator$6,
33241
- documentPartObject: translator$6,
33242
- documentSection: translator$6,
33599
+ structuredContent: translator$8,
33600
+ structuredContentBlock: translator$8,
33601
+ documentPartObject: translator$8,
33602
+ documentSection: translator$8,
33243
33603
  "page-number": translatePageNumberNode,
33244
33604
  "total-page-number": translateTotalPageNumberNode,
33245
- pageReference: translator$3,
33246
- tableOfContents: translator$2
33605
+ pageReference: translator$5,
33606
+ tableOfContents: translator$4
33247
33607
  };
33248
33608
  let handler2 = router[type2];
33249
33609
  if (handler2 && "decode" in handler2 && typeof handler2.decode === "function") {
@@ -33579,62 +33939,22 @@ function getTextNodeForExport(text, marks, params2) {
33579
33939
  function translateTextNode(params2) {
33580
33940
  const { node, extraParams } = params2;
33581
33941
  const trackedMarks = [TrackInsertMarkName, TrackDeleteMarkName];
33582
- const isTrackedNode = node.marks?.some((m2) => trackedMarks.includes(m2.type));
33583
- if (isTrackedNode) return translateTrackedNode(params2);
33942
+ const trackedMark = node.marks?.find((m2) => trackedMarks.includes(m2.type));
33943
+ if (trackedMark) {
33944
+ switch (trackedMark.type) {
33945
+ case "trackDelete":
33946
+ return translator$3.decode(params2);
33947
+ case "trackInsert":
33948
+ return translator$2.decode(params2);
33949
+ }
33950
+ }
33584
33951
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
33585
33952
  if (isLinkNode && !extraParams?.linkProcessed) {
33586
- return translator$X.decode(params2);
33953
+ return translator$1c.decode(params2);
33587
33954
  }
33588
33955
  const { text, marks = [] } = node;
33589
33956
  return getTextNodeForExport(text, marks, params2);
33590
33957
  }
33591
- function createTrackStyleMark(marks) {
33592
- const trackStyleMark = marks.find((mark) => mark.type === TrackFormatMarkName);
33593
- if (trackStyleMark) {
33594
- const markElement = {
33595
- type: "element",
33596
- name: "w:rPrChange",
33597
- attributes: {
33598
- "w:id": trackStyleMark.attrs.id,
33599
- "w:author": trackStyleMark.attrs.author,
33600
- "w:authorEmail": trackStyleMark.attrs.authorEmail,
33601
- "w:date": trackStyleMark.attrs.date
33602
- },
33603
- elements: trackStyleMark.attrs.before.map((mark) => processOutputMarks([mark])).filter((r2) => r2 !== void 0)
33604
- };
33605
- return markElement;
33606
- }
33607
- return void 0;
33608
- }
33609
- function translateTrackedNode(params2) {
33610
- const { node } = params2;
33611
- const marks = node.marks;
33612
- const trackingMarks = [TrackInsertMarkName, TrackDeleteMarkName, TrackFormatMarkName];
33613
- const trackedMark = marks.find((m2) => trackingMarks.includes(m2.type));
33614
- const isInsert = trackedMark.type === TrackInsertMarkName;
33615
- const trackStyleMark = createTrackStyleMark(marks);
33616
- node.marks = marks.filter((m2) => !trackingMarks.includes(m2.type));
33617
- if (trackStyleMark) {
33618
- node.marks.push(trackStyleMark);
33619
- }
33620
- const translatedTextNode = exportSchemaToJson({ ...params2, node });
33621
- if (!isInsert) {
33622
- const textNode = translatedTextNode.elements.find((n) => n.name === "w:t");
33623
- textNode.name = "w:delText";
33624
- }
33625
- const trackedNode = {
33626
- name: isInsert ? "w:ins" : "w:del",
33627
- type: "element",
33628
- attributes: {
33629
- "w:id": trackedMark.attrs.id,
33630
- "w:author": trackedMark.attrs.author,
33631
- "w:authorEmail": trackedMark.attrs.authorEmail,
33632
- "w:date": trackedMark.attrs.date
33633
- },
33634
- elements: [translatedTextNode]
33635
- };
33636
- return trackedNode;
33637
- }
33638
33958
  function wrapTextInRun(nodeOrNodes, marks) {
33639
33959
  let elements = [];
33640
33960
  if (Array.isArray(nodeOrNodes)) elements = nodeOrNodes;
@@ -33890,7 +34210,7 @@ function translateMark(mark) {
33890
34210
  markElement.type = "element";
33891
34211
  break;
33892
34212
  case "underline": {
33893
- const translated = translator$14.decode({
34213
+ const translated = translator$1l.decode({
33894
34214
  node: {
33895
34215
  attrs: {
33896
34216
  underlineType: attrs.underlineType ?? attrs.underline ?? null,
@@ -33954,7 +34274,7 @@ function translateMark(mark) {
33954
34274
  break;
33955
34275
  case "highlight": {
33956
34276
  const highlightValue = attrs.color ?? attrs.highlight ?? null;
33957
- const translated = translator$19.decode({ node: { attrs: { highlight: highlightValue } } });
34277
+ const translated = translator$1q.decode({ node: { attrs: { highlight: highlightValue } } });
33958
34278
  return translated || {};
33959
34279
  }
33960
34280
  case "link":
@@ -34333,6 +34653,7 @@ const _SuperConverter = class _SuperConverter2 {
34333
34653
  this.fonts = params2?.fonts || {};
34334
34654
  this.addedMedia = {};
34335
34655
  this.comments = [];
34656
+ this.inlineDocumentFonts = [];
34336
34657
  this.docHiglightColors = /* @__PURE__ */ new Set([]);
34337
34658
  this.xml = params2?.xml;
34338
34659
  this.declaration = null;
@@ -34619,6 +34940,23 @@ const _SuperConverter = class _SuperConverter2 {
34619
34940
  return result;
34620
34941
  }
34621
34942
  getDocumentFonts() {
34943
+ const inlineDocumentFonts = [...new Set(this.inlineDocumentFonts || [])];
34944
+ const fontTable = this.convertedXml["word/fontTable.xml"];
34945
+ if (!fontTable) {
34946
+ return inlineDocumentFonts;
34947
+ }
34948
+ const wFonts = fontTable.elements?.find((element) => element.name === "w:fonts");
34949
+ if (!wFonts) {
34950
+ return inlineDocumentFonts;
34951
+ }
34952
+ if (!wFonts.elements) {
34953
+ return inlineDocumentFonts;
34954
+ }
34955
+ const fontsInFontTable = wFonts.elements.filter((element) => element.name === "w:font").map((element) => element.attributes["w:name"]);
34956
+ const allFonts = [...inlineDocumentFonts, ...fontsInFontTable];
34957
+ return [...new Set(allFonts)];
34958
+ }
34959
+ getFontFaceImportString() {
34622
34960
  const fontTable = this.convertedXml["word/fontTable.xml"];
34623
34961
  if (!fontTable || !Object.keys(this.fonts).length) return;
34624
34962
  const fonts = fontTable.elements.find((el) => el.name === "w:fonts");
@@ -34632,6 +34970,7 @@ const _SuperConverter = class _SuperConverter2 {
34632
34970
  const rels = this.convertedXml["word/_rels/fontTable.xml.rels"];
34633
34971
  const relationships = rels?.elements.find((el) => el.name === "Relationships") || {};
34634
34972
  const { elements } = relationships;
34973
+ const fontsImported = [];
34635
34974
  let styleString = "";
34636
34975
  for (const font of fontsToInclude) {
34637
34976
  const filePath = elements.find((el) => el.attributes.Id === font.attributes["r:id"])?.attributes?.Target;
@@ -34648,6 +34987,9 @@ const _SuperConverter = class _SuperConverter2 {
34648
34987
  const isItalic = font.name.includes("Italic");
34649
34988
  const isLight = font.name.includes("Light");
34650
34989
  const fontWeight = isNormal ? "normal" : isBold ? "bold" : isLight ? "200" : "normal";
34990
+ if (!fontsImported.includes(font.fontFamily)) {
34991
+ fontsImported.push(font.fontFamily);
34992
+ }
34651
34993
  styleString += `
34652
34994
  @font-face {
34653
34995
  font-style: ${isItalic ? "italic" : "normal"};
@@ -34658,7 +35000,10 @@ const _SuperConverter = class _SuperConverter2 {
34658
35000
  }
34659
35001
  `;
34660
35002
  }
34661
- return styleString;
35003
+ return {
35004
+ styleString,
35005
+ fontsImported
35006
+ };
34662
35007
  }
34663
35008
  getDocumentInternalId() {
34664
35009
  const settingsLocation = "word/settings.xml";
@@ -34713,6 +35058,7 @@ const _SuperConverter = class _SuperConverter2 {
34713
35058
  this.numbering = result.numbering;
34714
35059
  this.comments = result.comments;
34715
35060
  this.linkedStyles = result.linkedStyles;
35061
+ this.inlineDocumentFonts = result.inlineDocumentFonts;
34716
35062
  return result.pmDoc;
34717
35063
  } else {
34718
35064
  return null;
@@ -37674,7 +38020,7 @@ var __privateGet$1 = (obj, member, getter) => (__accessCheck$1(obj, member, "rea
37674
38020
  var __privateAdd$1 = (obj, member, value) => member.has(obj) ? __typeError$1("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
37675
38021
  var __privateSet = (obj, member, value, setter) => (__accessCheck$1(obj, member, "write to private field"), member.set(obj, value), value);
37676
38022
  var __privateMethod$1 = (obj, member, method) => (__accessCheck$1(obj, member, "access private method"), method);
37677
- var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ListItemNodeView_instances, init_fn3, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
38023
+ var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, checkFonts_fn, determineUnsupportedFontsWithLocalFonts_fn, determineUnsupportedFontsWithCanvas_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ListItemNodeView_instances, init_fn3, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
37678
38024
  var GOOD_LEAF_SIZE = 200;
37679
38025
  var RopeSequence = function RopeSequence2() {
37680
38026
  };
@@ -50743,6 +51089,29 @@ const setImageNodeSelection = (view, pos) => {
50743
51089
  }
50744
51090
  return false;
50745
51091
  };
51092
+ function canRenderFont(fontName, fallbackFont = "sans-serif") {
51093
+ const _canRenderFont = (fontName2, fallbackFont2) => {
51094
+ const canvas = document.createElement("canvas");
51095
+ const ctx2 = canvas.getContext("2d");
51096
+ ctx2.textBaseline = "top";
51097
+ const text = "abcdefghijklmnopqrstuvwxyz0123456789";
51098
+ ctx2.font = `72px ${fallbackFont2}`;
51099
+ const initialTextMeasurement = ctx2.measureText(text);
51100
+ const fallbackWidth = initialTextMeasurement.width;
51101
+ const fallbackHeight = initialTextMeasurement.actualBoundingBoxDescent;
51102
+ ctx2.font = `72px "${fontName2}", ${fallbackFont2}`;
51103
+ const customTextMeasurement = ctx2.measureText(text);
51104
+ const customFontWidth = customTextMeasurement.width;
51105
+ const customFontHeight = customTextMeasurement.actualBoundingBoxDescent;
51106
+ const isAvailable = customFontWidth !== fallbackWidth || customFontHeight !== fallbackHeight;
51107
+ return isAvailable;
51108
+ };
51109
+ if (_canRenderFont(fontName, fallbackFont)) {
51110
+ return true;
51111
+ }
51112
+ const oppositeFallbackFont = fallbackFont === "sans-serif" ? "serif" : "sans-serif";
51113
+ return _canRenderFont(fontName, oppositeFallbackFont);
51114
+ }
50746
51115
  const { findChildren: findChildren$3 } = helpers;
50747
51116
  function getAllFieldAnnotations(state2) {
50748
51117
  let fieldAnnotations = findChildren$3(state2.doc, (node) => node.type.name === "fieldAnnotation");
@@ -51792,6 +52161,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
51792
52161
  __publicField$1(this, "schema");
51793
52162
  __publicField$1(this, "view");
51794
52163
  __publicField$1(this, "isFocused", false);
52164
+ __publicField$1(this, "fontsImported", []);
51795
52165
  __publicField$1(this, "options", {
51796
52166
  element: null,
51797
52167
  selector: null,
@@ -51852,6 +52222,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
51852
52222
  onPaginationUpdate: () => null,
51853
52223
  onException: () => null,
51854
52224
  onListDefinitionsChange: () => null,
52225
+ onFontsResolved: null,
51855
52226
  // async (file) => url;
51856
52227
  handleImageUpload: null,
51857
52228
  // telemetry
@@ -52828,6 +53199,9 @@ init_fn = function() {
52828
53199
  this.emit("beforeCreate", { editor: this });
52829
53200
  this.on("contentError", this.options.onContentError);
52830
53201
  this.mount(this.options.element);
53202
+ if (!this.options.isHeadless) {
53203
+ __privateMethod$1(this, _Editor_instances, checkFonts_fn).call(this);
53204
+ }
52831
53205
  this.on("create", this.options.onCreate);
52832
53206
  this.on("update", this.options.onUpdate);
52833
53207
  this.on("selectionUpdate", this.options.onSelectionUpdate);
@@ -52975,13 +53349,74 @@ initMedia_fn = function() {
52975
53349
  }
52976
53350
  };
52977
53351
  initFonts_fn = function() {
52978
- const styleString = this.converter.getDocumentFonts();
52979
- if (styleString?.length) {
53352
+ const results = this.converter.getFontFaceImportString();
53353
+ if (results?.styleString?.length) {
52980
53354
  const style2 = document.createElement("style");
52981
- style2.textContent = styleString;
53355
+ style2.textContent = results.styleString;
52982
53356
  document.head.appendChild(style2);
53357
+ this.fontsImported = results.fontsImported;
53358
+ }
53359
+ };
53360
+ checkFonts_fn = async function() {
53361
+ if (!this.options.onFontsResolved || typeof this.options.onFontsResolved !== "function") {
53362
+ return;
53363
+ }
53364
+ if (this.options.isHeadless) {
53365
+ return;
53366
+ }
53367
+ const fontsUsedInDocument = this.converter.getDocumentFonts();
53368
+ if (!("queryLocalFonts" in window)) {
53369
+ console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
53370
+ const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
53371
+ this.options.onFontsResolved({
53372
+ documentFonts: fontsUsedInDocument,
53373
+ unsupportedFonts
53374
+ });
53375
+ return;
53376
+ }
53377
+ const localFontAccess = await navigator.permissions.query({ name: "local-fonts" });
53378
+ if (localFontAccess.state === "denied") {
53379
+ console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
53380
+ const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
53381
+ this.options.onFontsResolved({
53382
+ documentFonts: fontsUsedInDocument,
53383
+ unsupportedFonts
53384
+ });
53385
+ return;
53386
+ }
53387
+ try {
53388
+ const localFonts = await window.queryLocalFonts();
53389
+ const uniqueLocalFonts = [...new Set(localFonts.map((font) => font.family))];
53390
+ const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithLocalFonts_fn).call(this, fontsUsedInDocument, uniqueLocalFonts);
53391
+ this.options.onFontsResolved({
53392
+ documentFonts: fontsUsedInDocument,
53393
+ unsupportedFonts
53394
+ });
53395
+ } catch {
53396
+ console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
53397
+ const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
53398
+ this.options.onFontsResolved({
53399
+ documentFonts: fontsUsedInDocument,
53400
+ unsupportedFonts
53401
+ });
52983
53402
  }
52984
53403
  };
53404
+ determineUnsupportedFontsWithLocalFonts_fn = function(fonts, localFonts) {
53405
+ const unsupportedFonts = fonts.filter((font) => {
53406
+ const isLocalFont = localFonts.includes(font);
53407
+ const isFontImported = this.fontsImported.includes(font);
53408
+ return !isLocalFont && !isFontImported;
53409
+ });
53410
+ return unsupportedFonts;
53411
+ };
53412
+ determineUnsupportedFontsWithCanvas_fn = function(fonts) {
53413
+ const unsupportedFonts = fonts.filter((font) => {
53414
+ const canRender = canRenderFont(font);
53415
+ const isFontImported = this.fontsImported.includes(font);
53416
+ return !canRender && !isFontImported;
53417
+ });
53418
+ return unsupportedFonts;
53419
+ };
52985
53420
  createSchema_fn = function() {
52986
53421
  this.schema = this.extensionService.schema;
52987
53422
  };
@@ -61738,6 +62173,15 @@ const TableCell = Node$1.create({
61738
62173
  widthUnit: {
61739
62174
  default: "px",
61740
62175
  rendered: false
62176
+ },
62177
+ /**
62178
+ * @category Attribute
62179
+ * @param {TableCellProperties} tableCellProperties - Properties for the table cell.
62180
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 463
62181
+ */
62182
+ tableCellProperties: {
62183
+ default: null,
62184
+ rendered: false
61741
62185
  }
61742
62186
  };
61743
62187
  },
@@ -63897,6 +64341,58 @@ const registerImages = async (foundImages, editor, view) => {
63897
64341
  }
63898
64342
  });
63899
64343
  };
64344
+ const normalizeWrap = (attrs = {}) => {
64345
+ const wrap2 = attrs.wrap;
64346
+ if (wrap2?.type && wrap2.type !== "Inline") {
64347
+ return {
64348
+ type: wrap2.type,
64349
+ attrs: wrap2.attrs ?? {}
64350
+ };
64351
+ }
64352
+ if (wrap2?.type === "Inline" && Object.keys(wrap2.attrs ?? {}).length) {
64353
+ return {
64354
+ type: "Inline",
64355
+ attrs: wrap2.attrs
64356
+ };
64357
+ }
64358
+ if (!wrap2 && attrs.wrapText) {
64359
+ return {
64360
+ type: "Square",
64361
+ attrs: {
64362
+ wrapText: attrs.wrapText
64363
+ }
64364
+ };
64365
+ }
64366
+ if (!wrap2 && attrs.wrapTopAndBottom) {
64367
+ return {
64368
+ type: "TopAndBottom",
64369
+ attrs: {}
64370
+ };
64371
+ }
64372
+ if (wrap2?.type === "Inline") {
64373
+ return {
64374
+ type: "Inline",
64375
+ attrs: wrap2.attrs ?? {}
64376
+ };
64377
+ }
64378
+ return {
64379
+ type: "Inline",
64380
+ attrs: {}
64381
+ };
64382
+ };
64383
+ const normalizeMarginOffset = (marginOffset = {}) => {
64384
+ const { left: left2, horizontal, ...rest } = marginOffset;
64385
+ return {
64386
+ ...rest,
64387
+ horizontal: horizontal ?? left2
64388
+ };
64389
+ };
64390
+ const getNormalizedImageAttrs = (attrs = {}) => {
64391
+ return {
64392
+ wrap: normalizeWrap(attrs),
64393
+ marginOffset: normalizeMarginOffset(attrs.marginOffset ?? {})
64394
+ };
64395
+ };
63900
64396
  const ImagePositionPluginKey = new PluginKey("ImagePosition");
63901
64397
  const ImagePositionPlugin = ({ editor }) => {
63902
64398
  const { view } = editor;
@@ -63944,7 +64440,8 @@ const getImagePositionDecorations = (state2, view) => {
63944
64440
  let style2 = "";
63945
64441
  let className = "";
63946
64442
  const { vRelativeFrom, alignH } = node.attrs.anchorData;
63947
- const { size: size2, padding, marginOffset } = node.attrs;
64443
+ const { size: size2, padding } = node.attrs;
64444
+ const { marginOffset } = getNormalizedImageAttrs(node.attrs);
63948
64445
  const pageBreak = findPreviousDomNodeWithClass(view, pos, "pagination-break-wrapper");
63949
64446
  if (pageBreak) {
63950
64447
  switch (alignH) {
@@ -64061,7 +64558,24 @@ const Image = Node$1.create({
64061
64558
  rendered: false
64062
64559
  },
64063
64560
  originalAttributes: { rendered: false },
64064
- wrapTopAndBottom: { rendered: false },
64561
+ /**
64562
+ * @category Attribute
64563
+ * @param {Object} wrap - Wrapping options
64564
+ * @param {string} wrap.type - Wrap type: "None", "Square", "Through", "Tight", "TopAndBottom", "Inline"
64565
+ * @param {Object} [wrap.attrs] - Wrap attributes (only allowed attributes for the given type will be accepted)
64566
+ * @param {string} [wrap.attrs.wrapText] - Text wrapping mode for Square type: "bothSides", "largest", "left", "right"
64567
+ * @param {number} [wrap.attrs.distTop] - Top distance in pixels
64568
+ * @param {number} [wrap.attrs.distBottom] - Bottom distance in pixels
64569
+ * @param {number} [wrap.attrs.distLeft] - Left distance in pixels
64570
+ * @param {number} [wrap.attrs.distRight] - Right distance in pixels
64571
+ * @param {Array} [wrap.attrs.polygon] - Polygon points for Through/Tight types: [[x1,y1], [x2,y2], ...]
64572
+ * @param {boolean} [wrap.attrs.behindDoc] - Whether image should be behind document text (for wrapNone)
64573
+ */
64574
+ wrap: {
64575
+ default: { type: "Inline" },
64576
+ rendered: false
64577
+ // Handled in main renderDOM
64578
+ },
64065
64579
  anchorData: {
64066
64580
  default: null,
64067
64581
  rendered: false
@@ -64107,7 +64621,6 @@ const Image = Node$1.create({
64107
64621
  * @private
64108
64622
  */
64109
64623
  simplePos: { rendered: false },
64110
- wrapText: { rendered: false },
64111
64624
  extension: { rendered: false },
64112
64625
  size: {
64113
64626
  default: {},
@@ -64123,55 +64636,13 @@ const Image = Node$1.create({
64123
64636
  },
64124
64637
  padding: {
64125
64638
  default: {},
64126
- renderDOM: ({ size: size2 = {}, padding, marginOffset, transformData = {} }) => {
64127
- let { left: left2 = 0, top: top2 = 0, bottom: bottom2 = 0, right: right2 = 0 } = padding ?? {};
64128
- const { rotation } = transformData;
64129
- const { height, width } = size2;
64130
- if (rotation && height && width) {
64131
- const { horizontal, vertical } = getRotationMargins(width, height, rotation);
64132
- left2 += horizontal;
64133
- right2 += horizontal;
64134
- top2 += vertical;
64135
- bottom2 += vertical;
64136
- }
64137
- let style2 = "";
64138
- if (left2 && marginOffset?.left == null) style2 += `margin-left: ${left2}px;`;
64139
- if (top2 && marginOffset?.top == null) style2 += `margin-top: ${top2}px;`;
64140
- if (bottom2) style2 += `margin-bottom: ${bottom2}px;`;
64141
- if (right2) style2 += `margin-right: ${right2}px;`;
64142
- return { style: style2 };
64143
- }
64639
+ rendered: false
64640
+ // Handled in main renderDOM
64144
64641
  },
64145
64642
  marginOffset: {
64146
64643
  default: {},
64147
- renderDOM: ({ marginOffset, anchorData, transformData, size: size2 }) => {
64148
- const hasAnchorData = Boolean(anchorData);
64149
- const hasMarginOffsets = marginOffset?.left != null || marginOffset?.top != null;
64150
- if (!hasAnchorData && !hasMarginOffsets) return {};
64151
- const relativeFromPageV = anchorData?.vRelativeFrom === "page";
64152
- const maxMarginV = 500;
64153
- const baseLeft = marginOffset?.left ?? 0;
64154
- const baseTop = marginOffset?.top ?? 0;
64155
- let rotationLeft = 0;
64156
- let rotationTop = 0;
64157
- const { rotation } = transformData ?? {};
64158
- const { height, width } = size2 ?? {};
64159
- if (rotation && height && width) {
64160
- const { horizontal, vertical } = getRotationMargins(width, height, rotation);
64161
- rotationLeft = horizontal;
64162
- rotationTop = vertical;
64163
- }
64164
- const left2 = baseLeft + rotationLeft;
64165
- const top2 = baseTop + rotationTop;
64166
- let style2 = "";
64167
- if (left2) style2 += `margin-left: ${left2}px;`;
64168
- if (top2) {
64169
- if (relativeFromPageV && top2 >= maxMarginV) style2 += `margin-top: ${maxMarginV}px;`;
64170
- else style2 += `margin-top: ${top2}px;`;
64171
- }
64172
- if (!style2) return {};
64173
- return { style: style2 };
64174
- }
64644
+ rendered: false
64645
+ // Handled in main renderDOM
64175
64646
  },
64176
64647
  style: {
64177
64648
  default: null,
@@ -64190,8 +64661,181 @@ const Image = Node$1.create({
64190
64661
  }
64191
64662
  ];
64192
64663
  },
64193
- renderDOM({ htmlAttributes }) {
64194
- return ["img", Attribute2.mergeAttributes(this.options.htmlAttributes, htmlAttributes)];
64664
+ renderDOM({ node, htmlAttributes }) {
64665
+ const { wrap: wrap2, marginOffset } = getNormalizedImageAttrs(node.attrs);
64666
+ const { anchorData, padding, transformData = {}, size: size2 = { width: 0, height: 0 } } = node.attrs;
64667
+ const margin = {
64668
+ left: 0,
64669
+ right: 0,
64670
+ top: 0,
64671
+ bottom: 0
64672
+ };
64673
+ let centered = false;
64674
+ let floatRight = false;
64675
+ let baseHorizontal = marginOffset?.horizontal || 0;
64676
+ let style2 = "";
64677
+ if (padding) {
64678
+ if (padding.left) margin.left += padding.left;
64679
+ if (padding.right) margin.right += padding.right;
64680
+ if (padding.top) margin.top += padding.top;
64681
+ if (padding.bottom) margin.bottom += padding.bottom;
64682
+ }
64683
+ const { rotation } = transformData;
64684
+ const { height, width } = size2;
64685
+ if (rotation && height && width) {
64686
+ const { horizontal, vertical } = getRotationMargins(width, height, rotation);
64687
+ margin.left += horizontal;
64688
+ margin.right += horizontal;
64689
+ margin.top += vertical;
64690
+ margin.bottom += vertical;
64691
+ }
64692
+ if (wrap2 && wrap2.type) {
64693
+ const { type: type2, attrs = {} } = wrap2;
64694
+ switch (type2) {
64695
+ case "None":
64696
+ style2 += "position: absolute;";
64697
+ if (attrs.behindDoc) {
64698
+ style2 += "z-index: -1;";
64699
+ } else {
64700
+ style2 += "z-index: 1;";
64701
+ }
64702
+ break;
64703
+ case "Square":
64704
+ style2 += "shape-outside: border-box; clear: both;";
64705
+ if (attrs.wrapText === "right") {
64706
+ style2 += "float: left;";
64707
+ } else if (attrs.wrapText === "left") {
64708
+ style2 += "float: right;";
64709
+ floatRight = true;
64710
+ } else if (["largest", "bothSides"].includes(attrs.wrapText)) {
64711
+ const pageStyles2 = this.editor?.converter?.pageStyles;
64712
+ if (pageStyles2?.pageSize && pageStyles2?.pageMargins && size2.width) {
64713
+ const pageWidth = inchesToPixels(pageStyles2.pageSize.width);
64714
+ const leftMargin = inchesToPixels(pageStyles2.pageMargins.left);
64715
+ const rightMargin = inchesToPixels(pageStyles2.pageMargins.right);
64716
+ const contentWidth = pageWidth - leftMargin - rightMargin;
64717
+ const imageWidth = size2.width + (attrs.distLeft || 0) + (attrs.distRight || 0);
64718
+ const leftSpace = marginOffset.horizontal;
64719
+ const rightSpace = contentWidth - leftSpace - imageWidth;
64720
+ if (rightSpace < 0) {
64721
+ style2 += "float: left;";
64722
+ } else if (rightSpace > leftSpace) {
64723
+ style2 += "float: left;";
64724
+ } else {
64725
+ style2 += "float: right;";
64726
+ floatRight = true;
64727
+ baseHorizontal = rightSpace;
64728
+ }
64729
+ } else {
64730
+ style2 += "float: left;";
64731
+ }
64732
+ }
64733
+ if (attrs.distTop) margin.top += attrs.distTop;
64734
+ if (attrs.distBottom) margin.bottom += attrs.distBottom;
64735
+ if (attrs.distLeft) margin.left += attrs.distLeft;
64736
+ if (attrs.distRight) margin.right += attrs.distRight;
64737
+ break;
64738
+ case "Through":
64739
+ case "Tight":
64740
+ style2 += "clear: both;";
64741
+ const pageStyles = this.editor?.converter?.pageStyles;
64742
+ if (pageStyles?.pageSize && pageStyles?.pageMargins && size2.width) {
64743
+ const pageWidth = inchesToPixels(pageStyles.pageSize.width);
64744
+ const leftMargin = inchesToPixels(pageStyles.pageMargins.left);
64745
+ const rightMargin = inchesToPixels(pageStyles.pageMargins.right);
64746
+ const contentWidth = pageWidth - leftMargin - rightMargin;
64747
+ const imageWidth = size2.width + (attrs.distLeft || 0) + (attrs.distRight || 0);
64748
+ const leftSpace = marginOffset.horizontal;
64749
+ const rightSpace = contentWidth - leftSpace - imageWidth;
64750
+ if (rightSpace < 0) {
64751
+ style2 += "float: left;";
64752
+ } else if (rightSpace > leftSpace) {
64753
+ style2 += "float: left;";
64754
+ } else {
64755
+ style2 += "float: right;";
64756
+ floatRight = true;
64757
+ baseHorizontal = rightSpace;
64758
+ }
64759
+ } else {
64760
+ style2 += "float: left;";
64761
+ }
64762
+ if (attrs.distTop) margin.top += attrs.distTop;
64763
+ if (attrs.distBottom) margin.bottom += attrs.distBottom;
64764
+ if (attrs.distLeft) margin.left += attrs.distLeft;
64765
+ if (attrs.distRight) margin.right += attrs.distRight;
64766
+ if (attrs.polygon) {
64767
+ let horizontalOffset = floatRight ? attrs.polygon[0][0] || 0 : marginOffset.horizontal + 15;
64768
+ let maxX = 0;
64769
+ let minX = 0;
64770
+ let minY = 0;
64771
+ let maxY = 0;
64772
+ attrs.polygon.forEach(([x, y2]) => {
64773
+ if (floatRight && x < horizontalOffset) horizontalOffset = x;
64774
+ if (x > maxX) maxX = x;
64775
+ if (x < minX) minX = x;
64776
+ if (y2 > maxY) maxY = y2;
64777
+ if (y2 < minY) minY = y2;
64778
+ });
64779
+ const originalWidth = maxX - minX;
64780
+ const originalHeight = maxY - minY;
64781
+ const scaleWidth = Math.min(1, size2.width / originalWidth);
64782
+ const scaleHeight = Math.min(1, size2.height / originalHeight);
64783
+ const verticalOffset = Math.max(0, marginOffset.top);
64784
+ const points = attrs.polygon.map(([x, y2]) => `${horizontalOffset + x * scaleWidth}px ${verticalOffset + y2 * scaleHeight}px`).join(", ");
64785
+ style2 += `shape-outside: polygon(${points});`;
64786
+ }
64787
+ break;
64788
+ case "TopAndBottom":
64789
+ style2 += "display: block; clear: both;";
64790
+ if (attrs.distTop) margin.top += attrs.distTop;
64791
+ if (attrs.distBottom) margin.bottom += attrs.distBottom;
64792
+ centered = true;
64793
+ break;
64794
+ }
64795
+ }
64796
+ const hasAnchorData = Boolean(anchorData);
64797
+ const hasMarginOffsets = marginOffset?.horizontal != null || marginOffset?.top != null;
64798
+ if (hasAnchorData || hasMarginOffsets) {
64799
+ const relativeFromPageV = anchorData?.vRelativeFrom === "page";
64800
+ const maxMarginV = 500;
64801
+ const baseTop = Math.max(0, marginOffset?.top ?? 0);
64802
+ let rotationHorizontal = 0;
64803
+ let rotationTop = 0;
64804
+ const { rotation: rotation2 } = transformData ?? {};
64805
+ const { height: height2, width: width2 } = size2 ?? {};
64806
+ if (rotation2 && height2 && width2) {
64807
+ const { horizontal: horizontal2, vertical } = getRotationMargins(width2, height2, rotation2);
64808
+ rotationHorizontal = horizontal2;
64809
+ rotationTop = vertical;
64810
+ }
64811
+ const horizontal = baseHorizontal + rotationHorizontal;
64812
+ const top2 = baseTop + rotationTop;
64813
+ if (horizontal) {
64814
+ if (floatRight) {
64815
+ margin.right += horizontal;
64816
+ } else {
64817
+ margin.left += horizontal;
64818
+ }
64819
+ }
64820
+ if (top2) {
64821
+ if (relativeFromPageV && top2 >= maxMarginV) margin.top += maxMarginV;
64822
+ else margin.top += top2;
64823
+ }
64824
+ }
64825
+ if (centered) {
64826
+ style2 += "margin-left: auto; margin-right: auto;";
64827
+ } else {
64828
+ if (margin.left) style2 += `margin-left: ${margin.left}px;`;
64829
+ if (margin.right) style2 += `margin-right: ${margin.right}px;`;
64830
+ }
64831
+ if (margin.top) style2 += `margin-top: ${margin.top}px;`;
64832
+ if (margin.bottom) style2 += `margin-bottom: ${margin.bottom}px;`;
64833
+ const finalAttributes = { ...htmlAttributes };
64834
+ if (style2) {
64835
+ const existingStyle = finalAttributes.style || "";
64836
+ finalAttributes.style = existingStyle + (existingStyle ? " " : "") + style2;
64837
+ }
64838
+ return ["img", Attribute2.mergeAttributes(this.options.htmlAttributes, finalAttributes)];
64195
64839
  },
64196
64840
  addCommands() {
64197
64841
  return {
@@ -64213,6 +64857,85 @@ const Image = Node$1.create({
64213
64857
  type: this.name,
64214
64858
  attrs: options
64215
64859
  });
64860
+ },
64861
+ /**
64862
+ * Set the wrapping mode and attributes for the selected image
64863
+ * @category Command
64864
+ * @param {Object} options - Wrapping options
64865
+ * @param {string} options.type - Wrap type: "None", "Square", "Through", "Tight", "TopAndBottom", "Inline"
64866
+ * @param {Object} [options.attrs] - Wrap attributes (only allowed attributes for the given type will be accepted)
64867
+ * @param {string} [options.attrs.wrapText] - Text wrapping mode for Square type: "bothSides", "largest", "left", "right"
64868
+ * @param {number} [options.attrs.distTop] - Top distance in pixels
64869
+ * @param {number} [options.attrs.distBottom] - Bottom distance in pixels
64870
+ * @param {number} [options.attrs.distLeft] - Left distance in pixels
64871
+ * @param {number} [options.attrs.distRight] - Right distance in pixels
64872
+ * @param {Array} [options.attrs.polygon] - Polygon points for Through/Tight types: [[x1,y1], [x2,y2], ...]
64873
+ * @param {boolean} [options.attrs.behindDoc] - Whether image should be behind document text (for wrapNone)
64874
+ * @example
64875
+ * // No wrapping, behind document
64876
+ * editor.commands.setWrapping({ type: 'None', attrs: {behindDoc: true} })
64877
+ *
64878
+ * // Square wrapping on both sides with distances
64879
+ * editor.commands.setWrapping({
64880
+ * type: 'Square',
64881
+ * attrs: {
64882
+ * wrapText: 'bothSides',
64883
+ * distTop: 10,
64884
+ * distBottom: 10,
64885
+ * distLeft: 10,
64886
+ * distRight: 10
64887
+ * }
64888
+ * })
64889
+ *
64890
+ * // Tight wrapping with polygon
64891
+ * editor.commands.setWrapping({
64892
+ * type: 'Tight',
64893
+ * attrs: {
64894
+ * polygon: [[0, 0], [100, 0], [100, 100], [0, 100]]
64895
+ * }
64896
+ * })
64897
+ *
64898
+ * // Top and bottom wrapping
64899
+ * editor.commands.setWrapping({
64900
+ * type: 'TopAndBottom',
64901
+ * attrs: {
64902
+ * distTop: 15,
64903
+ * distBottom: 15
64904
+ * }
64905
+ * })
64906
+ */
64907
+ setWrapping: (options) => ({ chain, state: state2 }) => {
64908
+ const { selection } = state2;
64909
+ const { $from } = selection;
64910
+ const node = $from.nodeAfter;
64911
+ if (!node || node.type.name !== this.name) {
64912
+ return false;
64913
+ }
64914
+ const { type: type2, attrs = {} } = options;
64915
+ const allowedAttrs = {};
64916
+ const allowedAttributes = {
64917
+ None: ["behindDoc"],
64918
+ Square: ["wrapText", "distTop", "distBottom", "distLeft", "distRight"],
64919
+ Through: ["distTop", "distBottom", "distLeft", "distRight", "polygon"],
64920
+ Tight: ["distTop", "distBottom", "distLeft", "distRight", "polygon"],
64921
+ TopAndBottom: ["distTop", "distBottom"],
64922
+ Inline: []
64923
+ };
64924
+ const allowedForType = allowedAttributes[type2] || [];
64925
+ Object.keys(attrs).forEach((key2) => {
64926
+ if (allowedForType.includes(key2)) {
64927
+ allowedAttrs[key2] = attrs[key2];
64928
+ }
64929
+ });
64930
+ const updatedAttrs = {
64931
+ ...node.attrs,
64932
+ wrap: {
64933
+ type: type2,
64934
+ attrs: allowedAttrs
64935
+ },
64936
+ isAnchor: type2 !== "Inline"
64937
+ };
64938
+ return chain().updateAttributes(this.name, updatedAttrs).run();
64216
64939
  }
64217
64940
  };
64218
64941
  },
@@ -87168,7 +87891,7 @@ const _sfc_main$2 = {
87168
87891
  }
87169
87892
  };
87170
87893
  const GenericPopover = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-cbddcc0f"]]);
87171
- const BlankDOCX = "data:application/octet-stream;base64,UEsDBBQABgAIAAAAIQAykW9XZgEAAKUFAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAC/BgAAd29yZC9kb2N1bWVudC54bWxQSwECLQAUAAYACAAAACEAs76LHQUBAAC2AwAAHAAAAAAAAAAAAAAAAADSCQAAd29yZC9fcmVscy9kb2N1bWVudC54bWwucmVsc1BLAQItABQABgAIAAAAIQBngPy0zgYAAM0gAAAVAAAAAAAAAAAAAAAAABkMAAB3b3JkL3RoZW1lL3RoZW1lMS54bWxQSwECLQAUAAYACAAAACEAyudlijsEAAC+DAAAEQAAAAAAAAAAAAAAAAAaEwAAd29yZC9zZXR0aW5ncy54bWxQSwECLQAUAAYACAAAACEA24Vsw6EEAACXHQAAEgAAAAAAAAAAAAAAAACEFwAAd29yZC9udW1iZXJpbmcueG1sUEsBAi0AFAAGAAgAAAAhAD+v4WbrDwAADaYAAA8AAAAAAAAAAAAAAAAAVRwAAHdvcmQvc3R5bGVzLnhtbFBLAQItABQABgAIAAAAIQC+fnZiXgEAANADAAAUAAAAAAAAAAAAAAAAAG0sAAB3b3JkL3dlYlNldHRpbmdzLnhtbFBLAQItABQABgAIAAAAIQC6dnA8swIAANgLAAASAAAAAAAAAAAAAAAAAP0tAAB3b3JkL2ZvbnRUYWJsZS54bWxQSwECLQAUAAYACAAAACEACvOn+GwBAADtAgAAEQAAAAAAAAAAAAAAAADgMAAAZG9jUHJvcHMvY29yZS54bWxQSwECLQAUAAYACAAAACEAIRivWWsBAADFAgAAEAAAAAAAAAAAAAAAAACDMwAAZG9jUHJvcHMvYXBwLnhtbFBLBQYAAAAADAAMAAEDAAAkNgAAAAA=";
87894
+ const BlankDOCX = "data:application/octet-stream;base64,UEsDBBQAAAAIAAAAIQAykW9XXgEAAKUFAAATABwAW0NvbnRlbnRfVHlwZXNdLnhtbFVUCQADMNDOEjDQzhJ1eAsAAQT1AQAABBQAAAC1lMtqwzAQRfeF/oPRNthKuiilxMmij2UbaPoBijRORPVCmrz+vuM4NaWkMeSxMcgz994zQsxwvLEmW0FM2ruSDYo+y8BJr7Sbl+xz+po/sCyhcEoY76BkW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AAACEAvn52YlYBAADQAwAAFAAYAAAAAAABAAAApIG2FQAAd29yZC93ZWJTZXR0aW5ncy54bWxVVAUAAzDQzhJ1eAsAAQT1AQAABBQAAABQSwECHgMUAAAACAAAACEAP6/hZl8PAAANpgAADwAYAAAAAAABAAAApIFaFwAAd29yZC9zdHlsZXMueG1sVVQFAAMw0M4SdXgLAAEE9QEAAAQUAAAAUEsBAh4DCgAAAAAAk2RNWwAAAAAAAAAAAAAAAAsAGAAAAAAAAAAQAO1BAicAAHdvcmQvdGhlbWUvVVQFAAOGHO1odXgLAAEE9QEAAAQUAAAAUEsBAh4DFAAAAAgAAAAhAGeA/LSbBgAAzSAAABUAGAAAAAAAAQAAAKSBRycAAHdvcmQvdGhlbWUvdGhlbWUxLnhtbFVUBQADMNDOEnV4CwABBPUBAAAEFAAAAFBLAQIeAwoAAAAAAJNkTVsAAAAAAAAAAAAAAAALABgAAAAAAAAAEADtQTEuAAB3b3JkL19yZWxzL1VUBQADhhztaHV4CwABBPUBAAAEFAAAAFBLAQIeAxQAAAAIAAAAIQCzvosd/gAAALYDAAAcABgAAAAAAAEAAACkgXYuAAB3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzVVQFAAMw0M4SdXgLAAEE9QEAAAQUAAAAUEsFBgAAAAARABEAqQUAAMovAAAAAA==";
87172
87895
  const _hoisted_1$1 = { class: "super-editor-container" };
87173
87896
  const _hoisted_2 = {
87174
87897
  key: 1,
@@ -87561,74 +88284,89 @@ const _sfc_main = {
87561
88284
  const SuperInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4d5cff52"]]);
87562
88285
  const additionalHandlers = Object.freeze({
87563
88286
  "mc:AlternateContent": translator$1,
87564
- "sd:pageReference": translator$3,
87565
- "sd:tableOfContents": translator$2,
87566
- "w:b": translator$16,
87567
- "w:bidiVisual": translator$H,
87568
- "w:bookmarkEnd": translator$4,
87569
- "w:bookmarkStart": translator$5,
87570
- "w:bottom": translator$u,
87571
- "w:br": translator$1a,
87572
- "w:cantSplit": translator$V,
87573
- "w:cnfStyle": translator$U,
87574
- "w:color": translator$12,
87575
- "w:divId": translator$T,
87576
- "w:drawing": translator$7,
87577
- "w:end": translator$s,
87578
- "w:gridAfter": translator$S,
87579
- "w:gridBefore": translator$R,
87580
- "w:gridCol": translator$d,
87581
- "w:hidden": translator$Q,
87582
- "w:highlight": translator$19,
87583
- "w:hyperlink": translator$X,
87584
- "w:i": translator$15,
87585
- "w:insideH": translator$q,
87586
- "w:insideV": translator$p,
87587
- "w:jc": translator$P,
87588
- "w:left": translator$o,
87589
- "w:p": translator$17,
87590
- "w:r": translator$W,
87591
- "w:rFonts": translator$11,
87592
- "w:rPr": translator$Y,
87593
- "w:rStyle": translator$10,
87594
- "w:right": translator$m,
87595
- "w:sdt": translator$6,
87596
- "w:shd": translator$G,
87597
- "w:start": translator$k,
87598
- "w:strike": translator$13,
87599
- "w:sz": translator$$,
87600
- "w:szCs": translator$_,
87601
- "w:tab": translator$18,
87602
- "w:tbl": translator$b,
87603
- "w:tblBorders": translator$g,
87604
- "w:tblCaption": translator$F,
87605
- "w:tblCellMar": translator$f,
87606
- "w:tblCellSpacing": translator$O,
87607
- "w:tblDescription": translator$E,
87608
- "w:tblGrid": translator$c,
87609
- "w:tblHeader": translator$N,
87610
- "w:tblInd": translator$D,
87611
- "w:tblLayout": translator$C,
87612
- "w:tblLook": translator$B,
87613
- "w:tblOverlap": translator$A,
87614
- "w:tblPr": translator$e,
87615
- "w:tblStyle": translator$z,
87616
- "w:tblStyleColBandSize": translator$y,
87617
- "w:tblStyleRowBandSize": translator$x,
87618
- "w:tblW": translator$w,
87619
- "w:tblpPr": translator$v,
87620
- "w:tc": translator$a,
87621
- "w:top": translator$i,
87622
- "w:tr": translator$I,
87623
- "w:trHeight": translator$M,
87624
- "w:trPr": translator$J,
87625
- "w:u": translator$14,
87626
- "w:wAfter": translator$L,
87627
- "w:wBefore": translator$K,
87628
- "wp:anchor": translator$9,
87629
- "wp:inline": translator$8,
88287
+ "sd:pageReference": translator$5,
88288
+ "sd:tableOfContents": translator$4,
88289
+ "w:b": translator$1n,
88290
+ "w:bidiVisual": translator$Y,
88291
+ "w:bookmarkEnd": translator$6,
88292
+ "w:bookmarkStart": translator$7,
88293
+ "w:bottom": translator$L,
88294
+ "w:br": translator$1r,
88295
+ "w:cantSplit": translator$1a,
88296
+ "w:cnfStyle": translator$19,
88297
+ "w:color": translator$1j,
88298
+ "w:divId": translator$18,
88299
+ "w:drawing": translator$9,
88300
+ "w:end": translator$J,
88301
+ "w:gridAfter": translator$17,
88302
+ "w:gridBefore": translator$16,
88303
+ "w:gridCol": translator$u,
88304
+ "w:hidden": translator$15,
88305
+ "w:highlight": translator$1q,
88306
+ "w:hyperlink": translator$1c,
88307
+ "w:i": translator$1m,
88308
+ "w:insideH": translator$H,
88309
+ "w:insideV": translator$G,
88310
+ "w:jc": translator$14,
88311
+ "w:left": translator$F,
88312
+ "w:p": translator$1o,
88313
+ "w:r": translator$1b,
88314
+ "w:rFonts": translator$1i,
88315
+ "w:rPr": translator$1d,
88316
+ "w:rStyle": translator$1h,
88317
+ "w:right": translator$D,
88318
+ "w:sdt": translator$8,
88319
+ "w:shd": translator$X,
88320
+ "w:start": translator$B,
88321
+ "w:strike": translator$1k,
88322
+ "w:sz": translator$1g,
88323
+ "w:szCs": translator$1f,
88324
+ "w:tab": translator$1p,
88325
+ "w:tbl": translator$s,
88326
+ "w:tblBorders": translator$x,
88327
+ "w:tblCaption": translator$W,
88328
+ "w:tblCellMar": translator$w,
88329
+ "w:tblCellSpacing": translator$13,
88330
+ "w:tblDescription": translator$V,
88331
+ "w:tblGrid": translator$t,
88332
+ "w:tblHeader": translator$12,
88333
+ "w:tblInd": translator$U,
88334
+ "w:tblLayout": translator$T,
88335
+ "w:tblLook": translator$S,
88336
+ "w:tblOverlap": translator$R,
88337
+ "w:tblPr": translator$v,
88338
+ "w:tblStyle": translator$Q,
88339
+ "w:tblStyleColBandSize": translator$P,
88340
+ "w:tblStyleRowBandSize": translator$O,
88341
+ "w:tblW": translator$N,
88342
+ "w:tblpPr": translator$M,
88343
+ "w:tc": translator$c,
88344
+ "w:top": translator$z,
88345
+ "w:tr": translator$Z,
88346
+ "w:trHeight": translator$11,
88347
+ "w:trPr": translator$_,
88348
+ "w:u": translator$1l,
88349
+ "w:wAfter": translator$10,
88350
+ "w:wBefore": translator$$,
88351
+ "wp:anchor": translator$b,
88352
+ "wp:inline": translator$a,
87630
88353
  "w:commentRangeStart": commentRangeStartTranslator,
87631
- "w:commentRangeEnd": commentRangeEndTranslator
88354
+ "w:commentRangeEnd": commentRangeEndTranslator,
88355
+ "w:vMerge": translator$p,
88356
+ "w:gridSpan": translator$q,
88357
+ "w:vAlign": translator$h,
88358
+ "w:noWrap": translator$l,
88359
+ "w:tcFitText": translator$i,
88360
+ "w:tcW": translator$r,
88361
+ "w:hideMark": translator$g,
88362
+ "w:textDirection": translator$j,
88363
+ "w:tl2br": translator$o,
88364
+ "w:tr2bl": translator$n,
88365
+ "w:header": translator$f,
88366
+ "w:headers": translator$e,
88367
+ "w:tcBorders": translator$m,
88368
+ "w:tcMar": translator$k,
88369
+ "w:tcPr": translator$d
87632
88370
  });
87633
88371
  const baseHandlers = {
87634
88372
  ...runPropertyTranslators,