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
@@ -15427,19 +15427,6 @@
15427
15427
  if (element2.className?.split(" ")?.indexOf(classname) >= 0) return true;
15428
15428
  return element2.parentNode && hasSomeParentWithClass(element2.parentNode, classname);
15429
15429
  };
15430
- function generateDocxRandomId(length2 = 8) {
15431
- const max2 = 2147483647;
15432
- const value = Math.floor(Math.random() * (max2 + 1));
15433
- return value.toString(16).padStart(length2, "0").slice(0, length2);
15434
- }
15435
- function generateRandomSigned32BitIntStrId() {
15436
- const val = Math.floor(Math.random() * 2147483647);
15437
- return val.toString();
15438
- }
15439
- function generateRandom32BitHex() {
15440
- const val = Math.floor(Math.random() * 2147483647);
15441
- return val.toString(16).toUpperCase().padStart(8, "0");
15442
- }
15443
15430
  const DEFAULT_DOCX_DEFS = {
15444
15431
  "xmlns:wpc": "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
15445
15432
  "xmlns:cx": "http://schemas.microsoft.com/office/drawing/2014/chartex",
@@ -16645,15 +16632,6 @@
16645
16632
  DOCUMENT_RELS_XML_DEF,
16646
16633
  CONTENT_TYPES
16647
16634
  };
16648
- const carbonCopy = (obj) => {
16649
- if (!obj) return void 0;
16650
- try {
16651
- return JSON.parse(JSON.stringify(obj));
16652
- } catch (e) {
16653
- console.error("Error in carbonCopy", obj, e);
16654
- return void 0;
16655
- }
16656
- };
16657
16635
  function translateChildNodes(params2) {
16658
16636
  const { content: nodes } = params2.node;
16659
16637
  if (!nodes) return [];
@@ -18054,37 +18032,37 @@
18054
18032
  };
18055
18033
  __publicField$2(_NodeTranslator, "translatorTypes", TranslatorTypes);
18056
18034
  let NodeTranslator = _NodeTranslator;
18057
- const encode$P = (attributes) => {
18035
+ const encode$R = (attributes) => {
18058
18036
  return attributes["w:type"];
18059
18037
  };
18060
- const decode$R = (attrs) => {
18038
+ const decode$T = (attrs) => {
18061
18039
  const { lineBreakType } = attrs;
18062
18040
  return lineBreakType;
18063
18041
  };
18064
18042
  const attrConfig$s = Object.freeze({
18065
18043
  xmlName: "w:type",
18066
18044
  sdName: "lineBreakType",
18067
- encode: encode$P,
18068
- decode: decode$R
18045
+ encode: encode$R,
18046
+ decode: decode$T
18069
18047
  });
18070
- const encode$O = (attributes) => {
18048
+ const encode$Q = (attributes) => {
18071
18049
  const xmlAttrValue = attributes["w:clear"];
18072
18050
  return xmlAttrValue;
18073
18051
  };
18074
- const decode$Q = (attrs) => {
18052
+ const decode$S = (attrs) => {
18075
18053
  const { clear } = attrs;
18076
18054
  return clear;
18077
18055
  };
18078
18056
  const attrConfig$r = Object.freeze({
18079
18057
  xmlName: "w:clear",
18080
18058
  sdName: "clear",
18081
- encode: encode$O,
18082
- decode: decode$Q
18059
+ encode: encode$Q,
18060
+ decode: decode$S
18083
18061
  });
18084
18062
  const validXmlAttributes$j = [attrConfig$s, attrConfig$r];
18085
- const XML_NODE_NAME$o = "w:br";
18086
- const SD_NODE_NAME$i = "lineBreak";
18087
- const encode$N = (_2, encodedAttrs) => {
18063
+ const XML_NODE_NAME$q = "w:br";
18064
+ const SD_NODE_NAME$k = "lineBreak";
18065
+ const encode$P = (_2, encodedAttrs) => {
18088
18066
  const isPageBreak = encodedAttrs?.lineBreakType === "page";
18089
18067
  const translated = {
18090
18068
  type: isPageBreak ? "hardBreak" : "lineBreak"
@@ -18094,7 +18072,7 @@
18094
18072
  }
18095
18073
  return translated;
18096
18074
  };
18097
- const decode$P = (params2, decodedAttrs) => {
18075
+ const decode$R = (params2, decodedAttrs) => {
18098
18076
  const { node: node2 } = params2;
18099
18077
  if (!node2) return;
18100
18078
  const wBreak = { name: "w:br" };
@@ -18111,39 +18089,39 @@
18111
18089
  };
18112
18090
  return translated;
18113
18091
  };
18114
- const config$n = {
18115
- xmlName: XML_NODE_NAME$o,
18116
- sdNodeOrKeyName: SD_NODE_NAME$i,
18092
+ const config$p = {
18093
+ xmlName: XML_NODE_NAME$q,
18094
+ sdNodeOrKeyName: SD_NODE_NAME$k,
18117
18095
  type: NodeTranslator.translatorTypes.NODE,
18118
- encode: encode$N,
18119
- decode: decode$P,
18096
+ encode: encode$P,
18097
+ decode: decode$R,
18120
18098
  attributes: validXmlAttributes$j
18121
18099
  };
18122
- const translator$21 = NodeTranslator.from(config$n);
18123
- const encode$M = (attributes) => attributes?.["w:val"];
18124
- const decode$O = (attrs) => attrs?.highlight;
18100
+ const translator$23 = NodeTranslator.from(config$p);
18101
+ const encode$O = (attributes) => attributes?.["w:val"];
18102
+ const decode$Q = (attrs) => attrs?.highlight;
18125
18103
  const attrConfig$q = Object.freeze({
18126
18104
  xmlName: "w:val",
18127
18105
  sdName: "highlight",
18128
- encode: encode$M,
18129
- decode: decode$O
18106
+ encode: encode$O,
18107
+ decode: decode$Q
18130
18108
  });
18131
18109
  const validXmlAttributes$i = [attrConfig$q];
18132
- const XML_NODE_NAME$n = "w:highlight";
18110
+ const XML_NODE_NAME$p = "w:highlight";
18133
18111
  const SD_ATTR_KEY$4 = "highlight";
18134
18112
  const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
18135
- const encode$L = (params2, encodedAttrs = {}) => {
18113
+ const encode$N = (params2, encodedAttrs = {}) => {
18136
18114
  const { nodes } = params2;
18137
18115
  const node2 = nodes?.[0];
18138
18116
  const value = encodedAttrs.highlight ?? node2?.attributes?.["w:val"];
18139
18117
  return {
18140
18118
  type: "attr",
18141
- xmlName: XML_NODE_NAME$n,
18119
+ xmlName: XML_NODE_NAME$p,
18142
18120
  sdNodeOrKeyName: SD_ATTR_KEY$4,
18143
18121
  attributes: { "w:val": value ?? null }
18144
18122
  };
18145
18123
  };
18146
- const decode$N = (params2) => {
18124
+ const decode$P = (params2) => {
18147
18125
  const attrs = params2?.node?.attrs || {};
18148
18126
  const highlightValue = attrs.highlight?.["w:val"] ?? attrs.highlight ?? attrs.color ?? null;
18149
18127
  if (!highlightValue) return void 0;
@@ -18151,14 +18129,14 @@
18151
18129
  if (!normalizedValue) return void 0;
18152
18130
  if (DISABLED_TOKENS.has(normalizedValue)) {
18153
18131
  return {
18154
- name: XML_NODE_NAME$n,
18132
+ name: XML_NODE_NAME$p,
18155
18133
  attributes: { "w:val": "none" }
18156
18134
  };
18157
18135
  }
18158
18136
  const keyword = getDocxHighlightKeywordFromHex(highlightValue);
18159
18137
  if (keyword) {
18160
18138
  return {
18161
- name: XML_NODE_NAME$n,
18139
+ name: XML_NODE_NAME$p,
18162
18140
  attributes: { "w:val": keyword }
18163
18141
  };
18164
18142
  }
@@ -18173,64 +18151,64 @@
18173
18151
  }
18174
18152
  };
18175
18153
  };
18176
- const config$m = {
18177
- xmlName: XML_NODE_NAME$n,
18154
+ const config$o = {
18155
+ xmlName: XML_NODE_NAME$p,
18178
18156
  sdNodeOrKeyName: SD_ATTR_KEY$4,
18179
18157
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
18180
- encode: encode$L,
18181
- decode: decode$N,
18158
+ encode: encode$N,
18159
+ decode: decode$P,
18182
18160
  attributes: validXmlAttributes$i
18183
18161
  };
18184
- const translator$20 = NodeTranslator.from(config$m);
18185
- const encode$K = (attributes) => {
18162
+ const translator$22 = NodeTranslator.from(config$o);
18163
+ const encode$M = (attributes) => {
18186
18164
  return attributes["w:val"];
18187
18165
  };
18188
- const decode$M = (attrs) => {
18166
+ const decode$O = (attrs) => {
18189
18167
  const { tabType } = attrs || {};
18190
18168
  return tabType;
18191
18169
  };
18192
18170
  const attrConfig$p = Object.freeze({
18193
18171
  xmlName: "w:val",
18194
18172
  sdName: "tabType",
18195
- encode: encode$K,
18196
- decode: decode$M
18173
+ encode: encode$M,
18174
+ decode: decode$O
18197
18175
  });
18198
- const encode$J = (attributes) => {
18176
+ const encode$L = (attributes) => {
18199
18177
  return attributes["w:leader"];
18200
18178
  };
18201
- const decode$L = (attrs) => {
18179
+ const decode$N = (attrs) => {
18202
18180
  const { leader } = attrs || {};
18203
18181
  return leader;
18204
18182
  };
18205
18183
  const attrConfig$o = Object.freeze({
18206
18184
  xmlName: "w:leader",
18207
18185
  sdName: "leader",
18208
- encode: encode$J,
18209
- decode: decode$L
18186
+ encode: encode$L,
18187
+ decode: decode$N
18210
18188
  });
18211
- const encode$I = (attributes) => {
18189
+ const encode$K = (attributes) => {
18212
18190
  if (attributes["w:pos"] != null) return parseInt(attributes["w:pos"]);
18213
18191
  return null;
18214
18192
  };
18215
- const decode$K = (attrs) => {
18193
+ const decode$M = (attrs) => {
18216
18194
  const { pos } = attrs || {};
18217
18195
  return pos?.toString();
18218
18196
  };
18219
18197
  const attrConfig$n = Object.freeze({
18220
18198
  xmlName: "w:pos",
18221
18199
  sdName: "pos",
18222
- encode: encode$I,
18223
- decode: decode$K
18200
+ encode: encode$K,
18201
+ decode: decode$M
18224
18202
  });
18225
18203
  const validXmlAttributes$h = [attrConfig$p, attrConfig$n, attrConfig$o];
18226
- const XML_NODE_NAME$m = "w:tab";
18227
- const SD_NODE_NAME$h = "tab";
18228
- const encode$H = (_2, encodedAttrs = {}) => {
18204
+ const XML_NODE_NAME$o = "w:tab";
18205
+ const SD_NODE_NAME$j = "tab";
18206
+ const encode$J = (_2, encodedAttrs = {}) => {
18229
18207
  const translated = { type: "tab" };
18230
18208
  if (encodedAttrs) translated.attrs = { ...encodedAttrs };
18231
18209
  return translated;
18232
18210
  };
18233
- function decode$J(params2, decodedAttrs = {}) {
18211
+ function decode$L(params2, decodedAttrs = {}) {
18234
18212
  const { node: node2 } = params2 || {};
18235
18213
  if (!node2) return;
18236
18214
  const wTab = { name: "w:tab", elements: [] };
@@ -18252,15 +18230,24 @@
18252
18230
  }
18253
18231
  return translated;
18254
18232
  }
18255
- const config$l = {
18256
- xmlName: XML_NODE_NAME$m,
18257
- sdNodeOrKeyName: SD_NODE_NAME$h,
18233
+ const config$n = {
18234
+ xmlName: XML_NODE_NAME$o,
18235
+ sdNodeOrKeyName: SD_NODE_NAME$j,
18258
18236
  type: NodeTranslator.translatorTypes.NODE,
18259
- encode: encode$H,
18260
- decode: decode$J,
18237
+ encode: encode$J,
18238
+ decode: decode$L,
18261
18239
  attributes: validXmlAttributes$h
18262
18240
  };
18263
- const translator$1$ = NodeTranslator.from(config$l);
18241
+ const translator$21 = NodeTranslator.from(config$n);
18242
+ const carbonCopy = (obj) => {
18243
+ if (!obj) return void 0;
18244
+ try {
18245
+ return JSON.parse(JSON.stringify(obj));
18246
+ } catch (e) {
18247
+ console.error("Error in carbonCopy", obj, e);
18248
+ return void 0;
18249
+ }
18250
+ };
18264
18251
  const mergeTextNodes = (nodes) => {
18265
18252
  if (!nodes || !Array.isArray(nodes)) {
18266
18253
  return nodes;
@@ -18577,53 +18564,53 @@
18577
18564
  const intValue = parseInteger(value);
18578
18565
  return intValue != void 0 ? String(intValue) : void 0;
18579
18566
  };
18580
- const translator$1_ = NodeTranslator.from(createSingleBooleanPropertyHandler("w:b", "bold"));
18581
- const translator$1Z = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bCs", "boldCs"));
18582
- const translator$1Y = NodeTranslator.from(createSingleBooleanPropertyHandler("w:i", "italic"));
18583
- const encode$G = (attributes) => attributes?.["w:val"];
18584
- const decode$I = (attrs) => attrs?.underline;
18567
+ const translator$20 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:b", "bold"));
18568
+ const translator$1$ = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bCs", "boldCs"));
18569
+ const translator$1_ = NodeTranslator.from(createSingleBooleanPropertyHandler("w:i", "italic"));
18570
+ const encode$I = (attributes) => attributes?.["w:val"];
18571
+ const decode$K = (attrs) => attrs?.underline;
18585
18572
  const attrConfig$m = Object.freeze({
18586
18573
  xmlName: "w:val",
18587
18574
  sdName: "underline",
18588
- encode: encode$G,
18589
- decode: decode$I
18575
+ encode: encode$I,
18576
+ decode: decode$K
18590
18577
  });
18591
- const encode$F = (attributes) => attributes?.["w:color"];
18592
- const decode$H = (attrs) => attrs?.color;
18578
+ const encode$H = (attributes) => attributes?.["w:color"];
18579
+ const decode$J = (attrs) => attrs?.color;
18593
18580
  const attrConfig$l = Object.freeze({
18594
18581
  xmlName: "w:color",
18595
18582
  sdName: "color",
18596
- encode: encode$F,
18597
- decode: decode$H
18583
+ encode: encode$H,
18584
+ decode: decode$J
18598
18585
  });
18599
- const encode$E = (attributes) => attributes?.["w:themeColor"];
18600
- const decode$G = (attrs) => attrs?.themeColor;
18586
+ const encode$G = (attributes) => attributes?.["w:themeColor"];
18587
+ const decode$I = (attrs) => attrs?.themeColor;
18601
18588
  const attrConfig$k = Object.freeze({
18602
18589
  xmlName: "w:themeColor",
18603
18590
  sdName: "themeColor",
18604
- encode: encode$E,
18605
- decode: decode$G
18591
+ encode: encode$G,
18592
+ decode: decode$I
18606
18593
  });
18607
- const encode$D = (attributes) => attributes?.["w:themeTint"];
18608
- const decode$F = (attrs) => attrs?.themeTint;
18594
+ const encode$F = (attributes) => attributes?.["w:themeTint"];
18595
+ const decode$H = (attrs) => attrs?.themeTint;
18609
18596
  const attrConfig$j = Object.freeze({
18610
18597
  xmlName: "w:themeTint",
18611
18598
  sdName: "themeTint",
18612
- encode: encode$D,
18613
- decode: decode$F
18599
+ encode: encode$F,
18600
+ decode: decode$H
18614
18601
  });
18615
- const encode$C = (attributes) => attributes?.["w:themeShade"];
18616
- const decode$E = (attrs) => attrs?.themeShade;
18602
+ const encode$E = (attributes) => attributes?.["w:themeShade"];
18603
+ const decode$G = (attrs) => attrs?.themeShade;
18617
18604
  const attrConfig$i = Object.freeze({
18618
18605
  xmlName: "w:themeShade",
18619
18606
  sdName: "themeShade",
18620
- encode: encode$C,
18621
- decode: decode$E
18607
+ encode: encode$E,
18608
+ decode: decode$G
18622
18609
  });
18623
18610
  const validXmlAttributes$g = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j, attrConfig$i];
18624
- const XML_NODE_NAME$l = "w:u";
18611
+ const XML_NODE_NAME$n = "w:u";
18625
18612
  const SD_ATTR_KEY$3 = "underline";
18626
- const encode$B = (params2, encodedAttrs = {}) => {
18613
+ const encode$D = (params2, encodedAttrs = {}) => {
18627
18614
  const { nodes } = params2;
18628
18615
  const node2 = nodes?.[0];
18629
18616
  const sourceAttrs = node2?.attributes || {};
@@ -18639,12 +18626,12 @@
18639
18626
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
18640
18627
  return {
18641
18628
  type: "attr",
18642
- xmlName: XML_NODE_NAME$l,
18629
+ xmlName: XML_NODE_NAME$n,
18643
18630
  sdNodeOrKeyName: SD_ATTR_KEY$3,
18644
18631
  attributes
18645
18632
  };
18646
18633
  };
18647
- const decode$D = (params2) => {
18634
+ const decode$F = (params2) => {
18648
18635
  const attrs = params2?.node?.attrs?.underline || params2?.node?.attrs || {};
18649
18636
  const underlineType = attrs.underlineType ?? attrs.underline ?? attrs["w:val"] ?? null;
18650
18637
  const color2 = attrs.underlineColor ?? attrs.color ?? attrs["w:color"] ?? null;
@@ -18662,22 +18649,22 @@
18662
18649
  if (themeTint) attributes["w:themeTint"] = themeTint;
18663
18650
  if (themeShade) attributes["w:themeShade"] = themeShade;
18664
18651
  return {
18665
- name: XML_NODE_NAME$l,
18652
+ name: XML_NODE_NAME$n,
18666
18653
  attributes
18667
18654
  };
18668
18655
  };
18669
- const config$k = {
18670
- xmlName: XML_NODE_NAME$l,
18656
+ const config$m = {
18657
+ xmlName: XML_NODE_NAME$n,
18671
18658
  sdNodeOrKeyName: SD_ATTR_KEY$3,
18672
18659
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
18673
- encode: encode$B,
18674
- decode: decode$D,
18660
+ encode: encode$D,
18661
+ decode: decode$F,
18675
18662
  attributes: validXmlAttributes$g
18676
18663
  };
18677
- const translator$1X = NodeTranslator.from(config$k);
18678
- const translator$1W = NodeTranslator.from(createSingleBooleanPropertyHandler("w:strike"));
18679
- const translator$1V = NodeTranslator.from(createSingleBooleanPropertyHandler("w:dstrike"));
18680
- const translator$1U = NodeTranslator.from({
18664
+ const translator$1Z = NodeTranslator.from(config$m);
18665
+ const translator$1Y = NodeTranslator.from(createSingleBooleanPropertyHandler("w:strike"));
18666
+ const translator$1X = NodeTranslator.from(createSingleBooleanPropertyHandler("w:dstrike"));
18667
+ const translator$1W = NodeTranslator.from({
18681
18668
  xmlName: "w:color",
18682
18669
  sdNodeOrKeyName: "color",
18683
18670
  attributes: [
@@ -18694,7 +18681,7 @@
18694
18681
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18695
18682
  }
18696
18683
  });
18697
- const translator$1T = NodeTranslator.from({
18684
+ const translator$1V = NodeTranslator.from({
18698
18685
  xmlName: "w:rFonts",
18699
18686
  sdNodeOrKeyName: "fontFamily",
18700
18687
  attributes: [
@@ -18725,16 +18712,16 @@
18725
18712
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18726
18713
  }
18727
18714
  });
18728
- const translator$1S = NodeTranslator.from(createSingleAttrPropertyHandler("w:rStyle", "styleId"));
18729
- const translator$1R = NodeTranslator.from(createSingleIntegerPropertyHandler("w:sz", "fontSize"));
18730
- const translator$1Q = NodeTranslator.from(createSingleIntegerPropertyHandler("w:szCs", "fontSizeCs"));
18731
- const translator$1P = NodeTranslator.from({
18715
+ const translator$1U = NodeTranslator.from(createSingleAttrPropertyHandler("w:rStyle", "styleId"));
18716
+ const translator$1T = NodeTranslator.from(createSingleIntegerPropertyHandler("w:sz", "fontSize"));
18717
+ const translator$1S = NodeTranslator.from(createSingleIntegerPropertyHandler("w:szCs", "fontSizeCs"));
18718
+ const translator$1R = NodeTranslator.from({
18732
18719
  xmlName: "w:caps",
18733
18720
  sdNodeOrKeyName: "textTransform",
18734
18721
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1") ? "uppercase" : "none",
18735
18722
  decode: ({ node: node2 }) => node2.attrs["textTransform"] != null ? { name: "w:caps", attributes: { "w:val": booleanToString(node2.attrs["textTransform"] === "uppercase") } } : void 0
18736
18723
  });
18737
- const translator$1O = NodeTranslator.from({
18724
+ const translator$1Q = NodeTranslator.from({
18738
18725
  xmlName: "w:shd",
18739
18726
  sdNodeOrKeyName: "shading",
18740
18727
  attributes: [
@@ -18756,7 +18743,7 @@
18756
18743
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18757
18744
  }
18758
18745
  });
18759
- const translator$1N = NodeTranslator.from({
18746
+ const translator$1P = NodeTranslator.from({
18760
18747
  xmlName: "w:lang",
18761
18748
  sdNodeOrKeyName: "lang",
18762
18749
  attributes: [createAttributeHandler("w:val"), createAttributeHandler("w:eastAsia"), createAttributeHandler("w:bidi")],
@@ -18768,26 +18755,26 @@
18768
18755
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18769
18756
  }
18770
18757
  });
18771
- const translator$1M = NodeTranslator.from(createSingleIntegerPropertyHandler("w:spacing", "letterSpacing"));
18758
+ const translator$1O = NodeTranslator.from(createSingleIntegerPropertyHandler("w:spacing", "letterSpacing"));
18772
18759
  const propertyTranslators$b = [
18760
+ translator$20,
18761
+ translator$1$,
18773
18762
  translator$1_,
18774
18763
  translator$1Z,
18775
18764
  translator$1Y,
18776
18765
  translator$1X,
18777
18766
  translator$1W,
18767
+ translator$22,
18778
18768
  translator$1V,
18779
18769
  translator$1U,
18780
- translator$20,
18781
18770
  translator$1T,
18782
18771
  translator$1S,
18783
18772
  translator$1R,
18784
18773
  translator$1Q,
18785
18774
  translator$1P,
18786
- translator$1O,
18787
- translator$1N,
18788
- translator$1M
18775
+ translator$1O
18789
18776
  ];
18790
- const translator$1L = NodeTranslator.from(
18777
+ const translator$1N = NodeTranslator.from(
18791
18778
  createNestedPropertiesTranslator("w:rPr", "runProperties", propertyTranslators$b)
18792
18779
  );
18793
18780
  const SUPPORTED_ALTERNATE_CONTENT_REQUIRES = /* @__PURE__ */ new Set([
@@ -18804,10 +18791,10 @@
18804
18791
  "w16sdtfl",
18805
18792
  "w16se"
18806
18793
  ]);
18807
- const XML_NODE_NAME$k = "mc:AlternateContent";
18808
- const SD_NODE_NAME$g = [];
18794
+ const XML_NODE_NAME$m = "mc:AlternateContent";
18795
+ const SD_NODE_NAME$i = [];
18809
18796
  const validXmlAttributes$f = [];
18810
- function encode$A(params2) {
18797
+ function encode$C(params2) {
18811
18798
  const { nodeListHandler } = params2;
18812
18799
  const { node: node2 } = params2.extraParams;
18813
18800
  if (!node2 || !node2.type) {
@@ -18823,7 +18810,7 @@
18823
18810
  path: buildPath(params2.path, node2, branch)
18824
18811
  });
18825
18812
  }
18826
- function decode$C(params2) {
18813
+ function decode$E(params2) {
18827
18814
  const { node: node2 } = params2;
18828
18815
  const { drawingContent } = node2.attrs;
18829
18816
  const drawing = {
@@ -18840,12 +18827,12 @@
18840
18827
  elements: [choice]
18841
18828
  };
18842
18829
  }
18843
- const config$j = {
18844
- xmlName: XML_NODE_NAME$k,
18845
- sdNodeOrKeyName: SD_NODE_NAME$g,
18830
+ const config$l = {
18831
+ xmlName: XML_NODE_NAME$m,
18832
+ sdNodeOrKeyName: SD_NODE_NAME$i,
18846
18833
  type: NodeTranslator.translatorTypes.NODE,
18847
- encode: encode$A,
18848
- decode: decode$C,
18834
+ encode: encode$C,
18835
+ decode: decode$E,
18849
18836
  attributes: validXmlAttributes$f
18850
18837
  };
18851
18838
  function selectAlternateContentElements(node2) {
@@ -18869,18 +18856,18 @@
18869
18856
  elements: carbonCopy(selectedElements)
18870
18857
  };
18871
18858
  }
18872
- const translator$1K = NodeTranslator.from(config$j);
18859
+ const translator$1M = NodeTranslator.from(config$l);
18873
18860
  function buildPath(existingPath = [], node2, branch) {
18874
18861
  const path2 = [...existingPath];
18875
18862
  if (node2) path2.push(node2);
18876
18863
  if (branch) path2.push(branch);
18877
18864
  return path2;
18878
18865
  }
18879
- const translator$1J = NodeTranslator.from(createSingleBooleanPropertyHandler("w:adjustRightInd"));
18880
- const translator$1I = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDE"));
18881
- const translator$1H = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDN"));
18882
- const translator$1G = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bidi", "rightToLeft"));
18883
- const translator$1F = NodeTranslator.from({
18866
+ const translator$1L = NodeTranslator.from(createSingleBooleanPropertyHandler("w:adjustRightInd"));
18867
+ const translator$1K = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDE"));
18868
+ const translator$1J = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDN"));
18869
+ const translator$1I = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bidi", "rightToLeft"));
18870
+ const translator$1H = NodeTranslator.from({
18884
18871
  xmlName: "w:cnfStyle",
18885
18872
  sdNodeOrKeyName: "cnfStyle",
18886
18873
  attributes: [
@@ -18906,9 +18893,9 @@
18906
18893
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18907
18894
  }
18908
18895
  });
18909
- const translator$1E = NodeTranslator.from(createSingleBooleanPropertyHandler("w:contextualSpacing"));
18910
- const translator$1D = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
18911
- const translator$1C = NodeTranslator.from({
18896
+ const translator$1G = NodeTranslator.from(createSingleBooleanPropertyHandler("w:contextualSpacing"));
18897
+ const translator$1F = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
18898
+ const translator$1E = NodeTranslator.from({
18912
18899
  xmlName: "w:framePr",
18913
18900
  sdNodeOrKeyName: "framePr",
18914
18901
  attributes: [
@@ -18936,7 +18923,7 @@
18936
18923
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18937
18924
  }
18938
18925
  });
18939
- const translator$1B = NodeTranslator.from({
18926
+ const translator$1D = NodeTranslator.from({
18940
18927
  xmlName: "w:ind",
18941
18928
  sdNodeOrKeyName: "indent",
18942
18929
  attributes: [
@@ -18961,12 +18948,12 @@
18961
18948
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
18962
18949
  }
18963
18950
  });
18964
- const translator$1A = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
18965
- const translator$1z = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepLines"));
18966
- const translator$1y = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepNext"));
18967
- const translator$1x = NodeTranslator.from(createSingleBooleanPropertyHandler("w:kinsoku"));
18968
- const translator$1w = NodeTranslator.from(createSingleBooleanPropertyHandler("w:mirrorIndents"));
18969
- const translator$1v = NodeTranslator.from(createSingleIntegerPropertyHandler("w:ilvl"));
18951
+ const translator$1C = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
18952
+ const translator$1B = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepLines"));
18953
+ const translator$1A = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepNext"));
18954
+ const translator$1z = NodeTranslator.from(createSingleBooleanPropertyHandler("w:kinsoku"));
18955
+ const translator$1y = NodeTranslator.from(createSingleBooleanPropertyHandler("w:mirrorIndents"));
18956
+ const translator$1x = NodeTranslator.from(createSingleIntegerPropertyHandler("w:ilvl"));
18970
18957
  const createTrackStyleMark = (marks) => {
18971
18958
  const trackStyleMark = marks.find((mark2) => mark2.type === "trackFormat");
18972
18959
  if (trackStyleMark) {
@@ -18984,7 +18971,7 @@
18984
18971
  }
18985
18972
  return void 0;
18986
18973
  };
18987
- const XML_NODE_NAME$j = "w:ins";
18974
+ const XML_NODE_NAME$l = "w:ins";
18988
18975
  const SD_ATTR_KEY$2 = "trackInsert";
18989
18976
  const validXmlAttributes$e = [
18990
18977
  createAttributeHandler("w:id", "id"),
@@ -18992,7 +18979,7 @@
18992
18979
  createAttributeHandler("w:author", "author"),
18993
18980
  createAttributeHandler("w:authorEmail", "authorEmail")
18994
18981
  ];
18995
- const encode$z = (params2, encodedAttrs = {}) => {
18982
+ const encode$B = (params2, encodedAttrs = {}) => {
18996
18983
  const { nodeListHandler, extraParams = {} } = params2;
18997
18984
  const { node: node2 } = extraParams;
18998
18985
  const subs = nodeListHandler.handler({
@@ -19008,7 +18995,7 @@
19008
18995
  });
19009
18996
  return subs;
19010
18997
  };
19011
- function decode$B(params2) {
18998
+ function decode$D(params2) {
19012
18999
  const { node: node2 } = params2;
19013
19000
  if (!node2 || !node2.type) {
19014
19001
  return null;
@@ -19033,50 +19020,50 @@
19033
19020
  elements: [translatedTextNode]
19034
19021
  };
19035
19022
  }
19036
- const config$i = {
19037
- xmlName: XML_NODE_NAME$j,
19023
+ const config$k = {
19024
+ xmlName: XML_NODE_NAME$l,
19038
19025
  sdNodeOrKeyName: SD_ATTR_KEY$2,
19039
19026
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
19040
- encode: encode$z,
19041
- decode: decode$B,
19027
+ encode: encode$B,
19028
+ decode: decode$D,
19042
19029
  attributes: validXmlAttributes$e
19043
19030
  };
19044
- const translator$1u = NodeTranslator.from(config$i);
19045
- const translator$1t = NodeTranslator.from(createSingleIntegerPropertyHandler("w:numId"));
19046
- const propertyTranslators$a = [translator$1K, translator$1v, translator$1u, translator$1t];
19047
- const translator$1s = NodeTranslator.from(
19031
+ const translator$1w = NodeTranslator.from(config$k);
19032
+ const translator$1v = NodeTranslator.from(createSingleIntegerPropertyHandler("w:numId"));
19033
+ const propertyTranslators$a = [translator$1M, translator$1x, translator$1w, translator$1v];
19034
+ const translator$1u = NodeTranslator.from(
19048
19035
  createNestedPropertiesTranslator("w:numPr", "numberingProperties", propertyTranslators$a)
19049
19036
  );
19050
- const translator$1r = NodeTranslator.from(
19037
+ const translator$1t = NodeTranslator.from(
19051
19038
  createSingleAttrPropertyHandler("w:outlineLvl", "outlineLvl", "w:val", parseInteger, integerToString)
19052
19039
  );
19053
- const translator$1q = NodeTranslator.from(createSingleBooleanPropertyHandler("w:overflowPunct"));
19054
- const translator$1p = NodeTranslator.from(createBorderPropertyHandler("w:bar"));
19055
- const translator$1o = NodeTranslator.from(createBorderPropertyHandler("w:between"));
19056
- const translator$1n = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
19057
- const translator$1m = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
19058
- const translator$1l = NodeTranslator.from(createBorderPropertyHandler("w:left"));
19059
- const translator$1k = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
19060
- const translator$1j = NodeTranslator.from(createBorderPropertyHandler("w:right"));
19061
- const translator$1i = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
19062
- const translator$1h = NodeTranslator.from(createBorderPropertyHandler("w:top"));
19063
- const translator$1g = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
19040
+ const translator$1s = NodeTranslator.from(createSingleBooleanPropertyHandler("w:overflowPunct"));
19041
+ const translator$1r = NodeTranslator.from(createBorderPropertyHandler("w:bar"));
19042
+ const translator$1q = NodeTranslator.from(createBorderPropertyHandler("w:between"));
19043
+ const translator$1p = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
19044
+ const translator$1o = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
19045
+ const translator$1n = NodeTranslator.from(createBorderPropertyHandler("w:left"));
19046
+ const translator$1m = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
19047
+ const translator$1l = NodeTranslator.from(createBorderPropertyHandler("w:right"));
19048
+ const translator$1k = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
19049
+ const translator$1j = NodeTranslator.from(createBorderPropertyHandler("w:top"));
19050
+ const translator$1i = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
19064
19051
  const propertyTranslators$9 = [
19065
- translator$1K,
19052
+ translator$1M,
19053
+ translator$1r,
19054
+ translator$1q,
19066
19055
  translator$1p,
19067
- translator$1o,
19068
19056
  translator$1n,
19069
19057
  translator$1l,
19070
- translator$1j,
19071
- translator$1h
19058
+ translator$1j
19072
19059
  ];
19073
- const translator$1f = NodeTranslator.from(
19060
+ const translator$1h = NodeTranslator.from(
19074
19061
  createNestedPropertiesTranslator("w:pBdr", "borders", propertyTranslators$9)
19075
19062
  );
19076
- const translator$1e = NodeTranslator.from(createSingleAttrPropertyHandler("w:pStyle", "styleId"));
19077
- const translator$1d = NodeTranslator.from(createSingleBooleanPropertyHandler("w:pageBreakBefore"));
19078
- const translator$1c = NodeTranslator.from(createSingleBooleanPropertyHandler("w:snapToGrid"));
19079
- const translator$1b = NodeTranslator.from({
19063
+ const translator$1g = NodeTranslator.from(createSingleAttrPropertyHandler("w:pStyle", "styleId"));
19064
+ const translator$1f = NodeTranslator.from(createSingleBooleanPropertyHandler("w:pageBreakBefore"));
19065
+ const translator$1e = NodeTranslator.from(createSingleBooleanPropertyHandler("w:snapToGrid"));
19066
+ const translator$1d = NodeTranslator.from({
19080
19067
  xmlName: "w:spacing",
19081
19068
  sdNodeOrKeyName: "spacing",
19082
19069
  attributes: [
@@ -19097,20 +19084,22 @@
19097
19084
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
19098
19085
  }
19099
19086
  });
19100
- const translator$1a = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressAutoHyphens"));
19101
- const translator$19 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressLineNumbers"));
19102
- const translator$18 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressOverlap"));
19103
- const propertyTranslators$8 = [translator$1K, translator$1$];
19104
- const translator$17 = NodeTranslator.from(
19087
+ const translator$1c = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressAutoHyphens"));
19088
+ const translator$1b = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressLineNumbers"));
19089
+ const translator$1a = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressOverlap"));
19090
+ const propertyTranslators$8 = [translator$1M, translator$21];
19091
+ const translator$19 = NodeTranslator.from(
19105
19092
  createNestedArrayPropertyHandler("w:tabs", "tabStops", propertyTranslators$8, { skipRun: true })
19106
19093
  );
19107
- const translator$16 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textAlignment"));
19108
- const translator$15 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
19109
- const translator$14 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textboxTightWrap"));
19110
- const translator$13 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:topLinePunct"));
19111
- const translator$12 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:widowControl"));
19112
- const translator$11 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:wordWrap"));
19094
+ const translator$18 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textAlignment"));
19095
+ const translator$17 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
19096
+ const translator$16 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textboxTightWrap"));
19097
+ const translator$15 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:topLinePunct"));
19098
+ const translator$14 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:widowControl"));
19099
+ const translator$13 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:wordWrap"));
19113
19100
  const propertyTranslators$7 = [
19101
+ translator$1M,
19102
+ translator$1L,
19114
19103
  translator$1K,
19115
19104
  translator$1J,
19116
19105
  translator$1I,
@@ -19124,15 +19113,15 @@
19124
19113
  translator$1A,
19125
19114
  translator$1z,
19126
19115
  translator$1y,
19127
- translator$1x,
19128
- translator$1w,
19116
+ translator$1u,
19117
+ translator$1t,
19129
19118
  translator$1s,
19130
- translator$1r,
19131
- translator$1q,
19119
+ translator$1h,
19120
+ translator$1g,
19132
19121
  translator$1f,
19122
+ translator$1Q,
19133
19123
  translator$1e,
19134
19124
  translator$1d,
19135
- translator$1O,
19136
19125
  translator$1c,
19137
19126
  translator$1b,
19138
19127
  translator$1a,
@@ -19143,11 +19132,9 @@
19143
19132
  translator$15,
19144
19133
  translator$14,
19145
19134
  translator$13,
19146
- translator$12,
19147
- translator$11,
19148
- translator$1L
19135
+ translator$1N
19149
19136
  ];
19150
- const translator$10 = NodeTranslator.from(
19137
+ const translator$12 = NodeTranslator.from(
19151
19138
  createNestedPropertiesTranslator("w:pPr", "paragraphProperties", propertyTranslators$7)
19152
19139
  );
19153
19140
  function getUnderlineCssString({ type: type2 = "single", color: color2 = null, thickness = null, approximate = true } = {}) {
@@ -19216,12 +19203,12 @@
19216
19203
  }
19217
19204
  const resolveRunProperties = (params2, inlineRpr, resolvedPpr, isListNumber = false, numberingDefinedInline = false) => {
19218
19205
  const paragraphStyleId = resolvedPpr?.styleId;
19219
- const paragraphStyleProps = resolveStyleChain(params2, paragraphStyleId, translator$1L);
19220
- const defaultProps2 = getDefaultProperties(params2, translator$1L);
19221
- const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params2, "Normal", translator$1L);
19206
+ const paragraphStyleProps = resolveStyleChain(params2, paragraphStyleId, translator$1N);
19207
+ const defaultProps2 = getDefaultProperties(params2, translator$1N);
19208
+ const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params2, "Normal", translator$1N);
19222
19209
  let runStyleProps = {};
19223
19210
  if (!paragraphStyleId?.startsWith("TOC")) {
19224
- runStyleProps = inlineRpr.styleId ? resolveStyleChain(params2, inlineRpr.styleId, translator$1L) : {};
19211
+ runStyleProps = inlineRpr.styleId ? resolveStyleChain(params2, inlineRpr.styleId, translator$1N) : {};
19225
19212
  }
19226
19213
  let styleChain;
19227
19214
  if (isNormalDefault) {
@@ -19236,7 +19223,7 @@
19236
19223
  params2,
19237
19224
  resolvedPpr.numberingProperties.ilvl ?? 0,
19238
19225
  resolvedPpr.numberingProperties.numId,
19239
- translator$1L
19226
+ translator$1N
19240
19227
  );
19241
19228
  }
19242
19229
  if (!numberingDefinedInline) {
@@ -19253,10 +19240,10 @@
19253
19240
  return finalProps;
19254
19241
  };
19255
19242
  function resolveParagraphProperties(params2, inlineProps, insideTable = false, overrideInlineStyleId = false) {
19256
- const defaultProps2 = getDefaultProperties(params2, translator$10);
19257
- const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params2, "Normal", translator$10);
19243
+ const defaultProps2 = getDefaultProperties(params2, translator$12);
19244
+ const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params2, "Normal", translator$12);
19258
19245
  let styleId = inlineProps?.styleId;
19259
- let styleProps = inlineProps?.styleId ? resolveStyleChain(params2, inlineProps?.styleId, translator$10) : {};
19246
+ let styleProps = inlineProps?.styleId ? resolveStyleChain(params2, inlineProps?.styleId, translator$12) : {};
19260
19247
  let numberingProps = {};
19261
19248
  let ilvl = inlineProps?.numberingProperties?.ilvl ?? styleProps?.numberingProperties?.ilvl;
19262
19249
  const numId = inlineProps?.numberingProperties?.numId ?? styleProps?.numberingProperties?.numId;
@@ -19264,10 +19251,10 @@
19264
19251
  const isList2 = numId != null;
19265
19252
  if (isList2) {
19266
19253
  ilvl = ilvl != null ? ilvl : 0;
19267
- numberingProps = getNumberingProperties(params2, ilvl, numId, translator$10);
19254
+ numberingProps = getNumberingProperties(params2, ilvl, numId, translator$12);
19268
19255
  if (overrideInlineStyleId && numberingProps.styleId) {
19269
19256
  styleId = numberingProps.styleId;
19270
- styleProps = resolveStyleChain(params2, styleId, translator$10);
19257
+ styleProps = resolveStyleChain(params2, styleId, translator$12);
19271
19258
  if (inlineProps) {
19272
19259
  inlineProps.styleId = styleId;
19273
19260
  if (styleProps.numberingProperties?.ilvl === inlineProps.numberingProperties?.ilvl && styleProps.numberingProperties?.numId === inlineProps.numberingProperties?.numId) {
@@ -19289,7 +19276,7 @@
19289
19276
  if (numberingDefinedInline) {
19290
19277
  indentChain = [...defaultsChain, styleProps, numberingProps, inlineProps];
19291
19278
  } else {
19292
- styleProps = resolveStyleChain(params2, styleId, translator$10, false);
19279
+ styleProps = resolveStyleChain(params2, styleId, translator$12, false);
19293
19280
  indentChain = [...defaultsChain, numberingProps, styleProps, inlineProps];
19294
19281
  }
19295
19282
  } else {
@@ -19397,7 +19384,7 @@
19397
19384
  const numStyleLink = listDefinitionForThisNumId.elements?.find((item) => item.name === "w:numStyleLink");
19398
19385
  const styleId = numStyleLink?.attributes?.["w:val"];
19399
19386
  if (styleId && tries < 1) {
19400
- const { properties: styleProps } = getStyleProperties(params2, styleId, translator$10);
19387
+ const { properties: styleProps } = getStyleProperties(params2, styleId, translator$12);
19401
19388
  if (styleProps?.numberingProperties?.numId) {
19402
19389
  return getNumberingProperties(params2, ilvl, styleProps.numberingProperties.numId, translator2, tries + 1);
19403
19390
  }
@@ -19932,7 +19919,7 @@
19932
19919
  let submarks = [];
19933
19920
  const rPr = rPrChange.elements?.find((el) => el.name === "w:rPr");
19934
19921
  if (rPr) {
19935
- const runProperties = translator$1L.encode({ ...params2, nodes: [rPr] });
19922
+ const runProperties = translator$1N.encode({ ...params2, nodes: [rPr] });
19936
19923
  submarks = encodeMarksFromRPr(runProperties, params2?.docx);
19937
19924
  }
19938
19925
  return [{ type: TrackFormatMarkName, attrs: { ...mappedAttributes, before: submarks, after: [...currentMarks] } }];
@@ -20041,7 +20028,7 @@
20041
20028
  const pPr = node2.elements?.find((el) => el.name === "w:pPr");
20042
20029
  let inlineParagraphProperties = {};
20043
20030
  if (pPr) {
20044
- inlineParagraphProperties = translator$10.encode({ ...params2, nodes: [pPr] }) || {};
20031
+ inlineParagraphProperties = translator$12.encode({ ...params2, nodes: [pPr] }) || {};
20045
20032
  }
20046
20033
  const insideTable = (params2.path || []).some((ancestor) => ancestor.name === "w:tc");
20047
20034
  const resolvedParagraphProperties = resolveParagraphProperties(params2, inlineParagraphProperties, insideTable);
@@ -20094,89 +20081,139 @@
20094
20081
  }
20095
20082
  return schemaNode;
20096
20083
  };
20097
- const encode$y = (attributes) => {
20084
+ function generateParagraphProperties(params2) {
20085
+ const { node: node2 } = params2;
20086
+ const { attrs = {} } = node2;
20087
+ const paragraphProperties = carbonCopy(attrs.paragraphProperties || {});
20088
+ if (attrs.styleId !== paragraphProperties.styleId) {
20089
+ paragraphProperties.styleId = attrs.styleId;
20090
+ }
20091
+ ["borders", "styleId", "indent", "textAlign", "keepLines", "keepNext", "spacing", "tabStops"].forEach((key2) => {
20092
+ let propKey = key2 === "textAlign" ? "justification" : key2;
20093
+ if (JSON.stringify(paragraphProperties[propKey]) !== JSON.stringify(attrs[key2])) {
20094
+ paragraphProperties[propKey] = attrs[key2];
20095
+ }
20096
+ });
20097
+ const framePr = attrs.dropcap;
20098
+ if (framePr) {
20099
+ framePr.dropCap = framePr.type;
20100
+ delete framePr.type;
20101
+ }
20102
+ if (JSON.stringify(paragraphProperties.framePr) !== JSON.stringify(framePr)) {
20103
+ paragraphProperties.framePr = framePr;
20104
+ }
20105
+ const marksProps = decodeRPrFromMarks(attrs.marksAttrs || []);
20106
+ const finalRunProps = combineRunProperties([paragraphProperties.runProperties || {}, marksProps]);
20107
+ paragraphProperties.runProperties = finalRunProps;
20108
+ const pPr = translator$12.decode({ node: { ...node2, attrs: { paragraphProperties } } });
20109
+ const sectPr = node2.attrs?.paragraphProperties?.sectPr;
20110
+ if (sectPr) {
20111
+ pPr.elements.push(sectPr);
20112
+ }
20113
+ return pPr;
20114
+ }
20115
+ function translateParagraphNode(params2) {
20116
+ const elements = translateChildNodes(params2);
20117
+ const htmlAnnotationChild = elements.find((element2) => element2.name === "htmlAnnotation");
20118
+ if (htmlAnnotationChild) {
20119
+ return htmlAnnotationChild.elements;
20120
+ }
20121
+ const pPr = generateParagraphProperties(params2);
20122
+ if (pPr) elements.unshift(pPr);
20123
+ let attributes = {};
20124
+ if (params2.node.attrs?.rsidRDefault) {
20125
+ attributes["w:rsidRDefault"] = params2.node.attrs.rsidRDefault;
20126
+ }
20127
+ const result = {
20128
+ name: "w:p",
20129
+ elements,
20130
+ attributes
20131
+ };
20132
+ return result;
20133
+ }
20134
+ const encode$A = (attributes) => {
20098
20135
  return attributes["w:rsidDel"];
20099
20136
  };
20100
- const decode$A = (attrs) => {
20137
+ const decode$C = (attrs) => {
20101
20138
  return attrs.rsidDel;
20102
20139
  };
20103
20140
  const attrConfig$h = Object.freeze({
20104
20141
  xmlName: "w:rsidDel",
20105
20142
  sdName: "rsidDel",
20106
- encode: encode$y,
20107
- decode: decode$A
20143
+ encode: encode$A,
20144
+ decode: decode$C
20108
20145
  });
20109
- const encode$x = (attributes) => {
20146
+ const encode$z = (attributes) => {
20110
20147
  return attributes["w:rsidP"];
20111
20148
  };
20112
- const decode$z = (attrs) => {
20149
+ const decode$B = (attrs) => {
20113
20150
  return attrs.rsidP;
20114
20151
  };
20115
20152
  const attrConfig$g = Object.freeze({
20116
20153
  xmlName: "w:rsidP",
20117
20154
  sdName: "rsidP",
20118
- encode: encode$x,
20119
- decode: decode$z
20155
+ encode: encode$z,
20156
+ decode: decode$B
20120
20157
  });
20121
- const encode$w = (attributes) => {
20158
+ const encode$y = (attributes) => {
20122
20159
  return attributes["w:rsidR"];
20123
20160
  };
20124
- const decode$y = (attrs) => {
20161
+ const decode$A = (attrs) => {
20125
20162
  return attrs.rsidR;
20126
20163
  };
20127
20164
  const attrConfig$f = Object.freeze({
20128
20165
  xmlName: "w:rsidR",
20129
20166
  sdName: "rsidR",
20130
- encode: encode$w,
20131
- decode: decode$y
20167
+ encode: encode$y,
20168
+ decode: decode$A
20132
20169
  });
20133
- const encode$v = (attributes) => {
20170
+ const encode$x = (attributes) => {
20134
20171
  return attributes["w:rsidRPr"];
20135
20172
  };
20136
- const decode$x = (attrs) => {
20173
+ const decode$z = (attrs) => {
20137
20174
  return attrs.rsidRPr;
20138
20175
  };
20139
20176
  const attrConfig$e = Object.freeze({
20140
20177
  xmlName: "w:rsidRPr",
20141
20178
  sdName: "rsidRPr",
20142
- encode: encode$v,
20143
- decode: decode$x
20179
+ encode: encode$x,
20180
+ decode: decode$z
20144
20181
  });
20145
- const encode$u = (attributes) => {
20182
+ const encode$w = (attributes) => {
20146
20183
  return attributes["w:rsidRDefault"];
20147
20184
  };
20148
- const decode$w = (attrs) => {
20185
+ const decode$y = (attrs) => {
20149
20186
  return attrs.rsidRDefault;
20150
20187
  };
20151
20188
  const attrConfig$d = Object.freeze({
20152
20189
  xmlName: "w:rsidRDefault",
20153
20190
  sdName: "rsidRDefault",
20154
- encode: encode$u,
20155
- decode: decode$w
20191
+ encode: encode$w,
20192
+ decode: decode$y
20156
20193
  });
20157
- const encode$t = (attributes) => {
20194
+ const encode$v = (attributes) => {
20158
20195
  return attributes["w14:paraId"];
20159
20196
  };
20160
- const decode$v = (attrs) => {
20197
+ const decode$x = (attrs) => {
20161
20198
  return attrs.paraId;
20162
20199
  };
20163
20200
  const attrConfig$c = Object.freeze({
20164
20201
  xmlName: "w14:paraId",
20165
20202
  sdName: "paraId",
20166
- encode: encode$t,
20167
- decode: decode$v
20203
+ encode: encode$v,
20204
+ decode: decode$x
20168
20205
  });
20169
- const encode$s = (attributes) => {
20206
+ const encode$u = (attributes) => {
20170
20207
  return attributes["w14:textId"];
20171
20208
  };
20172
- const decode$u = (attrs) => {
20209
+ const decode$w = (attrs) => {
20173
20210
  return attrs.textId;
20174
20211
  };
20175
20212
  const attrConfig$b = Object.freeze({
20176
20213
  xmlName: "w14:textId",
20177
20214
  sdName: "textId",
20178
- encode: encode$s,
20179
- decode: decode$u
20215
+ encode: encode$u,
20216
+ decode: decode$w
20180
20217
  });
20181
20218
  const validXmlAttributes$d = [
20182
20219
  attrConfig$c,
@@ -20187,9 +20224,9 @@
20187
20224
  attrConfig$e,
20188
20225
  attrConfig$h
20189
20226
  ];
20190
- const XML_NODE_NAME$i = "w:p";
20191
- const SD_NODE_NAME$f = "paragraph";
20192
- const encode$r = (params2, encodedAttrs = {}) => {
20227
+ const XML_NODE_NAME$k = "w:p";
20228
+ const SD_NODE_NAME$h = "paragraph";
20229
+ const encode$t = (params2, encodedAttrs = {}) => {
20193
20230
  const node2 = handleParagraphNode$1(params2);
20194
20231
  if (!node2) return void 0;
20195
20232
  if (encodedAttrs && Object.keys(encodedAttrs).length) {
@@ -20197,7 +20234,7 @@
20197
20234
  }
20198
20235
  return node2;
20199
20236
  };
20200
- const decode$t = (params2, decodedAttrs = {}) => {
20237
+ const decode$v = (params2, decodedAttrs = {}) => {
20201
20238
  const translated = translateParagraphNode(params2);
20202
20239
  if (!translated) return void 0;
20203
20240
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -20205,15 +20242,15 @@
20205
20242
  }
20206
20243
  return translated;
20207
20244
  };
20208
- const config$h = {
20209
- xmlName: XML_NODE_NAME$i,
20210
- sdNodeOrKeyName: SD_NODE_NAME$f,
20245
+ const config$j = {
20246
+ xmlName: XML_NODE_NAME$k,
20247
+ sdNodeOrKeyName: SD_NODE_NAME$h,
20211
20248
  type: NodeTranslator.translatorTypes.NODE,
20212
- encode: encode$r,
20213
- decode: decode$t,
20249
+ encode: encode$t,
20250
+ decode: decode$v,
20214
20251
  attributes: validXmlAttributes$d
20215
20252
  };
20216
- const translator$$ = NodeTranslator.from(config$h);
20253
+ const translator$11 = NodeTranslator.from(config$j);
20217
20254
  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;
20218
20255
  const containsEastAsianCharacters = (text2) => EAST_ASIAN_CHARACTER_REGEX.test(text2);
20219
20256
  const resolveFontFamily = (textStyleAttrs, text2) => {
@@ -20373,8 +20410,21 @@
20373
20410
  }
20374
20411
  return runs2;
20375
20412
  };
20376
- const XML_NODE_NAME$h = "w:hyperlink";
20377
- const SD_NODE_NAME$e = "link";
20413
+ function generateDocxRandomId(length2 = 8) {
20414
+ const max2 = 2147483647;
20415
+ const value = Math.floor(Math.random() * (max2 + 1));
20416
+ return value.toString(16).padStart(length2, "0").slice(0, length2);
20417
+ }
20418
+ function generateRandomSigned32BitIntStrId() {
20419
+ const val = Math.floor(Math.random() * 2147483647);
20420
+ return val.toString();
20421
+ }
20422
+ function generateRandom32BitHex() {
20423
+ const val = Math.floor(Math.random() * 2147483647);
20424
+ return val.toString(16).toUpperCase().padStart(8, "0");
20425
+ }
20426
+ const XML_NODE_NAME$j = "w:hyperlink";
20427
+ const SD_NODE_NAME$g = "link";
20378
20428
  const _createAttributeHandler = (xmlName, sdName) => ({
20379
20429
  xmlName,
20380
20430
  sdName,
@@ -20394,7 +20444,7 @@
20394
20444
  _createAttributeHandler("r:id", "rId"),
20395
20445
  _createAttributeHandler("w:tgtFrame", "target")
20396
20446
  ];
20397
- const encode$q = (params2, encodedAttrs) => {
20447
+ const encode$s = (params2, encodedAttrs) => {
20398
20448
  const { nodes, docx, nodeListHandler } = params2;
20399
20449
  const node2 = nodes[0];
20400
20450
  let href = _resolveHref(docx, encodedAttrs);
@@ -20428,7 +20478,7 @@
20428
20478
  }
20429
20479
  return href;
20430
20480
  };
20431
- function decode$s(params2) {
20481
+ function decode$u(params2) {
20432
20482
  const { hyperlinkGroup = [params2.node] } = params2.extraParams || {};
20433
20483
  const node2 = hyperlinkGroup[0];
20434
20484
  const linkMark = node2.marks.find((m2) => m2.type === "link");
@@ -20469,69 +20519,69 @@
20469
20519
  type: "element",
20470
20520
  name: "Relationship",
20471
20521
  attributes: {
20472
- Id: id,
20522
+ Id: `rId${id}`,
20473
20523
  Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
20474
20524
  Target: link2,
20475
20525
  TargetMode: "External"
20476
20526
  }
20477
20527
  });
20478
- return id;
20528
+ return `rId${id}`;
20479
20529
  }
20480
- const config$g = {
20481
- xmlName: XML_NODE_NAME$h,
20482
- sdNodeOrKeyName: SD_NODE_NAME$e,
20530
+ const config$i = {
20531
+ xmlName: XML_NODE_NAME$j,
20532
+ sdNodeOrKeyName: SD_NODE_NAME$g,
20483
20533
  type: NodeTranslator.translatorTypes.NODE,
20484
- encode: encode$q,
20485
- decode: decode$s,
20534
+ encode: encode$s,
20535
+ decode: decode$u,
20486
20536
  attributes: validXmlAttributes$c
20487
20537
  };
20488
- const translator$_ = NodeTranslator.from(config$g);
20489
- const encode$p = (attributes) => {
20538
+ const translator$10 = NodeTranslator.from(config$i);
20539
+ const encode$r = (attributes) => {
20490
20540
  return attributes["w:rsidR"];
20491
20541
  };
20492
- const decode$r = (attrs) => {
20542
+ const decode$t = (attrs) => {
20493
20543
  return attrs.rsidR;
20494
20544
  };
20495
20545
  const attrConfig$a = Object.freeze({
20496
20546
  xmlName: "w:rsidR",
20497
20547
  sdName: "rsidR",
20498
- encode: encode$p,
20499
- decode: decode$r
20548
+ encode: encode$r,
20549
+ decode: decode$t
20500
20550
  });
20501
- const encode$o = (attributes) => {
20551
+ const encode$q = (attributes) => {
20502
20552
  return attributes["w:rsidRPr"];
20503
20553
  };
20504
- const decode$q = (attrs) => {
20554
+ const decode$s = (attrs) => {
20505
20555
  return attrs.rsidRPr;
20506
20556
  };
20507
20557
  const attrConfig$9 = Object.freeze({
20508
20558
  xmlName: "w:rsidRPr",
20509
20559
  sdName: "rsidRPr",
20510
- encode: encode$o,
20511
- decode: decode$q
20560
+ encode: encode$q,
20561
+ decode: decode$s
20512
20562
  });
20513
- const encode$n = (attributes) => {
20563
+ const encode$p = (attributes) => {
20514
20564
  return attributes["w:rsidDel"];
20515
20565
  };
20516
- const decode$p = (attrs) => {
20566
+ const decode$r = (attrs) => {
20517
20567
  return attrs.rsidDel;
20518
20568
  };
20519
20569
  const attrConfig$8 = Object.freeze({
20520
20570
  xmlName: "w:rsidDel",
20521
20571
  sdName: "rsidDel",
20522
- encode: encode$n,
20523
- decode: decode$p
20572
+ encode: encode$p,
20573
+ decode: decode$r
20524
20574
  });
20525
20575
  const validXmlAttributes$b = [attrConfig$a, attrConfig$9, attrConfig$8];
20526
- const XML_NODE_NAME$g = "w:r";
20576
+ const XML_NODE_NAME$i = "w:r";
20527
20577
  const SD_KEY_NAME = "run";
20528
- const encode$m = (params2, encodedAttrs = {}) => {
20578
+ const encode$o = (params2, encodedAttrs = {}) => {
20529
20579
  const { nodes = [], nodeListHandler } = params2 || {};
20530
20580
  const runNode = nodes[0];
20531
20581
  if (!runNode) return void 0;
20532
20582
  const elements = Array.isArray(runNode.elements) ? runNode.elements : [];
20533
20583
  const rPrNode = elements.find((child) => child?.name === "w:rPr");
20534
- const runProperties = rPrNode ? translator$1L.encode({ ...params2, nodes: [rPrNode] }) : {};
20584
+ const runProperties = rPrNode ? translator$1N.encode({ ...params2, nodes: [rPrNode] }) : {};
20535
20585
  const paragraphProperties = params2?.extraParams?.paragraphProperties || {};
20536
20586
  const resolvedRunProperties = resolveRunProperties(params2, runProperties ?? {}, paragraphProperties);
20537
20587
  const marks = encodeMarksFromRPr(resolvedRunProperties, params2?.docx) || [];
@@ -20578,7 +20628,7 @@
20578
20628
  }
20579
20629
  return runNodeResult;
20580
20630
  };
20581
- const decode$o = (params2, decodedAttrs = {}) => {
20631
+ const decode$q = (params2, decodedAttrs = {}) => {
20582
20632
  const { node: node2 } = params2 || {};
20583
20633
  if (!node2) return void 0;
20584
20634
  const isLinkNode = node2.marks?.some((m2) => m2.type === "link");
@@ -20587,7 +20637,7 @@
20587
20637
  ...params2.extraParams,
20588
20638
  linkProcessed: true
20589
20639
  };
20590
- return translator$_.decode({ ...params2, extraParams });
20640
+ return translator$10.decode({ ...params2, extraParams });
20591
20641
  }
20592
20642
  const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node2);
20593
20643
  const runAttrs = runNodeForExport.attrs || {};
@@ -20603,7 +20653,7 @@
20603
20653
  exportParams.editor = { extensionService: { extensions: [] } };
20604
20654
  }
20605
20655
  const childElements = translateChildNodes(exportParams) || [];
20606
- let runPropertiesElement = translator$1L.decode({
20656
+ let runPropertiesElement = translator$1N.decode({
20607
20657
  ...params2,
20608
20658
  node: { attrs: { runProperties: finalRunProperties } }
20609
20659
  });
@@ -20636,7 +20686,7 @@
20636
20686
  runs2.push(trackedClone);
20637
20687
  return;
20638
20688
  }
20639
- const runWrapper = { name: XML_NODE_NAME$g, elements: [] };
20689
+ const runWrapper = { name: XML_NODE_NAME$i, elements: [] };
20640
20690
  applyBaseRunProps(runWrapper);
20641
20691
  if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
20642
20692
  runWrapper.elements.push(cloneXmlNode(child));
@@ -20644,7 +20694,7 @@
20644
20694
  });
20645
20695
  const trackedRuns = ensureTrackedWrapper(runs2, trackingMarksByType);
20646
20696
  if (!trackedRuns.length) {
20647
- const emptyRun = { name: XML_NODE_NAME$g, elements: [] };
20697
+ const emptyRun = { name: XML_NODE_NAME$i, elements: [] };
20648
20698
  applyBaseRunProps(emptyRun);
20649
20699
  trackedRuns.push(emptyRun);
20650
20700
  }
@@ -20658,17 +20708,17 @@
20658
20708
  }
20659
20709
  return trackedRuns;
20660
20710
  };
20661
- const config$f = {
20662
- xmlName: XML_NODE_NAME$g,
20711
+ const config$h = {
20712
+ xmlName: XML_NODE_NAME$i,
20663
20713
  sdNodeOrKeyName: SD_KEY_NAME,
20664
20714
  type: NodeTranslator.translatorTypes.NODE,
20665
- encode: encode$m,
20666
- decode: decode$o,
20715
+ encode: encode$o,
20716
+ decode: decode$q,
20667
20717
  attributes: validXmlAttributes$b
20668
20718
  };
20669
- const translator$Z = NodeTranslator.from(config$f);
20670
- const translator$Y = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
20671
- const translator$X = NodeTranslator.from(
20719
+ const translator$$ = NodeTranslator.from(config$h);
20720
+ const translator$_ = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
20721
+ const translator$Z = NodeTranslator.from(
20672
20722
  createSingleAttrPropertyHandler(
20673
20723
  "w:gridSpan",
20674
20724
  null,
@@ -20677,31 +20727,31 @@
20677
20727
  (v2) => integerToString(v2)
20678
20728
  )
20679
20729
  );
20680
- const translator$W = NodeTranslator.from(createSingleAttrPropertyHandler("w:vMerge"));
20681
- const translator$V = NodeTranslator.from(createBorderPropertyHandler("w:end"));
20682
- const translator$U = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
20683
- const translator$T = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
20684
- const translator$S = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
20685
- const translator$R = NodeTranslator.from(createBorderPropertyHandler("w:start"));
20686
- const translator$Q = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
20687
- const translator$P = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
20688
- const translator$O = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
20730
+ const translator$Y = NodeTranslator.from(createSingleAttrPropertyHandler("w:vMerge"));
20731
+ const translator$X = NodeTranslator.from(createBorderPropertyHandler("w:end"));
20732
+ const translator$W = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
20733
+ const translator$V = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
20734
+ const translator$U = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
20735
+ const translator$T = NodeTranslator.from(createBorderPropertyHandler("w:start"));
20736
+ const translator$S = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
20737
+ const translator$R = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
20738
+ const translator$Q = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
20689
20739
  const propertyTranslators$6 = [
20690
- translator$1h,
20691
- translator$R,
20692
- translator$1l,
20693
- translator$1n,
20694
- translator$V,
20695
20740
  translator$1j,
20696
20741
  translator$T,
20697
- translator$S,
20698
- translator$P,
20699
- translator$O
20742
+ translator$1n,
20743
+ translator$1p,
20744
+ translator$X,
20745
+ translator$1l,
20746
+ translator$V,
20747
+ translator$U,
20748
+ translator$R,
20749
+ translator$Q
20700
20750
  ];
20701
- const translator$N = NodeTranslator.from(
20751
+ const translator$P = NodeTranslator.from(
20702
20752
  createNestedPropertiesTranslator("w:tcBorders", "borders", propertyTranslators$6)
20703
20753
  );
20704
- const translator$M = NodeTranslator.from(
20754
+ const translator$O = NodeTranslator.from(
20705
20755
  createSingleAttrPropertyHandler(
20706
20756
  "w:noWrap",
20707
20757
  null,
@@ -20711,17 +20761,17 @@
20711
20761
  )
20712
20762
  );
20713
20763
  const propertyTranslators$5 = [
20764
+ translator$1o,
20765
+ translator$W,
20714
20766
  translator$1m,
20715
- translator$U,
20716
20767
  translator$1k,
20717
- translator$1i,
20718
- translator$Q,
20719
- translator$1g
20768
+ translator$S,
20769
+ translator$1i
20720
20770
  ];
20721
- const translator$L = NodeTranslator.from(
20771
+ const translator$N = NodeTranslator.from(
20722
20772
  createNestedPropertiesTranslator("w:tcMar", "cellMargins", propertyTranslators$5)
20723
20773
  );
20724
- const translator$K = NodeTranslator.from(
20774
+ const translator$M = NodeTranslator.from(
20725
20775
  createSingleAttrPropertyHandler(
20726
20776
  "w:tcFitText",
20727
20777
  null,
@@ -20730,8 +20780,8 @@
20730
20780
  (v2) => booleanToString(v2)
20731
20781
  )
20732
20782
  );
20733
- const translator$J = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
20734
- const translator$I = NodeTranslator.from(
20783
+ const translator$L = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
20784
+ const translator$K = NodeTranslator.from(
20735
20785
  createSingleAttrPropertyHandler(
20736
20786
  "w:hideMark",
20737
20787
  null,
@@ -20740,26 +20790,26 @@
20740
20790
  (v2) => booleanToString(v2)
20741
20791
  )
20742
20792
  );
20743
- const translator$H = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
20744
- const translator$G = NodeTranslator.from(
20745
- createNestedArrayPropertyHandler("w:headers", "headers", [translator$H])
20793
+ const translator$J = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
20794
+ const translator$I = NodeTranslator.from(
20795
+ createNestedArrayPropertyHandler("w:headers", "headers", [translator$J])
20746
20796
  );
20747
20797
  const propertyTranslators$4 = [
20748
- translator$1F,
20798
+ translator$1H,
20799
+ translator$_,
20800
+ translator$Z,
20749
20801
  translator$Y,
20750
- translator$X,
20751
- translator$W,
20802
+ translator$P,
20803
+ translator$1Q,
20804
+ translator$O,
20752
20805
  translator$N,
20753
- translator$1O,
20806
+ translator$17,
20754
20807
  translator$M,
20755
20808
  translator$L,
20756
- translator$15,
20757
20809
  translator$K,
20758
- translator$J,
20759
- translator$I,
20760
- translator$G
20810
+ translator$I
20761
20811
  ];
20762
- const translator$F = NodeTranslator.from(
20812
+ const translator$H = NodeTranslator.from(
20763
20813
  createNestedPropertiesTranslator("w:tcPr", "tableCellProperties", propertyTranslators$4)
20764
20814
  );
20765
20815
  function handleTableCellNode({
@@ -20777,7 +20827,7 @@
20777
20827
  const attributes = {};
20778
20828
  const referencedStyles = _referencedStyles ?? { fontSize: null, fonts: {}, cellMargins: {} };
20779
20829
  const tcPr = node2.elements.find((el) => el.name === "w:tcPr");
20780
- const tableCellProperties = tcPr ? translator$F.encode({ ...params2, nodes: [tcPr] }) ?? {} : {};
20830
+ const tableCellProperties = tcPr ? translator$H.encode({ ...params2, nodes: [tcPr] }) ?? {} : {};
20781
20831
  attributes["tableCellProperties"] = tableCellProperties;
20782
20832
  if (rowBorders?.insideH) {
20783
20833
  rowBorders["bottom"] = rowBorders.insideH;
@@ -21089,13 +21139,13 @@
21089
21139
  } else if (tableCellProperties?.borders) {
21090
21140
  delete tableCellProperties.borders;
21091
21141
  }
21092
- const result = translator$F.decode({ node: { ...node2, attrs: { ...node2.attrs, tableCellProperties } } });
21142
+ const result = translator$H.decode({ node: { ...node2, attrs: { ...node2.attrs, tableCellProperties } } });
21093
21143
  return result;
21094
21144
  }
21095
- const XML_NODE_NAME$f = "w:tc";
21096
- const SD_NODE_NAME$d = "tableCell";
21145
+ const XML_NODE_NAME$h = "w:tc";
21146
+ const SD_NODE_NAME$f = "tableCell";
21097
21147
  const validXmlAttributes$a = [];
21098
- function encode$l(params2, encodedAttrs) {
21148
+ function encode$n(params2, encodedAttrs) {
21099
21149
  const {
21100
21150
  node: node2,
21101
21151
  table: table2,
@@ -21122,29 +21172,29 @@
21122
21172
  }
21123
21173
  return schemaNode;
21124
21174
  }
21125
- function decode$n(params2, decodedAttrs) {
21175
+ function decode$p(params2, decodedAttrs) {
21126
21176
  const translated = translateTableCell(params2);
21127
21177
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
21128
21178
  translated.attributes = { ...translated.attributes || {}, ...decodedAttrs };
21129
21179
  }
21130
21180
  return translated;
21131
21181
  }
21132
- const config$e = {
21133
- xmlName: XML_NODE_NAME$f,
21134
- sdNodeOrKeyName: SD_NODE_NAME$d,
21182
+ const config$g = {
21183
+ xmlName: XML_NODE_NAME$h,
21184
+ sdNodeOrKeyName: SD_NODE_NAME$f,
21135
21185
  type: NodeTranslator.translatorTypes.NODE,
21136
- encode: encode$l,
21137
- decode: decode$n,
21186
+ encode: encode$n,
21187
+ decode: decode$p,
21138
21188
  attributes: validXmlAttributes$a
21139
21189
  };
21140
- const translator$E = NodeTranslator.from(config$e);
21141
- const translator$D = NodeTranslator.from({
21190
+ const translator$G = NodeTranslator.from(config$g);
21191
+ const translator$F = NodeTranslator.from({
21142
21192
  xmlName: "w:cantSplit",
21143
21193
  sdNodeOrKeyName: "cantSplit",
21144
21194
  encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
21145
21195
  decode: ({ node: node2 }) => node2.attrs?.cantSplit ? { attributes: {} } : void 0
21146
21196
  });
21147
- const translator$C = NodeTranslator.from(
21197
+ const translator$E = NodeTranslator.from(
21148
21198
  createSingleAttrPropertyHandler(
21149
21199
  "w:gridAfter",
21150
21200
  null,
@@ -21153,7 +21203,7 @@
21153
21203
  (v2) => integerToString(v2)
21154
21204
  )
21155
21205
  );
21156
- const translator$B = NodeTranslator.from(
21206
+ const translator$D = NodeTranslator.from(
21157
21207
  createSingleAttrPropertyHandler(
21158
21208
  "w:gridBefore",
21159
21209
  null,
@@ -21162,20 +21212,20 @@
21162
21212
  (v2) => integerToString(v2)
21163
21213
  )
21164
21214
  );
21165
- const translator$A = NodeTranslator.from({
21215
+ const translator$C = NodeTranslator.from({
21166
21216
  xmlName: "w:hidden",
21167
21217
  sdNodeOrKeyName: "hidden",
21168
21218
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
21169
21219
  decode: ({ node: node2 }) => node2.attrs.hidden ? { attributes: {} } : void 0
21170
21220
  });
21171
- const translator$z = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
21172
- const translator$y = NodeTranslator.from({
21221
+ const translator$B = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
21222
+ const translator$A = NodeTranslator.from({
21173
21223
  xmlName: "w:tblHeader",
21174
21224
  sdNodeOrKeyName: "repeatHeader",
21175
21225
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
21176
21226
  decode: ({ node: node2 }) => node2.attrs.repeatHeader ? { attributes: {} } : void 0
21177
21227
  });
21178
- const translator$x = NodeTranslator.from({
21228
+ const translator$z = NodeTranslator.from({
21179
21229
  xmlName: "w:trHeight",
21180
21230
  sdNodeOrKeyName: "rowHeight",
21181
21231
  encode: ({ nodes }) => {
@@ -21202,23 +21252,23 @@
21202
21252
  return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
21203
21253
  }
21204
21254
  });
21205
- const translator$w = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
21206
- const translator$v = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
21255
+ const translator$y = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
21256
+ const translator$x = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
21207
21257
  const propertyTranslators$3 = [
21208
- translator$D,
21258
+ translator$F,
21259
+ translator$1H,
21209
21260
  translator$1F,
21210
- translator$1D,
21261
+ translator$E,
21262
+ translator$D,
21211
21263
  translator$C,
21264
+ translator$1C,
21212
21265
  translator$B,
21213
21266
  translator$A,
21214
- translator$1A,
21215
21267
  translator$z,
21216
21268
  translator$y,
21217
- translator$x,
21218
- translator$w,
21219
- translator$v
21269
+ translator$x
21220
21270
  ];
21221
- const translator$u = NodeTranslator.from(
21271
+ const translator$w = NodeTranslator.from(
21222
21272
  createNestedPropertiesTranslator("w:trPr", "tableRowProperties", propertyTranslators$3, {
21223
21273
  cantSplit: false,
21224
21274
  hidden: false,
@@ -21287,17 +21337,17 @@
21287
21337
  }
21288
21338
  return false;
21289
21339
  };
21290
- const XML_NODE_NAME$e = "w:tr";
21291
- const SD_NODE_NAME$c = "tableRow";
21340
+ const XML_NODE_NAME$g = "w:tr";
21341
+ const SD_NODE_NAME$e = "tableRow";
21292
21342
  const validXmlAttributes$9 = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
21293
21343
  (xmlName) => createAttributeHandler(xmlName)
21294
21344
  );
21295
- const encode$k = (params2, encodedAttrs) => {
21345
+ const encode$m = (params2, encodedAttrs) => {
21296
21346
  const { row: row2 } = params2.extraParams;
21297
21347
  let tableRowProperties = {};
21298
21348
  const tPr = row2.elements.find((el) => el.name === "w:trPr");
21299
21349
  if (tPr) {
21300
- tableRowProperties = translator$u.encode({
21350
+ tableRowProperties = translator$w.encode({
21301
21351
  ...params2,
21302
21352
  nodes: [tPr]
21303
21353
  });
@@ -21334,7 +21384,7 @@
21334
21384
  skipOccupiedColumns();
21335
21385
  const startColumn = currentColumnIndex;
21336
21386
  const columnWidth = gridColumnWidths?.[startColumn] || null;
21337
- const result = translator$E.encode({
21387
+ const result = translator$G.encode({
21338
21388
  ...params2,
21339
21389
  extraParams: {
21340
21390
  ...params2.extraParams,
@@ -21367,7 +21417,7 @@
21367
21417
  };
21368
21418
  return newNode;
21369
21419
  };
21370
- const decode$m = (params2, decodedAttrs) => {
21420
+ const decode$o = (params2, decodedAttrs) => {
21371
21421
  const { node: node2 } = params2;
21372
21422
  const cells = node2.content || [];
21373
21423
  let leadingPlaceholders = 0;
@@ -21407,7 +21457,7 @@
21407
21457
  }
21408
21458
  }
21409
21459
  tableRowProperties["cantSplit"] = node2.attrs["cantSplit"];
21410
- const trPr = translator$u.decode({
21460
+ const trPr = translator$w.decode({
21411
21461
  ...params2,
21412
21462
  node: { ...node2, attrs: { ...node2.attrs, tableRowProperties } }
21413
21463
  });
@@ -21419,15 +21469,15 @@
21419
21469
  elements
21420
21470
  };
21421
21471
  };
21422
- const config$d = {
21423
- xmlName: XML_NODE_NAME$e,
21424
- sdNodeOrKeyName: SD_NODE_NAME$c,
21472
+ const config$f = {
21473
+ xmlName: XML_NODE_NAME$g,
21474
+ sdNodeOrKeyName: SD_NODE_NAME$e,
21425
21475
  type: NodeTranslator.translatorTypes.NODE,
21426
- encode: encode$k,
21427
- decode: decode$m,
21476
+ encode: encode$m,
21477
+ decode: decode$o,
21428
21478
  attributes: validXmlAttributes$9
21429
21479
  };
21430
- const translator$t = NodeTranslator.from(config$d);
21480
+ const translator$v = NodeTranslator.from(config$f);
21431
21481
  function parseTagValueJSON(json) {
21432
21482
  if (typeof json !== "string") {
21433
21483
  return {};
@@ -30381,32 +30431,32 @@ Please report this to https://github.com/markedjs/marked.`, e) {
30381
30431
  elements: [...anchorElements, ...elementsWithWrap]
30382
30432
  };
30383
30433
  }
30384
- const XML_NODE_NAME$d = "wp:anchor";
30385
- const SD_NODE_NAME$b = ["image", "shapeGroup", "vectorShape", "contentBlock"];
30434
+ const XML_NODE_NAME$f = "wp:anchor";
30435
+ const SD_NODE_NAME$d = ["image", "shapeGroup", "vectorShape", "contentBlock"];
30386
30436
  const validXmlAttributes$8 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
30387
- function encode$j(params2) {
30437
+ function encode$l(params2) {
30388
30438
  const { node: node2 } = params2.extraParams;
30389
30439
  if (!node2 || !node2.name) {
30390
30440
  return null;
30391
30441
  }
30392
30442
  return handleAnchorNode(params2);
30393
30443
  }
30394
- function decode$l(params2) {
30444
+ function decode$n(params2) {
30395
30445
  const { node: node2 } = params2;
30396
30446
  if (!node2 || !node2.type) {
30397
30447
  return null;
30398
30448
  }
30399
30449
  return translateAnchorNode(params2);
30400
30450
  }
30401
- const config$c = {
30402
- xmlName: XML_NODE_NAME$d,
30403
- sdNodeOrKeyName: SD_NODE_NAME$b,
30451
+ const config$e = {
30452
+ xmlName: XML_NODE_NAME$f,
30453
+ sdNodeOrKeyName: SD_NODE_NAME$d,
30404
30454
  type: NodeTranslator.translatorTypes.NODE,
30405
- encode: encode$j,
30406
- decode: decode$l,
30455
+ encode: encode$l,
30456
+ decode: decode$n,
30407
30457
  attributes: validXmlAttributes$8
30408
30458
  };
30409
- const translator$s = NodeTranslator.from(config$c);
30459
+ const translator$u = NodeTranslator.from(config$e);
30410
30460
  function handleInlineNode(params2) {
30411
30461
  const { node: node2 } = params2.extraParams;
30412
30462
  if (node2.name !== "wp:inline") {
@@ -30422,41 +30472,41 @@ Please report this to https://github.com/markedjs/marked.`, e) {
30422
30472
  elements: nodeElements.elements
30423
30473
  };
30424
30474
  }
30425
- const XML_NODE_NAME$c = "wp:inline";
30426
- const SD_NODE_NAME$a = ["image", "shapeGroup", "vectorShape", "contentBlock"];
30475
+ const XML_NODE_NAME$e = "wp:inline";
30476
+ const SD_NODE_NAME$c = ["image", "shapeGroup", "vectorShape", "contentBlock"];
30427
30477
  const validXmlAttributes$7 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
30428
- function encode$i(params2) {
30478
+ function encode$k(params2) {
30429
30479
  const { node: node2 } = params2.extraParams;
30430
30480
  if (!node2 || !node2.name) {
30431
30481
  return null;
30432
30482
  }
30433
30483
  return handleInlineNode(params2);
30434
30484
  }
30435
- function decode$k(params2) {
30485
+ function decode$m(params2) {
30436
30486
  const { node: node2 } = params2;
30437
30487
  if (!node2 || !node2.type) {
30438
30488
  return null;
30439
30489
  }
30440
30490
  return translateInlineNode(params2);
30441
30491
  }
30442
- const config$b = {
30443
- xmlName: XML_NODE_NAME$c,
30444
- sdNodeOrKeyName: SD_NODE_NAME$a,
30492
+ const config$d = {
30493
+ xmlName: XML_NODE_NAME$e,
30494
+ sdNodeOrKeyName: SD_NODE_NAME$c,
30445
30495
  type: NodeTranslator.translatorTypes.NODE,
30446
- encode: encode$i,
30447
- decode: decode$k,
30496
+ encode: encode$k,
30497
+ decode: decode$m,
30448
30498
  attributes: validXmlAttributes$7
30449
30499
  };
30450
- const translator$r = NodeTranslator.from(config$b);
30451
- const XML_NODE_NAME$b = "w:drawing";
30452
- const SD_NODE_NAME$9 = [];
30500
+ const translator$t = NodeTranslator.from(config$d);
30501
+ const XML_NODE_NAME$d = "w:drawing";
30502
+ const SD_NODE_NAME$b = [];
30453
30503
  const validXmlAttributes$6 = [];
30454
- function encode$h(params2) {
30504
+ function encode$j(params2) {
30455
30505
  const nodes = params2.nodes;
30456
30506
  const node2 = nodes[0];
30457
30507
  const translatorByChildName = {
30458
- "wp:anchor": translator$s,
30459
- "wp:inline": translator$r
30508
+ "wp:anchor": translator$u,
30509
+ "wp:inline": translator$t
30460
30510
  };
30461
30511
  return node2.elements.reduce((acc, child) => {
30462
30512
  if (acc) return acc;
@@ -30465,12 +30515,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
30465
30515
  return translator2.encode({ ...params2, extraParams: { node: child } }) || acc;
30466
30516
  }, null);
30467
30517
  }
30468
- function decode$j(params2) {
30518
+ function decode$l(params2) {
30469
30519
  const { node: node2 } = params2;
30470
30520
  if (!node2 || !node2.type) {
30471
30521
  return null;
30472
30522
  }
30473
- const childTranslator = node2.attrs.isAnchor ? translator$s : translator$r;
30523
+ const childTranslator = node2.attrs.isAnchor ? translator$u : translator$t;
30474
30524
  const resultNode = childTranslator.decode(params2);
30475
30525
  return wrapTextInRun(
30476
30526
  {
@@ -30480,15 +30530,68 @@ Please report this to https://github.com/markedjs/marked.`, e) {
30480
30530
  []
30481
30531
  );
30482
30532
  }
30483
- const config$a = {
30484
- xmlName: XML_NODE_NAME$b,
30485
- sdNodeOrKeyName: SD_NODE_NAME$9,
30533
+ const config$c = {
30534
+ xmlName: XML_NODE_NAME$d,
30535
+ sdNodeOrKeyName: SD_NODE_NAME$b,
30486
30536
  type: NodeTranslator.translatorTypes.NODE,
30487
- encode: encode$h,
30488
- decode: decode$j,
30537
+ encode: encode$j,
30538
+ decode: decode$l,
30489
30539
  attributes: validXmlAttributes$6
30490
30540
  };
30491
- const translator$q = NodeTranslator.from(config$a);
30541
+ const translator$s = NodeTranslator.from(config$c);
30542
+ function getTextNodeForExport(text2, marks, params2) {
30543
+ const hasLeadingOrTrailingSpace = /^\s|\s$/.test(text2);
30544
+ const space = hasLeadingOrTrailingSpace ? "preserve" : null;
30545
+ const nodeAttrs = space ? { "xml:space": space } : null;
30546
+ const textNodes = [];
30547
+ const textRunProperties = decodeRPrFromMarks(marks || []);
30548
+ const parentRunProperties = params2.extraParams?.runProperties || {};
30549
+ const combinedRunProperties = combineRunProperties([parentRunProperties, textRunProperties]);
30550
+ const rPrNode = translator$1N.decode({ node: { attrs: { runProperties: combinedRunProperties } } });
30551
+ textNodes.push({
30552
+ name: "w:t",
30553
+ elements: [{ text: text2, type: "text" }],
30554
+ attributes: nodeAttrs
30555
+ });
30556
+ if (params2) {
30557
+ const { editor } = params2;
30558
+ const customMarks = editor.extensionService.extensions.filter((e) => e.isExternal === true);
30559
+ marks.forEach((mark2) => {
30560
+ const isCustomMark = customMarks.some((customMark) => {
30561
+ const customMarkName = customMark.name;
30562
+ return mark2.type === customMarkName;
30563
+ });
30564
+ if (!isCustomMark) return;
30565
+ let attrsString = "";
30566
+ Object.entries(mark2.attrs).forEach(([key2, value]) => {
30567
+ if (value) {
30568
+ attrsString += `${key2}=${value};`;
30569
+ }
30570
+ });
30571
+ if (isCustomMark) {
30572
+ textNodes.unshift({
30573
+ type: "element",
30574
+ name: "w:bookmarkStart",
30575
+ attributes: {
30576
+ "w:id": "5000",
30577
+ "w:name": mark2.type + ";" + attrsString
30578
+ }
30579
+ });
30580
+ textNodes.push({
30581
+ type: "element",
30582
+ name: "w:bookmarkEnd",
30583
+ attributes: {
30584
+ "w:id": "5000"
30585
+ }
30586
+ });
30587
+ }
30588
+ });
30589
+ }
30590
+ return {
30591
+ name: "w:r",
30592
+ elements: rPrNode ? [rPrNode, ...textNodes] : textNodes
30593
+ };
30594
+ }
30492
30595
  var he$2 = { exports: {} };
30493
30596
  /*! https://mths.be/he v1.2.0 by @mathias | MIT license */
30494
30597
  var he$1 = he$2.exports;
@@ -30835,7 +30938,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
30835
30938
  return getTextNodeForExport(attrs.displayLabel, [...marks, ...marksFromAttrs], params2);
30836
30939
  }
30837
30940
  function prepareImageAnnotation(params2, imageSize) {
30838
- return translator$q.decode({
30941
+ return translator$s.decode({
30839
30942
  ...params2,
30840
30943
  imageSize
30841
30944
  });
@@ -30895,18 +30998,31 @@ Please report this to https://github.com/markedjs/marked.`, e) {
30895
30998
  node: { attrs = {}, marks = [] }
30896
30999
  } = params2;
30897
31000
  if (!attrs.linkUrl) return prepareTextAnnotation(params2);
30898
- const newId = addNewLinkRelationship(params2, attrs.linkUrl);
30899
- const linkTextNode = getTextNodeForExport(attrs.linkUrl, marks, params2);
30900
- const contentNode = processLinkContentNode(linkTextNode);
30901
- return {
30902
- name: "w:hyperlink",
30903
- type: "element",
30904
- attributes: {
30905
- "r:id": newId,
30906
- "w:history": 1
30907
- },
30908
- elements: [contentNode]
31001
+ const linkTextNode = {
31002
+ type: "text",
31003
+ text: attrs.linkUrl,
31004
+ marks: [
31005
+ ...marks,
31006
+ {
31007
+ type: "link",
31008
+ attrs: {
31009
+ href: attrs.linkUrl,
31010
+ history: true,
31011
+ text: attrs.linkUrl
31012
+ }
31013
+ },
31014
+ {
31015
+ type: "textStyle",
31016
+ attrs: {
31017
+ color: "#467886"
31018
+ }
31019
+ }
31020
+ ]
30909
31021
  };
31022
+ return translator$10.decode({
31023
+ ...params2,
31024
+ node: linkTextNode
31025
+ });
30910
31026
  }
30911
31027
  function translateFieldAttrsToMarks(attrs = {}) {
30912
31028
  const { fontFamily: fontFamily2, fontSize: fontSize2, bold, underline, italic, textColor, textHighlight } = attrs;
@@ -31099,6 +31215,46 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31099
31215
  };
31100
31216
  return result;
31101
31217
  }
31218
+ const RUN_LEVEL_WRAPPERS = /* @__PURE__ */ new Set(["w:hyperlink", "w:ins", "w:del"]);
31219
+ function convertSdtContentToRuns(elements) {
31220
+ const normalized = Array.isArray(elements) ? elements : [elements];
31221
+ const runs2 = [];
31222
+ normalized.forEach((element2) => {
31223
+ if (!element2) return;
31224
+ if (element2.name === "w:sdtPr") {
31225
+ return;
31226
+ }
31227
+ if (element2.name === "w:r") {
31228
+ runs2.push(element2);
31229
+ return;
31230
+ }
31231
+ if (element2.name === "w:sdt") {
31232
+ const sdtContent = (element2.elements || []).find((child) => child?.name === "w:sdtContent");
31233
+ if (sdtContent?.elements) {
31234
+ runs2.push(...convertSdtContentToRuns(sdtContent.elements));
31235
+ }
31236
+ return;
31237
+ }
31238
+ if (RUN_LEVEL_WRAPPERS.has(element2.name)) {
31239
+ const wrapperElements = convertSdtContentToRuns(element2.elements || []);
31240
+ if (wrapperElements.length) {
31241
+ runs2.push({
31242
+ ...element2,
31243
+ elements: wrapperElements
31244
+ });
31245
+ }
31246
+ return;
31247
+ }
31248
+ if (element2.name) {
31249
+ runs2.push({
31250
+ name: "w:r",
31251
+ type: "element",
31252
+ elements: element2.elements || [element2]
31253
+ });
31254
+ }
31255
+ });
31256
+ return runs2.filter((run2) => Array.isArray(run2.elements) && run2.elements.length > 0);
31257
+ }
31102
31258
  function translateStructuredContent(params2) {
31103
31259
  const { node: node2, isFinalDoc } = params2;
31104
31260
  const childContent = translateChildNodes({ ...params2, node: node2 });
@@ -31159,10 +31315,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31159
31315
  };
31160
31316
  return result;
31161
31317
  }
31162
- const XML_NODE_NAME$a = "w:sdt";
31163
- const SD_NODE_NAME$8 = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
31318
+ const XML_NODE_NAME$c = "w:sdt";
31319
+ const SD_NODE_NAME$a = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
31164
31320
  const validXmlAttributes$5 = [];
31165
- function encode$g(params2) {
31321
+ function encode$i(params2) {
31166
31322
  const nodes = params2.nodes;
31167
31323
  const node2 = nodes[0];
31168
31324
  const { type: sdtType, handler: handler2 } = sdtNodeTypeStrategy(node2);
@@ -31172,7 +31328,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31172
31328
  const result = handler2(params2);
31173
31329
  return result;
31174
31330
  }
31175
- function decode$i(params2) {
31331
+ function decode$k(params2) {
31176
31332
  const { node: node2 } = params2;
31177
31333
  if (!node2 || !node2.type) {
31178
31334
  return null;
@@ -31190,15 +31346,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31190
31346
  const result = decoder();
31191
31347
  return result;
31192
31348
  }
31193
- const config$9 = {
31194
- xmlName: XML_NODE_NAME$a,
31195
- sdNodeOrKeyName: SD_NODE_NAME$8,
31349
+ const config$b = {
31350
+ xmlName: XML_NODE_NAME$c,
31351
+ sdNodeOrKeyName: SD_NODE_NAME$a,
31196
31352
  type: NodeTranslator.translatorTypes.NODE,
31197
- encode: encode$g,
31198
- decode: decode$i,
31353
+ encode: encode$i,
31354
+ decode: decode$k,
31199
31355
  attributes: validXmlAttributes$5
31200
31356
  };
31201
- const translator$p = NodeTranslator.from(config$9);
31357
+ const translator$r = NodeTranslator.from(config$b);
31202
31358
  function preProcessVerticalMergeCells(table2, { editorSchema }) {
31203
31359
  if (!table2 || !Array.isArray(table2.content)) {
31204
31360
  return table2;
@@ -31239,17 +31395,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31239
31395
  }
31240
31396
  return table2;
31241
31397
  }
31242
- const translator$o = NodeTranslator.from({
31398
+ const translator$q = NodeTranslator.from({
31243
31399
  xmlName: "w:bidiVisual",
31244
31400
  sdNodeOrKeyName: "rightToLeft",
31245
31401
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
31246
31402
  decode: ({ node: node2 }) => node2.attrs.rightToLeft ? { attributes: {} } : void 0
31247
31403
  });
31248
- const translator$n = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
31249
- const translator$m = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
31250
- const translator$l = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
31251
- const translator$k = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
31252
- const translator$j = NodeTranslator.from({
31404
+ const translator$p = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
31405
+ const translator$o = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
31406
+ const translator$n = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
31407
+ const translator$m = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
31408
+ const translator$l = NodeTranslator.from({
31253
31409
  xmlName: "w:tblLook",
31254
31410
  sdNodeOrKeyName: "tblLook",
31255
31411
  attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
@@ -31261,16 +31417,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31261
31417
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
31262
31418
  }
31263
31419
  });
31264
- const translator$i = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
31265
- const translator$h = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
31266
- const translator$g = NodeTranslator.from(
31420
+ const translator$k = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
31421
+ const translator$j = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
31422
+ const translator$i = NodeTranslator.from(
31267
31423
  createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
31268
31424
  );
31269
- const translator$f = NodeTranslator.from(
31425
+ const translator$h = NodeTranslator.from(
31270
31426
  createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
31271
31427
  );
31272
- const translator$e = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
31273
- const translator$d = NodeTranslator.from({
31428
+ const translator$g = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
31429
+ const translator$f = NodeTranslator.from({
31274
31430
  xmlName: "w:tblpPr",
31275
31431
  sdNodeOrKeyName: "floatingTableProperties",
31276
31432
  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))),
@@ -31283,35 +31439,37 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31283
31439
  }
31284
31440
  });
31285
31441
  const propertyTranslators$2 = [
31286
- translator$1n,
31442
+ translator$1p,
31443
+ translator$X,
31287
31444
  translator$V,
31288
- translator$T,
31289
- translator$S,
31445
+ translator$U,
31446
+ translator$1n,
31290
31447
  translator$1l,
31291
- translator$1j,
31292
- translator$R,
31293
- translator$1h
31448
+ translator$T,
31449
+ translator$1j
31294
31450
  ];
31295
- const translator$c = NodeTranslator.from(
31451
+ const translator$e = NodeTranslator.from(
31296
31452
  createNestedPropertiesTranslator("w:tblBorders", "borders", propertyTranslators$2)
31297
31453
  );
31298
31454
  const propertyTranslators$1 = [
31455
+ translator$1o,
31456
+ translator$W,
31299
31457
  translator$1m,
31300
- translator$U,
31301
31458
  translator$1k,
31302
- translator$1i,
31303
- translator$Q,
31304
- translator$1g
31459
+ translator$S,
31460
+ translator$1i
31305
31461
  ];
31306
- const translator$b = NodeTranslator.from(
31462
+ const translator$d = NodeTranslator.from(
31307
31463
  createNestedPropertiesTranslator("w:tblCellMar", "cellMargins", propertyTranslators$1)
31308
31464
  );
31309
31465
  const propertyTranslators = [
31466
+ translator$q,
31467
+ translator$1C,
31468
+ translator$1Q,
31469
+ translator$p,
31470
+ translator$B,
31310
31471
  translator$o,
31311
- translator$1A,
31312
- translator$1O,
31313
31472
  translator$n,
31314
- translator$z,
31315
31473
  translator$m,
31316
31474
  translator$l,
31317
31475
  translator$k,
@@ -31321,14 +31479,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31321
31479
  translator$g,
31322
31480
  translator$f,
31323
31481
  translator$e,
31324
- translator$d,
31325
- translator$c,
31326
- translator$b
31482
+ translator$d
31327
31483
  ];
31328
- const translator$a = NodeTranslator.from(
31484
+ const translator$c = NodeTranslator.from(
31329
31485
  createNestedPropertiesTranslator("w:tblPr", "tableProperties", propertyTranslators)
31330
31486
  );
31331
- const translator$9 = NodeTranslator.from(
31487
+ const translator$b = NodeTranslator.from(
31332
31488
  createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
31333
31489
  );
31334
31490
  const DEFAULT_COLUMN_WIDTH_PX = 100;
@@ -31378,24 +31534,24 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31378
31534
  }
31379
31535
  return Math.max(fallbackWidthTwips, cellMinWidthTwips);
31380
31536
  };
31381
- const XML_NODE_NAME$9 = "w:tblGrid";
31537
+ const XML_NODE_NAME$b = "w:tblGrid";
31382
31538
  const SD_ATTR_KEY$1 = "grid";
31383
31539
  const cellMinWidth = pixelsToTwips(10);
31384
- const encode$f = (params2) => {
31540
+ const encode$h = (params2) => {
31385
31541
  const { nodes } = params2;
31386
31542
  const node2 = nodes[0];
31387
31543
  const attributes = encodeProperties(
31388
31544
  { ...params2, nodes: [node2] },
31389
- { [translator$9.xmlName]: translator$9 },
31545
+ { [translator$b.xmlName]: translator$b },
31390
31546
  true
31391
31547
  );
31392
31548
  return {
31393
- xmlName: XML_NODE_NAME$9,
31549
+ xmlName: XML_NODE_NAME$b,
31394
31550
  sdNodeOrKeyName: SD_ATTR_KEY$1,
31395
31551
  attributes
31396
31552
  };
31397
31553
  };
31398
- const decode$h = (params2) => {
31554
+ const decode$j = (params2) => {
31399
31555
  const { grid: rawGrid } = params2.node.attrs || {};
31400
31556
  const grid = Array.isArray(rawGrid) ? rawGrid : [];
31401
31557
  const { firstRow = {} } = params2.extraParams || {};
@@ -31418,10 +31574,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31418
31574
  const roundedWidth = Math.round(numericWidth);
31419
31575
  const minimumWidth = shouldEnforceMinimum ? cellMinWidth : 1;
31420
31576
  const safeWidth = Math.max(roundedWidth, minimumWidth);
31421
- const decoded = translator$9.decode({
31577
+ const decoded = translator$b.decode({
31422
31578
  node: { type: (
31423
31579
  /** @type {string} */
31424
- translator$9.sdNodeOrKeyName
31580
+ translator$b.sdNodeOrKeyName
31425
31581
  ), attrs: { col: safeWidth } }
31426
31582
  });
31427
31583
  if (decoded) elements.push(decoded);
@@ -31461,19 +31617,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31461
31617
  columnIndex++;
31462
31618
  }
31463
31619
  const newNode = {
31464
- name: XML_NODE_NAME$9,
31620
+ name: XML_NODE_NAME$b,
31465
31621
  attributes: {},
31466
31622
  elements
31467
31623
  };
31468
31624
  return newNode;
31469
31625
  };
31470
- const config$8 = {
31471
- xmlName: XML_NODE_NAME$9,
31626
+ const config$a = {
31627
+ xmlName: XML_NODE_NAME$b,
31472
31628
  sdNodeOrKeyName: SD_ATTR_KEY$1,
31473
- encode: encode$f,
31474
- decode: decode$h
31629
+ encode: encode$h,
31630
+ decode: decode$j
31475
31631
  };
31476
- const translator$8 = NodeTranslator.from(config$8);
31632
+ const translator$a = NodeTranslator.from(config$a);
31477
31633
  const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
31478
31634
  const DEFAULT_PAGE_MARGIN_TWIPS = 1440;
31479
31635
  const DEFAULT_CONTENT_WIDTH_TWIPS = DEFAULT_PAGE_WIDTH_TWIPS - 2 * DEFAULT_PAGE_MARGIN_TWIPS;
@@ -31536,19 +31692,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31536
31692
  columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
31537
31693
  };
31538
31694
  };
31539
- const XML_NODE_NAME$8 = "w:tbl";
31540
- const SD_NODE_NAME$7 = "table";
31541
- const encode$e = (params2, encodedAttrs) => {
31695
+ const XML_NODE_NAME$a = "w:tbl";
31696
+ const SD_NODE_NAME$9 = "table";
31697
+ const encode$g = (params2, encodedAttrs) => {
31542
31698
  const { nodes } = params2;
31543
31699
  const node2 = nodes[0];
31544
31700
  const tblPr = node2.elements.find((el) => el.name === "w:tblPr");
31545
31701
  if (tblPr) {
31546
- const encodedProperties = translator$a.encode({ ...params2, nodes: [tblPr] });
31702
+ const encodedProperties = translator$c.encode({ ...params2, nodes: [tblPr] });
31547
31703
  encodedAttrs["tableProperties"] = encodedProperties || {};
31548
31704
  }
31549
31705
  const tblGrid = node2.elements.find((el) => el.name === "w:tblGrid");
31550
31706
  if (tblGrid) {
31551
- encodedAttrs["grid"] = translator$8.encode({ ...params2, nodes: [tblGrid] }).attributes;
31707
+ encodedAttrs["grid"] = translator$a.encode({ ...params2, nodes: [tblGrid] }).attributes;
31552
31708
  }
31553
31709
  [
31554
31710
  "tableStyleId",
@@ -31616,7 +31772,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31616
31772
  const totalColumns = columnWidths.length;
31617
31773
  const activeRowSpans = totalColumns > 0 ? new Array(totalColumns).fill(0) : [];
31618
31774
  rows.forEach((row2, rowIndex) => {
31619
- const result = translator$t.encode({
31775
+ const result = translator$v.encode({
31620
31776
  ...params2,
31621
31777
  nodes: [row2],
31622
31778
  extraParams: {
@@ -31670,13 +31826,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31670
31826
  attrs: encodedAttrs
31671
31827
  };
31672
31828
  };
31673
- const decode$g = (params2, decodedAttrs) => {
31829
+ const decode$i = (params2, decodedAttrs) => {
31674
31830
  params2.node = preProcessVerticalMergeCells(params2.node, params2);
31675
31831
  const { node: node2 } = params2;
31676
31832
  const elements = translateChildNodes(params2);
31677
31833
  const firstRow = node2.content?.find((n) => n.type === "tableRow");
31678
31834
  const properties = node2.attrs.grid;
31679
- const element2 = translator$8.decode({
31835
+ const element2 = translator$a.decode({
31680
31836
  ...params2,
31681
31837
  node: { ...node2, attrs: { ...node2.attrs, grid: properties } },
31682
31838
  extraParams: {
@@ -31686,7 +31842,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31686
31842
  if (element2) elements.unshift(element2);
31687
31843
  if (node2.attrs?.tableProperties) {
31688
31844
  const properties2 = { ...node2.attrs.tableProperties };
31689
- const element22 = translator$a.decode({
31845
+ const element22 = translator$c.decode({
31690
31846
  ...params2,
31691
31847
  node: { ...node2, attrs: { ...node2.attrs, tableProperties: properties2 } }
31692
31848
  });
@@ -31752,7 +31908,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31752
31908
  if (baseTblPr && baseTblPr.elements) {
31753
31909
  tblPr.elements.push(...baseTblPr.elements);
31754
31910
  }
31755
- const tableProperties = translator$a.encode({ ...params2, nodes: [tblPr] });
31911
+ const tableProperties = translator$c.encode({ ...params2, nodes: [tblPr] });
31756
31912
  if (tableProperties) {
31757
31913
  const { borders, rowBorders } = _processTableBorders(tableProperties.borders || {});
31758
31914
  if (borders) stylesToReturn.borders = borders;
@@ -31771,85 +31927,85 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31771
31927
  }
31772
31928
  return stylesToReturn;
31773
31929
  }
31774
- const config$7 = {
31775
- xmlName: XML_NODE_NAME$8,
31776
- sdNodeOrKeyName: SD_NODE_NAME$7,
31930
+ const config$9 = {
31931
+ xmlName: XML_NODE_NAME$a,
31932
+ sdNodeOrKeyName: SD_NODE_NAME$9,
31777
31933
  type: NodeTranslator.translatorTypes.NODE,
31778
- encode: encode$e,
31779
- decode: decode$g,
31934
+ encode: encode$g,
31935
+ decode: decode$i,
31780
31936
  attributes: []
31781
31937
  };
31782
- const translator$7 = NodeTranslator.from(config$7);
31783
- const encode$d = (attributes) => {
31938
+ const translator$9 = NodeTranslator.from(config$9);
31939
+ const encode$f = (attributes) => {
31784
31940
  return attributes["w:id"];
31785
31941
  };
31786
- const decode$f = (attrs) => {
31942
+ const decode$h = (attrs) => {
31787
31943
  return attrs.id;
31788
31944
  };
31789
31945
  const attrConfig$7 = Object.freeze({
31790
31946
  xmlName: "w:id",
31791
31947
  sdName: "id",
31792
- encode: encode$d,
31793
- decode: decode$f
31948
+ encode: encode$f,
31949
+ decode: decode$h
31794
31950
  });
31795
- const encode$c = (attributes) => {
31951
+ const encode$e = (attributes) => {
31796
31952
  return attributes["w:name"];
31797
31953
  };
31798
- const decode$e = (attrs) => {
31954
+ const decode$g = (attrs) => {
31799
31955
  return attrs.name;
31800
31956
  };
31801
31957
  const attrConfig$6 = Object.freeze({
31802
31958
  xmlName: "w:name",
31803
31959
  sdName: "name",
31804
- encode: encode$c,
31805
- decode: decode$e
31960
+ encode: encode$e,
31961
+ decode: decode$g
31806
31962
  });
31807
- const encode$b = (attributes) => {
31963
+ const encode$d = (attributes) => {
31808
31964
  return attributes["w:colFirst"];
31809
31965
  };
31810
- const decode$d = (attrs) => {
31966
+ const decode$f = (attrs) => {
31811
31967
  return attrs.colFirst;
31812
31968
  };
31813
31969
  const attrConfig$5 = Object.freeze({
31814
31970
  xmlName: "w:colFirst",
31815
31971
  sdName: "colFirst",
31816
- encode: encode$b,
31817
- decode: decode$d
31972
+ encode: encode$d,
31973
+ decode: decode$f
31818
31974
  });
31819
- const encode$a = (attributes) => {
31975
+ const encode$c = (attributes) => {
31820
31976
  return attributes["w:colLast"];
31821
31977
  };
31822
- const decode$c = (attrs) => {
31978
+ const decode$e = (attrs) => {
31823
31979
  return attrs.colLast;
31824
31980
  };
31825
31981
  const attrConfig$4 = Object.freeze({
31826
31982
  xmlName: "w:colLast",
31827
31983
  sdName: "colLast",
31828
- encode: encode$a,
31829
- decode: decode$c
31984
+ encode: encode$c,
31985
+ decode: decode$e
31830
31986
  });
31831
- const encode$9 = (attributes) => {
31987
+ const encode$b = (attributes) => {
31832
31988
  return attributes["w:displacedByCustomXml"];
31833
31989
  };
31834
- const decode$b = (attrs) => {
31990
+ const decode$d = (attrs) => {
31835
31991
  return attrs.displacedByCustomXml;
31836
31992
  };
31837
31993
  const attrConfig$3 = Object.freeze({
31838
31994
  xmlName: "w:displacedByCustomXml",
31839
31995
  sdName: "displacedByCustomXml",
31840
- encode: encode$9,
31841
- decode: decode$b
31996
+ encode: encode$b,
31997
+ decode: decode$d
31842
31998
  });
31843
31999
  const validXmlAttributes$4 = [attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3];
31844
- const XML_NODE_NAME$7 = "w:bookmarkStart";
31845
- const SD_NODE_NAME$6 = "bookmarkStart";
31846
- const encode$8 = (params2, encodedAttrs = {}) => {
32000
+ const XML_NODE_NAME$9 = "w:bookmarkStart";
32001
+ const SD_NODE_NAME$8 = "bookmarkStart";
32002
+ const encode$a = (params2, encodedAttrs = {}) => {
31847
32003
  return {
31848
32004
  type: "bookmarkStart",
31849
32005
  attrs: encodedAttrs
31850
32006
  };
31851
32007
  };
31852
- const decode$a = (params2, decodedAttrs = {}) => {
32008
+ const decode$c = (params2, decodedAttrs = {}) => {
31853
32009
  const result = {
31854
32010
  name: "w:bookmarkStart",
31855
32011
  elements: []
@@ -31859,49 +32015,49 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31859
32015
  }
31860
32016
  return result;
31861
32017
  };
31862
- const config$6 = {
31863
- xmlName: XML_NODE_NAME$7,
31864
- sdNodeOrKeyName: SD_NODE_NAME$6,
32018
+ const config$8 = {
32019
+ xmlName: XML_NODE_NAME$9,
32020
+ sdNodeOrKeyName: SD_NODE_NAME$8,
31865
32021
  type: NodeTranslator.translatorTypes.NODE,
31866
- encode: encode$8,
31867
- decode: decode$a,
32022
+ encode: encode$a,
32023
+ decode: decode$c,
31868
32024
  attributes: validXmlAttributes$4
31869
32025
  };
31870
- const translator$6 = NodeTranslator.from(config$6);
31871
- const encode$7 = (attributes) => {
32026
+ const translator$8 = NodeTranslator.from(config$8);
32027
+ const encode$9 = (attributes) => {
31872
32028
  return attributes["w:id"];
31873
32029
  };
31874
- const decode$9 = (attrs) => {
32030
+ const decode$b = (attrs) => {
31875
32031
  return attrs.id;
31876
32032
  };
31877
32033
  const attrConfig$2 = Object.freeze({
31878
32034
  xmlName: "w:id",
31879
32035
  sdName: "id",
31880
- encode: encode$7,
31881
- decode: decode$9
32036
+ encode: encode$9,
32037
+ decode: decode$b
31882
32038
  });
31883
- const encode$6 = (attributes) => {
32039
+ const encode$8 = (attributes) => {
31884
32040
  return attributes["w:displacedByCustomXml"];
31885
32041
  };
31886
- const decode$8 = (attrs) => {
32042
+ const decode$a = (attrs) => {
31887
32043
  return attrs.displacedByCustomXml;
31888
32044
  };
31889
32045
  const attrConfig$1 = Object.freeze({
31890
32046
  xmlName: "w:displacedByCustomXml",
31891
32047
  sdName: "displacedByCustomXml",
31892
- encode: encode$6,
31893
- decode: decode$8
32048
+ encode: encode$8,
32049
+ decode: decode$a
31894
32050
  });
31895
32051
  const validXmlAttributes$3 = [attrConfig$2, attrConfig$1];
31896
- const XML_NODE_NAME$6 = "w:bookmarkEnd";
31897
- const SD_NODE_NAME$5 = "bookmarkEnd";
31898
- const encode$5 = (params2, encodedAttrs = {}) => {
32052
+ const XML_NODE_NAME$8 = "w:bookmarkEnd";
32053
+ const SD_NODE_NAME$7 = "bookmarkEnd";
32054
+ const encode$7 = (params2, encodedAttrs = {}) => {
31899
32055
  return {
31900
32056
  type: "bookmarkEnd",
31901
32057
  attrs: encodedAttrs
31902
32058
  };
31903
32059
  };
31904
- const decode$7 = (params2, decodedAttrs = {}) => {
32060
+ const decode$9 = (params2, decodedAttrs = {}) => {
31905
32061
  const result = {
31906
32062
  name: "w:bookmarkEnd",
31907
32063
  elements: []
@@ -31911,27 +32067,27 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31911
32067
  }
31912
32068
  return result;
31913
32069
  };
31914
- const config$5 = {
31915
- xmlName: XML_NODE_NAME$6,
31916
- sdNodeOrKeyName: SD_NODE_NAME$5,
32070
+ const config$7 = {
32071
+ xmlName: XML_NODE_NAME$8,
32072
+ sdNodeOrKeyName: SD_NODE_NAME$7,
31917
32073
  type: NodeTranslator.translatorTypes.NODE,
31918
- encode: encode$5,
31919
- decode: decode$7,
32074
+ encode: encode$7,
32075
+ decode: decode$9,
31920
32076
  attributes: validXmlAttributes$3
31921
32077
  };
31922
- const translator$5 = NodeTranslator.from(config$5);
31923
- const decode$6 = (attrs) => attrs?.["w:id"];
32078
+ const translator$7 = NodeTranslator.from(config$7);
32079
+ const decode$8 = (attrs) => attrs?.["w:id"];
31924
32080
  const attrConfig = Object.freeze({
31925
32081
  xmlName: "w:id",
31926
32082
  sdName: "w:id",
31927
32083
  // We do not translate it from 'w:id' to 'id' when encoding, so the name is the same
31928
32084
  encode: () => {
31929
32085
  },
31930
- decode: decode$6
32086
+ decode: decode$8
31931
32087
  });
31932
- const XML_NODE_NAME$5 = "w:commentRange";
31933
- const SD_NODE_NAME$4 = "commentRange";
31934
- const decode$5 = (params2) => {
32088
+ const XML_NODE_NAME$7 = "w:commentRange";
32089
+ const SD_NODE_NAME$6 = "commentRange";
32090
+ const decode$7 = (params2) => {
31935
32091
  const { node: node2, comments, commentsExportType, exportedCommentDefs } = params2;
31936
32092
  if (!node2) return;
31937
32093
  if (!comments) return;
@@ -31974,19 +32130,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31974
32130
  };
31975
32131
  };
31976
32132
  const getConfig = (type2) => ({
31977
- xmlName: `${XML_NODE_NAME$5}${type2}`,
31978
- sdNodeOrKeyName: `${SD_NODE_NAME$4}${type2}`,
32133
+ xmlName: `${XML_NODE_NAME$7}${type2}`,
32134
+ sdNodeOrKeyName: `${SD_NODE_NAME$6}${type2}`,
31979
32135
  type: NodeTranslator.translatorTypes.NODE,
31980
32136
  encode: () => {
31981
32137
  },
31982
- decode: decode$5,
32138
+ decode: decode$7,
31983
32139
  attributes: [attrConfig]
31984
32140
  });
31985
32141
  const commentRangeStartTranslator = NodeTranslator.from(getConfig("Start"));
31986
32142
  const commentRangeEndTranslator = NodeTranslator.from(getConfig("End"));
31987
- const XML_NODE_NAME$4 = "sd:pageReference";
31988
- const SD_NODE_NAME$3 = "pageReference";
31989
- const encode$4 = (params2) => {
32143
+ const XML_NODE_NAME$6 = "sd:pageReference";
32144
+ const SD_NODE_NAME$5 = "pageReference";
32145
+ const encode$6 = (params2) => {
31990
32146
  const { nodes = [], nodeListHandler } = params2 || {};
31991
32147
  const node2 = nodes[0];
31992
32148
  const processedText = nodeListHandler.handler({
@@ -32003,7 +32159,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32003
32159
  };
32004
32160
  return processedNode;
32005
32161
  };
32006
- const decode$4 = (params2) => {
32162
+ const decode$6 = (params2) => {
32007
32163
  const { node: node2 } = params2;
32008
32164
  const outputMarks = processOutputMarks(node2.attrs?.marksAsAttrs || []);
32009
32165
  const contentNodes = (node2.content ?? []).flatMap((n) => exportSchemaToJson({ ...params2, node: n }));
@@ -32076,17 +32232,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32076
32232
  ];
32077
32233
  return translated;
32078
32234
  };
32079
- const config$4 = {
32080
- xmlName: XML_NODE_NAME$4,
32081
- sdNodeOrKeyName: SD_NODE_NAME$3,
32235
+ const config$6 = {
32236
+ xmlName: XML_NODE_NAME$6,
32237
+ sdNodeOrKeyName: SD_NODE_NAME$5,
32082
32238
  type: NodeTranslator.translatorTypes.NODE,
32083
- encode: encode$4,
32084
- decode: decode$4
32239
+ encode: encode$6,
32240
+ decode: decode$6
32085
32241
  };
32086
- const translator$4 = NodeTranslator.from(config$4);
32087
- const XML_NODE_NAME$3 = "sd:tableOfContents";
32088
- const SD_NODE_NAME$2 = "tableOfContents";
32089
- const encode$3 = (params2) => {
32242
+ const translator$6 = NodeTranslator.from(config$6);
32243
+ const XML_NODE_NAME$5 = "sd:tableOfContents";
32244
+ const SD_NODE_NAME$4 = "tableOfContents";
32245
+ const encode$5 = (params2) => {
32090
32246
  const { nodes = [], nodeListHandler } = params2 || {};
32091
32247
  const node2 = nodes[0];
32092
32248
  const processedContent = nodeListHandler.handler({
@@ -32102,7 +32258,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32102
32258
  };
32103
32259
  return processedNode;
32104
32260
  };
32105
- const decode$3 = (params2) => {
32261
+ const decode$5 = (params2) => {
32106
32262
  const { node: node2 } = params2;
32107
32263
  const contentNodes = node2.content.map((n) => exportSchemaToJson({ ...params2, node: n }));
32108
32264
  const tocBeginElements = [
@@ -32149,6 +32305,194 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32149
32305
  }
32150
32306
  return contentNodes;
32151
32307
  };
32308
+ const config$5 = {
32309
+ xmlName: XML_NODE_NAME$5,
32310
+ sdNodeOrKeyName: SD_NODE_NAME$4,
32311
+ type: NodeTranslator.translatorTypes.NODE,
32312
+ encode: encode$5,
32313
+ decode: decode$5
32314
+ };
32315
+ const translator$5 = NodeTranslator.from(config$5);
32316
+ const XML_NODE_NAME$4 = "sd:autoPageNumber";
32317
+ const SD_NODE_NAME$3 = "page-number";
32318
+ const encode$4 = (params2) => {
32319
+ const { nodes = [] } = params2 || {};
32320
+ const node2 = nodes[0];
32321
+ const rPr = node2.elements?.find((el) => el.name === "w:rPr");
32322
+ const marks = parseMarks(rPr || { elements: [] });
32323
+ const processedNode = {
32324
+ type: "page-number",
32325
+ attrs: {
32326
+ marksAsAttrs: marks
32327
+ }
32328
+ };
32329
+ return processedNode;
32330
+ };
32331
+ const decode$4 = (params2) => {
32332
+ const { node: node2 } = params2;
32333
+ const outputMarks = processOutputMarks(node2.attrs?.marksAsAttrs || []);
32334
+ const translated = [
32335
+ {
32336
+ name: "w:r",
32337
+ elements: [
32338
+ {
32339
+ name: "w:rPr",
32340
+ elements: outputMarks
32341
+ },
32342
+ {
32343
+ name: "w:fldChar",
32344
+ attributes: {
32345
+ "w:fldCharType": "begin"
32346
+ }
32347
+ }
32348
+ ]
32349
+ },
32350
+ {
32351
+ name: "w:r",
32352
+ elements: [
32353
+ {
32354
+ name: "w:rPr",
32355
+ elements: outputMarks
32356
+ },
32357
+ {
32358
+ name: "w:instrText",
32359
+ attributes: { "xml:space": "preserve" },
32360
+ elements: [
32361
+ {
32362
+ type: "text",
32363
+ text: " PAGE"
32364
+ }
32365
+ ]
32366
+ }
32367
+ ]
32368
+ },
32369
+ {
32370
+ name: "w:r",
32371
+ elements: [
32372
+ {
32373
+ name: "w:rPr",
32374
+ elements: outputMarks
32375
+ },
32376
+ {
32377
+ name: "w:fldChar",
32378
+ attributes: {
32379
+ "w:fldCharType": "separate"
32380
+ }
32381
+ }
32382
+ ]
32383
+ },
32384
+ {
32385
+ name: "w:r",
32386
+ elements: [
32387
+ {
32388
+ name: "w:rPr",
32389
+ elements: outputMarks
32390
+ },
32391
+ {
32392
+ name: "w:fldChar",
32393
+ attributes: {
32394
+ "w:fldCharType": "end"
32395
+ }
32396
+ }
32397
+ ]
32398
+ }
32399
+ ];
32400
+ return translated;
32401
+ };
32402
+ const config$4 = {
32403
+ xmlName: XML_NODE_NAME$4,
32404
+ sdNodeOrKeyName: SD_NODE_NAME$3,
32405
+ type: NodeTranslator.translatorTypes.NODE,
32406
+ encode: encode$4,
32407
+ decode: decode$4
32408
+ };
32409
+ const translator$4 = NodeTranslator.from(config$4);
32410
+ const XML_NODE_NAME$3 = "sd:totalPageNumber";
32411
+ const SD_NODE_NAME$2 = "total-page-number";
32412
+ const encode$3 = (params2) => {
32413
+ const { nodes = [] } = params2 || {};
32414
+ const node2 = nodes[0];
32415
+ const rPr = node2.elements?.find((el) => el.name === "w:rPr");
32416
+ const marks = parseMarks(rPr || { elements: [] });
32417
+ const processedNode = {
32418
+ type: "total-page-number",
32419
+ attrs: {
32420
+ marksAsAttrs: marks
32421
+ }
32422
+ };
32423
+ return processedNode;
32424
+ };
32425
+ const decode$3 = (params2) => {
32426
+ const { node: node2 } = params2;
32427
+ const outputMarks = processOutputMarks(node2.attrs?.marksAsAttrs || []);
32428
+ const translated = [
32429
+ {
32430
+ name: "w:r",
32431
+ elements: [
32432
+ {
32433
+ name: "w:rPr",
32434
+ elements: outputMarks
32435
+ },
32436
+ {
32437
+ name: "w:fldChar",
32438
+ attributes: {
32439
+ "w:fldCharType": "begin"
32440
+ }
32441
+ }
32442
+ ]
32443
+ },
32444
+ {
32445
+ name: "w:r",
32446
+ elements: [
32447
+ {
32448
+ name: "w:rPr",
32449
+ elements: outputMarks
32450
+ },
32451
+ {
32452
+ name: "w:instrText",
32453
+ attributes: { "xml:space": "preserve" },
32454
+ elements: [
32455
+ {
32456
+ type: "text",
32457
+ text: " NUMPAGES"
32458
+ }
32459
+ ]
32460
+ }
32461
+ ]
32462
+ },
32463
+ {
32464
+ name: "w:r",
32465
+ elements: [
32466
+ {
32467
+ name: "w:rPr",
32468
+ elements: outputMarks
32469
+ },
32470
+ {
32471
+ name: "w:fldChar",
32472
+ attributes: {
32473
+ "w:fldCharType": "separate"
32474
+ }
32475
+ }
32476
+ ]
32477
+ },
32478
+ {
32479
+ name: "w:r",
32480
+ elements: [
32481
+ {
32482
+ name: "w:rPr",
32483
+ elements: outputMarks
32484
+ },
32485
+ {
32486
+ name: "w:fldChar",
32487
+ attributes: {
32488
+ "w:fldCharType": "end"
32489
+ }
32490
+ }
32491
+ ]
32492
+ }
32493
+ ];
32494
+ return translated;
32495
+ };
32152
32496
  const config$3 = {
32153
32497
  xmlName: XML_NODE_NAME$3,
32154
32498
  sdNodeOrKeyName: SD_NODE_NAME$2,
@@ -32208,7 +32552,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32208
32552
  if (isHorizontalRule) {
32209
32553
  schemaAttrs.horizontalRule = true;
32210
32554
  }
32211
- const pElement = translator$$.encode({
32555
+ const pElement = translator$11.encode({
32212
32556
  ...params2,
32213
32557
  nodes: [{ ...pNode, elements: pNode.elements.filter((el) => el.name !== "w:r") }]
32214
32558
  });
@@ -32265,7 +32609,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32265
32609
  if (mainNode.name === "w:drawing") node2 = mainNode;
32266
32610
  else node2 = mainNode.elements.find((el) => el.name === "w:drawing");
32267
32611
  if (!node2) return { nodes: [], consumed: 0 };
32268
- const schemaNode = translator$q.encode(params2);
32612
+ const schemaNode = translator$s.encode(params2);
32269
32613
  const newNodes = schemaNode ? [schemaNode] : [];
32270
32614
  return { nodes: newNodes, consumed: 1 };
32271
32615
  };
@@ -32380,7 +32724,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32380
32724
  });
32381
32725
  break;
32382
32726
  case "w:ins":
32383
- result = translator$1u.encode({
32727
+ result = translator$1w.encode({
32384
32728
  ...translatorParams,
32385
32729
  extraParams: {
32386
32730
  ...translatorParams.extraParams,
@@ -32395,8 +32739,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32395
32739
  handlerName: "trackChangeNodeHandler",
32396
32740
  handler: handleTrackChangeNode
32397
32741
  };
32398
- const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$_);
32399
- const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$Z);
32742
+ const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$10);
32743
+ const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$$);
32400
32744
  const XML_NODE_NAME$1 = "w:t";
32401
32745
  const SD_NODE_NAME$1 = "text";
32402
32746
  const validXmlAttributes$1 = [createAttributeHandler("xml:space", "xmlSpace")];
@@ -32436,12 +32780,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32436
32780
  case "trackDelete":
32437
32781
  return translator$2.decode(params2);
32438
32782
  case "trackInsert":
32439
- return translator$1u.decode(params2);
32783
+ return translator$1w.decode(params2);
32440
32784
  }
32441
32785
  }
32442
32786
  const isLinkNode = node2.marks?.some((m2) => m2.type === "link");
32443
32787
  if (isLinkNode && !extraParams?.linkProcessed) {
32444
- return translator$_.decode(params2);
32788
+ return translator$10.decode(params2);
32445
32789
  }
32446
32790
  const { text: text2, marks = [] } = node2;
32447
32791
  return getTextNodeForExport(text2, marks, params2);
@@ -32483,7 +32827,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32483
32827
  if (nodes.length === 0 || nodes[0].name !== "w:p") {
32484
32828
  return { nodes: [], consumed: 0 };
32485
32829
  }
32486
- const schemaNode = translator$$.encode(params2);
32830
+ const schemaNode = translator$11.encode(params2);
32487
32831
  const newNodes = schemaNode ? [schemaNode] : [];
32488
32832
  return { nodes: newNodes, consumed: 1 };
32489
32833
  };
@@ -32496,7 +32840,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32496
32840
  if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
32497
32841
  return { nodes: [], consumed: 0 };
32498
32842
  }
32499
- const result = translator$p.encode(params2);
32843
+ const result = translator$r.encode(params2);
32500
32844
  if (!result) {
32501
32845
  return { nodes: [], consumed: 0 };
32502
32846
  }
@@ -32637,7 +32981,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32637
32981
  if (nodes.length === 0 || nodes[0].name !== "w:br") {
32638
32982
  return { nodes: [], consumed: 0 };
32639
32983
  }
32640
- const result = translator$21.encode(params2);
32984
+ const result = translator$23.encode(params2);
32641
32985
  if (!result) return { nodes: [], consumed: 0 };
32642
32986
  return {
32643
32987
  nodes: [result],
@@ -32709,7 +33053,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32709
33053
  if (isCustomMarkBookmark(nodes[0], params2.editor)) {
32710
33054
  return handleBookmarkNode(params2);
32711
33055
  }
32712
- const node2 = translator$6.encode(params2);
33056
+ const node2 = translator$8.encode(params2);
32713
33057
  if (!node2) return { nodes: [], consumed: 0 };
32714
33058
  return { nodes: [node2], consumed: 1 };
32715
33059
  };
@@ -32741,7 +33085,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32741
33085
  if (!nodes.length || nodes[0].name !== "w:bookmarkEnd") {
32742
33086
  return { nodes: [], consumed: 0 };
32743
33087
  }
32744
- const node2 = translator$5.encode(params2);
33088
+ const node2 = translator$7.encode(params2);
32745
33089
  if (!node2) return { nodes: [], consumed: 0 };
32746
33090
  return { nodes: [node2], consumed: 1 };
32747
33091
  };
@@ -32791,7 +33135,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32791
33135
  ...currentNode,
32792
33136
  type: "element"
32793
33137
  };
32794
- const translated = translator$1K.encode({
33138
+ const translated = translator$1M.encode({
32795
33139
  ...params2,
32796
33140
  nodes: [nodeForTranslator],
32797
33141
  extraParams: { ...params2.extraParams || {}, node: nodeForTranslator }
@@ -32817,45 +33161,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32817
33161
  handlerName: "alternateChoiceHandler",
32818
33162
  handler: handleAlternateChoice
32819
33163
  };
32820
- const handleAutoPageNumber = (params2) => {
32821
- const { nodes } = params2;
32822
- if (nodes.length === 0 || nodes[0].name !== "sd:autoPageNumber") {
32823
- return { nodes: [], consumed: 0 };
32824
- }
32825
- const rPr = nodes[0].elements?.find((el) => el.name === "w:rPr");
32826
- const marks = parseMarks(rPr || { elements: [] });
32827
- const processedNode = {
32828
- type: "page-number",
32829
- attrs: {
32830
- marksAsAttrs: marks
32831
- }
32832
- };
32833
- return { nodes: [processedNode], consumed: 1 };
32834
- };
32835
- const autoPageHandlerEntity = {
32836
- handlerName: "autoPageNumberHandler",
32837
- handler: handleAutoPageNumber
32838
- };
32839
- const handleAutoTotalPageNumber = (params2) => {
32840
- const { nodes } = params2;
32841
- if (nodes.length === 0 || nodes[0].name !== "sd:totalPageNumber") {
32842
- return { nodes: [], consumed: 0 };
32843
- }
32844
- const rPr = nodes[0].elements?.find((el) => el.name === "w:rPr");
32845
- const marks = parseMarks(rPr || { elements: [] });
32846
- const processedNode = {
32847
- type: "total-page-number",
32848
- attrs: {
32849
- marksAsAttrs: marks
32850
- }
32851
- };
32852
- return { nodes: [processedNode], consumed: 1 };
32853
- };
32854
- const autoTotalPageCountEntity = {
32855
- handlerName: "autoTotalPageCountEntity",
32856
- handler: handleAutoTotalPageNumber
32857
- };
32858
- const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$4);
33164
+ const autoPageHandlerEntity = generateV2HandlerEntity("autoPageNumberHandler", translator$4);
33165
+ const autoTotalPageCountEntity = generateV2HandlerEntity("autoTotalPageCountEntity", translator$3);
33166
+ const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$6);
32859
33167
  const handlePictNode = (params2) => {
32860
33168
  const { nodes } = params2;
32861
33169
  if (!nodes.length || nodes[0].name !== "w:p") {
@@ -33253,15 +33561,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33253
33561
  if (!nodes.length || nodes[0].name !== "w:tab") {
33254
33562
  return { nodes: [], consumed: 0 };
33255
33563
  }
33256
- const node2 = translator$1$.encode(params2);
33564
+ const node2 = translator$21.encode(params2);
33257
33565
  return { nodes: [node2], consumed: 1 };
33258
33566
  };
33259
33567
  const tabNodeEntityHandler = {
33260
33568
  handlerName: "w:tabTranslator",
33261
33569
  handler: handleTabNode
33262
33570
  };
33263
- const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$7);
33264
- const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$3);
33571
+ const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$9);
33572
+ const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$5);
33265
33573
  function preProcessPageInstruction(nodesToCombine) {
33266
33574
  const pageNumNode = {
33267
33575
  name: "sd:autoPageNumber",
@@ -34113,7 +34421,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34113
34421
  if (vmlAttributes || horizontalRule) {
34114
34422
  return translateVRectContentBlock(params2);
34115
34423
  }
34116
- const alternateContent = translator$1K.decode(params2);
34424
+ const alternateContent = translator$1M.decode(params2);
34117
34425
  return wrapTextInRun(alternateContent);
34118
34426
  }
34119
34427
  function translateVRectContentBlock(params2) {
@@ -34157,7 +34465,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34157
34465
  const XML_NODE_NAME = "w:pict";
34158
34466
  const SD_NODE_NAME = ["shapeContainer", "contentBlock"];
34159
34467
  const validXmlAttributes = [];
34160
- function encode$Q(params2) {
34468
+ function encode$S(params2) {
34161
34469
  const { node: node2, pNode } = params2.extraParams;
34162
34470
  const { type: pictType, handler: handler2 } = pictNodeTypeStrategy(node2);
34163
34471
  if (!handler2 || pictType === "unknown") {
@@ -34170,7 +34478,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34170
34478
  });
34171
34479
  return result;
34172
34480
  }
34173
- function decode$S(params2) {
34481
+ function decode$U(params2) {
34174
34482
  const { node: node2 } = params2;
34175
34483
  if (!node2 || !node2.type) {
34176
34484
  return null;
@@ -34189,12 +34497,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34189
34497
  xmlName: XML_NODE_NAME,
34190
34498
  sdNodeOrKeyName: SD_NODE_NAME,
34191
34499
  type: NodeTranslator.translatorTypes.NODE,
34192
- encode: encode$Q,
34193
- decode: decode$S,
34500
+ encode: encode$S,
34501
+ decode: decode$U,
34194
34502
  attributes: validXmlAttributes
34195
34503
  };
34196
34504
  const translator = NodeTranslator.from(config);
34197
- const RUN_LEVEL_WRAPPERS = /* @__PURE__ */ new Set(["w:hyperlink", "w:ins", "w:del"]);
34198
34505
  const DEFAULT_SECTION_PROPS_TWIPS = Object.freeze({
34199
34506
  pageSize: Object.freeze({ width: "12240", height: "15840" }),
34200
34507
  pageMargins: Object.freeze({
@@ -34252,64 +34559,25 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34252
34559
  });
34253
34560
  return sectPr;
34254
34561
  };
34255
- function convertSdtContentToRuns(elements) {
34256
- const normalized = Array.isArray(elements) ? elements : [elements];
34257
- const runs2 = [];
34258
- normalized.forEach((element2) => {
34259
- if (!element2) return;
34260
- if (element2.name === "w:sdtPr") {
34261
- return;
34262
- }
34263
- if (element2.name === "w:r") {
34264
- runs2.push(element2);
34265
- return;
34266
- }
34267
- if (element2.name === "w:sdt") {
34268
- const sdtContent = (element2.elements || []).find((child) => child?.name === "w:sdtContent");
34269
- if (sdtContent?.elements) {
34270
- runs2.push(...convertSdtContentToRuns(sdtContent.elements));
34271
- }
34272
- return;
34273
- }
34274
- if (RUN_LEVEL_WRAPPERS.has(element2.name)) {
34275
- const wrapperElements = convertSdtContentToRuns(element2.elements || []);
34276
- if (wrapperElements.length) {
34277
- runs2.push({
34278
- ...element2,
34279
- elements: wrapperElements
34280
- });
34281
- }
34282
- return;
34283
- }
34284
- if (element2.name) {
34285
- runs2.push({
34286
- name: "w:r",
34287
- type: "element",
34288
- elements: element2.elements || [element2]
34289
- });
34290
- }
34291
- });
34292
- return runs2.filter((run2) => Array.isArray(run2.elements) && run2.elements.length > 0);
34293
- }
34294
34562
  function exportSchemaToJson(params2) {
34295
34563
  const { type: type2 } = params2.node || {};
34296
34564
  const router = {
34297
34565
  doc: translateDocumentNode,
34298
34566
  body: translateBodyNode,
34299
34567
  heading: translateHeadingNode,
34300
- paragraph: translator$$,
34301
- run: translator$Z,
34568
+ paragraph: translator$11,
34569
+ run: translator$$,
34302
34570
  text: translator$1,
34303
- lineBreak: translator$21,
34304
- table: translator$7,
34305
- tableRow: translator$t,
34306
- tableCell: translator$E,
34307
- bookmarkStart: translator$6,
34308
- bookmarkEnd: translator$5,
34309
- fieldAnnotation: translator$p,
34310
- tab: translator$1$,
34311
- image: translator$q,
34312
- hardBreak: translator$21,
34571
+ lineBreak: translator$23,
34572
+ table: translator$9,
34573
+ tableRow: translator$v,
34574
+ tableCell: translator$G,
34575
+ bookmarkStart: translator$8,
34576
+ bookmarkEnd: translator$7,
34577
+ fieldAnnotation: translator$r,
34578
+ tab: translator$21,
34579
+ image: translator$s,
34580
+ hardBreak: translator$23,
34313
34581
  commentRangeStart: commentRangeStartTranslator,
34314
34582
  commentRangeEnd: commentRangeEndTranslator,
34315
34583
  commentReference: () => null,
@@ -34318,14 +34586,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34318
34586
  contentBlock: translator,
34319
34587
  vectorShape: translateVectorShape,
34320
34588
  shapeGroup: translateShapeGroup,
34321
- structuredContent: translator$p,
34322
- structuredContentBlock: translator$p,
34323
- documentPartObject: translator$p,
34324
- documentSection: translator$p,
34325
- "page-number": translatePageNumberNode,
34326
- "total-page-number": translateTotalPageNumberNode,
34327
- pageReference: translator$4,
34328
- tableOfContents: translator$3
34589
+ structuredContent: translator$r,
34590
+ structuredContentBlock: translator$r,
34591
+ documentPartObject: translator$r,
34592
+ documentSection: translator$r,
34593
+ "page-number": translator$4,
34594
+ "total-page-number": translator$3,
34595
+ pageReference: translator$6,
34596
+ tableOfContents: translator$5
34329
34597
  };
34330
34598
  let handler2 = router[type2];
34331
34599
  if (handler2 && "decode" in handler2 && typeof handler2.decode === "function") {
@@ -34397,57 +34665,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34397
34665
  // Maps to Heading1, Heading2, etc. in Word
34398
34666
  }
34399
34667
  };
34400
- return translateParagraphNode({ ...params2, node: paragraphNode });
34401
- }
34402
- function translateParagraphNode(params2) {
34403
- const elements = translateChildNodes(params2);
34404
- const htmlAnnotationChild = elements.find((element2) => element2.name === "htmlAnnotation");
34405
- if (htmlAnnotationChild) {
34406
- return htmlAnnotationChild.elements;
34407
- }
34408
- const pPr = generateParagraphProperties(params2);
34409
- if (pPr) elements.unshift(pPr);
34410
- let attributes = {};
34411
- if (params2.node.attrs?.rsidRDefault) {
34412
- attributes["w:rsidRDefault"] = params2.node.attrs.rsidRDefault;
34413
- }
34414
- const result = {
34415
- name: "w:p",
34416
- elements,
34417
- attributes
34418
- };
34419
- return result;
34420
- }
34421
- function generateParagraphProperties(params2) {
34422
- const { node: node2 } = params2;
34423
- const { attrs = {} } = node2;
34424
- const paragraphProperties = carbonCopy(attrs.paragraphProperties || {});
34425
- if (attrs.styleId !== paragraphProperties.styleId) {
34426
- paragraphProperties.styleId = attrs.styleId;
34427
- }
34428
- ["borders", "styleId", "indent", "textAlign", "keepLines", "keepNext", "spacing", "tabStops"].forEach((key2) => {
34429
- let propKey = key2 === "textAlign" ? "justification" : key2;
34430
- if (JSON.stringify(paragraphProperties[propKey]) !== JSON.stringify(attrs[key2])) {
34431
- paragraphProperties[key2] = attrs[key2];
34432
- }
34433
- });
34434
- const framePr = attrs.dropcap;
34435
- if (framePr) {
34436
- framePr.dropCap = framePr.type;
34437
- delete framePr.type;
34438
- }
34439
- if (JSON.stringify(paragraphProperties.framePr) !== JSON.stringify(framePr)) {
34440
- paragraphProperties.framePr = framePr;
34441
- }
34442
- const marksProps = decodeRPrFromMarks(attrs.marksAttrs || []);
34443
- const finalRunProps = combineRunProperties([paragraphProperties.runProperties || {}, marksProps]);
34444
- paragraphProperties.runProperties = finalRunProps;
34445
- const pPr = translator$10.decode({ node: { ...node2, attrs: { paragraphProperties } } });
34446
- const sectPr = node2.attrs?.paragraphProperties?.sectPr;
34447
- if (sectPr) {
34448
- pPr.elements.push(sectPr);
34449
- }
34450
- return pPr;
34668
+ return translator$11.decode({ ...params2, node: paragraphNode });
34451
34669
  }
34452
34670
  function translateDocumentNode(params2) {
34453
34671
  const bodyNode = {
@@ -34462,59 +34680,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34462
34680
  };
34463
34681
  return [node2, params2];
34464
34682
  }
34465
- function getTextNodeForExport(text2, marks, params2) {
34466
- const hasLeadingOrTrailingSpace = /^\s|\s$/.test(text2);
34467
- const space = hasLeadingOrTrailingSpace ? "preserve" : null;
34468
- const nodeAttrs = space ? { "xml:space": space } : null;
34469
- const textNodes = [];
34470
- const textRunProperties = decodeRPrFromMarks(marks || []);
34471
- const parentRunProperties = params2.extraParams?.runProperties || {};
34472
- const combinedRunProperties = combineRunProperties([parentRunProperties, textRunProperties]);
34473
- const rPrNode = translator$1L.decode({ node: { attrs: { runProperties: combinedRunProperties } } });
34474
- textNodes.push({
34475
- name: "w:t",
34476
- elements: [{ text: text2, type: "text" }],
34477
- attributes: nodeAttrs
34478
- });
34479
- if (params2) {
34480
- const { editor } = params2;
34481
- const customMarks = editor.extensionService.extensions.filter((e) => e.isExternal === true);
34482
- marks.forEach((mark2) => {
34483
- const isCustomMark = customMarks.some((customMark) => {
34484
- const customMarkName = customMark.name;
34485
- return mark2.type === customMarkName;
34486
- });
34487
- if (!isCustomMark) return;
34488
- let attrsString = "";
34489
- Object.entries(mark2.attrs).forEach(([key2, value]) => {
34490
- if (value) {
34491
- attrsString += `${key2}=${value};`;
34492
- }
34493
- });
34494
- if (isCustomMark) {
34495
- textNodes.unshift({
34496
- type: "element",
34497
- name: "w:bookmarkStart",
34498
- attributes: {
34499
- "w:id": "5000",
34500
- "w:name": mark2.type + ";" + attrsString
34501
- }
34502
- });
34503
- textNodes.push({
34504
- type: "element",
34505
- name: "w:bookmarkEnd",
34506
- attributes: {
34507
- "w:id": "5000"
34508
- }
34509
- });
34510
- }
34511
- });
34512
- }
34513
- return {
34514
- name: "w:r",
34515
- elements: rPrNode ? [rPrNode, ...textNodes] : textNodes
34516
- };
34517
- }
34518
34683
  function wrapTextInRun(nodeOrNodes, marks) {
34519
34684
  let elements = [];
34520
34685
  if (Array.isArray(nodeOrNodes)) elements = nodeOrNodes;
@@ -34543,60 +34708,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34543
34708
  }
34544
34709
  });
34545
34710
  }
34546
- function processLinkContentNode(node2) {
34547
- if (!node2) return node2;
34548
- const contentNode = carbonCopy(node2);
34549
- if (!contentNode) return contentNode;
34550
- const hyperlinkStyle = {
34551
- name: "w:rStyle",
34552
- attributes: { "w:val": "Hyperlink" }
34553
- };
34554
- const color2 = {
34555
- name: "w:color",
34556
- attributes: { "w:val": "467886" }
34557
- };
34558
- const underline = {
34559
- name: "w:u",
34560
- attributes: {
34561
- "w:val": "none"
34562
- }
34563
- };
34564
- if (contentNode.name === "w:r") {
34565
- const runProps = contentNode.elements.find((el) => el.name === "w:rPr");
34566
- if (runProps) {
34567
- const foundColor = runProps.elements.find((el) => el.name === "w:color");
34568
- const foundHyperlinkStyle = runProps.elements.find((el) => el.name === "w:rStyle");
34569
- const underlineMark = runProps.elements.find((el) => el.name === "w:u");
34570
- if (!foundColor) runProps.elements.unshift(color2);
34571
- if (!foundHyperlinkStyle) runProps.elements.unshift(hyperlinkStyle);
34572
- if (!underlineMark) runProps.elements.unshift(underline);
34573
- } else {
34574
- const runProps2 = {
34575
- name: "w:rPr",
34576
- elements: [hyperlinkStyle, color2]
34577
- };
34578
- contentNode.elements.unshift(runProps2);
34579
- }
34580
- }
34581
- return contentNode;
34582
- }
34583
- function addNewLinkRelationship(params2, link2) {
34584
- const newId = "rId" + generateDocxRandomId();
34585
- if (!params2.relationships || !Array.isArray(params2.relationships)) {
34586
- params2.relationships = [];
34587
- }
34588
- params2.relationships.push({
34589
- type: "element",
34590
- name: "Relationship",
34591
- attributes: {
34592
- Id: newId,
34593
- Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
34594
- Target: link2,
34595
- TargetMode: "External"
34596
- }
34597
- });
34598
- return newId;
34599
- }
34600
34711
  function translateMark(mark2) {
34601
34712
  const xmlMark = SuperConverter.markTypes.find((m2) => m2.type === mark2.type);
34602
34713
  if (!xmlMark) {
@@ -34623,7 +34734,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34623
34734
  markElement.type = "element";
34624
34735
  break;
34625
34736
  case "underline": {
34626
- const translated = translator$1X.decode({
34737
+ const translated = translator$1Z.decode({
34627
34738
  node: {
34628
34739
  attrs: {
34629
34740
  underlineType: attrs.underlineType ?? attrs.underline ?? null,
@@ -34687,7 +34798,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34687
34798
  break;
34688
34799
  case "highlight": {
34689
34800
  const highlightValue = attrs.color ?? attrs.highlight ?? null;
34690
- const translated = translator$20.decode({ node: { attrs: { highlight: highlightValue } } });
34801
+ const translated = translator$22.decode({ node: { attrs: { highlight: highlightValue } } });
34691
34802
  return translated || {};
34692
34803
  }
34693
34804
  case "strike":
@@ -34769,82 +34880,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34769
34880
  if (!selfClosing) tags.push(`</${name}>`);
34770
34881
  return tags;
34771
34882
  };
34772
- const translatePageNumberNode = (params2) => {
34773
- const outputMarks = processOutputMarks(params2.node.attrs?.marksAsAttrs || []);
34774
- return getAutoPageJson("PAGE", outputMarks);
34775
- };
34776
- const translateTotalPageNumberNode = (params2) => {
34777
- const outputMarks = processOutputMarks(params2.node.attrs?.marksAsAttrs || []);
34778
- return getAutoPageJson("NUMPAGES", outputMarks);
34779
- };
34780
- const getAutoPageJson = (type2, outputMarks = []) => {
34781
- return [
34782
- {
34783
- name: "w:r",
34784
- elements: [
34785
- {
34786
- name: "w:rPr",
34787
- elements: outputMarks
34788
- },
34789
- {
34790
- name: "w:fldChar",
34791
- attributes: {
34792
- "w:fldCharType": "begin"
34793
- }
34794
- }
34795
- ]
34796
- },
34797
- {
34798
- name: "w:r",
34799
- elements: [
34800
- {
34801
- name: "w:rPr",
34802
- elements: outputMarks
34803
- },
34804
- {
34805
- name: "w:instrText",
34806
- attributes: { "xml:space": "preserve" },
34807
- elements: [
34808
- {
34809
- type: "text",
34810
- text: ` ${type2}`
34811
- }
34812
- ]
34813
- }
34814
- ]
34815
- },
34816
- {
34817
- name: "w:r",
34818
- elements: [
34819
- {
34820
- name: "w:rPr",
34821
- elements: outputMarks
34822
- },
34823
- {
34824
- name: "w:fldChar",
34825
- attributes: {
34826
- "w:fldCharType": "separate"
34827
- }
34828
- }
34829
- ]
34830
- },
34831
- {
34832
- name: "w:r",
34833
- elements: [
34834
- {
34835
- name: "w:rPr",
34836
- elements: outputMarks
34837
- },
34838
- {
34839
- name: "w:fldChar",
34840
- attributes: {
34841
- "w:fldCharType": "end"
34842
- }
34843
- }
34844
- ]
34845
- }
34846
- ];
34847
- };
34848
34883
  const prepareCommentParaIds = (comment2) => {
34849
34884
  const newComment = {
34850
34885
  ...comment2,
@@ -34853,7 +34888,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34853
34888
  return newComment;
34854
34889
  };
34855
34890
  const getCommentDefinition = (comment2, commentId, allComments, editor) => {
34856
- const translatedText = translateParagraphNode({ editor, node: comment2.commentJSON });
34891
+ const translatedText = translator$11.decode({ editor, node: comment2.commentJSON });
34857
34892
  const attributes = {
34858
34893
  "w:id": String(commentId),
34859
34894
  "w:author": comment2.creatorName || comment2.importedAuthor?.name,
@@ -35268,7 +35303,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35268
35303
  static getStoredSuperdocVersion(docx) {
35269
35304
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
35270
35305
  }
35271
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.31.0-next.3") {
35306
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.31.0-next.5") {
35272
35307
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
35273
35308
  }
35274
35309
  /**
@@ -60269,7 +60304,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
60269
60304
  { default: remarkStringify2 },
60270
60305
  { default: remarkGfm2 }
60271
60306
  ] = await Promise.all([
60272
- Promise.resolve().then(() => indexB74saKaW),
60307
+ Promise.resolve().then(() => indexB7dCHQ),
60273
60308
  Promise.resolve().then(() => indexDRCvimau),
60274
60309
  Promise.resolve().then(() => indexC_x_N6Uh),
60275
60310
  Promise.resolve().then(() => indexD_sWOSiG),
@@ -60470,7 +60505,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
60470
60505
  * Process collaboration migrations
60471
60506
  */
60472
60507
  processCollaborationMigrations() {
60473
- console.debug("[checkVersionMigrations] Current editor version", "0.31.0-next.3");
60508
+ console.debug("[checkVersionMigrations] Current editor version", "0.31.0-next.5");
60474
60509
  if (!this.options.ydoc) return;
60475
60510
  const metaMap = this.options.ydoc.getMap("meta");
60476
60511
  let docVersion = metaMap.get("version");
@@ -99272,92 +99307,92 @@ ${style2}
99272
99307
  };
99273
99308
  const SuperInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$i, [["__scopeId", "data-v-4d5cff52"]]);
99274
99309
  const additionalHandlers = Object.freeze({
99275
- "mc:AlternateContent": translator$1K,
99276
- "sd:pageReference": translator$4,
99277
- "sd:tableOfContents": translator$3,
99278
- "w:b": translator$1_,
99279
- "w:bCs": translator$1Z,
99280
- "w:bidiVisual": translator$o,
99281
- "w:bookmarkEnd": translator$5,
99282
- "w:bookmarkStart": translator$6,
99283
- "w:bottom": translator$1n,
99284
- "w:br": translator$21,
99285
- "w:cantSplit": translator$D,
99286
- "w:caps": translator$1P,
99287
- "w:cnfStyle": translator$1F,
99288
- "w:color": translator$1U,
99289
- "w:divId": translator$1D,
99290
- "w:drawing": translator$q,
99291
- "w:end": translator$V,
99292
- "w:gridAfter": translator$C,
99293
- "w:gridBefore": translator$B,
99294
- "w:gridCol": translator$9,
99295
- "w:hidden": translator$A,
99296
- "w:highlight": translator$20,
99297
- "w:hyperlink": translator$_,
99298
- "w:i": translator$1Y,
99299
- "w:insideH": translator$T,
99300
- "w:insideV": translator$S,
99301
- "w:jc": translator$1A,
99302
- "w:left": translator$1l,
99303
- "w:p": translator$$,
99304
- "w:r": translator$Z,
99305
- "w:rFonts": translator$1T,
99306
- "w:rPr": translator$1L,
99307
- "w:rStyle": translator$1S,
99308
- "w:right": translator$1j,
99309
- "w:sdt": translator$p,
99310
- "w:shd": translator$1O,
99311
- "w:start": translator$R,
99312
- "w:strike": translator$1W,
99313
- "w:sz": translator$1R,
99314
- "w:szCs": translator$1Q,
99315
- "w:tab": translator$1$,
99316
- "w:tbl": translator$7,
99317
- "w:tblBorders": translator$c,
99318
- "w:tblCaption": translator$n,
99319
- "w:tblCellMar": translator$b,
99320
- "w:tblCellSpacing": translator$z,
99321
- "w:tblDescription": translator$m,
99322
- "w:tblGrid": translator$8,
99323
- "w:tblHeader": translator$y,
99324
- "w:tblInd": translator$l,
99325
- "w:tblLayout": translator$k,
99326
- "w:tblLook": translator$j,
99327
- "w:tblOverlap": translator$i,
99328
- "w:tblPr": translator$a,
99329
- "w:tblStyle": translator$h,
99330
- "w:tblStyleColBandSize": translator$g,
99331
- "w:tblStyleRowBandSize": translator$f,
99332
- "w:tblW": translator$e,
99333
- "w:tblpPr": translator$d,
99334
- "w:tc": translator$E,
99335
- "w:top": translator$1h,
99336
- "w:tr": translator$t,
99337
- "w:trHeight": translator$x,
99338
- "w:trPr": translator$u,
99339
- "w:u": translator$1X,
99340
- "w:wAfter": translator$w,
99341
- "w:wBefore": translator$v,
99342
- "wp:anchor": translator$s,
99343
- "wp:inline": translator$r,
99310
+ "mc:AlternateContent": translator$1M,
99311
+ "sd:pageReference": translator$6,
99312
+ "sd:tableOfContents": translator$5,
99313
+ "w:b": translator$20,
99314
+ "w:bCs": translator$1$,
99315
+ "w:bidiVisual": translator$q,
99316
+ "w:bookmarkEnd": translator$7,
99317
+ "w:bookmarkStart": translator$8,
99318
+ "w:bottom": translator$1p,
99319
+ "w:br": translator$23,
99320
+ "w:cantSplit": translator$F,
99321
+ "w:caps": translator$1R,
99322
+ "w:cnfStyle": translator$1H,
99323
+ "w:color": translator$1W,
99324
+ "w:divId": translator$1F,
99325
+ "w:drawing": translator$s,
99326
+ "w:end": translator$X,
99327
+ "w:gridAfter": translator$E,
99328
+ "w:gridBefore": translator$D,
99329
+ "w:gridCol": translator$b,
99330
+ "w:hidden": translator$C,
99331
+ "w:highlight": translator$22,
99332
+ "w:hyperlink": translator$10,
99333
+ "w:i": translator$1_,
99334
+ "w:insideH": translator$V,
99335
+ "w:insideV": translator$U,
99336
+ "w:jc": translator$1C,
99337
+ "w:left": translator$1n,
99338
+ "w:p": translator$11,
99339
+ "w:r": translator$$,
99340
+ "w:rFonts": translator$1V,
99341
+ "w:rPr": translator$1N,
99342
+ "w:rStyle": translator$1U,
99343
+ "w:right": translator$1l,
99344
+ "w:sdt": translator$r,
99345
+ "w:shd": translator$1Q,
99346
+ "w:start": translator$T,
99347
+ "w:strike": translator$1Y,
99348
+ "w:sz": translator$1T,
99349
+ "w:szCs": translator$1S,
99350
+ "w:tab": translator$21,
99351
+ "w:tbl": translator$9,
99352
+ "w:tblBorders": translator$e,
99353
+ "w:tblCaption": translator$p,
99354
+ "w:tblCellMar": translator$d,
99355
+ "w:tblCellSpacing": translator$B,
99356
+ "w:tblDescription": translator$o,
99357
+ "w:tblGrid": translator$a,
99358
+ "w:tblHeader": translator$A,
99359
+ "w:tblInd": translator$n,
99360
+ "w:tblLayout": translator$m,
99361
+ "w:tblLook": translator$l,
99362
+ "w:tblOverlap": translator$k,
99363
+ "w:tblPr": translator$c,
99364
+ "w:tblStyle": translator$j,
99365
+ "w:tblStyleColBandSize": translator$i,
99366
+ "w:tblStyleRowBandSize": translator$h,
99367
+ "w:tblW": translator$g,
99368
+ "w:tblpPr": translator$f,
99369
+ "w:tc": translator$G,
99370
+ "w:top": translator$1j,
99371
+ "w:tr": translator$v,
99372
+ "w:trHeight": translator$z,
99373
+ "w:trPr": translator$w,
99374
+ "w:u": translator$1Z,
99375
+ "w:wAfter": translator$y,
99376
+ "w:wBefore": translator$x,
99377
+ "wp:anchor": translator$u,
99378
+ "wp:inline": translator$t,
99344
99379
  "w:commentRangeStart": commentRangeStartTranslator,
99345
99380
  "w:commentRangeEnd": commentRangeEndTranslator,
99346
- "w:vMerge": translator$W,
99347
- "w:gridSpan": translator$X,
99348
- "w:vAlign": translator$J,
99349
- "w:noWrap": translator$M,
99350
- "w:tcFitText": translator$K,
99351
- "w:tcW": translator$Y,
99352
- "w:hideMark": translator$I,
99353
- "w:textDirection": translator$15,
99354
- "w:tl2br": translator$P,
99355
- "w:tr2bl": translator$O,
99356
- "w:header": translator$H,
99357
- "w:headers": translator$G,
99358
- "w:tcBorders": translator$N,
99359
- "w:tcMar": translator$L,
99360
- "w:tcPr": translator$F
99381
+ "w:vMerge": translator$Y,
99382
+ "w:gridSpan": translator$Z,
99383
+ "w:vAlign": translator$L,
99384
+ "w:noWrap": translator$O,
99385
+ "w:tcFitText": translator$M,
99386
+ "w:tcW": translator$_,
99387
+ "w:hideMark": translator$K,
99388
+ "w:textDirection": translator$17,
99389
+ "w:tl2br": translator$R,
99390
+ "w:tr2bl": translator$Q,
99391
+ "w:header": translator$J,
99392
+ "w:headers": translator$I,
99393
+ "w:tcBorders": translator$P,
99394
+ "w:tcMar": translator$N,
99395
+ "w:tcPr": translator$H
99361
99396
  });
99362
99397
  const baseHandlers = {
99363
99398
  ...additionalHandlers
@@ -116595,7 +116630,7 @@ ${style2}
116595
116630
  this.config.colors = shuffleArray(this.config.colors);
116596
116631
  this.userColorMap = /* @__PURE__ */ new Map();
116597
116632
  this.colorIndex = 0;
116598
- this.version = "0.31.0-next.3";
116633
+ this.version = "0.31.0-next.5";
116599
116634
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
116600
116635
  this.superdocId = config2.superdocId || v4();
116601
116636
  this.colors = this.config.colors;
@@ -118995,7 +119030,7 @@ ${style2}
118995
119030
  value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
118996
119031
  );
118997
119032
  }
118998
- const indexB74saKaW = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
119033
+ const indexB7dCHQ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
118999
119034
  __proto__: null,
119000
119035
  unified
119001
119036
  }, Symbol.toStringTag, { value: "Module" }));