@lilt-ui/charts 0.8.0 → 0.8.1

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.
@@ -1846,7 +1846,7 @@ function $t(e, t, n, r, i, a, o, s, c, l = t, u = Bt, d, f = {}, p = 0, m = !0)
1846
1846
  columnWidth: ee,
1847
1847
  columns: E,
1848
1848
  geometry: he,
1849
- drawGeometry: he && me && m && !S?.signed ? q(e, he, me, {
1849
+ drawGeometry: he && me && m && !S?.signed ? en(e, he, me, {
1850
1850
  lines: l.filter((e) => !y?.includes(e.id) && !E.includes(e.id) && !C(e.id)),
1851
1851
  stack: S && !y ? l.filter((e) => C(e.id)) : [],
1852
1852
  xDomain: g,
@@ -1859,7 +1859,7 @@ function $t(e, t, n, r, i, a, o, s, c, l = t, u = Bt, d, f = {}, p = 0, m = !0)
1859
1859
  secondary: z
1860
1860
  };
1861
1861
  }
1862
- function q(e, t, n, { lines: r, stack: i, xDomain: a, xToPixel: o }) {
1862
+ function en(e, t, n, { lines: r, stack: i, xDomain: a, xToPixel: o }) {
1863
1863
  let s = { ...t.series }, c = !1;
1864
1864
  for (let t of r) {
1865
1865
  let r = ut(e, {
@@ -1902,13 +1902,13 @@ function q(e, t, n, { lines: r, stack: i, xDomain: a, xToPixel: o }) {
1902
1902
  series: s
1903
1903
  } : null;
1904
1904
  }
1905
- function en(e, t = 0, n = 720) {
1905
+ function tn(e, t = 0, n = 720) {
1906
1906
  return 1 - (1 - Math.max(0, Math.min(1, (e - t) / Math.max(1, n)))) ** 3;
1907
1907
  }
1908
- function tn(e, t, n = 100) {
1908
+ function nn(e, t, n = 100) {
1909
1909
  return t <= 1 ? 0 : Math.max(0, Math.min(t - 1, e)) / (t - 1) * n;
1910
1910
  }
1911
- function nn(e, t, n) {
1911
+ function rn(e, t, n) {
1912
1912
  let r = Math.max(20, Math.min(80, t * .12)), i = e + (Math.max(0, t) + r) * n;
1913
1913
  return {
1914
1914
  start: i - r,
@@ -1917,7 +1917,7 @@ function nn(e, t, n) {
1917
1917
  }
1918
1918
  //#endregion
1919
1919
  //#region src/engine/lifecycle.ts
1920
- function rn() {
1920
+ function an() {
1921
1921
  let e = 0;
1922
1922
  return {
1923
1923
  next: () => (e += 1, e),
@@ -1925,25 +1925,25 @@ function rn() {
1925
1925
  isCurrent: (t) => t === e
1926
1926
  };
1927
1927
  }
1928
- function an(e, t, n = !0) {
1929
- return t || !n && (e === "initial" || e === "handoff") ? 0 : e === "handoff" ? 600 : e === "matched-update" ? 420 : e === "topology-update" ? 240 : 720;
1928
+ function on(e, t, n = !0) {
1929
+ return t || !n && e === "initial" ? 0 : e === "matched-update" ? 420 : e === "topology-update" ? 240 : 720;
1930
1930
  }
1931
- function on(e, t) {
1931
+ function sn(e, t) {
1932
1932
  return e > 6e3 || t < 240;
1933
1933
  }
1934
- var sn = 8 / 14;
1935
- 14 * sn;
1934
+ var q = 8 / 14;
1935
+ 14 * q;
1936
1936
  function cn(e) {
1937
1937
  return {
1938
1938
  dx: e,
1939
- dy: -e * sn
1939
+ dy: -e * q
1940
1940
  };
1941
1941
  }
1942
1942
  function ln(e, t) {
1943
1943
  return !(e > 0) || !(t > 0) ? 0 : Math.min(14, e * .24) * Math.min(1, t / 8);
1944
1944
  }
1945
1945
  function un(e, t, n, r, i = ln(n, r), a = !0) {
1946
- let o = i * sn, s = n - i, c = e + s, l = t + r, u = Math.min(1, r / 2), d = `L${c + i},${l - o}L${c},${l}H${e}Z`;
1946
+ let o = i * q, s = n - i, c = e + s, l = t + r, u = Math.min(1, r / 2), d = `L${c + i},${l - o}L${c},${l}H${e}Z`;
1947
1947
  return {
1948
1948
  front: `M${e},${t}H${c}V${l}H${e}Z`,
1949
1949
  side: a ? `M${e},${t}L${e + i},${t - o}H${c + i}${d}` : `M${e},${t}H${c}L${c + i},${t - o}${d}`,
@@ -2060,7 +2060,7 @@ function bn(e, t = "tube", n = [.6, .8]) {
2060
2060
  };
2061
2061
  });
2062
2062
  }
2063
- function J({ id: e, size: t, region: n }) {
2063
+ function xn({ id: e, size: t, region: n }) {
2064
2064
  return /* @__PURE__ */ j("filter", {
2065
2065
  id: e,
2066
2066
  ...n ? {
@@ -2081,7 +2081,7 @@ function J({ id: e, size: t, region: n }) {
2081
2081
  })
2082
2082
  });
2083
2083
  }
2084
- function xn({ d: e, color: t, width: n, dasharray: r, opacity: i, pathLength: a, className: o }) {
2084
+ function Sn({ d: e, color: t, width: n, dasharray: r, opacity: i, pathLength: a, className: o }) {
2085
2085
  return /* @__PURE__ */ j("g", {
2086
2086
  "data-lilt-tube": "",
2087
2087
  opacity: i,
@@ -2103,7 +2103,7 @@ function xn({ d: e, color: t, width: n, dasharray: r, opacity: i, pathLength: a,
2103
2103
  }, i))
2104
2104
  });
2105
2105
  }
2106
- var Sn = (e = 2) => Math.max(5, e * 2.4);
2106
+ var J = (e = 2) => Math.max(5, e * 2.4);
2107
2107
  function Cn({ id: e, color: t }) {
2108
2108
  return /* @__PURE__ */ j("radialGradient", {
2109
2109
  id: e,
@@ -2232,18 +2232,18 @@ function En({ bar: e, mark: t, id: n, color: r, fill: i, fillOpacity: a, stroke:
2232
2232
  //#endregion
2233
2233
  //#region src/lifecycle/use-skeleton-clock.ts
2234
2234
  var Dn = 2800;
2235
- function Y(e) {
2235
+ function On(e) {
2236
2236
  return `${-(e % Dn)}ms`;
2237
2237
  }
2238
- function On(e, t) {
2238
+ function kn(e, t) {
2239
2239
  let n = O(null);
2240
2240
  return E(() => {
2241
- n.current?.style.setProperty("--lilt-skeleton-clock", Y(Date.now()));
2241
+ n.current?.style.setProperty("--lilt-skeleton-clock", On(Date.now()));
2242
2242
  }, [e, t]), n;
2243
2243
  }
2244
2244
  //#endregion
2245
2245
  //#region src/lifecycle/loading-layer.tsx
2246
- var kn = "1.2 1.4", An = [
2246
+ var Y = "1.2 1.4", An = [
2247
2247
  .38,
2248
2248
  .45,
2249
2249
  .42,
@@ -2302,7 +2302,7 @@ function Mn({ width: e, height: t, left: n, right: r, top: i, bottom: a, axis: o
2302
2302
  function Nn({ width: e, height: t, left: n, right: r, top: i, bottom: a, visible: o, opacity: s, reducedMotion: c, id: l, marks: u = "line", mark: d, compact: f = !1, barCount: p = 12, seriesCount: m = 1, barAppearances: h = [], barWidth: g, showLine: _ = !1, lineDepth: v = !1, axis: y = "classic", inset: b = 0, edge: x = 8, loadingStyle: S = "shimmer" }) {
2303
2303
  let C = O(null);
2304
2304
  if (E(() => {
2305
- C.current?.style.setProperty("--lilt-skeleton-clock", Y(Date.now()));
2305
+ C.current?.style.setProperty("--lilt-skeleton-clock", On(Date.now()));
2306
2306
  }, [o, S]), !o || e <= 0 || t <= 0) return null;
2307
2307
  let { plotWidth: w, plotBottom: T, contour: D, areaPath: k, gridRows: A, yBars: te, xBars: N } = Mn({
2308
2308
  width: e,
@@ -2366,24 +2366,24 @@ function Nn({ width: e, height: t, left: n, right: r, top: i, bottom: a, visible
2366
2366
  if (t === 0) return D;
2367
2367
  let r = Math.max(0, T - i), a = Math.max(0, r - Math.min(18, r * .15)) * (1 - .22 * t);
2368
2368
  return jn(n + x, we + r * .17 * t, Math.max(0, w - x * 2), a);
2369
- }) : [D], Ee = u === "bars" || u === "bar-stack" ? pe : u === "area-stack" ? `${Ce.at(-1)} L${n + w - x},${t - a} L${n + x},${t - a} Z` : k, De = u === "area-stack" ? Ce.length : Te.length, Oe = (e) => e * Math.min(2, 4 / Math.max(1, De - 1)), ke = Oe(De - 1), B = v ? Sn() : 2.5, Ae = Math.min(.2, 72 / Math.max(1, w)), je = S === "draw" && !c, Me = (e, t = 0) => /* @__PURE__ */ M("g", {
2369
+ }) : [D], Ee = u === "bars" || u === "bar-stack" ? pe : u === "area-stack" ? `${Ce.at(-1)} L${n + w - x},${t - a} L${n + x},${t - a} Z` : k, De = u === "area-stack" ? Ce.length : Te.length, Oe = (e) => e * Math.min(2, 4 / Math.max(1, De - 1)), ke = Oe(De - 1), B = v ? J() : 2.5, Ae = Math.min(.2, 72 / Math.max(1, w)), je = S === "draw" && !c, Me = (e, t = 0) => /* @__PURE__ */ M("g", {
2370
2370
  style: { "--lilt-skeleton-step": Oe(t) },
2371
2371
  children: [v ? /* @__PURE__ */ j("g", {
2372
2372
  opacity: .7,
2373
2373
  filter: `url(#${ne})`,
2374
- children: /* @__PURE__ */ j(xn, {
2374
+ children: /* @__PURE__ */ j(Sn, {
2375
2375
  d: e,
2376
2376
  color: "var(--lilt-skeleton)",
2377
2377
  width: B,
2378
2378
  pathLength: 1,
2379
- dasharray: kn,
2379
+ dasharray: Y,
2380
2380
  className: "lilt-chart__skeleton-pen"
2381
2381
  })
2382
2382
  }) : /* @__PURE__ */ j("path", {
2383
2383
  className: "lilt-chart__skeleton-contour lilt-chart__skeleton-pen",
2384
2384
  d: e,
2385
2385
  pathLength: 1,
2386
- strokeDasharray: kn
2386
+ strokeDasharray: Y
2387
2387
  }), je ? /* @__PURE__ */ M("g", {
2388
2388
  mask: `url(#${L})`,
2389
2389
  children: [/* @__PURE__ */ j("path", {
@@ -2480,7 +2480,7 @@ function Nn({ width: e, height: t, left: n, right: r, top: i, bottom: a, visible
2480
2480
  fill: `url(#${L}-ramp)`
2481
2481
  })
2482
2482
  })] }) : null,
2483
- v ? /* @__PURE__ */ j(J, {
2483
+ v ? /* @__PURE__ */ j(xn, {
2484
2484
  id: ne,
2485
2485
  size: 3.5,
2486
2486
  region: {
@@ -2544,13 +2544,13 @@ function Nn({ width: e, height: t, left: n, right: r, top: i, bottom: a, visible
2544
2544
  d: e,
2545
2545
  fill: "none",
2546
2546
  stroke: "white",
2547
- strokeWidth: v ? Sn() : 3,
2547
+ strokeWidth: v ? J() : 3,
2548
2548
  opacity: "0.8"
2549
2549
  }, t)) : !me && !he || _ ? (me ? [D] : Te).map((e, t) => /* @__PURE__ */ j("path", {
2550
2550
  d: e,
2551
2551
  fill: "none",
2552
2552
  stroke: "white",
2553
- strokeWidth: v ? Sn() : 3,
2553
+ strokeWidth: v ? J() : 3,
2554
2554
  opacity: "0.8"
2555
2555
  }, t)) : null,
2556
2556
  /* @__PURE__ */ j("g", {
@@ -2899,15 +2899,15 @@ function Jn({ bar: e, appearance: t = "solid", mark: n, fill: r, color: i, basel
2899
2899
  }
2900
2900
  //#endregion
2901
2901
  //#region src/interaction/inspection-layer.tsx
2902
- var X = {
2902
+ var Yn = {
2903
2903
  stiffness: 360,
2904
2904
  damping: 38,
2905
2905
  mass: 1
2906
- }, Yn = {
2906
+ }, Xn = {
2907
2907
  stiffness: 220,
2908
2908
  damping: 30,
2909
2909
  mass: 1
2910
- }, Xn = {
2910
+ }, X = {
2911
2911
  stiffness: 120,
2912
2912
  damping: 22,
2913
2913
  mass: 1
@@ -2985,7 +2985,7 @@ function tr({ snapshot: e, selection: t, series: n, seriesColors: r = {}, paintI
2985
2985
  color: o
2986
2986
  });
2987
2987
  return s ? [/* @__PURE__ */ j("g", { children: s }, `${t.series}-${i}`)] : [];
2988
- }) : [], me = t ? e.xToPixel(t.x) : e.plot.left, [he, ge] = Vn(me, X), [_e, ve] = Vn(me, Yn), [ye, be] = Vn(me, Xn), [xe, Se] = Vn(16, Zn), Ce = O(16), we = O(!1), Te = O(null), [Ee, De] = k(a ? 236 : 188);
2988
+ }) : [], me = t ? e.xToPixel(t.x) : e.plot.left, [he, ge] = Vn(me, Yn), [_e, ve] = Vn(me, Xn), [ye, be] = Vn(me, X), [xe, Se] = Vn(16, Zn), Ce = O(16), we = O(!1), Te = O(null), [Ee, De] = k(a ? 236 : 188);
2989
2989
  E(() => {
2990
2990
  let e = Te.current;
2991
2991
  if (!e) return;
@@ -3020,7 +3020,7 @@ function tr({ snapshot: e, selection: t, series: n, seriesColors: r = {}, paintI
3020
3020
  if (n) return n.negative ? n.y + n.height : n.y;
3021
3021
  }
3022
3022
  return (ee ? Et(ee, n) : null)?.y ?? e.plot.bottom;
3023
- }), ke = I(he, (e) => ee && Et(ee, e) ? 1 : 0), B = it(), Ae = !st(B.axis.y), je = O(null), Me = O(null), Ne = ne(48), V = I([he, Ne], ([t, n]) => $n(Number(t) - Number(n) / 2, e.plot.left + (B.inset > 0 ? 4 : -B.overhang), e.plot.right - (B.inset > 0 ? 4 : -B.overhang) - Number(n))), Pe = I([V, Ne], ([e, t]) => Number(e) + Number(t) / 2), Ie = I(Oe, (t) => $n(t, e.plot.top, e.plot.bottom)), Re = I(Ie, (t) => Ae ? t - Qn - 3 : $n(t, e.plot.top + Qn / 2, e.plot.bottom) - Qn / 2), ze = B.pillPosition === "mark", Be = F && t && A ? e.geometry?.bars[A.id]?.find((e) => e.valueX === t.x) : void 0, [Ve, H] = Vn(0, X), Ue = Be && t ? Be.x + Be.width / 2 - e.xToPixel(t.x) : 0;
3023
+ }), ke = I(he, (e) => ee && Et(ee, e) ? 1 : 0), B = it(), Ae = !st(B.axis.y), je = O(null), Me = O(null), Ne = ne(48), V = I([he, Ne], ([t, n]) => $n(Number(t) - Number(n) / 2, e.plot.left + (B.inset > 0 ? 4 : -B.overhang), e.plot.right - (B.inset > 0 ? 4 : -B.overhang) - Number(n))), Pe = I([V, Ne], ([e, t]) => Number(e) + Number(t) / 2), Ie = I(Oe, (t) => $n(t, e.plot.top, e.plot.bottom)), Re = I(Ie, (t) => Ae ? t - Qn - 3 : $n(t, e.plot.top + Qn / 2, e.plot.bottom) - Qn / 2), ze = B.pillPosition === "mark", Be = F && t && A ? e.geometry?.bars[A.id]?.find((e) => e.valueX === t.x) : void 0, [Ve, H] = Vn(0, Yn), Ue = Be && t ? Be.x + Be.width / 2 - e.xToPixel(t.x) : 0;
3024
3024
  E(() => {
3025
3025
  H(Ue, !we.current || p);
3026
3026
  }, [
@@ -3216,10 +3216,10 @@ function tr({ snapshot: e, selection: t, series: n, seriesColors: r = {}, paintI
3216
3216
  e.drawGeometry ?? e.geometry ? z.flatMap((t) => (e.drawGeometry ?? e.geometry).series[t.id]?.segments.map((e, i) => t.line?.depth && !t.line.dasharray ? /* @__PURE__ */ j("g", {
3217
3217
  className: "lilt-chart__highlight",
3218
3218
  mask: `url(#${m})`,
3219
- children: /* @__PURE__ */ j(xn, {
3219
+ children: /* @__PURE__ */ j(Sn, {
3220
3220
  d: e.path,
3221
3221
  color: r[t.id] ?? Fe(t, n.indexOf(t)),
3222
- width: Sn(t.line.width)
3222
+ width: J(t.line.width)
3223
3223
  })
3224
3224
  }, `highlight-${t.id}-${i}`) : /* @__PURE__ */ j(P.path, {
3225
3225
  className: "lilt-chart__highlight",
@@ -3489,7 +3489,7 @@ function tr({ snapshot: e, selection: t, series: n, seriesColors: r = {}, paintI
3489
3489
  }
3490
3490
  //#endregion
3491
3491
  //#region src/interaction/comparison-layer.tsx
3492
- function Z(e, t, n, r) {
3492
+ function nr(e, t, n, r) {
3493
3493
  if (r === null) return null;
3494
3494
  let i = e.geometry, a = e.xToPixel(n), o = i?.series[t];
3495
3495
  for (let e of o?.isolated ?? []) if (Math.abs(e.x - a) < .5) return e.y;
@@ -3501,7 +3501,7 @@ function Z(e, t, n, r) {
3501
3501
  let s = i?.bars[t]?.find((e) => e.valueX === n);
3502
3502
  return s ? s.negative ? s.y + s.height : s.y : e.stack?.series.includes(t) ? null : e.yToPixel(r);
3503
3503
  }
3504
- function nr({ snapshot: e, comparison: t, rows: n, reducedMotion: r, onEndpointPointerDown: i, onEndpointPointerMove: a, onEndpointPointerUp: o, onEndpointCancel: s, onEndpointCommit: c, onEndpointKeyDown: l, preview: u = !1 }) {
3504
+ function rr({ snapshot: e, comparison: t, rows: n, reducedMotion: r, onEndpointPointerDown: i, onEndpointPointerMove: a, onEndpointPointerUp: o, onEndpointCancel: s, onEndpointCommit: c, onEndpointKeyDown: l, preview: u = !1 }) {
3505
3505
  let d = e.xToPixel(t.startX), f = e.xToPixel(t.endX), p = Math.min(d, f), m = Math.max(d, f), h = e.formatX(t.startX), g = e.formatX(t.endX), _ = r ? 0 : .14, v = T();
3506
3506
  return /* @__PURE__ */ M("div", {
3507
3507
  "aria-label": "Comparison endpoints",
@@ -3546,7 +3546,7 @@ function nr({ snapshot: e, comparison: t, rows: n, reducedMotion: r, onEndpointP
3546
3546
  y1: e.plot.top,
3547
3547
  y2: e.plot.bottom
3548
3548
  }), n.map((t) => {
3549
- let n = i === 0 ? t.startValue : t.endValue, o = Z(e, t.id, a, n);
3549
+ let n = i === 0 ? t.startValue : t.endValue, o = nr(e, t.id, a, n);
3550
3550
  return o === null ? null : /* @__PURE__ */ j("circle", {
3551
3551
  "data-comparison-series": t.id,
3552
3552
  className: "lilt-chart__comparison-dot",
@@ -3597,15 +3597,15 @@ function nr({ snapshot: e, comparison: t, rows: n, reducedMotion: r, onEndpointP
3597
3597
  }
3598
3598
  //#endregion
3599
3599
  //#region src/interaction/tooltip-view.tsx
3600
- var rr = b(null);
3601
- function ir({ value: e, children: t }) {
3602
- return /* @__PURE__ */ j(rr.Provider, {
3600
+ var ir = b(null);
3601
+ function ar({ value: e, children: t }) {
3602
+ return /* @__PURE__ */ j(ir.Provider, {
3603
3603
  value: e,
3604
3604
  children: t
3605
3605
  });
3606
3606
  }
3607
- function ar() {
3608
- let e = C(rr);
3607
+ function Z() {
3608
+ let e = C(ir);
3609
3609
  if (!e) throw Error("Lilt Tooltip must be supplied through ChartPlot.tooltip.");
3610
3610
  return e;
3611
3611
  }
@@ -3617,7 +3617,7 @@ function or({ left: e, top: t, reducedMotion: n, ghost: r = !1, from: i, local:
3617
3617
  scale: .6,
3618
3618
  y: 4,
3619
3619
  filter: "blur(6px)"
3620
- }, [c, l] = Vn(e, X);
3620
+ }, [c, l] = Vn(e, Yn);
3621
3621
  E(() => l(e, n), [
3622
3622
  l,
3623
3623
  e,
@@ -3713,9 +3713,9 @@ function dr(e) {
3713
3713
  }
3714
3714
  }, ur.set(e, t), t;
3715
3715
  }
3716
- var fr = "sync", Q = () => () => void 0, pr = () => null;
3717
- function mr(e) {
3718
- let t = e ? dr(e) : null, n = A(t?.subscribe ?? Q, t?.get ?? pr, t?.get ?? pr);
3716
+ var fr = "sync", pr = () => () => void 0, mr = () => null;
3717
+ function Q(e) {
3718
+ let t = e ? dr(e) : null, n = A(t?.subscribe ?? pr, t?.get ?? mr, t?.get ?? mr);
3719
3719
  return n ? {
3720
3720
  value: n.kind === "time" ? new Date(n.key) : n.key,
3721
3721
  kind: n.kind,
@@ -3820,29 +3820,29 @@ function vr() {
3820
3820
  }
3821
3821
  //#endregion
3822
3822
  //#region src/chart.tsx
3823
- var yr = 14, br = {}, xr = [], Sr = {
3823
+ var yr = 14, br = 280, xr = {}, Sr = [], Cr = {
3824
3824
  inspection: null,
3825
3825
  comparison: null,
3826
3826
  focus: null
3827
- }, Cr = () => () => void 0, wr = () => Sr;
3828
- function Tr(e) {
3827
+ }, wr = () => () => void 0, Tr = () => Cr;
3828
+ function Er(e) {
3829
3829
  return {
3830
3830
  ...zt,
3831
3831
  ...e
3832
3832
  };
3833
3833
  }
3834
- function Er(e, t) {
3834
+ function Dr(e, t) {
3835
3835
  let n = /* @__PURE__ */ new Set([...Object.keys(e ?? {}), ...Object.keys(t ?? {})]);
3836
3836
  for (let r of n) if ((e?.[r] ?? null) !== (t?.[r] ?? null)) return !1;
3837
3837
  return !0;
3838
3838
  }
3839
- function Dr(e, t) {
3839
+ function Or(e, t) {
3840
3840
  return !e || !t || e.rows.length !== t.rows.length || e.series.length !== t.series.length || e.series.some((e, n) => e.id !== t.series[n]?.id) ? !1 : e.rows.every((n, r) => {
3841
3841
  let i = t.rows[r];
3842
- return !!(i && n.x === i.x && n.categoryId === i.categoryId && e.series.every((e) => n.values[e.id] === i.values[e.id] && n.statuses[e.id] === i.statuses[e.id] && Er(n.fields[e.id], i.fields[e.id])));
3842
+ return !!(i && n.x === i.x && n.categoryId === i.categoryId && e.series.every((e) => n.values[e.id] === i.values[e.id] && n.statuses[e.id] === i.statuses[e.id] && Dr(n.fields[e.id], i.fields[e.id])));
3843
3843
  });
3844
3844
  }
3845
- function Or(e, t, n) {
3845
+ function kr(e, t, n) {
3846
3846
  return n >= 1 ? t : {
3847
3847
  ...t,
3848
3848
  rows: t.rows.map((r, i) => {
@@ -3857,10 +3857,10 @@ function Or(e, t, n) {
3857
3857
  })
3858
3858
  };
3859
3859
  }
3860
- function kr(e) {
3860
+ function Ar(e) {
3861
3861
  return 1 - (1 - e) ** 4;
3862
3862
  }
3863
- function Ar(e, t, n = !1) {
3863
+ function jr(e, t, n = !1) {
3864
3864
  let [r, i] = k({
3865
3865
  width: 0,
3866
3866
  height: t
@@ -3887,7 +3887,7 @@ function Ar(e, t, n = !1) {
3887
3887
  e
3888
3888
  ]), r;
3889
3889
  }
3890
- function jr(e, t, n, r) {
3890
+ function Mr(e, t, n, r) {
3891
3891
  return D(() => {
3892
3892
  try {
3893
3893
  let i = je(e, t, n);
@@ -3908,7 +3908,7 @@ function jr(e, t, n, r) {
3908
3908
  r
3909
3909
  ]);
3910
3910
  }
3911
- function Mr(e, t, n, r, i, a, o, s, c, l = Bt, u, d = {}, f = 0, p = !0) {
3911
+ function Nr(e, t, n, r, i, a, o, s, c, l = Bt, u, d = {}, f = 0, p = !0) {
3912
3912
  if (!e || e.rows.length === 0 || !Me(e)) return null;
3913
3913
  try {
3914
3914
  return $t(e, t, n, r, i, a.width, a.height, o, s, c, l, u, d, f, p);
@@ -3916,7 +3916,7 @@ function Mr(e, t, n, r, i, a, o, s, c, l = Bt, u, d = {}, f = 0, p = !0) {
3916
3916
  return null;
3917
3917
  }
3918
3918
  }
3919
- function Nr(e, t, n) {
3919
+ function Pr(e, t, n) {
3920
3920
  return {
3921
3921
  snapshot: e,
3922
3922
  previousSnapshot: t,
@@ -3940,17 +3940,17 @@ function Nr(e, t, n) {
3940
3940
  visibleSeries: n.visibleSeries
3941
3941
  };
3942
3942
  }
3943
- function Pr(e) {
3943
+ function Fr(e) {
3944
3944
  return e.replace(/[^a-zA-Z0-9_-]/g, "-");
3945
3945
  }
3946
- function Fr(e, t, n) {
3946
+ function Ir(e, t, n) {
3947
3947
  let r = e.accessor(t);
3948
3948
  return r === null ? "No data" : e.formatValue?.(r) ?? n(r);
3949
3949
  }
3950
- function Ir(e, t) {
3950
+ function Lr(e, t) {
3951
3951
  return e.data.rows.findIndex((e) => e.sourceIndex === t);
3952
3952
  }
3953
- function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeight: o, margins: s, arrangement: c = Bt, marks: l = xr, barLayout: u, compact: d = !1, tooltipNode: f, inspectionSeries: p, className: m, style: h, "aria-label": g, children: _, status: v = "ready", loadingStyle: y, interactive: b = !0, error: x, renderRetry: C, motion: N = "auto", animateIn: F = !0, resetKey: re, onSelectionChange: I, controller: L, linkedSelection: ie = "exact", selectedCategoryId: ae, onSelectedCategoryIdChange: oe, compare: se = !1, focus: ce = !1, live: R = !1, brush: le = !1, visibleSeries: ue, onVisibleSeriesChange: de, toolkit: fe, model: z, controllerLinked: pe = !1, axis: me = "minimal", pill: he = "soft", pillSeries: ge = "nearest", pillValue: _e = "series", pillPosition: ve = "auto", axisInset: ye = 0, decimate: be = !0, runoff: xe = !1, labelOverhang: Se = 0 }) {
3953
+ function Rr({ data: e, x: n, y: r = xr, series: i, height: a = 340, compactHeight: o, margins: s, arrangement: c = Bt, marks: l = Sr, barLayout: u, compact: d = !1, tooltipNode: f, inspectionSeries: p, className: m, style: h, "aria-label": g, children: _, status: v = "ready", loadingStyle: y, interactive: b = !0, error: x, renderRetry: C, motion: N = "auto", animateIn: F = !0, resetKey: re, onSelectionChange: I, controller: L, linkedSelection: ie = "exact", selectedCategoryId: ae, onSelectedCategoryIdChange: oe, compare: se = !1, focus: ce = !1, live: R = !1, brush: le = !1, visibleSeries: ue, onVisibleSeriesChange: de, toolkit: fe, model: z, controllerLinked: pe = !1, axis: me = "minimal", pill: he = "soft", pillSeries: ge = "nearest", pillValue: _e = "series", pillPosition: ve = "auto", axisInset: ye = 0, decimate: be = !0, runoff: xe = !1, labelOverhang: Se = 0 }) {
3954
3954
  let Ce = he || "soft", we = JSON.stringify(me), Te = D(() => ot(me), [we]), Ee = ne(0), De = ne(0), Oe = ne(0), ke = ne(0), B = ne(0), Ae = ne(0), je = D(() => ({
3955
3955
  x: Ee,
3956
3956
  pointerX: De,
@@ -3977,7 +3977,7 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
3977
3977
  Ce,
3978
3978
  De,
3979
3979
  xe
3980
- ]), V = O(null), Le = O(null), Be = O(null), Ve = D(() => Tr(s), [
3980
+ ]), V = O(null), Le = O(null), Be = O(null), Ve = D(() => Er(s), [
3981
3981
  s?.top,
3982
3982
  s?.right,
3983
3983
  s?.bottom,
@@ -3990,7 +3990,7 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
3990
3990
  u?.width,
3991
3991
  u?.gap,
3992
3992
  u?.segmentGap
3993
- ]), He = a === "fill", Ue = a === "fill" ? 340 : a, We = Ar(V, Ue, He), Ge = We.width > 0 && We.width < 420, Ke = We.width > 0 && We.width < 240, U = D(() => ({
3993
+ ]), He = a === "fill", Ue = a === "fill" ? 340 : a, We = jr(V, Ue, He), Ge = We.width > 0 && We.width < 420, Ke = We.width > 0 && We.width < 240, U = D(() => ({
3994
3994
  width: We.width,
3995
3995
  height: He ? We.height : Ge && o ? o : Ue
3996
3996
  }), [
@@ -4014,55 +4014,55 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4014
4014
  ...Ve,
4015
4015
  left: Ge ? Math.min(65, Ve.left) : Ve.left,
4016
4016
  right: Ge ? Math.min(44, Ve.right) : Ve.right
4017
- }), [Ve, Ge]), W = t(N), Ye = jr(e, i, n, c.stack), G = Ye.value, Qe = G !== null && G.rows.length > 0 && Me(G), $e = Pr(T()), et = `${$e}-reveal`, tt = `${$e}-grid-fade`, nt = S((e, t) => {
4017
+ }), [Ve, Ge]), W = t(N), Ye = Mr(e, i, n, c.stack), G = Ye.value, Qe = G !== null && G.rows.length > 0 && Me(G), $e = Fr(T()), et = `${$e}-reveal`, tt = `${$e}-grid-fade`, nt = S((e, t) => {
4018
4018
  let n = i.findIndex((t) => t.id === e);
4019
4019
  return Ie($e, n, t);
4020
- }, [$e, i]), it = `${$e}-highlight-mask`, at = `${$e}-cross-fade`, st = O(rn()), lt = O(-Infinity), ut = v === "ready" && Qe, dt = O(void 0);
4020
+ }, [$e, i]), it = `${$e}-highlight-mask`, at = `${$e}-cross-fade`, st = O(an()), lt = O(-Infinity), ut = v === "ready" && Qe, dt = O(void 0);
4021
4021
  dt.current === void 0 && (dt.current = ut && G && F && !W ? {
4022
4022
  id: st.current.next(),
4023
4023
  kind: "initial",
4024
4024
  from: null,
4025
4025
  to: G,
4026
- duration: d ? 520 : an("initial", !1)
4026
+ duration: d ? 520 : on("initial", !1)
4027
4027
  } : null);
4028
- let ft = dt.current, [K, pt] = k(() => ut ? G : null), mt = O(K), [ht, gt] = k(ft), [_t, vt] = k(+!ft), yt = O(ht), [bt, xt] = k(ut ? ft ? "revealing" : "ready" : v === "loading" ? "pending" : "empty"), [St, Ct] = k(!1), wt = O(!1), Tt = O(re), Dt = O(K), Ot = O(I), kt = O(null), At = O(null), jt = O(null), Mt = O(null), Nt = O(!1), Pt = O(null), Ft = S(() => {
4029
- Nt.current = !0, Pt.current !== null && window.clearTimeout(Pt.current), Pt.current = window.setTimeout(() => {
4030
- Nt.current = !1, Pt.current = null;
4028
+ let ft = dt.current, [K, pt] = k(() => ut ? G : null), mt = O(K), [ht, gt] = k(ft), [_t, vt] = k(+!ft), yt = O(ht), [bt, xt] = k(ut ? ft ? "revealing" : "ready" : v === "loading" ? "pending" : "empty"), [St, Ct] = k(!1), wt = O(!1), [Tt, Dt] = k(!1), Ot = O(re), kt = O(K), At = O(I), jt = O(null), Mt = O(null), Nt = O(null), Pt = O(null), Ft = O(!1), It = O(null), Lt = S(() => {
4029
+ Ft.current = !0, It.current !== null && window.clearTimeout(It.current), It.current = window.setTimeout(() => {
4030
+ Ft.current = !1, It.current = null;
4031
4031
  }, 750);
4032
- }, []), It = O(null), Lt = O(null), Rt = `${$e}-owner`;
4033
- w(() => () => L?.releaseOwner(Rt), [Rt, L]);
4034
- let zt = A(L?.subscribe ?? Cr, L?.getSnapshot ?? wr, L?.getSnapshot ?? wr), Vt = D(() => se === !0 ? {} : se || {}, [se]), Ut = D(() => ce === !0 ? {} : ce || {}, [ce]), Wt = D(() => R === !0 ? {} : R || {}, [R]), Gt = !!se, Kt = !!(ce || le), qt = !!R, [Jt, Yt] = k(() => z?.getSnapshot().visibleSeries ?? i.map((e) => e.id)), Xt = O(i.map((e) => e.id));
4032
+ }, []), Rt = O(null), zt = O(null), Vt = `${$e}-owner`;
4033
+ w(() => () => L?.releaseOwner(Vt), [Vt, L]);
4034
+ let Ut = A(L?.subscribe ?? wr, L?.getSnapshot ?? Tr, L?.getSnapshot ?? Tr), Wt = D(() => se === !0 ? {} : se || {}, [se]), Gt = D(() => ce === !0 ? {} : ce || {}, [ce]), Kt = D(() => R === !0 ? {} : R || {}, [R]), qt = !!se, Jt = !!(ce || le), Yt = !!R, [Xt, Zt] = k(() => z?.getSnapshot().visibleSeries ?? i.map((e) => e.id)), Qt = O(i.map((e) => e.id));
4035
4035
  w(() => {
4036
4036
  if (ue) return;
4037
- let e = i.map((e) => e.id), t = Xt.current;
4038
- Xt.current = e, Yt((n) => {
4037
+ let e = i.map((e) => e.id), t = Qt.current;
4038
+ Qt.current = e, Zt((n) => {
4039
4039
  let r = n.filter((t) => e.includes(t)), i = e.filter((e) => !t.includes(e)), a = [...r, ...i];
4040
4040
  return a.length === n.length && a.every((e, t) => e === n[t]) ? n : a;
4041
4041
  });
4042
4042
  }, [i, ue]);
4043
- let Zt = ue ?? Jt, [Qt, $t] = k(null);
4043
+ let $t = ue ?? Xt, [en, nn] = k(null);
4044
4044
  w(() => {
4045
- $t((e) => {
4046
- let t = lr(e, Zt, i.map((e) => e.id));
4045
+ nn((e) => {
4046
+ let t = lr(e, $t, i.map((e) => e.id));
4047
4047
  return !e || !t ? t : cr(e.restore, t.restore) && cr(e.expected, t.expected) && cr(e.previous, t.previous) ? e : t;
4048
4048
  });
4049
- }, [i, Zt]);
4050
- let q = D(() => i.filter((e) => Zt.includes(e.id)), [i, Zt]), tn = Fn(i.map((e) => e.id), Zt, !!c.stack, W), sn = c.stack ? tn : void 0, [cn, ln] = k(null), un = O(null);
4051
- un.current = cn;
4052
- let [dn, fn] = k(null), pn = (e) => !!(e && q.some((t) => t.id === e)), mn = ge !== "nearest" && ge !== "total" ? ge : null, hn = pn(dn) ? dn : pn(mn) ? mn : ge === "nearest" && pn(cn) ? cn : p, [gn, _n] = k(null), [vn, yn] = k(null), bn = O(!1), [J, xn] = k(null), Sn = O(J);
4053
- Sn.current = J;
4054
- let [Cn, wn] = k(null), Tn = O(null), [En, Dn] = k(null), Y = L ? zt.comparison : En, [On, kn] = k(null), An = L ? zt.focus : On, [jn, Mn] = k(!0), [In, Rn] = k(null), [zn, Bn] = k(null), [Vn, Un] = k(!1), Wn = O(null), Gn = O(null), Kn = O(q.map((e) => e.id).join("|"));
4055
- mt.current = K, yt.current = ht, wt.current = St, Ot.current = I;
4056
- let qn = S((e, t, n) => {
4057
- let r = st.current.next(), i = d && t === "initial" && F && !W ? 520 : an(t, W, F), a = t === "matched-update" || t === "topology-update", o = performance.now(), s = a && on(e.rows.length * e.series.length, o - lt.current) ? 0 : i;
4049
+ }, [i, $t]);
4050
+ let q = D(() => i.filter((e) => $t.includes(e.id)), [i, $t]), cn = Fn(i.map((e) => e.id), $t, !!c.stack, W), ln = c.stack ? cn : void 0, [un, dn] = k(null), fn = O(null);
4051
+ fn.current = un;
4052
+ let [pn, mn] = k(null), hn = (e) => !!(e && q.some((t) => t.id === e)), gn = ge !== "nearest" && ge !== "total" ? ge : null, _n = hn(pn) ? pn : hn(gn) ? gn : ge === "nearest" && hn(un) ? un : p, [vn, yn] = k(null), [bn, xn] = k(null), Sn = O(!1), [J, Cn] = k(null), wn = O(J);
4053
+ wn.current = J;
4054
+ let [Tn, En] = k(null), Dn = O(null), [On, kn] = k(null), Y = L ? Ut.comparison : On, [An, jn] = k(null), Mn = L ? Ut.focus : An, [In, Rn] = k(!0), [zn, Bn] = k(null), [Vn, Un] = k(null), [Wn, Gn] = k(!1), Kn = O(null), qn = O(null), Jn = O(q.map((e) => e.id).join("|"));
4055
+ mt.current = K, yt.current = ht, wt.current = St, At.current = I;
4056
+ let Yn = S((e, t, n) => {
4057
+ let r = st.current.next(), i = d && t === "initial" && F && !W ? 520 : on(t, W, F), a = t === "matched-update" || t === "topology-update", o = performance.now(), s = a && sn(e.rows.length * e.series.length, o - lt.current) ? 0 : i;
4058
4058
  a && (lt.current = o), mt.current = e, pt(e), gt(s === 0 ? null : {
4059
4059
  id: r,
4060
4060
  kind: t,
4061
4061
  from: n,
4062
4062
  to: e,
4063
4063
  duration: s,
4064
- fromDomain: Gn.current?.yDomain
4065
- }), vt(+(s === 0)), xt(s === 0 ? "ready" : t === "matched-update" || t === "topology-update" ? "updating" : t === "handoff" || t === "initial" ? "revealing" : "ready");
4064
+ fromDomain: qn.current?.yDomain
4065
+ }), vt(+(s === 0)), xt(s === 0 ? "ready" : t === "matched-update" || t === "topology-update" ? "updating" : t === "initial" ? "revealing" : "ready");
4066
4066
  }, [
4067
4067
  F,
4068
4068
  d,
@@ -4070,7 +4070,7 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4070
4070
  ]);
4071
4071
  w(() => {
4072
4072
  if (v !== "loading" || mt.current) {
4073
- Ct(!1);
4073
+ (v !== "ready" || mt.current) && Ct(!1);
4074
4074
  return;
4075
4075
  }
4076
4076
  xt("pending"), Ct(!1);
@@ -4082,13 +4082,13 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4082
4082
  K,
4083
4083
  re,
4084
4084
  v
4085
- ]), w(() => {
4086
- if (Tt.current !== re && (Tt.current = re, lt.current = -Infinity, st.current.next(), mt.current = null, pt(null), gt(null), Ct(!1), Q.current = null, dr(null), L?.clearInspection(z ? void 0 : Rt), xt(v === "loading" ? "pending" : "revealing"), Ot.current?.(null)), Ye.error) {
4087
- mt.current || xt("error");
4085
+ ]), E(() => {
4086
+ if (Ot.current !== re && (Ot.current = re, lt.current = -Infinity, st.current.next(), mt.current = null, pt(null), gt(null), Ct(!1), Q.current = null, mr(null), L?.clearInspection(z ? void 0 : Vt), xt(v === "loading" ? "pending" : "revealing"), At.current?.(null)), Ye.error) {
4087
+ mt.current || xt("error"), Ct(!1);
4088
4088
  return;
4089
4089
  }
4090
4090
  if (v === "loading") {
4091
- mt.current && xt("updating");
4091
+ Dt(!1), mt.current && xt("updating");
4092
4092
  return;
4093
4093
  }
4094
4094
  if (v === "error") {
@@ -4096,34 +4096,46 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4096
4096
  return;
4097
4097
  }
4098
4098
  if (!G || !Qe) {
4099
- G && mt.current !== G && (mt.current = G, pt(G), gt(null), dr(null), Q.current = null, L?.clearInspection(z ? void 0 : Rt), Ot.current?.(null)), xt("empty");
4099
+ G && mt.current !== G && (mt.current = G, pt(G), gt(null), mr(null), Q.current = null, L?.clearInspection(z ? void 0 : Vt), At.current?.(null)), Ct(!1), xt("empty");
4100
4100
  return;
4101
4101
  }
4102
4102
  if (!mt.current) {
4103
- qn(G, wt.current ? "handoff" : "initial", null), Ct(!1);
4103
+ if (wt.current && !W) {
4104
+ Dt(!0);
4105
+ return;
4106
+ }
4107
+ Yn(G, "initial", null), Ct(!1);
4104
4108
  return;
4105
4109
  }
4106
- if (Dr(mt.current, G)) {
4110
+ if (Or(mt.current, G)) {
4107
4111
  mt.current !== G && (mt.current = G, pt(G));
4108
4112
  return;
4109
4113
  }
4110
- let e = Dt.current ?? mt.current, t = Ne(mt.current, G, q) ? "matched-update" : "topology-update";
4111
- qn(G, t, e);
4114
+ let e = kt.current ?? mt.current, t = Ne(mt.current, G, q) ? "matched-update" : "topology-update";
4115
+ Yn(G, t, e);
4112
4116
  }, [
4113
4117
  q,
4114
- Rt,
4118
+ Vt,
4115
4119
  L,
4116
4120
  Ye.error,
4121
+ W,
4117
4122
  re,
4118
- qn,
4123
+ Tt,
4124
+ Yn,
4119
4125
  v,
4120
4126
  G,
4121
4127
  Qe
4122
- ]);
4123
- let Jn = !F && (ht?.kind === "initial" || ht?.kind === "handoff");
4128
+ ]), w(() => {
4129
+ if (!Tt) return;
4130
+ let e = window.setTimeout(() => {
4131
+ Dt(!1), Ct(!1);
4132
+ }, br);
4133
+ return () => window.clearTimeout(e);
4134
+ }, [Tt]);
4135
+ let Xn = !F && ht?.kind === "initial";
4124
4136
  w(() => {
4125
4137
  if (!ht) return;
4126
- if (W || ht.duration === 0 || Jn || document.hidden) {
4138
+ if (W || ht.duration === 0 || Xn || document.hidden) {
4127
4139
  vt(1), gt(null), Ct(!1), xt("ready");
4128
4140
  return;
4129
4141
  }
@@ -4142,19 +4154,19 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4142
4154
  window.cancelAnimationFrame(t), document.removeEventListener("visibilitychange", r);
4143
4155
  };
4144
4156
  }, [
4145
- Jn,
4157
+ Xn,
4146
4158
  W,
4147
4159
  ht
4148
4160
  ]);
4149
- let X = K ?? (v === "ready" && Qe ? G : null), Yn = kr(_t), Xn = D(() => ht?.kind === "matched-update" && ht.from ? Or(ht.from, ht.to, Yn) : X, [
4161
+ let X = K ?? (v === "ready" && Qe && !St ? G : null), Zn = Ar(_t), Qn = D(() => ht?.kind === "matched-update" && ht.from ? kr(ht.from, ht.to, Zn) : X, [
4150
4162
  X,
4151
4163
  ht,
4152
- Yn
4153
- ]), Zn = D(() => An ? [Math.min(An.startX, An.endX), Math.max(An.startX, An.endX)] : qt ? In : null, [
4154
- An,
4155
- In,
4156
- qt
4157
- ]), Qn = D(() => Mr(ht?.from ?? null, q, n, r, Je, U, ht?.fromDomain, Zn, i, c, sn, H, ye, be), [
4164
+ Zn
4165
+ ]), $n = D(() => Mn ? [Math.min(Mn.startX, Mn.endX), Math.max(Mn.startX, Mn.endX)] : Yt ? zn : null, [
4166
+ Mn,
4167
+ zn,
4168
+ Yt
4169
+ ]), er = D(() => Nr(ht?.from ?? null, q, n, r, Je, U, ht?.fromDomain, $n, i, c, ln, H, ye, be), [
4158
4170
  q,
4159
4171
  Je,
4160
4172
  i,
@@ -4162,80 +4174,80 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4162
4174
  ht?.from,
4163
4175
  ht?.fromDomain,
4164
4176
  n,
4165
- Zn,
4177
+ $n,
4166
4178
  r,
4167
4179
  c,
4168
- sn,
4180
+ ln,
4169
4181
  H,
4170
4182
  ye,
4171
4183
  be
4172
- ]), $n = D(() => Mr(X, q, n, r, Je, U, void 0, Zn, i, c, sn, H, ye, be), [
4184
+ ]), nr = D(() => Nr(X, q, n, r, Je, U, void 0, $n, i, c, ln, H, ye, be), [
4173
4185
  X,
4174
4186
  q,
4175
4187
  n,
4176
4188
  r,
4177
4189
  Je,
4178
4190
  U,
4179
- Zn,
4191
+ $n,
4180
4192
  i,
4181
4193
  c,
4182
- sn,
4194
+ ln,
4183
4195
  H,
4184
4196
  ye,
4185
4197
  be
4186
- ]), er = Ln($n?.yDomain ? {
4187
- x: $n.xDomain,
4188
- y: $n.yDomain
4189
- } : null, An ? `${An.startX}:${An.endX}` : "full", X, `${U.width}:${U.height}`, W), Z = D(() => {
4190
- if (ht?.kind !== "matched-update" && !er) return $n;
4191
- let e = er?.y ?? (Qn?.yDomain && $n?.yDomain ? [Qn.yDomain[0] + ($n.yDomain[0] - Qn.yDomain[0]) * Yn, Qn.yDomain[1] + ($n.yDomain[1] - Qn.yDomain[1]) * Yn] : void 0);
4192
- return Mr(Xn, q, n, r, Je, U, e, er?.x ?? Zn, i, c, sn, H, ye, be);
4198
+ ]), ir = Ln(nr?.yDomain ? {
4199
+ x: nr.xDomain,
4200
+ y: nr.yDomain
4201
+ } : null, Mn ? `${Mn.startX}:${Mn.endX}` : "full", X, `${U.width}:${U.height}`, W), Z = D(() => {
4202
+ if (ht?.kind !== "matched-update" && !ir) return nr;
4203
+ let e = ir?.y ?? (er?.yDomain && nr?.yDomain ? [er.yDomain[0] + (nr.yDomain[0] - er.yDomain[0]) * Zn, er.yDomain[1] + (nr.yDomain[1] - er.yDomain[1]) * Zn] : void 0);
4204
+ return Nr(Qn, q, n, r, Je, U, e, ir?.x ?? $n, i, c, ln, H, ye, be);
4193
4205
  }, [
4194
4206
  q,
4195
- $n,
4196
- er,
4207
+ nr,
4208
+ ir,
4197
4209
  Je,
4210
+ er,
4198
4211
  Qn,
4199
- Xn,
4200
4212
  i,
4201
4213
  U,
4202
4214
  ht?.kind,
4203
- Yn,
4204
- n,
4205
4215
  Zn,
4216
+ n,
4217
+ $n,
4206
4218
  r,
4207
4219
  c,
4208
- sn,
4220
+ ln,
4209
4221
  H,
4210
4222
  ye,
4211
4223
  be
4212
- ]), rr = D(() => Zn === null ? $n : Mr(X, q, n, r, Je, U, void 0, void 0, i, c, sn, H, ye, be), [
4224
+ ]), ur = D(() => $n === null ? nr : Nr(X, q, n, r, Je, U, void 0, void 0, i, c, ln, H, ye, be), [
4213
4225
  q,
4214
4226
  X,
4215
- $n,
4227
+ nr,
4216
4228
  Je,
4217
4229
  i,
4218
4230
  U,
4219
4231
  n,
4220
- Zn,
4232
+ $n,
4221
4233
  r,
4222
4234
  c,
4223
- sn,
4235
+ ln,
4224
4236
  H,
4225
4237
  ye,
4226
4238
  be
4227
- ]), ar = q.map((e) => e.id).join("|");
4239
+ ]), dr = q.map((e) => e.id).join("|");
4228
4240
  E(() => {
4229
- !c.stack && Kn.current !== ar && Gn.current && Z && (Bn(Gn.current), Un(!0), Wn.current !== null && window.clearTimeout(Wn.current), Wn.current = window.setTimeout(() => {
4230
- Un(!1), Bn(null), Wn.current = null;
4231
- }, W ? 0 : 444)), Kn.current = ar, Gn.current = Z;
4241
+ !c.stack && Jn.current !== dr && qn.current && Z && (Un(qn.current), Gn(!0), Kn.current !== null && window.clearTimeout(Kn.current), Kn.current = window.setTimeout(() => {
4242
+ Gn(!1), Un(null), Kn.current = null;
4243
+ }, W ? 0 : 444)), Jn.current = dr, qn.current = Z;
4232
4244
  }, [
4233
4245
  c.stack,
4234
4246
  W,
4235
4247
  Z,
4236
- ar
4237
- ]), Dt.current = Xn ?? Dt.current;
4238
- let [ur, dr] = k(() => {
4248
+ dr
4249
+ ]), kt.current = Qn ?? kt.current;
4250
+ let [pr, mr] = k(() => {
4239
4251
  let e = z?.getSnapshot().inspection;
4240
4252
  return e ? {
4241
4253
  row: e.row,
@@ -4243,10 +4255,10 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4243
4255
  x: e.x,
4244
4256
  pinned: e.pinned
4245
4257
  } : null;
4246
- }), Q = O(ur);
4247
- Q.current = ur;
4248
- let pr = O(!1), mr = O(!1), hr = S(() => {
4249
- if (pr.current = !1, z && !mr.current && n.type !== "category") {
4258
+ }), Q = O(pr);
4259
+ Q.current = pr;
4260
+ let hr = O(!1), gr = O(!1), _r = S(() => {
4261
+ if (hr.current = !1, z && !gr.current && n.type !== "category") {
4250
4262
  Q.current?.pinned ? z.actions.release() : z.actions.clearInspection();
4251
4263
  return;
4252
4264
  }
@@ -4254,28 +4266,28 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4254
4266
  oe?.(null);
4255
4267
  return;
4256
4268
  }
4257
- Q.current && (n.type === "category" && Q.current.pinned && oe?.(null), Q.current = null, dr(null), Ot.current?.(null), L?.clearInspection(z ? void 0 : Rt));
4269
+ Q.current && (n.type === "category" && Q.current.pinned && oe?.(null), Q.current = null, mr(null), At.current?.(null), L?.clearInspection(z ? void 0 : Vt));
4258
4270
  }, [
4259
- Rt,
4271
+ Vt,
4260
4272
  L,
4261
4273
  z,
4262
4274
  oe,
4263
4275
  ae,
4264
4276
  n.type
4265
- ]), gr = S((e = !1) => {
4266
- Q.current && (Q.current = null, dr(null), Ot.current?.(null), e || L?.clearInspection(z ? void 0 : Rt));
4277
+ ]), vr = S((e = !1) => {
4278
+ Q.current && (Q.current = null, mr(null), At.current?.(null), e || L?.clearInspection(z ? void 0 : Vt));
4267
4279
  }, [
4268
- Rt,
4280
+ Vt,
4269
4281
  L,
4270
4282
  z
4271
4283
  ]);
4272
4284
  w(() => {
4273
- b || gr(!0);
4274
- }, [b, gr]);
4275
- let _r = S((e, t, r = !1, i = !1) => {
4285
+ b || vr(!0);
4286
+ }, [b, vr]);
4287
+ let Cr = S((e, t, r = !1, i = !1) => {
4276
4288
  let a = Z, o = a?.data.rows[e];
4277
4289
  if (!b || !a || !o) return;
4278
- if (t && (pr.current = i), z && !mr.current && n.type !== "category") {
4290
+ if (t && (hr.current = i), z && !gr.current && n.type !== "category") {
4279
4291
  t ? z.actions.pin(o.x, i ? { local: i } : void 0) : z.actions.inspect(o.x);
4280
4292
  return;
4281
4293
  }
@@ -4288,19 +4300,19 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4288
4300
  pinned: t,
4289
4301
  ...t && i ? { local: i } : {}
4290
4302
  }, c = Q.current;
4291
- c && c.sourceIndex === s.sourceIndex && c.pinned === s.pinned && !!c.local == !!s.local && c.row === s.row || (Q.current = s, dr(s), Ot.current?.(s), n.type === "category" && t && !r && oe?.(o.categoryId ?? null), n.type !== "category" && L?.inspect({
4303
+ c && c.sourceIndex === s.sourceIndex && c.pinned === s.pinned && !!c.local == !!s.local && c.row === s.row || (Q.current = s, mr(s), At.current?.(s), n.type === "category" && t && !r && oe?.(o.categoryId ?? null), n.type !== "category" && L?.inspect({
4292
4304
  x: s.x,
4293
4305
  pinned: t,
4294
- ownerId: Rt,
4306
+ ownerId: Vt,
4295
4307
  ...s.local ? { local: !0 } : {}
4296
- }), qt && e < a.data.rows.length - 1 && jn && (Mn(!1), Rn(a.xDomain), Wt.onFollowingChange?.(!1)));
4308
+ }), Yt && e < a.data.rows.length - 1 && In && (Rn(!1), Bn(a.xDomain), Kt.onFollowingChange?.(!1)));
4297
4309
  }, [
4298
- Rt,
4310
+ Vt,
4299
4311
  L,
4300
- jn,
4312
+ In,
4301
4313
  b,
4302
- Wt,
4303
- qt,
4314
+ Kt,
4315
+ Yt,
4304
4316
  z,
4305
4317
  oe,
4306
4318
  ae,
@@ -4310,35 +4322,35 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4310
4322
  w(() => {
4311
4323
  if (n.type !== "category" || ae === void 0 || K !== mt.current) return;
4312
4324
  if (ae === null) {
4313
- Q.current?.pinned && (b ? hr() : gr());
4325
+ Q.current?.pinned && (b ? _r() : vr());
4314
4326
  return;
4315
4327
  }
4316
4328
  if (!Z) {
4317
- gr(), v === "ready" && K !== null && oe?.(null);
4329
+ vr(), v === "ready" && K !== null && oe?.(null);
4318
4330
  return;
4319
4331
  }
4320
4332
  let e = Z.data.rows.findIndex((e) => e.categoryId === ae);
4321
- e < 0 ? (gr(), oe?.(null)) : b && _r(e, !0, !0);
4333
+ e < 0 ? (vr(), oe?.(null)) : b && Cr(e, !0, !0);
4322
4334
  }, [
4323
4335
  K,
4324
- hr,
4336
+ _r,
4325
4337
  b,
4326
- gr,
4338
+ vr,
4327
4339
  oe,
4328
- _r,
4340
+ Cr,
4329
4341
  ae,
4330
4342
  v,
4331
4343
  Z,
4332
4344
  n.type
4333
4345
  ]);
4334
- let vr = S((e, t = !1) => {
4346
+ let Dr = S((e, t = !1) => {
4335
4347
  let n = Z, r = Le.current;
4336
4348
  if (!n || !r || !n.data.rows.length) return null;
4337
4349
  let i = Be.current ?? r.getBoundingClientRect();
4338
4350
  if (Be.current = i, !i.width || !i.height) return null;
4339
4351
  let a = (e.clientX - i.left) / i.width * U.width;
4340
4352
  return !t && (a < n.plot.left - 8 || a > n.plot.right + 8) ? null : sr(n.data.rows, n.xDomain, a, n.xToPixel);
4341
- }, [U.width, Z]), Sr = S((e) => {
4353
+ }, [U.width, Z]), Rr = S((e) => {
4342
4354
  let t = Z?.data.rows[e];
4343
4355
  if (!Z || !t) return [];
4344
4356
  if (c.bars) {
@@ -4377,63 +4389,63 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4377
4389
  q,
4378
4390
  c,
4379
4391
  Z
4380
- ]), Er = S((e, t, n) => {
4392
+ ]), zr = S((e, t, n) => {
4381
4393
  if (ge !== "nearest" || q.length < 2) return;
4382
4394
  let r = Le.current?.getBoundingClientRect();
4383
4395
  if (!r?.height || !r.width) return;
4384
4396
  Be.current = r;
4385
- let i = (t - r.left) / r.width * U.width, a = (n - r.top) / r.height * U.height, o = Sr(e);
4397
+ let i = (t - r.left) / r.width * U.width, a = (n - r.top) / r.height * U.height, o = Rr(e);
4386
4398
  if (!o.length) return;
4387
4399
  let s = !(!c.bars || c.stack), l = s ? o.filter((e) => e.line && Math.abs(e.y - a) <= yr).sort((e, t) => Math.abs(e.y - a) - Math.abs(t.y - a))[0] : void 0, u = s ? l ? [l] : o.filter((e) => !e.line) : o;
4388
4400
  if (!u.length) return;
4389
4401
  let d = u.map((e) => ({
4390
4402
  id: e.id,
4391
4403
  distance: Math.abs(s && !l ? e.x - i : e.y - a)
4392
- })), f = d.reduce((e, t) => t.distance < e.distance ? t : e), p = l ? void 0 : d.find((e) => e.id === un.current), m = s ? 2 : 8;
4393
- p && p.id !== f.id && p.distance - f.distance < m || f.id !== un.current && ln(f.id);
4404
+ })), f = d.reduce((e, t) => t.distance < e.distance ? t : e), p = l ? void 0 : d.find((e) => e.id === fn.current), m = s ? 2 : 8;
4405
+ p && p.id !== f.id && p.distance - f.distance < m || f.id !== fn.current && dn(f.id);
4394
4406
  }, [
4395
4407
  q.length,
4396
4408
  c,
4397
4409
  ge,
4398
- Sr,
4410
+ Rr,
4399
4411
  U.height,
4400
4412
  U.width
4401
- ]), Lr = S((e) => {
4402
- if (!(Gt && Y && !Mt.current)) {
4413
+ ]), Br = S((e) => {
4414
+ if (!(qt && Y && !Pt.current)) {
4403
4415
  if (Q.current?.pinned && e.pointerType !== "touch") {
4404
- Z && Er(Ir(Z, Q.current.sourceIndex), e.clientX, e.clientY);
4416
+ Z && zr(Lr(Z, Q.current.sourceIndex), e.clientX, e.clientY);
4405
4417
  return;
4406
4418
  }
4407
- At.current = e, kt.current === null && (kt.current = window.requestAnimationFrame(() => {
4408
- kt.current = null;
4409
- let e = At.current;
4419
+ Mt.current = e, jt.current === null && (jt.current = window.requestAnimationFrame(() => {
4420
+ jt.current = null;
4421
+ let e = Mt.current;
4410
4422
  if (!e || Q.current?.pinned && e.pointerType !== "touch") return;
4411
- let t = vr(e);
4412
- t !== null && (_r(t, !1), Er(t, e.clientX, e.clientY));
4423
+ let t = Dr(e);
4424
+ t !== null && (Cr(t, !1), zr(t, e.clientX, e.clientY));
4413
4425
  }));
4414
4426
  }
4415
4427
  }, [
4416
- Gt,
4428
+ qt,
4417
4429
  Y,
4418
- vr,
4419
- _r,
4430
+ Dr,
4431
+ Cr,
4420
4432
  Z,
4421
- Er
4422
- ]), Rr = O(!1);
4433
+ zr
4434
+ ]), Vr = O(!1);
4423
4435
  w(() => {
4424
4436
  let e = (e) => {
4425
4437
  let t = e.target, n = V.current?.closest("[data-lilt-chart]");
4426
- Rr.current = !!n?.contains(t), !t?.closest("button, a, input, [role=\"tab\"]") && L?.getSnapshot().inspection?.ownerId !== "sync" && (t?.closest(".lilt-chart__plot-host")?.querySelector(".lilt-chart__pin[data-ghost]") || Q.current?.pinned && V.current && !V.current.contains(e.target) && hr());
4438
+ Vr.current = !!n?.contains(t), !t?.closest("button, a, input, [role=\"tab\"]") && L?.getSnapshot().inspection?.ownerId !== "sync" && (t?.closest(".lilt-chart__plot-host")?.querySelector(".lilt-chart__pin[data-ghost]") || Q.current?.pinned && V.current && !V.current.contains(e.target) && _r());
4427
4439
  };
4428
4440
  return document.addEventListener("pointerdown", e, !0), () => {
4429
- document.removeEventListener("pointerdown", e, !0), kt.current !== null && window.cancelAnimationFrame(kt.current), Lt.current !== null && window.cancelAnimationFrame(Lt.current), Pt.current !== null && window.clearTimeout(Pt.current);
4441
+ document.removeEventListener("pointerdown", e, !0), jt.current !== null && window.cancelAnimationFrame(jt.current), zt.current !== null && window.cancelAnimationFrame(zt.current), It.current !== null && window.clearTimeout(It.current);
4430
4442
  };
4431
- }, [hr, L]), w(() => {
4443
+ }, [_r, L]), w(() => {
4432
4444
  let e = Q.current;
4433
4445
  if (!e || !Z) return;
4434
4446
  let t = Z.data.rows.findIndex((t) => e.categoryId === void 0 ? t.x === e.x : t.categoryId === e.categoryId);
4435
4447
  if (t < 0) {
4436
- gr();
4448
+ vr();
4437
4449
  return;
4438
4450
  }
4439
4451
  let n = Z.data.rows[t];
@@ -4445,17 +4457,17 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4445
4457
  categoryId: n.categoryId,
4446
4458
  pinned: e.pinned
4447
4459
  };
4448
- Q.current = r, dr(r), Ot.current?.(r);
4460
+ Q.current = r, mr(r), At.current?.(r);
4449
4461
  }, [
4450
- gr,
4462
+ vr,
4451
4463
  re,
4452
4464
  Z
4453
4465
  ]), w(() => {
4454
4466
  if (!L || !b || !Z || n.type === "category" || !mt.current || !mt.current.rows.length || !Me(mt.current)) return;
4455
- let e = zt.inspection;
4467
+ let e = Ut.inspection;
4456
4468
  if (!e) {
4457
4469
  if (z?.getSnapshot().inspection?.pinned) return;
4458
- Q.current && (Q.current = null, dr(null), Ot.current?.(null));
4470
+ Q.current && (Q.current = null, mr(null), At.current?.(null));
4459
4471
  return;
4460
4472
  }
4461
4473
  let t = Z.data.rows.findIndex((t) => t.x === e.x);
@@ -4467,7 +4479,7 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4467
4479
  }), n > ie.nearestWithin && (t = -1);
4468
4480
  }
4469
4481
  if (t < 0) {
4470
- Q.current && (Q.current = null, dr(null), Ot.current?.(null));
4482
+ Q.current && (Q.current = null, mr(null), At.current?.(null));
4471
4483
  return;
4472
4484
  }
4473
4485
  let r = Z.data.rows[t], i = Q.current;
@@ -4478,46 +4490,46 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4478
4490
  x: r.x,
4479
4491
  pinned: e.pinned
4480
4492
  };
4481
- Q.current = a, dr(a), Ot.current?.(a);
4493
+ Q.current = a, mr(a), At.current?.(a);
4482
4494
  }, [
4483
4495
  L,
4484
4496
  pe,
4485
- zt.inspection,
4497
+ Ut.inspection,
4486
4498
  b,
4487
4499
  ie,
4488
4500
  z,
4489
4501
  Z,
4490
4502
  n.type
4491
4503
  ]);
4492
- let zr = [
4504
+ let Hr = [
4493
4505
  Y?.series,
4494
- Vt.series,
4506
+ Wt.series,
4495
4507
  q[0]?.id
4496
- ].find((e) => q.some((t) => t.id === e)), Br = D(() => Gt && Y && zr && q.some((e) => e.id === zr) && X ? Pe(X, Y, zr, Vt.percentage) : null, [
4497
- Vt.percentage,
4498
- Gt,
4499
- zr,
4508
+ ].find((e) => q.some((t) => t.id === e)), Ur = D(() => qt && Y && Hr && q.some((e) => e.id === Hr) && X ? Pe(X, Y, Hr, Wt.percentage) : null, [
4509
+ Wt.percentage,
4510
+ qt,
4511
+ Hr,
4500
4512
  Y,
4501
4513
  X,
4502
4514
  q
4503
4515
  ]);
4504
4516
  E(() => {
4505
- bn.current && Br && (bn.current = !1, V.current?.querySelector(".lilt-chart__comparison-handle[data-endpoint=\"start\"]")?.focus());
4506
- }, [Br]);
4507
- let Vr = S((e) => {
4508
- if (z && !mr.current) {
4509
- e ? z.actions.compare(e, Vt.percentage) : z.actions.clearComparison();
4517
+ Sn.current && Ur && (Sn.current = !1, V.current?.querySelector(".lilt-chart__comparison-handle[data-endpoint=\"start\"]")?.focus());
4518
+ }, [Ur]);
4519
+ let Wr = S((e) => {
4520
+ if (z && !gr.current) {
4521
+ e ? z.actions.compare(e, Wt.percentage) : z.actions.clearComparison();
4510
4522
  return;
4511
4523
  }
4512
- L ? L.setComparison(e) : Dn(e);
4524
+ L ? L.setComparison(e) : kn(e);
4513
4525
  }, [
4514
4526
  L,
4515
4527
  z,
4516
- Vt.percentage
4517
- ]), Hr = S(() => {
4518
- Tn.current = null, wn(null), yn(null);
4519
- }, []), Ur = S((e, t) => {
4520
- Y && X && (Tn.current = {
4528
+ Wt.percentage
4529
+ ]), Gr = S(() => {
4530
+ Dn.current = null, En(null), xn(null);
4531
+ }, []), Kr = S((e, t) => {
4532
+ Y && X && (Dn.current = {
4521
4533
  handle: e,
4522
4534
  original: Y,
4523
4535
  draft: {
@@ -4525,12 +4537,12 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4525
4537
  endX: Y.endX
4526
4538
  },
4527
4539
  pointerId: t
4528
- }, wn(e), yn({
4540
+ }, En(e), xn({
4529
4541
  startX: Y.startX,
4530
4542
  endX: Y.endX
4531
4543
  }));
4532
- }, [Y, X]), Wr = S((e, t) => {
4533
- let n = Tn.current, r = X?.rows;
4544
+ }, [Y, X]), qr = S((e, t) => {
4545
+ let n = Dn.current, r = X?.rows;
4534
4546
  if (!n || n.handle !== e || !r?.length) return;
4535
4547
  let i = e === "start" ? n.draft.endX : n.draft.startX, a = r.findIndex((e) => e.x === i);
4536
4548
  if (a < 0) return;
@@ -4540,102 +4552,102 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4540
4552
  l !== void 0 && (n.draft = {
4541
4553
  ...n.draft,
4542
4554
  [e === "start" ? "startX" : "endX"]: l
4543
- }, yn(n.draft));
4544
- }, [X]), Gr = S(() => {
4545
- let e = Tn.current;
4546
- e && (Tn.current = null, wn(null), yn(null), (e.draft.startX !== e.original.startX || e.draft.endX !== e.original.endX) && Vr({
4555
+ }, xn(n.draft));
4556
+ }, [X]), Jr = S(() => {
4557
+ let e = Dn.current;
4558
+ e && (Dn.current = null, En(null), xn(null), (e.draft.startX !== e.original.startX || e.draft.endX !== e.original.endX) && Wr({
4547
4559
  ...e.draft,
4548
4560
  series: e.original.series
4549
4561
  }));
4550
- }, [Vr]);
4562
+ }, [Wr]);
4551
4563
  w(() => {
4552
- let e = Tn.current;
4553
- e && X && (!X.rows.some((t) => t.x === e.original.startX) || !X.rows.some((t) => t.x === e.original.endX)) && Hr();
4554
- }, [Hr, X]);
4555
- let Kr = S((e) => {
4556
- It.current = { clientX: e.clientX }, Lt.current === null && (Lt.current = window.requestAnimationFrame(() => {
4557
- Lt.current = null;
4558
- let e = Mt.current, t = It.current;
4564
+ let e = Dn.current;
4565
+ e && X && (!X.rows.some((t) => t.x === e.original.startX) || !X.rows.some((t) => t.x === e.original.endX)) && Gr();
4566
+ }, [Gr, X]);
4567
+ let Yr = S((e) => {
4568
+ Rt.current = { clientX: e.clientX }, zt.current === null && (zt.current = window.requestAnimationFrame(() => {
4569
+ zt.current = null;
4570
+ let e = Pt.current, t = Rt.current;
4559
4571
  if (!t) return;
4560
- let n = vr(t, !0), r = n === null ? void 0 : Z?.data.rows[n]?.x;
4572
+ let n = Dr(t, !0), r = n === null ? void 0 : Z?.data.rows[n]?.x;
4561
4573
  if (r !== void 0) {
4562
- if (Sn.current) {
4563
- xn((e) => e && e.probeX !== r ? {
4574
+ if (wn.current) {
4575
+ Cn((e) => e && e.probeX !== r ? {
4564
4576
  ...e,
4565
4577
  probeX: r
4566
4578
  } : e);
4567
4579
  return;
4568
4580
  }
4569
- e && yn({
4581
+ e && xn({
4570
4582
  startX: Math.min(e.startX, r),
4571
4583
  endX: Math.max(e.startX, r)
4572
4584
  });
4573
4585
  }
4574
4586
  }));
4575
- }, [vr, Z]), qr = S((e, t, n = !1, r = zr) => {
4576
- Vr({
4587
+ }, [Dr, Z]), Xr = S((e, t, n = !1, r = Hr) => {
4588
+ Wr({
4577
4589
  startX: n ? e : Math.min(e, t),
4578
4590
  endX: n ? t : Math.max(e, t),
4579
4591
  series: r
4580
- }), _n(null), yn(null), xn(null), hr();
4592
+ }), yn(null), xn(null), Cn(null), _r();
4581
4593
  }, [
4582
- hr,
4583
- zr,
4584
- Vr
4585
- ]), Jr = S((e) => {
4586
- gn === null ? _n(e) : gn === e ? _n(null) : (bn.current = !0, qr(gn, e));
4587
- }, [gn, qr]), Yr = S((e) => {
4588
- Bn(Z), Un(!0), Wn.current !== null && window.clearTimeout(Wn.current), e(), Wn.current = window.setTimeout(() => {
4589
- Un(!1), Bn(null), Wn.current = null;
4594
+ _r,
4595
+ Hr,
4596
+ Wr
4597
+ ]), Zr = S((e) => {
4598
+ vn === null ? yn(e) : vn === e ? yn(null) : (Sn.current = !0, Xr(vn, e));
4599
+ }, [vn, Xr]), Qr = S((e) => {
4600
+ Un(Z), Gn(!0), Kn.current !== null && window.clearTimeout(Kn.current), e(), Kn.current = window.setTimeout(() => {
4601
+ Gn(!1), Un(null), Kn.current = null;
4590
4602
  }, W ? 0 : 444);
4591
4603
  }, [W, Z]);
4592
4604
  w(() => () => {
4593
- Wn.current !== null && window.clearTimeout(Wn.current);
4605
+ Kn.current !== null && window.clearTimeout(Kn.current);
4594
4606
  }, []);
4595
- let Xr = S((e) => {
4596
- Wn.current !== null && window.clearTimeout(Wn.current), Wn.current = null, Bn(null), Un(!1), L ? L.setFocus(e) : kn(e), Ut.onChange?.(e);
4597
- }, [L, Ut]), Zr = S(() => {
4598
- Vr(null), An && Xr(null), _n(null), yn(null);
4607
+ let $r = S((e) => {
4608
+ Kn.current !== null && window.clearTimeout(Kn.current), Kn.current = null, Un(null), Gn(!1), L ? L.setFocus(e) : jn(e), Gt.onChange?.(e);
4609
+ }, [L, Gt]), ei = S(() => {
4610
+ Wr(null), Mn && $r(null), yn(null), xn(null);
4599
4611
  }, [
4600
- An,
4601
- Vr,
4602
- Xr
4603
- ]), Qr = S(() => {
4604
- if (Tn.current) {
4605
- Hr();
4612
+ Mn,
4613
+ Wr,
4614
+ $r
4615
+ ]), ti = S(() => {
4616
+ if (Dn.current) {
4617
+ Gr();
4606
4618
  return;
4607
4619
  }
4608
- if (Mt.current && Ft(), Mt.current = null, Lt.current !== null && (window.cancelAnimationFrame(Lt.current), Lt.current = null), Sn.current) {
4609
- xn(null);
4620
+ if (Pt.current && Lt(), Pt.current = null, zt.current !== null && (window.cancelAnimationFrame(zt.current), zt.current = null), wn.current) {
4621
+ Cn(null);
4610
4622
  return;
4611
4623
  }
4612
- if (vn) {
4613
- yn(null);
4624
+ if (bn) {
4625
+ xn(null);
4614
4626
  return;
4615
4627
  }
4616
- if (gn !== null) {
4617
- _n(null);
4628
+ if (vn !== null) {
4629
+ yn(null);
4618
4630
  return;
4619
4631
  }
4620
- if (An) {
4621
- Xr(null);
4632
+ if (Mn) {
4633
+ $r(null);
4622
4634
  return;
4623
4635
  }
4624
4636
  if (Y) {
4625
- Zr();
4637
+ ei();
4626
4638
  return;
4627
4639
  }
4628
- hr();
4640
+ _r();
4629
4641
  }, [
4630
- Hr,
4631
- Zr,
4632
- hr,
4642
+ Gr,
4643
+ ei,
4644
+ _r,
4645
+ bn,
4633
4646
  vn,
4634
- gn,
4635
4647
  Y,
4636
- An,
4637
- Xr,
4638
- Ft
4648
+ Mn,
4649
+ $r,
4650
+ Lt
4639
4651
  ]);
4640
4652
  w(() => {
4641
4653
  let e = (e) => {
@@ -4646,50 +4658,50 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4646
4658
  let e = n.closest("[data-lilt-chart]");
4647
4659
  if (e && e !== t) return;
4648
4660
  }
4649
- n instanceof Element && n.closest("[role=\"dialog\"]") && !t.contains(n) || (t.contains(n) || Rr.current) && (e.preventDefault(), n instanceof Element && n.closest(".lilt-chart__tooltip, .lilt-chart__adaptive-custom, .lilt-chart__comparison-tooltip") && V.current?.focus({ preventScroll: !0 }), Qr());
4661
+ n instanceof Element && n.closest("[role=\"dialog\"]") && !t.contains(n) || (t.contains(n) || Vr.current) && (e.preventDefault(), n instanceof Element && n.closest(".lilt-chart__tooltip, .lilt-chart__adaptive-custom, .lilt-chart__comparison-tooltip") && V.current?.focus({ preventScroll: !0 }), ti());
4650
4662
  }
4651
4663
  };
4652
4664
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
4653
- }, [Qr]);
4654
- let $r = S(() => {
4655
- Yr(() => {
4656
- Rn(null), Mn(!0), hr(), Wt.onFollowingChange?.(!0);
4665
+ }, [ti]);
4666
+ let ni = S(() => {
4667
+ Qr(() => {
4668
+ Bn(null), Rn(!0), _r(), Kt.onFollowingChange?.(!0);
4657
4669
  });
4658
4670
  }, [
4659
- hr,
4660
- Wt,
4661
- Yr
4662
- ]), ei = X?.rows.at(-1)?.x, ti = In && X ? X.rows.filter((e) => e.x > In[1]).length : 0, ni = S((e) => {
4663
- ue || Yt(e), de?.(e);
4664
- }, [de, ue]), ri = S((e) => {
4665
- $t(null), ni(e);
4666
- }, [ni]), ii = S((e) => {
4667
- let t = Qt?.restore ?? Zt;
4668
- $t({
4671
+ _r,
4672
+ Kt,
4673
+ Qr
4674
+ ]), ri = X?.rows.at(-1)?.x, ii = zn && X ? X.rows.filter((e) => e.x > zn[1]).length : 0, ai = S((e) => {
4675
+ ue || Zt(e), de?.(e);
4676
+ }, [de, ue]), oi = S((e) => {
4677
+ nn(null), ai(e);
4678
+ }, [ai]), si = S((e) => {
4679
+ let t = en?.restore ?? $t;
4680
+ nn({
4669
4681
  id: e,
4670
4682
  restore: t,
4671
4683
  expected: [e],
4672
- previous: Zt
4673
- }), ni([e]);
4684
+ previous: $t
4685
+ }), ai([e]);
4674
4686
  }, [
4675
- Qt,
4676
- ni,
4677
- Zt
4678
- ]), ai = S(() => {
4679
- if (!Qt) return;
4680
- let e = i.map((e) => e.id), t = Qt.restore.filter((t) => e.includes(t));
4681
- $t(null), ni(t);
4687
+ en,
4688
+ ai,
4689
+ $t
4690
+ ]), ci = S(() => {
4691
+ if (!en) return;
4692
+ let e = i.map((e) => e.id), t = en.restore.filter((t) => e.includes(t));
4693
+ nn(null), ai(t);
4682
4694
  }, [
4683
- Qt,
4684
- ni,
4695
+ en,
4696
+ ai,
4685
4697
  i
4686
- ]), oi = S(() => {
4687
- $t(null), ni(i.map((e) => e.id));
4688
- }, [ni, i]), si = ["lilt-chart__plot-host", m].filter(Boolean).join(" "), ci = {
4698
+ ]), li = S(() => {
4699
+ nn(null), ai(i.map((e) => e.id));
4700
+ }, [ai, i]), ui = ["lilt-chart__plot-host", m].filter(Boolean).join(" "), di = {
4689
4701
  ...h,
4690
4702
  "--lilt-chart-height": `${U.height || a}px`
4691
- }, li = !!(G && G.rows.length > 0 && !Me(G)), ui = bt === "empty" || v === "ready" && !!G && (G?.rows.length === 0 || li), di = Ye.error ?? (v === "error" ? x ?? "Could not load chart data." : null), fi = Jn ? null : ht?.kind ?? (Vn ? "matched-update" : null), pi = Jn ? 0 : ht?.duration ?? (Vn ? 420 : 0), mi = F && !W && (fi === "initial" || fi === "handoff"), hi = nn(Z?.plot.left ?? 0, Z?.plot.width ?? U.width, mi ? en(_t * pi, 0, pi) : 1), $ = Qn ?? zn, gi = !!((fi === "topology-update" || Vn) && $ && Z), _i = O(/* @__PURE__ */ new Map()), vi = (e, t, a, o, s) => {
4692
- let c = !(!ur || Br), l = q.some((e) => e.id === dn) ? dn : null, u = mi && !W ? _t : 1, d = [
4703
+ }, fi = !!(G && G.rows.length > 0 && !Me(G)), pi = bt === "empty" || v === "ready" && !!G && (G?.rows.length === 0 || fi), mi = Ye.error ?? (v === "error" ? x ?? "Could not load chart data." : null), hi = Xn ? null : ht?.kind ?? (Wn ? "matched-update" : null), gi = Xn ? 0 : ht?.duration ?? (Wn ? 420 : 0), $ = F && !W && hi === "initial", _i = rn(Z?.plot.left ?? 0, Z?.plot.width ?? U.width, $ ? tn(_t * gi, 0, gi) : 1), vi = er ?? Vn, yi = !!((hi === "topology-update" || Wn) && vi && Z), bi = O(/* @__PURE__ */ new Map()), xi = (e, t, a, o, s) => {
4704
+ let c = !(!pr || Ur), l = q.some((e) => e.id === pn) ? pn : null, u = $ && !W ? _t : 1, d = [
4693
4705
  e,
4694
4706
  t,
4695
4707
  o,
@@ -4700,33 +4712,33 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4700
4712
  Je,
4701
4713
  U,
4702
4714
  W,
4703
- pi,
4704
- fi,
4715
+ gi,
4716
+ hi,
4705
4717
  et,
4706
4718
  tt,
4707
4719
  nt,
4708
- hn,
4720
+ _n,
4709
4721
  c,
4710
4722
  l,
4711
4723
  q,
4712
4724
  u,
4713
- mi,
4725
+ $,
4714
4726
  _
4715
- ], f = _i.current.get(a);
4727
+ ], f = bi.current.get(a);
4716
4728
  if (f && f.inputs.length === d.length && f.inputs.every((e, t) => Object.is(e, d[t]))) return f.element;
4717
- let p = Nr(e, t, {
4729
+ let p = Pr(e, t, {
4718
4730
  series: i,
4719
4731
  x: n,
4720
4732
  y: r,
4721
4733
  margins: Je,
4722
4734
  size: U,
4723
4735
  reducedMotion: W,
4724
- transitionDuration: pi,
4725
- transitionKind: fi,
4736
+ transitionDuration: gi,
4737
+ transitionKind: hi,
4726
4738
  clipId: et,
4727
4739
  gridGradientId: tt,
4728
4740
  paintId: nt,
4729
- inspectionSeries: hn,
4741
+ inspectionSeries: _n,
4730
4742
  inspecting: c,
4731
4743
  focusedSeries: l,
4732
4744
  visibleSeries: q.map((e) => e.id),
@@ -4734,116 +4746,116 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4734
4746
  }), m = /* @__PURE__ */ j(P.g, {
4735
4747
  animate: { opacity: o ?? 1 },
4736
4748
  className: "lilt-chart__data-layer",
4737
- initial: s === void 0 ? o === void 0 && mi ? !1 : o === void 0 ? void 0 : { opacity: o } : { opacity: s },
4738
- transition: { duration: W ? 0 : fi === "handoff" ? .1 : fi === "topology-update" || fi === "matched-update" ? pi / 1e3 : .12 },
4749
+ initial: s === void 0 ? o === void 0 && $ ? !1 : o === void 0 ? void 0 : { opacity: o } : { opacity: s },
4750
+ transition: { duration: W ? 0 : hi === "topology-update" || hi === "matched-update" ? gi / 1e3 : .12 },
4739
4751
  children: /* @__PURE__ */ j(Ht, {
4740
4752
  value: p,
4741
4753
  children: _
4742
4754
  })
4743
4755
  }, a);
4744
- return !_i.current.has(a) && _i.current.size >= 3 && _i.current.clear(), _i.current.set(a, {
4756
+ return !bi.current.has(a) && bi.current.size >= 3 && bi.current.clear(), bi.current.set(a, {
4745
4757
  inputs: d,
4746
4758
  element: m
4747
4759
  }), m;
4748
- }, yi = D(() => Z?.data.rows.filter((e) => e.x >= Z.xDomain[0] && e.x <= Z.xDomain[1]), [Z]), bi = yi?.[0], xi = yi?.at(-1), Si = bi && Z ? Ir(Z, bi.sourceIndex) : 0, Ci = xi && Z ? Ir(Z, xi.sourceIndex) : 0, wi = ur && Z && ur.x >= Z.xDomain[0] && ur.x <= Z.xDomain[1] ? ur : null, Ti = wi && Z ? Ir(Z, wi.sourceIndex) : Ci, Ei = q.find((e) => e.id === zr), Di = Zt.length === 0, Oi = wi?.row ?? xi?.datum ?? null, ki = wi?.x ?? xi?.x, Ai = Oi && ki !== void 0 && Z ? `${Z.formatX(ki)} · ${q.map((e) => `${e.label} ${Fr(e, Oi, Z.formatValue)}`).join(" · ")}` : Di ? "No series selected" : "No observation available", ji = zt.inspection?.ownerId === fr, Mi = !(!zt.inspection || zt.inspection.ownerId === Rt || z && zt.inspection.ownerId === "model"), Ni = (J ? {
4760
+ }, Si = D(() => Z?.data.rows.filter((e) => e.x >= Z.xDomain[0] && e.x <= Z.xDomain[1]), [Z]), Ci = Si?.[0], wi = Si?.at(-1), Ti = Ci && Z ? Lr(Z, Ci.sourceIndex) : 0, Ei = wi && Z ? Lr(Z, wi.sourceIndex) : 0, Di = pr && Z && pr.x >= Z.xDomain[0] && pr.x <= Z.xDomain[1] ? pr : null, Oi = Di && Z ? Lr(Z, Di.sourceIndex) : Ei, ki = q.find((e) => e.id === Hr), Ai = $t.length === 0, ji = Di?.row ?? wi?.datum ?? null, Mi = Di?.x ?? wi?.x, Ni = ji && Mi !== void 0 && Z ? `${Z.formatX(Mi)} · ${q.map((e) => `${e.label} ${Ir(e, ji, Z.formatValue)}`).join(" · ")}` : Ai ? "No series selected" : "No observation available", Pi = Ut.inspection?.ownerId === fr, Fi = !(!Ut.inspection || Ut.inspection.ownerId === Vt || z && Ut.inspection.ownerId === "model"), Ii = (J ? {
4749
4761
  startX: J.baselineX,
4750
4762
  endX: J.probeX
4751
- } : vn ?? (gn !== null && ur ? {
4752
- startX: gn,
4753
- endX: ur.x
4754
- } : null)) && zr && X ? Pe(X, J ? {
4763
+ } : bn ?? (vn !== null && pr ? {
4764
+ startX: vn,
4765
+ endX: pr.x
4766
+ } : null)) && Hr && X ? Pe(X, J ? {
4755
4767
  startX: J.baselineX,
4756
4768
  endX: J.probeX
4757
- } : vn ?? {
4758
- startX: gn,
4759
- endX: ur.x
4760
- }, zr, Vt.percentage) : null, Pi = Gt && b ? Ni ?? Br : null, Fi = Pi?.startX, Ii = Pi?.endX, Li = Z?.formatValue, Ri = D(() => Fi !== void 0 && Ii !== void 0 && X && Li ? ze(X, {
4761
- startX: Fi,
4762
- endX: Ii
4763
- }, q, Li, Vt.percentage) : [], [
4764
- Fi,
4765
- Ii,
4769
+ } : bn ?? {
4770
+ startX: vn,
4771
+ endX: pr.x
4772
+ }, Hr, Wt.percentage) : null, Li = qt && b ? Ii ?? Ur : null, Ri = Li?.startX, zi = Li?.endX, Bi = Z?.formatValue, Vi = D(() => Ri !== void 0 && zi !== void 0 && X && Bi ? ze(X, {
4773
+ startX: Ri,
4774
+ endX: zi
4775
+ }, q, Bi, Wt.percentage) : [], [
4776
+ Ri,
4777
+ zi,
4766
4778
  X,
4767
4779
  q,
4768
- Li,
4769
- Vt.percentage
4770
- ]), zi = Fi === void 0 ? "" : Z?.formatX(Fi) ?? "", Bi = Ii === void 0 ? "" : Z?.formatX(Ii) ?? "", Vi = Ni ? "preview" : "complete", Hi = !!An, Ui = D(() => Fi === void 0 || Ii === void 0 || Ri.length === 0 ? null : {
4780
+ Bi,
4781
+ Wt.percentage
4782
+ ]), Hi = Ri === void 0 ? "" : Z?.formatX(Ri) ?? "", Ui = zi === void 0 ? "" : Z?.formatX(zi) ?? "", Wi = Ii ? "preview" : "complete", Gi = !!Mn, Ki = D(() => Ri === void 0 || zi === void 0 || Vi.length === 0 ? null : {
4771
4783
  kind: "range",
4772
- startRow: X?.rows.find((e) => e.x === Fi)?.datum ?? null,
4773
- endRow: X?.rows.find((e) => e.x === Ii)?.datum ?? null,
4774
- startSourceIndex: X?.rows.find((e) => e.x === Fi)?.sourceIndex ?? null,
4775
- endSourceIndex: X?.rows.find((e) => e.x === Ii)?.sourceIndex ?? null,
4776
- percentagePolicy: Vt.percentage ?? "positive-baseline",
4777
- startX: Fi,
4778
- endX: Ii,
4779
- formattedStartX: zi,
4780
- formattedEndX: Bi,
4781
- elapsed: Math.abs(Ii - Fi),
4782
- phase: Vi,
4783
- focused: Hi,
4784
- series: Ri
4784
+ startRow: X?.rows.find((e) => e.x === Ri)?.datum ?? null,
4785
+ endRow: X?.rows.find((e) => e.x === zi)?.datum ?? null,
4786
+ startSourceIndex: X?.rows.find((e) => e.x === Ri)?.sourceIndex ?? null,
4787
+ endSourceIndex: X?.rows.find((e) => e.x === zi)?.sourceIndex ?? null,
4788
+ percentagePolicy: Wt.percentage ?? "positive-baseline",
4789
+ startX: Ri,
4790
+ endX: zi,
4791
+ formattedStartX: Hi,
4792
+ formattedEndX: Ui,
4793
+ elapsed: Math.abs(zi - Ri),
4794
+ phase: Wi,
4795
+ focused: Gi,
4796
+ series: Vi
4785
4797
  }, [
4786
- Fi,
4787
- Ii,
4798
+ Ri,
4788
4799
  zi,
4789
- Bi,
4790
- Vi,
4791
4800
  Hi,
4792
- Ri,
4801
+ Ui,
4802
+ Wi,
4803
+ Gi,
4804
+ Vi,
4793
4805
  X,
4794
- Vt.percentage
4795
- ]), Wi = O(Vt.onChange);
4796
- Wi.current = Vt.onChange, w(() => {
4797
- Wi.current?.(Ui);
4798
- }, [Ui]);
4799
- let Gi = D(() => Ui ? {
4800
- ...Ui,
4806
+ Wt.percentage
4807
+ ]), qi = O(Wt.onChange);
4808
+ qi.current = Wt.onChange, w(() => {
4809
+ qi.current?.(Ki);
4810
+ }, [Ki]);
4811
+ let Ji = D(() => Ki ? {
4812
+ ...Ki,
4801
4813
  motion: W ? "none" : "auto",
4802
4814
  clear: () => {
4803
- Ui.phase === "preview" ? Qr() : Zr(), V.current?.focus({ preventScroll: !0 });
4815
+ Ki.phase === "preview" ? ti() : ei(), V.current?.focus({ preventScroll: !0 });
4804
4816
  },
4805
- focus: Ui.phase === "complete" && Kt && !Ui.focused ? () => Xr({
4806
- startX: Ui.startX,
4807
- endX: Ui.endX
4817
+ focus: Ki.phase === "complete" && Jt && !Ki.focused ? () => $r({
4818
+ startX: Ki.startX,
4819
+ endX: Ki.endX
4808
4820
  }) : void 0,
4809
- fullRange: Ui.phase === "complete" && Ui.focused ? () => Xr(null) : void 0
4821
+ fullRange: Ki.phase === "complete" && Ki.focused ? () => $r(null) : void 0
4810
4822
  } : null, [
4811
- Ui,
4823
+ Ki,
4812
4824
  W,
4813
- Qr,
4814
- Zr,
4815
- Kt,
4816
- Xr
4817
- ]), Ki = () => {
4818
- if (!Q.current?.pinned || !Gt) return;
4825
+ ti,
4826
+ ei,
4827
+ Jt,
4828
+ $r
4829
+ ]), Yi = () => {
4830
+ if (!Q.current?.pinned || !qt) return;
4819
4831
  let e = Q.current.x;
4820
- xn({
4832
+ Cn({
4821
4833
  baselineX: e,
4822
4834
  probeX: e
4823
- }), _n(null), yn(null);
4824
- }, qi = (e, t) => {
4825
- t.button === 0 && Y && (t.preventDefault(), t.stopPropagation(), t.currentTarget.focus(), Ur(e, t.pointerId), t.currentTarget.setPointerCapture(t.pointerId));
4826
- }, Ji = (e, t) => {
4827
- if (Tn.current?.pointerId !== t.pointerId) return;
4828
- let n = vr(t.nativeEvent, !0);
4829
- n !== null && Wr(e, n);
4830
- }, Yi = (e, t) => {
4831
- if (Tn.current?.pointerId !== t.pointerId) return;
4832
- let n = vr(t.nativeEvent, !0);
4833
- n !== null && Wr(e, n), Gr();
4835
+ }), yn(null), xn(null);
4834
4836
  }, Xi = (e, t) => {
4837
+ t.button === 0 && Y && (t.preventDefault(), t.stopPropagation(), t.currentTarget.focus(), Kr(e, t.pointerId), t.currentTarget.setPointerCapture(t.pointerId));
4838
+ }, Zi = (e, t) => {
4839
+ if (Dn.current?.pointerId !== t.pointerId) return;
4840
+ let n = Dr(t.nativeEvent, !0);
4841
+ n !== null && qr(e, n);
4842
+ }, Qi = (e, t) => {
4843
+ if (Dn.current?.pointerId !== t.pointerId) return;
4844
+ let n = Dr(t.nativeEvent, !0);
4845
+ n !== null && qr(e, n), Jr();
4846
+ }, $i = (e, t) => {
4835
4847
  if (t.key === "Escape") {
4836
- if (!Tn.current) return;
4837
- t.preventDefault(), t.stopPropagation(), Hr();
4848
+ if (!Dn.current) return;
4849
+ t.preventDefault(), t.stopPropagation(), Gr();
4838
4850
  return;
4839
4851
  }
4840
4852
  if (t.key === "Enter") {
4841
- t.preventDefault(), t.stopPropagation(), Gr();
4853
+ t.preventDefault(), t.stopPropagation(), Jr();
4842
4854
  return;
4843
4855
  }
4844
4856
  let n = X?.rows;
4845
4857
  if (!n || !Y) return;
4846
- let r = Tn.current?.draft ?? Y, i = n.findIndex((t) => t.x === r[e === "start" ? "startX" : "endX"]), a = n.findIndex((t) => t.x === r[e === "start" ? "endX" : "startX"]);
4858
+ let r = Dn.current?.draft ?? Y, i = n.findIndex((t) => t.x === r[e === "start" ? "startX" : "endX"]), a = n.findIndex((t) => t.x === r[e === "start" ? "endX" : "startX"]);
4847
4859
  if (i < 0 || a < 0) return;
4848
4860
  let o = Y.startX > Y.endX, s = o ? e === "start" ? a + 1 : 0 : e === "start" ? 0 : a + 1, c = o ? e === "start" ? n.length - 1 : a - 1 : e === "start" ? a - 1 : n.length - 1, l;
4849
4861
  switch (t.key) {
@@ -4869,8 +4881,8 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4869
4881
  break;
4870
4882
  default: return;
4871
4883
  }
4872
- t.preventDefault(), t.stopPropagation(), Tn.current || Ur(e), Wr(e, l);
4873
- }, Zi = b && Z && !Di && !(Gt && Y) ? /* @__PURE__ */ M("label", {
4884
+ t.preventDefault(), t.stopPropagation(), Dn.current || Kr(e), qr(e, l);
4885
+ }, ea = b && Z && !Ai && !(qt && Y) ? /* @__PURE__ */ M("label", {
4874
4886
  className: "lilt-chart__keyboard-input",
4875
4887
  children: [
4876
4888
  /* @__PURE__ */ j("span", {
@@ -4879,52 +4891,52 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4879
4891
  }),
4880
4892
  /* @__PURE__ */ j("input", {
4881
4893
  "aria-label": "Select an observation",
4882
- "aria-valuetext": Ai,
4883
- max: Ci,
4884
- min: Si,
4894
+ "aria-valuetext": Ni,
4895
+ max: Ei,
4896
+ min: Ti,
4885
4897
  onChange: (e) => {
4886
4898
  let t = Number(e.currentTarget.value), n = Z.data.rows[t]?.x;
4887
- J && n !== void 0 ? xn({
4899
+ J && n !== void 0 ? Cn({
4888
4900
  ...J,
4889
4901
  probeX: n
4890
- }) : _r(t, !0, !1, pr.current);
4902
+ }) : Cr(t, !0, !1, hr.current);
4891
4903
  },
4892
- onFocus: () => _r(Ti, ur?.pinned ?? !1),
4904
+ onFocus: () => Cr(Oi, pr?.pinned ?? !1),
4893
4905
  onKeyDown: (e) => {
4894
- if (e.key === "Escape" && (e.preventDefault(), Qr()), (e.key === "ArrowUp" || e.key === "ArrowDown") && ge === "nearest" && q.length > 1 && !J) {
4895
- let t = Sr(Number(e.currentTarget.value));
4906
+ if (e.key === "Escape" && (e.preventDefault(), ti()), (e.key === "ArrowUp" || e.key === "ArrowDown") && ge === "nearest" && q.length > 1 && !J) {
4907
+ let t = Rr(Number(e.currentTarget.value));
4896
4908
  if (t.length > 1) {
4897
4909
  e.preventDefault();
4898
- let n = t.findIndex((e) => e.id === hn), r = e.key === "ArrowUp" ? -1 : 1, i = Math.min(t.length - 1, Math.max(0, (n < 0 ? 0 : n) + r));
4899
- ln(t[i].id);
4910
+ let n = t.findIndex((e) => e.id === _n), r = e.key === "ArrowUp" ? -1 : 1, i = Math.min(t.length - 1, Math.max(0, (n < 0 ? 0 : n) + r));
4911
+ dn(t[i].id);
4900
4912
  return;
4901
4913
  }
4902
4914
  }
4903
- if (e.key === "Enter" && !(Gt && Ei)) {
4904
- e.preventDefault(), _r(Number(e.currentTarget.value), !0, !1, e.altKey);
4915
+ if (e.key === "Enter" && !(qt && ki)) {
4916
+ e.preventDefault(), Cr(Number(e.currentTarget.value), !0, !1, e.altKey);
4905
4917
  return;
4906
4918
  }
4907
- if (Gt && Ei && e.key === "Enter") {
4919
+ if (qt && ki && e.key === "Enter") {
4908
4920
  e.preventDefault();
4909
4921
  let t = Z.data.rows[Number(e.currentTarget.value)]?.x;
4910
4922
  if (t === void 0) return;
4911
4923
  if (J) {
4912
- t !== J.baselineX && (bn.current = !0, qr(J.baselineX, t, !0));
4924
+ t !== J.baselineX && (Sn.current = !0, Xr(J.baselineX, t, !0));
4913
4925
  return;
4914
4926
  }
4915
- Jr(t);
4927
+ Zr(t);
4916
4928
  }
4917
4929
  },
4918
4930
  type: "range",
4919
- value: J ? Math.max(Si, Z.data.rows.findIndex((e) => e.x === J.probeX)) : Ti
4931
+ value: J ? Math.max(Ti, Z.data.rows.findIndex((e) => e.x === J.probeX)) : Oi
4920
4932
  }),
4921
- /* @__PURE__ */ j("small", { children: J ? "Arrow keys choose the second point. Enter compares. Escape keeps the pin." : `Left and Right inspect.${ge === "nearest" && q.length > 1 ? " Up and Down switch series." : ""} ${Gt ? "Enter marks a range. " : ""}Escape clears.` })
4933
+ /* @__PURE__ */ j("small", { children: J ? "Arrow keys choose the second point. Enter compares. Escape keeps the pin." : `Left and Right inspect.${ge === "nearest" && q.length > 1 ? " Up and Down switch series." : ""} ${qt ? "Enter marks a range. " : ""}Escape clears.` })
4922
4934
  ]
4923
- }) : null, Qi = Kt && !le && An && rr && Ut.overview !== !1 && zr ? {
4924
- range: An,
4925
- series: zr,
4926
- snapshot: rr
4927
- } : null, $i = (Gi?.phase === "complete" ? Z?.data.rows.find((e) => e.x === Gi.endX) : void 0) ?? (wi ? Z?.data.rows.find((e) => e.sourceIndex === wi.sourceIndex) : xi), ea = D(() => (yi ?? []).map((e) => ({
4935
+ }) : null, ta = Jt && !le && Mn && ur && Gt.overview !== !1 && Hr ? {
4936
+ range: Mn,
4937
+ series: Hr,
4938
+ snapshot: ur
4939
+ } : null, na = (Ji?.phase === "complete" ? Z?.data.rows.find((e) => e.x === Ji.endX) : void 0) ?? (Di ? Z?.data.rows.find((e) => e.sourceIndex === Di.sourceIndex) : wi), ra = D(() => (Si ?? []).map((e) => ({
4928
4940
  id: e.categoryId ?? String(e.x),
4929
4941
  x: e.x,
4930
4942
  row: e.datum,
@@ -4937,10 +4949,10 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4937
4949
  })),
4938
4950
  statuses: e.statuses
4939
4951
  })), [
4940
- yi,
4952
+ Si,
4941
4953
  i,
4942
4954
  Z
4943
- ]), ta = {
4955
+ ]), ia = {
4944
4956
  series: i.map((e, t) => {
4945
4957
  let n = !!c.stack?.series.includes(e.id), r = c.bars?.includes(e.id) ? "bar" : n || !c.bars && e.area ? "area" : "line";
4946
4958
  return {
@@ -4950,144 +4962,144 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
4950
4962
  kind: r,
4951
4963
  treatment: r === "area" ? e.area?.treatment ?? (n ? "solid" : "fade") : r === "bar" ? e.bar?.treatment ?? "solid" : "solid",
4952
4964
  dasharray: e.line?.dasharray,
4953
- visible: Zt.includes(e.id),
4954
- value: $i?.values[e.id] ?? null,
4965
+ visible: $t.includes(e.id),
4966
+ value: na?.values[e.id] ?? null,
4955
4967
  formattedValue: (() => {
4956
- let t = $i?.values[e.id];
4968
+ let t = na?.values[e.id];
4957
4969
  return t == null ? "No data" : e.formatValue?.(t) ?? Z?.formatValue(t) ?? String(t);
4958
4970
  })(),
4959
- status: $i?.statuses[e.id] ?? "observed"
4971
+ status: na?.statuses[e.id] ?? "observed"
4960
4972
  };
4961
4973
  }),
4962
4974
  reducedMotion: W,
4963
- comparison: Gi,
4964
- observations: ea,
4965
- inspectedX: wi?.x ?? null,
4966
- pinnedX: wi?.pinned ? wi.x : null,
4975
+ comparison: Ji,
4976
+ observations: ra,
4977
+ inspectedX: Di?.x ?? null,
4978
+ pinnedX: Di?.pinned ? Di.x : null,
4967
4979
  onInspect: (e, t) => {
4968
4980
  let n = Z?.data.rows.findIndex((t) => t.x === e) ?? -1;
4969
- n >= 0 && _r(n, t);
4981
+ n >= 0 && Cr(n, t);
4970
4982
  },
4971
4983
  onClearInspect: () => {
4972
- Q.current?.pinned || hr();
4984
+ Q.current?.pinned || _r();
4973
4985
  },
4974
- onReleaseInspect: hr,
4986
+ onReleaseInspect: _r,
4975
4987
  onFocus: (e) => {
4976
- fn(e), e && !Q.current?.pinned && !Q.current && xi && Z && _r(Ir(Z, xi.sourceIndex), !1), !e && !Q.current?.pinned && hr();
4988
+ mn(e), e && !Q.current?.pinned && !Q.current && wi && Z && Cr(Lr(Z, wi.sourceIndex), !1), !e && !Q.current?.pinned && _r();
4977
4989
  },
4978
- onVisibleChange: ri,
4979
- isolatedId: Qt?.id ?? null,
4980
- onIsolate: ii,
4981
- onRestore: ai,
4982
- onShowAll: oi
4990
+ onVisibleChange: oi,
4991
+ isolatedId: en?.id ?? null,
4992
+ onIsolate: si,
4993
+ onRestore: ci,
4994
+ onShowAll: li
4983
4995
  };
4984
4996
  return E(() => {
4985
4997
  if (!z || !Z || !z.getAcceptedFrame()) return;
4986
- let e = wi && Z ? Z.data.rows.find((e) => e.sourceIndex === wi.sourceIndex && e.x === wi.x) : void 0;
4998
+ let e = Di && Z ? Z.data.rows.find((e) => e.sourceIndex === Di.sourceIndex && e.x === Di.x) : void 0;
4987
4999
  Xe(z, {
4988
- inspection: e && Z ? Hn(Z, e, q, wi.pinned, q.length > 1 ? hn ?? null : null) : null,
4989
- comparison: Gi,
4990
- visibleSeries: Zt,
4991
- legend: ta.series
5000
+ inspection: e && Z ? Hn(Z, e, q, Di.pinned, q.length > 1 ? _n ?? null : null) : null,
5001
+ comparison: Ji,
5002
+ visibleSeries: $t,
5003
+ legend: ia.series
4992
5004
  }, {
4993
5005
  inspect: (e) => {
4994
5006
  let t = Z?.data.rows.findIndex((t) => t.x === e) ?? -1;
4995
5007
  if (t >= 0) {
4996
- mr.current = !0;
5008
+ gr.current = !0;
4997
5009
  try {
4998
- _r(t, !1);
5010
+ Cr(t, !1);
4999
5011
  } finally {
5000
- mr.current = !1;
5012
+ gr.current = !1;
5001
5013
  }
5002
5014
  }
5003
5015
  },
5004
5016
  clearInspection: () => {
5005
5017
  if (!Q.current?.pinned) {
5006
- mr.current = !0;
5018
+ gr.current = !0;
5007
5019
  try {
5008
- hr();
5020
+ _r();
5009
5021
  } finally {
5010
- mr.current = !1;
5022
+ gr.current = !1;
5011
5023
  }
5012
5024
  }
5013
5025
  },
5014
5026
  pin: (e, t) => {
5015
5027
  let n = Z?.data.rows.findIndex((t) => t.x === e) ?? -1;
5016
5028
  if (n >= 0) {
5017
- mr.current = !0;
5029
+ gr.current = !0;
5018
5030
  try {
5019
- _r(n, !0, !1, !!t?.local);
5031
+ Cr(n, !0, !1, !!t?.local);
5020
5032
  } finally {
5021
- mr.current = !1;
5033
+ gr.current = !1;
5022
5034
  }
5023
5035
  }
5024
5036
  },
5025
5037
  release: () => {
5026
- mr.current = !0;
5038
+ gr.current = !0;
5027
5039
  try {
5028
- hr();
5040
+ _r();
5029
5041
  } finally {
5030
- mr.current = !1;
5042
+ gr.current = !1;
5031
5043
  }
5032
5044
  },
5033
- setVisibleSeries: ri,
5034
- focusSeries: ta.onFocus,
5045
+ setVisibleSeries: oi,
5046
+ focusSeries: ia.onFocus,
5035
5047
  compare: (e) => {
5036
- mr.current = !0;
5048
+ gr.current = !0;
5037
5049
  try {
5038
- Vr(e);
5050
+ Wr(e);
5039
5051
  } finally {
5040
- mr.current = !1;
5052
+ gr.current = !1;
5041
5053
  }
5042
5054
  },
5043
5055
  clearComparison: () => {
5044
- mr.current = !0;
5056
+ gr.current = !0;
5045
5057
  try {
5046
- Gi?.clear?.();
5058
+ Ji?.clear?.();
5047
5059
  } finally {
5048
- mr.current = !1;
5060
+ gr.current = !1;
5049
5061
  }
5050
5062
  },
5051
- focusComparison: Gi?.focus ?? (() => void 0),
5052
- fullRange: Gi?.fullRange ?? (() => void 0)
5063
+ focusComparison: Ji?.focus ?? (() => void 0),
5064
+ fullRange: Ji?.fullRange ?? (() => void 0)
5053
5065
  });
5054
5066
  }), w(() => () => {
5055
5067
  z && Ze(z);
5056
5068
  }, [z]), E(() => {
5057
5069
  fe.publish({
5058
- comparison: Gi,
5059
- toolbar: b && Gt && Ei && Z && !Di ? {
5060
- label: Br ? "Clear comparison" : J || gn !== null ? "Cancel comparison" : q.length > 1 ? "Compare range" : `Compare ${Ei.label}`,
5061
- pressed: !!(J || gn !== null),
5070
+ comparison: Ji,
5071
+ toolbar: b && qt && ki && Z && !Ai ? {
5072
+ label: Ur ? "Clear comparison" : J || vn !== null ? "Cancel comparison" : q.length > 1 ? "Compare range" : `Compare ${ki.label}`,
5073
+ pressed: !!(J || vn !== null),
5062
5074
  onClick: () => {
5063
- if (Br) {
5064
- Zr();
5075
+ if (Ur) {
5076
+ ei();
5065
5077
  return;
5066
5078
  }
5067
- if (J || gn !== null) {
5068
- Qr();
5079
+ if (J || vn !== null) {
5080
+ ti();
5069
5081
  return;
5070
5082
  }
5071
- let e = Q.current ? Z.data.rows.findIndex((e) => e.x === Q.current.x) : Si, t = Z.data.rows[Math.max(Si, e)];
5072
- t && (_r(Math.max(Si, e), !0), xn({
5083
+ let e = Q.current ? Z.data.rows.findIndex((e) => e.x === Q.current.x) : Ti, t = Z.data.rows[Math.max(Ti, e)];
5084
+ t && (Cr(Math.max(Ti, e), !0), Cn({
5073
5085
  baselineX: t.x,
5074
5086
  probeX: t.x
5075
5087
  }), requestAnimationFrame(() => V.current?.querySelector("input[type=\"range\"]")?.focus()));
5076
5088
  }
5077
5089
  } : null,
5078
- readout: Ge || Mi || Pi ? null : Ai,
5079
- overview: Qi ? {
5080
- ...Qi,
5081
- snapshot: Qi.snapshot
5090
+ readout: Ge || Fi || Li ? null : Ni,
5091
+ overview: ta ? {
5092
+ ...ta,
5093
+ snapshot: ta.snapshot
5082
5094
  } : null,
5083
- brush: le && rr && rr.data.rows.length > 1 && q[0] ? {
5084
- snapshot: rr,
5085
- range: An,
5095
+ brush: le && ur && ur.data.rows.length > 1 && q[0] ? {
5096
+ snapshot: ur,
5097
+ range: Mn,
5086
5098
  seriesId: q[0].id,
5087
5099
  reducedMotion: W,
5088
- onFocus: Xr
5100
+ onFocus: $r
5089
5101
  } : null,
5090
- legend: ta
5102
+ legend: ia
5091
5103
  });
5092
5104
  }), /* @__PURE__ */ j(rt.Provider, {
5093
5105
  value: je,
@@ -5097,18 +5109,18 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
5097
5109
  "data-lilt-axis-x": Te.x,
5098
5110
  "data-lilt-axis-y": Te.y,
5099
5111
  "data-lilt-pill": Ce,
5100
- className: si,
5101
- "data-lilt-focused": An ? "true" : void 0,
5102
- "data-lilt-inspecting": b && ur ? "true" : "false",
5103
- "data-lilt-live": qt ? jn ? "following" : "paused" : void 0,
5112
+ className: ui,
5113
+ "data-lilt-focused": Mn ? "true" : void 0,
5114
+ "data-lilt-inspecting": b && pr ? "true" : "false",
5115
+ "data-lilt-live": Yt ? In ? "following" : "paused" : void 0,
5104
5116
  "data-lilt-phase": bt,
5105
5117
  "data-lilt-bars": c.bars ? "true" : void 0,
5106
5118
  "data-lilt-stack": c.stack?.mode,
5107
5119
  "data-lilt-compact": d || void 0,
5108
- "data-lilt-adaptive": Ge || Mi ? "true" : void 0,
5120
+ "data-lilt-adaptive": Ge || Fi ? "true" : void 0,
5109
5121
  "data-lilt-fill": He ? "true" : void 0,
5110
5122
  ref: V,
5111
- style: ci,
5123
+ style: di,
5112
5124
  tabIndex: -1,
5113
5125
  children: [
5114
5126
  /* @__PURE__ */ M("svg", {
@@ -5117,14 +5129,14 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
5117
5129
  height: U.height,
5118
5130
  tabIndex: b && d ? 0 : void 0,
5119
5131
  onFocus: () => {
5120
- d && !Q.current && _r(Ci, !1);
5132
+ d && !Q.current && Cr(Ei, !1);
5121
5133
  },
5122
5134
  onBlur: () => {
5123
- d && hr();
5135
+ d && _r();
5124
5136
  },
5125
5137
  onKeyDown: (e) => {
5126
5138
  if (e.key === "Escape") {
5127
- e.preventDefault(), Qr();
5139
+ e.preventDefault(), ti();
5128
5140
  return;
5129
5141
  }
5130
5142
  if (!d || ![
@@ -5134,41 +5146,41 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
5134
5146
  "End"
5135
5147
  ].includes(e.key)) return;
5136
5148
  e.preventDefault();
5137
- let t = Q.current && Z ? Ir(Z, Q.current.sourceIndex) : Ci, n = e.key === "Home" ? Si : e.key === "End" ? Ci : Math.min(Ci, Math.max(Si, t + (e.key === "ArrowRight" ? 1 : -1)));
5138
- _r(n, !1);
5149
+ let t = Q.current && Z ? Lr(Z, Q.current.sourceIndex) : Ei, n = e.key === "Home" ? Ti : e.key === "End" ? Ei : Math.min(Ei, Math.max(Ti, t + (e.key === "ArrowRight" ? 1 : -1)));
5150
+ Cr(n, !1);
5139
5151
  },
5140
5152
  onClick: (e) => {
5141
5153
  if (!b) return;
5142
- if (Nt.current) {
5143
- Nt.current = !1;
5154
+ if (Ft.current) {
5155
+ Ft.current = !1;
5144
5156
  return;
5145
5157
  }
5146
- let t = vr(e.nativeEvent);
5158
+ let t = Dr(e.nativeEvent);
5147
5159
  if (t === null) return;
5148
5160
  let n = Z?.data.rows[t]?.x;
5149
5161
  if (J && n !== void 0) {
5150
- n !== J.baselineX && qr(J.baselineX, n, !0);
5162
+ n !== J.baselineX && Xr(J.baselineX, n, !0);
5151
5163
  return;
5152
5164
  }
5153
- if (Gt && Y && !An && Kt && n !== void 0 && n >= Math.min(Y.startX, Y.endX) && n <= Math.max(Y.startX, Y.endX)) {
5154
- Xr(Y);
5165
+ if (qt && Y && !Mn && Jt && n !== void 0 && n >= Math.min(Y.startX, Y.endX) && n <= Math.max(Y.startX, Y.endX)) {
5166
+ $r(Y);
5155
5167
  return;
5156
5168
  }
5157
- if (Gt && Y) return;
5158
- let r = e.altKey || pr.current;
5159
- Q.current?.pinned && Q.current.sourceIndex === Z?.data.rows[t]?.sourceIndex && (!e.altKey || pr.current) ? hr() : _r(t, !0, !1, r);
5169
+ if (qt && Y) return;
5170
+ let r = e.altKey || hr.current;
5171
+ Q.current?.pinned && Q.current.sourceIndex === Z?.data.rows[t]?.sourceIndex && (!e.altKey || hr.current) ? _r() : Cr(t, !0, !1, r);
5160
5172
  },
5161
5173
  onPointerCancel: () => {
5162
- jt.current = null, Mt.current = null, yn(null), At.current = null;
5174
+ Nt.current = null, Pt.current = null, xn(null), Mt.current = null;
5163
5175
  },
5164
5176
  onPointerEnter: qe,
5165
5177
  onPointerDown: (e) => {
5166
5178
  if (!J) {
5167
- if (Gt && Ei && e.button === 0) {
5168
- let t = vr(e.nativeEvent), n = t === null ? void 0 : Z?.data.rows[t]?.x;
5179
+ if (qt && ki && e.button === 0) {
5180
+ let t = Dr(e.nativeEvent), n = t === null ? void 0 : Z?.data.rows[t]?.x;
5169
5181
  if (t !== null && n !== void 0) {
5170
- let r = e.target.closest("[data-series]")?.getAttribute("data-series"), i = q.some((e) => e.id === r) ? r : Ei.id;
5171
- Mt.current = {
5182
+ let r = e.target.closest("[data-series]")?.getAttribute("data-series"), i = q.some((e) => e.id === r) ? r : ki.id;
5183
+ Pt.current = {
5172
5184
  startX: n,
5173
5185
  startIndex: t,
5174
5186
  series: i,
@@ -5179,54 +5191,54 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
5179
5191
  }
5180
5192
  return;
5181
5193
  }
5182
- e.pointerType === "touch" && (jt.current = {
5194
+ e.pointerType === "touch" && (Nt.current = {
5183
5195
  x: e.clientX,
5184
5196
  moved: !1
5185
5197
  });
5186
5198
  }
5187
5199
  },
5188
5200
  onPointerLeave: () => {
5189
- Q.current?.pinned || hr();
5201
+ Q.current?.pinned || _r();
5190
5202
  },
5191
5203
  onPointerMove: (e) => {
5192
5204
  if (J) {
5193
- e.pointerType !== "touch" && Kr(e.nativeEvent);
5205
+ e.pointerType !== "touch" && Yr(e.nativeEvent);
5194
5206
  return;
5195
5207
  }
5196
- if (Mt.current?.pointerId === e.pointerId) {
5197
- let t = Mt.current;
5198
- !t.moved && Math.abs(e.clientX - t.clientX) > (e.pointerType === "touch" ? 8 : 4) && (t.moved = !0, hr()), t.moved && Kr(e.nativeEvent);
5208
+ if (Pt.current?.pointerId === e.pointerId) {
5209
+ let t = Pt.current;
5210
+ !t.moved && Math.abs(e.clientX - t.clientX) > (e.pointerType === "touch" ? 8 : 4) && (t.moved = !0, _r()), t.moved && Yr(e.nativeEvent);
5199
5211
  return;
5200
5212
  }
5201
- if (!(Gt && Y)) {
5213
+ if (!(qt && Y)) {
5202
5214
  if (e.pointerType === "touch") {
5203
- let t = jt.current;
5215
+ let t = Nt.current;
5204
5216
  if (!t) return;
5205
- !t.moved && Math.abs(e.clientX - t.x) > 8 && (t.moved = !0, e.currentTarget.setPointerCapture?.(e.pointerId)), t.moved && Lr(e.nativeEvent);
5217
+ !t.moved && Math.abs(e.clientX - t.x) > 8 && (t.moved = !0, e.currentTarget.setPointerCapture?.(e.pointerId)), t.moved && Br(e.nativeEvent);
5206
5218
  return;
5207
5219
  }
5208
- Lr(e.nativeEvent);
5220
+ Br(e.nativeEvent);
5209
5221
  }
5210
5222
  },
5211
5223
  onPointerUp: (e) => {
5212
5224
  if (J) {
5213
5225
  if (e.pointerType === "touch") {
5214
- let t = vr(e.nativeEvent), n = t === null ? void 0 : Z?.data.rows[t]?.x;
5215
- n !== void 0 && n !== J.baselineX && qr(J.baselineX, n, !0), Ft();
5226
+ let t = Dr(e.nativeEvent), n = t === null ? void 0 : Z?.data.rows[t]?.x;
5227
+ n !== void 0 && n !== J.baselineX && Xr(J.baselineX, n, !0), Lt();
5216
5228
  }
5217
5229
  return;
5218
5230
  }
5219
- if (Mt.current?.pointerId === e.pointerId) {
5220
- let t = Mt.current;
5221
- if (Mt.current = null, e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), t.moved) {
5222
- let n = vr(e.nativeEvent, !0), r = n === null ? void 0 : Z?.data.rows[n]?.x;
5223
- r !== void 0 && r !== t.startX ? qr(t.startX, r, !1, t.series) : _r(t.startIndex, !0), yn(null), Ft();
5231
+ if (Pt.current?.pointerId === e.pointerId) {
5232
+ let t = Pt.current;
5233
+ if (Pt.current = null, e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), t.moved) {
5234
+ let n = Dr(e.nativeEvent, !0), r = n === null ? void 0 : Z?.data.rows[n]?.x;
5235
+ r !== void 0 && r !== t.startX ? Xr(t.startX, r, !1, t.series) : Cr(t.startIndex, !0), xn(null), Lt();
5224
5236
  }
5225
5237
  return;
5226
5238
  }
5227
5239
  if (e.pointerType !== "touch") return;
5228
- let t = vr(e.nativeEvent);
5229
- t !== null && (_r(t, !0, !1, pr.current), Ft()), jt.current = null;
5240
+ let t = Dr(e.nativeEvent);
5241
+ t !== null && (Cr(t, !0, !1, hr.current), Lt()), Nt.current = null;
5230
5242
  },
5231
5243
  ref: Le,
5232
5244
  style: { touchAction: "pan-y pinch-zoom" },
@@ -5246,8 +5258,8 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
5246
5258
  /* @__PURE__ */ M("linearGradient", {
5247
5259
  id: `${et}-edge`,
5248
5260
  gradientUnits: "userSpaceOnUse",
5249
- x1: hi.start,
5250
- x2: hi.end,
5261
+ x1: _i.start,
5262
+ x2: _i.end,
5251
5263
  y1: 0,
5252
5264
  y2: 0,
5253
5265
  children: [/* @__PURE__ */ j("stop", {
@@ -5269,7 +5281,7 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
5269
5281
  children: /* @__PURE__ */ j("rect", {
5270
5282
  width: U.width,
5271
5283
  height: U.height,
5272
- fill: mi ? `url(#${et}-edge)` : "white"
5284
+ fill: $ ? `url(#${et}-edge)` : "white"
5273
5285
  })
5274
5286
  }),
5275
5287
  /* @__PURE__ */ M("linearGradient", {
@@ -5309,14 +5321,30 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
5309
5321
  chartId: $e,
5310
5322
  series: i
5311
5323
  })
5312
- ] }), gi && $ && Z ? /* @__PURE__ */ M(ee, { children: [vi($, null, `old-${ht?.id ?? 0}`, 0, 1), vi(Z, Qn, `new-${ht?.id ?? 0}`, 1, 0)] }) : Z ? /* @__PURE__ */ j("g", { children: vi(Z, Qn ?? zn, "current") }) : null]
5324
+ ] }), yi && vi && Z ? /* @__PURE__ */ M(ee, { children: [xi(vi, null, `old-${ht?.id ?? 0}`, 0, 1), xi(Z, er, `new-${ht?.id ?? 0}`, 1, 0)] }) : Z ? /* @__PURE__ */ j("g", { children: xi(Z, er ?? Vn, "current") }) : null]
5313
5325
  }),
5314
- Zi,
5315
- St || fi === "handoff" ? /* @__PURE__ */ j(P.div, {
5316
- animate: { opacity: fi === "handoff" ? 0 : 1 },
5326
+ ea,
5327
+ St ? /* @__PURE__ */ j(P.div, {
5328
+ animate: Tt ? {
5329
+ opacity: 0,
5330
+ filter: "blur(6px)",
5331
+ scale: .985
5332
+ } : {
5333
+ opacity: 1,
5334
+ filter: "blur(0px)",
5335
+ scale: 1
5336
+ },
5317
5337
  className: "lilt-chart__skeleton-host",
5318
- initial: { opacity: 1 },
5319
- transition: { duration: W ? 0 : fi === "handoff" ? .24 : 0 },
5338
+ initial: !1,
5339
+ transition: {
5340
+ duration: br / 1e3,
5341
+ ease: [
5342
+ .4,
5343
+ 0,
5344
+ 1,
5345
+ 1
5346
+ ]
5347
+ },
5320
5348
  children: /* @__PURE__ */ j(Nn, {
5321
5349
  bottom: Je.bottom,
5322
5350
  height: U.height,
@@ -5343,17 +5371,17 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
5343
5371
  edge: xe && !c.bars ? 0 : 8
5344
5372
  })
5345
5373
  }) : null,
5346
- Z && ur && !Ni && !J && !Br ? /* @__PURE__ */ j(tr, {
5374
+ Z && pr && !Ii && !J && !Ur ? /* @__PURE__ */ j(tr, {
5347
5375
  paintId: nt,
5348
5376
  seriesColors: Object.fromEntries(i.map((e, t) => [e.id, Fe(e, t)])),
5349
5377
  crossGradientId: at,
5350
5378
  height: U.height,
5351
5379
  highlightMaskId: it,
5352
- inspectionSeries: hn,
5380
+ inspectionSeries: _n,
5353
5381
  stackedPill: ge === "total" ? "total" : _e,
5354
5382
  reducedMotion: W,
5355
- selection: ur,
5356
- onCompareFromHere: ur?.pinned && Gt && !J ? Ki : void 0,
5383
+ selection: pr,
5384
+ onCompareFromHere: pr?.pinned && qt && !J ? Yi : void 0,
5357
5385
  series: q,
5358
5386
  marks: l,
5359
5387
  snapshot: Z,
@@ -5362,61 +5390,61 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
5362
5390
  inlineOnly: !0,
5363
5391
  hideAxisBadges: Ke || he === !1,
5364
5392
  panel: !!f && !d,
5365
- peer: Mi && !ji
5393
+ peer: Fi && !Pi
5366
5394
  }) : null,
5367
- /* @__PURE__ */ j(te, { children: Z && wi?.pinned && !d && (!Mi || ji) && !J && !Br ? /* @__PURE__ */ j(or, {
5368
- left: Z.xToPixel(wi.x) - 12,
5395
+ /* @__PURE__ */ j(te, { children: Z && Di?.pinned && !d && (!Fi || Pi) && !J && !Ur ? /* @__PURE__ */ j(or, {
5396
+ left: Z.xToPixel(Di.x) - 12,
5369
5397
  top: Math.max(0, Z.plot.top - 24 - 4),
5370
5398
  reducedMotion: W,
5371
- ghost: ji,
5372
- from: ji ? zt.inspection?.from : void 0,
5373
- local: !ji && pr.current,
5374
- onRelease: hr
5399
+ ghost: Pi,
5400
+ from: Pi ? Ut.inspection?.from : void 0,
5401
+ local: !Pi && hr.current,
5402
+ onRelease: _r
5375
5403
  }, "pin") : null }),
5376
- Z && Pi ? /* @__PURE__ */ j(nr, {
5377
- comparison: Pi,
5378
- rows: Ri,
5379
- preview: !(!Ni || Cn),
5404
+ Z && Li ? /* @__PURE__ */ j(rr, {
5405
+ comparison: Li,
5406
+ rows: Vi,
5407
+ preview: !(!Ii || Tn),
5380
5408
  reducedMotion: W,
5381
5409
  snapshot: Z,
5382
- onEndpointPointerDown: qi,
5383
- onEndpointPointerMove: Ji,
5384
- onEndpointPointerUp: Yi,
5385
- onEndpointCancel: Hr,
5386
- onEndpointCommit: Gr,
5387
- onEndpointKeyDown: Xi
5410
+ onEndpointPointerDown: Xi,
5411
+ onEndpointPointerMove: Zi,
5412
+ onEndpointPointerUp: Qi,
5413
+ onEndpointCancel: Gr,
5414
+ onEndpointCommit: Jr,
5415
+ onEndpointKeyDown: $i
5388
5416
  }) : null,
5389
- f ? /* @__PURE__ */ j(ir, {
5417
+ f ? /* @__PURE__ */ j(ar, {
5390
5418
  value: {
5391
- inspection: Z && wi && !Pi ? (() => {
5392
- let e = Z.data.rows.find((e) => e.sourceIndex === wi.sourceIndex && e.x === wi.x);
5393
- return e ? Hn(Z, e, q, wi.pinned, q.length > 1 ? hn ?? null : null) : null;
5419
+ inspection: Z && Di && !Li ? (() => {
5420
+ let e = Z.data.rows.find((e) => e.sourceIndex === Di.sourceIndex && e.x === Di.x);
5421
+ return e ? Hn(Z, e, q, Di.pinned, q.length > 1 ? _n ?? null : null) : null;
5394
5422
  })() : null,
5395
- comparison: Gi,
5423
+ comparison: Ji,
5396
5424
  colors: Object.fromEntries(i.map((e, t) => [e.id, Fe(e, t)])),
5397
- x: Z && wi ? Z.xToPixel(wi.x) : 0,
5398
- compareStartX: Z && Gi ? Z.xToPixel(Gi.startX) : 0,
5399
- compareEndX: Z && Gi ? Z.xToPixel(Gi.endX) : 0,
5425
+ x: Z && Di ? Z.xToPixel(Di.x) : 0,
5426
+ compareStartX: Z && Ji ? Z.xToPixel(Ji.startX) : 0,
5427
+ compareEndX: Z && Ji ? Z.xToPixel(Ji.endX) : 0,
5400
5428
  top: Z?.plot.top ?? 0,
5401
5429
  width: U.width,
5402
5430
  height: U.height,
5403
5431
  reducedMotion: W,
5404
5432
  compact: d,
5405
5433
  narrow: Ge,
5406
- peer: Mi,
5407
- adaptive: Z && !Pi ? {
5434
+ peer: Fi,
5435
+ adaptive: Z && !Li ? {
5408
5436
  snapshot: Z,
5409
5437
  series: q,
5410
- selection: wi,
5411
- sharedX: zt.inspection?.x,
5412
- peer: Mi,
5413
- pinned: !(!ur?.pinned || J),
5438
+ selection: Di,
5439
+ sharedX: Ut.inspection?.x,
5440
+ peer: Fi,
5441
+ pinned: !(!pr?.pinned || J),
5414
5442
  reducedMotion: W,
5415
- onRelease: hr,
5416
- onCompareFromHere: ur?.pinned && Gt && !J ? Ki : void 0
5443
+ onRelease: _r,
5444
+ onCompareFromHere: pr?.pinned && qt && !J ? Yi : void 0
5417
5445
  } : null,
5418
- onRelease: hr,
5419
- onCompareFromHere: ur?.pinned && Gt && !J ? Ki : void 0
5446
+ onRelease: _r,
5447
+ onCompareFromHere: pr?.pinned && qt && !J ? Yi : void 0
5420
5448
  },
5421
5449
  children: f
5422
5450
  }) : null,
@@ -5425,27 +5453,27 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
5425
5453
  role: "status",
5426
5454
  children: "Updating"
5427
5455
  }) : null,
5428
- ui ? /* @__PURE__ */ j(Pn, {
5456
+ pi ? /* @__PURE__ */ j(Pn, {
5429
5457
  kind: "empty",
5430
- message: li ? "No values for this period" : "No data for this period"
5458
+ message: fi ? "No values for this period" : "No data for this period"
5431
5459
  }) : null,
5432
- Di ? /* @__PURE__ */ j(Pn, {
5460
+ Ai ? /* @__PURE__ */ j(Pn, {
5433
5461
  kind: "empty",
5434
5462
  message: "No series selected"
5435
5463
  }) : null,
5436
- di ? /* @__PURE__ */ j(Pn, {
5464
+ mi ? /* @__PURE__ */ j(Pn, {
5437
5465
  kind: K ? "refresh-error" : "error",
5438
- message: di,
5466
+ message: mi,
5439
5467
  retry: C
5440
5468
  }) : null,
5441
- qt && !jn ? /* @__PURE__ */ M("button", {
5469
+ Yt && !In ? /* @__PURE__ */ M("button", {
5442
5470
  className: "lilt-chart__live-control",
5443
- onClick: $r,
5471
+ onClick: ni,
5444
5472
  type: "button",
5445
- children: [ti > 0 ? `${ti} new ${ti === 1 ? "point" : "points"} · ` : "", Wt.returnLabel ?? "Return to live"]
5446
- }) : qt && ei !== void 0 ? /* @__PURE__ */ j("span", {
5473
+ children: [ii > 0 ? `${ii} new ${ii === 1 ? "point" : "points"} · ` : "", Kt.returnLabel ?? "Return to live"]
5474
+ }) : Yt && ri !== void 0 ? /* @__PURE__ */ j("span", {
5447
5475
  className: "lilt-chart__live-badge",
5448
- children: Wt.label ?? "Live"
5476
+ children: Kt.label ?? "Live"
5449
5477
  }) : null
5450
5478
  ]
5451
5479
  })
@@ -5453,7 +5481,7 @@ function Lr({ data: e, x: n, y: r = br, series: i, height: a = 340, compactHeigh
5453
5481
  }
5454
5482
  //#endregion
5455
5483
  //#region src/primitives/hover-band.tsx
5456
- function Rr() {
5484
+ function zr() {
5457
5485
  let e = `lilt-band-${T().replaceAll(":", "")}`, { snapshot: t } = Ut(), n = it(), r = t.data.rows, i = r.length > 1 ? Math.abs(t.xToPixel(r[1].x) - t.xToPixel(r[0].x)) : t.plot.width, a = Math.min(i, Math.max(t.columnWidth + 8, i * .86)), o = I(n.columnX, (e) => e - a / 2);
5458
5486
  if (!t.bars && !t.columns.length) return null;
5459
5487
  let { top: s, height: c } = t.plot;
@@ -5496,13 +5524,13 @@ function Rr() {
5496
5524
  }
5497
5525
  //#endregion
5498
5526
  //#region src/primitives/plot-background.tsx
5499
- var zr = {
5527
+ var Br = {
5500
5528
  dots: 12,
5501
5529
  grid: 16,
5502
5530
  lines: 20
5503
- }, Br = 110;
5504
- function Vr({ kind: e, spotlight: t = !0 }) {
5505
- let n = `lilt-bg-${T().replaceAll(":", "")}`, { snapshot: r, revealProgress: i, transitionDuration: a, reducedMotion: o } = Ut(), s = it(), { left: c, top: l, width: u, height: d } = r.plot, f = zr[e], p = i < 1 && !o ? en(i * a, 0, 320) : 1, m = (t) => /* @__PURE__ */ j("g", {
5531
+ }, Vr = 110;
5532
+ function Hr({ kind: e, spotlight: t = !0 }) {
5533
+ let n = `lilt-bg-${T().replaceAll(":", "")}`, { snapshot: r, revealProgress: i, transitionDuration: a, reducedMotion: o } = Ut(), s = it(), { left: c, top: l, width: u, height: d } = r.plot, f = Br[e], p = i < 1 && !o ? tn(i * a, 0, 320) : 1, m = (t) => /* @__PURE__ */ j("g", {
5506
5534
  className: `lilt-chart__texture-${t}`,
5507
5535
  children: e === "dots" ? /* @__PURE__ */ j("circle", {
5508
5536
  cx: f / 2,
@@ -5576,8 +5604,8 @@ function Vr({ kind: e, spotlight: t = !0 }) {
5576
5604
  children: /* @__PURE__ */ j(P.ellipse, {
5577
5605
  cx: s.pointerX,
5578
5606
  cy: s.y,
5579
- rx: Br,
5580
- ry: Br,
5607
+ rx: Vr,
5608
+ ry: Vr,
5581
5609
  fill: `url(#${n}-spot-fade)`
5582
5610
  })
5583
5611
  })] }) : null
@@ -5606,7 +5634,7 @@ function Vr({ kind: e, spotlight: t = !0 }) {
5606
5634
  }
5607
5635
  //#endregion
5608
5636
  //#region src/interaction/comparison-tooltip.tsx
5609
- function Hr({ comparison: e, renderContent: t, startX: n, endX: r, top: i, width: a, height: o, className: s, ariaLabel: c }) {
5637
+ function Ur({ comparison: e, renderContent: t, startX: n, endX: r, top: i, width: a, height: o, className: s, ariaLabel: c }) {
5610
5638
  let l = O(null), [u, d] = k(null);
5611
5639
  E(() => {
5612
5640
  let e = l.current;
@@ -5644,7 +5672,7 @@ function Hr({ comparison: e, renderContent: t, startX: n, endX: r, top: i, width
5644
5672
  }
5645
5673
  //#endregion
5646
5674
  //#region src/interaction/adaptive-readout.tsx
5647
- function Ur({ snapshot: e, series: t, selection: n, sharedX: r, peer: i, pinned: a, onRelease: o, onCompareFromHere: s, renderContent: c, reducedMotion: l }) {
5675
+ function Wr({ snapshot: e, series: t, selection: n, sharedX: r, peer: i, pinned: a, onRelease: o, onCompareFromHere: s, renderContent: c, reducedMotion: l }) {
5648
5676
  let u = n ? e.data.rows.find((e) => e.x === n.x) : null, d = e.data.rows.at(-1), f = r === void 0 ? u ?? d : u, p = r ?? f?.x, m = p === void 0 ? "No observation" : e.formatX(p), h = r !== void 0 && f && f.x !== r, g = e.stack?.series ?? [], _ = g.length > 0, v = t.filter((e) => g.includes(e.id)).map((e) => f?.values[e.id] ?? null), y = _ && v.length > 0 && v.every((e) => e !== null) ? v.reduce((e, t) => e + (t ?? 0), 0) : null, b = l ? 0 : 150;
5649
5677
  return /* @__PURE__ */ M("div", {
5650
5678
  className: "lilt-chart__adaptive-readout",
@@ -5710,14 +5738,14 @@ function Ur({ snapshot: e, series: t, selection: n, sharedX: r, peer: i, pinned:
5710
5738
  }
5711
5739
  //#endregion
5712
5740
  //#region src/interaction/tooltip.tsx
5713
- function Wr(e = {}) {
5714
- let t = ar(), n = Te(), r = O(null), [i, a] = k(0);
5741
+ function Gr(e = {}) {
5742
+ let t = Z(), n = Te(), r = O(null), [i, a] = k(0);
5715
5743
  if (E(() => {
5716
5744
  let e = r.current;
5717
5745
  e && e.offsetWidth !== i && a(e.offsetWidth);
5718
5746
  }), e.model && e.model !== n.model) throw Error("Lilt Tooltip model must be the model supplied to its Chart.");
5719
5747
  if (e.floating === !1) return null;
5720
- if (t.comparison) return e.renderComparison ? /* @__PURE__ */ j(Hr, {
5748
+ if (t.comparison) return e.renderComparison ? /* @__PURE__ */ j(Ur, {
5721
5749
  comparison: t.comparison,
5722
5750
  renderContent: e.renderComparison,
5723
5751
  startX: t.compareStartX,
@@ -5728,7 +5756,7 @@ function Wr(e = {}) {
5728
5756
  className: e.className,
5729
5757
  ariaLabel: e["aria-label"]
5730
5758
  }) : null;
5731
- if (e.adaptive !== !1 && !t.compact && (t.narrow || t.peer)) return t.adaptive ? /* @__PURE__ */ j(Ur, {
5759
+ if (e.adaptive !== !1 && !t.compact && (t.narrow || t.peer)) return t.adaptive ? /* @__PURE__ */ j(Wr, {
5732
5760
  ...t.adaptive,
5733
5761
  renderContent: e.renderContent
5734
5762
  }) : null;
@@ -5906,11 +5934,11 @@ function Wr(e = {}) {
5906
5934
  }
5907
5935
  //#endregion
5908
5936
  //#region src/marks/contract.ts
5909
- var Gr = /* @__PURE__ */ new WeakMap();
5910
- function Kr(e, t) {
5911
- return Gr.set(e, t), e;
5937
+ var Kr = /* @__PURE__ */ new WeakMap();
5938
+ function qr(e, t) {
5939
+ return Kr.set(e, t), e;
5912
5940
  }
5913
- function qr(e) {
5941
+ function Jr(e) {
5914
5942
  let t = [], n = (e) => {
5915
5943
  v.forEach(e, (e) => {
5916
5944
  if (!x(e)) return;
@@ -5919,7 +5947,7 @@ function qr(e) {
5919
5947
  n(r.children);
5920
5948
  return;
5921
5949
  }
5922
- let i = typeof e.type == "function" ? Gr.get(e.type) : void 0;
5950
+ let i = typeof e.type == "function" ? Kr.get(e.type) : void 0;
5923
5951
  i && t.push({
5924
5952
  series: i.series(r),
5925
5953
  layout: i.layout,
@@ -5931,7 +5959,7 @@ function qr(e) {
5931
5959
  };
5932
5960
  return n(e), t;
5933
5961
  }
5934
- function Jr(e, t, n, r) {
5962
+ function Yr(e, t, n, r) {
5935
5963
  let i = t.findIndex((e) => e.id === n), a = t[i];
5936
5964
  if (!a) throw Error(`Lilt ${e} references unknown series "${n}".`);
5937
5965
  let o = r.filter((e) => !a.fields?.[e]);
@@ -5941,7 +5969,7 @@ function Jr(e, t, n, r) {
5941
5969
  index: i
5942
5970
  };
5943
5971
  }
5944
- function Yr(e, t, n) {
5972
+ function Xr(e, t, n) {
5945
5973
  let r = e.fields[t], i = [];
5946
5974
  for (let e of n) {
5947
5975
  let t = r?.[e];
@@ -5950,27 +5978,27 @@ function Yr(e, t, n) {
5950
5978
  }
5951
5979
  return i;
5952
5980
  }
5953
- function Xr(e, t, n) {
5981
+ function Zr(e, t, n) {
5954
5982
  return e.colorAt?.(t.datum) ?? n;
5955
5983
  }
5956
5984
  //#endregion
5957
5985
  //#region src/chart-plot.tsx
5958
- function Zr(e, t) {
5986
+ function Qr(e, t) {
5959
5987
  if (!Number.isFinite(t) || t <= 0) throw Error(`Lilt ${e} must be a positive finite number; received ${t}.`);
5960
5988
  }
5961
- function Qr({ model: e, children: t, height: n = 340, compactHeight: r, margins: i, bars: a, stack: o, compact: s = !1, tooltip: c, inspectionSeries: l, className: u, style: d, axis: f, pill: p, pillSeries: m, pillValue: h, pillPosition: g, background: _ = "none", spotlight: v = !0, axisInset: y, runoff: b, labelOverhang: S, slots: C = !1, decimate: w }) {
5962
- n !== "fill" && Zr("ChartPlot height", n), r !== void 0 && Zr("ChartPlot compactHeight", r);
5989
+ function $r({ model: e, children: t, height: n = 340, compactHeight: r, margins: i, bars: a, stack: o, compact: s = !1, tooltip: c, inspectionSeries: l, className: u, style: d, axis: f, pill: p, pillSeries: m, pillValue: h, pillPosition: g, background: _ = "none", spotlight: v = !0, axisInset: y, runoff: b, labelOverhang: S, slots: C = !1, decimate: w }) {
5990
+ n !== "fill" && Qr("ChartPlot height", n), r !== void 0 && Qr("ChartPlot compactHeight", r);
5963
5991
  let T = a === !0 ? {} : a;
5964
5992
  if (T) {
5965
- T.width !== void 0 && Zr("ChartPlot bars.width", T.width);
5993
+ T.width !== void 0 && Qr("ChartPlot bars.width", T.width);
5966
5994
  for (let [e, t] of [["gap", T.gap], ["segmentGap", T.segmentGap]]) if (t !== void 0 && (!Number.isFinite(t) || t < 0)) throw Error(`Lilt ChartPlot bars.${e} must be a non-negative finite number; received ${t}.`);
5967
5995
  }
5968
- let E = Te(), O = D(() => qr(t), [t]);
5996
+ let E = Te(), O = D(() => Jr(t), [t]);
5969
5997
  if (e && e !== E.model) throw Error("Lilt ChartPlot model must be the model supplied to its Chart.");
5970
- let k = ei(E.props.series.map((e) => e.id), T, o, O, C);
5998
+ let k = ti(E.props.series.map((e) => e.id), T, o, O, C);
5971
5999
  if (E.props.x.type === "category" && (E.linked || E.props.compare || E.props.focus || E.props.live || E.props.brush)) throw Error("Category plots support inspection and visibility; time-range comparison, focus, live, brush and linked controllers require numeric or time x.");
5972
- let A = c === !1 || c === void 0 ? null : x(c) ? c : /* @__PURE__ */ j(Wr, { ...c });
5973
- return /* @__PURE__ */ M(Lr, {
6000
+ let A = c === !1 || c === void 0 ? null : x(c) ? c : /* @__PURE__ */ j(Gr, { ...c });
6001
+ return /* @__PURE__ */ M(Rr, {
5974
6002
  ...E.props,
5975
6003
  className: u,
5976
6004
  compactHeight: r,
@@ -5997,22 +6025,22 @@ function Qr({ model: e, children: t, height: n = 340, compactHeight: r, margins:
5997
6025
  labelOverhang: S,
5998
6026
  decimate: w,
5999
6027
  children: [
6000
- _ === "none" ? null : /* @__PURE__ */ j(Vr, {
6028
+ _ === "none" ? null : /* @__PURE__ */ j(Hr, {
6001
6029
  kind: _,
6002
6030
  spotlight: v
6003
6031
  }),
6004
- v ? /* @__PURE__ */ j(Rr, {}) : null,
6032
+ v ? /* @__PURE__ */ j(zr, {}) : null,
6005
6033
  t
6006
6034
  ]
6007
6035
  });
6008
6036
  }
6009
- function $r(e, t, n) {
6037
+ function ei(e, t, n) {
6010
6038
  if (new Set(t).size !== t.length || t.some((e) => !n.includes(e))) throw Error(`Lilt ChartPlot ${e} must list unique IDs from the chart series.`);
6011
6039
  }
6012
- function ei(e, t, n, r, i) {
6040
+ function ti(e, t, n, r, i) {
6013
6041
  let a = n === void 0 ? void 0 : n === !0 ? {} : typeof n == "string" ? { mode: n } : n;
6014
- if (a?.series && ($r("stack.series", a.series, e), !a.series.length)) throw Error("Lilt ChartPlot stack.series must not be empty.");
6015
- t?.series && $r("bars.series", t.series, e);
6042
+ if (a?.series && (ei("stack.series", a.series, e), !a.series.length)) throw Error("Lilt ChartPlot stack.series must not be empty.");
6043
+ t?.series && ei("bars.series", t.series, e);
6016
6044
  let o = a ? e.filter((e) => !a.series || a.series.includes(e)) : null;
6017
6045
  if (o && t?.series && (t.series.length !== o.length || t.series.some((e) => !o.includes(e)))) throw Error("Lilt ChartPlot stacked bars draw exactly the stacked series; other series draw as lines.");
6018
6046
  let s = t ? o ?? e.filter((e) => !t.series || t.series.includes(e)) : null, c = [...new Set(r.filter((e) => e.layout === "column").map((e) => e.series))];
@@ -6033,8 +6061,8 @@ function ei(e, t, n, r, i) {
6033
6061
  }
6034
6062
  //#endregion
6035
6063
  //#region src/primitives/runoff.tsx
6036
- var ti = .32;
6037
- function ni(e, t) {
6064
+ var ni = .32;
6065
+ function ri(e, t) {
6038
6066
  let { plot: n } = e, r = e.xToPixel(e.xDomain[0]), i = e.xToPixel(e.xDomain[1]), a = t.segments[0]?.points[0], o = t.segments.at(-1)?.points.at(-1), s = a && r - n.left > .5 && Math.abs(a.x - r) < .5, c = o && n.right - i > .5 && Math.abs(o.x - i) < .5;
6039
6067
  return !s && !c ? null : {
6040
6068
  left: s ? n.left : void 0,
@@ -6043,13 +6071,13 @@ function ni(e, t) {
6043
6071
  dataEnd: i
6044
6072
  };
6045
6073
  }
6046
- function ri(e, t, n) {
6074
+ function ii(e, t, n) {
6047
6075
  return e ? {
6048
6076
  left: t === 0 ? e.left : void 0,
6049
6077
  right: t === n - 1 ? e.right : void 0
6050
6078
  } : {};
6051
6079
  }
6052
- function ii(e, t, n, r) {
6080
+ function ai(e, t, n, r) {
6053
6081
  let i = e.get(t);
6054
6082
  if (i && i.left === n.left && i.right === n.right) return i.path;
6055
6083
  let a = r(t, n);
@@ -6059,28 +6087,28 @@ function ii(e, t, n, r) {
6059
6087
  path: a
6060
6088
  }), a;
6061
6089
  }
6062
- var ai = /* @__PURE__ */ new WeakMap(), oi = /* @__PURE__ */ new WeakMap();
6063
- function si(e, t) {
6064
- return ii(ai, e, t, ci);
6090
+ var oi = /* @__PURE__ */ new WeakMap(), si = /* @__PURE__ */ new WeakMap();
6091
+ function ci(e, t) {
6092
+ return ai(oi, e, t, li);
6065
6093
  }
6066
- function ci(e, { left: t, right: n }) {
6094
+ function li(e, { left: t, right: n }) {
6067
6095
  let r = e.points[0], i = e.points.at(-1), a = e.path;
6068
6096
  return t !== void 0 && (a = `M${t},${r.y} L${a.slice(1)}`), n !== void 0 && (a = `${a} L${n},${i.y}`), a;
6069
6097
  }
6070
- var li = /(-?[\d.e+-]+),(-?[\d.e+-]+)\s*Z\s*$/, ui = /^\s*L(-?[\d.e+-]+),(-?[\d.e+-]+)/;
6071
- function di(e, t) {
6072
- return ii(oi, e, t, fi);
6098
+ var ui = /(-?[\d.e+-]+),(-?[\d.e+-]+)\s*Z\s*$/, di = /^\s*L(-?[\d.e+-]+),(-?[\d.e+-]+)/;
6099
+ function fi(e, t) {
6100
+ return ai(si, e, t, pi);
6073
6101
  }
6074
- function fi(e, { left: t, right: n }) {
6102
+ function pi(e, { left: t, right: n }) {
6075
6103
  if (t === void 0 && n === void 0 || !e.areaPath.startsWith(e.path)) return e.areaPath;
6076
- let r = e.areaPath.slice(e.path.length), i = ui.exec(r), a = li.exec(r);
6104
+ let r = e.areaPath.slice(e.path.length), i = di.exec(r), a = ui.exec(r);
6077
6105
  if (!i || !a) return e.areaPath;
6078
6106
  let o = e.points[0], s = e.points.at(-1), c = e.path;
6079
6107
  t !== void 0 && (c = `M${t},${o.y} L${c.slice(1)}`), n !== void 0 && (c = `${c} L${n},${s.y} L${n},${i[2]}`);
6080
6108
  let l = t === void 0 ? r : r.replace(/Z\s*$/, `L${t},${a[2]} Z`);
6081
6109
  return `${c} ${l.trim()}`;
6082
6110
  }
6083
- function pi(e, t, n) {
6111
+ function mi(e, t, n) {
6084
6112
  let { plot: r } = t;
6085
6113
  return [
6086
6114
  e,
@@ -6090,7 +6118,7 @@ function pi(e, t, n) {
6090
6118
  n.dataEnd
6091
6119
  ].map((e) => typeof e == "number" ? Math.round(e * 10) : e).join("-");
6092
6120
  }
6093
- function mi({ id: e, snapshot: t, edges: n }) {
6121
+ function hi({ id: e, snapshot: t, edges: n }) {
6094
6122
  let { plot: r } = t, i = Math.max(1, r.right - r.left), a = (e) => Math.min(1, Math.max(0, (e - r.left) / i));
6095
6123
  return /* @__PURE__ */ M("defs", { children: [/* @__PURE__ */ M("linearGradient", {
6096
6124
  id: `${e}-ramp`,
@@ -6103,7 +6131,7 @@ function mi({ id: e, snapshot: t, edges: n }) {
6103
6131
  /* @__PURE__ */ j("stop", {
6104
6132
  offset: 0,
6105
6133
  stopColor: "white",
6106
- stopOpacity: n.left === void 0 ? 1 : ti
6134
+ stopOpacity: n.left === void 0 ? 1 : ni
6107
6135
  }),
6108
6136
  /* @__PURE__ */ j("stop", {
6109
6137
  offset: a(n.dataStart),
@@ -6116,7 +6144,7 @@ function mi({ id: e, snapshot: t, edges: n }) {
6116
6144
  /* @__PURE__ */ j("stop", {
6117
6145
  offset: 1,
6118
6146
  stopColor: "white",
6119
- stopOpacity: n.right === void 0 ? 1 : ti
6147
+ stopOpacity: n.right === void 0 ? 1 : ni
6120
6148
  })
6121
6149
  ]
6122
6150
  }), /* @__PURE__ */ j("mask", {
@@ -6133,17 +6161,17 @@ function mi({ id: e, snapshot: t, edges: n }) {
6133
6161
  }
6134
6162
  //#endregion
6135
6163
  //#region src/primitives/area.tsx
6136
- function hi({ series: e, className: t, model: n }) {
6164
+ function gi({ series: e, className: t, model: n }) {
6137
6165
  let r = Te(), { runoff: i } = it();
6138
6166
  if (n && n !== r.model) throw Error("Lilt Area model must be the model supplied to its Chart.");
6139
- let { snapshot: a, series: o, reducedMotion: s, inspecting: c, paintId: l, focusedSeries: u, visibleSeries: d, revealProgress: f, transitionDuration: p, clipId: m } = Ut(), h = en(f < 1 ? f * p : Infinity, 40, p * .65), g = (a.drawGeometry ?? a.geometry)?.series[e];
6167
+ let { snapshot: a, series: o, reducedMotion: s, inspecting: c, paintId: l, focusedSeries: u, visibleSeries: d, revealProgress: f, transitionDuration: p, clipId: m } = Ut(), h = tn(f < 1 ? f * p : Infinity, 40, p * .65), g = (a.drawGeometry ?? a.geometry)?.series[e];
6140
6168
  if (!o.some((t) => t.id === e)) throw Error(`Lilt Area references unknown series "${e}".`);
6141
6169
  let _ = !!a.stack?.series.includes(e), v = _ ? a.stackWeights?.[e] ?? +!!d.includes(e) : +!!d.includes(e), y = o.findIndex((t) => t.id === e), b = o[y], x = Fe(b, y), S = b.area, C = S?.treatment ?? (_ ? "solid" : "fade"), w = u && u !== e ? _ ? "var(--lilt-stacked-focus-muted-opacity, 0.3)" : "var(--lilt-area-focus-muted-opacity, 0.12)" : c ? "var(--lilt-inspection-muted-opacity, 0.24)" : "1";
6142
6170
  if (!g) return /* @__PURE__ */ j("g", {
6143
6171
  className: t,
6144
6172
  "data-series": e
6145
6173
  });
6146
- let T = i && !a.stack?.signed ? ni(a, g) : null, E = T ? pi(`${m}-runoff-area-${y}`, a, T) : "", D = T ? /* @__PURE__ */ j(mi, {
6174
+ let T = i && !a.stack?.signed ? ri(a, g) : null, E = T ? mi(`${m}-runoff-area-${y}`, a, T) : "", D = T ? /* @__PURE__ */ j(hi, {
6147
6175
  id: E,
6148
6176
  snapshot: a,
6149
6177
  edges: T
@@ -6167,7 +6195,7 @@ function hi({ series: e, className: t, model: n }) {
6167
6195
  children: g.segments.map((t, n) => {
6168
6196
  let r = t.status === "provisional" ? "hatch" : t.status === "forecast" ? "dots" : C, i = Le(x, S?.fill, r, l(e, r === "solid" ? "fade" : r));
6169
6197
  return /* @__PURE__ */ j("path", {
6170
- d: T ? di(t, ri(T, n, g.segments.length)) : t.areaPath,
6198
+ d: T ? fi(t, ii(T, n, g.segments.length)) : t.areaPath,
6171
6199
  "data-lilt-status": t.status && t.status !== "observed" ? t.status : void 0,
6172
6200
  fill: i,
6173
6201
  mask: S?.fade ? `url(#${l(e, "fade")}-mask)` : void 0,
@@ -6184,12 +6212,12 @@ function hi({ series: e, className: t, model: n }) {
6184
6212
  function $(e) {
6185
6213
  return Math.round(e * 100) / 100;
6186
6214
  }
6187
- function gi(e, t, n) {
6215
+ function _i(e, t, n) {
6188
6216
  return e.fields[t]?.[n] ?? null;
6189
6217
  }
6190
- function _i(e, t, n, r) {
6218
+ function vi(e, t, n, r) {
6191
6219
  for (let i of t) {
6192
- let t = r.map((e) => typeof e == "string" ? gi(i, n, e) : i.values[n] ?? null);
6220
+ let t = r.map((e) => typeof e == "string" ? _i(i, n, e) : i.values[n] ?? null);
6193
6221
  if (!t.some((e) => e === null)) {
6194
6222
  for (let a = 1; a < t.length; a += 1) if (t[a] < t[a - 1]) {
6195
6223
  let t = r.map((e) => typeof e == "string" ? e : "value").join(" ≤ ");
@@ -6198,7 +6226,7 @@ function _i(e, t, n, r) {
6198
6226
  }
6199
6227
  }
6200
6228
  }
6201
- function vi(e, t, n, r, i) {
6229
+ function yi(e, t, n, r, i) {
6202
6230
  let a = [], o = [], s = () => {
6203
6231
  if (o.length >= 2) {
6204
6232
  let e = o.map((e) => `${$(e.x)},${$(i.y(e.upper))}`), t = o.map((e) => `${$(e.x)},${$(i.y(e.lower))}`).reverse();
@@ -6207,7 +6235,7 @@ function vi(e, t, n, r, i) {
6207
6235
  o = [];
6208
6236
  };
6209
6237
  for (let a of e) {
6210
- let e = gi(a, t, n), c = gi(a, t, r);
6238
+ let e = _i(a, t, n), c = _i(a, t, r);
6211
6239
  a.x < i.xDomain[0] || a.x > i.xDomain[1] || e === null || c === null ? s() : o.push({
6212
6240
  x: i.x(a.x),
6213
6241
  lower: e,
@@ -6216,14 +6244,14 @@ function vi(e, t, n, r, i) {
6216
6244
  }
6217
6245
  return s(), a;
6218
6246
  }
6219
- function yi(e, t, n, r, i) {
6247
+ function bi(e, t, n, r, i) {
6220
6248
  let a = Math.max(0, Math.min(i, n / 2, r / 2));
6221
6249
  return a === 0 ? `M${$(e)},${$(t)}h${$(n)}v${$(r)}h${$(-n)}Z` : `M${$(e + a)},${$(t)}h${$(n - 2 * a)}a${a},${a} 0 0 1 ${a},${a}v${$(r - 2 * a)}a${a},${a} 0 0 1 ${-a},${a}h${$(-(n - 2 * a))}a${a},${a} 0 0 1 ${-a},${-a}v${$(-(r - 2 * a))}a${a},${a} 0 0 1 ${a},${-a}Z`;
6222
6250
  }
6223
- function bi(e, t, n) {
6251
+ function xi(e, t, n) {
6224
6252
  return `M${$(e - n)},${$(t)}a${n},${n} 0 1 0 ${n * 2},0a${n},${n} 0 1 0 ${-n * 2},0Z`;
6225
6253
  }
6226
- var xi = class {
6254
+ var Si = class {
6227
6255
  batches = /* @__PURE__ */ new Map();
6228
6256
  add(e, t) {
6229
6257
  let n = this.batches.get(e);
@@ -6235,22 +6263,22 @@ var xi = class {
6235
6263
  d: t.join("")
6236
6264
  }));
6237
6265
  }
6238
- }, Si = class {
6239
- sides = new xi();
6240
- tops = new xi();
6241
- fronts = new xi();
6266
+ }, Ci = class {
6267
+ sides = new Si();
6268
+ tops = new Si();
6269
+ fronts = new Si();
6242
6270
  add(e, t) {
6243
6271
  this.sides.add(e, t.side), t.top && this.tops.add(e, t.top), this.fronts.add(e, t.front);
6244
6272
  }
6245
6273
  };
6246
- function Ci(e) {
6274
+ function wi(e) {
6247
6275
  let t = Math.max(1, e.columnWidth);
6248
6276
  return {
6249
6277
  width: t,
6250
6278
  half: t / 2
6251
6279
  };
6252
6280
  }
6253
- function wi(e, t) {
6281
+ function Ti(e, t) {
6254
6282
  let n = [];
6255
6283
  for (let r of e) r.x < t.xDomain[0] || r.x > t.xDomain[1] || n.push({
6256
6284
  row: r,
@@ -6258,46 +6286,46 @@ function wi(e, t) {
6258
6286
  });
6259
6287
  return n;
6260
6288
  }
6261
- function Ti(e, t, n, r) {
6262
- let { width: i } = Ci(r), a = r.y(Math.max(t, n)), o = Math.max(1, r.y(Math.min(t, n)) - a);
6289
+ function Ei(e, t, n, r) {
6290
+ let { width: i } = wi(r), a = r.y(Math.max(t, n)), o = Math.max(1, r.y(Math.min(t, n)) - a);
6263
6291
  return dn(e, a - (o === 1 ? .5 : 0), i, o);
6264
6292
  }
6265
- function Ei(e, t, n, r) {
6266
- let { width: i, half: a } = Ci(r), o = r.y(Math.max(t, n)), s = r.y(Math.min(t, n)), c = Math.max(1, s - o);
6267
- return yi(e - a, o - (c === 1 ? .5 : 0), i, c, Math.min(4, a));
6293
+ function Di(e, t, n, r) {
6294
+ let { width: i, half: a } = wi(r), o = r.y(Math.max(t, n)), s = r.y(Math.min(t, n)), c = Math.max(1, s - o);
6295
+ return bi(e - a, o - (c === 1 ? .5 : 0), i, c, Math.min(4, a));
6268
6296
  }
6269
- function Di(e) {
6270
- return Math.min(12, Ci(e).width * .5) / 2;
6297
+ function Oi(e) {
6298
+ return Math.min(12, wi(e).width * .5) / 2;
6271
6299
  }
6272
- function Oi(e, t, n, r) {
6300
+ function ki(e, t, n, r) {
6273
6301
  let i = $(e), a = $(n);
6274
6302
  return `M${i},${$(t)}V${a}` + (r >= 1.5 ? `M${$(e - r)},${a}H${$(e + r)}` : "");
6275
6303
  }
6276
- function ki(e, t, n, r) {
6277
- let i = Di(r), a = $(r.y(n)), o = $(r.y(t)), s = i >= 1.5 ? `M${$(e - i)},${a}H${$(e + i)}M${$(e - i)},${o}H${$(e + i)}` : "";
6304
+ function Ai(e, t, n, r) {
6305
+ let i = Oi(r), a = $(r.y(n)), o = $(r.y(t)), s = i >= 1.5 ? `M${$(e - i)},${a}H${$(e + i)}M${$(e - i)},${o}H${$(e + i)}` : "";
6278
6306
  return `M${$(e)},${a}V${o}${s}`;
6279
6307
  }
6280
- function Ai(e, t, n) {
6281
- let { width: r, half: i } = Ci(n), a = Di(n), o = n.y(t.q3), s = n.y(t.q1), c = $(n.y(t.median));
6308
+ function ji(e, t, n) {
6309
+ let { width: r, half: i } = wi(n), a = Oi(n), o = n.y(t.q3), s = n.y(t.q1), c = $(n.y(t.median));
6282
6310
  return {
6283
- box: yi(e - i, o, r, Math.max(1, s - o), Math.min(3, i)),
6311
+ box: bi(e - i, o, r, Math.max(1, s - o), Math.min(3, i)),
6284
6312
  median: `M${$(e - i)},${c}H${$(e + i)}`,
6285
- whiskers: Oi(e, o, n.y(t.max), a) + Oi(e, s, n.y(t.min), a)
6313
+ whiskers: ki(e, o, n.y(t.max), a) + ki(e, s, n.y(t.min), a)
6286
6314
  };
6287
6315
  }
6288
- function ji(e, t, n) {
6289
- let { width: r, half: i } = Ci(n), a = Di(n), o = n.y(t.q3), s = n.y(t.q1), c = un(e - i, o, r, Math.max(1, s - o)), l = c.rise / 2, u = e - i, d = u + c.frontWidth, f = n.y(t.median);
6316
+ function Mi(e, t, n) {
6317
+ let { width: r, half: i } = wi(n), a = Oi(n), o = n.y(t.q3), s = n.y(t.q1), c = un(e - i, o, r, Math.max(1, s - o)), l = c.rise / 2, u = e - i, d = u + c.frontWidth, f = n.y(t.median);
6290
6318
  return {
6291
6319
  faces: c,
6292
6320
  lift: l,
6293
6321
  median: `M${u},${f}H${d}L${d + c.depth},${f - c.rise}`,
6294
- lower: Oi(e, s - l, n.y(t.min) - l, a),
6295
- upper: Oi(e, o - l, n.y(t.max) - l, a)
6322
+ lower: ki(e, s - l, n.y(t.min) - l, a),
6323
+ upper: ki(e, o - l, n.y(t.max) - l, a)
6296
6324
  };
6297
6325
  }
6298
6326
  //#endregion
6299
6327
  //#region src/marks/use-range-mark.ts
6300
- function Mi(e, t) {
6328
+ function Ni(e, t) {
6301
6329
  return {
6302
6330
  x: e.xToPixel,
6303
6331
  y: e.yToPixelFor(t),
@@ -6305,10 +6333,10 @@ function Mi(e, t) {
6305
6333
  columnWidth: e.columnWidth
6306
6334
  };
6307
6335
  }
6308
- function Ni(e, t, n, r) {
6309
- let i = Ut(), { snapshot: a, visibleSeries: o, focusedSeries: s, inspecting: c, revealProgress: l, clipId: u } = i, { descriptor: d, index: f } = Jr(e, i.series, t, n);
6336
+ function Pi(e, t, n, r) {
6337
+ let i = Ut(), { snapshot: a, visibleSeries: o, focusedSeries: s, inspecting: c, revealProgress: l, clipId: u } = i, { descriptor: d, index: f } = Yr(e, i.series, t, n);
6310
6338
  if (a.bars?.includes(t) || a.stack?.series.includes(t)) throw Error(`Lilt ${e} draws its own series; do not also draw "${t}" as bars.`);
6311
- let p = D(() => Mi(a, t), [a, t]), m = o.includes(t) ? s && s !== t ? "var(--lilt-focus-muted-opacity, 0.18)" : c ? r === "column" ? "var(--lilt-bar-inspection-muted-opacity, 0.26)" : .3 : 1 : 0;
6339
+ let p = D(() => Ni(a, t), [a, t]), m = o.includes(t) ? s && s !== t ? "var(--lilt-focus-muted-opacity, 0.18)" : c ? r === "column" ? "var(--lilt-bar-inspection-muted-opacity, 0.26)" : .3 : 1 : 0;
6312
6340
  return {
6313
6341
  descriptor: d,
6314
6342
  color: Fe(d, f),
@@ -6330,10 +6358,10 @@ function Ni(e, t, n, r) {
6330
6358
  }
6331
6359
  //#endregion
6332
6360
  //#region src/primitives/interval-band.tsx
6333
- var Pi = Kr(function({ series: e, lower: t, upper: n, className: r }) {
6334
- let { paintId: i } = Ut(), a = Ni("IntervalBand", e, [t, n], "overlay"), o = a.snapshot.data.rows;
6335
- _i("IntervalBand", o, e, [t, n]);
6336
- let s = vi(o, e, t, n, a.scales), c = Le(a.color, void 0, "fade", i(e, "fade"));
6361
+ var Fi = qr(function({ series: e, lower: t, upper: n, className: r }) {
6362
+ let { paintId: i } = Ut(), a = Pi("IntervalBand", e, [t, n], "overlay"), o = a.snapshot.data.rows;
6363
+ vi("IntervalBand", o, e, [t, n]);
6364
+ let s = yi(o, e, t, n, a.scales), c = Le(a.color, void 0, "fade", i(e, "fade"));
6337
6365
  return /* @__PURE__ */ j("g", {
6338
6366
  "aria-hidden": "true",
6339
6367
  className: ["lilt-chart__interval-band", r].filter(Boolean).join(" "),
@@ -6353,7 +6381,7 @@ var Pi = Kr(function({ series: e, lower: t, upper: n, className: r }) {
6353
6381
  });
6354
6382
  //#endregion
6355
6383
  //#region src/primitives/line.tsx
6356
- function Fi(e, t, n) {
6384
+ function Ii(e, t, n) {
6357
6385
  let r = t + 9, i = n - 5;
6358
6386
  if (i - r < (e.length - 1) * 17) return /* @__PURE__ */ new Map();
6359
6387
  let a = [];
@@ -6364,10 +6392,10 @@ function Fi(e, t, n) {
6364
6392
  }
6365
6393
  return new Map(e.map((e, t) => [e.id, a[t]]));
6366
6394
  }
6367
- function Ii({ series: e, className: t, model: n }) {
6395
+ function Li({ series: e, className: t, model: n }) {
6368
6396
  let r = Te();
6369
6397
  if (n && n !== r.model) throw Error("Lilt Line model must be the model supplied to its Chart.");
6370
- let { runoff: i } = it(), a = O(null), [o, s] = k(!1), { snapshot: c, width: l, series: u, reducedMotion: d, inspecting: f, focusedSeries: p, visibleSeries: m, revealProgress: h, transitionDuration: g, clipId: _ } = Ut(), v = en(h < 1 ? h * g : Infinity, 0, 180), y = u.find((t) => t.id === e);
6398
+ let { runoff: i } = it(), a = O(null), [o, s] = k(!1), { snapshot: c, width: l, series: u, reducedMotion: d, inspecting: f, focusedSeries: p, visibleSeries: m, revealProgress: h, transitionDuration: g, clipId: _ } = Ut(), v = tn(h < 1 ? h * g : Infinity, 0, 180), y = u.find((t) => t.id === e);
6371
6399
  if (!y) throw Error(`Lilt Line references unknown series "${e}".`);
6372
6400
  let b = (c.drawGeometry ?? c.geometry)?.series[e], x = Fe(y, u.indexOf(y)), S = y?.line, C = y.colorAt ? new Map(c.data.rows.map((e) => [Math.round(c.xToPixel(e.x)), y.colorAt(e.datum) ?? x])) : null, w = (e) => C?.get(Math.round(e)) ?? x, T = u.filter((e) => e.line?.directLabel && m.includes(e.id)).map((e, t) => {
6373
6401
  let n = c.geometry?.series[e.id], r = n?.segments.at(-1)?.points.at(-1) ?? n?.isolated.at(-1), i;
@@ -6379,7 +6407,7 @@ function Ii({ series: e, className: t, model: n }) {
6379
6407
  color: Fe(e, u.indexOf(e)),
6380
6408
  index: t
6381
6409
  } : null;
6382
- }).filter((e) => e !== null).sort((e, t) => e.y - t.y), D = Fi(T, c.plot.top, c.plot.bottom), A = T.find((t) => t.id === e)?.text, te = l - c.plot.right - 11, N = !!(S?.directLabel && A && D.has(e) && c.plot.width >= 460 && l - c.plot.right >= 96);
6410
+ }).filter((e) => e !== null).sort((e, t) => e.y - t.y), D = Ii(T, c.plot.top, c.plot.bottom), A = T.find((t) => t.id === e)?.text, te = l - c.plot.right - 11, N = !!(S?.directLabel && A && D.has(e) && c.plot.width >= 460 && l - c.plot.right >= 96);
6383
6411
  E(() => {
6384
6412
  if (!N || !A || !a.current) return;
6385
6413
  let e = a.current, t = !0, n = () => {
@@ -6403,7 +6431,7 @@ function Ii({ series: e, className: t, model: n }) {
6403
6431
  className: t,
6404
6432
  "data-series": e
6405
6433
  });
6406
- let ne = S?.depth && !S.dasharray ? Sn(typeof S.width == "number" ? S.width : 2) : 0, re = i ? ni(c, b) : null, I = re ? pi(`${_}-runoff-line-${u.indexOf(y)}`, c, re) : "", L = re ? /* @__PURE__ */ j(mi, {
6434
+ let ne = S?.depth && !S.dasharray ? J(typeof S.width == "number" ? S.width : 2) : 0, re = i ? ri(c, b) : null, I = re ? mi(`${_}-runoff-line-${u.indexOf(y)}`, c, re) : "", L = re ? /* @__PURE__ */ j(hi, {
6407
6435
  id: I,
6408
6436
  snapshot: c,
6409
6437
  edges: re
@@ -6434,7 +6462,7 @@ function Ii({ series: e, className: t, model: n }) {
6434
6462
  },
6435
6463
  children: [
6436
6464
  L,
6437
- ne ? /* @__PURE__ */ j("defs", { children: /* @__PURE__ */ j(J, {
6465
+ ne ? /* @__PURE__ */ j("defs", { children: /* @__PURE__ */ j(xn, {
6438
6466
  id: `${_}-tube-${u.indexOf(y)}`,
6439
6467
  size: 3,
6440
6468
  region: {
@@ -6448,12 +6476,12 @@ function Ii({ series: e, className: t, model: n }) {
6448
6476
  mask: re ? `url(#${I})` : void 0,
6449
6477
  filter: ne ? `url(#${_}-tube-${u.indexOf(y)})` : void 0,
6450
6478
  children: b.segments.map((t, n) => {
6451
- let r = re ? si(t, ri(re, n, b.segments.length)) : t.path, i = t.status === "provisional" ? "5 4" : t.status === "forecast" ? "2 5" : S?.dasharray;
6479
+ let r = re ? ci(t, ii(re, n, b.segments.length)) : t.path, i = t.status === "provisional" ? "5 4" : t.status === "forecast" ? "2 5" : S?.dasharray;
6452
6480
  return ne ? /* @__PURE__ */ j("g", {
6453
6481
  "data-lilt-path": e,
6454
6482
  "data-lilt-status": t.status && t.status !== "observed" ? t.status : void 0,
6455
6483
  opacity: v,
6456
- children: /* @__PURE__ */ j(xn, {
6484
+ children: /* @__PURE__ */ j(Sn, {
6457
6485
  d: r,
6458
6486
  color: x,
6459
6487
  width: ne,
@@ -6514,7 +6542,7 @@ function Ii({ series: e, className: t, model: n }) {
6514
6542
  }
6515
6543
  //#endregion
6516
6544
  //#region src/primitives/bar.tsx
6517
- function Li({ series: e, className: t, model: n }) {
6545
+ function Ri({ series: e, className: t, model: n }) {
6518
6546
  let r = Te();
6519
6547
  if (n && n !== r.model) throw Error("Lilt Bar model must be the model supplied to its Chart.");
6520
6548
  let { snapshot: i, series: a, visibleSeries: o, inspecting: s, focusedSeries: c, reducedMotion: l, revealProgress: u, transitionDuration: d, clipId: f, paintId: p } = Ut(), m = a.find((t) => t.id === e);
@@ -6562,7 +6590,7 @@ function Li({ series: e, className: t, model: n }) {
6562
6590
  }, `track-${e.valueX}`) : null;
6563
6591
  }) : null,
6564
6592
  h?.map((t, n) => {
6565
- let r = u < 1 ? u * d : Infinity, o = g ? 0 : tn(n, h.length), s = y.get(t.valueX) ?? "observed", c = s === "provisional" ? "hatch" : s === "forecast" ? "dots" : m.bar?.treatment ?? "solid", l = C?.get(t.valueX) ?? b, x = Le(l, void 0, c, p(e, c === "hatch" ? "hatch" : "dots"));
6593
+ let r = u < 1 ? u * d : Infinity, o = g ? 0 : nn(n, h.length), s = y.get(t.valueX) ?? "observed", c = s === "provisional" ? "hatch" : s === "forecast" ? "dots" : m.bar?.treatment ?? "solid", l = C?.get(t.valueX) ?? b, x = Le(l, void 0, c, p(e, c === "hatch" ? "hatch" : "dots"));
6566
6594
  return /* @__PURE__ */ j(Jn, {
6567
6595
  id: `${f}-bar-${a.indexOf(m)}-${n}`,
6568
6596
  bar: t,
@@ -6582,11 +6610,11 @@ function Li({ series: e, className: t, model: n }) {
6582
6610
  radius: m?.bar?.radius,
6583
6611
  roundBothEnds: m.bar?.roundBothEnds,
6584
6612
  segmentGap: i.barLayout.segmentGap,
6585
- progress: en(r, o, d - o),
6613
+ progress: tn(r, o, d - o),
6586
6614
  originY: g ? i.geometry?.baselineY : void 0
6587
6615
  },
6588
6616
  fillOpacity: m?.bar?.fillOpacity ?? 1,
6589
- opacity: en(r, o, 160),
6617
+ opacity: tn(r, o, 160),
6590
6618
  stroke: m?.bar?.stroke,
6591
6619
  strokeWidth: m?.bar?.strokeWidth
6592
6620
  }, t.valueX);
@@ -6596,15 +6624,15 @@ function Li({ series: e, className: t, model: n }) {
6596
6624
  }
6597
6625
  //#endregion
6598
6626
  //#region src/primitives/grid.tsx
6599
- var Ri = [
6627
+ var zi = [
6600
6628
  .22,
6601
6629
  1,
6602
6630
  .36,
6603
6631
  1
6604
6632
  ];
6605
- function zi({ className: e, pattern: t = "lines", color: n, opacity: r = 1, lineWidth: i, dotSpacing: a = 8, dotRadius: o = .6 } = {}) {
6633
+ function Bi({ className: e, pattern: t = "lines", color: n, opacity: r = 1, lineWidth: i, dotSpacing: a = 8, dotRadius: o = .6 } = {}) {
6606
6634
  if (!Number.isFinite(r) || r < 0 || r > 1 || i !== void 0 && (!Number.isFinite(i) || i < 0) || !Number.isFinite(a) || a <= 0 || !Number.isFinite(o) || o < 0 || o > a / 2) throw Error("Lilt Grid requires opacity in [0, 1], non-negative lineWidth, positive dotSpacing, and dotRadius within half the spacing.");
6607
- let s = `lilt-grid-${T().replaceAll(":", "")}`, { snapshot: c, previousSnapshot: l, axis: u, transitionDuration: d, reducedMotion: f, gridGradientId: p, revealProgress: m } = Ut(), h = it().axis.y, g = m < 1, _ = en(g ? m * d : Infinity, 0, 240), v = f ? 0 : d / 1e3, y = new Map((l?.yTicks ?? []).map((e) => [e, l.yToPixel(e)]));
6635
+ let s = `lilt-grid-${T().replaceAll(":", "")}`, { snapshot: c, previousSnapshot: l, axis: u, transitionDuration: d, reducedMotion: f, gridGradientId: p, revealProgress: m } = Ut(), h = it().axis.y, g = m < 1, _ = tn(g ? m * d : Infinity, 0, 240), v = f ? 0 : d / 1e3, y = new Map((l?.yTicks ?? []).map((e) => [e, l.yToPixel(e)]));
6608
6636
  if (t === "dots") return /* @__PURE__ */ M("g", {
6609
6637
  "aria-hidden": "true",
6610
6638
  className: ["lilt-chart__grid-dots", e].filter(Boolean).join(" "),
@@ -6700,7 +6728,7 @@ function zi({ className: e, pattern: t = "lines", color: n, opacity: r = 1, line
6700
6728
  },
6701
6729
  transition: {
6702
6730
  duration: g ? 0 : v,
6703
- ease: Ri
6731
+ ease: zi
6704
6732
  },
6705
6733
  vectorEffect: "non-scaling-stroke",
6706
6734
  x1: c.plot.left,
@@ -6711,16 +6739,16 @@ function zi({ className: e, pattern: t = "lines", color: n, opacity: r = 1, line
6711
6739
  }
6712
6740
  //#endregion
6713
6741
  //#region src/primitives/axis-segments.tsx
6714
- var Bi = 4, Vi = 5;
6715
- function Hi({ from: e, to: t, cross: n, vertical: r, fill: i, cursor: a, active: o }) {
6716
- let s = I([a, o], ([n, r]) => .55 + (Number(n) >= Math.min(e, t) && Number(n) <= Math.max(e, t) ? Number(r) * .45 : 0)), c = Math.min(e, t) + Bi / 2, l = Math.max(0, Math.abs(t - e) - Bi);
6742
+ var Vi = 4, Hi = 5;
6743
+ function Ui({ from: e, to: t, cross: n, vertical: r, fill: i, cursor: a, active: o }) {
6744
+ let s = I([a, o], ([n, r]) => .55 + (Number(n) >= Math.min(e, t) && Number(n) <= Math.max(e, t) ? Number(r) * .45 : 0)), c = Math.min(e, t) + Vi / 2, l = Math.max(0, Math.abs(t - e) - Vi);
6717
6745
  return /* @__PURE__ */ j(P.rect, {
6718
6746
  className: "lilt-chart__axis-segment",
6719
- x: r ? n - Vi / 2 : c,
6720
- y: r ? c : n - Vi / 2,
6721
- width: r ? Vi : l,
6722
- height: r ? l : Vi,
6723
- rx: Vi / 2,
6747
+ x: r ? n - Hi / 2 : c,
6748
+ y: r ? c : n - Hi / 2,
6749
+ width: r ? Hi : l,
6750
+ height: r ? l : Hi,
6751
+ rx: Hi / 2,
6724
6752
  fill: i,
6725
6753
  style: {
6726
6754
  opacity: s,
@@ -6728,7 +6756,7 @@ function Hi({ from: e, to: t, cross: n, vertical: r, fill: i, cursor: a, active:
6728
6756
  }
6729
6757
  });
6730
6758
  }
6731
- function Ui({ stops: e, cross: t, vertical: n, gradient: r, cursor: i, active: a, opacity: o = 1 }) {
6759
+ function Wi({ stops: e, cross: t, vertical: n, gradient: r, cursor: i, active: a, opacity: o = 1 }) {
6732
6760
  let s = `lilt-axis-scale-${T().replace(/:/g, "")}`, c = [...new Set(e.map((e) => Math.round(e * 2) / 2))].sort((e, t) => e - t);
6733
6761
  if (c.length < 2) return null;
6734
6762
  let l = n ? c.at(-1) : c[0], u = n ? c[0] : c.at(-1);
@@ -6752,7 +6780,7 @@ function Ui({ stops: e, cross: t, vertical: n, gradient: r, cursor: i, active: a
6752
6780
  stopOpacity: e.opacity ?? 1
6753
6781
  }
6754
6782
  }, t))
6755
- }) }) : null, c.slice(1).map((e, o) => /* @__PURE__ */ j(Hi, {
6783
+ }) }) : null, c.slice(1).map((e, o) => /* @__PURE__ */ j(Ui, {
6756
6784
  from: c[o],
6757
6785
  to: e,
6758
6786
  cross: t,
@@ -6765,13 +6793,13 @@ function Ui({ stops: e, cross: t, vertical: n, gradient: r, cursor: i, active: a
6765
6793
  }
6766
6794
  //#endregion
6767
6795
  //#region src/primitives/axes.tsx
6768
- var Wi = [
6796
+ var Gi = [
6769
6797
  .22,
6770
6798
  1,
6771
6799
  .36,
6772
6800
  1
6773
- ], Gi = 64, Ki = 26, qi = 160, Ji = 4, Yi = 6;
6774
- function Xi(e) {
6801
+ ], Ki = 64, qi = 26, Ji = 160, Yi = 4, Xi = 6;
6802
+ function Zi(e) {
6775
6803
  let { series: t, visibleSeries: n } = Ut();
6776
6804
  if (!e) return null;
6777
6805
  if (e !== !0) return e.map((e) => ({ color: e }));
@@ -6786,13 +6814,13 @@ function Xi(e) {
6786
6814
  opacity: 1
6787
6815
  }];
6788
6816
  }
6789
- function Zi(e, t, n) {
6817
+ function Qi(e, t, n) {
6790
6818
  return t || n ? { duration: 0 } : {
6791
6819
  duration: Math.max(0, e) / 1e3,
6792
- ease: Wi
6820
+ ease: Gi
6793
6821
  };
6794
6822
  }
6795
- function Qi({ cursor: e, active: t, center: n, reach: r, children: i }) {
6823
+ function $i({ cursor: e, active: t, center: n, reach: r, children: i }) {
6796
6824
  let a = I([e, t], ([e, t]) => at(Number(e) - n, r, Number(t))), o = I(a, (e) => e > .995 ? "none" : `blur(${((1 - e) * 1.2).toFixed(2)}px)`);
6797
6825
  return /* @__PURE__ */ j(P.g, {
6798
6826
  style: {
@@ -6802,7 +6830,7 @@ function Qi({ cursor: e, active: t, center: n, reach: r, children: i }) {
6802
6830
  children: i
6803
6831
  });
6804
6832
  }
6805
- function $i({ x: e, reach: t, children: n }) {
6833
+ function ea({ x: e, reach: t, children: n }) {
6806
6834
  let { pointerX: r, inspecting: i, active: a } = it(), o = I([
6807
6835
  r,
6808
6836
  i,
@@ -6813,15 +6841,15 @@ function $i({ x: e, reach: t, children: n }) {
6813
6841
  children: n
6814
6842
  });
6815
6843
  }
6816
- var ea = {
6844
+ var ta = {
6817
6845
  ticks: 4,
6818
6846
  dots: 7
6819
6847
  };
6820
- function ta({ kind: e, x: t, baseline: n, reach: r, cursor: i, active: a }) {
6848
+ function na({ kind: e, x: t, baseline: n, reach: r, cursor: i, active: a }) {
6821
6849
  let o = I([i, a], ([e, n]) => {
6822
6850
  let i = Math.max(0, 1 - Math.abs(Number(e) - t) / r);
6823
6851
  return Number(n) * i * i * (3 - 2 * i);
6824
- }), s = I(o, (e) => .28 + e * .62), c = n + ea[e], l = I(o, (e) => c + 4 + e * 5), u = I(o, (e) => 1.25 + e * 1.5);
6852
+ }), s = I(o, (e) => .28 + e * .62), c = n + ta[e], l = I(o, (e) => c + 4 + e * 5), u = I(o, (e) => 1.25 + e * 1.5);
6825
6853
  return e === "dots" ? /* @__PURE__ */ j(P.circle, {
6826
6854
  className: "lilt-chart__ruler-dot",
6827
6855
  cx: t,
@@ -6838,8 +6866,8 @@ function ta({ kind: e, x: t, baseline: n, reach: r, cursor: i, active: a }) {
6838
6866
  style: { opacity: s }
6839
6867
  });
6840
6868
  }
6841
- function na({ className: e, edgeInset: t, labels: n } = {}) {
6842
- let { snapshot: r, previousSnapshot: i, axis: a, transitionDuration: o, reducedMotion: s, transitionKind: c, revealProgress: l } = Ut(), u = it(), d = c === "initial" || c === "handoff", f = new Map((i?.xTicks ?? []).map((e) => [e, i.xToPixel(e)])), p = r.data.rows, m = u.axis.x, h = m === "segmented", g = Xi(u.axis.xGradient), _ = m === "minimal" || m === "dots", v = m === "ruler" ? "ticks" : m === "dots" ? "dots" : null, y = (n ?? (_ ? "ends" : "fit")) === "ends" && p.length ? [.../* @__PURE__ */ new Set([p[0].x, p.at(-1).x])] : null, b = y ?? r.xTicks, x = y ? y.map((e) => ({ value: e })) : a.x, S = new Set(b), C = Math.min(Math.max(0, t ?? 0), (r.plot.right - r.plot.left) / 4), w = Math.max(1, Math.ceil(p.length / qi)), T = p.filter((e, t) => t % w === 0), E = T.length > 1 ? (r.plot.right - r.plot.left) / (T.length - 1) : 40, D = p.length > 1 ? Math.abs(r.xToPixel(p[1].x) - r.xToPixel(p[0].x)) / 2 : r.plot.width / 2, O = d && !s ? en(l * o, 0, 320) : 1;
6869
+ function ra({ className: e, edgeInset: t, labels: n } = {}) {
6870
+ let { snapshot: r, previousSnapshot: i, axis: a, transitionDuration: o, reducedMotion: s, transitionKind: c, revealProgress: l } = Ut(), u = it(), d = c === "initial", f = new Map((i?.xTicks ?? []).map((e) => [e, i.xToPixel(e)])), p = r.data.rows, m = u.axis.x, h = m === "segmented", g = Zi(u.axis.xGradient), _ = m === "minimal" || m === "dots", v = m === "ruler" ? "ticks" : m === "dots" ? "dots" : null, y = (n ?? (_ ? "ends" : "fit")) === "ends" && p.length ? [.../* @__PURE__ */ new Set([p[0].x, p.at(-1).x])] : null, b = y ?? r.xTicks, x = y ? y.map((e) => ({ value: e })) : a.x, S = new Set(b), C = Math.min(Math.max(0, t ?? 0), (r.plot.right - r.plot.left) / 4), w = Math.max(1, Math.ceil(p.length / Ji)), T = p.filter((e, t) => t % w === 0), E = T.length > 1 ? (r.plot.right - r.plot.left) / (T.length - 1) : 40, D = p.length > 1 ? Math.abs(r.xToPixel(p[1].x) - r.xToPixel(p[0].x)) / 2 : r.plot.width / 2, O = d && !s ? tn(l * o, 0, 320) : 1;
6843
6871
  return /* @__PURE__ */ M("g", {
6844
6872
  "aria-hidden": "true",
6845
6873
  className: [
@@ -6855,13 +6883,13 @@ function na({ className: e, edgeInset: t, labels: n } = {}) {
6855
6883
  y1: r.plot.bottom,
6856
6884
  y2: r.plot.bottom
6857
6885
  }),
6858
- h ? /* @__PURE__ */ j(Ui, {
6886
+ h ? /* @__PURE__ */ j(Wi, {
6859
6887
  stops: [
6860
6888
  r.plot.left,
6861
6889
  ...b.map((e) => r.xToPixel(e)),
6862
6890
  r.plot.right
6863
6891
  ],
6864
- cross: r.plot.bottom + Yi,
6892
+ cross: r.plot.bottom + Xi,
6865
6893
  vertical: !1,
6866
6894
  gradient: g,
6867
6895
  cursor: u.pointerX,
@@ -6872,7 +6900,7 @@ function na({ className: e, edgeInset: t, labels: n } = {}) {
6872
6900
  className: "lilt-chart__ruler",
6873
6901
  "data-kind": v,
6874
6902
  opacity: O,
6875
- children: T.map((e) => /* @__PURE__ */ j(ta, {
6903
+ children: T.map((e) => /* @__PURE__ */ j(na, {
6876
6904
  kind: v,
6877
6905
  x: r.xToPixel(e.x),
6878
6906
  baseline: r.plot.bottom,
@@ -6882,13 +6910,13 @@ function na({ className: e, edgeInset: t, labels: n } = {}) {
6882
6910
  }, `ruler-${e.x}`))
6883
6911
  }) : null,
6884
6912
  x.map((e, t) => {
6885
- let n = S.has(e.value), i = n ? r.xToPixel(e.value) : f.get(e.value) ?? r.xToPixel(e.value), a = f.get(e.value) ?? i, c = d && !s ? en(l * o, 60 + tn(t, x.length, 100), 320) : 1, p = b.indexOf(e.value), m = p < 0 ? t : p, h = r.formatX(e.value), g = h.length * 3.3, _ = m === 0, v = m === b.length - 1, y = Ji - u.overhang, w = _ && i - g < r.plot.left + y ? "start" : v && i + g > r.plot.right - y ? "end" : "middle", T = w === "start" ? C : w === "end" ? -C : 0, E = i + T + (w === "start" ? g : w === "end" ? -g : 0);
6886
- return /* @__PURE__ */ j(Qi, {
6913
+ let n = S.has(e.value), i = n ? r.xToPixel(e.value) : f.get(e.value) ?? r.xToPixel(e.value), a = f.get(e.value) ?? i, c = d && !s ? tn(l * o, 60 + nn(t, x.length, 100), 320) : 1, p = b.indexOf(e.value), m = p < 0 ? t : p, h = r.formatX(e.value), g = h.length * 3.3, _ = m === 0, v = m === b.length - 1, y = Yi - u.overhang, w = _ && i - g < r.plot.left + y ? "start" : v && i + g > r.plot.right - y ? "end" : "middle", T = w === "start" ? C : w === "end" ? -C : 0, E = i + T + (w === "start" ? g : w === "end" ? -g : 0);
6914
+ return /* @__PURE__ */ j($i, {
6887
6915
  cursor: u.x,
6888
6916
  active: u.active,
6889
6917
  center: E,
6890
- reach: Gi,
6891
- children: /* @__PURE__ */ j($i, {
6918
+ reach: Ki,
6919
+ children: /* @__PURE__ */ j(ea, {
6892
6920
  x: i,
6893
6921
  reach: D,
6894
6922
  children: /* @__PURE__ */ j(P.text, {
@@ -6905,7 +6933,7 @@ function na({ className: e, edgeInset: t, labels: n } = {}) {
6905
6933
  y: r.plot.bottom + 22 + 9
6906
6934
  },
6907
6935
  textAnchor: w,
6908
- transition: Zi(o, s, d),
6936
+ transition: Qi(o, s, d),
6909
6937
  children: h
6910
6938
  })
6911
6939
  })
@@ -6914,8 +6942,8 @@ function na({ className: e, edgeInset: t, labels: n } = {}) {
6914
6942
  ]
6915
6943
  });
6916
6944
  }
6917
- function ra({ className: e, showTicks: t = !0, scale: n = "primary" } = {}) {
6918
- let { snapshot: r, previousSnapshot: i, axis: a, transitionDuration: o, reducedMotion: s, transitionKind: c, revealProgress: l } = Ut(), u = it(), d = c === "initial" || c === "handoff", f = new Map((i?.yTicks ?? []).map((e) => [e, i.yToPixel(e)])), p = new Set(r.yTicks), m = u.axis.y, h = m === "segmented", g = Xi(u.axis.yGradient), _ = !st(m), v = m === "dots", y = h || v ? 16 : 12, b = n === "secondary", x = r.secondary, S = b ? _ ? r.plot.right - u.inset : r.plot.right + y : _ ? r.plot.left + u.inset : r.plot.left - y, C = b === _ ? "end" : "start", w = (e) => b && x ? x.format(e * x.factor) : r.formatY(e), T = _ ? -6 : 4, E = r.yTicks.length ? Math.min(...r.yTicks) : null;
6945
+ function ia({ className: e, showTicks: t = !0, scale: n = "primary" } = {}) {
6946
+ let { snapshot: r, previousSnapshot: i, axis: a, transitionDuration: o, reducedMotion: s, transitionKind: c, revealProgress: l } = Ut(), u = it(), d = c === "initial", f = new Map((i?.yTicks ?? []).map((e) => [e, i.yToPixel(e)])), p = new Set(r.yTicks), m = u.axis.y, h = m === "segmented", g = Zi(u.axis.yGradient), _ = !st(m), v = m === "dots", y = h || v ? 16 : 12, b = n === "secondary", x = r.secondary, S = b ? _ ? r.plot.right - u.inset : r.plot.right + y : _ ? r.plot.left + u.inset : r.plot.left - y, C = b === _ ? "end" : "start", w = (e) => b && x ? x.format(e * x.factor) : r.formatY(e), T = _ ? -6 : 4, E = r.yTicks.length ? Math.min(...r.yTicks) : null;
6919
6947
  return b && !x ? null : /* @__PURE__ */ M("g", {
6920
6948
  "aria-hidden": "true",
6921
6949
  className: [
@@ -6926,21 +6954,21 @@ function ra({ className: e, showTicks: t = !0, scale: n = "primary" } = {}) {
6926
6954
  "data-inline": _ || void 0,
6927
6955
  "data-scale": b ? "secondary" : void 0,
6928
6956
  children: [
6929
- h && !b ? /* @__PURE__ */ j(Ui, {
6957
+ h && !b ? /* @__PURE__ */ j(Wi, {
6930
6958
  stops: [
6931
6959
  r.plot.top,
6932
6960
  ...r.yTicks.map((e) => r.yToPixel(e)),
6933
6961
  r.plot.bottom
6934
6962
  ],
6935
- cross: r.plot.left - Yi,
6963
+ cross: r.plot.left - Xi,
6936
6964
  vertical: !0,
6937
6965
  gradient: g,
6938
6966
  cursor: u.y,
6939
6967
  active: u.active,
6940
- opacity: d && !s ? en(l * o, 0, 320) : 1
6968
+ opacity: d && !s ? tn(l * o, 0, 320) : 1
6941
6969
  }) : null,
6942
6970
  v && !b ? a.y.map((e, t) => {
6943
- let n = p.has(e.value), i = n ? r.yToPixel(e.value) : f.get(e.value) ?? r.yToPixel(e.value), c = d && !s ? en(l * o, tn(t, a.y.length, 80), 320) : 1;
6971
+ let n = p.has(e.value), i = n ? r.yToPixel(e.value) : f.get(e.value) ?? r.yToPixel(e.value), c = d && !s ? tn(l * o, nn(t, a.y.length, 80), 320) : 1;
6944
6972
  return /* @__PURE__ */ M(P.g, {
6945
6973
  className: "lilt-chart__y-leader",
6946
6974
  initial: !1,
@@ -6948,7 +6976,7 @@ function ra({ className: e, showTicks: t = !0, scale: n = "primary" } = {}) {
6948
6976
  opacity: n ? c : 0,
6949
6977
  y: i
6950
6978
  },
6951
- transition: Zi(o, s, d),
6979
+ transition: Qi(o, s, d),
6952
6980
  children: [/* @__PURE__ */ j("circle", {
6953
6981
  className: "lilt-chart__y-leader-node",
6954
6982
  cx: r.plot.left - 7,
@@ -6968,12 +6996,12 @@ function ra({ className: e, showTicks: t = !0, scale: n = "primary" } = {}) {
6968
6996
  }) : null,
6969
6997
  t && m !== "minimal" && a.y.map((e, t) => {
6970
6998
  if (_ && e.value === E) return null;
6971
- let n = p.has(e.value), i = n ? r.yToPixel(e.value) : f.get(e.value) ?? r.yToPixel(e.value), c = f.get(e.value) ?? i + 6, m = d && !s ? en(l * o, tn(t, a.y.length, 80), 280) : 1;
6972
- return /* @__PURE__ */ j(Qi, {
6999
+ let n = p.has(e.value), i = n ? r.yToPixel(e.value) : f.get(e.value) ?? r.yToPixel(e.value), c = f.get(e.value) ?? i + 6, m = d && !s ? tn(l * o, nn(t, a.y.length, 80), 280) : 1;
7000
+ return /* @__PURE__ */ j($i, {
6973
7001
  cursor: u.y,
6974
7002
  active: u.active,
6975
7003
  center: i,
6976
- reach: Ki,
7004
+ reach: qi,
6977
7005
  children: /* @__PURE__ */ j(P.text, {
6978
7006
  animate: {
6979
7007
  opacity: n ? m : 0,
@@ -6988,7 +7016,7 @@ function ra({ className: e, showTicks: t = !0, scale: n = "primary" } = {}) {
6988
7016
  y: c + T + 6
6989
7017
  },
6990
7018
  textAnchor: C,
6991
- transition: Zi(o, s, d),
7019
+ transition: Qi(o, s, d),
6992
7020
  children: w(e.value)
6993
7021
  })
6994
7022
  }, `y-${e.value}`);
@@ -6998,11 +7026,11 @@ function ra({ className: e, showTicks: t = !0, scale: n = "primary" } = {}) {
6998
7026
  }
6999
7027
  //#endregion
7000
7028
  //#region src/interaction/legend-meter.tsx
7001
- function ia(e) {
7029
+ function aa(e) {
7002
7030
  let t = Math.max(0, ...e.map((e) => e !== null && e > 0 ? e : 0));
7003
7031
  return t > 0 ? t : null;
7004
7032
  }
7005
- function aa({ value: e, scale: t }) {
7033
+ function oa({ value: e, scale: t }) {
7006
7034
  let n = e !== null && e > 0 && t ? Math.min(1, e / t) : 0;
7007
7035
  return /* @__PURE__ */ j("span", {
7008
7036
  className: "lilt-chart__legend-meter",
@@ -7012,11 +7040,11 @@ function aa({ value: e, scale: t }) {
7012
7040
  }
7013
7041
  //#endregion
7014
7042
  //#region src/interaction/value-legend.tsx
7015
- var oa = (e) => e === "tiles" ? "cards" : e;
7016
- function sa({ items: e, variant: t = "cards", swatch: n = "square", activeId: r, selectedId: i, onHoverIdChange: a, onSelectedIdChange: o, hiddenIds: s = [], onHiddenIdsChange: c, renderLabel: l, renderValue: u, renderSwatch: d, renderItem: f, "aria-label": p = "Values", className: m, style: h }) {
7043
+ var sa = (e) => e === "tiles" ? "cards" : e;
7044
+ function ca({ items: e, variant: t = "cards", swatch: n = "square", activeId: r, selectedId: i, onHoverIdChange: a, onSelectedIdChange: o, hiddenIds: s = [], onHiddenIdsChange: c, renderLabel: l, renderValue: u, renderSwatch: d, renderItem: f, "aria-label": p = "Values", className: m, style: h }) {
7017
7045
  let g = !!c && e.length > 1, _ = !!(a || o || g), v = new Set(s), y = e.filter((e) => !v.has(e.id)).length, b = (e) => c?.(e), x = (e) => {
7018
7046
  v.has(e) ? b(s.filter((t) => t !== e)) : y > 1 && b([...s, e]);
7019
- }, S = ia(e.filter((e) => !v.has(e.id)).map((e) => e.value)), C = (t) => b(e.map((e) => e.id).filter((e) => e !== t));
7047
+ }, S = aa(e.filter((e) => !v.has(e.id)).map((e) => e.value)), C = (t) => b(e.map((e) => e.id).filter((e) => e !== t));
7020
7048
  return /* @__PURE__ */ j("div", {
7021
7049
  "data-lilt-chart": "",
7022
7050
  role: "group",
@@ -7045,7 +7073,7 @@ function sa({ items: e, variant: t = "cards", swatch: n = "square", activeId: r,
7045
7073
  className: "lilt-chart__legend-value",
7046
7074
  children: u?.(e) ?? e.formattedValue
7047
7075
  }),
7048
- t === "bars" ? /* @__PURE__ */ j(aa, {
7076
+ t === "bars" ? /* @__PURE__ */ j(oa, {
7049
7077
  value: e.value,
7050
7078
  scale: S
7051
7079
  }) : null
@@ -7109,15 +7137,15 @@ function sa({ items: e, variant: t = "cards", swatch: n = "square", activeId: r,
7109
7137
  }
7110
7138
  //#endregion
7111
7139
  //#region src/primitives/annotations.tsx
7112
- function ca(e) {
7140
+ function la(e) {
7113
7141
  return e instanceof Date ? e.getTime() : e;
7114
7142
  }
7115
- function la({ items: e, onSelectionChange: t, className: n }) {
7143
+ function ua({ items: e, onSelectionChange: t, className: n }) {
7116
7144
  let { snapshot: r, reducedMotion: i } = Ut(), [a, o] = k(null), [s, c] = k(null);
7117
7145
  return /* @__PURE__ */ j("g", {
7118
7146
  className: ["lilt-chart__annotations", n].filter(Boolean).join(" "),
7119
7147
  children: e.map((e, n) => {
7120
- let l = ca(e.x);
7148
+ let l = la(e.x);
7121
7149
  if (l < r.xDomain[0] || l > r.xDomain[1]) return null;
7122
7150
  let u = r.xToPixel(l), d = a === e.id || s === e.id;
7123
7151
  return /* @__PURE__ */ M("g", {
@@ -7203,10 +7231,10 @@ function la({ items: e, onSelectionChange: t, className: n }) {
7203
7231
  })
7204
7232
  });
7205
7233
  }
7206
- function ua({ from: e, to: t, label: n, color: r = "var(--lilt-series-1)", axis: i = "x", className: a }) {
7234
+ function da({ from: e, to: t, label: n, color: r = "var(--lilt-series-1)", axis: i = "x", className: a }) {
7207
7235
  let { snapshot: o } = Ut();
7208
7236
  if (i === "y") {
7209
- let i = o.yDomain, s = Math.max(i?.[0] ?? 0, Math.min(ca(e), ca(t))), c = Math.min(i?.[1] ?? 0, Math.max(ca(e), ca(t)));
7237
+ let i = o.yDomain, s = Math.max(i?.[0] ?? 0, Math.min(la(e), la(t))), c = Math.min(i?.[1] ?? 0, Math.max(la(e), la(t)));
7210
7238
  if (!i || s > c) return /* @__PURE__ */ j("g", {});
7211
7239
  let l = o.yToPixel(c), u = o.yToPixel(s);
7212
7240
  return /* @__PURE__ */ M("g", {
@@ -7228,7 +7256,7 @@ function ua({ from: e, to: t, label: n, color: r = "var(--lilt-series-1)", axis:
7228
7256
  }) : null]
7229
7257
  });
7230
7258
  }
7231
- let s = Math.min(ca(e), ca(t)), c = Math.max(ca(e), ca(t)), l = Math.max(o.xDomain[0], s), u = Math.min(o.xDomain[1], c);
7259
+ let s = Math.min(la(e), la(t)), c = Math.max(la(e), la(t)), l = Math.max(o.xDomain[0], s), u = Math.min(o.xDomain[1], c);
7232
7260
  if (l > u) return /* @__PURE__ */ j("g", {});
7233
7261
  let d = s === -Infinity ? o.plot.left : o.xToPixel(l), f = c === Infinity ? o.plot.right : o.xToPixel(u);
7234
7262
  return /* @__PURE__ */ M("g", {
@@ -7251,7 +7279,7 @@ function ua({ from: e, to: t, label: n, color: r = "var(--lilt-series-1)", axis:
7251
7279
  }
7252
7280
  //#endregion
7253
7281
  //#region src/primitives/reference-line.tsx
7254
- function da({ value: e, label: t, color: n = "var(--lilt-muted)", className: r }) {
7282
+ function fa({ value: e, label: t, color: n = "var(--lilt-muted)", className: r }) {
7255
7283
  let { snapshot: i } = Ut(), a = i.yDomain;
7256
7284
  if (!a || !Number.isFinite(e) || e < a[0] || e > a[1]) return null;
7257
7285
  let o = i.yToPixel(e), { left: s, right: c, top: l } = i.plot, u = o - 6 < l + 10 ? o + 14 : o - 6;
@@ -7275,12 +7303,12 @@ function da({ value: e, label: t, color: n = "var(--lilt-muted)", className: r }
7275
7303
  }
7276
7304
  //#endregion
7277
7305
  //#region src/cards/keys.ts
7278
- var fa = new Intl.DateTimeFormat("en-US", {
7306
+ var pa = new Intl.DateTimeFormat("en-US", {
7279
7307
  month: "short",
7280
7308
  day: "numeric",
7281
7309
  timeZone: "UTC"
7282
- }), pa = new Intl.NumberFormat("en-US", { maximumFractionDigits: 2 });
7283
- function ma(e, t, n, r) {
7310
+ }), ma = new Intl.NumberFormat("en-US", { maximumFractionDigits: 2 });
7311
+ function ha(e, t, n, r) {
7284
7312
  let i = (e) => e[t], a = e.length > 0 ? i(e[0]) : void 0, o = n ?? (typeof a == "string" ? "category" : a instanceof Date ? "time" : "number");
7285
7313
  if (o === "category") {
7286
7314
  let t = /* @__PURE__ */ new Map();
@@ -7300,16 +7328,16 @@ function ma(e, t, n, r) {
7300
7328
  let t = i(e);
7301
7329
  return t instanceof Date ? t.getTime() : Number(t);
7302
7330
  },
7303
- format: (e) => r ? r(new Date(e)) : fa.format(e)
7331
+ format: (e) => r ? r(new Date(e)) : pa.format(e)
7304
7332
  } : {
7305
7333
  kind: o,
7306
7334
  position: (e) => Number(i(e)),
7307
- format: (e) => r ? r(e) : pa.format(e)
7335
+ format: (e) => r ? r(e) : ma.format(e)
7308
7336
  };
7309
7337
  }
7310
7338
  //#endregion
7311
7339
  //#region src/cards/format.ts
7312
- function ha(e, t) {
7340
+ function ga(e, t) {
7313
7341
  let n = [];
7314
7342
  for (let r of e) {
7315
7343
  let e = r[t];
@@ -7317,14 +7345,14 @@ function ha(e, t) {
7317
7345
  }
7318
7346
  return n;
7319
7347
  }
7320
- function ga(e, t) {
7348
+ function _a(e, t) {
7321
7349
  if (!e.length) return null;
7322
7350
  if (t === "last") return e.at(-1);
7323
7351
  if (t === "max") return fe(e);
7324
7352
  let n = e.reduce((e, t) => e + t, 0);
7325
7353
  return t === "mean" ? n / e.length : n;
7326
7354
  }
7327
- function _a(e, t) {
7355
+ function va(e, t) {
7328
7356
  let n = new Intl.NumberFormat(e, {
7329
7357
  maximumFractionDigits: Math.max(1, t?.minimumFractionDigits ?? 0),
7330
7358
  minimumFractionDigits: 0,
@@ -7341,8 +7369,8 @@ function _a(e, t) {
7341
7369
  plain: g(i)
7342
7370
  };
7343
7371
  }
7344
- function va({ valueFormat: e, locale: t = "en-US", formatValue: n, formatAxisValue: r }) {
7345
- let i = JSON.stringify(e ?? null), a = D(() => _a(t, e), [t, i]), o = n ?? a.full, s = r ?? a.compact, c = O({
7372
+ function ya({ valueFormat: e, locale: t = "en-US", formatValue: n, formatAxisValue: r }) {
7373
+ let i = JSON.stringify(e ?? null), a = D(() => va(t, e), [t, i]), o = n ?? a.full, s = r ?? a.compact, c = O({
7346
7374
  value: o,
7347
7375
  axis: s
7348
7376
  });
@@ -7359,12 +7387,12 @@ function va({ valueFormat: e, locale: t = "en-US", formatValue: n, formatAxisVal
7359
7387
  key: `${t}|${i}`
7360
7388
  };
7361
7389
  }
7362
- function ya(e) {
7390
+ function ba(e) {
7363
7391
  return (t) => `${t < 0 ? "−" : "+"}${e(Math.abs(t))}`;
7364
7392
  }
7365
7393
  //#endregion
7366
7394
  //#region src/engine/composition.ts
7367
- function ba(e) {
7395
+ function xa(e) {
7368
7396
  if (!e.length) return [];
7369
7397
  if (e.some((e) => typeof e != "number" || !Number.isFinite(e) || e < 0)) return e.map(() => null);
7370
7398
  let t = e, n = t.reduce((e, t) => Math.max(e, t), 0);
@@ -7374,8 +7402,8 @@ function ba(e) {
7374
7402
  }
7375
7403
  //#endregion
7376
7404
  //#region src/watch/normal-layer.tsx
7377
- var xa = "normalLower", Sa = "normalUpper", Ca = oe().x((e) => e.x).y0((e) => e.lower).y1((e) => e.upper).curve(ce);
7378
- function wa({ series: e, flagged: t, part: n }) {
7405
+ var Sa = "normalLower", Ca = "normalUpper", wa = oe().x((e) => e.x).y0((e) => e.lower).y1((e) => e.upper).curve(ce);
7406
+ function Ta({ series: e, flagged: t, part: n }) {
7379
7407
  let { snapshot: r, clipId: i, revealProgress: a, visibleSeries: o } = Ut(), s = r.yToPixelFor(e), [c, l] = r.xDomain, u = o.includes(e), d = r.data.rows;
7380
7408
  if (n === "band") {
7381
7409
  let t = [], n = [];
@@ -7395,7 +7423,7 @@ function wa({ series: e, flagged: t, part: n }) {
7395
7423
  style: { opacity: +!!u },
7396
7424
  children: t.map((e, t) => /* @__PURE__ */ j("path", {
7397
7425
  className: "lilt-chart__normal-band",
7398
- d: Ca(Ta(e)) ?? ""
7426
+ d: wa(Ea(e)) ?? ""
7399
7427
  }, t))
7400
7428
  });
7401
7429
  }
@@ -7453,7 +7481,7 @@ function wa({ series: e, flagged: t, part: n }) {
7453
7481
  ]
7454
7482
  });
7455
7483
  }
7456
- function Ta(e) {
7484
+ function Ea(e) {
7457
7485
  return e.map((t, n) => {
7458
7486
  let r = e.slice(Math.max(0, n - 1), n + 2);
7459
7487
  return {
@@ -7465,18 +7493,18 @@ function Ta(e) {
7465
7493
  }
7466
7494
  //#endregion
7467
7495
  //#region src/cards/cartesian-card.tsx
7468
- function Ea(e) {
7496
+ function Da(e) {
7469
7497
  return e === !0 ? "sum" : e ?? !1;
7470
7498
  }
7471
- var Da = [], Oa = (e) => e.acceptedRevision;
7472
- function ka({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggregate: y = "sum", headlineSeries: b, delta: x, deltaTone: S, range: T, ranges: E, defaultRange: A, tiles: te = !0, legend: N = "tiles", legendSwatch: P, depth: F = !1, height: ne = 240, valueFormat: re, locale: I = "en-US", formatValue: L, formatAxisValue: ie, formatX: ae, xType: oe, compare: se = !1, target: ce, forecast: R, sync: le, axis: ue = "minimal", hover: de = "pills", hoverStyle: fe = "soft", background: z = "dots", spotlight: pe = !0, decimate: me = !0, surface: he = "elevated", badge: ge, numberStyle: _e, palette: ve, bleed: ye = e.kind !== "bar" && e.kind !== "marks", axisInset: be, pillSeries: Se = "nearest", pillValue: Ce = "series", pillPosition: we = "auto", tooltipIndicator: Te = "square", loading: Ee = !1, loadingStyle: De, motion: Oe, className: ke, style: B, panes: Ae, live: je = !1, heading: Me, restCaption: Ne, normal: V, onNormalChange: Pe }) {
7473
- let [Fe, Ie] = k(A ?? E?.[0]?.id), Le = E?.find((e) => e.id === Fe) ?? E?.[0], Re = Le?.data ?? r ?? Da, ze = Le ? Le.delta : x, Be = e.kind === "line" || e.kind === "marks" ? !1 : e.stack, Ve = Be !== !1, H = Be === "percent", He = H ? "last" : y, Ue = ye && e.kind !== "bar" && e.kind !== "marks", We = D(() => {
7499
+ var Oa = [], ka = (e) => e.acceptedRevision;
7500
+ function Aa({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggregate: y = "sum", headlineSeries: b, delta: x, deltaTone: S, range: T, ranges: E, defaultRange: A, tiles: te = !0, legend: N = "tiles", legendSwatch: P, depth: F = !1, height: ne = 240, valueFormat: re, locale: I = "en-US", formatValue: L, formatAxisValue: ie, formatX: ae, xType: oe, compare: se = !1, target: ce, forecast: R, sync: le, axis: ue = "minimal", hover: de = "pills", hoverStyle: fe = "soft", background: z = "dots", spotlight: pe = !0, decimate: me = !0, surface: he = "elevated", badge: ge, numberStyle: _e, palette: ve, bleed: ye = e.kind !== "bar" && e.kind !== "marks", axisInset: be, pillSeries: Se = "nearest", pillValue: Ce = "series", pillPosition: we = "auto", tooltipIndicator: Te = "square", loading: Ee = !1, loadingStyle: De, motion: Oe, className: ke, style: B, panes: Ae, live: je = !1, heading: Me, restCaption: Ne, normal: V, onNormalChange: Pe }) {
7501
+ let [Fe, Ie] = k(A ?? E?.[0]?.id), Le = E?.find((e) => e.id === Fe) ?? E?.[0], Re = Le?.data ?? r ?? Oa, ze = Le ? Le.delta : x, Be = e.kind === "line" || e.kind === "marks" ? !1 : e.stack, Ve = Be !== !1, H = Be === "percent", He = H ? "last" : y, Ue = ye && e.kind !== "bar" && e.kind !== "marks", We = D(() => {
7474
7502
  let e = new Intl.NumberFormat(I, {
7475
7503
  style: "percent",
7476
7504
  maximumFractionDigits: 1
7477
7505
  });
7478
7506
  return (t) => e.format(t / 100);
7479
- }, [I]), Ge = va({
7507
+ }, [I]), Ge = ya({
7480
7508
  valueFormat: re,
7481
7509
  locale: I,
7482
7510
  formatValue: H ? We : L,
@@ -7484,16 +7512,16 @@ function ka({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
7484
7512
  }), Ke = Ge.value, U = Ge.key, qe = JSON.stringify(e), Je = _.map((e) => `${e.key}|${e.label}|${e.color}|${e.dashed}|${e.as}|${e.scale}|${JSON.stringify(e.valueFormat ?? null)}`).join(), W = new Set(_.filter((e) => e.as === "line" || e.dashed).map((e) => e.key)), Ye = D(() => {
7485
7513
  if (!H) return null;
7486
7514
  let e = _.filter((e) => !W.has(e.key));
7487
- return new Map(Re.map((t) => [t, Object.fromEntries(ba(e.map((e) => t[e.key])).map((t, n) => [e[n].key, t]))]));
7515
+ return new Map(Re.map((t) => [t, Object.fromEntries(xa(e.map((e) => t[e.key])).map((t, n) => [e[n].key, t]))]));
7488
7516
  }, [
7489
7517
  H,
7490
7518
  Re,
7491
7519
  Je
7492
- ]), Xe = D(() => new Map(_.flatMap((e) => e.valueFormat ? [[e.key, _a(I, e.valueFormat)]] : [])), [Je, I]), Ze = (e) => Xe.get(e)?.full ?? Ke, G = D(() => ma(Re, g, oe, ae), [
7520
+ ]), Xe = D(() => new Map(_.flatMap((e) => e.valueFormat ? [[e.key, va(I, e.valueFormat)]] : [])), [Je, I]), Ze = (e) => Xe.get(e)?.full ?? Ke, G = D(() => ha(Re, g, oe, ae), [
7493
7521
  Re,
7494
7522
  g,
7495
7523
  oe
7496
- ]), Qe = R?.from instanceof Date ? R.from.getTime() : R?.from, tt = D(() => Qe === void 0 ? null : Na(Re, g, G, Qe), [
7524
+ ]), Qe = R?.from instanceof Date ? R.from.getTime() : R?.from, tt = D(() => Qe === void 0 ? null : Pa(Re, g, G, Qe), [
7497
7525
  Re,
7498
7526
  g,
7499
7527
  G,
@@ -7502,9 +7530,9 @@ function ka({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
7502
7530
  Re,
7503
7531
  tt,
7504
7532
  G
7505
- ]), rt = R?.lower && R.upper && !Ve && e.kind !== "bar" && e.kind !== "marks" ? b ?? _.find((e) => e.as !== "line" && !e.dashed)?.key : void 0, it = V && !Ve && (e.kind === "area" || e.kind === "line") ? V.series ?? b ?? _.find((e) => e.as !== "line" && !e.dashed)?.key : void 0, at = V ? Aa(V) : "", lt = D(() => {
7533
+ ]), rt = R?.lower && R.upper && !Ve && e.kind !== "bar" && e.kind !== "marks" ? b ?? _.find((e) => e.as !== "line" && !e.dashed)?.key : void 0, it = V && !Ve && (e.kind === "area" || e.kind === "line") ? V.series ?? b ?? _.find((e) => e.as !== "line" && !e.dashed)?.key : void 0, at = V ? ja(V) : "", lt = D(() => {
7506
7534
  if (!V || it === void 0) return null;
7507
- let { when: e, history: t = Da, ...n } = V, r = t.length, i = r ? [...t, ...Re] : Re;
7535
+ let { when: e, history: t = Oa, ...n } = V, r = t.length, i = r ? [...t, ...Re] : Re;
7508
7536
  return {
7509
7537
  combined: i,
7510
7538
  all: p({
@@ -7590,19 +7618,19 @@ function ka({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
7590
7618
  ...rt === t.key && R?.lower && R.upper ? {
7591
7619
  lower: {
7592
7620
  label: `${R.label ?? "Forecast"} low`,
7593
- accessor: (e) => Ma(e, R.lower)
7621
+ accessor: (e) => Na(e, R.lower)
7594
7622
  },
7595
7623
  upper: {
7596
7624
  label: `${R.label ?? "Forecast"} high`,
7597
- accessor: (e) => Ma(e, R.upper)
7625
+ accessor: (e) => Na(e, R.upper)
7598
7626
  }
7599
7627
  } : {},
7600
7628
  ...it === t.key && dt ? {
7601
- [xa]: {
7629
+ [Sa]: {
7602
7630
  label: "Normal low",
7603
7631
  accessor: (e) => dt.get(e)?.lower ?? null
7604
7632
  },
7605
- [Sa]: {
7633
+ [Ca]: {
7606
7634
  label: "Normal high",
7607
7635
  accessor: (e) => dt.get(e)?.upper ?? null
7608
7636
  }
@@ -7709,10 +7737,10 @@ function ka({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
7709
7737
  gr(le, Ft.getController(), Re, g, G, {
7710
7738
  label: t,
7711
7739
  release: Ft.actions.release
7712
- }), et(Ft, Oa);
7740
+ }), et(Ft, ka);
7713
7741
  let Lt = new Set(Ft.series.map((e) => e.id)), [Rt, zt] = k(null), [Bt, Vt] = k([]), Ht = new Set(Bt), Ut = D(() => St.map((e, t) => ({
7714
7742
  id: e.id,
7715
- total: Ye ? nt.length && !W.has(e.id) ? Ye.get(nt.at(-1))?.[e.id] ?? null : null : ga(ha(nt, e.id), _[t]?.aggregate ?? He)
7743
+ total: Ye ? nt.length && !W.has(e.id) ? Ye.get(nt.at(-1))?.[e.id] ?? null : null : _a(ga(nt, e.id), _[t]?.aggregate ?? He)
7716
7744
  })), [
7717
7745
  St,
7718
7746
  nt,
@@ -7727,75 +7755,75 @@ function ka({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
7727
7755
  b,
7728
7756
  Ve,
7729
7757
  Bt
7730
- ]), Kt = H ? Ut.some((e) => Wt.has(e.id) && e.total === null) || !nt.length ? null : Ut.reduce((e, t) => e + (Wt.has(t.id) ? t.total ?? 0 : 0), 0) : Le?.headline ?? v ?? (Wt.size === 0 ? null : He === "sum" ? Ut.reduce((e, t) => e + (Wt.has(t.id) ? t.total ?? 0 : 0), 0) : ga(Gt, He) ?? 0), qt = de === "tooltip" || de === "strip", Jt = qt ? null : It, Yt = Jt ? new Map(Jt.series.map((e) => [e.id, e.value])) : null, Xt = et(Ft, (e) => e.comparison), Zt = se === "badge", Qt = !Zt && !It && Xt?.phase === "complete" ? Xt : null, $t = Zt ? Xt : null, q = Qt ? new Map(Qt.series.map((e) => [e.id, e.absoluteChange])) : null, en = (e) => e.series.filter((e) => Wt.has(e.id)).reduce((e, t) => ({
7758
+ ]), Kt = H ? Ut.some((e) => Wt.has(e.id) && e.total === null) || !nt.length ? null : Ut.reduce((e, t) => e + (Wt.has(t.id) ? t.total ?? 0 : 0), 0) : Le?.headline ?? v ?? (Wt.size === 0 ? null : He === "sum" ? Ut.reduce((e, t) => e + (Wt.has(t.id) ? t.total ?? 0 : 0), 0) : _a(Gt, He) ?? 0), qt = de === "tooltip" || de === "strip", Jt = qt ? null : It, Yt = Jt ? new Map(Jt.series.map((e) => [e.id, e.value])) : null, Xt = et(Ft, (e) => e.comparison), Zt = se === "badge", Qt = !Zt && !It && Xt?.phase === "complete" ? Xt : null, $t = Zt ? Xt : null, en = Qt ? new Map(Qt.series.map((e) => [e.id, e.absoluteChange])) : null, tn = (e) => e.series.filter((e) => Wt.has(e.id)).reduce((e, t) => ({
7731
7759
  start: e.start + (t.startValue ?? 0),
7732
7760
  end: e.end + (t.endValue ?? 0)
7733
7761
  }), {
7734
7762
  start: 0,
7735
7763
  end: 0
7736
- }), tn = Qt ? en(Qt) : void 0, nn = $t ? en($t) : void 0, rn = H ? (e) => `${new Intl.NumberFormat(I, { maximumFractionDigits: 1 }).format(e)} pp` : Ke, an = ya(rn), on = jt === null ? null : Gt.filter((e) => S === "inverse" ? e <= jt : e >= jt).length, sn = Ne && Re.length ? Ne(Re) : null, cn = Jt && e.kind === "marks" ? e.describe?.(Jt) ?? null : null, ln = Jt && ut ? ut[Jt.sourceIndex] ?? null : null, un = ln?.severity ? ht(Jt?.sourceIndex) ?? pt(ln.flags) : null, dn = !!(tt !== null && Jt?.series.some((e) => e.status === "forecast")), fn = Wt.size === 0 || H && Qt?.series.some((e) => Wt.has(e.id) && (e.startValue === null || e.endValue === null)) ? null : Yt ? H && [...Wt].some((e) => Yt.get(e) == null) ? null : [...Yt].reduce((e, [t, n]) => e + (Wt.has(t) ? n ?? 0 : 0), 0) : tn ? tn.end - tn.start : Kt, pn = (e) => {
7764
+ }), nn = Qt ? tn(Qt) : void 0, rn = $t ? tn($t) : void 0, an = H ? (e) => `${new Intl.NumberFormat(I, { maximumFractionDigits: 1 }).format(e)} pp` : Ke, on = ba(an), sn = jt === null ? null : Gt.filter((e) => S === "inverse" ? e <= jt : e >= jt).length, q = Ne && Re.length ? Ne(Re) : null, cn = Jt && e.kind === "marks" ? e.describe?.(Jt) ?? null : null, ln = Jt && ut ? ut[Jt.sourceIndex] ?? null : null, un = ln?.severity ? ht(Jt?.sourceIndex) ?? pt(ln.flags) : null, dn = !!(tt !== null && Jt?.series.some((e) => e.status === "forecast")), fn = Wt.size === 0 || H && Qt?.series.some((e) => Wt.has(e.id) && (e.startValue === null || e.endValue === null)) ? null : Yt ? H && [...Wt].some((e) => Yt.get(e) == null) ? null : [...Yt].reduce((e, [t, n]) => e + (Wt.has(t) ? n ?? 0 : 0), 0) : nn ? nn.end - nn.start : Kt, pn = (e) => {
7737
7765
  zt(e), Ft.actions.focusSeries(e);
7738
7766
  }, mn = (e) => {
7739
7767
  Vt(e), pn(null), Ft.actions.setVisibleSeries(St.map((e) => e.id).filter((t) => !e.includes(t)));
7740
- }, hn = ot(ue), gn = st(hn.y), _n = hn.y === "classic" ? 44 : 48, vn = !!wt, yn = ye ? 0 : 4, bn = ct(we, hn.y) === "mark", J = {
7768
+ }, hn = ot(ue), gn = st(hn.y), _n = hn.y === "classic" ? 44 : 48, vn = !!wt, yn = ye ? 0 : 4, bn = ct(we, hn.y) === "mark", xn = {
7741
7769
  top: de === "strip" ? 44 : bn ? 30 : hn.y === "inline" || hn.y === "ruler" ? 22 : 8,
7742
7770
  right: gn && vn ? _n : yn,
7743
7771
  bottom: e.kind === "marks" && e.xAxis === !1 ? 6 : 28,
7744
7772
  left: gn ? _n : yn
7745
- }, xn = be ?? (ye ? 20 : 0), Sn = St.filter((e) => !W.has(e.id)).map((e) => e.id), Cn = St.filter((e) => Lt.has(e.id)), wn = nt.length ? G.position(nt.at(-1)) : null, Tn = Re.length ? G.position(Re.at(-1)) : null, En = tt === null || Tn === null || tt > Tn ? null : wn === null ? tt : e.kind === "bar" ? (wn + Pa(Re, G, tt)) / 2 : wn, Dn = /* @__PURE__ */ M(ee, { children: [
7746
- /* @__PURE__ */ j(zi, { pattern: "lines" }),
7747
- En === null ? null : /* @__PURE__ */ j(ua, {
7773
+ }, Sn = be ?? (ye ? 20 : 0), J = St.filter((e) => !W.has(e.id)).map((e) => e.id), Cn = St.filter((e) => Lt.has(e.id)), wn = nt.length ? G.position(nt.at(-1)) : null, Tn = Re.length ? G.position(Re.at(-1)) : null, En = tt === null || Tn === null || tt > Tn ? null : wn === null ? tt : e.kind === "bar" ? (wn + Fa(Re, G, tt)) / 2 : wn, Dn = /* @__PURE__ */ M(ee, { children: [
7774
+ /* @__PURE__ */ j(Bi, { pattern: "lines" }),
7775
+ En === null ? null : /* @__PURE__ */ j(da, {
7748
7776
  from: En,
7749
7777
  to: Infinity,
7750
7778
  label: R?.label ?? "Forecast",
7751
7779
  color: "var(--lilt-muted)",
7752
7780
  className: "lilt-card__forecast"
7753
7781
  }),
7754
- rt && Lt.has(rt) ? /* @__PURE__ */ j(Pi, {
7782
+ rt && Lt.has(rt) ? /* @__PURE__ */ j(Fi, {
7755
7783
  series: rt,
7756
7784
  lower: "lower",
7757
7785
  upper: "upper"
7758
7786
  }) : null,
7759
- it && Lt.has(it) ? /* @__PURE__ */ j(wa, {
7787
+ it && Lt.has(it) ? /* @__PURE__ */ j(Ta, {
7760
7788
  series: it,
7761
7789
  flagged: ft,
7762
7790
  part: "band"
7763
7791
  }) : null,
7764
- e.kind === "area" ? Cn.map((e) => W.has(e.id) ? null : /* @__PURE__ */ j(hi, {
7792
+ e.kind === "area" ? Cn.map((e) => W.has(e.id) ? null : /* @__PURE__ */ j(gi, {
7765
7793
  model: Ft,
7766
7794
  series: e.id
7767
7795
  }, `area-${e.id}`)) : null,
7768
- e.kind === "bar" ? Sn.filter((e) => Lt.has(e)).map((e) => /* @__PURE__ */ j(Li, {
7796
+ e.kind === "bar" ? J.filter((e) => Lt.has(e)).map((e) => /* @__PURE__ */ j(Ri, {
7769
7797
  model: Ft,
7770
7798
  series: e
7771
7799
  }, `bar-${e}`)) : null,
7772
- e.kind === "marks" ? e.draw(Sn.filter((e) => Lt.has(e))) : null,
7773
- Cn.map((t) => (e.kind === "bar" || e.kind === "marks") && !W.has(t.id) ? null : /* @__PURE__ */ j(Ii, {
7800
+ e.kind === "marks" ? e.draw(J.filter((e) => Lt.has(e))) : null,
7801
+ Cn.map((t) => (e.kind === "bar" || e.kind === "marks") && !W.has(t.id) ? null : /* @__PURE__ */ j(Li, {
7774
7802
  model: Ft,
7775
7803
  series: t.id
7776
7804
  }, `line-${t.id}`)),
7777
- it && Lt.has(it) ? /* @__PURE__ */ j(wa, {
7805
+ it && Lt.has(it) ? /* @__PURE__ */ j(Ta, {
7778
7806
  series: it,
7779
7807
  flagged: ft,
7780
7808
  part: "flags"
7781
7809
  }) : null,
7782
- Mt.map((e) => /* @__PURE__ */ j(da, {
7810
+ Mt.map((e) => /* @__PURE__ */ j(fa, {
7783
7811
  value: e.value,
7784
7812
  label: `${e.label} ${Ge.axis(e.value)}`,
7785
7813
  className: "lilt-card__limit"
7786
7814
  }, e.id)),
7787
- jt === null ? null : /* @__PURE__ */ j(da, {
7815
+ jt === null ? null : /* @__PURE__ */ j(fa, {
7788
7816
  value: jt,
7789
7817
  label: `${At.label} ${Ge.axis(jt)}`,
7790
7818
  className: "lilt-card__target"
7791
7819
  }),
7792
- e.kind !== "marks" || e.xAxis !== !1 ? /* @__PURE__ */ j(na, { labels: e.kind === "bar" || e.kind === "marks" ? "fit" : void 0 }) : null,
7793
- /* @__PURE__ */ j(ra, {}),
7794
- vn ? /* @__PURE__ */ j(ra, { scale: "secondary" }) : null
7795
- ] }), Y = {
7820
+ e.kind !== "marks" || e.xAxis !== !1 ? /* @__PURE__ */ j(ra, { labels: e.kind === "bar" || e.kind === "marks" ? "fit" : void 0 }) : null,
7821
+ /* @__PURE__ */ j(ia, {}),
7822
+ vn ? /* @__PURE__ */ j(ia, { scale: "secondary" }) : null
7823
+ ] }), On = {
7796
7824
  model: Ft,
7797
7825
  height: ne,
7798
- margins: J,
7826
+ margins: xn,
7799
7827
  axis: ue,
7800
7828
  pill: de === "pills" && fe,
7801
7829
  pillSeries: Se,
@@ -7803,7 +7831,7 @@ function ka({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
7803
7831
  background: z,
7804
7832
  spotlight: pe,
7805
7833
  decimate: me,
7806
- axisInset: xn,
7834
+ axisInset: Sn,
7807
7835
  runoff: Ue,
7808
7836
  labelOverhang: ye ? 0 : 16,
7809
7837
  tooltip: qt ? {
@@ -7812,21 +7840,21 @@ function ka({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
7812
7840
  adaptive: !1,
7813
7841
  layout: de === "strip" ? "strip" : "float"
7814
7842
  } : void 0
7815
- }, On = Ve && Sn.length ? { series: Sn } : void 0, kn = /* @__PURE__ */ j(Qr, {
7816
- ...Y,
7843
+ }, kn = Ve && J.length ? { series: J } : void 0, Y = /* @__PURE__ */ j($r, {
7844
+ ...On,
7817
7845
  bars: e.kind === "bar" ? Ve ? {
7818
7846
  segmentGap: 2,
7819
7847
  width: e.barWidth
7820
7848
  } : {
7821
- series: Sn,
7849
+ series: J,
7822
7850
  gap: 3,
7823
7851
  width: e.barWidth
7824
7852
  } : void 0,
7825
- stack: On,
7853
+ stack: kn,
7826
7854
  pillValue: Ve ? Ce : void 0,
7827
7855
  slots: e.kind === "marks" && !!e.slots,
7828
7856
  children: Dn
7829
- }), An = !nn || H && $t.series.some((e) => Wt.has(e.id) && (e.startValue === null || e.endValue === null)) ? null : nn.end - nn.start, jn = $t && !Ee ? /* @__PURE__ */ M(ee, { children: [/* @__PURE__ */ M("span", {
7857
+ }), An = !rn || H && $t.series.some((e) => Wt.has(e.id) && (e.startValue === null || e.endValue === null)) ? null : rn.end - rn.start, jn = $t && !Ee ? /* @__PURE__ */ M(ee, { children: [/* @__PURE__ */ M("span", {
7830
7858
  className: "lilt-card-badge__comparison",
7831
7859
  role: "status",
7832
7860
  children: [
@@ -7840,10 +7868,10 @@ function ka({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
7840
7868
  }),
7841
7869
  /* @__PURE__ */ j("span", {
7842
7870
  className: "lilt-card-badge__change",
7843
- children: An === null ? "—" : an(An)
7871
+ children: An === null ? "—" : on(An)
7844
7872
  }),
7845
- !H && nn && nn.start !== 0 ? /* @__PURE__ */ j(a, {
7846
- value: nn.end / nn.start - 1,
7873
+ !H && rn && rn.start !== 0 ? /* @__PURE__ */ j(a, {
7874
+ value: rn.end / rn.start - 1,
7847
7875
  tone: S
7848
7876
  }) : null
7849
7877
  ]
@@ -7894,14 +7922,14 @@ function ka({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
7894
7922
  }) : null,
7895
7923
  children: [/* @__PURE__ */ j(s, { children: Me ?? t }), /* @__PURE__ */ j(o, {
7896
7924
  value: fn,
7897
- format: Qt ? an : Ke,
7925
+ format: Qt ? on : Ke,
7898
7926
  loading: Ee,
7899
7927
  motion: Oe,
7900
7928
  children: Ee ? null : Jt ? /* @__PURE__ */ M(ee, { children: [
7901
7929
  jt !== null && jt !== 0 && fn !== null ? /* @__PURE__ */ j(a, {
7902
7930
  value: fn / jt - 1,
7903
7931
  tone: S,
7904
- format: ja
7932
+ format: Ma
7905
7933
  }) : null,
7906
7934
  /* @__PURE__ */ M(i, { children: [
7907
7935
  Jt.formattedX,
@@ -7913,14 +7941,14 @@ function ka({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
7913
7941
  "data-severity": ln.severity,
7914
7942
  children: un
7915
7943
  }) : null
7916
- ] }) : Qt && tn ? /* @__PURE__ */ M(ee, { children: [!H && tn.start !== 0 ? /* @__PURE__ */ j(a, {
7917
- value: tn.end / tn.start - 1,
7944
+ ] }) : Qt && nn ? /* @__PURE__ */ M(ee, { children: [!H && nn.start !== 0 ? /* @__PURE__ */ j(a, {
7945
+ value: nn.end / nn.start - 1,
7918
7946
  tone: S
7919
7947
  }) : null, /* @__PURE__ */ M(i, { children: [
7920
7948
  Qt.formattedStartX,
7921
7949
  " → ",
7922
7950
  Qt.formattedEndX
7923
- ] })] }) : H && nt.length ? /* @__PURE__ */ j(i, { children: G.format(G.position(nt.at(-1))) }) : ze !== void 0 || on !== null || sn || K?.active ? /* @__PURE__ */ M(ee, { children: [
7951
+ ] })] }) : H && nt.length ? /* @__PURE__ */ j(i, { children: G.format(G.position(nt.at(-1))) }) : ze !== void 0 || sn !== null || q || K?.active ? /* @__PURE__ */ M(ee, { children: [
7924
7952
  vt?.active && vt.since ? /* @__PURE__ */ M("span", {
7925
7953
  className: "lilt-card__watch",
7926
7954
  "data-severity": vt.severity,
@@ -7934,9 +7962,9 @@ function ka({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
7934
7962
  value: ze,
7935
7963
  tone: S
7936
7964
  }),
7937
- sn ? /* @__PURE__ */ j(i, { children: sn }) : null,
7938
- on !== null && Gt.length ? /* @__PURE__ */ M(i, { children: [
7939
- on,
7965
+ q ? /* @__PURE__ */ j(i, { children: q }) : null,
7966
+ sn !== null && Gt.length ? /* @__PURE__ */ M(i, { children: [
7967
+ sn,
7940
7968
  " of ",
7941
7969
  Gt.length,
7942
7970
  " on target"
@@ -7957,14 +7985,14 @@ function ka({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
7957
7985
  motion: Oe,
7958
7986
  status: Ee ? "loading" : "ready",
7959
7987
  loadingStyle: De,
7960
- children: kn
7988
+ children: Y
7961
7989
  }),
7962
7990
  Ae ? Ae({
7963
7991
  data: Re,
7964
7992
  x: Ct,
7965
7993
  controller: Ft.getController(),
7966
- margins: J,
7967
- axisInset: xn,
7994
+ margins: xn,
7995
+ axisInset: Sn,
7968
7996
  slots: e.kind === "marks" && !!e.slots,
7969
7997
  axis: ue,
7970
7998
  loading: Ee,
@@ -7974,9 +8002,9 @@ function ka({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
7974
8002
  formatValue: Ke,
7975
8003
  formatAxis: Ge.axis
7976
8004
  }) : null,
7977
- te ? /* @__PURE__ */ j(sa, {
8005
+ te ? /* @__PURE__ */ j(ca, {
7978
8006
  className: "lilt-card__tiles",
7979
- variant: oa(N),
8007
+ variant: sa(N),
7980
8008
  swatch: P,
7981
8009
  "aria-label": `${t} by series`,
7982
8010
  activeId: Rt ?? It?.activeSeriesId ?? null,
@@ -7985,28 +8013,28 @@ function ka({ shape: e, title: t, data: r, x: g, series: _, headline: v, aggrega
7985
8013
  hiddenIds: Bt,
7986
8014
  onHiddenIdsChange: mn,
7987
8015
  items: St.map((e) => {
7988
- let t = Yt ? Yt.get(e.id) ?? null : q ? q.get(e.id) ?? null : Ut.find((t) => t.id === e.id)?.total ?? null;
8016
+ let t = Yt ? Yt.get(e.id) ?? null : en ? en.get(e.id) ?? null : Ut.find((t) => t.id === e.id)?.total ?? null;
7989
8017
  return {
7990
8018
  id: e.id,
7991
8019
  label: e.label,
7992
8020
  color: e.color,
7993
8021
  value: t,
7994
- formattedValue: t === null ? "—" : q ? ya(H ? rn : Ze(e.id))(t) : Ze(e.id)(t)
8022
+ formattedValue: t === null ? "—" : en ? ba(H ? an : Ze(e.id))(t) : Ze(e.id)(t)
7995
8023
  };
7996
8024
  })
7997
8025
  }) : null
7998
8026
  ]
7999
8027
  });
8000
8028
  }
8001
- function Aa({ history: e, ...t }) {
8029
+ function ja({ history: e, ...t }) {
8002
8030
  return JSON.stringify(t, (e, t) => typeof t == "function" ? String(t) : t);
8003
8031
  }
8004
- var ja = (e) => `${e >= 0 ? "+" : "−"}${Math.abs(e * 100).toFixed(1)}% vs target`;
8005
- function Ma(e, t) {
8032
+ var Ma = (e) => `${e >= 0 ? "+" : "−"}${Math.abs(e * 100).toFixed(1)}% vs target`;
8033
+ function Na(e, t) {
8006
8034
  let n = e[t];
8007
8035
  return typeof n == "number" && Number.isFinite(n) ? n : null;
8008
8036
  }
8009
- function Na(e, t, n, r) {
8037
+ function Pa(e, t, n, r) {
8010
8038
  if (n.kind === "category") {
8011
8039
  let n = e.findIndex((e) => String(e[t]) === String(r));
8012
8040
  return n < 0 ? null : n;
@@ -8014,7 +8042,7 @@ function Na(e, t, n, r) {
8014
8042
  let i = Number(r);
8015
8043
  return Number.isFinite(i) ? i : null;
8016
8044
  }
8017
- function Pa(e, t, n) {
8045
+ function Fa(e, t, n) {
8018
8046
  let r = Infinity;
8019
8047
  for (let i of e) {
8020
8048
  let e = t.position(i);
@@ -8024,7 +8052,7 @@ function Pa(e, t, n) {
8024
8052
  }
8025
8053
  //#endregion
8026
8054
  //#region src/lifecycle/skeleton-block.tsx
8027
- function Fa({ width: e = "100%", height: t, step: n = 0 }) {
8055
+ function Ia({ width: e = "100%", height: t, step: n = 0 }) {
8028
8056
  return /* @__PURE__ */ j("span", {
8029
8057
  className: "lilt-skeleton__block",
8030
8058
  style: {
@@ -8035,4 +8063,4 @@ function Fa({ width: e = "100%", height: t, step: n = 0 }) {
8035
8063
  });
8036
8064
  }
8037
8065
  //#endregion
8038
- export { hn as $, wi as A, Yr as B, Mi as C, _i as D, Si as E, ki as F, mr as G, _r as H, hi as I, vn as J, Pn as K, Qr as L, Ei as M, Ti as N, ji as O, yi as P, gn as Q, Kr as R, Pi as S, xi as T, vr as U, Wr as V, gr as W, _n as X, J as Y, Cn as Z, na as _, Te as _t, ya as a, tn as at, Li as b, ha as c, Et as ct, la as d, Qe as dt, mn as et, ua as f, $e as ft, ia as g, De as gt, aa as h, xe as ht, _a as i, un as it, bi as j, Ai as k, ma as l, tt as lt, oa as m, je as mt, ka as n, dn as nt, ga as o, Ut as ot, sa as p, G as pt, On as q, Ea as r, cn as rt, va as s, Ct as st, Fa as t, bn as tt, da as u, et as ut, ra as v, Ee as vt, Ni as w, Ii as x, zi as y, me as yt, Xr as z };
8066
+ export { hn as $, Ti as A, Xr as B, Ni as C, vi as D, Ci as E, Ai as F, Q as G, _r as H, gi as I, vn as J, Pn as K, $r as L, Di as M, Ei as N, Mi as O, bi as P, gn as Q, qr as R, Fi as S, Si as T, vr as U, Gr as V, gr as W, _n as X, xn as Y, Cn as Z, ra as _, Te as _t, ba as a, nn as at, Ri as b, ga as c, Et as ct, ua as d, Qe as dt, mn as et, da as f, $e as ft, aa as g, De as gt, oa as h, xe as ht, va as i, un as it, xi as j, ji as k, ha as l, tt as lt, sa as m, je as mt, Aa as n, dn as nt, _a as o, Ut as ot, ca as p, G as pt, kn as q, Da as r, cn as rt, ya as s, Ct as st, Ia as t, bn as tt, fa as u, et as ut, ia as v, Ee as vt, Pi as w, Li as x, Bi as y, me as yt, Zr as z };