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.
- package/README.md +21 -43
- package/dist/automation/index.cjs +195 -193
- package/dist/automation/index.mjs +195 -193
- package/dist/chart/axis-nice.d.ts +97 -0
- package/dist/chart/axis-nice.d.ts.map +1 -0
- package/dist/chart/histogram-binning.d.ts +40 -0
- package/dist/chart/histogram-binning.d.ts.map +1 -0
- package/dist/chart/index.cjs +167 -0
- package/dist/chart/index.d.ts +2 -0
- package/dist/chart/index.d.ts.map +1 -1
- package/dist/chart/index.mjs +162 -1
- package/dist/diagram/index.cjs +2 -1
- package/dist/diagram/index.mjs +2 -1
- package/dist/docx/attr-units.d.ts +11 -0
- package/dist/docx/attr-units.d.ts.map +1 -0
- package/dist/docx/block-parser.d.ts.map +1 -1
- package/dist/docx/case-transform.d.ts +9 -0
- package/dist/docx/case-transform.d.ts.map +1 -0
- package/dist/docx/embedded.cjs +2 -1
- package/dist/docx/embedded.mjs +2 -1
- package/dist/docx/index.cjs +289 -3
- package/dist/docx/index.d.ts +5 -0
- package/dist/docx/index.d.ts.map +1 -1
- package/dist/docx/index.mjs +269 -4
- package/dist/docx/layout/adapter.d.ts.map +1 -1
- package/dist/docx/layout/table-layout.d.ts.map +1 -1
- package/dist/docx/load/index.cjs +2 -1
- package/dist/docx/load/index.mjs +2 -1
- package/dist/docx/page-setup-model.d.ts +29 -0
- package/dist/docx/page-setup-model.d.ts.map +1 -0
- package/dist/docx/page-size.d.ts +11 -0
- package/dist/docx/page-size.d.ts.map +1 -0
- package/dist/docx/parse.d.ts.map +1 -1
- package/dist/docx/section-edit.d.ts +19 -0
- package/dist/docx/section-edit.d.ts.map +1 -0
- package/dist/docx/tab-stops.d.ts.map +1 -1
- package/dist/docx/ui/backstage-focus.d.ts +6 -0
- package/dist/docx/ui/backstage-focus.d.ts.map +1 -0
- package/dist/docx/ui/break-note-schema.d.ts +11 -0
- package/dist/docx/ui/break-note-schema.d.ts.map +1 -0
- package/dist/docx/ui/collaboration-authority.d.ts +31 -0
- package/dist/docx/ui/collaboration-authority.d.ts.map +1 -0
- package/dist/docx/ui/collaboration-identity.d.ts +8 -0
- package/dist/docx/ui/collaboration-identity.d.ts.map +1 -0
- package/dist/docx/ui/collaboration-protocol.d.ts +25 -0
- package/dist/docx/ui/collaboration-protocol.d.ts.map +1 -0
- package/dist/docx/ui/collaboration.d.ts +30 -0
- package/dist/docx/ui/collaboration.d.ts.map +1 -0
- package/dist/docx/ui/defined.d.ts +3 -0
- package/dist/docx/ui/defined.d.ts.map +1 -0
- package/dist/docx/ui/dirty-state.d.ts +9 -0
- package/dist/docx/ui/dirty-state.d.ts.map +1 -0
- package/dist/docx/ui/field-guard.d.ts +21 -0
- package/dist/docx/ui/field-guard.d.ts.map +1 -0
- package/dist/docx/ui/header-footer-history.d.ts +15 -0
- package/dist/docx/ui/header-footer-history.d.ts.map +1 -0
- package/dist/docx/ui/index.cjs +2380 -0
- package/dist/docx/ui/index.d.ts +30 -0
- package/dist/docx/ui/index.d.ts.map +1 -0
- package/dist/docx/ui/index.mjs +2317 -0
- package/dist/docx/ui/inline-content-schema.d.ts +15 -0
- package/dist/docx/ui/inline-content-schema.d.ts.map +1 -0
- package/dist/docx/ui/ligature-style.d.ts +4 -0
- package/dist/docx/ui/ligature-style.d.ts.map +1 -0
- package/dist/docx/ui/node-numbering.d.ts +8 -0
- package/dist/docx/ui/node-numbering.d.ts.map +1 -0
- package/dist/docx/ui/review-schema.d.ts +90 -0
- package/dist/docx/ui/review-schema.d.ts.map +1 -0
- package/dist/docx/ui/ribbon-action-ids.d.ts +26 -0
- package/dist/docx/ui/ribbon-action-ids.d.ts.map +1 -0
- package/dist/docx/ui/ribbon-colors.d.ts +3 -0
- package/dist/docx/ui/ribbon-colors.d.ts.map +1 -0
- package/dist/docx/ui/ribbon-legacy-labels.d.ts +6 -0
- package/dist/docx/ui/ribbon-legacy-labels.d.ts.map +1 -0
- package/dist/docx/ui/run-compare.d.ts +5 -0
- package/dist/docx/ui/run-compare.d.ts.map +1 -0
- package/dist/docx/ui/run-extra-mark.d.ts +17 -0
- package/dist/docx/ui/run-extra-mark.d.ts.map +1 -0
- package/dist/docx/ui/schema-marks.d.ts +273 -0
- package/dist/docx/ui/schema-marks.d.ts.map +1 -0
- package/dist/docx/ui/smartart-theme.d.ts +21 -0
- package/dist/docx/ui/smartart-theme.d.ts.map +1 -0
- package/dist/docx/ui/table-render.d.ts +24 -0
- package/dist/docx/ui/table-render.d.ts.map +1 -0
- package/dist/docx/ui/table-visuals.d.ts +3 -0
- package/dist/docx/ui/table-visuals.d.ts.map +1 -0
- package/dist/docx/ui/theme/css-vars.d.ts +6 -0
- package/dist/docx/ui/theme/css-vars.d.ts.map +1 -0
- package/dist/docx/ui/theme/defaults.d.ts +12 -0
- package/dist/docx/ui/theme/defaults.d.ts.map +1 -0
- package/dist/docx/ui/theme/element.d.ts +9 -0
- package/dist/docx/ui/theme/element.d.ts.map +1 -0
- package/dist/docx/ui/theme/index.d.ts +5 -0
- package/dist/docx/ui/theme/index.d.ts.map +1 -0
- package/dist/docx/ui/theme/types.d.ts +42 -0
- package/dist/docx/ui/theme/types.d.ts.map +1 -0
- package/dist/docx/ui/word-count.d.ts +3 -0
- package/dist/docx/ui/word-count.d.ts.map +1 -0
- package/dist/docx/ui/zoom-fit.d.ts +16 -0
- package/dist/docx/ui/zoom-fit.d.ts.map +1 -0
- package/dist/docx/validate-paragraph.d.ts.map +1 -1
- package/dist/index.cjs +169 -1
- package/dist/index.mjs +169 -1
- package/dist/math/index.cjs +2 -1
- package/dist/math/index.mjs +2 -1
- package/dist/opc/index.cjs +2 -1
- package/dist/opc/index.mjs +2 -1
- package/dist/pptx/automation/index.cjs +1572 -863
- package/dist/pptx/automation/index.d.ts +4 -3
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +1572 -863
- package/dist/pptx/chunks/color-ref-BM66NGFP.d.ts +42 -0
- package/dist/pptx/chunks/color-ref-BM66NGFP.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-D0yGoLyw.d.ts → index-CcQTCBnT.d.ts} +63 -479
- package/dist/pptx/chunks/index-CcQTCBnT.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-BtBj3VG1.d.ts → index-DHoPgFcH.d.ts} +529 -11
- package/dist/pptx/chunks/index-DHoPgFcH.d.ts.map +1 -0
- package/dist/pptx/chunks/{text-operations-GuisjlbR.d.ts → text-operations-BzdehTeY.d.ts} +50 -51
- package/dist/pptx/chunks/text-operations-BzdehTeY.d.ts.map +1 -0
- package/dist/pptx/cli/index.cjs +1204 -489
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +1204 -489
- package/dist/pptx/converter/index.cjs +8 -5
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +8 -5
- package/dist/pptx/index.cjs +1699 -989
- package/dist/pptx/index.d.ts +5 -4
- package/dist/pptx/index.mjs +1698 -990
- package/dist/pptx/ui/index.cjs +510 -0
- package/dist/pptx/ui/index.d.ts +80 -0
- package/dist/pptx/ui/index.d.ts.map +1 -0
- package/dist/pptx/ui/index.mjs +499 -0
- package/dist/visio/index.cjs +2 -1
- package/dist/visio/index.mjs +2 -1
- package/dist/visio/ui/contract.d.ts +33 -0
- package/dist/visio/ui/contract.d.ts.map +1 -0
- package/dist/visio/ui/demo-document.d.ts +4 -0
- package/dist/visio/ui/demo-document.d.ts.map +1 -0
- package/dist/visio/ui/diagnostics.d.ts +10 -0
- package/dist/visio/ui/diagnostics.d.ts.map +1 -0
- package/dist/visio/ui/document-history.d.ts +43 -0
- package/dist/visio/ui/document-history.d.ts.map +1 -0
- package/dist/visio/ui/document-text-search.d.ts +45 -0
- package/dist/visio/ui/document-text-search.d.ts.map +1 -0
- package/dist/visio/ui/edit-commands.d.ts +4 -0
- package/dist/visio/ui/edit-commands.d.ts.map +1 -0
- package/dist/visio/ui/edit-error.d.ts +5 -0
- package/dist/visio/ui/edit-error.d.ts.map +1 -0
- package/dist/visio/ui/foreign-vector-budget.d.ts +25 -0
- package/dist/visio/ui/foreign-vector-budget.d.ts.map +1 -0
- package/dist/visio/ui/index.cjs +1523 -0
- package/dist/visio/ui/index.d.ts +12 -0
- package/dist/visio/ui/index.d.ts.map +1 -0
- package/dist/visio/ui/index.mjs +1498 -0
- package/dist/visio/ui/scene-details.d.ts +8 -0
- package/dist/visio/ui/scene-details.d.ts.map +1 -0
- package/dist/visio/ui/scene-validation.d.ts +5 -0
- package/dist/visio/ui/scene-validation.d.ts.map +1 -0
- package/dist/visio/ui/snapshot-scene.d.ts +9 -0
- package/dist/visio/ui/snapshot-scene.d.ts.map +1 -0
- package/dist/xlsx/index.cjs +100 -98
- package/dist/xlsx/index.mjs +100 -98
- package/dist/xlsx/load/index.cjs +68 -66
- package/dist/xlsx/load/index.mjs +68 -66
- package/dist/xlsx/ui/backstage/templates.d.ts +16 -0
- package/dist/xlsx/ui/backstage/templates.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/alignment.d.ts +4 -0
- package/dist/xlsx/ui/commands/alignment.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/cells.d.ts +3 -0
- package/dist/xlsx/ui/commands/cells.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/cf-presets.d.ts +15 -0
- package/dist/xlsx/ui/commands/cf-presets.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/clipboard.d.ts +22 -0
- package/dist/xlsx/ui/commands/clipboard.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/contextual.d.ts +13 -0
- package/dist/xlsx/ui/commands/contextual.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/data.d.ts +3 -0
- package/dist/xlsx/ui/commands/data.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/editing.d.ts +13 -0
- package/dist/xlsx/ui/commands/editing.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/font.d.ts +21 -0
- package/dist/xlsx/ui/commands/font.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/formulas.d.ts +15 -0
- package/dist/xlsx/ui/commands/formulas.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/core-features.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/core-features.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/format-cells.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/format-cells.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/index.d.ts +4 -0
- package/dist/xlsx/ui/commands/i18n/index.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/messages.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/messages.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/navigation.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/ribbon-home.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/ribbon-home.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/ribbon-tabs.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/ribbon-tabs.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/rules.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/rules.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/tools.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/tools.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/types.d.ts +5 -0
- package/dist/xlsx/ui/commands/i18n/types.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/icons.d.ts +4 -0
- package/dist/xlsx/ui/commands/icons.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/number.d.ts +11 -0
- package/dist/xlsx/ui/commands/number.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/page-layout.d.ts +10 -0
- package/dist/xlsx/ui/commands/page-layout.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/select-special.d.ts +12 -0
- package/dist/xlsx/ui/commands/select-special.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/sort-filter.d.ts +3 -0
- package/dist/xlsx/ui/commands/sort-filter.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/style-presets.d.ts +21 -0
- package/dist/xlsx/ui/commands/style-presets.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/util.d.ts +59 -0
- package/dist/xlsx/ui/commands/util.d.ts.map +1 -0
- package/dist/xlsx/ui/commands.d.ts +36 -0
- package/dist/xlsx/ui/commands.d.ts.map +1 -0
- package/dist/xlsx/ui/context-menu/items.d.ts +36 -0
- package/dist/xlsx/ui/context-menu/items.d.ts.map +1 -0
- package/dist/xlsx/ui/context.d.ts +65 -0
- package/dist/xlsx/ui/context.d.ts.map +1 -0
- package/dist/xlsx/ui/dialogs/format-cells/number-categories.d.ts +28 -0
- package/dist/xlsx/ui/dialogs/format-cells/number-categories.d.ts.map +1 -0
- package/dist/xlsx/ui/dialogs/format-cells/types.d.ts +40 -0
- package/dist/xlsx/ui/dialogs/format-cells/types.d.ts.map +1 -0
- package/dist/xlsx/ui/dialogs/insert-chart-model.d.ts +9 -0
- package/dist/xlsx/ui/dialogs/insert-chart-model.d.ts.map +1 -0
- package/dist/xlsx/ui/dialogs.d.ts +9 -0
- package/dist/xlsx/ui/dialogs.d.ts.map +1 -0
- package/dist/xlsx/ui/dirty-state.d.ts +9 -0
- package/dist/xlsx/ui/dirty-state.d.ts.map +1 -0
- package/dist/xlsx/ui/formula-bar/name-resolve.d.ts +23 -0
- package/dist/xlsx/ui/formula-bar/name-resolve.d.ts.map +1 -0
- package/dist/xlsx/ui/grid/cell-items.d.ts +42 -0
- package/dist/xlsx/ui/grid/cell-items.d.ts.map +1 -0
- package/dist/xlsx/ui/grid/cell-paint.d.ts +26 -0
- package/dist/xlsx/ui/grid/cell-paint.d.ts.map +1 -0
- package/dist/xlsx/ui/grid/edit-bridge.d.ts +47 -0
- package/dist/xlsx/ui/grid/edit-bridge.d.ts.map +1 -0
- package/dist/xlsx/ui/grid/geometry.d.ts +76 -0
- package/dist/xlsx/ui/grid/geometry.d.ts.map +1 -0
- package/dist/xlsx/ui/grid/icon-sets.d.ts +3 -0
- package/dist/xlsx/ui/grid/icon-sets.d.ts.map +1 -0
- package/dist/xlsx/ui/grid/number-fit.d.ts +3 -0
- package/dist/xlsx/ui/grid/number-fit.d.ts.map +1 -0
- package/dist/xlsx/ui/grid/selection-ops.d.ts +32 -0
- package/dist/xlsx/ui/grid/selection-ops.d.ts.map +1 -0
- package/dist/xlsx/ui/grid/view-cache.d.ts +15 -0
- package/dist/xlsx/ui/grid/view-cache.d.ts.map +1 -0
- package/dist/xlsx/ui/index.cjs +28484 -0
- package/dist/xlsx/ui/index.d.ts +56 -0
- package/dist/xlsx/ui/index.d.ts.map +1 -0
- package/dist/xlsx/ui/index.mjs +28290 -0
- package/dist/xlsx/ui/locales/de/commands.d.ts +2 -0
- package/dist/xlsx/ui/locales/de/commands.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/de/grid.d.ts +2 -0
- package/dist/xlsx/ui/locales/de/grid.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/de/index.d.ts +2 -0
- package/dist/xlsx/ui/locales/de/index.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/de/shell.d.ts +2 -0
- package/dist/xlsx/ui/locales/de/shell.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/en/commands.d.ts +2 -0
- package/dist/xlsx/ui/locales/en/commands.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/en/grid.d.ts +2 -0
- package/dist/xlsx/ui/locales/en/grid.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/en/index.d.ts +2 -0
- package/dist/xlsx/ui/locales/en/index.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/en/shell.d.ts +2 -0
- package/dist/xlsx/ui/locales/en/shell.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/es/commands.d.ts +2 -0
- package/dist/xlsx/ui/locales/es/commands.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/es/grid.d.ts +2 -0
- package/dist/xlsx/ui/locales/es/grid.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/es/index.d.ts +2 -0
- package/dist/xlsx/ui/locales/es/index.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/es/shell.d.ts +2 -0
- package/dist/xlsx/ui/locales/es/shell.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/fr/commands.d.ts +2 -0
- package/dist/xlsx/ui/locales/fr/commands.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/fr/grid.d.ts +2 -0
- package/dist/xlsx/ui/locales/fr/grid.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/fr/index.d.ts +2 -0
- package/dist/xlsx/ui/locales/fr/index.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/fr/shell.d.ts +2 -0
- package/dist/xlsx/ui/locales/fr/shell.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/merge.d.ts +7 -0
- package/dist/xlsx/ui/locales/merge.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/zh-CN/commands.d.ts +2 -0
- package/dist/xlsx/ui/locales/zh-CN/commands.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/zh-CN/grid.d.ts +2 -0
- package/dist/xlsx/ui/locales/zh-CN/grid.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/zh-CN/index.d.ts +2 -0
- package/dist/xlsx/ui/locales/zh-CN/index.d.ts.map +1 -0
- package/dist/xlsx/ui/locales/zh-CN/shell.d.ts +2 -0
- package/dist/xlsx/ui/locales/zh-CN/shell.d.ts.map +1 -0
- package/dist/xlsx/ui/localization.d.ts +23 -0
- package/dist/xlsx/ui/localization.d.ts.map +1 -0
- package/dist/xlsx/ui/ribbon/icon-paths.d.ts +9 -0
- package/dist/xlsx/ui/ribbon/icon-paths.d.ts.map +1 -0
- package/dist/xlsx/ui/ribbon/parts.d.ts +88 -0
- package/dist/xlsx/ui/ribbon/parts.d.ts.map +1 -0
- package/dist/xlsx/ui/ribbon/tab-api.d.ts +21 -0
- package/dist/xlsx/ui/ribbon/tab-api.d.ts.map +1 -0
- package/dist/xlsx/ui/ribbon/tabs/review-view.d.ts +5 -0
- package/dist/xlsx/ui/ribbon/tabs/review-view.d.ts.map +1 -0
- package/dist/xlsx/ui/ribbon/tabs/theme-palette.d.ts +8 -0
- package/dist/xlsx/ui/ribbon/tabs/theme-palette.d.ts.map +1 -0
- package/dist/xlsx/ui/ribbon/tell-me.d.ts +16 -0
- package/dist/xlsx/ui/ribbon/tell-me.d.ts.map +1 -0
- package/dist/xlsx/ui/selection.d.ts +34 -0
- package/dist/xlsx/ui/selection.d.ts.map +1 -0
- package/dist/xlsx/ui/theme/css-vars.d.ts +6 -0
- package/dist/xlsx/ui/theme/css-vars.d.ts.map +1 -0
- package/dist/xlsx/ui/theme/defaults.d.ts +6 -0
- package/dist/xlsx/ui/theme/defaults.d.ts.map +1 -0
- package/dist/xlsx/ui/theme/element.d.ts +9 -0
- package/dist/xlsx/ui/theme/element.d.ts.map +1 -0
- package/dist/xlsx/ui/theme/types.d.ts +54 -0
- package/dist/xlsx/ui/theme/types.d.ts.map +1 -0
- package/dist/xml/index.cjs +2 -1
- package/dist/xml/index.mjs +2 -1
- package/package.json +42 -4
- package/dist/pptx/chunks/index-BtBj3VG1.d.ts.map +0 -1
- package/dist/pptx/chunks/index-D0yGoLyw.d.ts.map +0 -1
- package/dist/pptx/chunks/text-operations-GuisjlbR.d.ts.map +0 -1
package/dist/pptx/index.mjs
CHANGED
|
@@ -3442,6 +3442,955 @@ var init_chart_gradient_input = __esm({
|
|
|
3442
3442
|
}
|
|
3443
3443
|
});
|
|
3444
3444
|
|
|
3445
|
+
// src/pptx/core/utils/chart-container-content-model.ts
|
|
3446
|
+
function chartTypeToContainerLocalName(chartType) {
|
|
3447
|
+
return TYPE_TO_CONTAINER[chartType];
|
|
3448
|
+
}
|
|
3449
|
+
function isKnownChartContainer(containerLocal) {
|
|
3450
|
+
return containerLocal in CHART_CONTAINER_CHILD_ORDER;
|
|
3451
|
+
}
|
|
3452
|
+
function chartContainerAllows(containerLocal, childLocal) {
|
|
3453
|
+
const order = CHART_CONTAINER_CHILD_ORDER[containerLocal];
|
|
3454
|
+
return order !== void 0 && order.includes(childLocal);
|
|
3455
|
+
}
|
|
3456
|
+
var CHART_CONTAINER_CHILD_ORDER, REQUIRED_LEADING_CHILD, TYPE_TO_CONTAINER, AXIS_LOCAL_NAMES;
|
|
3457
|
+
var init_chart_container_content_model = __esm({
|
|
3458
|
+
"src/pptx/core/utils/chart-container-content-model.ts"() {
|
|
3459
|
+
CHART_CONTAINER_CHILD_ORDER = {
|
|
3460
|
+
areaChart: ["grouping", "varyColors", "ser", "dLbls", "dropLines", "axId", "extLst"],
|
|
3461
|
+
area3DChart: [
|
|
3462
|
+
"grouping",
|
|
3463
|
+
"varyColors",
|
|
3464
|
+
"ser",
|
|
3465
|
+
"dLbls",
|
|
3466
|
+
"dropLines",
|
|
3467
|
+
"gapDepth",
|
|
3468
|
+
"axId",
|
|
3469
|
+
"extLst"
|
|
3470
|
+
],
|
|
3471
|
+
barChart: [
|
|
3472
|
+
"barDir",
|
|
3473
|
+
"grouping",
|
|
3474
|
+
"varyColors",
|
|
3475
|
+
"ser",
|
|
3476
|
+
"dLbls",
|
|
3477
|
+
"gapWidth",
|
|
3478
|
+
"overlap",
|
|
3479
|
+
"serLines",
|
|
3480
|
+
"axId",
|
|
3481
|
+
"extLst"
|
|
3482
|
+
],
|
|
3483
|
+
bar3DChart: [
|
|
3484
|
+
"barDir",
|
|
3485
|
+
"grouping",
|
|
3486
|
+
"varyColors",
|
|
3487
|
+
"ser",
|
|
3488
|
+
"dLbls",
|
|
3489
|
+
"gapWidth",
|
|
3490
|
+
"gapDepth",
|
|
3491
|
+
"shape",
|
|
3492
|
+
"axId",
|
|
3493
|
+
"extLst"
|
|
3494
|
+
],
|
|
3495
|
+
bubbleChart: [
|
|
3496
|
+
"varyColors",
|
|
3497
|
+
"ser",
|
|
3498
|
+
"dLbls",
|
|
3499
|
+
"bubble3D",
|
|
3500
|
+
"bubbleScale",
|
|
3501
|
+
"showNegBubbles",
|
|
3502
|
+
"sizeRepresents",
|
|
3503
|
+
"axId",
|
|
3504
|
+
"extLst"
|
|
3505
|
+
],
|
|
3506
|
+
doughnutChart: ["varyColors", "ser", "dLbls", "firstSliceAng", "holeSize", "extLst"],
|
|
3507
|
+
lineChart: [
|
|
3508
|
+
"grouping",
|
|
3509
|
+
"varyColors",
|
|
3510
|
+
"ser",
|
|
3511
|
+
"dLbls",
|
|
3512
|
+
"dropLines",
|
|
3513
|
+
"hiLowLines",
|
|
3514
|
+
"upDownBars",
|
|
3515
|
+
"marker",
|
|
3516
|
+
"smooth",
|
|
3517
|
+
"axId",
|
|
3518
|
+
"extLst"
|
|
3519
|
+
],
|
|
3520
|
+
line3DChart: [
|
|
3521
|
+
"grouping",
|
|
3522
|
+
"varyColors",
|
|
3523
|
+
"ser",
|
|
3524
|
+
"dLbls",
|
|
3525
|
+
"dropLines",
|
|
3526
|
+
"gapDepth",
|
|
3527
|
+
"axId",
|
|
3528
|
+
"extLst"
|
|
3529
|
+
],
|
|
3530
|
+
ofPieChart: [
|
|
3531
|
+
"ofPieType",
|
|
3532
|
+
"varyColors",
|
|
3533
|
+
"ser",
|
|
3534
|
+
"dLbls",
|
|
3535
|
+
"gapWidth",
|
|
3536
|
+
"splitType",
|
|
3537
|
+
"splitPos",
|
|
3538
|
+
"custSplit",
|
|
3539
|
+
"secondPieSize",
|
|
3540
|
+
"serLines",
|
|
3541
|
+
"extLst"
|
|
3542
|
+
],
|
|
3543
|
+
pieChart: ["varyColors", "ser", "dLbls", "firstSliceAng", "extLst"],
|
|
3544
|
+
pie3DChart: ["varyColors", "ser", "dLbls", "extLst"],
|
|
3545
|
+
radarChart: ["radarStyle", "varyColors", "ser", "dLbls", "axId", "extLst"],
|
|
3546
|
+
scatterChart: ["scatterStyle", "varyColors", "ser", "dLbls", "axId", "extLst"],
|
|
3547
|
+
stockChart: ["ser", "dLbls", "dropLines", "hiLowLines", "upDownBars", "axId", "extLst"],
|
|
3548
|
+
surfaceChart: ["wireframe", "ser", "bandFmts", "axId", "extLst"],
|
|
3549
|
+
surface3DChart: ["wireframe", "ser", "bandFmts", "axId", "extLst"]
|
|
3550
|
+
};
|
|
3551
|
+
REQUIRED_LEADING_CHILD = {
|
|
3552
|
+
barChart: { local: "barDir", val: "col" },
|
|
3553
|
+
bar3DChart: { local: "barDir", val: "col" },
|
|
3554
|
+
lineChart: { local: "grouping", val: "standard" },
|
|
3555
|
+
line3DChart: { local: "grouping", val: "standard" },
|
|
3556
|
+
ofPieChart: { local: "ofPieType", val: "pie" },
|
|
3557
|
+
radarChart: { local: "radarStyle", val: "marker" },
|
|
3558
|
+
scatterChart: { local: "scatterStyle", val: "lineMarker" }
|
|
3559
|
+
};
|
|
3560
|
+
TYPE_TO_CONTAINER = {
|
|
3561
|
+
area: "areaChart",
|
|
3562
|
+
area3D: "area3DChart",
|
|
3563
|
+
bar: "barChart",
|
|
3564
|
+
bar3D: "bar3DChart",
|
|
3565
|
+
bubble: "bubbleChart",
|
|
3566
|
+
doughnut: "doughnutChart",
|
|
3567
|
+
line: "lineChart",
|
|
3568
|
+
line3D: "line3DChart",
|
|
3569
|
+
ofPie: "ofPieChart",
|
|
3570
|
+
pie: "pieChart",
|
|
3571
|
+
pie3D: "pie3DChart",
|
|
3572
|
+
radar: "radarChart",
|
|
3573
|
+
scatter: "scatterChart",
|
|
3574
|
+
stock: "stockChart",
|
|
3575
|
+
surface: "surfaceChart"
|
|
3576
|
+
};
|
|
3577
|
+
AXIS_LOCAL_NAMES = ["catAx", "valAx", "dateAx", "serAx"];
|
|
3578
|
+
}
|
|
3579
|
+
});
|
|
3580
|
+
|
|
3581
|
+
// src/pptx/core/utils/chart-container-schema.ts
|
|
3582
|
+
function normalizeChartGroupingValue(containerLocal, value) {
|
|
3583
|
+
const isBar = containerLocal === "barChart" || containerLocal === "bar3DChart";
|
|
3584
|
+
return !isBar && value === "clustered" ? "standard" : value;
|
|
3585
|
+
}
|
|
3586
|
+
function normalizeGroupingNode(containerLocal, node) {
|
|
3587
|
+
const value = node["@_val"];
|
|
3588
|
+
if (value !== void 0) {
|
|
3589
|
+
node["@_val"] = normalizeChartGroupingValue(containerLocal, value);
|
|
3590
|
+
}
|
|
3591
|
+
}
|
|
3592
|
+
function normalizeChartContainerChildren(container2, containerLocal, getLocalName2) {
|
|
3593
|
+
if (!isKnownChartContainer(containerLocal)) {
|
|
3594
|
+
return;
|
|
3595
|
+
}
|
|
3596
|
+
for (const key2 of Object.keys(container2)) {
|
|
3597
|
+
if (key2.startsWith("@_") || key2 === "#text") {
|
|
3598
|
+
continue;
|
|
3599
|
+
}
|
|
3600
|
+
const local = getLocalName2(key2);
|
|
3601
|
+
if (!chartContainerAllows(containerLocal, local)) {
|
|
3602
|
+
delete container2[key2];
|
|
3603
|
+
continue;
|
|
3604
|
+
}
|
|
3605
|
+
if (local === "grouping") {
|
|
3606
|
+
const node = container2[key2];
|
|
3607
|
+
if (node && typeof node === "object" && !Array.isArray(node)) {
|
|
3608
|
+
normalizeGroupingNode(containerLocal, node);
|
|
3609
|
+
}
|
|
3610
|
+
}
|
|
3611
|
+
}
|
|
3612
|
+
const required = REQUIRED_LEADING_CHILD[containerLocal];
|
|
3613
|
+
if (required) {
|
|
3614
|
+
const present = Object.keys(container2).some((k) => getLocalName2(k) === required.local);
|
|
3615
|
+
if (!present) {
|
|
3616
|
+
container2[`c:${required.local}`] = { "@_val": required.val };
|
|
3617
|
+
}
|
|
3618
|
+
}
|
|
3619
|
+
}
|
|
3620
|
+
function orderChartContainerChildren(container2, containerLocal, getLocalName2) {
|
|
3621
|
+
const order = CHART_CONTAINER_CHILD_ORDER[containerLocal];
|
|
3622
|
+
if (!order) {
|
|
3623
|
+
return;
|
|
3624
|
+
}
|
|
3625
|
+
const keys = Object.keys(container2).filter((k) => !k.startsWith("@_") && k !== "#text");
|
|
3626
|
+
if (keys.some((k) => !order.includes(getLocalName2(k)))) {
|
|
3627
|
+
return;
|
|
3628
|
+
}
|
|
3629
|
+
const sorted = [...keys].sort(
|
|
3630
|
+
(a, b) => order.indexOf(getLocalName2(a)) - order.indexOf(getLocalName2(b))
|
|
3631
|
+
);
|
|
3632
|
+
if (sorted.every((k, i2) => k === keys[i2])) {
|
|
3633
|
+
return;
|
|
3634
|
+
}
|
|
3635
|
+
const saved = sorted.map((k) => [k, container2[k]]);
|
|
3636
|
+
for (const k of keys) {
|
|
3637
|
+
delete container2[k];
|
|
3638
|
+
}
|
|
3639
|
+
for (const [k, v] of saved) {
|
|
3640
|
+
container2[k] = v;
|
|
3641
|
+
}
|
|
3642
|
+
}
|
|
3643
|
+
function renameXmlKeyInPlace(obj, oldKey, newKey) {
|
|
3644
|
+
if (oldKey === newKey || !(oldKey in obj)) {
|
|
3645
|
+
return;
|
|
3646
|
+
}
|
|
3647
|
+
const entries = Object.keys(obj).map((k) => [k === oldKey ? newKey : k, obj[k]]);
|
|
3648
|
+
for (const k of Object.keys(obj)) {
|
|
3649
|
+
delete obj[k];
|
|
3650
|
+
}
|
|
3651
|
+
for (const [k, v] of entries) {
|
|
3652
|
+
obj[k] = v;
|
|
3653
|
+
}
|
|
3654
|
+
}
|
|
3655
|
+
function referencedAxisIds(plotArea, getLocalName2) {
|
|
3656
|
+
const ids = /* @__PURE__ */ new Set();
|
|
3657
|
+
for (const key2 of Object.keys(plotArea)) {
|
|
3658
|
+
if (!getLocalName2(key2).endsWith("Chart")) {
|
|
3659
|
+
continue;
|
|
3660
|
+
}
|
|
3661
|
+
for (const container2 of toArray(plotArea[key2])) {
|
|
3662
|
+
for (const childKey3 of Object.keys(container2)) {
|
|
3663
|
+
if (getLocalName2(childKey3) !== "axId") {
|
|
3664
|
+
continue;
|
|
3665
|
+
}
|
|
3666
|
+
for (const axId of toArray(container2[childKey3])) {
|
|
3667
|
+
const val = axId["@_val"];
|
|
3668
|
+
if (val !== void 0) {
|
|
3669
|
+
ids.add(String(val));
|
|
3670
|
+
}
|
|
3671
|
+
}
|
|
3672
|
+
}
|
|
3673
|
+
}
|
|
3674
|
+
}
|
|
3675
|
+
return ids;
|
|
3676
|
+
}
|
|
3677
|
+
function toArray(value) {
|
|
3678
|
+
if (Array.isArray(value)) {
|
|
3679
|
+
return value.filter((v) => typeof v === "object" && v !== null);
|
|
3680
|
+
}
|
|
3681
|
+
return typeof value === "object" && value !== null ? [value] : [];
|
|
3682
|
+
}
|
|
3683
|
+
function reconcileChartPlotAreaAxes(plotArea, getLocalName2) {
|
|
3684
|
+
const referenced = referencedAxisIds(plotArea, getLocalName2);
|
|
3685
|
+
let removed = 0;
|
|
3686
|
+
for (const key2 of Object.keys(plotArea)) {
|
|
3687
|
+
const local = getLocalName2(key2);
|
|
3688
|
+
if (!AXIS_LOCAL_NAMES.includes(local)) {
|
|
3689
|
+
continue;
|
|
3690
|
+
}
|
|
3691
|
+
const axes = toArray(plotArea[key2]);
|
|
3692
|
+
const kept = axes.filter((axis) => {
|
|
3693
|
+
const axIdKey = Object.keys(axis).find((k) => getLocalName2(k) === "axId");
|
|
3694
|
+
const val = axIdKey ? toArray(axis[axIdKey])[0]?.["@_val"] : void 0;
|
|
3695
|
+
return val !== void 0 && referenced.has(String(val));
|
|
3696
|
+
});
|
|
3697
|
+
removed += axes.length - kept.length;
|
|
3698
|
+
if (kept.length === 0) {
|
|
3699
|
+
delete plotArea[key2];
|
|
3700
|
+
} else if (kept.length !== axes.length) {
|
|
3701
|
+
plotArea[key2] = kept.length === 1 ? kept[0] : kept;
|
|
3702
|
+
}
|
|
3703
|
+
}
|
|
3704
|
+
return removed;
|
|
3705
|
+
}
|
|
3706
|
+
var init_chart_container_schema = __esm({
|
|
3707
|
+
"src/pptx/core/utils/chart-container-schema.ts"() {
|
|
3708
|
+
init_chart_container_content_model();
|
|
3709
|
+
init_chart_container_content_model();
|
|
3710
|
+
}
|
|
3711
|
+
});
|
|
3712
|
+
|
|
3713
|
+
// src/pptx/core/utils/chart-group-options.ts
|
|
3714
|
+
function chartGroupOptionVal(spec, value) {
|
|
3715
|
+
return String(Math.min(spec.max, Math.max(spec.min, Math.round(value))));
|
|
3716
|
+
}
|
|
3717
|
+
function localNameOf2(key2) {
|
|
3718
|
+
return key2.replace(/^.*:/u, "");
|
|
3719
|
+
}
|
|
3720
|
+
function findKey3(obj, local, getLocalName2) {
|
|
3721
|
+
return Object.keys(obj).find((key2) => getLocalName2(key2) === local);
|
|
3722
|
+
}
|
|
3723
|
+
function modelValue(chartData, spec) {
|
|
3724
|
+
if (spec.element === "gapWidth" && chartData.chartType === "ofPie") {
|
|
3725
|
+
return chartData.ofPieOptions?.gapWidth ?? chartData.barGapWidth;
|
|
3726
|
+
}
|
|
3727
|
+
const value = chartData[spec.field];
|
|
3728
|
+
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
3729
|
+
}
|
|
3730
|
+
function applyGeneratedChartGroupOptions(container2, containerLocal, chartData) {
|
|
3731
|
+
for (const spec of CHART_GROUP_OPTIONS) {
|
|
3732
|
+
if (!chartContainerAllows(containerLocal, spec.element)) {
|
|
3733
|
+
continue;
|
|
3734
|
+
}
|
|
3735
|
+
const value = modelValue(chartData, spec) ?? spec.generatedDefault;
|
|
3736
|
+
if (value !== void 0) {
|
|
3737
|
+
container2[`c:${spec.element}`] = { "@_val": chartGroupOptionVal(spec, value) };
|
|
3738
|
+
}
|
|
3739
|
+
}
|
|
3740
|
+
orderChartContainerChildren(container2, containerLocal, localNameOf2);
|
|
3741
|
+
}
|
|
3742
|
+
function authoredValue(node) {
|
|
3743
|
+
if (!node || typeof node !== "object") {
|
|
3744
|
+
return void 0;
|
|
3745
|
+
}
|
|
3746
|
+
const raw = node["@_val"];
|
|
3747
|
+
const num4 = raw === void 0 || raw === null || raw === "" ? NaN : Number.parseFloat(String(raw));
|
|
3748
|
+
return Number.isFinite(num4) ? num4 : void 0;
|
|
3749
|
+
}
|
|
3750
|
+
function applyChartGroupOptionsToXml(container2, containerLocal, chartData, getLocalName2) {
|
|
3751
|
+
let changed = false;
|
|
3752
|
+
for (const spec of CHART_GROUP_OPTIONS) {
|
|
3753
|
+
if (!chartContainerAllows(containerLocal, spec.element)) {
|
|
3754
|
+
continue;
|
|
3755
|
+
}
|
|
3756
|
+
if (spec.element === "gapWidth" && containerLocal === "ofPieChart") {
|
|
3757
|
+
continue;
|
|
3758
|
+
}
|
|
3759
|
+
const key2 = findKey3(container2, spec.element, getLocalName2);
|
|
3760
|
+
const authored = key2 ? authoredValue(container2[key2]) : void 0;
|
|
3761
|
+
const value = chartData[spec.field];
|
|
3762
|
+
if (value === void 0) {
|
|
3763
|
+
if (key2 && authored !== void 0) {
|
|
3764
|
+
delete container2[key2];
|
|
3765
|
+
changed = true;
|
|
3766
|
+
}
|
|
3767
|
+
continue;
|
|
3768
|
+
}
|
|
3769
|
+
if (authored === value) {
|
|
3770
|
+
continue;
|
|
3771
|
+
}
|
|
3772
|
+
container2[key2 ?? `c:${spec.element}`] = { "@_val": chartGroupOptionVal(spec, value) };
|
|
3773
|
+
changed = true;
|
|
3774
|
+
}
|
|
3775
|
+
return changed;
|
|
3776
|
+
}
|
|
3777
|
+
var CHART_GROUP_OPTIONS;
|
|
3778
|
+
var init_chart_group_options = __esm({
|
|
3779
|
+
"src/pptx/core/utils/chart-group-options.ts"() {
|
|
3780
|
+
init_chart_container_content_model();
|
|
3781
|
+
init_chart_container_schema();
|
|
3782
|
+
CHART_GROUP_OPTIONS = [
|
|
3783
|
+
{
|
|
3784
|
+
element: "gapWidth",
|
|
3785
|
+
field: "barGapWidth",
|
|
3786
|
+
schemaType: "ST_GapAmount",
|
|
3787
|
+
min: 0,
|
|
3788
|
+
max: 500,
|
|
3789
|
+
generatedDefault: 150
|
|
3790
|
+
},
|
|
3791
|
+
{ element: "overlap", field: "barOverlap", schemaType: "ST_Overlap", min: -100, max: 100 },
|
|
3792
|
+
{
|
|
3793
|
+
element: "firstSliceAng",
|
|
3794
|
+
field: "firstSliceAngle",
|
|
3795
|
+
schemaType: "ST_FirstSliceAng",
|
|
3796
|
+
min: 0,
|
|
3797
|
+
max: 360
|
|
3798
|
+
},
|
|
3799
|
+
{
|
|
3800
|
+
element: "holeSize",
|
|
3801
|
+
field: "doughnutHoleSize",
|
|
3802
|
+
schemaType: "ST_HoleSize",
|
|
3803
|
+
min: 1,
|
|
3804
|
+
max: 90,
|
|
3805
|
+
generatedDefault: 50
|
|
3806
|
+
}
|
|
3807
|
+
];
|
|
3808
|
+
}
|
|
3809
|
+
});
|
|
3810
|
+
|
|
3811
|
+
// src/pptx/core/builders/sdk/chart-layout-input.ts
|
|
3812
|
+
function allowedTypes(element) {
|
|
3813
|
+
return CLASSIC_TYPES.filter((type) => {
|
|
3814
|
+
const local = chartTypeToContainerLocalName(type);
|
|
3815
|
+
return local !== void 0 && chartContainerAllows(local, element);
|
|
3816
|
+
});
|
|
3817
|
+
}
|
|
3818
|
+
function drawnTypes(chartData) {
|
|
3819
|
+
if (chartData.chartType !== "combo") {
|
|
3820
|
+
return [chartData.chartType];
|
|
3821
|
+
}
|
|
3822
|
+
return chartData.series.map((s) => s.seriesChartType ?? chartData.chartType);
|
|
3823
|
+
}
|
|
3824
|
+
function validateValue(spec, name, value) {
|
|
3825
|
+
if (!Number.isInteger(value) || value < spec.min || value > spec.max) {
|
|
3826
|
+
throw new RangeError(
|
|
3827
|
+
`${name} must be an integer from ${spec.min} to ${spec.max} (${spec.schemaType}), got ${value}.`
|
|
3828
|
+
);
|
|
3829
|
+
}
|
|
3830
|
+
}
|
|
3831
|
+
function applyChartGroupOptionsInput(chartData, input) {
|
|
3832
|
+
for (const spec of CHART_GROUP_OPTIONS) {
|
|
3833
|
+
const name = INPUT_KEYS[spec.element];
|
|
3834
|
+
const value = input[name];
|
|
3835
|
+
if (value === void 0) {
|
|
3836
|
+
continue;
|
|
3837
|
+
}
|
|
3838
|
+
if (value === null) {
|
|
3839
|
+
delete chartData[spec.field];
|
|
3840
|
+
continue;
|
|
3841
|
+
}
|
|
3842
|
+
validateValue(spec, name, value);
|
|
3843
|
+
const types = drawnTypes(chartData);
|
|
3844
|
+
const allowed = allowedTypes(spec.element);
|
|
3845
|
+
if (!types.some((type) => allowed.includes(type))) {
|
|
3846
|
+
throw new Error(
|
|
3847
|
+
`${name} applies to ${allowed.join(", ")} charts; this chart is drawn as "${types.join('", "')}".`
|
|
3848
|
+
);
|
|
3849
|
+
}
|
|
3850
|
+
chartData[spec.field] = value;
|
|
3851
|
+
if (spec.element === "gapWidth" && chartData.ofPieOptions) {
|
|
3852
|
+
chartData.ofPieOptions.gapWidth = value;
|
|
3853
|
+
}
|
|
3854
|
+
}
|
|
3855
|
+
}
|
|
3856
|
+
function toPaint(value, name) {
|
|
3857
|
+
const trimmed = value.trim();
|
|
3858
|
+
if (trimmed === "none") {
|
|
3859
|
+
return "none";
|
|
3860
|
+
}
|
|
3861
|
+
if (!HEX_COLOR2.test(trimmed)) {
|
|
3862
|
+
throw new Error(`${name} must be a 6-digit hex colour or 'none', got "${value}".`);
|
|
3863
|
+
}
|
|
3864
|
+
return `#${trimmed.replace(/^#/u, "").toUpperCase()}`;
|
|
3865
|
+
}
|
|
3866
|
+
function applyChartAreaFormatInput(chartData, area, input) {
|
|
3867
|
+
const style = chartData.style ??= {};
|
|
3868
|
+
const fillKey = area === "chart" ? "chartAreaFill" : "plotAreaFill";
|
|
3869
|
+
const gradientKey = area === "chart" ? "chartAreaGradient" : "plotAreaGradient";
|
|
3870
|
+
const borderKey = area === "chart" ? "chartAreaBorder" : "plotAreaBorder";
|
|
3871
|
+
if (input === null) {
|
|
3872
|
+
delete style[fillKey];
|
|
3873
|
+
delete style[gradientKey];
|
|
3874
|
+
delete style[borderKey];
|
|
3875
|
+
if (area === "chart") {
|
|
3876
|
+
delete chartData.roundedCorners;
|
|
3877
|
+
}
|
|
3878
|
+
return;
|
|
3879
|
+
}
|
|
3880
|
+
if (input.roundedCorners !== void 0 && area !== "chart") {
|
|
3881
|
+
throw new Error("roundedCorners applies to the chart area only.");
|
|
3882
|
+
}
|
|
3883
|
+
if (input.fill !== void 0) {
|
|
3884
|
+
delete style[fillKey];
|
|
3885
|
+
delete style[gradientKey];
|
|
3886
|
+
if (typeof input.fill === "string") {
|
|
3887
|
+
style[fillKey] = toPaint(input.fill, "fill");
|
|
3888
|
+
} else if (input.fill !== null) {
|
|
3889
|
+
style[gradientKey] = toChartGradientFill(input.fill);
|
|
3890
|
+
}
|
|
3891
|
+
}
|
|
3892
|
+
if (input.border !== void 0) {
|
|
3893
|
+
if (input.border === null) {
|
|
3894
|
+
delete style[borderKey];
|
|
3895
|
+
} else {
|
|
3896
|
+
style[borderKey] = toPaint(input.border, "border");
|
|
3897
|
+
}
|
|
3898
|
+
}
|
|
3899
|
+
if (input.roundedCorners !== void 0) {
|
|
3900
|
+
if (input.roundedCorners === null) {
|
|
3901
|
+
delete chartData.roundedCorners;
|
|
3902
|
+
} else {
|
|
3903
|
+
chartData.roundedCorners = input.roundedCorners;
|
|
3904
|
+
}
|
|
3905
|
+
}
|
|
3906
|
+
}
|
|
3907
|
+
var INPUT_KEYS, CLASSIC_TYPES, HEX_COLOR2;
|
|
3908
|
+
var init_chart_layout_input = __esm({
|
|
3909
|
+
"src/pptx/core/builders/sdk/chart-layout-input.ts"() {
|
|
3910
|
+
init_chart_group_options();
|
|
3911
|
+
init_chart_container_content_model();
|
|
3912
|
+
init_chart_gradient_input();
|
|
3913
|
+
INPUT_KEYS = {
|
|
3914
|
+
gapWidth: "gapWidth",
|
|
3915
|
+
overlap: "overlap",
|
|
3916
|
+
firstSliceAng: "firstSliceAngle",
|
|
3917
|
+
holeSize: "holeSize"
|
|
3918
|
+
};
|
|
3919
|
+
CLASSIC_TYPES = [
|
|
3920
|
+
"bar",
|
|
3921
|
+
"bar3D",
|
|
3922
|
+
"line",
|
|
3923
|
+
"line3D",
|
|
3924
|
+
"pie",
|
|
3925
|
+
"pie3D",
|
|
3926
|
+
"ofPie",
|
|
3927
|
+
"doughnut",
|
|
3928
|
+
"area",
|
|
3929
|
+
"area3D",
|
|
3930
|
+
"scatter",
|
|
3931
|
+
"bubble",
|
|
3932
|
+
"radar",
|
|
3933
|
+
"stock",
|
|
3934
|
+
"surface"
|
|
3935
|
+
];
|
|
3936
|
+
HEX_COLOR2 = /^#?[0-9a-f]{6}$/iu;
|
|
3937
|
+
}
|
|
3938
|
+
});
|
|
3939
|
+
|
|
3940
|
+
// src/pptx/core/builders/sdk/chart-operations.ts
|
|
3941
|
+
function ensureChartData(element) {
|
|
3942
|
+
if (!element.chartData) {
|
|
3943
|
+
throw new Error(
|
|
3944
|
+
"Chart element has no chartData. Cannot perform chart operations on an uninitialised chart."
|
|
3945
|
+
);
|
|
3946
|
+
}
|
|
3947
|
+
}
|
|
3948
|
+
function validateSeriesIndex(element, seriesIndex) {
|
|
3949
|
+
ensureChartData(element);
|
|
3950
|
+
if (seriesIndex < 0 || seriesIndex >= element.chartData.series.length) {
|
|
3951
|
+
throw new RangeError(
|
|
3952
|
+
`Series index ${seriesIndex} is out of range. Chart has ${element.chartData.series.length} series (indices 0\u2013${element.chartData.series.length - 1}).`
|
|
3953
|
+
);
|
|
3954
|
+
}
|
|
3955
|
+
}
|
|
3956
|
+
function setChartType(element, newType) {
|
|
3957
|
+
ensureChartData(element);
|
|
3958
|
+
element.chartData.chartType = newType;
|
|
3959
|
+
}
|
|
3960
|
+
function addChartSeries(element, series) {
|
|
3961
|
+
ensureChartData(element);
|
|
3962
|
+
element.chartData.series.push({
|
|
3963
|
+
name: series.name,
|
|
3964
|
+
values: series.values,
|
|
3965
|
+
color: series.color
|
|
3966
|
+
});
|
|
3967
|
+
}
|
|
3968
|
+
function removeChartSeries(element, seriesIndex) {
|
|
3969
|
+
validateSeriesIndex(element, seriesIndex);
|
|
3970
|
+
element.chartData.series.splice(seriesIndex, 1);
|
|
3971
|
+
}
|
|
3972
|
+
function setChartCategories(element, categories) {
|
|
3973
|
+
ensureChartData(element);
|
|
3974
|
+
element.chartData.categories = categories;
|
|
3975
|
+
}
|
|
3976
|
+
function updateChartSeriesValues(element, seriesIndex, values) {
|
|
3977
|
+
validateSeriesIndex(element, seriesIndex);
|
|
3978
|
+
element.chartData.series[seriesIndex].values = values;
|
|
3979
|
+
}
|
|
3980
|
+
function setChartTitle(element, title) {
|
|
3981
|
+
ensureChartData(element);
|
|
3982
|
+
element.chartData.title = title;
|
|
3983
|
+
}
|
|
3984
|
+
function setChartGrouping(element, grouping) {
|
|
3985
|
+
ensureChartData(element);
|
|
3986
|
+
element.chartData.grouping = grouping;
|
|
3987
|
+
}
|
|
3988
|
+
function setChartLegend(element, options) {
|
|
3989
|
+
ensureChartData(element);
|
|
3990
|
+
const style = element.chartData.style ??= {};
|
|
3991
|
+
if (options.show !== void 0) {
|
|
3992
|
+
style.hasLegend = options.show;
|
|
3993
|
+
}
|
|
3994
|
+
if (options.position !== void 0) {
|
|
3995
|
+
style.legendPosition = options.position;
|
|
3996
|
+
if (style.hasLegend === void 0) {
|
|
3997
|
+
style.hasLegend = true;
|
|
3998
|
+
}
|
|
3999
|
+
}
|
|
4000
|
+
}
|
|
4001
|
+
function setChartDataLabels(element, edit) {
|
|
4002
|
+
ensureChartData(element);
|
|
4003
|
+
const style = element.chartData.style ??= {};
|
|
4004
|
+
if (edit.show !== void 0) {
|
|
4005
|
+
style.hasDataLabels = edit.show;
|
|
4006
|
+
const labels = style.dataLabels;
|
|
4007
|
+
const anyContent = labels?.showValue === true || labels?.showCategory === true || labels?.showSeriesName === true || labels?.showPercent === true || labels?.showBubbleSize === true;
|
|
4008
|
+
if (edit.show && labels !== void 0 && !anyContent && edit.showValue === void 0) {
|
|
4009
|
+
labels.showValue = true;
|
|
4010
|
+
}
|
|
4011
|
+
}
|
|
4012
|
+
const contentKeys = [
|
|
4013
|
+
"showValue",
|
|
4014
|
+
"showCategory",
|
|
4015
|
+
"showSeriesName",
|
|
4016
|
+
"showPercent",
|
|
4017
|
+
"showLegendKey"
|
|
4018
|
+
];
|
|
4019
|
+
const hasContentEdit = contentKeys.some((k) => edit[k] !== void 0) || edit.position !== void 0;
|
|
4020
|
+
if (hasContentEdit) {
|
|
4021
|
+
const opts = style.dataLabels ??= {};
|
|
4022
|
+
for (const k of contentKeys) {
|
|
4023
|
+
if (edit[k] !== void 0) {
|
|
4024
|
+
opts[k] = edit[k];
|
|
4025
|
+
}
|
|
4026
|
+
}
|
|
4027
|
+
if (edit.position !== void 0) {
|
|
4028
|
+
opts.position = edit.position || void 0;
|
|
4029
|
+
}
|
|
4030
|
+
if (style.hasDataLabels === void 0) {
|
|
4031
|
+
style.hasDataLabels = true;
|
|
4032
|
+
}
|
|
4033
|
+
}
|
|
4034
|
+
}
|
|
4035
|
+
function setChartSeriesTrendline(element, seriesIndex, trendline) {
|
|
4036
|
+
validateSeriesIndex(element, seriesIndex);
|
|
4037
|
+
element.chartData.series[seriesIndex].trendlines = trendline ? [trendline] : [];
|
|
4038
|
+
}
|
|
4039
|
+
function setChartSeriesErrorBars(element, seriesIndex, errBars) {
|
|
4040
|
+
validateSeriesIndex(element, seriesIndex);
|
|
4041
|
+
element.chartData.series[seriesIndex].errBars = errBars ? [errBars] : [];
|
|
4042
|
+
}
|
|
4043
|
+
function setChartAxis(element, axisType, edit) {
|
|
4044
|
+
ensureChartData(element);
|
|
4045
|
+
const axes = element.chartData.axes ??= [];
|
|
4046
|
+
let axis = axes.find((a) => a.axisType === axisType);
|
|
4047
|
+
if (!axis) {
|
|
4048
|
+
axis = { axisType };
|
|
4049
|
+
axes.push(axis);
|
|
4050
|
+
}
|
|
4051
|
+
if (edit.min !== void 0) {
|
|
4052
|
+
axis.min = edit.min ?? void 0;
|
|
4053
|
+
}
|
|
4054
|
+
if (edit.max !== void 0) {
|
|
4055
|
+
axis.max = edit.max ?? void 0;
|
|
4056
|
+
}
|
|
4057
|
+
if (edit.majorUnit !== void 0) {
|
|
4058
|
+
axis.majorUnit = edit.majorUnit ?? void 0;
|
|
4059
|
+
}
|
|
4060
|
+
if (edit.minorUnit !== void 0) {
|
|
4061
|
+
axis.minorUnit = edit.minorUnit ?? void 0;
|
|
4062
|
+
}
|
|
4063
|
+
if (edit.orientation !== void 0) {
|
|
4064
|
+
axis.orientation = edit.orientation ?? void 0;
|
|
4065
|
+
}
|
|
4066
|
+
if (edit.numberFormat !== void 0) {
|
|
4067
|
+
axis.numFmt = edit.numberFormat ? { formatCode: edit.numberFormat, sourceLinked: false } : void 0;
|
|
4068
|
+
}
|
|
4069
|
+
if (edit.tickLabelPosition !== void 0) {
|
|
4070
|
+
axis.tickLblPos = edit.tickLabelPosition;
|
|
4071
|
+
}
|
|
4072
|
+
if (edit.title !== void 0) {
|
|
4073
|
+
axis.titleText = edit.title ?? "";
|
|
4074
|
+
}
|
|
4075
|
+
if (edit.majorGridlines !== void 0) {
|
|
4076
|
+
axis.majorGridlines = edit.majorGridlines;
|
|
4077
|
+
}
|
|
4078
|
+
if (edit.minorGridlines !== void 0) {
|
|
4079
|
+
axis.minorGridlines = edit.minorGridlines;
|
|
4080
|
+
}
|
|
4081
|
+
if (edit.displayUnits !== void 0) {
|
|
4082
|
+
axis.displayUnits = edit.displayUnits ?? void 0;
|
|
4083
|
+
}
|
|
4084
|
+
if (edit.displayUnitsValue !== void 0) {
|
|
4085
|
+
axis.displayUnitsValue = edit.displayUnitsValue ?? void 0;
|
|
4086
|
+
}
|
|
4087
|
+
if (edit.displayUnitsLabel !== void 0) {
|
|
4088
|
+
axis.displayUnitsLabel = edit.displayUnitsLabel;
|
|
4089
|
+
}
|
|
4090
|
+
if (edit.visible !== void 0) {
|
|
4091
|
+
axis.deleted = !edit.visible;
|
|
4092
|
+
}
|
|
4093
|
+
}
|
|
4094
|
+
function updateChartDataPoint(element, seriesIndex, pointIndex, value) {
|
|
4095
|
+
validateSeriesIndex(element, seriesIndex);
|
|
4096
|
+
const series = element.chartData.series[seriesIndex];
|
|
4097
|
+
if (pointIndex < 0 || pointIndex >= series.values.length) {
|
|
4098
|
+
throw new RangeError(
|
|
4099
|
+
`Point index ${pointIndex} is out of range. Series "${series.name}" has ${series.values.length} data points (indices 0\u2013${series.values.length - 1}).`
|
|
4100
|
+
);
|
|
4101
|
+
}
|
|
4102
|
+
series.values[pointIndex] = value;
|
|
4103
|
+
}
|
|
4104
|
+
function addChartCategory(element, categoryName) {
|
|
4105
|
+
ensureChartData(element);
|
|
4106
|
+
element.chartData.categories.push(categoryName);
|
|
4107
|
+
for (const series of element.chartData.series) {
|
|
4108
|
+
series.values.push(0);
|
|
4109
|
+
}
|
|
4110
|
+
}
|
|
4111
|
+
function removeChartCategory(element, categoryIndex) {
|
|
4112
|
+
ensureChartData(element);
|
|
4113
|
+
if (categoryIndex < 0 || categoryIndex >= element.chartData.categories.length) {
|
|
4114
|
+
throw new RangeError(
|
|
4115
|
+
`Category index ${categoryIndex} is out of range. Chart has ${element.chartData.categories.length} categories (indices 0\u2013${element.chartData.categories.length - 1}).`
|
|
4116
|
+
);
|
|
4117
|
+
}
|
|
4118
|
+
element.chartData.categories.splice(categoryIndex, 1);
|
|
4119
|
+
for (const series of element.chartData.series) {
|
|
4120
|
+
series.values.splice(categoryIndex, 1);
|
|
4121
|
+
}
|
|
4122
|
+
}
|
|
4123
|
+
function setChartSeriesColor(element, seriesIndex, color2) {
|
|
4124
|
+
validateSeriesIndex(element, seriesIndex);
|
|
4125
|
+
const series = element.chartData.series[seriesIndex];
|
|
4126
|
+
delete series.gradientFill;
|
|
4127
|
+
if (!color2) {
|
|
4128
|
+
series.color = void 0;
|
|
4129
|
+
return;
|
|
4130
|
+
}
|
|
4131
|
+
const trimmed = color2.trim();
|
|
4132
|
+
series.color = trimmed.startsWith("#") ? trimmed : `#${trimmed}`;
|
|
4133
|
+
}
|
|
4134
|
+
function ensureAxis(element, axisType) {
|
|
4135
|
+
ensureChartData(element);
|
|
4136
|
+
const axes = element.chartData.axes ??= [];
|
|
4137
|
+
let axis = axes.find((a) => a.axisType === axisType);
|
|
4138
|
+
if (!axis) {
|
|
4139
|
+
axis = { axisType };
|
|
4140
|
+
axes.push(axis);
|
|
4141
|
+
}
|
|
4142
|
+
return axis;
|
|
4143
|
+
}
|
|
4144
|
+
function setChartAxisLogScale(element, axisType, opts) {
|
|
4145
|
+
const axis = ensureAxis(element, axisType);
|
|
4146
|
+
axis.logScale = opts.enabled;
|
|
4147
|
+
if (opts.enabled) {
|
|
4148
|
+
axis.logBase = opts.base ?? axis.logBase ?? 10;
|
|
4149
|
+
} else {
|
|
4150
|
+
axis.logBase = void 0;
|
|
4151
|
+
}
|
|
4152
|
+
}
|
|
4153
|
+
function setChartAxisTitleStyle(element, axisType, edit) {
|
|
4154
|
+
const axis = ensureAxis(element, axisType);
|
|
4155
|
+
if (edit.fontFamily !== void 0) {
|
|
4156
|
+
axis.fontFamily = edit.fontFamily ?? void 0;
|
|
4157
|
+
}
|
|
4158
|
+
if (edit.fontSize !== void 0) {
|
|
4159
|
+
axis.fontSize = edit.fontSize ?? void 0;
|
|
4160
|
+
}
|
|
4161
|
+
if (edit.fontBold !== void 0) {
|
|
4162
|
+
axis.fontBold = edit.fontBold;
|
|
4163
|
+
}
|
|
4164
|
+
if (edit.fontColor !== void 0) {
|
|
4165
|
+
axis.fontColor = edit.fontColor ?? void 0;
|
|
4166
|
+
}
|
|
4167
|
+
}
|
|
4168
|
+
function setChartAxisGridlineStyle(element, axisType, which, edit) {
|
|
4169
|
+
const axis = ensureAxis(element, axisType);
|
|
4170
|
+
const key2 = which === "major" ? "majorGridlinesSpPr" : "minorGridlinesSpPr";
|
|
4171
|
+
const flagKey = which === "major" ? "majorGridlines" : "minorGridlines";
|
|
4172
|
+
const props = { ...axis[key2] ?? {} };
|
|
4173
|
+
if (edit.color !== void 0) {
|
|
4174
|
+
props.strokeColor = edit.color ?? void 0;
|
|
4175
|
+
}
|
|
4176
|
+
if (edit.width !== void 0) {
|
|
4177
|
+
props.strokeWidth = edit.width ?? void 0;
|
|
4178
|
+
}
|
|
4179
|
+
if (edit.dashStyle !== void 0) {
|
|
4180
|
+
props.strokeDashStyle = edit.dashStyle ?? void 0;
|
|
4181
|
+
}
|
|
4182
|
+
const hasAnyProp = props.strokeColor !== void 0 || props.strokeWidth !== void 0 || props.strokeDashStyle !== void 0 || props.fillColor !== void 0;
|
|
4183
|
+
axis[key2] = hasAnyProp ? props : void 0;
|
|
4184
|
+
if (hasAnyProp) {
|
|
4185
|
+
axis[flagKey] = true;
|
|
4186
|
+
}
|
|
4187
|
+
}
|
|
4188
|
+
function setChartSeriesMarker(element, seriesIndex, marker) {
|
|
4189
|
+
validateSeriesIndex(element, seriesIndex);
|
|
4190
|
+
const series = element.chartData.series[seriesIndex];
|
|
4191
|
+
if (marker === null) {
|
|
4192
|
+
series.marker = void 0;
|
|
4193
|
+
return;
|
|
4194
|
+
}
|
|
4195
|
+
const existing = series.marker;
|
|
4196
|
+
if ("symbol" in marker && "spPr" in marker) {
|
|
4197
|
+
series.marker = marker;
|
|
4198
|
+
return;
|
|
4199
|
+
}
|
|
4200
|
+
const patch = marker;
|
|
4201
|
+
const next = {
|
|
4202
|
+
symbol: patch.symbol ?? existing?.symbol ?? "circle",
|
|
4203
|
+
size: patch.size ?? existing?.size,
|
|
4204
|
+
spPr: existing?.spPr ? { ...existing.spPr } : void 0
|
|
4205
|
+
};
|
|
4206
|
+
if (patch.fillColor !== void 0) {
|
|
4207
|
+
next.spPr = { ...next.spPr ?? {}, fillColor: patch.fillColor };
|
|
4208
|
+
}
|
|
4209
|
+
series.marker = next;
|
|
4210
|
+
}
|
|
4211
|
+
function setChartSeriesChartType(element, seriesIndex, seriesType) {
|
|
4212
|
+
validateSeriesIndex(element, seriesIndex);
|
|
4213
|
+
const data = element.chartData;
|
|
4214
|
+
data.series[seriesIndex].seriesChartType = seriesType ?? void 0;
|
|
4215
|
+
const effective = new Set(
|
|
4216
|
+
data.series.map((s) => s.seriesChartType ?? data.chartType).filter((t) => t !== "combo")
|
|
4217
|
+
);
|
|
4218
|
+
if (effective.size > 1) {
|
|
4219
|
+
data.chartType = "combo";
|
|
4220
|
+
}
|
|
4221
|
+
}
|
|
4222
|
+
function ensureDataPoint(series, pointIndex) {
|
|
4223
|
+
const points4 = series.dataPoints ??= [];
|
|
4224
|
+
let dp = points4.find((p) => p.idx === pointIndex);
|
|
4225
|
+
if (!dp) {
|
|
4226
|
+
dp = { idx: pointIndex };
|
|
4227
|
+
points4.push(dp);
|
|
4228
|
+
points4.sort((a, b) => a.idx - b.idx);
|
|
4229
|
+
}
|
|
4230
|
+
return dp;
|
|
4231
|
+
}
|
|
4232
|
+
function setChartDataPointFill(element, seriesIndex, pointIndex, color2) {
|
|
4233
|
+
validateSeriesIndex(element, seriesIndex);
|
|
4234
|
+
const series = element.chartData.series[seriesIndex];
|
|
4235
|
+
if (color2 === null) {
|
|
4236
|
+
const dp2 = series.dataPoints?.find((p) => p.idx === pointIndex);
|
|
4237
|
+
if (!dp2) {
|
|
4238
|
+
return;
|
|
4239
|
+
}
|
|
4240
|
+
if (dp2.spPr) {
|
|
4241
|
+
dp2.spPr = { ...dp2.spPr, fillColor: void 0 };
|
|
4242
|
+
if (dp2.spPr.fillColor === void 0 && dp2.spPr.strokeColor === void 0 && dp2.spPr.strokeWidth === void 0 && dp2.spPr.strokeDashStyle === void 0) {
|
|
4243
|
+
dp2.spPr = void 0;
|
|
4244
|
+
}
|
|
4245
|
+
}
|
|
4246
|
+
removeEmptyDataPoint(series, pointIndex);
|
|
4247
|
+
return;
|
|
4248
|
+
}
|
|
4249
|
+
const dp = ensureDataPoint(series, pointIndex);
|
|
4250
|
+
dp.spPr = { ...dp.spPr ?? {}, fillColor: color2 };
|
|
4251
|
+
delete dp.gradientFill;
|
|
4252
|
+
}
|
|
4253
|
+
function setChartDataPointExplosion(element, seriesIndex, pointIndex, explosion) {
|
|
4254
|
+
validateSeriesIndex(element, seriesIndex);
|
|
4255
|
+
const series = element.chartData.series[seriesIndex];
|
|
4256
|
+
if (explosion === null) {
|
|
4257
|
+
const dp2 = series.dataPoints?.find((p) => p.idx === pointIndex);
|
|
4258
|
+
if (dp2) {
|
|
4259
|
+
dp2.explosion = void 0;
|
|
4260
|
+
removeEmptyDataPoint(series, pointIndex);
|
|
4261
|
+
}
|
|
4262
|
+
return;
|
|
4263
|
+
}
|
|
4264
|
+
const dp = ensureDataPoint(series, pointIndex);
|
|
4265
|
+
dp.explosion = explosion;
|
|
4266
|
+
}
|
|
4267
|
+
function setChartDataPointMarker(element, seriesIndex, pointIndex, marker) {
|
|
4268
|
+
validateSeriesIndex(element, seriesIndex);
|
|
4269
|
+
const series = element.chartData.series[seriesIndex];
|
|
4270
|
+
if (marker === null) {
|
|
4271
|
+
const dp2 = series.dataPoints?.find((p) => p.idx === pointIndex);
|
|
4272
|
+
if (dp2) {
|
|
4273
|
+
dp2.marker = void 0;
|
|
4274
|
+
removeEmptyDataPoint(series, pointIndex);
|
|
4275
|
+
}
|
|
4276
|
+
return;
|
|
4277
|
+
}
|
|
4278
|
+
const dp = ensureDataPoint(series, pointIndex);
|
|
4279
|
+
const existing = dp.marker;
|
|
4280
|
+
const next = {
|
|
4281
|
+
symbol: marker.symbol ?? existing?.symbol ?? "circle",
|
|
4282
|
+
size: marker.size ?? existing?.size,
|
|
4283
|
+
spPr: existing?.spPr ? { ...existing.spPr } : void 0
|
|
4284
|
+
};
|
|
4285
|
+
if (marker.fillColor !== void 0) {
|
|
4286
|
+
next.spPr = { ...next.spPr ?? {}, fillColor: marker.fillColor };
|
|
4287
|
+
}
|
|
4288
|
+
dp.marker = next;
|
|
4289
|
+
}
|
|
4290
|
+
function applyLabelEdit(label, edit) {
|
|
4291
|
+
if (edit.showValue !== void 0) {
|
|
4292
|
+
label.showVal = edit.showValue;
|
|
4293
|
+
}
|
|
4294
|
+
if (edit.showCategory !== void 0) {
|
|
4295
|
+
label.showCatName = edit.showCategory;
|
|
4296
|
+
}
|
|
4297
|
+
if (edit.showSeriesName !== void 0) {
|
|
4298
|
+
label.showSerName = edit.showSeriesName;
|
|
4299
|
+
}
|
|
4300
|
+
if (edit.showPercent !== void 0) {
|
|
4301
|
+
label.showPercent = edit.showPercent;
|
|
4302
|
+
}
|
|
4303
|
+
if (edit.showLegendKey !== void 0) {
|
|
4304
|
+
label.showLegendKey = edit.showLegendKey;
|
|
4305
|
+
}
|
|
4306
|
+
if (edit.position !== void 0) {
|
|
4307
|
+
label.position = edit.position;
|
|
4308
|
+
}
|
|
4309
|
+
if (edit.text !== void 0) {
|
|
4310
|
+
label.text = edit.text === "" ? void 0 : edit.text;
|
|
4311
|
+
}
|
|
4312
|
+
if (edit.spPr !== void 0) {
|
|
4313
|
+
label.spPr = edit.spPr === null ? void 0 : { ...label.spPr ?? {}, ...edit.spPr };
|
|
4314
|
+
}
|
|
4315
|
+
if (edit.txPr !== void 0) {
|
|
4316
|
+
label.txPr = edit.txPr === null ? void 0 : { ...label.txPr ?? {}, ...edit.txPr };
|
|
4317
|
+
}
|
|
4318
|
+
}
|
|
4319
|
+
function setChartDataPointLabel(element, seriesIndex, pointIndex, edit) {
|
|
4320
|
+
validateSeriesIndex(element, seriesIndex);
|
|
4321
|
+
const series = element.chartData.series[seriesIndex];
|
|
4322
|
+
if (edit === null) {
|
|
4323
|
+
if (!series.dataLabels) {
|
|
4324
|
+
return;
|
|
4325
|
+
}
|
|
4326
|
+
series.dataLabels = series.dataLabels.filter((l) => l.idx !== pointIndex);
|
|
4327
|
+
if (series.dataLabels.length === 0) {
|
|
4328
|
+
series.dataLabels = void 0;
|
|
4329
|
+
}
|
|
4330
|
+
return;
|
|
4331
|
+
}
|
|
4332
|
+
const labels = series.dataLabels ??= [];
|
|
4333
|
+
let label = labels.find((l) => l.idx === pointIndex);
|
|
4334
|
+
if (!label) {
|
|
4335
|
+
label = { idx: pointIndex };
|
|
4336
|
+
labels.push(label);
|
|
4337
|
+
labels.sort((a, b) => a.idx - b.idx);
|
|
4338
|
+
}
|
|
4339
|
+
applyLabelEdit(label, edit);
|
|
4340
|
+
}
|
|
4341
|
+
function removeEmptyDataPoint(series, pointIndex) {
|
|
4342
|
+
if (!series.dataPoints) {
|
|
4343
|
+
return;
|
|
4344
|
+
}
|
|
4345
|
+
const dp = series.dataPoints.find((p) => p.idx === pointIndex);
|
|
4346
|
+
if (!dp) {
|
|
4347
|
+
return;
|
|
4348
|
+
}
|
|
4349
|
+
const empty = dp.spPr === void 0 && dp.gradientFill === void 0 && dp.explosion === void 0 && dp.invertIfNegative === void 0 && dp.bubble3D === void 0 && dp.marker === void 0;
|
|
4350
|
+
if (empty) {
|
|
4351
|
+
series.dataPoints = series.dataPoints.filter((p) => p.idx !== pointIndex);
|
|
4352
|
+
}
|
|
4353
|
+
}
|
|
4354
|
+
var init_chart_operations = __esm({
|
|
4355
|
+
"src/pptx/core/builders/sdk/chart-operations.ts"() {
|
|
4356
|
+
}
|
|
4357
|
+
});
|
|
4358
|
+
|
|
4359
|
+
// src/pptx/core/builders/sdk/chart-layout-operations.ts
|
|
4360
|
+
function setChartGroupOptions(element, options) {
|
|
4361
|
+
ensureChartData(element);
|
|
4362
|
+
applyChartGroupOptionsInput(element.chartData, options);
|
|
4363
|
+
}
|
|
4364
|
+
function setChartAreaFormat(element, area, format) {
|
|
4365
|
+
ensureChartData(element);
|
|
4366
|
+
applyChartAreaFormatInput(element.chartData, area, format);
|
|
4367
|
+
}
|
|
4368
|
+
function applyChartInputLayout(element, input) {
|
|
4369
|
+
setChartGroupOptions(element, {
|
|
4370
|
+
...input.gapWidth !== void 0 ? { gapWidth: input.gapWidth } : {},
|
|
4371
|
+
...input.overlap !== void 0 ? { overlap: input.overlap } : {},
|
|
4372
|
+
...input.firstSliceAngle !== void 0 ? { firstSliceAngle: input.firstSliceAngle } : {},
|
|
4373
|
+
...input.holeSize !== void 0 ? { holeSize: input.holeSize } : {}
|
|
4374
|
+
});
|
|
4375
|
+
if (input.chartArea) {
|
|
4376
|
+
setChartAreaFormat(element, "chart", input.chartArea);
|
|
4377
|
+
}
|
|
4378
|
+
if (input.plotArea) {
|
|
4379
|
+
setChartAreaFormat(element, "plot", input.plotArea);
|
|
4380
|
+
}
|
|
4381
|
+
for (const [axisType, edit] of Object.entries(input.axes ?? {})) {
|
|
4382
|
+
if (edit) {
|
|
4383
|
+
setChartAxis(element, axisType, edit);
|
|
4384
|
+
}
|
|
4385
|
+
}
|
|
4386
|
+
}
|
|
4387
|
+
var init_chart_layout_operations = __esm({
|
|
4388
|
+
"src/pptx/core/builders/sdk/chart-layout-operations.ts"() {
|
|
4389
|
+
init_chart_layout_input();
|
|
4390
|
+
init_chart_operations();
|
|
4391
|
+
}
|
|
4392
|
+
});
|
|
4393
|
+
|
|
3445
4394
|
// src/pptx/core/builders/sdk/ElementFactory.ts
|
|
3446
4395
|
function generateId(prefix) {
|
|
3447
4396
|
idCounter += 1;
|
|
@@ -3788,12 +4737,14 @@ function createChartElement(chartType, input, options) {
|
|
|
3788
4737
|
legendPosition: input.legendPosition
|
|
3789
4738
|
}
|
|
3790
4739
|
};
|
|
3791
|
-
|
|
4740
|
+
const element = {
|
|
3792
4741
|
type: "chart",
|
|
3793
4742
|
id: generateId("cht"),
|
|
3794
4743
|
...p,
|
|
3795
4744
|
chartData
|
|
3796
4745
|
};
|
|
4746
|
+
applyChartInputLayout(element, input);
|
|
4747
|
+
return element;
|
|
3797
4748
|
}
|
|
3798
4749
|
function createMediaElement(mediaType, source, options) {
|
|
3799
4750
|
const p = pos("media", options);
|
|
@@ -3859,6 +4810,7 @@ var init_ElementFactory = __esm({
|
|
|
3859
4810
|
init_table_style_defaults();
|
|
3860
4811
|
init_custom_geometry();
|
|
3861
4812
|
init_chart_gradient_input();
|
|
4813
|
+
init_chart_layout_operations();
|
|
3862
4814
|
idCounter = 0;
|
|
3863
4815
|
DEFAULTS = {
|
|
3864
4816
|
text: { x: 100, y: 100, width: 600, height: 50 },
|
|
@@ -20419,7 +21371,7 @@ function nsGet(obj, localName29) {
|
|
|
20419
21371
|
return obj[localName29];
|
|
20420
21372
|
}
|
|
20421
21373
|
for (const key2 of Object.keys(obj)) {
|
|
20422
|
-
if (
|
|
21374
|
+
if (localNameOf3(key2) === localName29 && !key2.startsWith("@_")) {
|
|
20423
21375
|
return obj[key2];
|
|
20424
21376
|
}
|
|
20425
21377
|
}
|
|
@@ -20431,13 +21383,13 @@ function nsAttr(obj, localName29) {
|
|
|
20431
21383
|
return direct;
|
|
20432
21384
|
}
|
|
20433
21385
|
for (const key2 of Object.keys(obj)) {
|
|
20434
|
-
if (key2.startsWith("@_") &&
|
|
21386
|
+
if (key2.startsWith("@_") && localNameOf3(key2.slice(2)) === localName29) {
|
|
20435
21387
|
return obj[key2];
|
|
20436
21388
|
}
|
|
20437
21389
|
}
|
|
20438
21390
|
return void 0;
|
|
20439
21391
|
}
|
|
20440
|
-
function
|
|
21392
|
+
function localNameOf3(key2) {
|
|
20441
21393
|
const colon = key2.indexOf(":");
|
|
20442
21394
|
return colon >= 0 ? key2.slice(colon + 1) : key2;
|
|
20443
21395
|
}
|
|
@@ -20457,7 +21409,7 @@ function collectByLocalName(node, localName29) {
|
|
|
20457
21409
|
if (key2.startsWith("@_") || key2 === "#text") {
|
|
20458
21410
|
continue;
|
|
20459
21411
|
}
|
|
20460
|
-
if (
|
|
21412
|
+
if (localNameOf3(key2) === localName29) {
|
|
20461
21413
|
for (const item of ensureArray(value)) {
|
|
20462
21414
|
found.push(item);
|
|
20463
21415
|
}
|
|
@@ -20513,7 +21465,7 @@ function resolveTiltMode(strokes) {
|
|
|
20513
21465
|
}
|
|
20514
21466
|
function buildInkMlContent(strokes, rawXml) {
|
|
20515
21467
|
const data = rawXml ? { ...rawXml } : {};
|
|
20516
|
-
const existingKey = Object.keys(data).find((key2) =>
|
|
21468
|
+
const existingKey = Object.keys(data).find((key2) => localNameOf4(key2) === "ink");
|
|
20517
21469
|
const existingRoot = existingKey ? data[existingKey] : void 0;
|
|
20518
21470
|
const root = existingRoot ? { ...existingRoot } : {};
|
|
20519
21471
|
root["@_xmlns:ink"] = INKML_NAMESPACE;
|
|
@@ -20558,13 +21510,13 @@ function deleteStaleInkChildren(root) {
|
|
|
20558
21510
|
if (key2.startsWith("ink:") || key2.startsWith("@_") || key2 === "#text") {
|
|
20559
21511
|
continue;
|
|
20560
21512
|
}
|
|
20561
|
-
const local =
|
|
21513
|
+
const local = localNameOf4(key2);
|
|
20562
21514
|
if (local === "trace" || local === "brush" || local === "traceGroup" || local === "definitions") {
|
|
20563
21515
|
delete root[key2];
|
|
20564
21516
|
}
|
|
20565
21517
|
}
|
|
20566
21518
|
}
|
|
20567
|
-
function
|
|
21519
|
+
function localNameOf4(key2) {
|
|
20568
21520
|
const colon = key2.indexOf(":");
|
|
20569
21521
|
return colon >= 0 ? key2.slice(colon + 1) : key2;
|
|
20570
21522
|
}
|
|
@@ -22072,7 +23024,7 @@ var init_xml_access = __esm({
|
|
|
22072
23024
|
});
|
|
22073
23025
|
|
|
22074
23026
|
// src/pptx/core/utils/chart-xlsx-sheet-cells.ts
|
|
22075
|
-
function
|
|
23027
|
+
function toArray2(value) {
|
|
22076
23028
|
if (Array.isArray(value)) {
|
|
22077
23029
|
return value;
|
|
22078
23030
|
}
|
|
@@ -22096,7 +23048,7 @@ function ensureCell(sheetData, ref) {
|
|
|
22096
23048
|
return void 0;
|
|
22097
23049
|
}
|
|
22098
23050
|
const rowNumber = address.row + 1;
|
|
22099
|
-
const rows =
|
|
23051
|
+
const rows = toArray2(sheetData["row"]);
|
|
22100
23052
|
let row = rows.find((r) => Number(r["@_r"]) === rowNumber);
|
|
22101
23053
|
if (!row) {
|
|
22102
23054
|
row = { "@_r": String(rowNumber), c: [] };
|
|
@@ -22108,7 +23060,7 @@ function ensureCell(sheetData, ref) {
|
|
|
22108
23060
|
}
|
|
22109
23061
|
sheetData["row"] = rows;
|
|
22110
23062
|
}
|
|
22111
|
-
const cells2 =
|
|
23063
|
+
const cells2 = toArray2(row["c"]);
|
|
22112
23064
|
let cell = cells2.find((c) => String(c["@_r"] ?? "") === ref);
|
|
22113
23065
|
if (!cell) {
|
|
22114
23066
|
cell = { "@_r": ref };
|
|
@@ -28494,7 +29446,7 @@ var init_smartart_layout_interpreter_choose_composite = __esm({
|
|
|
28494
29446
|
});
|
|
28495
29447
|
|
|
28496
29448
|
// src/pptx/core/utils/smartart-layout-interpreter-choose-algorithm.ts
|
|
28497
|
-
function branchAlg(raw, nodeCount, context,
|
|
29449
|
+
function branchAlg(raw, nodeCount, context, allowedTypes2 = CHOOSE_ALG_TYPES) {
|
|
28498
29450
|
if (!raw) {
|
|
28499
29451
|
return void 0;
|
|
28500
29452
|
}
|
|
@@ -28518,7 +29470,7 @@ function branchAlg(raw, nodeCount, context, allowedTypes = CHOOSE_ALG_TYPES) {
|
|
|
28518
29470
|
if (name === "alg") {
|
|
28519
29471
|
for (const candidate of Array.isArray(entry) ? entry : [entry]) {
|
|
28520
29472
|
const type = candidate && typeof candidate === "object" ? String(candidate["@_type"] ?? "") : "";
|
|
28521
|
-
if (
|
|
29473
|
+
if (allowedTypes2.has(type)) {
|
|
28522
29474
|
found = { type, raw: candidate };
|
|
28523
29475
|
return;
|
|
28524
29476
|
}
|
|
@@ -28599,7 +29551,7 @@ function chooseAlgorithm(node, nodeCount, context = {}) {
|
|
|
28599
29551
|
}
|
|
28600
29552
|
return void 0;
|
|
28601
29553
|
}
|
|
28602
|
-
function chooseAlgorithmOfType(node, nodeCount,
|
|
29554
|
+
function chooseAlgorithmOfType(node, nodeCount, allowedTypes2, context = {}) {
|
|
28603
29555
|
if (!node.choose || node.choose.length === 0) {
|
|
28604
29556
|
return void 0;
|
|
28605
29557
|
}
|
|
@@ -28608,7 +29560,7 @@ function chooseAlgorithmOfType(node, nodeCount, allowedTypes, context = {}) {
|
|
|
28608
29560
|
activeBranch(choose, nodeCount, context),
|
|
28609
29561
|
nodeCount,
|
|
28610
29562
|
context,
|
|
28611
|
-
|
|
29563
|
+
allowedTypes2
|
|
28612
29564
|
);
|
|
28613
29565
|
if (found) {
|
|
28614
29566
|
const parameters = parseBranchAlgParams(found.raw);
|
|
@@ -43157,7 +44109,7 @@ var init_smartart_node_style_apply = __esm({
|
|
|
43157
44109
|
});
|
|
43158
44110
|
|
|
43159
44111
|
// src/pptx/core/utils/smartart-pres-layout-vars.ts
|
|
43160
|
-
function
|
|
44112
|
+
function localNameOf5(key2) {
|
|
43161
44113
|
const idx = key2.indexOf(":");
|
|
43162
44114
|
return idx >= 0 ? key2.slice(idx + 1) : key2;
|
|
43163
44115
|
}
|
|
@@ -43178,7 +44130,7 @@ function findVarsContainer(node) {
|
|
|
43178
44130
|
if (key2.startsWith("@_")) {
|
|
43179
44131
|
continue;
|
|
43180
44132
|
}
|
|
43181
|
-
if (CONTAINER_LOCAL_NAMES.has(
|
|
44133
|
+
if (CONTAINER_LOCAL_NAMES.has(localNameOf5(key2))) {
|
|
43182
44134
|
const container2 = Array.isArray(value) ? value[0] : value;
|
|
43183
44135
|
if (container2 && typeof container2 === "object") {
|
|
43184
44136
|
return container2;
|
|
@@ -43193,7 +44145,7 @@ function findVarsContainer(node) {
|
|
|
43193
44145
|
}
|
|
43194
44146
|
function presNameOf(pt2) {
|
|
43195
44147
|
for (const [key2, value] of Object.entries(pt2)) {
|
|
43196
|
-
if (key2.startsWith("@_") ||
|
|
44148
|
+
if (key2.startsWith("@_") || localNameOf5(key2) !== "prSet") {
|
|
43197
44149
|
continue;
|
|
43198
44150
|
}
|
|
43199
44151
|
const prSet = Array.isArray(value) ? value[0] : value;
|
|
@@ -43221,7 +44173,7 @@ function findNamedPresVars(node, presName) {
|
|
|
43221
44173
|
if (key2.startsWith("@_")) {
|
|
43222
44174
|
continue;
|
|
43223
44175
|
}
|
|
43224
|
-
if (
|
|
44176
|
+
if (localNameOf5(key2) === "pt") {
|
|
43225
44177
|
for (const pt2 of Array.isArray(value) ? value : [value]) {
|
|
43226
44178
|
if (pt2 && typeof pt2 === "object" && presNameOf(pt2) === presName) {
|
|
43227
44179
|
const vars = findVarsContainer(pt2);
|
|
@@ -43240,7 +44192,7 @@ function findNamedPresVars(node, presName) {
|
|
|
43240
44192
|
}
|
|
43241
44193
|
function varValue(container2, name) {
|
|
43242
44194
|
for (const [key2, value] of Object.entries(container2)) {
|
|
43243
|
-
if (key2.startsWith("@_") ||
|
|
44195
|
+
if (key2.startsWith("@_") || localNameOf5(key2) !== name) {
|
|
43244
44196
|
continue;
|
|
43245
44197
|
}
|
|
43246
44198
|
const node = Array.isArray(value) ? value[0] : value;
|
|
@@ -44478,7 +45430,7 @@ var init_smartart_effect_intensity = __esm({
|
|
|
44478
45430
|
});
|
|
44479
45431
|
|
|
44480
45432
|
// src/pptx/core/utils/smartart-color-lists.ts
|
|
44481
|
-
function
|
|
45433
|
+
function localNameOf6(key2) {
|
|
44482
45434
|
const idx = key2.indexOf(":");
|
|
44483
45435
|
return idx >= 0 ? key2.slice(idx + 1) : key2;
|
|
44484
45436
|
}
|
|
@@ -44491,7 +45443,7 @@ function parseSmartArtColorListHexes(list2, deps) {
|
|
|
44491
45443
|
if (key2.startsWith("@_")) {
|
|
44492
45444
|
continue;
|
|
44493
45445
|
}
|
|
44494
|
-
const local =
|
|
45446
|
+
const local = localNameOf6(key2);
|
|
44495
45447
|
if (!COLOR_LOCAL_NAMES.has(local)) {
|
|
44496
45448
|
continue;
|
|
44497
45449
|
}
|
|
@@ -49483,7 +50435,7 @@ var init_chart_shape_props_writer = __esm({
|
|
|
49483
50435
|
});
|
|
49484
50436
|
|
|
49485
50437
|
// src/pptx/core/utils/chart-marker-serializer.ts
|
|
49486
|
-
function
|
|
50438
|
+
function findKey4(obj, local, getLocalName2) {
|
|
49487
50439
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
49488
50440
|
}
|
|
49489
50441
|
function insertOrdered(seriesNode, key2, value, getLocalName2) {
|
|
@@ -49517,7 +50469,7 @@ function buildChartMarkerXml(existing, marker, getLocalName2, resolveColor2) {
|
|
|
49517
50469
|
if (marker.size !== void 0) {
|
|
49518
50470
|
node["c:size"] = { "@_val": String(marker.size) };
|
|
49519
50471
|
}
|
|
49520
|
-
const existingSpPr = existing ? existing[
|
|
50472
|
+
const existingSpPr = existing ? existing[findKey4(existing, "spPr", getLocalName2) ?? ""] : void 0;
|
|
49521
50473
|
const spPr = buildMarkerSpPr(existingSpPr, marker, getLocalName2, resolveColor2);
|
|
49522
50474
|
if (spPr) {
|
|
49523
50475
|
node["c:spPr"] = spPr;
|
|
@@ -49533,7 +50485,7 @@ function buildChartMarkerXml(existing, marker, getLocalName2, resolveColor2) {
|
|
|
49533
50485
|
return node;
|
|
49534
50486
|
}
|
|
49535
50487
|
function applySeriesMarkerToXml(seriesNode, marker, getLocalName2, resolveColor2) {
|
|
49536
|
-
const existingKey =
|
|
50488
|
+
const existingKey = findKey4(seriesNode, "marker", getLocalName2);
|
|
49537
50489
|
if (!marker) {
|
|
49538
50490
|
if (existingKey) {
|
|
49539
50491
|
delete seriesNode[existingKey];
|
|
@@ -49570,7 +50522,7 @@ var init_chart_marker_serializer = __esm({
|
|
|
49570
50522
|
});
|
|
49571
50523
|
|
|
49572
50524
|
// src/pptx/core/utils/chart-datapoint-serializer.ts
|
|
49573
|
-
function
|
|
50525
|
+
function findKey5(obj, local, getLocalName2) {
|
|
49574
50526
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
49575
50527
|
}
|
|
49576
50528
|
function ensureArray2(v) {
|
|
@@ -49609,7 +50561,7 @@ function buildDataPoint(existing, dp, getLocalName2, resolveColor2, gradient) {
|
|
|
49609
50561
|
if (dp.invertIfNegative !== void 0) {
|
|
49610
50562
|
node["c:invertIfNegative"] = { "@_val": dp.invertIfNegative ? "1" : "0" };
|
|
49611
50563
|
}
|
|
49612
|
-
const existingMarker = existing ? existing[
|
|
50564
|
+
const existingMarker = existing ? existing[findKey5(existing, "marker", getLocalName2) ?? ""] : void 0;
|
|
49613
50565
|
if (dp.marker) {
|
|
49614
50566
|
node["c:marker"] = buildChartMarkerXml(existingMarker, dp.marker, getLocalName2, resolveColor2);
|
|
49615
50567
|
} else if (existingMarker) {
|
|
@@ -49618,7 +50570,7 @@ function buildDataPoint(existing, dp, getLocalName2, resolveColor2, gradient) {
|
|
|
49618
50570
|
if (dp.bubble3D !== void 0) {
|
|
49619
50571
|
node["c:bubble3D"] = { "@_val": dp.bubble3D ? "1" : "0" };
|
|
49620
50572
|
} else if (existing) {
|
|
49621
|
-
const bubbleKey =
|
|
50573
|
+
const bubbleKey = findKey5(existing, "bubble3D", getLocalName2);
|
|
49622
50574
|
if (bubbleKey) {
|
|
49623
50575
|
node[bubbleKey] = existing[bubbleKey];
|
|
49624
50576
|
}
|
|
@@ -49626,12 +50578,12 @@ function buildDataPoint(existing, dp, getLocalName2, resolveColor2, gradient) {
|
|
|
49626
50578
|
if (dp.explosion !== void 0) {
|
|
49627
50579
|
node["c:explosion"] = { "@_val": String(dp.explosion) };
|
|
49628
50580
|
}
|
|
49629
|
-
const existingSpPr = existing ? existing[
|
|
50581
|
+
const existingSpPr = existing ? existing[findKey5(existing, "spPr", getLocalName2) ?? ""] : void 0;
|
|
49630
50582
|
const spPr = buildDptSpPr(existingSpPr, dp, getLocalName2, resolveColor2, gradient);
|
|
49631
50583
|
if (spPr) {
|
|
49632
50584
|
node["c:spPr"] = spPr;
|
|
49633
50585
|
}
|
|
49634
|
-
const existingPictureOptions = existing ? existing[
|
|
50586
|
+
const existingPictureOptions = existing ? existing[findKey5(existing, "pictureOptions", getLocalName2) ?? ""] : void 0;
|
|
49635
50587
|
const pictureOptions = buildDptPictureOptions(existingPictureOptions, dp.picture);
|
|
49636
50588
|
if (pictureOptions) {
|
|
49637
50589
|
node["c:pictureOptions"] = pictureOptions;
|
|
@@ -49649,11 +50601,11 @@ function buildDataPoint(existing, dp, getLocalName2, resolveColor2, gradient) {
|
|
|
49649
50601
|
return node;
|
|
49650
50602
|
}
|
|
49651
50603
|
function applySeriesDataPointsToXml(seriesNode, dataPoints, getLocalName2, resolveColor2, gradient) {
|
|
49652
|
-
const existingKey =
|
|
50604
|
+
const existingKey = findKey5(seriesNode, "dPt", getLocalName2);
|
|
49653
50605
|
const existingNodes = existingKey ? ensureArray2(seriesNode[existingKey]) : [];
|
|
49654
50606
|
const byIdx = /* @__PURE__ */ new Map();
|
|
49655
50607
|
for (const node of existingNodes) {
|
|
49656
|
-
const idxNode = node[
|
|
50608
|
+
const idxNode = node[findKey5(node, "idx", getLocalName2) ?? ""];
|
|
49657
50609
|
const idx = idxNode ? Number.parseInt(String(idxNode["@_val"]), 10) : NaN;
|
|
49658
50610
|
if (Number.isFinite(idx)) {
|
|
49659
50611
|
byIdx.set(idx, node);
|
|
@@ -49683,7 +50635,7 @@ function applySeriesDataPointsToXml(seriesNode, dataPoints, getLocalName2, resol
|
|
|
49683
50635
|
}
|
|
49684
50636
|
}
|
|
49685
50637
|
function applySeriesPictureOptionsToXml(seriesNode, picture, getLocalName2) {
|
|
49686
|
-
const existingKey =
|
|
50638
|
+
const existingKey = findKey5(seriesNode, "pictureOptions", getLocalName2);
|
|
49687
50639
|
const existing = existingKey ? seriesNode[existingKey] : void 0;
|
|
49688
50640
|
const built = buildDptPictureOptions(existing, picture);
|
|
49689
50641
|
if (existingKey) {
|
|
@@ -49824,7 +50776,7 @@ var init_chart_series_identity = __esm({
|
|
|
49824
50776
|
});
|
|
49825
50777
|
|
|
49826
50778
|
// src/pptx/core/utils/chart-series-detail-parser.ts
|
|
49827
|
-
function
|
|
50779
|
+
function localNameOf7(key2) {
|
|
49828
50780
|
return key2.replace(/^.*:/u, "");
|
|
49829
50781
|
}
|
|
49830
50782
|
function safeInt2(val) {
|
|
@@ -49962,7 +50914,7 @@ function parseSeriesDataPoints(seriesNode, xmlLookup, colorParser, parseGradient
|
|
|
49962
50914
|
if (bubble3D !== void 0) {
|
|
49963
50915
|
result.bubble3D = bubble3D;
|
|
49964
50916
|
}
|
|
49965
|
-
const uniqueId = parseChartUniqueId(node,
|
|
50917
|
+
const uniqueId = parseChartUniqueId(node, localNameOf7);
|
|
49966
50918
|
if (uniqueId !== void 0) {
|
|
49967
50919
|
result.uniqueId = uniqueId;
|
|
49968
50920
|
}
|
|
@@ -50046,7 +50998,7 @@ var init_chart_data_table_parser = __esm({
|
|
|
50046
50998
|
});
|
|
50047
50999
|
|
|
50048
51000
|
// src/pptx/core/utils/chart-data-label-field-table.ts
|
|
50049
|
-
function
|
|
51001
|
+
function localNameOf8(key2) {
|
|
50050
51002
|
const colonIndex = key2.lastIndexOf(":");
|
|
50051
51003
|
return colonIndex >= 0 ? key2.slice(colonIndex + 1) : key2;
|
|
50052
51004
|
}
|
|
@@ -50073,7 +51025,7 @@ function collectByLocalName2(node, target, out) {
|
|
|
50073
51025
|
const items = Array.isArray(child27) ? child27 : [child27];
|
|
50074
51026
|
for (const item of items) {
|
|
50075
51027
|
if (item && typeof item === "object") {
|
|
50076
|
-
if (
|
|
51028
|
+
if (localNameOf8(key2) === target) {
|
|
50077
51029
|
out.push(item);
|
|
50078
51030
|
}
|
|
50079
51031
|
collectByLocalName2(item, target, out);
|
|
@@ -50269,7 +51221,7 @@ function dataLabelsRangeUnchanged(dLbls, range, showDataLabelsRange, getLocalNam
|
|
|
50269
51221
|
}
|
|
50270
51222
|
return existingRange.formula === range.formula && existingRange.cache.length === range.cache.length && existingRange.cache.every((value, idx) => value === range.cache[idx]) && existingShow === (showDataLabelsRange !== false);
|
|
50271
51223
|
}
|
|
50272
|
-
function
|
|
51224
|
+
function findKey6(obj, local, getLocalName2) {
|
|
50273
51225
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
50274
51226
|
}
|
|
50275
51227
|
function asExtArray(value) {
|
|
@@ -50285,9 +51237,9 @@ function applyDataLabelsRangeToDLbls(dLbls, range, showDataLabelsRange, getLocal
|
|
|
50285
51237
|
if (dataLabelsRangeUnchanged(dLbls, range, showDataLabelsRange, getLocalName2)) {
|
|
50286
51238
|
return;
|
|
50287
51239
|
}
|
|
50288
|
-
const extLstKey =
|
|
51240
|
+
const extLstKey = findKey6(dLbls, "extLst", getLocalName2) ?? "c:extLst";
|
|
50289
51241
|
const extLst = { ...dLbls[extLstKey] ?? {} };
|
|
50290
|
-
const extKey =
|
|
51242
|
+
const extKey = findKey6(extLst, "ext", getLocalName2);
|
|
50291
51243
|
const exts = extKey ? asExtArray(extLst[extKey]) : [];
|
|
50292
51244
|
const otherExts = exts.filter((ext) => ext["@_uri"] !== CHART15_EXT_URI);
|
|
50293
51245
|
const ownExt = { ...exts.find((ext) => ext["@_uri"] === CHART15_EXT_URI) ?? {} };
|
|
@@ -50376,7 +51328,7 @@ function scalar3(parent, name, xmlLookup) {
|
|
|
50376
51328
|
const node = xmlLookup.getChildByLocalName(parent, name);
|
|
50377
51329
|
return node?.["#text"] === void 0 ? void 0 : String(node["#text"]);
|
|
50378
51330
|
}
|
|
50379
|
-
function
|
|
51331
|
+
function localNameOf9(key2) {
|
|
50380
51332
|
const colonIndex = key2.lastIndexOf(":");
|
|
50381
51333
|
return colonIndex >= 0 ? key2.slice(colonIndex + 1) : key2;
|
|
50382
51334
|
}
|
|
@@ -50444,7 +51396,7 @@ function parseSeriesDataLabels(seriesNode, xmlLookup, colorParser, resolveTypefa
|
|
|
50444
51396
|
if (numberFormat !== void 0) {
|
|
50445
51397
|
result.numberFormat = numberFormat;
|
|
50446
51398
|
}
|
|
50447
|
-
const layout = parseChartManualLayout(node,
|
|
51399
|
+
const layout = parseChartManualLayout(node, localNameOf9);
|
|
50448
51400
|
if (layout) {
|
|
50449
51401
|
result.layout = layout;
|
|
50450
51402
|
}
|
|
@@ -50547,7 +51499,7 @@ var init_chart_data_label_parser = __esm({
|
|
|
50547
51499
|
|
|
50548
51500
|
// src/pptx/core/utils/chart-axis-dispunits-serializer.ts
|
|
50549
51501
|
function setOrdered(node, name, value, order, localName29) {
|
|
50550
|
-
const existing =
|
|
51502
|
+
const existing = findKey7(node, name, localName29);
|
|
50551
51503
|
if (existing) {
|
|
50552
51504
|
node[existing] = value;
|
|
50553
51505
|
return;
|
|
@@ -50639,7 +51591,7 @@ function applyLabel(node, edit, localName29, resolveColor2) {
|
|
|
50639
51591
|
if (edit === void 0) {
|
|
50640
51592
|
return;
|
|
50641
51593
|
}
|
|
50642
|
-
const key2 =
|
|
51594
|
+
const key2 = findKey7(node, "dispUnitsLbl", localName29);
|
|
50643
51595
|
if (edit === null) {
|
|
50644
51596
|
if (key2) {
|
|
50645
51597
|
delete node[key2];
|
|
@@ -50661,7 +51613,7 @@ function applyLabel(node, edit, localName29, resolveColor2) {
|
|
|
50661
51613
|
);
|
|
50662
51614
|
}
|
|
50663
51615
|
if (labelEdit.spPr !== void 0) {
|
|
50664
|
-
const spPrKey =
|
|
51616
|
+
const spPrKey = findKey7(label, "spPr", localName29);
|
|
50665
51617
|
if (labelEdit.spPr === null) {
|
|
50666
51618
|
if (spPrKey) {
|
|
50667
51619
|
delete label[spPrKey];
|
|
@@ -50689,7 +51641,7 @@ function applyLabel(node, edit, localName29, resolveColor2) {
|
|
|
50689
51641
|
);
|
|
50690
51642
|
}
|
|
50691
51643
|
function applyChartAxisDisplayUnitsToXml(axisNode, axis, localName29, resolveColor2) {
|
|
50692
|
-
const existingKey =
|
|
51644
|
+
const existingKey = findKey7(axisNode, "dispUnits", localName29);
|
|
50693
51645
|
if (!axis.displayUnits) {
|
|
50694
51646
|
if (existingKey) {
|
|
50695
51647
|
delete axisNode[existingKey];
|
|
@@ -50703,7 +51655,7 @@ function applyChartAxisDisplayUnitsToXml(axisNode, axis, localName29, resolveCol
|
|
|
50703
51655
|
...existingKey ? axisNode[existingKey] : void 0
|
|
50704
51656
|
};
|
|
50705
51657
|
for (const choice of ["custUnit", "builtInUnit"]) {
|
|
50706
|
-
const key2 =
|
|
51658
|
+
const key2 = findKey7(node, choice, localName29);
|
|
50707
51659
|
if (key2) {
|
|
50708
51660
|
delete node[key2];
|
|
50709
51661
|
}
|
|
@@ -50732,7 +51684,7 @@ function applyChartAxisDisplayUnitsToXml(axisNode, axis, localName29, resolveCol
|
|
|
50732
51684
|
applyLabel(node, axis.displayUnitsLabel, localName29, resolveColor2);
|
|
50733
51685
|
setOrdered(axisNode, "dispUnits", node, ["dispUnits", "extLst"], localName29);
|
|
50734
51686
|
}
|
|
50735
|
-
var BUILT_IN_UNITS,
|
|
51687
|
+
var BUILT_IN_UNITS, findKey7;
|
|
50736
51688
|
var init_chart_axis_dispunits_serializer = __esm({
|
|
50737
51689
|
"src/pptx/core/utils/chart-axis-dispunits-serializer.ts"() {
|
|
50738
51690
|
init_chart_color_choice();
|
|
@@ -50749,7 +51701,7 @@ var init_chart_axis_dispunits_serializer = __esm({
|
|
|
50749
51701
|
"billions",
|
|
50750
51702
|
"trillions"
|
|
50751
51703
|
]);
|
|
50752
|
-
|
|
51704
|
+
findKey7 = (node, name, localName29) => Object.keys(node).find((key2) => localName29(key2) === name);
|
|
50753
51705
|
}
|
|
50754
51706
|
});
|
|
50755
51707
|
|
|
@@ -50766,11 +51718,11 @@ var init_chart_percent_union_value = __esm({
|
|
|
50766
51718
|
});
|
|
50767
51719
|
|
|
50768
51720
|
// src/pptx/core/utils/chart-axis-label-formatting.ts
|
|
50769
|
-
function
|
|
51721
|
+
function findKey8(node, name, localName29) {
|
|
50770
51722
|
return Object.keys(node).find((key2) => localName29(key2) === name);
|
|
50771
51723
|
}
|
|
50772
51724
|
function child8(node, name, localName29) {
|
|
50773
|
-
const key2 =
|
|
51725
|
+
const key2 = findKey8(node, name, localName29);
|
|
50774
51726
|
const value = key2 ? node[key2] : void 0;
|
|
50775
51727
|
return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
50776
51728
|
}
|
|
@@ -50844,7 +51796,7 @@ function parseChartAxisLabelFormatting(node, axisType, localName29) {
|
|
|
50844
51796
|
return Object.fromEntries(Object.entries(result).filter(([, value]) => value !== void 0));
|
|
50845
51797
|
}
|
|
50846
51798
|
function upsertOrdered(node, name, value, localName29) {
|
|
50847
|
-
const key2 =
|
|
51799
|
+
const key2 = findKey8(node, name, localName29);
|
|
50848
51800
|
if (key2) {
|
|
50849
51801
|
node[key2] = { ...node[key2], ...value };
|
|
50850
51802
|
return;
|
|
@@ -50883,13 +51835,13 @@ function applyChartAxisLabelFormatting(node, formatting, localName29) {
|
|
|
50883
51835
|
if (!Number.isFinite(formatting.crossesAt)) {
|
|
50884
51836
|
throw new RangeError("crossesAt must be finite");
|
|
50885
51837
|
}
|
|
50886
|
-
const crossesKey =
|
|
51838
|
+
const crossesKey = findKey8(node, "crosses", localName29);
|
|
50887
51839
|
if (crossesKey) {
|
|
50888
51840
|
delete node[crossesKey];
|
|
50889
51841
|
}
|
|
50890
51842
|
upsertOrdered(node, "crossesAt", { "@_val": String(formatting.crossesAt) }, localName29);
|
|
50891
51843
|
} else if (formatting.crosses !== void 0) {
|
|
50892
|
-
const crossesAtKey =
|
|
51844
|
+
const crossesAtKey = findKey8(node, "crossesAt", localName29);
|
|
50893
51845
|
if (crossesAtKey) {
|
|
50894
51846
|
delete node[crossesAtKey];
|
|
50895
51847
|
}
|
|
@@ -51041,9 +51993,30 @@ function applyChartAxisScaling(scalingNode, axis, getLocalName2) {
|
|
|
51041
51993
|
if (axis.orientation !== void 0) {
|
|
51042
51994
|
upsertChartAxisChild(scalingNode, "orientation", axis.orientation, getLocalName2);
|
|
51043
51995
|
}
|
|
51996
|
+
orderScalingChildren(scalingNode, getLocalName2);
|
|
51044
51997
|
}
|
|
51998
|
+
function orderScalingChildren(scalingNode, getLocalName2) {
|
|
51999
|
+
const rank = (key2) => {
|
|
52000
|
+
const index = SCALING_ORDER.indexOf(getLocalName2(key2));
|
|
52001
|
+
return index === -1 ? SCALING_ORDER.length : index;
|
|
52002
|
+
};
|
|
52003
|
+
const keys = Object.keys(scalingNode).filter((key2) => !key2.startsWith("@_"));
|
|
52004
|
+
const sorted = [...keys].sort((a, b) => rank(a) - rank(b));
|
|
52005
|
+
if (sorted.every((key2, i2) => key2 === keys[i2])) {
|
|
52006
|
+
return;
|
|
52007
|
+
}
|
|
52008
|
+
const entries = sorted.map((key2) => [key2, scalingNode[key2]]);
|
|
52009
|
+
for (const key2 of keys) {
|
|
52010
|
+
delete scalingNode[key2];
|
|
52011
|
+
}
|
|
52012
|
+
for (const [key2, value] of entries) {
|
|
52013
|
+
scalingNode[key2] = value;
|
|
52014
|
+
}
|
|
52015
|
+
}
|
|
52016
|
+
var SCALING_ORDER;
|
|
51045
52017
|
var init_chart_axis_scaling = __esm({
|
|
51046
52018
|
"src/pptx/core/utils/chart-axis-scaling.ts"() {
|
|
52019
|
+
SCALING_ORDER = ["logBase", "orientation", "max", "min"];
|
|
51047
52020
|
}
|
|
51048
52021
|
});
|
|
51049
52022
|
|
|
@@ -51131,7 +52104,7 @@ var init_chart_date_axis = __esm({
|
|
|
51131
52104
|
});
|
|
51132
52105
|
|
|
51133
52106
|
// src/pptx/core/utils/chart-title-xml-ops.ts
|
|
51134
|
-
function
|
|
52107
|
+
function findKey9(node, localName29, getLocalName2) {
|
|
51135
52108
|
return Object.keys(node).find((key2) => getLocalName2(key2) === localName29);
|
|
51136
52109
|
}
|
|
51137
52110
|
function replaceEntries(parent, entries) {
|
|
@@ -51149,7 +52122,7 @@ function insertAt2(parent, index, key2, value) {
|
|
|
51149
52122
|
}
|
|
51150
52123
|
function setAutoTitleDeleted(chartRoot, deleted, getLocalName2) {
|
|
51151
52124
|
const value = { "@_val": deleted ? "1" : "0" };
|
|
51152
|
-
const existingKey =
|
|
52125
|
+
const existingKey = findKey9(chartRoot, "autoTitleDeleted", getLocalName2);
|
|
51153
52126
|
if (existingKey) {
|
|
51154
52127
|
chartRoot[existingKey] = value;
|
|
51155
52128
|
return;
|
|
@@ -55458,9 +56431,9 @@ function parseKinsoku(presentationXml3) {
|
|
|
55458
56431
|
if (!presentationXml3) {
|
|
55459
56432
|
return void 0;
|
|
55460
56433
|
}
|
|
55461
|
-
const rootKey =
|
|
56434
|
+
const rootKey = findKey10(presentationXml3, "presentation");
|
|
55462
56435
|
const root = rootKey ? presentationXml3[rootKey] : void 0;
|
|
55463
|
-
const key2 = root ?
|
|
56436
|
+
const key2 = root ? findKey10(root, "kinsoku") : void 0;
|
|
55464
56437
|
const node = key2 && root ? root[key2] : void 0;
|
|
55465
56438
|
if (!node) {
|
|
55466
56439
|
return void 0;
|
|
@@ -55479,7 +56452,7 @@ function parseKinsoku(presentationXml3) {
|
|
|
55479
56452
|
return result;
|
|
55480
56453
|
}
|
|
55481
56454
|
function setAttribute2(node, name, value) {
|
|
55482
|
-
const key2 =
|
|
56455
|
+
const key2 = findKey10(node, name);
|
|
55483
56456
|
if (value === null) {
|
|
55484
56457
|
if (key2) {
|
|
55485
56458
|
delete node[key2];
|
|
@@ -55508,7 +56481,7 @@ function insertKinsoku(root, key2, value) {
|
|
|
55508
56481
|
return result;
|
|
55509
56482
|
}
|
|
55510
56483
|
function applyKinsokuToXml(presentation, kinsoku) {
|
|
55511
|
-
const existingKey =
|
|
56484
|
+
const existingKey = findKey10(presentation, "kinsoku");
|
|
55512
56485
|
if (kinsoku === void 0) {
|
|
55513
56486
|
return presentation;
|
|
55514
56487
|
}
|
|
@@ -55535,7 +56508,7 @@ function applyKinsokuToXml(presentation, kinsoku) {
|
|
|
55535
56508
|
Object.assign(presentation, rebuilt);
|
|
55536
56509
|
return presentation;
|
|
55537
56510
|
}
|
|
55538
|
-
var BEFORE_KINSOKU, localName8,
|
|
56511
|
+
var BEFORE_KINSOKU, localName8, findKey10;
|
|
55539
56512
|
var init_kinsoku_parser = __esm({
|
|
55540
56513
|
"src/pptx/core/utils/kinsoku-parser.ts"() {
|
|
55541
56514
|
BEFORE_KINSOKU = /* @__PURE__ */ new Set([
|
|
@@ -55552,7 +56525,7 @@ var init_kinsoku_parser = __esm({
|
|
|
55552
56525
|
"custDataLst"
|
|
55553
56526
|
]);
|
|
55554
56527
|
localName8 = (key2) => key2.replace(/^@_/u, "").replace(/^.*:/u, "");
|
|
55555
|
-
|
|
56528
|
+
findKey10 = (node, name) => Object.keys(node).find((key2) => localName8(key2) === name);
|
|
55556
56529
|
}
|
|
55557
56530
|
});
|
|
55558
56531
|
|
|
@@ -62650,11 +63623,11 @@ function localName12(key2) {
|
|
|
62650
63623
|
const idx = key2.indexOf(":");
|
|
62651
63624
|
return idx >= 0 ? key2.slice(idx + 1) : key2;
|
|
62652
63625
|
}
|
|
62653
|
-
function
|
|
63626
|
+
function findKey11(obj, local) {
|
|
62654
63627
|
return Object.keys(obj).find((k) => localName12(k) === local);
|
|
62655
63628
|
}
|
|
62656
63629
|
function ensureChild(obj, local, prefixedFallback) {
|
|
62657
|
-
const key2 =
|
|
63630
|
+
const key2 = findKey11(obj, local) ?? prefixedFallback;
|
|
62658
63631
|
const existing = obj[key2];
|
|
62659
63632
|
if (existing && typeof existing === "object" && !Array.isArray(existing)) {
|
|
62660
63633
|
return existing;
|
|
@@ -62670,7 +63643,7 @@ function solidFill2(color2) {
|
|
|
62670
63643
|
return { "a:srgbClr": { "@_val": hexValue(color2) } };
|
|
62671
63644
|
}
|
|
62672
63645
|
function setSolidFill(parent, color2) {
|
|
62673
|
-
const key2 =
|
|
63646
|
+
const key2 = findKey11(parent, "solidFill") ?? "a:solidFill";
|
|
62674
63647
|
parent[key2] = solidFill2(color2);
|
|
62675
63648
|
}
|
|
62676
63649
|
function applyShapeStyle(pt2, style) {
|
|
@@ -62687,7 +63660,7 @@ function applyShapeStyle(pt2, style) {
|
|
|
62687
63660
|
}
|
|
62688
63661
|
}
|
|
62689
63662
|
function ensureFirstRunRPr(pt2) {
|
|
62690
|
-
const tKey =
|
|
63663
|
+
const tKey = findKey11(pt2, "t");
|
|
62691
63664
|
if (!tKey) {
|
|
62692
63665
|
return void 0;
|
|
62693
63666
|
}
|
|
@@ -62695,7 +63668,7 @@ function ensureFirstRunRPr(pt2) {
|
|
|
62695
63668
|
if (!body || typeof body !== "object" || Array.isArray(body)) {
|
|
62696
63669
|
return void 0;
|
|
62697
63670
|
}
|
|
62698
|
-
const pKey =
|
|
63671
|
+
const pKey = findKey11(body, "p");
|
|
62699
63672
|
if (!pKey) {
|
|
62700
63673
|
return void 0;
|
|
62701
63674
|
}
|
|
@@ -62704,7 +63677,7 @@ function ensureFirstRunRPr(pt2) {
|
|
|
62704
63677
|
if (!firstP || typeof firstP !== "object") {
|
|
62705
63678
|
return void 0;
|
|
62706
63679
|
}
|
|
62707
|
-
const rKey =
|
|
63680
|
+
const rKey = findKey11(firstP, "r");
|
|
62708
63681
|
if (!rKey) {
|
|
62709
63682
|
return void 0;
|
|
62710
63683
|
}
|
|
@@ -63742,7 +64715,7 @@ var init_layout_display_name = __esm({
|
|
|
63742
64715
|
});
|
|
63743
64716
|
|
|
63744
64717
|
// src/pptx/core/utils/chart-bubble-options.ts
|
|
63745
|
-
function
|
|
64718
|
+
function findKey12(node, name, localName29) {
|
|
63746
64719
|
return Object.keys(node).find((key2) => localName29(key2) === name);
|
|
63747
64720
|
}
|
|
63748
64721
|
function boolValue2(node) {
|
|
@@ -63757,7 +64730,7 @@ function parseBubbleChartOptions(container2, localName29) {
|
|
|
63757
64730
|
return void 0;
|
|
63758
64731
|
}
|
|
63759
64732
|
const node = (name) => {
|
|
63760
|
-
const key2 =
|
|
64733
|
+
const key2 = findKey12(container2, name, localName29);
|
|
63761
64734
|
return key2 ? container2[key2] : void 0;
|
|
63762
64735
|
};
|
|
63763
64736
|
const options = {};
|
|
@@ -63786,7 +64759,7 @@ function parseBubbleChartOptions(container2, localName29) {
|
|
|
63786
64759
|
return Object.keys(options).length > 0 ? options : void 0;
|
|
63787
64760
|
}
|
|
63788
64761
|
function insertOrdered2(container2, name, value, localName29) {
|
|
63789
|
-
const existingKey =
|
|
64762
|
+
const existingKey = findKey12(container2, name, localName29);
|
|
63790
64763
|
if (existingKey) {
|
|
63791
64764
|
container2[existingKey] = { ...container2[existingKey], ...value };
|
|
63792
64765
|
return;
|
|
@@ -64114,7 +65087,7 @@ function parseChartUpDownBars(chartContainer, xmlLookup, colorParser) {
|
|
|
64114
65087
|
return result;
|
|
64115
65088
|
}
|
|
64116
65089
|
function setOrdered2(node, name, value, order, localName29) {
|
|
64117
|
-
const key2 =
|
|
65090
|
+
const key2 = findKey13(node, name, localName29);
|
|
64118
65091
|
if (key2) {
|
|
64119
65092
|
node[key2] = value;
|
|
64120
65093
|
return;
|
|
@@ -64137,7 +65110,7 @@ function applyChartUpDownBars(chartContainer, options, localName29, resolveColor
|
|
|
64137
65110
|
if (options === void 0) {
|
|
64138
65111
|
return;
|
|
64139
65112
|
}
|
|
64140
|
-
const key2 =
|
|
65113
|
+
const key2 = findKey13(chartContainer, "upDownBars", localName29);
|
|
64141
65114
|
if (options === null) {
|
|
64142
65115
|
if (key2) {
|
|
64143
65116
|
delete chartContainer[key2];
|
|
@@ -64159,11 +65132,11 @@ function applyChartUpDownBars(chartContainer, options, localName29, resolveColor
|
|
|
64159
65132
|
if (!style) {
|
|
64160
65133
|
continue;
|
|
64161
65134
|
}
|
|
64162
|
-
const existingBar =
|
|
65135
|
+
const existingBar = findKey13(node, name, localName29);
|
|
64163
65136
|
const bar = {
|
|
64164
65137
|
...existingBar ? node[existingBar] : void 0
|
|
64165
65138
|
};
|
|
64166
|
-
const spPrKey =
|
|
65139
|
+
const spPrKey = findKey13(bar, "spPr", localName29) ?? "c:spPr";
|
|
64167
65140
|
bar[spPrKey] = writeChartShapeProps(
|
|
64168
65141
|
bar[spPrKey],
|
|
64169
65142
|
style,
|
|
@@ -64174,7 +65147,7 @@ function applyChartUpDownBars(chartContainer, options, localName29, resolveColor
|
|
|
64174
65147
|
}
|
|
64175
65148
|
setOrdered2(chartContainer, "upDownBars", node, CONTAINER_ORDER, localName29);
|
|
64176
65149
|
}
|
|
64177
|
-
var CONTAINER_ORDER,
|
|
65150
|
+
var CONTAINER_ORDER, findKey13;
|
|
64178
65151
|
var init_chart_up_down_bars = __esm({
|
|
64179
65152
|
"src/pptx/core/utils/chart-up-down-bars.ts"() {
|
|
64180
65153
|
init_chart_percent_union_value();
|
|
@@ -64193,7 +65166,7 @@ var init_chart_up_down_bars = __esm({
|
|
|
64193
65166
|
"axId",
|
|
64194
65167
|
"extLst"
|
|
64195
65168
|
];
|
|
64196
|
-
|
|
65169
|
+
findKey13 = (node, name, localName29) => Object.keys(node).find((key2) => localName29(key2) === name);
|
|
64197
65170
|
}
|
|
64198
65171
|
});
|
|
64199
65172
|
|
|
@@ -74270,9 +75243,7 @@ function applyCellBorderStyle(cellProperties, style, context) {
|
|
|
74270
75243
|
}
|
|
74271
75244
|
const widthEmu = parseInt(String(node["@_w"] || "0"), 10);
|
|
74272
75245
|
if (widthEmu > 0) {
|
|
74273
|
-
style[`${prefix}Width`] =
|
|
74274
|
-
widthEmu / context.emuPerPx
|
|
74275
|
-
);
|
|
75246
|
+
style[`${prefix}Width`] = widthEmu / context.emuPerPx;
|
|
74276
75247
|
hasStyle = true;
|
|
74277
75248
|
}
|
|
74278
75249
|
const color2 = context.parseColor(node["a:solidFill"]);
|
|
@@ -74302,7 +75273,7 @@ function applyCellBorderStyle(cellProperties, style, context) {
|
|
|
74302
75273
|
hasStyle = true;
|
|
74303
75274
|
}
|
|
74304
75275
|
if (w > 0) {
|
|
74305
|
-
style.borderDiagDownWidth =
|
|
75276
|
+
style.borderDiagDownWidth = w / context.emuPerPx;
|
|
74306
75277
|
hasStyle = true;
|
|
74307
75278
|
}
|
|
74308
75279
|
}
|
|
@@ -74315,7 +75286,7 @@ function applyCellBorderStyle(cellProperties, style, context) {
|
|
|
74315
75286
|
hasStyle = true;
|
|
74316
75287
|
}
|
|
74317
75288
|
if (w > 0) {
|
|
74318
|
-
style.borderDiagUpWidth =
|
|
75289
|
+
style.borderDiagUpWidth = w / context.emuPerPx;
|
|
74319
75290
|
hasStyle = true;
|
|
74320
75291
|
}
|
|
74321
75292
|
}
|
|
@@ -74333,7 +75304,7 @@ function applyCellMarginStyle(cellProperties, style, context) {
|
|
|
74333
75304
|
return void 0;
|
|
74334
75305
|
}
|
|
74335
75306
|
const w = parseInt(String(node["@_w"]), 10);
|
|
74336
|
-
return Number.isFinite(w) && w >= 0 ?
|
|
75307
|
+
return Number.isFinite(w) && w >= 0 ? w / context.emuPerPx : void 0;
|
|
74337
75308
|
};
|
|
74338
75309
|
const ml = parseMargin(tcMar["a:marL"]);
|
|
74339
75310
|
const mr = parseMargin(tcMar["a:marR"]);
|
|
@@ -74367,7 +75338,7 @@ function applyCellMarginStyle(cellProperties, style, context) {
|
|
|
74367
75338
|
if (style[key2] === void 0 && raw !== void 0 && raw !== null) {
|
|
74368
75339
|
const v = parseInt(String(raw), 10);
|
|
74369
75340
|
if (Number.isFinite(v) && v >= 0) {
|
|
74370
|
-
style[key2] =
|
|
75341
|
+
style[key2] = v / context.emuPerPx;
|
|
74371
75342
|
hasStyle = true;
|
|
74372
75343
|
}
|
|
74373
75344
|
}
|
|
@@ -74663,6 +75634,10 @@ function applyRunProperties(run, runProperties2, context) {
|
|
|
74663
75634
|
if (fontFamily) {
|
|
74664
75635
|
run.fontFamily = fontFamily;
|
|
74665
75636
|
}
|
|
75637
|
+
const baseline = parseInt(String(runProperties2["@_baseline"] ?? ""), 10);
|
|
75638
|
+
if (Number.isFinite(baseline) && baseline !== 0) {
|
|
75639
|
+
run.baseline = baseline;
|
|
75640
|
+
}
|
|
74666
75641
|
}
|
|
74667
75642
|
function extractTableCellTextRuns(tableCell, context) {
|
|
74668
75643
|
const paragraphs = context.ensureArray(
|
|
@@ -103189,7 +104164,7 @@ function parseEmbeddedFontList(presentationData) {
|
|
|
103189
104164
|
};
|
|
103190
104165
|
}
|
|
103191
104166
|
function applyAttribute(node, name, value) {
|
|
103192
|
-
const key2 =
|
|
104167
|
+
const key2 = findKey14(node, name);
|
|
103193
104168
|
if (value === null) {
|
|
103194
104169
|
if (key2) {
|
|
103195
104170
|
delete node[key2];
|
|
@@ -103237,7 +104212,7 @@ function serializeEntry(entry) {
|
|
|
103237
104212
|
}
|
|
103238
104213
|
for (const name of ENTRY_ORDER) {
|
|
103239
104214
|
const edit = edits.get(name);
|
|
103240
|
-
const key2 =
|
|
104215
|
+
const key2 = findKey14(source, name) ?? `p:${name}`;
|
|
103241
104216
|
if (edit !== null && edit !== void 0) {
|
|
103242
104217
|
result[key2] = edit;
|
|
103243
104218
|
} else if (!edits.has(name) && source[key2] !== void 0) {
|
|
@@ -103256,7 +104231,7 @@ function serializeEmbeddedFontList(list2) {
|
|
|
103256
104231
|
throw new Error("CT_EmbeddedFontList requires at least one embeddedFont");
|
|
103257
104232
|
}
|
|
103258
104233
|
const source = { ...list2.rawXml ?? {} };
|
|
103259
|
-
const key2 =
|
|
104234
|
+
const key2 = findKey14(source, "embeddedFont") ?? "p:embeddedFont";
|
|
103260
104235
|
source[key2] = list2.fonts.map(serializeEntry);
|
|
103261
104236
|
return source;
|
|
103262
104237
|
}
|
|
@@ -103266,7 +104241,7 @@ function setEmbeddedFontList(presentationData, list2) {
|
|
|
103266
104241
|
return;
|
|
103267
104242
|
}
|
|
103268
104243
|
const root = presentationData[rootKey];
|
|
103269
|
-
const existingKey =
|
|
104244
|
+
const existingKey = findKey14(root, "embeddedFontLst");
|
|
103270
104245
|
const result = {};
|
|
103271
104246
|
let inserted = false;
|
|
103272
104247
|
for (const [key2, value] of Object.entries(root)) {
|
|
@@ -103285,7 +104260,7 @@ function setEmbeddedFontList(presentationData, list2) {
|
|
|
103285
104260
|
}
|
|
103286
104261
|
presentationData[rootKey] = result;
|
|
103287
104262
|
}
|
|
103288
|
-
var ENTRY_ORDER, PRESENTATION_BEFORE, localName17,
|
|
104263
|
+
var ENTRY_ORDER, PRESENTATION_BEFORE, localName17, findKey14, child16, children12;
|
|
103289
104264
|
var init_embedded_font_list = __esm({
|
|
103290
104265
|
"src/pptx/core/utils/embedded-font-list.ts"() {
|
|
103291
104266
|
ENTRY_ORDER = ["font", "regular", "bold", "italic", "boldItalic"];
|
|
@@ -103299,13 +104274,13 @@ var init_embedded_font_list = __esm({
|
|
|
103299
104274
|
"smartTags"
|
|
103300
104275
|
]);
|
|
103301
104276
|
localName17 = (key2) => key2.replace(/^@_/u, "").replace(/^.*:/u, "");
|
|
103302
|
-
|
|
104277
|
+
findKey14 = (node, name) => Object.keys(node).find((key2) => localName17(key2) === name);
|
|
103303
104278
|
child16 = (node, name) => {
|
|
103304
|
-
const key2 =
|
|
104279
|
+
const key2 = findKey14(node, name);
|
|
103305
104280
|
return key2 ? node[key2] : void 0;
|
|
103306
104281
|
};
|
|
103307
104282
|
children12 = (node, name) => {
|
|
103308
|
-
const key2 =
|
|
104283
|
+
const key2 = findKey14(node, name);
|
|
103309
104284
|
const value = key2 ? node[key2] : void 0;
|
|
103310
104285
|
return Array.isArray(value) ? value : value ? [value] : [];
|
|
103311
104286
|
};
|
|
@@ -103820,7 +104795,7 @@ function parseChartBandFmts(seriesContainer, xmlLookup, colorParser) {
|
|
|
103820
104795
|
return result.length > 0 ? result : void 0;
|
|
103821
104796
|
}
|
|
103822
104797
|
function setOrdered3(node, name, value, order, localName29) {
|
|
103823
|
-
const key2 =
|
|
104798
|
+
const key2 = findKey15(node, name, localName29);
|
|
103824
104799
|
if (key2) {
|
|
103825
104800
|
node[key2] = value;
|
|
103826
104801
|
return;
|
|
@@ -103843,7 +104818,7 @@ function applyChartBandFmts(seriesContainer, bandFmts, localName29, resolveColor
|
|
|
103843
104818
|
if (bandFmts === void 0) {
|
|
103844
104819
|
return;
|
|
103845
104820
|
}
|
|
103846
|
-
const containerKey =
|
|
104821
|
+
const containerKey = findKey15(seriesContainer, "bandFmts", localName29);
|
|
103847
104822
|
if (bandFmts.length === 0) {
|
|
103848
104823
|
if (containerKey) {
|
|
103849
104824
|
delete seriesContainer[containerKey];
|
|
@@ -103851,11 +104826,11 @@ function applyChartBandFmts(seriesContainer, bandFmts, localName29, resolveColor
|
|
|
103851
104826
|
return;
|
|
103852
104827
|
}
|
|
103853
104828
|
const bandFmtsNode = containerKey ? seriesContainer[containerKey] : void 0;
|
|
103854
|
-
const bandFmtKey = bandFmtsNode ?
|
|
104829
|
+
const bandFmtKey = bandFmtsNode ? findKey15(bandFmtsNode, "bandFmt", localName29) : void 0;
|
|
103855
104830
|
const existingRaw = bandFmtKey ? bandFmtsNode?.[bandFmtKey] : void 0;
|
|
103856
104831
|
const existingNodes = existingRaw ? Array.isArray(existingRaw) ? existingRaw : [existingRaw] : [];
|
|
103857
104832
|
const bandIndexOf = (node) => {
|
|
103858
|
-
const idxKey =
|
|
104833
|
+
const idxKey = findKey15(node, "idx", localName29);
|
|
103859
104834
|
return idxKey ? safeUnsignedInt2(node[idxKey]?.["@_val"]) : void 0;
|
|
103860
104835
|
};
|
|
103861
104836
|
const byIndex = new Map(existingNodes.map((node) => [bandIndexOf(node), node]));
|
|
@@ -103867,7 +104842,7 @@ function applyChartBandFmts(seriesContainer, bandFmts, localName29, resolveColor
|
|
|
103867
104842
|
updated.push(node);
|
|
103868
104843
|
}
|
|
103869
104844
|
if (band.spPr) {
|
|
103870
|
-
const spPrKey =
|
|
104845
|
+
const spPrKey = findKey15(node, "spPr", localName29);
|
|
103871
104846
|
const spPr = writeChartShapeProps(
|
|
103872
104847
|
spPrKey ? node[spPrKey] : void 0,
|
|
103873
104848
|
band.spPr,
|
|
@@ -103885,12 +104860,12 @@ function applyChartBandFmts(seriesContainer, bandFmts, localName29, resolveColor
|
|
|
103885
104860
|
localName29
|
|
103886
104861
|
);
|
|
103887
104862
|
}
|
|
103888
|
-
var
|
|
104863
|
+
var findKey15;
|
|
103889
104864
|
var init_chart_band_fmts = __esm({
|
|
103890
104865
|
"src/pptx/core/utils/chart-band-fmts.ts"() {
|
|
103891
104866
|
init_chart_series_detail_parser();
|
|
103892
104867
|
init_chart_shape_props_writer();
|
|
103893
|
-
|
|
104868
|
+
findKey15 = (node, name, localName29) => Object.keys(node).find((key2) => localName29(key2) === name);
|
|
103894
104869
|
}
|
|
103895
104870
|
});
|
|
103896
104871
|
|
|
@@ -103940,142 +104915,6 @@ var init_chart_blank_values = __esm({
|
|
|
103940
104915
|
}
|
|
103941
104916
|
});
|
|
103942
104917
|
|
|
103943
|
-
// src/pptx/core/utils/chart-container-content-model.ts
|
|
103944
|
-
function chartTypeToContainerLocalName(chartType) {
|
|
103945
|
-
return TYPE_TO_CONTAINER[chartType];
|
|
103946
|
-
}
|
|
103947
|
-
function isKnownChartContainer(containerLocal) {
|
|
103948
|
-
return containerLocal in CHART_CONTAINER_CHILD_ORDER;
|
|
103949
|
-
}
|
|
103950
|
-
function chartContainerAllows(containerLocal, childLocal) {
|
|
103951
|
-
const order = CHART_CONTAINER_CHILD_ORDER[containerLocal];
|
|
103952
|
-
return order !== void 0 && order.includes(childLocal);
|
|
103953
|
-
}
|
|
103954
|
-
var CHART_CONTAINER_CHILD_ORDER, REQUIRED_LEADING_CHILD, TYPE_TO_CONTAINER, AXIS_LOCAL_NAMES;
|
|
103955
|
-
var init_chart_container_content_model = __esm({
|
|
103956
|
-
"src/pptx/core/utils/chart-container-content-model.ts"() {
|
|
103957
|
-
CHART_CONTAINER_CHILD_ORDER = {
|
|
103958
|
-
areaChart: ["grouping", "varyColors", "ser", "dLbls", "dropLines", "axId", "extLst"],
|
|
103959
|
-
area3DChart: [
|
|
103960
|
-
"grouping",
|
|
103961
|
-
"varyColors",
|
|
103962
|
-
"ser",
|
|
103963
|
-
"dLbls",
|
|
103964
|
-
"dropLines",
|
|
103965
|
-
"gapDepth",
|
|
103966
|
-
"axId",
|
|
103967
|
-
"extLst"
|
|
103968
|
-
],
|
|
103969
|
-
barChart: [
|
|
103970
|
-
"barDir",
|
|
103971
|
-
"grouping",
|
|
103972
|
-
"varyColors",
|
|
103973
|
-
"ser",
|
|
103974
|
-
"dLbls",
|
|
103975
|
-
"gapWidth",
|
|
103976
|
-
"overlap",
|
|
103977
|
-
"serLines",
|
|
103978
|
-
"axId",
|
|
103979
|
-
"extLst"
|
|
103980
|
-
],
|
|
103981
|
-
bar3DChart: [
|
|
103982
|
-
"barDir",
|
|
103983
|
-
"grouping",
|
|
103984
|
-
"varyColors",
|
|
103985
|
-
"ser",
|
|
103986
|
-
"dLbls",
|
|
103987
|
-
"gapWidth",
|
|
103988
|
-
"gapDepth",
|
|
103989
|
-
"shape",
|
|
103990
|
-
"axId",
|
|
103991
|
-
"extLst"
|
|
103992
|
-
],
|
|
103993
|
-
bubbleChart: [
|
|
103994
|
-
"varyColors",
|
|
103995
|
-
"ser",
|
|
103996
|
-
"dLbls",
|
|
103997
|
-
"bubble3D",
|
|
103998
|
-
"bubbleScale",
|
|
103999
|
-
"showNegBubbles",
|
|
104000
|
-
"sizeRepresents",
|
|
104001
|
-
"axId",
|
|
104002
|
-
"extLst"
|
|
104003
|
-
],
|
|
104004
|
-
doughnutChart: ["varyColors", "ser", "dLbls", "firstSliceAng", "holeSize", "extLst"],
|
|
104005
|
-
lineChart: [
|
|
104006
|
-
"grouping",
|
|
104007
|
-
"varyColors",
|
|
104008
|
-
"ser",
|
|
104009
|
-
"dLbls",
|
|
104010
|
-
"dropLines",
|
|
104011
|
-
"hiLowLines",
|
|
104012
|
-
"upDownBars",
|
|
104013
|
-
"marker",
|
|
104014
|
-
"smooth",
|
|
104015
|
-
"axId",
|
|
104016
|
-
"extLst"
|
|
104017
|
-
],
|
|
104018
|
-
line3DChart: [
|
|
104019
|
-
"grouping",
|
|
104020
|
-
"varyColors",
|
|
104021
|
-
"ser",
|
|
104022
|
-
"dLbls",
|
|
104023
|
-
"dropLines",
|
|
104024
|
-
"gapDepth",
|
|
104025
|
-
"axId",
|
|
104026
|
-
"extLst"
|
|
104027
|
-
],
|
|
104028
|
-
ofPieChart: [
|
|
104029
|
-
"ofPieType",
|
|
104030
|
-
"varyColors",
|
|
104031
|
-
"ser",
|
|
104032
|
-
"dLbls",
|
|
104033
|
-
"gapWidth",
|
|
104034
|
-
"splitType",
|
|
104035
|
-
"splitPos",
|
|
104036
|
-
"custSplit",
|
|
104037
|
-
"secondPieSize",
|
|
104038
|
-
"serLines",
|
|
104039
|
-
"extLst"
|
|
104040
|
-
],
|
|
104041
|
-
pieChart: ["varyColors", "ser", "dLbls", "firstSliceAng", "extLst"],
|
|
104042
|
-
pie3DChart: ["varyColors", "ser", "dLbls", "extLst"],
|
|
104043
|
-
radarChart: ["radarStyle", "varyColors", "ser", "dLbls", "axId", "extLst"],
|
|
104044
|
-
scatterChart: ["scatterStyle", "varyColors", "ser", "dLbls", "axId", "extLst"],
|
|
104045
|
-
stockChart: ["ser", "dLbls", "dropLines", "hiLowLines", "upDownBars", "axId", "extLst"],
|
|
104046
|
-
surfaceChart: ["wireframe", "ser", "bandFmts", "axId", "extLst"],
|
|
104047
|
-
surface3DChart: ["wireframe", "ser", "bandFmts", "axId", "extLst"]
|
|
104048
|
-
};
|
|
104049
|
-
REQUIRED_LEADING_CHILD = {
|
|
104050
|
-
barChart: { local: "barDir", val: "col" },
|
|
104051
|
-
bar3DChart: { local: "barDir", val: "col" },
|
|
104052
|
-
lineChart: { local: "grouping", val: "standard" },
|
|
104053
|
-
line3DChart: { local: "grouping", val: "standard" },
|
|
104054
|
-
ofPieChart: { local: "ofPieType", val: "pie" },
|
|
104055
|
-
radarChart: { local: "radarStyle", val: "marker" },
|
|
104056
|
-
scatterChart: { local: "scatterStyle", val: "lineMarker" }
|
|
104057
|
-
};
|
|
104058
|
-
TYPE_TO_CONTAINER = {
|
|
104059
|
-
area: "areaChart",
|
|
104060
|
-
area3D: "area3DChart",
|
|
104061
|
-
bar: "barChart",
|
|
104062
|
-
bar3D: "bar3DChart",
|
|
104063
|
-
bubble: "bubbleChart",
|
|
104064
|
-
doughnut: "doughnutChart",
|
|
104065
|
-
line: "lineChart",
|
|
104066
|
-
line3D: "line3DChart",
|
|
104067
|
-
ofPie: "ofPieChart",
|
|
104068
|
-
pie: "pieChart",
|
|
104069
|
-
pie3D: "pie3DChart",
|
|
104070
|
-
radar: "radarChart",
|
|
104071
|
-
scatter: "scatterChart",
|
|
104072
|
-
stock: "stockChart",
|
|
104073
|
-
surface: "surfaceChart"
|
|
104074
|
-
};
|
|
104075
|
-
AXIS_LOCAL_NAMES = ["catAx", "valAx", "dateAx", "serAx"];
|
|
104076
|
-
}
|
|
104077
|
-
});
|
|
104078
|
-
|
|
104079
104918
|
// src/pptx/core/utils/chart-container-type-map.ts
|
|
104080
104919
|
function chartContainerLocalNameToType(localName29) {
|
|
104081
104920
|
return CONTAINER_LOCAL_NAME_TO_TYPE[localName29];
|
|
@@ -104135,7 +104974,7 @@ var init_chart_date_categories = __esm({
|
|
|
104135
104974
|
});
|
|
104136
104975
|
|
|
104137
104976
|
// src/pptx/core/utils/chart-filtered-series.ts
|
|
104138
|
-
function
|
|
104977
|
+
function localNameOf10(key2) {
|
|
104139
104978
|
return key2.replace(/^.*:/u, "");
|
|
104140
104979
|
}
|
|
104141
104980
|
function scalarChild(parent, name, xmlLookup) {
|
|
@@ -104215,7 +105054,7 @@ function parseOneFilteredSeries(node, xmlLookup) {
|
|
|
104215
105054
|
if (values.length > 0) {
|
|
104216
105055
|
result.values = values;
|
|
104217
105056
|
}
|
|
104218
|
-
const uniqueId = parseChartUniqueId(node,
|
|
105057
|
+
const uniqueId = parseChartUniqueId(node, localNameOf10);
|
|
104219
105058
|
if (uniqueId) {
|
|
104220
105059
|
result.uniqueId = uniqueId;
|
|
104221
105060
|
}
|
|
@@ -104233,7 +105072,7 @@ function parseFilteredSeries(container2, xmlLookup) {
|
|
|
104233
105072
|
if (!ext) {
|
|
104234
105073
|
return void 0;
|
|
104235
105074
|
}
|
|
104236
|
-
const wrapperKey = Object.keys(ext).find((key2) => /^filtered.*series$/iu.test(
|
|
105075
|
+
const wrapperKey = Object.keys(ext).find((key2) => /^filtered.*series$/iu.test(localNameOf10(key2)));
|
|
104237
105076
|
if (!wrapperKey) {
|
|
104238
105077
|
return void 0;
|
|
104239
105078
|
}
|
|
@@ -108121,7 +108960,7 @@ function parsePrintProperties(node) {
|
|
|
108121
108960
|
};
|
|
108122
108961
|
}
|
|
108123
108962
|
function applyAttribute2(node, name, value) {
|
|
108124
|
-
const existingKey =
|
|
108963
|
+
const existingKey = findKey16(node, name);
|
|
108125
108964
|
if (value === null) {
|
|
108126
108965
|
if (existingKey) {
|
|
108127
108966
|
delete node[existingKey];
|
|
@@ -108156,14 +108995,14 @@ function serializePrintProperties(properties) {
|
|
|
108156
108995
|
result[key2] = value;
|
|
108157
108996
|
}
|
|
108158
108997
|
}
|
|
108159
|
-
const extKey =
|
|
108998
|
+
const extKey = findKey16(source, "extLst");
|
|
108160
108999
|
if (extKey) {
|
|
108161
109000
|
result[extKey] = source[extKey];
|
|
108162
109001
|
}
|
|
108163
109002
|
return result;
|
|
108164
109003
|
}
|
|
108165
109004
|
function findChildByLocalName2(parent, name) {
|
|
108166
|
-
const key2 =
|
|
109005
|
+
const key2 = findKey16(parent, name);
|
|
108167
109006
|
return key2 ? parent[key2] : void 0;
|
|
108168
109007
|
}
|
|
108169
109008
|
function setPresentationPropertiesChild(root, name, value) {
|
|
@@ -108202,7 +109041,7 @@ function slidesPerPageToPrintOutput(value) {
|
|
|
108202
109041
|
}
|
|
108203
109042
|
return `handouts${value}`;
|
|
108204
109043
|
}
|
|
108205
|
-
var PRINT_OUTPUTS, COLOR_MODES, ROOT_ORDER, localName21,
|
|
109044
|
+
var PRINT_OUTPUTS, COLOR_MODES, ROOT_ORDER, localName21, findKey16;
|
|
108206
109045
|
var init_pptx_print_properties = __esm({
|
|
108207
109046
|
"src/pptx/core/core/runtime/pptx-print-properties.ts"() {
|
|
108208
109047
|
PRINT_OUTPUTS = /* @__PURE__ */ new Set([
|
|
@@ -108219,7 +109058,7 @@ var init_pptx_print_properties = __esm({
|
|
|
108219
109058
|
COLOR_MODES = /* @__PURE__ */ new Set(["bw", "gray", "clr"]);
|
|
108220
109059
|
ROOT_ORDER = ["htmlPubPr", "webPr", "prnPr", "showPr", "clrMru", "extLst"];
|
|
108221
109060
|
localName21 = (key2) => key2.replace(/^@_/u, "").replace(/^.*:/u, "");
|
|
108222
|
-
|
|
109061
|
+
findKey16 = (node, name) => Object.keys(node).find((key2) => localName21(key2) === name);
|
|
108223
109062
|
}
|
|
108224
109063
|
});
|
|
108225
109064
|
|
|
@@ -113710,7 +114549,7 @@ var init_chart_cx_generator = __esm({
|
|
|
113710
114549
|
});
|
|
113711
114550
|
|
|
113712
114551
|
// src/pptx/core/utils/chart-data-labels-serializer.ts
|
|
113713
|
-
function
|
|
114552
|
+
function findKey17(obj, local, getLocalName2) {
|
|
113714
114553
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
113715
114554
|
}
|
|
113716
114555
|
function boolVal(on) {
|
|
@@ -113784,7 +114623,7 @@ function applyChartDataLabelsToXml(plotArea, style, getLocalName2) {
|
|
|
113784
114623
|
if (!container2 || typeof container2 !== "object") {
|
|
113785
114624
|
continue;
|
|
113786
114625
|
}
|
|
113787
|
-
const existingKey =
|
|
114626
|
+
const existingKey = findKey17(container2, "dLbls", getLocalName2);
|
|
113788
114627
|
if (style.hasDataLabels === false) {
|
|
113789
114628
|
const existing2 = existingKey ? container2[existingKey] : void 0;
|
|
113790
114629
|
const off = ordered3(existing2, { "c:delete": { "@_val": "1" } }, getLocalName2);
|
|
@@ -113862,11 +114701,11 @@ var init_chart_data_labels_serializer = __esm({
|
|
|
113862
114701
|
});
|
|
113863
114702
|
|
|
113864
114703
|
// src/pptx/core/utils/chart-data-table.ts
|
|
113865
|
-
function
|
|
114704
|
+
function findKey18(node, name, localName29) {
|
|
113866
114705
|
return Object.keys(node).find((key2) => localName29(key2) === name);
|
|
113867
114706
|
}
|
|
113868
114707
|
function setOrdered4(node, name, value, order, localName29) {
|
|
113869
|
-
const existingKey =
|
|
114708
|
+
const existingKey = findKey18(node, name, localName29);
|
|
113870
114709
|
if (existingKey) {
|
|
113871
114710
|
node[existingKey] = value;
|
|
113872
114711
|
return;
|
|
@@ -113889,7 +114728,7 @@ function applyChartDataTable(plotArea, dataTable, localName29, resolveColor2) {
|
|
|
113889
114728
|
if (dataTable === void 0) {
|
|
113890
114729
|
return;
|
|
113891
114730
|
}
|
|
113892
|
-
const tableKey =
|
|
114731
|
+
const tableKey = findKey18(plotArea, "dTable", localName29);
|
|
113893
114732
|
if (dataTable === null) {
|
|
113894
114733
|
if (tableKey) {
|
|
113895
114734
|
delete plotArea[tableKey];
|
|
@@ -113906,7 +114745,7 @@ function applyChartDataTable(plotArea, dataTable, localName29, resolveColor2) {
|
|
|
113906
114745
|
}
|
|
113907
114746
|
}
|
|
113908
114747
|
if (dataTable.spPr) {
|
|
113909
|
-
const spPrKey =
|
|
114748
|
+
const spPrKey = findKey18(table, "spPr", localName29);
|
|
113910
114749
|
const spPr = writeChartShapeProps(
|
|
113911
114750
|
spPrKey ? table[spPrKey] : void 0,
|
|
113912
114751
|
dataTable.spPr,
|
|
@@ -113916,13 +114755,13 @@ function applyChartDataTable(plotArea, dataTable, localName29, resolveColor2) {
|
|
|
113916
114755
|
setOrdered4(table, "spPr", spPr, TABLE_ORDER, localName29);
|
|
113917
114756
|
}
|
|
113918
114757
|
if (dataTable.txPr) {
|
|
113919
|
-
const txPrKey =
|
|
114758
|
+
const txPrKey = findKey18(table, "txPr", localName29);
|
|
113920
114759
|
const authoredDefRPr = resolveTxPrDefRPr(txPrKey ? table[txPrKey] : void 0, {
|
|
113921
114760
|
getChildByLocalName: (parent, name) => {
|
|
113922
114761
|
if (!parent) {
|
|
113923
114762
|
return void 0;
|
|
113924
114763
|
}
|
|
113925
|
-
const key2 =
|
|
114764
|
+
const key2 = findKey18(parent, name, localName29);
|
|
113926
114765
|
return key2 ? parent[key2] : void 0;
|
|
113927
114766
|
}
|
|
113928
114767
|
});
|
|
@@ -113982,7 +114821,7 @@ var init_chart_data_table = __esm({
|
|
|
113982
114821
|
});
|
|
113983
114822
|
|
|
113984
114823
|
// src/pptx/core/utils/chart-errbars-serializer.ts
|
|
113985
|
-
function
|
|
114824
|
+
function findKey19(obj, local, getLocalName2) {
|
|
113986
114825
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
113987
114826
|
}
|
|
113988
114827
|
function ensureArray14(v) {
|
|
@@ -114025,7 +114864,7 @@ function buildErrBars(existing, e, getLocalName2, resolveColor2) {
|
|
|
114025
114864
|
if (e.noEndCap !== void 0) {
|
|
114026
114865
|
node["c:noEndCap"] = { "@_val": e.noEndCap ? "1" : "0" };
|
|
114027
114866
|
} else if (existing) {
|
|
114028
|
-
const noEndCapKey =
|
|
114867
|
+
const noEndCapKey = findKey19(existing, "noEndCap", getLocalName2);
|
|
114029
114868
|
if (noEndCapKey) {
|
|
114030
114869
|
node["c:noEndCap"] = existing[noEndCapKey];
|
|
114031
114870
|
}
|
|
@@ -114040,7 +114879,7 @@ function buildErrBars(existing, e, getLocalName2, resolveColor2) {
|
|
|
114040
114879
|
} else if (e.val !== void 0) {
|
|
114041
114880
|
node["c:val"] = { "@_val": String(e.val) };
|
|
114042
114881
|
}
|
|
114043
|
-
const spPrKey = existing ?
|
|
114882
|
+
const spPrKey = existing ? findKey19(existing, "spPr", getLocalName2) : void 0;
|
|
114044
114883
|
const existingSpPr = spPrKey ? existing?.[spPrKey] : void 0;
|
|
114045
114884
|
if (e.color || e.width !== void 0 || e.dashStyle) {
|
|
114046
114885
|
node["c:spPr"] = buildSpPr(existingSpPr, e, getLocalName2, resolveColor2);
|
|
@@ -114048,7 +114887,7 @@ function buildErrBars(existing, e, getLocalName2, resolveColor2) {
|
|
|
114048
114887
|
node["c:spPr"] = existingSpPr;
|
|
114049
114888
|
}
|
|
114050
114889
|
if (existing) {
|
|
114051
|
-
const extKey =
|
|
114890
|
+
const extKey = findKey19(existing, "extLst", getLocalName2);
|
|
114052
114891
|
if (extKey) {
|
|
114053
114892
|
node["c:extLst"] = existing[extKey];
|
|
114054
114893
|
}
|
|
@@ -114056,7 +114895,7 @@ function buildErrBars(existing, e, getLocalName2, resolveColor2) {
|
|
|
114056
114895
|
return node;
|
|
114057
114896
|
}
|
|
114058
114897
|
function applySeriesErrBarsToXml(seriesNode, errBars, getLocalName2, resolveColor2) {
|
|
114059
|
-
const existingKey =
|
|
114898
|
+
const existingKey = findKey19(seriesNode, "errBars", getLocalName2);
|
|
114060
114899
|
const existingNodes = existingKey ? ensureArray14(seriesNode[existingKey]) : [];
|
|
114061
114900
|
const built = errBars.map(
|
|
114062
114901
|
(e, i2) => buildErrBars(existingNodes[i2], e, getLocalName2, resolveColor2)
|
|
@@ -114090,7 +114929,7 @@ var init_chart_errbars_serializer = __esm({
|
|
|
114090
114929
|
});
|
|
114091
114930
|
|
|
114092
114931
|
// src/pptx/core/utils/chart-series-datalabel-build.ts
|
|
114093
|
-
function
|
|
114932
|
+
function findKey20(obj, local, getLocalName2) {
|
|
114094
114933
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
114095
114934
|
}
|
|
114096
114935
|
function boolVal2(on) {
|
|
@@ -114139,7 +114978,7 @@ function buildDLbl(existing, label, getLocalName2, resolveColor2) {
|
|
|
114139
114978
|
node["c:delete"] = { "@_val": "0" };
|
|
114140
114979
|
}
|
|
114141
114980
|
if (existing && label.layout === void 0) {
|
|
114142
|
-
const layoutKey =
|
|
114981
|
+
const layoutKey = findKey20(existing, "layout", getLocalName2);
|
|
114143
114982
|
if (layoutKey) {
|
|
114144
114983
|
node[layoutKey] = existing[layoutKey];
|
|
114145
114984
|
}
|
|
@@ -114158,7 +114997,7 @@ function buildDLbl(existing, label, getLocalName2, resolveColor2) {
|
|
|
114158
114997
|
}
|
|
114159
114998
|
};
|
|
114160
114999
|
} else if (existing) {
|
|
114161
|
-
const txKey =
|
|
115000
|
+
const txKey = findKey20(existing, "tx", getLocalName2);
|
|
114162
115001
|
if (txKey) {
|
|
114163
115002
|
node[txKey] = existing[txKey];
|
|
114164
115003
|
}
|
|
@@ -114174,7 +115013,7 @@ function buildDLbl(existing, label, getLocalName2, resolveColor2) {
|
|
|
114174
115013
|
if (local === "txPr" && label.txPr !== void 0) {
|
|
114175
115014
|
continue;
|
|
114176
115015
|
}
|
|
114177
|
-
const k =
|
|
115016
|
+
const k = findKey20(existing, local, getLocalName2);
|
|
114178
115017
|
if (k) {
|
|
114179
115018
|
node[k] = existing[k];
|
|
114180
115019
|
}
|
|
@@ -114186,15 +115025,15 @@ function buildDLbl(existing, label, getLocalName2, resolveColor2) {
|
|
|
114186
115025
|
}
|
|
114187
115026
|
if (label.spPr !== void 0) {
|
|
114188
115027
|
replaced.add("spPr");
|
|
114189
|
-
const existingSpPr = existing ? existing[
|
|
115028
|
+
const existingSpPr = existing ? existing[findKey20(existing, "spPr", getLocalName2) ?? ""] : void 0;
|
|
114190
115029
|
node["c:spPr"] = writeChartShapeProps(existingSpPr, label.spPr, getLocalName2, resolveColor2);
|
|
114191
115030
|
}
|
|
114192
115031
|
if (label.txPr !== void 0) {
|
|
114193
115032
|
replaced.add("txPr");
|
|
114194
|
-
const existingTxPr = existing ? existing[
|
|
114195
|
-
const paragraph = existingTxPr ? existingTxPr[
|
|
114196
|
-
const pPr = paragraph ? paragraph[
|
|
114197
|
-
const authoredDefRPr = pPr ? pPr[
|
|
115033
|
+
const existingTxPr = existing ? existing[findKey20(existing, "txPr", getLocalName2) ?? ""] : void 0;
|
|
115034
|
+
const paragraph = existingTxPr ? existingTxPr[findKey20(existingTxPr, "p", getLocalName2) ?? ""] : void 0;
|
|
115035
|
+
const pPr = paragraph ? paragraph[findKey20(paragraph, "pPr", getLocalName2) ?? ""] : void 0;
|
|
115036
|
+
const authoredDefRPr = pPr ? pPr[findKey20(pPr, "defRPr", getLocalName2) ?? ""] : void 0;
|
|
114198
115037
|
const txPr = buildDefRPrTextProperties(label.txPr, authoredDefRPr, resolveColor2);
|
|
114199
115038
|
if (txPr) {
|
|
114200
115039
|
node["c:txPr"] = txPr;
|
|
@@ -114264,17 +115103,17 @@ var init_chart_series_datalabel_build = __esm({
|
|
|
114264
115103
|
|
|
114265
115104
|
// src/pptx/core/utils/chart-series-datalabel-serializer.ts
|
|
114266
115105
|
function applySeriesDataLabelsToXml(seriesNode, dataLabels, getLocalName2, resolveColor2) {
|
|
114267
|
-
const dLblsKey =
|
|
115106
|
+
const dLblsKey = findKey20(seriesNode, "dLbls", getLocalName2);
|
|
114268
115107
|
const labels = dataLabels ?? [];
|
|
114269
115108
|
const existingByIdx = /* @__PURE__ */ new Map();
|
|
114270
115109
|
let groupChildren = [];
|
|
114271
115110
|
if (dLblsKey) {
|
|
114272
115111
|
const dLbls = seriesNode[dLblsKey];
|
|
114273
|
-
const dLblKey =
|
|
115112
|
+
const dLblKey = findKey20(dLbls, "dLbl", getLocalName2);
|
|
114274
115113
|
if (dLblKey) {
|
|
114275
115114
|
const nodes = Array.isArray(dLbls[dLblKey]) ? dLbls[dLblKey] : [dLbls[dLblKey]];
|
|
114276
115115
|
for (const node of nodes) {
|
|
114277
|
-
const idxKey =
|
|
115116
|
+
const idxKey = findKey20(node, "idx", getLocalName2);
|
|
114278
115117
|
const idxNode = idxKey ? node[idxKey] : void 0;
|
|
114279
115118
|
const idx = idxNode ? Number.parseInt(String(idxNode["@_val"]), 10) : NaN;
|
|
114280
115119
|
if (Number.isFinite(idx)) {
|
|
@@ -114363,7 +115202,7 @@ var init_chart_space_metadata = __esm({
|
|
|
114363
115202
|
});
|
|
114364
115203
|
|
|
114365
115204
|
// src/pptx/core/utils/chart-trendline-serializer.ts
|
|
114366
|
-
function
|
|
115205
|
+
function findKey21(obj, local, getLocalName2) {
|
|
114367
115206
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
114368
115207
|
}
|
|
114369
115208
|
function ensureArray15(v) {
|
|
@@ -114402,14 +115241,14 @@ function buildSpPr2(existing, t, getLocalName2, resolveColor2) {
|
|
|
114402
115241
|
function buildTrendline(existing, t, getLocalName2, resolveColor2) {
|
|
114403
115242
|
validateTrendline(t);
|
|
114404
115243
|
const node = {};
|
|
114405
|
-
const existingNameKey = existing ?
|
|
115244
|
+
const existingNameKey = existing ? findKey21(existing, "name", getLocalName2) : void 0;
|
|
114406
115245
|
if (t.name !== void 0) {
|
|
114407
115246
|
node["c:name"] = t.name;
|
|
114408
115247
|
} else if (existing && existingNameKey) {
|
|
114409
115248
|
node["c:name"] = existing[existingNameKey];
|
|
114410
115249
|
}
|
|
114411
115250
|
const spPr = buildSpPr2(
|
|
114412
|
-
existing ? existing[
|
|
115251
|
+
existing ? existing[findKey21(existing, "spPr", getLocalName2) ?? ""] : void 0,
|
|
114413
115252
|
t,
|
|
114414
115253
|
getLocalName2,
|
|
114415
115254
|
resolveColor2
|
|
@@ -114439,7 +115278,7 @@ function buildTrendline(existing, t, getLocalName2, resolveColor2) {
|
|
|
114439
115278
|
if (t.displayEq !== void 0) {
|
|
114440
115279
|
node["c:dispEq"] = { "@_val": t.displayEq ? "1" : "0" };
|
|
114441
115280
|
}
|
|
114442
|
-
const lblKey = existing ?
|
|
115281
|
+
const lblKey = existing ? findKey21(existing, "trendlineLbl", getLocalName2) : void 0;
|
|
114443
115282
|
if (t.label) {
|
|
114444
115283
|
node["c:trendlineLbl"] = buildTrendlineLabel(
|
|
114445
115284
|
lblKey ? existing?.[lblKey] : void 0,
|
|
@@ -114450,7 +115289,7 @@ function buildTrendline(existing, t, getLocalName2, resolveColor2) {
|
|
|
114450
115289
|
node["c:trendlineLbl"] = existing[lblKey];
|
|
114451
115290
|
}
|
|
114452
115291
|
if (existing) {
|
|
114453
|
-
const extKey =
|
|
115292
|
+
const extKey = findKey21(existing, "extLst", getLocalName2);
|
|
114454
115293
|
if (extKey) {
|
|
114455
115294
|
node["c:extLst"] = existing[extKey];
|
|
114456
115295
|
}
|
|
@@ -114458,7 +115297,7 @@ function buildTrendline(existing, t, getLocalName2, resolveColor2) {
|
|
|
114458
115297
|
return node;
|
|
114459
115298
|
}
|
|
114460
115299
|
function applySeriesTrendlinesToXml(seriesNode, trendlines, getLocalName2, resolveColor2) {
|
|
114461
|
-
const existingKey =
|
|
115300
|
+
const existingKey = findKey21(seriesNode, "trendline", getLocalName2);
|
|
114462
115301
|
const existingNodes = existingKey ? ensureArray15(seriesNode[existingKey]) : [];
|
|
114463
115302
|
const built = trendlines.map(
|
|
114464
115303
|
(t, i2) => buildTrendline(existingNodes[i2], t, getLocalName2, resolveColor2)
|
|
@@ -114501,11 +115340,292 @@ var init_chart_trendline_serializer = __esm({
|
|
|
114501
115340
|
}
|
|
114502
115341
|
});
|
|
114503
115342
|
|
|
115343
|
+
// src/pptx/core/utils/chart-area-format.ts
|
|
115344
|
+
function findKey22(obj, local, getLocalName2) {
|
|
115345
|
+
return Object.keys(obj).find((key2) => getLocalName2(key2) === local);
|
|
115346
|
+
}
|
|
115347
|
+
function asObject(value) {
|
|
115348
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
115349
|
+
}
|
|
115350
|
+
function parsePaint(node, getLocalName2, resolveColor2) {
|
|
115351
|
+
if (!node) {
|
|
115352
|
+
return void 0;
|
|
115353
|
+
}
|
|
115354
|
+
if (findKey22(node, "noFill", getLocalName2) !== void 0) {
|
|
115355
|
+
return "none";
|
|
115356
|
+
}
|
|
115357
|
+
const solid = asObject(node[findKey22(node, "solidFill", getLocalName2) ?? ""]);
|
|
115358
|
+
return solid ? resolveColor2(solid) : void 0;
|
|
115359
|
+
}
|
|
115360
|
+
function parseChartAreaFormat(owner, getLocalName2, resolveColor2, parseGradient) {
|
|
115361
|
+
const spPr = owner ? asObject(owner[findKey22(owner, "spPr", getLocalName2) ?? ""]) : void 0;
|
|
115362
|
+
if (!spPr) {
|
|
115363
|
+
return {};
|
|
115364
|
+
}
|
|
115365
|
+
const format = {};
|
|
115366
|
+
const fill = parsePaint(spPr, getLocalName2, resolveColor2);
|
|
115367
|
+
if (fill !== void 0) {
|
|
115368
|
+
format.fill = fill;
|
|
115369
|
+
}
|
|
115370
|
+
const gradient = parseGradient?.(spPr);
|
|
115371
|
+
if (gradient) {
|
|
115372
|
+
format.gradient = gradient;
|
|
115373
|
+
}
|
|
115374
|
+
const ln = asObject(spPr[findKey22(spPr, "ln", getLocalName2) ?? ""]);
|
|
115375
|
+
const border = parsePaint(ln, getLocalName2, resolveColor2);
|
|
115376
|
+
if (border !== void 0) {
|
|
115377
|
+
format.border = border;
|
|
115378
|
+
}
|
|
115379
|
+
return format;
|
|
115380
|
+
}
|
|
115381
|
+
function paintXml(paint) {
|
|
115382
|
+
return paint === "none" ? { "a:noFill": {} } : { "a:solidFill": { "a:srgbClr": { "@_val": chartColorHex(paint) } } };
|
|
115383
|
+
}
|
|
115384
|
+
function buildChartAreaSpPr(format) {
|
|
115385
|
+
const spPr = {};
|
|
115386
|
+
if (format.gradient) {
|
|
115387
|
+
spPr["a:gradFill"] = buildChartGradFillXml(format.gradient);
|
|
115388
|
+
} else if (format.fill !== void 0) {
|
|
115389
|
+
Object.assign(spPr, paintXml(format.fill));
|
|
115390
|
+
}
|
|
115391
|
+
if (format.border !== void 0) {
|
|
115392
|
+
spPr["a:ln"] = paintXml(format.border);
|
|
115393
|
+
}
|
|
115394
|
+
return Object.keys(spPr).length > 0 ? spPr : void 0;
|
|
115395
|
+
}
|
|
115396
|
+
function samePaint(a, b) {
|
|
115397
|
+
if (a === void 0 || b === void 0 || a === "none" || b === "none") {
|
|
115398
|
+
return a === b;
|
|
115399
|
+
}
|
|
115400
|
+
return colorsEqual(a, b);
|
|
115401
|
+
}
|
|
115402
|
+
function sameFill(model, authored) {
|
|
115403
|
+
if (model.gradient || authored.gradient) {
|
|
115404
|
+
return Boolean(
|
|
115405
|
+
model.gradient && authored.gradient && chartGradientsEqual(model.gradient, authored.gradient)
|
|
115406
|
+
);
|
|
115407
|
+
}
|
|
115408
|
+
return samePaint(model.fill, authored.fill);
|
|
115409
|
+
}
|
|
115410
|
+
function setPaint(node, entry, choices, after, getLocalName2) {
|
|
115411
|
+
const entries = Object.entries(node).filter(([key2]) => !choices.has(getLocalName2(key2)));
|
|
115412
|
+
if (entry) {
|
|
115413
|
+
const at2 = entries.findIndex(([key2]) => after.has(getLocalName2(key2)));
|
|
115414
|
+
entries.splice(at2 === -1 ? entries.length : at2, 0, entry);
|
|
115415
|
+
}
|
|
115416
|
+
for (const key2 of Object.keys(node)) {
|
|
115417
|
+
delete node[key2];
|
|
115418
|
+
}
|
|
115419
|
+
for (const [key2, value] of entries) {
|
|
115420
|
+
node[key2] = value;
|
|
115421
|
+
}
|
|
115422
|
+
}
|
|
115423
|
+
function paintEntry(paint, authored, getLocalName2, resolveColor2) {
|
|
115424
|
+
if (paint === void 0) {
|
|
115425
|
+
return void 0;
|
|
115426
|
+
}
|
|
115427
|
+
if (paint === "none") {
|
|
115428
|
+
return ["a:noFill", {}];
|
|
115429
|
+
}
|
|
115430
|
+
const solid = asObject(authored[findKey22(authored, "solidFill", getLocalName2) ?? ""]);
|
|
115431
|
+
return ["a:solidFill", chartColorChoiceValue(solid, paint, resolveColor2)];
|
|
115432
|
+
}
|
|
115433
|
+
function applyChartAreaFormatToXml(owner, format, getLocalName2, options) {
|
|
115434
|
+
const authored = parseChartAreaFormat(
|
|
115435
|
+
owner,
|
|
115436
|
+
getLocalName2,
|
|
115437
|
+
options.resolveColor,
|
|
115438
|
+
options.parseGradient
|
|
115439
|
+
);
|
|
115440
|
+
const fillChanged = !sameFill(format, authored);
|
|
115441
|
+
const borderChanged = !samePaint(format.border, authored.border);
|
|
115442
|
+
if (!fillChanged && !borderChanged) {
|
|
115443
|
+
return false;
|
|
115444
|
+
}
|
|
115445
|
+
let spPr = asObject(owner[findKey22(owner, "spPr", getLocalName2) ?? ""]);
|
|
115446
|
+
if (!spPr) {
|
|
115447
|
+
spPr = {};
|
|
115448
|
+
options.insertSpPr(owner, spPr);
|
|
115449
|
+
}
|
|
115450
|
+
if (fillChanged) {
|
|
115451
|
+
if (format.gradient) {
|
|
115452
|
+
applyChartGradientToSpPr(spPr, format.gradient, getLocalName2, options);
|
|
115453
|
+
} else {
|
|
115454
|
+
const entry = paintEntry(format.fill, spPr, getLocalName2, options.resolveColor);
|
|
115455
|
+
setPaint(spPr, entry, FILL_CHOICE2, /* @__PURE__ */ new Set(["ln", ...AFTER_LN]), getLocalName2);
|
|
115456
|
+
}
|
|
115457
|
+
}
|
|
115458
|
+
if (borderChanged) {
|
|
115459
|
+
const lnKey = findKey22(spPr, "ln", getLocalName2);
|
|
115460
|
+
const ln = asObject(lnKey ? spPr[lnKey] : void 0) ?? {};
|
|
115461
|
+
const entry = paintEntry(format.border, ln, getLocalName2, options.resolveColor);
|
|
115462
|
+
setPaint(
|
|
115463
|
+
ln,
|
|
115464
|
+
entry,
|
|
115465
|
+
LN_FILL_CHOICE,
|
|
115466
|
+
/* @__PURE__ */ new Set(["prstDash", "custDash", "round", "bevel", "miter", "headEnd", "tailEnd", "extLst"]),
|
|
115467
|
+
getLocalName2
|
|
115468
|
+
);
|
|
115469
|
+
if (Object.keys(ln).length === 0) {
|
|
115470
|
+
if (lnKey) {
|
|
115471
|
+
delete spPr[lnKey];
|
|
115472
|
+
}
|
|
115473
|
+
} else if (!lnKey) {
|
|
115474
|
+
setPaint(spPr, ["a:ln", ln], /* @__PURE__ */ new Set(), AFTER_LN, getLocalName2);
|
|
115475
|
+
}
|
|
115476
|
+
}
|
|
115477
|
+
if (Object.keys(spPr).length === 0) {
|
|
115478
|
+
const spPrKey = findKey22(owner, "spPr", getLocalName2);
|
|
115479
|
+
if (spPrKey) {
|
|
115480
|
+
delete owner[spPrKey];
|
|
115481
|
+
}
|
|
115482
|
+
}
|
|
115483
|
+
return true;
|
|
115484
|
+
}
|
|
115485
|
+
var FILL_CHOICE2, AFTER_LN, LN_FILL_CHOICE;
|
|
115486
|
+
var init_chart_area_format = __esm({
|
|
115487
|
+
"src/pptx/core/utils/chart-area-format.ts"() {
|
|
115488
|
+
init_chart_color_choice();
|
|
115489
|
+
init_chart_gradient_fill_writer();
|
|
115490
|
+
init_chart_gradient_fill_xml();
|
|
115491
|
+
init_color_xml_preservation();
|
|
115492
|
+
FILL_CHOICE2 = /* @__PURE__ */ new Set(["noFill", "solidFill", "gradFill", "blipFill", "pattFill", "grpFill"]);
|
|
115493
|
+
AFTER_LN = /* @__PURE__ */ new Set(["effectLst", "effectDag", "scene3d", "sp3d", "extLst"]);
|
|
115494
|
+
LN_FILL_CHOICE = /* @__PURE__ */ new Set(["noFill", "solidFill", "gradFill", "pattFill"]);
|
|
115495
|
+
}
|
|
115496
|
+
});
|
|
115497
|
+
|
|
115498
|
+
// src/pptx/core/utils/chart-space-format.ts
|
|
115499
|
+
function findKey23(obj, local, getLocalName2) {
|
|
115500
|
+
return Object.keys(obj).find((key2) => getLocalName2(key2) === local);
|
|
115501
|
+
}
|
|
115502
|
+
function insertBefore(node, key2, value, after, getLocalName2) {
|
|
115503
|
+
const entries = Object.entries(node);
|
|
115504
|
+
const at2 = entries.findIndex(
|
|
115505
|
+
([candidate]) => !candidate.startsWith("@_") && after.has(getLocalName2(candidate))
|
|
115506
|
+
);
|
|
115507
|
+
entries.splice(at2 === -1 ? entries.length : at2, 0, [key2, value]);
|
|
115508
|
+
for (const candidate of Object.keys(node)) {
|
|
115509
|
+
delete node[candidate];
|
|
115510
|
+
}
|
|
115511
|
+
for (const [candidate, child27] of entries) {
|
|
115512
|
+
node[candidate] = child27;
|
|
115513
|
+
}
|
|
115514
|
+
}
|
|
115515
|
+
function chartAreaFormatOf(chartData) {
|
|
115516
|
+
const style = chartData.style;
|
|
115517
|
+
return {
|
|
115518
|
+
...style?.chartAreaFill !== void 0 ? { fill: style.chartAreaFill } : {},
|
|
115519
|
+
...style?.chartAreaGradient ? { gradient: style.chartAreaGradient } : {},
|
|
115520
|
+
...style?.chartAreaBorder !== void 0 ? { border: style.chartAreaBorder } : {}
|
|
115521
|
+
};
|
|
115522
|
+
}
|
|
115523
|
+
function plotAreaFormatOf(chartData) {
|
|
115524
|
+
const style = chartData.style;
|
|
115525
|
+
return {
|
|
115526
|
+
...style?.plotAreaFill !== void 0 ? { fill: style.plotAreaFill } : {},
|
|
115527
|
+
...style?.plotAreaGradient ? { gradient: style.plotAreaGradient } : {},
|
|
115528
|
+
...style?.plotAreaBorder !== void 0 ? { border: style.plotAreaBorder } : {}
|
|
115529
|
+
};
|
|
115530
|
+
}
|
|
115531
|
+
function applyGeneratedChartSpaceFormat(tree, chartData) {
|
|
115532
|
+
const chartSpace = tree["c:chartSpace"];
|
|
115533
|
+
if (!chartSpace) {
|
|
115534
|
+
return;
|
|
115535
|
+
}
|
|
115536
|
+
const localName29 = (key2) => key2.replace(/^.*:/u, "");
|
|
115537
|
+
const plotArea = chartSpace["c:chart"]?.["c:plotArea"];
|
|
115538
|
+
const plotSpPr = buildChartAreaSpPr(plotAreaFormatOf(chartData));
|
|
115539
|
+
if (plotArea && plotSpPr) {
|
|
115540
|
+
insertBefore(plotArea, "c:spPr", plotSpPr, /* @__PURE__ */ new Set(["extLst"]), localName29);
|
|
115541
|
+
}
|
|
115542
|
+
const chartSpPr = buildChartAreaSpPr(chartAreaFormatOf(chartData));
|
|
115543
|
+
if (chartSpPr) {
|
|
115544
|
+
insertBefore(chartSpace, "c:spPr", chartSpPr, AFTER_CHART_SPACE_SP_PR, localName29);
|
|
115545
|
+
}
|
|
115546
|
+
if (chartData.roundedCorners !== void 0) {
|
|
115547
|
+
insertBefore(
|
|
115548
|
+
chartSpace,
|
|
115549
|
+
"c:roundedCorners",
|
|
115550
|
+
{ "@_val": chartData.roundedCorners ? "1" : "0" },
|
|
115551
|
+
AFTER_ROUNDED_CORNERS,
|
|
115552
|
+
localName29
|
|
115553
|
+
);
|
|
115554
|
+
}
|
|
115555
|
+
}
|
|
115556
|
+
function authoredBool(node) {
|
|
115557
|
+
if (node === void 0) {
|
|
115558
|
+
return void 0;
|
|
115559
|
+
}
|
|
115560
|
+
const val = node && typeof node === "object" ? node["@_val"] : void 0;
|
|
115561
|
+
if (val === void 0 || val === null || val === "") {
|
|
115562
|
+
return true;
|
|
115563
|
+
}
|
|
115564
|
+
return !(val === "0" || val === "false");
|
|
115565
|
+
}
|
|
115566
|
+
function applyChartSpaceFormatToXml(chartSpace, plotArea, chartData, getLocalName2, options) {
|
|
115567
|
+
let changed = false;
|
|
115568
|
+
const roundedKey = findKey23(chartSpace, "roundedCorners", getLocalName2);
|
|
115569
|
+
const authoredRounded = roundedKey ? authoredBool(chartSpace[roundedKey]) : void 0;
|
|
115570
|
+
if (chartData.roundedCorners === void 0) {
|
|
115571
|
+
if (roundedKey) {
|
|
115572
|
+
delete chartSpace[roundedKey];
|
|
115573
|
+
changed = true;
|
|
115574
|
+
}
|
|
115575
|
+
} else if (chartData.roundedCorners !== authoredRounded) {
|
|
115576
|
+
const node = { "@_val": chartData.roundedCorners ? "1" : "0" };
|
|
115577
|
+
if (roundedKey) {
|
|
115578
|
+
chartSpace[roundedKey] = node;
|
|
115579
|
+
} else {
|
|
115580
|
+
insertBefore(chartSpace, "c:roundedCorners", node, AFTER_ROUNDED_CORNERS, getLocalName2);
|
|
115581
|
+
}
|
|
115582
|
+
changed = true;
|
|
115583
|
+
}
|
|
115584
|
+
changed = applyChartAreaFormatToXml(chartSpace, chartAreaFormatOf(chartData), getLocalName2, {
|
|
115585
|
+
...options,
|
|
115586
|
+
insertSpPr: (owner, spPr) => insertBefore(owner, "c:spPr", spPr, AFTER_CHART_SPACE_SP_PR, getLocalName2)
|
|
115587
|
+
}) || changed;
|
|
115588
|
+
if (plotArea) {
|
|
115589
|
+
changed = applyChartAreaFormatToXml(plotArea, plotAreaFormatOf(chartData), getLocalName2, {
|
|
115590
|
+
...options,
|
|
115591
|
+
insertSpPr: (owner, spPr) => insertBefore(owner, "c:spPr", spPr, /* @__PURE__ */ new Set(["extLst"]), getLocalName2)
|
|
115592
|
+
}) || changed;
|
|
115593
|
+
}
|
|
115594
|
+
return changed;
|
|
115595
|
+
}
|
|
115596
|
+
var AFTER_ROUNDED_CORNERS, AFTER_CHART_SPACE_SP_PR;
|
|
115597
|
+
var init_chart_space_format = __esm({
|
|
115598
|
+
"src/pptx/core/utils/chart-space-format.ts"() {
|
|
115599
|
+
init_chart_area_format();
|
|
115600
|
+
AFTER_ROUNDED_CORNERS = /* @__PURE__ */ new Set([
|
|
115601
|
+
"AlternateContent",
|
|
115602
|
+
"style",
|
|
115603
|
+
"clrMapOvr",
|
|
115604
|
+
"pivotSource",
|
|
115605
|
+
"protection",
|
|
115606
|
+
"chart",
|
|
115607
|
+
"spPr",
|
|
115608
|
+
"txPr",
|
|
115609
|
+
"externalData",
|
|
115610
|
+
"printSettings",
|
|
115611
|
+
"userShapes",
|
|
115612
|
+
"extLst"
|
|
115613
|
+
]);
|
|
115614
|
+
AFTER_CHART_SPACE_SP_PR = /* @__PURE__ */ new Set([
|
|
115615
|
+
"txPr",
|
|
115616
|
+
"externalData",
|
|
115617
|
+
"printSettings",
|
|
115618
|
+
"userShapes",
|
|
115619
|
+
"extLst"
|
|
115620
|
+
]);
|
|
115621
|
+
}
|
|
115622
|
+
});
|
|
115623
|
+
|
|
114504
115624
|
// src/pptx/core/utils/chart-axis-gridlines-serializer.ts
|
|
114505
|
-
function
|
|
115625
|
+
function findKey24(obj, local, getLocalName2) {
|
|
114506
115626
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
114507
115627
|
}
|
|
114508
|
-
function
|
|
115628
|
+
function insertBefore2(axisNode, newKey, value, afterSet, getLocalName2) {
|
|
114509
115629
|
const keys = Object.keys(axisNode);
|
|
114510
115630
|
const beforeIdx = keys.findIndex((k) => afterSet.has(getLocalName2(k)));
|
|
114511
115631
|
const entries = keys.map((k) => [k, axisNode[k]]);
|
|
@@ -114522,7 +115642,7 @@ function applyOne(axisNode, local, key2, flag, afterSet, getLocalName2) {
|
|
|
114522
115642
|
if (flag === void 0) {
|
|
114523
115643
|
return;
|
|
114524
115644
|
}
|
|
114525
|
-
const existingKey =
|
|
115645
|
+
const existingKey = findKey24(axisNode, local, getLocalName2);
|
|
114526
115646
|
if (!flag) {
|
|
114527
115647
|
if (existingKey) {
|
|
114528
115648
|
delete axisNode[existingKey];
|
|
@@ -114530,7 +115650,7 @@ function applyOne(axisNode, local, key2, flag, afterSet, getLocalName2) {
|
|
|
114530
115650
|
return;
|
|
114531
115651
|
}
|
|
114532
115652
|
if (!existingKey) {
|
|
114533
|
-
|
|
115653
|
+
insertBefore2(axisNode, key2, {}, afterSet, getLocalName2);
|
|
114534
115654
|
}
|
|
114535
115655
|
}
|
|
114536
115656
|
function applyChartAxisGridlinesToXml(axisNode, opts, getLocalName2, resolveColor2) {
|
|
@@ -114570,14 +115690,14 @@ function hex(color2) {
|
|
|
114570
115690
|
}
|
|
114571
115691
|
function buildGridlineSpPr(existing, style, getLocalName2, resolveColor2) {
|
|
114572
115692
|
const spPr = existing ? { ...existing } : {};
|
|
114573
|
-
const lnKey =
|
|
115693
|
+
const lnKey = findKey24(spPr, "ln", getLocalName2) ?? "a:ln";
|
|
114574
115694
|
const ln = { ...spPr[lnKey] ?? {} };
|
|
114575
115695
|
if (style.strokeWidth !== void 0) {
|
|
114576
115696
|
ln["@_w"] = String(Math.round(style.strokeWidth * 12700));
|
|
114577
115697
|
}
|
|
114578
115698
|
if (style.strokeColor) {
|
|
114579
|
-
const fillKey =
|
|
114580
|
-
const noFillKey =
|
|
115699
|
+
const fillKey = findKey24(ln, "solidFill", getLocalName2) ?? "a:solidFill";
|
|
115700
|
+
const noFillKey = findKey24(ln, "noFill", getLocalName2);
|
|
114581
115701
|
if (noFillKey) {
|
|
114582
115702
|
delete ln[noFillKey];
|
|
114583
115703
|
}
|
|
@@ -114589,7 +115709,7 @@ function buildGridlineSpPr(existing, style, getLocalName2, resolveColor2) {
|
|
|
114589
115709
|
);
|
|
114590
115710
|
}
|
|
114591
115711
|
if (style.strokeDashStyle) {
|
|
114592
|
-
const dashKey =
|
|
115712
|
+
const dashKey = findKey24(ln, "prstDash", getLocalName2) ?? "a:prstDash";
|
|
114593
115713
|
ln[dashKey] = { "@_val": style.strokeDashStyle };
|
|
114594
115714
|
}
|
|
114595
115715
|
spPr[lnKey] = ln;
|
|
@@ -114599,12 +115719,12 @@ function applyGridlineStyle(axisNode, local, style, getLocalName2, resolveColor2
|
|
|
114599
115719
|
if (!style) {
|
|
114600
115720
|
return;
|
|
114601
115721
|
}
|
|
114602
|
-
const gridKey =
|
|
115722
|
+
const gridKey = findKey24(axisNode, local, getLocalName2);
|
|
114603
115723
|
if (!gridKey) {
|
|
114604
115724
|
return;
|
|
114605
115725
|
}
|
|
114606
115726
|
const grid = { ...axisNode[gridKey] ?? {} };
|
|
114607
|
-
const spPrKey =
|
|
115727
|
+
const spPrKey = findKey24(grid, "spPr", getLocalName2) ?? "c:spPr";
|
|
114608
115728
|
grid[spPrKey] = buildGridlineSpPr(
|
|
114609
115729
|
grid[spPrKey],
|
|
114610
115730
|
style,
|
|
@@ -114644,7 +115764,7 @@ function buildGeneratedChartAxis(axId, crossId, pos2, formatting) {
|
|
|
114644
115764
|
const axis = {
|
|
114645
115765
|
"c:axId": { "@_val": String(axId) },
|
|
114646
115766
|
"c:scaling": { "c:orientation": { "@_val": "minMax" } },
|
|
114647
|
-
"c:delete": { "@_val": "0" },
|
|
115767
|
+
"c:delete": { "@_val": formatting?.deleted ? "1" : "0" },
|
|
114648
115768
|
"c:axPos": { "@_val": pos2 },
|
|
114649
115769
|
"c:crossAx": { "@_val": String(crossId) }
|
|
114650
115770
|
};
|
|
@@ -114803,7 +115923,7 @@ function buildSeries(family, s, index, categories, dateCategories) {
|
|
|
114803
115923
|
function axisFormatting(chartData, type, id, index = 0) {
|
|
114804
115924
|
return chartData.axes?.find((axis) => axis.axisId === id) ?? chartData.axes?.filter((axis) => axis.axisType === type)[index];
|
|
114805
115925
|
}
|
|
114806
|
-
function buildChartTypeContainer(chartData, family) {
|
|
115926
|
+
function buildChartTypeContainer(chartData, family, containerLocal) {
|
|
114807
115927
|
const container2 = {};
|
|
114808
115928
|
if (family === "bar") {
|
|
114809
115929
|
container2["c:barDir"] = { "@_val": chartData.barDirection === "bar" ? "bar" : "col" };
|
|
@@ -114837,9 +115957,6 @@ function buildChartTypeContainer(chartData, family) {
|
|
|
114837
115957
|
if (family === "line" && chartData.upDownBars !== void 0) {
|
|
114838
115958
|
applyChartUpDownBars(container2, chartData.upDownBars, (key2) => key2.replace(/^.*:/u, ""));
|
|
114839
115959
|
}
|
|
114840
|
-
if (family === "bar" || family === "ofPie") {
|
|
114841
|
-
container2["c:gapWidth"] = { "@_val": "150" };
|
|
114842
|
-
}
|
|
114843
115960
|
if (family === "bar" && chartData.chartType === "bar3D" && chartData.barShape) {
|
|
114844
115961
|
container2["c:shape"] = { "@_val": chartData.barShape };
|
|
114845
115962
|
}
|
|
@@ -114848,14 +115965,13 @@ function buildChartTypeContainer(chartData, family) {
|
|
|
114848
115965
|
}
|
|
114849
115966
|
if (family === "bar" || family === "line" || family === "area" || family === "radar" || family === "scatter" || family === "bubble" || family === "stock" || family === "surface") {
|
|
114850
115967
|
container2["c:axId"] = [{ "@_val": String(CAT_AX_ID) }, { "@_val": String(VAL_AX_ID) }];
|
|
114851
|
-
} else if (family === "doughnut") {
|
|
114852
|
-
container2["c:holeSize"] = { "@_val": "50" };
|
|
114853
115968
|
}
|
|
115969
|
+
applyGeneratedChartGroupOptions(container2, containerLocal, chartData);
|
|
114854
115970
|
return container2;
|
|
114855
115971
|
}
|
|
114856
115972
|
function buildPlotArea(chartData, tag, family) {
|
|
114857
115973
|
const plotArea = { "c:layout": {} };
|
|
114858
|
-
plotArea[tag] = buildChartTypeContainer(chartData, family);
|
|
115974
|
+
plotArea[tag] = buildChartTypeContainer(chartData, family, tag.replace(/^.*:/u, ""));
|
|
114859
115975
|
if (chartData.style) {
|
|
114860
115976
|
applyChartDataLabelsToXml(plotArea, chartData.style, (key2) => key2.replace(/^.*:/u, ""));
|
|
114861
115977
|
}
|
|
@@ -114932,6 +116048,7 @@ function buildChartSpaceXml(chartData) {
|
|
|
114932
116048
|
}
|
|
114933
116049
|
};
|
|
114934
116050
|
applyGeneratedChartSpaceMetadata(result, chartData);
|
|
116051
|
+
applyGeneratedChartSpaceFormat(result, chartData);
|
|
114935
116052
|
return result;
|
|
114936
116053
|
}
|
|
114937
116054
|
var NS_C2, NS_A2, NS_R2, CAT_AX_ID, VAL_AX_ID, SCATTER_LIKE;
|
|
@@ -114947,6 +116064,8 @@ var init_chart_xml_generator = __esm({
|
|
|
114947
116064
|
init_chart_series_datalabel_serializer();
|
|
114948
116065
|
init_chart_space_metadata();
|
|
114949
116066
|
init_chart_trendline_serializer();
|
|
116067
|
+
init_chart_group_options();
|
|
116068
|
+
init_chart_space_format();
|
|
114950
116069
|
init_chart_up_down_bars();
|
|
114951
116070
|
init_chart_xml_axis_generator();
|
|
114952
116071
|
init_chart_xml_container_map();
|
|
@@ -115294,14 +116413,14 @@ function isCustomXmlRelationship(value) {
|
|
|
115294
116413
|
return String(value ?? "").endsWith("/relationships/customXml");
|
|
115295
116414
|
}
|
|
115296
116415
|
function placeCustomerDataList(container2, list2, location) {
|
|
115297
|
-
const
|
|
116416
|
+
const insertBefore4 = location === "presentation" ? /* @__PURE__ */ new Set(["p:kinsoku", "p:defaultTextStyle", "p:modifyVerifier", "p:extLst"]) : /* @__PURE__ */ new Set(["p:controls", "p:extLst"]);
|
|
115298
116417
|
const rebuilt = {};
|
|
115299
116418
|
let inserted = false;
|
|
115300
116419
|
for (const [key2, value] of Object.entries(container2)) {
|
|
115301
116420
|
if (key2 === "p:custDataLst") {
|
|
115302
116421
|
continue;
|
|
115303
116422
|
}
|
|
115304
|
-
if (!inserted &&
|
|
116423
|
+
if (!inserted && insertBefore4.has(key2)) {
|
|
115305
116424
|
rebuilt["p:custDataLst"] = list2;
|
|
115306
116425
|
inserted = true;
|
|
115307
116426
|
}
|
|
@@ -115389,14 +116508,14 @@ function resolveTagsContainer(data) {
|
|
|
115389
116508
|
}
|
|
115390
116509
|
return void 0;
|
|
115391
116510
|
}
|
|
115392
|
-
function placeAtKey(container2, key2, value,
|
|
116511
|
+
function placeAtKey(container2, key2, value, insertBefore4) {
|
|
115393
116512
|
const rebuilt = {};
|
|
115394
116513
|
let inserted = false;
|
|
115395
116514
|
for (const [childKey3, childValue] of Object.entries(container2)) {
|
|
115396
116515
|
if (childKey3 === key2) {
|
|
115397
116516
|
continue;
|
|
115398
116517
|
}
|
|
115399
|
-
if (!inserted &&
|
|
116518
|
+
if (!inserted && insertBefore4.has(childKey3)) {
|
|
115400
116519
|
rebuilt[key2] = value;
|
|
115401
116520
|
inserted = true;
|
|
115402
116521
|
}
|
|
@@ -115420,10 +116539,10 @@ async function upsertTagsOwningElement(zip, codec, sourcePartPath, relationshipI
|
|
|
115420
116539
|
if (!resolved) {
|
|
115421
116540
|
return;
|
|
115422
116541
|
}
|
|
115423
|
-
const { container: container2, insertBefore:
|
|
116542
|
+
const { container: container2, insertBefore: insertBefore4 } = resolved;
|
|
115424
116543
|
const list2 = { ...container2["p:custDataLst"] ?? {} };
|
|
115425
116544
|
list2["p:tags"] = { "@_r:id": relationshipId2 };
|
|
115426
|
-
placeAtKey(container2, "p:custDataLst", list2,
|
|
116545
|
+
placeAtKey(container2, "p:custDataLst", list2, insertBefore4);
|
|
115427
116546
|
zip.file(sourcePartPath, codec.build(data));
|
|
115428
116547
|
}
|
|
115429
116548
|
async function removeTagsOwningElement(zip, codec, sourcePartPath) {
|
|
@@ -115691,6 +116810,49 @@ var init_tag_package = __esm({
|
|
|
115691
116810
|
}
|
|
115692
116811
|
});
|
|
115693
116812
|
|
|
116813
|
+
// src/pptx/core/utils/chart-axis-deleted.ts
|
|
116814
|
+
function authoredDeleted(node) {
|
|
116815
|
+
if (node === void 0) {
|
|
116816
|
+
return false;
|
|
116817
|
+
}
|
|
116818
|
+
const val = node && typeof node === "object" ? node["@_val"] : void 0;
|
|
116819
|
+
if (val === void 0 || val === null || val === "") {
|
|
116820
|
+
return true;
|
|
116821
|
+
}
|
|
116822
|
+
return !(val === "0" || val === "false");
|
|
116823
|
+
}
|
|
116824
|
+
function applyChartAxisDeletedToXml(axisNode, deleted, getLocalName2) {
|
|
116825
|
+
if (deleted === void 0) {
|
|
116826
|
+
return false;
|
|
116827
|
+
}
|
|
116828
|
+
const key2 = Object.keys(axisNode).find((candidate) => getLocalName2(candidate) === "delete");
|
|
116829
|
+
if (authoredDeleted(key2 ? axisNode[key2] : void 0) === deleted) {
|
|
116830
|
+
return false;
|
|
116831
|
+
}
|
|
116832
|
+
const node = { "@_val": deleted ? "1" : "0" };
|
|
116833
|
+
if (key2) {
|
|
116834
|
+
axisNode[key2] = node;
|
|
116835
|
+
return true;
|
|
116836
|
+
}
|
|
116837
|
+
const entries = Object.entries(axisNode);
|
|
116838
|
+
const at2 = entries.findIndex(([candidate]) => {
|
|
116839
|
+
const local = getLocalName2(candidate);
|
|
116840
|
+
return local !== "axId" && local !== "scaling" && !candidate.startsWith("@_");
|
|
116841
|
+
});
|
|
116842
|
+
entries.splice(at2 === -1 ? entries.length : at2, 0, ["c:delete", node]);
|
|
116843
|
+
for (const candidate of Object.keys(axisNode)) {
|
|
116844
|
+
delete axisNode[candidate];
|
|
116845
|
+
}
|
|
116846
|
+
for (const [candidate, value] of entries) {
|
|
116847
|
+
axisNode[candidate] = value;
|
|
116848
|
+
}
|
|
116849
|
+
return true;
|
|
116850
|
+
}
|
|
116851
|
+
var init_chart_axis_deleted = __esm({
|
|
116852
|
+
"src/pptx/core/utils/chart-axis-deleted.ts"() {
|
|
116853
|
+
}
|
|
116854
|
+
});
|
|
116855
|
+
|
|
115694
116856
|
// src/pptx/core/utils/chart-axis-title-serializer.ts
|
|
115695
116857
|
function firstTextRun(paragraph, getLocalName2) {
|
|
115696
116858
|
for (const [key2, value] of Object.entries(paragraph)) {
|
|
@@ -115698,7 +116860,7 @@ function firstTextRun(paragraph, getLocalName2) {
|
|
|
115698
116860
|
continue;
|
|
115699
116861
|
}
|
|
115700
116862
|
for (const run of Array.isArray(value) ? value : [value]) {
|
|
115701
|
-
if (run && typeof run === "object" && !Array.isArray(run) &&
|
|
116863
|
+
if (run && typeof run === "object" && !Array.isArray(run) && findKey9(run, "t", getLocalName2)) {
|
|
115702
116864
|
return [key2, run];
|
|
115703
116865
|
}
|
|
115704
116866
|
}
|
|
@@ -115706,7 +116868,7 @@ function firstTextRun(paragraph, getLocalName2) {
|
|
|
115706
116868
|
return void 0;
|
|
115707
116869
|
}
|
|
115708
116870
|
function setTitleText(title, text2, getLocalName2) {
|
|
115709
|
-
const txKey =
|
|
116871
|
+
const txKey = findKey9(title, "tx", getLocalName2) ?? "c:tx";
|
|
115710
116872
|
const tx = title[txKey];
|
|
115711
116873
|
const texts = [];
|
|
115712
116874
|
if (tx && typeof tx === "object") {
|
|
@@ -115715,7 +116877,7 @@ function setTitleText(title, text2, getLocalName2) {
|
|
|
115715
116877
|
if (texts.join("") === text2) {
|
|
115716
116878
|
return;
|
|
115717
116879
|
}
|
|
115718
|
-
const richKey = tx && typeof tx === "object" ?
|
|
116880
|
+
const richKey = tx && typeof tx === "object" ? findKey9(tx, "rich", getLocalName2) : void 0;
|
|
115719
116881
|
const rich = richKey ? tx[richKey] : void 0;
|
|
115720
116882
|
if (!rich || typeof rich !== "object" || Array.isArray(rich)) {
|
|
115721
116883
|
const textNode = buildTitle(text2)["c:tx"];
|
|
@@ -115726,7 +116888,7 @@ function setTitleText(title, text2, getLocalName2) {
|
|
|
115726
116888
|
}
|
|
115727
116889
|
return;
|
|
115728
116890
|
}
|
|
115729
|
-
const pKey =
|
|
116891
|
+
const pKey = findKey9(rich, "p", getLocalName2) ?? "a:p";
|
|
115730
116892
|
const value = rich[pKey];
|
|
115731
116893
|
const paragraphs = (Array.isArray(value) ? value : [value]).filter(
|
|
115732
116894
|
(entry) => Boolean(entry) && typeof entry === "object" && !Array.isArray(entry)
|
|
@@ -115735,9 +116897,9 @@ function setTitleText(title, text2, getLocalName2) {
|
|
|
115735
116897
|
const carrier = firstTextRun(paragraph, getLocalName2);
|
|
115736
116898
|
const original = carrier?.[1] ?? {};
|
|
115737
116899
|
const runKey = carrier ? carrier[0].replace(/[^:]+$/u, "r") : "a:r";
|
|
115738
|
-
const rPrKey =
|
|
116900
|
+
const rPrKey = findKey9(original, "rPr", getLocalName2);
|
|
115739
116901
|
const run = carrier && getLocalName2(carrier[0]) === "r" ? { ...original } : rPrKey ? { [rPrKey]: original[rPrKey] } : {};
|
|
115740
|
-
const textKey =
|
|
116902
|
+
const textKey = findKey9(original, "t", getLocalName2) ?? "a:t";
|
|
115741
116903
|
const oldText = original[textKey];
|
|
115742
116904
|
const attributes = oldText && typeof oldText === "object" && !Array.isArray(oldText) ? oldText : void 0;
|
|
115743
116905
|
run[textKey] = attributes ? { ...attributes, "#text": text2 } : text2;
|
|
@@ -115777,7 +116939,7 @@ function applyChartAxisTitleToXml(axisNode, titleText, getLocalName2) {
|
|
|
115777
116939
|
if (titleText === void 0) {
|
|
115778
116940
|
return;
|
|
115779
116941
|
}
|
|
115780
|
-
const titleKey =
|
|
116942
|
+
const titleKey = findKey9(axisNode, "title", getLocalName2);
|
|
115781
116943
|
if (titleText === "") {
|
|
115782
116944
|
if (titleKey) {
|
|
115783
116945
|
delete axisNode[titleKey];
|
|
@@ -115817,27 +116979,27 @@ function applyChartAxisTitleStyleToXml(axisNode, style, getLocalName2, resolveCo
|
|
|
115817
116979
|
if (!hasAny) {
|
|
115818
116980
|
return;
|
|
115819
116981
|
}
|
|
115820
|
-
const titleKey =
|
|
116982
|
+
const titleKey = findKey9(axisNode, "title", getLocalName2);
|
|
115821
116983
|
if (!titleKey) {
|
|
115822
116984
|
return;
|
|
115823
116985
|
}
|
|
115824
116986
|
const title = { ...axisNode[titleKey] ?? {} };
|
|
115825
|
-
const txPrKey =
|
|
116987
|
+
const txPrKey = findKey9(title, "txPr", getLocalName2) ?? "c:txPr";
|
|
115826
116988
|
const txPr = { ...title[txPrKey] ?? {} };
|
|
115827
|
-
if (!txPr[
|
|
116989
|
+
if (!txPr[findKey9(txPr, "bodyPr", getLocalName2) ?? "a:bodyPr"]) {
|
|
115828
116990
|
txPr["a:bodyPr"] = {};
|
|
115829
116991
|
}
|
|
115830
|
-
if (!txPr[
|
|
116992
|
+
if (!txPr[findKey9(txPr, "lstStyle", getLocalName2) ?? "a:lstStyle"]) {
|
|
115831
116993
|
txPr["a:lstStyle"] = {};
|
|
115832
116994
|
}
|
|
115833
|
-
const pKey =
|
|
116995
|
+
const pKey = findKey9(txPr, "p", getLocalName2) ?? "a:p";
|
|
115834
116996
|
const existingP = txPr[pKey];
|
|
115835
116997
|
const para = {
|
|
115836
116998
|
...(Array.isArray(existingP) ? existingP[0] : existingP) ?? {}
|
|
115837
116999
|
};
|
|
115838
|
-
const pPrKey =
|
|
117000
|
+
const pPrKey = findKey9(para, "pPr", getLocalName2) ?? "a:pPr";
|
|
115839
117001
|
const pPr = { ...para[pPrKey] ?? {} };
|
|
115840
|
-
const defRPrKey =
|
|
117002
|
+
const defRPrKey = findKey9(pPr, "defRPr", getLocalName2) ?? "a:defRPr";
|
|
115841
117003
|
const existingDefRPr = pPr[defRPrKey] ?? {};
|
|
115842
117004
|
pPr[defRPrKey] = { ...existingDefRPr, ...buildDefRPr(style, existingDefRPr, resolveColor2) };
|
|
115843
117005
|
para[pPrKey] = pPr;
|
|
@@ -115929,140 +117091,8 @@ var init_chart_color_map_override = __esm({
|
|
|
115929
117091
|
}
|
|
115930
117092
|
});
|
|
115931
117093
|
|
|
115932
|
-
// src/pptx/core/utils/chart-container-schema.ts
|
|
115933
|
-
function normalizeChartGroupingValue(containerLocal, value) {
|
|
115934
|
-
const isBar = containerLocal === "barChart" || containerLocal === "bar3DChart";
|
|
115935
|
-
return !isBar && value === "clustered" ? "standard" : value;
|
|
115936
|
-
}
|
|
115937
|
-
function normalizeGroupingNode(containerLocal, node) {
|
|
115938
|
-
const value = node["@_val"];
|
|
115939
|
-
if (value !== void 0) {
|
|
115940
|
-
node["@_val"] = normalizeChartGroupingValue(containerLocal, value);
|
|
115941
|
-
}
|
|
115942
|
-
}
|
|
115943
|
-
function normalizeChartContainerChildren(container2, containerLocal, getLocalName2) {
|
|
115944
|
-
if (!isKnownChartContainer(containerLocal)) {
|
|
115945
|
-
return;
|
|
115946
|
-
}
|
|
115947
|
-
for (const key2 of Object.keys(container2)) {
|
|
115948
|
-
if (key2.startsWith("@_") || key2 === "#text") {
|
|
115949
|
-
continue;
|
|
115950
|
-
}
|
|
115951
|
-
const local = getLocalName2(key2);
|
|
115952
|
-
if (!chartContainerAllows(containerLocal, local)) {
|
|
115953
|
-
delete container2[key2];
|
|
115954
|
-
continue;
|
|
115955
|
-
}
|
|
115956
|
-
if (local === "grouping") {
|
|
115957
|
-
const node = container2[key2];
|
|
115958
|
-
if (node && typeof node === "object" && !Array.isArray(node)) {
|
|
115959
|
-
normalizeGroupingNode(containerLocal, node);
|
|
115960
|
-
}
|
|
115961
|
-
}
|
|
115962
|
-
}
|
|
115963
|
-
const required = REQUIRED_LEADING_CHILD[containerLocal];
|
|
115964
|
-
if (required) {
|
|
115965
|
-
const present = Object.keys(container2).some((k) => getLocalName2(k) === required.local);
|
|
115966
|
-
if (!present) {
|
|
115967
|
-
container2[`c:${required.local}`] = { "@_val": required.val };
|
|
115968
|
-
}
|
|
115969
|
-
}
|
|
115970
|
-
}
|
|
115971
|
-
function orderChartContainerChildren(container2, containerLocal, getLocalName2) {
|
|
115972
|
-
const order = CHART_CONTAINER_CHILD_ORDER[containerLocal];
|
|
115973
|
-
if (!order) {
|
|
115974
|
-
return;
|
|
115975
|
-
}
|
|
115976
|
-
const keys = Object.keys(container2).filter((k) => !k.startsWith("@_") && k !== "#text");
|
|
115977
|
-
if (keys.some((k) => !order.includes(getLocalName2(k)))) {
|
|
115978
|
-
return;
|
|
115979
|
-
}
|
|
115980
|
-
const sorted = [...keys].sort(
|
|
115981
|
-
(a, b) => order.indexOf(getLocalName2(a)) - order.indexOf(getLocalName2(b))
|
|
115982
|
-
);
|
|
115983
|
-
if (sorted.every((k, i2) => k === keys[i2])) {
|
|
115984
|
-
return;
|
|
115985
|
-
}
|
|
115986
|
-
const saved = sorted.map((k) => [k, container2[k]]);
|
|
115987
|
-
for (const k of keys) {
|
|
115988
|
-
delete container2[k];
|
|
115989
|
-
}
|
|
115990
|
-
for (const [k, v] of saved) {
|
|
115991
|
-
container2[k] = v;
|
|
115992
|
-
}
|
|
115993
|
-
}
|
|
115994
|
-
function renameXmlKeyInPlace(obj, oldKey, newKey) {
|
|
115995
|
-
if (oldKey === newKey || !(oldKey in obj)) {
|
|
115996
|
-
return;
|
|
115997
|
-
}
|
|
115998
|
-
const entries = Object.keys(obj).map((k) => [k === oldKey ? newKey : k, obj[k]]);
|
|
115999
|
-
for (const k of Object.keys(obj)) {
|
|
116000
|
-
delete obj[k];
|
|
116001
|
-
}
|
|
116002
|
-
for (const [k, v] of entries) {
|
|
116003
|
-
obj[k] = v;
|
|
116004
|
-
}
|
|
116005
|
-
}
|
|
116006
|
-
function referencedAxisIds(plotArea, getLocalName2) {
|
|
116007
|
-
const ids = /* @__PURE__ */ new Set();
|
|
116008
|
-
for (const key2 of Object.keys(plotArea)) {
|
|
116009
|
-
if (!getLocalName2(key2).endsWith("Chart")) {
|
|
116010
|
-
continue;
|
|
116011
|
-
}
|
|
116012
|
-
for (const container2 of toArray2(plotArea[key2])) {
|
|
116013
|
-
for (const childKey3 of Object.keys(container2)) {
|
|
116014
|
-
if (getLocalName2(childKey3) !== "axId") {
|
|
116015
|
-
continue;
|
|
116016
|
-
}
|
|
116017
|
-
for (const axId of toArray2(container2[childKey3])) {
|
|
116018
|
-
const val = axId["@_val"];
|
|
116019
|
-
if (val !== void 0) {
|
|
116020
|
-
ids.add(String(val));
|
|
116021
|
-
}
|
|
116022
|
-
}
|
|
116023
|
-
}
|
|
116024
|
-
}
|
|
116025
|
-
}
|
|
116026
|
-
return ids;
|
|
116027
|
-
}
|
|
116028
|
-
function toArray2(value) {
|
|
116029
|
-
if (Array.isArray(value)) {
|
|
116030
|
-
return value.filter((v) => typeof v === "object" && v !== null);
|
|
116031
|
-
}
|
|
116032
|
-
return typeof value === "object" && value !== null ? [value] : [];
|
|
116033
|
-
}
|
|
116034
|
-
function reconcileChartPlotAreaAxes(plotArea, getLocalName2) {
|
|
116035
|
-
const referenced = referencedAxisIds(plotArea, getLocalName2);
|
|
116036
|
-
let removed = 0;
|
|
116037
|
-
for (const key2 of Object.keys(plotArea)) {
|
|
116038
|
-
const local = getLocalName2(key2);
|
|
116039
|
-
if (!AXIS_LOCAL_NAMES.includes(local)) {
|
|
116040
|
-
continue;
|
|
116041
|
-
}
|
|
116042
|
-
const axes = toArray2(plotArea[key2]);
|
|
116043
|
-
const kept = axes.filter((axis) => {
|
|
116044
|
-
const axIdKey = Object.keys(axis).find((k) => getLocalName2(k) === "axId");
|
|
116045
|
-
const val = axIdKey ? toArray2(axis[axIdKey])[0]?.["@_val"] : void 0;
|
|
116046
|
-
return val !== void 0 && referenced.has(String(val));
|
|
116047
|
-
});
|
|
116048
|
-
removed += axes.length - kept.length;
|
|
116049
|
-
if (kept.length === 0) {
|
|
116050
|
-
delete plotArea[key2];
|
|
116051
|
-
} else if (kept.length !== axes.length) {
|
|
116052
|
-
plotArea[key2] = kept.length === 1 ? kept[0] : kept;
|
|
116053
|
-
}
|
|
116054
|
-
}
|
|
116055
|
-
return removed;
|
|
116056
|
-
}
|
|
116057
|
-
var init_chart_container_schema = __esm({
|
|
116058
|
-
"src/pptx/core/utils/chart-container-schema.ts"() {
|
|
116059
|
-
init_chart_container_content_model();
|
|
116060
|
-
init_chart_container_content_model();
|
|
116061
|
-
}
|
|
116062
|
-
});
|
|
116063
|
-
|
|
116064
117094
|
// src/pptx/core/utils/chart-combo-serializer.ts
|
|
116065
|
-
function
|
|
117095
|
+
function findKey25(obj, local, getLocalName2) {
|
|
116066
117096
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
116067
117097
|
}
|
|
116068
117098
|
function nonSeriesEntries(container2, getLocalName2) {
|
|
@@ -116094,14 +117124,14 @@ function consolidateComboContainersInXml(plotArea, getLocalName2) {
|
|
|
116094
117124
|
if (!primary) {
|
|
116095
117125
|
return { primaryKey, containerChildren };
|
|
116096
117126
|
}
|
|
116097
|
-
const serKey =
|
|
117127
|
+
const serKey = findKey25(primary, "ser", getLocalName2) ?? "c:ser";
|
|
116098
117128
|
const allSeries = [];
|
|
116099
117129
|
for (const key2 of containerKeys) {
|
|
116100
117130
|
const container2 = plotArea[key2];
|
|
116101
117131
|
if (!container2) {
|
|
116102
117132
|
continue;
|
|
116103
117133
|
}
|
|
116104
|
-
const containerSerKey =
|
|
117134
|
+
const containerSerKey = findKey25(container2, "ser", getLocalName2);
|
|
116105
117135
|
if (containerSerKey) {
|
|
116106
117136
|
allSeries.push(...ensureArray18(container2[containerSerKey]));
|
|
116107
117137
|
}
|
|
@@ -116129,7 +117159,7 @@ function applyComboSeriesTypesToXml(plotArea, originalKey, series, chartLevelTyp
|
|
|
116129
117159
|
if (!original) {
|
|
116130
117160
|
return false;
|
|
116131
117161
|
}
|
|
116132
|
-
const serKey =
|
|
117162
|
+
const serKey = findKey25(original, "ser", getLocalName2) ?? "c:ser";
|
|
116133
117163
|
const serNodes = ensureArray18(original[serKey]);
|
|
116134
117164
|
if (serNodes.length !== series.length) {
|
|
116135
117165
|
return false;
|
|
@@ -116186,7 +117216,7 @@ function applyGroupAxisReferences(container2, series, axes, getLocalName2) {
|
|
|
116186
117216
|
if (valueAxisId === void 0 || categoryAxisId === void 0) {
|
|
116187
117217
|
return;
|
|
116188
117218
|
}
|
|
116189
|
-
const key2 =
|
|
117219
|
+
const key2 = findKey25(container2, "axId", getLocalName2) ?? "c:axId";
|
|
116190
117220
|
container2[key2] = [{ "@_val": String(categoryAxisId) }, { "@_val": String(valueAxisId) }];
|
|
116191
117221
|
}
|
|
116192
117222
|
var init_chart_combo_serializer = __esm({
|
|
@@ -116196,7 +117226,7 @@ var init_chart_combo_serializer = __esm({
|
|
|
116196
117226
|
});
|
|
116197
117227
|
|
|
116198
117228
|
// src/pptx/core/utils/chart-filtered-series-writer.ts
|
|
116199
|
-
function
|
|
117229
|
+
function findKey26(obj, local, getLocalName2) {
|
|
116200
117230
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
116201
117231
|
}
|
|
116202
117232
|
function points3(values) {
|
|
@@ -116254,9 +117284,9 @@ function filteredSeriesUnchanged(container2, filteredSeries, xmlLookup) {
|
|
|
116254
117284
|
});
|
|
116255
117285
|
}
|
|
116256
117286
|
function applyFilteredSeriesToXml(container2, filteredSeries, categories, containerLocalName, getLocalName2) {
|
|
116257
|
-
const extLstKey =
|
|
117287
|
+
const extLstKey = findKey26(container2, "extLst", getLocalName2) ?? "c:extLst";
|
|
116258
117288
|
const extLst = { ...container2[extLstKey] ?? {} };
|
|
116259
|
-
const extKey =
|
|
117289
|
+
const extKey = findKey26(extLst, "ext", getLocalName2);
|
|
116260
117290
|
const exts = extKey ? Array.isArray(extLst[extKey]) ? [...extLst[extKey]] : [extLst[extKey]] : [];
|
|
116261
117291
|
const otherExts = exts.filter((ext) => ext["@_uri"] !== CHART_FILTERED_SERIES_EXT_URI);
|
|
116262
117292
|
const ownExt = {
|
|
@@ -116470,11 +117500,11 @@ var init_chart_legend_serializer = __esm({
|
|
|
116470
117500
|
});
|
|
116471
117501
|
|
|
116472
117502
|
// src/pptx/core/utils/chart-line-style-serializer.ts
|
|
116473
|
-
function
|
|
117503
|
+
function findKey27(node, name, localName29) {
|
|
116474
117504
|
return Object.keys(node).find((key2) => localName29(key2) === name);
|
|
116475
117505
|
}
|
|
116476
117506
|
function setOrdered5(node, name, value, localName29) {
|
|
116477
|
-
const key2 =
|
|
117507
|
+
const key2 = findKey27(node, name, localName29);
|
|
116478
117508
|
if (key2) {
|
|
116479
117509
|
node[key2] = value;
|
|
116480
117510
|
return;
|
|
@@ -116499,7 +117529,7 @@ function applyChartLineStyle(chartContainer, elementName, style, localName29, re
|
|
|
116499
117529
|
if (style === void 0) {
|
|
116500
117530
|
return;
|
|
116501
117531
|
}
|
|
116502
|
-
const key2 =
|
|
117532
|
+
const key2 = findKey27(chartContainer, elementName, localName29);
|
|
116503
117533
|
if (style === null) {
|
|
116504
117534
|
if (key2) {
|
|
116505
117535
|
delete chartContainer[key2];
|
|
@@ -116510,7 +117540,7 @@ function applyChartLineStyle(chartContainer, elementName, style, localName29, re
|
|
|
116510
117540
|
const node = { ...existing };
|
|
116511
117541
|
const hasLineProps = style.color || style.width !== void 0 || style.dashStyle;
|
|
116512
117542
|
if (hasLineProps) {
|
|
116513
|
-
const spPrKey =
|
|
117543
|
+
const spPrKey = findKey27(node, "spPr", localName29) ?? "c:spPr";
|
|
116514
117544
|
node[spPrKey] = writeChartShapeProps(
|
|
116515
117545
|
node[spPrKey],
|
|
116516
117546
|
{ strokeColor: style.color, strokeWidth: style.width, strokeDashStyle: style.dashStyle },
|
|
@@ -116544,7 +117574,7 @@ var init_chart_line_style_serializer = __esm({
|
|
|
116544
117574
|
});
|
|
116545
117575
|
|
|
116546
117576
|
// src/pptx/core/utils/chart-series-color-serializer.ts
|
|
116547
|
-
function
|
|
117577
|
+
function findKey28(obj, local, getLocalName2) {
|
|
116548
117578
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
116549
117579
|
}
|
|
116550
117580
|
function insertBeforeLn(obj, key2, value, getLocalName2) {
|
|
@@ -116574,14 +117604,14 @@ function insertFirst(obj, key2, value) {
|
|
|
116574
117604
|
function writeSeriesColorToSpPr(spPr, hex3, isLineFamily, getLocalName2, resolveColor2) {
|
|
116575
117605
|
const normalizedHex = hex3.replace(/^#/u, "");
|
|
116576
117606
|
if (isLineFamily) {
|
|
116577
|
-
const lnKey =
|
|
117607
|
+
const lnKey = findKey28(spPr, "ln", getLocalName2) ?? "a:ln";
|
|
116578
117608
|
const ln = spPr[lnKey] ?? {};
|
|
116579
117609
|
const hadLn = Boolean(spPr[lnKey]);
|
|
116580
|
-
const noFillKey =
|
|
117610
|
+
const noFillKey = findKey28(ln, "noFill", getLocalName2);
|
|
116581
117611
|
if (noFillKey) {
|
|
116582
117612
|
delete ln[noFillKey];
|
|
116583
117613
|
}
|
|
116584
|
-
const lnFillKey =
|
|
117614
|
+
const lnFillKey = findKey28(ln, "solidFill", getLocalName2) ?? "a:solidFill";
|
|
116585
117615
|
const authoredFill2 = ln[lnFillKey];
|
|
116586
117616
|
const fillNode2 = serializeColorChoice(
|
|
116587
117617
|
authoredFill2,
|
|
@@ -116598,7 +117628,7 @@ function writeSeriesColorToSpPr(spPr, hex3, isLineFamily, getLocalName2, resolve
|
|
|
116598
117628
|
}
|
|
116599
117629
|
return;
|
|
116600
117630
|
}
|
|
116601
|
-
const fillKey =
|
|
117631
|
+
const fillKey = findKey28(spPr, "solidFill", getLocalName2) ?? "a:solidFill";
|
|
116602
117632
|
const authoredFill = spPr[fillKey];
|
|
116603
117633
|
const fillNode = serializeColorChoice(
|
|
116604
117634
|
authoredFill,
|
|
@@ -116606,7 +117636,7 @@ function writeSeriesColorToSpPr(spPr, hex3, isLineFamily, getLocalName2, resolve
|
|
|
116606
117636
|
normalizedHex
|
|
116607
117637
|
);
|
|
116608
117638
|
if (authoredFill) {
|
|
116609
|
-
const noFillKey =
|
|
117639
|
+
const noFillKey = findKey28(spPr, "noFill", getLocalName2);
|
|
116610
117640
|
if (noFillKey) {
|
|
116611
117641
|
delete spPr[noFillKey];
|
|
116612
117642
|
}
|
|
@@ -116621,7 +117651,7 @@ function writeSeriesColorToSpPr(spPr, hex3, isLineFamily, getLocalName2, resolve
|
|
|
116621
117651
|
}
|
|
116622
117652
|
}
|
|
116623
117653
|
function ensureSeriesSpPr(seriesNode, getLocalName2) {
|
|
116624
|
-
const existingKey =
|
|
117654
|
+
const existingKey = findKey28(seriesNode, "spPr", getLocalName2);
|
|
116625
117655
|
if (existingKey) {
|
|
116626
117656
|
return seriesNode[existingKey];
|
|
116627
117657
|
}
|
|
@@ -116641,7 +117671,7 @@ function applySeriesGradientToXml(seriesNode, gradient, getLocalName2, options =
|
|
|
116641
117671
|
if (options.lineDrawn) {
|
|
116642
117672
|
return false;
|
|
116643
117673
|
}
|
|
116644
|
-
const spPrKey =
|
|
117674
|
+
const spPrKey = findKey28(seriesNode, "spPr", getLocalName2);
|
|
116645
117675
|
if (!spPrKey && !gradient) {
|
|
116646
117676
|
return false;
|
|
116647
117677
|
}
|
|
@@ -116677,11 +117707,11 @@ var init_chart_series_color_serializer = __esm({
|
|
|
116677
117707
|
});
|
|
116678
117708
|
|
|
116679
117709
|
// src/pptx/core/utils/chart-subtype-serializer.ts
|
|
116680
|
-
function
|
|
117710
|
+
function findKey29(obj, local, getLocalName2) {
|
|
116681
117711
|
return Object.keys(obj).find((k) => getLocalName2(k) === local);
|
|
116682
117712
|
}
|
|
116683
117713
|
function upsertValChild(parent, localName29, value, getLocalName2) {
|
|
116684
|
-
const existingKey =
|
|
117714
|
+
const existingKey = findKey29(parent, localName29, getLocalName2);
|
|
116685
117715
|
if (value === void 0) {
|
|
116686
117716
|
if (existingKey) {
|
|
116687
117717
|
delete parent[existingKey];
|
|
@@ -116721,7 +117751,7 @@ function applySurfaceWireframeToXml(chartTypeContainer, containerLocalName, wire
|
|
|
116721
117751
|
orderChartContainerChildren(chartTypeContainer, containerLocalName, getLocalName2);
|
|
116722
117752
|
}
|
|
116723
117753
|
function applySeriesBar3DShapeToXml(seriesNode, shape, getLocalName2) {
|
|
116724
|
-
const existingKey =
|
|
117754
|
+
const existingKey = findKey29(seriesNode, "shape", getLocalName2);
|
|
116725
117755
|
if (shape === void 0) {
|
|
116726
117756
|
if (existingKey) {
|
|
116727
117757
|
delete seriesNode[existingKey];
|
|
@@ -116866,7 +117896,7 @@ var init_chart_title_run_alignment = __esm({
|
|
|
116866
117896
|
// src/pptx/core/utils/chart-title-serializer.ts
|
|
116867
117897
|
function applyChartTitleToXml(chartRoot, model, getLocalName2, options = { prefix: "c" }) {
|
|
116868
117898
|
const { prefix } = options;
|
|
116869
|
-
const existingKey =
|
|
117899
|
+
const existingKey = findKey9(chartRoot, "title", getLocalName2);
|
|
116870
117900
|
const remove = model.hasTitle === false || model.title === "" && model.hasTitle !== true;
|
|
116871
117901
|
if (remove) {
|
|
116872
117902
|
if (existingKey) {
|
|
@@ -116904,14 +117934,14 @@ function applyChartTitleToXml(chartRoot, model, getLocalName2, options = { prefi
|
|
|
116904
117934
|
insertAt2(chartRoot, 0, `${prefix}:title`, titleNode);
|
|
116905
117935
|
}
|
|
116906
117936
|
} else if (runs) {
|
|
116907
|
-
const txKey =
|
|
117937
|
+
const txKey = findKey9(titleNode, "tx", getLocalName2);
|
|
116908
117938
|
if (txKey) {
|
|
116909
117939
|
titleNode[txKey] = buildTitleTextFromRuns(prefix, runs);
|
|
116910
117940
|
} else {
|
|
116911
117941
|
insertAt2(titleNode, 0, `${prefix}:tx`, buildTitleTextFromRuns(prefix, runs));
|
|
116912
117942
|
}
|
|
116913
117943
|
} else if (model.title !== void 0 && !replaceFirstText(titleNode, model.title, getLocalName2)) {
|
|
116914
|
-
const txKey =
|
|
117944
|
+
const txKey = findKey9(titleNode, "tx", getLocalName2);
|
|
116915
117945
|
if (txKey) {
|
|
116916
117946
|
titleNode[txKey] = buildTitleText(prefix, model.title);
|
|
116917
117947
|
} else {
|
|
@@ -116932,7 +117962,7 @@ var init_chart_title_serializer = __esm({
|
|
|
116932
117962
|
});
|
|
116933
117963
|
|
|
116934
117964
|
// src/pptx/core/utils/chart-title-style-serializer.ts
|
|
116935
|
-
function
|
|
117965
|
+
function findKey30(node, localName29, getLocalName2) {
|
|
116936
117966
|
return Object.keys(node).find((key2) => getLocalName2(key2) === localName29);
|
|
116937
117967
|
}
|
|
116938
117968
|
function setChildOrdered(node, key2, existingKey, value, laterNames, getLocalName2) {
|
|
@@ -116975,9 +118005,9 @@ function asArray3(value) {
|
|
|
116975
118005
|
return value && typeof value === "object" ? [value] : [];
|
|
116976
118006
|
}
|
|
116977
118007
|
function applyRichTitleFont(title, style, getLocalName2, resolveColor2) {
|
|
116978
|
-
const txKey =
|
|
118008
|
+
const txKey = findKey30(title, "tx", getLocalName2);
|
|
116979
118009
|
const tx = txKey ? title[txKey] : void 0;
|
|
116980
|
-
const richKey = tx ?
|
|
118010
|
+
const richKey = tx ? findKey30(tx, "rich", getLocalName2) : void 0;
|
|
116981
118011
|
const rich = richKey && tx ? tx[richKey] : void 0;
|
|
116982
118012
|
if (!tx || !rich || !txKey || !richKey) {
|
|
116983
118013
|
return void 0;
|
|
@@ -116986,22 +118016,22 @@ function applyRichTitleFont(title, style, getLocalName2, resolveColor2) {
|
|
|
116986
118016
|
if (!hasFont) {
|
|
116987
118017
|
return txKey;
|
|
116988
118018
|
}
|
|
116989
|
-
const pKey =
|
|
118019
|
+
const pKey = findKey30(rich, "p", getLocalName2) ?? "a:p";
|
|
116990
118020
|
const paragraphs = asArray3(rich[pKey]).map((para) => {
|
|
116991
118021
|
const next = { ...para };
|
|
116992
|
-
const pPrKey =
|
|
118022
|
+
const pPrKey = findKey30(next, "pPr", getLocalName2) ?? "a:pPr";
|
|
116993
118023
|
const pPr = { ...next[pPrKey] ?? {} };
|
|
116994
|
-
const defRPrKey =
|
|
118024
|
+
const defRPrKey = findKey30(pPr, "defRPr", getLocalName2) ?? "a:defRPr";
|
|
116995
118025
|
const existingDefRPr = pPr[defRPrKey] ?? {};
|
|
116996
118026
|
pPr[defRPrKey] = {
|
|
116997
118027
|
...existingDefRPr,
|
|
116998
118028
|
...buildTitleDefRPr(style, existingDefRPr, resolveColor2)
|
|
116999
118029
|
};
|
|
117000
118030
|
next[pPrKey] = pPr;
|
|
117001
|
-
const rKey =
|
|
118031
|
+
const rKey = findKey30(next, "r", getLocalName2);
|
|
117002
118032
|
if (rKey) {
|
|
117003
118033
|
const runs = asArray3(next[rKey]).map((run) => {
|
|
117004
|
-
const rPrKey =
|
|
118034
|
+
const rPrKey = findKey30(run, "rPr", getLocalName2) ?? "a:rPr";
|
|
117005
118035
|
const existingRPr = run[rPrKey] ?? {};
|
|
117006
118036
|
const nextRun = { ...run };
|
|
117007
118037
|
nextRun[rPrKey] = { ...existingRPr, ...buildTitleDefRPr(style, existingRPr, resolveColor2) };
|
|
@@ -117024,13 +118054,13 @@ function applyChartTitleStyleToXml(chartRoot, style, getLocalName2, options = {
|
|
|
117024
118054
|
return;
|
|
117025
118055
|
}
|
|
117026
118056
|
const { prefix } = options;
|
|
117027
|
-
const titleKey =
|
|
118057
|
+
const titleKey = findKey30(chartRoot, "title", getLocalName2);
|
|
117028
118058
|
if (!titleKey) {
|
|
117029
118059
|
return;
|
|
117030
118060
|
}
|
|
117031
118061
|
const title = { ...chartRoot[titleKey] ?? {} };
|
|
117032
118062
|
if (style.spPr !== void 0) {
|
|
117033
|
-
const spPrKey =
|
|
118063
|
+
const spPrKey = findKey30(title, "spPr", getLocalName2);
|
|
117034
118064
|
if (style.spPr === null) {
|
|
117035
118065
|
if (spPrKey) {
|
|
117036
118066
|
delete title[spPrKey];
|
|
@@ -117047,23 +118077,23 @@ function applyChartTitleStyleToXml(chartRoot, style, getLocalName2, options = {
|
|
|
117047
118077
|
}
|
|
117048
118078
|
const richKey = applyRichTitleFont(title, style, getLocalName2, resolveColor2);
|
|
117049
118079
|
if (hasFont && richKey === void 0) {
|
|
117050
|
-
const existingTxPrKey =
|
|
118080
|
+
const existingTxPrKey = findKey30(title, "txPr", getLocalName2);
|
|
117051
118081
|
const txPrKey = existingTxPrKey ?? `${prefix}:txPr`;
|
|
117052
118082
|
const txPr = { ...title[txPrKey] ?? {} };
|
|
117053
|
-
if (!txPr[
|
|
118083
|
+
if (!txPr[findKey30(txPr, "bodyPr", getLocalName2) ?? "a:bodyPr"]) {
|
|
117054
118084
|
txPr["a:bodyPr"] = {};
|
|
117055
118085
|
}
|
|
117056
|
-
if (!txPr[
|
|
118086
|
+
if (!txPr[findKey30(txPr, "lstStyle", getLocalName2) ?? "a:lstStyle"]) {
|
|
117057
118087
|
txPr["a:lstStyle"] = {};
|
|
117058
118088
|
}
|
|
117059
|
-
const pKey =
|
|
118089
|
+
const pKey = findKey30(txPr, "p", getLocalName2) ?? "a:p";
|
|
117060
118090
|
const existingP = txPr[pKey];
|
|
117061
118091
|
const para = {
|
|
117062
118092
|
...(Array.isArray(existingP) ? existingP[0] : existingP) ?? {}
|
|
117063
118093
|
};
|
|
117064
|
-
const pPrKey =
|
|
118094
|
+
const pPrKey = findKey30(para, "pPr", getLocalName2) ?? "a:pPr";
|
|
117065
118095
|
const pPr = { ...para[pPrKey] ?? {} };
|
|
117066
|
-
const defRPrKey =
|
|
118096
|
+
const defRPrKey = findKey30(pPr, "defRPr", getLocalName2) ?? "a:defRPr";
|
|
117067
118097
|
const existingDefRPr = pPr[defRPrKey] ?? {};
|
|
117068
118098
|
pPr[defRPrKey] = {
|
|
117069
118099
|
...existingDefRPr,
|
|
@@ -117213,7 +118243,7 @@ var init_chart_xlsx_writer = __esm({
|
|
|
117213
118243
|
});
|
|
117214
118244
|
|
|
117215
118245
|
// src/pptx/core/core/runtime/chart-cx-update-data.ts
|
|
117216
|
-
function
|
|
118246
|
+
function findKey31(node, localName29, getLocalName2) {
|
|
117217
118247
|
return Object.keys(node).find((key2) => getLocalName2(key2) === localName29);
|
|
117218
118248
|
}
|
|
117219
118249
|
function asArray4(value) {
|
|
@@ -117228,8 +118258,8 @@ function dimensionType(node) {
|
|
|
117228
118258
|
return String(node["@_type"] ?? "");
|
|
117229
118259
|
}
|
|
117230
118260
|
function replaceLevels(target, source, getLocalName2) {
|
|
117231
|
-
const targetKey =
|
|
117232
|
-
const sourceKey =
|
|
118261
|
+
const targetKey = findKey31(target, "lvl", getLocalName2) ?? "cx:lvl";
|
|
118262
|
+
const sourceKey = findKey31(source, "lvl", getLocalName2);
|
|
117233
118263
|
const oldLevels = asArray4(target[targetKey]);
|
|
117234
118264
|
const newLevels = asArray4(sourceKey ? source[sourceKey] : void 0).map((level2, index) => {
|
|
117235
118265
|
const old = oldLevels[index];
|
|
@@ -117248,8 +118278,8 @@ function replaceLevels(target, source, getLocalName2) {
|
|
|
117248
118278
|
}
|
|
117249
118279
|
function replaceChartExDataDimensions(target, fresh, getLocalName2) {
|
|
117250
118280
|
for (const kind of ["strDim", "numDim"]) {
|
|
117251
|
-
const targetKey =
|
|
117252
|
-
const freshKey =
|
|
118281
|
+
const targetKey = findKey31(target, kind, getLocalName2) ?? `cx:${kind}`;
|
|
118282
|
+
const freshKey = findKey31(fresh, kind, getLocalName2);
|
|
117253
118283
|
const existing = asArray4(target[targetKey]);
|
|
117254
118284
|
const incoming = asArray4(freshKey ? fresh[freshKey] : void 0);
|
|
117255
118285
|
for (const dimension of incoming) {
|
|
@@ -117278,14 +118308,14 @@ var init_chart_cx_update_data = __esm({
|
|
|
117278
118308
|
});
|
|
117279
118309
|
|
|
117280
118310
|
// src/pptx/core/core/runtime/chart-cx-update-series.ts
|
|
117281
|
-
function
|
|
118311
|
+
function findKey32(node, localName29, getLocalName2) {
|
|
117282
118312
|
return Object.keys(node).find((key2) => getLocalName2(key2) === localName29);
|
|
117283
118313
|
}
|
|
117284
118314
|
function child24(node, localName29, getLocalName2) {
|
|
117285
118315
|
if (!node) {
|
|
117286
118316
|
return void 0;
|
|
117287
118317
|
}
|
|
117288
|
-
const key2 =
|
|
118318
|
+
const key2 = findKey32(node, localName29, getLocalName2);
|
|
117289
118319
|
const value = key2 ? node[key2] : void 0;
|
|
117290
118320
|
return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
117291
118321
|
}
|
|
@@ -117297,7 +118327,7 @@ function asArray5(value) {
|
|
|
117297
118327
|
(entry) => Boolean(entry) && typeof entry === "object"
|
|
117298
118328
|
);
|
|
117299
118329
|
}
|
|
117300
|
-
function
|
|
118330
|
+
function insertBefore3(parent, key2, value, before, getLocalName2) {
|
|
117301
118331
|
const entries = Object.keys(parent).map((k) => [k, parent[k]]);
|
|
117302
118332
|
let index = entries.findIndex(([k]) => !k.startsWith("@_") && before.includes(getLocalName2(k)));
|
|
117303
118333
|
if (index === -1) {
|
|
@@ -117315,15 +118345,15 @@ function applySeriesName(node, name, getLocalName2) {
|
|
|
117315
118345
|
const tx = child24(node, "tx", getLocalName2);
|
|
117316
118346
|
const txData = child24(tx, "txData", getLocalName2);
|
|
117317
118347
|
if (tx && txData) {
|
|
117318
|
-
const vKey =
|
|
118348
|
+
const vKey = findKey32(txData, "v", getLocalName2) ?? "cx:v";
|
|
117319
118349
|
txData[vKey] = name;
|
|
117320
118350
|
return;
|
|
117321
118351
|
}
|
|
117322
|
-
const txKey =
|
|
118352
|
+
const txKey = findKey32(node, "tx", getLocalName2);
|
|
117323
118353
|
if (txKey) {
|
|
117324
118354
|
delete node[txKey];
|
|
117325
118355
|
}
|
|
117326
|
-
|
|
118356
|
+
insertBefore3(node, "cx:tx", { "cx:txData": { "cx:v": name } }, AFTER_TX, getLocalName2);
|
|
117327
118357
|
}
|
|
117328
118358
|
function currentSeriesColor(node, getLocalName2) {
|
|
117329
118359
|
const srgb = child24(
|
|
@@ -117345,7 +118375,7 @@ function applySeriesColor(node, series, getLocalName2) {
|
|
|
117345
118375
|
}
|
|
117346
118376
|
const spPr = child24(node, "spPr", getLocalName2);
|
|
117347
118377
|
if (!spPr) {
|
|
117348
|
-
|
|
118378
|
+
insertBefore3(node, "cx:spPr", fill, AFTER_TX.slice(1), getLocalName2);
|
|
117349
118379
|
return;
|
|
117350
118380
|
}
|
|
117351
118381
|
for (const key2 of Object.keys(spPr)) {
|
|
@@ -117353,13 +118383,13 @@ function applySeriesColor(node, series, getLocalName2) {
|
|
|
117353
118383
|
delete spPr[key2];
|
|
117354
118384
|
}
|
|
117355
118385
|
}
|
|
117356
|
-
|
|
118386
|
+
insertBefore3(spPr, "a:solidFill", fill["a:solidFill"], AFTER_FILL2, getLocalName2);
|
|
117357
118387
|
}
|
|
117358
118388
|
function applySeriesDataLabels(node, hasDataLabels, getLocalName2) {
|
|
117359
118389
|
if (hasDataLabels === void 0) {
|
|
117360
118390
|
return;
|
|
117361
118391
|
}
|
|
117362
|
-
const key2 =
|
|
118392
|
+
const key2 = findKey32(node, "dataLabels", getLocalName2);
|
|
117363
118393
|
if (!hasDataLabels) {
|
|
117364
118394
|
if (key2) {
|
|
117365
118395
|
delete node[key2];
|
|
@@ -117367,7 +118397,7 @@ function applySeriesDataLabels(node, hasDataLabels, getLocalName2) {
|
|
|
117367
118397
|
return;
|
|
117368
118398
|
}
|
|
117369
118399
|
if (!key2) {
|
|
117370
|
-
|
|
118400
|
+
insertBefore3(
|
|
117371
118401
|
node,
|
|
117372
118402
|
"cx:dataLabels",
|
|
117373
118403
|
buildChartExDataLabels(),
|
|
@@ -117398,7 +118428,7 @@ function bindSeriesData(node, dataNodes, chartData, series, getLocalName2) {
|
|
|
117398
118428
|
);
|
|
117399
118429
|
return;
|
|
117400
118430
|
}
|
|
117401
|
-
const inlineKey =
|
|
118431
|
+
const inlineKey = findKey32(node, "data", getLocalName2);
|
|
117402
118432
|
if (inlineKey && !dataIdNode) {
|
|
117403
118433
|
const inline = node[inlineKey];
|
|
117404
118434
|
if (inline && typeof inline === "object" && !Array.isArray(inline)) {
|
|
@@ -117415,7 +118445,7 @@ function bindSeriesData(node, dataNodes, chartData, series, getLocalName2) {
|
|
|
117415
118445
|
if (dataIdNode) {
|
|
117416
118446
|
dataIdNode["@_val"] = String(id);
|
|
117417
118447
|
} else {
|
|
117418
|
-
|
|
118448
|
+
insertBefore3(
|
|
117419
118449
|
node,
|
|
117420
118450
|
"cx:dataId",
|
|
117421
118451
|
{ "@_val": String(id) },
|
|
@@ -117451,7 +118481,7 @@ function applyLegend(chartRoot, chartData, getLocalName2) {
|
|
|
117451
118481
|
if (!style || style.hasLegend === void 0) {
|
|
117452
118482
|
return;
|
|
117453
118483
|
}
|
|
117454
|
-
const key2 =
|
|
118484
|
+
const key2 = findKey32(chartRoot, "legend", getLocalName2);
|
|
117455
118485
|
if (!style.hasLegend) {
|
|
117456
118486
|
if (key2) {
|
|
117457
118487
|
delete chartRoot[key2];
|
|
@@ -117469,7 +118499,7 @@ function applyLegend(chartRoot, chartData, getLocalName2) {
|
|
|
117469
118499
|
delete chartRoot[key2];
|
|
117470
118500
|
}
|
|
117471
118501
|
const legend = buildChartExLegend(style.legendPosition);
|
|
117472
|
-
|
|
118502
|
+
insertBefore3(chartRoot, "cx:legend", legend, ["extLst"], getLocalName2);
|
|
117473
118503
|
}
|
|
117474
118504
|
function chartExLayoutChanged(chartSpace, chartData, getLocalName2) {
|
|
117475
118505
|
const region = child24(
|
|
@@ -117477,7 +118507,7 @@ function chartExLayoutChanged(chartSpace, chartData, getLocalName2) {
|
|
|
117477
118507
|
"plotAreaRegion",
|
|
117478
118508
|
getLocalName2
|
|
117479
118509
|
);
|
|
117480
|
-
const seriesKey = region ?
|
|
118510
|
+
const seriesKey = region ? findKey32(region, "series", getLocalName2) : void 0;
|
|
117481
118511
|
const first = region && seriesKey ? asArray5(region[seriesKey])[0] : void 0;
|
|
117482
118512
|
const existing = String(first?.["@_layoutId"] ?? "").toLowerCase();
|
|
117483
118513
|
const series = chartData.series[0];
|
|
@@ -117493,11 +118523,11 @@ function applyChartExUpdate(chartSpace, chartData, getLocalName2) {
|
|
|
117493
118523
|
if (!chartRoot || !region) {
|
|
117494
118524
|
return false;
|
|
117495
118525
|
}
|
|
117496
|
-
const chartDataKey =
|
|
118526
|
+
const chartDataKey = findKey32(chartSpace, "chartData", getLocalName2);
|
|
117497
118527
|
const chartDataNode = (chartDataKey ? chartSpace[chartDataKey] : void 0) ?? {};
|
|
117498
|
-
const dataKey =
|
|
118528
|
+
const dataKey = findKey32(chartDataNode, "data", getLocalName2) ?? "cx:data";
|
|
117499
118529
|
const dataNodes = asArray5(chartDataNode[dataKey]);
|
|
117500
|
-
const seriesKey =
|
|
118530
|
+
const seriesKey = findKey32(region, "series", getLocalName2) ?? "cx:series";
|
|
117501
118531
|
const existing = asArray5(region[seriesKey]);
|
|
117502
118532
|
const updated = [];
|
|
117503
118533
|
chartData.series.forEach((series, index) => {
|
|
@@ -117526,7 +118556,7 @@ function applyChartExUpdate(chartSpace, chartData, getLocalName2) {
|
|
|
117526
118556
|
region[seriesKey] = updated.length === 1 ? updated[0] : updated;
|
|
117527
118557
|
chartDataNode[dataKey] = survivingData.length === 1 ? survivingData[0] : survivingData;
|
|
117528
118558
|
if (!chartDataKey) {
|
|
117529
|
-
|
|
118559
|
+
insertBefore3(chartSpace, "cx:chartData", chartDataNode, ["chart"], getLocalName2);
|
|
117530
118560
|
}
|
|
117531
118561
|
applyChartTitleToXml(
|
|
117532
118562
|
chartRoot,
|
|
@@ -119890,7 +120920,7 @@ var init_master_color_map = __esm({
|
|
|
119890
120920
|
|
|
119891
120921
|
// src/pptx/core/services/native-animation-theme-colors.ts
|
|
119892
120922
|
function resolveToken2(value, resolveThemeColor) {
|
|
119893
|
-
if (!value ||
|
|
120923
|
+
if (!value || HEX_COLOR3.test(value)) {
|
|
119894
120924
|
return value;
|
|
119895
120925
|
}
|
|
119896
120926
|
return resolveThemeColor(value) ?? value;
|
|
@@ -119914,10 +120944,10 @@ function resolveNativeAnimationThemeColors(animations, resolveThemeColor) {
|
|
|
119914
120944
|
} : animation
|
|
119915
120945
|
);
|
|
119916
120946
|
}
|
|
119917
|
-
var
|
|
120947
|
+
var HEX_COLOR3;
|
|
119918
120948
|
var init_native_animation_theme_colors = __esm({
|
|
119919
120949
|
"src/pptx/core/services/native-animation-theme-colors.ts"() {
|
|
119920
|
-
|
|
120950
|
+
HEX_COLOR3 = /^#?[0-9a-f]{6}$/iu;
|
|
119921
120951
|
}
|
|
119922
120952
|
});
|
|
119923
120953
|
|
|
@@ -123646,6 +124676,7 @@ var init_PptxHandlerRuntimeSlideMasters = __esm({
|
|
|
123646
124676
|
var PptxHandlerRuntime10;
|
|
123647
124677
|
var init_PptxHandlerRuntimePresentationProps = __esm({
|
|
123648
124678
|
"src/pptx/core/core/runtime/PptxHandlerRuntimePresentationProps.ts"() {
|
|
124679
|
+
init_chart_area_format();
|
|
123649
124680
|
init_chart_data_label_parser();
|
|
123650
124681
|
init_chart_data_labels_visibility();
|
|
123651
124682
|
init_chart_def_rpr_style();
|
|
@@ -123744,27 +124775,18 @@ var init_PptxHandlerRuntimePresentationProps = __esm({
|
|
|
123744
124775
|
}
|
|
123745
124776
|
}
|
|
123746
124777
|
/**
|
|
123747
|
-
* Resolve the `c:spPr` fill of a chart container
|
|
123748
|
-
* `c:plotArea`) to a colour string, or the literal
|
|
123749
|
-
* `<a:noFill
|
|
123750
|
-
*
|
|
123751
|
-
*
|
|
123752
|
-
* `<a:noFill/>` parses to the empty STRING, so presence - not truthiness -
|
|
123753
|
-
* has to decide.
|
|
124778
|
+
* Resolve the `c:spPr` fill and border of a chart container
|
|
124779
|
+
* (`c:chartSpace` or `c:plotArea`) to a colour string, or the literal
|
|
124780
|
+
* `'none'` for `<a:noFill/>`; `undefined` when the container declares
|
|
124781
|
+
* nothing, which leaves the choice to the renderer. The save path reads it
|
|
124782
|
+
* back with the same function (`chart-area-format.ts`).
|
|
123754
124783
|
*/
|
|
123755
|
-
|
|
123756
|
-
|
|
123757
|
-
|
|
123758
|
-
|
|
123759
|
-
|
|
123760
|
-
const hasNoFill = Object.keys(shapeProperties).some(
|
|
123761
|
-
(key2) => this.compatibilityService.getXmlLocalName(key2) === "noFill"
|
|
124784
|
+
parseChartContainerFormat(container2) {
|
|
124785
|
+
return parseChartAreaFormat(
|
|
124786
|
+
container2,
|
|
124787
|
+
(key2) => this.compatibilityService.getXmlLocalName(key2),
|
|
124788
|
+
(node) => this.parseColor(node)
|
|
123762
124789
|
);
|
|
123763
|
-
if (hasNoFill) {
|
|
123764
|
-
return "none";
|
|
123765
|
-
}
|
|
123766
|
-
const solidFill3 = this.xmlLookupService.getChildByLocalName(shapeProperties, "solidFill");
|
|
123767
|
-
return solidFill3 ? this.parseColor(solidFill3) : void 0;
|
|
123768
124790
|
}
|
|
123769
124791
|
/**
|
|
123770
124792
|
* Extract chart style metadata from chart XML.
|
|
@@ -123780,9 +124802,13 @@ var init_PptxHandlerRuntimePresentationProps = __esm({
|
|
|
123780
124802
|
style.styleId = parseInt(String(styleNode["@_val"]));
|
|
123781
124803
|
hasStyle = true;
|
|
123782
124804
|
}
|
|
123783
|
-
const
|
|
123784
|
-
if (
|
|
123785
|
-
style.chartAreaFill =
|
|
124805
|
+
const chartArea = this.parseChartContainerFormat(chartSpace);
|
|
124806
|
+
if (chartArea.fill) {
|
|
124807
|
+
style.chartAreaFill = chartArea.fill;
|
|
124808
|
+
hasStyle = true;
|
|
124809
|
+
}
|
|
124810
|
+
if (chartArea.border) {
|
|
124811
|
+
style.chartAreaBorder = chartArea.border;
|
|
123786
124812
|
hasStyle = true;
|
|
123787
124813
|
}
|
|
123788
124814
|
const chartAreaGradient = parseChartGradientFill(
|
|
@@ -123850,9 +124876,13 @@ var init_PptxHandlerRuntimePresentationProps = __esm({
|
|
|
123850
124876
|
if (plotAreaGradient) {
|
|
123851
124877
|
style.plotAreaGradient = plotAreaGradient;
|
|
123852
124878
|
}
|
|
123853
|
-
const
|
|
123854
|
-
if (
|
|
123855
|
-
style.plotAreaFill =
|
|
124879
|
+
const plotAreaFormat = this.parseChartContainerFormat(plotArea);
|
|
124880
|
+
if (plotAreaFormat.fill) {
|
|
124881
|
+
style.plotAreaFill = plotAreaFormat.fill;
|
|
124882
|
+
hasStyle = true;
|
|
124883
|
+
}
|
|
124884
|
+
if (plotAreaFormat.border) {
|
|
124885
|
+
style.plotAreaBorder = plotAreaFormat.border;
|
|
123856
124886
|
hasStyle = true;
|
|
123857
124887
|
}
|
|
123858
124888
|
const valAx = this.xmlLookupService.getChildByLocalName(plotArea, "valAx");
|
|
@@ -129452,7 +130482,10 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
|
|
|
129452
130482
|
init_chart_axis_dispunits_serializer();
|
|
129453
130483
|
init_chart_axis_gridlines_serializer();
|
|
129454
130484
|
init_chart_axis_label_formatting();
|
|
130485
|
+
init_chart_axis_deleted();
|
|
129455
130486
|
init_chart_axis_scaling();
|
|
130487
|
+
init_chart_group_options();
|
|
130488
|
+
init_chart_space_format();
|
|
129456
130489
|
init_chart_axis_title_serializer();
|
|
129457
130490
|
init_chart_band_fmts();
|
|
129458
130491
|
init_chart_bubble_options();
|
|
@@ -129706,6 +130739,15 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
|
|
|
129706
130739
|
} else if (groupingKey) {
|
|
129707
130740
|
delete chartTypeContainer[groupingKey];
|
|
129708
130741
|
}
|
|
130742
|
+
const singleContainer = (consolidation?.containerChildren.size ?? 1) <= 1;
|
|
130743
|
+
if (singleContainer && chartData.chartType !== "combo") {
|
|
130744
|
+
applyChartGroupOptionsToXml(
|
|
130745
|
+
chartTypeContainer,
|
|
130746
|
+
containerLocalName,
|
|
130747
|
+
chartData,
|
|
130748
|
+
(key2) => this.compatibilityService.getXmlLocalName(key2)
|
|
130749
|
+
);
|
|
130750
|
+
}
|
|
129709
130751
|
const seriesNodes = this.xmlLookupService.getChildrenArrayByLocalName(
|
|
129710
130752
|
chartTypeContainer,
|
|
129711
130753
|
"ser"
|
|
@@ -130110,6 +131152,11 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
|
|
|
130110
131152
|
if (!matchingAxis) {
|
|
130111
131153
|
continue;
|
|
130112
131154
|
}
|
|
131155
|
+
applyChartAxisDeletedToXml(
|
|
131156
|
+
axisNode,
|
|
131157
|
+
matchingAxis.deleted,
|
|
131158
|
+
(key2) => this.compatibilityService.getXmlLocalName(key2)
|
|
131159
|
+
);
|
|
130113
131160
|
const scalingNode = this.xmlLookupService.getChildByLocalName(axisNode, "scaling");
|
|
130114
131161
|
if (scalingNode) {
|
|
130115
131162
|
applyChartAxisScaling(
|
|
@@ -130185,6 +131232,18 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
|
|
|
130185
131232
|
}
|
|
130186
131233
|
}
|
|
130187
131234
|
}
|
|
131235
|
+
if (chartSpace) {
|
|
131236
|
+
applyChartSpaceFormatToXml(
|
|
131237
|
+
chartSpace,
|
|
131238
|
+
plotArea,
|
|
131239
|
+
chartData,
|
|
131240
|
+
(key2) => this.compatibilityService.getXmlLocalName(key2),
|
|
131241
|
+
{
|
|
131242
|
+
...this.chartGradientWriteOptions(false),
|
|
131243
|
+
resolveColor: (node) => this.parseColor(node)
|
|
131244
|
+
}
|
|
131245
|
+
);
|
|
131246
|
+
}
|
|
130188
131247
|
for (const key2 of Object.keys(plotArea)) {
|
|
130189
131248
|
const local = this.compatibilityService.getXmlLocalName(key2);
|
|
130190
131249
|
if (!local.endsWith("Chart")) {
|
|
@@ -130618,7 +131677,7 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
|
|
|
130618
131677
|
});
|
|
130619
131678
|
|
|
130620
131679
|
// src/pptx/core/core/runtime/smartart-definition-builder.ts
|
|
130621
|
-
function
|
|
131680
|
+
function findKey33(node, name, localName29) {
|
|
130622
131681
|
return Object.keys(node).find((key2) => localName29(key2) === name);
|
|
130623
131682
|
}
|
|
130624
131683
|
function prefixFor2(node) {
|
|
@@ -130637,7 +131696,7 @@ function setChildren(node, name, values, localName29) {
|
|
|
130637
131696
|
if (values === void 0) {
|
|
130638
131697
|
return false;
|
|
130639
131698
|
}
|
|
130640
|
-
const existing =
|
|
131699
|
+
const existing = findKey33(node, name, localName29);
|
|
130641
131700
|
if (values.length === 0) {
|
|
130642
131701
|
if (existing) {
|
|
130643
131702
|
delete node[existing];
|
|
@@ -130664,7 +131723,7 @@ function applySmartArtDefinitionMetadata(node, metadata, localName29) {
|
|
|
130664
131723
|
changed = setChildren(node, "title", textNodes(metadata.titles), localName29) || changed;
|
|
130665
131724
|
changed = setChildren(node, "desc", textNodes(metadata.descriptions), localName29) || changed;
|
|
130666
131725
|
if (metadata.categories !== void 0) {
|
|
130667
|
-
const key2 =
|
|
131726
|
+
const key2 = findKey33(node, "catLst", localName29);
|
|
130668
131727
|
if (metadata.categories.length === 0) {
|
|
130669
131728
|
if (key2) {
|
|
130670
131729
|
delete node[key2];
|
|
@@ -130688,7 +131747,7 @@ function applySmartArtDefinitionMetadata(node, metadata, localName29) {
|
|
|
130688
131747
|
return changed;
|
|
130689
131748
|
}
|
|
130690
131749
|
function ensureLabels(node, localName29) {
|
|
130691
|
-
const key2 =
|
|
131750
|
+
const key2 = findKey33(node, "styleLbl", localName29) ?? `${prefixFor2(node)}styleLbl`;
|
|
130692
131751
|
return { key: key2, labels: objects2(node[key2]) };
|
|
130693
131752
|
}
|
|
130694
131753
|
function applySmartArtQuickStyleLabels(node, labels, localName29) {
|
|
@@ -130703,7 +131762,7 @@ function applySmartArtQuickStyleLabels(node, labels, localName29) {
|
|
|
130703
131762
|
return true;
|
|
130704
131763
|
}
|
|
130705
131764
|
function applyColorList(label, name, metadata, localName29) {
|
|
130706
|
-
const key2 =
|
|
131765
|
+
const key2 = findKey33(label, name, localName29) ?? `${prefixFor2(label)}${name}`;
|
|
130707
131766
|
const list2 = objects2(label[key2])[0] ?? {};
|
|
130708
131767
|
if (metadata.method !== void 0) {
|
|
130709
131768
|
list2["@_meth"] = metadata.method;
|
|
@@ -130746,17 +131805,17 @@ var init_smartart_definition_builder = __esm({
|
|
|
130746
131805
|
});
|
|
130747
131806
|
|
|
130748
131807
|
// src/pptx/core/core/runtime/smartart-colors-builder.ts
|
|
130749
|
-
function
|
|
131808
|
+
function asObject2(value) {
|
|
130750
131809
|
return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
130751
131810
|
}
|
|
130752
131811
|
function toArray4(value) {
|
|
130753
131812
|
if (Array.isArray(value)) {
|
|
130754
|
-
return value.filter((entry) => Boolean(
|
|
131813
|
+
return value.filter((entry) => Boolean(asObject2(entry)));
|
|
130755
131814
|
}
|
|
130756
|
-
const obj =
|
|
131815
|
+
const obj = asObject2(value);
|
|
130757
131816
|
return obj ? [obj] : [];
|
|
130758
131817
|
}
|
|
130759
|
-
function
|
|
131818
|
+
function findKey34(obj, name, getLocalName2) {
|
|
130760
131819
|
return Object.keys(obj).find((k) => getLocalName2(k) === name);
|
|
130761
131820
|
}
|
|
130762
131821
|
function hex2(value) {
|
|
@@ -130771,13 +131830,13 @@ function applyColorToList(list2, value, getLocalName2, resolveColor2) {
|
|
|
130771
131830
|
}
|
|
130772
131831
|
const existing = list2[colorKey];
|
|
130773
131832
|
if (resolveColor2) {
|
|
130774
|
-
const authored =
|
|
131833
|
+
const authored = asObject2(Array.isArray(existing) ? existing[0] : existing);
|
|
130775
131834
|
const authoredHex = authored ? resolveColor2({ [colorKey]: authored }) : void 0;
|
|
130776
131835
|
if (authoredHex && colorsEqual(authoredHex, value)) {
|
|
130777
131836
|
return;
|
|
130778
131837
|
}
|
|
130779
131838
|
}
|
|
130780
|
-
const rest = Array.isArray(existing) ? existing.slice(1).filter((entry) => Boolean(
|
|
131839
|
+
const rest = Array.isArray(existing) ? existing.slice(1).filter((entry) => Boolean(asObject2(entry))) : [];
|
|
130781
131840
|
if (colorKey !== "a:srgbClr") {
|
|
130782
131841
|
delete list2[colorKey];
|
|
130783
131842
|
}
|
|
@@ -130792,7 +131851,7 @@ function applyColorListValues(list2, values, getLocalName2, resolveColor2) {
|
|
|
130792
131851
|
const existing = Array.isArray(existingRaw) ? existingRaw : existingRaw ? [existingRaw] : [];
|
|
130793
131852
|
if (resolveColor2 && colorKey && existing.length === values.length) {
|
|
130794
131853
|
const unchanged2 = existing.every((entryRaw, index) => {
|
|
130795
|
-
const entry =
|
|
131854
|
+
const entry = asObject2(entryRaw);
|
|
130796
131855
|
const authoredHex = entry ? resolveColor2({ [colorKey]: entry }) : void 0;
|
|
130797
131856
|
return authoredHex !== void 0 && colorsEqual(authoredHex, values[index]);
|
|
130798
131857
|
});
|
|
@@ -130815,16 +131874,16 @@ function applyRoleColors(labels, roleColors, getLocalName2, resolveColor2) {
|
|
|
130815
131874
|
if (!role) {
|
|
130816
131875
|
continue;
|
|
130817
131876
|
}
|
|
130818
|
-
const fillKey =
|
|
131877
|
+
const fillKey = findKey34(label, "fillClrLst", getLocalName2);
|
|
130819
131878
|
if (fillKey) {
|
|
130820
|
-
const list2 =
|
|
131879
|
+
const list2 = asObject2(label[fillKey]);
|
|
130821
131880
|
if (list2 && applyColorListValues(list2, role.fill, getLocalName2, resolveColor2)) {
|
|
130822
131881
|
mutated = true;
|
|
130823
131882
|
}
|
|
130824
131883
|
}
|
|
130825
|
-
const lineKey =
|
|
131884
|
+
const lineKey = findKey34(label, "linClrLst", getLocalName2);
|
|
130826
131885
|
if (lineKey) {
|
|
130827
|
-
const list2 =
|
|
131886
|
+
const list2 = asObject2(label[lineKey]);
|
|
130828
131887
|
if (list2 && applyColorListValues(list2, role.line, getLocalName2, resolveColor2)) {
|
|
130829
131888
|
mutated = true;
|
|
130830
131889
|
}
|
|
@@ -130839,7 +131898,7 @@ function applySmartArtColorTransform(colorsDef, transform6, getLocalName2, resol
|
|
|
130839
131898
|
let mutated = false;
|
|
130840
131899
|
mutated = applySmartArtDefinitionMetadata(colorsDef, transform6, getLocalName2) || mutated;
|
|
130841
131900
|
mutated = applySmartArtColorStyleLabels(colorsDef, transform6.labels, getLocalName2) || mutated;
|
|
130842
|
-
const styleLblKey =
|
|
131901
|
+
const styleLblKey = findKey34(colorsDef, "styleLbl", getLocalName2);
|
|
130843
131902
|
if (!styleLblKey) {
|
|
130844
131903
|
return mutated;
|
|
130845
131904
|
}
|
|
@@ -130853,19 +131912,19 @@ function applySmartArtColorTransform(colorsDef, transform6, getLocalName2, resol
|
|
|
130853
131912
|
let fillIndex = 0;
|
|
130854
131913
|
let lineIndex = 0;
|
|
130855
131914
|
for (const label of labels) {
|
|
130856
|
-
const fillKey =
|
|
131915
|
+
const fillKey = findKey34(label, "fillClrLst", getLocalName2);
|
|
130857
131916
|
if (fillKey) {
|
|
130858
131917
|
const value = transform6.fillColors[fillIndex++];
|
|
130859
|
-
const list2 =
|
|
131918
|
+
const list2 = asObject2(label[fillKey]);
|
|
130860
131919
|
if (list2 && value) {
|
|
130861
131920
|
applyColorToList(list2, value, getLocalName2, resolveColor2);
|
|
130862
131921
|
mutated = true;
|
|
130863
131922
|
}
|
|
130864
131923
|
}
|
|
130865
|
-
const lineKey =
|
|
131924
|
+
const lineKey = findKey34(label, "linClrLst", getLocalName2);
|
|
130866
131925
|
if (lineKey) {
|
|
130867
131926
|
const value = transform6.lineColors[lineIndex++];
|
|
130868
|
-
const list2 =
|
|
131927
|
+
const list2 = asObject2(label[lineKey]);
|
|
130869
131928
|
if (list2 && value) {
|
|
130870
131929
|
applyColorToList(list2, value, getLocalName2, resolveColor2);
|
|
130871
131930
|
mutated = true;
|
|
@@ -131122,40 +132181,40 @@ var init_smartart_quick_style_builder = __esm({
|
|
|
131122
132181
|
});
|
|
131123
132182
|
|
|
131124
132183
|
// src/pptx/core/core/runtime/smartart-save-chrome.ts
|
|
131125
|
-
function
|
|
132184
|
+
function asObject3(value) {
|
|
131126
132185
|
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
131127
132186
|
}
|
|
131128
132187
|
function applySmartArtChrome(dataModel, chrome, getLocalName2) {
|
|
131129
132188
|
if (!chrome || !chrome.backgroundColor && !chrome.backgroundFillXml && !chrome.outlineColor && (chrome.outlineWidth === null || chrome.outlineWidth === void 0)) {
|
|
131130
132189
|
return;
|
|
131131
132190
|
}
|
|
131132
|
-
const
|
|
132191
|
+
const findKey35 = (obj, name) => Object.keys(obj).find((k) => getLocalName2(k) === name);
|
|
131133
132192
|
if (chrome.backgroundFillXml) {
|
|
131134
|
-
const bgKey =
|
|
131135
|
-
const bg =
|
|
131136
|
-
const fillKey =
|
|
132193
|
+
const bgKey = findKey35(dataModel, "bg") ?? "dgm:bg";
|
|
132194
|
+
const bg = asObject3(dataModel[bgKey]);
|
|
132195
|
+
const fillKey = findKey35(bg, chrome.backgroundFillXml.localName) ?? `a:${chrome.backgroundFillXml.localName}`;
|
|
131137
132196
|
bg[fillKey] = chrome.backgroundFillXml.xml;
|
|
131138
132197
|
dataModel[bgKey] = bg;
|
|
131139
132198
|
} else if (chrome.backgroundColor) {
|
|
131140
132199
|
const hex3 = chrome.backgroundColor.replace("#", "");
|
|
131141
|
-
const bgKey =
|
|
131142
|
-
const bg =
|
|
131143
|
-
const fillKey =
|
|
132200
|
+
const bgKey = findKey35(dataModel, "bg") ?? "dgm:bg";
|
|
132201
|
+
const bg = asObject3(dataModel[bgKey]);
|
|
132202
|
+
const fillKey = findKey35(bg, "solidFill") ?? "a:solidFill";
|
|
131144
132203
|
bg[fillKey] = { "a:srgbClr": { "@_val": hex3 } };
|
|
131145
132204
|
dataModel[bgKey] = bg;
|
|
131146
132205
|
}
|
|
131147
132206
|
const hasOutlineWidth = chrome.outlineWidth !== null && chrome.outlineWidth !== void 0;
|
|
131148
132207
|
if (chrome.outlineColor || hasOutlineWidth) {
|
|
131149
|
-
const wholeKey =
|
|
131150
|
-
const whole =
|
|
131151
|
-
const lnKey =
|
|
131152
|
-
const ln =
|
|
132208
|
+
const wholeKey = findKey35(dataModel, "whole") ?? "dgm:whole";
|
|
132209
|
+
const whole = asObject3(dataModel[wholeKey]);
|
|
132210
|
+
const lnKey = findKey35(whole, "ln") ?? "a:ln";
|
|
132211
|
+
const ln = asObject3(whole[lnKey]);
|
|
131153
132212
|
if (hasOutlineWidth) {
|
|
131154
132213
|
ln["@_w"] = String(Math.round(chrome.outlineWidth * 12700));
|
|
131155
132214
|
}
|
|
131156
132215
|
if (chrome.outlineColor) {
|
|
131157
132216
|
const hex3 = chrome.outlineColor.replace("#", "");
|
|
131158
|
-
const fillKey =
|
|
132217
|
+
const fillKey = findKey35(ln, "solidFill") ?? "a:solidFill";
|
|
131159
132218
|
ln[fillKey] = { "a:srgbClr": { "@_val": hex3 } };
|
|
131160
132219
|
}
|
|
131161
132220
|
whole[lnKey] = ln;
|
|
@@ -149498,6 +150557,7 @@ var init_PptxHandlerRuntimeChartColorStyle = __esm({
|
|
|
149498
150557
|
var SCATTER_STYLES, PptxHandlerRuntime94;
|
|
149499
150558
|
var init_PptxHandlerRuntimeChartParsing = __esm({
|
|
149500
150559
|
"src/pptx/core/core/runtime/PptxHandlerRuntimeChartParsing.ts"() {
|
|
150560
|
+
init_units2();
|
|
149501
150561
|
init_chart_advanced_parser();
|
|
149502
150562
|
init_chart_axis_parser();
|
|
149503
150563
|
init_chart_band_fmts();
|
|
@@ -150080,6 +151140,10 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
|
|
|
150080
151140
|
const lineNoFill = seriesLine ? Object.keys(seriesLine).some(
|
|
150081
151141
|
(key2) => this.compatibilityService.getXmlLocalName(key2) === "noFill"
|
|
150082
151142
|
) : false;
|
|
151143
|
+
const lineWidthEmu = Number(seriesLine?.["@_w"]);
|
|
151144
|
+
const lineWidth = Number.isFinite(lineWidthEmu) && lineWidthEmu > 0 ? lineWidthEmu / EMU_PER_POINT : void 0;
|
|
151145
|
+
const lineDashRaw = this.xmlLookupService.getChildByLocalName(seriesLine, "prstDash")?.["@_val"];
|
|
151146
|
+
const lineDashStyle = typeof lineDashRaw === "string" && lineDashRaw.length > 0 ? lineDashRaw : void 0;
|
|
150083
151147
|
const smoothNode = this.xmlLookupService.getChildByLocalName(seriesNode, "smooth");
|
|
150084
151148
|
const smooth = smoothNode ? !(smoothNode["@_val"] === "0" || smoothNode["@_val"] === "false") : void 0;
|
|
150085
151149
|
const invertNode = this.xmlLookupService.getChildByLocalName(seriesNode, "invertIfNegative");
|
|
@@ -150098,6 +151162,8 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
|
|
|
150098
151162
|
...bubbleSizes.length > 0 ? { bubbleSizes } : {},
|
|
150099
151163
|
...dataLabelOptions && Object.keys(dataLabelOptions).length > 0 ? { dataLabelOptions } : {},
|
|
150100
151164
|
...lineNoFill ? { lineNoFill } : {},
|
|
151165
|
+
...lineWidth !== void 0 ? { lineWidth } : {},
|
|
151166
|
+
...lineDashStyle ? { lineDashStyle } : {},
|
|
150101
151167
|
...seriesNumberFormat ? { numberFormat: seriesNumberFormat } : {},
|
|
150102
151168
|
color: seriesColor2,
|
|
150103
151169
|
...this.colorStyleCodec ? seriesGradientFill(seriesShapeProperties, this.xmlLookupService, this.colorStyleCodec) : {},
|
|
@@ -157124,420 +158190,10 @@ var Presentation = class _Presentation {
|
|
|
157124
158190
|
init_PresentationBuilder();
|
|
157125
158191
|
init_SlideBuilder();
|
|
157126
158192
|
init_ElementFactory();
|
|
157127
|
-
|
|
157128
|
-
// src/pptx/core/builders/sdk/chart-operations.ts
|
|
157129
|
-
function ensureChartData(element) {
|
|
157130
|
-
if (!element.chartData) {
|
|
157131
|
-
throw new Error(
|
|
157132
|
-
"Chart element has no chartData. Cannot perform chart operations on an uninitialised chart."
|
|
157133
|
-
);
|
|
157134
|
-
}
|
|
157135
|
-
}
|
|
157136
|
-
function validateSeriesIndex(element, seriesIndex) {
|
|
157137
|
-
ensureChartData(element);
|
|
157138
|
-
if (seriesIndex < 0 || seriesIndex >= element.chartData.series.length) {
|
|
157139
|
-
throw new RangeError(
|
|
157140
|
-
`Series index ${seriesIndex} is out of range. Chart has ${element.chartData.series.length} series (indices 0\u2013${element.chartData.series.length - 1}).`
|
|
157141
|
-
);
|
|
157142
|
-
}
|
|
157143
|
-
}
|
|
157144
|
-
function setChartType(element, newType) {
|
|
157145
|
-
ensureChartData(element);
|
|
157146
|
-
element.chartData.chartType = newType;
|
|
157147
|
-
}
|
|
157148
|
-
function addChartSeries(element, series) {
|
|
157149
|
-
ensureChartData(element);
|
|
157150
|
-
element.chartData.series.push({
|
|
157151
|
-
name: series.name,
|
|
157152
|
-
values: series.values,
|
|
157153
|
-
color: series.color
|
|
157154
|
-
});
|
|
157155
|
-
}
|
|
157156
|
-
function removeChartSeries(element, seriesIndex) {
|
|
157157
|
-
validateSeriesIndex(element, seriesIndex);
|
|
157158
|
-
element.chartData.series.splice(seriesIndex, 1);
|
|
157159
|
-
}
|
|
157160
|
-
function setChartCategories(element, categories) {
|
|
157161
|
-
ensureChartData(element);
|
|
157162
|
-
element.chartData.categories = categories;
|
|
157163
|
-
}
|
|
157164
|
-
function updateChartSeriesValues(element, seriesIndex, values) {
|
|
157165
|
-
validateSeriesIndex(element, seriesIndex);
|
|
157166
|
-
element.chartData.series[seriesIndex].values = values;
|
|
157167
|
-
}
|
|
157168
|
-
function setChartTitle(element, title) {
|
|
157169
|
-
ensureChartData(element);
|
|
157170
|
-
element.chartData.title = title;
|
|
157171
|
-
}
|
|
157172
|
-
function setChartGrouping(element, grouping) {
|
|
157173
|
-
ensureChartData(element);
|
|
157174
|
-
element.chartData.grouping = grouping;
|
|
157175
|
-
}
|
|
157176
|
-
function setChartLegend(element, options) {
|
|
157177
|
-
ensureChartData(element);
|
|
157178
|
-
const style = element.chartData.style ??= {};
|
|
157179
|
-
if (options.show !== void 0) {
|
|
157180
|
-
style.hasLegend = options.show;
|
|
157181
|
-
}
|
|
157182
|
-
if (options.position !== void 0) {
|
|
157183
|
-
style.legendPosition = options.position;
|
|
157184
|
-
if (style.hasLegend === void 0) {
|
|
157185
|
-
style.hasLegend = true;
|
|
157186
|
-
}
|
|
157187
|
-
}
|
|
157188
|
-
}
|
|
157189
|
-
function setChartDataLabels(element, edit) {
|
|
157190
|
-
ensureChartData(element);
|
|
157191
|
-
const style = element.chartData.style ??= {};
|
|
157192
|
-
if (edit.show !== void 0) {
|
|
157193
|
-
style.hasDataLabels = edit.show;
|
|
157194
|
-
const labels = style.dataLabels;
|
|
157195
|
-
const anyContent = labels?.showValue === true || labels?.showCategory === true || labels?.showSeriesName === true || labels?.showPercent === true || labels?.showBubbleSize === true;
|
|
157196
|
-
if (edit.show && labels !== void 0 && !anyContent && edit.showValue === void 0) {
|
|
157197
|
-
labels.showValue = true;
|
|
157198
|
-
}
|
|
157199
|
-
}
|
|
157200
|
-
const contentKeys = [
|
|
157201
|
-
"showValue",
|
|
157202
|
-
"showCategory",
|
|
157203
|
-
"showSeriesName",
|
|
157204
|
-
"showPercent",
|
|
157205
|
-
"showLegendKey"
|
|
157206
|
-
];
|
|
157207
|
-
const hasContentEdit = contentKeys.some((k) => edit[k] !== void 0) || edit.position !== void 0;
|
|
157208
|
-
if (hasContentEdit) {
|
|
157209
|
-
const opts = style.dataLabels ??= {};
|
|
157210
|
-
for (const k of contentKeys) {
|
|
157211
|
-
if (edit[k] !== void 0) {
|
|
157212
|
-
opts[k] = edit[k];
|
|
157213
|
-
}
|
|
157214
|
-
}
|
|
157215
|
-
if (edit.position !== void 0) {
|
|
157216
|
-
opts.position = edit.position || void 0;
|
|
157217
|
-
}
|
|
157218
|
-
if (style.hasDataLabels === void 0) {
|
|
157219
|
-
style.hasDataLabels = true;
|
|
157220
|
-
}
|
|
157221
|
-
}
|
|
157222
|
-
}
|
|
157223
|
-
function setChartSeriesTrendline(element, seriesIndex, trendline) {
|
|
157224
|
-
validateSeriesIndex(element, seriesIndex);
|
|
157225
|
-
element.chartData.series[seriesIndex].trendlines = trendline ? [trendline] : [];
|
|
157226
|
-
}
|
|
157227
|
-
function setChartSeriesErrorBars(element, seriesIndex, errBars) {
|
|
157228
|
-
validateSeriesIndex(element, seriesIndex);
|
|
157229
|
-
element.chartData.series[seriesIndex].errBars = errBars ? [errBars] : [];
|
|
157230
|
-
}
|
|
157231
|
-
function setChartAxis(element, axisType, edit) {
|
|
157232
|
-
ensureChartData(element);
|
|
157233
|
-
const axes = element.chartData.axes ??= [];
|
|
157234
|
-
let axis = axes.find((a) => a.axisType === axisType);
|
|
157235
|
-
if (!axis) {
|
|
157236
|
-
axis = { axisType };
|
|
157237
|
-
axes.push(axis);
|
|
157238
|
-
}
|
|
157239
|
-
if (edit.min !== void 0) {
|
|
157240
|
-
axis.min = edit.min ?? void 0;
|
|
157241
|
-
}
|
|
157242
|
-
if (edit.max !== void 0) {
|
|
157243
|
-
axis.max = edit.max ?? void 0;
|
|
157244
|
-
}
|
|
157245
|
-
if (edit.majorUnit !== void 0) {
|
|
157246
|
-
axis.majorUnit = edit.majorUnit ?? void 0;
|
|
157247
|
-
}
|
|
157248
|
-
if (edit.minorUnit !== void 0) {
|
|
157249
|
-
axis.minorUnit = edit.minorUnit ?? void 0;
|
|
157250
|
-
}
|
|
157251
|
-
if (edit.orientation !== void 0) {
|
|
157252
|
-
axis.orientation = edit.orientation ?? void 0;
|
|
157253
|
-
}
|
|
157254
|
-
if (edit.numberFormat !== void 0) {
|
|
157255
|
-
axis.numFmt = edit.numberFormat ? { formatCode: edit.numberFormat, sourceLinked: false } : void 0;
|
|
157256
|
-
}
|
|
157257
|
-
if (edit.tickLabelPosition !== void 0) {
|
|
157258
|
-
axis.tickLblPos = edit.tickLabelPosition;
|
|
157259
|
-
}
|
|
157260
|
-
if (edit.title !== void 0) {
|
|
157261
|
-
axis.titleText = edit.title ?? "";
|
|
157262
|
-
}
|
|
157263
|
-
if (edit.majorGridlines !== void 0) {
|
|
157264
|
-
axis.majorGridlines = edit.majorGridlines;
|
|
157265
|
-
}
|
|
157266
|
-
if (edit.minorGridlines !== void 0) {
|
|
157267
|
-
axis.minorGridlines = edit.minorGridlines;
|
|
157268
|
-
}
|
|
157269
|
-
if (edit.displayUnits !== void 0) {
|
|
157270
|
-
axis.displayUnits = edit.displayUnits ?? void 0;
|
|
157271
|
-
}
|
|
157272
|
-
if (edit.displayUnitsValue !== void 0) {
|
|
157273
|
-
axis.displayUnitsValue = edit.displayUnitsValue ?? void 0;
|
|
157274
|
-
}
|
|
157275
|
-
if (edit.displayUnitsLabel !== void 0) {
|
|
157276
|
-
axis.displayUnitsLabel = edit.displayUnitsLabel;
|
|
157277
|
-
}
|
|
157278
|
-
}
|
|
157279
|
-
function updateChartDataPoint(element, seriesIndex, pointIndex, value) {
|
|
157280
|
-
validateSeriesIndex(element, seriesIndex);
|
|
157281
|
-
const series = element.chartData.series[seriesIndex];
|
|
157282
|
-
if (pointIndex < 0 || pointIndex >= series.values.length) {
|
|
157283
|
-
throw new RangeError(
|
|
157284
|
-
`Point index ${pointIndex} is out of range. Series "${series.name}" has ${series.values.length} data points (indices 0\u2013${series.values.length - 1}).`
|
|
157285
|
-
);
|
|
157286
|
-
}
|
|
157287
|
-
series.values[pointIndex] = value;
|
|
157288
|
-
}
|
|
157289
|
-
function addChartCategory(element, categoryName) {
|
|
157290
|
-
ensureChartData(element);
|
|
157291
|
-
element.chartData.categories.push(categoryName);
|
|
157292
|
-
for (const series of element.chartData.series) {
|
|
157293
|
-
series.values.push(0);
|
|
157294
|
-
}
|
|
157295
|
-
}
|
|
157296
|
-
function removeChartCategory(element, categoryIndex) {
|
|
157297
|
-
ensureChartData(element);
|
|
157298
|
-
if (categoryIndex < 0 || categoryIndex >= element.chartData.categories.length) {
|
|
157299
|
-
throw new RangeError(
|
|
157300
|
-
`Category index ${categoryIndex} is out of range. Chart has ${element.chartData.categories.length} categories (indices 0\u2013${element.chartData.categories.length - 1}).`
|
|
157301
|
-
);
|
|
157302
|
-
}
|
|
157303
|
-
element.chartData.categories.splice(categoryIndex, 1);
|
|
157304
|
-
for (const series of element.chartData.series) {
|
|
157305
|
-
series.values.splice(categoryIndex, 1);
|
|
157306
|
-
}
|
|
157307
|
-
}
|
|
157308
|
-
function setChartSeriesColor(element, seriesIndex, color2) {
|
|
157309
|
-
validateSeriesIndex(element, seriesIndex);
|
|
157310
|
-
const series = element.chartData.series[seriesIndex];
|
|
157311
|
-
delete series.gradientFill;
|
|
157312
|
-
if (!color2) {
|
|
157313
|
-
series.color = void 0;
|
|
157314
|
-
return;
|
|
157315
|
-
}
|
|
157316
|
-
const trimmed = color2.trim();
|
|
157317
|
-
series.color = trimmed.startsWith("#") ? trimmed : `#${trimmed}`;
|
|
157318
|
-
}
|
|
157319
|
-
function ensureAxis(element, axisType) {
|
|
157320
|
-
ensureChartData(element);
|
|
157321
|
-
const axes = element.chartData.axes ??= [];
|
|
157322
|
-
let axis = axes.find((a) => a.axisType === axisType);
|
|
157323
|
-
if (!axis) {
|
|
157324
|
-
axis = { axisType };
|
|
157325
|
-
axes.push(axis);
|
|
157326
|
-
}
|
|
157327
|
-
return axis;
|
|
157328
|
-
}
|
|
157329
|
-
function setChartAxisLogScale(element, axisType, opts) {
|
|
157330
|
-
const axis = ensureAxis(element, axisType);
|
|
157331
|
-
axis.logScale = opts.enabled;
|
|
157332
|
-
if (opts.enabled) {
|
|
157333
|
-
axis.logBase = opts.base ?? axis.logBase ?? 10;
|
|
157334
|
-
} else {
|
|
157335
|
-
axis.logBase = void 0;
|
|
157336
|
-
}
|
|
157337
|
-
}
|
|
157338
|
-
function setChartAxisTitleStyle(element, axisType, edit) {
|
|
157339
|
-
const axis = ensureAxis(element, axisType);
|
|
157340
|
-
if (edit.fontFamily !== void 0) {
|
|
157341
|
-
axis.fontFamily = edit.fontFamily ?? void 0;
|
|
157342
|
-
}
|
|
157343
|
-
if (edit.fontSize !== void 0) {
|
|
157344
|
-
axis.fontSize = edit.fontSize ?? void 0;
|
|
157345
|
-
}
|
|
157346
|
-
if (edit.fontBold !== void 0) {
|
|
157347
|
-
axis.fontBold = edit.fontBold;
|
|
157348
|
-
}
|
|
157349
|
-
if (edit.fontColor !== void 0) {
|
|
157350
|
-
axis.fontColor = edit.fontColor ?? void 0;
|
|
157351
|
-
}
|
|
157352
|
-
}
|
|
157353
|
-
function setChartAxisGridlineStyle(element, axisType, which, edit) {
|
|
157354
|
-
const axis = ensureAxis(element, axisType);
|
|
157355
|
-
const key2 = which === "major" ? "majorGridlinesSpPr" : "minorGridlinesSpPr";
|
|
157356
|
-
const flagKey = which === "major" ? "majorGridlines" : "minorGridlines";
|
|
157357
|
-
const props = { ...axis[key2] ?? {} };
|
|
157358
|
-
if (edit.color !== void 0) {
|
|
157359
|
-
props.strokeColor = edit.color ?? void 0;
|
|
157360
|
-
}
|
|
157361
|
-
if (edit.width !== void 0) {
|
|
157362
|
-
props.strokeWidth = edit.width ?? void 0;
|
|
157363
|
-
}
|
|
157364
|
-
if (edit.dashStyle !== void 0) {
|
|
157365
|
-
props.strokeDashStyle = edit.dashStyle ?? void 0;
|
|
157366
|
-
}
|
|
157367
|
-
const hasAnyProp = props.strokeColor !== void 0 || props.strokeWidth !== void 0 || props.strokeDashStyle !== void 0 || props.fillColor !== void 0;
|
|
157368
|
-
axis[key2] = hasAnyProp ? props : void 0;
|
|
157369
|
-
if (hasAnyProp) {
|
|
157370
|
-
axis[flagKey] = true;
|
|
157371
|
-
}
|
|
157372
|
-
}
|
|
157373
|
-
function setChartSeriesMarker(element, seriesIndex, marker) {
|
|
157374
|
-
validateSeriesIndex(element, seriesIndex);
|
|
157375
|
-
const series = element.chartData.series[seriesIndex];
|
|
157376
|
-
if (marker === null) {
|
|
157377
|
-
series.marker = void 0;
|
|
157378
|
-
return;
|
|
157379
|
-
}
|
|
157380
|
-
const existing = series.marker;
|
|
157381
|
-
if ("symbol" in marker && "spPr" in marker) {
|
|
157382
|
-
series.marker = marker;
|
|
157383
|
-
return;
|
|
157384
|
-
}
|
|
157385
|
-
const patch = marker;
|
|
157386
|
-
const next = {
|
|
157387
|
-
symbol: patch.symbol ?? existing?.symbol ?? "circle",
|
|
157388
|
-
size: patch.size ?? existing?.size,
|
|
157389
|
-
spPr: existing?.spPr ? { ...existing.spPr } : void 0
|
|
157390
|
-
};
|
|
157391
|
-
if (patch.fillColor !== void 0) {
|
|
157392
|
-
next.spPr = { ...next.spPr ?? {}, fillColor: patch.fillColor };
|
|
157393
|
-
}
|
|
157394
|
-
series.marker = next;
|
|
157395
|
-
}
|
|
157396
|
-
function setChartSeriesChartType(element, seriesIndex, seriesType) {
|
|
157397
|
-
validateSeriesIndex(element, seriesIndex);
|
|
157398
|
-
const data = element.chartData;
|
|
157399
|
-
data.series[seriesIndex].seriesChartType = seriesType ?? void 0;
|
|
157400
|
-
const effective = new Set(
|
|
157401
|
-
data.series.map((s) => s.seriesChartType ?? data.chartType).filter((t) => t !== "combo")
|
|
157402
|
-
);
|
|
157403
|
-
if (effective.size > 1) {
|
|
157404
|
-
data.chartType = "combo";
|
|
157405
|
-
}
|
|
157406
|
-
}
|
|
157407
|
-
function ensureDataPoint(series, pointIndex) {
|
|
157408
|
-
const points4 = series.dataPoints ??= [];
|
|
157409
|
-
let dp = points4.find((p) => p.idx === pointIndex);
|
|
157410
|
-
if (!dp) {
|
|
157411
|
-
dp = { idx: pointIndex };
|
|
157412
|
-
points4.push(dp);
|
|
157413
|
-
points4.sort((a, b) => a.idx - b.idx);
|
|
157414
|
-
}
|
|
157415
|
-
return dp;
|
|
157416
|
-
}
|
|
157417
|
-
function setChartDataPointFill(element, seriesIndex, pointIndex, color2) {
|
|
157418
|
-
validateSeriesIndex(element, seriesIndex);
|
|
157419
|
-
const series = element.chartData.series[seriesIndex];
|
|
157420
|
-
if (color2 === null) {
|
|
157421
|
-
const dp2 = series.dataPoints?.find((p) => p.idx === pointIndex);
|
|
157422
|
-
if (!dp2) {
|
|
157423
|
-
return;
|
|
157424
|
-
}
|
|
157425
|
-
if (dp2.spPr) {
|
|
157426
|
-
dp2.spPr = { ...dp2.spPr, fillColor: void 0 };
|
|
157427
|
-
if (dp2.spPr.fillColor === void 0 && dp2.spPr.strokeColor === void 0 && dp2.spPr.strokeWidth === void 0 && dp2.spPr.strokeDashStyle === void 0) {
|
|
157428
|
-
dp2.spPr = void 0;
|
|
157429
|
-
}
|
|
157430
|
-
}
|
|
157431
|
-
removeEmptyDataPoint(series, pointIndex);
|
|
157432
|
-
return;
|
|
157433
|
-
}
|
|
157434
|
-
const dp = ensureDataPoint(series, pointIndex);
|
|
157435
|
-
dp.spPr = { ...dp.spPr ?? {}, fillColor: color2 };
|
|
157436
|
-
delete dp.gradientFill;
|
|
157437
|
-
}
|
|
157438
|
-
function setChartDataPointExplosion(element, seriesIndex, pointIndex, explosion) {
|
|
157439
|
-
validateSeriesIndex(element, seriesIndex);
|
|
157440
|
-
const series = element.chartData.series[seriesIndex];
|
|
157441
|
-
if (explosion === null) {
|
|
157442
|
-
const dp2 = series.dataPoints?.find((p) => p.idx === pointIndex);
|
|
157443
|
-
if (dp2) {
|
|
157444
|
-
dp2.explosion = void 0;
|
|
157445
|
-
removeEmptyDataPoint(series, pointIndex);
|
|
157446
|
-
}
|
|
157447
|
-
return;
|
|
157448
|
-
}
|
|
157449
|
-
const dp = ensureDataPoint(series, pointIndex);
|
|
157450
|
-
dp.explosion = explosion;
|
|
157451
|
-
}
|
|
157452
|
-
function setChartDataPointMarker(element, seriesIndex, pointIndex, marker) {
|
|
157453
|
-
validateSeriesIndex(element, seriesIndex);
|
|
157454
|
-
const series = element.chartData.series[seriesIndex];
|
|
157455
|
-
if (marker === null) {
|
|
157456
|
-
const dp2 = series.dataPoints?.find((p) => p.idx === pointIndex);
|
|
157457
|
-
if (dp2) {
|
|
157458
|
-
dp2.marker = void 0;
|
|
157459
|
-
removeEmptyDataPoint(series, pointIndex);
|
|
157460
|
-
}
|
|
157461
|
-
return;
|
|
157462
|
-
}
|
|
157463
|
-
const dp = ensureDataPoint(series, pointIndex);
|
|
157464
|
-
const existing = dp.marker;
|
|
157465
|
-
const next = {
|
|
157466
|
-
symbol: marker.symbol ?? existing?.symbol ?? "circle",
|
|
157467
|
-
size: marker.size ?? existing?.size,
|
|
157468
|
-
spPr: existing?.spPr ? { ...existing.spPr } : void 0
|
|
157469
|
-
};
|
|
157470
|
-
if (marker.fillColor !== void 0) {
|
|
157471
|
-
next.spPr = { ...next.spPr ?? {}, fillColor: marker.fillColor };
|
|
157472
|
-
}
|
|
157473
|
-
dp.marker = next;
|
|
157474
|
-
}
|
|
157475
|
-
function applyLabelEdit(label, edit) {
|
|
157476
|
-
if (edit.showValue !== void 0) {
|
|
157477
|
-
label.showVal = edit.showValue;
|
|
157478
|
-
}
|
|
157479
|
-
if (edit.showCategory !== void 0) {
|
|
157480
|
-
label.showCatName = edit.showCategory;
|
|
157481
|
-
}
|
|
157482
|
-
if (edit.showSeriesName !== void 0) {
|
|
157483
|
-
label.showSerName = edit.showSeriesName;
|
|
157484
|
-
}
|
|
157485
|
-
if (edit.showPercent !== void 0) {
|
|
157486
|
-
label.showPercent = edit.showPercent;
|
|
157487
|
-
}
|
|
157488
|
-
if (edit.showLegendKey !== void 0) {
|
|
157489
|
-
label.showLegendKey = edit.showLegendKey;
|
|
157490
|
-
}
|
|
157491
|
-
if (edit.position !== void 0) {
|
|
157492
|
-
label.position = edit.position;
|
|
157493
|
-
}
|
|
157494
|
-
if (edit.text !== void 0) {
|
|
157495
|
-
label.text = edit.text === "" ? void 0 : edit.text;
|
|
157496
|
-
}
|
|
157497
|
-
if (edit.spPr !== void 0) {
|
|
157498
|
-
label.spPr = edit.spPr === null ? void 0 : { ...label.spPr ?? {}, ...edit.spPr };
|
|
157499
|
-
}
|
|
157500
|
-
if (edit.txPr !== void 0) {
|
|
157501
|
-
label.txPr = edit.txPr === null ? void 0 : { ...label.txPr ?? {}, ...edit.txPr };
|
|
157502
|
-
}
|
|
157503
|
-
}
|
|
157504
|
-
function setChartDataPointLabel(element, seriesIndex, pointIndex, edit) {
|
|
157505
|
-
validateSeriesIndex(element, seriesIndex);
|
|
157506
|
-
const series = element.chartData.series[seriesIndex];
|
|
157507
|
-
if (edit === null) {
|
|
157508
|
-
if (!series.dataLabels) {
|
|
157509
|
-
return;
|
|
157510
|
-
}
|
|
157511
|
-
series.dataLabels = series.dataLabels.filter((l) => l.idx !== pointIndex);
|
|
157512
|
-
if (series.dataLabels.length === 0) {
|
|
157513
|
-
series.dataLabels = void 0;
|
|
157514
|
-
}
|
|
157515
|
-
return;
|
|
157516
|
-
}
|
|
157517
|
-
const labels = series.dataLabels ??= [];
|
|
157518
|
-
let label = labels.find((l) => l.idx === pointIndex);
|
|
157519
|
-
if (!label) {
|
|
157520
|
-
label = { idx: pointIndex };
|
|
157521
|
-
labels.push(label);
|
|
157522
|
-
labels.sort((a, b) => a.idx - b.idx);
|
|
157523
|
-
}
|
|
157524
|
-
applyLabelEdit(label, edit);
|
|
157525
|
-
}
|
|
157526
|
-
function removeEmptyDataPoint(series, pointIndex) {
|
|
157527
|
-
if (!series.dataPoints) {
|
|
157528
|
-
return;
|
|
157529
|
-
}
|
|
157530
|
-
const dp = series.dataPoints.find((p) => p.idx === pointIndex);
|
|
157531
|
-
if (!dp) {
|
|
157532
|
-
return;
|
|
157533
|
-
}
|
|
157534
|
-
const empty = dp.spPr === void 0 && dp.gradientFill === void 0 && dp.explosion === void 0 && dp.invertIfNegative === void 0 && dp.bubble3D === void 0 && dp.marker === void 0;
|
|
157535
|
-
if (empty) {
|
|
157536
|
-
series.dataPoints = series.dataPoints.filter((p) => p.idx !== pointIndex);
|
|
157537
|
-
}
|
|
157538
|
-
}
|
|
158193
|
+
init_chart_operations();
|
|
157539
158194
|
|
|
157540
158195
|
// src/pptx/core/builders/sdk/chart-formatting-operations.ts
|
|
158196
|
+
init_chart_operations();
|
|
157541
158197
|
function setChartDataPointStyle(element, seriesIndex, pointIndex, style) {
|
|
157542
158198
|
validateSeriesIndex(element, seriesIndex);
|
|
157543
158199
|
const series = element.chartData.series[seriesIndex];
|
|
@@ -157577,6 +158233,7 @@ function setChartColorMapOverride(element, overrides28) {
|
|
|
157577
158233
|
|
|
157578
158234
|
// src/pptx/core/builders/sdk/chart-gradient-operations.ts
|
|
157579
158235
|
init_chart_gradient_input();
|
|
158236
|
+
init_chart_operations();
|
|
157580
158237
|
function seriesChartType(element, seriesIndex) {
|
|
157581
158238
|
const data = element.chartData;
|
|
157582
158239
|
return data.series[seriesIndex].seriesChartType ?? data.chartType;
|
|
@@ -157617,6 +158274,7 @@ function setChartDataPointGradient(element, seriesIndex, pointIndex, gradient) {
|
|
|
157617
158274
|
|
|
157618
158275
|
// src/pptx/core/builders/sdk/index.ts
|
|
157619
158276
|
init_chart_gradient_input();
|
|
158277
|
+
init_chart_layout_operations();
|
|
157620
158278
|
|
|
157621
158279
|
// src/pptx/core/builders/sdk/chart-user-shape-operations.ts
|
|
157622
158280
|
function ensureChartData2(element) {
|
|
@@ -159434,6 +160092,53 @@ var ChartBuilder = class _ChartBuilder {
|
|
|
159434
160092
|
this._input.grouping = mode;
|
|
159435
160093
|
return this;
|
|
159436
160094
|
}
|
|
160095
|
+
// -- Spacing, geometry and areas (validated by build()) -----------------
|
|
160096
|
+
/** Gap between bar clusters, % of bar width (`c:gapWidth`, 0..500). Bar, bar3D, ofPie. */
|
|
160097
|
+
gapWidth(percent) {
|
|
160098
|
+
this._input.gapWidth = percent;
|
|
160099
|
+
return this;
|
|
160100
|
+
}
|
|
160101
|
+
/** Overlap of bars within a cluster, % (`c:overlap`, -100..100). 2-D bar only. */
|
|
160102
|
+
overlap(percent) {
|
|
160103
|
+
this._input.overlap = percent;
|
|
160104
|
+
return this;
|
|
160105
|
+
}
|
|
160106
|
+
/** Angle of the first slice, degrees clockwise from 12 o'clock (`c:firstSliceAng`, 0..360). */
|
|
160107
|
+
firstSliceAngle(degrees) {
|
|
160108
|
+
this._input.firstSliceAngle = degrees;
|
|
160109
|
+
return this;
|
|
160110
|
+
}
|
|
160111
|
+
/** Doughnut hole size, % of the diameter (`c:holeSize`, 1..90). */
|
|
160112
|
+
holeSize(percent) {
|
|
160113
|
+
this._input.holeSize = percent;
|
|
160114
|
+
return this;
|
|
160115
|
+
}
|
|
160116
|
+
/**
|
|
160117
|
+
* Chart-area fill, border and rounded corners.
|
|
160118
|
+
*
|
|
160119
|
+
* @example
|
|
160120
|
+
* ```ts
|
|
160121
|
+
* builder.chartArea({ fill: "none", border: "none", roundedCorners: false });
|
|
160122
|
+
* ```
|
|
160123
|
+
*/
|
|
160124
|
+
chartArea(format) {
|
|
160125
|
+
this._input.chartArea = format;
|
|
160126
|
+
return this;
|
|
160127
|
+
}
|
|
160128
|
+
/** Plot-area fill and border. */
|
|
160129
|
+
plotArea(format) {
|
|
160130
|
+
this._input.plotArea = format;
|
|
160131
|
+
return this;
|
|
160132
|
+
}
|
|
160133
|
+
/**
|
|
160134
|
+
* Edit an axis, e.g. `.axis("catAx", { visible: false })` to hide it.
|
|
160135
|
+
* Merges with earlier edits of the same axis.
|
|
160136
|
+
*/
|
|
160137
|
+
axis(axisType, edit) {
|
|
160138
|
+
const axes = this._input.axes ??= {};
|
|
160139
|
+
axes[axisType] = { ...axes[axisType], ...edit };
|
|
160140
|
+
return this;
|
|
160141
|
+
}
|
|
159437
160142
|
// -- Build --------------------------------------------------------------
|
|
159438
160143
|
/**
|
|
159439
160144
|
* Build the final {@link ChartPptxElement}.
|
|
@@ -170977,6 +171682,9 @@ function cssColorSafe(value) {
|
|
|
170977
171682
|
}
|
|
170978
171683
|
return void 0;
|
|
170979
171684
|
}
|
|
171685
|
+
function cssBorderPx(width) {
|
|
171686
|
+
return Math.max(1, Math.round(width));
|
|
171687
|
+
}
|
|
170980
171688
|
function cssFontFamilySafe(value) {
|
|
170981
171689
|
if (typeof value !== "string") {
|
|
170982
171690
|
return void 0;
|
|
@@ -171104,19 +171812,19 @@ ${htmlRows.join("\n")}
|
|
|
171104
171812
|
const edges = [];
|
|
171105
171813
|
const topColor = cssColorSafe(style.borderTopColor);
|
|
171106
171814
|
if (style.borderTopWidth && topColor) {
|
|
171107
|
-
edges.push(`border-top:${
|
|
171815
|
+
edges.push(`border-top:${cssBorderPx(style.borderTopWidth)}px solid ${topColor}`);
|
|
171108
171816
|
}
|
|
171109
171817
|
const bottomColor = cssColorSafe(style.borderBottomColor);
|
|
171110
171818
|
if (style.borderBottomWidth && bottomColor) {
|
|
171111
|
-
edges.push(`border-bottom:${
|
|
171819
|
+
edges.push(`border-bottom:${cssBorderPx(style.borderBottomWidth)}px solid ${bottomColor}`);
|
|
171112
171820
|
}
|
|
171113
171821
|
const leftColor = cssColorSafe(style.borderLeftColor);
|
|
171114
171822
|
if (style.borderLeftWidth && leftColor) {
|
|
171115
|
-
edges.push(`border-left:${
|
|
171823
|
+
edges.push(`border-left:${cssBorderPx(style.borderLeftWidth)}px solid ${leftColor}`);
|
|
171116
171824
|
}
|
|
171117
171825
|
const rightColor = cssColorSafe(style.borderRightColor);
|
|
171118
171826
|
if (style.borderRightWidth && rightColor) {
|
|
171119
|
-
edges.push(`border-right:${
|
|
171827
|
+
edges.push(`border-right:${cssBorderPx(style.borderRightWidth)}px solid ${rightColor}`);
|
|
171120
171828
|
}
|
|
171121
171829
|
const fallback = cssColorSafe(style.borderColor);
|
|
171122
171830
|
if (edges.length === 0 && fallback) {
|
|
@@ -171136,7 +171844,7 @@ ${htmlRows.join("\n")}
|
|
|
171136
171844
|
if (t === 0 && r === 0 && b === 0 && l === 0) {
|
|
171137
171845
|
return "";
|
|
171138
171846
|
}
|
|
171139
|
-
return `padding:${t}px ${r}px ${b}px ${l}px`;
|
|
171847
|
+
return `padding:${Math.round(t)}px ${Math.round(r)}px ${Math.round(b)}px ${Math.round(l)}px`;
|
|
171140
171848
|
}
|
|
171141
171849
|
/**
|
|
171142
171850
|
* Renders cell content as HTML spans preserving per-run styling
|
|
@@ -173354,4 +174062,4 @@ init_element_paragraph_geometry();
|
|
|
173354
174062
|
* `<p:extLst>` (optional)
|
|
173355
174063
|
*/
|
|
173356
174064
|
|
|
173357
|
-
export { ALL_ANIMATION_PRESETS, ARABIC_ABJADI_LETTERS, ARABIC_HIJAI_LETTERS, BLIP_FILL_ORDER, CLOUD_CALLOUT_TAIL_COUNT, CLOUD_LOBE_COUNT, COLOR_MAP_ALIAS_KEYS, CONNECTOR_ARROW_OPTIONS, CONNECTOR_GEOMETRY_OPTIONS, ChartBuilder, ConnectorBuilder, ConnectorXmlFactory, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_COLOR_MAP, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_MAX_UNCOMPRESSED_BYTES, DEFAULT_POWERPOINT_TABLE_STYLE_ID, DEFAULT_SCHEME_COLOR_MAP, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, DIGEST_ALGORITHM_TO_HASH, DIGEST_ALGORITHM_TO_WEB_CRYPTO, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, DIGITAL_SIGNATURE_REL_TYPE, DataIntegrityError, DocumentConverter, EFFECT_LST_ORDER, ELEMENT_FIELD_KIND, ELEMENT_PARAGRAPH_GEOMETRY_KEYS, EMPHASIS_PRESETS, EMPTY_CONSTRAINT_INDEX, EMU_PER_INCH, EMU_PER_PIXEL, EMU_PER_POINT, EMU_PER_PX, ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, ENTERPRISE_REQUIRE_REVOCATION_ENV, ENTERPRISE_REQUIRE_TIMESTAMP_ENV, ENTERPRISE_TRUST_ROOTS_FILE_ENV, ENTERPRISE_TRUST_ROOTS_PEM_ENV, ENTRANCE_PRESETS, EXIT_PRESETS, EncryptedFileError, EncryptedPptError, FONT_SUBSTITUTION_MAP, FreeformPathBuilder, GroupBuilder, HEBREW_LETTERS, HINDI_CONSONANTS, HINDI_VOWELS, ImageBuilder, IncorrectPasswordError, MAX_SHAPE_ID, MAX_TABLE_DIMENSION, MAX_ZIP_ENTRY_COUNT, MIN_ELEMENT_SIZE, MIN_TABLE_DIMENSION, MOTION_PATH_PRESETS, MediaBuilder, MediaContext, MediaGraphicFrameXmlFactory, OOXML_ANGLE_UNITS_PER_DEGREE, OOXML_PERCENT_UNITS, OOXML_TO_PRESET_EMPH, OOXML_TO_PRESET_ENTR, OOXML_TO_PRESET_EXIT, OPC_RELATIONSHIP_TRANSFORM, OPENXML_COVERAGE, OPENXML_SCHEMA_CONSTRUCT_IDS, OPENXML_STRICT_SCHEMA_CONSTRUCT_IDS, OPENXML_TRANSITIONAL_SCHEMA_CONSTRUCT_IDS, Ole2ParseError, P14_GUIDE_URI, P15_GUIDE_URI, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, POWERPOINT_PRESENCE_KEY, PPTX_JSON_FILE_EXTENSION, PPTX_JSON_FORMAT, PPTX_JSON_MIME_TYPE, PPTX_JSON_VERSION, PPTX_VIEWER_MANIFEST_NS, PRESENTATION_CHILD_ORDER, PRESENTATION_FIELD_KEYS, PRESENTATION_FIELD_NAMES, PRESET_COLOR_MAP, PRESET_GEOMETRY_ALIASES, PRESET_SHAPE_CATEGORY_LABELS, PRESET_SHAPE_CLIP_PATHS, PRESET_SHAPE_DEFINITIONS, PRESET_SHAPE_GEOMETRY_TABLE, PRESET_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime101 as PptxHandlerRuntime, PptxHandlerRuntimeFactory, PptxJsonConverter, PptxJsonFormatError, PptxLoadDataBuilder, PptxMarkdownConverter, PptxMediaDataParser, PptxNativeAnimationService, PptxPresentationSaveBuilder, PptxPresentationSlidesReconciler, PptxRuntimeDependencyFactory, PptxSaveConstantsFactory, PptxSaveState as PptxSaveSession, PptxSaveStateBuilder as PptxSaveSessionBuilder, PptxSaveState, PptxSaveStateBuilder, PptxShapeIdValidator, PptxShapeStyleExtractor, PptxSlideBackgroundBuilder, PptxSlideBuilder, PptxSlideCommentPartWriter, PptxSlideCommentsXmlFactory, PptxSlideElementsBuilder, PptxSlideLoaderService, PptxSlideMediaRelationshipBuilder, PptxSlideNotesBuilder, PptxSlideNotesPartUpdater, PptxSlideRelationshipRegistry, PptxSlideTransitionService, PptxTableDataParser, PptxTemplateBackgroundService, PptxXmlBuilder, PptxXmlFactoryProvider, PptxXmlLookupService, Presentation, PresentationBuilder, RasterCanvas, SHAPE_TREE_ELEMENT_TAGS, SLIDE_FIELD_KIND, SMART_ART_DEFINITION_PARTS, SP_PR_ORDER2 as SP_PR_ORDER, STROKE_DASH_OPTIONS, ST_SHAPE_TYPE_VALUES, SUPPORTED_XML_CANON_TRANSFORMS, SWITCHABLE_LAYOUT_TYPES, SYSTEM_COLOR_MAP, ShapeBuilder, SlideBuilder, SlideProcessor, SlideSizes, SvgExporter, TABLE_STYLE_PART_SEQUENCE, TC_PR_BORDERS_ORDER, TEXT_AUTONUMBER_SCHEMES, TEXT_ORIENTATION_IDENTITY, THAI_CONSONANTS, THEME_COLOR_PALETTE_COLUMNS, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TRANSITION_PATTERN_OPTIONS, TRANSITION_THRUBLK_TYPES, TRANSITION_VALID_DIRECTIONS, TableBuilder, TextBuilder, TextShapeXmlFactory, ThemePresets, VML_SHAPE_TAGS, WHITESPACE_PRESERVING_TAGS, XMLDSIG_NS, XML_TRANSFORM_ENVELOPED_SIGNATURE, ZipBombError, addChartCategory, addChartSeries, addChartUserShape, addChartUserShapeGroupChild, addSection, addSmartArtNode, addSmartArtNodeAsChild, addTableStyleToMap, algorithmParam, alphaLabel, applyActiveXControlsToSlide, applyAfterAnimationBehavior, applyBubbleChartOptions, applyChartLayouts, applyChartManualLayout, applyChartUpDownBars, applyConnectorShapeIds, applyCustomGeometryGuideOverrides, applyCustomLayoutOverrides, applyCustomShows, applyDiagramRelationshipIds, applyDrawingColorTransforms, applyDrawingLineDash, applyDrawingMediaReference, applyImportedPptxData, applyKinsokuToXml, applyOleDocumentParagraphEdit, applyOleNestedDeckBytes, applyOleNestedDeckElementTextEdit, applyOleSheetCellEdit, applySections, applySmartArtConstraintRules, applySmartArtLayoutDefinition, applySmartArtQuickStyle3d, applySmartArtRoleColors, applySoundToEffectCTn, applyTableCellTextAndStyle, applyTemplate, applyThemeOverrideToSlide, applyThemeToData, areNamespacesSupported, arrangeComposite2 as arrangeComposite, arrangeConn, arrangeCycle2 as arrangeCycle, arrangeHierarchy, arrangeLinear2 as arrangeLinear, arrangePyramid, arrangeSnake2 as arrangeSnake, arrangeSpacer, arrangeText, bijectiveLabel, breakAutoNumberRun, buildActiveXControlNode, buildBlankPresentationArchive, buildCalloutLeaderLineSvgPath, buildClrMapOverrideXml, buildConstraintIndex, buildCustomGeometryPathsFromNodes, buildFontFamilyString, buildForest, buildGuideListExtension, buildInkMlContent, buildLinkedTextBoxChains, buildOle2, buildPptxJsonDocument, buildSingleEffectNode, buildSlideReferenceRemap, buildSmartArtColorLists, buildSmartArtColorRoleMap, buildSrgbColorChoice, buildThemeColorMap, buildTree, capturedPresetIds, capturedPresetNativeAnimation, capturedSubtypes, catmullRomToBezier, chartDataAddCategory, chartDataAddSeries, chartDataChangeType, chartDataRemoveCategory, chartDataRemoveSeries, chartDataUpdatePoint, checkBlankSlide, checkComplexTables, checkDuplicateTitles, checkLowContrast, checkMissingAltText, checkMissingSlideTitle, checkPresentation, chevronPoints, chooseAlgType, circleNode, clampByRules, clampUnitInterval, classifyPanose, cloneElement, cloneShapeStyle, cloneSlide, cloneTemplateElementsBySlideId, cloneTextStyle, cloneXmlObject, cm, cmToEmu, collectLayoutNames, collectMasterNames, colorWithOpacity, colorsEqual, colour, combineShapes, computeContrastRatio, computeDetailStatus, computeDigestBase64 as computeDigestBase64WebCrypto, computeSmartArtElementsWithoutCache, computeVerificationStatus, containsConvertibleStrictNamespaceAttribute, convertPptToPptx, convertXmlToStrict, createArrayBufferCopy, createAutoNumberSequence, createBuiltinVariables, createChartElement, createConnectorElement, createDefaultPptxHandlerRuntime, createDrawingObjectId, createEditorId, createFreeformElement, createGroupElement, createImageElement, createLayout, createLayouts, createMediaElement, createModifyVerifier, createPptxSaveConstants, createSaltlessModifyVerifierForTesting, createShapeElement, createTableCellXml, createTableElement, createTableGraphicFrameRawXml, createTableStyleEntry, createTemplateConnectorRawXml, createTemplateShapeRawXml, createTextElement, createUniformTextSegments, cropShapeForPresetGeometry, cssDegreesToOoxmlGradientAngle, customGeometryPathsToSvgSubpaths, dataUrlToMediaBytes, decodeOle10Native, decodePngDimensions, decodePptxJsonText, decodeXmlEntities, decomposeSmartArt, decryptPptx, deepCloneData, deleteLayout, deleteSlideMaster, deleteTableStyleFromMap, demoteSmartArtNode, deobfuscateFont, deriveOutputPath, deriveSlideTitle, deriveSlideTitles, deserializePptxFromJson, detectDigitalSignatures, detectFileFormat, detectFontFormat, detectOleObjectType, detectOlePayloadEditorKind, detectStrictConformance, diffPresentations, diffSlides, discoverArrangement, distributeSegmentsAcrossChain, douglasPeucker, duplicateElement, duplicateLayout, duplicateSlide, duplicateSlideMaster, elementActionToPptxAction, elementHasAction, emuToPixels, encodeCompressedPng, encodeOle10Native, encodePng, encodeXmlAttributeValue, encodeXmlTextValue, encryptPptx, ensureArrayValue, ensureXmlChild, escapeXmlAttr, escapeXmlText, estimateMediaDurationMs, estimateTextBoxCapacity, evaluateCustomGeometryPathData, evaluateCustomGeometryPaths, evaluateGeometryPaths, evaluateGuides, evaluatePresetShape, extractAfterAnimationFromSubTnLst, extractAllTagText, extractColorChoiceXml, extractFirstTagText, extractGraphicBuilds, extractGuidFromPartName, extractModel3DTransform, extractStyleReferenceColorXml, extractTableCellTextRuns, extractTagAttribute, fetchUrlToBytes, filterValidShapeAdjustmentEntries, findCnvPrNode, findConstraint, findCustomShow, findLayoutByName, findLayoutByType, findOpenXmlCoverage, findPlaceholders, findText, fitFontSize, flattenChartUserShapes, flattenNodes, formatAutoNumberMarker, formatCommentTimestamp, formatScriptAutoNumber, fragmentShapes, gearPoints, generateFontGuid, generateLayoutXml, generateMediaFilename, generateTableStyleGuid, getAdjustmentAwareClipPath, getAdjustmentAwareShapeClipPath, getAnimationPresetInfo, getCalloutLeaderLineGeometry, getCalloutTier, getCalloutViewBoxBounds, getCapturedPreset, getCapturedTree, getChartUserShapeAtPath, getCloudCalloutClipPath, getCloudClipPath, getCloudPathForRendering, getCommentMarkerPosition, getConnectorAdjustment, getConnectorPathGeometry, getCssBorderDashStyle, getCustomShowNames, getCustomShowPositionLabel, getDirectory, getElementLabel, getElementOrientationMatrix, getElementTextContent, getElementTransform, getImageMaskStyle, getLinkedTextBoxSegments, getNativeAnimationPresetMetadata, getOleDocumentParagraphs, getOleNestedDeckBytes, getOleNestedDeckDetail, getOleObjectTypeLabel, getOleSheetGrid, getPanoseWeight, getPresetConnectionSites, getPresetShapeClipPath, getPresetTextRect, getPresetsByCategory, getRoundRectRadiusPx, getSectionForSlide, getSectionSlideRange, getShapeClipPath, getShapeClipPathFromPreset, getShapeType, getSignaturePathsToStrip, getSubstituteFontFamily, getSubstituteFonts, getSupportedNamespaces, getSvgStrokeDasharray, getTextCompensationTransform, getThemePreset, getZoomElements, getZoomTargetSlideIndexes, groupElements, guidToKey, guideEmuToPx, guidePxToEmu, hasDirectSubstitution, hasNonTrivialOverride, hasReference, hasShapeProperties, hasTextProperties, hebrewAlphaLabel, hexToRgbChannels, hslToRgb, inches, inchesToEmu, inferOleExtensionFromTarget, inheritedPlaceholderFieldType, inkBounds, inkElementToStrokes, inkLengthToPx, inkPointMapper, insertLayout, insertSlideMaster, interpolateShapeGeometry, interpretSmartArtLayout, interpretedLayoutToElements, intersectPolygons, intersectShapes, intersectSvgPaths, isAlternateContentChoiceSupported, isAlternateContentChoiceXmlSupported, isCalloutShape, isConnectorElement, isDefaultSmartArtLabelScene, isEditableTextElement, isEncryptedLegacyPpt, isHeaderFooterPlaceholder, isImageLikeElement, isInkElement, isLegacyPpt, isNamespaceSupported, isOle2CompoundFile, isParetoChartData, isPptxJsonText, isShapeElement, isStShapeType, isStrictNamespaceUri, isSummaryZoomSlide, isSwitchableLayoutType, isTemplateElement, isTemplateElementId, isTextElement, isTextOrientationMatrix, isThemeColorSchemeName, isTransitionalNamespaceUri, isValidBase64, isXmlNode, isZoomElement, isZoomElement2 as isZoomElementUtil, itemNode, listChartUserShapes, listUnassessedOpenXmlCoverage, lookupPresetConnectionSites, lookupPresetShape, lookupPresetTextRectOverride, mailMerge, makeStoreAwareId, mergeNativeSoundIntoEditorAnimations, mergePresentation, mergeShapes, mergeStyleParts, mergeThemeColorOverride, mimeTypeForOleFile, mm, moveSlidesToSection, multiplyTextOrientationMatrices, navigateCustomShow, nextAutoNumber, nodeFill, nodeOpacity, nodeStroke, nodeTextStyle, normalizeHexColor, normalizeNamespaceUri, normalizePartPath, normalizePath, normalizePositiveFixedAngleDegrees, normalizeStShapeType, normalizeStrictXml, normalizeStrokeDashType, normalizeTableStyleGuid, numericParam, obfuscateFont, oleBytesToDataUrl, oleObjectTypeToGlyph, ooxmlArcToSvg, ooxmlGradientAngleToCssDegrees, ooxmlToPresetName, orderedXmlKey, parseActiveXControlsFromSlide, parseAdjustmentValues, parseAnimEffectFilter, parseBodyPrBooleanAttrs, parseBubbleChartOptions, parseChart3DSurfaces, parseChartAxes, parseChartDataLabelOptions, parseChartLayouts, parseChartManualLayout, parseChartUpDownBars, parseCondition2 as parseCondition, parseConditionList, parseCustomShows, parseCxChartSeries, parseDataTable, parseDataUrlToBytes, parseDiagramRelationshipIds, parseDrawingColor, parseDrawingColorChoice, parseDrawingColorOpacity, parseDrawingFraction, parseDrawingHueDegrees, parseDrawingLineDash, parseDrawingMediaReference, parseDrawingPercent, parseEmbeddedXlsx, parseFilterToken, parseGuideDefinitions, parseHexColor, parseInkMlContent, parseKinsoku, parseLineStyle, parseMarker, parseModel3DScene, parseOle2, parseOoxmlPercent, parsePanoseBytes, parsePanoseString, parsePptxJson, parsePptxJsonDocument, parsePresentationDrawingGuides, parsePresentationSmartTags, parseSeriesDataLabels, parseSeriesDataPoints, parseSeriesErrBars, parseSeriesExplosion, parseSeriesTrendlines, parseShapeId, parseShapeProps, parseSignatureXml, parseSlideDrawingGuides, parseSmartArtColorListHexes, parseSmartArtColorStyleLabels, parseSmartArtConstraintRules, parseSmartArtDefinitionHeaderList, parseSmartArtDefinitionMetadata, parseSmartArtLayoutDefinition, parseSmartArtPointCustomLayout, parseSmartArtQuickStyleLabels, parseSmartArtStyleLabelRefs, parseStructuredCustomGeometry, parseSvgPath, parseTimeTargetElement, parseVmlElement, parseVmlElements, pixelsToEmu, polygonNode, polygonsToSvgPath, positiveFixedAngleAttribute, pptxActionToElementAction, pptxDataFromJsonDocument, preservesSpreadsheetXmlWhitespace, preservesXmlWhitespace, presetGeometryForCropShape, promoteSmartArtNode, pt, ratioConstraint, reResolveElementColors, reResolveElementFonts, reResolveSlideColors, reResolveSlideFonts, readFileAsDataUrl, readOleDocParagraphs, readOleDocumentParagraphs, readOleNestedDeckDetail, readOleNestedDeckFirstSlideTextLines, readOleSheetGrid, readOleXlsGrid, reapplyAlternateContentToTree, reassignDescendantIds, rebuildTableStructureInRawXml, reconcileAnimationTargets, rectNode, reflowSmartArtLayout, regenerateSmartArtDrawingShapes, relativeLuminance, relayoutSmartArt, remapEditorAnimationsToShapeIds, remapElementShapeIds, remapShapeIdReferences, removeChartCategory, removeChartSeries, removeChartUserShape, removeChartUserShapeAtPath, removeSection, removeSmartArtNode, renameLayout, renameSlideMaster, renderOleDeckPreviewPng, renderOleDocumentPreviewPng, renderOleIconPng, renderOleSheetPreviewPng, reorderObjectKeys, reorderObjectKeysByLocalName, reorderSections, reorderSmartArtNode, reorderSmartArtNodeToIndex, repairPptx, repeatedLabel, replaceOleEmbedding, replaceOleFile, replaceShapeGeometry, replaceText, replaceTextInSlide, replaceWithCustomGeometry, resetCloneIdCounter, resetDecomposeCounter, resetIdCounter, resetSectionIdCounter, resetSmartArtEditCounter, resolveConnectorShapeIds, resolveConstraint, resolveConstraintDeclaredBy, resolveCoordinate, resolveCustomGeometryGuideContext, resolveCustomGeometryToken, resolveCustomShowSlideIndices, resolveDirectionSubtype, resolveDisplayedChartTypeName, resolveFlowDirection, resolveLayoutDisplayName, resolveModel3DMimeType, resolveModifyVerifierAlgorithmName, resolveOleEditorKindFromPayload, resolveOoxmlPresetMapping, resolveRatioConstraint, resolveReferenceUriToPart, resolveSmartArtEffectIntensity, resolveSmartArtNodeCoherent3DOff, resolveSmartArtNodeStyleRoles, resolveTableCellStyle, resolveThemeColorRef, rgb, rgbToHsl, roleOf, romanNumeral, sampleFirstPixelColorFromBytes, selectAlternateContentBranch, selectArrangedNodes, serializeColorChoice, serializeColorChoiceWithRef, serializeCondition, serializeConditionList, serializeGraphicBuild, serializePptxToJson, serializeSmartArtDefinitionHeaderList, serializeSvgPath, serializeTimeTargetElement, setChartAxis, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategories, setChartColorMapOverride, setChartDataLabels, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointGradient, setChartDataPointLabel, setChartDataPointMarker, setChartDataPointStyle, setChartGrouping, setChartHelperLine, setChartLegend, setChartSeriesChartType, setChartSeriesColor, setChartSeriesErrorBars, setChartSeriesGradient, setChartSeriesMarker, setChartSeriesTrendline, setChartTitle, setChartType, setElementLocked, setOleObjectName, setSmartArtNodeStyle, shadowOffsetToDistanceAndDirection, shouldRenderFallbackLabel, shouldReturnToZoomSlide, smartArtQuickStyleHas3d, stripParentDirSegments, stripXmlOrderSuffix, strokeFor, styleContext, styleShadow, styleStroke, subtractPolygons, subtractShapes, subtractSvgPaths, summarizeOpenXmlCoverage, summarizeOpenXmlCoverageByVocabulary, svgPathToPolygons, switchSmartArtLayout, syncPictureShapeTypeWithCropShape, themeColorRefFromColorChoice, themeColorRefFromSchemeClr, themeColorRefToSolidFill, themeColorRefToSolidFillWithOpacity, themeColorRefToXml, themeColorSchemesEqual, timingCurveToAccelDecel, toArabicAbjadNumeral, toChartGradientFill, toChineseNumeral, toCjkDigitString, toDevanagariDigits, toEa1ChsNumeral, toEa1ChtNumeral, toFullWidthDigits, toHebrewNumeral, toHex, toStrictNamespaceUri, toThaiDigits, treeDepth, treeWidth, truncate, ungroupElements, unionPolygons, unionShapes, unionSvgPaths, uniqueDisplayName, uniquePrefixedName, unwrapAlternateContent, unwrapOleEmbedding, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateChartDataPoint, updateChartSeriesValues, updateChartUserShape, updateChartUserShapeAtPath, updateMergeAttrsInRawXml, updateSmartArtNodeText, validatePptx, validateSmartArtColorStyleLabels, validateSmartArtConstraintRules, validateSmartArtDefinitionHeaderList, validateSmartArtDefinitionMetadata, validateSmartArtLayoutDefinition, verifyModifyPassword, verifyPassword, verifySignatureDigests, visitXmlObjects, withThemePlaceholderColor, writeBodyPrBooleanAttrs, writeOleDocParagraphEdit, writeOleDocumentParagraphEdit, writeOleNestedDeckElementText, writeOleSheetCellEdit, writeOleXlsNumericCellEdit, writeOleXlsStringCellEdit, xmlAttr, xmlAttrBool, xmlAttrNumber, xmlChild, xmlChildren, xmlPath, xmlText, zlibDeflate };
|
|
174065
|
+
export { ALL_ANIMATION_PRESETS, ARABIC_ABJADI_LETTERS, ARABIC_HIJAI_LETTERS, BLIP_FILL_ORDER, CLOUD_CALLOUT_TAIL_COUNT, CLOUD_LOBE_COUNT, COLOR_MAP_ALIAS_KEYS, CONNECTOR_ARROW_OPTIONS, CONNECTOR_GEOMETRY_OPTIONS, ChartBuilder, ConnectorBuilder, ConnectorXmlFactory, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_COLOR_MAP, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_MAX_UNCOMPRESSED_BYTES, DEFAULT_POWERPOINT_TABLE_STYLE_ID, DEFAULT_SCHEME_COLOR_MAP, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, DIGEST_ALGORITHM_TO_HASH, DIGEST_ALGORITHM_TO_WEB_CRYPTO, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, DIGITAL_SIGNATURE_REL_TYPE, DataIntegrityError, DocumentConverter, EFFECT_LST_ORDER, ELEMENT_FIELD_KIND, ELEMENT_PARAGRAPH_GEOMETRY_KEYS, EMPHASIS_PRESETS, EMPTY_CONSTRAINT_INDEX, EMU_PER_INCH, EMU_PER_PIXEL, EMU_PER_POINT, EMU_PER_PX, ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, ENTERPRISE_REQUIRE_REVOCATION_ENV, ENTERPRISE_REQUIRE_TIMESTAMP_ENV, ENTERPRISE_TRUST_ROOTS_FILE_ENV, ENTERPRISE_TRUST_ROOTS_PEM_ENV, ENTRANCE_PRESETS, EXIT_PRESETS, EncryptedFileError, EncryptedPptError, FONT_SUBSTITUTION_MAP, FreeformPathBuilder, GroupBuilder, HEBREW_LETTERS, HINDI_CONSONANTS, HINDI_VOWELS, ImageBuilder, IncorrectPasswordError, MAX_SHAPE_ID, MAX_TABLE_DIMENSION, MAX_ZIP_ENTRY_COUNT, MIN_ELEMENT_SIZE, MIN_TABLE_DIMENSION, MOTION_PATH_PRESETS, MediaBuilder, MediaContext, MediaGraphicFrameXmlFactory, OOXML_ANGLE_UNITS_PER_DEGREE, OOXML_PERCENT_UNITS, OOXML_TO_PRESET_EMPH, OOXML_TO_PRESET_ENTR, OOXML_TO_PRESET_EXIT, OPC_RELATIONSHIP_TRANSFORM, OPENXML_COVERAGE, OPENXML_SCHEMA_CONSTRUCT_IDS, OPENXML_STRICT_SCHEMA_CONSTRUCT_IDS, OPENXML_TRANSITIONAL_SCHEMA_CONSTRUCT_IDS, Ole2ParseError, P14_GUIDE_URI, P15_GUIDE_URI, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, POWERPOINT_PRESENCE_KEY, PPTX_JSON_FILE_EXTENSION, PPTX_JSON_FORMAT, PPTX_JSON_MIME_TYPE, PPTX_JSON_VERSION, PPTX_VIEWER_MANIFEST_NS, PRESENTATION_CHILD_ORDER, PRESENTATION_FIELD_KEYS, PRESENTATION_FIELD_NAMES, PRESET_COLOR_MAP, PRESET_GEOMETRY_ALIASES, PRESET_SHAPE_CATEGORY_LABELS, PRESET_SHAPE_CLIP_PATHS, PRESET_SHAPE_DEFINITIONS, PRESET_SHAPE_GEOMETRY_TABLE, PRESET_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime101 as PptxHandlerRuntime, PptxHandlerRuntimeFactory, PptxJsonConverter, PptxJsonFormatError, PptxLoadDataBuilder, PptxMarkdownConverter, PptxMediaDataParser, PptxNativeAnimationService, PptxPresentationSaveBuilder, PptxPresentationSlidesReconciler, PptxRuntimeDependencyFactory, PptxSaveConstantsFactory, PptxSaveState as PptxSaveSession, PptxSaveStateBuilder as PptxSaveSessionBuilder, PptxSaveState, PptxSaveStateBuilder, PptxShapeIdValidator, PptxShapeStyleExtractor, PptxSlideBackgroundBuilder, PptxSlideBuilder, PptxSlideCommentPartWriter, PptxSlideCommentsXmlFactory, PptxSlideElementsBuilder, PptxSlideLoaderService, PptxSlideMediaRelationshipBuilder, PptxSlideNotesBuilder, PptxSlideNotesPartUpdater, PptxSlideRelationshipRegistry, PptxSlideTransitionService, PptxTableDataParser, PptxTemplateBackgroundService, PptxXmlBuilder, PptxXmlFactoryProvider, PptxXmlLookupService, Presentation, PresentationBuilder, RasterCanvas, SHAPE_TREE_ELEMENT_TAGS, SLIDE_FIELD_KIND, SMART_ART_DEFINITION_PARTS, SP_PR_ORDER2 as SP_PR_ORDER, STROKE_DASH_OPTIONS, ST_SHAPE_TYPE_VALUES, SUPPORTED_XML_CANON_TRANSFORMS, SWITCHABLE_LAYOUT_TYPES, SYSTEM_COLOR_MAP, ShapeBuilder, SlideBuilder, SlideProcessor, SlideSizes, SvgExporter, TABLE_STYLE_PART_SEQUENCE, TC_PR_BORDERS_ORDER, TEXT_AUTONUMBER_SCHEMES, TEXT_ORIENTATION_IDENTITY, THAI_CONSONANTS, THEME_COLOR_PALETTE_COLUMNS, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TRANSITION_PATTERN_OPTIONS, TRANSITION_THRUBLK_TYPES, TRANSITION_VALID_DIRECTIONS, TableBuilder, TextBuilder, TextShapeXmlFactory, ThemePresets, VML_SHAPE_TAGS, WHITESPACE_PRESERVING_TAGS, XMLDSIG_NS, XML_TRANSFORM_ENVELOPED_SIGNATURE, ZipBombError, addChartCategory, addChartSeries, addChartUserShape, addChartUserShapeGroupChild, addSection, addSmartArtNode, addSmartArtNodeAsChild, addTableStyleToMap, algorithmParam, alphaLabel, applyActiveXControlsToSlide, applyAfterAnimationBehavior, applyBubbleChartOptions, applyChartLayouts, applyChartManualLayout, applyChartUpDownBars, applyConnectorShapeIds, applyCustomGeometryGuideOverrides, applyCustomLayoutOverrides, applyCustomShows, applyDiagramRelationshipIds, applyDrawingColorTransforms, applyDrawingLineDash, applyDrawingMediaReference, applyImportedPptxData, applyKinsokuToXml, applyOleDocumentParagraphEdit, applyOleNestedDeckBytes, applyOleNestedDeckElementTextEdit, applyOleSheetCellEdit, applySections, applySmartArtConstraintRules, applySmartArtLayoutDefinition, applySmartArtQuickStyle3d, applySmartArtRoleColors, applySoundToEffectCTn, applyTableCellTextAndStyle, applyTemplate, applyThemeOverrideToSlide, applyThemeToData, areNamespacesSupported, arrangeComposite2 as arrangeComposite, arrangeConn, arrangeCycle2 as arrangeCycle, arrangeHierarchy, arrangeLinear2 as arrangeLinear, arrangePyramid, arrangeSnake2 as arrangeSnake, arrangeSpacer, arrangeText, bijectiveLabel, breakAutoNumberRun, buildActiveXControlNode, buildBlankPresentationArchive, buildCalloutLeaderLineSvgPath, buildClrMapOverrideXml, buildConstraintIndex, buildCustomGeometryPathsFromNodes, buildFontFamilyString, buildForest, buildGuideListExtension, buildInkMlContent, buildLinkedTextBoxChains, buildOle2, buildPptxJsonDocument, buildSingleEffectNode, buildSlideReferenceRemap, buildSmartArtColorLists, buildSmartArtColorRoleMap, buildSrgbColorChoice, buildThemeColorMap, buildTree, capturedPresetIds, capturedPresetNativeAnimation, capturedSubtypes, catmullRomToBezier, chartDataAddCategory, chartDataAddSeries, chartDataChangeType, chartDataRemoveCategory, chartDataRemoveSeries, chartDataUpdatePoint, checkBlankSlide, checkComplexTables, checkDuplicateTitles, checkLowContrast, checkMissingAltText, checkMissingSlideTitle, checkPresentation, chevronPoints, chooseAlgType, circleNode, clampByRules, clampUnitInterval, classifyPanose, cloneElement, cloneShapeStyle, cloneSlide, cloneTemplateElementsBySlideId, cloneTextStyle, cloneXmlObject, cm, cmToEmu, collectLayoutNames, collectMasterNames, colorWithOpacity, colorsEqual, colour, combineShapes, computeContrastRatio, computeDetailStatus, computeDigestBase64 as computeDigestBase64WebCrypto, computeSmartArtElementsWithoutCache, computeVerificationStatus, containsConvertibleStrictNamespaceAttribute, convertPptToPptx, convertXmlToStrict, createArrayBufferCopy, createAutoNumberSequence, createBuiltinVariables, createChartElement, createConnectorElement, createDefaultPptxHandlerRuntime, createDrawingObjectId, createEditorId, createFreeformElement, createGroupElement, createImageElement, createLayout, createLayouts, createMediaElement, createModifyVerifier, createPptxSaveConstants, createSaltlessModifyVerifierForTesting, createShapeElement, createTableCellXml, createTableElement, createTableGraphicFrameRawXml, createTableStyleEntry, createTemplateConnectorRawXml, createTemplateShapeRawXml, createTextElement, createUniformTextSegments, cropShapeForPresetGeometry, cssDegreesToOoxmlGradientAngle, customGeometryPathsToSvgSubpaths, dataUrlToMediaBytes, decodeOle10Native, decodePngDimensions, decodePptxJsonText, decodeXmlEntities, decomposeSmartArt, decryptPptx, deepCloneData, deleteLayout, deleteSlideMaster, deleteTableStyleFromMap, demoteSmartArtNode, deobfuscateFont, deriveOutputPath, deriveSlideTitle, deriveSlideTitles, deserializePptxFromJson, detectDigitalSignatures, detectFileFormat, detectFontFormat, detectOleObjectType, detectOlePayloadEditorKind, detectStrictConformance, diffPresentations, diffSlides, discoverArrangement, distributeSegmentsAcrossChain, douglasPeucker, duplicateElement, duplicateLayout, duplicateSlide, duplicateSlideMaster, elementActionToPptxAction, elementHasAction, emuToPixels, encodeCompressedPng, encodeOle10Native, encodePng, encodeXmlAttributeValue, encodeXmlTextValue, encryptPptx, ensureArrayValue, ensureXmlChild, escapeXmlAttr, escapeXmlText, estimateMediaDurationMs, estimateTextBoxCapacity, evaluateCustomGeometryPathData, evaluateCustomGeometryPaths, evaluateGeometryPaths, evaluateGuides, evaluatePresetShape, extractAfterAnimationFromSubTnLst, extractAllTagText, extractColorChoiceXml, extractFirstTagText, extractGraphicBuilds, extractGuidFromPartName, extractModel3DTransform, extractStyleReferenceColorXml, extractTableCellTextRuns, extractTagAttribute, fetchUrlToBytes, filterValidShapeAdjustmentEntries, findCnvPrNode, findConstraint, findCustomShow, findLayoutByName, findLayoutByType, findOpenXmlCoverage, findPlaceholders, findText, fitFontSize, flattenChartUserShapes, flattenNodes, formatAutoNumberMarker, formatCommentTimestamp, formatScriptAutoNumber, fragmentShapes, gearPoints, generateFontGuid, generateLayoutXml, generateMediaFilename, generateTableStyleGuid, getAdjustmentAwareClipPath, getAdjustmentAwareShapeClipPath, getAnimationPresetInfo, getCalloutLeaderLineGeometry, getCalloutTier, getCalloutViewBoxBounds, getCapturedPreset, getCapturedTree, getChartUserShapeAtPath, getCloudCalloutClipPath, getCloudClipPath, getCloudPathForRendering, getCommentMarkerPosition, getConnectorAdjustment, getConnectorPathGeometry, getCssBorderDashStyle, getCustomShowNames, getCustomShowPositionLabel, getDirectory, getElementLabel, getElementOrientationMatrix, getElementTextContent, getElementTransform, getImageMaskStyle, getLinkedTextBoxSegments, getNativeAnimationPresetMetadata, getOleDocumentParagraphs, getOleNestedDeckBytes, getOleNestedDeckDetail, getOleObjectTypeLabel, getOleSheetGrid, getPanoseWeight, getPresetConnectionSites, getPresetShapeClipPath, getPresetTextRect, getPresetsByCategory, getRoundRectRadiusPx, getSectionForSlide, getSectionSlideRange, getShapeClipPath, getShapeClipPathFromPreset, getShapeType, getSignaturePathsToStrip, getSubstituteFontFamily, getSubstituteFonts, getSupportedNamespaces, getSvgStrokeDasharray, getTextCompensationTransform, getThemePreset, getZoomElements, getZoomTargetSlideIndexes, groupElements, guidToKey, guideEmuToPx, guidePxToEmu, hasDirectSubstitution, hasNonTrivialOverride, hasReference, hasShapeProperties, hasTextProperties, hebrewAlphaLabel, hexToRgbChannels, hslToRgb, inches, inchesToEmu, inferOleExtensionFromTarget, inheritedPlaceholderFieldType, inkBounds, inkElementToStrokes, inkLengthToPx, inkPointMapper, insertLayout, insertSlideMaster, interpolateShapeGeometry, interpretSmartArtLayout, interpretedLayoutToElements, intersectPolygons, intersectShapes, intersectSvgPaths, isAlternateContentChoiceSupported, isAlternateContentChoiceXmlSupported, isCalloutShape, isConnectorElement, isDefaultSmartArtLabelScene, isEditableTextElement, isEncryptedLegacyPpt, isHeaderFooterPlaceholder, isImageLikeElement, isInkElement, isLegacyPpt, isNamespaceSupported, isOle2CompoundFile, isParetoChartData, isPptxJsonText, isShapeElement, isStShapeType, isStrictNamespaceUri, isSummaryZoomSlide, isSwitchableLayoutType, isTemplateElement, isTemplateElementId, isTextElement, isTextOrientationMatrix, isThemeColorSchemeName, isTransitionalNamespaceUri, isValidBase64, isXmlNode, isZoomElement, isZoomElement2 as isZoomElementUtil, itemNode, listChartUserShapes, listUnassessedOpenXmlCoverage, lookupPresetConnectionSites, lookupPresetShape, lookupPresetTextRectOverride, mailMerge, makeStoreAwareId, mergeNativeSoundIntoEditorAnimations, mergePresentation, mergeShapes, mergeStyleParts, mergeThemeColorOverride, mimeTypeForOleFile, mm, moveSlidesToSection, multiplyTextOrientationMatrices, navigateCustomShow, nextAutoNumber, nodeFill, nodeOpacity, nodeStroke, nodeTextStyle, normalizeHexColor, normalizeNamespaceUri, normalizePartPath, normalizePath, normalizePositiveFixedAngleDegrees, normalizeStShapeType, normalizeStrictXml, normalizeStrokeDashType, normalizeTableStyleGuid, numericParam, obfuscateFont, oleBytesToDataUrl, oleObjectTypeToGlyph, ooxmlArcToSvg, ooxmlGradientAngleToCssDegrees, ooxmlToPresetName, orderedXmlKey, parseActiveXControlsFromSlide, parseAdjustmentValues, parseAnimEffectFilter, parseBodyPrBooleanAttrs, parseBubbleChartOptions, parseChart3DSurfaces, parseChartAxes, parseChartDataLabelOptions, parseChartLayouts, parseChartManualLayout, parseChartUpDownBars, parseCondition2 as parseCondition, parseConditionList, parseCustomShows, parseCxChartSeries, parseDataTable, parseDataUrlToBytes, parseDiagramRelationshipIds, parseDrawingColor, parseDrawingColorChoice, parseDrawingColorOpacity, parseDrawingFraction, parseDrawingHueDegrees, parseDrawingLineDash, parseDrawingMediaReference, parseDrawingPercent, parseEmbeddedXlsx, parseFilterToken, parseGuideDefinitions, parseHexColor, parseInkMlContent, parseKinsoku, parseLineStyle, parseMarker, parseModel3DScene, parseOle2, parseOoxmlPercent, parsePanoseBytes, parsePanoseString, parsePptxJson, parsePptxJsonDocument, parsePresentationDrawingGuides, parsePresentationSmartTags, parseSeriesDataLabels, parseSeriesDataPoints, parseSeriesErrBars, parseSeriesExplosion, parseSeriesTrendlines, parseShapeId, parseShapeProps, parseSignatureXml, parseSlideDrawingGuides, parseSmartArtColorListHexes, parseSmartArtColorStyleLabels, parseSmartArtConstraintRules, parseSmartArtDefinitionHeaderList, parseSmartArtDefinitionMetadata, parseSmartArtLayoutDefinition, parseSmartArtPointCustomLayout, parseSmartArtQuickStyleLabels, parseSmartArtStyleLabelRefs, parseStructuredCustomGeometry, parseSvgPath, parseTimeTargetElement, parseVmlElement, parseVmlElements, pixelsToEmu, polygonNode, polygonsToSvgPath, positiveFixedAngleAttribute, pptxActionToElementAction, pptxDataFromJsonDocument, preservesSpreadsheetXmlWhitespace, preservesXmlWhitespace, presetGeometryForCropShape, promoteSmartArtNode, pt, ratioConstraint, reResolveElementColors, reResolveElementFonts, reResolveSlideColors, reResolveSlideFonts, readFileAsDataUrl, readOleDocParagraphs, readOleDocumentParagraphs, readOleNestedDeckDetail, readOleNestedDeckFirstSlideTextLines, readOleSheetGrid, readOleXlsGrid, reapplyAlternateContentToTree, reassignDescendantIds, rebuildTableStructureInRawXml, reconcileAnimationTargets, rectNode, reflowSmartArtLayout, regenerateSmartArtDrawingShapes, relativeLuminance, relayoutSmartArt, remapEditorAnimationsToShapeIds, remapElementShapeIds, remapShapeIdReferences, removeChartCategory, removeChartSeries, removeChartUserShape, removeChartUserShapeAtPath, removeSection, removeSmartArtNode, renameLayout, renameSlideMaster, renderOleDeckPreviewPng, renderOleDocumentPreviewPng, renderOleIconPng, renderOleSheetPreviewPng, reorderObjectKeys, reorderObjectKeysByLocalName, reorderSections, reorderSmartArtNode, reorderSmartArtNodeToIndex, repairPptx, repeatedLabel, replaceOleEmbedding, replaceOleFile, replaceShapeGeometry, replaceText, replaceTextInSlide, replaceWithCustomGeometry, resetCloneIdCounter, resetDecomposeCounter, resetIdCounter, resetSectionIdCounter, resetSmartArtEditCounter, resolveConnectorShapeIds, resolveConstraint, resolveConstraintDeclaredBy, resolveCoordinate, resolveCustomGeometryGuideContext, resolveCustomGeometryToken, resolveCustomShowSlideIndices, resolveDirectionSubtype, resolveDisplayedChartTypeName, resolveFlowDirection, resolveLayoutDisplayName, resolveModel3DMimeType, resolveModifyVerifierAlgorithmName, resolveOleEditorKindFromPayload, resolveOoxmlPresetMapping, resolveRatioConstraint, resolveReferenceUriToPart, resolveSmartArtEffectIntensity, resolveSmartArtNodeCoherent3DOff, resolveSmartArtNodeStyleRoles, resolveTableCellStyle, resolveThemeColorRef, rgb, rgbToHsl, roleOf, romanNumeral, sampleFirstPixelColorFromBytes, selectAlternateContentBranch, selectArrangedNodes, serializeColorChoice, serializeColorChoiceWithRef, serializeCondition, serializeConditionList, serializeGraphicBuild, serializePptxToJson, serializeSmartArtDefinitionHeaderList, serializeSvgPath, serializeTimeTargetElement, setChartAreaFormat, setChartAxis, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategories, setChartColorMapOverride, setChartDataLabels, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointGradient, setChartDataPointLabel, setChartDataPointMarker, setChartDataPointStyle, setChartGroupOptions, setChartGrouping, setChartHelperLine, setChartLegend, setChartSeriesChartType, setChartSeriesColor, setChartSeriesErrorBars, setChartSeriesGradient, setChartSeriesMarker, setChartSeriesTrendline, setChartTitle, setChartType, setElementLocked, setOleObjectName, setSmartArtNodeStyle, shadowOffsetToDistanceAndDirection, shouldRenderFallbackLabel, shouldReturnToZoomSlide, smartArtQuickStyleHas3d, stripParentDirSegments, stripXmlOrderSuffix, strokeFor, styleContext, styleShadow, styleStroke, subtractPolygons, subtractShapes, subtractSvgPaths, summarizeOpenXmlCoverage, summarizeOpenXmlCoverageByVocabulary, svgPathToPolygons, switchSmartArtLayout, syncPictureShapeTypeWithCropShape, themeColorRefFromColorChoice, themeColorRefFromSchemeClr, themeColorRefToSolidFill, themeColorRefToSolidFillWithOpacity, themeColorRefToXml, themeColorSchemesEqual, timingCurveToAccelDecel, toArabicAbjadNumeral, toChartGradientFill, toChineseNumeral, toCjkDigitString, toDevanagariDigits, toEa1ChsNumeral, toEa1ChtNumeral, toFullWidthDigits, toHebrewNumeral, toHex, toStrictNamespaceUri, toThaiDigits, treeDepth, treeWidth, truncate, ungroupElements, unionPolygons, unionShapes, unionSvgPaths, uniqueDisplayName, uniquePrefixedName, unwrapAlternateContent, unwrapOleEmbedding, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateChartDataPoint, updateChartSeriesValues, updateChartUserShape, updateChartUserShapeAtPath, updateMergeAttrsInRawXml, updateSmartArtNodeText, validatePptx, validateSmartArtColorStyleLabels, validateSmartArtConstraintRules, validateSmartArtDefinitionHeaderList, validateSmartArtDefinitionMetadata, validateSmartArtLayoutDefinition, verifyModifyPassword, verifyPassword, verifySignatureDigests, visitXmlObjects, withThemePlaceholderColor, writeBodyPrBooleanAttrs, writeOleDocParagraphEdit, writeOleDocumentParagraphEdit, writeOleNestedDeckElementText, writeOleSheetCellEdit, writeOleXlsNumericCellEdit, writeOleXlsStringCellEdit, xmlAttr, xmlAttrBool, xmlAttrNumber, xmlChild, xmlChildren, xmlPath, xmlText, zlibDeflate };
|