superdoc 0.31.0-next.3 → 0.31.0-next.5

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 (47) hide show
  1. package/dist/chunks/{PdfViewer-UMfEMyPR.es.js → PdfViewer-BjFaPQBd.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-DoOKSkNf.cjs → PdfViewer-DXwcotXc.cjs} +1 -1
  3. package/dist/chunks/{index-D78pvKjo.es.js → index-B6TttOzK.es.js} +3 -3
  4. package/dist/chunks/{index-B74saKaW-CeHVjvs8.es.js → index-B7dC-H-Q-BeQx_MXI.es.js} +1 -1
  5. package/dist/chunks/{index-B74saKaW-nw0M-3t9.cjs → index-B7dC-H-Q-DfBEU7rR.cjs} +1 -1
  6. package/dist/chunks/{index-CjrYy0l4.cjs → index-BF_Yvius.cjs} +3 -3
  7. package/dist/chunks/{super-editor.es-DTqtLZgT.cjs → super-editor.es-CVDIAxlg.cjs} +1037 -1002
  8. package/dist/chunks/{super-editor.es-CQFVPho1.es.js → super-editor.es-M2e4wbRW.es.js} +1037 -1002
  9. package/dist/super-editor/ai-writer.es.js +2 -2
  10. package/dist/super-editor/chunks/{converter-BdxQSBuI.js → converter-BIsS-JzD.js} +1055 -1020
  11. package/dist/super-editor/chunks/{docx-zipper-CeENQy4K.js → docx-zipper-DVDiaIyD.js} +1 -1
  12. package/dist/super-editor/chunks/{editor-fHPBoGEW.js → editor-ZbcM1RTL.js} +4 -4
  13. package/dist/super-editor/chunks/{index-B74saKaW.js → index-B7dC-H-Q.js} +1 -1
  14. package/dist/super-editor/chunks/{toolbar-DVn2P_6q.js → toolbar-8qqw8IXG.js} +2 -2
  15. package/dist/super-editor/converter.es.js +1 -1
  16. package/dist/super-editor/docx-zipper.es.js +2 -2
  17. package/dist/super-editor/editor.es.js +3 -3
  18. package/dist/super-editor/file-zipper.es.js +1 -1
  19. package/dist/super-editor/super-editor/src/core/super-converter/exporter.d.ts +0 -48
  20. package/dist/super-editor/super-editor/src/core/super-converter/exporter.d.ts.map +1 -1
  21. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/autoPageNumberImporter.d.ts.map +1 -1
  22. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/sd/autoPageNumber/autoPageNumber-translator.d.ts +8 -0
  23. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/sd/autoPageNumber/autoPageNumber-translator.d.ts.map +1 -0
  24. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/sd/autoPageNumber/index.d.ts +2 -0
  25. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/sd/autoPageNumber/index.d.ts.map +1 -0
  26. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/sd/totalPageNumber/index.d.ts +2 -0
  27. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/sd/totalPageNumber/index.d.ts.map +1 -0
  28. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/sd/totalPageNumber/totalPageNumber-translator.d.ts +8 -0
  29. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/sd/totalPageNumber/totalPageNumber-translator.d.ts.map +1 -0
  30. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/generate-paragraph-properties.d.ts +8 -0
  31. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/generate-paragraph-properties.d.ts.map +1 -0
  32. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/translate-paragraph-node.d.ts +8 -0
  33. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/translate-paragraph-node.d.ts.map +1 -0
  34. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/convert-sdt-content-to-runs.d.ts +7 -0
  35. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/convert-sdt-content-to-runs.d.ts.map +1 -0
  36. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/translate-field-annotation.d.ts.map +1 -1
  37. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/t/helpers/translate-text-node.d.ts +5 -0
  38. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/t/helpers/translate-text-node.d.ts.map +1 -0
  39. package/dist/super-editor/super-editor.es.js +6 -6
  40. package/dist/super-editor/toolbar.es.js +2 -2
  41. package/dist/super-editor.cjs +1 -1
  42. package/dist/super-editor.es.js +1 -1
  43. package/dist/superdoc.cjs +2 -2
  44. package/dist/superdoc.es.js +2 -2
  45. package/dist/superdoc.umd.js +1041 -1006
  46. package/dist/superdoc.umd.js.map +1 -1
  47. package/package.json +1 -1
@@ -15409,19 +15409,6 @@ const hasSomeParentWithClass = (element, classname) => {
15409
15409
  if (element.className?.split(" ")?.indexOf(classname) >= 0) return true;
15410
15410
  return element.parentNode && hasSomeParentWithClass(element.parentNode, classname);
15411
15411
  };
15412
- function generateDocxRandomId(length2 = 8) {
15413
- const max2 = 2147483647;
15414
- const value = Math.floor(Math.random() * (max2 + 1));
15415
- return value.toString(16).padStart(length2, "0").slice(0, length2);
15416
- }
15417
- function generateRandomSigned32BitIntStrId() {
15418
- const val = Math.floor(Math.random() * 2147483647);
15419
- return val.toString();
15420
- }
15421
- function generateRandom32BitHex() {
15422
- const val = Math.floor(Math.random() * 2147483647);
15423
- return val.toString(16).toUpperCase().padStart(8, "0");
15424
- }
15425
15412
  const DEFAULT_DOCX_DEFS = {
15426
15413
  "xmlns:wpc": "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
15427
15414
  "xmlns:cx": "http://schemas.microsoft.com/office/drawing/2014/chartex",
@@ -16627,15 +16614,6 @@ const COMMENTS_XML_DEFINITIONS = {
16627
16614
  DOCUMENT_RELS_XML_DEF,
16628
16615
  CONTENT_TYPES
16629
16616
  };
16630
- const carbonCopy = (obj) => {
16631
- if (!obj) return void 0;
16632
- try {
16633
- return JSON.parse(JSON.stringify(obj));
16634
- } catch (e) {
16635
- console.error("Error in carbonCopy", obj, e);
16636
- return void 0;
16637
- }
16638
- };
16639
16617
  function translateChildNodes(params2) {
16640
16618
  const { content: nodes } = params2.node;
16641
16619
  if (!nodes) return [];
@@ -18036,37 +18014,37 @@ const _NodeTranslator = class _NodeTranslator2 {
18036
18014
  };
18037
18015
  __publicField$2(_NodeTranslator, "translatorTypes", TranslatorTypes);
18038
18016
  let NodeTranslator = _NodeTranslator;
18039
- const encode$P = (attributes) => {
18017
+ const encode$R = (attributes) => {
18040
18018
  return attributes["w:type"];
18041
18019
  };
18042
- const decode$R = (attrs) => {
18020
+ const decode$T = (attrs) => {
18043
18021
  const { lineBreakType } = attrs;
18044
18022
  return lineBreakType;
18045
18023
  };
18046
18024
  const attrConfig$s = Object.freeze({
18047
18025
  xmlName: "w:type",
18048
18026
  sdName: "lineBreakType",
18049
- encode: encode$P,
18050
- decode: decode$R
18027
+ encode: encode$R,
18028
+ decode: decode$T
18051
18029
  });
18052
- const encode$O = (attributes) => {
18030
+ const encode$Q = (attributes) => {
18053
18031
  const xmlAttrValue = attributes["w:clear"];
18054
18032
  return xmlAttrValue;
18055
18033
  };
18056
- const decode$Q = (attrs) => {
18034
+ const decode$S = (attrs) => {
18057
18035
  const { clear } = attrs;
18058
18036
  return clear;
18059
18037
  };
18060
18038
  const attrConfig$r = Object.freeze({
18061
18039
  xmlName: "w:clear",
18062
18040
  sdName: "clear",
18063
- encode: encode$O,
18064
- decode: decode$Q
18041
+ encode: encode$Q,
18042
+ decode: decode$S
18065
18043
  });
18066
18044
  const validXmlAttributes$j = [attrConfig$s, attrConfig$r];
18067
- const XML_NODE_NAME$o = "w:br";
18068
- const SD_NODE_NAME$i = "lineBreak";
18069
- const encode$N = (_2, encodedAttrs) => {
18045
+ const XML_NODE_NAME$q = "w:br";
18046
+ const SD_NODE_NAME$k = "lineBreak";
18047
+ const encode$P = (_2, encodedAttrs) => {
18070
18048
  const isPageBreak = encodedAttrs?.lineBreakType === "page";
18071
18049
  const translated = {
18072
18050
  type: isPageBreak ? "hardBreak" : "lineBreak"
@@ -18076,7 +18054,7 @@ const encode$N = (_2, encodedAttrs) => {
18076
18054
  }
18077
18055
  return translated;
18078
18056
  };
18079
- const decode$P = (params2, decodedAttrs) => {
18057
+ const decode$R = (params2, decodedAttrs) => {
18080
18058
  const { node } = params2;
18081
18059
  if (!node) return;
18082
18060
  const wBreak = { name: "w:br" };
@@ -18093,39 +18071,39 @@ const decode$P = (params2, decodedAttrs) => {
18093
18071
  };
18094
18072
  return translated;
18095
18073
  };
18096
- const config$n = {
18097
- xmlName: XML_NODE_NAME$o,
18098
- sdNodeOrKeyName: SD_NODE_NAME$i,
18074
+ const config$p = {
18075
+ xmlName: XML_NODE_NAME$q,
18076
+ sdNodeOrKeyName: SD_NODE_NAME$k,
18099
18077
  type: NodeTranslator.translatorTypes.NODE,
18100
- encode: encode$N,
18101
- decode: decode$P,
18078
+ encode: encode$P,
18079
+ decode: decode$R,
18102
18080
  attributes: validXmlAttributes$j
18103
18081
  };
18104
- const translator$21 = NodeTranslator.from(config$n);
18105
- const encode$M = (attributes) => attributes?.["w:val"];
18106
- const decode$O = (attrs) => attrs?.highlight;
18082
+ const translator$23 = NodeTranslator.from(config$p);
18083
+ const encode$O = (attributes) => attributes?.["w:val"];
18084
+ const decode$Q = (attrs) => attrs?.highlight;
18107
18085
  const attrConfig$q = Object.freeze({
18108
18086
  xmlName: "w:val",
18109
18087
  sdName: "highlight",
18110
- encode: encode$M,
18111
- decode: decode$O
18088
+ encode: encode$O,
18089
+ decode: decode$Q
18112
18090
  });
18113
18091
  const validXmlAttributes$i = [attrConfig$q];
18114
- const XML_NODE_NAME$n = "w:highlight";
18092
+ const XML_NODE_NAME$p = "w:highlight";
18115
18093
  const SD_ATTR_KEY$4 = "highlight";
18116
18094
  const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
18117
- const encode$L = (params2, encodedAttrs = {}) => {
18095
+ const encode$N = (params2, encodedAttrs = {}) => {
18118
18096
  const { nodes } = params2;
18119
18097
  const node = nodes?.[0];
18120
18098
  const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
18121
18099
  return {
18122
18100
  type: "attr",
18123
- xmlName: XML_NODE_NAME$n,
18101
+ xmlName: XML_NODE_NAME$p,
18124
18102
  sdNodeOrKeyName: SD_ATTR_KEY$4,
18125
18103
  attributes: { "w:val": value ?? null }
18126
18104
  };
18127
18105
  };
18128
- const decode$N = (params2) => {
18106
+ const decode$P = (params2) => {
18129
18107
  const attrs = params2?.node?.attrs || {};
18130
18108
  const highlightValue = attrs.highlight?.["w:val"] ?? attrs.highlight ?? attrs.color ?? null;
18131
18109
  if (!highlightValue) return void 0;
@@ -18133,14 +18111,14 @@ const decode$N = (params2) => {
18133
18111
  if (!normalizedValue) return void 0;
18134
18112
  if (DISABLED_TOKENS.has(normalizedValue)) {
18135
18113
  return {
18136
- name: XML_NODE_NAME$n,
18114
+ name: XML_NODE_NAME$p,
18137
18115
  attributes: { "w:val": "none" }
18138
18116
  };
18139
18117
  }
18140
18118
  const keyword = getDocxHighlightKeywordFromHex(highlightValue);
18141
18119
  if (keyword) {
18142
18120
  return {
18143
- name: XML_NODE_NAME$n,
18121
+ name: XML_NODE_NAME$p,
18144
18122
  attributes: { "w:val": keyword }
18145
18123
  };
18146
18124
  }
@@ -18155,64 +18133,64 @@ const decode$N = (params2) => {
18155
18133
  }
18156
18134
  };
18157
18135
  };
18158
- const config$m = {
18159
- xmlName: XML_NODE_NAME$n,
18136
+ const config$o = {
18137
+ xmlName: XML_NODE_NAME$p,
18160
18138
  sdNodeOrKeyName: SD_ATTR_KEY$4,
18161
18139
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
18162
- encode: encode$L,
18163
- decode: decode$N,
18140
+ encode: encode$N,
18141
+ decode: decode$P,
18164
18142
  attributes: validXmlAttributes$i
18165
18143
  };
18166
- const translator$20 = NodeTranslator.from(config$m);
18167
- const encode$K = (attributes) => {
18144
+ const translator$22 = NodeTranslator.from(config$o);
18145
+ const encode$M = (attributes) => {
18168
18146
  return attributes["w:val"];
18169
18147
  };
18170
- const decode$M = (attrs) => {
18148
+ const decode$O = (attrs) => {
18171
18149
  const { tabType } = attrs || {};
18172
18150
  return tabType;
18173
18151
  };
18174
18152
  const attrConfig$p = Object.freeze({
18175
18153
  xmlName: "w:val",
18176
18154
  sdName: "tabType",
18177
- encode: encode$K,
18178
- decode: decode$M
18155
+ encode: encode$M,
18156
+ decode: decode$O
18179
18157
  });
18180
- const encode$J = (attributes) => {
18158
+ const encode$L = (attributes) => {
18181
18159
  return attributes["w:leader"];
18182
18160
  };
18183
- const decode$L = (attrs) => {
18161
+ const decode$N = (attrs) => {
18184
18162
  const { leader } = attrs || {};
18185
18163
  return leader;
18186
18164
  };
18187
18165
  const attrConfig$o = Object.freeze({
18188
18166
  xmlName: "w:leader",
18189
18167
  sdName: "leader",
18190
- encode: encode$J,
18191
- decode: decode$L
18168
+ encode: encode$L,
18169
+ decode: decode$N
18192
18170
  });
18193
- const encode$I = (attributes) => {
18171
+ const encode$K = (attributes) => {
18194
18172
  if (attributes["w:pos"] != null) return parseInt(attributes["w:pos"]);
18195
18173
  return null;
18196
18174
  };
18197
- const decode$K = (attrs) => {
18175
+ const decode$M = (attrs) => {
18198
18176
  const { pos } = attrs || {};
18199
18177
  return pos?.toString();
18200
18178
  };
18201
18179
  const attrConfig$n = Object.freeze({
18202
18180
  xmlName: "w:pos",
18203
18181
  sdName: "pos",
18204
- encode: encode$I,
18205
- decode: decode$K
18182
+ encode: encode$K,
18183
+ decode: decode$M
18206
18184
  });
18207
18185
  const validXmlAttributes$h = [attrConfig$p, attrConfig$n, attrConfig$o];
18208
- const XML_NODE_NAME$m = "w:tab";
18209
- const SD_NODE_NAME$h = "tab";
18210
- const encode$H = (_2, encodedAttrs = {}) => {
18186
+ const XML_NODE_NAME$o = "w:tab";
18187
+ const SD_NODE_NAME$j = "tab";
18188
+ const encode$J = (_2, encodedAttrs = {}) => {
18211
18189
  const translated = { type: "tab" };
18212
18190
  if (encodedAttrs) translated.attrs = { ...encodedAttrs };
18213
18191
  return translated;
18214
18192
  };
18215
- function decode$J(params2, decodedAttrs = {}) {
18193
+ function decode$L(params2, decodedAttrs = {}) {
18216
18194
  const { node } = params2 || {};
18217
18195
  if (!node) return;
18218
18196
  const wTab = { name: "w:tab", elements: [] };
@@ -18234,15 +18212,24 @@ function decode$J(params2, decodedAttrs = {}) {
18234
18212
  }
18235
18213
  return translated;
18236
18214
  }
18237
- const config$l = {
18238
- xmlName: XML_NODE_NAME$m,
18239
- sdNodeOrKeyName: SD_NODE_NAME$h,
18215
+ const config$n = {
18216
+ xmlName: XML_NODE_NAME$o,
18217
+ sdNodeOrKeyName: SD_NODE_NAME$j,
18240
18218
  type: NodeTranslator.translatorTypes.NODE,
18241
- encode: encode$H,
18242
- decode: decode$J,
18219
+ encode: encode$J,
18220
+ decode: decode$L,
18243
18221
  attributes: validXmlAttributes$h
18244
18222
  };
18245
- const translator$1$ = NodeTranslator.from(config$l);
18223
+ const translator$21 = NodeTranslator.from(config$n);
18224
+ const carbonCopy = (obj) => {
18225
+ if (!obj) return void 0;
18226
+ try {
18227
+ return JSON.parse(JSON.stringify(obj));
18228
+ } catch (e) {
18229
+ console.error("Error in carbonCopy", obj, e);
18230
+ return void 0;
18231
+ }
18232
+ };
18246
18233
  const mergeTextNodes = (nodes) => {
18247
18234
  if (!nodes || !Array.isArray(nodes)) {
18248
18235
  return nodes;
@@ -18559,53 +18546,53 @@ const integerToString = (value) => {
18559
18546
  const intValue = parseInteger(value);
18560
18547
  return intValue != void 0 ? String(intValue) : void 0;
18561
18548
  };
18562
- const translator$1_ = NodeTranslator.from(createSingleBooleanPropertyHandler("w:b", "bold"));
18563
- const translator$1Z = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bCs", "boldCs"));
18564
- const translator$1Y = NodeTranslator.from(createSingleBooleanPropertyHandler("w:i", "italic"));
18565
- const encode$G = (attributes) => attributes?.["w:val"];
18566
- const decode$I = (attrs) => attrs?.underline;
18549
+ const translator$20 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:b", "bold"));
18550
+ const translator$1$ = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bCs", "boldCs"));
18551
+ const translator$1_ = NodeTranslator.from(createSingleBooleanPropertyHandler("w:i", "italic"));
18552
+ const encode$I = (attributes) => attributes?.["w:val"];
18553
+ const decode$K = (attrs) => attrs?.underline;
18567
18554
  const attrConfig$m = Object.freeze({
18568
18555
  xmlName: "w:val",
18569
18556
  sdName: "underline",
18570
- encode: encode$G,
18571
- decode: decode$I
18557
+ encode: encode$I,
18558
+ decode: decode$K
18572
18559
  });
18573
- const encode$F = (attributes) => attributes?.["w:color"];
18574
- const decode$H = (attrs) => attrs?.color;
18560
+ const encode$H = (attributes) => attributes?.["w:color"];
18561
+ const decode$J = (attrs) => attrs?.color;
18575
18562
  const attrConfig$l = Object.freeze({
18576
18563
  xmlName: "w:color",
18577
18564
  sdName: "color",
18578
- encode: encode$F,
18579
- decode: decode$H
18565
+ encode: encode$H,
18566
+ decode: decode$J
18580
18567
  });
18581
- const encode$E = (attributes) => attributes?.["w:themeColor"];
18582
- const decode$G = (attrs) => attrs?.themeColor;
18568
+ const encode$G = (attributes) => attributes?.["w:themeColor"];
18569
+ const decode$I = (attrs) => attrs?.themeColor;
18583
18570
  const attrConfig$k = Object.freeze({
18584
18571
  xmlName: "w:themeColor",
18585
18572
  sdName: "themeColor",
18586
- encode: encode$E,
18587
- decode: decode$G
18573
+ encode: encode$G,
18574
+ decode: decode$I
18588
18575
  });
18589
- const encode$D = (attributes) => attributes?.["w:themeTint"];
18590
- const decode$F = (attrs) => attrs?.themeTint;
18576
+ const encode$F = (attributes) => attributes?.["w:themeTint"];
18577
+ const decode$H = (attrs) => attrs?.themeTint;
18591
18578
  const attrConfig$j = Object.freeze({
18592
18579
  xmlName: "w:themeTint",
18593
18580
  sdName: "themeTint",
18594
- encode: encode$D,
18595
- decode: decode$F
18581
+ encode: encode$F,
18582
+ decode: decode$H
18596
18583
  });
18597
- const encode$C = (attributes) => attributes?.["w:themeShade"];
18598
- const decode$E = (attrs) => attrs?.themeShade;
18584
+ const encode$E = (attributes) => attributes?.["w:themeShade"];
18585
+ const decode$G = (attrs) => attrs?.themeShade;
18599
18586
  const attrConfig$i = Object.freeze({
18600
18587
  xmlName: "w:themeShade",
18601
18588
  sdName: "themeShade",
18602
- encode: encode$C,
18603
- decode: decode$E
18589
+ encode: encode$E,
18590
+ decode: decode$G
18604
18591
  });
18605
18592
  const validXmlAttributes$g = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j, attrConfig$i];
18606
- const XML_NODE_NAME$l = "w:u";
18593
+ const XML_NODE_NAME$n = "w:u";
18607
18594
  const SD_ATTR_KEY$3 = "underline";
18608
- const encode$B = (params2, encodedAttrs = {}) => {
18595
+ const encode$D = (params2, encodedAttrs = {}) => {
18609
18596
  const { nodes } = params2;
18610
18597
  const node = nodes?.[0];
18611
18598
  const sourceAttrs = node?.attributes || {};
@@ -18621,12 +18608,12 @@ const encode$B = (params2, encodedAttrs = {}) => {
18621
18608
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
18622
18609
  return {
18623
18610
  type: "attr",
18624
- xmlName: XML_NODE_NAME$l,
18611
+ xmlName: XML_NODE_NAME$n,
18625
18612
  sdNodeOrKeyName: SD_ATTR_KEY$3,
18626
18613
  attributes
18627
18614
  };
18628
18615
  };
18629
- const decode$D = (params2) => {
18616
+ const decode$F = (params2) => {
18630
18617
  const attrs = params2?.node?.attrs?.underline || params2?.node?.attrs || {};
18631
18618
  const underlineType = attrs.underlineType ?? attrs.underline ?? attrs["w:val"] ?? null;
18632
18619
  const color = attrs.underlineColor ?? attrs.color ?? attrs["w:color"] ?? null;
@@ -18644,22 +18631,22 @@ const decode$D = (params2) => {
18644
18631
  if (themeTint) attributes["w:themeTint"] = themeTint;
18645
18632
  if (themeShade) attributes["w:themeShade"] = themeShade;
18646
18633
  return {
18647
- name: XML_NODE_NAME$l,
18634
+ name: XML_NODE_NAME$n,
18648
18635
  attributes
18649
18636
  };
18650
18637
  };
18651
- const config$k = {
18652
- xmlName: XML_NODE_NAME$l,
18638
+ const config$m = {
18639
+ xmlName: XML_NODE_NAME$n,
18653
18640
  sdNodeOrKeyName: SD_ATTR_KEY$3,
18654
18641
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
18655
- encode: encode$B,
18656
- decode: decode$D,
18642
+ encode: encode$D,
18643
+ decode: decode$F,
18657
18644
  attributes: validXmlAttributes$g
18658
18645
  };
18659
- const translator$1X = NodeTranslator.from(config$k);
18660
- const translator$1W = NodeTranslator.from(createSingleBooleanPropertyHandler("w:strike"));
18661
- const translator$1V = NodeTranslator.from(createSingleBooleanPropertyHandler("w:dstrike"));
18662
- const translator$1U = NodeTranslator.from({
18646
+ const translator$1Z = NodeTranslator.from(config$m);
18647
+ const translator$1Y = NodeTranslator.from(createSingleBooleanPropertyHandler("w:strike"));
18648
+ const translator$1X = NodeTranslator.from(createSingleBooleanPropertyHandler("w:dstrike"));
18649
+ const translator$1W = NodeTranslator.from({
18663
18650
  xmlName: "w:color",
18664
18651
  sdNodeOrKeyName: "color",
18665
18652
  attributes: [
@@ -18676,7 +18663,7 @@ const translator$1U = NodeTranslator.from({
18676
18663
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18677
18664
  }
18678
18665
  });
18679
- const translator$1T = NodeTranslator.from({
18666
+ const translator$1V = NodeTranslator.from({
18680
18667
  xmlName: "w:rFonts",
18681
18668
  sdNodeOrKeyName: "fontFamily",
18682
18669
  attributes: [
@@ -18707,16 +18694,16 @@ const translator$1T = NodeTranslator.from({
18707
18694
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18708
18695
  }
18709
18696
  });
18710
- const translator$1S = NodeTranslator.from(createSingleAttrPropertyHandler("w:rStyle", "styleId"));
18711
- const translator$1R = NodeTranslator.from(createSingleIntegerPropertyHandler("w:sz", "fontSize"));
18712
- const translator$1Q = NodeTranslator.from(createSingleIntegerPropertyHandler("w:szCs", "fontSizeCs"));
18713
- const translator$1P = NodeTranslator.from({
18697
+ const translator$1U = NodeTranslator.from(createSingleAttrPropertyHandler("w:rStyle", "styleId"));
18698
+ const translator$1T = NodeTranslator.from(createSingleIntegerPropertyHandler("w:sz", "fontSize"));
18699
+ const translator$1S = NodeTranslator.from(createSingleIntegerPropertyHandler("w:szCs", "fontSizeCs"));
18700
+ const translator$1R = NodeTranslator.from({
18714
18701
  xmlName: "w:caps",
18715
18702
  sdNodeOrKeyName: "textTransform",
18716
18703
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1") ? "uppercase" : "none",
18717
18704
  decode: ({ node }) => node.attrs["textTransform"] != null ? { name: "w:caps", attributes: { "w:val": booleanToString(node.attrs["textTransform"] === "uppercase") } } : void 0
18718
18705
  });
18719
- const translator$1O = NodeTranslator.from({
18706
+ const translator$1Q = NodeTranslator.from({
18720
18707
  xmlName: "w:shd",
18721
18708
  sdNodeOrKeyName: "shading",
18722
18709
  attributes: [
@@ -18738,7 +18725,7 @@ const translator$1O = NodeTranslator.from({
18738
18725
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18739
18726
  }
18740
18727
  });
18741
- const translator$1N = NodeTranslator.from({
18728
+ const translator$1P = NodeTranslator.from({
18742
18729
  xmlName: "w:lang",
18743
18730
  sdNodeOrKeyName: "lang",
18744
18731
  attributes: [createAttributeHandler("w:val"), createAttributeHandler("w:eastAsia"), createAttributeHandler("w:bidi")],
@@ -18750,26 +18737,26 @@ const translator$1N = NodeTranslator.from({
18750
18737
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18751
18738
  }
18752
18739
  });
18753
- const translator$1M = NodeTranslator.from(createSingleIntegerPropertyHandler("w:spacing", "letterSpacing"));
18740
+ const translator$1O = NodeTranslator.from(createSingleIntegerPropertyHandler("w:spacing", "letterSpacing"));
18754
18741
  const propertyTranslators$b = [
18742
+ translator$20,
18743
+ translator$1$,
18755
18744
  translator$1_,
18756
18745
  translator$1Z,
18757
18746
  translator$1Y,
18758
18747
  translator$1X,
18759
18748
  translator$1W,
18749
+ translator$22,
18760
18750
  translator$1V,
18761
18751
  translator$1U,
18762
- translator$20,
18763
18752
  translator$1T,
18764
18753
  translator$1S,
18765
18754
  translator$1R,
18766
18755
  translator$1Q,
18767
18756
  translator$1P,
18768
- translator$1O,
18769
- translator$1N,
18770
- translator$1M
18757
+ translator$1O
18771
18758
  ];
18772
- const translator$1L = NodeTranslator.from(
18759
+ const translator$1N = NodeTranslator.from(
18773
18760
  createNestedPropertiesTranslator("w:rPr", "runProperties", propertyTranslators$b)
18774
18761
  );
18775
18762
  const SUPPORTED_ALTERNATE_CONTENT_REQUIRES = /* @__PURE__ */ new Set([
@@ -18786,10 +18773,10 @@ const SUPPORTED_ALTERNATE_CONTENT_REQUIRES = /* @__PURE__ */ new Set([
18786
18773
  "w16sdtfl",
18787
18774
  "w16se"
18788
18775
  ]);
18789
- const XML_NODE_NAME$k = "mc:AlternateContent";
18790
- const SD_NODE_NAME$g = [];
18776
+ const XML_NODE_NAME$m = "mc:AlternateContent";
18777
+ const SD_NODE_NAME$i = [];
18791
18778
  const validXmlAttributes$f = [];
18792
- function encode$A(params2) {
18779
+ function encode$C(params2) {
18793
18780
  const { nodeListHandler } = params2;
18794
18781
  const { node } = params2.extraParams;
18795
18782
  if (!node || !node.type) {
@@ -18805,7 +18792,7 @@ function encode$A(params2) {
18805
18792
  path: buildPath(params2.path, node, branch)
18806
18793
  });
18807
18794
  }
18808
- function decode$C(params2) {
18795
+ function decode$E(params2) {
18809
18796
  const { node } = params2;
18810
18797
  const { drawingContent } = node.attrs;
18811
18798
  const drawing = {
@@ -18822,12 +18809,12 @@ function decode$C(params2) {
18822
18809
  elements: [choice]
18823
18810
  };
18824
18811
  }
18825
- const config$j = {
18826
- xmlName: XML_NODE_NAME$k,
18827
- sdNodeOrKeyName: SD_NODE_NAME$g,
18812
+ const config$l = {
18813
+ xmlName: XML_NODE_NAME$m,
18814
+ sdNodeOrKeyName: SD_NODE_NAME$i,
18828
18815
  type: NodeTranslator.translatorTypes.NODE,
18829
- encode: encode$A,
18830
- decode: decode$C,
18816
+ encode: encode$C,
18817
+ decode: decode$E,
18831
18818
  attributes: validXmlAttributes$f
18832
18819
  };
18833
18820
  function selectAlternateContentElements(node) {
@@ -18851,18 +18838,18 @@ function selectAlternateContentElements(node) {
18851
18838
  elements: carbonCopy(selectedElements)
18852
18839
  };
18853
18840
  }
18854
- const translator$1K = NodeTranslator.from(config$j);
18841
+ const translator$1M = NodeTranslator.from(config$l);
18855
18842
  function buildPath(existingPath = [], node, branch) {
18856
18843
  const path = [...existingPath];
18857
18844
  if (node) path.push(node);
18858
18845
  if (branch) path.push(branch);
18859
18846
  return path;
18860
18847
  }
18861
- const translator$1J = NodeTranslator.from(createSingleBooleanPropertyHandler("w:adjustRightInd"));
18862
- const translator$1I = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDE"));
18863
- const translator$1H = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDN"));
18864
- const translator$1G = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bidi", "rightToLeft"));
18865
- const translator$1F = NodeTranslator.from({
18848
+ const translator$1L = NodeTranslator.from(createSingleBooleanPropertyHandler("w:adjustRightInd"));
18849
+ const translator$1K = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDE"));
18850
+ const translator$1J = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDN"));
18851
+ const translator$1I = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bidi", "rightToLeft"));
18852
+ const translator$1H = NodeTranslator.from({
18866
18853
  xmlName: "w:cnfStyle",
18867
18854
  sdNodeOrKeyName: "cnfStyle",
18868
18855
  attributes: [
@@ -18888,9 +18875,9 @@ const translator$1F = NodeTranslator.from({
18888
18875
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18889
18876
  }
18890
18877
  });
18891
- const translator$1E = NodeTranslator.from(createSingleBooleanPropertyHandler("w:contextualSpacing"));
18892
- const translator$1D = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
18893
- const translator$1C = NodeTranslator.from({
18878
+ const translator$1G = NodeTranslator.from(createSingleBooleanPropertyHandler("w:contextualSpacing"));
18879
+ const translator$1F = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
18880
+ const translator$1E = NodeTranslator.from({
18894
18881
  xmlName: "w:framePr",
18895
18882
  sdNodeOrKeyName: "framePr",
18896
18883
  attributes: [
@@ -18918,7 +18905,7 @@ const translator$1C = NodeTranslator.from({
18918
18905
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18919
18906
  }
18920
18907
  });
18921
- const translator$1B = NodeTranslator.from({
18908
+ const translator$1D = NodeTranslator.from({
18922
18909
  xmlName: "w:ind",
18923
18910
  sdNodeOrKeyName: "indent",
18924
18911
  attributes: [
@@ -18943,12 +18930,12 @@ const translator$1B = NodeTranslator.from({
18943
18930
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18944
18931
  }
18945
18932
  });
18946
- const translator$1A = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
18947
- const translator$1z = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepLines"));
18948
- const translator$1y = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepNext"));
18949
- const translator$1x = NodeTranslator.from(createSingleBooleanPropertyHandler("w:kinsoku"));
18950
- const translator$1w = NodeTranslator.from(createSingleBooleanPropertyHandler("w:mirrorIndents"));
18951
- const translator$1v = NodeTranslator.from(createSingleIntegerPropertyHandler("w:ilvl"));
18933
+ const translator$1C = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
18934
+ const translator$1B = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepLines"));
18935
+ const translator$1A = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepNext"));
18936
+ const translator$1z = NodeTranslator.from(createSingleBooleanPropertyHandler("w:kinsoku"));
18937
+ const translator$1y = NodeTranslator.from(createSingleBooleanPropertyHandler("w:mirrorIndents"));
18938
+ const translator$1x = NodeTranslator.from(createSingleIntegerPropertyHandler("w:ilvl"));
18952
18939
  const createTrackStyleMark = (marks) => {
18953
18940
  const trackStyleMark = marks.find((mark) => mark.type === "trackFormat");
18954
18941
  if (trackStyleMark) {
@@ -18966,7 +18953,7 @@ const createTrackStyleMark = (marks) => {
18966
18953
  }
18967
18954
  return void 0;
18968
18955
  };
18969
- const XML_NODE_NAME$j = "w:ins";
18956
+ const XML_NODE_NAME$l = "w:ins";
18970
18957
  const SD_ATTR_KEY$2 = "trackInsert";
18971
18958
  const validXmlAttributes$e = [
18972
18959
  createAttributeHandler("w:id", "id"),
@@ -18974,7 +18961,7 @@ const validXmlAttributes$e = [
18974
18961
  createAttributeHandler("w:author", "author"),
18975
18962
  createAttributeHandler("w:authorEmail", "authorEmail")
18976
18963
  ];
18977
- const encode$z = (params2, encodedAttrs = {}) => {
18964
+ const encode$B = (params2, encodedAttrs = {}) => {
18978
18965
  const { nodeListHandler, extraParams = {} } = params2;
18979
18966
  const { node } = extraParams;
18980
18967
  const subs = nodeListHandler.handler({
@@ -18990,7 +18977,7 @@ const encode$z = (params2, encodedAttrs = {}) => {
18990
18977
  });
18991
18978
  return subs;
18992
18979
  };
18993
- function decode$B(params2) {
18980
+ function decode$D(params2) {
18994
18981
  const { node } = params2;
18995
18982
  if (!node || !node.type) {
18996
18983
  return null;
@@ -19015,50 +19002,50 @@ function decode$B(params2) {
19015
19002
  elements: [translatedTextNode]
19016
19003
  };
19017
19004
  }
19018
- const config$i = {
19019
- xmlName: XML_NODE_NAME$j,
19005
+ const config$k = {
19006
+ xmlName: XML_NODE_NAME$l,
19020
19007
  sdNodeOrKeyName: SD_ATTR_KEY$2,
19021
19008
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
19022
- encode: encode$z,
19023
- decode: decode$B,
19009
+ encode: encode$B,
19010
+ decode: decode$D,
19024
19011
  attributes: validXmlAttributes$e
19025
19012
  };
19026
- const translator$1u = NodeTranslator.from(config$i);
19027
- const translator$1t = NodeTranslator.from(createSingleIntegerPropertyHandler("w:numId"));
19028
- const propertyTranslators$a = [translator$1K, translator$1v, translator$1u, translator$1t];
19029
- const translator$1s = NodeTranslator.from(
19013
+ const translator$1w = NodeTranslator.from(config$k);
19014
+ const translator$1v = NodeTranslator.from(createSingleIntegerPropertyHandler("w:numId"));
19015
+ const propertyTranslators$a = [translator$1M, translator$1x, translator$1w, translator$1v];
19016
+ const translator$1u = NodeTranslator.from(
19030
19017
  createNestedPropertiesTranslator("w:numPr", "numberingProperties", propertyTranslators$a)
19031
19018
  );
19032
- const translator$1r = NodeTranslator.from(
19019
+ const translator$1t = NodeTranslator.from(
19033
19020
  createSingleAttrPropertyHandler("w:outlineLvl", "outlineLvl", "w:val", parseInteger, integerToString)
19034
19021
  );
19035
- const translator$1q = NodeTranslator.from(createSingleBooleanPropertyHandler("w:overflowPunct"));
19036
- const translator$1p = NodeTranslator.from(createBorderPropertyHandler("w:bar"));
19037
- const translator$1o = NodeTranslator.from(createBorderPropertyHandler("w:between"));
19038
- const translator$1n = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
19039
- const translator$1m = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
19040
- const translator$1l = NodeTranslator.from(createBorderPropertyHandler("w:left"));
19041
- const translator$1k = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
19042
- const translator$1j = NodeTranslator.from(createBorderPropertyHandler("w:right"));
19043
- const translator$1i = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
19044
- const translator$1h = NodeTranslator.from(createBorderPropertyHandler("w:top"));
19045
- const translator$1g = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
19022
+ const translator$1s = NodeTranslator.from(createSingleBooleanPropertyHandler("w:overflowPunct"));
19023
+ const translator$1r = NodeTranslator.from(createBorderPropertyHandler("w:bar"));
19024
+ const translator$1q = NodeTranslator.from(createBorderPropertyHandler("w:between"));
19025
+ const translator$1p = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
19026
+ const translator$1o = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
19027
+ const translator$1n = NodeTranslator.from(createBorderPropertyHandler("w:left"));
19028
+ const translator$1m = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
19029
+ const translator$1l = NodeTranslator.from(createBorderPropertyHandler("w:right"));
19030
+ const translator$1k = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
19031
+ const translator$1j = NodeTranslator.from(createBorderPropertyHandler("w:top"));
19032
+ const translator$1i = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
19046
19033
  const propertyTranslators$9 = [
19047
- translator$1K,
19034
+ translator$1M,
19035
+ translator$1r,
19036
+ translator$1q,
19048
19037
  translator$1p,
19049
- translator$1o,
19050
19038
  translator$1n,
19051
19039
  translator$1l,
19052
- translator$1j,
19053
- translator$1h
19040
+ translator$1j
19054
19041
  ];
19055
- const translator$1f = NodeTranslator.from(
19042
+ const translator$1h = NodeTranslator.from(
19056
19043
  createNestedPropertiesTranslator("w:pBdr", "borders", propertyTranslators$9)
19057
19044
  );
19058
- const translator$1e = NodeTranslator.from(createSingleAttrPropertyHandler("w:pStyle", "styleId"));
19059
- const translator$1d = NodeTranslator.from(createSingleBooleanPropertyHandler("w:pageBreakBefore"));
19060
- const translator$1c = NodeTranslator.from(createSingleBooleanPropertyHandler("w:snapToGrid"));
19061
- const translator$1b = NodeTranslator.from({
19045
+ const translator$1g = NodeTranslator.from(createSingleAttrPropertyHandler("w:pStyle", "styleId"));
19046
+ const translator$1f = NodeTranslator.from(createSingleBooleanPropertyHandler("w:pageBreakBefore"));
19047
+ const translator$1e = NodeTranslator.from(createSingleBooleanPropertyHandler("w:snapToGrid"));
19048
+ const translator$1d = NodeTranslator.from({
19062
19049
  xmlName: "w:spacing",
19063
19050
  sdNodeOrKeyName: "spacing",
19064
19051
  attributes: [
@@ -19079,20 +19066,22 @@ const translator$1b = NodeTranslator.from({
19079
19066
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
19080
19067
  }
19081
19068
  });
19082
- const translator$1a = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressAutoHyphens"));
19083
- const translator$19 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressLineNumbers"));
19084
- const translator$18 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressOverlap"));
19085
- const propertyTranslators$8 = [translator$1K, translator$1$];
19086
- const translator$17 = NodeTranslator.from(
19069
+ const translator$1c = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressAutoHyphens"));
19070
+ const translator$1b = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressLineNumbers"));
19071
+ const translator$1a = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressOverlap"));
19072
+ const propertyTranslators$8 = [translator$1M, translator$21];
19073
+ const translator$19 = NodeTranslator.from(
19087
19074
  createNestedArrayPropertyHandler("w:tabs", "tabStops", propertyTranslators$8, { skipRun: true })
19088
19075
  );
19089
- const translator$16 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textAlignment"));
19090
- const translator$15 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
19091
- const translator$14 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textboxTightWrap"));
19092
- const translator$13 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:topLinePunct"));
19093
- const translator$12 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:widowControl"));
19094
- const translator$11 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:wordWrap"));
19076
+ const translator$18 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textAlignment"));
19077
+ const translator$17 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
19078
+ const translator$16 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textboxTightWrap"));
19079
+ const translator$15 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:topLinePunct"));
19080
+ const translator$14 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:widowControl"));
19081
+ const translator$13 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:wordWrap"));
19095
19082
  const propertyTranslators$7 = [
19083
+ translator$1M,
19084
+ translator$1L,
19096
19085
  translator$1K,
19097
19086
  translator$1J,
19098
19087
  translator$1I,
@@ -19106,15 +19095,15 @@ const propertyTranslators$7 = [
19106
19095
  translator$1A,
19107
19096
  translator$1z,
19108
19097
  translator$1y,
19109
- translator$1x,
19110
- translator$1w,
19098
+ translator$1u,
19099
+ translator$1t,
19111
19100
  translator$1s,
19112
- translator$1r,
19113
- translator$1q,
19101
+ translator$1h,
19102
+ translator$1g,
19114
19103
  translator$1f,
19104
+ translator$1Q,
19115
19105
  translator$1e,
19116
19106
  translator$1d,
19117
- translator$1O,
19118
19107
  translator$1c,
19119
19108
  translator$1b,
19120
19109
  translator$1a,
@@ -19125,11 +19114,9 @@ const propertyTranslators$7 = [
19125
19114
  translator$15,
19126
19115
  translator$14,
19127
19116
  translator$13,
19128
- translator$12,
19129
- translator$11,
19130
- translator$1L
19117
+ translator$1N
19131
19118
  ];
19132
- const translator$10 = NodeTranslator.from(
19119
+ const translator$12 = NodeTranslator.from(
19133
19120
  createNestedPropertiesTranslator("w:pPr", "paragraphProperties", propertyTranslators$7)
19134
19121
  );
19135
19122
  function getUnderlineCssString({ type: type2 = "single", color = null, thickness = null, approximate = true } = {}) {
@@ -19198,12 +19185,12 @@ function getUnderlineCssString({ type: type2 = "single", color = null, thickness
19198
19185
  }
19199
19186
  const resolveRunProperties = (params2, inlineRpr, resolvedPpr, isListNumber = false, numberingDefinedInline = false) => {
19200
19187
  const paragraphStyleId = resolvedPpr?.styleId;
19201
- const paragraphStyleProps = resolveStyleChain(params2, paragraphStyleId, translator$1L);
19202
- const defaultProps2 = getDefaultProperties(params2, translator$1L);
19203
- const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params2, "Normal", translator$1L);
19188
+ const paragraphStyleProps = resolveStyleChain(params2, paragraphStyleId, translator$1N);
19189
+ const defaultProps2 = getDefaultProperties(params2, translator$1N);
19190
+ const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params2, "Normal", translator$1N);
19204
19191
  let runStyleProps = {};
19205
19192
  if (!paragraphStyleId?.startsWith("TOC")) {
19206
- runStyleProps = inlineRpr.styleId ? resolveStyleChain(params2, inlineRpr.styleId, translator$1L) : {};
19193
+ runStyleProps = inlineRpr.styleId ? resolveStyleChain(params2, inlineRpr.styleId, translator$1N) : {};
19207
19194
  }
19208
19195
  let styleChain;
19209
19196
  if (isNormalDefault) {
@@ -19218,7 +19205,7 @@ const resolveRunProperties = (params2, inlineRpr, resolvedPpr, isListNumber = fa
19218
19205
  params2,
19219
19206
  resolvedPpr.numberingProperties.ilvl ?? 0,
19220
19207
  resolvedPpr.numberingProperties.numId,
19221
- translator$1L
19208
+ translator$1N
19222
19209
  );
19223
19210
  }
19224
19211
  if (!numberingDefinedInline) {
@@ -19235,10 +19222,10 @@ const resolveRunProperties = (params2, inlineRpr, resolvedPpr, isListNumber = fa
19235
19222
  return finalProps;
19236
19223
  };
19237
19224
  function resolveParagraphProperties(params2, inlineProps, insideTable = false, overrideInlineStyleId = false) {
19238
- const defaultProps2 = getDefaultProperties(params2, translator$10);
19239
- const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params2, "Normal", translator$10);
19225
+ const defaultProps2 = getDefaultProperties(params2, translator$12);
19226
+ const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params2, "Normal", translator$12);
19240
19227
  let styleId = inlineProps?.styleId;
19241
- let styleProps = inlineProps?.styleId ? resolveStyleChain(params2, inlineProps?.styleId, translator$10) : {};
19228
+ let styleProps = inlineProps?.styleId ? resolveStyleChain(params2, inlineProps?.styleId, translator$12) : {};
19242
19229
  let numberingProps = {};
19243
19230
  let ilvl = inlineProps?.numberingProperties?.ilvl ?? styleProps?.numberingProperties?.ilvl;
19244
19231
  const numId = inlineProps?.numberingProperties?.numId ?? styleProps?.numberingProperties?.numId;
@@ -19246,10 +19233,10 @@ function resolveParagraphProperties(params2, inlineProps, insideTable = false, o
19246
19233
  const isList2 = numId != null;
19247
19234
  if (isList2) {
19248
19235
  ilvl = ilvl != null ? ilvl : 0;
19249
- numberingProps = getNumberingProperties(params2, ilvl, numId, translator$10);
19236
+ numberingProps = getNumberingProperties(params2, ilvl, numId, translator$12);
19250
19237
  if (overrideInlineStyleId && numberingProps.styleId) {
19251
19238
  styleId = numberingProps.styleId;
19252
- styleProps = resolveStyleChain(params2, styleId, translator$10);
19239
+ styleProps = resolveStyleChain(params2, styleId, translator$12);
19253
19240
  if (inlineProps) {
19254
19241
  inlineProps.styleId = styleId;
19255
19242
  if (styleProps.numberingProperties?.ilvl === inlineProps.numberingProperties?.ilvl && styleProps.numberingProperties?.numId === inlineProps.numberingProperties?.numId) {
@@ -19271,7 +19258,7 @@ function resolveParagraphProperties(params2, inlineProps, insideTable = false, o
19271
19258
  if (numberingDefinedInline) {
19272
19259
  indentChain = [...defaultsChain, styleProps, numberingProps, inlineProps];
19273
19260
  } else {
19274
- styleProps = resolveStyleChain(params2, styleId, translator$10, false);
19261
+ styleProps = resolveStyleChain(params2, styleId, translator$12, false);
19275
19262
  indentChain = [...defaultsChain, numberingProps, styleProps, inlineProps];
19276
19263
  }
19277
19264
  } else {
@@ -19379,7 +19366,7 @@ function getNumberingProperties(params2, ilvl, numId, translator2, tries = 0) {
19379
19366
  const numStyleLink = listDefinitionForThisNumId.elements?.find((item) => item.name === "w:numStyleLink");
19380
19367
  const styleId = numStyleLink?.attributes?.["w:val"];
19381
19368
  if (styleId && tries < 1) {
19382
- const { properties: styleProps } = getStyleProperties(params2, styleId, translator$10);
19369
+ const { properties: styleProps } = getStyleProperties(params2, styleId, translator$12);
19383
19370
  if (styleProps?.numberingProperties?.numId) {
19384
19371
  return getNumberingProperties(params2, ilvl, styleProps.numberingProperties.numId, translator2, tries + 1);
19385
19372
  }
@@ -19914,7 +19901,7 @@ function handleStyleChangeMarksV2(rPrChange, currentMarks, params2) {
19914
19901
  let submarks = [];
19915
19902
  const rPr = rPrChange.elements?.find((el) => el.name === "w:rPr");
19916
19903
  if (rPr) {
19917
- const runProperties = translator$1L.encode({ ...params2, nodes: [rPr] });
19904
+ const runProperties = translator$1N.encode({ ...params2, nodes: [rPr] });
19918
19905
  submarks = encodeMarksFromRPr(runProperties, params2?.docx);
19919
19906
  }
19920
19907
  return [{ type: TrackFormatMarkName, attrs: { ...mappedAttributes, before: submarks, after: [...currentMarks] } }];
@@ -20023,7 +20010,7 @@ const handleParagraphNode$1 = (params2) => {
20023
20010
  const pPr = node.elements?.find((el) => el.name === "w:pPr");
20024
20011
  let inlineParagraphProperties = {};
20025
20012
  if (pPr) {
20026
- inlineParagraphProperties = translator$10.encode({ ...params2, nodes: [pPr] }) || {};
20013
+ inlineParagraphProperties = translator$12.encode({ ...params2, nodes: [pPr] }) || {};
20027
20014
  }
20028
20015
  const insideTable = (params2.path || []).some((ancestor) => ancestor.name === "w:tc");
20029
20016
  const resolvedParagraphProperties = resolveParagraphProperties(params2, inlineParagraphProperties, insideTable);
@@ -20076,89 +20063,139 @@ const handleParagraphNode$1 = (params2) => {
20076
20063
  }
20077
20064
  return schemaNode;
20078
20065
  };
20079
- const encode$y = (attributes) => {
20066
+ function generateParagraphProperties(params2) {
20067
+ const { node } = params2;
20068
+ const { attrs = {} } = node;
20069
+ const paragraphProperties = carbonCopy(attrs.paragraphProperties || {});
20070
+ if (attrs.styleId !== paragraphProperties.styleId) {
20071
+ paragraphProperties.styleId = attrs.styleId;
20072
+ }
20073
+ ["borders", "styleId", "indent", "textAlign", "keepLines", "keepNext", "spacing", "tabStops"].forEach((key2) => {
20074
+ let propKey = key2 === "textAlign" ? "justification" : key2;
20075
+ if (JSON.stringify(paragraphProperties[propKey]) !== JSON.stringify(attrs[key2])) {
20076
+ paragraphProperties[propKey] = attrs[key2];
20077
+ }
20078
+ });
20079
+ const framePr = attrs.dropcap;
20080
+ if (framePr) {
20081
+ framePr.dropCap = framePr.type;
20082
+ delete framePr.type;
20083
+ }
20084
+ if (JSON.stringify(paragraphProperties.framePr) !== JSON.stringify(framePr)) {
20085
+ paragraphProperties.framePr = framePr;
20086
+ }
20087
+ const marksProps = decodeRPrFromMarks(attrs.marksAttrs || []);
20088
+ const finalRunProps = combineRunProperties([paragraphProperties.runProperties || {}, marksProps]);
20089
+ paragraphProperties.runProperties = finalRunProps;
20090
+ const pPr = translator$12.decode({ node: { ...node, attrs: { paragraphProperties } } });
20091
+ const sectPr = node.attrs?.paragraphProperties?.sectPr;
20092
+ if (sectPr) {
20093
+ pPr.elements.push(sectPr);
20094
+ }
20095
+ return pPr;
20096
+ }
20097
+ function translateParagraphNode(params2) {
20098
+ const elements = translateChildNodes(params2);
20099
+ const htmlAnnotationChild = elements.find((element) => element.name === "htmlAnnotation");
20100
+ if (htmlAnnotationChild) {
20101
+ return htmlAnnotationChild.elements;
20102
+ }
20103
+ const pPr = generateParagraphProperties(params2);
20104
+ if (pPr) elements.unshift(pPr);
20105
+ let attributes = {};
20106
+ if (params2.node.attrs?.rsidRDefault) {
20107
+ attributes["w:rsidRDefault"] = params2.node.attrs.rsidRDefault;
20108
+ }
20109
+ const result = {
20110
+ name: "w:p",
20111
+ elements,
20112
+ attributes
20113
+ };
20114
+ return result;
20115
+ }
20116
+ const encode$A = (attributes) => {
20080
20117
  return attributes["w:rsidDel"];
20081
20118
  };
20082
- const decode$A = (attrs) => {
20119
+ const decode$C = (attrs) => {
20083
20120
  return attrs.rsidDel;
20084
20121
  };
20085
20122
  const attrConfig$h = Object.freeze({
20086
20123
  xmlName: "w:rsidDel",
20087
20124
  sdName: "rsidDel",
20088
- encode: encode$y,
20089
- decode: decode$A
20125
+ encode: encode$A,
20126
+ decode: decode$C
20090
20127
  });
20091
- const encode$x = (attributes) => {
20128
+ const encode$z = (attributes) => {
20092
20129
  return attributes["w:rsidP"];
20093
20130
  };
20094
- const decode$z = (attrs) => {
20131
+ const decode$B = (attrs) => {
20095
20132
  return attrs.rsidP;
20096
20133
  };
20097
20134
  const attrConfig$g = Object.freeze({
20098
20135
  xmlName: "w:rsidP",
20099
20136
  sdName: "rsidP",
20100
- encode: encode$x,
20101
- decode: decode$z
20137
+ encode: encode$z,
20138
+ decode: decode$B
20102
20139
  });
20103
- const encode$w = (attributes) => {
20140
+ const encode$y = (attributes) => {
20104
20141
  return attributes["w:rsidR"];
20105
20142
  };
20106
- const decode$y = (attrs) => {
20143
+ const decode$A = (attrs) => {
20107
20144
  return attrs.rsidR;
20108
20145
  };
20109
20146
  const attrConfig$f = Object.freeze({
20110
20147
  xmlName: "w:rsidR",
20111
20148
  sdName: "rsidR",
20112
- encode: encode$w,
20113
- decode: decode$y
20149
+ encode: encode$y,
20150
+ decode: decode$A
20114
20151
  });
20115
- const encode$v = (attributes) => {
20152
+ const encode$x = (attributes) => {
20116
20153
  return attributes["w:rsidRPr"];
20117
20154
  };
20118
- const decode$x = (attrs) => {
20155
+ const decode$z = (attrs) => {
20119
20156
  return attrs.rsidRPr;
20120
20157
  };
20121
20158
  const attrConfig$e = Object.freeze({
20122
20159
  xmlName: "w:rsidRPr",
20123
20160
  sdName: "rsidRPr",
20124
- encode: encode$v,
20125
- decode: decode$x
20161
+ encode: encode$x,
20162
+ decode: decode$z
20126
20163
  });
20127
- const encode$u = (attributes) => {
20164
+ const encode$w = (attributes) => {
20128
20165
  return attributes["w:rsidRDefault"];
20129
20166
  };
20130
- const decode$w = (attrs) => {
20167
+ const decode$y = (attrs) => {
20131
20168
  return attrs.rsidRDefault;
20132
20169
  };
20133
20170
  const attrConfig$d = Object.freeze({
20134
20171
  xmlName: "w:rsidRDefault",
20135
20172
  sdName: "rsidRDefault",
20136
- encode: encode$u,
20137
- decode: decode$w
20173
+ encode: encode$w,
20174
+ decode: decode$y
20138
20175
  });
20139
- const encode$t = (attributes) => {
20176
+ const encode$v = (attributes) => {
20140
20177
  return attributes["w14:paraId"];
20141
20178
  };
20142
- const decode$v = (attrs) => {
20179
+ const decode$x = (attrs) => {
20143
20180
  return attrs.paraId;
20144
20181
  };
20145
20182
  const attrConfig$c = Object.freeze({
20146
20183
  xmlName: "w14:paraId",
20147
20184
  sdName: "paraId",
20148
- encode: encode$t,
20149
- decode: decode$v
20185
+ encode: encode$v,
20186
+ decode: decode$x
20150
20187
  });
20151
- const encode$s = (attributes) => {
20188
+ const encode$u = (attributes) => {
20152
20189
  return attributes["w14:textId"];
20153
20190
  };
20154
- const decode$u = (attrs) => {
20191
+ const decode$w = (attrs) => {
20155
20192
  return attrs.textId;
20156
20193
  };
20157
20194
  const attrConfig$b = Object.freeze({
20158
20195
  xmlName: "w14:textId",
20159
20196
  sdName: "textId",
20160
- encode: encode$s,
20161
- decode: decode$u
20197
+ encode: encode$u,
20198
+ decode: decode$w
20162
20199
  });
20163
20200
  const validXmlAttributes$d = [
20164
20201
  attrConfig$c,
@@ -20169,9 +20206,9 @@ const validXmlAttributes$d = [
20169
20206
  attrConfig$e,
20170
20207
  attrConfig$h
20171
20208
  ];
20172
- const XML_NODE_NAME$i = "w:p";
20173
- const SD_NODE_NAME$f = "paragraph";
20174
- const encode$r = (params2, encodedAttrs = {}) => {
20209
+ const XML_NODE_NAME$k = "w:p";
20210
+ const SD_NODE_NAME$h = "paragraph";
20211
+ const encode$t = (params2, encodedAttrs = {}) => {
20175
20212
  const node = handleParagraphNode$1(params2);
20176
20213
  if (!node) return void 0;
20177
20214
  if (encodedAttrs && Object.keys(encodedAttrs).length) {
@@ -20179,7 +20216,7 @@ const encode$r = (params2, encodedAttrs = {}) => {
20179
20216
  }
20180
20217
  return node;
20181
20218
  };
20182
- const decode$t = (params2, decodedAttrs = {}) => {
20219
+ const decode$v = (params2, decodedAttrs = {}) => {
20183
20220
  const translated = translateParagraphNode(params2);
20184
20221
  if (!translated) return void 0;
20185
20222
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -20187,15 +20224,15 @@ const decode$t = (params2, decodedAttrs = {}) => {
20187
20224
  }
20188
20225
  return translated;
20189
20226
  };
20190
- const config$h = {
20191
- xmlName: XML_NODE_NAME$i,
20192
- sdNodeOrKeyName: SD_NODE_NAME$f,
20227
+ const config$j = {
20228
+ xmlName: XML_NODE_NAME$k,
20229
+ sdNodeOrKeyName: SD_NODE_NAME$h,
20193
20230
  type: NodeTranslator.translatorTypes.NODE,
20194
- encode: encode$r,
20195
- decode: decode$t,
20231
+ encode: encode$t,
20232
+ decode: decode$v,
20196
20233
  attributes: validXmlAttributes$d
20197
20234
  };
20198
- const translator$$ = NodeTranslator.from(config$h);
20235
+ const translator$11 = NodeTranslator.from(config$j);
20199
20236
  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;
20200
20237
  const containsEastAsianCharacters = (text) => EAST_ASIAN_CHARACTER_REGEX.test(text);
20201
20238
  const resolveFontFamily = (textStyleAttrs, text) => {
@@ -20355,8 +20392,21 @@ const ensureTrackedWrapper = (runs, trackingMarksByType = /* @__PURE__ */ new Ma
20355
20392
  }
20356
20393
  return runs;
20357
20394
  };
20358
- const XML_NODE_NAME$h = "w:hyperlink";
20359
- const SD_NODE_NAME$e = "link";
20395
+ function generateDocxRandomId(length2 = 8) {
20396
+ const max2 = 2147483647;
20397
+ const value = Math.floor(Math.random() * (max2 + 1));
20398
+ return value.toString(16).padStart(length2, "0").slice(0, length2);
20399
+ }
20400
+ function generateRandomSigned32BitIntStrId() {
20401
+ const val = Math.floor(Math.random() * 2147483647);
20402
+ return val.toString();
20403
+ }
20404
+ function generateRandom32BitHex() {
20405
+ const val = Math.floor(Math.random() * 2147483647);
20406
+ return val.toString(16).toUpperCase().padStart(8, "0");
20407
+ }
20408
+ const XML_NODE_NAME$j = "w:hyperlink";
20409
+ const SD_NODE_NAME$g = "link";
20360
20410
  const _createAttributeHandler = (xmlName, sdName) => ({
20361
20411
  xmlName,
20362
20412
  sdName,
@@ -20376,7 +20426,7 @@ const validXmlAttributes$c = [
20376
20426
  _createAttributeHandler("r:id", "rId"),
20377
20427
  _createAttributeHandler("w:tgtFrame", "target")
20378
20428
  ];
20379
- const encode$q = (params2, encodedAttrs) => {
20429
+ const encode$s = (params2, encodedAttrs) => {
20380
20430
  const { nodes, docx, nodeListHandler } = params2;
20381
20431
  const node = nodes[0];
20382
20432
  let href = _resolveHref(docx, encodedAttrs);
@@ -20410,7 +20460,7 @@ const _resolveHref = (docx, encodedAttrs) => {
20410
20460
  }
20411
20461
  return href;
20412
20462
  };
20413
- function decode$s(params2) {
20463
+ function decode$u(params2) {
20414
20464
  const { hyperlinkGroup = [params2.node] } = params2.extraParams || {};
20415
20465
  const node = hyperlinkGroup[0];
20416
20466
  const linkMark = node.marks.find((m2) => m2.type === "link");
@@ -20451,69 +20501,69 @@ function _addNewLinkRelationship(params2, link) {
20451
20501
  type: "element",
20452
20502
  name: "Relationship",
20453
20503
  attributes: {
20454
- Id: id,
20504
+ Id: `rId${id}`,
20455
20505
  Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
20456
20506
  Target: link,
20457
20507
  TargetMode: "External"
20458
20508
  }
20459
20509
  });
20460
- return id;
20510
+ return `rId${id}`;
20461
20511
  }
20462
- const config$g = {
20463
- xmlName: XML_NODE_NAME$h,
20464
- sdNodeOrKeyName: SD_NODE_NAME$e,
20512
+ const config$i = {
20513
+ xmlName: XML_NODE_NAME$j,
20514
+ sdNodeOrKeyName: SD_NODE_NAME$g,
20465
20515
  type: NodeTranslator.translatorTypes.NODE,
20466
- encode: encode$q,
20467
- decode: decode$s,
20516
+ encode: encode$s,
20517
+ decode: decode$u,
20468
20518
  attributes: validXmlAttributes$c
20469
20519
  };
20470
- const translator$_ = NodeTranslator.from(config$g);
20471
- const encode$p = (attributes) => {
20520
+ const translator$10 = NodeTranslator.from(config$i);
20521
+ const encode$r = (attributes) => {
20472
20522
  return attributes["w:rsidR"];
20473
20523
  };
20474
- const decode$r = (attrs) => {
20524
+ const decode$t = (attrs) => {
20475
20525
  return attrs.rsidR;
20476
20526
  };
20477
20527
  const attrConfig$a = Object.freeze({
20478
20528
  xmlName: "w:rsidR",
20479
20529
  sdName: "rsidR",
20480
- encode: encode$p,
20481
- decode: decode$r
20530
+ encode: encode$r,
20531
+ decode: decode$t
20482
20532
  });
20483
- const encode$o = (attributes) => {
20533
+ const encode$q = (attributes) => {
20484
20534
  return attributes["w:rsidRPr"];
20485
20535
  };
20486
- const decode$q = (attrs) => {
20536
+ const decode$s = (attrs) => {
20487
20537
  return attrs.rsidRPr;
20488
20538
  };
20489
20539
  const attrConfig$9 = Object.freeze({
20490
20540
  xmlName: "w:rsidRPr",
20491
20541
  sdName: "rsidRPr",
20492
- encode: encode$o,
20493
- decode: decode$q
20542
+ encode: encode$q,
20543
+ decode: decode$s
20494
20544
  });
20495
- const encode$n = (attributes) => {
20545
+ const encode$p = (attributes) => {
20496
20546
  return attributes["w:rsidDel"];
20497
20547
  };
20498
- const decode$p = (attrs) => {
20548
+ const decode$r = (attrs) => {
20499
20549
  return attrs.rsidDel;
20500
20550
  };
20501
20551
  const attrConfig$8 = Object.freeze({
20502
20552
  xmlName: "w:rsidDel",
20503
20553
  sdName: "rsidDel",
20504
- encode: encode$n,
20505
- decode: decode$p
20554
+ encode: encode$p,
20555
+ decode: decode$r
20506
20556
  });
20507
20557
  const validXmlAttributes$b = [attrConfig$a, attrConfig$9, attrConfig$8];
20508
- const XML_NODE_NAME$g = "w:r";
20558
+ const XML_NODE_NAME$i = "w:r";
20509
20559
  const SD_KEY_NAME = "run";
20510
- const encode$m = (params2, encodedAttrs = {}) => {
20560
+ const encode$o = (params2, encodedAttrs = {}) => {
20511
20561
  const { nodes = [], nodeListHandler } = params2 || {};
20512
20562
  const runNode = nodes[0];
20513
20563
  if (!runNode) return void 0;
20514
20564
  const elements = Array.isArray(runNode.elements) ? runNode.elements : [];
20515
20565
  const rPrNode = elements.find((child) => child?.name === "w:rPr");
20516
- const runProperties = rPrNode ? translator$1L.encode({ ...params2, nodes: [rPrNode] }) : {};
20566
+ const runProperties = rPrNode ? translator$1N.encode({ ...params2, nodes: [rPrNode] }) : {};
20517
20567
  const paragraphProperties = params2?.extraParams?.paragraphProperties || {};
20518
20568
  const resolvedRunProperties = resolveRunProperties(params2, runProperties ?? {}, paragraphProperties);
20519
20569
  const marks = encodeMarksFromRPr(resolvedRunProperties, params2?.docx) || [];
@@ -20560,7 +20610,7 @@ const encode$m = (params2, encodedAttrs = {}) => {
20560
20610
  }
20561
20611
  return runNodeResult;
20562
20612
  };
20563
- const decode$o = (params2, decodedAttrs = {}) => {
20613
+ const decode$q = (params2, decodedAttrs = {}) => {
20564
20614
  const { node } = params2 || {};
20565
20615
  if (!node) return void 0;
20566
20616
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
@@ -20569,7 +20619,7 @@ const decode$o = (params2, decodedAttrs = {}) => {
20569
20619
  ...params2.extraParams,
20570
20620
  linkProcessed: true
20571
20621
  };
20572
- return translator$_.decode({ ...params2, extraParams });
20622
+ return translator$10.decode({ ...params2, extraParams });
20573
20623
  }
20574
20624
  const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node);
20575
20625
  const runAttrs = runNodeForExport.attrs || {};
@@ -20585,7 +20635,7 @@ const decode$o = (params2, decodedAttrs = {}) => {
20585
20635
  exportParams.editor = { extensionService: { extensions: [] } };
20586
20636
  }
20587
20637
  const childElements = translateChildNodes(exportParams) || [];
20588
- let runPropertiesElement = translator$1L.decode({
20638
+ let runPropertiesElement = translator$1N.decode({
20589
20639
  ...params2,
20590
20640
  node: { attrs: { runProperties: finalRunProperties } }
20591
20641
  });
@@ -20618,7 +20668,7 @@ const decode$o = (params2, decodedAttrs = {}) => {
20618
20668
  runs.push(trackedClone);
20619
20669
  return;
20620
20670
  }
20621
- const runWrapper = { name: XML_NODE_NAME$g, elements: [] };
20671
+ const runWrapper = { name: XML_NODE_NAME$i, elements: [] };
20622
20672
  applyBaseRunProps(runWrapper);
20623
20673
  if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
20624
20674
  runWrapper.elements.push(cloneXmlNode(child));
@@ -20626,7 +20676,7 @@ const decode$o = (params2, decodedAttrs = {}) => {
20626
20676
  });
20627
20677
  const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
20628
20678
  if (!trackedRuns.length) {
20629
- const emptyRun = { name: XML_NODE_NAME$g, elements: [] };
20679
+ const emptyRun = { name: XML_NODE_NAME$i, elements: [] };
20630
20680
  applyBaseRunProps(emptyRun);
20631
20681
  trackedRuns.push(emptyRun);
20632
20682
  }
@@ -20640,17 +20690,17 @@ const decode$o = (params2, decodedAttrs = {}) => {
20640
20690
  }
20641
20691
  return trackedRuns;
20642
20692
  };
20643
- const config$f = {
20644
- xmlName: XML_NODE_NAME$g,
20693
+ const config$h = {
20694
+ xmlName: XML_NODE_NAME$i,
20645
20695
  sdNodeOrKeyName: SD_KEY_NAME,
20646
20696
  type: NodeTranslator.translatorTypes.NODE,
20647
- encode: encode$m,
20648
- decode: decode$o,
20697
+ encode: encode$o,
20698
+ decode: decode$q,
20649
20699
  attributes: validXmlAttributes$b
20650
20700
  };
20651
- const translator$Z = NodeTranslator.from(config$f);
20652
- const translator$Y = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
20653
- const translator$X = NodeTranslator.from(
20701
+ const translator$$ = NodeTranslator.from(config$h);
20702
+ const translator$_ = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
20703
+ const translator$Z = NodeTranslator.from(
20654
20704
  createSingleAttrPropertyHandler(
20655
20705
  "w:gridSpan",
20656
20706
  null,
@@ -20659,31 +20709,31 @@ const translator$X = NodeTranslator.from(
20659
20709
  (v2) => integerToString(v2)
20660
20710
  )
20661
20711
  );
20662
- const translator$W = NodeTranslator.from(createSingleAttrPropertyHandler("w:vMerge"));
20663
- const translator$V = NodeTranslator.from(createBorderPropertyHandler("w:end"));
20664
- const translator$U = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
20665
- const translator$T = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
20666
- const translator$S = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
20667
- const translator$R = NodeTranslator.from(createBorderPropertyHandler("w:start"));
20668
- const translator$Q = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
20669
- const translator$P = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
20670
- const translator$O = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
20712
+ const translator$Y = NodeTranslator.from(createSingleAttrPropertyHandler("w:vMerge"));
20713
+ const translator$X = NodeTranslator.from(createBorderPropertyHandler("w:end"));
20714
+ const translator$W = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
20715
+ const translator$V = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
20716
+ const translator$U = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
20717
+ const translator$T = NodeTranslator.from(createBorderPropertyHandler("w:start"));
20718
+ const translator$S = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
20719
+ const translator$R = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
20720
+ const translator$Q = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
20671
20721
  const propertyTranslators$6 = [
20672
- translator$1h,
20673
- translator$R,
20674
- translator$1l,
20675
- translator$1n,
20676
- translator$V,
20677
20722
  translator$1j,
20678
20723
  translator$T,
20679
- translator$S,
20680
- translator$P,
20681
- translator$O
20724
+ translator$1n,
20725
+ translator$1p,
20726
+ translator$X,
20727
+ translator$1l,
20728
+ translator$V,
20729
+ translator$U,
20730
+ translator$R,
20731
+ translator$Q
20682
20732
  ];
20683
- const translator$N = NodeTranslator.from(
20733
+ const translator$P = NodeTranslator.from(
20684
20734
  createNestedPropertiesTranslator("w:tcBorders", "borders", propertyTranslators$6)
20685
20735
  );
20686
- const translator$M = NodeTranslator.from(
20736
+ const translator$O = NodeTranslator.from(
20687
20737
  createSingleAttrPropertyHandler(
20688
20738
  "w:noWrap",
20689
20739
  null,
@@ -20693,17 +20743,17 @@ const translator$M = NodeTranslator.from(
20693
20743
  )
20694
20744
  );
20695
20745
  const propertyTranslators$5 = [
20746
+ translator$1o,
20747
+ translator$W,
20696
20748
  translator$1m,
20697
- translator$U,
20698
20749
  translator$1k,
20699
- translator$1i,
20700
- translator$Q,
20701
- translator$1g
20750
+ translator$S,
20751
+ translator$1i
20702
20752
  ];
20703
- const translator$L = NodeTranslator.from(
20753
+ const translator$N = NodeTranslator.from(
20704
20754
  createNestedPropertiesTranslator("w:tcMar", "cellMargins", propertyTranslators$5)
20705
20755
  );
20706
- const translator$K = NodeTranslator.from(
20756
+ const translator$M = NodeTranslator.from(
20707
20757
  createSingleAttrPropertyHandler(
20708
20758
  "w:tcFitText",
20709
20759
  null,
@@ -20712,8 +20762,8 @@ const translator$K = NodeTranslator.from(
20712
20762
  (v2) => booleanToString(v2)
20713
20763
  )
20714
20764
  );
20715
- const translator$J = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
20716
- const translator$I = NodeTranslator.from(
20765
+ const translator$L = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
20766
+ const translator$K = NodeTranslator.from(
20717
20767
  createSingleAttrPropertyHandler(
20718
20768
  "w:hideMark",
20719
20769
  null,
@@ -20722,26 +20772,26 @@ const translator$I = NodeTranslator.from(
20722
20772
  (v2) => booleanToString(v2)
20723
20773
  )
20724
20774
  );
20725
- const translator$H = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
20726
- const translator$G = NodeTranslator.from(
20727
- createNestedArrayPropertyHandler("w:headers", "headers", [translator$H])
20775
+ const translator$J = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
20776
+ const translator$I = NodeTranslator.from(
20777
+ createNestedArrayPropertyHandler("w:headers", "headers", [translator$J])
20728
20778
  );
20729
20779
  const propertyTranslators$4 = [
20730
- translator$1F,
20780
+ translator$1H,
20781
+ translator$_,
20782
+ translator$Z,
20731
20783
  translator$Y,
20732
- translator$X,
20733
- translator$W,
20784
+ translator$P,
20785
+ translator$1Q,
20786
+ translator$O,
20734
20787
  translator$N,
20735
- translator$1O,
20788
+ translator$17,
20736
20789
  translator$M,
20737
20790
  translator$L,
20738
- translator$15,
20739
20791
  translator$K,
20740
- translator$J,
20741
- translator$I,
20742
- translator$G
20792
+ translator$I
20743
20793
  ];
20744
- const translator$F = NodeTranslator.from(
20794
+ const translator$H = NodeTranslator.from(
20745
20795
  createNestedPropertiesTranslator("w:tcPr", "tableCellProperties", propertyTranslators$4)
20746
20796
  );
20747
20797
  function handleTableCellNode({
@@ -20759,7 +20809,7 @@ function handleTableCellNode({
20759
20809
  const attributes = {};
20760
20810
  const referencedStyles = _referencedStyles ?? { fontSize: null, fonts: {}, cellMargins: {} };
20761
20811
  const tcPr = node.elements.find((el) => el.name === "w:tcPr");
20762
- const tableCellProperties = tcPr ? translator$F.encode({ ...params2, nodes: [tcPr] }) ?? {} : {};
20812
+ const tableCellProperties = tcPr ? translator$H.encode({ ...params2, nodes: [tcPr] }) ?? {} : {};
20763
20813
  attributes["tableCellProperties"] = tableCellProperties;
20764
20814
  if (rowBorders?.insideH) {
20765
20815
  rowBorders["bottom"] = rowBorders.insideH;
@@ -21071,13 +21121,13 @@ function generateTableCellProperties(node) {
21071
21121
  } else if (tableCellProperties?.borders) {
21072
21122
  delete tableCellProperties.borders;
21073
21123
  }
21074
- const result = translator$F.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
21124
+ const result = translator$H.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
21075
21125
  return result;
21076
21126
  }
21077
- const XML_NODE_NAME$f = "w:tc";
21078
- const SD_NODE_NAME$d = "tableCell";
21127
+ const XML_NODE_NAME$h = "w:tc";
21128
+ const SD_NODE_NAME$f = "tableCell";
21079
21129
  const validXmlAttributes$a = [];
21080
- function encode$l(params2, encodedAttrs) {
21130
+ function encode$n(params2, encodedAttrs) {
21081
21131
  const {
21082
21132
  node,
21083
21133
  table,
@@ -21104,29 +21154,29 @@ function encode$l(params2, encodedAttrs) {
21104
21154
  }
21105
21155
  return schemaNode;
21106
21156
  }
21107
- function decode$n(params2, decodedAttrs) {
21157
+ function decode$p(params2, decodedAttrs) {
21108
21158
  const translated = translateTableCell(params2);
21109
21159
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
21110
21160
  translated.attributes = { ...translated.attributes || {}, ...decodedAttrs };
21111
21161
  }
21112
21162
  return translated;
21113
21163
  }
21114
- const config$e = {
21115
- xmlName: XML_NODE_NAME$f,
21116
- sdNodeOrKeyName: SD_NODE_NAME$d,
21164
+ const config$g = {
21165
+ xmlName: XML_NODE_NAME$h,
21166
+ sdNodeOrKeyName: SD_NODE_NAME$f,
21117
21167
  type: NodeTranslator.translatorTypes.NODE,
21118
- encode: encode$l,
21119
- decode: decode$n,
21168
+ encode: encode$n,
21169
+ decode: decode$p,
21120
21170
  attributes: validXmlAttributes$a
21121
21171
  };
21122
- const translator$E = NodeTranslator.from(config$e);
21123
- const translator$D = NodeTranslator.from({
21172
+ const translator$G = NodeTranslator.from(config$g);
21173
+ const translator$F = NodeTranslator.from({
21124
21174
  xmlName: "w:cantSplit",
21125
21175
  sdNodeOrKeyName: "cantSplit",
21126
21176
  encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
21127
21177
  decode: ({ node }) => node.attrs?.cantSplit ? { attributes: {} } : void 0
21128
21178
  });
21129
- const translator$C = NodeTranslator.from(
21179
+ const translator$E = NodeTranslator.from(
21130
21180
  createSingleAttrPropertyHandler(
21131
21181
  "w:gridAfter",
21132
21182
  null,
@@ -21135,7 +21185,7 @@ const translator$C = NodeTranslator.from(
21135
21185
  (v2) => integerToString(v2)
21136
21186
  )
21137
21187
  );
21138
- const translator$B = NodeTranslator.from(
21188
+ const translator$D = NodeTranslator.from(
21139
21189
  createSingleAttrPropertyHandler(
21140
21190
  "w:gridBefore",
21141
21191
  null,
@@ -21144,20 +21194,20 @@ const translator$B = NodeTranslator.from(
21144
21194
  (v2) => integerToString(v2)
21145
21195
  )
21146
21196
  );
21147
- const translator$A = NodeTranslator.from({
21197
+ const translator$C = NodeTranslator.from({
21148
21198
  xmlName: "w:hidden",
21149
21199
  sdNodeOrKeyName: "hidden",
21150
21200
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
21151
21201
  decode: ({ node }) => node.attrs.hidden ? { attributes: {} } : void 0
21152
21202
  });
21153
- const translator$z = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
21154
- const translator$y = NodeTranslator.from({
21203
+ const translator$B = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
21204
+ const translator$A = NodeTranslator.from({
21155
21205
  xmlName: "w:tblHeader",
21156
21206
  sdNodeOrKeyName: "repeatHeader",
21157
21207
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
21158
21208
  decode: ({ node }) => node.attrs.repeatHeader ? { attributes: {} } : void 0
21159
21209
  });
21160
- const translator$x = NodeTranslator.from({
21210
+ const translator$z = NodeTranslator.from({
21161
21211
  xmlName: "w:trHeight",
21162
21212
  sdNodeOrKeyName: "rowHeight",
21163
21213
  encode: ({ nodes }) => {
@@ -21184,23 +21234,23 @@ const translator$x = NodeTranslator.from({
21184
21234
  return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
21185
21235
  }
21186
21236
  });
21187
- const translator$w = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
21188
- const translator$v = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
21237
+ const translator$y = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
21238
+ const translator$x = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
21189
21239
  const propertyTranslators$3 = [
21190
- translator$D,
21240
+ translator$F,
21241
+ translator$1H,
21191
21242
  translator$1F,
21192
- translator$1D,
21243
+ translator$E,
21244
+ translator$D,
21193
21245
  translator$C,
21246
+ translator$1C,
21194
21247
  translator$B,
21195
21248
  translator$A,
21196
- translator$1A,
21197
21249
  translator$z,
21198
21250
  translator$y,
21199
- translator$x,
21200
- translator$w,
21201
- translator$v
21251
+ translator$x
21202
21252
  ];
21203
- const translator$u = NodeTranslator.from(
21253
+ const translator$w = NodeTranslator.from(
21204
21254
  createNestedPropertiesTranslator("w:trPr", "tableRowProperties", propertyTranslators$3, {
21205
21255
  cantSplit: false,
21206
21256
  hidden: false,
@@ -21269,17 +21319,17 @@ const isPlaceholderCell = (cell) => {
21269
21319
  }
21270
21320
  return false;
21271
21321
  };
21272
- const XML_NODE_NAME$e = "w:tr";
21273
- const SD_NODE_NAME$c = "tableRow";
21322
+ const XML_NODE_NAME$g = "w:tr";
21323
+ const SD_NODE_NAME$e = "tableRow";
21274
21324
  const validXmlAttributes$9 = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
21275
21325
  (xmlName) => createAttributeHandler(xmlName)
21276
21326
  );
21277
- const encode$k = (params2, encodedAttrs) => {
21327
+ const encode$m = (params2, encodedAttrs) => {
21278
21328
  const { row } = params2.extraParams;
21279
21329
  let tableRowProperties = {};
21280
21330
  const tPr = row.elements.find((el) => el.name === "w:trPr");
21281
21331
  if (tPr) {
21282
- tableRowProperties = translator$u.encode({
21332
+ tableRowProperties = translator$w.encode({
21283
21333
  ...params2,
21284
21334
  nodes: [tPr]
21285
21335
  });
@@ -21316,7 +21366,7 @@ const encode$k = (params2, encodedAttrs) => {
21316
21366
  skipOccupiedColumns();
21317
21367
  const startColumn = currentColumnIndex;
21318
21368
  const columnWidth = gridColumnWidths?.[startColumn] || null;
21319
- const result = translator$E.encode({
21369
+ const result = translator$G.encode({
21320
21370
  ...params2,
21321
21371
  extraParams: {
21322
21372
  ...params2.extraParams,
@@ -21349,7 +21399,7 @@ const encode$k = (params2, encodedAttrs) => {
21349
21399
  };
21350
21400
  return newNode;
21351
21401
  };
21352
- const decode$m = (params2, decodedAttrs) => {
21402
+ const decode$o = (params2, decodedAttrs) => {
21353
21403
  const { node } = params2;
21354
21404
  const cells = node.content || [];
21355
21405
  let leadingPlaceholders = 0;
@@ -21389,7 +21439,7 @@ const decode$m = (params2, decodedAttrs) => {
21389
21439
  }
21390
21440
  }
21391
21441
  tableRowProperties["cantSplit"] = node.attrs["cantSplit"];
21392
- const trPr = translator$u.decode({
21442
+ const trPr = translator$w.decode({
21393
21443
  ...params2,
21394
21444
  node: { ...node, attrs: { ...node.attrs, tableRowProperties } }
21395
21445
  });
@@ -21401,15 +21451,15 @@ const decode$m = (params2, decodedAttrs) => {
21401
21451
  elements
21402
21452
  };
21403
21453
  };
21404
- const config$d = {
21405
- xmlName: XML_NODE_NAME$e,
21406
- sdNodeOrKeyName: SD_NODE_NAME$c,
21454
+ const config$f = {
21455
+ xmlName: XML_NODE_NAME$g,
21456
+ sdNodeOrKeyName: SD_NODE_NAME$e,
21407
21457
  type: NodeTranslator.translatorTypes.NODE,
21408
- encode: encode$k,
21409
- decode: decode$m,
21458
+ encode: encode$m,
21459
+ decode: decode$o,
21410
21460
  attributes: validXmlAttributes$9
21411
21461
  };
21412
- const translator$t = NodeTranslator.from(config$d);
21462
+ const translator$v = NodeTranslator.from(config$f);
21413
21463
  function parseTagValueJSON(json) {
21414
21464
  if (typeof json !== "string") {
21415
21465
  return {};
@@ -30363,32 +30413,32 @@ function translateAnchorNode(params2) {
30363
30413
  elements: [...anchorElements, ...elementsWithWrap]
30364
30414
  };
30365
30415
  }
30366
- const XML_NODE_NAME$d = "wp:anchor";
30367
- const SD_NODE_NAME$b = ["image", "shapeGroup", "vectorShape", "contentBlock"];
30416
+ const XML_NODE_NAME$f = "wp:anchor";
30417
+ const SD_NODE_NAME$d = ["image", "shapeGroup", "vectorShape", "contentBlock"];
30368
30418
  const validXmlAttributes$8 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
30369
- function encode$j(params2) {
30419
+ function encode$l(params2) {
30370
30420
  const { node } = params2.extraParams;
30371
30421
  if (!node || !node.name) {
30372
30422
  return null;
30373
30423
  }
30374
30424
  return handleAnchorNode(params2);
30375
30425
  }
30376
- function decode$l(params2) {
30426
+ function decode$n(params2) {
30377
30427
  const { node } = params2;
30378
30428
  if (!node || !node.type) {
30379
30429
  return null;
30380
30430
  }
30381
30431
  return translateAnchorNode(params2);
30382
30432
  }
30383
- const config$c = {
30384
- xmlName: XML_NODE_NAME$d,
30385
- sdNodeOrKeyName: SD_NODE_NAME$b,
30433
+ const config$e = {
30434
+ xmlName: XML_NODE_NAME$f,
30435
+ sdNodeOrKeyName: SD_NODE_NAME$d,
30386
30436
  type: NodeTranslator.translatorTypes.NODE,
30387
- encode: encode$j,
30388
- decode: decode$l,
30437
+ encode: encode$l,
30438
+ decode: decode$n,
30389
30439
  attributes: validXmlAttributes$8
30390
30440
  };
30391
- const translator$s = NodeTranslator.from(config$c);
30441
+ const translator$u = NodeTranslator.from(config$e);
30392
30442
  function handleInlineNode(params2) {
30393
30443
  const { node } = params2.extraParams;
30394
30444
  if (node.name !== "wp:inline") {
@@ -30404,41 +30454,41 @@ function translateInlineNode(params2) {
30404
30454
  elements: nodeElements.elements
30405
30455
  };
30406
30456
  }
30407
- const XML_NODE_NAME$c = "wp:inline";
30408
- const SD_NODE_NAME$a = ["image", "shapeGroup", "vectorShape", "contentBlock"];
30457
+ const XML_NODE_NAME$e = "wp:inline";
30458
+ const SD_NODE_NAME$c = ["image", "shapeGroup", "vectorShape", "contentBlock"];
30409
30459
  const validXmlAttributes$7 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
30410
- function encode$i(params2) {
30460
+ function encode$k(params2) {
30411
30461
  const { node } = params2.extraParams;
30412
30462
  if (!node || !node.name) {
30413
30463
  return null;
30414
30464
  }
30415
30465
  return handleInlineNode(params2);
30416
30466
  }
30417
- function decode$k(params2) {
30467
+ function decode$m(params2) {
30418
30468
  const { node } = params2;
30419
30469
  if (!node || !node.type) {
30420
30470
  return null;
30421
30471
  }
30422
30472
  return translateInlineNode(params2);
30423
30473
  }
30424
- const config$b = {
30425
- xmlName: XML_NODE_NAME$c,
30426
- sdNodeOrKeyName: SD_NODE_NAME$a,
30474
+ const config$d = {
30475
+ xmlName: XML_NODE_NAME$e,
30476
+ sdNodeOrKeyName: SD_NODE_NAME$c,
30427
30477
  type: NodeTranslator.translatorTypes.NODE,
30428
- encode: encode$i,
30429
- decode: decode$k,
30478
+ encode: encode$k,
30479
+ decode: decode$m,
30430
30480
  attributes: validXmlAttributes$7
30431
30481
  };
30432
- const translator$r = NodeTranslator.from(config$b);
30433
- const XML_NODE_NAME$b = "w:drawing";
30434
- const SD_NODE_NAME$9 = [];
30482
+ const translator$t = NodeTranslator.from(config$d);
30483
+ const XML_NODE_NAME$d = "w:drawing";
30484
+ const SD_NODE_NAME$b = [];
30435
30485
  const validXmlAttributes$6 = [];
30436
- function encode$h(params2) {
30486
+ function encode$j(params2) {
30437
30487
  const nodes = params2.nodes;
30438
30488
  const node = nodes[0];
30439
30489
  const translatorByChildName = {
30440
- "wp:anchor": translator$s,
30441
- "wp:inline": translator$r
30490
+ "wp:anchor": translator$u,
30491
+ "wp:inline": translator$t
30442
30492
  };
30443
30493
  return node.elements.reduce((acc, child) => {
30444
30494
  if (acc) return acc;
@@ -30447,12 +30497,12 @@ function encode$h(params2) {
30447
30497
  return translator2.encode({ ...params2, extraParams: { node: child } }) || acc;
30448
30498
  }, null);
30449
30499
  }
30450
- function decode$j(params2) {
30500
+ function decode$l(params2) {
30451
30501
  const { node } = params2;
30452
30502
  if (!node || !node.type) {
30453
30503
  return null;
30454
30504
  }
30455
- const childTranslator = node.attrs.isAnchor ? translator$s : translator$r;
30505
+ const childTranslator = node.attrs.isAnchor ? translator$u : translator$t;
30456
30506
  const resultNode = childTranslator.decode(params2);
30457
30507
  return wrapTextInRun(
30458
30508
  {
@@ -30462,15 +30512,68 @@ function decode$j(params2) {
30462
30512
  []
30463
30513
  );
30464
30514
  }
30465
- const config$a = {
30466
- xmlName: XML_NODE_NAME$b,
30467
- sdNodeOrKeyName: SD_NODE_NAME$9,
30515
+ const config$c = {
30516
+ xmlName: XML_NODE_NAME$d,
30517
+ sdNodeOrKeyName: SD_NODE_NAME$b,
30468
30518
  type: NodeTranslator.translatorTypes.NODE,
30469
- encode: encode$h,
30470
- decode: decode$j,
30519
+ encode: encode$j,
30520
+ decode: decode$l,
30471
30521
  attributes: validXmlAttributes$6
30472
30522
  };
30473
- const translator$q = NodeTranslator.from(config$a);
30523
+ const translator$s = NodeTranslator.from(config$c);
30524
+ function getTextNodeForExport(text, marks, params2) {
30525
+ const hasLeadingOrTrailingSpace = /^\s|\s$/.test(text);
30526
+ const space = hasLeadingOrTrailingSpace ? "preserve" : null;
30527
+ const nodeAttrs = space ? { "xml:space": space } : null;
30528
+ const textNodes = [];
30529
+ const textRunProperties = decodeRPrFromMarks(marks || []);
30530
+ const parentRunProperties = params2.extraParams?.runProperties || {};
30531
+ const combinedRunProperties = combineRunProperties([parentRunProperties, textRunProperties]);
30532
+ const rPrNode = translator$1N.decode({ node: { attrs: { runProperties: combinedRunProperties } } });
30533
+ textNodes.push({
30534
+ name: "w:t",
30535
+ elements: [{ text, type: "text" }],
30536
+ attributes: nodeAttrs
30537
+ });
30538
+ if (params2) {
30539
+ const { editor } = params2;
30540
+ const customMarks = editor.extensionService.extensions.filter((e) => e.isExternal === true);
30541
+ marks.forEach((mark) => {
30542
+ const isCustomMark = customMarks.some((customMark) => {
30543
+ const customMarkName = customMark.name;
30544
+ return mark.type === customMarkName;
30545
+ });
30546
+ if (!isCustomMark) return;
30547
+ let attrsString = "";
30548
+ Object.entries(mark.attrs).forEach(([key2, value]) => {
30549
+ if (value) {
30550
+ attrsString += `${key2}=${value};`;
30551
+ }
30552
+ });
30553
+ if (isCustomMark) {
30554
+ textNodes.unshift({
30555
+ type: "element",
30556
+ name: "w:bookmarkStart",
30557
+ attributes: {
30558
+ "w:id": "5000",
30559
+ "w:name": mark.type + ";" + attrsString
30560
+ }
30561
+ });
30562
+ textNodes.push({
30563
+ type: "element",
30564
+ name: "w:bookmarkEnd",
30565
+ attributes: {
30566
+ "w:id": "5000"
30567
+ }
30568
+ });
30569
+ }
30570
+ });
30571
+ }
30572
+ return {
30573
+ name: "w:r",
30574
+ elements: rPrNode ? [rPrNode, ...textNodes] : textNodes
30575
+ };
30576
+ }
30474
30577
  var he$2 = { exports: {} };
30475
30578
  /*! https://mths.be/he v1.2.0 by @mathias | MIT license */
30476
30579
  var he$1 = he$2.exports;
@@ -30817,7 +30920,7 @@ function prepareTextAnnotation(params2) {
30817
30920
  return getTextNodeForExport(attrs.displayLabel, [...marks, ...marksFromAttrs], params2);
30818
30921
  }
30819
30922
  function prepareImageAnnotation(params2, imageSize) {
30820
- return translator$q.decode({
30923
+ return translator$s.decode({
30821
30924
  ...params2,
30822
30925
  imageSize
30823
30926
  });
@@ -30877,18 +30980,31 @@ function prepareUrlAnnotation(params2) {
30877
30980
  node: { attrs = {}, marks = [] }
30878
30981
  } = params2;
30879
30982
  if (!attrs.linkUrl) return prepareTextAnnotation(params2);
30880
- const newId = addNewLinkRelationship(params2, attrs.linkUrl);
30881
- const linkTextNode = getTextNodeForExport(attrs.linkUrl, marks, params2);
30882
- const contentNode = processLinkContentNode(linkTextNode);
30883
- return {
30884
- name: "w:hyperlink",
30885
- type: "element",
30886
- attributes: {
30887
- "r:id": newId,
30888
- "w:history": 1
30889
- },
30890
- elements: [contentNode]
30983
+ const linkTextNode = {
30984
+ type: "text",
30985
+ text: attrs.linkUrl,
30986
+ marks: [
30987
+ ...marks,
30988
+ {
30989
+ type: "link",
30990
+ attrs: {
30991
+ href: attrs.linkUrl,
30992
+ history: true,
30993
+ text: attrs.linkUrl
30994
+ }
30995
+ },
30996
+ {
30997
+ type: "textStyle",
30998
+ attrs: {
30999
+ color: "#467886"
31000
+ }
31001
+ }
31002
+ ]
30891
31003
  };
31004
+ return translator$10.decode({
31005
+ ...params2,
31006
+ node: linkTextNode
31007
+ });
30892
31008
  }
30893
31009
  function translateFieldAttrsToMarks(attrs = {}) {
30894
31010
  const { fontFamily: fontFamily2, fontSize: fontSize2, bold, underline, italic, textColor, textHighlight } = attrs;
@@ -31081,6 +31197,46 @@ function translateDocumentPartObj(params2) {
31081
31197
  };
31082
31198
  return result;
31083
31199
  }
31200
+ const RUN_LEVEL_WRAPPERS = /* @__PURE__ */ new Set(["w:hyperlink", "w:ins", "w:del"]);
31201
+ function convertSdtContentToRuns(elements) {
31202
+ const normalized = Array.isArray(elements) ? elements : [elements];
31203
+ const runs = [];
31204
+ normalized.forEach((element) => {
31205
+ if (!element) return;
31206
+ if (element.name === "w:sdtPr") {
31207
+ return;
31208
+ }
31209
+ if (element.name === "w:r") {
31210
+ runs.push(element);
31211
+ return;
31212
+ }
31213
+ if (element.name === "w:sdt") {
31214
+ const sdtContent = (element.elements || []).find((child) => child?.name === "w:sdtContent");
31215
+ if (sdtContent?.elements) {
31216
+ runs.push(...convertSdtContentToRuns(sdtContent.elements));
31217
+ }
31218
+ return;
31219
+ }
31220
+ if (RUN_LEVEL_WRAPPERS.has(element.name)) {
31221
+ const wrapperElements = convertSdtContentToRuns(element.elements || []);
31222
+ if (wrapperElements.length) {
31223
+ runs.push({
31224
+ ...element,
31225
+ elements: wrapperElements
31226
+ });
31227
+ }
31228
+ return;
31229
+ }
31230
+ if (element.name) {
31231
+ runs.push({
31232
+ name: "w:r",
31233
+ type: "element",
31234
+ elements: element.elements || [element]
31235
+ });
31236
+ }
31237
+ });
31238
+ return runs.filter((run2) => Array.isArray(run2.elements) && run2.elements.length > 0);
31239
+ }
31084
31240
  function translateStructuredContent(params2) {
31085
31241
  const { node, isFinalDoc } = params2;
31086
31242
  const childContent = translateChildNodes({ ...params2, node });
@@ -31141,10 +31297,10 @@ function generateSdtPrTagForStructuredContent({ node }) {
31141
31297
  };
31142
31298
  return result;
31143
31299
  }
31144
- const XML_NODE_NAME$a = "w:sdt";
31145
- const SD_NODE_NAME$8 = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
31300
+ const XML_NODE_NAME$c = "w:sdt";
31301
+ const SD_NODE_NAME$a = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
31146
31302
  const validXmlAttributes$5 = [];
31147
- function encode$g(params2) {
31303
+ function encode$i(params2) {
31148
31304
  const nodes = params2.nodes;
31149
31305
  const node = nodes[0];
31150
31306
  const { type: sdtType, handler: handler2 } = sdtNodeTypeStrategy(node);
@@ -31154,7 +31310,7 @@ function encode$g(params2) {
31154
31310
  const result = handler2(params2);
31155
31311
  return result;
31156
31312
  }
31157
- function decode$i(params2) {
31313
+ function decode$k(params2) {
31158
31314
  const { node } = params2;
31159
31315
  if (!node || !node.type) {
31160
31316
  return null;
@@ -31172,15 +31328,15 @@ function decode$i(params2) {
31172
31328
  const result = decoder();
31173
31329
  return result;
31174
31330
  }
31175
- const config$9 = {
31176
- xmlName: XML_NODE_NAME$a,
31177
- sdNodeOrKeyName: SD_NODE_NAME$8,
31331
+ const config$b = {
31332
+ xmlName: XML_NODE_NAME$c,
31333
+ sdNodeOrKeyName: SD_NODE_NAME$a,
31178
31334
  type: NodeTranslator.translatorTypes.NODE,
31179
- encode: encode$g,
31180
- decode: decode$i,
31335
+ encode: encode$i,
31336
+ decode: decode$k,
31181
31337
  attributes: validXmlAttributes$5
31182
31338
  };
31183
- const translator$p = NodeTranslator.from(config$9);
31339
+ const translator$r = NodeTranslator.from(config$b);
31184
31340
  function preProcessVerticalMergeCells(table, { editorSchema }) {
31185
31341
  if (!table || !Array.isArray(table.content)) {
31186
31342
  return table;
@@ -31221,17 +31377,17 @@ function preProcessVerticalMergeCells(table, { editorSchema }) {
31221
31377
  }
31222
31378
  return table;
31223
31379
  }
31224
- const translator$o = NodeTranslator.from({
31380
+ const translator$q = NodeTranslator.from({
31225
31381
  xmlName: "w:bidiVisual",
31226
31382
  sdNodeOrKeyName: "rightToLeft",
31227
31383
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
31228
31384
  decode: ({ node }) => node.attrs.rightToLeft ? { attributes: {} } : void 0
31229
31385
  });
31230
- const translator$n = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
31231
- const translator$m = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
31232
- const translator$l = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
31233
- const translator$k = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
31234
- const translator$j = NodeTranslator.from({
31386
+ const translator$p = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
31387
+ const translator$o = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
31388
+ const translator$n = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
31389
+ const translator$m = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
31390
+ const translator$l = NodeTranslator.from({
31235
31391
  xmlName: "w:tblLook",
31236
31392
  sdNodeOrKeyName: "tblLook",
31237
31393
  attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
@@ -31243,16 +31399,16 @@ const translator$j = NodeTranslator.from({
31243
31399
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
31244
31400
  }
31245
31401
  });
31246
- const translator$i = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
31247
- const translator$h = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
31248
- const translator$g = NodeTranslator.from(
31402
+ const translator$k = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
31403
+ const translator$j = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
31404
+ const translator$i = NodeTranslator.from(
31249
31405
  createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
31250
31406
  );
31251
- const translator$f = NodeTranslator.from(
31407
+ const translator$h = NodeTranslator.from(
31252
31408
  createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
31253
31409
  );
31254
- const translator$e = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
31255
- const translator$d = NodeTranslator.from({
31410
+ const translator$g = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
31411
+ const translator$f = NodeTranslator.from({
31256
31412
  xmlName: "w:tblpPr",
31257
31413
  sdNodeOrKeyName: "floatingTableProperties",
31258
31414
  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))),
@@ -31265,35 +31421,37 @@ const translator$d = NodeTranslator.from({
31265
31421
  }
31266
31422
  });
31267
31423
  const propertyTranslators$2 = [
31268
- translator$1n,
31424
+ translator$1p,
31425
+ translator$X,
31269
31426
  translator$V,
31270
- translator$T,
31271
- translator$S,
31427
+ translator$U,
31428
+ translator$1n,
31272
31429
  translator$1l,
31273
- translator$1j,
31274
- translator$R,
31275
- translator$1h
31430
+ translator$T,
31431
+ translator$1j
31276
31432
  ];
31277
- const translator$c = NodeTranslator.from(
31433
+ const translator$e = NodeTranslator.from(
31278
31434
  createNestedPropertiesTranslator("w:tblBorders", "borders", propertyTranslators$2)
31279
31435
  );
31280
31436
  const propertyTranslators$1 = [
31437
+ translator$1o,
31438
+ translator$W,
31281
31439
  translator$1m,
31282
- translator$U,
31283
31440
  translator$1k,
31284
- translator$1i,
31285
- translator$Q,
31286
- translator$1g
31441
+ translator$S,
31442
+ translator$1i
31287
31443
  ];
31288
- const translator$b = NodeTranslator.from(
31444
+ const translator$d = NodeTranslator.from(
31289
31445
  createNestedPropertiesTranslator("w:tblCellMar", "cellMargins", propertyTranslators$1)
31290
31446
  );
31291
31447
  const propertyTranslators = [
31448
+ translator$q,
31449
+ translator$1C,
31450
+ translator$1Q,
31451
+ translator$p,
31452
+ translator$B,
31292
31453
  translator$o,
31293
- translator$1A,
31294
- translator$1O,
31295
31454
  translator$n,
31296
- translator$z,
31297
31455
  translator$m,
31298
31456
  translator$l,
31299
31457
  translator$k,
@@ -31303,14 +31461,12 @@ const propertyTranslators = [
31303
31461
  translator$g,
31304
31462
  translator$f,
31305
31463
  translator$e,
31306
- translator$d,
31307
- translator$c,
31308
- translator$b
31464
+ translator$d
31309
31465
  ];
31310
- const translator$a = NodeTranslator.from(
31466
+ const translator$c = NodeTranslator.from(
31311
31467
  createNestedPropertiesTranslator("w:tblPr", "tableProperties", propertyTranslators)
31312
31468
  );
31313
- const translator$9 = NodeTranslator.from(
31469
+ const translator$b = NodeTranslator.from(
31314
31470
  createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
31315
31471
  );
31316
31472
  const DEFAULT_COLUMN_WIDTH_PX = 100;
@@ -31360,24 +31516,24 @@ const resolveFallbackColumnWidthTwips = (params2, totalColumns, cellMinWidthTwip
31360
31516
  }
31361
31517
  return Math.max(fallbackWidthTwips, cellMinWidthTwips);
31362
31518
  };
31363
- const XML_NODE_NAME$9 = "w:tblGrid";
31519
+ const XML_NODE_NAME$b = "w:tblGrid";
31364
31520
  const SD_ATTR_KEY$1 = "grid";
31365
31521
  const cellMinWidth = pixelsToTwips(10);
31366
- const encode$f = (params2) => {
31522
+ const encode$h = (params2) => {
31367
31523
  const { nodes } = params2;
31368
31524
  const node = nodes[0];
31369
31525
  const attributes = encodeProperties(
31370
31526
  { ...params2, nodes: [node] },
31371
- { [translator$9.xmlName]: translator$9 },
31527
+ { [translator$b.xmlName]: translator$b },
31372
31528
  true
31373
31529
  );
31374
31530
  return {
31375
- xmlName: XML_NODE_NAME$9,
31531
+ xmlName: XML_NODE_NAME$b,
31376
31532
  sdNodeOrKeyName: SD_ATTR_KEY$1,
31377
31533
  attributes
31378
31534
  };
31379
31535
  };
31380
- const decode$h = (params2) => {
31536
+ const decode$j = (params2) => {
31381
31537
  const { grid: rawGrid } = params2.node.attrs || {};
31382
31538
  const grid = Array.isArray(rawGrid) ? rawGrid : [];
31383
31539
  const { firstRow = {} } = params2.extraParams || {};
@@ -31400,10 +31556,10 @@ const decode$h = (params2) => {
31400
31556
  const roundedWidth = Math.round(numericWidth);
31401
31557
  const minimumWidth = shouldEnforceMinimum ? cellMinWidth : 1;
31402
31558
  const safeWidth = Math.max(roundedWidth, minimumWidth);
31403
- const decoded = translator$9.decode({
31559
+ const decoded = translator$b.decode({
31404
31560
  node: { type: (
31405
31561
  /** @type {string} */
31406
- translator$9.sdNodeOrKeyName
31562
+ translator$b.sdNodeOrKeyName
31407
31563
  ), attrs: { col: safeWidth } }
31408
31564
  });
31409
31565
  if (decoded) elements.push(decoded);
@@ -31443,19 +31599,19 @@ const decode$h = (params2) => {
31443
31599
  columnIndex++;
31444
31600
  }
31445
31601
  const newNode = {
31446
- name: XML_NODE_NAME$9,
31602
+ name: XML_NODE_NAME$b,
31447
31603
  attributes: {},
31448
31604
  elements
31449
31605
  };
31450
31606
  return newNode;
31451
31607
  };
31452
- const config$8 = {
31453
- xmlName: XML_NODE_NAME$9,
31608
+ const config$a = {
31609
+ xmlName: XML_NODE_NAME$b,
31454
31610
  sdNodeOrKeyName: SD_ATTR_KEY$1,
31455
- encode: encode$f,
31456
- decode: decode$h
31611
+ encode: encode$h,
31612
+ decode: decode$j
31457
31613
  };
31458
- const translator$8 = NodeTranslator.from(config$8);
31614
+ const translator$a = NodeTranslator.from(config$a);
31459
31615
  const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
31460
31616
  const DEFAULT_PAGE_MARGIN_TWIPS = 1440;
31461
31617
  const DEFAULT_CONTENT_WIDTH_TWIPS = DEFAULT_PAGE_WIDTH_TWIPS - 2 * DEFAULT_PAGE_MARGIN_TWIPS;
@@ -31518,19 +31674,19 @@ const buildFallbackGridForTable = ({ params: params2, rows, tableWidth, tableWid
31518
31674
  columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
31519
31675
  };
31520
31676
  };
31521
- const XML_NODE_NAME$8 = "w:tbl";
31522
- const SD_NODE_NAME$7 = "table";
31523
- const encode$e = (params2, encodedAttrs) => {
31677
+ const XML_NODE_NAME$a = "w:tbl";
31678
+ const SD_NODE_NAME$9 = "table";
31679
+ const encode$g = (params2, encodedAttrs) => {
31524
31680
  const { nodes } = params2;
31525
31681
  const node = nodes[0];
31526
31682
  const tblPr = node.elements.find((el) => el.name === "w:tblPr");
31527
31683
  if (tblPr) {
31528
- const encodedProperties = translator$a.encode({ ...params2, nodes: [tblPr] });
31684
+ const encodedProperties = translator$c.encode({ ...params2, nodes: [tblPr] });
31529
31685
  encodedAttrs["tableProperties"] = encodedProperties || {};
31530
31686
  }
31531
31687
  const tblGrid = node.elements.find((el) => el.name === "w:tblGrid");
31532
31688
  if (tblGrid) {
31533
- encodedAttrs["grid"] = translator$8.encode({ ...params2, nodes: [tblGrid] }).attributes;
31689
+ encodedAttrs["grid"] = translator$a.encode({ ...params2, nodes: [tblGrid] }).attributes;
31534
31690
  }
31535
31691
  [
31536
31692
  "tableStyleId",
@@ -31598,7 +31754,7 @@ const encode$e = (params2, encodedAttrs) => {
31598
31754
  const totalColumns = columnWidths.length;
31599
31755
  const activeRowSpans = totalColumns > 0 ? new Array(totalColumns).fill(0) : [];
31600
31756
  rows.forEach((row, rowIndex) => {
31601
- const result = translator$t.encode({
31757
+ const result = translator$v.encode({
31602
31758
  ...params2,
31603
31759
  nodes: [row],
31604
31760
  extraParams: {
@@ -31652,13 +31808,13 @@ const encode$e = (params2, encodedAttrs) => {
31652
31808
  attrs: encodedAttrs
31653
31809
  };
31654
31810
  };
31655
- const decode$g = (params2, decodedAttrs) => {
31811
+ const decode$i = (params2, decodedAttrs) => {
31656
31812
  params2.node = preProcessVerticalMergeCells(params2.node, params2);
31657
31813
  const { node } = params2;
31658
31814
  const elements = translateChildNodes(params2);
31659
31815
  const firstRow = node.content?.find((n) => n.type === "tableRow");
31660
31816
  const properties = node.attrs.grid;
31661
- const element = translator$8.decode({
31817
+ const element = translator$a.decode({
31662
31818
  ...params2,
31663
31819
  node: { ...node, attrs: { ...node.attrs, grid: properties } },
31664
31820
  extraParams: {
@@ -31668,7 +31824,7 @@ const decode$g = (params2, decodedAttrs) => {
31668
31824
  if (element) elements.unshift(element);
31669
31825
  if (node.attrs?.tableProperties) {
31670
31826
  const properties2 = { ...node.attrs.tableProperties };
31671
- const element2 = translator$a.decode({
31827
+ const element2 = translator$c.decode({
31672
31828
  ...params2,
31673
31829
  node: { ...node, attrs: { ...node.attrs, tableProperties: properties2 } }
31674
31830
  });
@@ -31734,7 +31890,7 @@ function _getReferencedTableStyles(tableStyleReference, params2) {
31734
31890
  if (baseTblPr && baseTblPr.elements) {
31735
31891
  tblPr.elements.push(...baseTblPr.elements);
31736
31892
  }
31737
- const tableProperties = translator$a.encode({ ...params2, nodes: [tblPr] });
31893
+ const tableProperties = translator$c.encode({ ...params2, nodes: [tblPr] });
31738
31894
  if (tableProperties) {
31739
31895
  const { borders, rowBorders } = _processTableBorders(tableProperties.borders || {});
31740
31896
  if (borders) stylesToReturn.borders = borders;
@@ -31753,85 +31909,85 @@ function _getReferencedTableStyles(tableStyleReference, params2) {
31753
31909
  }
31754
31910
  return stylesToReturn;
31755
31911
  }
31756
- const config$7 = {
31757
- xmlName: XML_NODE_NAME$8,
31758
- sdNodeOrKeyName: SD_NODE_NAME$7,
31912
+ const config$9 = {
31913
+ xmlName: XML_NODE_NAME$a,
31914
+ sdNodeOrKeyName: SD_NODE_NAME$9,
31759
31915
  type: NodeTranslator.translatorTypes.NODE,
31760
- encode: encode$e,
31761
- decode: decode$g,
31916
+ encode: encode$g,
31917
+ decode: decode$i,
31762
31918
  attributes: []
31763
31919
  };
31764
- const translator$7 = NodeTranslator.from(config$7);
31765
- const encode$d = (attributes) => {
31920
+ const translator$9 = NodeTranslator.from(config$9);
31921
+ const encode$f = (attributes) => {
31766
31922
  return attributes["w:id"];
31767
31923
  };
31768
- const decode$f = (attrs) => {
31924
+ const decode$h = (attrs) => {
31769
31925
  return attrs.id;
31770
31926
  };
31771
31927
  const attrConfig$7 = Object.freeze({
31772
31928
  xmlName: "w:id",
31773
31929
  sdName: "id",
31774
- encode: encode$d,
31775
- decode: decode$f
31930
+ encode: encode$f,
31931
+ decode: decode$h
31776
31932
  });
31777
- const encode$c = (attributes) => {
31933
+ const encode$e = (attributes) => {
31778
31934
  return attributes["w:name"];
31779
31935
  };
31780
- const decode$e = (attrs) => {
31936
+ const decode$g = (attrs) => {
31781
31937
  return attrs.name;
31782
31938
  };
31783
31939
  const attrConfig$6 = Object.freeze({
31784
31940
  xmlName: "w:name",
31785
31941
  sdName: "name",
31786
- encode: encode$c,
31787
- decode: decode$e
31942
+ encode: encode$e,
31943
+ decode: decode$g
31788
31944
  });
31789
- const encode$b = (attributes) => {
31945
+ const encode$d = (attributes) => {
31790
31946
  return attributes["w:colFirst"];
31791
31947
  };
31792
- const decode$d = (attrs) => {
31948
+ const decode$f = (attrs) => {
31793
31949
  return attrs.colFirst;
31794
31950
  };
31795
31951
  const attrConfig$5 = Object.freeze({
31796
31952
  xmlName: "w:colFirst",
31797
31953
  sdName: "colFirst",
31798
- encode: encode$b,
31799
- decode: decode$d
31954
+ encode: encode$d,
31955
+ decode: decode$f
31800
31956
  });
31801
- const encode$a = (attributes) => {
31957
+ const encode$c = (attributes) => {
31802
31958
  return attributes["w:colLast"];
31803
31959
  };
31804
- const decode$c = (attrs) => {
31960
+ const decode$e = (attrs) => {
31805
31961
  return attrs.colLast;
31806
31962
  };
31807
31963
  const attrConfig$4 = Object.freeze({
31808
31964
  xmlName: "w:colLast",
31809
31965
  sdName: "colLast",
31810
- encode: encode$a,
31811
- decode: decode$c
31966
+ encode: encode$c,
31967
+ decode: decode$e
31812
31968
  });
31813
- const encode$9 = (attributes) => {
31969
+ const encode$b = (attributes) => {
31814
31970
  return attributes["w:displacedByCustomXml"];
31815
31971
  };
31816
- const decode$b = (attrs) => {
31972
+ const decode$d = (attrs) => {
31817
31973
  return attrs.displacedByCustomXml;
31818
31974
  };
31819
31975
  const attrConfig$3 = Object.freeze({
31820
31976
  xmlName: "w:displacedByCustomXml",
31821
31977
  sdName: "displacedByCustomXml",
31822
- encode: encode$9,
31823
- decode: decode$b
31978
+ encode: encode$b,
31979
+ decode: decode$d
31824
31980
  });
31825
31981
  const validXmlAttributes$4 = [attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3];
31826
- const XML_NODE_NAME$7 = "w:bookmarkStart";
31827
- const SD_NODE_NAME$6 = "bookmarkStart";
31828
- const encode$8 = (params2, encodedAttrs = {}) => {
31982
+ const XML_NODE_NAME$9 = "w:bookmarkStart";
31983
+ const SD_NODE_NAME$8 = "bookmarkStart";
31984
+ const encode$a = (params2, encodedAttrs = {}) => {
31829
31985
  return {
31830
31986
  type: "bookmarkStart",
31831
31987
  attrs: encodedAttrs
31832
31988
  };
31833
31989
  };
31834
- const decode$a = (params2, decodedAttrs = {}) => {
31990
+ const decode$c = (params2, decodedAttrs = {}) => {
31835
31991
  const result = {
31836
31992
  name: "w:bookmarkStart",
31837
31993
  elements: []
@@ -31841,49 +31997,49 @@ const decode$a = (params2, decodedAttrs = {}) => {
31841
31997
  }
31842
31998
  return result;
31843
31999
  };
31844
- const config$6 = {
31845
- xmlName: XML_NODE_NAME$7,
31846
- sdNodeOrKeyName: SD_NODE_NAME$6,
32000
+ const config$8 = {
32001
+ xmlName: XML_NODE_NAME$9,
32002
+ sdNodeOrKeyName: SD_NODE_NAME$8,
31847
32003
  type: NodeTranslator.translatorTypes.NODE,
31848
- encode: encode$8,
31849
- decode: decode$a,
32004
+ encode: encode$a,
32005
+ decode: decode$c,
31850
32006
  attributes: validXmlAttributes$4
31851
32007
  };
31852
- const translator$6 = NodeTranslator.from(config$6);
31853
- const encode$7 = (attributes) => {
32008
+ const translator$8 = NodeTranslator.from(config$8);
32009
+ const encode$9 = (attributes) => {
31854
32010
  return attributes["w:id"];
31855
32011
  };
31856
- const decode$9 = (attrs) => {
32012
+ const decode$b = (attrs) => {
31857
32013
  return attrs.id;
31858
32014
  };
31859
32015
  const attrConfig$2 = Object.freeze({
31860
32016
  xmlName: "w:id",
31861
32017
  sdName: "id",
31862
- encode: encode$7,
31863
- decode: decode$9
32018
+ encode: encode$9,
32019
+ decode: decode$b
31864
32020
  });
31865
- const encode$6 = (attributes) => {
32021
+ const encode$8 = (attributes) => {
31866
32022
  return attributes["w:displacedByCustomXml"];
31867
32023
  };
31868
- const decode$8 = (attrs) => {
32024
+ const decode$a = (attrs) => {
31869
32025
  return attrs.displacedByCustomXml;
31870
32026
  };
31871
32027
  const attrConfig$1 = Object.freeze({
31872
32028
  xmlName: "w:displacedByCustomXml",
31873
32029
  sdName: "displacedByCustomXml",
31874
- encode: encode$6,
31875
- decode: decode$8
32030
+ encode: encode$8,
32031
+ decode: decode$a
31876
32032
  });
31877
32033
  const validXmlAttributes$3 = [attrConfig$2, attrConfig$1];
31878
- const XML_NODE_NAME$6 = "w:bookmarkEnd";
31879
- const SD_NODE_NAME$5 = "bookmarkEnd";
31880
- const encode$5 = (params2, encodedAttrs = {}) => {
32034
+ const XML_NODE_NAME$8 = "w:bookmarkEnd";
32035
+ const SD_NODE_NAME$7 = "bookmarkEnd";
32036
+ const encode$7 = (params2, encodedAttrs = {}) => {
31881
32037
  return {
31882
32038
  type: "bookmarkEnd",
31883
32039
  attrs: encodedAttrs
31884
32040
  };
31885
32041
  };
31886
- const decode$7 = (params2, decodedAttrs = {}) => {
32042
+ const decode$9 = (params2, decodedAttrs = {}) => {
31887
32043
  const result = {
31888
32044
  name: "w:bookmarkEnd",
31889
32045
  elements: []
@@ -31893,27 +32049,27 @@ const decode$7 = (params2, decodedAttrs = {}) => {
31893
32049
  }
31894
32050
  return result;
31895
32051
  };
31896
- const config$5 = {
31897
- xmlName: XML_NODE_NAME$6,
31898
- sdNodeOrKeyName: SD_NODE_NAME$5,
32052
+ const config$7 = {
32053
+ xmlName: XML_NODE_NAME$8,
32054
+ sdNodeOrKeyName: SD_NODE_NAME$7,
31899
32055
  type: NodeTranslator.translatorTypes.NODE,
31900
- encode: encode$5,
31901
- decode: decode$7,
32056
+ encode: encode$7,
32057
+ decode: decode$9,
31902
32058
  attributes: validXmlAttributes$3
31903
32059
  };
31904
- const translator$5 = NodeTranslator.from(config$5);
31905
- const decode$6 = (attrs) => attrs?.["w:id"];
32060
+ const translator$7 = NodeTranslator.from(config$7);
32061
+ const decode$8 = (attrs) => attrs?.["w:id"];
31906
32062
  const attrConfig = Object.freeze({
31907
32063
  xmlName: "w:id",
31908
32064
  sdName: "w:id",
31909
32065
  // We do not translate it from 'w:id' to 'id' when encoding, so the name is the same
31910
32066
  encode: () => {
31911
32067
  },
31912
- decode: decode$6
32068
+ decode: decode$8
31913
32069
  });
31914
- const XML_NODE_NAME$5 = "w:commentRange";
31915
- const SD_NODE_NAME$4 = "commentRange";
31916
- const decode$5 = (params2) => {
32070
+ const XML_NODE_NAME$7 = "w:commentRange";
32071
+ const SD_NODE_NAME$6 = "commentRange";
32072
+ const decode$7 = (params2) => {
31917
32073
  const { node, comments, commentsExportType, exportedCommentDefs } = params2;
31918
32074
  if (!node) return;
31919
32075
  if (!comments) return;
@@ -31956,19 +32112,19 @@ const getCommentSchema = (type2, commentIndex) => {
31956
32112
  };
31957
32113
  };
31958
32114
  const getConfig = (type2) => ({
31959
- xmlName: `${XML_NODE_NAME$5}${type2}`,
31960
- sdNodeOrKeyName: `${SD_NODE_NAME$4}${type2}`,
32115
+ xmlName: `${XML_NODE_NAME$7}${type2}`,
32116
+ sdNodeOrKeyName: `${SD_NODE_NAME$6}${type2}`,
31961
32117
  type: NodeTranslator.translatorTypes.NODE,
31962
32118
  encode: () => {
31963
32119
  },
31964
- decode: decode$5,
32120
+ decode: decode$7,
31965
32121
  attributes: [attrConfig]
31966
32122
  });
31967
32123
  const commentRangeStartTranslator = NodeTranslator.from(getConfig("Start"));
31968
32124
  const commentRangeEndTranslator = NodeTranslator.from(getConfig("End"));
31969
- const XML_NODE_NAME$4 = "sd:pageReference";
31970
- const SD_NODE_NAME$3 = "pageReference";
31971
- const encode$4 = (params2) => {
32125
+ const XML_NODE_NAME$6 = "sd:pageReference";
32126
+ const SD_NODE_NAME$5 = "pageReference";
32127
+ const encode$6 = (params2) => {
31972
32128
  const { nodes = [], nodeListHandler } = params2 || {};
31973
32129
  const node = nodes[0];
31974
32130
  const processedText = nodeListHandler.handler({
@@ -31985,7 +32141,7 @@ const encode$4 = (params2) => {
31985
32141
  };
31986
32142
  return processedNode;
31987
32143
  };
31988
- const decode$4 = (params2) => {
32144
+ const decode$6 = (params2) => {
31989
32145
  const { node } = params2;
31990
32146
  const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
31991
32147
  const contentNodes = (node.content ?? []).flatMap((n) => exportSchemaToJson({ ...params2, node: n }));
@@ -32058,17 +32214,17 @@ const decode$4 = (params2) => {
32058
32214
  ];
32059
32215
  return translated;
32060
32216
  };
32061
- const config$4 = {
32062
- xmlName: XML_NODE_NAME$4,
32063
- sdNodeOrKeyName: SD_NODE_NAME$3,
32217
+ const config$6 = {
32218
+ xmlName: XML_NODE_NAME$6,
32219
+ sdNodeOrKeyName: SD_NODE_NAME$5,
32064
32220
  type: NodeTranslator.translatorTypes.NODE,
32065
- encode: encode$4,
32066
- decode: decode$4
32221
+ encode: encode$6,
32222
+ decode: decode$6
32067
32223
  };
32068
- const translator$4 = NodeTranslator.from(config$4);
32069
- const XML_NODE_NAME$3 = "sd:tableOfContents";
32070
- const SD_NODE_NAME$2 = "tableOfContents";
32071
- const encode$3 = (params2) => {
32224
+ const translator$6 = NodeTranslator.from(config$6);
32225
+ const XML_NODE_NAME$5 = "sd:tableOfContents";
32226
+ const SD_NODE_NAME$4 = "tableOfContents";
32227
+ const encode$5 = (params2) => {
32072
32228
  const { nodes = [], nodeListHandler } = params2 || {};
32073
32229
  const node = nodes[0];
32074
32230
  const processedContent = nodeListHandler.handler({
@@ -32084,7 +32240,7 @@ const encode$3 = (params2) => {
32084
32240
  };
32085
32241
  return processedNode;
32086
32242
  };
32087
- const decode$3 = (params2) => {
32243
+ const decode$5 = (params2) => {
32088
32244
  const { node } = params2;
32089
32245
  const contentNodes = node.content.map((n) => exportSchemaToJson({ ...params2, node: n }));
32090
32246
  const tocBeginElements = [
@@ -32131,6 +32287,194 @@ const decode$3 = (params2) => {
32131
32287
  }
32132
32288
  return contentNodes;
32133
32289
  };
32290
+ const config$5 = {
32291
+ xmlName: XML_NODE_NAME$5,
32292
+ sdNodeOrKeyName: SD_NODE_NAME$4,
32293
+ type: NodeTranslator.translatorTypes.NODE,
32294
+ encode: encode$5,
32295
+ decode: decode$5
32296
+ };
32297
+ const translator$5 = NodeTranslator.from(config$5);
32298
+ const XML_NODE_NAME$4 = "sd:autoPageNumber";
32299
+ const SD_NODE_NAME$3 = "page-number";
32300
+ const encode$4 = (params2) => {
32301
+ const { nodes = [] } = params2 || {};
32302
+ const node = nodes[0];
32303
+ const rPr = node.elements?.find((el) => el.name === "w:rPr");
32304
+ const marks = parseMarks(rPr || { elements: [] });
32305
+ const processedNode = {
32306
+ type: "page-number",
32307
+ attrs: {
32308
+ marksAsAttrs: marks
32309
+ }
32310
+ };
32311
+ return processedNode;
32312
+ };
32313
+ const decode$4 = (params2) => {
32314
+ const { node } = params2;
32315
+ const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
32316
+ const translated = [
32317
+ {
32318
+ name: "w:r",
32319
+ elements: [
32320
+ {
32321
+ name: "w:rPr",
32322
+ elements: outputMarks
32323
+ },
32324
+ {
32325
+ name: "w:fldChar",
32326
+ attributes: {
32327
+ "w:fldCharType": "begin"
32328
+ }
32329
+ }
32330
+ ]
32331
+ },
32332
+ {
32333
+ name: "w:r",
32334
+ elements: [
32335
+ {
32336
+ name: "w:rPr",
32337
+ elements: outputMarks
32338
+ },
32339
+ {
32340
+ name: "w:instrText",
32341
+ attributes: { "xml:space": "preserve" },
32342
+ elements: [
32343
+ {
32344
+ type: "text",
32345
+ text: " PAGE"
32346
+ }
32347
+ ]
32348
+ }
32349
+ ]
32350
+ },
32351
+ {
32352
+ name: "w:r",
32353
+ elements: [
32354
+ {
32355
+ name: "w:rPr",
32356
+ elements: outputMarks
32357
+ },
32358
+ {
32359
+ name: "w:fldChar",
32360
+ attributes: {
32361
+ "w:fldCharType": "separate"
32362
+ }
32363
+ }
32364
+ ]
32365
+ },
32366
+ {
32367
+ name: "w:r",
32368
+ elements: [
32369
+ {
32370
+ name: "w:rPr",
32371
+ elements: outputMarks
32372
+ },
32373
+ {
32374
+ name: "w:fldChar",
32375
+ attributes: {
32376
+ "w:fldCharType": "end"
32377
+ }
32378
+ }
32379
+ ]
32380
+ }
32381
+ ];
32382
+ return translated;
32383
+ };
32384
+ const config$4 = {
32385
+ xmlName: XML_NODE_NAME$4,
32386
+ sdNodeOrKeyName: SD_NODE_NAME$3,
32387
+ type: NodeTranslator.translatorTypes.NODE,
32388
+ encode: encode$4,
32389
+ decode: decode$4
32390
+ };
32391
+ const translator$4 = NodeTranslator.from(config$4);
32392
+ const XML_NODE_NAME$3 = "sd:totalPageNumber";
32393
+ const SD_NODE_NAME$2 = "total-page-number";
32394
+ const encode$3 = (params2) => {
32395
+ const { nodes = [] } = params2 || {};
32396
+ const node = nodes[0];
32397
+ const rPr = node.elements?.find((el) => el.name === "w:rPr");
32398
+ const marks = parseMarks(rPr || { elements: [] });
32399
+ const processedNode = {
32400
+ type: "total-page-number",
32401
+ attrs: {
32402
+ marksAsAttrs: marks
32403
+ }
32404
+ };
32405
+ return processedNode;
32406
+ };
32407
+ const decode$3 = (params2) => {
32408
+ const { node } = params2;
32409
+ const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
32410
+ const translated = [
32411
+ {
32412
+ name: "w:r",
32413
+ elements: [
32414
+ {
32415
+ name: "w:rPr",
32416
+ elements: outputMarks
32417
+ },
32418
+ {
32419
+ name: "w:fldChar",
32420
+ attributes: {
32421
+ "w:fldCharType": "begin"
32422
+ }
32423
+ }
32424
+ ]
32425
+ },
32426
+ {
32427
+ name: "w:r",
32428
+ elements: [
32429
+ {
32430
+ name: "w:rPr",
32431
+ elements: outputMarks
32432
+ },
32433
+ {
32434
+ name: "w:instrText",
32435
+ attributes: { "xml:space": "preserve" },
32436
+ elements: [
32437
+ {
32438
+ type: "text",
32439
+ text: " NUMPAGES"
32440
+ }
32441
+ ]
32442
+ }
32443
+ ]
32444
+ },
32445
+ {
32446
+ name: "w:r",
32447
+ elements: [
32448
+ {
32449
+ name: "w:rPr",
32450
+ elements: outputMarks
32451
+ },
32452
+ {
32453
+ name: "w:fldChar",
32454
+ attributes: {
32455
+ "w:fldCharType": "separate"
32456
+ }
32457
+ }
32458
+ ]
32459
+ },
32460
+ {
32461
+ name: "w:r",
32462
+ elements: [
32463
+ {
32464
+ name: "w:rPr",
32465
+ elements: outputMarks
32466
+ },
32467
+ {
32468
+ name: "w:fldChar",
32469
+ attributes: {
32470
+ "w:fldCharType": "end"
32471
+ }
32472
+ }
32473
+ ]
32474
+ }
32475
+ ];
32476
+ return translated;
32477
+ };
32134
32478
  const config$3 = {
32135
32479
  xmlName: XML_NODE_NAME$3,
32136
32480
  sdNodeOrKeyName: SD_NODE_NAME$2,
@@ -32190,7 +32534,7 @@ function handleVRectImport({ pNode, pict, params: params2 }) {
32190
32534
  if (isHorizontalRule) {
32191
32535
  schemaAttrs.horizontalRule = true;
32192
32536
  }
32193
- const pElement = translator$$.encode({
32537
+ const pElement = translator$11.encode({
32194
32538
  ...params2,
32195
32539
  nodes: [{ ...pNode, elements: pNode.elements.filter((el) => el.name !== "w:r") }]
32196
32540
  });
@@ -32247,7 +32591,7 @@ const handleDrawingNode = (params2) => {
32247
32591
  if (mainNode.name === "w:drawing") node = mainNode;
32248
32592
  else node = mainNode.elements.find((el) => el.name === "w:drawing");
32249
32593
  if (!node) return { nodes: [], consumed: 0 };
32250
- const schemaNode = translator$q.encode(params2);
32594
+ const schemaNode = translator$s.encode(params2);
32251
32595
  const newNodes = schemaNode ? [schemaNode] : [];
32252
32596
  return { nodes: newNodes, consumed: 1 };
32253
32597
  };
@@ -32362,7 +32706,7 @@ const handleTrackChangeNode = (params2) => {
32362
32706
  });
32363
32707
  break;
32364
32708
  case "w:ins":
32365
- result = translator$1u.encode({
32709
+ result = translator$1w.encode({
32366
32710
  ...translatorParams,
32367
32711
  extraParams: {
32368
32712
  ...translatorParams.extraParams,
@@ -32377,8 +32721,8 @@ const trackChangeNodeHandlerEntity = {
32377
32721
  handlerName: "trackChangeNodeHandler",
32378
32722
  handler: handleTrackChangeNode
32379
32723
  };
32380
- const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$_);
32381
- const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$Z);
32724
+ const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$10);
32725
+ const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$$);
32382
32726
  const XML_NODE_NAME$1 = "w:t";
32383
32727
  const SD_NODE_NAME$1 = "text";
32384
32728
  const validXmlAttributes$1 = [createAttributeHandler("xml:space", "xmlSpace")];
@@ -32418,12 +32762,12 @@ const decode$1 = (params2) => {
32418
32762
  case "trackDelete":
32419
32763
  return translator$2.decode(params2);
32420
32764
  case "trackInsert":
32421
- return translator$1u.decode(params2);
32765
+ return translator$1w.decode(params2);
32422
32766
  }
32423
32767
  }
32424
32768
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
32425
32769
  if (isLinkNode && !extraParams?.linkProcessed) {
32426
- return translator$_.decode(params2);
32770
+ return translator$10.decode(params2);
32427
32771
  }
32428
32772
  const { text, marks = [] } = node;
32429
32773
  return getTextNodeForExport(text, marks, params2);
@@ -32465,7 +32809,7 @@ const handleParagraphNode = (params2) => {
32465
32809
  if (nodes.length === 0 || nodes[0].name !== "w:p") {
32466
32810
  return { nodes: [], consumed: 0 };
32467
32811
  }
32468
- const schemaNode = translator$$.encode(params2);
32812
+ const schemaNode = translator$11.encode(params2);
32469
32813
  const newNodes = schemaNode ? [schemaNode] : [];
32470
32814
  return { nodes: newNodes, consumed: 1 };
32471
32815
  };
@@ -32478,7 +32822,7 @@ const handleSdtNode = (params2) => {
32478
32822
  if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
32479
32823
  return { nodes: [], consumed: 0 };
32480
32824
  }
32481
- const result = translator$p.encode(params2);
32825
+ const result = translator$r.encode(params2);
32482
32826
  if (!result) {
32483
32827
  return { nodes: [], consumed: 0 };
32484
32828
  }
@@ -32619,7 +32963,7 @@ const handler = (params2) => {
32619
32963
  if (nodes.length === 0 || nodes[0].name !== "w:br") {
32620
32964
  return { nodes: [], consumed: 0 };
32621
32965
  }
32622
- const result = translator$21.encode(params2);
32966
+ const result = translator$23.encode(params2);
32623
32967
  if (!result) return { nodes: [], consumed: 0 };
32624
32968
  return {
32625
32969
  nodes: [result],
@@ -32691,7 +33035,7 @@ const handleBookmarkStartNode = (params2) => {
32691
33035
  if (isCustomMarkBookmark(nodes[0], params2.editor)) {
32692
33036
  return handleBookmarkNode(params2);
32693
33037
  }
32694
- const node = translator$6.encode(params2);
33038
+ const node = translator$8.encode(params2);
32695
33039
  if (!node) return { nodes: [], consumed: 0 };
32696
33040
  return { nodes: [node], consumed: 1 };
32697
33041
  };
@@ -32723,7 +33067,7 @@ const handleBookmarkEndNode = (params2) => {
32723
33067
  if (!nodes.length || nodes[0].name !== "w:bookmarkEnd") {
32724
33068
  return { nodes: [], consumed: 0 };
32725
33069
  }
32726
- const node = translator$5.encode(params2);
33070
+ const node = translator$7.encode(params2);
32727
33071
  if (!node) return { nodes: [], consumed: 0 };
32728
33072
  return { nodes: [node], consumed: 1 };
32729
33073
  };
@@ -32773,7 +33117,7 @@ const handleAlternateChoice = (params2) => {
32773
33117
  ...currentNode,
32774
33118
  type: "element"
32775
33119
  };
32776
- const translated = translator$1K.encode({
33120
+ const translated = translator$1M.encode({
32777
33121
  ...params2,
32778
33122
  nodes: [nodeForTranslator],
32779
33123
  extraParams: { ...params2.extraParams || {}, node: nodeForTranslator }
@@ -32799,45 +33143,9 @@ const alternateChoiceHandler = {
32799
33143
  handlerName: "alternateChoiceHandler",
32800
33144
  handler: handleAlternateChoice
32801
33145
  };
32802
- const handleAutoPageNumber = (params2) => {
32803
- const { nodes } = params2;
32804
- if (nodes.length === 0 || nodes[0].name !== "sd:autoPageNumber") {
32805
- return { nodes: [], consumed: 0 };
32806
- }
32807
- const rPr = nodes[0].elements?.find((el) => el.name === "w:rPr");
32808
- const marks = parseMarks(rPr || { elements: [] });
32809
- const processedNode = {
32810
- type: "page-number",
32811
- attrs: {
32812
- marksAsAttrs: marks
32813
- }
32814
- };
32815
- return { nodes: [processedNode], consumed: 1 };
32816
- };
32817
- const autoPageHandlerEntity = {
32818
- handlerName: "autoPageNumberHandler",
32819
- handler: handleAutoPageNumber
32820
- };
32821
- const handleAutoTotalPageNumber = (params2) => {
32822
- const { nodes } = params2;
32823
- if (nodes.length === 0 || nodes[0].name !== "sd:totalPageNumber") {
32824
- return { nodes: [], consumed: 0 };
32825
- }
32826
- const rPr = nodes[0].elements?.find((el) => el.name === "w:rPr");
32827
- const marks = parseMarks(rPr || { elements: [] });
32828
- const processedNode = {
32829
- type: "total-page-number",
32830
- attrs: {
32831
- marksAsAttrs: marks
32832
- }
32833
- };
32834
- return { nodes: [processedNode], consumed: 1 };
32835
- };
32836
- const autoTotalPageCountEntity = {
32837
- handlerName: "autoTotalPageCountEntity",
32838
- handler: handleAutoTotalPageNumber
32839
- };
32840
- const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$4);
33146
+ const autoPageHandlerEntity = generateV2HandlerEntity("autoPageNumberHandler", translator$4);
33147
+ const autoTotalPageCountEntity = generateV2HandlerEntity("autoTotalPageCountEntity", translator$3);
33148
+ const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$6);
32841
33149
  const handlePictNode = (params2) => {
32842
33150
  const { nodes } = params2;
32843
33151
  if (!nodes.length || nodes[0].name !== "w:p") {
@@ -33235,15 +33543,15 @@ const handleTabNode = (params2) => {
33235
33543
  if (!nodes.length || nodes[0].name !== "w:tab") {
33236
33544
  return { nodes: [], consumed: 0 };
33237
33545
  }
33238
- const node = translator$1$.encode(params2);
33546
+ const node = translator$21.encode(params2);
33239
33547
  return { nodes: [node], consumed: 1 };
33240
33548
  };
33241
33549
  const tabNodeEntityHandler = {
33242
33550
  handlerName: "w:tabTranslator",
33243
33551
  handler: handleTabNode
33244
33552
  };
33245
- const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$7);
33246
- const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$3);
33553
+ const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$9);
33554
+ const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$5);
33247
33555
  function preProcessPageInstruction(nodesToCombine) {
33248
33556
  const pageNumNode = {
33249
33557
  name: "sd:autoPageNumber",
@@ -34095,7 +34403,7 @@ function translateContentBlock(params2) {
34095
34403
  if (vmlAttributes || horizontalRule) {
34096
34404
  return translateVRectContentBlock(params2);
34097
34405
  }
34098
- const alternateContent = translator$1K.decode(params2);
34406
+ const alternateContent = translator$1M.decode(params2);
34099
34407
  return wrapTextInRun(alternateContent);
34100
34408
  }
34101
34409
  function translateVRectContentBlock(params2) {
@@ -34139,7 +34447,7 @@ function translateVRectContentBlock(params2) {
34139
34447
  const XML_NODE_NAME = "w:pict";
34140
34448
  const SD_NODE_NAME = ["shapeContainer", "contentBlock"];
34141
34449
  const validXmlAttributes = [];
34142
- function encode$Q(params2) {
34450
+ function encode$S(params2) {
34143
34451
  const { node, pNode } = params2.extraParams;
34144
34452
  const { type: pictType, handler: handler2 } = pictNodeTypeStrategy(node);
34145
34453
  if (!handler2 || pictType === "unknown") {
@@ -34171,12 +34479,11 @@ const config = {
34171
34479
  xmlName: XML_NODE_NAME,
34172
34480
  sdNodeOrKeyName: SD_NODE_NAME,
34173
34481
  type: NodeTranslator.translatorTypes.NODE,
34174
- encode: encode$Q,
34482
+ encode: encode$S,
34175
34483
  decode,
34176
34484
  attributes: validXmlAttributes
34177
34485
  };
34178
34486
  const translator = NodeTranslator.from(config);
34179
- const RUN_LEVEL_WRAPPERS = /* @__PURE__ */ new Set(["w:hyperlink", "w:ins", "w:del"]);
34180
34487
  const DEFAULT_SECTION_PROPS_TWIPS = Object.freeze({
34181
34488
  pageSize: Object.freeze({ width: "12240", height: "15840" }),
34182
34489
  pageMargins: Object.freeze({
@@ -34234,64 +34541,25 @@ const ensureSectionLayoutDefaults = (sectPr, converter) => {
34234
34541
  });
34235
34542
  return sectPr;
34236
34543
  };
34237
- function convertSdtContentToRuns(elements) {
34238
- const normalized = Array.isArray(elements) ? elements : [elements];
34239
- const runs = [];
34240
- normalized.forEach((element) => {
34241
- if (!element) return;
34242
- if (element.name === "w:sdtPr") {
34243
- return;
34244
- }
34245
- if (element.name === "w:r") {
34246
- runs.push(element);
34247
- return;
34248
- }
34249
- if (element.name === "w:sdt") {
34250
- const sdtContent = (element.elements || []).find((child) => child?.name === "w:sdtContent");
34251
- if (sdtContent?.elements) {
34252
- runs.push(...convertSdtContentToRuns(sdtContent.elements));
34253
- }
34254
- return;
34255
- }
34256
- if (RUN_LEVEL_WRAPPERS.has(element.name)) {
34257
- const wrapperElements = convertSdtContentToRuns(element.elements || []);
34258
- if (wrapperElements.length) {
34259
- runs.push({
34260
- ...element,
34261
- elements: wrapperElements
34262
- });
34263
- }
34264
- return;
34265
- }
34266
- if (element.name) {
34267
- runs.push({
34268
- name: "w:r",
34269
- type: "element",
34270
- elements: element.elements || [element]
34271
- });
34272
- }
34273
- });
34274
- return runs.filter((run2) => Array.isArray(run2.elements) && run2.elements.length > 0);
34275
- }
34276
34544
  function exportSchemaToJson(params2) {
34277
34545
  const { type: type2 } = params2.node || {};
34278
34546
  const router = {
34279
34547
  doc: translateDocumentNode,
34280
34548
  body: translateBodyNode,
34281
34549
  heading: translateHeadingNode,
34282
- paragraph: translator$$,
34283
- run: translator$Z,
34550
+ paragraph: translator$11,
34551
+ run: translator$$,
34284
34552
  text: translator$1,
34285
- lineBreak: translator$21,
34286
- table: translator$7,
34287
- tableRow: translator$t,
34288
- tableCell: translator$E,
34289
- bookmarkStart: translator$6,
34290
- bookmarkEnd: translator$5,
34291
- fieldAnnotation: translator$p,
34292
- tab: translator$1$,
34293
- image: translator$q,
34294
- hardBreak: translator$21,
34553
+ lineBreak: translator$23,
34554
+ table: translator$9,
34555
+ tableRow: translator$v,
34556
+ tableCell: translator$G,
34557
+ bookmarkStart: translator$8,
34558
+ bookmarkEnd: translator$7,
34559
+ fieldAnnotation: translator$r,
34560
+ tab: translator$21,
34561
+ image: translator$s,
34562
+ hardBreak: translator$23,
34295
34563
  commentRangeStart: commentRangeStartTranslator,
34296
34564
  commentRangeEnd: commentRangeEndTranslator,
34297
34565
  commentReference: () => null,
@@ -34300,14 +34568,14 @@ function exportSchemaToJson(params2) {
34300
34568
  contentBlock: translator,
34301
34569
  vectorShape: translateVectorShape,
34302
34570
  shapeGroup: translateShapeGroup,
34303
- structuredContent: translator$p,
34304
- structuredContentBlock: translator$p,
34305
- documentPartObject: translator$p,
34306
- documentSection: translator$p,
34307
- "page-number": translatePageNumberNode,
34308
- "total-page-number": translateTotalPageNumberNode,
34309
- pageReference: translator$4,
34310
- tableOfContents: translator$3
34571
+ structuredContent: translator$r,
34572
+ structuredContentBlock: translator$r,
34573
+ documentPartObject: translator$r,
34574
+ documentSection: translator$r,
34575
+ "page-number": translator$4,
34576
+ "total-page-number": translator$3,
34577
+ pageReference: translator$6,
34578
+ tableOfContents: translator$5
34311
34579
  };
34312
34580
  let handler2 = router[type2];
34313
34581
  if (handler2 && "decode" in handler2 && typeof handler2.decode === "function") {
@@ -34379,57 +34647,7 @@ function translateHeadingNode(params2) {
34379
34647
  // Maps to Heading1, Heading2, etc. in Word
34380
34648
  }
34381
34649
  };
34382
- return translateParagraphNode({ ...params2, node: paragraphNode });
34383
- }
34384
- function translateParagraphNode(params2) {
34385
- const elements = translateChildNodes(params2);
34386
- const htmlAnnotationChild = elements.find((element) => element.name === "htmlAnnotation");
34387
- if (htmlAnnotationChild) {
34388
- return htmlAnnotationChild.elements;
34389
- }
34390
- const pPr = generateParagraphProperties(params2);
34391
- if (pPr) elements.unshift(pPr);
34392
- let attributes = {};
34393
- if (params2.node.attrs?.rsidRDefault) {
34394
- attributes["w:rsidRDefault"] = params2.node.attrs.rsidRDefault;
34395
- }
34396
- const result = {
34397
- name: "w:p",
34398
- elements,
34399
- attributes
34400
- };
34401
- return result;
34402
- }
34403
- function generateParagraphProperties(params2) {
34404
- const { node } = params2;
34405
- const { attrs = {} } = node;
34406
- const paragraphProperties = carbonCopy(attrs.paragraphProperties || {});
34407
- if (attrs.styleId !== paragraphProperties.styleId) {
34408
- paragraphProperties.styleId = attrs.styleId;
34409
- }
34410
- ["borders", "styleId", "indent", "textAlign", "keepLines", "keepNext", "spacing", "tabStops"].forEach((key2) => {
34411
- let propKey = key2 === "textAlign" ? "justification" : key2;
34412
- if (JSON.stringify(paragraphProperties[propKey]) !== JSON.stringify(attrs[key2])) {
34413
- paragraphProperties[key2] = attrs[key2];
34414
- }
34415
- });
34416
- const framePr = attrs.dropcap;
34417
- if (framePr) {
34418
- framePr.dropCap = framePr.type;
34419
- delete framePr.type;
34420
- }
34421
- if (JSON.stringify(paragraphProperties.framePr) !== JSON.stringify(framePr)) {
34422
- paragraphProperties.framePr = framePr;
34423
- }
34424
- const marksProps = decodeRPrFromMarks(attrs.marksAttrs || []);
34425
- const finalRunProps = combineRunProperties([paragraphProperties.runProperties || {}, marksProps]);
34426
- paragraphProperties.runProperties = finalRunProps;
34427
- const pPr = translator$10.decode({ node: { ...node, attrs: { paragraphProperties } } });
34428
- const sectPr = node.attrs?.paragraphProperties?.sectPr;
34429
- if (sectPr) {
34430
- pPr.elements.push(sectPr);
34431
- }
34432
- return pPr;
34650
+ return translator$11.decode({ ...params2, node: paragraphNode });
34433
34651
  }
34434
34652
  function translateDocumentNode(params2) {
34435
34653
  const bodyNode = {
@@ -34444,59 +34662,6 @@ function translateDocumentNode(params2) {
34444
34662
  };
34445
34663
  return [node, params2];
34446
34664
  }
34447
- function getTextNodeForExport(text, marks, params2) {
34448
- const hasLeadingOrTrailingSpace = /^\s|\s$/.test(text);
34449
- const space = hasLeadingOrTrailingSpace ? "preserve" : null;
34450
- const nodeAttrs = space ? { "xml:space": space } : null;
34451
- const textNodes = [];
34452
- const textRunProperties = decodeRPrFromMarks(marks || []);
34453
- const parentRunProperties = params2.extraParams?.runProperties || {};
34454
- const combinedRunProperties = combineRunProperties([parentRunProperties, textRunProperties]);
34455
- const rPrNode = translator$1L.decode({ node: { attrs: { runProperties: combinedRunProperties } } });
34456
- textNodes.push({
34457
- name: "w:t",
34458
- elements: [{ text, type: "text" }],
34459
- attributes: nodeAttrs
34460
- });
34461
- if (params2) {
34462
- const { editor } = params2;
34463
- const customMarks = editor.extensionService.extensions.filter((e) => e.isExternal === true);
34464
- marks.forEach((mark) => {
34465
- const isCustomMark = customMarks.some((customMark) => {
34466
- const customMarkName = customMark.name;
34467
- return mark.type === customMarkName;
34468
- });
34469
- if (!isCustomMark) return;
34470
- let attrsString = "";
34471
- Object.entries(mark.attrs).forEach(([key2, value]) => {
34472
- if (value) {
34473
- attrsString += `${key2}=${value};`;
34474
- }
34475
- });
34476
- if (isCustomMark) {
34477
- textNodes.unshift({
34478
- type: "element",
34479
- name: "w:bookmarkStart",
34480
- attributes: {
34481
- "w:id": "5000",
34482
- "w:name": mark.type + ";" + attrsString
34483
- }
34484
- });
34485
- textNodes.push({
34486
- type: "element",
34487
- name: "w:bookmarkEnd",
34488
- attributes: {
34489
- "w:id": "5000"
34490
- }
34491
- });
34492
- }
34493
- });
34494
- }
34495
- return {
34496
- name: "w:r",
34497
- elements: rPrNode ? [rPrNode, ...textNodes] : textNodes
34498
- };
34499
- }
34500
34665
  function wrapTextInRun(nodeOrNodes, marks) {
34501
34666
  let elements = [];
34502
34667
  if (Array.isArray(nodeOrNodes)) elements = nodeOrNodes;
@@ -34525,60 +34690,6 @@ function processOutputMarks(marks = []) {
34525
34690
  }
34526
34691
  });
34527
34692
  }
34528
- function processLinkContentNode(node) {
34529
- if (!node) return node;
34530
- const contentNode = carbonCopy(node);
34531
- if (!contentNode) return contentNode;
34532
- const hyperlinkStyle = {
34533
- name: "w:rStyle",
34534
- attributes: { "w:val": "Hyperlink" }
34535
- };
34536
- const color = {
34537
- name: "w:color",
34538
- attributes: { "w:val": "467886" }
34539
- };
34540
- const underline = {
34541
- name: "w:u",
34542
- attributes: {
34543
- "w:val": "none"
34544
- }
34545
- };
34546
- if (contentNode.name === "w:r") {
34547
- const runProps = contentNode.elements.find((el) => el.name === "w:rPr");
34548
- if (runProps) {
34549
- const foundColor = runProps.elements.find((el) => el.name === "w:color");
34550
- const foundHyperlinkStyle = runProps.elements.find((el) => el.name === "w:rStyle");
34551
- const underlineMark = runProps.elements.find((el) => el.name === "w:u");
34552
- if (!foundColor) runProps.elements.unshift(color);
34553
- if (!foundHyperlinkStyle) runProps.elements.unshift(hyperlinkStyle);
34554
- if (!underlineMark) runProps.elements.unshift(underline);
34555
- } else {
34556
- const runProps2 = {
34557
- name: "w:rPr",
34558
- elements: [hyperlinkStyle, color]
34559
- };
34560
- contentNode.elements.unshift(runProps2);
34561
- }
34562
- }
34563
- return contentNode;
34564
- }
34565
- function addNewLinkRelationship(params2, link) {
34566
- const newId = "rId" + generateDocxRandomId();
34567
- if (!params2.relationships || !Array.isArray(params2.relationships)) {
34568
- params2.relationships = [];
34569
- }
34570
- params2.relationships.push({
34571
- type: "element",
34572
- name: "Relationship",
34573
- attributes: {
34574
- Id: newId,
34575
- Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
34576
- Target: link,
34577
- TargetMode: "External"
34578
- }
34579
- });
34580
- return newId;
34581
- }
34582
34693
  function translateMark(mark) {
34583
34694
  const xmlMark = SuperConverter.markTypes.find((m2) => m2.type === mark.type);
34584
34695
  if (!xmlMark) {
@@ -34605,7 +34716,7 @@ function translateMark(mark) {
34605
34716
  markElement.type = "element";
34606
34717
  break;
34607
34718
  case "underline": {
34608
- const translated = translator$1X.decode({
34719
+ const translated = translator$1Z.decode({
34609
34720
  node: {
34610
34721
  attrs: {
34611
34722
  underlineType: attrs.underlineType ?? attrs.underline ?? null,
@@ -34669,7 +34780,7 @@ function translateMark(mark) {
34669
34780
  break;
34670
34781
  case "highlight": {
34671
34782
  const highlightValue = attrs.color ?? attrs.highlight ?? null;
34672
- const translated = translator$20.decode({ node: { attrs: { highlight: highlightValue } } });
34783
+ const translated = translator$22.decode({ node: { attrs: { highlight: highlightValue } } });
34673
34784
  return translated || {};
34674
34785
  }
34675
34786
  case "strike":
@@ -34751,82 +34862,6 @@ generateXml_fn = function(node) {
34751
34862
  if (!selfClosing) tags.push(`</${name}>`);
34752
34863
  return tags;
34753
34864
  };
34754
- const translatePageNumberNode = (params2) => {
34755
- const outputMarks = processOutputMarks(params2.node.attrs?.marksAsAttrs || []);
34756
- return getAutoPageJson("PAGE", outputMarks);
34757
- };
34758
- const translateTotalPageNumberNode = (params2) => {
34759
- const outputMarks = processOutputMarks(params2.node.attrs?.marksAsAttrs || []);
34760
- return getAutoPageJson("NUMPAGES", outputMarks);
34761
- };
34762
- const getAutoPageJson = (type2, outputMarks = []) => {
34763
- return [
34764
- {
34765
- name: "w:r",
34766
- elements: [
34767
- {
34768
- name: "w:rPr",
34769
- elements: outputMarks
34770
- },
34771
- {
34772
- name: "w:fldChar",
34773
- attributes: {
34774
- "w:fldCharType": "begin"
34775
- }
34776
- }
34777
- ]
34778
- },
34779
- {
34780
- name: "w:r",
34781
- elements: [
34782
- {
34783
- name: "w:rPr",
34784
- elements: outputMarks
34785
- },
34786
- {
34787
- name: "w:instrText",
34788
- attributes: { "xml:space": "preserve" },
34789
- elements: [
34790
- {
34791
- type: "text",
34792
- text: ` ${type2}`
34793
- }
34794
- ]
34795
- }
34796
- ]
34797
- },
34798
- {
34799
- name: "w:r",
34800
- elements: [
34801
- {
34802
- name: "w:rPr",
34803
- elements: outputMarks
34804
- },
34805
- {
34806
- name: "w:fldChar",
34807
- attributes: {
34808
- "w:fldCharType": "separate"
34809
- }
34810
- }
34811
- ]
34812
- },
34813
- {
34814
- name: "w:r",
34815
- elements: [
34816
- {
34817
- name: "w:rPr",
34818
- elements: outputMarks
34819
- },
34820
- {
34821
- name: "w:fldChar",
34822
- attributes: {
34823
- "w:fldCharType": "end"
34824
- }
34825
- }
34826
- ]
34827
- }
34828
- ];
34829
- };
34830
34865
  const prepareCommentParaIds = (comment) => {
34831
34866
  const newComment = {
34832
34867
  ...comment,
@@ -34835,7 +34870,7 @@ const prepareCommentParaIds = (comment) => {
34835
34870
  return newComment;
34836
34871
  };
34837
34872
  const getCommentDefinition = (comment, commentId, allComments, editor) => {
34838
- const translatedText = translateParagraphNode({ editor, node: comment.commentJSON });
34873
+ const translatedText = translator$11.decode({ editor, node: comment.commentJSON });
34839
34874
  const attributes = {
34840
34875
  "w:id": String(commentId),
34841
34876
  "w:author": comment.creatorName || comment.importedAuthor?.name,
@@ -35250,7 +35285,7 @@ const _SuperConverter = class _SuperConverter2 {
35250
35285
  static getStoredSuperdocVersion(docx) {
35251
35286
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
35252
35287
  }
35253
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.31.0-next.3") {
35288
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.31.0-next.5") {
35254
35289
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
35255
35290
  }
35256
35291
  /**
@@ -52510,7 +52545,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
52510
52545
  { default: remarkStringify },
52511
52546
  { default: remarkGfm }
52512
52547
  ] = await Promise.all([
52513
- import("./index-B74saKaW-CeHVjvs8.es.js"),
52548
+ import("./index-B7dC-H-Q-BeQx_MXI.es.js"),
52514
52549
  import("./index-DRCvimau-Cw339678.es.js"),
52515
52550
  import("./index-C_x_N6Uh-DJn8hIEt.es.js"),
52516
52551
  import("./index-D_sWOSiG-DE96TaT5.es.js"),
@@ -52711,7 +52746,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
52711
52746
  * Process collaboration migrations
52712
52747
  */
52713
52748
  processCollaborationMigrations() {
52714
- console.debug("[checkVersionMigrations] Current editor version", "0.31.0-next.3");
52749
+ console.debug("[checkVersionMigrations] Current editor version", "0.31.0-next.5");
52715
52750
  if (!this.options.ydoc) return;
52716
52751
  const metaMap = this.options.ydoc.getMap("meta");
52717
52752
  let docVersion = metaMap.get("version");
@@ -91540,92 +91575,92 @@ const _sfc_main = {
91540
91575
  };
91541
91576
  const SuperInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4d5cff52"]]);
91542
91577
  const additionalHandlers = Object.freeze({
91543
- "mc:AlternateContent": translator$1K,
91544
- "sd:pageReference": translator$4,
91545
- "sd:tableOfContents": translator$3,
91546
- "w:b": translator$1_,
91547
- "w:bCs": translator$1Z,
91548
- "w:bidiVisual": translator$o,
91549
- "w:bookmarkEnd": translator$5,
91550
- "w:bookmarkStart": translator$6,
91551
- "w:bottom": translator$1n,
91552
- "w:br": translator$21,
91553
- "w:cantSplit": translator$D,
91554
- "w:caps": translator$1P,
91555
- "w:cnfStyle": translator$1F,
91556
- "w:color": translator$1U,
91557
- "w:divId": translator$1D,
91558
- "w:drawing": translator$q,
91559
- "w:end": translator$V,
91560
- "w:gridAfter": translator$C,
91561
- "w:gridBefore": translator$B,
91562
- "w:gridCol": translator$9,
91563
- "w:hidden": translator$A,
91564
- "w:highlight": translator$20,
91565
- "w:hyperlink": translator$_,
91566
- "w:i": translator$1Y,
91567
- "w:insideH": translator$T,
91568
- "w:insideV": translator$S,
91569
- "w:jc": translator$1A,
91570
- "w:left": translator$1l,
91571
- "w:p": translator$$,
91572
- "w:r": translator$Z,
91573
- "w:rFonts": translator$1T,
91574
- "w:rPr": translator$1L,
91575
- "w:rStyle": translator$1S,
91576
- "w:right": translator$1j,
91577
- "w:sdt": translator$p,
91578
- "w:shd": translator$1O,
91579
- "w:start": translator$R,
91580
- "w:strike": translator$1W,
91581
- "w:sz": translator$1R,
91582
- "w:szCs": translator$1Q,
91583
- "w:tab": translator$1$,
91584
- "w:tbl": translator$7,
91585
- "w:tblBorders": translator$c,
91586
- "w:tblCaption": translator$n,
91587
- "w:tblCellMar": translator$b,
91588
- "w:tblCellSpacing": translator$z,
91589
- "w:tblDescription": translator$m,
91590
- "w:tblGrid": translator$8,
91591
- "w:tblHeader": translator$y,
91592
- "w:tblInd": translator$l,
91593
- "w:tblLayout": translator$k,
91594
- "w:tblLook": translator$j,
91595
- "w:tblOverlap": translator$i,
91596
- "w:tblPr": translator$a,
91597
- "w:tblStyle": translator$h,
91598
- "w:tblStyleColBandSize": translator$g,
91599
- "w:tblStyleRowBandSize": translator$f,
91600
- "w:tblW": translator$e,
91601
- "w:tblpPr": translator$d,
91602
- "w:tc": translator$E,
91603
- "w:top": translator$1h,
91604
- "w:tr": translator$t,
91605
- "w:trHeight": translator$x,
91606
- "w:trPr": translator$u,
91607
- "w:u": translator$1X,
91608
- "w:wAfter": translator$w,
91609
- "w:wBefore": translator$v,
91610
- "wp:anchor": translator$s,
91611
- "wp:inline": translator$r,
91578
+ "mc:AlternateContent": translator$1M,
91579
+ "sd:pageReference": translator$6,
91580
+ "sd:tableOfContents": translator$5,
91581
+ "w:b": translator$20,
91582
+ "w:bCs": translator$1$,
91583
+ "w:bidiVisual": translator$q,
91584
+ "w:bookmarkEnd": translator$7,
91585
+ "w:bookmarkStart": translator$8,
91586
+ "w:bottom": translator$1p,
91587
+ "w:br": translator$23,
91588
+ "w:cantSplit": translator$F,
91589
+ "w:caps": translator$1R,
91590
+ "w:cnfStyle": translator$1H,
91591
+ "w:color": translator$1W,
91592
+ "w:divId": translator$1F,
91593
+ "w:drawing": translator$s,
91594
+ "w:end": translator$X,
91595
+ "w:gridAfter": translator$E,
91596
+ "w:gridBefore": translator$D,
91597
+ "w:gridCol": translator$b,
91598
+ "w:hidden": translator$C,
91599
+ "w:highlight": translator$22,
91600
+ "w:hyperlink": translator$10,
91601
+ "w:i": translator$1_,
91602
+ "w:insideH": translator$V,
91603
+ "w:insideV": translator$U,
91604
+ "w:jc": translator$1C,
91605
+ "w:left": translator$1n,
91606
+ "w:p": translator$11,
91607
+ "w:r": translator$$,
91608
+ "w:rFonts": translator$1V,
91609
+ "w:rPr": translator$1N,
91610
+ "w:rStyle": translator$1U,
91611
+ "w:right": translator$1l,
91612
+ "w:sdt": translator$r,
91613
+ "w:shd": translator$1Q,
91614
+ "w:start": translator$T,
91615
+ "w:strike": translator$1Y,
91616
+ "w:sz": translator$1T,
91617
+ "w:szCs": translator$1S,
91618
+ "w:tab": translator$21,
91619
+ "w:tbl": translator$9,
91620
+ "w:tblBorders": translator$e,
91621
+ "w:tblCaption": translator$p,
91622
+ "w:tblCellMar": translator$d,
91623
+ "w:tblCellSpacing": translator$B,
91624
+ "w:tblDescription": translator$o,
91625
+ "w:tblGrid": translator$a,
91626
+ "w:tblHeader": translator$A,
91627
+ "w:tblInd": translator$n,
91628
+ "w:tblLayout": translator$m,
91629
+ "w:tblLook": translator$l,
91630
+ "w:tblOverlap": translator$k,
91631
+ "w:tblPr": translator$c,
91632
+ "w:tblStyle": translator$j,
91633
+ "w:tblStyleColBandSize": translator$i,
91634
+ "w:tblStyleRowBandSize": translator$h,
91635
+ "w:tblW": translator$g,
91636
+ "w:tblpPr": translator$f,
91637
+ "w:tc": translator$G,
91638
+ "w:top": translator$1j,
91639
+ "w:tr": translator$v,
91640
+ "w:trHeight": translator$z,
91641
+ "w:trPr": translator$w,
91642
+ "w:u": translator$1Z,
91643
+ "w:wAfter": translator$y,
91644
+ "w:wBefore": translator$x,
91645
+ "wp:anchor": translator$u,
91646
+ "wp:inline": translator$t,
91612
91647
  "w:commentRangeStart": commentRangeStartTranslator,
91613
91648
  "w:commentRangeEnd": commentRangeEndTranslator,
91614
- "w:vMerge": translator$W,
91615
- "w:gridSpan": translator$X,
91616
- "w:vAlign": translator$J,
91617
- "w:noWrap": translator$M,
91618
- "w:tcFitText": translator$K,
91619
- "w:tcW": translator$Y,
91620
- "w:hideMark": translator$I,
91621
- "w:textDirection": translator$15,
91622
- "w:tl2br": translator$P,
91623
- "w:tr2bl": translator$O,
91624
- "w:header": translator$H,
91625
- "w:headers": translator$G,
91626
- "w:tcBorders": translator$N,
91627
- "w:tcMar": translator$L,
91628
- "w:tcPr": translator$F
91649
+ "w:vMerge": translator$Y,
91650
+ "w:gridSpan": translator$Z,
91651
+ "w:vAlign": translator$L,
91652
+ "w:noWrap": translator$O,
91653
+ "w:tcFitText": translator$M,
91654
+ "w:tcW": translator$_,
91655
+ "w:hideMark": translator$K,
91656
+ "w:textDirection": translator$17,
91657
+ "w:tl2br": translator$R,
91658
+ "w:tr2bl": translator$Q,
91659
+ "w:header": translator$J,
91660
+ "w:headers": translator$I,
91661
+ "w:tcBorders": translator$P,
91662
+ "w:tcMar": translator$N,
91663
+ "w:tcPr": translator$H
91629
91664
  });
91630
91665
  const baseHandlers = {
91631
91666
  ...additionalHandlers