ooxml-core 1.8.4 → 1.9.0

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 (306) hide show
  1. package/dist/PptxHandler-AT7FVG5Q.mjs +2 -0
  2. package/dist/{PptxHandler-BL4B7CZO.mjs → PptxHandler-EX4WBIQQ.mjs} +2 -2
  3. package/dist/PptxHandler-VFSCECPL.cjs +11 -0
  4. package/dist/automation/index.cjs +6652 -4002
  5. package/dist/automation/index.mjs +6652 -4002
  6. package/dist/chunk-AT66SA5M.cjs +44423 -0
  7. package/dist/{chunk-TTPZITQN.mjs → chunk-FIELY5PI.mjs} +1 -1
  8. package/dist/{chunk-ZAP5WLEN.mjs → chunk-IGOA57LE.mjs} +1 -1
  9. package/dist/chunk-LCS3J3QI.mjs +87604 -0
  10. package/dist/{chunk-NIHPA63A.mjs → chunk-M76PHYRR.mjs} +54 -37
  11. package/dist/chunk-OB277ZGE.mjs +44107 -0
  12. package/dist/{chunk-GAGSCAR3.mjs → chunk-OXHMZS7B.mjs} +552 -178
  13. package/dist/chunk-SWF7KVL5.cjs +87610 -0
  14. package/dist/{chunk-Z7IQR4S4.mjs → chunk-WSO4T2LJ.mjs} +246 -21
  15. package/dist/docx/block-parser.d.ts.map +1 -1
  16. package/dist/docx/cell-blocks.d.ts +4 -0
  17. package/dist/docx/cell-blocks.d.ts.map +1 -0
  18. package/dist/docx/document-paragraphs.d.ts.map +1 -1
  19. package/dist/docx/document-parts.d.ts +2 -0
  20. package/dist/docx/document-parts.d.ts.map +1 -1
  21. package/dist/docx/embedded.cjs +189 -20
  22. package/dist/docx/embedded.mjs +189 -20
  23. package/dist/docx/index.cjs +219 -24
  24. package/dist/docx/index.mjs +219 -24
  25. package/dist/docx/layout/adapt-table.d.ts.map +1 -1
  26. package/dist/docx/layout/adapter.d.ts.map +1 -1
  27. package/dist/docx/layout/flow-paragraph.d.ts +5 -0
  28. package/dist/docx/layout/flow-paragraph.d.ts.map +1 -1
  29. package/dist/docx/layout/flow-table.d.ts +2 -1
  30. package/dist/docx/layout/flow-table.d.ts.map +1 -1
  31. package/dist/docx/layout/footnote-columns.d.ts +22 -0
  32. package/dist/docx/layout/footnote-columns.d.ts.map +1 -0
  33. package/dist/docx/layout/footnote-flow.d.ts +27 -0
  34. package/dist/docx/layout/footnote-flow.d.ts.map +1 -0
  35. package/dist/docx/layout/footnote-split.d.ts +7 -0
  36. package/dist/docx/layout/footnote-split.d.ts.map +1 -0
  37. package/dist/docx/layout/index.cjs +1099 -92
  38. package/dist/docx/layout/index.mjs +1099 -92
  39. package/dist/docx/layout/input.d.ts +17 -1
  40. package/dist/docx/layout/input.d.ts.map +1 -1
  41. package/dist/docx/layout/legacy-footnote-flow.d.ts +18 -0
  42. package/dist/docx/layout/legacy-footnote-flow.d.ts.map +1 -0
  43. package/dist/docx/layout/line-metrics.d.ts.map +1 -1
  44. package/dist/docx/layout/page-cursor.d.ts +13 -8
  45. package/dist/docx/layout/page-cursor.d.ts.map +1 -1
  46. package/dist/docx/layout/page-flow.d.ts.map +1 -1
  47. package/dist/docx/layout/paragraph-layout.d.ts.map +1 -1
  48. package/dist/docx/layout/paragraph-tokens.d.ts +2 -0
  49. package/dist/docx/layout/paragraph-tokens.d.ts.map +1 -1
  50. package/dist/docx/layout/reference-footnotes.d.ts +7 -0
  51. package/dist/docx/layout/reference-footnotes.d.ts.map +1 -0
  52. package/dist/docx/layout/result.d.ts +31 -0
  53. package/dist/docx/layout/result.d.ts.map +1 -1
  54. package/dist/docx/layout/section-flow.d.ts +2 -0
  55. package/dist/docx/layout/section-flow.d.ts.map +1 -1
  56. package/dist/docx/layout/table-cell-layout.d.ts +11 -0
  57. package/dist/docx/layout/table-cell-layout.d.ts.map +1 -0
  58. package/dist/docx/layout/table-footnotes.d.ts +27 -0
  59. package/dist/docx/layout/table-footnotes.d.ts.map +1 -0
  60. package/dist/docx/layout/table-layout.d.ts +10 -4
  61. package/dist/docx/layout/table-layout.d.ts.map +1 -1
  62. package/dist/docx/load/index.cjs +194 -25
  63. package/dist/docx/load/index.mjs +194 -25
  64. package/dist/docx/model-run.d.ts +2 -0
  65. package/dist/docx/model-run.d.ts.map +1 -1
  66. package/dist/docx/model.d.ts +7 -0
  67. package/dist/docx/model.d.ts.map +1 -1
  68. package/dist/docx/notes.d.ts +5 -0
  69. package/dist/docx/notes.d.ts.map +1 -1
  70. package/dist/docx/parse-table.d.ts.map +1 -1
  71. package/dist/docx/parse.d.ts.map +1 -1
  72. package/dist/docx/save.d.ts.map +1 -1
  73. package/dist/docx/section-model.d.ts +2 -0
  74. package/dist/docx/section-model.d.ts.map +1 -1
  75. package/dist/docx/sections.d.ts.map +1 -1
  76. package/dist/docx/settings.d.ts +2 -0
  77. package/dist/docx/settings.d.ts.map +1 -1
  78. package/dist/docx/table-model.d.ts +3 -1
  79. package/dist/docx/table-model.d.ts.map +1 -1
  80. package/dist/docx/ui/index.cjs +55 -0
  81. package/dist/docx/ui/index.d.ts +1 -0
  82. package/dist/docx/ui/index.d.ts.map +1 -1
  83. package/dist/docx/ui/index.mjs +55 -1
  84. package/dist/docx/ui/table-structure-guard.d.ts +4 -0
  85. package/dist/docx/ui/table-structure-guard.d.ts.map +1 -0
  86. package/dist/docx/write-footnote-columns.d.ts +3 -0
  87. package/dist/docx/write-footnote-columns.d.ts.map +1 -0
  88. package/dist/docx/write-notes.d.ts.map +1 -1
  89. package/dist/docx/write-run.d.ts.map +1 -1
  90. package/dist/docx/write-sections.d.ts.map +1 -1
  91. package/dist/index.cjs +8 -5
  92. package/dist/index.mjs +8 -5
  93. package/dist/opc/clone-part-graph.d.ts +4 -0
  94. package/dist/opc/clone-part-graph.d.ts.map +1 -1
  95. package/dist/opc/index.cjs +8 -5
  96. package/dist/opc/index.mjs +8 -5
  97. package/dist/pptx/automation/index.cjs +621 -207
  98. package/dist/pptx/automation/index.d.ts +3 -3
  99. package/dist/pptx/automation/index.mjs +5 -5
  100. package/dist/pptx/chunks/{index-Cn-GzYGp.d.ts → index-B4cnSPNz.d.ts} +33 -4
  101. package/dist/pptx/chunks/index-B4cnSPNz.d.ts.map +1 -0
  102. package/dist/pptx/chunks/{index-CKIUurnd.d.ts → index-BZh-IMkN.d.ts} +14 -9
  103. package/dist/pptx/chunks/{index-CKIUurnd.d.ts.map → index-BZh-IMkN.d.ts.map} +1 -1
  104. package/dist/pptx/chunks/{text-operations-BHfAm5K9.d.ts → text-operations-BLodkuXE.d.ts} +29 -12
  105. package/dist/pptx/chunks/text-operations-BLodkuXE.d.ts.map +1 -0
  106. package/dist/pptx/cli/index.cjs +622 -213
  107. package/dist/pptx/cli/index.d.ts +1 -1
  108. package/dist/pptx/cli/index.mjs +4 -4
  109. package/dist/pptx/converter/index.cjs +53 -36
  110. package/dist/pptx/converter/index.d.ts +1 -1
  111. package/dist/pptx/converter/index.mjs +2 -2
  112. package/dist/pptx/editor/render/find-replace.cjs +416 -45
  113. package/dist/pptx/editor/render/find-replace.d.ts +35 -4
  114. package/dist/pptx/editor/render/find-replace.d.ts.map +1 -1
  115. package/dist/pptx/editor/render/find-replace.mjs +416 -46
  116. package/dist/pptx/editor/render/slide-operations.cjs +87 -0
  117. package/dist/pptx/editor/render/slide-operations.d.ts +17 -1
  118. package/dist/pptx/editor/render/slide-operations.d.ts.map +1 -1
  119. package/dist/pptx/editor/render/slide-operations.mjs +83 -1
  120. package/dist/pptx/editor/render/slide-search.cjs +6 -10
  121. package/dist/pptx/editor/render/slide-search.d.ts +1 -1
  122. package/dist/pptx/editor/render/slide-search.mjs +6 -10
  123. package/dist/pptx/editor/render/template-editing.d.ts +1 -1
  124. package/dist/pptx/editor/render/template-editing.d.ts.map +1 -1
  125. package/dist/pptx/index.cjs +889 -237
  126. package/dist/pptx/index.d.ts +4 -4
  127. package/dist/pptx/index.mjs +5 -5
  128. package/dist/teams/index.cjs +593 -34
  129. package/dist/teams/index.mjs +593 -34
  130. package/dist/visio/accessibility.d.ts +10 -0
  131. package/dist/visio/accessibility.d.ts.map +1 -0
  132. package/dist/visio/cell-formula.d.ts +2 -0
  133. package/dist/visio/cell-formula.d.ts.map +1 -1
  134. package/dist/visio/connector-curve-aligned.d.ts +5 -0
  135. package/dist/visio/connector-curve-aligned.d.ts.map +1 -0
  136. package/dist/visio/connector-curve-spans.d.ts +14 -0
  137. package/dist/visio/connector-curve-spans.d.ts.map +1 -0
  138. package/dist/visio/connector-jumps.d.ts +5 -0
  139. package/dist/visio/connector-jumps.d.ts.map +1 -0
  140. package/dist/visio/connector-route-walk.d.ts +2 -1
  141. package/dist/visio/connector-route-walk.d.ts.map +1 -1
  142. package/dist/visio/edit-alt-text-scope.d.ts +5 -0
  143. package/dist/visio/edit-alt-text-scope.d.ts.map +1 -0
  144. package/dist/visio/edit-alt-text.d.ts +3 -0
  145. package/dist/visio/edit-alt-text.d.ts.map +1 -0
  146. package/dist/visio/edit-commands.d.ts +7 -2
  147. package/dist/visio/edit-commands.d.ts.map +1 -1
  148. package/dist/visio/edit-formatting-commands.d.ts +5 -0
  149. package/dist/visio/edit-formatting-commands.d.ts.map +1 -1
  150. package/dist/visio/edit-formatting-paint.d.ts.map +1 -1
  151. package/dist/visio/edit-formatting-scope.d.ts.map +1 -1
  152. package/dist/visio/edit-line-jump-cache.d.ts +4 -0
  153. package/dist/visio/edit-line-jump-cache.d.ts.map +1 -0
  154. package/dist/visio/edit-master-index.d.ts.map +1 -1
  155. package/dist/visio/edit-metadata-commands.d.ts +10 -2
  156. package/dist/visio/edit-metadata-commands.d.ts.map +1 -1
  157. package/dist/visio/edit-metadata.d.ts +3 -1
  158. package/dist/visio/edit-metadata.d.ts.map +1 -1
  159. package/dist/visio/edit-page-alt-text.d.ts +4 -0
  160. package/dist/visio/edit-page-alt-text.d.ts.map +1 -0
  161. package/dist/visio/edit-page-layout.d.ts.map +1 -1
  162. package/dist/visio/edit-page-rename.d.ts.map +1 -1
  163. package/dist/visio/edit-page-setup-commands.d.ts +7 -1
  164. package/dist/visio/edit-page-setup-commands.d.ts.map +1 -1
  165. package/dist/visio/edit-page-size.d.ts.map +1 -1
  166. package/dist/visio/edit-pages.d.ts.map +1 -1
  167. package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
  168. package/dist/visio/edit-scope.d.ts.map +1 -1
  169. package/dist/visio/edit-shape-create.d.ts.map +1 -1
  170. package/dist/visio/edit-stencil-connector-write.d.ts.map +1 -1
  171. package/dist/visio/edit-style-admission.d.ts.map +1 -1
  172. package/dist/visio/edit-text.d.ts.map +1 -1
  173. package/dist/visio/edit.d.ts +1 -1
  174. package/dist/visio/edit.d.ts.map +1 -1
  175. package/dist/visio/index.cjs +1091 -233
  176. package/dist/visio/index.d.ts +2 -1
  177. package/dist/visio/index.d.ts.map +1 -1
  178. package/dist/visio/index.mjs +1091 -234
  179. package/dist/visio/line-jumps.d.ts +1 -5
  180. package/dist/visio/line-jumps.d.ts.map +1 -1
  181. package/dist/visio/model.d.ts +13 -0
  182. package/dist/visio/model.d.ts.map +1 -1
  183. package/dist/visio/page-layout.d.ts +11 -2
  184. package/dist/visio/page-layout.d.ts.map +1 -1
  185. package/dist/visio/parser.d.ts.map +1 -1
  186. package/dist/visio/shape-metadata.d.ts +6 -0
  187. package/dist/visio/shape-metadata.d.ts.map +1 -1
  188. package/dist/visio/shapes.d.ts.map +1 -1
  189. package/dist/visio/text-field-case.d.ts +2 -0
  190. package/dist/visio/text-field-case.d.ts.map +1 -0
  191. package/dist/visio/text-field-display.d.ts.map +1 -1
  192. package/dist/visio/text-field-numeric.d.ts +4 -0
  193. package/dist/visio/text-field-numeric.d.ts.map +1 -0
  194. package/dist/visio/ui/connector-preview.d.ts +1 -1
  195. package/dist/visio/ui/connector-preview.d.ts.map +1 -1
  196. package/dist/visio/ui/data-graphic-rules.d.ts +2 -0
  197. package/dist/visio/ui/data-graphic-rules.d.ts.map +1 -1
  198. package/dist/visio/ui/data-graphics.d.ts +3 -2
  199. package/dist/visio/ui/data-graphics.d.ts.map +1 -1
  200. package/dist/visio/ui/edit-commands.d.ts.map +1 -1
  201. package/dist/visio/ui/index.cjs +16898 -15855
  202. package/dist/visio/ui/index.mjs +16898 -15856
  203. package/dist/visio/ui/scene-details.d.ts.map +1 -1
  204. package/dist/visio/ui/scene-validation.d.ts.map +1 -1
  205. package/dist/visio/ui/snapshot-scene.d.ts +2 -1
  206. package/dist/visio/ui/snapshot-scene.d.ts.map +1 -1
  207. package/dist/visio/xml-attribute-whitespace.d.ts +5 -0
  208. package/dist/visio/xml-attribute-whitespace.d.ts.map +1 -0
  209. package/dist/xlsx/edit/index.d.ts +1 -0
  210. package/dist/xlsx/edit/index.d.ts.map +1 -1
  211. package/dist/xlsx/edit/insert-guard.d.ts.map +1 -1
  212. package/dist/xlsx/edit/merge.d.ts.map +1 -1
  213. package/dist/xlsx/edit/page-breaks.d.ts +5 -0
  214. package/dist/xlsx/edit/page-breaks.d.ts.map +1 -0
  215. package/dist/xlsx/edit/pivots.d.ts +8 -0
  216. package/dist/xlsx/edit/pivots.d.ts.map +1 -0
  217. package/dist/xlsx/edit/print-titles.d.ts +7 -0
  218. package/dist/xlsx/edit/print-titles.d.ts.map +1 -0
  219. package/dist/xlsx/edit/session.d.ts.map +1 -1
  220. package/dist/xlsx/edit/sheets.d.ts.map +1 -1
  221. package/dist/xlsx/edit/shift-formulas.d.ts.map +1 -1
  222. package/dist/xlsx/edit/shift-sheet.d.ts.map +1 -1
  223. package/dist/xlsx/edit/sparkline-ranges.d.ts +11 -0
  224. package/dist/xlsx/edit/sparkline-ranges.d.ts.map +1 -0
  225. package/dist/xlsx/edit/sparkline-xml.d.ts +13 -0
  226. package/dist/xlsx/edit/sparkline-xml.d.ts.map +1 -0
  227. package/dist/xlsx/edit/sparklines.d.ts +16 -0
  228. package/dist/xlsx/edit/sparklines.d.ts.map +1 -0
  229. package/dist/xlsx/edit/table-edits.d.ts.map +1 -1
  230. package/dist/xlsx/edit/tables.d.ts.map +1 -1
  231. package/dist/xlsx/edit/types.d.ts +22 -1
  232. package/dist/xlsx/edit/types.d.ts.map +1 -1
  233. package/dist/xlsx/formula/functions/text-regex.d.ts.map +1 -1
  234. package/dist/xlsx/index.cjs +3159 -1164
  235. package/dist/xlsx/index.d.ts +1 -0
  236. package/dist/xlsx/index.d.ts.map +1 -1
  237. package/dist/xlsx/index.mjs +3140 -1165
  238. package/dist/xlsx/layout/cell-view.d.ts +2 -0
  239. package/dist/xlsx/layout/cell-view.d.ts.map +1 -1
  240. package/dist/xlsx/layout/header-footer.d.ts +58 -0
  241. package/dist/xlsx/layout/header-footer.d.ts.map +1 -0
  242. package/dist/xlsx/layout/index.d.ts +5 -0
  243. package/dist/xlsx/layout/index.d.ts.map +1 -1
  244. package/dist/xlsx/layout/print-breaks.d.ts +11 -0
  245. package/dist/xlsx/layout/print-breaks.d.ts.map +1 -0
  246. package/dist/xlsx/layout/print-layout.d.ts +34 -0
  247. package/dist/xlsx/layout/print-layout.d.ts.map +1 -0
  248. package/dist/xlsx/layout/print-merges.d.ts +18 -0
  249. package/dist/xlsx/layout/print-merges.d.ts.map +1 -0
  250. package/dist/xlsx/layout/print-repeat.d.ts +12 -0
  251. package/dist/xlsx/layout/print-repeat.d.ts.map +1 -0
  252. package/dist/xlsx/layout/print-titles.d.ts +20 -0
  253. package/dist/xlsx/layout/print-titles.d.ts.map +1 -0
  254. package/dist/xlsx/layout/sparkline-data.d.ts.map +1 -1
  255. package/dist/xlsx/layout/sparkline-view.d.ts.map +1 -1
  256. package/dist/xlsx/load/index.cjs +7784 -6976
  257. package/dist/xlsx/load/index.mjs +7784 -6976
  258. package/dist/xlsx/model-pivots.d.ts +46 -0
  259. package/dist/xlsx/model-pivots.d.ts.map +1 -0
  260. package/dist/xlsx/model.d.ts +5 -0
  261. package/dist/xlsx/model.d.ts.map +1 -1
  262. package/dist/xlsx/pivot/admission.d.ts +5 -0
  263. package/dist/xlsx/pivot/admission.d.ts.map +1 -0
  264. package/dist/xlsx/pivot/aggregate.d.ts +19 -0
  265. package/dist/xlsx/pivot/aggregate.d.ts.map +1 -0
  266. package/dist/xlsx/pivot/cache-xml.d.ts +9 -0
  267. package/dist/xlsx/pivot/cache-xml.d.ts.map +1 -0
  268. package/dist/xlsx/pivot/data.d.ts +12 -0
  269. package/dist/xlsx/pivot/data.d.ts.map +1 -0
  270. package/dist/xlsx/pivot/hierarchy.d.ts +7 -0
  271. package/dist/xlsx/pivot/hierarchy.d.ts.map +1 -0
  272. package/dist/xlsx/pivot/index.d.ts +3 -0
  273. package/dist/xlsx/pivot/index.d.ts.map +1 -0
  274. package/dist/xlsx/pivot/read.d.ts +5 -0
  275. package/dist/xlsx/pivot/read.d.ts.map +1 -0
  276. package/dist/xlsx/pivot/table-xml.d.ts +5 -0
  277. package/dist/xlsx/pivot/table-xml.d.ts.map +1 -0
  278. package/dist/xlsx/pivot/write.d.ts +11 -0
  279. package/dist/xlsx/pivot/write.d.ts.map +1 -0
  280. package/dist/xlsx/read/load.d.ts.map +1 -1
  281. package/dist/xlsx/read/sheet-props.d.ts.map +1 -1
  282. package/dist/xlsx/ui/commands/i18n/index.d.ts.map +1 -1
  283. package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
  284. package/dist/xlsx/ui/commands/i18n/pivots.d.ts +3 -0
  285. package/dist/xlsx/ui/commands/i18n/pivots.d.ts.map +1 -0
  286. package/dist/xlsx/ui/commands/i18n/print-layout.d.ts +3 -0
  287. package/dist/xlsx/ui/commands/i18n/print-layout.d.ts.map +1 -0
  288. package/dist/xlsx/ui/commands/i18n/sparklines.d.ts +3 -0
  289. package/dist/xlsx/ui/commands/i18n/sparklines.d.ts.map +1 -0
  290. package/dist/xlsx/ui/commands/i18n/tools.d.ts.map +1 -1
  291. package/dist/xlsx/ui/commands/page-breaks.d.ts +3 -0
  292. package/dist/xlsx/ui/commands/page-breaks.d.ts.map +1 -0
  293. package/dist/xlsx/ui/index.cjs +2001 -288
  294. package/dist/xlsx/ui/index.d.ts +1 -0
  295. package/dist/xlsx/ui/index.d.ts.map +1 -1
  296. package/dist/xlsx/ui/index.mjs +2001 -289
  297. package/dist/xlsx/write/page-setup.d.ts.map +1 -1
  298. package/dist/xlsx/write/save.d.ts.map +1 -1
  299. package/dist/xlsx/write/sheet-parts.d.ts +1 -0
  300. package/dist/xlsx/write/sheet-parts.d.ts.map +1 -1
  301. package/dist/xlsx/write/workbook-part.d.ts +1 -1
  302. package/dist/xlsx/write/workbook-part.d.ts.map +1 -1
  303. package/dist/xlsx/write/worksheet.d.ts.map +1 -1
  304. package/package.json +1 -1
  305. package/dist/pptx/chunks/index-Cn-GzYGp.d.ts.map +0 -1
  306. package/dist/pptx/chunks/text-operations-BHfAm5K9.d.ts.map +0 -1
@@ -56,8 +56,8 @@ function named(element, local, ns, lenient = true) {
56
56
  }
57
57
  var children = (parent, local, ns, lenient = true) => elements(parent).filter((element) => named(element, local, ns, lenient));
58
58
  var first = (parent, local, ns, lenient = true) => parent ? children(parent, local, ns, lenient)[0] : void 0;
59
- function attr(element, local, ns, prefix) {
60
- return element?.getAttributeNS(ns, local) ?? element?.getAttribute(`${prefix}:${local}`) ?? void 0;
59
+ function attr(element, local, ns, prefix2) {
60
+ return element?.getAttributeNS(ns, local) ?? element?.getAttribute(`${prefix2}:${local}`) ?? void 0;
61
61
  }
62
62
  var relAttr = (element, local) => attr(element, local, NS.r, "r");
63
63
 
@@ -338,24 +338,24 @@ var parseLigatures = (props) => {
338
338
  };
339
339
  function extensionPrefix(doc, ns, preferred) {
340
340
  const root = doc.documentElement;
341
- let prefix = preferred;
342
- for (let index = 1; root.lookupNamespaceURI(prefix) && root.lookupNamespaceURI(prefix) !== ns; index++)
343
- prefix = `${preferred}${index}`;
344
- root.setAttributeNS(XMLNS, `xmlns:${prefix}`, ns);
345
- return prefix;
341
+ let prefix2 = preferred;
342
+ for (let index = 1; root.lookupNamespaceURI(prefix2) && root.lookupNamespaceURI(prefix2) !== ns; index++)
343
+ prefix2 = `${preferred}${index}`;
344
+ root.setAttributeNS(XMLNS, `xmlns:${prefix2}`, ns);
345
+ return prefix2;
346
346
  }
347
347
  function writeLigatures(doc, props, value) {
348
348
  for (const element2 of ligatureElements(props)) props.removeChild(element2);
349
349
  if (value === void 0) return;
350
- const prefix = extensionPrefix(doc, WORD_2010_NS, "w14");
350
+ const prefix2 = extensionPrefix(doc, WORD_2010_NS, "w14");
351
351
  const mc = extensionPrefix(doc, MC, "mc");
352
352
  const ignored = new Set(
353
353
  (doc.documentElement.getAttributeNS(MC, "Ignorable") ?? "").split(/\s+/).filter(Boolean)
354
354
  );
355
- ignored.add(prefix);
355
+ ignored.add(prefix2);
356
356
  doc.documentElement.setAttributeNS(MC, `${mc}:Ignorable`, [...ignored].join(" "));
357
- const element = doc.createElementNS(WORD_2010_NS, `${prefix}:ligatures`);
358
- element.setAttributeNS(WORD_2010_NS, `${prefix}:val`, value);
357
+ const element = doc.createElementNS(WORD_2010_NS, `${prefix2}:ligatures`);
358
+ element.setAttributeNS(WORD_2010_NS, `${prefix2}:val`, value);
359
359
  props.appendChild(element);
360
360
  }
361
361
 
@@ -1298,7 +1298,7 @@ async function applyCoreProperties(zip, next, prior) {
1298
1298
  const root = doc.documentElement;
1299
1299
  for (const field of PROPERTY_FIELDS) {
1300
1300
  if ((next?.[field] ?? "") === (prior?.[field] ?? "")) continue;
1301
- const [prefix, ns] = PREFIX[field];
1301
+ const [prefix2, ns] = PREFIX[field];
1302
1302
  let element = child(root, field);
1303
1303
  const value = next?.[field] ?? "";
1304
1304
  if (!value) {
@@ -1306,7 +1306,7 @@ async function applyCoreProperties(zip, next, prior) {
1306
1306
  continue;
1307
1307
  }
1308
1308
  if (!element) {
1309
- element = doc.createElementNS(ns, `${prefix}:${field}`);
1309
+ element = doc.createElementNS(ns, `${prefix2}:${field}`);
1310
1310
  root.appendChild(element);
1311
1311
  }
1312
1312
  element.textContent = value;
@@ -2206,6 +2206,36 @@ function writeTable(doc, table, node, base, writeParagraph, replaceSlots2) {
2206
2206
  return node;
2207
2207
  }
2208
2208
 
2209
+ // docx/write-footnote-columns.ts
2210
+ var W15 = "http://schemas.microsoft.com/office/word/2012/wordml";
2211
+ var XMLNS2 = "http://www.w3.org/2000/xmlns/";
2212
+ var MC2 = "http://schemas.openxmlformats.org/markup-compatibility/2006";
2213
+ function prefix(doc, preferred, namespace) {
2214
+ let name = preferred;
2215
+ for (let suffix = 1; doc.documentElement.lookupNamespaceURI(name) && doc.documentElement.lookupNamespaceURI(name) !== namespace; suffix++)
2216
+ name = preferred + suffix;
2217
+ doc.documentElement.setAttributeNS(XMLNS2, "xmlns:" + name, namespace);
2218
+ return name;
2219
+ }
2220
+ function writeFootnoteColumns(doc, section, value) {
2221
+ if (value !== void 0 && (!Number.isInteger(value) || value < 0 || value > 2147483647))
2222
+ throw new Error("Footnote column count must be an integer from 0 to 2147483647.");
2223
+ const old = elements(section).filter(
2224
+ (element2) => element2.namespaceURI === W15 && element2.localName === "footnoteColumns"
2225
+ );
2226
+ for (const element2 of old) section.removeChild(element2);
2227
+ if (value === void 0) return;
2228
+ const w15 = prefix(doc, "w15", W15), mc = prefix(doc, "mc", MC2);
2229
+ const ignored = new Set(
2230
+ (doc.documentElement.getAttributeNS(MC2, "Ignorable") ?? "").split(/\s+/).filter(Boolean)
2231
+ );
2232
+ ignored.add(w15);
2233
+ doc.documentElement.setAttributeNS(MC2, mc + ":Ignorable", [...ignored].join(" "));
2234
+ const element = doc.createElementNS(W15, w15 + ":footnoteColumns");
2235
+ element.setAttributeNS(WORD_NS, "w:val", String(value));
2236
+ section.appendChild(element);
2237
+ }
2238
+
2209
2239
  // docx/page-borders.ts
2210
2240
  var SIDES3 = ["top", "left", "bottom", "right"];
2211
2241
  var ATTRIBUTES = ["offsetFrom", "display", "zOrder"];
@@ -2349,6 +2379,7 @@ var WRITABLE = /* @__PURE__ */ new Set([
2349
2379
  "footerDistanceTwips",
2350
2380
  "gutterTwips",
2351
2381
  "columns",
2382
+ "footnoteColumns",
2352
2383
  "titlePage",
2353
2384
  "verticalAlign",
2354
2385
  "pageNumbering",
@@ -2412,6 +2443,8 @@ var AFTER_TITLEPG = [
2412
2443
  var AFTER_PGBORDERS = ["lnNumType", ...AFTER_LNNUM];
2413
2444
  var AFTER_TYPE = ["pgSz", ...AFTER_PGSZ];
2414
2445
  function writeSectionProperties(doc, sectPr, section, base) {
2446
+ if (section.footnoteColumns !== base?.footnoteColumns)
2447
+ writeFootnoteColumns(doc, sectPr, section.footnoteColumns);
2415
2448
  if (section.type === "nextPage")
2416
2449
  for (const type of children2(sectPr, "type")) sectPr.removeChild(type);
2417
2450
  else setW5(child2(doc, sectPr, "type", AFTER_TYPE), "val", section.type);
@@ -4385,7 +4418,7 @@ function readBuiltInChartStyle(root) {
4385
4418
  for (const content of children(root, "AlternateContent", NS.mc)) {
4386
4419
  for (const choice of children(content, "Choice", NS.mc)) {
4387
4420
  const requires = choice.getAttribute("Requires")?.trim().split(/\s+/);
4388
- if (!requires?.length || !requires.every((prefix) => choice.lookupNamespaceURI(prefix) === C14))
4421
+ if (!requires?.length || !requires.every((prefix2) => choice.lookupNamespaceURI(prefix2) === C14))
4389
4422
  continue;
4390
4423
  const modern = first(choice, "style", C14)?.getAttribute("val");
4391
4424
  if (modern && /^\d+$/.test(modern) && Number(modern) >= 101 && Number(modern) <= 148)
@@ -4547,12 +4580,12 @@ var CHART_ROOT_BINDINGS = /* @__PURE__ */ new Map([
4547
4580
  var DECLARATION = / xmlns:([A-Za-z_][\w.-]*)="([^"]*)"/g;
4548
4581
  function stripDeclarations(xml, bindings) {
4549
4582
  const conflicting = /* @__PURE__ */ new Set();
4550
- for (const [, prefix, uri] of xml.matchAll(DECLARATION))
4551
- if (prefix !== void 0 && bindings.has(prefix) && bindings.get(prefix) !== uri)
4552
- conflicting.add(prefix);
4583
+ for (const [, prefix2, uri] of xml.matchAll(DECLARATION))
4584
+ if (prefix2 !== void 0 && bindings.has(prefix2) && bindings.get(prefix2) !== uri)
4585
+ conflicting.add(prefix2);
4553
4586
  return xml.replace(
4554
4587
  DECLARATION,
4555
- (match, prefix, uri) => bindings.get(prefix) === uri && !conflicting.has(prefix) ? "" : match
4588
+ (match, prefix2, uri) => bindings.get(prefix2) === uri && !conflicting.has(prefix2) ? "" : match
4556
4589
  );
4557
4590
  }
4558
4591
  var innerXml = (element) => stripDeclarations(elements(element).map(buildXml).join(""), CHART_ROOT_BINDINGS);
@@ -6127,6 +6160,10 @@ function createRun(doc, run, base, old, allocator) {
6127
6160
  node.appendChild(code);
6128
6161
  return node;
6129
6162
  }
6163
+ if (run.noteSeparator) {
6164
+ node.appendChild(makeW(doc, run.noteSeparator));
6165
+ return node;
6166
+ }
6130
6167
  if (run.noteMark) {
6131
6168
  node.appendChild(makeW(doc, run.noteMark === "footnote" ? "footnoteRef" : "endnoteRef"));
6132
6169
  return node;
@@ -8021,7 +8058,12 @@ async function applyNoteEdits(zip, model, base, pendingMedia, docPrIds) {
8021
8058
  const original = baseNotes.get(note.id);
8022
8059
  return !original || JSON.stringify(original.blocks) !== JSON.stringify(note.blocks);
8023
8060
  });
8024
- if (!edited.length && !removed.length) continue;
8061
+ const separators = kind === "footnote" ? model.footnoteSeparators : void 0;
8062
+ const baseSeparators = kind === "footnote" ? base.footnoteSeparators : void 0;
8063
+ const editedSeparators = ["separator", "continuationSeparator"].filter(
8064
+ (type) => separators?.[type] && JSON.stringify(separators[type].blocks) !== JSON.stringify(baseSeparators?.[type]?.blocks)
8065
+ );
8066
+ if (!edited.length && !removed.length && !editedSeparators.length) continue;
8025
8067
  const file = zip.file(part);
8026
8068
  const doc = parseXml2(file ? await file.async("string") : await createNotesPart(zip, kind));
8027
8069
  const elements2 = new Map(
@@ -8033,6 +8075,24 @@ async function applyNoteEdits(zip, model, base, pendingMedia, docPrIds) {
8033
8075
  doc.documentElement.removeChild(element);
8034
8076
  }
8035
8077
  const allocator = await allocatorForPart(zip, part, doc, docPrIds);
8078
+ for (const type of editedSeparators) {
8079
+ const separator = separators[type];
8080
+ let element = children2(doc.documentElement, kind).find((node) => getW(node, "type") === type);
8081
+ if (!element) {
8082
+ element = doc.createElementNS(WORD_NS3, `w:${kind}`);
8083
+ element.setAttributeNS(WORD_NS3, "w:id", separator.id);
8084
+ element.setAttributeNS(WORD_NS3, "w:type", type);
8085
+ doc.documentElement.appendChild(element);
8086
+ }
8087
+ applyBlocks(
8088
+ doc,
8089
+ element,
8090
+ separator.blocks,
8091
+ baseSeparators?.[type]?.blocks ?? [],
8092
+ allocator,
8093
+ contentWidthTwips
8094
+ );
8095
+ }
8036
8096
  for (const note of edited) {
8037
8097
  let element = elements2.get(note.id);
8038
8098
  const original = baseNotes.get(note.id);
@@ -8200,6 +8260,43 @@ async function applyTrackChangesSetting(zip, enabled2) {
8200
8260
  }
8201
8261
  await applySettingsFlag(zip, "trackRevisions", enabled2);
8202
8262
  }
8263
+ async function applyCompatibilityMode(zip, mode) {
8264
+ if (mode !== void 0 && (!Number.isInteger(mode) || mode <= 0 || mode > 2147483647))
8265
+ throw new RangeError("Compatibility mode must be a positive integer.");
8266
+ const file = zip.file(SETTINGS_PATH);
8267
+ if (!file && mode === void 0) return;
8268
+ const doc = parseXml2(
8269
+ await file?.async("string") ?? `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:settings xmlns:w="${WORD_NS}"/>`
8270
+ );
8271
+ const root = doc.documentElement;
8272
+ let compat = children2(root, "compat")[0];
8273
+ if (!compat && mode !== void 0) {
8274
+ compat = makeW(doc, "compat");
8275
+ const rank = SETTINGS_ORDER.indexOf("compat");
8276
+ const after = Array.from(root.childNodes).find(
8277
+ (node) => node.nodeType === 1 && SETTINGS_ORDER.indexOf(node.localName ?? "") > rank
8278
+ );
8279
+ root.insertBefore(compat, after ?? null);
8280
+ }
8281
+ const uri = "http://schemas.microsoft.com/office/word";
8282
+ if (compat) {
8283
+ for (const setting of children2(compat, "compatSetting"))
8284
+ if (setting.getAttributeNS(WORD_NS, "name") === "compatibilityMode" && setting.getAttributeNS(WORD_NS, "uri") === uri)
8285
+ compat.removeChild(setting);
8286
+ if (mode !== void 0) {
8287
+ const setting = makeW(doc, "compatSetting");
8288
+ setting.setAttributeNS(WORD_NS, "w:name", "compatibilityMode");
8289
+ setting.setAttributeNS(WORD_NS, "w:uri", uri);
8290
+ setting.setAttributeNS(WORD_NS, "w:val", String(mode));
8291
+ compat.appendChild(setting);
8292
+ }
8293
+ }
8294
+ zip.file(SETTINGS_PATH, buildXml(doc));
8295
+ if (!file) {
8296
+ await ensureContentTypeOverride(zip, SETTINGS_PATH, SETTINGS_CONTENT_TYPE);
8297
+ await ensureDocumentRelationship(zip, SETTINGS_RELATIONSHIP_TYPE, "settings.xml");
8298
+ }
8299
+ }
8203
8300
 
8204
8301
  // docx/page-background.ts
8205
8302
  var HEX = /^[0-9a-fA-F]{6}$/;
@@ -8231,6 +8328,7 @@ function documentBlockLists(model) {
8231
8328
  (slots) => Object.values(slots ?? {}).flatMap((content) => content ? [content.blocks] : [])
8232
8329
  )
8233
8330
  ),
8331
+ ...Object.values(model.footnoteSeparators ?? {}).map((note) => note.blocks),
8234
8332
  ...[...model.footnotes ?? [], ...model.endnotes ?? []].map((note) => note.blocks)
8235
8333
  ];
8236
8334
  }
@@ -8263,6 +8361,14 @@ function mapDocumentParagraphs(model, map) {
8263
8361
  ...section.footers ? { footers: slots(section.footers) } : {}
8264
8362
  }))
8265
8363
  } : {},
8364
+ ...model.footnoteSeparators ? {
8365
+ footnoteSeparators: Object.fromEntries(
8366
+ Object.entries(model.footnoteSeparators).map(([kind, note]) => [
8367
+ kind,
8368
+ { ...note, blocks: mapBlockParagraphs(note.blocks, map) }
8369
+ ])
8370
+ )
8371
+ } : {},
8266
8372
  ...model.footnotes ? {
8267
8373
  footnotes: model.footnotes.map((note) => ({
8268
8374
  ...note,
@@ -8443,6 +8549,8 @@ async function saveDocx(model, pendingMedia) {
8443
8549
  await applyNumberingCatalog(zip, model, binding);
8444
8550
  await applyCoreProperties(zip, model.properties, binding?.base.properties);
8445
8551
  if (binding) await applyStyleNumbering(zip, model, binding.base);
8552
+ if (model.compatibilityMode !== binding?.base.compatibilityMode)
8553
+ await applyCompatibilityMode(zip, model.compatibilityMode);
8446
8554
  if (Boolean(model.evenAndOddHeaders) !== Boolean(binding?.base.evenAndOddHeaders))
8447
8555
  await applySettingsFlag(zip, "evenAndOddHeaders", Boolean(model.evenAndOddHeaders));
8448
8556
  if (model.pageColor !== binding?.base.pageColor)
@@ -8513,6 +8621,20 @@ function parseCell(cell, parseParagraph3, id) {
8513
8621
  if (margins) result.margins = margins;
8514
8622
  const nested = children2(cell, "tbl").map(nestedPreview);
8515
8623
  if (nested.length) result.nestedTables = nested;
8624
+ if (nested.length) {
8625
+ let paragraphIndex = 0, tableIndex = 0;
8626
+ result.sourceBlocks = Array.from(cell.childNodes).flatMap(
8627
+ (child3) => {
8628
+ if (child3.nodeType !== 1) return [];
8629
+ const element = child3;
8630
+ if (element.namespaceURI !== WORD_NS) return [];
8631
+ if (element.localName === "p") return [result.paragraphs[paragraphIndex++]];
8632
+ if (element.localName === "tbl")
8633
+ return [parseTable(element, `${id}-nested${tableIndex++}`, parseParagraph3)];
8634
+ return [];
8635
+ }
8636
+ );
8637
+ }
8516
8638
  return result;
8517
8639
  }
8518
8640
  function parseLook(element) {
@@ -8727,6 +8849,7 @@ function parseRun2(node, revision) {
8727
8849
  let breakKind;
8728
8850
  let noteReference;
8729
8851
  let noteMark;
8852
+ let noteSeparator;
8730
8853
  let fieldChar;
8731
8854
  const fieldCode = content.length > 0 && content.every((child3) => named2(child3, "instrText")) ? content.map((child3) => textContent(child3)).join("") : void 0;
8732
8855
  const only = content.length === 1 ? content[0] : void 0;
@@ -8742,6 +8865,8 @@ function parseRun2(node, revision) {
8742
8865
  if (id) noteReference = { kind: "endnote", id };
8743
8866
  } else if (named2(only, "footnoteRef")) noteMark = "footnote";
8744
8867
  else if (named2(only, "endnoteRef")) noteMark = "endnote";
8868
+ else if (named2(only, "separator")) noteSeparator = "separator";
8869
+ else if (named2(only, "continuationSeparator")) noteSeparator = "continuationSeparator";
8745
8870
  else if (named2(only, "fldChar")) {
8746
8871
  const type = getW(only, "fldCharType");
8747
8872
  if (type === "begin" || type === "separate" || type === "end") fieldChar = type;
@@ -8759,6 +8884,7 @@ function parseRun2(node, revision) {
8759
8884
  if (breakKind) run.break = breakKind;
8760
8885
  if (noteReference) run.noteReference = noteReference;
8761
8886
  if (noteMark) run.noteMark = noteMark;
8887
+ if (noteSeparator) run.noteSeparator = noteSeparator;
8762
8888
  if (fieldChar) {
8763
8889
  run.fieldChar = fieldChar;
8764
8890
  const flags = parseFieldFlags(only);
@@ -8935,6 +9061,14 @@ function pageBordersOf(element) {
8935
9061
  return borders ? { pageBorders: borders } : {};
8936
9062
  }
8937
9063
  function parseOneSection(section, endsAtBlockId) {
9064
+ const footnoteColumns = parseUnsignedInteger(
9065
+ getW(
9066
+ elements(section).find(
9067
+ (element) => element.localName === "footnoteColumns" && element.namespaceURI === "http://schemas.microsoft.com/office/word/2012/wordml"
9068
+ ),
9069
+ "val"
9070
+ )
9071
+ );
8938
9072
  const size = first2(section, "pgSz");
8939
9073
  const margins = first2(section, "pgMar");
8940
9074
  const typeValue = enumValue(isStSectionMark, getW(first2(section, "type"), "val"), "w:type");
@@ -8959,6 +9093,7 @@ function parseOneSection(section, endsAtBlockId) {
8959
9093
  ...footerDistance !== void 0 ? { footerDistanceTwips: footerDistance } : {},
8960
9094
  ...gutter !== void 0 ? { gutterTwips: gutter } : {},
8961
9095
  columns: parseColumns(section),
9096
+ ...footnoteColumns !== void 0 ? { footnoteColumns } : {},
8962
9097
  ...onOffElement(first2(section, "titlePg")) === true ? { titlePage: true } : {},
8963
9098
  ...vAlignValue ? { verticalAlign: vAlignValue } : {},
8964
9099
  ...pgNum ? {
@@ -9012,6 +9147,29 @@ function parseNotesPart(xml, kind, parseBlocks) {
9012
9147
  }
9013
9148
  return notes;
9014
9149
  }
9150
+ function parseFootnoteSeparators(xml, parseBlocks) {
9151
+ const root = parseXml2(xml).documentElement;
9152
+ const result = {};
9153
+ for (const element of children2(root, "footnote")) {
9154
+ const type = getW(element, "type");
9155
+ if (type !== "separator" && type !== "continuationSeparator") continue;
9156
+ for (const run of Array.from(element.getElementsByTagNameNS(root.namespaceURI, "r"))) {
9157
+ const content = Array.from(run.childNodes).filter((child3) => child3.nodeType === 1).filter((child3) => child3.localName !== "rPr");
9158
+ if (content.length < 2 || !content.some((child3) => skippedTypes.has(child3.localName)))
9159
+ continue;
9160
+ const props = children2(run, "rPr")[0];
9161
+ for (const child3 of content) {
9162
+ const split = run.cloneNode(false);
9163
+ if (props) split.appendChild(props.cloneNode(true));
9164
+ split.appendChild(child3.cloneNode(true));
9165
+ run.parentNode.insertBefore(split, run);
9166
+ }
9167
+ run.parentNode.removeChild(run);
9168
+ }
9169
+ result[type] = { id: getW(element, "id") ?? type, blocks: parseBlocks(element, `fn-${type}-`) };
9170
+ }
9171
+ return result;
9172
+ }
9015
9173
 
9016
9174
  // docx/document-parts.ts
9017
9175
  async function partContext(zip, path2, base) {
@@ -9027,6 +9185,10 @@ async function readPart(zip, path2) {
9027
9185
  function parseSettings(xml) {
9028
9186
  if (!xml) return { evenAndOddHeaders: false, autoHyphenation: false };
9029
9187
  const root = parseXml2(xml).documentElement;
9188
+ const compatibility = (first2(root, "compat") ? children2(first2(root, "compat"), "compatSetting") : []).find(
9189
+ (setting) => getW(setting, "name") === "compatibilityMode" && getW(setting, "uri") === "http://schemas.microsoft.com/office/word"
9190
+ );
9191
+ const compatibilityMode = compatibility ? Number(getW(compatibility, "val")) : void 0;
9030
9192
  const footnoteNumFmt = enumValue(
9031
9193
  isStNumberFormat,
9032
9194
  getW(first2(first2(root, "footnotePr"), "numFmt"), "val"),
@@ -9038,6 +9200,7 @@ function parseSettings(xml) {
9038
9200
  "w:endnotePr/w:numFmt"
9039
9201
  );
9040
9202
  return {
9203
+ ...compatibilityMode !== void 0 && Number.isInteger(compatibilityMode) && compatibilityMode > 0 ? { compatibilityMode } : {},
9041
9204
  evenAndOddHeaders: onOffElement(first2(root, "evenAndOddHeaders")) === true,
9042
9205
  autoHyphenation: onOffElement(first2(root, "autoHyphenation")) === true,
9043
9206
  ...footnoteNumFmt ? { footnoteNumFmt } : {},
@@ -9102,9 +9265,10 @@ async function parseDocumentParts(zip, body, blocks, drawings) {
9102
9265
  const endnotesXml = await readPart(zip, "word/endnotes.xml");
9103
9266
  const notesParser = async (path2) => {
9104
9267
  const context = await partContext(zip, path2, drawings);
9105
- return (container, prefix) => withParseWarnings(warnings, () => parseBlocksFromContainer(container, prefix, context));
9268
+ return (container, prefix2) => withParseWarnings(warnings, () => parseBlocksFromContainer(container, prefix2, context));
9106
9269
  };
9107
9270
  const footnotes = footnotesXml ? parseNotesPart(footnotesXml, "footnote", await notesParser("word/footnotes.xml")) : void 0;
9271
+ const footnoteSeparators = footnotesXml ? parseFootnoteSeparators(footnotesXml, await notesParser("word/footnotes.xml")) : void 0;
9108
9272
  const endnotes = endnotesXml ? parseNotesPart(endnotesXml, "endnote", await notesParser("word/endnotes.xml")) : void 0;
9109
9273
  if (sections.some((section) => section.columns.count > 1))
9110
9274
  warnings.push(
@@ -9116,7 +9280,9 @@ async function parseDocumentParts(zip, body, blocks, drawings) {
9116
9280
  );
9117
9281
  return {
9118
9282
  sections,
9283
+ ...settings.compatibilityMode !== void 0 ? { compatibilityMode: settings.compatibilityMode } : {},
9119
9284
  ...footnotes ? { footnotes } : {},
9285
+ ...footnoteSeparators ? { footnoteSeparators } : {},
9120
9286
  ...endnotes ? { endnotes } : {},
9121
9287
  ...settings.footnoteNumFmt ? { footnoteNumFmt: settings.footnoteNumFmt } : {},
9122
9288
  ...settings.endnoteNumFmt ? { endnoteNumFmt: settings.endnoteNumFmt } : {},
@@ -9304,7 +9470,9 @@ async function readPackage(input) {
9304
9470
  );
9305
9471
  const parts = await parseDocumentParts(zip, body, blocks, drawings);
9306
9472
  model.sections = parts.sections;
9473
+ if (parts.compatibilityMode !== void 0) model.compatibilityMode = parts.compatibilityMode;
9307
9474
  if (parts.footnotes) model.footnotes = parts.footnotes;
9475
+ if (parts.footnoteSeparators) model.footnoteSeparators = parts.footnoteSeparators;
9308
9476
  if (parts.endnotes) model.endnotes = parts.endnotes;
9309
9477
  if (parts.footnoteNumFmt) model.footnoteNumFmt = parts.footnoteNumFmt;
9310
9478
  if (parts.endnoteNumFmt) model.endnoteNumFmt = parts.endnoteNumFmt;
@@ -9351,6 +9519,7 @@ async function readPackage(input) {
9351
9519
  (slots) => Object.values(slots ?? {}).flatMap((content) => content?.blocks ?? [])
9352
9520
  )
9353
9521
  ),
9522
+ ...Object.values(model.footnoteSeparators ?? {}).flatMap((note) => note.blocks),
9354
9523
  ...[...model.footnotes ?? [], ...model.endnotes ?? []].flatMap((note) => note.blocks)
9355
9524
  ];
9356
9525
  await resolveDocumentDiagrams(