ooxml-core 0.19.0 → 0.21.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 (328) hide show
  1. package/README.md +21 -43
  2. package/dist/automation/index.cjs +195 -193
  3. package/dist/automation/index.mjs +195 -193
  4. package/dist/chart/axis-nice.d.ts +97 -0
  5. package/dist/chart/axis-nice.d.ts.map +1 -0
  6. package/dist/chart/histogram-binning.d.ts +40 -0
  7. package/dist/chart/histogram-binning.d.ts.map +1 -0
  8. package/dist/chart/index.cjs +167 -0
  9. package/dist/chart/index.d.ts +2 -0
  10. package/dist/chart/index.d.ts.map +1 -1
  11. package/dist/chart/index.mjs +162 -1
  12. package/dist/diagram/index.cjs +2 -1
  13. package/dist/diagram/index.mjs +2 -1
  14. package/dist/docx/attr-units.d.ts +11 -0
  15. package/dist/docx/attr-units.d.ts.map +1 -0
  16. package/dist/docx/block-parser.d.ts.map +1 -1
  17. package/dist/docx/case-transform.d.ts +9 -0
  18. package/dist/docx/case-transform.d.ts.map +1 -0
  19. package/dist/docx/embedded.cjs +2 -1
  20. package/dist/docx/embedded.mjs +2 -1
  21. package/dist/docx/index.cjs +289 -3
  22. package/dist/docx/index.d.ts +5 -0
  23. package/dist/docx/index.d.ts.map +1 -1
  24. package/dist/docx/index.mjs +269 -4
  25. package/dist/docx/layout/adapter.d.ts.map +1 -1
  26. package/dist/docx/layout/table-layout.d.ts.map +1 -1
  27. package/dist/docx/load/index.cjs +2 -1
  28. package/dist/docx/load/index.mjs +2 -1
  29. package/dist/docx/page-setup-model.d.ts +29 -0
  30. package/dist/docx/page-setup-model.d.ts.map +1 -0
  31. package/dist/docx/page-size.d.ts +11 -0
  32. package/dist/docx/page-size.d.ts.map +1 -0
  33. package/dist/docx/parse.d.ts.map +1 -1
  34. package/dist/docx/section-edit.d.ts +19 -0
  35. package/dist/docx/section-edit.d.ts.map +1 -0
  36. package/dist/docx/tab-stops.d.ts.map +1 -1
  37. package/dist/docx/ui/backstage-focus.d.ts +6 -0
  38. package/dist/docx/ui/backstage-focus.d.ts.map +1 -0
  39. package/dist/docx/ui/break-note-schema.d.ts +11 -0
  40. package/dist/docx/ui/break-note-schema.d.ts.map +1 -0
  41. package/dist/docx/ui/collaboration-authority.d.ts +31 -0
  42. package/dist/docx/ui/collaboration-authority.d.ts.map +1 -0
  43. package/dist/docx/ui/collaboration-identity.d.ts +8 -0
  44. package/dist/docx/ui/collaboration-identity.d.ts.map +1 -0
  45. package/dist/docx/ui/collaboration-protocol.d.ts +25 -0
  46. package/dist/docx/ui/collaboration-protocol.d.ts.map +1 -0
  47. package/dist/docx/ui/collaboration.d.ts +30 -0
  48. package/dist/docx/ui/collaboration.d.ts.map +1 -0
  49. package/dist/docx/ui/defined.d.ts +3 -0
  50. package/dist/docx/ui/defined.d.ts.map +1 -0
  51. package/dist/docx/ui/dirty-state.d.ts +9 -0
  52. package/dist/docx/ui/dirty-state.d.ts.map +1 -0
  53. package/dist/docx/ui/field-guard.d.ts +21 -0
  54. package/dist/docx/ui/field-guard.d.ts.map +1 -0
  55. package/dist/docx/ui/header-footer-history.d.ts +15 -0
  56. package/dist/docx/ui/header-footer-history.d.ts.map +1 -0
  57. package/dist/docx/ui/index.cjs +2380 -0
  58. package/dist/docx/ui/index.d.ts +30 -0
  59. package/dist/docx/ui/index.d.ts.map +1 -0
  60. package/dist/docx/ui/index.mjs +2317 -0
  61. package/dist/docx/ui/inline-content-schema.d.ts +15 -0
  62. package/dist/docx/ui/inline-content-schema.d.ts.map +1 -0
  63. package/dist/docx/ui/ligature-style.d.ts +4 -0
  64. package/dist/docx/ui/ligature-style.d.ts.map +1 -0
  65. package/dist/docx/ui/node-numbering.d.ts +8 -0
  66. package/dist/docx/ui/node-numbering.d.ts.map +1 -0
  67. package/dist/docx/ui/review-schema.d.ts +90 -0
  68. package/dist/docx/ui/review-schema.d.ts.map +1 -0
  69. package/dist/docx/ui/ribbon-action-ids.d.ts +26 -0
  70. package/dist/docx/ui/ribbon-action-ids.d.ts.map +1 -0
  71. package/dist/docx/ui/ribbon-colors.d.ts +3 -0
  72. package/dist/docx/ui/ribbon-colors.d.ts.map +1 -0
  73. package/dist/docx/ui/ribbon-legacy-labels.d.ts +6 -0
  74. package/dist/docx/ui/ribbon-legacy-labels.d.ts.map +1 -0
  75. package/dist/docx/ui/run-compare.d.ts +5 -0
  76. package/dist/docx/ui/run-compare.d.ts.map +1 -0
  77. package/dist/docx/ui/run-extra-mark.d.ts +17 -0
  78. package/dist/docx/ui/run-extra-mark.d.ts.map +1 -0
  79. package/dist/docx/ui/schema-marks.d.ts +273 -0
  80. package/dist/docx/ui/schema-marks.d.ts.map +1 -0
  81. package/dist/docx/ui/smartart-theme.d.ts +21 -0
  82. package/dist/docx/ui/smartart-theme.d.ts.map +1 -0
  83. package/dist/docx/ui/table-render.d.ts +24 -0
  84. package/dist/docx/ui/table-render.d.ts.map +1 -0
  85. package/dist/docx/ui/table-visuals.d.ts +3 -0
  86. package/dist/docx/ui/table-visuals.d.ts.map +1 -0
  87. package/dist/docx/ui/theme/css-vars.d.ts +6 -0
  88. package/dist/docx/ui/theme/css-vars.d.ts.map +1 -0
  89. package/dist/docx/ui/theme/defaults.d.ts +12 -0
  90. package/dist/docx/ui/theme/defaults.d.ts.map +1 -0
  91. package/dist/docx/ui/theme/element.d.ts +9 -0
  92. package/dist/docx/ui/theme/element.d.ts.map +1 -0
  93. package/dist/docx/ui/theme/index.d.ts +5 -0
  94. package/dist/docx/ui/theme/index.d.ts.map +1 -0
  95. package/dist/docx/ui/theme/types.d.ts +42 -0
  96. package/dist/docx/ui/theme/types.d.ts.map +1 -0
  97. package/dist/docx/ui/word-count.d.ts +3 -0
  98. package/dist/docx/ui/word-count.d.ts.map +1 -0
  99. package/dist/docx/ui/zoom-fit.d.ts +16 -0
  100. package/dist/docx/ui/zoom-fit.d.ts.map +1 -0
  101. package/dist/docx/validate-paragraph.d.ts.map +1 -1
  102. package/dist/index.cjs +169 -1
  103. package/dist/index.mjs +169 -1
  104. package/dist/math/index.cjs +2 -1
  105. package/dist/math/index.mjs +2 -1
  106. package/dist/opc/index.cjs +2 -1
  107. package/dist/opc/index.mjs +2 -1
  108. package/dist/pptx/automation/index.cjs +1572 -863
  109. package/dist/pptx/automation/index.d.ts +4 -3
  110. package/dist/pptx/automation/index.d.ts.map +1 -1
  111. package/dist/pptx/automation/index.mjs +1572 -863
  112. package/dist/pptx/chunks/color-ref-BM66NGFP.d.ts +42 -0
  113. package/dist/pptx/chunks/color-ref-BM66NGFP.d.ts.map +1 -0
  114. package/dist/pptx/chunks/{index-D0yGoLyw.d.ts → index-CcQTCBnT.d.ts} +63 -479
  115. package/dist/pptx/chunks/index-CcQTCBnT.d.ts.map +1 -0
  116. package/dist/pptx/chunks/{index-BtBj3VG1.d.ts → index-DHoPgFcH.d.ts} +529 -11
  117. package/dist/pptx/chunks/index-DHoPgFcH.d.ts.map +1 -0
  118. package/dist/pptx/chunks/{text-operations-GuisjlbR.d.ts → text-operations-BzdehTeY.d.ts} +50 -51
  119. package/dist/pptx/chunks/text-operations-BzdehTeY.d.ts.map +1 -0
  120. package/dist/pptx/cli/index.cjs +1204 -489
  121. package/dist/pptx/cli/index.d.ts +1 -1
  122. package/dist/pptx/cli/index.mjs +1204 -489
  123. package/dist/pptx/converter/index.cjs +8 -5
  124. package/dist/pptx/converter/index.d.ts +1 -1
  125. package/dist/pptx/converter/index.mjs +8 -5
  126. package/dist/pptx/index.cjs +1699 -989
  127. package/dist/pptx/index.d.ts +5 -4
  128. package/dist/pptx/index.mjs +1698 -990
  129. package/dist/pptx/ui/index.cjs +510 -0
  130. package/dist/pptx/ui/index.d.ts +80 -0
  131. package/dist/pptx/ui/index.d.ts.map +1 -0
  132. package/dist/pptx/ui/index.mjs +499 -0
  133. package/dist/visio/index.cjs +2 -1
  134. package/dist/visio/index.mjs +2 -1
  135. package/dist/visio/ui/contract.d.ts +33 -0
  136. package/dist/visio/ui/contract.d.ts.map +1 -0
  137. package/dist/visio/ui/demo-document.d.ts +4 -0
  138. package/dist/visio/ui/demo-document.d.ts.map +1 -0
  139. package/dist/visio/ui/diagnostics.d.ts +10 -0
  140. package/dist/visio/ui/diagnostics.d.ts.map +1 -0
  141. package/dist/visio/ui/document-history.d.ts +43 -0
  142. package/dist/visio/ui/document-history.d.ts.map +1 -0
  143. package/dist/visio/ui/document-text-search.d.ts +45 -0
  144. package/dist/visio/ui/document-text-search.d.ts.map +1 -0
  145. package/dist/visio/ui/edit-commands.d.ts +4 -0
  146. package/dist/visio/ui/edit-commands.d.ts.map +1 -0
  147. package/dist/visio/ui/edit-error.d.ts +5 -0
  148. package/dist/visio/ui/edit-error.d.ts.map +1 -0
  149. package/dist/visio/ui/foreign-vector-budget.d.ts +25 -0
  150. package/dist/visio/ui/foreign-vector-budget.d.ts.map +1 -0
  151. package/dist/visio/ui/index.cjs +1523 -0
  152. package/dist/visio/ui/index.d.ts +12 -0
  153. package/dist/visio/ui/index.d.ts.map +1 -0
  154. package/dist/visio/ui/index.mjs +1498 -0
  155. package/dist/visio/ui/scene-details.d.ts +8 -0
  156. package/dist/visio/ui/scene-details.d.ts.map +1 -0
  157. package/dist/visio/ui/scene-validation.d.ts +5 -0
  158. package/dist/visio/ui/scene-validation.d.ts.map +1 -0
  159. package/dist/visio/ui/snapshot-scene.d.ts +9 -0
  160. package/dist/visio/ui/snapshot-scene.d.ts.map +1 -0
  161. package/dist/xlsx/index.cjs +100 -98
  162. package/dist/xlsx/index.mjs +100 -98
  163. package/dist/xlsx/load/index.cjs +68 -66
  164. package/dist/xlsx/load/index.mjs +68 -66
  165. package/dist/xlsx/ui/backstage/templates.d.ts +16 -0
  166. package/dist/xlsx/ui/backstage/templates.d.ts.map +1 -0
  167. package/dist/xlsx/ui/commands/alignment.d.ts +4 -0
  168. package/dist/xlsx/ui/commands/alignment.d.ts.map +1 -0
  169. package/dist/xlsx/ui/commands/cells.d.ts +3 -0
  170. package/dist/xlsx/ui/commands/cells.d.ts.map +1 -0
  171. package/dist/xlsx/ui/commands/cf-presets.d.ts +15 -0
  172. package/dist/xlsx/ui/commands/cf-presets.d.ts.map +1 -0
  173. package/dist/xlsx/ui/commands/clipboard.d.ts +22 -0
  174. package/dist/xlsx/ui/commands/clipboard.d.ts.map +1 -0
  175. package/dist/xlsx/ui/commands/contextual.d.ts +13 -0
  176. package/dist/xlsx/ui/commands/contextual.d.ts.map +1 -0
  177. package/dist/xlsx/ui/commands/data.d.ts +3 -0
  178. package/dist/xlsx/ui/commands/data.d.ts.map +1 -0
  179. package/dist/xlsx/ui/commands/editing.d.ts +13 -0
  180. package/dist/xlsx/ui/commands/editing.d.ts.map +1 -0
  181. package/dist/xlsx/ui/commands/font.d.ts +21 -0
  182. package/dist/xlsx/ui/commands/font.d.ts.map +1 -0
  183. package/dist/xlsx/ui/commands/formulas.d.ts +15 -0
  184. package/dist/xlsx/ui/commands/formulas.d.ts.map +1 -0
  185. package/dist/xlsx/ui/commands/i18n/core-features.d.ts +3 -0
  186. package/dist/xlsx/ui/commands/i18n/core-features.d.ts.map +1 -0
  187. package/dist/xlsx/ui/commands/i18n/format-cells.d.ts +3 -0
  188. package/dist/xlsx/ui/commands/i18n/format-cells.d.ts.map +1 -0
  189. package/dist/xlsx/ui/commands/i18n/index.d.ts +4 -0
  190. package/dist/xlsx/ui/commands/i18n/index.d.ts.map +1 -0
  191. package/dist/xlsx/ui/commands/i18n/messages.d.ts +3 -0
  192. package/dist/xlsx/ui/commands/i18n/messages.d.ts.map +1 -0
  193. package/dist/xlsx/ui/commands/i18n/navigation.d.ts +3 -0
  194. package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -0
  195. package/dist/xlsx/ui/commands/i18n/ribbon-home.d.ts +3 -0
  196. package/dist/xlsx/ui/commands/i18n/ribbon-home.d.ts.map +1 -0
  197. package/dist/xlsx/ui/commands/i18n/ribbon-tabs.d.ts +3 -0
  198. package/dist/xlsx/ui/commands/i18n/ribbon-tabs.d.ts.map +1 -0
  199. package/dist/xlsx/ui/commands/i18n/rules.d.ts +3 -0
  200. package/dist/xlsx/ui/commands/i18n/rules.d.ts.map +1 -0
  201. package/dist/xlsx/ui/commands/i18n/tools.d.ts +3 -0
  202. package/dist/xlsx/ui/commands/i18n/tools.d.ts.map +1 -0
  203. package/dist/xlsx/ui/commands/i18n/types.d.ts +5 -0
  204. package/dist/xlsx/ui/commands/i18n/types.d.ts.map +1 -0
  205. package/dist/xlsx/ui/commands/icons.d.ts +4 -0
  206. package/dist/xlsx/ui/commands/icons.d.ts.map +1 -0
  207. package/dist/xlsx/ui/commands/number.d.ts +11 -0
  208. package/dist/xlsx/ui/commands/number.d.ts.map +1 -0
  209. package/dist/xlsx/ui/commands/page-layout.d.ts +10 -0
  210. package/dist/xlsx/ui/commands/page-layout.d.ts.map +1 -0
  211. package/dist/xlsx/ui/commands/select-special.d.ts +12 -0
  212. package/dist/xlsx/ui/commands/select-special.d.ts.map +1 -0
  213. package/dist/xlsx/ui/commands/sort-filter.d.ts +3 -0
  214. package/dist/xlsx/ui/commands/sort-filter.d.ts.map +1 -0
  215. package/dist/xlsx/ui/commands/style-presets.d.ts +21 -0
  216. package/dist/xlsx/ui/commands/style-presets.d.ts.map +1 -0
  217. package/dist/xlsx/ui/commands/util.d.ts +59 -0
  218. package/dist/xlsx/ui/commands/util.d.ts.map +1 -0
  219. package/dist/xlsx/ui/commands.d.ts +36 -0
  220. package/dist/xlsx/ui/commands.d.ts.map +1 -0
  221. package/dist/xlsx/ui/context-menu/items.d.ts +36 -0
  222. package/dist/xlsx/ui/context-menu/items.d.ts.map +1 -0
  223. package/dist/xlsx/ui/context.d.ts +65 -0
  224. package/dist/xlsx/ui/context.d.ts.map +1 -0
  225. package/dist/xlsx/ui/dialogs/format-cells/number-categories.d.ts +28 -0
  226. package/dist/xlsx/ui/dialogs/format-cells/number-categories.d.ts.map +1 -0
  227. package/dist/xlsx/ui/dialogs/format-cells/types.d.ts +40 -0
  228. package/dist/xlsx/ui/dialogs/format-cells/types.d.ts.map +1 -0
  229. package/dist/xlsx/ui/dialogs/insert-chart-model.d.ts +9 -0
  230. package/dist/xlsx/ui/dialogs/insert-chart-model.d.ts.map +1 -0
  231. package/dist/xlsx/ui/dialogs.d.ts +9 -0
  232. package/dist/xlsx/ui/dialogs.d.ts.map +1 -0
  233. package/dist/xlsx/ui/dirty-state.d.ts +9 -0
  234. package/dist/xlsx/ui/dirty-state.d.ts.map +1 -0
  235. package/dist/xlsx/ui/formula-bar/name-resolve.d.ts +23 -0
  236. package/dist/xlsx/ui/formula-bar/name-resolve.d.ts.map +1 -0
  237. package/dist/xlsx/ui/grid/cell-items.d.ts +42 -0
  238. package/dist/xlsx/ui/grid/cell-items.d.ts.map +1 -0
  239. package/dist/xlsx/ui/grid/cell-paint.d.ts +26 -0
  240. package/dist/xlsx/ui/grid/cell-paint.d.ts.map +1 -0
  241. package/dist/xlsx/ui/grid/edit-bridge.d.ts +47 -0
  242. package/dist/xlsx/ui/grid/edit-bridge.d.ts.map +1 -0
  243. package/dist/xlsx/ui/grid/geometry.d.ts +76 -0
  244. package/dist/xlsx/ui/grid/geometry.d.ts.map +1 -0
  245. package/dist/xlsx/ui/grid/icon-sets.d.ts +3 -0
  246. package/dist/xlsx/ui/grid/icon-sets.d.ts.map +1 -0
  247. package/dist/xlsx/ui/grid/number-fit.d.ts +3 -0
  248. package/dist/xlsx/ui/grid/number-fit.d.ts.map +1 -0
  249. package/dist/xlsx/ui/grid/selection-ops.d.ts +32 -0
  250. package/dist/xlsx/ui/grid/selection-ops.d.ts.map +1 -0
  251. package/dist/xlsx/ui/grid/view-cache.d.ts +15 -0
  252. package/dist/xlsx/ui/grid/view-cache.d.ts.map +1 -0
  253. package/dist/xlsx/ui/index.cjs +28484 -0
  254. package/dist/xlsx/ui/index.d.ts +56 -0
  255. package/dist/xlsx/ui/index.d.ts.map +1 -0
  256. package/dist/xlsx/ui/index.mjs +28290 -0
  257. package/dist/xlsx/ui/locales/de/commands.d.ts +2 -0
  258. package/dist/xlsx/ui/locales/de/commands.d.ts.map +1 -0
  259. package/dist/xlsx/ui/locales/de/grid.d.ts +2 -0
  260. package/dist/xlsx/ui/locales/de/grid.d.ts.map +1 -0
  261. package/dist/xlsx/ui/locales/de/index.d.ts +2 -0
  262. package/dist/xlsx/ui/locales/de/index.d.ts.map +1 -0
  263. package/dist/xlsx/ui/locales/de/shell.d.ts +2 -0
  264. package/dist/xlsx/ui/locales/de/shell.d.ts.map +1 -0
  265. package/dist/xlsx/ui/locales/en/commands.d.ts +2 -0
  266. package/dist/xlsx/ui/locales/en/commands.d.ts.map +1 -0
  267. package/dist/xlsx/ui/locales/en/grid.d.ts +2 -0
  268. package/dist/xlsx/ui/locales/en/grid.d.ts.map +1 -0
  269. package/dist/xlsx/ui/locales/en/index.d.ts +2 -0
  270. package/dist/xlsx/ui/locales/en/index.d.ts.map +1 -0
  271. package/dist/xlsx/ui/locales/en/shell.d.ts +2 -0
  272. package/dist/xlsx/ui/locales/en/shell.d.ts.map +1 -0
  273. package/dist/xlsx/ui/locales/es/commands.d.ts +2 -0
  274. package/dist/xlsx/ui/locales/es/commands.d.ts.map +1 -0
  275. package/dist/xlsx/ui/locales/es/grid.d.ts +2 -0
  276. package/dist/xlsx/ui/locales/es/grid.d.ts.map +1 -0
  277. package/dist/xlsx/ui/locales/es/index.d.ts +2 -0
  278. package/dist/xlsx/ui/locales/es/index.d.ts.map +1 -0
  279. package/dist/xlsx/ui/locales/es/shell.d.ts +2 -0
  280. package/dist/xlsx/ui/locales/es/shell.d.ts.map +1 -0
  281. package/dist/xlsx/ui/locales/fr/commands.d.ts +2 -0
  282. package/dist/xlsx/ui/locales/fr/commands.d.ts.map +1 -0
  283. package/dist/xlsx/ui/locales/fr/grid.d.ts +2 -0
  284. package/dist/xlsx/ui/locales/fr/grid.d.ts.map +1 -0
  285. package/dist/xlsx/ui/locales/fr/index.d.ts +2 -0
  286. package/dist/xlsx/ui/locales/fr/index.d.ts.map +1 -0
  287. package/dist/xlsx/ui/locales/fr/shell.d.ts +2 -0
  288. package/dist/xlsx/ui/locales/fr/shell.d.ts.map +1 -0
  289. package/dist/xlsx/ui/locales/merge.d.ts +7 -0
  290. package/dist/xlsx/ui/locales/merge.d.ts.map +1 -0
  291. package/dist/xlsx/ui/locales/zh-CN/commands.d.ts +2 -0
  292. package/dist/xlsx/ui/locales/zh-CN/commands.d.ts.map +1 -0
  293. package/dist/xlsx/ui/locales/zh-CN/grid.d.ts +2 -0
  294. package/dist/xlsx/ui/locales/zh-CN/grid.d.ts.map +1 -0
  295. package/dist/xlsx/ui/locales/zh-CN/index.d.ts +2 -0
  296. package/dist/xlsx/ui/locales/zh-CN/index.d.ts.map +1 -0
  297. package/dist/xlsx/ui/locales/zh-CN/shell.d.ts +2 -0
  298. package/dist/xlsx/ui/locales/zh-CN/shell.d.ts.map +1 -0
  299. package/dist/xlsx/ui/localization.d.ts +23 -0
  300. package/dist/xlsx/ui/localization.d.ts.map +1 -0
  301. package/dist/xlsx/ui/ribbon/icon-paths.d.ts +9 -0
  302. package/dist/xlsx/ui/ribbon/icon-paths.d.ts.map +1 -0
  303. package/dist/xlsx/ui/ribbon/parts.d.ts +88 -0
  304. package/dist/xlsx/ui/ribbon/parts.d.ts.map +1 -0
  305. package/dist/xlsx/ui/ribbon/tab-api.d.ts +21 -0
  306. package/dist/xlsx/ui/ribbon/tab-api.d.ts.map +1 -0
  307. package/dist/xlsx/ui/ribbon/tabs/review-view.d.ts +5 -0
  308. package/dist/xlsx/ui/ribbon/tabs/review-view.d.ts.map +1 -0
  309. package/dist/xlsx/ui/ribbon/tabs/theme-palette.d.ts +8 -0
  310. package/dist/xlsx/ui/ribbon/tabs/theme-palette.d.ts.map +1 -0
  311. package/dist/xlsx/ui/ribbon/tell-me.d.ts +16 -0
  312. package/dist/xlsx/ui/ribbon/tell-me.d.ts.map +1 -0
  313. package/dist/xlsx/ui/selection.d.ts +34 -0
  314. package/dist/xlsx/ui/selection.d.ts.map +1 -0
  315. package/dist/xlsx/ui/theme/css-vars.d.ts +6 -0
  316. package/dist/xlsx/ui/theme/css-vars.d.ts.map +1 -0
  317. package/dist/xlsx/ui/theme/defaults.d.ts +6 -0
  318. package/dist/xlsx/ui/theme/defaults.d.ts.map +1 -0
  319. package/dist/xlsx/ui/theme/element.d.ts +9 -0
  320. package/dist/xlsx/ui/theme/element.d.ts.map +1 -0
  321. package/dist/xlsx/ui/theme/types.d.ts +54 -0
  322. package/dist/xlsx/ui/theme/types.d.ts.map +1 -0
  323. package/dist/xml/index.cjs +2 -1
  324. package/dist/xml/index.mjs +2 -1
  325. package/package.json +42 -4
  326. package/dist/pptx/chunks/index-BtBj3VG1.d.ts.map +0 -1
  327. package/dist/pptx/chunks/index-D0yGoLyw.d.ts.map +0 -1
  328. package/dist/pptx/chunks/text-operations-GuisjlbR.d.ts.map +0 -1
@@ -11869,10 +11869,11 @@ var init_units = __esm({
11869
11869
  });
11870
11870
 
11871
11871
  // src/units/constants.ts
11872
- var EMU_PER_PIXEL;
11872
+ var EMU_PER_PIXEL, EMU_PER_POINT;
11873
11873
  var init_constants = __esm({
11874
11874
  "src/units/constants.ts"() {
11875
11875
  EMU_PER_PIXEL = 9525;
11876
+ EMU_PER_POINT = 12700;
11876
11877
  }
11877
11878
  });
11878
11879
 
@@ -17636,7 +17637,7 @@ var init_smartart_layout_interpreter_choose_composite = __esm({
17636
17637
  });
17637
17638
 
17638
17639
  // src/pptx/core/utils/smartart-layout-interpreter-choose-algorithm.ts
17639
- function branchAlg(raw, nodeCount, context, allowedTypes = CHOOSE_ALG_TYPES) {
17640
+ function branchAlg(raw, nodeCount, context, allowedTypes2 = CHOOSE_ALG_TYPES) {
17640
17641
  if (!raw) {
17641
17642
  return void 0;
17642
17643
  }
@@ -17660,7 +17661,7 @@ function branchAlg(raw, nodeCount, context, allowedTypes = CHOOSE_ALG_TYPES) {
17660
17661
  if (name === "alg") {
17661
17662
  for (const candidate of Array.isArray(entry) ? entry : [entry]) {
17662
17663
  const type = candidate && typeof candidate === "object" ? String(candidate["@_type"] ?? "") : "";
17663
- if (allowedTypes.has(type)) {
17664
+ if (allowedTypes2.has(type)) {
17664
17665
  found = { type, raw: candidate };
17665
17666
  return;
17666
17667
  }
@@ -17741,7 +17742,7 @@ function chooseAlgorithm(node, nodeCount, context = {}) {
17741
17742
  }
17742
17743
  return void 0;
17743
17744
  }
17744
- function chooseAlgorithmOfType(node, nodeCount, allowedTypes, context = {}) {
17745
+ function chooseAlgorithmOfType(node, nodeCount, allowedTypes2, context = {}) {
17745
17746
  if (!node.choose || node.choose.length === 0) {
17746
17747
  return void 0;
17747
17748
  }
@@ -17750,7 +17751,7 @@ function chooseAlgorithmOfType(node, nodeCount, allowedTypes, context = {}) {
17750
17751
  activeBranch(choose, nodeCount, context),
17751
17752
  nodeCount,
17752
17753
  context,
17753
- allowedTypes
17754
+ allowedTypes2
17754
17755
  );
17755
17756
  if (found) {
17756
17757
  const parameters = parseBranchAlgParams(found.raw);
@@ -37384,9 +37385,30 @@ function applyChartAxisScaling(scalingNode, axis, getLocalName2) {
37384
37385
  if (axis.orientation !== void 0) {
37385
37386
  upsertChartAxisChild(scalingNode, "orientation", axis.orientation, getLocalName2);
37386
37387
  }
37388
+ orderScalingChildren(scalingNode, getLocalName2);
37387
37389
  }
37390
+ function orderScalingChildren(scalingNode, getLocalName2) {
37391
+ const rank = (key2) => {
37392
+ const index = SCALING_ORDER.indexOf(getLocalName2(key2));
37393
+ return index === -1 ? SCALING_ORDER.length : index;
37394
+ };
37395
+ const keys = Object.keys(scalingNode).filter((key2) => !key2.startsWith("@_"));
37396
+ const sorted = [...keys].sort((a, b) => rank(a) - rank(b));
37397
+ if (sorted.every((key2, i) => key2 === keys[i])) {
37398
+ return;
37399
+ }
37400
+ const entries = sorted.map((key2) => [key2, scalingNode[key2]]);
37401
+ for (const key2 of keys) {
37402
+ delete scalingNode[key2];
37403
+ }
37404
+ for (const [key2, value] of entries) {
37405
+ scalingNode[key2] = value;
37406
+ }
37407
+ }
37408
+ var SCALING_ORDER;
37388
37409
  var init_chart_axis_scaling = __esm({
37389
37410
  "src/pptx/core/utils/chart-axis-scaling.ts"() {
37411
+ SCALING_ORDER = ["logBase", "orientation", "max", "min"];
37390
37412
  }
37391
37413
  });
37392
37414
 
@@ -48489,6 +48511,600 @@ var init_chart_gradient_input = __esm({
48489
48511
  }
48490
48512
  });
48491
48513
 
48514
+ // src/pptx/core/utils/chart-container-content-model.ts
48515
+ function chartTypeToContainerLocalName(chartType) {
48516
+ return TYPE_TO_CONTAINER[chartType];
48517
+ }
48518
+ function isKnownChartContainer(containerLocal) {
48519
+ return containerLocal in CHART_CONTAINER_CHILD_ORDER;
48520
+ }
48521
+ function chartContainerAllows(containerLocal, childLocal) {
48522
+ const order = CHART_CONTAINER_CHILD_ORDER[containerLocal];
48523
+ return order !== void 0 && order.includes(childLocal);
48524
+ }
48525
+ var CHART_CONTAINER_CHILD_ORDER, REQUIRED_LEADING_CHILD, TYPE_TO_CONTAINER, AXIS_LOCAL_NAMES;
48526
+ var init_chart_container_content_model = __esm({
48527
+ "src/pptx/core/utils/chart-container-content-model.ts"() {
48528
+ CHART_CONTAINER_CHILD_ORDER = {
48529
+ areaChart: ["grouping", "varyColors", "ser", "dLbls", "dropLines", "axId", "extLst"],
48530
+ area3DChart: [
48531
+ "grouping",
48532
+ "varyColors",
48533
+ "ser",
48534
+ "dLbls",
48535
+ "dropLines",
48536
+ "gapDepth",
48537
+ "axId",
48538
+ "extLst"
48539
+ ],
48540
+ barChart: [
48541
+ "barDir",
48542
+ "grouping",
48543
+ "varyColors",
48544
+ "ser",
48545
+ "dLbls",
48546
+ "gapWidth",
48547
+ "overlap",
48548
+ "serLines",
48549
+ "axId",
48550
+ "extLst"
48551
+ ],
48552
+ bar3DChart: [
48553
+ "barDir",
48554
+ "grouping",
48555
+ "varyColors",
48556
+ "ser",
48557
+ "dLbls",
48558
+ "gapWidth",
48559
+ "gapDepth",
48560
+ "shape",
48561
+ "axId",
48562
+ "extLst"
48563
+ ],
48564
+ bubbleChart: [
48565
+ "varyColors",
48566
+ "ser",
48567
+ "dLbls",
48568
+ "bubble3D",
48569
+ "bubbleScale",
48570
+ "showNegBubbles",
48571
+ "sizeRepresents",
48572
+ "axId",
48573
+ "extLst"
48574
+ ],
48575
+ doughnutChart: ["varyColors", "ser", "dLbls", "firstSliceAng", "holeSize", "extLst"],
48576
+ lineChart: [
48577
+ "grouping",
48578
+ "varyColors",
48579
+ "ser",
48580
+ "dLbls",
48581
+ "dropLines",
48582
+ "hiLowLines",
48583
+ "upDownBars",
48584
+ "marker",
48585
+ "smooth",
48586
+ "axId",
48587
+ "extLst"
48588
+ ],
48589
+ line3DChart: [
48590
+ "grouping",
48591
+ "varyColors",
48592
+ "ser",
48593
+ "dLbls",
48594
+ "dropLines",
48595
+ "gapDepth",
48596
+ "axId",
48597
+ "extLst"
48598
+ ],
48599
+ ofPieChart: [
48600
+ "ofPieType",
48601
+ "varyColors",
48602
+ "ser",
48603
+ "dLbls",
48604
+ "gapWidth",
48605
+ "splitType",
48606
+ "splitPos",
48607
+ "custSplit",
48608
+ "secondPieSize",
48609
+ "serLines",
48610
+ "extLst"
48611
+ ],
48612
+ pieChart: ["varyColors", "ser", "dLbls", "firstSliceAng", "extLst"],
48613
+ pie3DChart: ["varyColors", "ser", "dLbls", "extLst"],
48614
+ radarChart: ["radarStyle", "varyColors", "ser", "dLbls", "axId", "extLst"],
48615
+ scatterChart: ["scatterStyle", "varyColors", "ser", "dLbls", "axId", "extLst"],
48616
+ stockChart: ["ser", "dLbls", "dropLines", "hiLowLines", "upDownBars", "axId", "extLst"],
48617
+ surfaceChart: ["wireframe", "ser", "bandFmts", "axId", "extLst"],
48618
+ surface3DChart: ["wireframe", "ser", "bandFmts", "axId", "extLst"]
48619
+ };
48620
+ REQUIRED_LEADING_CHILD = {
48621
+ barChart: { local: "barDir", val: "col" },
48622
+ bar3DChart: { local: "barDir", val: "col" },
48623
+ lineChart: { local: "grouping", val: "standard" },
48624
+ line3DChart: { local: "grouping", val: "standard" },
48625
+ ofPieChart: { local: "ofPieType", val: "pie" },
48626
+ radarChart: { local: "radarStyle", val: "marker" },
48627
+ scatterChart: { local: "scatterStyle", val: "lineMarker" }
48628
+ };
48629
+ TYPE_TO_CONTAINER = {
48630
+ area: "areaChart",
48631
+ area3D: "area3DChart",
48632
+ bar: "barChart",
48633
+ bar3D: "bar3DChart",
48634
+ bubble: "bubbleChart",
48635
+ doughnut: "doughnutChart",
48636
+ line: "lineChart",
48637
+ line3D: "line3DChart",
48638
+ ofPie: "ofPieChart",
48639
+ pie: "pieChart",
48640
+ pie3D: "pie3DChart",
48641
+ radar: "radarChart",
48642
+ scatter: "scatterChart",
48643
+ stock: "stockChart",
48644
+ surface: "surfaceChart"
48645
+ };
48646
+ AXIS_LOCAL_NAMES = ["catAx", "valAx", "dateAx", "serAx"];
48647
+ }
48648
+ });
48649
+
48650
+ // src/pptx/core/utils/chart-container-schema.ts
48651
+ function normalizeChartGroupingValue(containerLocal, value) {
48652
+ const isBar = containerLocal === "barChart" || containerLocal === "bar3DChart";
48653
+ return !isBar && value === "clustered" ? "standard" : value;
48654
+ }
48655
+ function normalizeGroupingNode(containerLocal, node) {
48656
+ const value = node["@_val"];
48657
+ if (value !== void 0) {
48658
+ node["@_val"] = normalizeChartGroupingValue(containerLocal, value);
48659
+ }
48660
+ }
48661
+ function normalizeChartContainerChildren(container2, containerLocal, getLocalName2) {
48662
+ if (!isKnownChartContainer(containerLocal)) {
48663
+ return;
48664
+ }
48665
+ for (const key2 of Object.keys(container2)) {
48666
+ if (key2.startsWith("@_") || key2 === "#text") {
48667
+ continue;
48668
+ }
48669
+ const local = getLocalName2(key2);
48670
+ if (!chartContainerAllows(containerLocal, local)) {
48671
+ delete container2[key2];
48672
+ continue;
48673
+ }
48674
+ if (local === "grouping") {
48675
+ const node = container2[key2];
48676
+ if (node && typeof node === "object" && !Array.isArray(node)) {
48677
+ normalizeGroupingNode(containerLocal, node);
48678
+ }
48679
+ }
48680
+ }
48681
+ const required = REQUIRED_LEADING_CHILD[containerLocal];
48682
+ if (required) {
48683
+ const present = Object.keys(container2).some((k) => getLocalName2(k) === required.local);
48684
+ if (!present) {
48685
+ container2[`c:${required.local}`] = { "@_val": required.val };
48686
+ }
48687
+ }
48688
+ }
48689
+ function orderChartContainerChildren(container2, containerLocal, getLocalName2) {
48690
+ const order = CHART_CONTAINER_CHILD_ORDER[containerLocal];
48691
+ if (!order) {
48692
+ return;
48693
+ }
48694
+ const keys = Object.keys(container2).filter((k) => !k.startsWith("@_") && k !== "#text");
48695
+ if (keys.some((k) => !order.includes(getLocalName2(k)))) {
48696
+ return;
48697
+ }
48698
+ const sorted = [...keys].sort(
48699
+ (a, b) => order.indexOf(getLocalName2(a)) - order.indexOf(getLocalName2(b))
48700
+ );
48701
+ if (sorted.every((k, i) => k === keys[i])) {
48702
+ return;
48703
+ }
48704
+ const saved = sorted.map((k) => [k, container2[k]]);
48705
+ for (const k of keys) {
48706
+ delete container2[k];
48707
+ }
48708
+ for (const [k, v] of saved) {
48709
+ container2[k] = v;
48710
+ }
48711
+ }
48712
+ function renameXmlKeyInPlace(obj, oldKey, newKey) {
48713
+ if (oldKey === newKey || !(oldKey in obj)) {
48714
+ return;
48715
+ }
48716
+ const entries = Object.keys(obj).map((k) => [k === oldKey ? newKey : k, obj[k]]);
48717
+ for (const k of Object.keys(obj)) {
48718
+ delete obj[k];
48719
+ }
48720
+ for (const [k, v] of entries) {
48721
+ obj[k] = v;
48722
+ }
48723
+ }
48724
+ function referencedAxisIds(plotArea, getLocalName2) {
48725
+ const ids = /* @__PURE__ */ new Set();
48726
+ for (const key2 of Object.keys(plotArea)) {
48727
+ if (!getLocalName2(key2).endsWith("Chart")) {
48728
+ continue;
48729
+ }
48730
+ for (const container2 of toArray2(plotArea[key2])) {
48731
+ for (const childKey3 of Object.keys(container2)) {
48732
+ if (getLocalName2(childKey3) !== "axId") {
48733
+ continue;
48734
+ }
48735
+ for (const axId of toArray2(container2[childKey3])) {
48736
+ const val = axId["@_val"];
48737
+ if (val !== void 0) {
48738
+ ids.add(String(val));
48739
+ }
48740
+ }
48741
+ }
48742
+ }
48743
+ }
48744
+ return ids;
48745
+ }
48746
+ function toArray2(value) {
48747
+ if (Array.isArray(value)) {
48748
+ return value.filter((v) => typeof v === "object" && v !== null);
48749
+ }
48750
+ return typeof value === "object" && value !== null ? [value] : [];
48751
+ }
48752
+ function reconcileChartPlotAreaAxes(plotArea, getLocalName2) {
48753
+ const referenced = referencedAxisIds(plotArea, getLocalName2);
48754
+ let removed = 0;
48755
+ for (const key2 of Object.keys(plotArea)) {
48756
+ const local = getLocalName2(key2);
48757
+ if (!AXIS_LOCAL_NAMES.includes(local)) {
48758
+ continue;
48759
+ }
48760
+ const axes = toArray2(plotArea[key2]);
48761
+ const kept = axes.filter((axis) => {
48762
+ const axIdKey = Object.keys(axis).find((k) => getLocalName2(k) === "axId");
48763
+ const val = axIdKey ? toArray2(axis[axIdKey])[0]?.["@_val"] : void 0;
48764
+ return val !== void 0 && referenced.has(String(val));
48765
+ });
48766
+ removed += axes.length - kept.length;
48767
+ if (kept.length === 0) {
48768
+ delete plotArea[key2];
48769
+ } else if (kept.length !== axes.length) {
48770
+ plotArea[key2] = kept.length === 1 ? kept[0] : kept;
48771
+ }
48772
+ }
48773
+ return removed;
48774
+ }
48775
+ var init_chart_container_schema = __esm({
48776
+ "src/pptx/core/utils/chart-container-schema.ts"() {
48777
+ init_chart_container_content_model();
48778
+ init_chart_container_content_model();
48779
+ }
48780
+ });
48781
+
48782
+ // src/pptx/core/utils/chart-group-options.ts
48783
+ function chartGroupOptionVal(spec, value) {
48784
+ return String(Math.min(spec.max, Math.max(spec.min, Math.round(value))));
48785
+ }
48786
+ function localNameOf9(key2) {
48787
+ return key2.replace(/^.*:/u, "");
48788
+ }
48789
+ function findKey13(obj, local, getLocalName2) {
48790
+ return Object.keys(obj).find((key2) => getLocalName2(key2) === local);
48791
+ }
48792
+ function modelValue(chartData, spec) {
48793
+ if (spec.element === "gapWidth" && chartData.chartType === "ofPie") {
48794
+ return chartData.ofPieOptions?.gapWidth ?? chartData.barGapWidth;
48795
+ }
48796
+ const value = chartData[spec.field];
48797
+ return typeof value === "number" && Number.isFinite(value) ? value : void 0;
48798
+ }
48799
+ function applyGeneratedChartGroupOptions(container2, containerLocal, chartData) {
48800
+ for (const spec of CHART_GROUP_OPTIONS) {
48801
+ if (!chartContainerAllows(containerLocal, spec.element)) {
48802
+ continue;
48803
+ }
48804
+ const value = modelValue(chartData, spec) ?? spec.generatedDefault;
48805
+ if (value !== void 0) {
48806
+ container2[`c:${spec.element}`] = { "@_val": chartGroupOptionVal(spec, value) };
48807
+ }
48808
+ }
48809
+ orderChartContainerChildren(container2, containerLocal, localNameOf9);
48810
+ }
48811
+ function authoredValue(node) {
48812
+ if (!node || typeof node !== "object") {
48813
+ return void 0;
48814
+ }
48815
+ const raw = node["@_val"];
48816
+ const num4 = raw === void 0 || raw === null || raw === "" ? NaN : Number.parseFloat(String(raw));
48817
+ return Number.isFinite(num4) ? num4 : void 0;
48818
+ }
48819
+ function applyChartGroupOptionsToXml(container2, containerLocal, chartData, getLocalName2) {
48820
+ let changed = false;
48821
+ for (const spec of CHART_GROUP_OPTIONS) {
48822
+ if (!chartContainerAllows(containerLocal, spec.element)) {
48823
+ continue;
48824
+ }
48825
+ if (spec.element === "gapWidth" && containerLocal === "ofPieChart") {
48826
+ continue;
48827
+ }
48828
+ const key2 = findKey13(container2, spec.element, getLocalName2);
48829
+ const authored = key2 ? authoredValue(container2[key2]) : void 0;
48830
+ const value = chartData[spec.field];
48831
+ if (value === void 0) {
48832
+ if (key2 && authored !== void 0) {
48833
+ delete container2[key2];
48834
+ changed = true;
48835
+ }
48836
+ continue;
48837
+ }
48838
+ if (authored === value) {
48839
+ continue;
48840
+ }
48841
+ container2[key2 ?? `c:${spec.element}`] = { "@_val": chartGroupOptionVal(spec, value) };
48842
+ changed = true;
48843
+ }
48844
+ return changed;
48845
+ }
48846
+ var CHART_GROUP_OPTIONS;
48847
+ var init_chart_group_options = __esm({
48848
+ "src/pptx/core/utils/chart-group-options.ts"() {
48849
+ init_chart_container_content_model();
48850
+ init_chart_container_schema();
48851
+ CHART_GROUP_OPTIONS = [
48852
+ {
48853
+ element: "gapWidth",
48854
+ field: "barGapWidth",
48855
+ schemaType: "ST_GapAmount",
48856
+ min: 0,
48857
+ max: 500,
48858
+ generatedDefault: 150
48859
+ },
48860
+ { element: "overlap", field: "barOverlap", schemaType: "ST_Overlap", min: -100, max: 100 },
48861
+ {
48862
+ element: "firstSliceAng",
48863
+ field: "firstSliceAngle",
48864
+ schemaType: "ST_FirstSliceAng",
48865
+ min: 0,
48866
+ max: 360
48867
+ },
48868
+ {
48869
+ element: "holeSize",
48870
+ field: "doughnutHoleSize",
48871
+ schemaType: "ST_HoleSize",
48872
+ min: 1,
48873
+ max: 90,
48874
+ generatedDefault: 50
48875
+ }
48876
+ ];
48877
+ }
48878
+ });
48879
+
48880
+ // src/pptx/core/builders/sdk/chart-layout-input.ts
48881
+ function allowedTypes(element) {
48882
+ return CLASSIC_TYPES.filter((type) => {
48883
+ const local = chartTypeToContainerLocalName(type);
48884
+ return local !== void 0 && chartContainerAllows(local, element);
48885
+ });
48886
+ }
48887
+ function drawnTypes(chartData) {
48888
+ if (chartData.chartType !== "combo") {
48889
+ return [chartData.chartType];
48890
+ }
48891
+ return chartData.series.map((s) => s.seriesChartType ?? chartData.chartType);
48892
+ }
48893
+ function validateValue(spec, name, value) {
48894
+ if (!Number.isInteger(value) || value < spec.min || value > spec.max) {
48895
+ throw new RangeError(
48896
+ `${name} must be an integer from ${spec.min} to ${spec.max} (${spec.schemaType}), got ${value}.`
48897
+ );
48898
+ }
48899
+ }
48900
+ function applyChartGroupOptionsInput(chartData, input) {
48901
+ for (const spec of CHART_GROUP_OPTIONS) {
48902
+ const name = INPUT_KEYS[spec.element];
48903
+ const value = input[name];
48904
+ if (value === void 0) {
48905
+ continue;
48906
+ }
48907
+ if (value === null) {
48908
+ delete chartData[spec.field];
48909
+ continue;
48910
+ }
48911
+ validateValue(spec, name, value);
48912
+ const types = drawnTypes(chartData);
48913
+ const allowed = allowedTypes(spec.element);
48914
+ if (!types.some((type) => allowed.includes(type))) {
48915
+ throw new Error(
48916
+ `${name} applies to ${allowed.join(", ")} charts; this chart is drawn as "${types.join('", "')}".`
48917
+ );
48918
+ }
48919
+ chartData[spec.field] = value;
48920
+ if (spec.element === "gapWidth" && chartData.ofPieOptions) {
48921
+ chartData.ofPieOptions.gapWidth = value;
48922
+ }
48923
+ }
48924
+ }
48925
+ function toPaint(value, name) {
48926
+ const trimmed = value.trim();
48927
+ if (trimmed === "none") {
48928
+ return "none";
48929
+ }
48930
+ if (!HEX_COLOR2.test(trimmed)) {
48931
+ throw new Error(`${name} must be a 6-digit hex colour or 'none', got "${value}".`);
48932
+ }
48933
+ return `#${trimmed.replace(/^#/u, "").toUpperCase()}`;
48934
+ }
48935
+ function applyChartAreaFormatInput(chartData, area, input) {
48936
+ const style = chartData.style ??= {};
48937
+ const fillKey = area === "chart" ? "chartAreaFill" : "plotAreaFill";
48938
+ const gradientKey = area === "chart" ? "chartAreaGradient" : "plotAreaGradient";
48939
+ const borderKey = area === "chart" ? "chartAreaBorder" : "plotAreaBorder";
48940
+ if (input === null) {
48941
+ delete style[fillKey];
48942
+ delete style[gradientKey];
48943
+ delete style[borderKey];
48944
+ if (area === "chart") {
48945
+ delete chartData.roundedCorners;
48946
+ }
48947
+ return;
48948
+ }
48949
+ if (input.roundedCorners !== void 0 && area !== "chart") {
48950
+ throw new Error("roundedCorners applies to the chart area only.");
48951
+ }
48952
+ if (input.fill !== void 0) {
48953
+ delete style[fillKey];
48954
+ delete style[gradientKey];
48955
+ if (typeof input.fill === "string") {
48956
+ style[fillKey] = toPaint(input.fill, "fill");
48957
+ } else if (input.fill !== null) {
48958
+ style[gradientKey] = toChartGradientFill(input.fill);
48959
+ }
48960
+ }
48961
+ if (input.border !== void 0) {
48962
+ if (input.border === null) {
48963
+ delete style[borderKey];
48964
+ } else {
48965
+ style[borderKey] = toPaint(input.border, "border");
48966
+ }
48967
+ }
48968
+ if (input.roundedCorners !== void 0) {
48969
+ if (input.roundedCorners === null) {
48970
+ delete chartData.roundedCorners;
48971
+ } else {
48972
+ chartData.roundedCorners = input.roundedCorners;
48973
+ }
48974
+ }
48975
+ }
48976
+ var INPUT_KEYS, CLASSIC_TYPES, HEX_COLOR2;
48977
+ var init_chart_layout_input = __esm({
48978
+ "src/pptx/core/builders/sdk/chart-layout-input.ts"() {
48979
+ init_chart_group_options();
48980
+ init_chart_container_content_model();
48981
+ init_chart_gradient_input();
48982
+ INPUT_KEYS = {
48983
+ gapWidth: "gapWidth",
48984
+ overlap: "overlap",
48985
+ firstSliceAng: "firstSliceAngle",
48986
+ holeSize: "holeSize"
48987
+ };
48988
+ CLASSIC_TYPES = [
48989
+ "bar",
48990
+ "bar3D",
48991
+ "line",
48992
+ "line3D",
48993
+ "pie",
48994
+ "pie3D",
48995
+ "ofPie",
48996
+ "doughnut",
48997
+ "area",
48998
+ "area3D",
48999
+ "scatter",
49000
+ "bubble",
49001
+ "radar",
49002
+ "stock",
49003
+ "surface"
49004
+ ];
49005
+ HEX_COLOR2 = /^#?[0-9a-f]{6}$/iu;
49006
+ }
49007
+ });
49008
+
49009
+ // src/pptx/core/builders/sdk/chart-operations.ts
49010
+ function ensureChartData(element) {
49011
+ if (!element.chartData) {
49012
+ throw new Error(
49013
+ "Chart element has no chartData. Cannot perform chart operations on an uninitialised chart."
49014
+ );
49015
+ }
49016
+ }
49017
+ function setChartAxis(element, axisType, edit) {
49018
+ ensureChartData(element);
49019
+ const axes = element.chartData.axes ??= [];
49020
+ let axis = axes.find((a) => a.axisType === axisType);
49021
+ if (!axis) {
49022
+ axis = { axisType };
49023
+ axes.push(axis);
49024
+ }
49025
+ if (edit.min !== void 0) {
49026
+ axis.min = edit.min ?? void 0;
49027
+ }
49028
+ if (edit.max !== void 0) {
49029
+ axis.max = edit.max ?? void 0;
49030
+ }
49031
+ if (edit.majorUnit !== void 0) {
49032
+ axis.majorUnit = edit.majorUnit ?? void 0;
49033
+ }
49034
+ if (edit.minorUnit !== void 0) {
49035
+ axis.minorUnit = edit.minorUnit ?? void 0;
49036
+ }
49037
+ if (edit.orientation !== void 0) {
49038
+ axis.orientation = edit.orientation ?? void 0;
49039
+ }
49040
+ if (edit.numberFormat !== void 0) {
49041
+ axis.numFmt = edit.numberFormat ? { formatCode: edit.numberFormat, sourceLinked: false } : void 0;
49042
+ }
49043
+ if (edit.tickLabelPosition !== void 0) {
49044
+ axis.tickLblPos = edit.tickLabelPosition;
49045
+ }
49046
+ if (edit.title !== void 0) {
49047
+ axis.titleText = edit.title ?? "";
49048
+ }
49049
+ if (edit.majorGridlines !== void 0) {
49050
+ axis.majorGridlines = edit.majorGridlines;
49051
+ }
49052
+ if (edit.minorGridlines !== void 0) {
49053
+ axis.minorGridlines = edit.minorGridlines;
49054
+ }
49055
+ if (edit.displayUnits !== void 0) {
49056
+ axis.displayUnits = edit.displayUnits ?? void 0;
49057
+ }
49058
+ if (edit.displayUnitsValue !== void 0) {
49059
+ axis.displayUnitsValue = edit.displayUnitsValue ?? void 0;
49060
+ }
49061
+ if (edit.displayUnitsLabel !== void 0) {
49062
+ axis.displayUnitsLabel = edit.displayUnitsLabel;
49063
+ }
49064
+ if (edit.visible !== void 0) {
49065
+ axis.deleted = !edit.visible;
49066
+ }
49067
+ }
49068
+ var init_chart_operations = __esm({
49069
+ "src/pptx/core/builders/sdk/chart-operations.ts"() {
49070
+ }
49071
+ });
49072
+
49073
+ // src/pptx/core/builders/sdk/chart-layout-operations.ts
49074
+ function setChartGroupOptions(element, options) {
49075
+ ensureChartData(element);
49076
+ applyChartGroupOptionsInput(element.chartData, options);
49077
+ }
49078
+ function setChartAreaFormat(element, area, format) {
49079
+ ensureChartData(element);
49080
+ applyChartAreaFormatInput(element.chartData, area, format);
49081
+ }
49082
+ function applyChartInputLayout(element, input) {
49083
+ setChartGroupOptions(element, {
49084
+ ...input.gapWidth !== void 0 ? { gapWidth: input.gapWidth } : {},
49085
+ ...input.overlap !== void 0 ? { overlap: input.overlap } : {},
49086
+ ...input.firstSliceAngle !== void 0 ? { firstSliceAngle: input.firstSliceAngle } : {},
49087
+ ...input.holeSize !== void 0 ? { holeSize: input.holeSize } : {}
49088
+ });
49089
+ if (input.chartArea) {
49090
+ setChartAreaFormat(element, "chart", input.chartArea);
49091
+ }
49092
+ if (input.plotArea) {
49093
+ setChartAreaFormat(element, "plot", input.plotArea);
49094
+ }
49095
+ for (const [axisType, edit] of Object.entries(input.axes ?? {})) {
49096
+ if (edit) {
49097
+ setChartAxis(element, axisType, edit);
49098
+ }
49099
+ }
49100
+ }
49101
+ var init_chart_layout_operations = __esm({
49102
+ "src/pptx/core/builders/sdk/chart-layout-operations.ts"() {
49103
+ init_chart_layout_input();
49104
+ init_chart_operations();
49105
+ }
49106
+ });
49107
+
48492
49108
  // src/pptx/core/builders/sdk/ElementFactory.ts
48493
49109
  function generateId(prefix) {
48494
49110
  idCounter += 1;
@@ -48832,12 +49448,14 @@ function createChartElement(chartType, input, options) {
48832
49448
  legendPosition: input.legendPosition
48833
49449
  }
48834
49450
  };
48835
- return {
49451
+ const element = {
48836
49452
  type: "chart",
48837
49453
  id: generateId("cht"),
48838
49454
  ...p,
48839
49455
  chartData
48840
49456
  };
49457
+ applyChartInputLayout(element, input);
49458
+ return element;
48841
49459
  }
48842
49460
  function createMediaElement(mediaType, source, options) {
48843
49461
  const p = pos("media", options);
@@ -48903,6 +49521,7 @@ var init_ElementFactory = __esm({
48903
49521
  init_table_style_defaults();
48904
49522
  init_custom_geometry();
48905
49523
  init_chart_gradient_input();
49524
+ init_chart_layout_operations();
48906
49525
  idCounter = 0;
48907
49526
  DEFAULTS = {
48908
49527
  text: { x: 100, y: 100, width: 600, height: 50 },
@@ -55423,9 +56042,7 @@ function applyCellBorderStyle(cellProperties, style, context) {
55423
56042
  }
55424
56043
  const widthEmu = parseInt(String(node["@_w"] || "0"), 10);
55425
56044
  if (widthEmu > 0) {
55426
- style[`${prefix}Width`] = Math.round(
55427
- widthEmu / context.emuPerPx
55428
- );
56045
+ style[`${prefix}Width`] = widthEmu / context.emuPerPx;
55429
56046
  hasStyle = true;
55430
56047
  }
55431
56048
  const color2 = context.parseColor(node["a:solidFill"]);
@@ -55455,7 +56072,7 @@ function applyCellBorderStyle(cellProperties, style, context) {
55455
56072
  hasStyle = true;
55456
56073
  }
55457
56074
  if (w > 0) {
55458
- style.borderDiagDownWidth = Math.round(w / context.emuPerPx);
56075
+ style.borderDiagDownWidth = w / context.emuPerPx;
55459
56076
  hasStyle = true;
55460
56077
  }
55461
56078
  }
@@ -55468,7 +56085,7 @@ function applyCellBorderStyle(cellProperties, style, context) {
55468
56085
  hasStyle = true;
55469
56086
  }
55470
56087
  if (w > 0) {
55471
- style.borderDiagUpWidth = Math.round(w / context.emuPerPx);
56088
+ style.borderDiagUpWidth = w / context.emuPerPx;
55472
56089
  hasStyle = true;
55473
56090
  }
55474
56091
  }
@@ -55486,7 +56103,7 @@ function applyCellMarginStyle(cellProperties, style, context) {
55486
56103
  return void 0;
55487
56104
  }
55488
56105
  const w = parseInt(String(node["@_w"]), 10);
55489
- return Number.isFinite(w) && w >= 0 ? Math.round(w / context.emuPerPx) : void 0;
56106
+ return Number.isFinite(w) && w >= 0 ? w / context.emuPerPx : void 0;
55490
56107
  };
55491
56108
  const ml = parseMargin(tcMar["a:marL"]);
55492
56109
  const mr = parseMargin(tcMar["a:marR"]);
@@ -55520,7 +56137,7 @@ function applyCellMarginStyle(cellProperties, style, context) {
55520
56137
  if (style[key2] === void 0 && raw !== void 0 && raw !== null) {
55521
56138
  const v = parseInt(String(raw), 10);
55522
56139
  if (Number.isFinite(v) && v >= 0) {
55523
- style[key2] = Math.round(v / context.emuPerPx);
56140
+ style[key2] = v / context.emuPerPx;
55524
56141
  hasStyle = true;
55525
56142
  }
55526
56143
  }
@@ -55816,6 +56433,10 @@ function applyRunProperties(run, runProperties2, context) {
55816
56433
  if (fontFamily) {
55817
56434
  run.fontFamily = fontFamily;
55818
56435
  }
56436
+ const baseline = parseInt(String(runProperties2["@_baseline"] ?? ""), 10);
56437
+ if (Number.isFinite(baseline) && baseline !== 0) {
56438
+ run.baseline = baseline;
56439
+ }
55819
56440
  }
55820
56441
  function extractTableCellTextRuns(tableCell, context) {
55821
56442
  const paragraphs = context.ensureArray(
@@ -84074,7 +84695,7 @@ function parseEmbeddedFontList(presentationData) {
84074
84695
  };
84075
84696
  }
84076
84697
  function applyAttribute(node, name, value) {
84077
- const key2 = findKey13(node, name);
84698
+ const key2 = findKey14(node, name);
84078
84699
  if (value === null) {
84079
84700
  if (key2) {
84080
84701
  delete node[key2];
@@ -84122,7 +84743,7 @@ function serializeEntry(entry) {
84122
84743
  }
84123
84744
  for (const name of ENTRY_ORDER) {
84124
84745
  const edit = edits.get(name);
84125
- const key2 = findKey13(source, name) ?? `p:${name}`;
84746
+ const key2 = findKey14(source, name) ?? `p:${name}`;
84126
84747
  if (edit !== null && edit !== void 0) {
84127
84748
  result[key2] = edit;
84128
84749
  } else if (!edits.has(name) && source[key2] !== void 0) {
@@ -84141,7 +84762,7 @@ function serializeEmbeddedFontList(list2) {
84141
84762
  throw new Error("CT_EmbeddedFontList requires at least one embeddedFont");
84142
84763
  }
84143
84764
  const source = { ...list2.rawXml ?? {} };
84144
- const key2 = findKey13(source, "embeddedFont") ?? "p:embeddedFont";
84765
+ const key2 = findKey14(source, "embeddedFont") ?? "p:embeddedFont";
84145
84766
  source[key2] = list2.fonts.map(serializeEntry);
84146
84767
  return source;
84147
84768
  }
@@ -84151,7 +84772,7 @@ function setEmbeddedFontList(presentationData, list2) {
84151
84772
  return;
84152
84773
  }
84153
84774
  const root = presentationData[rootKey];
84154
- const existingKey = findKey13(root, "embeddedFontLst");
84775
+ const existingKey = findKey14(root, "embeddedFontLst");
84155
84776
  const result = {};
84156
84777
  let inserted = false;
84157
84778
  for (const [key2, value] of Object.entries(root)) {
@@ -84170,7 +84791,7 @@ function setEmbeddedFontList(presentationData, list2) {
84170
84791
  }
84171
84792
  presentationData[rootKey] = result;
84172
84793
  }
84173
- var ENTRY_ORDER, PRESENTATION_BEFORE, localName16, findKey13, child16, children11;
84794
+ var ENTRY_ORDER, PRESENTATION_BEFORE, localName16, findKey14, child16, children11;
84174
84795
  var init_embedded_font_list = __esm({
84175
84796
  "src/pptx/core/utils/embedded-font-list.ts"() {
84176
84797
  ENTRY_ORDER = ["font", "regular", "bold", "italic", "boldItalic"];
@@ -84184,13 +84805,13 @@ var init_embedded_font_list = __esm({
84184
84805
  "smartTags"
84185
84806
  ]);
84186
84807
  localName16 = (key2) => key2.replace(/^@_/u, "").replace(/^.*:/u, "");
84187
- findKey13 = (node, name) => Object.keys(node).find((key2) => localName16(key2) === name);
84808
+ findKey14 = (node, name) => Object.keys(node).find((key2) => localName16(key2) === name);
84188
84809
  child16 = (node, name) => {
84189
- const key2 = findKey13(node, name);
84810
+ const key2 = findKey14(node, name);
84190
84811
  return key2 ? node[key2] : void 0;
84191
84812
  };
84192
84813
  children11 = (node, name) => {
84193
- const key2 = findKey13(node, name);
84814
+ const key2 = findKey14(node, name);
84194
84815
  const value = key2 ? node[key2] : void 0;
84195
84816
  return Array.isArray(value) ? value : value ? [value] : [];
84196
84817
  };
@@ -84705,7 +85326,7 @@ function parseChartBandFmts(seriesContainer, xmlLookup, colorParser) {
84705
85326
  return result.length > 0 ? result : void 0;
84706
85327
  }
84707
85328
  function setOrdered3(node, name, value, order, localName28) {
84708
- const key2 = findKey14(node, name, localName28);
85329
+ const key2 = findKey15(node, name, localName28);
84709
85330
  if (key2) {
84710
85331
  node[key2] = value;
84711
85332
  return;
@@ -84728,7 +85349,7 @@ function applyChartBandFmts(seriesContainer, bandFmts, localName28, resolveColor
84728
85349
  if (bandFmts === void 0) {
84729
85350
  return;
84730
85351
  }
84731
- const containerKey = findKey14(seriesContainer, "bandFmts", localName28);
85352
+ const containerKey = findKey15(seriesContainer, "bandFmts", localName28);
84732
85353
  if (bandFmts.length === 0) {
84733
85354
  if (containerKey) {
84734
85355
  delete seriesContainer[containerKey];
@@ -84736,11 +85357,11 @@ function applyChartBandFmts(seriesContainer, bandFmts, localName28, resolveColor
84736
85357
  return;
84737
85358
  }
84738
85359
  const bandFmtsNode = containerKey ? seriesContainer[containerKey] : void 0;
84739
- const bandFmtKey = bandFmtsNode ? findKey14(bandFmtsNode, "bandFmt", localName28) : void 0;
85360
+ const bandFmtKey = bandFmtsNode ? findKey15(bandFmtsNode, "bandFmt", localName28) : void 0;
84740
85361
  const existingRaw = bandFmtKey ? bandFmtsNode?.[bandFmtKey] : void 0;
84741
85362
  const existingNodes = existingRaw ? Array.isArray(existingRaw) ? existingRaw : [existingRaw] : [];
84742
85363
  const bandIndexOf = (node) => {
84743
- const idxKey = findKey14(node, "idx", localName28);
85364
+ const idxKey = findKey15(node, "idx", localName28);
84744
85365
  return idxKey ? safeUnsignedInt2(node[idxKey]?.["@_val"]) : void 0;
84745
85366
  };
84746
85367
  const byIndex = new Map(existingNodes.map((node) => [bandIndexOf(node), node]));
@@ -84752,7 +85373,7 @@ function applyChartBandFmts(seriesContainer, bandFmts, localName28, resolveColor
84752
85373
  updated.push(node);
84753
85374
  }
84754
85375
  if (band.spPr) {
84755
- const spPrKey = findKey14(node, "spPr", localName28);
85376
+ const spPrKey = findKey15(node, "spPr", localName28);
84756
85377
  const spPr = writeChartShapeProps(
84757
85378
  spPrKey ? node[spPrKey] : void 0,
84758
85379
  band.spPr,
@@ -84770,12 +85391,12 @@ function applyChartBandFmts(seriesContainer, bandFmts, localName28, resolveColor
84770
85391
  localName28
84771
85392
  );
84772
85393
  }
84773
- var findKey14;
85394
+ var findKey15;
84774
85395
  var init_chart_band_fmts = __esm({
84775
85396
  "src/pptx/core/utils/chart-band-fmts.ts"() {
84776
85397
  init_chart_series_detail_parser();
84777
85398
  init_chart_shape_props_writer();
84778
- findKey14 = (node, name, localName28) => Object.keys(node).find((key2) => localName28(key2) === name);
85399
+ findKey15 = (node, name, localName28) => Object.keys(node).find((key2) => localName28(key2) === name);
84779
85400
  }
84780
85401
  });
84781
85402
 
@@ -84825,142 +85446,6 @@ var init_chart_blank_values = __esm({
84825
85446
  }
84826
85447
  });
84827
85448
 
84828
- // src/pptx/core/utils/chart-container-content-model.ts
84829
- function chartTypeToContainerLocalName(chartType) {
84830
- return TYPE_TO_CONTAINER[chartType];
84831
- }
84832
- function isKnownChartContainer(containerLocal) {
84833
- return containerLocal in CHART_CONTAINER_CHILD_ORDER;
84834
- }
84835
- function chartContainerAllows(containerLocal, childLocal) {
84836
- const order = CHART_CONTAINER_CHILD_ORDER[containerLocal];
84837
- return order !== void 0 && order.includes(childLocal);
84838
- }
84839
- var CHART_CONTAINER_CHILD_ORDER, REQUIRED_LEADING_CHILD, TYPE_TO_CONTAINER, AXIS_LOCAL_NAMES;
84840
- var init_chart_container_content_model = __esm({
84841
- "src/pptx/core/utils/chart-container-content-model.ts"() {
84842
- CHART_CONTAINER_CHILD_ORDER = {
84843
- areaChart: ["grouping", "varyColors", "ser", "dLbls", "dropLines", "axId", "extLst"],
84844
- area3DChart: [
84845
- "grouping",
84846
- "varyColors",
84847
- "ser",
84848
- "dLbls",
84849
- "dropLines",
84850
- "gapDepth",
84851
- "axId",
84852
- "extLst"
84853
- ],
84854
- barChart: [
84855
- "barDir",
84856
- "grouping",
84857
- "varyColors",
84858
- "ser",
84859
- "dLbls",
84860
- "gapWidth",
84861
- "overlap",
84862
- "serLines",
84863
- "axId",
84864
- "extLst"
84865
- ],
84866
- bar3DChart: [
84867
- "barDir",
84868
- "grouping",
84869
- "varyColors",
84870
- "ser",
84871
- "dLbls",
84872
- "gapWidth",
84873
- "gapDepth",
84874
- "shape",
84875
- "axId",
84876
- "extLst"
84877
- ],
84878
- bubbleChart: [
84879
- "varyColors",
84880
- "ser",
84881
- "dLbls",
84882
- "bubble3D",
84883
- "bubbleScale",
84884
- "showNegBubbles",
84885
- "sizeRepresents",
84886
- "axId",
84887
- "extLst"
84888
- ],
84889
- doughnutChart: ["varyColors", "ser", "dLbls", "firstSliceAng", "holeSize", "extLst"],
84890
- lineChart: [
84891
- "grouping",
84892
- "varyColors",
84893
- "ser",
84894
- "dLbls",
84895
- "dropLines",
84896
- "hiLowLines",
84897
- "upDownBars",
84898
- "marker",
84899
- "smooth",
84900
- "axId",
84901
- "extLst"
84902
- ],
84903
- line3DChart: [
84904
- "grouping",
84905
- "varyColors",
84906
- "ser",
84907
- "dLbls",
84908
- "dropLines",
84909
- "gapDepth",
84910
- "axId",
84911
- "extLst"
84912
- ],
84913
- ofPieChart: [
84914
- "ofPieType",
84915
- "varyColors",
84916
- "ser",
84917
- "dLbls",
84918
- "gapWidth",
84919
- "splitType",
84920
- "splitPos",
84921
- "custSplit",
84922
- "secondPieSize",
84923
- "serLines",
84924
- "extLst"
84925
- ],
84926
- pieChart: ["varyColors", "ser", "dLbls", "firstSliceAng", "extLst"],
84927
- pie3DChart: ["varyColors", "ser", "dLbls", "extLst"],
84928
- radarChart: ["radarStyle", "varyColors", "ser", "dLbls", "axId", "extLst"],
84929
- scatterChart: ["scatterStyle", "varyColors", "ser", "dLbls", "axId", "extLst"],
84930
- stockChart: ["ser", "dLbls", "dropLines", "hiLowLines", "upDownBars", "axId", "extLst"],
84931
- surfaceChart: ["wireframe", "ser", "bandFmts", "axId", "extLst"],
84932
- surface3DChart: ["wireframe", "ser", "bandFmts", "axId", "extLst"]
84933
- };
84934
- REQUIRED_LEADING_CHILD = {
84935
- barChart: { local: "barDir", val: "col" },
84936
- bar3DChart: { local: "barDir", val: "col" },
84937
- lineChart: { local: "grouping", val: "standard" },
84938
- line3DChart: { local: "grouping", val: "standard" },
84939
- ofPieChart: { local: "ofPieType", val: "pie" },
84940
- radarChart: { local: "radarStyle", val: "marker" },
84941
- scatterChart: { local: "scatterStyle", val: "lineMarker" }
84942
- };
84943
- TYPE_TO_CONTAINER = {
84944
- area: "areaChart",
84945
- area3D: "area3DChart",
84946
- bar: "barChart",
84947
- bar3D: "bar3DChart",
84948
- bubble: "bubbleChart",
84949
- doughnut: "doughnutChart",
84950
- line: "lineChart",
84951
- line3D: "line3DChart",
84952
- ofPie: "ofPieChart",
84953
- pie: "pieChart",
84954
- pie3D: "pie3DChart",
84955
- radar: "radarChart",
84956
- scatter: "scatterChart",
84957
- stock: "stockChart",
84958
- surface: "surfaceChart"
84959
- };
84960
- AXIS_LOCAL_NAMES = ["catAx", "valAx", "dateAx", "serAx"];
84961
- }
84962
- });
84963
-
84964
85449
  // src/pptx/core/utils/chart-container-type-map.ts
84965
85450
  function chartContainerLocalNameToType(localName28) {
84966
85451
  return CONTAINER_LOCAL_NAME_TO_TYPE[localName28];
@@ -85020,7 +85505,7 @@ var init_chart_date_categories = __esm({
85020
85505
  });
85021
85506
 
85022
85507
  // src/pptx/core/utils/chart-filtered-series.ts
85023
- function localNameOf9(key2) {
85508
+ function localNameOf10(key2) {
85024
85509
  return key2.replace(/^.*:/u, "");
85025
85510
  }
85026
85511
  function scalarChild(parent, name, xmlLookup) {
@@ -85100,7 +85585,7 @@ function parseOneFilteredSeries(node, xmlLookup) {
85100
85585
  if (values.length > 0) {
85101
85586
  result.values = values;
85102
85587
  }
85103
- const uniqueId = parseChartUniqueId(node, localNameOf9);
85588
+ const uniqueId = parseChartUniqueId(node, localNameOf10);
85104
85589
  if (uniqueId) {
85105
85590
  result.uniqueId = uniqueId;
85106
85591
  }
@@ -85118,7 +85603,7 @@ function parseFilteredSeries(container2, xmlLookup) {
85118
85603
  if (!ext) {
85119
85604
  return void 0;
85120
85605
  }
85121
- const wrapperKey = Object.keys(ext).find((key2) => /^filtered.*series$/iu.test(localNameOf9(key2)));
85606
+ const wrapperKey = Object.keys(ext).find((key2) => /^filtered.*series$/iu.test(localNameOf10(key2)));
85122
85607
  if (!wrapperKey) {
85123
85608
  return void 0;
85124
85609
  }
@@ -89006,7 +89491,7 @@ function parsePrintProperties(node) {
89006
89491
  };
89007
89492
  }
89008
89493
  function applyAttribute2(node, name, value) {
89009
- const existingKey = findKey15(node, name);
89494
+ const existingKey = findKey16(node, name);
89010
89495
  if (value === null) {
89011
89496
  if (existingKey) {
89012
89497
  delete node[existingKey];
@@ -89041,14 +89526,14 @@ function serializePrintProperties(properties) {
89041
89526
  result[key2] = value;
89042
89527
  }
89043
89528
  }
89044
- const extKey = findKey15(source, "extLst");
89529
+ const extKey = findKey16(source, "extLst");
89045
89530
  if (extKey) {
89046
89531
  result[extKey] = source[extKey];
89047
89532
  }
89048
89533
  return result;
89049
89534
  }
89050
89535
  function findChildByLocalName2(parent, name) {
89051
- const key2 = findKey15(parent, name);
89536
+ const key2 = findKey16(parent, name);
89052
89537
  return key2 ? parent[key2] : void 0;
89053
89538
  }
89054
89539
  function setPresentationPropertiesChild(root, name, value) {
@@ -89087,7 +89572,7 @@ function slidesPerPageToPrintOutput(value) {
89087
89572
  }
89088
89573
  return `handouts${value}`;
89089
89574
  }
89090
- var PRINT_OUTPUTS, COLOR_MODES, ROOT_ORDER, localName20, findKey15;
89575
+ var PRINT_OUTPUTS, COLOR_MODES, ROOT_ORDER, localName20, findKey16;
89091
89576
  var init_pptx_print_properties = __esm({
89092
89577
  "src/pptx/core/core/runtime/pptx-print-properties.ts"() {
89093
89578
  PRINT_OUTPUTS = /* @__PURE__ */ new Set([
@@ -89104,7 +89589,7 @@ var init_pptx_print_properties = __esm({
89104
89589
  COLOR_MODES = /* @__PURE__ */ new Set(["bw", "gray", "clr"]);
89105
89590
  ROOT_ORDER = ["htmlPubPr", "webPr", "prnPr", "showPr", "clrMru", "extLst"];
89106
89591
  localName20 = (key2) => key2.replace(/^@_/u, "").replace(/^.*:/u, "");
89107
- findKey15 = (node, name) => Object.keys(node).find((key2) => localName20(key2) === name);
89592
+ findKey16 = (node, name) => Object.keys(node).find((key2) => localName20(key2) === name);
89108
89593
  }
89109
89594
  });
89110
89595
 
@@ -94595,7 +95080,7 @@ var init_chart_cx_generator = __esm({
94595
95080
  });
94596
95081
 
94597
95082
  // src/pptx/core/utils/chart-data-labels-serializer.ts
94598
- function findKey16(obj, local, getLocalName2) {
95083
+ function findKey17(obj, local, getLocalName2) {
94599
95084
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
94600
95085
  }
94601
95086
  function boolVal(on) {
@@ -94669,7 +95154,7 @@ function applyChartDataLabelsToXml(plotArea, style, getLocalName2) {
94669
95154
  if (!container2 || typeof container2 !== "object") {
94670
95155
  continue;
94671
95156
  }
94672
- const existingKey = findKey16(container2, "dLbls", getLocalName2);
95157
+ const existingKey = findKey17(container2, "dLbls", getLocalName2);
94673
95158
  if (style.hasDataLabels === false) {
94674
95159
  const existing2 = existingKey ? container2[existingKey] : void 0;
94675
95160
  const off = ordered3(existing2, { "c:delete": { "@_val": "1" } }, getLocalName2);
@@ -94747,11 +95232,11 @@ var init_chart_data_labels_serializer = __esm({
94747
95232
  });
94748
95233
 
94749
95234
  // src/pptx/core/utils/chart-data-table.ts
94750
- function findKey17(node, name, localName28) {
95235
+ function findKey18(node, name, localName28) {
94751
95236
  return Object.keys(node).find((key2) => localName28(key2) === name);
94752
95237
  }
94753
95238
  function setOrdered4(node, name, value, order, localName28) {
94754
- const existingKey = findKey17(node, name, localName28);
95239
+ const existingKey = findKey18(node, name, localName28);
94755
95240
  if (existingKey) {
94756
95241
  node[existingKey] = value;
94757
95242
  return;
@@ -94774,7 +95259,7 @@ function applyChartDataTable(plotArea, dataTable, localName28, resolveColor2) {
94774
95259
  if (dataTable === void 0) {
94775
95260
  return;
94776
95261
  }
94777
- const tableKey = findKey17(plotArea, "dTable", localName28);
95262
+ const tableKey = findKey18(plotArea, "dTable", localName28);
94778
95263
  if (dataTable === null) {
94779
95264
  if (tableKey) {
94780
95265
  delete plotArea[tableKey];
@@ -94791,7 +95276,7 @@ function applyChartDataTable(plotArea, dataTable, localName28, resolveColor2) {
94791
95276
  }
94792
95277
  }
94793
95278
  if (dataTable.spPr) {
94794
- const spPrKey = findKey17(table, "spPr", localName28);
95279
+ const spPrKey = findKey18(table, "spPr", localName28);
94795
95280
  const spPr = writeChartShapeProps(
94796
95281
  spPrKey ? table[spPrKey] : void 0,
94797
95282
  dataTable.spPr,
@@ -94801,13 +95286,13 @@ function applyChartDataTable(plotArea, dataTable, localName28, resolveColor2) {
94801
95286
  setOrdered4(table, "spPr", spPr, TABLE_ORDER, localName28);
94802
95287
  }
94803
95288
  if (dataTable.txPr) {
94804
- const txPrKey = findKey17(table, "txPr", localName28);
95289
+ const txPrKey = findKey18(table, "txPr", localName28);
94805
95290
  const authoredDefRPr = resolveTxPrDefRPr(txPrKey ? table[txPrKey] : void 0, {
94806
95291
  getChildByLocalName: (parent, name) => {
94807
95292
  if (!parent) {
94808
95293
  return void 0;
94809
95294
  }
94810
- const key2 = findKey17(parent, name, localName28);
95295
+ const key2 = findKey18(parent, name, localName28);
94811
95296
  return key2 ? parent[key2] : void 0;
94812
95297
  }
94813
95298
  });
@@ -94867,7 +95352,7 @@ var init_chart_data_table = __esm({
94867
95352
  });
94868
95353
 
94869
95354
  // src/pptx/core/utils/chart-errbars-serializer.ts
94870
- function findKey18(obj, local, getLocalName2) {
95355
+ function findKey19(obj, local, getLocalName2) {
94871
95356
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
94872
95357
  }
94873
95358
  function ensureArray13(v) {
@@ -94910,7 +95395,7 @@ function buildErrBars(existing, e, getLocalName2, resolveColor2) {
94910
95395
  if (e.noEndCap !== void 0) {
94911
95396
  node["c:noEndCap"] = { "@_val": e.noEndCap ? "1" : "0" };
94912
95397
  } else if (existing) {
94913
- const noEndCapKey = findKey18(existing, "noEndCap", getLocalName2);
95398
+ const noEndCapKey = findKey19(existing, "noEndCap", getLocalName2);
94914
95399
  if (noEndCapKey) {
94915
95400
  node["c:noEndCap"] = existing[noEndCapKey];
94916
95401
  }
@@ -94925,7 +95410,7 @@ function buildErrBars(existing, e, getLocalName2, resolveColor2) {
94925
95410
  } else if (e.val !== void 0) {
94926
95411
  node["c:val"] = { "@_val": String(e.val) };
94927
95412
  }
94928
- const spPrKey = existing ? findKey18(existing, "spPr", getLocalName2) : void 0;
95413
+ const spPrKey = existing ? findKey19(existing, "spPr", getLocalName2) : void 0;
94929
95414
  const existingSpPr = spPrKey ? existing?.[spPrKey] : void 0;
94930
95415
  if (e.color || e.width !== void 0 || e.dashStyle) {
94931
95416
  node["c:spPr"] = buildSpPr(existingSpPr, e, getLocalName2, resolveColor2);
@@ -94933,7 +95418,7 @@ function buildErrBars(existing, e, getLocalName2, resolveColor2) {
94933
95418
  node["c:spPr"] = existingSpPr;
94934
95419
  }
94935
95420
  if (existing) {
94936
- const extKey = findKey18(existing, "extLst", getLocalName2);
95421
+ const extKey = findKey19(existing, "extLst", getLocalName2);
94937
95422
  if (extKey) {
94938
95423
  node["c:extLst"] = existing[extKey];
94939
95424
  }
@@ -94941,7 +95426,7 @@ function buildErrBars(existing, e, getLocalName2, resolveColor2) {
94941
95426
  return node;
94942
95427
  }
94943
95428
  function applySeriesErrBarsToXml(seriesNode, errBars, getLocalName2, resolveColor2) {
94944
- const existingKey = findKey18(seriesNode, "errBars", getLocalName2);
95429
+ const existingKey = findKey19(seriesNode, "errBars", getLocalName2);
94945
95430
  const existingNodes = existingKey ? ensureArray13(seriesNode[existingKey]) : [];
94946
95431
  const built = errBars.map(
94947
95432
  (e, i) => buildErrBars(existingNodes[i], e, getLocalName2, resolveColor2)
@@ -94975,7 +95460,7 @@ var init_chart_errbars_serializer = __esm({
94975
95460
  });
94976
95461
 
94977
95462
  // src/pptx/core/utils/chart-series-datalabel-build.ts
94978
- function findKey19(obj, local, getLocalName2) {
95463
+ function findKey20(obj, local, getLocalName2) {
94979
95464
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
94980
95465
  }
94981
95466
  function boolVal2(on) {
@@ -95024,7 +95509,7 @@ function buildDLbl(existing, label, getLocalName2, resolveColor2) {
95024
95509
  node["c:delete"] = { "@_val": "0" };
95025
95510
  }
95026
95511
  if (existing && label.layout === void 0) {
95027
- const layoutKey = findKey19(existing, "layout", getLocalName2);
95512
+ const layoutKey = findKey20(existing, "layout", getLocalName2);
95028
95513
  if (layoutKey) {
95029
95514
  node[layoutKey] = existing[layoutKey];
95030
95515
  }
@@ -95043,7 +95528,7 @@ function buildDLbl(existing, label, getLocalName2, resolveColor2) {
95043
95528
  }
95044
95529
  };
95045
95530
  } else if (existing) {
95046
- const txKey = findKey19(existing, "tx", getLocalName2);
95531
+ const txKey = findKey20(existing, "tx", getLocalName2);
95047
95532
  if (txKey) {
95048
95533
  node[txKey] = existing[txKey];
95049
95534
  }
@@ -95059,7 +95544,7 @@ function buildDLbl(existing, label, getLocalName2, resolveColor2) {
95059
95544
  if (local === "txPr" && label.txPr !== void 0) {
95060
95545
  continue;
95061
95546
  }
95062
- const k = findKey19(existing, local, getLocalName2);
95547
+ const k = findKey20(existing, local, getLocalName2);
95063
95548
  if (k) {
95064
95549
  node[k] = existing[k];
95065
95550
  }
@@ -95071,15 +95556,15 @@ function buildDLbl(existing, label, getLocalName2, resolveColor2) {
95071
95556
  }
95072
95557
  if (label.spPr !== void 0) {
95073
95558
  replaced.add("spPr");
95074
- const existingSpPr = existing ? existing[findKey19(existing, "spPr", getLocalName2) ?? ""] : void 0;
95559
+ const existingSpPr = existing ? existing[findKey20(existing, "spPr", getLocalName2) ?? ""] : void 0;
95075
95560
  node["c:spPr"] = writeChartShapeProps(existingSpPr, label.spPr, getLocalName2, resolveColor2);
95076
95561
  }
95077
95562
  if (label.txPr !== void 0) {
95078
95563
  replaced.add("txPr");
95079
- const existingTxPr = existing ? existing[findKey19(existing, "txPr", getLocalName2) ?? ""] : void 0;
95080
- const paragraph = existingTxPr ? existingTxPr[findKey19(existingTxPr, "p", getLocalName2) ?? ""] : void 0;
95081
- const pPr = paragraph ? paragraph[findKey19(paragraph, "pPr", getLocalName2) ?? ""] : void 0;
95082
- const authoredDefRPr = pPr ? pPr[findKey19(pPr, "defRPr", getLocalName2) ?? ""] : void 0;
95564
+ const existingTxPr = existing ? existing[findKey20(existing, "txPr", getLocalName2) ?? ""] : void 0;
95565
+ const paragraph = existingTxPr ? existingTxPr[findKey20(existingTxPr, "p", getLocalName2) ?? ""] : void 0;
95566
+ const pPr = paragraph ? paragraph[findKey20(paragraph, "pPr", getLocalName2) ?? ""] : void 0;
95567
+ const authoredDefRPr = pPr ? pPr[findKey20(pPr, "defRPr", getLocalName2) ?? ""] : void 0;
95083
95568
  const txPr = buildDefRPrTextProperties(label.txPr, authoredDefRPr, resolveColor2);
95084
95569
  if (txPr) {
95085
95570
  node["c:txPr"] = txPr;
@@ -95149,17 +95634,17 @@ var init_chart_series_datalabel_build = __esm({
95149
95634
 
95150
95635
  // src/pptx/core/utils/chart-series-datalabel-serializer.ts
95151
95636
  function applySeriesDataLabelsToXml(seriesNode, dataLabels, getLocalName2, resolveColor2) {
95152
- const dLblsKey = findKey19(seriesNode, "dLbls", getLocalName2);
95637
+ const dLblsKey = findKey20(seriesNode, "dLbls", getLocalName2);
95153
95638
  const labels = dataLabels ?? [];
95154
95639
  const existingByIdx = /* @__PURE__ */ new Map();
95155
95640
  let groupChildren = [];
95156
95641
  if (dLblsKey) {
95157
95642
  const dLbls = seriesNode[dLblsKey];
95158
- const dLblKey = findKey19(dLbls, "dLbl", getLocalName2);
95643
+ const dLblKey = findKey20(dLbls, "dLbl", getLocalName2);
95159
95644
  if (dLblKey) {
95160
95645
  const nodes = Array.isArray(dLbls[dLblKey]) ? dLbls[dLblKey] : [dLbls[dLblKey]];
95161
95646
  for (const node of nodes) {
95162
- const idxKey = findKey19(node, "idx", getLocalName2);
95647
+ const idxKey = findKey20(node, "idx", getLocalName2);
95163
95648
  const idxNode = idxKey ? node[idxKey] : void 0;
95164
95649
  const idx = idxNode ? Number.parseInt(String(idxNode["@_val"]), 10) : NaN;
95165
95650
  if (Number.isFinite(idx)) {
@@ -95248,7 +95733,7 @@ var init_chart_space_metadata = __esm({
95248
95733
  });
95249
95734
 
95250
95735
  // src/pptx/core/utils/chart-trendline-serializer.ts
95251
- function findKey20(obj, local, getLocalName2) {
95736
+ function findKey21(obj, local, getLocalName2) {
95252
95737
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
95253
95738
  }
95254
95739
  function ensureArray14(v) {
@@ -95287,14 +95772,14 @@ function buildSpPr2(existing, t, getLocalName2, resolveColor2) {
95287
95772
  function buildTrendline(existing, t, getLocalName2, resolveColor2) {
95288
95773
  validateTrendline(t);
95289
95774
  const node = {};
95290
- const existingNameKey = existing ? findKey20(existing, "name", getLocalName2) : void 0;
95775
+ const existingNameKey = existing ? findKey21(existing, "name", getLocalName2) : void 0;
95291
95776
  if (t.name !== void 0) {
95292
95777
  node["c:name"] = t.name;
95293
95778
  } else if (existing && existingNameKey) {
95294
95779
  node["c:name"] = existing[existingNameKey];
95295
95780
  }
95296
95781
  const spPr = buildSpPr2(
95297
- existing ? existing[findKey20(existing, "spPr", getLocalName2) ?? ""] : void 0,
95782
+ existing ? existing[findKey21(existing, "spPr", getLocalName2) ?? ""] : void 0,
95298
95783
  t,
95299
95784
  getLocalName2,
95300
95785
  resolveColor2
@@ -95324,7 +95809,7 @@ function buildTrendline(existing, t, getLocalName2, resolveColor2) {
95324
95809
  if (t.displayEq !== void 0) {
95325
95810
  node["c:dispEq"] = { "@_val": t.displayEq ? "1" : "0" };
95326
95811
  }
95327
- const lblKey = existing ? findKey20(existing, "trendlineLbl", getLocalName2) : void 0;
95812
+ const lblKey = existing ? findKey21(existing, "trendlineLbl", getLocalName2) : void 0;
95328
95813
  if (t.label) {
95329
95814
  node["c:trendlineLbl"] = buildTrendlineLabel(
95330
95815
  lblKey ? existing?.[lblKey] : void 0,
@@ -95335,7 +95820,7 @@ function buildTrendline(existing, t, getLocalName2, resolveColor2) {
95335
95820
  node["c:trendlineLbl"] = existing[lblKey];
95336
95821
  }
95337
95822
  if (existing) {
95338
- const extKey = findKey20(existing, "extLst", getLocalName2);
95823
+ const extKey = findKey21(existing, "extLst", getLocalName2);
95339
95824
  if (extKey) {
95340
95825
  node["c:extLst"] = existing[extKey];
95341
95826
  }
@@ -95343,7 +95828,7 @@ function buildTrendline(existing, t, getLocalName2, resolveColor2) {
95343
95828
  return node;
95344
95829
  }
95345
95830
  function applySeriesTrendlinesToXml(seriesNode, trendlines, getLocalName2, resolveColor2) {
95346
- const existingKey = findKey20(seriesNode, "trendline", getLocalName2);
95831
+ const existingKey = findKey21(seriesNode, "trendline", getLocalName2);
95347
95832
  const existingNodes = existingKey ? ensureArray14(seriesNode[existingKey]) : [];
95348
95833
  const built = trendlines.map(
95349
95834
  (t, i) => buildTrendline(existingNodes[i], t, getLocalName2, resolveColor2)
@@ -95386,11 +95871,292 @@ var init_chart_trendline_serializer = __esm({
95386
95871
  }
95387
95872
  });
95388
95873
 
95874
+ // src/pptx/core/utils/chart-area-format.ts
95875
+ function findKey22(obj, local, getLocalName2) {
95876
+ return Object.keys(obj).find((key2) => getLocalName2(key2) === local);
95877
+ }
95878
+ function asObject(value) {
95879
+ return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
95880
+ }
95881
+ function parsePaint(node, getLocalName2, resolveColor2) {
95882
+ if (!node) {
95883
+ return void 0;
95884
+ }
95885
+ if (findKey22(node, "noFill", getLocalName2) !== void 0) {
95886
+ return "none";
95887
+ }
95888
+ const solid = asObject(node[findKey22(node, "solidFill", getLocalName2) ?? ""]);
95889
+ return solid ? resolveColor2(solid) : void 0;
95890
+ }
95891
+ function parseChartAreaFormat(owner, getLocalName2, resolveColor2, parseGradient) {
95892
+ const spPr = owner ? asObject(owner[findKey22(owner, "spPr", getLocalName2) ?? ""]) : void 0;
95893
+ if (!spPr) {
95894
+ return {};
95895
+ }
95896
+ const format = {};
95897
+ const fill = parsePaint(spPr, getLocalName2, resolveColor2);
95898
+ if (fill !== void 0) {
95899
+ format.fill = fill;
95900
+ }
95901
+ const gradient = parseGradient?.(spPr);
95902
+ if (gradient) {
95903
+ format.gradient = gradient;
95904
+ }
95905
+ const ln = asObject(spPr[findKey22(spPr, "ln", getLocalName2) ?? ""]);
95906
+ const border = parsePaint(ln, getLocalName2, resolveColor2);
95907
+ if (border !== void 0) {
95908
+ format.border = border;
95909
+ }
95910
+ return format;
95911
+ }
95912
+ function paintXml(paint) {
95913
+ return paint === "none" ? { "a:noFill": {} } : { "a:solidFill": { "a:srgbClr": { "@_val": chartColorHex(paint) } } };
95914
+ }
95915
+ function buildChartAreaSpPr(format) {
95916
+ const spPr = {};
95917
+ if (format.gradient) {
95918
+ spPr["a:gradFill"] = buildChartGradFillXml(format.gradient);
95919
+ } else if (format.fill !== void 0) {
95920
+ Object.assign(spPr, paintXml(format.fill));
95921
+ }
95922
+ if (format.border !== void 0) {
95923
+ spPr["a:ln"] = paintXml(format.border);
95924
+ }
95925
+ return Object.keys(spPr).length > 0 ? spPr : void 0;
95926
+ }
95927
+ function samePaint(a, b) {
95928
+ if (a === void 0 || b === void 0 || a === "none" || b === "none") {
95929
+ return a === b;
95930
+ }
95931
+ return colorsEqual(a, b);
95932
+ }
95933
+ function sameFill(model, authored) {
95934
+ if (model.gradient || authored.gradient) {
95935
+ return Boolean(
95936
+ model.gradient && authored.gradient && chartGradientsEqual(model.gradient, authored.gradient)
95937
+ );
95938
+ }
95939
+ return samePaint(model.fill, authored.fill);
95940
+ }
95941
+ function setPaint(node, entry, choices, after, getLocalName2) {
95942
+ const entries = Object.entries(node).filter(([key2]) => !choices.has(getLocalName2(key2)));
95943
+ if (entry) {
95944
+ const at2 = entries.findIndex(([key2]) => after.has(getLocalName2(key2)));
95945
+ entries.splice(at2 === -1 ? entries.length : at2, 0, entry);
95946
+ }
95947
+ for (const key2 of Object.keys(node)) {
95948
+ delete node[key2];
95949
+ }
95950
+ for (const [key2, value] of entries) {
95951
+ node[key2] = value;
95952
+ }
95953
+ }
95954
+ function paintEntry(paint, authored, getLocalName2, resolveColor2) {
95955
+ if (paint === void 0) {
95956
+ return void 0;
95957
+ }
95958
+ if (paint === "none") {
95959
+ return ["a:noFill", {}];
95960
+ }
95961
+ const solid = asObject(authored[findKey22(authored, "solidFill", getLocalName2) ?? ""]);
95962
+ return ["a:solidFill", chartColorChoiceValue(solid, paint, resolveColor2)];
95963
+ }
95964
+ function applyChartAreaFormatToXml(owner, format, getLocalName2, options) {
95965
+ const authored = parseChartAreaFormat(
95966
+ owner,
95967
+ getLocalName2,
95968
+ options.resolveColor,
95969
+ options.parseGradient
95970
+ );
95971
+ const fillChanged = !sameFill(format, authored);
95972
+ const borderChanged = !samePaint(format.border, authored.border);
95973
+ if (!fillChanged && !borderChanged) {
95974
+ return false;
95975
+ }
95976
+ let spPr = asObject(owner[findKey22(owner, "spPr", getLocalName2) ?? ""]);
95977
+ if (!spPr) {
95978
+ spPr = {};
95979
+ options.insertSpPr(owner, spPr);
95980
+ }
95981
+ if (fillChanged) {
95982
+ if (format.gradient) {
95983
+ applyChartGradientToSpPr(spPr, format.gradient, getLocalName2, options);
95984
+ } else {
95985
+ const entry = paintEntry(format.fill, spPr, getLocalName2, options.resolveColor);
95986
+ setPaint(spPr, entry, FILL_CHOICE2, /* @__PURE__ */ new Set(["ln", ...AFTER_LN]), getLocalName2);
95987
+ }
95988
+ }
95989
+ if (borderChanged) {
95990
+ const lnKey = findKey22(spPr, "ln", getLocalName2);
95991
+ const ln = asObject(lnKey ? spPr[lnKey] : void 0) ?? {};
95992
+ const entry = paintEntry(format.border, ln, getLocalName2, options.resolveColor);
95993
+ setPaint(
95994
+ ln,
95995
+ entry,
95996
+ LN_FILL_CHOICE,
95997
+ /* @__PURE__ */ new Set(["prstDash", "custDash", "round", "bevel", "miter", "headEnd", "tailEnd", "extLst"]),
95998
+ getLocalName2
95999
+ );
96000
+ if (Object.keys(ln).length === 0) {
96001
+ if (lnKey) {
96002
+ delete spPr[lnKey];
96003
+ }
96004
+ } else if (!lnKey) {
96005
+ setPaint(spPr, ["a:ln", ln], /* @__PURE__ */ new Set(), AFTER_LN, getLocalName2);
96006
+ }
96007
+ }
96008
+ if (Object.keys(spPr).length === 0) {
96009
+ const spPrKey = findKey22(owner, "spPr", getLocalName2);
96010
+ if (spPrKey) {
96011
+ delete owner[spPrKey];
96012
+ }
96013
+ }
96014
+ return true;
96015
+ }
96016
+ var FILL_CHOICE2, AFTER_LN, LN_FILL_CHOICE;
96017
+ var init_chart_area_format = __esm({
96018
+ "src/pptx/core/utils/chart-area-format.ts"() {
96019
+ init_chart_color_choice();
96020
+ init_chart_gradient_fill_writer();
96021
+ init_chart_gradient_fill_xml();
96022
+ init_color_xml_preservation();
96023
+ FILL_CHOICE2 = /* @__PURE__ */ new Set(["noFill", "solidFill", "gradFill", "blipFill", "pattFill", "grpFill"]);
96024
+ AFTER_LN = /* @__PURE__ */ new Set(["effectLst", "effectDag", "scene3d", "sp3d", "extLst"]);
96025
+ LN_FILL_CHOICE = /* @__PURE__ */ new Set(["noFill", "solidFill", "gradFill", "pattFill"]);
96026
+ }
96027
+ });
96028
+
96029
+ // src/pptx/core/utils/chart-space-format.ts
96030
+ function findKey23(obj, local, getLocalName2) {
96031
+ return Object.keys(obj).find((key2) => getLocalName2(key2) === local);
96032
+ }
96033
+ function insertBefore(node, key2, value, after, getLocalName2) {
96034
+ const entries = Object.entries(node);
96035
+ const at2 = entries.findIndex(
96036
+ ([candidate]) => !candidate.startsWith("@_") && after.has(getLocalName2(candidate))
96037
+ );
96038
+ entries.splice(at2 === -1 ? entries.length : at2, 0, [key2, value]);
96039
+ for (const candidate of Object.keys(node)) {
96040
+ delete node[candidate];
96041
+ }
96042
+ for (const [candidate, child27] of entries) {
96043
+ node[candidate] = child27;
96044
+ }
96045
+ }
96046
+ function chartAreaFormatOf(chartData) {
96047
+ const style = chartData.style;
96048
+ return {
96049
+ ...style?.chartAreaFill !== void 0 ? { fill: style.chartAreaFill } : {},
96050
+ ...style?.chartAreaGradient ? { gradient: style.chartAreaGradient } : {},
96051
+ ...style?.chartAreaBorder !== void 0 ? { border: style.chartAreaBorder } : {}
96052
+ };
96053
+ }
96054
+ function plotAreaFormatOf(chartData) {
96055
+ const style = chartData.style;
96056
+ return {
96057
+ ...style?.plotAreaFill !== void 0 ? { fill: style.plotAreaFill } : {},
96058
+ ...style?.plotAreaGradient ? { gradient: style.plotAreaGradient } : {},
96059
+ ...style?.plotAreaBorder !== void 0 ? { border: style.plotAreaBorder } : {}
96060
+ };
96061
+ }
96062
+ function applyGeneratedChartSpaceFormat(tree, chartData) {
96063
+ const chartSpace = tree["c:chartSpace"];
96064
+ if (!chartSpace) {
96065
+ return;
96066
+ }
96067
+ const localName28 = (key2) => key2.replace(/^.*:/u, "");
96068
+ const plotArea = chartSpace["c:chart"]?.["c:plotArea"];
96069
+ const plotSpPr = buildChartAreaSpPr(plotAreaFormatOf(chartData));
96070
+ if (plotArea && plotSpPr) {
96071
+ insertBefore(plotArea, "c:spPr", plotSpPr, /* @__PURE__ */ new Set(["extLst"]), localName28);
96072
+ }
96073
+ const chartSpPr = buildChartAreaSpPr(chartAreaFormatOf(chartData));
96074
+ if (chartSpPr) {
96075
+ insertBefore(chartSpace, "c:spPr", chartSpPr, AFTER_CHART_SPACE_SP_PR, localName28);
96076
+ }
96077
+ if (chartData.roundedCorners !== void 0) {
96078
+ insertBefore(
96079
+ chartSpace,
96080
+ "c:roundedCorners",
96081
+ { "@_val": chartData.roundedCorners ? "1" : "0" },
96082
+ AFTER_ROUNDED_CORNERS,
96083
+ localName28
96084
+ );
96085
+ }
96086
+ }
96087
+ function authoredBool(node) {
96088
+ if (node === void 0) {
96089
+ return void 0;
96090
+ }
96091
+ const val = node && typeof node === "object" ? node["@_val"] : void 0;
96092
+ if (val === void 0 || val === null || val === "") {
96093
+ return true;
96094
+ }
96095
+ return !(val === "0" || val === "false");
96096
+ }
96097
+ function applyChartSpaceFormatToXml(chartSpace, plotArea, chartData, getLocalName2, options) {
96098
+ let changed = false;
96099
+ const roundedKey = findKey23(chartSpace, "roundedCorners", getLocalName2);
96100
+ const authoredRounded = roundedKey ? authoredBool(chartSpace[roundedKey]) : void 0;
96101
+ if (chartData.roundedCorners === void 0) {
96102
+ if (roundedKey) {
96103
+ delete chartSpace[roundedKey];
96104
+ changed = true;
96105
+ }
96106
+ } else if (chartData.roundedCorners !== authoredRounded) {
96107
+ const node = { "@_val": chartData.roundedCorners ? "1" : "0" };
96108
+ if (roundedKey) {
96109
+ chartSpace[roundedKey] = node;
96110
+ } else {
96111
+ insertBefore(chartSpace, "c:roundedCorners", node, AFTER_ROUNDED_CORNERS, getLocalName2);
96112
+ }
96113
+ changed = true;
96114
+ }
96115
+ changed = applyChartAreaFormatToXml(chartSpace, chartAreaFormatOf(chartData), getLocalName2, {
96116
+ ...options,
96117
+ insertSpPr: (owner, spPr) => insertBefore(owner, "c:spPr", spPr, AFTER_CHART_SPACE_SP_PR, getLocalName2)
96118
+ }) || changed;
96119
+ if (plotArea) {
96120
+ changed = applyChartAreaFormatToXml(plotArea, plotAreaFormatOf(chartData), getLocalName2, {
96121
+ ...options,
96122
+ insertSpPr: (owner, spPr) => insertBefore(owner, "c:spPr", spPr, /* @__PURE__ */ new Set(["extLst"]), getLocalName2)
96123
+ }) || changed;
96124
+ }
96125
+ return changed;
96126
+ }
96127
+ var AFTER_ROUNDED_CORNERS, AFTER_CHART_SPACE_SP_PR;
96128
+ var init_chart_space_format = __esm({
96129
+ "src/pptx/core/utils/chart-space-format.ts"() {
96130
+ init_chart_area_format();
96131
+ AFTER_ROUNDED_CORNERS = /* @__PURE__ */ new Set([
96132
+ "AlternateContent",
96133
+ "style",
96134
+ "clrMapOvr",
96135
+ "pivotSource",
96136
+ "protection",
96137
+ "chart",
96138
+ "spPr",
96139
+ "txPr",
96140
+ "externalData",
96141
+ "printSettings",
96142
+ "userShapes",
96143
+ "extLst"
96144
+ ]);
96145
+ AFTER_CHART_SPACE_SP_PR = /* @__PURE__ */ new Set([
96146
+ "txPr",
96147
+ "externalData",
96148
+ "printSettings",
96149
+ "userShapes",
96150
+ "extLst"
96151
+ ]);
96152
+ }
96153
+ });
96154
+
95389
96155
  // src/pptx/core/utils/chart-axis-gridlines-serializer.ts
95390
- function findKey21(obj, local, getLocalName2) {
96156
+ function findKey24(obj, local, getLocalName2) {
95391
96157
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
95392
96158
  }
95393
- function insertBefore(axisNode, newKey, value, afterSet, getLocalName2) {
96159
+ function insertBefore2(axisNode, newKey, value, afterSet, getLocalName2) {
95394
96160
  const keys = Object.keys(axisNode);
95395
96161
  const beforeIdx = keys.findIndex((k) => afterSet.has(getLocalName2(k)));
95396
96162
  const entries = keys.map((k) => [k, axisNode[k]]);
@@ -95407,7 +96173,7 @@ function applyOne(axisNode, local, key2, flag, afterSet, getLocalName2) {
95407
96173
  if (flag === void 0) {
95408
96174
  return;
95409
96175
  }
95410
- const existingKey = findKey21(axisNode, local, getLocalName2);
96176
+ const existingKey = findKey24(axisNode, local, getLocalName2);
95411
96177
  if (!flag) {
95412
96178
  if (existingKey) {
95413
96179
  delete axisNode[existingKey];
@@ -95415,7 +96181,7 @@ function applyOne(axisNode, local, key2, flag, afterSet, getLocalName2) {
95415
96181
  return;
95416
96182
  }
95417
96183
  if (!existingKey) {
95418
- insertBefore(axisNode, key2, {}, afterSet, getLocalName2);
96184
+ insertBefore2(axisNode, key2, {}, afterSet, getLocalName2);
95419
96185
  }
95420
96186
  }
95421
96187
  function applyChartAxisGridlinesToXml(axisNode, opts, getLocalName2, resolveColor2) {
@@ -95455,14 +96221,14 @@ function hex(color2) {
95455
96221
  }
95456
96222
  function buildGridlineSpPr(existing, style, getLocalName2, resolveColor2) {
95457
96223
  const spPr = existing ? { ...existing } : {};
95458
- const lnKey = findKey21(spPr, "ln", getLocalName2) ?? "a:ln";
96224
+ const lnKey = findKey24(spPr, "ln", getLocalName2) ?? "a:ln";
95459
96225
  const ln = { ...spPr[lnKey] ?? {} };
95460
96226
  if (style.strokeWidth !== void 0) {
95461
96227
  ln["@_w"] = String(Math.round(style.strokeWidth * 12700));
95462
96228
  }
95463
96229
  if (style.strokeColor) {
95464
- const fillKey = findKey21(ln, "solidFill", getLocalName2) ?? "a:solidFill";
95465
- const noFillKey = findKey21(ln, "noFill", getLocalName2);
96230
+ const fillKey = findKey24(ln, "solidFill", getLocalName2) ?? "a:solidFill";
96231
+ const noFillKey = findKey24(ln, "noFill", getLocalName2);
95466
96232
  if (noFillKey) {
95467
96233
  delete ln[noFillKey];
95468
96234
  }
@@ -95474,7 +96240,7 @@ function buildGridlineSpPr(existing, style, getLocalName2, resolveColor2) {
95474
96240
  );
95475
96241
  }
95476
96242
  if (style.strokeDashStyle) {
95477
- const dashKey = findKey21(ln, "prstDash", getLocalName2) ?? "a:prstDash";
96243
+ const dashKey = findKey24(ln, "prstDash", getLocalName2) ?? "a:prstDash";
95478
96244
  ln[dashKey] = { "@_val": style.strokeDashStyle };
95479
96245
  }
95480
96246
  spPr[lnKey] = ln;
@@ -95484,12 +96250,12 @@ function applyGridlineStyle(axisNode, local, style, getLocalName2, resolveColor2
95484
96250
  if (!style) {
95485
96251
  return;
95486
96252
  }
95487
- const gridKey = findKey21(axisNode, local, getLocalName2);
96253
+ const gridKey = findKey24(axisNode, local, getLocalName2);
95488
96254
  if (!gridKey) {
95489
96255
  return;
95490
96256
  }
95491
96257
  const grid = { ...axisNode[gridKey] ?? {} };
95492
- const spPrKey = findKey21(grid, "spPr", getLocalName2) ?? "c:spPr";
96258
+ const spPrKey = findKey24(grid, "spPr", getLocalName2) ?? "c:spPr";
95493
96259
  grid[spPrKey] = buildGridlineSpPr(
95494
96260
  grid[spPrKey],
95495
96261
  style,
@@ -95529,7 +96295,7 @@ function buildGeneratedChartAxis(axId, crossId, pos2, formatting) {
95529
96295
  const axis = {
95530
96296
  "c:axId": { "@_val": String(axId) },
95531
96297
  "c:scaling": { "c:orientation": { "@_val": "minMax" } },
95532
- "c:delete": { "@_val": "0" },
96298
+ "c:delete": { "@_val": formatting?.deleted ? "1" : "0" },
95533
96299
  "c:axPos": { "@_val": pos2 },
95534
96300
  "c:crossAx": { "@_val": String(crossId) }
95535
96301
  };
@@ -95688,7 +96454,7 @@ function buildSeries(family, s, index, categories, dateCategories) {
95688
96454
  function axisFormatting(chartData, type, id, index = 0) {
95689
96455
  return chartData.axes?.find((axis) => axis.axisId === id) ?? chartData.axes?.filter((axis) => axis.axisType === type)[index];
95690
96456
  }
95691
- function buildChartTypeContainer(chartData, family) {
96457
+ function buildChartTypeContainer(chartData, family, containerLocal) {
95692
96458
  const container2 = {};
95693
96459
  if (family === "bar") {
95694
96460
  container2["c:barDir"] = { "@_val": chartData.barDirection === "bar" ? "bar" : "col" };
@@ -95722,9 +96488,6 @@ function buildChartTypeContainer(chartData, family) {
95722
96488
  if (family === "line" && chartData.upDownBars !== void 0) {
95723
96489
  applyChartUpDownBars(container2, chartData.upDownBars, (key2) => key2.replace(/^.*:/u, ""));
95724
96490
  }
95725
- if (family === "bar" || family === "ofPie") {
95726
- container2["c:gapWidth"] = { "@_val": "150" };
95727
- }
95728
96491
  if (family === "bar" && chartData.chartType === "bar3D" && chartData.barShape) {
95729
96492
  container2["c:shape"] = { "@_val": chartData.barShape };
95730
96493
  }
@@ -95733,14 +96496,13 @@ function buildChartTypeContainer(chartData, family) {
95733
96496
  }
95734
96497
  if (family === "bar" || family === "line" || family === "area" || family === "radar" || family === "scatter" || family === "bubble" || family === "stock" || family === "surface") {
95735
96498
  container2["c:axId"] = [{ "@_val": String(CAT_AX_ID) }, { "@_val": String(VAL_AX_ID) }];
95736
- } else if (family === "doughnut") {
95737
- container2["c:holeSize"] = { "@_val": "50" };
95738
96499
  }
96500
+ applyGeneratedChartGroupOptions(container2, containerLocal, chartData);
95739
96501
  return container2;
95740
96502
  }
95741
96503
  function buildPlotArea(chartData, tag, family) {
95742
96504
  const plotArea = { "c:layout": {} };
95743
- plotArea[tag] = buildChartTypeContainer(chartData, family);
96505
+ plotArea[tag] = buildChartTypeContainer(chartData, family, tag.replace(/^.*:/u, ""));
95744
96506
  if (chartData.style) {
95745
96507
  applyChartDataLabelsToXml(plotArea, chartData.style, (key2) => key2.replace(/^.*:/u, ""));
95746
96508
  }
@@ -95817,6 +96579,7 @@ function buildChartSpaceXml(chartData) {
95817
96579
  }
95818
96580
  };
95819
96581
  applyGeneratedChartSpaceMetadata(result, chartData);
96582
+ applyGeneratedChartSpaceFormat(result, chartData);
95820
96583
  return result;
95821
96584
  }
95822
96585
  var NS_C2, NS_A2, NS_R2, CAT_AX_ID, VAL_AX_ID, SCATTER_LIKE;
@@ -95832,6 +96595,8 @@ var init_chart_xml_generator = __esm({
95832
96595
  init_chart_series_datalabel_serializer();
95833
96596
  init_chart_space_metadata();
95834
96597
  init_chart_trendline_serializer();
96598
+ init_chart_group_options();
96599
+ init_chart_space_format();
95835
96600
  init_chart_up_down_bars();
95836
96601
  init_chart_xml_axis_generator();
95837
96602
  init_chart_xml_container_map();
@@ -96179,14 +96944,14 @@ function isCustomXmlRelationship(value) {
96179
96944
  return String(value ?? "").endsWith("/relationships/customXml");
96180
96945
  }
96181
96946
  function placeCustomerDataList(container2, list2, location) {
96182
- const insertBefore3 = location === "presentation" ? /* @__PURE__ */ new Set(["p:kinsoku", "p:defaultTextStyle", "p:modifyVerifier", "p:extLst"]) : /* @__PURE__ */ new Set(["p:controls", "p:extLst"]);
96947
+ const insertBefore4 = location === "presentation" ? /* @__PURE__ */ new Set(["p:kinsoku", "p:defaultTextStyle", "p:modifyVerifier", "p:extLst"]) : /* @__PURE__ */ new Set(["p:controls", "p:extLst"]);
96183
96948
  const rebuilt = {};
96184
96949
  let inserted = false;
96185
96950
  for (const [key2, value] of Object.entries(container2)) {
96186
96951
  if (key2 === "p:custDataLst") {
96187
96952
  continue;
96188
96953
  }
96189
- if (!inserted && insertBefore3.has(key2)) {
96954
+ if (!inserted && insertBefore4.has(key2)) {
96190
96955
  rebuilt["p:custDataLst"] = list2;
96191
96956
  inserted = true;
96192
96957
  }
@@ -96274,14 +97039,14 @@ function resolveTagsContainer(data) {
96274
97039
  }
96275
97040
  return void 0;
96276
97041
  }
96277
- function placeAtKey(container2, key2, value, insertBefore3) {
97042
+ function placeAtKey(container2, key2, value, insertBefore4) {
96278
97043
  const rebuilt = {};
96279
97044
  let inserted = false;
96280
97045
  for (const [childKey3, childValue] of Object.entries(container2)) {
96281
97046
  if (childKey3 === key2) {
96282
97047
  continue;
96283
97048
  }
96284
- if (!inserted && insertBefore3.has(childKey3)) {
97049
+ if (!inserted && insertBefore4.has(childKey3)) {
96285
97050
  rebuilt[key2] = value;
96286
97051
  inserted = true;
96287
97052
  }
@@ -96305,10 +97070,10 @@ async function upsertTagsOwningElement(zip, codec, sourcePartPath, relationshipI
96305
97070
  if (!resolved) {
96306
97071
  return;
96307
97072
  }
96308
- const { container: container2, insertBefore: insertBefore3 } = resolved;
97073
+ const { container: container2, insertBefore: insertBefore4 } = resolved;
96309
97074
  const list2 = { ...container2["p:custDataLst"] ?? {} };
96310
97075
  list2["p:tags"] = { "@_r:id": relationshipId2 };
96311
- placeAtKey(container2, "p:custDataLst", list2, insertBefore3);
97076
+ placeAtKey(container2, "p:custDataLst", list2, insertBefore4);
96312
97077
  zip.file(sourcePartPath, codec.build(data));
96313
97078
  }
96314
97079
  async function removeTagsOwningElement(zip, codec, sourcePartPath) {
@@ -96576,6 +97341,49 @@ var init_tag_package = __esm({
96576
97341
  }
96577
97342
  });
96578
97343
 
97344
+ // src/pptx/core/utils/chart-axis-deleted.ts
97345
+ function authoredDeleted(node) {
97346
+ if (node === void 0) {
97347
+ return false;
97348
+ }
97349
+ const val = node && typeof node === "object" ? node["@_val"] : void 0;
97350
+ if (val === void 0 || val === null || val === "") {
97351
+ return true;
97352
+ }
97353
+ return !(val === "0" || val === "false");
97354
+ }
97355
+ function applyChartAxisDeletedToXml(axisNode, deleted, getLocalName2) {
97356
+ if (deleted === void 0) {
97357
+ return false;
97358
+ }
97359
+ const key2 = Object.keys(axisNode).find((candidate) => getLocalName2(candidate) === "delete");
97360
+ if (authoredDeleted(key2 ? axisNode[key2] : void 0) === deleted) {
97361
+ return false;
97362
+ }
97363
+ const node = { "@_val": deleted ? "1" : "0" };
97364
+ if (key2) {
97365
+ axisNode[key2] = node;
97366
+ return true;
97367
+ }
97368
+ const entries = Object.entries(axisNode);
97369
+ const at2 = entries.findIndex(([candidate]) => {
97370
+ const local = getLocalName2(candidate);
97371
+ return local !== "axId" && local !== "scaling" && !candidate.startsWith("@_");
97372
+ });
97373
+ entries.splice(at2 === -1 ? entries.length : at2, 0, ["c:delete", node]);
97374
+ for (const candidate of Object.keys(axisNode)) {
97375
+ delete axisNode[candidate];
97376
+ }
97377
+ for (const [candidate, value] of entries) {
97378
+ axisNode[candidate] = value;
97379
+ }
97380
+ return true;
97381
+ }
97382
+ var init_chart_axis_deleted = __esm({
97383
+ "src/pptx/core/utils/chart-axis-deleted.ts"() {
97384
+ }
97385
+ });
97386
+
96579
97387
  // src/pptx/core/utils/chart-axis-title-serializer.ts
96580
97388
  function firstTextRun(paragraph, getLocalName2) {
96581
97389
  for (const [key2, value] of Object.entries(paragraph)) {
@@ -96814,140 +97622,8 @@ var init_chart_color_map_override = __esm({
96814
97622
  }
96815
97623
  });
96816
97624
 
96817
- // src/pptx/core/utils/chart-container-schema.ts
96818
- function normalizeChartGroupingValue(containerLocal, value) {
96819
- const isBar = containerLocal === "barChart" || containerLocal === "bar3DChart";
96820
- return !isBar && value === "clustered" ? "standard" : value;
96821
- }
96822
- function normalizeGroupingNode(containerLocal, node) {
96823
- const value = node["@_val"];
96824
- if (value !== void 0) {
96825
- node["@_val"] = normalizeChartGroupingValue(containerLocal, value);
96826
- }
96827
- }
96828
- function normalizeChartContainerChildren(container2, containerLocal, getLocalName2) {
96829
- if (!isKnownChartContainer(containerLocal)) {
96830
- return;
96831
- }
96832
- for (const key2 of Object.keys(container2)) {
96833
- if (key2.startsWith("@_") || key2 === "#text") {
96834
- continue;
96835
- }
96836
- const local = getLocalName2(key2);
96837
- if (!chartContainerAllows(containerLocal, local)) {
96838
- delete container2[key2];
96839
- continue;
96840
- }
96841
- if (local === "grouping") {
96842
- const node = container2[key2];
96843
- if (node && typeof node === "object" && !Array.isArray(node)) {
96844
- normalizeGroupingNode(containerLocal, node);
96845
- }
96846
- }
96847
- }
96848
- const required = REQUIRED_LEADING_CHILD[containerLocal];
96849
- if (required) {
96850
- const present = Object.keys(container2).some((k) => getLocalName2(k) === required.local);
96851
- if (!present) {
96852
- container2[`c:${required.local}`] = { "@_val": required.val };
96853
- }
96854
- }
96855
- }
96856
- function orderChartContainerChildren(container2, containerLocal, getLocalName2) {
96857
- const order = CHART_CONTAINER_CHILD_ORDER[containerLocal];
96858
- if (!order) {
96859
- return;
96860
- }
96861
- const keys = Object.keys(container2).filter((k) => !k.startsWith("@_") && k !== "#text");
96862
- if (keys.some((k) => !order.includes(getLocalName2(k)))) {
96863
- return;
96864
- }
96865
- const sorted = [...keys].sort(
96866
- (a, b) => order.indexOf(getLocalName2(a)) - order.indexOf(getLocalName2(b))
96867
- );
96868
- if (sorted.every((k, i) => k === keys[i])) {
96869
- return;
96870
- }
96871
- const saved = sorted.map((k) => [k, container2[k]]);
96872
- for (const k of keys) {
96873
- delete container2[k];
96874
- }
96875
- for (const [k, v] of saved) {
96876
- container2[k] = v;
96877
- }
96878
- }
96879
- function renameXmlKeyInPlace(obj, oldKey, newKey) {
96880
- if (oldKey === newKey || !(oldKey in obj)) {
96881
- return;
96882
- }
96883
- const entries = Object.keys(obj).map((k) => [k === oldKey ? newKey : k, obj[k]]);
96884
- for (const k of Object.keys(obj)) {
96885
- delete obj[k];
96886
- }
96887
- for (const [k, v] of entries) {
96888
- obj[k] = v;
96889
- }
96890
- }
96891
- function referencedAxisIds(plotArea, getLocalName2) {
96892
- const ids = /* @__PURE__ */ new Set();
96893
- for (const key2 of Object.keys(plotArea)) {
96894
- if (!getLocalName2(key2).endsWith("Chart")) {
96895
- continue;
96896
- }
96897
- for (const container2 of toArray2(plotArea[key2])) {
96898
- for (const childKey3 of Object.keys(container2)) {
96899
- if (getLocalName2(childKey3) !== "axId") {
96900
- continue;
96901
- }
96902
- for (const axId of toArray2(container2[childKey3])) {
96903
- const val = axId["@_val"];
96904
- if (val !== void 0) {
96905
- ids.add(String(val));
96906
- }
96907
- }
96908
- }
96909
- }
96910
- }
96911
- return ids;
96912
- }
96913
- function toArray2(value) {
96914
- if (Array.isArray(value)) {
96915
- return value.filter((v) => typeof v === "object" && v !== null);
96916
- }
96917
- return typeof value === "object" && value !== null ? [value] : [];
96918
- }
96919
- function reconcileChartPlotAreaAxes(plotArea, getLocalName2) {
96920
- const referenced = referencedAxisIds(plotArea, getLocalName2);
96921
- let removed = 0;
96922
- for (const key2 of Object.keys(plotArea)) {
96923
- const local = getLocalName2(key2);
96924
- if (!AXIS_LOCAL_NAMES.includes(local)) {
96925
- continue;
96926
- }
96927
- const axes = toArray2(plotArea[key2]);
96928
- const kept = axes.filter((axis) => {
96929
- const axIdKey = Object.keys(axis).find((k) => getLocalName2(k) === "axId");
96930
- const val = axIdKey ? toArray2(axis[axIdKey])[0]?.["@_val"] : void 0;
96931
- return val !== void 0 && referenced.has(String(val));
96932
- });
96933
- removed += axes.length - kept.length;
96934
- if (kept.length === 0) {
96935
- delete plotArea[key2];
96936
- } else if (kept.length !== axes.length) {
96937
- plotArea[key2] = kept.length === 1 ? kept[0] : kept;
96938
- }
96939
- }
96940
- return removed;
96941
- }
96942
- var init_chart_container_schema = __esm({
96943
- "src/pptx/core/utils/chart-container-schema.ts"() {
96944
- init_chart_container_content_model();
96945
- init_chart_container_content_model();
96946
- }
96947
- });
96948
-
96949
97625
  // src/pptx/core/utils/chart-combo-serializer.ts
96950
- function findKey22(obj, local, getLocalName2) {
97626
+ function findKey25(obj, local, getLocalName2) {
96951
97627
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
96952
97628
  }
96953
97629
  function nonSeriesEntries(container2, getLocalName2) {
@@ -96979,14 +97655,14 @@ function consolidateComboContainersInXml(plotArea, getLocalName2) {
96979
97655
  if (!primary) {
96980
97656
  return { primaryKey, containerChildren };
96981
97657
  }
96982
- const serKey = findKey22(primary, "ser", getLocalName2) ?? "c:ser";
97658
+ const serKey = findKey25(primary, "ser", getLocalName2) ?? "c:ser";
96983
97659
  const allSeries = [];
96984
97660
  for (const key2 of containerKeys) {
96985
97661
  const container2 = plotArea[key2];
96986
97662
  if (!container2) {
96987
97663
  continue;
96988
97664
  }
96989
- const containerSerKey = findKey22(container2, "ser", getLocalName2);
97665
+ const containerSerKey = findKey25(container2, "ser", getLocalName2);
96990
97666
  if (containerSerKey) {
96991
97667
  allSeries.push(...ensureArray17(container2[containerSerKey]));
96992
97668
  }
@@ -97014,7 +97690,7 @@ function applyComboSeriesTypesToXml(plotArea, originalKey, series, chartLevelTyp
97014
97690
  if (!original) {
97015
97691
  return false;
97016
97692
  }
97017
- const serKey = findKey22(original, "ser", getLocalName2) ?? "c:ser";
97693
+ const serKey = findKey25(original, "ser", getLocalName2) ?? "c:ser";
97018
97694
  const serNodes = ensureArray17(original[serKey]);
97019
97695
  if (serNodes.length !== series.length) {
97020
97696
  return false;
@@ -97071,7 +97747,7 @@ function applyGroupAxisReferences(container2, series, axes, getLocalName2) {
97071
97747
  if (valueAxisId === void 0 || categoryAxisId === void 0) {
97072
97748
  return;
97073
97749
  }
97074
- const key2 = findKey22(container2, "axId", getLocalName2) ?? "c:axId";
97750
+ const key2 = findKey25(container2, "axId", getLocalName2) ?? "c:axId";
97075
97751
  container2[key2] = [{ "@_val": String(categoryAxisId) }, { "@_val": String(valueAxisId) }];
97076
97752
  }
97077
97753
  var init_chart_combo_serializer = __esm({
@@ -97081,7 +97757,7 @@ var init_chart_combo_serializer = __esm({
97081
97757
  });
97082
97758
 
97083
97759
  // src/pptx/core/utils/chart-filtered-series-writer.ts
97084
- function findKey23(obj, local, getLocalName2) {
97760
+ function findKey26(obj, local, getLocalName2) {
97085
97761
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
97086
97762
  }
97087
97763
  function points3(values) {
@@ -97139,9 +97815,9 @@ function filteredSeriesUnchanged(container2, filteredSeries, xmlLookup) {
97139
97815
  });
97140
97816
  }
97141
97817
  function applyFilteredSeriesToXml(container2, filteredSeries, categories, containerLocalName, getLocalName2) {
97142
- const extLstKey = findKey23(container2, "extLst", getLocalName2) ?? "c:extLst";
97818
+ const extLstKey = findKey26(container2, "extLst", getLocalName2) ?? "c:extLst";
97143
97819
  const extLst = { ...container2[extLstKey] ?? {} };
97144
- const extKey = findKey23(extLst, "ext", getLocalName2);
97820
+ const extKey = findKey26(extLst, "ext", getLocalName2);
97145
97821
  const exts = extKey ? Array.isArray(extLst[extKey]) ? [...extLst[extKey]] : [extLst[extKey]] : [];
97146
97822
  const otherExts = exts.filter((ext) => ext["@_uri"] !== CHART_FILTERED_SERIES_EXT_URI);
97147
97823
  const ownExt = {
@@ -97355,11 +98031,11 @@ var init_chart_legend_serializer = __esm({
97355
98031
  });
97356
98032
 
97357
98033
  // src/pptx/core/utils/chart-line-style-serializer.ts
97358
- function findKey24(node, name, localName28) {
98034
+ function findKey27(node, name, localName28) {
97359
98035
  return Object.keys(node).find((key2) => localName28(key2) === name);
97360
98036
  }
97361
98037
  function setOrdered5(node, name, value, localName28) {
97362
- const key2 = findKey24(node, name, localName28);
98038
+ const key2 = findKey27(node, name, localName28);
97363
98039
  if (key2) {
97364
98040
  node[key2] = value;
97365
98041
  return;
@@ -97384,7 +98060,7 @@ function applyChartLineStyle(chartContainer, elementName, style, localName28, re
97384
98060
  if (style === void 0) {
97385
98061
  return;
97386
98062
  }
97387
- const key2 = findKey24(chartContainer, elementName, localName28);
98063
+ const key2 = findKey27(chartContainer, elementName, localName28);
97388
98064
  if (style === null) {
97389
98065
  if (key2) {
97390
98066
  delete chartContainer[key2];
@@ -97395,7 +98071,7 @@ function applyChartLineStyle(chartContainer, elementName, style, localName28, re
97395
98071
  const node = { ...existing };
97396
98072
  const hasLineProps = style.color || style.width !== void 0 || style.dashStyle;
97397
98073
  if (hasLineProps) {
97398
- const spPrKey = findKey24(node, "spPr", localName28) ?? "c:spPr";
98074
+ const spPrKey = findKey27(node, "spPr", localName28) ?? "c:spPr";
97399
98075
  node[spPrKey] = writeChartShapeProps(
97400
98076
  node[spPrKey],
97401
98077
  { strokeColor: style.color, strokeWidth: style.width, strokeDashStyle: style.dashStyle },
@@ -97429,7 +98105,7 @@ var init_chart_line_style_serializer = __esm({
97429
98105
  });
97430
98106
 
97431
98107
  // src/pptx/core/utils/chart-series-color-serializer.ts
97432
- function findKey25(obj, local, getLocalName2) {
98108
+ function findKey28(obj, local, getLocalName2) {
97433
98109
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
97434
98110
  }
97435
98111
  function insertBeforeLn(obj, key2, value, getLocalName2) {
@@ -97459,14 +98135,14 @@ function insertFirst(obj, key2, value) {
97459
98135
  function writeSeriesColorToSpPr(spPr, hex3, isLineFamily, getLocalName2, resolveColor2) {
97460
98136
  const normalizedHex = hex3.replace(/^#/u, "");
97461
98137
  if (isLineFamily) {
97462
- const lnKey = findKey25(spPr, "ln", getLocalName2) ?? "a:ln";
98138
+ const lnKey = findKey28(spPr, "ln", getLocalName2) ?? "a:ln";
97463
98139
  const ln = spPr[lnKey] ?? {};
97464
98140
  const hadLn = Boolean(spPr[lnKey]);
97465
- const noFillKey = findKey25(ln, "noFill", getLocalName2);
98141
+ const noFillKey = findKey28(ln, "noFill", getLocalName2);
97466
98142
  if (noFillKey) {
97467
98143
  delete ln[noFillKey];
97468
98144
  }
97469
- const lnFillKey = findKey25(ln, "solidFill", getLocalName2) ?? "a:solidFill";
98145
+ const lnFillKey = findKey28(ln, "solidFill", getLocalName2) ?? "a:solidFill";
97470
98146
  const authoredFill2 = ln[lnFillKey];
97471
98147
  const fillNode2 = serializeColorChoice(
97472
98148
  authoredFill2,
@@ -97483,7 +98159,7 @@ function writeSeriesColorToSpPr(spPr, hex3, isLineFamily, getLocalName2, resolve
97483
98159
  }
97484
98160
  return;
97485
98161
  }
97486
- const fillKey = findKey25(spPr, "solidFill", getLocalName2) ?? "a:solidFill";
98162
+ const fillKey = findKey28(spPr, "solidFill", getLocalName2) ?? "a:solidFill";
97487
98163
  const authoredFill = spPr[fillKey];
97488
98164
  const fillNode = serializeColorChoice(
97489
98165
  authoredFill,
@@ -97491,7 +98167,7 @@ function writeSeriesColorToSpPr(spPr, hex3, isLineFamily, getLocalName2, resolve
97491
98167
  normalizedHex
97492
98168
  );
97493
98169
  if (authoredFill) {
97494
- const noFillKey = findKey25(spPr, "noFill", getLocalName2);
98170
+ const noFillKey = findKey28(spPr, "noFill", getLocalName2);
97495
98171
  if (noFillKey) {
97496
98172
  delete spPr[noFillKey];
97497
98173
  }
@@ -97506,7 +98182,7 @@ function writeSeriesColorToSpPr(spPr, hex3, isLineFamily, getLocalName2, resolve
97506
98182
  }
97507
98183
  }
97508
98184
  function ensureSeriesSpPr(seriesNode, getLocalName2) {
97509
- const existingKey = findKey25(seriesNode, "spPr", getLocalName2);
98185
+ const existingKey = findKey28(seriesNode, "spPr", getLocalName2);
97510
98186
  if (existingKey) {
97511
98187
  return seriesNode[existingKey];
97512
98188
  }
@@ -97526,7 +98202,7 @@ function applySeriesGradientToXml(seriesNode, gradient, getLocalName2, options =
97526
98202
  if (options.lineDrawn) {
97527
98203
  return false;
97528
98204
  }
97529
- const spPrKey = findKey25(seriesNode, "spPr", getLocalName2);
98205
+ const spPrKey = findKey28(seriesNode, "spPr", getLocalName2);
97530
98206
  if (!spPrKey && !gradient) {
97531
98207
  return false;
97532
98208
  }
@@ -97562,11 +98238,11 @@ var init_chart_series_color_serializer = __esm({
97562
98238
  });
97563
98239
 
97564
98240
  // src/pptx/core/utils/chart-subtype-serializer.ts
97565
- function findKey26(obj, local, getLocalName2) {
98241
+ function findKey29(obj, local, getLocalName2) {
97566
98242
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
97567
98243
  }
97568
98244
  function upsertValChild(parent, localName28, value, getLocalName2) {
97569
- const existingKey = findKey26(parent, localName28, getLocalName2);
98245
+ const existingKey = findKey29(parent, localName28, getLocalName2);
97570
98246
  if (value === void 0) {
97571
98247
  if (existingKey) {
97572
98248
  delete parent[existingKey];
@@ -97606,7 +98282,7 @@ function applySurfaceWireframeToXml(chartTypeContainer, containerLocalName, wire
97606
98282
  orderChartContainerChildren(chartTypeContainer, containerLocalName, getLocalName2);
97607
98283
  }
97608
98284
  function applySeriesBar3DShapeToXml(seriesNode, shape, getLocalName2) {
97609
- const existingKey = findKey26(seriesNode, "shape", getLocalName2);
98285
+ const existingKey = findKey29(seriesNode, "shape", getLocalName2);
97610
98286
  if (shape === void 0) {
97611
98287
  if (existingKey) {
97612
98288
  delete seriesNode[existingKey];
@@ -97817,7 +98493,7 @@ var init_chart_title_serializer = __esm({
97817
98493
  });
97818
98494
 
97819
98495
  // src/pptx/core/utils/chart-title-style-serializer.ts
97820
- function findKey27(node, localName28, getLocalName2) {
98496
+ function findKey30(node, localName28, getLocalName2) {
97821
98497
  return Object.keys(node).find((key2) => getLocalName2(key2) === localName28);
97822
98498
  }
97823
98499
  function setChildOrdered(node, key2, existingKey, value, laterNames, getLocalName2) {
@@ -97860,9 +98536,9 @@ function asArray3(value) {
97860
98536
  return value && typeof value === "object" ? [value] : [];
97861
98537
  }
97862
98538
  function applyRichTitleFont(title, style, getLocalName2, resolveColor2) {
97863
- const txKey = findKey27(title, "tx", getLocalName2);
98539
+ const txKey = findKey30(title, "tx", getLocalName2);
97864
98540
  const tx = txKey ? title[txKey] : void 0;
97865
- const richKey = tx ? findKey27(tx, "rich", getLocalName2) : void 0;
98541
+ const richKey = tx ? findKey30(tx, "rich", getLocalName2) : void 0;
97866
98542
  const rich = richKey && tx ? tx[richKey] : void 0;
97867
98543
  if (!tx || !rich || !txKey || !richKey) {
97868
98544
  return void 0;
@@ -97871,22 +98547,22 @@ function applyRichTitleFont(title, style, getLocalName2, resolveColor2) {
97871
98547
  if (!hasFont) {
97872
98548
  return txKey;
97873
98549
  }
97874
- const pKey = findKey27(rich, "p", getLocalName2) ?? "a:p";
98550
+ const pKey = findKey30(rich, "p", getLocalName2) ?? "a:p";
97875
98551
  const paragraphs = asArray3(rich[pKey]).map((para) => {
97876
98552
  const next = { ...para };
97877
- const pPrKey = findKey27(next, "pPr", getLocalName2) ?? "a:pPr";
98553
+ const pPrKey = findKey30(next, "pPr", getLocalName2) ?? "a:pPr";
97878
98554
  const pPr = { ...next[pPrKey] ?? {} };
97879
- const defRPrKey = findKey27(pPr, "defRPr", getLocalName2) ?? "a:defRPr";
98555
+ const defRPrKey = findKey30(pPr, "defRPr", getLocalName2) ?? "a:defRPr";
97880
98556
  const existingDefRPr = pPr[defRPrKey] ?? {};
97881
98557
  pPr[defRPrKey] = {
97882
98558
  ...existingDefRPr,
97883
98559
  ...buildTitleDefRPr(style, existingDefRPr, resolveColor2)
97884
98560
  };
97885
98561
  next[pPrKey] = pPr;
97886
- const rKey = findKey27(next, "r", getLocalName2);
98562
+ const rKey = findKey30(next, "r", getLocalName2);
97887
98563
  if (rKey) {
97888
98564
  const runs = asArray3(next[rKey]).map((run) => {
97889
- const rPrKey = findKey27(run, "rPr", getLocalName2) ?? "a:rPr";
98565
+ const rPrKey = findKey30(run, "rPr", getLocalName2) ?? "a:rPr";
97890
98566
  const existingRPr = run[rPrKey] ?? {};
97891
98567
  const nextRun = { ...run };
97892
98568
  nextRun[rPrKey] = { ...existingRPr, ...buildTitleDefRPr(style, existingRPr, resolveColor2) };
@@ -97909,13 +98585,13 @@ function applyChartTitleStyleToXml(chartRoot, style, getLocalName2, options = {
97909
98585
  return;
97910
98586
  }
97911
98587
  const { prefix } = options;
97912
- const titleKey = findKey27(chartRoot, "title", getLocalName2);
98588
+ const titleKey = findKey30(chartRoot, "title", getLocalName2);
97913
98589
  if (!titleKey) {
97914
98590
  return;
97915
98591
  }
97916
98592
  const title = { ...chartRoot[titleKey] ?? {} };
97917
98593
  if (style.spPr !== void 0) {
97918
- const spPrKey = findKey27(title, "spPr", getLocalName2);
98594
+ const spPrKey = findKey30(title, "spPr", getLocalName2);
97919
98595
  if (style.spPr === null) {
97920
98596
  if (spPrKey) {
97921
98597
  delete title[spPrKey];
@@ -97932,23 +98608,23 @@ function applyChartTitleStyleToXml(chartRoot, style, getLocalName2, options = {
97932
98608
  }
97933
98609
  const richKey = applyRichTitleFont(title, style, getLocalName2, resolveColor2);
97934
98610
  if (hasFont && richKey === void 0) {
97935
- const existingTxPrKey = findKey27(title, "txPr", getLocalName2);
98611
+ const existingTxPrKey = findKey30(title, "txPr", getLocalName2);
97936
98612
  const txPrKey = existingTxPrKey ?? `${prefix}:txPr`;
97937
98613
  const txPr = { ...title[txPrKey] ?? {} };
97938
- if (!txPr[findKey27(txPr, "bodyPr", getLocalName2) ?? "a:bodyPr"]) {
98614
+ if (!txPr[findKey30(txPr, "bodyPr", getLocalName2) ?? "a:bodyPr"]) {
97939
98615
  txPr["a:bodyPr"] = {};
97940
98616
  }
97941
- if (!txPr[findKey27(txPr, "lstStyle", getLocalName2) ?? "a:lstStyle"]) {
98617
+ if (!txPr[findKey30(txPr, "lstStyle", getLocalName2) ?? "a:lstStyle"]) {
97942
98618
  txPr["a:lstStyle"] = {};
97943
98619
  }
97944
- const pKey = findKey27(txPr, "p", getLocalName2) ?? "a:p";
98620
+ const pKey = findKey30(txPr, "p", getLocalName2) ?? "a:p";
97945
98621
  const existingP = txPr[pKey];
97946
98622
  const para = {
97947
98623
  ...(Array.isArray(existingP) ? existingP[0] : existingP) ?? {}
97948
98624
  };
97949
- const pPrKey = findKey27(para, "pPr", getLocalName2) ?? "a:pPr";
98625
+ const pPrKey = findKey30(para, "pPr", getLocalName2) ?? "a:pPr";
97950
98626
  const pPr = { ...para[pPrKey] ?? {} };
97951
- const defRPrKey = findKey27(pPr, "defRPr", getLocalName2) ?? "a:defRPr";
98627
+ const defRPrKey = findKey30(pPr, "defRPr", getLocalName2) ?? "a:defRPr";
97952
98628
  const existingDefRPr = pPr[defRPrKey] ?? {};
97953
98629
  pPr[defRPrKey] = {
97954
98630
  ...existingDefRPr,
@@ -98098,7 +98774,7 @@ var init_chart_xlsx_writer = __esm({
98098
98774
  });
98099
98775
 
98100
98776
  // src/pptx/core/core/runtime/chart-cx-update-data.ts
98101
- function findKey28(node, localName28, getLocalName2) {
98777
+ function findKey31(node, localName28, getLocalName2) {
98102
98778
  return Object.keys(node).find((key2) => getLocalName2(key2) === localName28);
98103
98779
  }
98104
98780
  function asArray4(value) {
@@ -98113,8 +98789,8 @@ function dimensionType(node) {
98113
98789
  return String(node["@_type"] ?? "");
98114
98790
  }
98115
98791
  function replaceLevels(target, source, getLocalName2) {
98116
- const targetKey = findKey28(target, "lvl", getLocalName2) ?? "cx:lvl";
98117
- const sourceKey = findKey28(source, "lvl", getLocalName2);
98792
+ const targetKey = findKey31(target, "lvl", getLocalName2) ?? "cx:lvl";
98793
+ const sourceKey = findKey31(source, "lvl", getLocalName2);
98118
98794
  const oldLevels = asArray4(target[targetKey]);
98119
98795
  const newLevels = asArray4(sourceKey ? source[sourceKey] : void 0).map((level2, index) => {
98120
98796
  const old = oldLevels[index];
@@ -98133,8 +98809,8 @@ function replaceLevels(target, source, getLocalName2) {
98133
98809
  }
98134
98810
  function replaceChartExDataDimensions(target, fresh, getLocalName2) {
98135
98811
  for (const kind of ["strDim", "numDim"]) {
98136
- const targetKey = findKey28(target, kind, getLocalName2) ?? `cx:${kind}`;
98137
- const freshKey = findKey28(fresh, kind, getLocalName2);
98812
+ const targetKey = findKey31(target, kind, getLocalName2) ?? `cx:${kind}`;
98813
+ const freshKey = findKey31(fresh, kind, getLocalName2);
98138
98814
  const existing = asArray4(target[targetKey]);
98139
98815
  const incoming = asArray4(freshKey ? fresh[freshKey] : void 0);
98140
98816
  for (const dimension of incoming) {
@@ -98163,14 +98839,14 @@ var init_chart_cx_update_data = __esm({
98163
98839
  });
98164
98840
 
98165
98841
  // src/pptx/core/core/runtime/chart-cx-update-series.ts
98166
- function findKey29(node, localName28, getLocalName2) {
98842
+ function findKey32(node, localName28, getLocalName2) {
98167
98843
  return Object.keys(node).find((key2) => getLocalName2(key2) === localName28);
98168
98844
  }
98169
98845
  function child24(node, localName28, getLocalName2) {
98170
98846
  if (!node) {
98171
98847
  return void 0;
98172
98848
  }
98173
- const key2 = findKey29(node, localName28, getLocalName2);
98849
+ const key2 = findKey32(node, localName28, getLocalName2);
98174
98850
  const value = key2 ? node[key2] : void 0;
98175
98851
  return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
98176
98852
  }
@@ -98182,7 +98858,7 @@ function asArray5(value) {
98182
98858
  (entry) => Boolean(entry) && typeof entry === "object"
98183
98859
  );
98184
98860
  }
98185
- function insertBefore2(parent, key2, value, before, getLocalName2) {
98861
+ function insertBefore3(parent, key2, value, before, getLocalName2) {
98186
98862
  const entries = Object.keys(parent).map((k) => [k, parent[k]]);
98187
98863
  let index = entries.findIndex(([k]) => !k.startsWith("@_") && before.includes(getLocalName2(k)));
98188
98864
  if (index === -1) {
@@ -98200,15 +98876,15 @@ function applySeriesName(node, name, getLocalName2) {
98200
98876
  const tx = child24(node, "tx", getLocalName2);
98201
98877
  const txData = child24(tx, "txData", getLocalName2);
98202
98878
  if (tx && txData) {
98203
- const vKey = findKey29(txData, "v", getLocalName2) ?? "cx:v";
98879
+ const vKey = findKey32(txData, "v", getLocalName2) ?? "cx:v";
98204
98880
  txData[vKey] = name;
98205
98881
  return;
98206
98882
  }
98207
- const txKey = findKey29(node, "tx", getLocalName2);
98883
+ const txKey = findKey32(node, "tx", getLocalName2);
98208
98884
  if (txKey) {
98209
98885
  delete node[txKey];
98210
98886
  }
98211
- insertBefore2(node, "cx:tx", { "cx:txData": { "cx:v": name } }, AFTER_TX, getLocalName2);
98887
+ insertBefore3(node, "cx:tx", { "cx:txData": { "cx:v": name } }, AFTER_TX, getLocalName2);
98212
98888
  }
98213
98889
  function currentSeriesColor(node, getLocalName2) {
98214
98890
  const srgb = child24(
@@ -98230,7 +98906,7 @@ function applySeriesColor(node, series, getLocalName2) {
98230
98906
  }
98231
98907
  const spPr = child24(node, "spPr", getLocalName2);
98232
98908
  if (!spPr) {
98233
- insertBefore2(node, "cx:spPr", fill, AFTER_TX.slice(1), getLocalName2);
98909
+ insertBefore3(node, "cx:spPr", fill, AFTER_TX.slice(1), getLocalName2);
98234
98910
  return;
98235
98911
  }
98236
98912
  for (const key2 of Object.keys(spPr)) {
@@ -98238,13 +98914,13 @@ function applySeriesColor(node, series, getLocalName2) {
98238
98914
  delete spPr[key2];
98239
98915
  }
98240
98916
  }
98241
- insertBefore2(spPr, "a:solidFill", fill["a:solidFill"], AFTER_FILL2, getLocalName2);
98917
+ insertBefore3(spPr, "a:solidFill", fill["a:solidFill"], AFTER_FILL2, getLocalName2);
98242
98918
  }
98243
98919
  function applySeriesDataLabels(node, hasDataLabels, getLocalName2) {
98244
98920
  if (hasDataLabels === void 0) {
98245
98921
  return;
98246
98922
  }
98247
- const key2 = findKey29(node, "dataLabels", getLocalName2);
98923
+ const key2 = findKey32(node, "dataLabels", getLocalName2);
98248
98924
  if (!hasDataLabels) {
98249
98925
  if (key2) {
98250
98926
  delete node[key2];
@@ -98252,7 +98928,7 @@ function applySeriesDataLabels(node, hasDataLabels, getLocalName2) {
98252
98928
  return;
98253
98929
  }
98254
98930
  if (!key2) {
98255
- insertBefore2(
98931
+ insertBefore3(
98256
98932
  node,
98257
98933
  "cx:dataLabels",
98258
98934
  buildChartExDataLabels(),
@@ -98283,7 +98959,7 @@ function bindSeriesData(node, dataNodes, chartData, series, getLocalName2) {
98283
98959
  );
98284
98960
  return;
98285
98961
  }
98286
- const inlineKey = findKey29(node, "data", getLocalName2);
98962
+ const inlineKey = findKey32(node, "data", getLocalName2);
98287
98963
  if (inlineKey && !dataIdNode) {
98288
98964
  const inline = node[inlineKey];
98289
98965
  if (inline && typeof inline === "object" && !Array.isArray(inline)) {
@@ -98300,7 +98976,7 @@ function bindSeriesData(node, dataNodes, chartData, series, getLocalName2) {
98300
98976
  if (dataIdNode) {
98301
98977
  dataIdNode["@_val"] = String(id);
98302
98978
  } else {
98303
- insertBefore2(
98979
+ insertBefore3(
98304
98980
  node,
98305
98981
  "cx:dataId",
98306
98982
  { "@_val": String(id) },
@@ -98336,7 +99012,7 @@ function applyLegend(chartRoot, chartData, getLocalName2) {
98336
99012
  if (!style || style.hasLegend === void 0) {
98337
99013
  return;
98338
99014
  }
98339
- const key2 = findKey29(chartRoot, "legend", getLocalName2);
99015
+ const key2 = findKey32(chartRoot, "legend", getLocalName2);
98340
99016
  if (!style.hasLegend) {
98341
99017
  if (key2) {
98342
99018
  delete chartRoot[key2];
@@ -98354,7 +99030,7 @@ function applyLegend(chartRoot, chartData, getLocalName2) {
98354
99030
  delete chartRoot[key2];
98355
99031
  }
98356
99032
  const legend = buildChartExLegend(style.legendPosition);
98357
- insertBefore2(chartRoot, "cx:legend", legend, ["extLst"], getLocalName2);
99033
+ insertBefore3(chartRoot, "cx:legend", legend, ["extLst"], getLocalName2);
98358
99034
  }
98359
99035
  function chartExLayoutChanged(chartSpace, chartData, getLocalName2) {
98360
99036
  const region = child24(
@@ -98362,7 +99038,7 @@ function chartExLayoutChanged(chartSpace, chartData, getLocalName2) {
98362
99038
  "plotAreaRegion",
98363
99039
  getLocalName2
98364
99040
  );
98365
- const seriesKey = region ? findKey29(region, "series", getLocalName2) : void 0;
99041
+ const seriesKey = region ? findKey32(region, "series", getLocalName2) : void 0;
98366
99042
  const first = region && seriesKey ? asArray5(region[seriesKey])[0] : void 0;
98367
99043
  const existing = String(first?.["@_layoutId"] ?? "").toLowerCase();
98368
99044
  const series = chartData.series[0];
@@ -98378,11 +99054,11 @@ function applyChartExUpdate(chartSpace, chartData, getLocalName2) {
98378
99054
  if (!chartRoot || !region) {
98379
99055
  return false;
98380
99056
  }
98381
- const chartDataKey = findKey29(chartSpace, "chartData", getLocalName2);
99057
+ const chartDataKey = findKey32(chartSpace, "chartData", getLocalName2);
98382
99058
  const chartDataNode = (chartDataKey ? chartSpace[chartDataKey] : void 0) ?? {};
98383
- const dataKey = findKey29(chartDataNode, "data", getLocalName2) ?? "cx:data";
99059
+ const dataKey = findKey32(chartDataNode, "data", getLocalName2) ?? "cx:data";
98384
99060
  const dataNodes = asArray5(chartDataNode[dataKey]);
98385
- const seriesKey = findKey29(region, "series", getLocalName2) ?? "cx:series";
99061
+ const seriesKey = findKey32(region, "series", getLocalName2) ?? "cx:series";
98386
99062
  const existing = asArray5(region[seriesKey]);
98387
99063
  const updated = [];
98388
99064
  chartData.series.forEach((series, index) => {
@@ -98411,7 +99087,7 @@ function applyChartExUpdate(chartSpace, chartData, getLocalName2) {
98411
99087
  region[seriesKey] = updated.length === 1 ? updated[0] : updated;
98412
99088
  chartDataNode[dataKey] = survivingData.length === 1 ? survivingData[0] : survivingData;
98413
99089
  if (!chartDataKey) {
98414
- insertBefore2(chartSpace, "cx:chartData", chartDataNode, ["chart"], getLocalName2);
99090
+ insertBefore3(chartSpace, "cx:chartData", chartDataNode, ["chart"], getLocalName2);
98415
99091
  }
98416
99092
  applyChartTitleToXml(
98417
99093
  chartRoot,
@@ -100775,7 +101451,7 @@ var init_master_color_map = __esm({
100775
101451
 
100776
101452
  // src/pptx/core/services/native-animation-theme-colors.ts
100777
101453
  function resolveToken2(value, resolveThemeColor) {
100778
- if (!value || HEX_COLOR2.test(value)) {
101454
+ if (!value || HEX_COLOR3.test(value)) {
100779
101455
  return value;
100780
101456
  }
100781
101457
  return resolveThemeColor(value) ?? value;
@@ -100799,10 +101475,10 @@ function resolveNativeAnimationThemeColors(animations, resolveThemeColor) {
100799
101475
  } : animation
100800
101476
  );
100801
101477
  }
100802
- var HEX_COLOR2;
101478
+ var HEX_COLOR3;
100803
101479
  var init_native_animation_theme_colors = __esm({
100804
101480
  "src/pptx/core/services/native-animation-theme-colors.ts"() {
100805
- HEX_COLOR2 = /^#?[0-9a-f]{6}$/iu;
101481
+ HEX_COLOR3 = /^#?[0-9a-f]{6}$/iu;
100806
101482
  }
100807
101483
  });
100808
101484
 
@@ -103595,6 +104271,7 @@ var init_PptxHandlerRuntimeSlideMasters = __esm({
103595
104271
  var PptxHandlerRuntime10;
103596
104272
  var init_PptxHandlerRuntimePresentationProps = __esm({
103597
104273
  "src/pptx/core/core/runtime/PptxHandlerRuntimePresentationProps.ts"() {
104274
+ init_chart_area_format();
103598
104275
  init_chart_data_label_parser();
103599
104276
  init_chart_data_labels_visibility();
103600
104277
  init_chart_def_rpr_style();
@@ -103693,27 +104370,18 @@ var init_PptxHandlerRuntimePresentationProps = __esm({
103693
104370
  }
103694
104371
  }
103695
104372
  /**
103696
- * Resolve the `c:spPr` fill of a chart container (`c:chartSpace` or
103697
- * `c:plotArea`) to a colour string, or the literal `'none'` for
103698
- * `<a:noFill/>`. Returns `undefined` when the container declares no fill at
103699
- * all, which leaves the choice to the renderer.
103700
- *
103701
- * `<a:noFill/>` parses to the empty STRING, so presence - not truthiness -
103702
- * has to decide.
104373
+ * Resolve the `c:spPr` fill and border of a chart container
104374
+ * (`c:chartSpace` or `c:plotArea`) to a colour string, or the literal
104375
+ * `'none'` for `<a:noFill/>`; `undefined` when the container declares
104376
+ * nothing, which leaves the choice to the renderer. The save path reads it
104377
+ * back with the same function (`chart-area-format.ts`).
103703
104378
  */
103704
- parseChartContainerFill(container2) {
103705
- const shapeProperties = this.xmlLookupService.getChildByLocalName(container2, "spPr");
103706
- if (!shapeProperties) {
103707
- return void 0;
103708
- }
103709
- const hasNoFill = Object.keys(shapeProperties).some(
103710
- (key2) => this.compatibilityService.getXmlLocalName(key2) === "noFill"
104379
+ parseChartContainerFormat(container2) {
104380
+ return parseChartAreaFormat(
104381
+ container2,
104382
+ (key2) => this.compatibilityService.getXmlLocalName(key2),
104383
+ (node) => this.parseColor(node)
103711
104384
  );
103712
- if (hasNoFill) {
103713
- return "none";
103714
- }
103715
- const solidFill3 = this.xmlLookupService.getChildByLocalName(shapeProperties, "solidFill");
103716
- return solidFill3 ? this.parseColor(solidFill3) : void 0;
103717
104385
  }
103718
104386
  /**
103719
104387
  * Extract chart style metadata from chart XML.
@@ -103729,9 +104397,13 @@ var init_PptxHandlerRuntimePresentationProps = __esm({
103729
104397
  style.styleId = parseInt(String(styleNode["@_val"]));
103730
104398
  hasStyle = true;
103731
104399
  }
103732
- const chartAreaFill = this.parseChartContainerFill(chartSpace);
103733
- if (chartAreaFill) {
103734
- style.chartAreaFill = chartAreaFill;
104400
+ const chartArea = this.parseChartContainerFormat(chartSpace);
104401
+ if (chartArea.fill) {
104402
+ style.chartAreaFill = chartArea.fill;
104403
+ hasStyle = true;
104404
+ }
104405
+ if (chartArea.border) {
104406
+ style.chartAreaBorder = chartArea.border;
103735
104407
  hasStyle = true;
103736
104408
  }
103737
104409
  const chartAreaGradient = parseChartGradientFill(
@@ -103799,9 +104471,13 @@ var init_PptxHandlerRuntimePresentationProps = __esm({
103799
104471
  if (plotAreaGradient) {
103800
104472
  style.plotAreaGradient = plotAreaGradient;
103801
104473
  }
103802
- const plotAreaFill = this.parseChartContainerFill(plotArea);
103803
- if (plotAreaFill) {
103804
- style.plotAreaFill = plotAreaFill;
104474
+ const plotAreaFormat = this.parseChartContainerFormat(plotArea);
104475
+ if (plotAreaFormat.fill) {
104476
+ style.plotAreaFill = plotAreaFormat.fill;
104477
+ hasStyle = true;
104478
+ }
104479
+ if (plotAreaFormat.border) {
104480
+ style.plotAreaBorder = plotAreaFormat.border;
103805
104481
  hasStyle = true;
103806
104482
  }
103807
104483
  const valAx = this.xmlLookupService.getChildByLocalName(plotArea, "valAx");
@@ -108888,7 +109564,10 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
108888
109564
  init_chart_axis_dispunits_serializer();
108889
109565
  init_chart_axis_gridlines_serializer();
108890
109566
  init_chart_axis_label_formatting();
109567
+ init_chart_axis_deleted();
108891
109568
  init_chart_axis_scaling();
109569
+ init_chart_group_options();
109570
+ init_chart_space_format();
108892
109571
  init_chart_axis_title_serializer();
108893
109572
  init_chart_band_fmts();
108894
109573
  init_chart_bubble_options();
@@ -109142,6 +109821,15 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
109142
109821
  } else if (groupingKey) {
109143
109822
  delete chartTypeContainer[groupingKey];
109144
109823
  }
109824
+ const singleContainer = (consolidation?.containerChildren.size ?? 1) <= 1;
109825
+ if (singleContainer && chartData.chartType !== "combo") {
109826
+ applyChartGroupOptionsToXml(
109827
+ chartTypeContainer,
109828
+ containerLocalName,
109829
+ chartData,
109830
+ (key2) => this.compatibilityService.getXmlLocalName(key2)
109831
+ );
109832
+ }
109145
109833
  const seriesNodes = this.xmlLookupService.getChildrenArrayByLocalName(
109146
109834
  chartTypeContainer,
109147
109835
  "ser"
@@ -109546,6 +110234,11 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
109546
110234
  if (!matchingAxis) {
109547
110235
  continue;
109548
110236
  }
110237
+ applyChartAxisDeletedToXml(
110238
+ axisNode,
110239
+ matchingAxis.deleted,
110240
+ (key2) => this.compatibilityService.getXmlLocalName(key2)
110241
+ );
109549
110242
  const scalingNode = this.xmlLookupService.getChildByLocalName(axisNode, "scaling");
109550
110243
  if (scalingNode) {
109551
110244
  applyChartAxisScaling(
@@ -109621,6 +110314,18 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
109621
110314
  }
109622
110315
  }
109623
110316
  }
110317
+ if (chartSpace) {
110318
+ applyChartSpaceFormatToXml(
110319
+ chartSpace,
110320
+ plotArea,
110321
+ chartData,
110322
+ (key2) => this.compatibilityService.getXmlLocalName(key2),
110323
+ {
110324
+ ...this.chartGradientWriteOptions(false),
110325
+ resolveColor: (node) => this.parseColor(node)
110326
+ }
110327
+ );
110328
+ }
109624
110329
  for (const key2 of Object.keys(plotArea)) {
109625
110330
  const local = this.compatibilityService.getXmlLocalName(key2);
109626
110331
  if (!local.endsWith("Chart")) {
@@ -110054,7 +110759,7 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
110054
110759
  });
110055
110760
 
110056
110761
  // src/pptx/core/core/runtime/smartart-definition-builder.ts
110057
- function findKey30(node, name, localName28) {
110762
+ function findKey33(node, name, localName28) {
110058
110763
  return Object.keys(node).find((key2) => localName28(key2) === name);
110059
110764
  }
110060
110765
  function prefixFor(node) {
@@ -110073,7 +110778,7 @@ function setChildren(node, name, values, localName28) {
110073
110778
  if (values === void 0) {
110074
110779
  return false;
110075
110780
  }
110076
- const existing = findKey30(node, name, localName28);
110781
+ const existing = findKey33(node, name, localName28);
110077
110782
  if (values.length === 0) {
110078
110783
  if (existing) {
110079
110784
  delete node[existing];
@@ -110100,7 +110805,7 @@ function applySmartArtDefinitionMetadata(node, metadata, localName28) {
110100
110805
  changed = setChildren(node, "title", textNodes(metadata.titles), localName28) || changed;
110101
110806
  changed = setChildren(node, "desc", textNodes(metadata.descriptions), localName28) || changed;
110102
110807
  if (metadata.categories !== void 0) {
110103
- const key2 = findKey30(node, "catLst", localName28);
110808
+ const key2 = findKey33(node, "catLst", localName28);
110104
110809
  if (metadata.categories.length === 0) {
110105
110810
  if (key2) {
110106
110811
  delete node[key2];
@@ -110124,7 +110829,7 @@ function applySmartArtDefinitionMetadata(node, metadata, localName28) {
110124
110829
  return changed;
110125
110830
  }
110126
110831
  function ensureLabels(node, localName28) {
110127
- const key2 = findKey30(node, "styleLbl", localName28) ?? `${prefixFor(node)}styleLbl`;
110832
+ const key2 = findKey33(node, "styleLbl", localName28) ?? `${prefixFor(node)}styleLbl`;
110128
110833
  return { key: key2, labels: objects(node[key2]) };
110129
110834
  }
110130
110835
  function applySmartArtQuickStyleLabels(node, labels, localName28) {
@@ -110139,7 +110844,7 @@ function applySmartArtQuickStyleLabels(node, labels, localName28) {
110139
110844
  return true;
110140
110845
  }
110141
110846
  function applyColorList(label, name, metadata, localName28) {
110142
- const key2 = findKey30(label, name, localName28) ?? `${prefixFor(label)}${name}`;
110847
+ const key2 = findKey33(label, name, localName28) ?? `${prefixFor(label)}${name}`;
110143
110848
  const list2 = objects(label[key2])[0] ?? {};
110144
110849
  if (metadata.method !== void 0) {
110145
110850
  list2["@_meth"] = metadata.method;
@@ -110182,17 +110887,17 @@ var init_smartart_definition_builder = __esm({
110182
110887
  });
110183
110888
 
110184
110889
  // src/pptx/core/core/runtime/smartart-colors-builder.ts
110185
- function asObject(value) {
110890
+ function asObject2(value) {
110186
110891
  return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
110187
110892
  }
110188
110893
  function toArray4(value) {
110189
110894
  if (Array.isArray(value)) {
110190
- return value.filter((entry) => Boolean(asObject(entry)));
110895
+ return value.filter((entry) => Boolean(asObject2(entry)));
110191
110896
  }
110192
- const obj = asObject(value);
110897
+ const obj = asObject2(value);
110193
110898
  return obj ? [obj] : [];
110194
110899
  }
110195
- function findKey31(obj, name, getLocalName2) {
110900
+ function findKey34(obj, name, getLocalName2) {
110196
110901
  return Object.keys(obj).find((k) => getLocalName2(k) === name);
110197
110902
  }
110198
110903
  function hex2(value) {
@@ -110207,13 +110912,13 @@ function applyColorToList(list2, value, getLocalName2, resolveColor2) {
110207
110912
  }
110208
110913
  const existing = list2[colorKey];
110209
110914
  if (resolveColor2) {
110210
- const authored = asObject(Array.isArray(existing) ? existing[0] : existing);
110915
+ const authored = asObject2(Array.isArray(existing) ? existing[0] : existing);
110211
110916
  const authoredHex = authored ? resolveColor2({ [colorKey]: authored }) : void 0;
110212
110917
  if (authoredHex && colorsEqual(authoredHex, value)) {
110213
110918
  return;
110214
110919
  }
110215
110920
  }
110216
- const rest = Array.isArray(existing) ? existing.slice(1).filter((entry) => Boolean(asObject(entry))) : [];
110921
+ const rest = Array.isArray(existing) ? existing.slice(1).filter((entry) => Boolean(asObject2(entry))) : [];
110217
110922
  if (colorKey !== "a:srgbClr") {
110218
110923
  delete list2[colorKey];
110219
110924
  }
@@ -110228,7 +110933,7 @@ function applyColorListValues(list2, values, getLocalName2, resolveColor2) {
110228
110933
  const existing = Array.isArray(existingRaw) ? existingRaw : existingRaw ? [existingRaw] : [];
110229
110934
  if (resolveColor2 && colorKey && existing.length === values.length) {
110230
110935
  const unchanged2 = existing.every((entryRaw, index) => {
110231
- const entry = asObject(entryRaw);
110936
+ const entry = asObject2(entryRaw);
110232
110937
  const authoredHex = entry ? resolveColor2({ [colorKey]: entry }) : void 0;
110233
110938
  return authoredHex !== void 0 && colorsEqual(authoredHex, values[index]);
110234
110939
  });
@@ -110251,16 +110956,16 @@ function applyRoleColors(labels, roleColors, getLocalName2, resolveColor2) {
110251
110956
  if (!role) {
110252
110957
  continue;
110253
110958
  }
110254
- const fillKey = findKey31(label, "fillClrLst", getLocalName2);
110959
+ const fillKey = findKey34(label, "fillClrLst", getLocalName2);
110255
110960
  if (fillKey) {
110256
- const list2 = asObject(label[fillKey]);
110961
+ const list2 = asObject2(label[fillKey]);
110257
110962
  if (list2 && applyColorListValues(list2, role.fill, getLocalName2, resolveColor2)) {
110258
110963
  mutated = true;
110259
110964
  }
110260
110965
  }
110261
- const lineKey = findKey31(label, "linClrLst", getLocalName2);
110966
+ const lineKey = findKey34(label, "linClrLst", getLocalName2);
110262
110967
  if (lineKey) {
110263
- const list2 = asObject(label[lineKey]);
110968
+ const list2 = asObject2(label[lineKey]);
110264
110969
  if (list2 && applyColorListValues(list2, role.line, getLocalName2, resolveColor2)) {
110265
110970
  mutated = true;
110266
110971
  }
@@ -110275,7 +110980,7 @@ function applySmartArtColorTransform(colorsDef, transform2, getLocalName2, resol
110275
110980
  let mutated = false;
110276
110981
  mutated = applySmartArtDefinitionMetadata(colorsDef, transform2, getLocalName2) || mutated;
110277
110982
  mutated = applySmartArtColorStyleLabels(colorsDef, transform2.labels, getLocalName2) || mutated;
110278
- const styleLblKey = findKey31(colorsDef, "styleLbl", getLocalName2);
110983
+ const styleLblKey = findKey34(colorsDef, "styleLbl", getLocalName2);
110279
110984
  if (!styleLblKey) {
110280
110985
  return mutated;
110281
110986
  }
@@ -110289,19 +110994,19 @@ function applySmartArtColorTransform(colorsDef, transform2, getLocalName2, resol
110289
110994
  let fillIndex = 0;
110290
110995
  let lineIndex = 0;
110291
110996
  for (const label of labels) {
110292
- const fillKey = findKey31(label, "fillClrLst", getLocalName2);
110997
+ const fillKey = findKey34(label, "fillClrLst", getLocalName2);
110293
110998
  if (fillKey) {
110294
110999
  const value = transform2.fillColors[fillIndex++];
110295
- const list2 = asObject(label[fillKey]);
111000
+ const list2 = asObject2(label[fillKey]);
110296
111001
  if (list2 && value) {
110297
111002
  applyColorToList(list2, value, getLocalName2, resolveColor2);
110298
111003
  mutated = true;
110299
111004
  }
110300
111005
  }
110301
- const lineKey = findKey31(label, "linClrLst", getLocalName2);
111006
+ const lineKey = findKey34(label, "linClrLst", getLocalName2);
110302
111007
  if (lineKey) {
110303
111008
  const value = transform2.lineColors[lineIndex++];
110304
- const list2 = asObject(label[lineKey]);
111009
+ const list2 = asObject2(label[lineKey]);
110305
111010
  if (list2 && value) {
110306
111011
  applyColorToList(list2, value, getLocalName2, resolveColor2);
110307
111012
  mutated = true;
@@ -110558,40 +111263,40 @@ var init_smartart_quick_style_builder = __esm({
110558
111263
  });
110559
111264
 
110560
111265
  // src/pptx/core/core/runtime/smartart-save-chrome.ts
110561
- function asObject2(value) {
111266
+ function asObject3(value) {
110562
111267
  return value && typeof value === "object" && !Array.isArray(value) ? value : {};
110563
111268
  }
110564
111269
  function applySmartArtChrome(dataModel, chrome, getLocalName2) {
110565
111270
  if (!chrome || !chrome.backgroundColor && !chrome.backgroundFillXml && !chrome.outlineColor && (chrome.outlineWidth === null || chrome.outlineWidth === void 0)) {
110566
111271
  return;
110567
111272
  }
110568
- const findKey32 = (obj, name) => Object.keys(obj).find((k) => getLocalName2(k) === name);
111273
+ const findKey35 = (obj, name) => Object.keys(obj).find((k) => getLocalName2(k) === name);
110569
111274
  if (chrome.backgroundFillXml) {
110570
- const bgKey = findKey32(dataModel, "bg") ?? "dgm:bg";
110571
- const bg = asObject2(dataModel[bgKey]);
110572
- const fillKey = findKey32(bg, chrome.backgroundFillXml.localName) ?? `a:${chrome.backgroundFillXml.localName}`;
111275
+ const bgKey = findKey35(dataModel, "bg") ?? "dgm:bg";
111276
+ const bg = asObject3(dataModel[bgKey]);
111277
+ const fillKey = findKey35(bg, chrome.backgroundFillXml.localName) ?? `a:${chrome.backgroundFillXml.localName}`;
110573
111278
  bg[fillKey] = chrome.backgroundFillXml.xml;
110574
111279
  dataModel[bgKey] = bg;
110575
111280
  } else if (chrome.backgroundColor) {
110576
111281
  const hex3 = chrome.backgroundColor.replace("#", "");
110577
- const bgKey = findKey32(dataModel, "bg") ?? "dgm:bg";
110578
- const bg = asObject2(dataModel[bgKey]);
110579
- const fillKey = findKey32(bg, "solidFill") ?? "a:solidFill";
111282
+ const bgKey = findKey35(dataModel, "bg") ?? "dgm:bg";
111283
+ const bg = asObject3(dataModel[bgKey]);
111284
+ const fillKey = findKey35(bg, "solidFill") ?? "a:solidFill";
110580
111285
  bg[fillKey] = { "a:srgbClr": { "@_val": hex3 } };
110581
111286
  dataModel[bgKey] = bg;
110582
111287
  }
110583
111288
  const hasOutlineWidth = chrome.outlineWidth !== null && chrome.outlineWidth !== void 0;
110584
111289
  if (chrome.outlineColor || hasOutlineWidth) {
110585
- const wholeKey = findKey32(dataModel, "whole") ?? "dgm:whole";
110586
- const whole = asObject2(dataModel[wholeKey]);
110587
- const lnKey = findKey32(whole, "ln") ?? "a:ln";
110588
- const ln = asObject2(whole[lnKey]);
111290
+ const wholeKey = findKey35(dataModel, "whole") ?? "dgm:whole";
111291
+ const whole = asObject3(dataModel[wholeKey]);
111292
+ const lnKey = findKey35(whole, "ln") ?? "a:ln";
111293
+ const ln = asObject3(whole[lnKey]);
110589
111294
  if (hasOutlineWidth) {
110590
111295
  ln["@_w"] = String(Math.round(chrome.outlineWidth * 12700));
110591
111296
  }
110592
111297
  if (chrome.outlineColor) {
110593
111298
  const hex3 = chrome.outlineColor.replace("#", "");
110594
- const fillKey = findKey32(ln, "solidFill") ?? "a:solidFill";
111299
+ const fillKey = findKey35(ln, "solidFill") ?? "a:solidFill";
110595
111300
  ln[fillKey] = { "a:srgbClr": { "@_val": hex3 } };
110596
111301
  }
110597
111302
  whole[lnKey] = ln;
@@ -128934,6 +129639,7 @@ var init_PptxHandlerRuntimeChartColorStyle = __esm({
128934
129639
  var SCATTER_STYLES, PptxHandlerRuntime94;
128935
129640
  var init_PptxHandlerRuntimeChartParsing = __esm({
128936
129641
  "src/pptx/core/core/runtime/PptxHandlerRuntimeChartParsing.ts"() {
129642
+ init_units2();
128937
129643
  init_chart_advanced_parser();
128938
129644
  init_chart_axis_parser();
128939
129645
  init_chart_band_fmts();
@@ -129516,6 +130222,10 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
129516
130222
  const lineNoFill = seriesLine ? Object.keys(seriesLine).some(
129517
130223
  (key2) => this.compatibilityService.getXmlLocalName(key2) === "noFill"
129518
130224
  ) : false;
130225
+ const lineWidthEmu = Number(seriesLine?.["@_w"]);
130226
+ const lineWidth = Number.isFinite(lineWidthEmu) && lineWidthEmu > 0 ? lineWidthEmu / EMU_PER_POINT : void 0;
130227
+ const lineDashRaw = this.xmlLookupService.getChildByLocalName(seriesLine, "prstDash")?.["@_val"];
130228
+ const lineDashStyle = typeof lineDashRaw === "string" && lineDashRaw.length > 0 ? lineDashRaw : void 0;
129519
130229
  const smoothNode = this.xmlLookupService.getChildByLocalName(seriesNode, "smooth");
129520
130230
  const smooth = smoothNode ? !(smoothNode["@_val"] === "0" || smoothNode["@_val"] === "false") : void 0;
129521
130231
  const invertNode = this.xmlLookupService.getChildByLocalName(seriesNode, "invertIfNegative");
@@ -129534,6 +130244,8 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
129534
130244
  ...bubbleSizes.length > 0 ? { bubbleSizes } : {},
129535
130245
  ...dataLabelOptions && Object.keys(dataLabelOptions).length > 0 ? { dataLabelOptions } : {},
129536
130246
  ...lineNoFill ? { lineNoFill } : {},
130247
+ ...lineWidth !== void 0 ? { lineWidth } : {},
130248
+ ...lineDashStyle ? { lineDashStyle } : {},
129537
130249
  ...seriesNumberFormat ? { numberFormat: seriesNumberFormat } : {},
129538
130250
  color: seriesColor2,
129539
130251
  ...this.colorStyleCodec ? seriesGradientFill(seriesShapeProperties, this.xmlLookupService, this.colorStyleCodec) : {},
@@ -135820,6 +136532,9 @@ function cssColorSafe(value) {
135820
136532
  }
135821
136533
  return void 0;
135822
136534
  }
136535
+ function cssBorderPx(width) {
136536
+ return Math.max(1, Math.round(width));
136537
+ }
135823
136538
  function cssFontFamilySafe(value) {
135824
136539
  if (typeof value !== "string") {
135825
136540
  return void 0;
@@ -135947,19 +136662,19 @@ ${htmlRows.join("\n")}
135947
136662
  const edges = [];
135948
136663
  const topColor = cssColorSafe(style.borderTopColor);
135949
136664
  if (style.borderTopWidth && topColor) {
135950
- edges.push(`border-top:${Math.round(style.borderTopWidth)}px solid ${topColor}`);
136665
+ edges.push(`border-top:${cssBorderPx(style.borderTopWidth)}px solid ${topColor}`);
135951
136666
  }
135952
136667
  const bottomColor = cssColorSafe(style.borderBottomColor);
135953
136668
  if (style.borderBottomWidth && bottomColor) {
135954
- edges.push(`border-bottom:${Math.round(style.borderBottomWidth)}px solid ${bottomColor}`);
136669
+ edges.push(`border-bottom:${cssBorderPx(style.borderBottomWidth)}px solid ${bottomColor}`);
135955
136670
  }
135956
136671
  const leftColor = cssColorSafe(style.borderLeftColor);
135957
136672
  if (style.borderLeftWidth && leftColor) {
135958
- edges.push(`border-left:${Math.round(style.borderLeftWidth)}px solid ${leftColor}`);
136673
+ edges.push(`border-left:${cssBorderPx(style.borderLeftWidth)}px solid ${leftColor}`);
135959
136674
  }
135960
136675
  const rightColor = cssColorSafe(style.borderRightColor);
135961
136676
  if (style.borderRightWidth && rightColor) {
135962
- edges.push(`border-right:${Math.round(style.borderRightWidth)}px solid ${rightColor}`);
136677
+ edges.push(`border-right:${cssBorderPx(style.borderRightWidth)}px solid ${rightColor}`);
135963
136678
  }
135964
136679
  const fallback = cssColorSafe(style.borderColor);
135965
136680
  if (edges.length === 0 && fallback) {
@@ -135979,7 +136694,7 @@ ${htmlRows.join("\n")}
135979
136694
  if (t === 0 && r === 0 && b === 0 && l === 0) {
135980
136695
  return "";
135981
136696
  }
135982
- return `padding:${t}px ${r}px ${b}px ${l}px`;
136697
+ return `padding:${Math.round(t)}px ${Math.round(r)}px ${Math.round(b)}px ${Math.round(l)}px`;
135983
136698
  }
135984
136699
  /**
135985
136700
  * Renders cell content as HTML spans preserving per-run styling