@abdullahjaswal/tickyr-charts 0.1.0 → 0.1.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.
@@ -1,23 +1,7 @@
1
- import { r as e, t } from "./chunk-BmowowmI.js";
2
- import { A as n, B as r, Ct as i, Dt as a, Et as o, F as s, Fn as c, G as l, H as u, Ht as d, I as f, In as p, L as m, M as h, Mn as g, N as _, Nt as v, P as y, R as b, St as x, Tn as S, Tt as C, U as w, V as T, W as E, Y as D, Yt as O, at as k, ct as A, dn as j, dt as M, fn as N, ft as P, j as F, jt as I, k as L, kn as R, kt as z, lt as B, ot as V, pn as H, q as U, qt as W, st as G, ut as K, wn as ee, wt as te, z as ne } from "./accessibility-B-2UbONR.js";
3
- import * as q from "react";
4
- import { Fragment as re, jsx as J, jsxs as Y } from "react/jsx-runtime";
5
- var ie = /* @__PURE__ */ t(((t2) => {
6
- var n2 = e("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
7
- t2.c = function(e2) {
8
- return n2.H.useMemoCache(e2);
9
- };
10
- })), X = /* @__PURE__ */ t(((t2) => {
11
- process.env.NODE_ENV !== "production" && (function() {
12
- var n2 = e("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
13
- t2.c = function(e2) {
14
- var t3 = n2.H;
15
- return t3 === null && console.error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."), t3.useMemoCache(e2);
16
- };
17
- })();
18
- })), Z = (/* @__PURE__ */ t(((e2, t2) => {
19
- process.env.NODE_ENV === "production" ? t2.exports = ie() : t2.exports = X();
20
- })))(), Q = Object.freeze({
1
+ import { A as e, B as t, Ct as n, Dt as r, Et as i, F as a, Fn as o, G as s, H as c, Ht as l, I as u, In as d, L as f, M as p, Mn as m, N as h, Nt as g, P as _, R as v, St as y, Tn as b, Tt as x, U as S, V as C, W as w, Y as T, Yt as ee, at as E, ct as te, dn as D, dt as O, fn as k, ft as A, j, jt as M, k as ne, kn as re, kt as N, lt as ie, ot as P, pn as F, q as I, qt as L, st as ae, ut as oe, wn as se, wt as R, z as ce } from "./accessibility-DdwzkUk3.js";
2
+ import * as z from "react";
3
+ import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
4
+ var U = Object.freeze({
21
5
  theme: "inherit",
22
6
  palette: "Monochrome",
23
7
  locale: "USA",
@@ -30,42 +14,52 @@ var ie = /* @__PURE__ */ t(((t2) => {
30
14
  accents: false,
31
15
  osTheme: "light",
32
16
  appTheme: "light"
33
- }), ae = q.createContext(Q);
34
- ae.displayName = "ChartsContext";
35
- function oe(e2) {
36
- let t2 = (0, Z.c)(19), n2, r2;
37
- t2[0] === e2.palettes ? (n2 = t2[1], r2 = t2[2]) : (n2 = () => {
38
- if (e2.palettes !== void 0) for (let t3 of e2.palettes) R(t3);
39
- }, r2 = [e2.palettes], t2[0] = e2.palettes, t2[1] = n2, t2[2] = r2), q.useEffect(n2, r2);
40
- let i2 = e2.theme ?? Q.theme, a2 = e2.palette ?? Q.palette, o2 = e2.locale ?? Q.locale, s2 = e2.visualStyle ?? Q.visualStyle, c2 = e2.outlineFillColor ?? Q.outlineFillColor, l2 = e2.outlineFillOpacity ?? Q.outlineFillOpacity, u2 = e2.cornerRadius ?? Q.cornerRadius, d2 = e2.borderWidth ?? Q.borderWidth, f2 = e2.accents ?? Q.accents, p2 = e2.osTheme ?? Q.osTheme, m2 = e2.appTheme ?? Q.appTheme, h2;
41
- t2[3] !== e2.timeZone || t2[4] !== f2 || t2[5] !== p2 || t2[6] !== m2 || t2[7] !== i2 || t2[8] !== a2 || t2[9] !== o2 || t2[10] !== s2 || t2[11] !== c2 || t2[12] !== l2 || t2[13] !== u2 || t2[14] !== d2 ? (h2 = {
42
- theme: i2,
43
- palette: a2,
44
- locale: o2,
17
+ }), W = z.createContext(U);
18
+ W.displayName = "ChartsContext";
19
+ function G(e2) {
20
+ z.useEffect(() => {
21
+ if (e2.palettes !== void 0) for (let t3 of e2.palettes) re(t3);
22
+ }, [e2.palettes]);
23
+ let t2 = z.useMemo(() => ({
24
+ theme: e2.theme ?? U.theme,
25
+ palette: e2.palette ?? U.palette,
26
+ locale: e2.locale ?? U.locale,
45
27
  timeZone: e2.timeZone,
46
- visualStyle: s2,
47
- outlineFillColor: c2,
48
- outlineFillOpacity: l2,
49
- cornerRadius: u2,
50
- borderWidth: d2,
51
- accents: f2,
52
- osTheme: p2,
53
- appTheme: m2
54
- }, t2[3] = e2.timeZone, t2[4] = f2, t2[5] = p2, t2[6] = m2, t2[7] = i2, t2[8] = a2, t2[9] = o2, t2[10] = s2, t2[11] = c2, t2[12] = l2, t2[13] = u2, t2[14] = d2, t2[15] = h2) : h2 = t2[15];
55
- let g2 = h2, _2;
56
- return t2[16] !== e2.children || t2[17] !== g2 ? (_2 = /* @__PURE__ */ J(ae.Provider, {
57
- value: g2,
28
+ visualStyle: e2.visualStyle ?? U.visualStyle,
29
+ outlineFillColor: e2.outlineFillColor ?? U.outlineFillColor,
30
+ outlineFillOpacity: e2.outlineFillOpacity ?? U.outlineFillOpacity,
31
+ cornerRadius: e2.cornerRadius ?? U.cornerRadius,
32
+ borderWidth: e2.borderWidth ?? U.borderWidth,
33
+ accents: e2.accents ?? U.accents,
34
+ osTheme: e2.osTheme ?? U.osTheme,
35
+ appTheme: e2.appTheme ?? U.appTheme
36
+ }), [
37
+ e2.theme,
38
+ e2.palette,
39
+ e2.locale,
40
+ e2.timeZone,
41
+ e2.visualStyle,
42
+ e2.outlineFillColor,
43
+ e2.outlineFillOpacity,
44
+ e2.cornerRadius,
45
+ e2.borderWidth,
46
+ e2.accents,
47
+ e2.osTheme,
48
+ e2.appTheme
49
+ ]);
50
+ return /* @__PURE__ */ V(W.Provider, {
51
+ value: t2,
58
52
  children: e2.children
59
- }), t2[16] = e2.children, t2[17] = g2, t2[18] = _2) : _2 = t2[18], _2;
53
+ });
60
54
  }
61
- function $() {
62
- return q.useContext(ae);
55
+ function K() {
56
+ return z.useContext(W);
63
57
  }
64
- function se(e2) {
65
- let t2 = (0, Z.c)(4), n2 = $(), r2 = e2 ?? n2.theme, i2;
66
- return t2[0] !== n2.appTheme || t2[1] !== n2.osTheme || t2[2] !== r2 ? (i2 = H(r2, n2.appTheme, n2.osTheme), t2[0] = n2.appTheme, t2[1] = n2.osTheme, t2[2] = r2, t2[3] = i2) : i2 = t2[3], i2;
58
+ function q(e2) {
59
+ let t2 = K();
60
+ return F(e2 ?? t2.theme, t2.appTheme, t2.osTheme);
67
61
  }
68
- function ce(e2) {
62
+ function J(e2) {
69
63
  return {
70
64
  length: 0,
71
65
  capacity: e2,
@@ -83,8 +77,8 @@ function le(e2) {
83
77
  e2.length = t2 - 1;
84
78
  }
85
79
  function ue(e2, t2, n2, r2) {
86
- if (t2.kind === C.NoEvent) return;
87
- if (t2.kind === C.MutateLast) {
80
+ if (t2.kind === x.NoEvent) return;
81
+ if (t2.kind === x.MutateLast) {
88
82
  if (e2.length === 0) return;
89
83
  let t3 = e2.length - 1;
90
84
  n2 > e2.highs[t3] && (e2.highs[t3] = n2), n2 < e2.lows[t3] && (e2.lows[t3] = n2), e2.closes[t3] = n2, e2.volumes[t3] = e2.volumes[t3] + r2;
@@ -95,17 +89,17 @@ function ue(e2, t2, n2, r2) {
95
89
  e2.times[i2] = t2.bucketStartMs, e2.opens[i2] = n2, e2.highs[i2] = n2, e2.lows[i2] = n2, e2.closes[i2] = n2, e2.volumes[i2] = r2, e2.length = i2 + 1;
96
90
  }
97
91
  function de(e2) {
98
- let t2 = e2.capacity ?? 5e3, n2 = q.useRef(ce(t2)), r2 = q.useRef(null), i2 = q.useRef(null), a2 = q.useRef(o()), s2 = q.useRef([]), [c2, l2] = q.useState(false), [u2, d2] = q.useState(0);
99
- q.useEffect(() => {
100
- let o2 = false;
92
+ let t2 = e2.capacity ?? 5e3, n2 = z.useRef(J(t2)), r2 = z.useRef(null), a2 = z.useRef(null), o2 = z.useRef(i()), s2 = z.useRef([]), [c2, l2] = z.useState(false), [u2, d2] = z.useState(0);
93
+ z.useEffect(() => {
94
+ let i2 = false;
101
95
  return (async () => {
102
- let c3 = await te(e2.market);
103
- if (o2) {
96
+ let c3 = await R(e2.market);
97
+ if (i2) {
104
98
  c3.free();
105
99
  return;
106
100
  }
107
- i2.current = c3;
108
- let u3 = await x({
101
+ a2.current = c3;
102
+ let u3 = await y({
109
103
  timeframeMinutes: e2.timeframeMinutes,
110
104
  capacity: t2,
111
105
  market: c3,
@@ -113,7 +107,7 @@ function de(e2) {
113
107
  maxPriceRaw: e2.maxPriceRaw,
114
108
  maxVolumeRaw: e2.maxVolumeRaw
115
109
  });
116
- if (o2) {
110
+ if (i2) {
117
111
  u3.free(), c3.free();
118
112
  return;
119
113
  }
@@ -124,7 +118,7 @@ function de(e2) {
124
118
  e2.onAudit !== void 0 && u3.setAuditCallback(e2.onAudit), e2.onTelemetry !== void 0 && u3.setTelemetryCallback(e2.onTelemetry);
125
119
  let f3 = s2.current;
126
120
  if (f3.length > 0) {
127
- let e3 = n2.current, t3 = a2.current;
121
+ let e3 = n2.current, t3 = o2.current;
128
122
  for (let n3 = 0; n3 < f3.length; n3++) {
129
123
  let [r3, i3, a3] = f3[n3];
130
124
  try {
@@ -136,11 +130,11 @@ function de(e2) {
136
130
  }
137
131
  l2(true), d2((e3) => e3 + 1);
138
132
  })(), () => {
139
- o2 = true;
133
+ i2 = true;
140
134
  let e3 = r2.current;
141
135
  e3 !== null && (e3.free(), r2.current = null);
142
- let t3 = i2.current;
143
- t3 !== null && (t3.free(), i2.current = null);
136
+ let t3 = a2.current;
137
+ t3 !== null && (t3.free(), a2.current = null);
144
138
  };
145
139
  }, [
146
140
  e2.market,
@@ -153,24 +147,24 @@ function de(e2) {
153
147
  e2.onAudit,
154
148
  e2.onTelemetry
155
149
  ]);
156
- let f2 = q.useCallback((e3, t3, i3) => {
157
- let o2 = r2.current;
158
- if (o2 === null) {
150
+ let f2 = z.useCallback((e3, t3, i2) => {
151
+ let a3 = r2.current;
152
+ if (a3 === null) {
159
153
  s2.current.push([
160
154
  e3,
161
155
  t3,
162
- i3
156
+ i2
163
157
  ]);
164
158
  return;
165
159
  }
166
- let c3 = a2.current;
167
- o2.pushTick(e3, t3, i3, c3), ue(n2.current, c3, t3, i3), d2((e4) => e4 + 1);
168
- }, []), p2 = q.useCallback(() => {
160
+ let c3 = o2.current;
161
+ a3.pushTick(e3, t3, i2, c3), ue(n2.current, c3, t3, i2), d2((e4) => e4 + 1);
162
+ }, []), p2 = z.useCallback(() => {
169
163
  let e3 = r2.current;
170
164
  e3 !== null && e3.reset(), n2.current.length = 0, s2.current.length = 0, d2((e4) => e4 + 1);
171
165
  }, []);
172
166
  return {
173
- candles: q.useMemo(() => {
167
+ candles: z.useMemo(() => {
174
168
  let e3 = n2.current, t3 = e3.length;
175
169
  return {
176
170
  times: e3.times.subarray(0, t3),
@@ -187,16 +181,16 @@ function de(e2) {
187
181
  ready: c2
188
182
  };
189
183
  }
190
- var fe = q.createContext(null);
191
- function pe() {
192
- return q.useContext(fe);
184
+ var fe = z.createContext(null);
185
+ function Y() {
186
+ return z.useContext(fe);
193
187
  }
194
- function me(e2) {
195
- let t2 = q.useRef(null);
196
- t2.current === null && (t2.current = A());
197
- let n2 = t2.current, [r2, i2] = q.useState(0);
198
- q.useEffect(() => n2.subscribe(() => i2((e3) => e3 + 1)), [n2]);
199
- let a2 = q.useMemo(() => B({
188
+ function pe(e2) {
189
+ let t2 = z.useRef(null);
190
+ t2.current === null && (t2.current = te());
191
+ let n2 = t2.current, [r2, i2] = z.useState(0);
192
+ z.useEffect(() => n2.subscribe(() => i2((e3) => e3 + 1)), [n2]);
193
+ let a2 = z.useMemo(() => ie({
200
194
  syncDomain: e2.syncDomain,
201
195
  syncPanZoom: e2.syncPanZoom,
202
196
  syncCrosshair: e2.syncCrosshair,
@@ -216,8 +210,8 @@ function me(e2) {
216
210
  e2.syncTooltip,
217
211
  e2.brush,
218
212
  e2.navigator
219
- ]), o2 = q.useRef(null), s2 = q.useRef(null);
220
- q.useEffect(() => {
213
+ ]), o2 = z.useRef(null), s2 = z.useRef(null);
214
+ z.useEffect(() => {
221
215
  n2.selectedTime !== o2.current && (o2.current = n2.selectedTime, e2.onSelectionChange?.(n2.selectedTime)), n2.brush !== s2.current && (s2.current = n2.brush, e2.onBrushChange?.(n2.brush));
222
216
  }, [
223
217
  r2,
@@ -226,7 +220,7 @@ function me(e2) {
226
220
  n2,
227
221
  e2
228
222
  ]);
229
- let c2 = q.useMemo(() => ({
223
+ let c2 = z.useMemo(() => ({
230
224
  options: a2,
231
225
  state: n2,
232
226
  version: r2
@@ -235,13 +229,13 @@ function me(e2) {
235
229
  n2,
236
230
  r2
237
231
  ]);
238
- return /* @__PURE__ */ J(fe.Provider, {
232
+ return /* @__PURE__ */ V(fe.Provider, {
239
233
  value: c2,
240
234
  children: e2.children
241
235
  });
242
236
  }
243
- var he = 12, ge = 140, _e = 56;
244
- function ve(e2) {
237
+ var X = 12, me = 140, he = 56;
238
+ function ge(e2) {
245
239
  return e2 === "light" ? {
246
240
  bg: "rgb(255, 255, 255)",
247
241
  fg: "rgb(20, 22, 26)",
@@ -256,353 +250,319 @@ function ve(e2) {
256
250
  shadow: "0 8px 24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.40)"
257
251
  };
258
252
  }
259
- function ye(e2) {
260
- let t2 = (0, Z.c)(58), { t: n2, seriesValues: r2, pointerX: i2, pointerY: a2, containerWidth: o2, containerHeight: s2, theme: c2, formatter: l2 } = e2, u2;
261
- t2[0] === c2 ? u2 = t2[1] : (u2 = ve(c2), t2[0] = c2, t2[1] = u2);
262
- let d2 = u2, f2, p2, m2, h2, g2, _2;
263
- if (t2[2] !== d2.bg || t2[3] !== d2.border || t2[4] !== d2.fg || t2[5] !== d2.shadow || t2[6] !== d2.subtleFg || t2[7] !== s2 || t2[8] !== o2 || t2[9] !== l2 || t2[10] !== i2 || t2[11] !== a2 || t2[12] !== r2 || t2[13] !== n2) {
264
- let e3 = r2.filter(be), c3 = i2 > o2 - ge, u3 = a2 > s2 - _e, v3;
265
- t2[20] !== s2 || t2[21] !== o2 || t2[22] !== i2 || t2[23] !== a2 || t2[24] !== u3 || t2[25] !== c3 ? (v3 = c3 ? { right: `${o2 - i2 + he}px` } : { left: `${i2 + he}px` }, u3 ? v3.bottom = `${s2 - a2 + he}px` : v3.top = `${a2 + he}px`, t2[20] = s2, t2[21] = o2, t2[22] = i2, t2[23] = a2, t2[24] = u3, t2[25] = c3, t2[26] = v3) : v3 = t2[26];
266
- let y3 = `1px solid ${d2.border}`;
267
- t2[27] !== d2.bg || t2[28] !== d2.fg || t2[29] !== d2.shadow || t2[30] !== v3 || t2[31] !== y3 ? (m2 = {
253
+ function _e(e2) {
254
+ let { t: t2, seriesValues: n2, pointerX: r2, pointerY: i2, containerWidth: a2, containerHeight: o2, theme: s2, formatter: c2 } = e2, l2 = ge(s2), u2 = n2.filter((e3) => !Number.isNaN(e3.value)), d2 = r2 > a2 - me, f2 = i2 > o2 - he, p2 = d2 ? { right: `${a2 - r2 + X}px` } : { left: `${r2 + X}px` };
255
+ return f2 ? p2.bottom = `${o2 - i2 + X}px` : p2.top = `${i2 + X}px`, /* @__PURE__ */ H("div", {
256
+ style: {
268
257
  position: "absolute",
269
- ...v3,
258
+ ...p2,
270
259
  pointerEvents: "none",
271
- background: d2.bg,
272
- color: d2.fg,
260
+ background: l2.bg,
261
+ color: l2.fg,
273
262
  padding: "8px 11px",
274
263
  borderRadius: 6,
275
- border: y3,
264
+ border: `1px solid ${l2.border}`,
276
265
  fontSize: 12,
277
266
  fontFamily: "system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
278
267
  lineHeight: 1.35,
279
268
  whiteSpace: "nowrap",
280
- boxShadow: d2.shadow,
269
+ boxShadow: l2.shadow,
281
270
  zIndex: 1
282
- }, t2[27] = d2.bg, t2[28] = d2.fg, t2[29] = d2.shadow, t2[30] = v3, t2[31] = y3, t2[32] = m2) : m2 = t2[32], h2 = "status", g2 = "polite";
283
- let b2;
284
- t2[33] === d2.subtleFg ? b2 = t2[34] : (b2 = {
285
- color: d2.subtleFg,
286
- fontSize: 10.5,
287
- letterSpacing: "0.02em",
288
- textTransform: "uppercase",
289
- fontWeight: 500,
290
- marginBottom: 2
291
- }, t2[33] = d2.subtleFg, t2[34] = b2);
292
- let x2;
293
- t2[35] !== l2 || t2[36] !== n2 ? (x2 = l2.formatDate(n2), t2[35] = l2, t2[36] = n2, t2[37] = x2) : x2 = t2[37];
294
- let S2;
295
- t2[38] !== l2 || t2[39] !== n2 ? (S2 = l2.formatTime(n2), t2[38] = l2, t2[39] = n2, t2[40] = S2) : S2 = t2[40], t2[41] !== S2 || t2[42] !== b2 || t2[43] !== x2 ? (_2 = /* @__PURE__ */ Y("div", {
296
- style: b2,
271
+ },
272
+ role: "status",
273
+ "aria-live": "polite",
274
+ children: [/* @__PURE__ */ H("div", {
275
+ style: {
276
+ color: l2.subtleFg,
277
+ fontSize: 10.5,
278
+ letterSpacing: "0.02em",
279
+ textTransform: "uppercase",
280
+ fontWeight: 500,
281
+ marginBottom: 2
282
+ },
297
283
  children: [
298
- x2,
284
+ c2.formatDate(t2),
299
285
  " ",
300
- S2
286
+ c2.formatTime(t2)
301
287
  ]
302
- }), t2[41] = S2, t2[42] = b2, t2[43] = x2, t2[44] = _2) : _2 = t2[44], t2[45] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f2 = {
303
- display: "flex",
304
- flexDirection: "column",
305
- gap: 3
306
- }, t2[45] = f2) : f2 = t2[45];
307
- let C2;
308
- t2[46] !== d2.subtleFg || t2[47] !== l2 ? (C2 = (e4) => /* @__PURE__ */ Y("div", {
288
+ }), /* @__PURE__ */ V("div", {
309
289
  style: {
310
290
  display: "flex",
311
- alignItems: "center",
312
- gap: 7,
313
- fontVariantNumeric: "tabular-nums"
291
+ flexDirection: "column",
292
+ gap: 3
314
293
  },
294
+ children: u2.map((e3) => /* @__PURE__ */ H("div", {
295
+ style: {
296
+ display: "flex",
297
+ alignItems: "center",
298
+ gap: 7,
299
+ fontVariantNumeric: "tabular-nums"
300
+ },
301
+ children: [
302
+ /* @__PURE__ */ V("span", {
303
+ "aria-hidden": "true",
304
+ style: {
305
+ width: 9,
306
+ height: 9,
307
+ borderRadius: 2,
308
+ background: e3.color,
309
+ display: "inline-block",
310
+ flex: "0 0 auto"
311
+ }
312
+ }),
313
+ /* @__PURE__ */ V("span", {
314
+ style: {
315
+ color: l2.subtleFg,
316
+ fontWeight: 500
317
+ },
318
+ children: e3.label
319
+ }),
320
+ /* @__PURE__ */ V("span", {
321
+ style: {
322
+ marginLeft: "auto",
323
+ fontWeight: 600
324
+ },
325
+ children: c2.formatPrice(e3.value)
326
+ })
327
+ ]
328
+ }, e3.id))
329
+ })]
330
+ });
331
+ }
332
+ var ve = "12px system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif";
333
+ function ye(e2) {
334
+ let t2 = e2.theme === "dark", n2 = t2 ? "rgb(34,36,42)" : "rgb(255,255,255)", r2 = t2 ? "rgba(255,255,255,0.94)" : "rgba(0,0,0,0.92)", i2 = t2 ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.08)";
335
+ return /* @__PURE__ */ H("div", {
336
+ style: {
337
+ position: "absolute",
338
+ left: `${e2.pointerX + 12}px`,
339
+ top: `${e2.pointerY + 12}px`,
340
+ pointerEvents: "none",
341
+ background: n2,
342
+ color: r2,
343
+ border: `1px solid ${i2}`,
344
+ borderRadius: 6,
345
+ padding: "6px 10px",
346
+ fontSize: 11,
347
+ fontFamily: ve,
348
+ fontVariantNumeric: "tabular-nums",
349
+ boxShadow: t2 ? "0 4px 14px rgba(0,0,0,0.5)" : "0 4px 14px rgba(0,0,0,0.12)"
350
+ },
351
+ children: [/* @__PURE__ */ V("div", {
352
+ style: {
353
+ fontWeight: 600,
354
+ textTransform: "uppercase",
355
+ fontSize: 10,
356
+ letterSpacing: "0.06em",
357
+ opacity: 0.7
358
+ },
359
+ children: e2.kind === "high" ? "High" : "Low"
360
+ }), /* @__PURE__ */ H("div", {
361
+ style: { fontWeight: 600 },
315
362
  children: [
316
- /* @__PURE__ */ J("span", {
317
- "aria-hidden": "true",
318
- style: {
319
- width: 9,
320
- height: 9,
321
- borderRadius: 2,
322
- background: e4.color,
323
- display: "inline-block",
324
- flex: "0 0 auto"
325
- }
326
- }),
327
- /* @__PURE__ */ J("span", {
328
- style: {
329
- color: d2.subtleFg,
330
- fontWeight: 500
331
- },
332
- children: e4.label
333
- }),
334
- /* @__PURE__ */ J("span", {
335
- style: {
336
- marginLeft: "auto",
337
- fontWeight: 600
338
- },
339
- children: l2.formatPrice(e4.value)
340
- })
363
+ e2.formatter.formatPrice(e2.price),
364
+ " \xB7 bar #",
365
+ e2.barIdx
341
366
  ]
342
- }, e4.id), t2[46] = d2.subtleFg, t2[47] = l2, t2[48] = C2) : C2 = t2[48], p2 = e3.map(C2), t2[2] = d2.bg, t2[3] = d2.border, t2[4] = d2.fg, t2[5] = d2.shadow, t2[6] = d2.subtleFg, t2[7] = s2, t2[8] = o2, t2[9] = l2, t2[10] = i2, t2[11] = a2, t2[12] = r2, t2[13] = n2, t2[14] = f2, t2[15] = p2, t2[16] = m2, t2[17] = h2, t2[18] = g2, t2[19] = _2;
343
- } else f2 = t2[14], p2 = t2[15], m2 = t2[16], h2 = t2[17], g2 = t2[18], _2 = t2[19];
344
- let v2;
345
- t2[49] !== f2 || t2[50] !== p2 ? (v2 = /* @__PURE__ */ J("div", {
346
- style: f2,
347
- children: p2
348
- }), t2[49] = f2, t2[50] = p2, t2[51] = v2) : v2 = t2[51];
349
- let y2;
350
- return t2[52] !== m2 || t2[53] !== h2 || t2[54] !== g2 || t2[55] !== _2 || t2[56] !== v2 ? (y2 = /* @__PURE__ */ Y("div", {
351
- style: m2,
352
- role: h2,
353
- "aria-live": g2,
354
- children: [_2, v2]
355
- }), t2[52] = m2, t2[53] = h2, t2[54] = g2, t2[55] = _2, t2[56] = v2, t2[57] = y2) : y2 = t2[57], y2;
356
- }
357
- function be(e2) {
358
- return !Number.isNaN(e2.value);
359
- }
360
- var xe = "12px system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif";
361
- function Se(e2) {
362
- let t2 = (0, Z.c)(21), n2 = e2.theme === "dark", r2 = n2 ? "rgb(34,36,42)" : "rgb(255,255,255)", i2 = n2 ? "rgba(255,255,255,0.94)" : "rgba(0,0,0,0.92)", a2 = n2 ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.08)", o2 = `${e2.pointerX + 12}px`, s2 = `${e2.pointerY + 12}px`, c2 = `1px solid ${a2}`, l2 = n2 ? "0 4px 14px rgba(0,0,0,0.5)" : "0 4px 14px rgba(0,0,0,0.12)", u2;
363
- t2[0] !== r2 || t2[1] !== i2 || t2[2] !== o2 || t2[3] !== s2 || t2[4] !== c2 || t2[5] !== l2 ? (u2 = {
364
- position: "absolute",
365
- left: o2,
366
- top: s2,
367
- pointerEvents: "none",
368
- background: r2,
369
- color: i2,
370
- border: c2,
371
- borderRadius: 6,
372
- padding: "6px 10px",
373
- fontSize: 11,
374
- fontFamily: xe,
375
- fontVariantNumeric: "tabular-nums",
376
- boxShadow: l2
377
- }, t2[0] = r2, t2[1] = i2, t2[2] = o2, t2[3] = s2, t2[4] = c2, t2[5] = l2, t2[6] = u2) : u2 = t2[6];
378
- let d2;
379
- t2[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d2 = {
380
- fontWeight: 600,
381
- textTransform: "uppercase",
382
- fontSize: 10,
383
- letterSpacing: "0.06em",
384
- opacity: 0.7
385
- }, t2[7] = d2) : d2 = t2[7];
386
- let f2 = e2.kind === "high" ? "High" : "Low", p2;
387
- t2[8] === f2 ? p2 = t2[9] : (p2 = /* @__PURE__ */ J("div", {
388
- style: d2,
389
- children: f2
390
- }), t2[8] = f2, t2[9] = p2);
391
- let m2;
392
- t2[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m2 = { fontWeight: 600 }, t2[10] = m2) : m2 = t2[10];
393
- let h2;
394
- t2[11] !== e2.formatter || t2[12] !== e2.price ? (h2 = e2.formatter.formatPrice(e2.price), t2[11] = e2.formatter, t2[12] = e2.price, t2[13] = h2) : h2 = t2[13];
395
- let g2;
396
- t2[14] !== e2.barIdx || t2[15] !== h2 ? (g2 = /* @__PURE__ */ Y("div", {
397
- style: m2,
398
- children: [
399
- h2,
400
- " \xB7 bar #",
401
- e2.barIdx
402
- ]
403
- }), t2[14] = e2.barIdx, t2[15] = h2, t2[16] = g2) : g2 = t2[16];
404
- let _2;
405
- return t2[17] !== g2 || t2[18] !== u2 || t2[19] !== p2 ? (_2 = /* @__PURE__ */ Y("div", {
406
- style: u2,
407
- children: [p2, g2]
408
- }), t2[17] = g2, t2[18] = u2, t2[19] = p2, t2[20] = _2) : _2 = t2[20], _2;
367
+ })]
368
+ });
409
369
  }
410
- function Ce(e2, t2) {
411
- return e2 === false ? null : typeof e2 == "function" ? e2(t2) : /* @__PURE__ */ J(Se, { ...t2 });
370
+ function be(e2, t2) {
371
+ return e2 === false ? null : typeof e2 == "function" ? e2(t2) : /* @__PURE__ */ V(ye, { ...t2 });
412
372
  }
413
- function we(e2, t2) {
414
- return e2 === false ? null : typeof e2 == "function" ? e2(t2) : /* @__PURE__ */ J(ye, { ...t2 });
373
+ function xe(e2, t2) {
374
+ return e2 === false ? null : typeof e2 == "function" ? e2(t2) : /* @__PURE__ */ V(_e, { ...t2 });
415
375
  }
416
- var Te = q.forwardRef(function(e2, t2) {
417
- let n2 = $(), r2 = q.useRef(null), a2 = q.useRef(null), o2 = q.useRef(null), s2 = q.useRef(null);
418
- q.useImperativeHandle(t2, () => ({ onTick: (e3, t3, n3 = 0) => {
419
- s2.current?.onTick(e3, t3, n3);
376
+ var Se = z.forwardRef(function(e2, t2) {
377
+ let r2 = K(), i2 = z.useRef(null), a2 = z.useRef(null), o2 = z.useRef(null), c2 = z.useRef(null);
378
+ z.useImperativeHandle(t2, () => ({ onTick: (e3, t3, n2 = 0) => {
379
+ c2.current?.onTick(e3, t3, n2);
420
380
  } }), []);
421
- let [c2, u2] = q.useState(null), [d2, f2] = q.useState(null), [p2, m2] = q.useState(null), [h2, g2] = q.useState("live"), [_2, v2] = q.useState(false), [y2, b2] = q.useState([]), x2 = q.useMemo(() => ({
422
- theme: n2.theme,
423
- palette: n2.palette,
424
- locale: n2.locale,
425
- timeZone: n2.timeZone,
426
- visualStyle: n2.visualStyle,
427
- outlineFillColor: n2.outlineFillColor,
428
- outlineFillOpacity: n2.outlineFillOpacity,
429
- cornerRadius: n2.cornerRadius,
430
- borderWidth: n2.borderWidth,
431
- accents: n2.accents,
432
- osTheme: n2.osTheme,
433
- appTheme: n2.appTheme
381
+ let [l2, u2] = z.useState(null), [d2, f2] = z.useState(null), [p2, m2] = z.useState(null), [h2, g2] = z.useState("live"), [_2, v2] = z.useState(false), [y2, x2] = z.useState([]), C2 = z.useMemo(() => ({
382
+ theme: r2.theme,
383
+ palette: r2.palette,
384
+ locale: r2.locale,
385
+ timeZone: r2.timeZone,
386
+ visualStyle: r2.visualStyle,
387
+ outlineFillColor: r2.outlineFillColor,
388
+ outlineFillOpacity: r2.outlineFillOpacity,
389
+ cornerRadius: r2.cornerRadius,
390
+ borderWidth: r2.borderWidth,
391
+ accents: r2.accents,
392
+ osTheme: r2.osTheme,
393
+ appTheme: r2.appTheme
434
394
  }), [
435
- n2.theme,
436
- n2.palette,
437
- n2.locale,
438
- n2.timeZone,
439
- n2.visualStyle,
440
- n2.outlineFillColor,
441
- n2.outlineFillOpacity,
442
- n2.cornerRadius,
443
- n2.borderWidth,
444
- n2.accents,
445
- n2.osTheme,
446
- n2.appTheme
395
+ r2.theme,
396
+ r2.palette,
397
+ r2.locale,
398
+ r2.timeZone,
399
+ r2.visualStyle,
400
+ r2.outlineFillColor,
401
+ r2.outlineFillOpacity,
402
+ r2.cornerRadius,
403
+ r2.borderWidth,
404
+ r2.accents,
405
+ r2.osTheme,
406
+ r2.appTheme
447
407
  ]);
448
- q.useEffect(() => {
449
- l();
450
- }, []), q.useEffect(() => {
408
+ z.useEffect(() => {
409
+ s();
410
+ }, []), z.useEffect(() => {
451
411
  let t3 = a2.current;
452
412
  if (t3 === null) return;
453
- let n3 = new w({
454
- container: r2.current,
413
+ let n2 = new S({
414
+ container: i2.current,
455
415
  staticCanvas: t3,
456
416
  dynamicCanvas: o2.current,
457
417
  initialProps: e2,
458
- initialProvider: x2,
418
+ initialProvider: C2,
459
419
  onContextChange: u2,
460
420
  onHoverChange: f2,
461
421
  onExtremeHoverChange: m2,
462
422
  onLiveStateChange: g2,
463
423
  onReducedMotionChange: v2,
464
- onResolvedIndicatorsChange: b2
424
+ onResolvedIndicatorsChange: x2
465
425
  });
466
- return s2.current = n3, () => {
467
- s2.current = null, n3.dispose();
426
+ return c2.current = n2, () => {
427
+ c2.current = null, n2.dispose();
468
428
  };
469
- }, []), q.useEffect(() => {
470
- s2.current?.update(e2, x2);
429
+ }, []), z.useEffect(() => {
430
+ c2.current?.update(e2, C2);
471
431
  });
472
- let C2 = pe();
473
- q.useEffect(() => {
474
- C2 !== null && C2.options.syncCrosshair && C2.state.setCrosshairTime(d2 === null ? null : d2.t);
475
- }, [C2, d2]), q.useEffect(() => {
476
- C2 !== null && C2.options.syncCrosshair && d2 === null && s2.current?.applyExternalCrosshair(C2.state.crosshairTime);
432
+ let T2 = Y();
433
+ z.useEffect(() => {
434
+ T2 !== null && T2.options.syncCrosshair && T2.state.setCrosshairTime(d2 === null ? null : d2.t);
435
+ }, [T2, d2]), z.useEffect(() => {
436
+ T2 !== null && T2.options.syncCrosshair && d2 === null && c2.current?.applyExternalCrosshair(T2.state.crosshairTime);
477
437
  }, [
478
- C2,
479
- C2?.version,
438
+ T2,
439
+ T2?.version,
480
440
  d2
481
441
  ]);
482
- let T2 = q.useCallback((e3) => {
483
- s2.current?.handlePointerMove(e3.nativeEvent);
484
- }, []), D2 = q.useCallback(() => {
485
- s2.current?.handlePointerLeave();
486
- }, []), O2 = q.useCallback((e3) => {
487
- C2 === null || !C2.options.syncSelection || d2 === null || C2.state.setSelectedTime(d2.t);
488
- }, [C2, d2]), k2 = e2.width ?? 800, A2 = e2.height ?? 300, j2 = e2.sparkline === true || e2.sparkline !== false && k2 < 150, N2 = e2.ariaLabel ?? c2?.ariaLabel ?? "Line chart", P2 = q.useMemo(() => {
489
- if (d2 === null || c2 === null) return [];
490
- let t3 = [], { personalization: n3, series: r3, secondarySeriesList: a3, stackedLayout: o3, primaryColorOverride: s3 } = c2, l2 = n3.palette[n3.theme], u3 = ee(S(n3.palette, n3.theme), l2, r3.length > 0 && i(r3.values, r3.length - 1) >= i(r3.values, 0)), f3 = s3 ?? M(u3);
442
+ let ee2 = z.useCallback((e3) => {
443
+ c2.current?.handlePointerMove(e3.nativeEvent);
444
+ }, []), E2 = z.useCallback(() => {
445
+ c2.current?.handlePointerLeave();
446
+ }, []), te2 = z.useCallback((e3) => {
447
+ T2 === null || !T2.options.syncSelection || d2 === null || T2.state.setSelectedTime(d2.t);
448
+ }, [T2, d2]), D2 = e2.width ?? 800, k2 = e2.height ?? 300, A2 = e2.sparkline === true || e2.sparkline !== false && D2 < 150, j2 = e2.ariaLabel ?? l2?.ariaLabel ?? "Line chart", M2 = z.useMemo(() => {
449
+ if (d2 === null || l2 === null) return [];
450
+ let t3 = [], { personalization: r3, series: i3, secondarySeriesList: a3, stackedLayout: o3, primaryColorOverride: s2 } = l2, c3 = r3.palette[r3.theme], u3 = se(b(r3.palette, r3.theme), c3, i3.length > 0 && n(i3.values, i3.length - 1) >= n(i3.values, 0)), f3 = s2 ?? O(u3);
491
451
  t3.push({
492
452
  id: e2.series?.[0]?.id ?? "primary",
493
453
  label: e2.series?.[0]?.label ?? e2.series?.[0]?.id ?? "Price",
494
454
  color: f3,
495
455
  value: d2.value
496
456
  });
497
- for (let n4 = 0; n4 < a3.length; n4++) {
498
- let r4 = a3[n4], s4 = e2.series?.[n4 + 1], c3 = r4.ingested.length > 0 ? K(r4.ingested.times, d2.t) : -1, l3 = o3 === null ? r4.ingested.values : o3.tops[n4 + 1], u4 = c3 >= 0 ? i(l3, c3) : NaN;
457
+ for (let r4 = 0; r4 < a3.length; r4++) {
458
+ let i4 = a3[r4], s3 = e2.series?.[r4 + 1], c4 = i4.ingested.length > 0 ? oe(i4.ingested.times, d2.t) : -1, l3 = o3 === null ? i4.ingested.values : o3.tops[r4 + 1], u4 = c4 >= 0 ? n(l3, c4) : NaN;
499
459
  t3.push({
500
- id: s4?.id ?? `series-${n4 + 1}`,
501
- label: s4?.label ?? s4?.id ?? `Series ${n4 + 2}`,
502
- color: r4.color,
460
+ id: s3?.id ?? `series-${r4 + 1}`,
461
+ label: s3?.label ?? s3?.id ?? `Series ${r4 + 2}`,
462
+ color: i4.color,
503
463
  value: u4
504
464
  });
505
465
  }
506
- if (o3 === null && d2.idx >= 0 && d2.idx < r3.length) for (let e3 = 0; e3 < y2.length; e3++) {
507
- let n4 = y2[e3];
508
- if (n4.kind === "single") {
509
- let r4 = "";
510
- switch (n4.spec.type) {
466
+ if (o3 === null && d2.idx >= 0 && d2.idx < i3.length) for (let e3 = 0; e3 < y2.length; e3++) {
467
+ let r4 = y2[e3];
468
+ if (r4.kind === "single") {
469
+ let i4 = "";
470
+ switch (r4.spec.type) {
511
471
  case "sma":
512
- r4 = `SMA(${n4.spec.period})`;
472
+ i4 = `SMA(${r4.spec.period})`;
513
473
  break;
514
474
  case "ema":
515
- r4 = `EMA(${n4.spec.period})`;
475
+ i4 = `EMA(${r4.spec.period})`;
516
476
  break;
517
477
  case "wma":
518
- r4 = `WMA(${n4.spec.period})`;
478
+ i4 = `WMA(${r4.spec.period})`;
519
479
  break;
520
480
  }
521
- if (r4 === "") continue;
481
+ if (i4 === "") continue;
522
482
  t3.push({
523
- id: `${r4}-${e3}`,
524
- label: r4,
525
- color: n4.color,
526
- value: i(n4.values, d2.idx)
483
+ id: `${i4}-${e3}`,
484
+ label: i4,
485
+ color: r4.color,
486
+ value: n(r4.values, d2.idx)
527
487
  });
528
488
  } else {
529
- let r4 = n4.spec.period, a4 = n4.spec.multiplier;
489
+ let i4 = r4.spec.period, a4 = r4.spec.multiplier;
530
490
  t3.push({
531
491
  id: `bb-upper-${e3}`,
532
- label: `BB Upper(${r4}, ${a4})`,
533
- color: n4.color,
534
- value: i(n4.upper, d2.idx)
492
+ label: `BB Upper(${i4}, ${a4})`,
493
+ color: r4.color,
494
+ value: n(r4.upper, d2.idx)
535
495
  }), t3.push({
536
496
  id: `bb-mid-${e3}`,
537
- label: `BB Mid(${r4}, ${a4})`,
538
- color: n4.color,
539
- value: i(n4.middle, d2.idx)
497
+ label: `BB Mid(${i4}, ${a4})`,
498
+ color: r4.color,
499
+ value: n(r4.middle, d2.idx)
540
500
  }), t3.push({
541
501
  id: `bb-lower-${e3}`,
542
- label: `BB Lower(${r4}, ${a4})`,
543
- color: n4.color,
544
- value: i(n4.lower, d2.idx)
502
+ label: `BB Lower(${i4}, ${a4})`,
503
+ color: r4.color,
504
+ value: n(r4.lower, d2.idx)
545
505
  });
546
506
  }
547
507
  }
548
508
  return t3;
549
509
  }, [
550
510
  d2,
551
- c2,
511
+ l2,
552
512
  e2.series,
553
513
  y2
554
- ]), F2 = d2 === null || c2 === null ? null : we(e2.tooltip, {
514
+ ]), ne2 = d2 === null || l2 === null ? null : xe(e2.tooltip, {
555
515
  t: d2.t,
556
516
  value: d2.value,
557
517
  idx: d2.idx,
558
- seriesValues: P2,
518
+ seriesValues: M2,
559
519
  pointerX: d2.pointerX,
560
520
  pointerY: d2.pointerY,
561
- containerWidth: k2,
562
- containerHeight: A2,
563
- theme: c2.personalization.theme,
564
- palette: c2.personalization.palette,
565
- locale: c2.resolvedLocaleBase,
566
- timeZone: c2.resolvedTimeZone,
567
- formatter: c2.formatter
568
- }), I2 = p2 === null || c2 === null ? null : Ce(e2.extremeTooltip, {
521
+ containerWidth: D2,
522
+ containerHeight: k2,
523
+ theme: l2.personalization.theme,
524
+ palette: l2.personalization.palette,
525
+ locale: l2.resolvedLocaleBase,
526
+ timeZone: l2.resolvedTimeZone,
527
+ formatter: l2.formatter
528
+ }), re2 = p2 === null || l2 === null ? null : be(e2.extremeTooltip, {
569
529
  kind: p2.kind,
570
530
  barIdx: p2.idx,
571
531
  price: p2.price,
572
532
  t: p2.t,
573
533
  pointerX: p2.pointerX,
574
534
  pointerY: p2.pointerY,
575
- containerWidth: k2,
576
- containerHeight: A2,
577
- theme: c2.personalization.theme,
578
- palette: c2.personalization.palette,
579
- locale: c2.resolvedLocaleBase,
580
- timeZone: c2.resolvedTimeZone,
581
- formatter: c2.formatter
582
- }), L2 = h2 !== "live", R2 = c2 !== null && L2 && (c2.personalization.staleVisualization === "desaturate-pulse" || c2.personalization.staleVisualization === "desaturate-pulse + banner"), z2 = c2 !== null && L2 && (c2.personalization.staleVisualization === "banner" || c2.personalization.staleVisualization === "desaturate-pulse + banner"), B2 = {
535
+ containerWidth: D2,
536
+ containerHeight: k2,
537
+ theme: l2.personalization.theme,
538
+ palette: l2.personalization.palette,
539
+ locale: l2.resolvedLocaleBase,
540
+ timeZone: l2.resolvedTimeZone,
541
+ formatter: l2.formatter
542
+ }), N2 = h2 !== "live", ie2 = l2 !== null && N2 && (l2.personalization.staleVisualization === "desaturate-pulse" || l2.personalization.staleVisualization === "desaturate-pulse + banner"), P2 = l2 !== null && N2 && (l2.personalization.staleVisualization === "banner" || l2.personalization.staleVisualization === "desaturate-pulse + banner"), F2 = {
583
543
  position: "absolute",
584
544
  inset: 0,
585
545
  width: "100%",
586
546
  height: "100%"
587
- }, V2 = R2 ? {
547
+ }, I2 = ie2 ? {
588
548
  filter: "saturate(0.5)",
589
549
  ..._2 ? { opacity: 0.9 } : { animation: "tickyr-stale-pulse 1.2s ease-in-out infinite" }
590
- } : {}, H2 = {
591
- ...B2,
592
- ...V2
593
- }, U2 = {
594
- ...B2,
550
+ } : {}, L2 = {
551
+ ...F2,
552
+ ...I2
553
+ }, ae2 = {
554
+ ...F2,
595
555
  pointerEvents: "none",
596
- ...V2
597
- }, W2 = c2 === null ? null : c2.personalization.palette[c2.personalization.theme], G2 = W2 === null ? "" : M(W2.warn, 1), te2 = e2.chartBgColor ?? (c2?.personalization.theme === "dark" ? "#0c0d0e" : "#fafafa"), ne2 = h2 === "disconnected" ? "Connection lost" : "Live data paused", re2 = e2.staleBanner === false, ie2 = null;
598
- if (z2 && !re2 && c2 !== null) if (typeof e2.staleBanner == "function") {
556
+ ...I2
557
+ }, R2 = l2 === null ? null : l2.personalization.palette[l2.personalization.theme], ce2 = R2 === null ? "" : O(R2.warn, 1), B2 = e2.chartBgColor ?? (l2?.personalization.theme === "dark" ? "#0c0d0e" : "#fafafa"), U2 = h2 === "disconnected" ? "Connection lost" : "Live data paused", W2 = e2.staleBanner === false, G2 = null;
558
+ if (P2 && !W2 && l2 !== null) if (typeof e2.staleBanner == "function") {
599
559
  let t3 = e2.staleBanner({
600
560
  state: h2,
601
561
  liveSince: e2.liveSince,
602
- theme: c2.personalization.theme,
603
- palette: c2.personalization.palette
562
+ theme: l2.personalization.theme,
563
+ palette: l2.personalization.palette
604
564
  });
605
- ie2 = /* @__PURE__ */ J("div", {
565
+ G2 = /* @__PURE__ */ V("div", {
606
566
  style: {
607
567
  position: "absolute",
608
568
  top: 8,
@@ -615,53 +575,53 @@ var Te = q.forwardRef(function(e2, t2) {
615
575
  "aria-live": "polite",
616
576
  children: t3
617
577
  });
618
- } else ie2 = /* @__PURE__ */ Y("div", {
578
+ } else G2 = /* @__PURE__ */ H("div", {
619
579
  style: {
620
580
  position: "absolute",
621
581
  top: 8,
622
582
  left: "50%",
623
583
  transform: "translate(-50%, 0)",
624
- background: G2,
625
- color: te2,
584
+ background: ce2,
585
+ color: B2,
626
586
  padding: "5px 12px",
627
587
  borderRadius: 999,
628
588
  fontSize: 11,
629
589
  fontWeight: 600,
630
- fontFamily: E,
590
+ fontFamily: w,
631
591
  letterSpacing: "0.02em",
632
592
  whiteSpace: "nowrap",
633
593
  pointerEvents: "none",
634
594
  display: "inline-flex",
635
595
  alignItems: "center",
636
596
  gap: 6,
637
- boxShadow: c2.personalization.theme === "dark" ? "0 2px 8px rgba(0,0,0,0.4)" : "0 2px 8px rgba(0,0,0,0.15)",
597
+ boxShadow: l2.personalization.theme === "dark" ? "0 2px 8px rgba(0,0,0,0.4)" : "0 2px 8px rgba(0,0,0,0.15)",
638
598
  zIndex: 2,
639
599
  ..._2 ? {} : { animation: "tickyr-stale-banner-in 0.3s ease-out" }
640
600
  },
641
601
  "aria-live": "polite",
642
- children: [/* @__PURE__ */ J("span", {
602
+ children: [/* @__PURE__ */ V("span", {
643
603
  "aria-hidden": "true",
644
604
  style: {
645
605
  fontSize: 12,
646
606
  lineHeight: 1
647
607
  },
648
608
  children: "\u23F8"
649
- }), /* @__PURE__ */ J("span", { children: ne2 })]
609
+ }), /* @__PURE__ */ V("span", { children: U2 })]
650
610
  });
651
- let X2 = typeof e2.connectionIndicator == "function" ? e2.connectionIndicator : void 0, Z2 = null;
652
- if (c2 !== null) {
653
- let t3 = c2.personalization, n3 = t3.connectionIndicator;
654
- if (X2 !== void 0 || n3 !== "off") {
655
- let r3 = t3.legendPosition, i2 = r3 === "top-left" || r3 === "bottom-left", a3 = {
611
+ let q2 = typeof e2.connectionIndicator == "function" ? e2.connectionIndicator : void 0, J2 = null;
612
+ if (l2 !== null) {
613
+ let t3 = l2.personalization, n2 = t3.connectionIndicator;
614
+ if (q2 !== void 0 || n2 !== "off") {
615
+ let r3 = t3.legendPosition, i3 = r3 === "top-left" || r3 === "bottom-left", a3 = {
656
616
  position: "absolute",
657
617
  pointerEvents: "none",
658
618
  zIndex: 3,
659
619
  ...r3 === "top-left" || r3 === "top-right" ? { top: 4 } : { bottom: 4 },
660
- ...i2 ? { left: 4 } : { right: 4 }
620
+ ...i3 ? { left: 4 } : { right: 4 }
661
621
  };
662
- if (X2 !== void 0) Z2 = /* @__PURE__ */ J("div", {
622
+ if (q2 !== void 0) J2 = /* @__PURE__ */ V("div", {
663
623
  style: a3,
664
- children: X2({
624
+ children: q2({
665
625
  state: h2,
666
626
  liveSince: e2.liveSince,
667
627
  position: r3,
@@ -670,8 +630,8 @@ var Te = q.forwardRef(function(e2, t2) {
670
630
  })
671
631
  });
672
632
  else {
673
- let e3 = t3.palette[t3.theme], r4 = M(h2 === "live" ? e3.up : h2 === "stale" ? e3.warn : e3.down, 1), i3 = t3.theme === "dark" ? "#0c0d0e" : "#fafafa", o3 = h2 === "live" ? "live" : h2 === "stale" ? "stale" : "offline", s3 = t3.visualStyle === "Outline", c3 = n3 === "dot";
674
- Z2 = /* @__PURE__ */ Y("div", {
633
+ let e3 = t3.palette[t3.theme], r4 = O(h2 === "live" ? e3.up : h2 === "stale" ? e3.warn : e3.down, 1), i4 = t3.theme === "dark" ? "#0c0d0e" : "#fafafa", o3 = h2 === "live" ? "live" : h2 === "stale" ? "stale" : "offline", s2 = t3.visualStyle === "Outline", c3 = n2 === "dot";
634
+ J2 = /* @__PURE__ */ H("div", {
675
635
  style: {
676
636
  ...a3,
677
637
  display: "inline-flex",
@@ -683,76 +643,76 @@ var Te = q.forwardRef(function(e2, t2) {
683
643
  fontFamily: "system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
684
644
  fontSize: 10,
685
645
  fontWeight: 600,
686
- ...s3 ? {
687
- background: i3,
646
+ ...s2 ? {
647
+ background: i4,
688
648
  color: r4,
689
649
  border: `${c3 ? 1 : 1.4}px solid ${r4}`
690
650
  } : {
691
651
  background: r4,
692
- color: i3,
652
+ color: i4,
693
653
  border: "none"
694
654
  },
695
655
  ...h2 !== "live" && !_2 ? { animation: "tickyr-stale-pulse 1s ease-in-out infinite" } : {}
696
656
  },
697
657
  "aria-live": "polite",
698
658
  role: "status",
699
- children: [c3 && /* @__PURE__ */ J("span", {
659
+ children: [c3 && /* @__PURE__ */ V("span", {
700
660
  "aria-hidden": "true",
701
661
  style: {
702
662
  width: 6,
703
663
  height: 6,
704
664
  borderRadius: 999,
705
- background: s3 ? r4 : i3
665
+ background: s2 ? r4 : i4
706
666
  }
707
- }), /* @__PURE__ */ J("span", { children: o3 })]
667
+ }), /* @__PURE__ */ V("span", { children: o3 })]
708
668
  });
709
669
  }
710
670
  }
711
671
  }
712
- let Q2 = null;
713
- if (c2 !== null && c2.personalization.legend !== "off") {
714
- let t3 = c2.personalization, n3 = t3.palette[t3.theme], r3 = [];
672
+ let le2 = null;
673
+ if (l2 !== null && l2.personalization.legend !== "off") {
674
+ let t3 = l2.personalization, n2 = t3.palette[t3.theme], r3 = [];
715
675
  if (e2.series !== void 0 && e2.series.length > 0) {
716
- let t4 = e2.series[0], i2 = n3.categorical[0];
676
+ let t4 = e2.series[0], i3 = n2.categorical[0];
717
677
  r3.push({
718
678
  id: t4.id,
719
679
  label: t4.label ?? t4.id,
720
- color: t4.color ?? M(i2)
680
+ color: t4.color ?? O(i3)
721
681
  });
722
682
  }
723
- for (let t4 = 0; t4 < c2.secondarySeriesList.length; t4++) {
724
- let n4 = c2.secondarySeriesList[t4], i2 = e2.series?.[t4 + 1];
683
+ for (let t4 = 0; t4 < l2.secondarySeriesList.length; t4++) {
684
+ let n3 = l2.secondarySeriesList[t4], i3 = e2.series?.[t4 + 1];
725
685
  r3.push({
726
- id: i2?.id ?? `series-${t4 + 1}`,
727
- label: i2?.label ?? i2?.id ?? `Series ${t4 + 2}`,
728
- color: n4.color
686
+ id: i3?.id ?? `series-${t4 + 1}`,
687
+ label: i3?.label ?? i3?.id ?? `Series ${t4 + 2}`,
688
+ color: n3.color
729
689
  });
730
690
  }
731
691
  for (let e3 = 0; e3 < y2.length; e3++) {
732
- let t4 = y2[e3], n4;
692
+ let t4 = y2[e3], n3;
733
693
  switch (t4.spec.type) {
734
694
  case "sma":
735
- n4 = `SMA(${t4.spec.period})`;
695
+ n3 = `SMA(${t4.spec.period})`;
736
696
  break;
737
697
  case "ema":
738
- n4 = `EMA(${t4.spec.period})`;
698
+ n3 = `EMA(${t4.spec.period})`;
739
699
  break;
740
700
  case "wma":
741
- n4 = `WMA(${t4.spec.period})`;
701
+ n3 = `WMA(${t4.spec.period})`;
742
702
  break;
743
703
  case "bollinger":
744
- n4 = `BB(${t4.spec.period}, ${t4.spec.multiplier})`;
704
+ n3 = `BB(${t4.spec.period}, ${t4.spec.multiplier})`;
745
705
  break;
746
706
  }
747
707
  r3.push({
748
708
  id: `${t4.spec.type}-${e3}`,
749
- label: n4,
709
+ label: n3,
750
710
  color: t4.color
751
711
  });
752
712
  }
753
713
  if (r3.length > 0) {
754
- let e3 = t3.legendPosition === "top-left" || t3.legendPosition === "bottom-left", i2 = t3.legendPosition === "top-left" || t3.legendPosition === "top-right", a3 = t3.connectionIndicator !== "off" || X2 !== void 0, o3 = i2 && a3 ? 30 : 4, s3 = t3.legend !== "on-hover" || d2 !== null || p2 !== null, c3 = t3.theme === "dark" ? "rgba(20,21,23,0.78)" : "rgba(250,250,250,0.78)", l2 = M(n3.neutral, 0.92);
755
- Q2 = /* @__PURE__ */ J("div", {
714
+ let e3 = t3.legendPosition === "top-left" || t3.legendPosition === "bottom-left", i3 = t3.legendPosition === "top-left" || t3.legendPosition === "top-right", a3 = t3.connectionIndicator !== "off" || q2 !== void 0, o3 = i3 && a3 ? 30 : 4, s2 = t3.legend !== "on-hover" || d2 !== null || p2 !== null, c3 = t3.theme === "dark" ? "rgba(20,21,23,0.78)" : "rgba(250,250,250,0.78)", l3 = O(n2.neutral, 0.92);
715
+ le2 = /* @__PURE__ */ V("div", {
756
716
  style: {
757
717
  position: "absolute",
758
718
  zIndex: 2,
@@ -765,22 +725,22 @@ var Te = q.forwardRef(function(e2, t2) {
765
725
  borderRadius: 6,
766
726
  background: c3,
767
727
  backdropFilter: "blur(2px)",
768
- font: `500 11px/1.1 ${E}`,
728
+ font: `500 11px/1.1 ${w}`,
769
729
  letterSpacing: "0.01em",
770
- color: l2,
730
+ color: l3,
771
731
  transition: "opacity 0.15s ease-out",
772
- opacity: +!!s3,
773
- ...i2 ? { top: o3 } : { bottom: o3 },
732
+ opacity: +!!s2,
733
+ ...i3 ? { top: o3 } : { bottom: o3 },
774
734
  ...e3 ? { left: 4 } : { right: 4 }
775
735
  },
776
736
  "aria-label": "Legend",
777
- children: r3.map((e4) => /* @__PURE__ */ Y("span", {
737
+ children: r3.map((e4) => /* @__PURE__ */ H("span", {
778
738
  style: {
779
739
  display: "inline-flex",
780
740
  alignItems: "center",
781
741
  gap: 5
782
742
  },
783
- children: [/* @__PURE__ */ J("span", {
743
+ children: [/* @__PURE__ */ V("span", {
784
744
  "aria-hidden": "true",
785
745
  style: {
786
746
  width: 10,
@@ -790,97 +750,98 @@ var Te = q.forwardRef(function(e2, t2) {
790
750
  display: "inline-block",
791
751
  flex: "0 0 auto"
792
752
  }
793
- }), /* @__PURE__ */ J("span", { children: e4.label })]
753
+ }), /* @__PURE__ */ V("span", { children: e4.label })]
794
754
  }, e4.id))
795
755
  });
796
756
  }
797
757
  }
798
- return j2 ? /* @__PURE__ */ J("canvas", {
758
+ return A2 ? /* @__PURE__ */ V("canvas", {
799
759
  ref: a2,
800
760
  role: "img",
801
- "aria-label": N2,
761
+ "aria-label": j2,
802
762
  style: {
803
- width: `${k2}px`,
804
- height: `${A2}px`,
763
+ width: `${D2}px`,
764
+ height: `${k2}px`,
805
765
  display: "block"
806
766
  }
807
- }) : /* @__PURE__ */ Y("div", {
808
- ref: r2,
767
+ }) : /* @__PURE__ */ H("div", {
768
+ ref: i2,
809
769
  role: "img",
810
- "aria-label": N2,
811
- onPointerMove: T2,
812
- onPointerLeave: D2,
813
- onClick: O2,
770
+ "aria-label": j2,
771
+ onPointerMove: ee2,
772
+ onPointerLeave: E2,
773
+ onClick: te2,
814
774
  style: {
815
775
  position: "relative",
816
- width: `${k2}px`,
817
- height: `${A2}px`,
776
+ width: `${D2}px`,
777
+ height: `${k2}px`,
818
778
  display: "block"
819
779
  },
820
780
  children: [
821
- /* @__PURE__ */ J("canvas", {
781
+ /* @__PURE__ */ V("canvas", {
822
782
  ref: a2,
823
783
  "aria-hidden": "true",
824
- style: H2
784
+ style: L2
825
785
  }),
826
- /* @__PURE__ */ J("canvas", {
786
+ /* @__PURE__ */ V("canvas", {
827
787
  ref: o2,
828
788
  "aria-hidden": "true",
829
- style: U2
789
+ style: ae2
830
790
  }),
831
- Z2,
832
- ie2,
833
- Q2,
834
- F2,
835
- I2
791
+ J2,
792
+ G2,
793
+ le2,
794
+ ne2,
795
+ re2
836
796
  ]
837
797
  });
838
- }), Ee = "min", De = "flat", Oe = 0.6;
839
- function ke(e2) {
840
- let t2 = (0, Z.c)(36), n2, r2, i2, a2, o2, s2, c2;
841
- t2[0] === e2 ? (n2 = t2[1], r2 = t2[2], i2 = t2[3], a2 = t2[4], o2 = t2[5], s2 = t2[6], c2 = t2[7]) : ({ baseline: a2, fillType: o2, fillOpacity: s2, thresholdFill: c2, stacked: i2, ariaLabel: n2, ...r2 } = e2, t2[0] = e2, t2[1] = n2, t2[2] = r2, t2[3] = i2, t2[4] = a2, t2[5] = o2, t2[6] = s2, t2[7] = c2);
842
- let l2 = a2 === void 0 ? Ee : a2, u2 = o2 === void 0 ? De : o2, d2 = s2 === void 0 ? Oe : s2, f2 = i2 === true ? "additive" : i2 === "normalized" ? "normalized" : false, p2 = $(), m2 = e2.theme ?? p2.theme, h2 = e2.palette ?? p2.palette, g2 = e2.visualStyle ?? p2.visualStyle, _2;
843
- t2[8] !== p2.appTheme || t2[9] !== p2.osTheme || t2[10] !== m2 || t2[11] !== h2 || t2[12] !== g2 ? (_2 = N({
844
- theme: m2,
845
- palette: h2,
846
- osTheme: p2.osTheme,
847
- appTheme: p2.appTheme,
848
- visualStyle: g2
849
- }), t2[8] = p2.appTheme, t2[9] = p2.osTheme, t2[10] = m2, t2[11] = h2, t2[12] = g2, t2[13] = _2) : _2 = t2[13];
850
- let v2 = _2, y2 = v2.palette[v2.theme], b2;
851
- bb0: {
852
- if (c2 === false || c2 === void 0) {
853
- b2 = void 0;
854
- break bb0;
855
- }
856
- let e3;
857
- t2[14] === c2 ? e3 = t2[15] : (e3 = c2 === true ? {} : c2, t2[14] = c2, t2[15] = e3);
858
- let n3 = e3, r3;
859
- t2[16] !== n3.aboveColor || t2[17] !== y2 ? (r3 = n3.aboveColor ?? M(y2.up), t2[16] = n3.aboveColor, t2[17] = y2, t2[18] = r3) : r3 = t2[18];
860
- let i3 = r3, a3;
861
- t2[19] !== n3.belowColor || t2[20] !== y2 ? (a3 = n3.belowColor ?? M(y2.down), t2[19] = n3.belowColor, t2[20] = y2, t2[21] = a3) : a3 = t2[21];
862
- let o3 = a3, s3;
863
- t2[22] !== i3 || t2[23] !== o3 || t2[24] !== n3.value ? (s3 = {
864
- value: n3.value,
865
- aboveColor: i3,
866
- belowColor: o3
867
- }, t2[22] = i3, t2[23] = o3, t2[24] = n3.value, t2[25] = s3) : s3 = t2[25], b2 = s3;
868
- }
869
- let x2 = b2, S2;
870
- t2[26] !== l2 || t2[27] !== d2 || t2[28] !== u2 || t2[29] !== f2 || t2[30] !== x2 ? (S2 = {
871
- baseline: l2,
872
- fillType: u2,
873
- fillOpacity: d2
874
- }, x2 !== void 0 && (S2.threshold = x2), f2 !== false && (S2.stacked = f2), t2[26] = l2, t2[27] = d2, t2[28] = u2, t2[29] = f2, t2[30] = x2, t2[31] = S2) : S2 = t2[31];
875
- let C2 = S2, w2 = n2 ?? "Area chart", T2;
876
- return t2[32] !== C2 || t2[33] !== r2 || t2[34] !== w2 ? (T2 = /* @__PURE__ */ J(Te, {
877
- ...r2,
878
- ariaLabel: w2,
879
- areaFill: C2
880
- }), t2[32] = C2, t2[33] = r2, t2[34] = w2, t2[35] = T2) : T2 = t2[35], T2;
798
+ }), Ce = "min", we = "flat", Te = 0.6;
799
+ function Ee(e2) {
800
+ let { baseline: t2 = Ce, fillType: n2 = we, fillOpacity: r2 = Te, thresholdFill: i2, stacked: a2, ariaLabel: o2, ...s2 } = e2, c2 = a2 === true ? "additive" : a2 === "normalized" ? "normalized" : false, l2 = K(), u2 = z.useMemo(() => k({
801
+ theme: e2.theme ?? l2.theme,
802
+ palette: e2.palette ?? l2.palette,
803
+ osTheme: l2.osTheme,
804
+ appTheme: l2.appTheme,
805
+ visualStyle: e2.visualStyle ?? l2.visualStyle
806
+ }), [
807
+ e2.theme,
808
+ e2.palette,
809
+ e2.visualStyle,
810
+ l2.theme,
811
+ l2.palette,
812
+ l2.osTheme,
813
+ l2.appTheme,
814
+ l2.visualStyle
815
+ ]), d2 = u2.palette[u2.theme], f2 = z.useMemo(() => {
816
+ if (i2 === false || i2 === void 0) return;
817
+ let e3 = i2 === true ? {} : i2, t3 = e3.aboveColor ?? O(d2.up), n3 = e3.belowColor ?? O(d2.down);
818
+ return {
819
+ value: e3.value,
820
+ aboveColor: t3,
821
+ belowColor: n3
822
+ };
823
+ }, [i2, d2]), p2 = z.useMemo(() => {
824
+ let e3 = {
825
+ baseline: t2,
826
+ fillType: n2,
827
+ fillOpacity: r2
828
+ };
829
+ return f2 !== void 0 && (e3.threshold = f2), c2 !== false && (e3.stacked = c2), e3;
830
+ }, [
831
+ t2,
832
+ n2,
833
+ r2,
834
+ f2,
835
+ c2
836
+ ]);
837
+ return /* @__PURE__ */ V(Se, {
838
+ ...s2,
839
+ ariaLabel: o2 ?? "Area chart",
840
+ areaFill: p2
841
+ });
881
842
  }
882
- function Ae(e2) {
883
- let t2 = $(), n2 = q.useRef(null), r2 = q.useRef(null), a2 = q.useRef(null), o2 = q.useRef(null), [s2, c2] = q.useState(null), [l2, u2] = q.useState(null), d2 = q.useMemo(() => ({
843
+ function De(e2) {
844
+ let t2 = K(), r2 = z.useRef(null), i2 = z.useRef(null), a2 = z.useRef(null), o2 = z.useRef(null), [s2, c2] = z.useState(null), [l2, u2] = z.useState(null), d2 = z.useMemo(() => ({
884
845
  theme: t2.theme,
885
846
  palette: t2.palette,
886
847
  locale: t2.locale,
@@ -907,11 +868,11 @@ function Ae(e2) {
907
868
  t2.osTheme,
908
869
  t2.appTheme
909
870
  ]);
910
- q.useEffect(() => {
911
- let t3 = r2.current;
871
+ z.useEffect(() => {
872
+ let t3 = i2.current;
912
873
  if (t3 === null) return;
913
- let i2 = new T({
914
- container: n2.current,
874
+ let n2 = new C({
875
+ container: r2.current,
915
876
  staticCanvas: t3,
916
877
  dynamicCanvas: a2.current,
917
878
  initialProps: e2,
@@ -919,30 +880,30 @@ function Ae(e2) {
919
880
  onContextChange: c2,
920
881
  onHoverChange: u2
921
882
  });
922
- return o2.current = i2, () => {
923
- o2.current = null, i2.dispose();
883
+ return o2.current = n2, () => {
884
+ o2.current = null, n2.dispose();
924
885
  };
925
- }, []), q.useEffect(() => {
886
+ }, []), z.useEffect(() => {
926
887
  o2.current?.update(e2, d2);
927
888
  });
928
- let f2 = q.useCallback((e3) => {
889
+ let f2 = z.useCallback((e3) => {
929
890
  o2.current?.handlePointerMove(e3.nativeEvent);
930
- }, []), p2 = q.useCallback(() => {
891
+ }, []), p2 = z.useCallback(() => {
931
892
  o2.current?.handlePointerLeave();
932
- }, []), m2 = e2.width ?? 800, h2 = e2.height ?? 300, g2 = e2.sparkline === true || e2.sparkline !== false && m2 < 150, _2 = e2.ariaLabel ?? s2?.ariaLabel ?? "Bar chart", v2 = q.useMemo(() => {
893
+ }, []), m2 = e2.width ?? 800, h2 = e2.height ?? 300, g2 = e2.sparkline === true || e2.sparkline !== false && m2 < 150, _2 = e2.ariaLabel ?? s2?.ariaLabel ?? "Bar chart", v2 = z.useMemo(() => {
933
894
  if (l2 === null || s2 === null) return [];
934
- let t3 = [], { personalization: n3, secondarySeriesList: r3, primaryColor: a3 } = s2, o3 = n3.palette[n3.theme], c3 = a3 ?? M(l2.value >= 0 ? o3.up : o3.down, 1);
895
+ let t3 = [], { personalization: r3, secondarySeriesList: i3, primaryColor: a3 } = s2, o3 = r3.palette[r3.theme], c3 = a3 ?? O(l2.value >= 0 ? o3.up : o3.down, 1);
935
896
  t3.push({
936
897
  id: e2.series?.[0]?.id ?? "primary",
937
898
  label: e2.series?.[0]?.label ?? e2.series?.[0]?.id ?? "Value",
938
899
  color: c3,
939
900
  value: l2.value
940
901
  });
941
- for (let n4 = 0; n4 < r3.length; n4++) {
942
- let a4 = r3[n4], o4 = e2.series?.[n4 + 1], s3 = a4.ingested.length > 0 ? K(a4.ingested.times, l2.t) : -1, c4 = s3 >= 0 ? i(a4.ingested.values, s3) : NaN;
902
+ for (let r4 = 0; r4 < i3.length; r4++) {
903
+ let a4 = i3[r4], o4 = e2.series?.[r4 + 1], s3 = a4.ingested.length > 0 ? oe(a4.ingested.times, l2.t) : -1, c4 = s3 >= 0 ? n(a4.ingested.values, s3) : NaN;
943
904
  t3.push({
944
- id: o4?.id ?? `series-${n4 + 1}`,
945
- label: o4?.label ?? o4?.id ?? `Series ${n4 + 2}`,
905
+ id: o4?.id ?? `series-${r4 + 1}`,
906
+ label: o4?.label ?? o4?.id ?? `Series ${r4 + 2}`,
946
907
  color: a4.color,
947
908
  value: c4
948
909
  });
@@ -967,7 +928,7 @@ function Ae(e2) {
967
928
  timeZone: s2.resolvedTimeZone,
968
929
  formatter: s2.formatter
969
930
  };
970
- return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : /* @__PURE__ */ J(ye, {
931
+ return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : /* @__PURE__ */ V(_e, {
971
932
  t: l2.t,
972
933
  value: l2.value,
973
934
  idx: l2.idx,
@@ -982,29 +943,29 @@ function Ae(e2) {
982
943
  timeZone: s2.resolvedTimeZone,
983
944
  formatter: s2.formatter
984
945
  });
985
- })(), b2 = q.useMemo(() => {
946
+ })(), b2 = z.useMemo(() => {
986
947
  if (s2 === null || e2.series === void 0 || e2.series.length < 2) return [];
987
- let t3 = s2.personalization.palette[s2.personalization.theme], n3 = [], r3 = e2.series[0], i2 = s2.primaryColor ?? M(t3.up, 1);
988
- n3.push({
989
- color: i2,
948
+ let t3 = s2.personalization.palette[s2.personalization.theme], n2 = [], r3 = e2.series[0], i3 = s2.primaryColor ?? O(t3.up, 1);
949
+ n2.push({
950
+ color: i3,
990
951
  label: r3.label ?? r3.id
991
952
  });
992
953
  for (let t4 = 0; t4 < s2.secondarySeriesList.length; t4++) {
993
- let r4 = s2.secondarySeriesList[t4], i3 = e2.series[t4 + 1];
994
- n3.push({
954
+ let r4 = s2.secondarySeriesList[t4], i4 = e2.series[t4 + 1];
955
+ n2.push({
995
956
  color: r4.color,
996
- label: i3.label ?? i3.id
957
+ label: i4.label ?? i4.id
997
958
  });
998
959
  }
999
- return n3;
960
+ return n2;
1000
961
  }, [s2, e2.series]), x2 = null;
1001
962
  if (s2 !== null && b2.length > 0) {
1002
- let e3 = s2.personalization, t3 = e3.legend, n3 = e3.legendPosition;
1003
- t3 !== "off" && (t3 === "always" || t3 === "on-hover" && l2 !== null) && (x2 = /* @__PURE__ */ J("div", {
963
+ let e3 = s2.personalization, t3 = e3.legend, n2 = e3.legendPosition;
964
+ t3 !== "off" && (t3 === "always" || t3 === "on-hover" && l2 !== null) && (x2 = /* @__PURE__ */ V("div", {
1004
965
  style: {
1005
966
  position: "absolute",
1006
- ...n3 === "top-left" || n3 === "top-right" ? { top: 6 } : { bottom: 6 },
1007
- ...n3 === "top-left" || n3 === "bottom-left" ? { left: 8 } : { right: 8 },
967
+ ...n2 === "top-left" || n2 === "top-right" ? { top: 6 } : { bottom: 6 },
968
+ ...n2 === "top-left" || n2 === "bottom-left" ? { left: 8 } : { right: 8 },
1008
969
  pointerEvents: "none",
1009
970
  display: "flex",
1010
971
  gap: 12,
@@ -1018,13 +979,13 @@ function Ae(e2) {
1018
979
  color: e3.theme === "dark" ? "rgb(240,242,246)" : "rgb(20,22,26)"
1019
980
  },
1020
981
  role: "presentation",
1021
- children: b2.map((e4, t4) => /* @__PURE__ */ Y("span", {
982
+ children: b2.map((e4, t4) => /* @__PURE__ */ H("span", {
1022
983
  style: {
1023
984
  display: "inline-flex",
1024
985
  alignItems: "center",
1025
986
  gap: 5
1026
987
  },
1027
- children: [/* @__PURE__ */ J("span", {
988
+ children: [/* @__PURE__ */ V("span", {
1028
989
  "aria-hidden": "true",
1029
990
  style: {
1030
991
  width: 10,
@@ -1034,20 +995,20 @@ function Ae(e2) {
1034
995
  display: "inline-block",
1035
996
  flex: "0 0 auto"
1036
997
  }
1037
- }), /* @__PURE__ */ J("span", { children: e4.label })]
998
+ }), /* @__PURE__ */ V("span", { children: e4.label })]
1038
999
  }, t4))
1039
1000
  }));
1040
1001
  }
1041
- return g2 ? /* @__PURE__ */ J("div", {
1042
- ref: n2,
1002
+ return g2 ? /* @__PURE__ */ V("div", {
1003
+ ref: r2,
1043
1004
  style: {
1044
1005
  position: "relative",
1045
1006
  width: m2,
1046
1007
  height: h2
1047
1008
  },
1048
1009
  "aria-label": _2,
1049
- children: /* @__PURE__ */ J("canvas", {
1050
- ref: r2,
1010
+ children: /* @__PURE__ */ V("canvas", {
1011
+ ref: i2,
1051
1012
  style: {
1052
1013
  display: "block",
1053
1014
  width: m2,
@@ -1055,8 +1016,8 @@ function Ae(e2) {
1055
1016
  },
1056
1017
  "aria-hidden": "true"
1057
1018
  })
1058
- }) : /* @__PURE__ */ Y("div", {
1059
- ref: n2,
1019
+ }) : /* @__PURE__ */ H("div", {
1020
+ ref: r2,
1060
1021
  style: {
1061
1022
  position: "relative",
1062
1023
  width: m2,
@@ -1066,8 +1027,8 @@ function Ae(e2) {
1066
1027
  onPointerMove: f2,
1067
1028
  onPointerLeave: p2,
1068
1029
  children: [
1069
- /* @__PURE__ */ J("canvas", {
1070
- ref: r2,
1030
+ /* @__PURE__ */ V("canvas", {
1031
+ ref: i2,
1071
1032
  style: {
1072
1033
  display: "block",
1073
1034
  width: m2,
@@ -1075,7 +1036,7 @@ function Ae(e2) {
1075
1036
  },
1076
1037
  "aria-hidden": "true"
1077
1038
  }),
1078
- /* @__PURE__ */ J("canvas", {
1039
+ /* @__PURE__ */ V("canvas", {
1079
1040
  ref: a2,
1080
1041
  style: {
1081
1042
  display: "block",
@@ -1092,8 +1053,8 @@ function Ae(e2) {
1092
1053
  ]
1093
1054
  });
1094
1055
  }
1095
- var je = 12, Me = 180, Ne = 124;
1096
- function Pe(e2, t2) {
1056
+ var Z = 12, Oe = 180, ke = 124;
1057
+ function Ae(e2, t2) {
1097
1058
  return e2 === "light" ? {
1098
1059
  bg: "rgb(255, 255, 255)",
1099
1060
  fg: "rgb(20, 22, 26)",
@@ -1112,205 +1073,146 @@ function Pe(e2, t2) {
1112
1073
  downFg: "rgb(240, 242, 246)"
1113
1074
  };
1114
1075
  }
1115
- function Fe(e2) {
1116
- let t2 = (0, Z.c)(125), { t: n2, o: r2, h: i2, l: a2, c: o2, direction: s2, pointerX: c2, pointerY: l2, containerWidth: u2, containerHeight: d2, theme: f2, palette: p2, formatter: m2 } = e2, h2;
1117
- t2[0] !== p2 || t2[1] !== f2 ? (h2 = Pe(f2, p2), t2[0] = p2, t2[1] = f2, t2[2] = h2) : h2 = t2[2];
1118
- let g2 = h2, _2 = c2 > u2 - Me, v2 = l2 > d2 - Ne, y2;
1119
- t2[3] !== d2 || t2[4] !== u2 || t2[5] !== c2 || t2[6] !== l2 || t2[7] !== v2 || t2[8] !== _2 ? (y2 = _2 ? { right: `${u2 - c2 + je}px` } : { left: `${c2 + je}px` }, v2 ? y2.bottom = `${d2 - l2 + je}px` : y2.top = `${l2 + je}px`, t2[3] = d2, t2[4] = u2, t2[5] = c2, t2[6] = l2, t2[7] = v2, t2[8] = _2, t2[9] = y2) : y2 = t2[9];
1120
- let b2 = o2 - r2, x2, S2, C2, w2, T2, E2, D2, O2, k2, A2, j2, M2;
1121
- if (t2[10] !== o2 || t2[11] !== b2 || t2[12] !== g2.bg || t2[13] !== g2.border || t2[14] !== g2.downFg || t2[15] !== g2.fg || t2[16] !== g2.shadow || t2[17] !== g2.subtleFg || t2[18] !== g2.upFg || t2[19] !== s2 || t2[20] !== m2 || t2[21] !== i2 || t2[22] !== a2 || t2[23] !== r2 || t2[24] !== y2 || t2[25] !== n2) {
1122
- let e3 = Math.abs(b2);
1123
- x2 = r2 === 0 ? 0 : b2 / r2 * 100;
1124
- let c3 = s2 === "up" ? g2.upFg : s2 === "down" ? g2.downFg : g2.subtleFg;
1125
- S2 = b2 > 0 ? "+" : b2 < 0 ? "\u2212" : "";
1126
- let l3 = `1px solid ${g2.border}`;
1127
- t2[38] !== g2.bg || t2[39] !== g2.fg || t2[40] !== g2.shadow || t2[41] !== y2 || t2[42] !== l3 ? (k2 = {
1076
+ function je(e2) {
1077
+ let { t: t2, o: n2, h: r2, l: i2, c: a2, direction: o2, pointerX: s2, pointerY: c2, containerWidth: l2, containerHeight: u2, theme: d2, palette: f2, formatter: p2 } = e2, m2 = Ae(d2, f2), h2 = s2 > l2 - Oe, g2 = c2 > u2 - ke, _2 = h2 ? { right: `${l2 - s2 + Z}px` } : { left: `${s2 + Z}px` };
1078
+ g2 ? _2.bottom = `${u2 - c2 + Z}px` : _2.top = `${c2 + Z}px`;
1079
+ let v2 = a2 - n2, y2 = Math.abs(v2), b2 = n2 === 0 ? 0 : v2 / n2 * 100, x2 = o2 === "up" ? m2.upFg : o2 === "down" ? m2.downFg : m2.subtleFg, S2 = v2 > 0 ? "+" : v2 < 0 ? "\u2212" : "";
1080
+ return /* @__PURE__ */ H("div", {
1081
+ style: {
1128
1082
  position: "absolute",
1129
- ...y2,
1083
+ ..._2,
1130
1084
  pointerEvents: "none",
1131
- background: g2.bg,
1132
- color: g2.fg,
1085
+ background: m2.bg,
1086
+ color: m2.fg,
1133
1087
  padding: "8px 11px",
1134
1088
  borderRadius: 6,
1135
- border: l3,
1089
+ border: `1px solid ${m2.border}`,
1136
1090
  fontSize: 12,
1137
1091
  fontFamily: "system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
1138
1092
  lineHeight: 1.35,
1139
1093
  whiteSpace: "nowrap",
1140
- boxShadow: g2.shadow,
1094
+ boxShadow: m2.shadow,
1141
1095
  zIndex: 1,
1142
1096
  minWidth: 160
1143
- }, t2[38] = g2.bg, t2[39] = g2.fg, t2[40] = g2.shadow, t2[41] = y2, t2[42] = l3, t2[43] = k2) : k2 = t2[43], A2 = "status", j2 = "polite";
1144
- let u3;
1145
- t2[44] === g2.subtleFg ? u3 = t2[45] : (u3 = {
1146
- color: g2.subtleFg,
1147
- fontSize: 10.5,
1148
- letterSpacing: "0.02em",
1149
- textTransform: "uppercase",
1150
- fontWeight: 500,
1151
- marginBottom: 4
1152
- }, t2[44] = g2.subtleFg, t2[45] = u3);
1153
- let d3;
1154
- t2[46] !== m2 || t2[47] !== n2 ? (d3 = m2.formatDate(n2), t2[46] = m2, t2[47] = n2, t2[48] = d3) : d3 = t2[48];
1155
- let f3;
1156
- t2[49] !== m2 || t2[50] !== n2 ? (f3 = m2.formatTime(n2), t2[49] = m2, t2[50] = n2, t2[51] = f3) : f3 = t2[51], t2[52] !== u3 || t2[53] !== d3 || t2[54] !== f3 ? (M2 = /* @__PURE__ */ Y("div", {
1157
- style: u3,
1158
- children: [
1159
- d3,
1160
- " ",
1161
- f3
1162
- ]
1163
- }), t2[52] = u3, t2[53] = d3, t2[54] = f3, t2[55] = M2) : M2 = t2[55];
1164
- let p3;
1165
- t2[56] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p3 = {
1166
- display: "grid",
1167
- gridTemplateColumns: "auto 1fr",
1168
- columnGap: 12,
1169
- rowGap: 2,
1170
- fontVariantNumeric: "tabular-nums"
1171
- }, t2[56] = p3) : p3 = t2[56];
1172
- let h3;
1173
- t2[57] === g2.subtleFg ? h3 = t2[58] : (h3 = /* @__PURE__ */ J("span", {
1174
- style: {
1175
- color: g2.subtleFg,
1176
- fontWeight: 500
1177
- },
1178
- children: "O"
1179
- }), t2[57] = g2.subtleFg, t2[58] = h3);
1180
- let _3;
1181
- t2[59] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_3 = {
1182
- textAlign: "right",
1183
- fontWeight: 600
1184
- }, t2[59] = _3) : _3 = t2[59];
1185
- let v3;
1186
- t2[60] !== m2 || t2[61] !== r2 ? (v3 = m2.formatPrice(r2), t2[60] = m2, t2[61] = r2, t2[62] = v3) : v3 = t2[62];
1187
- let N3;
1188
- t2[63] === v3 ? N3 = t2[64] : (N3 = /* @__PURE__ */ J("span", {
1189
- style: _3,
1190
- children: v3
1191
- }), t2[63] = v3, t2[64] = N3);
1192
- let P3;
1193
- t2[65] === g2.subtleFg ? P3 = t2[66] : (P3 = /* @__PURE__ */ J("span", {
1194
- style: {
1195
- color: g2.subtleFg,
1196
- fontWeight: 500
1197
- },
1198
- children: "H"
1199
- }), t2[65] = g2.subtleFg, t2[66] = P3);
1200
- let F3;
1201
- t2[67] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (F3 = {
1202
- textAlign: "right",
1203
- fontWeight: 600
1204
- }, t2[67] = F3) : F3 = t2[67];
1205
- let I3;
1206
- t2[68] !== m2 || t2[69] !== i2 ? (I3 = m2.formatPrice(i2), t2[68] = m2, t2[69] = i2, t2[70] = I3) : I3 = t2[70];
1207
- let L2;
1208
- t2[71] === I3 ? L2 = t2[72] : (L2 = /* @__PURE__ */ J("span", {
1209
- style: F3,
1210
- children: I3
1211
- }), t2[71] = I3, t2[72] = L2);
1212
- let R2;
1213
- t2[73] === g2.subtleFg ? R2 = t2[74] : (R2 = /* @__PURE__ */ J("span", {
1214
- style: {
1215
- color: g2.subtleFg,
1216
- fontWeight: 500
1217
- },
1218
- children: "L"
1219
- }), t2[73] = g2.subtleFg, t2[74] = R2);
1220
- let z2;
1221
- t2[75] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z2 = {
1222
- textAlign: "right",
1223
- fontWeight: 600
1224
- }, t2[75] = z2) : z2 = t2[75];
1225
- let B2;
1226
- t2[76] !== m2 || t2[77] !== a2 ? (B2 = m2.formatPrice(a2), t2[76] = m2, t2[77] = a2, t2[78] = B2) : B2 = t2[78];
1227
- let V2;
1228
- t2[79] === B2 ? V2 = t2[80] : (V2 = /* @__PURE__ */ J("span", {
1229
- style: z2,
1230
- children: B2
1231
- }), t2[79] = B2, t2[80] = V2);
1232
- let H2;
1233
- t2[81] === g2.subtleFg ? H2 = t2[82] : (H2 = /* @__PURE__ */ J("span", {
1234
- style: {
1235
- color: g2.subtleFg,
1236
- fontWeight: 500
1237
- },
1238
- children: "C"
1239
- }), t2[81] = g2.subtleFg, t2[82] = H2);
1240
- let U2;
1241
- t2[83] === c3 ? U2 = t2[84] : (U2 = {
1242
- textAlign: "right",
1243
- fontWeight: 600,
1244
- color: c3
1245
- }, t2[83] = c3, t2[84] = U2);
1246
- let W2;
1247
- t2[85] !== o2 || t2[86] !== m2 ? (W2 = m2.formatPrice(o2), t2[85] = o2, t2[86] = m2, t2[87] = W2) : W2 = t2[87];
1248
- let G2;
1249
- t2[88] !== U2 || t2[89] !== W2 ? (G2 = /* @__PURE__ */ J("span", {
1250
- style: U2,
1251
- children: W2
1252
- }), t2[88] = U2, t2[89] = W2, t2[90] = G2) : G2 = t2[90], t2[91] !== h3 || t2[92] !== N3 || t2[93] !== P3 || t2[94] !== L2 || t2[95] !== R2 || t2[96] !== V2 || t2[97] !== H2 || t2[98] !== G2 ? (w2 = /* @__PURE__ */ Y("div", {
1253
- style: p3,
1254
- children: [
1255
- h3,
1256
- N3,
1257
- P3,
1258
- L2,
1259
- R2,
1260
- V2,
1261
- H2,
1262
- G2
1263
- ]
1264
- }), t2[91] = h3, t2[92] = N3, t2[93] = P3, t2[94] = L2, t2[95] = R2, t2[96] = V2, t2[97] = H2, t2[98] = G2, t2[99] = w2) : w2 = t2[99];
1265
- let K2 = `1px solid ${g2.border}`;
1266
- t2[100] !== g2.subtleFg || t2[101] !== K2 ? (D2 = {
1267
- marginTop: 4,
1268
- paddingTop: 4,
1269
- borderTop: K2,
1270
- color: g2.subtleFg,
1271
- fontWeight: 500,
1272
- display: "flex",
1273
- justifyContent: "space-between",
1274
- gap: 12,
1275
- fontVariantNumeric: "tabular-nums"
1276
- }, t2[100] = g2.subtleFg, t2[101] = K2, t2[102] = D2) : D2 = t2[102], t2[103] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O2 = /* @__PURE__ */ J("span", { children: "\u0394" }), t2[103] = O2) : O2 = t2[103], t2[104] === c3 ? C2 = t2[105] : (C2 = {
1277
- color: c3,
1278
- fontWeight: 600
1279
- }, t2[104] = c3, t2[105] = C2), T2 = S2, E2 = m2.formatPrice(e3), t2[10] = o2, t2[11] = b2, t2[12] = g2.bg, t2[13] = g2.border, t2[14] = g2.downFg, t2[15] = g2.fg, t2[16] = g2.shadow, t2[17] = g2.subtleFg, t2[18] = g2.upFg, t2[19] = s2, t2[20] = m2, t2[21] = i2, t2[22] = a2, t2[23] = r2, t2[24] = y2, t2[25] = n2, t2[26] = x2, t2[27] = S2, t2[28] = C2, t2[29] = w2, t2[30] = T2, t2[31] = E2, t2[32] = D2, t2[33] = O2, t2[34] = k2, t2[35] = A2, t2[36] = j2, t2[37] = M2;
1280
- } else x2 = t2[26], S2 = t2[27], C2 = t2[28], w2 = t2[29], T2 = t2[30], E2 = t2[31], D2 = t2[32], O2 = t2[33], k2 = t2[34], A2 = t2[35], j2 = t2[36], M2 = t2[37];
1281
- let N2;
1282
- t2[106] === x2 ? N2 = t2[107] : (N2 = Math.abs(x2).toFixed(2), t2[106] = x2, t2[107] = N2);
1283
- let P2;
1284
- t2[108] !== S2 || t2[109] !== C2 || t2[110] !== N2 || t2[111] !== T2 || t2[112] !== E2 ? (P2 = /* @__PURE__ */ Y("span", {
1285
- style: C2,
1286
- children: [
1287
- T2,
1288
- E2,
1289
- " (",
1290
- S2,
1291
- N2,
1292
- "%)"
1293
- ]
1294
- }), t2[108] = S2, t2[109] = C2, t2[110] = N2, t2[111] = T2, t2[112] = E2, t2[113] = P2) : P2 = t2[113];
1295
- let F2;
1296
- t2[114] !== P2 || t2[115] !== D2 || t2[116] !== O2 ? (F2 = /* @__PURE__ */ Y("div", {
1297
- style: D2,
1298
- children: [O2, P2]
1299
- }), t2[114] = P2, t2[115] = D2, t2[116] = O2, t2[117] = F2) : F2 = t2[117];
1300
- let I2;
1301
- return t2[118] !== w2 || t2[119] !== F2 || t2[120] !== k2 || t2[121] !== A2 || t2[122] !== j2 || t2[123] !== M2 ? (I2 = /* @__PURE__ */ Y("div", {
1302
- style: k2,
1303
- role: A2,
1304
- "aria-live": j2,
1097
+ },
1098
+ role: "status",
1099
+ "aria-live": "polite",
1305
1100
  children: [
1306
- M2,
1307
- w2,
1308
- F2
1101
+ /* @__PURE__ */ H("div", {
1102
+ style: {
1103
+ color: m2.subtleFg,
1104
+ fontSize: 10.5,
1105
+ letterSpacing: "0.02em",
1106
+ textTransform: "uppercase",
1107
+ fontWeight: 500,
1108
+ marginBottom: 4
1109
+ },
1110
+ children: [
1111
+ p2.formatDate(t2),
1112
+ " ",
1113
+ p2.formatTime(t2)
1114
+ ]
1115
+ }),
1116
+ /* @__PURE__ */ H("div", {
1117
+ style: {
1118
+ display: "grid",
1119
+ gridTemplateColumns: "auto 1fr",
1120
+ columnGap: 12,
1121
+ rowGap: 2,
1122
+ fontVariantNumeric: "tabular-nums"
1123
+ },
1124
+ children: [
1125
+ /* @__PURE__ */ V("span", {
1126
+ style: {
1127
+ color: m2.subtleFg,
1128
+ fontWeight: 500
1129
+ },
1130
+ children: "O"
1131
+ }),
1132
+ /* @__PURE__ */ V("span", {
1133
+ style: {
1134
+ textAlign: "right",
1135
+ fontWeight: 600
1136
+ },
1137
+ children: p2.formatPrice(n2)
1138
+ }),
1139
+ /* @__PURE__ */ V("span", {
1140
+ style: {
1141
+ color: m2.subtleFg,
1142
+ fontWeight: 500
1143
+ },
1144
+ children: "H"
1145
+ }),
1146
+ /* @__PURE__ */ V("span", {
1147
+ style: {
1148
+ textAlign: "right",
1149
+ fontWeight: 600
1150
+ },
1151
+ children: p2.formatPrice(r2)
1152
+ }),
1153
+ /* @__PURE__ */ V("span", {
1154
+ style: {
1155
+ color: m2.subtleFg,
1156
+ fontWeight: 500
1157
+ },
1158
+ children: "L"
1159
+ }),
1160
+ /* @__PURE__ */ V("span", {
1161
+ style: {
1162
+ textAlign: "right",
1163
+ fontWeight: 600
1164
+ },
1165
+ children: p2.formatPrice(i2)
1166
+ }),
1167
+ /* @__PURE__ */ V("span", {
1168
+ style: {
1169
+ color: m2.subtleFg,
1170
+ fontWeight: 500
1171
+ },
1172
+ children: "C"
1173
+ }),
1174
+ /* @__PURE__ */ V("span", {
1175
+ style: {
1176
+ textAlign: "right",
1177
+ fontWeight: 600,
1178
+ color: x2
1179
+ },
1180
+ children: p2.formatPrice(a2)
1181
+ })
1182
+ ]
1183
+ }),
1184
+ /* @__PURE__ */ H("div", {
1185
+ style: {
1186
+ marginTop: 4,
1187
+ paddingTop: 4,
1188
+ borderTop: `1px solid ${m2.border}`,
1189
+ color: m2.subtleFg,
1190
+ fontWeight: 500,
1191
+ display: "flex",
1192
+ justifyContent: "space-between",
1193
+ gap: 12,
1194
+ fontVariantNumeric: "tabular-nums"
1195
+ },
1196
+ children: [/* @__PURE__ */ V("span", { children: "\u0394" }), /* @__PURE__ */ H("span", {
1197
+ style: {
1198
+ color: x2,
1199
+ fontWeight: 600
1200
+ },
1201
+ children: [
1202
+ S2,
1203
+ p2.formatPrice(y2),
1204
+ " (",
1205
+ S2,
1206
+ Math.abs(b2).toFixed(2),
1207
+ "%)"
1208
+ ]
1209
+ })]
1210
+ })
1309
1211
  ]
1310
- }), t2[118] = w2, t2[119] = F2, t2[120] = k2, t2[121] = A2, t2[122] = j2, t2[123] = M2, t2[124] = I2) : I2 = t2[124], I2;
1212
+ });
1311
1213
  }
1312
- var Ie = 12, Le = 180, Re = 96;
1313
- function ze(e2) {
1214
+ var Q = 12, Me = 180, Ne = 96;
1215
+ function Pe(e2) {
1314
1216
  return e2 === "light" ? {
1315
1217
  bg: "rgb(255, 255, 255)",
1316
1218
  fg: "rgb(20, 22, 26)",
@@ -1325,192 +1227,146 @@ function ze(e2) {
1325
1227
  shadow: "0 8px 24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.40)"
1326
1228
  };
1327
1229
  }
1328
- function Be(e2) {
1329
- let t2 = (0, Z.c)(72), { bar: n2, avg20: r2, percentile: i2, pointerX: a2, pointerY: o2, containerWidth: s2, containerHeight: c2, theme: l2, formatter: u2 } = e2, d2;
1330
- t2[0] === l2 ? d2 = t2[1] : (d2 = ze(l2), t2[0] = l2, t2[1] = d2);
1331
- let f2 = d2, p2 = a2 > s2 - Le, m2 = o2 > c2 - Re, h2;
1332
- t2[2] !== c2 || t2[3] !== s2 || t2[4] !== a2 || t2[5] !== o2 || t2[6] !== m2 || t2[7] !== p2 ? (h2 = p2 ? { right: `${s2 - a2 + Ie}px` } : { left: `${a2 + Ie}px` }, m2 ? h2.bottom = `${c2 - o2 + Ie}px` : h2.top = `${o2 + Ie}px`, t2[2] = c2, t2[3] = s2, t2[4] = a2, t2[5] = o2, t2[6] = m2, t2[7] = p2, t2[8] = h2) : h2 = t2[8];
1333
- let g2 = r2 > 0 ? n2.v / r2 : 1, _2 = (g2 - 1) * 100, v2;
1334
- t2[9] === _2 ? v2 = t2[10] : (v2 = _2.toFixed(0), t2[9] = _2, t2[10] = v2);
1335
- let y2 = v2, b2 = g2 > 1 ? "+" : g2 < 1 ? "\u2212" : "", x2;
1336
- t2[11] === y2 ? x2 = t2[12] : (x2 = Math.abs(Number(y2)), t2[11] = y2, t2[12] = x2);
1337
- let S2 = x2, C2 = `1px solid ${f2.border}`, w2;
1338
- t2[13] !== f2.bg || t2[14] !== f2.fg || t2[15] !== f2.shadow || t2[16] !== h2 || t2[17] !== C2 ? (w2 = {
1339
- position: "absolute",
1340
- ...h2,
1341
- pointerEvents: "none",
1342
- background: f2.bg,
1343
- color: f2.fg,
1344
- padding: "8px 11px",
1345
- borderRadius: 6,
1346
- border: C2,
1347
- fontSize: 12,
1348
- fontFamily: "system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
1349
- lineHeight: 1.35,
1350
- whiteSpace: "nowrap",
1351
- boxShadow: f2.shadow,
1352
- zIndex: 1,
1353
- minWidth: 160
1354
- }, t2[13] = f2.bg, t2[14] = f2.fg, t2[15] = f2.shadow, t2[16] = h2, t2[17] = C2, t2[18] = w2) : w2 = t2[18];
1355
- let T2;
1356
- t2[19] === f2.subtleFg ? T2 = t2[20] : (T2 = {
1357
- color: f2.subtleFg,
1358
- fontSize: 10.5,
1359
- letterSpacing: "0.02em",
1360
- textTransform: "uppercase",
1361
- fontWeight: 500,
1362
- marginBottom: 4
1363
- }, t2[19] = f2.subtleFg, t2[20] = T2);
1364
- let E2;
1365
- t2[21] !== n2.t || t2[22] !== u2 ? (E2 = u2.formatDate(n2.t), t2[21] = n2.t, t2[22] = u2, t2[23] = E2) : E2 = t2[23];
1366
- let D2;
1367
- t2[24] !== n2.t || t2[25] !== u2 ? (D2 = u2.formatTime(n2.t), t2[24] = n2.t, t2[25] = u2, t2[26] = D2) : D2 = t2[26];
1368
- let O2;
1369
- t2[27] !== T2 || t2[28] !== E2 || t2[29] !== D2 ? (O2 = /* @__PURE__ */ Y("div", {
1370
- style: T2,
1371
- children: [
1372
- E2,
1373
- " ",
1374
- D2
1375
- ]
1376
- }), t2[27] = T2, t2[28] = E2, t2[29] = D2, t2[30] = O2) : O2 = t2[30];
1377
- let k2;
1378
- t2[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k2 = {
1379
- display: "grid",
1380
- gridTemplateColumns: "auto 1fr",
1381
- columnGap: 12,
1382
- rowGap: 2,
1383
- fontVariantNumeric: "tabular-nums"
1384
- }, t2[31] = k2) : k2 = t2[31];
1385
- let A2;
1386
- t2[32] === f2.subtleFg ? A2 = t2[33] : (A2 = /* @__PURE__ */ J("span", {
1387
- style: {
1388
- color: f2.subtleFg,
1389
- fontWeight: 500
1390
- },
1391
- children: "Volume"
1392
- }), t2[32] = f2.subtleFg, t2[33] = A2);
1393
- let j2;
1394
- t2[34] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (j2 = {
1395
- textAlign: "right",
1396
- fontWeight: 600
1397
- }, t2[34] = j2) : j2 = t2[34];
1398
- let M2;
1399
- t2[35] !== n2.v || t2[36] !== u2 ? (M2 = u2.formatNumber(n2.v), t2[35] = n2.v, t2[36] = u2, t2[37] = M2) : M2 = t2[37];
1400
- let N2;
1401
- t2[38] === M2 ? N2 = t2[39] : (N2 = /* @__PURE__ */ J("span", {
1402
- style: j2,
1403
- children: M2
1404
- }), t2[38] = M2, t2[39] = N2);
1405
- let P2;
1406
- t2[40] === f2.subtleFg ? P2 = t2[41] : (P2 = /* @__PURE__ */ J("span", {
1230
+ function Fe(e2) {
1231
+ let { bar: t2, avg20: n2, percentile: r2, pointerX: i2, pointerY: a2, containerWidth: o2, containerHeight: s2, theme: c2, formatter: l2 } = e2, u2 = Pe(c2), d2 = i2 > o2 - Me, f2 = a2 > s2 - Ne, p2 = d2 ? { right: `${o2 - i2 + Q}px` } : { left: `${i2 + Q}px` };
1232
+ f2 ? p2.bottom = `${s2 - a2 + Q}px` : p2.top = `${a2 + Q}px`;
1233
+ let m2 = n2 > 0 ? t2.v / n2 : 1, h2 = ((m2 - 1) * 100).toFixed(0), g2 = m2 > 1 ? "+" : m2 < 1 ? "\u2212" : "", _2 = Math.abs(Number(h2));
1234
+ return /* @__PURE__ */ H("div", {
1407
1235
  style: {
1408
- color: f2.subtleFg,
1409
- fontWeight: 500
1236
+ position: "absolute",
1237
+ ...p2,
1238
+ pointerEvents: "none",
1239
+ background: u2.bg,
1240
+ color: u2.fg,
1241
+ padding: "8px 11px",
1242
+ borderRadius: 6,
1243
+ border: `1px solid ${u2.border}`,
1244
+ fontSize: 12,
1245
+ fontFamily: "system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
1246
+ lineHeight: 1.35,
1247
+ whiteSpace: "nowrap",
1248
+ boxShadow: u2.shadow,
1249
+ zIndex: 1,
1250
+ minWidth: 160
1410
1251
  },
1411
- children: "20-bar avg"
1412
- }), t2[40] = f2.subtleFg, t2[41] = P2);
1413
- let F2;
1414
- t2[42] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (F2 = {
1415
- textAlign: "right",
1416
- fontWeight: 600
1417
- }, t2[42] = F2) : F2 = t2[42];
1418
- let I2;
1419
- t2[43] !== r2 || t2[44] !== u2 ? (I2 = u2.formatNumber(r2), t2[43] = r2, t2[44] = u2, t2[45] = I2) : I2 = t2[45];
1420
- let L2;
1421
- t2[46] === I2 ? L2 = t2[47] : (L2 = /* @__PURE__ */ J("span", {
1422
- style: F2,
1423
- children: I2
1424
- }), t2[46] = I2, t2[47] = L2);
1425
- let R2;
1426
- t2[48] !== A2 || t2[49] !== N2 || t2[50] !== P2 || t2[51] !== L2 ? (R2 = /* @__PURE__ */ Y("div", {
1427
- style: k2,
1428
- children: [
1429
- A2,
1430
- N2,
1431
- P2,
1432
- L2
1433
- ]
1434
- }), t2[48] = A2, t2[49] = N2, t2[50] = P2, t2[51] = L2, t2[52] = R2) : R2 = t2[52];
1435
- let z2 = `1px solid ${f2.border}`, B2;
1436
- t2[53] !== f2.subtleFg || t2[54] !== z2 ? (B2 = {
1437
- marginTop: 4,
1438
- paddingTop: 4,
1439
- borderTop: z2,
1440
- color: f2.subtleFg,
1441
- fontWeight: 500,
1442
- display: "flex",
1443
- justifyContent: "space-between",
1444
- gap: 12,
1445
- fontVariantNumeric: "tabular-nums"
1446
- }, t2[53] = f2.subtleFg, t2[54] = z2, t2[55] = B2) : B2 = t2[55];
1447
- let V2, H2;
1448
- t2[56] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (V2 = /* @__PURE__ */ J("span", { children: "vs. avg" }), H2 = { fontWeight: 600 }, t2[56] = V2, t2[57] = H2) : (V2 = t2[56], H2 = t2[57]);
1449
- let U2;
1450
- t2[58] === i2 ? U2 = t2[59] : (U2 = Math.round(i2 * 100), t2[58] = i2, t2[59] = U2);
1451
- let W2;
1452
- t2[60] !== S2 || t2[61] !== b2 || t2[62] !== U2 ? (W2 = /* @__PURE__ */ Y("span", {
1453
- style: H2,
1454
- children: [
1455
- b2,
1456
- S2,
1457
- "% \xB7 p",
1458
- U2
1459
- ]
1460
- }), t2[60] = S2, t2[61] = b2, t2[62] = U2, t2[63] = W2) : W2 = t2[63];
1461
- let G2;
1462
- t2[64] !== B2 || t2[65] !== W2 ? (G2 = /* @__PURE__ */ Y("div", {
1463
- style: B2,
1464
- children: [V2, W2]
1465
- }), t2[64] = B2, t2[65] = W2, t2[66] = G2) : G2 = t2[66];
1466
- let K2;
1467
- return t2[67] !== R2 || t2[68] !== G2 || t2[69] !== w2 || t2[70] !== O2 ? (K2 = /* @__PURE__ */ Y("div", {
1468
- style: w2,
1469
1252
  role: "status",
1470
1253
  "aria-live": "polite",
1471
1254
  children: [
1472
- O2,
1473
- R2,
1474
- G2
1255
+ /* @__PURE__ */ H("div", {
1256
+ style: {
1257
+ color: u2.subtleFg,
1258
+ fontSize: 10.5,
1259
+ letterSpacing: "0.02em",
1260
+ textTransform: "uppercase",
1261
+ fontWeight: 500,
1262
+ marginBottom: 4
1263
+ },
1264
+ children: [
1265
+ l2.formatDate(t2.t),
1266
+ " ",
1267
+ l2.formatTime(t2.t)
1268
+ ]
1269
+ }),
1270
+ /* @__PURE__ */ H("div", {
1271
+ style: {
1272
+ display: "grid",
1273
+ gridTemplateColumns: "auto 1fr",
1274
+ columnGap: 12,
1275
+ rowGap: 2,
1276
+ fontVariantNumeric: "tabular-nums"
1277
+ },
1278
+ children: [
1279
+ /* @__PURE__ */ V("span", {
1280
+ style: {
1281
+ color: u2.subtleFg,
1282
+ fontWeight: 500
1283
+ },
1284
+ children: "Volume"
1285
+ }),
1286
+ /* @__PURE__ */ V("span", {
1287
+ style: {
1288
+ textAlign: "right",
1289
+ fontWeight: 600
1290
+ },
1291
+ children: l2.formatNumber(t2.v)
1292
+ }),
1293
+ /* @__PURE__ */ V("span", {
1294
+ style: {
1295
+ color: u2.subtleFg,
1296
+ fontWeight: 500
1297
+ },
1298
+ children: "20-bar avg"
1299
+ }),
1300
+ /* @__PURE__ */ V("span", {
1301
+ style: {
1302
+ textAlign: "right",
1303
+ fontWeight: 600
1304
+ },
1305
+ children: l2.formatNumber(n2)
1306
+ })
1307
+ ]
1308
+ }),
1309
+ /* @__PURE__ */ H("div", {
1310
+ style: {
1311
+ marginTop: 4,
1312
+ paddingTop: 4,
1313
+ borderTop: `1px solid ${u2.border}`,
1314
+ color: u2.subtleFg,
1315
+ fontWeight: 500,
1316
+ display: "flex",
1317
+ justifyContent: "space-between",
1318
+ gap: 12,
1319
+ fontVariantNumeric: "tabular-nums"
1320
+ },
1321
+ children: [/* @__PURE__ */ V("span", { children: "vs. avg" }), /* @__PURE__ */ H("span", {
1322
+ style: { fontWeight: 600 },
1323
+ children: [
1324
+ g2,
1325
+ _2,
1326
+ "% \xB7 p",
1327
+ Math.round(r2 * 100)
1328
+ ]
1329
+ })]
1330
+ })
1475
1331
  ]
1476
- }), t2[67] = R2, t2[68] = G2, t2[69] = w2, t2[70] = O2, t2[71] = K2) : K2 = t2[71], K2;
1332
+ });
1477
1333
  }
1478
- var Ve = q.forwardRef(function(e2, t2) {
1479
- let n2 = $(), a2 = q.useRef(null), o2 = q.useRef(null), s2 = q.useRef(null), c2 = q.useRef(null), [l2, u2] = q.useState(null), [d2, f2] = q.useState(null), [p2, m2] = q.useState(null), [h2, g2] = q.useState(null), [_2, v2] = q.useState("live"), [y2, b2] = q.useState(false), [x2, S2] = q.useState(false), [C2, w2] = q.useState(void 0), [T2, E2] = q.useState(void 0), [D2, O2] = q.useState(0), [k2, A2] = q.useState(false), j2 = q.useMemo(() => ({
1480
- theme: n2.theme,
1481
- palette: n2.palette,
1482
- locale: n2.locale,
1483
- timeZone: n2.timeZone,
1484
- visualStyle: n2.visualStyle,
1485
- outlineFillColor: n2.outlineFillColor,
1486
- outlineFillOpacity: n2.outlineFillOpacity,
1487
- cornerRadius: n2.cornerRadius,
1488
- borderWidth: n2.borderWidth,
1489
- accents: n2.accents,
1490
- osTheme: n2.osTheme,
1491
- appTheme: n2.appTheme
1334
+ var Ie = z.forwardRef(function(e2, r2) {
1335
+ let i2 = K(), a2 = z.useRef(null), o2 = z.useRef(null), s2 = z.useRef(null), c2 = z.useRef(null), [l2, u2] = z.useState(null), [d2, f2] = z.useState(null), [p2, m2] = z.useState(null), [h2, g2] = z.useState(null), [_2, v2] = z.useState("live"), [y2, b2] = z.useState(false), [x2, S2] = z.useState(false), [C2, w2] = z.useState(void 0), [T2, ee2] = z.useState(void 0), [E2, te2] = z.useState(0), [D2, k2] = z.useState(false), j2 = z.useMemo(() => ({
1336
+ theme: i2.theme,
1337
+ palette: i2.palette,
1338
+ locale: i2.locale,
1339
+ timeZone: i2.timeZone,
1340
+ visualStyle: i2.visualStyle,
1341
+ outlineFillColor: i2.outlineFillColor,
1342
+ outlineFillOpacity: i2.outlineFillOpacity,
1343
+ cornerRadius: i2.cornerRadius,
1344
+ borderWidth: i2.borderWidth,
1345
+ accents: i2.accents,
1346
+ osTheme: i2.osTheme,
1347
+ appTheme: i2.appTheme
1492
1348
  }), [
1493
- n2.theme,
1494
- n2.palette,
1495
- n2.locale,
1496
- n2.timeZone,
1497
- n2.visualStyle,
1498
- n2.outlineFillColor,
1499
- n2.outlineFillOpacity,
1500
- n2.cornerRadius,
1501
- n2.borderWidth,
1502
- n2.accents,
1503
- n2.osTheme,
1504
- n2.appTheme
1349
+ i2.theme,
1350
+ i2.palette,
1351
+ i2.locale,
1352
+ i2.timeZone,
1353
+ i2.visualStyle,
1354
+ i2.outlineFillColor,
1355
+ i2.outlineFillOpacity,
1356
+ i2.cornerRadius,
1357
+ i2.borderWidth,
1358
+ i2.accents,
1359
+ i2.osTheme,
1360
+ i2.appTheme
1505
1361
  ]);
1506
- q.useEffect(() => {
1507
- r();
1508
- }, []), q.useEffect(() => {
1509
- let t3 = o2.current;
1510
- if (t3 === null) return;
1511
- let n3 = new ne({
1362
+ z.useEffect(() => {
1363
+ t();
1364
+ }, []), z.useEffect(() => {
1365
+ let t2 = o2.current;
1366
+ if (t2 === null) return;
1367
+ let n2 = new ce({
1512
1368
  container: a2.current,
1513
- staticCanvas: t3,
1369
+ staticCanvas: t2,
1514
1370
  dynamicCanvas: s2.current,
1515
1371
  initialProps: e2,
1516
1372
  initialProvider: j2,
@@ -1521,17 +1377,17 @@ var Ve = q.forwardRef(function(e2, t2) {
1521
1377
  onReducedMotionChange: b2,
1522
1378
  onArmedToolChange: S2,
1523
1379
  onSelectedDrawingIdChange: w2,
1524
- onHoverDrawingIdChange: E2,
1380
+ onHoverDrawingIdChange: ee2,
1525
1381
  onMarkerHoverChange: g2,
1526
- onThemeFadeKeyChange: O2,
1527
- onOverDividerChange: A2
1382
+ onThemeFadeKeyChange: te2,
1383
+ onOverDividerChange: k2
1528
1384
  });
1529
- return c2.current = n3, () => {
1530
- c2.current = null, n3.dispose();
1385
+ return c2.current = n2, () => {
1386
+ c2.current = null, n2.dispose();
1531
1387
  };
1532
- }, []), q.useEffect(() => {
1388
+ }, []), z.useEffect(() => {
1533
1389
  c2.current?.update(e2, j2);
1534
- }), q.useImperativeHandle(t2, () => ({
1390
+ }), z.useImperativeHandle(r2, () => ({
1535
1391
  startDrawing(e3) {
1536
1392
  c2.current?.startDrawing(e3);
1537
1393
  },
@@ -1541,34 +1397,34 @@ var Ve = q.forwardRef(function(e2, t2) {
1541
1397
  get isDrawing() {
1542
1398
  return c2.current?.isDrawing() ?? false;
1543
1399
  },
1544
- onTick(e3, t3, n3 = 0) {
1545
- c2.current?.onTick(e3, t3, n3);
1400
+ onTick(e3, t2, n2 = 0) {
1401
+ c2.current?.onTick(e3, t2, n2);
1546
1402
  }
1547
1403
  }), []);
1548
- let N2 = q.useCallback((e3) => {
1404
+ let M2 = z.useCallback((e3) => {
1549
1405
  c2.current?.handlePointerMove(e3.nativeEvent);
1550
- }, []), F2 = q.useCallback((e3) => {
1406
+ }, []), ne2 = z.useCallback((e3) => {
1551
1407
  c2.current?.handlePointerDown(e3.nativeEvent);
1552
- }, []), I2 = q.useCallback((e3) => {
1408
+ }, []), re2 = z.useCallback((e3) => {
1553
1409
  c2.current?.handlePointerUp(e3.nativeEvent);
1554
- }, []), L2 = q.useCallback(() => {
1410
+ }, []), N2 = z.useCallback(() => {
1555
1411
  c2.current?.handlePointerLeave();
1556
- }, []), R2 = q.useCallback((e3) => {
1412
+ }, []), ie2 = z.useCallback((e3) => {
1557
1413
  c2.current?.handleWheel(e3.nativeEvent);
1558
- }, []), z2 = e2.width ?? 800, B2 = e2.height ?? 360, V2 = e2.sparkline === true || e2.sparkline !== false && z2 < 150, H2 = e2.ariaLabel ?? l2?.ariaLabel ?? "Candle chart", U2 = d2 === null || l2 === null ? null : (() => {
1414
+ }, []), P2 = e2.width ?? 800, F2 = e2.height ?? 360, I2 = e2.sparkline === true || e2.sparkline !== false && P2 < 150, L2 = e2.ariaLabel ?? l2?.ariaLabel ?? "Candle chart", ae2 = d2 === null || l2 === null ? null : (() => {
1559
1415
  if (d2.pane === "volume" && Number.isFinite(d2.v)) {
1560
1416
  if (e2.volumeBarTooltip === false) return null;
1561
- let t4 = l2.arr;
1562
- if (t4.volumes === null) return null;
1563
- let n3 = t4.length, r2 = Math.max(0, d2.idx - 19), a3 = 0, o3 = 0;
1564
- for (let e3 = r2; e3 <= d2.idx; e3++) {
1565
- let n4 = i(t4.volumes, e3);
1566
- Number.isFinite(n4) && (a3 += n4, o3++);
1417
+ let t3 = l2.arr;
1418
+ if (t3.volumes === null) return null;
1419
+ let r3 = t3.length, i3 = Math.max(0, d2.idx - 19), a3 = 0, o3 = 0;
1420
+ for (let e3 = i3; e3 <= d2.idx; e3++) {
1421
+ let r4 = n(t3.volumes, e3);
1422
+ Number.isFinite(r4) && (a3 += r4, o3++);
1567
1423
  }
1568
1424
  let s3 = o3 > 0 ? a3 / o3 : d2.v, c3 = 0, u3 = 0;
1569
- for (let e3 = 0; e3 < n3; e3++) {
1570
- let n4 = i(t4.volumes, e3);
1571
- Number.isFinite(n4) && (u3++, n4 < d2.v && c3++);
1425
+ for (let e3 = 0; e3 < r3; e3++) {
1426
+ let r4 = n(t3.volumes, e3);
1427
+ Number.isFinite(r4) && (u3++, r4 < d2.v && c3++);
1572
1428
  }
1573
1429
  let f3 = u3 > 0 ? c3 / u3 : 0, p3 = {
1574
1430
  bar: {
@@ -1580,8 +1436,8 @@ var Ve = q.forwardRef(function(e2, t2) {
1580
1436
  percentile: f3,
1581
1437
  pointerX: d2.pointerX,
1582
1438
  pointerY: d2.pointerY,
1583
- containerWidth: z2,
1584
- containerHeight: B2,
1439
+ containerWidth: P2,
1440
+ containerHeight: F2,
1585
1441
  theme: l2.personalization.theme,
1586
1442
  palette: l2.personalization.palette,
1587
1443
  locale: l2.resolvedLocaleBase,
@@ -1592,9 +1448,9 @@ var Ve = q.forwardRef(function(e2, t2) {
1592
1448
  bar: p3.bar,
1593
1449
  avg20: p3.avg20,
1594
1450
  percentile: p3.percentile
1595
- }) : /* @__PURE__ */ J(Be, { ...p3 });
1451
+ }) : /* @__PURE__ */ V(Fe, { ...p3 });
1596
1452
  }
1597
- let t3 = {
1453
+ let t2 = {
1598
1454
  t: d2.t,
1599
1455
  idx: d2.idx,
1600
1456
  o: d2.o,
@@ -1604,53 +1460,53 @@ var Ve = q.forwardRef(function(e2, t2) {
1604
1460
  direction: d2.direction,
1605
1461
  pointerX: d2.pointerX,
1606
1462
  pointerY: d2.pointerY,
1607
- containerWidth: z2,
1608
- containerHeight: B2,
1463
+ containerWidth: P2,
1464
+ containerHeight: F2,
1609
1465
  theme: l2.personalization.theme,
1610
1466
  palette: l2.personalization.palette,
1611
1467
  locale: l2.resolvedLocaleBase,
1612
1468
  timeZone: l2.resolvedTimeZone,
1613
1469
  formatter: l2.formatter
1614
1470
  };
1615
- return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : /* @__PURE__ */ J(Fe, { ...t3 });
1616
- })(), W2 = p2 === null || l2 === null ? null : Ce(e2.extremeTooltip, {
1471
+ return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t2) : /* @__PURE__ */ V(je, { ...t2 });
1472
+ })(), oe2 = p2 === null || l2 === null ? null : be(e2.extremeTooltip, {
1617
1473
  kind: p2.kind,
1618
1474
  barIdx: p2.idx,
1619
1475
  price: p2.price,
1620
1476
  t: p2.t,
1621
1477
  pointerX: p2.pointerX,
1622
1478
  pointerY: p2.pointerY,
1623
- containerWidth: z2,
1624
- containerHeight: B2,
1479
+ containerWidth: P2,
1480
+ containerHeight: F2,
1625
1481
  theme: l2.personalization.theme,
1626
1482
  palette: l2.personalization.palette,
1627
1483
  locale: l2.resolvedLocaleBase,
1628
1484
  timeZone: l2.resolvedTimeZone,
1629
1485
  formatter: l2.formatter
1630
- }), G2 = (() => {
1486
+ }), se2 = (() => {
1631
1487
  if (h2 === null || l2 === null) return null;
1632
- let t3 = h2.pointerX, n3 = h2.pointerY, r2 = l2.arr, a3 = r2.length > 0 ? i(r2.closes, r2.length - 1) : 0, o3 = l2.formatter, s3 = null;
1488
+ let t2 = h2.pointerX, r3 = h2.pointerY, i3 = l2.arr, a3 = i3.length > 0 ? n(i3.closes, i3.length - 1) : 0, o3 = l2.formatter, s3 = null;
1633
1489
  switch (h2.kind) {
1634
1490
  case "signal": {
1635
1491
  if (typeof e2.signalTooltip != "function" || e2.signals === void 0) return null;
1636
- let r3 = e2.signals[h2.idx];
1637
- if (r3 === void 0) return null;
1492
+ let n2 = e2.signals[h2.idx];
1493
+ if (n2 === void 0) return null;
1638
1494
  s3 = e2.signalTooltip({
1639
- marker: r3,
1640
- pointerX: t3,
1641
- pointerY: n3,
1495
+ marker: n2,
1496
+ pointerX: t2,
1497
+ pointerY: r3,
1642
1498
  formatter: o3
1643
1499
  });
1644
1500
  break;
1645
1501
  }
1646
1502
  case "order": {
1647
1503
  if (typeof e2.orderTooltip != "function" || e2.orders === void 0) return null;
1648
- let r3 = e2.orders[h2.idx];
1649
- if (r3 === void 0) return null;
1504
+ let n2 = e2.orders[h2.idx];
1505
+ if (n2 === void 0) return null;
1650
1506
  s3 = e2.orderTooltip({
1651
- marker: r3,
1652
- pointerX: t3,
1653
- pointerY: n3,
1507
+ marker: n2,
1508
+ pointerX: t2,
1509
+ pointerY: r3,
1654
1510
  formatter: o3
1655
1511
  });
1656
1512
  break;
@@ -1660,51 +1516,51 @@ var Ve = q.forwardRef(function(e2, t2) {
1660
1516
  s3 = e2.positionTooltip({
1661
1517
  marker: e2.position,
1662
1518
  lastClose: a3,
1663
- pointerX: t3,
1664
- pointerY: n3,
1519
+ pointerX: t2,
1520
+ pointerY: r3,
1665
1521
  formatter: o3
1666
1522
  });
1667
1523
  break;
1668
1524
  case "event": {
1669
1525
  if (typeof e2.eventTooltip != "function" || e2.events === void 0) return null;
1670
- let r3 = e2.events[h2.idx];
1671
- if (r3 === void 0) return null;
1526
+ let n2 = e2.events[h2.idx];
1527
+ if (n2 === void 0) return null;
1672
1528
  s3 = e2.eventTooltip({
1673
- marker: r3,
1674
- pointerX: t3,
1675
- pointerY: n3,
1529
+ marker: n2,
1530
+ pointerX: t2,
1531
+ pointerY: r3,
1676
1532
  formatter: o3
1677
1533
  });
1678
1534
  break;
1679
1535
  }
1680
1536
  }
1681
- return s3 === null ? null : /* @__PURE__ */ J("div", {
1537
+ return s3 === null ? null : /* @__PURE__ */ V("div", {
1682
1538
  style: {
1683
1539
  position: "absolute",
1684
- left: t3 + 12,
1685
- top: n3 + 12,
1540
+ left: t2 + 12,
1541
+ top: r3 + 12,
1686
1542
  pointerEvents: "none",
1687
1543
  zIndex: 3
1688
1544
  },
1689
1545
  children: s3
1690
1546
  });
1691
- })(), K2 = _2 !== "live", ee2 = l2 !== null && K2 && (l2.personalization.staleVisualization === "desaturate-pulse" || l2.personalization.staleVisualization === "desaturate-pulse + banner"), te2 = l2 !== null && K2 && (l2.personalization.staleVisualization === "banner" || l2.personalization.staleVisualization === "desaturate-pulse + banner"), re2 = ee2 ? {
1547
+ })(), R2 = _2 !== "live", B2 = l2 !== null && R2 && (l2.personalization.staleVisualization === "desaturate-pulse" || l2.personalization.staleVisualization === "desaturate-pulse + banner"), U2 = l2 !== null && R2 && (l2.personalization.staleVisualization === "banner" || l2.personalization.staleVisualization === "desaturate-pulse + banner"), W2 = B2 ? {
1692
1548
  filter: "saturate(0.5)",
1693
1549
  ...y2 ? { opacity: 0.9 } : { animation: "tickyr-stale-pulse 1.2s ease-in-out infinite" }
1694
- } : {}, ie2 = null;
1550
+ } : {}, G2 = null;
1695
1551
  if (l2 !== null) {
1696
- let e3 = l2.personalization, t3 = e3.connectionIndicator;
1697
- if (t3 !== "off") {
1698
- let n3 = e3.legendPosition === "top-left" || e3.legendPosition === "bottom-left", r2 = {
1552
+ let e3 = l2.personalization, t2 = e3.connectionIndicator;
1553
+ if (t2 !== "off") {
1554
+ let n2 = e3.legendPosition === "top-left" || e3.legendPosition === "bottom-left", r3 = {
1699
1555
  position: "absolute",
1700
1556
  pointerEvents: "none",
1701
1557
  zIndex: 3,
1702
1558
  ...e3.legendPosition === "top-left" || e3.legendPosition === "top-right" ? { top: "4px" } : { bottom: "4px" },
1703
- ...n3 ? { left: "4px" } : { right: "4px" }
1704
- }, i2 = e3.palette[e3.theme], a3 = M(_2 === "live" ? i2.up : _2 === "stale" ? i2.warn : i2.down, 1), o3 = e3.theme === "dark" ? "#0c0d0e" : "#fafafa", s3 = _2 === "live" ? "live" : _2 === "stale" ? "stale" : "offline", c3 = e3.visualStyle === "Outline", l3 = t3 === "dot";
1705
- ie2 = /* @__PURE__ */ Y("div", {
1559
+ ...n2 ? { left: "4px" } : { right: "4px" }
1560
+ }, i3 = e3.palette[e3.theme], a3 = O(_2 === "live" ? i3.up : _2 === "stale" ? i3.warn : i3.down, 1), o3 = e3.theme === "dark" ? "#0c0d0e" : "#fafafa", s3 = _2 === "live" ? "live" : _2 === "stale" ? "stale" : "offline", c3 = e3.visualStyle === "Outline", l3 = t2 === "dot";
1561
+ G2 = /* @__PURE__ */ H("div", {
1706
1562
  style: {
1707
- ...r2,
1563
+ ...r3,
1708
1564
  display: "inline-flex",
1709
1565
  alignItems: "center",
1710
1566
  gap: l3 ? 5 : 0,
@@ -1728,7 +1584,7 @@ var Ve = q.forwardRef(function(e2, t2) {
1728
1584
  "aria-live": "polite",
1729
1585
  role: "status",
1730
1586
  "aria-label": "Connection status",
1731
- children: [l3 && /* @__PURE__ */ J("span", {
1587
+ children: [l3 && /* @__PURE__ */ V("span", {
1732
1588
  "aria-hidden": "true",
1733
1589
  style: {
1734
1590
  width: 6,
@@ -1736,21 +1592,21 @@ var Ve = q.forwardRef(function(e2, t2) {
1736
1592
  borderRadius: 999,
1737
1593
  background: c3 ? a3 : o3
1738
1594
  }
1739
- }), /* @__PURE__ */ J("span", { children: s3 })]
1595
+ }), /* @__PURE__ */ V("span", { children: s3 })]
1740
1596
  });
1741
1597
  }
1742
1598
  }
1743
- let X2 = null;
1744
- if (te2 && e2.staleBanner !== false && l2 !== null) {
1745
- let t3 = l2.personalization.palette[l2.personalization.theme], n3 = M(t3.warn, 1), r2 = _2 === "disconnected" ? "Connection lost" : "Live data paused";
1599
+ let q2 = null;
1600
+ if (U2 && e2.staleBanner !== false && l2 !== null) {
1601
+ let t2 = l2.personalization.palette[l2.personalization.theme], n2 = O(t2.warn, 1), r3 = _2 === "disconnected" ? "Connection lost" : "Live data paused";
1746
1602
  if (typeof e2.staleBanner == "function") {
1747
- let t4 = e2.staleBanner({
1603
+ let t3 = e2.staleBanner({
1748
1604
  state: _2,
1749
1605
  liveSince: e2.liveSince,
1750
1606
  theme: l2.personalization.theme,
1751
1607
  palette: l2.personalization.palette
1752
1608
  });
1753
- X2 = /* @__PURE__ */ J("div", {
1609
+ q2 = /* @__PURE__ */ V("div", {
1754
1610
  style: {
1755
1611
  position: "absolute",
1756
1612
  top: 8,
@@ -1761,9 +1617,9 @@ var Ve = q.forwardRef(function(e2, t2) {
1761
1617
  ...y2 ? {} : { animation: "tickyr-stale-banner-in 0.3s ease-out" }
1762
1618
  },
1763
1619
  "aria-live": "polite",
1764
- children: t4
1620
+ children: t3
1765
1621
  });
1766
- } else X2 = /* @__PURE__ */ J("div", {
1622
+ } else q2 = /* @__PURE__ */ V("div", {
1767
1623
  style: {
1768
1624
  position: "absolute",
1769
1625
  top: 8,
@@ -1775,39 +1631,39 @@ var Ve = q.forwardRef(function(e2, t2) {
1775
1631
  },
1776
1632
  "aria-live": "polite",
1777
1633
  role: "status",
1778
- children: /* @__PURE__ */ Y("div", {
1634
+ children: /* @__PURE__ */ H("div", {
1779
1635
  style: {
1780
1636
  display: "inline-flex",
1781
1637
  alignItems: "center",
1782
1638
  gap: 6,
1783
1639
  padding: "4px 10px",
1784
1640
  borderRadius: 999,
1785
- background: P(n3, 0.15),
1786
- color: n3,
1641
+ background: A(n2, 0.15),
1642
+ color: n2,
1787
1643
  fontFamily: "system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
1788
1644
  fontSize: 12,
1789
1645
  fontWeight: 500,
1790
1646
  letterSpacing: 0.2,
1791
- border: `1px solid ${P(n3, 0.4)}`
1647
+ border: `1px solid ${A(n2, 0.4)}`
1792
1648
  },
1793
- children: [/* @__PURE__ */ J("span", {
1649
+ children: [/* @__PURE__ */ V("span", {
1794
1650
  "aria-hidden": "true",
1795
1651
  style: {
1796
1652
  display: "inline-flex",
1797
1653
  alignItems: "center"
1798
1654
  },
1799
- children: /* @__PURE__ */ Y("svg", {
1655
+ children: /* @__PURE__ */ H("svg", {
1800
1656
  width: "10",
1801
1657
  height: "10",
1802
1658
  viewBox: "0 0 10 10",
1803
1659
  fill: "currentColor",
1804
- children: [/* @__PURE__ */ J("rect", {
1660
+ children: [/* @__PURE__ */ V("rect", {
1805
1661
  x: "2",
1806
1662
  y: "1.5",
1807
1663
  width: "2",
1808
1664
  height: "7",
1809
1665
  rx: "0.5"
1810
- }), /* @__PURE__ */ J("rect", {
1666
+ }), /* @__PURE__ */ V("rect", {
1811
1667
  x: "6",
1812
1668
  y: "1.5",
1813
1669
  width: "2",
@@ -1815,79 +1671,79 @@ var Ve = q.forwardRef(function(e2, t2) {
1815
1671
  rx: "0.5"
1816
1672
  })]
1817
1673
  })
1818
- }), /* @__PURE__ */ J("span", { children: r2 })]
1674
+ }), /* @__PURE__ */ V("span", { children: r3 })]
1819
1675
  })
1820
1676
  });
1821
1677
  }
1822
- if (V2) return /* @__PURE__ */ Y("div", {
1678
+ if (I2) return /* @__PURE__ */ H("div", {
1823
1679
  ref: a2,
1824
1680
  style: {
1825
1681
  position: "relative",
1826
- width: z2,
1827
- height: B2
1682
+ width: P2,
1683
+ height: F2
1828
1684
  },
1829
- "aria-label": H2,
1830
- children: [/* @__PURE__ */ J("canvas", {
1685
+ "aria-label": L2,
1686
+ children: [/* @__PURE__ */ V("canvas", {
1831
1687
  ref: o2,
1832
1688
  style: {
1833
1689
  display: "block",
1834
- width: z2,
1835
- height: B2,
1836
- ...re2
1690
+ width: P2,
1691
+ height: F2,
1692
+ ...W2
1837
1693
  },
1838
1694
  "aria-hidden": "true"
1839
- }), X2]
1695
+ }), q2]
1840
1696
  });
1841
- let Z2 = `s-${D2}`;
1842
- return /* @__PURE__ */ Y("div", {
1697
+ let J2 = `s-${E2}`;
1698
+ return /* @__PURE__ */ H("div", {
1843
1699
  ref: a2,
1844
1700
  style: {
1845
1701
  position: "relative",
1846
- width: z2,
1847
- height: B2,
1848
- cursor: k2 ? "row-resize" : void 0
1702
+ width: P2,
1703
+ height: F2,
1704
+ cursor: D2 ? "row-resize" : void 0
1849
1705
  },
1850
- "aria-label": H2,
1851
- onPointerMove: N2,
1852
- onPointerDown: F2,
1853
- onPointerUp: I2,
1854
- onPointerLeave: L2,
1855
- onWheel: R2,
1706
+ "aria-label": L2,
1707
+ onPointerMove: M2,
1708
+ onPointerDown: ne2,
1709
+ onPointerUp: re2,
1710
+ onPointerLeave: N2,
1711
+ onWheel: ie2,
1856
1712
  children: [
1857
- /* @__PURE__ */ J("canvas", {
1713
+ /* @__PURE__ */ V("canvas", {
1858
1714
  ref: o2,
1859
1715
  style: {
1860
1716
  display: "block",
1861
- width: z2,
1862
- height: B2,
1863
- ...re2,
1864
- ...D2 > 0 && !y2 ? { animation: "tickyr-theme-fade 200ms ease-out" } : {}
1717
+ width: P2,
1718
+ height: F2,
1719
+ ...W2,
1720
+ ...E2 > 0 && !y2 ? { animation: "tickyr-theme-fade 200ms ease-out" } : {}
1865
1721
  },
1866
1722
  "aria-hidden": "true"
1867
- }, Z2),
1868
- /* @__PURE__ */ J("canvas", {
1723
+ }, J2),
1724
+ /* @__PURE__ */ V("canvas", {
1869
1725
  ref: s2,
1870
1726
  style: {
1871
1727
  display: "block",
1872
- width: z2,
1873
- height: B2,
1728
+ width: P2,
1729
+ height: F2,
1874
1730
  position: "absolute",
1875
1731
  inset: 0,
1876
1732
  pointerEvents: "none",
1877
- ...re2
1733
+ ...W2
1878
1734
  },
1879
1735
  "aria-hidden": "true"
1880
1736
  }),
1881
- U2,
1882
- W2,
1737
+ ae2,
1738
+ oe2,
1739
+ se2,
1883
1740
  G2,
1884
- ie2,
1885
- X2
1741
+ q2
1886
1742
  ]
1887
1743
  });
1888
1744
  });
1889
- function He(e2) {
1890
- let t2 = $(), n2 = q.useRef(null), r2 = q.useRef(null), i2 = q.useRef(null), a2 = q.useRef(null), [o2, s2] = q.useState(null), [c2, l2] = q.useState(null), u2 = q.useMemo(() => ({
1745
+ function Le(e2) {
1746
+ let t2 = K(), n2 = z.useRef(null), r2 = z.useRef(null), i2 = z.useRef(null), a2 = z.useRef(null), [o2, s2] = z.useState(null), [c2, l2] = z.useState(null), u2 = z.useMemo(() => ({
1891
1747
  theme: t2.theme,
1892
1748
  palette: t2.palette,
1893
1749
  locale: t2.locale,
@@ -1914,10 +1770,10 @@ function He(e2) {
1914
1770
  t2.osTheme,
1915
1771
  t2.appTheme
1916
1772
  ]);
1917
- q.useEffect(() => {
1773
+ z.useEffect(() => {
1918
1774
  let t3 = r2.current;
1919
1775
  if (t3 === null) return;
1920
- let o3 = new b({
1776
+ let o3 = new v({
1921
1777
  container: n2.current,
1922
1778
  staticCanvas: t3,
1923
1779
  dynamicCanvas: i2.current,
@@ -1929,12 +1785,12 @@ function He(e2) {
1929
1785
  return a2.current = o3, () => {
1930
1786
  a2.current = null, o3.dispose();
1931
1787
  };
1932
- }, []), q.useEffect(() => {
1788
+ }, []), z.useEffect(() => {
1933
1789
  a2.current?.update(e2, u2);
1934
1790
  });
1935
- let d2 = q.useCallback((e3) => {
1791
+ let d2 = z.useCallback((e3) => {
1936
1792
  a2.current?.handlePointerMove(e3.nativeEvent);
1937
- }, []), f2 = q.useCallback(() => {
1793
+ }, []), f2 = z.useCallback(() => {
1938
1794
  a2.current?.handlePointerLeave();
1939
1795
  }, []), p2 = e2.width ?? 800, m2 = e2.height ?? 300, h2 = e2.sparkline === true || e2.sparkline !== false && p2 < 150, g2 = e2.ariaLabel ?? o2?.ariaLabel ?? "Scatter chart", _2 = c2 === null || o2 === null ? null : (() => {
1940
1796
  let t3 = o2.seriesList[c2.seriesIdx], n3 = t3?.id ?? "primary", r3 = t3?.label ?? "Value", i3 = t3?.color ?? "", a3 = {
@@ -1956,15 +1812,15 @@ function He(e2) {
1956
1812
  timeZone: o2.resolvedTimeZone,
1957
1813
  formatter: o2.formatter
1958
1814
  };
1959
- return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(a3) : Ue(a3);
1960
- })(), v2 = (() => {
1815
+ return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(a3) : Re(a3);
1816
+ })(), y2 = (() => {
1961
1817
  if (o2 === null) return null;
1962
1818
  let e3 = o2.seriesList;
1963
1819
  if (e3.length < 2) return null;
1964
1820
  let t3 = o2.personalization, n3 = t3.legend;
1965
1821
  if (n3 !== "always" && !(n3 === "on-hover" && c2 !== null)) return null;
1966
1822
  let r3 = t3.legendPosition;
1967
- return /* @__PURE__ */ J("div", {
1823
+ return /* @__PURE__ */ V("div", {
1968
1824
  style: {
1969
1825
  position: "absolute",
1970
1826
  ...r3 === "top-left" || r3 === "top-right" ? { top: 6 } : { bottom: 6 },
@@ -1982,13 +1838,13 @@ function He(e2) {
1982
1838
  color: t3.theme === "dark" ? "rgb(240,242,246)" : "rgb(20,22,26)"
1983
1839
  },
1984
1840
  role: "presentation",
1985
- children: e3.map((e4) => /* @__PURE__ */ Y("span", {
1841
+ children: e3.map((e4) => /* @__PURE__ */ H("span", {
1986
1842
  style: {
1987
1843
  display: "inline-flex",
1988
1844
  alignItems: "center",
1989
1845
  gap: 5
1990
1846
  },
1991
- children: [/* @__PURE__ */ J("span", {
1847
+ children: [/* @__PURE__ */ V("span", {
1992
1848
  "aria-hidden": "true",
1993
1849
  style: {
1994
1850
  width: 10,
@@ -1998,11 +1854,11 @@ function He(e2) {
1998
1854
  display: "inline-block",
1999
1855
  flex: "0 0 auto"
2000
1856
  }
2001
- }), /* @__PURE__ */ J("span", { children: e4.label })]
1857
+ }), /* @__PURE__ */ V("span", { children: e4.label })]
2002
1858
  }, e4.id))
2003
1859
  });
2004
1860
  })();
2005
- return h2 ? /* @__PURE__ */ J("div", {
1861
+ return h2 ? /* @__PURE__ */ V("div", {
2006
1862
  ref: n2,
2007
1863
  style: {
2008
1864
  position: "relative",
@@ -2010,7 +1866,7 @@ function He(e2) {
2010
1866
  height: m2
2011
1867
  },
2012
1868
  "aria-label": g2,
2013
- children: /* @__PURE__ */ J("canvas", {
1869
+ children: /* @__PURE__ */ V("canvas", {
2014
1870
  ref: r2,
2015
1871
  style: {
2016
1872
  display: "block",
@@ -2019,7 +1875,7 @@ function He(e2) {
2019
1875
  },
2020
1876
  "aria-hidden": "true"
2021
1877
  })
2022
- }) : /* @__PURE__ */ Y("div", {
1878
+ }) : /* @__PURE__ */ H("div", {
2023
1879
  ref: n2,
2024
1880
  style: {
2025
1881
  position: "relative",
@@ -2030,7 +1886,7 @@ function He(e2) {
2030
1886
  onPointerMove: d2,
2031
1887
  onPointerLeave: f2,
2032
1888
  children: [
2033
- /* @__PURE__ */ J("canvas", {
1889
+ /* @__PURE__ */ V("canvas", {
2034
1890
  ref: r2,
2035
1891
  style: {
2036
1892
  display: "block",
@@ -2039,7 +1895,7 @@ function He(e2) {
2039
1895
  },
2040
1896
  "aria-hidden": "true"
2041
1897
  }),
2042
- /* @__PURE__ */ J("canvas", {
1898
+ /* @__PURE__ */ V("canvas", {
2043
1899
  ref: i2,
2044
1900
  style: {
2045
1901
  display: "block",
@@ -2051,14 +1907,14 @@ function He(e2) {
2051
1907
  },
2052
1908
  "aria-hidden": "true"
2053
1909
  }),
2054
- v2,
1910
+ y2,
2055
1911
  _2
2056
1912
  ]
2057
1913
  });
2058
1914
  }
2059
- function Ue(e2) {
1915
+ function Re(e2) {
2060
1916
  let t2 = e2.theme === "dark", n2 = t2 ? "rgb(34, 36, 42)" : "rgb(255, 255, 255)", r2 = t2 ? "rgb(240, 242, 246)" : "rgb(20, 22, 26)", i2 = t2 ? "rgba(240, 242, 246, 0.62)" : "rgba(20, 22, 26, 0.56)", a2 = t2 ? "rgba(255, 255, 255, 0.08)" : "rgba(15, 18, 23, 0.08)", o2 = t2 ? "0 8px 24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.40)" : "0 8px 24px rgba(15, 18, 23, 0.10), 0 2px 6px rgba(15, 18, 23, 0.06)";
2061
- return /* @__PURE__ */ Y("div", {
1917
+ return /* @__PURE__ */ H("div", {
2062
1918
  role: "tooltip",
2063
1919
  style: {
2064
1920
  position: "absolute",
@@ -2076,7 +1932,7 @@ function Ue(e2) {
2076
1932
  minWidth: 120
2077
1933
  },
2078
1934
  children: [
2079
- /* @__PURE__ */ Y("div", {
1935
+ /* @__PURE__ */ H("div", {
2080
1936
  style: {
2081
1937
  color: i2,
2082
1938
  fontSize: 10,
@@ -2085,7 +1941,7 @@ function Ue(e2) {
2085
1941
  alignItems: "center",
2086
1942
  gap: 5
2087
1943
  },
2088
- children: [/* @__PURE__ */ J("span", {
1944
+ children: [/* @__PURE__ */ V("span", {
2089
1945
  "aria-hidden": "true",
2090
1946
  style: {
2091
1947
  width: 8,
@@ -2094,20 +1950,20 @@ function Ue(e2) {
2094
1950
  background: e2.seriesColor,
2095
1951
  display: "inline-block"
2096
1952
  }
2097
- }), /* @__PURE__ */ Y("span", { children: [
1953
+ }), /* @__PURE__ */ H("span", { children: [
2098
1954
  e2.seriesLabel,
2099
1955
  " \xB7 #",
2100
1956
  e2.idx
2101
1957
  ] })]
2102
1958
  }),
2103
- /* @__PURE__ */ Y("div", { children: ["x: ", e2.formatter.formatNumber(e2.x, 2)] }),
2104
- /* @__PURE__ */ Y("div", { children: ["y: ", e2.formatter.formatNumber(e2.y, 2)] }),
2105
- e2.size !== null && /* @__PURE__ */ Y("div", { children: ["size: ", e2.formatter.formatNumber(e2.size, 2)] })
1959
+ /* @__PURE__ */ H("div", { children: ["x: ", e2.formatter.formatNumber(e2.x, 2)] }),
1960
+ /* @__PURE__ */ H("div", { children: ["y: ", e2.formatter.formatNumber(e2.y, 2)] }),
1961
+ e2.size !== null && /* @__PURE__ */ H("div", { children: ["size: ", e2.formatter.formatNumber(e2.size, 2)] })
2106
1962
  ]
2107
1963
  });
2108
1964
  }
2109
- function We(e2) {
2110
- let t2 = $(), n2 = q.useRef(null), r2 = q.useRef(null), i2 = q.useRef(null), a2 = q.useRef(null), [o2, s2] = q.useState(null), [c2, l2] = q.useState(null), u2 = q.useMemo(() => ({
1965
+ function ze(e2) {
1966
+ let t2 = K(), n2 = z.useRef(null), r2 = z.useRef(null), i2 = z.useRef(null), a2 = z.useRef(null), [o2, s2] = z.useState(null), [c2, l2] = z.useState(null), u2 = z.useMemo(() => ({
2111
1967
  theme: t2.theme,
2112
1968
  palette: t2.palette,
2113
1969
  locale: t2.locale,
@@ -2134,10 +1990,10 @@ function We(e2) {
2134
1990
  t2.osTheme,
2135
1991
  t2.appTheme
2136
1992
  ]);
2137
- q.useEffect(() => {
1993
+ z.useEffect(() => {
2138
1994
  let t3 = r2.current;
2139
1995
  if (t3 === null) return;
2140
- let o3 = new m({
1996
+ let o3 = new f({
2141
1997
  container: n2.current,
2142
1998
  staticCanvas: t3,
2143
1999
  dynamicCanvas: i2.current,
@@ -2149,14 +2005,14 @@ function We(e2) {
2149
2005
  return a2.current = o3, () => {
2150
2006
  a2.current = null, o3.dispose();
2151
2007
  };
2152
- }, []), q.useEffect(() => {
2008
+ }, []), z.useEffect(() => {
2153
2009
  a2.current?.update(e2, u2);
2154
2010
  });
2155
- let d2 = q.useCallback((e3) => {
2011
+ let d2 = z.useCallback((e3) => {
2156
2012
  a2.current?.handlePointerMove(e3.nativeEvent);
2157
- }, []), f2 = q.useCallback(() => {
2013
+ }, []), p2 = z.useCallback(() => {
2158
2014
  a2.current?.handlePointerLeave();
2159
- }, []), p2 = e2.width ?? 800, h2 = e2.height ?? 300, g2 = e2.sparkline === true || e2.sparkline !== false && p2 < 150, _2 = e2.ariaLabel ?? o2?.ariaLabel ?? "Histogram", v2 = c2 === null || o2 === null ? null : (() => {
2015
+ }, []), m2 = e2.width ?? 800, h2 = e2.height ?? 300, g2 = e2.sparkline === true || e2.sparkline !== false && m2 < 150, _2 = e2.ariaLabel ?? o2?.ariaLabel ?? "Histogram", v2 = c2 === null || o2 === null ? null : (() => {
2160
2016
  let t3 = {
2161
2017
  binIdx: c2.binIdx,
2162
2018
  binStart: c2.binStart,
@@ -2165,7 +2021,7 @@ function We(e2) {
2165
2021
  value: c2.value,
2166
2022
  pointerX: c2.pointerX,
2167
2023
  pointerY: c2.pointerY,
2168
- containerWidth: p2,
2024
+ containerWidth: m2,
2169
2025
  containerHeight: h2,
2170
2026
  theme: o2.personalization.theme,
2171
2027
  palette: o2.personalization.palette,
@@ -2173,50 +2029,50 @@ function We(e2) {
2173
2029
  timeZone: o2.resolvedTimeZone,
2174
2030
  formatter: o2.formatter
2175
2031
  };
2176
- return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : Ge(t3, o2.yAxisMode);
2032
+ return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : Be(t3, o2.yAxisMode);
2177
2033
  })();
2178
- return g2 ? /* @__PURE__ */ J("div", {
2034
+ return g2 ? /* @__PURE__ */ V("div", {
2179
2035
  ref: n2,
2180
2036
  style: {
2181
2037
  position: "relative",
2182
- width: p2,
2038
+ width: m2,
2183
2039
  height: h2
2184
2040
  },
2185
2041
  "aria-label": _2,
2186
- children: /* @__PURE__ */ J("canvas", {
2042
+ children: /* @__PURE__ */ V("canvas", {
2187
2043
  ref: r2,
2188
2044
  style: {
2189
2045
  display: "block",
2190
- width: p2,
2046
+ width: m2,
2191
2047
  height: h2
2192
2048
  },
2193
2049
  "aria-hidden": "true"
2194
2050
  })
2195
- }) : /* @__PURE__ */ Y("div", {
2051
+ }) : /* @__PURE__ */ H("div", {
2196
2052
  ref: n2,
2197
2053
  style: {
2198
2054
  position: "relative",
2199
- width: p2,
2055
+ width: m2,
2200
2056
  height: h2
2201
2057
  },
2202
2058
  "aria-label": _2,
2203
2059
  onPointerMove: d2,
2204
- onPointerLeave: f2,
2060
+ onPointerLeave: p2,
2205
2061
  children: [
2206
- /* @__PURE__ */ J("canvas", {
2062
+ /* @__PURE__ */ V("canvas", {
2207
2063
  ref: r2,
2208
2064
  style: {
2209
2065
  display: "block",
2210
- width: p2,
2066
+ width: m2,
2211
2067
  height: h2
2212
2068
  },
2213
2069
  "aria-hidden": "true"
2214
2070
  }),
2215
- /* @__PURE__ */ J("canvas", {
2071
+ /* @__PURE__ */ V("canvas", {
2216
2072
  ref: i2,
2217
2073
  style: {
2218
2074
  display: "block",
2219
- width: p2,
2075
+ width: m2,
2220
2076
  height: h2,
2221
2077
  position: "absolute",
2222
2078
  inset: 0,
@@ -2228,9 +2084,9 @@ function We(e2) {
2228
2084
  ]
2229
2085
  });
2230
2086
  }
2231
- function Ge(e2, t2) {
2087
+ function Be(e2, t2) {
2232
2088
  let n2 = e2.theme === "dark", r2 = n2 ? "rgb(34, 36, 42)" : "rgb(255, 255, 255)", i2 = n2 ? "rgb(240, 242, 246)" : "rgb(20, 22, 26)", a2 = n2 ? "rgba(240, 242, 246, 0.62)" : "rgba(20, 22, 26, 0.56)", o2 = n2 ? "rgba(255, 255, 255, 0.08)" : "rgba(15, 18, 23, 0.08)", s2 = n2 ? "0 8px 24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.40)" : "0 8px 24px rgba(15, 18, 23, 0.10), 0 2px 6px rgba(15, 18, 23, 0.06)", c2 = Math.min(e2.containerWidth - 160, e2.pointerX + 12), l2 = Math.min(e2.containerHeight - 80, e2.pointerY + 12), u2 = t2 === "frequency" ? "count" : t2 === "density" ? "density" : "cumulative";
2233
- return /* @__PURE__ */ Y("div", {
2089
+ return /* @__PURE__ */ H("div", {
2234
2090
  role: "tooltip",
2235
2091
  style: {
2236
2092
  position: "absolute",
@@ -2248,7 +2104,7 @@ function Ge(e2, t2) {
2248
2104
  minWidth: 140
2249
2105
  },
2250
2106
  children: [
2251
- /* @__PURE__ */ Y("div", {
2107
+ /* @__PURE__ */ H("div", {
2252
2108
  style: {
2253
2109
  color: a2,
2254
2110
  fontSize: 10,
@@ -2256,15 +2112,15 @@ function Ge(e2, t2) {
2256
2112
  },
2257
2113
  children: ["Bin #", e2.binIdx]
2258
2114
  }),
2259
- /* @__PURE__ */ Y("div", { children: [
2115
+ /* @__PURE__ */ H("div", { children: [
2260
2116
  "range: ",
2261
2117
  e2.formatter.formatNumber(e2.binStart, 2),
2262
2118
  " \u2013",
2263
2119
  " ",
2264
2120
  e2.formatter.formatNumber(e2.binEnd, 2)
2265
2121
  ] }),
2266
- /* @__PURE__ */ Y("div", { children: ["count: ", e2.formatter.formatNumber(e2.count, 0)] }),
2267
- t2 !== "frequency" && /* @__PURE__ */ Y("div", { children: [
2122
+ /* @__PURE__ */ H("div", { children: ["count: ", e2.formatter.formatNumber(e2.count, 0)] }),
2123
+ t2 !== "frequency" && /* @__PURE__ */ H("div", { children: [
2268
2124
  u2,
2269
2125
  ": ",
2270
2126
  e2.formatter.formatNumber(e2.value, 4)
@@ -2272,8 +2128,8 @@ function Ge(e2, t2) {
2272
2128
  ]
2273
2129
  });
2274
2130
  }
2275
- function Ke(e2) {
2276
- let t2 = $(), n2 = q.useRef(null), r2 = q.useRef(null), i2 = q.useRef(null), a2 = q.useRef(null), [o2, s2] = q.useState(null), [c2, l2] = q.useState(null), u2 = q.useMemo(() => ({
2131
+ function Ve(e2) {
2132
+ let t2 = K(), n2 = z.useRef(null), r2 = z.useRef(null), i2 = z.useRef(null), a2 = z.useRef(null), [o2, s2] = z.useState(null), [c2, l2] = z.useState(null), d2 = z.useMemo(() => ({
2277
2133
  theme: t2.theme,
2278
2134
  palette: t2.palette,
2279
2135
  locale: t2.locale,
@@ -2300,27 +2156,27 @@ function Ke(e2) {
2300
2156
  t2.osTheme,
2301
2157
  t2.appTheme
2302
2158
  ]);
2303
- q.useEffect(() => {
2159
+ z.useEffect(() => {
2304
2160
  let t3 = r2.current;
2305
2161
  if (t3 === null) return;
2306
- let o3 = new f({
2162
+ let o3 = new u({
2307
2163
  container: n2.current,
2308
2164
  staticCanvas: t3,
2309
2165
  dynamicCanvas: i2.current,
2310
2166
  initialProps: e2,
2311
- initialProvider: u2,
2167
+ initialProvider: d2,
2312
2168
  onContextChange: s2,
2313
2169
  onHoverChange: l2
2314
2170
  });
2315
2171
  return a2.current = o3, () => {
2316
2172
  a2.current = null, o3.dispose();
2317
2173
  };
2318
- }, []), q.useEffect(() => {
2319
- a2.current?.update(e2, u2);
2174
+ }, []), z.useEffect(() => {
2175
+ a2.current?.update(e2, d2);
2320
2176
  });
2321
- let d2 = q.useCallback((e3) => {
2177
+ let f2 = z.useCallback((e3) => {
2322
2178
  a2.current?.handlePointerMove(e3.nativeEvent);
2323
- }, []), p2 = q.useCallback(() => {
2179
+ }, []), p2 = z.useCallback(() => {
2324
2180
  a2.current?.handlePointerLeave();
2325
2181
  }, []), m2 = e2.width ?? 800, h2 = e2.height ?? 300, g2 = e2.ariaLabel ?? o2?.ariaLabel ?? "Heatmap", _2 = c2 === null || o2 === null ? null : (() => {
2326
2182
  let t3 = {
@@ -2339,9 +2195,9 @@ function Ke(e2) {
2339
2195
  timeZone: o2.resolvedTimeZone,
2340
2196
  formatter: o2.formatter
2341
2197
  };
2342
- return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : qe(t3);
2198
+ return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : He(t3);
2343
2199
  })();
2344
- return /* @__PURE__ */ Y("div", {
2200
+ return /* @__PURE__ */ H("div", {
2345
2201
  ref: n2,
2346
2202
  style: {
2347
2203
  position: "relative",
@@ -2349,10 +2205,10 @@ function Ke(e2) {
2349
2205
  height: h2
2350
2206
  },
2351
2207
  "aria-label": g2,
2352
- onPointerMove: d2,
2208
+ onPointerMove: f2,
2353
2209
  onPointerLeave: p2,
2354
2210
  children: [
2355
- /* @__PURE__ */ J("canvas", {
2211
+ /* @__PURE__ */ V("canvas", {
2356
2212
  ref: r2,
2357
2213
  style: {
2358
2214
  display: "block",
@@ -2361,7 +2217,7 @@ function Ke(e2) {
2361
2217
  },
2362
2218
  "aria-hidden": "true"
2363
2219
  }),
2364
- /* @__PURE__ */ J("canvas", {
2220
+ /* @__PURE__ */ V("canvas", {
2365
2221
  ref: i2,
2366
2222
  style: {
2367
2223
  display: "block",
@@ -2377,9 +2233,9 @@ function Ke(e2) {
2377
2233
  ]
2378
2234
  });
2379
2235
  }
2380
- function qe(e2) {
2236
+ function He(e2) {
2381
2237
  let t2 = e2.theme === "dark", n2 = t2 ? "rgb(34, 36, 42)" : "rgb(255, 255, 255)", r2 = t2 ? "rgb(240, 242, 246)" : "rgb(20, 22, 26)", i2 = t2 ? "rgba(240, 242, 246, 0.62)" : "rgba(20, 22, 26, 0.56)", a2 = t2 ? "rgba(255, 255, 255, 0.08)" : "rgba(15, 18, 23, 0.08)", o2 = t2 ? "0 8px 24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.40)" : "0 8px 24px rgba(15, 18, 23, 0.10), 0 2px 6px rgba(15, 18, 23, 0.06)";
2382
- return /* @__PURE__ */ Y("div", {
2238
+ return /* @__PURE__ */ H("div", {
2383
2239
  role: "tooltip",
2384
2240
  style: {
2385
2241
  position: "absolute",
@@ -2396,7 +2252,7 @@ function qe(e2) {
2396
2252
  pointerEvents: "none",
2397
2253
  minWidth: 140
2398
2254
  },
2399
- children: [/* @__PURE__ */ Y("div", {
2255
+ children: [/* @__PURE__ */ H("div", {
2400
2256
  style: {
2401
2257
  color: i2,
2402
2258
  fontSize: 10,
@@ -2407,14 +2263,14 @@ function qe(e2) {
2407
2263
  " \xB7 ",
2408
2264
  e2.colLabel
2409
2265
  ]
2410
- }), /* @__PURE__ */ J("div", { children: e2.value === null ? /* @__PURE__ */ J("span", {
2266
+ }), /* @__PURE__ */ V("div", { children: e2.value === null ? /* @__PURE__ */ V("span", {
2411
2267
  style: { color: i2 },
2412
2268
  children: "(no data)"
2413
- }) : /* @__PURE__ */ Y("span", { children: ["value: ", e2.formatter.formatNumber(e2.value, 3)] }) })]
2269
+ }) : /* @__PURE__ */ H("span", { children: ["value: ", e2.formatter.formatNumber(e2.value, 3)] }) })]
2414
2270
  });
2415
2271
  }
2416
- function Je(e2) {
2417
- let t2 = $(), n2 = q.useRef(null), r2 = q.useRef(null), i2 = q.useRef(null), a2 = q.useRef(null), [o2, c2] = q.useState(null), [l2, u2] = q.useState(null), d2 = q.useMemo(() => ({
2272
+ function Ue(e2) {
2273
+ let t2 = K(), n2 = z.useRef(null), r2 = z.useRef(null), i2 = z.useRef(null), o2 = z.useRef(null), [s2, c2] = z.useState(null), [l2, u2] = z.useState(null), d2 = z.useMemo(() => ({
2418
2274
  theme: t2.theme,
2419
2275
  palette: t2.palette,
2420
2276
  locale: t2.locale,
@@ -2441,10 +2297,10 @@ function Je(e2) {
2441
2297
  t2.osTheme,
2442
2298
  t2.appTheme
2443
2299
  ]);
2444
- q.useEffect(() => {
2300
+ z.useEffect(() => {
2445
2301
  let t3 = r2.current;
2446
2302
  if (t3 === null) return;
2447
- let o3 = new s({
2303
+ let s3 = new a({
2448
2304
  container: n2.current,
2449
2305
  staticCanvas: t3,
2450
2306
  dynamicCanvas: i2.current,
@@ -2453,17 +2309,17 @@ function Je(e2) {
2453
2309
  onContextChange: c2,
2454
2310
  onHoverChange: u2
2455
2311
  });
2456
- return a2.current = o3, () => {
2457
- a2.current = null, o3.dispose();
2312
+ return o2.current = s3, () => {
2313
+ o2.current = null, s3.dispose();
2458
2314
  };
2459
- }, []), q.useEffect(() => {
2460
- a2.current?.update(e2, d2);
2315
+ }, []), z.useEffect(() => {
2316
+ o2.current?.update(e2, d2);
2461
2317
  });
2462
- let f2 = q.useCallback((e3) => {
2463
- a2.current?.handlePointerMove(e3.nativeEvent);
2464
- }, []), p2 = q.useCallback(() => {
2465
- a2.current?.handlePointerLeave();
2466
- }, []), m2 = e2.width ?? 800, h2 = e2.height ?? 300, g2 = e2.ariaLabel ?? o2?.ariaLabel ?? "Depth chart", _2 = l2 === null || o2 === null ? null : (() => {
2318
+ let f2 = z.useCallback((e3) => {
2319
+ o2.current?.handlePointerMove(e3.nativeEvent);
2320
+ }, []), p2 = z.useCallback(() => {
2321
+ o2.current?.handlePointerLeave();
2322
+ }, []), m2 = e2.width ?? 800, h2 = e2.height ?? 300, g2 = e2.ariaLabel ?? s2?.ariaLabel ?? "Depth chart", _2 = l2 === null || s2 === null ? null : (() => {
2467
2323
  let t3 = {
2468
2324
  side: l2.side,
2469
2325
  price: l2.price,
@@ -2473,15 +2329,15 @@ function Je(e2) {
2473
2329
  pointerY: l2.pointerY,
2474
2330
  containerWidth: m2,
2475
2331
  containerHeight: h2,
2476
- theme: o2.personalization.theme,
2477
- palette: o2.personalization.palette,
2478
- locale: o2.resolvedLocaleBase,
2479
- timeZone: o2.resolvedTimeZone,
2480
- formatter: o2.formatter
2332
+ theme: s2.personalization.theme,
2333
+ palette: s2.personalization.palette,
2334
+ locale: s2.resolvedLocaleBase,
2335
+ timeZone: s2.resolvedTimeZone,
2336
+ formatter: s2.formatter
2481
2337
  };
2482
- return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : Ye(t3);
2338
+ return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : We(t3);
2483
2339
  })();
2484
- return /* @__PURE__ */ Y("div", {
2340
+ return /* @__PURE__ */ H("div", {
2485
2341
  ref: n2,
2486
2342
  style: {
2487
2343
  position: "relative",
@@ -2492,7 +2348,7 @@ function Je(e2) {
2492
2348
  onPointerMove: f2,
2493
2349
  onPointerLeave: p2,
2494
2350
  children: [
2495
- /* @__PURE__ */ J("canvas", {
2351
+ /* @__PURE__ */ V("canvas", {
2496
2352
  ref: r2,
2497
2353
  style: {
2498
2354
  display: "block",
@@ -2501,7 +2357,7 @@ function Je(e2) {
2501
2357
  },
2502
2358
  "aria-hidden": "true"
2503
2359
  }),
2504
- /* @__PURE__ */ J("canvas", {
2360
+ /* @__PURE__ */ V("canvas", {
2505
2361
  ref: i2,
2506
2362
  style: {
2507
2363
  display: "block",
@@ -2517,9 +2373,9 @@ function Je(e2) {
2517
2373
  ]
2518
2374
  });
2519
2375
  }
2520
- function Ye(e2) {
2376
+ function We(e2) {
2521
2377
  let t2 = e2.theme === "dark", n2 = t2 ? "rgb(34, 36, 42)" : "rgb(255, 255, 255)", r2 = t2 ? "rgb(240, 242, 246)" : "rgb(20, 22, 26)", i2 = t2 ? "rgba(240, 242, 246, 0.62)" : "rgba(20, 22, 26, 0.56)", a2 = t2 ? "rgba(255, 255, 255, 0.08)" : "rgba(15, 18, 23, 0.08)", o2 = t2 ? "0 8px 24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.40)" : "0 8px 24px rgba(15, 18, 23, 0.10), 0 2px 6px rgba(15, 18, 23, 0.06)", s2 = Math.min(e2.containerWidth - 180, e2.pointerX + 12), c2 = Math.min(e2.containerHeight - 90, e2.pointerY + 12), l2 = e2.side === "bid" ? "BID" : "ASK", u2 = e2.pctFromMid >= 0 ? "+" : "";
2522
- return /* @__PURE__ */ Y("div", {
2378
+ return /* @__PURE__ */ H("div", {
2523
2379
  role: "tooltip",
2524
2380
  style: {
2525
2381
  position: "absolute",
@@ -2537,7 +2393,7 @@ function Ye(e2) {
2537
2393
  minWidth: 160
2538
2394
  },
2539
2395
  children: [
2540
- /* @__PURE__ */ Y("div", {
2396
+ /* @__PURE__ */ H("div", {
2541
2397
  style: {
2542
2398
  color: i2,
2543
2399
  fontSize: 10,
@@ -2551,13 +2407,13 @@ function Ye(e2) {
2551
2407
  "%"
2552
2408
  ]
2553
2409
  }),
2554
- /* @__PURE__ */ Y("div", { children: ["price: ", e2.formatter.formatNumber(e2.price, 4)] }),
2555
- /* @__PURE__ */ Y("div", { children: ["cumulative: ", e2.formatter.formatNumber(e2.cumulativeVolume, 3)] })
2410
+ /* @__PURE__ */ H("div", { children: ["price: ", e2.formatter.formatNumber(e2.price, 4)] }),
2411
+ /* @__PURE__ */ H("div", { children: ["cumulative: ", e2.formatter.formatNumber(e2.cumulativeVolume, 3)] })
2556
2412
  ]
2557
2413
  });
2558
2414
  }
2559
- function Xe(e2) {
2560
- let t2 = $(), n2 = q.useRef(null), r2 = q.useRef(null), i2 = q.useRef(null), a2 = q.useRef(null), [o2, s2] = q.useState(null), [c2, l2] = q.useState(null), u2 = q.useMemo(() => ({
2415
+ function Ge(e2) {
2416
+ let t2 = K(), n2 = z.useRef(null), r2 = z.useRef(null), i2 = z.useRef(null), a2 = z.useRef(null), [o2, s2] = z.useState(null), [c2, l2] = z.useState(null), u2 = z.useMemo(() => ({
2561
2417
  theme: t2.theme,
2562
2418
  palette: t2.palette,
2563
2419
  locale: t2.locale,
@@ -2584,10 +2440,10 @@ function Xe(e2) {
2584
2440
  t2.osTheme,
2585
2441
  t2.appTheme
2586
2442
  ]), d2 = e2.innerRadiusDefault;
2587
- q.useEffect(() => {
2443
+ z.useEffect(() => {
2588
2444
  let t3 = r2.current;
2589
2445
  if (t3 === null) return;
2590
- let o3 = new y({
2446
+ let o3 = new _({
2591
2447
  container: n2.current,
2592
2448
  staticCanvas: t3,
2593
2449
  dynamicCanvas: i2.current,
@@ -2600,14 +2456,14 @@ function Xe(e2) {
2600
2456
  return a2.current = o3, () => {
2601
2457
  a2.current = null, o3.dispose();
2602
2458
  };
2603
- }, []), q.useEffect(() => {
2459
+ }, []), z.useEffect(() => {
2604
2460
  a2.current?.update(e2, u2);
2605
2461
  });
2606
- let f2 = q.useCallback((e3) => {
2462
+ let f2 = z.useCallback((e3) => {
2607
2463
  a2.current?.handlePointerMove(e3.nativeEvent);
2608
- }, []), p2 = q.useCallback(() => {
2464
+ }, []), p2 = z.useCallback(() => {
2609
2465
  a2.current?.handlePointerLeave();
2610
- }, []), m2 = e2.width ?? 480, h2 = e2.height ?? 360, g2 = e2.ariaLabel ?? o2?.ariaLabel ?? "Pie chart", _2 = c2 === null || o2 === null ? null : (() => {
2466
+ }, []), m2 = e2.width ?? 480, h2 = e2.height ?? 360, g2 = e2.ariaLabel ?? o2?.ariaLabel ?? "Pie chart", v2 = c2 === null || o2 === null ? null : (() => {
2611
2467
  let t3 = {
2612
2468
  idx: c2.idx,
2613
2469
  name: c2.name,
@@ -2624,8 +2480,8 @@ function Xe(e2) {
2624
2480
  timeZone: o2.resolvedTimeZone,
2625
2481
  formatter: o2.formatter
2626
2482
  };
2627
- return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : $e(t3);
2628
- })(), v2 = (() => {
2483
+ return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : Je(t3);
2484
+ })(), y2 = (() => {
2629
2485
  if (e2.centerLabel === void 0 || e2.centerLabel === false || o2 === null || o2.innerRadiusFraction <= 0) return null;
2630
2486
  let t3 = {
2631
2487
  totalValue: o2.totalValue,
@@ -2633,25 +2489,25 @@ function Xe(e2) {
2633
2489
  theme: o2.personalization.theme,
2634
2490
  palette: o2.personalization.palette
2635
2491
  }, n3;
2636
- return n3 = e2.centerLabel === true ? /* @__PURE__ */ Y("div", {
2492
+ return n3 = e2.centerLabel === true ? /* @__PURE__ */ H("div", {
2637
2493
  style: {
2638
2494
  textAlign: "center",
2639
2495
  lineHeight: 1.2
2640
2496
  },
2641
- children: [/* @__PURE__ */ J("div", {
2497
+ children: [/* @__PURE__ */ V("div", {
2642
2498
  style: {
2643
2499
  fontSize: 11,
2644
2500
  opacity: 0.65
2645
2501
  },
2646
2502
  children: "Total"
2647
- }), /* @__PURE__ */ J("div", {
2503
+ }), /* @__PURE__ */ V("div", {
2648
2504
  style: {
2649
2505
  fontSize: 18,
2650
2506
  fontWeight: 600
2651
2507
  },
2652
2508
  children: o2.formatter.formatNumber(o2.totalValue, 2)
2653
2509
  })]
2654
- }) : typeof e2.centerLabel == "string" ? e2.centerLabel : e2.centerLabel(t3), /* @__PURE__ */ J("div", {
2510
+ }) : typeof e2.centerLabel == "string" ? e2.centerLabel : e2.centerLabel(t3), /* @__PURE__ */ V("div", {
2655
2511
  style: {
2656
2512
  position: "absolute",
2657
2513
  inset: 0,
@@ -2665,7 +2521,7 @@ function Xe(e2) {
2665
2521
  children: n3
2666
2522
  });
2667
2523
  })();
2668
- return /* @__PURE__ */ Y("div", {
2524
+ return /* @__PURE__ */ H("div", {
2669
2525
  ref: n2,
2670
2526
  style: {
2671
2527
  position: "relative",
@@ -2676,7 +2532,7 @@ function Xe(e2) {
2676
2532
  onPointerMove: f2,
2677
2533
  onPointerLeave: p2,
2678
2534
  children: [
2679
- /* @__PURE__ */ J("canvas", {
2535
+ /* @__PURE__ */ V("canvas", {
2680
2536
  ref: r2,
2681
2537
  style: {
2682
2538
  display: "block",
@@ -2685,7 +2541,7 @@ function Xe(e2) {
2685
2541
  },
2686
2542
  "aria-hidden": "true"
2687
2543
  }),
2688
- /* @__PURE__ */ J("canvas", {
2544
+ /* @__PURE__ */ V("canvas", {
2689
2545
  ref: i2,
2690
2546
  style: {
2691
2547
  display: "block",
@@ -2697,28 +2553,26 @@ function Xe(e2) {
2697
2553
  },
2698
2554
  "aria-hidden": "true"
2699
2555
  }),
2700
- v2,
2701
- _2
2556
+ y2,
2557
+ v2
2702
2558
  ]
2703
2559
  });
2704
2560
  }
2705
- function Ze(e2) {
2706
- let t2 = (0, Z.c)(2), n2;
2707
- return t2[0] === e2 ? n2 = t2[1] : (n2 = /* @__PURE__ */ J(Xe, {
2561
+ function Ke(e2) {
2562
+ return /* @__PURE__ */ V(Ge, {
2708
2563
  ...e2,
2709
2564
  innerRadiusDefault: 0
2710
- }), t2[0] = e2, t2[1] = n2), n2;
2565
+ });
2711
2566
  }
2712
- function Qe(e2) {
2713
- let t2 = (0, Z.c)(2), n2;
2714
- return t2[0] === e2 ? n2 = t2[1] : (n2 = /* @__PURE__ */ J(Xe, {
2567
+ function qe(e2) {
2568
+ return /* @__PURE__ */ V(Ge, {
2715
2569
  ...e2,
2716
2570
  innerRadiusDefault: 0.5
2717
- }), t2[0] = e2, t2[1] = n2), n2;
2571
+ });
2718
2572
  }
2719
- function $e(e2) {
2573
+ function Je(e2) {
2720
2574
  let t2 = e2.theme === "dark", n2 = t2 ? "rgb(34, 36, 42)" : "rgb(255, 255, 255)", r2 = t2 ? "rgb(240, 242, 246)" : "rgb(20, 22, 26)", i2 = t2 ? "rgba(240, 242, 246, 0.62)" : "rgba(20, 22, 26, 0.56)", a2 = t2 ? "rgba(255, 255, 255, 0.08)" : "rgba(15, 18, 23, 0.08)", o2 = t2 ? "0 8px 24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.40)" : "0 8px 24px rgba(15, 18, 23, 0.10), 0 2px 6px rgba(15, 18, 23, 0.06)";
2721
- return /* @__PURE__ */ Y("div", {
2575
+ return /* @__PURE__ */ H("div", {
2722
2576
  role: "tooltip",
2723
2577
  style: {
2724
2578
  position: "absolute",
@@ -2736,7 +2590,7 @@ function $e(e2) {
2736
2590
  minWidth: 160
2737
2591
  },
2738
2592
  children: [
2739
- /* @__PURE__ */ Y("div", {
2593
+ /* @__PURE__ */ H("div", {
2740
2594
  style: {
2741
2595
  color: i2,
2742
2596
  fontSize: 10,
@@ -2745,7 +2599,7 @@ function $e(e2) {
2745
2599
  alignItems: "center",
2746
2600
  gap: 5
2747
2601
  },
2748
- children: [/* @__PURE__ */ J("span", {
2602
+ children: [/* @__PURE__ */ V("span", {
2749
2603
  "aria-hidden": "true",
2750
2604
  style: {
2751
2605
  width: 10,
@@ -2754,10 +2608,10 @@ function $e(e2) {
2754
2608
  background: e2.color,
2755
2609
  display: "inline-block"
2756
2610
  }
2757
- }), /* @__PURE__ */ J("span", { children: e2.name })]
2611
+ }), /* @__PURE__ */ V("span", { children: e2.name })]
2758
2612
  }),
2759
- /* @__PURE__ */ Y("div", { children: ["value: ", e2.formatter.formatNumber(e2.value, 2)] }),
2760
- /* @__PURE__ */ Y("div", { children: [
2613
+ /* @__PURE__ */ H("div", { children: ["value: ", e2.formatter.formatNumber(e2.value, 2)] }),
2614
+ /* @__PURE__ */ H("div", { children: [
2761
2615
  "percent: ",
2762
2616
  (e2.percent * 100).toFixed(1),
2763
2617
  "%"
@@ -2765,8 +2619,8 @@ function $e(e2) {
2765
2619
  ]
2766
2620
  });
2767
2621
  }
2768
- function et(e2) {
2769
- let t2 = $(), n2 = q.useRef(null), r2 = q.useRef(null), i2 = q.useRef(null), a2 = q.useRef(null), [o2, s2] = q.useState(null), [c2, l2] = q.useState(null), u2 = q.useMemo(() => ({
2622
+ function Ye(e2) {
2623
+ let t2 = K(), n2 = z.useRef(null), r2 = z.useRef(null), i2 = z.useRef(null), a2 = z.useRef(null), [o2, s2] = z.useState(null), [c2, l2] = z.useState(null), u2 = z.useMemo(() => ({
2770
2624
  theme: t2.theme,
2771
2625
  palette: t2.palette,
2772
2626
  locale: t2.locale,
@@ -2793,10 +2647,10 @@ function et(e2) {
2793
2647
  t2.osTheme,
2794
2648
  t2.appTheme
2795
2649
  ]);
2796
- q.useEffect(() => {
2650
+ z.useEffect(() => {
2797
2651
  let t3 = r2.current;
2798
2652
  if (t3 === null) return;
2799
- let o3 = new _({
2653
+ let o3 = new h({
2800
2654
  container: n2.current,
2801
2655
  staticCanvas: t3,
2802
2656
  dynamicCanvas: i2.current,
@@ -2808,16 +2662,16 @@ function et(e2) {
2808
2662
  return a2.current = o3, () => {
2809
2663
  a2.current = null, o3.dispose();
2810
2664
  };
2811
- }, []), q.useEffect(() => {
2665
+ }, []), z.useEffect(() => {
2812
2666
  a2.current?.update(e2, u2);
2813
2667
  });
2814
- let d2 = q.useCallback((e3) => {
2668
+ let d2 = z.useCallback((e3) => {
2815
2669
  a2.current?.handlePointerMove(e3.nativeEvent);
2816
- }, []), f2 = q.useCallback(() => {
2670
+ }, []), f2 = z.useCallback(() => {
2817
2671
  a2.current?.handlePointerLeave();
2818
- }, []), p2 = q.useCallback((e3) => {
2672
+ }, []), p2 = z.useCallback((e3) => {
2819
2673
  a2.current?.handleClick(e3.nativeEvent);
2820
- }, []), m2 = e2.width ?? 600, h2 = e2.height ?? 400, g2 = e2.ariaLabel ?? o2?.ariaLabel ?? "Treemap", v2 = c2 === null || o2 === null ? null : (() => {
2674
+ }, []), m2 = e2.width ?? 600, g2 = e2.height ?? 400, _2 = e2.ariaLabel ?? o2?.ariaLabel ?? "Treemap", v2 = c2 === null || o2 === null ? null : (() => {
2821
2675
  let t3 = {
2822
2676
  idx: c2.idx,
2823
2677
  name: c2.name,
@@ -2829,18 +2683,18 @@ function et(e2) {
2829
2683
  pointerX: c2.pointerX,
2830
2684
  pointerY: c2.pointerY,
2831
2685
  containerWidth: m2,
2832
- containerHeight: h2,
2686
+ containerHeight: g2,
2833
2687
  theme: o2.personalization.theme,
2834
2688
  palette: o2.personalization.palette,
2835
2689
  locale: o2.resolvedLocaleBase,
2836
2690
  timeZone: o2.resolvedTimeZone,
2837
2691
  formatter: o2.formatter
2838
2692
  };
2839
- return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : tt(t3);
2693
+ return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : Xe(t3);
2840
2694
  })(), y2 = (() => {
2841
2695
  if (o2 === null || !o2.showBreadcrumb) return null;
2842
2696
  let e3 = o2.personalization.theme === "dark", t3 = ["root", ...o2.currentPath];
2843
- return /* @__PURE__ */ J("div", {
2697
+ return /* @__PURE__ */ V("div", {
2844
2698
  style: {
2845
2699
  position: "absolute",
2846
2700
  left: 8,
@@ -2858,10 +2712,10 @@ function et(e2) {
2858
2712
  pointerEvents: "auto"
2859
2713
  },
2860
2714
  role: "navigation",
2861
- children: t3.map((e4, n3) => /* @__PURE__ */ Y(q.Fragment, { children: [n3 > 0 && /* @__PURE__ */ J("span", {
2715
+ children: t3.map((e4, n3) => /* @__PURE__ */ H(z.Fragment, { children: [n3 > 0 && /* @__PURE__ */ V("span", {
2862
2716
  style: { opacity: 0.5 },
2863
2717
  children: "\u203A"
2864
- }), /* @__PURE__ */ J("button", {
2718
+ }), /* @__PURE__ */ V("button", {
2865
2719
  type: "button",
2866
2720
  onClick: () => a2.current?.setPath(t3.slice(1, n3 + 1)),
2867
2721
  style: {
@@ -2877,33 +2731,33 @@ function et(e2) {
2877
2731
  })] }, n3))
2878
2732
  });
2879
2733
  })();
2880
- return /* @__PURE__ */ Y("div", {
2734
+ return /* @__PURE__ */ H("div", {
2881
2735
  ref: n2,
2882
2736
  style: {
2883
2737
  position: "relative",
2884
2738
  width: m2,
2885
- height: h2
2739
+ height: g2
2886
2740
  },
2887
- "aria-label": g2,
2741
+ "aria-label": _2,
2888
2742
  onPointerMove: d2,
2889
2743
  onPointerLeave: f2,
2890
2744
  onClick: p2,
2891
2745
  children: [
2892
- /* @__PURE__ */ J("canvas", {
2746
+ /* @__PURE__ */ V("canvas", {
2893
2747
  ref: r2,
2894
2748
  style: {
2895
2749
  display: "block",
2896
2750
  width: m2,
2897
- height: h2
2751
+ height: g2
2898
2752
  },
2899
2753
  "aria-hidden": "true"
2900
2754
  }),
2901
- /* @__PURE__ */ J("canvas", {
2755
+ /* @__PURE__ */ V("canvas", {
2902
2756
  ref: i2,
2903
2757
  style: {
2904
2758
  display: "block",
2905
2759
  width: m2,
2906
- height: h2,
2760
+ height: g2,
2907
2761
  position: "absolute",
2908
2762
  inset: 0,
2909
2763
  pointerEvents: "none"
@@ -2915,9 +2769,9 @@ function et(e2) {
2915
2769
  ]
2916
2770
  });
2917
2771
  }
2918
- function tt(e2) {
2772
+ function Xe(e2) {
2919
2773
  let t2 = e2.theme === "dark", n2 = t2 ? "rgb(34, 36, 42)" : "rgb(255, 255, 255)", r2 = t2 ? "rgb(240, 242, 246)" : "rgb(20, 22, 26)", i2 = t2 ? "rgba(240, 242, 246, 0.62)" : "rgba(20, 22, 26, 0.56)", a2 = t2 ? "rgba(255, 255, 255, 0.08)" : "rgba(15, 18, 23, 0.08)", o2 = t2 ? "0 8px 24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.40)" : "0 8px 24px rgba(15, 18, 23, 0.10), 0 2px 6px rgba(15, 18, 23, 0.06)";
2920
- return /* @__PURE__ */ Y("div", {
2774
+ return /* @__PURE__ */ H("div", {
2921
2775
  role: "tooltip",
2922
2776
  style: {
2923
2777
  position: "absolute",
@@ -2935,7 +2789,7 @@ function tt(e2) {
2935
2789
  minWidth: 180
2936
2790
  },
2937
2791
  children: [
2938
- /* @__PURE__ */ J("div", {
2792
+ /* @__PURE__ */ V("div", {
2939
2793
  style: {
2940
2794
  color: i2,
2941
2795
  fontSize: 10,
@@ -2943,13 +2797,13 @@ function tt(e2) {
2943
2797
  },
2944
2798
  children: e2.path.join(" \u203A ")
2945
2799
  }),
2946
- /* @__PURE__ */ Y("div", {
2800
+ /* @__PURE__ */ H("div", {
2947
2801
  style: {
2948
2802
  display: "flex",
2949
2803
  alignItems: "center",
2950
2804
  gap: 5
2951
2805
  },
2952
- children: [/* @__PURE__ */ J("span", {
2806
+ children: [/* @__PURE__ */ V("span", {
2953
2807
  "aria-hidden": "true",
2954
2808
  style: {
2955
2809
  width: 10,
@@ -2958,13 +2812,13 @@ function tt(e2) {
2958
2812
  background: e2.color,
2959
2813
  display: "inline-block"
2960
2814
  }
2961
- }), /* @__PURE__ */ J("span", {
2815
+ }), /* @__PURE__ */ V("span", {
2962
2816
  style: { fontWeight: 600 },
2963
2817
  children: e2.name
2964
2818
  })]
2965
2819
  }),
2966
- /* @__PURE__ */ Y("div", { children: ["value: ", e2.formatter.formatNumber(e2.value, 2)] }),
2967
- /* @__PURE__ */ Y("div", { children: [
2820
+ /* @__PURE__ */ H("div", { children: ["value: ", e2.formatter.formatNumber(e2.value, 2)] }),
2821
+ /* @__PURE__ */ H("div", { children: [
2968
2822
  "percent: ",
2969
2823
  (e2.percent * 100).toFixed(1),
2970
2824
  "%"
@@ -2972,8 +2826,8 @@ function tt(e2) {
2972
2826
  ]
2973
2827
  });
2974
2828
  }
2975
- function nt(e2) {
2976
- let t2 = $(), n2 = q.useRef(null), r2 = q.useRef(null), i2 = q.useRef(null), a2 = q.useRef(null), [o2, s2] = q.useState(null), [c2, l2] = q.useState(null), u2 = q.useMemo(() => ({
2829
+ function Ze(e2) {
2830
+ let t2 = K(), n2 = z.useRef(null), r2 = z.useRef(null), i2 = z.useRef(null), a2 = z.useRef(null), [o2, s2] = z.useState(null), [c2, l2] = z.useState(null), u2 = z.useMemo(() => ({
2977
2831
  theme: t2.theme,
2978
2832
  palette: t2.palette,
2979
2833
  locale: t2.locale,
@@ -3000,10 +2854,10 @@ function nt(e2) {
3000
2854
  t2.osTheme,
3001
2855
  t2.appTheme
3002
2856
  ]);
3003
- q.useEffect(() => {
2857
+ z.useEffect(() => {
3004
2858
  let t3 = r2.current;
3005
2859
  if (t3 === null) return;
3006
- let o3 = new h({
2860
+ let o3 = new p({
3007
2861
  container: n2.current,
3008
2862
  staticCanvas: t3,
3009
2863
  dynamicCanvas: i2.current,
@@ -3015,16 +2869,16 @@ function nt(e2) {
3015
2869
  return a2.current = o3, () => {
3016
2870
  a2.current = null, o3.dispose();
3017
2871
  };
3018
- }, []), q.useEffect(() => {
2872
+ }, []), z.useEffect(() => {
3019
2873
  a2.current?.update(e2, u2);
3020
2874
  });
3021
- let d2 = q.useCallback((e3) => {
2875
+ let d2 = z.useCallback((e3) => {
3022
2876
  a2.current?.handlePointerMove(e3.nativeEvent);
3023
- }, []), f2 = q.useCallback(() => {
2877
+ }, []), f2 = z.useCallback(() => {
3024
2878
  a2.current?.handlePointerLeave();
3025
- }, []), p2 = q.useCallback((e3) => {
2879
+ }, []), m2 = z.useCallback((e3) => {
3026
2880
  a2.current?.handleClick(e3.nativeEvent);
3027
- }, []), m2 = e2.width ?? 480, g2 = e2.height ?? 480, _2 = e2.ariaLabel ?? o2?.ariaLabel ?? "Sunburst", v2 = c2 === null || o2 === null ? null : (() => {
2881
+ }, []), h2 = e2.width ?? 480, g2 = e2.height ?? 480, _2 = e2.ariaLabel ?? o2?.ariaLabel ?? "Sunburst", v2 = c2 === null || o2 === null ? null : (() => {
3028
2882
  let t3 = {
3029
2883
  idx: c2.idx,
3030
2884
  name: c2.name,
@@ -3035,7 +2889,7 @@ function nt(e2) {
3035
2889
  color: c2.color,
3036
2890
  pointerX: c2.pointerX,
3037
2891
  pointerY: c2.pointerY,
3038
- containerWidth: m2,
2892
+ containerWidth: h2,
3039
2893
  containerHeight: g2,
3040
2894
  theme: o2.personalization.theme,
3041
2895
  palette: o2.personalization.palette,
@@ -3043,29 +2897,29 @@ function nt(e2) {
3043
2897
  timeZone: o2.resolvedTimeZone,
3044
2898
  formatter: o2.formatter
3045
2899
  };
3046
- return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : rt(t3);
2900
+ return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : Qe(t3);
3047
2901
  })(), y2 = (() => {
3048
2902
  if (e2.centerLabel === void 0 || e2.centerLabel === false || o2 === null) return null;
3049
2903
  let t3 = o2.personalization.theme === "dark", n3;
3050
- return n3 = e2.centerLabel === true ? /* @__PURE__ */ Y("div", {
2904
+ return n3 = e2.centerLabel === true ? /* @__PURE__ */ H("div", {
3051
2905
  style: {
3052
2906
  textAlign: "center",
3053
2907
  lineHeight: 1.2
3054
2908
  },
3055
- children: [/* @__PURE__ */ J("div", {
2909
+ children: [/* @__PURE__ */ V("div", {
3056
2910
  style: {
3057
2911
  fontSize: 10,
3058
2912
  opacity: 0.6
3059
2913
  },
3060
2914
  children: "Total"
3061
- }), /* @__PURE__ */ J("div", {
2915
+ }), /* @__PURE__ */ V("div", {
3062
2916
  style: {
3063
2917
  fontSize: 18,
3064
2918
  fontWeight: 600
3065
2919
  },
3066
2920
  children: o2.formatter.formatNumber(o2.totalValue, 0)
3067
2921
  })]
3068
- }) : e2.centerLabel, /* @__PURE__ */ J("div", {
2922
+ }) : e2.centerLabel, /* @__PURE__ */ V("div", {
3069
2923
  style: {
3070
2924
  position: "absolute",
3071
2925
  inset: 0,
@@ -3079,32 +2933,32 @@ function nt(e2) {
3079
2933
  children: n3
3080
2934
  });
3081
2935
  })();
3082
- return /* @__PURE__ */ Y("div", {
2936
+ return /* @__PURE__ */ H("div", {
3083
2937
  ref: n2,
3084
2938
  style: {
3085
2939
  position: "relative",
3086
- width: m2,
2940
+ width: h2,
3087
2941
  height: g2
3088
2942
  },
3089
2943
  "aria-label": _2,
3090
2944
  onPointerMove: d2,
3091
2945
  onPointerLeave: f2,
3092
- onClick: p2,
2946
+ onClick: m2,
3093
2947
  children: [
3094
- /* @__PURE__ */ J("canvas", {
2948
+ /* @__PURE__ */ V("canvas", {
3095
2949
  ref: r2,
3096
2950
  style: {
3097
2951
  display: "block",
3098
- width: m2,
2952
+ width: h2,
3099
2953
  height: g2
3100
2954
  },
3101
2955
  "aria-hidden": "true"
3102
2956
  }),
3103
- /* @__PURE__ */ J("canvas", {
2957
+ /* @__PURE__ */ V("canvas", {
3104
2958
  ref: i2,
3105
2959
  style: {
3106
2960
  display: "block",
3107
- width: m2,
2961
+ width: h2,
3108
2962
  height: g2,
3109
2963
  position: "absolute",
3110
2964
  inset: 0,
@@ -3117,9 +2971,9 @@ function nt(e2) {
3117
2971
  ]
3118
2972
  });
3119
2973
  }
3120
- function rt(e2) {
2974
+ function Qe(e2) {
3121
2975
  let t2 = e2.theme === "dark", n2 = t2 ? "rgb(34, 36, 42)" : "rgb(255, 255, 255)", r2 = t2 ? "rgb(240, 242, 246)" : "rgb(20, 22, 26)", i2 = t2 ? "rgba(240, 242, 246, 0.62)" : "rgba(20, 22, 26, 0.56)", a2 = t2 ? "rgba(255, 255, 255, 0.08)" : "rgba(15, 18, 23, 0.08)", o2 = t2 ? "0 8px 24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.40)" : "0 8px 24px rgba(15, 18, 23, 0.10), 0 2px 6px rgba(15, 18, 23, 0.06)";
3122
- return /* @__PURE__ */ Y("div", {
2976
+ return /* @__PURE__ */ H("div", {
3123
2977
  role: "tooltip",
3124
2978
  style: {
3125
2979
  position: "absolute",
@@ -3137,7 +2991,7 @@ function rt(e2) {
3137
2991
  minWidth: 180
3138
2992
  },
3139
2993
  children: [
3140
- /* @__PURE__ */ J("div", {
2994
+ /* @__PURE__ */ V("div", {
3141
2995
  style: {
3142
2996
  color: i2,
3143
2997
  fontSize: 10,
@@ -3145,13 +2999,13 @@ function rt(e2) {
3145
2999
  },
3146
3000
  children: e2.path.join(" \u203A ")
3147
3001
  }),
3148
- /* @__PURE__ */ Y("div", {
3002
+ /* @__PURE__ */ H("div", {
3149
3003
  style: {
3150
3004
  display: "flex",
3151
3005
  alignItems: "center",
3152
3006
  gap: 5
3153
3007
  },
3154
- children: [/* @__PURE__ */ J("span", {
3008
+ children: [/* @__PURE__ */ V("span", {
3155
3009
  "aria-hidden": "true",
3156
3010
  style: {
3157
3011
  width: 10,
@@ -3160,13 +3014,13 @@ function rt(e2) {
3160
3014
  background: e2.color,
3161
3015
  display: "inline-block"
3162
3016
  }
3163
- }), /* @__PURE__ */ J("span", {
3017
+ }), /* @__PURE__ */ V("span", {
3164
3018
  style: { fontWeight: 600 },
3165
3019
  children: e2.name
3166
3020
  })]
3167
3021
  }),
3168
- /* @__PURE__ */ Y("div", { children: ["value: ", e2.formatter.formatNumber(e2.value, 2)] }),
3169
- /* @__PURE__ */ Y("div", { children: [
3022
+ /* @__PURE__ */ H("div", { children: ["value: ", e2.formatter.formatNumber(e2.value, 2)] }),
3023
+ /* @__PURE__ */ H("div", { children: [
3170
3024
  "percent: ",
3171
3025
  (e2.percent * 100).toFixed(1),
3172
3026
  "%"
@@ -3174,8 +3028,8 @@ function rt(e2) {
3174
3028
  ]
3175
3029
  });
3176
3030
  }
3177
- function it(e2) {
3178
- let t2 = $(), n2 = q.useRef(null), r2 = q.useRef(null), i2 = q.useRef(null), a2 = q.useRef(null), [o2, s2] = q.useState(null), [c2, l2] = q.useState(null), u2 = q.useMemo(() => ({
3031
+ function $e(e2) {
3032
+ let t2 = K(), n2 = z.useRef(null), r2 = z.useRef(null), i2 = z.useRef(null), a2 = z.useRef(null), [o2, s2] = z.useState(null), [c2, l2] = z.useState(null), u2 = z.useMemo(() => ({
3179
3033
  theme: t2.theme,
3180
3034
  palette: t2.palette,
3181
3035
  locale: t2.locale,
@@ -3202,10 +3056,10 @@ function it(e2) {
3202
3056
  t2.osTheme,
3203
3057
  t2.appTheme
3204
3058
  ]);
3205
- q.useEffect(() => {
3059
+ z.useEffect(() => {
3206
3060
  let t3 = r2.current;
3207
3061
  if (t3 === null) return;
3208
- let o3 = new F({
3062
+ let o3 = new j({
3209
3063
  container: n2.current,
3210
3064
  staticCanvas: t3,
3211
3065
  dynamicCanvas: i2.current,
@@ -3217,12 +3071,12 @@ function it(e2) {
3217
3071
  return a2.current = o3, () => {
3218
3072
  a2.current = null, o3.dispose();
3219
3073
  };
3220
- }, []), q.useEffect(() => {
3074
+ }, []), z.useEffect(() => {
3221
3075
  a2.current?.update(e2, u2);
3222
3076
  });
3223
- let d2 = q.useCallback((e3) => {
3077
+ let d2 = z.useCallback((e3) => {
3224
3078
  a2.current?.handlePointerMove(e3.nativeEvent);
3225
- }, []), f2 = q.useCallback(() => {
3079
+ }, []), f2 = z.useCallback(() => {
3226
3080
  a2.current?.handlePointerLeave();
3227
3081
  }, []), p2 = e2.width ?? 800, m2 = e2.height ?? 400, h2 = e2.ariaLabel ?? o2?.ariaLabel ?? "Renko chart", g2 = c2 === null || o2 === null ? null : (() => {
3228
3082
  let t3 = {
@@ -3241,9 +3095,9 @@ function it(e2) {
3241
3095
  timeZone: o2.resolvedTimeZone,
3242
3096
  formatter: o2.formatter
3243
3097
  };
3244
- return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : at(t3);
3098
+ return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : et(t3);
3245
3099
  })();
3246
- return /* @__PURE__ */ Y("div", {
3100
+ return /* @__PURE__ */ H("div", {
3247
3101
  ref: n2,
3248
3102
  style: {
3249
3103
  position: "relative",
@@ -3254,7 +3108,7 @@ function it(e2) {
3254
3108
  onPointerMove: d2,
3255
3109
  onPointerLeave: f2,
3256
3110
  children: [
3257
- /* @__PURE__ */ J("canvas", {
3111
+ /* @__PURE__ */ V("canvas", {
3258
3112
  ref: r2,
3259
3113
  style: {
3260
3114
  display: "block",
@@ -3263,7 +3117,7 @@ function it(e2) {
3263
3117
  },
3264
3118
  "aria-hidden": "true"
3265
3119
  }),
3266
- /* @__PURE__ */ J("canvas", {
3120
+ /* @__PURE__ */ V("canvas", {
3267
3121
  ref: i2,
3268
3122
  style: {
3269
3123
  display: "block",
@@ -3279,9 +3133,9 @@ function it(e2) {
3279
3133
  ]
3280
3134
  });
3281
3135
  }
3282
- function at(e2) {
3136
+ function et(e2) {
3283
3137
  let t2 = e2.theme === "dark", n2 = t2 ? "rgb(34,36,42)" : "rgb(255,255,255)", r2 = t2 ? "rgb(240,242,246)" : "rgb(20,22,26)", i2 = t2 ? "rgba(240,242,246,0.62)" : "rgba(20,22,26,0.56)", a2 = t2 ? "rgba(255,255,255,0.08)" : "rgba(15,18,23,0.08)";
3284
- return /* @__PURE__ */ Y("div", {
3138
+ return /* @__PURE__ */ H("div", {
3285
3139
  role: "tooltip",
3286
3140
  style: {
3287
3141
  position: "absolute",
@@ -3298,7 +3152,7 @@ function at(e2) {
3298
3152
  minWidth: 160
3299
3153
  },
3300
3154
  children: [
3301
- /* @__PURE__ */ Y("div", {
3155
+ /* @__PURE__ */ H("div", {
3302
3156
  style: {
3303
3157
  color: i2,
3304
3158
  fontSize: 10,
@@ -3310,53 +3164,53 @@ function at(e2) {
3310
3164
  e2.idx
3311
3165
  ]
3312
3166
  }),
3313
- /* @__PURE__ */ Y("div", { children: [
3167
+ /* @__PURE__ */ H("div", { children: [
3314
3168
  "range: ",
3315
3169
  e2.formatter.formatNumber(e2.bottomPrice, 2),
3316
3170
  " \u2013",
3317
3171
  " ",
3318
3172
  e2.formatter.formatNumber(e2.topPrice, 2)
3319
3173
  ] }),
3320
- /* @__PURE__ */ Y("div", { children: ["source: ", e2.formatter.formatDate(e2.sourceTime)] })
3174
+ /* @__PURE__ */ H("div", { children: ["source: ", e2.formatter.formatDate(e2.sourceTime)] })
3321
3175
  ]
3322
3176
  });
3323
3177
  }
3324
- function ot(e2) {
3325
- let t2 = $(), r2 = q.useRef(null), i2 = q.useRef(null), a2 = q.useRef(null), o2 = q.useRef(null), [s2, c2] = q.useState(null), [l2, u2] = q.useState(null), d2 = q.useMemo(() => ({
3326
- theme: t2.theme,
3327
- palette: t2.palette,
3328
- locale: t2.locale,
3329
- timeZone: t2.timeZone,
3330
- visualStyle: t2.visualStyle,
3331
- outlineFillColor: t2.outlineFillColor,
3332
- outlineFillOpacity: t2.outlineFillOpacity,
3333
- cornerRadius: t2.cornerRadius,
3334
- borderWidth: t2.borderWidth,
3335
- accents: t2.accents,
3336
- osTheme: t2.osTheme,
3337
- appTheme: t2.appTheme
3178
+ function tt(t2) {
3179
+ let n2 = K(), r2 = z.useRef(null), i2 = z.useRef(null), a2 = z.useRef(null), o2 = z.useRef(null), [s2, c2] = z.useState(null), [l2, u2] = z.useState(null), d2 = z.useMemo(() => ({
3180
+ theme: n2.theme,
3181
+ palette: n2.palette,
3182
+ locale: n2.locale,
3183
+ timeZone: n2.timeZone,
3184
+ visualStyle: n2.visualStyle,
3185
+ outlineFillColor: n2.outlineFillColor,
3186
+ outlineFillOpacity: n2.outlineFillOpacity,
3187
+ cornerRadius: n2.cornerRadius,
3188
+ borderWidth: n2.borderWidth,
3189
+ accents: n2.accents,
3190
+ osTheme: n2.osTheme,
3191
+ appTheme: n2.appTheme
3338
3192
  }), [
3339
- t2.theme,
3340
- t2.palette,
3341
- t2.locale,
3342
- t2.timeZone,
3343
- t2.visualStyle,
3344
- t2.outlineFillColor,
3345
- t2.outlineFillOpacity,
3346
- t2.cornerRadius,
3347
- t2.borderWidth,
3348
- t2.accents,
3349
- t2.osTheme,
3350
- t2.appTheme
3193
+ n2.theme,
3194
+ n2.palette,
3195
+ n2.locale,
3196
+ n2.timeZone,
3197
+ n2.visualStyle,
3198
+ n2.outlineFillColor,
3199
+ n2.outlineFillOpacity,
3200
+ n2.cornerRadius,
3201
+ n2.borderWidth,
3202
+ n2.accents,
3203
+ n2.osTheme,
3204
+ n2.appTheme
3351
3205
  ]);
3352
- q.useEffect(() => {
3353
- let t3 = i2.current;
3354
- if (t3 === null) return;
3355
- let s3 = new n({
3206
+ z.useEffect(() => {
3207
+ let n3 = i2.current;
3208
+ if (n3 === null) return;
3209
+ let s3 = new e({
3356
3210
  container: r2.current,
3357
- staticCanvas: t3,
3211
+ staticCanvas: n3,
3358
3212
  dynamicCanvas: a2.current,
3359
- initialProps: e2,
3213
+ initialProps: t2,
3360
3214
  initialProvider: d2,
3361
3215
  onContextChange: c2,
3362
3216
  onHoverChange: u2
@@ -3364,15 +3218,15 @@ function ot(e2) {
3364
3218
  return o2.current = s3, () => {
3365
3219
  o2.current = null, s3.dispose();
3366
3220
  };
3367
- }, []), q.useEffect(() => {
3368
- o2.current?.update(e2, d2);
3221
+ }, []), z.useEffect(() => {
3222
+ o2.current?.update(t2, d2);
3369
3223
  });
3370
- let f2 = q.useCallback((e3) => {
3371
- o2.current?.handlePointerMove(e3.nativeEvent);
3372
- }, []), p2 = q.useCallback(() => {
3224
+ let f2 = z.useCallback((e2) => {
3225
+ o2.current?.handlePointerMove(e2.nativeEvent);
3226
+ }, []), p2 = z.useCallback(() => {
3373
3227
  o2.current?.handlePointerLeave();
3374
- }, []), m2 = e2.width ?? 800, h2 = e2.height ?? 400, g2 = e2.ariaLabel ?? s2?.ariaLabel ?? "Kagi chart", _2 = l2 === null || s2 === null ? null : (() => {
3375
- let t3 = {
3228
+ }, []), m2 = t2.width ?? 800, h2 = t2.height ?? 400, g2 = t2.ariaLabel ?? s2?.ariaLabel ?? "Kagi chart", _2 = l2 === null || s2 === null ? null : (() => {
3229
+ let e2 = {
3376
3230
  idx: l2.idx,
3377
3231
  direction: l2.direction,
3378
3232
  thick: l2.thick,
@@ -3388,9 +3242,9 @@ function ot(e2) {
3388
3242
  timeZone: s2.resolvedTimeZone,
3389
3243
  formatter: s2.formatter
3390
3244
  };
3391
- return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : st(t3);
3245
+ return t2.tooltip === false ? null : typeof t2.tooltip == "function" ? t2.tooltip(e2) : nt(e2);
3392
3246
  })();
3393
- return /* @__PURE__ */ Y("div", {
3247
+ return /* @__PURE__ */ H("div", {
3394
3248
  ref: r2,
3395
3249
  style: {
3396
3250
  position: "relative",
@@ -3401,7 +3255,7 @@ function ot(e2) {
3401
3255
  onPointerMove: f2,
3402
3256
  onPointerLeave: p2,
3403
3257
  children: [
3404
- /* @__PURE__ */ J("canvas", {
3258
+ /* @__PURE__ */ V("canvas", {
3405
3259
  ref: i2,
3406
3260
  style: {
3407
3261
  display: "block",
@@ -3410,7 +3264,7 @@ function ot(e2) {
3410
3264
  },
3411
3265
  "aria-hidden": "true"
3412
3266
  }),
3413
- /* @__PURE__ */ J("canvas", {
3267
+ /* @__PURE__ */ V("canvas", {
3414
3268
  ref: a2,
3415
3269
  style: {
3416
3270
  display: "block",
@@ -3426,9 +3280,9 @@ function ot(e2) {
3426
3280
  ]
3427
3281
  });
3428
3282
  }
3429
- function st(e2) {
3283
+ function nt(e2) {
3430
3284
  let t2 = e2.theme === "dark", n2 = t2 ? "rgb(34,36,42)" : "rgb(255,255,255)", r2 = t2 ? "rgb(240,242,246)" : "rgb(20,22,26)", i2 = t2 ? "rgba(240,242,246,0.62)" : "rgba(20,22,26,0.56)", a2 = t2 ? "rgba(255,255,255,0.08)" : "rgba(15,18,23,0.08)";
3431
- return /* @__PURE__ */ Y("div", {
3285
+ return /* @__PURE__ */ H("div", {
3432
3286
  role: "tooltip",
3433
3287
  style: {
3434
3288
  position: "absolute",
@@ -3444,7 +3298,7 @@ function st(e2) {
3444
3298
  pointerEvents: "none",
3445
3299
  minWidth: 160
3446
3300
  },
3447
- children: [/* @__PURE__ */ Y("div", {
3301
+ children: [/* @__PURE__ */ H("div", {
3448
3302
  style: {
3449
3303
  color: i2,
3450
3304
  fontSize: 10,
@@ -3457,7 +3311,7 @@ function st(e2) {
3457
3311
  " \xB7 leg #",
3458
3312
  e2.idx
3459
3313
  ]
3460
- }), /* @__PURE__ */ Y("div", { children: [
3314
+ }), /* @__PURE__ */ H("div", { children: [
3461
3315
  e2.formatter.formatNumber(e2.startPrice, 2),
3462
3316
  " \u2192",
3463
3317
  " ",
@@ -3465,8 +3319,8 @@ function st(e2) {
3465
3319
  ] })]
3466
3320
  });
3467
3321
  }
3468
- function ct(e2) {
3469
- let t2 = $(), n2 = q.useRef(null), r2 = q.useRef(null), i2 = q.useRef(null), a2 = q.useRef(null), [o2, s2] = q.useState(null), [c2, l2] = q.useState(null), u2 = q.useMemo(() => ({
3322
+ function rt(e2) {
3323
+ let t2 = K(), n2 = z.useRef(null), r2 = z.useRef(null), i2 = z.useRef(null), a2 = z.useRef(null), [o2, s2] = z.useState(null), [c2, l2] = z.useState(null), u2 = z.useMemo(() => ({
3470
3324
  theme: t2.theme,
3471
3325
  palette: t2.palette,
3472
3326
  locale: t2.locale,
@@ -3493,10 +3347,10 @@ function ct(e2) {
3493
3347
  t2.osTheme,
3494
3348
  t2.appTheme
3495
3349
  ]);
3496
- q.useEffect(() => {
3350
+ z.useEffect(() => {
3497
3351
  let t3 = r2.current;
3498
3352
  if (t3 === null) return;
3499
- let o3 = new L({
3353
+ let o3 = new ne({
3500
3354
  container: n2.current,
3501
3355
  staticCanvas: t3,
3502
3356
  dynamicCanvas: i2.current,
@@ -3508,12 +3362,12 @@ function ct(e2) {
3508
3362
  return a2.current = o3, () => {
3509
3363
  a2.current = null, o3.dispose();
3510
3364
  };
3511
- }, []), q.useEffect(() => {
3365
+ }, []), z.useEffect(() => {
3512
3366
  a2.current?.update(e2, u2);
3513
3367
  });
3514
- let d2 = q.useCallback((e3) => {
3368
+ let d2 = z.useCallback((e3) => {
3515
3369
  a2.current?.handlePointerMove(e3.nativeEvent);
3516
- }, []), f2 = q.useCallback(() => {
3370
+ }, []), f2 = z.useCallback(() => {
3517
3371
  a2.current?.handlePointerLeave();
3518
3372
  }, []), p2 = e2.width ?? 800, m2 = e2.height ?? 400, h2 = e2.ariaLabel ?? o2?.ariaLabel ?? "Point and figure chart", g2 = c2 === null || o2 === null ? null : (() => {
3519
3373
  let t3 = {
@@ -3531,9 +3385,9 @@ function ct(e2) {
3531
3385
  timeZone: o2.resolvedTimeZone,
3532
3386
  formatter: o2.formatter
3533
3387
  };
3534
- return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : lt(t3);
3388
+ return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : it(t3);
3535
3389
  })();
3536
- return /* @__PURE__ */ Y("div", {
3390
+ return /* @__PURE__ */ H("div", {
3537
3391
  ref: n2,
3538
3392
  style: {
3539
3393
  position: "relative",
@@ -3544,7 +3398,7 @@ function ct(e2) {
3544
3398
  onPointerMove: d2,
3545
3399
  onPointerLeave: f2,
3546
3400
  children: [
3547
- /* @__PURE__ */ J("canvas", {
3401
+ /* @__PURE__ */ V("canvas", {
3548
3402
  ref: r2,
3549
3403
  style: {
3550
3404
  display: "block",
@@ -3553,7 +3407,7 @@ function ct(e2) {
3553
3407
  },
3554
3408
  "aria-hidden": "true"
3555
3409
  }),
3556
- /* @__PURE__ */ J("canvas", {
3410
+ /* @__PURE__ */ V("canvas", {
3557
3411
  ref: i2,
3558
3412
  style: {
3559
3413
  display: "block",
@@ -3569,9 +3423,9 @@ function ct(e2) {
3569
3423
  ]
3570
3424
  });
3571
3425
  }
3572
- function lt(e2) {
3426
+ function it(e2) {
3573
3427
  let t2 = e2.theme === "dark", n2 = t2 ? "rgb(34,36,42)" : "rgb(255,255,255)", r2 = t2 ? "rgb(240,242,246)" : "rgb(20,22,26)", i2 = t2 ? "rgba(240,242,246,0.62)" : "rgba(20,22,26,0.56)", a2 = t2 ? "rgba(255,255,255,0.08)" : "rgba(15,18,23,0.08)";
3574
- return /* @__PURE__ */ Y("div", {
3428
+ return /* @__PURE__ */ H("div", {
3575
3429
  role: "tooltip",
3576
3430
  style: {
3577
3431
  position: "absolute",
@@ -3587,7 +3441,7 @@ function lt(e2) {
3587
3441
  pointerEvents: "none",
3588
3442
  minWidth: 160
3589
3443
  },
3590
- children: [/* @__PURE__ */ Y("div", {
3444
+ children: [/* @__PURE__ */ H("div", {
3591
3445
  style: {
3592
3446
  color: i2,
3593
3447
  fontSize: 10,
@@ -3598,7 +3452,7 @@ function lt(e2) {
3598
3452
  " \xB7 #",
3599
3453
  e2.idx
3600
3454
  ]
3601
- }), /* @__PURE__ */ Y("div", { children: [
3455
+ }), /* @__PURE__ */ H("div", { children: [
3602
3456
  "range: ",
3603
3457
  e2.formatter.formatNumber(e2.bottomBox, 2),
3604
3458
  " \u2013",
@@ -3607,10 +3461,10 @@ function lt(e2) {
3607
3461
  ] })]
3608
3462
  });
3609
3463
  }
3610
- var ut = class extends Error {
3464
+ var at = class extends Error {
3611
3465
  name = "SankeyCycleError";
3612
3466
  };
3613
- function dt(e2) {
3467
+ function ot(e2) {
3614
3468
  let t2 = e2.nodes.length, n2 = e2.links.length, r2 = Array.from({ length: t2 }, () => ""), i2 = Array.from({ length: t2 }, () => ""), a2 = Array.from({ length: t2 }, () => null), o2 = Array.from({ length: t2 }, () => null), s2 = /* @__PURE__ */ new Map();
3615
3469
  for (let n3 = 0; n3 < t2; n3++) {
3616
3470
  let t3 = e2.nodes[n3];
@@ -3643,7 +3497,7 @@ function dt(e2) {
3643
3497
  p2[r3] = a3, a3 === 0 && h2.push(r3);
3644
3498
  }
3645
3499
  }
3646
- if (_2 < t2) throw new ut("SankeyChart: input contains a cycle (the flow graph must be acyclic).");
3500
+ if (_2 < t2) throw new at("SankeyChart: input contains a cycle (the flow graph must be acyclic).");
3647
3501
  let v2 = 0;
3648
3502
  for (let e3 = 0; e3 < t2; e3++) m2[e3] > v2 && (v2 = m2[e3]);
3649
3503
  let y2 = new Float64Array(t2), b2 = new Float64Array(t2), x2 = new Float64Array(t2);
@@ -3666,7 +3520,7 @@ function dt(e2) {
3666
3520
  linkOpacityOverrides: f2
3667
3521
  };
3668
3522
  }
3669
- function ft(e2, t2) {
3523
+ function st(e2, t2) {
3670
3524
  let { x0: n2, y0: r2, x1: i2, y1: a2, nodeWidth: o2, nodePadding: s2, alignment: c2, iterations: l2 } = t2, u2 = i2 - n2, d2 = a2 - r2, f2 = e2.nodeCount, p2 = e2.maxDepth + 1, m2 = new Float64Array(f2), h2 = new Float64Array(f2);
3671
3525
  if (p2 === 1) {
3672
3526
  let e3 = (n2 + i2) / 2;
@@ -3704,7 +3558,7 @@ function ft(e2, t2) {
3704
3558
  g2[r3] = l3, _2[r3] = l3 + i4, l3 += i4 + s2;
3705
3559
  }
3706
3560
  }
3707
- for (let t3 = 0; t3 < l2; t3++) pt(e2, v2, g2, _2, "incoming", d2, r2, s2), pt(e2, v2, g2, _2, "outgoing", d2, r2, s2);
3561
+ for (let t3 = 0; t3 < l2; t3++) ct(e2, v2, g2, _2, "incoming", d2, r2, s2), ct(e2, v2, g2, _2, "outgoing", d2, r2, s2);
3708
3562
  let y2 = new Float64Array(e2.linkCount), b2 = new Float64Array(e2.linkCount), x2 = new Float64Array(e2.linkCount), S2 = new Float64Array(e2.linkCount), C2 = Array.from({ length: f2 }, () => []), w2 = Array.from({ length: f2 }, () => []);
3709
3563
  for (let t3 = 0; t3 < e2.linkCount; t3++) C2[e2.linkSources[t3]].push(t3), w2[e2.linkTargets[t3]].push(t3);
3710
3564
  for (let t3 = 0; t3 < f2; t3++) C2[t3].sort((t4, n3) => g2[e2.linkTargets[t4]] - g2[e2.linkTargets[n3]]), w2[t3].sort((t4, n3) => g2[e2.linkSources[t4]] - g2[e2.linkSources[n3]]);
@@ -3734,7 +3588,7 @@ function ft(e2, t2) {
3734
3588
  linkTargetY1: S2
3735
3589
  };
3736
3590
  }
3737
- function pt(e2, t2, n2, r2, i2, a2, o2, s2) {
3591
+ function ct(e2, t2, n2, r2, i2, a2, o2, s2) {
3738
3592
  for (let c2 = 0; c2 < t2.length; c2++) {
3739
3593
  let l2 = t2[c2];
3740
3594
  if (l2.length === 0) continue;
@@ -3767,7 +3621,7 @@ function pt(e2, t2, n2, r2, i2, a2, o2, s2) {
3767
3621
  }
3768
3622
  }
3769
3623
  }
3770
- var mt = {
3624
+ var lt = {
3771
3625
  nodeCount: 0,
3772
3626
  linkCount: 0,
3773
3627
  nodeIds: [],
@@ -3782,7 +3636,7 @@ var mt = {
3782
3636
  linkValues: new Float64Array(),
3783
3637
  linkColorOverrides: [],
3784
3638
  linkOpacityOverrides: new Float64Array()
3785
- }, ht = class {
3639
+ }, ut = class {
3786
3640
  staticCanvas;
3787
3641
  dynamicCanvas;
3788
3642
  callbacks;
@@ -3794,7 +3648,7 @@ var mt = {
3794
3648
  crosshairLineStyle: "dashed",
3795
3649
  crosshairMarker: "circle"
3796
3650
  };
3797
- graph = mt;
3651
+ graph = lt;
3798
3652
  personalization;
3799
3653
  resolvedLocale;
3800
3654
  formatter;
@@ -3812,7 +3666,7 @@ var mt = {
3812
3666
  this.staticCanvas = e2.staticCanvas, this.dynamicCanvas = e2.dynamicCanvas, this.callbacks = {
3813
3667
  onContextChange: e2.onContextChange,
3814
3668
  onHoverChange: e2.onHoverChange
3815
- }, this.props = e2.initialProps, this.providerCtx = e2.initialProvider, this.visGate = new k(e2.container ?? null, () => void this.runStaticDraw()), this.resolveDerived(), this.applyDynamicCfgFromProps(), this.runStaticDraw();
3669
+ }, this.props = e2.initialProps, this.providerCtx = e2.initialProvider, this.visGate = new E(e2.container ?? null, () => void this.runStaticDraw()), this.resolveDerived(), this.applyDynamicCfgFromProps(), this.runStaticDraw();
3816
3670
  }
3817
3671
  update(e2, t2) {
3818
3672
  this.disposed || e2 === this.props && t2 === this.providerCtx || (this.props = e2, this.providerCtx = t2, this.resolveDerived(), this.applyDynamicCfgFromProps(), this.runStaticDraw());
@@ -3836,13 +3690,13 @@ var mt = {
3836
3690
  },
3837
3691
  color: this.nodeColors[e3] ?? "rgba(128,128,128,1)"
3838
3692
  };
3839
- this.setHover(n3), vt(t2, n3, this.dynCfg);
3693
+ this.setHover(n3), $(t2, n3, this.dynCfg);
3840
3694
  return;
3841
3695
  }
3842
3696
  for (let e3 = 0; e3 < this.graph.linkCount; e3++) {
3843
3697
  let n3 = this.graph.linkSources[e3], r3 = this.graph.linkTargets[e3], s2 = o2.nodeX1[n3], c2 = o2.nodeX0[r3];
3844
3698
  if (i2 < s2 || i2 > c2) continue;
3845
- let l2 = s2 === c2 ? 0 : (i2 - s2) / (c2 - s2), u2 = gt(o2.linkSourceY0[e3], o2.linkTargetY0[e3], l2), d2 = gt(o2.linkSourceY1[e3], o2.linkTargetY1[e3], l2);
3699
+ let l2 = s2 === c2 ? 0 : (i2 - s2) / (c2 - s2), u2 = dt(o2.linkSourceY0[e3], o2.linkTargetY0[e3], l2), d2 = dt(o2.linkSourceY1[e3], o2.linkTargetY1[e3], l2);
3846
3700
  if (a2 >= u2 && a2 <= d2) {
3847
3701
  let o3 = {
3848
3702
  pointerX: i2,
@@ -3856,14 +3710,14 @@ var mt = {
3856
3710
  },
3857
3711
  color: this.nodeColors[n3] ?? "rgba(128,128,128,1)"
3858
3712
  };
3859
- this.setHover(o3), vt(t2, o3, this.dynCfg);
3713
+ this.setHover(o3), $(t2, o3, this.dynCfg);
3860
3714
  return;
3861
3715
  }
3862
3716
  }
3863
- this.setHover(null), vt(t2, null, this.dynCfg);
3717
+ this.setHover(null), $(t2, null, this.dynCfg);
3864
3718
  }
3865
3719
  handlePointerLeave() {
3866
- this.setHover(null), this.handle !== null && vt(this.handle, null, this.dynCfg);
3720
+ this.setHover(null), this.handle !== null && $(this.handle, null, this.dynCfg);
3867
3721
  }
3868
3722
  dispose() {
3869
3723
  this.disposed || (this.disposed = true, this.visGate.dispose(), this.staticDrawAbort.cancelled = true, this.handle = null);
@@ -3872,8 +3726,8 @@ var mt = {
3872
3726
  this.callbacks.onHoverChange(e2);
3873
3727
  }
3874
3728
  resolveDerived() {
3875
- let e2 = this.props, t2 = this.providerCtx, n2 = e2.width ?? 800, r2 = e2.height ?? 400;
3876
- this.personalization = N({
3729
+ let e2 = this.props, t2 = this.providerCtx, n2 = e2.width ?? 800, i2 = e2.height ?? 400;
3730
+ this.personalization = k({
3877
3731
  theme: e2.theme ?? t2.theme,
3878
3732
  palette: e2.palette ?? t2.palette,
3879
3733
  osTheme: t2.osTheme,
@@ -3899,7 +3753,7 @@ var mt = {
3899
3753
  patternScale: e2.patternScale,
3900
3754
  patternColor: e2.patternColor,
3901
3755
  fastMode: e2.fastMode
3902
- }), this.resolvedLocale = a(this.personalization.locale), this.formatter = g({
3756
+ }), this.resolvedLocale = r(this.personalization.locale), this.formatter = m({
3903
3757
  locale: this.resolvedLocale,
3904
3758
  digitGrouping: this.personalization.digitGrouping,
3905
3759
  numberAbbreviation: this.personalization.numberAbbreviation,
@@ -3910,17 +3764,17 @@ var mt = {
3910
3764
  dateFormat: this.personalization.dateFormat,
3911
3765
  timeFormat: this.personalization.timeFormat,
3912
3766
  timeZone: this.personalization.timeZone
3913
- }), this.graph = e2.data === void 0 ? mt : dt(e2.data), this.resolvedNodeAlignment = v(e2.nodeAlignment), this.resolvedLinkColor = I(e2.linkColor), this.resolvedValueDisplay = z(e2.valueDisplay), this.resolvedLabelPosition = O(e2.labelPosition), this.resolvedLabelContent = W(e2.labelContent), this.resolvedColorScale = d(e2.colorScale);
3914
- let i2 = this.personalization.palette[this.personalization.theme], o2 = i2.categorical, s2 = Array.from({ length: this.graph.nodeCount }, () => "");
3767
+ }), this.graph = e2.data === void 0 ? lt : ot(e2.data), this.resolvedNodeAlignment = g(e2.nodeAlignment), this.resolvedLinkColor = M(e2.linkColor), this.resolvedValueDisplay = N(e2.valueDisplay), this.resolvedLabelPosition = ee(e2.labelPosition), this.resolvedLabelContent = L(e2.labelContent), this.resolvedColorScale = l(e2.colorScale);
3768
+ let a2 = this.personalization.palette[this.personalization.theme], o2 = a2.categorical, s2 = Array.from({ length: this.graph.nodeCount }, () => "");
3915
3769
  for (let e3 = 0; e3 < this.graph.nodeCount; e3++) {
3916
3770
  let t3 = this.graph.nodeColorOverrides[e3];
3917
3771
  if (t3 != null) s2[e3] = t3;
3918
3772
  else if (this.resolvedColorScale === "depth-gradient") {
3919
3773
  let t4 = this.graph.depths[e3], n3 = o2[t4 % o2.length];
3920
- s2[e3] = P(M(n3 === void 0 ? i2.up : n3, 1), Math.max(0.45, 1 - t4 * 0.15));
3774
+ s2[e3] = A(O(n3 === void 0 ? a2.up : n3, 1), Math.max(0.45, 1 - t4 * 0.15));
3921
3775
  } else {
3922
3776
  let t4 = o2[e3 % o2.length];
3923
- s2[e3] = M(t4 === void 0 ? i2.up : t4, 1);
3777
+ s2[e3] = O(t4 === void 0 ? a2.up : t4, 1);
3924
3778
  }
3925
3779
  }
3926
3780
  this.nodeColors = s2, this.callbacks.onContextChange({
@@ -3931,7 +3785,7 @@ var mt = {
3931
3785
  graph: this.graph,
3932
3786
  ariaLabel: e2.ariaLabel ?? `Sankey chart, ${this.graph.nodeCount} nodes, ${this.graph.linkCount} links`,
3933
3787
  cssWidth: n2,
3934
- cssHeight: r2
3788
+ cssHeight: i2
3935
3789
  });
3936
3790
  }
3937
3791
  applyDynamicCfgFromProps() {
@@ -3943,22 +3797,22 @@ var mt = {
3943
3797
  }
3944
3798
  async runStaticDraw() {
3945
3799
  if (this.disposed || this.visGate.tryDefer()) return;
3946
- let e2 = this.props, t2 = e2.width ?? 800, n2 = e2.height ?? 400, r2 = G({
3800
+ let e2 = this.props, t2 = e2.width ?? 800, n2 = e2.height ?? 400, r2 = ae({
3947
3801
  cssWidth: t2,
3948
3802
  cssHeight: n2,
3949
3803
  dpr: typeof window > "u" ? 1 : window.devicePixelRatio || 1,
3950
3804
  dprCap: e2.pixelDensityCap ?? 2,
3951
3805
  fastMode: e2.fastMode ?? false
3952
- }), i2 = V(this.staticCanvas, r2);
3806
+ }), i2 = P(this.staticCanvas, r2);
3953
3807
  this.staticDrawAbort.cancelled = true;
3954
3808
  let a2 = { cancelled: false };
3955
3809
  this.staticDrawAbort = a2, (async () => {
3956
3810
  if (a2.cancelled || this.disposed) return;
3957
- let o2 = this.resolvedLabelPosition === "outside" || this.resolvedLabelPosition === "leader-line" || this.resolvedLabelPosition === "auto" && (e2.nodeWidth ?? 16) <= 20 ? 80 : 8, s2 = o2, l2 = t2 - o2, d2 = n2 - 8, f2 = ft(this.graph, {
3958
- x0: s2,
3811
+ let s2 = this.resolvedLabelPosition === "outside" || this.resolvedLabelPosition === "leader-line" || this.resolvedLabelPosition === "auto" && (e2.nodeWidth ?? 16) <= 20 ? 80 : 8, l2 = s2, u2 = t2 - s2, f2 = n2 - 8, p2 = st(this.graph, {
3812
+ x0: l2,
3959
3813
  y0: 8,
3960
- x1: l2,
3961
- y1: d2,
3814
+ x1: u2,
3815
+ y1: f2,
3962
3816
  nodeWidth: e2.nodeWidth ?? 16,
3963
3817
  nodePadding: e2.nodePadding ?? 8,
3964
3818
  alignment: this.resolvedNodeAlignment,
@@ -3966,137 +3820,137 @@ var mt = {
3966
3820
  }), m2 = this.personalization.palette[this.personalization.theme], h2 = i2.ctx;
3967
3821
  if (h2.clearRect(0, 0, r2.cssWidth, r2.cssHeight), this.personalization.glow.strength > 0) {
3968
3822
  let e3 = this.personalization.cornerRadius;
3969
- U(h2, {
3823
+ I(h2, {
3970
3824
  glow: this.personalization.glow,
3971
3825
  theme: this.personalization.theme,
3972
3826
  plotRect: {
3973
- x: s2,
3827
+ x: l2,
3974
3828
  y: 8,
3975
- w: l2 - s2,
3976
- h: d2 - 8
3829
+ w: u2 - l2,
3830
+ h: f2 - 8
3977
3831
  },
3978
3832
  dpr: Math.min(typeof window < "u" ? window.devicePixelRatio ?? 1 : 1, 2)
3979
3833
  }, (t3, n3) => {
3980
3834
  if (n3) for (let n4 = 0; n4 < this.graph.nodeCount; n4++) {
3981
- let r3 = this.nodeColors[n4] ?? "rgba(128,128,128,1)", i3 = f2.nodeX0[n4], a3 = f2.nodeY0[n4], o3 = f2.nodeX1[n4] - i3, s3 = f2.nodeY1[n4] - a3, c2 = Math.min(e3, o3 / 2, s3 / 2);
3982
- t3.fillStyle = r3, t3.beginPath(), c2 > 0 ? t3.roundRect(i3, a3, o3, s3, c2) : t3.rect(i3, a3, o3, s3), t3.fill();
3835
+ let r3 = this.nodeColors[n4] ?? "rgba(128,128,128,1)", i3 = p2.nodeX0[n4], a3 = p2.nodeY0[n4], o2 = p2.nodeX1[n4] - i3, s3 = p2.nodeY1[n4] - a3, c2 = Math.min(e3, o2 / 2, s3 / 2);
3836
+ t3.fillStyle = r3, t3.beginPath(), c2 > 0 ? t3.roundRect(i3, a3, o2, s3, c2) : t3.rect(i3, a3, o2, s3), t3.fill();
3983
3837
  }
3984
3838
  });
3985
3839
  }
3986
3840
  let g2 = e2.linkOpacity ?? 0.45;
3987
3841
  for (let e3 = 0; e3 < this.graph.linkCount; e3++) {
3988
- let t3 = this.graph.linkSources[e3], n3 = this.graph.linkTargets[e3], r3 = f2.nodeX1[t3], i3 = f2.nodeX0[n3], a3 = f2.linkSourceY0[e3], o3 = f2.linkSourceY1[e3], s3 = f2.linkTargetY0[e3], c2 = f2.linkTargetY1[e3], l3 = this.graph.linkColorOverrides[e3], u2 = this.graph.linkOpacityOverrides[e3], d3 = Number.isFinite(u2) ? u2 : g2, p2;
3989
- if (l3 != null) p2 = P(l3, d3);
3842
+ let t3 = this.graph.linkSources[e3], n3 = this.graph.linkTargets[e3], r3 = p2.nodeX1[t3], i3 = p2.nodeX0[n3], a3 = p2.linkSourceY0[e3], o2 = p2.linkSourceY1[e3], s3 = p2.linkTargetY0[e3], c2 = p2.linkTargetY1[e3], l3 = this.graph.linkColorOverrides[e3], u3 = this.graph.linkOpacityOverrides[e3], d2 = Number.isFinite(u3) ? u3 : g2, f3;
3843
+ if (l3 != null) f3 = A(l3, d2);
3990
3844
  else switch (this.resolvedLinkColor.kind) {
3991
3845
  case "source":
3992
- p2 = P(this.nodeColors[t3] ?? "rgba(128,128,128,1)", d3);
3846
+ f3 = A(this.nodeColors[t3] ?? "rgba(128,128,128,1)", d2);
3993
3847
  break;
3994
3848
  case "target":
3995
- p2 = P(this.nodeColors[n3] ?? "rgba(128,128,128,1)", d3);
3849
+ f3 = A(this.nodeColors[n3] ?? "rgba(128,128,128,1)", d2);
3996
3850
  break;
3997
3851
  case "gradient": {
3998
3852
  let e4 = h2.createLinearGradient(r3, 0, i3, 0);
3999
- e4.addColorStop(0, P(this.nodeColors[t3] ?? "rgba(128,128,128,1)", d3)), e4.addColorStop(1, P(this.nodeColors[n3] ?? "rgba(128,128,128,1)", d3)), p2 = e4;
3853
+ e4.addColorStop(0, A(this.nodeColors[t3] ?? "rgba(128,128,128,1)", d2)), e4.addColorStop(1, A(this.nodeColors[n3] ?? "rgba(128,128,128,1)", d2)), f3 = e4;
4000
3854
  break;
4001
3855
  }
4002
3856
  case "neutral":
4003
- p2 = P(M(m2.neutral, 1), d3);
3857
+ f3 = A(O(m2.neutral, 1), d2);
4004
3858
  break;
4005
3859
  case "literal":
4006
- p2 = P(this.resolvedLinkColor.color, d3);
3860
+ f3 = A(this.resolvedLinkColor.color, d2);
4007
3861
  break;
4008
3862
  }
4009
- h2.fillStyle = p2, h2.beginPath();
3863
+ h2.fillStyle = f3, h2.beginPath();
4010
3864
  let _3 = (r3 + i3) / 2;
4011
- h2.moveTo(r3, a3), h2.bezierCurveTo(_3, a3, _3, s3, i3, s3), h2.lineTo(i3, c2), h2.bezierCurveTo(_3, c2, _3, o3, r3, o3), h2.closePath(), h2.fill();
3865
+ h2.moveTo(r3, a3), h2.bezierCurveTo(_3, a3, _3, s3, i3, s3), h2.lineTo(i3, c2), h2.bezierCurveTo(_3, c2, _3, o2, r3, o2), h2.closePath(), h2.fill();
4012
3866
  }
4013
3867
  let _2 = this.personalization.cornerRadius, v2 = this.personalization.borderWidth;
4014
3868
  for (let e3 = 0; e3 < this.graph.nodeCount; e3++) {
4015
3869
  let t3 = this.nodeColors[e3], n3, r3;
4016
3870
  if (this.personalization.visualStyle === "Outline") {
4017
- let e4 = this.personalization.outlineFillColor === "auto" ? t3 : this.personalization.outlineFillColor, i4 = j(this.personalization);
4018
- n3 = i4 <= 0 ? null : P(e4, i4), r3 = v2 > 0 ? t3 : null;
3871
+ let e4 = this.personalization.outlineFillColor === "auto" ? t3 : this.personalization.outlineFillColor, i4 = D(this.personalization);
3872
+ n3 = i4 <= 0 ? null : A(e4, i4), r3 = v2 > 0 ? t3 : null;
4019
3873
  } else n3 = t3, r3 = v2 > 0 ? t3 : null;
4020
- let i3 = f2.nodeX0[e3], a3 = f2.nodeY0[e3], o3 = f2.nodeX1[e3] - i3, s3 = f2.nodeY1[e3] - a3, l3 = Math.min(_2, o3 / 2, s3 / 2), d3 = null;
3874
+ let i3 = p2.nodeX0[e3], a3 = p2.nodeY0[e3], s3 = p2.nodeX1[e3] - i3, l3 = p2.nodeY1[e3] - a3, u3 = Math.min(_2, s3 / 2, l3 / 2), f3 = null;
4021
3875
  if (this.personalization.pattern.type !== "solid") {
4022
- let e4 = this.personalization.pattern.color === "auto" ? p(t3, this.personalization.theme === "dark", this.personalization.visualStyle === "Outline") : this.personalization.pattern.color;
4023
- d3 = c(h2, {
3876
+ let e4 = this.personalization.pattern.color === "auto" ? d(t3, this.personalization.theme === "dark", this.personalization.visualStyle === "Outline") : this.personalization.pattern.color;
3877
+ f3 = o(h2, {
4024
3878
  ...this.personalization.pattern,
4025
3879
  color: e4
4026
3880
  }, t3, Math.min(typeof window < "u" ? window.devicePixelRatio ?? 1 : 1, 2));
4027
3881
  }
4028
- u({
3882
+ c({
4029
3883
  ctx: h2,
4030
3884
  x: i3,
4031
3885
  y: a3,
4032
- w: o3,
4033
- h: s3,
4034
- tl: l3,
4035
- tr: l3,
4036
- br: l3,
4037
- bl: l3,
3886
+ w: s3,
3887
+ h: l3,
3888
+ tl: u3,
3889
+ tr: u3,
3890
+ br: u3,
3891
+ bl: u3,
4038
3892
  fillStyle: n3,
4039
3893
  strokeStyle: r3,
4040
3894
  strokeWidth: v2,
4041
- patternFill: d3
3895
+ patternFill: f3
4042
3896
  });
4043
3897
  }
4044
- let y2 = M(m2.neutral, 0.95);
3898
+ let y2 = O(m2.neutral, 0.95);
4045
3899
  h2.font = "11px system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif", h2.textBaseline = "middle";
4046
3900
  let b2 = new Float64Array(this.graph.maxDepth + 1);
4047
3901
  for (let e3 = 0; e3 < this.graph.nodeCount; e3++) b2[this.graph.depths[e3]] += this.graph.nodeValues[e3];
4048
3902
  for (let e3 = 0; e3 < this.graph.nodeCount; e3++) {
4049
- let t3 = f2.nodeX0[e3], n3 = f2.nodeX1[e3], r3 = (f2.nodeY0[e3] + f2.nodeY1[e3]) / 2, i3 = this.graph.nodeValues[e3], a3 = b2[this.graph.depths[e3]], o3 = _t(this.resolvedLabelContent, {
3903
+ let t3 = p2.nodeX0[e3], n3 = p2.nodeX1[e3], r3 = (p2.nodeY0[e3] + p2.nodeY1[e3]) / 2, i3 = this.graph.nodeValues[e3], a3 = b2[this.graph.depths[e3]], o2 = ft(this.resolvedLabelContent, {
4050
3904
  name: this.graph.nodeLabelOverrides[e3] ?? this.graph.nodeNames[e3],
4051
3905
  value: i3,
4052
3906
  percent: a3 > 0 ? i3 / a3 : 0
4053
3907
  }, this.formatter);
4054
- if (o3 === "") continue;
4055
- let c2 = this.resolvedLabelPosition === "off" ? "off" : this.resolvedLabelPosition === "inside" ? "inside" : this.resolvedLabelPosition === "outside" || this.resolvedLabelPosition === "leader-line" ? "outside" : n3 - t3 >= 40 ? "inside" : "outside";
4056
- if (c2 === "off") continue;
3908
+ if (o2 === "") continue;
3909
+ let s3 = this.resolvedLabelPosition === "off" ? "off" : this.resolvedLabelPosition === "inside" ? "inside" : this.resolvedLabelPosition === "outside" || this.resolvedLabelPosition === "leader-line" ? "outside" : n3 - t3 >= 40 ? "inside" : "outside";
3910
+ if (s3 === "off") continue;
4057
3911
  h2.font = "11px system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif";
4058
- let u2 = "system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif";
4059
- if (h2.fillStyle = c2 === "inside" ? this.personalization.theme === "light" ? "rgb(255,255,255)" : "rgb(20,22,26)" : y2, c2 === "inside") {
4060
- let e4 = Math.max(0, n3 - t3 - 4), i4 = 11, a4 = h2.measureText(o3).width;
4061
- for (; a4 > e4 && i4 > 7; ) --i4, h2.font = `${i4}px ${u2}`, a4 = h2.measureText(o3).width;
3912
+ let c2 = "system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif";
3913
+ if (h2.fillStyle = s3 === "inside" ? this.personalization.theme === "light" ? "rgb(255,255,255)" : "rgb(20,22,26)" : y2, s3 === "inside") {
3914
+ let e4 = Math.max(0, n3 - t3 - 4), i4 = 11, a4 = h2.measureText(o2).width;
3915
+ for (; a4 > e4 && i4 > 7; ) --i4, h2.font = `${i4}px ${c2}`, a4 = h2.measureText(o2).width;
4062
3916
  if (a4 > e4) continue;
4063
- h2.textAlign = "center", h2.fillText(o3, (t3 + n3) / 2, r3);
3917
+ h2.textAlign = "center", h2.fillText(o2, (t3 + n3) / 2, r3);
4064
3918
  } else {
4065
- let e4 = t3 < (s2 + l2) / 2, i4 = e4 ? t3 - 6 : n3 + 6, a4 = e4 ? Math.max(0, i4 - s2 - 2) : Math.max(0, l2 - i4 - 2), c3 = 11, d3 = h2.measureText(o3).width;
4066
- for (; d3 > a4 && c3 > 7; ) --c3, h2.font = `${c3}px ${u2}`, d3 = h2.measureText(o3).width;
4067
- if (d3 > a4) continue;
4068
- h2.textAlign = e4 ? "right" : "left", h2.fillText(o3, i4, r3);
3919
+ let e4 = t3 < (l2 + u2) / 2, i4 = e4 ? t3 - 6 : n3 + 6, a4 = e4 ? Math.max(0, i4 - l2 - 2) : Math.max(0, u2 - i4 - 2), s4 = 11, d2 = h2.measureText(o2).width;
3920
+ for (; d2 > a4 && s4 > 7; ) --s4, h2.font = `${s4}px ${c2}`, d2 = h2.measureText(o2).width;
3921
+ if (d2 > a4) continue;
3922
+ h2.textAlign = e4 ? "right" : "left", h2.fillText(o2, i4, r3);
4069
3923
  }
4070
3924
  }
4071
3925
  if (this.resolvedValueDisplay === "always") {
4072
3926
  h2.fillStyle = y2, h2.textAlign = "center";
4073
3927
  for (let e3 = 0; e3 < this.graph.linkCount; e3++) {
4074
- let t3 = this.graph.linkSources[e3], n3 = this.graph.linkTargets[e3], r3 = (f2.nodeX1[t3] + f2.nodeX0[n3]) / 2, i3 = (f2.linkSourceY0[e3] + f2.linkSourceY1[e3] + f2.linkTargetY0[e3] + f2.linkTargetY1[e3]) / 4;
3928
+ let t3 = this.graph.linkSources[e3], n3 = this.graph.linkTargets[e3], r3 = (p2.nodeX1[t3] + p2.nodeX0[n3]) / 2, i3 = (p2.linkSourceY0[e3] + p2.linkSourceY1[e3] + p2.linkTargetY0[e3] + p2.linkTargetY1[e3]) / 4;
4075
3929
  h2.fillText(this.formatter.formatNumber(this.graph.linkValues[e3], 2), r3, i3);
4076
3930
  }
4077
3931
  }
4078
3932
  let x2 = null;
4079
- this.dynamicCanvas !== null && (x2 = V(this.dynamicCanvas, r2).ctx), this.handle = {
3933
+ this.dynamicCanvas !== null && (x2 = P(this.dynamicCanvas, r2).ctx), this.handle = {
4080
3934
  dynamicCtx: x2,
4081
3935
  layout: {
4082
- innerLeft: s2,
4083
- innerRight: l2,
3936
+ innerLeft: l2,
3937
+ innerRight: u2,
4084
3938
  innerTop: 8,
4085
- innerBottom: d2,
4086
- layout: f2,
3939
+ innerBottom: f2,
3940
+ layout: p2,
4087
3941
  viewport: r2
4088
3942
  },
4089
- crosshairLineColor: M(m2.neutral, 0.5),
4090
- crosshairMarkerStroke: M(m2.neutral, 1),
3943
+ crosshairLineColor: O(m2.neutral, 0.5),
3944
+ crosshairMarkerStroke: O(m2.neutral, 1),
4091
3945
  nodeColors: this.nodeColors
4092
3946
  };
4093
3947
  })();
4094
3948
  }
4095
3949
  };
4096
- function gt(e2, t2, n2) {
3950
+ function dt(e2, t2, n2) {
4097
3951
  return e2 + (t2 - e2) * n2;
4098
3952
  }
4099
- function _t(e2, t2, n2) {
3953
+ function ft(e2, t2, n2) {
4100
3954
  if (e2.kind === "function") return e2.fn(t2);
4101
3955
  switch (e2.preset) {
4102
3956
  case "name":
@@ -4113,11 +3967,11 @@ function _t(e2, t2, n2) {
4113
3967
  return `${t2.name} ${n2.formatNumber(t2.value, 2)} (${(t2.percent * 100).toFixed(1)}%)`;
4114
3968
  }
4115
3969
  }
4116
- function vt(e2, t2, n2) {
3970
+ function $(e2, t2, n2) {
4117
3971
  let r2 = e2.dynamicCtx;
4118
3972
  if (r2 === null) return;
4119
3973
  let i2 = e2.layout;
4120
- r2.clearRect(0, 0, i2.viewport.cssWidth, i2.viewport.cssHeight), !(t2 === null || !n2.crosshairVisible) && D({
3974
+ r2.clearRect(0, 0, i2.viewport.cssWidth, i2.viewport.cssHeight), !(t2 === null || !n2.crosshairVisible) && T({
4121
3975
  ctx: r2,
4122
3976
  x: t2.pointerX,
4123
3977
  y: t2.pointerY,
@@ -4134,8 +3988,8 @@ function vt(e2, t2, n2) {
4134
3988
  markerStroke: e2.crosshairMarkerStroke
4135
3989
  });
4136
3990
  }
4137
- function yt(e2) {
4138
- let t2 = $(), n2 = q.useRef(null), r2 = q.useRef(null), i2 = q.useRef(null), a2 = q.useRef(null), [o2, s2] = q.useState(null), [c2, l2] = q.useState(null), u2 = q.useMemo(() => ({
3991
+ function pt(e2) {
3992
+ let t2 = K(), n2 = z.useRef(null), r2 = z.useRef(null), i2 = z.useRef(null), a2 = z.useRef(null), [o2, s2] = z.useState(null), [c2, l2] = z.useState(null), u2 = z.useMemo(() => ({
4139
3993
  theme: t2.theme,
4140
3994
  palette: t2.palette,
4141
3995
  locale: t2.locale,
@@ -4162,10 +4016,10 @@ function yt(e2) {
4162
4016
  t2.osTheme,
4163
4017
  t2.appTheme
4164
4018
  ]);
4165
- q.useEffect(() => {
4019
+ z.useEffect(() => {
4166
4020
  let t3 = r2.current;
4167
4021
  if (t3 === null) return;
4168
- let o3 = new ht({
4022
+ let o3 = new ut({
4169
4023
  container: n2.current,
4170
4024
  staticCanvas: t3,
4171
4025
  dynamicCanvas: i2.current,
@@ -4177,12 +4031,12 @@ function yt(e2) {
4177
4031
  return a2.current = o3, () => {
4178
4032
  a2.current = null, o3.dispose();
4179
4033
  };
4180
- }, []), q.useEffect(() => {
4034
+ }, []), z.useEffect(() => {
4181
4035
  a2.current?.update(e2, u2);
4182
4036
  });
4183
- let d2 = q.useCallback((e3) => {
4037
+ let d2 = z.useCallback((e3) => {
4184
4038
  a2.current?.handlePointerMove(e3.nativeEvent);
4185
- }, []), f2 = q.useCallback(() => {
4039
+ }, []), f2 = z.useCallback(() => {
4186
4040
  a2.current?.handlePointerLeave();
4187
4041
  }, []), p2 = e2.width ?? 800, m2 = e2.height ?? 400, h2 = e2.ariaLabel ?? o2?.ariaLabel ?? "Sankey chart", g2 = c2 === null || o2 === null ? null : (() => {
4188
4042
  let t3 = {
@@ -4198,9 +4052,9 @@ function yt(e2) {
4198
4052
  timeZone: o2.resolvedTimeZone,
4199
4053
  formatter: o2.formatter
4200
4054
  };
4201
- return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : bt(t3);
4055
+ return e2.tooltip === false ? null : typeof e2.tooltip == "function" ? e2.tooltip(t3) : mt(t3);
4202
4056
  })();
4203
- return /* @__PURE__ */ Y("div", {
4057
+ return /* @__PURE__ */ H("div", {
4204
4058
  ref: n2,
4205
4059
  style: {
4206
4060
  position: "relative",
@@ -4211,7 +4065,7 @@ function yt(e2) {
4211
4065
  onPointerMove: d2,
4212
4066
  onPointerLeave: f2,
4213
4067
  children: [
4214
- /* @__PURE__ */ J("canvas", {
4068
+ /* @__PURE__ */ V("canvas", {
4215
4069
  ref: r2,
4216
4070
  style: {
4217
4071
  display: "block",
@@ -4220,7 +4074,7 @@ function yt(e2) {
4220
4074
  },
4221
4075
  "aria-hidden": "true"
4222
4076
  }),
4223
- /* @__PURE__ */ J("canvas", {
4077
+ /* @__PURE__ */ V("canvas", {
4224
4078
  ref: i2,
4225
4079
  style: {
4226
4080
  display: "block",
@@ -4236,9 +4090,9 @@ function yt(e2) {
4236
4090
  ]
4237
4091
  });
4238
4092
  }
4239
- function bt(e2) {
4093
+ function mt(e2) {
4240
4094
  let t2 = e2.theme === "dark", n2 = t2 ? "rgb(34,36,42)" : "rgb(255,255,255)", r2 = t2 ? "rgb(240,242,246)" : "rgb(20,22,26)", i2 = t2 ? "rgba(240,242,246,0.62)" : "rgba(20,22,26,0.56)", a2 = t2 ? "rgba(255,255,255,0.08)" : "rgba(15,18,23,0.08)";
4241
- return /* @__PURE__ */ Y("div", {
4095
+ return /* @__PURE__ */ H("div", {
4242
4096
  role: "tooltip",
4243
4097
  style: {
4244
4098
  position: "absolute",
@@ -4254,7 +4108,7 @@ function bt(e2) {
4254
4108
  pointerEvents: "none",
4255
4109
  minWidth: 180
4256
4110
  },
4257
- children: [/* @__PURE__ */ Y("div", {
4111
+ children: [/* @__PURE__ */ H("div", {
4258
4112
  style: {
4259
4113
  color: i2,
4260
4114
  fontSize: 10,
@@ -4263,7 +4117,7 @@ function bt(e2) {
4263
4117
  alignItems: "center",
4264
4118
  gap: 5
4265
4119
  },
4266
- children: [/* @__PURE__ */ J("span", {
4120
+ children: [/* @__PURE__ */ V("span", {
4267
4121
  "aria-hidden": "true",
4268
4122
  style: {
4269
4123
  width: 10,
@@ -4272,290 +4126,263 @@ function bt(e2) {
4272
4126
  background: e2.color,
4273
4127
  display: "inline-block"
4274
4128
  }
4275
- }), e2.target.kind === "node" ? /* @__PURE__ */ J("span", { children: "Node" }) : /* @__PURE__ */ J("span", { children: "Flow" })]
4276
- }), e2.target.kind === "node" ? /* @__PURE__ */ Y(re, { children: [/* @__PURE__ */ J("div", {
4129
+ }), e2.target.kind === "node" ? /* @__PURE__ */ V("span", { children: "Node" }) : /* @__PURE__ */ V("span", { children: "Flow" })]
4130
+ }), e2.target.kind === "node" ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("div", {
4277
4131
  style: { fontWeight: 600 },
4278
4132
  children: e2.target.name
4279
- }), /* @__PURE__ */ Y("div", { children: ["value: ", e2.formatter.formatNumber(e2.target.value, 2)] })] }) : /* @__PURE__ */ Y(re, { children: [/* @__PURE__ */ Y("div", { children: [
4133
+ }), /* @__PURE__ */ H("div", { children: ["value: ", e2.formatter.formatNumber(e2.target.value, 2)] })] }) : /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ H("div", { children: [
4280
4134
  e2.target.sourceId,
4281
4135
  " \u2192 ",
4282
4136
  e2.target.targetId
4283
- ] }), /* @__PURE__ */ Y("div", { children: ["value: ", e2.formatter.formatNumber(e2.target.value, 2)] })] })]
4137
+ ] }), /* @__PURE__ */ H("div", { children: ["value: ", e2.formatter.formatNumber(e2.target.value, 2)] })] })]
4284
4138
  });
4285
4139
  }
4286
- function xt(e2) {
4287
- let t2 = (0, Z.c)(41), n2 = pe(), r2 = q.useRef(null), [i2, a2] = q.useState(null), o2 = e2.width ?? 600, s2 = e2.height ?? 28, c2 = e2.trackColor ?? "rgba(120,120,120,0.12)", l2 = e2.selectionColor ?? "rgba(80,160,120,0.28)", u2 = e2.handleColor ?? "rgba(80,160,120,0.95)", d2 = e2.domain.end - e2.domain.start, f2 = n2?.state.brush ?? null, p2;
4288
- t2[0] !== e2.domain.start || t2[1] !== d2 || t2[2] !== o2 ? (p2 = (t3) => d2 <= 0 || o2 <= 0 ? e2.domain.start : e2.domain.start + t3 / o2 * d2, t2[0] = e2.domain.start, t2[1] = d2, t2[2] = o2, t2[3] = p2) : p2 = t2[3];
4289
- let m2 = p2, h2;
4290
- t2[4] !== e2.domain.start || t2[5] !== d2 || t2[6] !== o2 ? (h2 = (t3) => d2 <= 0 || o2 <= 0 ? 0 : (t3 - e2.domain.start) / d2 * o2, t2[4] = e2.domain.start, t2[5] = d2, t2[6] = o2, t2[7] = h2) : h2 = t2[7];
4291
- let g2 = h2, _2;
4292
- t2[8] !== f2 || t2[9] !== n2 || t2[10] !== g2 || t2[11] !== m2 ? (_2 = (e3) => {
4293
- if (n2 === null) return;
4294
- let t3 = r2.current?.getBoundingClientRect();
4295
- if (t3 === void 0) return;
4296
- let i3 = e3.clientX - t3.left;
4297
- if (e3.currentTarget.setPointerCapture(e3.pointerId), f2 !== null) {
4298
- let e4 = g2(f2.start), t4 = g2(f2.end);
4299
- if (Math.abs(i3 - e4) < 6) {
4300
- a2({
4140
+ function ht(e2) {
4141
+ let t2 = Y(), n2 = z.useRef(null), [r2, i2] = z.useState(null), a2 = e2.width ?? 600, o2 = e2.height ?? 28, s2 = e2.trackColor ?? "rgba(120,120,120,0.12)", c2 = e2.selectionColor ?? "rgba(80,160,120,0.28)", l2 = e2.handleColor ?? "rgba(80,160,120,0.95)", u2 = e2.domain.end - e2.domain.start, d2 = t2?.state.brush ?? null, f2 = z.useCallback((t3) => u2 <= 0 || a2 <= 0 ? e2.domain.start : e2.domain.start + t3 / a2 * u2, [
4142
+ e2.domain.start,
4143
+ u2,
4144
+ a2
4145
+ ]), p2 = z.useCallback((t3) => u2 <= 0 || a2 <= 0 ? 0 : (t3 - e2.domain.start) / u2 * a2, [
4146
+ e2.domain.start,
4147
+ u2,
4148
+ a2
4149
+ ]), m2 = z.useCallback((e3) => {
4150
+ if (t2 === null) return;
4151
+ let r3 = n2.current?.getBoundingClientRect();
4152
+ if (r3 === void 0) return;
4153
+ let a3 = e3.clientX - r3.left;
4154
+ if (e3.currentTarget.setPointerCapture(e3.pointerId), d2 !== null) {
4155
+ let e4 = p2(d2.start), t3 = p2(d2.end);
4156
+ if (Math.abs(a3 - e4) < 6) {
4157
+ i2({
4301
4158
  kind: "left",
4302
- startX: i3,
4303
- startBrush: f2
4159
+ startX: a3,
4160
+ startBrush: d2
4304
4161
  });
4305
4162
  return;
4306
4163
  }
4307
- if (Math.abs(i3 - t4) < 6) {
4308
- a2({
4164
+ if (Math.abs(a3 - t3) < 6) {
4165
+ i2({
4309
4166
  kind: "right",
4310
- startX: i3,
4311
- startBrush: f2
4167
+ startX: a3,
4168
+ startBrush: d2
4312
4169
  });
4313
4170
  return;
4314
4171
  }
4315
- if (i3 > e4 && i3 < t4) {
4316
- a2({
4172
+ if (a3 > e4 && a3 < t3) {
4173
+ i2({
4317
4174
  kind: "move",
4318
- startX: i3,
4319
- startBrush: f2
4175
+ startX: a3,
4176
+ startBrush: d2
4320
4177
  });
4321
4178
  return;
4322
4179
  }
4323
4180
  }
4324
- let o3 = m2(i3);
4325
- n2.state.setBrush({
4181
+ let o3 = f2(a3);
4182
+ t2.state.setBrush({
4326
4183
  start: o3,
4327
4184
  end: o3
4328
- }), a2({
4185
+ }), i2({
4329
4186
  kind: "draw",
4330
- startX: i3,
4187
+ startX: a3,
4331
4188
  startBrush: null
4332
4189
  });
4333
- }, t2[8] = f2, t2[9] = n2, t2[10] = g2, t2[11] = m2, t2[12] = _2) : _2 = t2[12];
4334
- let v2 = _2, y2;
4335
- t2[13] !== i2 || t2[14] !== n2 || t2[15] !== e2.domain.end || t2[16] !== e2.domain.start || t2[17] !== d2 || t2[18] !== m2 ? (y2 = (t3) => {
4336
- if (n2 === null || i2 === null) return;
4337
- let a3 = r2.current?.getBoundingClientRect();
4190
+ }, [
4191
+ t2,
4192
+ d2,
4193
+ p2,
4194
+ f2
4195
+ ]), h2 = z.useCallback((i3) => {
4196
+ if (t2 === null || r2 === null) return;
4197
+ let a3 = n2.current?.getBoundingClientRect();
4338
4198
  if (a3 === void 0) return;
4339
- let o3 = t3.clientX - a3.left;
4340
- if (i2.kind === "draw") {
4341
- let e3 = m2(i2.startX), t4 = m2(o3), r3 = Math.min(e3, t4), a4 = Math.max(e3, t4);
4342
- n2.state.setBrush({
4343
- start: r3,
4199
+ let o3 = i3.clientX - a3.left;
4200
+ if (r2.kind === "draw") {
4201
+ let e3 = f2(r2.startX), n3 = f2(o3), i4 = Math.min(e3, n3), a4 = Math.max(e3, n3);
4202
+ t2.state.setBrush({
4203
+ start: i4,
4344
4204
  end: a4
4345
4205
  });
4346
4206
  return;
4347
4207
  }
4348
- let s3 = i2.startBrush;
4208
+ let s3 = r2.startBrush;
4349
4209
  if (s3 === null) return;
4350
- let c3 = m2(o3) - m2(i2.startX);
4351
- if (i2.kind === "left") {
4210
+ let c3 = f2(o3) - f2(r2.startX);
4211
+ if (r2.kind === "left") {
4352
4212
  let e3 = s3.start + c3;
4353
- e3 >= s3.end && (e3 = s3.end - 1e-4 * d2), n2.state.setBrush({
4213
+ e3 >= s3.end && (e3 = s3.end - 1e-4 * u2), t2.state.setBrush({
4354
4214
  start: e3,
4355
4215
  end: s3.end
4356
4216
  });
4357
- } else if (i2.kind === "right") {
4217
+ } else if (r2.kind === "right") {
4358
4218
  let e3 = s3.end + c3;
4359
- e3 <= s3.start && (e3 = s3.start + 1e-4 * d2), n2.state.setBrush({
4219
+ e3 <= s3.start && (e3 = s3.start + 1e-4 * u2), t2.state.setBrush({
4360
4220
  start: s3.start,
4361
4221
  end: e3
4362
4222
  });
4363
- } else if (i2.kind === "move") {
4364
- let t4 = s3.start + c3, r3 = s3.end + c3;
4365
- if (t4 < e2.domain.start) {
4366
- let n3 = e2.domain.start - t4;
4367
- t4 += n3, r3 += n3;
4223
+ } else if (r2.kind === "move") {
4224
+ s3.end - s3.start;
4225
+ let n3 = s3.start + c3, r3 = s3.end + c3;
4226
+ if (n3 < e2.domain.start) {
4227
+ let t3 = e2.domain.start - n3;
4228
+ n3 += t3, r3 += t3;
4368
4229
  }
4369
4230
  if (r3 > e2.domain.end) {
4370
- let n3 = r3 - e2.domain.end;
4371
- t4 -= n3, r3 -= n3;
4231
+ let t3 = r3 - e2.domain.end;
4232
+ n3 -= t3, r3 -= t3;
4372
4233
  }
4373
- n2.state.setBrush({
4374
- start: t4,
4234
+ t2.state.setBrush({
4235
+ start: n3,
4375
4236
  end: r3
4376
4237
  });
4377
4238
  }
4378
- }, t2[13] = i2, t2[14] = n2, t2[15] = e2.domain.end, t2[16] = e2.domain.start, t2[17] = d2, t2[18] = m2, t2[19] = y2) : y2 = t2[19];
4379
- let b2 = y2, x2;
4380
- t2[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x2 = () => {
4381
- a2(null);
4382
- }, t2[20] = x2) : x2 = t2[20];
4383
- let S2 = x2, C2;
4384
- t2[21] === n2?.state ? C2 = t2[22] : (C2 = () => {
4385
- n2?.state.setBrush(null);
4386
- }, t2[21] = n2?.state, t2[22] = C2);
4387
- let w2 = C2;
4388
- if (n2 === null) {
4389
- let e3;
4390
- return t2[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e3 = /* @__PURE__ */ J("div", {
4391
- role: "presentation",
4392
- style: { display: "none" }
4393
- }), t2[23] = e3) : e3 = t2[23], e3;
4394
- }
4395
- let T2 = f2 === null ? 0 : g2(f2.start), E2 = f2 === null ? 0 : g2(f2.end), D2 = i2 === null ? "crosshair" : "grabbing", O2;
4396
- t2[24] !== s2 || t2[25] !== D2 || t2[26] !== c2 || t2[27] !== o2 ? (O2 = {
4397
- position: "relative",
4398
- width: o2,
4399
- height: s2,
4400
- background: c2,
4401
- borderRadius: 4,
4402
- cursor: D2,
4403
- userSelect: "none",
4404
- touchAction: "none"
4405
- }, t2[24] = s2, t2[25] = D2, t2[26] = c2, t2[27] = o2, t2[28] = O2) : O2 = t2[28];
4406
- let k2;
4407
- t2[29] !== f2 || t2[30] !== u2 || t2[31] !== T2 || t2[32] !== E2 || t2[33] !== l2 ? (k2 = f2 !== null && E2 > T2 && /* @__PURE__ */ Y(re, { children: [
4408
- /* @__PURE__ */ J("div", { style: {
4409
- position: "absolute",
4410
- left: T2,
4411
- top: 0,
4412
- width: E2 - T2,
4413
- height: "100%",
4414
- background: l2,
4415
- borderTop: `1px solid ${u2}`,
4416
- borderBottom: `1px solid ${u2}`
4417
- } }),
4418
- /* @__PURE__ */ J("div", { style: {
4419
- position: "absolute",
4420
- left: T2 - 2,
4421
- top: 0,
4422
- width: 4,
4423
- height: "100%",
4424
- background: u2,
4425
- borderRadius: 2,
4426
- cursor: "ew-resize"
4427
- } }),
4428
- /* @__PURE__ */ J("div", { style: {
4429
- position: "absolute",
4430
- left: E2 - 2,
4431
- top: 0,
4432
- width: 4,
4433
- height: "100%",
4434
- background: u2,
4435
- borderRadius: 2,
4436
- cursor: "ew-resize"
4437
- } })
4438
- ] }), t2[29] = f2, t2[30] = u2, t2[31] = T2, t2[32] = E2, t2[33] = l2, t2[34] = k2) : k2 = t2[34];
4439
- let A2;
4440
- return t2[35] !== w2 || t2[36] !== v2 || t2[37] !== b2 || t2[38] !== O2 || t2[39] !== k2 ? (A2 = /* @__PURE__ */ J("div", {
4441
- ref: r2,
4239
+ }, [
4240
+ t2,
4241
+ r2,
4242
+ f2,
4243
+ e2.domain.start,
4244
+ e2.domain.end,
4245
+ u2
4246
+ ]), g2 = z.useCallback(() => {
4247
+ i2(null);
4248
+ }, []), _2 = z.useCallback(() => {
4249
+ t2?.state.setBrush(null);
4250
+ }, [t2]);
4251
+ if (t2 === null) return /* @__PURE__ */ V("div", {
4252
+ role: "presentation",
4253
+ style: { display: "none" }
4254
+ });
4255
+ let v2 = d2 === null ? 0 : p2(d2.start), y2 = d2 === null ? 0 : p2(d2.end);
4256
+ return /* @__PURE__ */ V("div", {
4257
+ ref: n2,
4442
4258
  role: "slider",
4443
4259
  "aria-label": "Time-range brush",
4444
- style: O2,
4445
- onPointerDown: v2,
4446
- onPointerMove: b2,
4447
- onPointerUp: S2,
4448
- onPointerCancel: S2,
4449
- onDoubleClick: w2,
4450
- children: k2
4451
- }), t2[35] = w2, t2[36] = v2, t2[37] = b2, t2[38] = O2, t2[39] = k2, t2[40] = A2) : A2 = t2[40], A2;
4260
+ style: {
4261
+ position: "relative",
4262
+ width: a2,
4263
+ height: o2,
4264
+ background: s2,
4265
+ borderRadius: 4,
4266
+ cursor: r2 === null ? "crosshair" : "grabbing",
4267
+ userSelect: "none",
4268
+ touchAction: "none"
4269
+ },
4270
+ onPointerDown: m2,
4271
+ onPointerMove: h2,
4272
+ onPointerUp: g2,
4273
+ onPointerCancel: g2,
4274
+ onDoubleClick: _2,
4275
+ children: d2 !== null && y2 > v2 && /* @__PURE__ */ H(B, { children: [
4276
+ /* @__PURE__ */ V("div", { style: {
4277
+ position: "absolute",
4278
+ left: v2,
4279
+ top: 0,
4280
+ width: y2 - v2,
4281
+ height: "100%",
4282
+ background: c2,
4283
+ borderTop: `1px solid ${l2}`,
4284
+ borderBottom: `1px solid ${l2}`
4285
+ } }),
4286
+ /* @__PURE__ */ V("div", { style: {
4287
+ position: "absolute",
4288
+ left: v2 - 2,
4289
+ top: 0,
4290
+ width: 4,
4291
+ height: "100%",
4292
+ background: l2,
4293
+ borderRadius: 2,
4294
+ cursor: "ew-resize"
4295
+ } }),
4296
+ /* @__PURE__ */ V("div", { style: {
4297
+ position: "absolute",
4298
+ left: y2 - 2,
4299
+ top: 0,
4300
+ width: 4,
4301
+ height: "100%",
4302
+ background: l2,
4303
+ borderRadius: 2,
4304
+ cursor: "ew-resize"
4305
+ } })
4306
+ ] })
4307
+ });
4452
4308
  }
4453
- function St(e2) {
4454
- let t2 = (0, Z.c)(23), n2 = pe(), r2 = e2.width ?? 600, i2 = e2.height ?? 80, a2;
4455
- bb0: {
4456
- if (e2.domain !== void 0) {
4457
- a2 = e2.domain;
4458
- break bb0;
4459
- }
4460
- let n3 = e2.data;
4461
- if ("times" in n3) {
4462
- let e3 = n3.times, r4 = e3.length;
4463
- if (r4 === 0) {
4464
- let e4;
4465
- t2[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e4 = {
4466
- start: 0,
4467
- end: 1
4468
- }, t2[0] = e4) : e4 = t2[0], a2 = e4;
4469
- break bb0;
4470
- }
4471
- let i4 = e3[r4 - 1], o4;
4472
- t2[1] !== i4 || t2[2] !== e3[0] ? (o4 = {
4473
- start: e3[0],
4474
- end: i4
4475
- }, t2[1] = i4, t2[2] = e3[0], t2[3] = o4) : o4 = t2[3], a2 = o4;
4476
- break bb0;
4477
- }
4478
- let r3 = n3.points;
4479
- if (r3.length === 0) {
4480
- let e3;
4481
- t2[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e3 = {
4309
+ function gt(e2) {
4310
+ let t2 = Y(), n2 = e2.width ?? 600, r2 = e2.height ?? 80, i2 = z.useMemo(() => {
4311
+ if (e2.domain !== void 0) return e2.domain;
4312
+ let t3 = e2.data;
4313
+ if ("times" in t3) {
4314
+ let e3 = t3.times, n4 = e3.length;
4315
+ return n4 === 0 ? {
4482
4316
  start: 0,
4483
4317
  end: 1
4484
- }, t2[4] = e3) : e3 = t2[4], a2 = e3;
4485
- break bb0;
4318
+ } : {
4319
+ start: e3[0],
4320
+ end: e3[n4 - 1]
4321
+ };
4486
4322
  }
4487
- let i3 = r3[r3.length - 1], o3;
4488
- t2[5] !== r3[0].t || t2[6] !== i3.t ? (o3 = {
4489
- start: r3[0].t,
4490
- end: i3.t
4491
- }, t2[5] = r3[0].t, t2[6] = i3.t, t2[7] = o3) : o3 = t2[7], a2 = o3;
4492
- }
4493
- let o2 = a2;
4494
- if (n2 === null) {
4495
- let e3;
4496
- return t2[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e3 = /* @__PURE__ */ J("div", {
4497
- role: "presentation",
4498
- style: { display: "none" }
4499
- }), t2[8] = e3) : e3 = t2[8], e3;
4500
- }
4501
- let s2;
4502
- t2[9] !== i2 || t2[10] !== r2 ? (s2 = {
4503
- position: "relative",
4504
- width: r2,
4505
- height: i2,
4506
- display: "flex",
4507
- flexDirection: "column",
4508
- gap: 0
4509
- }, t2[9] = i2, t2[10] = r2, t2[11] = s2) : s2 = t2[11];
4510
- let c2 = i2 - 20, l2;
4511
- t2[12] !== e2.data || t2[13] !== c2 || t2[14] !== r2 ? (l2 = /* @__PURE__ */ J(Te, {
4512
- data: e2.data,
4513
- width: r2,
4514
- height: c2,
4515
- sparkline: true
4516
- }), t2[12] = e2.data, t2[13] = c2, t2[14] = r2, t2[15] = l2) : l2 = t2[15];
4517
- let u2;
4518
- t2[16] !== o2 || t2[17] !== r2 ? (u2 = /* @__PURE__ */ J(xt, {
4519
- domain: o2,
4520
- width: r2,
4521
- height: 20
4522
- }), t2[16] = o2, t2[17] = r2, t2[18] = u2) : u2 = t2[18];
4523
- let d2;
4524
- return t2[19] !== s2 || t2[20] !== l2 || t2[21] !== u2 ? (d2 = /* @__PURE__ */ Y("div", {
4525
- style: s2,
4323
+ let n3 = t3.points;
4324
+ return n3.length === 0 ? {
4325
+ start: 0,
4326
+ end: 1
4327
+ } : {
4328
+ start: n3[0].t,
4329
+ end: n3[n3.length - 1].t
4330
+ };
4331
+ }, [e2.data, e2.domain]);
4332
+ return t2 === null ? /* @__PURE__ */ V("div", {
4333
+ role: "presentation",
4334
+ style: { display: "none" }
4335
+ }) : /* @__PURE__ */ H("div", {
4336
+ style: {
4337
+ position: "relative",
4338
+ width: n2,
4339
+ height: r2,
4340
+ display: "flex",
4341
+ flexDirection: "column",
4342
+ gap: 0
4343
+ },
4526
4344
  role: "region",
4527
4345
  "aria-label": "Chart group navigator",
4528
- children: [l2, u2]
4529
- }), t2[19] = s2, t2[20] = l2, t2[21] = u2, t2[22] = d2) : d2 = t2[22], d2;
4346
+ children: [/* @__PURE__ */ V(Se, {
4347
+ data: e2.data,
4348
+ width: n2,
4349
+ height: r2 - 20,
4350
+ sparkline: true
4351
+ }), /* @__PURE__ */ V(ht, {
4352
+ domain: i2,
4353
+ width: n2,
4354
+ height: 20
4355
+ })]
4356
+ });
4530
4357
  }
4531
4358
  export {
4532
- ye as C,
4533
- se as D,
4359
+ _e as C,
4360
+ q as D,
4534
4361
  de as E,
4535
- oe as O,
4536
- Ce as S,
4537
- pe as T,
4538
- Fe as _,
4539
- ot as a,
4540
- Te as b,
4541
- et as c,
4542
- Je as d,
4543
- Ke as f,
4544
- Be as g,
4545
- Ve as h,
4546
- ct as i,
4547
- $ as k,
4548
- Qe as l,
4549
- He as m,
4550
- xt as n,
4551
- it as o,
4552
- We as p,
4553
- yt as r,
4554
- nt as s,
4555
- St as t,
4556
- Ze as u,
4557
- Ae as v,
4558
- me as w,
4559
- Se as x,
4560
- ke as y
4362
+ G as O,
4363
+ be as S,
4364
+ Y as T,
4365
+ je as _,
4366
+ tt as a,
4367
+ Se as b,
4368
+ Ye as c,
4369
+ Ue as d,
4370
+ Ve as f,
4371
+ Fe as g,
4372
+ Ie as h,
4373
+ rt as i,
4374
+ K as k,
4375
+ qe as l,
4376
+ Le as m,
4377
+ ht as n,
4378
+ $e as o,
4379
+ ze as p,
4380
+ pt as r,
4381
+ Ze as s,
4382
+ gt as t,
4383
+ Ke as u,
4384
+ De as v,
4385
+ pe as w,
4386
+ ye as x,
4387
+ Ee as y
4561
4388
  };