@squadbase/vantage 0.7.0-dev1.275b4ed → 0.7.0-dev1.5d49eae

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.
@@ -8,9 +8,9 @@ import { forwardRef, useState, useEffect, createContext, useId, useMemo, useRef,
8
8
  import { cva } from 'class-variance-authority';
9
9
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
10
  import { Search, Columns3, CalendarIcon, ChevronDownIcon, ArrowUp, ArrowDown, ArrowRight, Minus, ChevronRight, ArrowUpDown, XIcon, LoaderIcon, CheckIcon, Download, ChevronDown, X, CircleX, TriangleAlert, CircleCheck } from 'lucide-react';
11
- import { use } from 'echarts/core';
12
- import { GraphicComponent, VisualMapComponent } from 'echarts/components';
13
- import { ScatterChart as ScatterChart$1, HeatmapChart } from 'echarts/charts';
11
+ import { use, registerMap } from 'echarts/core';
12
+ import { GraphicComponent, VisualMapComponent, GeoComponent } from 'echarts/components';
13
+ import { ScatterChart as ScatterChart$1, HeatmapChart, MapChart, TreemapChart } from 'echarts/charts';
14
14
  import 'echarts';
15
15
  import { flexRender, useReactTable, getPaginationRowModel, getFilteredRowModel, getSortedRowModel, getCoreRowModel } from '@tanstack/react-table';
16
16
  import { subMonths, subDays, endOfDay, startOfDay, startOfWeek, subWeeks, endOfWeek, startOfMonth, endOfMonth, isSameDay, addMonths } from 'date-fns';
@@ -2642,7 +2642,7 @@ function AreaChartImpl({
2642
2642
  provisionalFrom,
2643
2643
  provisionalLabel,
2644
2644
  isLoading,
2645
- loading,
2645
+ loading: loading2,
2646
2646
  emptyState,
2647
2647
  height,
2648
2648
  chartOptions,
@@ -2803,7 +2803,7 @@ function AreaChartImpl({
2803
2803
  ref: frameRef,
2804
2804
  title,
2805
2805
  summary: resolvedSummary,
2806
- isLoading: isLoading ?? loading ?? false,
2806
+ isLoading: isLoading ?? loading2 ?? false,
2807
2807
  isEmpty: data.length === 0,
2808
2808
  emptyState,
2809
2809
  height,
@@ -2837,7 +2837,7 @@ function BarChartImpl({
2837
2837
  provisionalFrom,
2838
2838
  provisionalLabel,
2839
2839
  isLoading,
2840
- loading,
2840
+ loading: loading2,
2841
2841
  emptyState,
2842
2842
  height,
2843
2843
  chartOptions,
@@ -2993,7 +2993,7 @@ function BarChartImpl({
2993
2993
  ref: frameRef,
2994
2994
  title,
2995
2995
  summary: resolvedSummary,
2996
- isLoading: isLoading ?? loading ?? false,
2996
+ isLoading: isLoading ?? loading2 ?? false,
2997
2997
  isEmpty: data.length === 0,
2998
2998
  emptyState,
2999
2999
  height,
@@ -3027,7 +3027,7 @@ function LineChartImpl({
3027
3027
  provisionalFrom,
3028
3028
  provisionalLabel,
3029
3029
  isLoading,
3030
- loading,
3030
+ loading: loading2,
3031
3031
  emptyState,
3032
3032
  height,
3033
3033
  chartOptions,
@@ -3190,7 +3190,7 @@ function LineChartImpl({
3190
3190
  ref: frameRef,
3191
3191
  title,
3192
3192
  summary: resolvedSummary,
3193
- isLoading: isLoading ?? loading ?? false,
3193
+ isLoading: isLoading ?? loading2 ?? false,
3194
3194
  isEmpty: data.length === 0,
3195
3195
  emptyState,
3196
3196
  height,
@@ -3234,7 +3234,7 @@ function DonutChartImpl({
3234
3234
  actions,
3235
3235
  fileName,
3236
3236
  isLoading,
3237
- loading,
3237
+ loading: loading2,
3238
3238
  emptyState,
3239
3239
  height,
3240
3240
  chartOptions,
@@ -3328,7 +3328,7 @@ function DonutChartImpl({
3328
3328
  ref: frameRef,
3329
3329
  title,
3330
3330
  summary: resolvedSummary,
3331
- isLoading: isLoading ?? loading ?? false,
3331
+ isLoading: isLoading ?? loading2 ?? false,
3332
3332
  isEmpty: data.length === 0,
3333
3333
  emptyState,
3334
3334
  height,
@@ -5347,7 +5347,1312 @@ function HeatmapLegend({
5347
5347
  }
5348
5348
  var Heatmap = forwardRef(HeatmapImpl);
5349
5349
  Heatmap.displayName = "Heatmap";
5350
+ function niceStep2(raw) {
5351
+ if (!(raw > 0) || !Number.isFinite(raw)) return 1;
5352
+ const exp10 = 10 ** Math.floor(Math.log10(raw));
5353
+ const f = raw / exp10;
5354
+ return (f < 1.5 ? 1 : f < 2.5 ? 2 : f < 4 ? 3 : f < 7 ? 5 : 10) * exp10;
5355
+ }
5356
+ var round = (n) => Number(n.toPrecision(12));
5357
+ function comboAxisScale(lo, hi, splitNumber, ticks) {
5358
+ let low = Math.min(0, Number.isFinite(lo) ? lo : 0);
5359
+ let high = Math.max(0, Number.isFinite(hi) ? hi : 0);
5360
+ if (high <= low) high = low + 1;
5361
+ let step = niceStep2((high - low) / Math.max(1, splitNumber));
5362
+ for (let attempt = 0; ; attempt++) {
5363
+ const min = round(Math.floor(low / step) * step);
5364
+ const max = round(Math.ceil(high / step) * step);
5365
+ const tick = ticks(Math.max(Math.abs(min), Math.abs(max)));
5366
+ const count = Math.round((max - min) / step);
5367
+ const labels = Array.from({ length: count + 1 }, (_, i) => tick(round(min + i * step)));
5368
+ if (new Set(labels).size === labels.length || attempt >= 6) return { min, max, interval: step, tick };
5369
+ step = niceStep2(step * 2);
5370
+ }
5371
+ }
5372
+ var DEFAULT_CHART_HEIGHT2 = 288;
5373
+ var splitCountFor = (height) => height < 200 ? 3 : height < 300 ? 4 : 5;
5374
+ function escapeHtml3(text) {
5375
+ return text.replace(/[&<>"']/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[c]);
5376
+ }
5350
5377
  var TEXT14 = {
5378
+ ja: { item: "\u9805\u76EE", chart: "\u8907\u5408\u30B0\u30E9\u30D5" },
5379
+ en: { item: "Item", chart: "Combination chart" }
5380
+ };
5381
+ var textOf4 = (locale) => TEXT14[uiLanguage(resolveLocale(locale))];
5382
+ var axisOf = (s) => s.axis === "right" ? "right" : "left";
5383
+ function comboSeriesList(series) {
5384
+ if (!Array.isArray(series)) return [];
5385
+ return series.filter(
5386
+ (s) => !!s && typeof s === "object" && typeof s.key === "string" && ["bar", "line", "area"].includes(s.type)
5387
+ );
5388
+ }
5389
+ function buildComboChartOption(config) {
5390
+ const { data, index, labels, formatters } = config;
5391
+ const series = comboSeriesList(config.series);
5392
+ const label2 = (key) => labels?.[key] ?? key;
5393
+ const seriesName = (s) => s.label ?? label2(s.key);
5394
+ const vertical = config.layout === "vertical";
5395
+ const categories = data.map((row) => String(row?.[index] ?? ""));
5396
+ const values = series.map((s) => data.map((row) => toChartNumber(row?.[s.key])));
5397
+ const hasRight = series.some((s) => axisOf(s) === "right");
5398
+ const axes = hasRight ? ["left", "right"] : ["left"];
5399
+ const extent = (axis) => {
5400
+ let [lo, hi] = [0, 0];
5401
+ const add = (v) => {
5402
+ if (v !== null && Number.isFinite(v)) [lo, hi] = [Math.min(lo, v), Math.max(hi, v)];
5403
+ };
5404
+ const stacks = /* @__PURE__ */ new Map();
5405
+ series.forEach((s, i) => {
5406
+ if (axisOf(s) !== axis) return;
5407
+ if (config.stacked && s.type !== "line") {
5408
+ const stack = stacks.get(s.type) ?? { pos: data.map(() => 0), neg: data.map(() => 0) };
5409
+ values[i].forEach((v, j) => {
5410
+ if (v === null) return;
5411
+ if (v >= 0) stack.pos[j] += v;
5412
+ else stack.neg[j] += v;
5413
+ });
5414
+ stacks.set(s.type, stack);
5415
+ } else values[i].forEach(add);
5416
+ });
5417
+ for (const stack of stacks.values()) [...stack.pos, ...stack.neg].forEach(add);
5418
+ for (const ref of config.referenceLines ?? []) if (axisOf(ref) === axis) add(toChartNumber(ref.value));
5419
+ return [lo, hi];
5420
+ };
5421
+ const split = splitCountFor(config.plotHeight ?? DEFAULT_CHART_HEIGHT2);
5422
+ const scales = Object.fromEntries(axes.map((axis) => [axis, comboAxisScale(...extent(axis), split, config.ticks[axis])]));
5423
+ const valueAxes = axes.map((axis) => ({
5424
+ type: "value",
5425
+ position: vertical ? axis === "left" ? "bottom" : "top" : axis,
5426
+ min: scales[axis].min,
5427
+ max: scales[axis].max,
5428
+ interval: scales[axis].interval,
5429
+ axisLine: { show: false },
5430
+ axisTick: { show: false },
5431
+ splitLine: { show: axis === "left" },
5432
+ axisLabel: { formatter: (v) => scales[axis].tick(v), hideOverlap: vertical ? true : void 0 }
5433
+ }));
5434
+ const categoryAxis = {
5435
+ type: "category",
5436
+ data: categories,
5437
+ inverse: vertical,
5438
+ axisTick: { show: false },
5439
+ axisLabel: { formatter: (v) => label2(v), hideOverlap: true }
5440
+ };
5441
+ const axisIndex = (s) => axisOf(s) === "right" ? 1 : 0;
5442
+ const drawn = series.map((s, i) => {
5443
+ const color = config.palette[i] || void 0;
5444
+ const common = {
5445
+ id: `series-${i}`,
5446
+ name: seriesName(s),
5447
+ data: values[i],
5448
+ [vertical ? "xAxisIndex" : "yAxisIndex"]: axisIndex(s),
5449
+ emphasis: { focus: "none" }
5450
+ };
5451
+ if (s.type === "bar")
5452
+ return {
5453
+ ...common,
5454
+ type: "bar",
5455
+ stack: config.stacked ? `bar-${axisOf(s)}` : void 0,
5456
+ barMaxWidth: 40,
5457
+ itemStyle: { color, borderRadius: vertical ? [0, 2, 2, 0] : [2, 2, 0, 0] }
5458
+ };
5459
+ return {
5460
+ ...common,
5461
+ type: "line",
5462
+ stack: config.stacked && s.type === "area" ? `area-${axisOf(s)}` : void 0,
5463
+ symbol: "circle",
5464
+ symbolSize: 6,
5465
+ showSymbol: data.length <= 24,
5466
+ connectNulls: false,
5467
+ lineStyle: { width: 2, color },
5468
+ itemStyle: { color },
5469
+ areaStyle: s.type === "area" ? { color, opacity: 0.18 } : void 0,
5470
+ z: 3
5471
+ };
5472
+ });
5473
+ const references = axes.flatMap((axis) => {
5474
+ const lines = (config.referenceLines ?? []).filter((r) => axisOf(r) === axis && toChartNumber(r.value) !== null);
5475
+ if (lines.length === 0) return [];
5476
+ return [
5477
+ {
5478
+ id: `reference-${axis}`,
5479
+ type: "line",
5480
+ data: data.map(() => null),
5481
+ [vertical ? "xAxisIndex" : "yAxisIndex"]: axis === "right" ? 1 : 0,
5482
+ silent: true,
5483
+ symbol: "none",
5484
+ tooltip: { show: false },
5485
+ markLine: {
5486
+ silent: true,
5487
+ symbol: "none",
5488
+ lineStyle: { type: "dashed", color: config.referenceColor || void 0, width: 1 },
5489
+ label: { position: "insideEndTop", color: config.referenceColor || void 0 },
5490
+ data: lines.map((r) => ({
5491
+ [vertical ? "xAxis" : "yAxis"]: toChartNumber(r.value),
5492
+ label: { formatter: r.label ?? config.formatters[axis](toChartNumber(r.value)) }
5493
+ }))
5494
+ }
5495
+ }
5496
+ ];
5497
+ });
5498
+ const showLegend = (config.showLegend ?? true) && series.length > 1;
5499
+ const tooltip = (params) => {
5500
+ const items = Array.isArray(params) ? params : [params];
5501
+ const first = items[0];
5502
+ if (!first) return "";
5503
+ const head = escapeHtml3(label2(categories[first.dataIndex] ?? ""));
5504
+ const lines = items.filter((p) => p.seriesIndex < series.length).map((p) => {
5505
+ const s = series[p.seriesIndex];
5506
+ const v = values[p.seriesIndex][p.dataIndex];
5507
+ return `${p.marker ?? ""}${escapeHtml3(seriesName(s))} ${v === null || v === void 0 ? EMPTY_VALUE : escapeHtml3(formatters[axisOf(s)](v))}`;
5508
+ });
5509
+ return [head, ...lines].join("<br/>");
5510
+ };
5511
+ const option = {
5512
+ animation: false,
5513
+ legend: { show: showLegend, top: 0, left: 0, data: series.map(seriesName) },
5514
+ tooltip: config.showTooltip === false ? { show: false } : { trigger: "axis", axisPointer: { type: "shadow" }, formatter: tooltip },
5515
+ grid: { left: 8, right: 8, top: showLegend ? 36 : 12, bottom: 8, containLabel: true },
5516
+ xAxis: vertical ? valueAxes : categoryAxis,
5517
+ yAxis: vertical ? categoryAxis : valueAxes,
5518
+ series: [...drawn, ...references]
5519
+ };
5520
+ return config.chartOptions ? mergeDeep2(option, config.chartOptions) : option;
5521
+ }
5522
+ function mergeDeep2(a, b) {
5523
+ const out = { ...a };
5524
+ for (const [k, v] of Object.entries(b)) {
5525
+ const cur = out[k];
5526
+ out[k] = v && cur && typeof v === "object" && typeof cur === "object" && !Array.isArray(v) && !Array.isArray(cur) ? mergeDeep2(cur, v) : v;
5527
+ }
5528
+ return out;
5529
+ }
5530
+ function comboChartDataTable(data, index, series, formatters, labels, locale) {
5531
+ const list = comboSeriesList(series);
5532
+ const label2 = (key) => labels?.[key] ?? key;
5533
+ return {
5534
+ columns: [labels?.[index] ?? textOf4(locale).item, ...list.map((s) => s.label ?? label2(s.key))],
5535
+ rows: data.map((row) => [
5536
+ label2(String(row?.[index] ?? "")),
5537
+ ...list.map((s) => {
5538
+ const n = toChartNumber(row?.[s.key]);
5539
+ return n === null ? EMPTY_VALUE : formatters[axisOf(s)](n);
5540
+ })
5541
+ ])
5542
+ };
5543
+ }
5544
+ var NO_ROWS12 = [];
5545
+ function ComboChartImpl({
5546
+ data = NO_ROWS12,
5547
+ index,
5548
+ series = NO_ROWS12,
5549
+ format,
5550
+ rightFormat,
5551
+ labels,
5552
+ referenceLines,
5553
+ stacked = false,
5554
+ layout = "horizontal",
5555
+ showLegend = true,
5556
+ showTooltip = true,
5557
+ onSelect,
5558
+ title,
5559
+ summary,
5560
+ isLoading,
5561
+ emptyState,
5562
+ height,
5563
+ chartOptions,
5564
+ actions,
5565
+ fileName,
5566
+ className,
5567
+ ariaLabel,
5568
+ ...rest
5569
+ }, ref) {
5570
+ const rows = Array.isArray(data) ? data : NO_ROWS12;
5571
+ const list = useMemo(() => comboSeriesList(series), [series]);
5572
+ const { ref: frameRef, tokens } = useChartSurface(ref);
5573
+ const locale = useLocale();
5574
+ const formatters = useMemo(
5575
+ () => ({ left: resolveValueFormatter(void 0, format, locale), right: resolveValueFormatter(void 0, rightFormat ?? format, locale) }),
5576
+ [format, rightFormat, locale]
5577
+ );
5578
+ const ticks = useMemo(
5579
+ () => ({ left: resolveAxisTickFormatter(void 0, format, locale), right: resolveAxisTickFormatter(void 0, rightFormat ?? format, locale) }),
5580
+ [format, rightFormat, locale]
5581
+ );
5582
+ const palette = useMemo(() => resolveColors(tokens, list), [tokens, list]);
5583
+ const option = useMemo(
5584
+ () => buildComboChartOption({
5585
+ data: rows,
5586
+ index,
5587
+ series: list,
5588
+ palette: palette.series,
5589
+ referenceColor: palette.reference,
5590
+ labels,
5591
+ formatters,
5592
+ ticks,
5593
+ referenceLines,
5594
+ stacked,
5595
+ layout,
5596
+ showLegend,
5597
+ showTooltip,
5598
+ plotHeight: height,
5599
+ chartOptions
5600
+ }),
5601
+ [rows, index, list, palette, labels, formatters, ticks, referenceLines, stacked, layout, showLegend, showTooltip, height, chartOptions]
5602
+ );
5603
+ const onEvents = useMemo(
5604
+ () => onSelect ? {
5605
+ click: (params) => {
5606
+ const p = params;
5607
+ if (p.componentType !== "series" || (p.seriesIndex ?? Infinity) >= list.length) return;
5608
+ const row = rows[p.dataIndex ?? -1];
5609
+ if (row) onSelect(row);
5610
+ }
5611
+ } : void 0,
5612
+ [onSelect, rows, list.length]
5613
+ );
5614
+ const dataTable = useMemo(() => comboChartDataTable(rows, index, list, formatters, labels, locale), [rows, index, list, formatters, labels, locale]);
5615
+ const label2 = ariaLabel ?? textOf4(locale).chart;
5616
+ return /* @__PURE__ */ jsx(
5617
+ ChartFrame,
5618
+ {
5619
+ ...chartRootProps(rest),
5620
+ ref: frameRef,
5621
+ title,
5622
+ summary,
5623
+ isLoading: isLoading ?? false,
5624
+ isEmpty: rows.length === 0,
5625
+ emptyState,
5626
+ height,
5627
+ variant: "bar",
5628
+ ariaLabel: label2,
5629
+ className,
5630
+ dataTable,
5631
+ children: /* @__PURE__ */ jsx(EChart, { option, onEvents, height: "100%", ariaLabel: label2, actions, fileName, exportHeader: { title, summary } })
5632
+ }
5633
+ );
5634
+ }
5635
+ function resolveColors(tokens, series) {
5636
+ const resolved = resolveChartColors(
5637
+ ["var(--muted-foreground)", ...series.map((s, i) => s.color ?? DEFAULT_CHART_COLORS[i % DEFAULT_CHART_COLORS.length])],
5638
+ tokens
5639
+ );
5640
+ return { reference: resolved[0] ?? "", series: resolved.slice(1) };
5641
+ }
5642
+ var ComboChart = forwardRef(ComboChartImpl);
5643
+ ComboChart.displayName = "ComboChart";
5644
+
5645
+ // ../squadkit/registry/lib/color-ramp.ts
5646
+ var RAMP_FLOOR_SHARE = 0.2;
5647
+ var RAMP_LIGHT_TEXT_FROM = 0.55;
5648
+ function parseRgb2(color) {
5649
+ const hex = /^#([0-9a-f]{6})$/i.exec(color.trim());
5650
+ if (hex) {
5651
+ const n = parseInt(hex[1], 16);
5652
+ return [n >> 16 & 255, n >> 8 & 255, n & 255];
5653
+ }
5654
+ const rgb = /^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/i.exec(color.trim());
5655
+ return rgb ? [Number(rgb[1]), Number(rgb[2]), Number(rgb[3])] : null;
5656
+ }
5657
+ var toLinear2 = (c) => (c /= 255) <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
5658
+ var fromLinear2 = (c) => Math.round(255 * Math.min(1, Math.max(0, c <= 31308e-7 ? c * 12.92 : 1.055 * c ** (1 / 2.4) - 0.055)));
5659
+ function toOklab2([r, g, b]) {
5660
+ const [lr, lg, lb] = [toLinear2(r), toLinear2(g), toLinear2(b)];
5661
+ const l = Math.cbrt(0.4122214708 * lr + 0.5363325363 * lg + 0.0514459929 * lb);
5662
+ const m = Math.cbrt(0.2119034982 * lr + 0.6806995451 * lg + 0.1073969566 * lb);
5663
+ const t = Math.cbrt(0.0883024619 * lr + 0.2817188376 * lg + 0.6299787005 * lb);
5664
+ return [0.2104542553 * l + 0.793617785 * m - 0.0040720468 * t, 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * t, 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * t];
5665
+ }
5666
+ function fromOklab2([L, a, b]) {
5667
+ const l = (L + 0.3963377774 * a + 0.2158037573 * b) ** 3;
5668
+ const m = (L - 0.1055613458 * a - 0.0638541728 * b) ** 3;
5669
+ const t = (L - 0.0894841775 * a - 1.291485548 * b) ** 3;
5670
+ const rgb = [4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * t, -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * t, -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * t];
5671
+ return `rgb(${rgb.map(fromLinear2).join(", ")})`;
5672
+ }
5673
+ function withAlpha3(color, alpha) {
5674
+ const c = parseRgb2(color);
5675
+ return c ? `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${alpha})` : color;
5676
+ }
5677
+ function mixIntoSurface2(color, surface, share) {
5678
+ const c = parseRgb2(color);
5679
+ const s = surface ? parseRgb2(surface) : null;
5680
+ if (!c || !s) return withAlpha3(color, share);
5681
+ const [c1, c2] = [toOklab2(c), toOklab2(s)];
5682
+ return fromOklab2([0, 1, 2].map((i) => c2[i] + (c1[i] - c2[i]) * share));
5683
+ }
5684
+ function rampRatio(value, min, max) {
5685
+ return max > min ? Math.min(1, Math.max(0, (value - min) / (max - min))) : 1;
5686
+ }
5687
+ function rampColor(color, surface, ratio) {
5688
+ return mixIntoSurface2(color, surface, RAMP_FLOOR_SHARE + (1 - RAMP_FLOOR_SHARE) * Math.min(1, Math.max(0, ratio)));
5689
+ }
5690
+ function rampGradientCss(tone) {
5691
+ return `linear-gradient(to right, color-mix(in oklch, var(--${tone}) ${RAMP_FLOOR_SHARE * 100}%, var(--card)), var(--${tone}))`;
5692
+ }
5693
+ var GEO_MAPS = ["japan", "us", "world"];
5694
+ var geoMapKey = (name) => `squadkit-${name}`;
5695
+ var GEO_ASPECT_SCALE = { japan: 0.8, us: 0.8, world: 0.75 };
5696
+ function fold(text) {
5697
+ return text.normalize("NFKC").normalize("NFD").replace(/[̀-ͯ]/g, "").normalize("NFC").toLowerCase().trim();
5698
+ }
5699
+ var SEPARATORS = /[\s.,'’`"()_\-‐・・]/g;
5700
+ var squash = (text) => text.replace(SEPARATORS, "");
5701
+ function regionKeys(raw) {
5702
+ if (raw === null || raw === void 0) return [];
5703
+ const text = fold(String(raw));
5704
+ if (!text) return [];
5705
+ const keys = [squash(text)];
5706
+ const stripped = text.replace(/[\s-]+(prefecture|pref|ken|fu|to|state)$/, "").replace(/^(state of|the)\s+/, "").replace(/(?<=..)(都|府|県|州)$/, "");
5707
+ if (stripped !== text) keys.push(squash(stripped));
5708
+ if (/^\d{1,2}$/.test(text)) keys.push(`jp${text.padStart(2, "0")}`);
5709
+ return [...new Set(keys.filter(Boolean))];
5710
+ }
5711
+ var ALIASES = {
5712
+ "US-DC": ["District of Columbia", "Washington DC", "Washington, D.C.", "\u30EF\u30B7\u30F3\u30C8\u30F3DC", "\u30B3\u30ED\u30F3\u30D3\u30A2\u7279\u5225\u533A"],
5713
+ USA: ["United States", "US", "USA", "America", "\u7C73\u56FD", "\u30A2\u30E1\u30EA\u30AB"],
5714
+ GBR: ["UK", "Great Britain", "Britain", "\u82F1\u56FD"],
5715
+ KOR: ["Korea", "Republic of Korea", "Korea, Republic of", "\u97D3\u56FD"],
5716
+ PRK: ["DPRK", "\u5317\u671D\u9BAE"],
5717
+ CHN: ["China", "\u4E2D\u56FD"],
5718
+ TWN: ["TW", "\u53F0\u6E7E"],
5719
+ RUS: ["Russian Federation"],
5720
+ CZE: ["Czechia"],
5721
+ VNM: ["Viet Nam"],
5722
+ CIV: ["C\xF4te d'Ivoire"],
5723
+ SWZ: ["Swaziland"],
5724
+ MKD: ["Macedonia"],
5725
+ COD: ["DR Congo", "Congo-Kinshasa"],
5726
+ COG: ["Congo", "Congo-Brazzaville"]
5727
+ };
5728
+ var SKIP_NAME = /* @__PURE__ */ new Set(["US-DC"]);
5729
+ var indexCache = /* @__PURE__ */ new WeakMap();
5730
+ function buildGeoIndex(map, collection) {
5731
+ const cached = indexCache.get(collection);
5732
+ if (cached) return cached;
5733
+ const byKey = /* @__PURE__ */ new Map();
5734
+ const byCode = /* @__PURE__ */ new Map();
5735
+ const add = (key, code) => {
5736
+ for (const k of regionKeys(key)) if (!byKey.has(k)) byKey.set(k, code);
5737
+ };
5738
+ for (const { properties: p } of collection.features) {
5739
+ byCode.set(p.code, p);
5740
+ add(p.code, p.code);
5741
+ const short = p.code.split("-")[1];
5742
+ if (short) add(short, p.code);
5743
+ if (p.alpha2) add(p.alpha2, p.code);
5744
+ if (map === "japan" && short) add(String(Number(short)), p.code);
5745
+ }
5746
+ for (const { properties: p } of collection.features) {
5747
+ if (!SKIP_NAME.has(p.code)) add(p.name, p.code);
5748
+ add(p.name_ja, p.code);
5749
+ for (const alias of ALIASES[p.code] ?? []) add(alias, p.code);
5750
+ }
5751
+ const index = { map, byKey, byCode };
5752
+ indexCache.set(collection, index);
5753
+ return index;
5754
+ }
5755
+ function matchRegion(index, raw) {
5756
+ for (const key of regionKeys(raw)) {
5757
+ const code = index.byKey.get(key);
5758
+ if (code) return code;
5759
+ }
5760
+ return null;
5761
+ }
5762
+ function regionName(properties, language) {
5763
+ return language === "ja" && properties.name_ja ? properties.name_ja : properties.name.replace(/ Prefecture$/, "");
5764
+ }
5765
+ function detectGeoMap(values, loaded2) {
5766
+ const distinct = [...new Set(values.filter((v) => v !== null && v !== void 0 && String(v).trim() !== "").map(String))];
5767
+ let best = null;
5768
+ let bestCount = 0;
5769
+ for (const map of GEO_MAPS) {
5770
+ const collection = loaded2[map];
5771
+ if (!collection) continue;
5772
+ const index = buildGeoIndex(map, collection);
5773
+ const count = distinct.filter((v) => matchRegion(index, v) !== null).length;
5774
+ if (count > bestCount) [best, bestCount] = [map, count];
5775
+ }
5776
+ return best;
5777
+ }
5778
+ var BOUNDS = {
5779
+ japan: [122, 20, 154, 46.5],
5780
+ us: [-180, 18, -65, 72]
5781
+ };
5782
+ function detectBasemap(points) {
5783
+ if (points.length === 0) return "world";
5784
+ for (const map of ["japan", "us"]) {
5785
+ const [w, s, e, n] = BOUNDS[map];
5786
+ if (points.every(([lon, lat]) => lon >= w && lon <= e && lat >= s && lat <= n)) return map;
5787
+ }
5788
+ return "world";
5789
+ }
5790
+ var US_INSETS = [
5791
+ // Alaska (the Aleutians stop short of the antimeridian in this data).
5792
+ { box: [-180, 51, -129.5, 72], center: [-149, 63], to: [-117, 25.5], scale: 0.35 },
5793
+ // Hawaii.
5794
+ { box: [-161, 18.5, -154.5, 22.5], center: [-157.5, 20.5], to: [-106, 25.5], scale: 1 }
5795
+ ];
5796
+ function insetUsPoint(lon, lat) {
5797
+ for (const inset of US_INSETS) {
5798
+ const [w, s, e, n] = inset.box;
5799
+ if (lon >= w && lon <= e && lat >= s && lat <= n) {
5800
+ return [inset.to[0] + (lon - inset.center[0]) * inset.scale, inset.to[1] + (lat - inset.center[1]) * inset.scale];
5801
+ }
5802
+ }
5803
+ return [lon, lat];
5804
+ }
5805
+ function insetUs(collection) {
5806
+ const moveRing = (ring) => ring.map(([lon, lat]) => insetUsPoint(lon, lat));
5807
+ return {
5808
+ type: "FeatureCollection",
5809
+ features: collection.features.map((f) => {
5810
+ if (f.properties.code !== "US-AK" && f.properties.code !== "US-HI") return f;
5811
+ const g = f.geometry;
5812
+ const geometry = g.type === "Polygon" ? { type: "Polygon", coordinates: g.coordinates.map(moveRing) } : { type: "MultiPolygon", coordinates: g.coordinates.map((poly) => poly.map(moveRing)) };
5813
+ return { ...f, geometry };
5814
+ })
5815
+ };
5816
+ }
5817
+ var loading = /* @__PURE__ */ new Map();
5818
+ var loaded = /* @__PURE__ */ new Map();
5819
+ function loadedGeoMap(name) {
5820
+ return loaded.get(name);
5821
+ }
5822
+ function loadGeoMap(name) {
5823
+ const pending = loading.get(name);
5824
+ if (pending) return pending;
5825
+ const promise = (name === "japan" ? import('./geo-japan-7BMSOJRX.js').then((m) => m.JAPAN_PREFECTURES) : name === "us" ? import('./geo-us-GVOG7VXH.js').then((m) => insetUs(m.US_STATES)) : import('./geo-world-35HL56UU.js').then((m) => m.WORLD_COUNTRIES)).then((collection) => {
5826
+ registerMap(geoMapKey(name), collection);
5827
+ loaded.set(name, collection);
5828
+ return collection;
5829
+ });
5830
+ promise.catch(() => loading.delete(name));
5831
+ loading.set(name, promise);
5832
+ return promise;
5833
+ }
5834
+ async function loadGeoMapFor(values, map) {
5835
+ if (map !== "auto") return { name: map, collection: await loadGeoMap(map) };
5836
+ const distinct = [...new Set(values.filter((v) => v !== null && v !== void 0).map(String))];
5837
+ const [japan, us] = await Promise.all([loadGeoMap("japan"), loadGeoMap("us")]);
5838
+ const local = { japan, us };
5839
+ const pick = detectGeoMap(distinct, local);
5840
+ if (pick) {
5841
+ const index = buildGeoIndex(pick, local[pick]);
5842
+ const matched = distinct.filter((v) => matchRegion(index, v) !== null).length;
5843
+ if (matched * 2 >= distinct.length) return { name: pick, collection: local[pick] };
5844
+ }
5845
+ const world = await loadGeoMap("world");
5846
+ const name = detectGeoMap(distinct, { ...local, world }) ?? "world";
5847
+ return { name, collection: name === "world" ? world : local[name] };
5848
+ }
5849
+ function useGeoMap(values, map) {
5850
+ const key = useMemo(() => [...new Set(values.map((v) => v === null || v === void 0 ? "" : String(v)))].join("\0"), [values]);
5851
+ const [state, setState] = useState(null);
5852
+ const wanted = `${map}${key}`;
5853
+ useEffect(() => {
5854
+ let alive = true;
5855
+ loadGeoMapFor(key ? key.split("\0") : [], map).then(
5856
+ (result) => alive && setState({ key: wanted, result }),
5857
+ () => {
5858
+ }
5859
+ );
5860
+ return () => {
5861
+ alive = false;
5862
+ };
5863
+ }, [wanted]);
5864
+ if (state?.key === wanted) return state.result;
5865
+ const ready = map !== "auto" ? loadedGeoMap(map) : void 0;
5866
+ return ready && map !== "auto" ? { name: map, collection: ready } : null;
5867
+ }
5868
+ use([MapChart]);
5869
+ function buildFilledMapModel(config) {
5870
+ const { data, region, value, map, collection } = config;
5871
+ const language = uiLanguage(resolveLocale(config.locale));
5872
+ const index = buildGeoIndex(map, collection);
5873
+ const byCode = /* @__PURE__ */ new Map();
5874
+ const unmatched = [];
5875
+ for (const row of data) {
5876
+ if (!row || typeof row !== "object") continue;
5877
+ const code = matchRegion(index, row[region]);
5878
+ if (code) byCode.set(code, row);
5879
+ else unmatched.push(row);
5880
+ }
5881
+ let lo = Infinity;
5882
+ let hi = -Infinity;
5883
+ const regions = collection.features.map(({ properties }) => {
5884
+ const row = byCode.get(properties.code) ?? null;
5885
+ const n = row ? toChartNumber(row[value]) : null;
5886
+ if (n !== null) [lo, hi] = [Math.min(lo, n), Math.max(hi, n)];
5887
+ const key = row ? String(row[region]) : null;
5888
+ return { code: properties.code, key, name: (key !== null ? config.labels?.[key] : void 0) ?? regionName(properties, language), value: n, row };
5889
+ });
5890
+ const min = config.scale?.min ?? (Number.isFinite(lo) ? lo : 0);
5891
+ let max = config.scale?.max ?? (Number.isFinite(hi) ? hi : 1);
5892
+ if (max <= min) max = min + 1;
5893
+ const selectedCodes = config.selected && config.selected.length > 0 ? new Set(config.selected.map((v) => matchRegion(index, v)).filter((c) => c !== null)) : null;
5894
+ return { map, regions, unmatched, selectedCodes, min, max };
5895
+ }
5896
+ function escapeHtml4(text) {
5897
+ return text.replace(/[&<>"']/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[c]);
5898
+ }
5899
+ var TEXT15 = {
5900
+ ja: {
5901
+ join: "\u30FB",
5902
+ region: "\u5730\u57DF",
5903
+ notOnMap: "(\u5730\u56F3\u306B\u7121\u3044)",
5904
+ top: (name, value) => `\u6700\u5927\u306F ${name} \u306E ${value}`,
5905
+ chart: (value) => `${value}\u306E\u5730\u56F3`
5906
+ },
5907
+ en: {
5908
+ join: ", ",
5909
+ region: "Region",
5910
+ notOnMap: " (not on the map)",
5911
+ top: (name, value) => `Highest: ${name} (${value})`,
5912
+ chart: (value) => `Map of ${value}`
5913
+ }
5914
+ };
5915
+ var textOf5 = (locale) => TEXT15[uiLanguage(resolveLocale(locale))];
5916
+ function detailText(raw, formatter) {
5917
+ if (raw === null || raw === void 0 || raw === "") return EMPTY_VALUE;
5918
+ const n = typeof raw === "string" ? null : toChartNumber(raw);
5919
+ return n === null ? String(raw) : formatter(n);
5920
+ }
5921
+ function buildFilledMapOption(config) {
5922
+ const { model, labels, valueFormatter } = config;
5923
+ const t = textOf5(config.locale);
5924
+ const label2 = (key) => labels?.[key] ?? key;
5925
+ const base = config.color || "#6366f1";
5926
+ const border = config.surfaceColor ?? "#ffffff";
5927
+ const dimmed = (r) => model.selectedCodes !== null && !model.selectedCodes.has(r.code);
5928
+ const tooltip = (r) => {
5929
+ const head = `${escapeHtml4(r.name)} ${r.value === null ? EMPTY_VALUE : escapeHtml4(valueFormatter(r.value))}`;
5930
+ const extras = (config.details ?? []).map((key) => `${escapeHtml4(label2(key))} ${escapeHtml4(detailText(r.row?.[key], valueFormatter))}`).join(t.join);
5931
+ return extras ? `${head}${t.join}${extras}` : head;
5932
+ };
5933
+ const option = {
5934
+ animation: false,
5935
+ tooltip: config.showTooltip ? { trigger: "item", formatter: (p) => tooltip(p.data.region) } : { show: false },
5936
+ series: [
5937
+ {
5938
+ id: "regions",
5939
+ type: "map",
5940
+ map: geoMapKey(model.map),
5941
+ nameProperty: "code",
5942
+ aspectScale: GEO_ASPECT_SCALE[model.map],
5943
+ roam: false,
5944
+ selectedMode: false,
5945
+ left: 8,
5946
+ right: 8,
5947
+ top: 8,
5948
+ bottom: 8,
5949
+ label: { show: false },
5950
+ itemStyle: { areaColor: config.emptyColor, borderColor: border, borderWidth: 0.6 },
5951
+ emphasis: { label: { show: false }, itemStyle: { borderColor: config.hoverColor, borderWidth: 1.2 } },
5952
+ data: model.regions.map((r) => {
5953
+ const fill = r.value === null ? config.emptyColor : rampColor(base, config.surfaceColor, rampRatio(r.value, model.min, model.max));
5954
+ const areaColor = dimmed(r) ? mixIntoSurface2(fill, config.surfaceColor, 0.3) : fill;
5955
+ return {
5956
+ name: r.code,
5957
+ value: r.value ?? void 0,
5958
+ region: r,
5959
+ itemStyle: { areaColor },
5960
+ emphasis: { itemStyle: { areaColor } }
5961
+ };
5962
+ })
5963
+ }
5964
+ ]
5965
+ };
5966
+ return config.chartOptions ? mergeDeep3(option, config.chartOptions) : option;
5967
+ }
5968
+ function mergeDeep3(a, b) {
5969
+ const out = { ...a };
5970
+ for (const [k, v] of Object.entries(b)) {
5971
+ const cur = out[k];
5972
+ out[k] = v && cur && typeof v === "object" && typeof cur === "object" && !Array.isArray(v) && !Array.isArray(cur) ? mergeDeep3(cur, v) : v;
5973
+ }
5974
+ return out;
5975
+ }
5976
+ function filledMapDataTable(model, names, formatter, details = [], labels, locale) {
5977
+ const t = textOf5(locale);
5978
+ const label2 = (key) => labels?.[key] ?? key;
5979
+ const cells = (row, value) => [
5980
+ value === null ? EMPTY_VALUE : formatter(value),
5981
+ ...details.map((key) => detailText(row?.[key], formatter))
5982
+ ];
5983
+ const rows = [
5984
+ ...model.regions.filter((r) => r.row !== null).map((r) => [r.name, ...cells(r.row, r.value)]),
5985
+ ...model.unmatched.map((row) => [`${label2(String(row[names.region] ?? EMPTY_VALUE))}${t.notOnMap}`, ...cells(row, toChartNumber(row[names.value]))])
5986
+ ];
5987
+ return { columns: [labels?.[names.region] ?? t.region, label2(names.value), ...details.map(label2)], rows };
5988
+ }
5989
+ function buildFilledMapSummary(model, formatter, title, locale) {
5990
+ let best;
5991
+ for (const r of model.regions) if (r.value !== null && (!best || r.value > best.value)) best = r;
5992
+ if (!best) return void 0;
5993
+ return `${title ? `${title}: ` : ""}${textOf5(locale).top(best.name, formatter(best.value))}`;
5994
+ }
5995
+ function colorsFor2(tokens, tone) {
5996
+ const [color = "", empty = "", hover = ""] = resolveChartColors([tone, "var(--muted)", "var(--foreground)"], tokens);
5997
+ return { color, empty, hover };
5998
+ }
5999
+ var NO_ROWS13 = [];
6000
+ function FilledMapImpl({
6001
+ data = NO_ROWS13,
6002
+ region,
6003
+ value,
6004
+ map = "auto",
6005
+ labels,
6006
+ format,
6007
+ valueFormatter,
6008
+ tone = "chart-1",
6009
+ scale,
6010
+ showLegend = true,
6011
+ showTooltip = true,
6012
+ details,
6013
+ selected,
6014
+ onSelect,
6015
+ title,
6016
+ summary,
6017
+ isLoading,
6018
+ emptyState,
6019
+ height,
6020
+ chartOptions,
6021
+ actions,
6022
+ fileName,
6023
+ className,
6024
+ ariaLabel,
6025
+ ...rest
6026
+ }, ref) {
6027
+ const rows = Array.isArray(data) ? data : NO_ROWS13;
6028
+ const { ref: frameRef, surface, tokens } = useChartSurface(ref);
6029
+ const locale = useLocale();
6030
+ const formatter = useMemo(() => resolveValueFormatter(valueFormatter, format ?? "number", locale), [valueFormatter, format, locale]);
6031
+ const regionValues = useMemo(() => rows.map((row) => row && typeof row === "object" ? row[region] : void 0), [rows, region]);
6032
+ const geo = useGeoMap(regionValues, map);
6033
+ const model = useMemo(
6034
+ () => geo ? buildFilledMapModel({ data: rows, region, value, map: geo.name, collection: geo.collection, scale, labels, selected, locale }) : null,
6035
+ [geo, rows, region, value, scale?.min, scale?.max, labels, selected, locale]
6036
+ );
6037
+ const colors = useMemo(() => colorsFor2(tokens, tone), [tokens, tone]);
6038
+ const option = useMemo(
6039
+ () => model ? buildFilledMapOption({
6040
+ model,
6041
+ color: colors.color,
6042
+ surfaceColor: surface ?? void 0,
6043
+ emptyColor: colors.empty || "rgba(128, 128, 128, 0.15)",
6044
+ hoverColor: colors.hover || "#000000",
6045
+ labels,
6046
+ valueFormatter: formatter,
6047
+ details,
6048
+ showTooltip,
6049
+ chartOptions,
6050
+ locale
6051
+ }) : null,
6052
+ [model, value, colors, surface, labels, formatter, details, showTooltip, chartOptions, locale]
6053
+ );
6054
+ const onEvents = useMemo(
6055
+ () => onSelect ? {
6056
+ click: (params) => {
6057
+ const r = params.data?.region;
6058
+ if (r?.row) onSelect(String(r.row[region]), r.row);
6059
+ }
6060
+ } : void 0,
6061
+ [onSelect, region]
6062
+ );
6063
+ const dataTable = useMemo(
6064
+ () => model ? filledMapDataTable(model, { region, value }, formatter, details, labels, locale) : void 0,
6065
+ [model, region, value, formatter, details, labels, locale]
6066
+ );
6067
+ const resolvedSummary = useMemo(
6068
+ () => summary === "auto" ? model ? buildFilledMapSummary(model, formatter, title, locale) : void 0 : summary,
6069
+ [summary, model, formatter, title, locale]
6070
+ );
6071
+ const label2 = ariaLabel ?? textOf5(locale).chart(labels?.[value] ?? value ?? "");
6072
+ const isEmpty = rows.length === 0;
6073
+ return /* @__PURE__ */ jsx(
6074
+ ChartFrame,
6075
+ {
6076
+ ...chartRootProps(rest),
6077
+ ref: frameRef,
6078
+ title,
6079
+ summary: resolvedSummary,
6080
+ isLoading: (isLoading ?? false) || !isEmpty && !option,
6081
+ isEmpty,
6082
+ emptyState,
6083
+ height,
6084
+ variant: "bar",
6085
+ ariaLabel: label2,
6086
+ className,
6087
+ dataTable,
6088
+ children: /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col gap-2", children: [
6089
+ /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1", children: option && /* @__PURE__ */ jsx(EChart, { option, onEvents, height: "100%", ariaLabel: label2, actions, fileName, exportHeader: { title, summary: resolvedSummary } }) }),
6090
+ showLegend && model ? /* @__PURE__ */ jsx(RampLegend, { min: model.min, max: model.max, formatter, tone }) : null
6091
+ ] })
6092
+ }
6093
+ );
6094
+ }
6095
+ function RampLegend({ min, max, formatter, tone }) {
6096
+ return /* @__PURE__ */ jsx("div", { "data-slot": "filled-map-legend", className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground tabular-nums", children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
6097
+ /* @__PURE__ */ jsx("span", { children: formatter(min) }),
6098
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "h-2 w-24 rounded-sm", style: { backgroundImage: rampGradientCss(tone) } }),
6099
+ /* @__PURE__ */ jsx("span", { children: formatter(max) })
6100
+ ] }) });
6101
+ }
6102
+ var FilledMap = forwardRef(FilledMapImpl);
6103
+ FilledMap.displayName = "FilledMap";
6104
+ use([ScatterChart$1, GeoComponent]);
6105
+ var SYMBOL_MAP_MIN_SIZE = 6;
6106
+ var SYMBOL_MAP_MAX_SIZE = 36;
6107
+ var SYMBOL_MAP_DEFAULT_SIZE = 10;
6108
+ var MAX_CATEGORIES = 5;
6109
+ var isBlank = (v) => v === null || v === void 0 || typeof v === "string" && v.trim() === "";
6110
+ function buildSymbolMapModel(config) {
6111
+ const { data, latitude, longitude, name, size, color } = config;
6112
+ const rows = data.filter((row) => row && typeof row === "object");
6113
+ const colorValues = color ? rows.map((row) => row[color]).filter((v) => !isBlank(v)) : [];
6114
+ const colorMode = !color || colorValues.length === 0 ? "none" : colorValues.every((v) => toChartNumber(v) !== null) ? "numeric" : "category";
6115
+ const points = [];
6116
+ const unplotted = [];
6117
+ const categories = [];
6118
+ let [lo, hi, sizeMax] = [Infinity, -Infinity, 0];
6119
+ for (const row of rows) {
6120
+ const lat = toChartNumber(row[latitude]);
6121
+ const lon = toChartNumber(row[longitude]);
6122
+ if (lat === null || lon === null || Math.abs(lat) > 90 || Math.abs(lon) > 180) {
6123
+ unplotted.push(row);
6124
+ continue;
6125
+ }
6126
+ const s = size ? toChartNumber(row[size]) : null;
6127
+ if (s !== null && s > sizeMax) sizeMax = s;
6128
+ const shade = colorMode === "numeric" ? toChartNumber(row[color]) : null;
6129
+ if (shade !== null) [lo, hi] = [Math.min(lo, shade), Math.max(hi, shade)];
6130
+ const category = colorMode === "category" && !isBlank(row[color]) ? String(row[color]) : null;
6131
+ if (category !== null && !categories.includes(category)) categories.push(category);
6132
+ points.push({ lon, lat, name: name && !isBlank(row[name]) ? String(row[name]) : null, size: s, shade, category, row });
6133
+ }
6134
+ const shadeMin = Number.isFinite(lo) ? lo : 0;
6135
+ let shadeMax = Number.isFinite(hi) ? hi : 1;
6136
+ if (shadeMax <= shadeMin) shadeMax = shadeMin + 1;
6137
+ return { points, unplotted, colorMode, categories, shadeMin, shadeMax, sizeMax };
6138
+ }
6139
+ function symbolMapSize(value, max, hasSize) {
6140
+ if (!hasSize) return SYMBOL_MAP_DEFAULT_SIZE;
6141
+ if (value === null || value <= 0 || !(max > 0)) return SYMBOL_MAP_MIN_SIZE;
6142
+ return SYMBOL_MAP_MIN_SIZE + (SYMBOL_MAP_MAX_SIZE - SYMBOL_MAP_MIN_SIZE) * Math.sqrt(Math.min(1, value / max));
6143
+ }
6144
+ function escapeHtml5(text) {
6145
+ return text.replace(/[&<>"']/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[c]);
6146
+ }
6147
+ var TEXT16 = {
6148
+ ja: {
6149
+ join: "\u30FB",
6150
+ point: "\u5730\u70B9",
6151
+ latitude: "\u7DEF\u5EA6",
6152
+ longitude: "\u7D4C\u5EA6",
6153
+ notPlotted: "(\u5EA7\u6A19\u306A\u3057)",
6154
+ chart: "\u5730\u70B9\u306E\u5730\u56F3"
6155
+ },
6156
+ en: {
6157
+ join: ", ",
6158
+ point: "Point",
6159
+ latitude: "Latitude",
6160
+ longitude: "Longitude",
6161
+ notPlotted: " (no coordinates)",
6162
+ chart: "Map of points"
6163
+ }
6164
+ };
6165
+ var textOf6 = (locale) => TEXT16[uiLanguage(resolveLocale(locale))];
6166
+ var coordText = (n) => n === null ? EMPTY_VALUE : n.toFixed(4).replace(/\.?0+$/, "");
6167
+ function buildSymbolMapOption(config) {
6168
+ const { model, labels, valueFormatter, sizeFormatter } = config;
6169
+ const label2 = (key) => labels?.[key] ?? key;
6170
+ const base = config.toneColor || "#6366f1";
6171
+ const selected = config.selected && config.selected.length > 0 ? new Set(config.selected.map(String)) : null;
6172
+ const fillOf = (p) => {
6173
+ if (model.colorMode === "numeric") return p.shade === null ? config.landColor : rampColor(base, config.surfaceColor, rampRatio(p.shade, model.shadeMin, model.shadeMax));
6174
+ if (model.colorMode === "category") {
6175
+ const at = p.category === null ? -1 : model.categories.indexOf(p.category);
6176
+ return at === -1 ? config.categoryColors[MAX_CATEGORIES] ?? base : config.categoryColors[Math.min(at, MAX_CATEGORIES)] ?? base;
6177
+ }
6178
+ return base;
6179
+ };
6180
+ const tooltip = (p) => {
6181
+ const lines = [escapeHtml5(p.name ?? `${coordText(p.lat)}, ${coordText(p.lon)}`)];
6182
+ if (config.size) lines.push(`${escapeHtml5(label2(config.size))} ${p.size === null ? EMPTY_VALUE : escapeHtml5(sizeFormatter(p.size))}`);
6183
+ if (config.color && config.color !== config.size)
6184
+ lines.push(`${escapeHtml5(label2(config.color))} ${model.colorMode === "numeric" ? p.shade === null ? EMPTY_VALUE : escapeHtml5(valueFormatter(p.shade)) : escapeHtml5(label2(p.category ?? EMPTY_VALUE))}`);
6185
+ for (const key of config.details ?? []) lines.push(`${escapeHtml5(label2(key))} ${escapeHtml5(cellText(p.row[key], valueFormatter))}`);
6186
+ return lines.join("<br/>");
6187
+ };
6188
+ const order = [...model.points].sort((a, b) => (b.size ?? 0) - (a.size ?? 0));
6189
+ const option = {
6190
+ animation: false,
6191
+ tooltip: config.showTooltip ? { trigger: "item", formatter: (p) => tooltip(p.data.point) } : { show: false },
6192
+ geo: {
6193
+ map: geoMapKey(config.basemap),
6194
+ silent: true,
6195
+ roam: false,
6196
+ aspectScale: GEO_ASPECT_SCALE[config.basemap],
6197
+ left: 8,
6198
+ right: 8,
6199
+ top: 8,
6200
+ bottom: 8,
6201
+ label: { show: false },
6202
+ itemStyle: { areaColor: config.landColor, borderColor: config.borderColor, borderWidth: 0.6 },
6203
+ emphasis: { disabled: true }
6204
+ },
6205
+ series: [
6206
+ {
6207
+ id: "points",
6208
+ type: "scatter",
6209
+ coordinateSystem: "geo",
6210
+ data: order.map((p) => {
6211
+ const [x, y] = config.basemap === "us" ? insetUsPoint(p.lon, p.lat) : [p.lon, p.lat];
6212
+ const fill = fillOf(p);
6213
+ const dim = selected !== null && !(p.name !== null && selected.has(p.name));
6214
+ return {
6215
+ value: [x, y],
6216
+ point: p,
6217
+ symbolSize: symbolMapSize(p.size, model.sizeMax, !!config.size),
6218
+ itemStyle: { color: dim ? mixIntoSurface2(fill, config.surfaceColor, 0.3) : fill, opacity: dim ? 1 : 0.85 }
6219
+ };
6220
+ }),
6221
+ itemStyle: { borderColor: config.surfaceColor ?? "#ffffff", borderWidth: 1 },
6222
+ emphasis: { scale: false, itemStyle: { opacity: 1, borderColor: config.borderColor, borderWidth: 1.5 } }
6223
+ }
6224
+ ]
6225
+ };
6226
+ return config.chartOptions ? mergeDeep4(option, config.chartOptions) : option;
6227
+ }
6228
+ function cellText(raw, formatter) {
6229
+ if (isBlank(raw)) return EMPTY_VALUE;
6230
+ const n = typeof raw === "string" ? null : toChartNumber(raw);
6231
+ return n === null ? String(raw) : formatter(n);
6232
+ }
6233
+ function mergeDeep4(a, b) {
6234
+ const out = { ...a };
6235
+ for (const [k, v] of Object.entries(b)) {
6236
+ const cur = out[k];
6237
+ out[k] = v && cur && typeof v === "object" && typeof cur === "object" && !Array.isArray(v) && !Array.isArray(cur) ? mergeDeep4(cur, v) : v;
6238
+ }
6239
+ return out;
6240
+ }
6241
+ function symbolMapDataTable(model, names, formatters, details = [], labels, locale) {
6242
+ const t = textOf6(locale);
6243
+ const label2 = (key) => labels?.[key] ?? key;
6244
+ const extra = [names.size, names.color].filter((k) => !!k && k !== names.latitude && k !== names.longitude);
6245
+ const keys = [.../* @__PURE__ */ new Set([...extra, ...details])];
6246
+ const rowCells = (row) => keys.map((key) => key === names.size ? cellText(row[key], formatters.size) : key === names.color && model.colorMode === "category" ? isBlank(row[key]) ? EMPTY_VALUE : label2(String(row[key])) : cellText(row[key], formatters.value));
6247
+ const nameOf = (row) => names.name && !isBlank(row[names.name]) ? String(row[names.name]) : EMPTY_VALUE;
6248
+ const rows = [
6249
+ ...model.points.map((p) => [nameOf(p.row), coordText(p.lat), coordText(p.lon), ...rowCells(p.row)]),
6250
+ ...model.unplotted.map((row) => [
6251
+ `${nameOf(row)}${t.notPlotted}`,
6252
+ coordText(toChartNumber(row[names.latitude])),
6253
+ coordText(toChartNumber(row[names.longitude])),
6254
+ ...rowCells(row)
6255
+ ])
6256
+ ];
6257
+ return {
6258
+ columns: [names.name ? label2(names.name) : t.point, labels?.[names.latitude] ?? t.latitude, labels?.[names.longitude] ?? t.longitude, ...keys.map(label2)],
6259
+ rows
6260
+ };
6261
+ }
6262
+ function colorsFor3(tokens, tone) {
6263
+ const resolved = resolveChartColors([tone, "var(--muted)", "var(--border)", ...DEFAULT_CHART_COLORS, CHART_OTHER_COLOR], tokens);
6264
+ const [toneColor = "", land = "", border = ""] = resolved;
6265
+ return { toneColor, land, border, categories: resolved.slice(3) };
6266
+ }
6267
+ var NO_ROWS14 = [];
6268
+ function SymbolMapImpl({
6269
+ data = NO_ROWS14,
6270
+ latitude,
6271
+ longitude,
6272
+ name,
6273
+ size,
6274
+ color,
6275
+ basemap = "auto",
6276
+ labels,
6277
+ format,
6278
+ sizeFormat,
6279
+ tone = "chart-1",
6280
+ showLegend = true,
6281
+ showTooltip = true,
6282
+ details,
6283
+ selected,
6284
+ onSelect,
6285
+ title,
6286
+ summary,
6287
+ isLoading,
6288
+ emptyState,
6289
+ height,
6290
+ chartOptions,
6291
+ actions,
6292
+ fileName,
6293
+ className,
6294
+ ariaLabel,
6295
+ ...rest
6296
+ }, ref) {
6297
+ const rows = Array.isArray(data) ? data : NO_ROWS14;
6298
+ const { ref: frameRef, surface, tokens } = useChartSurface(ref);
6299
+ const locale = useLocale();
6300
+ const formatter = useMemo(() => resolveValueFormatter(void 0, format ?? "number", locale), [format, locale]);
6301
+ const sizeFormatter = useMemo(() => resolveValueFormatter(void 0, sizeFormat ?? format ?? "number", locale), [sizeFormat, format, locale]);
6302
+ const model = useMemo(() => buildSymbolMapModel({ data: rows, latitude, longitude, name, size, color }), [rows, latitude, longitude, name, size, color]);
6303
+ const resolvedBasemap = useMemo(
6304
+ () => basemap === "auto" ? detectBasemap(model.points.map((p) => [p.lon, p.lat])) : basemap,
6305
+ [basemap, model]
6306
+ );
6307
+ const geo = useGeoMap(NO_ROWS14, resolvedBasemap);
6308
+ const colors = useMemo(() => colorsFor3(tokens, tone), [tokens, tone]);
6309
+ const option = useMemo(
6310
+ () => geo ? buildSymbolMapOption({
6311
+ model,
6312
+ basemap: geo.name,
6313
+ size,
6314
+ color,
6315
+ toneColor: colors.toneColor,
6316
+ categoryColors: colors.categories,
6317
+ surfaceColor: surface ?? void 0,
6318
+ landColor: colors.land || "rgba(128, 128, 128, 0.15)",
6319
+ borderColor: colors.border || "rgba(128, 128, 128, 0.4)",
6320
+ labels,
6321
+ valueFormatter: formatter,
6322
+ sizeFormatter,
6323
+ details,
6324
+ selected,
6325
+ showTooltip,
6326
+ chartOptions}) : null,
6327
+ [geo, model, size, color, colors, surface, labels, formatter, sizeFormatter, details, selected, showTooltip, chartOptions, locale]
6328
+ );
6329
+ const onEvents = useMemo(
6330
+ () => onSelect ? {
6331
+ click: (params) => {
6332
+ const p = params.data?.point;
6333
+ if (p) onSelect(p.row);
6334
+ }
6335
+ } : void 0,
6336
+ [onSelect]
6337
+ );
6338
+ const dataTable = useMemo(
6339
+ () => symbolMapDataTable(model, { latitude, longitude, name, size, color }, { value: formatter, size: sizeFormatter }, details, labels, locale),
6340
+ [model, latitude, longitude, name, size, color, formatter, sizeFormatter, details, labels, locale]
6341
+ );
6342
+ const label2 = ariaLabel ?? textOf6(locale).chart;
6343
+ const isEmpty = rows.length === 0;
6344
+ const legendCategories = model.categories.length > MAX_CATEGORIES ? [...model.categories.slice(0, MAX_CATEGORIES), otherSeriesLabel(locale)] : model.categories;
6345
+ const legend = !showLegend ? null : model.colorMode === "numeric" ? /* @__PURE__ */ jsx("div", { "data-slot": "symbol-map-legend", className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground tabular-nums", children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
6346
+ color && /* @__PURE__ */ jsx("span", { children: labels?.[color] ?? color }),
6347
+ /* @__PURE__ */ jsx("span", { children: formatter(model.shadeMin) }),
6348
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "h-2 w-24 rounded-sm", style: { backgroundImage: rampGradientCss(tone) } }),
6349
+ /* @__PURE__ */ jsx("span", { children: formatter(model.shadeMax) })
6350
+ ] }) }) : model.colorMode === "category" ? /* @__PURE__ */ jsx(Legend, { categories: legendCategories, labels }) : null;
6351
+ return /* @__PURE__ */ jsx(
6352
+ ChartFrame,
6353
+ {
6354
+ ...chartRootProps(rest),
6355
+ ref: frameRef,
6356
+ title,
6357
+ summary,
6358
+ isLoading: (isLoading ?? false) || !isEmpty && !option,
6359
+ isEmpty,
6360
+ emptyState,
6361
+ height,
6362
+ variant: "bar",
6363
+ ariaLabel: label2,
6364
+ className,
6365
+ dataTable,
6366
+ children: /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col gap-2", children: [
6367
+ /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1", children: option && /* @__PURE__ */ jsx(EChart, { option, onEvents, height: "100%", ariaLabel: label2, actions, fileName, exportHeader: { title, summary } }) }),
6368
+ legend
6369
+ ] })
6370
+ }
6371
+ );
6372
+ }
6373
+ var SymbolMap = forwardRef(SymbolMapImpl);
6374
+ SymbolMap.displayName = "SymbolMap";
6375
+ use([TreemapChart]);
6376
+ var MAX_CATEGORIES2 = 5;
6377
+ function buildTreemapModel(config) {
6378
+ const { data, index, group, value, color } = config;
6379
+ const leaves = [];
6380
+ let [lo, hi] = [Infinity, -Infinity];
6381
+ for (const row of data) {
6382
+ if (!row || typeof row !== "object") continue;
6383
+ const shade = color ? toChartNumber(row[color]) : null;
6384
+ if (shade !== null) [lo, hi] = [Math.min(lo, shade), Math.max(hi, shade)];
6385
+ leaves.push({
6386
+ name: String(row[index] ?? EMPTY_VALUE),
6387
+ group: group ? String(row[group] ?? EMPTY_VALUE) : null,
6388
+ value: toChartNumber(row[value]),
6389
+ shade,
6390
+ row
6391
+ });
6392
+ }
6393
+ const byGroup = /* @__PURE__ */ new Map();
6394
+ for (const leaf of leaves) {
6395
+ if (leaf.value === null || leaf.value <= 0) continue;
6396
+ const list = byGroup.get(leaf.group) ?? [];
6397
+ list.push(leaf);
6398
+ byGroup.set(leaf.group, list);
6399
+ }
6400
+ const groups = [...byGroup.entries()].map(([name, list]) => ({ name, total: list.reduce((s, l) => s + l.value, 0), leaves: [...list].sort((a, b) => b.value - a.value) })).sort((a, b) => b.total - a.total);
6401
+ const total = groups.reduce((s, g) => s + g.total, 0);
6402
+ const categories = group ? groups.map((g) => g.name) : [...new Set(groups.flatMap((g) => g.leaves.map((l) => l.name)))];
6403
+ const shadeMin = Number.isFinite(lo) ? lo : 0;
6404
+ let shadeMax = Number.isFinite(hi) ? hi : 1;
6405
+ if (shadeMax <= shadeMin) shadeMax = shadeMin + 1;
6406
+ return { leaves, groups, categories, total, shadeMin, shadeMax };
6407
+ }
6408
+ function escapeHtml6(text) {
6409
+ return text.replace(/[&<>"']/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[c]);
6410
+ }
6411
+ var TEXT17 = {
6412
+ ja: {
6413
+ join: "\u30FB",
6414
+ item: "\u9805\u76EE",
6415
+ group: "\u30B0\u30EB\u30FC\u30D7",
6416
+ share: "\u69CB\u6210\u6BD4",
6417
+ top: (name, share) => `\u6700\u5927\u306F ${name}(\u5168\u4F53\u306E ${share})`,
6418
+ chart: (value) => `${value}\u306E\u30C4\u30EA\u30FC\u30DE\u30C3\u30D7`
6419
+ },
6420
+ en: {
6421
+ join: ", ",
6422
+ item: "Item",
6423
+ group: "Group",
6424
+ share: "Share",
6425
+ top: (name, share) => `Largest: ${name} (${share} of the total)`,
6426
+ chart: (value) => `Treemap of ${value}`
6427
+ }
6428
+ };
6429
+ var textOf7 = (locale) => TEXT17[uiLanguage(resolveLocale(locale))];
6430
+ function buildTreemapOption(config) {
6431
+ const { model, labels, valueFormatter } = config;
6432
+ const t = textOf7(config.locale);
6433
+ const label2 = (key) => labels?.[key] ?? key;
6434
+ const surface = config.surfaceColor ?? "#ffffff";
6435
+ const base = config.toneColor || "#6366f1";
6436
+ const categoryColor = (name) => {
6437
+ const at = model.categories.indexOf(name);
6438
+ return config.categoryColors[at === -1 ? MAX_CATEGORIES2 : Math.min(at, MAX_CATEGORIES2)] ?? base;
6439
+ };
6440
+ const share = (v) => formatValue(model.total > 0 ? v / model.total : 0, "percent", config.locale);
6441
+ const leafNode = (leaf) => {
6442
+ let fill;
6443
+ let dark = true;
6444
+ if (config.colorMode === "numeric") {
6445
+ const ratio = leaf.shade === null ? 0 : rampRatio(leaf.shade, model.shadeMin, model.shadeMax);
6446
+ fill = rampColor(base, config.surfaceColor, ratio);
6447
+ dark = ratio >= RAMP_LIGHT_TEXT_FROM;
6448
+ } else fill = categoryColor(config.hasGroup ? leaf.group : leaf.name);
6449
+ return {
6450
+ name: label2(leaf.name),
6451
+ value: leaf.value,
6452
+ leaf,
6453
+ itemStyle: { color: fill },
6454
+ label: { color: dark ? surface : config.foregroundColor }
6455
+ };
6456
+ };
6457
+ const tooltip = (leaf, name, value) => {
6458
+ const head = leaf?.group != null ? `${escapeHtml6(label2(leaf.group))} / ${escapeHtml6(name)}` : escapeHtml6(name);
6459
+ const parts = [`${head} ${escapeHtml6(valueFormatter(value))}`, `${t.share} ${escapeHtml6(share(value))}`];
6460
+ if (leaf && config.colorKey && config.colorMode === "numeric")
6461
+ parts.push(`${escapeHtml6(label2(config.colorKey))} ${leaf.shade === null ? EMPTY_VALUE : escapeHtml6(config.colorFormatter(leaf.shade))}`);
6462
+ return parts.join(t.join);
6463
+ };
6464
+ const data = config.hasGroup ? model.groups.map((g) => ({
6465
+ name: label2(g.name),
6466
+ value: g.total,
6467
+ itemStyle: { color: config.colorMode === "numeric" ? config.foregroundColor : categoryColor(g.name) },
6468
+ children: g.leaves.map(leafNode)
6469
+ })) : model.groups.flatMap((g) => g.leaves.map(leafNode));
6470
+ const option = {
6471
+ animation: false,
6472
+ tooltip: config.showTooltip ? {
6473
+ trigger: "item",
6474
+ formatter: (p) => {
6475
+ const d = p;
6476
+ return tooltip(d.data?.leaf, d.name, Number(d.value));
6477
+ }
6478
+ } : { show: false },
6479
+ series: [
6480
+ {
6481
+ id: "tiles",
6482
+ type: "treemap",
6483
+ left: 0,
6484
+ right: 0,
6485
+ top: 0,
6486
+ bottom: 0,
6487
+ roam: false,
6488
+ nodeClick: false,
6489
+ breadcrumb: { show: false },
6490
+ squareRatio: 0.5 * (1 + Math.sqrt(5)),
6491
+ label: {
6492
+ show: true,
6493
+ position: "insideTopLeft",
6494
+ overflow: "truncate",
6495
+ lineHeight: 16,
6496
+ formatter: (p) => {
6497
+ const d = p;
6498
+ return `${d.name}
6499
+ ${valueFormatter(Number(d.value))}`;
6500
+ }
6501
+ },
6502
+ upperLabel: { show: config.hasGroup, height: 20, color: surface, fontWeight: 600 },
6503
+ itemStyle: { borderColor: surface, borderWidth: 1, gapWidth: 1 },
6504
+ emphasis: { disabled: true },
6505
+ levels: config.hasGroup ? [{ itemStyle: { borderColor: surface, borderWidth: 2, gapWidth: 2 } }, { itemStyle: { borderColor: surface, borderWidth: 0, gapWidth: 1 } }] : [{ itemStyle: { borderColor: surface, borderWidth: 0, gapWidth: 1 } }],
6506
+ data
6507
+ }
6508
+ ]
6509
+ };
6510
+ return config.chartOptions ? mergeDeep5(option, config.chartOptions) : option;
6511
+ }
6512
+ function mergeDeep5(a, b) {
6513
+ const out = { ...a };
6514
+ for (const [k, v] of Object.entries(b)) {
6515
+ const cur = out[k];
6516
+ out[k] = v && cur && typeof v === "object" && typeof cur === "object" && !Array.isArray(v) && !Array.isArray(cur) ? mergeDeep5(cur, v) : v;
6517
+ }
6518
+ return out;
6519
+ }
6520
+ function treemapDataTable(model, names, formatters, labels, locale) {
6521
+ const t = textOf7(locale);
6522
+ const label2 = (key) => labels?.[key] ?? key;
6523
+ const share = (v) => v === null || v <= 0 || model.total <= 0 ? EMPTY_VALUE : formatValue(v / model.total, "percent", locale);
6524
+ return {
6525
+ columns: [
6526
+ ...names.group ? [labels?.[names.group] ?? t.group] : [],
6527
+ labels?.[names.index] ?? t.item,
6528
+ label2(names.value),
6529
+ t.share,
6530
+ ...names.color && names.color !== names.value ? [label2(names.color)] : []
6531
+ ],
6532
+ rows: model.leaves.map((leaf) => [
6533
+ ...names.group ? [label2(leaf.group ?? EMPTY_VALUE)] : [],
6534
+ label2(leaf.name),
6535
+ leaf.value === null ? EMPTY_VALUE : formatters.value(leaf.value),
6536
+ share(leaf.value),
6537
+ ...names.color && names.color !== names.value ? [leaf.shade === null ? EMPTY_VALUE : formatters.color(leaf.shade)] : []
6538
+ ])
6539
+ };
6540
+ }
6541
+ function buildTreemapSummary(model, title, labels, locale) {
6542
+ let best;
6543
+ for (const g of model.groups) for (const l of g.leaves) if (!best || l.value > best.value) best = l;
6544
+ if (!best || model.total <= 0) return void 0;
6545
+ return `${title ? `${title}: ` : ""}${textOf7(locale).top(labels?.[best.name] ?? best.name, formatValue(best.value / model.total, "percent", locale))}`;
6546
+ }
6547
+ function colorsFor4(tokens, tone) {
6548
+ const resolved = resolveChartColors([tone, "var(--foreground)", ...DEFAULT_CHART_COLORS, CHART_OTHER_COLOR], tokens);
6549
+ const [toneColor = "", foreground = ""] = resolved;
6550
+ return { toneColor, foreground, categories: resolved.slice(2) };
6551
+ }
6552
+ var NO_ROWS15 = [];
6553
+ function TreemapImpl({
6554
+ data = NO_ROWS15,
6555
+ index,
6556
+ group,
6557
+ value,
6558
+ color,
6559
+ labels,
6560
+ format,
6561
+ colorFormat,
6562
+ valueFormatter,
6563
+ tone = "chart-1",
6564
+ showLegend = true,
6565
+ showTooltip = true,
6566
+ onSelect,
6567
+ title,
6568
+ summary,
6569
+ isLoading,
6570
+ emptyState,
6571
+ height,
6572
+ chartOptions,
6573
+ actions,
6574
+ fileName,
6575
+ className,
6576
+ ariaLabel,
6577
+ ...rest
6578
+ }, ref) {
6579
+ const rows = Array.isArray(data) ? data : NO_ROWS15;
6580
+ const { ref: frameRef, surface, tokens } = useChartSurface(ref);
6581
+ const locale = useLocale();
6582
+ const formatter = useMemo(() => resolveValueFormatter(valueFormatter, format ?? "number", locale), [valueFormatter, format, locale]);
6583
+ const colorFormatter = useMemo(() => resolveValueFormatter(void 0, colorFormat ?? format ?? "number", locale), [colorFormat, format, locale]);
6584
+ const model = useMemo(() => buildTreemapModel({ data: rows, index, group, value, color }), [rows, index, group, value, color]);
6585
+ const colorMode = color ? "numeric" : "category";
6586
+ const colors = useMemo(() => colorsFor4(tokens, tone), [tokens, tone]);
6587
+ const option = useMemo(
6588
+ () => buildTreemapOption({
6589
+ model,
6590
+ hasGroup: !!group,
6591
+ colorMode,
6592
+ toneColor: colors.toneColor,
6593
+ categoryColors: colors.categories,
6594
+ surfaceColor: surface ?? void 0,
6595
+ foregroundColor: colors.foreground || tokens?.foreground || "#111111",
6596
+ labels,
6597
+ valueFormatter: formatter,
6598
+ colorFormatter,
6599
+ colorKey: color,
6600
+ showTooltip,
6601
+ chartOptions,
6602
+ locale
6603
+ }),
6604
+ [model, group, colorMode, colors, surface, tokens, labels, formatter, colorFormatter, color, showTooltip, chartOptions, locale]
6605
+ );
6606
+ const onEvents = useMemo(
6607
+ () => onSelect ? {
6608
+ click: (params) => {
6609
+ const leaf = params.data?.leaf;
6610
+ if (leaf) onSelect(leaf.row);
6611
+ }
6612
+ } : void 0,
6613
+ [onSelect]
6614
+ );
6615
+ const dataTable = useMemo(
6616
+ () => treemapDataTable(model, { index, group, value, color }, { value: formatter, color: colorFormatter }, labels, locale),
6617
+ [model, index, group, value, color, formatter, colorFormatter, labels, locale]
6618
+ );
6619
+ const resolvedSummary = useMemo(
6620
+ () => summary === "auto" ? buildTreemapSummary(model, title, labels, locale) : summary,
6621
+ [summary, model, title, labels, locale]
6622
+ );
6623
+ const label2 = ariaLabel ?? textOf7(locale).chart(labels?.[value] ?? value ?? "");
6624
+ const legendCategories = model.categories.length > MAX_CATEGORIES2 ? [...model.categories.slice(0, MAX_CATEGORIES2), otherSeriesLabel(locale)] : model.categories;
6625
+ const legend = !showLegend ? null : colorMode === "numeric" ? /* @__PURE__ */ jsx("div", { "data-slot": "treemap-legend", className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground tabular-nums", children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
6626
+ color && /* @__PURE__ */ jsx("span", { children: labels?.[color] ?? color }),
6627
+ /* @__PURE__ */ jsx("span", { children: colorFormatter(model.shadeMin) }),
6628
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "h-2 w-24 rounded-sm", style: { backgroundImage: rampGradientCss(tone) } }),
6629
+ /* @__PURE__ */ jsx("span", { children: colorFormatter(model.shadeMax) })
6630
+ ] }) }) : group ? /* @__PURE__ */ jsx(Legend, { categories: legendCategories, labels }) : null;
6631
+ return /* @__PURE__ */ jsx(
6632
+ ChartFrame,
6633
+ {
6634
+ ...chartRootProps(rest),
6635
+ ref: frameRef,
6636
+ title,
6637
+ summary: resolvedSummary,
6638
+ isLoading: isLoading ?? false,
6639
+ isEmpty: rows.length === 0,
6640
+ emptyState,
6641
+ height,
6642
+ variant: "bar",
6643
+ ariaLabel: label2,
6644
+ className,
6645
+ dataTable,
6646
+ children: /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col gap-2", children: [
6647
+ /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsx(EChart, { option, onEvents, height: "100%", ariaLabel: label2, actions, fileName, exportHeader: { title, summary: resolvedSummary } }) }),
6648
+ legend
6649
+ ] })
6650
+ }
6651
+ );
6652
+ }
6653
+ var Treemap = forwardRef(TreemapImpl);
6654
+ Treemap.displayName = "Treemap";
6655
+ var TEXT18 = {
5351
6656
  ja: {
5352
6657
  tones: { positive: "\u826F\u597D", warning: "\u6CE8\u610F", negative: "\u8981\u5BFE\u5FDC", neutral: "\u4E2D\u7ACB" },
5353
6658
  toneNote: (label2) => `\uFF08${label2}\uFF09`,
@@ -5381,7 +6686,7 @@ var TEXT14 = {
5381
6686
  exportCsv: "Export CSV"
5382
6687
  }
5383
6688
  };
5384
- var useText = () => TEXT14[uiLanguage(useLocale())];
6689
+ var useText = () => TEXT18[uiLanguage(useLocale())];
5385
6690
  function resolveFormat(format, row) {
5386
6691
  return typeof format === "function" ? format(row) : format;
5387
6692
  }
@@ -5444,10 +6749,10 @@ function useDataTable() {
5444
6749
  if (!ctx) throw new Error("useDataTable must be used inside <DataTable>");
5445
6750
  return ctx;
5446
6751
  }
5447
- var NO_ROWS12 = [];
6752
+ var NO_ROWS16 = [];
5448
6753
  function DataTable({
5449
- columns = NO_ROWS12,
5450
- data = NO_ROWS12,
6754
+ columns = NO_ROWS16,
6755
+ data = NO_ROWS16,
5451
6756
  enableSorting = true,
5452
6757
  sorting: sortingProp,
5453
6758
  onSortingChange,
@@ -5474,7 +6779,7 @@ function DataTable({
5474
6779
  children
5475
6780
  }) {
5476
6781
  const locale = useLocale();
5477
- const t = TEXT14[uiLanguage(locale)];
6782
+ const t = TEXT18[uiLanguage(locale)];
5478
6783
  const [sorting, setSorting] = useControlledState(sortingProp, [], onSortingChange);
5479
6784
  const [columnFilters, setColumnFilters] = useControlledState(
5480
6785
  columnFiltersProp,
@@ -5983,7 +7288,7 @@ function DataTableExport({
5983
7288
  disabled: isLoading,
5984
7289
  children: [
5985
7290
  /* @__PURE__ */ jsx(Download, { className: "size-4", "aria-hidden": "true" }),
5986
- children ?? TEXT14[uiLanguage(locale)].exportCsv
7291
+ children ?? TEXT18[uiLanguage(locale)].exportCsv
5987
7292
  ]
5988
7293
  }
5989
7294
  );
@@ -6017,8 +7322,150 @@ function DataTablePreset({
6017
7322
  ] });
6018
7323
  }
6019
7324
  DataTablePreset.displayName = "DataTablePreset";
7325
+ var FLOOR_SHARE = 0.2;
7326
+ var DEFAULT_CHART_HEIGHT3 = 288;
7327
+ var LIGHT_TEXT_FROM = 0.55;
7328
+ var dimText = (v) => v === null || v === void 0 || v === "" ? EMPTY_VALUE : String(v);
7329
+ var pivotCellKey = (rowKey, colKey) => `${rowKey.join("")}\0${colKey.join("")}`;
7330
+ function buildPivotModel(config) {
7331
+ const { data, rows, columns, values } = config;
7332
+ const rowKeys = /* @__PURE__ */ new Map();
7333
+ const colKeys = /* @__PURE__ */ new Map();
7334
+ const cells = /* @__PURE__ */ new Map();
7335
+ for (const row of data) {
7336
+ if (!row || typeof row !== "object") continue;
7337
+ const rk = rows.map((d) => dimText(row[d]));
7338
+ const ck = columns.map((d) => dimText(row[d]));
7339
+ const rId = rk.join("");
7340
+ const cId = ck.join("");
7341
+ if (!rowKeys.has(rId)) rowKeys.set(rId, rk);
7342
+ if (!colKeys.has(cId)) colKeys.set(cId, ck);
7343
+ cells.set(pivotCellKey(rk, ck), row);
7344
+ }
7345
+ const ranges = {};
7346
+ for (const value of values) {
7347
+ let [lo, hi] = [Infinity, -Infinity];
7348
+ for (const row of cells.values()) {
7349
+ const n = toChartNumber(row[value]);
7350
+ if (n !== null) [lo, hi] = [Math.min(lo, n), Math.max(hi, n)];
7351
+ }
7352
+ ranges[value] = { min: Number.isFinite(lo) ? lo : 0, max: Number.isFinite(hi) ? hi : 0 };
7353
+ }
7354
+ return {
7355
+ rowKeys: rowKeys.size > 0 ? [...rowKeys.values()] : [rows.map(() => EMPTY_VALUE)],
7356
+ colKeys: colKeys.size > 0 ? [...colKeys.values()] : [columns.map(() => EMPTY_VALUE)],
7357
+ cells,
7358
+ ranges
7359
+ };
7360
+ }
7361
+ function pivotSpans(keys, level) {
7362
+ const out = [];
7363
+ const prefix = (k) => k.slice(0, level + 1).join("");
7364
+ keys.forEach((key, i) => {
7365
+ const last = out[out.length - 1];
7366
+ if (last && prefix(keys[last.start]) === prefix(key)) last.span++;
7367
+ else out.push({ text: key[level] ?? "", start: i, span: 1 });
7368
+ });
7369
+ return out;
7370
+ }
7371
+ var TEXT19 = {
7372
+ ja: { table: "\u30D4\u30DC\u30C3\u30C8\u8868" },
7373
+ en: { table: "Pivot table" }
7374
+ };
7375
+ var NO_ROWS17 = [];
7376
+ var asList = (v) => Array.isArray(v) ? v.filter((x) => typeof x === "string") : [];
7377
+ function PivotTable({
7378
+ data = NO_ROWS17,
7379
+ rows: rowDims,
7380
+ columns: colDims,
7381
+ values: valueKeys,
7382
+ formats,
7383
+ labels,
7384
+ highlight = false,
7385
+ tone = "chart-1",
7386
+ onSelect,
7387
+ title,
7388
+ summary,
7389
+ isLoading,
7390
+ emptyState,
7391
+ maxHeight = 480,
7392
+ className,
7393
+ ariaLabel
7394
+ }) {
7395
+ const locale = useLocale();
7396
+ const t = TEXT19[uiLanguage(resolveLocale(locale))];
7397
+ const dataRows = Array.isArray(data) ? data : NO_ROWS17;
7398
+ const rows = useMemo(() => asList(rowDims), [rowDims]);
7399
+ const columns = useMemo(() => asList(colDims), [colDims]);
7400
+ const values = useMemo(() => asList(valueKeys), [valueKeys]);
7401
+ const model = useMemo(() => buildPivotModel({ data: dataRows, rows, columns, values }), [dataRows, rows, columns, values]);
7402
+ const label2 = (key) => labels?.[key] ?? key;
7403
+ const R = rows.length;
7404
+ const C = columns.length;
7405
+ const V = values.length;
7406
+ const valueRow = V > 1 || C === 0;
7407
+ const H = C + (valueRow ? 1 : 0);
7408
+ const shaded = (value) => highlight === true || highlight === value;
7409
+ const isEmpty = dataRows.length === 0;
7410
+ const ready = !isLoading && !isEmpty;
7411
+ const cellStyle = (value, n) => {
7412
+ if (n === null || !shaded(value)) return void 0;
7413
+ const { min, max } = model.ranges[value] ?? { min: 0, max: 0 };
7414
+ const ratio = max > min ? Math.min(1, Math.max(0, (n - min) / (max - min))) : 1;
7415
+ const share = Math.round((FLOOR_SHARE + (1 - FLOOR_SHARE) * ratio) * 100);
7416
+ return {
7417
+ backgroundColor: `color-mix(in oklch, var(--${tone}) ${share}%, var(--card))`,
7418
+ color: ratio >= LIGHT_TEXT_FROM ? "var(--card)" : void 0
7419
+ };
7420
+ };
7421
+ const headerRows = Array.from({ length: H }, (_, h) => {
7422
+ const lead = h === H - 1 ? rows.map((d, level) => /* @__PURE__ */ jsx(TableHead, { scope: "col", className: cn(level === 0 && "pl-0"), children: label2(d) }, `dim-${d}`)) : h === 0 && R > 0 ? [/* @__PURE__ */ jsx(TableHead, { colSpan: R, rowSpan: H - 1, "aria-hidden": "true" }, "corner")] : [];
7423
+ const cells = h < C ? pivotSpans(model.colKeys, h).map((s) => /* @__PURE__ */ jsx(TableHead, { scope: "colgroup", colSpan: s.span * Math.max(1, V), className: "text-right", children: label2(s.text) }, `c-${h}-${s.start}`)) : model.colKeys.flatMap(
7424
+ (_2, ci) => values.map((v) => /* @__PURE__ */ jsx(TableHead, { scope: "col", className: "text-right", children: label2(v) }, `v-${ci}-${v}`))
7425
+ );
7426
+ return /* @__PURE__ */ jsxs(TableRow, { className: "hover:bg-transparent", children: [
7427
+ lead,
7428
+ cells
7429
+ ] }, `h-${h}`);
7430
+ });
7431
+ const rowSpans = rows.map((_, level) => new Map(pivotSpans(model.rowKeys, level).map((s) => [s.start, s.span])));
7432
+ const body = model.rowKeys.map((rk, ri) => /* @__PURE__ */ jsxs(TableRow, { children: [
7433
+ rows.map((d, level) => {
7434
+ const span = rowSpans[level].get(ri);
7435
+ if (span === void 0) return null;
7436
+ return /* @__PURE__ */ jsx(TableHead, { scope: span > 1 ? "rowgroup" : "row", rowSpan: span, className: cn("align-top font-medium text-foreground", level === 0 && "pl-0"), children: label2(rk[level] ?? "") }, `rh-${d}`);
7437
+ }),
7438
+ model.colKeys.flatMap(
7439
+ (ck, ci) => values.map((v) => {
7440
+ const row = model.cells.get(pivotCellKey(rk, ck));
7441
+ const n = row ? toChartNumber(row[v]) : null;
7442
+ const text = formatValue(n, formats?.[v] ?? "number", locale);
7443
+ return /* @__PURE__ */ jsx(TableCell, { className: "text-right tabular-nums", style: cellStyle(v, n), children: onSelect && row ? /* @__PURE__ */ jsx("button", { type: "button", className: "w-full cursor-pointer text-right tabular-nums", onClick: () => onSelect(row), children: text }) : text }, `c-${ci}-${v}`);
7444
+ })
7445
+ )
7446
+ ] }, `r-${ri}`));
7447
+ return /* @__PURE__ */ jsx(
7448
+ ChartFrame,
7449
+ {
7450
+ title,
7451
+ summary,
7452
+ isLoading: isLoading ?? false,
7453
+ isEmpty,
7454
+ emptyState,
7455
+ height: ready ? "auto" : DEFAULT_CHART_HEIGHT3,
7456
+ variant: "list",
7457
+ plotRole: "group",
7458
+ ariaLabel: ariaLabel ?? title ?? t.table,
7459
+ className,
7460
+ children: /* @__PURE__ */ jsx("div", { "data-slot": "pivot-table", className: "relative w-full overflow-auto", style: { maxHeight }, children: /* @__PURE__ */ jsxs("table", { "data-slot": "table", "aria-label": ariaLabel ?? title ?? t.table, className: "w-full caption-bottom text-sm", children: [
7461
+ /* @__PURE__ */ jsx(TableHeader, { className: "sticky top-0 z-10 bg-card", children: headerRows }),
7462
+ /* @__PURE__ */ jsx(TableBody, { children: body })
7463
+ ] }) })
7464
+ }
7465
+ );
7466
+ }
6020
7467
  var FilterBarContext = createContext(null);
6021
- var TEXT15 = {
7468
+ var TEXT20 = {
6022
7469
  ja: {
6023
7470
  filters: "\u30D5\u30A3\u30EB\u30BF\u30FC",
6024
7471
  selected: (count) => ` (${count}\u4EF6\u9078\u629E\u4E2D)`,
@@ -6034,7 +7481,7 @@ var TEXT15 = {
6034
7481
  clearAll: "Clear all filters"
6035
7482
  }
6036
7483
  };
6037
- var useText2 = () => TEXT15[uiLanguage(useLocale())];
7484
+ var useText2 = () => TEXT20[uiLanguage(useLocale())];
6038
7485
  function useFilterBar() {
6039
7486
  const ctx = useContext(FilterBarContext);
6040
7487
  if (!ctx) throw new Error("useFilterBar must be used within <FilterBar>");
@@ -6337,7 +7784,7 @@ var PRESET_LABELS = {
6337
7784
  lastFiscalYear: "Last fiscal year"
6338
7785
  }
6339
7786
  };
6340
- var TEXT16 = {
7787
+ var TEXT21 = {
6341
7788
  ja: { placeholder: "\u671F\u9593\u3092\u9078\u629E", rangeSeparator: " - " },
6342
7789
  en: { placeholder: "Pick a date range", rangeSeparator: " \u2013 " }
6343
7790
  };
@@ -6438,7 +7885,7 @@ var DateRangePicker = forwardRef(
6438
7885
  const [open, setOpen] = useState(false);
6439
7886
  const isMobile = useIsMobile();
6440
7887
  const locale = useLocale(localeProp);
6441
- const t = TEXT16[uiLanguage(locale)];
7888
+ const t = TEXT21[uiLanguage(locale)];
6442
7889
  const presets = useMemo(
6443
7890
  () => presetsProp ?? createDatePresets({ locale, fiscalYearStartMonth }),
6444
7891
  [presetsProp, locale, fiscalYearStartMonth]
@@ -6655,7 +8102,7 @@ function RemoveButton({ label: label2, onRemove, iconClassName }) {
6655
8102
  }
6656
8103
  );
6657
8104
  }
6658
- var TEXT17 = {
8105
+ var TEXT22 = {
6659
8106
  ja: { placeholder: "\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044", search: "\u691C\u7D22...", empty: "\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F", clear: "\u30AF\u30EA\u30A2" },
6660
8107
  en: { placeholder: "Select an option", search: "Search...", empty: "No results found.", clear: "Clear" }
6661
8108
  };
@@ -6675,7 +8122,7 @@ var SearchableSelect = forwardRef(
6675
8122
  className
6676
8123
  }, ref) {
6677
8124
  const [open, setOpen] = useState(false);
6678
- const t = TEXT17[uiLanguage(useLocale())];
8125
+ const t = TEXT22[uiLanguage(useLocale())];
6679
8126
  const allOptions = useMemo(() => flattenOptions(options), [options]);
6680
8127
  const selectedOption = useMemo(
6681
8128
  () => allOptions.find((opt) => opt.value === value),
@@ -6728,7 +8175,7 @@ var SearchableSelect = forwardRef(
6728
8175
  }
6729
8176
  );
6730
8177
  SearchableSelect.displayName = "SearchableSelect";
6731
- var TEXT18 = {
8178
+ var TEXT23 = {
6732
8179
  ja: {
6733
8180
  placeholder: "\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",
6734
8181
  search: "\u691C\u7D22...",
@@ -6761,7 +8208,7 @@ var MultiSelect = forwardRef(function MultiSelect2({
6761
8208
  }, ref) {
6762
8209
  const [open, setOpen] = useState(false);
6763
8210
  const listId = useId();
6764
- const t = TEXT18[uiLanguage(useLocale())];
8211
+ const t = TEXT23[uiLanguage(useLocale())];
6765
8212
  const allOptions = useMemo(() => flattenOptions(options), [options]);
6766
8213
  const selectedOptions = useMemo(
6767
8214
  () => allOptions.filter((opt) => value.includes(opt.value)),
@@ -7043,7 +8490,7 @@ var LONG_VALUE_CHARS = 10;
7043
8490
  var DELTA_UNDER_PLACEMENT = "col-start-1 row-span-1 row-start-3 justify-self-start";
7044
8491
  var KPI_FOOTER_CLASS = "flex-col items-start gap-2 rounded-none border-t-0 bg-transparent pt-0 text-sm";
7045
8492
  var PLACEHOLDER = /\{(\w+)\}/g;
7046
- var TEXT19 = {
8493
+ var TEXT24 = {
7047
8494
  ja: {
7048
8495
  target: "\u76EE\u6A19",
7049
8496
  provisional: "\u901F\u5831",
@@ -7175,7 +8622,7 @@ function KpiCard({
7175
8622
  ...props
7176
8623
  }) {
7177
8624
  const locale = useLocale(localeProp);
7178
- const t = TEXT19[uiLanguage(locale)];
8625
+ const t = TEXT24[uiLanguage(locale)];
7179
8626
  const allComparisons = [...comparisonProp ? [comparisonProp] : [], ...comparisons ?? []];
7180
8627
  const comparison = allComparisons[0];
7181
8628
  const isProvisional = provisional !== void 0 && provisional !== false;
@@ -7426,7 +8873,7 @@ function updatedAtText(updatedAt, display, locale, t, now, timeZone) {
7426
8873
  const absolute2 = formatDate(updatedAt, "datetime", locale, { timeZone });
7427
8874
  return display === "absolute" ? t.updatedAbsolute(absolute2) : t.updatedBoth(absolute2, relative2);
7428
8875
  }
7429
- var TEXT20 = {
8876
+ var TEXT25 = {
7430
8877
  ja: {
7431
8878
  flat: (value) => `\u5909\u5316\u306A\u3057 ${value}%`,
7432
8879
  up: (value) => `${value}% \u5897\u52A0`,
@@ -7455,7 +8902,7 @@ var TrendIndicator = forwardRef(
7455
8902
  const isGood = direction === "neutral" ? null : direction === "up" === positiveIsGood;
7456
8903
  const sentiment = isGood === null ? "neutral" : isGood ? "positive" : "negative";
7457
8904
  const Icon = direction === "up" ? ArrowUp : direction === "down" ? ArrowDown : Minus;
7458
- const t = TEXT20[uiLanguage(useLocale())];
8905
+ const t = TEXT25[uiLanguage(useLocale())];
7459
8906
  const ariaLabel = direction === "neutral" ? t.flat(value) : direction === "up" ? t.up(value) : t.down(value);
7460
8907
  return /* @__PURE__ */ jsxs(
7461
8908
  "span",
@@ -7576,6 +9023,6 @@ var Placeholder = forwardRef(function Placeholder2({ className, ...props }, ref)
7576
9023
  });
7577
9024
  Placeholder.displayName = "Placeholder";
7578
9025
 
7579
- export { AppShell, AreaChart, BarChart, BarList, COMPARISON_LABELS, CategoryBar, ChartFrame, DEFAULT_SAMPLE_LABEL, DELTA_NOT_COMPARABLE, DashboardCard, DashboardCardAction, DashboardCardContent, DashboardCardDescription, DashboardCardFooter, DashboardCardHeader, DashboardCardPreset, DashboardCardSkeleton, DashboardCardTitle, DataTable, DataTableColumnVisibility, DataTableContent, DataTableExport, DataTablePagination, DataTablePreset, DataTableToolbar, DateRangePicker, Delta, DonutChart, FilterBar, FilterBarActiveChips, FilterBarClearButton, FilterBarMultiSelect, FilterBarPreset, FilterBarSelect, FunnelSteps, Heatmap, KpiCard, Legend, LineChart, MetricUnit, MetricValue, MultiSelect, PageShell, PageShellActions, PageShellContent, PageShellDescription, PageShellHeader, PageShellHeaderEnd, PageShellHeading, PageShellMeta, PageShellSummary, PageShellSummaryCard, PageShellTitle, Placeholder, ProgressCircle, RECORD_MIN_POINTS, SampleBadge, SampleClaim, SampleData, ScatterChart, SearchableSelect, SectionHeader, SegmentedControl, StatusBadge, Tracker, TrendIndicator, UpdatedAt, WaterfallChart, comparisonBaseline, comparisonLabel, computeComparison, computeTargetProgress, defaultChangeDisplay, defaultPresets, deltaVariants, detectRecord, fillKpiTemplate, flattenOptions, formatChange, formatChangeAmount, formatRelativeTime, funnelStepsVariants, inferPeriodGrain, isGroupedOptions, metricValueVariants, pageShellSummaryCardVariants, tableToCsv, toCsv, toneForValue, useDataTable, useSampleMark };
7580
- //# sourceMappingURL=chunk-77CISBMG.js.map
7581
- //# sourceMappingURL=chunk-77CISBMG.js.map
9026
+ export { AppShell, AreaChart, BarChart, BarList, COMPARISON_LABELS, CategoryBar, ChartFrame, ComboChart, DEFAULT_SAMPLE_LABEL, DELTA_NOT_COMPARABLE, DashboardCard, DashboardCardAction, DashboardCardContent, DashboardCardDescription, DashboardCardFooter, DashboardCardHeader, DashboardCardPreset, DashboardCardSkeleton, DashboardCardTitle, DataTable, DataTableColumnVisibility, DataTableContent, DataTableExport, DataTablePagination, DataTablePreset, DataTableToolbar, DateRangePicker, Delta, DonutChart, FilledMap, FilterBar, FilterBarActiveChips, FilterBarClearButton, FilterBarMultiSelect, FilterBarPreset, FilterBarSelect, FunnelSteps, Heatmap, KpiCard, Legend, LineChart, MetricUnit, MetricValue, MultiSelect, PageShell, PageShellActions, PageShellContent, PageShellDescription, PageShellHeader, PageShellHeaderEnd, PageShellHeading, PageShellMeta, PageShellSummary, PageShellSummaryCard, PageShellTitle, PivotTable, Placeholder, ProgressCircle, RECORD_MIN_POINTS, SampleBadge, SampleClaim, SampleData, ScatterChart, SearchableSelect, SectionHeader, SegmentedControl, StatusBadge, SymbolMap, Tracker, Treemap, TrendIndicator, UpdatedAt, WaterfallChart, comparisonBaseline, comparisonLabel, computeComparison, computeTargetProgress, defaultChangeDisplay, defaultPresets, deltaVariants, detectRecord, fillKpiTemplate, flattenOptions, formatChange, formatChangeAmount, formatRelativeTime, funnelStepsVariants, inferPeriodGrain, isGroupedOptions, metricValueVariants, pageShellSummaryCardVariants, tableToCsv, toCsv, toneForValue, useDataTable, useSampleMark };
9027
+ //# sourceMappingURL=chunk-NYQJ5UY4.js.map
9028
+ //# sourceMappingURL=chunk-NYQJ5UY4.js.map