ooxml-ui 1.16.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/custom-elements.json +66 -0
  2. package/dist/{chunk-QUG6IRQQ.js → chunk-CPHFMJOU.js} +3 -2
  3. package/dist/{chunk-JVNIZBG7.js → chunk-GILNGII2.js} +1 -1
  4. package/dist/{chunk-CHFMXUPK.js → chunk-SPRZIHUH.js} +206 -9
  5. package/dist/{chunk-UIVYZERK.js → chunk-SVRIVUWC.js} +1 -1
  6. package/dist/controls.d.ts +4 -2
  7. package/dist/controls.d.ts.map +1 -1
  8. package/dist/controls.js +1 -1
  9. package/dist/dialog/chart-picker.d.ts +78 -0
  10. package/dist/dialog/chart-picker.d.ts.map +1 -0
  11. package/dist/docx.js +3 -3
  12. package/dist/index.d.ts +1 -1
  13. package/dist/index.js +4 -4
  14. package/dist/pptx/{chart-3d-view-scene-3HDRDXX6.cjs → chart-3d-view-scene-4GGMVQNN.cjs} +38 -38
  15. package/dist/pptx/{chart-3d-view-scene-NMFMG76N.mjs → chart-3d-view-scene-6YLA75UQ.mjs} +2 -2
  16. package/dist/pptx/{chunk-KTHBMVMQ.cjs → chunk-6OK5Z2MQ.cjs} +793 -760
  17. package/dist/pptx/{chunk-GCHJRKXZ.mjs → chunk-6ZMCXJ32.mjs} +1 -1
  18. package/dist/pptx/{chunk-CEH63AZB.cjs → chunk-HKHO4GDD.cjs} +27 -63
  19. package/dist/pptx/{chunk-XOMYHWQ3.mjs → chunk-LF2X2AOK.mjs} +1 -1
  20. package/dist/pptx/{chunk-HL53SH7C.mjs → chunk-NTWYYXB2.mjs} +28 -64
  21. package/dist/pptx/{chunk-RACO4FQT.mjs → chunk-OFGZWYKM.mjs} +43 -10
  22. package/dist/pptx/{chunk-L2LK7TEC.cjs → chunk-QG2EEFAW.cjs} +12 -12
  23. package/dist/pptx/{chunk-3DGTZWI5.cjs → chunk-TXMIKRYG.cjs} +1 -1
  24. package/dist/pptx/dom/index.cjs +251 -251
  25. package/dist/pptx/dom/index.mjs +6 -6
  26. package/dist/pptx/export/html2canvas-clone.cjs +2 -2
  27. package/dist/pptx/export/html2canvas-clone.mjs +1 -1
  28. package/dist/pptx/index.cjs +3174 -3174
  29. package/dist/pptx/index.mjs +4 -4
  30. package/dist/pptx/render/chart-combo-stock.cjs +3 -3
  31. package/dist/pptx/render/chart-combo-stock.mjs +1 -1
  32. package/dist/pptx/render/chart-data-label-text.d.ts.map +1 -1
  33. package/dist/pptx/render/chart-overlays.cjs +7 -7
  34. package/dist/pptx/render/chart-overlays.mjs +1 -1
  35. package/dist/pptx/render/chart-surface-treemap.cjs +4 -4
  36. package/dist/pptx/render/chart-surface-treemap.mjs +1 -1
  37. package/dist/pptx/render/chart-view-model.cjs +44 -44
  38. package/dist/pptx/render/chart-view-model.mjs +1 -1
  39. package/dist/pptx/render/chart-waterfall-map.cjs +6 -6
  40. package/dist/pptx/render/chart-waterfall-map.mjs +1 -1
  41. package/dist/ribbon/gallery.d.ts +8 -0
  42. package/dist/ribbon/gallery.d.ts.map +1 -1
  43. package/dist/teams.js +2 -2
  44. package/dist/visio/controller.d.ts +15 -0
  45. package/dist/visio/render-embedded-chart.d.ts +8 -0
  46. package/dist/visio/ribbon-action.d.ts +1 -1
  47. package/dist/visio/title-bar.d.ts +4 -1
  48. package/dist/visio/viewer-autorecover.d.ts +65 -0
  49. package/dist/visio/viewer-behaviour.d.ts +55 -0
  50. package/dist/visio/viewer-context-menu.d.ts +3 -1
  51. package/dist/visio/viewer-inline-text.d.ts +12 -0
  52. package/dist/visio/viewer-insert-chart.d.ts +62 -0
  53. package/dist/visio/viewer-insert.d.ts +4 -0
  54. package/dist/visio/viewer-live-preview.d.ts +27 -0
  55. package/dist/visio/viewer-mini-toolbar.d.ts +30 -0
  56. package/dist/visio/viewer-options-categories.d.ts +8 -4
  57. package/dist/visio/viewer-options.d.ts +7 -1
  58. package/dist/visio/viewer-recover-dialog.d.ts +23 -0
  59. package/dist/visio/viewer-screen-tips.d.ts +10 -0
  60. package/dist/visio.js +1268 -83
  61. package/dist/xlsx/commands/insert.d.ts +1 -0
  62. package/dist/xlsx.js +54 -87
  63. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { computePlotLayout, radarAngle, computeStackedSeriesPlots, computeLayoutOptions, computeStackedValueRangeForAxis, primaryValueAxis, valueToY2, collapseChartTitleRunsForEdit, computePieLayout, computeChartLegendLayout, buildMarkTooltip, formatAxisValueWithUnits, axisTickValues } from './chunk-HL53SH7C.mjs';
1
+ import { computePlotLayout, radarAngle, computeStackedSeriesPlots, computeLayoutOptions, computeStackedValueRangeForAxis, primaryValueAxis, valueToY2, collapseChartTitleRunsForEdit, computePieLayout, computeChartLegendLayout, buildMarkTooltip, formatAxisValueWithUnits, axisTickValues } from './chunk-NTWYYXB2.mjs';
2
2
 
3
3
  // src/pptx/render/chart-interaction-radar.ts
4
4
  function buildRadarDragGeometry(element, chartData, categoryLabels, pointIndex) {
@@ -4094,45 +4094,29 @@ function pushPointLabel(dataLabels, boxes, chartData, series, pointIndex, target
4094
4094
  dataLabels.push(label);
4095
4095
  boxes.push(...buildPointLabelDecorations(chartData, series, pointIndex, label, target));
4096
4096
  }
4097
- var DEFAULT_SEPARATOR = ", ";
4098
- var CATEGORY_PERCENT_SEPARATOR = "\n";
4099
4097
  function resolveDataLabelContent(chartData, series, pointIndex) {
4100
4098
  const chartLevel = chartData.style?.dataLabels;
4101
4099
  const seriesLevel = series.dataLabelOptions;
4102
4100
  const point = series.dataLabels?.find((label) => label.idx === pointIndex);
4103
- const pick = (fromPoint, fromSeries, fromChart) => fromPoint ?? fromSeries ?? fromChart;
4104
- const showValue = pick(point?.showVal, seriesLevel?.showValue, chartLevel?.showValue);
4105
- const showCategory = pick(
4106
- point?.showCatName,
4107
- seriesLevel?.showCategory,
4108
- chartLevel?.showCategory
4109
- );
4110
- const showSeriesName = pick(
4111
- point?.showSerName,
4112
- seriesLevel?.showSeriesName,
4113
- chartLevel?.showSeriesName
4114
- );
4115
- const showPercent = pick(point?.showPercent, seriesLevel?.showPercent, chartLevel?.showPercent);
4116
- const showBubbleSize = pick(
4117
- point?.showBubbleSize,
4118
- seriesLevel?.showBubbleSize,
4119
- chartLevel?.showBubbleSize
4120
- );
4121
- const anyDeclared = [showValue, showCategory, showSeriesName, showPercent, showBubbleSize].some(
4122
- (flag) => flag !== void 0
4123
- );
4124
- const siblingOwnsLabels = !anyDeclared && chartLevel === void 0 && seriesLevel === void 0 && chartData.series.some((other) => other !== series && other.dataLabelOptions !== void 0);
4101
+ const flags = chart.resolveDataLabelFlags({
4102
+ point: point && {
4103
+ showValue: point.showVal,
4104
+ showCategory: point.showCatName,
4105
+ showSeriesName: point.showSerName,
4106
+ showPercent: point.showPercent,
4107
+ showBubbleSize: point.showBubbleSize,
4108
+ separator: point.separator
4109
+ },
4110
+ series: seriesLevel,
4111
+ chart: chartLevel,
4112
+ // Labels switched on by one series' own `c:dLbls` (no chart-level group) must not leak onto
4113
+ // its sibling series that declare nothing.
4114
+ siblingOwnsLabels: chartLevel === void 0 && seriesLevel === void 0 && chartData.series.some((other) => other !== series && other.dataLabelOptions !== void 0)
4115
+ });
4125
4116
  const rangeGroup = seriesLevel?.dataLabelsRange !== void 0 ? seriesLevel : chartLevel?.dataLabelsRange !== void 0 ? chartLevel : void 0;
4126
4117
  const rangeText = rangeGroup?.showDataLabelsRange !== false ? rangeGroup?.dataLabelsRange?.cache[pointIndex] : void 0;
4127
4118
  return {
4128
- // Nothing declared anywhere => the historical "just print the value"
4129
- // (what the serializer writes for a bare `hasDataLabels: true`).
4130
- showValue: anyDeclared ? showValue === true : !siblingOwnsLabels,
4131
- showCategory: showCategory === true,
4132
- showSeriesName: showSeriesName === true,
4133
- showPercent: showPercent === true,
4134
- showBubbleSize: showBubbleSize === true,
4135
- separator: point?.separator ?? seriesLevel?.separator ?? chartLevel?.separator ?? (showCategory === true && showPercent === true ? CATEGORY_PERCENT_SEPARATOR : DEFAULT_SEPARATOR),
4119
+ ...flags,
4136
4120
  deleted: point?.deleted === true,
4137
4121
  ...point?.text !== void 0 ? { customText: point.text } : rangeText !== void 0 ? { customText: rangeText } : {}
4138
4122
  };
@@ -4150,37 +4134,17 @@ function buildDataLabelText(params) {
4150
4134
  const seriesLevelOptions = series.dataLabelOptions;
4151
4135
  const chartLevelOptions = chartData.style?.dataLabels;
4152
4136
  const numberFormat = point?.numberFormat ?? seriesLevelOptions?.numberFormat ?? chartLevelOptions?.numberFormat ?? series.numberFormat;
4153
- const parts = [];
4154
- let valueColor;
4155
- if (content.showSeriesName && series.name.length > 0) {
4156
- parts.push(series.name);
4157
- }
4158
- if (content.showCategory) {
4159
- const category = chartData.categories[pointIndex];
4160
- if (category !== void 0 && category.length > 0) {
4161
- parts.push(category);
4162
- }
4163
- }
4164
- if (content.showValue) {
4165
- const formatted = chart.formatChartNumberWithColor(value, numberFormat);
4166
- parts.push(formatted?.text ?? formatAxisValue2(value, numberFormat));
4167
- valueColor = formatted?.color;
4168
- }
4169
- if (content.showPercent) {
4170
- const base = percentBase ?? series.values.reduce((total, entry) => total + Math.abs(entry), 0);
4171
- parts.push(base > 0 ? `${Math.round(Math.abs(value) / base * 100)}%` : "0%");
4172
- }
4173
- if (content.showBubbleSize) {
4174
- const size = series.bubbleSizes?.[pointIndex];
4175
- if (size !== void 0) {
4176
- parts.push(formatAxisValue2(size, series.numberFormat));
4177
- }
4178
- }
4179
- const text = parts.join(content.separator);
4180
- if (text.length === 0) {
4181
- return void 0;
4182
- }
4183
- return { text, color: parts.length === 1 && content.showValue ? valueColor : void 0 };
4137
+ return chart.composeDataLabelText({
4138
+ flags: content,
4139
+ seriesName: series.name,
4140
+ category: chartData.categories[pointIndex],
4141
+ value,
4142
+ numberFormat,
4143
+ percentBase: percentBase ?? series.values.reduce((total, entry) => total + Math.abs(entry), 0),
4144
+ bubbleSize: series.bubbleSizes?.[pointIndex],
4145
+ formatValue: (v, format) => formatAxisValue2(v, format),
4146
+ formatBubbleSize: (size) => formatAxisValue2(size, series.numberFormat)
4147
+ });
4184
4148
  }
4185
4149
  function resolveDataLabelTextStyle(chartData, series, pointIndex) {
4186
4150
  const point = series.dataLabels?.find((label) => label.idx === pointIndex);
@@ -112,7 +112,7 @@ async function loadChart3DThree() {
112
112
 
113
113
  // src/pptx/three-view/scene-registry.ts
114
114
  var loaders = {
115
- chart: async () => (await import('./chart-3d-view-scene-NMFMG76N.mjs')).mountChart3DView,
115
+ chart: async () => (await import('./chart-3d-view-scene-6YLA75UQ.mjs')).mountChart3DView,
116
116
  smartart: async () => (await import('./view-scene-BSTOVMHA.mjs')).mountSmartArt3DView
117
117
  };
118
118
  async function loadThreeViewScene(kind) {
@@ -1,5 +1,5 @@
1
1
  import { getSubstituteFonts, buildFontFamilyString, hasShapeProperties, ooxmlGradientAngleToCssDegrees, chartDataChangeType, isParetoChartData, resolveDisplayedChartTypeName, evaluateCustomGeometryPaths, customGeometryPathsToSvgSubpaths, evaluatePresetShape, parseDataUrlToBytes, sampleFirstPixelColorFromBytes, flattenChartUserShapes } from 'ooxml-core/pptx';
2
- import { DEFAULT_CHART_PALETTE, formatCompactAxisValue, getChartStylePalette, niceValueAxisBounds, axisTargetIntervals, formatChartNumber, clusteredBarGeometry, tint, shade, hasManualLayoutFields, resolveManualLayoutRect, formatChartNumberWithColor, groupRowsByCategory, computeBoxStats, computeHistogramBins as computeHistogramBins$1, aggregateByCategory, computeSunburstArcs as computeSunburstArcs$1, computeHierarchicalSunburstArcs as computeHierarchicalSunburstArcs$1, radarRingPoints, radarAngle, computeRadarPoints, buildWaterfallSteps, computeWaterfallRange, resolveBlankDisplay, computeStackedSeriesPlots, visibleRuns, maxBubbleSize, medianBubbleRadius, computeBubbleRadius, resolveAutoTitleText, STOCK_DEFAULT_WICK_COLOR, stockCandle, STOCK_DEFAULT_UP_FILL, STOCK_DEFAULT_DOWN_FILL, STOCK_TICK_WIDTH, buildHierarchyRoots, layoutTreemap, hierarchyBranchLabels, placeBestFitLabel, nudgeOutsideLabels, impliesAutoTitle, buildChartGradientDef, chartErrorBarAmount, fitChartTrendline } from 'ooxml-core/chart';
2
+ import { DEFAULT_CHART_PALETTE, formatCompactAxisValue, getChartStylePalette, niceValueAxisBounds, axisTargetIntervals, formatChartNumber, clusteredBarGeometry, tint, shade, hasManualLayoutFields, resolveManualLayoutRect, resolveDataLabelFlags, composeDataLabelText, groupRowsByCategory, computeBoxStats, computeHistogramBins as computeHistogramBins$1, aggregateByCategory, computeSunburstArcs as computeSunburstArcs$1, computeHierarchicalSunburstArcs as computeHierarchicalSunburstArcs$1, radarRingPoints, radarAngle, computeRadarPoints, buildWaterfallSteps, computeWaterfallRange, resolveBlankDisplay, computeStackedSeriesPlots, visibleRuns, maxBubbleSize, medianBubbleRadius, computeBubbleRadius, resolveAutoTitleText, STOCK_DEFAULT_WICK_COLOR, stockCandle, STOCK_DEFAULT_UP_FILL, STOCK_DEFAULT_DOWN_FILL, STOCK_TICK_WIDTH, buildHierarchyRoots, layoutTreemap, hierarchyBranchLabels, placeBestFitLabel, nudgeOutsideLabels, impliesAutoTitle, buildChartGradientDef, chartErrorBarAmount, fitChartTrendline } from 'ooxml-core/chart';
3
3
  export { DEFAULT_BAR_GAP_WIDTH, DEFAULT_CHART_PALETTE, axisTargetIntervals, computeBoxStats, computeBubbleRadius, computeLinearRegression, computeRSquared, computeRadarPoints, computeStackedSeriesPlots, fitPolynomial, getChartStylePalette, hasManualLayoutFields, niceValueAxisBounds, radarAngle, radarRingPoints, resolveManualLayoutRect, shade, tint } from 'ooxml-core/chart';
4
4
  import { colorWithOpacity, clampUnitInterval, normalizeHexColor, hexToRgbChannels } from 'ooxml-core/color';
5
5
  export { clampUnitInterval, colorWithOpacity, hexToRgbChannels, normalizeHexColor } from 'ooxml-core/color';
@@ -4095,45 +4095,29 @@ function pushPointLabel(dataLabels, boxes, chartData, series, pointIndex, target
4095
4095
  dataLabels.push(label);
4096
4096
  boxes.push(...buildPointLabelDecorations(chartData, series, pointIndex, label, target));
4097
4097
  }
4098
- var DEFAULT_SEPARATOR = ", ";
4099
- var CATEGORY_PERCENT_SEPARATOR = "\n";
4100
4098
  function resolveDataLabelContent(chartData, series, pointIndex) {
4101
4099
  const chartLevel = chartData.style?.dataLabels;
4102
4100
  const seriesLevel = series.dataLabelOptions;
4103
4101
  const point = series.dataLabels?.find((label) => label.idx === pointIndex);
4104
- const pick = (fromPoint, fromSeries, fromChart) => fromPoint ?? fromSeries ?? fromChart;
4105
- const showValue = pick(point?.showVal, seriesLevel?.showValue, chartLevel?.showValue);
4106
- const showCategory = pick(
4107
- point?.showCatName,
4108
- seriesLevel?.showCategory,
4109
- chartLevel?.showCategory
4110
- );
4111
- const showSeriesName = pick(
4112
- point?.showSerName,
4113
- seriesLevel?.showSeriesName,
4114
- chartLevel?.showSeriesName
4115
- );
4116
- const showPercent = pick(point?.showPercent, seriesLevel?.showPercent, chartLevel?.showPercent);
4117
- const showBubbleSize = pick(
4118
- point?.showBubbleSize,
4119
- seriesLevel?.showBubbleSize,
4120
- chartLevel?.showBubbleSize
4121
- );
4122
- const anyDeclared = [showValue, showCategory, showSeriesName, showPercent, showBubbleSize].some(
4123
- (flag) => flag !== void 0
4124
- );
4125
- const siblingOwnsLabels = !anyDeclared && chartLevel === void 0 && seriesLevel === void 0 && chartData.series.some((other) => other !== series && other.dataLabelOptions !== void 0);
4102
+ const flags = resolveDataLabelFlags({
4103
+ point: point && {
4104
+ showValue: point.showVal,
4105
+ showCategory: point.showCatName,
4106
+ showSeriesName: point.showSerName,
4107
+ showPercent: point.showPercent,
4108
+ showBubbleSize: point.showBubbleSize,
4109
+ separator: point.separator
4110
+ },
4111
+ series: seriesLevel,
4112
+ chart: chartLevel,
4113
+ // Labels switched on by one series' own `c:dLbls` (no chart-level group) must not leak onto
4114
+ // its sibling series that declare nothing.
4115
+ siblingOwnsLabels: chartLevel === void 0 && seriesLevel === void 0 && chartData.series.some((other) => other !== series && other.dataLabelOptions !== void 0)
4116
+ });
4126
4117
  const rangeGroup = seriesLevel?.dataLabelsRange !== void 0 ? seriesLevel : chartLevel?.dataLabelsRange !== void 0 ? chartLevel : void 0;
4127
4118
  const rangeText = rangeGroup?.showDataLabelsRange !== false ? rangeGroup?.dataLabelsRange?.cache[pointIndex] : void 0;
4128
4119
  return {
4129
- // Nothing declared anywhere => the historical "just print the value"
4130
- // (what the serializer writes for a bare `hasDataLabels: true`).
4131
- showValue: anyDeclared ? showValue === true : !siblingOwnsLabels,
4132
- showCategory: showCategory === true,
4133
- showSeriesName: showSeriesName === true,
4134
- showPercent: showPercent === true,
4135
- showBubbleSize: showBubbleSize === true,
4136
- separator: point?.separator ?? seriesLevel?.separator ?? chartLevel?.separator ?? (showCategory === true && showPercent === true ? CATEGORY_PERCENT_SEPARATOR : DEFAULT_SEPARATOR),
4120
+ ...flags,
4137
4121
  deleted: point?.deleted === true,
4138
4122
  ...point?.text !== void 0 ? { customText: point.text } : rangeText !== void 0 ? { customText: rangeText } : {}
4139
4123
  };
@@ -4151,37 +4135,17 @@ function buildDataLabelText(params) {
4151
4135
  const seriesLevelOptions = series.dataLabelOptions;
4152
4136
  const chartLevelOptions = chartData.style?.dataLabels;
4153
4137
  const numberFormat = point?.numberFormat ?? seriesLevelOptions?.numberFormat ?? chartLevelOptions?.numberFormat ?? series.numberFormat;
4154
- const parts = [];
4155
- let valueColor;
4156
- if (content.showSeriesName && series.name.length > 0) {
4157
- parts.push(series.name);
4158
- }
4159
- if (content.showCategory) {
4160
- const category = chartData.categories[pointIndex];
4161
- if (category !== void 0 && category.length > 0) {
4162
- parts.push(category);
4163
- }
4164
- }
4165
- if (content.showValue) {
4166
- const formatted = formatChartNumberWithColor(value, numberFormat);
4167
- parts.push(formatted?.text ?? formatAxisValue2(value, numberFormat));
4168
- valueColor = formatted?.color;
4169
- }
4170
- if (content.showPercent) {
4171
- const base = percentBase ?? series.values.reduce((total, entry) => total + Math.abs(entry), 0);
4172
- parts.push(base > 0 ? `${Math.round(Math.abs(value) / base * 100)}%` : "0%");
4173
- }
4174
- if (content.showBubbleSize) {
4175
- const size = series.bubbleSizes?.[pointIndex];
4176
- if (size !== void 0) {
4177
- parts.push(formatAxisValue2(size, series.numberFormat));
4178
- }
4179
- }
4180
- const text = parts.join(content.separator);
4181
- if (text.length === 0) {
4182
- return void 0;
4183
- }
4184
- return { text, color: parts.length === 1 && content.showValue ? valueColor : void 0 };
4138
+ return composeDataLabelText({
4139
+ flags: content,
4140
+ seriesName: series.name,
4141
+ category: chartData.categories[pointIndex],
4142
+ value,
4143
+ numberFormat,
4144
+ percentBase: percentBase ?? series.values.reduce((total, entry) => total + Math.abs(entry), 0),
4145
+ bubbleSize: series.bubbleSizes?.[pointIndex],
4146
+ formatValue: (v, format) => formatAxisValue2(v, format),
4147
+ formatBubbleSize: (size) => formatAxisValue2(size, series.numberFormat)
4148
+ });
4185
4149
  }
4186
4150
  function resolveDataLabelTextStyle(chartData, series, pointIndex) {
4187
4151
  const point = series.dataLabels?.find((label) => label.idx === pointIndex);
@@ -4,7 +4,7 @@ import { withSlidesPerPage, withFrameSlides, printPropertiesSlidesPerPage, print
4
4
  import { remapTextToSegments } from './chunk-GVH4QN7R.mjs';
5
5
  import { motionPathPresetsByFamily, motionPathPresetLabelKey, motionPathPresetIdForPath, motionPathPresetById, motionPathFamilyLabelKey, canRequestAnimations, animationsLabel, animationsGated, MOTION_PATH_PRESETS, MOTION_PATH_FAMILIES, DEFAULT_MOTION_PATH_PRESET_ID, ANIMATION_RIBBON_CATEGORIES } from './chunk-6B3UUVRS.mjs';
6
6
  import { transformTextCase, applyCaseTransformToSegments } from './chunk-APQ3OOAT.mjs';
7
- import { withChartTitle, withChartPointValue, valueFromY, shareToValue, roundDragValue, resolveStackedDragValue, resolveRadarDragValue, resolvePieDragValue, resolveChartSvgDef, resolveChartDragValue, renderChartViewModelSvg, renderChartTextSvg, renderChartPrimitiveSvg, renderChartLineSvg, isSameChartPart, isChartInteractionArmed, findChartPartTarget, ensureChartInteractionStyles, dragValueForPart, dragAnchorViewY, chartPartToAttrs, chartPartFromElement, buildStackedDragGeometry, buildRadarDragGeometry, buildPieDragGeometry, buildChartMarkDragGeometry, buildBarChart3DHoverTooltip, beginChartValueDrag, applyChartPartHighlight, appendChartLegendSvg, advanceChartValueDrag, CHART_PART_SERIES_ATTR, CHART_PART_SELECTED_CLASS, CHART_PART_POINT_ATTR, CHART_PART_ATTR, CHART_INTERACTIVE_CLASS, CHART_DRAG_THRESHOLD_PX, computePieChartLayout, widenPieViewModel, formatValueLabel, buildBars, buildGridlines, perspObliqueCameraFor, perspCameraFor, fitPerspView, perspToScreen } from './chunk-GCHJRKXZ.mjs';
7
+ import { withChartTitle, withChartPointValue, valueFromY, shareToValue, roundDragValue, resolveStackedDragValue, resolveRadarDragValue, resolvePieDragValue, resolveChartSvgDef, resolveChartDragValue, renderChartViewModelSvg, renderChartTextSvg, renderChartPrimitiveSvg, renderChartLineSvg, isSameChartPart, isChartInteractionArmed, findChartPartTarget, ensureChartInteractionStyles, dragValueForPart, dragAnchorViewY, chartPartToAttrs, chartPartFromElement, buildStackedDragGeometry, buildRadarDragGeometry, buildPieDragGeometry, buildChartMarkDragGeometry, buildBarChart3DHoverTooltip, beginChartValueDrag, applyChartPartHighlight, appendChartLegendSvg, advanceChartValueDrag, CHART_PART_SERIES_ATTR, CHART_PART_SELECTED_CLASS, CHART_PART_POINT_ATTR, CHART_PART_ATTR, CHART_INTERACTIVE_CLASS, CHART_DRAG_THRESHOLD_PX, computePieChartLayout, widenPieViewModel, formatValueLabel, buildBars, buildGridlines, perspObliqueCameraFor, perspCameraFor, fitPerspView, perspToScreen } from './chunk-6ZMCXJ32.mjs';
8
8
  import { CAMERA_PRESET_MAP, EMU_PER_PX, getBevelHighlightDirection, MAX_EXTRUSION_LAYERS, getBevelProfileHeightMap, getLightRigLighting, getMaterialLighting, DEFAULT_CUSTOM_REF_PX, isBevelProfileInverted, resolveSmartArt3DStylePath, decorateSmartArt3DMesh, resolveSmartArt3DSceneSetup } from './chunk-RQJOOXRG.mjs';
9
9
  import { resolveTopLevelElementId, resolveHitElementId, resolveElementIdChain, resolveEditTargetElementId, SELECTION_OVERLAY_SELECTOR, ELEMENT_ID_SELECTOR } from './chunk-PI47Z46K.mjs';
10
10
  import { resolveDefaultFontFamily, buildFontCatalog } from './chunk-QX6XPYVA.mjs';
@@ -14,12 +14,12 @@ import { createImageElementFromFile } from './chunk-L55MIOBC.mjs';
14
14
  import { textStylePatch, textStyleFlagsOf, textFontSizePatch, textFontFamilyPatch, textColorOf, strokeColorOf, shapeStylePatch, nextToggleValue, mergeTextStyleUpdate, isUnderline, isItalic, isContentSegment, isBold, getSelectionTextStyleFlags, fontSizeOf, fontFamilyStyleUpdates, fillColorOf, contentSegmentsInSelection, TEXT_DECORATION_FLAGS, DEFAULT_FONT_SIZE, text_style_scope_exports } from './chunk-ANKJE2PT.mjs';
15
15
  import { textFontSizePxToPt, textFontSizePtToPx, stepFontSizePt, LINE_SPACING_OPTIONS, COMMON_FONT_SIZES, COMMON_FONT_FAMILIES, CHARACTER_SPACING_OPTIONS, CHANGE_CASE_OPTIONS } from './chunk-SMSCEGAE.mjs';
16
16
  import { scopeLayoutOptionsToSlide, isCurrentLayout } from './chunk-7BHPBO2O.mjs';
17
- import { wrapTextByEstimatedWidth, withManualLayouts, withChartTitleBand, valueToYLog, valueToY, upsertDataPoint, unitsCaptionOffset, toCssGradientStop, titleBaselineFor, tint, suppressesCssFill, subscribeBarFacePicturePixelSamples, splitSeriesByAxis, splitLabelLines, shouldRenderRegionLabel, shouldRenderMajorGridlines, shade, setChartTextMeasurer, seriesColor, sequentialColorScale, sanitizeGradientStops, resolveVaryColorFill, resolveUntargetedBarFaceFill, resolveRegionEntityCode, resolveRegionCode, resolveMarkerLabelPlacement, resolveMarkerLabelAnchor, resolveManualLayoutRect, resolveLegendSwatchKind, resolveLegendPlacement, resolveLabelPosition, resolveExtrusionFaceFill, resolveDisplayedChartType, resolveDataPointPictureFill, resolveDataPointMarker, resolveDataPointFill, resolveDataPointExplosion, resolveDataLabelTextStyle, resolveDataLabelContent, resolveChartTitleTextStyle, resolveChartTitleRunSpans, resolveChartStyleDefaults, resolveChartPalette, resolveChartKind, resolveCategoryLabels, resolveBarLabelPlacement, resolveBarLabelAnchor, resolveBarFaceTargets, resolveBarFacePicturePixelColor, resolveActiveDataPointPicture, resetBarFacePicturePixelCacheForTests, reserveLegendSpace, radarRingPoints, radarAngle, primaryValueAxis, plotAreaFill, parseDrawingPercent, paletteColor, normalizeValue, normalizeStrokeDashType, normalizeHexColor, multiplyTextOrientationMatrices, measureChartTextWidth, manualTitleAnchor, manualLegendAnchor, manualLayoutOf, linePointsToSvgString, isTextOrientationMatrix, isSeriesOnSecondaryAxis, isPrimaryCategoryAxisAtTop, isParetoChart, hexToRgbChannels, hasSecondaryValueAxis, hasSecondaryCategoryAxis, hasManualLayoutFields, getTextCompensationTransform, getSvgStrokeDasharray, getSecondaryValueAxisId, getSecondaryValueAxis, getSecondaryCategoryAxis, getPrimaryValueAxisId, getPrimaryValueAxis, getPatternTile, getPatternSvg, getGradientTileRectCss, getGradientTileFlipCss, getElementTransformWithoutRotation, getElementTransform, getElementOrientationMatrix, getDisplayUnitLabel, getDisplayUnitDivisor, getCssBorderDashStyle, getComputedFillStyle, getCompoundLineStyle, getCompoundLineBoxShadow, getCompoundLineBorderWidth, getChartStylePalette, getCachedBarFacePicturePixelColor, getBarFacePicturePixelSampleVersion, generateMinorAxisTicks, generateLogTicks, generateAxisTicks, formatRegionMapValue, formatAxisValueWithUnits, formatAxisValue, fitTitleBand, fitPolynomial, findValueAxis, findPointLabel, findLogAxis, findDataPoint, estimateTextWidth, estimateChartTextWidth, ensureBarFacePicturePixelSampled, decodeFirstPixelColor, dataLabelFontOverride, dataLabelBoxSize, dataLabelBox, createArrayBufferCopy, convertOoxmlAngleToCss, computeValueRangeForChart, computeValueRangeForAxis, computeValueRange, computeTrendlinePrimitives, computeSunburstArcs, computeStackedValueRangeForAxis, computeStackedValueRange, computeStackedBarRects, computeScatterXDomain, computeScatterDots, computeRadarPoints, computeRSquared, computePlotLayout, computePieSlices, computePieSlicePath, computePieLayout, computeLogValueRange, computeLinearRegression, computeLinePoints, computeLayoutOptions, computeLayout, computeHistogramBars, computeHierarchicalSunburstArcs, computeGradientCenter, computeFunnelSegments, computeErrorBarPrimitives, computeDataTablePrimitives, computeDataTableHeight, computeChartLegendLayout, computeBubbleRadius, computeBoxWhiskerGeometry, computeBoxStats, computeBarRects, computeAxisTitlePrimitives, colorWithOpacity, collapseChartTitleRunsForEdit, clampUnitInterval, clampCropValue, chartTitleReservePx, chartTitleFontPx, chartTitleBandFor, chartTitleBand, chartTextFontFamily, chartTextBox, chartPreserveAspectRatio, chartPlotBounds, chartGridlinesState, chartGridlinesPatch, chartFrameToViewOffset, chartFontPx, chartAxisIndex, chartAreaFill, chartAreaCornerRadius, canvasFontFamily, buildZeroLine, buildWaterfallViewModel, buildValueAxisGridlinesAndLabels, buildTrendlineLegendSwatch, buildTreemapViewModel, buildSurfaceViewModel, buildSunburstViewModel, buildSubpathPaints, buildSubpathFillOverlay, buildStockViewModel, buildStockCloseLabel, buildShapePathGradient, buildSecondaryAxis, buildRegionMapViewModel, buildRegionMapEntries, buildReflectedGradientStops, buildRectPathGradientSvg, buildRectPathGradientImage, buildRectPathGradient, buildPrimaryAxis, buildPatternFillCss, buildPatternFill, buildLineLegendSwatch, buildLegend, buildHistogramViewModel, buildGridlinesAndLabels, buildGradientCss, buildFunnelViewModel, buildFallbackViewModel, buildDataLabelText, buildDashArray, buildCssGradientFromShapeStyle, buildComboViewModel, buildCirclePathGradient, buildChartViewModel, buildCategoryLabels, buildCartesianViewModel, buildBoxWhiskerViewModel, axisShowsMajorGridlines, applyLegendEntryOverrides, applyLabelManualLayout, applyDataPointPictureFills, adjustFillForMode, TEXT_ORIENTATION_IDENTITY, OOXML_PATTERN_PRESETS, LEGEND_MARKER_RADIUS, LEGEND_LINE_SWATCH_WIDTH, LEGACY_CHART_TITLE_BAND_PX, HYPERLINK_COLOR, DEFAULT_TEXT_FONT_SIZE, DEFAULT_TEXT_COLOR, DEFAULT_STROKE_COLOR, DEFAULT_PALETTE, DEFAULT_FONT_FAMILY, DEFAULT_FILL_COLOR, DEFAULT_CHART_TEXT_PX, DEFAULT_CHART_PALETTE, DEFAULT_CHART_DATA_LABEL_PX, DEFAULT_CHART_AREA_FILL, DEFAULT_CANVAS_WIDTH, DEFAULT_CANVAS_HEIGHT, DEFAULT_BODY_INSET_TB_PX, DEFAULT_BODY_INSET_LR_PX, DATA_TABLE_ROW_H, DATA_TABLE_PADDING, DATA_TABLE_KEY_W, DATA_TABLE_HEADER_H, DATA_LABEL_PAD_Y, DATA_LABEL_PAD_X, DATA_LABEL_LINE_HEIGHT, CHART_TITLE_TOP_INSET_PX, CHART_TITLE_FONT_PX, CHART_PX_PER_PT, applyParetoConversion, computeHistogramBins, orderParetoEntries, cumulativePercentOfTotal, DEFAULT_BAR_GAP_WIDTH, axisTickValues, niceValueAxisBounds, axisTargetIntervals } from './chunk-HL53SH7C.mjs';
17
+ import { wrapTextByEstimatedWidth, withManualLayouts, withChartTitleBand, valueToYLog, valueToY, upsertDataPoint, unitsCaptionOffset, toCssGradientStop, titleBaselineFor, tint, suppressesCssFill, subscribeBarFacePicturePixelSamples, splitSeriesByAxis, splitLabelLines, shouldRenderRegionLabel, shouldRenderMajorGridlines, shade, setChartTextMeasurer, seriesColor, sequentialColorScale, sanitizeGradientStops, resolveVaryColorFill, resolveUntargetedBarFaceFill, resolveRegionEntityCode, resolveRegionCode, resolveMarkerLabelPlacement, resolveMarkerLabelAnchor, resolveManualLayoutRect, resolveLegendSwatchKind, resolveLegendPlacement, resolveLabelPosition, resolveExtrusionFaceFill, resolveDisplayedChartType, resolveDataPointPictureFill, resolveDataPointMarker, resolveDataPointFill, resolveDataPointExplosion, resolveDataLabelTextStyle, resolveDataLabelContent, resolveChartTitleTextStyle, resolveChartTitleRunSpans, resolveChartStyleDefaults, resolveChartPalette, resolveChartKind, resolveCategoryLabels, resolveBarLabelPlacement, resolveBarLabelAnchor, resolveBarFaceTargets, resolveBarFacePicturePixelColor, resolveActiveDataPointPicture, resetBarFacePicturePixelCacheForTests, reserveLegendSpace, radarRingPoints, radarAngle, primaryValueAxis, plotAreaFill, parseDrawingPercent, paletteColor, normalizeValue, normalizeStrokeDashType, normalizeHexColor, multiplyTextOrientationMatrices, measureChartTextWidth, manualTitleAnchor, manualLegendAnchor, manualLayoutOf, linePointsToSvgString, isTextOrientationMatrix, isSeriesOnSecondaryAxis, isPrimaryCategoryAxisAtTop, isParetoChart, hexToRgbChannels, hasSecondaryValueAxis, hasSecondaryCategoryAxis, hasManualLayoutFields, getTextCompensationTransform, getSvgStrokeDasharray, getSecondaryValueAxisId, getSecondaryValueAxis, getSecondaryCategoryAxis, getPrimaryValueAxisId, getPrimaryValueAxis, getPatternTile, getPatternSvg, getGradientTileRectCss, getGradientTileFlipCss, getElementTransformWithoutRotation, getElementTransform, getElementOrientationMatrix, getDisplayUnitLabel, getDisplayUnitDivisor, getCssBorderDashStyle, getComputedFillStyle, getCompoundLineStyle, getCompoundLineBoxShadow, getCompoundLineBorderWidth, getChartStylePalette, getCachedBarFacePicturePixelColor, getBarFacePicturePixelSampleVersion, generateMinorAxisTicks, generateLogTicks, generateAxisTicks, formatRegionMapValue, formatAxisValueWithUnits, formatAxisValue, fitTitleBand, fitPolynomial, findValueAxis, findPointLabel, findLogAxis, findDataPoint, estimateTextWidth, estimateChartTextWidth, ensureBarFacePicturePixelSampled, decodeFirstPixelColor, dataLabelFontOverride, dataLabelBoxSize, dataLabelBox, createArrayBufferCopy, convertOoxmlAngleToCss, computeValueRangeForChart, computeValueRangeForAxis, computeValueRange, computeTrendlinePrimitives, computeSunburstArcs, computeStackedValueRangeForAxis, computeStackedValueRange, computeStackedBarRects, computeScatterXDomain, computeScatterDots, computeRadarPoints, computeRSquared, computePlotLayout, computePieSlices, computePieSlicePath, computePieLayout, computeLogValueRange, computeLinearRegression, computeLinePoints, computeLayoutOptions, computeLayout, computeHistogramBars, computeHierarchicalSunburstArcs, computeGradientCenter, computeFunnelSegments, computeErrorBarPrimitives, computeDataTablePrimitives, computeDataTableHeight, computeChartLegendLayout, computeBubbleRadius, computeBoxWhiskerGeometry, computeBoxStats, computeBarRects, computeAxisTitlePrimitives, colorWithOpacity, collapseChartTitleRunsForEdit, clampUnitInterval, clampCropValue, chartTitleReservePx, chartTitleFontPx, chartTitleBandFor, chartTitleBand, chartTextFontFamily, chartTextBox, chartPreserveAspectRatio, chartPlotBounds, chartGridlinesState, chartGridlinesPatch, chartFrameToViewOffset, chartFontPx, chartAxisIndex, chartAreaFill, chartAreaCornerRadius, canvasFontFamily, buildZeroLine, buildWaterfallViewModel, buildValueAxisGridlinesAndLabels, buildTrendlineLegendSwatch, buildTreemapViewModel, buildSurfaceViewModel, buildSunburstViewModel, buildSubpathPaints, buildSubpathFillOverlay, buildStockViewModel, buildStockCloseLabel, buildShapePathGradient, buildSecondaryAxis, buildRegionMapViewModel, buildRegionMapEntries, buildReflectedGradientStops, buildRectPathGradientSvg, buildRectPathGradientImage, buildRectPathGradient, buildPrimaryAxis, buildPatternFillCss, buildPatternFill, buildLineLegendSwatch, buildLegend, buildHistogramViewModel, buildGridlinesAndLabels, buildGradientCss, buildFunnelViewModel, buildFallbackViewModel, buildDataLabelText, buildDashArray, buildCssGradientFromShapeStyle, buildComboViewModel, buildCirclePathGradient, buildChartViewModel, buildCategoryLabels, buildCartesianViewModel, buildBoxWhiskerViewModel, axisShowsMajorGridlines, applyLegendEntryOverrides, applyLabelManualLayout, applyDataPointPictureFills, adjustFillForMode, TEXT_ORIENTATION_IDENTITY, OOXML_PATTERN_PRESETS, LEGEND_MARKER_RADIUS, LEGEND_LINE_SWATCH_WIDTH, LEGACY_CHART_TITLE_BAND_PX, HYPERLINK_COLOR, DEFAULT_TEXT_FONT_SIZE, DEFAULT_TEXT_COLOR, DEFAULT_STROKE_COLOR, DEFAULT_PALETTE, DEFAULT_FONT_FAMILY, DEFAULT_FILL_COLOR, DEFAULT_CHART_TEXT_PX, DEFAULT_CHART_PALETTE, DEFAULT_CHART_DATA_LABEL_PX, DEFAULT_CHART_AREA_FILL, DEFAULT_CANVAS_WIDTH, DEFAULT_CANVAS_HEIGHT, DEFAULT_BODY_INSET_TB_PX, DEFAULT_BODY_INSET_LR_PX, DATA_TABLE_ROW_H, DATA_TABLE_PADDING, DATA_TABLE_KEY_W, DATA_TABLE_HEADER_H, DATA_LABEL_PAD_Y, DATA_LABEL_PAD_X, DATA_LABEL_LINE_HEIGHT, CHART_TITLE_TOP_INSET_PX, CHART_TITLE_FONT_PX, CHART_PX_PER_PT, applyParetoConversion, computeHistogramBins, orderParetoEntries, cumulativePercentOfTotal, DEFAULT_BAR_GAP_WIDTH, axisTickValues, niceValueAxisBounds, axisTargetIntervals } from './chunk-NTWYYXB2.mjs';
18
18
  import { tiltChannelsFromVectors, generateNibMarks, contentPartViewBox, buildInkStrokeView, buildContentPartStrokes } from './chunk-IB6ZM2E2.mjs';
19
19
  import { resolveInkWidth, resolveInkOpacity, resolveInkColor, pressuresToWidths, interpolateWidth, hasPressureVariation, getTotalReplayDuration, getInkStrokeReplayStyle, getInkReplayStyles, getContentPartReplayStyles, generatePressureCircles, extractPathPoints, estimatePathLength, buildInkReplayTimeline, MIN_REAL_STROKE_DURATION_MS, INK_REPLAY_KEYFRAME_NAME, INK_REPLAY_KEYFRAMES, DEFAULT_STROKE_DURATION_MS, DEFAULT_STROKE_DELAY_MS } from './chunk-JA7WYSRE.mjs';
20
20
  import { resolveContextMenuElementId, isInsideInlineEditor, INLINE_EDITOR_SELECTOR } from './chunk-V4YMLIGL.mjs';
21
21
  import { registerCustomFont, deriveCustomFontDescriptor, CUSTOM_FONT_EXTENSIONS, CUSTOM_FONT_ACCEPT } from './chunk-MNSWEXYO.mjs';
22
- import { withAuthoredStrokeWidths, watchDevicePixelRatio, snapshotThreeViewsIntoClone, settleThreeViews, screenStrokeWidth, screenBorder, resolveCustomProperties, removeUnsupportedFeatures, preprocessCssForCapture, prepareHtml2CanvasClone, prepareExportClone, parseBlurValue, neutralizeDeviceStrokes, isExportIgnoredElement, has3dTransform, flattenMixBlendMode, flattenBackdropFilter, flatten3dTransforms, flatten3dTransform, deviceStrokeStageStyle, defineThreeViewElement, computeThreeViewSize, THREE_VIEW_TAG, THREE_VIEW_SNAPSHOT_ATTR, THREE_VIEW_SETTLE_TIMEOUT_MS, THREE_VIEW_MARKER_ATTR, MAX_DEVICE_PIXEL_RATIO, DEVICE_PX_VAR, DEVICE_PIXEL_RATIO_VAR } from './chunk-XOMYHWQ3.mjs';
22
+ import { withAuthoredStrokeWidths, watchDevicePixelRatio, snapshotThreeViewsIntoClone, settleThreeViews, screenStrokeWidth, screenBorder, resolveCustomProperties, removeUnsupportedFeatures, preprocessCssForCapture, prepareHtml2CanvasClone, prepareExportClone, parseBlurValue, neutralizeDeviceStrokes, isExportIgnoredElement, has3dTransform, flattenMixBlendMode, flattenBackdropFilter, flatten3dTransforms, flatten3dTransform, deviceStrokeStageStyle, defineThreeViewElement, computeThreeViewSize, THREE_VIEW_TAG, THREE_VIEW_SNAPSHOT_ATTR, THREE_VIEW_SETTLE_TIMEOUT_MS, THREE_VIEW_MARKER_ATTR, MAX_DEVICE_PIXEL_RATIO, DEVICE_PX_VAR, DEVICE_PIXEL_RATIO_VAR } from './chunk-LF2X2AOK.mjs';
23
23
  import { threeViewOverflowFromNdc, overflowViewOffset, overflowPixelSize, overflowCanvasCss, hasThreeViewOverflow, NO_THREE_VIEW_OVERFLOW, MAX_VIEW_PIXELS, MAX_THREE_VIEW_OVERFLOW } from './chunk-2V5ATMMB.mjs';
24
24
  import { slideFileName, sanitizeFileName, pdfPageSize, pdfOrientation } from './chunk-A62C6PSL.mjs';
25
25
  import { validatePrintSettings, slideTitle, normalizeSlidesPerPage, hasHandoutChrome, handoutSlideRectCellsHtml, handoutChromeBoxesHtml, handoutBackgroundStyle, filterHiddenSlideIndices, estimatePageCount, effectiveOrientation, computeSlideIndices, computeSlideCount, computePrintPageCount, computeColorFilter, buildSlidesHtml, buildPrintHtmlDocument, buildOutlineHtml, buildNotesHtml, buildHandoutsHtml, DEFAULT_PRINT_SETTINGS, sanitizeMarkupOrEmpty } from './chunk-3ZI57W7O.mjs';
@@ -80033,9 +80033,34 @@ var OfficeUiGallery = class extends OfficeElement {
80033
80033
  return this.model;
80034
80034
  }
80035
80035
  set state(value) {
80036
- this.model = value ?? void 0;
80036
+ const next = value ?? void 0;
80037
+ const json = next ? JSON.stringify(next) : "";
80038
+ if (this.stateJson === json && this.hasUpdated) return;
80039
+ this.stateJson = json;
80040
+ this.model = next;
80041
+ this.pruneParsed(next);
80037
80042
  this.requestUpdate("state");
80038
80043
  }
80044
+ stateJson = "";
80045
+ /** The parsed preview of each tile, kept while its markup is unchanged so Lit leaves it alone. */
80046
+ parsed = /* @__PURE__ */ new Map();
80047
+ parsedPreview(slot, item5) {
80048
+ if (!item5.preview) return null;
80049
+ const key = `${slot}::${item5.id}`;
80050
+ const cached = this.parsed.get(key);
80051
+ if (cached?.markup === item5.preview) return cached.node;
80052
+ const node = parseSvgPreview(this.ownerDocument, item5.preview);
80053
+ this.parsed.set(key, { markup: item5.preview, node });
80054
+ return node;
80055
+ }
80056
+ /** Forget previews of tiles the new state no longer has. */
80057
+ pruneParsed(state) {
80058
+ const keep = /* @__PURE__ */ new Set();
80059
+ for (const item5 of state?.inline ?? []) keep.add(`inline::${item5.id}`);
80060
+ for (const section2 of state?.sections ?? [])
80061
+ for (const item5 of section2.items) keep.add(`${section2.title ?? ""}::${item5.id}`);
80062
+ for (const key of this.parsed.keys()) if (!keep.has(key)) this.parsed.delete(key);
80063
+ }
80039
80064
  get disabled() {
80040
80065
  return this.locked;
80041
80066
  }
@@ -80211,9 +80236,11 @@ var OfficeUiGallery = class extends OfficeElement {
80211
80236
  triggerIcon() {
80212
80237
  const name = this.model?.command?.icon ?? this.getAttribute("icon");
80213
80238
  if (!name) return null;
80214
- const svg2 = createIconSvg(this.ownerDocument);
80239
+ const svg2 = this.iconNode ??= createIconSvg(this.ownerDocument);
80215
80240
  return paintIcon(svg2, name) ? svg2 : null;
80216
80241
  }
80242
+ iconNode;
80243
+ emptyIcon;
80217
80244
  connectedCallback() {
80218
80245
  this.setAttribute("data-office-gallery", "");
80219
80246
  attachGalleryStyles(this);
@@ -80341,9 +80368,9 @@ var OfficeUiGallery = class extends OfficeElement {
80341
80368
  doc.removeEventListener("scroll", this.position, true);
80342
80369
  }
80343
80370
  // ---- Light-DOM template ---------------------------------------------------------------
80344
- tile(item5, width, height, disabled) {
80371
+ tile(slot, item5, width, height, disabled) {
80345
80372
  const { itemAttribute, compactAttribute } = this.constructor;
80346
- const preview = item5.preview ? parseSvgPreview(this.ownerDocument, item5.preview) : null;
80373
+ const preview = this.parsedPreview(slot, item5);
80347
80374
  return html$1`<button
80348
80375
  type="button"
80349
80376
  class="tile"
@@ -80387,7 +80414,7 @@ var OfficeUiGallery = class extends OfficeElement {
80387
80414
  const first = state?.sections[0];
80388
80415
  const inlineItems = state?.inline ?? first?.items ?? [];
80389
80416
  const triggerTitle = command2 ? command2.hint ?? title : inline2 ? state?.moreLabel ?? `More ${title}` : title;
80390
- const icon2 = this.triggerIcon() ?? createIconSvg(this.ownerDocument);
80417
+ const icon2 = this.triggerIcon() ?? (this.emptyIcon ??= createIconSvg(this.ownerDocument));
80391
80418
  const trigger = html$1`<button
80392
80419
  type="button"
80393
80420
  class="trigger${command2 ? " command" : ""}${command2?.large ? " command-large" : ""}"
@@ -80411,7 +80438,13 @@ var OfficeUiGallery = class extends OfficeElement {
80411
80438
  ${inline2 ? repeat(
80412
80439
  inlineItems,
80413
80440
  (item5) => item5.id,
80414
- (item5) => this.tile(item5, first?.tileWidth ?? 40, first?.tileHeight ?? 30, disabled)
80441
+ (item5) => this.tile(
80442
+ "inline",
80443
+ item5,
80444
+ first?.tileWidth ?? 40,
80445
+ first?.tileHeight ?? 30,
80446
+ disabled
80447
+ )
80415
80448
  ) : ""}
80416
80449
  </div>
80417
80450
  ${trigger}${this.opened ? popup : ""}${this.menuTemplate()}
@@ -80440,7 +80473,7 @@ var OfficeUiGallery = class extends OfficeElement {
80440
80473
  ${repeat(
80441
80474
  section2.items,
80442
80475
  (item5) => item5.id,
80443
- (item5) => this.tile(item5, section2.tileWidth, section2.tileHeight, disabled)
80476
+ (item5) => this.tile(section2.title ?? "", item5, section2.tileWidth, section2.tileHeight, disabled)
80444
80477
  )}
80445
80478
  </div>
80446
80479
  </section>`;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkCEH63AZB_cjs = require('./chunk-CEH63AZB.cjs');
3
+ var chunkHKHO4GDD_cjs = require('./chunk-HKHO4GDD.cjs');
4
4
 
5
5
  // src/pptx/render/chart-interaction-radar.ts
6
6
  function buildRadarDragGeometry(element, chartData, categoryLabels, pointIndex) {
@@ -11,7 +11,7 @@ function buildRadarDragGeometry(element, chartData, categoryLabels, pointIndex)
11
11
  if (pointIndex < 0 || pointIndex >= catCount) {
12
12
  return null;
13
13
  }
14
- const layout = chunkCEH63AZB_cjs.computePlotLayout(element.width, element.height, chartData, false), cx = layout.plotLeft + layout.plotWidth / 2, cy = layout.plotTop + layout.plotHeight / 2, radius = Math.max(Math.min(layout.plotWidth, layout.plotHeight) / 2 - 4, 1), maxVal = Math.max(1, ...chartData.series.flatMap((s) => s.values.map((v) => Math.abs(v)))), angle = chunkCEH63AZB_cjs.radarAngle(pointIndex, catCount);
14
+ const layout = chunkHKHO4GDD_cjs.computePlotLayout(element.width, element.height, chartData, false), cx = layout.plotLeft + layout.plotWidth / 2, cy = layout.plotTop + layout.plotHeight / 2, radius = Math.max(Math.min(layout.plotWidth, layout.plotHeight) / 2 - 4, 1), maxVal = Math.max(1, ...chartData.series.flatMap((s) => s.values.map((v) => Math.abs(v)))), angle = chunkHKHO4GDD_cjs.radarAngle(pointIndex, catCount);
15
15
  return { cx, cy, radius, maxVal, angle };
16
16
  }
17
17
  function resolveRadarDragValue(geometry, pointerX, pointerY) {
@@ -35,13 +35,13 @@ function buildStackedDragGeometry(element, chartData, seriesIndex, pointIndex) {
35
35
  chartData.categories.length,
36
36
  ...seriesValues.map((values) => values.length),
37
37
  pointIndex + 1
38
- ), plots = chunkCEH63AZB_cjs.computeStackedSeriesPlots(seriesValues, catCount, percent), baseValue = plots[seriesIndex]?.base[pointIndex] ?? 0, otherAbsSum = seriesValues.reduce(
38
+ ), plots = chunkHKHO4GDD_cjs.computeStackedSeriesPlots(seriesValues, catCount, percent), baseValue = plots[seriesIndex]?.base[pointIndex] ?? 0, otherAbsSum = seriesValues.reduce(
39
39
  (sum, values, si) => si === seriesIndex ? sum : sum + Math.abs(values[pointIndex] ?? 0),
40
40
  0
41
- ), layoutOpts = chunkCEH63AZB_cjs.computeLayoutOptions(chartData.axes, chartData.dataTable, chartData.series.length), layout = chunkCEH63AZB_cjs.computePlotLayout(element.width, element.height, chartData, true, layoutOpts), range = chunkCEH63AZB_cjs.computeStackedValueRangeForAxis(
41
+ ), layoutOpts = chunkHKHO4GDD_cjs.computeLayoutOptions(chartData.axes, chartData.dataTable, chartData.series.length), layout = chunkHKHO4GDD_cjs.computePlotLayout(element.width, element.height, chartData, true, layoutOpts), range = chunkHKHO4GDD_cjs.computeStackedValueRangeForAxis(
42
42
  chartData.series,
43
43
  catCount,
44
- chunkCEH63AZB_cjs.primaryValueAxis(chartData.axes),
44
+ chunkHKHO4GDD_cjs.primaryValueAxis(chartData.axes),
45
45
  percent,
46
46
  layout.autoPlotHeight
47
47
  );
@@ -156,7 +156,7 @@ function dragValueForPart(viewY, drag, seriesIndex) {
156
156
  return roundDragValue(valueFromY(viewY, range, drag.plotTop, drag.plotBottom), range);
157
157
  }
158
158
  function dragAnchorViewY(value, drag, seriesIndex) {
159
- return chunkCEH63AZB_cjs.valueToY2(value, rangeForSeries(drag, seriesIndex), drag.plotTop, drag.plotBottom);
159
+ return chunkHKHO4GDD_cjs.valueToY2(value, rangeForSeries(drag, seriesIndex), drag.plotTop, drag.plotBottom);
160
160
  }
161
161
  function withChartPointValue(chartData, seriesIndex, pointIndex, value) {
162
162
  const series = chartData.series[seriesIndex];
@@ -177,7 +177,7 @@ function withChartTitle(chartData, title) {
177
177
  // A multi-run title collapses to one run in its dominant style so this
178
178
  // edit does not leave another, now-stale run's text trailing the new
179
179
  // title; see `collapseChartTitleRunsForEdit`'s doc.
180
- ...chunkCEH63AZB_cjs.collapseChartTitleRunsForEdit(chartData, trimmed),
180
+ ...chunkHKHO4GDD_cjs.collapseChartTitleRunsForEdit(chartData, trimmed),
181
181
  style: { ...chartData.style, hasTitle: trimmed.length > 0 }
182
182
  };
183
183
  }
@@ -223,7 +223,7 @@ function buildPieDragGeometry(element, chartData, pointIndex) {
223
223
  if (!series || pointIndex < 0 || pointIndex >= series.values.length) {
224
224
  return null;
225
225
  }
226
- const isDoughnut = chartData.chartType === "doughnut", { cx, cy } = chunkCEH63AZB_cjs.computePieLayout(element.width, element.height, chartData, isDoughnut), startAngle = -Math.PI / 2 + (chartData.firstSliceAngle ?? 0) * Math.PI / 180;
226
+ const isDoughnut = chartData.chartType === "doughnut", { cx, cy } = chunkHKHO4GDD_cjs.computePieLayout(element.width, element.height, chartData, isDoughnut), startAngle = -Math.PI / 2 + (chartData.firstSliceAngle ?? 0) * Math.PI / 180;
227
227
  return { cx, cy, values: series.values, pointIndex, startAngle };
228
228
  }
229
229
  function resolvePieSliceShareValue(pointerAngle, leadingAngle, values, pointIndex) {
@@ -628,7 +628,7 @@ function renderChartTextSvg(doc, text) {
628
628
  return el;
629
629
  }
630
630
  function appendChartLegendSvg(doc, svg, vm, translate) {
631
- chunkCEH63AZB_cjs.computeChartLegendLayout(vm, translate).forEach((item) => {
631
+ chunkHKHO4GDD_cjs.computeChartLegendLayout(vm, translate).forEach((item) => {
632
632
  const g = createSvgEl(doc, "g", {
633
633
  class: "pptxv-chart-legend-item",
634
634
  transform: `translate(${item.x.toFixed(1)},${item.y.toFixed(1)})`
@@ -942,7 +942,7 @@ function buildBarChart3DHoverTooltip(hit, data) {
942
942
  if (!hit) {
943
943
  return void 0;
944
944
  }
945
- return chunkCEH63AZB_cjs.buildMarkTooltip(
945
+ return chunkHKHO4GDD_cjs.buildMarkTooltip(
946
946
  data.seriesNames[hit.seriesIndex],
947
947
  data.categoryLabels[hit.categoryIndex],
948
948
  hit.value,
@@ -955,7 +955,7 @@ function formatValueLabel(chartData, grouping, v) {
955
955
  if (grouping === "percentStacked") {
956
956
  return `${Math.round(v * 100)}%`;
957
957
  }
958
- return chunkCEH63AZB_cjs.formatAxisValueWithUnits(
958
+ return chunkHKHO4GDD_cjs.formatAxisValueWithUnits(
959
959
  v,
960
960
  chartData.axes?.find((a) => a.axisType === "valAx")
961
961
  );
@@ -1039,7 +1039,7 @@ function buildGridlines(layout) {
1039
1039
  const { w, h, d } = layout.box;
1040
1040
  const lines = [];
1041
1041
  const span = layout.range.max - layout.range.min;
1042
- for (const v of chunkCEH63AZB_cjs.axisTickValues({ ...layout.range, span })) {
1042
+ for (const v of chunkHKHO4GDD_cjs.axisTickValues({ ...layout.range, span })) {
1043
1043
  const p = valuePos(layout, v);
1044
1044
  if (layout.horizontal) {
1045
1045
  lines.push({ from: [p, 0, d], to: [p, h, d] }, { from: [p, 0, 0], to: [p, 0, d] });
@@ -114,7 +114,7 @@ async function loadChart3DThree() {
114
114
 
115
115
  // src/pptx/three-view/scene-registry.ts
116
116
  var loaders = {
117
- chart: async () => (await import('./chart-3d-view-scene-3HDRDXX6.cjs')).mountChart3DView,
117
+ chart: async () => (await import('./chart-3d-view-scene-4GGMVQNN.cjs')).mountChart3DView,
118
118
  smartart: async () => (await import('./view-scene-CKYHS2OP.cjs')).mountSmartArt3DView
119
119
  };
120
120
  async function loadThreeViewScene(kind) {