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
@@ -15406,19 +15406,6 @@ const hasSomeParentWithClass = (element, classname) => {
15406
15406
  if (element.className?.split(" ")?.indexOf(classname) >= 0) return true;
15407
15407
  return element.parentNode && hasSomeParentWithClass(element.parentNode, classname);
15408
15408
  };
15409
- function generateDocxRandomId(length = 8) {
15410
- const max2 = 2147483647;
15411
- const value = Math.floor(Math.random() * (max2 + 1));
15412
- return value.toString(16).padStart(length, "0").slice(0, length);
15413
- }
15414
- function generateRandomSigned32BitIntStrId() {
15415
- const val = Math.floor(Math.random() * 2147483647);
15416
- return val.toString();
15417
- }
15418
- function generateRandom32BitHex() {
15419
- const val = Math.floor(Math.random() * 2147483647);
15420
- return val.toString(16).toUpperCase().padStart(8, "0");
15421
- }
15422
15409
  const DEFAULT_DOCX_DEFS = {
15423
15410
  "xmlns:wpc": "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
15424
15411
  "xmlns:cx": "http://schemas.microsoft.com/office/drawing/2014/chartex",
@@ -16624,15 +16611,6 @@ const COMMENTS_XML_DEFINITIONS = {
16624
16611
  DOCUMENT_RELS_XML_DEF,
16625
16612
  CONTENT_TYPES
16626
16613
  };
16627
- const carbonCopy = (obj) => {
16628
- if (!obj) return void 0;
16629
- try {
16630
- return JSON.parse(JSON.stringify(obj));
16631
- } catch (e) {
16632
- console.error("Error in carbonCopy", obj, e);
16633
- return void 0;
16634
- }
16635
- };
16636
16614
  function translateChildNodes(params) {
16637
16615
  const { content: nodes } = params.node;
16638
16616
  if (!nodes) return [];
@@ -18042,37 +18020,37 @@ const _NodeTranslator = class _NodeTranslator {
18042
18020
  /** @type {typeof TranslatorTypes} */
18043
18021
  __publicField(_NodeTranslator, "translatorTypes", TranslatorTypes);
18044
18022
  let NodeTranslator = _NodeTranslator;
18045
- const encode$P = (attributes) => {
18023
+ const encode$R = (attributes) => {
18046
18024
  return attributes["w:type"];
18047
18025
  };
18048
- const decode$R = (attrs) => {
18026
+ const decode$T = (attrs) => {
18049
18027
  const { lineBreakType } = attrs;
18050
18028
  return lineBreakType;
18051
18029
  };
18052
18030
  const attrConfig$s = Object.freeze({
18053
18031
  xmlName: "w:type",
18054
18032
  sdName: "lineBreakType",
18055
- encode: encode$P,
18056
- decode: decode$R
18033
+ encode: encode$R,
18034
+ decode: decode$T
18057
18035
  });
18058
- const encode$O = (attributes) => {
18036
+ const encode$Q = (attributes) => {
18059
18037
  const xmlAttrValue = attributes["w:clear"];
18060
18038
  return xmlAttrValue;
18061
18039
  };
18062
- const decode$Q = (attrs) => {
18040
+ const decode$S = (attrs) => {
18063
18041
  const { clear } = attrs;
18064
18042
  return clear;
18065
18043
  };
18066
18044
  const attrConfig$r = Object.freeze({
18067
18045
  xmlName: "w:clear",
18068
18046
  sdName: "clear",
18069
- encode: encode$O,
18070
- decode: decode$Q
18047
+ encode: encode$Q,
18048
+ decode: decode$S
18071
18049
  });
18072
18050
  const validXmlAttributes$j = [attrConfig$s, attrConfig$r];
18073
- const XML_NODE_NAME$o = "w:br";
18074
- const SD_NODE_NAME$i = "lineBreak";
18075
- const encode$N = (_2, encodedAttrs) => {
18051
+ const XML_NODE_NAME$q = "w:br";
18052
+ const SD_NODE_NAME$k = "lineBreak";
18053
+ const encode$P = (_2, encodedAttrs) => {
18076
18054
  const isPageBreak = encodedAttrs?.lineBreakType === "page";
18077
18055
  const translated = {
18078
18056
  type: isPageBreak ? "hardBreak" : "lineBreak"
@@ -18082,7 +18060,7 @@ const encode$N = (_2, encodedAttrs) => {
18082
18060
  }
18083
18061
  return translated;
18084
18062
  };
18085
- const decode$P = (params, decodedAttrs) => {
18063
+ const decode$R = (params, decodedAttrs) => {
18086
18064
  const { node } = params;
18087
18065
  if (!node) return;
18088
18066
  const wBreak = { name: "w:br" };
@@ -18099,39 +18077,39 @@ const decode$P = (params, decodedAttrs) => {
18099
18077
  };
18100
18078
  return translated;
18101
18079
  };
18102
- const config$n = {
18103
- xmlName: XML_NODE_NAME$o,
18104
- sdNodeOrKeyName: SD_NODE_NAME$i,
18080
+ const config$p = {
18081
+ xmlName: XML_NODE_NAME$q,
18082
+ sdNodeOrKeyName: SD_NODE_NAME$k,
18105
18083
  type: NodeTranslator.translatorTypes.NODE,
18106
- encode: encode$N,
18107
- decode: decode$P,
18084
+ encode: encode$P,
18085
+ decode: decode$R,
18108
18086
  attributes: validXmlAttributes$j
18109
18087
  };
18110
- const translator$21 = NodeTranslator.from(config$n);
18111
- const encode$M = (attributes) => attributes?.["w:val"];
18112
- const decode$O = (attrs) => attrs?.highlight;
18088
+ const translator$23 = NodeTranslator.from(config$p);
18089
+ const encode$O = (attributes) => attributes?.["w:val"];
18090
+ const decode$Q = (attrs) => attrs?.highlight;
18113
18091
  const attrConfig$q = Object.freeze({
18114
18092
  xmlName: "w:val",
18115
18093
  sdName: "highlight",
18116
- encode: encode$M,
18117
- decode: decode$O
18094
+ encode: encode$O,
18095
+ decode: decode$Q
18118
18096
  });
18119
18097
  const validXmlAttributes$i = [attrConfig$q];
18120
- const XML_NODE_NAME$n = "w:highlight";
18098
+ const XML_NODE_NAME$p = "w:highlight";
18121
18099
  const SD_ATTR_KEY$4 = "highlight";
18122
18100
  const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
18123
- const encode$L = (params, encodedAttrs = {}) => {
18101
+ const encode$N = (params, encodedAttrs = {}) => {
18124
18102
  const { nodes } = params;
18125
18103
  const node = nodes?.[0];
18126
18104
  const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
18127
18105
  return {
18128
18106
  type: "attr",
18129
- xmlName: XML_NODE_NAME$n,
18107
+ xmlName: XML_NODE_NAME$p,
18130
18108
  sdNodeOrKeyName: SD_ATTR_KEY$4,
18131
18109
  attributes: { "w:val": value ?? null }
18132
18110
  };
18133
18111
  };
18134
- const decode$N = (params) => {
18112
+ const decode$P = (params) => {
18135
18113
  const attrs = params?.node?.attrs || {};
18136
18114
  const highlightValue = attrs.highlight?.["w:val"] ?? attrs.highlight ?? attrs.color ?? null;
18137
18115
  if (!highlightValue) return void 0;
@@ -18139,14 +18117,14 @@ const decode$N = (params) => {
18139
18117
  if (!normalizedValue) return void 0;
18140
18118
  if (DISABLED_TOKENS.has(normalizedValue)) {
18141
18119
  return {
18142
- name: XML_NODE_NAME$n,
18120
+ name: XML_NODE_NAME$p,
18143
18121
  attributes: { "w:val": "none" }
18144
18122
  };
18145
18123
  }
18146
18124
  const keyword = getDocxHighlightKeywordFromHex(highlightValue);
18147
18125
  if (keyword) {
18148
18126
  return {
18149
- name: XML_NODE_NAME$n,
18127
+ name: XML_NODE_NAME$p,
18150
18128
  attributes: { "w:val": keyword }
18151
18129
  };
18152
18130
  }
@@ -18161,64 +18139,64 @@ const decode$N = (params) => {
18161
18139
  }
18162
18140
  };
18163
18141
  };
18164
- const config$m = {
18165
- xmlName: XML_NODE_NAME$n,
18142
+ const config$o = {
18143
+ xmlName: XML_NODE_NAME$p,
18166
18144
  sdNodeOrKeyName: SD_ATTR_KEY$4,
18167
18145
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
18168
- encode: encode$L,
18169
- decode: decode$N,
18146
+ encode: encode$N,
18147
+ decode: decode$P,
18170
18148
  attributes: validXmlAttributes$i
18171
18149
  };
18172
- const translator$20 = NodeTranslator.from(config$m);
18173
- const encode$K = (attributes) => {
18150
+ const translator$22 = NodeTranslator.from(config$o);
18151
+ const encode$M = (attributes) => {
18174
18152
  return attributes["w:val"];
18175
18153
  };
18176
- const decode$M = (attrs) => {
18154
+ const decode$O = (attrs) => {
18177
18155
  const { tabType } = attrs || {};
18178
18156
  return tabType;
18179
18157
  };
18180
18158
  const attrConfig$p = Object.freeze({
18181
18159
  xmlName: "w:val",
18182
18160
  sdName: "tabType",
18183
- encode: encode$K,
18184
- decode: decode$M
18161
+ encode: encode$M,
18162
+ decode: decode$O
18185
18163
  });
18186
- const encode$J = (attributes) => {
18164
+ const encode$L = (attributes) => {
18187
18165
  return attributes["w:leader"];
18188
18166
  };
18189
- const decode$L = (attrs) => {
18167
+ const decode$N = (attrs) => {
18190
18168
  const { leader } = attrs || {};
18191
18169
  return leader;
18192
18170
  };
18193
18171
  const attrConfig$o = Object.freeze({
18194
18172
  xmlName: "w:leader",
18195
18173
  sdName: "leader",
18196
- encode: encode$J,
18197
- decode: decode$L
18174
+ encode: encode$L,
18175
+ decode: decode$N
18198
18176
  });
18199
- const encode$I = (attributes) => {
18177
+ const encode$K = (attributes) => {
18200
18178
  if (attributes["w:pos"] != null) return parseInt(attributes["w:pos"]);
18201
18179
  return null;
18202
18180
  };
18203
- const decode$K = (attrs) => {
18181
+ const decode$M = (attrs) => {
18204
18182
  const { pos } = attrs || {};
18205
18183
  return pos?.toString();
18206
18184
  };
18207
18185
  const attrConfig$n = Object.freeze({
18208
18186
  xmlName: "w:pos",
18209
18187
  sdName: "pos",
18210
- encode: encode$I,
18211
- decode: decode$K
18188
+ encode: encode$K,
18189
+ decode: decode$M
18212
18190
  });
18213
18191
  const validXmlAttributes$h = [attrConfig$p, attrConfig$n, attrConfig$o];
18214
- const XML_NODE_NAME$m = "w:tab";
18215
- const SD_NODE_NAME$h = "tab";
18216
- const encode$H = (_2, encodedAttrs = {}) => {
18192
+ const XML_NODE_NAME$o = "w:tab";
18193
+ const SD_NODE_NAME$j = "tab";
18194
+ const encode$J = (_2, encodedAttrs = {}) => {
18217
18195
  const translated = { type: "tab" };
18218
18196
  if (encodedAttrs) translated.attrs = { ...encodedAttrs };
18219
18197
  return translated;
18220
18198
  };
18221
- function decode$J(params, decodedAttrs = {}) {
18199
+ function decode$L(params, decodedAttrs = {}) {
18222
18200
  const { node } = params || {};
18223
18201
  if (!node) return;
18224
18202
  const wTab = { name: "w:tab", elements: [] };
@@ -18240,15 +18218,24 @@ function decode$J(params, decodedAttrs = {}) {
18240
18218
  }
18241
18219
  return translated;
18242
18220
  }
18243
- const config$l = {
18244
- xmlName: XML_NODE_NAME$m,
18245
- sdNodeOrKeyName: SD_NODE_NAME$h,
18221
+ const config$n = {
18222
+ xmlName: XML_NODE_NAME$o,
18223
+ sdNodeOrKeyName: SD_NODE_NAME$j,
18246
18224
  type: NodeTranslator.translatorTypes.NODE,
18247
- encode: encode$H,
18248
- decode: decode$J,
18225
+ encode: encode$J,
18226
+ decode: decode$L,
18249
18227
  attributes: validXmlAttributes$h
18250
18228
  };
18251
- const translator$1$ = NodeTranslator.from(config$l);
18229
+ const translator$21 = NodeTranslator.from(config$n);
18230
+ const carbonCopy = (obj) => {
18231
+ if (!obj) return void 0;
18232
+ try {
18233
+ return JSON.parse(JSON.stringify(obj));
18234
+ } catch (e) {
18235
+ console.error("Error in carbonCopy", obj, e);
18236
+ return void 0;
18237
+ }
18238
+ };
18252
18239
  const mergeTextNodes = (nodes) => {
18253
18240
  if (!nodes || !Array.isArray(nodes)) {
18254
18241
  return nodes;
@@ -18565,53 +18552,53 @@ const integerToString = (value) => {
18565
18552
  const intValue = parseInteger(value);
18566
18553
  return intValue != void 0 ? String(intValue) : void 0;
18567
18554
  };
18568
- const translator$1_ = NodeTranslator.from(createSingleBooleanPropertyHandler("w:b", "bold"));
18569
- const translator$1Z = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bCs", "boldCs"));
18570
- const translator$1Y = NodeTranslator.from(createSingleBooleanPropertyHandler("w:i", "italic"));
18571
- const encode$G = (attributes) => attributes?.["w:val"];
18572
- const decode$I = (attrs) => attrs?.underline;
18555
+ const translator$20 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:b", "bold"));
18556
+ const translator$1$ = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bCs", "boldCs"));
18557
+ const translator$1_ = NodeTranslator.from(createSingleBooleanPropertyHandler("w:i", "italic"));
18558
+ const encode$I = (attributes) => attributes?.["w:val"];
18559
+ const decode$K = (attrs) => attrs?.underline;
18573
18560
  const attrConfig$m = Object.freeze({
18574
18561
  xmlName: "w:val",
18575
18562
  sdName: "underline",
18576
- encode: encode$G,
18577
- decode: decode$I
18563
+ encode: encode$I,
18564
+ decode: decode$K
18578
18565
  });
18579
- const encode$F = (attributes) => attributes?.["w:color"];
18580
- const decode$H = (attrs) => attrs?.color;
18566
+ const encode$H = (attributes) => attributes?.["w:color"];
18567
+ const decode$J = (attrs) => attrs?.color;
18581
18568
  const attrConfig$l = Object.freeze({
18582
18569
  xmlName: "w:color",
18583
18570
  sdName: "color",
18584
- encode: encode$F,
18585
- decode: decode$H
18571
+ encode: encode$H,
18572
+ decode: decode$J
18586
18573
  });
18587
- const encode$E = (attributes) => attributes?.["w:themeColor"];
18588
- const decode$G = (attrs) => attrs?.themeColor;
18574
+ const encode$G = (attributes) => attributes?.["w:themeColor"];
18575
+ const decode$I = (attrs) => attrs?.themeColor;
18589
18576
  const attrConfig$k = Object.freeze({
18590
18577
  xmlName: "w:themeColor",
18591
18578
  sdName: "themeColor",
18592
- encode: encode$E,
18593
- decode: decode$G
18579
+ encode: encode$G,
18580
+ decode: decode$I
18594
18581
  });
18595
- const encode$D = (attributes) => attributes?.["w:themeTint"];
18596
- const decode$F = (attrs) => attrs?.themeTint;
18582
+ const encode$F = (attributes) => attributes?.["w:themeTint"];
18583
+ const decode$H = (attrs) => attrs?.themeTint;
18597
18584
  const attrConfig$j = Object.freeze({
18598
18585
  xmlName: "w:themeTint",
18599
18586
  sdName: "themeTint",
18600
- encode: encode$D,
18601
- decode: decode$F
18587
+ encode: encode$F,
18588
+ decode: decode$H
18602
18589
  });
18603
- const encode$C = (attributes) => attributes?.["w:themeShade"];
18604
- const decode$E = (attrs) => attrs?.themeShade;
18590
+ const encode$E = (attributes) => attributes?.["w:themeShade"];
18591
+ const decode$G = (attrs) => attrs?.themeShade;
18605
18592
  const attrConfig$i = Object.freeze({
18606
18593
  xmlName: "w:themeShade",
18607
18594
  sdName: "themeShade",
18608
- encode: encode$C,
18609
- decode: decode$E
18595
+ encode: encode$E,
18596
+ decode: decode$G
18610
18597
  });
18611
18598
  const validXmlAttributes$g = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j, attrConfig$i];
18612
- const XML_NODE_NAME$l = "w:u";
18599
+ const XML_NODE_NAME$n = "w:u";
18613
18600
  const SD_ATTR_KEY$3 = "underline";
18614
- const encode$B = (params, encodedAttrs = {}) => {
18601
+ const encode$D = (params, encodedAttrs = {}) => {
18615
18602
  const { nodes } = params;
18616
18603
  const node = nodes?.[0];
18617
18604
  const sourceAttrs = node?.attributes || {};
@@ -18627,12 +18614,12 @@ const encode$B = (params, encodedAttrs = {}) => {
18627
18614
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
18628
18615
  return {
18629
18616
  type: "attr",
18630
- xmlName: XML_NODE_NAME$l,
18617
+ xmlName: XML_NODE_NAME$n,
18631
18618
  sdNodeOrKeyName: SD_ATTR_KEY$3,
18632
18619
  attributes
18633
18620
  };
18634
18621
  };
18635
- const decode$D = (params) => {
18622
+ const decode$F = (params) => {
18636
18623
  const attrs = params?.node?.attrs?.underline || params?.node?.attrs || {};
18637
18624
  const underlineType = attrs.underlineType ?? attrs.underline ?? attrs["w:val"] ?? null;
18638
18625
  const color = attrs.underlineColor ?? attrs.color ?? attrs["w:color"] ?? null;
@@ -18650,22 +18637,22 @@ const decode$D = (params) => {
18650
18637
  if (themeTint) attributes["w:themeTint"] = themeTint;
18651
18638
  if (themeShade) attributes["w:themeShade"] = themeShade;
18652
18639
  return {
18653
- name: XML_NODE_NAME$l,
18640
+ name: XML_NODE_NAME$n,
18654
18641
  attributes
18655
18642
  };
18656
18643
  };
18657
- const config$k = {
18658
- xmlName: XML_NODE_NAME$l,
18644
+ const config$m = {
18645
+ xmlName: XML_NODE_NAME$n,
18659
18646
  sdNodeOrKeyName: SD_ATTR_KEY$3,
18660
18647
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
18661
- encode: encode$B,
18662
- decode: decode$D,
18648
+ encode: encode$D,
18649
+ decode: decode$F,
18663
18650
  attributes: validXmlAttributes$g
18664
18651
  };
18665
- const translator$1X = NodeTranslator.from(config$k);
18666
- const translator$1W = NodeTranslator.from(createSingleBooleanPropertyHandler("w:strike"));
18667
- const translator$1V = NodeTranslator.from(createSingleBooleanPropertyHandler("w:dstrike"));
18668
- const translator$1U = NodeTranslator.from({
18652
+ const translator$1Z = NodeTranslator.from(config$m);
18653
+ const translator$1Y = NodeTranslator.from(createSingleBooleanPropertyHandler("w:strike"));
18654
+ const translator$1X = NodeTranslator.from(createSingleBooleanPropertyHandler("w:dstrike"));
18655
+ const translator$1W = NodeTranslator.from({
18669
18656
  xmlName: "w:color",
18670
18657
  sdNodeOrKeyName: "color",
18671
18658
  attributes: [
@@ -18682,7 +18669,7 @@ const translator$1U = NodeTranslator.from({
18682
18669
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18683
18670
  }
18684
18671
  });
18685
- const translator$1T = NodeTranslator.from({
18672
+ const translator$1V = NodeTranslator.from({
18686
18673
  xmlName: "w:rFonts",
18687
18674
  sdNodeOrKeyName: "fontFamily",
18688
18675
  attributes: [
@@ -18713,16 +18700,16 @@ const translator$1T = NodeTranslator.from({
18713
18700
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18714
18701
  }
18715
18702
  });
18716
- const translator$1S = NodeTranslator.from(createSingleAttrPropertyHandler("w:rStyle", "styleId"));
18717
- const translator$1R = NodeTranslator.from(createSingleIntegerPropertyHandler("w:sz", "fontSize"));
18718
- const translator$1Q = NodeTranslator.from(createSingleIntegerPropertyHandler("w:szCs", "fontSizeCs"));
18719
- const translator$1P = NodeTranslator.from({
18703
+ const translator$1U = NodeTranslator.from(createSingleAttrPropertyHandler("w:rStyle", "styleId"));
18704
+ const translator$1T = NodeTranslator.from(createSingleIntegerPropertyHandler("w:sz", "fontSize"));
18705
+ const translator$1S = NodeTranslator.from(createSingleIntegerPropertyHandler("w:szCs", "fontSizeCs"));
18706
+ const translator$1R = NodeTranslator.from({
18720
18707
  xmlName: "w:caps",
18721
18708
  sdNodeOrKeyName: "textTransform",
18722
18709
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1") ? "uppercase" : "none",
18723
18710
  decode: ({ node }) => node.attrs["textTransform"] != null ? { name: "w:caps", attributes: { "w:val": booleanToString(node.attrs["textTransform"] === "uppercase") } } : void 0
18724
18711
  });
18725
- const translator$1O = NodeTranslator.from({
18712
+ const translator$1Q = NodeTranslator.from({
18726
18713
  xmlName: "w:shd",
18727
18714
  sdNodeOrKeyName: "shading",
18728
18715
  attributes: [
@@ -18744,7 +18731,7 @@ const translator$1O = NodeTranslator.from({
18744
18731
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18745
18732
  }
18746
18733
  });
18747
- const translator$1N = NodeTranslator.from({
18734
+ const translator$1P = NodeTranslator.from({
18748
18735
  xmlName: "w:lang",
18749
18736
  sdNodeOrKeyName: "lang",
18750
18737
  attributes: [createAttributeHandler("w:val"), createAttributeHandler("w:eastAsia"), createAttributeHandler("w:bidi")],
@@ -18756,26 +18743,26 @@ const translator$1N = NodeTranslator.from({
18756
18743
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18757
18744
  }
18758
18745
  });
18759
- const translator$1M = NodeTranslator.from(createSingleIntegerPropertyHandler("w:spacing", "letterSpacing"));
18746
+ const translator$1O = NodeTranslator.from(createSingleIntegerPropertyHandler("w:spacing", "letterSpacing"));
18760
18747
  const propertyTranslators$b = [
18748
+ translator$20,
18749
+ translator$1$,
18761
18750
  translator$1_,
18762
18751
  translator$1Z,
18763
18752
  translator$1Y,
18764
18753
  translator$1X,
18765
18754
  translator$1W,
18755
+ translator$22,
18766
18756
  translator$1V,
18767
18757
  translator$1U,
18768
- translator$20,
18769
18758
  translator$1T,
18770
18759
  translator$1S,
18771
18760
  translator$1R,
18772
18761
  translator$1Q,
18773
18762
  translator$1P,
18774
- translator$1O,
18775
- translator$1N,
18776
- translator$1M
18763
+ translator$1O
18777
18764
  ];
18778
- const translator$1L = NodeTranslator.from(
18765
+ const translator$1N = NodeTranslator.from(
18779
18766
  createNestedPropertiesTranslator("w:rPr", "runProperties", propertyTranslators$b)
18780
18767
  );
18781
18768
  const SUPPORTED_ALTERNATE_CONTENT_REQUIRES = /* @__PURE__ */ new Set([
@@ -18792,10 +18779,10 @@ const SUPPORTED_ALTERNATE_CONTENT_REQUIRES = /* @__PURE__ */ new Set([
18792
18779
  "w16sdtfl",
18793
18780
  "w16se"
18794
18781
  ]);
18795
- const XML_NODE_NAME$k = "mc:AlternateContent";
18796
- const SD_NODE_NAME$g = [];
18782
+ const XML_NODE_NAME$m = "mc:AlternateContent";
18783
+ const SD_NODE_NAME$i = [];
18797
18784
  const validXmlAttributes$f = [];
18798
- function encode$A(params) {
18785
+ function encode$C(params) {
18799
18786
  const { nodeListHandler } = params;
18800
18787
  const { node } = params.extraParams;
18801
18788
  if (!node || !node.type) {
@@ -18811,7 +18798,7 @@ function encode$A(params) {
18811
18798
  path: buildPath(params.path, node, branch)
18812
18799
  });
18813
18800
  }
18814
- function decode$C(params) {
18801
+ function decode$E(params) {
18815
18802
  const { node } = params;
18816
18803
  const { drawingContent } = node.attrs;
18817
18804
  const drawing = {
@@ -18828,12 +18815,12 @@ function decode$C(params) {
18828
18815
  elements: [choice]
18829
18816
  };
18830
18817
  }
18831
- const config$j = {
18832
- xmlName: XML_NODE_NAME$k,
18833
- sdNodeOrKeyName: SD_NODE_NAME$g,
18818
+ const config$l = {
18819
+ xmlName: XML_NODE_NAME$m,
18820
+ sdNodeOrKeyName: SD_NODE_NAME$i,
18834
18821
  type: NodeTranslator.translatorTypes.NODE,
18835
- encode: encode$A,
18836
- decode: decode$C,
18822
+ encode: encode$C,
18823
+ decode: decode$E,
18837
18824
  attributes: validXmlAttributes$f
18838
18825
  };
18839
18826
  function selectAlternateContentElements(node) {
@@ -18857,18 +18844,18 @@ function selectAlternateContentElements(node) {
18857
18844
  elements: carbonCopy(selectedElements)
18858
18845
  };
18859
18846
  }
18860
- const translator$1K = NodeTranslator.from(config$j);
18847
+ const translator$1M = NodeTranslator.from(config$l);
18861
18848
  function buildPath(existingPath = [], node, branch) {
18862
18849
  const path = [...existingPath];
18863
18850
  if (node) path.push(node);
18864
18851
  if (branch) path.push(branch);
18865
18852
  return path;
18866
18853
  }
18867
- const translator$1J = NodeTranslator.from(createSingleBooleanPropertyHandler("w:adjustRightInd"));
18868
- const translator$1I = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDE"));
18869
- const translator$1H = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDN"));
18870
- const translator$1G = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bidi", "rightToLeft"));
18871
- const translator$1F = NodeTranslator.from({
18854
+ const translator$1L = NodeTranslator.from(createSingleBooleanPropertyHandler("w:adjustRightInd"));
18855
+ const translator$1K = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDE"));
18856
+ const translator$1J = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDN"));
18857
+ const translator$1I = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bidi", "rightToLeft"));
18858
+ const translator$1H = NodeTranslator.from({
18872
18859
  xmlName: "w:cnfStyle",
18873
18860
  sdNodeOrKeyName: "cnfStyle",
18874
18861
  attributes: [
@@ -18894,9 +18881,9 @@ const translator$1F = NodeTranslator.from({
18894
18881
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18895
18882
  }
18896
18883
  });
18897
- const translator$1E = NodeTranslator.from(createSingleBooleanPropertyHandler("w:contextualSpacing"));
18898
- const translator$1D = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
18899
- const translator$1C = NodeTranslator.from({
18884
+ const translator$1G = NodeTranslator.from(createSingleBooleanPropertyHandler("w:contextualSpacing"));
18885
+ const translator$1F = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
18886
+ const translator$1E = NodeTranslator.from({
18900
18887
  xmlName: "w:framePr",
18901
18888
  sdNodeOrKeyName: "framePr",
18902
18889
  attributes: [
@@ -18924,7 +18911,7 @@ const translator$1C = NodeTranslator.from({
18924
18911
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18925
18912
  }
18926
18913
  });
18927
- const translator$1B = NodeTranslator.from({
18914
+ const translator$1D = NodeTranslator.from({
18928
18915
  xmlName: "w:ind",
18929
18916
  sdNodeOrKeyName: "indent",
18930
18917
  attributes: [
@@ -18949,12 +18936,12 @@ const translator$1B = NodeTranslator.from({
18949
18936
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18950
18937
  }
18951
18938
  });
18952
- const translator$1A = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
18953
- const translator$1z = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepLines"));
18954
- const translator$1y = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepNext"));
18955
- const translator$1x = NodeTranslator.from(createSingleBooleanPropertyHandler("w:kinsoku"));
18956
- const translator$1w = NodeTranslator.from(createSingleBooleanPropertyHandler("w:mirrorIndents"));
18957
- const translator$1v = NodeTranslator.from(createSingleIntegerPropertyHandler("w:ilvl"));
18939
+ const translator$1C = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
18940
+ const translator$1B = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepLines"));
18941
+ const translator$1A = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepNext"));
18942
+ const translator$1z = NodeTranslator.from(createSingleBooleanPropertyHandler("w:kinsoku"));
18943
+ const translator$1y = NodeTranslator.from(createSingleBooleanPropertyHandler("w:mirrorIndents"));
18944
+ const translator$1x = NodeTranslator.from(createSingleIntegerPropertyHandler("w:ilvl"));
18958
18945
  const createTrackStyleMark = (marks) => {
18959
18946
  const trackStyleMark = marks.find((mark) => mark.type === "trackFormat");
18960
18947
  if (trackStyleMark) {
@@ -18972,7 +18959,7 @@ const createTrackStyleMark = (marks) => {
18972
18959
  }
18973
18960
  return void 0;
18974
18961
  };
18975
- const XML_NODE_NAME$j = "w:ins";
18962
+ const XML_NODE_NAME$l = "w:ins";
18976
18963
  const SD_ATTR_KEY$2 = "trackInsert";
18977
18964
  const validXmlAttributes$e = [
18978
18965
  createAttributeHandler("w:id", "id"),
@@ -18980,7 +18967,7 @@ const validXmlAttributes$e = [
18980
18967
  createAttributeHandler("w:author", "author"),
18981
18968
  createAttributeHandler("w:authorEmail", "authorEmail")
18982
18969
  ];
18983
- const encode$z = (params, encodedAttrs = {}) => {
18970
+ const encode$B = (params, encodedAttrs = {}) => {
18984
18971
  const { nodeListHandler, extraParams = {} } = params;
18985
18972
  const { node } = extraParams;
18986
18973
  const subs = nodeListHandler.handler({
@@ -18996,7 +18983,7 @@ const encode$z = (params, encodedAttrs = {}) => {
18996
18983
  });
18997
18984
  return subs;
18998
18985
  };
18999
- function decode$B(params) {
18986
+ function decode$D(params) {
19000
18987
  const { node } = params;
19001
18988
  if (!node || !node.type) {
19002
18989
  return null;
@@ -19021,50 +19008,50 @@ function decode$B(params) {
19021
19008
  elements: [translatedTextNode]
19022
19009
  };
19023
19010
  }
19024
- const config$i = {
19025
- xmlName: XML_NODE_NAME$j,
19011
+ const config$k = {
19012
+ xmlName: XML_NODE_NAME$l,
19026
19013
  sdNodeOrKeyName: SD_ATTR_KEY$2,
19027
19014
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
19028
- encode: encode$z,
19029
- decode: decode$B,
19015
+ encode: encode$B,
19016
+ decode: decode$D,
19030
19017
  attributes: validXmlAttributes$e
19031
19018
  };
19032
- const translator$1u = NodeTranslator.from(config$i);
19033
- const translator$1t = NodeTranslator.from(createSingleIntegerPropertyHandler("w:numId"));
19034
- const propertyTranslators$a = [translator$1K, translator$1v, translator$1u, translator$1t];
19035
- const translator$1s = NodeTranslator.from(
19019
+ const translator$1w = NodeTranslator.from(config$k);
19020
+ const translator$1v = NodeTranslator.from(createSingleIntegerPropertyHandler("w:numId"));
19021
+ const propertyTranslators$a = [translator$1M, translator$1x, translator$1w, translator$1v];
19022
+ const translator$1u = NodeTranslator.from(
19036
19023
  createNestedPropertiesTranslator("w:numPr", "numberingProperties", propertyTranslators$a)
19037
19024
  );
19038
- const translator$1r = NodeTranslator.from(
19025
+ const translator$1t = NodeTranslator.from(
19039
19026
  createSingleAttrPropertyHandler("w:outlineLvl", "outlineLvl", "w:val", parseInteger, integerToString)
19040
19027
  );
19041
- const translator$1q = NodeTranslator.from(createSingleBooleanPropertyHandler("w:overflowPunct"));
19042
- const translator$1p = NodeTranslator.from(createBorderPropertyHandler("w:bar"));
19043
- const translator$1o = NodeTranslator.from(createBorderPropertyHandler("w:between"));
19044
- const translator$1n = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
19045
- const translator$1m = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
19046
- const translator$1l = NodeTranslator.from(createBorderPropertyHandler("w:left"));
19047
- const translator$1k = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
19048
- const translator$1j = NodeTranslator.from(createBorderPropertyHandler("w:right"));
19049
- const translator$1i = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
19050
- const translator$1h = NodeTranslator.from(createBorderPropertyHandler("w:top"));
19051
- const translator$1g = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
19028
+ const translator$1s = NodeTranslator.from(createSingleBooleanPropertyHandler("w:overflowPunct"));
19029
+ const translator$1r = NodeTranslator.from(createBorderPropertyHandler("w:bar"));
19030
+ const translator$1q = NodeTranslator.from(createBorderPropertyHandler("w:between"));
19031
+ const translator$1p = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
19032
+ const translator$1o = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
19033
+ const translator$1n = NodeTranslator.from(createBorderPropertyHandler("w:left"));
19034
+ const translator$1m = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
19035
+ const translator$1l = NodeTranslator.from(createBorderPropertyHandler("w:right"));
19036
+ const translator$1k = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
19037
+ const translator$1j = NodeTranslator.from(createBorderPropertyHandler("w:top"));
19038
+ const translator$1i = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
19052
19039
  const propertyTranslators$9 = [
19053
- translator$1K,
19040
+ translator$1M,
19041
+ translator$1r,
19042
+ translator$1q,
19054
19043
  translator$1p,
19055
- translator$1o,
19056
19044
  translator$1n,
19057
19045
  translator$1l,
19058
- translator$1j,
19059
- translator$1h
19046
+ translator$1j
19060
19047
  ];
19061
- const translator$1f = NodeTranslator.from(
19048
+ const translator$1h = NodeTranslator.from(
19062
19049
  createNestedPropertiesTranslator("w:pBdr", "borders", propertyTranslators$9)
19063
19050
  );
19064
- const translator$1e = NodeTranslator.from(createSingleAttrPropertyHandler("w:pStyle", "styleId"));
19065
- const translator$1d = NodeTranslator.from(createSingleBooleanPropertyHandler("w:pageBreakBefore"));
19066
- const translator$1c = NodeTranslator.from(createSingleBooleanPropertyHandler("w:snapToGrid"));
19067
- const translator$1b = NodeTranslator.from({
19051
+ const translator$1g = NodeTranslator.from(createSingleAttrPropertyHandler("w:pStyle", "styleId"));
19052
+ const translator$1f = NodeTranslator.from(createSingleBooleanPropertyHandler("w:pageBreakBefore"));
19053
+ const translator$1e = NodeTranslator.from(createSingleBooleanPropertyHandler("w:snapToGrid"));
19054
+ const translator$1d = NodeTranslator.from({
19068
19055
  xmlName: "w:spacing",
19069
19056
  sdNodeOrKeyName: "spacing",
19070
19057
  attributes: [
@@ -19085,20 +19072,22 @@ const translator$1b = NodeTranslator.from({
19085
19072
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
19086
19073
  }
19087
19074
  });
19088
- const translator$1a = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressAutoHyphens"));
19089
- const translator$19 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressLineNumbers"));
19090
- const translator$18 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressOverlap"));
19091
- const propertyTranslators$8 = [translator$1K, translator$1$];
19092
- const translator$17 = NodeTranslator.from(
19075
+ const translator$1c = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressAutoHyphens"));
19076
+ const translator$1b = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressLineNumbers"));
19077
+ const translator$1a = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressOverlap"));
19078
+ const propertyTranslators$8 = [translator$1M, translator$21];
19079
+ const translator$19 = NodeTranslator.from(
19093
19080
  createNestedArrayPropertyHandler("w:tabs", "tabStops", propertyTranslators$8, { skipRun: true })
19094
19081
  );
19095
- const translator$16 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textAlignment"));
19096
- const translator$15 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
19097
- const translator$14 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textboxTightWrap"));
19098
- const translator$13 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:topLinePunct"));
19099
- const translator$12 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:widowControl"));
19100
- const translator$11 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:wordWrap"));
19082
+ const translator$18 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textAlignment"));
19083
+ const translator$17 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
19084
+ const translator$16 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textboxTightWrap"));
19085
+ const translator$15 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:topLinePunct"));
19086
+ const translator$14 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:widowControl"));
19087
+ const translator$13 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:wordWrap"));
19101
19088
  const propertyTranslators$7 = [
19089
+ translator$1M,
19090
+ translator$1L,
19102
19091
  translator$1K,
19103
19092
  translator$1J,
19104
19093
  translator$1I,
@@ -19112,15 +19101,15 @@ const propertyTranslators$7 = [
19112
19101
  translator$1A,
19113
19102
  translator$1z,
19114
19103
  translator$1y,
19115
- translator$1x,
19116
- translator$1w,
19104
+ translator$1u,
19105
+ translator$1t,
19117
19106
  translator$1s,
19118
- translator$1r,
19119
- translator$1q,
19107
+ translator$1h,
19108
+ translator$1g,
19120
19109
  translator$1f,
19110
+ translator$1Q,
19121
19111
  translator$1e,
19122
19112
  translator$1d,
19123
- translator$1O,
19124
19113
  translator$1c,
19125
19114
  translator$1b,
19126
19115
  translator$1a,
@@ -19131,11 +19120,9 @@ const propertyTranslators$7 = [
19131
19120
  translator$15,
19132
19121
  translator$14,
19133
19122
  translator$13,
19134
- translator$12,
19135
- translator$11,
19136
- translator$1L
19123
+ translator$1N
19137
19124
  ];
19138
- const translator$10 = NodeTranslator.from(
19125
+ const translator$12 = NodeTranslator.from(
19139
19126
  createNestedPropertiesTranslator("w:pPr", "paragraphProperties", propertyTranslators$7)
19140
19127
  );
19141
19128
  function getUnderlineCssString({ type: type2 = "single", color = null, thickness = null, approximate = true } = {}) {
@@ -19204,12 +19191,12 @@ function getUnderlineCssString({ type: type2 = "single", color = null, thickness
19204
19191
  }
19205
19192
  const resolveRunProperties = (params, inlineRpr, resolvedPpr, isListNumber = false, numberingDefinedInline = false) => {
19206
19193
  const paragraphStyleId = resolvedPpr?.styleId;
19207
- const paragraphStyleProps = resolveStyleChain(params, paragraphStyleId, translator$1L);
19208
- const defaultProps = getDefaultProperties(params, translator$1L);
19209
- const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params, "Normal", translator$1L);
19194
+ const paragraphStyleProps = resolveStyleChain(params, paragraphStyleId, translator$1N);
19195
+ const defaultProps = getDefaultProperties(params, translator$1N);
19196
+ const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params, "Normal", translator$1N);
19210
19197
  let runStyleProps = {};
19211
19198
  if (!paragraphStyleId?.startsWith("TOC")) {
19212
- runStyleProps = inlineRpr.styleId ? resolveStyleChain(params, inlineRpr.styleId, translator$1L) : {};
19199
+ runStyleProps = inlineRpr.styleId ? resolveStyleChain(params, inlineRpr.styleId, translator$1N) : {};
19213
19200
  }
19214
19201
  let styleChain;
19215
19202
  if (isNormalDefault) {
@@ -19224,7 +19211,7 @@ const resolveRunProperties = (params, inlineRpr, resolvedPpr, isListNumber = fal
19224
19211
  params,
19225
19212
  resolvedPpr.numberingProperties.ilvl ?? 0,
19226
19213
  resolvedPpr.numberingProperties.numId,
19227
- translator$1L
19214
+ translator$1N
19228
19215
  );
19229
19216
  }
19230
19217
  if (!numberingDefinedInline) {
@@ -19241,10 +19228,10 @@ const resolveRunProperties = (params, inlineRpr, resolvedPpr, isListNumber = fal
19241
19228
  return finalProps;
19242
19229
  };
19243
19230
  function resolveParagraphProperties(params, inlineProps, insideTable = false, overrideInlineStyleId = false) {
19244
- const defaultProps = getDefaultProperties(params, translator$10);
19245
- const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params, "Normal", translator$10);
19231
+ const defaultProps = getDefaultProperties(params, translator$12);
19232
+ const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params, "Normal", translator$12);
19246
19233
  let styleId = inlineProps?.styleId;
19247
- let styleProps = inlineProps?.styleId ? resolveStyleChain(params, inlineProps?.styleId, translator$10) : {};
19234
+ let styleProps = inlineProps?.styleId ? resolveStyleChain(params, inlineProps?.styleId, translator$12) : {};
19248
19235
  let numberingProps = {};
19249
19236
  let ilvl = inlineProps?.numberingProperties?.ilvl ?? styleProps?.numberingProperties?.ilvl;
19250
19237
  const numId = inlineProps?.numberingProperties?.numId ?? styleProps?.numberingProperties?.numId;
@@ -19252,10 +19239,10 @@ function resolveParagraphProperties(params, inlineProps, insideTable = false, ov
19252
19239
  const isList2 = numId != null;
19253
19240
  if (isList2) {
19254
19241
  ilvl = ilvl != null ? ilvl : 0;
19255
- numberingProps = getNumberingProperties(params, ilvl, numId, translator$10);
19242
+ numberingProps = getNumberingProperties(params, ilvl, numId, translator$12);
19256
19243
  if (overrideInlineStyleId && numberingProps.styleId) {
19257
19244
  styleId = numberingProps.styleId;
19258
- styleProps = resolveStyleChain(params, styleId, translator$10);
19245
+ styleProps = resolveStyleChain(params, styleId, translator$12);
19259
19246
  if (inlineProps) {
19260
19247
  inlineProps.styleId = styleId;
19261
19248
  if (styleProps.numberingProperties?.ilvl === inlineProps.numberingProperties?.ilvl && styleProps.numberingProperties?.numId === inlineProps.numberingProperties?.numId) {
@@ -19277,7 +19264,7 @@ function resolveParagraphProperties(params, inlineProps, insideTable = false, ov
19277
19264
  if (numberingDefinedInline) {
19278
19265
  indentChain = [...defaultsChain, styleProps, numberingProps, inlineProps];
19279
19266
  } else {
19280
- styleProps = resolveStyleChain(params, styleId, translator$10, false);
19267
+ styleProps = resolveStyleChain(params, styleId, translator$12, false);
19281
19268
  indentChain = [...defaultsChain, numberingProps, styleProps, inlineProps];
19282
19269
  }
19283
19270
  } else {
@@ -19385,7 +19372,7 @@ function getNumberingProperties(params, ilvl, numId, translator2, tries = 0) {
19385
19372
  const numStyleLink = listDefinitionForThisNumId.elements?.find((item) => item.name === "w:numStyleLink");
19386
19373
  const styleId = numStyleLink?.attributes?.["w:val"];
19387
19374
  if (styleId && tries < 1) {
19388
- const { properties: styleProps } = getStyleProperties(params, styleId, translator$10);
19375
+ const { properties: styleProps } = getStyleProperties(params, styleId, translator$12);
19389
19376
  if (styleProps?.numberingProperties?.numId) {
19390
19377
  return getNumberingProperties(params, ilvl, styleProps.numberingProperties.numId, translator2, tries + 1);
19391
19378
  }
@@ -19920,7 +19907,7 @@ function handleStyleChangeMarksV2(rPrChange, currentMarks, params) {
19920
19907
  let submarks = [];
19921
19908
  const rPr = rPrChange.elements?.find((el) => el.name === "w:rPr");
19922
19909
  if (rPr) {
19923
- const runProperties = translator$1L.encode({ ...params, nodes: [rPr] });
19910
+ const runProperties = translator$1N.encode({ ...params, nodes: [rPr] });
19924
19911
  submarks = encodeMarksFromRPr(runProperties, params?.docx);
19925
19912
  }
19926
19913
  return [{ type: TrackFormatMarkName, attrs: { ...mappedAttributes, before: submarks, after: [...currentMarks] } }];
@@ -20029,7 +20016,7 @@ const handleParagraphNode$1 = (params) => {
20029
20016
  const pPr = node.elements?.find((el) => el.name === "w:pPr");
20030
20017
  let inlineParagraphProperties = {};
20031
20018
  if (pPr) {
20032
- inlineParagraphProperties = translator$10.encode({ ...params, nodes: [pPr] }) || {};
20019
+ inlineParagraphProperties = translator$12.encode({ ...params, nodes: [pPr] }) || {};
20033
20020
  }
20034
20021
  const insideTable = (params.path || []).some((ancestor) => ancestor.name === "w:tc");
20035
20022
  const resolvedParagraphProperties = resolveParagraphProperties(params, inlineParagraphProperties, insideTable);
@@ -20082,89 +20069,139 @@ const handleParagraphNode$1 = (params) => {
20082
20069
  }
20083
20070
  return schemaNode;
20084
20071
  };
20085
- const encode$y = (attributes) => {
20072
+ function generateParagraphProperties(params) {
20073
+ const { node } = params;
20074
+ const { attrs = {} } = node;
20075
+ const paragraphProperties = carbonCopy(attrs.paragraphProperties || {});
20076
+ if (attrs.styleId !== paragraphProperties.styleId) {
20077
+ paragraphProperties.styleId = attrs.styleId;
20078
+ }
20079
+ ["borders", "styleId", "indent", "textAlign", "keepLines", "keepNext", "spacing", "tabStops"].forEach((key) => {
20080
+ let propKey = key === "textAlign" ? "justification" : key;
20081
+ if (JSON.stringify(paragraphProperties[propKey]) !== JSON.stringify(attrs[key])) {
20082
+ paragraphProperties[propKey] = attrs[key];
20083
+ }
20084
+ });
20085
+ const framePr = attrs.dropcap;
20086
+ if (framePr) {
20087
+ framePr.dropCap = framePr.type;
20088
+ delete framePr.type;
20089
+ }
20090
+ if (JSON.stringify(paragraphProperties.framePr) !== JSON.stringify(framePr)) {
20091
+ paragraphProperties.framePr = framePr;
20092
+ }
20093
+ const marksProps = decodeRPrFromMarks(attrs.marksAttrs || []);
20094
+ const finalRunProps = combineRunProperties([paragraphProperties.runProperties || {}, marksProps]);
20095
+ paragraphProperties.runProperties = finalRunProps;
20096
+ const pPr = translator$12.decode({ node: { ...node, attrs: { paragraphProperties } } });
20097
+ const sectPr = node.attrs?.paragraphProperties?.sectPr;
20098
+ if (sectPr) {
20099
+ pPr.elements.push(sectPr);
20100
+ }
20101
+ return pPr;
20102
+ }
20103
+ function translateParagraphNode(params) {
20104
+ const elements = translateChildNodes(params);
20105
+ const htmlAnnotationChild = elements.find((element) => element.name === "htmlAnnotation");
20106
+ if (htmlAnnotationChild) {
20107
+ return htmlAnnotationChild.elements;
20108
+ }
20109
+ const pPr = generateParagraphProperties(params);
20110
+ if (pPr) elements.unshift(pPr);
20111
+ let attributes = {};
20112
+ if (params.node.attrs?.rsidRDefault) {
20113
+ attributes["w:rsidRDefault"] = params.node.attrs.rsidRDefault;
20114
+ }
20115
+ const result = {
20116
+ name: "w:p",
20117
+ elements,
20118
+ attributes
20119
+ };
20120
+ return result;
20121
+ }
20122
+ const encode$A = (attributes) => {
20086
20123
  return attributes["w:rsidDel"];
20087
20124
  };
20088
- const decode$A = (attrs) => {
20125
+ const decode$C = (attrs) => {
20089
20126
  return attrs.rsidDel;
20090
20127
  };
20091
20128
  const attrConfig$h = Object.freeze({
20092
20129
  xmlName: "w:rsidDel",
20093
20130
  sdName: "rsidDel",
20094
- encode: encode$y,
20095
- decode: decode$A
20131
+ encode: encode$A,
20132
+ decode: decode$C
20096
20133
  });
20097
- const encode$x = (attributes) => {
20134
+ const encode$z = (attributes) => {
20098
20135
  return attributes["w:rsidP"];
20099
20136
  };
20100
- const decode$z = (attrs) => {
20137
+ const decode$B = (attrs) => {
20101
20138
  return attrs.rsidP;
20102
20139
  };
20103
20140
  const attrConfig$g = Object.freeze({
20104
20141
  xmlName: "w:rsidP",
20105
20142
  sdName: "rsidP",
20106
- encode: encode$x,
20107
- decode: decode$z
20143
+ encode: encode$z,
20144
+ decode: decode$B
20108
20145
  });
20109
- const encode$w = (attributes) => {
20146
+ const encode$y = (attributes) => {
20110
20147
  return attributes["w:rsidR"];
20111
20148
  };
20112
- const decode$y = (attrs) => {
20149
+ const decode$A = (attrs) => {
20113
20150
  return attrs.rsidR;
20114
20151
  };
20115
20152
  const attrConfig$f = Object.freeze({
20116
20153
  xmlName: "w:rsidR",
20117
20154
  sdName: "rsidR",
20118
- encode: encode$w,
20119
- decode: decode$y
20155
+ encode: encode$y,
20156
+ decode: decode$A
20120
20157
  });
20121
- const encode$v = (attributes) => {
20158
+ const encode$x = (attributes) => {
20122
20159
  return attributes["w:rsidRPr"];
20123
20160
  };
20124
- const decode$x = (attrs) => {
20161
+ const decode$z = (attrs) => {
20125
20162
  return attrs.rsidRPr;
20126
20163
  };
20127
20164
  const attrConfig$e = Object.freeze({
20128
20165
  xmlName: "w:rsidRPr",
20129
20166
  sdName: "rsidRPr",
20130
- encode: encode$v,
20131
- decode: decode$x
20167
+ encode: encode$x,
20168
+ decode: decode$z
20132
20169
  });
20133
- const encode$u = (attributes) => {
20170
+ const encode$w = (attributes) => {
20134
20171
  return attributes["w:rsidRDefault"];
20135
20172
  };
20136
- const decode$w = (attrs) => {
20173
+ const decode$y = (attrs) => {
20137
20174
  return attrs.rsidRDefault;
20138
20175
  };
20139
20176
  const attrConfig$d = Object.freeze({
20140
20177
  xmlName: "w:rsidRDefault",
20141
20178
  sdName: "rsidRDefault",
20142
- encode: encode$u,
20143
- decode: decode$w
20179
+ encode: encode$w,
20180
+ decode: decode$y
20144
20181
  });
20145
- const encode$t = (attributes) => {
20182
+ const encode$v = (attributes) => {
20146
20183
  return attributes["w14:paraId"];
20147
20184
  };
20148
- const decode$v = (attrs) => {
20185
+ const decode$x = (attrs) => {
20149
20186
  return attrs.paraId;
20150
20187
  };
20151
20188
  const attrConfig$c = Object.freeze({
20152
20189
  xmlName: "w14:paraId",
20153
20190
  sdName: "paraId",
20154
- encode: encode$t,
20155
- decode: decode$v
20191
+ encode: encode$v,
20192
+ decode: decode$x
20156
20193
  });
20157
- const encode$s = (attributes) => {
20194
+ const encode$u = (attributes) => {
20158
20195
  return attributes["w14:textId"];
20159
20196
  };
20160
- const decode$u = (attrs) => {
20197
+ const decode$w = (attrs) => {
20161
20198
  return attrs.textId;
20162
20199
  };
20163
20200
  const attrConfig$b = Object.freeze({
20164
20201
  xmlName: "w14:textId",
20165
20202
  sdName: "textId",
20166
- encode: encode$s,
20167
- decode: decode$u
20203
+ encode: encode$u,
20204
+ decode: decode$w
20168
20205
  });
20169
20206
  const validXmlAttributes$d = [
20170
20207
  attrConfig$c,
@@ -20175,9 +20212,9 @@ const validXmlAttributes$d = [
20175
20212
  attrConfig$e,
20176
20213
  attrConfig$h
20177
20214
  ];
20178
- const XML_NODE_NAME$i = "w:p";
20179
- const SD_NODE_NAME$f = "paragraph";
20180
- const encode$r = (params, encodedAttrs = {}) => {
20215
+ const XML_NODE_NAME$k = "w:p";
20216
+ const SD_NODE_NAME$h = "paragraph";
20217
+ const encode$t = (params, encodedAttrs = {}) => {
20181
20218
  const node = handleParagraphNode$1(params);
20182
20219
  if (!node) return void 0;
20183
20220
  if (encodedAttrs && Object.keys(encodedAttrs).length) {
@@ -20185,7 +20222,7 @@ const encode$r = (params, encodedAttrs = {}) => {
20185
20222
  }
20186
20223
  return node;
20187
20224
  };
20188
- const decode$t = (params, decodedAttrs = {}) => {
20225
+ const decode$v = (params, decodedAttrs = {}) => {
20189
20226
  const translated = translateParagraphNode(params);
20190
20227
  if (!translated) return void 0;
20191
20228
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -20193,15 +20230,15 @@ const decode$t = (params, decodedAttrs = {}) => {
20193
20230
  }
20194
20231
  return translated;
20195
20232
  };
20196
- const config$h = {
20197
- xmlName: XML_NODE_NAME$i,
20198
- sdNodeOrKeyName: SD_NODE_NAME$f,
20233
+ const config$j = {
20234
+ xmlName: XML_NODE_NAME$k,
20235
+ sdNodeOrKeyName: SD_NODE_NAME$h,
20199
20236
  type: NodeTranslator.translatorTypes.NODE,
20200
- encode: encode$r,
20201
- decode: decode$t,
20237
+ encode: encode$t,
20238
+ decode: decode$v,
20202
20239
  attributes: validXmlAttributes$d
20203
20240
  };
20204
- const translator$$ = NodeTranslator.from(config$h);
20241
+ const translator$11 = NodeTranslator.from(config$j);
20205
20242
  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;
20206
20243
  const containsEastAsianCharacters = (text) => EAST_ASIAN_CHARACTER_REGEX.test(text);
20207
20244
  const resolveFontFamily = (textStyleAttrs, text) => {
@@ -20361,8 +20398,21 @@ const ensureTrackedWrapper = (runs, trackingMarksByType = /* @__PURE__ */ new Ma
20361
20398
  }
20362
20399
  return runs;
20363
20400
  };
20364
- const XML_NODE_NAME$h = "w:hyperlink";
20365
- const SD_NODE_NAME$e = "link";
20401
+ function generateDocxRandomId(length = 8) {
20402
+ const max2 = 2147483647;
20403
+ const value = Math.floor(Math.random() * (max2 + 1));
20404
+ return value.toString(16).padStart(length, "0").slice(0, length);
20405
+ }
20406
+ function generateRandomSigned32BitIntStrId() {
20407
+ const val = Math.floor(Math.random() * 2147483647);
20408
+ return val.toString();
20409
+ }
20410
+ function generateRandom32BitHex() {
20411
+ const val = Math.floor(Math.random() * 2147483647);
20412
+ return val.toString(16).toUpperCase().padStart(8, "0");
20413
+ }
20414
+ const XML_NODE_NAME$j = "w:hyperlink";
20415
+ const SD_NODE_NAME$g = "link";
20366
20416
  const _createAttributeHandler = (xmlName, sdName) => ({
20367
20417
  xmlName,
20368
20418
  sdName,
@@ -20382,7 +20432,7 @@ const validXmlAttributes$c = [
20382
20432
  _createAttributeHandler("r:id", "rId"),
20383
20433
  _createAttributeHandler("w:tgtFrame", "target")
20384
20434
  ];
20385
- const encode$q = (params, encodedAttrs) => {
20435
+ const encode$s = (params, encodedAttrs) => {
20386
20436
  const { nodes, docx, nodeListHandler } = params;
20387
20437
  const node = nodes[0];
20388
20438
  let href = _resolveHref(docx, encodedAttrs);
@@ -20416,7 +20466,7 @@ const _resolveHref = (docx, encodedAttrs) => {
20416
20466
  }
20417
20467
  return href;
20418
20468
  };
20419
- function decode$s(params) {
20469
+ function decode$u(params) {
20420
20470
  const { hyperlinkGroup = [params.node] } = params.extraParams || {};
20421
20471
  const node = hyperlinkGroup[0];
20422
20472
  const linkMark = node.marks.find((m2) => m2.type === "link");
@@ -20457,69 +20507,69 @@ function _addNewLinkRelationship(params, link) {
20457
20507
  type: "element",
20458
20508
  name: "Relationship",
20459
20509
  attributes: {
20460
- Id: id,
20510
+ Id: `rId${id}`,
20461
20511
  Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
20462
20512
  Target: link,
20463
20513
  TargetMode: "External"
20464
20514
  }
20465
20515
  });
20466
- return id;
20516
+ return `rId${id}`;
20467
20517
  }
20468
- const config$g = {
20469
- xmlName: XML_NODE_NAME$h,
20470
- sdNodeOrKeyName: SD_NODE_NAME$e,
20518
+ const config$i = {
20519
+ xmlName: XML_NODE_NAME$j,
20520
+ sdNodeOrKeyName: SD_NODE_NAME$g,
20471
20521
  type: NodeTranslator.translatorTypes.NODE,
20472
- encode: encode$q,
20473
- decode: decode$s,
20522
+ encode: encode$s,
20523
+ decode: decode$u,
20474
20524
  attributes: validXmlAttributes$c
20475
20525
  };
20476
- const translator$_ = NodeTranslator.from(config$g);
20477
- const encode$p = (attributes) => {
20526
+ const translator$10 = NodeTranslator.from(config$i);
20527
+ const encode$r = (attributes) => {
20478
20528
  return attributes["w:rsidR"];
20479
20529
  };
20480
- const decode$r = (attrs) => {
20530
+ const decode$t = (attrs) => {
20481
20531
  return attrs.rsidR;
20482
20532
  };
20483
20533
  const attrConfig$a = Object.freeze({
20484
20534
  xmlName: "w:rsidR",
20485
20535
  sdName: "rsidR",
20486
- encode: encode$p,
20487
- decode: decode$r
20536
+ encode: encode$r,
20537
+ decode: decode$t
20488
20538
  });
20489
- const encode$o = (attributes) => {
20539
+ const encode$q = (attributes) => {
20490
20540
  return attributes["w:rsidRPr"];
20491
20541
  };
20492
- const decode$q = (attrs) => {
20542
+ const decode$s = (attrs) => {
20493
20543
  return attrs.rsidRPr;
20494
20544
  };
20495
20545
  const attrConfig$9 = Object.freeze({
20496
20546
  xmlName: "w:rsidRPr",
20497
20547
  sdName: "rsidRPr",
20498
- encode: encode$o,
20499
- decode: decode$q
20548
+ encode: encode$q,
20549
+ decode: decode$s
20500
20550
  });
20501
- const encode$n = (attributes) => {
20551
+ const encode$p = (attributes) => {
20502
20552
  return attributes["w:rsidDel"];
20503
20553
  };
20504
- const decode$p = (attrs) => {
20554
+ const decode$r = (attrs) => {
20505
20555
  return attrs.rsidDel;
20506
20556
  };
20507
20557
  const attrConfig$8 = Object.freeze({
20508
20558
  xmlName: "w:rsidDel",
20509
20559
  sdName: "rsidDel",
20510
- encode: encode$n,
20511
- decode: decode$p
20560
+ encode: encode$p,
20561
+ decode: decode$r
20512
20562
  });
20513
20563
  const validXmlAttributes$b = [attrConfig$a, attrConfig$9, attrConfig$8];
20514
- const XML_NODE_NAME$g = "w:r";
20564
+ const XML_NODE_NAME$i = "w:r";
20515
20565
  const SD_KEY_NAME = "run";
20516
- const encode$m = (params, encodedAttrs = {}) => {
20566
+ const encode$o = (params, encodedAttrs = {}) => {
20517
20567
  const { nodes = [], nodeListHandler } = params || {};
20518
20568
  const runNode = nodes[0];
20519
20569
  if (!runNode) return void 0;
20520
20570
  const elements = Array.isArray(runNode.elements) ? runNode.elements : [];
20521
20571
  const rPrNode = elements.find((child) => child?.name === "w:rPr");
20522
- const runProperties = rPrNode ? translator$1L.encode({ ...params, nodes: [rPrNode] }) : {};
20572
+ const runProperties = rPrNode ? translator$1N.encode({ ...params, nodes: [rPrNode] }) : {};
20523
20573
  const paragraphProperties = params?.extraParams?.paragraphProperties || {};
20524
20574
  const resolvedRunProperties = resolveRunProperties(params, runProperties ?? {}, paragraphProperties);
20525
20575
  const marks = encodeMarksFromRPr(resolvedRunProperties, params?.docx) || [];
@@ -20566,7 +20616,7 @@ const encode$m = (params, encodedAttrs = {}) => {
20566
20616
  }
20567
20617
  return runNodeResult;
20568
20618
  };
20569
- const decode$o = (params, decodedAttrs = {}) => {
20619
+ const decode$q = (params, decodedAttrs = {}) => {
20570
20620
  const { node } = params || {};
20571
20621
  if (!node) return void 0;
20572
20622
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
@@ -20575,7 +20625,7 @@ const decode$o = (params, decodedAttrs = {}) => {
20575
20625
  ...params.extraParams,
20576
20626
  linkProcessed: true
20577
20627
  };
20578
- return translator$_.decode({ ...params, extraParams });
20628
+ return translator$10.decode({ ...params, extraParams });
20579
20629
  }
20580
20630
  const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node);
20581
20631
  const runAttrs = runNodeForExport.attrs || {};
@@ -20591,7 +20641,7 @@ const decode$o = (params, decodedAttrs = {}) => {
20591
20641
  exportParams.editor = { extensionService: { extensions: [] } };
20592
20642
  }
20593
20643
  const childElements = translateChildNodes(exportParams) || [];
20594
- let runPropertiesElement = translator$1L.decode({
20644
+ let runPropertiesElement = translator$1N.decode({
20595
20645
  ...params,
20596
20646
  node: { attrs: { runProperties: finalRunProperties } }
20597
20647
  });
@@ -20624,7 +20674,7 @@ const decode$o = (params, decodedAttrs = {}) => {
20624
20674
  runs.push(trackedClone);
20625
20675
  return;
20626
20676
  }
20627
- const runWrapper = { name: XML_NODE_NAME$g, elements: [] };
20677
+ const runWrapper = { name: XML_NODE_NAME$i, elements: [] };
20628
20678
  applyBaseRunProps(runWrapper);
20629
20679
  if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
20630
20680
  runWrapper.elements.push(cloneXmlNode(child));
@@ -20632,7 +20682,7 @@ const decode$o = (params, decodedAttrs = {}) => {
20632
20682
  });
20633
20683
  const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
20634
20684
  if (!trackedRuns.length) {
20635
- const emptyRun = { name: XML_NODE_NAME$g, elements: [] };
20685
+ const emptyRun = { name: XML_NODE_NAME$i, elements: [] };
20636
20686
  applyBaseRunProps(emptyRun);
20637
20687
  trackedRuns.push(emptyRun);
20638
20688
  }
@@ -20646,17 +20696,17 @@ const decode$o = (params, decodedAttrs = {}) => {
20646
20696
  }
20647
20697
  return trackedRuns;
20648
20698
  };
20649
- const config$f = {
20650
- xmlName: XML_NODE_NAME$g,
20699
+ const config$h = {
20700
+ xmlName: XML_NODE_NAME$i,
20651
20701
  sdNodeOrKeyName: SD_KEY_NAME,
20652
20702
  type: NodeTranslator.translatorTypes.NODE,
20653
- encode: encode$m,
20654
- decode: decode$o,
20703
+ encode: encode$o,
20704
+ decode: decode$q,
20655
20705
  attributes: validXmlAttributes$b
20656
20706
  };
20657
- const translator$Z = NodeTranslator.from(config$f);
20658
- const translator$Y = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
20659
- const translator$X = NodeTranslator.from(
20707
+ const translator$$ = NodeTranslator.from(config$h);
20708
+ const translator$_ = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
20709
+ const translator$Z = NodeTranslator.from(
20660
20710
  createSingleAttrPropertyHandler(
20661
20711
  "w:gridSpan",
20662
20712
  null,
@@ -20665,31 +20715,31 @@ const translator$X = NodeTranslator.from(
20665
20715
  (v2) => integerToString(v2)
20666
20716
  )
20667
20717
  );
20668
- const translator$W = NodeTranslator.from(createSingleAttrPropertyHandler("w:vMerge"));
20669
- const translator$V = NodeTranslator.from(createBorderPropertyHandler("w:end"));
20670
- const translator$U = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
20671
- const translator$T = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
20672
- const translator$S = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
20673
- const translator$R = NodeTranslator.from(createBorderPropertyHandler("w:start"));
20674
- const translator$Q = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
20675
- const translator$P = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
20676
- const translator$O = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
20718
+ const translator$Y = NodeTranslator.from(createSingleAttrPropertyHandler("w:vMerge"));
20719
+ const translator$X = NodeTranslator.from(createBorderPropertyHandler("w:end"));
20720
+ const translator$W = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
20721
+ const translator$V = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
20722
+ const translator$U = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
20723
+ const translator$T = NodeTranslator.from(createBorderPropertyHandler("w:start"));
20724
+ const translator$S = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
20725
+ const translator$R = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
20726
+ const translator$Q = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
20677
20727
  const propertyTranslators$6 = [
20678
- translator$1h,
20679
- translator$R,
20680
- translator$1l,
20681
- translator$1n,
20682
- translator$V,
20683
20728
  translator$1j,
20684
20729
  translator$T,
20685
- translator$S,
20686
- translator$P,
20687
- translator$O
20730
+ translator$1n,
20731
+ translator$1p,
20732
+ translator$X,
20733
+ translator$1l,
20734
+ translator$V,
20735
+ translator$U,
20736
+ translator$R,
20737
+ translator$Q
20688
20738
  ];
20689
- const translator$N = NodeTranslator.from(
20739
+ const translator$P = NodeTranslator.from(
20690
20740
  createNestedPropertiesTranslator("w:tcBorders", "borders", propertyTranslators$6)
20691
20741
  );
20692
- const translator$M = NodeTranslator.from(
20742
+ const translator$O = NodeTranslator.from(
20693
20743
  createSingleAttrPropertyHandler(
20694
20744
  "w:noWrap",
20695
20745
  null,
@@ -20699,17 +20749,17 @@ const translator$M = NodeTranslator.from(
20699
20749
  )
20700
20750
  );
20701
20751
  const propertyTranslators$5 = [
20752
+ translator$1o,
20753
+ translator$W,
20702
20754
  translator$1m,
20703
- translator$U,
20704
20755
  translator$1k,
20705
- translator$1i,
20706
- translator$Q,
20707
- translator$1g
20756
+ translator$S,
20757
+ translator$1i
20708
20758
  ];
20709
- const translator$L = NodeTranslator.from(
20759
+ const translator$N = NodeTranslator.from(
20710
20760
  createNestedPropertiesTranslator("w:tcMar", "cellMargins", propertyTranslators$5)
20711
20761
  );
20712
- const translator$K = NodeTranslator.from(
20762
+ const translator$M = NodeTranslator.from(
20713
20763
  createSingleAttrPropertyHandler(
20714
20764
  "w:tcFitText",
20715
20765
  null,
@@ -20718,8 +20768,8 @@ const translator$K = NodeTranslator.from(
20718
20768
  (v2) => booleanToString(v2)
20719
20769
  )
20720
20770
  );
20721
- const translator$J = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
20722
- const translator$I = NodeTranslator.from(
20771
+ const translator$L = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
20772
+ const translator$K = NodeTranslator.from(
20723
20773
  createSingleAttrPropertyHandler(
20724
20774
  "w:hideMark",
20725
20775
  null,
@@ -20728,26 +20778,26 @@ const translator$I = NodeTranslator.from(
20728
20778
  (v2) => booleanToString(v2)
20729
20779
  )
20730
20780
  );
20731
- const translator$H = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
20732
- const translator$G = NodeTranslator.from(
20733
- createNestedArrayPropertyHandler("w:headers", "headers", [translator$H])
20781
+ const translator$J = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
20782
+ const translator$I = NodeTranslator.from(
20783
+ createNestedArrayPropertyHandler("w:headers", "headers", [translator$J])
20734
20784
  );
20735
20785
  const propertyTranslators$4 = [
20736
- translator$1F,
20786
+ translator$1H,
20787
+ translator$_,
20788
+ translator$Z,
20737
20789
  translator$Y,
20738
- translator$X,
20739
- translator$W,
20790
+ translator$P,
20791
+ translator$1Q,
20792
+ translator$O,
20740
20793
  translator$N,
20741
- translator$1O,
20794
+ translator$17,
20742
20795
  translator$M,
20743
20796
  translator$L,
20744
- translator$15,
20745
20797
  translator$K,
20746
- translator$J,
20747
- translator$I,
20748
- translator$G
20798
+ translator$I
20749
20799
  ];
20750
- const translator$F = NodeTranslator.from(
20800
+ const translator$H = NodeTranslator.from(
20751
20801
  createNestedPropertiesTranslator("w:tcPr", "tableCellProperties", propertyTranslators$4)
20752
20802
  );
20753
20803
  function handleTableCellNode({
@@ -20765,7 +20815,7 @@ function handleTableCellNode({
20765
20815
  const attributes = {};
20766
20816
  const referencedStyles = _referencedStyles ?? { fontSize: null, fonts: {}, cellMargins: {} };
20767
20817
  const tcPr = node.elements.find((el) => el.name === "w:tcPr");
20768
- const tableCellProperties = tcPr ? translator$F.encode({ ...params, nodes: [tcPr] }) ?? {} : {};
20818
+ const tableCellProperties = tcPr ? translator$H.encode({ ...params, nodes: [tcPr] }) ?? {} : {};
20769
20819
  attributes["tableCellProperties"] = tableCellProperties;
20770
20820
  if (rowBorders?.insideH) {
20771
20821
  rowBorders["bottom"] = rowBorders.insideH;
@@ -21077,13 +21127,13 @@ function generateTableCellProperties(node) {
21077
21127
  } else if (tableCellProperties?.borders) {
21078
21128
  delete tableCellProperties.borders;
21079
21129
  }
21080
- const result = translator$F.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
21130
+ const result = translator$H.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
21081
21131
  return result;
21082
21132
  }
21083
- const XML_NODE_NAME$f = "w:tc";
21084
- const SD_NODE_NAME$d = "tableCell";
21133
+ const XML_NODE_NAME$h = "w:tc";
21134
+ const SD_NODE_NAME$f = "tableCell";
21085
21135
  const validXmlAttributes$a = [];
21086
- function encode$l(params, encodedAttrs) {
21136
+ function encode$n(params, encodedAttrs) {
21087
21137
  const {
21088
21138
  node,
21089
21139
  table,
@@ -21110,29 +21160,29 @@ function encode$l(params, encodedAttrs) {
21110
21160
  }
21111
21161
  return schemaNode;
21112
21162
  }
21113
- function decode$n(params, decodedAttrs) {
21163
+ function decode$p(params, decodedAttrs) {
21114
21164
  const translated = translateTableCell(params);
21115
21165
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
21116
21166
  translated.attributes = { ...translated.attributes || {}, ...decodedAttrs };
21117
21167
  }
21118
21168
  return translated;
21119
21169
  }
21120
- const config$e = {
21121
- xmlName: XML_NODE_NAME$f,
21122
- sdNodeOrKeyName: SD_NODE_NAME$d,
21170
+ const config$g = {
21171
+ xmlName: XML_NODE_NAME$h,
21172
+ sdNodeOrKeyName: SD_NODE_NAME$f,
21123
21173
  type: NodeTranslator.translatorTypes.NODE,
21124
- encode: encode$l,
21125
- decode: decode$n,
21174
+ encode: encode$n,
21175
+ decode: decode$p,
21126
21176
  attributes: validXmlAttributes$a
21127
21177
  };
21128
- const translator$E = NodeTranslator.from(config$e);
21129
- const translator$D = NodeTranslator.from({
21178
+ const translator$G = NodeTranslator.from(config$g);
21179
+ const translator$F = NodeTranslator.from({
21130
21180
  xmlName: "w:cantSplit",
21131
21181
  sdNodeOrKeyName: "cantSplit",
21132
21182
  encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
21133
21183
  decode: ({ node }) => node.attrs?.cantSplit ? { attributes: {} } : void 0
21134
21184
  });
21135
- const translator$C = NodeTranslator.from(
21185
+ const translator$E = NodeTranslator.from(
21136
21186
  createSingleAttrPropertyHandler(
21137
21187
  "w:gridAfter",
21138
21188
  null,
@@ -21141,7 +21191,7 @@ const translator$C = NodeTranslator.from(
21141
21191
  (v2) => integerToString(v2)
21142
21192
  )
21143
21193
  );
21144
- const translator$B = NodeTranslator.from(
21194
+ const translator$D = NodeTranslator.from(
21145
21195
  createSingleAttrPropertyHandler(
21146
21196
  "w:gridBefore",
21147
21197
  null,
@@ -21150,20 +21200,20 @@ const translator$B = NodeTranslator.from(
21150
21200
  (v2) => integerToString(v2)
21151
21201
  )
21152
21202
  );
21153
- const translator$A = NodeTranslator.from({
21203
+ const translator$C = NodeTranslator.from({
21154
21204
  xmlName: "w:hidden",
21155
21205
  sdNodeOrKeyName: "hidden",
21156
21206
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
21157
21207
  decode: ({ node }) => node.attrs.hidden ? { attributes: {} } : void 0
21158
21208
  });
21159
- const translator$z = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
21160
- const translator$y = NodeTranslator.from({
21209
+ const translator$B = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
21210
+ const translator$A = NodeTranslator.from({
21161
21211
  xmlName: "w:tblHeader",
21162
21212
  sdNodeOrKeyName: "repeatHeader",
21163
21213
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
21164
21214
  decode: ({ node }) => node.attrs.repeatHeader ? { attributes: {} } : void 0
21165
21215
  });
21166
- const translator$x = NodeTranslator.from({
21216
+ const translator$z = NodeTranslator.from({
21167
21217
  xmlName: "w:trHeight",
21168
21218
  sdNodeOrKeyName: "rowHeight",
21169
21219
  encode: ({ nodes }) => {
@@ -21190,23 +21240,23 @@ const translator$x = NodeTranslator.from({
21190
21240
  return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
21191
21241
  }
21192
21242
  });
21193
- const translator$w = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
21194
- const translator$v = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
21243
+ const translator$y = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
21244
+ const translator$x = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
21195
21245
  const propertyTranslators$3 = [
21196
- translator$D,
21246
+ translator$F,
21247
+ translator$1H,
21197
21248
  translator$1F,
21198
- translator$1D,
21249
+ translator$E,
21250
+ translator$D,
21199
21251
  translator$C,
21252
+ translator$1C,
21200
21253
  translator$B,
21201
21254
  translator$A,
21202
- translator$1A,
21203
21255
  translator$z,
21204
21256
  translator$y,
21205
- translator$x,
21206
- translator$w,
21207
- translator$v
21257
+ translator$x
21208
21258
  ];
21209
- const translator$u = NodeTranslator.from(
21259
+ const translator$w = NodeTranslator.from(
21210
21260
  createNestedPropertiesTranslator("w:trPr", "tableRowProperties", propertyTranslators$3, {
21211
21261
  cantSplit: false,
21212
21262
  hidden: false,
@@ -21275,17 +21325,17 @@ const isPlaceholderCell = (cell) => {
21275
21325
  }
21276
21326
  return false;
21277
21327
  };
21278
- const XML_NODE_NAME$e = "w:tr";
21279
- const SD_NODE_NAME$c = "tableRow";
21328
+ const XML_NODE_NAME$g = "w:tr";
21329
+ const SD_NODE_NAME$e = "tableRow";
21280
21330
  const validXmlAttributes$9 = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
21281
21331
  (xmlName) => createAttributeHandler(xmlName)
21282
21332
  );
21283
- const encode$k = (params, encodedAttrs) => {
21333
+ const encode$m = (params, encodedAttrs) => {
21284
21334
  const { row } = params.extraParams;
21285
21335
  let tableRowProperties = {};
21286
21336
  const tPr = row.elements.find((el) => el.name === "w:trPr");
21287
21337
  if (tPr) {
21288
- tableRowProperties = translator$u.encode({
21338
+ tableRowProperties = translator$w.encode({
21289
21339
  ...params,
21290
21340
  nodes: [tPr]
21291
21341
  });
@@ -21322,7 +21372,7 @@ const encode$k = (params, encodedAttrs) => {
21322
21372
  skipOccupiedColumns();
21323
21373
  const startColumn = currentColumnIndex;
21324
21374
  const columnWidth = gridColumnWidths?.[startColumn] || null;
21325
- const result = translator$E.encode({
21375
+ const result = translator$G.encode({
21326
21376
  ...params,
21327
21377
  extraParams: {
21328
21378
  ...params.extraParams,
@@ -21355,7 +21405,7 @@ const encode$k = (params, encodedAttrs) => {
21355
21405
  };
21356
21406
  return newNode;
21357
21407
  };
21358
- const decode$m = (params, decodedAttrs) => {
21408
+ const decode$o = (params, decodedAttrs) => {
21359
21409
  const { node } = params;
21360
21410
  const cells = node.content || [];
21361
21411
  let leadingPlaceholders = 0;
@@ -21395,7 +21445,7 @@ const decode$m = (params, decodedAttrs) => {
21395
21445
  }
21396
21446
  }
21397
21447
  tableRowProperties["cantSplit"] = node.attrs["cantSplit"];
21398
- const trPr = translator$u.decode({
21448
+ const trPr = translator$w.decode({
21399
21449
  ...params,
21400
21450
  node: { ...node, attrs: { ...node.attrs, tableRowProperties } }
21401
21451
  });
@@ -21407,15 +21457,15 @@ const decode$m = (params, decodedAttrs) => {
21407
21457
  elements
21408
21458
  };
21409
21459
  };
21410
- const config$d = {
21411
- xmlName: XML_NODE_NAME$e,
21412
- sdNodeOrKeyName: SD_NODE_NAME$c,
21460
+ const config$f = {
21461
+ xmlName: XML_NODE_NAME$g,
21462
+ sdNodeOrKeyName: SD_NODE_NAME$e,
21413
21463
  type: NodeTranslator.translatorTypes.NODE,
21414
- encode: encode$k,
21415
- decode: decode$m,
21464
+ encode: encode$m,
21465
+ decode: decode$o,
21416
21466
  attributes: validXmlAttributes$9
21417
21467
  };
21418
- const translator$t = NodeTranslator.from(config$d);
21468
+ const translator$v = NodeTranslator.from(config$f);
21419
21469
  function parseTagValueJSON(json) {
21420
21470
  if (typeof json !== "string") {
21421
21471
  return {};
@@ -30369,32 +30419,32 @@ function translateAnchorNode(params) {
30369
30419
  elements: [...anchorElements, ...elementsWithWrap]
30370
30420
  };
30371
30421
  }
30372
- const XML_NODE_NAME$d = "wp:anchor";
30373
- const SD_NODE_NAME$b = ["image", "shapeGroup", "vectorShape", "contentBlock"];
30422
+ const XML_NODE_NAME$f = "wp:anchor";
30423
+ const SD_NODE_NAME$d = ["image", "shapeGroup", "vectorShape", "contentBlock"];
30374
30424
  const validXmlAttributes$8 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
30375
- function encode$j(params) {
30425
+ function encode$l(params) {
30376
30426
  const { node } = params.extraParams;
30377
30427
  if (!node || !node.name) {
30378
30428
  return null;
30379
30429
  }
30380
30430
  return handleAnchorNode(params);
30381
30431
  }
30382
- function decode$l(params) {
30432
+ function decode$n(params) {
30383
30433
  const { node } = params;
30384
30434
  if (!node || !node.type) {
30385
30435
  return null;
30386
30436
  }
30387
30437
  return translateAnchorNode(params);
30388
30438
  }
30389
- const config$c = {
30390
- xmlName: XML_NODE_NAME$d,
30391
- sdNodeOrKeyName: SD_NODE_NAME$b,
30439
+ const config$e = {
30440
+ xmlName: XML_NODE_NAME$f,
30441
+ sdNodeOrKeyName: SD_NODE_NAME$d,
30392
30442
  type: NodeTranslator.translatorTypes.NODE,
30393
- encode: encode$j,
30394
- decode: decode$l,
30443
+ encode: encode$l,
30444
+ decode: decode$n,
30395
30445
  attributes: validXmlAttributes$8
30396
30446
  };
30397
- const translator$s = NodeTranslator.from(config$c);
30447
+ const translator$u = NodeTranslator.from(config$e);
30398
30448
  function handleInlineNode(params) {
30399
30449
  const { node } = params.extraParams;
30400
30450
  if (node.name !== "wp:inline") {
@@ -30410,41 +30460,41 @@ function translateInlineNode(params) {
30410
30460
  elements: nodeElements.elements
30411
30461
  };
30412
30462
  }
30413
- const XML_NODE_NAME$c = "wp:inline";
30414
- const SD_NODE_NAME$a = ["image", "shapeGroup", "vectorShape", "contentBlock"];
30463
+ const XML_NODE_NAME$e = "wp:inline";
30464
+ const SD_NODE_NAME$c = ["image", "shapeGroup", "vectorShape", "contentBlock"];
30415
30465
  const validXmlAttributes$7 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
30416
- function encode$i(params) {
30466
+ function encode$k(params) {
30417
30467
  const { node } = params.extraParams;
30418
30468
  if (!node || !node.name) {
30419
30469
  return null;
30420
30470
  }
30421
30471
  return handleInlineNode(params);
30422
30472
  }
30423
- function decode$k(params) {
30473
+ function decode$m(params) {
30424
30474
  const { node } = params;
30425
30475
  if (!node || !node.type) {
30426
30476
  return null;
30427
30477
  }
30428
30478
  return translateInlineNode(params);
30429
30479
  }
30430
- const config$b = {
30431
- xmlName: XML_NODE_NAME$c,
30432
- sdNodeOrKeyName: SD_NODE_NAME$a,
30480
+ const config$d = {
30481
+ xmlName: XML_NODE_NAME$e,
30482
+ sdNodeOrKeyName: SD_NODE_NAME$c,
30433
30483
  type: NodeTranslator.translatorTypes.NODE,
30434
- encode: encode$i,
30435
- decode: decode$k,
30484
+ encode: encode$k,
30485
+ decode: decode$m,
30436
30486
  attributes: validXmlAttributes$7
30437
30487
  };
30438
- const translator$r = NodeTranslator.from(config$b);
30439
- const XML_NODE_NAME$b = "w:drawing";
30440
- const SD_NODE_NAME$9 = [];
30488
+ const translator$t = NodeTranslator.from(config$d);
30489
+ const XML_NODE_NAME$d = "w:drawing";
30490
+ const SD_NODE_NAME$b = [];
30441
30491
  const validXmlAttributes$6 = [];
30442
- function encode$h(params) {
30492
+ function encode$j(params) {
30443
30493
  const nodes = params.nodes;
30444
30494
  const node = nodes[0];
30445
30495
  const translatorByChildName = {
30446
- "wp:anchor": translator$s,
30447
- "wp:inline": translator$r
30496
+ "wp:anchor": translator$u,
30497
+ "wp:inline": translator$t
30448
30498
  };
30449
30499
  return node.elements.reduce((acc, child) => {
30450
30500
  if (acc) return acc;
@@ -30453,12 +30503,12 @@ function encode$h(params) {
30453
30503
  return translator2.encode({ ...params, extraParams: { node: child } }) || acc;
30454
30504
  }, null);
30455
30505
  }
30456
- function decode$j(params) {
30506
+ function decode$l(params) {
30457
30507
  const { node } = params;
30458
30508
  if (!node || !node.type) {
30459
30509
  return null;
30460
30510
  }
30461
- const childTranslator = node.attrs.isAnchor ? translator$s : translator$r;
30511
+ const childTranslator = node.attrs.isAnchor ? translator$u : translator$t;
30462
30512
  const resultNode = childTranslator.decode(params);
30463
30513
  return wrapTextInRun(
30464
30514
  {
@@ -30468,15 +30518,68 @@ function decode$j(params) {
30468
30518
  []
30469
30519
  );
30470
30520
  }
30471
- const config$a = {
30472
- xmlName: XML_NODE_NAME$b,
30473
- sdNodeOrKeyName: SD_NODE_NAME$9,
30521
+ const config$c = {
30522
+ xmlName: XML_NODE_NAME$d,
30523
+ sdNodeOrKeyName: SD_NODE_NAME$b,
30474
30524
  type: NodeTranslator.translatorTypes.NODE,
30475
- encode: encode$h,
30476
- decode: decode$j,
30525
+ encode: encode$j,
30526
+ decode: decode$l,
30477
30527
  attributes: validXmlAttributes$6
30478
30528
  };
30479
- const translator$q = NodeTranslator.from(config$a);
30529
+ const translator$s = NodeTranslator.from(config$c);
30530
+ function getTextNodeForExport(text, marks, params) {
30531
+ const hasLeadingOrTrailingSpace = /^\s|\s$/.test(text);
30532
+ const space = hasLeadingOrTrailingSpace ? "preserve" : null;
30533
+ const nodeAttrs = space ? { "xml:space": space } : null;
30534
+ const textNodes = [];
30535
+ const textRunProperties = decodeRPrFromMarks(marks || []);
30536
+ const parentRunProperties = params.extraParams?.runProperties || {};
30537
+ const combinedRunProperties = combineRunProperties([parentRunProperties, textRunProperties]);
30538
+ const rPrNode = translator$1N.decode({ node: { attrs: { runProperties: combinedRunProperties } } });
30539
+ textNodes.push({
30540
+ name: "w:t",
30541
+ elements: [{ text, type: "text" }],
30542
+ attributes: nodeAttrs
30543
+ });
30544
+ if (params) {
30545
+ const { editor } = params;
30546
+ const customMarks = editor.extensionService.extensions.filter((e) => e.isExternal === true);
30547
+ marks.forEach((mark) => {
30548
+ const isCustomMark = customMarks.some((customMark) => {
30549
+ const customMarkName = customMark.name;
30550
+ return mark.type === customMarkName;
30551
+ });
30552
+ if (!isCustomMark) return;
30553
+ let attrsString = "";
30554
+ Object.entries(mark.attrs).forEach(([key, value]) => {
30555
+ if (value) {
30556
+ attrsString += `${key}=${value};`;
30557
+ }
30558
+ });
30559
+ if (isCustomMark) {
30560
+ textNodes.unshift({
30561
+ type: "element",
30562
+ name: "w:bookmarkStart",
30563
+ attributes: {
30564
+ "w:id": "5000",
30565
+ "w:name": mark.type + ";" + attrsString
30566
+ }
30567
+ });
30568
+ textNodes.push({
30569
+ type: "element",
30570
+ name: "w:bookmarkEnd",
30571
+ attributes: {
30572
+ "w:id": "5000"
30573
+ }
30574
+ });
30575
+ }
30576
+ });
30577
+ }
30578
+ return {
30579
+ name: "w:r",
30580
+ elements: rPrNode ? [rPrNode, ...textNodes] : textNodes
30581
+ };
30582
+ }
30480
30583
  var he$2 = { exports: {} };
30481
30584
  /*! https://mths.be/he v1.2.0 by @mathias | MIT license */
30482
30585
  var he$1 = he$2.exports;
@@ -30823,7 +30926,7 @@ function prepareTextAnnotation(params) {
30823
30926
  return getTextNodeForExport(attrs.displayLabel, [...marks, ...marksFromAttrs], params);
30824
30927
  }
30825
30928
  function prepareImageAnnotation(params, imageSize) {
30826
- return translator$q.decode({
30929
+ return translator$s.decode({
30827
30930
  ...params,
30828
30931
  imageSize
30829
30932
  });
@@ -30883,18 +30986,31 @@ function prepareUrlAnnotation(params) {
30883
30986
  node: { attrs = {}, marks = [] }
30884
30987
  } = params;
30885
30988
  if (!attrs.linkUrl) return prepareTextAnnotation(params);
30886
- const newId = addNewLinkRelationship(params, attrs.linkUrl);
30887
- const linkTextNode = getTextNodeForExport(attrs.linkUrl, marks, params);
30888
- const contentNode = processLinkContentNode(linkTextNode);
30889
- return {
30890
- name: "w:hyperlink",
30891
- type: "element",
30892
- attributes: {
30893
- "r:id": newId,
30894
- "w:history": 1
30895
- },
30896
- elements: [contentNode]
30989
+ const linkTextNode = {
30990
+ type: "text",
30991
+ text: attrs.linkUrl,
30992
+ marks: [
30993
+ ...marks,
30994
+ {
30995
+ type: "link",
30996
+ attrs: {
30997
+ href: attrs.linkUrl,
30998
+ history: true,
30999
+ text: attrs.linkUrl
31000
+ }
31001
+ },
31002
+ {
31003
+ type: "textStyle",
31004
+ attrs: {
31005
+ color: "#467886"
31006
+ }
31007
+ }
31008
+ ]
30897
31009
  };
31010
+ return translator$10.decode({
31011
+ ...params,
31012
+ node: linkTextNode
31013
+ });
30898
31014
  }
30899
31015
  function translateFieldAttrsToMarks(attrs = {}) {
30900
31016
  const { fontFamily, fontSize, bold, underline, italic, textColor, textHighlight } = attrs;
@@ -31087,6 +31203,46 @@ function translateDocumentPartObj(params) {
31087
31203
  };
31088
31204
  return result;
31089
31205
  }
31206
+ const RUN_LEVEL_WRAPPERS = /* @__PURE__ */ new Set(["w:hyperlink", "w:ins", "w:del"]);
31207
+ function convertSdtContentToRuns(elements) {
31208
+ const normalized = Array.isArray(elements) ? elements : [elements];
31209
+ const runs = [];
31210
+ normalized.forEach((element) => {
31211
+ if (!element) return;
31212
+ if (element.name === "w:sdtPr") {
31213
+ return;
31214
+ }
31215
+ if (element.name === "w:r") {
31216
+ runs.push(element);
31217
+ return;
31218
+ }
31219
+ if (element.name === "w:sdt") {
31220
+ const sdtContent = (element.elements || []).find((child) => child?.name === "w:sdtContent");
31221
+ if (sdtContent?.elements) {
31222
+ runs.push(...convertSdtContentToRuns(sdtContent.elements));
31223
+ }
31224
+ return;
31225
+ }
31226
+ if (RUN_LEVEL_WRAPPERS.has(element.name)) {
31227
+ const wrapperElements = convertSdtContentToRuns(element.elements || []);
31228
+ if (wrapperElements.length) {
31229
+ runs.push({
31230
+ ...element,
31231
+ elements: wrapperElements
31232
+ });
31233
+ }
31234
+ return;
31235
+ }
31236
+ if (element.name) {
31237
+ runs.push({
31238
+ name: "w:r",
31239
+ type: "element",
31240
+ elements: element.elements || [element]
31241
+ });
31242
+ }
31243
+ });
31244
+ return runs.filter((run2) => Array.isArray(run2.elements) && run2.elements.length > 0);
31245
+ }
31090
31246
  function translateStructuredContent(params) {
31091
31247
  const { node, isFinalDoc } = params;
31092
31248
  const childContent = translateChildNodes({ ...params, node });
@@ -31147,10 +31303,10 @@ function generateSdtPrTagForStructuredContent({ node }) {
31147
31303
  };
31148
31304
  return result;
31149
31305
  }
31150
- const XML_NODE_NAME$a = "w:sdt";
31151
- const SD_NODE_NAME$8 = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
31306
+ const XML_NODE_NAME$c = "w:sdt";
31307
+ const SD_NODE_NAME$a = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
31152
31308
  const validXmlAttributes$5 = [];
31153
- function encode$g(params) {
31309
+ function encode$i(params) {
31154
31310
  const nodes = params.nodes;
31155
31311
  const node = nodes[0];
31156
31312
  const { type: sdtType, handler: handler2 } = sdtNodeTypeStrategy(node);
@@ -31160,7 +31316,7 @@ function encode$g(params) {
31160
31316
  const result = handler2(params);
31161
31317
  return result;
31162
31318
  }
31163
- function decode$i(params) {
31319
+ function decode$k(params) {
31164
31320
  const { node } = params;
31165
31321
  if (!node || !node.type) {
31166
31322
  return null;
@@ -31178,15 +31334,15 @@ function decode$i(params) {
31178
31334
  const result = decoder();
31179
31335
  return result;
31180
31336
  }
31181
- const config$9 = {
31182
- xmlName: XML_NODE_NAME$a,
31183
- sdNodeOrKeyName: SD_NODE_NAME$8,
31337
+ const config$b = {
31338
+ xmlName: XML_NODE_NAME$c,
31339
+ sdNodeOrKeyName: SD_NODE_NAME$a,
31184
31340
  type: NodeTranslator.translatorTypes.NODE,
31185
- encode: encode$g,
31186
- decode: decode$i,
31341
+ encode: encode$i,
31342
+ decode: decode$k,
31187
31343
  attributes: validXmlAttributes$5
31188
31344
  };
31189
- const translator$p = NodeTranslator.from(config$9);
31345
+ const translator$r = NodeTranslator.from(config$b);
31190
31346
  function preProcessVerticalMergeCells(table, { editorSchema }) {
31191
31347
  if (!table || !Array.isArray(table.content)) {
31192
31348
  return table;
@@ -31227,17 +31383,17 @@ function preProcessVerticalMergeCells(table, { editorSchema }) {
31227
31383
  }
31228
31384
  return table;
31229
31385
  }
31230
- const translator$o = NodeTranslator.from({
31386
+ const translator$q = NodeTranslator.from({
31231
31387
  xmlName: "w:bidiVisual",
31232
31388
  sdNodeOrKeyName: "rightToLeft",
31233
31389
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
31234
31390
  decode: ({ node }) => node.attrs.rightToLeft ? { attributes: {} } : void 0
31235
31391
  });
31236
- const translator$n = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
31237
- const translator$m = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
31238
- const translator$l = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
31239
- const translator$k = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
31240
- const translator$j = NodeTranslator.from({
31392
+ const translator$p = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
31393
+ const translator$o = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
31394
+ const translator$n = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
31395
+ const translator$m = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
31396
+ const translator$l = NodeTranslator.from({
31241
31397
  xmlName: "w:tblLook",
31242
31398
  sdNodeOrKeyName: "tblLook",
31243
31399
  attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
@@ -31249,16 +31405,16 @@ const translator$j = NodeTranslator.from({
31249
31405
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
31250
31406
  }
31251
31407
  });
31252
- const translator$i = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
31253
- const translator$h = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
31254
- const translator$g = NodeTranslator.from(
31408
+ const translator$k = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
31409
+ const translator$j = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
31410
+ const translator$i = NodeTranslator.from(
31255
31411
  createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
31256
31412
  );
31257
- const translator$f = NodeTranslator.from(
31413
+ const translator$h = NodeTranslator.from(
31258
31414
  createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
31259
31415
  );
31260
- const translator$e = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
31261
- const translator$d = NodeTranslator.from({
31416
+ const translator$g = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
31417
+ const translator$f = NodeTranslator.from({
31262
31418
  xmlName: "w:tblpPr",
31263
31419
  sdNodeOrKeyName: "floatingTableProperties",
31264
31420
  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))),
@@ -31271,35 +31427,37 @@ const translator$d = NodeTranslator.from({
31271
31427
  }
31272
31428
  });
31273
31429
  const propertyTranslators$2 = [
31274
- translator$1n,
31430
+ translator$1p,
31431
+ translator$X,
31275
31432
  translator$V,
31276
- translator$T,
31277
- translator$S,
31433
+ translator$U,
31434
+ translator$1n,
31278
31435
  translator$1l,
31279
- translator$1j,
31280
- translator$R,
31281
- translator$1h
31436
+ translator$T,
31437
+ translator$1j
31282
31438
  ];
31283
- const translator$c = NodeTranslator.from(
31439
+ const translator$e = NodeTranslator.from(
31284
31440
  createNestedPropertiesTranslator("w:tblBorders", "borders", propertyTranslators$2)
31285
31441
  );
31286
31442
  const propertyTranslators$1 = [
31443
+ translator$1o,
31444
+ translator$W,
31287
31445
  translator$1m,
31288
- translator$U,
31289
31446
  translator$1k,
31290
- translator$1i,
31291
- translator$Q,
31292
- translator$1g
31447
+ translator$S,
31448
+ translator$1i
31293
31449
  ];
31294
- const translator$b = NodeTranslator.from(
31450
+ const translator$d = NodeTranslator.from(
31295
31451
  createNestedPropertiesTranslator("w:tblCellMar", "cellMargins", propertyTranslators$1)
31296
31452
  );
31297
31453
  const propertyTranslators = [
31454
+ translator$q,
31455
+ translator$1C,
31456
+ translator$1Q,
31457
+ translator$p,
31458
+ translator$B,
31298
31459
  translator$o,
31299
- translator$1A,
31300
- translator$1O,
31301
31460
  translator$n,
31302
- translator$z,
31303
31461
  translator$m,
31304
31462
  translator$l,
31305
31463
  translator$k,
@@ -31309,14 +31467,12 @@ const propertyTranslators = [
31309
31467
  translator$g,
31310
31468
  translator$f,
31311
31469
  translator$e,
31312
- translator$d,
31313
- translator$c,
31314
- translator$b
31470
+ translator$d
31315
31471
  ];
31316
- const translator$a = NodeTranslator.from(
31472
+ const translator$c = NodeTranslator.from(
31317
31473
  createNestedPropertiesTranslator("w:tblPr", "tableProperties", propertyTranslators)
31318
31474
  );
31319
- const translator$9 = NodeTranslator.from(
31475
+ const translator$b = NodeTranslator.from(
31320
31476
  createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
31321
31477
  );
31322
31478
  const DEFAULT_COLUMN_WIDTH_PX = 100;
@@ -31366,24 +31522,24 @@ const resolveFallbackColumnWidthTwips = (params, totalColumns, cellMinWidthTwips
31366
31522
  }
31367
31523
  return Math.max(fallbackWidthTwips, cellMinWidthTwips);
31368
31524
  };
31369
- const XML_NODE_NAME$9 = "w:tblGrid";
31525
+ const XML_NODE_NAME$b = "w:tblGrid";
31370
31526
  const SD_ATTR_KEY$1 = "grid";
31371
31527
  const cellMinWidth = pixelsToTwips(10);
31372
- const encode$f = (params) => {
31528
+ const encode$h = (params) => {
31373
31529
  const { nodes } = params;
31374
31530
  const node = nodes[0];
31375
31531
  const attributes = encodeProperties(
31376
31532
  { ...params, nodes: [node] },
31377
- { [translator$9.xmlName]: translator$9 },
31533
+ { [translator$b.xmlName]: translator$b },
31378
31534
  true
31379
31535
  );
31380
31536
  return {
31381
- xmlName: XML_NODE_NAME$9,
31537
+ xmlName: XML_NODE_NAME$b,
31382
31538
  sdNodeOrKeyName: SD_ATTR_KEY$1,
31383
31539
  attributes
31384
31540
  };
31385
31541
  };
31386
- const decode$h = (params) => {
31542
+ const decode$j = (params) => {
31387
31543
  const { grid: rawGrid } = params.node.attrs || {};
31388
31544
  const grid = Array.isArray(rawGrid) ? rawGrid : [];
31389
31545
  const { firstRow = {} } = params.extraParams || {};
@@ -31406,10 +31562,10 @@ const decode$h = (params) => {
31406
31562
  const roundedWidth = Math.round(numericWidth);
31407
31563
  const minimumWidth = shouldEnforceMinimum ? cellMinWidth : 1;
31408
31564
  const safeWidth = Math.max(roundedWidth, minimumWidth);
31409
- const decoded = translator$9.decode({
31565
+ const decoded = translator$b.decode({
31410
31566
  node: { type: (
31411
31567
  /** @type {string} */
31412
- translator$9.sdNodeOrKeyName
31568
+ translator$b.sdNodeOrKeyName
31413
31569
  ), attrs: { col: safeWidth } }
31414
31570
  });
31415
31571
  if (decoded) elements.push(decoded);
@@ -31449,19 +31605,19 @@ const decode$h = (params) => {
31449
31605
  columnIndex++;
31450
31606
  }
31451
31607
  const newNode = {
31452
- name: XML_NODE_NAME$9,
31608
+ name: XML_NODE_NAME$b,
31453
31609
  attributes: {},
31454
31610
  elements
31455
31611
  };
31456
31612
  return newNode;
31457
31613
  };
31458
- const config$8 = {
31459
- xmlName: XML_NODE_NAME$9,
31614
+ const config$a = {
31615
+ xmlName: XML_NODE_NAME$b,
31460
31616
  sdNodeOrKeyName: SD_ATTR_KEY$1,
31461
- encode: encode$f,
31462
- decode: decode$h
31617
+ encode: encode$h,
31618
+ decode: decode$j
31463
31619
  };
31464
- const translator$8 = NodeTranslator.from(config$8);
31620
+ const translator$a = NodeTranslator.from(config$a);
31465
31621
  const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
31466
31622
  const DEFAULT_PAGE_MARGIN_TWIPS = 1440;
31467
31623
  const DEFAULT_CONTENT_WIDTH_TWIPS = DEFAULT_PAGE_WIDTH_TWIPS - 2 * DEFAULT_PAGE_MARGIN_TWIPS;
@@ -31524,19 +31680,19 @@ const buildFallbackGridForTable = ({ params, rows, tableWidth, tableWidthMeasure
31524
31680
  columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
31525
31681
  };
31526
31682
  };
31527
- const XML_NODE_NAME$8 = "w:tbl";
31528
- const SD_NODE_NAME$7 = "table";
31529
- const encode$e = (params, encodedAttrs) => {
31683
+ const XML_NODE_NAME$a = "w:tbl";
31684
+ const SD_NODE_NAME$9 = "table";
31685
+ const encode$g = (params, encodedAttrs) => {
31530
31686
  const { nodes } = params;
31531
31687
  const node = nodes[0];
31532
31688
  const tblPr = node.elements.find((el) => el.name === "w:tblPr");
31533
31689
  if (tblPr) {
31534
- const encodedProperties = translator$a.encode({ ...params, nodes: [tblPr] });
31690
+ const encodedProperties = translator$c.encode({ ...params, nodes: [tblPr] });
31535
31691
  encodedAttrs["tableProperties"] = encodedProperties || {};
31536
31692
  }
31537
31693
  const tblGrid = node.elements.find((el) => el.name === "w:tblGrid");
31538
31694
  if (tblGrid) {
31539
- encodedAttrs["grid"] = translator$8.encode({ ...params, nodes: [tblGrid] }).attributes;
31695
+ encodedAttrs["grid"] = translator$a.encode({ ...params, nodes: [tblGrid] }).attributes;
31540
31696
  }
31541
31697
  [
31542
31698
  "tableStyleId",
@@ -31604,7 +31760,7 @@ const encode$e = (params, encodedAttrs) => {
31604
31760
  const totalColumns = columnWidths.length;
31605
31761
  const activeRowSpans = totalColumns > 0 ? new Array(totalColumns).fill(0) : [];
31606
31762
  rows.forEach((row, rowIndex) => {
31607
- const result = translator$t.encode({
31763
+ const result = translator$v.encode({
31608
31764
  ...params,
31609
31765
  nodes: [row],
31610
31766
  extraParams: {
@@ -31658,13 +31814,13 @@ const encode$e = (params, encodedAttrs) => {
31658
31814
  attrs: encodedAttrs
31659
31815
  };
31660
31816
  };
31661
- const decode$g = (params, decodedAttrs) => {
31817
+ const decode$i = (params, decodedAttrs) => {
31662
31818
  params.node = preProcessVerticalMergeCells(params.node, params);
31663
31819
  const { node } = params;
31664
31820
  const elements = translateChildNodes(params);
31665
31821
  const firstRow = node.content?.find((n) => n.type === "tableRow");
31666
31822
  const properties = node.attrs.grid;
31667
- const element = translator$8.decode({
31823
+ const element = translator$a.decode({
31668
31824
  ...params,
31669
31825
  node: { ...node, attrs: { ...node.attrs, grid: properties } },
31670
31826
  extraParams: {
@@ -31674,7 +31830,7 @@ const decode$g = (params, decodedAttrs) => {
31674
31830
  if (element) elements.unshift(element);
31675
31831
  if (node.attrs?.tableProperties) {
31676
31832
  const properties2 = { ...node.attrs.tableProperties };
31677
- const element2 = translator$a.decode({
31833
+ const element2 = translator$c.decode({
31678
31834
  ...params,
31679
31835
  node: { ...node, attrs: { ...node.attrs, tableProperties: properties2 } }
31680
31836
  });
@@ -31740,7 +31896,7 @@ function _getReferencedTableStyles(tableStyleReference, params) {
31740
31896
  if (baseTblPr && baseTblPr.elements) {
31741
31897
  tblPr.elements.push(...baseTblPr.elements);
31742
31898
  }
31743
- const tableProperties = translator$a.encode({ ...params, nodes: [tblPr] });
31899
+ const tableProperties = translator$c.encode({ ...params, nodes: [tblPr] });
31744
31900
  if (tableProperties) {
31745
31901
  const { borders, rowBorders } = _processTableBorders(tableProperties.borders || {});
31746
31902
  if (borders) stylesToReturn.borders = borders;
@@ -31759,85 +31915,85 @@ function _getReferencedTableStyles(tableStyleReference, params) {
31759
31915
  }
31760
31916
  return stylesToReturn;
31761
31917
  }
31762
- const config$7 = {
31763
- xmlName: XML_NODE_NAME$8,
31764
- sdNodeOrKeyName: SD_NODE_NAME$7,
31918
+ const config$9 = {
31919
+ xmlName: XML_NODE_NAME$a,
31920
+ sdNodeOrKeyName: SD_NODE_NAME$9,
31765
31921
  type: NodeTranslator.translatorTypes.NODE,
31766
- encode: encode$e,
31767
- decode: decode$g,
31922
+ encode: encode$g,
31923
+ decode: decode$i,
31768
31924
  attributes: []
31769
31925
  };
31770
- const translator$7 = NodeTranslator.from(config$7);
31771
- const encode$d = (attributes) => {
31926
+ const translator$9 = NodeTranslator.from(config$9);
31927
+ const encode$f = (attributes) => {
31772
31928
  return attributes["w:id"];
31773
31929
  };
31774
- const decode$f = (attrs) => {
31930
+ const decode$h = (attrs) => {
31775
31931
  return attrs.id;
31776
31932
  };
31777
31933
  const attrConfig$7 = Object.freeze({
31778
31934
  xmlName: "w:id",
31779
31935
  sdName: "id",
31780
- encode: encode$d,
31781
- decode: decode$f
31936
+ encode: encode$f,
31937
+ decode: decode$h
31782
31938
  });
31783
- const encode$c = (attributes) => {
31939
+ const encode$e = (attributes) => {
31784
31940
  return attributes["w:name"];
31785
31941
  };
31786
- const decode$e = (attrs) => {
31942
+ const decode$g = (attrs) => {
31787
31943
  return attrs.name;
31788
31944
  };
31789
31945
  const attrConfig$6 = Object.freeze({
31790
31946
  xmlName: "w:name",
31791
31947
  sdName: "name",
31792
- encode: encode$c,
31793
- decode: decode$e
31948
+ encode: encode$e,
31949
+ decode: decode$g
31794
31950
  });
31795
- const encode$b = (attributes) => {
31951
+ const encode$d = (attributes) => {
31796
31952
  return attributes["w:colFirst"];
31797
31953
  };
31798
- const decode$d = (attrs) => {
31954
+ const decode$f = (attrs) => {
31799
31955
  return attrs.colFirst;
31800
31956
  };
31801
31957
  const attrConfig$5 = Object.freeze({
31802
31958
  xmlName: "w:colFirst",
31803
31959
  sdName: "colFirst",
31804
- encode: encode$b,
31805
- decode: decode$d
31960
+ encode: encode$d,
31961
+ decode: decode$f
31806
31962
  });
31807
- const encode$a = (attributes) => {
31963
+ const encode$c = (attributes) => {
31808
31964
  return attributes["w:colLast"];
31809
31965
  };
31810
- const decode$c = (attrs) => {
31966
+ const decode$e = (attrs) => {
31811
31967
  return attrs.colLast;
31812
31968
  };
31813
31969
  const attrConfig$4 = Object.freeze({
31814
31970
  xmlName: "w:colLast",
31815
31971
  sdName: "colLast",
31816
- encode: encode$a,
31817
- decode: decode$c
31972
+ encode: encode$c,
31973
+ decode: decode$e
31818
31974
  });
31819
- const encode$9 = (attributes) => {
31975
+ const encode$b = (attributes) => {
31820
31976
  return attributes["w:displacedByCustomXml"];
31821
31977
  };
31822
- const decode$b = (attrs) => {
31978
+ const decode$d = (attrs) => {
31823
31979
  return attrs.displacedByCustomXml;
31824
31980
  };
31825
31981
  const attrConfig$3 = Object.freeze({
31826
31982
  xmlName: "w:displacedByCustomXml",
31827
31983
  sdName: "displacedByCustomXml",
31828
- encode: encode$9,
31829
- decode: decode$b
31984
+ encode: encode$b,
31985
+ decode: decode$d
31830
31986
  });
31831
31987
  const validXmlAttributes$4 = [attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3];
31832
- const XML_NODE_NAME$7 = "w:bookmarkStart";
31833
- const SD_NODE_NAME$6 = "bookmarkStart";
31834
- const encode$8 = (params, encodedAttrs = {}) => {
31988
+ const XML_NODE_NAME$9 = "w:bookmarkStart";
31989
+ const SD_NODE_NAME$8 = "bookmarkStart";
31990
+ const encode$a = (params, encodedAttrs = {}) => {
31835
31991
  return {
31836
31992
  type: "bookmarkStart",
31837
31993
  attrs: encodedAttrs
31838
31994
  };
31839
31995
  };
31840
- const decode$a = (params, decodedAttrs = {}) => {
31996
+ const decode$c = (params, decodedAttrs = {}) => {
31841
31997
  const result = {
31842
31998
  name: "w:bookmarkStart",
31843
31999
  elements: []
@@ -31847,49 +32003,49 @@ const decode$a = (params, decodedAttrs = {}) => {
31847
32003
  }
31848
32004
  return result;
31849
32005
  };
31850
- const config$6 = {
31851
- xmlName: XML_NODE_NAME$7,
31852
- sdNodeOrKeyName: SD_NODE_NAME$6,
32006
+ const config$8 = {
32007
+ xmlName: XML_NODE_NAME$9,
32008
+ sdNodeOrKeyName: SD_NODE_NAME$8,
31853
32009
  type: NodeTranslator.translatorTypes.NODE,
31854
- encode: encode$8,
31855
- decode: decode$a,
32010
+ encode: encode$a,
32011
+ decode: decode$c,
31856
32012
  attributes: validXmlAttributes$4
31857
32013
  };
31858
- const translator$6 = NodeTranslator.from(config$6);
31859
- const encode$7 = (attributes) => {
32014
+ const translator$8 = NodeTranslator.from(config$8);
32015
+ const encode$9 = (attributes) => {
31860
32016
  return attributes["w:id"];
31861
32017
  };
31862
- const decode$9 = (attrs) => {
32018
+ const decode$b = (attrs) => {
31863
32019
  return attrs.id;
31864
32020
  };
31865
32021
  const attrConfig$2 = Object.freeze({
31866
32022
  xmlName: "w:id",
31867
32023
  sdName: "id",
31868
- encode: encode$7,
31869
- decode: decode$9
32024
+ encode: encode$9,
32025
+ decode: decode$b
31870
32026
  });
31871
- const encode$6 = (attributes) => {
32027
+ const encode$8 = (attributes) => {
31872
32028
  return attributes["w:displacedByCustomXml"];
31873
32029
  };
31874
- const decode$8 = (attrs) => {
32030
+ const decode$a = (attrs) => {
31875
32031
  return attrs.displacedByCustomXml;
31876
32032
  };
31877
32033
  const attrConfig$1 = Object.freeze({
31878
32034
  xmlName: "w:displacedByCustomXml",
31879
32035
  sdName: "displacedByCustomXml",
31880
- encode: encode$6,
31881
- decode: decode$8
32036
+ encode: encode$8,
32037
+ decode: decode$a
31882
32038
  });
31883
32039
  const validXmlAttributes$3 = [attrConfig$2, attrConfig$1];
31884
- const XML_NODE_NAME$6 = "w:bookmarkEnd";
31885
- const SD_NODE_NAME$5 = "bookmarkEnd";
31886
- const encode$5 = (params, encodedAttrs = {}) => {
32040
+ const XML_NODE_NAME$8 = "w:bookmarkEnd";
32041
+ const SD_NODE_NAME$7 = "bookmarkEnd";
32042
+ const encode$7 = (params, encodedAttrs = {}) => {
31887
32043
  return {
31888
32044
  type: "bookmarkEnd",
31889
32045
  attrs: encodedAttrs
31890
32046
  };
31891
32047
  };
31892
- const decode$7 = (params, decodedAttrs = {}) => {
32048
+ const decode$9 = (params, decodedAttrs = {}) => {
31893
32049
  const result = {
31894
32050
  name: "w:bookmarkEnd",
31895
32051
  elements: []
@@ -31899,27 +32055,27 @@ const decode$7 = (params, decodedAttrs = {}) => {
31899
32055
  }
31900
32056
  return result;
31901
32057
  };
31902
- const config$5 = {
31903
- xmlName: XML_NODE_NAME$6,
31904
- sdNodeOrKeyName: SD_NODE_NAME$5,
32058
+ const config$7 = {
32059
+ xmlName: XML_NODE_NAME$8,
32060
+ sdNodeOrKeyName: SD_NODE_NAME$7,
31905
32061
  type: NodeTranslator.translatorTypes.NODE,
31906
- encode: encode$5,
31907
- decode: decode$7,
32062
+ encode: encode$7,
32063
+ decode: decode$9,
31908
32064
  attributes: validXmlAttributes$3
31909
32065
  };
31910
- const translator$5 = NodeTranslator.from(config$5);
31911
- const decode$6 = (attrs) => attrs?.["w:id"];
32066
+ const translator$7 = NodeTranslator.from(config$7);
32067
+ const decode$8 = (attrs) => attrs?.["w:id"];
31912
32068
  const attrConfig = Object.freeze({
31913
32069
  xmlName: "w:id",
31914
32070
  sdName: "w:id",
31915
32071
  // We do not translate it from 'w:id' to 'id' when encoding, so the name is the same
31916
32072
  encode: () => {
31917
32073
  },
31918
- decode: decode$6
32074
+ decode: decode$8
31919
32075
  });
31920
- const XML_NODE_NAME$5 = "w:commentRange";
31921
- const SD_NODE_NAME$4 = "commentRange";
31922
- const decode$5 = (params) => {
32076
+ const XML_NODE_NAME$7 = "w:commentRange";
32077
+ const SD_NODE_NAME$6 = "commentRange";
32078
+ const decode$7 = (params) => {
31923
32079
  const { node, comments, commentsExportType, exportedCommentDefs } = params;
31924
32080
  if (!node) return;
31925
32081
  if (!comments) return;
@@ -31962,19 +32118,19 @@ const getCommentSchema = (type2, commentIndex) => {
31962
32118
  };
31963
32119
  };
31964
32120
  const getConfig = (type2) => ({
31965
- xmlName: `${XML_NODE_NAME$5}${type2}`,
31966
- sdNodeOrKeyName: `${SD_NODE_NAME$4}${type2}`,
32121
+ xmlName: `${XML_NODE_NAME$7}${type2}`,
32122
+ sdNodeOrKeyName: `${SD_NODE_NAME$6}${type2}`,
31967
32123
  type: NodeTranslator.translatorTypes.NODE,
31968
32124
  encode: () => {
31969
32125
  },
31970
- decode: decode$5,
32126
+ decode: decode$7,
31971
32127
  attributes: [attrConfig]
31972
32128
  });
31973
32129
  const commentRangeStartTranslator = NodeTranslator.from(getConfig("Start"));
31974
32130
  const commentRangeEndTranslator = NodeTranslator.from(getConfig("End"));
31975
- const XML_NODE_NAME$4 = "sd:pageReference";
31976
- const SD_NODE_NAME$3 = "pageReference";
31977
- const encode$4 = (params) => {
32131
+ const XML_NODE_NAME$6 = "sd:pageReference";
32132
+ const SD_NODE_NAME$5 = "pageReference";
32133
+ const encode$6 = (params) => {
31978
32134
  const { nodes = [], nodeListHandler } = params || {};
31979
32135
  const node = nodes[0];
31980
32136
  const processedText = nodeListHandler.handler({
@@ -31991,7 +32147,7 @@ const encode$4 = (params) => {
31991
32147
  };
31992
32148
  return processedNode;
31993
32149
  };
31994
- const decode$4 = (params) => {
32150
+ const decode$6 = (params) => {
31995
32151
  const { node } = params;
31996
32152
  const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
31997
32153
  const contentNodes = (node.content ?? []).flatMap((n) => exportSchemaToJson({ ...params, node: n }));
@@ -32064,17 +32220,17 @@ const decode$4 = (params) => {
32064
32220
  ];
32065
32221
  return translated;
32066
32222
  };
32067
- const config$4 = {
32068
- xmlName: XML_NODE_NAME$4,
32069
- sdNodeOrKeyName: SD_NODE_NAME$3,
32223
+ const config$6 = {
32224
+ xmlName: XML_NODE_NAME$6,
32225
+ sdNodeOrKeyName: SD_NODE_NAME$5,
32070
32226
  type: NodeTranslator.translatorTypes.NODE,
32071
- encode: encode$4,
32072
- decode: decode$4
32227
+ encode: encode$6,
32228
+ decode: decode$6
32073
32229
  };
32074
- const translator$4 = NodeTranslator.from(config$4);
32075
- const XML_NODE_NAME$3 = "sd:tableOfContents";
32076
- const SD_NODE_NAME$2 = "tableOfContents";
32077
- const encode$3 = (params) => {
32230
+ const translator$6 = NodeTranslator.from(config$6);
32231
+ const XML_NODE_NAME$5 = "sd:tableOfContents";
32232
+ const SD_NODE_NAME$4 = "tableOfContents";
32233
+ const encode$5 = (params) => {
32078
32234
  const { nodes = [], nodeListHandler } = params || {};
32079
32235
  const node = nodes[0];
32080
32236
  const processedContent = nodeListHandler.handler({
@@ -32090,7 +32246,7 @@ const encode$3 = (params) => {
32090
32246
  };
32091
32247
  return processedNode;
32092
32248
  };
32093
- const decode$3 = (params) => {
32249
+ const decode$5 = (params) => {
32094
32250
  const { node } = params;
32095
32251
  const contentNodes = node.content.map((n) => exportSchemaToJson({ ...params, node: n }));
32096
32252
  const tocBeginElements = [
@@ -32137,6 +32293,194 @@ const decode$3 = (params) => {
32137
32293
  }
32138
32294
  return contentNodes;
32139
32295
  };
32296
+ const config$5 = {
32297
+ xmlName: XML_NODE_NAME$5,
32298
+ sdNodeOrKeyName: SD_NODE_NAME$4,
32299
+ type: NodeTranslator.translatorTypes.NODE,
32300
+ encode: encode$5,
32301
+ decode: decode$5
32302
+ };
32303
+ const translator$5 = NodeTranslator.from(config$5);
32304
+ const XML_NODE_NAME$4 = "sd:autoPageNumber";
32305
+ const SD_NODE_NAME$3 = "page-number";
32306
+ const encode$4 = (params) => {
32307
+ const { nodes = [] } = params || {};
32308
+ const node = nodes[0];
32309
+ const rPr = node.elements?.find((el) => el.name === "w:rPr");
32310
+ const marks = parseMarks(rPr || { elements: [] });
32311
+ const processedNode = {
32312
+ type: "page-number",
32313
+ attrs: {
32314
+ marksAsAttrs: marks
32315
+ }
32316
+ };
32317
+ return processedNode;
32318
+ };
32319
+ const decode$4 = (params) => {
32320
+ const { node } = params;
32321
+ const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
32322
+ const translated = [
32323
+ {
32324
+ name: "w:r",
32325
+ elements: [
32326
+ {
32327
+ name: "w:rPr",
32328
+ elements: outputMarks
32329
+ },
32330
+ {
32331
+ name: "w:fldChar",
32332
+ attributes: {
32333
+ "w:fldCharType": "begin"
32334
+ }
32335
+ }
32336
+ ]
32337
+ },
32338
+ {
32339
+ name: "w:r",
32340
+ elements: [
32341
+ {
32342
+ name: "w:rPr",
32343
+ elements: outputMarks
32344
+ },
32345
+ {
32346
+ name: "w:instrText",
32347
+ attributes: { "xml:space": "preserve" },
32348
+ elements: [
32349
+ {
32350
+ type: "text",
32351
+ text: " PAGE"
32352
+ }
32353
+ ]
32354
+ }
32355
+ ]
32356
+ },
32357
+ {
32358
+ name: "w:r",
32359
+ elements: [
32360
+ {
32361
+ name: "w:rPr",
32362
+ elements: outputMarks
32363
+ },
32364
+ {
32365
+ name: "w:fldChar",
32366
+ attributes: {
32367
+ "w:fldCharType": "separate"
32368
+ }
32369
+ }
32370
+ ]
32371
+ },
32372
+ {
32373
+ name: "w:r",
32374
+ elements: [
32375
+ {
32376
+ name: "w:rPr",
32377
+ elements: outputMarks
32378
+ },
32379
+ {
32380
+ name: "w:fldChar",
32381
+ attributes: {
32382
+ "w:fldCharType": "end"
32383
+ }
32384
+ }
32385
+ ]
32386
+ }
32387
+ ];
32388
+ return translated;
32389
+ };
32390
+ const config$4 = {
32391
+ xmlName: XML_NODE_NAME$4,
32392
+ sdNodeOrKeyName: SD_NODE_NAME$3,
32393
+ type: NodeTranslator.translatorTypes.NODE,
32394
+ encode: encode$4,
32395
+ decode: decode$4
32396
+ };
32397
+ const translator$4 = NodeTranslator.from(config$4);
32398
+ const XML_NODE_NAME$3 = "sd:totalPageNumber";
32399
+ const SD_NODE_NAME$2 = "total-page-number";
32400
+ const encode$3 = (params) => {
32401
+ const { nodes = [] } = params || {};
32402
+ const node = nodes[0];
32403
+ const rPr = node.elements?.find((el) => el.name === "w:rPr");
32404
+ const marks = parseMarks(rPr || { elements: [] });
32405
+ const processedNode = {
32406
+ type: "total-page-number",
32407
+ attrs: {
32408
+ marksAsAttrs: marks
32409
+ }
32410
+ };
32411
+ return processedNode;
32412
+ };
32413
+ const decode$3 = (params) => {
32414
+ const { node } = params;
32415
+ const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
32416
+ const translated = [
32417
+ {
32418
+ name: "w:r",
32419
+ elements: [
32420
+ {
32421
+ name: "w:rPr",
32422
+ elements: outputMarks
32423
+ },
32424
+ {
32425
+ name: "w:fldChar",
32426
+ attributes: {
32427
+ "w:fldCharType": "begin"
32428
+ }
32429
+ }
32430
+ ]
32431
+ },
32432
+ {
32433
+ name: "w:r",
32434
+ elements: [
32435
+ {
32436
+ name: "w:rPr",
32437
+ elements: outputMarks
32438
+ },
32439
+ {
32440
+ name: "w:instrText",
32441
+ attributes: { "xml:space": "preserve" },
32442
+ elements: [
32443
+ {
32444
+ type: "text",
32445
+ text: " NUMPAGES"
32446
+ }
32447
+ ]
32448
+ }
32449
+ ]
32450
+ },
32451
+ {
32452
+ name: "w:r",
32453
+ elements: [
32454
+ {
32455
+ name: "w:rPr",
32456
+ elements: outputMarks
32457
+ },
32458
+ {
32459
+ name: "w:fldChar",
32460
+ attributes: {
32461
+ "w:fldCharType": "separate"
32462
+ }
32463
+ }
32464
+ ]
32465
+ },
32466
+ {
32467
+ name: "w:r",
32468
+ elements: [
32469
+ {
32470
+ name: "w:rPr",
32471
+ elements: outputMarks
32472
+ },
32473
+ {
32474
+ name: "w:fldChar",
32475
+ attributes: {
32476
+ "w:fldCharType": "end"
32477
+ }
32478
+ }
32479
+ ]
32480
+ }
32481
+ ];
32482
+ return translated;
32483
+ };
32140
32484
  const config$3 = {
32141
32485
  xmlName: XML_NODE_NAME$3,
32142
32486
  sdNodeOrKeyName: SD_NODE_NAME$2,
@@ -32196,7 +32540,7 @@ function handleVRectImport({ pNode, pict, params }) {
32196
32540
  if (isHorizontalRule) {
32197
32541
  schemaAttrs.horizontalRule = true;
32198
32542
  }
32199
- const pElement = translator$$.encode({
32543
+ const pElement = translator$11.encode({
32200
32544
  ...params,
32201
32545
  nodes: [{ ...pNode, elements: pNode.elements.filter((el) => el.name !== "w:r") }]
32202
32546
  });
@@ -32253,7 +32597,7 @@ const handleDrawingNode = (params) => {
32253
32597
  if (mainNode.name === "w:drawing") node = mainNode;
32254
32598
  else node = mainNode.elements.find((el) => el.name === "w:drawing");
32255
32599
  if (!node) return { nodes: [], consumed: 0 };
32256
- const schemaNode = translator$q.encode(params);
32600
+ const schemaNode = translator$s.encode(params);
32257
32601
  const newNodes = schemaNode ? [schemaNode] : [];
32258
32602
  return { nodes: newNodes, consumed: 1 };
32259
32603
  };
@@ -32368,7 +32712,7 @@ const handleTrackChangeNode = (params) => {
32368
32712
  });
32369
32713
  break;
32370
32714
  case "w:ins":
32371
- result = translator$1u.encode({
32715
+ result = translator$1w.encode({
32372
32716
  ...translatorParams,
32373
32717
  extraParams: {
32374
32718
  ...translatorParams.extraParams,
@@ -32383,8 +32727,8 @@ const trackChangeNodeHandlerEntity = {
32383
32727
  handlerName: "trackChangeNodeHandler",
32384
32728
  handler: handleTrackChangeNode
32385
32729
  };
32386
- const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$_);
32387
- const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$Z);
32730
+ const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$10);
32731
+ const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$$);
32388
32732
  const XML_NODE_NAME$1 = "w:t";
32389
32733
  const SD_NODE_NAME$1 = "text";
32390
32734
  const validXmlAttributes$1 = [createAttributeHandler("xml:space", "xmlSpace")];
@@ -32424,12 +32768,12 @@ const decode$1 = (params) => {
32424
32768
  case "trackDelete":
32425
32769
  return translator$2.decode(params);
32426
32770
  case "trackInsert":
32427
- return translator$1u.decode(params);
32771
+ return translator$1w.decode(params);
32428
32772
  }
32429
32773
  }
32430
32774
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
32431
32775
  if (isLinkNode && !extraParams?.linkProcessed) {
32432
- return translator$_.decode(params);
32776
+ return translator$10.decode(params);
32433
32777
  }
32434
32778
  const { text, marks = [] } = node;
32435
32779
  return getTextNodeForExport(text, marks, params);
@@ -32471,7 +32815,7 @@ const handleParagraphNode = (params) => {
32471
32815
  if (nodes.length === 0 || nodes[0].name !== "w:p") {
32472
32816
  return { nodes: [], consumed: 0 };
32473
32817
  }
32474
- const schemaNode = translator$$.encode(params);
32818
+ const schemaNode = translator$11.encode(params);
32475
32819
  const newNodes = schemaNode ? [schemaNode] : [];
32476
32820
  return { nodes: newNodes, consumed: 1 };
32477
32821
  };
@@ -32484,7 +32828,7 @@ const handleSdtNode = (params) => {
32484
32828
  if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
32485
32829
  return { nodes: [], consumed: 0 };
32486
32830
  }
32487
- const result = translator$p.encode(params);
32831
+ const result = translator$r.encode(params);
32488
32832
  if (!result) {
32489
32833
  return { nodes: [], consumed: 0 };
32490
32834
  }
@@ -32625,7 +32969,7 @@ const handler = (params) => {
32625
32969
  if (nodes.length === 0 || nodes[0].name !== "w:br") {
32626
32970
  return { nodes: [], consumed: 0 };
32627
32971
  }
32628
- const result = translator$21.encode(params);
32972
+ const result = translator$23.encode(params);
32629
32973
  if (!result) return { nodes: [], consumed: 0 };
32630
32974
  return {
32631
32975
  nodes: [result],
@@ -32697,7 +33041,7 @@ const handleBookmarkStartNode = (params) => {
32697
33041
  if (isCustomMarkBookmark(nodes[0], params.editor)) {
32698
33042
  return handleBookmarkNode(params);
32699
33043
  }
32700
- const node = translator$6.encode(params);
33044
+ const node = translator$8.encode(params);
32701
33045
  if (!node) return { nodes: [], consumed: 0 };
32702
33046
  return { nodes: [node], consumed: 1 };
32703
33047
  };
@@ -32729,7 +33073,7 @@ const handleBookmarkEndNode = (params) => {
32729
33073
  if (!nodes.length || nodes[0].name !== "w:bookmarkEnd") {
32730
33074
  return { nodes: [], consumed: 0 };
32731
33075
  }
32732
- const node = translator$5.encode(params);
33076
+ const node = translator$7.encode(params);
32733
33077
  if (!node) return { nodes: [], consumed: 0 };
32734
33078
  return { nodes: [node], consumed: 1 };
32735
33079
  };
@@ -32779,71 +33123,35 @@ const handleAlternateChoice = (params) => {
32779
33123
  ...currentNode,
32780
33124
  type: "element"
32781
33125
  };
32782
- const translated = translator$1K.encode({
32783
- ...params,
32784
- nodes: [nodeForTranslator],
32785
- extraParams: { ...params.extraParams || {}, node: nodeForTranslator }
32786
- });
32787
- if (!translated) {
32788
- return skipHandlerResponse;
32789
- }
32790
- const nodesArray = Array.isArray(translated) ? translated : [translated];
32791
- return { nodes: nodesArray, consumed: 1 };
32792
- }
32793
- const sanitizedNode = buildNodeWithoutAlternateContent(currentNode);
32794
- if (!sanitizedNode) {
32795
- return skipHandlerResponse;
32796
- }
32797
- const result = nodeListHandler.handler({
32798
- ...params,
32799
- nodes: [sanitizedNode],
32800
- path: [...params.path || [], sanitizedNode]
32801
- });
32802
- return { nodes: result, consumed: 1 };
32803
- };
32804
- const alternateChoiceHandler = {
32805
- handlerName: "alternateChoiceHandler",
32806
- handler: handleAlternateChoice
32807
- };
32808
- const handleAutoPageNumber = (params) => {
32809
- const { nodes } = params;
32810
- if (nodes.length === 0 || nodes[0].name !== "sd:autoPageNumber") {
32811
- return { nodes: [], consumed: 0 };
32812
- }
32813
- const rPr = nodes[0].elements?.find((el) => el.name === "w:rPr");
32814
- const marks = parseMarks(rPr || { elements: [] });
32815
- const processedNode = {
32816
- type: "page-number",
32817
- attrs: {
32818
- marksAsAttrs: marks
32819
- }
32820
- };
32821
- return { nodes: [processedNode], consumed: 1 };
32822
- };
32823
- const autoPageHandlerEntity = {
32824
- handlerName: "autoPageNumberHandler",
32825
- handler: handleAutoPageNumber
32826
- };
32827
- const handleAutoTotalPageNumber = (params) => {
32828
- const { nodes } = params;
32829
- if (nodes.length === 0 || nodes[0].name !== "sd:totalPageNumber") {
32830
- return { nodes: [], consumed: 0 };
32831
- }
32832
- const rPr = nodes[0].elements?.find((el) => el.name === "w:rPr");
32833
- const marks = parseMarks(rPr || { elements: [] });
32834
- const processedNode = {
32835
- type: "total-page-number",
32836
- attrs: {
32837
- marksAsAttrs: marks
33126
+ const translated = translator$1M.encode({
33127
+ ...params,
33128
+ nodes: [nodeForTranslator],
33129
+ extraParams: { ...params.extraParams || {}, node: nodeForTranslator }
33130
+ });
33131
+ if (!translated) {
33132
+ return skipHandlerResponse;
32838
33133
  }
32839
- };
32840
- return { nodes: [processedNode], consumed: 1 };
33134
+ const nodesArray = Array.isArray(translated) ? translated : [translated];
33135
+ return { nodes: nodesArray, consumed: 1 };
33136
+ }
33137
+ const sanitizedNode = buildNodeWithoutAlternateContent(currentNode);
33138
+ if (!sanitizedNode) {
33139
+ return skipHandlerResponse;
33140
+ }
33141
+ const result = nodeListHandler.handler({
33142
+ ...params,
33143
+ nodes: [sanitizedNode],
33144
+ path: [...params.path || [], sanitizedNode]
33145
+ });
33146
+ return { nodes: result, consumed: 1 };
32841
33147
  };
32842
- const autoTotalPageCountEntity = {
32843
- handlerName: "autoTotalPageCountEntity",
32844
- handler: handleAutoTotalPageNumber
33148
+ const alternateChoiceHandler = {
33149
+ handlerName: "alternateChoiceHandler",
33150
+ handler: handleAlternateChoice
32845
33151
  };
32846
- const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$4);
33152
+ const autoPageHandlerEntity = generateV2HandlerEntity("autoPageNumberHandler", translator$4);
33153
+ const autoTotalPageCountEntity = generateV2HandlerEntity("autoTotalPageCountEntity", translator$3);
33154
+ const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$6);
32847
33155
  const handlePictNode = (params) => {
32848
33156
  const { nodes } = params;
32849
33157
  if (!nodes.length || nodes[0].name !== "w:p") {
@@ -33516,15 +33824,15 @@ const handleTabNode = (params) => {
33516
33824
  if (!nodes.length || nodes[0].name !== "w:tab") {
33517
33825
  return { nodes: [], consumed: 0 };
33518
33826
  }
33519
- const node = translator$1$.encode(params);
33827
+ const node = translator$21.encode(params);
33520
33828
  return { nodes: [node], consumed: 1 };
33521
33829
  };
33522
33830
  const tabNodeEntityHandler = {
33523
33831
  handlerName: "w:tabTranslator",
33524
33832
  handler: handleTabNode
33525
33833
  };
33526
- const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$7);
33527
- const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$3);
33834
+ const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$9);
33835
+ const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$5);
33528
33836
  function preProcessPageInstruction(nodesToCombine) {
33529
33837
  const pageNumNode = {
33530
33838
  name: "sd:autoPageNumber",
@@ -34376,7 +34684,7 @@ function translateContentBlock(params) {
34376
34684
  if (vmlAttributes || horizontalRule) {
34377
34685
  return translateVRectContentBlock(params);
34378
34686
  }
34379
- const alternateContent = translator$1K.decode(params);
34687
+ const alternateContent = translator$1M.decode(params);
34380
34688
  return wrapTextInRun(alternateContent);
34381
34689
  }
34382
34690
  function translateVRectContentBlock(params) {
@@ -34457,7 +34765,6 @@ const config = {
34457
34765
  attributes: validXmlAttributes
34458
34766
  };
34459
34767
  const translator = NodeTranslator.from(config);
34460
- const RUN_LEVEL_WRAPPERS = /* @__PURE__ */ new Set(["w:hyperlink", "w:ins", "w:del"]);
34461
34768
  const DEFAULT_SECTION_PROPS_TWIPS = Object.freeze({
34462
34769
  pageSize: Object.freeze({ width: "12240", height: "15840" }),
34463
34770
  pageMargins: Object.freeze({
@@ -34515,64 +34822,25 @@ const ensureSectionLayoutDefaults = (sectPr, converter) => {
34515
34822
  });
34516
34823
  return sectPr;
34517
34824
  };
34518
- function convertSdtContentToRuns(elements) {
34519
- const normalized = Array.isArray(elements) ? elements : [elements];
34520
- const runs = [];
34521
- normalized.forEach((element) => {
34522
- if (!element) return;
34523
- if (element.name === "w:sdtPr") {
34524
- return;
34525
- }
34526
- if (element.name === "w:r") {
34527
- runs.push(element);
34528
- return;
34529
- }
34530
- if (element.name === "w:sdt") {
34531
- const sdtContent = (element.elements || []).find((child) => child?.name === "w:sdtContent");
34532
- if (sdtContent?.elements) {
34533
- runs.push(...convertSdtContentToRuns(sdtContent.elements));
34534
- }
34535
- return;
34536
- }
34537
- if (RUN_LEVEL_WRAPPERS.has(element.name)) {
34538
- const wrapperElements = convertSdtContentToRuns(element.elements || []);
34539
- if (wrapperElements.length) {
34540
- runs.push({
34541
- ...element,
34542
- elements: wrapperElements
34543
- });
34544
- }
34545
- return;
34546
- }
34547
- if (element.name) {
34548
- runs.push({
34549
- name: "w:r",
34550
- type: "element",
34551
- elements: element.elements || [element]
34552
- });
34553
- }
34554
- });
34555
- return runs.filter((run2) => Array.isArray(run2.elements) && run2.elements.length > 0);
34556
- }
34557
34825
  function exportSchemaToJson(params) {
34558
34826
  const { type: type2 } = params.node || {};
34559
34827
  const router = {
34560
34828
  doc: translateDocumentNode,
34561
34829
  body: translateBodyNode,
34562
34830
  heading: translateHeadingNode,
34563
- paragraph: translator$$,
34564
- run: translator$Z,
34831
+ paragraph: translator$11,
34832
+ run: translator$$,
34565
34833
  text: translator$1,
34566
- lineBreak: translator$21,
34567
- table: translator$7,
34568
- tableRow: translator$t,
34569
- tableCell: translator$E,
34570
- bookmarkStart: translator$6,
34571
- bookmarkEnd: translator$5,
34572
- fieldAnnotation: translator$p,
34573
- tab: translator$1$,
34574
- image: translator$q,
34575
- hardBreak: translator$21,
34834
+ lineBreak: translator$23,
34835
+ table: translator$9,
34836
+ tableRow: translator$v,
34837
+ tableCell: translator$G,
34838
+ bookmarkStart: translator$8,
34839
+ bookmarkEnd: translator$7,
34840
+ fieldAnnotation: translator$r,
34841
+ tab: translator$21,
34842
+ image: translator$s,
34843
+ hardBreak: translator$23,
34576
34844
  commentRangeStart: commentRangeStartTranslator,
34577
34845
  commentRangeEnd: commentRangeEndTranslator,
34578
34846
  commentReference: () => null,
@@ -34581,14 +34849,14 @@ function exportSchemaToJson(params) {
34581
34849
  contentBlock: translator,
34582
34850
  vectorShape: translateVectorShape,
34583
34851
  shapeGroup: translateShapeGroup,
34584
- structuredContent: translator$p,
34585
- structuredContentBlock: translator$p,
34586
- documentPartObject: translator$p,
34587
- documentSection: translator$p,
34588
- "page-number": translatePageNumberNode,
34589
- "total-page-number": translateTotalPageNumberNode,
34590
- pageReference: translator$4,
34591
- tableOfContents: translator$3
34852
+ structuredContent: translator$r,
34853
+ structuredContentBlock: translator$r,
34854
+ documentPartObject: translator$r,
34855
+ documentSection: translator$r,
34856
+ "page-number": translator$4,
34857
+ "total-page-number": translator$3,
34858
+ pageReference: translator$6,
34859
+ tableOfContents: translator$5
34592
34860
  };
34593
34861
  let handler2 = router[type2];
34594
34862
  if (handler2 && "decode" in handler2 && typeof handler2.decode === "function") {
@@ -34660,57 +34928,7 @@ function translateHeadingNode(params) {
34660
34928
  // Maps to Heading1, Heading2, etc. in Word
34661
34929
  }
34662
34930
  };
34663
- return translateParagraphNode({ ...params, node: paragraphNode });
34664
- }
34665
- function translateParagraphNode(params) {
34666
- const elements = translateChildNodes(params);
34667
- const htmlAnnotationChild = elements.find((element) => element.name === "htmlAnnotation");
34668
- if (htmlAnnotationChild) {
34669
- return htmlAnnotationChild.elements;
34670
- }
34671
- const pPr = generateParagraphProperties(params);
34672
- if (pPr) elements.unshift(pPr);
34673
- let attributes = {};
34674
- if (params.node.attrs?.rsidRDefault) {
34675
- attributes["w:rsidRDefault"] = params.node.attrs.rsidRDefault;
34676
- }
34677
- const result = {
34678
- name: "w:p",
34679
- elements,
34680
- attributes
34681
- };
34682
- return result;
34683
- }
34684
- function generateParagraphProperties(params) {
34685
- const { node } = params;
34686
- const { attrs = {} } = node;
34687
- const paragraphProperties = carbonCopy(attrs.paragraphProperties || {});
34688
- if (attrs.styleId !== paragraphProperties.styleId) {
34689
- paragraphProperties.styleId = attrs.styleId;
34690
- }
34691
- ["borders", "styleId", "indent", "textAlign", "keepLines", "keepNext", "spacing", "tabStops"].forEach((key) => {
34692
- let propKey = key === "textAlign" ? "justification" : key;
34693
- if (JSON.stringify(paragraphProperties[propKey]) !== JSON.stringify(attrs[key])) {
34694
- paragraphProperties[key] = attrs[key];
34695
- }
34696
- });
34697
- const framePr = attrs.dropcap;
34698
- if (framePr) {
34699
- framePr.dropCap = framePr.type;
34700
- delete framePr.type;
34701
- }
34702
- if (JSON.stringify(paragraphProperties.framePr) !== JSON.stringify(framePr)) {
34703
- paragraphProperties.framePr = framePr;
34704
- }
34705
- const marksProps = decodeRPrFromMarks(attrs.marksAttrs || []);
34706
- const finalRunProps = combineRunProperties([paragraphProperties.runProperties || {}, marksProps]);
34707
- paragraphProperties.runProperties = finalRunProps;
34708
- const pPr = translator$10.decode({ node: { ...node, attrs: { paragraphProperties } } });
34709
- const sectPr = node.attrs?.paragraphProperties?.sectPr;
34710
- if (sectPr) {
34711
- pPr.elements.push(sectPr);
34712
- }
34713
- return pPr;
34931
+ return translator$11.decode({ ...params, node: paragraphNode });
34714
34932
  }
34715
34933
  function translateDocumentNode(params) {
34716
34934
  const bodyNode = {
@@ -34725,59 +34943,6 @@ function translateDocumentNode(params) {
34725
34943
  };
34726
34944
  return [node, params];
34727
34945
  }
34728
- function getTextNodeForExport(text, marks, params) {
34729
- const hasLeadingOrTrailingSpace = /^\s|\s$/.test(text);
34730
- const space = hasLeadingOrTrailingSpace ? "preserve" : null;
34731
- const nodeAttrs = space ? { "xml:space": space } : null;
34732
- const textNodes = [];
34733
- const textRunProperties = decodeRPrFromMarks(marks || []);
34734
- const parentRunProperties = params.extraParams?.runProperties || {};
34735
- const combinedRunProperties = combineRunProperties([parentRunProperties, textRunProperties]);
34736
- const rPrNode = translator$1L.decode({ node: { attrs: { runProperties: combinedRunProperties } } });
34737
- textNodes.push({
34738
- name: "w:t",
34739
- elements: [{ text, type: "text" }],
34740
- attributes: nodeAttrs
34741
- });
34742
- if (params) {
34743
- const { editor } = params;
34744
- const customMarks = editor.extensionService.extensions.filter((e) => e.isExternal === true);
34745
- marks.forEach((mark) => {
34746
- const isCustomMark = customMarks.some((customMark) => {
34747
- const customMarkName = customMark.name;
34748
- return mark.type === customMarkName;
34749
- });
34750
- if (!isCustomMark) return;
34751
- let attrsString = "";
34752
- Object.entries(mark.attrs).forEach(([key, value]) => {
34753
- if (value) {
34754
- attrsString += `${key}=${value};`;
34755
- }
34756
- });
34757
- if (isCustomMark) {
34758
- textNodes.unshift({
34759
- type: "element",
34760
- name: "w:bookmarkStart",
34761
- attributes: {
34762
- "w:id": "5000",
34763
- "w:name": mark.type + ";" + attrsString
34764
- }
34765
- });
34766
- textNodes.push({
34767
- type: "element",
34768
- name: "w:bookmarkEnd",
34769
- attributes: {
34770
- "w:id": "5000"
34771
- }
34772
- });
34773
- }
34774
- });
34775
- }
34776
- return {
34777
- name: "w:r",
34778
- elements: rPrNode ? [rPrNode, ...textNodes] : textNodes
34779
- };
34780
- }
34781
34946
  function wrapTextInRun(nodeOrNodes, marks) {
34782
34947
  let elements = [];
34783
34948
  if (Array.isArray(nodeOrNodes)) elements = nodeOrNodes;
@@ -34806,60 +34971,6 @@ function processOutputMarks(marks = []) {
34806
34971
  }
34807
34972
  });
34808
34973
  }
34809
- function processLinkContentNode(node) {
34810
- if (!node) return node;
34811
- const contentNode = carbonCopy(node);
34812
- if (!contentNode) return contentNode;
34813
- const hyperlinkStyle = {
34814
- name: "w:rStyle",
34815
- attributes: { "w:val": "Hyperlink" }
34816
- };
34817
- const color = {
34818
- name: "w:color",
34819
- attributes: { "w:val": "467886" }
34820
- };
34821
- const underline = {
34822
- name: "w:u",
34823
- attributes: {
34824
- "w:val": "none"
34825
- }
34826
- };
34827
- if (contentNode.name === "w:r") {
34828
- const runProps = contentNode.elements.find((el) => el.name === "w:rPr");
34829
- if (runProps) {
34830
- const foundColor = runProps.elements.find((el) => el.name === "w:color");
34831
- const foundHyperlinkStyle = runProps.elements.find((el) => el.name === "w:rStyle");
34832
- const underlineMark = runProps.elements.find((el) => el.name === "w:u");
34833
- if (!foundColor) runProps.elements.unshift(color);
34834
- if (!foundHyperlinkStyle) runProps.elements.unshift(hyperlinkStyle);
34835
- if (!underlineMark) runProps.elements.unshift(underline);
34836
- } else {
34837
- const runProps2 = {
34838
- name: "w:rPr",
34839
- elements: [hyperlinkStyle, color]
34840
- };
34841
- contentNode.elements.unshift(runProps2);
34842
- }
34843
- }
34844
- return contentNode;
34845
- }
34846
- function addNewLinkRelationship(params, link) {
34847
- const newId = "rId" + generateDocxRandomId();
34848
- if (!params.relationships || !Array.isArray(params.relationships)) {
34849
- params.relationships = [];
34850
- }
34851
- params.relationships.push({
34852
- type: "element",
34853
- name: "Relationship",
34854
- attributes: {
34855
- Id: newId,
34856
- Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
34857
- Target: link,
34858
- TargetMode: "External"
34859
- }
34860
- });
34861
- return newId;
34862
- }
34863
34974
  function translateMark(mark) {
34864
34975
  const xmlMark = SuperConverter.markTypes.find((m2) => m2.type === mark.type);
34865
34976
  if (!xmlMark) {
@@ -34886,7 +34997,7 @@ function translateMark(mark) {
34886
34997
  markElement.type = "element";
34887
34998
  break;
34888
34999
  case "underline": {
34889
- const translated = translator$1X.decode({
35000
+ const translated = translator$1Z.decode({
34890
35001
  node: {
34891
35002
  attrs: {
34892
35003
  underlineType: attrs.underlineType ?? attrs.underline ?? null,
@@ -34950,7 +35061,7 @@ function translateMark(mark) {
34950
35061
  break;
34951
35062
  case "highlight": {
34952
35063
  const highlightValue = attrs.color ?? attrs.highlight ?? null;
34953
- const translated = translator$20.decode({ node: { attrs: { highlight: highlightValue } } });
35064
+ const translated = translator$22.decode({ node: { attrs: { highlight: highlightValue } } });
34954
35065
  return translated || {};
34955
35066
  }
34956
35067
  case "strike":
@@ -35032,82 +35143,6 @@ generateXml_fn = function(node) {
35032
35143
  if (!selfClosing) tags.push(`</${name}>`);
35033
35144
  return tags;
35034
35145
  };
35035
- const translatePageNumberNode = (params) => {
35036
- const outputMarks = processOutputMarks(params.node.attrs?.marksAsAttrs || []);
35037
- return getAutoPageJson("PAGE", outputMarks);
35038
- };
35039
- const translateTotalPageNumberNode = (params) => {
35040
- const outputMarks = processOutputMarks(params.node.attrs?.marksAsAttrs || []);
35041
- return getAutoPageJson("NUMPAGES", outputMarks);
35042
- };
35043
- const getAutoPageJson = (type2, outputMarks = []) => {
35044
- return [
35045
- {
35046
- name: "w:r",
35047
- elements: [
35048
- {
35049
- name: "w:rPr",
35050
- elements: outputMarks
35051
- },
35052
- {
35053
- name: "w:fldChar",
35054
- attributes: {
35055
- "w:fldCharType": "begin"
35056
- }
35057
- }
35058
- ]
35059
- },
35060
- {
35061
- name: "w:r",
35062
- elements: [
35063
- {
35064
- name: "w:rPr",
35065
- elements: outputMarks
35066
- },
35067
- {
35068
- name: "w:instrText",
35069
- attributes: { "xml:space": "preserve" },
35070
- elements: [
35071
- {
35072
- type: "text",
35073
- text: ` ${type2}`
35074
- }
35075
- ]
35076
- }
35077
- ]
35078
- },
35079
- {
35080
- name: "w:r",
35081
- elements: [
35082
- {
35083
- name: "w:rPr",
35084
- elements: outputMarks
35085
- },
35086
- {
35087
- name: "w:fldChar",
35088
- attributes: {
35089
- "w:fldCharType": "separate"
35090
- }
35091
- }
35092
- ]
35093
- },
35094
- {
35095
- name: "w:r",
35096
- elements: [
35097
- {
35098
- name: "w:rPr",
35099
- elements: outputMarks
35100
- },
35101
- {
35102
- name: "w:fldChar",
35103
- attributes: {
35104
- "w:fldCharType": "end"
35105
- }
35106
- }
35107
- ]
35108
- }
35109
- ];
35110
- };
35111
35146
  const prepareCommentParaIds = (comment) => {
35112
35147
  const newComment = {
35113
35148
  ...comment,
@@ -35116,7 +35151,7 @@ const prepareCommentParaIds = (comment) => {
35116
35151
  return newComment;
35117
35152
  };
35118
35153
  const getCommentDefinition = (comment, commentId, allComments, editor) => {
35119
- const translatedText = translateParagraphNode({ editor, node: comment.commentJSON });
35154
+ const translatedText = translator$11.decode({ editor, node: comment.commentJSON });
35120
35155
  const attributes = {
35121
35156
  "w:id": String(commentId),
35122
35157
  "w:author": comment.creatorName || comment.importedAuthor?.name,
@@ -35531,7 +35566,7 @@ const _SuperConverter = class _SuperConverter {
35531
35566
  static getStoredSuperdocVersion(docx) {
35532
35567
  return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
35533
35568
  }
35534
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.31.0-next.3") {
35569
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.31.0-next.5") {
35535
35570
  return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
35536
35571
  }
35537
35572
  /**
@@ -36144,7 +36179,7 @@ export {
36144
36179
  comments_module_events as Z,
36145
36180
  findMark as _,
36146
36181
  Plugin as a,
36147
- translator$W as a$,
36182
+ translator$Y as a$,
36148
36183
  AddMarkStep as a0,
36149
36184
  RemoveMarkStep as a1,
36150
36185
  twipsToLines as a2,
@@ -36168,20 +36203,20 @@ export {
36168
36203
  readFromClipboard as aK,
36169
36204
  handleClipboardPaste as aL,
36170
36205
  getFileObject as aM,
36171
- translator$F as aN,
36172
- translator$L as aO,
36173
- translator$N as aP,
36174
- translator$G as aQ,
36175
- translator$H as aR,
36176
- translator$O as aS,
36177
- translator$P as aT,
36178
- translator$15 as aU,
36179
- translator$I as aV,
36180
- translator$Y as aW,
36181
- translator$K as aX,
36182
- translator$M as aY,
36183
- translator$J as aZ,
36184
- translator$X as a_,
36206
+ translator$H as aN,
36207
+ translator$N as aO,
36208
+ translator$P as aP,
36209
+ translator$I as aQ,
36210
+ translator$J as aR,
36211
+ translator$Q as aS,
36212
+ translator$R as aT,
36213
+ translator$17 as aU,
36214
+ translator$K as aV,
36215
+ translator$_ as aW,
36216
+ translator$M as aX,
36217
+ translator$O as aY,
36218
+ translator$L as aZ,
36219
+ translator$Z as a_,
36185
36220
  createDocFromHTML as aa,
36186
36221
  EditorState as ab,
36187
36222
  hasSomeParentWithClass as ac,
@@ -36209,78 +36244,78 @@ export {
36209
36244
  SelectionRange as ay,
36210
36245
  Transform as az,
36211
36246
  Slice as b,
36212
- translator$6 as b$,
36247
+ translator$8 as b$,
36213
36248
  commentRangeEndTranslator as b0,
36214
36249
  commentRangeStartTranslator as b1,
36215
- translator$r as b2,
36216
- translator$s as b3,
36217
- translator$v as b4,
36218
- translator$w as b5,
36219
- translator$1X as b6,
36220
- translator$u as b7,
36221
- translator$x as b8,
36222
- translator$t as b9,
36223
- translator$p as bA,
36224
- translator$1j as bB,
36225
- translator$1S as bC,
36226
- translator$1L as bD,
36227
- translator$1T as bE,
36228
- translator$Z as bF,
36229
- translator$$ as bG,
36230
- translator$1l as bH,
36231
- translator$1A as bI,
36232
- translator$S as bJ,
36233
- translator$T as bK,
36234
- translator$1Y as bL,
36235
- translator$_ as bM,
36236
- translator$20 as bN,
36237
- translator$A as bO,
36238
- translator$9 as bP,
36239
- translator$B as bQ,
36240
- translator$C as bR,
36241
- translator$V as bS,
36242
- translator$q as bT,
36243
- translator$1D as bU,
36244
- translator$1U as bV,
36245
- translator$1F as bW,
36246
- translator$1P as bX,
36247
- translator$D as bY,
36248
- translator$21 as bZ,
36249
- translator$1n as b_,
36250
- translator$1h as ba,
36251
- translator$E as bb,
36252
- translator$d as bc,
36253
- translator$e as bd,
36254
- translator$f as be,
36255
- translator$g as bf,
36256
- translator$h as bg,
36257
- translator$a as bh,
36258
- translator$i as bi,
36259
- translator$j as bj,
36260
- translator$k as bk,
36261
- translator$l as bl,
36262
- translator$y as bm,
36263
- translator$8 as bn,
36264
- translator$m as bo,
36265
- translator$z as bp,
36266
- translator$b as bq,
36267
- translator$n as br,
36268
- translator$c as bs,
36269
- translator$7 as bt,
36270
- translator$1$ as bu,
36271
- translator$1Q as bv,
36272
- translator$1R as bw,
36273
- translator$1W as bx,
36274
- translator$R as by,
36275
- translator$1O as bz,
36250
+ translator$t as b2,
36251
+ translator$u as b3,
36252
+ translator$x as b4,
36253
+ translator$y as b5,
36254
+ translator$1Z as b6,
36255
+ translator$w as b7,
36256
+ translator$z as b8,
36257
+ translator$v as b9,
36258
+ translator$r as bA,
36259
+ translator$1l as bB,
36260
+ translator$1U as bC,
36261
+ translator$1N as bD,
36262
+ translator$1V as bE,
36263
+ translator$$ as bF,
36264
+ translator$11 as bG,
36265
+ translator$1n as bH,
36266
+ translator$1C as bI,
36267
+ translator$U as bJ,
36268
+ translator$V as bK,
36269
+ translator$1_ as bL,
36270
+ translator$10 as bM,
36271
+ translator$22 as bN,
36272
+ translator$C as bO,
36273
+ translator$b as bP,
36274
+ translator$D as bQ,
36275
+ translator$E as bR,
36276
+ translator$X as bS,
36277
+ translator$s as bT,
36278
+ translator$1F as bU,
36279
+ translator$1W as bV,
36280
+ translator$1H as bW,
36281
+ translator$1R as bX,
36282
+ translator$F as bY,
36283
+ translator$23 as bZ,
36284
+ translator$1p as b_,
36285
+ translator$1j as ba,
36286
+ translator$G as bb,
36287
+ translator$f as bc,
36288
+ translator$g as bd,
36289
+ translator$h as be,
36290
+ translator$i as bf,
36291
+ translator$j as bg,
36292
+ translator$c as bh,
36293
+ translator$k as bi,
36294
+ translator$l as bj,
36295
+ translator$m as bk,
36296
+ translator$n as bl,
36297
+ translator$A as bm,
36298
+ translator$a as bn,
36299
+ translator$o as bo,
36300
+ translator$B as bp,
36301
+ translator$d as bq,
36302
+ translator$p as br,
36303
+ translator$e as bs,
36304
+ translator$9 as bt,
36305
+ translator$21 as bu,
36306
+ translator$1S as bv,
36307
+ translator$1T as bw,
36308
+ translator$1Y as bx,
36309
+ translator$T as by,
36310
+ translator$1Q as bz,
36276
36311
  DOMParser$1 as c,
36277
- translator$5 as c0,
36278
- translator$o as c1,
36279
- translator$1Z as c2,
36280
- translator$1_ as c3,
36281
- translator$3 as c4,
36282
- translator$4 as c5,
36283
- translator$1K as c6,
36312
+ translator$7 as c0,
36313
+ translator$q as c1,
36314
+ translator$1$ as c2,
36315
+ translator$20 as c3,
36316
+ translator$5 as c4,
36317
+ translator$6 as c5,
36318
+ translator$1M as c6,
36284
36319
  Mark as d,
36285
36320
  dropPoint as e,
36286
36321
  callOrGet as f,