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
@@ -11895,10 +11895,11 @@ var init_units = __esm({
11895
11895
  });
11896
11896
 
11897
11897
  // src/units/constants.ts
11898
- var EMU_PER_PIXEL;
11898
+ var EMU_PER_PIXEL, EMU_PER_POINT;
11899
11899
  var init_constants = __esm({
11900
11900
  "src/units/constants.ts"() {
11901
11901
  EMU_PER_PIXEL = 9525;
11902
+ EMU_PER_POINT = 12700;
11902
11903
  }
11903
11904
  });
11904
11905
 
@@ -17662,7 +17663,7 @@ var init_smartart_layout_interpreter_choose_composite = __esm({
17662
17663
  });
17663
17664
 
17664
17665
  // src/pptx/core/utils/smartart-layout-interpreter-choose-algorithm.ts
17665
- function branchAlg(raw, nodeCount, context, allowedTypes = CHOOSE_ALG_TYPES) {
17666
+ function branchAlg(raw, nodeCount, context, allowedTypes2 = CHOOSE_ALG_TYPES) {
17666
17667
  if (!raw) {
17667
17668
  return void 0;
17668
17669
  }
@@ -17686,7 +17687,7 @@ function branchAlg(raw, nodeCount, context, allowedTypes = CHOOSE_ALG_TYPES) {
17686
17687
  if (name === "alg") {
17687
17688
  for (const candidate of Array.isArray(entry) ? entry : [entry]) {
17688
17689
  const type = candidate && typeof candidate === "object" ? String(candidate["@_type"] ?? "") : "";
17689
- if (allowedTypes.has(type)) {
17690
+ if (allowedTypes2.has(type)) {
17690
17691
  found = { type, raw: candidate };
17691
17692
  return;
17692
17693
  }
@@ -17767,7 +17768,7 @@ function chooseAlgorithm(node, nodeCount, context = {}) {
17767
17768
  }
17768
17769
  return void 0;
17769
17770
  }
17770
- function chooseAlgorithmOfType(node, nodeCount, allowedTypes, context = {}) {
17771
+ function chooseAlgorithmOfType(node, nodeCount, allowedTypes2, context = {}) {
17771
17772
  if (!node.choose || node.choose.length === 0) {
17772
17773
  return void 0;
17773
17774
  }
@@ -17776,7 +17777,7 @@ function chooseAlgorithmOfType(node, nodeCount, allowedTypes, context = {}) {
17776
17777
  activeBranch(choose, nodeCount, context),
17777
17778
  nodeCount,
17778
17779
  context,
17779
- allowedTypes
17780
+ allowedTypes2
17780
17781
  );
17781
17782
  if (found) {
17782
17783
  const parameters = parseBranchAlgParams(found.raw);
@@ -37410,9 +37411,30 @@ function applyChartAxisScaling(scalingNode, axis, getLocalName2) {
37410
37411
  if (axis.orientation !== void 0) {
37411
37412
  upsertChartAxisChild(scalingNode, "orientation", axis.orientation, getLocalName2);
37412
37413
  }
37414
+ orderScalingChildren(scalingNode, getLocalName2);
37413
37415
  }
37416
+ function orderScalingChildren(scalingNode, getLocalName2) {
37417
+ const rank = (key2) => {
37418
+ const index = SCALING_ORDER.indexOf(getLocalName2(key2));
37419
+ return index === -1 ? SCALING_ORDER.length : index;
37420
+ };
37421
+ const keys = Object.keys(scalingNode).filter((key2) => !key2.startsWith("@_"));
37422
+ const sorted = [...keys].sort((a, b) => rank(a) - rank(b));
37423
+ if (sorted.every((key2, i) => key2 === keys[i])) {
37424
+ return;
37425
+ }
37426
+ const entries = sorted.map((key2) => [key2, scalingNode[key2]]);
37427
+ for (const key2 of keys) {
37428
+ delete scalingNode[key2];
37429
+ }
37430
+ for (const [key2, value] of entries) {
37431
+ scalingNode[key2] = value;
37432
+ }
37433
+ }
37434
+ var SCALING_ORDER;
37414
37435
  var init_chart_axis_scaling = __esm({
37415
37436
  "src/pptx/core/utils/chart-axis-scaling.ts"() {
37437
+ SCALING_ORDER = ["logBase", "orientation", "max", "min"];
37416
37438
  }
37417
37439
  });
37418
37440
 
@@ -48515,6 +48537,600 @@ var init_chart_gradient_input = __esm({
48515
48537
  }
48516
48538
  });
48517
48539
 
48540
+ // src/pptx/core/utils/chart-container-content-model.ts
48541
+ function chartTypeToContainerLocalName(chartType) {
48542
+ return TYPE_TO_CONTAINER[chartType];
48543
+ }
48544
+ function isKnownChartContainer(containerLocal) {
48545
+ return containerLocal in CHART_CONTAINER_CHILD_ORDER;
48546
+ }
48547
+ function chartContainerAllows(containerLocal, childLocal) {
48548
+ const order = CHART_CONTAINER_CHILD_ORDER[containerLocal];
48549
+ return order !== void 0 && order.includes(childLocal);
48550
+ }
48551
+ var CHART_CONTAINER_CHILD_ORDER, REQUIRED_LEADING_CHILD, TYPE_TO_CONTAINER, AXIS_LOCAL_NAMES;
48552
+ var init_chart_container_content_model = __esm({
48553
+ "src/pptx/core/utils/chart-container-content-model.ts"() {
48554
+ CHART_CONTAINER_CHILD_ORDER = {
48555
+ areaChart: ["grouping", "varyColors", "ser", "dLbls", "dropLines", "axId", "extLst"],
48556
+ area3DChart: [
48557
+ "grouping",
48558
+ "varyColors",
48559
+ "ser",
48560
+ "dLbls",
48561
+ "dropLines",
48562
+ "gapDepth",
48563
+ "axId",
48564
+ "extLst"
48565
+ ],
48566
+ barChart: [
48567
+ "barDir",
48568
+ "grouping",
48569
+ "varyColors",
48570
+ "ser",
48571
+ "dLbls",
48572
+ "gapWidth",
48573
+ "overlap",
48574
+ "serLines",
48575
+ "axId",
48576
+ "extLst"
48577
+ ],
48578
+ bar3DChart: [
48579
+ "barDir",
48580
+ "grouping",
48581
+ "varyColors",
48582
+ "ser",
48583
+ "dLbls",
48584
+ "gapWidth",
48585
+ "gapDepth",
48586
+ "shape",
48587
+ "axId",
48588
+ "extLst"
48589
+ ],
48590
+ bubbleChart: [
48591
+ "varyColors",
48592
+ "ser",
48593
+ "dLbls",
48594
+ "bubble3D",
48595
+ "bubbleScale",
48596
+ "showNegBubbles",
48597
+ "sizeRepresents",
48598
+ "axId",
48599
+ "extLst"
48600
+ ],
48601
+ doughnutChart: ["varyColors", "ser", "dLbls", "firstSliceAng", "holeSize", "extLst"],
48602
+ lineChart: [
48603
+ "grouping",
48604
+ "varyColors",
48605
+ "ser",
48606
+ "dLbls",
48607
+ "dropLines",
48608
+ "hiLowLines",
48609
+ "upDownBars",
48610
+ "marker",
48611
+ "smooth",
48612
+ "axId",
48613
+ "extLst"
48614
+ ],
48615
+ line3DChart: [
48616
+ "grouping",
48617
+ "varyColors",
48618
+ "ser",
48619
+ "dLbls",
48620
+ "dropLines",
48621
+ "gapDepth",
48622
+ "axId",
48623
+ "extLst"
48624
+ ],
48625
+ ofPieChart: [
48626
+ "ofPieType",
48627
+ "varyColors",
48628
+ "ser",
48629
+ "dLbls",
48630
+ "gapWidth",
48631
+ "splitType",
48632
+ "splitPos",
48633
+ "custSplit",
48634
+ "secondPieSize",
48635
+ "serLines",
48636
+ "extLst"
48637
+ ],
48638
+ pieChart: ["varyColors", "ser", "dLbls", "firstSliceAng", "extLst"],
48639
+ pie3DChart: ["varyColors", "ser", "dLbls", "extLst"],
48640
+ radarChart: ["radarStyle", "varyColors", "ser", "dLbls", "axId", "extLst"],
48641
+ scatterChart: ["scatterStyle", "varyColors", "ser", "dLbls", "axId", "extLst"],
48642
+ stockChart: ["ser", "dLbls", "dropLines", "hiLowLines", "upDownBars", "axId", "extLst"],
48643
+ surfaceChart: ["wireframe", "ser", "bandFmts", "axId", "extLst"],
48644
+ surface3DChart: ["wireframe", "ser", "bandFmts", "axId", "extLst"]
48645
+ };
48646
+ REQUIRED_LEADING_CHILD = {
48647
+ barChart: { local: "barDir", val: "col" },
48648
+ bar3DChart: { local: "barDir", val: "col" },
48649
+ lineChart: { local: "grouping", val: "standard" },
48650
+ line3DChart: { local: "grouping", val: "standard" },
48651
+ ofPieChart: { local: "ofPieType", val: "pie" },
48652
+ radarChart: { local: "radarStyle", val: "marker" },
48653
+ scatterChart: { local: "scatterStyle", val: "lineMarker" }
48654
+ };
48655
+ TYPE_TO_CONTAINER = {
48656
+ area: "areaChart",
48657
+ area3D: "area3DChart",
48658
+ bar: "barChart",
48659
+ bar3D: "bar3DChart",
48660
+ bubble: "bubbleChart",
48661
+ doughnut: "doughnutChart",
48662
+ line: "lineChart",
48663
+ line3D: "line3DChart",
48664
+ ofPie: "ofPieChart",
48665
+ pie: "pieChart",
48666
+ pie3D: "pie3DChart",
48667
+ radar: "radarChart",
48668
+ scatter: "scatterChart",
48669
+ stock: "stockChart",
48670
+ surface: "surfaceChart"
48671
+ };
48672
+ AXIS_LOCAL_NAMES = ["catAx", "valAx", "dateAx", "serAx"];
48673
+ }
48674
+ });
48675
+
48676
+ // src/pptx/core/utils/chart-container-schema.ts
48677
+ function normalizeChartGroupingValue(containerLocal, value) {
48678
+ const isBar = containerLocal === "barChart" || containerLocal === "bar3DChart";
48679
+ return !isBar && value === "clustered" ? "standard" : value;
48680
+ }
48681
+ function normalizeGroupingNode(containerLocal, node) {
48682
+ const value = node["@_val"];
48683
+ if (value !== void 0) {
48684
+ node["@_val"] = normalizeChartGroupingValue(containerLocal, value);
48685
+ }
48686
+ }
48687
+ function normalizeChartContainerChildren(container2, containerLocal, getLocalName2) {
48688
+ if (!isKnownChartContainer(containerLocal)) {
48689
+ return;
48690
+ }
48691
+ for (const key2 of Object.keys(container2)) {
48692
+ if (key2.startsWith("@_") || key2 === "#text") {
48693
+ continue;
48694
+ }
48695
+ const local = getLocalName2(key2);
48696
+ if (!chartContainerAllows(containerLocal, local)) {
48697
+ delete container2[key2];
48698
+ continue;
48699
+ }
48700
+ if (local === "grouping") {
48701
+ const node = container2[key2];
48702
+ if (node && typeof node === "object" && !Array.isArray(node)) {
48703
+ normalizeGroupingNode(containerLocal, node);
48704
+ }
48705
+ }
48706
+ }
48707
+ const required = REQUIRED_LEADING_CHILD[containerLocal];
48708
+ if (required) {
48709
+ const present = Object.keys(container2).some((k) => getLocalName2(k) === required.local);
48710
+ if (!present) {
48711
+ container2[`c:${required.local}`] = { "@_val": required.val };
48712
+ }
48713
+ }
48714
+ }
48715
+ function orderChartContainerChildren(container2, containerLocal, getLocalName2) {
48716
+ const order = CHART_CONTAINER_CHILD_ORDER[containerLocal];
48717
+ if (!order) {
48718
+ return;
48719
+ }
48720
+ const keys = Object.keys(container2).filter((k) => !k.startsWith("@_") && k !== "#text");
48721
+ if (keys.some((k) => !order.includes(getLocalName2(k)))) {
48722
+ return;
48723
+ }
48724
+ const sorted = [...keys].sort(
48725
+ (a, b) => order.indexOf(getLocalName2(a)) - order.indexOf(getLocalName2(b))
48726
+ );
48727
+ if (sorted.every((k, i) => k === keys[i])) {
48728
+ return;
48729
+ }
48730
+ const saved = sorted.map((k) => [k, container2[k]]);
48731
+ for (const k of keys) {
48732
+ delete container2[k];
48733
+ }
48734
+ for (const [k, v] of saved) {
48735
+ container2[k] = v;
48736
+ }
48737
+ }
48738
+ function renameXmlKeyInPlace(obj, oldKey, newKey) {
48739
+ if (oldKey === newKey || !(oldKey in obj)) {
48740
+ return;
48741
+ }
48742
+ const entries = Object.keys(obj).map((k) => [k === oldKey ? newKey : k, obj[k]]);
48743
+ for (const k of Object.keys(obj)) {
48744
+ delete obj[k];
48745
+ }
48746
+ for (const [k, v] of entries) {
48747
+ obj[k] = v;
48748
+ }
48749
+ }
48750
+ function referencedAxisIds(plotArea, getLocalName2) {
48751
+ const ids = /* @__PURE__ */ new Set();
48752
+ for (const key2 of Object.keys(plotArea)) {
48753
+ if (!getLocalName2(key2).endsWith("Chart")) {
48754
+ continue;
48755
+ }
48756
+ for (const container2 of toArray2(plotArea[key2])) {
48757
+ for (const childKey3 of Object.keys(container2)) {
48758
+ if (getLocalName2(childKey3) !== "axId") {
48759
+ continue;
48760
+ }
48761
+ for (const axId of toArray2(container2[childKey3])) {
48762
+ const val = axId["@_val"];
48763
+ if (val !== void 0) {
48764
+ ids.add(String(val));
48765
+ }
48766
+ }
48767
+ }
48768
+ }
48769
+ }
48770
+ return ids;
48771
+ }
48772
+ function toArray2(value) {
48773
+ if (Array.isArray(value)) {
48774
+ return value.filter((v) => typeof v === "object" && v !== null);
48775
+ }
48776
+ return typeof value === "object" && value !== null ? [value] : [];
48777
+ }
48778
+ function reconcileChartPlotAreaAxes(plotArea, getLocalName2) {
48779
+ const referenced = referencedAxisIds(plotArea, getLocalName2);
48780
+ let removed = 0;
48781
+ for (const key2 of Object.keys(plotArea)) {
48782
+ const local = getLocalName2(key2);
48783
+ if (!AXIS_LOCAL_NAMES.includes(local)) {
48784
+ continue;
48785
+ }
48786
+ const axes = toArray2(plotArea[key2]);
48787
+ const kept = axes.filter((axis) => {
48788
+ const axIdKey = Object.keys(axis).find((k) => getLocalName2(k) === "axId");
48789
+ const val = axIdKey ? toArray2(axis[axIdKey])[0]?.["@_val"] : void 0;
48790
+ return val !== void 0 && referenced.has(String(val));
48791
+ });
48792
+ removed += axes.length - kept.length;
48793
+ if (kept.length === 0) {
48794
+ delete plotArea[key2];
48795
+ } else if (kept.length !== axes.length) {
48796
+ plotArea[key2] = kept.length === 1 ? kept[0] : kept;
48797
+ }
48798
+ }
48799
+ return removed;
48800
+ }
48801
+ var init_chart_container_schema = __esm({
48802
+ "src/pptx/core/utils/chart-container-schema.ts"() {
48803
+ init_chart_container_content_model();
48804
+ init_chart_container_content_model();
48805
+ }
48806
+ });
48807
+
48808
+ // src/pptx/core/utils/chart-group-options.ts
48809
+ function chartGroupOptionVal(spec, value) {
48810
+ return String(Math.min(spec.max, Math.max(spec.min, Math.round(value))));
48811
+ }
48812
+ function localNameOf9(key2) {
48813
+ return key2.replace(/^.*:/u, "");
48814
+ }
48815
+ function findKey13(obj, local, getLocalName2) {
48816
+ return Object.keys(obj).find((key2) => getLocalName2(key2) === local);
48817
+ }
48818
+ function modelValue(chartData, spec) {
48819
+ if (spec.element === "gapWidth" && chartData.chartType === "ofPie") {
48820
+ return chartData.ofPieOptions?.gapWidth ?? chartData.barGapWidth;
48821
+ }
48822
+ const value = chartData[spec.field];
48823
+ return typeof value === "number" && Number.isFinite(value) ? value : void 0;
48824
+ }
48825
+ function applyGeneratedChartGroupOptions(container2, containerLocal, chartData) {
48826
+ for (const spec of CHART_GROUP_OPTIONS) {
48827
+ if (!chartContainerAllows(containerLocal, spec.element)) {
48828
+ continue;
48829
+ }
48830
+ const value = modelValue(chartData, spec) ?? spec.generatedDefault;
48831
+ if (value !== void 0) {
48832
+ container2[`c:${spec.element}`] = { "@_val": chartGroupOptionVal(spec, value) };
48833
+ }
48834
+ }
48835
+ orderChartContainerChildren(container2, containerLocal, localNameOf9);
48836
+ }
48837
+ function authoredValue(node) {
48838
+ if (!node || typeof node !== "object") {
48839
+ return void 0;
48840
+ }
48841
+ const raw = node["@_val"];
48842
+ const num4 = raw === void 0 || raw === null || raw === "" ? NaN : Number.parseFloat(String(raw));
48843
+ return Number.isFinite(num4) ? num4 : void 0;
48844
+ }
48845
+ function applyChartGroupOptionsToXml(container2, containerLocal, chartData, getLocalName2) {
48846
+ let changed = false;
48847
+ for (const spec of CHART_GROUP_OPTIONS) {
48848
+ if (!chartContainerAllows(containerLocal, spec.element)) {
48849
+ continue;
48850
+ }
48851
+ if (spec.element === "gapWidth" && containerLocal === "ofPieChart") {
48852
+ continue;
48853
+ }
48854
+ const key2 = findKey13(container2, spec.element, getLocalName2);
48855
+ const authored = key2 ? authoredValue(container2[key2]) : void 0;
48856
+ const value = chartData[spec.field];
48857
+ if (value === void 0) {
48858
+ if (key2 && authored !== void 0) {
48859
+ delete container2[key2];
48860
+ changed = true;
48861
+ }
48862
+ continue;
48863
+ }
48864
+ if (authored === value) {
48865
+ continue;
48866
+ }
48867
+ container2[key2 ?? `c:${spec.element}`] = { "@_val": chartGroupOptionVal(spec, value) };
48868
+ changed = true;
48869
+ }
48870
+ return changed;
48871
+ }
48872
+ var CHART_GROUP_OPTIONS;
48873
+ var init_chart_group_options = __esm({
48874
+ "src/pptx/core/utils/chart-group-options.ts"() {
48875
+ init_chart_container_content_model();
48876
+ init_chart_container_schema();
48877
+ CHART_GROUP_OPTIONS = [
48878
+ {
48879
+ element: "gapWidth",
48880
+ field: "barGapWidth",
48881
+ schemaType: "ST_GapAmount",
48882
+ min: 0,
48883
+ max: 500,
48884
+ generatedDefault: 150
48885
+ },
48886
+ { element: "overlap", field: "barOverlap", schemaType: "ST_Overlap", min: -100, max: 100 },
48887
+ {
48888
+ element: "firstSliceAng",
48889
+ field: "firstSliceAngle",
48890
+ schemaType: "ST_FirstSliceAng",
48891
+ min: 0,
48892
+ max: 360
48893
+ },
48894
+ {
48895
+ element: "holeSize",
48896
+ field: "doughnutHoleSize",
48897
+ schemaType: "ST_HoleSize",
48898
+ min: 1,
48899
+ max: 90,
48900
+ generatedDefault: 50
48901
+ }
48902
+ ];
48903
+ }
48904
+ });
48905
+
48906
+ // src/pptx/core/builders/sdk/chart-layout-input.ts
48907
+ function allowedTypes(element) {
48908
+ return CLASSIC_TYPES.filter((type) => {
48909
+ const local = chartTypeToContainerLocalName(type);
48910
+ return local !== void 0 && chartContainerAllows(local, element);
48911
+ });
48912
+ }
48913
+ function drawnTypes(chartData) {
48914
+ if (chartData.chartType !== "combo") {
48915
+ return [chartData.chartType];
48916
+ }
48917
+ return chartData.series.map((s) => s.seriesChartType ?? chartData.chartType);
48918
+ }
48919
+ function validateValue(spec, name, value) {
48920
+ if (!Number.isInteger(value) || value < spec.min || value > spec.max) {
48921
+ throw new RangeError(
48922
+ `${name} must be an integer from ${spec.min} to ${spec.max} (${spec.schemaType}), got ${value}.`
48923
+ );
48924
+ }
48925
+ }
48926
+ function applyChartGroupOptionsInput(chartData, input) {
48927
+ for (const spec of CHART_GROUP_OPTIONS) {
48928
+ const name = INPUT_KEYS[spec.element];
48929
+ const value = input[name];
48930
+ if (value === void 0) {
48931
+ continue;
48932
+ }
48933
+ if (value === null) {
48934
+ delete chartData[spec.field];
48935
+ continue;
48936
+ }
48937
+ validateValue(spec, name, value);
48938
+ const types = drawnTypes(chartData);
48939
+ const allowed = allowedTypes(spec.element);
48940
+ if (!types.some((type) => allowed.includes(type))) {
48941
+ throw new Error(
48942
+ `${name} applies to ${allowed.join(", ")} charts; this chart is drawn as "${types.join('", "')}".`
48943
+ );
48944
+ }
48945
+ chartData[spec.field] = value;
48946
+ if (spec.element === "gapWidth" && chartData.ofPieOptions) {
48947
+ chartData.ofPieOptions.gapWidth = value;
48948
+ }
48949
+ }
48950
+ }
48951
+ function toPaint(value, name) {
48952
+ const trimmed = value.trim();
48953
+ if (trimmed === "none") {
48954
+ return "none";
48955
+ }
48956
+ if (!HEX_COLOR2.test(trimmed)) {
48957
+ throw new Error(`${name} must be a 6-digit hex colour or 'none', got "${value}".`);
48958
+ }
48959
+ return `#${trimmed.replace(/^#/u, "").toUpperCase()}`;
48960
+ }
48961
+ function applyChartAreaFormatInput(chartData, area, input) {
48962
+ const style = chartData.style ??= {};
48963
+ const fillKey = area === "chart" ? "chartAreaFill" : "plotAreaFill";
48964
+ const gradientKey = area === "chart" ? "chartAreaGradient" : "plotAreaGradient";
48965
+ const borderKey = area === "chart" ? "chartAreaBorder" : "plotAreaBorder";
48966
+ if (input === null) {
48967
+ delete style[fillKey];
48968
+ delete style[gradientKey];
48969
+ delete style[borderKey];
48970
+ if (area === "chart") {
48971
+ delete chartData.roundedCorners;
48972
+ }
48973
+ return;
48974
+ }
48975
+ if (input.roundedCorners !== void 0 && area !== "chart") {
48976
+ throw new Error("roundedCorners applies to the chart area only.");
48977
+ }
48978
+ if (input.fill !== void 0) {
48979
+ delete style[fillKey];
48980
+ delete style[gradientKey];
48981
+ if (typeof input.fill === "string") {
48982
+ style[fillKey] = toPaint(input.fill, "fill");
48983
+ } else if (input.fill !== null) {
48984
+ style[gradientKey] = toChartGradientFill(input.fill);
48985
+ }
48986
+ }
48987
+ if (input.border !== void 0) {
48988
+ if (input.border === null) {
48989
+ delete style[borderKey];
48990
+ } else {
48991
+ style[borderKey] = toPaint(input.border, "border");
48992
+ }
48993
+ }
48994
+ if (input.roundedCorners !== void 0) {
48995
+ if (input.roundedCorners === null) {
48996
+ delete chartData.roundedCorners;
48997
+ } else {
48998
+ chartData.roundedCorners = input.roundedCorners;
48999
+ }
49000
+ }
49001
+ }
49002
+ var INPUT_KEYS, CLASSIC_TYPES, HEX_COLOR2;
49003
+ var init_chart_layout_input = __esm({
49004
+ "src/pptx/core/builders/sdk/chart-layout-input.ts"() {
49005
+ init_chart_group_options();
49006
+ init_chart_container_content_model();
49007
+ init_chart_gradient_input();
49008
+ INPUT_KEYS = {
49009
+ gapWidth: "gapWidth",
49010
+ overlap: "overlap",
49011
+ firstSliceAng: "firstSliceAngle",
49012
+ holeSize: "holeSize"
49013
+ };
49014
+ CLASSIC_TYPES = [
49015
+ "bar",
49016
+ "bar3D",
49017
+ "line",
49018
+ "line3D",
49019
+ "pie",
49020
+ "pie3D",
49021
+ "ofPie",
49022
+ "doughnut",
49023
+ "area",
49024
+ "area3D",
49025
+ "scatter",
49026
+ "bubble",
49027
+ "radar",
49028
+ "stock",
49029
+ "surface"
49030
+ ];
49031
+ HEX_COLOR2 = /^#?[0-9a-f]{6}$/iu;
49032
+ }
49033
+ });
49034
+
49035
+ // src/pptx/core/builders/sdk/chart-operations.ts
49036
+ function ensureChartData(element) {
49037
+ if (!element.chartData) {
49038
+ throw new Error(
49039
+ "Chart element has no chartData. Cannot perform chart operations on an uninitialised chart."
49040
+ );
49041
+ }
49042
+ }
49043
+ function setChartAxis(element, axisType, edit) {
49044
+ ensureChartData(element);
49045
+ const axes = element.chartData.axes ??= [];
49046
+ let axis = axes.find((a) => a.axisType === axisType);
49047
+ if (!axis) {
49048
+ axis = { axisType };
49049
+ axes.push(axis);
49050
+ }
49051
+ if (edit.min !== void 0) {
49052
+ axis.min = edit.min ?? void 0;
49053
+ }
49054
+ if (edit.max !== void 0) {
49055
+ axis.max = edit.max ?? void 0;
49056
+ }
49057
+ if (edit.majorUnit !== void 0) {
49058
+ axis.majorUnit = edit.majorUnit ?? void 0;
49059
+ }
49060
+ if (edit.minorUnit !== void 0) {
49061
+ axis.minorUnit = edit.minorUnit ?? void 0;
49062
+ }
49063
+ if (edit.orientation !== void 0) {
49064
+ axis.orientation = edit.orientation ?? void 0;
49065
+ }
49066
+ if (edit.numberFormat !== void 0) {
49067
+ axis.numFmt = edit.numberFormat ? { formatCode: edit.numberFormat, sourceLinked: false } : void 0;
49068
+ }
49069
+ if (edit.tickLabelPosition !== void 0) {
49070
+ axis.tickLblPos = edit.tickLabelPosition;
49071
+ }
49072
+ if (edit.title !== void 0) {
49073
+ axis.titleText = edit.title ?? "";
49074
+ }
49075
+ if (edit.majorGridlines !== void 0) {
49076
+ axis.majorGridlines = edit.majorGridlines;
49077
+ }
49078
+ if (edit.minorGridlines !== void 0) {
49079
+ axis.minorGridlines = edit.minorGridlines;
49080
+ }
49081
+ if (edit.displayUnits !== void 0) {
49082
+ axis.displayUnits = edit.displayUnits ?? void 0;
49083
+ }
49084
+ if (edit.displayUnitsValue !== void 0) {
49085
+ axis.displayUnitsValue = edit.displayUnitsValue ?? void 0;
49086
+ }
49087
+ if (edit.displayUnitsLabel !== void 0) {
49088
+ axis.displayUnitsLabel = edit.displayUnitsLabel;
49089
+ }
49090
+ if (edit.visible !== void 0) {
49091
+ axis.deleted = !edit.visible;
49092
+ }
49093
+ }
49094
+ var init_chart_operations = __esm({
49095
+ "src/pptx/core/builders/sdk/chart-operations.ts"() {
49096
+ }
49097
+ });
49098
+
49099
+ // src/pptx/core/builders/sdk/chart-layout-operations.ts
49100
+ function setChartGroupOptions(element, options) {
49101
+ ensureChartData(element);
49102
+ applyChartGroupOptionsInput(element.chartData, options);
49103
+ }
49104
+ function setChartAreaFormat(element, area, format) {
49105
+ ensureChartData(element);
49106
+ applyChartAreaFormatInput(element.chartData, area, format);
49107
+ }
49108
+ function applyChartInputLayout(element, input) {
49109
+ setChartGroupOptions(element, {
49110
+ ...input.gapWidth !== void 0 ? { gapWidth: input.gapWidth } : {},
49111
+ ...input.overlap !== void 0 ? { overlap: input.overlap } : {},
49112
+ ...input.firstSliceAngle !== void 0 ? { firstSliceAngle: input.firstSliceAngle } : {},
49113
+ ...input.holeSize !== void 0 ? { holeSize: input.holeSize } : {}
49114
+ });
49115
+ if (input.chartArea) {
49116
+ setChartAreaFormat(element, "chart", input.chartArea);
49117
+ }
49118
+ if (input.plotArea) {
49119
+ setChartAreaFormat(element, "plot", input.plotArea);
49120
+ }
49121
+ for (const [axisType, edit] of Object.entries(input.axes ?? {})) {
49122
+ if (edit) {
49123
+ setChartAxis(element, axisType, edit);
49124
+ }
49125
+ }
49126
+ }
49127
+ var init_chart_layout_operations = __esm({
49128
+ "src/pptx/core/builders/sdk/chart-layout-operations.ts"() {
49129
+ init_chart_layout_input();
49130
+ init_chart_operations();
49131
+ }
49132
+ });
49133
+
48518
49134
  // src/pptx/core/builders/sdk/ElementFactory.ts
48519
49135
  function generateId(prefix) {
48520
49136
  idCounter += 1;
@@ -48858,12 +49474,14 @@ function createChartElement(chartType, input, options) {
48858
49474
  legendPosition: input.legendPosition
48859
49475
  }
48860
49476
  };
48861
- return {
49477
+ const element = {
48862
49478
  type: "chart",
48863
49479
  id: generateId("cht"),
48864
49480
  ...p,
48865
49481
  chartData
48866
49482
  };
49483
+ applyChartInputLayout(element, input);
49484
+ return element;
48867
49485
  }
48868
49486
  function createMediaElement(mediaType, source, options) {
48869
49487
  const p = pos("media", options);
@@ -48929,6 +49547,7 @@ var init_ElementFactory = __esm({
48929
49547
  init_table_style_defaults();
48930
49548
  init_custom_geometry();
48931
49549
  init_chart_gradient_input();
49550
+ init_chart_layout_operations();
48932
49551
  idCounter = 0;
48933
49552
  DEFAULTS = {
48934
49553
  text: { x: 100, y: 100, width: 600, height: 50 },
@@ -55449,9 +56068,7 @@ function applyCellBorderStyle(cellProperties, style, context) {
55449
56068
  }
55450
56069
  const widthEmu = parseInt(String(node["@_w"] || "0"), 10);
55451
56070
  if (widthEmu > 0) {
55452
- style[`${prefix}Width`] = Math.round(
55453
- widthEmu / context.emuPerPx
55454
- );
56071
+ style[`${prefix}Width`] = widthEmu / context.emuPerPx;
55455
56072
  hasStyle = true;
55456
56073
  }
55457
56074
  const color2 = context.parseColor(node["a:solidFill"]);
@@ -55481,7 +56098,7 @@ function applyCellBorderStyle(cellProperties, style, context) {
55481
56098
  hasStyle = true;
55482
56099
  }
55483
56100
  if (w > 0) {
55484
- style.borderDiagDownWidth = Math.round(w / context.emuPerPx);
56101
+ style.borderDiagDownWidth = w / context.emuPerPx;
55485
56102
  hasStyle = true;
55486
56103
  }
55487
56104
  }
@@ -55494,7 +56111,7 @@ function applyCellBorderStyle(cellProperties, style, context) {
55494
56111
  hasStyle = true;
55495
56112
  }
55496
56113
  if (w > 0) {
55497
- style.borderDiagUpWidth = Math.round(w / context.emuPerPx);
56114
+ style.borderDiagUpWidth = w / context.emuPerPx;
55498
56115
  hasStyle = true;
55499
56116
  }
55500
56117
  }
@@ -55512,7 +56129,7 @@ function applyCellMarginStyle(cellProperties, style, context) {
55512
56129
  return void 0;
55513
56130
  }
55514
56131
  const w = parseInt(String(node["@_w"]), 10);
55515
- return Number.isFinite(w) && w >= 0 ? Math.round(w / context.emuPerPx) : void 0;
56132
+ return Number.isFinite(w) && w >= 0 ? w / context.emuPerPx : void 0;
55516
56133
  };
55517
56134
  const ml = parseMargin(tcMar["a:marL"]);
55518
56135
  const mr = parseMargin(tcMar["a:marR"]);
@@ -55546,7 +56163,7 @@ function applyCellMarginStyle(cellProperties, style, context) {
55546
56163
  if (style[key2] === void 0 && raw !== void 0 && raw !== null) {
55547
56164
  const v = parseInt(String(raw), 10);
55548
56165
  if (Number.isFinite(v) && v >= 0) {
55549
- style[key2] = Math.round(v / context.emuPerPx);
56166
+ style[key2] = v / context.emuPerPx;
55550
56167
  hasStyle = true;
55551
56168
  }
55552
56169
  }
@@ -55842,6 +56459,10 @@ function applyRunProperties(run, runProperties2, context) {
55842
56459
  if (fontFamily) {
55843
56460
  run.fontFamily = fontFamily;
55844
56461
  }
56462
+ const baseline = parseInt(String(runProperties2["@_baseline"] ?? ""), 10);
56463
+ if (Number.isFinite(baseline) && baseline !== 0) {
56464
+ run.baseline = baseline;
56465
+ }
55845
56466
  }
55846
56467
  function extractTableCellTextRuns(tableCell, context) {
55847
56468
  const paragraphs = context.ensureArray(
@@ -84100,7 +84721,7 @@ function parseEmbeddedFontList(presentationData) {
84100
84721
  };
84101
84722
  }
84102
84723
  function applyAttribute(node, name, value) {
84103
- const key2 = findKey13(node, name);
84724
+ const key2 = findKey14(node, name);
84104
84725
  if (value === null) {
84105
84726
  if (key2) {
84106
84727
  delete node[key2];
@@ -84148,7 +84769,7 @@ function serializeEntry(entry) {
84148
84769
  }
84149
84770
  for (const name of ENTRY_ORDER) {
84150
84771
  const edit = edits.get(name);
84151
- const key2 = findKey13(source, name) ?? `p:${name}`;
84772
+ const key2 = findKey14(source, name) ?? `p:${name}`;
84152
84773
  if (edit !== null && edit !== void 0) {
84153
84774
  result[key2] = edit;
84154
84775
  } else if (!edits.has(name) && source[key2] !== void 0) {
@@ -84167,7 +84788,7 @@ function serializeEmbeddedFontList(list2) {
84167
84788
  throw new Error("CT_EmbeddedFontList requires at least one embeddedFont");
84168
84789
  }
84169
84790
  const source = { ...list2.rawXml ?? {} };
84170
- const key2 = findKey13(source, "embeddedFont") ?? "p:embeddedFont";
84791
+ const key2 = findKey14(source, "embeddedFont") ?? "p:embeddedFont";
84171
84792
  source[key2] = list2.fonts.map(serializeEntry);
84172
84793
  return source;
84173
84794
  }
@@ -84177,7 +84798,7 @@ function setEmbeddedFontList(presentationData, list2) {
84177
84798
  return;
84178
84799
  }
84179
84800
  const root = presentationData[rootKey];
84180
- const existingKey = findKey13(root, "embeddedFontLst");
84801
+ const existingKey = findKey14(root, "embeddedFontLst");
84181
84802
  const result = {};
84182
84803
  let inserted = false;
84183
84804
  for (const [key2, value] of Object.entries(root)) {
@@ -84196,7 +84817,7 @@ function setEmbeddedFontList(presentationData, list2) {
84196
84817
  }
84197
84818
  presentationData[rootKey] = result;
84198
84819
  }
84199
- var ENTRY_ORDER, PRESENTATION_BEFORE, localName16, findKey13, child16, children11;
84820
+ var ENTRY_ORDER, PRESENTATION_BEFORE, localName16, findKey14, child16, children11;
84200
84821
  var init_embedded_font_list = __esm({
84201
84822
  "src/pptx/core/utils/embedded-font-list.ts"() {
84202
84823
  ENTRY_ORDER = ["font", "regular", "bold", "italic", "boldItalic"];
@@ -84210,13 +84831,13 @@ var init_embedded_font_list = __esm({
84210
84831
  "smartTags"
84211
84832
  ]);
84212
84833
  localName16 = (key2) => key2.replace(/^@_/u, "").replace(/^.*:/u, "");
84213
- findKey13 = (node, name) => Object.keys(node).find((key2) => localName16(key2) === name);
84834
+ findKey14 = (node, name) => Object.keys(node).find((key2) => localName16(key2) === name);
84214
84835
  child16 = (node, name) => {
84215
- const key2 = findKey13(node, name);
84836
+ const key2 = findKey14(node, name);
84216
84837
  return key2 ? node[key2] : void 0;
84217
84838
  };
84218
84839
  children11 = (node, name) => {
84219
- const key2 = findKey13(node, name);
84840
+ const key2 = findKey14(node, name);
84220
84841
  const value = key2 ? node[key2] : void 0;
84221
84842
  return Array.isArray(value) ? value : value ? [value] : [];
84222
84843
  };
@@ -84731,7 +85352,7 @@ function parseChartBandFmts(seriesContainer, xmlLookup, colorParser) {
84731
85352
  return result.length > 0 ? result : void 0;
84732
85353
  }
84733
85354
  function setOrdered3(node, name, value, order, localName28) {
84734
- const key2 = findKey14(node, name, localName28);
85355
+ const key2 = findKey15(node, name, localName28);
84735
85356
  if (key2) {
84736
85357
  node[key2] = value;
84737
85358
  return;
@@ -84754,7 +85375,7 @@ function applyChartBandFmts(seriesContainer, bandFmts, localName28, resolveColor
84754
85375
  if (bandFmts === void 0) {
84755
85376
  return;
84756
85377
  }
84757
- const containerKey = findKey14(seriesContainer, "bandFmts", localName28);
85378
+ const containerKey = findKey15(seriesContainer, "bandFmts", localName28);
84758
85379
  if (bandFmts.length === 0) {
84759
85380
  if (containerKey) {
84760
85381
  delete seriesContainer[containerKey];
@@ -84762,11 +85383,11 @@ function applyChartBandFmts(seriesContainer, bandFmts, localName28, resolveColor
84762
85383
  return;
84763
85384
  }
84764
85385
  const bandFmtsNode = containerKey ? seriesContainer[containerKey] : void 0;
84765
- const bandFmtKey = bandFmtsNode ? findKey14(bandFmtsNode, "bandFmt", localName28) : void 0;
85386
+ const bandFmtKey = bandFmtsNode ? findKey15(bandFmtsNode, "bandFmt", localName28) : void 0;
84766
85387
  const existingRaw = bandFmtKey ? bandFmtsNode?.[bandFmtKey] : void 0;
84767
85388
  const existingNodes = existingRaw ? Array.isArray(existingRaw) ? existingRaw : [existingRaw] : [];
84768
85389
  const bandIndexOf = (node) => {
84769
- const idxKey = findKey14(node, "idx", localName28);
85390
+ const idxKey = findKey15(node, "idx", localName28);
84770
85391
  return idxKey ? safeUnsignedInt2(node[idxKey]?.["@_val"]) : void 0;
84771
85392
  };
84772
85393
  const byIndex = new Map(existingNodes.map((node) => [bandIndexOf(node), node]));
@@ -84778,7 +85399,7 @@ function applyChartBandFmts(seriesContainer, bandFmts, localName28, resolveColor
84778
85399
  updated.push(node);
84779
85400
  }
84780
85401
  if (band.spPr) {
84781
- const spPrKey = findKey14(node, "spPr", localName28);
85402
+ const spPrKey = findKey15(node, "spPr", localName28);
84782
85403
  const spPr = writeChartShapeProps(
84783
85404
  spPrKey ? node[spPrKey] : void 0,
84784
85405
  band.spPr,
@@ -84796,12 +85417,12 @@ function applyChartBandFmts(seriesContainer, bandFmts, localName28, resolveColor
84796
85417
  localName28
84797
85418
  );
84798
85419
  }
84799
- var findKey14;
85420
+ var findKey15;
84800
85421
  var init_chart_band_fmts = __esm({
84801
85422
  "src/pptx/core/utils/chart-band-fmts.ts"() {
84802
85423
  init_chart_series_detail_parser();
84803
85424
  init_chart_shape_props_writer();
84804
- findKey14 = (node, name, localName28) => Object.keys(node).find((key2) => localName28(key2) === name);
85425
+ findKey15 = (node, name, localName28) => Object.keys(node).find((key2) => localName28(key2) === name);
84805
85426
  }
84806
85427
  });
84807
85428
 
@@ -84851,142 +85472,6 @@ var init_chart_blank_values = __esm({
84851
85472
  }
84852
85473
  });
84853
85474
 
84854
- // src/pptx/core/utils/chart-container-content-model.ts
84855
- function chartTypeToContainerLocalName(chartType) {
84856
- return TYPE_TO_CONTAINER[chartType];
84857
- }
84858
- function isKnownChartContainer(containerLocal) {
84859
- return containerLocal in CHART_CONTAINER_CHILD_ORDER;
84860
- }
84861
- function chartContainerAllows(containerLocal, childLocal) {
84862
- const order = CHART_CONTAINER_CHILD_ORDER[containerLocal];
84863
- return order !== void 0 && order.includes(childLocal);
84864
- }
84865
- var CHART_CONTAINER_CHILD_ORDER, REQUIRED_LEADING_CHILD, TYPE_TO_CONTAINER, AXIS_LOCAL_NAMES;
84866
- var init_chart_container_content_model = __esm({
84867
- "src/pptx/core/utils/chart-container-content-model.ts"() {
84868
- CHART_CONTAINER_CHILD_ORDER = {
84869
- areaChart: ["grouping", "varyColors", "ser", "dLbls", "dropLines", "axId", "extLst"],
84870
- area3DChart: [
84871
- "grouping",
84872
- "varyColors",
84873
- "ser",
84874
- "dLbls",
84875
- "dropLines",
84876
- "gapDepth",
84877
- "axId",
84878
- "extLst"
84879
- ],
84880
- barChart: [
84881
- "barDir",
84882
- "grouping",
84883
- "varyColors",
84884
- "ser",
84885
- "dLbls",
84886
- "gapWidth",
84887
- "overlap",
84888
- "serLines",
84889
- "axId",
84890
- "extLst"
84891
- ],
84892
- bar3DChart: [
84893
- "barDir",
84894
- "grouping",
84895
- "varyColors",
84896
- "ser",
84897
- "dLbls",
84898
- "gapWidth",
84899
- "gapDepth",
84900
- "shape",
84901
- "axId",
84902
- "extLst"
84903
- ],
84904
- bubbleChart: [
84905
- "varyColors",
84906
- "ser",
84907
- "dLbls",
84908
- "bubble3D",
84909
- "bubbleScale",
84910
- "showNegBubbles",
84911
- "sizeRepresents",
84912
- "axId",
84913
- "extLst"
84914
- ],
84915
- doughnutChart: ["varyColors", "ser", "dLbls", "firstSliceAng", "holeSize", "extLst"],
84916
- lineChart: [
84917
- "grouping",
84918
- "varyColors",
84919
- "ser",
84920
- "dLbls",
84921
- "dropLines",
84922
- "hiLowLines",
84923
- "upDownBars",
84924
- "marker",
84925
- "smooth",
84926
- "axId",
84927
- "extLst"
84928
- ],
84929
- line3DChart: [
84930
- "grouping",
84931
- "varyColors",
84932
- "ser",
84933
- "dLbls",
84934
- "dropLines",
84935
- "gapDepth",
84936
- "axId",
84937
- "extLst"
84938
- ],
84939
- ofPieChart: [
84940
- "ofPieType",
84941
- "varyColors",
84942
- "ser",
84943
- "dLbls",
84944
- "gapWidth",
84945
- "splitType",
84946
- "splitPos",
84947
- "custSplit",
84948
- "secondPieSize",
84949
- "serLines",
84950
- "extLst"
84951
- ],
84952
- pieChart: ["varyColors", "ser", "dLbls", "firstSliceAng", "extLst"],
84953
- pie3DChart: ["varyColors", "ser", "dLbls", "extLst"],
84954
- radarChart: ["radarStyle", "varyColors", "ser", "dLbls", "axId", "extLst"],
84955
- scatterChart: ["scatterStyle", "varyColors", "ser", "dLbls", "axId", "extLst"],
84956
- stockChart: ["ser", "dLbls", "dropLines", "hiLowLines", "upDownBars", "axId", "extLst"],
84957
- surfaceChart: ["wireframe", "ser", "bandFmts", "axId", "extLst"],
84958
- surface3DChart: ["wireframe", "ser", "bandFmts", "axId", "extLst"]
84959
- };
84960
- REQUIRED_LEADING_CHILD = {
84961
- barChart: { local: "barDir", val: "col" },
84962
- bar3DChart: { local: "barDir", val: "col" },
84963
- lineChart: { local: "grouping", val: "standard" },
84964
- line3DChart: { local: "grouping", val: "standard" },
84965
- ofPieChart: { local: "ofPieType", val: "pie" },
84966
- radarChart: { local: "radarStyle", val: "marker" },
84967
- scatterChart: { local: "scatterStyle", val: "lineMarker" }
84968
- };
84969
- TYPE_TO_CONTAINER = {
84970
- area: "areaChart",
84971
- area3D: "area3DChart",
84972
- bar: "barChart",
84973
- bar3D: "bar3DChart",
84974
- bubble: "bubbleChart",
84975
- doughnut: "doughnutChart",
84976
- line: "lineChart",
84977
- line3D: "line3DChart",
84978
- ofPie: "ofPieChart",
84979
- pie: "pieChart",
84980
- pie3D: "pie3DChart",
84981
- radar: "radarChart",
84982
- scatter: "scatterChart",
84983
- stock: "stockChart",
84984
- surface: "surfaceChart"
84985
- };
84986
- AXIS_LOCAL_NAMES = ["catAx", "valAx", "dateAx", "serAx"];
84987
- }
84988
- });
84989
-
84990
85475
  // src/pptx/core/utils/chart-container-type-map.ts
84991
85476
  function chartContainerLocalNameToType(localName28) {
84992
85477
  return CONTAINER_LOCAL_NAME_TO_TYPE[localName28];
@@ -85046,7 +85531,7 @@ var init_chart_date_categories = __esm({
85046
85531
  });
85047
85532
 
85048
85533
  // src/pptx/core/utils/chart-filtered-series.ts
85049
- function localNameOf9(key2) {
85534
+ function localNameOf10(key2) {
85050
85535
  return key2.replace(/^.*:/u, "");
85051
85536
  }
85052
85537
  function scalarChild(parent, name, xmlLookup) {
@@ -85126,7 +85611,7 @@ function parseOneFilteredSeries(node, xmlLookup) {
85126
85611
  if (values.length > 0) {
85127
85612
  result.values = values;
85128
85613
  }
85129
- const uniqueId = parseChartUniqueId(node, localNameOf9);
85614
+ const uniqueId = parseChartUniqueId(node, localNameOf10);
85130
85615
  if (uniqueId) {
85131
85616
  result.uniqueId = uniqueId;
85132
85617
  }
@@ -85144,7 +85629,7 @@ function parseFilteredSeries(container2, xmlLookup) {
85144
85629
  if (!ext) {
85145
85630
  return void 0;
85146
85631
  }
85147
- const wrapperKey = Object.keys(ext).find((key2) => /^filtered.*series$/iu.test(localNameOf9(key2)));
85632
+ const wrapperKey = Object.keys(ext).find((key2) => /^filtered.*series$/iu.test(localNameOf10(key2)));
85148
85633
  if (!wrapperKey) {
85149
85634
  return void 0;
85150
85635
  }
@@ -89032,7 +89517,7 @@ function parsePrintProperties(node) {
89032
89517
  };
89033
89518
  }
89034
89519
  function applyAttribute2(node, name, value) {
89035
- const existingKey = findKey15(node, name);
89520
+ const existingKey = findKey16(node, name);
89036
89521
  if (value === null) {
89037
89522
  if (existingKey) {
89038
89523
  delete node[existingKey];
@@ -89067,14 +89552,14 @@ function serializePrintProperties(properties) {
89067
89552
  result[key2] = value;
89068
89553
  }
89069
89554
  }
89070
- const extKey = findKey15(source, "extLst");
89555
+ const extKey = findKey16(source, "extLst");
89071
89556
  if (extKey) {
89072
89557
  result[extKey] = source[extKey];
89073
89558
  }
89074
89559
  return result;
89075
89560
  }
89076
89561
  function findChildByLocalName2(parent, name) {
89077
- const key2 = findKey15(parent, name);
89562
+ const key2 = findKey16(parent, name);
89078
89563
  return key2 ? parent[key2] : void 0;
89079
89564
  }
89080
89565
  function setPresentationPropertiesChild(root, name, value) {
@@ -89113,7 +89598,7 @@ function slidesPerPageToPrintOutput(value) {
89113
89598
  }
89114
89599
  return `handouts${value}`;
89115
89600
  }
89116
- var PRINT_OUTPUTS, COLOR_MODES, ROOT_ORDER, localName20, findKey15;
89601
+ var PRINT_OUTPUTS, COLOR_MODES, ROOT_ORDER, localName20, findKey16;
89117
89602
  var init_pptx_print_properties = __esm({
89118
89603
  "src/pptx/core/core/runtime/pptx-print-properties.ts"() {
89119
89604
  PRINT_OUTPUTS = /* @__PURE__ */ new Set([
@@ -89130,7 +89615,7 @@ var init_pptx_print_properties = __esm({
89130
89615
  COLOR_MODES = /* @__PURE__ */ new Set(["bw", "gray", "clr"]);
89131
89616
  ROOT_ORDER = ["htmlPubPr", "webPr", "prnPr", "showPr", "clrMru", "extLst"];
89132
89617
  localName20 = (key2) => key2.replace(/^@_/u, "").replace(/^.*:/u, "");
89133
- findKey15 = (node, name) => Object.keys(node).find((key2) => localName20(key2) === name);
89618
+ findKey16 = (node, name) => Object.keys(node).find((key2) => localName20(key2) === name);
89134
89619
  }
89135
89620
  });
89136
89621
 
@@ -94621,7 +95106,7 @@ var init_chart_cx_generator = __esm({
94621
95106
  });
94622
95107
 
94623
95108
  // src/pptx/core/utils/chart-data-labels-serializer.ts
94624
- function findKey16(obj, local, getLocalName2) {
95109
+ function findKey17(obj, local, getLocalName2) {
94625
95110
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
94626
95111
  }
94627
95112
  function boolVal(on) {
@@ -94695,7 +95180,7 @@ function applyChartDataLabelsToXml(plotArea, style, getLocalName2) {
94695
95180
  if (!container2 || typeof container2 !== "object") {
94696
95181
  continue;
94697
95182
  }
94698
- const existingKey = findKey16(container2, "dLbls", getLocalName2);
95183
+ const existingKey = findKey17(container2, "dLbls", getLocalName2);
94699
95184
  if (style.hasDataLabels === false) {
94700
95185
  const existing2 = existingKey ? container2[existingKey] : void 0;
94701
95186
  const off = ordered3(existing2, { "c:delete": { "@_val": "1" } }, getLocalName2);
@@ -94773,11 +95258,11 @@ var init_chart_data_labels_serializer = __esm({
94773
95258
  });
94774
95259
 
94775
95260
  // src/pptx/core/utils/chart-data-table.ts
94776
- function findKey17(node, name, localName28) {
95261
+ function findKey18(node, name, localName28) {
94777
95262
  return Object.keys(node).find((key2) => localName28(key2) === name);
94778
95263
  }
94779
95264
  function setOrdered4(node, name, value, order, localName28) {
94780
- const existingKey = findKey17(node, name, localName28);
95265
+ const existingKey = findKey18(node, name, localName28);
94781
95266
  if (existingKey) {
94782
95267
  node[existingKey] = value;
94783
95268
  return;
@@ -94800,7 +95285,7 @@ function applyChartDataTable(plotArea, dataTable, localName28, resolveColor2) {
94800
95285
  if (dataTable === void 0) {
94801
95286
  return;
94802
95287
  }
94803
- const tableKey = findKey17(plotArea, "dTable", localName28);
95288
+ const tableKey = findKey18(plotArea, "dTable", localName28);
94804
95289
  if (dataTable === null) {
94805
95290
  if (tableKey) {
94806
95291
  delete plotArea[tableKey];
@@ -94817,7 +95302,7 @@ function applyChartDataTable(plotArea, dataTable, localName28, resolveColor2) {
94817
95302
  }
94818
95303
  }
94819
95304
  if (dataTable.spPr) {
94820
- const spPrKey = findKey17(table, "spPr", localName28);
95305
+ const spPrKey = findKey18(table, "spPr", localName28);
94821
95306
  const spPr = writeChartShapeProps(
94822
95307
  spPrKey ? table[spPrKey] : void 0,
94823
95308
  dataTable.spPr,
@@ -94827,13 +95312,13 @@ function applyChartDataTable(plotArea, dataTable, localName28, resolveColor2) {
94827
95312
  setOrdered4(table, "spPr", spPr, TABLE_ORDER, localName28);
94828
95313
  }
94829
95314
  if (dataTable.txPr) {
94830
- const txPrKey = findKey17(table, "txPr", localName28);
95315
+ const txPrKey = findKey18(table, "txPr", localName28);
94831
95316
  const authoredDefRPr = resolveTxPrDefRPr(txPrKey ? table[txPrKey] : void 0, {
94832
95317
  getChildByLocalName: (parent, name) => {
94833
95318
  if (!parent) {
94834
95319
  return void 0;
94835
95320
  }
94836
- const key2 = findKey17(parent, name, localName28);
95321
+ const key2 = findKey18(parent, name, localName28);
94837
95322
  return key2 ? parent[key2] : void 0;
94838
95323
  }
94839
95324
  });
@@ -94893,7 +95378,7 @@ var init_chart_data_table = __esm({
94893
95378
  });
94894
95379
 
94895
95380
  // src/pptx/core/utils/chart-errbars-serializer.ts
94896
- function findKey18(obj, local, getLocalName2) {
95381
+ function findKey19(obj, local, getLocalName2) {
94897
95382
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
94898
95383
  }
94899
95384
  function ensureArray13(v) {
@@ -94936,7 +95421,7 @@ function buildErrBars(existing, e, getLocalName2, resolveColor2) {
94936
95421
  if (e.noEndCap !== void 0) {
94937
95422
  node["c:noEndCap"] = { "@_val": e.noEndCap ? "1" : "0" };
94938
95423
  } else if (existing) {
94939
- const noEndCapKey = findKey18(existing, "noEndCap", getLocalName2);
95424
+ const noEndCapKey = findKey19(existing, "noEndCap", getLocalName2);
94940
95425
  if (noEndCapKey) {
94941
95426
  node["c:noEndCap"] = existing[noEndCapKey];
94942
95427
  }
@@ -94951,7 +95436,7 @@ function buildErrBars(existing, e, getLocalName2, resolveColor2) {
94951
95436
  } else if (e.val !== void 0) {
94952
95437
  node["c:val"] = { "@_val": String(e.val) };
94953
95438
  }
94954
- const spPrKey = existing ? findKey18(existing, "spPr", getLocalName2) : void 0;
95439
+ const spPrKey = existing ? findKey19(existing, "spPr", getLocalName2) : void 0;
94955
95440
  const existingSpPr = spPrKey ? existing?.[spPrKey] : void 0;
94956
95441
  if (e.color || e.width !== void 0 || e.dashStyle) {
94957
95442
  node["c:spPr"] = buildSpPr(existingSpPr, e, getLocalName2, resolveColor2);
@@ -94959,7 +95444,7 @@ function buildErrBars(existing, e, getLocalName2, resolveColor2) {
94959
95444
  node["c:spPr"] = existingSpPr;
94960
95445
  }
94961
95446
  if (existing) {
94962
- const extKey = findKey18(existing, "extLst", getLocalName2);
95447
+ const extKey = findKey19(existing, "extLst", getLocalName2);
94963
95448
  if (extKey) {
94964
95449
  node["c:extLst"] = existing[extKey];
94965
95450
  }
@@ -94967,7 +95452,7 @@ function buildErrBars(existing, e, getLocalName2, resolveColor2) {
94967
95452
  return node;
94968
95453
  }
94969
95454
  function applySeriesErrBarsToXml(seriesNode, errBars, getLocalName2, resolveColor2) {
94970
- const existingKey = findKey18(seriesNode, "errBars", getLocalName2);
95455
+ const existingKey = findKey19(seriesNode, "errBars", getLocalName2);
94971
95456
  const existingNodes = existingKey ? ensureArray13(seriesNode[existingKey]) : [];
94972
95457
  const built = errBars.map(
94973
95458
  (e, i) => buildErrBars(existingNodes[i], e, getLocalName2, resolveColor2)
@@ -95001,7 +95486,7 @@ var init_chart_errbars_serializer = __esm({
95001
95486
  });
95002
95487
 
95003
95488
  // src/pptx/core/utils/chart-series-datalabel-build.ts
95004
- function findKey19(obj, local, getLocalName2) {
95489
+ function findKey20(obj, local, getLocalName2) {
95005
95490
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
95006
95491
  }
95007
95492
  function boolVal2(on) {
@@ -95050,7 +95535,7 @@ function buildDLbl(existing, label, getLocalName2, resolveColor2) {
95050
95535
  node["c:delete"] = { "@_val": "0" };
95051
95536
  }
95052
95537
  if (existing && label.layout === void 0) {
95053
- const layoutKey = findKey19(existing, "layout", getLocalName2);
95538
+ const layoutKey = findKey20(existing, "layout", getLocalName2);
95054
95539
  if (layoutKey) {
95055
95540
  node[layoutKey] = existing[layoutKey];
95056
95541
  }
@@ -95069,7 +95554,7 @@ function buildDLbl(existing, label, getLocalName2, resolveColor2) {
95069
95554
  }
95070
95555
  };
95071
95556
  } else if (existing) {
95072
- const txKey = findKey19(existing, "tx", getLocalName2);
95557
+ const txKey = findKey20(existing, "tx", getLocalName2);
95073
95558
  if (txKey) {
95074
95559
  node[txKey] = existing[txKey];
95075
95560
  }
@@ -95085,7 +95570,7 @@ function buildDLbl(existing, label, getLocalName2, resolveColor2) {
95085
95570
  if (local === "txPr" && label.txPr !== void 0) {
95086
95571
  continue;
95087
95572
  }
95088
- const k = findKey19(existing, local, getLocalName2);
95573
+ const k = findKey20(existing, local, getLocalName2);
95089
95574
  if (k) {
95090
95575
  node[k] = existing[k];
95091
95576
  }
@@ -95097,15 +95582,15 @@ function buildDLbl(existing, label, getLocalName2, resolveColor2) {
95097
95582
  }
95098
95583
  if (label.spPr !== void 0) {
95099
95584
  replaced.add("spPr");
95100
- const existingSpPr = existing ? existing[findKey19(existing, "spPr", getLocalName2) ?? ""] : void 0;
95585
+ const existingSpPr = existing ? existing[findKey20(existing, "spPr", getLocalName2) ?? ""] : void 0;
95101
95586
  node["c:spPr"] = writeChartShapeProps(existingSpPr, label.spPr, getLocalName2, resolveColor2);
95102
95587
  }
95103
95588
  if (label.txPr !== void 0) {
95104
95589
  replaced.add("txPr");
95105
- const existingTxPr = existing ? existing[findKey19(existing, "txPr", getLocalName2) ?? ""] : void 0;
95106
- const paragraph = existingTxPr ? existingTxPr[findKey19(existingTxPr, "p", getLocalName2) ?? ""] : void 0;
95107
- const pPr = paragraph ? paragraph[findKey19(paragraph, "pPr", getLocalName2) ?? ""] : void 0;
95108
- const authoredDefRPr = pPr ? pPr[findKey19(pPr, "defRPr", getLocalName2) ?? ""] : void 0;
95590
+ const existingTxPr = existing ? existing[findKey20(existing, "txPr", getLocalName2) ?? ""] : void 0;
95591
+ const paragraph = existingTxPr ? existingTxPr[findKey20(existingTxPr, "p", getLocalName2) ?? ""] : void 0;
95592
+ const pPr = paragraph ? paragraph[findKey20(paragraph, "pPr", getLocalName2) ?? ""] : void 0;
95593
+ const authoredDefRPr = pPr ? pPr[findKey20(pPr, "defRPr", getLocalName2) ?? ""] : void 0;
95109
95594
  const txPr = buildDefRPrTextProperties(label.txPr, authoredDefRPr, resolveColor2);
95110
95595
  if (txPr) {
95111
95596
  node["c:txPr"] = txPr;
@@ -95175,17 +95660,17 @@ var init_chart_series_datalabel_build = __esm({
95175
95660
 
95176
95661
  // src/pptx/core/utils/chart-series-datalabel-serializer.ts
95177
95662
  function applySeriesDataLabelsToXml(seriesNode, dataLabels, getLocalName2, resolveColor2) {
95178
- const dLblsKey = findKey19(seriesNode, "dLbls", getLocalName2);
95663
+ const dLblsKey = findKey20(seriesNode, "dLbls", getLocalName2);
95179
95664
  const labels = dataLabels ?? [];
95180
95665
  const existingByIdx = /* @__PURE__ */ new Map();
95181
95666
  let groupChildren = [];
95182
95667
  if (dLblsKey) {
95183
95668
  const dLbls = seriesNode[dLblsKey];
95184
- const dLblKey = findKey19(dLbls, "dLbl", getLocalName2);
95669
+ const dLblKey = findKey20(dLbls, "dLbl", getLocalName2);
95185
95670
  if (dLblKey) {
95186
95671
  const nodes = Array.isArray(dLbls[dLblKey]) ? dLbls[dLblKey] : [dLbls[dLblKey]];
95187
95672
  for (const node of nodes) {
95188
- const idxKey = findKey19(node, "idx", getLocalName2);
95673
+ const idxKey = findKey20(node, "idx", getLocalName2);
95189
95674
  const idxNode = idxKey ? node[idxKey] : void 0;
95190
95675
  const idx = idxNode ? Number.parseInt(String(idxNode["@_val"]), 10) : NaN;
95191
95676
  if (Number.isFinite(idx)) {
@@ -95274,7 +95759,7 @@ var init_chart_space_metadata = __esm({
95274
95759
  });
95275
95760
 
95276
95761
  // src/pptx/core/utils/chart-trendline-serializer.ts
95277
- function findKey20(obj, local, getLocalName2) {
95762
+ function findKey21(obj, local, getLocalName2) {
95278
95763
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
95279
95764
  }
95280
95765
  function ensureArray14(v) {
@@ -95313,14 +95798,14 @@ function buildSpPr2(existing, t, getLocalName2, resolveColor2) {
95313
95798
  function buildTrendline(existing, t, getLocalName2, resolveColor2) {
95314
95799
  validateTrendline(t);
95315
95800
  const node = {};
95316
- const existingNameKey = existing ? findKey20(existing, "name", getLocalName2) : void 0;
95801
+ const existingNameKey = existing ? findKey21(existing, "name", getLocalName2) : void 0;
95317
95802
  if (t.name !== void 0) {
95318
95803
  node["c:name"] = t.name;
95319
95804
  } else if (existing && existingNameKey) {
95320
95805
  node["c:name"] = existing[existingNameKey];
95321
95806
  }
95322
95807
  const spPr = buildSpPr2(
95323
- existing ? existing[findKey20(existing, "spPr", getLocalName2) ?? ""] : void 0,
95808
+ existing ? existing[findKey21(existing, "spPr", getLocalName2) ?? ""] : void 0,
95324
95809
  t,
95325
95810
  getLocalName2,
95326
95811
  resolveColor2
@@ -95350,7 +95835,7 @@ function buildTrendline(existing, t, getLocalName2, resolveColor2) {
95350
95835
  if (t.displayEq !== void 0) {
95351
95836
  node["c:dispEq"] = { "@_val": t.displayEq ? "1" : "0" };
95352
95837
  }
95353
- const lblKey = existing ? findKey20(existing, "trendlineLbl", getLocalName2) : void 0;
95838
+ const lblKey = existing ? findKey21(existing, "trendlineLbl", getLocalName2) : void 0;
95354
95839
  if (t.label) {
95355
95840
  node["c:trendlineLbl"] = buildTrendlineLabel(
95356
95841
  lblKey ? existing?.[lblKey] : void 0,
@@ -95361,7 +95846,7 @@ function buildTrendline(existing, t, getLocalName2, resolveColor2) {
95361
95846
  node["c:trendlineLbl"] = existing[lblKey];
95362
95847
  }
95363
95848
  if (existing) {
95364
- const extKey = findKey20(existing, "extLst", getLocalName2);
95849
+ const extKey = findKey21(existing, "extLst", getLocalName2);
95365
95850
  if (extKey) {
95366
95851
  node["c:extLst"] = existing[extKey];
95367
95852
  }
@@ -95369,7 +95854,7 @@ function buildTrendline(existing, t, getLocalName2, resolveColor2) {
95369
95854
  return node;
95370
95855
  }
95371
95856
  function applySeriesTrendlinesToXml(seriesNode, trendlines, getLocalName2, resolveColor2) {
95372
- const existingKey = findKey20(seriesNode, "trendline", getLocalName2);
95857
+ const existingKey = findKey21(seriesNode, "trendline", getLocalName2);
95373
95858
  const existingNodes = existingKey ? ensureArray14(seriesNode[existingKey]) : [];
95374
95859
  const built = trendlines.map(
95375
95860
  (t, i) => buildTrendline(existingNodes[i], t, getLocalName2, resolveColor2)
@@ -95412,11 +95897,292 @@ var init_chart_trendline_serializer = __esm({
95412
95897
  }
95413
95898
  });
95414
95899
 
95900
+ // src/pptx/core/utils/chart-area-format.ts
95901
+ function findKey22(obj, local, getLocalName2) {
95902
+ return Object.keys(obj).find((key2) => getLocalName2(key2) === local);
95903
+ }
95904
+ function asObject(value) {
95905
+ return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
95906
+ }
95907
+ function parsePaint(node, getLocalName2, resolveColor2) {
95908
+ if (!node) {
95909
+ return void 0;
95910
+ }
95911
+ if (findKey22(node, "noFill", getLocalName2) !== void 0) {
95912
+ return "none";
95913
+ }
95914
+ const solid = asObject(node[findKey22(node, "solidFill", getLocalName2) ?? ""]);
95915
+ return solid ? resolveColor2(solid) : void 0;
95916
+ }
95917
+ function parseChartAreaFormat(owner, getLocalName2, resolveColor2, parseGradient) {
95918
+ const spPr = owner ? asObject(owner[findKey22(owner, "spPr", getLocalName2) ?? ""]) : void 0;
95919
+ if (!spPr) {
95920
+ return {};
95921
+ }
95922
+ const format = {};
95923
+ const fill = parsePaint(spPr, getLocalName2, resolveColor2);
95924
+ if (fill !== void 0) {
95925
+ format.fill = fill;
95926
+ }
95927
+ const gradient = parseGradient?.(spPr);
95928
+ if (gradient) {
95929
+ format.gradient = gradient;
95930
+ }
95931
+ const ln = asObject(spPr[findKey22(spPr, "ln", getLocalName2) ?? ""]);
95932
+ const border = parsePaint(ln, getLocalName2, resolveColor2);
95933
+ if (border !== void 0) {
95934
+ format.border = border;
95935
+ }
95936
+ return format;
95937
+ }
95938
+ function paintXml(paint) {
95939
+ return paint === "none" ? { "a:noFill": {} } : { "a:solidFill": { "a:srgbClr": { "@_val": chartColorHex(paint) } } };
95940
+ }
95941
+ function buildChartAreaSpPr(format) {
95942
+ const spPr = {};
95943
+ if (format.gradient) {
95944
+ spPr["a:gradFill"] = buildChartGradFillXml(format.gradient);
95945
+ } else if (format.fill !== void 0) {
95946
+ Object.assign(spPr, paintXml(format.fill));
95947
+ }
95948
+ if (format.border !== void 0) {
95949
+ spPr["a:ln"] = paintXml(format.border);
95950
+ }
95951
+ return Object.keys(spPr).length > 0 ? spPr : void 0;
95952
+ }
95953
+ function samePaint(a, b) {
95954
+ if (a === void 0 || b === void 0 || a === "none" || b === "none") {
95955
+ return a === b;
95956
+ }
95957
+ return colorsEqual(a, b);
95958
+ }
95959
+ function sameFill(model, authored) {
95960
+ if (model.gradient || authored.gradient) {
95961
+ return Boolean(
95962
+ model.gradient && authored.gradient && chartGradientsEqual(model.gradient, authored.gradient)
95963
+ );
95964
+ }
95965
+ return samePaint(model.fill, authored.fill);
95966
+ }
95967
+ function setPaint(node, entry, choices, after, getLocalName2) {
95968
+ const entries = Object.entries(node).filter(([key2]) => !choices.has(getLocalName2(key2)));
95969
+ if (entry) {
95970
+ const at2 = entries.findIndex(([key2]) => after.has(getLocalName2(key2)));
95971
+ entries.splice(at2 === -1 ? entries.length : at2, 0, entry);
95972
+ }
95973
+ for (const key2 of Object.keys(node)) {
95974
+ delete node[key2];
95975
+ }
95976
+ for (const [key2, value] of entries) {
95977
+ node[key2] = value;
95978
+ }
95979
+ }
95980
+ function paintEntry(paint, authored, getLocalName2, resolveColor2) {
95981
+ if (paint === void 0) {
95982
+ return void 0;
95983
+ }
95984
+ if (paint === "none") {
95985
+ return ["a:noFill", {}];
95986
+ }
95987
+ const solid = asObject(authored[findKey22(authored, "solidFill", getLocalName2) ?? ""]);
95988
+ return ["a:solidFill", chartColorChoiceValue(solid, paint, resolveColor2)];
95989
+ }
95990
+ function applyChartAreaFormatToXml(owner, format, getLocalName2, options) {
95991
+ const authored = parseChartAreaFormat(
95992
+ owner,
95993
+ getLocalName2,
95994
+ options.resolveColor,
95995
+ options.parseGradient
95996
+ );
95997
+ const fillChanged = !sameFill(format, authored);
95998
+ const borderChanged = !samePaint(format.border, authored.border);
95999
+ if (!fillChanged && !borderChanged) {
96000
+ return false;
96001
+ }
96002
+ let spPr = asObject(owner[findKey22(owner, "spPr", getLocalName2) ?? ""]);
96003
+ if (!spPr) {
96004
+ spPr = {};
96005
+ options.insertSpPr(owner, spPr);
96006
+ }
96007
+ if (fillChanged) {
96008
+ if (format.gradient) {
96009
+ applyChartGradientToSpPr(spPr, format.gradient, getLocalName2, options);
96010
+ } else {
96011
+ const entry = paintEntry(format.fill, spPr, getLocalName2, options.resolveColor);
96012
+ setPaint(spPr, entry, FILL_CHOICE2, /* @__PURE__ */ new Set(["ln", ...AFTER_LN]), getLocalName2);
96013
+ }
96014
+ }
96015
+ if (borderChanged) {
96016
+ const lnKey = findKey22(spPr, "ln", getLocalName2);
96017
+ const ln = asObject(lnKey ? spPr[lnKey] : void 0) ?? {};
96018
+ const entry = paintEntry(format.border, ln, getLocalName2, options.resolveColor);
96019
+ setPaint(
96020
+ ln,
96021
+ entry,
96022
+ LN_FILL_CHOICE,
96023
+ /* @__PURE__ */ new Set(["prstDash", "custDash", "round", "bevel", "miter", "headEnd", "tailEnd", "extLst"]),
96024
+ getLocalName2
96025
+ );
96026
+ if (Object.keys(ln).length === 0) {
96027
+ if (lnKey) {
96028
+ delete spPr[lnKey];
96029
+ }
96030
+ } else if (!lnKey) {
96031
+ setPaint(spPr, ["a:ln", ln], /* @__PURE__ */ new Set(), AFTER_LN, getLocalName2);
96032
+ }
96033
+ }
96034
+ if (Object.keys(spPr).length === 0) {
96035
+ const spPrKey = findKey22(owner, "spPr", getLocalName2);
96036
+ if (spPrKey) {
96037
+ delete owner[spPrKey];
96038
+ }
96039
+ }
96040
+ return true;
96041
+ }
96042
+ var FILL_CHOICE2, AFTER_LN, LN_FILL_CHOICE;
96043
+ var init_chart_area_format = __esm({
96044
+ "src/pptx/core/utils/chart-area-format.ts"() {
96045
+ init_chart_color_choice();
96046
+ init_chart_gradient_fill_writer();
96047
+ init_chart_gradient_fill_xml();
96048
+ init_color_xml_preservation();
96049
+ FILL_CHOICE2 = /* @__PURE__ */ new Set(["noFill", "solidFill", "gradFill", "blipFill", "pattFill", "grpFill"]);
96050
+ AFTER_LN = /* @__PURE__ */ new Set(["effectLst", "effectDag", "scene3d", "sp3d", "extLst"]);
96051
+ LN_FILL_CHOICE = /* @__PURE__ */ new Set(["noFill", "solidFill", "gradFill", "pattFill"]);
96052
+ }
96053
+ });
96054
+
96055
+ // src/pptx/core/utils/chart-space-format.ts
96056
+ function findKey23(obj, local, getLocalName2) {
96057
+ return Object.keys(obj).find((key2) => getLocalName2(key2) === local);
96058
+ }
96059
+ function insertBefore(node, key2, value, after, getLocalName2) {
96060
+ const entries = Object.entries(node);
96061
+ const at2 = entries.findIndex(
96062
+ ([candidate]) => !candidate.startsWith("@_") && after.has(getLocalName2(candidate))
96063
+ );
96064
+ entries.splice(at2 === -1 ? entries.length : at2, 0, [key2, value]);
96065
+ for (const candidate of Object.keys(node)) {
96066
+ delete node[candidate];
96067
+ }
96068
+ for (const [candidate, child27] of entries) {
96069
+ node[candidate] = child27;
96070
+ }
96071
+ }
96072
+ function chartAreaFormatOf(chartData) {
96073
+ const style = chartData.style;
96074
+ return {
96075
+ ...style?.chartAreaFill !== void 0 ? { fill: style.chartAreaFill } : {},
96076
+ ...style?.chartAreaGradient ? { gradient: style.chartAreaGradient } : {},
96077
+ ...style?.chartAreaBorder !== void 0 ? { border: style.chartAreaBorder } : {}
96078
+ };
96079
+ }
96080
+ function plotAreaFormatOf(chartData) {
96081
+ const style = chartData.style;
96082
+ return {
96083
+ ...style?.plotAreaFill !== void 0 ? { fill: style.plotAreaFill } : {},
96084
+ ...style?.plotAreaGradient ? { gradient: style.plotAreaGradient } : {},
96085
+ ...style?.plotAreaBorder !== void 0 ? { border: style.plotAreaBorder } : {}
96086
+ };
96087
+ }
96088
+ function applyGeneratedChartSpaceFormat(tree, chartData) {
96089
+ const chartSpace = tree["c:chartSpace"];
96090
+ if (!chartSpace) {
96091
+ return;
96092
+ }
96093
+ const localName28 = (key2) => key2.replace(/^.*:/u, "");
96094
+ const plotArea = chartSpace["c:chart"]?.["c:plotArea"];
96095
+ const plotSpPr = buildChartAreaSpPr(plotAreaFormatOf(chartData));
96096
+ if (plotArea && plotSpPr) {
96097
+ insertBefore(plotArea, "c:spPr", plotSpPr, /* @__PURE__ */ new Set(["extLst"]), localName28);
96098
+ }
96099
+ const chartSpPr = buildChartAreaSpPr(chartAreaFormatOf(chartData));
96100
+ if (chartSpPr) {
96101
+ insertBefore(chartSpace, "c:spPr", chartSpPr, AFTER_CHART_SPACE_SP_PR, localName28);
96102
+ }
96103
+ if (chartData.roundedCorners !== void 0) {
96104
+ insertBefore(
96105
+ chartSpace,
96106
+ "c:roundedCorners",
96107
+ { "@_val": chartData.roundedCorners ? "1" : "0" },
96108
+ AFTER_ROUNDED_CORNERS,
96109
+ localName28
96110
+ );
96111
+ }
96112
+ }
96113
+ function authoredBool(node) {
96114
+ if (node === void 0) {
96115
+ return void 0;
96116
+ }
96117
+ const val = node && typeof node === "object" ? node["@_val"] : void 0;
96118
+ if (val === void 0 || val === null || val === "") {
96119
+ return true;
96120
+ }
96121
+ return !(val === "0" || val === "false");
96122
+ }
96123
+ function applyChartSpaceFormatToXml(chartSpace, plotArea, chartData, getLocalName2, options) {
96124
+ let changed = false;
96125
+ const roundedKey = findKey23(chartSpace, "roundedCorners", getLocalName2);
96126
+ const authoredRounded = roundedKey ? authoredBool(chartSpace[roundedKey]) : void 0;
96127
+ if (chartData.roundedCorners === void 0) {
96128
+ if (roundedKey) {
96129
+ delete chartSpace[roundedKey];
96130
+ changed = true;
96131
+ }
96132
+ } else if (chartData.roundedCorners !== authoredRounded) {
96133
+ const node = { "@_val": chartData.roundedCorners ? "1" : "0" };
96134
+ if (roundedKey) {
96135
+ chartSpace[roundedKey] = node;
96136
+ } else {
96137
+ insertBefore(chartSpace, "c:roundedCorners", node, AFTER_ROUNDED_CORNERS, getLocalName2);
96138
+ }
96139
+ changed = true;
96140
+ }
96141
+ changed = applyChartAreaFormatToXml(chartSpace, chartAreaFormatOf(chartData), getLocalName2, {
96142
+ ...options,
96143
+ insertSpPr: (owner, spPr) => insertBefore(owner, "c:spPr", spPr, AFTER_CHART_SPACE_SP_PR, getLocalName2)
96144
+ }) || changed;
96145
+ if (plotArea) {
96146
+ changed = applyChartAreaFormatToXml(plotArea, plotAreaFormatOf(chartData), getLocalName2, {
96147
+ ...options,
96148
+ insertSpPr: (owner, spPr) => insertBefore(owner, "c:spPr", spPr, /* @__PURE__ */ new Set(["extLst"]), getLocalName2)
96149
+ }) || changed;
96150
+ }
96151
+ return changed;
96152
+ }
96153
+ var AFTER_ROUNDED_CORNERS, AFTER_CHART_SPACE_SP_PR;
96154
+ var init_chart_space_format = __esm({
96155
+ "src/pptx/core/utils/chart-space-format.ts"() {
96156
+ init_chart_area_format();
96157
+ AFTER_ROUNDED_CORNERS = /* @__PURE__ */ new Set([
96158
+ "AlternateContent",
96159
+ "style",
96160
+ "clrMapOvr",
96161
+ "pivotSource",
96162
+ "protection",
96163
+ "chart",
96164
+ "spPr",
96165
+ "txPr",
96166
+ "externalData",
96167
+ "printSettings",
96168
+ "userShapes",
96169
+ "extLst"
96170
+ ]);
96171
+ AFTER_CHART_SPACE_SP_PR = /* @__PURE__ */ new Set([
96172
+ "txPr",
96173
+ "externalData",
96174
+ "printSettings",
96175
+ "userShapes",
96176
+ "extLst"
96177
+ ]);
96178
+ }
96179
+ });
96180
+
95415
96181
  // src/pptx/core/utils/chart-axis-gridlines-serializer.ts
95416
- function findKey21(obj, local, getLocalName2) {
96182
+ function findKey24(obj, local, getLocalName2) {
95417
96183
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
95418
96184
  }
95419
- function insertBefore(axisNode, newKey, value, afterSet, getLocalName2) {
96185
+ function insertBefore2(axisNode, newKey, value, afterSet, getLocalName2) {
95420
96186
  const keys = Object.keys(axisNode);
95421
96187
  const beforeIdx = keys.findIndex((k) => afterSet.has(getLocalName2(k)));
95422
96188
  const entries = keys.map((k) => [k, axisNode[k]]);
@@ -95433,7 +96199,7 @@ function applyOne(axisNode, local, key2, flag, afterSet, getLocalName2) {
95433
96199
  if (flag === void 0) {
95434
96200
  return;
95435
96201
  }
95436
- const existingKey = findKey21(axisNode, local, getLocalName2);
96202
+ const existingKey = findKey24(axisNode, local, getLocalName2);
95437
96203
  if (!flag) {
95438
96204
  if (existingKey) {
95439
96205
  delete axisNode[existingKey];
@@ -95441,7 +96207,7 @@ function applyOne(axisNode, local, key2, flag, afterSet, getLocalName2) {
95441
96207
  return;
95442
96208
  }
95443
96209
  if (!existingKey) {
95444
- insertBefore(axisNode, key2, {}, afterSet, getLocalName2);
96210
+ insertBefore2(axisNode, key2, {}, afterSet, getLocalName2);
95445
96211
  }
95446
96212
  }
95447
96213
  function applyChartAxisGridlinesToXml(axisNode, opts, getLocalName2, resolveColor2) {
@@ -95481,14 +96247,14 @@ function hex(color2) {
95481
96247
  }
95482
96248
  function buildGridlineSpPr(existing, style, getLocalName2, resolveColor2) {
95483
96249
  const spPr = existing ? { ...existing } : {};
95484
- const lnKey = findKey21(spPr, "ln", getLocalName2) ?? "a:ln";
96250
+ const lnKey = findKey24(spPr, "ln", getLocalName2) ?? "a:ln";
95485
96251
  const ln = { ...spPr[lnKey] ?? {} };
95486
96252
  if (style.strokeWidth !== void 0) {
95487
96253
  ln["@_w"] = String(Math.round(style.strokeWidth * 12700));
95488
96254
  }
95489
96255
  if (style.strokeColor) {
95490
- const fillKey = findKey21(ln, "solidFill", getLocalName2) ?? "a:solidFill";
95491
- const noFillKey = findKey21(ln, "noFill", getLocalName2);
96256
+ const fillKey = findKey24(ln, "solidFill", getLocalName2) ?? "a:solidFill";
96257
+ const noFillKey = findKey24(ln, "noFill", getLocalName2);
95492
96258
  if (noFillKey) {
95493
96259
  delete ln[noFillKey];
95494
96260
  }
@@ -95500,7 +96266,7 @@ function buildGridlineSpPr(existing, style, getLocalName2, resolveColor2) {
95500
96266
  );
95501
96267
  }
95502
96268
  if (style.strokeDashStyle) {
95503
- const dashKey = findKey21(ln, "prstDash", getLocalName2) ?? "a:prstDash";
96269
+ const dashKey = findKey24(ln, "prstDash", getLocalName2) ?? "a:prstDash";
95504
96270
  ln[dashKey] = { "@_val": style.strokeDashStyle };
95505
96271
  }
95506
96272
  spPr[lnKey] = ln;
@@ -95510,12 +96276,12 @@ function applyGridlineStyle(axisNode, local, style, getLocalName2, resolveColor2
95510
96276
  if (!style) {
95511
96277
  return;
95512
96278
  }
95513
- const gridKey = findKey21(axisNode, local, getLocalName2);
96279
+ const gridKey = findKey24(axisNode, local, getLocalName2);
95514
96280
  if (!gridKey) {
95515
96281
  return;
95516
96282
  }
95517
96283
  const grid = { ...axisNode[gridKey] ?? {} };
95518
- const spPrKey = findKey21(grid, "spPr", getLocalName2) ?? "c:spPr";
96284
+ const spPrKey = findKey24(grid, "spPr", getLocalName2) ?? "c:spPr";
95519
96285
  grid[spPrKey] = buildGridlineSpPr(
95520
96286
  grid[spPrKey],
95521
96287
  style,
@@ -95555,7 +96321,7 @@ function buildGeneratedChartAxis(axId, crossId, pos2, formatting) {
95555
96321
  const axis = {
95556
96322
  "c:axId": { "@_val": String(axId) },
95557
96323
  "c:scaling": { "c:orientation": { "@_val": "minMax" } },
95558
- "c:delete": { "@_val": "0" },
96324
+ "c:delete": { "@_val": formatting?.deleted ? "1" : "0" },
95559
96325
  "c:axPos": { "@_val": pos2 },
95560
96326
  "c:crossAx": { "@_val": String(crossId) }
95561
96327
  };
@@ -95714,7 +96480,7 @@ function buildSeries(family, s, index, categories, dateCategories) {
95714
96480
  function axisFormatting(chartData, type, id, index = 0) {
95715
96481
  return chartData.axes?.find((axis) => axis.axisId === id) ?? chartData.axes?.filter((axis) => axis.axisType === type)[index];
95716
96482
  }
95717
- function buildChartTypeContainer(chartData, family) {
96483
+ function buildChartTypeContainer(chartData, family, containerLocal) {
95718
96484
  const container2 = {};
95719
96485
  if (family === "bar") {
95720
96486
  container2["c:barDir"] = { "@_val": chartData.barDirection === "bar" ? "bar" : "col" };
@@ -95748,9 +96514,6 @@ function buildChartTypeContainer(chartData, family) {
95748
96514
  if (family === "line" && chartData.upDownBars !== void 0) {
95749
96515
  applyChartUpDownBars(container2, chartData.upDownBars, (key2) => key2.replace(/^.*:/u, ""));
95750
96516
  }
95751
- if (family === "bar" || family === "ofPie") {
95752
- container2["c:gapWidth"] = { "@_val": "150" };
95753
- }
95754
96517
  if (family === "bar" && chartData.chartType === "bar3D" && chartData.barShape) {
95755
96518
  container2["c:shape"] = { "@_val": chartData.barShape };
95756
96519
  }
@@ -95759,14 +96522,13 @@ function buildChartTypeContainer(chartData, family) {
95759
96522
  }
95760
96523
  if (family === "bar" || family === "line" || family === "area" || family === "radar" || family === "scatter" || family === "bubble" || family === "stock" || family === "surface") {
95761
96524
  container2["c:axId"] = [{ "@_val": String(CAT_AX_ID) }, { "@_val": String(VAL_AX_ID) }];
95762
- } else if (family === "doughnut") {
95763
- container2["c:holeSize"] = { "@_val": "50" };
95764
96525
  }
96526
+ applyGeneratedChartGroupOptions(container2, containerLocal, chartData);
95765
96527
  return container2;
95766
96528
  }
95767
96529
  function buildPlotArea(chartData, tag, family) {
95768
96530
  const plotArea = { "c:layout": {} };
95769
- plotArea[tag] = buildChartTypeContainer(chartData, family);
96531
+ plotArea[tag] = buildChartTypeContainer(chartData, family, tag.replace(/^.*:/u, ""));
95770
96532
  if (chartData.style) {
95771
96533
  applyChartDataLabelsToXml(plotArea, chartData.style, (key2) => key2.replace(/^.*:/u, ""));
95772
96534
  }
@@ -95843,6 +96605,7 @@ function buildChartSpaceXml(chartData) {
95843
96605
  }
95844
96606
  };
95845
96607
  applyGeneratedChartSpaceMetadata(result, chartData);
96608
+ applyGeneratedChartSpaceFormat(result, chartData);
95846
96609
  return result;
95847
96610
  }
95848
96611
  var NS_C2, NS_A2, NS_R2, CAT_AX_ID, VAL_AX_ID, SCATTER_LIKE;
@@ -95858,6 +96621,8 @@ var init_chart_xml_generator = __esm({
95858
96621
  init_chart_series_datalabel_serializer();
95859
96622
  init_chart_space_metadata();
95860
96623
  init_chart_trendline_serializer();
96624
+ init_chart_group_options();
96625
+ init_chart_space_format();
95861
96626
  init_chart_up_down_bars();
95862
96627
  init_chart_xml_axis_generator();
95863
96628
  init_chart_xml_container_map();
@@ -96205,14 +96970,14 @@ function isCustomXmlRelationship(value) {
96205
96970
  return String(value ?? "").endsWith("/relationships/customXml");
96206
96971
  }
96207
96972
  function placeCustomerDataList(container2, list2, location) {
96208
- const insertBefore3 = location === "presentation" ? /* @__PURE__ */ new Set(["p:kinsoku", "p:defaultTextStyle", "p:modifyVerifier", "p:extLst"]) : /* @__PURE__ */ new Set(["p:controls", "p:extLst"]);
96973
+ const insertBefore4 = location === "presentation" ? /* @__PURE__ */ new Set(["p:kinsoku", "p:defaultTextStyle", "p:modifyVerifier", "p:extLst"]) : /* @__PURE__ */ new Set(["p:controls", "p:extLst"]);
96209
96974
  const rebuilt = {};
96210
96975
  let inserted = false;
96211
96976
  for (const [key2, value] of Object.entries(container2)) {
96212
96977
  if (key2 === "p:custDataLst") {
96213
96978
  continue;
96214
96979
  }
96215
- if (!inserted && insertBefore3.has(key2)) {
96980
+ if (!inserted && insertBefore4.has(key2)) {
96216
96981
  rebuilt["p:custDataLst"] = list2;
96217
96982
  inserted = true;
96218
96983
  }
@@ -96300,14 +97065,14 @@ function resolveTagsContainer(data) {
96300
97065
  }
96301
97066
  return void 0;
96302
97067
  }
96303
- function placeAtKey(container2, key2, value, insertBefore3) {
97068
+ function placeAtKey(container2, key2, value, insertBefore4) {
96304
97069
  const rebuilt = {};
96305
97070
  let inserted = false;
96306
97071
  for (const [childKey3, childValue] of Object.entries(container2)) {
96307
97072
  if (childKey3 === key2) {
96308
97073
  continue;
96309
97074
  }
96310
- if (!inserted && insertBefore3.has(childKey3)) {
97075
+ if (!inserted && insertBefore4.has(childKey3)) {
96311
97076
  rebuilt[key2] = value;
96312
97077
  inserted = true;
96313
97078
  }
@@ -96331,10 +97096,10 @@ async function upsertTagsOwningElement(zip, codec, sourcePartPath, relationshipI
96331
97096
  if (!resolved) {
96332
97097
  return;
96333
97098
  }
96334
- const { container: container2, insertBefore: insertBefore3 } = resolved;
97099
+ const { container: container2, insertBefore: insertBefore4 } = resolved;
96335
97100
  const list2 = { ...container2["p:custDataLst"] ?? {} };
96336
97101
  list2["p:tags"] = { "@_r:id": relationshipId2 };
96337
- placeAtKey(container2, "p:custDataLst", list2, insertBefore3);
97102
+ placeAtKey(container2, "p:custDataLst", list2, insertBefore4);
96338
97103
  zip.file(sourcePartPath, codec.build(data));
96339
97104
  }
96340
97105
  async function removeTagsOwningElement(zip, codec, sourcePartPath) {
@@ -96602,6 +97367,49 @@ var init_tag_package = __esm({
96602
97367
  }
96603
97368
  });
96604
97369
 
97370
+ // src/pptx/core/utils/chart-axis-deleted.ts
97371
+ function authoredDeleted(node) {
97372
+ if (node === void 0) {
97373
+ return false;
97374
+ }
97375
+ const val = node && typeof node === "object" ? node["@_val"] : void 0;
97376
+ if (val === void 0 || val === null || val === "") {
97377
+ return true;
97378
+ }
97379
+ return !(val === "0" || val === "false");
97380
+ }
97381
+ function applyChartAxisDeletedToXml(axisNode, deleted, getLocalName2) {
97382
+ if (deleted === void 0) {
97383
+ return false;
97384
+ }
97385
+ const key2 = Object.keys(axisNode).find((candidate) => getLocalName2(candidate) === "delete");
97386
+ if (authoredDeleted(key2 ? axisNode[key2] : void 0) === deleted) {
97387
+ return false;
97388
+ }
97389
+ const node = { "@_val": deleted ? "1" : "0" };
97390
+ if (key2) {
97391
+ axisNode[key2] = node;
97392
+ return true;
97393
+ }
97394
+ const entries = Object.entries(axisNode);
97395
+ const at2 = entries.findIndex(([candidate]) => {
97396
+ const local = getLocalName2(candidate);
97397
+ return local !== "axId" && local !== "scaling" && !candidate.startsWith("@_");
97398
+ });
97399
+ entries.splice(at2 === -1 ? entries.length : at2, 0, ["c:delete", node]);
97400
+ for (const candidate of Object.keys(axisNode)) {
97401
+ delete axisNode[candidate];
97402
+ }
97403
+ for (const [candidate, value] of entries) {
97404
+ axisNode[candidate] = value;
97405
+ }
97406
+ return true;
97407
+ }
97408
+ var init_chart_axis_deleted = __esm({
97409
+ "src/pptx/core/utils/chart-axis-deleted.ts"() {
97410
+ }
97411
+ });
97412
+
96605
97413
  // src/pptx/core/utils/chart-axis-title-serializer.ts
96606
97414
  function firstTextRun(paragraph, getLocalName2) {
96607
97415
  for (const [key2, value] of Object.entries(paragraph)) {
@@ -96840,140 +97648,8 @@ var init_chart_color_map_override = __esm({
96840
97648
  }
96841
97649
  });
96842
97650
 
96843
- // src/pptx/core/utils/chart-container-schema.ts
96844
- function normalizeChartGroupingValue(containerLocal, value) {
96845
- const isBar = containerLocal === "barChart" || containerLocal === "bar3DChart";
96846
- return !isBar && value === "clustered" ? "standard" : value;
96847
- }
96848
- function normalizeGroupingNode(containerLocal, node) {
96849
- const value = node["@_val"];
96850
- if (value !== void 0) {
96851
- node["@_val"] = normalizeChartGroupingValue(containerLocal, value);
96852
- }
96853
- }
96854
- function normalizeChartContainerChildren(container2, containerLocal, getLocalName2) {
96855
- if (!isKnownChartContainer(containerLocal)) {
96856
- return;
96857
- }
96858
- for (const key2 of Object.keys(container2)) {
96859
- if (key2.startsWith("@_") || key2 === "#text") {
96860
- continue;
96861
- }
96862
- const local = getLocalName2(key2);
96863
- if (!chartContainerAllows(containerLocal, local)) {
96864
- delete container2[key2];
96865
- continue;
96866
- }
96867
- if (local === "grouping") {
96868
- const node = container2[key2];
96869
- if (node && typeof node === "object" && !Array.isArray(node)) {
96870
- normalizeGroupingNode(containerLocal, node);
96871
- }
96872
- }
96873
- }
96874
- const required = REQUIRED_LEADING_CHILD[containerLocal];
96875
- if (required) {
96876
- const present = Object.keys(container2).some((k) => getLocalName2(k) === required.local);
96877
- if (!present) {
96878
- container2[`c:${required.local}`] = { "@_val": required.val };
96879
- }
96880
- }
96881
- }
96882
- function orderChartContainerChildren(container2, containerLocal, getLocalName2) {
96883
- const order = CHART_CONTAINER_CHILD_ORDER[containerLocal];
96884
- if (!order) {
96885
- return;
96886
- }
96887
- const keys = Object.keys(container2).filter((k) => !k.startsWith("@_") && k !== "#text");
96888
- if (keys.some((k) => !order.includes(getLocalName2(k)))) {
96889
- return;
96890
- }
96891
- const sorted = [...keys].sort(
96892
- (a, b) => order.indexOf(getLocalName2(a)) - order.indexOf(getLocalName2(b))
96893
- );
96894
- if (sorted.every((k, i) => k === keys[i])) {
96895
- return;
96896
- }
96897
- const saved = sorted.map((k) => [k, container2[k]]);
96898
- for (const k of keys) {
96899
- delete container2[k];
96900
- }
96901
- for (const [k, v] of saved) {
96902
- container2[k] = v;
96903
- }
96904
- }
96905
- function renameXmlKeyInPlace(obj, oldKey, newKey) {
96906
- if (oldKey === newKey || !(oldKey in obj)) {
96907
- return;
96908
- }
96909
- const entries = Object.keys(obj).map((k) => [k === oldKey ? newKey : k, obj[k]]);
96910
- for (const k of Object.keys(obj)) {
96911
- delete obj[k];
96912
- }
96913
- for (const [k, v] of entries) {
96914
- obj[k] = v;
96915
- }
96916
- }
96917
- function referencedAxisIds(plotArea, getLocalName2) {
96918
- const ids = /* @__PURE__ */ new Set();
96919
- for (const key2 of Object.keys(plotArea)) {
96920
- if (!getLocalName2(key2).endsWith("Chart")) {
96921
- continue;
96922
- }
96923
- for (const container2 of toArray2(plotArea[key2])) {
96924
- for (const childKey3 of Object.keys(container2)) {
96925
- if (getLocalName2(childKey3) !== "axId") {
96926
- continue;
96927
- }
96928
- for (const axId of toArray2(container2[childKey3])) {
96929
- const val = axId["@_val"];
96930
- if (val !== void 0) {
96931
- ids.add(String(val));
96932
- }
96933
- }
96934
- }
96935
- }
96936
- }
96937
- return ids;
96938
- }
96939
- function toArray2(value) {
96940
- if (Array.isArray(value)) {
96941
- return value.filter((v) => typeof v === "object" && v !== null);
96942
- }
96943
- return typeof value === "object" && value !== null ? [value] : [];
96944
- }
96945
- function reconcileChartPlotAreaAxes(plotArea, getLocalName2) {
96946
- const referenced = referencedAxisIds(plotArea, getLocalName2);
96947
- let removed = 0;
96948
- for (const key2 of Object.keys(plotArea)) {
96949
- const local = getLocalName2(key2);
96950
- if (!AXIS_LOCAL_NAMES.includes(local)) {
96951
- continue;
96952
- }
96953
- const axes = toArray2(plotArea[key2]);
96954
- const kept = axes.filter((axis) => {
96955
- const axIdKey = Object.keys(axis).find((k) => getLocalName2(k) === "axId");
96956
- const val = axIdKey ? toArray2(axis[axIdKey])[0]?.["@_val"] : void 0;
96957
- return val !== void 0 && referenced.has(String(val));
96958
- });
96959
- removed += axes.length - kept.length;
96960
- if (kept.length === 0) {
96961
- delete plotArea[key2];
96962
- } else if (kept.length !== axes.length) {
96963
- plotArea[key2] = kept.length === 1 ? kept[0] : kept;
96964
- }
96965
- }
96966
- return removed;
96967
- }
96968
- var init_chart_container_schema = __esm({
96969
- "src/pptx/core/utils/chart-container-schema.ts"() {
96970
- init_chart_container_content_model();
96971
- init_chart_container_content_model();
96972
- }
96973
- });
96974
-
96975
97651
  // src/pptx/core/utils/chart-combo-serializer.ts
96976
- function findKey22(obj, local, getLocalName2) {
97652
+ function findKey25(obj, local, getLocalName2) {
96977
97653
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
96978
97654
  }
96979
97655
  function nonSeriesEntries(container2, getLocalName2) {
@@ -97005,14 +97681,14 @@ function consolidateComboContainersInXml(plotArea, getLocalName2) {
97005
97681
  if (!primary) {
97006
97682
  return { primaryKey, containerChildren };
97007
97683
  }
97008
- const serKey = findKey22(primary, "ser", getLocalName2) ?? "c:ser";
97684
+ const serKey = findKey25(primary, "ser", getLocalName2) ?? "c:ser";
97009
97685
  const allSeries = [];
97010
97686
  for (const key2 of containerKeys) {
97011
97687
  const container2 = plotArea[key2];
97012
97688
  if (!container2) {
97013
97689
  continue;
97014
97690
  }
97015
- const containerSerKey = findKey22(container2, "ser", getLocalName2);
97691
+ const containerSerKey = findKey25(container2, "ser", getLocalName2);
97016
97692
  if (containerSerKey) {
97017
97693
  allSeries.push(...ensureArray17(container2[containerSerKey]));
97018
97694
  }
@@ -97040,7 +97716,7 @@ function applyComboSeriesTypesToXml(plotArea, originalKey, series, chartLevelTyp
97040
97716
  if (!original) {
97041
97717
  return false;
97042
97718
  }
97043
- const serKey = findKey22(original, "ser", getLocalName2) ?? "c:ser";
97719
+ const serKey = findKey25(original, "ser", getLocalName2) ?? "c:ser";
97044
97720
  const serNodes = ensureArray17(original[serKey]);
97045
97721
  if (serNodes.length !== series.length) {
97046
97722
  return false;
@@ -97097,7 +97773,7 @@ function applyGroupAxisReferences(container2, series, axes, getLocalName2) {
97097
97773
  if (valueAxisId === void 0 || categoryAxisId === void 0) {
97098
97774
  return;
97099
97775
  }
97100
- const key2 = findKey22(container2, "axId", getLocalName2) ?? "c:axId";
97776
+ const key2 = findKey25(container2, "axId", getLocalName2) ?? "c:axId";
97101
97777
  container2[key2] = [{ "@_val": String(categoryAxisId) }, { "@_val": String(valueAxisId) }];
97102
97778
  }
97103
97779
  var init_chart_combo_serializer = __esm({
@@ -97107,7 +97783,7 @@ var init_chart_combo_serializer = __esm({
97107
97783
  });
97108
97784
 
97109
97785
  // src/pptx/core/utils/chart-filtered-series-writer.ts
97110
- function findKey23(obj, local, getLocalName2) {
97786
+ function findKey26(obj, local, getLocalName2) {
97111
97787
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
97112
97788
  }
97113
97789
  function points3(values) {
@@ -97165,9 +97841,9 @@ function filteredSeriesUnchanged(container2, filteredSeries, xmlLookup) {
97165
97841
  });
97166
97842
  }
97167
97843
  function applyFilteredSeriesToXml(container2, filteredSeries, categories, containerLocalName, getLocalName2) {
97168
- const extLstKey = findKey23(container2, "extLst", getLocalName2) ?? "c:extLst";
97844
+ const extLstKey = findKey26(container2, "extLst", getLocalName2) ?? "c:extLst";
97169
97845
  const extLst = { ...container2[extLstKey] ?? {} };
97170
- const extKey = findKey23(extLst, "ext", getLocalName2);
97846
+ const extKey = findKey26(extLst, "ext", getLocalName2);
97171
97847
  const exts = extKey ? Array.isArray(extLst[extKey]) ? [...extLst[extKey]] : [extLst[extKey]] : [];
97172
97848
  const otherExts = exts.filter((ext) => ext["@_uri"] !== CHART_FILTERED_SERIES_EXT_URI);
97173
97849
  const ownExt = {
@@ -97381,11 +98057,11 @@ var init_chart_legend_serializer = __esm({
97381
98057
  });
97382
98058
 
97383
98059
  // src/pptx/core/utils/chart-line-style-serializer.ts
97384
- function findKey24(node, name, localName28) {
98060
+ function findKey27(node, name, localName28) {
97385
98061
  return Object.keys(node).find((key2) => localName28(key2) === name);
97386
98062
  }
97387
98063
  function setOrdered5(node, name, value, localName28) {
97388
- const key2 = findKey24(node, name, localName28);
98064
+ const key2 = findKey27(node, name, localName28);
97389
98065
  if (key2) {
97390
98066
  node[key2] = value;
97391
98067
  return;
@@ -97410,7 +98086,7 @@ function applyChartLineStyle(chartContainer, elementName, style, localName28, re
97410
98086
  if (style === void 0) {
97411
98087
  return;
97412
98088
  }
97413
- const key2 = findKey24(chartContainer, elementName, localName28);
98089
+ const key2 = findKey27(chartContainer, elementName, localName28);
97414
98090
  if (style === null) {
97415
98091
  if (key2) {
97416
98092
  delete chartContainer[key2];
@@ -97421,7 +98097,7 @@ function applyChartLineStyle(chartContainer, elementName, style, localName28, re
97421
98097
  const node = { ...existing };
97422
98098
  const hasLineProps = style.color || style.width !== void 0 || style.dashStyle;
97423
98099
  if (hasLineProps) {
97424
- const spPrKey = findKey24(node, "spPr", localName28) ?? "c:spPr";
98100
+ const spPrKey = findKey27(node, "spPr", localName28) ?? "c:spPr";
97425
98101
  node[spPrKey] = writeChartShapeProps(
97426
98102
  node[spPrKey],
97427
98103
  { strokeColor: style.color, strokeWidth: style.width, strokeDashStyle: style.dashStyle },
@@ -97455,7 +98131,7 @@ var init_chart_line_style_serializer = __esm({
97455
98131
  });
97456
98132
 
97457
98133
  // src/pptx/core/utils/chart-series-color-serializer.ts
97458
- function findKey25(obj, local, getLocalName2) {
98134
+ function findKey28(obj, local, getLocalName2) {
97459
98135
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
97460
98136
  }
97461
98137
  function insertBeforeLn(obj, key2, value, getLocalName2) {
@@ -97485,14 +98161,14 @@ function insertFirst(obj, key2, value) {
97485
98161
  function writeSeriesColorToSpPr(spPr, hex3, isLineFamily, getLocalName2, resolveColor2) {
97486
98162
  const normalizedHex = hex3.replace(/^#/u, "");
97487
98163
  if (isLineFamily) {
97488
- const lnKey = findKey25(spPr, "ln", getLocalName2) ?? "a:ln";
98164
+ const lnKey = findKey28(spPr, "ln", getLocalName2) ?? "a:ln";
97489
98165
  const ln = spPr[lnKey] ?? {};
97490
98166
  const hadLn = Boolean(spPr[lnKey]);
97491
- const noFillKey = findKey25(ln, "noFill", getLocalName2);
98167
+ const noFillKey = findKey28(ln, "noFill", getLocalName2);
97492
98168
  if (noFillKey) {
97493
98169
  delete ln[noFillKey];
97494
98170
  }
97495
- const lnFillKey = findKey25(ln, "solidFill", getLocalName2) ?? "a:solidFill";
98171
+ const lnFillKey = findKey28(ln, "solidFill", getLocalName2) ?? "a:solidFill";
97496
98172
  const authoredFill2 = ln[lnFillKey];
97497
98173
  const fillNode2 = serializeColorChoice(
97498
98174
  authoredFill2,
@@ -97509,7 +98185,7 @@ function writeSeriesColorToSpPr(spPr, hex3, isLineFamily, getLocalName2, resolve
97509
98185
  }
97510
98186
  return;
97511
98187
  }
97512
- const fillKey = findKey25(spPr, "solidFill", getLocalName2) ?? "a:solidFill";
98188
+ const fillKey = findKey28(spPr, "solidFill", getLocalName2) ?? "a:solidFill";
97513
98189
  const authoredFill = spPr[fillKey];
97514
98190
  const fillNode = serializeColorChoice(
97515
98191
  authoredFill,
@@ -97517,7 +98193,7 @@ function writeSeriesColorToSpPr(spPr, hex3, isLineFamily, getLocalName2, resolve
97517
98193
  normalizedHex
97518
98194
  );
97519
98195
  if (authoredFill) {
97520
- const noFillKey = findKey25(spPr, "noFill", getLocalName2);
98196
+ const noFillKey = findKey28(spPr, "noFill", getLocalName2);
97521
98197
  if (noFillKey) {
97522
98198
  delete spPr[noFillKey];
97523
98199
  }
@@ -97532,7 +98208,7 @@ function writeSeriesColorToSpPr(spPr, hex3, isLineFamily, getLocalName2, resolve
97532
98208
  }
97533
98209
  }
97534
98210
  function ensureSeriesSpPr(seriesNode, getLocalName2) {
97535
- const existingKey = findKey25(seriesNode, "spPr", getLocalName2);
98211
+ const existingKey = findKey28(seriesNode, "spPr", getLocalName2);
97536
98212
  if (existingKey) {
97537
98213
  return seriesNode[existingKey];
97538
98214
  }
@@ -97552,7 +98228,7 @@ function applySeriesGradientToXml(seriesNode, gradient, getLocalName2, options =
97552
98228
  if (options.lineDrawn) {
97553
98229
  return false;
97554
98230
  }
97555
- const spPrKey = findKey25(seriesNode, "spPr", getLocalName2);
98231
+ const spPrKey = findKey28(seriesNode, "spPr", getLocalName2);
97556
98232
  if (!spPrKey && !gradient) {
97557
98233
  return false;
97558
98234
  }
@@ -97588,11 +98264,11 @@ var init_chart_series_color_serializer = __esm({
97588
98264
  });
97589
98265
 
97590
98266
  // src/pptx/core/utils/chart-subtype-serializer.ts
97591
- function findKey26(obj, local, getLocalName2) {
98267
+ function findKey29(obj, local, getLocalName2) {
97592
98268
  return Object.keys(obj).find((k) => getLocalName2(k) === local);
97593
98269
  }
97594
98270
  function upsertValChild(parent, localName28, value, getLocalName2) {
97595
- const existingKey = findKey26(parent, localName28, getLocalName2);
98271
+ const existingKey = findKey29(parent, localName28, getLocalName2);
97596
98272
  if (value === void 0) {
97597
98273
  if (existingKey) {
97598
98274
  delete parent[existingKey];
@@ -97632,7 +98308,7 @@ function applySurfaceWireframeToXml(chartTypeContainer, containerLocalName, wire
97632
98308
  orderChartContainerChildren(chartTypeContainer, containerLocalName, getLocalName2);
97633
98309
  }
97634
98310
  function applySeriesBar3DShapeToXml(seriesNode, shape, getLocalName2) {
97635
- const existingKey = findKey26(seriesNode, "shape", getLocalName2);
98311
+ const existingKey = findKey29(seriesNode, "shape", getLocalName2);
97636
98312
  if (shape === void 0) {
97637
98313
  if (existingKey) {
97638
98314
  delete seriesNode[existingKey];
@@ -97843,7 +98519,7 @@ var init_chart_title_serializer = __esm({
97843
98519
  });
97844
98520
 
97845
98521
  // src/pptx/core/utils/chart-title-style-serializer.ts
97846
- function findKey27(node, localName28, getLocalName2) {
98522
+ function findKey30(node, localName28, getLocalName2) {
97847
98523
  return Object.keys(node).find((key2) => getLocalName2(key2) === localName28);
97848
98524
  }
97849
98525
  function setChildOrdered(node, key2, existingKey, value, laterNames, getLocalName2) {
@@ -97886,9 +98562,9 @@ function asArray3(value) {
97886
98562
  return value && typeof value === "object" ? [value] : [];
97887
98563
  }
97888
98564
  function applyRichTitleFont(title, style, getLocalName2, resolveColor2) {
97889
- const txKey = findKey27(title, "tx", getLocalName2);
98565
+ const txKey = findKey30(title, "tx", getLocalName2);
97890
98566
  const tx = txKey ? title[txKey] : void 0;
97891
- const richKey = tx ? findKey27(tx, "rich", getLocalName2) : void 0;
98567
+ const richKey = tx ? findKey30(tx, "rich", getLocalName2) : void 0;
97892
98568
  const rich = richKey && tx ? tx[richKey] : void 0;
97893
98569
  if (!tx || !rich || !txKey || !richKey) {
97894
98570
  return void 0;
@@ -97897,22 +98573,22 @@ function applyRichTitleFont(title, style, getLocalName2, resolveColor2) {
97897
98573
  if (!hasFont) {
97898
98574
  return txKey;
97899
98575
  }
97900
- const pKey = findKey27(rich, "p", getLocalName2) ?? "a:p";
98576
+ const pKey = findKey30(rich, "p", getLocalName2) ?? "a:p";
97901
98577
  const paragraphs = asArray3(rich[pKey]).map((para) => {
97902
98578
  const next = { ...para };
97903
- const pPrKey = findKey27(next, "pPr", getLocalName2) ?? "a:pPr";
98579
+ const pPrKey = findKey30(next, "pPr", getLocalName2) ?? "a:pPr";
97904
98580
  const pPr = { ...next[pPrKey] ?? {} };
97905
- const defRPrKey = findKey27(pPr, "defRPr", getLocalName2) ?? "a:defRPr";
98581
+ const defRPrKey = findKey30(pPr, "defRPr", getLocalName2) ?? "a:defRPr";
97906
98582
  const existingDefRPr = pPr[defRPrKey] ?? {};
97907
98583
  pPr[defRPrKey] = {
97908
98584
  ...existingDefRPr,
97909
98585
  ...buildTitleDefRPr(style, existingDefRPr, resolveColor2)
97910
98586
  };
97911
98587
  next[pPrKey] = pPr;
97912
- const rKey = findKey27(next, "r", getLocalName2);
98588
+ const rKey = findKey30(next, "r", getLocalName2);
97913
98589
  if (rKey) {
97914
98590
  const runs = asArray3(next[rKey]).map((run) => {
97915
- const rPrKey = findKey27(run, "rPr", getLocalName2) ?? "a:rPr";
98591
+ const rPrKey = findKey30(run, "rPr", getLocalName2) ?? "a:rPr";
97916
98592
  const existingRPr = run[rPrKey] ?? {};
97917
98593
  const nextRun = { ...run };
97918
98594
  nextRun[rPrKey] = { ...existingRPr, ...buildTitleDefRPr(style, existingRPr, resolveColor2) };
@@ -97935,13 +98611,13 @@ function applyChartTitleStyleToXml(chartRoot, style, getLocalName2, options = {
97935
98611
  return;
97936
98612
  }
97937
98613
  const { prefix } = options;
97938
- const titleKey = findKey27(chartRoot, "title", getLocalName2);
98614
+ const titleKey = findKey30(chartRoot, "title", getLocalName2);
97939
98615
  if (!titleKey) {
97940
98616
  return;
97941
98617
  }
97942
98618
  const title = { ...chartRoot[titleKey] ?? {} };
97943
98619
  if (style.spPr !== void 0) {
97944
- const spPrKey = findKey27(title, "spPr", getLocalName2);
98620
+ const spPrKey = findKey30(title, "spPr", getLocalName2);
97945
98621
  if (style.spPr === null) {
97946
98622
  if (spPrKey) {
97947
98623
  delete title[spPrKey];
@@ -97958,23 +98634,23 @@ function applyChartTitleStyleToXml(chartRoot, style, getLocalName2, options = {
97958
98634
  }
97959
98635
  const richKey = applyRichTitleFont(title, style, getLocalName2, resolveColor2);
97960
98636
  if (hasFont && richKey === void 0) {
97961
- const existingTxPrKey = findKey27(title, "txPr", getLocalName2);
98637
+ const existingTxPrKey = findKey30(title, "txPr", getLocalName2);
97962
98638
  const txPrKey = existingTxPrKey ?? `${prefix}:txPr`;
97963
98639
  const txPr = { ...title[txPrKey] ?? {} };
97964
- if (!txPr[findKey27(txPr, "bodyPr", getLocalName2) ?? "a:bodyPr"]) {
98640
+ if (!txPr[findKey30(txPr, "bodyPr", getLocalName2) ?? "a:bodyPr"]) {
97965
98641
  txPr["a:bodyPr"] = {};
97966
98642
  }
97967
- if (!txPr[findKey27(txPr, "lstStyle", getLocalName2) ?? "a:lstStyle"]) {
98643
+ if (!txPr[findKey30(txPr, "lstStyle", getLocalName2) ?? "a:lstStyle"]) {
97968
98644
  txPr["a:lstStyle"] = {};
97969
98645
  }
97970
- const pKey = findKey27(txPr, "p", getLocalName2) ?? "a:p";
98646
+ const pKey = findKey30(txPr, "p", getLocalName2) ?? "a:p";
97971
98647
  const existingP = txPr[pKey];
97972
98648
  const para = {
97973
98649
  ...(Array.isArray(existingP) ? existingP[0] : existingP) ?? {}
97974
98650
  };
97975
- const pPrKey = findKey27(para, "pPr", getLocalName2) ?? "a:pPr";
98651
+ const pPrKey = findKey30(para, "pPr", getLocalName2) ?? "a:pPr";
97976
98652
  const pPr = { ...para[pPrKey] ?? {} };
97977
- const defRPrKey = findKey27(pPr, "defRPr", getLocalName2) ?? "a:defRPr";
98653
+ const defRPrKey = findKey30(pPr, "defRPr", getLocalName2) ?? "a:defRPr";
97978
98654
  const existingDefRPr = pPr[defRPrKey] ?? {};
97979
98655
  pPr[defRPrKey] = {
97980
98656
  ...existingDefRPr,
@@ -98124,7 +98800,7 @@ var init_chart_xlsx_writer = __esm({
98124
98800
  });
98125
98801
 
98126
98802
  // src/pptx/core/core/runtime/chart-cx-update-data.ts
98127
- function findKey28(node, localName28, getLocalName2) {
98803
+ function findKey31(node, localName28, getLocalName2) {
98128
98804
  return Object.keys(node).find((key2) => getLocalName2(key2) === localName28);
98129
98805
  }
98130
98806
  function asArray4(value) {
@@ -98139,8 +98815,8 @@ function dimensionType(node) {
98139
98815
  return String(node["@_type"] ?? "");
98140
98816
  }
98141
98817
  function replaceLevels(target, source, getLocalName2) {
98142
- const targetKey = findKey28(target, "lvl", getLocalName2) ?? "cx:lvl";
98143
- const sourceKey = findKey28(source, "lvl", getLocalName2);
98818
+ const targetKey = findKey31(target, "lvl", getLocalName2) ?? "cx:lvl";
98819
+ const sourceKey = findKey31(source, "lvl", getLocalName2);
98144
98820
  const oldLevels = asArray4(target[targetKey]);
98145
98821
  const newLevels = asArray4(sourceKey ? source[sourceKey] : void 0).map((level2, index) => {
98146
98822
  const old = oldLevels[index];
@@ -98159,8 +98835,8 @@ function replaceLevels(target, source, getLocalName2) {
98159
98835
  }
98160
98836
  function replaceChartExDataDimensions(target, fresh, getLocalName2) {
98161
98837
  for (const kind of ["strDim", "numDim"]) {
98162
- const targetKey = findKey28(target, kind, getLocalName2) ?? `cx:${kind}`;
98163
- const freshKey = findKey28(fresh, kind, getLocalName2);
98838
+ const targetKey = findKey31(target, kind, getLocalName2) ?? `cx:${kind}`;
98839
+ const freshKey = findKey31(fresh, kind, getLocalName2);
98164
98840
  const existing = asArray4(target[targetKey]);
98165
98841
  const incoming = asArray4(freshKey ? fresh[freshKey] : void 0);
98166
98842
  for (const dimension of incoming) {
@@ -98189,14 +98865,14 @@ var init_chart_cx_update_data = __esm({
98189
98865
  });
98190
98866
 
98191
98867
  // src/pptx/core/core/runtime/chart-cx-update-series.ts
98192
- function findKey29(node, localName28, getLocalName2) {
98868
+ function findKey32(node, localName28, getLocalName2) {
98193
98869
  return Object.keys(node).find((key2) => getLocalName2(key2) === localName28);
98194
98870
  }
98195
98871
  function child24(node, localName28, getLocalName2) {
98196
98872
  if (!node) {
98197
98873
  return void 0;
98198
98874
  }
98199
- const key2 = findKey29(node, localName28, getLocalName2);
98875
+ const key2 = findKey32(node, localName28, getLocalName2);
98200
98876
  const value = key2 ? node[key2] : void 0;
98201
98877
  return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
98202
98878
  }
@@ -98208,7 +98884,7 @@ function asArray5(value) {
98208
98884
  (entry) => Boolean(entry) && typeof entry === "object"
98209
98885
  );
98210
98886
  }
98211
- function insertBefore2(parent, key2, value, before, getLocalName2) {
98887
+ function insertBefore3(parent, key2, value, before, getLocalName2) {
98212
98888
  const entries = Object.keys(parent).map((k) => [k, parent[k]]);
98213
98889
  let index = entries.findIndex(([k]) => !k.startsWith("@_") && before.includes(getLocalName2(k)));
98214
98890
  if (index === -1) {
@@ -98226,15 +98902,15 @@ function applySeriesName(node, name, getLocalName2) {
98226
98902
  const tx = child24(node, "tx", getLocalName2);
98227
98903
  const txData = child24(tx, "txData", getLocalName2);
98228
98904
  if (tx && txData) {
98229
- const vKey = findKey29(txData, "v", getLocalName2) ?? "cx:v";
98905
+ const vKey = findKey32(txData, "v", getLocalName2) ?? "cx:v";
98230
98906
  txData[vKey] = name;
98231
98907
  return;
98232
98908
  }
98233
- const txKey = findKey29(node, "tx", getLocalName2);
98909
+ const txKey = findKey32(node, "tx", getLocalName2);
98234
98910
  if (txKey) {
98235
98911
  delete node[txKey];
98236
98912
  }
98237
- insertBefore2(node, "cx:tx", { "cx:txData": { "cx:v": name } }, AFTER_TX, getLocalName2);
98913
+ insertBefore3(node, "cx:tx", { "cx:txData": { "cx:v": name } }, AFTER_TX, getLocalName2);
98238
98914
  }
98239
98915
  function currentSeriesColor(node, getLocalName2) {
98240
98916
  const srgb = child24(
@@ -98256,7 +98932,7 @@ function applySeriesColor(node, series, getLocalName2) {
98256
98932
  }
98257
98933
  const spPr = child24(node, "spPr", getLocalName2);
98258
98934
  if (!spPr) {
98259
- insertBefore2(node, "cx:spPr", fill, AFTER_TX.slice(1), getLocalName2);
98935
+ insertBefore3(node, "cx:spPr", fill, AFTER_TX.slice(1), getLocalName2);
98260
98936
  return;
98261
98937
  }
98262
98938
  for (const key2 of Object.keys(spPr)) {
@@ -98264,13 +98940,13 @@ function applySeriesColor(node, series, getLocalName2) {
98264
98940
  delete spPr[key2];
98265
98941
  }
98266
98942
  }
98267
- insertBefore2(spPr, "a:solidFill", fill["a:solidFill"], AFTER_FILL2, getLocalName2);
98943
+ insertBefore3(spPr, "a:solidFill", fill["a:solidFill"], AFTER_FILL2, getLocalName2);
98268
98944
  }
98269
98945
  function applySeriesDataLabels(node, hasDataLabels, getLocalName2) {
98270
98946
  if (hasDataLabels === void 0) {
98271
98947
  return;
98272
98948
  }
98273
- const key2 = findKey29(node, "dataLabels", getLocalName2);
98949
+ const key2 = findKey32(node, "dataLabels", getLocalName2);
98274
98950
  if (!hasDataLabels) {
98275
98951
  if (key2) {
98276
98952
  delete node[key2];
@@ -98278,7 +98954,7 @@ function applySeriesDataLabels(node, hasDataLabels, getLocalName2) {
98278
98954
  return;
98279
98955
  }
98280
98956
  if (!key2) {
98281
- insertBefore2(
98957
+ insertBefore3(
98282
98958
  node,
98283
98959
  "cx:dataLabels",
98284
98960
  buildChartExDataLabels(),
@@ -98309,7 +98985,7 @@ function bindSeriesData(node, dataNodes, chartData, series, getLocalName2) {
98309
98985
  );
98310
98986
  return;
98311
98987
  }
98312
- const inlineKey = findKey29(node, "data", getLocalName2);
98988
+ const inlineKey = findKey32(node, "data", getLocalName2);
98313
98989
  if (inlineKey && !dataIdNode) {
98314
98990
  const inline = node[inlineKey];
98315
98991
  if (inline && typeof inline === "object" && !Array.isArray(inline)) {
@@ -98326,7 +99002,7 @@ function bindSeriesData(node, dataNodes, chartData, series, getLocalName2) {
98326
99002
  if (dataIdNode) {
98327
99003
  dataIdNode["@_val"] = String(id);
98328
99004
  } else {
98329
- insertBefore2(
99005
+ insertBefore3(
98330
99006
  node,
98331
99007
  "cx:dataId",
98332
99008
  { "@_val": String(id) },
@@ -98362,7 +99038,7 @@ function applyLegend(chartRoot, chartData, getLocalName2) {
98362
99038
  if (!style || style.hasLegend === void 0) {
98363
99039
  return;
98364
99040
  }
98365
- const key2 = findKey29(chartRoot, "legend", getLocalName2);
99041
+ const key2 = findKey32(chartRoot, "legend", getLocalName2);
98366
99042
  if (!style.hasLegend) {
98367
99043
  if (key2) {
98368
99044
  delete chartRoot[key2];
@@ -98380,7 +99056,7 @@ function applyLegend(chartRoot, chartData, getLocalName2) {
98380
99056
  delete chartRoot[key2];
98381
99057
  }
98382
99058
  const legend = buildChartExLegend(style.legendPosition);
98383
- insertBefore2(chartRoot, "cx:legend", legend, ["extLst"], getLocalName2);
99059
+ insertBefore3(chartRoot, "cx:legend", legend, ["extLst"], getLocalName2);
98384
99060
  }
98385
99061
  function chartExLayoutChanged(chartSpace, chartData, getLocalName2) {
98386
99062
  const region = child24(
@@ -98388,7 +99064,7 @@ function chartExLayoutChanged(chartSpace, chartData, getLocalName2) {
98388
99064
  "plotAreaRegion",
98389
99065
  getLocalName2
98390
99066
  );
98391
- const seriesKey = region ? findKey29(region, "series", getLocalName2) : void 0;
99067
+ const seriesKey = region ? findKey32(region, "series", getLocalName2) : void 0;
98392
99068
  const first = region && seriesKey ? asArray5(region[seriesKey])[0] : void 0;
98393
99069
  const existing = String(first?.["@_layoutId"] ?? "").toLowerCase();
98394
99070
  const series = chartData.series[0];
@@ -98404,11 +99080,11 @@ function applyChartExUpdate(chartSpace, chartData, getLocalName2) {
98404
99080
  if (!chartRoot || !region) {
98405
99081
  return false;
98406
99082
  }
98407
- const chartDataKey = findKey29(chartSpace, "chartData", getLocalName2);
99083
+ const chartDataKey = findKey32(chartSpace, "chartData", getLocalName2);
98408
99084
  const chartDataNode = (chartDataKey ? chartSpace[chartDataKey] : void 0) ?? {};
98409
- const dataKey = findKey29(chartDataNode, "data", getLocalName2) ?? "cx:data";
99085
+ const dataKey = findKey32(chartDataNode, "data", getLocalName2) ?? "cx:data";
98410
99086
  const dataNodes = asArray5(chartDataNode[dataKey]);
98411
- const seriesKey = findKey29(region, "series", getLocalName2) ?? "cx:series";
99087
+ const seriesKey = findKey32(region, "series", getLocalName2) ?? "cx:series";
98412
99088
  const existing = asArray5(region[seriesKey]);
98413
99089
  const updated = [];
98414
99090
  chartData.series.forEach((series, index) => {
@@ -98437,7 +99113,7 @@ function applyChartExUpdate(chartSpace, chartData, getLocalName2) {
98437
99113
  region[seriesKey] = updated.length === 1 ? updated[0] : updated;
98438
99114
  chartDataNode[dataKey] = survivingData.length === 1 ? survivingData[0] : survivingData;
98439
99115
  if (!chartDataKey) {
98440
- insertBefore2(chartSpace, "cx:chartData", chartDataNode, ["chart"], getLocalName2);
99116
+ insertBefore3(chartSpace, "cx:chartData", chartDataNode, ["chart"], getLocalName2);
98441
99117
  }
98442
99118
  applyChartTitleToXml(
98443
99119
  chartRoot,
@@ -100801,7 +101477,7 @@ var init_master_color_map = __esm({
100801
101477
 
100802
101478
  // src/pptx/core/services/native-animation-theme-colors.ts
100803
101479
  function resolveToken2(value, resolveThemeColor) {
100804
- if (!value || HEX_COLOR2.test(value)) {
101480
+ if (!value || HEX_COLOR3.test(value)) {
100805
101481
  return value;
100806
101482
  }
100807
101483
  return resolveThemeColor(value) ?? value;
@@ -100825,10 +101501,10 @@ function resolveNativeAnimationThemeColors(animations, resolveThemeColor) {
100825
101501
  } : animation
100826
101502
  );
100827
101503
  }
100828
- var HEX_COLOR2;
101504
+ var HEX_COLOR3;
100829
101505
  var init_native_animation_theme_colors = __esm({
100830
101506
  "src/pptx/core/services/native-animation-theme-colors.ts"() {
100831
- HEX_COLOR2 = /^#?[0-9a-f]{6}$/iu;
101507
+ HEX_COLOR3 = /^#?[0-9a-f]{6}$/iu;
100832
101508
  }
100833
101509
  });
100834
101510
 
@@ -103621,6 +104297,7 @@ var init_PptxHandlerRuntimeSlideMasters = __esm({
103621
104297
  var PptxHandlerRuntime10;
103622
104298
  var init_PptxHandlerRuntimePresentationProps = __esm({
103623
104299
  "src/pptx/core/core/runtime/PptxHandlerRuntimePresentationProps.ts"() {
104300
+ init_chart_area_format();
103624
104301
  init_chart_data_label_parser();
103625
104302
  init_chart_data_labels_visibility();
103626
104303
  init_chart_def_rpr_style();
@@ -103719,27 +104396,18 @@ var init_PptxHandlerRuntimePresentationProps = __esm({
103719
104396
  }
103720
104397
  }
103721
104398
  /**
103722
- * Resolve the `c:spPr` fill of a chart container (`c:chartSpace` or
103723
- * `c:plotArea`) to a colour string, or the literal `'none'` for
103724
- * `<a:noFill/>`. Returns `undefined` when the container declares no fill at
103725
- * all, which leaves the choice to the renderer.
103726
- *
103727
- * `<a:noFill/>` parses to the empty STRING, so presence - not truthiness -
103728
- * has to decide.
104399
+ * Resolve the `c:spPr` fill and border of a chart container
104400
+ * (`c:chartSpace` or `c:plotArea`) to a colour string, or the literal
104401
+ * `'none'` for `<a:noFill/>`; `undefined` when the container declares
104402
+ * nothing, which leaves the choice to the renderer. The save path reads it
104403
+ * back with the same function (`chart-area-format.ts`).
103729
104404
  */
103730
- parseChartContainerFill(container2) {
103731
- const shapeProperties = this.xmlLookupService.getChildByLocalName(container2, "spPr");
103732
- if (!shapeProperties) {
103733
- return void 0;
103734
- }
103735
- const hasNoFill = Object.keys(shapeProperties).some(
103736
- (key2) => this.compatibilityService.getXmlLocalName(key2) === "noFill"
104405
+ parseChartContainerFormat(container2) {
104406
+ return parseChartAreaFormat(
104407
+ container2,
104408
+ (key2) => this.compatibilityService.getXmlLocalName(key2),
104409
+ (node) => this.parseColor(node)
103737
104410
  );
103738
- if (hasNoFill) {
103739
- return "none";
103740
- }
103741
- const solidFill3 = this.xmlLookupService.getChildByLocalName(shapeProperties, "solidFill");
103742
- return solidFill3 ? this.parseColor(solidFill3) : void 0;
103743
104411
  }
103744
104412
  /**
103745
104413
  * Extract chart style metadata from chart XML.
@@ -103755,9 +104423,13 @@ var init_PptxHandlerRuntimePresentationProps = __esm({
103755
104423
  style.styleId = parseInt(String(styleNode["@_val"]));
103756
104424
  hasStyle = true;
103757
104425
  }
103758
- const chartAreaFill = this.parseChartContainerFill(chartSpace);
103759
- if (chartAreaFill) {
103760
- style.chartAreaFill = chartAreaFill;
104426
+ const chartArea = this.parseChartContainerFormat(chartSpace);
104427
+ if (chartArea.fill) {
104428
+ style.chartAreaFill = chartArea.fill;
104429
+ hasStyle = true;
104430
+ }
104431
+ if (chartArea.border) {
104432
+ style.chartAreaBorder = chartArea.border;
103761
104433
  hasStyle = true;
103762
104434
  }
103763
104435
  const chartAreaGradient = parseChartGradientFill(
@@ -103825,9 +104497,13 @@ var init_PptxHandlerRuntimePresentationProps = __esm({
103825
104497
  if (plotAreaGradient) {
103826
104498
  style.plotAreaGradient = plotAreaGradient;
103827
104499
  }
103828
- const plotAreaFill = this.parseChartContainerFill(plotArea);
103829
- if (plotAreaFill) {
103830
- style.plotAreaFill = plotAreaFill;
104500
+ const plotAreaFormat = this.parseChartContainerFormat(plotArea);
104501
+ if (plotAreaFormat.fill) {
104502
+ style.plotAreaFill = plotAreaFormat.fill;
104503
+ hasStyle = true;
104504
+ }
104505
+ if (plotAreaFormat.border) {
104506
+ style.plotAreaBorder = plotAreaFormat.border;
103831
104507
  hasStyle = true;
103832
104508
  }
103833
104509
  const valAx = this.xmlLookupService.getChildByLocalName(plotArea, "valAx");
@@ -108914,7 +109590,10 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
108914
109590
  init_chart_axis_dispunits_serializer();
108915
109591
  init_chart_axis_gridlines_serializer();
108916
109592
  init_chart_axis_label_formatting();
109593
+ init_chart_axis_deleted();
108917
109594
  init_chart_axis_scaling();
109595
+ init_chart_group_options();
109596
+ init_chart_space_format();
108918
109597
  init_chart_axis_title_serializer();
108919
109598
  init_chart_band_fmts();
108920
109599
  init_chart_bubble_options();
@@ -109168,6 +109847,15 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
109168
109847
  } else if (groupingKey) {
109169
109848
  delete chartTypeContainer[groupingKey];
109170
109849
  }
109850
+ const singleContainer = (consolidation?.containerChildren.size ?? 1) <= 1;
109851
+ if (singleContainer && chartData.chartType !== "combo") {
109852
+ applyChartGroupOptionsToXml(
109853
+ chartTypeContainer,
109854
+ containerLocalName,
109855
+ chartData,
109856
+ (key2) => this.compatibilityService.getXmlLocalName(key2)
109857
+ );
109858
+ }
109171
109859
  const seriesNodes = this.xmlLookupService.getChildrenArrayByLocalName(
109172
109860
  chartTypeContainer,
109173
109861
  "ser"
@@ -109572,6 +110260,11 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
109572
110260
  if (!matchingAxis) {
109573
110261
  continue;
109574
110262
  }
110263
+ applyChartAxisDeletedToXml(
110264
+ axisNode,
110265
+ matchingAxis.deleted,
110266
+ (key2) => this.compatibilityService.getXmlLocalName(key2)
110267
+ );
109575
110268
  const scalingNode = this.xmlLookupService.getChildByLocalName(axisNode, "scaling");
109576
110269
  if (scalingNode) {
109577
110270
  applyChartAxisScaling(
@@ -109647,6 +110340,18 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
109647
110340
  }
109648
110341
  }
109649
110342
  }
110343
+ if (chartSpace) {
110344
+ applyChartSpaceFormatToXml(
110345
+ chartSpace,
110346
+ plotArea,
110347
+ chartData,
110348
+ (key2) => this.compatibilityService.getXmlLocalName(key2),
110349
+ {
110350
+ ...this.chartGradientWriteOptions(false),
110351
+ resolveColor: (node) => this.parseColor(node)
110352
+ }
110353
+ );
110354
+ }
109650
110355
  for (const key2 of Object.keys(plotArea)) {
109651
110356
  const local = this.compatibilityService.getXmlLocalName(key2);
109652
110357
  if (!local.endsWith("Chart")) {
@@ -110080,7 +110785,7 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
110080
110785
  });
110081
110786
 
110082
110787
  // src/pptx/core/core/runtime/smartart-definition-builder.ts
110083
- function findKey30(node, name, localName28) {
110788
+ function findKey33(node, name, localName28) {
110084
110789
  return Object.keys(node).find((key2) => localName28(key2) === name);
110085
110790
  }
110086
110791
  function prefixFor(node) {
@@ -110099,7 +110804,7 @@ function setChildren(node, name, values, localName28) {
110099
110804
  if (values === void 0) {
110100
110805
  return false;
110101
110806
  }
110102
- const existing = findKey30(node, name, localName28);
110807
+ const existing = findKey33(node, name, localName28);
110103
110808
  if (values.length === 0) {
110104
110809
  if (existing) {
110105
110810
  delete node[existing];
@@ -110126,7 +110831,7 @@ function applySmartArtDefinitionMetadata(node, metadata, localName28) {
110126
110831
  changed = setChildren(node, "title", textNodes(metadata.titles), localName28) || changed;
110127
110832
  changed = setChildren(node, "desc", textNodes(metadata.descriptions), localName28) || changed;
110128
110833
  if (metadata.categories !== void 0) {
110129
- const key2 = findKey30(node, "catLst", localName28);
110834
+ const key2 = findKey33(node, "catLst", localName28);
110130
110835
  if (metadata.categories.length === 0) {
110131
110836
  if (key2) {
110132
110837
  delete node[key2];
@@ -110150,7 +110855,7 @@ function applySmartArtDefinitionMetadata(node, metadata, localName28) {
110150
110855
  return changed;
110151
110856
  }
110152
110857
  function ensureLabels(node, localName28) {
110153
- const key2 = findKey30(node, "styleLbl", localName28) ?? `${prefixFor(node)}styleLbl`;
110858
+ const key2 = findKey33(node, "styleLbl", localName28) ?? `${prefixFor(node)}styleLbl`;
110154
110859
  return { key: key2, labels: objects(node[key2]) };
110155
110860
  }
110156
110861
  function applySmartArtQuickStyleLabels(node, labels, localName28) {
@@ -110165,7 +110870,7 @@ function applySmartArtQuickStyleLabels(node, labels, localName28) {
110165
110870
  return true;
110166
110871
  }
110167
110872
  function applyColorList(label, name, metadata, localName28) {
110168
- const key2 = findKey30(label, name, localName28) ?? `${prefixFor(label)}${name}`;
110873
+ const key2 = findKey33(label, name, localName28) ?? `${prefixFor(label)}${name}`;
110169
110874
  const list2 = objects(label[key2])[0] ?? {};
110170
110875
  if (metadata.method !== void 0) {
110171
110876
  list2["@_meth"] = metadata.method;
@@ -110208,17 +110913,17 @@ var init_smartart_definition_builder = __esm({
110208
110913
  });
110209
110914
 
110210
110915
  // src/pptx/core/core/runtime/smartart-colors-builder.ts
110211
- function asObject(value) {
110916
+ function asObject2(value) {
110212
110917
  return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
110213
110918
  }
110214
110919
  function toArray4(value) {
110215
110920
  if (Array.isArray(value)) {
110216
- return value.filter((entry) => Boolean(asObject(entry)));
110921
+ return value.filter((entry) => Boolean(asObject2(entry)));
110217
110922
  }
110218
- const obj = asObject(value);
110923
+ const obj = asObject2(value);
110219
110924
  return obj ? [obj] : [];
110220
110925
  }
110221
- function findKey31(obj, name, getLocalName2) {
110926
+ function findKey34(obj, name, getLocalName2) {
110222
110927
  return Object.keys(obj).find((k) => getLocalName2(k) === name);
110223
110928
  }
110224
110929
  function hex2(value) {
@@ -110233,13 +110938,13 @@ function applyColorToList(list2, value, getLocalName2, resolveColor2) {
110233
110938
  }
110234
110939
  const existing = list2[colorKey];
110235
110940
  if (resolveColor2) {
110236
- const authored = asObject(Array.isArray(existing) ? existing[0] : existing);
110941
+ const authored = asObject2(Array.isArray(existing) ? existing[0] : existing);
110237
110942
  const authoredHex = authored ? resolveColor2({ [colorKey]: authored }) : void 0;
110238
110943
  if (authoredHex && colorsEqual(authoredHex, value)) {
110239
110944
  return;
110240
110945
  }
110241
110946
  }
110242
- const rest = Array.isArray(existing) ? existing.slice(1).filter((entry) => Boolean(asObject(entry))) : [];
110947
+ const rest = Array.isArray(existing) ? existing.slice(1).filter((entry) => Boolean(asObject2(entry))) : [];
110243
110948
  if (colorKey !== "a:srgbClr") {
110244
110949
  delete list2[colorKey];
110245
110950
  }
@@ -110254,7 +110959,7 @@ function applyColorListValues(list2, values, getLocalName2, resolveColor2) {
110254
110959
  const existing = Array.isArray(existingRaw) ? existingRaw : existingRaw ? [existingRaw] : [];
110255
110960
  if (resolveColor2 && colorKey && existing.length === values.length) {
110256
110961
  const unchanged2 = existing.every((entryRaw, index) => {
110257
- const entry = asObject(entryRaw);
110962
+ const entry = asObject2(entryRaw);
110258
110963
  const authoredHex = entry ? resolveColor2({ [colorKey]: entry }) : void 0;
110259
110964
  return authoredHex !== void 0 && colorsEqual(authoredHex, values[index]);
110260
110965
  });
@@ -110277,16 +110982,16 @@ function applyRoleColors(labels, roleColors, getLocalName2, resolveColor2) {
110277
110982
  if (!role) {
110278
110983
  continue;
110279
110984
  }
110280
- const fillKey = findKey31(label, "fillClrLst", getLocalName2);
110985
+ const fillKey = findKey34(label, "fillClrLst", getLocalName2);
110281
110986
  if (fillKey) {
110282
- const list2 = asObject(label[fillKey]);
110987
+ const list2 = asObject2(label[fillKey]);
110283
110988
  if (list2 && applyColorListValues(list2, role.fill, getLocalName2, resolveColor2)) {
110284
110989
  mutated = true;
110285
110990
  }
110286
110991
  }
110287
- const lineKey = findKey31(label, "linClrLst", getLocalName2);
110992
+ const lineKey = findKey34(label, "linClrLst", getLocalName2);
110288
110993
  if (lineKey) {
110289
- const list2 = asObject(label[lineKey]);
110994
+ const list2 = asObject2(label[lineKey]);
110290
110995
  if (list2 && applyColorListValues(list2, role.line, getLocalName2, resolveColor2)) {
110291
110996
  mutated = true;
110292
110997
  }
@@ -110301,7 +111006,7 @@ function applySmartArtColorTransform(colorsDef, transform2, getLocalName2, resol
110301
111006
  let mutated = false;
110302
111007
  mutated = applySmartArtDefinitionMetadata(colorsDef, transform2, getLocalName2) || mutated;
110303
111008
  mutated = applySmartArtColorStyleLabels(colorsDef, transform2.labels, getLocalName2) || mutated;
110304
- const styleLblKey = findKey31(colorsDef, "styleLbl", getLocalName2);
111009
+ const styleLblKey = findKey34(colorsDef, "styleLbl", getLocalName2);
110305
111010
  if (!styleLblKey) {
110306
111011
  return mutated;
110307
111012
  }
@@ -110315,19 +111020,19 @@ function applySmartArtColorTransform(colorsDef, transform2, getLocalName2, resol
110315
111020
  let fillIndex = 0;
110316
111021
  let lineIndex = 0;
110317
111022
  for (const label of labels) {
110318
- const fillKey = findKey31(label, "fillClrLst", getLocalName2);
111023
+ const fillKey = findKey34(label, "fillClrLst", getLocalName2);
110319
111024
  if (fillKey) {
110320
111025
  const value = transform2.fillColors[fillIndex++];
110321
- const list2 = asObject(label[fillKey]);
111026
+ const list2 = asObject2(label[fillKey]);
110322
111027
  if (list2 && value) {
110323
111028
  applyColorToList(list2, value, getLocalName2, resolveColor2);
110324
111029
  mutated = true;
110325
111030
  }
110326
111031
  }
110327
- const lineKey = findKey31(label, "linClrLst", getLocalName2);
111032
+ const lineKey = findKey34(label, "linClrLst", getLocalName2);
110328
111033
  if (lineKey) {
110329
111034
  const value = transform2.lineColors[lineIndex++];
110330
- const list2 = asObject(label[lineKey]);
111035
+ const list2 = asObject2(label[lineKey]);
110331
111036
  if (list2 && value) {
110332
111037
  applyColorToList(list2, value, getLocalName2, resolveColor2);
110333
111038
  mutated = true;
@@ -110584,40 +111289,40 @@ var init_smartart_quick_style_builder = __esm({
110584
111289
  });
110585
111290
 
110586
111291
  // src/pptx/core/core/runtime/smartart-save-chrome.ts
110587
- function asObject2(value) {
111292
+ function asObject3(value) {
110588
111293
  return value && typeof value === "object" && !Array.isArray(value) ? value : {};
110589
111294
  }
110590
111295
  function applySmartArtChrome(dataModel, chrome, getLocalName2) {
110591
111296
  if (!chrome || !chrome.backgroundColor && !chrome.backgroundFillXml && !chrome.outlineColor && (chrome.outlineWidth === null || chrome.outlineWidth === void 0)) {
110592
111297
  return;
110593
111298
  }
110594
- const findKey32 = (obj, name) => Object.keys(obj).find((k) => getLocalName2(k) === name);
111299
+ const findKey35 = (obj, name) => Object.keys(obj).find((k) => getLocalName2(k) === name);
110595
111300
  if (chrome.backgroundFillXml) {
110596
- const bgKey = findKey32(dataModel, "bg") ?? "dgm:bg";
110597
- const bg = asObject2(dataModel[bgKey]);
110598
- const fillKey = findKey32(bg, chrome.backgroundFillXml.localName) ?? `a:${chrome.backgroundFillXml.localName}`;
111301
+ const bgKey = findKey35(dataModel, "bg") ?? "dgm:bg";
111302
+ const bg = asObject3(dataModel[bgKey]);
111303
+ const fillKey = findKey35(bg, chrome.backgroundFillXml.localName) ?? `a:${chrome.backgroundFillXml.localName}`;
110599
111304
  bg[fillKey] = chrome.backgroundFillXml.xml;
110600
111305
  dataModel[bgKey] = bg;
110601
111306
  } else if (chrome.backgroundColor) {
110602
111307
  const hex3 = chrome.backgroundColor.replace("#", "");
110603
- const bgKey = findKey32(dataModel, "bg") ?? "dgm:bg";
110604
- const bg = asObject2(dataModel[bgKey]);
110605
- const fillKey = findKey32(bg, "solidFill") ?? "a:solidFill";
111308
+ const bgKey = findKey35(dataModel, "bg") ?? "dgm:bg";
111309
+ const bg = asObject3(dataModel[bgKey]);
111310
+ const fillKey = findKey35(bg, "solidFill") ?? "a:solidFill";
110606
111311
  bg[fillKey] = { "a:srgbClr": { "@_val": hex3 } };
110607
111312
  dataModel[bgKey] = bg;
110608
111313
  }
110609
111314
  const hasOutlineWidth = chrome.outlineWidth !== null && chrome.outlineWidth !== void 0;
110610
111315
  if (chrome.outlineColor || hasOutlineWidth) {
110611
- const wholeKey = findKey32(dataModel, "whole") ?? "dgm:whole";
110612
- const whole = asObject2(dataModel[wholeKey]);
110613
- const lnKey = findKey32(whole, "ln") ?? "a:ln";
110614
- const ln = asObject2(whole[lnKey]);
111316
+ const wholeKey = findKey35(dataModel, "whole") ?? "dgm:whole";
111317
+ const whole = asObject3(dataModel[wholeKey]);
111318
+ const lnKey = findKey35(whole, "ln") ?? "a:ln";
111319
+ const ln = asObject3(whole[lnKey]);
110615
111320
  if (hasOutlineWidth) {
110616
111321
  ln["@_w"] = String(Math.round(chrome.outlineWidth * 12700));
110617
111322
  }
110618
111323
  if (chrome.outlineColor) {
110619
111324
  const hex3 = chrome.outlineColor.replace("#", "");
110620
- const fillKey = findKey32(ln, "solidFill") ?? "a:solidFill";
111325
+ const fillKey = findKey35(ln, "solidFill") ?? "a:solidFill";
110621
111326
  ln[fillKey] = { "a:srgbClr": { "@_val": hex3 } };
110622
111327
  }
110623
111328
  whole[lnKey] = ln;
@@ -128960,6 +129665,7 @@ var init_PptxHandlerRuntimeChartColorStyle = __esm({
128960
129665
  var SCATTER_STYLES, PptxHandlerRuntime94;
128961
129666
  var init_PptxHandlerRuntimeChartParsing = __esm({
128962
129667
  "src/pptx/core/core/runtime/PptxHandlerRuntimeChartParsing.ts"() {
129668
+ init_units2();
128963
129669
  init_chart_advanced_parser();
128964
129670
  init_chart_axis_parser();
128965
129671
  init_chart_band_fmts();
@@ -129542,6 +130248,10 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
129542
130248
  const lineNoFill = seriesLine ? Object.keys(seriesLine).some(
129543
130249
  (key2) => this.compatibilityService.getXmlLocalName(key2) === "noFill"
129544
130250
  ) : false;
130251
+ const lineWidthEmu = Number(seriesLine?.["@_w"]);
130252
+ const lineWidth = Number.isFinite(lineWidthEmu) && lineWidthEmu > 0 ? lineWidthEmu / EMU_PER_POINT : void 0;
130253
+ const lineDashRaw = this.xmlLookupService.getChildByLocalName(seriesLine, "prstDash")?.["@_val"];
130254
+ const lineDashStyle = typeof lineDashRaw === "string" && lineDashRaw.length > 0 ? lineDashRaw : void 0;
129545
130255
  const smoothNode = this.xmlLookupService.getChildByLocalName(seriesNode, "smooth");
129546
130256
  const smooth = smoothNode ? !(smoothNode["@_val"] === "0" || smoothNode["@_val"] === "false") : void 0;
129547
130257
  const invertNode = this.xmlLookupService.getChildByLocalName(seriesNode, "invertIfNegative");
@@ -129560,6 +130270,8 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
129560
130270
  ...bubbleSizes.length > 0 ? { bubbleSizes } : {},
129561
130271
  ...dataLabelOptions && Object.keys(dataLabelOptions).length > 0 ? { dataLabelOptions } : {},
129562
130272
  ...lineNoFill ? { lineNoFill } : {},
130273
+ ...lineWidth !== void 0 ? { lineWidth } : {},
130274
+ ...lineDashStyle ? { lineDashStyle } : {},
129563
130275
  ...seriesNumberFormat ? { numberFormat: seriesNumberFormat } : {},
129564
130276
  color: seriesColor2,
129565
130277
  ...this.colorStyleCodec ? seriesGradientFill(seriesShapeProperties, this.xmlLookupService, this.colorStyleCodec) : {},
@@ -135846,6 +136558,9 @@ function cssColorSafe(value) {
135846
136558
  }
135847
136559
  return void 0;
135848
136560
  }
136561
+ function cssBorderPx(width) {
136562
+ return Math.max(1, Math.round(width));
136563
+ }
135849
136564
  function cssFontFamilySafe(value) {
135850
136565
  if (typeof value !== "string") {
135851
136566
  return void 0;
@@ -135973,19 +136688,19 @@ ${htmlRows.join("\n")}
135973
136688
  const edges = [];
135974
136689
  const topColor = cssColorSafe(style.borderTopColor);
135975
136690
  if (style.borderTopWidth && topColor) {
135976
- edges.push(`border-top:${Math.round(style.borderTopWidth)}px solid ${topColor}`);
136691
+ edges.push(`border-top:${cssBorderPx(style.borderTopWidth)}px solid ${topColor}`);
135977
136692
  }
135978
136693
  const bottomColor = cssColorSafe(style.borderBottomColor);
135979
136694
  if (style.borderBottomWidth && bottomColor) {
135980
- edges.push(`border-bottom:${Math.round(style.borderBottomWidth)}px solid ${bottomColor}`);
136695
+ edges.push(`border-bottom:${cssBorderPx(style.borderBottomWidth)}px solid ${bottomColor}`);
135981
136696
  }
135982
136697
  const leftColor = cssColorSafe(style.borderLeftColor);
135983
136698
  if (style.borderLeftWidth && leftColor) {
135984
- edges.push(`border-left:${Math.round(style.borderLeftWidth)}px solid ${leftColor}`);
136699
+ edges.push(`border-left:${cssBorderPx(style.borderLeftWidth)}px solid ${leftColor}`);
135985
136700
  }
135986
136701
  const rightColor = cssColorSafe(style.borderRightColor);
135987
136702
  if (style.borderRightWidth && rightColor) {
135988
- edges.push(`border-right:${Math.round(style.borderRightWidth)}px solid ${rightColor}`);
136703
+ edges.push(`border-right:${cssBorderPx(style.borderRightWidth)}px solid ${rightColor}`);
135989
136704
  }
135990
136705
  const fallback = cssColorSafe(style.borderColor);
135991
136706
  if (edges.length === 0 && fallback) {
@@ -136005,7 +136720,7 @@ ${htmlRows.join("\n")}
136005
136720
  if (t === 0 && r === 0 && b === 0 && l === 0) {
136006
136721
  return "";
136007
136722
  }
136008
- return `padding:${t}px ${r}px ${b}px ${l}px`;
136723
+ return `padding:${Math.round(t)}px ${Math.round(r)}px ${Math.round(b)}px ${Math.round(l)}px`;
136009
136724
  }
136010
136725
  /**
136011
136726
  * Renders cell content as HTML spans preserving per-run styling