@mechane-ai/elements 0.33.0 → 0.35.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 (35) hide show
  1. package/README.md +3 -1
  2. package/dist/ai.js +2 -2
  3. package/dist/{categorical-values-bWZBzMpX.js → categorical-values-DpnNvPkc.js} +2 -2
  4. package/dist/{chart-frame-Cr4P6MF5.js → chart-frame-BV0IPZtQ.js} +1 -1
  5. package/dist/{chart-input-3wX0JoPE.js → chart-input-CN8PMrni.js} +2 -2
  6. package/dist/charts/cartesian.js +539 -565
  7. package/dist/charts/distribution.js +2 -2
  8. package/dist/charts/graph.js +2 -2
  9. package/dist/charts/hierarchy.js +3 -3
  10. package/dist/charts/matrix.js +2 -2
  11. package/dist/charts/timeline.js +2 -2
  12. package/dist/charts.js +1 -1
  13. package/dist/collections.js +2 -2
  14. package/dist/content/tree.js +1 -1
  15. package/dist/elements.css +28 -0
  16. package/dist/feedback.js +1 -1
  17. package/dist/forms/dates.js +519 -73
  18. package/dist/forms-BQQFas9g.js +118 -0
  19. package/dist/forms.js +3 -1
  20. package/dist/navigation/commands.js +1 -1
  21. package/dist/packages/charts/src/chart-data.d.ts +1 -2
  22. package/dist/packages/forms/src/dates/calendar.d.ts +2 -5
  23. package/dist/packages/forms/src/dates/civil.d.ts +28 -0
  24. package/dist/packages/forms/src/dates/date-inputs.d.ts +20 -0
  25. package/dist/packages/forms/src/dates/date-picker.d.ts +13 -0
  26. package/dist/packages/forms/src/dates/date-range-picker.d.ts +14 -12
  27. package/dist/packages/forms/src/dates/index.d.ts +8 -0
  28. package/dist/packages/forms/src/dates/month-calendar.d.ts +19 -0
  29. package/dist/packages/forms/src/dates/month-picker.d.ts +14 -0
  30. package/dist/packages/forms/src/dates/month-range-picker.d.ts +18 -0
  31. package/dist/packages/forms/src/dates/picker-popover.d.ts +22 -0
  32. package/dist/{pierre-tree-Dd5Vd79M.js → pierre-tree-CYCRjdGG.js} +1 -1
  33. package/dist/{src-BOZsJ8td.js → src-BHllGfI8.js} +4 -4
  34. package/dist/{src-CD6veX7n.js → src-BYKjPC-0.js} +278 -387
  35. package/package.json +1 -1
@@ -1,30 +1,29 @@
1
- import { d as e, u as t } from "../src-BOZsJ8td.js";
2
- import { i as n, n as r, r as i, t as a } from "../categorical-values-bWZBzMpX.js";
3
- import { D as o } from "../src-C-Sx37kz.js";
4
- import { t as s } from "../use-scroll-tab-index-Dxpdh4W7.js";
5
- import { s as c } from "../src-d7EAi61b.js";
6
- import { a as l, n as u, o as d, r as f, s as p, t as m } from "../chart-frame-Cr4P6MF5.js";
7
- import { n as h, r as g, t as _ } from "../chart-input-3wX0JoPE.js";
8
- import { r as v } from "../tokens.stylex-CJbIDPB9.js";
9
- import { t as y } from "../plot-width--OgdohB5.js";
10
- import { g as b } from "../src-CD6veX7n.js";
11
- import * as x from "@stylexjs/stylex";
12
- import { useEffect as ee, useId as S, useMemo as te, useRef as ne, useState as C } from "react";
13
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
14
- import { scaleBand as re, scaleLinear as D } from "@visx/scale";
15
- import { AreaClosed as ie, Bar as ae, LinePath as O } from "@visx/shape";
1
+ import { d as e, u as t } from "../src-BHllGfI8.js";
2
+ import { i as n, n as r, r as i, t as a } from "../categorical-values-DpnNvPkc.js";
3
+ import { t as o } from "../accessibility-C-aIZ1Yx.js";
4
+ import { a as s, n as c, o as l, r as u, s as d, t as f } from "../chart-frame-BV0IPZtQ.js";
5
+ import { n as p, r as m, t as h } from "../chart-input-CN8PMrni.js";
6
+ import { r as g } from "../tokens.stylex-CJbIDPB9.js";
7
+ import { t as _ } from "../plot-width--OgdohB5.js";
8
+ import { D as v } from "../src-C-Sx37kz.js";
9
+ import { p as y } from "../src-BYKjPC-0.js";
10
+ import * as b from "@stylexjs/stylex";
11
+ import { useEffect as x, useId as S, useMemo as C, useRef as ee, useState as w } from "react";
12
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
13
+ import { scaleBand as O, scaleLinear as k } from "@visx/scale";
14
+ import { AreaClosed as te, Bar as A, LinePath as j } from "@visx/shape";
16
15
  // packages/charts/src/chart-cursor.tsx
17
- function oe({ x: e, top: t, bottom: n, width: r }) {
18
- return /* @__PURE__ */ E("g", {
16
+ function ne({ x: e, top: t, bottom: n, width: r }) {
17
+ return /* @__PURE__ */ D("g", {
19
18
  "aria-hidden": !0,
20
19
  className: "xlshs6z xgs60n x17y187c xbabvq0 x47corl",
21
- children: [/* @__PURE__ */ T("line", {
20
+ children: [/* @__PURE__ */ E("line", {
22
21
  x1: e,
23
22
  x2: e,
24
23
  y1: t,
25
24
  y2: n,
26
25
  className: "xnpr05h x1ntoi03 x13efnbd"
27
- }), /* @__PURE__ */ T("line", {
26
+ }), /* @__PURE__ */ E("line", {
28
27
  x1: e - r / 2,
29
28
  x2: e + r / 2,
30
29
  y1: n + 4,
@@ -34,36 +33,21 @@ function oe({ x: e, top: t, bottom: n, width: r }) {
34
33
  });
35
34
  }
36
35
  // packages/charts/src/chart-data.tsx
37
- function se({ title: e, children: t }) {
38
- let n = s();
39
- return /* @__PURE__ */ E(c.Root, { children: [/* @__PURE__ */ T(c.Trigger, {
40
- render: /* @__PURE__ */ T(o, { density: "compact" }),
41
- children: "Chart data"
42
- }), /* @__PURE__ */ E(c.Portal, { children: [/* @__PURE__ */ T(c.Backdrop, {}), /* @__PURE__ */ E(c.Popup, { children: [
43
- /* @__PURE__ */ T(c.Title, { children: e }),
44
- /* @__PURE__ */ T("div", {
45
- ref: n.ref,
46
- role: "region",
47
- "aria-label": "Chart values",
48
- tabIndex: n.tabIndex,
49
- className: "xeuugli x1phlbz0 xysyzu8 x1we84gm",
50
- children: t
51
- }),
52
- /* @__PURE__ */ T(c.Close, {
53
- render: /* @__PURE__ */ T(o, {}),
54
- children: "Close"
55
- })
56
- ] })] })] });
36
+ function M({ children: e }) {
37
+ return /* @__PURE__ */ E("div", {
38
+ ...b.props(o.hidden),
39
+ children: e
40
+ });
57
41
  }
58
42
  // packages/charts/src/chart-inspection.tsx
59
- var k = {
43
+ var N = {
60
44
  kzqmXN: "x1xc55vz",
61
45
  kZKoxP: "xdk7pt",
62
46
  kmuXW: "x2lah0s",
63
47
  $$css: !0
64
- }, A = {
48
+ }, P = {
65
49
  swatch: (e) => [
66
- k,
50
+ N,
67
51
  {
68
52
  kWkggS: e == null ? e : "xl8spv7",
69
53
  $$css: !0
@@ -103,78 +87,78 @@ var k = {
103
87
  "--x-left": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e),
104
88
  "--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
105
89
  }]
106
- }, j = 4;
107
- function ce() {
108
- return /* @__PURE__ */ T("ul", {
90
+ }, re = 4;
91
+ function ie() {
92
+ return /* @__PURE__ */ E("ul", {
109
93
  "aria-hidden": !0,
110
94
  inert: !0,
111
95
  className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k",
112
- children: Array.from({ length: j }, (t, n) => /* @__PURE__ */ E("li", {
96
+ children: Array.from({ length: re }, (t, n) => /* @__PURE__ */ D("li", {
113
97
  className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe x1f394nn x43dure",
114
- children: [/* @__PURE__ */ T("span", { ...x.props(A.swatch(v.line)) }), /* @__PURE__ */ E("span", {
98
+ children: [/* @__PURE__ */ E("span", { ...b.props(P.swatch(g.line)) }), /* @__PURE__ */ D("span", {
115
99
  className: "x1cqoux5 xeuugli",
116
100
  children: [
117
- /* @__PURE__ */ T(e, {}),
118
- /* @__PURE__ */ T("span", {
101
+ /* @__PURE__ */ E(e, {}),
102
+ /* @__PURE__ */ E("span", {
119
103
  className: "x1s85apg xannxpe",
120
- children: /* @__PURE__ */ T(e, {})
104
+ children: /* @__PURE__ */ E(e, {})
121
105
  }),
122
- /* @__PURE__ */ T("span", {
106
+ /* @__PURE__ */ E("span", {
123
107
  className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b",
124
- children: /* @__PURE__ */ T(e, {})
108
+ children: /* @__PURE__ */ E(e, {})
125
109
  })
126
110
  ]
127
111
  })]
128
112
  }, n))
129
113
  });
130
114
  }
131
- function le({ title: e, detail: t }) {
132
- return t === void 0 ? e : /* @__PURE__ */ E("span", {
115
+ function ae({ title: e, detail: t }) {
116
+ return t === void 0 ? e : /* @__PURE__ */ D("span", {
133
117
  "aria-label": e,
134
118
  className: "x1lliihq xb3r6kr xlyipyv xuxw1ft",
135
- children: [/* @__PURE__ */ T("span", {
119
+ children: [/* @__PURE__ */ E("span", {
136
120
  className: "xt0psk2 x1boff50",
137
121
  children: e
138
- }), /* @__PURE__ */ T("span", {
122
+ }), /* @__PURE__ */ E("span", {
139
123
  className: "x1s85apg xfodcyb",
140
124
  children: t
141
125
  })]
142
126
  });
143
127
  }
144
- function M({ id: e, label: t, summary: n, legend: r, layoutLegend: i, rows: a, x: o, width: s, offset: c = 16, source: l, notes: u = [], hasSeriesSummary: d = !1 }) {
145
- let f = Math.min(260, s), m = o > s / 2 ? o - f - c : o + c, h = Math.max(0, Math.min(s - f, m)), g = t === void 0 ? [] : [
128
+ function oe({ id: e, label: t, summary: n, legend: r, layoutLegend: i, rows: a, x: o, width: s, offset: c = 16, source: l, notes: u = [], hasSeriesSummary: f = !1 }) {
129
+ let p = Math.min(260, s), m = o > s / 2 ? o - p - c : o + c, h = Math.max(0, Math.min(s - p, m)), g = t === void 0 ? [] : [
146
130
  t,
147
131
  n,
148
132
  ...a.map((e) => `${e.label}: ${e.value}`),
149
133
  ...u
150
134
  ].filter((e) => e !== void 0);
151
- return /* @__PURE__ */ E("div", {
135
+ return /* @__PURE__ */ D("div", {
152
136
  className: "xeuugli",
153
137
  children: [
154
- !d && /* @__PURE__ */ E("div", {
138
+ !f && /* @__PURE__ */ D("div", {
155
139
  className: "xrvj5dj xeuugli",
156
- children: [i !== void 0 && /* @__PURE__ */ T("ul", {
140
+ children: [i !== void 0 && /* @__PURE__ */ E("ul", {
157
141
  "aria-hidden": !0,
158
142
  inert: !0,
159
143
  className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k x15r89dc xlshs6z x47corl",
160
- children: i.map((e) => /* @__PURE__ */ E("li", {
144
+ children: i.map((e) => /* @__PURE__ */ D("li", {
161
145
  className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
162
- children: [/* @__PURE__ */ T("span", { ...x.props(A.swatch(p[e.tone])) }), /* @__PURE__ */ E("span", {
146
+ children: [/* @__PURE__ */ E("span", { ...b.props(P.swatch(d[e.tone])) }), /* @__PURE__ */ D("span", {
163
147
  className: "xeuugli",
164
- children: [e.label, /* @__PURE__ */ T("span", { className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b" })]
148
+ children: [e.label, /* @__PURE__ */ E("span", { className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b" })]
165
149
  })]
166
150
  }, e.id))
167
- }), /* @__PURE__ */ T("ul", {
151
+ }), /* @__PURE__ */ E("ul", {
168
152
  "aria-label": "Legend",
169
153
  className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k x15r89dc",
170
- children: r.map((e) => /* @__PURE__ */ E("li", {
154
+ children: r.map((e) => /* @__PURE__ */ D("li", {
171
155
  className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
172
- children: [/* @__PURE__ */ T("span", {
156
+ children: [/* @__PURE__ */ E("span", {
173
157
  "aria-hidden": !0,
174
- ...x.props(A.swatch(p[e.tone]))
175
- }), /* @__PURE__ */ E("span", {
158
+ ...b.props(P.swatch(d[e.tone]))
159
+ }), /* @__PURE__ */ D("span", {
176
160
  className: "xeuugli",
177
- children: [e.label, /* @__PURE__ */ T("span", {
161
+ children: [e.label, /* @__PURE__ */ E("span", {
178
162
  className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b",
179
163
  children: t === void 0 ? "" : a.find((t) => t.id === e.id)?.value ?? "—"
180
164
  })]
@@ -182,36 +166,36 @@ function M({ id: e, label: t, summary: n, legend: r, layoutLegend: i, rows: a, x
182
166
  }, e.id))
183
167
  })]
184
168
  }),
185
- /* @__PURE__ */ T("span", {
169
+ /* @__PURE__ */ E("span", {
186
170
  id: e,
187
171
  "aria-live": l === "keyboard" ? "polite" : "off",
188
172
  className: "x10l6tqk x1i1rx1s xjm9jq1 x1717udv xb3r6kr x1hyvwdk xuxw1ft",
189
173
  children: g.join(" · ")
190
174
  }),
191
- t !== void 0 && /* @__PURE__ */ T("div", {
175
+ t !== void 0 && /* @__PURE__ */ E("div", {
192
176
  "aria-hidden": !0,
193
177
  className: "x1n2onr6 xqtp20y x1vjfegm",
194
- children: /* @__PURE__ */ E("div", {
195
- ...x.props(A.inspector, d && A.summaryInspector, A.position(h, f)),
178
+ children: /* @__PURE__ */ D("div", {
179
+ ...b.props(P.inspector, f && P.summaryInspector, P.position(h, p)),
196
180
  children: [
197
- /* @__PURE__ */ E("div", {
181
+ /* @__PURE__ */ D("div", {
198
182
  className: "x78zum5 x1qughib x1hnptsi xk4h15q",
199
- children: [/* @__PURE__ */ T("span", { children: t }), n !== void 0 && /* @__PURE__ */ T("span", { children: n })]
183
+ children: [/* @__PURE__ */ E("span", { children: t }), n !== void 0 && /* @__PURE__ */ E("span", { children: n })]
200
184
  }),
201
- /* @__PURE__ */ T("dl", {
185
+ /* @__PURE__ */ E("dl", {
202
186
  className: "xrvj5dj xunmzkg x1ghz6dp",
203
- children: a.map((e) => /* @__PURE__ */ E("div", {
187
+ children: a.map((e) => /* @__PURE__ */ D("div", {
204
188
  className: "x78zum5 x1qughib x1pha0wt x1hnptsi",
205
- children: [/* @__PURE__ */ E("dt", {
189
+ children: [/* @__PURE__ */ D("dt", {
206
190
  className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
207
- children: [/* @__PURE__ */ T("span", { ...x.props(A.swatch(p[e.tone])) }), e.label]
208
- }), /* @__PURE__ */ T("dd", {
191
+ children: [/* @__PURE__ */ E("span", { ...b.props(P.swatch(d[e.tone])) }), e.label]
192
+ }), /* @__PURE__ */ E("dd", {
209
193
  className: "x1ghz6dp xuxw1ft",
210
194
  children: e.value
211
195
  })]
212
196
  }, e.id))
213
197
  }),
214
- u.map((e) => /* @__PURE__ */ T("span", { children: e }, e))
198
+ u.map((e) => /* @__PURE__ */ E("span", { children: e }, e))
215
199
  ]
216
200
  })
217
201
  })
@@ -219,7 +203,7 @@ function M({ id: e, label: t, summary: n, legend: r, layoutLegend: i, rows: a, x
219
203
  });
220
204
  }
221
205
  // packages/charts/src/cartesian/bar-data.ts
222
- function ue({ composition: e, series: t, categoryIds: n, domain: r }) {
206
+ function se({ composition: e, series: t, categoryIds: n, domain: r }) {
223
207
  if (e === void 0) return;
224
208
  if (e.buckets.length !== n.length) return "Composition requires one explicit bucket per category.";
225
209
  let i = e.annotation;
@@ -237,43 +221,43 @@ function ue({ composition: e, series: t, categoryIds: n, domain: r }) {
237
221
  }
238
222
  }
239
223
  // packages/charts/src/cartesian/composition-bars.tsx
240
- var N = { mark: {
224
+ var ce = { mark: {
241
225
  k3nNDw: "x1hj3fc7",
242
226
  k1ekBW: "xwcsmn1",
243
227
  kIyJzY: "xtitasy x12w9bfk",
244
228
  kAMwcw: "x1faw7qm",
245
229
  $$css: !0
246
230
  } };
247
- function de({ bucket: e, series: t, focusedSeries: n, index: r, x: a, width: o, y: s, isHighlighted: c, highlightedSeriesId: l }) {
248
- let u = n !== void 0, f = n !== void 0 && !t.some((e) => e.id === n.id) ? [...t, n] : t;
231
+ function le({ bucket: e, series: t, focusedSeries: n, index: r, x: a, width: o, y: s, isHighlighted: c, highlightedSeriesId: u }) {
232
+ let f = n !== void 0, p = n !== void 0 && !t.some((e) => e.id === n.id) ? [...t, n] : t;
249
233
  function m(e, t) {
250
234
  let n = s(t), r = s(t + e);
251
235
  return `translateY(${Math.min(n, r)}px) scaleY(${Math.max(+(e === 0), Math.abs(r - n))})`;
252
236
  }
253
- return /* @__PURE__ */ E(w, { children: [e.kind !== "gap" && /* @__PURE__ */ T("rect", {
237
+ return /* @__PURE__ */ D(T, { children: [e.kind !== "gap" && /* @__PURE__ */ E("rect", {
254
238
  x: a,
255
239
  y: 0,
256
240
  width: o,
257
241
  height: 1,
258
242
  vectorEffect: "non-scaling-stroke",
259
- fill: p.neutral,
260
- ...x.props(N.mark, c && d.selected),
243
+ fill: d.neutral,
244
+ ...b.props(ce.mark, c && l.selected),
261
245
  style: {
262
246
  transform: m(e.total, 0),
263
- opacity: u ? .18 : +(e.kind === "total")
247
+ opacity: f ? .18 : +(e.kind === "total")
264
248
  }
265
- }), f.map((s, f) => {
249
+ }), p.map((s, p) => {
266
250
  let h = s.values[r];
267
251
  if (h == null) return null;
268
- let g = n?.id === s.id, _ = u ? 0 : t.slice(0, f).reduce((e, t) => e + (t.values[r] ?? 0), 0), v = u ? g : e.kind === "parts", y = !u && l !== void 0 && l !== s.id;
269
- return /* @__PURE__ */ T("rect", {
252
+ let g = n?.id === s.id, _ = f ? 0 : t.slice(0, p).reduce((e, t) => e + (t.values[r] ?? 0), 0), v = f ? g : e.kind === "parts", y = !f && u !== void 0 && u !== s.id;
253
+ return /* @__PURE__ */ E("rect", {
270
254
  x: a,
271
255
  y: 0,
272
256
  width: o,
273
257
  height: 1,
274
258
  vectorEffect: "non-scaling-stroke",
275
- fill: p[i(s.tone, f)],
276
- ...x.props(N.mark, c && d.selected),
259
+ fill: d[i(s.tone, p)],
260
+ ...b.props(ce.mark, c && l.selected),
277
261
  style: {
278
262
  transform: m(h, _),
279
263
  opacity: v ? y ? .3 : 1 : 0
@@ -282,7 +266,7 @@ function de({ bucket: e, series: t, focusedSeries: n, index: r, x: a, width: o,
282
266
  })] });
283
267
  }
284
268
  // packages/charts/src/cartesian/bar-chart.tsx
285
- var P = {
269
+ var ue = {
286
270
  plot: {
287
271
  kqGvvJ: "x1we84gm",
288
272
  $$css: !0
@@ -291,67 +275,67 @@ var P = {
291
275
  kSiTet: "xuzhngd",
292
276
  $$css: !0
293
277
  }
294
- }, fe = /* @__PURE__ */ new Set(["Enter", " "]), pe = 200;
295
- function F({ title: e, description: t, report: n, series: r, layoutSeries: a, children: o, inspectionId: s, label: c, detail: l, summary: u, rows: d = [], index: p = -1, formatValue: m = String, x: h = 0, width: g = 0, offset: _, source: v, data: y, isLoading: b = !1 }) {
278
+ }, de = /* @__PURE__ */ new Set(["Enter", " "]), fe = 200;
279
+ function F({ title: e, description: t, report: n, series: r, layoutSeries: a, children: o, inspectionId: s, label: c, detail: l, summary: d, rows: f = [], index: p = -1, formatValue: m = String, x: h = 0, width: g = 0, offset: _, source: v, data: y, isLoading: b = !1 }) {
296
280
  let x = r.map((e, t) => ({
297
281
  id: e.id,
298
282
  label: e.label,
299
283
  tone: i(e.tone, t)
300
- })), ee = a?.map((e, t) => ({
284
+ })), S = a?.map((e, t) => ({
301
285
  id: e.id,
302
286
  label: e.label,
303
287
  tone: i(e.tone, t)
304
- })), S = b && r.length === 0 && n?.seriesValues === void 0;
305
- return /* @__PURE__ */ E(f, {
306
- title: /* @__PURE__ */ T(le, {
288
+ })), C = b && r.length === 0 && n?.seriesValues === void 0;
289
+ return /* @__PURE__ */ D(u, {
290
+ title: /* @__PURE__ */ E(ae, {
307
291
  title: e,
308
292
  detail: l
309
293
  }),
310
294
  description: t,
311
295
  report: n,
312
296
  series: x,
313
- actions: /* @__PURE__ */ T(se, {
314
- title: e,
315
- children: y
316
- }),
317
- children: [S ? /* @__PURE__ */ T(ce, {}) : /* @__PURE__ */ T(M, {
318
- id: s,
319
- label: c,
320
- summary: u,
321
- legend: x,
322
- hasSeriesSummary: n?.seriesValues !== void 0,
323
- layoutLegend: ee,
324
- rows: d.map((e, t) => ({
325
- id: e.id,
326
- label: e.label,
327
- tone: i(e.tone, t),
328
- value: e.values[p] === null || e.values[p] === void 0 ? "Unavailable" : m(e.values[p])
329
- })),
330
- x: h,
331
- width: g,
332
- offset: _,
333
- source: v
334
- }), o]
297
+ children: [
298
+ /* @__PURE__ */ E(M, { children: y }),
299
+ C ? /* @__PURE__ */ E(ie, {}) : /* @__PURE__ */ E(oe, {
300
+ id: s,
301
+ label: c,
302
+ summary: d,
303
+ legend: x,
304
+ hasSeriesSummary: n?.seriesValues !== void 0,
305
+ layoutLegend: S,
306
+ rows: f.map((e, t) => ({
307
+ id: e.id,
308
+ label: e.label,
309
+ tone: i(e.tone, t),
310
+ value: e.values[p] === null || e.values[p] === void 0 ? "Unavailable" : m(e.values[p])
311
+ })),
312
+ x: h,
313
+ width: g,
314
+ offset: _,
315
+ source: v
316
+ }),
317
+ o
318
+ ]
335
319
  });
336
320
  }
337
- function I({ title: e = "Loading chart", description: n, report: r, series: i = [], height: a = pe }) {
321
+ function I({ title: e = "Loading chart", description: n, report: r, series: i = [], height: a = fe }) {
338
322
  let o = L(a), s = S();
339
- return o === void 0 ? /* @__PURE__ */ T("div", {
323
+ return o === void 0 ? /* @__PURE__ */ E("div", {
340
324
  "aria-hidden": !0,
341
325
  inert: !0,
342
- children: /* @__PURE__ */ T(F, {
326
+ children: /* @__PURE__ */ E(F, {
343
327
  title: e,
344
328
  description: n,
345
329
  report: r,
346
330
  series: i,
347
331
  inspectionId: s,
348
332
  isLoading: !0,
349
- children: /* @__PURE__ */ T("div", {
350
- ...x.props(d.plot, P.plot),
351
- children: /* @__PURE__ */ T(t, { height: a })
333
+ children: /* @__PURE__ */ E("div", {
334
+ ...b.props(l.plot, ue.plot),
335
+ children: /* @__PURE__ */ E(t, { height: a })
352
336
  })
353
337
  })
354
- }) : /* @__PURE__ */ T(_, {
338
+ }) : /* @__PURE__ */ E(h, {
355
339
  title: e,
356
340
  description: n,
357
341
  report: r,
@@ -361,10 +345,10 @@ function I({ title: e = "Loading chart", description: n, report: r, series: i =
361
345
  function L(e) {
362
346
  if (!Number.isFinite(e) || e < 48) return "Chart height must be at least 48 pixels.";
363
347
  }
364
- function me({ categories: e, series: t, domain: n, mode: i }) {
348
+ function pe({ categories: e, series: t, domain: n, mode: i }) {
365
349
  if (e.length > r.items || t.length > r.series) return `Choose a window with at most ${r.items} categories and ${r.series} series.`;
366
- if (!g(n) || n[0] > 0 || n[1] < 0) return "The bar domain must be finite, increasing, and include zero.";
367
- if (!h(e) || !h(t)) return "Bar categories and series require unique identifiers.";
350
+ if (!m(n) || n[0] > 0 || n[1] < 0) return "The bar domain must be finite, increasing, and include zero.";
351
+ if (!p(e) || !p(t)) return "Bar categories and series require unique identifiers.";
368
352
  for (let r of t) {
369
353
  if (r.values.length !== e.length) return "Every series requires one explicit value per category.";
370
354
  for (let e of r.values) {
@@ -374,64 +358,64 @@ function me({ categories: e, series: t, domain: n, mode: i }) {
374
358
  }
375
359
  if (i === "stacked" && e.some((e, r) => t.reduce((e, t) => e + (t.values[r] ?? 0), 0) > n[1])) return "Stacked bar totals must fit the supplied domain.";
376
360
  }
377
- var he = {
361
+ var me = {
378
362
  "x-default-marker": "x-default-marker",
379
363
  $$css: !0
380
364
  };
381
- function R({ title: e, description: t, report: n, categories: r, series: o, domain: s, mode: c = "grouped", formatValue: l, formatTick: u = l, highlightedSeriesId: f, selection: m, height: h = pe, composition: g }) {
382
- let v = g?.focusedSeries, b = S(), te = v === void 0 ? void 0 : me({
365
+ function he({ title: e, description: t, report: n, categories: r, series: o, domain: s, mode: c = "grouped", formatValue: u, formatTick: f = u, highlightedSeriesId: p, selection: m, height: g = fe, composition: v }) {
366
+ let y = v?.focusedSeries, C = S(), ee = y === void 0 ? void 0 : pe({
383
367
  categories: r,
384
- series: [v],
368
+ series: [y],
385
369
  domain: s,
386
370
  mode: "grouped"
387
- }), ne = me({
371
+ }), T = pe({
388
372
  categories: r,
389
373
  series: o,
390
374
  domain: s,
391
375
  mode: c
392
- }) ?? te, w = ue({
393
- composition: g,
376
+ }) ?? ee, te = se({
377
+ composition: v,
394
378
  series: o,
395
379
  categoryIds: r.map((e) => e.id),
396
380
  domain: s
397
- }) ?? L(h), ie = ne ?? w, O = g === void 0 ? void 0 : {
398
- id: b,
399
- label: g.contextLabel,
381
+ }) ?? L(g), j = T ?? te, M = v === void 0 ? void 0 : {
382
+ id: C,
383
+ label: v.contextLabel,
400
384
  tone: "neutral",
401
- values: g.buckets.map((e) => e.kind === "gap" ? null : e.total)
402
- }, se = O === void 0 ? o : [
403
- O,
385
+ values: v.buckets.map((e) => e.kind === "gap" ? null : e.total)
386
+ }, N = M === void 0 ? o : [
387
+ M,
404
388
  ...o,
405
- ...v === void 0 || o.some((e) => e.id === v.id) ? [] : [v]
406
- ], k = v !== void 0 && O !== void 0 ? [v, O] : o, { ref: A, width: j, element: ce } = y(), le = S(), [M, N] = C(), [I, R] = C();
407
- ee(() => {
389
+ ...y === void 0 || o.some((e) => e.id === y.id) ? [] : [y]
390
+ ], P = y !== void 0 && M !== void 0 ? [y, M] : o, { ref: re, width: ie, element: ae } = _(), oe = S(), [ce, I] = w(), [he, z] = w();
391
+ x(() => {
408
392
  function e(e) {
409
- e.target instanceof Node && ce?.contains(e.target) !== !0 && N(void 0);
393
+ e.target instanceof Node && ae?.contains(e.target) !== !0 && I(void 0);
410
394
  }
411
395
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
412
- }, [ce]);
413
- let ge = r.findIndex((e) => e.id === M?.id), B = r[ge], V = r[r.findIndex((e) => e.id === m?.selectedId)], H = r.find((e) => e.id === I) ?? V ?? r[0], U = r.findIndex((e) => e.id === H?.id), W = B, G = ge, K = g?.buckets[G], q = v !== void 0 && O !== void 0 ? [v, O] : O === void 0 || K?.kind === "parts" ? o : [], J = K === void 0 ? void 0 : K.kind === "gap" ? "No reported value" : l(K.total);
414
- if (ie !== void 0) return /* @__PURE__ */ T(_, {
396
+ }, [ae]);
397
+ let B = r.findIndex((e) => e.id === ce?.id), V = r[B], H = r[r.findIndex((e) => e.id === m?.selectedId)], U = r.find((e) => e.id === he) ?? H ?? r[0], W = r.findIndex((e) => e.id === U?.id), G = V, ge = B, K = v?.buckets[ge], q = y !== void 0 && M !== void 0 ? [y, M] : M === void 0 || K?.kind === "parts" ? o : [], J = K === void 0 ? void 0 : K.kind === "gap" ? "No reported value" : u(K.total);
398
+ if (j !== void 0) return /* @__PURE__ */ E(h, {
415
399
  title: e,
416
400
  description: t,
417
401
  report: n,
418
- message: ie
402
+ message: j
419
403
  });
420
- let Y = h - 28, X = D({
404
+ let Y = g - 28, X = k({
421
405
  domain: [...s],
422
406
  range: [Y, 12]
423
- }), Z = Math.max(44, ...X.ticks(3).map((e) => u(e).length * 7 + 12)), _e = Math.max(Z + 1, j - 16), Q = re({
407
+ }), Z = Math.max(44, ...X.ticks(3).map((e) => f(e).length * 7 + 12)), Q = Math.max(Z + 1, ie - 16), $ = O({
424
408
  domain: r.map((e) => e.id),
425
- range: [Z, _e],
409
+ range: [Z, Q],
426
410
  padding: .3
427
- }), $ = re({
411
+ }), _e = O({
428
412
  domain: o.map((e) => e.id),
429
- range: [0, Q.bandwidth()],
413
+ range: [0, $.bandwidth()],
430
414
  padding: .08
431
- }), ve = Math.min(120, Math.max(40, ...r.map((e) => (e.axisLabel ?? e.label).length * 7))), ye = Math.max(1, Math.ceil((ve + 16) / Q.step())), be = Math.max(1, Math.floor((Q.step() * ye - 16) / 7));
415
+ }), ve = Math.min(120, Math.max(40, ...r.map((e) => (e.axisLabel ?? e.label).length * 7))), ye = Math.max(1, Math.ceil((ve + 16) / $.step())), be = Math.max(1, Math.floor(($.step() * ye - 16) / 7));
432
416
  function xe(e) {
433
- let t = e.currentTarget.getBoundingClientRect(), n = (e.clientX - t.left) / t.width * j, i = Math.floor((n - Z) / Q.step()), a = r[Math.max(0, Math.min(r.length - 1, i))];
434
- a !== void 0 && (e.type === "pointerdown" && R(a.id), N({
417
+ let t = e.currentTarget.getBoundingClientRect(), n = (e.clientX - t.left) / t.width * ie, i = Math.floor((n - Z) / $.step()), a = r[Math.max(0, Math.min(r.length - 1, i))];
418
+ a !== void 0 && (e.type === "pointerdown" && z(a.id), I({
435
419
  id: a.id,
436
420
  source: "pointer"
437
421
  }));
@@ -439,68 +423,68 @@ function R({ title: e, description: t, report: n, categories: r, series: o, doma
439
423
  function Se(e) {
440
424
  if (e.altKey || e.ctrlKey || e.metaKey) return;
441
425
  if (e.key === "Escape") {
442
- e.preventDefault(), e.stopPropagation(), N(void 0);
426
+ e.preventDefault(), e.stopPropagation(), I(void 0);
443
427
  return;
444
428
  }
445
- if (fe.has(e.key)) {
446
- H !== void 0 && m !== void 0 && (e.preventDefault(), m.onSelect(H.id));
429
+ if (de.has(e.key)) {
430
+ U !== void 0 && m !== void 0 && (e.preventDefault(), m.onSelect(U.id));
447
431
  return;
448
432
  }
449
433
  let t = {
450
- ArrowRight: Math.min(r.length - 1, U + 1),
451
- ArrowLeft: Math.max(0, U - 1),
434
+ ArrowRight: Math.min(r.length - 1, W + 1),
435
+ ArrowLeft: Math.max(0, W - 1),
452
436
  Home: 0,
453
437
  End: r.length - 1
454
438
  }[e.key], n = t === void 0 ? void 0 : r[t];
455
- n !== void 0 && (e.preventDefault(), R(n.id), N({
439
+ n !== void 0 && (e.preventDefault(), z(n.id), I({
456
440
  id: n.id,
457
441
  source: "keyboard"
458
442
  }));
459
443
  }
460
- return /* @__PURE__ */ T(F, {
444
+ return /* @__PURE__ */ E(F, {
461
445
  title: e,
462
446
  description: t,
463
447
  report: n,
464
- series: k,
448
+ series: P,
465
449
  layoutSeries: o,
466
- inspectionId: le,
467
- label: W?.label,
468
- detail: W === void 0 ? void 0 : [W.axisLabel ?? W.label, J].filter(Boolean).join(" · "),
450
+ inspectionId: oe,
451
+ label: G?.label,
452
+ detail: G === void 0 ? void 0 : [G.axisLabel ?? G.label, J].filter(Boolean).join(" · "),
469
453
  summary: J,
470
454
  rows: q,
471
- index: G,
472
- formatValue: l,
473
- x: (Q(W?.id ?? "") ?? Z) + Q.bandwidth() / 2,
474
- width: j,
475
- offset: Q.bandwidth() / 2 + 8,
476
- source: M?.source,
477
- data: /* @__PURE__ */ T(a, {
455
+ index: ge,
456
+ formatValue: u,
457
+ x: ($(G?.id ?? "") ?? Z) + $.bandwidth() / 2,
458
+ width: ie,
459
+ offset: $.bandwidth() / 2 + 8,
460
+ source: ce?.source,
461
+ data: /* @__PURE__ */ E(a, {
478
462
  items: r.map((e, t) => ({
479
463
  id: e.id,
480
464
  label: e.label,
481
- valueLabel: z(se, t, l),
465
+ valueLabel: R(N, t, u),
482
466
  tone: "neutral"
483
467
  })),
484
468
  selection: m
485
469
  }),
486
- children: /* @__PURE__ */ T("div", {
487
- ref: A,
488
- ...x.props(d.plot, P.plot),
489
- children: r.length === 0 || o.length === 0 && g === void 0 ? /* @__PURE__ */ T("p", {
470
+ children: /* @__PURE__ */ E("div", {
471
+ ref: re,
472
+ ...b.props(l.plot, ue.plot),
473
+ children: r.length === 0 || o.length === 0 && v === void 0 ? /* @__PURE__ */ E("p", {
490
474
  className: "x153jb6y x1ghz6dp xy8obcc",
491
475
  children: "No categories"
492
- }) : /* @__PURE__ */ E("svg", {
476
+ }) : /* @__PURE__ */ D("svg", {
493
477
  role: "img",
494
478
  "aria-label": `${e}. Use arrow keys to inspect categories.${m === void 0 ? "" : " Press Enter to select."}`,
495
- "aria-describedby": le,
479
+ "aria-describedby": oe,
496
480
  tabIndex: 0,
497
- viewBox: `0 0 ${j} ${h}`,
498
- height: h,
481
+ viewBox: `0 0 ${ie} ${g}`,
482
+ height: g,
499
483
  onKeyDown: Se,
500
484
  onFocus: (e) => {
501
485
  if (e.currentTarget.matches(":focus-visible")) {
502
- let e = V ?? r[0];
503
- R(e?.id), N(e === void 0 ? void 0 : {
486
+ let e = H ?? r[0];
487
+ z(e?.id), I(e === void 0 ? void 0 : {
504
488
  id: e.id,
505
489
  source: "keyboard"
506
490
  });
@@ -511,97 +495,97 @@ function R({ title: e, description: t, report: n, categories: r, series: o, doma
511
495
  },
512
496
  onPointerDown: xe,
513
497
  onPointerLeave: (e) => {
514
- e.pointerType === "mouse" && M?.source === "pointer" && N(void 0);
498
+ e.pointerType === "mouse" && ce?.source === "pointer" && I(void 0);
515
499
  },
516
- onBlur: () => N(void 0),
500
+ onBlur: () => I(void 0),
517
501
  onClick: () => {
518
- B !== void 0 && m?.onSelect(B.id);
502
+ V !== void 0 && m?.onSelect(V.id);
519
503
  },
520
- ...x.props(d.svg, d.inspectable, he),
504
+ ...b.props(l.svg, l.inspectable, me),
521
505
  children: [
522
- B !== void 0 && /* @__PURE__ */ T("rect", {
523
- x: (Q(B.id) ?? Z) - (Q.step() - Q.bandwidth()) / 2,
506
+ V !== void 0 && /* @__PURE__ */ E("rect", {
507
+ x: ($(V.id) ?? Z) - ($.step() - $.bandwidth()) / 2,
524
508
  y: 12,
525
- width: Q.step(),
509
+ width: $.step(),
526
510
  height: Y - 12,
527
511
  className: "x2wnxhi"
528
512
  }),
529
- X.ticks(3).map((e) => /* @__PURE__ */ E("g", { children: [/* @__PURE__ */ T("line", {
513
+ X.ticks(3).map((e) => /* @__PURE__ */ D("g", { children: [/* @__PURE__ */ E("line", {
530
514
  x1: Z,
531
- x2: _e,
515
+ x2: Q,
532
516
  y1: X(e),
533
517
  y2: X(e),
534
- ...x.props(d.grid)
535
- }), /* @__PURE__ */ T("text", {
518
+ ...b.props(l.grid)
519
+ }), /* @__PURE__ */ E("text", {
536
520
  x: Z - 8,
537
521
  y: X(e),
538
522
  textAnchor: "end",
539
523
  dominantBaseline: "middle",
540
- ...x.props(d.label),
541
- children: u(e)
524
+ ...b.props(l.label),
525
+ children: f(e)
542
526
  })] }, e)),
543
- g?.annotation !== void 0 && r.some((e) => e.id === g.annotation?.categoryId) && /* @__PURE__ */ T("text", {
544
- x: Q(g.annotation.categoryId),
545
- y: Math.max(12, X(g.annotation.value) - 8),
546
- ...x.props(d.label),
547
- children: g.annotation.label
527
+ v?.annotation !== void 0 && r.some((e) => e.id === v.annotation?.categoryId) && /* @__PURE__ */ E("text", {
528
+ x: $(v.annotation.categoryId),
529
+ y: Math.max(12, X(v.annotation.value) - 8),
530
+ ...b.props(l.label),
531
+ children: v.annotation.label
548
532
  }),
549
533
  r.map((e, t) => {
550
- let n = e.axisLabel ?? e.label, r = g?.buckets[t];
551
- return /* @__PURE__ */ E("g", { children: [r === void 0 ? o.map((n, r) => {
534
+ let n = e.axisLabel ?? e.label, r = v?.buckets[t];
535
+ return /* @__PURE__ */ D("g", { children: [r === void 0 ? o.map((n, r) => {
552
536
  let a = n.values[t];
553
537
  if (a == null) return null;
554
- let s = c === "stacked" ? o.slice(0, r).reduce((e, n) => e + (n.values[t] ?? 0), 0) : 0, l = X(s), u = X(s + a), h = m?.selectedId === e.id || B?.id === e.id;
555
- return /* @__PURE__ */ T(ae, {
556
- x: (Q(e.id) ?? Z) + (c === "stacked" ? 0 : $(n.id) ?? 0),
557
- y: Math.min(l, u),
558
- width: c === "stacked" ? Q.bandwidth() : $.bandwidth(),
559
- height: Math.max(+(a === 0), Math.abs(u - l)),
560
- fill: p[i(n.tone, r)],
561
- ...x.props(h && d.selected, f !== void 0 && f !== n.id && P.mutedMark)
538
+ let s = c === "stacked" ? o.slice(0, r).reduce((e, n) => e + (n.values[t] ?? 0), 0) : 0, u = X(s), f = X(s + a), h = m?.selectedId === e.id || V?.id === e.id;
539
+ return /* @__PURE__ */ E(A, {
540
+ x: ($(e.id) ?? Z) + (c === "stacked" ? 0 : _e(n.id) ?? 0),
541
+ y: Math.min(u, f),
542
+ width: c === "stacked" ? $.bandwidth() : _e.bandwidth(),
543
+ height: Math.max(+(a === 0), Math.abs(f - u)),
544
+ fill: d[i(n.tone, r)],
545
+ ...b.props(h && l.selected, p !== void 0 && p !== n.id && ue.mutedMark)
562
546
  }, n.id);
563
- }) : /* @__PURE__ */ T(de, {
547
+ }) : /* @__PURE__ */ E(le, {
564
548
  bucket: r,
565
549
  series: o,
566
- focusedSeries: v,
550
+ focusedSeries: y,
567
551
  index: t,
568
- x: Q(e.id) ?? Z,
569
- width: Q.bandwidth(),
552
+ x: $(e.id) ?? Z,
553
+ width: $.bandwidth(),
570
554
  y: X,
571
- isHighlighted: m?.selectedId === e.id || B?.id === e.id,
572
- highlightedSeriesId: f
573
- }), t % ye === 0 && /* @__PURE__ */ T("text", {
574
- x: (Q(e.id) ?? Z) + Q.bandwidth() / 2,
575
- y: h - 4,
555
+ isHighlighted: m?.selectedId === e.id || V?.id === e.id,
556
+ highlightedSeriesId: p
557
+ }), t % ye === 0 && /* @__PURE__ */ E("text", {
558
+ x: ($(e.id) ?? Z) + $.bandwidth() / 2,
559
+ y: g - 4,
576
560
  textAnchor: "middle",
577
- ...x.props(d.label),
561
+ ...b.props(l.label),
578
562
  children: n.length > be ? `${n.slice(0, be - 1)}…` : n
579
563
  })] }, e.id);
580
564
  }),
581
- H !== void 0 && /* @__PURE__ */ T(oe, {
582
- x: (Q(H.id) ?? Z) + Q.bandwidth() / 2,
565
+ U !== void 0 && /* @__PURE__ */ E(ne, {
566
+ x: ($(U.id) ?? Z) + $.bandwidth() / 2,
583
567
  top: 12,
584
568
  bottom: Y,
585
- width: Math.max(8, Q.bandwidth())
569
+ width: Math.max(8, $.bandwidth())
586
570
  })
587
571
  ]
588
572
  })
589
573
  })
590
574
  });
591
575
  }
592
- function z(e, t, n) {
576
+ function R(e, t, n) {
593
577
  return e.map((e) => {
594
578
  let r = e.values[t];
595
579
  return `${e.label}: ${r == null ? "Unavailable" : n(r)}`;
596
580
  }).join(" · ");
597
581
  }
598
582
  // packages/charts/src/cartesian/breakdown-bar.tsx
599
- var ge = {
583
+ var z = {
600
584
  kzqmXN: "x5lhr3w",
601
585
  kZKoxP: "x5yr21d",
602
586
  $$css: !0
603
587
  }, B = { segment: (e, t) => [
604
- ge,
588
+ z,
605
589
  {
606
590
  kWkggS: t == null ? t : "xl8spv7",
607
591
  $$css: !0
@@ -612,26 +596,26 @@ var ge = {
612
596
  }
613
597
  ] };
614
598
  function V({ title: e, report: t, description: r, items: o, total: s, formatValue: c, selection: l }) {
615
- let u = n(o), d = o.reduce((e, t) => e + (t.value ?? 0), 0), m = 2 ** -52 * Math.max(d, s, 1) * o.length;
616
- return u === void 0 ? !Number.isFinite(s) || s < 0 || d - s > m ? /* @__PURE__ */ T(_, {
599
+ let f = n(o), p = o.reduce((e, t) => e + (t.value ?? 0), 0), m = 2 ** -52 * Math.max(p, s, 1) * o.length;
600
+ return f === void 0 ? !Number.isFinite(s) || s < 0 || p - s > m ? /* @__PURE__ */ E(h, {
617
601
  title: e,
618
602
  report: t,
619
603
  description: r,
620
604
  message: "The total must be finite and at least the sum of recorded values."
621
- }) : /* @__PURE__ */ T(f, {
605
+ }) : /* @__PURE__ */ E(u, {
622
606
  title: e,
623
607
  report: t,
624
608
  description: r,
625
- children: o.length === 0 ? /* @__PURE__ */ T("p", {
609
+ children: o.length === 0 ? /* @__PURE__ */ E("p", {
626
610
  className: "x153jb6y x1ghz6dp xy8obcc",
627
611
  children: "No values"
628
- }) : /* @__PURE__ */ E(w, { children: [
629
- /* @__PURE__ */ T("div", {
612
+ }) : /* @__PURE__ */ D(T, { children: [
613
+ /* @__PURE__ */ E("div", {
630
614
  "aria-hidden": !0,
631
615
  className: "x78zum5 x170jfvy xb3r6kr x1r7kqkb xmkeg23 x1y0btm7 x1ey3b81 x1jfksii",
632
- children: o.map((e, t) => e.value === null ? null : /* @__PURE__ */ T("span", { ...x.props(B.segment(s === 0 ? 0 : e.value / s * 100, p[i(e.tone, t)])) }, e.id))
616
+ children: o.map((e, t) => e.value === null ? null : /* @__PURE__ */ E("span", { ...b.props(B.segment(s === 0 ? 0 : e.value / s * 100, d[i(e.tone, t)])) }, e.id))
633
617
  }),
634
- /* @__PURE__ */ T(a, {
618
+ /* @__PURE__ */ E(a, {
635
619
  items: o.map((e, t) => ({
636
620
  id: e.id,
637
621
  label: e.label,
@@ -640,30 +624,30 @@ function V({ title: e, report: t, description: r, items: o, total: s, formatValu
640
624
  })),
641
625
  selection: l
642
626
  }),
643
- s - d > m && /* @__PURE__ */ E("p", {
627
+ s - p > m && /* @__PURE__ */ D("p", {
644
628
  className: "x153jb6y x1ghz6dp xy8obcc",
645
629
  children: [
646
630
  "Unassigned portion: ",
647
- c(s - d),
631
+ c(s - p),
648
632
  " of ",
649
633
  c(s)
650
634
  ]
651
635
  })
652
636
  ] })
653
- }) : /* @__PURE__ */ T(_, {
637
+ }) : /* @__PURE__ */ E(h, {
654
638
  title: e,
655
639
  report: t,
656
640
  description: r,
657
- message: u
641
+ message: f
658
642
  });
659
643
  }
660
644
  // packages/charts/src/cartesian/scatter-plot.tsx
661
- var H = 260, U = 56, W = 20, G = 12, K = 1e3, q = {
645
+ var H = 260, U = 56, W = 20, G = 12, ge = 1e3, K = {
662
646
  kzqmXN: "x1xc55vz",
663
647
  kZKoxP: "xdk7pt",
664
648
  kaIpWk: "x16rqkct",
665
649
  $$css: !0
666
- }, J = {
650
+ }, q = {
667
651
  brush: {
668
652
  kFalU9: "xx69xxh",
669
653
  kkrTdU: "xsid9ct",
@@ -701,7 +685,7 @@ var H = 260, U = 56, W = 20, G = 12, K = 1e3, q = {
701
685
  "--x-top": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
702
686
  }],
703
687
  dot: (e) => [
704
- q,
688
+ K,
705
689
  {
706
690
  kWkggS: e == null ? e : "xl8spv7",
707
691
  $$css: !0
@@ -716,78 +700,78 @@ var H = 260, U = 56, W = 20, G = 12, K = 1e3, q = {
716
700
  $$css: !0
717
701
  }
718
702
  };
719
- function Y(e) {
720
- let { title: t, report: n, description: r, points: i, xDomain: a, yDomain: o, xLabel: s, yLabel: c, formatX: d, formatY: h, selection: g, rangeSelection: v, emptyLabel: b } = e, { ref: ee, width: S } = y(), te = _e(e);
721
- if (te !== null) return /* @__PURE__ */ T(_, {
703
+ function J(e) {
704
+ let { title: t, report: n, description: r, points: i, xDomain: a, yDomain: o, xLabel: l, yLabel: p, formatX: m, formatY: g, selection: v, rangeSelection: y, emptyLabel: x } = e, { ref: S, width: C } = _(), ee = Z(e);
705
+ if (ee !== null) return /* @__PURE__ */ E(h, {
722
706
  title: t,
723
707
  report: n,
724
708
  description: r,
725
- message: te
709
+ message: ee
726
710
  });
727
- let ne = D({
711
+ let w = k({
728
712
  domain: [...a],
729
- range: [U, Math.max(U, S - W)]
730
- }), C = D({
713
+ range: [U, Math.max(U, C - W)]
714
+ }), T = k({
731
715
  domain: [...o],
732
716
  range: [216, G]
733
- }), w = i.find((e) => e.id === g?.selectedId);
734
- return /* @__PURE__ */ E(f, {
717
+ }), O = i.find((e) => e.id === v?.selectedId);
718
+ return /* @__PURE__ */ D(u, {
735
719
  title: t,
736
720
  report: n,
737
721
  description: r,
738
- footer: g !== void 0 && i.length > 0 ? /* @__PURE__ */ T(l, { children: w === void 0 ? "Select a point to inspect its label and coordinates." : `${w.label}, ${s}: ${d(w.x)}, ${c}: ${h(w.y)}` }) : void 0,
722
+ footer: v !== void 0 && i.length > 0 ? /* @__PURE__ */ E(s, { children: O === void 0 ? "Select a point to inspect its label and coordinates." : `${O.label}, ${l}: ${m(O.x)}, ${p}: ${g(O.y)}` }) : void 0,
739
723
  children: [
740
- i.length === 0 ? /* @__PURE__ */ T("p", {
724
+ i.length === 0 ? /* @__PURE__ */ E("p", {
741
725
  className: "x1ghz6dp x153jb6y",
742
- children: b
743
- }) : /* @__PURE__ */ E("div", {
744
- ref: ee,
726
+ children: x
727
+ }) : /* @__PURE__ */ D("div", {
728
+ ref: S,
745
729
  className: "x1n2onr6 xeuugli",
746
- children: [/* @__PURE__ */ T(X, {
747
- width: S,
748
- scaleX: ne,
749
- scaleY: C,
730
+ children: [/* @__PURE__ */ E(Y, {
731
+ width: C,
732
+ scaleX: w,
733
+ scaleY: T,
750
734
  ...e
751
- }, `${a[0]}:${a[1]}:${o[0]}:${o[1]}:${S}`), g !== void 0 && /* @__PURE__ */ T("div", {
735
+ }, `${a[0]}:${a[1]}:${o[0]}:${o[1]}:${C}`), v !== void 0 && /* @__PURE__ */ E("div", {
752
736
  className: "x10l6tqk x10a8y8t x1n71m9f x47corl",
753
- children: i.map((e) => /* @__PURE__ */ T("button", {
737
+ children: i.map((e) => /* @__PURE__ */ E("button", {
754
738
  type: "button",
755
739
  title: e.label,
756
- "aria-label": `${e.label}, ${s}: ${d(e.x)}, ${c}: ${h(e.y)}`,
757
- "aria-pressed": g.selectedId === e.id,
758
- onClick: () => g.onSelect(e.id),
759
- ...x.props(J.target, J.location(ne(e.x), C(e.y))),
760
- children: /* @__PURE__ */ T("span", {
740
+ "aria-label": `${e.label}, ${l}: ${m(e.x)}, ${p}: ${g(e.y)}`,
741
+ "aria-pressed": v.selectedId === e.id,
742
+ onClick: () => v.onSelect(e.id),
743
+ ...b.props(q.target, q.location(w(e.x), T(e.y))),
744
+ children: /* @__PURE__ */ E("span", {
761
745
  "aria-hidden": !0,
762
- ...x.props(J.dot(p[e.tone]), g.selectedId === e.id && J.selected)
746
+ ...b.props(q.dot(d[e.tone]), v.selectedId === e.id && q.selected)
763
747
  })
764
748
  }, e.id))
765
749
  })]
766
750
  }),
767
- v !== void 0 && /* @__PURE__ */ T(Z, {
751
+ y !== void 0 && /* @__PURE__ */ E(X, {
768
752
  ...e,
769
- rangeSelection: v
753
+ rangeSelection: y
770
754
  }),
771
- i.length > 0 && /* @__PURE__ */ T(m, { children: i.map((e) => /* @__PURE__ */ E(u, {
772
- label: `${e.label}, ${s}: ${d(e.x)}, ${c}: ${h(e.y)}`,
773
- isSelected: g?.selectedId === e.id,
774
- onSelect: g === void 0 ? void 0 : () => g.onSelect(e.id),
775
- children: [/* @__PURE__ */ T("span", { children: e.label }), /* @__PURE__ */ E("span", {
755
+ i.length > 0 && /* @__PURE__ */ E(f, { children: i.map((e) => /* @__PURE__ */ D(c, {
756
+ label: `${e.label}, ${l}: ${m(e.x)}, ${p}: ${g(e.y)}`,
757
+ isSelected: v?.selectedId === e.id,
758
+ onSelect: v === void 0 ? void 0 : () => v.onSelect(e.id),
759
+ children: [/* @__PURE__ */ E("span", { children: e.label }), /* @__PURE__ */ D("span", {
776
760
  className: "xeuugli xss6m8b xj0a0fe x153jb6y",
777
761
  children: [
778
- d(e.x),
762
+ m(e.x),
779
763
  " · ",
780
- h(e.y)
764
+ g(e.y)
781
765
  ]
782
766
  })]
783
767
  }, e.id)) })
784
768
  ]
785
769
  });
786
770
  }
787
- function X({ width: e, scaleX: t, scaleY: n, points: r, xLabel: i, yLabel: a, formatX: o, formatY: s, selection: c, rangeSelection: l }) {
788
- let u = S(), [f, m] = C(null), h = f === null ? l?.value : {
789
- x: [Math.min(f.start.x, f.end.x), Math.max(f.start.x, f.end.x)],
790
- y: [Math.min(f.start.y, f.end.y), Math.max(f.start.y, f.end.y)]
771
+ function Y({ width: e, scaleX: t, scaleY: n, points: r, xLabel: i, yLabel: a, formatX: o, formatY: s, selection: c, rangeSelection: u }) {
772
+ let f = S(), [p, m] = w(null), h = p === null ? u?.value : {
773
+ x: [Math.min(p.start.x, p.end.x), Math.max(p.start.x, p.end.x)],
774
+ y: [Math.min(p.start.y, p.end.y), Math.max(p.start.y, p.end.y)]
791
775
  };
792
776
  function g(r) {
793
777
  let i = r.currentTarget.getBoundingClientRect();
@@ -797,7 +781,7 @@ function X({ width: e, scaleX: t, scaleY: n, points: r, xLabel: i, yLabel: a, fo
797
781
  };
798
782
  }
799
783
  function _(t) {
800
- if (l === void 0 || t.button !== 0 || t.pointerType === "touch") return;
784
+ if (u === void 0 || t.button !== 0 || t.pointerType === "touch") return;
801
785
  let n = t.currentTarget.getBoundingClientRect(), r = (t.clientX - n.left) / n.width * e, i = (t.clientY - n.top) / n.height * H;
802
786
  if (r < U || r > e - W || i < G || i > 216) return;
803
787
  let a = g(t);
@@ -808,20 +792,20 @@ function X({ width: e, scaleX: t, scaleY: n, points: r, xLabel: i, yLabel: a, fo
808
792
  });
809
793
  }
810
794
  function v(e) {
811
- f !== null && f.pointerId === e.pointerId && m({
812
- ...f,
795
+ p !== null && p.pointerId === e.pointerId && m({
796
+ ...p,
813
797
  end: g(e)
814
798
  });
815
799
  }
816
800
  function y(e) {
817
- if (f === null || f.pointerId !== e.pointerId) return;
801
+ if (p === null || p.pointerId !== e.pointerId) return;
818
802
  let t = g(e), n = {
819
- x: [Math.min(f.start.x, t.x), Math.max(f.start.x, t.x)],
820
- y: [Math.min(f.start.y, t.y), Math.max(f.start.y, t.y)]
803
+ x: [Math.min(p.start.x, t.x), Math.max(p.start.x, t.x)],
804
+ y: [Math.min(p.start.y, t.y), Math.max(p.start.y, t.y)]
821
805
  };
822
- m(null), e.currentTarget.releasePointerCapture(e.pointerId), l?.onChange(n);
806
+ m(null), e.currentTarget.releasePointerCapture(e.pointerId), u?.onChange(n);
823
807
  }
824
- return /* @__PURE__ */ E("svg", {
808
+ return /* @__PURE__ */ D("svg", {
825
809
  width: e,
826
810
  height: H,
827
811
  viewBox: `0 0 ${e} ${H}`,
@@ -831,90 +815,90 @@ function X({ width: e, scaleX: t, scaleY: n, points: r, xLabel: i, yLabel: a, fo
831
815
  onPointerUp: y,
832
816
  onPointerCancel: () => m(null),
833
817
  onLostPointerCapture: () => m(null),
834
- ...x.props(d.svg, l !== void 0 && J.brush),
818
+ ...b.props(l.svg, u !== void 0 && q.brush),
835
819
  children: [
836
- /* @__PURE__ */ T("defs", { children: /* @__PURE__ */ T("clipPath", {
837
- id: u,
838
- children: /* @__PURE__ */ T("rect", {
820
+ /* @__PURE__ */ E("defs", { children: /* @__PURE__ */ E("clipPath", {
821
+ id: f,
822
+ children: /* @__PURE__ */ E("rect", {
839
823
  x: U,
840
824
  y: G,
841
825
  width: Math.max(0, e - U - W),
842
826
  height: 204
843
827
  })
844
828
  }) }),
845
- t.ticks(5).map((e) => /* @__PURE__ */ E("g", { children: [/* @__PURE__ */ T("line", {
829
+ t.ticks(5).map((e) => /* @__PURE__ */ D("g", { children: [/* @__PURE__ */ E("line", {
846
830
  x1: t(e),
847
831
  x2: t(e),
848
832
  y1: G,
849
833
  y2: 216,
850
- ...x.props(d.grid)
851
- }), /* @__PURE__ */ T("text", {
834
+ ...b.props(l.grid)
835
+ }), /* @__PURE__ */ E("text", {
852
836
  x: t(e),
853
837
  y: 234,
854
838
  textAnchor: "middle",
855
- ...x.props(d.label),
839
+ ...b.props(l.label),
856
840
  children: o(e)
857
841
  })] }, e)),
858
- n.ticks(4).map((t) => /* @__PURE__ */ E("g", { children: [/* @__PURE__ */ T("line", {
842
+ n.ticks(4).map((t) => /* @__PURE__ */ D("g", { children: [/* @__PURE__ */ E("line", {
859
843
  x1: U,
860
844
  x2: e - W,
861
845
  y1: n(t),
862
846
  y2: n(t),
863
- ...x.props(d.grid)
864
- }), /* @__PURE__ */ T("text", {
847
+ ...b.props(l.grid)
848
+ }), /* @__PURE__ */ E("text", {
865
849
  x: 48,
866
850
  y: n(t) + 4,
867
851
  textAnchor: "end",
868
- ...x.props(d.label),
852
+ ...b.props(l.label),
869
853
  children: s(t)
870
854
  })] }, t)),
871
- /* @__PURE__ */ T("text", {
855
+ /* @__PURE__ */ E("text", {
872
856
  x: (U + e - W) / 2,
873
857
  y: 256,
874
858
  textAnchor: "middle",
875
- ...x.props(d.label),
859
+ ...b.props(l.label),
876
860
  children: i
877
861
  }),
878
- /* @__PURE__ */ T("text", {
862
+ /* @__PURE__ */ E("text", {
879
863
  x: 12,
880
864
  y: 108,
881
865
  textAnchor: "middle",
882
866
  transform: "rotate(-90 12 108)",
883
- ...x.props(d.label),
867
+ ...b.props(l.label),
884
868
  children: a
885
869
  }),
886
- /* @__PURE__ */ E("g", {
887
- clipPath: `url(#${u})`,
888
- children: [h != null && /* @__PURE__ */ T("rect", {
870
+ /* @__PURE__ */ D("g", {
871
+ clipPath: `url(#${f})`,
872
+ children: [h != null && /* @__PURE__ */ E("rect", {
889
873
  x: t(h.x[0]),
890
874
  y: n(h.y[1]),
891
875
  width: t(h.x[1]) - t(h.x[0]),
892
876
  height: n(h.y[0]) - n(h.y[1]),
893
877
  className: "x1e0kj8g xv7c1pl x1tg5nk6 xnpr05h x15lqr97 x47corl"
894
- }), c === void 0 && r.map((e) => /* @__PURE__ */ T("circle", {
878
+ }), c === void 0 && r.map((e) => /* @__PURE__ */ E("circle", {
895
879
  cx: t(e.x),
896
880
  cy: n(e.y),
897
881
  r: 4,
898
- fill: p[e.tone]
882
+ fill: d[e.tone]
899
883
  }, e.id))]
900
884
  })
901
885
  ]
902
886
  });
903
887
  }
904
- function Z({ rangeSelection: e, xDomain: t, yDomain: n, xLabel: r, yLabel: i, formatX: a, formatY: s }) {
905
- let c = e.value ?? {
888
+ function X({ rangeSelection: e, xDomain: t, yDomain: n, xLabel: r, yLabel: i, formatX: a, formatY: o }) {
889
+ let s = e.value ?? {
906
890
  x: t,
907
891
  y: n
908
892
  };
909
- return /* @__PURE__ */ E("fieldset", {
893
+ return /* @__PURE__ */ D("fieldset", {
910
894
  className: "xrvj5dj x1n8ia3y x1xxf3xd xc342km x1717udv xeuugli",
911
895
  children: [
912
- /* @__PURE__ */ T("legend", {
896
+ /* @__PURE__ */ E("legend", {
913
897
  className: "x153jb6y xy8obcc x1jfksii",
914
898
  children: "Drag with a mouse, or adjust these bounds to select a coordinate range."
915
899
  }),
916
- /* @__PURE__ */ E(b.Root, {
917
- value: c.x,
900
+ /* @__PURE__ */ D(y.Root, {
901
+ value: s.x,
918
902
  min: t[0],
919
903
  max: t[1],
920
904
  step: e.xStep,
@@ -922,62 +906,62 @@ function Z({ rangeSelection: e, xDomain: t, yDomain: n, xLabel: r, yLabel: i, fo
922
906
  thumbCollisionBehavior: "none",
923
907
  onValueChange: (t) => e.onChange({
924
908
  x: t,
925
- y: c.y
909
+ y: s.y
926
910
  }),
927
- children: [/* @__PURE__ */ E("div", {
911
+ children: [/* @__PURE__ */ D("div", {
928
912
  className: "x78zum5 x1a02dak x1qughib x1hnptsi x153jb6y xy8obcc xj0a0fe",
929
- children: [/* @__PURE__ */ T(b.Label, { children: r }), /* @__PURE__ */ E("span", { children: [
930
- a(c.x[0]),
913
+ children: [/* @__PURE__ */ E(y.Label, { children: r }), /* @__PURE__ */ D("span", { children: [
914
+ a(s.x[0]),
931
915
  " – ",
932
- a(c.x[1])
916
+ a(s.x[1])
933
917
  ] })]
934
- }), /* @__PURE__ */ T(b.Control, { children: /* @__PURE__ */ E(b.Track, { children: [
935
- /* @__PURE__ */ T(b.Indicator, {}),
936
- /* @__PURE__ */ T(b.Thumb, {
918
+ }), /* @__PURE__ */ E(y.Control, { children: /* @__PURE__ */ D(y.Track, { children: [
919
+ /* @__PURE__ */ E(y.Indicator, {}),
920
+ /* @__PURE__ */ E(y.Thumb, {
937
921
  index: 0,
938
922
  "aria-label": `${r} minimum`,
939
923
  getAriaValueText: (e, t) => a(t)
940
924
  }),
941
- /* @__PURE__ */ T(b.Thumb, {
925
+ /* @__PURE__ */ E(y.Thumb, {
942
926
  index: 1,
943
927
  "aria-label": `${r} maximum`,
944
928
  getAriaValueText: (e, t) => a(t)
945
929
  })
946
930
  ] }) })]
947
931
  }),
948
- /* @__PURE__ */ E(b.Root, {
949
- value: c.y,
932
+ /* @__PURE__ */ D(y.Root, {
933
+ value: s.y,
950
934
  min: n[0],
951
935
  max: n[1],
952
936
  step: e.yStep,
953
937
  locale: e.locale,
954
938
  thumbCollisionBehavior: "none",
955
939
  onValueChange: (t) => e.onChange({
956
- x: c.x,
940
+ x: s.x,
957
941
  y: t
958
942
  }),
959
- children: [/* @__PURE__ */ E("div", {
943
+ children: [/* @__PURE__ */ D("div", {
960
944
  className: "x78zum5 x1a02dak x1qughib x1hnptsi x153jb6y xy8obcc xj0a0fe",
961
- children: [/* @__PURE__ */ T(b.Label, { children: i }), /* @__PURE__ */ E("span", { children: [
962
- s(c.y[0]),
945
+ children: [/* @__PURE__ */ E(y.Label, { children: i }), /* @__PURE__ */ D("span", { children: [
946
+ o(s.y[0]),
963
947
  " – ",
964
- s(c.y[1])
948
+ o(s.y[1])
965
949
  ] })]
966
- }), /* @__PURE__ */ T(b.Control, { children: /* @__PURE__ */ E(b.Track, { children: [
967
- /* @__PURE__ */ T(b.Indicator, {}),
968
- /* @__PURE__ */ T(b.Thumb, {
950
+ }), /* @__PURE__ */ E(y.Control, { children: /* @__PURE__ */ D(y.Track, { children: [
951
+ /* @__PURE__ */ E(y.Indicator, {}),
952
+ /* @__PURE__ */ E(y.Thumb, {
969
953
  index: 0,
970
954
  "aria-label": `${i} minimum`,
971
- getAriaValueText: (e, t) => s(t)
955
+ getAriaValueText: (e, t) => o(t)
972
956
  }),
973
- /* @__PURE__ */ T(b.Thumb, {
957
+ /* @__PURE__ */ E(y.Thumb, {
974
958
  index: 1,
975
959
  "aria-label": `${i} maximum`,
976
- getAriaValueText: (e, t) => s(t)
960
+ getAriaValueText: (e, t) => o(t)
977
961
  })
978
962
  ] }) })]
979
963
  }),
980
- /* @__PURE__ */ T(o, {
964
+ /* @__PURE__ */ E(v, {
981
965
  type: "button",
982
966
  disabled: e.value === null,
983
967
  onClick: () => e.onChange(null),
@@ -986,10 +970,10 @@ function Z({ rangeSelection: e, xDomain: t, yDomain: n, xLabel: r, yLabel: i, fo
986
970
  ]
987
971
  });
988
972
  }
989
- function _e({ points: e, xDomain: t, yDomain: n, rangeSelection: r }) {
990
- if (!g(t) || !g(n)) return "Scatter domains must contain finite, increasing endpoints.";
991
- if (e.length > 1e3) return `This plot exceeds the ${K}-point render limit. Supply a smaller, labelled sample.`;
992
- if (!h(e)) return "Scatter points must have unique identifiers.";
973
+ function Z({ points: e, xDomain: t, yDomain: n, rangeSelection: r }) {
974
+ if (!m(t) || !m(n)) return "Scatter domains must contain finite, increasing endpoints.";
975
+ if (e.length > 1e3) return `This plot exceeds the ${ge}-point render limit. Supply a smaller, labelled sample.`;
976
+ if (!p(e)) return "Scatter points must have unique identifiers.";
993
977
  if (e.some((e) => !Number.isFinite(e.x) || !Number.isFinite(e.y))) return "Scatter coordinates must be finite.";
994
978
  if (e.some((e) => {
995
979
  let r = e.x < t[0] || e.x > t[1], i = e.y < n[0] || e.y > n[1];
@@ -1010,7 +994,7 @@ var $ = {
1010
994
  pointsPerSeries: 2e3,
1011
995
  markers: 200,
1012
996
  panels: 12
1013
- }, ve = .01, ye = [
997
+ }, _e = .01, ve = [
1014
998
  "series1",
1015
999
  "series2",
1016
1000
  "series3",
@@ -1018,13 +1002,13 @@ var $ = {
1018
1002
  "series5",
1019
1003
  "series6"
1020
1004
  ];
1021
- function be({ series: e, isStacked: t, markers: n }) {
1005
+ function ye({ series: e, isStacked: t, markers: n }) {
1022
1006
  let r = e[0]?.points.map((e) => e.timestamp) ?? [];
1023
1007
  if (e.length > $.series || r.length > $.pointsPerSeries || n.length > $.markers) return `Choose a window with at most ${$.series} series, ${$.pointsPerSeries} observations per series, and ${$.markers} markers.`;
1024
- if (!h(e) || !h(n)) return "Series and markers require unique identifiers.";
1008
+ if (!p(e) || !p(n)) return "Series and markers require unique identifiers.";
1025
1009
  for (let n of e) {
1026
1010
  if (n.points.length !== r.length) return "Every series must supply the same observation timestamps.";
1027
- let e = we({
1011
+ let e = Ce({
1028
1012
  points: n.points,
1029
1013
  timestamps: r,
1030
1014
  isStacked: t
@@ -1042,7 +1026,7 @@ function be({ series: e, isStacked: t, markers: n }) {
1042
1026
  if (!Number.isFinite(a) || !Number.isFinite(o)) return "The elapsed-time and value ranges must be finite.";
1043
1027
  if (t && r.some((t, n) => !Number.isFinite(e.reduce((e, t) => e + (t.points[n]?.value ?? 0), 0)))) return "Stacked observation totals must be finite.";
1044
1028
  }
1045
- function xe({ series: e, markers: t, timestampUnit: n, isStacked: r }) {
1029
+ function be({ series: e, markers: t, timestampUnit: n, isStacked: r }) {
1046
1030
  return JSON.stringify([
1047
1031
  n,
1048
1032
  r,
@@ -1062,15 +1046,15 @@ function xe({ series: e, markers: t, timestampUnit: n, isStacked: r }) {
1062
1046
  ])
1063
1047
  ]);
1064
1048
  }
1065
- function Se(e, t, n = !1) {
1049
+ function xe(e, t, n = !1) {
1066
1050
  if (e !== t) return [e, t];
1067
- let r = Math.max(1, Math.abs(e) * ve), i = n ? 0 : e - r, a = t + r;
1051
+ let r = Math.max(1, Math.abs(e) * _e), i = n ? 0 : e - r, a = t + r;
1068
1052
  return [Number.isFinite(i) ? i : e, Number.isFinite(a) ? a : t];
1069
1053
  }
1070
- function Ce(e, t) {
1054
+ function Se(e, t) {
1071
1055
  let n = e.filter((e) => e.tone === void 0);
1072
1056
  return e.map((r, i) => {
1073
- let a = n.findIndex((e) => e.id === r.id), o = r.tone ?? ye[a % ye.length] ?? "series1", s = r.points.map((n, r) => {
1057
+ let a = n.findIndex((e) => e.id === r.id), o = r.tone ?? ve[a % ve.length] ?? "series1", s = r.points.map((n, r) => {
1074
1058
  let a = t ? e.slice(0, i).reduce((e, t) => e + (t.points[r]?.value ?? 0), 0) : 0;
1075
1059
  return {
1076
1060
  ...n,
@@ -1085,7 +1069,7 @@ function Ce(e, t) {
1085
1069
  };
1086
1070
  });
1087
1071
  }
1088
- function we({ points: e, timestamps: t, isStacked: n }) {
1072
+ function Ce({ points: e, timestamps: t, isStacked: n }) {
1089
1073
  for (let [r, i] of e.entries()) {
1090
1074
  let a = e[r - 1], o = a !== void 0 && i.timestamp <= a.timestamp;
1091
1075
  if (!Number.isFinite(i.timestamp) || i.timestamp !== t[r] || o) return "Observation timestamps must be finite, aligned, and strictly increasing.";
@@ -1094,49 +1078,49 @@ function we({ points: e, timestamps: t, isStacked: n }) {
1094
1078
  }
1095
1079
  }
1096
1080
  // packages/charts/src/cartesian/time-series-line.tsx
1097
- function Te({ series: e, x: t, y: n, inspectedTimestamp: r, pointRadius: i = 3 }) {
1098
- return /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(O, {
1081
+ function we({ series: e, x: t, y: n, inspectedTimestamp: r, pointRadius: i = 3 }) {
1082
+ return /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(j, {
1099
1083
  data: [...e.points],
1100
1084
  defined: (e) => e.value !== null,
1101
1085
  x: (e) => t(e.timestamp),
1102
1086
  y: (e) => n((e.value ?? 0) + e.base),
1103
- stroke: p[e.tone],
1104
- ...x.props(d.mark)
1087
+ stroke: d[e.tone],
1088
+ ...b.props(l.mark)
1105
1089
  }), e.points.filter((t, n) => {
1106
1090
  if (t.value === null) return !1;
1107
1091
  let i = e.points[n - 1]?.value === null || e.points[n + 1]?.value === null;
1108
1092
  return e.points.length === 1 || i || t.timestamp === r;
1109
- }).map((r) => /* @__PURE__ */ T("circle", {
1093
+ }).map((r) => /* @__PURE__ */ E("circle", {
1110
1094
  cx: t(r.timestamp),
1111
1095
  cy: n((r.value ?? 0) + r.base),
1112
1096
  r: i,
1113
- fill: p[e.tone]
1097
+ fill: d[e.tone]
1114
1098
  }, r.timestamp))] });
1115
1099
  }
1116
1100
  // packages/charts/src/cartesian/sparkline.tsx
1117
- function Ee({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueDomain: a }) {
1118
- let o = S(), s = S(), c = De({
1101
+ function Te({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueDomain: a }) {
1102
+ let o = S(), s = S(), c = Ee({
1119
1103
  title: e,
1120
1104
  summary: t,
1121
1105
  unit: n,
1122
1106
  series: i,
1123
1107
  valueDomain: a
1124
1108
  }), l = i.points.some((e) => e.value !== null);
1125
- if (c !== void 0 || !l) return /* @__PURE__ */ T("span", {
1109
+ if (c !== void 0 || !l) return /* @__PURE__ */ E("span", {
1126
1110
  role: "img",
1127
1111
  "aria-label": `${e}. ${t} Values in ${n}; timestamps in ${r}. ${c ?? "No recorded values. Missing observations remain unavailable."}`,
1128
1112
  title: c ?? "No recorded values",
1129
1113
  className: "x2pejg6 x10w6t97 x2lah0s xxymvpz x3nfvp2 x6s0dn4 xl56j7k x153jb6y x1hz01jw xy8obcc",
1130
1114
  children: c === void 0 ? "No data" : "Invalid trend"
1131
1115
  });
1132
- let u = i.points[0]?.timestamp ?? 0, d = i.points.at(-1)?.timestamp ?? u, f = D({
1133
- domain: [...Se(u, d)],
1116
+ let u = i.points[0]?.timestamp ?? 0, d = i.points.at(-1)?.timestamp ?? u, f = k({
1117
+ domain: [...xe(u, d)],
1134
1118
  range: [3, 125]
1135
- }), p = D({
1119
+ }), p = k({
1136
1120
  domain: [...a],
1137
1121
  range: [29, 3]
1138
- }), m = Ce([i], !1)[0];
1139
- return /* @__PURE__ */ E("svg", {
1122
+ }), m = Se([i], !1)[0];
1123
+ return /* @__PURE__ */ D("svg", {
1140
1124
  role: "img",
1141
1125
  "aria-labelledby": o,
1142
1126
  "aria-describedby": s,
@@ -1146,11 +1130,11 @@ function Ee({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueD
1146
1130
  height: 32,
1147
1131
  className: "x1rg5ohu x2pejg6 x10w6t97 x2lah0s xxymvpz",
1148
1132
  children: [
1149
- /* @__PURE__ */ T("title", {
1133
+ /* @__PURE__ */ E("title", {
1150
1134
  id: o,
1151
1135
  children: e
1152
1136
  }),
1153
- /* @__PURE__ */ E("desc", {
1137
+ /* @__PURE__ */ D("desc", {
1154
1138
  id: s,
1155
1139
  children: [
1156
1140
  t,
@@ -1168,7 +1152,7 @@ function Ee({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueD
1168
1152
  "."
1169
1153
  ]
1170
1154
  }),
1171
- m !== void 0 && /* @__PURE__ */ T(Te, {
1155
+ m !== void 0 && /* @__PURE__ */ E(we, {
1172
1156
  series: m,
1173
1157
  x: f,
1174
1158
  y: p,
@@ -1177,10 +1161,10 @@ function Ee({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueD
1177
1161
  ]
1178
1162
  });
1179
1163
  }
1180
- function De({ title: e, summary: t, unit: n, series: r, valueDomain: i }) {
1164
+ function Ee({ title: e, summary: t, unit: n, series: r, valueDomain: i }) {
1181
1165
  if (e.trim() === "" || t.trim() === "" || n.trim() === "") return "A trend requires a title, a readable summary, and a value unit.";
1182
- if (!g(i)) return "The displayed value domain must have finite, increasing bounds.";
1183
- let a = be({
1166
+ if (!m(i)) return "The displayed value domain must have finite, increasing bounds.";
1167
+ let a = ye({
1184
1168
  series: [r],
1185
1169
  isStacked: !1,
1186
1170
  markers: []
@@ -1189,7 +1173,7 @@ function De({ title: e, summary: t, unit: n, series: r, valueDomain: i }) {
1189
1173
  if (r.points.some((e) => e.value !== null && (e.value < i[0] || e.value > i[1]))) return "Every recorded value must be inside the declared value domain.";
1190
1174
  }
1191
1175
  // packages/charts/src/cartesian/time-series.tsx
1192
- var Oe = {
1176
+ var De = {
1193
1177
  timeAxis: {
1194
1178
  k1xSpc: "x78zum5",
1195
1179
  kjj79g: "x1qughib",
@@ -1210,112 +1194,109 @@ var Oe = {
1210
1194
  "--x-paddingInlineEnd": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
1211
1195
  }]
1212
1196
  };
1213
- function ke(e) {
1214
- return /* @__PURE__ */ T(Ie, {
1197
+ function Oe(e) {
1198
+ return /* @__PURE__ */ E(Fe, {
1215
1199
  ...e,
1216
1200
  kind: "line",
1217
1201
  isStacked: !1
1218
1202
  });
1219
1203
  }
1220
- function Ae({ isStacked: e = !1, ...t }) {
1221
- return /* @__PURE__ */ T(Ie, {
1204
+ function ke({ isStacked: e = !1, ...t }) {
1205
+ return /* @__PURE__ */ E(Fe, {
1222
1206
  ...t,
1223
1207
  kind: "area",
1224
1208
  isStacked: e
1225
1209
  });
1226
1210
  }
1227
- function je(e) {
1228
- return /* @__PURE__ */ T(Me, { ...e });
1211
+ function Ae(e) {
1212
+ return /* @__PURE__ */ E(je, { ...e });
1229
1213
  }
1230
- function Me({ title: n, description: r, series: i, actions: a, report: o, height: s = 180, showTimeAxis: c = !0 }) {
1231
- let l = S(), u = Ce(i.map((e) => ({
1214
+ function je({ title: n, description: r, series: i, actions: a, report: o, height: s = 180, showTimeAxis: c = !0 }) {
1215
+ let d = S(), f = Se(i.map((e) => ({
1232
1216
  ...e,
1233
1217
  points: []
1234
1218
  })), !1);
1235
- return !Number.isFinite(s) || s < 48 ? /* @__PURE__ */ T(_, {
1219
+ return !Number.isFinite(s) || s < 48 ? /* @__PURE__ */ E(h, {
1236
1220
  title: n,
1237
1221
  description: r,
1238
1222
  report: o,
1239
1223
  message: "Chart height must be at least 48 pixels."
1240
- }) : /* @__PURE__ */ T("div", {
1224
+ }) : /* @__PURE__ */ E("div", {
1241
1225
  "aria-hidden": !0,
1242
1226
  inert: !0,
1243
1227
  className: "xeuugli",
1244
- children: /* @__PURE__ */ T(f, {
1228
+ children: /* @__PURE__ */ E(u, {
1245
1229
  title: n,
1246
1230
  description: r,
1247
1231
  report: o,
1248
- series: u,
1249
- actions: /* @__PURE__ */ E(w, { children: [a, /* @__PURE__ */ T(se, {
1250
- title: n,
1251
- children: null
1252
- })] }),
1253
- children: /* @__PURE__ */ E("div", {
1232
+ series: f,
1233
+ actions: a,
1234
+ children: /* @__PURE__ */ D("div", {
1254
1235
  className: "xrvj5dj x1n8ia3y",
1255
- children: [/* @__PURE__ */ T(M, {
1256
- id: l,
1236
+ children: [/* @__PURE__ */ E(oe, {
1237
+ id: d,
1257
1238
  label: void 0,
1258
- legend: u,
1239
+ legend: f,
1259
1240
  rows: [],
1260
1241
  x: 0,
1261
1242
  width: 0,
1262
1243
  source: void 0,
1263
1244
  hasSeriesSummary: o?.seriesValues !== void 0
1264
- }), /* @__PURE__ */ E("div", {
1265
- ...x.props(d.plot),
1266
- children: [/* @__PURE__ */ T(t, { height: s - 16 }), c && /* @__PURE__ */ E("div", {
1245
+ }), /* @__PURE__ */ D("div", {
1246
+ ...b.props(l.plot),
1247
+ children: [/* @__PURE__ */ E(t, { height: s - 16 }), c && /* @__PURE__ */ D("div", {
1267
1248
  className: "x78zum5 x1qughib x8zbtdt x1c87qhr xy8obcc xas2l8k x153jb6y xss6m8b",
1268
- children: [/* @__PURE__ */ T(e, { width: "8ch" }), /* @__PURE__ */ T(e, { width: "8ch" })]
1249
+ children: [/* @__PURE__ */ E(e, { width: "8ch" }), /* @__PURE__ */ E(e, { width: "8ch" })]
1269
1250
  })]
1270
1251
  })]
1271
1252
  })
1272
1253
  })
1273
1254
  });
1274
1255
  }
1275
- function Ne({ charts: e, ...t }) {
1276
- let n = ne(null), [r, i] = C(), a = JSON.stringify(e.map((e) => [
1256
+ function Me({ charts: e, ...t }) {
1257
+ let n = ee(null), [r, i] = w(), a = JSON.stringify(e.map((e) => [
1277
1258
  e.id,
1278
1259
  e.title,
1279
- xe({
1260
+ be({
1280
1261
  series: e.series,
1281
1262
  markers: e.markers ?? [],
1282
1263
  timestampUnit: t.timestampUnit,
1283
1264
  isStacked: !1
1284
1265
  })
1285
1266
  ])), o = JSON.stringify(e[0]?.series[0]?.points.map((e) => e.timestamp) ?? []), s = e.every((e) => JSON.stringify(e.series[0]?.points.map((e) => e.timestamp) ?? []) === o);
1286
- if (r !== void 0 && r.signature !== a && i(void 0), ee(() => {
1267
+ if (r !== void 0 && r.signature !== a && i(void 0), x(() => {
1287
1268
  function e(e) {
1288
1269
  e.target instanceof Node && n.current?.contains(e.target) !== !0 && i(void 0);
1289
1270
  }
1290
1271
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
1291
- }, []), !s || !h(e)) return /* @__PURE__ */ T(_, {
1272
+ }, []), !s || !p(e)) return /* @__PURE__ */ E(h, {
1292
1273
  title: "Small multiples",
1293
1274
  message: "Charts need unique identifiers and aligned observation timestamps."
1294
1275
  });
1295
- if (e.length > $.panels) return /* @__PURE__ */ T(_, {
1276
+ if (e.length > $.panels) return /* @__PURE__ */ E(h, {
1296
1277
  title: "Small multiples",
1297
1278
  message: `Choose at most ${$.panels} panels.`
1298
1279
  });
1299
- if (e.length === 0) return /* @__PURE__ */ T(f, {
1280
+ if (e.length === 0) return /* @__PURE__ */ E(u, {
1300
1281
  title: "Small multiples",
1301
- children: /* @__PURE__ */ T("p", {
1282
+ children: /* @__PURE__ */ E("p", {
1302
1283
  className: "x153jb6y",
1303
1284
  children: "No charts"
1304
1285
  })
1305
1286
  });
1306
1287
  let c = Math.max(52, ...e.flatMap((e) => e.series.flatMap((t) => t.points.flatMap((t) => t.value === null || !Number.isFinite(t.value) ? [] : [(e.formatTick ?? e.formatValue)(t.value).length * 7 + 12])))), l = e.every((e) => e.report !== void 0);
1307
- return /* @__PURE__ */ T("div", {
1288
+ return /* @__PURE__ */ E("div", {
1308
1289
  ref: n,
1309
1290
  ...{
1310
1291
  0: { className: "xrvj5dj x1j825kq" },
1311
1292
  1: { className: "xrvj5dj xxhr3t" }
1312
1293
  }[!!l | 0],
1313
- children: e.map((n, o) => /* @__PURE__ */ T("div", {
1294
+ children: e.map((n, o) => /* @__PURE__ */ E("div", {
1314
1295
  ...{
1315
1296
  0: {},
1316
1297
  1: { className: "x1y332i5" }
1317
1298
  }[!!(l && o > 0) | 0],
1318
- children: /* @__PURE__ */ T(Ie, {
1299
+ children: /* @__PURE__ */ E(Fe, {
1319
1300
  ...t,
1320
1301
  title: n.title,
1321
1302
  description: n.description,
@@ -1341,25 +1322,25 @@ function Ne({ charts: e, ...t }) {
1341
1322
  }, n.id))
1342
1323
  });
1343
1324
  }
1344
- function Pe({ charts: e, height: t }) {
1345
- if (!h(e) || e.length > $.panels) return /* @__PURE__ */ T(_, {
1325
+ function Ne({ charts: e, height: t }) {
1326
+ if (!p(e) || e.length > $.panels) return /* @__PURE__ */ E(h, {
1346
1327
  title: "Small multiples",
1347
1328
  message: `Choose at most ${$.panels} panels with unique identifiers.`
1348
1329
  });
1349
1330
  let n = e.every((e) => e.report !== void 0);
1350
- return /* @__PURE__ */ T("div", {
1331
+ return /* @__PURE__ */ E("div", {
1351
1332
  "aria-hidden": !0,
1352
1333
  inert: !0,
1353
1334
  ...{
1354
1335
  0: { className: "xrvj5dj x1j825kq" },
1355
1336
  1: { className: "xrvj5dj xxhr3t" }
1356
1337
  }[!!n | 0],
1357
- children: e.map((r, i) => /* @__PURE__ */ T("div", {
1338
+ children: e.map((r, i) => /* @__PURE__ */ E("div", {
1358
1339
  ...{
1359
1340
  0: {},
1360
1341
  1: { className: "x1y332i5" }
1361
1342
  }[!!(n && i > 0) | 0],
1362
- children: /* @__PURE__ */ T(Me, {
1343
+ children: /* @__PURE__ */ E(je, {
1363
1344
  ...r,
1364
1345
  height: t,
1365
1346
  showTimeAxis: i === e.length - 1
@@ -1367,62 +1348,62 @@ function Pe({ charts: e, height: t }) {
1367
1348
  }, r.id))
1368
1349
  });
1369
1350
  }
1370
- var Fe = {
1351
+ var Pe = {
1371
1352
  "x-default-marker": "x-default-marker",
1372
1353
  $$css: !0
1373
1354
  };
1374
- function Ie({ title: e, description: t, series: n, timestampUnit: r, formatTimestamp: i, formatValue: a, formatTick: o = a, markers: s = [], height: c = 180, actions: l, report: u, kind: m, isStacked: h, sharedInspection: g, axisWidth: b, showTimeAxis: re = !0 }) {
1375
- let ae = !Number.isFinite(c) || c < 48 ? "Chart height must be at least 48 pixels." : be({
1355
+ function Fe({ title: e, description: t, series: n, timestampUnit: r, formatTimestamp: i, formatValue: a, formatTick: o = a, markers: s = [], height: c = 180, actions: f, report: p, kind: m, isStacked: v, sharedInspection: y, axisWidth: T, showTimeAxis: O = !0 }) {
1356
+ let A = !Number.isFinite(c) || c < 48 ? "Chart height must be at least 48 pixels." : ye({
1376
1357
  series: n,
1377
- isStacked: h,
1358
+ isStacked: v,
1378
1359
  markers: s
1379
- }), O = te(() => ae === void 0 ? Ce(n, h) : [], [
1360
+ }), j = C(() => A === void 0 ? Se(n, v) : [], [
1380
1361
  n,
1381
- h,
1382
- ae
1383
- ]), k = O[0]?.points ?? [], { ref: A, width: j, element: ce } = y(), ue = ne(null), [N, de] = C(), P = k.find((e) => e.timestamp === N) ?? k[0], [fe, pe] = C(), F = xe({
1362
+ v,
1363
+ A
1364
+ ]), N = j[0]?.points ?? [], { ref: P, width: re, element: ie } = _(), se = ee(null), [ce, le] = w(), ue = N.find((e) => e.timestamp === ce) ?? N[0], [de, fe] = w(), F = be({
1384
1365
  series: n,
1385
1366
  markers: s,
1386
1367
  timestampUnit: r,
1387
- isStacked: h
1388
- }), I = g === void 0 ? fe?.signature === F ? fe : void 0 : g.value, L = g === void 0 || g.isSource ? I : void 0, me = u?.seriesValues !== void 0, he = S();
1389
- fe !== void 0 && (fe.signature !== F || ae !== void 0) && pe(void 0);
1390
- let R = g !== void 0;
1391
- if (ee(() => {
1392
- if (R) return;
1368
+ isStacked: v
1369
+ }), I = y === void 0 ? de?.signature === F ? de : void 0 : y.value, L = y === void 0 || y.isSource ? I : void 0, pe = p?.seriesValues !== void 0, me = S();
1370
+ de !== void 0 && (de.signature !== F || A !== void 0) && fe(void 0);
1371
+ let he = y !== void 0;
1372
+ if (x(() => {
1373
+ if (he) return;
1393
1374
  function e(e) {
1394
- e.target instanceof Node && ue.current?.contains(e.target) !== !0 && pe(void 0);
1375
+ e.target instanceof Node && se.current?.contains(e.target) !== !0 && fe(void 0);
1395
1376
  }
1396
1377
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
1397
- }, [R]), ae !== void 0) return /* @__PURE__ */ T(_, {
1378
+ }, [he]), A !== void 0) return /* @__PURE__ */ E(h, {
1398
1379
  title: e,
1399
1380
  description: t,
1400
- report: u,
1401
- message: ae
1381
+ report: p,
1382
+ message: A
1402
1383
  });
1403
- if (k.length === 0) return /* @__PURE__ */ T(f, {
1384
+ if (N.length === 0) return /* @__PURE__ */ E(u, {
1404
1385
  title: e,
1405
1386
  description: t,
1406
- actions: l,
1407
- report: u,
1408
- series: O,
1409
- children: /* @__PURE__ */ T("p", {
1387
+ actions: f,
1388
+ report: p,
1389
+ series: j,
1390
+ children: /* @__PURE__ */ E("p", {
1410
1391
  className: "x153jb6y",
1411
1392
  children: "No observations"
1412
1393
  })
1413
1394
  });
1414
- let z = c - 28, ge = z + 12, B = k[0]?.timestamp ?? 0, V = k.at(-1)?.timestamp ?? B, H = O.flatMap((e) => e.points.flatMap((e) => e.value === null ? [] : [e.value + e.base])), U = m === "area" ? Math.min(0, ...H) : Math.min(...H), W = m === "area" ? Math.max(0, ...H) : Math.max(...H), G = H.length === 0 ? 0 : U, K = H.length === 0 ? 1 : W, q = D({
1415
- domain: [...Se(G, K, m === "area")],
1416
- range: [z, 12]
1417
- }), J = q.ticks(3), Y = b ?? Math.max(44, ...J.map((e) => o(e).length * 7 + 12)), X = Math.max(Y + 1, j - 16), Z = D({
1418
- domain: [...Se(B, V)],
1419
- range: [Y, X]
1395
+ let R = c - 28, z = R + 12, B = N[0]?.timestamp ?? 0, V = N.at(-1)?.timestamp ?? B, H = j.flatMap((e) => e.points.flatMap((e) => e.value === null ? [] : [e.value + e.base])), U = m === "area" ? Math.min(0, ...H) : Math.min(...H), W = m === "area" ? Math.max(0, ...H) : Math.max(...H), G = H.length === 0 ? 0 : U, ge = H.length === 0 ? 1 : W, K = k({
1396
+ domain: [...xe(G, ge, m === "area")],
1397
+ range: [R, 12]
1398
+ }), q = K.ticks(3), J = T ?? Math.max(44, ...q.map((e) => o(e).length * 7 + 12)), Y = Math.max(J + 1, re - 16), X = k({
1399
+ domain: [...xe(B, V)],
1400
+ range: [J, Y]
1420
1401
  });
1421
- function _e(e) {
1422
- let t = ce?.getBoundingClientRect();
1402
+ function Z(e) {
1403
+ let t = ie?.getBoundingClientRect();
1423
1404
  if (t === void 0) return;
1424
- let n = Z.invert(e - t.left), r = k.find((e, t) => {
1425
- let r = k[t + 1];
1405
+ let n = X.invert(e - t.left), r = N.find((e, t) => {
1406
+ let r = N[t + 1];
1426
1407
  return r === void 0 || n <= e.timestamp + (r.timestamp - e.timestamp) / 2;
1427
1408
  });
1428
1409
  r !== void 0 && Q({
@@ -1432,15 +1413,15 @@ function Ie({ title: e, description: t, series: n, timestampUnit: r, formatTimes
1432
1413
  });
1433
1414
  }
1434
1415
  function Q(e) {
1435
- g === void 0 ? pe(e) : g.onChange(e);
1416
+ y === void 0 ? fe(e) : y.onChange(e);
1436
1417
  }
1437
1418
  function $(e) {
1438
1419
  if (e.altKey || e.ctrlKey || e.metaKey) return;
1439
- let t = k.findIndex((e) => e.timestamp === P?.timestamp), n = {
1440
- ArrowRight: Math.min(k.length - 1, t + 1),
1420
+ let t = N.findIndex((e) => e.timestamp === ue?.timestamp), n = {
1421
+ ArrowRight: Math.min(N.length - 1, t + 1),
1441
1422
  ArrowLeft: Math.max(0, t - 1),
1442
1423
  Home: 0,
1443
- End: k.length - 1
1424
+ End: N.length - 1
1444
1425
  };
1445
1426
  switch (e.key) {
1446
1427
  case "Escape":
@@ -1451,8 +1432,8 @@ function Ie({ title: e, description: t, series: n, timestampUnit: r, formatTimes
1451
1432
  case "Home":
1452
1433
  case "End": {
1453
1434
  e.preventDefault();
1454
- let t = k[n[e.key]];
1455
- t !== void 0 && (de(t.timestamp), Q({
1435
+ let t = N[n[e.key]];
1436
+ t !== void 0 && (le(t.timestamp), Q({
1456
1437
  signature: F,
1457
1438
  timestamp: t.timestamp,
1458
1439
  source: "keyboard"
@@ -1461,63 +1442,56 @@ function Ie({ title: e, description: t, series: n, timestampUnit: r, formatTimes
1461
1442
  }
1462
1443
  }
1463
1444
  }
1464
- return /* @__PURE__ */ T("div", {
1465
- ref: ue,
1445
+ return /* @__PURE__ */ E("div", {
1446
+ ref: se,
1466
1447
  className: "xeuugli",
1467
- children: /* @__PURE__ */ T(f, {
1468
- title: me ? e : /* @__PURE__ */ T(le, {
1448
+ children: /* @__PURE__ */ D(u, {
1449
+ title: pe ? e : /* @__PURE__ */ E(ae, {
1469
1450
  title: e,
1470
1451
  detail: L === void 0 ? void 0 : i(L.timestamp)
1471
1452
  }),
1472
1453
  description: t,
1473
- report: u,
1474
- series: O,
1475
- actions: /* @__PURE__ */ E(w, { children: [
1476
- l,
1477
- " ",
1478
- /* @__PURE__ */ T(se, {
1479
- title: e,
1480
- children: /* @__PURE__ */ E("table", {
1481
- className: "xh8yej3 x1mwwwfo xy8obcc x1yc453h xss6m8b",
1454
+ report: p,
1455
+ series: j,
1456
+ actions: f,
1457
+ children: [/* @__PURE__ */ E(M, { children: /* @__PURE__ */ D("table", {
1458
+ className: "xh8yej3 x1mwwwfo xy8obcc x1yc453h xss6m8b",
1459
+ children: [
1460
+ /* @__PURE__ */ D("caption", { children: [e, " observations"] }),
1461
+ /* @__PURE__ */ E("thead", { children: /* @__PURE__ */ D("tr", { children: [/* @__PURE__ */ D("th", {
1462
+ scope: "col",
1463
+ className: "x69ldcm x1yc453h xso031l x1q0q8m5 x1qndepd xj57cvi",
1482
1464
  children: [
1483
- /* @__PURE__ */ E("caption", { children: [e, " observations"] }),
1484
- /* @__PURE__ */ T("thead", { children: /* @__PURE__ */ E("tr", { children: [/* @__PURE__ */ E("th", {
1485
- scope: "col",
1486
- className: "x69ldcm x1yc453h xso031l x1q0q8m5 x1qndepd xj57cvi",
1487
- children: [
1488
- "Time (",
1489
- r,
1490
- ")"
1491
- ]
1492
- }), O.map((e) => /* @__PURE__ */ T("th", {
1493
- scope: "col",
1494
- className: "x69ldcm x1yc453h xso031l x1q0q8m5 x1qndepd xj57cvi",
1495
- children: e.label
1496
- }, e.id))] }) }),
1497
- /* @__PURE__ */ T("tbody", { children: k.map((e, t) => /* @__PURE__ */ E("tr", { children: [/* @__PURE__ */ T("th", {
1498
- scope: "row",
1499
- className: "x69ldcm x1yc453h xso031l x1q0q8m5 x1qndepd xj57cvi",
1500
- children: i(e.timestamp)
1501
- }), O.map((e) => /* @__PURE__ */ T("td", {
1502
- className: "x69ldcm x1yc453h xso031l x1q0q8m5 x1qndepd xj57cvi",
1503
- children: e.points[t]?.value === null || e.points[t]?.value === void 0 ? "Unavailable" : a(e.points[t].value)
1504
- }, e.id))] }, e.timestamp)) })
1465
+ "Time (",
1466
+ r,
1467
+ ")"
1505
1468
  ]
1506
- })
1507
- })
1508
- ] }),
1509
- children: /* @__PURE__ */ E("div", {
1469
+ }), j.map((e) => /* @__PURE__ */ E("th", {
1470
+ scope: "col",
1471
+ className: "x69ldcm x1yc453h xso031l x1q0q8m5 x1qndepd xj57cvi",
1472
+ children: e.label
1473
+ }, e.id))] }) }),
1474
+ /* @__PURE__ */ E("tbody", { children: N.map((e, t) => /* @__PURE__ */ D("tr", { children: [/* @__PURE__ */ E("th", {
1475
+ scope: "row",
1476
+ className: "x69ldcm x1yc453h xso031l x1q0q8m5 x1qndepd xj57cvi",
1477
+ children: i(e.timestamp)
1478
+ }), j.map((e) => /* @__PURE__ */ E("td", {
1479
+ className: "x69ldcm x1yc453h xso031l x1q0q8m5 x1qndepd xj57cvi",
1480
+ children: e.points[t]?.value === null || e.points[t]?.value === void 0 ? "Unavailable" : a(e.points[t].value)
1481
+ }, e.id))] }, e.timestamp)) })
1482
+ ]
1483
+ }) }), /* @__PURE__ */ D("div", {
1510
1484
  className: "xrvj5dj x1n8ia3y",
1511
1485
  children: [
1512
- /* @__PURE__ */ T(M, {
1513
- id: he,
1486
+ /* @__PURE__ */ E(oe, {
1487
+ id: me,
1514
1488
  label: L === void 0 ? void 0 : i(L.timestamp),
1515
- legend: O.map(({ id: e, label: t, tone: n }) => ({
1489
+ legend: j.map(({ id: e, label: t, tone: n }) => ({
1516
1490
  id: e,
1517
1491
  label: t,
1518
1492
  tone: n
1519
1493
  })),
1520
- rows: O.map((e) => {
1494
+ rows: j.map((e) => {
1521
1495
  let t = e.points.find((e) => e.timestamp === L?.timestamp);
1522
1496
  return {
1523
1497
  id: e.id,
@@ -1526,27 +1500,27 @@ function Ie({ title: e, description: t, series: n, timestampUnit: r, formatTimes
1526
1500
  value: t?.value === null || t === void 0 ? "Unavailable" : a(t.value)
1527
1501
  };
1528
1502
  }),
1529
- x: Z(I?.timestamp ?? B),
1530
- width: j,
1503
+ x: X(I?.timestamp ?? B),
1504
+ width: re,
1531
1505
  source: L?.source,
1532
1506
  notes: s.filter((e) => e.timestamp === L?.timestamp).map((e) => e.label),
1533
- hasSeriesSummary: me
1507
+ hasSeriesSummary: pe
1534
1508
  }),
1535
- /* @__PURE__ */ E("div", {
1536
- ref: A,
1537
- ...x.props(d.plot),
1538
- children: [/* @__PURE__ */ E("svg", {
1509
+ /* @__PURE__ */ D("div", {
1510
+ ref: P,
1511
+ ...b.props(l.plot),
1512
+ children: [/* @__PURE__ */ D("svg", {
1539
1513
  role: "img",
1540
1514
  "aria-label": `${e}. Use arrow keys to inspect observations.`,
1541
- "aria-describedby": he,
1515
+ "aria-describedby": me,
1542
1516
  tabIndex: 0,
1543
- viewBox: `0 0 ${j} ${ge}`,
1544
- height: ge,
1517
+ viewBox: `0 0 ${re} ${z}`,
1518
+ height: z,
1545
1519
  onKeyDown: $,
1546
1520
  onFocus: (e) => {
1547
1521
  if (e.currentTarget.matches(":focus-visible")) {
1548
1522
  let e = I?.timestamp ?? B;
1549
- de(e), Q({
1523
+ le(e), Q({
1550
1524
  signature: F,
1551
1525
  timestamp: e,
1552
1526
  source: "keyboard"
@@ -1554,86 +1528,86 @@ function Ie({ title: e, description: t, series: n, timestampUnit: r, formatTimes
1554
1528
  }
1555
1529
  },
1556
1530
  onPointerMove: (e) => {
1557
- e.pointerType === "mouse" && _e(e.clientX);
1531
+ e.pointerType === "mouse" && Z(e.clientX);
1558
1532
  },
1559
- onPointerDown: (e) => _e(e.clientX),
1533
+ onPointerDown: (e) => Z(e.clientX),
1560
1534
  onPointerLeave: (e) => {
1561
1535
  e.pointerType === "mouse" && I?.source === "pointer" && Q(void 0);
1562
1536
  },
1563
1537
  onBlur: () => Q(void 0),
1564
- ...x.props(d.svg, d.inspectable, Fe),
1538
+ ...b.props(l.svg, l.inspectable, Pe),
1565
1539
  children: [
1566
- J.map((e) => /* @__PURE__ */ E("g", { children: [/* @__PURE__ */ T("line", {
1567
- x1: Y,
1568
- x2: X,
1569
- y1: q(e),
1570
- y2: q(e),
1571
- ...x.props(d.grid)
1572
- }), /* @__PURE__ */ T("text", {
1573
- x: Y - 8,
1574
- y: q(e),
1540
+ q.map((e) => /* @__PURE__ */ D("g", { children: [/* @__PURE__ */ E("line", {
1541
+ x1: J,
1542
+ x2: Y,
1543
+ y1: K(e),
1544
+ y2: K(e),
1545
+ ...b.props(l.grid)
1546
+ }), /* @__PURE__ */ E("text", {
1547
+ x: J - 8,
1548
+ y: K(e),
1575
1549
  textAnchor: "end",
1576
1550
  dominantBaseline: "middle",
1577
- ...x.props(d.label),
1551
+ ...b.props(l.label),
1578
1552
  children: o(e)
1579
1553
  })] }, e)),
1580
- O.map((e) => /* @__PURE__ */ E("g", { children: [m === "area" && /* @__PURE__ */ T(ie, {
1554
+ j.map((e) => /* @__PURE__ */ D("g", { children: [m === "area" && /* @__PURE__ */ E(te, {
1581
1555
  data: [...e.points],
1582
1556
  defined: (e) => e.value !== null,
1583
- x: (e) => Z(e.timestamp),
1584
- y0: (e) => q(e.base),
1585
- y1: (e) => q((e.value ?? 0) + e.base),
1586
- yScale: q,
1587
- fill: p[e.tone],
1588
- fillOpacity: h ? .65 : .15
1589
- }), /* @__PURE__ */ T(Te, {
1557
+ x: (e) => X(e.timestamp),
1558
+ y0: (e) => K(e.base),
1559
+ y1: (e) => K((e.value ?? 0) + e.base),
1560
+ yScale: K,
1561
+ fill: d[e.tone],
1562
+ fillOpacity: v ? .65 : .15
1563
+ }), /* @__PURE__ */ E(we, {
1590
1564
  series: e,
1591
- x: Z,
1592
- y: q,
1565
+ x: X,
1566
+ y: K,
1593
1567
  inspectedTimestamp: I?.timestamp
1594
1568
  })] }, e.id)),
1595
- s.map((e) => /* @__PURE__ */ E("g", { children: [e.kind === "time" ? /* @__PURE__ */ T("line", {
1596
- x1: Z(e.timestamp),
1597
- x2: Z(e.timestamp),
1569
+ s.map((e) => /* @__PURE__ */ D("g", { children: [e.kind === "time" ? /* @__PURE__ */ E("line", {
1570
+ x1: X(e.timestamp),
1571
+ x2: X(e.timestamp),
1598
1572
  y1: 12,
1599
- y2: z,
1573
+ y2: R,
1600
1574
  className: "xhq4mlf x1ntoi03 x13efnbd"
1601
- }) : /* @__PURE__ */ T("circle", {
1602
- cx: Z(e.timestamp),
1603
- cy: q(e.value + (O.find((t) => t.id === e.seriesId)?.points.find((t) => t.timestamp === e.timestamp)?.base ?? 0)),
1575
+ }) : /* @__PURE__ */ E("circle", {
1576
+ cx: X(e.timestamp),
1577
+ cy: K(e.value + (j.find((t) => t.id === e.seriesId)?.points.find((t) => t.timestamp === e.timestamp)?.base ?? 0)),
1604
1578
  r: 4,
1605
- fill: v.surface,
1606
- ...x.props(d.selected)
1607
- }), /* @__PURE__ */ T("title", { children: e.kind === "point" ? `${e.label}: ${a(e.value)}` : e.label })] }, e.id)),
1608
- I !== void 0 && /* @__PURE__ */ T("line", {
1609
- x1: Z(I.timestamp),
1610
- x2: Z(I.timestamp),
1579
+ fill: g.surface,
1580
+ ...b.props(l.selected)
1581
+ }), /* @__PURE__ */ E("title", { children: e.kind === "point" ? `${e.label}: ${a(e.value)}` : e.label })] }, e.id)),
1582
+ I !== void 0 && /* @__PURE__ */ E("line", {
1583
+ x1: X(I.timestamp),
1584
+ x2: X(I.timestamp),
1611
1585
  y1: 12,
1612
- y2: z,
1586
+ y2: R,
1613
1587
  className: "xhq4mlf x1ntoi03 x13efnbd"
1614
1588
  }),
1615
- P !== void 0 && /* @__PURE__ */ T(oe, {
1616
- x: Z(P.timestamp),
1589
+ ue !== void 0 && /* @__PURE__ */ E(ne, {
1590
+ x: X(ue.timestamp),
1617
1591
  top: 12,
1618
- bottom: z,
1619
- width: Math.min(16, (X - Y) / 2)
1592
+ bottom: R,
1593
+ width: Math.min(16, (Y - J) / 2)
1620
1594
  })
1621
1595
  ]
1622
- }), re && /* @__PURE__ */ E("div", {
1596
+ }), O && /* @__PURE__ */ D("div", {
1623
1597
  "aria-hidden": !0,
1624
- ...x.props(Oe.timeAxis, Oe.timeAxisInset(Y, Math.max(0, j - X))),
1625
- children: [/* @__PURE__ */ T("span", {
1598
+ ...b.props(De.timeAxis, De.timeAxisInset(J, Math.max(0, re - Y))),
1599
+ children: [/* @__PURE__ */ E("span", {
1626
1600
  className: "x1cqoux5 xeuugli xj0a0fe",
1627
1601
  children: i(B)
1628
- }), V !== B && /* @__PURE__ */ T("span", {
1602
+ }), V !== B && /* @__PURE__ */ E("span", {
1629
1603
  className: "x1cqoux5 xeuugli xj0a0fe xp4054r",
1630
1604
  children: i(V)
1631
1605
  })]
1632
1606
  })]
1633
1607
  }),
1634
- s.length > 0 && /* @__PURE__ */ T("ul", {
1608
+ s.length > 0 && /* @__PURE__ */ E("ul", {
1635
1609
  className: "x78zum5 x1a02dak x1n8ia3y x1ghz6dp x1717udv xe8uvvx xy8obcc x153jb6y xj0a0fe",
1636
- children: s.map((e) => /* @__PURE__ */ E("li", { children: [
1610
+ children: s.map((e) => /* @__PURE__ */ D("li", { children: [
1637
1611
  i(e.timestamp),
1638
1612
  " · ",
1639
1613
  e.label,
@@ -1641,8 +1615,8 @@ function Ie({ title: e, description: t, series: n, timestampUnit: r, formatTimes
1641
1615
  ] }, e.id))
1642
1616
  })
1643
1617
  ]
1644
- })
1618
+ })]
1645
1619
  })
1646
1620
  });
1647
1621
  }
1648
- export { Ae as AreaChart, R as BarChart, I as BarChartPlaceholder, V as BreakdownBar, ke as LineChart, K as MAX_SCATTER_POINTS, Y as ScatterPlot, Ne as SmallMultiples, Pe as SmallMultiplesPlaceholder, Ee as Sparkline, je as TimeSeriesChartPlaceholder, $ as timeSeriesLimits };
1622
+ export { ke as AreaChart, he as BarChart, I as BarChartPlaceholder, V as BreakdownBar, Oe as LineChart, ge as MAX_SCATTER_POINTS, J as ScatterPlot, Me as SmallMultiples, Ne as SmallMultiplesPlaceholder, Te as Sparkline, Ae as TimeSeriesChartPlaceholder, $ as timeSeriesLimits };