@extend-ai/react-xlsx 0.20.1 → 0.20.3

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 (99) hide show
  1. package/dist/browser-B73UAN6E.cjs +232 -0
  2. package/dist/browser-B73UAN6E.cjs.map +1 -0
  3. package/dist/browser-KWIEUO2X.js +228 -0
  4. package/dist/browser-KWIEUO2X.js.map +1 -0
  5. package/dist/{chart-renderer-K6GORT3R.cjs → chart-renderer-2EKXNHUD.cjs} +286 -365
  6. package/dist/chart-renderer-2EKXNHUD.cjs.map +1 -0
  7. package/dist/{chart-renderer-K2VM257E.cjs → chart-renderer-W7XW24JI.cjs} +526 -604
  8. package/dist/chart-renderer-W7XW24JI.cjs.map +1 -0
  9. package/dist/{chart-renderer-KGLAI4DN.js → chart-renderer-XBF7EPUS.js} +13 -92
  10. package/dist/chart-renderer-XBF7EPUS.js.map +1 -0
  11. package/dist/{chart-renderer-RXO7WP4Q.js → chart-renderer-ZLJVPLGN.js} +23 -101
  12. package/dist/chart-renderer-ZLJVPLGN.js.map +1 -0
  13. package/dist/{chunk-2MVEKDY2.cjs → chunk-6IGWCJU5.cjs} +25 -9
  14. package/dist/chunk-6IGWCJU5.cjs.map +1 -0
  15. package/dist/chunk-A4S3AMON.js +108 -0
  16. package/dist/chunk-A4S3AMON.js.map +1 -0
  17. package/dist/chunk-AJT23BDP.js +111 -0
  18. package/dist/chunk-AJT23BDP.js.map +1 -0
  19. package/dist/{chunk-CJBI5F6V.cjs → chunk-AZWBTFJI.cjs} +12 -93
  20. package/dist/chunk-AZWBTFJI.cjs.map +1 -0
  21. package/dist/{chunk-GXJO6CK6.js → chunk-HEEFCVWS.js} +40 -12
  22. package/dist/chunk-HEEFCVWS.js.map +1 -0
  23. package/dist/{chunk-3JTCYAUX.js → chunk-HKMFMIKE.js} +14 -3
  24. package/dist/chunk-HKMFMIKE.js.map +1 -0
  25. package/dist/chunk-IDNIGBUM.cjs +108 -0
  26. package/dist/chunk-IDNIGBUM.cjs.map +1 -0
  27. package/dist/chunk-M55TBS4X.cjs +111 -0
  28. package/dist/chunk-M55TBS4X.cjs.map +1 -0
  29. package/dist/{chunk-NBH72POD.js → chunk-PUI6QI4U.js} +11 -92
  30. package/dist/chunk-PUI6QI4U.js.map +1 -0
  31. package/dist/{chunk-WSQDFXDW.js → chunk-VG4JELEQ.js} +22 -6
  32. package/dist/chunk-VG4JELEQ.js.map +1 -0
  33. package/dist/{chunk-54YBFWL3.cjs → chunk-WGRRI25I.cjs} +14 -3
  34. package/dist/chunk-WGRRI25I.cjs.map +1 -0
  35. package/dist/{chunk-HAHCVXCU.cjs → chunk-XISBYOD5.cjs} +787 -759
  36. package/dist/chunk-XISBYOD5.cjs.map +1 -0
  37. package/dist/index.cjs +22 -3
  38. package/dist/index.cjs.map +1 -1
  39. package/dist/index.d.cts +10 -0
  40. package/dist/index.d.ts +10 -0
  41. package/dist/index.js +22 -3
  42. package/dist/index.js.map +1 -1
  43. package/dist/{internal-trWFv9In.d.cts → internal-BJsg5os3.d.cts} +10 -0
  44. package/dist/{internal-trWFv9In.d.ts → internal-BJsg5os3.d.ts} +10 -0
  45. package/dist/internal.cjs +5 -4
  46. package/dist/internal.cjs.map +1 -1
  47. package/dist/internal.d.cts +1 -1
  48. package/dist/internal.d.ts +1 -1
  49. package/dist/internal.js +4 -3
  50. package/dist/office_charts_bg.wasm +0 -0
  51. package/dist/payload-JBPE7GEG.cjs +8 -0
  52. package/dist/payload-JBPE7GEG.cjs.map +1 -0
  53. package/dist/payload-KYNCVJT5.js +6 -0
  54. package/dist/payload-KYNCVJT5.js.map +1 -0
  55. package/dist/preact-LICENSE.txt +21 -0
  56. package/dist/region-map-geography-24TXETDP.cjs +184 -0
  57. package/dist/region-map-geography-24TXETDP.cjs.map +1 -0
  58. package/dist/region-map-geography-OR6DHAF7.js +182 -0
  59. package/dist/region-map-geography-OR6DHAF7.js.map +1 -0
  60. package/dist/rust-office-charts-LICENSE.txt +21 -0
  61. package/dist/shared-chart-3STFRVWT.js +215 -0
  62. package/dist/shared-chart-3STFRVWT.js.map +1 -0
  63. package/dist/shared-chart-BFQNYOIQ.js +221 -0
  64. package/dist/shared-chart-BFQNYOIQ.js.map +1 -0
  65. package/dist/shared-chart-DVC5S2P6.cjs +222 -0
  66. package/dist/shared-chart-DVC5S2P6.cjs.map +1 -0
  67. package/dist/shared-chart-MFQSQG4K.cjs +216 -0
  68. package/dist/shared-chart-MFQSQG4K.cjs.map +1 -0
  69. package/dist/{surface-regl-2NNG62KS.cjs → surface-regl-BBJ6OIKK.cjs} +14 -12
  70. package/dist/surface-regl-BBJ6OIKK.cjs.map +1 -0
  71. package/dist/{surface-regl-TJUWTLAZ.js → surface-regl-R2N54JT2.js} +7 -5
  72. package/dist/{surface-regl-TJUWTLAZ.js.map → surface-regl-R2N54JT2.js.map} +1 -1
  73. package/dist/us-atlas-LICENSE.txt +13 -0
  74. package/dist/vanilla.cjs +5 -4
  75. package/dist/vanilla.cjs.map +1 -1
  76. package/dist/vanilla.d.cts +2 -2
  77. package/dist/vanilla.d.ts +2 -2
  78. package/dist/vanilla.js +4 -3
  79. package/dist/world-atlas-LICENSE.txt +13 -0
  80. package/dist/xlsx-worker.js +15 -0
  81. package/dist/xlsx-worker.js.map +1 -1
  82. package/package.json +9 -7
  83. package/dist/chart-renderer-K2VM257E.cjs.map +0 -1
  84. package/dist/chart-renderer-K6GORT3R.cjs.map +0 -1
  85. package/dist/chart-renderer-KGLAI4DN.js.map +0 -1
  86. package/dist/chart-renderer-RXO7WP4Q.js.map +0 -1
  87. package/dist/chunk-2MVEKDY2.cjs.map +0 -1
  88. package/dist/chunk-3JTCYAUX.js.map +0 -1
  89. package/dist/chunk-54YBFWL3.cjs.map +0 -1
  90. package/dist/chunk-CJBI5F6V.cjs.map +0 -1
  91. package/dist/chunk-GXJO6CK6.js.map +0 -1
  92. package/dist/chunk-HAHCVXCU.cjs.map +0 -1
  93. package/dist/chunk-NBH72POD.js.map +0 -1
  94. package/dist/chunk-WSQDFXDW.js.map +0 -1
  95. package/dist/region-map-geography-VEN5CPRS.cjs +0 -184
  96. package/dist/region-map-geography-VEN5CPRS.cjs.map +0 -1
  97. package/dist/region-map-geography-YD54DI3H.js +0 -182
  98. package/dist/region-map-geography-YD54DI3H.js.map +0 -1
  99. package/dist/surface-regl-2NNG62KS.cjs.map +0 -1
@@ -2,7 +2,12 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk54YBFWL3cjs = require('./chunk-54YBFWL3.cjs');
5
+ var _chunkWGRRI25Icjs = require('./chunk-WGRRI25I.cjs');
6
+
7
+
8
+
9
+
10
+ var _chunkIDNIGBUMcjs = require('./chunk-IDNIGBUM.cjs');
6
11
 
7
12
 
8
13
 
@@ -36,14 +41,14 @@ var _d3shape = require('d3-shape');
36
41
  var _jsxruntime = require('react/jsx-runtime');
37
42
 
38
43
  function RegionMapPlot({ chart, palette, layout, selectedChartElement }) {
39
- const resources = _chunk54YBFWL3cjs.useChartModule.call(void 0, _chunk54YBFWL3cjs.regionMapResources);
44
+ const resources = _chunkWGRRI25Icjs.useChartModule.call(void 0, _chunkWGRRI25Icjs.regionMapResources);
40
45
  return resources ? renderRegionMapChart(chart, palette, layout, selectedChartElement, resources) : null;
41
46
  }
42
47
  function SurfaceChartComposite({
43
48
  loadingFallback,
44
49
  ...props
45
50
  }) {
46
- const renderer = _chunk54YBFWL3cjs.useChartModule.call(void 0, _chunk54YBFWL3cjs.surfaceRenderer);
51
+ const renderer = _chunkWGRRI25Icjs.useChartModule.call(void 0, _chunkWGRRI25Icjs.surfaceRenderer);
47
52
  return renderer ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, renderer.MemoSurfaceChartComposite, { ...props }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: loadingFallback });
48
53
  }
49
54
  function chartElementDataProps(seriesIndex, pointIndex, options) {
@@ -60,84 +65,14 @@ function chartElementDataProps(seriesIndex, pointIndex, options) {
60
65
  function barChartElementDataProps(seriesIndex, pointIndex) {
61
66
  return chartElementDataProps(seriesIndex, pointIndex, { selectionMode: "seriesFirst" });
62
67
  }
63
- function resolveChartElementTarget(target) {
64
- if (!(target instanceof Element)) {
65
- return null;
66
- }
67
- return target.closest("[data-xlsx-chart-series-index]");
68
- }
69
- function resolveChartSelectionFromTarget(chart, target, selectedChartElement) {
70
- const element = resolveChartElementTarget(target);
71
- if (!element) {
72
- return _optionalChain([selectedChartElement, 'optionalAccess', _4 => _4.chartId]) === chart.id ? { chartId: chart.id, kind: "chart" } : { chartId: chart.id, kind: "chart" };
73
- }
74
- const seriesIndex = Number(element.dataset.xlsxChartSeriesIndex);
75
- if (!Number.isInteger(seriesIndex) || seriesIndex < 0 || seriesIndex >= chart.series.length) {
76
- return null;
77
- }
78
- const series = chart.series[seriesIndex];
79
- if (!series) {
80
- return null;
81
- }
82
- const rawPointIndex = element.dataset.xlsxChartPointIndex;
83
- const rawElementKind = element.dataset.xlsxChartElementKind;
84
- const selectionMode = element.dataset.xlsxChartSelectionMode;
85
- const pointIndex = rawPointIndex == null || rawPointIndex === "" ? null : Number(rawPointIndex);
86
- const hasPoint = pointIndex != null && Number.isInteger(pointIndex) && pointIndex >= 0;
87
- const sameSelectedSeries = _optionalChain([selectedChartElement, 'optionalAccess', _5 => _5.chartId]) === chart.id && selectedChartElement.kind !== "chart" && selectedChartElement.seriesIndex === seriesIndex;
88
- if (hasPoint && (selectionMode !== "seriesFirst" || sameSelectedSeries)) {
89
- return {
90
- chartId: chart.id,
91
- kind: "point",
92
- pointIndex,
93
- seriesId: series.id,
94
- seriesIndex
95
- };
96
- }
97
- return {
98
- chartId: chart.id,
99
- kind: rawElementKind === "legendEntry" ? "legendEntry" : "series",
100
- seriesId: series.id,
101
- seriesIndex
102
- };
103
- }
104
68
  function isSelectedChartSeries(selectedChartElement, chartId, seriesIndex) {
105
- return _optionalChain([selectedChartElement, 'optionalAccess', _6 => _6.chartId]) === chartId && selectedChartElement.kind !== "chart" && selectedChartElement.seriesIndex === seriesIndex;
69
+ return _optionalChain([selectedChartElement, 'optionalAccess', _4 => _4.chartId]) === chartId && selectedChartElement.kind !== "chart" && selectedChartElement.seriesIndex === seriesIndex;
106
70
  }
107
71
  function isSelectedChartPoint(selectedChartElement, chartId, seriesIndex, pointIndex) {
108
- return _optionalChain([selectedChartElement, 'optionalAccess', _7 => _7.chartId]) === chartId && selectedChartElement.kind === "point" && selectedChartElement.seriesIndex === seriesIndex && selectedChartElement.pointIndex === pointIndex;
72
+ return _optionalChain([selectedChartElement, 'optionalAccess', _5 => _5.chartId]) === chartId && selectedChartElement.kind === "point" && selectedChartElement.seriesIndex === seriesIndex && selectedChartElement.pointIndex === pointIndex;
109
73
  }
110
74
  function isSelectedChartPointOrSeries(selectedChartElement, chartId, seriesIndex, pointIndex) {
111
- return isSelectedChartPoint(selectedChartElement, chartId, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chartId, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _8 => _8.kind]) !== "point";
112
- }
113
- function renderSelectionRectHandles(key, left, top, width, height, color = "#64748b") {
114
- return renderSelectionPointHandles(
115
- key,
116
- [
117
- { x: left, y: top },
118
- { x: left + width, y: top },
119
- { x: left, y: top + height },
120
- { x: left + width, y: top + height }
121
- ],
122
- color
123
- );
124
- }
125
- function renderSelectionPointHandles(key, points, color = "#64748b") {
126
- const radius = 3;
127
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "g", { pointerEvents: "none", children: points.map((point, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
128
- "circle",
129
- {
130
- cx: point.x,
131
- cy: point.y,
132
- fill: "#ffffff",
133
- r: radius,
134
- stroke: color,
135
- strokeWidth: 1.1,
136
- style: { filter: "drop-shadow(0 1px 2px rgba(15, 23, 42, 0.18))" },
137
- vectorEffect: "non-scaling-stroke"
138
- },
139
- `${key}-handle-${index}`
140
- )) }, key);
75
+ return isSelectedChartPoint(selectedChartElement, chartId, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chartId, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _6 => _6.kind]) !== "point";
141
76
  }
142
77
  function parseRgbColor(color) {
143
78
  const match = /^#?([0-9a-f]{6})$/i.exec(color);
@@ -230,23 +165,23 @@ function safeNumber(value) {
230
165
  }
231
166
  function chartSeriesColor(chart, seriesIndex) {
232
167
  const series = chart.series[seriesIndex];
233
- const paletteColor = _optionalChain([chart, 'access', _9 => _9.chartColorPalette, 'optionalAccess', _10 => _10[seriesIndex % Math.max(1, chart.chartColorPalette.length)]]);
234
- return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'optionalAccess', _11 => _11.color]), () => ( _optionalChain([series, 'optionalAccess', _12 => _12.lineColor]))), () => ( paletteColor)), () => ( chart.textColor)), () => ( "#222222"));
168
+ const paletteColor = _optionalChain([chart, 'access', _7 => _7.chartColorPalette, 'optionalAccess', _8 => _8[seriesIndex % Math.max(1, chart.chartColorPalette.length)]]);
169
+ return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'optionalAccess', _9 => _9.color]), () => ( _optionalChain([series, 'optionalAccess', _10 => _10.lineColor]))), () => ( paletteColor)), () => ( chart.textColor)), () => ( "#222222"));
235
170
  }
236
171
  function chartSeriesStrokeColor(chart, seriesIndex) {
237
172
  const series = chart.series[seriesIndex];
238
- const paletteColor = _optionalChain([chart, 'access', _13 => _13.chartColorPalette, 'optionalAccess', _14 => _14[seriesIndex % Math.max(1, chart.chartColorPalette.length)]]);
239
- return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'optionalAccess', _15 => _15.lineColor]), () => ( _optionalChain([series, 'optionalAccess', _16 => _16.color]))), () => ( paletteColor)), () => ( chart.textColor)), () => ( "#222222"));
173
+ const paletteColor = _optionalChain([chart, 'access', _11 => _11.chartColorPalette, 'optionalAccess', _12 => _12[seriesIndex % Math.max(1, chart.chartColorPalette.length)]]);
174
+ return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'optionalAccess', _13 => _13.lineColor]), () => ( _optionalChain([series, 'optionalAccess', _14 => _14.color]))), () => ( paletteColor)), () => ( chart.textColor)), () => ( "#222222"));
240
175
  }
241
176
  function variesBarColorsByCategory(chart) {
242
177
  return chart.series.length === 1 && chart.varyColors !== false && !chart.chartExLayout && ["ColumnClustered", "ColumnStacked", "ColumnPercentStacked", "BarClustered", "BarStacked", "BarPercentStacked"].includes(chart.chartType);
243
178
  }
244
179
  function chartPointColor(chart, pointIndex, seriesIndex = 0) {
245
- const pointStyle = _optionalChain([chart, 'access', _17 => _17.series, 'access', _18 => _18[seriesIndex], 'optionalAccess', _19 => _19.dataPointStyles, 'optionalAccess', _20 => _20.find, 'call', _21 => _21((entry) => entry.index === pointIndex)]);
246
- if (_optionalChain([pointStyle, 'optionalAccess', _22 => _22.color])) {
180
+ const pointStyle = _optionalChain([chart, 'access', _15 => _15.series, 'access', _16 => _16[seriesIndex], 'optionalAccess', _17 => _17.dataPointStyles, 'optionalAccess', _18 => _18.find, 'call', _19 => _19((entry) => entry.index === pointIndex)]);
181
+ if (_optionalChain([pointStyle, 'optionalAccess', _20 => _20.color])) {
247
182
  return pointStyle.color;
248
183
  }
249
- const rawPoint = _optionalChain([chart, 'access', _23 => _23.series, 'access', _24 => _24[seriesIndex], 'optionalAccess', _25 => _25.dataPoints, 'optionalAccess', _26 => _26[pointIndex]]);
184
+ const rawPoint = _optionalChain([chart, 'access', _21 => _21.series, 'access', _22 => _22[seriesIndex], 'optionalAccess', _23 => _23.dataPoints, 'optionalAccess', _24 => _24[pointIndex]]);
250
185
  if (rawPoint && typeof rawPoint === "object") {
251
186
  const pointRecord = rawPoint;
252
187
  if (typeof pointRecord.color === "string") {
@@ -269,8 +204,8 @@ function chartPointColor(chart, pointIndex, seriesIndex = 0) {
269
204
  }
270
205
  }
271
206
  }
272
- const themeColors = _optionalChain([chart, 'access', _27 => _27.raw, 'optionalAccess', _28 => _28.builtinThemeColors]);
273
- const pointCount = Math.max(1, _nullishCoalesce(_optionalChain([chart, 'access', _29 => _29.series, 'access', _30 => _30[seriesIndex], 'optionalAccess', _31 => _31.values, 'access', _32 => _32.length]), () => ( 0)));
207
+ const themeColors = _optionalChain([chart, 'access', _25 => _25.raw, 'optionalAccess', _26 => _26.builtinThemeColors]);
208
+ const pointCount = Math.max(1, _nullishCoalesce(_optionalChain([chart, 'access', _27 => _27.series, 'access', _28 => _28[seriesIndex], 'optionalAccess', _29 => _29.values, 'access', _30 => _30.length]), () => ( 0)));
274
209
  const builtinColor = themeColors ? _chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _chunk5ERNVHSOcjs.getBuiltinChartColor.call(void 0, chart.chartStyleId, pointIndex, pointCount), themeColors) : void 0;
275
210
  if (builtinColor) return builtinColor;
276
211
  const palette = chart.chartColorPalette;
@@ -281,14 +216,14 @@ function chartPointColor(chart, pointIndex, seriesIndex = 0) {
281
216
  return chartSeriesColor(chart, seriesIndex);
282
217
  }
283
218
  function isHistogramLikeSeries(series) {
284
- const raw = _optionalChain([series, 'optionalAccess', _33 => _33.raw]) && typeof series.raw === "object" ? series.raw : null;
285
- return Array.isArray(_optionalChain([raw, 'optionalAccess', _34 => _34.chartExHistogramBins])) && raw.chartExHistogramBins.length > 0;
219
+ const raw = _optionalChain([series, 'optionalAccess', _31 => _31.raw]) && typeof series.raw === "object" ? series.raw : null;
220
+ return Array.isArray(_optionalChain([raw, 'optionalAccess', _32 => _32.chartExHistogramBins])) && raw.chartExHistogramBins.length > 0;
286
221
  }
287
222
  function isHistogramLikeChart(chart) {
288
223
  return chart.series.some((series) => isHistogramLikeSeries(series));
289
224
  }
290
225
  function resolveRegionMapBaseColor(chart, seriesIndex) {
291
- return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _35 => _35.series, 'access', _36 => _36[seriesIndex], 'optionalAccess', _37 => _37.color]), () => ( _optionalChain([chart, 'access', _38 => _38.series, 'access', _39 => _39[seriesIndex], 'optionalAccess', _40 => _40.lineColor]))), () => ( _optionalChain([chart, 'access', _41 => _41.chartColorPalette, 'optionalAccess', _42 => _42[0]]))), () => ( chartSeriesColor(chart, seriesIndex)));
226
+ return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _33 => _33.series, 'access', _34 => _34[seriesIndex], 'optionalAccess', _35 => _35.color]), () => ( _optionalChain([chart, 'access', _36 => _36.series, 'access', _37 => _37[seriesIndex], 'optionalAccess', _38 => _38.lineColor]))), () => ( _optionalChain([chart, 'access', _39 => _39.chartColorPalette, 'optionalAccess', _40 => _40[0]]))), () => ( chartSeriesColor(chart, seriesIndex)));
292
227
  }
293
228
  function resolveRegionMapDataColor(chart, seriesIndex) {
294
229
  const pointColor = normalizeRendererHexColor(chartPointColor(chart, 0, seriesIndex));
@@ -305,21 +240,21 @@ function resolveRegionMapDataColor(chart, seriesIndex) {
305
240
  return paletteColor;
306
241
  }
307
242
  }
308
- return _nullishCoalesce(normalizeRendererHexColor(_nullishCoalesce(_optionalChain([chart, 'access', _43 => _43.series, 'access', _44 => _44[seriesIndex], 'optionalAccess', _45 => _45.color]), () => ( _optionalChain([chart, 'access', _46 => _46.series, 'access', _47 => _47[seriesIndex], 'optionalAccess', _48 => _48.lineColor])))), () => ( "#4f81bd"));
243
+ return _nullishCoalesce(normalizeRendererHexColor(_nullishCoalesce(_optionalChain([chart, 'access', _41 => _41.series, 'access', _42 => _42[seriesIndex], 'optionalAccess', _43 => _43.color]), () => ( _optionalChain([chart, 'access', _44 => _44.series, 'access', _45 => _45[seriesIndex], 'optionalAccess', _46 => _46.lineColor])))), () => ( "#4f81bd"));
309
244
  }
310
245
  function resolveRegionMapValueColors(series) {
311
- const raw = _optionalChain([series, 'optionalAccess', _49 => _49.raw]) && typeof series.raw === "object" ? series.raw : null;
312
- const colors = Array.isArray(_optionalChain([raw, 'optionalAccess', _50 => _50.valueColors])) ? raw.valueColors.map((value) => normalizeRendererHexColor(value)).filter((value) => Boolean(value)) : [];
246
+ const raw = _optionalChain([series, 'optionalAccess', _47 => _47.raw]) && typeof series.raw === "object" ? series.raw : null;
247
+ const colors = Array.isArray(_optionalChain([raw, 'optionalAccess', _48 => _48.valueColors])) ? raw.valueColors.map((value) => normalizeRendererHexColor(value)).filter((value) => Boolean(value)) : [];
313
248
  return colors.length >= 2 ? colors : null;
314
249
  }
315
250
  function resolveRegionMapColorStrings(series) {
316
- const raw = _optionalChain([series, 'optionalAccess', _51 => _51.raw]) && typeof series.raw === "object" ? series.raw : null;
317
- const values = Array.isArray(_optionalChain([raw, 'optionalAccess', _52 => _52.chartExColorStrings])) ? raw.chartExColorStrings.map((value) => typeof value === "string" ? value.trim() : "") : [];
251
+ const raw = _optionalChain([series, 'optionalAccess', _49 => _49.raw]) && typeof series.raw === "object" ? series.raw : null;
252
+ const values = Array.isArray(_optionalChain([raw, 'optionalAccess', _50 => _50.chartExColorStrings])) ? raw.chartExColorStrings.map((value) => typeof value === "string" ? value.trim() : "") : [];
318
253
  return values.some((value) => value.length > 0) ? values : null;
319
254
  }
320
255
  function resolveRegionMapLayoutProperties(series) {
321
- const raw = _optionalChain([series, 'optionalAccess', _53 => _53.raw]) && typeof series.raw === "object" ? series.raw : null;
322
- return _optionalChain([raw, 'optionalAccess', _54 => _54.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
256
+ const raw = _optionalChain([series, 'optionalAccess', _51 => _51.raw]) && typeof series.raw === "object" ? series.raw : null;
257
+ return _optionalChain([raw, 'optionalAccess', _52 => _52.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
323
258
  }
324
259
  function resolveRegionMapValueColorFromStops(stops, ratio) {
325
260
  if (stops.length === 0) {
@@ -361,7 +296,7 @@ function buildRegionMapLegendItems(chart) {
361
296
  label: value
362
297
  }));
363
298
  }
364
- const values = (_nullishCoalesce(_optionalChain([chart, 'access', _55 => _55.series, 'access', _56 => _56[primarySeriesIndex], 'optionalAccess', _57 => _57.values]), () => ( []))).map((value) => safeNumber(value)).filter((value) => value != null);
299
+ const values = (_nullishCoalesce(_optionalChain([chart, 'access', _53 => _53.series, 'access', _54 => _54[primarySeriesIndex], 'optionalAccess', _55 => _55.values]), () => ( []))).map((value) => safeNumber(value)).filter((value) => value != null);
365
300
  if (values.length === 0) {
366
301
  return [];
367
302
  }
@@ -379,12 +314,12 @@ function normalizeBuiltinPieStyleId(styleId) {
379
314
  return styleId >= 100 ? styleId - 100 : styleId;
380
315
  }
381
316
  function getBuiltinPiePalette(chart, seriesIndex) {
382
- if (_optionalChain([chart, 'access', _58 => _58.raw, 'optionalAccess', _59 => _59.builtinThemeColors])) return null;
317
+ if (_optionalChain([chart, 'access', _56 => _56.raw, 'optionalAccess', _57 => _57.builtinThemeColors])) return null;
383
318
  const normalized = normalizeBuiltinPieStyleId(chart.chartStyleId);
384
319
  if (normalized !== 32) {
385
320
  return null;
386
321
  }
387
- const baseColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _60 => _60.series, 'access', _61 => _61[seriesIndex], 'optionalAccess', _62 => _62.color]), () => ( _optionalChain([chart, 'access', _63 => _63.series, 'access', _64 => _64[seriesIndex], 'optionalAccess', _65 => _65.lineColor]))), () => ( _optionalChain([chart, 'access', _66 => _66.chartColorPalette, 'optionalAccess', _67 => _67[0]]))), () => ( null));
322
+ const baseColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _58 => _58.series, 'access', _59 => _59[seriesIndex], 'optionalAccess', _60 => _60.color]), () => ( _optionalChain([chart, 'access', _61 => _61.series, 'access', _62 => _62[seriesIndex], 'optionalAccess', _63 => _63.lineColor]))), () => ( _optionalChain([chart, 'access', _64 => _64.chartColorPalette, 'optionalAccess', _65 => _65[0]]))), () => ( null));
388
323
  if (!baseColor) {
389
324
  return null;
390
325
  }
@@ -398,8 +333,8 @@ function getBuiltinPiePalette(chart, seriesIndex) {
398
333
  ];
399
334
  }
400
335
  function resolvePiePointColor(chart, pointIndex, seriesIndex = 0) {
401
- const pointStyle = _optionalChain([chart, 'access', _68 => _68.series, 'access', _69 => _69[seriesIndex], 'optionalAccess', _70 => _70.dataPointStyles, 'optionalAccess', _71 => _71.find, 'call', _72 => _72((entry) => entry.index === pointIndex)]);
402
- if (_optionalChain([pointStyle, 'optionalAccess', _73 => _73.color])) {
336
+ const pointStyle = _optionalChain([chart, 'access', _66 => _66.series, 'access', _67 => _67[seriesIndex], 'optionalAccess', _68 => _68.dataPointStyles, 'optionalAccess', _69 => _69.find, 'call', _70 => _70((entry) => entry.index === pointIndex)]);
337
+ if (_optionalChain([pointStyle, 'optionalAccess', _71 => _71.color])) {
403
338
  return pointStyle.color;
404
339
  }
405
340
  const builtinPalette = getBuiltinPiePalette(chart, seriesIndex);
@@ -433,8 +368,8 @@ function chartSeriesBarColors(chart, seriesIndex, value, negativeFillMode) {
433
368
  const series = chart.series[seriesIndex];
434
369
  const defaultFill = chartSeriesColor(chart, seriesIndex);
435
370
  const defaultStroke = chartSeriesStrokeColor(chart, seriesIndex);
436
- const defaultStrokeWidth = typeof _optionalChain([series, 'optionalAccess', _74 => _74.lineWidthPx]) === "number" && Number.isFinite(series.lineWidthPx) ? Math.max(0.8, Math.min(4, series.lineWidthPx)) : 1;
437
- if (value < 0 && _optionalChain([series, 'optionalAccess', _75 => _75.invertIfNegative])) {
371
+ const defaultStrokeWidth = typeof _optionalChain([series, 'optionalAccess', _72 => _72.lineWidthPx]) === "number" && Number.isFinite(series.lineWidthPx) ? Math.max(0.8, Math.min(4, series.lineWidthPx)) : 1;
372
+ if (value < 0 && _optionalChain([series, 'optionalAccess', _73 => _73.invertIfNegative])) {
438
373
  const resolvedNegativeFill = negativeFillMode === "none" ? "none" : _nullishCoalesce(_nullishCoalesce(series.negativeColor, () => ( (negativeFillMode === "chartArea" ? chart.chartAreaFillColor : void 0))), () => ( defaultFill));
439
374
  return {
440
375
  fill: resolvedNegativeFill,
@@ -524,13 +459,13 @@ function estimateReferencePointCount(formula) {
524
459
  return Math.abs(endRow - startRow) + 1;
525
460
  }
526
461
  function getCategoryLabels(chart) {
527
- const primaryCategories = _nullishCoalesce(_optionalChain([chart, 'access', _76 => _76.series, 'access', _77 => _77[0], 'optionalAccess', _78 => _78.categories]), () => ( []));
462
+ const primaryCategories = _nullishCoalesce(_optionalChain([chart, 'access', _74 => _74.series, 'access', _75 => _75[0], 'optionalAccess', _76 => _76.categories]), () => ( []));
528
463
  const includeReferenceCategoryCount = chart.plotVisibleOnly !== true;
529
464
  const referenceCategoryCount = includeReferenceCategoryCount ? Math.max(
530
465
  0,
531
466
  ...chart.series.map((series) => Math.max(
532
- estimateReferencePointCount(_optionalChain([series, 'access', _79 => _79.categoriesRef, 'optionalAccess', _80 => _80.formula])),
533
- estimateReferencePointCount(_optionalChain([series, 'access', _81 => _81.valuesRef, 'optionalAccess', _82 => _82.formula]))
467
+ estimateReferencePointCount(_optionalChain([series, 'access', _77 => _77.categoriesRef, 'optionalAccess', _78 => _78.formula])),
468
+ estimateReferencePointCount(_optionalChain([series, 'access', _79 => _79.valuesRef, 'optionalAccess', _80 => _80.formula]))
534
469
  ))
535
470
  ) : 0;
536
471
  const categoryCount = Math.max(
@@ -654,7 +589,7 @@ function coerceLooseNumber(value) {
654
589
  }
655
590
  function buildPieEntries(chart, seriesIndex = selectPrimaryPieSeriesIndex(chart)) {
656
591
  const categories = getCategoryLabels(chart);
657
- const values = _nullishCoalesce(_optionalChain([chart, 'access', _83 => _83.series, 'access', _84 => _84[seriesIndex], 'optionalAccess', _85 => _85.values]), () => ( []));
592
+ const values = _nullishCoalesce(_optionalChain([chart, 'access', _81 => _81.series, 'access', _82 => _82[seriesIndex], 'optionalAccess', _83 => _83.values]), () => ( []));
658
593
  return values.map((rawValue, index) => ({
659
594
  color: resolvePiePointColor(chart, index, seriesIndex),
660
595
  index,
@@ -664,9 +599,9 @@ function buildPieEntries(chart, seriesIndex = selectPrimaryPieSeriesIndex(chart)
664
599
  }
665
600
  function resolveChartStageSubtotal(series) {
666
601
  const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
667
- const layoutProperties = _optionalChain([raw, 'optionalAccess', _86 => _86.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
668
- const subtotals = Array.isArray(_optionalChain([layoutProperties, 'optionalAccess', _87 => _87.subtotals])) ? layoutProperties.subtotals : [];
669
- return subtotals.length > 0 || _optionalChain([layoutProperties, 'optionalAccess', _88 => _88.aggregation]) === true;
602
+ const layoutProperties = _optionalChain([raw, 'optionalAccess', _84 => _84.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
603
+ const subtotals = Array.isArray(_optionalChain([layoutProperties, 'optionalAccess', _85 => _85.subtotals])) ? layoutProperties.subtotals : [];
604
+ return subtotals.length > 0 || _optionalChain([layoutProperties, 'optionalAccess', _86 => _86.aggregation]) === true;
670
605
  }
671
606
  function buildChartStages(chart) {
672
607
  if (chart.chartType === "Funnel" || chart.chartType === "Waterfall") {
@@ -694,7 +629,7 @@ function buildChartStages(chart) {
694
629
  if (!Number.isFinite(value)) {
695
630
  return null;
696
631
  }
697
- const formula = typeof _optionalChain([series, 'access', _89 => _89.valuesRef, 'optionalAccess', _90 => _90.formula]) === "string" ? series.valuesRef.formula : "";
632
+ const formula = typeof _optionalChain([series, 'access', _87 => _87.valuesRef, 'optionalAccess', _88 => _88.formula]) === "string" ? series.valuesRef.formula : "";
698
633
  const label = _nullishCoalesce(series.name, () => ( (formula.length > 0 ? formula.replace(/^.*!/, "").replace(/\$/g, "") : `Series ${index + 1}`)));
699
634
  return {
700
635
  color: chartSeriesColor(chart, typeof series.formatIdx === "number" ? series.formatIdx : index),
@@ -713,7 +648,7 @@ function buildHierarchyData(chart) {
713
648
  const topLevelIndexByName = /* @__PURE__ */ new Map();
714
649
  const primaryHierarchySeries = _nullishCoalesce(chart.series.find((series) => {
715
650
  const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
716
- return Array.isArray(_optionalChain([raw, 'optionalAccess', _91 => _91.chartExHierarchyCategories]));
651
+ return Array.isArray(_optionalChain([raw, 'optionalAccess', _89 => _89.chartExHierarchyCategories]));
717
652
  }), () => ( null));
718
653
  const primaryHierarchyPaths = (() => {
719
654
  if (!primaryHierarchySeries) {
@@ -724,7 +659,7 @@ function buildHierarchyData(chart) {
724
659
  })();
725
660
  const rowCount = primaryHierarchyPaths ? primaryHierarchyPaths.length : Math.max(0, ...chart.series.map((series) => series.values.length));
726
661
  for (let rowIndex = 0; rowIndex < rowCount; rowIndex += 1) {
727
- const path = _nullishCoalesce(_optionalChain([primaryHierarchyPaths, 'optionalAccess', _92 => _92[rowIndex]]), () => ( chart.series.map((series) => normalizeCategoryLabel(_nullishCoalesce(series.categories[rowIndex], () => ( series.values[rowIndex])))).filter((value) => value.length > 0)));
662
+ const path = _nullishCoalesce(_optionalChain([primaryHierarchyPaths, 'optionalAccess', _90 => _90[rowIndex]]), () => ( chart.series.map((series) => normalizeCategoryLabel(_nullishCoalesce(series.categories[rowIndex], () => ( series.values[rowIndex])))).filter((value) => value.length > 0)));
728
663
  if (path.length === 0) {
729
664
  continue;
730
665
  }
@@ -747,25 +682,25 @@ function buildHierarchyData(chart) {
747
682
  current = next;
748
683
  });
749
684
  const valueSource = _nullishCoalesce(_nullishCoalesce(primaryHierarchySeries, () => ( chart.series[chart.series.length - 1])), () => ( null));
750
- current.value = (_nullishCoalesce(current.value, () => ( 0))) + Math.max(1e-4, _nullishCoalesce(safeNumber(_optionalChain([valueSource, 'optionalAccess', _93 => _93.values, 'access', _94 => _94[rowIndex]])), () => ( 1)));
685
+ current.value = (_nullishCoalesce(current.value, () => ( 0))) + Math.max(1e-4, _nullishCoalesce(safeNumber(_optionalChain([valueSource, 'optionalAccess', _91 => _91.values, 'access', _92 => _92[rowIndex]])), () => ( 1)));
751
686
  }
752
687
  return rootChildren.length > 0 ? root : null;
753
688
  }
754
689
  function resolveBoxWhiskerQuartileMethod(series) {
755
690
  const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
756
- const layoutProperties = _optionalChain([raw, 'optionalAccess', _95 => _95.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
757
- const statistics = _optionalChain([layoutProperties, 'optionalAccess', _96 => _96.statistics]) && typeof layoutProperties.statistics === "object" ? layoutProperties.statistics : null;
758
- return _optionalChain([statistics, 'optionalAccess', _97 => _97.quartileMethod]) === "inclusive" ? "inclusive" : "exclusive";
691
+ const layoutProperties = _optionalChain([raw, 'optionalAccess', _93 => _93.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
692
+ const statistics = _optionalChain([layoutProperties, 'optionalAccess', _94 => _94.statistics]) && typeof layoutProperties.statistics === "object" ? layoutProperties.statistics : null;
693
+ return _optionalChain([statistics, 'optionalAccess', _95 => _95.quartileMethod]) === "inclusive" ? "inclusive" : "exclusive";
759
694
  }
760
695
  function resolveBoxWhiskerVisibility(series) {
761
696
  const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
762
- const layoutProperties = _optionalChain([raw, 'optionalAccess', _98 => _98.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
763
- const visibility = _optionalChain([layoutProperties, 'optionalAccess', _99 => _99.visibility]) && typeof layoutProperties.visibility === "object" ? layoutProperties.visibility : null;
697
+ const layoutProperties = _optionalChain([raw, 'optionalAccess', _96 => _96.layoutProperties]) && typeof raw.layoutProperties === "object" ? raw.layoutProperties : null;
698
+ const visibility = _optionalChain([layoutProperties, 'optionalAccess', _97 => _97.visibility]) && typeof layoutProperties.visibility === "object" ? layoutProperties.visibility : null;
764
699
  return {
765
- meanLine: _optionalChain([visibility, 'optionalAccess', _100 => _100.meanLine]) === true,
766
- meanMarker: _optionalChain([visibility, 'optionalAccess', _101 => _101.meanMarker]) !== false,
767
- nonoutliers: _optionalChain([visibility, 'optionalAccess', _102 => _102.nonoutliers]) === true,
768
- outliers: _optionalChain([visibility, 'optionalAccess', _103 => _103.outliers]) !== false
700
+ meanLine: _optionalChain([visibility, 'optionalAccess', _98 => _98.meanLine]) === true,
701
+ meanMarker: _optionalChain([visibility, 'optionalAccess', _99 => _99.meanMarker]) !== false,
702
+ nonoutliers: _optionalChain([visibility, 'optionalAccess', _100 => _100.nonoutliers]) === true,
703
+ outliers: _optionalChain([visibility, 'optionalAccess', _101 => _101.outliers]) !== false
769
704
  };
770
705
  }
771
706
  function computePercentile(sortedValues, percentile, method) {
@@ -825,7 +760,7 @@ function computeBoxWhiskerStats(series) {
825
760
  function resolveHierarchyNodeColor(chart, node) {
826
761
  const lineage = node.ancestors().reverse();
827
762
  const topLevel = lineage[1];
828
- const baseIndex = _nullishCoalesce(_optionalChain([topLevel, 'optionalAccess', _104 => _104.data, 'access', _105 => _105.colorIndex]), () => ( 0));
763
+ const baseIndex = _nullishCoalesce(_optionalChain([topLevel, 'optionalAccess', _102 => _102.data, 'access', _103 => _103.colorIndex]), () => ( 0));
829
764
  const baseColor = chartSeriesColor(chart, baseIndex);
830
765
  const depth = Math.max(0, node.depth - 1);
831
766
  return depth === 0 ? baseColor : lightenColor(baseColor, clamp(depth * 0.16, 0, 0.5));
@@ -833,7 +768,7 @@ function resolveHierarchyNodeColor(chart, node) {
833
768
  function resolveTreemapNodeColor(chart, node) {
834
769
  const lineage = node.ancestors().reverse();
835
770
  const topLevel = lineage[1];
836
- return chartSeriesColor(chart, _nullishCoalesce(_optionalChain([topLevel, 'optionalAccess', _106 => _106.data, 'access', _107 => _107.colorIndex]), () => ( 0)));
771
+ return chartSeriesColor(chart, _nullishCoalesce(_optionalChain([topLevel, 'optionalAccess', _104 => _104.data, 'access', _105 => _105.colorIndex]), () => ( 0)));
837
772
  }
838
773
  function excelTreemapTile(node, x0, y0, x1, y1) {
839
774
  if (!node.children || node.children.length === 0) {
@@ -848,12 +783,12 @@ function excelTreemapTile(node, x0, y0, x1, y1) {
848
783
  node.children.forEach((child) => excelTreemapTile(child, child.x0, child.y0, child.x1, child.y1));
849
784
  }
850
785
  function resolveSurfaceBaseColor(chart, palette) {
851
- return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _108 => _108.chartColorPalette, 'optionalAccess', _109 => _109[0]]), () => ( _optionalChain([chart, 'access', _110 => _110.series, 'access', _111 => _111[0], 'optionalAccess', _112 => _112.color]))), () => ( _optionalChain([chart, 'access', _113 => _113.series, 'access', _114 => _114[0], 'optionalAccess', _115 => _115.lineColor]))), () => ( chart.axisLineColor)), () => ( chart.textColor)), () => ( palette.text));
786
+ return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _106 => _106.chartColorPalette, 'optionalAccess', _107 => _107[0]]), () => ( _optionalChain([chart, 'access', _108 => _108.series, 'access', _109 => _109[0], 'optionalAccess', _110 => _110.color]))), () => ( _optionalChain([chart, 'access', _111 => _111.series, 'access', _112 => _112[0], 'optionalAccess', _113 => _113.lineColor]))), () => ( chart.axisLineColor)), () => ( chart.textColor)), () => ( palette.text));
852
787
  }
853
788
  function resolveExplicitSurfaceSeriesColor(chart, kind) {
854
- const shape = _optionalChain([chart, 'access', _116 => _116.series, 'access', _117 => _117[0], 'optionalAccess', _118 => _118.shapeProperties]);
855
- if (kind === "fill" ? _optionalChain([shape, 'optionalAccess', _119 => _119.xmlFillHidden]) === true : _optionalChain([shape, 'optionalAccess', _120 => _120.xmlLineHidden]) === true) return "transparent";
856
- const color = kind === "fill" ? _nullishCoalesce(_optionalChain([shape, 'optionalAccess', _121 => _121.xmlFillColor]), () => ( _optionalChain([shape, 'optionalAccess', _122 => _122.solidFillHex]))) : _nullishCoalesce(_optionalChain([shape, 'optionalAccess', _123 => _123.xmlLineColor]), () => ( _optionalChain([shape, 'optionalAccess', _124 => _124.lineColorHex])));
789
+ const shape = _optionalChain([chart, 'access', _114 => _114.series, 'access', _115 => _115[0], 'optionalAccess', _116 => _116.shapeProperties]);
790
+ if (kind === "fill" ? _optionalChain([shape, 'optionalAccess', _117 => _117.xmlFillHidden]) === true : _optionalChain([shape, 'optionalAccess', _118 => _118.xmlLineHidden]) === true) return "transparent";
791
+ const color = kind === "fill" ? _nullishCoalesce(_optionalChain([shape, 'optionalAccess', _119 => _119.xmlFillColor]), () => ( _optionalChain([shape, 'optionalAccess', _120 => _120.solidFillHex]))) : _nullishCoalesce(_optionalChain([shape, 'optionalAccess', _121 => _121.xmlLineColor]), () => ( _optionalChain([shape, 'optionalAccess', _122 => _122.lineColorHex])));
857
792
  return normalizeRendererHexColor(color);
858
793
  }
859
794
  function getSurfaceColorStops(chart, palette) {
@@ -868,7 +803,7 @@ function resolveSurfaceBandPaletteColor(chart, palette, domain, value) {
868
803
  if (explicitColor) return explicitColor;
869
804
  const explicitFill = resolveExplicitSurfaceSeriesColor(chart, "fill");
870
805
  if (explicitFill) return explicitFill;
871
- const themeColors = _optionalChain([chart, 'access', _125 => _125.raw, 'optionalAccess', _126 => _126.builtinThemeColors]);
806
+ const themeColors = _optionalChain([chart, 'access', _123 => _123.raw, 'optionalAccess', _124 => _124.builtinThemeColors]);
872
807
  const paletteCount = Math.trunc((domain.safeMax - domain.minValue) / (domain.ticks[1] - domain.ticks[0])) + 1;
873
808
  const builtinColor = themeColors ? _chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _chunk5ERNVHSOcjs.getBuiltinChartColor.call(void 0, chart.chartStyleId, bandIndex % paletteCount, paletteCount), themeColors) : void 0;
874
809
  if (builtinColor) return builtinColor;
@@ -883,8 +818,8 @@ function getSurfaceDomain(chart) {
883
818
  if (numericValues.length === 0) {
884
819
  return null;
885
820
  }
886
- const explicitMin = typeof _optionalChain([chart, 'access', _127 => _127.valueAxis, 'optionalAccess', _128 => _128.min]) === "number" && Number.isFinite(chart.valueAxis.min) ? chart.valueAxis.min : null;
887
- const explicitMax = typeof _optionalChain([chart, 'access', _129 => _129.valueAxis, 'optionalAccess', _130 => _130.max]) === "number" && Number.isFinite(chart.valueAxis.max) ? chart.valueAxis.max : null;
821
+ const explicitMin = typeof _optionalChain([chart, 'access', _125 => _125.valueAxis, 'optionalAccess', _126 => _126.min]) === "number" && Number.isFinite(chart.valueAxis.min) ? chart.valueAxis.min : null;
822
+ const explicitMax = typeof _optionalChain([chart, 'access', _127 => _127.valueAxis, 'optionalAccess', _128 => _128.max]) === "number" && Number.isFinite(chart.valueAxis.max) ? chart.valueAxis.max : null;
888
823
  const rawMin = Math.min(...numericValues);
889
824
  const rawMax = Math.max(...numericValues);
890
825
  const spanBase = Math.max(1e-6, rawMax - Math.min(0, rawMin));
@@ -892,7 +827,7 @@ function getSurfaceDomain(chart) {
892
827
  const magnitude = 10 ** Math.floor(Math.log10(Math.max(roughStep, 1e-6)));
893
828
  const normalized = roughStep / magnitude;
894
829
  const niceNormalized = normalized <= 1 ? 1 : normalized <= 2 ? 2 : normalized <= 5 ? 5 : 10;
895
- const step = typeof _optionalChain([chart, 'access', _131 => _131.valueAxis, 'optionalAccess', _132 => _132.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : niceNormalized * magnitude;
830
+ const step = typeof _optionalChain([chart, 'access', _129 => _129.valueAxis, 'optionalAccess', _130 => _130.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : niceNormalized * magnitude;
896
831
  const minValue = _nullishCoalesce(explicitMin, () => ( (rawMin >= 0 ? 0 : Math.floor(rawMin / step) * step)));
897
832
  const maxValue = _nullishCoalesce(explicitMax, () => ( Math.ceil(rawMax / step) * step));
898
833
  const safeMax = maxValue <= minValue ? minValue + step : maxValue;
@@ -922,14 +857,14 @@ function resolveSurfaceBandIndex(domain, value) {
922
857
  return Math.max(0, ticks.length - 2);
923
858
  }
924
859
  function resolveSurfaceBandFormatColor(chart, key, index) {
925
- const colors = _optionalChain([chart, 'access', _133 => _133.raw, 'optionalAccess', _134 => _134[key]]);
860
+ const colors = _optionalChain([chart, 'access', _131 => _131.raw, 'optionalAccess', _132 => _132[key]]);
926
861
  if (!colors || typeof colors !== "object" || !Object.prototype.hasOwnProperty.call(colors, index)) return null;
927
862
  const color = colors[index];
928
863
  return typeof color === "string" && color.length > 0 ? color : null;
929
864
  }
930
865
  function resolveSurfaceWireframeColor(chart, palette, domain, value) {
931
866
  const bandIndex = resolveSurfaceBandIndex(domain, value);
932
- const themeColors = _optionalChain([chart, 'access', _135 => _135.raw, 'optionalAccess', _136 => _136.builtinThemeColors]);
867
+ const themeColors = _optionalChain([chart, 'access', _133 => _133.raw, 'optionalAccess', _134 => _134.builtinThemeColors]);
933
868
  const paletteCount = Math.trunc((domain.safeMax - domain.minValue) / (domain.ticks[1] - domain.ticks[0])) + 1;
934
869
  const builtinLine = themeColors ? _chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _chunk5ERNVHSOcjs.getBuiltinChartSurfaceLine.call(void 0, chart.chartStyleId, bandIndex, paletteCount), themeColors) : void 0;
935
870
  return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(resolveSurfaceBandFormatColor(chart, "bandFormatLineColors", bandIndex), () => ( resolveExplicitSurfaceSeriesColor(chart, "line"))), () => ( builtinLine)), () => ( resolveSurfaceBandPaletteColor(chart, palette, domain, value)));
@@ -939,7 +874,7 @@ function resolveSurfacePlotRect(chart, layout) {
939
874
  return layout.plot;
940
875
  }
941
876
  const columnCount = Math.max(1, getCategoryLabels(chart).length);
942
- const depthScale = Math.max(0.01, (_nullishCoalesce(_optionalChain([chart, 'access', _137 => _137.view3d, 'optionalAccess', _138 => _138.depthPercent]), () => ( 100))) / 100);
877
+ const depthScale = Math.max(0.01, (_nullishCoalesce(_optionalChain([chart, 'access', _135 => _135.view3d, 'optionalAccess', _136 => _136.depthPercent]), () => ( 100))) / 100);
943
878
  const targetAspect = columnCount / Math.max(1, chart.series.length) / depthScale;
944
879
  let width = layout.plot.width;
945
880
  let height = layout.plot.height;
@@ -983,7 +918,7 @@ function isContourSurfaceChart(chart) {
983
918
  return chart.chartType === "Surface" && chart.is3d !== true;
984
919
  }
985
920
  function renderSurfaceAxes(chart, layout) {
986
- if (_optionalChain([chart, 'access', _139 => _139.categoryAxis, 'optionalAccess', _140 => _140.delete]) && _optionalChain([chart, 'access', _141 => _141.seriesAxis, 'optionalAccess', _142 => _142.delete]) && _optionalChain([chart, 'access', _143 => _143.valueAxis, 'optionalAccess', _144 => _144.delete])) {
921
+ if (_optionalChain([chart, 'access', _137 => _137.categoryAxis, 'optionalAccess', _138 => _138.delete]) && _optionalChain([chart, 'access', _139 => _139.seriesAxis, 'optionalAccess', _140 => _140.delete]) && _optionalChain([chart, 'access', _141 => _141.valueAxis, 'optionalAccess', _142 => _142.delete])) {
987
922
  return null;
988
923
  }
989
924
  const plot = resolveSurfacePlotRect(chart, layout);
@@ -993,7 +928,7 @@ function renderSurfaceAxes(chart, layout) {
993
928
  const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( "#888888"));
994
929
  const rowCount = Math.max(1, seriesLabels.length);
995
930
  const columnCount = Math.max(1, categories.length);
996
- const columnPositions = categories.map((_, index) => plot.left + (isContourSurfaceChart(chart) && _optionalChain([chart, 'access', _145 => _145.valueAxis, 'optionalAccess', _146 => _146.crossBetween]) !== "midCat" ? (index + 0.5) / columnCount * plot.width : columnCount <= 1 ? plot.width / 2 : index / (columnCount - 1) * plot.width));
931
+ const columnPositions = categories.map((_, index) => plot.left + (isContourSurfaceChart(chart) && _optionalChain([chart, 'access', _143 => _143.valueAxis, 'optionalAccess', _144 => _144.crossBetween]) !== "midCat" ? (index + 0.5) / columnCount * plot.width : columnCount <= 1 ? plot.width / 2 : index / (columnCount - 1) * plot.width));
997
932
  const rowPositions = seriesLabels.map((_, index) => plot.top + plot.height - (rowCount <= 1 ? plot.height / 2 : index / (rowCount - 1) * plot.height));
998
933
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
999
934
  isContourSurfaceChart(chart) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1008,7 +943,7 @@ function renderSurfaceAxes(chart, layout) {
1008
943
  y: plot.top
1009
944
  }
1010
945
  ),
1011
- _optionalChain([chart, 'access', _147 => _147.categoryAxis, 'optionalAccess', _148 => _148.delete]) !== true && _optionalChain([chart, 'access', _149 => _149.categoryAxis, 'optionalAccess', _150 => _150.labelPosition]) !== "none" && categories.map((label, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
946
+ _optionalChain([chart, 'access', _145 => _145.categoryAxis, 'optionalAccess', _146 => _146.delete]) !== true && _optionalChain([chart, 'access', _147 => _147.categoryAxis, 'optionalAccess', _148 => _148.labelPosition]) !== "none" && categories.map((label, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1012
947
  "text",
1013
948
  {
1014
949
  fill: labelColor,
@@ -1020,7 +955,7 @@ function renderSurfaceAxes(chart, layout) {
1020
955
  },
1021
956
  `surface-x-label-${index}`
1022
957
  )),
1023
- _optionalChain([chart, 'access', _151 => _151.seriesAxis, 'optionalAccess', _152 => _152.delete]) !== true && _optionalChain([chart, 'access', _153 => _153.seriesAxis, 'optionalAccess', _154 => _154.labelPosition]) !== "none" && seriesLabels.map((label, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
958
+ _optionalChain([chart, 'access', _149 => _149.seriesAxis, 'optionalAccess', _150 => _150.delete]) !== true && _optionalChain([chart, 'access', _151 => _151.seriesAxis, 'optionalAccess', _152 => _152.labelPosition]) !== "none" && seriesLabels.map((label, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1024
959
  "text",
1025
960
  {
1026
961
  fill: labelColor,
@@ -1075,7 +1010,7 @@ function getLegendItems(chart, chartType, palette) {
1075
1010
  }
1076
1011
  if (chartType === "Sunburst" || chartType === "Treemap") {
1077
1012
  const hierarchyData = buildHierarchyData(chart);
1078
- if (!_optionalChain([hierarchyData, 'optionalAccess', _155 => _155.children])) {
1013
+ if (!_optionalChain([hierarchyData, 'optionalAccess', _153 => _153.children])) {
1079
1014
  return [];
1080
1015
  }
1081
1016
  return hierarchyData.children.map((child, index) => ({
@@ -1086,7 +1021,7 @@ function getLegendItems(chart, chartType, palette) {
1086
1021
  if (chartType === "Pie" || chartType === "Pie3D" || chartType === "PieExploded" || chartType === "Doughnut" || chartType === "BarOfPie") {
1087
1022
  if (chartType === "BarOfPie") {
1088
1023
  const categories = getCategoryLabels(chart);
1089
- const values = _nullishCoalesce(_optionalChain([chart, 'access', _156 => _156.series, 'access', _157 => _157[0], 'optionalAccess', _158 => _158.values]), () => ( []));
1024
+ const values = _nullishCoalesce(_optionalChain([chart, 'access', _154 => _154.series, 'access', _155 => _155[0], 'optionalAccess', _156 => _156.values]), () => ( []));
1090
1025
  return categories.map((label, index) => ({
1091
1026
  color: chartPointColor(chart, index),
1092
1027
  label: normalizeCategoryLabel(label),
@@ -1111,8 +1046,8 @@ function buildLayout(chart, rect, legendItems) {
1111
1046
  const width = Math.max(80, Math.round(rect.width));
1112
1047
  const height = Math.max(60, Math.round(rect.height));
1113
1048
  const isSurfaceChart = chart.chartType === "Surface" || chart.raw && typeof chart.raw === "object" && typeof chart.raw.xmlChartType === "string" && String(chart.raw.xmlChartType).includes("surface");
1114
- const titleHeight = chart.title && !(isSurfaceChart && _optionalChain([chart, 'access', _159 => _159.raw, 'optionalAccess', _160 => _160.titleOverlay]) === true) ? isSurfaceChart ? 30 : 24 : 8;
1115
- const legendPosition = normalizeLegendPosition(_optionalChain([chart, 'access', _161 => _161.legend, 'optionalAccess', _162 => _162.position]));
1049
+ const titleHeight = chart.title && !(isSurfaceChart && _optionalChain([chart, 'access', _157 => _157.raw, 'optionalAccess', _158 => _158.titleOverlay]) === true) ? isSurfaceChart ? 30 : 24 : 8;
1050
+ const legendPosition = normalizeLegendPosition(_optionalChain([chart, 'access', _159 => _159.legend, 'optionalAccess', _160 => _160.position]));
1116
1051
  const legendVertical = legendItems.length > 0 && (legendPosition === "right" || legendPosition === "left");
1117
1052
  const compactWidth = width <= 280;
1118
1053
  const compactHeight = height <= 200;
@@ -1122,10 +1057,10 @@ function buildLayout(chart, rect, legendItems) {
1122
1057
  const horizontalMapGradient = chart.chartType === "RegionMap" && legendItems.length > 0 && !resolveRegionMapColorStrings(primarySeries) && (layoutLegendPosition === "top" || layoutLegendPosition === "bottom");
1123
1058
  const horizontalLegendHeight = horizontalMapGradient ? Math.min(48, Math.max(24, height - titleHeight - 8)) : 24;
1124
1059
  const legendWidth = isSurfaceChart ? Math.max(32, ...legendItems.map((item) => 20 + item.label.length * 5.4)) : 98;
1125
- const plotLeft = (isSurfaceChart && _optionalChain([chart, 'access', _163 => _163.valueAxis, 'optionalAccess', _164 => _164.delete]) ? 12 : 42) + (layoutLegendPosition === "left" ? legendWidth : 0);
1060
+ const plotLeft = (isSurfaceChart && _optionalChain([chart, 'access', _161 => _161.valueAxis, 'optionalAccess', _162 => _162.delete]) ? 12 : 42) + (layoutLegendPosition === "left" ? legendWidth : 0);
1126
1061
  const plotRight = 16 + (layoutLegendPosition === "right" ? legendWidth : 0);
1127
1062
  const plotTop = titleHeight + (layoutLegendPosition === "top" ? horizontalLegendHeight : 0);
1128
- const plotBottom = (horizontalMapGradient || isSurfaceChart && _optionalChain([chart, 'access', _165 => _165.categoryAxis, 'optionalAccess', _166 => _166.delete]) ? 8 : 28) + (layoutLegendPosition === "bottom" ? horizontalLegendHeight : 0);
1063
+ const plotBottom = (horizontalMapGradient || isSurfaceChart && _optionalChain([chart, 'access', _163 => _163.categoryAxis, 'optionalAccess', _164 => _164.delete]) ? 8 : 28) + (layoutLegendPosition === "bottom" ? horizontalLegendHeight : 0);
1129
1064
  const plotWidth = Math.max(horizontalMapGradient ? 1 : 40, width - plotLeft - plotRight);
1130
1065
  return {
1131
1066
  height,
@@ -1198,30 +1133,30 @@ function resolveNumericAxisDomain(minValue, maxValue, majorUnit, includeZero = f
1198
1133
  };
1199
1134
  }
1200
1135
  function resolveAxisDomainWithChartOverrides(axis, minValue, maxValue, includeZero = false) {
1201
- const hasExplicitMin = typeof _optionalChain([axis, 'optionalAccess', _167 => _167.min]) === "number" && Number.isFinite(axis.min);
1202
- const hasExplicitMax = typeof _optionalChain([axis, 'optionalAccess', _168 => _168.max]) === "number" && Number.isFinite(axis.max);
1203
- const rawMin = hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess', _169 => _169.min])) : minValue;
1204
- const rawMax = hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess', _170 => _170.max])) : maxValue;
1205
- const domain = resolveNumericAxisDomain(rawMin, rawMax, _optionalChain([axis, 'optionalAccess', _171 => _171.majorUnit]), includeZero);
1136
+ const hasExplicitMin = typeof _optionalChain([axis, 'optionalAccess', _165 => _165.min]) === "number" && Number.isFinite(axis.min);
1137
+ const hasExplicitMax = typeof _optionalChain([axis, 'optionalAccess', _166 => _166.max]) === "number" && Number.isFinite(axis.max);
1138
+ const rawMin = hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess', _167 => _167.min])) : minValue;
1139
+ const rawMax = hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess', _168 => _168.max])) : maxValue;
1140
+ const domain = resolveNumericAxisDomain(rawMin, rawMax, _optionalChain([axis, 'optionalAccess', _169 => _169.majorUnit]), includeZero);
1206
1141
  return {
1207
1142
  hasExplicitMax,
1208
1143
  hasExplicitMin,
1209
- majorUnit: _optionalChain([axis, 'optionalAccess', _172 => _172.majorUnit]),
1210
- max: hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess', _173 => _173.max])) : domain.max,
1211
- min: hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess', _174 => _174.min])) : domain.min,
1144
+ majorUnit: _optionalChain([axis, 'optionalAccess', _170 => _170.majorUnit]),
1145
+ max: hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess', _171 => _171.max])) : domain.max,
1146
+ min: hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess', _172 => _172.min])) : domain.min,
1212
1147
  ticks: hasExplicitMin || hasExplicitMax ? buildNumericTickValues(
1213
- hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess', _175 => _175.min])) : domain.min,
1214
- hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess', _176 => _176.max])) : domain.max,
1215
- _optionalChain([axis, 'optionalAccess', _177 => _177.majorUnit])
1148
+ hasExplicitMin ? Number(_optionalChain([axis, 'optionalAccess', _173 => _173.min])) : domain.min,
1149
+ hasExplicitMax ? Number(_optionalChain([axis, 'optionalAccess', _174 => _174.max])) : domain.max,
1150
+ _optionalChain([axis, 'optionalAccess', _175 => _175.majorUnit])
1216
1151
  ) : domain.ticks
1217
1152
  };
1218
1153
  }
1219
1154
  function resolve3dFrameOffsets(chart, baseDepthX = 11, baseDepthY = 8) {
1220
- const depthRatio = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _178 => _178.view3d, 'optionalAccess', _179 => _179.depthPercent]), () => ( 100))) / 100, 0.35, 3.2);
1221
- const rotX = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _180 => _180.view3d, 'optionalAccess', _181 => _181.rotX]), () => ( 20)), -80, 80);
1222
- const rotY = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _182 => _182.view3d, 'optionalAccess', _183 => _183.rotY]), () => ( 20)), -80, 80);
1223
- const usePerspective = _optionalChain([chart, 'access', _184 => _184.view3d, 'optionalAccess', _185 => _185.rAngAx]) === false;
1224
- const perspectiveStrength = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _186 => _186.view3d, 'optionalAccess', _187 => _187.perspective]), () => ( (usePerspective ? 26 : 0)))) / 100, 0, 1);
1155
+ const depthRatio = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _176 => _176.view3d, 'optionalAccess', _177 => _177.depthPercent]), () => ( 100))) / 100, 0.35, 3.2);
1156
+ const rotX = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _178 => _178.view3d, 'optionalAccess', _179 => _179.rotX]), () => ( 20)), -80, 80);
1157
+ const rotY = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _180 => _180.view3d, 'optionalAccess', _181 => _181.rotY]), () => ( 20)), -80, 80);
1158
+ const usePerspective = _optionalChain([chart, 'access', _182 => _182.view3d, 'optionalAccess', _183 => _183.rAngAx]) === false;
1159
+ const perspectiveStrength = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _184 => _184.view3d, 'optionalAccess', _185 => _185.perspective]), () => ( (usePerspective ? 26 : 0)))) / 100, 0, 1);
1225
1160
  const projectedOrigin = projectCartesian3dPoint(
1226
1161
  0,
1227
1162
  0,
@@ -1319,9 +1254,9 @@ function formatExcelDateSerial(value, formatCode, use1904) {
1319
1254
  function formatCategoryLabel(chart, value, fallback = "") {
1320
1255
  const rawRecord = chart.raw && typeof chart.raw === "object" ? chart.raw : null;
1321
1256
  const numeric = typeof value === "number" && Number.isFinite(value) ? value : null;
1322
- const formatCode = _optionalChain([chart, 'access', _188 => _188.categoryAxis, 'optionalAccess', _189 => _189.numberFormat, 'optionalAccess', _190 => _190.formatCode]);
1257
+ const formatCode = _optionalChain([chart, 'access', _186 => _186.categoryAxis, 'optionalAccess', _187 => _187.numberFormat, 'optionalAccess', _188 => _188.formatCode]);
1323
1258
  if (numeric != null && isLikelyDateFormatCode(formatCode)) {
1324
- return formatExcelDateSerial(numeric, formatCode, _optionalChain([rawRecord, 'optionalAccess', _191 => _191.date1904]) === true);
1259
+ return formatExcelDateSerial(numeric, formatCode, _optionalChain([rawRecord, 'optionalAccess', _189 => _189.date1904]) === true);
1325
1260
  }
1326
1261
  const normalized = normalizeCategoryLabel(value);
1327
1262
  if (normalized.length > 0) {
@@ -1481,18 +1416,18 @@ function renderLegend(chart, layout, palette) {
1481
1416
  if (!resolveRegionMapColorStrings(series)) {
1482
1417
  const vertical = legendPos === "left" || legendPos === "right";
1483
1418
  const x = vertical ? legendPos === "right" ? layout.plot.left + layout.plot.width + 8 : 8 : layout.plot.left;
1484
- const showSeriesName = vertical || (_nullishCoalesce(_optionalChain([layout, 'access', _192 => _192.legendBounds, 'optionalAccess', _193 => _193.height]), () => ( 48))) >= 44;
1485
- const y = vertical ? layout.plot.top + 26 : (_nullishCoalesce(_optionalChain([layout, 'access', _194 => _194.legendBounds, 'optionalAccess', _195 => _195.top]), () => ( layout.height - 48))) + (showSeriesName ? 20 : 4);
1419
+ const showSeriesName = vertical || (_nullishCoalesce(_optionalChain([layout, 'access', _190 => _190.legendBounds, 'optionalAccess', _191 => _191.height]), () => ( 48))) >= 44;
1420
+ const y = vertical ? layout.plot.top + 26 : (_nullishCoalesce(_optionalChain([layout, 'access', _192 => _192.legendBounds, 'optionalAccess', _193 => _193.top]), () => ( layout.height - 48))) + (showSeriesName ? 20 : 4);
1486
1421
  const length = vertical ? Math.min(100, Math.max(24, layout.plot.height - 42)) : Math.min(160, layout.plot.width);
1487
1422
  const gradientId = `map-legend-${chart.id}`;
1488
1423
  const stops = resolveRegionMapValueColors(series);
1489
- const count = _nullishCoalesce(_optionalChain([stops, 'optionalAccess', _196 => _196.length]), () => ( 3));
1424
+ const count = _nullishCoalesce(_optionalChain([stops, 'optionalAccess', _194 => _194.length]), () => ( 3));
1490
1425
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
1491
1426
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "defs", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "linearGradient", { id: gradientId, x1: "0%", x2: vertical ? "0%" : "100%", y1: vertical ? "100%" : "0%", y2: "0%", children: Array.from({ length: count }, (_, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: `${index / (count - 1) * 100}%`, stopColor: resolveRegionMapValueColor(chart, seriesIndex, index / (count - 1)) }, index)) }) }),
1492
- showSeriesName && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "text", { fill: textColor, fontSize: 10, x, y: y - 12, children: _nullishCoalesce(_optionalChain([series, 'optionalAccess', _197 => _197.name]), () => ( "")) }),
1427
+ showSeriesName && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "text", { fill: textColor, fontSize: 10, x, y: y - 12, children: _nullishCoalesce(_optionalChain([series, 'optionalAccess', _195 => _195.name]), () => ( "")) }),
1493
1428
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { fill: `url(#${gradientId})`, x, y, width: vertical ? 8 : length, height: vertical ? length : 8 }),
1494
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "text", { fill: textColor, fontSize: 10, x: vertical ? x + 12 : x, y: vertical ? y + length : y + 20, children: _optionalChain([items, 'access', _198 => _198[0], 'optionalAccess', _199 => _199.label]) }),
1495
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "text", { fill: textColor, fontSize: 10, textAnchor: vertical ? "start" : "end", x: vertical ? x + 12 : x + length, y: vertical ? y + 7 : y + 20, children: _optionalChain([items, 'access', _200 => _200[1], 'optionalAccess', _201 => _201.label]) })
1429
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "text", { fill: textColor, fontSize: 10, x: vertical ? x + 12 : x, y: vertical ? y + length : y + 20, children: _optionalChain([items, 'access', _196 => _196[0], 'optionalAccess', _197 => _197.label]) }),
1430
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "text", { fill: textColor, fontSize: 10, textAnchor: vertical ? "start" : "end", x: vertical ? x + 12 : x + length, y: vertical ? y + 7 : y + 20, children: _optionalChain([items, 'access', _198 => _198[1], 'optionalAccess', _199 => _199.label]) })
1496
1431
  ] });
1497
1432
  }
1498
1433
  }
@@ -1538,10 +1473,10 @@ function renderCartesianAxes(chart, palette, plot, isHorizontal, categoryLabels,
1538
1473
  const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
1539
1474
  const labelColor = resolveChartAxisTextColor(chart);
1540
1475
  const zeroPosition = mapValue(0);
1541
- const showValueAxis = _optionalChain([chart, 'access', _202 => _202.valueAxis, 'optionalAccess', _203 => _203.delete]) !== true;
1542
- const showCategoryAxis = _optionalChain([chart, 'access', _204 => _204.categoryAxis, 'optionalAccess', _205 => _205.delete]) !== true;
1543
- const showValueLabels = showValueAxis && _optionalChain([chart, 'access', _206 => _206.valueAxis, 'optionalAccess', _207 => _207.labelPosition]) !== "none";
1544
- const showCategoryLabels = showCategoryAxis && _optionalChain([chart, 'access', _208 => _208.categoryAxis, 'optionalAccess', _209 => _209.labelPosition]) !== "none";
1476
+ const showValueAxis = _optionalChain([chart, 'access', _200 => _200.valueAxis, 'optionalAccess', _201 => _201.delete]) !== true;
1477
+ const showCategoryAxis = _optionalChain([chart, 'access', _202 => _202.categoryAxis, 'optionalAccess', _203 => _203.delete]) !== true;
1478
+ const showValueLabels = showValueAxis && _optionalChain([chart, 'access', _204 => _204.valueAxis, 'optionalAccess', _205 => _205.labelPosition]) !== "none";
1479
+ const showCategoryLabels = showCategoryAxis && _optionalChain([chart, 'access', _206 => _206.categoryAxis, 'optionalAccess', _207 => _207.labelPosition]) !== "none";
1545
1480
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
1546
1481
  showValueAxis ? valueTicks.map((tick) => {
1547
1482
  const valuePosition = mapValue(tick);
@@ -1866,22 +1801,22 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
1866
1801
  chart.valueAxis,
1867
1802
  minValue,
1868
1803
  maxValue,
1869
- isAreaChart || _optionalChain([chart, 'access', _210 => _210.valueAxis, 'optionalAccess', _211 => _211.crosses]) === "autoZero"
1804
+ isAreaChart || _optionalChain([chart, 'access', _208 => _208.valueAxis, 'optionalAccess', _209 => _209.crosses]) === "autoZero"
1870
1805
  );
1871
1806
  minValue = valueDomain.min;
1872
1807
  maxValue = valueDomain.max;
1873
1808
  const valueSpan = Math.max(1e-6, maxValue - minValue);
1874
1809
  const seriesCount = Math.max(1, chart.series.length);
1875
1810
  const categoryCount = Math.max(1, categories.length);
1876
- const depthScale = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _212 => _212.view3d, 'optionalAccess', _213 => _213.depthPercent]), () => ( 100))) / 100, 0.5, 4);
1811
+ const depthScale = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _210 => _210.view3d, 'optionalAccess', _211 => _211.depthPercent]), () => ( 100))) / 100, 0.5, 4);
1877
1812
  const halfDepth = (seriesCount <= 1 ? 0.82 : 1.02) * depthScale;
1878
1813
  const frontZ = halfDepth;
1879
1814
  const backZ = -halfDepth;
1880
1815
  const baseValue = isAreaChart ? Math.max(minValue, Math.min(maxValue, 0)) : minValue;
1881
- const rotXRad = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _214 => _214.view3d, 'optionalAccess', _215 => _215.rotX]), () => ( 18)), -80, 80) * (Math.PI / 180);
1882
- const rotYRad = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _216 => _216.view3d, 'optionalAccess', _217 => _217.rotY]), () => ( 24)), -80, 80) * (Math.PI / 180);
1883
- const usePerspective = _optionalChain([chart, 'access', _218 => _218.view3d, 'optionalAccess', _219 => _219.rAngAx]) === false;
1884
- const perspectiveStrength = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _220 => _220.view3d, 'optionalAccess', _221 => _221.perspective]), () => ( (usePerspective ? 26 : 0)))) / 100, 0, 1);
1816
+ const rotXRad = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _212 => _212.view3d, 'optionalAccess', _213 => _213.rotX]), () => ( 18)), -80, 80) * (Math.PI / 180);
1817
+ const rotYRad = clamp(_nullishCoalesce(_optionalChain([chart, 'access', _214 => _214.view3d, 'optionalAccess', _215 => _215.rotY]), () => ( 24)), -80, 80) * (Math.PI / 180);
1818
+ const usePerspective = _optionalChain([chart, 'access', _216 => _216.view3d, 'optionalAccess', _217 => _217.rAngAx]) === false;
1819
+ const perspectiveStrength = clamp((_nullishCoalesce(_optionalChain([chart, 'access', _218 => _218.view3d, 'optionalAccess', _219 => _219.perspective]), () => ( (usePerspective ? 26 : 0)))) / 100, 0, 1);
1885
1820
  const normalizeX = (categoryIndex) => categoryCount <= 1 ? 0 : (categoryIndex / (categoryCount - 1) - 0.5) * 2;
1886
1821
  const normalizeY = (value) => -(((value - minValue) / valueSpan - 0.5) * 2);
1887
1822
  const stackedAreaDepthSpan = isAreaChart && isStackedSeries ? Math.max(0.18, (frontZ - backZ) * 0.56) : 0;
@@ -1930,7 +1865,7 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
1930
1865
  categoryIndex,
1931
1866
  defined: point.defined,
1932
1867
  depth: top.depth,
1933
- depthBack: _nullishCoalesce(_optionalChain([topBack, 'optionalAccess', _222 => _222.depth]), () => ( top.depth)),
1868
+ depthBack: _nullishCoalesce(_optionalChain([topBack, 'optionalAccess', _220 => _220.depth]), () => ( top.depth)),
1934
1869
  top,
1935
1870
  topBack
1936
1871
  };
@@ -2055,11 +1990,11 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
2055
1990
  ] : [];
2056
1991
  const strokeColor = chartSeriesStrokeColor(chart, seriesIndex);
2057
1992
  const fillColor = chartSeriesColor(chart, seriesIndex);
2058
- const markerSymbol = normalizeChartMarkerSymbol(_optionalChain([chart, 'access', _223 => _223.series, 'access', _224 => _224[seriesIndex], 'optionalAccess', _225 => _225.markerSymbol]));
2059
- const markerPath = markerSymbolPath(markerSymbol, markerRadiusPx(_optionalChain([chart, 'access', _226 => _226.series, 'access', _227 => _227[seriesIndex], 'optionalAccess', _228 => _228.markerSize])));
1993
+ const markerSymbol = normalizeChartMarkerSymbol(_optionalChain([chart, 'access', _221 => _221.series, 'access', _222 => _222[seriesIndex], 'optionalAccess', _223 => _223.markerSymbol]));
1994
+ const markerPath = markerSymbolPath(markerSymbol, markerRadiusPx(_optionalChain([chart, 'access', _224 => _224.series, 'access', _225 => _225[seriesIndex], 'optionalAccess', _226 => _226.markerSize])));
2060
1995
  const slabFaces = isAreaChart && isStackedSeries ? definedPoints.slice(1).map((point, pointIndex) => {
2061
1996
  const previous = definedPoints[pointIndex];
2062
- if (!_optionalChain([previous, 'optionalAccess', _229 => _229.topBack]) || !point.topBack || !previous.bottomBack || !point.bottomBack) {
1997
+ if (!_optionalChain([previous, 'optionalAccess', _227 => _227.topBack]) || !point.topBack || !previous.bottomBack || !point.bottomBack) {
2063
1998
  return null;
2064
1999
  }
2065
2000
  const topFace = buildLinearSvgPath([previous.top, point.top, point.topBack, previous.topBack], true);
@@ -2091,13 +2026,13 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
2091
2026
  }) : [];
2092
2027
  const firstDefinedPoint = _nullishCoalesce(definedPoints[0], () => ( null));
2093
2028
  const lastDefinedPoint = _nullishCoalesce(definedPoints[definedPoints.length - 1], () => ( null));
2094
- const startCap = isAreaChart && isStackedSeries && _optionalChain([firstDefinedPoint, 'optionalAccess', _230 => _230.topBack]) && _optionalChain([firstDefinedPoint, 'optionalAccess', _231 => _231.bottomBack]) ? buildLinearSvgPath([
2029
+ const startCap = isAreaChart && isStackedSeries && _optionalChain([firstDefinedPoint, 'optionalAccess', _228 => _228.topBack]) && _optionalChain([firstDefinedPoint, 'optionalAccess', _229 => _229.bottomBack]) ? buildLinearSvgPath([
2095
2030
  firstDefinedPoint.top,
2096
2031
  firstDefinedPoint.bottom,
2097
2032
  firstDefinedPoint.bottomBack,
2098
2033
  firstDefinedPoint.topBack
2099
2034
  ], true) : "";
2100
- const endCap = isAreaChart && isStackedSeries && _optionalChain([lastDefinedPoint, 'optionalAccess', _232 => _232.topBack]) && _optionalChain([lastDefinedPoint, 'optionalAccess', _233 => _233.bottomBack]) ? buildLinearSvgPath([
2035
+ const endCap = isAreaChart && isStackedSeries && _optionalChain([lastDefinedPoint, 'optionalAccess', _230 => _230.topBack]) && _optionalChain([lastDefinedPoint, 'optionalAccess', _231 => _231.bottomBack]) ? buildLinearSvgPath([
2101
2036
  lastDefinedPoint.top,
2102
2037
  lastDefinedPoint.bottom,
2103
2038
  lastDefinedPoint.bottomBack,
@@ -2170,7 +2105,7 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
2170
2105
  fill: "none",
2171
2106
  stroke: strokeColor,
2172
2107
  strokeLinejoin: "round",
2173
- strokeWidth: Math.max(1.8, _nullishCoalesce(_optionalChain([chart, 'access', _234 => _234.series, 'access', _235 => _235[seriesIndex], 'optionalAccess', _236 => _236.lineWidthPx]), () => ( 2)))
2108
+ strokeWidth: Math.max(1.8, _nullishCoalesce(_optionalChain([chart, 'access', _232 => _232.series, 'access', _233 => _233[seriesIndex], 'optionalAccess', _234 => _234.lineWidthPx]), () => ( 2)))
2174
2109
  }
2175
2110
  ),
2176
2111
  markerPath.length > 0 ? definedPoints.map((point, pointIndex) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2182,8 +2117,8 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
2182
2117
  {
2183
2118
  ...chartElementDataProps(seriesIndex, point.categoryIndex),
2184
2119
  d: markerPath,
2185
- fill: _nullishCoalesce(_optionalChain([chart, 'access', _237 => _237.series, 'access', _238 => _238[seriesIndex], 'optionalAccess', _239 => _239.markerColor]), () => ( fillColor)),
2186
- stroke: _nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _240 => _240.series, 'access', _241 => _241[seriesIndex], 'optionalAccess', _242 => _242.markerLineColor]), () => ( chart.chartAreaFillColor)), () => ( palette.surface)),
2120
+ fill: _nullishCoalesce(_optionalChain([chart, 'access', _235 => _235.series, 'access', _236 => _236[seriesIndex], 'optionalAccess', _237 => _237.markerColor]), () => ( fillColor)),
2121
+ stroke: _nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _238 => _238.series, 'access', _239 => _239[seriesIndex], 'optionalAccess', _240 => _240.markerLineColor]), () => ( chart.chartAreaFillColor)), () => ( palette.surface)),
2187
2122
  strokeWidth: 1
2188
2123
  }
2189
2124
  )
@@ -2202,7 +2137,7 @@ function renderLineOrAreaChart3d(chart, palette, layout, categories, stackedPoin
2202
2137
  stroke: "none"
2203
2138
  }
2204
2139
  )),
2205
- definedPoints.map((point) => isSelectedChartPointOrSeries(selectedChartElement, chart.id, seriesIndex, point.categoryIndex) ? renderSelectionPointHandles(
2140
+ definedPoints.map((point) => isSelectedChartPointOrSeries(selectedChartElement, chart.id, seriesIndex, point.categoryIndex) ? _chunkIDNIGBUMcjs.renderSelectionPointHandles.call(void 0,
2206
2141
  `line3d-selection-${seriesIndex}-${point.categoryIndex}`,
2207
2142
  [{ x: point.top.x, y: point.top.y }]
2208
2143
  ) : null)
@@ -2245,7 +2180,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2245
2180
  const isPercentStacked = chartType === "ColumnPercentStacked" || chartType === "BarPercentStacked";
2246
2181
  const isHorizontal = chartType === "BarClustered" || chartType === "BarStacked" || chartType === "BarPercentStacked";
2247
2182
  const isHistogramLike = isHistogramLikeChart(chart) && chartType === "ColumnClustered";
2248
- const shouldReverseCategories = isHorizontal && _optionalChain([chart, 'access', _243 => _243.categoryAxis, 'optionalAccess', _244 => _244.orientation]) !== "maxMin";
2183
+ const shouldReverseCategories = isHorizontal && _optionalChain([chart, 'access', _241 => _241.categoryAxis, 'optionalAccess', _242 => _242.orientation]) !== "maxMin";
2249
2184
  const categories = shouldReverseCategories ? sourceCategories.slice().reverse() : sourceCategories;
2250
2185
  const isStacked = chartType === "ColumnStacked" || chartType === "BarStacked" || isPercentStacked;
2251
2186
  const negativeFillMode = isPercentStacked ? "chartArea" : chartType === "ColumnClustered" ? "none" : "series";
@@ -2337,13 +2272,13 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2337
2272
  const depthGridSpanY = usesSeriesDepthAxis && frameOffsets ? frameOffsets.depthY * depthLaneSpread : 0;
2338
2273
  const depthSlotX = usesSeriesDepthAxis ? depthGridSpanX / Math.max(1, seriesCount) : 0;
2339
2274
  const depthSlotY = usesSeriesDepthAxis ? depthGridSpanY / Math.max(1, seriesCount) : 0;
2340
- const depthBarX = usesSeriesDepthAxis ? Math.sign(depthSlotX || _optionalChain([frameOffsets, 'optionalAccess', _245 => _245.depthX]) || 1) * Math.max(8, Math.abs(depthSlotX) * 1.14) : _optionalChain([frameOffsets, 'optionalAccess', _246 => _246.depthX]);
2341
- const depthBarY = usesSeriesDepthAxis ? Math.sign(depthSlotY || _optionalChain([frameOffsets, 'optionalAccess', _247 => _247.depthY]) || -1) * Math.max(5.5, Math.abs(depthSlotY) * 1.12) : _optionalChain([frameOffsets, 'optionalAccess', _248 => _248.depthY]);
2342
- const shouldReverseValueAxis = _optionalChain([chart, 'access', _249 => _249.valueAxis, 'optionalAccess', _250 => _250.orientation]) === "maxMin";
2275
+ const depthBarX = usesSeriesDepthAxis ? Math.sign(depthSlotX || _optionalChain([frameOffsets, 'optionalAccess', _243 => _243.depthX]) || 1) * Math.max(8, Math.abs(depthSlotX) * 1.14) : _optionalChain([frameOffsets, 'optionalAccess', _244 => _244.depthX]);
2276
+ const depthBarY = usesSeriesDepthAxis ? Math.sign(depthSlotY || _optionalChain([frameOffsets, 'optionalAccess', _245 => _245.depthY]) || -1) * Math.max(5.5, Math.abs(depthSlotY) * 1.12) : _optionalChain([frameOffsets, 'optionalAccess', _246 => _246.depthY]);
2277
+ const shouldReverseValueAxis = _optionalChain([chart, 'access', _247 => _247.valueAxis, 'optionalAccess', _248 => _248.orientation]) === "maxMin";
2343
2278
  const valueScale = _d3scale.scaleLinear.call(void 0, ).domain([minValue, maxValue]).range(
2344
2279
  isHorizontal ? shouldReverseValueAxis ? [plot.left + plot.width, plot.left] : [plot.left, plot.left + plot.width] : shouldReverseValueAxis ? [plot.top, plot.top + plot.height] : [plot.top + plot.height, plot.top]
2345
2280
  );
2346
- const ticks = isPercentStacked ? buildNumericTickValues(minValue, maxValue, _nullishCoalesce(_optionalChain([chart, 'access', _251 => _251.valueAxis, 'optionalAccess', _252 => _252.majorUnit]), () => ( 20))) : valueDomain.ticks;
2281
+ const ticks = isPercentStacked ? buildNumericTickValues(minValue, maxValue, _nullishCoalesce(_optionalChain([chart, 'access', _249 => _249.valueAxis, 'optionalAccess', _250 => _250.majorUnit]), () => ( 20))) : valueDomain.ticks;
2347
2282
  const categoryPositions = categories.map((category) => {
2348
2283
  const bandStart = _nullishCoalesce(categoryScale(category), () => ( 0));
2349
2284
  return bandStart + categoryScale.bandwidth() / 2;
@@ -2356,7 +2291,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2356
2291
  const value = _nullishCoalesce(matrix[seriesIndex][categoryIndex], () => ( 0));
2357
2292
  const rawValue = _nullishCoalesce(rawMatrix[seriesIndex][categoryIndex], () => ( value));
2358
2293
  const pointIndex = shouldReverseCategories ? categoryCount - 1 - categoryIndex : categoryIndex;
2359
- const pointStyle = _optionalChain([chart, 'access', _253 => _253.series, 'access', _254 => _254[seriesIndex], 'optionalAccess', _255 => _255.dataPointStyles, 'optionalAccess', _256 => _256.find, 'call', _257 => _257((entry) => entry.index === pointIndex)]);
2294
+ const pointStyle = _optionalChain([chart, 'access', _251 => _251.series, 'access', _252 => _252[seriesIndex], 'optionalAccess', _253 => _253.dataPointStyles, 'optionalAccess', _254 => _254.find, 'call', _255 => _255((entry) => entry.index === pointIndex)]);
2360
2295
  let start = 0;
2361
2296
  let end = value;
2362
2297
  if (isStacked) {
@@ -2371,19 +2306,19 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2371
2306
  }
2372
2307
  }
2373
2308
  const colors = chartSeriesBarColors(chart, seriesIndex, rawValue, negativeFillMode);
2374
- const isInvertedNegative = rawValue < 0 && _optionalChain([chart, 'access', _258 => _258.series, 'access', _259 => _259[seriesIndex], 'optionalAccess', _260 => _260.invertIfNegative]) === true;
2309
+ const isInvertedNegative = rawValue < 0 && _optionalChain([chart, 'access', _256 => _256.series, 'access', _257 => _257[seriesIndex], 'optionalAccess', _258 => _258.invertIfNegative]) === true;
2375
2310
  if (!isInvertedNegative) {
2376
2311
  if (variesBarColorsByCategory(chart)) {
2377
2312
  colors.fill = chartPointColor(chart, pointIndex, seriesIndex);
2378
2313
  colors.stroke = colors.fill;
2379
2314
  }
2380
- if (_optionalChain([pointStyle, 'optionalAccess', _261 => _261.color])) {
2315
+ if (_optionalChain([pointStyle, 'optionalAccess', _259 => _259.color])) {
2381
2316
  colors.fill = pointStyle.color;
2382
2317
  if (!pointStyle.lineColor) {
2383
2318
  colors.stroke = pointStyle.color;
2384
2319
  }
2385
2320
  }
2386
- if (_optionalChain([pointStyle, 'optionalAccess', _262 => _262.lineColor])) {
2321
+ if (_optionalChain([pointStyle, 'optionalAccess', _260 => _260.lineColor])) {
2387
2322
  colors.stroke = pointStyle.lineColor;
2388
2323
  }
2389
2324
  }
@@ -2396,7 +2331,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2396
2331
  const barOffset = usesSeriesDepthAxis ? Math.max(0, (categoryScale.bandwidth() - barThickness) * 0.5) : isHistogramLike ? 0 : isStacked ? 0 : _nullishCoalesce(seriesScale(String(seriesIndex)), () => ( 0));
2397
2332
  const depthOffsetX = usesSeriesDepthAxis ? depthSlotX * seriesIndex : 0;
2398
2333
  const depthOffsetY = usesSeriesDepthAxis ? depthSlotY * seriesIndex : 0;
2399
- const depthOrder = depthOffsetX * (_nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _263 => _263.depthX]), () => ( 0))) + depthOffsetY * (_nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _264 => _264.depthY]), () => ( 0)));
2334
+ const depthOrder = depthOffsetX * (_nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _261 => _261.depthX]), () => ( 0))) + depthOffsetY * (_nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _262 => _262.depthY]), () => ( 0)));
2400
2335
  const shapeTaper = normalized3dShape === "pyramid" ? 0.94 : normalized3dShape === "cone" ? 1 : 0;
2401
2336
  let topScale = 1;
2402
2337
  let bottomScale = 1;
@@ -2434,8 +2369,8 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2434
2369
  isHorizontal: true,
2435
2370
  key: `bar-${seriesIndex}-${categoryIndex}`,
2436
2371
  left: Math.min(x1, x2),
2437
- depthX: usesSeriesDepthAxis ? depthBarX : _optionalChain([frameOffsets, 'optionalAccess', _265 => _265.depthX]),
2438
- depthY: usesSeriesDepthAxis ? depthBarY : _optionalChain([frameOffsets, 'optionalAccess', _266 => _266.depthY]),
2372
+ depthX: usesSeriesDepthAxis ? depthBarX : _optionalChain([frameOffsets, 'optionalAccess', _263 => _263.depthX]),
2373
+ depthY: usesSeriesDepthAxis ? depthBarY : _optionalChain([frameOffsets, 'optionalAccess', _264 => _264.depthY]),
2439
2374
  shape3d: normalized3dShape,
2440
2375
  seriesIndex,
2441
2376
  stroke: colors.stroke,
@@ -2464,8 +2399,8 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2464
2399
  isHorizontal: false,
2465
2400
  key: `bar-${seriesIndex}-${categoryIndex}`,
2466
2401
  left: categoryStart + barOffset,
2467
- depthX: usesSeriesDepthAxis ? depthBarX : _optionalChain([frameOffsets, 'optionalAccess', _267 => _267.depthX]),
2468
- depthY: usesSeriesDepthAxis ? depthBarY : _optionalChain([frameOffsets, 'optionalAccess', _268 => _268.depthY]),
2402
+ depthX: usesSeriesDepthAxis ? depthBarX : _optionalChain([frameOffsets, 'optionalAccess', _265 => _265.depthX]),
2403
+ depthY: usesSeriesDepthAxis ? depthBarY : _optionalChain([frameOffsets, 'optionalAccess', _266 => _266.depthY]),
2469
2404
  shape3d: normalized3dShape,
2470
2405
  seriesIndex,
2471
2406
  stroke: colors.stroke,
@@ -2537,8 +2472,8 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2537
2472
  );
2538
2473
  const depthAxisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
2539
2474
  const depthGridColor = lightenColor(depthAxisColor, 0.48);
2540
- const frameDepthX = usesSeriesDepthAxis ? depthGridSpanX : _nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _269 => _269.depthX]), () => ( 0));
2541
- const frameDepthY = usesSeriesDepthAxis ? depthGridSpanY : _nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _270 => _270.depthY]), () => ( 0));
2475
+ const frameDepthX = usesSeriesDepthAxis ? depthGridSpanX : _nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _267 => _267.depthX]), () => ( 0));
2476
+ const frameDepthY = usesSeriesDepthAxis ? depthGridSpanY : _nullishCoalesce(_optionalChain([frameOffsets, 'optionalAccess', _268 => _268.depthY]), () => ( 0));
2542
2477
  const depthAxisNode = usesSeriesDepthAxis && frameOffsets ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
2543
2478
  Array.from({ length: categoryCount + 1 }, (_, boundaryIndex) => {
2544
2479
  const x = plot.left + boundaryIndex / Math.max(1, categoryCount) * plot.width;
@@ -2633,7 +2568,7 @@ function renderBarChart(chart, palette, layout, chartType, selectedChartElement)
2633
2568
  y: bar.top
2634
2569
  }
2635
2570
  )),
2636
- renderedBars.map((bar) => isSelectedChartPoint(selectedChartElement, chart.id, bar.seriesIndex, bar.categoryIndex) || isSelectedChartSeries(selectedChartElement, chart.id, bar.seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _271 => _271.kind]) !== "point" ? renderSelectionRectHandles(`bar-selection-${bar.key}`, bar.left, bar.top, bar.width, bar.height) : null)
2571
+ renderedBars.map((bar) => isSelectedChartPoint(selectedChartElement, chart.id, bar.seriesIndex, bar.categoryIndex) || isSelectedChartSeries(selectedChartElement, chart.id, bar.seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _269 => _269.kind]) !== "point" ? _chunkIDNIGBUMcjs.renderSelectionRectHandles.call(void 0, `bar-selection-${bar.key}`, bar.left, bar.top, bar.width, bar.height) : null)
2637
2572
  ] });
2638
2573
  }
2639
2574
  function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartElement) {
@@ -2660,11 +2595,11 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2660
2595
  return Math.abs(total) < 1e-9 ? 1 : total;
2661
2596
  }) : null;
2662
2597
  return chart.series.map((_, seriesIndex) => categories.map((_2, categoryIndex) => {
2663
- const rawValue = _nullishCoalesce(_optionalChain([resolvedValuesBySeries, 'access', _272 => _272[seriesIndex], 'optionalAccess', _273 => _273[categoryIndex]]), () => ( null));
2598
+ const rawValue = _nullishCoalesce(_optionalChain([resolvedValuesBySeries, 'access', _270 => _270[seriesIndex], 'optionalAccess', _271 => _271[categoryIndex]]), () => ( null));
2664
2599
  if (rawValue == null) {
2665
2600
  return { defined: false, y: null, y0: null, y1: null };
2666
2601
  }
2667
- const value = isPercentStackedSeries ? rawValue / (_nullishCoalesce(_optionalChain([categoryTotals, 'optionalAccess', _274 => _274[categoryIndex]]), () => ( 1))) * 100 : rawValue;
2602
+ const value = isPercentStackedSeries ? rawValue / (_nullishCoalesce(_optionalChain([categoryTotals, 'optionalAccess', _272 => _272[categoryIndex]]), () => ( 1))) * 100 : rawValue;
2668
2603
  if (value >= 0) {
2669
2604
  const start2 = positive[categoryIndex];
2670
2605
  const end2 = start2 + value;
@@ -2677,7 +2612,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2677
2612
  return { defined: true, y: end, y0: start, y1: end };
2678
2613
  }));
2679
2614
  })() : chart.series.map((_, seriesIndex) => categories.map((_2, categoryIndex) => {
2680
- const value = _nullishCoalesce(_optionalChain([resolvedValuesBySeries, 'access', _275 => _275[seriesIndex], 'optionalAccess', _276 => _276[categoryIndex]]), () => ( null));
2615
+ const value = _nullishCoalesce(_optionalChain([resolvedValuesBySeries, 'access', _273 => _273[seriesIndex], 'optionalAccess', _274 => _274[categoryIndex]]), () => ( null));
2681
2616
  return {
2682
2617
  defined: value != null,
2683
2618
  y: value,
@@ -2693,12 +2628,12 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2693
2628
  let maxValue = Math.max(...stackedExtents);
2694
2629
  if (isAreaChart) {
2695
2630
  minValue = Math.min(0, minValue);
2696
- } else if ((chartType === "Line" || isStackedLine) && _optionalChain([chart, 'access', _277 => _277.valueAxis, 'optionalAccess', _278 => _278.crosses]) === "autoZero") {
2631
+ } else if ((chartType === "Line" || isStackedLine) && _optionalChain([chart, 'access', _275 => _275.valueAxis, 'optionalAccess', _276 => _276.crosses]) === "autoZero") {
2697
2632
  minValue = Math.min(0, minValue);
2698
2633
  }
2699
2634
  if (isPercentStackedSeries) {
2700
- const explicitMin = typeof _optionalChain([chart, 'access', _279 => _279.valueAxis, 'optionalAccess', _280 => _280.min]) === "number" && Number.isFinite(chart.valueAxis.min) ? Number(chart.valueAxis.min) : Math.min(0, minValue);
2701
- const explicitMax = typeof _optionalChain([chart, 'access', _281 => _281.valueAxis, 'optionalAccess', _282 => _282.max]) === "number" && Number.isFinite(chart.valueAxis.max) ? Number(chart.valueAxis.max) : Math.max(100, maxValue);
2635
+ const explicitMin = typeof _optionalChain([chart, 'access', _277 => _277.valueAxis, 'optionalAccess', _278 => _278.min]) === "number" && Number.isFinite(chart.valueAxis.min) ? Number(chart.valueAxis.min) : Math.min(0, minValue);
2636
+ const explicitMax = typeof _optionalChain([chart, 'access', _279 => _279.valueAxis, 'optionalAccess', _280 => _280.max]) === "number" && Number.isFinite(chart.valueAxis.max) ? Number(chart.valueAxis.max) : Math.max(100, maxValue);
2702
2637
  minValue = explicitMin;
2703
2638
  maxValue = explicitMax <= explicitMin ? explicitMin + 1 : explicitMax;
2704
2639
  } else {
@@ -2706,24 +2641,24 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2706
2641
  chart.valueAxis,
2707
2642
  minValue,
2708
2643
  maxValue,
2709
- isAreaChart || _optionalChain([chart, 'access', _283 => _283.valueAxis, 'optionalAccess', _284 => _284.crosses]) === "autoZero"
2644
+ isAreaChart || _optionalChain([chart, 'access', _281 => _281.valueAxis, 'optionalAccess', _282 => _282.crosses]) === "autoZero"
2710
2645
  );
2711
2646
  minValue = valueDomain.min;
2712
2647
  maxValue = valueDomain.max;
2713
2648
  }
2714
2649
  const xScale = _d3scale.scalePoint.call(void 0, ).domain(categories).range([plot.left, plot.left + plot.width]);
2715
2650
  const yScale = _d3scale.scaleLinear.call(void 0, ).domain([minValue, maxValue]).range([plot.top + plot.height, plot.top]);
2716
- const ticks = isPercentStackedSeries ? buildNumericTickValues(minValue, maxValue, _nullishCoalesce(_optionalChain([chart, 'access', _285 => _285.valueAxis, 'optionalAccess', _286 => _286.majorUnit]), () => ( 20))) : resolveAxisDomainWithChartOverrides(
2651
+ const ticks = isPercentStackedSeries ? buildNumericTickValues(minValue, maxValue, _nullishCoalesce(_optionalChain([chart, 'access', _283 => _283.valueAxis, 'optionalAccess', _284 => _284.majorUnit]), () => ( 20))) : resolveAxisDomainWithChartOverrides(
2717
2652
  chart.valueAxis,
2718
2653
  minValue,
2719
2654
  maxValue,
2720
- isAreaChart || _optionalChain([chart, 'access', _287 => _287.valueAxis, 'optionalAccess', _288 => _288.crosses]) === "autoZero"
2655
+ isAreaChart || _optionalChain([chart, 'access', _285 => _285.valueAxis, 'optionalAccess', _286 => _286.crosses]) === "autoZero"
2721
2656
  ).ticks;
2722
2657
  const categoryPositions = categories.map((category) => _nullishCoalesce(xScale(category), () => ( plot.left)));
2723
2658
  const curve = _d3shape.curveLinear;
2724
2659
  const areaBaseline = yScale(Math.max(minValue, 0));
2725
2660
  const plotPointsBySeries = chart.series.map((_, seriesIndex) => categories.map((category, categoryIndex) => {
2726
- const point = _nullishCoalesce(_optionalChain([stackedPointsBySeries, 'access', _289 => _289[seriesIndex], 'optionalAccess', _290 => _290[categoryIndex]]), () => ( {
2661
+ const point = _nullishCoalesce(_optionalChain([stackedPointsBySeries, 'access', _287 => _287[seriesIndex], 'optionalAccess', _288 => _288[categoryIndex]]), () => ( {
2727
2662
  defined: false,
2728
2663
  y: null,
2729
2664
  y0: null,
@@ -2752,12 +2687,12 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2752
2687
  );
2753
2688
  }
2754
2689
  const rawRecord = chart.raw && typeof chart.raw === "object" ? chart.raw : null;
2755
- const dropLinesRecord = _optionalChain([rawRecord, 'optionalAccess', _291 => _291.dropLines]) && typeof rawRecord.dropLines === "object" ? rawRecord.dropLines : null;
2756
- const highLowLinesRecord = _optionalChain([rawRecord, 'optionalAccess', _292 => _292.highLowLines]) && typeof rawRecord.highLowLines === "object" ? rawRecord.highLowLines : null;
2757
- const upDownBarsRecord = _optionalChain([rawRecord, 'optionalAccess', _293 => _293.upDownBars]) && typeof rawRecord.upDownBars === "object" ? rawRecord.upDownBars : null;
2758
- const dropLineColor = _nullishCoalesce(normalizeRendererHexColor(_optionalChain([dropLinesRecord, 'optionalAccess', _294 => _294.shapeProperties, 'optionalAccess', _295 => _295.lineColorHex])), () => ( lightenColor(_nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border)), 0.45)));
2759
- const highLowLineColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(normalizeRendererHexColor(_optionalChain([highLowLinesRecord, 'optionalAccess', _296 => _296.shapeProperties, 'optionalAccess', _297 => _297.lineColorHex])), () => ( chart.axisLineColor)), () => ( chart.chartAreaBorderColor)), () => ( palette.border));
2760
- const upDownGapWidth = typeof _optionalChain([upDownBarsRecord, 'optionalAccess', _298 => _298.gapWidth]) === "number" && Number.isFinite(upDownBarsRecord.gapWidth) ? upDownBarsRecord.gapWidth : 150;
2690
+ const dropLinesRecord = _optionalChain([rawRecord, 'optionalAccess', _289 => _289.dropLines]) && typeof rawRecord.dropLines === "object" ? rawRecord.dropLines : null;
2691
+ const highLowLinesRecord = _optionalChain([rawRecord, 'optionalAccess', _290 => _290.highLowLines]) && typeof rawRecord.highLowLines === "object" ? rawRecord.highLowLines : null;
2692
+ const upDownBarsRecord = _optionalChain([rawRecord, 'optionalAccess', _291 => _291.upDownBars]) && typeof rawRecord.upDownBars === "object" ? rawRecord.upDownBars : null;
2693
+ const dropLineColor = _nullishCoalesce(normalizeRendererHexColor(_optionalChain([dropLinesRecord, 'optionalAccess', _292 => _292.shapeProperties, 'optionalAccess', _293 => _293.lineColorHex])), () => ( lightenColor(_nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border)), 0.45)));
2694
+ const highLowLineColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(normalizeRendererHexColor(_optionalChain([highLowLinesRecord, 'optionalAccess', _294 => _294.shapeProperties, 'optionalAccess', _295 => _295.lineColorHex])), () => ( chart.axisLineColor)), () => ( chart.chartAreaBorderColor)), () => ( palette.border));
2695
+ const upDownGapWidth = typeof _optionalChain([upDownBarsRecord, 'optionalAccess', _296 => _296.gapWidth]) === "number" && Number.isFinite(upDownBarsRecord.gapWidth) ? upDownBarsRecord.gapWidth : 150;
2761
2696
  const categoryStep = categoryPositions.length >= 2 ? Math.min(...categoryPositions.slice(1).map((position, index) => Math.abs(position - (_nullishCoalesce(categoryPositions[index], () => ( 0))))).filter((value) => value > 0)) : plot.width;
2762
2697
  const upDownBarWidth = clamp(categoryStep * (1 - resolveCategoryBandPadding(upDownGapWidth).inner) * 0.82, 3, 28);
2763
2698
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
@@ -2772,7 +2707,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2772
2707
  (value) => yScale(value)
2773
2708
  ),
2774
2709
  !isAreaChart && !isStackedSeries && highLowLinesRecord ? categories.map((_, categoryIndex) => {
2775
- const yValues = plotPointsBySeries.map((seriesPoints) => _optionalChain([seriesPoints, 'access', _299 => _299[categoryIndex], 'optionalAccess', _300 => _300.y])).filter((value) => value != null && Number.isFinite(value));
2710
+ const yValues = plotPointsBySeries.map((seriesPoints) => _optionalChain([seriesPoints, 'access', _297 => _297[categoryIndex], 'optionalAccess', _298 => _298.y])).filter((value) => value != null && Number.isFinite(value));
2776
2711
  if (yValues.length < 2) {
2777
2712
  return null;
2778
2713
  }
@@ -2791,8 +2726,8 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2791
2726
  );
2792
2727
  }) : null,
2793
2728
  !isAreaChart && !isStackedSeries && upDownBarsRecord && plotPointsBySeries.length >= 2 ? categories.map((_, categoryIndex) => {
2794
- const first = _optionalChain([plotPointsBySeries, 'access', _301 => _301[0], 'optionalAccess', _302 => _302[categoryIndex]]);
2795
- const second = _optionalChain([plotPointsBySeries, 'access', _303 => _303[plotPointsBySeries.length - 1], 'optionalAccess', _304 => _304[categoryIndex]]);
2729
+ const first = _optionalChain([plotPointsBySeries, 'access', _299 => _299[0], 'optionalAccess', _300 => _300[categoryIndex]]);
2730
+ const second = _optionalChain([plotPointsBySeries, 'access', _301 => _301[plotPointsBySeries.length - 1], 'optionalAccess', _302 => _302[categoryIndex]]);
2796
2731
  if (!first || !second || first.y == null || second.y == null) {
2797
2732
  return null;
2798
2733
  }
@@ -2820,7 +2755,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2820
2755
  const lineStrokePoints = displayBlanksAs === "span" ? points.filter((point) => point.y != null) : points;
2821
2756
  const linePath = _nullishCoalesce(_d3shape.line.call(void 0, ).defined((point) => point.y != null).x((point) => point.x).y((point) => yScale(_nullishCoalesce(point.y, () => ( 0)))).curve(curve)(lineStrokePoints), () => ( ""));
2822
2757
  const areaPath = isAreaChart ? _nullishCoalesce(_d3shape.area.call(void 0, ).defined((point) => isStackedSeries ? point.y0 != null && point.y1 != null : point.y != null).x((point) => point.x).y0((point) => isStackedSeries ? yScale(_nullishCoalesce(point.y0, () => ( 0))) : areaBaseline).y1((point) => yScale(_nullishCoalesce((isStackedSeries ? point.y1 : point.y), () => ( 0)))).curve(curve)(points), () => ( "")) : "";
2823
- const seriesFillColor = typeof _optionalChain([series, 'access', _305 => _305.shapeProperties, 'optionalAccess', _306 => _306.xmlFillColor]) === "string" ? series.shapeProperties.xmlFillColor : chartSeriesColor(chart, seriesIndex);
2758
+ const seriesFillColor = typeof _optionalChain([series, 'access', _303 => _303.shapeProperties, 'optionalAccess', _304 => _304.xmlFillColor]) === "string" ? series.shapeProperties.xmlFillColor : chartSeriesColor(chart, seriesIndex);
2824
2759
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
2825
2760
  !isAreaChart && !isStackedSeries && dropLinesRecord ? points.map((point, pointIndex) => point.y == null ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2826
2761
  "line",
@@ -2850,7 +2785,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2850
2785
  ...chartElementDataProps(seriesIndex),
2851
2786
  d: linePath,
2852
2787
  fill: "none",
2853
- stroke: _optionalChain([series, 'access', _307 => _307.shapeProperties, 'optionalAccess', _308 => _308.xmlLineHidden]) === true ? "none" : chartSeriesStrokeColor(chart, seriesIndex),
2788
+ stroke: _optionalChain([series, 'access', _305 => _305.shapeProperties, 'optionalAccess', _306 => _306.xmlLineHidden]) === true ? "none" : chartSeriesStrokeColor(chart, seriesIndex),
2854
2789
  strokeLinecap: "round",
2855
2790
  strokeLinejoin: "round",
2856
2791
  strokeWidth: Math.max(1.5, _nullishCoalesce(series.lineWidthPx, () => ( 2)))
@@ -2868,7 +2803,7 @@ function renderLineOrAreaChart(chart, palette, layout, chartType, selectedChartE
2868
2803
  strokeWidth: 1
2869
2804
  }
2870
2805
  )),
2871
- points.map((point, pointIndex) => point.y != null && (isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _309 => _309.kind]) !== "point") ? isAreaChart ? renderSelectionPointHandles(`area-selection-${seriesIndex}-${pointIndex}`, [{ x: point.x, y: yScale(point.y) }]) : renderSelectionRectHandles(
2806
+ points.map((point, pointIndex) => point.y != null && (isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _307 => _307.kind]) !== "point") ? isAreaChart ? _chunkIDNIGBUMcjs.renderSelectionPointHandles.call(void 0, `area-selection-${seriesIndex}-${pointIndex}`, [{ x: point.x, y: yScale(point.y) }]) : _chunkIDNIGBUMcjs.renderSelectionRectHandles.call(void 0,
2872
2807
  `line-selection-${seriesIndex}-${pointIndex}`,
2873
2808
  point.x - 4,
2874
2809
  yScale(point.y) - 4,
@@ -2900,7 +2835,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
2900
2835
  return null;
2901
2836
  }
2902
2837
  const plot = layout.plot;
2903
- const groupGapWidth = typeof _optionalChain([columnGroup, 'access', _310 => _310.raw, 'optionalAccess', _311 => _311.gapWidth]) === "number" && Number.isFinite(columnGroup.raw.gapWidth) ? columnGroup.raw.gapWidth : _nullishCoalesce(columnGroup.gapWidth, () => ( chart.gapWidth));
2838
+ const groupGapWidth = typeof _optionalChain([columnGroup, 'access', _308 => _308.raw, 'optionalAccess', _309 => _309.gapWidth]) === "number" && Number.isFinite(columnGroup.raw.gapWidth) ? columnGroup.raw.gapWidth : _nullishCoalesce(columnGroup.gapWidth, () => ( chart.gapWidth));
2904
2839
  const histogramColumns = columnGroup.series.some((series) => isHistogramLikeSeries(series));
2905
2840
  const categoryBandPadding = histogramColumns ? { inner: 0, outer: 0 } : resolveCategoryBandPadding(groupGapWidth);
2906
2841
  const categoryScale = _d3scale.scaleBand.call(void 0, ).domain(categories).range([plot.left, plot.left + plot.width]).paddingInner(categoryBandPadding.inner).paddingOuter(categoryBandPadding.outer);
@@ -2916,15 +2851,15 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
2916
2851
  return null;
2917
2852
  }
2918
2853
  const primaryDomain = resolveNumericAxisDomain(
2919
- typeof _optionalChain([columnGroup, 'access', _312 => _312.valueAxis, 'optionalAccess', _313 => _313.min]) === "number" ? columnGroup.valueAxis.min : Math.min(...primaryValues),
2920
- typeof _optionalChain([columnGroup, 'access', _314 => _314.valueAxis, 'optionalAccess', _315 => _315.max]) === "number" ? columnGroup.valueAxis.max : Math.max(...primaryValues),
2921
- _optionalChain([columnGroup, 'access', _316 => _316.valueAxis, 'optionalAccess', _317 => _317.majorUnit]),
2854
+ typeof _optionalChain([columnGroup, 'access', _310 => _310.valueAxis, 'optionalAccess', _311 => _311.min]) === "number" ? columnGroup.valueAxis.min : Math.min(...primaryValues),
2855
+ typeof _optionalChain([columnGroup, 'access', _312 => _312.valueAxis, 'optionalAccess', _313 => _313.max]) === "number" ? columnGroup.valueAxis.max : Math.max(...primaryValues),
2856
+ _optionalChain([columnGroup, 'access', _314 => _314.valueAxis, 'optionalAccess', _315 => _315.majorUnit]),
2922
2857
  true
2923
2858
  );
2924
2859
  const secondaryDomain = resolveNumericAxisDomain(
2925
- typeof _optionalChain([lineGroup, 'access', _318 => _318.valueAxis, 'optionalAccess', _319 => _319.min]) === "number" ? lineGroup.valueAxis.min : Math.min(...secondaryValues),
2926
- typeof _optionalChain([lineGroup, 'access', _320 => _320.valueAxis, 'optionalAccess', _321 => _321.max]) === "number" ? lineGroup.valueAxis.max : Math.max(...secondaryValues),
2927
- _optionalChain([lineGroup, 'access', _322 => _322.valueAxis, 'optionalAccess', _323 => _323.majorUnit]),
2860
+ typeof _optionalChain([lineGroup, 'access', _316 => _316.valueAxis, 'optionalAccess', _317 => _317.min]) === "number" ? lineGroup.valueAxis.min : Math.min(...secondaryValues),
2861
+ typeof _optionalChain([lineGroup, 'access', _318 => _318.valueAxis, 'optionalAccess', _319 => _319.max]) === "number" ? lineGroup.valueAxis.max : Math.max(...secondaryValues),
2862
+ _optionalChain([lineGroup, 'access', _320 => _320.valueAxis, 'optionalAccess', _321 => _321.majorUnit]),
2928
2863
  false
2929
2864
  );
2930
2865
  const primaryScale = _d3scale.scaleLinear.call(void 0, ).domain([primaryDomain.min, primaryDomain.max]).range([plot.top + plot.height, plot.top]);
@@ -2942,7 +2877,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
2942
2877
  primaryDomain.ticks,
2943
2878
  (value) => primaryScale(value)
2944
2879
  ),
2945
- _optionalChain([lineGroup, 'access', _324 => _324.valueAxis, 'optionalAccess', _325 => _325.delete]) !== true && _optionalChain([lineGroup, 'access', _326 => _326.valueAxis, 'optionalAccess', _327 => _327.labelPosition]) !== "none" ? secondaryDomain.ticks.map((tick) => {
2880
+ _optionalChain([lineGroup, 'access', _322 => _322.valueAxis, 'optionalAccess', _323 => _323.delete]) !== true && _optionalChain([lineGroup, 'access', _324 => _324.valueAxis, 'optionalAccess', _325 => _325.labelPosition]) !== "none" ? secondaryDomain.ticks.map((tick) => {
2946
2881
  const y = secondaryScale(tick);
2947
2882
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2948
2883
  "text",
@@ -2957,7 +2892,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
2957
2892
  `combo-secondary-tick-${tick}`
2958
2893
  );
2959
2894
  }) : null,
2960
- _optionalChain([lineGroup, 'access', _328 => _328.valueAxis, 'optionalAccess', _329 => _329.delete]) !== true ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2895
+ _optionalChain([lineGroup, 'access', _326 => _326.valueAxis, 'optionalAccess', _327 => _327.delete]) !== true ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2961
2896
  "line",
2962
2897
  {
2963
2898
  stroke: axisColor,
@@ -2977,7 +2912,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
2977
2912
  const y = primaryScale(Math.max(0, value));
2978
2913
  const zeroY = primaryScale(0);
2979
2914
  const height = Math.max(1, Math.abs(zeroY - primaryScale(value)));
2980
- const selected = isSelectedChartPoint(selectedChartElement, chart.id, globalSeriesIndex, categoryIndex) || isSelectedChartSeries(selectedChartElement, chart.id, globalSeriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _330 => _330.kind]) !== "point";
2915
+ const selected = isSelectedChartPoint(selectedChartElement, chart.id, globalSeriesIndex, categoryIndex) || isSelectedChartSeries(selectedChartElement, chart.id, globalSeriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _328 => _328.kind]) !== "point";
2981
2916
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React.Fragment, { children: [
2982
2917
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2983
2918
  "rect",
@@ -2992,7 +2927,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
2992
2927
  y: Math.min(y, zeroY)
2993
2928
  }
2994
2929
  ),
2995
- selected ? renderSelectionRectHandles(
2930
+ selected ? _chunkIDNIGBUMcjs.renderSelectionRectHandles.call(void 0,
2996
2931
  `combo-bar-selection-${globalSeriesIndex}-${categoryIndex}`,
2997
2932
  x,
2998
2933
  Math.min(y, zeroY),
@@ -3034,7 +2969,7 @@ function renderComboChart(chart, palette, layout, selectedChartElement) {
3034
2969
  transform: `translate(${point.x}, ${secondaryScale(point.y)})`
3035
2970
  }
3036
2971
  )),
3037
- points.map((point, pointIndex) => point.y != null && isSelectedChartPointOrSeries(selectedChartElement, chart.id, globalSeriesIndex, pointIndex) ? renderSelectionRectHandles(
2972
+ points.map((point, pointIndex) => point.y != null && isSelectedChartPointOrSeries(selectedChartElement, chart.id, globalSeriesIndex, pointIndex) ? _chunkIDNIGBUMcjs.renderSelectionRectHandles.call(void 0,
3038
2973
  `combo-line-selection-${globalSeriesIndex}-${pointIndex}`,
3039
2974
  point.x - 4,
3040
2975
  secondaryScale(point.y) - 4,
@@ -3106,26 +3041,26 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
3106
3041
  if (allX.length === 0 || allY.length === 0) {
3107
3042
  return null;
3108
3043
  }
3109
- const hasExplicitMinX = typeof _optionalChain([chart, 'access', _331 => _331.categoryAxis, 'optionalAccess', _332 => _332.min]) === "number" && Number.isFinite(chart.categoryAxis.min);
3110
- const hasExplicitMaxX = typeof _optionalChain([chart, 'access', _333 => _333.categoryAxis, 'optionalAccess', _334 => _334.max]) === "number" && Number.isFinite(chart.categoryAxis.max);
3111
- const hasExplicitMinY = typeof _optionalChain([chart, 'access', _335 => _335.valueAxis, 'optionalAccess', _336 => _336.min]) === "number" && Number.isFinite(chart.valueAxis.min);
3112
- const hasExplicitMaxY = typeof _optionalChain([chart, 'access', _337 => _337.valueAxis, 'optionalAccess', _338 => _338.max]) === "number" && Number.isFinite(chart.valueAxis.max);
3044
+ const hasExplicitMinX = typeof _optionalChain([chart, 'access', _329 => _329.categoryAxis, 'optionalAccess', _330 => _330.min]) === "number" && Number.isFinite(chart.categoryAxis.min);
3045
+ const hasExplicitMaxX = typeof _optionalChain([chart, 'access', _331 => _331.categoryAxis, 'optionalAccess', _332 => _332.max]) === "number" && Number.isFinite(chart.categoryAxis.max);
3046
+ const hasExplicitMinY = typeof _optionalChain([chart, 'access', _333 => _333.valueAxis, 'optionalAccess', _334 => _334.min]) === "number" && Number.isFinite(chart.valueAxis.min);
3047
+ const hasExplicitMaxY = typeof _optionalChain([chart, 'access', _335 => _335.valueAxis, 'optionalAccess', _336 => _336.max]) === "number" && Number.isFinite(chart.valueAxis.max);
3113
3048
  const hasSyntheticIndexAxis = pointsBySeries.some((series) => series.usesSyntheticIndex);
3114
3049
  const syntheticPointCount = Math.max(0, ...pointsBySeries.map((series) => series.pointCount));
3115
- let minX = hasExplicitMinX ? Number(_optionalChain([chart, 'access', _339 => _339.categoryAxis, 'optionalAccess', _340 => _340.min])) : Math.min(...allX);
3116
- let maxX = hasExplicitMaxX ? Number(_optionalChain([chart, 'access', _341 => _341.categoryAxis, 'optionalAccess', _342 => _342.max])) : Math.max(...allX);
3117
- let minY = hasExplicitMinY ? Number(_optionalChain([chart, 'access', _343 => _343.valueAxis, 'optionalAccess', _344 => _344.min])) : Math.min(...allY);
3118
- let maxY = hasExplicitMaxY ? Number(_optionalChain([chart, 'access', _345 => _345.valueAxis, 'optionalAccess', _346 => _346.max])) : Math.max(...allY);
3050
+ let minX = hasExplicitMinX ? Number(_optionalChain([chart, 'access', _337 => _337.categoryAxis, 'optionalAccess', _338 => _338.min])) : Math.min(...allX);
3051
+ let maxX = hasExplicitMaxX ? Number(_optionalChain([chart, 'access', _339 => _339.categoryAxis, 'optionalAccess', _340 => _340.max])) : Math.max(...allX);
3052
+ let minY = hasExplicitMinY ? Number(_optionalChain([chart, 'access', _341 => _341.valueAxis, 'optionalAccess', _342 => _342.min])) : Math.min(...allY);
3053
+ let maxY = hasExplicitMaxY ? Number(_optionalChain([chart, 'access', _343 => _343.valueAxis, 'optionalAccess', _344 => _344.max])) : Math.max(...allY);
3119
3054
  if (!hasExplicitMinX) {
3120
- minX = hasSyntheticIndexAxis ? 0 : _optionalChain([chart, 'access', _347 => _347.categoryAxis, 'optionalAccess', _348 => _348.crosses]) === "autoZero" ? Math.min(0, minX) : minX;
3055
+ minX = hasSyntheticIndexAxis ? 0 : _optionalChain([chart, 'access', _345 => _345.categoryAxis, 'optionalAccess', _346 => _346.crosses]) === "autoZero" ? Math.min(0, minX) : minX;
3121
3056
  }
3122
3057
  if (!hasExplicitMaxX) {
3123
- maxX = hasSyntheticIndexAxis ? Math.max(maxX, syntheticPointCount + 1) : _optionalChain([chart, 'access', _349 => _349.categoryAxis, 'optionalAccess', _350 => _350.crosses]) === "autoZero" ? Math.max(0, maxX) : maxX;
3058
+ maxX = hasSyntheticIndexAxis ? Math.max(maxX, syntheticPointCount + 1) : _optionalChain([chart, 'access', _347 => _347.categoryAxis, 'optionalAccess', _348 => _348.crosses]) === "autoZero" ? Math.max(0, maxX) : maxX;
3124
3059
  }
3125
- if (!hasExplicitMinY && _optionalChain([chart, 'access', _351 => _351.valueAxis, 'optionalAccess', _352 => _352.crosses]) === "autoZero") {
3060
+ if (!hasExplicitMinY && _optionalChain([chart, 'access', _349 => _349.valueAxis, 'optionalAccess', _350 => _350.crosses]) === "autoZero") {
3126
3061
  minY = Math.min(0, minY);
3127
3062
  }
3128
- if (!hasExplicitMaxY && _optionalChain([chart, 'access', _353 => _353.valueAxis, 'optionalAccess', _354 => _354.crosses]) === "autoZero") {
3063
+ if (!hasExplicitMaxY && _optionalChain([chart, 'access', _351 => _351.valueAxis, 'optionalAccess', _352 => _352.crosses]) === "autoZero") {
3129
3064
  maxY = Math.max(0, maxY);
3130
3065
  }
3131
3066
  if (maxX <= minX) {
@@ -3134,8 +3069,8 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
3134
3069
  if (maxY <= minY) {
3135
3070
  maxY = minY + 1;
3136
3071
  }
3137
- const xStep = typeof _optionalChain([chart, 'access', _355 => _355.categoryAxis, 'optionalAccess', _356 => _356.majorUnit]) === "number" && chart.categoryAxis.majorUnit > 0 ? chart.categoryAxis.majorUnit : buildNiceStep(minX, maxX, 5);
3138
- const yStep = typeof _optionalChain([chart, 'access', _357 => _357.valueAxis, 'optionalAccess', _358 => _358.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : buildNiceStep(minY, maxY, 5);
3072
+ const xStep = typeof _optionalChain([chart, 'access', _353 => _353.categoryAxis, 'optionalAccess', _354 => _354.majorUnit]) === "number" && chart.categoryAxis.majorUnit > 0 ? chart.categoryAxis.majorUnit : buildNiceStep(minX, maxX, 5);
3073
+ const yStep = typeof _optionalChain([chart, 'access', _355 => _355.valueAxis, 'optionalAccess', _356 => _356.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : buildNiceStep(minY, maxY, 5);
3139
3074
  if (!hasExplicitMinX && !hasSyntheticIndexAxis && Number.isFinite(xStep) && xStep > 0) {
3140
3075
  minX = Math.floor(minX / xStep) * xStep;
3141
3076
  }
@@ -3152,8 +3087,8 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
3152
3087
  const safeMaxY = maxY <= minY ? minY + 1 : maxY;
3153
3088
  const xScale = _d3scale.scaleLinear.call(void 0, ).domain([minX, safeMaxX]).range([plot.left, plot.left + plot.width]);
3154
3089
  const yScale = _d3scale.scaleLinear.call(void 0, ).domain([minY, safeMaxY]).range([plot.top + plot.height, plot.top]);
3155
- const xMajorUnit = typeof _optionalChain([chart, 'access', _359 => _359.categoryAxis, 'optionalAccess', _360 => _360.majorUnit]) === "number" && chart.categoryAxis.majorUnit > 0 ? chart.categoryAxis.majorUnit : hasSyntheticIndexAxis ? 1 : void 0;
3156
- const yMajorUnit = typeof _optionalChain([chart, 'access', _361 => _361.valueAxis, 'optionalAccess', _362 => _362.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : buildNiceStep(minY, safeMaxY, 6);
3090
+ const xMajorUnit = typeof _optionalChain([chart, 'access', _357 => _357.categoryAxis, 'optionalAccess', _358 => _358.majorUnit]) === "number" && chart.categoryAxis.majorUnit > 0 ? chart.categoryAxis.majorUnit : hasSyntheticIndexAxis ? 1 : void 0;
3091
+ const yMajorUnit = typeof _optionalChain([chart, 'access', _359 => _359.valueAxis, 'optionalAccess', _360 => _360.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : buildNiceStep(minY, safeMaxY, 6);
3157
3092
  const xTicks = buildNumericTickValues(minX, safeMaxX, xMajorUnit);
3158
3093
  const yTicks = buildNumericTickValues(minY, safeMaxY, yMajorUnit);
3159
3094
  const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
@@ -3219,7 +3154,7 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
3219
3154
  markerSize
3220
3155
  );
3221
3156
  const markerFill = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(series.lineColor, () => ( series.markerColor)), () => ( series.color)), () => ( chartSeriesStrokeColor(chart, seriesIndex)));
3222
- const shouldDrawLine = styleDrawsLine && _optionalChain([series, 'access', _363 => _363.shapeProperties, 'optionalAccess', _364 => _364.xmlLineHidden]) !== true && seriesPoints.points.length > 1;
3157
+ const shouldDrawLine = styleDrawsLine && _optionalChain([series, 'access', _361 => _361.shapeProperties, 'optionalAccess', _362 => _362.xmlLineHidden]) !== true && seriesPoints.points.length > 1;
3223
3158
  const shouldDrawMarkers = styleShowsMarkers && markerPath.length > 0;
3224
3159
  const lineCurve = smooth || styleUsesSmoothCurve || series.smooth === true ? _d3shape.curveCatmullRom.alpha(0.5) : _d3shape.curveLinear;
3225
3160
  const linePath = shouldDrawLine ? _nullishCoalesce(_d3shape.line.call(void 0, ).x((point) => xScale(point.x)).y((point) => yScale(point.y)).curve(lineCurve)(seriesPoints.points), () => ( "")) : "";
@@ -3258,7 +3193,7 @@ function renderScatterChart(chart, palette, layout, smooth, selectedChartElement
3258
3193
  `scatter-point-${seriesIndex}-${pointIndex}`
3259
3194
  );
3260
3195
  }),
3261
- seriesPoints.points.map((point, pointIndex) => isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _365 => _365.kind]) !== "point" ? renderSelectionPointHandles(
3196
+ seriesPoints.points.map((point, pointIndex) => isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _363 => _363.kind]) !== "point" ? _chunkIDNIGBUMcjs.renderSelectionPointHandles.call(void 0,
3262
3197
  `scatter-selection-${seriesIndex}-${pointIndex}`,
3263
3198
  [{ x: xScale(point.x), y: yScale(point.y) }]
3264
3199
  ) : null)
@@ -3271,7 +3206,7 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
3271
3206
  const pointsBySeries = chart.series.map((series) => series.values.map((value, index) => {
3272
3207
  const x = safeNumber(series.categories[index]);
3273
3208
  const y = safeNumber(value);
3274
- const bubble = safeNumber(_optionalChain([series, 'access', _366 => _366.bubbleSizes, 'optionalAccess', _367 => _367[index]]));
3209
+ const bubble = safeNumber(_optionalChain([series, 'access', _364 => _364.bubbleSizes, 'optionalAccess', _365 => _365[index]]));
3275
3210
  return x == null || y == null ? null : { bubble: _nullishCoalesce(bubble, () => ( 1)), index, x, y };
3276
3211
  }).filter((point) => point != null));
3277
3212
  const allX = pointsBySeries.flatMap((points) => points.map((point) => point.x));
@@ -3301,13 +3236,13 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
3301
3236
  chart.categoryAxis,
3302
3237
  minX - xPad,
3303
3238
  safeMaxX + xPad,
3304
- _optionalChain([chart, 'access', _368 => _368.categoryAxis, 'optionalAccess', _369 => _369.crosses]) === "autoZero"
3239
+ _optionalChain([chart, 'access', _366 => _366.categoryAxis, 'optionalAccess', _367 => _367.crosses]) === "autoZero"
3305
3240
  );
3306
3241
  const yDomain = resolveAxisDomainWithChartOverrides(
3307
3242
  chart.valueAxis,
3308
3243
  minY - yPad,
3309
3244
  safeMaxY + yPad,
3310
- _optionalChain([chart, 'access', _370 => _370.valueAxis, 'optionalAccess', _371 => _371.crosses]) === "autoZero"
3245
+ _optionalChain([chart, 'access', _368 => _368.valueAxis, 'optionalAccess', _369 => _369.crosses]) === "autoZero"
3311
3246
  );
3312
3247
  const xScale = _d3scale.scaleLinear.call(void 0, ).domain([xDomain.min, xDomain.max]).range([plot.left, plot.left + plot.width]);
3313
3248
  const yScale = _d3scale.scaleLinear.call(void 0, ).domain([yDomain.min, yDomain.max]).range([plot.top + plot.height, plot.top]);
@@ -3317,7 +3252,7 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
3317
3252
  const labelColor = resolveChartAxisTextColor(chart);
3318
3253
  const isBubble3d = chart.bubble3d === true || chart.is3d === true;
3319
3254
  const labelsEnabled = Boolean(
3320
- _optionalChain([chart, 'access', _372 => _372.dataLabels, 'optionalAccess', _373 => _373.showCategoryName]) || _optionalChain([chart, 'access', _374 => _374.dataLabels, 'optionalAccess', _375 => _375.showSeriesName]) || _optionalChain([chart, 'access', _376 => _376.dataLabels, 'optionalAccess', _377 => _377.showValue]) || _optionalChain([chart, 'access', _378 => _378.dataLabels, 'optionalAccess', _379 => _379.showBubbleSize]) || _optionalChain([chart, 'access', _380 => _380.dataLabels, 'optionalAccess', _381 => _381.showPercent])
3255
+ _optionalChain([chart, 'access', _370 => _370.dataLabels, 'optionalAccess', _371 => _371.showCategoryName]) || _optionalChain([chart, 'access', _372 => _372.dataLabels, 'optionalAccess', _373 => _373.showSeriesName]) || _optionalChain([chart, 'access', _374 => _374.dataLabels, 'optionalAccess', _375 => _375.showValue]) || _optionalChain([chart, 'access', _376 => _376.dataLabels, 'optionalAccess', _377 => _377.showBubbleSize]) || _optionalChain([chart, 'access', _378 => _378.dataLabels, 'optionalAccess', _379 => _379.showPercent])
3321
3256
  );
3322
3257
  const bubbleTotals = pointsBySeries.map((points) => points.reduce((sum, point) => sum + Math.abs(point.bubble), 0));
3323
3258
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
@@ -3353,9 +3288,9 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
3353
3288
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "line", { stroke: axisColor, strokeWidth: 1.2, x1: plot.left, x2: plot.left, y1: plot.top, y2: plot.top + plot.height }),
3354
3289
  pointsBySeries.map((points, seriesIndex) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
3355
3290
  isBubble3d ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "defs", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "radialGradient", { id: `bubble3d-grad-${chart.id}-${seriesIndex}`, cx: "35%", cy: "30%", r: "70%", children: [
3356
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "0%", stopColor: lightenColor(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _382 => _382.series, 'access', _383 => _383[seriesIndex], 'optionalAccess', _384 => _384.color]), () => ( _optionalChain([chart, 'access', _385 => _385.series, 'access', _386 => _386[seriesIndex], 'optionalAccess', _387 => _387.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex))), 0.42) }),
3357
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "58%", stopColor: _nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _388 => _388.series, 'access', _389 => _389[seriesIndex], 'optionalAccess', _390 => _390.color]), () => ( _optionalChain([chart, 'access', _391 => _391.series, 'access', _392 => _392[seriesIndex], 'optionalAccess', _393 => _393.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex))) }),
3358
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "100%", stopColor: darkenColor(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _394 => _394.series, 'access', _395 => _395[seriesIndex], 'optionalAccess', _396 => _396.color]), () => ( _optionalChain([chart, 'access', _397 => _397.series, 'access', _398 => _398[seriesIndex], 'optionalAccess', _399 => _399.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex))), 0.18) })
3291
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "0%", stopColor: lightenColor(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _380 => _380.series, 'access', _381 => _381[seriesIndex], 'optionalAccess', _382 => _382.color]), () => ( _optionalChain([chart, 'access', _383 => _383.series, 'access', _384 => _384[seriesIndex], 'optionalAccess', _385 => _385.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex))), 0.42) }),
3292
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "58%", stopColor: _nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _386 => _386.series, 'access', _387 => _387[seriesIndex], 'optionalAccess', _388 => _388.color]), () => ( _optionalChain([chart, 'access', _389 => _389.series, 'access', _390 => _390[seriesIndex], 'optionalAccess', _391 => _391.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex))) }),
3293
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "100%", stopColor: darkenColor(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _392 => _392.series, 'access', _393 => _393[seriesIndex], 'optionalAccess', _394 => _394.color]), () => ( _optionalChain([chart, 'access', _395 => _395.series, 'access', _396 => _396[seriesIndex], 'optionalAccess', _397 => _397.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex))), 0.18) })
3359
3294
  ] }) }) : null,
3360
3295
  [...points].sort((left, right) => {
3361
3296
  if (left.bubble !== right.bubble) {
@@ -3364,22 +3299,22 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
3364
3299
  return left.index - right.index;
3365
3300
  }).map((point) => {
3366
3301
  const series = chart.series[seriesIndex];
3367
- const baseColor = _nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'optionalAccess', _400 => _400.color]), () => ( _optionalChain([series, 'optionalAccess', _401 => _401.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex)));
3302
+ const baseColor = _nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'optionalAccess', _398 => _398.color]), () => ( _optionalChain([series, 'optionalAccess', _399 => _399.lineColor]))), () => ( chartSeriesColor(chart, seriesIndex)));
3368
3303
  const radius = radiusScale(Math.sqrt(Math.max(0, point.bubble)));
3369
3304
  const pieces = [];
3370
- if (_optionalChain([chart, 'access', _402 => _402.dataLabels, 'optionalAccess', _403 => _403.showSeriesName]) && _optionalChain([series, 'optionalAccess', _404 => _404.name])) {
3305
+ if (_optionalChain([chart, 'access', _400 => _400.dataLabels, 'optionalAccess', _401 => _401.showSeriesName]) && _optionalChain([series, 'optionalAccess', _402 => _402.name])) {
3371
3306
  pieces.push(series.name);
3372
3307
  }
3373
- if (_optionalChain([chart, 'access', _405 => _405.dataLabels, 'optionalAccess', _406 => _406.showCategoryName])) {
3308
+ if (_optionalChain([chart, 'access', _403 => _403.dataLabels, 'optionalAccess', _404 => _404.showCategoryName])) {
3374
3309
  pieces.push(formatTickValue(point.x));
3375
3310
  }
3376
- if (_optionalChain([chart, 'access', _407 => _407.dataLabels, 'optionalAccess', _408 => _408.showValue])) {
3311
+ if (_optionalChain([chart, 'access', _405 => _405.dataLabels, 'optionalAccess', _406 => _406.showValue])) {
3377
3312
  pieces.push(formatTickValue(point.y));
3378
3313
  }
3379
- if (_optionalChain([chart, 'access', _409 => _409.dataLabels, 'optionalAccess', _410 => _410.showBubbleSize])) {
3314
+ if (_optionalChain([chart, 'access', _407 => _407.dataLabels, 'optionalAccess', _408 => _408.showBubbleSize])) {
3380
3315
  pieces.push(formatTickValue(point.bubble));
3381
3316
  }
3382
- if (_optionalChain([chart, 'access', _411 => _411.dataLabels, 'optionalAccess', _412 => _412.showPercent])) {
3317
+ if (_optionalChain([chart, 'access', _409 => _409.dataLabels, 'optionalAccess', _410 => _410.showPercent])) {
3383
3318
  pieces.push(`${Math.round(Math.abs(point.bubble) / Math.max(1, _nullishCoalesce(bubbleTotals[seriesIndex], () => ( 1))) * 100)}%`);
3384
3319
  }
3385
3320
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
@@ -3396,7 +3331,7 @@ function renderBubbleChart(chart, palette, layout, selectedChartElement) {
3396
3331
  strokeWidth: isBubble3d ? 1.2 : 1
3397
3332
  }
3398
3333
  ),
3399
- isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, point.index) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _413 => _413.kind]) !== "point" ? renderSelectionRectHandles(
3334
+ isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, point.index) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _411 => _411.kind]) !== "point" ? _chunkIDNIGBUMcjs.renderSelectionRectHandles.call(void 0,
3400
3335
  `bubble-selection-${seriesIndex}-${point.index}`,
3401
3336
  xScale(point.x) - radius,
3402
3337
  yScale(point.y) - radius,
@@ -3443,22 +3378,22 @@ function renderRadarChart(chart, palette, layout, selectedChartElement) {
3443
3378
  const centerY = plot.top + plot.height * 0.52;
3444
3379
  const radius = Math.max(22, Math.min(plot.width, plot.height) * 0.38);
3445
3380
  const values = chart.series.flatMap((series) => series.values.slice(0, categories.length).map((value) => safeNumber(value)).filter((value) => value != null));
3446
- const hasExplicitMin = typeof _optionalChain([chart, 'access', _414 => _414.valueAxis, 'optionalAccess', _415 => _415.min]) === "number" && Number.isFinite(chart.valueAxis.min);
3447
- const hasExplicitMax = typeof _optionalChain([chart, 'access', _416 => _416.valueAxis, 'optionalAccess', _417 => _417.max]) === "number" && Number.isFinite(chart.valueAxis.max);
3448
- let minValue = hasExplicitMin ? Number(_optionalChain([chart, 'access', _418 => _418.valueAxis, 'optionalAccess', _419 => _419.min])) : Math.min(0, ...values.length ? values : [0]);
3449
- let maxValue = hasExplicitMax ? Number(_optionalChain([chart, 'access', _420 => _420.valueAxis, 'optionalAccess', _421 => _421.max])) : Math.max(1, ...values.length ? values : [1]);
3450
- if (_optionalChain([chart, 'access', _422 => _422.valueAxis, 'optionalAccess', _423 => _423.crosses]) === "autoZero") {
3381
+ const hasExplicitMin = typeof _optionalChain([chart, 'access', _412 => _412.valueAxis, 'optionalAccess', _413 => _413.min]) === "number" && Number.isFinite(chart.valueAxis.min);
3382
+ const hasExplicitMax = typeof _optionalChain([chart, 'access', _414 => _414.valueAxis, 'optionalAccess', _415 => _415.max]) === "number" && Number.isFinite(chart.valueAxis.max);
3383
+ let minValue = hasExplicitMin ? Number(_optionalChain([chart, 'access', _416 => _416.valueAxis, 'optionalAccess', _417 => _417.min])) : Math.min(0, ...values.length ? values : [0]);
3384
+ let maxValue = hasExplicitMax ? Number(_optionalChain([chart, 'access', _418 => _418.valueAxis, 'optionalAccess', _419 => _419.max])) : Math.max(1, ...values.length ? values : [1]);
3385
+ if (_optionalChain([chart, 'access', _420 => _420.valueAxis, 'optionalAccess', _421 => _421.crosses]) === "autoZero") {
3451
3386
  minValue = Math.min(0, minValue);
3452
3387
  }
3453
3388
  const safeMax = maxValue <= minValue ? minValue + 1 : maxValue;
3454
3389
  const span = Math.max(1e-6, safeMax - minValue);
3455
- const candidateMajorUnit = typeof _optionalChain([chart, 'access', _424 => _424.valueAxis, 'optionalAccess', _425 => _425.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : void 0;
3390
+ const candidateMajorUnit = typeof _optionalChain([chart, 'access', _422 => _422.valueAxis, 'optionalAccess', _423 => _423.majorUnit]) === "number" && chart.valueAxis.majorUnit > 0 ? chart.valueAxis.majorUnit : void 0;
3456
3391
  const preferredMajorUnit = candidateMajorUnit && span / candidateMajorUnit >= 3 ? candidateMajorUnit : buildNiceStep(minValue, safeMax, 6);
3457
3392
  const ticks = buildNumericTickValues(minValue, safeMax, preferredMajorUnit);
3458
3393
  const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
3459
3394
  const labelColor = resolveChartAxisTextColor(chart);
3460
3395
  const filled = chart.radarStyle === "filled";
3461
- const showSpokes = _optionalChain([chart, 'access', _426 => _426.categoryAxis, 'optionalAccess', _427 => _427.majorGridlines]) === true;
3396
+ const showSpokes = _optionalChain([chart, 'access', _424 => _424.categoryAxis, 'optionalAccess', _425 => _425.majorGridlines]) === true;
3462
3397
  const angleAt = (index) => Math.PI * 2 * index / categories.length - Math.PI / 2;
3463
3398
  const radialPoint = (index, valueRatio) => {
3464
3399
  const angle = angleAt(index);
@@ -3560,7 +3495,7 @@ function renderRadarChart(chart, palette, layout, selectedChartElement) {
3560
3495
  },
3561
3496
  `radar-point-${seriesIndex}-${point.pointIndex}`
3562
3497
  )) : null,
3563
- definedPoints.map((point) => isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, point.pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _428 => _428.kind]) !== "point" ? renderSelectionPointHandles(
3498
+ definedPoints.map((point) => isSelectedChartPoint(selectedChartElement, chart.id, seriesIndex, point.pointIndex) || isSelectedChartSeries(selectedChartElement, chart.id, seriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _426 => _426.kind]) !== "point" ? _chunkIDNIGBUMcjs.renderSelectionPointHandles.call(void 0,
3564
3499
  `radar-selection-${seriesIndex}-${point.pointIndex}`,
3565
3500
  [{ x: point.x, y: point.y }]
3566
3501
  ) : null)
@@ -3585,14 +3520,14 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
3585
3520
  const arcs = _d3shape.pie.call(void 0, ).value((entry) => entry.value).sort(null).startAngle(startAngle).endAngle(startAngle + Math.PI * 2)(pieData);
3586
3521
  const arcPath = _d3shape.arc.call(void 0, ).innerRadius(innerRadius).outerRadius(outerRadius);
3587
3522
  const isPie3d = chartType === "Pie3D" || chartType === "PieExploded" && chart.is3d === true;
3588
- const rotX = _nullishCoalesce(_optionalChain([chart, 'access', _429 => _429.view3d, 'optionalAccess', _430 => _430.rotX]), () => ( 20));
3589
- const perspective = _nullishCoalesce(_optionalChain([chart, 'access', _431 => _431.view3d, 'optionalAccess', _432 => _432.perspective]), () => ( 30));
3523
+ const rotX = _nullishCoalesce(_optionalChain([chart, 'access', _427 => _427.view3d, 'optionalAccess', _428 => _428.rotX]), () => ( 20));
3524
+ const perspective = _nullishCoalesce(_optionalChain([chart, 'access', _429 => _429.view3d, 'optionalAccess', _430 => _430.perspective]), () => ( 30));
3590
3525
  const tiltFromRotX = clamp(0.14 + rotX / 90 * 0.72, 0.12, 0.92);
3591
3526
  const perspectiveCompression = clamp(1 - perspective / 180, 0.55, 1);
3592
3527
  const tilt = isPie3d ? clamp(tiltFromRotX * perspectiveCompression, 0.14, 0.78) : 1;
3593
- const depthScale = (_nullishCoalesce(_optionalChain([chart, 'access', _433 => _433.view3d, 'optionalAccess', _434 => _434.depthPercent]), () => ( 100))) / 100;
3528
+ const depthScale = (_nullishCoalesce(_optionalChain([chart, 'access', _431 => _431.view3d, 'optionalAccess', _432 => _432.depthPercent]), () => ( 100))) / 100;
3594
3529
  const depth = isPie3d ? Math.max(9, outerRadius * 0.28 * depthScale) : 0;
3595
- const dataLabelsEnabled = Boolean(_optionalChain([chart, 'access', _435 => _435.dataLabels, 'optionalAccess', _436 => _436.showCategoryName]) || _optionalChain([chart, 'access', _437 => _437.dataLabels, 'optionalAccess', _438 => _438.showPercent]) || _optionalChain([chart, 'access', _439 => _439.dataLabels, 'optionalAccess', _440 => _440.showValue]));
3530
+ const dataLabelsEnabled = Boolean(_optionalChain([chart, 'access', _433 => _433.dataLabels, 'optionalAccess', _434 => _434.showCategoryName]) || _optionalChain([chart, 'access', _435 => _435.dataLabels, 'optionalAccess', _436 => _436.showPercent]) || _optionalChain([chart, 'access', _437 => _437.dataLabels, 'optionalAccess', _438 => _438.showValue]));
3596
3531
  const total = pieData.reduce((sum, entry) => sum + entry.value, 0);
3597
3532
  const shadowId = `pie3d-shadow-${chart.id}`.replace(/[^A-Za-z0-9_-]/g, "-");
3598
3533
  const baseShadowId = `pie3d-base-shadow-${chart.id}`.replace(/[^A-Za-z0-9_-]/g, "-");
@@ -3603,8 +3538,8 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
3603
3538
  right: layout.width - 6,
3604
3539
  top: layout.plot.top + 8
3605
3540
  };
3606
- const pointLabelByIndex = new Map((_nullishCoalesce(_optionalChain([chart, 'access', _441 => _441.dataLabels, 'optionalAccess', _442 => _442.pointLabels]), () => ( []))).map((label) => [label.index, label]));
3607
- const centerValuePointLabel = chartType === "Doughnut" ? _nullishCoalesce((_nullishCoalesce(_optionalChain([chart, 'access', _443 => _443.dataLabels, 'optionalAccess', _444 => _444.pointLabels]), () => ( []))).find((label) => label.deleted !== true && label.showValue === true && label.showCategoryName !== true && label.showPercent !== true && label.showSeriesName !== true && label.showBubbleSize !== true), () => ( null)) : null;
3541
+ const pointLabelByIndex = new Map((_nullishCoalesce(_optionalChain([chart, 'access', _439 => _439.dataLabels, 'optionalAccess', _440 => _440.pointLabels]), () => ( []))).map((label) => [label.index, label]));
3542
+ const centerValuePointLabel = chartType === "Doughnut" ? _nullishCoalesce((_nullishCoalesce(_optionalChain([chart, 'access', _441 => _441.dataLabels, 'optionalAccess', _442 => _442.pointLabels]), () => ( []))).find((label) => label.deleted !== true && label.showValue === true && label.showCategoryName !== true && label.showPercent !== true && label.showSeriesName !== true && label.showBubbleSize !== true), () => ( null)) : null;
3608
3543
  const centerValueEntry = centerValuePointLabel ? _nullishCoalesce(pieData.find((entry) => entry.index === centerValuePointLabel.index), () => ( null)) : null;
3609
3544
  const shouldRenderCenterValue = chartType === "Doughnut" && centerValueEntry != null;
3610
3545
  const centerValueLooksPercent = centerValueEntry != null && total > 0 && total <= 1.0000001 && centerValueEntry.value >= 0 && centerValueEntry.value <= 1.0000001;
@@ -3613,13 +3548,13 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
3613
3548
  14,
3614
3549
  Math.min(
3615
3550
  Math.max(20, innerRadius * 0.72),
3616
- (_nullishCoalesce(_optionalChain([centerValuePointLabel, 'optionalAccess', _445 => _445.fontSizePt]), () => ( 28))) * 0.85
3551
+ (_nullishCoalesce(_optionalChain([centerValuePointLabel, 'optionalAccess', _443 => _443.fontSizePt]), () => ( 28))) * 0.85
3617
3552
  )
3618
3553
  ) : 0;
3619
3554
  const resolveSliceExplosion = (pointIndex) => {
3620
- const pointStyle = _optionalChain([pieSeries, 'optionalAccess', _446 => _446.dataPointStyles, 'optionalAccess', _447 => _447.find, 'call', _448 => _448((entry) => entry.index === pointIndex)]);
3621
- const seriesExplosion = typeof _optionalChain([pieSeries, 'optionalAccess', _449 => _449.shapeProperties, 'optionalAccess', _450 => _450.xmlExplosion]) === "number" ? pieSeries.shapeProperties.xmlExplosion : 0;
3622
- const rawExplosion = Math.max(0, _nullishCoalesce(_nullishCoalesce(_optionalChain([pointStyle, 'optionalAccess', _451 => _451.explosion]), () => ( seriesExplosion)), () => ( 0)));
3555
+ const pointStyle = _optionalChain([pieSeries, 'optionalAccess', _444 => _444.dataPointStyles, 'optionalAccess', _445 => _445.find, 'call', _446 => _446((entry) => entry.index === pointIndex)]);
3556
+ const seriesExplosion = typeof _optionalChain([pieSeries, 'optionalAccess', _447 => _447.shapeProperties, 'optionalAccess', _448 => _448.xmlExplosion]) === "number" ? pieSeries.shapeProperties.xmlExplosion : 0;
3557
+ const rawExplosion = Math.max(0, _nullishCoalesce(_nullishCoalesce(_optionalChain([pointStyle, 'optionalAccess', _449 => _449.explosion]), () => ( seriesExplosion)), () => ( 0)));
3623
3558
  if (rawExplosion <= 0) {
3624
3559
  return 0;
3625
3560
  }
@@ -3720,7 +3655,7 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
3720
3655
  const midAngle = (arc.startAngle + arc.endAngle) / 2;
3721
3656
  const explodeX = Math.sin(midAngle) * explosion;
3722
3657
  const explodeY = -Math.cos(midAngle) * explosion * (isPie3d ? tilt : 1);
3723
- const isSliceSelected = isSelectedChartPoint(selectedChartElement, chart.id, pieSeriesIndex, arc.data.index) || isSelectedChartSeries(selectedChartElement, chart.id, pieSeriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _452 => _452.kind]) !== "point";
3658
+ const isSliceSelected = isSelectedChartPoint(selectedChartElement, chart.id, pieSeriesIndex, arc.data.index) || isSelectedChartSeries(selectedChartElement, chart.id, pieSeriesIndex) && _optionalChain([selectedChartElement, 'optionalAccess', _450 => _450.kind]) !== "point";
3724
3659
  const sliceHandlePoints = isSliceSelected ? [
3725
3660
  pieEllipsePoint(centerX, centerY, outerRadius, isPie3d ? tilt : 1, arc.startAngle),
3726
3661
  pieEllipsePoint(centerX, centerY, outerRadius, isPie3d ? tilt : 1, midAngle),
@@ -3734,12 +3669,12 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
3734
3669
  const labelX = centerX + Math.sin(midAngle) * labelRadius + explodeX;
3735
3670
  const labelY = centerY - Math.cos(midAngle) * labelRadius * (isPie3d ? tilt : 1) + explodeY;
3736
3671
  const pieces = [];
3737
- if (_optionalChain([chart, 'access', _453 => _453.dataLabels, 'optionalAccess', _454 => _454.showCategoryName]) && arc.data.label.trim().length > 0) {
3672
+ if (_optionalChain([chart, 'access', _451 => _451.dataLabels, 'optionalAccess', _452 => _452.showCategoryName]) && arc.data.label.trim().length > 0) {
3738
3673
  pieces.push(arc.data.label);
3739
3674
  }
3740
3675
  const pointLabel = pointLabelByIndex.get(arc.data.index);
3741
- const showValue = _nullishCoalesce(_optionalChain([pointLabel, 'optionalAccess', _455 => _455.showValue]), () => ( _optionalChain([chart, 'access', _456 => _456.dataLabels, 'optionalAccess', _457 => _457.showValue])));
3742
- const showPercent = _nullishCoalesce(_optionalChain([pointLabel, 'optionalAccess', _458 => _458.showPercent]), () => ( _optionalChain([chart, 'access', _459 => _459.dataLabels, 'optionalAccess', _460 => _460.showPercent])));
3676
+ const showValue = _nullishCoalesce(_optionalChain([pointLabel, 'optionalAccess', _453 => _453.showValue]), () => ( _optionalChain([chart, 'access', _454 => _454.dataLabels, 'optionalAccess', _455 => _455.showValue])));
3677
+ const showPercent = _nullishCoalesce(_optionalChain([pointLabel, 'optionalAccess', _456 => _456.showPercent]), () => ( _optionalChain([chart, 'access', _457 => _457.dataLabels, 'optionalAccess', _458 => _458.showPercent])));
3743
3678
  if (showValue) {
3744
3679
  pieces.push(formatTickValue(arc.data.value));
3745
3680
  }
@@ -3772,7 +3707,7 @@ function renderPieChart(chart, palette, layout, chartType, selectedChartElement)
3772
3707
  transform: `translate(${centerX}, ${centerY})${isPie3d ? ` scale(1, ${tilt})` : ""}`
3773
3708
  }
3774
3709
  ) }),
3775
- isSliceSelected ? renderSelectionPointHandles(`pie-selection-${arc.data.index}`, sliceHandlePoints) : null,
3710
+ isSliceSelected ? _chunkIDNIGBUMcjs.renderSelectionPointHandles.call(void 0, `pie-selection-${arc.data.index}`, sliceHandlePoints) : null,
3776
3711
  dataLabelsEnabled && truncatedLabelText.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3777
3712
  "text",
3778
3713
  {
@@ -3804,7 +3739,7 @@ function renderBarOfPieChart(chart, palette, layout, selectedChartElement) {
3804
3739
  const pieSeriesIndex = selectPrimaryPieSeriesIndex(chart);
3805
3740
  const pieSeries = chart.series[pieSeriesIndex];
3806
3741
  const categories = getCategoryLabels(chart);
3807
- const values = _nullishCoalesce(_optionalChain([pieSeries, 'optionalAccess', _461 => _461.values, 'access', _462 => _462.map, 'call', _463 => _463((value) => Math.max(0, _nullishCoalesce(safeNumber(value), () => ( 0))))]), () => ( []));
3742
+ const values = _nullishCoalesce(_optionalChain([pieSeries, 'optionalAccess', _459 => _459.values, 'access', _460 => _460.map, 'call', _461 => _461((value) => Math.max(0, _nullishCoalesce(safeNumber(value), () => ( 0))))]), () => ( []));
3808
3743
  if (values.length === 0) {
3809
3744
  return null;
3810
3745
  }
@@ -3868,7 +3803,7 @@ function renderBarOfPieChart(chart, palette, layout, selectedChartElement) {
3868
3803
  transform: `translate(${pieCenterX}, ${pieCenterY})`
3869
3804
  }
3870
3805
  ),
3871
- selected ? renderSelectionPointHandles(`bar-of-pie-main-selection-${index}`, [dot]) : null
3806
+ selected ? _chunkIDNIGBUMcjs.renderSelectionPointHandles.call(void 0, `bar-of-pie-main-selection-${index}`, [dot]) : null
3872
3807
  ] }, `bar-of-pie-main-${index}`);
3873
3808
  }),
3874
3809
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -3909,7 +3844,7 @@ function renderBarOfPieChart(chart, palette, layout, selectedChartElement) {
3909
3844
  transform: `translate(${secondaryCenterX}, ${secondaryCenterY})`
3910
3845
  }
3911
3846
  ),
3912
- selected ? renderSelectionPointHandles(`bar-of-pie-secondary-pie-selection-${index}`, [dot]) : null
3847
+ selected ? _chunkIDNIGBUMcjs.renderSelectionPointHandles.call(void 0, `bar-of-pie-secondary-pie-selection-${index}`, [dot]) : null
3913
3848
  ] }, `bar-of-pie-secondary-pie-${index}`);
3914
3849
  }) : secondaryData.map((entry, index) => {
3915
3850
  const segmentHeight = index === secondaryData.length - 1 ? Math.max(1, stackedBarTop + stackedBarHeight - stackCursor) : Math.max(1, entry.value / secondaryTotalSafe * stackedBarHeight);
@@ -3930,7 +3865,7 @@ function renderBarOfPieChart(chart, palette, layout, selectedChartElement) {
3930
3865
  y
3931
3866
  }
3932
3867
  ),
3933
- selected ? renderSelectionRectHandles(
3868
+ selected ? _chunkIDNIGBUMcjs.renderSelectionRectHandles.call(void 0,
3934
3869
  `bar-of-pie-secondary-bar-selection-${index}`,
3935
3870
  stackedBarLeft,
3936
3871
  y,
@@ -3969,24 +3904,24 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
3969
3904
  return null;
3970
3905
  }
3971
3906
  const isContour = isContourSurfaceChart(chart);
3972
- const ratios = _chunkO3V2MCOCcjs.surfaceDataRatios.call(void 0, rows, cols, _optionalChain([chart, 'access', _464 => _464.valueAxis, 'optionalAccess', _465 => _465.crossBetween]) !== "midCat", _optionalChain([chart, 'access', _466 => _466.view3d, 'optionalAccess', _467 => _467.heightPercent]), _optionalChain([chart, 'access', _468 => _468.view3d, 'optionalAccess', _469 => _469.depthPercent]), layout);
3907
+ const ratios = _chunkO3V2MCOCcjs.surfaceDataRatios.call(void 0, rows, cols, _optionalChain([chart, 'access', _462 => _462.valueAxis, 'optionalAccess', _463 => _463.crossBetween]) !== "midCat", _optionalChain([chart, 'access', _464 => _464.view3d, 'optionalAccess', _465 => _465.heightPercent]), _optionalChain([chart, 'access', _466 => _466.view3d, 'optionalAccess', _467 => _467.depthPercent]), layout);
3973
3908
  const minValue = domain.minValue;
3974
3909
  const safeMax = domain.safeMax;
3975
- const wallFill = _nullishCoalesce(_optionalChain([chart, 'access', _470 => _470.backWall, 'optionalAccess', _471 => _471.fillColor]), () => ( "#d9d9df"));
3976
- const wallLineColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _472 => _472.backWall, 'optionalAccess', _473 => _473.lineColor]), () => ( _optionalChain([chart, 'access', _474 => _474.sideWall, 'optionalAccess', _475 => _475.lineColor]))), () => ( _optionalChain([chart, 'access', _476 => _476.floor, 'optionalAccess', _477 => _477.lineColor]))), () => ( (_nullishCoalesce(chart.axisLineColor, () => ( lightenColor(resolveSurfaceBaseColor(chart, palette), 0.4))))));
3910
+ const wallFill = _nullishCoalesce(_optionalChain([chart, 'access', _468 => _468.backWall, 'optionalAccess', _469 => _469.fillColor]), () => ( "#d9d9df"));
3911
+ const wallLineColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([chart, 'access', _470 => _470.backWall, 'optionalAccess', _471 => _471.lineColor]), () => ( _optionalChain([chart, 'access', _472 => _472.sideWall, 'optionalAccess', _473 => _473.lineColor]))), () => ( _optionalChain([chart, 'access', _474 => _474.floor, 'optionalAccess', _475 => _475.lineColor]))), () => ( (_nullishCoalesce(chart.axisLineColor, () => ( lightenColor(resolveSurfaceBaseColor(chart, palette), 0.4))))));
3977
3912
  if (isContour) {
3978
3913
  const faces2 = [];
3979
3914
  const lines = [];
3980
- const backgroundNormal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, { x: 0, y: 1, z: 0 }, _nullishCoalesce(_optionalChain([chart, 'access', _478 => _478.view3d, 'optionalAccess', _479 => _479.rotX]), () => ( 90)), _nullishCoalesce(_optionalChain([chart, 'access', _480 => _480.view3d, 'optionalAccess', _481 => _481.rotY]), () => ( 0)));
3915
+ const backgroundNormal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, { x: 0, y: 1, z: 0 }, _nullishCoalesce(_optionalChain([chart, 'access', _476 => _476.view3d, 'optionalAccess', _477 => _477.rotX]), () => ( 90)), _nullishCoalesce(_optionalChain([chart, 'access', _478 => _478.view3d, 'optionalAccess', _479 => _479.rotY]), () => ( 0)));
3981
3916
  const backgroundFill = chart.surfaceMaterial === "flat" ? wallFill : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, wallFill, backgroundNormal);
3982
- const inset = _optionalChain([chart, 'access', _482 => _482.valueAxis, 'optionalAccess', _483 => _483.crossBetween]) !== "midCat" ? plot.width / (2 * cols) : 0;
3917
+ const inset = _optionalChain([chart, 'access', _480 => _480.valueAxis, 'optionalAccess', _481 => _481.crossBetween]) !== "midCat" ? plot.width / (2 * cols) : 0;
3983
3918
  const dataWidth = plot.width - 2 * inset;
3984
3919
  for (let rowIndex = 0; rowIndex < rows - 1; rowIndex += 1) {
3985
3920
  for (let columnIndex = 0; columnIndex < cols - 1; columnIndex += 1) {
3986
- const p00 = _optionalChain([matrix, 'access', _484 => _484[rowIndex], 'optionalAccess', _485 => _485[columnIndex]]);
3987
- const p10 = _optionalChain([matrix, 'access', _486 => _486[rowIndex], 'optionalAccess', _487 => _487[columnIndex + 1]]);
3988
- const p01 = _optionalChain([matrix, 'access', _488 => _488[rowIndex + 1], 'optionalAccess', _489 => _489[columnIndex]]);
3989
- const p11 = _optionalChain([matrix, 'access', _490 => _490[rowIndex + 1], 'optionalAccess', _491 => _491[columnIndex + 1]]);
3921
+ const p00 = _optionalChain([matrix, 'access', _482 => _482[rowIndex], 'optionalAccess', _483 => _483[columnIndex]]);
3922
+ const p10 = _optionalChain([matrix, 'access', _484 => _484[rowIndex], 'optionalAccess', _485 => _485[columnIndex + 1]]);
3923
+ const p01 = _optionalChain([matrix, 'access', _486 => _486[rowIndex + 1], 'optionalAccess', _487 => _487[columnIndex]]);
3924
+ const p11 = _optionalChain([matrix, 'access', _488 => _488[rowIndex + 1], 'optionalAccess', _489 => _489[columnIndex + 1]]);
3990
3925
  if (p00 == null || p10 == null || p01 == null || p11 == null) {
3991
3926
  continue;
3992
3927
  }
@@ -4006,7 +3941,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4006
3941
  y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, domain.minValue, domain.safeMax, chart.valueAxis)) * ratios.height,
4007
3942
  z: (point.y - plot.top) / plot.height * ratios.depth
4008
3943
  }));
4009
- const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _492 => _492.view3d, 'optionalAccess', _493 => _493.rotX]), () => ( 90)), _nullishCoalesce(_optionalChain([chart, 'access', _494 => _494.view3d, 'optionalAccess', _495 => _495.rotY]), () => ( 0)));
3944
+ const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _490 => _490.view3d, 'optionalAccess', _491 => _491.rotX]), () => ( 90)), _nullishCoalesce(_optionalChain([chart, 'access', _492 => _492.view3d, 'optionalAccess', _493 => _493.rotY]), () => ( 0)));
4010
3945
  for (let band = 0; band < domain.ticks.length - 1; band += 1) {
4011
3946
  const lower = domain.ticks[band];
4012
3947
  const upper = domain.ticks[band + 1];
@@ -4019,7 +3954,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4019
3954
  if (!chart.wireframe) {
4020
3955
  faces2.push(/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? resolveSurfaceBandColor(chart, palette, domain, midpoint) : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, resolveSurfaceBandColor(chart, palette, domain, midpoint), normal), points: polygon.map((point) => `${point.x},${point.y}`).join(" ") }, `surface-band-${key}`));
4021
3956
  }
4022
- const widths = _optionalChain([chart, 'access', _496 => _496.raw, 'optionalAccess', _497 => _497.bandFormatLineWidths]);
3957
+ const widths = _optionalChain([chart, 'access', _494 => _494.raw, 'optionalAccess', _495 => _495.bandFormatLineWidths]);
4023
3958
  for (const group of _chunkO3V2MCOCcjs.groupSurfaceBandEdges.call(void 0, polygon, triangle, band, lower, chart.wireframe === true)) {
4024
3959
  const edgeMidpoint = (domain.ticks[group.band] + domain.ticks[group.band + 1]) / 2;
4025
3960
  lines.push(
@@ -4029,7 +3964,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4029
3964
  d: group.edges.map(([from, to]) => `M ${from.x} ${from.y} L ${to.x} ${to.y}`).join(" "),
4030
3965
  fill: "none",
4031
3966
  stroke: resolveSurfaceWireframeColor(chart, palette, domain, edgeMidpoint),
4032
- strokeWidth: _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess', _498 => _498[group.band]]), () => ( _optionalChain([chart, 'access', _499 => _499.series, 'access', _500 => _500[0], 'optionalAccess', _501 => _501.lineWidthPx]))), () => ( 1))
3967
+ strokeWidth: _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess', _496 => _496[group.band]]), () => ( _optionalChain([chart, 'access', _497 => _497.series, 'access', _498 => _498[0], 'optionalAccess', _499 => _499.lineWidthPx]))), () => ( 1))
4033
3968
  },
4034
3969
  `surface-edge-${key}-${group.band}`
4035
3970
  )
@@ -4043,12 +3978,12 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4043
3978
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4044
3979
  "rect",
4045
3980
  {
4046
- fill: _optionalChain([chart, 'access', _502 => _502.raw, 'optionalAccess', _503 => _503.plotAreaNoFill]) === true ? "transparent" : typeof _optionalChain([chart, 'access', _504 => _504.raw, 'optionalAccess', _505 => _505.plotAreaFillColor]) === "string" ? chart.raw.plotAreaFillColor : backgroundFill,
3981
+ fill: _optionalChain([chart, 'access', _500 => _500.raw, 'optionalAccess', _501 => _501.plotAreaNoFill]) === true ? "transparent" : typeof _optionalChain([chart, 'access', _502 => _502.raw, 'optionalAccess', _503 => _503.plotAreaFillColor]) === "string" ? chart.raw.plotAreaFillColor : backgroundFill,
4047
3982
  x: layout.plot.left,
4048
3983
  y: layout.plot.top,
4049
3984
  width: layout.plot.width,
4050
3985
  height: layout.plot.height,
4051
- stroke: typeof _optionalChain([chart, 'access', _506 => _506.raw, 'optionalAccess', _507 => _507.plotAreaLineColor]) === "string" ? chart.raw.plotAreaLineColor : wallLineColor
3986
+ stroke: typeof _optionalChain([chart, 'access', _504 => _504.raw, 'optionalAccess', _505 => _505.plotAreaLineColor]) === "string" ? chart.raw.plotAreaLineColor : wallLineColor
4052
3987
  }
4053
3988
  ),
4054
3989
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { fill: "none", height: plot.height, stroke: wallLineColor, width: plot.width, x: plot.left, y: plot.top }),
@@ -4056,11 +3991,11 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4056
3991
  lines
4057
3992
  ] });
4058
3993
  }
4059
- const rotX = (_nullishCoalesce(_optionalChain([chart, 'access', _508 => _508.view3d, 'optionalAccess', _509 => _509.rotX]), () => ( 25))) * (Math.PI / 180);
4060
- const rotY = (_nullishCoalesce(_optionalChain([chart, 'access', _510 => _510.view3d, 'optionalAccess', _511 => _511.rotY]), () => ( 30))) * (Math.PI / 180);
4061
- const usePerspective = _optionalChain([chart, 'access', _512 => _512.view3d, 'optionalAccess', _513 => _513.rAngAx]) === false;
3994
+ const rotX = (_nullishCoalesce(_optionalChain([chart, 'access', _506 => _506.view3d, 'optionalAccess', _507 => _507.rotX]), () => ( 25))) * (Math.PI / 180);
3995
+ const rotY = (_nullishCoalesce(_optionalChain([chart, 'access', _508 => _508.view3d, 'optionalAccess', _509 => _509.rotY]), () => ( 30))) * (Math.PI / 180);
3996
+ const usePerspective = _optionalChain([chart, 'access', _510 => _510.view3d, 'optionalAccess', _511 => _511.rAngAx]) === false;
4062
3997
  const perspectiveStrength = clamp(
4063
- (_nullishCoalesce(_optionalChain([chart, 'access', _514 => _514.view3d, 'optionalAccess', _515 => _515.perspective]), () => ( (usePerspective ? 30 : 0)))) / 100,
3998
+ (_nullishCoalesce(_optionalChain([chart, 'access', _512 => _512.view3d, 'optionalAccess', _513 => _513.perspective]), () => ( (usePerspective ? 30 : 0)))) / 100,
4064
3999
  0,
4065
4000
  1
4066
4001
  );
@@ -4075,7 +4010,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4075
4010
  const normalizedX = cols <= 1 ? 0 : (columnIndex / (cols - 1) - 0.5) * 2;
4076
4011
  const normalizedY = hasValue ? -(_chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, value, minValue, safeMax, chart.valueAxis) - 0.5) * heightExtent : heightExtent / 2;
4077
4012
  const normalizedZ = rows <= 1 ? 0 : (rowIndex / (rows - 1) - 0.5) * 2 * depthScale;
4078
- if (_optionalChain([chart, 'access', _516 => _516.view3d, 'optionalAccess', _517 => _517.rAngAx]) !== false) {
4013
+ if (_optionalChain([chart, 'access', _514 => _514.view3d, 'optionalAccess', _515 => _515.rAngAx]) !== false) {
4079
4014
  return {
4080
4015
  depth: normalizedZ,
4081
4016
  hasValue,
@@ -4113,7 +4048,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4113
4048
  return { ...projected, x: centerX + (projected.x - centerRawX) * scale, y: centerY + (projected.y - centerRawY) * scale };
4114
4049
  };
4115
4050
  const wallNodes = [];
4116
- const backRow = _optionalChain([chart, 'access', _518 => _518.view3d, 'optionalAccess', _519 => _519.rAngAx]) !== false || cosX * cosY >= 0 ? rows - 1 : 0;
4051
+ const backRow = _optionalChain([chart, 'access', _516 => _516.view3d, 'optionalAccess', _517 => _517.rAngAx]) !== false || cosX * cosY >= 0 ? rows - 1 : 0;
4117
4052
  const sideColumn = sinY >= 0 ? 0 : cols - 1;
4118
4053
  const wallPoint = (x, y, value) => ({ x, y, value });
4119
4054
  const addWall = (key, points, color, hidden) => {
@@ -4123,18 +4058,18 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4123
4058
  y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, minValue, safeMax, chart.valueAxis)) * ratios.height,
4124
4059
  z: (1 - point.y / Math.max(1, rows - 1)) * depthScale
4125
4060
  }));
4126
- const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _520 => _520.view3d, 'optionalAccess', _521 => _521.rotX]), () => ( 25)), _nullishCoalesce(_optionalChain([chart, 'access', _522 => _522.view3d, 'optionalAccess', _523 => _523.rotY]), () => ( 30)), _optionalChain([chart, 'access', _524 => _524.view3d, 'optionalAccess', _525 => _525.rAngAx]) !== false);
4061
+ const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _518 => _518.view3d, 'optionalAccess', _519 => _519.rotX]), () => ( 25)), _nullishCoalesce(_optionalChain([chart, 'access', _520 => _520.view3d, 'optionalAccess', _521 => _521.rotY]), () => ( 30)), _optionalChain([chart, 'access', _522 => _522.view3d, 'optionalAccess', _523 => _523.rAngAx]) !== false);
4127
4062
  const baseColor = _nullishCoalesce(color, () => ( wallFill));
4128
4063
  wallNodes.push(/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? baseColor : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, baseColor, normal), points: points.map(projectPoint).map((point) => `${point.x},${point.y}`).join(" ") }, key));
4129
4064
  };
4130
- addWall("floor", [wallPoint(0, 0, minValue), wallPoint(cols - 1, 0, minValue), wallPoint(cols - 1, rows - 1, minValue), wallPoint(0, rows - 1, minValue)], _optionalChain([chart, 'access', _526 => _526.floor, 'optionalAccess', _527 => _527.fillColor]), _optionalChain([chart, 'access', _528 => _528.floor, 'optionalAccess', _529 => _529.hidden]));
4131
- addWall("back", [wallPoint(0, backRow, safeMax), wallPoint(cols - 1, backRow, safeMax), wallPoint(cols - 1, backRow, minValue), wallPoint(0, backRow, minValue)], _optionalChain([chart, 'access', _530 => _530.backWall, 'optionalAccess', _531 => _531.fillColor]), _optionalChain([chart, 'access', _532 => _532.backWall, 'optionalAccess', _533 => _533.hidden]));
4132
- addWall("side", [wallPoint(sideColumn, 0, safeMax), wallPoint(sideColumn, rows - 1, safeMax), wallPoint(sideColumn, rows - 1, minValue), wallPoint(sideColumn, 0, minValue)], _optionalChain([chart, 'access', _534 => _534.sideWall, 'optionalAccess', _535 => _535.fillColor]), _optionalChain([chart, 'access', _536 => _536.sideWall, 'optionalAccess', _537 => _537.hidden]));
4133
- if (_optionalChain([chart, 'access', _538 => _538.valueAxis, 'optionalAccess', _539 => _539.majorGridlines])) {
4065
+ addWall("floor", [wallPoint(0, 0, minValue), wallPoint(cols - 1, 0, minValue), wallPoint(cols - 1, rows - 1, minValue), wallPoint(0, rows - 1, minValue)], _optionalChain([chart, 'access', _524 => _524.floor, 'optionalAccess', _525 => _525.fillColor]), _optionalChain([chart, 'access', _526 => _526.floor, 'optionalAccess', _527 => _527.hidden]));
4066
+ addWall("back", [wallPoint(0, backRow, safeMax), wallPoint(cols - 1, backRow, safeMax), wallPoint(cols - 1, backRow, minValue), wallPoint(0, backRow, minValue)], _optionalChain([chart, 'access', _528 => _528.backWall, 'optionalAccess', _529 => _529.fillColor]), _optionalChain([chart, 'access', _530 => _530.backWall, 'optionalAccess', _531 => _531.hidden]));
4067
+ addWall("side", [wallPoint(sideColumn, 0, safeMax), wallPoint(sideColumn, rows - 1, safeMax), wallPoint(sideColumn, rows - 1, minValue), wallPoint(sideColumn, 0, minValue)], _optionalChain([chart, 'access', _532 => _532.sideWall, 'optionalAccess', _533 => _533.fillColor]), _optionalChain([chart, 'access', _534 => _534.sideWall, 'optionalAccess', _535 => _535.hidden]));
4068
+ if (_optionalChain([chart, 'access', _536 => _536.valueAxis, 'optionalAccess', _537 => _537.majorGridlines])) {
4134
4069
  for (const tick of domain.ticks) {
4135
4070
  const edges = [
4136
- ..._optionalChain([chart, 'access', _540 => _540.backWall, 'optionalAccess', _541 => _541.hidden]) ? [] : [[wallPoint(0, backRow, tick), wallPoint(cols - 1, backRow, tick)]],
4137
- ..._optionalChain([chart, 'access', _542 => _542.sideWall, 'optionalAccess', _543 => _543.hidden]) ? [] : [[wallPoint(sideColumn, 0, tick), wallPoint(sideColumn, rows - 1, tick)]]
4071
+ ..._optionalChain([chart, 'access', _538 => _538.backWall, 'optionalAccess', _539 => _539.hidden]) ? [] : [[wallPoint(0, backRow, tick), wallPoint(cols - 1, backRow, tick)]],
4072
+ ..._optionalChain([chart, 'access', _540 => _540.sideWall, 'optionalAccess', _541 => _541.hidden]) ? [] : [[wallPoint(sideColumn, 0, tick), wallPoint(sideColumn, rows - 1, tick)]]
4138
4073
  ];
4139
4074
  wallNodes.push(/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { fill: "none", stroke: _nullishCoalesce(chart.valueAxis.majorGridlineColor, () => ( wallLineColor)), strokeWidth: 1, d: edges.map((edge) => {
4140
4075
  const [from, to] = edge.map(projectPoint);
@@ -4159,7 +4094,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4159
4094
  y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, minValue, safeMax, chart.valueAxis)) * ratios.height,
4160
4095
  z: (1 - point.y / Math.max(1, rows - 1)) * depthScale
4161
4096
  }));
4162
- const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _544 => _544.view3d, 'optionalAccess', _545 => _545.rotX]), () => ( 25)), _nullishCoalesce(_optionalChain([chart, 'access', _546 => _546.view3d, 'optionalAccess', _547 => _547.rotY]), () => ( 30)), _optionalChain([chart, 'access', _548 => _548.view3d, 'optionalAccess', _549 => _549.rAngAx]) !== false);
4097
+ const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _542 => _542.view3d, 'optionalAccess', _543 => _543.rotX]), () => ( 25)), _nullishCoalesce(_optionalChain([chart, 'access', _544 => _544.view3d, 'optionalAccess', _545 => _545.rotY]), () => ( 30)), _optionalChain([chart, 'access', _546 => _546.view3d, 'optionalAccess', _547 => _547.rAngAx]) !== false);
4163
4098
  for (let band = 0; band < domain.ticks.length - 1; band += 1) {
4164
4099
  const lower = domain.ticks[band];
4165
4100
  const upper = domain.ticks[band + 1];
@@ -4167,7 +4102,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4167
4102
  if (polygon.length < 3) continue;
4168
4103
  const projected = polygon.map(projectPoint);
4169
4104
  const midpoint = (lower + upper) / 2;
4170
- const widths = _optionalChain([chart, 'access', _550 => _550.raw, 'optionalAccess', _551 => _551.bandFormatLineWidths]);
4105
+ const widths = _optionalChain([chart, 'access', _548 => _548.raw, 'optionalAccess', _549 => _549.bandFormatLineWidths]);
4171
4106
  const edgeGroups = _chunkO3V2MCOCcjs.groupSurfaceBandEdges.call(void 0, polygon, triangle, band, lower, chart.wireframe === true);
4172
4107
  faces.push({
4173
4108
  depth: projected.reduce((sum, point) => sum + point.depth, 0) / projected.length,
@@ -4176,7 +4111,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4176
4111
  edgeGroups.map((group) => {
4177
4112
  const edgeMidpoint = (domain.ticks[group.band] + domain.ticks[group.band + 1]) / 2;
4178
4113
  const edges = group.edges.map(([from, to]) => [projectPoint(from), projectPoint(to)]);
4179
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { fill: "none", stroke: resolveSurfaceWireframeColor(chart, palette, domain, edgeMidpoint), strokeWidth: _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess', _552 => _552[group.band]]), () => ( _optionalChain([chart, 'access', _553 => _553.series, 'access', _554 => _554[0], 'optionalAccess', _555 => _555.lineWidthPx]))), () => ( 1)), d: edges.map(([from, to]) => `M ${from.x} ${from.y} L ${to.x} ${to.y}`).join(" ") }, `surface-edge-${group.band}`);
4114
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { fill: "none", stroke: resolveSurfaceWireframeColor(chart, palette, domain, edgeMidpoint), strokeWidth: _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess', _550 => _550[group.band]]), () => ( _optionalChain([chart, 'access', _551 => _551.series, 'access', _552 => _552[0], 'optionalAccess', _553 => _553.lineWidthPx]))), () => ( 1)), d: edges.map(([from, to]) => `M ${from.x} ${from.y} L ${to.x} ${to.y}`).join(" ") }, `surface-edge-${group.band}`);
4180
4115
  })
4181
4116
  ] }, `surface-band-${rowIndex}-${columnIndex}-${triangleIndex}-${band}`)
4182
4117
  });
@@ -4220,7 +4155,7 @@ function renderSurfaceHitOverlay(chart, layout, selectedChartElement) {
4220
4155
  y: top
4221
4156
  }
4222
4157
  ),
4223
- selected ? renderSelectionRectHandles(
4158
+ selected ? _chunkIDNIGBUMcjs.renderSelectionRectHandles.call(void 0,
4224
4159
  `surface-selection-${seriesIndex}-${pointIndex}`,
4225
4160
  left,
4226
4161
  top,
@@ -4258,7 +4193,7 @@ function renderWaterfallChart(chart, palette, layout, selectedChartElement) {
4258
4193
  maxValue = minValue + 1;
4259
4194
  }
4260
4195
  const yScale = _d3scale.scaleLinear.call(void 0, ).domain([minValue, maxValue]).range([plot.top + plot.height, plot.top]);
4261
- const ticks = buildNumericTickValues(minValue, maxValue, _optionalChain([chart, 'access', _556 => _556.valueAxis, 'optionalAccess', _557 => _557.majorUnit]));
4196
+ const ticks = buildNumericTickValues(minValue, maxValue, _optionalChain([chart, 'access', _554 => _554.valueAxis, 'optionalAccess', _555 => _555.majorUnit]));
4262
4197
  const axisColor = _nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( chart.chartAreaBorderColor)), () => ( palette.border));
4263
4198
  const labelColor = resolveChartAxisTextColor(chart);
4264
4199
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
@@ -4317,7 +4252,7 @@ function renderWaterfallChart(chart, palette, layout, selectedChartElement) {
4317
4252
  height
4318
4253
  }
4319
4254
  ),
4320
- selected ? renderSelectionRectHandles(`waterfall-selection-${index}`, bandLeft, top, bandWidth, height) : null,
4255
+ selected ? _chunkIDNIGBUMcjs.renderSelectionRectHandles.call(void 0, `waterfall-selection-${index}`, bandLeft, top, bandWidth, height) : null,
4321
4256
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4322
4257
  "text",
4323
4258
  {
@@ -4378,7 +4313,7 @@ function renderFunnelChart(chart, palette, layout, selectedChartElement) {
4378
4313
  y: topY
4379
4314
  }
4380
4315
  ),
4381
- selected ? renderSelectionRectHandles(`funnel-selection-${index}`, left, topY, stageWidth, stageHeight) : null,
4316
+ selected ? _chunkIDNIGBUMcjs.renderSelectionRectHandles.call(void 0, `funnel-selection-${index}`, left, topY, stageWidth, stageHeight) : null,
4382
4317
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4383
4318
  "text",
4384
4319
  {
@@ -4432,7 +4367,7 @@ function renderSunburstChart(chart, palette, layout, selectedChartElement) {
4432
4367
  strokeWidth: selected ? 2 : 1
4433
4368
  }
4434
4369
  ),
4435
- selected ? renderSelectionPointHandles(`sunburst-selection-${index}`, [{ x: labelX, y: labelY }]) : null,
4370
+ selected ? _chunkIDNIGBUMcjs.renderSelectionPointHandles.call(void 0, `sunburst-selection-${index}`, [{ x: labelX, y: labelY }]) : null,
4436
4371
  canShowLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4437
4372
  "text",
4438
4373
  {
@@ -4477,7 +4412,7 @@ function renderTreemapChart(chart, palette, layout, selectedChartElement) {
4477
4412
  height
4478
4413
  }
4479
4414
  ),
4480
- selected ? renderSelectionRectHandles(`treemap-selection-${index}`, leaf.x0, leaf.y0, width, height) : null,
4415
+ selected ? _chunkIDNIGBUMcjs.renderSelectionRectHandles.call(void 0, `treemap-selection-${index}`, leaf.x0, leaf.y0, width, height) : null,
4481
4416
  canShowLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
4482
4417
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4483
4418
  "text",
@@ -4664,7 +4599,7 @@ function renderBoxWhiskerChart(chart, palette, layout, selectedChartElement) {
4664
4599
  x: x - boxWidth * 0.5,
4665
4600
  y: boxTop
4666
4601
  }
4667
- ), selected ? renderSelectionRectHandles(
4602
+ ), selected ? _chunkIDNIGBUMcjs.renderSelectionRectHandles.call(void 0,
4668
4603
  `box-whisker-selection-${index}`,
4669
4604
  x - boxWidth * 0.5,
4670
4605
  boxTop,
@@ -4756,10 +4691,10 @@ function renderRegionMapChart(chart, palette, layout, selectedChartElement, { ge
4756
4691
  }
4757
4692
  const labels = getCategoryLabels(chart);
4758
4693
  const layoutProperties = resolveRegionMapLayoutProperties(primarySeries);
4759
- const geography = _optionalChain([layoutProperties, 'optionalAccess', _558 => _558.geography]) && typeof layoutProperties.geography === "object" ? layoutProperties.geography : null;
4694
+ const geography = _optionalChain([layoutProperties, 'optionalAccess', _556 => _556.geography]) && typeof layoutProperties.geography === "object" ? layoutProperties.geography : null;
4760
4695
  const featureSet = resolveRegionMapFeatureSet(labels, geography);
4761
- const viewedRegionType = typeof _optionalChain([geography, 'optionalAccess', _559 => _559.viewedRegionType]) === "string" ? geography.viewedRegionType : null;
4762
- const projectionType = typeof _optionalChain([geography, 'optionalAccess', _560 => _560.projectionType]) === "string" ? geography.projectionType : null;
4696
+ const viewedRegionType = typeof _optionalChain([geography, 'optionalAccess', _557 => _557.viewedRegionType]) === "string" ? geography.viewedRegionType : null;
4697
+ const projectionType = typeof _optionalChain([geography, 'optionalAccess', _558 => _558.projectionType]) === "string" ? geography.projectionType : null;
4763
4698
  const projection = featureSet === "us-state" ? geoIdentity() : projectionType === "miller" ? geoMercator() : geoNaturalEarth1();
4764
4699
  const availableFeatures = getRegionMapBaseFeatures(featureSet);
4765
4700
  const categoricalValues = resolveRegionMapColorStrings(primarySeries);
@@ -4772,7 +4707,7 @@ function renderRegionMapChart(chart, palette, layout, selectedChartElement, { ge
4772
4707
  const entries = labels.map((label, index) => {
4773
4708
  const feature = resolveRegionMapFeature(label, featureSet);
4774
4709
  const value = safeNumber(primarySeries.values[index]);
4775
- const colorLabel = _optionalChain([categoricalValues, 'optionalAccess', _561 => _561[index]]) || null;
4710
+ const colorLabel = _optionalChain([categoricalValues, 'optionalAccess', _559 => _559[index]]) || null;
4776
4711
  return {
4777
4712
  colorLabel,
4778
4713
  feature,
@@ -4800,7 +4735,7 @@ function renderRegionMapChart(chart, palette, layout, selectedChartElement, { ge
4800
4735
  const numericEntryValues = primarySeries.values.map(safeNumber).filter((value) => typeof value === "number" && Number.isFinite(value));
4801
4736
  const minValue = numericEntryValues.length > 0 ? Math.min(...numericEntryValues) : 0;
4802
4737
  const maxValue = numericEntryValues.length > 0 ? Math.max(...numericEntryValues) : 1;
4803
- const showRegionLabels = _optionalChain([layoutProperties, 'optionalAccess', _562 => _562.regionLabelLayout]) !== "none";
4738
+ const showRegionLabels = _optionalChain([layoutProperties, 'optionalAccess', _560 => _560.regionLabelLayout]) !== "none";
4804
4739
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
4805
4740
  baseFeatures.map((feature, index) => {
4806
4741
  const d = path(feature);
@@ -4827,7 +4762,7 @@ function renderRegionMapChart(chart, palette, layout, selectedChartElement, { ge
4827
4762
  const fill = entry.value != null ? (() => {
4828
4763
  const ratio = maxValue <= minValue ? 1 : (entry.value - minValue) / Math.max(1e-6, maxValue - minValue);
4829
4764
  return resolveRegionMapValueColor(chart, primarySeriesIndex, ratio);
4830
- })() : _nullishCoalesce(_optionalChain([categoricalColorByLabel, 'optionalAccess', _563 => _563.get, 'call', _564 => _564(_nullishCoalesce(entry.colorLabel, () => ( "")))]), () => ( resolveRegionMapDataColor(chart, primarySeriesIndex)));
4765
+ })() : _nullishCoalesce(_optionalChain([categoricalColorByLabel, 'optionalAccess', _561 => _561.get, 'call', _562 => _562(_nullishCoalesce(entry.colorLabel, () => ( "")))]), () => ( resolveRegionMapDataColor(chart, primarySeriesIndex)));
4831
4766
  const selected = isSelectedChartPointOrSeries(selectedChartElement, chart.id, primarySeriesIndex, index);
4832
4767
  const centroid = path.centroid(entry.feature);
4833
4768
  const canShowSelectionDot = Number.isFinite(centroid[0]) && Number.isFinite(centroid[1]);
@@ -4843,7 +4778,7 @@ function renderRegionMapChart(chart, palette, layout, selectedChartElement, { ge
4843
4778
  strokeWidth: selected ? 1.8 : 0.85
4844
4779
  }
4845
4780
  ),
4846
- selected && canShowSelectionDot ? renderSelectionPointHandles(`region-map-selection-${index}`, [{ x: centroid[0], y: centroid[1] }]) : null
4781
+ selected && canShowSelectionDot ? _chunkIDNIGBUMcjs.renderSelectionPointHandles.call(void 0, `region-map-selection-${index}`, [{ x: centroid[0], y: centroid[1] }]) : null
4847
4782
  ] }, `region-map-value-${entry.key || index}`);
4848
4783
  }),
4849
4784
  showRegionLabels ? entries.map((entry, index) => {
@@ -4970,33 +4905,19 @@ var MemoChartSvg = React.memo(function MemoChartSvg2({
4970
4905
  const legendItems = getLegendItems(chart, renderChartType, palette);
4971
4906
  const layout = buildLayout(chart, rect, legendItems);
4972
4907
  const chartRaw = chart.raw && typeof chart.raw === "object" ? chart.raw : null;
4973
- const explicitNoFill = _optionalChain([chartRaw, 'optionalAccess', _565 => _565.chartAreaNoFill]) === true || _optionalChain([chartRaw, 'optionalAccess', _566 => _566.plotAreaNoFill]) === true;
4908
+ const explicitNoFill = _optionalChain([chartRaw, 'optionalAccess', _563 => _563.chartAreaNoFill]) === true || _optionalChain([chartRaw, 'optionalAccess', _564 => _564.plotAreaNoFill]) === true;
4974
4909
  const background = _nullishCoalesce(chart.chartAreaFillColor, () => ( (explicitNoFill ? "transparent" : "#ffffff")));
4975
4910
  const borderColor = _nullishCoalesce(chart.chartAreaBorderColor, () => ( "transparent"));
4976
4911
  const normalizedBackground = background.trim().toLowerCase();
4977
4912
  const normalizedBorderColor = borderColor.trim().toLowerCase();
4978
4913
  const hideBackgroundRect = normalizedBackground === "transparent" && normalizedBorderColor === "transparent";
4979
4914
  const fontFamily = buildChartFontFamily(chart.fontFamily);
4980
- const handlePointerDown = React.useCallback((event) => {
4981
- const selection = resolveChartSelectionFromTarget(chart, event.target, selectedChartElement);
4982
- if (!selection) {
4983
- return;
4984
- }
4985
- if (resolveChartElementTarget(event.target)) {
4986
- event.stopPropagation();
4987
- }
4988
- _optionalChain([onChartElementPointerDown, 'optionalCall', _567 => _567(selection, event)]);
4989
- }, [chart, onChartElementPointerDown, selectedChartElement]);
4990
- const handleDoubleClick = React.useCallback((event) => {
4991
- const selection = resolveChartSelectionFromTarget(chart, event.target, selectedChartElement);
4992
- if (!selection) {
4993
- return;
4994
- }
4995
- if (resolveChartElementTarget(event.target)) {
4996
- event.stopPropagation();
4997
- }
4998
- _optionalChain([onChartElementDoubleClick, 'optionalCall', _568 => _568(selection, event)]);
4999
- }, [chart, onChartElementDoubleClick, selectedChartElement]);
4915
+ const { handlePointerDown, handleDoubleClick } = _chunkIDNIGBUMcjs.useChartEvents.call(void 0, {
4916
+ chart,
4917
+ onChartElementPointerDown,
4918
+ onChartElementDoubleClick,
4919
+ selectedChartElement
4920
+ });
5000
4921
  const renderSvgChart = (plot) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
5001
4922
  "svg",
5002
4923
  {
@@ -5043,4 +4964,4 @@ var MemoChartSvg = React.memo(function MemoChartSvg2({
5043
4964
 
5044
4965
 
5045
4966
  exports.MemoChartSvg = MemoChartSvg;
5046
- //# sourceMappingURL=chart-renderer-K6GORT3R.cjs.map
4967
+ //# sourceMappingURL=chart-renderer-2EKXNHUD.cjs.map