@pixerate/editor 0.165.0 → 0.167.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/THIRD_PARTY_NOTICES.md +11 -0
  2. package/dist/agent/index.cjs +34 -34
  3. package/dist/agent/index.js +5 -5
  4. package/dist/canvas/index.cjs +6 -6
  5. package/dist/canvas/index.js +2 -2
  6. package/dist/chart/controller.d.cts +29 -0
  7. package/dist/chart/controller.d.ts +29 -0
  8. package/dist/chart/index.cjs +352 -179
  9. package/dist/chart/index.d.cts +2 -0
  10. package/dist/chart/index.d.ts +2 -0
  11. package/dist/chart/index.js +183 -10
  12. package/dist/chart/layout-families.d.cts +15 -0
  13. package/dist/chart/layout-families.d.ts +15 -0
  14. package/dist/chart/layout-shared.d.cts +5 -0
  15. package/dist/chart/layout-shared.d.ts +5 -0
  16. package/dist/chart/maps.d.cts +43 -0
  17. package/dist/chart/maps.d.ts +43 -0
  18. package/dist/chart/race.d.cts +26 -0
  19. package/dist/chart/race.d.ts +26 -0
  20. package/dist/chart/schemas.d.cts +2 -0
  21. package/dist/chart/schemas.d.ts +2 -0
  22. package/dist/chart/spec.d.cts +1 -1
  23. package/dist/chart/spec.d.ts +1 -1
  24. package/dist/chart/types.d.cts +14 -2
  25. package/dist/chart/types.d.ts +14 -2
  26. package/dist/chart-maps/europe.d.cts +7 -0
  27. package/dist/chart-maps/europe.d.ts +7 -0
  28. package/dist/chart-maps/index.cjs +66 -0
  29. package/dist/chart-maps/index.d.cts +1 -0
  30. package/dist/chart-maps/index.d.ts +1 -0
  31. package/dist/chart-maps/index.js +66 -0
  32. package/dist/{chunk-IMRXC7OA.cjs → chunk-2F4GAZL5.cjs} +186 -96
  33. package/dist/{chunk-FEU2XVQH.js → chunk-34UCPHYO.js} +8 -2
  34. package/dist/{chunk-ODFCS7HF.cjs → chunk-E45AIIWY.cjs} +8 -8
  35. package/dist/{chunk-N7NBGT2Y.js → chunk-FKYGM35R.js} +2 -2
  36. package/dist/{chunk-64VWWR5U.cjs → chunk-GD34ICEX.cjs} +16 -16
  37. package/dist/{chunk-TVQW26AV.cjs → chunk-GTF4RYXJ.cjs} +29 -23
  38. package/dist/{chunk-V5GSY3NC.js → chunk-M52UCHVZ.js} +203 -3
  39. package/dist/{chunk-FRBRLKNQ.js → chunk-N3ACT6VJ.js} +92 -2
  40. package/dist/{chunk-CRFSQWKQ.js → chunk-OLCHKGGO.js} +7 -1
  41. package/dist/{chunk-2ZRN43IN.js → chunk-ORZF4JOO.js} +32 -4
  42. package/dist/{chunk-UVXTOZ2B.cjs → chunk-OUO3DSRT.cjs} +32 -4
  43. package/dist/{chunk-MKXK6E4O.cjs → chunk-SBAPXFPB.cjs} +51 -51
  44. package/dist/{chunk-2J5VLJHC.js → chunk-T62BRXMS.js} +3 -3
  45. package/dist/{chunk-Q25WAFTD.cjs → chunk-VKHJJUBK.cjs} +24 -18
  46. package/dist/{chunk-QO2T6KA5.cjs → chunk-WOIXNDHV.cjs} +247 -47
  47. package/dist/{chunk-X5W645RI.js → chunk-ZUPP4NKM.js} +3 -3
  48. package/dist/export/index.cjs +4 -4
  49. package/dist/export/index.js +3 -3
  50. package/dist/extensions/index.cjs +7 -7
  51. package/dist/extensions/index.js +6 -6
  52. package/dist/index.cjs +13 -13
  53. package/dist/index.js +7 -7
  54. package/package.json +11 -1
  55. package/skills/pixerate-chart/SKILL.md +36 -2
@@ -16,16 +16,16 @@
16
16
 
17
17
 
18
18
 
19
- var _chunkTVQW26AVcjs = require('../chunk-TVQW26AV.cjs');
20
19
 
20
+ var _chunkGTF4RYXJcjs = require('../chunk-GTF4RYXJ.cjs');
21
21
 
22
22
 
23
23
 
24
24
 
25
25
 
26
26
 
27
- var _chunkQ25WAFTDcjs = require('../chunk-Q25WAFTD.cjs');
28
27
 
28
+ var _chunkVKHJJUBKcjs = require('../chunk-VKHJJUBK.cjs');
29
29
 
30
30
 
31
31
 
@@ -46,7 +46,8 @@ var _chunkQ25WAFTDcjs = require('../chunk-Q25WAFTD.cjs');
46
46
 
47
47
 
48
48
 
49
- var _chunkIMRXC7OAcjs = require('../chunk-IMRXC7OA.cjs');
49
+
50
+ var _chunk2F4GAZL5cjs = require('../chunk-2F4GAZL5.cjs');
50
51
  require('../chunk-TTCJPX4U.cjs');
51
52
 
52
53
 
@@ -87,7 +88,6 @@ require('../chunk-TTCJPX4U.cjs');
87
88
 
88
89
 
89
90
 
90
- var _chunkQO2T6KA5cjs = require('../chunk-QO2T6KA5.cjs');
91
91
 
92
92
 
93
93
 
@@ -98,6 +98,14 @@ var _chunkQO2T6KA5cjs = require('../chunk-QO2T6KA5.cjs');
98
98
 
99
99
 
100
100
 
101
+ var _chunkWOIXNDHVcjs = require('../chunk-WOIXNDHV.cjs');
102
+
103
+
104
+
105
+
106
+
107
+
108
+
101
109
 
102
110
 
103
111
 
@@ -181,7 +189,10 @@ var _chunkQO2T6KA5cjs = require('../chunk-QO2T6KA5.cjs');
181
189
 
182
190
 
183
191
 
184
- var _chunkUVXTOZ2Bcjs = require('../chunk-UVXTOZ2B.cjs');
192
+
193
+
194
+
195
+ var _chunkOUO3DSRTcjs = require('../chunk-OUO3DSRT.cjs');
185
196
  require('../chunk-VU6WQSMB.cjs');
186
197
  require('../chunk-55AKPTLM.cjs');
187
198
 
@@ -316,7 +327,7 @@ function chartFileName(spec, extension) {
316
327
  }
317
328
  async function downloadChartPng(spec, options = {}) {
318
329
  const { width = 800, height = 450, filename = chartFileName(spec, "png"), theme, ...raster } = options;
319
- const svg = _chunkIMRXC7OAcjs.chartToSvg.call(void 0, spec, { width, height, theme });
330
+ const svg = _chunk2F4GAZL5cjs.chartToSvg.call(void 0, spec, { width, height, theme });
320
331
  const { url, width: w, height: h } = await svgToPngDataUrl(svg, { ...raster, width, height });
321
332
  const doc = _nullishCoalesce(raster.document, () => ( globalThis.document));
322
333
  const link = doc.createElement("a");
@@ -331,7 +342,7 @@ async function downloadChartPng(spec, options = {}) {
331
342
 
332
343
  // src/chart/recommend.ts
333
344
  var blank = (c) => c === null || c === void 0 || String(c).trim() === "";
334
- var isText = (c) => blank(c) || _chunkUVXTOZ2Bcjs.parseChartValue.call(void 0, c) === void 0;
345
+ var isText = (c) => blank(c) || _chunkOUO3DSRTcjs.parseChartValue.call(void 0, c) === void 0;
335
346
  function analyzeChartTable(rows) {
336
347
  const grid = rows.filter((r) => r.some((c) => !blank(c)));
337
348
  const height = grid.length;
@@ -349,7 +360,7 @@ function analyzeChartTable(rows) {
349
360
  let anyPositive = false;
350
361
  for (let r = headerRow ? 1 : 0; r < height; r++)
351
362
  for (let c = labelColumn ? 1 : 0; c < width; c++) {
352
- const v = _chunkUVXTOZ2Bcjs.parseChartValue.call(void 0, cell(r, c));
363
+ const v = _chunkOUO3DSRTcjs.parseChartValue.call(void 0, cell(r, c));
353
364
  if (typeof v !== "number") continue;
354
365
  anyNumber = true;
355
366
  if (v < 0) {
@@ -358,7 +369,7 @@ function analyzeChartTable(rows) {
358
369
  } else if (v > 0) anyPositive = true;
359
370
  }
360
371
  const labels = byRows ? _nullishCoalesce(_optionalChain([grid, 'access', _20 => _20[0], 'optionalAccess', _21 => _21.slice, 'call', _22 => _22(labelColumn ? 1 : 0)]), () => ( [])) : grid.slice(headerRow ? 1 : 0).map((r) => r[0]);
361
- const dates = (byRows ? headerRow : labelColumn) && labels.length > 1 && labels.filter((l) => !blank(l) && _chunkQO2T6KA5cjs.parseChartDate.call(void 0, String(l)) !== null).length >= labels.length * 0.8;
372
+ const dates = (byRows ? headerRow : labelColumn) && labels.length > 1 && labels.filter((l) => !blank(l) && _chunkWOIXNDHVcjs.parseChartDate.call(void 0, String(l)) !== null).length >= labels.length * 0.8;
362
373
  return {
363
374
  headerRow,
364
375
  labelColumn,
@@ -396,6 +407,7 @@ function recommendForShape(shape) {
396
407
  add("area", "Area", "Shows change over time with volume.");
397
408
  add("bar", "Column", "Compares each period.");
398
409
  if (shape.series > 1) add("area", "Stacked area", "Shows how the parts add up over time.", "stacked");
410
+ if (shape.series >= 5 && shape.points >= 3) add("barrace", "Bar race", "Many series over time: an animated ranking shows who leads when.");
399
411
  return out;
400
412
  }
401
413
  if (shape.series === 1) {
@@ -430,6 +442,7 @@ function recommendForShape(shape) {
430
442
  add("bar", "Stacked column", "Shows how the series add up.", "stacked");
431
443
  add("line", "Line", "Shows the series in order.");
432
444
  if (shape.points >= 3 && shape.series <= 6) add("radar", "Radar", "Compares several measures across the series.");
445
+ if (shape.nonNegative && shape.series >= 5 && shape.points >= 3) add("barrace", "Bar race", "Many series across ordered categories (such as years): an animated ranking shows who leads when.");
433
446
  if (shape.nonNegative && shape.series >= 3 && shape.series <= 7) add("likert", "Likert", "Survey answers per question (columns from most negative to most positive): shows agreement against disagreement.");
434
447
  }
435
448
  return out;
@@ -448,7 +461,7 @@ function chartFromTable(rows, options = {}) {
448
461
  if (xFromFirst) {
449
462
  table = table.map((r) => [r[1], ...r.slice(2)]);
450
463
  }
451
- const data = _chunkUVXTOZ2Bcjs.chartDataFromTable.call(void 0, table, { seriesIn: shape.byRows ? "rows" : "columns", header: true, xFromFirstColumn: xFromFirst });
464
+ const data = _chunkOUO3DSRTcjs.chartDataFromTable.call(void 0, table, { seriesIn: shape.byRows ? "rows" : "columns", header: true, xFromFirstColumn: xFromFirst });
452
465
  return { type, stacking, categories: data.categories, series: data.series, issues: data.issues, shape };
453
466
  }
454
467
 
@@ -475,6 +488,12 @@ function createChartCommands(controller, options = {}) {
475
488
  if (index < 0 || index >= categories.length || !Number.isInteger(index)) fail(`There is no category ${JSON.stringify(ref)}; expected an index from 0 to ${categories.length - 1} or one of the labels.`);
476
489
  return index;
477
490
  };
491
+ const raceFrame = (time) => {
492
+ const cats = controller.getSpec().categories;
493
+ const frame = typeof time === "number" ? time : cats.indexOf(time);
494
+ if (!(Number.isFinite(frame) && frame >= 0 && frame <= cats.length - 1)) fail(`There is no time point ${JSON.stringify(time)}; expected an index from 0 to ${Math.max(0, cats.length - 1)} or a category label.`);
495
+ return frame;
496
+ };
478
497
  const object = (properties, required) => ({ type: "object", properties, ...required ? { required } : {}, additionalProperties: false });
479
498
  return [
480
499
  {
@@ -484,10 +503,10 @@ function createChartCommands(controller, options = {}) {
484
503
  readOnly: true,
485
504
  keywords: ["chart", "data", "spec", "get", "summary"],
486
505
  description: "Returns the chart spec, its data as a table (series names in the header row) and a summary: per-series min / max / mean / trend, axes as drawn, layout warnings and a colour check.",
487
- params: object({ width: _chunkTVQW26AVcjs.WIDTH, height: _chunkTVQW26AVcjs.HEIGHT }),
506
+ params: object({ width: _chunkGTF4RYXJcjs.WIDTH, height: _chunkGTF4RYXJcjs.HEIGHT }),
488
507
  run: (_ctx, params = {}) => {
489
508
  const spec = controller.getSpec();
490
- return { spec: controller.toJSON(), table: _chunkUVXTOZ2Bcjs.chartDataToTable.call(void 0, spec), summary: _chunkIMRXC7OAcjs.summarizeChart.call(void 0, controller.toJSON(), { width: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _25 => _25.width]), () => ( 640)), height: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _26 => _26.height]), () => ( 400)) }), issues: controller.getState().issues };
509
+ return { spec: controller.toJSON(), table: _chunkOUO3DSRTcjs.chartDataToTable.call(void 0, spec), summary: _chunk2F4GAZL5cjs.summarizeChart.call(void 0, controller.toJSON(), { width: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _25 => _25.width]), () => ( 640)), height: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _26 => _26.height]), () => ( 400)) }), issues: controller.getState().issues };
491
510
  }
492
511
  },
493
512
  {
@@ -496,7 +515,7 @@ function createChartCommands(controller, options = {}) {
496
515
  label: "Change Chart\u2026",
497
516
  keywords: ["chart", "title", "axis", "legend", "stack", "style", "format", "type"],
498
517
  description: 'Changes chart presentation as one undo step: type, titles, axes (xAxis = categories, yAxis = values, yAxis2 = secondary values; reverse, and scale "log" on value axes), legend, stacking, orientation, curve, points, data labels, palette, donut hole, bar spacing, histogram bins, waterfall total, or radar rings and grid shape, note, highlight, reference lines and bands, or colour by category (varyColors). Invalid values change nothing and return why.',
499
- params: object(_chunkTVQW26AVcjs.CHART_UPDATE_PROPERTIES),
518
+ params: object(_chunkGTF4RYXJcjs.CHART_UPDATE_PROPERTIES),
500
519
  run: (_ctx, params) => {
501
520
  check(controller.update(params));
502
521
  return { spec: controller.toJSON() };
@@ -510,11 +529,11 @@ function createChartCommands(controller, options = {}) {
510
529
  description: "Replaces the categories and series as one undo step. Each series has one value per category (padded with gaps).",
511
530
  params: object({
512
531
  categories: { type: "array", items: { type: "string" }, description: "Category labels in order." },
513
- series: { type: "array", description: "The new series.", items: object({ id: { type: "string", description: "Stable id (optional)." }, ..._chunkTVQW26AVcjs.SERIES_PROPS }, ["name", "values"]) }
532
+ series: { type: "array", description: "The new series.", items: object({ id: { type: "string", description: "Stable id (optional)." }, ..._chunkGTF4RYXJcjs.SERIES_PROPS }, ["name", "values"]) }
514
533
  }),
515
534
  run: (_ctx, params) => {
516
535
  check(controller.setData(params));
517
- return { table: _chunkUVXTOZ2Bcjs.chartDataToTable.call(void 0, controller.getSpec()) };
536
+ return { table: _chunkOUO3DSRTcjs.chartDataToTable.call(void 0, controller.getSpec()) };
518
537
  }
519
538
  },
520
539
  {
@@ -523,10 +542,10 @@ function createChartCommands(controller, options = {}) {
523
542
  label: "Set Chart Values\u2026",
524
543
  keywords: ["chart", "value", "cell", "edit"],
525
544
  description: "Sets individual values as one undo step. Series by id or name; category by index or label.",
526
- params: object({ cells: { type: "array", minItems: 1, description: "Values to set.", items: object({ series: _chunkTVQW26AVcjs.SERIES_REF, category: _chunkTVQW26AVcjs.CATEGORY_REF, value: _chunkTVQW26AVcjs.VALUE }, ["series", "category", "value"]) } }, ["cells"]),
545
+ params: object({ cells: { type: "array", minItems: 1, description: "Values to set.", items: object({ series: _chunkGTF4RYXJcjs.SERIES_REF, category: _chunkGTF4RYXJcjs.CATEGORY_REF, value: _chunkGTF4RYXJcjs.VALUE }, ["series", "category", "value"]) } }, ["cells"]),
527
546
  run: (_ctx, params) => {
528
547
  check(controller.setValues(params.cells.map((c) => ({ seriesId: resolveSeries(c.series).id, index: resolveCategory(c.category), value: c.value }))));
529
- return { table: _chunkUVXTOZ2Bcjs.chartDataToTable.call(void 0, controller.getSpec()) };
548
+ return { table: _chunkOUO3DSRTcjs.chartDataToTable.call(void 0, controller.getSpec()) };
530
549
  }
531
550
  },
532
551
  {
@@ -535,7 +554,7 @@ function createChartCommands(controller, options = {}) {
535
554
  label: "Add Series",
536
555
  keywords: ["chart", "series", "new"],
537
556
  description: "Adds a series (default: an empty one at the end). Returns its id.",
538
- params: object({ ..._chunkTVQW26AVcjs.SERIES_PROPS, id: { type: "string", description: "Id to use (default series-N)." }, at: { type: "integer", minimum: 0, description: "Position (default: last)." } }),
557
+ params: object({ ..._chunkGTF4RYXJcjs.SERIES_PROPS, id: { type: "string", description: "Id to use (default series-N)." }, at: { type: "integer", minimum: 0, description: "Position (default: last)." } }),
539
558
  run: (_ctx, params = {}) => {
540
559
  const { at, ...input } = _nullishCoalesce(params, () => ( {}));
541
560
  const clean = Object.fromEntries(Object.entries(input).filter(([, v]) => v !== null));
@@ -550,7 +569,7 @@ function createChartCommands(controller, options = {}) {
550
569
  label: "Change Series\u2026",
551
570
  keywords: ["chart", "series", "rename", "colour", "color", "hide", "axis", "marker"],
552
571
  description: "Renames, recolours, hides, moves to the secondary axis or changes how a series is drawn, including error bars (null resets a field).",
553
- params: object({ series: _chunkTVQW26AVcjs.SERIES_REF, ...Object.fromEntries(Object.entries(_chunkTVQW26AVcjs.SERIES_PROPS).filter(([k]) => k !== "values")) }, ["series"]),
572
+ params: object({ series: _chunkGTF4RYXJcjs.SERIES_REF, ...Object.fromEntries(Object.entries(_chunkGTF4RYXJcjs.SERIES_PROPS).filter(([k]) => k !== "values")) }, ["series"]),
554
573
  run: (_ctx, params) => {
555
574
  const { series, ...patch } = params;
556
575
  const id = resolveSeries(series).id;
@@ -564,7 +583,7 @@ function createChartCommands(controller, options = {}) {
564
583
  label: "Delete Series",
565
584
  keywords: ["chart", "series", "remove"],
566
585
  description: "Deletes a series by id or name.",
567
- params: object({ series: _chunkTVQW26AVcjs.SERIES_REF }, ["series"]),
586
+ params: object({ series: _chunkGTF4RYXJcjs.SERIES_REF }, ["series"]),
568
587
  run: (_ctx, params) => {
569
588
  check(controller.removeSeries(resolveSeries(params.series).id));
570
589
  return { series: seriesIds() };
@@ -589,7 +608,7 @@ function createChartCommands(controller, options = {}) {
589
608
  label: "Delete Category",
590
609
  keywords: ["chart", "category", "row", "remove"],
591
610
  description: "Deletes a category (and its values) by index or label.",
592
- params: object({ category: _chunkTVQW26AVcjs.CATEGORY_REF }, ["category"]),
611
+ params: object({ category: _chunkGTF4RYXJcjs.CATEGORY_REF }, ["category"]),
593
612
  run: (_ctx, params) => {
594
613
  check(controller.removeCategory(resolveCategory(params.category)));
595
614
  return { categories: controller.getSpec().categories };
@@ -601,7 +620,7 @@ function createChartCommands(controller, options = {}) {
601
620
  label: "Add Trendline\u2026",
602
621
  keywords: ["chart", "trend", "regression", "fit", "forecast", "moving average"],
603
622
  description: "Fits a trendline to a series (linear, exponential, logarithmic, power, polynomial or moving average). Returns its index and the fit.",
604
- params: object({ series: _chunkTVQW26AVcjs.SERIES_REF, ..._chunkTVQW26AVcjs.TRENDLINE_PROPS }, ["series", "type"]),
623
+ params: object({ series: _chunkGTF4RYXJcjs.SERIES_REF, ..._chunkGTF4RYXJcjs.TRENDLINE_PROPS }, ["series", "type"]),
605
624
  run: (_ctx, params) => {
606
625
  const { series, ...line } = params;
607
626
  const result = controller.addTrendline(resolveSeries(series).id, line);
@@ -616,7 +635,7 @@ function createChartCommands(controller, options = {}) {
616
635
  label: "Delete Trendline",
617
636
  keywords: ["chart", "trend", "remove"],
618
637
  description: "Deletes a trendline from a series.",
619
- params: object({ series: _chunkTVQW26AVcjs.SERIES_REF, index: { type: "integer", minimum: 0, description: "Trendline index (0 = first)." } }, ["series", "index"]),
638
+ params: object({ series: _chunkGTF4RYXJcjs.SERIES_REF, index: { type: "integer", minimum: 0, description: "Trendline index (0 = first)." } }, ["series", "index"]),
620
639
  run: (_ctx, params) => {
621
640
  check(controller.removeTrendline(resolveSeries(params.series).id, params.index));
622
641
  return { trendlines: _nullishCoalesce(_optionalChain([controller, 'access', _29 => _29.getSeries, 'call', _30 => _30(resolveSeries(params.series).id), 'optionalAccess', _31 => _31.trendlines]), () => ( [])) };
@@ -628,7 +647,7 @@ function createChartCommands(controller, options = {}) {
628
647
  label: "Add Reference Line\u2026",
629
648
  keywords: ["chart", "target", "goal", "threshold", "average", "reference", "line", "annotation"],
630
649
  description: "Draws a dashed line across the plot at one value (a target, floor or average). Returns its index.",
631
- params: object(_chunkTVQW26AVcjs.REFERENCE_LINE_PROPS, ["value"]),
650
+ params: object(_chunkGTF4RYXJcjs.REFERENCE_LINE_PROPS, ["value"]),
632
651
  run: (_ctx, params) => {
633
652
  const result = controller.addReferenceLine(params);
634
653
  check(result);
@@ -641,7 +660,7 @@ function createChartCommands(controller, options = {}) {
641
660
  label: "Change Reference Line\u2026",
642
661
  keywords: ["chart", "target", "reference", "line", "annotation"],
643
662
  description: "Changes a reference line by index; label, axis and color take null to remove them.",
644
- params: object({ index: _chunkTVQW26AVcjs.REFERENCE_INDEX.call(void 0, "Reference line"), ..._chunkTVQW26AVcjs.REFERENCE_LINE_PATCH }, ["index"]),
663
+ params: object({ index: _chunkGTF4RYXJcjs.REFERENCE_INDEX.call(void 0, "Reference line"), ..._chunkGTF4RYXJcjs.REFERENCE_LINE_PATCH }, ["index"]),
645
664
  run: (_ctx, params) => {
646
665
  const { index, ...patch } = params;
647
666
  check(controller.updateReferenceLine(index, patch));
@@ -654,7 +673,7 @@ function createChartCommands(controller, options = {}) {
654
673
  label: "Delete Reference Line",
655
674
  keywords: ["chart", "target", "reference", "line", "remove"],
656
675
  description: "Deletes a reference line by index.",
657
- params: object({ index: _chunkTVQW26AVcjs.REFERENCE_INDEX.call(void 0, "Reference line") }, ["index"]),
676
+ params: object({ index: _chunkGTF4RYXJcjs.REFERENCE_INDEX.call(void 0, "Reference line") }, ["index"]),
658
677
  run: (_ctx, params) => {
659
678
  check(controller.removeReferenceLine(params.index));
660
679
  return { referenceLines: controller.getSpec().referenceLines };
@@ -666,7 +685,7 @@ function createChartCommands(controller, options = {}) {
666
685
  label: "Add Reference Band\u2026",
667
686
  keywords: ["chart", "target", "range", "band", "reference", "shade", "annotation"],
668
687
  description: "Shades a band across the plot between two values (a target or normal range). Returns its index.",
669
- params: object(_chunkTVQW26AVcjs.REFERENCE_BAND_PROPS, ["from", "to"]),
688
+ params: object(_chunkGTF4RYXJcjs.REFERENCE_BAND_PROPS, ["from", "to"]),
670
689
  run: (_ctx, params) => {
671
690
  const result = controller.addReferenceBand(params);
672
691
  check(result);
@@ -679,7 +698,7 @@ function createChartCommands(controller, options = {}) {
679
698
  label: "Change Reference Band\u2026",
680
699
  keywords: ["chart", "range", "band", "reference", "annotation"],
681
700
  description: "Changes a reference band by index; label, axis and color take null to remove them.",
682
- params: object({ index: _chunkTVQW26AVcjs.REFERENCE_INDEX.call(void 0, "Reference band"), ..._chunkTVQW26AVcjs.REFERENCE_BAND_PATCH }, ["index"]),
701
+ params: object({ index: _chunkGTF4RYXJcjs.REFERENCE_INDEX.call(void 0, "Reference band"), ..._chunkGTF4RYXJcjs.REFERENCE_BAND_PATCH }, ["index"]),
683
702
  run: (_ctx, params) => {
684
703
  const { index, ...patch } = params;
685
704
  check(controller.updateReferenceBand(index, patch));
@@ -692,7 +711,7 @@ function createChartCommands(controller, options = {}) {
692
711
  label: "Delete Reference Band",
693
712
  keywords: ["chart", "range", "band", "reference", "remove"],
694
713
  description: "Deletes a reference band by index.",
695
- params: object({ index: _chunkTVQW26AVcjs.REFERENCE_INDEX.call(void 0, "Reference band") }, ["index"]),
714
+ params: object({ index: _chunkGTF4RYXJcjs.REFERENCE_INDEX.call(void 0, "Reference band") }, ["index"]),
696
715
  run: (_ctx, params) => {
697
716
  check(controller.removeReferenceBand(params.index));
698
717
  return { referenceBands: controller.getSpec().referenceBands };
@@ -704,7 +723,7 @@ function createChartCommands(controller, options = {}) {
704
723
  label: "Pin Label to Point\u2026",
705
724
  keywords: ["chart", "callout", "annotation", "label", "note", "point"],
706
725
  description: 'Pins a short label to one bar or point (label null or "" removes it).',
707
- params: object({ series: _chunkTVQW26AVcjs.SERIES_REF, category: _chunkTVQW26AVcjs.CATEGORY_REF, label: { type: ["string", "null"], description: "The label (a few words), or null to remove it." } }, ["series", "category", "label"]),
726
+ params: object({ series: _chunkGTF4RYXJcjs.SERIES_REF, category: _chunkGTF4RYXJcjs.CATEGORY_REF, label: { type: ["string", "null"], description: "The label (a few words), or null to remove it." } }, ["series", "category", "label"]),
708
727
  run: (_ctx, params) => {
709
728
  const series = resolveSeries(params.series);
710
729
  const index = resolveCategory(params.category);
@@ -732,10 +751,10 @@ function createChartCommands(controller, options = {}) {
732
751
  label: "Replace Grouped Data\u2026",
733
752
  keywords: ["chart", "tree", "hierarchy", "groups", "treemap", "sunburst", "nested"],
734
753
  description: "Replaces the data with groups of items (a tree) for treemaps and sunbursts; [] goes back to plain data.",
735
- params: { type: "object", properties: { tree: { type: "array", items: { $ref: "#/$defs/chartTreeNode" }, description: "The top-level nodes; [] removes the grouping." } }, required: ["tree"], additionalProperties: false, $defs: _chunkTVQW26AVcjs.TREE_DEFS },
754
+ params: { type: "object", properties: { tree: { type: "array", items: { $ref: "#/$defs/chartTreeNode" }, description: "The top-level nodes; [] removes the grouping." } }, required: ["tree"], additionalProperties: false, $defs: _chunkGTF4RYXJcjs.TREE_DEFS },
736
755
  run: (_ctx, params) => {
737
756
  check(controller.setTree(params.tree));
738
- return { groups: controller.getSpec().tree.map((n) => ({ name: n.name, total: _chunkUVXTOZ2Bcjs.chartTreeTotal.call(void 0, n) })) };
757
+ return { groups: controller.getSpec().tree.map((n) => ({ name: n.name, total: _chunkOUO3DSRTcjs.chartTreeTotal.call(void 0, n) })) };
739
758
  }
740
759
  },
741
760
  {
@@ -771,7 +790,7 @@ function createChartCommands(controller, options = {}) {
771
790
  },
772
791
  required: ["node"],
773
792
  additionalProperties: false,
774
- $defs: _chunkTVQW26AVcjs.TREE_DEFS
793
+ $defs: _chunkGTF4RYXJcjs.TREE_DEFS
775
794
  },
776
795
  run: (_ctx, params) => {
777
796
  const result = controller.addTreeNode(_nullishCoalesce(params.parent, () => ( [])), params.node, { at: params.at });
@@ -787,7 +806,7 @@ function createChartCommands(controller, options = {}) {
787
806
  description: "Renames a node, sets an item's value or sets a node's colour (null for the palette).",
788
807
  params: object(
789
808
  {
790
- path: _chunkTVQW26AVcjs.TREE_PATH,
809
+ path: _chunkGTF4RYXJcjs.TREE_PATH,
791
810
  name: { type: "string", description: "New name." },
792
811
  value: { type: "number", minimum: 0, description: "Items only: the new amount." },
793
812
  color: { type: ["string", "null"], description: "CSS colour, or null for the palette colour." }
@@ -807,10 +826,10 @@ function createChartCommands(controller, options = {}) {
807
826
  label: "Delete Item or Group",
808
827
  keywords: ["chart", "tree", "group", "item", "remove", "delete"],
809
828
  description: "Deletes a node of the grouped data with everything under it.",
810
- params: object({ path: _chunkTVQW26AVcjs.TREE_PATH }, ["path"]),
829
+ params: object({ path: _chunkGTF4RYXJcjs.TREE_PATH }, ["path"]),
811
830
  run: (_ctx, params) => {
812
831
  check(controller.removeTreeNode(params.path));
813
- return { groups: controller.getSpec().tree.map((n) => ({ name: n.name, total: _chunkUVXTOZ2Bcjs.chartTreeTotal.call(void 0, n) })) };
832
+ return { groups: controller.getSpec().tree.map((n) => ({ name: n.name, total: _chunkOUO3DSRTcjs.chartTreeTotal.call(void 0, n) })) };
814
833
  }
815
834
  },
816
835
  {
@@ -821,7 +840,7 @@ function createChartCommands(controller, options = {}) {
821
840
  description: "Replaces the data with flows between named nodes for a Sankey diagram; [] goes back to plain data.",
822
841
  params: object(
823
842
  {
824
- links: { type: "array", items: { type: "object", properties: _chunkTVQW26AVcjs.LINK_PROPS, required: ["source", "target", "value"], additionalProperties: false }, description: "All the flows; [] removes them." },
843
+ links: { type: "array", items: { type: "object", properties: _chunkGTF4RYXJcjs.LINK_PROPS, required: ["source", "target", "value"], additionalProperties: false }, description: "All the flows; [] removes them." },
825
844
  nodes: { type: "array", items: { type: "string" }, description: "Node names in stacking order." }
826
845
  },
827
846
  ["links"]
@@ -855,7 +874,7 @@ function createChartCommands(controller, options = {}) {
855
874
  label: "Add Flow\u2026",
856
875
  keywords: ["chart", "sankey", "flow", "link", "add"],
857
876
  description: "Adds a flow between two nodes. Returns its index.",
858
- params: object(_chunkTVQW26AVcjs.LINK_PROPS, ["source", "target", "value"]),
877
+ params: object(_chunkGTF4RYXJcjs.LINK_PROPS, ["source", "target", "value"]),
859
878
  run: (_ctx, params) => {
860
879
  const result = controller.addLink(params);
861
880
  check(result);
@@ -868,7 +887,7 @@ function createChartCommands(controller, options = {}) {
868
887
  label: "Change Flow\u2026",
869
888
  keywords: ["chart", "sankey", "flow", "link", "value"],
870
889
  description: "Changes a flow by index (color null for the default).",
871
- params: object({ index: _chunkTVQW26AVcjs.LINK_INDEX, ..._chunkTVQW26AVcjs.LINK_PROPS, color: { type: ["string", "null"], description: "CSS colour, or null for the default." } }, ["index"]),
890
+ params: object({ index: _chunkGTF4RYXJcjs.LINK_INDEX, ..._chunkGTF4RYXJcjs.LINK_PROPS, color: { type: ["string", "null"], description: "CSS colour, or null for the default." } }, ["index"]),
872
891
  run: (_ctx, params) => {
873
892
  const { index, ...patch } = params;
874
893
  check(controller.updateLink(index, patch));
@@ -881,12 +900,79 @@ function createChartCommands(controller, options = {}) {
881
900
  label: "Delete Flow",
882
901
  keywords: ["chart", "sankey", "flow", "link", "remove"],
883
902
  description: "Deletes a flow by index.",
884
- params: object({ index: _chunkTVQW26AVcjs.LINK_INDEX }, ["index"]),
903
+ params: object({ index: _chunkGTF4RYXJcjs.LINK_INDEX }, ["index"]),
885
904
  run: (_ctx, params) => {
886
905
  check(controller.removeLink(params.index));
887
906
  return { links: controller.getSpec().links };
888
907
  }
889
908
  },
909
+ {
910
+ ...base,
911
+ id: `${prefix}mapRegions`,
912
+ label: "Map Regions",
913
+ readOnly: true,
914
+ keywords: ["chart", "map", "choropleth", "regions", "countries", "codes"],
915
+ description: "Lists the regions of the chart's map (or another registered map) and which categories match none.",
916
+ params: object({ map: { type: "string", description: "Map id (default: the chart's map)." } }),
917
+ run: (_ctx, params = {}) => {
918
+ const id = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _36 => _36.map]), () => ( controller.getSpec().map));
919
+ const geometry = _chunkWOIXNDHVcjs.getChartMap.call(void 0, id);
920
+ if (!geometry) fail(`There is no map "${id}"; register it with registerChartMap.`);
921
+ const matches = _chunkWOIXNDHVcjs.matchChartMapRegions.call(void 0, geometry, controller.getSpec().categories);
922
+ return { regions: geometry.regions.map((r) => ({ id: r.id, name: r.name })), unmatched: controller.getSpec().categories.filter((_, i) => !matches[i]) };
923
+ }
924
+ },
925
+ {
926
+ ...base,
927
+ id: `${prefix}raceRanking`,
928
+ label: "Bar Race Ranking",
929
+ readOnly: true,
930
+ keywords: ["chart", "race", "ranking", "leader", "time"],
931
+ description: "Returns the top names of a bar race at a moment (default: the one shown).",
932
+ params: object({ time: _chunkGTF4RYXJcjs.RACE_TIME }),
933
+ run: (_ctx, params = {}) => {
934
+ const spec = controller.getSpec();
935
+ const frame = _optionalChain([params, 'optionalAccess', _37 => _37.time]) !== void 0 ? raceFrame(params.time) : _nullishCoalesce(controller.getState().raceFrame, () => ( spec.categories.length - 1));
936
+ return { frame, ranking: _chunkWOIXNDHVcjs.chartRaceRanking.call(void 0, spec, frame).slice(0, spec.raceTopN).map((e) => ({ rank: e.rank + 1, series: e.seriesId, name: e.name, value: e.value })) };
937
+ }
938
+ },
939
+ {
940
+ ...base,
941
+ id: `${prefix}setRaceFrame`,
942
+ label: "Show Bar Race Moment\u2026",
943
+ keywords: ["chart", "race", "frame", "time", "scrub"],
944
+ description: "Shows the bar race at a time point (null for the last) and stops playback. View state, not an undo step.",
945
+ params: object({ time: { ..._chunkGTF4RYXJcjs.RACE_TIME, type: ["string", "number", "null"], description: `${_chunkGTF4RYXJcjs.RACE_TIME.description} null shows the last time point.` } }, ["time"]),
946
+ run: (_ctx, params) => {
947
+ const frame = params.time === null ? null : raceFrame(params.time);
948
+ check(controller.setRaceFrame(frame));
949
+ return { frame };
950
+ }
951
+ },
952
+ {
953
+ ...base,
954
+ id: `${prefix}playRace`,
955
+ label: "Play Bar Race",
956
+ keywords: ["chart", "race", "play", "animate"],
957
+ description: "Plays the bar race from the moment shown, one time point every msPerStep ms.",
958
+ params: object({ msPerStep: { type: "number", minimum: 50, maximum: 1e4, description: "Milliseconds per time point (default 1000)." } }),
959
+ run: (_ctx, params = {}) => {
960
+ check(controller.playRace({ msPerStep: _optionalChain([params, 'optionalAccess', _38 => _38.msPerStep]) }));
961
+ return { playing: true };
962
+ }
963
+ },
964
+ {
965
+ ...base,
966
+ id: `${prefix}pauseRace`,
967
+ label: "Pause Bar Race",
968
+ keywords: ["chart", "race", "pause", "stop"],
969
+ description: "Pauses bar race playback where it is.",
970
+ enabled: () => controller.getState().racePlaying || "The race is not playing",
971
+ run: () => {
972
+ controller.pauseRace();
973
+ return { frame: controller.getState().raceFrame };
974
+ }
975
+ },
890
976
  {
891
977
  ...base,
892
978
  id: `${prefix}applyPreset`,
@@ -894,8 +980,8 @@ function createChartCommands(controller, options = {}) {
894
980
  keywords: ["chart", "quick layout", "style", "colours", "colors", "monochrome", "theme"],
895
981
  description: "Applies a quick layout and / or colour scheme as one undo step.",
896
982
  params: object({
897
- layout: { type: "string", enum: _chunkIMRXC7OAcjs.CHART_LAYOUT_PRESETS.map((p) => p.id), description: "Quick layout id." },
898
- colors: { type: "string", enum: _chunkIMRXC7OAcjs.CHART_COLOR_SCHEMES.map((p) => p.id), description: "Colour scheme id." }
983
+ layout: { type: "string", enum: _chunk2F4GAZL5cjs.CHART_LAYOUT_PRESETS.map((p) => p.id), description: "Quick layout id." },
984
+ colors: { type: "string", enum: _chunk2F4GAZL5cjs.CHART_COLOR_SCHEMES.map((p) => p.id), description: "Colour scheme id." }
899
985
  }),
900
986
  run: (_ctx, params = {}) => {
901
987
  check(controller.applyPreset(_nullishCoalesce(params, () => ( {}))));
@@ -910,7 +996,7 @@ function createChartCommands(controller, options = {}) {
910
996
  description: "Swaps series and categories as one undo step.",
911
997
  run: () => {
912
998
  check(controller.transpose());
913
- return { table: _chunkUVXTOZ2Bcjs.chartDataToTable.call(void 0, controller.getSpec()) };
999
+ return { table: _chunkOUO3DSRTcjs.chartDataToTable.call(void 0, controller.getSpec()) };
914
1000
  }
915
1001
  },
916
1002
  {
@@ -930,7 +1016,7 @@ function createChartCommands(controller, options = {}) {
930
1016
  run: (_ctx, params) => {
931
1017
  const result = controller.importCsv(params.csv, { seriesIn: params.seriesIn, header: params.header });
932
1018
  check(result);
933
- return { table: _chunkUVXTOZ2Bcjs.chartDataToTable.call(void 0, controller.getSpec()), issues: _nullishCoalesce(result.issues, () => ( [])) };
1019
+ return { table: _chunkOUO3DSRTcjs.chartDataToTable.call(void 0, controller.getSpec()), issues: _nullishCoalesce(result.issues, () => ( [])) };
934
1020
  }
935
1021
  },
936
1022
  {
@@ -941,7 +1027,7 @@ function createChartCommands(controller, options = {}) {
941
1027
  description: "Replaces the chart with Mermaid xychart-beta, pie, radar-beta, sankey-beta or treemap-beta text (one undo step). Unreadable lines are listed with line numbers.",
942
1028
  params: object({ mermaid: { type: "string", description: "Mermaid text." } }, ["mermaid"]),
943
1029
  run: (_ctx, params) => {
944
- const read = _chunkIMRXC7OAcjs.chartFromMermaid.call(void 0, params.mermaid);
1030
+ const read = _chunk2F4GAZL5cjs.chartFromMermaid.call(void 0, params.mermaid);
945
1031
  if (!read.family) fail(read.issues.map((i) => i.message).join(" ") || "Expected Mermaid starting with xychart-beta, pie, radar-beta, sankey-beta or treemap-beta.");
946
1032
  check(controller.update({ ...read.spec }, { label: "Import Mermaid chart" }));
947
1033
  return { spec: controller.toJSON(), issues: read.issues };
@@ -955,7 +1041,7 @@ function createChartCommands(controller, options = {}) {
955
1041
  keywords: ["chart", "mermaid", "markdown", "export"],
956
1042
  description: "Returns the chart as Mermaid text (with a round-trip comment unless meta is false).",
957
1043
  params: object({ meta: { type: "boolean", description: "Include the %% @pixerate round-trip comment (default true)." } }),
958
- run: (_ctx, params = {}) => ({ mermaid: _chunkIMRXC7OAcjs.chartToMermaid.call(void 0, controller.toJSON(), { meta: _optionalChain([params, 'optionalAccess', _36 => _36.meta]) }) })
1044
+ run: (_ctx, params = {}) => ({ mermaid: _chunk2F4GAZL5cjs.chartToMermaid.call(void 0, controller.toJSON(), { meta: _optionalChain([params, 'optionalAccess', _39 => _39.meta]) }) })
959
1045
  },
960
1046
  {
961
1047
  ...base,
@@ -964,7 +1050,7 @@ function createChartCommands(controller, options = {}) {
964
1050
  readOnly: true,
965
1051
  keywords: ["chart", "office", "word", "powerpoint", "docx", "pptx", "xml", "export"],
966
1052
  description: "Returns the chart as a DrawingML chart part (c:chartSpace) and what could not be written.",
967
- run: () => _chunkQ25WAFTDcjs.chartToOoxml.call(void 0, controller.toJSON())
1053
+ run: () => _chunkVKHJJUBKcjs.chartToOoxml.call(void 0, controller.toJSON())
968
1054
  },
969
1055
  {
970
1056
  ...base,
@@ -973,9 +1059,9 @@ function createChartCommands(controller, options = {}) {
973
1059
  readOnly: true,
974
1060
  keywords: ["chart", "svg", "export", "image"],
975
1061
  description: "Returns the chart drawn as a standalone, accessible SVG string (with <title> and <desc>).",
976
- params: object({ width: _chunkTVQW26AVcjs.WIDTH, height: _chunkTVQW26AVcjs.HEIGHT }),
1062
+ params: object({ width: _chunkGTF4RYXJcjs.WIDTH, height: _chunkGTF4RYXJcjs.HEIGHT }),
977
1063
  run: (_ctx, params = {}) => ({
978
- svg: _chunkIMRXC7OAcjs.chartToSvg.call(void 0, controller.toJSON(), { width: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _37 => _37.width]), () => ( 640)), height: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _38 => _38.height]), () => ( 400)) })
1064
+ svg: _chunk2F4GAZL5cjs.chartToSvg.call(void 0, controller.toJSON(), { width: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _40 => _40.width]), () => ( 640)), height: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _41 => _41.height]), () => ( 400)) })
979
1065
  })
980
1066
  },
981
1067
  {
@@ -987,7 +1073,7 @@ function createChartCommands(controller, options = {}) {
987
1073
  description: "Suggests chart types for the current data (or CSV), best first, each with a reason.",
988
1074
  params: object({ csv: { type: "string", description: "CSV text to analyse instead of the current data." } }),
989
1075
  run: (_ctx, params = {}) => ({
990
- recommendations: recommendChartTypes(_optionalChain([params, 'optionalAccess', _39 => _39.csv]) !== void 0 ? _chunkN3KJFGXTcjs.parseCsv.call(void 0, params.csv) : _chunkUVXTOZ2Bcjs.chartDataToTable.call(void 0, controller.getSpec()))
1076
+ recommendations: recommendChartTypes(_optionalChain([params, 'optionalAccess', _42 => _42.csv]) !== void 0 ? _chunkN3KJFGXTcjs.parseCsv.call(void 0, params.csv) : _chunkOUO3DSRTcjs.chartDataToTable.call(void 0, controller.getSpec()))
991
1077
  })
992
1078
  },
993
1079
  {
@@ -1000,8 +1086,8 @@ function createChartCommands(controller, options = {}) {
1000
1086
  run: () => {
1001
1087
  const s = controller.getSpec();
1002
1088
  const visible = s.series.filter((x) => !x.hidden);
1003
- const colors = _chunkUVXTOZ2Bcjs.chartSpecColorsByCategory.call(void 0, s) ? s.categories.map((_, i) => _optionalChain([visible, 'access', _40 => _40[0], 'optionalAccess', _41 => _41.pointColors, 'optionalAccess', _42 => _42[i]]) || _chunkUVXTOZ2Bcjs.chartSliceColor.call(void 0, s, i)) : visible.map((x) => _chunkUVXTOZ2Bcjs.chartSeriesColor.call(void 0, s, s.series.indexOf(x)));
1004
- return { colors, ..._chunkUVXTOZ2Bcjs.checkChartColors.call(void 0, colors) };
1089
+ const colors = _chunkOUO3DSRTcjs.chartSpecColorsByCategory.call(void 0, s) ? s.categories.map((_, i) => _optionalChain([visible, 'access', _43 => _43[0], 'optionalAccess', _44 => _44.pointColors, 'optionalAccess', _45 => _45[i]]) || _chunkOUO3DSRTcjs.chartSliceColor.call(void 0, s, i)) : visible.map((x) => _chunkOUO3DSRTcjs.chartSeriesColor.call(void 0, s, s.series.indexOf(x)));
1090
+ return { colors, ..._chunkOUO3DSRTcjs.checkChartColors.call(void 0, colors) };
1005
1091
  }
1006
1092
  },
1007
1093
  {
@@ -1030,9 +1116,9 @@ function chartClientToScene(scene, box, clientX, clientY) {
1030
1116
  return { x: (clientX - box.left) * sx, y: (clientY - box.top) * sy };
1031
1117
  }
1032
1118
  function canDragChartPoint(controller, scene, target) {
1033
- if (_optionalChain([target, 'optionalAccess', _43 => _43.kind]) !== "point" || !scene.valueScale || scene.percent) return false;
1119
+ if (_optionalChain([target, 'optionalAccess', _46 => _46.kind]) !== "point" || !scene.valueScale || scene.percent) return false;
1034
1120
  const spec = controller.getSpec();
1035
- const family = _chunkUVXTOZ2Bcjs.chartFamily.call(void 0, spec);
1121
+ const family = _chunkOUO3DSRTcjs.chartFamily.call(void 0, spec);
1036
1122
  if (family !== "cartesian" && family !== "xy" && family !== "waterfall") return false;
1037
1123
  const series = controller.getSeries(target.seriesId);
1038
1124
  return !!series && !series.hidden && series.values[target.index] !== null;
@@ -1041,7 +1127,7 @@ function snapChartDragValue(scene, value, options = {}) {
1041
1127
  const scale = _nullishCoalesce(options.scale, () => ( scene.valueScale));
1042
1128
  const tolerance = _nullishCoalesce(options.tolerancePx, () => ( 6));
1043
1129
  if (scale) {
1044
- const px = (v) => _chunkQO2T6KA5cjs.chartScaleToPixel.call(void 0, v, scale);
1130
+ const px = (v) => _chunkWOIXNDHVcjs.chartScaleToPixel.call(void 0, v, scale);
1045
1131
  const at = px(value);
1046
1132
  let best = null;
1047
1133
  let bestDist = tolerance;
@@ -1056,7 +1142,7 @@ function snapChartDragValue(scene, value, options = {}) {
1056
1142
  }
1057
1143
  if (best !== null) return best;
1058
1144
  }
1059
- return _chunkQO2T6KA5cjs.snapChartValue.call(void 0, scene, value, options.step, _optionalChain([scale, 'optionalAccess', _44 => _44.ticks]), _optionalChain([scale, 'optionalAccess', _45 => _45.logBase]));
1145
+ return _chunkWOIXNDHVcjs.snapChartValue.call(void 0, scene, value, options.step, _optionalChain([scale, 'optionalAccess', _47 => _47.ticks]), _optionalChain([scale, 'optionalAccess', _48 => _48.logBase]));
1060
1146
  }
1061
1147
  function startChartPointDrag(controller, scene, target, start, options = {}) {
1062
1148
  if (!canDragChartPoint(controller, scene, target)) return null;
@@ -1065,11 +1151,11 @@ function startChartPointDrag(controller, scene, target, start, options = {}) {
1065
1151
  const series = controller.getSeries(seriesId);
1066
1152
  const secondary = series.axis === "secondary" && !!scene.valueScale2;
1067
1153
  const scale = secondary ? scene.valueScale2 : scene.valueScale;
1068
- const xy = _chunkUVXTOZ2Bcjs.chartFamily.call(void 0, spec) === "xy" && !!scene.xScale;
1154
+ const xy = _chunkOUO3DSRTcjs.chartFamily.call(void 0, spec) === "xy" && !!scene.xScale;
1069
1155
  const startValue = _nullishCoalesce(series.values[index], () => ( 0));
1070
- const startX = _nullishCoalesce(_optionalChain([series, 'access', _46 => _46.x, 'optionalAccess', _47 => _47[index]]), () => ( null));
1071
- const startAt = _chunkQO2T6KA5cjs.chartValueAtPoint.call(void 0, scene, start, secondary);
1072
- const startAtX = xy ? _chunkQO2T6KA5cjs.chartXAtPoint.call(void 0, scene, start) : void 0;
1156
+ const startX = _nullishCoalesce(_optionalChain([series, 'access', _49 => _49.x, 'optionalAccess', _50 => _50[index]]), () => ( null));
1157
+ const startAt = _chunkWOIXNDHVcjs.chartValueAtPoint.call(void 0, scene, start, secondary);
1158
+ const startAtX = xy ? _chunkWOIXNDHVcjs.chartXAtPoint.call(void 0, scene, start) : void 0;
1073
1159
  if (startAt === void 0) return null;
1074
1160
  const candidates = [0, startValue];
1075
1161
  if (!xy) {
@@ -1087,7 +1173,7 @@ function startChartPointDrag(controller, scene, target, start, options = {}) {
1087
1173
  target: { seriesId, index },
1088
1174
  move(point, moveOptions = {}) {
1089
1175
  if (ended) return;
1090
- const at = _chunkQO2T6KA5cjs.chartValueAtPoint.call(void 0, scene, point, secondary);
1176
+ const at = _chunkWOIXNDHVcjs.chartValueAtPoint.call(void 0, scene, point, secondary);
1091
1177
  if (at === void 0) return;
1092
1178
  const factor = moveOptions.fine ? 0.1 : 1;
1093
1179
  const moved = (from, to, s, value) => s.logBase && value > 0 && from > 0 && to > 0 ? value * Math.pow(to / from, factor) : value + (to - from) * factor;
@@ -1095,7 +1181,7 @@ function startChartPointDrag(controller, scene, target, start, options = {}) {
1095
1181
  let moveX = false;
1096
1182
  let atX;
1097
1183
  if (xy && startX !== null && startAtX !== void 0) {
1098
- atX = _chunkQO2T6KA5cjs.chartXAtPoint.call(void 0, scene, point);
1184
+ atX = _chunkWOIXNDHVcjs.chartXAtPoint.call(void 0, scene, point);
1099
1185
  moveX = atX !== void 0;
1100
1186
  if (moveOptions.lockAxis) {
1101
1187
  if (Math.abs(point.x - start.x) >= Math.abs(point.y - start.y)) moveY = false;
@@ -1107,7 +1193,7 @@ function startChartPointDrag(controller, scene, target, start, options = {}) {
1107
1193
  if (moveOptions.fine) {
1108
1194
  if (s.logBase && !options.step) return v > 0 ? Number(v.toPrecision(3)) : v;
1109
1195
  const unit = options.step ? options.step / 10 : s.ticks.length > 1 ? (s.ticks[1] - s.ticks[0]) / 100 : void 0;
1110
- return _chunkQO2T6KA5cjs.snapChartValue.call(void 0, scene, v, unit, s.ticks);
1196
+ return _chunkWOIXNDHVcjs.snapChartValue.call(void 0, scene, v, unit, s.ticks);
1111
1197
  }
1112
1198
  return snapChartDragValue(scene, v, { candidates: c, tolerancePx: options.tolerancePx, step: options.step, scale: s });
1113
1199
  };
@@ -1118,7 +1204,7 @@ function startChartPointDrag(controller, scene, target, start, options = {}) {
1118
1204
  const xs = [..._nullishCoalesce(series.x, () => ( []))];
1119
1205
  xs[index] = x;
1120
1206
  controller.setValue(seriesId, index, y, { label });
1121
- if (x !== _optionalChain([controller, 'access', _48 => _48.getSeries, 'call', _49 => _49(seriesId), 'optionalAccess', _50 => _50.x, 'optionalAccess', _51 => _51[index]])) controller.updateSeries(seriesId, { x: xs });
1207
+ if (x !== _optionalChain([controller, 'access', _51 => _51.getSeries, 'call', _52 => _52(seriesId), 'optionalAccess', _53 => _53.x, 'optionalAccess', _54 => _54[index]])) controller.updateSeries(seriesId, { x: xs });
1122
1208
  } else controller.setValue(seriesId, index, y, { label });
1123
1209
  },
1124
1210
  end() {
@@ -1152,7 +1238,7 @@ function handleChartKey(controller, scene, event) {
1152
1238
  return true;
1153
1239
  case "ArrowLeft":
1154
1240
  case "ArrowRight": {
1155
- if (event.altKey || _optionalChain([selection, 'optionalAccess', _52 => _52.kind]) !== "point" && _optionalChain([selection, 'optionalAccess', _53 => _53.kind]) !== "category") return false;
1241
+ if (event.altKey || _optionalChain([selection, 'optionalAccess', _55 => _55.kind]) !== "point" && _optionalChain([selection, 'optionalAccess', _56 => _56.kind]) !== "category") return false;
1156
1242
  const n = spec.categories.length;
1157
1243
  const index = Math.max(0, Math.min(n - 1, selection.index + (event.key === "ArrowRight" ? 1 : -1)));
1158
1244
  controller.select({ ...selection, index });
@@ -1160,14 +1246,14 @@ function handleChartKey(controller, scene, event) {
1160
1246
  }
1161
1247
  case "ArrowUp":
1162
1248
  case "ArrowDown": {
1163
- if (_optionalChain([selection, 'optionalAccess', _54 => _54.kind]) !== "point" || _optionalChain([scene, 'optionalAccess', _55 => _55.percent])) return false;
1249
+ if (_optionalChain([selection, 'optionalAccess', _57 => _57.kind]) !== "point" || _optionalChain([scene, 'optionalAccess', _58 => _58.percent])) return false;
1164
1250
  const series = controller.getSeries(selection.seriesId);
1165
- const secondary = _optionalChain([series, 'optionalAccess', _56 => _56.axis]) === "secondary";
1166
- const scale = _nullishCoalesce((secondary ? _optionalChain([scene, 'optionalAccess', _57 => _57.valueScale2]) : null), () => ( _optionalChain([scene, 'optionalAccess', _58 => _58.valueScale])));
1167
- const ticks = _nullishCoalesce(_optionalChain([scale, 'optionalAccess', _59 => _59.ticks]), () => ( []));
1251
+ const secondary = _optionalChain([series, 'optionalAccess', _59 => _59.axis]) === "secondary";
1252
+ const scale = _nullishCoalesce((secondary ? _optionalChain([scene, 'optionalAccess', _60 => _60.valueScale2]) : null), () => ( _optionalChain([scene, 'optionalAccess', _61 => _61.valueScale])));
1253
+ const ticks = _nullishCoalesce(_optionalChain([scale, 'optionalAccess', _62 => _62.ticks]), () => ( []));
1168
1254
  const up = event.key === "ArrowUp";
1169
- const current = _nullishCoalesce(_optionalChain([series, 'optionalAccess', _60 => _60.values, 'access', _61 => _61[selection.index]]), () => ( null));
1170
- if (_optionalChain([scale, 'optionalAccess', _62 => _62.logBase]) && current !== null && current > 0) {
1255
+ const current = _nullishCoalesce(_optionalChain([series, 'optionalAccess', _63 => _63.values, 'access', _64 => _64[selection.index]]), () => ( null));
1256
+ if (_optionalChain([scale, 'optionalAccess', _65 => _65.logBase]) && current !== null && current > 0) {
1171
1257
  const power = event.shiftKey ? 1 : event.altKey ? 0.01 : 0.1;
1172
1258
  const next = Number((current * Math.pow(scale.logBase, up ? power : -power)).toPrecision(event.altKey ? 4 : 3));
1173
1259
  controller.nudgeValue(selection.seriesId, selection.index, next - current);
@@ -1195,22 +1281,22 @@ function describeChartSelection(controller, selection = controller.getState().se
1195
1281
  case "legend":
1196
1282
  return "Legend";
1197
1283
  case "axis":
1198
- return selection.axis === "x" ? _chunkUVXTOZ2Bcjs.chartFamily.call(void 0, spec) === "xy" ? "X axis" : "Category axis" : selection.axis === "y" ? "Value axis" : "Secondary value axis";
1284
+ return selection.axis === "x" ? _chunkOUO3DSRTcjs.chartFamily.call(void 0, spec) === "xy" ? "X axis" : "Category axis" : selection.axis === "y" ? "Value axis" : "Secondary value axis";
1199
1285
  case "series":
1200
- return `Series "${_nullishCoalesce(_optionalChain([controller, 'access', _63 => _63.getSeries, 'call', _64 => _64(selection.seriesId), 'optionalAccess', _65 => _65.name]), () => ( selection.seriesId))}"`;
1286
+ return `Series "${_nullishCoalesce(_optionalChain([controller, 'access', _66 => _66.getSeries, 'call', _67 => _67(selection.seriesId), 'optionalAccess', _68 => _68.name]), () => ( selection.seriesId))}"`;
1201
1287
  case "category":
1202
1288
  return `Category "${_nullishCoalesce(spec.categories[selection.index], () => ( selection.index))}"`;
1203
1289
  case "trendline": {
1204
1290
  const series = controller.getSeries(selection.seriesId);
1205
- const line = _optionalChain([series, 'optionalAccess', _66 => _66.trendlines, 'optionalAccess', _67 => _67[selection.index]]);
1206
- return `${line ? line.type.replace("-", " ") : "Trendline"} trendline on "${_nullishCoalesce(_optionalChain([series, 'optionalAccess', _68 => _68.name]), () => ( selection.seriesId))}"`;
1291
+ const line = _optionalChain([series, 'optionalAccess', _69 => _69.trendlines, 'optionalAccess', _70 => _70[selection.index]]);
1292
+ return `${line ? line.type.replace("-", " ") : "Trendline"} trendline on "${_nullishCoalesce(_optionalChain([series, 'optionalAccess', _71 => _71.name]), () => ( selection.seriesId))}"`;
1207
1293
  }
1208
1294
  case "point": {
1209
1295
  const series = controller.getSeries(selection.seriesId);
1210
- const value = _optionalChain([series, 'optionalAccess', _69 => _69.values, 'access', _70 => _70[selection.index]]);
1211
- const x = _optionalChain([series, 'optionalAccess', _71 => _71.x, 'optionalAccess', _72 => _72[selection.index]]);
1212
- if (x !== void 0 && x !== null && _chunkUVXTOZ2Bcjs.chartFamily.call(void 0, spec) === "xy") return `${_nullishCoalesce(_optionalChain([series, 'optionalAccess', _73 => _73.name]), () => ( selection.seriesId))}: (${x}, ${_nullishCoalesce(value, () => ( "blank"))})`;
1213
- return `${_nullishCoalesce(_optionalChain([series, 'optionalAccess', _74 => _74.name]), () => ( selection.seriesId))} \xB7 ${_nullishCoalesce(spec.categories[selection.index], () => ( selection.index))}: ${_nullishCoalesce(value, () => ( "blank"))}`;
1296
+ const value = _optionalChain([series, 'optionalAccess', _72 => _72.values, 'access', _73 => _73[selection.index]]);
1297
+ const x = _optionalChain([series, 'optionalAccess', _74 => _74.x, 'optionalAccess', _75 => _75[selection.index]]);
1298
+ if (x !== void 0 && x !== null && _chunkOUO3DSRTcjs.chartFamily.call(void 0, spec) === "xy") return `${_nullishCoalesce(_optionalChain([series, 'optionalAccess', _76 => _76.name]), () => ( selection.seriesId))}: (${x}, ${_nullishCoalesce(value, () => ( "blank"))})`;
1299
+ return `${_nullishCoalesce(_optionalChain([series, 'optionalAccess', _77 => _77.name]), () => ( selection.seriesId))} \xB7 ${_nullishCoalesce(spec.categories[selection.index], () => ( selection.index))}: ${_nullishCoalesce(value, () => ( "blank"))}`;
1214
1300
  }
1215
1301
  }
1216
1302
  }
@@ -1257,7 +1343,7 @@ var CHART_PRESENCE_COLORS = _chunkSWTUM32Hcjs.PRESENCE_COLORS;
1257
1343
  var realChartClock = _chunkSWTUM32Hcjs.realPresenceClock;
1258
1344
  var createInstantChartClock = _chunkSWTUM32Hcjs.createInstantPresenceClock;
1259
1345
  function chartPointAnchor(scene, seriesId, index) {
1260
- const mark = scene.marks.find((m) => (m.role === "bar" || m.role === "point") && _optionalChain([m, 'access', _75 => _75.target, 'optionalAccess', _76 => _76.kind]) === "point" && m.target.seriesId === seriesId && m.target.index === index);
1346
+ const mark = scene.marks.find((m) => (m.role === "bar" || m.role === "point") && _optionalChain([m, 'access', _78 => _78.target, 'optionalAccess', _79 => _79.kind]) === "point" && m.target.seriesId === seriesId && m.target.index === index);
1261
1347
  if (!mark) return null;
1262
1348
  if (mark.kind === "rect") return { x: mark.x + mark.width / 2, y: mark.y };
1263
1349
  if (mark.kind === "circle") return { x: mark.cx, y: mark.cy };
@@ -1283,10 +1369,10 @@ function planChartCommand(spec, scene, command, speed = 1) {
1283
1369
  case "setValue": {
1284
1370
  const at = chartPointAnchor(scene, command.seriesId, command.index);
1285
1371
  const series = spec.series.find((s) => s.id === command.seriesId);
1286
- const from = _nullishCoalesce(_optionalChain([series, 'optionalAccess', _77 => _77.values, 'access', _78 => _78[command.index]]), () => ( 0));
1287
- const scale = _optionalChain([series, 'optionalAccess', _79 => _79.axis]) === "secondary" ? _nullishCoalesce(scene.valueScale2, () => ( scene.valueScale)) : scene.valueScale;
1372
+ const from = _nullishCoalesce(_optionalChain([series, 'optionalAccess', _80 => _80.values, 'access', _81 => _81[command.index]]), () => ( 0));
1373
+ const scale = _optionalChain([series, 'optionalAccess', _82 => _82.axis]) === "secondary" ? _nullishCoalesce(scene.valueScale2, () => ( scene.valueScale)) : scene.valueScale;
1288
1374
  if (at && scale) {
1289
- const px = _chunkQO2T6KA5cjs.linearMap.call(void 0, command.value, scale.domain, scale.range);
1375
+ const px = _chunkWOIXNDHVcjs.linearMap.call(void 0, command.value, scale.domain, scale.range);
1290
1376
  const to = scale.axis === "y" ? { x: at.x, y: px } : { x: px, y: at.y };
1291
1377
  steps.push({ type: "move", to: at, ms: ms(380) }, { type: "press" }, { type: "drag", to, ms: ms(520), from, value: command.value }, { type: "release" });
1292
1378
  } else steps.push({ type: "drag", to: { x: scene.plot.x + scene.plot.width / 2, y: scene.plot.y + scene.plot.height / 2 }, ms: ms(200), from, value: command.value });
@@ -1296,12 +1382,12 @@ function planChartCommand(spec, scene, command, speed = 1) {
1296
1382
  case "select": {
1297
1383
  const sel = command.selection;
1298
1384
  let to = null;
1299
- if (_optionalChain([sel, 'optionalAccess', _80 => _80.kind]) === "point") to = chartPointAnchor(scene, sel.seriesId, sel.index);
1385
+ if (_optionalChain([sel, 'optionalAccess', _83 => _83.kind]) === "point") to = chartPointAnchor(scene, sel.seriesId, sel.index);
1300
1386
  else if (sel) {
1301
1387
  const m = scene.marks.find((x) => x.target && JSON.stringify(x.target) === JSON.stringify(sel));
1302
- if (_optionalChain([m, 'optionalAccess', _81 => _81.kind]) === "text") to = { x: m.x, y: m.y };
1303
- else if (_optionalChain([m, 'optionalAccess', _82 => _82.kind]) === "rect") to = { x: m.x + m.width / 2, y: m.y + m.height / 2 };
1304
- else if (_optionalChain([m, 'optionalAccess', _83 => _83.kind]) === "circle") to = { x: m.cx, y: m.cy };
1388
+ if (_optionalChain([m, 'optionalAccess', _84 => _84.kind]) === "text") to = { x: m.x, y: m.y };
1389
+ else if (_optionalChain([m, 'optionalAccess', _85 => _85.kind]) === "rect") to = { x: m.x + m.width / 2, y: m.y + m.height / 2 };
1390
+ else if (_optionalChain([m, 'optionalAccess', _86 => _86.kind]) === "circle") to = { x: m.cx, y: m.cy };
1305
1391
  }
1306
1392
  if (to) steps.push({ type: "move", to, ms: ms(380) }, { type: "press" }, { type: "release" });
1307
1393
  steps.push({ type: "commit" });
@@ -1383,7 +1469,7 @@ var ChartDirector = class {
1383
1469
  if (command.kind !== "setValue") break;
1384
1470
  const stale2 = this.stale(command);
1385
1471
  if (stale2) return { ok: false, command, message: stale2 };
1386
- const label = `${_nullishCoalesce(_optionalChain([this, 'access', _84 => _84.presence, 'access', _85 => _85.getState, 'call', _86 => _86(), 'access', _87 => _87.actors, 'access', _88 => _88.find, 'call', _89 => _89((a) => a.id === id), 'optionalAccess', _90 => _90.name]), () => ( "Agent"))}: edit value`;
1472
+ const label = `${_nullishCoalesce(_optionalChain([this, 'access', _87 => _87.presence, 'access', _88 => _88.getState, 'call', _89 => _89(), 'access', _90 => _90.actors, 'access', _91 => _91.find, 'call', _92 => _92((a) => a.id === id), 'optionalAccess', _93 => _93.name]), () => ( "Agent"))}: edit value`;
1387
1473
  await this.move(id, where(), step.to, step.ms, (e) => {
1388
1474
  const v = step.from + (step.value - step.from) * e;
1389
1475
  this.controller.setValue(command.seriesId, command.index, Number(v.toPrecision(12)), { label });
@@ -1484,6 +1570,10 @@ function planChartToolPlayback(tool, args) {
1484
1570
  return click(control("series.callout"));
1485
1571
  case "highlight_chart":
1486
1572
  return click(control("highlight"));
1573
+ case "set_chart_race_frame":
1574
+ return click(control("raceFrame"));
1575
+ case "play_chart_race":
1576
+ return click({ kind: "action", id: "race-play" });
1487
1577
  case "render_chart":
1488
1578
  return [{ type: "target", ref: { kind: "action", id: "download-png" } }];
1489
1579
  case "undo_chart":
@@ -1542,20 +1632,36 @@ function createChartToolProvider(controller, options = {}) {
1542
1632
  fail2(`There is no category ${JSON.stringify(ref)}; expected an index from 0 to ${categories.length - 1} or one of ${categories.slice(0, 20).map((c) => JSON.stringify(c)).join(", ")}.`);
1543
1633
  return index;
1544
1634
  };
1545
- const table = () => _chunkUVXTOZ2Bcjs.chartDataToTable.call(void 0, spec());
1635
+ const table = () => _chunkOUO3DSRTcjs.chartDataToTable.call(void 0, spec());
1546
1636
  const treeTable = () => {
1547
- const rows = _chunkUVXTOZ2Bcjs.chartTreeToRows.call(void 0, spec().tree);
1548
- const depth = _chunkUVXTOZ2Bcjs.chartTreeDepth.call(void 0, spec().tree);
1637
+ const rows = _chunkOUO3DSRTcjs.chartTreeToRows.call(void 0, spec().tree);
1638
+ const depth = _chunkOUO3DSRTcjs.chartTreeDepth.call(void 0, spec().tree);
1549
1639
  return [[...Array.from({ length: depth }, (_, k) => k === 0 ? "Group" : k === depth - 1 ? "Item" : `Level ${k + 1}`), "Value"], ...rows.map((r) => [...r.path, ...Array(depth - r.path.length).fill(""), r.value])];
1550
1640
  };
1551
- const linksSummary = () => ({ links: spec().links, nodes: spec().sankeyNodes.map((name, i) => ({ name, value: _chunkUVXTOZ2Bcjs.chartSankeyNodeValues.call(void 0, spec().links, spec().sankeyNodes)[i] })) });
1552
- const treeSummary = () => ({ tree: spec().tree, groups: spec().tree.map((n) => ({ name: n.name, total: _chunkUVXTOZ2Bcjs.chartTreeTotal.call(void 0, n) })), depth: _chunkUVXTOZ2Bcjs.chartTreeDepth.call(void 0, spec().tree) });
1641
+ const raceFrameOf = (time) => {
1642
+ const cats = spec().categories;
1643
+ const frame = typeof time === "number" ? time : cats.indexOf(time);
1644
+ if (!(Number.isFinite(frame) && frame >= 0 && frame <= cats.length - 1))
1645
+ fail2(`There is no time point ${JSON.stringify(time)}; expected an index from 0 to ${Math.max(0, cats.length - 1)} or one of ${cats.slice(0, 20).map((c) => JSON.stringify(c)).join(", ")}.`);
1646
+ return frame;
1647
+ };
1648
+ const raceAt = (frame) => {
1649
+ const s = spec();
1650
+ const at = _nullishCoalesce(frame, () => ( s.categories.length - 1));
1651
+ return {
1652
+ frame: at,
1653
+ time: _nullishCoalesce(s.categories[Math.round(at)], () => ( null)),
1654
+ ranking: _chunkWOIXNDHVcjs.chartRaceRanking.call(void 0, s, at).slice(0, s.raceTopN).map((e) => ({ rank: e.rank + 1, series: e.seriesId, name: e.name, value: e.value }))
1655
+ };
1656
+ };
1657
+ const linksSummary = () => ({ links: spec().links, nodes: spec().sankeyNodes.map((name, i) => ({ name, value: _chunkOUO3DSRTcjs.chartSankeyNodeValues.call(void 0, spec().links, spec().sankeyNodes)[i] })) });
1658
+ const treeSummary = () => ({ tree: spec().tree, groups: spec().tree.map((n) => ({ name: n.name, total: _chunkOUO3DSRTcjs.chartTreeTotal.call(void 0, n) })), depth: _chunkOUO3DSRTcjs.chartTreeDepth.call(void 0, spec().tree) });
1553
1659
  const Parser = () => _nullishCoalesce(options.DOMParser, () => ( globalThis.DOMParser));
1554
1660
  const getChart = {
1555
1661
  name: "get_chart",
1556
1662
  title: "Read the chart",
1557
1663
  description: "Returns the chart spec (type, titles, axes, legend, series with ids and settings), its data as a table (header row of series names, then one row per category), grouped data as treeTable (path of names to each item, then its value) when the chart has a tree, the current selection, and a summary at the given size: per-series min / max / mean / trend, the axes as drawn, layout warnings (hidden labels, thinned lines), a colour check and a plain-language description. Use the series ids and category indexes it returns with the write tools.",
1558
- inputSchema: { type: "object", properties: { width: _chunkTVQW26AVcjs.WIDTH, height: _chunkTVQW26AVcjs.HEIGHT }, additionalProperties: false },
1664
+ inputSchema: { type: "object", properties: { width: _chunkGTF4RYXJcjs.WIDTH, height: _chunkGTF4RYXJcjs.HEIGHT }, additionalProperties: false },
1559
1665
  annotations: { title: "Read the chart", ...READ },
1560
1666
  handler: ({ width = size.width, height = size.height }) => {
1561
1667
  const reason = readOnlyReason();
@@ -1563,7 +1669,7 @@ function createChartToolProvider(controller, options = {}) {
1563
1669
  spec: controller.toJSON(),
1564
1670
  table: table(),
1565
1671
  selection: controller.getState().selection,
1566
- summary: _chunkIMRXC7OAcjs.summarizeChart.call(void 0, controller.toJSON(), { width, height }),
1672
+ summary: _chunk2F4GAZL5cjs.summarizeChart.call(void 0, controller.toJSON(), { width, height }),
1567
1673
  ...spec().tree.length ? { treeTable: treeTable() } : {},
1568
1674
  issues: controller.getState().issues,
1569
1675
  ...reason ? { readOnly: reason } : {}
@@ -1577,17 +1683,19 @@ function createChartToolProvider(controller, options = {}) {
1577
1683
  inputSchema: {
1578
1684
  type: "object",
1579
1685
  properties: {
1580
- width: _chunkTVQW26AVcjs.WIDTH,
1581
- height: _chunkTVQW26AVcjs.HEIGHT,
1582
- format: { type: "string", enum: ["svg", "png"], description: "svg (default): the SVG document as text. png: an image to look at (only when the host can rasterize; costs image tokens)." }
1686
+ width: _chunkGTF4RYXJcjs.WIDTH,
1687
+ height: _chunkGTF4RYXJcjs.HEIGHT,
1688
+ format: { type: "string", enum: ["svg", "png"], description: "svg (default): the SVG document as text. png: an image to look at (only when the host can rasterize; costs image tokens)." },
1689
+ time: { ..._chunkGTF4RYXJcjs.RACE_TIME, description: `Bar race only: the moment to draw (default: the one shown). ${_chunkGTF4RYXJcjs.RACE_TIME.description}` }
1583
1690
  },
1584
1691
  additionalProperties: false
1585
1692
  },
1586
1693
  annotations: { title: "Render the chart", ...READ },
1587
- handler: async ({ width = size.width, height = size.height, format = "svg" }) => {
1694
+ handler: async ({ width = size.width, height = size.height, format = "svg", time }) => {
1588
1695
  const json = controller.toJSON();
1589
- const scene = _chunkQO2T6KA5cjs.layoutChart.call(void 0, json, { width, height, selection: null });
1590
- const svg = _chunkIMRXC7OAcjs.chartSceneToSvg.call(void 0, scene, { ariaLabel: json.title || void 0, description: _chunkIMRXC7OAcjs.describeChart.call(void 0, json) });
1696
+ const raceFrame = time !== void 0 ? raceFrameOf(time) : controller.getState().raceFrame;
1697
+ const scene = _chunkWOIXNDHVcjs.layoutChart.call(void 0, json, { width, height, selection: null, raceFrame });
1698
+ const svg = _chunk2F4GAZL5cjs.chartSceneToSvg.call(void 0, scene, { ariaLabel: json.title || void 0, description: _chunk2F4GAZL5cjs.describeChart.call(void 0, json) });
1591
1699
  const warnings = scene.warnings;
1592
1700
  if (format === "png") {
1593
1701
  if (!options.rasterize) fail2('This host cannot rasterize charts; call render_chart with format "svg", or get_chart for the layout warnings.');
@@ -1621,8 +1729,8 @@ function createChartToolProvider(controller, options = {}) {
1621
1729
  handler: ({ colors, surface }) => {
1622
1730
  const s = spec();
1623
1731
  const visible = s.series.filter((x) => !x.hidden);
1624
- const own = _chunkUVXTOZ2Bcjs.chartSpecColorsByCategory.call(void 0, s) ? s.categories.map((_, i) => _optionalChain([visible, 'access', _91 => _91[0], 'optionalAccess', _92 => _92.pointColors, 'optionalAccess', _93 => _93[i]]) || _chunkUVXTOZ2Bcjs.chartSliceColor.call(void 0, s, i)) : visible.map((x) => _chunkUVXTOZ2Bcjs.chartSeriesColor.call(void 0, s, s.series.indexOf(x)));
1625
- return { colors: _nullishCoalesce(colors, () => ( own)), ..._chunkUVXTOZ2Bcjs.checkChartColors.call(void 0, _nullishCoalesce(colors, () => ( own)), { surface }) };
1732
+ const own = _chunkOUO3DSRTcjs.chartSpecColorsByCategory.call(void 0, s) ? s.categories.map((_, i) => _optionalChain([visible, 'access', _94 => _94[0], 'optionalAccess', _95 => _95.pointColors, 'optionalAccess', _96 => _96[i]]) || _chunkOUO3DSRTcjs.chartSliceColor.call(void 0, s, i)) : visible.map((x) => _chunkOUO3DSRTcjs.chartSeriesColor.call(void 0, s, s.series.indexOf(x)));
1733
+ return { colors: _nullishCoalesce(colors, () => ( own)), ..._chunkOUO3DSRTcjs.checkChartColors.call(void 0, _nullishCoalesce(colors, () => ( own)), { surface }) };
1626
1734
  }
1627
1735
  };
1628
1736
  const recommend = {
@@ -1644,21 +1752,50 @@ function createChartToolProvider(controller, options = {}) {
1644
1752
  description: "Returns a trendline's fitted coefficients (in x for category charts, x = 1, 2, 3, \u2026), R\xB2, equation and the number of points, or the moving-average points.",
1645
1753
  inputSchema: {
1646
1754
  type: "object",
1647
- properties: { series: _chunkTVQW26AVcjs.SERIES_REF, index: { type: "integer", minimum: 0, description: "Trendline index on the series (0 = first)." } },
1755
+ properties: { series: _chunkGTF4RYXJcjs.SERIES_REF, index: { type: "integer", minimum: 0, description: "Trendline index on the series (0 = first)." } },
1648
1756
  required: ["series", "index"],
1649
1757
  additionalProperties: false
1650
1758
  },
1651
1759
  annotations: { title: "Read a trendline fit", ...READ },
1652
1760
  handler: ({ series, index }) => {
1653
1761
  const s = seriesById(series);
1654
- const line = _optionalChain([s, 'access', _94 => _94.trendlines, 'optionalAccess', _95 => _95[index]]);
1655
- if (!line) fail2(`"${s.name}" has no trendline ${index}; it has ${_nullishCoalesce(_optionalChain([s, 'access', _96 => _96.trendlines, 'optionalAccess', _97 => _97.length]), () => ( 0))}.`);
1762
+ const line = _optionalChain([s, 'access', _97 => _97.trendlines, 'optionalAccess', _98 => _98[index]]);
1763
+ if (!line) fail2(`"${s.name}" has no trendline ${index}; it has ${_nullishCoalesce(_optionalChain([s, 'access', _99 => _99.trendlines, 'optionalAccess', _100 => _100.length]), () => ( 0))}.`);
1656
1764
  if (line.type === "moving-average") return { trendline: line, points: controller.trendlineMovingAverage(s.id, index) };
1657
1765
  const fit = controller.trendlineFit(s.id, index);
1658
1766
  if (!fit) fail2(`The ${line.type} trendline on "${s.name}" cannot be fitted: it needs more points (and positive values for log, exponential and power fits).`);
1659
1767
  return { trendline: line, coefficients: fit.coefficients, r2: fit.r2, equation: fit.equation, points: fit.points };
1660
1768
  }
1661
1769
  };
1770
+ const raceRanking = {
1771
+ name: "get_chart_race_ranking",
1772
+ title: "Read a bar race ranking",
1773
+ description: "Returns who leads a bar race at a moment without changing what is shown: the top raceTopN names with their rank, series id and value (eased between time points). Defaults to the moment shown. Works for any chart, reading categories as time points and series as names.",
1774
+ inputSchema: { type: "object", properties: { time: _chunkGTF4RYXJcjs.RACE_TIME }, additionalProperties: false },
1775
+ annotations: { title: "Read a bar race ranking", ...READ },
1776
+ handler: ({ time }) => raceAt(time !== void 0 ? raceFrameOf(time) : controller.getState().raceFrame)
1777
+ };
1778
+ const mapRegions = {
1779
+ name: "list_chart_map_regions",
1780
+ title: "List map regions",
1781
+ description: "Lists the maps a choropleth can draw and the regions of one (default: the chart's map), each with the id and name that categories may use, and how the chart's categories match them: matched (category \u2192 region id) and unmatched. Use it to pick category labels before set_chart_data, and to fix unmatched ones.",
1782
+ inputSchema: { type: "object", properties: { map: { type: "string", description: "Map id (default: the chart's map)." } }, additionalProperties: false },
1783
+ annotations: { title: "List map regions", ...READ },
1784
+ handler: ({ map }) => {
1785
+ const id = _nullishCoalesce(map, () => ( spec().map));
1786
+ const maps = _chunkWOIXNDHVcjs.listChartMaps.call(void 0, ).map((m) => ({ id: m.id, name: m.name, regions: m.regions.length }));
1787
+ const geometry = _chunkWOIXNDHVcjs.getChartMap.call(void 0, id);
1788
+ if (!geometry) fail2(maps.length ? `There is no map "${id}"; the host has ${maps.map((m) => `"${m.id}"`).join(", ")}.` : `There is no map "${id}": the host has not registered any maps (EUROPE_CHART_MAP in @pixerate/editor/chart-maps).`);
1789
+ const matches = _chunkWOIXNDHVcjs.matchChartMapRegions.call(void 0, geometry, spec().categories);
1790
+ return {
1791
+ maps,
1792
+ map: id,
1793
+ regions: geometry.regions.map((r) => ({ id: r.id, name: r.name })),
1794
+ matched: spec().categories.flatMap((c, i) => matches[i] ? [{ category: c, region: matches[i].id }] : []),
1795
+ unmatched: spec().categories.filter((_, i) => !matches[i])
1796
+ };
1797
+ }
1798
+ };
1662
1799
  const listPresets = {
1663
1800
  name: "list_chart_presets",
1664
1801
  title: "List chart presets",
@@ -1666,8 +1803,8 @@ function createChartToolProvider(controller, options = {}) {
1666
1803
  inputSchema: { type: "object", properties: {}, additionalProperties: false },
1667
1804
  annotations: { title: "List chart presets", ...READ },
1668
1805
  handler: () => ({
1669
- layouts: _chunkIMRXC7OAcjs.CHART_LAYOUT_PRESETS.map(({ id, label, description }) => ({ id, label, description })),
1670
- colorSchemes: _chunkIMRXC7OAcjs.CHART_COLOR_SCHEMES.map(({ id, label, description, palette }) => ({ id, label, description, palette }))
1806
+ layouts: _chunk2F4GAZL5cjs.CHART_LAYOUT_PRESETS.map(({ id, label, description }) => ({ id, label, description })),
1807
+ colorSchemes: _chunk2F4GAZL5cjs.CHART_COLOR_SCHEMES.map(({ id, label, description, palette }) => ({ id, label, description, palette }))
1671
1808
  })
1672
1809
  };
1673
1810
  const exportMermaid = {
@@ -1676,7 +1813,7 @@ function createChartToolProvider(controller, options = {}) {
1676
1813
  description: 'Returns the chart as Mermaid text for Markdown or chat: xychart-beta, pie or radar-beta, sankey-beta for Sankey diagrams with flows, treemap-beta for treemaps and sunbursts (with their levels). With meta (default true) one "%% @pixerate {\u2026}" comment keeps what Mermaid cannot express, so import_chart_mermaid gets the chart back exactly.',
1677
1814
  inputSchema: { type: "object", properties: { meta: { type: "boolean", description: "Include the round-trip comment (default true)." } }, additionalProperties: false },
1678
1815
  annotations: { title: "Export chart as Mermaid", ...READ },
1679
- handler: ({ meta = true }) => ({ mermaid: _chunkIMRXC7OAcjs.chartToMermaid.call(void 0, controller.toJSON(), { meta }) })
1816
+ handler: ({ meta = true }) => ({ mermaid: _chunk2F4GAZL5cjs.chartToMermaid.call(void 0, controller.toJSON(), { meta }) })
1680
1817
  };
1681
1818
  const exportOoxml = {
1682
1819
  name: "export_chart_ooxml",
@@ -1684,7 +1821,7 @@ function createChartToolProvider(controller, options = {}) {
1684
1821
  description: "Returns the chart as a DrawingML chart part (c:chartSpace) for Word or PowerPoint files, with what could not be written as sentences.",
1685
1822
  inputSchema: { type: "object", properties: {}, additionalProperties: false },
1686
1823
  annotations: { title: "Export chart as Office XML", ...READ },
1687
- handler: () => _chunkQ25WAFTDcjs.chartToOoxml.call(void 0, controller.toJSON())
1824
+ handler: () => _chunkVKHJJUBKcjs.chartToOoxml.call(void 0, controller.toJSON())
1688
1825
  };
1689
1826
  const updateChart = {
1690
1827
  name: "update_chart",
@@ -1692,7 +1829,7 @@ function createChartToolProvider(controller, options = {}) {
1692
1829
  description: 'Changes how the chart looks, as one undo step: type, titles, axes (xAxis = categories or numeric x, yAxis = values, yAxis2 = secondary values; each can be reversed, and value axes can be logarithmic with scale "log"), legend, stacking, orientation, curve, points, data labels and their position, palette, donut hole, bar spacing, histogram bins, waterfall total, radar rings (radarTicks) and grid shape (radarGraticule), note, highlight, reference lines and bands (whole lists), and varyColors. All-or-nothing: invalid values change nothing and come back as sentences. Returns the new spec.',
1693
1830
  inputSchema: {
1694
1831
  type: "object",
1695
- properties: _chunkTVQW26AVcjs.CHART_UPDATE_PROPERTIES,
1832
+ properties: _chunkGTF4RYXJcjs.CHART_UPDATE_PROPERTIES,
1696
1833
  additionalProperties: false
1697
1834
  },
1698
1835
  annotations: { title: "Change chart presentation", ...WRITE_IDEMPOTENT },
@@ -1713,7 +1850,7 @@ function createChartToolProvider(controller, options = {}) {
1713
1850
  series: {
1714
1851
  type: "array",
1715
1852
  description: "The new series (replaces all).",
1716
- items: { type: "object", properties: { id: { type: "string", description: "Stable id (optional)." }, ..._chunkTVQW26AVcjs.SERIES_PROPS }, required: ["name", "values"], additionalProperties: false }
1853
+ items: { type: "object", properties: { id: { type: "string", description: "Stable id (optional)." }, ..._chunkGTF4RYXJcjs.SERIES_PROPS }, required: ["name", "values"], additionalProperties: false }
1717
1854
  }
1718
1855
  },
1719
1856
  additionalProperties: false
@@ -1736,7 +1873,7 @@ function createChartToolProvider(controller, options = {}) {
1736
1873
  type: "array",
1737
1874
  minItems: 1,
1738
1875
  description: "Values to set.",
1739
- items: { type: "object", properties: { series: _chunkTVQW26AVcjs.SERIES_REF, category: _chunkTVQW26AVcjs.CATEGORY_REF, value: _chunkTVQW26AVcjs.VALUE }, required: ["series", "category", "value"], additionalProperties: false }
1876
+ items: { type: "object", properties: { series: _chunkGTF4RYXJcjs.SERIES_REF, category: _chunkGTF4RYXJcjs.CATEGORY_REF, value: _chunkGTF4RYXJcjs.VALUE }, required: ["series", "category", "value"], additionalProperties: false }
1740
1877
  }
1741
1878
  },
1742
1879
  required: ["cells"],
@@ -1745,7 +1882,7 @@ function createChartToolProvider(controller, options = {}) {
1745
1882
  annotations: { title: "Set chart values", ...WRITE_IDEMPOTENT },
1746
1883
  handler: async ({ cells }) => {
1747
1884
  const resolved = cells.map((c) => ({ seriesId: seriesById(c.series).id, index: categoryIndex(c.category), value: c.value }));
1748
- const parsed = resolved.map((c) => _chunkUVXTOZ2Bcjs.parseChartValue.call(void 0, c.value));
1885
+ const parsed = resolved.map((c) => _chunkOUO3DSRTcjs.parseChartValue.call(void 0, c.value));
1749
1886
  const bad = resolved.find((_, i) => parsed[i] === void 0);
1750
1887
  if (bad) fail2(`"${String(bad.value)}" is not a number; pass a number, numeric text or null for a gap. Nothing was changed.`);
1751
1888
  if (options.director && parsed.every((v) => typeof v === "number")) {
@@ -1762,7 +1899,7 @@ function createChartToolProvider(controller, options = {}) {
1762
1899
  description: "Adds a series (values padded to the categories) and selects it. Returns its id and stored values.",
1763
1900
  inputSchema: {
1764
1901
  type: "object",
1765
- properties: { ..._chunkTVQW26AVcjs.SERIES_PROPS, id: { type: "string", description: "Id to use (default: series-N)." }, at: { type: "integer", minimum: 0, description: "Position (default: last)." } },
1902
+ properties: { ..._chunkGTF4RYXJcjs.SERIES_PROPS, id: { type: "string", description: "Id to use (default: series-N)." }, at: { type: "integer", minimum: 0, description: "Position (default: last)." } },
1766
1903
  required: ["name"],
1767
1904
  additionalProperties: false
1768
1905
  },
@@ -1780,7 +1917,7 @@ function createChartToolProvider(controller, options = {}) {
1780
1917
  description: "Renames, recolours, hides, moves to the secondary axis or changes how a series is drawn (marker, curve, labels, format, x values, bubble sizes, point colours, error bars). null resets a field. Values change with set_chart_values. Returns the series.",
1781
1918
  inputSchema: {
1782
1919
  type: "object",
1783
- properties: { series: _chunkTVQW26AVcjs.SERIES_REF, ...Object.fromEntries(Object.entries(_chunkTVQW26AVcjs.SERIES_PROPS).filter(([k]) => k !== "values")) },
1920
+ properties: { series: _chunkGTF4RYXJcjs.SERIES_REF, ...Object.fromEntries(Object.entries(_chunkGTF4RYXJcjs.SERIES_PROPS).filter(([k]) => k !== "values")) },
1784
1921
  required: ["series"],
1785
1922
  additionalProperties: false
1786
1923
  },
@@ -1796,7 +1933,7 @@ function createChartToolProvider(controller, options = {}) {
1796
1933
  name: "remove_chart_series",
1797
1934
  title: "Delete a series",
1798
1935
  description: "Deletes a series and its values. Returns the remaining series ids.",
1799
- inputSchema: { type: "object", properties: { series: _chunkTVQW26AVcjs.SERIES_REF }, required: ["series"], additionalProperties: false },
1936
+ inputSchema: { type: "object", properties: { series: _chunkGTF4RYXJcjs.SERIES_REF }, required: ["series"], additionalProperties: false },
1800
1937
  annotations: { title: "Delete a series", ...DESTRUCTIVE },
1801
1938
  handler: ({ series }) => {
1802
1939
  resolve(controller.removeSeries(seriesById(series).id));
@@ -1822,7 +1959,7 @@ function createChartToolProvider(controller, options = {}) {
1822
1959
  name: "remove_chart_category",
1823
1960
  title: "Delete a category",
1824
1961
  description: "Deletes a category and its value in every series. Returns the remaining categories.",
1825
- inputSchema: { type: "object", properties: { category: _chunkTVQW26AVcjs.CATEGORY_REF }, required: ["category"], additionalProperties: false },
1962
+ inputSchema: { type: "object", properties: { category: _chunkGTF4RYXJcjs.CATEGORY_REF }, required: ["category"], additionalProperties: false },
1826
1963
  annotations: { title: "Delete a category", ...DESTRUCTIVE },
1827
1964
  handler: ({ category }) => {
1828
1965
  resolve(controller.removeCategory(categoryIndex(category)));
@@ -1865,7 +2002,7 @@ function createChartToolProvider(controller, options = {}) {
1865
2002
  annotations: { title: "Import a Mermaid chart", ...DESTRUCTIVE },
1866
2003
  handler: ({ mermaid }) => {
1867
2004
  const fenced = /```(?:mermaid)?\s*\n([\s\S]*?)```/.exec(mermaid);
1868
- const read = _chunkIMRXC7OAcjs.chartFromMermaid.call(void 0, fenced ? fenced[1] : mermaid);
2005
+ const read = _chunk2F4GAZL5cjs.chartFromMermaid.call(void 0, fenced ? fenced[1] : mermaid);
1869
2006
  if (!read.family) fail2(read.issues.map((i) => i.message).join(" ") || "Expected Mermaid starting with xychart-beta, pie, radar-beta, sankey-beta or treemap-beta.");
1870
2007
  resolve(controller.update({ ...read.spec }, { label: "Import Mermaid chart" }));
1871
2008
  return { spec: controller.toJSON(), issues: read.issues };
@@ -1878,7 +2015,7 @@ function createChartToolProvider(controller, options = {}) {
1878
2015
  inputSchema: { type: "object", properties: { xml: { type: "string", description: "The chart part XML, e.g. word/charts/chart1.xml." } }, required: ["xml"], additionalProperties: false },
1879
2016
  annotations: { title: "Import an Office chart", ...DESTRUCTIVE },
1880
2017
  handler: ({ xml }) => {
1881
- const read = _chunkQ25WAFTDcjs.chartFromOoxml.call(void 0, xml, { DOMParser: Parser() });
2018
+ const read = _chunkVKHJJUBKcjs.chartFromOoxml.call(void 0, xml, { DOMParser: Parser() });
1882
2019
  if (read.issues.some((i) => i.path === "" || i.path === "plotArea")) fail2(read.issues.map((i) => i.message).join(" "));
1883
2020
  resolve(controller.update({ ...read.spec }, { label: "Import Office chart" }));
1884
2021
  return { spec: controller.toJSON(), issues: read.issues.map((i) => i.message), unsupported: read.unsupported, lossless: read.lossless };
@@ -1888,7 +2025,7 @@ function createChartToolProvider(controller, options = {}) {
1888
2025
  name: "add_chart_trendline",
1889
2026
  title: "Add a trendline",
1890
2027
  description: "Fits a trendline to a series and draws it (unstacked bar, line, area, scatter and bubble charts). Returns its index and the fit: coefficients, R\xB2 and equation.",
1891
- inputSchema: { type: "object", properties: { series: _chunkTVQW26AVcjs.SERIES_REF, ..._chunkTVQW26AVcjs.TRENDLINE_PROPS }, required: ["series", "type"], additionalProperties: false },
2028
+ inputSchema: { type: "object", properties: { series: _chunkGTF4RYXJcjs.SERIES_REF, ..._chunkGTF4RYXJcjs.TRENDLINE_PROPS }, required: ["series", "type"], additionalProperties: false },
1892
2029
  annotations: { title: "Add a trendline", ...WRITE },
1893
2030
  handler: ({ series, ...line }) => {
1894
2031
  const s = seriesById(series);
@@ -1902,7 +2039,7 @@ function createChartToolProvider(controller, options = {}) {
1902
2039
  description: "Deletes a trendline from a series. Returns the series' remaining trendlines.",
1903
2040
  inputSchema: {
1904
2041
  type: "object",
1905
- properties: { series: _chunkTVQW26AVcjs.SERIES_REF, index: { type: "integer", minimum: 0, description: "Trendline index on the series (0 = first)." } },
2042
+ properties: { series: _chunkGTF4RYXJcjs.SERIES_REF, index: { type: "integer", minimum: 0, description: "Trendline index on the series (0 = first)." } },
1906
2043
  required: ["series", "index"],
1907
2044
  additionalProperties: false
1908
2045
  },
@@ -1910,7 +2047,7 @@ function createChartToolProvider(controller, options = {}) {
1910
2047
  handler: ({ series, index }) => {
1911
2048
  const s = seriesById(series);
1912
2049
  resolve(controller.removeTrendline(s.id, index));
1913
- return { series: s.id, trendlines: _nullishCoalesce(_optionalChain([controller, 'access', _98 => _98.getSeries, 'call', _99 => _99(s.id), 'optionalAccess', _100 => _100.trendlines]), () => ( [])) };
2050
+ return { series: s.id, trendlines: _nullishCoalesce(_optionalChain([controller, 'access', _101 => _101.getSeries, 'call', _102 => _102(s.id), 'optionalAccess', _103 => _103.trendlines]), () => ( [])) };
1914
2051
  }
1915
2052
  };
1916
2053
  const referenceTools = (what) => {
@@ -1921,7 +2058,7 @@ function createChartToolProvider(controller, options = {}) {
1921
2058
  name: `add_chart_reference_${what}`,
1922
2059
  title: `Add a reference ${what}`,
1923
2060
  description: what === "line" ? "Draws a dashed line across the plot at one value: a target, a floor, an average (bar, line, area, scatter and bubble charts). The axis grows to keep it in view. Returns its index and the reference lines." : "Shades a band across the plot between two values: a target or normal range (bar, line, area, scatter and bubble charts), drawn under the data. The axis grows to keep it in view. Returns its index and the reference bands.",
1924
- inputSchema: { type: "object", properties: what === "line" ? _chunkTVQW26AVcjs.REFERENCE_LINE_PROPS : _chunkTVQW26AVcjs.REFERENCE_BAND_PROPS, required: what === "line" ? ["value"] : ["from", "to"], additionalProperties: false },
2061
+ inputSchema: { type: "object", properties: what === "line" ? _chunkGTF4RYXJcjs.REFERENCE_LINE_PROPS : _chunkGTF4RYXJcjs.REFERENCE_BAND_PROPS, required: what === "line" ? ["value"] : ["from", "to"], additionalProperties: false },
1925
2062
  annotations: { title: `Add a reference ${what}`, ...WRITE },
1926
2063
  handler: (args) => {
1927
2064
  const result = resolve(what === "line" ? controller.addReferenceLine(args) : controller.addReferenceBand(args));
@@ -1932,7 +2069,7 @@ function createChartToolProvider(controller, options = {}) {
1932
2069
  name: `update_chart_reference_${what}`,
1933
2070
  title: `Change a reference ${what}`,
1934
2071
  description: `Changes a reference ${what} by index (all-or-nothing); label, axis and color take null to remove them. Returns the ${what} as stored.`,
1935
- inputSchema: { type: "object", properties: { index: _chunkTVQW26AVcjs.REFERENCE_INDEX.call(void 0, Kind), ...what === "line" ? _chunkTVQW26AVcjs.REFERENCE_LINE_PATCH : _chunkTVQW26AVcjs.REFERENCE_BAND_PATCH }, required: ["index"], additionalProperties: false },
2072
+ inputSchema: { type: "object", properties: { index: _chunkGTF4RYXJcjs.REFERENCE_INDEX.call(void 0, Kind), ...what === "line" ? _chunkGTF4RYXJcjs.REFERENCE_LINE_PATCH : _chunkGTF4RYXJcjs.REFERENCE_BAND_PATCH }, required: ["index"], additionalProperties: false },
1936
2073
  annotations: { title: `Change a reference ${what}`, ...WRITE_IDEMPOTENT },
1937
2074
  handler: ({ index, ...patch }) => {
1938
2075
  if (!Object.keys(patch).length) fail2(`Nothing to change: pass at least one field besides index, e.g. {"index": ${index}, "label": "Target"}.`);
@@ -1944,7 +2081,7 @@ function createChartToolProvider(controller, options = {}) {
1944
2081
  name: `remove_chart_reference_${what}`,
1945
2082
  title: `Delete a reference ${what}`,
1946
2083
  description: `Deletes a reference ${what} by index; the ones after it move up one. Returns the reference ${what}s left.`,
1947
- inputSchema: { type: "object", properties: { index: _chunkTVQW26AVcjs.REFERENCE_INDEX.call(void 0, Kind) }, required: ["index"], additionalProperties: false },
2084
+ inputSchema: { type: "object", properties: { index: _chunkGTF4RYXJcjs.REFERENCE_INDEX.call(void 0, Kind) }, required: ["index"], additionalProperties: false },
1948
2085
  annotations: { title: `Delete a reference ${what}`, ...DESTRUCTIVE },
1949
2086
  handler: ({ index }) => {
1950
2087
  resolve(what === "line" ? controller.removeReferenceLine(index) : controller.removeReferenceBand(index));
@@ -1961,7 +2098,7 @@ function createChartToolProvider(controller, options = {}) {
1961
2098
  description: 'Pins a short label to one bar or point, with a leader line, to say why it matters ("Record quarter", "Launch"); label null or "" removes it. Bar, line, area, scatter and bubble charts; the point must have a value. Selects the point and returns the series id, category index and label.',
1962
2099
  inputSchema: {
1963
2100
  type: "object",
1964
- properties: { series: _chunkTVQW26AVcjs.SERIES_REF, category: _chunkTVQW26AVcjs.CATEGORY_REF, label: { type: ["string", "null"], description: "The label (keep it to a few words), or null to remove it." } },
2101
+ properties: { series: _chunkGTF4RYXJcjs.SERIES_REF, category: _chunkGTF4RYXJcjs.CATEGORY_REF, label: { type: ["string", "null"], description: "The label (keep it to a few words), or null to remove it." } },
1965
2102
  required: ["series", "category", "label"],
1966
2103
  additionalProperties: false
1967
2104
  },
@@ -1970,7 +2107,7 @@ function createChartToolProvider(controller, options = {}) {
1970
2107
  const s = seriesById(series);
1971
2108
  const index = categoryIndex(category);
1972
2109
  resolve(controller.setCallout(s.id, index, label));
1973
- return { series: s.id, index, category: spec().categories[index], label: _nullishCoalesce(_optionalChain([controller, 'access', _101 => _101.getSeries, 'call', _102 => _102(s.id), 'optionalAccess', _103 => _103.callouts, 'optionalAccess', _104 => _104[index]]), () => ( null)) };
2110
+ return { series: s.id, index, category: spec().categories[index], label: _nullishCoalesce(_optionalChain([controller, 'access', _104 => _104.getSeries, 'call', _105 => _105(s.id), 'optionalAccess', _106 => _106.callouts, 'optionalAccess', _107 => _107[index]]), () => ( null)) };
1974
2111
  }
1975
2112
  };
1976
2113
  const highlight = {
@@ -1994,7 +2131,7 @@ function createChartToolProvider(controller, options = {}) {
1994
2131
  name: "set_chart_tree",
1995
2132
  title: "Replace grouped data",
1996
2133
  description: `Replaces the chart's data with groups of items (a tree) for treemaps and sunbursts, as one undo step: items {"name", "value"} and groups {"name", "children"}, up to 6 levels, names unique among siblings. The top-level groups become the categories and their totals the first series, so other chart types draw the totals. [] goes back to plain data (the totals stay as values). Returns the tree, each group's total and the depth.`,
1997
- inputSchema: { type: "object", properties: { tree: { type: "array", items: { $ref: "#/$defs/chartTreeNode" }, description: "The top-level nodes; [] removes the grouping." } }, required: ["tree"], additionalProperties: false, $defs: _chunkTVQW26AVcjs.TREE_DEFS },
2134
+ inputSchema: { type: "object", properties: { tree: { type: "array", items: { $ref: "#/$defs/chartTreeNode" }, description: "The top-level nodes; [] removes the grouping." } }, required: ["tree"], additionalProperties: false, $defs: _chunkGTF4RYXJcjs.TREE_DEFS },
1998
2135
  annotations: { title: "Replace grouped data", ...WRITE_IDEMPOTENT },
1999
2136
  handler: ({ tree }) => {
2000
2137
  resolve(controller.setTree(tree));
@@ -2033,13 +2170,13 @@ function createChartToolProvider(controller, options = {}) {
2033
2170
  },
2034
2171
  required: ["node"],
2035
2172
  additionalProperties: false,
2036
- $defs: _chunkTVQW26AVcjs.TREE_DEFS
2173
+ $defs: _chunkGTF4RYXJcjs.TREE_DEFS
2037
2174
  },
2038
2175
  annotations: { title: "Add an item or group", ...WRITE },
2039
2176
  handler: ({ parent = [], node, at }) => {
2040
2177
  const result = resolve(controller.addTreeNode(parent, node, { at }));
2041
- const group = parent.length ? _chunkUVXTOZ2Bcjs.findChartTreeNode.call(void 0, spec().tree, parent) : null;
2042
- return { path: result.path, parentTotal: group ? _chunkUVXTOZ2Bcjs.chartTreeTotal.call(void 0, group) : spec().tree.reduce((t, n) => t + _chunkUVXTOZ2Bcjs.chartTreeTotal.call(void 0, n), 0) };
2178
+ const group = parent.length ? _chunkOUO3DSRTcjs.findChartTreeNode.call(void 0, spec().tree, parent) : null;
2179
+ return { path: result.path, parentTotal: group ? _chunkOUO3DSRTcjs.chartTreeTotal.call(void 0, group) : spec().tree.reduce((t, n) => t + _chunkOUO3DSRTcjs.chartTreeTotal.call(void 0, n), 0) };
2043
2180
  }
2044
2181
  };
2045
2182
  const updateTreeNode = {
@@ -2049,7 +2186,7 @@ function createChartToolProvider(controller, options = {}) {
2049
2186
  inputSchema: {
2050
2187
  type: "object",
2051
2188
  properties: {
2052
- path: _chunkTVQW26AVcjs.TREE_PATH,
2189
+ path: _chunkGTF4RYXJcjs.TREE_PATH,
2053
2190
  name: { type: "string", description: "New name (unique among its siblings)." },
2054
2191
  value: { type: "number", minimum: 0, description: "Items only: the new amount." },
2055
2192
  color: { type: ["string", "null"], description: "CSS colour, or null for the palette colour." }
@@ -2061,14 +2198,14 @@ function createChartToolProvider(controller, options = {}) {
2061
2198
  handler: ({ path, ...patch }) => {
2062
2199
  if (!Object.keys(patch).length) fail2("Nothing to change: pass name, value or color with the path.");
2063
2200
  const result = resolve(controller.updateTreeNode(path, patch));
2064
- return { path: result.path, node: _chunkUVXTOZ2Bcjs.findChartTreeNode.call(void 0, spec().tree, result.path) };
2201
+ return { path: result.path, node: _chunkOUO3DSRTcjs.findChartTreeNode.call(void 0, spec().tree, result.path) };
2065
2202
  }
2066
2203
  };
2067
2204
  const removeTreeNode = {
2068
2205
  name: "remove_chart_tree_node",
2069
2206
  title: "Delete an item or group",
2070
2207
  description: "Deletes a node of the grouped data with everything under it (a group left empty becomes an item with value 0). Returns the group totals left.",
2071
- inputSchema: { type: "object", properties: { path: _chunkTVQW26AVcjs.TREE_PATH }, required: ["path"], additionalProperties: false },
2208
+ inputSchema: { type: "object", properties: { path: _chunkGTF4RYXJcjs.TREE_PATH }, required: ["path"], additionalProperties: false },
2072
2209
  annotations: { title: "Delete an item or group", ...DESTRUCTIVE },
2073
2210
  handler: ({ path }) => {
2074
2211
  resolve(controller.removeTreeNode(path));
@@ -2082,7 +2219,7 @@ function createChartToolProvider(controller, options = {}) {
2082
2219
  inputSchema: {
2083
2220
  type: "object",
2084
2221
  properties: {
2085
- links: { type: "array", items: { type: "object", properties: _chunkTVQW26AVcjs.LINK_PROPS, required: ["source", "target", "value"], additionalProperties: false }, description: "All the flows; [] removes them." },
2222
+ links: { type: "array", items: { type: "object", properties: _chunkGTF4RYXJcjs.LINK_PROPS, required: ["source", "target", "value"], additionalProperties: false }, description: "All the flows; [] removes them." },
2086
2223
  nodes: { type: "array", items: { type: "string" }, description: "Node names in stacking order (default: as the flows first name them)." }
2087
2224
  },
2088
2225
  required: ["links"],
@@ -2117,12 +2254,12 @@ function createChartToolProvider(controller, options = {}) {
2117
2254
  name: "add_chart_link",
2118
2255
  title: "Add a flow",
2119
2256
  description: "Adds a flow from one node to another (new names add nodes). Refused when the pair exists already or it would close a loop. Returns its index and the throughput of its two nodes.",
2120
- inputSchema: { type: "object", properties: _chunkTVQW26AVcjs.LINK_PROPS, required: ["source", "target", "value"], additionalProperties: false },
2257
+ inputSchema: { type: "object", properties: _chunkGTF4RYXJcjs.LINK_PROPS, required: ["source", "target", "value"], additionalProperties: false },
2121
2258
  annotations: { title: "Add a flow", ...WRITE },
2122
2259
  handler: (args) => {
2123
2260
  const result = resolve(controller.addLink(args));
2124
2261
  const s = spec();
2125
- const through = (n) => _nullishCoalesce(_optionalChain([s, 'access', _105 => _105.series, 'access', _106 => _106[0], 'optionalAccess', _107 => _107.values, 'access', _108 => _108[s.sankeyNodes.indexOf(n)]]), () => ( 0));
2262
+ const through = (n) => _nullishCoalesce(_optionalChain([s, 'access', _108 => _108.series, 'access', _109 => _109[0], 'optionalAccess', _110 => _110.values, 'access', _111 => _111[s.sankeyNodes.indexOf(n)]]), () => ( 0));
2126
2263
  const link = s.links[result.index];
2127
2264
  return { index: result.index, link, nodes: [link.source, link.target].map((name) => ({ name, value: through(name) })) };
2128
2265
  }
@@ -2131,7 +2268,7 @@ function createChartToolProvider(controller, options = {}) {
2131
2268
  name: "update_chart_link",
2132
2269
  title: "Change a flow",
2133
2270
  description: "Changes a flow by index: its source, target, value or colour (null goes back to the default). Checked like a new flow. Returns the flow as stored.",
2134
- inputSchema: { type: "object", properties: { index: _chunkTVQW26AVcjs.LINK_INDEX, ..._chunkTVQW26AVcjs.LINK_PROPS, color: { type: ["string", "null"], description: "CSS colour, or null for the default." } }, required: ["index"], additionalProperties: false },
2271
+ inputSchema: { type: "object", properties: { index: _chunkGTF4RYXJcjs.LINK_INDEX, ..._chunkGTF4RYXJcjs.LINK_PROPS, color: { type: ["string", "null"], description: "CSS colour, or null for the default." } }, required: ["index"], additionalProperties: false },
2135
2272
  annotations: { title: "Change a flow", ...WRITE_IDEMPOTENT },
2136
2273
  handler: ({ index, ...patch }) => {
2137
2274
  if (!Object.keys(patch).length) fail2(`Nothing to change: pass source, target, value or color with the index, e.g. {"index": ${index}, "value": 40}.`);
@@ -2143,13 +2280,37 @@ function createChartToolProvider(controller, options = {}) {
2143
2280
  name: "remove_chart_link",
2144
2281
  title: "Delete a flow",
2145
2282
  description: "Deletes a flow by index; the ones after it move up one, and nodes no flow uses any more go. Returns the flows left.",
2146
- inputSchema: { type: "object", properties: { index: _chunkTVQW26AVcjs.LINK_INDEX }, required: ["index"], additionalProperties: false },
2283
+ inputSchema: { type: "object", properties: { index: _chunkGTF4RYXJcjs.LINK_INDEX }, required: ["index"], additionalProperties: false },
2147
2284
  annotations: { title: "Delete a flow", ...DESTRUCTIVE },
2148
2285
  handler: ({ index }) => {
2149
2286
  resolve(controller.removeLink(index));
2150
2287
  return { links: spec().links };
2151
2288
  }
2152
2289
  };
2290
+ const setRaceFrame = {
2291
+ name: "set_chart_race_frame",
2292
+ title: "Show a bar race moment",
2293
+ description: "Shows the bar race at a time point (or between two), and stops playback. This is view state like the selection: it is not an undo step and is not saved in the chart. Returns the moment and the ranking shown.",
2294
+ inputSchema: { type: "object", properties: { time: { ..._chunkGTF4RYXJcjs.RACE_TIME, type: ["string", "number", "null"], description: `${_chunkGTF4RYXJcjs.RACE_TIME.description} null shows the last time point.` } }, required: ["time"], additionalProperties: false },
2295
+ annotations: { title: "Show a bar race moment", ...WRITE_IDEMPOTENT },
2296
+ handler: ({ time }) => {
2297
+ const frame = time === null ? null : raceFrameOf(time);
2298
+ resolve(controller.setRaceFrame(frame));
2299
+ return raceAt(frame);
2300
+ }
2301
+ };
2302
+ const playRace = {
2303
+ name: "play_chart_race",
2304
+ title: "Play the bar race",
2305
+ description: "Starts playing the bar race for the user from the moment shown (from the start when it is at the end), one time point every msPerStep ms, and returns at once. set_chart_race_frame stops it. Nothing in the chart changes.",
2306
+ inputSchema: { type: "object", properties: { msPerStep: { type: "number", minimum: 50, maximum: 1e4, description: "Milliseconds per time point (default 1000)." } }, additionalProperties: false },
2307
+ annotations: { title: "Play the bar race", ...WRITE },
2308
+ handler: ({ msPerStep }) => {
2309
+ resolve(controller.playRace({ msPerStep }));
2310
+ const n = spec().categories.length;
2311
+ return { playing: true, from: _nullishCoalesce(controller.getState().raceFrame, () => ( 0)), durationMs: Math.round((n - 1 - (_nullishCoalesce(controller.getState().raceFrame, () => ( 0)))) * (_nullishCoalesce(msPerStep, () => ( 1e3)))) };
2312
+ }
2313
+ };
2153
2314
  const applyPreset = {
2154
2315
  name: "apply_chart_preset",
2155
2316
  title: "Apply a chart style",
@@ -2157,8 +2318,8 @@ function createChartToolProvider(controller, options = {}) {
2157
2318
  inputSchema: {
2158
2319
  type: "object",
2159
2320
  properties: {
2160
- layout: { type: "string", enum: _chunkIMRXC7OAcjs.CHART_LAYOUT_PRESETS.map((p) => p.id), description: "Quick layout id." },
2161
- colors: { type: "string", enum: _chunkIMRXC7OAcjs.CHART_COLOR_SCHEMES.map((p) => p.id), description: "Colour scheme id." }
2321
+ layout: { type: "string", enum: _chunk2F4GAZL5cjs.CHART_LAYOUT_PRESETS.map((p) => p.id), description: "Quick layout id." },
2322
+ colors: { type: "string", enum: _chunk2F4GAZL5cjs.CHART_COLOR_SCHEMES.map((p) => p.id), description: "Colour scheme id." }
2162
2323
  },
2163
2324
  additionalProperties: false
2164
2325
  },
@@ -2187,8 +2348,8 @@ function createChartToolProvider(controller, options = {}) {
2187
2348
  type: "object",
2188
2349
  properties: {
2189
2350
  kind: { type: "string", enum: ["none", "chart", "title", "subtitle", "legend", "axis", "series", "point", "category", "trendline"], description: "What to select." },
2190
- series: { ..._chunkTVQW26AVcjs.SERIES_REF, description: "Series id or name (series, point, trendline)." },
2191
- category: { ..._chunkTVQW26AVcjs.CATEGORY_REF, description: "Category index or label (point, category)." },
2351
+ series: { ..._chunkGTF4RYXJcjs.SERIES_REF, description: "Series id or name (series, point, trendline)." },
2352
+ category: { ..._chunkGTF4RYXJcjs.CATEGORY_REF, description: "Category index or label (point, category)." },
2192
2353
  axis: { type: "string", enum: ["x", "y", "y2"], description: "Axis (axis)." },
2193
2354
  index: { type: "integer", minimum: 0, description: "Trendline index (trendline)." }
2194
2355
  },
@@ -2246,20 +2407,20 @@ function createChartToolProvider(controller, options = {}) {
2246
2407
  to: { type: "object", description: "End, as fractions of the chart.", properties: { x: { type: "number", minimum: 0, maximum: 1, description: "Fraction of the width." }, y: { type: "number", minimum: 0, maximum: 1, description: "Fraction of the height." } }, required: ["x", "y"], additionalProperties: false },
2247
2408
  fine: { type: "boolean", description: "Move a tenth as far (Alt)." },
2248
2409
  lockAxis: { type: "boolean", description: "Scatter charts: change only the axis moved along most (Shift)." },
2249
- width: _chunkTVQW26AVcjs.WIDTH,
2250
- height: _chunkTVQW26AVcjs.HEIGHT
2410
+ width: _chunkGTF4RYXJcjs.WIDTH,
2411
+ height: _chunkGTF4RYXJcjs.HEIGHT
2251
2412
  },
2252
2413
  required: ["from", "to"],
2253
2414
  additionalProperties: false
2254
2415
  },
2255
2416
  annotations: { title: "Drag a chart point", ...WRITE },
2256
2417
  handler: ({ from, to, fine, lockAxis, width = size.width, height = size.height }) => {
2257
- const scene = _chunkQO2T6KA5cjs.layoutChart.call(void 0, controller.toJSON(), { width, height });
2418
+ const scene = _chunkWOIXNDHVcjs.layoutChart.call(void 0, controller.toJSON(), { width, height });
2258
2419
  const start = { x: from.x * width, y: from.y * height };
2259
2420
  const target = chartHitTest(scene, start);
2260
- if (_optionalChain([target, 'optionalAccess', _109 => _109.kind]) !== "point") fail2(`There is no bar or point at (${from.x}, ${from.y}); ${target ? `that is the ${target.kind}` : "that is outside the chart"}. Use render_chart to find marks.`);
2421
+ if (_optionalChain([target, 'optionalAccess', _112 => _112.kind]) !== "point") fail2(`There is no bar or point at (${from.x}, ${from.y}); ${target ? `that is the ${target.kind}` : "that is outside the chart"}. Use render_chart to find marks.`);
2261
2422
  const t = target;
2262
- const before = _nullishCoalesce(_optionalChain([controller, 'access', _110 => _110.getSeries, 'call', _111 => _111(t.seriesId), 'optionalAccess', _112 => _112.values, 'access', _113 => _113[t.index]]), () => ( null));
2423
+ const before = _nullishCoalesce(_optionalChain([controller, 'access', _113 => _113.getSeries, 'call', _114 => _114(t.seriesId), 'optionalAccess', _115 => _115.values, 'access', _116 => _116[t.index]]), () => ( null));
2263
2424
  const session = startChartPointDrag(controller, scene, t, start);
2264
2425
  if (!session) fail2("That point cannot be dragged here (percent-stacked charts, pies and gaps cannot be dragged).");
2265
2426
  session.move({ x: to.x * width, y: to.y * height }, { fine, lockAxis });
@@ -2284,10 +2445,10 @@ function createChartToolProvider(controller, options = {}) {
2284
2445
  },
2285
2446
  annotations: { title: "Press a key on the chart", ...DESTRUCTIVE },
2286
2447
  handler: ({ key: k, shift, alt }) => {
2287
- const scene = _chunkQO2T6KA5cjs.layoutChart.call(void 0, controller.toJSON(), size);
2448
+ const scene = _chunkWOIXNDHVcjs.layoutChart.call(void 0, controller.toJSON(), size);
2288
2449
  const used = handleChartKey(controller, scene, { key: k, shiftKey: shift, altKey: alt });
2289
2450
  const sel = controller.getState().selection;
2290
- const value = _optionalChain([sel, 'optionalAccess', _114 => _114.kind]) === "point" ? _nullishCoalesce(_optionalChain([controller, 'access', _115 => _115.getSeries, 'call', _116 => _116(sel.seriesId), 'optionalAccess', _117 => _117.values, 'access', _118 => _118[sel.index]]), () => ( null)) : void 0;
2451
+ const value = _optionalChain([sel, 'optionalAccess', _117 => _117.kind]) === "point" ? _nullishCoalesce(_optionalChain([controller, 'access', _118 => _118.getSeries, 'call', _119 => _119(sel.seriesId), 'optionalAccess', _120 => _120.values, 'access', _121 => _121[sel.index]]), () => ( null)) : void 0;
2291
2452
  return { used, selection: sel, ...value !== void 0 ? { value } : {} };
2292
2453
  }
2293
2454
  };
@@ -2315,7 +2476,7 @@ function createChartToolProvider(controller, options = {}) {
2315
2476
  return { redone, ...redone ? { label } : {} };
2316
2477
  }
2317
2478
  };
2318
- const reads = [getChart, renderChart, checkColors, recommend, getTrendline, listPresets, exportMermaid, exportOoxml];
2479
+ const reads = [getChart, renderChart, checkColors, recommend, getTrendline, raceRanking, mapRegions, listPresets, exportMermaid, exportOoxml];
2319
2480
  const writes = [
2320
2481
  updateChart,
2321
2482
  setData,
@@ -2347,6 +2508,8 @@ function createChartToolProvider(controller, options = {}) {
2347
2508
  addLink,
2348
2509
  updateLink,
2349
2510
  removeLink,
2511
+ setRaceFrame,
2512
+ playRace,
2350
2513
  applyPreset,
2351
2514
  transpose,
2352
2515
  select,
@@ -2359,7 +2522,7 @@ function createChartToolProvider(controller, options = {}) {
2359
2522
  id: _nullishCoalesce(options.id, () => ( "chart")),
2360
2523
  namespace: options.namespace,
2361
2524
  title: "Chart editor",
2362
- description: "One chart: its spec, data and values, series and categories, trendlines, reference lines and bands, callouts, highlight, grouped data, flows and presets, CSV, Mermaid and OOXML import, rendering and colour checks.",
2525
+ description: "One chart: its spec, data and values, series and categories, trendlines, reference lines and bands, callouts, highlight, grouped data, flows, bar race playback and presets, CSV, Mermaid and OOXML import, rendering and colour checks.",
2363
2526
  skill: "pixerate-chart",
2364
2527
  tools: () => {
2365
2528
  if (readOnlyReason()) return reads;
@@ -2433,12 +2596,12 @@ var ChartStream = (_class = class {
2433
2596
  if (format === "json") {
2434
2597
  const value = complete ? safeParse(text) : parsePartialChartJson(text);
2435
2598
  if (value !== void 0) {
2436
- const read = _chunkUVXTOZ2Bcjs.normalizeChartSpec.call(void 0, value);
2599
+ const read = _chunkOUO3DSRTcjs.normalizeChartSpec.call(void 0, value);
2437
2600
  spec = read.spec;
2438
2601
  issues = complete ? read.issues : [];
2439
2602
  }
2440
2603
  } else {
2441
- const read = _chunkIMRXC7OAcjs.chartFromMermaid.call(void 0, text, { partial: !complete });
2604
+ const read = _chunk2F4GAZL5cjs.chartFromMermaid.call(void 0, text, { partial: !complete });
2442
2605
  if (read.family) {
2443
2606
  spec = read.spec;
2444
2607
  issues = complete ? read.issues : [];
@@ -2535,7 +2698,7 @@ function elements(root, localName) {
2535
2698
  }
2536
2699
  function relId(el, localName = "id") {
2537
2700
  for (const a of Array.from(el.attributes)) {
2538
- if (a.localName === localName && (_optionalChain([a, 'access', _119 => _119.namespaceURI, 'optionalAccess', _120 => _120.includes, 'call', _121 => _121("relationships")]) || a.prefix === "r")) return a.value;
2701
+ if (a.localName === localName && (_optionalChain([a, 'access', _122 => _122.namespaceURI, 'optionalAccess', _123 => _123.includes, 'call', _124 => _124("relationships")]) || a.prefix === "r")) return a.value;
2539
2702
  }
2540
2703
  return void 0;
2541
2704
  }
@@ -2554,17 +2717,17 @@ async function readRels(r, partPath) {
2554
2717
  const id = rel.getAttribute("Id");
2555
2718
  if (!id) continue;
2556
2719
  const target = _nullishCoalesce(rel.getAttribute("Target"), () => ( ""));
2557
- const external = _optionalChain([rel, 'access', _122 => _122.getAttribute, 'call', _123 => _123("TargetMode"), 'optionalAccess', _124 => _124.toLowerCase, 'call', _125 => _125()]) === "external";
2720
+ const external = _optionalChain([rel, 'access', _125 => _125.getAttribute, 'call', _126 => _126("TargetMode"), 'optionalAccess', _127 => _127.toLowerCase, 'call', _128 => _128()]) === "external";
2558
2721
  rels.set(id, { type: _nullishCoalesce(rel.getAttribute("Type"), () => ( "")), target: external ? target : resolvePartPath(dirname(partPath), target), external });
2559
2722
  }
2560
2723
  return rels;
2561
2724
  }
2562
- var isChartRef = (el) => el.localName === "chart" && (el.namespaceURI === _chunkQ25WAFTDcjs.CHART_OOXML_NS || el.namespaceURI === STRICT_CHART_NS || el.namespaceURI === CHARTEX_NS);
2725
+ var isChartRef = (el) => el.localName === "chart" && (el.namespaceURI === _chunkVKHJJUBKcjs.CHART_OOXML_NS || el.namespaceURI === STRICT_CHART_NS || el.namespaceURI === CHARTEX_NS);
2563
2726
  function frameName(ref) {
2564
2727
  for (let el = ref.parentElement; el; el = el.parentElement) {
2565
2728
  if (el.localName === "graphicFrame") {
2566
2729
  const nv = elements(el, "cNvPr")[0];
2567
- return _optionalChain([nv, 'optionalAccess', _126 => _126.getAttribute, 'call', _127 => _127("name")]) || void 0;
2730
+ return _optionalChain([nv, 'optionalAccess', _129 => _129.getAttribute, 'call', _130 => _130("name")]) || void 0;
2568
2731
  }
2569
2732
  }
2570
2733
  return void 0;
@@ -2578,7 +2741,7 @@ async function chartsInPart(r, root, rels, place) {
2578
2741
  const entry = r.zip.get(rel.target);
2579
2742
  if (!entry) continue;
2580
2743
  r.seen.add(rel.target);
2581
- const read = _chunkQ25WAFTDcjs.chartFromOoxml.call(void 0, await r.zip.readText(entry), { DOMParser: r.Parser });
2744
+ const read = _chunkVKHJJUBKcjs.chartFromOoxml.call(void 0, await r.zip.readText(entry), { DOMParser: r.Parser });
2582
2745
  const name = frameName(ref);
2583
2746
  r.charts.push({
2584
2747
  id: `chart-${r.charts.length + 1}`,
@@ -2600,8 +2763,8 @@ function columnName(index) {
2600
2763
  return name;
2601
2764
  }
2602
2765
  function anchorCell(marker) {
2603
- const col = Number(_optionalChain([firstChild, 'call', _128 => _128(marker, "col"), 'optionalAccess', _129 => _129.textContent]));
2604
- const row = Number(_optionalChain([firstChild, 'call', _130 => _130(marker, "row"), 'optionalAccess', _131 => _131.textContent]));
2766
+ const col = Number(_optionalChain([firstChild, 'call', _131 => _131(marker, "col"), 'optionalAccess', _132 => _132.textContent]));
2767
+ const row = Number(_optionalChain([firstChild, 'call', _133 => _133(marker, "row"), 'optionalAccess', _134 => _134.textContent]));
2605
2768
  return Number.isInteger(col) && Number.isInteger(row) && col >= 0 && row >= 0 ? `${columnName(col)}${row + 1}` : void 0;
2606
2769
  }
2607
2770
  function drawingPlace(ref) {
@@ -2764,7 +2927,7 @@ function createOfficeChartToolProvider(options = {}) {
2764
2927
  description: "Lists the Office files the user opened that charts can be read from. Returns their names and sizes in bytes.",
2765
2928
  inputSchema: { type: "object", properties: {}, additionalProperties: false },
2766
2929
  annotations: { title: "List open files", ...READ2 },
2767
- handler: () => ({ files: (_nullishCoalesce(_optionalChain([options, 'access', _132 => _132.files, 'optionalCall', _133 => _133()]), () => ( []))).map((f) => ({ name: f.name, bytes: f.data.byteLength })) })
2930
+ handler: () => ({ files: (_nullishCoalesce(_optionalChain([options, 'access', _135 => _135.files, 'optionalCall', _136 => _136()]), () => ( []))).map((f) => ({ name: f.name, bytes: f.data.byteLength })) })
2768
2931
  };
2769
2932
  const listCharts = {
2770
2933
  name: "list_file_charts",
@@ -2849,17 +3012,17 @@ var COLOR = { type: "string", minLength: 1, description: 'A CSS colour (hex or r
2849
3012
  function chartColors(spec) {
2850
3013
  const out = [];
2851
3014
  const visible = spec.series.map((s, i) => ({ s, i })).filter(({ s }) => !s.hidden);
2852
- if (_chunkUVXTOZ2Bcjs.chartColorsByCategory.call(void 0, spec.type)) {
3015
+ if (_chunkOUO3DSRTcjs.chartColorsByCategory.call(void 0, spec.type)) {
2853
3016
  const first = visible[0];
2854
3017
  spec.categories.forEach((name, index) => {
2855
- const color = _optionalChain([first, 'optionalAccess', _134 => _134.s, 'access', _135 => _135.pointColors, 'optionalAccess', _136 => _136[index]]) || _chunkUVXTOZ2Bcjs.chartSliceColor.call(void 0, spec, index);
3018
+ const color = _optionalChain([first, 'optionalAccess', _137 => _137.s, 'access', _138 => _138.pointColors, 'optionalAccess', _139 => _139[index]]) || _chunkOUO3DSRTcjs.chartSliceColor.call(void 0, spec, index);
2856
3019
  out.push({ color, label: `Slice "${name}"`, target: first ? { kind: "point", seriesId: first.s.id, index } : { kind: "category", index } });
2857
3020
  });
2858
3021
  return out;
2859
3022
  }
2860
3023
  for (const { s, i } of visible) {
2861
- out.push({ color: _chunkUVXTOZ2Bcjs.chartSeriesColor.call(void 0, spec, i), label: `Series "${s.name}"`, target: { kind: "series", seriesId: s.id } });
2862
- _optionalChain([s, 'access', _137 => _137.pointColors, 'optionalAccess', _138 => _138.forEach, 'call', _139 => _139((c, index) => {
3024
+ out.push({ color: _chunkOUO3DSRTcjs.chartSeriesColor.call(void 0, spec, i), label: `Series "${s.name}"`, target: { kind: "series", seriesId: s.id } });
3025
+ _optionalChain([s, 'access', _140 => _140.pointColors, 'optionalAccess', _141 => _141.forEach, 'call', _142 => _142((c, index) => {
2863
3026
  if (c) out.push({ color: c, label: `Point ${index + 1} of "${s.name}"`, target: { kind: "point", seriesId: s.id, index } });
2864
3027
  })]);
2865
3028
  }
@@ -2867,7 +3030,7 @@ function chartColors(spec) {
2867
3030
  }
2868
3031
  var paletteOf = (profile) => {
2869
3032
  const palette = profile.palette;
2870
- if (!_optionalChain([palette, 'optionalAccess', _140 => _140.length])) throw new Error("the profile has no palette.");
3033
+ if (!_optionalChain([palette, 'optionalAccess', _143 => _143.length])) throw new Error("the profile has no palette.");
2871
3034
  return palette;
2872
3035
  };
2873
3036
  var paletteOnly = {
@@ -2880,18 +3043,18 @@ var paletteOnly = {
2880
3043
  },
2881
3044
  run(spec, profile, { tolerance = 0.02 }) {
2882
3045
  const palette = paletteOf(profile);
2883
- const allowed = palette.flatMap((c) => _chunkUVXTOZ2Bcjs.CHART_PALETTE_SHADES.map((t) => _chunkUVXTOZ2Bcjs.shadeChartColor.call(void 0, c, t))).map((c) => ({ c, rgb: _chunkUVXTOZ2Bcjs.parseChartColor.call(void 0, c) }));
3046
+ const allowed = palette.flatMap((c) => _chunkOUO3DSRTcjs.CHART_PALETTE_SHADES.map((t) => _chunkOUO3DSRTcjs.shadeChartColor.call(void 0, c, t))).map((c) => ({ c, rgb: _chunkOUO3DSRTcjs.parseChartColor.call(void 0, c) }));
2884
3047
  return chartColors(spec).flatMap(({ color, label, target }) => {
2885
- const rgb = _chunkUVXTOZ2Bcjs.parseChartColor.call(void 0, color);
3048
+ const rgb = _chunkOUO3DSRTcjs.parseChartColor.call(void 0, color);
2886
3049
  if (!rgb) return [];
2887
3050
  let best = { c: palette[0], d: Infinity };
2888
3051
  for (const a of allowed) {
2889
3052
  if (!a.rgb) continue;
2890
- const d = _chunkUVXTOZ2Bcjs.chartColorDistance.call(void 0, rgb, a.rgb);
3053
+ const d = _chunkOUO3DSRTcjs.chartColorDistance.call(void 0, rgb, a.rgb);
2891
3054
  if (d < best.d) best = { c: a.c, d };
2892
3055
  }
2893
3056
  if (best.d <= tolerance) return [];
2894
- const nearest = palette.map((c) => ({ c, d: _chunkUVXTOZ2Bcjs.parseChartColor.call(void 0, c) ? _chunkUVXTOZ2Bcjs.chartColorDistance.call(void 0, rgb, _chunkUVXTOZ2Bcjs.parseChartColor.call(void 0, c)) : Infinity })).sort((a, b) => a.d - b.d)[0].c;
3057
+ const nearest = palette.map((c) => ({ c, d: _chunkOUO3DSRTcjs.parseChartColor.call(void 0, c) ? _chunkOUO3DSRTcjs.chartColorDistance.call(void 0, rgb, _chunkOUO3DSRTcjs.parseChartColor.call(void 0, c)) : Infinity })).sort((a, b) => a.d - b.d)[0].c;
2895
3058
  return [{ severity: "error", message: `${label} uses ${color}, which is not in the house palette; use ${nearest} or another palette colour (${palette.join(", ")}).`, target }];
2896
3059
  });
2897
3060
  }
@@ -2905,8 +3068,8 @@ var distinguishable = {
2905
3068
  additionalProperties: false
2906
3069
  },
2907
3070
  run(spec, _profile, { minDistance = 0.08 }) {
2908
- const colors = chartColors(spec).filter((c) => c.target.kind !== "point" || _chunkUVXTOZ2Bcjs.chartColorsByCategory.call(void 0, spec.type));
2909
- const result = _chunkUVXTOZ2Bcjs.checkChartColors.call(void 0, colors.map((c) => c.color), { minDistance, minContrast: 0 });
3071
+ const colors = chartColors(spec).filter((c) => c.target.kind !== "point" || _chunkOUO3DSRTcjs.chartColorsByCategory.call(void 0, spec.type));
3072
+ const result = _chunkOUO3DSRTcjs.checkChartColors.call(void 0, colors.map((c) => c.color), { minDistance, minContrast: 0 });
2910
3073
  const findings = [];
2911
3074
  for (const [vision, pair] of Object.entries(result.closest)) {
2912
3075
  if (!pair || pair.distance >= minDistance) continue;
@@ -2932,7 +3095,7 @@ var minContrast = {
2932
3095
  const theme = _nullishCoalesce(profile.theme, () => ( {}));
2933
3096
  const background = theme.background && theme.background !== "transparent" ? theme.background : _nullishCoalesce(theme.surface, () => ( "#ffffff"));
2934
3097
  return chartColors(spec).flatMap(({ color, label, target }) => {
2935
- const r = _chunkUVXTOZ2Bcjs.chartContrastRatio.call(void 0, color, background);
3098
+ const r = _chunkOUO3DSRTcjs.chartContrastRatio.call(void 0, color, background);
2936
3099
  if (r === null || r >= ratio) return [];
2937
3100
  return [{ severity: "warning", message: `${label} (${color}) has contrast ${Math.round(r * 100) / 100}:1 against the background ${background}; want at least ${ratio}:1, so use a darker or lighter palette colour.`, target }];
2938
3101
  });
@@ -2961,8 +3124,8 @@ var chartStyleDomain = {
2961
3124
  type: "object",
2962
3125
  properties: {
2963
3126
  palette: { type: "array", items: COLOR, minItems: 1, description: "Series colours in order." },
2964
- colorSchemes: { type: "array", items: { type: "string", enum: _chunkIMRXC7OAcjs.CHART_COLOR_SCHEMES.map((s) => s.id) }, description: "Colour scheme ids allowed besides the palette (empty: none)." },
2965
- layouts: { type: "array", items: { type: "string", enum: _chunkIMRXC7OAcjs.CHART_LAYOUT_PRESETS.map((p) => p.id) }, description: "Layout preset ids allowed." },
3127
+ colorSchemes: { type: "array", items: { type: "string", enum: _chunk2F4GAZL5cjs.CHART_COLOR_SCHEMES.map((s) => s.id) }, description: "Colour scheme ids allowed besides the palette (empty: none)." },
3128
+ layouts: { type: "array", items: { type: "string", enum: _chunk2F4GAZL5cjs.CHART_LAYOUT_PRESETS.map((p) => p.id) }, description: "Layout preset ids allowed." },
2966
3129
  theme: {
2967
3130
  type: "object",
2968
3131
  properties: {
@@ -3001,7 +3164,7 @@ var chartStyleDomain = {
3001
3164
  };
3002
3165
  function chartStylePatch(profile) {
3003
3166
  const p = profile;
3004
- return { ..._nullishCoalesce(p.defaults, () => ( {})), ..._optionalChain([p, 'access', _141 => _141.palette, 'optionalAccess', _142 => _142.length]) ? { palette: [...p.palette] } : {} };
3167
+ return { ..._nullishCoalesce(p.defaults, () => ( {})), ..._optionalChain([p, 'access', _144 => _144.palette, 'optionalAccess', _145 => _145.length]) ? { palette: [...p.palette] } : {} };
3005
3168
  }
3006
3169
  function createChartStyleToolProvider(controller, styles, options = {}) {
3007
3170
  if (!styles.domains.some((d) => d.id === "chart")) throw new Error('The style resolver has no "chart" domain; add chartStyleDomain to its domains.');
@@ -3234,4 +3397,14 @@ function createChartStyleToolProvider(controller, styles, options = {}) {
3234
3397
 
3235
3398
 
3236
3399
 
3237
- exports.CHART_AXIS_KINDS = _chunkUVXTOZ2Bcjs.CHART_AXIS_KINDS; exports.CHART_AXIS_SCALES = _chunkUVXTOZ2Bcjs.CHART_AXIS_SCALES; exports.CHART_COLOR_SCHEMES = _chunkIMRXC7OAcjs.CHART_COLOR_SCHEMES; exports.CHART_CURVES = _chunkUVXTOZ2Bcjs.CHART_CURVES; exports.CHART_DATE_STEPS = _chunkQO2T6KA5cjs.CHART_DATE_STEPS; exports.CHART_ERROR_BAR_DIRECTIONS = _chunkUVXTOZ2Bcjs.CHART_ERROR_BAR_DIRECTIONS; exports.CHART_ERROR_BAR_LABELS = _chunkUVXTOZ2Bcjs.CHART_ERROR_BAR_LABELS; exports.CHART_ERROR_BAR_TYPES = _chunkUVXTOZ2Bcjs.CHART_ERROR_BAR_TYPES; exports.CHART_LABEL_POSITIONS = _chunkUVXTOZ2Bcjs.CHART_LABEL_POSITIONS; exports.CHART_LAYOUT_PRESETS = _chunkIMRXC7OAcjs.CHART_LAYOUT_PRESETS; exports.CHART_LEGEND_POSITIONS = _chunkUVXTOZ2Bcjs.CHART_LEGEND_POSITIONS; exports.CHART_LIKERT_NEUTRALS = _chunkUVXTOZ2Bcjs.CHART_LIKERT_NEUTRALS; exports.CHART_LIKERT_SORTS = _chunkUVXTOZ2Bcjs.CHART_LIKERT_SORTS; exports.CHART_MARKERS = _chunkUVXTOZ2Bcjs.CHART_MARKERS; exports.CHART_MERMAID_META_PREFIX = _chunkIMRXC7OAcjs.CHART_MERMAID_META_PREFIX; exports.CHART_NUMBER_STYLES = _chunkUVXTOZ2Bcjs.CHART_NUMBER_STYLES; exports.CHART_OOXML_CONTENT_TYPE = _chunkQ25WAFTDcjs.CHART_OOXML_CONTENT_TYPE; exports.CHART_OOXML_NS = _chunkQ25WAFTDcjs.CHART_OOXML_NS; exports.CHART_OOXML_RELATIONSHIP = _chunkQ25WAFTDcjs.CHART_OOXML_RELATIONSHIP; exports.CHART_ORIENTATIONS = _chunkUVXTOZ2Bcjs.CHART_ORIENTATIONS; exports.CHART_PALETTE_SHADES = _chunkUVXTOZ2Bcjs.CHART_PALETTE_SHADES; exports.CHART_PRESENCE_COLORS = CHART_PRESENCE_COLORS; exports.CHART_RADAR_GRATICULES = _chunkUVXTOZ2Bcjs.CHART_RADAR_GRATICULES; exports.CHART_RASTER_MAX_SIZE = CHART_RASTER_MAX_SIZE; exports.CHART_REFERENCE_AXES = _chunkUVXTOZ2Bcjs.CHART_REFERENCE_AXES; exports.CHART_SANKEY_LINK_COLORS = _chunkUVXTOZ2Bcjs.CHART_SANKEY_LINK_COLORS; exports.CHART_SERIES_TYPES = _chunkUVXTOZ2Bcjs.CHART_SERIES_TYPES; exports.CHART_STACKINGS = _chunkUVXTOZ2Bcjs.CHART_STACKINGS; exports.CHART_TRENDLINE_TYPES = _chunkUVXTOZ2Bcjs.CHART_TRENDLINE_TYPES; exports.CHART_TYPES = _chunkUVXTOZ2Bcjs.CHART_TYPES; exports.CHART_TYPE_LABELS = _chunkUVXTOZ2Bcjs.CHART_TYPE_LABELS; exports.CSS_VARIABLE_CHART_THEME = _chunkUVXTOZ2Bcjs.CSS_VARIABLE_CHART_THEME; exports.ChartController = _chunkIMRXC7OAcjs.ChartController; exports.ChartDirector = ChartDirector; exports.ChartPresence = ChartPresence; exports.ChartStream = ChartStream; exports.DEFAULT_CHART_PALETTE = _chunkUVXTOZ2Bcjs.DEFAULT_CHART_PALETTE; exports.DEFAULT_CHART_THEME = _chunkUVXTOZ2Bcjs.DEFAULT_CHART_THEME; exports.MAX_CHART_DATA_LABELS = _chunkQO2T6KA5cjs.MAX_CHART_DATA_LABELS; exports.MAX_CHART_LINE_POINTS = _chunkQO2T6KA5cjs.MAX_CHART_LINE_POINTS; exports.MAX_CHART_LINKS = _chunkUVXTOZ2Bcjs.MAX_CHART_LINKS; exports.MAX_CHART_MARKERS = _chunkQO2T6KA5cjs.MAX_CHART_MARKERS; exports.MAX_CHART_TREE_DEPTH = _chunkUVXTOZ2Bcjs.MAX_CHART_TREE_DEPTH; exports.MAX_CHART_TREE_NODES = _chunkUVXTOZ2Bcjs.MAX_CHART_TREE_NODES; exports.OfficeChartsError = OfficeChartsError; exports.RENDER_CHART_INSTRUCTIONS = RENDER_CHART_INSTRUCTIONS; exports.addChartLink = _chunkUVXTOZ2Bcjs.addChartLink; exports.addChartTreeRow = _chunkUVXTOZ2Bcjs.addChartTreeRow; exports.analyzeChartTable = analyzeChartTable; exports.blendChartScenes = blendChartScenes; exports.canDragChartPoint = canDragChartPoint; exports.chartBoxStats = _chunkQO2T6KA5cjs.chartBoxStats; exports.chartClientToScene = chartClientToScene; exports.chartColorDistance = _chunkUVXTOZ2Bcjs.chartColorDistance; exports.chartColorInputValue = _chunkUVXTOZ2Bcjs.chartColorInputValue; exports.chartColorsByCategory = _chunkUVXTOZ2Bcjs.chartColorsByCategory; exports.chartContrastRatio = _chunkUVXTOZ2Bcjs.chartContrastRatio; exports.chartDataFromTable = _chunkUVXTOZ2Bcjs.chartDataFromTable; exports.chartDataToTable = _chunkUVXTOZ2Bcjs.chartDataToTable; exports.chartDateLabels = _chunkQO2T6KA5cjs.chartDateLabels; exports.chartDateToSerial = _chunkQO2T6KA5cjs.chartDateToSerial; exports.chartErrorAmounts = _chunkUVXTOZ2Bcjs.chartErrorAmounts; exports.chartErrorBarsOfType = _chunkUVXTOZ2Bcjs.chartErrorBarsOfType; exports.chartFamily = _chunkUVXTOZ2Bcjs.chartFamily; exports.chartFileName = chartFileName; exports.chartFormatToCode = _chunkQ25WAFTDcjs.chartFormatToCode; exports.chartFromMermaid = _chunkIMRXC7OAcjs.chartFromMermaid; exports.chartFromOoxml = _chunkQ25WAFTDcjs.chartFromOoxml; exports.chartFromTable = chartFromTable; exports.chartHistogram = _chunkQO2T6KA5cjs.chartHistogram; exports.chartHitTest = chartHitTest; exports.chartLikertColor = _chunkUVXTOZ2Bcjs.chartLikertColor; exports.chartLinksFromTable = _chunkUVXTOZ2Bcjs.chartLinksFromTable; exports.chartLuminance = _chunkUVXTOZ2Bcjs.chartLuminance; exports.chartMermaidFamily = _chunkIMRXC7OAcjs.chartMermaidFamily; exports.chartMovingAverage = _chunkQO2T6KA5cjs.chartMovingAverage; exports.chartPointAnchor = chartPointAnchor; exports.chartPointColor = _chunkUVXTOZ2Bcjs.chartPointColor; exports.chartPointRef = chartPointRef; exports.chartPresetPatch = _chunkIMRXC7OAcjs.chartPresetPatch; exports.chartQuantile = _chunkQO2T6KA5cjs.chartQuantile; exports.chartRasterSize = chartRasterSize; exports.chartRgbToHex = _chunkUVXTOZ2Bcjs.chartRgbToHex; exports.chartRgbToOklab = _chunkUVXTOZ2Bcjs.chartRgbToOklab; exports.chartSankeyNodeValues = _chunkUVXTOZ2Bcjs.chartSankeyNodeValues; exports.chartSankeyNodes = _chunkUVXTOZ2Bcjs.chartSankeyNodes; exports.chartScaleFromPixel = _chunkQO2T6KA5cjs.chartScaleFromPixel; exports.chartScaleToPixel = _chunkQO2T6KA5cjs.chartScaleToPixel; exports.chartSceneToDomSpec = _chunkIMRXC7OAcjs.chartSceneToDomSpec; exports.chartSceneToSvg = _chunkIMRXC7OAcjs.chartSceneToSvg; exports.chartSerialToDate = _chunkQO2T6KA5cjs.chartSerialToDate; exports.chartSeriesColor = _chunkUVXTOZ2Bcjs.chartSeriesColor; exports.chartSeriesType = _chunkUVXTOZ2Bcjs.chartSeriesType; exports.chartSliceColor = _chunkUVXTOZ2Bcjs.chartSliceColor; exports.chartSpecColorsByCategory = _chunkUVXTOZ2Bcjs.chartSpecColorsByCategory; exports.chartSquarify = _chunkQO2T6KA5cjs.chartSquarify; exports.chartStyleDomain = chartStyleDomain; exports.chartStylePatch = chartStylePatch; exports.chartSupportsTrendlines = _chunkQO2T6KA5cjs.chartSupportsTrendlines; exports.chartTextBaseline = _chunkIMRXC7OAcjs.chartTextBaseline; exports.chartTextOn = _chunkUVXTOZ2Bcjs.chartTextOn; exports.chartTextTransform = _chunkIMRXC7OAcjs.chartTextTransform; exports.chartToMermaid = _chunkIMRXC7OAcjs.chartToMermaid; exports.chartToOoxml = _chunkQ25WAFTDcjs.chartToOoxml; exports.chartToSvg = _chunkIMRXC7OAcjs.chartToSvg; exports.chartTreeColumnLabels = _chunkUVXTOZ2Bcjs.chartTreeColumnLabels; exports.chartTreeDepth = _chunkUVXTOZ2Bcjs.chartTreeDepth; exports.chartTreeFromRows = _chunkUVXTOZ2Bcjs.chartTreeFromRows; exports.chartTreeFromSeries = _chunkUVXTOZ2Bcjs.chartTreeFromSeries; exports.chartTreeFromTable = _chunkUVXTOZ2Bcjs.chartTreeFromTable; exports.chartTreeToRows = _chunkUVXTOZ2Bcjs.chartTreeToRows; exports.chartTreeTotal = _chunkUVXTOZ2Bcjs.chartTreeTotal; exports.chartTrendlineName = _chunkQO2T6KA5cjs.chartTrendlineName; exports.chartValueAtPoint = _chunkQO2T6KA5cjs.chartValueAtPoint; exports.chartVariesColors = _chunkUVXTOZ2Bcjs.chartVariesColors; exports.chartXAtPoint = _chunkQO2T6KA5cjs.chartXAtPoint; exports.checkChartColors = _chunkUVXTOZ2Bcjs.checkChartColors; exports.cloneChartSeries = _chunkUVXTOZ2Bcjs.cloneChartSeries; exports.cloneChartSpec = _chunkUVXTOZ2Bcjs.cloneChartSpec; exports.cloneChartTree = _chunkUVXTOZ2Bcjs.cloneChartTree; exports.compileChartFormatCode = _chunkQO2T6KA5cjs.compileChartFormatCode; exports.contrastingTextColor = _chunkQO2T6KA5cjs.contrastingTextColor; exports.createChartCommands = createChartCommands; exports.createChartController = _chunkIMRXC7OAcjs.createChartController; exports.createChartEditorDocument = createChartEditorDocument; exports.createChartRasterizer = createChartRasterizer; exports.createChartSpec = _chunkUVXTOZ2Bcjs.createChartSpec; exports.createChartStyleToolProvider = createChartStyleToolProvider; exports.createChartToolProvider = createChartToolProvider; exports.createInstantChartClock = createInstantChartClock; exports.createOfficeChartToolProvider = createOfficeChartToolProvider; exports.cyclePaletteColor = _chunkUVXTOZ2Bcjs.cyclePaletteColor; exports.decimateChartPoints = _chunkQO2T6KA5cjs.decimateChartPoints; exports.defaultChartAxis = _chunkUVXTOZ2Bcjs.defaultChartAxis; exports.defaultChartErrorBarValue = _chunkUVXTOZ2Bcjs.defaultChartErrorBarValue; exports.describeChart = _chunkIMRXC7OAcjs.describeChart; exports.describeChartErrorBars = _chunkUVXTOZ2Bcjs.describeChartErrorBars; exports.describeChartSelection = describeChartSelection; exports.describeOfficeChartPlace = describeOfficeChartPlace; exports.downloadChartPng = downloadChartPng; exports.easeChartTween = easeChartTween; exports.estimateChartTextWidth = _chunkQO2T6KA5cjs.estimateChartTextWidth; exports.extractDocxCharts = extractDocxCharts; exports.extractOfficeCharts = extractOfficeCharts; exports.extractPptxCharts = extractPptxCharts; exports.extractXlsxCharts = extractXlsxCharts; exports.findChartTreeNode = _chunkUVXTOZ2Bcjs.findChartTreeNode; exports.findMermaidCharts = _chunkIMRXC7OAcjs.findMermaidCharts; exports.fitChartTrendline = _chunkQO2T6KA5cjs.fitChartTrendline; exports.formatChartAmountList = _chunkUVXTOZ2Bcjs.formatChartAmountList; exports.formatChartDate = _chunkQO2T6KA5cjs.formatChartDate; exports.formatChartNumber = _chunkQO2T6KA5cjs.formatChartNumber; exports.formatChartValueWithCode = _chunkQO2T6KA5cjs.formatChartValueWithCode; exports.handleChartKey = handleChartKey; exports.isCartesianChart = _chunkUVXTOZ2Bcjs.isCartesianChart; exports.isXyChart = _chunkUVXTOZ2Bcjs.isXyChart; exports.layoutChart = _chunkQO2T6KA5cjs.layoutChart; exports.layoutSparkline = _chunkIMRXC7OAcjs.layoutSparkline; exports.linearMap = _chunkQO2T6KA5cjs.linearMap; exports.locateChartPoint = locateChartPoint; exports.monochromeChartPalette = _chunkIMRXC7OAcjs.monochromeChartPalette; exports.niceLogScale = _chunkQO2T6KA5cjs.niceLogScale; exports.niceScale = _chunkQO2T6KA5cjs.niceScale; exports.niceStep = _chunkQO2T6KA5cjs.niceStep; exports.normalizeChartAxis = _chunkUVXTOZ2Bcjs.normalizeChartAxis; exports.normalizeChartErrorBars = _chunkUVXTOZ2Bcjs.normalizeChartErrorBars; exports.normalizeChartLinks = _chunkUVXTOZ2Bcjs.normalizeChartLinks; exports.normalizeChartReferenceBand = _chunkUVXTOZ2Bcjs.normalizeChartReferenceBand; exports.normalizeChartReferenceLine = _chunkUVXTOZ2Bcjs.normalizeChartReferenceLine; exports.normalizeChartSpec = _chunkUVXTOZ2Bcjs.normalizeChartSpec; exports.normalizeChartTree = _chunkUVXTOZ2Bcjs.normalizeChartTree; exports.normalizeChartTrendline = _chunkUVXTOZ2Bcjs.normalizeChartTrendline; exports.normalizeChartValues = _chunkUVXTOZ2Bcjs.normalizeChartValues; exports.parseChartAmountList = _chunkUVXTOZ2Bcjs.parseChartAmountList; exports.parseChartColor = _chunkUVXTOZ2Bcjs.parseChartColor; exports.parseChartDate = _chunkQO2T6KA5cjs.parseChartDate; exports.parseChartValue = _chunkUVXTOZ2Bcjs.parseChartValue; exports.parsePartialChartJson = parsePartialChartJson; exports.planChartCommand = planChartCommand; exports.planChartToolPlayback = planChartToolPlayback; exports.rasterizeChartSvg = rasterizeChartSvg; exports.realChartClock = realChartClock; exports.recommendChartTypes = recommendChartTypes; exports.recommendForShape = recommendForShape; exports.removeChartTreeRow = _chunkUVXTOZ2Bcjs.removeChartTreeRow; exports.resolveChartSvgPaints = resolveChartSvgPaints; exports.sameChartSelection = _chunkQO2T6KA5cjs.sameChartSelection; exports.setChartLinkField = _chunkUVXTOZ2Bcjs.setChartLinkField; exports.setChartTreeRowName = _chunkUVXTOZ2Bcjs.setChartTreeRowName; exports.setChartTreeRowValue = _chunkUVXTOZ2Bcjs.setChartTreeRowValue; exports.shadeChartColor = _chunkUVXTOZ2Bcjs.shadeChartColor; exports.simulateChartVision = _chunkUVXTOZ2Bcjs.simulateChartVision; exports.snapChartDragValue = snapChartDragValue; exports.snapChartValue = _chunkQO2T6KA5cjs.snapChartValue; exports.sparklineToSvg = _chunkIMRXC7OAcjs.sparklineToSvg; exports.startChartPointDrag = startChartPointDrag; exports.stepDecimals = _chunkQO2T6KA5cjs.stepDecimals; exports.suggestChartReferences = _chunkQO2T6KA5cjs.suggestChartReferences; exports.summarizeChart = _chunkIMRXC7OAcjs.summarizeChart; exports.summarizeChartSeries = _chunkQO2T6KA5cjs.summarizeChartSeries; exports.trendNumberText = _chunkQO2T6KA5cjs.trendNumberText; exports.uniqueChartSeriesId = _chunkUVXTOZ2Bcjs.uniqueChartSeriesId; exports.withChartPlayback = withChartPlayback;
3400
+
3401
+
3402
+
3403
+
3404
+
3405
+
3406
+
3407
+
3408
+
3409
+
3410
+ exports.CHART_AXIS_KINDS = _chunkOUO3DSRTcjs.CHART_AXIS_KINDS; exports.CHART_AXIS_SCALES = _chunkOUO3DSRTcjs.CHART_AXIS_SCALES; exports.CHART_COLOR_SCHEMES = _chunk2F4GAZL5cjs.CHART_COLOR_SCHEMES; exports.CHART_CURVES = _chunkOUO3DSRTcjs.CHART_CURVES; exports.CHART_DATE_STEPS = _chunkWOIXNDHVcjs.CHART_DATE_STEPS; exports.CHART_ERROR_BAR_DIRECTIONS = _chunkOUO3DSRTcjs.CHART_ERROR_BAR_DIRECTIONS; exports.CHART_ERROR_BAR_LABELS = _chunkOUO3DSRTcjs.CHART_ERROR_BAR_LABELS; exports.CHART_ERROR_BAR_TYPES = _chunkOUO3DSRTcjs.CHART_ERROR_BAR_TYPES; exports.CHART_LABEL_POSITIONS = _chunkOUO3DSRTcjs.CHART_LABEL_POSITIONS; exports.CHART_LAYOUT_PRESETS = _chunk2F4GAZL5cjs.CHART_LAYOUT_PRESETS; exports.CHART_LEGEND_POSITIONS = _chunkOUO3DSRTcjs.CHART_LEGEND_POSITIONS; exports.CHART_LIKERT_NEUTRALS = _chunkOUO3DSRTcjs.CHART_LIKERT_NEUTRALS; exports.CHART_LIKERT_SORTS = _chunkOUO3DSRTcjs.CHART_LIKERT_SORTS; exports.CHART_MARKERS = _chunkOUO3DSRTcjs.CHART_MARKERS; exports.CHART_MERMAID_META_PREFIX = _chunk2F4GAZL5cjs.CHART_MERMAID_META_PREFIX; exports.CHART_NUMBER_STYLES = _chunkOUO3DSRTcjs.CHART_NUMBER_STYLES; exports.CHART_OOXML_CONTENT_TYPE = _chunkVKHJJUBKcjs.CHART_OOXML_CONTENT_TYPE; exports.CHART_OOXML_NS = _chunkVKHJJUBKcjs.CHART_OOXML_NS; exports.CHART_OOXML_RELATIONSHIP = _chunkVKHJJUBKcjs.CHART_OOXML_RELATIONSHIP; exports.CHART_ORIENTATIONS = _chunkOUO3DSRTcjs.CHART_ORIENTATIONS; exports.CHART_PALETTE_SHADES = _chunkOUO3DSRTcjs.CHART_PALETTE_SHADES; exports.CHART_PRESENCE_COLORS = CHART_PRESENCE_COLORS; exports.CHART_RADAR_GRATICULES = _chunkOUO3DSRTcjs.CHART_RADAR_GRATICULES; exports.CHART_RASTER_MAX_SIZE = CHART_RASTER_MAX_SIZE; exports.CHART_REFERENCE_AXES = _chunkOUO3DSRTcjs.CHART_REFERENCE_AXES; exports.CHART_SANKEY_LINK_COLORS = _chunkOUO3DSRTcjs.CHART_SANKEY_LINK_COLORS; exports.CHART_SERIES_TYPES = _chunkOUO3DSRTcjs.CHART_SERIES_TYPES; exports.CHART_STACKINGS = _chunkOUO3DSRTcjs.CHART_STACKINGS; exports.CHART_TRENDLINE_TYPES = _chunkOUO3DSRTcjs.CHART_TRENDLINE_TYPES; exports.CHART_TYPES = _chunkOUO3DSRTcjs.CHART_TYPES; exports.CHART_TYPE_LABELS = _chunkOUO3DSRTcjs.CHART_TYPE_LABELS; exports.CSS_VARIABLE_CHART_THEME = _chunkOUO3DSRTcjs.CSS_VARIABLE_CHART_THEME; exports.ChartController = _chunk2F4GAZL5cjs.ChartController; exports.ChartDirector = ChartDirector; exports.ChartPresence = ChartPresence; exports.ChartStream = ChartStream; exports.DEFAULT_CHART_PALETTE = _chunkOUO3DSRTcjs.DEFAULT_CHART_PALETTE; exports.DEFAULT_CHART_THEME = _chunkOUO3DSRTcjs.DEFAULT_CHART_THEME; exports.MAX_CHART_DATA_LABELS = _chunkWOIXNDHVcjs.MAX_CHART_DATA_LABELS; exports.MAX_CHART_LINE_POINTS = _chunkWOIXNDHVcjs.MAX_CHART_LINE_POINTS; exports.MAX_CHART_LINKS = _chunkOUO3DSRTcjs.MAX_CHART_LINKS; exports.MAX_CHART_MARKERS = _chunkWOIXNDHVcjs.MAX_CHART_MARKERS; exports.MAX_CHART_TREE_DEPTH = _chunkOUO3DSRTcjs.MAX_CHART_TREE_DEPTH; exports.MAX_CHART_TREE_NODES = _chunkOUO3DSRTcjs.MAX_CHART_TREE_NODES; exports.OfficeChartsError = OfficeChartsError; exports.RENDER_CHART_INSTRUCTIONS = RENDER_CHART_INSTRUCTIONS; exports.addChartLink = _chunkOUO3DSRTcjs.addChartLink; exports.addChartTreeRow = _chunkOUO3DSRTcjs.addChartTreeRow; exports.analyzeChartTable = analyzeChartTable; exports.blendChartScenes = blendChartScenes; exports.canDragChartPoint = canDragChartPoint; exports.chartBoxStats = _chunkWOIXNDHVcjs.chartBoxStats; exports.chartClientToScene = chartClientToScene; exports.chartColorDistance = _chunkOUO3DSRTcjs.chartColorDistance; exports.chartColorInputValue = _chunkOUO3DSRTcjs.chartColorInputValue; exports.chartColorsByCategory = _chunkOUO3DSRTcjs.chartColorsByCategory; exports.chartContrastRatio = _chunkOUO3DSRTcjs.chartContrastRatio; exports.chartDataFromTable = _chunkOUO3DSRTcjs.chartDataFromTable; exports.chartDataToTable = _chunkOUO3DSRTcjs.chartDataToTable; exports.chartDateLabels = _chunkWOIXNDHVcjs.chartDateLabels; exports.chartDateToSerial = _chunkWOIXNDHVcjs.chartDateToSerial; exports.chartErrorAmounts = _chunkOUO3DSRTcjs.chartErrorAmounts; exports.chartErrorBarsOfType = _chunkOUO3DSRTcjs.chartErrorBarsOfType; exports.chartFamily = _chunkOUO3DSRTcjs.chartFamily; exports.chartFileName = chartFileName; exports.chartFormatToCode = _chunkVKHJJUBKcjs.chartFormatToCode; exports.chartFromMermaid = _chunk2F4GAZL5cjs.chartFromMermaid; exports.chartFromOoxml = _chunkVKHJJUBKcjs.chartFromOoxml; exports.chartFromTable = chartFromTable; exports.chartHistogram = _chunkWOIXNDHVcjs.chartHistogram; exports.chartHitTest = chartHitTest; exports.chartLikertColor = _chunkOUO3DSRTcjs.chartLikertColor; exports.chartLinksFromTable = _chunkOUO3DSRTcjs.chartLinksFromTable; exports.chartLuminance = _chunkOUO3DSRTcjs.chartLuminance; exports.chartMapBreaks = _chunkWOIXNDHVcjs.chartMapBreaks; exports.chartMapClass = _chunkWOIXNDHVcjs.chartMapClass; exports.chartMapRamp = _chunkWOIXNDHVcjs.chartMapRamp; exports.chartMermaidFamily = _chunk2F4GAZL5cjs.chartMermaidFamily; exports.chartMovingAverage = _chunkWOIXNDHVcjs.chartMovingAverage; exports.chartPointAnchor = chartPointAnchor; exports.chartPointColor = _chunkOUO3DSRTcjs.chartPointColor; exports.chartPointRef = chartPointRef; exports.chartPresetPatch = _chunk2F4GAZL5cjs.chartPresetPatch; exports.chartQuantile = _chunkWOIXNDHVcjs.chartQuantile; exports.chartRaceMoment = _chunkWOIXNDHVcjs.chartRaceMoment; exports.chartRaceRanking = _chunkWOIXNDHVcjs.chartRaceRanking; exports.chartRaceValueAt = _chunkWOIXNDHVcjs.chartRaceValueAt; exports.chartRasterSize = chartRasterSize; exports.chartRgbToHex = _chunkOUO3DSRTcjs.chartRgbToHex; exports.chartRgbToOklab = _chunkOUO3DSRTcjs.chartRgbToOklab; exports.chartSankeyNodeValues = _chunkOUO3DSRTcjs.chartSankeyNodeValues; exports.chartSankeyNodes = _chunkOUO3DSRTcjs.chartSankeyNodes; exports.chartScaleFromPixel = _chunkWOIXNDHVcjs.chartScaleFromPixel; exports.chartScaleToPixel = _chunkWOIXNDHVcjs.chartScaleToPixel; exports.chartSceneToDomSpec = _chunk2F4GAZL5cjs.chartSceneToDomSpec; exports.chartSceneToSvg = _chunk2F4GAZL5cjs.chartSceneToSvg; exports.chartSerialToDate = _chunkWOIXNDHVcjs.chartSerialToDate; exports.chartSeriesColor = _chunkOUO3DSRTcjs.chartSeriesColor; exports.chartSeriesType = _chunkOUO3DSRTcjs.chartSeriesType; exports.chartSliceColor = _chunkOUO3DSRTcjs.chartSliceColor; exports.chartSpecColorsByCategory = _chunkOUO3DSRTcjs.chartSpecColorsByCategory; exports.chartSquarify = _chunkWOIXNDHVcjs.chartSquarify; exports.chartStyleDomain = chartStyleDomain; exports.chartStylePatch = chartStylePatch; exports.chartSupportsTrendlines = _chunkWOIXNDHVcjs.chartSupportsTrendlines; exports.chartTextBaseline = _chunk2F4GAZL5cjs.chartTextBaseline; exports.chartTextOn = _chunkOUO3DSRTcjs.chartTextOn; exports.chartTextTransform = _chunk2F4GAZL5cjs.chartTextTransform; exports.chartToMermaid = _chunk2F4GAZL5cjs.chartToMermaid; exports.chartToOoxml = _chunkVKHJJUBKcjs.chartToOoxml; exports.chartToSvg = _chunk2F4GAZL5cjs.chartToSvg; exports.chartTreeColumnLabels = _chunkOUO3DSRTcjs.chartTreeColumnLabels; exports.chartTreeDepth = _chunkOUO3DSRTcjs.chartTreeDepth; exports.chartTreeFromRows = _chunkOUO3DSRTcjs.chartTreeFromRows; exports.chartTreeFromSeries = _chunkOUO3DSRTcjs.chartTreeFromSeries; exports.chartTreeFromTable = _chunkOUO3DSRTcjs.chartTreeFromTable; exports.chartTreeToRows = _chunkOUO3DSRTcjs.chartTreeToRows; exports.chartTreeTotal = _chunkOUO3DSRTcjs.chartTreeTotal; exports.chartTrendlineName = _chunkWOIXNDHVcjs.chartTrendlineName; exports.chartValueAtPoint = _chunkWOIXNDHVcjs.chartValueAtPoint; exports.chartVariesColors = _chunkOUO3DSRTcjs.chartVariesColors; exports.chartXAtPoint = _chunkWOIXNDHVcjs.chartXAtPoint; exports.checkChartColors = _chunkOUO3DSRTcjs.checkChartColors; exports.cloneChartSeries = _chunkOUO3DSRTcjs.cloneChartSeries; exports.cloneChartSpec = _chunkOUO3DSRTcjs.cloneChartSpec; exports.cloneChartTree = _chunkOUO3DSRTcjs.cloneChartTree; exports.compileChartFormatCode = _chunkWOIXNDHVcjs.compileChartFormatCode; exports.contrastingTextColor = _chunkWOIXNDHVcjs.contrastingTextColor; exports.createChartCommands = createChartCommands; exports.createChartController = _chunk2F4GAZL5cjs.createChartController; exports.createChartEditorDocument = createChartEditorDocument; exports.createChartRasterizer = createChartRasterizer; exports.createChartSpec = _chunkOUO3DSRTcjs.createChartSpec; exports.createChartStyleToolProvider = createChartStyleToolProvider; exports.createChartToolProvider = createChartToolProvider; exports.createInstantChartClock = createInstantChartClock; exports.createOfficeChartToolProvider = createOfficeChartToolProvider; exports.cyclePaletteColor = _chunkOUO3DSRTcjs.cyclePaletteColor; exports.decimateChartPoints = _chunkWOIXNDHVcjs.decimateChartPoints; exports.defaultChartAxis = _chunkOUO3DSRTcjs.defaultChartAxis; exports.defaultChartErrorBarValue = _chunkOUO3DSRTcjs.defaultChartErrorBarValue; exports.describeChart = _chunk2F4GAZL5cjs.describeChart; exports.describeChartErrorBars = _chunkOUO3DSRTcjs.describeChartErrorBars; exports.describeChartSelection = describeChartSelection; exports.describeOfficeChartPlace = describeOfficeChartPlace; exports.downloadChartPng = downloadChartPng; exports.easeChartTween = easeChartTween; exports.estimateChartTextWidth = _chunkWOIXNDHVcjs.estimateChartTextWidth; exports.extractDocxCharts = extractDocxCharts; exports.extractOfficeCharts = extractOfficeCharts; exports.extractPptxCharts = extractPptxCharts; exports.extractXlsxCharts = extractXlsxCharts; exports.findChartTreeNode = _chunkOUO3DSRTcjs.findChartTreeNode; exports.findMermaidCharts = _chunk2F4GAZL5cjs.findMermaidCharts; exports.fitChartTrendline = _chunkWOIXNDHVcjs.fitChartTrendline; exports.formatChartAmountList = _chunkOUO3DSRTcjs.formatChartAmountList; exports.formatChartDate = _chunkWOIXNDHVcjs.formatChartDate; exports.formatChartNumber = _chunkWOIXNDHVcjs.formatChartNumber; exports.formatChartValueWithCode = _chunkWOIXNDHVcjs.formatChartValueWithCode; exports.getChartMap = _chunkWOIXNDHVcjs.getChartMap; exports.handleChartKey = handleChartKey; exports.isCartesianChart = _chunkOUO3DSRTcjs.isCartesianChart; exports.isXyChart = _chunkOUO3DSRTcjs.isXyChart; exports.layoutChart = _chunkWOIXNDHVcjs.layoutChart; exports.layoutSparkline = _chunk2F4GAZL5cjs.layoutSparkline; exports.linearMap = _chunkWOIXNDHVcjs.linearMap; exports.listChartMaps = _chunkWOIXNDHVcjs.listChartMaps; exports.locateChartPoint = locateChartPoint; exports.matchChartMapRegions = _chunkWOIXNDHVcjs.matchChartMapRegions; exports.monochromeChartPalette = _chunk2F4GAZL5cjs.monochromeChartPalette; exports.niceLogScale = _chunkWOIXNDHVcjs.niceLogScale; exports.niceScale = _chunkWOIXNDHVcjs.niceScale; exports.niceStep = _chunkWOIXNDHVcjs.niceStep; exports.normalizeChartAxis = _chunkOUO3DSRTcjs.normalizeChartAxis; exports.normalizeChartErrorBars = _chunkOUO3DSRTcjs.normalizeChartErrorBars; exports.normalizeChartLinks = _chunkOUO3DSRTcjs.normalizeChartLinks; exports.normalizeChartReferenceBand = _chunkOUO3DSRTcjs.normalizeChartReferenceBand; exports.normalizeChartReferenceLine = _chunkOUO3DSRTcjs.normalizeChartReferenceLine; exports.normalizeChartSpec = _chunkOUO3DSRTcjs.normalizeChartSpec; exports.normalizeChartTree = _chunkOUO3DSRTcjs.normalizeChartTree; exports.normalizeChartTrendline = _chunkOUO3DSRTcjs.normalizeChartTrendline; exports.normalizeChartValues = _chunkOUO3DSRTcjs.normalizeChartValues; exports.parseChartAmountList = _chunkOUO3DSRTcjs.parseChartAmountList; exports.parseChartColor = _chunkOUO3DSRTcjs.parseChartColor; exports.parseChartDate = _chunkWOIXNDHVcjs.parseChartDate; exports.parseChartValue = _chunkOUO3DSRTcjs.parseChartValue; exports.parsePartialChartJson = parsePartialChartJson; exports.planChartCommand = planChartCommand; exports.planChartToolPlayback = planChartToolPlayback; exports.rasterizeChartSvg = rasterizeChartSvg; exports.realChartClock = realChartClock; exports.recommendChartTypes = recommendChartTypes; exports.recommendForShape = recommendForShape; exports.registerChartMap = _chunkWOIXNDHVcjs.registerChartMap; exports.removeChartTreeRow = _chunkOUO3DSRTcjs.removeChartTreeRow; exports.resolveChartSvgPaints = resolveChartSvgPaints; exports.sameChartSelection = _chunkWOIXNDHVcjs.sameChartSelection; exports.setChartLinkField = _chunkOUO3DSRTcjs.setChartLinkField; exports.setChartTreeRowName = _chunkOUO3DSRTcjs.setChartTreeRowName; exports.setChartTreeRowValue = _chunkOUO3DSRTcjs.setChartTreeRowValue; exports.shadeChartColor = _chunkOUO3DSRTcjs.shadeChartColor; exports.simulateChartVision = _chunkOUO3DSRTcjs.simulateChartVision; exports.snapChartDragValue = snapChartDragValue; exports.snapChartValue = _chunkWOIXNDHVcjs.snapChartValue; exports.sparklineToSvg = _chunk2F4GAZL5cjs.sparklineToSvg; exports.startChartPointDrag = startChartPointDrag; exports.stepDecimals = _chunkWOIXNDHVcjs.stepDecimals; exports.suggestChartReferences = _chunkWOIXNDHVcjs.suggestChartReferences; exports.summarizeChart = _chunk2F4GAZL5cjs.summarizeChart; exports.summarizeChartSeries = _chunkWOIXNDHVcjs.summarizeChartSeries; exports.trendNumberText = _chunkWOIXNDHVcjs.trendNumberText; exports.uniqueChartSeriesId = _chunkOUO3DSRTcjs.uniqueChartSeriesId; exports.withChartPlayback = withChartPlayback;