drizzle-cube 0.2.22 → 0.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/client/charts.js +2 -2
  2. package/dist/client/chunks/{charts-BympPNAT.js → charts--hFH-bsu.js} +850 -844
  3. package/dist/client/chunks/charts--hFH-bsu.js.map +1 -0
  4. package/dist/client/chunks/{charts-CEz9wcfI.js → charts-DboFPJFN.js} +32 -32
  5. package/dist/client/chunks/{charts-CEz9wcfI.js.map → charts-DboFPJFN.js.map} +1 -1
  6. package/dist/client/chunks/{components-__XqYVbP.js → components-D7wTB56l.js} +7593 -7352
  7. package/dist/client/chunks/components-D7wTB56l.js.map +1 -0
  8. package/dist/client/chunks/core-PxWXpBbW.js +6 -0
  9. package/dist/client/chunks/core-PxWXpBbW.js.map +1 -0
  10. package/dist/client/chunks/{icons-B2XSxpVK.js → icons-DI4Xack3.js} +126 -120
  11. package/dist/client/chunks/icons-DI4Xack3.js.map +1 -0
  12. package/dist/client/chunks/{index-mA36fTTV.js → index-yc7cf-yE.js} +2 -2
  13. package/dist/client/chunks/{index-mA36fTTV.js.map → index-yc7cf-yE.js.map} +1 -1
  14. package/dist/client/components/FloatingEditToolbar.d.ts +28 -0
  15. package/dist/client/components.js +2 -2
  16. package/dist/client/hooks/useElementVisibility.d.ts +30 -0
  17. package/dist/client/hooks/useScrollDetection.d.ts +3 -1
  18. package/dist/client/hooks.js +2 -2
  19. package/dist/client/icons/types.d.ts +1 -0
  20. package/dist/client/icons.js +1 -1
  21. package/dist/client/index.d.ts +1 -0
  22. package/dist/client/index.js +46 -45
  23. package/dist/client/providers.js +1 -1
  24. package/dist/client/shared/components/CodeBlock.d.ts +1 -0
  25. package/dist/client/styles.css +1 -1
  26. package/dist/client/types.d.ts +2 -0
  27. package/dist/client-bundle-stats.html +1 -1
  28. package/package.json +1 -1
  29. package/dist/client/chunks/charts-BympPNAT.js.map +0 -1
  30. package/dist/client/chunks/components-__XqYVbP.js.map +0 -1
  31. package/dist/client/chunks/core-DWO_N91H.js +0 -6
  32. package/dist/client/chunks/core-DWO_N91H.js.map +0 -1
  33. package/dist/client/chunks/icons-B2XSxpVK.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { jsx as o, jsxs as k, Fragment as Vt } from "react/jsx-runtime";
2
- import de, { useContext as xt, createContext as Ot, useState as Z, useMemo as J, useCallback as Le, useRef as ye, useEffect as Me, useSyncExternalStore as pn, useLayoutEffect as Pt } from "react";
3
- import { ResponsiveContainer as Qt, Tooltip as Cr, ComposedChart as zr, CartesianGrid as yt, XAxis as gt, YAxis as Ee, Legend as Oe, Bar as xn, Cell as Ht, Line as Re, LineChart as yn, Area as gn, PieChart as bn, Pie as vn, ScatterChart as wn, Scatter as Jt, RadarChart as Nn, PolarGrid as An, PolarAngleAxis as Sn, PolarRadiusAxis as kn, Radar as Mn, RadialBarChart as Fn, RadialBar as Tn, Treemap as _n } from "recharts";
4
- import { d as St, a as $n, b as er, c as tr, e as Dn, f as Cn, g as zn, h as rr, i as nr, j as Ln, k as Yt, l as Rn, m as In, n as En, o as Vn, p as On, q as Pn, r as Hn, s as Yn, t as jn, u as Un, v as Bn, w as Wn, x as Gn, y as Kn, z as Xn, A as qn, B as Zn, C as Qn, D as Jn, E as ei, F as ti, G as ri, H as ni, I as ii, J as si, K as ai, L as oi, M as li, N as ci, O as di, P as ui, Q as fi, R as mi, S as hi, T as pi, U as xi, V as yi, W as gi, X as bi, Y as vi, Z as wi, _ as Ni, $ as Ai, a0 as Si, a1 as ki, a2 as Mi, a3 as Fi, a4 as Ti, a5 as _i, a6 as $i, a7 as Di, a8 as Ci, a9 as zi, aa as Li, ab as Ri, ac as at } from "./icons-B2XSxpVK.js";
2
+ import de, { useContext as xt, createContext as Ot, useState as Z, useMemo as J, useCallback as Le, useRef as ye, useEffect as Te, useSyncExternalStore as pn, useLayoutEffect as Pt } from "react";
3
+ import { ResponsiveContainer as Qt, Tooltip as Cr, ComposedChart as zr, CartesianGrid as yt, XAxis as gt, YAxis as Ie, Legend as Oe, Bar as xn, Cell as Ht, Line as Ee, LineChart as yn, Area as gn, PieChart as bn, Pie as vn, ScatterChart as wn, Scatter as Jt, RadarChart as Nn, PolarGrid as An, PolarAngleAxis as Sn, PolarRadiusAxis as kn, Radar as Tn, RadialBarChart as Fn, RadialBar as Mn, Treemap as _n } from "recharts";
4
+ import { d as St, a as $n, b as er, c as tr, e as Dn, f as Cn, g as zn, h as rr, i as nr, j as Ln, k as Yt, l as En, m as Rn, n as In, o as Vn, p as On, q as Pn, r as Hn, s as Yn, t as jn, u as Un, v as Bn, w as Wn, x as Gn, y as Kn, z as Xn, A as qn, B as Zn, C as Qn, D as Jn, E as ei, F as ti, G as ri, H as ni, I as ii, J as si, K as ai, L as oi, M as li, N as ci, O as di, P as ui, Q as fi, R as mi, S as hi, T as pi, U as xi, V as yi, W as gi, X as bi, Y as vi, Z as wi, _ as Ni, $ as Ai, a0 as Si, a1 as ki, a2 as Ti, a3 as Fi, a4 as Mi, a5 as _i, a6 as $i, a7 as Di, a8 as Ci, a9 as zi, aa as Li, ab as Ei, ac as Ri, ad as at } from "./icons-DI4Xack3.js";
5
5
  class Ii {
6
6
  apiUrl;
7
7
  headers;
@@ -137,10 +137,10 @@ class kt {
137
137
  return this.loadResponse.results && this.loadResponse.results[0] ? this.loadResponse.results[0].annotation || {} : this.loadResponse.annotation || {};
138
138
  }
139
139
  }
140
- function Ei(e, t = {}) {
140
+ function Vi(e, t = {}) {
141
141
  return new Ii(e, t);
142
142
  }
143
- class Vi {
143
+ class Oi {
144
144
  queue = [];
145
145
  flushScheduled = !1;
146
146
  batchExecutor;
@@ -200,7 +200,7 @@ class Vi {
200
200
  }
201
201
  }
202
202
  const Lr = Ot(null);
203
- function Oi({
203
+ function Pi({
204
204
  apiOptions: e,
205
205
  token: t,
206
206
  options: r = {},
@@ -209,9 +209,9 @@ function Oi({
209
209
  children: s
210
210
  }) {
211
211
  const [a, l] = Z({ apiOptions: e, token: t }), d = J(
212
- () => Ei(a.token, a.apiOptions),
212
+ () => Vi(a.token, a.apiOptions),
213
213
  [a.apiOptions, a.token]
214
- ), c = J(() => n ? new Vi((h) => d.batchLoad(h), i) : null, [n, d, i]), u = Le((h, f) => {
214
+ ), c = J(() => n ? new Oi((h) => d.batchLoad(h), i) : null, [n, d, i]), u = Le((h, f) => {
215
215
  l({ apiOptions: h, token: f });
216
216
  }, []), m = J(() => ({
217
217
  cubeApi: d,
@@ -222,15 +222,15 @@ function Oi({
222
222
  }), [d, r, u, c, n]);
223
223
  return /* @__PURE__ */ o(Lr.Provider, { value: m, children: s });
224
224
  }
225
- function Rr() {
225
+ function Er() {
226
226
  const e = xt(Lr);
227
227
  if (!e)
228
228
  throw new Error("useCubeApi must be used within CubeApiProvider");
229
229
  return e;
230
230
  }
231
- const Pi = 900 * 1e3;
231
+ const Hi = 900 * 1e3;
232
232
  let _e = null;
233
- function Hi(e) {
233
+ function Yi(e) {
234
234
  const t = {};
235
235
  return e.cubes.forEach((r) => {
236
236
  r.measures.forEach((n) => {
@@ -242,18 +242,18 @@ function Hi(e) {
242
242
  });
243
243
  }), t;
244
244
  }
245
- function Yi() {
246
- return _e ? Date.now() - _e.timestamp < Pi : !1;
245
+ function ji() {
246
+ return _e ? Date.now() - _e.timestamp < Hi : !1;
247
247
  }
248
- function ji(e) {
248
+ function Ui(e) {
249
249
  const [t, r] = Z(null), [n, i] = Z(!0), [s, a] = Z(null), l = ye({}), [d] = Z(() => ({})), c = Le(async () => {
250
- if (Yi() && _e) {
250
+ if (ji() && _e) {
251
251
  r(_e.data), l.current = _e.labelMap, Object.keys(d).forEach((h) => delete d[h]), Object.assign(d, _e.labelMap), i(!1), a(null);
252
252
  return;
253
253
  }
254
254
  try {
255
255
  i(!0), a(null);
256
- const h = await e.meta(), f = Hi(h);
256
+ const h = await e.meta(), f = Yi(h);
257
257
  _e = {
258
258
  data: h,
259
259
  labelMap: f,
@@ -266,7 +266,7 @@ function ji(e) {
266
266
  i(!1);
267
267
  }
268
268
  }, [e, d]);
269
- Me(() => {
269
+ Te(() => {
270
270
  c();
271
271
  }, [c]);
272
272
  const u = Le((h) => l.current[h] || h, []), m = Le(() => {
@@ -283,15 +283,15 @@ function ji(e) {
283
283
  };
284
284
  }
285
285
  const jt = Ot(null);
286
- function Ui({ children: e }) {
287
- const { cubeApi: t } = Rr(), {
286
+ function Bi({ children: e }) {
287
+ const { cubeApi: t } = Er(), {
288
288
  meta: r,
289
289
  labelMap: n,
290
290
  loading: i,
291
291
  error: s,
292
292
  getFieldLabel: a,
293
293
  refetch: l
294
- } = ji(t), d = J(() => ({
294
+ } = Ui(t), d = J(() => ({
295
295
  meta: r,
296
296
  labelMap: n,
297
297
  metaLoading: i,
@@ -301,39 +301,44 @@ function Ui({ children: e }) {
301
301
  }), [r, n, i, s, a, l]);
302
302
  return /* @__PURE__ */ o(jt.Provider, { value: d, children: e });
303
303
  }
304
- function Bi() {
304
+ function Wi() {
305
305
  const e = xt(jt);
306
306
  if (!e)
307
307
  throw new Error("useCubeMeta must be used within CubeMetaProvider");
308
308
  return e;
309
309
  }
310
- const Ir = Ot(null);
311
- function Wi({
312
- features: e = {
313
- enableAI: !0,
314
- aiEndpoint: "/api/ai/generate",
315
- showSchemaDiagram: !1,
316
- useAnalysisBuilder: !1
317
- },
310
+ const Rr = Ot(null), Gi = {
311
+ enableAI: !0,
312
+ aiEndpoint: "/api/ai/generate",
313
+ showSchemaDiagram: !1,
314
+ useAnalysisBuilder: !1,
315
+ editToolbar: "both",
316
+ floatingToolbarPosition: "right"
317
+ };
318
+ function Ki({
319
+ features: e,
318
320
  dashboardModes: t = ["rows", "grid"],
319
321
  children: r
320
322
  }) {
321
- const [n, i] = Z(e), s = Le((l) => {
323
+ const [n, i] = Z(() => ({
324
+ ...Gi,
325
+ ...e
326
+ })), s = Le((l) => {
322
327
  i((d) => ({ ...d, ...l }));
323
328
  }, []), a = J(() => ({
324
329
  features: n,
325
330
  dashboardModes: t,
326
331
  updateFeatures: s
327
332
  }), [n, t, s]);
328
- return /* @__PURE__ */ o(Ir.Provider, { value: a, children: r });
333
+ return /* @__PURE__ */ o(Rr.Provider, { value: a, children: r });
329
334
  }
330
- function Gi() {
331
- const e = xt(Ir);
335
+ function Xi() {
336
+ const e = xt(Rr);
332
337
  if (!e)
333
338
  throw new Error("useCubeFeatures must be used within CubeFeaturesProvider");
334
339
  return e;
335
340
  }
336
- function ac({
341
+ function lc({
337
342
  cubeApi: e,
338
343
  // Intentionally unused - for backward compatibility
339
344
  apiOptions: t,
@@ -346,19 +351,19 @@ function ac({
346
351
  children: d
347
352
  }) {
348
353
  return /* @__PURE__ */ o(
349
- Oi,
354
+ Pi,
350
355
  {
351
356
  apiOptions: t || { apiUrl: "/cubejs-api/v1" },
352
357
  token: r,
353
358
  options: n,
354
359
  enableBatching: a,
355
360
  batchDelayMs: l,
356
- children: /* @__PURE__ */ o(Ui, { children: /* @__PURE__ */ o(Wi, { features: i, dashboardModes: s, children: d }) })
361
+ children: /* @__PURE__ */ o(Bi, { children: /* @__PURE__ */ o(Ki, { features: i, dashboardModes: s, children: d }) })
357
362
  }
358
363
  );
359
364
  }
360
- function Ki() {
361
- const e = Rr(), t = Bi(), r = Gi();
365
+ function qi() {
366
+ const e = Er(), t = Wi(), r = Xi();
362
367
  return J(() => ({
363
368
  ...e,
364
369
  ...t,
@@ -366,36 +371,37 @@ function Ki() {
366
371
  dashboardModes: r.dashboardModes
367
372
  }), [e, t, r]);
368
373
  }
369
- const Er = {
374
+ const Ir = {
370
375
  // Action icons
371
376
  close: { icon: Ri, category: "action" },
372
- add: { icon: Li, category: "action" },
373
- edit: { icon: zi, category: "action" },
374
- delete: { icon: Ci, category: "action" },
377
+ add: { icon: Ei, category: "action" },
378
+ edit: { icon: Li, category: "action" },
379
+ delete: { icon: zi, category: "action" },
375
380
  refresh: { icon: St, category: "action" },
376
- copy: { icon: Di, category: "action" },
377
- duplicate: { icon: $i, category: "action" },
378
- settings: { icon: _i, category: "action" },
379
- filter: { icon: Ti, category: "action" },
380
- share: { icon: Fi, category: "action" },
381
+ copy: { icon: Ci, category: "action" },
382
+ duplicate: { icon: Di, category: "action" },
383
+ settings: { icon: $i, category: "action" },
384
+ filter: { icon: _i, category: "action" },
385
+ share: { icon: Mi, category: "action" },
381
386
  expand: { icon: rr, category: "action" },
382
387
  collapse: { icon: nr, category: "action" },
383
- search: { icon: Mi, category: "action" },
384
- menu: { icon: ki, category: "action" },
385
- run: { icon: Si, category: "action" },
386
- check: { icon: Ai, category: "action" },
387
- link: { icon: Ni, category: "action" },
388
- eye: { icon: wi, category: "action" },
389
- eyeOff: { icon: vi, category: "action" },
390
- adjustments: { icon: bi, category: "action" },
391
- desktop: { icon: gi, category: "action" },
392
- table: { icon: yi, category: "action" },
393
- sun: { icon: xi, category: "action" },
394
- moon: { icon: pi, category: "action" },
395
- ellipsisHorizontal: { icon: hi, category: "action" },
396
- documentText: { icon: mi, category: "action" },
397
- bookOpen: { icon: fi, category: "action" },
398
- codeBracket: { icon: ui, category: "action" },
388
+ search: { icon: Fi, category: "action" },
389
+ menu: { icon: Ti, category: "action" },
390
+ run: { icon: ki, category: "action" },
391
+ check: { icon: Si, category: "action" },
392
+ link: { icon: Ai, category: "action" },
393
+ eye: { icon: Ni, category: "action" },
394
+ eyeOff: { icon: wi, category: "action" },
395
+ adjustments: { icon: vi, category: "action" },
396
+ desktop: { icon: bi, category: "action" },
397
+ table: { icon: gi, category: "action" },
398
+ sun: { icon: yi, category: "action" },
399
+ moon: { icon: xi, category: "action" },
400
+ ellipsisHorizontal: { icon: pi, category: "action" },
401
+ documentText: { icon: hi, category: "action" },
402
+ bookOpen: { icon: mi, category: "action" },
403
+ codeBracket: { icon: fi, category: "action" },
404
+ swatch: { icon: ui, category: "action" },
399
405
  // Field type icons (solid for visual distinction)
400
406
  measure: { icon: di, category: "field" },
401
407
  dimension: { icon: ci, category: "field" },
@@ -429,9 +435,9 @@ const Er = {
429
435
  measureCalculated: { icon: On, category: "measure" },
430
436
  measureNumber: { icon: Vn, category: "measure" },
431
437
  // State icons
432
- success: { icon: En, category: "state" },
433
- warning: { icon: In, category: "state" },
434
- error: { icon: Rn, category: "state" },
438
+ success: { icon: In, category: "state" },
439
+ warning: { icon: Rn, category: "state" },
440
+ error: { icon: En, category: "state" },
435
441
  info: { icon: Yt, category: "state" },
436
442
  loading: { icon: St, category: "state" },
437
443
  sparkles: { icon: Ln, category: "state" },
@@ -446,9 +452,9 @@ const Er = {
446
452
  arrowRight: { icon: $n, category: "navigation" },
447
453
  arrowPath: { icon: St, category: "navigation" }
448
454
  };
449
- let le = { ...Er };
455
+ let le = { ...Ir };
450
456
  const Ge = /* @__PURE__ */ new Map();
451
- function oc() {
457
+ function cc() {
452
458
  return le;
453
459
  }
454
460
  function bt(e) {
@@ -461,16 +467,16 @@ function bt(e) {
461
467
  const n = ({ className: i, ...s }) => /* @__PURE__ */ o(at, { icon: r.icon, className: i, ...s });
462
468
  return Ge.set(e, n), n;
463
469
  }
464
- function lc(e) {
470
+ function dc(e) {
465
471
  return le[e]?.icon ?? le.info.icon;
466
472
  }
467
- function cc(e, t) {
473
+ function uc(e, t) {
468
474
  le[e] && (le[e] = {
469
475
  ...le[e],
470
476
  icon: t
471
477
  }, Ge.delete(e));
472
478
  }
473
- function dc(e) {
479
+ function fc(e) {
474
480
  for (const [t, r] of Object.entries(e))
475
481
  if (r && t in le) {
476
482
  const n = t;
@@ -490,16 +496,16 @@ function dc(e) {
490
496
  Ge.delete(n);
491
497
  }
492
498
  }
493
- function uc() {
494
- le = { ...Er }, Ge.clear();
499
+ function mc() {
500
+ le = { ...Ir }, Ge.clear();
495
501
  }
496
- function fc(e) {
502
+ function hc(e) {
497
503
  const t = {};
498
504
  for (const [r, n] of Object.entries(le))
499
505
  n.category === e && (t[r] = bt(r));
500
506
  return t;
501
507
  }
502
- function Xi(e) {
508
+ function Zi(e) {
503
509
  const r = {
504
510
  count: "measureCount",
505
511
  countDistinct: "measureCountDistinct",
@@ -534,7 +540,7 @@ function ue(e) {
534
540
  }[e] || "chartBar";
535
541
  return bt(r);
536
542
  }
537
- function mc(e) {
543
+ function pc(e) {
538
544
  const r = {
539
545
  measure: "measure",
540
546
  dimension: "dimension",
@@ -544,7 +550,7 @@ function mc(e) {
544
550
  }[e] || "dimension";
545
551
  return bt(r);
546
552
  }
547
- const qi = {
553
+ const Qi = {
548
554
  sm: "h-6 w-6",
549
555
  md: "h-8 w-8",
550
556
  lg: "h-12 w-12"
@@ -556,17 +562,17 @@ function ir({
556
562
  return /* @__PURE__ */ o(
557
563
  "div",
558
564
  {
559
- className: `animate-spin rounded-full border-b-2 ${qi[e]} ${t}`,
565
+ className: `animate-spin rounded-full border-b-2 ${Qi[e]} ${t}`,
560
566
  style: { borderBottomColor: "var(--dc-primary)" },
561
567
  role: "status",
562
568
  "aria-label": "Loading"
563
569
  }
564
570
  );
565
571
  }
566
- function Zi({ children: e, className: t = "" }) {
572
+ function Ji({ children: e, className: t = "" }) {
567
573
  return /* @__PURE__ */ o("h3", { className: `text-sm font-semibold text-dc-primary uppercase tracking-wide ${t}`, children: e });
568
574
  }
569
- const Qi = {
575
+ const es = {
570
576
  icon: ue("bar"),
571
577
  description: "Compare values across categories",
572
578
  useCase: "Best for comparing discrete categories, showing rankings, or displaying changes over time",
@@ -631,10 +637,10 @@ const Qi = {
631
637
  description: "Number formatting for right Y-axis"
632
638
  }
633
639
  ]
634
- }, hc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
640
+ }, xc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
635
641
  __proto__: null,
636
- barChartConfig: Qi
637
- }, Symbol.toStringTag, { value: "Module" })), Ji = {
642
+ barChartConfig: es
643
+ }, Symbol.toStringTag, { value: "Module" })), ts = {
638
644
  icon: ue("line"),
639
645
  description: "Show trends and changes over time",
640
646
  useCase: "Best for continuous data, trends, time series, and showing relationships between multiple series",
@@ -716,10 +722,10 @@ const Qi = {
716
722
  description: "Number formatting for right Y-axis"
717
723
  }
718
724
  ]
719
- }, pc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
725
+ }, yc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
720
726
  __proto__: null,
721
- lineChartConfig: Ji
722
- }, Symbol.toStringTag, { value: "Module" })), es = {
727
+ lineChartConfig: ts
728
+ }, Symbol.toStringTag, { value: "Module" })), rs = {
723
729
  icon: ue("area"),
724
730
  description: "Emphasize magnitude of change over time",
725
731
  useCase: "Best for showing cumulative totals, volume changes, or stacked comparisons over time",
@@ -791,10 +797,10 @@ const Qi = {
791
797
  description: "Number formatting for right Y-axis"
792
798
  }
793
799
  ]
794
- }, xc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
800
+ }, gc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
795
801
  __proto__: null,
796
- areaChartConfig: es
797
- }, Symbol.toStringTag, { value: "Module" })), ts = {
802
+ areaChartConfig: rs
803
+ }, Symbol.toStringTag, { value: "Module" })), ns = {
798
804
  icon: ue("pie"),
799
805
  description: "Show proportions of a whole",
800
806
  useCase: "Best for showing percentage distribution or composition of a total (limit to 5-7 slices)",
@@ -827,10 +833,10 @@ const Qi = {
827
833
  description: "Number formatting for values"
828
834
  }
829
835
  ]
830
- }, yc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
836
+ }, bc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
831
837
  __proto__: null,
832
- pieChartConfig: ts
833
- }, Symbol.toStringTag, { value: "Module" })), rs = {
838
+ pieChartConfig: ns
839
+ }, Symbol.toStringTag, { value: "Module" })), is = {
834
840
  icon: ue("scatter"),
835
841
  description: "Reveal correlations between variables",
836
842
  useCase: "Best for identifying patterns, correlations, outliers, and relationships between two measures",
@@ -878,10 +884,10 @@ const Qi = {
878
884
  description: "Number formatting for Y-axis"
879
885
  }
880
886
  ]
881
- }, gc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
887
+ }, vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
882
888
  __proto__: null,
883
- scatterChartConfig: rs
884
- }, Symbol.toStringTag, { value: "Module" })), ns = {
889
+ scatterChartConfig: is
890
+ }, Symbol.toStringTag, { value: "Module" })), ss = {
885
891
  icon: ue("bubble"),
886
892
  description: "Compare three dimensions of data",
887
893
  useCase: "Best for showing relationships between three variables (X, Y, and size), market analysis",
@@ -947,10 +953,10 @@ const Qi = {
947
953
  description: "Number formatting for Y-axis and values"
948
954
  }
949
955
  ]
950
- }, bc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
956
+ }, wc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
951
957
  __proto__: null,
952
- bubbleChartConfig: ns
953
- }, Symbol.toStringTag, { value: "Module" })), is = {
958
+ bubbleChartConfig: ss
959
+ }, Symbol.toStringTag, { value: "Module" })), as = {
954
960
  icon: ue("radar"),
955
961
  description: "Compare multiple metrics across categories",
956
962
  useCase: "Best for multivariate comparisons, performance metrics, strengths/weaknesses analysis",
@@ -989,10 +995,10 @@ const Qi = {
989
995
  description: "Number formatting for values"
990
996
  }
991
997
  ]
992
- }, vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
998
+ }, Nc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
993
999
  __proto__: null,
994
- radarChartConfig: is
995
- }, Symbol.toStringTag, { value: "Module" })), ss = {
1000
+ radarChartConfig: as
1001
+ }, Symbol.toStringTag, { value: "Module" })), os = {
996
1002
  icon: ue("radialBar"),
997
1003
  description: "Circular progress and KPI visualization",
998
1004
  useCase: "Best for showing progress toward goals, KPIs, or comparing percentages in a compact form",
@@ -1024,10 +1030,10 @@ const Qi = {
1024
1030
  description: "Number formatting for values"
1025
1031
  }
1026
1032
  ]
1027
- }, wc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1033
+ }, Ac = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1028
1034
  __proto__: null,
1029
- radialBarChartConfig: ss
1030
- }, Symbol.toStringTag, { value: "Module" })), as = {
1035
+ radialBarChartConfig: os
1036
+ }, Symbol.toStringTag, { value: "Module" })), ls = {
1031
1037
  icon: ue("treemap"),
1032
1038
  description: "Visualize hierarchical data with nested rectangles",
1033
1039
  useCase: "Best for showing part-to-whole relationships in hierarchical data, disk usage, budget allocation",
@@ -1068,10 +1074,10 @@ const Qi = {
1068
1074
  description: "Number formatting for size values"
1069
1075
  }
1070
1076
  ]
1071
- }, Nc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1077
+ }, Sc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1072
1078
  __proto__: null,
1073
- treemapChartConfig: as
1074
- }, Symbol.toStringTag, { value: "Module" })), os = {
1079
+ treemapChartConfig: ls
1080
+ }, Symbol.toStringTag, { value: "Module" })), cs = {
1075
1081
  icon: ue("table"),
1076
1082
  description: "Display detailed tabular data",
1077
1083
  useCase: "Best for precise values, detailed analysis, sortable/filterable data exploration",
@@ -1094,10 +1100,10 @@ const Qi = {
1094
1100
  description: "Number formatting for numeric values"
1095
1101
  }
1096
1102
  ]
1097
- }, Ac = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1103
+ }, kc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1098
1104
  __proto__: null,
1099
- dataTableConfig: os
1100
- }, Symbol.toStringTag, { value: "Module" })), ls = {
1105
+ dataTableConfig: cs
1106
+ }, Symbol.toStringTag, { value: "Module" })), ds = {
1101
1107
  icon: ue("activityGrid"),
1102
1108
  description: "GitHub-style activity grid showing temporal patterns across different time scales",
1103
1109
  useCase: "Best for visualizing activity patterns over time. Supports hour (3hr blocks × days), day (days × weeks), week (weeks × months), month (months × quarters), and quarter (quarters × years) granularities",
@@ -1141,10 +1147,10 @@ const Qi = {
1141
1147
  message: "Activity measure is required for intensity mapping"
1142
1148
  } : { isValid: !0 };
1143
1149
  }
1144
- }, Sc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1150
+ }, Tc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1145
1151
  __proto__: null,
1146
- activityGridChartConfig: ls
1147
- }, Symbol.toStringTag, { value: "Module" })), cs = {
1152
+ activityGridChartConfig: ds
1153
+ }, Symbol.toStringTag, { value: "Module" })), us = {
1148
1154
  icon: ue("kpiNumber"),
1149
1155
  description: "Display key performance indicators as large numbers",
1150
1156
  useCase: "Perfect for showing important metrics like revenue, user count, or other key business metrics in a prominent, easy-to-read format",
@@ -1214,10 +1220,10 @@ const Qi = {
1214
1220
  }
1215
1221
  ],
1216
1222
  displayOptions: ["hideHeader"]
1217
- }, kc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1223
+ }, Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1218
1224
  __proto__: null,
1219
- kpiNumberConfig: cs
1220
- }, Symbol.toStringTag, { value: "Module" })), ds = {
1225
+ kpiNumberConfig: us
1226
+ }, Symbol.toStringTag, { value: "Module" })), fs = {
1221
1227
  icon: ue("kpiDelta"),
1222
1228
  description: "Display change between latest and previous values with trend indicators",
1223
1229
  useCase: "Perfect for showing performance changes over time, such as revenue growth, user acquisition changes, or other metrics where the trend and delta are more important than the absolute value",
@@ -1311,8 +1317,8 @@ const Qi = {
1311
1317
  } : { isValid: !0 }
1312
1318
  }, Mc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1313
1319
  __proto__: null,
1314
- kpiDeltaConfig: ds
1315
- }, Symbol.toStringTag, { value: "Module" })), us = {
1320
+ kpiDeltaConfig: fs
1321
+ }, Symbol.toStringTag, { value: "Module" })), ms = {
1316
1322
  icon: ue("kpiText"),
1317
1323
  description: "Display key performance indicators as customizable text",
1318
1324
  useCase: "Perfect for showing metrics with custom formatting, combining multiple values, or displaying contextual KPI information using templates",
@@ -1354,10 +1360,10 @@ const Qi = {
1354
1360
  }
1355
1361
  ],
1356
1362
  displayOptions: ["hideHeader"]
1357
- }, Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1363
+ }, _c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1358
1364
  __proto__: null,
1359
- kpiTextConfig: us
1360
- }, Symbol.toStringTag, { value: "Module" })), fs = {
1365
+ kpiTextConfig: ms
1366
+ }, Symbol.toStringTag, { value: "Module" })), hs = {
1361
1367
  icon: ue("markdown"),
1362
1368
  description: "Display custom markdown content with formatting",
1363
1369
  useCase: "Perfect for adding documentation, notes, instructions, or formatted text to dashboards",
@@ -1412,9 +1418,9 @@ Add your **markdown** content here:
1412
1418
  }
1413
1419
  ],
1414
1420
  displayOptions: ["hideHeader"]
1415
- }, Tc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1421
+ }, $c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1416
1422
  __proto__: null,
1417
- markdownConfig: fs
1423
+ markdownConfig: hs
1418
1424
  }, Symbol.toStringTag, { value: "Module" }));
1419
1425
  function ot(e) {
1420
1426
  return e != null && !isNaN(Number(e));
@@ -1449,7 +1455,7 @@ function W(e, t, r) {
1449
1455
  const h = l !== void 0 ? l : Number.isInteger(u) ? 0 : 2;
1450
1456
  switch (s) {
1451
1457
  case "currency": {
1452
- const f = ms(i);
1458
+ const f = ps(i);
1453
1459
  if (a && m) {
1454
1460
  const w = new Intl.NumberFormat(i, {
1455
1461
  style: "currency",
@@ -1490,7 +1496,7 @@ function W(e, t, r) {
1490
1496
  }).format(u) + m;
1491
1497
  }
1492
1498
  }
1493
- function ms(e) {
1499
+ function ps(e) {
1494
1500
  const r = e.split("-")[1]?.toUpperCase();
1495
1501
  return {
1496
1502
  US: "USD",
@@ -1596,7 +1602,7 @@ function pe(e, t) {
1596
1602
  return;
1597
1603
  }
1598
1604
  }
1599
- function hs(e, t, r, n, i = (s) => s) {
1605
+ function xs(e, t, r, n, i = (s) => s) {
1600
1606
  if (!e || e.length === 0) return [];
1601
1607
  const s = pe(n, t);
1602
1608
  return e.map((a) => {
@@ -1656,22 +1662,22 @@ function Ze(e, t, r, n, i, s = (a) => a) {
1656
1662
  hasDimensions: !0
1657
1663
  };
1658
1664
  }
1659
- const m = hs(e, t, r, n, s), h = r.map((f) => s(f));
1665
+ const m = xs(e, t, r, n, s), h = r.map((f) => s(f));
1660
1666
  return {
1661
1667
  data: m,
1662
1668
  seriesKeys: h,
1663
1669
  hasDimensions: !1
1664
1670
  };
1665
1671
  }
1666
- function ps() {
1672
+ function ys() {
1667
1673
  const e = typeof navigator < "u" ? navigator.language : "en-US";
1668
1674
  return new Intl.NumberFormat(e, {
1669
1675
  style: "currency",
1670
- currency: xs(e),
1676
+ currency: gs(e),
1671
1677
  currencyDisplay: "narrowSymbol"
1672
1678
  }).format(0).replace(/[\d.,\s]/g, "").trim() || "$";
1673
1679
  }
1674
- function xs(e) {
1680
+ function gs(e) {
1675
1681
  const r = e.split("-")[1]?.toUpperCase();
1676
1682
  return {
1677
1683
  US: "USD",
@@ -1718,13 +1724,13 @@ function xs(e) {
1718
1724
  TR: "TRY"
1719
1725
  }[r] || "USD";
1720
1726
  }
1721
- function _c({
1727
+ function Dc({
1722
1728
  value: e,
1723
1729
  onChange: t,
1724
1730
  axisLabel: r,
1725
1731
  previewValue: n = 125e4
1726
1732
  }) {
1727
- const i = e || {}, s = J(() => ps(), []), a = J(() => W(n, i), [n, i]), l = (c) => {
1733
+ const i = e || {}, s = J(() => ys(), []), a = J(() => W(n, i), [n, i]), l = (c) => {
1728
1734
  t({ ...i, ...c });
1729
1735
  }, d = [
1730
1736
  { value: "currency", label: s },
@@ -1733,7 +1739,7 @@ function _c({
1733
1739
  { value: "custom", label: "Custom" }
1734
1740
  ];
1735
1741
  return /* @__PURE__ */ k("div", { className: "space-y-3 pb-4", children: [
1736
- /* @__PURE__ */ o(Zi, { children: r }),
1742
+ /* @__PURE__ */ o(Ji, { children: r }),
1737
1743
  /* @__PURE__ */ k("div", { className: "space-y-1", children: [
1738
1744
  /* @__PURE__ */ o("label", { className: "text-xs text-dc-text-secondary", children: "Label" }),
1739
1745
  /* @__PURE__ */ o(
@@ -1854,21 +1860,21 @@ function ve() {
1854
1860
  throw new Error("useCubeFieldLabel must be used within CubeProvider");
1855
1861
  return J(() => e.getFieldLabel, [e.getFieldLabel]);
1856
1862
  }
1857
- function $c(e) {
1863
+ function Cc(e) {
1858
1864
  return typeof window > "u" ? "" : getComputedStyle(document.documentElement).getPropertyValue(`--dc-${e}`).trim();
1859
1865
  }
1860
- function ys(e, t) {
1866
+ function bs(e, t) {
1861
1867
  typeof window > "u" || document.documentElement.style.setProperty(`--dc-${e}`, t);
1862
1868
  }
1863
- function Dc(e) {
1869
+ function zc(e) {
1864
1870
  typeof window > "u" || Object.entries(e.colors).forEach(([t, r]) => {
1865
1871
  if (r) {
1866
1872
  const n = t.replace(/[A-Z]/g, (i) => `-${i.toLowerCase()}`);
1867
- ys(n, r);
1873
+ bs(n, r);
1868
1874
  }
1869
1875
  });
1870
1876
  }
1871
- function Cc() {
1877
+ function Lc() {
1872
1878
  if (typeof window > "u") return;
1873
1879
  const e = document.documentElement.style;
1874
1880
  Array.from(e).forEach((r) => {
@@ -1883,10 +1889,10 @@ function Ye() {
1883
1889
  const t = document.documentElement.getAttribute("data-theme");
1884
1890
  return t === "dark" || t === "neon" ? t : document.documentElement.classList.contains("dark") || document.body.classList.contains("dark") ? "dark" : document.documentElement.classList.contains("neon") || document.body.classList.contains("neon") ? "neon" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
1885
1891
  }
1886
- function gs(e) {
1892
+ function vs(e) {
1887
1893
  typeof window > "u" || (document.documentElement.classList.remove("dark", "neon"), document.documentElement.setAttribute("data-theme", e), (e === "dark" || e === "neon") && document.documentElement.classList.add(e), localStorage.setItem("theme", e));
1888
1894
  }
1889
- function zc() {
1895
+ function Ec() {
1890
1896
  const e = Ye();
1891
1897
  return e === "dark" || e === "neon";
1892
1898
  }
@@ -1905,7 +1911,7 @@ function Or(e) {
1905
1911
  t.disconnect(), r.removeEventListener("change", n);
1906
1912
  };
1907
1913
  }
1908
- const Lc = {
1914
+ const Rc = {
1909
1915
  light: {
1910
1916
  name: "light",
1911
1917
  colors: {
@@ -1965,7 +1971,7 @@ const Lc = {
1965
1971
  Or(() => {
1966
1972
  nt.notify();
1967
1973
  });
1968
- function bs() {
1974
+ function ws() {
1969
1975
  const e = pn(
1970
1976
  nt.subscribe.bind(nt),
1971
1977
  Ye,
@@ -1973,7 +1979,7 @@ function bs() {
1973
1979
  Ye
1974
1980
  // Server-side snapshot (SSR)
1975
1981
  ), t = Le((r) => {
1976
- gs(r), nt.notify();
1982
+ vs(r), nt.notify();
1977
1983
  }, []);
1978
1984
  return { theme: e, setTheme: t };
1979
1985
  }
@@ -2007,13 +2013,13 @@ const G = [
2007
2013
  // green
2008
2014
  "#fde725"
2009
2015
  // yellow
2010
- ], sr = "#10b981", vs = "#ef4444", je = {
2016
+ ], sr = "#10b981", Ns = "#ef4444", je = {
2011
2017
  top: 5,
2012
2018
  right: 30,
2013
2019
  left: 20,
2014
2020
  bottom: 5
2015
2021
  };
2016
- function ws(e, t) {
2022
+ function As(e, t) {
2017
2023
  const r = new Date(e);
2018
2024
  switch (t.toLowerCase()) {
2019
2025
  case "day":
@@ -2040,16 +2046,16 @@ function ws(e, t) {
2040
2046
  }
2041
2047
  return r;
2042
2048
  }
2043
- function Ns(e, t, r) {
2049
+ function Ss(e, t, r) {
2044
2050
  if (!e || !t || !r)
2045
2051
  return !0;
2046
2052
  const n = e[t];
2047
2053
  if (!n)
2048
2054
  return !0;
2049
2055
  const i = new Date(n);
2050
- return isNaN(i.getTime()) ? !0 : ws(i, r) <= /* @__PURE__ */ new Date();
2056
+ return isNaN(i.getTime()) ? !0 : As(i, r) <= /* @__PURE__ */ new Date();
2051
2057
  }
2052
- function As(e, t) {
2058
+ function ks(e, t) {
2053
2059
  if (!e?.timeDimensions || e.timeDimensions.length === 0)
2054
2060
  return null;
2055
2061
  if (t) {
@@ -2070,7 +2076,7 @@ function Pr(e, t, r, n, i = !1) {
2070
2076
  };
2071
2077
  if (e.length < 2)
2072
2078
  return s;
2073
- const a = As(r, t);
2079
+ const a = ks(r, t);
2074
2080
  if (i)
2075
2081
  return {
2076
2082
  filteredData: e.slice(0, -1),
@@ -2087,21 +2093,21 @@ function Pr(e, t, r, n, i = !1) {
2087
2093
  if (!a)
2088
2094
  return s;
2089
2095
  const l = e[e.length - 1];
2090
- return Ns(l, t, a) ? { ...s, granularity: a } : {
2096
+ return Ss(l, t, a) ? { ...s, granularity: a } : {
2091
2097
  filteredData: e.slice(0, -1),
2092
2098
  excludedIncompletePeriod: !0,
2093
2099
  skippedLastPeriod: !1,
2094
2100
  granularity: a
2095
2101
  };
2096
2102
  }
2097
- function Ss(e) {
2103
+ function Ts(e) {
2098
2104
  if (!e) return [];
2099
2105
  const t = [];
2100
2106
  return e.dimensions && t.push(...e.dimensions), e.timeDimensions && e.timeDimensions.forEach((r) => {
2101
2107
  t.includes(r.dimension) || t.push(r.dimension);
2102
2108
  }), e.measures && t.push(...e.measures), t;
2103
2109
  }
2104
- function ks(e, t) {
2110
+ function Fs(e, t) {
2105
2111
  if (!e?.timeDimensions?.length) return null;
2106
2112
  const r = e.timeDimensions.find((s) => s.granularity);
2107
2113
  if (!r?.granularity || !e.measures?.length) return null;
@@ -2131,7 +2137,7 @@ function Ms(e, t, r) {
2131
2137
  }
2132
2138
  }), Array.from(n).sort();
2133
2139
  }
2134
- function Fs(e, t, r) {
2140
+ function _s(e, t, r) {
2135
2141
  const n = [];
2136
2142
  return e.measures.length > 1 && n.push({
2137
2143
  key: "__measure__",
@@ -2152,7 +2158,7 @@ function Fs(e, t, r) {
2152
2158
  });
2153
2159
  }), n;
2154
2160
  }
2155
- function Ts(e, t) {
2161
+ function $s(e, t) {
2156
2162
  const r = /* @__PURE__ */ new Map();
2157
2163
  return e.forEach((n) => {
2158
2164
  const i = t.dimensions.length > 0 ? t.dimensions.map((a) => String(n[a] ?? "")).join("|") : "__all__";
@@ -2164,8 +2170,8 @@ function Ts(e, t) {
2164
2170
  }
2165
2171
  }), r;
2166
2172
  }
2167
- function _s(e, t, r, n) {
2168
- const i = Ts(e, t), s = Array.from(i.keys()), a = [], l = t.measures.length, d = s.length;
2173
+ function Ds(e, t, r, n) {
2174
+ const i = $s(e, t), s = Array.from(i.keys()), a = [], l = t.measures.length, d = s.length;
2169
2175
  return t.measures.forEach((c) => {
2170
2176
  s.forEach((u, m) => {
2171
2177
  const h = i.get(u), f = l > 1 ? `${c}|${u}` : u, w = {}, N = u === "__all__" ? [] : u.split("|");
@@ -2186,13 +2192,13 @@ function _s(e, t, r, n) {
2186
2192
  });
2187
2193
  }), a;
2188
2194
  }
2189
- function $s(e, t, r, n) {
2195
+ function Cs(e, t, r, n) {
2190
2196
  if (!e || e.length === 0)
2191
2197
  return { isPivoted: !0, columns: [], rows: [] };
2192
- const i = Ms(e, t.timeDimension, t.granularity), s = Fs(t, i, r), a = _s(e, t, i, r);
2198
+ const i = Ms(e, t.timeDimension, t.granularity), s = _s(t, i, r), a = Ds(e, t, i, r);
2193
2199
  return { isPivoted: !0, columns: s, rows: a };
2194
2200
  }
2195
- function Ds(e, t) {
2201
+ function zs(e, t) {
2196
2202
  if (t?.cubes)
2197
2203
  for (const r of t.cubes) {
2198
2204
  const n = r.measures.find((i) => i.name === e);
@@ -2210,7 +2216,7 @@ function Hr(e) {
2210
2216
  r.__period && t.add(r.__period);
2211
2217
  return Array.from(t);
2212
2218
  }
2213
- function Cs(e) {
2219
+ function Ls(e) {
2214
2220
  if (!vt(e)) return [];
2215
2221
  const t = /* @__PURE__ */ new Set();
2216
2222
  for (const r of e)
@@ -2220,14 +2226,14 @@ function Cs(e) {
2220
2226
  function it(e, t) {
2221
2227
  return t === 0 ? "Current" : "Prior";
2222
2228
  }
2223
- function zs(e, t, r) {
2229
+ function Es(e, t, r) {
2224
2230
  if (e.length === 0) return [];
2225
2231
  const n = ["__period", "__periodIndex", "__periodDayIndex"], i = e[0], s = [];
2226
2232
  for (const a of Object.keys(i))
2227
2233
  !t.includes(a) && a !== r && !n.includes(a) && s.push(a);
2228
2234
  return s;
2229
2235
  }
2230
- function Ls(e, t) {
2236
+ function Rs(e, t) {
2231
2237
  const r = /* @__PURE__ */ new Map();
2232
2238
  for (const n of t)
2233
2239
  r.set(n, /* @__PURE__ */ new Set());
@@ -2236,10 +2242,10 @@ function Ls(e, t) {
2236
2242
  n[i] !== void 0 && n[i] !== null && r.get(i).add(n[i]);
2237
2243
  return r;
2238
2244
  }
2239
- function Rs(e, t, r, n) {
2245
+ function Is(e, t, r, n) {
2240
2246
  if (!vt(e))
2241
2247
  return { data: e, seriesKeys: t, xAxisKey: r };
2242
- const i = Hr(e), s = Cs(e), a = zs(e, t, r), l = a.length > 0, d = l ? Ls(e, a) : null, c = /* @__PURE__ */ new Map();
2248
+ const i = Hr(e), s = Ls(e), a = Es(e, t, r), l = a.length > 0, d = l ? Rs(e, a) : null, c = /* @__PURE__ */ new Map();
2243
2249
  for (const h of e) {
2244
2250
  const f = h.__periodDayIndex, w = h.__periodIndex;
2245
2251
  c.has(f) || c.set(f, {
@@ -2262,7 +2268,7 @@ function Rs(e, t, r, n) {
2262
2268
  }
2263
2269
  const u = Array.from(c.values()).sort((h, f) => h.__periodDayIndex - f.__periodDayIndex), m = [];
2264
2270
  if (l && d) {
2265
- const h = Is(
2271
+ const h = Vs(
2266
2272
  a,
2267
2273
  d,
2268
2274
  n
@@ -2289,7 +2295,7 @@ function Rs(e, t, r, n) {
2289
2295
  xAxisKey: "__periodDayIndex"
2290
2296
  };
2291
2297
  }
2292
- function Is(e, t, r) {
2298
+ function Vs(e, t, r) {
2293
2299
  if (e.length === 0) return [];
2294
2300
  if (e.length === 1) {
2295
2301
  const a = e[0];
@@ -2311,7 +2317,7 @@ function Is(e, t, r) {
2311
2317
  }
2312
2318
  return s(0, []), n;
2313
2319
  }
2314
- function Es(e, t) {
2320
+ function Os(e, t) {
2315
2321
  if (t.length < 2) return !1;
2316
2322
  for (let r = 1; r < t.length; r++) {
2317
2323
  const n = it(t[r], r);
@@ -2320,7 +2326,7 @@ function Es(e, t) {
2320
2326
  }
2321
2327
  return e.includes("(Prior");
2322
2328
  }
2323
- function Vs(e = "dashed") {
2329
+ function Ps(e = "dashed") {
2324
2330
  switch (e) {
2325
2331
  case "solid":
2326
2332
  return;
@@ -2408,12 +2414,12 @@ function $e({ children: e, height: t = "100%" }) {
2408
2414
  );
2409
2415
  }
2410
2416
  }
2411
- const Os = (e, t) => e == null ? ["No data", t] : [Vr(e), t];
2417
+ const Hs = (e, t) => e == null ? ["No data", t] : [Vr(e), t];
2412
2418
  function Pe({ formatter: e, labelFormatter: t }) {
2413
2419
  return /* @__PURE__ */ o(
2414
2420
  Cr,
2415
2421
  {
2416
- formatter: e || Os,
2422
+ formatter: e || Hs,
2417
2423
  labelFormatter: t,
2418
2424
  contentStyle: {
2419
2425
  backgroundColor: "white",
@@ -2459,13 +2465,13 @@ function Ut(e, t) {
2459
2465
  }
2460
2466
  return r;
2461
2467
  }
2462
- function Ps(e, t) {
2468
+ function Ys(e, t) {
2463
2469
  return t === 0 ? e === 0 ? 0 : e > 0 ? 100 : -100 : (e - t) / t * 100;
2464
2470
  }
2465
- function Hs(e, t = 1) {
2471
+ function js(e, t = 1) {
2466
2472
  return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
2467
2473
  }
2468
- const Ys = de.memo(function({
2474
+ const Us = de.memo(function({
2469
2475
  data: t,
2470
2476
  chartConfig: r,
2471
2477
  displayConfig: n = {},
@@ -2496,7 +2502,7 @@ const Ys = de.memo(function({
2496
2502
  const P = c(V);
2497
2503
  D[P] = V;
2498
2504
  }), D;
2499
- }, [p, c]), $ = p.some((D) => C[D] === "right"), M = p.filter((D) => (C[D] || "left") === "left"), y = p.filter((D) => C[D] === "right"), { chartData: x, skippedCount: z } = J(() => {
2505
+ }, [p, c]), $ = p.some((D) => C[D] === "right"), T = p.filter((D) => (C[D] || "left") === "left"), y = p.filter((D) => C[D] === "right"), { chartData: x, skippedCount: z } = J(() => {
2500
2506
  if (g.length === 0 || b.length === 0)
2501
2507
  return { chartData: [], skippedCount: 0 };
2502
2508
  const D = g.filter((P) => b.some((Y) => ot(P[Y]))), V = g.length - D.length;
@@ -2513,8 +2519,8 @@ const Ys = de.memo(function({
2513
2519
  /* @__PURE__ */ o("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
2514
2520
  /* @__PURE__ */ o("div", { className: "text-xs", children: S })
2515
2521
  ] }) });
2516
- const D = m && !$, V = h && !$, P = V ? "expand" : void 0, Y = b.length === 1 && x.some((T) => {
2517
- const U = T[b[0]];
2522
+ const D = m && !$, V = h && !$, P = V ? "expand" : void 0, Y = b.length === 1 && x.some((M) => {
2523
+ const U = M[b[0]];
2518
2524
  return typeof U == "number" && U < 0;
2519
2525
  }), X = f.showLegend, F = {
2520
2526
  ...je,
@@ -2523,15 +2529,15 @@ const Ys = de.memo(function({
2523
2529
  right: $ ? 40 : 20
2524
2530
  // Extra space for right Y-axis label if needed
2525
2531
  }, L = wt(n?.target || ""), B = Ut(L, x.length);
2526
- let I = x;
2527
- return B.length > 0 && (I = x.map((T, U) => ({
2528
- ...T,
2532
+ let R = x;
2533
+ return B.length > 0 && (R = x.map((M, U) => ({
2534
+ ...M,
2529
2535
  __target: B[U] || null
2530
2536
  }))), !x || x.length === 0 ? /* @__PURE__ */ o("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: s }, children: /* @__PURE__ */ k("div", { className: "text-center", children: [
2531
2537
  /* @__PURE__ */ o("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
2532
2538
  /* @__PURE__ */ o("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for bar chart after transformation" })
2533
2539
  ] }) }) : /* @__PURE__ */ k("div", { className: "relative w-full", style: { height: s }, children: [
2534
- /* @__PURE__ */ o($e, { height: z > 0 ? "calc(100% - 20px)" : "100%", children: /* @__PURE__ */ k(zr, { data: I, margin: F, stackOffset: P, children: [
2540
+ /* @__PURE__ */ o($e, { height: z > 0 ? "calc(100% - 20px)" : "100%", children: /* @__PURE__ */ k(zr, { data: R, margin: F, stackOffset: P, children: [
2535
2541
  f.showGrid && /* @__PURE__ */ o(yt, { strokeDasharray: "3 3" }),
2536
2542
  /* @__PURE__ */ o(
2537
2543
  gt,
@@ -2544,15 +2550,15 @@ const Ys = de.memo(function({
2544
2550
  }
2545
2551
  ),
2546
2552
  /* @__PURE__ */ o(
2547
- Ee,
2553
+ Ie,
2548
2554
  {
2549
2555
  yAxisId: "left",
2550
2556
  orientation: "left",
2551
2557
  tick: { fontSize: 12 },
2552
- tickFormatter: V ? (T) => `${(T * 100).toFixed(0)}%` : w ? (T) => W(T, w) : void 0,
2558
+ tickFormatter: V ? (M) => `${(M * 100).toFixed(0)}%` : w ? (M) => W(M, w) : void 0,
2553
2559
  domain: V ? [0, 1] : void 0,
2554
- label: V ? void 0 : M.length > 0 ? {
2555
- value: w?.label || c(M[0]),
2560
+ label: V ? void 0 : T.length > 0 ? {
2561
+ value: w?.label || c(T[0]),
2556
2562
  angle: -90,
2557
2563
  position: "left",
2558
2564
  style: { textAnchor: "middle", fontSize: "12px" }
@@ -2560,12 +2566,12 @@ const Ys = de.memo(function({
2560
2566
  }
2561
2567
  ),
2562
2568
  $ && /* @__PURE__ */ o(
2563
- Ee,
2569
+ Ie,
2564
2570
  {
2565
2571
  yAxisId: "right",
2566
2572
  orientation: "right",
2567
2573
  tick: { fontSize: 12 },
2568
- tickFormatter: N ? (T) => W(T, N) : void 0,
2574
+ tickFormatter: N ? (M) => W(M, N) : void 0,
2569
2575
  label: y.length > 0 ? {
2570
2576
  value: N?.label || c(y[0]),
2571
2577
  angle: 90,
@@ -2577,15 +2583,15 @@ const Ys = de.memo(function({
2577
2583
  f.showTooltip && /* @__PURE__ */ o(
2578
2584
  Pe,
2579
2585
  {
2580
- formatter: (T, U) => {
2581
- if (T == null)
2586
+ formatter: (M, U) => {
2587
+ if (M == null)
2582
2588
  return ["No data", U];
2583
2589
  if (U === "Target")
2584
- return [W(T, w), "Target Value"];
2585
- if (V && typeof T == "number")
2586
- return [`${(T * 100).toFixed(1)}%`, U];
2590
+ return [W(M, w), "Target Value"];
2591
+ if (V && typeof M == "number")
2592
+ return [`${(M * 100).toFixed(1)}%`, U];
2587
2593
  const O = _[U], te = (O && C[O] === "right" ? "right" : "left") === "right" ? N : w;
2588
- return [W(T, te), U];
2594
+ return [W(M, te), U];
2589
2595
  }
2590
2596
  }
2591
2597
  ),
@@ -2598,38 +2604,38 @@ const Ys = de.memo(function({
2598
2604
  layout: "horizontal",
2599
2605
  align: "center",
2600
2606
  verticalAlign: "bottom",
2601
- onMouseEnter: (T) => d(String(T.dataKey || "")),
2607
+ onMouseEnter: (M) => d(String(M.dataKey || "")),
2602
2608
  onMouseLeave: () => d(null)
2603
2609
  }
2604
2610
  ),
2605
- b.map((T, U) => {
2606
- const O = _[T], K = O && C[O] === "right" ? "right" : "left";
2611
+ b.map((M, U) => {
2612
+ const O = _[M], K = O && C[O] === "right" ? "right" : "left";
2607
2613
  return /* @__PURE__ */ o(
2608
2614
  xn,
2609
2615
  {
2610
- dataKey: T,
2616
+ dataKey: M,
2611
2617
  yAxisId: K,
2612
2618
  stackId: D ? "stack" : void 0,
2613
2619
  fill: Y ? sr : a?.colors && a.colors[U % a.colors.length] || G[U % G.length],
2614
- fillOpacity: l ? l === T ? 1 : 0.3 : 1,
2620
+ fillOpacity: l ? l === M ? 1 : 0.3 : 1,
2615
2621
  children: Y && x.map((te, fe) => {
2616
- const me = te[T], we = typeof me == "number" && me < 0 ? vs : sr;
2622
+ const me = te[M], we = typeof me == "number" && me < 0 ? Ns : sr;
2617
2623
  return /* @__PURE__ */ o(
2618
2624
  Ht,
2619
2625
  {
2620
2626
  fill: we,
2621
- fillOpacity: l ? l === T ? 1 : 0.3 : 1
2627
+ fillOpacity: l ? l === M ? 1 : 0.3 : 1
2622
2628
  },
2623
2629
  `cell-${fe}`
2624
2630
  );
2625
2631
  })
2626
2632
  },
2627
- T
2633
+ M
2628
2634
  );
2629
2635
  }),
2630
2636
  B.length > 0 && /* @__PURE__ */ k(Vt, { children: [
2631
2637
  /* @__PURE__ */ o(
2632
- Re,
2638
+ Ee,
2633
2639
  {
2634
2640
  type: "monotone",
2635
2641
  dataKey: "__target",
@@ -2642,7 +2648,7 @@ const Ys = de.memo(function({
2642
2648
  }
2643
2649
  ),
2644
2650
  /* @__PURE__ */ o(
2645
- Re,
2651
+ Ee,
2646
2652
  {
2647
2653
  type: "monotone",
2648
2654
  dataKey: "__target",
@@ -2672,10 +2678,10 @@ const Ys = de.memo(function({
2672
2678
  /* @__PURE__ */ o("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
2673
2679
  ] }) });
2674
2680
  }
2675
- }), Rc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2681
+ }), Ic = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2676
2682
  __proto__: null,
2677
- default: Ys
2678
- }, Symbol.toStringTag, { value: "Module" })), js = de.memo(function({
2683
+ default: Us
2684
+ }, Symbol.toStringTag, { value: "Module" })), Bs = de.memo(function({
2679
2685
  data: t,
2680
2686
  chartConfig: r,
2681
2687
  displayConfig: n = {},
@@ -2714,7 +2720,7 @@ const Ys = de.memo(function({
2714
2720
  const A = vt(t), p = n?.priorPeriodStyle || "dashed", v = n?.priorPeriodOpacity ?? 0.5, S = A ? Hr(t) : [];
2715
2721
  let g, b, C = "name";
2716
2722
  if (A) {
2717
- const F = Rs(t, w, f, c);
2723
+ const F = Is(t, w, f, c);
2718
2724
  g = F.data, b = F.seriesKeys, C = "__periodDayIndex";
2719
2725
  } else {
2720
2726
  const F = Ze(
@@ -2736,11 +2742,11 @@ const Ys = de.memo(function({
2736
2742
  const B = c(L);
2737
2743
  F[B] = L;
2738
2744
  }), F;
2739
- }, [w, c]), M = (F) => {
2745
+ }, [w, c]), T = (F) => {
2740
2746
  if ($[F])
2741
2747
  return $[F];
2742
- const B = F.replace(/\s*\((Current|Prior)\)$/, "").split(" - "), I = B[B.length - 1];
2743
- return $[I];
2748
+ const B = F.replace(/\s*\((Current|Prior)\)$/, "").split(" - "), R = B[B.length - 1];
2749
+ return $[R];
2744
2750
  }, y = w.some((F) => _[F] === "right"), x = w.filter((F) => (_[F] || "left") === "left"), z = w.filter((F) => _[F] === "right"), D = u.showLegend, V = {
2745
2751
  ...je,
2746
2752
  left: 40,
@@ -2768,15 +2774,15 @@ const Ys = de.memo(function({
2768
2774
  tickFormatter: A ? (F, L) => {
2769
2775
  const B = g[L];
2770
2776
  if (B?.__displayDate) {
2771
- const I = pe(i, f);
2772
- return ee(B.__displayDate, I);
2777
+ const R = pe(i, f);
2778
+ return ee(B.__displayDate, R);
2773
2779
  }
2774
2780
  return `Period ${F + 1}`;
2775
2781
  } : void 0
2776
2782
  }
2777
2783
  ),
2778
2784
  /* @__PURE__ */ o(
2779
- Ee,
2785
+ Ie,
2780
2786
  {
2781
2787
  yAxisId: "left",
2782
2788
  orientation: "left",
@@ -2791,7 +2797,7 @@ const Ys = de.memo(function({
2791
2797
  }
2792
2798
  ),
2793
2799
  y && /* @__PURE__ */ o(
2794
- Ee,
2800
+ Ie,
2795
2801
  {
2796
2802
  yAxisId: "right",
2797
2803
  orientation: "right",
@@ -2813,15 +2819,15 @@ const Ys = de.memo(function({
2813
2819
  return ["No data", L];
2814
2820
  if (L === "Target")
2815
2821
  return [W(F, m), "Target Value"];
2816
- const B = M(L), T = (B && _[B] === "right" ? "right" : "left") === "right" ? h : m;
2817
- return [W(F, T), L];
2822
+ const B = T(L), M = (B && _[B] === "right" ? "right" : "left") === "right" ? h : m;
2823
+ return [W(F, M), L];
2818
2824
  },
2819
2825
  labelFormatter: A ? (F, L) => {
2820
2826
  if (L && L.length > 0) {
2821
2827
  const B = L[0]?.payload;
2822
2828
  if (B?.__displayDate) {
2823
- const I = pe(i, f);
2824
- return ee(B.__displayDate, I);
2829
+ const R = pe(i, f);
2830
+ return ee(B.__displayDate, R);
2825
2831
  }
2826
2832
  }
2827
2833
  return `Period ${Number(F) + 1}`;
@@ -2842,18 +2848,18 @@ const Ys = de.memo(function({
2842
2848
  }
2843
2849
  ),
2844
2850
  b.map((F, L) => {
2845
- const B = M(F), I = B && _[B] === "right" ? "right" : "left", T = A && Es(F, S), U = T ? Vs(p) : void 0, O = T ? v : 1;
2851
+ const B = T(F), R = B && _[B] === "right" ? "right" : "left", M = A && Os(F, S), U = M ? Ps(p) : void 0, O = M ? v : 1;
2846
2852
  return /* @__PURE__ */ o(
2847
- Re,
2853
+ Ee,
2848
2854
  {
2849
2855
  type: "monotone",
2850
2856
  dataKey: F,
2851
- yAxisId: I,
2857
+ yAxisId: R,
2852
2858
  stroke: a?.colors && a.colors[L % a.colors.length] || G[L % G.length],
2853
- strokeWidth: T ? 1.5 : 2,
2859
+ strokeWidth: M ? 1.5 : 2,
2854
2860
  strokeDasharray: U,
2855
- dot: T ? !1 : { r: 3 },
2856
- activeDot: T ? !1 : { r: 5 },
2861
+ dot: M ? !1 : { r: 3 },
2862
+ activeDot: M ? !1 : { r: 5 },
2857
2863
  strokeOpacity: l ? l === F ? 1 : 0.3 : O,
2858
2864
  connectNulls: u.connectNulls
2859
2865
  },
@@ -2862,7 +2868,7 @@ const Ys = de.memo(function({
2862
2868
  }),
2863
2869
  Y.length > 0 && /* @__PURE__ */ k(Vt, { children: [
2864
2870
  /* @__PURE__ */ o(
2865
- Re,
2871
+ Ee,
2866
2872
  {
2867
2873
  type: "monotone",
2868
2874
  dataKey: "__target",
@@ -2875,7 +2881,7 @@ const Ys = de.memo(function({
2875
2881
  }
2876
2882
  ),
2877
2883
  /* @__PURE__ */ o(
2878
- Re,
2884
+ Ee,
2879
2885
  {
2880
2886
  type: "monotone",
2881
2887
  dataKey: "__target",
@@ -2898,10 +2904,10 @@ const Ys = de.memo(function({
2898
2904
  /* @__PURE__ */ o("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
2899
2905
  ] }) });
2900
2906
  }
2901
- }), Ic = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2907
+ }), Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2902
2908
  __proto__: null,
2903
- default: js
2904
- }, Symbol.toStringTag, { value: "Module" })), Us = de.memo(function({
2909
+ default: Bs
2910
+ }, Symbol.toStringTag, { value: "Module" })), Ws = de.memo(function({
2905
2911
  data: t,
2906
2912
  chartConfig: r,
2907
2913
  displayConfig: n = {},
@@ -2949,7 +2955,7 @@ const Ys = de.memo(function({
2949
2955
  const L = c(F);
2950
2956
  C[L] = F;
2951
2957
  });
2952
- const _ = p.some((F) => b[F] === "right"), $ = p.filter((F) => (b[F] || "left") === "left"), M = p.filter((F) => b[F] === "right"), y = m && !_, x = h && !_, z = f.showLegend, D = {
2958
+ const _ = p.some((F) => b[F] === "right"), $ = p.filter((F) => (b[F] || "left") === "left"), T = p.filter((F) => b[F] === "right"), y = m && !_, x = h && !_, z = f.showLegend, D = {
2953
2959
  ...je,
2954
2960
  left: 40,
2955
2961
  // Space for left Y-axis label
@@ -2967,7 +2973,7 @@ const Ys = de.memo(function({
2967
2973
  f.showGrid && /* @__PURE__ */ o(yt, { strokeDasharray: "3 3" }),
2968
2974
  /* @__PURE__ */ o(gt, { dataKey: "name", tick: { fontSize: 12 }, angle: -45, textAnchor: "end", height: 60 }),
2969
2975
  /* @__PURE__ */ o(
2970
- Ee,
2976
+ Ie,
2971
2977
  {
2972
2978
  yAxisId: "left",
2973
2979
  orientation: "left",
@@ -2983,14 +2989,14 @@ const Ys = de.memo(function({
2983
2989
  }
2984
2990
  ),
2985
2991
  _ && /* @__PURE__ */ o(
2986
- Ee,
2992
+ Ie,
2987
2993
  {
2988
2994
  yAxisId: "right",
2989
2995
  orientation: "right",
2990
2996
  tick: { fontSize: 12 },
2991
2997
  tickFormatter: N ? (F) => W(F, N) : void 0,
2992
- label: M.length > 0 ? {
2993
- value: N?.label || c(M[0]),
2998
+ label: T.length > 0 ? {
2999
+ value: N?.label || c(T[0]),
2994
3000
  angle: 90,
2995
3001
  position: "right",
2996
3002
  style: { textAnchor: "middle", fontSize: "12px" }
@@ -3007,8 +3013,8 @@ const Ys = de.memo(function({
3007
3013
  return [W(F, w), "Target Value"];
3008
3014
  if (x && typeof F == "number")
3009
3015
  return [`${(F * 100).toFixed(1)}%`, L];
3010
- const B = C[L], T = (B && b[B] === "right" ? "right" : "left") === "right" ? N : w;
3011
- return [W(F, T), L];
3016
+ const B = C[L], M = (B && b[B] === "right" ? "right" : "left") === "right" ? N : w;
3017
+ return [W(F, M), L];
3012
3018
  }
3013
3019
  }
3014
3020
  ),
@@ -3026,13 +3032,13 @@ const Ys = de.memo(function({
3026
3032
  }
3027
3033
  ),
3028
3034
  g.map((F, L) => {
3029
- const B = C[F], I = B && b[B] === "right" ? "right" : "left";
3035
+ const B = C[F], R = B && b[B] === "right" ? "right" : "left";
3030
3036
  return /* @__PURE__ */ o(
3031
3037
  gn,
3032
3038
  {
3033
3039
  type: "monotone",
3034
3040
  dataKey: F,
3035
- yAxisId: I,
3041
+ yAxisId: R,
3036
3042
  stackId: y ? "stack" : void 0,
3037
3043
  stroke: a?.colors && a.colors[L % a.colors.length] || G[L % G.length],
3038
3044
  fill: a?.colors && a.colors[L % a.colors.length] || G[L % G.length],
@@ -3046,7 +3052,7 @@ const Ys = de.memo(function({
3046
3052
  }),
3047
3053
  P.length > 0 && /* @__PURE__ */ k(Vt, { children: [
3048
3054
  /* @__PURE__ */ o(
3049
- Re,
3055
+ Ee,
3050
3056
  {
3051
3057
  type: "monotone",
3052
3058
  dataKey: "__target",
@@ -3059,7 +3065,7 @@ const Ys = de.memo(function({
3059
3065
  }
3060
3066
  ),
3061
3067
  /* @__PURE__ */ o(
3062
- Re,
3068
+ Ee,
3063
3069
  {
3064
3070
  type: "monotone",
3065
3071
  dataKey: "__target",
@@ -3082,10 +3088,10 @@ const Ys = de.memo(function({
3082
3088
  /* @__PURE__ */ o("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
3083
3089
  ] }) });
3084
3090
  }
3085
- }), Ec = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3091
+ }), Oc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3086
3092
  __proto__: null,
3087
- default: Us
3088
- }, Symbol.toStringTag, { value: "Module" })), Bs = de.memo(function({
3093
+ default: Ws
3094
+ }, Symbol.toStringTag, { value: "Module" })), Gs = de.memo(function({
3089
3095
  data: t,
3090
3096
  chartConfig: r,
3091
3097
  displayConfig: n = {},
@@ -3201,10 +3207,10 @@ const Ys = de.memo(function({
3201
3207
  /* @__PURE__ */ o("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
3202
3208
  ] }) });
3203
3209
  }
3204
- }), Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3210
+ }), Pc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3205
3211
  __proto__: null,
3206
- default: Bs
3207
- }, Symbol.toStringTag, { value: "Module" })), Ws = de.memo(function({
3212
+ default: Gs
3213
+ }, Symbol.toStringTag, { value: "Module" })), Ks = de.memo(function({
3208
3214
  data: t,
3209
3215
  chartConfig: r,
3210
3216
  displayConfig: n = {},
@@ -3227,8 +3233,8 @@ const Ys = de.memo(function({
3227
3233
  let f, w, N = [];
3228
3234
  if (r?.xAxis && r?.yAxis) {
3229
3235
  f = Array.isArray(r.xAxis) ? r.xAxis[0] : r.xAxis, w = Array.isArray(r.yAxis) ? r.yAxis[0] : r.yAxis;
3230
- const M = r.series;
3231
- N = M ? Array.isArray(M) ? M : [M] : [];
3236
+ const T = r.series;
3237
+ N = T ? Array.isArray(T) ? T : [T] : [];
3232
3238
  } else if (r?.x && r?.y)
3233
3239
  f = r.x, w = Array.isArray(r.y) ? r.y[0] : r.y;
3234
3240
  else
@@ -3241,12 +3247,12 @@ const Ys = de.memo(function({
3241
3247
  /* @__PURE__ */ o("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
3242
3248
  /* @__PURE__ */ o("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
3243
3249
  ] }) });
3244
- const p = (i?.timeDimensions || []).map((M) => M.dimension);
3250
+ const p = (i?.timeDimensions || []).map((T) => T.dimension);
3245
3251
  let v, S = {};
3246
3252
  if (N.length > 0) {
3247
- const M = N[0];
3253
+ const T = N[0];
3248
3254
  t.forEach((x) => {
3249
- const z = String(x[M] || "Default");
3255
+ const z = String(x[T] || "Default");
3250
3256
  S[z] || (S[z] = []);
3251
3257
  const D = pe(i, f), V = ee(x[f], D) || x[f], P = Ve(x[w]), Y = typeof V == "string" ? parseFloat(V) : V;
3252
3258
  if (ot(Y) && P !== null) {
@@ -3266,9 +3272,9 @@ const Ys = de.memo(function({
3266
3272
  }
3267
3273
  }), v = Object.keys(S).flatMap((x) => S[x]);
3268
3274
  } else {
3269
- const M = pe(i, f);
3275
+ const T = pe(i, f);
3270
3276
  v = t.map((y) => {
3271
- const x = ee(y[f], M) || y[f], z = Ve(y[w]), D = typeof x == "string" ? parseFloat(x) : x, V = {};
3277
+ const x = ee(y[f], T) || y[f], z = Ve(y[w]), D = typeof x == "string" ? parseFloat(x) : x, V = {};
3272
3278
  return p.forEach((P) => {
3273
3279
  if (y[P]) {
3274
3280
  const Y = pe(i, P);
@@ -3303,17 +3309,17 @@ const Ys = de.memo(function({
3303
3309
  dataKey: "x",
3304
3310
  name: m?.label || c(f),
3305
3311
  tick: { fontSize: 12 },
3306
- tickFormatter: m ? (M) => W(M, m) : void 0
3312
+ tickFormatter: m ? (T) => W(T, m) : void 0
3307
3313
  }
3308
3314
  ),
3309
3315
  /* @__PURE__ */ o(
3310
- Ee,
3316
+ Ie,
3311
3317
  {
3312
3318
  type: "number",
3313
3319
  dataKey: "y",
3314
3320
  name: h?.label || c(w),
3315
3321
  tick: { fontSize: 12 },
3316
- tickFormatter: h ? (M) => W(M, h) : void 0,
3322
+ tickFormatter: h ? (T) => W(T, h) : void 0,
3317
3323
  label: { value: h?.label || c(w), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
3318
3324
  }
3319
3325
  ),
@@ -3321,8 +3327,8 @@ const Ys = de.memo(function({
3321
3327
  Cr,
3322
3328
  {
3323
3329
  cursor: { strokeDasharray: "3 3" },
3324
- content: ({ active: M, payload: y }) => {
3325
- if (!M || !y || y.length === 0) return null;
3330
+ content: ({ active: T, payload: y }) => {
3331
+ if (!T || !y || y.length === 0) return null;
3326
3332
  const x = y[0]?.payload;
3327
3333
  return x ? /* @__PURE__ */ k("div", { style: {
3328
3334
  backgroundColor: "white",
@@ -3362,21 +3368,21 @@ const Ys = de.memo(function({
3362
3368
  layout: "horizontal",
3363
3369
  align: "center",
3364
3370
  verticalAlign: "bottom",
3365
- onMouseEnter: (M) => d(String(M.dataKey || "")),
3371
+ onMouseEnter: (T) => d(String(T.dataKey || "")),
3366
3372
  onMouseLeave: () => d(null)
3367
3373
  }
3368
3374
  ),
3369
3375
  C ? (
3370
3376
  // Multiple series
3371
- g.map((M, y) => /* @__PURE__ */ o(
3377
+ g.map((T, y) => /* @__PURE__ */ o(
3372
3378
  Jt,
3373
3379
  {
3374
- name: M,
3375
- data: S[M],
3380
+ name: T,
3381
+ data: S[T],
3376
3382
  fill: a?.colors && a.colors[y % a.colors.length] || G[y % G.length],
3377
- fillOpacity: l ? l === M ? 1 : 0.3 : 1
3383
+ fillOpacity: l ? l === T ? 1 : 0.3 : 1
3378
3384
  },
3379
- M
3385
+ T
3380
3386
  ))
3381
3387
  ) : (
3382
3388
  // Single series
@@ -3397,10 +3403,10 @@ const Ys = de.memo(function({
3397
3403
  /* @__PURE__ */ o("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
3398
3404
  ] }) });
3399
3405
  }
3400
- }), Oc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3406
+ }), Hc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3401
3407
  __proto__: null,
3402
- default: Ws
3403
- }, Symbol.toStringTag, { value: "Module" })), Gs = de.memo(function({
3408
+ default: Ks
3409
+ }, Symbol.toStringTag, { value: "Module" })), Xs = de.memo(function({
3404
3410
  data: t,
3405
3411
  chartConfig: r,
3406
3412
  displayConfig: n = {},
@@ -3500,7 +3506,7 @@ const Ys = de.memo(function({
3500
3506
  }
3501
3507
  ),
3502
3508
  m.map((h, f) => /* @__PURE__ */ o(
3503
- Mn,
3509
+ Tn,
3504
3510
  {
3505
3511
  name: h,
3506
3512
  dataKey: h,
@@ -3520,10 +3526,10 @@ const Ys = de.memo(function({
3520
3526
  /* @__PURE__ */ o("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
3521
3527
  ] }) });
3522
3528
  }
3523
- }), Pc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3529
+ }), Yc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3524
3530
  __proto__: null,
3525
- default: Gs
3526
- }, Symbol.toStringTag, { value: "Module" })), Ks = de.memo(function({
3531
+ default: Xs
3532
+ }, Symbol.toStringTag, { value: "Module" })), qs = de.memo(function({
3527
3533
  data: t,
3528
3534
  chartConfig: r,
3529
3535
  displayConfig: n = {},
@@ -3602,7 +3608,7 @@ const Ys = de.memo(function({
3602
3608
  }
3603
3609
  ),
3604
3610
  /* @__PURE__ */ o(
3605
- Tn,
3611
+ Mn,
3606
3612
  {
3607
3613
  dataKey: "value",
3608
3614
  cornerRadius: 4,
@@ -3632,19 +3638,19 @@ const Ys = de.memo(function({
3632
3638
  /* @__PURE__ */ o("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
3633
3639
  ] }) });
3634
3640
  }
3635
- }), Hc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3641
+ }), jc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3636
3642
  __proto__: null,
3637
- default: Ks
3643
+ default: qs
3638
3644
  }, Symbol.toStringTag, { value: "Module" }));
3639
3645
  function st(e, t) {
3640
3646
  return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
3641
3647
  }
3642
- function Xs(e, t) {
3648
+ function Zs(e, t) {
3643
3649
  return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
3644
3650
  }
3645
3651
  function Yr(e) {
3646
3652
  let t, r, n;
3647
- e.length !== 2 ? (t = st, r = (l, d) => st(e(l), d), n = (l, d) => e(l) - d) : (t = e === st || e === Xs ? e : qs, r = e, n = e);
3653
+ e.length !== 2 ? (t = st, r = (l, d) => st(e(l), d), n = (l, d) => e(l) - d) : (t = e === st || e === Zs ? e : Qs, r = e, n = e);
3648
3654
  function i(l, d, c = 0, u = l.length) {
3649
3655
  if (c < u) {
3650
3656
  if (t(d, d) !== 0) return u;
@@ -3671,14 +3677,14 @@ function Yr(e) {
3671
3677
  }
3672
3678
  return { left: i, center: a, right: s };
3673
3679
  }
3674
- function qs() {
3680
+ function Qs() {
3675
3681
  return 0;
3676
3682
  }
3677
- function Zs(e) {
3683
+ function Js(e) {
3678
3684
  return e === null ? NaN : +e;
3679
3685
  }
3680
- const Qs = Yr(st), jr = Qs.right;
3681
- Yr(Zs).center;
3686
+ const ea = Yr(st), jr = ea.right;
3687
+ Yr(Js).center;
3682
3688
  function ar(e, t) {
3683
3689
  let r, n;
3684
3690
  if (t === void 0)
@@ -3692,7 +3698,7 @@ function ar(e, t) {
3692
3698
  return [r, n];
3693
3699
  }
3694
3700
  class or extends Map {
3695
- constructor(t, r = ta) {
3701
+ constructor(t, r = na) {
3696
3702
  if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: r } }), t != null) for (const [n, i] of t) this.set(n, i);
3697
3703
  }
3698
3704
  get(t) {
@@ -3702,34 +3708,34 @@ class or extends Map {
3702
3708
  return super.has(lr(this, t));
3703
3709
  }
3704
3710
  set(t, r) {
3705
- return super.set(Js(this, t), r);
3711
+ return super.set(ta(this, t), r);
3706
3712
  }
3707
3713
  delete(t) {
3708
- return super.delete(ea(this, t));
3714
+ return super.delete(ra(this, t));
3709
3715
  }
3710
3716
  }
3711
3717
  function lr({ _intern: e, _key: t }, r) {
3712
3718
  const n = t(r);
3713
3719
  return e.has(n) ? e.get(n) : r;
3714
3720
  }
3715
- function Js({ _intern: e, _key: t }, r) {
3721
+ function ta({ _intern: e, _key: t }, r) {
3716
3722
  const n = t(r);
3717
3723
  return e.has(n) ? e.get(n) : (e.set(n, r), r);
3718
3724
  }
3719
- function ea({ _intern: e, _key: t }, r) {
3725
+ function ra({ _intern: e, _key: t }, r) {
3720
3726
  const n = t(r);
3721
3727
  return e.has(n) && (r = e.get(n), e.delete(n)), r;
3722
3728
  }
3723
- function ta(e) {
3729
+ function na(e) {
3724
3730
  return e !== null && typeof e == "object" ? e.valueOf() : e;
3725
3731
  }
3726
- const ra = Math.sqrt(50), na = Math.sqrt(10), ia = Math.sqrt(2);
3732
+ const ia = Math.sqrt(50), sa = Math.sqrt(10), aa = Math.sqrt(2);
3727
3733
  function lt(e, t, r) {
3728
- const n = (t - e) / Math.max(0, r), i = Math.floor(Math.log10(n)), s = n / Math.pow(10, i), a = s >= ra ? 10 : s >= na ? 5 : s >= ia ? 2 : 1;
3734
+ const n = (t - e) / Math.max(0, r), i = Math.floor(Math.log10(n)), s = n / Math.pow(10, i), a = s >= ia ? 10 : s >= sa ? 5 : s >= aa ? 2 : 1;
3729
3735
  let l, d, c;
3730
3736
  return i < 0 ? (c = Math.pow(10, -i) / a, l = Math.round(e * c), d = Math.round(t * c), l / c < e && ++l, d / c > t && --d, c = -c) : (c = Math.pow(10, i) * a, l = Math.round(e / c), d = Math.round(t / c), l * c < e && ++l, d * c > t && --d), d < l && 0.5 <= r && r < 2 ? lt(e, t, r * 2) : [l, d, c];
3731
3737
  }
3732
- function sa(e, t, r) {
3738
+ function oa(e, t, r) {
3733
3739
  if (t = +t, e = +e, r = +r, !(r > 0)) return [];
3734
3740
  if (e === t) return [e];
3735
3741
  const n = t < e, [i, s, a] = n ? lt(t, e, r) : lt(e, t, r);
@@ -3745,7 +3751,7 @@ function sa(e, t, r) {
3745
3751
  function $t(e, t, r) {
3746
3752
  return t = +t, e = +e, r = +r, lt(e, t, r)[2];
3747
3753
  }
3748
- function aa(e, t, r) {
3754
+ function la(e, t, r) {
3749
3755
  t = +t, e = +e, r = +r;
3750
3756
  const n = t < e, i = n ? $t(t, e, r) : $t(e, t, r);
3751
3757
  return (n ? -1 : 1) * (i < 0 ? 1 / -i : i);
@@ -3774,37 +3780,37 @@ function cr(e, t) {
3774
3780
  }
3775
3781
  return r;
3776
3782
  }
3777
- function oa(e) {
3783
+ function ca(e) {
3778
3784
  return e;
3779
3785
  }
3780
- var Mt = 1, Ft = 2, Ct = 3, We = 4, dr = 1e-6;
3781
- function la(e) {
3786
+ var Tt = 1, Ft = 2, Ct = 3, We = 4, dr = 1e-6;
3787
+ function da(e) {
3782
3788
  return "translate(" + e + ",0)";
3783
3789
  }
3784
- function ca(e) {
3790
+ function ua(e) {
3785
3791
  return "translate(0," + e + ")";
3786
3792
  }
3787
- function da(e) {
3793
+ function fa(e) {
3788
3794
  return (t) => +e(t);
3789
3795
  }
3790
- function ua(e, t) {
3796
+ function ma(e, t) {
3791
3797
  return t = Math.max(0, e.bandwidth() - t * 2) / 2, e.round() && (t = Math.round(t)), (r) => +e(r) + t;
3792
3798
  }
3793
- function fa() {
3799
+ function ha() {
3794
3800
  return !this.__axis;
3795
3801
  }
3796
3802
  function Ur(e, t) {
3797
- var r = [], n = null, i = null, s = 6, a = 6, l = 3, d = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, c = e === Mt || e === We ? -1 : 1, u = e === We || e === Ft ? "x" : "y", m = e === Mt || e === Ct ? la : ca;
3803
+ var r = [], n = null, i = null, s = 6, a = 6, l = 3, d = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, c = e === Tt || e === We ? -1 : 1, u = e === We || e === Ft ? "x" : "y", m = e === Tt || e === Ct ? da : ua;
3798
3804
  function h(f) {
3799
- var w = n ?? (t.ticks ? t.ticks.apply(t, r) : t.domain()), N = i ?? (t.tickFormat ? t.tickFormat.apply(t, r) : oa), A = Math.max(s, 0) + l, p = t.range(), v = +p[0] + d, S = +p[p.length - 1] + d, g = (t.bandwidth ? ua : da)(t.copy(), d), b = f.selection ? f.selection() : f, C = b.selectAll(".domain").data([null]), _ = b.selectAll(".tick").data(w, t).order(), $ = _.exit(), M = _.enter().append("g").attr("class", "tick"), y = _.select("line"), x = _.select("text");
3800
- C = C.merge(C.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), _ = _.merge(M), y = y.merge(M.append("line").attr("stroke", "currentColor").attr(u + "2", c * s)), x = x.merge(M.append("text").attr("fill", "currentColor").attr(u, c * A).attr("dy", e === Mt ? "0em" : e === Ct ? "0.71em" : "0.32em")), f !== b && (C = C.transition(f), _ = _.transition(f), y = y.transition(f), x = x.transition(f), $ = $.transition(f).attr("opacity", dr).attr("transform", function(z) {
3805
+ var w = n ?? (t.ticks ? t.ticks.apply(t, r) : t.domain()), N = i ?? (t.tickFormat ? t.tickFormat.apply(t, r) : ca), A = Math.max(s, 0) + l, p = t.range(), v = +p[0] + d, S = +p[p.length - 1] + d, g = (t.bandwidth ? ma : fa)(t.copy(), d), b = f.selection ? f.selection() : f, C = b.selectAll(".domain").data([null]), _ = b.selectAll(".tick").data(w, t).order(), $ = _.exit(), T = _.enter().append("g").attr("class", "tick"), y = _.select("line"), x = _.select("text");
3806
+ C = C.merge(C.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), _ = _.merge(T), y = y.merge(T.append("line").attr("stroke", "currentColor").attr(u + "2", c * s)), x = x.merge(T.append("text").attr("fill", "currentColor").attr(u, c * A).attr("dy", e === Tt ? "0em" : e === Ct ? "0.71em" : "0.32em")), f !== b && (C = C.transition(f), _ = _.transition(f), y = y.transition(f), x = x.transition(f), $ = $.transition(f).attr("opacity", dr).attr("transform", function(z) {
3801
3807
  return isFinite(z = g(z)) ? m(z + d) : this.getAttribute("transform");
3802
- }), M.attr("opacity", dr).attr("transform", function(z) {
3808
+ }), T.attr("opacity", dr).attr("transform", function(z) {
3803
3809
  var D = this.parentNode.__axis;
3804
3810
  return m((D && isFinite(D = D(z)) ? D : g(z)) + d);
3805
3811
  })), $.remove(), C.attr("d", e === We || e === Ft ? a ? "M" + c * a + "," + v + "H" + d + "V" + S + "H" + c * a : "M" + d + "," + v + "V" + S : a ? "M" + v + "," + c * a + "V" + d + "H" + S + "V" + c * a : "M" + v + "," + d + "H" + S), _.attr("opacity", 1).attr("transform", function(z) {
3806
3812
  return m(g(z) + d);
3807
- }), y.attr(u + "2", c * s), x.attr(u, c * A).text(N), b.filter(fa).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", e === Ft ? "start" : e === We ? "end" : "middle"), b.each(function() {
3813
+ }), y.attr(u + "2", c * s), x.attr(u, c * A).text(N), b.filter(ha).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", e === Ft ? "start" : e === We ? "end" : "middle"), b.each(function() {
3808
3814
  this.__axis = g;
3809
3815
  });
3810
3816
  }
@@ -3848,59 +3854,59 @@ function Br(e) {
3848
3854
  var t = e += "", r = t.indexOf(":");
3849
3855
  return r >= 0 && (t = e.slice(0, r)) !== "xmlns" && (e = e.slice(r + 1)), mr.hasOwnProperty(t) ? { space: mr[t], local: e } : e;
3850
3856
  }
3851
- function ma(e) {
3857
+ function pa(e) {
3852
3858
  return function() {
3853
3859
  var t = this.ownerDocument, r = this.namespaceURI;
3854
3860
  return r === zt && t.documentElement.namespaceURI === zt ? t.createElement(e) : t.createElementNS(r, e);
3855
3861
  };
3856
3862
  }
3857
- function ha(e) {
3863
+ function xa(e) {
3858
3864
  return function() {
3859
3865
  return this.ownerDocument.createElementNS(e.space, e.local);
3860
3866
  };
3861
3867
  }
3862
3868
  function Wr(e) {
3863
3869
  var t = Br(e);
3864
- return (t.local ? ha : ma)(t);
3870
+ return (t.local ? xa : pa)(t);
3865
3871
  }
3866
- function pa() {
3872
+ function ya() {
3867
3873
  }
3868
3874
  function Gr(e) {
3869
- return e == null ? pa : function() {
3875
+ return e == null ? ya : function() {
3870
3876
  return this.querySelector(e);
3871
3877
  };
3872
3878
  }
3873
- function xa(e) {
3879
+ function ga(e) {
3874
3880
  typeof e != "function" && (e = Gr(e));
3875
3881
  for (var t = this._groups, r = t.length, n = new Array(r), i = 0; i < r; ++i)
3876
3882
  for (var s = t[i], a = s.length, l = n[i] = new Array(a), d, c, u = 0; u < a; ++u)
3877
3883
  (d = s[u]) && (c = e.call(d, d.__data__, u, s)) && ("__data__" in d && (c.__data__ = d.__data__), l[u] = c);
3878
3884
  return new ge(n, this._parents);
3879
3885
  }
3880
- function ya(e) {
3886
+ function ba(e) {
3881
3887
  return e == null ? [] : Array.isArray(e) ? e : Array.from(e);
3882
3888
  }
3883
- function ga() {
3889
+ function va() {
3884
3890
  return [];
3885
3891
  }
3886
- function ba(e) {
3887
- return e == null ? ga : function() {
3892
+ function wa(e) {
3893
+ return e == null ? va : function() {
3888
3894
  return this.querySelectorAll(e);
3889
3895
  };
3890
3896
  }
3891
- function va(e) {
3897
+ function Na(e) {
3892
3898
  return function() {
3893
- return ya(e.apply(this, arguments));
3899
+ return ba(e.apply(this, arguments));
3894
3900
  };
3895
3901
  }
3896
- function wa(e) {
3897
- typeof e == "function" ? e = va(e) : e = ba(e);
3902
+ function Aa(e) {
3903
+ typeof e == "function" ? e = Na(e) : e = wa(e);
3898
3904
  for (var t = this._groups, r = t.length, n = [], i = [], s = 0; s < r; ++s)
3899
3905
  for (var a = t[s], l = a.length, d, c = 0; c < l; ++c)
3900
3906
  (d = a[c]) && (n.push(e.call(d, d.__data__, c, a)), i.push(d));
3901
3907
  return new ge(n, i);
3902
3908
  }
3903
- function Na(e) {
3909
+ function Sa(e) {
3904
3910
  return function() {
3905
3911
  return this.matches(e);
3906
3912
  };
@@ -3910,32 +3916,32 @@ function Kr(e) {
3910
3916
  return t.matches(e);
3911
3917
  };
3912
3918
  }
3913
- var Aa = Array.prototype.find;
3914
- function Sa(e) {
3919
+ var ka = Array.prototype.find;
3920
+ function Ta(e) {
3915
3921
  return function() {
3916
- return Aa.call(this.children, e);
3922
+ return ka.call(this.children, e);
3917
3923
  };
3918
3924
  }
3919
- function ka() {
3925
+ function Fa() {
3920
3926
  return this.firstElementChild;
3921
3927
  }
3922
3928
  function Ma(e) {
3923
- return this.select(e == null ? ka : Sa(typeof e == "function" ? e : Kr(e)));
3929
+ return this.select(e == null ? Fa : Ta(typeof e == "function" ? e : Kr(e)));
3924
3930
  }
3925
- var Fa = Array.prototype.filter;
3926
- function Ta() {
3931
+ var _a = Array.prototype.filter;
3932
+ function $a() {
3927
3933
  return Array.from(this.children);
3928
3934
  }
3929
- function _a(e) {
3935
+ function Da(e) {
3930
3936
  return function() {
3931
- return Fa.call(this.children, e);
3937
+ return _a.call(this.children, e);
3932
3938
  };
3933
3939
  }
3934
- function $a(e) {
3935
- return this.selectAll(e == null ? Ta : _a(typeof e == "function" ? e : Kr(e)));
3940
+ function Ca(e) {
3941
+ return this.selectAll(e == null ? $a : Da(typeof e == "function" ? e : Kr(e)));
3936
3942
  }
3937
- function Da(e) {
3938
- typeof e != "function" && (e = Na(e));
3943
+ function za(e) {
3944
+ typeof e != "function" && (e = Sa(e));
3939
3945
  for (var t = this._groups, r = t.length, n = new Array(r), i = 0; i < r; ++i)
3940
3946
  for (var s = t[i], a = s.length, l = n[i] = [], d, c = 0; c < a; ++c)
3941
3947
  (d = s[c]) && e.call(d, d.__data__, c, s) && l.push(d);
@@ -3944,7 +3950,7 @@ function Da(e) {
3944
3950
  function Xr(e) {
3945
3951
  return new Array(e.length);
3946
3952
  }
3947
- function Ca() {
3953
+ function La() {
3948
3954
  return new ge(this._enter || this._groups.map(Xr), this._parents);
3949
3955
  }
3950
3956
  function ct(e, t) {
@@ -3965,18 +3971,18 @@ ct.prototype = {
3965
3971
  return this._parent.querySelectorAll(e);
3966
3972
  }
3967
3973
  };
3968
- function za(e) {
3974
+ function Ea(e) {
3969
3975
  return function() {
3970
3976
  return e;
3971
3977
  };
3972
3978
  }
3973
- function La(e, t, r, n, i, s) {
3979
+ function Ra(e, t, r, n, i, s) {
3974
3980
  for (var a = 0, l, d = t.length, c = s.length; a < c; ++a)
3975
3981
  (l = t[a]) ? (l.__data__ = s[a], n[a] = l) : r[a] = new ct(e, s[a]);
3976
3982
  for (; a < d; ++a)
3977
3983
  (l = t[a]) && (i[a] = l);
3978
3984
  }
3979
- function Ra(e, t, r, n, i, s, a) {
3985
+ function Ia(e, t, r, n, i, s, a) {
3980
3986
  var l, d, c = /* @__PURE__ */ new Map(), u = t.length, m = s.length, h = new Array(u), f;
3981
3987
  for (l = 0; l < u; ++l)
3982
3988
  (d = t[l]) && (h[l] = f = a.call(d, d.__data__, l, t) + "", c.has(f) ? i[l] = d : c.set(f, d));
@@ -3985,15 +3991,15 @@ function Ra(e, t, r, n, i, s, a) {
3985
3991
  for (l = 0; l < u; ++l)
3986
3992
  (d = t[l]) && c.get(h[l]) === d && (i[l] = d);
3987
3993
  }
3988
- function Ia(e) {
3994
+ function Va(e) {
3989
3995
  return e.__data__;
3990
3996
  }
3991
- function Ea(e, t) {
3992
- if (!arguments.length) return Array.from(this, Ia);
3993
- var r = t ? Ra : La, n = this._parents, i = this._groups;
3994
- typeof e != "function" && (e = za(e));
3997
+ function Oa(e, t) {
3998
+ if (!arguments.length) return Array.from(this, Va);
3999
+ var r = t ? Ia : Ra, n = this._parents, i = this._groups;
4000
+ typeof e != "function" && (e = Ea(e));
3995
4001
  for (var s = i.length, a = new Array(s), l = new Array(s), d = new Array(s), c = 0; c < s; ++c) {
3996
- var u = n[c], m = i[c], h = m.length, f = Va(e.call(u, u && u.__data__, c, n)), w = f.length, N = l[c] = new Array(w), A = a[c] = new Array(w), p = d[c] = new Array(h);
4002
+ var u = n[c], m = i[c], h = m.length, f = Pa(e.call(u, u && u.__data__, c, n)), w = f.length, N = l[c] = new Array(w), A = a[c] = new Array(w), p = d[c] = new Array(h);
3997
4003
  r(u, m, N, A, p, f, t);
3998
4004
  for (var v = 0, S = 0, g, b; v < w; ++v)
3999
4005
  if (g = N[v]) {
@@ -4003,17 +4009,17 @@ function Ea(e, t) {
4003
4009
  }
4004
4010
  return a = new ge(a, n), a._enter = l, a._exit = d, a;
4005
4011
  }
4006
- function Va(e) {
4012
+ function Pa(e) {
4007
4013
  return typeof e == "object" && "length" in e ? e : Array.from(e);
4008
4014
  }
4009
- function Oa() {
4015
+ function Ha() {
4010
4016
  return new ge(this._exit || this._groups.map(Xr), this._parents);
4011
4017
  }
4012
- function Pa(e, t, r) {
4018
+ function Ya(e, t, r) {
4013
4019
  var n = this.enter(), i = this, s = this.exit();
4014
4020
  return typeof e == "function" ? (n = e(n), n && (n = n.selection())) : n = n.append(e + ""), t != null && (i = t(i), i && (i = i.selection())), r == null ? s.remove() : r(s), n && i ? n.merge(i).order() : i;
4015
4021
  }
4016
- function Ha(e) {
4022
+ function ja(e) {
4017
4023
  for (var t = e.selection ? e.selection() : e, r = this._groups, n = t._groups, i = r.length, s = n.length, a = Math.min(i, s), l = new Array(i), d = 0; d < a; ++d)
4018
4024
  for (var c = r[d], u = n[d], m = c.length, h = l[d] = new Array(m), f, w = 0; w < m; ++w)
4019
4025
  (f = c[w] || u[w]) && (h[w] = f);
@@ -4021,14 +4027,14 @@ function Ha(e) {
4021
4027
  l[d] = r[d];
4022
4028
  return new ge(l, this._parents);
4023
4029
  }
4024
- function Ya() {
4030
+ function Ua() {
4025
4031
  for (var e = this._groups, t = -1, r = e.length; ++t < r; )
4026
4032
  for (var n = e[t], i = n.length - 1, s = n[i], a; --i >= 0; )
4027
4033
  (a = n[i]) && (s && a.compareDocumentPosition(s) ^ 4 && s.parentNode.insertBefore(a, s), s = a);
4028
4034
  return this;
4029
4035
  }
4030
- function ja(e) {
4031
- e || (e = Ua);
4036
+ function Ba(e) {
4037
+ e || (e = Wa);
4032
4038
  function t(m, h) {
4033
4039
  return m && h ? e(m.__data__, h.__data__) : !m - !h;
4034
4040
  }
@@ -4039,17 +4045,17 @@ function ja(e) {
4039
4045
  }
4040
4046
  return new ge(i, this._parents).order();
4041
4047
  }
4042
- function Ua(e, t) {
4048
+ function Wa(e, t) {
4043
4049
  return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
4044
4050
  }
4045
- function Ba() {
4051
+ function Ga() {
4046
4052
  var e = arguments[0];
4047
4053
  return arguments[0] = this, e.apply(null, arguments), this;
4048
4054
  }
4049
- function Wa() {
4055
+ function Ka() {
4050
4056
  return Array.from(this);
4051
4057
  }
4052
- function Ga() {
4058
+ function Xa() {
4053
4059
  for (var e = this._groups, t = 0, r = e.length; t < r; ++t)
4054
4060
  for (var n = e[t], i = 0, s = n.length; i < s; ++i) {
4055
4061
  var a = n[i];
@@ -4057,103 +4063,103 @@ function Ga() {
4057
4063
  }
4058
4064
  return null;
4059
4065
  }
4060
- function Ka() {
4066
+ function qa() {
4061
4067
  let e = 0;
4062
4068
  for (const t of this) ++e;
4063
4069
  return e;
4064
4070
  }
4065
- function Xa() {
4071
+ function Za() {
4066
4072
  return !this.node();
4067
4073
  }
4068
- function qa(e) {
4074
+ function Qa(e) {
4069
4075
  for (var t = this._groups, r = 0, n = t.length; r < n; ++r)
4070
4076
  for (var i = t[r], s = 0, a = i.length, l; s < a; ++s)
4071
4077
  (l = i[s]) && e.call(l, l.__data__, s, i);
4072
4078
  return this;
4073
4079
  }
4074
- function Za(e) {
4080
+ function Ja(e) {
4075
4081
  return function() {
4076
4082
  this.removeAttribute(e);
4077
4083
  };
4078
4084
  }
4079
- function Qa(e) {
4085
+ function eo(e) {
4080
4086
  return function() {
4081
4087
  this.removeAttributeNS(e.space, e.local);
4082
4088
  };
4083
4089
  }
4084
- function Ja(e, t) {
4090
+ function to(e, t) {
4085
4091
  return function() {
4086
4092
  this.setAttribute(e, t);
4087
4093
  };
4088
4094
  }
4089
- function eo(e, t) {
4095
+ function ro(e, t) {
4090
4096
  return function() {
4091
4097
  this.setAttributeNS(e.space, e.local, t);
4092
4098
  };
4093
4099
  }
4094
- function to(e, t) {
4100
+ function no(e, t) {
4095
4101
  return function() {
4096
4102
  var r = t.apply(this, arguments);
4097
4103
  r == null ? this.removeAttribute(e) : this.setAttribute(e, r);
4098
4104
  };
4099
4105
  }
4100
- function ro(e, t) {
4106
+ function io(e, t) {
4101
4107
  return function() {
4102
4108
  var r = t.apply(this, arguments);
4103
4109
  r == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, r);
4104
4110
  };
4105
4111
  }
4106
- function no(e, t) {
4112
+ function so(e, t) {
4107
4113
  var r = Br(e);
4108
4114
  if (arguments.length < 2) {
4109
4115
  var n = this.node();
4110
4116
  return r.local ? n.getAttributeNS(r.space, r.local) : n.getAttribute(r);
4111
4117
  }
4112
- return this.each((t == null ? r.local ? Qa : Za : typeof t == "function" ? r.local ? ro : to : r.local ? eo : Ja)(r, t));
4118
+ return this.each((t == null ? r.local ? eo : Ja : typeof t == "function" ? r.local ? io : no : r.local ? ro : to)(r, t));
4113
4119
  }
4114
4120
  function qr(e) {
4115
4121
  return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;
4116
4122
  }
4117
- function io(e) {
4123
+ function ao(e) {
4118
4124
  return function() {
4119
4125
  this.style.removeProperty(e);
4120
4126
  };
4121
4127
  }
4122
- function so(e, t, r) {
4128
+ function oo(e, t, r) {
4123
4129
  return function() {
4124
4130
  this.style.setProperty(e, t, r);
4125
4131
  };
4126
4132
  }
4127
- function ao(e, t, r) {
4133
+ function lo(e, t, r) {
4128
4134
  return function() {
4129
4135
  var n = t.apply(this, arguments);
4130
4136
  n == null ? this.style.removeProperty(e) : this.style.setProperty(e, n, r);
4131
4137
  };
4132
4138
  }
4133
- function oo(e, t, r) {
4134
- return arguments.length > 1 ? this.each((t == null ? io : typeof t == "function" ? ao : so)(e, t, r ?? "")) : lo(this.node(), e);
4139
+ function co(e, t, r) {
4140
+ return arguments.length > 1 ? this.each((t == null ? ao : typeof t == "function" ? lo : oo)(e, t, r ?? "")) : uo(this.node(), e);
4135
4141
  }
4136
- function lo(e, t) {
4142
+ function uo(e, t) {
4137
4143
  return e.style.getPropertyValue(t) || qr(e).getComputedStyle(e, null).getPropertyValue(t);
4138
4144
  }
4139
- function co(e) {
4145
+ function fo(e) {
4140
4146
  return function() {
4141
4147
  delete this[e];
4142
4148
  };
4143
4149
  }
4144
- function uo(e, t) {
4150
+ function mo(e, t) {
4145
4151
  return function() {
4146
4152
  this[e] = t;
4147
4153
  };
4148
4154
  }
4149
- function fo(e, t) {
4155
+ function ho(e, t) {
4150
4156
  return function() {
4151
4157
  var r = t.apply(this, arguments);
4152
4158
  r == null ? delete this[e] : this[e] = r;
4153
4159
  };
4154
4160
  }
4155
- function mo(e, t) {
4156
- return arguments.length > 1 ? this.each((t == null ? co : typeof t == "function" ? fo : uo)(e, t)) : this.node()[e];
4161
+ function po(e, t) {
4162
+ return arguments.length > 1 ? this.each((t == null ? fo : typeof t == "function" ? ho : mo)(e, t)) : this.node()[e];
4157
4163
  }
4158
4164
  function Zr(e) {
4159
4165
  return e.trim().split(/^|\s+/);
@@ -4183,123 +4189,123 @@ function Jr(e, t) {
4183
4189
  function en(e, t) {
4184
4190
  for (var r = Bt(e), n = -1, i = t.length; ++n < i; ) r.remove(t[n]);
4185
4191
  }
4186
- function ho(e) {
4192
+ function xo(e) {
4187
4193
  return function() {
4188
4194
  Jr(this, e);
4189
4195
  };
4190
4196
  }
4191
- function po(e) {
4197
+ function yo(e) {
4192
4198
  return function() {
4193
4199
  en(this, e);
4194
4200
  };
4195
4201
  }
4196
- function xo(e, t) {
4202
+ function go(e, t) {
4197
4203
  return function() {
4198
4204
  (t.apply(this, arguments) ? Jr : en)(this, e);
4199
4205
  };
4200
4206
  }
4201
- function yo(e, t) {
4207
+ function bo(e, t) {
4202
4208
  var r = Zr(e + "");
4203
4209
  if (arguments.length < 2) {
4204
4210
  for (var n = Bt(this.node()), i = -1, s = r.length; ++i < s; ) if (!n.contains(r[i])) return !1;
4205
4211
  return !0;
4206
4212
  }
4207
- return this.each((typeof t == "function" ? xo : t ? ho : po)(r, t));
4213
+ return this.each((typeof t == "function" ? go : t ? xo : yo)(r, t));
4208
4214
  }
4209
- function go() {
4215
+ function vo() {
4210
4216
  this.textContent = "";
4211
4217
  }
4212
- function bo(e) {
4218
+ function wo(e) {
4213
4219
  return function() {
4214
4220
  this.textContent = e;
4215
4221
  };
4216
4222
  }
4217
- function vo(e) {
4223
+ function No(e) {
4218
4224
  return function() {
4219
4225
  var t = e.apply(this, arguments);
4220
4226
  this.textContent = t ?? "";
4221
4227
  };
4222
4228
  }
4223
- function wo(e) {
4224
- return arguments.length ? this.each(e == null ? go : (typeof e == "function" ? vo : bo)(e)) : this.node().textContent;
4229
+ function Ao(e) {
4230
+ return arguments.length ? this.each(e == null ? vo : (typeof e == "function" ? No : wo)(e)) : this.node().textContent;
4225
4231
  }
4226
- function No() {
4232
+ function So() {
4227
4233
  this.innerHTML = "";
4228
4234
  }
4229
- function Ao(e) {
4235
+ function ko(e) {
4230
4236
  return function() {
4231
4237
  this.innerHTML = e;
4232
4238
  };
4233
4239
  }
4234
- function So(e) {
4240
+ function To(e) {
4235
4241
  return function() {
4236
4242
  var t = e.apply(this, arguments);
4237
4243
  this.innerHTML = t ?? "";
4238
4244
  };
4239
4245
  }
4240
- function ko(e) {
4241
- return arguments.length ? this.each(e == null ? No : (typeof e == "function" ? So : Ao)(e)) : this.node().innerHTML;
4246
+ function Fo(e) {
4247
+ return arguments.length ? this.each(e == null ? So : (typeof e == "function" ? To : ko)(e)) : this.node().innerHTML;
4242
4248
  }
4243
4249
  function Mo() {
4244
4250
  this.nextSibling && this.parentNode.appendChild(this);
4245
4251
  }
4246
- function Fo() {
4252
+ function _o() {
4247
4253
  return this.each(Mo);
4248
4254
  }
4249
- function To() {
4255
+ function $o() {
4250
4256
  this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
4251
4257
  }
4252
- function _o() {
4253
- return this.each(To);
4258
+ function Do() {
4259
+ return this.each($o);
4254
4260
  }
4255
- function $o(e) {
4261
+ function Co(e) {
4256
4262
  var t = typeof e == "function" ? e : Wr(e);
4257
4263
  return this.select(function() {
4258
4264
  return this.appendChild(t.apply(this, arguments));
4259
4265
  });
4260
4266
  }
4261
- function Do() {
4267
+ function zo() {
4262
4268
  return null;
4263
4269
  }
4264
- function Co(e, t) {
4265
- var r = typeof e == "function" ? e : Wr(e), n = t == null ? Do : typeof t == "function" ? t : Gr(t);
4270
+ function Lo(e, t) {
4271
+ var r = typeof e == "function" ? e : Wr(e), n = t == null ? zo : typeof t == "function" ? t : Gr(t);
4266
4272
  return this.select(function() {
4267
4273
  return this.insertBefore(r.apply(this, arguments), n.apply(this, arguments) || null);
4268
4274
  });
4269
4275
  }
4270
- function zo() {
4276
+ function Eo() {
4271
4277
  var e = this.parentNode;
4272
4278
  e && e.removeChild(this);
4273
4279
  }
4274
- function Lo() {
4275
- return this.each(zo);
4276
- }
4277
4280
  function Ro() {
4281
+ return this.each(Eo);
4282
+ }
4283
+ function Io() {
4278
4284
  var e = this.cloneNode(!1), t = this.parentNode;
4279
4285
  return t ? t.insertBefore(e, this.nextSibling) : e;
4280
4286
  }
4281
- function Io() {
4287
+ function Vo() {
4282
4288
  var e = this.cloneNode(!0), t = this.parentNode;
4283
4289
  return t ? t.insertBefore(e, this.nextSibling) : e;
4284
4290
  }
4285
- function Eo(e) {
4286
- return this.select(e ? Io : Ro);
4291
+ function Oo(e) {
4292
+ return this.select(e ? Vo : Io);
4287
4293
  }
4288
- function Vo(e) {
4294
+ function Po(e) {
4289
4295
  return arguments.length ? this.property("__data__", e) : this.node().__data__;
4290
4296
  }
4291
- function Oo(e) {
4297
+ function Ho(e) {
4292
4298
  return function(t) {
4293
4299
  e.call(this, t, this.__data__);
4294
4300
  };
4295
4301
  }
4296
- function Po(e) {
4302
+ function Yo(e) {
4297
4303
  return e.trim().split(/^|\s+/).map(function(t) {
4298
4304
  var r = "", n = t.indexOf(".");
4299
4305
  return n >= 0 && (r = t.slice(n + 1), t = t.slice(0, n)), { type: t, name: r };
4300
4306
  });
4301
4307
  }
4302
- function Ho(e) {
4308
+ function jo(e) {
4303
4309
  return function() {
4304
4310
  var t = this.__on;
4305
4311
  if (t) {
@@ -4309,9 +4315,9 @@ function Ho(e) {
4309
4315
  }
4310
4316
  };
4311
4317
  }
4312
- function Yo(e, t, r) {
4318
+ function Uo(e, t, r) {
4313
4319
  return function() {
4314
- var n = this.__on, i, s = Oo(t);
4320
+ var n = this.__on, i, s = Ho(t);
4315
4321
  if (n) {
4316
4322
  for (var a = 0, l = n.length; a < l; ++a)
4317
4323
  if ((i = n[a]).type === e.type && i.name === e.name) {
@@ -4322,8 +4328,8 @@ function Yo(e, t, r) {
4322
4328
  this.addEventListener(e.type, s, r), i = { type: e.type, name: e.name, value: t, listener: s, options: r }, n ? n.push(i) : this.__on = [i];
4323
4329
  };
4324
4330
  }
4325
- function jo(e, t, r) {
4326
- var n = Po(e + ""), i, s = n.length, a;
4331
+ function Bo(e, t, r) {
4332
+ var n = Yo(e + ""), i, s = n.length, a;
4327
4333
  if (arguments.length < 2) {
4328
4334
  var l = this.node().__on;
4329
4335
  if (l) {
@@ -4334,78 +4340,78 @@ function jo(e, t, r) {
4334
4340
  }
4335
4341
  return;
4336
4342
  }
4337
- for (l = t ? Yo : Ho, i = 0; i < s; ++i) this.each(l(n[i], t, r));
4343
+ for (l = t ? Uo : jo, i = 0; i < s; ++i) this.each(l(n[i], t, r));
4338
4344
  return this;
4339
4345
  }
4340
4346
  function tn(e, t, r) {
4341
4347
  var n = qr(e), i = n.CustomEvent;
4342
4348
  typeof i == "function" ? i = new i(t, r) : (i = n.document.createEvent("Event"), r ? (i.initEvent(t, r.bubbles, r.cancelable), i.detail = r.detail) : i.initEvent(t, !1, !1)), e.dispatchEvent(i);
4343
4349
  }
4344
- function Uo(e, t) {
4350
+ function Wo(e, t) {
4345
4351
  return function() {
4346
4352
  return tn(this, e, t);
4347
4353
  };
4348
4354
  }
4349
- function Bo(e, t) {
4355
+ function Go(e, t) {
4350
4356
  return function() {
4351
4357
  return tn(this, e, t.apply(this, arguments));
4352
4358
  };
4353
4359
  }
4354
- function Wo(e, t) {
4355
- return this.each((typeof t == "function" ? Bo : Uo)(e, t));
4360
+ function Ko(e, t) {
4361
+ return this.each((typeof t == "function" ? Go : Wo)(e, t));
4356
4362
  }
4357
- function* Go() {
4363
+ function* Xo() {
4358
4364
  for (var e = this._groups, t = 0, r = e.length; t < r; ++t)
4359
4365
  for (var n = e[t], i = 0, s = n.length, a; i < s; ++i)
4360
4366
  (a = n[i]) && (yield a);
4361
4367
  }
4362
- var Ko = [null];
4368
+ var qo = [null];
4363
4369
  function ge(e, t) {
4364
4370
  this._groups = e, this._parents = t;
4365
4371
  }
4366
- function Xo() {
4372
+ function Zo() {
4367
4373
  return this;
4368
4374
  }
4369
4375
  ge.prototype = {
4370
4376
  constructor: ge,
4371
- select: xa,
4372
- selectAll: wa,
4377
+ select: ga,
4378
+ selectAll: Aa,
4373
4379
  selectChild: Ma,
4374
- selectChildren: $a,
4375
- filter: Da,
4376
- data: Ea,
4377
- enter: Ca,
4378
- exit: Oa,
4379
- join: Pa,
4380
- merge: Ha,
4381
- selection: Xo,
4382
- order: Ya,
4383
- sort: ja,
4384
- call: Ba,
4385
- nodes: Wa,
4386
- node: Ga,
4387
- size: Ka,
4388
- empty: Xa,
4389
- each: qa,
4390
- attr: no,
4391
- style: oo,
4392
- property: mo,
4393
- classed: yo,
4394
- text: wo,
4395
- html: ko,
4396
- raise: Fo,
4397
- lower: _o,
4398
- append: $o,
4399
- insert: Co,
4400
- remove: Lo,
4401
- clone: Eo,
4402
- datum: Vo,
4403
- on: jo,
4404
- dispatch: Wo,
4405
- [Symbol.iterator]: Go
4380
+ selectChildren: Ca,
4381
+ filter: za,
4382
+ data: Oa,
4383
+ enter: La,
4384
+ exit: Ha,
4385
+ join: Ya,
4386
+ merge: ja,
4387
+ selection: Zo,
4388
+ order: Ua,
4389
+ sort: Ba,
4390
+ call: Ga,
4391
+ nodes: Ka,
4392
+ node: Xa,
4393
+ size: qa,
4394
+ empty: Za,
4395
+ each: Qa,
4396
+ attr: so,
4397
+ style: co,
4398
+ property: po,
4399
+ classed: bo,
4400
+ text: Ao,
4401
+ html: Fo,
4402
+ raise: _o,
4403
+ lower: Do,
4404
+ append: Co,
4405
+ insert: Lo,
4406
+ remove: Ro,
4407
+ clone: Oo,
4408
+ datum: Po,
4409
+ on: Bo,
4410
+ dispatch: Ko,
4411
+ [Symbol.iterator]: Xo
4406
4412
  };
4407
4413
  function Ae(e) {
4408
- return typeof e == "string" ? new ge([[document.querySelector(e)]], [document.documentElement]) : new ge([[e]], Ko);
4414
+ return typeof e == "string" ? new ge([[document.querySelector(e)]], [document.documentElement]) : new ge([[e]], qo);
4409
4415
  }
4410
4416
  function Wt(e, t, r) {
4411
4417
  e.prototype = t.prototype = r, r.constructor = e;
@@ -4417,7 +4423,7 @@ function rn(e, t) {
4417
4423
  }
4418
4424
  function Qe() {
4419
4425
  }
4420
- var Ke = 0.7, dt = 1 / Ke, He = "\\s*([+-]?\\d+)\\s*", Xe = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", ke = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", qo = /^#([0-9a-f]{3,8})$/, Zo = new RegExp(`^rgb\\(${He},${He},${He}\\)$`), Qo = new RegExp(`^rgb\\(${ke},${ke},${ke}\\)$`), Jo = new RegExp(`^rgba\\(${He},${He},${He},${Xe}\\)$`), el = new RegExp(`^rgba\\(${ke},${ke},${ke},${Xe}\\)$`), tl = new RegExp(`^hsl\\(${Xe},${ke},${ke}\\)$`), rl = new RegExp(`^hsla\\(${Xe},${ke},${ke},${Xe}\\)$`), hr = {
4426
+ var Ke = 0.7, dt = 1 / Ke, He = "\\s*([+-]?\\d+)\\s*", Xe = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", ke = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Qo = /^#([0-9a-f]{3,8})$/, Jo = new RegExp(`^rgb\\(${He},${He},${He}\\)$`), el = new RegExp(`^rgb\\(${ke},${ke},${ke}\\)$`), tl = new RegExp(`^rgba\\(${He},${He},${He},${Xe}\\)$`), rl = new RegExp(`^rgba\\(${ke},${ke},${ke},${Xe}\\)$`), nl = new RegExp(`^hsl\\(${Xe},${ke},${ke}\\)$`), il = new RegExp(`^hsla\\(${Xe},${ke},${ke},${Xe}\\)$`), hr = {
4421
4427
  aliceblue: 15792383,
4422
4428
  antiquewhite: 16444375,
4423
4429
  aqua: 65535,
@@ -4577,18 +4583,18 @@ Wt(Qe, qe, {
4577
4583
  hex: pr,
4578
4584
  // Deprecated! Use color.formatHex.
4579
4585
  formatHex: pr,
4580
- formatHex8: nl,
4581
- formatHsl: il,
4586
+ formatHex8: sl,
4587
+ formatHsl: al,
4582
4588
  formatRgb: xr,
4583
4589
  toString: xr
4584
4590
  });
4585
4591
  function pr() {
4586
4592
  return this.rgb().formatHex();
4587
4593
  }
4588
- function nl() {
4594
+ function sl() {
4589
4595
  return this.rgb().formatHex8();
4590
4596
  }
4591
- function il() {
4597
+ function al() {
4592
4598
  return nn(this).formatHsl();
4593
4599
  }
4594
4600
  function xr() {
@@ -4596,7 +4602,7 @@ function xr() {
4596
4602
  }
4597
4603
  function qe(e) {
4598
4604
  var t, r;
4599
- return e = (e + "").trim().toLowerCase(), (t = qo.exec(e)) ? (r = t[1].length, t = parseInt(t[1], 16), r === 6 ? yr(t) : r === 3 ? new he(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : r === 8 ? et(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : r === 4 ? et(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Zo.exec(e)) ? new he(t[1], t[2], t[3], 1) : (t = Qo.exec(e)) ? new he(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Jo.exec(e)) ? et(t[1], t[2], t[3], t[4]) : (t = el.exec(e)) ? et(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = tl.exec(e)) ? vr(t[1], t[2] / 100, t[3] / 100, 1) : (t = rl.exec(e)) ? vr(t[1], t[2] / 100, t[3] / 100, t[4]) : hr.hasOwnProperty(e) ? yr(hr[e]) : e === "transparent" ? new he(NaN, NaN, NaN, 0) : null;
4605
+ return e = (e + "").trim().toLowerCase(), (t = Qo.exec(e)) ? (r = t[1].length, t = parseInt(t[1], 16), r === 6 ? yr(t) : r === 3 ? new he(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : r === 8 ? et(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : r === 4 ? et(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Jo.exec(e)) ? new he(t[1], t[2], t[3], 1) : (t = el.exec(e)) ? new he(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = tl.exec(e)) ? et(t[1], t[2], t[3], t[4]) : (t = rl.exec(e)) ? et(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = nl.exec(e)) ? vr(t[1], t[2] / 100, t[3] / 100, 1) : (t = il.exec(e)) ? vr(t[1], t[2] / 100, t[3] / 100, t[4]) : hr.hasOwnProperty(e) ? yr(hr[e]) : e === "transparent" ? new he(NaN, NaN, NaN, 0) : null;
4600
4606
  }
4601
4607
  function yr(e) {
4602
4608
  return new he(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
@@ -4604,11 +4610,11 @@ function yr(e) {
4604
4610
  function et(e, t, r, n) {
4605
4611
  return n <= 0 && (e = t = r = NaN), new he(e, t, r, n);
4606
4612
  }
4607
- function sl(e) {
4613
+ function ol(e) {
4608
4614
  return e instanceof Qe || (e = qe(e)), e ? (e = e.rgb(), new he(e.r, e.g, e.b, e.opacity)) : new he();
4609
4615
  }
4610
4616
  function Lt(e, t, r, n) {
4611
- return arguments.length === 1 ? sl(e) : new he(e, t, r, n ?? 1);
4617
+ return arguments.length === 1 ? ol(e) : new he(e, t, r, n ?? 1);
4612
4618
  }
4613
4619
  function he(e, t, r, n) {
4614
4620
  this.r = +e, this.g = +t, this.b = +r, this.opacity = +n;
@@ -4624,7 +4630,7 @@ Wt(he, Lt, rn(Qe, {
4624
4630
  return this;
4625
4631
  },
4626
4632
  clamp() {
4627
- return new he(Ie(this.r), Ie(this.g), Ie(this.b), ut(this.opacity));
4633
+ return new he(Re(this.r), Re(this.g), Re(this.b), ut(this.opacity));
4628
4634
  },
4629
4635
  displayable() {
4630
4636
  return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
@@ -4632,28 +4638,28 @@ Wt(he, Lt, rn(Qe, {
4632
4638
  hex: gr,
4633
4639
  // Deprecated! Use color.formatHex.
4634
4640
  formatHex: gr,
4635
- formatHex8: al,
4641
+ formatHex8: ll,
4636
4642
  formatRgb: br,
4637
4643
  toString: br
4638
4644
  }));
4639
4645
  function gr() {
4640
4646
  return `#${ze(this.r)}${ze(this.g)}${ze(this.b)}`;
4641
4647
  }
4642
- function al() {
4648
+ function ll() {
4643
4649
  return `#${ze(this.r)}${ze(this.g)}${ze(this.b)}${ze((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
4644
4650
  }
4645
4651
  function br() {
4646
4652
  const e = ut(this.opacity);
4647
- return `${e === 1 ? "rgb(" : "rgba("}${Ie(this.r)}, ${Ie(this.g)}, ${Ie(this.b)}${e === 1 ? ")" : `, ${e})`}`;
4653
+ return `${e === 1 ? "rgb(" : "rgba("}${Re(this.r)}, ${Re(this.g)}, ${Re(this.b)}${e === 1 ? ")" : `, ${e})`}`;
4648
4654
  }
4649
4655
  function ut(e) {
4650
4656
  return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
4651
4657
  }
4652
- function Ie(e) {
4658
+ function Re(e) {
4653
4659
  return Math.max(0, Math.min(255, Math.round(e) || 0));
4654
4660
  }
4655
4661
  function ze(e) {
4656
- return e = Ie(e), (e < 16 ? "0" : "") + e.toString(16);
4662
+ return e = Re(e), (e < 16 ? "0" : "") + e.toString(16);
4657
4663
  }
4658
4664
  function vr(e, t, r, n) {
4659
4665
  return n <= 0 ? e = t = r = NaN : r <= 0 || r >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new be(e, t, r, n);
@@ -4666,13 +4672,13 @@ function nn(e) {
4666
4672
  var t = e.r / 255, r = e.g / 255, n = e.b / 255, i = Math.min(t, r, n), s = Math.max(t, r, n), a = NaN, l = s - i, d = (s + i) / 2;
4667
4673
  return l ? (t === s ? a = (r - n) / l + (r < n) * 6 : r === s ? a = (n - t) / l + 2 : a = (t - r) / l + 4, l /= d < 0.5 ? s + i : 2 - s - i, a *= 60) : l = d > 0 && d < 1 ? 0 : a, new be(a, l, d, e.opacity);
4668
4674
  }
4669
- function ol(e, t, r, n) {
4675
+ function cl(e, t, r, n) {
4670
4676
  return arguments.length === 1 ? nn(e) : new be(e, t, r, n ?? 1);
4671
4677
  }
4672
4678
  function be(e, t, r, n) {
4673
4679
  this.h = +e, this.s = +t, this.l = +r, this.opacity = +n;
4674
4680
  }
4675
- Wt(be, ol, rn(Qe, {
4681
+ Wt(be, cl, rn(Qe, {
4676
4682
  brighter(e) {
4677
4683
  return e = e == null ? dt : Math.pow(dt, e), new be(this.h, this.s, this.l * e, this.opacity);
4678
4684
  },
@@ -4682,9 +4688,9 @@ Wt(be, ol, rn(Qe, {
4682
4688
  rgb() {
4683
4689
  var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, r = this.l, n = r + (r < 0.5 ? r : 1 - r) * t, i = 2 * r - n;
4684
4690
  return new he(
4685
- Tt(e >= 240 ? e - 240 : e + 120, i, n),
4686
- Tt(e, i, n),
4687
- Tt(e < 120 ? e + 240 : e - 120, i, n),
4691
+ Mt(e >= 240 ? e - 240 : e + 120, i, n),
4692
+ Mt(e, i, n),
4693
+ Mt(e < 120 ? e + 240 : e - 120, i, n),
4688
4694
  this.opacity
4689
4695
  );
4690
4696
  },
@@ -4705,31 +4711,31 @@ function wr(e) {
4705
4711
  function tt(e) {
4706
4712
  return Math.max(0, Math.min(1, e || 0));
4707
4713
  }
4708
- function Tt(e, t, r) {
4714
+ function Mt(e, t, r) {
4709
4715
  return (e < 60 ? t + (r - t) * e / 60 : e < 180 ? r : e < 240 ? t + (r - t) * (240 - e) / 60 : t) * 255;
4710
4716
  }
4711
4717
  const Gt = (e) => () => e;
4712
- function ll(e, t) {
4718
+ function dl(e, t) {
4713
4719
  return function(r) {
4714
4720
  return e + r * t;
4715
4721
  };
4716
4722
  }
4717
- function cl(e, t, r) {
4723
+ function ul(e, t, r) {
4718
4724
  return e = Math.pow(e, r), t = Math.pow(t, r) - e, r = 1 / r, function(n) {
4719
4725
  return Math.pow(e + n * t, r);
4720
4726
  };
4721
4727
  }
4722
- function dl(e) {
4728
+ function fl(e) {
4723
4729
  return (e = +e) == 1 ? sn : function(t, r) {
4724
- return r - t ? cl(t, r, e) : Gt(isNaN(t) ? r : t);
4730
+ return r - t ? ul(t, r, e) : Gt(isNaN(t) ? r : t);
4725
4731
  };
4726
4732
  }
4727
4733
  function sn(e, t) {
4728
4734
  var r = t - e;
4729
- return r ? ll(e, r) : Gt(isNaN(e) ? t : e);
4735
+ return r ? dl(e, r) : Gt(isNaN(e) ? t : e);
4730
4736
  }
4731
4737
  const Nr = (function e(t) {
4732
- var r = dl(t);
4738
+ var r = fl(t);
4733
4739
  function n(i, s) {
4734
4740
  var a = r((i = Lt(i)).r, (s = Lt(s)).r), l = r(i.g, s.g), d = r(i.b, s.b), c = sn(i.opacity, s.opacity);
4735
4741
  return function(u) {
@@ -4738,7 +4744,7 @@ const Nr = (function e(t) {
4738
4744
  }
4739
4745
  return n.gamma = e, n;
4740
4746
  })(1);
4741
- function ul(e, t) {
4747
+ function ml(e, t) {
4742
4748
  t || (t = []);
4743
4749
  var r = e ? Math.min(t.length, e.length) : 0, n = t.slice(), i;
4744
4750
  return function(s) {
@@ -4746,10 +4752,10 @@ function ul(e, t) {
4746
4752
  return n;
4747
4753
  };
4748
4754
  }
4749
- function fl(e) {
4755
+ function hl(e) {
4750
4756
  return ArrayBuffer.isView(e) && !(e instanceof DataView);
4751
4757
  }
4752
- function ml(e, t) {
4758
+ function pl(e, t) {
4753
4759
  var r = t ? t.length : 0, n = e ? Math.min(r, e.length) : 0, i = new Array(n), s = new Array(r), a;
4754
4760
  for (a = 0; a < n; ++a) i[a] = Kt(e[a], t[a]);
4755
4761
  for (; a < r; ++a) s[a] = t[a];
@@ -4758,7 +4764,7 @@ function ml(e, t) {
4758
4764
  return s;
4759
4765
  };
4760
4766
  }
4761
- function hl(e, t) {
4767
+ function xl(e, t) {
4762
4768
  var r = /* @__PURE__ */ new Date();
4763
4769
  return e = +e, t = +t, function(n) {
4764
4770
  return r.setTime(e * (1 - n) + t * n), r;
@@ -4769,7 +4775,7 @@ function ft(e, t) {
4769
4775
  return e * (1 - r) + t * r;
4770
4776
  };
4771
4777
  }
4772
- function pl(e, t) {
4778
+ function yl(e, t) {
4773
4779
  var r = {}, n = {}, i;
4774
4780
  (e === null || typeof e != "object") && (e = {}), (t === null || typeof t != "object") && (t = {});
4775
4781
  for (i in t)
@@ -4779,36 +4785,36 @@ function pl(e, t) {
4779
4785
  return n;
4780
4786
  };
4781
4787
  }
4782
- var Rt = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, _t = new RegExp(Rt.source, "g");
4783
- function xl(e) {
4788
+ var Et = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, _t = new RegExp(Et.source, "g");
4789
+ function gl(e) {
4784
4790
  return function() {
4785
4791
  return e;
4786
4792
  };
4787
4793
  }
4788
- function yl(e) {
4794
+ function bl(e) {
4789
4795
  return function(t) {
4790
4796
  return e(t) + "";
4791
4797
  };
4792
4798
  }
4793
- function gl(e, t) {
4794
- var r = Rt.lastIndex = _t.lastIndex = 0, n, i, s, a = -1, l = [], d = [];
4795
- for (e = e + "", t = t + ""; (n = Rt.exec(e)) && (i = _t.exec(t)); )
4799
+ function vl(e, t) {
4800
+ var r = Et.lastIndex = _t.lastIndex = 0, n, i, s, a = -1, l = [], d = [];
4801
+ for (e = e + "", t = t + ""; (n = Et.exec(e)) && (i = _t.exec(t)); )
4796
4802
  (s = i.index) > r && (s = t.slice(r, s), l[a] ? l[a] += s : l[++a] = s), (n = n[0]) === (i = i[0]) ? l[a] ? l[a] += i : l[++a] = i : (l[++a] = null, d.push({ i: a, x: ft(n, i) })), r = _t.lastIndex;
4797
- return r < t.length && (s = t.slice(r), l[a] ? l[a] += s : l[++a] = s), l.length < 2 ? d[0] ? yl(d[0].x) : xl(t) : (t = d.length, function(c) {
4803
+ return r < t.length && (s = t.slice(r), l[a] ? l[a] += s : l[++a] = s), l.length < 2 ? d[0] ? bl(d[0].x) : gl(t) : (t = d.length, function(c) {
4798
4804
  for (var u = 0, m; u < t; ++u) l[(m = d[u]).i] = m.x(c);
4799
4805
  return l.join("");
4800
4806
  });
4801
4807
  }
4802
4808
  function Kt(e, t) {
4803
4809
  var r = typeof t, n;
4804
- return t == null || r === "boolean" ? Gt(t) : (r === "number" ? ft : r === "string" ? (n = qe(t)) ? (t = n, Nr) : gl : t instanceof qe ? Nr : t instanceof Date ? hl : fl(t) ? ul : Array.isArray(t) ? ml : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? pl : ft)(e, t);
4810
+ return t == null || r === "boolean" ? Gt(t) : (r === "number" ? ft : r === "string" ? (n = qe(t)) ? (t = n, Nr) : vl : t instanceof qe ? Nr : t instanceof Date ? xl : hl(t) ? ml : Array.isArray(t) ? pl : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? yl : ft)(e, t);
4805
4811
  }
4806
- function bl(e, t) {
4812
+ function wl(e, t) {
4807
4813
  return e = +e, t = +t, function(r) {
4808
4814
  return Math.round(e * (1 - r) + t * r);
4809
4815
  };
4810
4816
  }
4811
- function vl(e) {
4817
+ function Nl(e) {
4812
4818
  return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
4813
4819
  }
4814
4820
  function mt(e, t) {
@@ -4822,23 +4828,23 @@ function mt(e, t) {
4822
4828
  function Ue(e) {
4823
4829
  return e = mt(Math.abs(e)), e ? e[1] : NaN;
4824
4830
  }
4825
- function wl(e, t) {
4831
+ function Al(e, t) {
4826
4832
  return function(r, n) {
4827
4833
  for (var i = r.length, s = [], a = 0, l = e[0], d = 0; i > 0 && l > 0 && (d + l + 1 > n && (l = Math.max(1, n - d)), s.push(r.substring(i -= l, i + l)), !((d += l + 1) > n)); )
4828
4834
  l = e[a = (a + 1) % e.length];
4829
4835
  return s.reverse().join(t);
4830
4836
  };
4831
4837
  }
4832
- function Nl(e) {
4838
+ function Sl(e) {
4833
4839
  return function(t) {
4834
4840
  return t.replace(/[0-9]/g, function(r) {
4835
4841
  return e[+r];
4836
4842
  });
4837
4843
  };
4838
4844
  }
4839
- var Al = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
4845
+ var kl = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
4840
4846
  function ht(e) {
4841
- if (!(t = Al.exec(e))) throw new Error("invalid format: " + e);
4847
+ if (!(t = kl.exec(e))) throw new Error("invalid format: " + e);
4842
4848
  var t;
4843
4849
  return new Xt({
4844
4850
  fill: t[1],
@@ -4860,7 +4866,7 @@ function Xt(e) {
4860
4866
  Xt.prototype.toString = function() {
4861
4867
  return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
4862
4868
  };
4863
- function Sl(e) {
4869
+ function Tl(e) {
4864
4870
  e: for (var t = e.length, r = 1, n = -1, i; r < t; ++r)
4865
4871
  switch (e[r]) {
4866
4872
  case ".":
@@ -4877,7 +4883,7 @@ function Sl(e) {
4877
4883
  return n > 0 ? e.slice(0, n) + e.slice(i + 1) : e;
4878
4884
  }
4879
4885
  var an;
4880
- function kl(e, t) {
4886
+ function Fl(e, t) {
4881
4887
  var r = mt(e, t);
4882
4888
  if (!r) return e + "";
4883
4889
  var n = r[0], i = r[1], s = i - (an = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, a = n.length;
@@ -4893,28 +4899,28 @@ const Sr = {
4893
4899
  "%": (e, t) => (e * 100).toFixed(t),
4894
4900
  b: (e) => Math.round(e).toString(2),
4895
4901
  c: (e) => e + "",
4896
- d: vl,
4902
+ d: Nl,
4897
4903
  e: (e, t) => e.toExponential(t),
4898
4904
  f: (e, t) => e.toFixed(t),
4899
4905
  g: (e, t) => e.toPrecision(t),
4900
4906
  o: (e) => Math.round(e).toString(8),
4901
4907
  p: (e, t) => Ar(e * 100, t),
4902
4908
  r: Ar,
4903
- s: kl,
4909
+ s: Fl,
4904
4910
  X: (e) => Math.round(e).toString(16).toUpperCase(),
4905
4911
  x: (e) => Math.round(e).toString(16)
4906
4912
  };
4907
4913
  function kr(e) {
4908
4914
  return e;
4909
4915
  }
4910
- var Mr = Array.prototype.map, Fr = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
4916
+ var Tr = Array.prototype.map, Fr = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
4911
4917
  function Ml(e) {
4912
- var t = e.grouping === void 0 || e.thousands === void 0 ? kr : wl(Mr.call(e.grouping, Number), e.thousands + ""), r = e.currency === void 0 ? "" : e.currency[0] + "", n = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", s = e.numerals === void 0 ? kr : Nl(Mr.call(e.numerals, String)), a = e.percent === void 0 ? "%" : e.percent + "", l = e.minus === void 0 ? "−" : e.minus + "", d = e.nan === void 0 ? "NaN" : e.nan + "";
4918
+ var t = e.grouping === void 0 || e.thousands === void 0 ? kr : Al(Tr.call(e.grouping, Number), e.thousands + ""), r = e.currency === void 0 ? "" : e.currency[0] + "", n = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", s = e.numerals === void 0 ? kr : Sl(Tr.call(e.numerals, String)), a = e.percent === void 0 ? "%" : e.percent + "", l = e.minus === void 0 ? "−" : e.minus + "", d = e.nan === void 0 ? "NaN" : e.nan + "";
4913
4919
  function c(m) {
4914
4920
  m = ht(m);
4915
4921
  var h = m.fill, f = m.align, w = m.sign, N = m.symbol, A = m.zero, p = m.width, v = m.comma, S = m.precision, g = m.trim, b = m.type;
4916
4922
  b === "n" ? (v = !0, b = "g") : Sr[b] || (S === void 0 && (S = 12), g = !0, b = "g"), (A || h === "0" && f === "=") && (A = !0, h = "0", f = "=");
4917
- var C = N === "$" ? r : N === "#" && /[boxX]/.test(b) ? "0" + b.toLowerCase() : "", _ = N === "$" ? n : /[%p]/.test(b) ? a : "", $ = Sr[b], M = /[defgprs%]/.test(b);
4923
+ var C = N === "$" ? r : N === "#" && /[boxX]/.test(b) ? "0" + b.toLowerCase() : "", _ = N === "$" ? n : /[%p]/.test(b) ? a : "", $ = Sr[b], T = /[defgprs%]/.test(b);
4918
4924
  S = S === void 0 ? 6 : /[gprs]/.test(b) ? Math.max(1, Math.min(21, S)) : Math.max(0, Math.min(20, S));
4919
4925
  function y(x) {
4920
4926
  var z = C, D = _, V, P, Y;
@@ -4923,7 +4929,7 @@ function Ml(e) {
4923
4929
  else {
4924
4930
  x = +x;
4925
4931
  var X = x < 0 || 1 / x < 0;
4926
- if (x = isNaN(x) ? d : $(Math.abs(x), S), g && (x = Sl(x)), X && +x == 0 && w !== "+" && (X = !1), z = (X ? w === "(" ? w : l : w === "-" || w === "(" ? "" : w) + z, D = (b === "s" ? Fr[8 + an / 3] : "") + D + (X && w === "(" ? ")" : ""), M) {
4932
+ if (x = isNaN(x) ? d : $(Math.abs(x), S), g && (x = Tl(x)), X && +x == 0 && w !== "+" && (X = !1), z = (X ? w === "(" ? w : l : w === "-" || w === "(" ? "" : w) + z, D = (b === "s" ? Fr[8 + an / 3] : "") + D + (X && w === "(" ? ")" : ""), T) {
4927
4933
  for (V = -1, P = x.length; ++V < P; )
4928
4934
  if (Y = x.charCodeAt(V), 48 > Y || Y > 57) {
4929
4935
  D = (Y === 46 ? i + x.slice(V + 1) : x.slice(V)) + D, x = x.slice(0, V);
@@ -4965,21 +4971,21 @@ function Ml(e) {
4965
4971
  };
4966
4972
  }
4967
4973
  var rt, on, ln;
4968
- Fl({
4974
+ _l({
4969
4975
  thousands: ",",
4970
4976
  grouping: [3],
4971
4977
  currency: ["$", ""]
4972
4978
  });
4973
- function Fl(e) {
4979
+ function _l(e) {
4974
4980
  return rt = Ml(e), on = rt.format, ln = rt.formatPrefix, rt;
4975
4981
  }
4976
- function Tl(e) {
4982
+ function $l(e) {
4977
4983
  return Math.max(0, -Ue(Math.abs(e)));
4978
4984
  }
4979
- function _l(e, t) {
4985
+ function Dl(e, t) {
4980
4986
  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Ue(t) / 3))) * 3 - Ue(Math.abs(e)));
4981
4987
  }
4982
- function $l(e, t) {
4988
+ function Cl(e, t) {
4983
4989
  return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, Ue(t) - Ue(e)) + 1;
4984
4990
  }
4985
4991
  function Nt(e, t) {
@@ -4995,13 +5001,13 @@ function Nt(e, t) {
4995
5001
  }
4996
5002
  return this;
4997
5003
  }
4998
- const Tr = /* @__PURE__ */ Symbol("implicit");
5004
+ const Mr = /* @__PURE__ */ Symbol("implicit");
4999
5005
  function pt() {
5000
- var e = new or(), t = [], r = [], n = Tr;
5006
+ var e = new or(), t = [], r = [], n = Mr;
5001
5007
  function i(s) {
5002
5008
  let a = e.get(s);
5003
5009
  if (a === void 0) {
5004
- if (n !== Tr) return n;
5010
+ if (n !== Mr) return n;
5005
5011
  e.set(s, a = t.push(s) - 1);
5006
5012
  }
5007
5013
  return r[a % r.length];
@@ -5020,39 +5026,39 @@ function pt() {
5020
5026
  return pt(t, r).unknown(n);
5021
5027
  }, Nt.apply(i, arguments), i;
5022
5028
  }
5023
- function Dl(e) {
5029
+ function zl(e) {
5024
5030
  return function() {
5025
5031
  return e;
5026
5032
  };
5027
5033
  }
5028
- function Cl(e) {
5034
+ function Ll(e) {
5029
5035
  return +e;
5030
5036
  }
5031
5037
  var _r = [0, 1];
5032
5038
  function Se(e) {
5033
5039
  return e;
5034
5040
  }
5035
- function It(e, t) {
5041
+ function Rt(e, t) {
5036
5042
  return (t -= e = +e) ? function(r) {
5037
5043
  return (r - e) / t;
5038
- } : Dl(isNaN(t) ? NaN : 0.5);
5044
+ } : zl(isNaN(t) ? NaN : 0.5);
5039
5045
  }
5040
- function zl(e, t) {
5046
+ function El(e, t) {
5041
5047
  var r;
5042
5048
  return e > t && (r = e, e = t, t = r), function(n) {
5043
5049
  return Math.max(e, Math.min(t, n));
5044
5050
  };
5045
5051
  }
5046
- function Ll(e, t, r) {
5052
+ function Rl(e, t, r) {
5047
5053
  var n = e[0], i = e[1], s = t[0], a = t[1];
5048
- return i < n ? (n = It(i, n), s = r(a, s)) : (n = It(n, i), s = r(s, a)), function(l) {
5054
+ return i < n ? (n = Rt(i, n), s = r(a, s)) : (n = Rt(n, i), s = r(s, a)), function(l) {
5049
5055
  return s(n(l));
5050
5056
  };
5051
5057
  }
5052
- function Rl(e, t, r) {
5058
+ function Il(e, t, r) {
5053
5059
  var n = Math.min(e.length, t.length) - 1, i = new Array(n), s = new Array(n), a = -1;
5054
5060
  for (e[n] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++a < n; )
5055
- i[a] = It(e[a], e[a + 1]), s[a] = r(t[a], t[a + 1]);
5061
+ i[a] = Rt(e[a], e[a + 1]), s[a] = r(t[a], t[a + 1]);
5056
5062
  return function(l) {
5057
5063
  var d = jr(e, l, 1, n) - 1;
5058
5064
  return s[d](i[d](l));
@@ -5065,7 +5071,7 @@ function dn() {
5065
5071
  var e = _r, t = _r, r = Kt, n, i, s, a = Se, l, d, c;
5066
5072
  function u() {
5067
5073
  var h = Math.min(e.length, t.length);
5068
- return a !== Se && (a = zl(e[0], e[h - 1])), l = h > 2 ? Rl : Ll, d = c = null, m;
5074
+ return a !== Se && (a = El(e[0], e[h - 1])), l = h > 2 ? Il : Rl, d = c = null, m;
5069
5075
  }
5070
5076
  function m(h) {
5071
5077
  return h == null || isNaN(h = +h) ? s : (d || (d = l(e.map(n), t, r)))(n(a(h)));
@@ -5073,11 +5079,11 @@ function dn() {
5073
5079
  return m.invert = function(h) {
5074
5080
  return a(i((c || (c = l(t, e.map(n), ft)))(h)));
5075
5081
  }, m.domain = function(h) {
5076
- return arguments.length ? (e = Array.from(h, Cl), u()) : e.slice();
5082
+ return arguments.length ? (e = Array.from(h, Ll), u()) : e.slice();
5077
5083
  }, m.range = function(h) {
5078
5084
  return arguments.length ? (t = Array.from(h), u()) : t.slice();
5079
5085
  }, m.rangeRound = function(h) {
5080
- return t = Array.from(h), r = bl, u();
5086
+ return t = Array.from(h), r = wl, u();
5081
5087
  }, m.clamp = function(h) {
5082
5088
  return arguments.length ? (a = h ? !0 : Se, u()) : a !== Se;
5083
5089
  }, m.interpolate = function(h) {
@@ -5088,27 +5094,27 @@ function dn() {
5088
5094
  return n = h, i = f, u();
5089
5095
  };
5090
5096
  }
5091
- function Il() {
5097
+ function Vl() {
5092
5098
  return dn()(Se, Se);
5093
5099
  }
5094
- function El(e, t, r, n) {
5095
- var i = aa(e, t, r), s;
5100
+ function Ol(e, t, r, n) {
5101
+ var i = la(e, t, r), s;
5096
5102
  switch (n = ht(n ?? ",f"), n.type) {
5097
5103
  case "s": {
5098
5104
  var a = Math.max(Math.abs(e), Math.abs(t));
5099
- return n.precision == null && !isNaN(s = _l(i, a)) && (n.precision = s), ln(n, a);
5105
+ return n.precision == null && !isNaN(s = Dl(i, a)) && (n.precision = s), ln(n, a);
5100
5106
  }
5101
5107
  case "":
5102
5108
  case "e":
5103
5109
  case "g":
5104
5110
  case "p":
5105
5111
  case "r": {
5106
- n.precision == null && !isNaN(s = $l(i, Math.max(Math.abs(e), Math.abs(t)))) && (n.precision = s - (n.type === "e"));
5112
+ n.precision == null && !isNaN(s = Cl(i, Math.max(Math.abs(e), Math.abs(t)))) && (n.precision = s - (n.type === "e"));
5107
5113
  break;
5108
5114
  }
5109
5115
  case "f":
5110
5116
  case "%": {
5111
- n.precision == null && !isNaN(s = Tl(i)) && (n.precision = s - (n.type === "%") * 2);
5117
+ n.precision == null && !isNaN(s = $l(i)) && (n.precision = s - (n.type === "%") * 2);
5112
5118
  break;
5113
5119
  }
5114
5120
  }
@@ -5118,10 +5124,10 @@ function qt(e) {
5118
5124
  var t = e.domain;
5119
5125
  return e.ticks = function(r) {
5120
5126
  var n = t();
5121
- return sa(n[0], n[n.length - 1], r ?? 10);
5127
+ return oa(n[0], n[n.length - 1], r ?? 10);
5122
5128
  }, e.tickFormat = function(r, n) {
5123
5129
  var i = t();
5124
- return El(i[0], i[i.length - 1], r ?? 10, n);
5130
+ return Ol(i[0], i[i.length - 1], r ?? 10, n);
5125
5131
  }, e.nice = function(r) {
5126
5132
  r == null && (r = 10);
5127
5133
  var n = t(), i = 0, s = n.length - 1, a = n[i], l = n[s], d, c, u = 10;
@@ -5139,10 +5145,10 @@ function qt(e) {
5139
5145
  return e;
5140
5146
  }, e;
5141
5147
  }
5142
- function Et() {
5143
- var e = Il();
5148
+ function It() {
5149
+ var e = Vl();
5144
5150
  return e.copy = function() {
5145
- return cn(e, Et());
5151
+ return cn(e, It());
5146
5152
  }, Nt.apply(e, arguments), qt(e);
5147
5153
  }
5148
5154
  function $r(e) {
@@ -5150,28 +5156,28 @@ function $r(e) {
5150
5156
  return t < 0 ? -Math.pow(-t, e) : Math.pow(t, e);
5151
5157
  };
5152
5158
  }
5153
- function Vl(e) {
5159
+ function Pl(e) {
5154
5160
  return e < 0 ? -Math.sqrt(-e) : Math.sqrt(e);
5155
5161
  }
5156
- function Ol(e) {
5162
+ function Hl(e) {
5157
5163
  return e < 0 ? -e * e : e * e;
5158
5164
  }
5159
- function Pl(e) {
5165
+ function Yl(e) {
5160
5166
  var t = e(Se, Se), r = 1;
5161
5167
  function n() {
5162
- return r === 1 ? e(Se, Se) : r === 0.5 ? e(Vl, Ol) : e($r(r), $r(1 / r));
5168
+ return r === 1 ? e(Se, Se) : r === 0.5 ? e(Pl, Hl) : e($r(r), $r(1 / r));
5163
5169
  }
5164
5170
  return t.exponent = function(i) {
5165
5171
  return arguments.length ? (r = +i, n()) : r;
5166
5172
  }, qt(t);
5167
5173
  }
5168
5174
  function un() {
5169
- var e = Pl(dn());
5175
+ var e = Yl(dn());
5170
5176
  return e.copy = function() {
5171
5177
  return cn(e, un()).exponent(e.exponent());
5172
5178
  }, Nt.apply(e, arguments), e;
5173
5179
  }
5174
- function Hl() {
5180
+ function jl() {
5175
5181
  return un.apply(null, arguments).exponent(0.5);
5176
5182
  }
5177
5183
  function At() {
@@ -5199,7 +5205,7 @@ function At() {
5199
5205
  return At().domain([e, t]).range(i).unknown(s);
5200
5206
  }, Nt.apply(qt(a), arguments);
5201
5207
  }
5202
- const Yl = de.memo(function({
5208
+ const Ul = de.memo(function({
5203
5209
  data: t,
5204
5210
  chartConfig: r,
5205
5211
  displayConfig: n = {},
@@ -5226,11 +5232,11 @@ const Yl = de.memo(function({
5226
5232
  const C = pe(i, g);
5227
5233
  if (f) {
5228
5234
  const _ = t.map(($) => {
5229
- const M = $[f];
5230
- return typeof M == "string" ? parseFloat(M) : M;
5235
+ const T = $[f];
5236
+ return typeof T == "string" ? parseFloat(T) : T;
5231
5237
  }).filter(($) => !isNaN($));
5232
5238
  if (h = _.length === t.length && _.every(($) => typeof $ == "number"), h) {
5233
- const $ = Math.min(..._), M = Math.max(..._), y = At().domain([$, M]).range(Ce);
5239
+ const $ = Math.min(..._), T = Math.max(..._), y = At().domain([$, T]).range(Ce);
5234
5240
  m = t.map((x) => {
5235
5241
  const z = typeof x[f] == "string" ? parseFloat(x[f]) : x[f], D = y(z);
5236
5242
  return {
@@ -5241,11 +5247,11 @@ const Yl = de.memo(function({
5241
5247
  };
5242
5248
  });
5243
5249
  } else {
5244
- const $ = [...new Set(t.map((y) => String(y[f])))], M = pt().domain($).range(a?.colors || G);
5250
+ const $ = [...new Set(t.map((y) => String(y[f])))], T = pt().domain($).range(a?.colors || G);
5245
5251
  m = t.map((y) => ({
5246
5252
  name: ee(y[g], C) || String(y[g]) || "Unknown",
5247
5253
  size: typeof y[b] == "string" ? parseFloat(y[b]) : y[b] || 0,
5248
- fill: M(String(y[f])),
5254
+ fill: T(String(y[f])),
5249
5255
  series: String(y[f])
5250
5256
  }));
5251
5257
  }
@@ -5266,12 +5272,12 @@ const Yl = de.memo(function({
5266
5272
  /* @__PURE__ */ o("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
5267
5273
  /* @__PURE__ */ o("div", { className: "text-xs", children: "No numeric field found for treemap chart size" })
5268
5274
  ] }) });
5269
- m = t.map(($, M) => {
5275
+ m = t.map(($, T) => {
5270
5276
  let y = $[C];
5271
5277
  return typeof y == "boolean" ? y = y ? "Active" : "Inactive" : y === "true" || y === "false" ? y = y === "true" ? "Active" : "Inactive" : y = String(y), {
5272
5278
  name: y,
5273
5279
  size: typeof $[_] == "string" ? parseFloat($[_]) : $[_] || 0,
5274
- fill: a?.colors && a.colors[M % a.colors.length] || G[M % G.length]
5280
+ fill: a?.colors && a.colors[T % a.colors.length] || G[T % G.length]
5275
5281
  };
5276
5282
  });
5277
5283
  }
@@ -5281,7 +5287,7 @@ const Yl = de.memo(function({
5281
5287
  /* @__PURE__ */ o("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for treemap chart after transformation" })
5282
5288
  ] }) });
5283
5289
  const w = (g) => {
5284
- const { x: b, y: C, width: _, height: $, index: M, name: y, size: x } = g;
5290
+ const { x: b, y: C, width: _, height: $, index: T, name: y, size: x } = g;
5285
5291
  return _ < 20 || $ < 20 ? null : /* @__PURE__ */ k("g", { children: [
5286
5292
  /* @__PURE__ */ o(
5287
5293
  "rect",
@@ -5291,13 +5297,13 @@ const Yl = de.memo(function({
5291
5297
  width: _,
5292
5298
  height: $,
5293
5299
  style: {
5294
- fill: m[M]?.fill || a?.colors && a.colors[M % a.colors.length] || G[M % G.length],
5295
- fillOpacity: l !== null ? l === M ? 1 : 0.6 : 0.8,
5300
+ fill: m[T]?.fill || a?.colors && a.colors[T % a.colors.length] || G[T % G.length],
5301
+ fillOpacity: l !== null ? l === T ? 1 : 0.6 : 0.8,
5296
5302
  stroke: "#fff",
5297
5303
  strokeWidth: 2,
5298
5304
  cursor: "pointer"
5299
5305
  },
5300
- onMouseEnter: () => d(M),
5306
+ onMouseEnter: () => d(T),
5301
5307
  onMouseLeave: () => d(null)
5302
5308
  }
5303
5309
  ),
@@ -5371,9 +5377,9 @@ const Yl = de.memo(function({
5371
5377
  return typeof _ == "string" ? parseFloat(_) : _;
5372
5378
  }));
5373
5379
  p = Ce.map((C, _) => {
5374
- const $ = _ / (Ce.length - 1), M = g + (b - g) * $;
5380
+ const $ = _ / (Ce.length - 1), T = g + (b - g) * $;
5375
5381
  return {
5376
- value: u.leftYAxisFormat ? W(M, u.leftYAxisFormat) : M.toFixed(2),
5382
+ value: u.leftYAxisFormat ? W(T, u.leftYAxisFormat) : T.toFixed(2),
5377
5383
  type: "rect",
5378
5384
  color: C
5379
5385
  };
@@ -5453,10 +5459,10 @@ const Yl = de.memo(function({
5453
5459
  /* @__PURE__ */ o("div", { className: "text-xs text-dc-text-muted", children: "Check the data and configuration" })
5454
5460
  ] }) });
5455
5461
  }
5456
- }), Yc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5462
+ }), Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5457
5463
  __proto__: null,
5458
- default: Yl
5459
- }, Symbol.toStringTag, { value: "Module" })), jl = de.memo(function({
5464
+ default: Ul
5465
+ }, Symbol.toStringTag, { value: "Module" })), Bl = de.memo(function({
5460
5466
  data: t,
5461
5467
  chartConfig: r,
5462
5468
  displayConfig: n = {},
@@ -5464,7 +5470,7 @@ const Yl = de.memo(function({
5464
5470
  height: s = "100%",
5465
5471
  colorPalette: a
5466
5472
  }) {
5467
- const l = ye(null), d = ye(null), [c, u] = Z({ width: 0, height: 0 }), [m, h] = Z(!1), { theme: f } = bs(), w = ve(), N = J(() => ({
5473
+ const l = ye(null), d = ye(null), [c, u] = Z({ width: 0, height: 0 }), [m, h] = Z(!1), { theme: f } = ws(), w = ve(), N = J(() => ({
5468
5474
  showLegend: n?.showLegend ?? !0,
5469
5475
  showGrid: n?.showGrid ?? !0,
5470
5476
  showTooltip: n?.showTooltip ?? !0,
@@ -5506,7 +5512,7 @@ const Yl = de.memo(function({
5506
5512
  return () => {
5507
5513
  S && cancelAnimationFrame(S), g && clearTimeout(g);
5508
5514
  };
5509
- }, []), Me(() => {
5515
+ }, []), Te(() => {
5510
5516
  let p = null;
5511
5517
  const v = () => {
5512
5518
  if (d.current) {
@@ -5522,31 +5528,31 @@ const Yl = de.memo(function({
5522
5528
  }), p.observe(d.current), v()), window.addEventListener("resize", v), () => {
5523
5529
  p && p.disconnect(), window.removeEventListener("resize", v);
5524
5530
  };
5525
- }, [m]), Me(() => {
5531
+ }, [m]), Te(() => {
5526
5532
  if (!t || t.length === 0 || !l.current || !m || c.width === 0 || (Ae(l.current).selectAll("*").remove(), !r?.xAxis || !r?.yAxis || !r?.series))
5527
5533
  return;
5528
5534
  const p = Array.isArray(r.xAxis) ? r.xAxis[0] : r.xAxis, v = Array.isArray(r.yAxis) ? r.yAxis[0] : r.yAxis, S = Array.isArray(r.series) ? r.series[0] : r.series, g = Array.isArray(r.sizeField) ? r.sizeField[0] : r.sizeField || v, b = Array.isArray(r.colorField) ? r.colorField[0] : r.colorField;
5529
5535
  if (!p || !v || !S || !g)
5530
5536
  return;
5531
5537
  const C = pe(i, p), _ = i?.timeDimensions?.some(
5532
- (R) => R.dimension === p
5533
- ) || !1, $ = t.map((R) => {
5534
- const E = R[p];
5538
+ (E) => E.dimension === p
5539
+ ) || !1, $ = t.map((E) => {
5540
+ const I = E[p];
5535
5541
  let q, ne;
5536
- if (_ && E) {
5537
- const re = String(E);
5542
+ if (_ && I) {
5543
+ const re = String(I);
5538
5544
  let ce;
5539
5545
  if (re.match(/^\d{4}-\d{2}-\d{2}[T ]/)) {
5540
5546
  let Ne = re;
5541
5547
  re.includes(" ") && (Ne = re.replace(" ", "T").replace("+00", "Z").replace(/\+\d{2}:\d{2}$/, "Z")), !Ne.endsWith("Z") && !Ne.includes("+") && (Ne = Ne + "Z"), ce = new Date(Ne);
5542
5548
  } else
5543
5549
  ce = new Date(re);
5544
- q = isNaN(ce.getTime()) ? parseFloat(re) : ce.getTime(), ne = ee(E, C);
5550
+ q = isNaN(ce.getTime()) ? parseFloat(re) : ce.getTime(), ne = ee(I, C);
5545
5551
  } else {
5546
- const re = ee(E, C) || E;
5552
+ const re = ee(I, C) || I;
5547
5553
  q = typeof re == "string" ? parseFloat(re) : re, ne = String(re);
5548
5554
  }
5549
- const ie = Ve(R[v]), xe = Ve(R[g]), ae = R[S];
5555
+ const ie = Ve(E[v]), xe = Ve(E[g]), ae = E[S];
5550
5556
  return {
5551
5557
  x: q,
5552
5558
  xLabel: ne,
@@ -5555,98 +5561,98 @@ const Yl = de.memo(function({
5555
5561
  // Type assertion: filter below ensures this is never null
5556
5562
  size: xe !== null ? Math.abs(xe) : 0,
5557
5563
  // Ensure positive size
5558
- color: b ? R[b] : ae,
5564
+ color: b ? E[b] : ae,
5559
5565
  series: ae,
5560
5566
  label: `${ae || "Unknown"}`,
5561
5567
  isValid: ot(q) && ie !== null && xe !== null && xe > 0
5562
5568
  };
5563
- }).filter((R) => R.isValid && R.size > 0);
5569
+ }).filter((E) => E.isValid && E.size > 0);
5564
5570
  if ($.length === 0) return;
5565
- const M = {
5571
+ const T = {
5566
5572
  ...je,
5567
5573
  left: je.left + 30,
5568
5574
  // Add extra 30px left margin for Y-axis label
5569
5575
  bottom: N.showLegend && b ? 100 : 40
5570
5576
  // Add extra space for legend
5571
- }, y = c.width - M.left - M.right, x = c.height - M.top - M.bottom, z = Ae(l.current).attr("width", c.width).attr("height", c.height), D = z.append("g").attr("transform", `translate(${M.left},${M.top})`), V = Et().domain(ar($, (R) => R.x)).range([0, y]).nice(), P = Et().domain(ar($, (R) => R.y)).range([x, 0]).nice(), Y = Hl().domain([0, Dt($, (R) => R.size)]).range([N.minBubbleSize, N.maxBubbleSize]);
5577
+ }, y = c.width - T.left - T.right, x = c.height - T.top - T.bottom, z = Ae(l.current).attr("width", c.width).attr("height", c.height), D = z.append("g").attr("transform", `translate(${T.left},${T.top})`), V = It().domain(ar($, (E) => E.x)).range([0, y]).nice(), P = It().domain(ar($, (E) => E.y)).range([x, 0]).nice(), Y = jl().domain([0, Dt($, (E) => E.size)]).range([N.minBubbleSize, N.maxBubbleSize]);
5572
5578
  let X, F = !1, L = [];
5573
5579
  if (b && $.length > 0) {
5574
- const R = $.map((E) => {
5575
- const q = E.color;
5580
+ const E = $.map((I) => {
5581
+ const q = I.color;
5576
5582
  return typeof q == "string" ? parseFloat(q) : q;
5577
- }).filter((E) => !isNaN(E));
5578
- if (F = R.length === $.length && R.every((E) => typeof E == "number"), F) {
5579
- const E = Math.min(...R), q = Math.max(...R);
5580
- X = At().domain([E, q]).range(a?.gradient || Ce);
5583
+ }).filter((I) => !isNaN(I));
5584
+ if (F = E.length === $.length && E.every((I) => typeof I == "number"), F) {
5585
+ const I = Math.min(...E), q = Math.max(...E);
5586
+ X = At().domain([I, q]).range(a?.gradient || Ce);
5581
5587
  } else
5582
- L = [...new Set($.map((E) => String(E.color)))], X = pt().domain(L).range(a?.colors || G);
5588
+ L = [...new Set($.map((I) => String(I.color)))], X = pt().domain(L).range(a?.colors || G);
5583
5589
  } else
5584
5590
  X = pt().domain(["default"]).range([G[0]]);
5585
- const B = (R, E) => getComputedStyle(document.documentElement).getPropertyValue(R).trim() || E, I = f !== "light", T = I ? B("--dc-text-muted", "#cbd5e1") : B("--dc-text-secondary", "#374151"), U = I ? B("--dc-border", "#475569") : "#9ca3af";
5591
+ const B = (E, I) => getComputedStyle(document.documentElement).getPropertyValue(E).trim() || I, R = f !== "light", M = R ? B("--dc-text-muted", "#cbd5e1") : B("--dc-text-secondary", "#374151"), U = R ? B("--dc-border", "#475569") : "#9ca3af";
5586
5592
  if (N.showGrid) {
5587
- const R = D.append("g").attr("class", "grid").attr("transform", `translate(0,${x})`).call(
5593
+ const E = D.append("g").attr("class", "grid").attr("transform", `translate(0,${x})`).call(
5588
5594
  ur(V).tickSize(-x).tickFormat(() => "")
5589
5595
  );
5590
- R.selectAll("line").style("stroke", U).style("stroke-dasharray", "3,3").style("opacity", 0.3), R.select(".domain").style("stroke", "none");
5591
- const E = D.append("g").attr("class", "grid").call(
5596
+ E.selectAll("line").style("stroke", U).style("stroke-dasharray", "3,3").style("opacity", 0.3), E.select(".domain").style("stroke", "none");
5597
+ const I = D.append("g").attr("class", "grid").call(
5592
5598
  fr(P).tickSize(-y).tickFormat(() => "")
5593
5599
  );
5594
- E.selectAll("line").style("stroke", U).style("stroke-dasharray", "3,3").style("opacity", 0.3), E.select(".domain").style("stroke", "none");
5600
+ I.selectAll("line").style("stroke", U).style("stroke-dasharray", "3,3").style("opacity", 0.3), I.select(".domain").style("stroke", "none");
5595
5601
  }
5596
5602
  const O = ur(V);
5597
- _ ? O.tickFormat((R) => {
5598
- const E = new Date(R);
5599
- if (isNaN(E.getTime())) return String(R);
5603
+ _ ? O.tickFormat((E) => {
5604
+ const I = new Date(E);
5605
+ if (isNaN(I.getTime())) return String(E);
5600
5606
  switch (C?.toLowerCase()) {
5601
5607
  case "year":
5602
- return String(E.getUTCFullYear());
5608
+ return String(I.getUTCFullYear());
5603
5609
  case "quarter": {
5604
- const q = Math.floor(E.getUTCMonth() / 3) + 1;
5605
- return `${E.getUTCFullYear()}-Q${q}`;
5610
+ const q = Math.floor(I.getUTCMonth() / 3) + 1;
5611
+ return `${I.getUTCFullYear()}-Q${q}`;
5606
5612
  }
5607
5613
  case "month":
5608
- return `${E.getUTCFullYear()}-${String(E.getUTCMonth() + 1).padStart(2, "0")}`;
5614
+ return `${I.getUTCFullYear()}-${String(I.getUTCMonth() + 1).padStart(2, "0")}`;
5609
5615
  case "week":
5610
5616
  case "day":
5611
- return `${E.getUTCFullYear()}-${String(E.getUTCMonth() + 1).padStart(2, "0")}-${String(E.getUTCDate()).padStart(2, "0")}`;
5617
+ return `${I.getUTCFullYear()}-${String(I.getUTCMonth() + 1).padStart(2, "0")}-${String(I.getUTCDate()).padStart(2, "0")}`;
5612
5618
  case "hour":
5613
- return `${String(E.getUTCMonth() + 1).padStart(2, "0")}-${String(E.getUTCDate()).padStart(2, "0")} ${String(E.getUTCHours()).padStart(2, "0")}:00`;
5619
+ return `${String(I.getUTCMonth() + 1).padStart(2, "0")}-${String(I.getUTCDate()).padStart(2, "0")} ${String(I.getUTCHours()).padStart(2, "0")}:00`;
5614
5620
  default:
5615
- return `${E.getUTCFullYear()}-${String(E.getUTCMonth() + 1).padStart(2, "0")}`;
5621
+ return `${I.getUTCFullYear()}-${String(I.getUTCMonth() + 1).padStart(2, "0")}`;
5616
5622
  }
5617
- }) : N.xAxisFormat && O.tickFormat((R) => W(R, N.xAxisFormat));
5623
+ }) : N.xAxisFormat && O.tickFormat((E) => W(E, N.xAxisFormat));
5618
5624
  const K = D.append("g").attr("transform", `translate(0,${x})`).call(O);
5619
- K.selectAll("text").style("fill", T), K.selectAll("line, path").style("stroke", U), K.append("text").attr("x", y / 2).attr("y", 35).attr("fill", T).style("text-anchor", "middle").style("font-size", "12px").text(N.xAxisFormat?.label || w(p));
5625
+ K.selectAll("text").style("fill", M), K.selectAll("line, path").style("stroke", U), K.append("text").attr("x", y / 2).attr("y", 35).attr("fill", M).style("text-anchor", "middle").style("font-size", "12px").text(N.xAxisFormat?.label || w(p));
5620
5626
  const te = fr(P);
5621
- N.leftYAxisFormat && te.tickFormat((R) => W(R, N.leftYAxisFormat));
5627
+ N.leftYAxisFormat && te.tickFormat((E) => W(E, N.leftYAxisFormat));
5622
5628
  const fe = D.append("g").call(te);
5623
- fe.selectAll("text").style("fill", T), fe.selectAll("line, path").style("stroke", U), fe.append("text").attr("transform", "rotate(-90)").attr("y", -35).attr("x", -x / 2).attr("fill", T).style("text-anchor", "middle").style("font-size", "12px").text(N.leftYAxisFormat?.label || w(v));
5624
- const me = Ae("body").append("div").attr("class", "bubble-chart-tooltip").style("position", "absolute").style("padding", "8px").style("background", "rgba(0, 0, 0, 0.8)").style("color", "white").style("border-radius", "4px").style("font-size", "12px").style("pointer-events", "none").style("opacity", 0).style("z-index", 1e3), we = D.selectAll(".bubble").data($).enter().append("circle").attr("class", "bubble").attr("cx", (R) => V(R.x)).attr("cy", (R) => P(R.y)).attr("r", (R) => Y(R.size)).style("fill", (R) => b && R.color !== void 0 ? X(F ? R.color : String(R.color)) : G[0]).style("opacity", N.bubbleOpacity).style("stroke", "#fff").style("stroke-width", 1).style("cursor", "pointer");
5625
- if (N.showTooltip && we.on("mouseover", function(R, E) {
5626
- Ae(this).transition().duration(200).style("opacity", 1).attr("r", Y(E.size) * 1.1);
5629
+ fe.selectAll("text").style("fill", M), fe.selectAll("line, path").style("stroke", U), fe.append("text").attr("transform", "rotate(-90)").attr("y", -35).attr("x", -x / 2).attr("fill", M).style("text-anchor", "middle").style("font-size", "12px").text(N.leftYAxisFormat?.label || w(v));
5630
+ const me = Ae("body").append("div").attr("class", "bubble-chart-tooltip").style("position", "absolute").style("padding", "8px").style("background", "rgba(0, 0, 0, 0.8)").style("color", "white").style("border-radius", "4px").style("font-size", "12px").style("pointer-events", "none").style("opacity", 0).style("z-index", 1e3), we = D.selectAll(".bubble").data($).enter().append("circle").attr("class", "bubble").attr("cx", (E) => V(E.x)).attr("cy", (E) => P(E.y)).attr("r", (E) => Y(E.size)).style("fill", (E) => b && E.color !== void 0 ? X(F ? E.color : String(E.color)) : G[0]).style("opacity", N.bubbleOpacity).style("stroke", "#fff").style("stroke-width", 1).style("cursor", "pointer");
5631
+ if (N.showTooltip && we.on("mouseover", function(E, I) {
5632
+ Ae(this).transition().duration(200).style("opacity", 1).attr("r", Y(I.size) * 1.1);
5627
5633
  const q = [
5628
- `<strong>${E.series || "Unknown"}</strong>`,
5629
- `${w(p)}: ${E.xLabel || (N.xAxisFormat ? W(E.x, N.xAxisFormat) : E.x)}`,
5630
- `${w(v)}: ${N.leftYAxisFormat ? W(E.y, N.leftYAxisFormat) : E.y}`,
5631
- `${w(g)}: ${N.leftYAxisFormat ? W(E.size, N.leftYAxisFormat) : E.size}`,
5632
- b && E.color ? `${w(b)}: ${E.color}` : ""
5634
+ `<strong>${I.series || "Unknown"}</strong>`,
5635
+ `${w(p)}: ${I.xLabel || (N.xAxisFormat ? W(I.x, N.xAxisFormat) : I.x)}`,
5636
+ `${w(v)}: ${N.leftYAxisFormat ? W(I.y, N.leftYAxisFormat) : I.y}`,
5637
+ `${w(g)}: ${N.leftYAxisFormat ? W(I.size, N.leftYAxisFormat) : I.size}`,
5638
+ b && I.color ? `${w(b)}: ${I.color}` : ""
5633
5639
  ].filter(Boolean).join("<br>");
5634
- me.html(q).style("left", R.pageX + 10 + "px").style("top", R.pageY - 10 + "px").transition().duration(200).style("opacity", 1);
5635
- }).on("mousemove", function(R) {
5636
- me.style("left", R.pageX + 10 + "px").style("top", R.pageY - 10 + "px");
5637
- }).on("mouseout", function(R, E) {
5638
- Ae(this).transition().duration(200).style("opacity", N.bubbleOpacity).attr("r", Y(E.size)), me.transition().duration(200).style("opacity", 0);
5640
+ me.html(q).style("left", E.pageX + 10 + "px").style("top", E.pageY - 10 + "px").transition().duration(200).style("opacity", 1);
5641
+ }).on("mousemove", function(E) {
5642
+ me.style("left", E.pageX + 10 + "px").style("top", E.pageY - 10 + "px");
5643
+ }).on("mouseout", function(E, I) {
5644
+ Ae(this).transition().duration(200).style("opacity", N.bubbleOpacity).attr("r", Y(I.size)), me.transition().duration(200).style("opacity", 0);
5639
5645
  }), N.showLegend && b)
5640
5646
  if (F) {
5641
5647
  const q = Math.min(...$.map((ce) => ce.color)), ne = Math.max(...$.map((ce) => ce.color)), ie = D.append("g").attr("class", "color-legend").attr("transform", `translate(${y / 2 - 200 / 2}, ${x + 60})`), ae = z.append("defs").append("linearGradient").attr("id", "color-scale-gradient").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%"), re = a?.gradient || Ce;
5642
5648
  re.forEach((ce, Ne) => {
5643
5649
  ae.append("stop").attr("offset", `${Ne / (re.length - 1) * 100}%`).attr("stop-color", ce);
5644
- }), ie.append("rect").attr("width", 200).attr("height", 20).style("fill", "url(#color-scale-gradient)").style("stroke", "#ccc").style("stroke-width", 1), ie.append("text").attr("x", 0).attr("y", 35).attr("text-anchor", "start").style("font-size", "11px").style("fill", T).text(N.leftYAxisFormat ? W(q, N.leftYAxisFormat) : q.toFixed(2)), ie.append("text").attr("x", 200).attr("y", 35).attr("text-anchor", "end").style("font-size", "11px").style("fill", T).text(N.leftYAxisFormat ? W(ne, N.leftYAxisFormat) : ne.toFixed(2)), ie.append("text").attr("x", 200 / 2).attr("y", -5).attr("text-anchor", "middle").style("font-size", "12px").style("font-weight", "bold").style("fill", T).text(w(b));
5650
+ }), ie.append("rect").attr("width", 200).attr("height", 20).style("fill", "url(#color-scale-gradient)").style("stroke", "#ccc").style("stroke-width", 1), ie.append("text").attr("x", 0).attr("y", 35).attr("text-anchor", "start").style("font-size", "11px").style("fill", M).text(N.leftYAxisFormat ? W(q, N.leftYAxisFormat) : q.toFixed(2)), ie.append("text").attr("x", 200).attr("y", 35).attr("text-anchor", "end").style("font-size", "11px").style("fill", M).text(N.leftYAxisFormat ? W(ne, N.leftYAxisFormat) : ne.toFixed(2)), ie.append("text").attr("x", 200 / 2).attr("y", -5).attr("text-anchor", "middle").style("font-size", "12px").style("font-weight", "bold").style("fill", M).text(w(b));
5645
5651
  } else {
5646
- const R = L;
5647
- if (R.length > 0) {
5648
- const q = D.append("g").attr("class", "legend").attr("transform", `translate(${y / 2 - R.length * 80 / 2}, ${x + 60})`).selectAll(".legend-item").data(R).enter().append("g").attr("class", "legend-item").attr("transform", (ne, ie) => `translate(${ie * 80}, 0)`).style("cursor", "pointer");
5649
- q.append("circle").attr("cx", 5).attr("cy", 5).attr("r", 5).style("fill", (ne) => X(ne)).style("opacity", N.bubbleOpacity), q.append("text").attr("x", 15).attr("y", 5).attr("dy", ".35em").style("font-size", "11px").style("fill", T).text((ne) => String(ne)), q.on("mouseover", function(ne, ie) {
5652
+ const E = L;
5653
+ if (E.length > 0) {
5654
+ const q = D.append("g").attr("class", "legend").attr("transform", `translate(${y / 2 - E.length * 80 / 2}, ${x + 60})`).selectAll(".legend-item").data(E).enter().append("g").attr("class", "legend-item").attr("transform", (ne, ie) => `translate(${ie * 80}, 0)`).style("cursor", "pointer");
5655
+ q.append("circle").attr("cx", 5).attr("cy", 5).attr("r", 5).style("fill", (ne) => X(ne)).style("opacity", N.bubbleOpacity), q.append("text").attr("x", 15).attr("y", 5).attr("dy", ".35em").style("font-size", "11px").style("fill", M).text((ne) => String(ne)), q.on("mouseover", function(ne, ie) {
5650
5656
  we.transition().duration(200).style("opacity", (xe) => b && String(xe.color) === ie ? 1 : 0.2);
5651
5657
  }).on("mouseout", function() {
5652
5658
  we.transition().duration(200).style("opacity", N.bubbleOpacity);
@@ -5667,20 +5673,20 @@ const Yl = de.memo(function({
5667
5673
  /* @__PURE__ */ o("div", { className: "text-xs", children: "Bubble chart requires xAxis, yAxis, series, and sizeField dimensions" }),
5668
5674
  /* @__PURE__ */ o("div", { className: "text-xs mt-1", children: "Optional: colorField for bubble coloring" })
5669
5675
  ] }) });
5670
- }), jc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5676
+ }), Bc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5671
5677
  __proto__: null,
5672
- default: jl
5673
- }, Symbol.toStringTag, { value: "Module" })), Ul = de.memo(function({
5678
+ default: Bl
5679
+ }, Symbol.toStringTag, { value: "Module" })), Wl = de.memo(function({
5674
5680
  data: t,
5675
5681
  chartConfig: r,
5676
5682
  displayConfig: n = {},
5677
5683
  queryObject: i,
5678
5684
  height: s = 300
5679
5685
  }) {
5680
- const { getFieldLabel: a, meta: l } = Ki(), d = J(
5681
- () => ks(i, r?.xAxis),
5686
+ const { getFieldLabel: a, meta: l } = qi(), d = J(
5687
+ () => Fs(i, r?.xAxis),
5682
5688
  [i, r?.xAxis]
5683
- ), c = n?.pivotTimeDimension !== !1, u = J(() => !d || !c ? null : $s(t, d, a), [t, d, c, a, l]);
5689
+ ), c = n?.pivotTimeDimension !== !1, u = J(() => !d || !c ? null : Cs(t, d, a), [t, d, c, a, l]);
5684
5690
  return !t || t.length === 0 ? /* @__PURE__ */ o(
5685
5691
  "div",
5686
5692
  {
@@ -5692,7 +5698,7 @@ const Yl = de.memo(function({
5692
5698
  ] })
5693
5699
  }
5694
5700
  ) : u?.isPivoted && u.columns.length > 0 ? /* @__PURE__ */ o(
5695
- Bl,
5701
+ Gl,
5696
5702
  {
5697
5703
  pivotedData: u,
5698
5704
  height: s,
@@ -5700,7 +5706,7 @@ const Yl = de.memo(function({
5700
5706
  leftYAxisFormat: n?.leftYAxisFormat
5701
5707
  }
5702
5708
  ) : /* @__PURE__ */ o(
5703
- Gl,
5709
+ Xl,
5704
5710
  {
5705
5711
  data: t,
5706
5712
  chartConfig: r,
@@ -5711,7 +5717,7 @@ const Yl = de.memo(function({
5711
5717
  }
5712
5718
  );
5713
5719
  });
5714
- function Bl({
5720
+ function Gl({
5715
5721
  pivotedData: e,
5716
5722
  height: t,
5717
5723
  meta: r,
@@ -5738,7 +5744,7 @@ function Bl({
5738
5744
  a.key
5739
5745
  )) }) }),
5740
5746
  /* @__PURE__ */ o("tbody", { className: "bg-dc-surface divide-y border-dc-border", children: s.map((a) => /* @__PURE__ */ o(
5741
- Wl,
5747
+ Kl,
5742
5748
  {
5743
5749
  row: a,
5744
5750
  columns: i,
@@ -5749,13 +5755,13 @@ function Bl({
5749
5755
  )) })
5750
5756
  ] }) });
5751
5757
  }
5752
- function Wl({
5758
+ function Kl({
5753
5759
  row: e,
5754
5760
  columns: t,
5755
5761
  meta: r,
5756
5762
  leftYAxisFormat: n
5757
5763
  }) {
5758
- const i = Ds(e.measureField, r), s = Xi(i);
5764
+ const i = zs(e.measureField, r), s = Zi(i);
5759
5765
  return /* @__PURE__ */ o("tr", { className: "hover:bg-dc-surface-secondary", children: t.map((a) => {
5760
5766
  const l = e.values[a.key];
5761
5767
  return a.isMeasureColumn ? e.isFirstInGroup === !1 ? null : /* @__PURE__ */ o(
@@ -5789,7 +5795,7 @@ function Wl({
5789
5795
  function Dr(e, t) {
5790
5796
  return e == null ? "-" : typeof e == "number" ? t ? W(e, t) : Number.isInteger(e) ? e.toLocaleString() : parseFloat(e.toFixed(2)).toLocaleString() : typeof e == "boolean" ? e ? "Yes" : "No" : String(e);
5791
5797
  }
5792
- function Gl({
5798
+ function Xl({
5793
5799
  data: e,
5794
5800
  chartConfig: t,
5795
5801
  queryObject: r,
@@ -5800,7 +5806,7 @@ function Gl({
5800
5806
  const a = Object.keys(e[0] || {}), l = J(() => {
5801
5807
  if (t?.xAxis && t.xAxis.length > 0)
5802
5808
  return t.xAxis.filter((c) => a.includes(c));
5803
- const d = Ss(r);
5809
+ const d = Ts(r);
5804
5810
  if (d.length > 0) {
5805
5811
  const c = d.filter((m) => a.includes(m)), u = a.filter((m) => !c.includes(m));
5806
5812
  return [...c, ...u];
@@ -5830,19 +5836,19 @@ function Gl({
5830
5836
  "td",
5831
5837
  {
5832
5838
  className: "px-3 py-2 whitespace-nowrap text-sm text-dc-text",
5833
- children: Kl(d[u], s)
5839
+ children: ql(d[u], s)
5834
5840
  },
5835
5841
  u
5836
5842
  )) }, c)) })
5837
5843
  ] }) });
5838
5844
  }
5839
- function Kl(e, t) {
5845
+ function ql(e, t) {
5840
5846
  return e == null ? "" : typeof e == "number" ? t ? W(e, t) : e.toLocaleString() : typeof e == "boolean" ? e ? "Yes" : "No" : String(e);
5841
5847
  }
5842
- const Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5848
+ const Wc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5843
5849
  __proto__: null,
5844
- default: Ul
5845
- }, Symbol.toStringTag, { value: "Module" })), Xl = de.memo(function({
5850
+ default: Wl
5851
+ }, Symbol.toStringTag, { value: "Module" })), Zl = de.memo(function({
5846
5852
  data: t,
5847
5853
  chartConfig: r,
5848
5854
  displayConfig: n = {},
@@ -5851,7 +5857,7 @@ const Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5851
5857
  colorPalette: a
5852
5858
  }) {
5853
5859
  const l = ye(null), d = ye(null), [c, u] = Z({ width: 0, height: 0 }), [m, h] = Z(!1), [f, w] = Z("light"), N = ve();
5854
- Me(() => (w(Ye()), Or((y) => {
5860
+ Te(() => (w(Ye()), Or((y) => {
5855
5861
  w(y);
5856
5862
  })), []);
5857
5863
  const A = {
@@ -5860,7 +5866,7 @@ const Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5860
5866
  fitToWidth: n?.fitToWidth ?? !1
5861
5867
  };
5862
5868
  Pt(() => {
5863
- let M = 0;
5869
+ let T = 0;
5864
5870
  const y = 10;
5865
5871
  let x, z;
5866
5872
  const D = () => {
@@ -5871,34 +5877,34 @@ const Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5871
5877
  }
5872
5878
  return !1;
5873
5879
  };
5874
- if (!D() && M < y) {
5880
+ if (!D() && T < y) {
5875
5881
  const P = () => {
5876
- !D() && M < y && (M++, z = setTimeout(() => {
5882
+ !D() && T < y && (T++, z = setTimeout(() => {
5877
5883
  x = requestAnimationFrame(P);
5878
- }, 50 * M));
5884
+ }, 50 * T));
5879
5885
  };
5880
5886
  x = requestAnimationFrame(P);
5881
5887
  }
5882
5888
  return () => {
5883
5889
  x && cancelAnimationFrame(x), z && clearTimeout(z);
5884
5890
  };
5885
- }, []), Me(() => {
5886
- let M = null;
5891
+ }, []), Te(() => {
5892
+ let T = null;
5887
5893
  const y = () => {
5888
5894
  if (d.current) {
5889
5895
  const { width: x, height: z } = d.current.getBoundingClientRect();
5890
5896
  x > 0 && z > 0 && (u({ width: x, height: z }), m || h(!0));
5891
5897
  }
5892
5898
  };
5893
- return d.current && (M = new ResizeObserver(() => y()), M.observe(d.current), y()), window.addEventListener("resize", y), () => {
5894
- M && M.disconnect(), window.removeEventListener("resize", y);
5899
+ return d.current && (T = new ResizeObserver(() => y()), T.observe(d.current), y()), window.addEventListener("resize", y), () => {
5900
+ T && T.disconnect(), window.removeEventListener("resize", y);
5895
5901
  };
5896
5902
  }, [m]);
5897
- const p = (M) => Math.floor(M.getMonth() / 3) + 1, v = (M) => M.getMonth() % 3 + 1, S = (M) => {
5898
- const y = M.getDate();
5903
+ const p = (T) => Math.floor(T.getMonth() / 3) + 1, v = (T) => T.getMonth() % 3 + 1, S = (T) => {
5904
+ const y = T.getDate();
5899
5905
  return Math.floor((y - 1) / 7) + 1;
5900
- }, g = (M) => {
5901
- switch (M?.toLowerCase()) {
5906
+ }, g = (T) => {
5907
+ switch (T?.toLowerCase()) {
5902
5908
  case "year":
5903
5909
  return null;
5904
5910
  case "quarter":
@@ -6001,23 +6007,23 @@ const Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6001
6007
  default:
6002
6008
  return null;
6003
6009
  }
6004
- }, b = (M) => {
6005
- const y = new Date(Date.UTC(M.getFullYear(), M.getMonth(), M.getDate())), x = y.getUTCDay() || 7;
6010
+ }, b = (T) => {
6011
+ const y = new Date(Date.UTC(T.getFullYear(), T.getMonth(), T.getDate())), x = y.getUTCDay() || 7;
6006
6012
  y.setUTCDate(y.getUTCDate() + 4 - x);
6007
6013
  const z = y.getUTCFullYear(), D = new Date(Date.UTC(z, 0, 1)), V = Math.ceil(((y.getTime() - D.getTime()) / 864e5 + 1) / 7);
6008
6014
  return { year: z, week: V };
6009
6015
  };
6010
- if (Me(() => {
6016
+ if (Te(() => {
6011
6017
  if (!t || t.length === 0 || !l.current || !m || c.width === 0 || (Ae(l.current).selectAll("*").remove(), !r?.dateField || !r?.valueField))
6012
6018
  return;
6013
- const M = Array.isArray(r.dateField) ? r.dateField[0] : r.dateField, y = Array.isArray(r.valueField) ? r.valueField[0] : r.valueField;
6014
- if (!M || !y)
6019
+ const T = Array.isArray(r.dateField) ? r.dateField[0] : r.dateField, y = Array.isArray(r.valueField) ? r.valueField[0] : r.valueField;
6020
+ if (!T || !y)
6015
6021
  return;
6016
6022
  const z = (() => {
6017
6023
  if (!i?.timeDimensions || i.timeDimensions.length === 0)
6018
6024
  return "day";
6019
6025
  const H = i.timeDimensions.find(
6020
- (Q) => Q.dimension === M || Q.dimension.includes(M)
6026
+ (Q) => Q.dimension === T || Q.dimension.includes(T)
6021
6027
  );
6022
6028
  if (H && H.granularity)
6023
6029
  return H.granularity;
@@ -6027,7 +6033,7 @@ const Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6027
6033
  if (!D)
6028
6034
  return;
6029
6035
  const V = t.map((H) => {
6030
- const j = H[M], Q = typeof H[y] == "string" ? parseFloat(H[y]) : H[y] || 0;
6036
+ const j = H[T], Q = typeof H[y] == "string" ? parseFloat(H[y]) : H[y] || 0;
6031
6037
  let se;
6032
6038
  if (typeof j == "string") {
6033
6039
  let oe = j;
@@ -6036,10 +6042,10 @@ const Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6036
6042
  se = new Date(j);
6037
6043
  if (isNaN(se.getTime()))
6038
6044
  return null;
6039
- const Fe = D.extractX(se), Te = D.extractY(se);
6045
+ const Fe = D.extractX(se), Me = D.extractY(se);
6040
6046
  return {
6041
6047
  x: Fe,
6042
- y: Te,
6048
+ y: Me,
6043
6049
  value: Q,
6044
6050
  date: se,
6045
6051
  label: ee(j, z)
@@ -6049,7 +6055,7 @@ const Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6049
6055
  const P = Dt(V, (H) => H.y) || 0, Y = cr(V, (H) => H.y) || 0, F = (() => {
6050
6056
  const H = [...new Set(V.map((j) => j.x))].sort();
6051
6057
  return H;
6052
- })(), L = F.length * D.cellWidth + (F.length - 1) * 4, B = (P - Y + 1) * D.cellHeight + (P - Y) * 4, I = {
6058
+ })(), L = F.length * D.cellWidth + (F.length - 1) * 4, B = (P - Y + 1) * D.cellHeight + (P - Y) * 4, R = {
6053
6059
  left: 60,
6054
6060
  // Space for Y-axis labels
6055
6061
  bottom: 10,
@@ -6057,16 +6063,16 @@ const Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6057
6063
  top: D.hasHierarchicalLabels ? 40 : 25,
6058
6064
  // Extra space for hierarchical labels
6059
6065
  right: 10
6060
- }, T = c.width - I.left - I.right, U = c.height - I.top - I.bottom;
6066
+ }, M = c.width - R.left - R.right, U = c.height - R.top - R.bottom;
6061
6067
  let O, K;
6062
6068
  if (A.fitToWidth) {
6063
- const H = T / L, j = U / B, Q = Math.min(H, j);
6069
+ const H = M / L, j = U / B, Q = Math.min(H, j);
6064
6070
  O = D.cellWidth * Q, K = D.cellHeight * Q;
6065
6071
  } else {
6066
- const j = { width: 16, height: 16 }, Q = 24, se = T / L, Fe = U / B, Te = Math.min(se, Fe);
6067
- O = Math.max(j.width, Math.min(Q, D.cellWidth * Te)), K = Math.max(j.height, Math.min(Q, D.cellHeight * Te)), z === "week" && O < j.width && (O = j.width);
6072
+ const j = { width: 16, height: 16 }, Q = 24, se = M / L, Fe = U / B, Me = Math.min(se, Fe);
6073
+ O = Math.max(j.width, Math.min(Q, D.cellWidth * Me)), K = Math.max(j.height, Math.min(Q, D.cellHeight * Me)), z === "week" && O < j.width && (O = j.width);
6068
6074
  }
6069
- const te = F.length * O + (F.length - 1) * 4, me = te > T ? te + I.left + I.right : c.width, R = Ae(l.current).attr("width", me).attr("height", c.height).append("g").attr("transform", `translate(${I.left},${I.top})`), E = V.map((H) => H.value), q = cr(E) || 0, ne = Dt(E) || 1, ie = At().domain([q, ne]).range(a?.gradient || Ce), xe = /* @__PURE__ */ new Map();
6075
+ const te = F.length * O + (F.length - 1) * 4, me = te > M ? te + R.left + R.right : c.width, E = Ae(l.current).attr("width", me).attr("height", c.height).append("g").attr("transform", `translate(${R.left},${R.top})`), I = V.map((H) => H.value), q = cr(I) || 0, ne = Dt(I) || 1, ie = At().domain([q, ne]).range(a?.gradient || Ce), xe = /* @__PURE__ */ new Map();
6070
6076
  V.forEach((H) => {
6071
6077
  const j = `${H.x}-${H.y}`;
6072
6078
  xe.set(j, H);
@@ -6077,8 +6083,8 @@ const Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6077
6083
  });
6078
6084
  for (const H of F)
6079
6085
  for (let j = Y; j <= P; j++) {
6080
- const Q = `${H}-${j}`, se = xe.get(Q), Fe = Be.get(H) || 0, Te = R.append("rect").attr("x", Fe * (O + 4)).attr("y", (j - Y) * (K + 4)).attr("width", O).attr("height", K).attr("rx", 2).attr("ry", 2).style("fill", se ? ie(se.value) : mn).style("stroke", Zt).style("stroke-width", 1);
6081
- A.showTooltip && Te.style("cursor", "pointer").on("mouseover", function(oe) {
6086
+ const Q = `${H}-${j}`, se = xe.get(Q), Fe = Be.get(H) || 0, Me = E.append("rect").attr("x", Fe * (O + 4)).attr("y", (j - Y) * (K + 4)).attr("width", O).attr("height", K).attr("rx", 2).attr("ry", 2).style("fill", se ? ie(se.value) : mn).style("stroke", Zt).style("stroke-width", 1);
6087
+ A.showTooltip && Me.style("cursor", "pointer").on("mouseover", function(oe) {
6082
6088
  if (Ae(this).style("stroke", "#000").style("stroke-width", 2), se) {
6083
6089
  const De = [
6084
6090
  `<strong>${se.label}</strong>`,
@@ -6101,28 +6107,28 @@ const Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6101
6107
  }
6102
6108
  for (const j of F) {
6103
6109
  const Q = Be.get(j) || 0;
6104
- R.append("text").attr("x", Q * (O + 4) + O / 2).attr("y", -8).attr("text-anchor", "middle").style("font-size", "10px").style("fill", ce).text(D.xFormat(j));
6110
+ E.append("text").attr("x", Q * (O + 4) + O / 2).attr("y", -8).attr("text-anchor", "middle").style("font-size", "10px").style("fill", ce).text(D.xFormat(j));
6105
6111
  }
6106
6112
  for (const [j, Q] of H)
6107
6113
  if (Q.length > 0) {
6108
- const se = Math.min(...Q.map((De) => Be.get(De) || 0)), Fe = Math.max(...Q.map((De) => Be.get(De) || 0)), Te = (se + Fe) / 2;
6114
+ const se = Math.min(...Q.map((De) => Be.get(De) || 0)), Fe = Math.max(...Q.map((De) => Be.get(De) || 0)), Me = (se + Fe) / 2;
6109
6115
  let oe = "";
6110
6116
  if (j > 9999) {
6111
6117
  const De = Math.floor(j / 100), hn = j % 100;
6112
6118
  oe = `${["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][hn - 1]} '${De.toString().slice(-2)}`;
6113
6119
  } else
6114
6120
  oe = `'${j.toString().slice(-2)}`;
6115
- R.append("text").attr("x", Te * (O + 4) + O / 2).attr("y", -25).attr("text-anchor", "middle").style("font-size", "12px").style("font-weight", "bold").style("fill", ce).text(oe), Q.length > 1 && R.append("line").attr("x1", se * (O + 4)).attr("x2", Fe * (O + 4) + O).attr("y1", -20).attr("y2", -20).style("stroke", Ne).style("stroke-width", 1).style("opacity", 0.3);
6121
+ E.append("text").attr("x", Me * (O + 4) + O / 2).attr("y", -25).attr("text-anchor", "middle").style("font-size", "12px").style("font-weight", "bold").style("fill", ce).text(oe), Q.length > 1 && E.append("line").attr("x1", se * (O + 4)).attr("x2", Fe * (O + 4) + O).attr("y1", -20).attr("y2", -20).style("stroke", Ne).style("stroke-width", 1).style("opacity", 0.3);
6116
6122
  }
6117
6123
  } else {
6118
6124
  const H = Math.max(1, Math.floor(F.length / 10));
6119
6125
  for (let j = 0; j < F.length; j += H) {
6120
6126
  const Q = F[j];
6121
- R.append("text").attr("x", j * (O + 4) + O / 2).attr("y", -8).attr("text-anchor", "middle").style("font-size", "10px").style("fill", ce).text(D.xFormat(Q));
6127
+ E.append("text").attr("x", j * (O + 4) + O / 2).attr("y", -8).attr("text-anchor", "middle").style("font-size", "10px").style("fill", ce).text(D.xFormat(Q));
6122
6128
  }
6123
6129
  }
6124
6130
  for (let H = Y; H <= P; H++)
6125
- R.append("text").attr("x", -8).attr("y", (H - Y) * (K + 4) + K / 2).attr("text-anchor", "end").attr("dy", ".35em").style("font-size", "10px").style("fill", ce).text(D.yFormat(H));
6131
+ E.append("text").attr("x", -8).attr("y", (H - Y) * (K + 4) + K / 2).attr("text-anchor", "end").attr("dy", ".35em").style("font-size", "10px").style("fill", ce).text(D.yFormat(H));
6126
6132
  }
6127
6133
  return () => {
6128
6134
  Je.remove();
@@ -6153,7 +6159,7 @@ const Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6153
6159
  );
6154
6160
  const _ = Array.isArray(r.dateField) ? r.dateField[0] : r.dateField;
6155
6161
  return (i?.timeDimensions?.find(
6156
- (M) => M.dimension === _ || M.dimension.includes(_)
6162
+ (T) => T.dimension === _ || T.dimension.includes(_)
6157
6163
  )?.granularity || "day")?.toLowerCase() === "year" ? /* @__PURE__ */ o(
6158
6164
  "div",
6159
6165
  {
@@ -6169,9 +6175,9 @@ const Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6169
6175
  /* @__PURE__ */ o("svg", { ref: l, className: "h-full" }),
6170
6176
  !m && /* @__PURE__ */ o("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ o("div", { className: "text-dc-text-muted text-sm", children: "Measuring chart dimensions..." }) })
6171
6177
  ] }) });
6172
- }), Bc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6178
+ }), Gc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6173
6179
  __proto__: null,
6174
- default: Xl
6180
+ default: Zl
6175
6181
  }, Symbol.toStringTag, { value: "Module" }));
6176
6182
  function fn({
6177
6183
  values: e,
@@ -6307,7 +6313,7 @@ function fn({
6307
6313
  ] })
6308
6314
  ] });
6309
6315
  }
6310
- const ql = de.memo(function({
6316
+ const Ql = de.memo(function({
6311
6317
  data: t,
6312
6318
  chartConfig: r,
6313
6319
  displayConfig: n = {},
@@ -6316,13 +6322,13 @@ const ql = de.memo(function({
6316
6322
  colorPalette: a
6317
6323
  }) {
6318
6324
  const [l, d] = Z(32), [c, u] = Z(250), m = ye(null), h = ye(null), f = ve();
6319
- if (Me(() => {
6320
- const I = () => {
6325
+ if (Te(() => {
6326
+ const R = () => {
6321
6327
  if (m.current) {
6322
6328
  const K = m.current.getBoundingClientRect(), te = K.width, fe = K.height;
6323
6329
  if (te > 0 && fe > 0) {
6324
- const me = te / 5, we = fe / 4, R = Math.min(me, we), E = Math.max(24, Math.min(R, 120));
6325
- d(E), setTimeout(() => {
6330
+ const me = te / 5, we = fe / 4, E = Math.min(me, we), I = Math.max(24, Math.min(E, 120));
6331
+ d(I), setTimeout(() => {
6326
6332
  if (h.current) {
6327
6333
  const ne = h.current.getBoundingClientRect().width, ie = Math.max(ne, Math.min(te * 0.6, 300));
6328
6334
  u(ie);
@@ -6330,11 +6336,11 @@ const ql = de.memo(function({
6330
6336
  }, 10);
6331
6337
  }
6332
6338
  }
6333
- }, T = setTimeout(I, 50), U = new ResizeObserver(() => {
6334
- setTimeout(I, 10);
6339
+ }, M = setTimeout(R, 50), U = new ResizeObserver(() => {
6340
+ setTimeout(R, 10);
6335
6341
  });
6336
6342
  return m.current && U.observe(m.current), () => {
6337
- clearTimeout(T), U.disconnect();
6343
+ clearTimeout(M), U.disconnect();
6338
6344
  };
6339
6345
  }, [t, r]), !t || t.length === 0)
6340
6346
  return /* @__PURE__ */ o(
@@ -6371,26 +6377,26 @@ const ql = de.memo(function({
6371
6377
  }
6372
6378
  );
6373
6379
  const N = w[0], A = i?.timeDimensions?.[0]?.dimension || void 0, p = J(() => {
6374
- let I = [...t];
6375
- return A && (I = I.sort((T, U) => {
6376
- const O = T[A], K = U[A];
6380
+ let R = [...t];
6381
+ return A && (R = R.sort((M, U) => {
6382
+ const O = M[A], K = U[A];
6377
6383
  return O < K ? -1 : O > K ? 1 : 0;
6378
- })), I;
6384
+ })), R;
6379
6385
  }, [t, A]), { useLastCompletePeriod: v = !0, skipLastPeriod: S = !1 } = n, {
6380
6386
  filteredData: g,
6381
6387
  excludedIncompletePeriod: b,
6382
6388
  skippedLastPeriod: C,
6383
6389
  granularity: _
6384
- } = J(() => Pr(p, A, i, v, S), [p, A, i, v, S]), $ = g, M = J(() => $.map((T) => {
6385
- if (T[N] !== void 0)
6386
- return T[N];
6387
- const U = Object.keys(T).filter(
6388
- (O) => typeof T[O] == "number" && !isNaN(T[O])
6390
+ } = J(() => Pr(p, A, i, v, S), [p, A, i, v, S]), $ = g, T = J(() => $.map((M) => {
6391
+ if (M[N] !== void 0)
6392
+ return M[N];
6393
+ const U = Object.keys(M).filter(
6394
+ (O) => typeof M[O] == "number" && !isNaN(M[O])
6389
6395
  );
6390
6396
  if (U.length > 0)
6391
- return T[U[0]];
6392
- }).filter((T) => T != null && !isNaN(Number(T))).map((T) => Number(T)), [$, N]);
6393
- if (M.length === 0)
6397
+ return M[U[0]];
6398
+ }).filter((M) => M != null && !isNaN(Number(M))).map((M) => Number(M)), [$, N]);
6399
+ if (T.length === 0)
6394
6400
  return /* @__PURE__ */ k(
6395
6401
  "div",
6396
6402
  {
@@ -6427,31 +6433,31 @@ const ql = de.memo(function({
6427
6433
  }
6428
6434
  );
6429
6435
  const { avg: y, min: x, max: z } = J(() => {
6430
- const T = M.reduce((K, te) => K + te, 0) / M.length, U = Math.min(...M), O = Math.max(...M);
6431
- return { avg: T, min: U, max: O };
6432
- }, [M]), D = Le((I) => {
6436
+ const M = T.reduce((K, te) => K + te, 0) / T.length, U = Math.min(...T), O = Math.max(...T);
6437
+ return { avg: M, min: U, max: O };
6438
+ }, [T]), D = Le((R) => {
6433
6439
  if (n.formatValue)
6434
- return n.formatValue(I);
6435
- if (I == null)
6440
+ return n.formatValue(R);
6441
+ if (R == null)
6436
6442
  return "—";
6437
- const T = n.decimals ?? 0, U = n.prefix ?? "";
6443
+ const M = n.decimals ?? 0, U = n.prefix ?? "";
6438
6444
  let O;
6439
- return Math.abs(I) >= 1e9 ? O = (I / 1e9).toFixed(T) + "B" : Math.abs(I) >= 1e6 ? O = (I / 1e6).toFixed(T) + "M" : Math.abs(I) >= 1e3 ? O = (I / 1e3).toFixed(T) + "K" : O = I.toFixed(T), U + O;
6440
- }, [n.formatValue, n.decimals, n.prefix]), V = M.length === 1 ? M[0] : y, P = M.length > 1, Y = J(() => {
6445
+ return Math.abs(R) >= 1e9 ? O = (R / 1e9).toFixed(M) + "B" : Math.abs(R) >= 1e6 ? O = (R / 1e6).toFixed(M) + "M" : Math.abs(R) >= 1e3 ? O = (R / 1e3).toFixed(M) + "K" : O = R.toFixed(M), U + O;
6446
+ }, [n.formatValue, n.decimals, n.prefix]), V = T.length === 1 ? T[0] : y, P = T.length > 1, Y = J(() => {
6441
6447
  if (n.valueColorIndex !== void 0 && a?.colors) {
6442
- const I = n.valueColorIndex;
6443
- if (I >= 0 && I < a.colors.length)
6444
- return a.colors[I];
6448
+ const R = n.valueColorIndex;
6449
+ if (R >= 0 && R < a.colors.length)
6450
+ return a.colors[R];
6445
6451
  }
6446
6452
  return a?.colors?.[0] || "#1f2937";
6447
- }, [n.valueColorIndex, a?.colors]), X = J(() => wt(n?.target || ""), [n?.target]), F = X.length > 0 ? X[0] : null, L = F !== null ? Ps(V, F) : null, B = J(() => {
6453
+ }, [n.valueColorIndex, a?.colors]), X = J(() => wt(n?.target || ""), [n?.target]), F = X.length > 0 ? X[0] : null, L = F !== null ? Ys(V, F) : null, B = J(() => {
6448
6454
  if (L === null) return "#6B7280";
6449
6455
  if (L >= 0) {
6450
- const I = n.positiveColorIndex ?? 1;
6451
- return a?.colors?.[I] || "#10B981";
6456
+ const R = n.positiveColorIndex ?? 1;
6457
+ return a?.colors?.[R] || "#10B981";
6452
6458
  } else {
6453
- const I = n.negativeColorIndex ?? 7;
6454
- return a?.colors?.[I] || "#EF4444";
6459
+ const R = n.negativeColorIndex ?? 7;
6460
+ return a?.colors?.[R] || "#EF4444";
6455
6461
  }
6456
6462
  }, [L, n.positiveColorIndex, n.negativeColorIndex, a?.colors]);
6457
6463
  return /* @__PURE__ */ k(
@@ -6474,8 +6480,8 @@ const ql = de.memo(function({
6474
6480
  },
6475
6481
  children: [
6476
6482
  /* @__PURE__ */ o("span", { children: (() => {
6477
- const I = f(N);
6478
- return I && I.length > 1 ? I : N;
6483
+ const R = f(N);
6484
+ return R && R.length > 1 ? R : N;
6479
6485
  })() }),
6480
6486
  (b || C) && /* @__PURE__ */ o(
6481
6487
  "span",
@@ -6511,7 +6517,7 @@ const ql = de.memo(function({
6511
6517
  color: B,
6512
6518
  lineHeight: "1.2"
6513
6519
  },
6514
- children: Hs(L, 1)
6520
+ children: js(L, 1)
6515
6521
  }
6516
6522
  ),
6517
6523
  /* @__PURE__ */ k(
@@ -6545,7 +6551,7 @@ const ql = de.memo(function({
6545
6551
  P && /* @__PURE__ */ o("div", { className: "mt-4", children: /* @__PURE__ */ o(
6546
6552
  fn,
6547
6553
  {
6548
- values: M,
6554
+ values: T,
6549
6555
  min: x,
6550
6556
  max: z,
6551
6557
  color: Y,
@@ -6558,11 +6564,11 @@ const ql = de.memo(function({
6558
6564
  ]
6559
6565
  }
6560
6566
  );
6561
- }), Wc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6567
+ }), Kc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6562
6568
  __proto__: null,
6563
- default: ql
6569
+ default: Ql
6564
6570
  }, Symbol.toStringTag, { value: "Module" }));
6565
- function Zl({
6571
+ function Jl({
6566
6572
  values: e,
6567
6573
  lastValue: t,
6568
6574
  positiveColor: r,
@@ -6605,13 +6611,13 @@ function Zl({
6605
6611
  }
6606
6612
  ),
6607
6613
  c.map((v, S) => {
6608
- const g = Math.abs(v) / A, b = Math.max(2, g * (a - 4)), C = v >= 0, _ = S === d.length - 1, $ = C ? r : n, M = S * (N + f);
6614
+ const g = Math.abs(v) / A, b = Math.max(2, g * (a - 4)), C = v >= 0, _ = S === d.length - 1, $ = C ? r : n, T = S * (N + f);
6609
6615
  return /* @__PURE__ */ o(
6610
6616
  "div",
6611
6617
  {
6612
6618
  className: "absolute rounded-xs",
6613
6619
  style: {
6614
- left: `${M}px`,
6620
+ left: `${T}px`,
6615
6621
  width: `${N}px`,
6616
6622
  height: `${b}px`,
6617
6623
  backgroundColor: $,
@@ -6647,7 +6653,7 @@ function Zl({
6647
6653
  )
6648
6654
  ] });
6649
6655
  }
6650
- const Ql = de.memo(function({
6656
+ const ec = de.memo(function({
6651
6657
  data: t,
6652
6658
  chartConfig: r,
6653
6659
  displayConfig: n = {},
@@ -6656,12 +6662,12 @@ const Ql = de.memo(function({
6656
6662
  colorPalette: a
6657
6663
  }) {
6658
6664
  const [l, d] = Z(32), [c, u] = Z(250), m = ye(null), h = ye(null), f = ve();
6659
- if (Me(() => {
6660
- const T = () => {
6665
+ if (Te(() => {
6666
+ const M = () => {
6661
6667
  if (m.current) {
6662
6668
  const te = m.current.getBoundingClientRect(), fe = te.width, me = te.height;
6663
6669
  if (fe > 0 && me > 0) {
6664
- const we = fe / 4, R = me / 4, E = Math.min(we, R), q = Math.max(28, Math.min(E, 140));
6670
+ const we = fe / 4, E = me / 4, I = Math.min(we, E), q = Math.max(28, Math.min(I, 140));
6665
6671
  d(q), setTimeout(() => {
6666
6672
  if (h.current) {
6667
6673
  const ie = h.current.getBoundingClientRect().width, xe = fe - 100, ae = Math.max(
@@ -6673,8 +6679,8 @@ const Ql = de.memo(function({
6673
6679
  }, 10);
6674
6680
  }
6675
6681
  }
6676
- }, U = setTimeout(T, 50), O = new ResizeObserver(() => {
6677
- setTimeout(T, 10);
6682
+ }, U = setTimeout(M, 50), O = new ResizeObserver(() => {
6683
+ setTimeout(M, 10);
6678
6684
  });
6679
6685
  return m.current && O.observe(m.current), () => {
6680
6686
  clearTimeout(U), O.disconnect();
@@ -6715,8 +6721,8 @@ const Ql = de.memo(function({
6715
6721
  );
6716
6722
  const A = w[0], p = N[0];
6717
6723
  let v = [...t];
6718
- p && (v = v.sort((T, U) => {
6719
- const O = T[p], K = U[p];
6724
+ p && (v = v.sort((M, U) => {
6725
+ const O = M[p], K = U[p];
6720
6726
  return O < K ? -1 : O > K ? 1 : 0;
6721
6727
  }));
6722
6728
  const { useLastCompletePeriod: S = !0, skipLastPeriod: g = !1 } = n, {
@@ -6730,7 +6736,7 @@ const Ql = de.memo(function({
6730
6736
  i,
6731
6737
  S,
6732
6738
  g
6733
- ), y = b.map((T) => T[A]).filter((T) => T != null && !isNaN(Number(T))).map((T) => Number(T));
6739
+ ), y = b.map((M) => M[A]).filter((M) => M != null && !isNaN(Number(M))).map((M) => Number(M));
6734
6740
  if (y.length < 2)
6735
6741
  return /* @__PURE__ */ o(
6736
6742
  "div",
@@ -6753,29 +6759,29 @@ const Ql = de.memo(function({
6753
6759
  ] })
6754
6760
  }
6755
6761
  );
6756
- const x = y[y.length - 1], z = y[y.length - 2], D = x - z, V = z !== 0 ? D / Math.abs(z) * 100 : 0, P = D >= 0, Y = (T) => {
6762
+ const x = y[y.length - 1], z = y[y.length - 2], D = x - z, V = z !== 0 ? D / Math.abs(z) * 100 : 0, P = D >= 0, Y = (M) => {
6757
6763
  if (n.formatValue)
6758
- return n.formatValue(T);
6759
- if (T == null)
6764
+ return n.formatValue(M);
6765
+ if (M == null)
6760
6766
  return "—";
6761
6767
  const U = n.decimals ?? 0, O = n.prefix ?? "";
6762
6768
  let K;
6763
- return Math.abs(T) >= 1e9 ? K = (T / 1e9).toFixed(U) + "B" : Math.abs(T) >= 1e6 ? K = (T / 1e6).toFixed(U) + "M" : Math.abs(T) >= 1e3 ? K = (T / 1e3).toFixed(U) + "K" : K = T.toFixed(U), O + K;
6769
+ return Math.abs(M) >= 1e9 ? K = (M / 1e9).toFixed(U) + "B" : Math.abs(M) >= 1e6 ? K = (M / 1e6).toFixed(U) + "M" : Math.abs(M) >= 1e3 ? K = (M / 1e3).toFixed(U) + "K" : K = M.toFixed(U), O + K;
6764
6770
  }, X = () => {
6765
6771
  if (n.positiveColorIndex !== void 0 && a?.colors) {
6766
- const T = n.positiveColorIndex;
6767
- if (T >= 0 && T < a.colors.length)
6768
- return a.colors[T];
6772
+ const M = n.positiveColorIndex;
6773
+ if (M >= 0 && M < a.colors.length)
6774
+ return a.colors[M];
6769
6775
  }
6770
6776
  return "#10b981";
6771
6777
  }, F = () => {
6772
6778
  if (n.negativeColorIndex !== void 0 && a?.colors) {
6773
- const T = n.negativeColorIndex;
6774
- if (T >= 0 && T < a.colors.length)
6775
- return a.colors[T];
6779
+ const M = n.negativeColorIndex;
6780
+ if (M >= 0 && M < a.colors.length)
6781
+ return a.colors[M];
6776
6782
  }
6777
6783
  return "#ef4444";
6778
- }, L = X(), B = F(), I = P ? L : B;
6784
+ }, L = X(), B = F(), R = P ? L : B;
6779
6785
  return /* @__PURE__ */ k(
6780
6786
  "div",
6781
6787
  {
@@ -6796,8 +6802,8 @@ const Ql = de.memo(function({
6796
6802
  },
6797
6803
  children: [
6798
6804
  /* @__PURE__ */ o("span", { children: (() => {
6799
- const T = f(A);
6800
- return T && T.length > 1 ? T : A;
6805
+ const M = f(A);
6806
+ return M && M.length > 1 ? M : A;
6801
6807
  })() }),
6802
6808
  (C || _) && /* @__PURE__ */ o(
6803
6809
  "span",
@@ -6836,7 +6842,7 @@ const Ql = de.memo(function({
6836
6842
  {
6837
6843
  className: "font-bold",
6838
6844
  style: {
6839
- color: I,
6845
+ color: R,
6840
6846
  fontSize: `${l * 0.35}px`
6841
6847
  },
6842
6848
  children: P ? "▲" : "▼"
@@ -6849,7 +6855,7 @@ const Ql = de.memo(function({
6849
6855
  className: "font-bold leading-tight",
6850
6856
  style: {
6851
6857
  fontSize: `${l * 0.35}px`,
6852
- color: I
6858
+ color: R
6853
6859
  },
6854
6860
  children: [
6855
6861
  P ? "+" : "",
@@ -6863,7 +6869,7 @@ const Ql = de.memo(function({
6863
6869
  className: "font-semibold leading-tight",
6864
6870
  style: {
6865
6871
  fontSize: `${l * 0.28}px`,
6866
- color: I,
6872
+ color: R,
6867
6873
  opacity: 0.8
6868
6874
  },
6869
6875
  children: [
@@ -6889,7 +6895,7 @@ const Ql = de.memo(function({
6889
6895
  }
6890
6896
  ),
6891
6897
  n.showHistogram !== !1 && y.length > 2 && /* @__PURE__ */ o("div", { className: "mt-2 w-full flex justify-center overflow-hidden", children: /* @__PURE__ */ o(
6892
- Zl,
6898
+ Jl,
6893
6899
  {
6894
6900
  values: y,
6895
6901
  lastValue: x,
@@ -6903,10 +6909,10 @@ const Ql = de.memo(function({
6903
6909
  ]
6904
6910
  }
6905
6911
  );
6906
- }), Gc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6912
+ }), Xc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6907
6913
  __proto__: null,
6908
- default: Ql
6909
- }, Symbol.toStringTag, { value: "Module" })), Jl = de.memo(function({
6914
+ default: ec
6915
+ }, Symbol.toStringTag, { value: "Module" })), tc = de.memo(function({
6910
6916
  data: t,
6911
6917
  chartConfig: r,
6912
6918
  displayConfig: n = {},
@@ -6914,13 +6920,13 @@ const Ql = de.memo(function({
6914
6920
  colorPalette: s
6915
6921
  }) {
6916
6922
  const [a, l] = Z(28), [d, c] = Z(0), u = ye(null), m = ye(null), h = ve();
6917
- if (Me(() => {
6923
+ if (Te(() => {
6918
6924
  const x = () => {
6919
6925
  if (u.current) {
6920
6926
  const P = u.current.getBoundingClientRect(), Y = P.width, X = P.height;
6921
6927
  if (Y > 0 && X > 0) {
6922
- const F = Y / 8, L = X / 5, B = Math.min(F, L), I = Math.max(18, Math.min(B, 80));
6923
- l(I);
6928
+ const F = Y / 8, L = X / 5, B = Math.min(F, L), R = Math.max(18, Math.min(B, 80));
6929
+ l(R);
6924
6930
  }
6925
6931
  }
6926
6932
  if (m.current) {
@@ -7062,10 +7068,10 @@ const Ql = de.memo(function({
7062
7068
  ]
7063
7069
  }
7064
7070
  );
7065
- }), Kc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7071
+ }), qc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7066
7072
  __proto__: null,
7067
- default: Jl
7068
- }, Symbol.toStringTag, { value: "Module" })), ec = de.memo(function({
7073
+ default: tc
7074
+ }, Symbol.toStringTag, { value: "Module" })), rc = de.memo(function({
7069
7075
  displayConfig: t = {},
7070
7076
  height: r = "100%",
7071
7077
  colorPalette: n
@@ -7106,11 +7112,11 @@ const Ql = de.memo(function({
7106
7112
  });
7107
7113
  continue;
7108
7114
  }
7109
- const M = C.match(/^\d+\.\s+(.*)$/);
7110
- if (M) {
7115
+ const T = C.match(/^\d+\.\s+(.*)$/);
7116
+ if (T) {
7111
7117
  (!g || !g.ordered) && (g && S.push(g), g = { type: "list", ordered: !0, children: [] }), g.children.push({
7112
7118
  type: "listItem",
7113
- children: f(M[1]),
7119
+ children: f(T[1]),
7114
7120
  parentOrdered: !0
7115
7121
  });
7116
7122
  continue;
@@ -7182,13 +7188,13 @@ const Ql = de.memo(function({
7182
7188
  );
7183
7189
  case "header": {
7184
7190
  const g = (C, _) => {
7185
- const $ = "font-bold", M = {
7191
+ const $ = "font-bold", T = {
7186
7192
  1: "mb-4",
7187
7193
  2: "mb-3",
7188
7194
  3: "mb-2"
7189
7195
  };
7190
7196
  let y = "";
7191
- return _ === "small" ? y = { 1: "text-lg", 2: "text-base", 3: "text-sm" }[C] || "text-sm" : _ === "large" ? y = { 1: "text-5xl", 2: "text-4xl", 3: "text-3xl" }[C] || "text-3xl" : y = { 1: "text-3xl", 2: "text-2xl", 3: "text-xl" }[C] || "text-xl", `${$} ${y} ${M[C]}`;
7197
+ return _ === "small" ? y = { 1: "text-lg", 2: "text-base", 3: "text-sm" }[C] || "text-sm" : _ === "large" ? y = { 1: "text-5xl", 2: "text-4xl", 3: "text-3xl" }[C] || "text-3xl" : y = { 1: "text-3xl", 2: "text-2xl", 3: "text-xl" }[C] || "text-xl", `${$} ${y} ${T[C]}`;
7192
7198
  }, b = `h${p.level}`;
7193
7199
  return /* @__PURE__ */ o(
7194
7200
  b,
@@ -7315,100 +7321,100 @@ const Ql = de.memo(function({
7315
7321
  children: A.map((p, v) => N(p, v))
7316
7322
  }
7317
7323
  );
7318
- }), Xc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7324
+ }), Zc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7319
7325
  __proto__: null,
7320
- default: ec
7326
+ default: rc
7321
7327
  }, Symbol.toStringTag, { value: "Module" }));
7322
7328
  export {
7323
- ns as $,
7324
- Us as A,
7325
- Ys as B,
7326
- ac as C,
7327
- Er as D,
7328
- Ks as E,
7329
- Yl as F,
7330
- Ul as G,
7329
+ ss as $,
7330
+ Ws as A,
7331
+ Us as B,
7332
+ lc as C,
7333
+ Ir as D,
7334
+ qs as E,
7335
+ Ul as F,
7336
+ Wl as G,
7331
7337
  G as H,
7332
7338
  sr as I,
7333
7339
  je as J,
7334
- ji as K,
7340
+ Ui as K,
7335
7341
  ir as L,
7336
- Zi as M,
7337
- vs as N,
7338
- fs as O,
7339
- Bs as P,
7340
- us as Q,
7341
- Gs as R,
7342
- Ws as S,
7343
- Lc as T,
7344
- ds as U,
7345
- cs as V,
7346
- ls as W,
7347
- os as X,
7348
- as as Y,
7349
- ss as Z,
7350
- is as _,
7351
- Rr as a,
7352
- rs as a0,
7353
- ts as a1,
7354
- es as a2,
7355
- Ji as a3,
7356
- Qi as a4,
7357
- _c as a5,
7358
- hc as a6,
7359
- pc as a7,
7360
- xc as a8,
7361
- yc as a9,
7362
- gc as aa,
7363
- bc as ab,
7364
- vc as ac,
7365
- wc as ad,
7366
- Nc as ae,
7367
- Ac as af,
7368
- Sc as ag,
7369
- kc as ah,
7342
+ Ji as M,
7343
+ Ns as N,
7344
+ hs as O,
7345
+ Gs as P,
7346
+ ms as Q,
7347
+ Xs as R,
7348
+ Ks as S,
7349
+ Rc as T,
7350
+ fs as U,
7351
+ us as V,
7352
+ ds as W,
7353
+ cs as X,
7354
+ ls as Y,
7355
+ os as Z,
7356
+ as as _,
7357
+ Er as a,
7358
+ is as a0,
7359
+ ns as a1,
7360
+ rs as a2,
7361
+ ts as a3,
7362
+ es as a4,
7363
+ Dc as a5,
7364
+ xc as a6,
7365
+ yc as a7,
7366
+ gc as a8,
7367
+ bc as a9,
7368
+ vc as aa,
7369
+ wc as ab,
7370
+ Nc as ac,
7371
+ Ac as ad,
7372
+ Sc as ae,
7373
+ kc as af,
7374
+ Tc as ag,
7375
+ Fc as ah,
7370
7376
  Mc as ai,
7371
- Fc as aj,
7372
- Tc as ak,
7373
- Rc as al,
7374
- Ic as am,
7375
- Ec as an,
7376
- Vc as ao,
7377
- Oc as ap,
7378
- Pc as aq,
7379
- Hc as ar,
7380
- Yc as as,
7381
- jc as at,
7382
- Uc as au,
7383
- Bc as av,
7384
- Wc as aw,
7385
- Gc as ax,
7386
- Kc as ay,
7387
- Xc as az,
7388
- Bi as b,
7389
- Gi as c,
7377
+ _c as aj,
7378
+ $c as ak,
7379
+ Ic as al,
7380
+ Vc as am,
7381
+ Oc as an,
7382
+ Pc as ao,
7383
+ Hc as ap,
7384
+ Yc as aq,
7385
+ jc as ar,
7386
+ Uc as as,
7387
+ Bc as at,
7388
+ Wc as au,
7389
+ Gc as av,
7390
+ Kc as aw,
7391
+ Xc as ax,
7392
+ qc as ay,
7393
+ Zc as az,
7394
+ Wi as b,
7395
+ Xi as c,
7390
7396
  ve as d,
7391
- Ei as e,
7392
- bs as f,
7393
- $c as g,
7394
- Dc as h,
7397
+ Vi as e,
7398
+ ws as f,
7399
+ Cc as g,
7400
+ zc as h,
7395
7401
  Ye as i,
7396
- gs as j,
7397
- zc as k,
7402
+ vs as j,
7403
+ Ec as k,
7398
7404
  bt as l,
7399
- lc as m,
7400
- cc as n,
7401
- dc as o,
7402
- uc as p,
7403
- oc as q,
7404
- Cc as r,
7405
- ys as s,
7406
- fc as t,
7407
- Ki as u,
7408
- Xi as v,
7405
+ dc as m,
7406
+ uc as n,
7407
+ fc as o,
7408
+ mc as p,
7409
+ cc as q,
7410
+ Lc as r,
7411
+ bs as s,
7412
+ hc as t,
7413
+ qi as u,
7414
+ Zi as v,
7409
7415
  Or as w,
7410
7416
  ue as x,
7411
- mc as y,
7412
- js as z
7417
+ pc as y,
7418
+ Bs as z
7413
7419
  };
7414
- //# sourceMappingURL=charts-BympPNAT.js.map
7420
+ //# sourceMappingURL=charts--hFH-bsu.js.map