ooxml-core 1.29.0 → 1.30.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 (308) hide show
  1. package/dist/{PptxHandler-CZG6ISCZ.cjs → PptxHandler-3OLZT5YW.cjs} +3 -3
  2. package/dist/{PptxHandler-QIHYALOV.mjs → PptxHandler-FJHKJEZU.mjs} +2 -2
  3. package/dist/PptxHandler-LOFY2PRO.mjs +4 -0
  4. package/dist/{PresentationBuilder-UAINQZA2.mjs → PresentationBuilder-23M6WQK3.mjs} +2 -2
  5. package/dist/{PresentationBuilder-66EU3N3O.cjs → PresentationBuilder-LVIVJZIL.cjs} +5 -5
  6. package/dist/{PresentationBuilder-5YM2L7DA.mjs → PresentationBuilder-W5VRPFLM.mjs} +2 -2
  7. package/dist/automation/index.cjs +4250 -3145
  8. package/dist/automation/index.mjs +4250 -3145
  9. package/dist/chart/box-distribution.d.ts +10 -0
  10. package/dist/chart/box-distribution.d.ts.map +1 -0
  11. package/dist/chart/data-table-layout.d.ts +8 -0
  12. package/dist/chart/data-table-layout.d.ts.map +1 -0
  13. package/dist/chart/date-axis.d.ts +3 -0
  14. package/dist/chart/date-axis.d.ts.map +1 -0
  15. package/dist/chart/date-format.d.ts +39 -0
  16. package/dist/chart/date-format.d.ts.map +1 -0
  17. package/dist/chart/edit/chartex-action.d.ts.map +1 -1
  18. package/dist/chart/edit/chartex-axis.d.ts.map +1 -1
  19. package/dist/chart/edit/chartex-structure.d.ts.map +1 -1
  20. package/dist/chart/edit/chartex.d.ts +3 -1
  21. package/dist/chart/edit/chartex.d.ts.map +1 -1
  22. package/dist/chart/edit/draft.d.ts.map +1 -1
  23. package/dist/chart/funnel-geometry.d.ts +15 -0
  24. package/dist/chart/funnel-geometry.d.ts.map +1 -0
  25. package/dist/chart/index.cjs +1392 -404
  26. package/dist/chart/index.d.ts +6 -0
  27. package/dist/chart/index.d.ts.map +1 -1
  28. package/dist/chart/index.mjs +1379 -405
  29. package/dist/chart/line-path.d.ts +30 -0
  30. package/dist/chart/line-path.d.ts.map +1 -0
  31. package/dist/chart/manual-layout.d.ts +15 -0
  32. package/dist/chart/manual-layout.d.ts.map +1 -1
  33. package/dist/chart/render/chart-svg-analysis.d.ts +2 -0
  34. package/dist/chart/render/chart-svg-analysis.d.ts.map +1 -1
  35. package/dist/chart/render/chart-svg-bars.d.ts.map +1 -1
  36. package/dist/chart/render/chart-svg-box.d.ts +5 -0
  37. package/dist/chart/render/chart-svg-box.d.ts.map +1 -0
  38. package/dist/chart/render/chart-svg-cartesian.d.ts +3 -1
  39. package/dist/chart/render/chart-svg-cartesian.d.ts.map +1 -1
  40. package/dist/chart/render/chart-svg-data-table.d.ts +11 -0
  41. package/dist/chart/render/chart-svg-data-table.d.ts.map +1 -0
  42. package/dist/chart/render/chart-svg-date-axis.d.ts +9 -0
  43. package/dist/chart/render/chart-svg-date-axis.d.ts.map +1 -0
  44. package/dist/chart/render/chart-svg-funnel.d.ts +4 -0
  45. package/dist/chart/render/chart-svg-funnel.d.ts.map +1 -0
  46. package/dist/chart/render/chart-svg-labels.d.ts +16 -16
  47. package/dist/chart/render/chart-svg-labels.d.ts.map +1 -1
  48. package/dist/chart/render/chart-svg-line.d.ts +5 -0
  49. package/dist/chart/render/chart-svg-line.d.ts.map +1 -0
  50. package/dist/chart/render/chart-svg-plot-layout.d.ts +6 -0
  51. package/dist/chart/render/chart-svg-plot-layout.d.ts.map +1 -0
  52. package/dist/chart/render/chart-svg-plots.d.ts +2 -1
  53. package/dist/chart/render/chart-svg-plots.d.ts.map +1 -1
  54. package/dist/chart/render/chart-svg-radial.d.ts.map +1 -1
  55. package/dist/chart/render/chart-svg-slice-labels.d.ts +18 -0
  56. package/dist/chart/render/chart-svg-slice-labels.d.ts.map +1 -0
  57. package/dist/chart/render/chart-svg-xy.d.ts +2 -1
  58. package/dist/chart/render/chart-svg-xy.d.ts.map +1 -1
  59. package/dist/chart/render/chart-svg.d.ts.map +1 -1
  60. package/dist/chart/render/chart-title-text.d.ts +3 -1
  61. package/dist/chart/render/chart-title-text.d.ts.map +1 -1
  62. package/dist/chart/render/chart-view-analysis.d.ts +2 -1
  63. package/dist/chart/render/chart-view-analysis.d.ts.map +1 -1
  64. package/dist/chart/render/chart-view-data-table.d.ts +13 -0
  65. package/dist/chart/render/chart-view-data-table.d.ts.map +1 -0
  66. package/dist/chart/render/chart-view-labels.d.ts +6 -1
  67. package/dist/chart/render/chart-view-labels.d.ts.map +1 -1
  68. package/dist/chart/render/chart-view-series.d.ts.map +1 -1
  69. package/dist/chart/render/chart-view.d.ts +13 -0
  70. package/dist/chart/render/chart-view.d.ts.map +1 -1
  71. package/dist/chart/render/render-space.d.ts.map +1 -1
  72. package/dist/chart/render/summary-ex-series.d.ts +5 -0
  73. package/dist/chart/render/summary-ex-series.d.ts.map +1 -0
  74. package/dist/chart/render/summary-from-chartex.d.ts.map +1 -1
  75. package/dist/chart/render/summary-from-space.d.ts +1 -1
  76. package/dist/chart/render/summary-from-space.d.ts.map +1 -1
  77. package/dist/chart/render/summary-labels.d.ts.map +1 -1
  78. package/dist/chart/render/summary.d.ts +14 -1
  79. package/dist/chart/render/summary.d.ts.map +1 -1
  80. package/dist/{chunk-BBK3UB7M.mjs → chunk-5YZFO55V.mjs} +4 -4
  81. package/dist/{chunk-T7HBA3CW.cjs → chunk-7T3SJQA6.cjs} +11 -9
  82. package/dist/{chunk-XROY25LN.cjs → chunk-7XYVFUB3.cjs} +4 -0
  83. package/dist/{chunk-GUNTIFGT.cjs → chunk-CZXM4ZJH.cjs} +158 -26
  84. package/dist/{chunk-RYOJHYA3.mjs → chunk-DJ3CDTMX.mjs} +157 -27
  85. package/dist/{chunk-KBER3RAP.mjs → chunk-HDHUJM5M.mjs} +229 -227
  86. package/dist/{chunk-XCRDAVFN.mjs → chunk-HK7DVTEF.mjs} +237 -95
  87. package/dist/{chunk-6C4NLBLB.mjs → chunk-JZ64GVIB.mjs} +1 -1
  88. package/dist/{chunk-3UMDVJRN.mjs → chunk-NBMXEVHL.mjs} +4 -1
  89. package/dist/{chunk-TVJL7QIG.cjs → chunk-OGEL4Z4S.cjs} +8 -1
  90. package/dist/{chunk-HRU3KOE5.mjs → chunk-OORQCSVA.mjs} +5 -3
  91. package/dist/{chunk-7RJYOVQU.mjs → chunk-R7NS42KQ.mjs} +5 -2
  92. package/dist/{chunk-I2CGNAP2.cjs → chunk-SCK5U362.cjs} +1390 -1388
  93. package/dist/{chunk-DWEQWFQU.mjs → chunk-SCTM27HK.mjs} +229 -227
  94. package/dist/{chunk-PDZ4GQLI.mjs → chunk-UVYWAI4M.mjs} +1 -1
  95. package/dist/{chunk-DXOBT2JE.mjs → chunk-UZWV2HAJ.mjs} +8 -2
  96. package/dist/{chunk-IETFPVLN.cjs → chunk-XTUX5RMG.cjs} +15 -12
  97. package/dist/diagram/drawing.d.ts.map +1 -1
  98. package/dist/diagram/index.cjs +1218 -592
  99. package/dist/diagram/index.mjs +1218 -592
  100. package/dist/diagram/load.d.ts.map +1 -1
  101. package/dist/diagram/relationships.d.ts +1 -0
  102. package/dist/diagram/relationships.d.ts.map +1 -1
  103. package/dist/diagram/types.d.ts +2 -0
  104. package/dist/diagram/types.d.ts.map +1 -1
  105. package/dist/docx/diagram.d.ts.map +1 -1
  106. package/dist/docx/drawing.d.ts.map +1 -1
  107. package/dist/docx/embedded.cjs +1850 -1138
  108. package/dist/docx/embedded.mjs +1850 -1138
  109. package/dist/docx/index.cjs +3312 -1713
  110. package/dist/docx/index.mjs +3312 -1713
  111. package/dist/docx/layout/adapter.d.ts.map +1 -1
  112. package/dist/docx/layout/fonts.d.ts +1 -1
  113. package/dist/docx/layout/fonts.d.ts.map +1 -1
  114. package/dist/docx/layout/index.cjs +1933 -518
  115. package/dist/docx/layout/index.mjs +1933 -518
  116. package/dist/docx/layout/script-fonts.d.ts +6 -0
  117. package/dist/docx/layout/script-fonts.d.ts.map +1 -0
  118. package/dist/docx/load/index.cjs +1853 -1141
  119. package/dist/docx/load/index.mjs +1853 -1141
  120. package/dist/docx/parse.d.ts.map +1 -1
  121. package/dist/docx/shape-model.d.ts +2 -0
  122. package/dist/docx/shape-model.d.ts.map +1 -1
  123. package/dist/docx/shape-parse.d.ts.map +1 -1
  124. package/dist/docx/shape-svg.d.ts.map +1 -1
  125. package/dist/docx/ui/index.cjs +1763 -593
  126. package/dist/docx/ui/index.mjs +1763 -593
  127. package/dist/docx/write-shape.d.ts.map +1 -1
  128. package/dist/drawingml/custom-geometry.d.ts +5 -0
  129. package/dist/drawingml/custom-geometry.d.ts.map +1 -0
  130. package/dist/drawingml/drawing-fill.d.ts.map +1 -1
  131. package/dist/drawingml/drawing-geometry.d.ts.map +1 -1
  132. package/dist/drawingml/image-content-type.d.ts +2 -0
  133. package/dist/drawingml/image-content-type.d.ts.map +1 -0
  134. package/dist/drawingml/index.cjs +1128 -179
  135. package/dist/drawingml/index.d.ts +9 -0
  136. package/dist/drawingml/index.d.ts.map +1 -1
  137. package/dist/drawingml/index.mjs +1110 -180
  138. package/dist/drawingml/path-data.d.ts +4 -0
  139. package/dist/drawingml/path-data.d.ts.map +1 -0
  140. package/dist/drawingml/picture-crop.d.ts +8 -0
  141. package/dist/drawingml/picture-crop.d.ts.map +1 -0
  142. package/dist/drawingml/picture-effects.d.ts +37 -0
  143. package/dist/drawingml/picture-effects.d.ts.map +1 -0
  144. package/dist/drawingml/picture-fill.d.ts +7 -0
  145. package/dist/drawingml/picture-fill.d.ts.map +1 -0
  146. package/dist/drawingml/read-3d-values.d.ts +8 -0
  147. package/dist/drawingml/read-3d-values.d.ts.map +1 -0
  148. package/dist/drawingml/read-text-3d.d.ts +8 -0
  149. package/dist/drawingml/read-text-3d.d.ts.map +1 -0
  150. package/dist/drawingml/read-text-body.d.ts.map +1 -1
  151. package/dist/drawingml/scene3d-coordinate.d.ts +45 -0
  152. package/dist/drawingml/scene3d-coordinate.d.ts.map +1 -0
  153. package/dist/drawingml/scene3d-presets.d.ts +12 -0
  154. package/dist/drawingml/scene3d-presets.d.ts.map +1 -0
  155. package/dist/drawingml/text-3d-model.d.ts +71 -0
  156. package/dist/drawingml/text-3d-model.d.ts.map +1 -0
  157. package/dist/drawingml/text-model.d.ts +3 -0
  158. package/dist/drawingml/text-model.d.ts.map +1 -1
  159. package/dist/drawingml/types.d.ts +3 -0
  160. package/dist/drawingml/types.d.ts.map +1 -1
  161. package/dist/drawingml/write-pattern-picture.d.ts.map +1 -1
  162. package/dist/drawingml/write-text-3d.d.ts +6 -0
  163. package/dist/drawingml/write-text-3d.d.ts.map +1 -0
  164. package/dist/drawingml/write-text-body.d.ts.map +1 -1
  165. package/dist/geometry/element-transform.d.ts +3 -0
  166. package/dist/geometry/element-transform.d.ts.map +1 -1
  167. package/dist/geometry/index.cjs +69 -4
  168. package/dist/geometry/index.d.ts +2 -0
  169. package/dist/geometry/index.d.ts.map +1 -1
  170. package/dist/geometry/index.mjs +66 -5
  171. package/dist/geometry/picture-crop.d.ts +21 -0
  172. package/dist/geometry/picture-crop.d.ts.map +1 -0
  173. package/dist/geometry/resize-aspect.d.ts +12 -0
  174. package/dist/geometry/resize-aspect.d.ts.map +1 -0
  175. package/dist/index.cjs +4201 -2058
  176. package/dist/index.mjs +4201 -2058
  177. package/dist/opc/index.cjs +9 -6
  178. package/dist/opc/index.mjs +9 -6
  179. package/dist/opc/safe-href.d.ts +10 -3
  180. package/dist/opc/safe-href.d.ts.map +1 -1
  181. package/dist/pptx/automation/index.cjs +615 -360
  182. package/dist/pptx/automation/index.d.ts +6 -6
  183. package/dist/pptx/automation/index.mjs +5 -5
  184. package/dist/pptx/chunks/{elements-CCEghtE_.d.ts → elements-mSCZ84Tc.d.ts} +4 -4
  185. package/dist/pptx/chunks/elements-mSCZ84Tc.d.ts.map +1 -0
  186. package/dist/pptx/chunks/{index-D90lhgiE.d.ts → index-BQDcu_0a.d.ts} +19 -111
  187. package/dist/pptx/chunks/index-BQDcu_0a.d.ts.map +1 -0
  188. package/dist/pptx/chunks/{index-CmnbpSCL.d.ts → index-CBV1oHN7.d.ts} +5 -5
  189. package/dist/pptx/chunks/{index-CmnbpSCL.d.ts.map → index-CBV1oHN7.d.ts.map} +1 -1
  190. package/dist/pptx/chunks/{index-DJIPX0Ge.d.ts → index-PdM5zpmu.d.ts} +5 -5
  191. package/dist/pptx/chunks/{index-DJIPX0Ge.d.ts.map → index-PdM5zpmu.d.ts.map} +1 -1
  192. package/dist/pptx/chunks/{smart-art-BLBSej3J.d.ts → smart-art-DLumQo90.d.ts} +135 -103
  193. package/dist/pptx/chunks/smart-art-DLumQo90.d.ts.map +1 -0
  194. package/dist/pptx/chunks/{text-D49FKllA.d.ts → text-P9xVnXXf.d.ts} +49 -60
  195. package/dist/pptx/chunks/text-P9xVnXXf.d.ts.map +1 -0
  196. package/dist/pptx/chunks/{text-operations-DZ1IgDJN.d.ts → text-operations-hyPODwIQ.d.ts} +4 -4
  197. package/dist/pptx/chunks/{text-operations-DZ1IgDJN.d.ts.map → text-operations-hyPODwIQ.d.ts.map} +1 -1
  198. package/dist/pptx/cli/index.cjs +611 -356
  199. package/dist/pptx/cli/index.d.ts +1 -1
  200. package/dist/pptx/cli/index.mjs +4 -4
  201. package/dist/pptx/converter/index.cjs +102 -67
  202. package/dist/pptx/converter/index.d.ts +1 -1
  203. package/dist/pptx/converter/index.mjs +2 -2
  204. package/dist/pptx/editor/render/collaboration-assets.cjs +15 -11
  205. package/dist/pptx/editor/render/collaboration-assets.d.ts +2 -2
  206. package/dist/pptx/editor/render/collaboration-assets.mjs +1 -1
  207. package/dist/pptx/editor/render/collaboration-live-patch-target.cjs +5 -5
  208. package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +3 -3
  209. package/dist/pptx/editor/render/collaboration-reconcile.cjs +9 -9
  210. package/dist/pptx/editor/render/collaboration-reconcile.d.ts.map +1 -1
  211. package/dist/pptx/editor/render/collaboration-reconcile.mjs +3 -3
  212. package/dist/pptx/editor/render/collaboration-sync.cjs +29 -25
  213. package/dist/pptx/editor/render/collaboration-sync.d.ts +7 -0
  214. package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
  215. package/dist/pptx/editor/render/collaboration-sync.mjs +2 -2
  216. package/dist/pptx/editor/render/find-replace.cjs +14 -14
  217. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  218. package/dist/pptx/editor/render/find-replace.mjs +1 -1
  219. package/dist/pptx/editor/render/font-family-update.d.ts +1 -1
  220. package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +1 -1
  221. package/dist/pptx/editor/render/slide-operations.cjs +8 -8
  222. package/dist/pptx/editor/render/slide-operations.mjs +2 -2
  223. package/dist/pptx/editor/render/table-cell-edit.cjs +8 -4
  224. package/dist/pptx/editor/render/table-cell-edit.d.ts +5 -0
  225. package/dist/pptx/editor/render/table-cell-edit.d.ts.map +1 -1
  226. package/dist/pptx/editor/render/table-cell-edit.mjs +1 -1
  227. package/dist/pptx/editor/render/table-cell-merge.cjs +3 -3
  228. package/dist/pptx/editor/render/table-cell-merge.mjs +1 -1
  229. package/dist/pptx/editor/render/table-data-grid-ops.cjs +2 -2
  230. package/dist/pptx/editor/render/table-data-grid-ops.mjs +1 -1
  231. package/dist/pptx/editor/render/table-merge.cjs +5 -5
  232. package/dist/pptx/editor/render/table-merge.mjs +1 -1
  233. package/dist/pptx/editor/render/text-content-style.d.ts +1 -1
  234. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +2 -2
  235. package/dist/pptx/editor/render/text-style-scope.d.ts +2 -2
  236. package/dist/pptx/editor/render/update-text-segment-style.d.ts +1 -1
  237. package/dist/pptx/index.cjs +677 -418
  238. package/dist/pptx/index.d.ts +8 -8
  239. package/dist/pptx/index.mjs +5 -5
  240. package/dist/pptx/node/index.d.ts +1 -1
  241. package/dist/pptx/smartart-layouts/index.d.ts +1 -1
  242. package/dist/teams/index.cjs +1816 -1049
  243. package/dist/teams/index.mjs +1816 -1049
  244. package/dist/text/font-style-name.d.ts +11 -0
  245. package/dist/text/font-style-name.d.ts.map +1 -0
  246. package/dist/text/font-substitution-map.d.ts +3 -0
  247. package/dist/text/font-substitution-map.d.ts.map +1 -0
  248. package/dist/text/font-substitution.d.ts +34 -0
  249. package/dist/text/font-substitution.d.ts.map +1 -0
  250. package/dist/text/index.cjs +460 -0
  251. package/dist/text/index.d.ts +3 -0
  252. package/dist/text/index.d.ts.map +1 -1
  253. package/dist/text/index.mjs +443 -1
  254. package/dist/text/metric-font-family.d.ts +7 -0
  255. package/dist/text/metric-font-family.d.ts.map +1 -0
  256. package/dist/text/panose.d.ts +55 -0
  257. package/dist/text/panose.d.ts.map +1 -0
  258. package/dist/text/script-fonts.d.ts +26 -0
  259. package/dist/text/script-fonts.d.ts.map +1 -0
  260. package/dist/visio/edit-geometry-admission.d.ts +1 -1
  261. package/dist/visio/edit-geometry-admission.d.ts.map +1 -1
  262. package/dist/visio/edit-group-resize.d.ts +26 -0
  263. package/dist/visio/edit-group-resize.d.ts.map +1 -0
  264. package/dist/visio/edit-recalculate-index.d.ts +2 -0
  265. package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
  266. package/dist/visio/edit-resize-anchor.d.ts.map +1 -1
  267. package/dist/visio/edit-resize-plan.d.ts +14 -0
  268. package/dist/visio/edit-resize-plan.d.ts.map +1 -0
  269. package/dist/visio/edit-scope.d.ts.map +1 -1
  270. package/dist/visio/index.cjs +1326 -389
  271. package/dist/visio/index.mjs +1326 -389
  272. package/dist/visio/ui/geometry-expectation.d.ts +17 -0
  273. package/dist/visio/ui/geometry-expectation.d.ts.map +1 -0
  274. package/dist/visio/ui/guides.d.ts +2 -0
  275. package/dist/visio/ui/guides.d.ts.map +1 -1
  276. package/dist/visio/ui/index.cjs +1582 -411
  277. package/dist/visio/ui/index.d.ts +2 -0
  278. package/dist/visio/ui/index.d.ts.map +1 -1
  279. package/dist/visio/ui/index.mjs +1579 -412
  280. package/dist/visio/ui/selection-resize.d.ts +19 -0
  281. package/dist/visio/ui/selection-resize.d.ts.map +1 -0
  282. package/dist/visio/ui/shape-move.d.ts +1 -1
  283. package/dist/visio/ui/shape-move.d.ts.map +1 -1
  284. package/dist/visio/ui/shape-resize.d.ts.map +1 -1
  285. package/dist/xlsx/edit/drawings.d.ts +5 -0
  286. package/dist/xlsx/edit/drawings.d.ts.map +1 -1
  287. package/dist/xlsx/edit/session.d.ts.map +1 -1
  288. package/dist/xlsx/edit/types.d.ts +4 -0
  289. package/dist/xlsx/edit/types.d.ts.map +1 -1
  290. package/dist/xlsx/index.cjs +3908 -2256
  291. package/dist/xlsx/index.mjs +3908 -2256
  292. package/dist/xlsx/layout/chart-view.d.ts.map +1 -1
  293. package/dist/xlsx/load/index.cjs +2003 -1239
  294. package/dist/xlsx/load/index.mjs +2003 -1239
  295. package/dist/xlsx/model.d.ts +4 -0
  296. package/dist/xlsx/model.d.ts.map +1 -1
  297. package/dist/xlsx/read/chart.d.ts.map +1 -1
  298. package/dist/xlsx/read/drawing.d.ts.map +1 -1
  299. package/dist/xlsx/read/smart-art.d.ts.map +1 -1
  300. package/dist/xlsx/ui/index.cjs +3880 -2228
  301. package/dist/xlsx/ui/index.mjs +3880 -2228
  302. package/dist/xlsx/write/drawing.d.ts.map +1 -1
  303. package/package.json +1 -1
  304. package/dist/PptxHandler-DSXSXMEG.mjs +0 -4
  305. package/dist/pptx/chunks/elements-CCEghtE_.d.ts.map +0 -1
  306. package/dist/pptx/chunks/index-D90lhgiE.d.ts.map +0 -1
  307. package/dist/pptx/chunks/smart-art-BLBSej3J.d.ts.map +0 -1
  308. package/dist/pptx/chunks/text-D49FKllA.d.ts.map +0 -1
@@ -77,71 +77,10 @@ var init_type_guards = __esm({
77
77
  }
78
78
  });
79
79
 
80
- // pptx/core/utils/font-substitution.ts
81
- function stripFontStyleSuffix(fontName) {
82
- let name = fontName.trim();
83
- let stripped = false;
84
- let previous = "";
85
- let tokens = 0;
86
- for (; ; ) {
87
- const idx = name.lastIndexOf(" ");
88
- if (idx <= 0) {
89
- break;
90
- }
91
- const token2 = name.slice(idx + 1).toLowerCase().replace(/-/g, "");
92
- const prefix = FONT_WEIGHT_PREFIX_TOKENS.has(token2) && FONT_PREFIXED_WEIGHT_TOKENS.has(previous);
93
- if (!prefix && (tokens >= 2 || !FONT_STYLE_SUFFIX_TOKENS.has(token2))) {
94
- break;
95
- }
96
- name = name.slice(0, idx).trim();
97
- stripped = true;
98
- previous = prefix ? "" : token2;
99
- if (!prefix) {
100
- tokens++;
101
- }
102
- }
103
- return stripped && name.length > 0 ? name : void 0;
104
- }
105
- function getSubstituteFontFamily(fontName, panose) {
106
- const trimmed2 = fontName.trim();
107
- if (!trimmed2) {
108
- return "sans-serif";
109
- }
110
- return buildFontFamilyString(trimmed2, getSubstituteFonts(trimmed2));
111
- }
112
- function getSubstituteFonts(fontName, panose) {
113
- const trimmed2 = fontName.trim();
114
- if (!trimmed2) {
115
- return ["sans-serif"];
116
- }
117
- const baseName = stripFontStyleSuffix(trimmed2);
118
- const basePrefix = baseName ? [baseName] : [];
119
- const directSubs = FONT_SUBSTITUTION_MAP[trimmed2] ?? (baseName ? FONT_SUBSTITUTION_MAP[baseName] : void 0);
120
- if (directSubs) {
121
- return [...basePrefix, ...directSubs];
122
- }
123
- return [...basePrefix, "sans-serif"];
124
- }
125
- function buildFontFamilyString(primary, fallbacks) {
126
- const parts = [quoteFontName(primary)];
127
- for (const fb of fallbacks) {
128
- const quoted = quoteFontName(fb);
129
- if (!parts.includes(quoted)) {
130
- parts.push(quoted);
131
- }
132
- }
133
- return parts.join(", ");
134
- }
135
- function quoteFontName(name) {
136
- const trimmed2 = name.trim();
137
- if (CSS_GENERIC_FAMILIES.has(trimmed2.toLowerCase())) {
138
- return trimmed2;
139
- }
140
- return `"${trimmed2}"`;
141
- }
142
- var FONT_SUBSTITUTION_MAP, FONT_STYLE_SUFFIX_TOKENS, FONT_WEIGHT_PREFIX_TOKENS, FONT_PREFIXED_WEIGHT_TOKENS, CSS_GENERIC_FAMILIES;
143
- var init_font_substitution = __esm({
144
- "pptx/core/utils/font-substitution.ts"() {
80
+ // text/font-substitution-map.ts
81
+ var FONT_SUBSTITUTION_MAP;
82
+ var init_font_substitution_map = __esm({
83
+ "text/font-substitution-map.ts"() {
145
84
  FONT_SUBSTITUTION_MAP = {
146
85
  // Microsoft Office default fonts. The Aptos family became the Office
147
86
  // default and its metrics were drawn to sit close to Calibri, so falling
@@ -302,6 +241,37 @@ var init_font_substitution = __esm({
302
241
  Constantia: ["Liberation Serif", "Palatino", "serif"],
303
242
  Corbel: ["Liberation Sans", "Lucida Grande", "sans-serif"]
304
243
  };
244
+ }
245
+ });
246
+
247
+ // text/font-style-name.ts
248
+ function stripFontStyleSuffix(fontName) {
249
+ let name = fontName.trim();
250
+ let stripped = false;
251
+ let previous = "";
252
+ let tokens = 0;
253
+ for (; ; ) {
254
+ const idx = name.lastIndexOf(" ");
255
+ if (idx <= 0) {
256
+ break;
257
+ }
258
+ const token2 = name.slice(idx + 1).toLowerCase().replace(/-/g, "");
259
+ const prefix = FONT_WEIGHT_PREFIX_TOKENS.has(token2) && FONT_PREFIXED_WEIGHT_TOKENS.has(previous);
260
+ if (!prefix && (tokens >= 2 || !FONT_STYLE_SUFFIX_TOKENS.has(token2))) {
261
+ break;
262
+ }
263
+ name = name.slice(0, idx).trim();
264
+ stripped = true;
265
+ previous = prefix ? "" : token2;
266
+ if (!prefix) {
267
+ tokens++;
268
+ }
269
+ }
270
+ return stripped && name.length > 0 ? name : void 0;
271
+ }
272
+ var FONT_STYLE_SUFFIX_TOKENS, FONT_WEIGHT_PREFIX_TOKENS, FONT_PREFIXED_WEIGHT_TOKENS;
273
+ var init_font_style_name = __esm({
274
+ "text/font-style-name.ts"() {
305
275
  FONT_STYLE_SUFFIX_TOKENS = /* @__PURE__ */ new Set([
306
276
  "regular",
307
277
  "normal",
@@ -329,6 +299,64 @@ var init_font_substitution = __esm({
329
299
  ]);
330
300
  FONT_WEIGHT_PREFIX_TOKENS = /* @__PURE__ */ new Set(["semi", "demi", "extra", "ultra"]);
331
301
  FONT_PREFIXED_WEIGHT_TOKENS = /* @__PURE__ */ new Set(["bold", "light", "black"]);
302
+ }
303
+ });
304
+ var init_panose = __esm({
305
+ "text/panose.ts"() {
306
+ }
307
+ });
308
+
309
+ // text/font-substitution.ts
310
+ function lookupFontSubstitutes(name) {
311
+ return canonicalSubstitutes.get(name.trim().toLowerCase());
312
+ }
313
+ function getSubstituteFontFamily(fontName, panose) {
314
+ const trimmed2 = fontName.trim();
315
+ if (!trimmed2) {
316
+ return "sans-serif";
317
+ }
318
+ return buildFontFamilyString(trimmed2, getSubstituteFonts(trimmed2));
319
+ }
320
+ function getSubstituteFonts(fontName, panose) {
321
+ const trimmed2 = fontName.trim();
322
+ if (!trimmed2) {
323
+ return ["sans-serif"];
324
+ }
325
+ const baseName = stripFontStyleSuffix(trimmed2);
326
+ const basePrefix = baseName ? [baseName] : [];
327
+ const directSubs = lookupFontSubstitutes(trimmed2) ?? (baseName ? lookupFontSubstitutes(baseName) : void 0);
328
+ if (directSubs) {
329
+ return [...basePrefix, ...directSubs];
330
+ }
331
+ return [...basePrefix, "sans-serif"];
332
+ }
333
+ function buildFontFamilyString(primary, fallbacks) {
334
+ const parts = [quoteFontName(primary)];
335
+ for (const fb of fallbacks) {
336
+ const quoted = quoteFontName(fb);
337
+ if (!parts.includes(quoted)) {
338
+ parts.push(quoted);
339
+ }
340
+ }
341
+ return parts.join(", ");
342
+ }
343
+ function quoteFontName(name) {
344
+ const trimmed2 = name.trim();
345
+ if (CSS_GENERIC_FAMILIES.has(trimmed2.toLowerCase())) {
346
+ return trimmed2;
347
+ }
348
+ return `"${trimmed2.replace(/["\\\r\n\f]/g, "")}"`;
349
+ }
350
+ var canonicalSubstitutes, CSS_GENERIC_FAMILIES;
351
+ var init_font_substitution = __esm({
352
+ "text/font-substitution.ts"() {
353
+ init_font_substitution_map();
354
+ init_font_style_name();
355
+ init_panose();
356
+ init_panose();
357
+ canonicalSubstitutes = new Map(
358
+ Object.entries(FONT_SUBSTITUTION_MAP).map(([name, fonts]) => [name.toLowerCase(), fonts])
359
+ );
332
360
  CSS_GENERIC_FAMILIES = /* @__PURE__ */ new Set([
333
361
  "serif",
334
362
  "sans-serif",
@@ -347,6 +375,13 @@ var init_font_substitution = __esm({
347
375
  }
348
376
  });
349
377
 
378
+ // pptx/core/utils/font-substitution.ts
379
+ var init_font_substitution2 = __esm({
380
+ "pptx/core/utils/font-substitution.ts"() {
381
+ init_font_substitution();
382
+ }
383
+ });
384
+
350
385
  // geometry/indexed.ts
351
386
  function at(items, index) {
352
387
  const value = items[index];
@@ -33003,32 +33038,6 @@ var init_hierarchy = __esm({
33003
33038
  }
33004
33039
  });
33005
33040
 
33006
- // drawingml/dom.ts
33007
- function attributeReader(element2) {
33008
- return (name) => {
33009
- if (!element2) return void 0;
33010
- const direct = element2.getAttribute(name);
33011
- if (direct !== null) return direct;
33012
- const attributes3 = element2.attributes;
33013
- for (let index = 0; index < attributes3.length; index++) {
33014
- const candidate = attributes3.item(index);
33015
- if (candidate && candidate.localName === name) return candidate.value;
33016
- }
33017
- return void 0;
33018
- };
33019
- }
33020
- function booleanAttribute(element2, name) {
33021
- const value = attributeReader(element2)(name)?.trim().toLowerCase();
33022
- if (value === "1" || value === "true") return true;
33023
- if (value === "0" || value === "false") return false;
33024
- return void 0;
33025
- }
33026
- var init_dom = __esm({
33027
- "drawingml/dom.ts"() {
33028
- init_xml2();
33029
- }
33030
- });
33031
-
33032
33041
  // color/contrast.ts
33033
33042
  var init_contrast = __esm({
33034
33043
  "color/contrast.ts"() {
@@ -33071,6 +33080,32 @@ var init_color2 = __esm({
33071
33080
  init_theme_palette();
33072
33081
  }
33073
33082
  });
33083
+
33084
+ // drawingml/dom.ts
33085
+ function attributeReader(element2) {
33086
+ return (name) => {
33087
+ if (!element2) return void 0;
33088
+ const direct = element2.getAttribute(name);
33089
+ if (direct !== null) return direct;
33090
+ const attributes3 = element2.attributes;
33091
+ for (let index = 0; index < attributes3.length; index++) {
33092
+ const candidate = attributes3.item(index);
33093
+ if (candidate && candidate.localName === name) return candidate.value;
33094
+ }
33095
+ return void 0;
33096
+ };
33097
+ }
33098
+ function booleanAttribute(element2, name) {
33099
+ const value = attributeReader(element2)(name)?.trim().toLowerCase();
33100
+ if (value === "1" || value === "true") return true;
33101
+ if (value === "0" || value === "false") return false;
33102
+ return void 0;
33103
+ }
33104
+ var init_dom = __esm({
33105
+ "drawingml/dom.ts"() {
33106
+ init_xml2();
33107
+ }
33108
+ });
33074
33109
  var init_ordered_color_transforms = __esm({
33075
33110
  "drawingml/ordered-color-transforms.ts"() {
33076
33111
  init_color2();
@@ -33244,6 +33279,354 @@ var init_drawing_color = __esm({
33244
33279
  }
33245
33280
  });
33246
33281
 
33282
+ // drawingml/scene3d-presets.ts
33283
+ var CAMERA_PRESETS, LIGHT_RIGS, LIGHT_DIRECTIONS;
33284
+ var init_scene3d_presets = __esm({
33285
+ "drawingml/scene3d-presets.ts"() {
33286
+ CAMERA_PRESETS = /* @__PURE__ */ new Set([
33287
+ "legacyObliqueTopLeft",
33288
+ "legacyObliqueTop",
33289
+ "legacyObliqueTopRight",
33290
+ "legacyObliqueLeft",
33291
+ "legacyObliqueFront",
33292
+ "legacyObliqueRight",
33293
+ "legacyObliqueBottomLeft",
33294
+ "legacyObliqueBottom",
33295
+ "legacyObliqueBottomRight",
33296
+ "legacyPerspectiveTopLeft",
33297
+ "legacyPerspectiveTop",
33298
+ "legacyPerspectiveTopRight",
33299
+ "legacyPerspectiveLeft",
33300
+ "legacyPerspectiveFront",
33301
+ "legacyPerspectiveRight",
33302
+ "legacyPerspectiveBottomLeft",
33303
+ "legacyPerspectiveBottom",
33304
+ "legacyPerspectiveBottomRight",
33305
+ "orthographicFront",
33306
+ "isometricTopUp",
33307
+ "isometricTopDown",
33308
+ "isometricBottomUp",
33309
+ "isometricBottomDown",
33310
+ "isometricLeftUp",
33311
+ "isometricLeftDown",
33312
+ "isometricRightUp",
33313
+ "isometricRightDown",
33314
+ "isometricOffAxis1Left",
33315
+ "isometricOffAxis1Right",
33316
+ "isometricOffAxis1Top",
33317
+ "isometricOffAxis2Left",
33318
+ "isometricOffAxis2Right",
33319
+ "isometricOffAxis2Top",
33320
+ "isometricOffAxis3Left",
33321
+ "isometricOffAxis3Right",
33322
+ "isometricOffAxis3Bottom",
33323
+ "isometricOffAxis4Left",
33324
+ "isometricOffAxis4Right",
33325
+ "isometricOffAxis4Bottom",
33326
+ "obliqueTopLeft",
33327
+ "obliqueTop",
33328
+ "obliqueTopRight",
33329
+ "obliqueLeft",
33330
+ "obliqueRight",
33331
+ "obliqueBottomLeft",
33332
+ "obliqueBottom",
33333
+ "obliqueBottomRight",
33334
+ "perspectiveFront",
33335
+ "perspectiveLeft",
33336
+ "perspectiveRight",
33337
+ "perspectiveAbove",
33338
+ "perspectiveBelow",
33339
+ "perspectiveAboveLeftFacing",
33340
+ "perspectiveAboveRightFacing",
33341
+ "perspectiveContrastingLeftFacing",
33342
+ "perspectiveContrastingRightFacing",
33343
+ "perspectiveHeroicLeftFacing",
33344
+ "perspectiveHeroicRightFacing",
33345
+ "perspectiveHeroicExtremeLeftFacing",
33346
+ "perspectiveHeroicExtremeRightFacing",
33347
+ "perspectiveRelaxed",
33348
+ "perspectiveRelaxedModerately"
33349
+ ]);
33350
+ LIGHT_RIGS = /* @__PURE__ */ new Set([
33351
+ "legacyFlat1",
33352
+ "legacyFlat2",
33353
+ "legacyFlat3",
33354
+ "legacyFlat4",
33355
+ "legacyNormal1",
33356
+ "legacyNormal2",
33357
+ "legacyNormal3",
33358
+ "legacyNormal4",
33359
+ "legacyHarsh1",
33360
+ "legacyHarsh2",
33361
+ "legacyHarsh3",
33362
+ "legacyHarsh4",
33363
+ "threePt",
33364
+ "balanced",
33365
+ "soft",
33366
+ "harsh",
33367
+ "flood",
33368
+ "contrasting",
33369
+ "morning",
33370
+ "sunrise",
33371
+ "sunset",
33372
+ "chilly",
33373
+ "freezing",
33374
+ "flat",
33375
+ "twoPt",
33376
+ "glow",
33377
+ "brightRoom"
33378
+ ]);
33379
+ LIGHT_DIRECTIONS = /* @__PURE__ */ new Set(["tl", "t", "tr", "l", "r", "bl", "b", "br"]);
33380
+ }
33381
+ });
33382
+
33383
+ // drawingml/picture-effects.ts
33384
+ function picturePercentage(value) {
33385
+ const text2 = String(value ?? "").trim();
33386
+ if (!text2) return void 0;
33387
+ const percent = text2.endsWith("%");
33388
+ const n = Number(percent ? text2.slice(0, -1) : text2) / (percent ? 100 : 1e5);
33389
+ return Number.isFinite(n) ? n : void 0;
33390
+ }
33391
+ function readPictureEffect(name, attribute5) {
33392
+ if (name === "grayscl") return { kind: "grayscale" };
33393
+ if (name === "lum") {
33394
+ const brightness = picturePercentage(attribute5("bright"));
33395
+ const contrast = picturePercentage(attribute5("contrast"));
33396
+ for (const [name2, value] of [
33397
+ ["bright", brightness],
33398
+ ["contrast", contrast]
33399
+ ]) {
33400
+ const raw2 = attribute5(name2);
33401
+ if (raw2 !== void 0 && raw2 !== null && (value === void 0 || Math.abs(value) > 1))
33402
+ return void 0;
33403
+ }
33404
+ return {
33405
+ kind: "luminance",
33406
+ ...brightness !== void 0 ? { brightness } : {},
33407
+ ...contrast !== void 0 ? { contrast } : {}
33408
+ };
33409
+ }
33410
+ if (name === "alphaModFix") {
33411
+ const raw2 = attribute5("amt");
33412
+ const amount = raw2 === void 0 || raw2 === null ? 1 : picturePercentage(raw2);
33413
+ if (amount !== void 0 && amount >= 0) return { kind: "alphaModFix", amount };
33414
+ }
33415
+ return void 0;
33416
+ }
33417
+ function parsePictureEffects(blip) {
33418
+ if (!blip) return [];
33419
+ return elements(blip).map((node) => ({
33420
+ ...(node.namespaceURI === NS.a ? readPictureEffect(node.localName, (name) => node.getAttribute(name)) : void 0) ?? { kind: "unsupported", name: node.localName },
33421
+ sourceXml: buildXml(node)
33422
+ }));
33423
+ }
33424
+ function applyPictureEffects(blip, effects2) {
33425
+ if (JSON.stringify(parsePictureEffects(blip)) === JSON.stringify(effects2)) return;
33426
+ const nodes = effects2.map((effect) => {
33427
+ const name = effect.kind === "grayscale" ? "grayscl" : effect.kind === "luminance" ? "lum" : effect.kind === "unsupported" ? effect.name : effect.kind;
33428
+ const source = effect.sourceXml ? parseXml(effect.sourceXml).documentElement : void 0;
33429
+ if (effect.kind === "unsupported" && !source)
33430
+ throw new Error("An unsupported picture effect needs source XML");
33431
+ const node = source ? blip.ownerDocument.importNode(source, true) : blip.ownerDocument.createElementNS(NS.a, `a:${name}`);
33432
+ if (effect.kind !== "unsupported" && (node.namespaceURI !== NS.a || node.localName !== name))
33433
+ throw new Error("Picture effect source does not match its kind");
33434
+ const set2 = (name2, value) => {
33435
+ const original = picturePercentage(node.getAttribute(name2));
33436
+ if (value === void 0) node.removeAttribute(name2);
33437
+ else if (value !== original) {
33438
+ if (!Number.isFinite(value)) throw new RangeError("Picture effect must be finite");
33439
+ node.setAttribute(name2, String(Math.round(value * 1e5)));
33440
+ }
33441
+ };
33442
+ if (effect.kind === "luminance") {
33443
+ if ([effect.brightness, effect.contrast].some(
33444
+ (value) => value !== void 0 && (!Number.isFinite(value) || Math.abs(value) > 1)
33445
+ ))
33446
+ throw new RangeError("Picture luminance must be between -1 and 1");
33447
+ set2("bright", effect.brightness);
33448
+ set2("contrast", effect.contrast);
33449
+ }
33450
+ if (effect.kind === "alphaModFix") {
33451
+ if (effect.amount < 0) throw new RangeError("Picture alpha must be nonnegative");
33452
+ set2("amt", effect.amount);
33453
+ }
33454
+ return node;
33455
+ });
33456
+ for (const node of elements(blip)) blip.removeChild(node);
33457
+ for (const node of nodes) blip.appendChild(node);
33458
+ }
33459
+ var init_picture_effects = __esm({
33460
+ "drawingml/picture-effects.ts"() {
33461
+ init_xml2();
33462
+ }
33463
+ });
33464
+
33465
+ // drawingml/read-3d-values.ts
33466
+ function readScene3DValues(node, read) {
33467
+ const out = {};
33468
+ const camera = read.child(node, "camera");
33469
+ const light = read.child(node, "lightRig");
33470
+ for (const [key2, source, attribute5, choices] of [
33471
+ ["cameraPreset", camera, "prst", CAMERA_PRESETS],
33472
+ ["lightRigType", light, "rig", LIGHT_RIGS],
33473
+ ["lightRigDirection", light, "dir", LIGHT_DIRECTIONS]
33474
+ ]) {
33475
+ const token2 = String(read.attribute(source, attribute5) ?? "").trim();
33476
+ if (choices.has(token2)) out[key2] = token2;
33477
+ }
33478
+ const fov = integer(read.attribute(camera, "fov"));
33479
+ if (fov !== void 0 && fov >= 0 && fov <= 108e5) out.cameraFieldOfView = fov;
33480
+ const zoom = picturePercentage(read.attribute(camera, "zoom"));
33481
+ if (zoom !== void 0 && zoom > 0) out.cameraZoom = zoom;
33482
+ for (const [prefix, source] of [
33483
+ ["camera", camera],
33484
+ ["lightRig", light]
33485
+ ]) {
33486
+ const rot = read.child(source, "rot");
33487
+ for (const [axis, key2] of [
33488
+ ["lat", "RotX"],
33489
+ ["lon", "RotY"],
33490
+ ["rev", "RotZ"]
33491
+ ]) {
33492
+ const value = integer(read.attribute(rot, axis));
33493
+ if (value !== void 0 && value >= 0 && value < 216e5) out[`${prefix}${key2}`] = value;
33494
+ }
33495
+ }
33496
+ const backdrop = read.child(node, "backdrop");
33497
+ if (backdrop !== void 0) {
33498
+ out.hasBackdrop = true;
33499
+ for (const [name, prefix, attr6] of [
33500
+ ["anchor", "backdropAnchor", ""],
33501
+ ["norm", "backdropNormal", "d"],
33502
+ ["up", "backdropUp", "d"]
33503
+ ]) {
33504
+ const point2 = read.child(backdrop, name);
33505
+ for (const [axis, suffix] of [
33506
+ ["x", "X"],
33507
+ ["y", "Y"],
33508
+ ["z", "Z"]
33509
+ ]) {
33510
+ const value = integer(read.attribute(point2, `${attr6}${axis}`));
33511
+ if (value !== void 0) out[`${prefix}${suffix}`] = value;
33512
+ }
33513
+ }
33514
+ }
33515
+ return out;
33516
+ }
33517
+ function readText3DValues(node, read) {
33518
+ const out = {};
33519
+ for (const [key2, attribute5] of [
33520
+ ["extrusionHeight", "extrusionH"],
33521
+ ["contourWidth", "contourW"],
33522
+ ["z", "z"]
33523
+ ]) {
33524
+ const value = integer(read.attribute(node, attribute5));
33525
+ if (value !== void 0) out[key2] = value;
33526
+ }
33527
+ const material = String(read.attribute(node, "prstMaterial") ?? "").trim();
33528
+ if (material) out.presetMaterial = material;
33529
+ for (const [name, prefix] of [
33530
+ ["bevelT", "bevelTop"],
33531
+ ["bevelB", "bevelBottom"]
33532
+ ]) {
33533
+ const bevel2 = read.child(node, name);
33534
+ if (!bevel2) continue;
33535
+ out[`${prefix}Type`] = String(read.attribute(bevel2, "prst") || "circle").trim();
33536
+ for (const [attribute5, suffix] of [
33537
+ ["w", "Width"],
33538
+ ["h", "Height"]
33539
+ ]) {
33540
+ const value = integer(read.attribute(bevel2, attribute5));
33541
+ if (value !== void 0) out[`${prefix}${suffix}`] = value;
33542
+ }
33543
+ }
33544
+ return out;
33545
+ }
33546
+ var integer;
33547
+ var init_read_3d_values = __esm({
33548
+ "drawingml/read-3d-values.ts"() {
33549
+ init_scene3d_presets();
33550
+ init_picture_effects();
33551
+ integer = (value) => {
33552
+ if (value === void 0 || value === null || String(value).trim() === "") return void 0;
33553
+ const n = Number(value);
33554
+ return Number.isSafeInteger(n) ? n : void 0;
33555
+ };
33556
+ }
33557
+ });
33558
+
33559
+ // drawingml/picture-crop.ts
33560
+ function parsePictureCrop(blipFill) {
33561
+ const rect2 = first(blipFill, "srcRect", NS.a);
33562
+ if (!rect2) return void 0;
33563
+ const result = {};
33564
+ for (const [attr6, key2] of Object.entries(SIDES2)) {
33565
+ const raw2 = rect2.getAttribute(attr6);
33566
+ if (raw2 === null || !raw2.trim()) continue;
33567
+ const percent = raw2.endsWith("%");
33568
+ const value = Number(percent ? raw2.slice(0, -1) : raw2) / (percent ? 100 : 1e5);
33569
+ if (Number.isFinite(value)) result[key2] = value;
33570
+ }
33571
+ return result;
33572
+ }
33573
+ function applyPictureCrop(blipFill, crop) {
33574
+ let rect2 = first(blipFill, "srcRect", NS.a);
33575
+ if (!rect2 && crop && Object.values(crop).some((value) => value !== void 0)) {
33576
+ rect2 = blipFill.ownerDocument.createElementNS(NS.a, "a:srcRect");
33577
+ const blip = first(blipFill, "blip", NS.a);
33578
+ blipFill.insertBefore(rect2, blip?.nextSibling ?? blipFill.firstChild);
33579
+ }
33580
+ if (!rect2) return;
33581
+ for (const [attr6, key2] of Object.entries(SIDES2)) {
33582
+ const value = crop?.[key2];
33583
+ if (value === void 0) rect2.removeAttribute(attr6);
33584
+ else {
33585
+ if (!Number.isFinite(value)) throw new RangeError("Picture crop must be finite");
33586
+ rect2.setAttribute(attr6, String(Math.round(value * 1e5)));
33587
+ }
33588
+ }
33589
+ }
33590
+ var SIDES2;
33591
+ var init_picture_crop = __esm({
33592
+ "drawingml/picture-crop.ts"() {
33593
+ init_dom();
33594
+ SIDES2 = { l: "cropLeft", t: "cropTop", r: "cropRight", b: "cropBottom" };
33595
+ }
33596
+ });
33597
+
33598
+ // drawingml/picture-fill.ts
33599
+ function parseDrawingPictureFill(fill3) {
33600
+ const blip = first(fill3, "blip", NS.a);
33601
+ const relId = blip?.getAttributeNS(NS.r, "embed") || blip?.getAttribute("r:embed") || void 0;
33602
+ const linkRelId = blip?.getAttributeNS(NS.r, "link") || void 0;
33603
+ const crop = parsePictureCrop(fill3);
33604
+ const effects2 = parsePictureEffects(blip);
33605
+ const tile = first(fill3, "tile", NS.a);
33606
+ const rect2 = first(first(fill3, "stretch", NS.a), "fillRect", NS.a);
33607
+ const unsupported2 = [
33608
+ ...tile ? ["tile"] : [],
33609
+ ...rect2 && ["l", "t", "r", "b"].some((key2) => Number(rect2.getAttribute(key2) ?? 0) !== 0) ? ["fillRect"] : [],
33610
+ ...fill3.getAttribute("rotWithShape") === "0" || fill3.getAttribute("rotWithShape") === "false" ? ["rotWithShape"] : []
33611
+ ];
33612
+ return {
33613
+ kind: "picture",
33614
+ sourceXml: buildXml(fill3),
33615
+ ...relId ? { relId } : {},
33616
+ ...linkRelId ? { linkRelId } : {},
33617
+ ...crop ? { crop } : {},
33618
+ ...effects2.length ? { effects: effects2 } : {},
33619
+ ...unsupported2.length ? { unsupportedPicture: unsupported2 } : {}
33620
+ };
33621
+ }
33622
+ var init_picture_fill = __esm({
33623
+ "drawingml/picture-fill.ts"() {
33624
+ init_xml2();
33625
+ init_picture_crop();
33626
+ init_picture_effects();
33627
+ }
33628
+ });
33629
+
33247
33630
  // drawingml/drawing-fill.ts
33248
33631
  function fillElementOf(properties) {
33249
33632
  return properties ? elements(properties).find(
@@ -33306,17 +33689,8 @@ function parseDrawingFill(properties) {
33306
33689
  ...background ? { background } : {}
33307
33690
  };
33308
33691
  }
33309
- case "blipFill": {
33310
- const blip = first(fill3, "blip", NS.a);
33311
- const relId = blip?.getAttributeNS(NS.r, "embed") || blip?.getAttribute("r:embed") || void 0;
33312
- const linkRelId = blip?.getAttributeNS(NS.r, "link") || void 0;
33313
- return {
33314
- kind: "picture",
33315
- sourceXml: buildXml(fill3),
33316
- ...relId ? { relId } : {},
33317
- ...linkRelId ? { linkRelId } : {}
33318
- };
33319
- }
33692
+ case "blipFill":
33693
+ return parseDrawingPictureFill(fill3);
33320
33694
  default:
33321
33695
  return { kind: "unsupported", element: fill3.localName };
33322
33696
  }
@@ -33374,6 +33748,7 @@ function drawingDashLength(value) {
33374
33748
  var FILL_ELEMENTS;
33375
33749
  var init_drawing_fill = __esm({
33376
33750
  "drawingml/drawing-fill.ts"() {
33751
+ init_picture_fill();
33377
33752
  init_drawing_color();
33378
33753
  init_dom();
33379
33754
  init_xml2();
@@ -33928,6 +34303,10 @@ function drawingPatternPictureXml(fill3) {
33928
34303
  else if (blip.getAttributeNS(NS.r, attribute5) !== value)
33929
34304
  blip.setAttributeNS(NS.r, `r:${attribute5}`, value);
33930
34305
  }
34306
+ if (fill3.crop !== void 0 && JSON.stringify(before?.kind === "picture" ? before.crop : void 0) !== JSON.stringify(fill3.crop))
34307
+ applyPictureCrop(root, fill3.crop);
34308
+ if (fill3.effects !== void 0 && JSON.stringify(before?.kind === "picture" ? before.effects ?? [] : []) !== JSON.stringify(fill3.effects ?? []))
34309
+ applyPictureEffects(blip, fill3.effects ?? []);
33931
34310
  if (!fill3.sourceXml) {
33932
34311
  const stretch = doc.createElementNS(NS.a, "a:stretch");
33933
34312
  stretch.appendChild(doc.createElementNS(NS.a, "a:fillRect"));
@@ -33938,6 +34317,8 @@ function drawingPatternPictureXml(fill3) {
33938
34317
  }
33939
34318
  var init_write_pattern_picture = __esm({
33940
34319
  "drawingml/write-pattern-picture.ts"() {
34320
+ init_picture_crop();
34321
+ init_picture_effects();
33941
34322
  init_xml2();
33942
34323
  init_patch_color();
33943
34324
  init_drawing_fill();
@@ -34354,6 +34735,26 @@ var init_drawing_effects = __esm({
34354
34735
  }
34355
34736
  });
34356
34737
 
34738
+ // drawingml/scene3d-coordinate.ts
34739
+ function roundCoordinate(value) {
34740
+ return Math.round(value);
34741
+ }
34742
+ function scaleVectorToIntegers(x, y, z) {
34743
+ const allInts = Number.isInteger(x) && Number.isInteger(y) && Number.isInteger(z);
34744
+ const scale = allInts ? 1 : FRACTIONAL_VECTOR_SCALE;
34745
+ return {
34746
+ x: Math.round(x * scale),
34747
+ y: Math.round(y * scale),
34748
+ z: Math.round(z * scale)
34749
+ };
34750
+ }
34751
+ var FRACTIONAL_VECTOR_SCALE;
34752
+ var init_scene3d_coordinate = __esm({
34753
+ "drawingml/scene3d-coordinate.ts"() {
34754
+ FRACTIONAL_VECTOR_SCALE = 1e6;
34755
+ }
34756
+ });
34757
+
34357
34758
  // drawingml/write-run-properties.ts
34358
34759
  var RUN_PROPERTIES_ORDER;
34359
34760
  var init_write_run_properties = __esm({
@@ -47804,22 +48205,9 @@ var init_smartart_definition_metadata = __esm({
47804
48205
  });
47805
48206
 
47806
48207
  // pptx/core/utils/scene3d-coordinate.ts
47807
- function roundCoordinate(value) {
47808
- return Math.round(value);
47809
- }
47810
- function scaleVectorToIntegers(x, y, z) {
47811
- const allInts = Number.isInteger(x) && Number.isInteger(y) && Number.isInteger(z);
47812
- const scale = allInts ? 1 : FRACTIONAL_VECTOR_SCALE;
47813
- return {
47814
- x: Math.round(x * scale),
47815
- y: Math.round(y * scale),
47816
- z: Math.round(z * scale)
47817
- };
47818
- }
47819
- var FRACTIONAL_VECTOR_SCALE;
47820
- var init_scene3d_coordinate = __esm({
48208
+ var init_scene3d_coordinate2 = __esm({
47821
48209
  "pptx/core/utils/scene3d-coordinate.ts"() {
47822
- FRACTIONAL_VECTOR_SCALE = 1e6;
48210
+ init_scene3d_coordinate();
47823
48211
  }
47824
48212
  });
47825
48213
 
@@ -47907,10 +48295,10 @@ function asXml(value) {
47907
48295
  return value !== null && typeof value === "object" ? value : void 0;
47908
48296
  }
47909
48297
  function nonNegativeInteger(value) {
47910
- const parsed = integer(value);
48298
+ const parsed = integer2(value);
47911
48299
  return parsed !== void 0 && parsed >= 0 ? parsed : void 0;
47912
48300
  }
47913
- function integer(value) {
48301
+ function integer2(value) {
47914
48302
  if (value === void 0 || value === null || !/^-?\d+$/.test(String(value))) {
47915
48303
  return void 0;
47916
48304
  }
@@ -47918,11 +48306,11 @@ function integer(value) {
47918
48306
  return Number.isSafeInteger(parsed) ? parsed : void 0;
47919
48307
  }
47920
48308
  function coordinate(value) {
47921
- const parsed = integer(value);
48309
+ const parsed = integer2(value);
47922
48310
  return parsed !== void 0 && parsed >= -27273042329600 && parsed <= 27273042316900 ? parsed : void 0;
47923
48311
  }
47924
48312
  function positiveFixedAngle(value) {
47925
- const parsed = integer(value);
48313
+ const parsed = integer2(value);
47926
48314
  return parsed !== void 0 && parsed >= 0 && parsed < 216e5 ? parsed : void 0;
47927
48315
  }
47928
48316
  function parseBoolean3(value) {
@@ -48774,7 +49162,7 @@ function writeShape3d(spPr, shapeStyle) {
48774
49162
  }
48775
49163
  var init_save_shape_effects = __esm({
48776
49164
  "pptx/core/core/runtime/save-shape-effects.ts"() {
48777
- init_scene3d_coordinate();
49165
+ init_scene3d_coordinate2();
48778
49166
  init_effect_dag_containers();
48779
49167
  init_effect_list_roundtrip();
48780
49168
  init_authored_shape_style();
@@ -51724,7 +52112,7 @@ function readCommentMentions(node, authorName) {
51724
52112
  found.sort((a, b) => a.startIndex - b.startIndex);
51725
52113
  return found.length > 0 ? found : void 0;
51726
52114
  }
51727
- var mentionLocalName, mentionNodesOf, mentionChildrenNamed, MENTION_PERSON_KEYS, MENTION_LENGTH_KEYS, attribute3, integer2, readMention;
52115
+ var mentionLocalName, mentionNodesOf, mentionChildrenNamed, MENTION_PERSON_KEYS, MENTION_LENGTH_KEYS, attribute3, integer3, readMention;
51728
52116
  var init_modern_comment_mention_read = __esm({
51729
52117
  "pptx/core/utils/modern-comment-mention-read.ts"() {
51730
52118
  mentionLocalName = (key2) => key2.split(":").pop() || key2;
@@ -51762,7 +52150,7 @@ var init_modern_comment_mention_read = __esm({
51762
52150
  }
51763
52151
  return void 0;
51764
52152
  };
51765
- integer2 = (value) => {
52153
+ integer3 = (value) => {
51766
52154
  if (value === void 0) {
51767
52155
  return void 0;
51768
52156
  }
@@ -51771,8 +52159,8 @@ var init_modern_comment_mention_read = __esm({
51771
52159
  };
51772
52160
  readMention = (node, authorName, containerUri) => {
51773
52161
  const personId = attribute3(node, MENTION_PERSON_KEYS);
51774
- const startIndex = integer2(attribute3(node, ["@_startIndex"]));
51775
- const length = integer2(attribute3(node, MENTION_LENGTH_KEYS));
52162
+ const startIndex = integer3(attribute3(node, ["@_startIndex"]));
52163
+ const length = integer3(attribute3(node, MENTION_LENGTH_KEYS));
51776
52164
  if (!personId || startIndex === void 0 || length === void 0 || length === 0) {
51777
52165
  return void 0;
51778
52166
  }
@@ -59870,7 +60258,7 @@ var init_effect_style_extractor_fill_overlay = __esm({
59870
60258
  });
59871
60259
 
59872
60260
  // pptx/core/core/builders/effect-style-extractor-reflection.ts
59873
- function integer3(value) {
60261
+ function integer4(value) {
59874
60262
  if (value === void 0 || value === null || value === "") {
59875
60263
  return void 0;
59876
60264
  }
@@ -59887,19 +60275,19 @@ function boolean2(value) {
59887
60275
  return void 0;
59888
60276
  }
59889
60277
  function fixedFraction(value) {
59890
- const parsed = integer3(value);
60278
+ const parsed = integer4(value);
59891
60279
  return parsed !== void 0 && parsed >= 0 && parsed <= 1e5 ? parsed / 1e5 : void 0;
59892
60280
  }
59893
60281
  function extractReflectionAttributes(node, emuPerPx) {
59894
- const blur = integer3(node["@_blurRad"]);
59895
- const distance = integer3(node["@_dist"]);
59896
- const startOpacity = integer3(node["@_stA"]);
59897
- const endOpacity = integer3(node["@_endA"]);
59898
- const startPosition = integer3(node["@_stPos"]);
59899
- const endPosition = integer3(node["@_endPos"]);
59900
- const direction = integer3(node["@_dir"]);
59901
- const rotation = integer3(node["@_rot"]);
59902
- const fadeDirection = integer3(node["@_fadeDir"]);
60282
+ const blur = integer4(node["@_blurRad"]);
60283
+ const distance = integer4(node["@_dist"]);
60284
+ const startOpacity = integer4(node["@_stA"]);
60285
+ const endOpacity = integer4(node["@_endA"]);
60286
+ const startPosition = integer4(node["@_stPos"]);
60287
+ const endPosition = integer4(node["@_endPos"]);
60288
+ const direction = integer4(node["@_dir"]);
60289
+ const rotation = integer4(node["@_rot"]);
60290
+ const fadeDirection = integer4(node["@_fadeDir"]);
59903
60291
  const alignment = String(node["@_algn"] ?? "").trim();
59904
60292
  return {
59905
60293
  reflectionBlurRadius: blur !== void 0 && blur >= 0 ? blur / emuPerPx : void 0,
@@ -59911,10 +60299,10 @@ function extractReflectionAttributes(node, emuPerPx) {
59911
60299
  reflectionRotation: rotation !== void 0 ? rotation / 6e4 : void 0,
59912
60300
  reflectionDistance: distance !== void 0 && distance >= 0 ? distance / emuPerPx : void 0,
59913
60301
  reflectionFadeDirection: fadeDirection !== void 0 ? fadeDirection / 6e4 : void 0,
59914
- reflectionScaleX: integer3(node["@_sx"]),
59915
- reflectionScaleY: integer3(node["@_sy"]),
59916
- reflectionSkewX: integer3(node["@_kx"]),
59917
- reflectionSkewY: integer3(node["@_ky"]),
60302
+ reflectionScaleX: integer4(node["@_sx"]),
60303
+ reflectionScaleY: integer4(node["@_sy"]),
60304
+ reflectionSkewX: integer4(node["@_kx"]),
60305
+ reflectionSkewY: integer4(node["@_ky"]),
59918
60306
  reflectionAlignment: VALID_ALIGNMENTS.has(alignment) ? alignment : void 0,
59919
60307
  reflectionRotateWithShape: boolean2(node["@_rotWithShape"])
59920
60308
  };
@@ -94840,6 +95228,7 @@ function firstChartGroup(space) {
94840
95228
  return group;
94841
95229
  }
94842
95230
  function assignOrDelete(target, key2, value) {
95231
+ if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") return;
94843
95232
  if (value === void 0) delete target[key2];
94844
95233
  else target[key2] = value;
94845
95234
  }
@@ -95027,6 +95416,11 @@ function chartExSeriesAt(space, index) {
95027
95416
  if (!series) throw new RangeError(`No chart series at index ${String(index)}`);
95028
95417
  return series;
95029
95418
  }
95419
+ function chartExAxisAt(space, index) {
95420
+ const axis = typeof index === "number" && Number.isSafeInteger(index) ? space.plotArea.axes.find((_, position4) => position4 === index) : void 0;
95421
+ if (!axis) throw new RangeError(`No chart axis at index ${String(index)}`);
95422
+ return axis;
95423
+ }
95030
95424
  function setChartExTitle(space, text2) {
95031
95425
  return editChartExSpace(space, (draft) => {
95032
95426
  if (text2 === void 0) {
@@ -96089,6 +96483,42 @@ var init_summary_from_chartex = __esm({
96089
96483
  }
96090
96484
  });
96091
96485
 
96486
+ // chart/funnel-geometry.ts
96487
+ var init_funnel_geometry = __esm({
96488
+ "chart/funnel-geometry.ts"() {
96489
+ }
96490
+ });
96491
+
96492
+ // chart/box-distribution.ts
96493
+ var init_box_distribution = __esm({
96494
+ "chart/box-distribution.ts"() {
96495
+ }
96496
+ });
96497
+
96498
+ // chart/data-table-layout.ts
96499
+ var init_data_table_layout = __esm({
96500
+ "chart/data-table-layout.ts"() {
96501
+ }
96502
+ });
96503
+
96504
+ // chart/date-axis.ts
96505
+ var init_date_axis = __esm({
96506
+ "chart/date-axis.ts"() {
96507
+ }
96508
+ });
96509
+
96510
+ // chart/date-format.ts
96511
+ var init_date_format = __esm({
96512
+ "chart/date-format.ts"() {
96513
+ }
96514
+ });
96515
+
96516
+ // chart/line-path.ts
96517
+ var init_line_path = __esm({
96518
+ "chart/line-path.ts"() {
96519
+ }
96520
+ });
96521
+
96092
96522
  // chart/render/chart-svg-markers.ts
96093
96523
  var init_chart_svg_markers = __esm({
96094
96524
  "chart/render/chart-svg-markers.ts"() {
@@ -98598,15 +99028,14 @@ var init_chartex_intent = __esm({
98598
99028
 
98599
99029
  // chart/edit/chartex-axis.ts
98600
99030
  function editChartExAxis(space, index, edit) {
98601
- if (!Number.isSafeInteger(index) || !space.plotArea.axes[index])
98602
- throw new RangeError("No ChartEx axis at index.");
99031
+ chartExAxisAt(space, index);
98603
99032
  for (const key2 of ["min", "max", "majorUnit", "minorUnit"]) {
98604
99033
  const value = edit[key2];
98605
99034
  if (value !== void 0 && value !== null && (!Number.isFinite(value) || (key2 === "majorUnit" || key2 === "minorUnit") && value <= 0))
98606
99035
  throw new RangeError("Invalid ChartEx axis scaling.");
98607
99036
  }
98608
99037
  return editChartExSpace(space, (draft) => {
98609
- const axis = draft.plotArea.axes[index];
99038
+ const axis = chartExAxisAt(draft, index);
98610
99039
  for (const key2 of ["min", "max", "majorUnit", "minorUnit"])
98611
99040
  if (edit[key2] !== void 0) {
98612
99041
  if (axis.scaling?.kind !== "val")
@@ -99584,6 +100013,12 @@ var init_chart2 = __esm({
99584
100013
  init_data_sheet();
99585
100014
  init_workbook2();
99586
100015
  init_keep_source();
100016
+ init_line_path();
100017
+ init_date_axis();
100018
+ init_date_format();
100019
+ init_data_table_layout();
100020
+ init_funnel_geometry();
100021
+ init_box_distribution();
99587
100022
  }
99588
100023
  });
99589
100024
 
@@ -105439,103 +105874,9 @@ var init_paragraph_bullet_overrides = __esm({
105439
105874
  });
105440
105875
 
105441
105876
  // pptx/core/utils/text-body-scene3d-presets.ts
105442
- var CAMERA_PRESETS, LIGHT_RIGS, LIGHT_DIRECTIONS;
105443
105877
  var init_text_body_scene3d_presets = __esm({
105444
105878
  "pptx/core/utils/text-body-scene3d-presets.ts"() {
105445
- CAMERA_PRESETS = /* @__PURE__ */ new Set([
105446
- "legacyObliqueTopLeft",
105447
- "legacyObliqueTop",
105448
- "legacyObliqueTopRight",
105449
- "legacyObliqueLeft",
105450
- "legacyObliqueFront",
105451
- "legacyObliqueRight",
105452
- "legacyObliqueBottomLeft",
105453
- "legacyObliqueBottom",
105454
- "legacyObliqueBottomRight",
105455
- "legacyPerspectiveTopLeft",
105456
- "legacyPerspectiveTop",
105457
- "legacyPerspectiveTopRight",
105458
- "legacyPerspectiveLeft",
105459
- "legacyPerspectiveFront",
105460
- "legacyPerspectiveRight",
105461
- "legacyPerspectiveBottomLeft",
105462
- "legacyPerspectiveBottom",
105463
- "legacyPerspectiveBottomRight",
105464
- "orthographicFront",
105465
- "isometricTopUp",
105466
- "isometricTopDown",
105467
- "isometricBottomUp",
105468
- "isometricBottomDown",
105469
- "isometricLeftUp",
105470
- "isometricLeftDown",
105471
- "isometricRightUp",
105472
- "isometricRightDown",
105473
- "isometricOffAxis1Left",
105474
- "isometricOffAxis1Right",
105475
- "isometricOffAxis1Top",
105476
- "isometricOffAxis2Left",
105477
- "isometricOffAxis2Right",
105478
- "isometricOffAxis2Top",
105479
- "isometricOffAxis3Left",
105480
- "isometricOffAxis3Right",
105481
- "isometricOffAxis3Bottom",
105482
- "isometricOffAxis4Left",
105483
- "isometricOffAxis4Right",
105484
- "isometricOffAxis4Bottom",
105485
- "obliqueTopLeft",
105486
- "obliqueTop",
105487
- "obliqueTopRight",
105488
- "obliqueLeft",
105489
- "obliqueRight",
105490
- "obliqueBottomLeft",
105491
- "obliqueBottom",
105492
- "obliqueBottomRight",
105493
- "perspectiveFront",
105494
- "perspectiveLeft",
105495
- "perspectiveRight",
105496
- "perspectiveAbove",
105497
- "perspectiveBelow",
105498
- "perspectiveAboveLeftFacing",
105499
- "perspectiveAboveRightFacing",
105500
- "perspectiveContrastingLeftFacing",
105501
- "perspectiveContrastingRightFacing",
105502
- "perspectiveHeroicLeftFacing",
105503
- "perspectiveHeroicRightFacing",
105504
- "perspectiveHeroicExtremeLeftFacing",
105505
- "perspectiveHeroicExtremeRightFacing",
105506
- "perspectiveRelaxed",
105507
- "perspectiveRelaxedModerately"
105508
- ]);
105509
- LIGHT_RIGS = /* @__PURE__ */ new Set([
105510
- "legacyFlat1",
105511
- "legacyFlat2",
105512
- "legacyFlat3",
105513
- "legacyFlat4",
105514
- "legacyNormal1",
105515
- "legacyNormal2",
105516
- "legacyNormal3",
105517
- "legacyNormal4",
105518
- "legacyHarsh1",
105519
- "legacyHarsh2",
105520
- "legacyHarsh3",
105521
- "legacyHarsh4",
105522
- "threePt",
105523
- "balanced",
105524
- "soft",
105525
- "harsh",
105526
- "flood",
105527
- "contrasting",
105528
- "morning",
105529
- "sunrise",
105530
- "sunset",
105531
- "chilly",
105532
- "freezing",
105533
- "flat",
105534
- "twoPt",
105535
- "glow",
105536
- "brightRoom"
105537
- ]);
105538
- LIGHT_DIRECTIONS = /* @__PURE__ */ new Set(["tl", "t", "tr", "l", "r", "bl", "b", "br"]);
105879
+ init_scene3d_presets();
105539
105880
  }
105540
105881
  });
105541
105882
 
@@ -105546,31 +105887,13 @@ function parseTextBodyScene3d(bodyPr, style) {
105546
105887
  return;
105547
105888
  }
105548
105889
  style.textBodyScene3dXml = cloneXmlObject(scene);
105549
- const camera = child26(scene, "camera");
105550
- const light = child26(scene, "lightRig");
105551
- const typed = {
105552
- cameraPreset: enumToken(camera?.["@_prst"], CAMERA_PRESETS),
105553
- lightRigType: enumToken(light?.["@_rig"], LIGHT_RIGS),
105554
- lightRigDirection: enumToken(light?.["@_dir"], LIGHT_DIRECTIONS)
105555
- };
105556
- const fov = finiteInt(camera?.["@_fov"]);
105557
- if (fov !== void 0 && fov >= 0 && fov <= 108e5) {
105558
- typed.cameraFieldOfView = fov;
105559
- }
105560
- const zoom = percentage(camera?.["@_zoom"]);
105561
- if (zoom !== void 0) {
105562
- typed.cameraZoom = zoom;
105563
- }
105564
- applyRotation(typed, camera, "camera");
105565
- applyRotation(typed, light, "lightRig");
105566
- const backdrop = child26(scene, "backdrop");
105567
- if (backdrop) {
105568
- typed.hasBackdrop = true;
105569
- applyPoint(typed, child26(backdrop, "anchor"), "backdropAnchor");
105570
- applyPoint(typed, child26(backdrop, "norm"), "backdropNormal", "d");
105571
- applyPoint(typed, child26(backdrop, "up"), "backdropUp", "d");
105572
- }
105573
- style.textBodyScene3d = typed;
105890
+ const typed = readScene3DValues(scene, { child: child26, attribute: (node, name) => node?.[`@_${name}`] });
105891
+ style.textBodyScene3d = {
105892
+ cameraPreset: void 0,
105893
+ lightRigType: void 0,
105894
+ lightRigDirection: void 0,
105895
+ ...typed
105896
+ };
105574
105897
  }
105575
105898
  function applyTextBodyScene3d(bodyPr, style) {
105576
105899
  const existingKey = childKey2(bodyPr, "scene3d");
@@ -105636,11 +105959,12 @@ function applyTextBodyScene3d(bodyPr, style) {
105636
105959
  }
105637
105960
  bodyPr[existingKey ?? "a:scene3d"] = ordered2(scene, ["camera", "lightRig", "backdrop", "extLst"]);
105638
105961
  }
105639
- var localName19, childKey2, child26, finiteInt, percentage, enumToken, applyRotation, applyPoint, setAttrs, setChild4, ordered2, rotationXml, anchorXml, vectorXml;
105962
+ var localName19, childKey2, child26, enumToken, setAttrs, setChild4, ordered2, rotationXml, anchorXml, vectorXml;
105640
105963
  var init_text_body_scene3d = __esm({
105641
105964
  "pptx/core/utils/text-body-scene3d.ts"() {
105965
+ init_read_3d_values();
105642
105966
  init_clone_utils();
105643
- init_scene3d_coordinate();
105967
+ init_scene3d_coordinate2();
105644
105968
  init_text_body_scene3d_presets();
105645
105969
  localName19 = (key2) => key2.replace(/^@_/, "").split(":").pop() ?? key2;
105646
105970
  childKey2 = (node, local) => Object.keys(node).find((key2) => !key2.startsWith("@_") && localName19(key2) === local);
@@ -105651,49 +105975,10 @@ var init_text_body_scene3d = __esm({
105651
105975
  const key2 = childKey2(node, local);
105652
105976
  return key2 ? node[key2] : void 0;
105653
105977
  };
105654
- finiteInt = (value) => {
105655
- const parsed = Number(value);
105656
- return Number.isInteger(parsed) ? parsed : void 0;
105657
- };
105658
- percentage = (value) => {
105659
- if (typeof value === "string" && value.endsWith("%")) {
105660
- const parsed2 = Number(value.slice(0, -1));
105661
- return Number.isFinite(parsed2) && parsed2 > 0 ? parsed2 / 100 : void 0;
105662
- }
105663
- const parsed = finiteInt(value);
105664
- return parsed !== void 0 && parsed > 0 ? parsed / 1e5 : void 0;
105665
- };
105666
105978
  enumToken = (value, allowed) => {
105667
105979
  const token2 = String(value ?? "").trim();
105668
105980
  return allowed.has(token2) ? token2 : void 0;
105669
105981
  };
105670
- applyRotation = (target, node, prefix) => {
105671
- const rot = child26(node, "rot");
105672
- const x = finiteInt(rot?.["@_lat"]);
105673
- const y = finiteInt(rot?.["@_lon"]);
105674
- const z = finiteInt(rot?.["@_rev"]);
105675
- if (x !== void 0) {
105676
- target[`${prefix}RotX`] = x;
105677
- }
105678
- if (y !== void 0) {
105679
- target[`${prefix}RotY`] = y;
105680
- }
105681
- if (z !== void 0) {
105682
- target[`${prefix}RotZ`] = z;
105683
- }
105684
- };
105685
- applyPoint = (target, node, prefix, attrPrefix = "") => {
105686
- for (const [axis, suffix] of [
105687
- ["x", "X"],
105688
- ["y", "Y"],
105689
- ["z", "Z"]
105690
- ]) {
105691
- const value = finiteInt(node?.[`@_${attrPrefix}${axis}`]);
105692
- if (value !== void 0) {
105693
- target[`${prefix}${suffix}`] = value;
105694
- }
105695
- }
105696
- };
105697
105982
  setAttrs = (node, attrs3) => {
105698
105983
  for (const [key2, value] of Object.entries(attrs3)) {
105699
105984
  if (value !== void 0) {
@@ -105721,6 +106006,10 @@ var init_text_body_scene3d = __esm({
105721
106006
  return result;
105722
106007
  };
105723
106008
  rotationXml = (x, y, z) => {
106009
+ if ([x, y, z].some(
106010
+ (value) => value !== void 0 && (!Number.isSafeInteger(value) || value < 0 || value >= 216e5)
106011
+ ))
106012
+ throw new RangeError("Invalid 3D rotation angle");
105724
106013
  if (![x, y, z].some(Number.isInteger)) {
105725
106014
  return void 0;
105726
106015
  }
@@ -105749,29 +106038,6 @@ var init_text_body_scene3d = __esm({
105749
106038
  });
105750
106039
 
105751
106040
  // pptx/core/utils/text-body-sp3d.ts
105752
- function intAttr2(value) {
105753
- if (value === void 0 || value === null) {
105754
- return void 0;
105755
- }
105756
- const parsed = parseInt(String(value), 10);
105757
- return Number.isFinite(parsed) ? parsed : void 0;
105758
- }
105759
- function applyBevel(bevel2, t3d, prefix) {
105760
- if (!bevel2) {
105761
- return;
105762
- }
105763
- t3d[`${prefix}Type`] = String(
105764
- bevel2["@_prst"] || "circle"
105765
- ).trim();
105766
- const width = intAttr2(bevel2["@_w"]);
105767
- if (width !== void 0) {
105768
- t3d[`${prefix}Width`] = width;
105769
- }
105770
- const height = intAttr2(bevel2["@_h"]);
105771
- if (height !== void 0) {
105772
- t3d[`${prefix}Height`] = height;
105773
- }
105774
- }
105775
106041
  function parseTextBodySp3d(bodyPr, style, parseColor) {
105776
106042
  if (bodyPr["a:flatTx"] !== void 0) {
105777
106043
  style.flatText = true;
@@ -105781,27 +106047,23 @@ function parseTextBodySp3d(bodyPr, style, parseColor) {
105781
106047
  if (!sp3d) {
105782
106048
  return;
105783
106049
  }
105784
- const t3d = {};
105785
- const extrusionHeight = intAttr2(sp3d["@_extrusionH"]);
105786
- if (extrusionHeight !== void 0) {
105787
- t3d.extrusionHeight = extrusionHeight;
105788
- }
106050
+ const values = readText3DValues(sp3d, {
106051
+ attribute: (node, name) => node?.[`@_${name}`],
106052
+ child: (node, name) => node?.[`a:${name}`]
106053
+ });
106054
+ const { z: _z, contourWidth: _contourWidth, ...scalars } = values;
106055
+ const t3d = scalars;
105789
106056
  const extrusionColor = parseColor(sp3d["a:extrusionClr"]);
105790
106057
  if (extrusionColor) {
105791
106058
  t3d.extrusionColor = extrusionColor;
105792
106059
  }
105793
- const material = String(sp3d["@_prstMaterial"] || "").trim();
105794
- if (material) {
105795
- t3d.presetMaterial = material;
105796
- }
105797
- applyBevel(sp3d["a:bevelT"], t3d, "bevelTop");
105798
- applyBevel(sp3d["a:bevelB"], t3d, "bevelBottom");
105799
106060
  if (Object.keys(t3d).length > 0) {
105800
106061
  style.text3d = t3d;
105801
106062
  }
105802
106063
  }
105803
106064
  var init_text_body_sp3d = __esm({
105804
106065
  "pptx/core/utils/text-body-sp3d.ts"() {
106066
+ init_read_3d_values();
105805
106067
  }
105806
106068
  });
105807
106069
 
@@ -119361,8 +119623,8 @@ function parsePercent(value, fixed) {
119361
119623
  if (!text2) {
119362
119624
  return void 0;
119363
119625
  }
119364
- const strict = text2.endsWith("%");
119365
- const parsed = Number(strict ? text2.slice(0, -1) : text2) / (strict ? 1 : 1e3);
119626
+ const fraction = picturePercentage(text2);
119627
+ const parsed = fraction === void 0 ? NaN : fraction * 100;
119366
119628
  if (!Number.isFinite(parsed) || parsed < 0 || fixed && parsed > 100) {
119367
119629
  return void 0;
119368
119630
  }
@@ -119487,6 +119749,7 @@ function applyImageAlphaEffects(blip, effects2, parseColor) {
119487
119749
  var localName25;
119488
119750
  var init_image_alpha_effects = __esm({
119489
119751
  "pptx/core/core/runtime/image-alpha-effects.ts"() {
119752
+ init_picture_effects();
119490
119753
  init_color_xml_preservation();
119491
119754
  localName25 = (key2) => key2.split(":").at(-1) ?? key2;
119492
119755
  }
@@ -121905,6 +122168,7 @@ var init_PptxHandlerRuntimeTableStylesAndActions = __esm({
121905
122168
  var PptxHandlerRuntime5;
121906
122169
  var init_PptxHandlerRuntimeImageEffects = __esm({
121907
122170
  "pptx/core/core/runtime/PptxHandlerRuntimeImageEffects.ts"() {
122171
+ init_picture_effects();
121908
122172
  init_xml_access();
121909
122173
  init_image_a14_effects();
121910
122174
  init_image_a14_effects_model();
@@ -121953,20 +122217,11 @@ var init_PptxHandlerRuntimeImageEffects = __esm({
121953
122217
  }
121954
122218
  const lumNode = blip["a:lum"];
121955
122219
  if (lumNode) {
122220
+ const neutral = readPictureEffect("lum", (name) => lumNode[`@_${name}`]);
121956
122221
  const lumEffect = {};
121957
- const lumBright = lumNode["@_bright"];
121958
- const lumContrast = lumNode["@_contrast"];
121959
- if (lumBright !== void 0) {
121960
- const v = parseInt(String(lumBright)) / 1e3;
121961
- if (Number.isFinite(v)) {
121962
- lumEffect.bright = v;
121963
- }
121964
- }
121965
- if (lumContrast !== void 0) {
121966
- const v = parseInt(String(lumContrast)) / 1e3;
121967
- if (Number.isFinite(v)) {
121968
- lumEffect.contrast = v;
121969
- }
122222
+ if (neutral?.kind === "luminance") {
122223
+ if (neutral.brightness !== void 0) lumEffect.bright = neutral.brightness * 100;
122224
+ if (neutral.contrast !== void 0) lumEffect.contrast = neutral.contrast * 100;
121970
122225
  }
121971
122226
  effects2.lum = lumEffect;
121972
122227
  hasAny2 = true;
@@ -156551,7 +156806,7 @@ var SmartArtElementProcessor = class {
156551
156806
  };
156552
156807
 
156553
156808
  // pptx/converter/elements/TableElementProcessor.ts
156554
- init_font_substitution();
156809
+ init_font_substitution2();
156555
156810
  var SAFE_CSS_NAMED_COLORS = /* @__PURE__ */ new Set([
156556
156811
  "black",
156557
156812
  "silver",
@@ -156931,7 +157186,7 @@ ${htmlRows.join("\n")}
156931
157186
  init_type_guards();
156932
157187
 
156933
157188
  // pptx/converter/ShapeTextRenderer.ts
156934
- init_font_substitution();
157189
+ init_font_substitution2();
156935
157190
  var DEFAULT_FONT_SIZE = 18;
156936
157191
  var FALLBACK_PAD_FACTOR = 0.06;
156937
157192
  function drawTextSegments(ctx, segments, bodyStyle, w, h2, scaleFactor = 1) {