@divami-artefacts/ai-design-system 1.0.7 → 1.0.9

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 (84) hide show
  1. package/dist/components/areaLineChart/AreaLineChart.d.ts +2 -0
  2. package/dist/components/areaLineChart/index.d.ts +2 -0
  3. package/dist/components/{quotationTrend → areaLineChart}/types.d.ts +2 -2
  4. package/dist/components/balanceScaleChart/BalanceScaleChart.d.ts +2 -0
  5. package/dist/components/balanceScaleChart/index.d.ts +2 -0
  6. package/dist/components/balanceScaleChart/types.d.ts +6 -0
  7. package/dist/components/common/ChartEmptyState.d.ts +8 -0
  8. package/dist/components/dotMatrixChart/DotMatrixChart.d.ts +2 -0
  9. package/dist/components/dotMatrixChart/index.d.ts +2 -0
  10. package/dist/components/{ewCategory → dotMatrixChart}/types.d.ts +2 -2
  11. package/dist/components/hubAndSpokeRadialChart/HubAndSpokeRadialChart.d.ts +2 -0
  12. package/dist/components/hubAndSpokeRadialChart/index.d.ts +2 -0
  13. package/dist/components/{statusArc → hubAndSpokeRadialChart}/types.d.ts +1 -1
  14. package/dist/components/multiMetricConstellationChart/MultiMetricConstellationChart.d.ts +2 -0
  15. package/dist/components/multiMetricConstellationChart/index.d.ts +2 -0
  16. package/dist/components/multiMetricConstellationChart/types.d.ts +5 -0
  17. package/dist/components/progressRaceChart/ProgressRaceChart.d.ts +2 -0
  18. package/dist/components/progressRaceChart/index.d.ts +2 -0
  19. package/dist/components/{contractBars → progressRaceChart}/types.d.ts +2 -2
  20. package/dist/components/proportionalBandChart/ProportionalBandChart.d.ts +2 -0
  21. package/dist/components/proportionalBandChart/index.d.ts +2 -0
  22. package/dist/components/{severityBands → proportionalBandChart}/types.d.ts +1 -1
  23. package/dist/components/radialFanTreeChart/RadialFanTreeChart.d.ts +2 -0
  24. package/dist/components/radialFanTreeChart/index.d.ts +2 -0
  25. package/dist/components/{nceTree → radialFanTreeChart}/types.d.ts +2 -2
  26. package/dist/components/rankedCardLeaderboard/RankedCardLeaderboard.d.ts +2 -0
  27. package/dist/components/rankedCardLeaderboard/index.d.ts +2 -0
  28. package/dist/components/{contractorRank → rankedCardLeaderboard}/types.d.ts +2 -2
  29. package/dist/components/segmentedSplitBarChart/SegmentedSplitBarChart.d.ts +2 -0
  30. package/dist/components/segmentedSplitBarChart/index.d.ts +2 -0
  31. package/dist/components/{variationSplit → segmentedSplitBarChart}/types.d.ts +2 -2
  32. package/dist/components/semiCircularGaugeChart/SemiCircularGaugeChart.d.ts +2 -0
  33. package/dist/components/semiCircularGaugeChart/index.d.ts +2 -0
  34. package/dist/components/{compensationGauge → semiCircularGaugeChart}/types.d.ts +2 -2
  35. package/dist/components/stackedHorizontalBarChart/StackedHorizontalBarChart.d.ts +2 -0
  36. package/dist/components/stackedHorizontalBarChart/index.d.ts +2 -0
  37. package/dist/components/{contractValueOrb → stackedHorizontalBarChart}/types.d.ts +1 -1
  38. package/dist/components/trend/Trend.d.ts +1 -1
  39. package/dist/components/trend/types.d.ts +1 -1
  40. package/dist/components/weeklyFlow/WeeklyFlow.d.ts +1 -1
  41. package/dist/components/weeklyFlow/types.d.ts +1 -1
  42. package/dist/index.cjs +1 -1
  43. package/dist/index.js +614 -520
  44. package/dist/mocks/workspace.mock.d.ts +3 -3
  45. package/dist/types/index.d.ts +28 -28
  46. package/package.json +8 -4
  47. package/dist/components/commitmentRace/CommitmentRace.d.ts +0 -2
  48. package/dist/components/commitmentRace/index.d.ts +0 -2
  49. package/dist/components/commitmentRace/types.d.ts +0 -5
  50. package/dist/components/compensationGauge/CompensationGauge.d.ts +0 -2
  51. package/dist/components/compensationGauge/index.d.ts +0 -2
  52. package/dist/components/contractBars/ContractBars.d.ts +0 -2
  53. package/dist/components/contractBars/index.d.ts +0 -2
  54. package/dist/components/contractValueOrb/ContractValueOrb.d.ts +0 -2
  55. package/dist/components/contractValueOrb/index.d.ts +0 -2
  56. package/dist/components/contractorRank/ContractorRank.d.ts +0 -2
  57. package/dist/components/contractorRank/index.d.ts +0 -2
  58. package/dist/components/ewCategory/EWCategory.d.ts +0 -2
  59. package/dist/components/ewCategory/index.d.ts +0 -2
  60. package/dist/components/nceTree/NCETree.d.ts +0 -2
  61. package/dist/components/nceTree/index.d.ts +0 -2
  62. package/dist/components/quotationBalance/QuotationBalance.d.ts +0 -2
  63. package/dist/components/quotationBalance/index.d.ts +0 -2
  64. package/dist/components/quotationBalance/types.d.ts +0 -6
  65. package/dist/components/quotationTrend/QuotationTrend.d.ts +0 -2
  66. package/dist/components/quotationTrend/index.d.ts +0 -2
  67. package/dist/components/severityBands/SeverityBands.d.ts +0 -2
  68. package/dist/components/severityBands/index.d.ts +0 -2
  69. package/dist/components/statusArc/StatusArc.d.ts +0 -2
  70. package/dist/components/statusArc/index.d.ts +0 -2
  71. package/dist/components/variationSplit/VariationSplit.d.ts +0 -2
  72. package/dist/components/variationSplit/index.d.ts +0 -2
  73. /package/dist/components/{commitmentRace → areaLineChart}/styles.d.ts +0 -0
  74. /package/dist/components/{compensationGauge → balanceScaleChart}/styles.d.ts +0 -0
  75. /package/dist/components/{contractBars → dotMatrixChart}/styles.d.ts +0 -0
  76. /package/dist/components/{contractorRank → hubAndSpokeRadialChart}/styles.d.ts +0 -0
  77. /package/dist/components/{ewCategory → multiMetricConstellationChart}/styles.d.ts +0 -0
  78. /package/dist/components/{nceTree → progressRaceChart}/styles.d.ts +0 -0
  79. /package/dist/components/{quotationBalance → proportionalBandChart}/styles.d.ts +0 -0
  80. /package/dist/components/{quotationTrend → radialFanTreeChart}/styles.d.ts +0 -0
  81. /package/dist/components/{severityBands → rankedCardLeaderboard}/styles.d.ts +0 -0
  82. /package/dist/components/{statusArc → segmentedSplitBarChart}/styles.d.ts +0 -0
  83. /package/dist/components/{variationSplit → semiCircularGaugeChart}/styles.d.ts +0 -0
  84. /package/dist/components/{contractValueOrb → stackedHorizontalBarChart}/styles.d.ts +0 -0
package/dist/index.js CHANGED
@@ -430,6 +430,26 @@ function ie({ rows: e = [], className: t, colors: r }) {
430
430
  });
431
431
  }
432
432
  //#endregion
433
+ //#region src/components/common/ChartEmptyState.tsx
434
+ function F({ width: e, height: t, message: n = "No data available", "data-testid": r }) {
435
+ return /* @__PURE__ */ s("div", {
436
+ "data-testid": r,
437
+ style: {
438
+ width: e,
439
+ height: t,
440
+ display: "flex",
441
+ alignItems: "center",
442
+ justifyContent: "center",
443
+ borderRadius: 8,
444
+ background: "rgba(255,255,255,0.03)",
445
+ color: "rgba(255,255,255,0.35)",
446
+ fontSize: 14,
447
+ fontFamily: "'Satoshi Variable', 'DM Sans', sans-serif"
448
+ },
449
+ children: n
450
+ });
451
+ }
452
+ //#endregion
433
453
  //#region src/components/common/ToggleButton.tsx
434
454
  function ae({ expanded: e, onToggle: t, labelExpanded: n = "View Less", labelCollapsed: r = "View More", "data-testid": i }) {
435
455
  return /* @__PURE__ */ c("button", {
@@ -473,8 +493,8 @@ function ae({ expanded: e, onToggle: t, labelExpanded: n = "View Less", labelCol
473
493
  });
474
494
  }
475
495
  //#endregion
476
- //#region src/components/commitmentRace/CommitmentRace.tsx
477
- var F = 680, I = 42, oe = 10, se = 24, ce = 24, le = 8, ue = [
496
+ //#region src/components/progressRaceChart/ProgressRaceChart.tsx
497
+ var I = 680, L = 42, oe = 10, se = 24, ce = 24, le = 8, ue = [
478
498
  u.green,
479
499
  u.blue,
480
500
  u.cyan,
@@ -485,44 +505,48 @@ function de(e) {
485
505
  let t = Math.abs(e), n = e < 0 ? "-" : "";
486
506
  return t >= 1e6 ? `${n}£${(t / 1e6).toFixed(1)}M` : t >= 1e3 ? `${n}£${(t / 1e3).toFixed(1)}K` : `${n}£${t.toFixed(0)}`;
487
507
  }
488
- function fe({ contractors: e = [], "data-testid": t }) {
489
- let r = a(null), l = a(0), d = a(/* @__PURE__ */ new Map()), [p, h] = o(!1), g = i(() => [...e].sort((e, t) => (t.percentage ?? 0) - (e.percentage ?? 0)), [e]), x = i(() => p ? g : g.slice(0, le), [g, p]), T = x.length, D = se + ce + T * I + Math.max(0, T - 1) * oe, { hoveredRef: O, tooltip: k, hitZonesRef: A } = C(r, {
490
- width: F,
491
- height: D
508
+ function fe({ items: e = [], "data-testid": t }) {
509
+ let r = a(null), l = a(0), d = a(/* @__PURE__ */ new Map()), [p, h] = o(!1), g = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), x = i(() => [...g].sort((e, t) => (t.percentage ?? 0) - (e.percentage ?? 0)), [g]), T = i(() => p ? x : x.slice(0, le), [x, p]), D = T.length, O = se + ce + D * L + Math.max(0, D - 1) * oe, { hoveredRef: k, tooltip: A, hitZonesRef: j } = C(r, {
510
+ width: I,
511
+ height: O
492
512
  });
493
513
  return n(() => {
494
514
  let e = r.current;
495
515
  if (!e) return;
496
- let t = _(e, F, D);
516
+ let t = _(e, I, O);
497
517
  l.current = 0;
498
- let n = F * .13, i = F * .08, a = F - n - i, o, s = () => {
518
+ let n = I * .13, i = I * .08, a = I - n - i, o, s = () => {
499
519
  l.current++;
500
520
  let e = l.current;
501
- t.clearRect(0, 0, F, D), A.current = [], d.current.forEach((e, t) => {
502
- let n = t === O.current ? 1 : 0, r = e + (n - e) * .12;
521
+ t.clearRect(0, 0, I, O), j.current = [], d.current.forEach((e, t) => {
522
+ let n = t === k.current ? 1 : 0, r = e + (n - e) * .12;
503
523
  Math.abs(r - n) < .005 ? n === 0 ? d.current.delete(t) : d.current.set(t, 1) : d.current.set(t, r);
504
- }), O.current && !d.current.has(O.current) && d.current.set(O.current, 0), y(t, F, D, e, 40, m(u.blue, .04)), x.forEach((r, i) => {
505
- let o = ue[i % ue.length], s = d.current.get(r.id) ?? 0, c = se + i * (I + oe);
506
- t.fillStyle = m(o, .04 + s * .04), t.beginPath(), t.roundRect(n, c, a, I, 3), t.fill(), t.strokeStyle = m(o, .08), t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(n, c + I / 2), t.lineTo(n + a, c + I / 2), t.stroke(), t.setLineDash([]);
524
+ }), k.current && !d.current.has(k.current) && d.current.set(k.current, 0), y(t, I, O, e, 40, m(u.blue, .04)), T.forEach((r, i) => {
525
+ let o = ue[i % ue.length], s = d.current.get(r.id) ?? 0, c = se + i * (L + oe);
526
+ t.fillStyle = m(o, .04 + s * .04), t.beginPath(), t.roundRect(n, c, a, L, 3), t.fill(), t.strokeStyle = m(o, .08), t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(n, c + L / 2), t.lineTo(n + a, c + L / 2), t.stroke(), t.setLineDash([]);
507
527
  let l = (r.percentage ?? 0) / 100, u = n + a * Math.min(l, l * E(Math.min(1, e * .005)));
508
528
  if (u > n + 4) {
509
529
  let e = t.createLinearGradient(n, 0, u, 0);
510
- e.addColorStop(0, m(o, .02)), e.addColorStop(1, m(o, .25 + s * .15)), t.fillStyle = e, t.beginPath(), t.roundRect(n, c + 2, u - n, I - 4, 2), t.fill();
530
+ e.addColorStop(0, m(o, .02)), e.addColorStop(1, m(o, .25 + s * .15)), t.fillStyle = e, t.beginPath(), t.roundRect(n, c + 2, u - n, L - 4, 2), t.fill();
511
531
  }
512
- v(t, u, c + I / 2, 18 + s * 8, o, .3 + s * .2), t.beginPath(), t.arc(u, c + I / 2, 5 + s * 2, 0, Math.PI * 2), t.fillStyle = m(o, .9), t.fill();
532
+ v(t, u, c + L / 2, 18 + s * 8, o, .3 + s * .2), t.beginPath(), t.arc(u, c + L / 2, 5 + s * 2, 0, Math.PI * 2), t.fillStyle = m(o, .9), t.fill();
513
533
  let p = {
514
534
  label: r.name,
515
535
  value: `${r.percentage ?? 0}% commitment`,
516
536
  sublabel: `Base: ${de(r.base ?? 0)} · Variations: ${de(r.variation ?? 0)}`,
517
537
  color: o
518
538
  };
519
- w(A.current, r.id, u, c + I / 2, 14, p), t.font = "bold " + f.font, t.fillStyle = m(o, .9 + s * .1), t.textAlign = "left", t.textBaseline = "middle", t.fillText(`${r.percentage ?? 0}%`, u + 10, c + I / 2), t.font = `${s > 0 ? "bold " : ""}` + f.font, t.fillStyle = s > 0 ? o : f.color, t.textAlign = "right", t.fillText(r.abbreviation ?? r.name.slice(0, 6), n - 8, c + I / 2);
520
- }), t.strokeStyle = m(u.t3, .3), t.lineWidth = 1, t.setLineDash([]), t.beginPath(), t.moveTo(n + a, se), t.lineTo(n + a, se + (T - 1) * (I + oe) + I), t.stroke(), b(t, F, D, e, .015), o = requestAnimationFrame(s);
539
+ w(j.current, r.id, u, c + L / 2, 14, p), t.font = "bold " + f.font, t.fillStyle = m(o, .9 + s * .1), t.textAlign = "left", t.textBaseline = "middle", t.fillText(`${r.percentage ?? 0}%`, u + 10, c + L / 2), t.font = `${s > 0 ? "bold " : ""}` + f.font, t.fillStyle = s > 0 ? o : f.color, t.textAlign = "right", t.fillText(r.abbreviation ?? r.name.slice(0, 6), n - 8, c + L / 2);
540
+ }), t.strokeStyle = m(u.t3, .3), t.lineWidth = 1, t.setLineDash([]), t.beginPath(), t.moveTo(n + a, se), t.lineTo(n + a, se + (D - 1) * (L + oe) + L), t.stroke(), b(t, I, O, e, .015), o = requestAnimationFrame(s);
521
541
  };
522
542
  return s(), () => cancelAnimationFrame(o);
523
- }, [x, D]), /* @__PURE__ */ c("div", {
543
+ }, [T, O]), x.length === 0 ? /* @__PURE__ */ s(F, {
544
+ width: I,
545
+ height: 160,
546
+ "data-testid": t
547
+ }) : /* @__PURE__ */ c("div", {
524
548
  "data-testid": t,
525
- style: { width: F },
549
+ style: { width: I },
526
550
  children: [/* @__PURE__ */ c("div", {
527
551
  style: { position: "relative" },
528
552
  children: [/* @__PURE__ */ s("canvas", {
@@ -530,17 +554,17 @@ function fe({ contractors: e = [], "data-testid": t }) {
530
554
  role: "img",
531
555
  "aria-label": "Commitment race — contractors ranked by commitment percentage",
532
556
  style: {
533
- width: F,
534
- height: D,
557
+ width: I,
558
+ height: O,
535
559
  display: "block",
536
560
  borderRadius: 8
537
561
  }
538
562
  }), /* @__PURE__ */ s(S, {
539
- ...k,
540
- parentW: F,
541
- parentH: D
563
+ ...A,
564
+ parentW: I,
565
+ parentH: O
542
566
  })]
543
- }), e.length > le && /* @__PURE__ */ s("div", {
567
+ }), g.length > le && /* @__PURE__ */ s("div", {
544
568
  style: { marginTop: 8 },
545
569
  children: /* @__PURE__ */ s(ae, {
546
570
  expanded: p,
@@ -550,9 +574,9 @@ function fe({ contractors: e = [], "data-testid": t }) {
550
574
  });
551
575
  }
552
576
  //#endregion
553
- //#region src/components/compensationGauge/CompensationGauge.tsx
577
+ //#region src/components/semiCircularGaugeChart/SemiCircularGaugeChart.tsx
554
578
  var pe = 480, me = 340;
555
- function he({ pct: e, confirmed: t, total: r, "data-testid": i }) {
579
+ function he({ value: e, confirmed: t, total: r, "data-testid": i }) {
556
580
  let o = a(null), c = a(0);
557
581
  return n(() => {
558
582
  let n = o.current;
@@ -670,42 +694,42 @@ function ge(e, t, r, i, o = !0, s = {}) {
670
694
  ]);
671
695
  }
672
696
  //#endregion
673
- //#region src/components/contractBars/ContractBars.tsx
674
- var L = 780, _e = 234, ve = 130, ye = 52, be = [
697
+ //#region src/components/multiMetricConstellationChart/MultiMetricConstellationChart.tsx
698
+ var R = 780, z = 234, _e = 130, ve = 52, ye = [
675
699
  u.blue,
676
700
  u.cyan,
677
701
  u.amber,
678
702
  u.purple,
679
703
  u.green
680
- ], xe = [
704
+ ], be = [
681
705
  "Base Value",
682
706
  "Variations",
683
707
  "Commitment"
684
- ], Se = [
708
+ ], xe = [
685
709
  "Base",
686
710
  "Var",
687
711
  "Commit"
688
712
  ];
689
- function Ce({ contractors: e = [], "data-testid": t }) {
713
+ function Se({ items: e = [], "data-testid": t }) {
690
714
  let n = a(null), r = a(/* @__PURE__ */ new Map()), { hoveredRef: o, tooltip: l, hitZonesRef: d } = C(n, {
691
- width: L,
692
- height: _e
693
- }), f = i(() => {
694
- let t = Math.max(...e.map((e) => e.base ?? 0)), n = Math.max(...e.map((e) => e.variation ?? 0));
695
- return e.map((e, r) => {
696
- let i = L * (.12 + r * .19), a = ve, o = Math.min(L * .075, ye), s = be[r % be.length], c = [
697
- (e.base ?? 0) / (t || 1) * 100,
698
- (e.variation ?? 0) / (n || 1) * 100,
699
- e.percentage ?? 0
715
+ width: R,
716
+ height: z
717
+ }), f = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), p = i(() => {
718
+ let e = Math.max(...f.map((e) => e.base ?? 0)), t = Math.max(...f.map((e) => e.variation ?? 0));
719
+ return f.map((n, r) => {
720
+ let i = R * (.12 + r * .19), a = _e, o = Math.min(R * .075, ve), s = ye[r % ye.length], c = [
721
+ (n.base ?? 0) / (e || 1) * 100,
722
+ (n.variation ?? 0) / (t || 1) * 100,
723
+ n.percentage ?? 0
700
724
  ], l = [
701
- `£${e.base ?? 0}M`,
702
- `£${e.variation ?? 0}M`,
703
- `${e.percentage ?? 0}%`
725
+ `£${n.base ?? 0}M`,
726
+ `£${n.variation ?? 0}M`,
727
+ `${n.percentage ?? 0}%`
704
728
  ], u = c.map((e, t) => {
705
- let n = -Math.PI / 2 + t / xe.length * Math.PI * 2, r = e / 100, s = o * Math.max(.08, r);
729
+ let n = -Math.PI / 2 + t / be.length * Math.PI * 2, r = e / 100, s = o * Math.max(.08, r);
706
730
  return {
707
- name: xe[t],
708
- short: Se[t],
731
+ name: be[t],
732
+ short: xe[t],
709
733
  label: l[t],
710
734
  val: Math.round(e),
711
735
  x: i + Math.cos(n) * s,
@@ -715,7 +739,7 @@ function Ce({ contractors: e = [], "data-testid": t }) {
715
739
  };
716
740
  }), d = u.reduce((e, t) => e + t.x, 0) / u.length, f = u.reduce((e, t) => e + t.y, 0) / u.length, p = Math.sqrt(u.reduce((e, t) => e + (t.x - d) ** 2 + (t.y - f) ** 2, 0) / u.length);
717
741
  return {
718
- ...e,
742
+ ...n,
719
743
  cx: i,
720
744
  cy: a,
721
745
  baseR: o,
@@ -724,9 +748,9 @@ function Ce({ contractors: e = [], "data-testid": t }) {
724
748
  color: s
725
749
  };
726
750
  });
727
- }, [e]);
728
- return ge(n, L, _e, (e, t, n) => {
729
- M(r.current, o.current), d.current = [], y(e, L, _e, n, 30), f.forEach((t, i) => {
751
+ }, [f]);
752
+ return ge(n, R, z, (e, t, n) => {
753
+ M(r.current, o.current), d.current = [], y(e, R, z, n, 30), p.forEach((t, i) => {
730
754
  let a = t.color, o = `constellation-${i}`, s = r.current.get(o) ?? 0;
731
755
  e.beginPath(), e.arc(t.cx, t.cy, t.baseR + 5, 0, Math.PI * 2), e.strokeStyle = m(u.bd, .08 + .08 * s), e.lineWidth = .5, e.stroke(), e.beginPath(), t.stars.forEach((t, n) => {
732
756
  n === 0 ? e.moveTo(t.x, t.y) : e.lineTo(t.x, t.y);
@@ -746,74 +770,83 @@ function Ce({ contractors: e = [], "data-testid": t }) {
746
770
  sublabel: `${t.percentage ?? 0}% committed · scatter ${t.scatter.toFixed(1)}`,
747
771
  color: a
748
772
  });
749
- }), e.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", e.textAlign = "center", e.textBaseline = "middle", e.fillStyle = u.t2, e.fillText("▲ top = Base value · ▼▸ lower-right = Variations · ◂▼ lower-left = Commitment % · hover stars for details", L / 2, _e - 14), b(e, L, _e, n, .012);
750
- }, !0), /* @__PURE__ */ c("div", {
773
+ }), e.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", e.textAlign = "center", e.textBaseline = "middle", e.fillStyle = u.t2, e.fillText("▲ top = Base value · ▼▸ lower-right = Variations · ◂▼ lower-left = Commitment % · hover stars for details", R / 2, z - 14), b(e, R, z, n, .012);
774
+ }, !0), p.length === 0 ? /* @__PURE__ */ s(F, {
775
+ width: R,
776
+ height: z,
777
+ "data-testid": t
778
+ }) : /* @__PURE__ */ c("div", {
751
779
  "data-testid": t,
752
780
  style: {
753
781
  position: "relative",
754
- width: L,
755
- height: _e
782
+ width: R,
783
+ height: z
756
784
  },
757
785
  children: [/* @__PURE__ */ s("canvas", {
758
786
  ref: n,
759
787
  role: "img",
760
788
  "aria-label": "Contract value breakdown per contractor — multi-KPI constellation chart",
761
789
  style: {
762
- width: L,
763
- height: _e,
790
+ width: R,
791
+ height: z,
764
792
  display: "block"
765
793
  }
766
794
  }), /* @__PURE__ */ s(S, {
767
795
  ...l,
768
- parentW: L,
769
- parentH: _e
796
+ parentW: R,
797
+ parentH: z
770
798
  })]
771
799
  });
772
800
  }
773
801
  //#endregion
774
- //#region src/components/contractValueOrb/ContractValueOrb.tsx
775
- var we = 680, Te = 220, Ee = 8, De = [
802
+ //#region src/components/stackedHorizontalBarChart/StackedHorizontalBarChart.tsx
803
+ var Ce = 680, we = 220, Te = 8, Ee = [
776
804
  u.blue,
777
805
  u.cyan,
778
806
  u.amber,
779
807
  u.purple,
780
808
  u.green
781
- ], R = {
809
+ ], B = {
782
810
  left: 8,
783
811
  right: 80,
784
812
  top: 16,
785
813
  bottom: 38
786
- }, Oe = 88, z = 18;
787
- function ke(e) {
814
+ }, De = 88, V = 18;
815
+ function Oe(e) {
788
816
  let t = Math.abs(e), n = e < 0 ? "-" : "";
789
817
  return t >= 1e6 ? `${n}£${(t / 1e6).toFixed(1)}M` : t >= 1e3 ? `${n}£${(t / 1e3).toFixed(1)}K` : `${n}£${t.toFixed(0)}`;
790
818
  }
791
- function Ae({ data: e, "data-testid": t }) {
792
- let n = a(null), r = a(/* @__PURE__ */ new Map()), [i, l] = o(!1), { contractors: d = [], totals: h } = e, g = [...d].sort((e, t) => (t.total ?? 0) - (e.total ?? 0)), _ = i ? g : g.slice(0, Ee), y = _.length, b = Math.max(...g.map((e) => Math.abs(e.total ?? 0)), 1), x = Math.max(Te, R.top + R.bottom + y * z + Math.max(0, y - 1) * 8), w = we - R.left - Oe - R.right, E = y > 1 ? (x - R.top - R.bottom - y * z) / (y - 1) : 0, { hoveredRef: O, tooltip: k, hitZonesRef: A } = C(n, {
793
- width: we,
794
- height: x
819
+ function ke({ data: e, "data-testid": t }) {
820
+ let n = a(null), r = a(/* @__PURE__ */ new Map()), [i, l] = o(!1), { items: d = [], totals: h } = e, g = d.filter((e) => typeof e == "object" && !!e), _ = [...g].sort((e, t) => (t.total ?? 0) - (e.total ?? 0)), y = i ? _ : _.slice(0, Te), b = y.length, x = Math.max(..._.map((e) => Math.abs(e.total ?? 0)), 1), w = Math.max(we, B.top + B.bottom + b * V + Math.max(0, b - 1) * 8), E = Ce - B.left - De - B.right, O = b > 1 ? (w - B.top - B.bottom - b * V) / (b - 1) : 0, k = g.length === 0, { hoveredRef: A, tooltip: ee, hitZonesRef: N } = C(n, {
821
+ width: Ce,
822
+ height: w
795
823
  });
796
- return ge(n, we, x, (e, t) => {
797
- M(r.current, O.current), A.current = [], _.forEach((n, i) => {
798
- let a = De[i % De.length], o = j(t, i, y, D), s = R.top + i * (z + E), c = R.left + Oe, l = r.current.get(n.id) ?? 0, d = Math.max(n.base ?? 0, 0), p = Math.max(n.total ?? 0, 0), h = d / b * w * o, g = p / b * w * o, _ = g - h;
799
- e.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", e.fillStyle = l > 0 ? a : f.color, e.textAlign = "right", e.textBaseline = "middle", e.fillText(n.abbreviation ?? n.name.slice(0, 6), c - 8, s + z / 2), e.fillStyle = m(u.bd, .25), e.beginPath(), e.roundRect(c, s, w, z, 4), e.fill(), h > 0 && (l > 0 && v(e, c + h / 2, s + z / 2, h * .3, a, .1 * l), e.fillStyle = m(a, .5 + l * .15), e.beginPath(), e.roundRect(c, s, h, z, 4), e.fill()), _ > 2 && (e.fillStyle = m(a, .22 + l * .08), e.beginPath(), e.roundRect(c + h, s, _, z, [
824
+ return ge(n, Ce, w, (e, t) => {
825
+ M(r.current, A.current), N.current = [], y.forEach((n, i) => {
826
+ let a = Ee[i % Ee.length], o = j(t, i, b, D), s = B.top + i * (V + O), c = B.left + De, l = r.current.get(n.id) ?? 0, d = Math.max(n.base ?? 0, 0), p = Math.max(n.total ?? 0, 0), h = d / x * E * o, g = p / x * E * o, _ = g - h;
827
+ e.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", e.fillStyle = l > 0 ? a : f.color, e.textAlign = "right", e.textBaseline = "middle", e.fillText(n.abbreviation ?? n.name.slice(0, 6), c - 8, s + V / 2), e.fillStyle = m(u.bd, .25), e.beginPath(), e.roundRect(c, s, E, V, 4), e.fill(), h > 0 && (l > 0 && v(e, c + h / 2, s + V / 2, h * .3, a, .1 * l), e.fillStyle = m(a, .5 + l * .15), e.beginPath(), e.roundRect(c, s, h, V, 4), e.fill()), _ > 2 && (e.fillStyle = m(a, .22 + l * .08), e.beginPath(), e.roundRect(c + h, s, _, V, [
800
828
  0,
801
829
  4,
802
830
  4,
803
831
  0
804
- ]), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = m(a, .55), e.lineWidth = 1, e.beginPath(), e.moveTo(c + h, s + 3), e.lineTo(c + h, s + z - 3), e.stroke(), e.setLineDash([])), l > 0 && g > 0 && (e.strokeStyle = m(a, .5 * l), e.lineWidth = 1, e.setLineDash([]), e.beginPath(), e.roundRect(c, s, g, z, 4), e.stroke()), o > .35 && (e.globalAlpha = Math.min(1, (o - .35) / .4), e.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", e.fillStyle = l > 0 ? a : u.t1, e.textAlign = "left", e.textBaseline = "middle", e.fillText(ke(n.total ?? 0), c + g + 6, s + z / 2), e.globalAlpha = 1), T(A.current, n.id, c, s, Math.max(g, 1), z, {
832
+ ]), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = m(a, .55), e.lineWidth = 1, e.beginPath(), e.moveTo(c + h, s + 3), e.lineTo(c + h, s + V - 3), e.stroke(), e.setLineDash([])), l > 0 && g > 0 && (e.strokeStyle = m(a, .5 * l), e.lineWidth = 1, e.setLineDash([]), e.beginPath(), e.roundRect(c, s, g, V, 4), e.stroke()), o > .35 && (e.globalAlpha = Math.min(1, (o - .35) / .4), e.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", e.fillStyle = l > 0 ? a : u.t1, e.textAlign = "left", e.textBaseline = "middle", e.fillText(Oe(n.total ?? 0), c + g + 6, s + V / 2), e.globalAlpha = 1), T(N.current, n.id, c, s, Math.max(g, 1), V, {
805
833
  label: n.name,
806
- value: `${ke(n.total ?? 0)} total`,
807
- sublabel: `Base ${ke(n.base ?? 0)} + Var ${ke(n.variation ?? 0)} · ${n.percentage ?? 0}% committed`,
834
+ value: `${Oe(n.total ?? 0)} total`,
835
+ sublabel: `Base ${Oe(n.base ?? 0)} + Var ${Oe(n.variation ?? 0)} · ${n.percentage ?? 0}% committed`,
808
836
  color: a
809
837
  });
810
838
  });
811
- let n = x - 14;
812
- e.textBaseline = "middle", e.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", e.textAlign = "left", e.fillStyle = m(u.cyan, .5), e.beginPath(), e.roundRect(R.left + Oe, n - 3, 14, 6, 2), e.fill(), e.fillStyle = p.color, e.fillText("base value", R.left + Oe + 18, n), e.fillStyle = m(u.cyan, .22), e.beginPath(), e.roundRect(R.left + Oe + 94, n - 3, 14, 6, 2), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = m(u.cyan, .5), e.lineWidth = .5, e.beginPath(), e.moveTo(R.left + Oe + 101, n - 3), e.lineTo(R.left + Oe + 101, n + 3), e.stroke(), e.setLineDash([]), e.fillStyle = p.color, e.fillText("approved variations", R.left + Oe + 112, n), e.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", e.textAlign = "right", e.fillStyle = p.color, e.fillText(`Portfolio: ${ke(h?.total ?? 0)}`, we - 8, n);
813
- }, !0, { easing: D }), /* @__PURE__ */ c("div", {
839
+ let n = w - 14;
840
+ e.textBaseline = "middle", e.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", e.textAlign = "left", e.fillStyle = m(u.cyan, .5), e.beginPath(), e.roundRect(B.left + De, n - 3, 14, 6, 2), e.fill(), e.fillStyle = p.color, e.fillText("base value", B.left + De + 18, n), e.fillStyle = m(u.cyan, .22), e.beginPath(), e.roundRect(B.left + De + 94, n - 3, 14, 6, 2), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = m(u.cyan, .5), e.lineWidth = .5, e.beginPath(), e.moveTo(B.left + De + 101, n - 3), e.lineTo(B.left + De + 101, n + 3), e.stroke(), e.setLineDash([]), e.fillStyle = p.color, e.fillText("approved variations", B.left + De + 112, n), e.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", e.textAlign = "right", e.fillStyle = p.color, e.fillText(`Portfolio: ${Oe(h?.total ?? 0)}`, Ce - 8, n);
841
+ }, !0, { easing: D }), k ? /* @__PURE__ */ s(F, {
842
+ width: Ce,
843
+ height: we,
844
+ message: "No contract data available",
845
+ "data-testid": t
846
+ }) : /* @__PURE__ */ c("div", {
814
847
  "data-testid": t,
815
848
  style: {
816
- width: we,
849
+ width: Ce,
817
850
  transition: "all 0.25s ease"
818
851
  },
819
852
  children: [/* @__PURE__ */ c("div", {
@@ -823,17 +856,17 @@ function Ae({ data: e, "data-testid": t }) {
823
856
  role: "img",
824
857
  "aria-label": "Total contract value per contractor — horizontal bar chart",
825
858
  style: {
826
- width: we,
827
- height: x,
859
+ width: Ce,
860
+ height: w,
828
861
  display: "block",
829
862
  borderRadius: 8
830
863
  }
831
864
  }), /* @__PURE__ */ s(S, {
832
- ...k,
833
- parentW: we,
834
- parentH: x
865
+ ...ee,
866
+ parentW: Ce,
867
+ parentH: w
835
868
  })]
836
- }), d.length > Ee && /* @__PURE__ */ s("div", {
869
+ }), g.length > Te && /* @__PURE__ */ s("div", {
837
870
  style: { marginTop: 8 },
838
871
  children: /* @__PURE__ */ s(ae, {
839
872
  expanded: i,
@@ -843,130 +876,138 @@ function Ae({ data: e, "data-testid": t }) {
843
876
  });
844
877
  }
845
878
  //#endregion
846
- //#region src/components/contractorRank/ContractorRank.tsx
847
- var B = 780, V = 240, je = 12, Me = 10, Ne = [
879
+ //#region src/components/rankedCardLeaderboard/RankedCardLeaderboard.tsx
880
+ var Ae = 780, H = 240, je = 12, Me = 10, Ne = [
848
881
  "Highest exposure",
849
882
  "Elevated risk",
850
883
  "Moderate exposure",
851
884
  "Moderate exposure",
852
885
  "Low exposure"
853
886
  ];
854
- function Pe({ contractors: e = [], "data-testid": t }) {
855
- let r = a(null), i = a(0), o = a(/* @__PURE__ */ new Map()), { hoveredRef: l, tooltip: p, hitZonesRef: h } = C(r, {
856
- width: B,
857
- height: V
858
- }), g = [...e].sort((e, t) => (t.count ?? 0) - (e.count ?? 0)).slice(0, 5), y = g.reduce((e, t) => e + (t.count ?? 0), 0);
887
+ function Pe({ items: e = [], "data-testid": t }) {
888
+ let r = a(null), o = a(0), l = a(/* @__PURE__ */ new Map()), { hoveredRef: p, tooltip: h, hitZonesRef: g } = C(r, {
889
+ width: Ae,
890
+ height: H
891
+ }), y = [...i(() => e.filter((e) => typeof e == "object" && !!e), [e])].sort((e, t) => (t.count ?? 0) - (e.count ?? 0)).slice(0, 5), x = y.reduce((e, t) => e + (t.count ?? 0), 0);
859
892
  return n(() => {
860
893
  let e = r.current;
861
894
  if (!e) return;
862
- let t = _(e, B, V);
863
- i.current = 0;
864
- let n = Math.min(5, g.length), a = (B - 2 * je - (n - 1) * Me) / n, s = V * .84, c = V * .08, p, x = () => {
865
- i.current++;
866
- let e = i.current;
867
- t.clearRect(0, 0, B, V), h.current = [], o.current.forEach((e, t) => {
868
- let n = t === l.current ? 1 : 0, r = e + (n - e) * .12;
869
- Math.abs(r - n) < .005 ? n === 0 ? o.current.delete(t) : o.current.set(t, 1) : o.current.set(t, r);
870
- }), l.current && !o.current.has(l.current) && o.current.set(l.current, 0), g.forEach((n, r) => {
871
- let i = r === 0, l = r === 0 ? u.red : r === 1 ? u.amber : d[r % d.length], p = je + r * (a + Me), g = o.current.get(n.id) ?? 0, _ = g * 8, b = p - _ / 2, x = a + _, S = i ? A(e, .04, 3e-4) * .06 + .06 : 0;
872
- t.fillStyle = m(l, .08 + g * .07), t.beginPath(), t.roundRect(b, c, x, s, 6), t.fill(), t.strokeStyle = m(l, .2 + g * .4 + S), t.lineWidth = i ? 1.5 : 1, t.stroke(), (g > .01 || i) && v(t, b + x / 2, c + s / 2, x * .55, l, S + g * .14), t.font = "bold " + f.font, t.textAlign = "left", t.textBaseline = "top", t.fillStyle = m(l, .5 + g * .35), t.fillText(`#${r + 1}`, b + 7, c + 6);
873
- let C = Math.min(a * .28, s * .32, 72), w = b + x / 2, E = c + s * .38, D = t.createRadialGradient(w, E - C * .2, 0, w, E, C);
874
- D.addColorStop(0, m(l, .5 + g * .2)), D.addColorStop(1, m(l, .2 + g * .1)), t.beginPath(), t.arc(w, E, C, 0, Math.PI * 2), t.fillStyle = D, t.fill(), t.strokeStyle = m(l, .4 + g * .3), t.lineWidth = 1, t.stroke(), t.font = "bold " + f.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = m(u.t1, .9), t.fillText(n.abbreviation ?? n.name.slice(0, 6), w, E), t.font = "bold 14px 'Satoshi Variable', 'DM Sans', sans-serif", t.textBaseline = "alphabetic", t.fillStyle = m(l, .9 + g * .1), t.fillText(String(n.count ?? 0), w, c + s * .76), t.font = f.font, t.fillStyle = f.color, t.fillText("open EWs", w, c + s * .88);
875
- let O = Math.round((n.count ?? 0) / (y || 1) * 100), k = Ne[r] ?? "Low exposure";
876
- T(h.current, n.id, p, c, a, s, {
895
+ let t = _(e, Ae, H);
896
+ o.current = 0;
897
+ let n = Math.min(5, y.length), i = (Ae - 2 * je - (n - 1) * Me) / n, a = H * .84, s = H * .08, c, h = () => {
898
+ o.current++;
899
+ let e = o.current;
900
+ t.clearRect(0, 0, Ae, H), g.current = [], l.current.forEach((e, t) => {
901
+ let n = t === p.current ? 1 : 0, r = e + (n - e) * .12;
902
+ Math.abs(r - n) < .005 ? n === 0 ? l.current.delete(t) : l.current.set(t, 1) : l.current.set(t, r);
903
+ }), p.current && !l.current.has(p.current) && l.current.set(p.current, 0), y.forEach((n, r) => {
904
+ let o = r === 0, c = r === 0 ? u.red : r === 1 ? u.amber : d[r % d.length], p = je + r * (i + Me), h = l.current.get(n.id) ?? 0, _ = h * 8, y = p - _ / 2, b = i + _, S = o ? A(e, .04, 3e-4) * .06 + .06 : 0;
905
+ t.fillStyle = m(c, .08 + h * .07), t.beginPath(), t.roundRect(y, s, b, a, 6), t.fill(), t.strokeStyle = m(c, .2 + h * .4 + S), t.lineWidth = o ? 1.5 : 1, t.stroke(), (h > .01 || o) && v(t, y + b / 2, s + a / 2, b * .55, c, S + h * .14), t.font = "bold " + f.font, t.textAlign = "left", t.textBaseline = "top", t.fillStyle = m(c, .5 + h * .35), t.fillText(`#${r + 1}`, y + 7, s + 6);
906
+ let C = Math.min(i * .28, a * .32, 72), w = y + b / 2, E = s + a * .38, D = t.createRadialGradient(w, E - C * .2, 0, w, E, C);
907
+ D.addColorStop(0, m(c, .5 + h * .2)), D.addColorStop(1, m(c, .2 + h * .1)), t.beginPath(), t.arc(w, E, C, 0, Math.PI * 2), t.fillStyle = D, t.fill(), t.strokeStyle = m(c, .4 + h * .3), t.lineWidth = 1, t.stroke(), t.font = "bold " + f.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = m(u.t1, .9), t.fillText(n.abbreviation ?? n.name.slice(0, 6), w, E), t.font = "bold 14px 'Satoshi Variable', 'DM Sans', sans-serif", t.textBaseline = "alphabetic", t.fillStyle = m(c, .9 + h * .1), t.fillText(String(n.count ?? 0), w, s + a * .76), t.font = f.font, t.fillStyle = f.color, t.fillText("open EWs", w, s + a * .88);
908
+ let O = Math.round((n.count ?? 0) / (x || 1) * 100), k = Ne[r] ?? "Low exposure";
909
+ T(g.current, n.id, p, s, i, a, {
877
910
  label: n.name,
878
911
  value: `${n.count ?? 0} open · ${O}% of total`,
879
912
  sublabel: `Rank #${r + 1} · ${k}`,
880
- color: l
913
+ color: c
881
914
  });
882
- }), b(t, B, V, e, .015), p = requestAnimationFrame(x);
915
+ }), b(t, Ae, H, e, .015), c = requestAnimationFrame(h);
883
916
  };
884
- return x(), () => cancelAnimationFrame(p);
885
- }, [g, y]), /* @__PURE__ */ c("div", {
917
+ return h(), () => cancelAnimationFrame(c);
918
+ }, [y, x]), y.length === 0 ? /* @__PURE__ */ s(F, {
919
+ width: Ae,
920
+ height: H,
921
+ "data-testid": t
922
+ }) : /* @__PURE__ */ c("div", {
886
923
  "data-testid": t,
887
924
  style: {
888
925
  position: "relative",
889
- width: B,
890
- height: V
926
+ width: Ae,
927
+ height: H
891
928
  },
892
929
  children: [/* @__PURE__ */ s("canvas", {
893
930
  ref: r,
894
931
  role: "img",
895
932
  "aria-label": "Contractor rank — open EW count per contractor",
896
933
  style: {
897
- width: B,
898
- height: V,
934
+ width: Ae,
935
+ height: H,
899
936
  display: "block",
900
937
  borderRadius: 8
901
938
  }
902
939
  }), /* @__PURE__ */ s(S, {
903
- ...p,
904
- parentW: B,
905
- parentH: V
940
+ ...h,
941
+ parentW: Ae,
942
+ parentH: H
906
943
  })]
907
944
  });
908
945
  }
909
946
  //#endregion
910
- //#region src/components/ewCategory/EWCategory.tsx
911
- var H = 680, U = 260;
912
- function Fe({ categories: e = [], "data-testid": t }) {
913
- let r = a(null), i = a(0), o = a(/* @__PURE__ */ new Map()), { hoveredRef: l, tooltip: d, hitZonesRef: f } = C(r, {
914
- width: H,
915
- height: U
916
- });
947
+ //#region src/components/dotMatrixChart/DotMatrixChart.tsx
948
+ var U = 680, W = 260;
949
+ function Fe({ items: e = [], "data-testid": t }) {
950
+ let r = a(null), o = a(0), l = a(/* @__PURE__ */ new Map()), { hoveredRef: d, tooltip: f, hitZonesRef: p } = C(r, {
951
+ width: U,
952
+ height: W
953
+ }), h = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
917
954
  return n(() => {
918
- let t = r.current;
919
- if (!t) return;
920
- let n = _(t, H, U);
921
- i.current = 0;
922
- let a = e.length, s = Math.max(...e.map((e) => e.count), 1), c = s, d = H * .05, p = U * .1, h = H * .9 / a, g = U * .7 / c, x = e.reduce((e, t) => e + t.count, 0), S, C = () => {
923
- i.current++;
924
- let t = i.current;
925
- n.clearRect(0, 0, H, U), f.current = [], o.current.forEach((e, t) => {
926
- let n = t === l.current ? 1 : 0, r = e + (n - e) * .12;
927
- Math.abs(r - n) < .005 ? n === 0 ? o.current.delete(t) : o.current.set(t, 1) : o.current.set(t, r);
928
- }), l.current && !o.current.has(l.current) && o.current.set(l.current, 0), y(n, H, U, t, 40, m(u.blue, .04)), e.forEach((e, r) => {
929
- let i = e.count === s, a = i ? u.cyan : u.blue, l = o.current.get(`${e.category}-col`) ?? 0;
930
- for (let u = 0; u < c; u++) {
931
- let c = d + r * h + h / 2, _ = p + u * g + g / 2, y = Math.min(h, g) * .38;
932
- if (u >= s - e.count) {
933
- let s = y * (1 + (A(t, .04, 5e-4) + Math.sin(r * .6 + u * 1.2) * .3) * .12);
934
- (i || l > .01) && v(n, c, _, s * 3, a, (i ? .2 : .1) + l * .1), n.beginPath(), n.arc(c, _, s, 0, Math.PI * 2), n.fillStyle = m(a, i ? .8 : .5 + l * .2), n.fill();
935
- let d = `${e.category}-${u}`;
936
- w(f.current, d, c, _, y + 4, {
937
- label: e.fullName,
938
- value: `${e.count} Early Warnings`,
939
- sublabel: `${Math.round(e.count / x * 100)}% of total`,
940
- color: a
941
- }), o.current.get(`${e.category}-col`);
942
- } else n.beginPath(), n.arc(c, _, 1, 0, Math.PI * 2), n.fillStyle = m(a, .08), n.fill();
955
+ let e = r.current;
956
+ if (!e) return;
957
+ let t = _(e, U, W);
958
+ o.current = 0;
959
+ let n = h.length, i = Math.max(...h.map((e) => e.count), 1), a = i, s = U * .05, c = W * .1, f = U * .9 / n, g = W * .7 / a, x = h.reduce((e, t) => e + t.count, 0), S, C = () => {
960
+ o.current++;
961
+ let e = o.current;
962
+ t.clearRect(0, 0, U, W), p.current = [], l.current.forEach((e, t) => {
963
+ let n = t === d.current ? 1 : 0, r = e + (n - e) * .12;
964
+ Math.abs(r - n) < .005 ? n === 0 ? l.current.delete(t) : l.current.set(t, 1) : l.current.set(t, r);
965
+ }), d.current && !l.current.has(d.current) && l.current.set(d.current, 0), y(t, U, W, e, 40, m(u.blue, .04)), h.forEach((n, r) => {
966
+ let o = n.count === i, d = o ? u.cyan : u.blue, h = l.current.get(`${n.category}-col`) ?? 0;
967
+ for (let u = 0; u < a; u++) {
968
+ let a = s + r * f + f / 2, _ = c + u * g + g / 2, y = Math.min(f, g) * .38;
969
+ if (u >= i - n.count) {
970
+ let i = y * (1 + (A(e, .04, 5e-4) + Math.sin(r * .6 + u * 1.2) * .3) * .12);
971
+ (o || h > .01) && v(t, a, _, i * 3, d, (o ? .2 : .1) + h * .1), t.beginPath(), t.arc(a, _, i, 0, Math.PI * 2), t.fillStyle = m(d, o ? .8 : .5 + h * .2), t.fill();
972
+ let s = `${n.category}-${u}`;
973
+ w(p.current, s, a, _, y + 4, {
974
+ label: n.fullName,
975
+ value: `${n.count} Early Warnings`,
976
+ sublabel: `${Math.round(n.count / x * 100)}% of total`,
977
+ color: d
978
+ }), l.current.get(`${n.category}-col`);
979
+ } else t.beginPath(), t.arc(a, _, 1, 0, Math.PI * 2), t.fillStyle = m(d, .08), t.fill();
943
980
  }
944
- let _ = p + c * g + 16;
945
- n.font = `${i ? "bold " : ""}9px 'JetBrains Mono', monospace`, n.textAlign = "center", n.textBaseline = "alphabetic", n.fillStyle = i ? u.cyan : m(u.t2, .65), n.fillText(e.category, d + r * h + h / 2, _);
946
- }), b(n, H, U, t, .015), S = requestAnimationFrame(C);
981
+ let _ = c + a * g + 16;
982
+ t.font = `${o ? "bold " : ""}9px 'JetBrains Mono', monospace`, t.textAlign = "center", t.textBaseline = "alphabetic", t.fillStyle = o ? u.cyan : m(u.t2, .65), t.fillText(n.category, s + r * f + f / 2, _);
983
+ }), b(t, U, W, e, .015), S = requestAnimationFrame(C);
947
984
  };
948
985
  return C(), () => cancelAnimationFrame(S);
949
- }, [e]), /* @__PURE__ */ c("div", {
986
+ }, [h]), h.length === 0 ? /* @__PURE__ */ s(F, {
987
+ width: U,
988
+ height: W,
989
+ "data-testid": t
990
+ }) : /* @__PURE__ */ c("div", {
950
991
  "data-testid": t,
951
992
  style: {
952
993
  position: "relative",
953
- width: H,
954
- height: U
994
+ width: U,
995
+ height: W
955
996
  },
956
997
  children: [/* @__PURE__ */ s("canvas", {
957
998
  ref: r,
958
999
  role: "img",
959
1000
  "aria-label": "Early Warning count by category — breathing dot grid",
960
1001
  style: {
961
- width: H,
962
- height: U,
1002
+ width: U,
1003
+ height: W,
963
1004
  display: "block",
964
1005
  borderRadius: 8
965
1006
  }
966
1007
  }), /* @__PURE__ */ s(S, {
967
- ...d,
968
- parentW: H,
969
- parentH: U
1008
+ ...f,
1009
+ parentW: U,
1010
+ parentH: W
970
1011
  })]
971
1012
  });
972
1013
  }
@@ -1072,48 +1113,52 @@ function ze({ rows: e = [], className: t, colors: n }) {
1072
1113
  });
1073
1114
  }
1074
1115
  //#endregion
1075
- //#region src/components/nceTree/NCETree.tsx
1116
+ //#region src/components/radialFanTreeChart/RadialFanTreeChart.tsx
1076
1117
  var Be = 680, Ve = 320;
1077
- function He({ total: e = 0, byContractor: t = [], "data-testid": r }) {
1078
- let i = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), { hoveredRef: p, tooltip: h, hitZonesRef: g } = C(i, {
1118
+ function He({ total: e = 0, items: t = [], "data-testid": r }) {
1119
+ let o = a(null), l = a(/* @__PURE__ */ new Map()), p = a(0), { hoveredRef: h, tooltip: g, hitZonesRef: y } = C(o, {
1079
1120
  width: Be,
1080
1121
  height: Ve
1081
- });
1122
+ }), b = i(() => t.filter((e) => typeof e == "object" && !!e), [t]);
1082
1123
  return n(() => {
1083
- let n = i.current;
1084
- if (!n) return;
1085
- let r = _(n, Be, Ve);
1086
- l.current = 0;
1087
- let a = Ve / 2, s = Be - 80, c = Math.max(...t.map((e) => e.count ?? 0)), h = (Ve - 60) / (t.length - 1), y = t.map((e, t) => ({
1088
- x: s,
1089
- y: 30 + t * h
1090
- })), b, x = () => {
1091
- l.current++;
1092
- let n = l.current;
1093
- r.clearRect(0, 0, Be, Ve);
1094
- let i = E(Math.min(n / 72, 1));
1095
- M(o.current, p.current), g.current = [], v(r, 88, a, 48 * i, u.blue, .15 * i), t.forEach((n, l) => {
1096
- let p = d[l % d.length], h = j(i, l, t.length, E), _ = y[l], b = o.current.get(n.id) ?? 0, x = Math.max(1.5, (n.count ?? 0) / c * 6);
1124
+ let t = o.current;
1125
+ if (!t) return;
1126
+ let n = _(t, Be, Ve);
1127
+ p.current = 0;
1128
+ let r = Ve / 2, i = Be - 80, a = Math.max(...b.map((e) => e.count ?? 0)), s = (Ve - 60) / (b.length - 1), c = b.map((e, t) => ({
1129
+ x: i,
1130
+ y: 30 + t * s
1131
+ })), g, x = () => {
1132
+ p.current++;
1133
+ let t = p.current;
1134
+ n.clearRect(0, 0, Be, Ve);
1135
+ let o = E(Math.min(t / 72, 1));
1136
+ M(l.current, h.current), y.current = [], v(n, 88, r, 48 * o, u.blue, .15 * o), b.forEach((t, s) => {
1137
+ let p = d[s % d.length], h = j(o, s, b.length, E), g = c[s], _ = l.current.get(t.id) ?? 0, x = Math.max(1.5, (t.count ?? 0) / a * 6);
1097
1138
  if (h < .01) return;
1098
- let S = 88 + (s - 88) * .4, C = a, T = 88 + (s - 88) * .6, D = _.y, O = h;
1099
- r.beginPath();
1139
+ let S = 88 + (i - 88) * .4, C = r, T = 88 + (i - 88) * .6, D = g.y, O = h;
1140
+ n.beginPath();
1100
1141
  for (let e = 0; e <= 40; e++) {
1101
- let t = e / 40 * O, n = (1 - t) ** 3 * 88 + 3 * (1 - t) ** 2 * t * S + 3 * (1 - t) * t ** 2 * T + t ** 3 * _.x, i = (1 - t) ** 3 * a + 3 * (1 - t) ** 2 * t * C + 3 * (1 - t) * t ** 2 * D + t ** 3 * _.y;
1102
- e === 0 ? r.moveTo(n, i) : r.lineTo(n, i);
1142
+ let t = e / 40 * O, i = (1 - t) ** 3 * 88 + 3 * (1 - t) ** 2 * t * S + 3 * (1 - t) * t ** 2 * T + t ** 3 * g.x, a = (1 - t) ** 3 * r + 3 * (1 - t) ** 2 * t * C + 3 * (1 - t) * t ** 2 * D + t ** 3 * g.y;
1143
+ e === 0 ? n.moveTo(i, a) : n.lineTo(i, a);
1103
1144
  }
1104
- if (r.strokeStyle = m(p, b > 0 ? .8 : .45), r.lineWidth = x * (b > 0 ? 1.3 : 1), r.stroke(), h > .85) {
1105
- let t = Math.min(1, (h - .85) / .15), i = 4 + (n.count ?? 0) / c * 12;
1106
- v(r, _.x, _.y, i * 2.5, p, (.25 + b * .2) * t), r.beginPath(), r.arc(_.x, _.y, i * t, 0, Math.PI * 2), r.fillStyle = m(p, (.7 + b * .2) * t), r.fill(), w(g.current, n.id, _.x, _.y, i + 8, {
1107
- label: n.name,
1108
- value: `${n.count ?? 0} NCEs raised`,
1109
- sublabel: `${Math.round((n.count ?? 0) / e * 100)}% of all NCEs`,
1145
+ if (n.strokeStyle = m(p, _ > 0 ? .8 : .45), n.lineWidth = x * (_ > 0 ? 1.3 : 1), n.stroke(), h > .85) {
1146
+ let r = Math.min(1, (h - .85) / .15), i = 4 + (t.count ?? 0) / a * 12;
1147
+ v(n, g.x, g.y, i * 2.5, p, (.25 + _ * .2) * r), n.beginPath(), n.arc(g.x, g.y, i * r, 0, Math.PI * 2), n.fillStyle = m(p, (.7 + _ * .2) * r), n.fill(), w(y.current, t.id, g.x, g.y, i + 8, {
1148
+ label: t.name,
1149
+ value: `${t.count ?? 0} NCEs raised`,
1150
+ sublabel: `${Math.round((t.count ?? 0) / e * 100)}% of all NCEs`,
1110
1151
  color: p
1111
- }), r.globalAlpha = t, r.font = f.font, r.fillStyle = b > 0 ? p : m(u.t2, .85), r.textAlign = "left", r.fillText(n.abbreviation ?? n.name.slice(0, 6), _.x + i + 6, _.y - 3), r.font = f.font, r.fillStyle = b > 0 ? p : u.t1, r.fillText(String(n.count ?? 0), _.x + i + 6, _.y + 10), r.globalAlpha = 1;
1152
+ }), n.globalAlpha = r, n.font = f.font, n.fillStyle = _ > 0 ? p : m(u.t2, .85), n.textAlign = "left", n.fillText(t.abbreviation ?? t.name.slice(0, 6), g.x + i + 6, g.y - 3), n.font = f.font, n.fillStyle = _ > 0 ? p : u.t1, n.fillText(String(t.count ?? 0), g.x + i + 6, g.y + 10), n.globalAlpha = 1;
1112
1153
  }
1113
- }), r.beginPath(), r.arc(88, a, 32 * i, 0, Math.PI * 2), r.fillStyle = u.bgL, r.fill(), r.strokeStyle = m(u.blue, .6 * i), r.lineWidth = 2, r.stroke(), i > .4 && (r.globalAlpha = Math.min(1, (i - .4) / .4), r.font = "500 24px 'Satoshi Variable', 'DM Sans', sans-serif", r.fillStyle = u.t1, r.textAlign = "center", r.fillText(String(e), 88, a + 5), r.font = f.font, r.fillStyle = f.color, r.fillText("NCEs", 88, a + 18), r.globalAlpha = 1), b = requestAnimationFrame(x);
1154
+ }), n.beginPath(), n.arc(88, r, 32 * o, 0, Math.PI * 2), n.fillStyle = u.bgL, n.fill(), n.strokeStyle = m(u.blue, .6 * o), n.lineWidth = 2, n.stroke(), o > .4 && (n.globalAlpha = Math.min(1, (o - .4) / .4), n.font = "500 24px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = u.t1, n.textAlign = "center", n.fillText(String(e), 88, r + 5), n.font = f.font, n.fillStyle = f.color, n.fillText("NCEs", 88, r + 18), n.globalAlpha = 1), g = requestAnimationFrame(x);
1114
1155
  };
1115
- return x(), () => cancelAnimationFrame(b);
1116
- }, [e, t]), /* @__PURE__ */ c("div", {
1156
+ return x(), () => cancelAnimationFrame(g);
1157
+ }, [e, b]), b.length === 0 ? /* @__PURE__ */ s(F, {
1158
+ width: Be,
1159
+ height: Ve,
1160
+ "data-testid": r
1161
+ }) : /* @__PURE__ */ c("div", {
1117
1162
  "data-testid": r,
1118
1163
  style: {
1119
1164
  position: "relative",
@@ -1121,7 +1166,7 @@ function He({ total: e = 0, byContractor: t = [], "data-testid": r }) {
1121
1166
  height: Ve
1122
1167
  },
1123
1168
  children: [/* @__PURE__ */ s("canvas", {
1124
- ref: i,
1169
+ ref: o,
1125
1170
  role: "img",
1126
1171
  "aria-label": "NCE fault tree — NCEs per contractor as branching tree",
1127
1172
  style: {
@@ -1130,7 +1175,7 @@ function He({ total: e = 0, byContractor: t = [], "data-testid": r }) {
1130
1175
  display: "block"
1131
1176
  }
1132
1177
  }), /* @__PURE__ */ s(S, {
1133
- ...h,
1178
+ ...g,
1134
1179
  parentW: Be,
1135
1180
  parentH: Ve
1136
1181
  })]
@@ -1593,9 +1638,9 @@ function rt({ rows: e = [], className: t, colors: n }) {
1593
1638
  });
1594
1639
  }
1595
1640
  //#endregion
1596
- //#region src/components/quotationBalance/QuotationBalance.tsx
1641
+ //#region src/components/balanceScaleChart/BalanceScaleChart.tsx
1597
1642
  var it = 500, at = 320;
1598
- function ot({ accepted: e, submitted: t, "data-testid": r }) {
1643
+ function ot({ left: e, right: t, "data-testid": r }) {
1599
1644
  let i = a(null), o = a(0);
1600
1645
  return n(() => {
1601
1646
  let n = i.current;
@@ -1656,68 +1701,72 @@ function ot({ accepted: e, submitted: t, "data-testid": r }) {
1656
1701
  });
1657
1702
  }
1658
1703
  //#endregion
1659
- //#region src/components/quotationTrend/QuotationTrend.tsx
1660
- var st = 680, W = 280;
1661
- function ct({ trend: e = [], "data-testid": t }) {
1662
- let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: d, hitZonesRef: p } = C(r, {
1704
+ //#region src/components/areaLineChart/AreaLineChart.tsx
1705
+ var st = 680, G = 280;
1706
+ function ct({ points: e = [], "data-testid": t }) {
1707
+ let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), { hoveredRef: d, tooltip: p, hitZonesRef: h } = C(r, {
1663
1708
  width: st,
1664
- height: W
1665
- });
1709
+ height: G
1710
+ }), g = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
1666
1711
  return n(() => {
1667
- let t = r.current;
1668
- if (!t) return;
1669
- let n = _(t, st, W);
1670
- o.current = 0;
1671
- let a = st - 54 - 28, s = W - 30 - 54, c = Math.max(...e.map((e) => e.count), 1), d = e.length, h = d > 1 ? a / (d - 1) : a, g = e.map((e, t) => ({
1672
- x: 54 + t * h,
1673
- y: 30 + s - e.count / c * s,
1712
+ let e = r.current;
1713
+ if (!e) return;
1714
+ let t = _(e, st, G);
1715
+ l.current = 0;
1716
+ let n = st - 54 - 28, i = G - 30 - 54, a = Math.max(...g.map((e) => e.count), 1), s = g.length, c = s > 1 ? n / (s - 1) : n, p = g.map((e, t) => ({
1717
+ x: 54 + t * c,
1718
+ y: 30 + i - e.count / a * i,
1674
1719
  point: e
1675
1720
  })), y, b = () => {
1676
- o.current++;
1677
- let e = o.current;
1678
- n.clearRect(0, 0, st, W);
1679
- let t = E(Math.min(e / 72, 1));
1680
- M(i.current, l.current), p.current = [], [
1721
+ l.current++;
1722
+ let e = l.current;
1723
+ t.clearRect(0, 0, st, G);
1724
+ let r = E(Math.min(e / 72, 1));
1725
+ M(o.current, d.current), h.current = [], [
1681
1726
  .25,
1682
1727
  .5,
1683
1728
  .75,
1684
1729
  1
1685
1730
  ].forEach((e) => {
1686
- let t = 30 + s - e * s;
1687
- n.strokeStyle = m(u.bd, .18), n.lineWidth = 1, n.setLineDash([3, 5]), n.beginPath(), n.moveTo(54, t), n.lineTo(54 + a, t), n.stroke(), n.setLineDash([]), n.font = f.font, n.fillStyle = f.color, n.textAlign = "right", n.fillText(String(Math.round(c * e)), 48, t + 3);
1688
- }), n.save(), n.translate(12, 30 + s / 2), n.rotate(-Math.PI / 2), n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText("Submissions", 0, 0), n.restore(), n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText("Week", 54 + a / 2, W - 6), n.strokeStyle = m(u.bd, .3), n.lineWidth = 1, n.setLineDash([]), n.beginPath(), n.moveTo(54, 30 + s), n.lineTo(54 + a, 30 + s), n.stroke();
1689
- let r = t * (d - 1), h = Math.floor(r) + 1;
1690
- if (h >= 2) {
1691
- n.beginPath(), n.moveTo(g[0].x, 30 + s), n.lineTo(g[0].x, g[0].y);
1692
- for (let e = 1; e < h; e++) {
1693
- let t = r - Math.floor(r), i = e < h - 1 ? g[e].x : g[e - 1].x + (g[e].x - g[e - 1].x) * (e === Math.ceil(r) ? t : 1), a = e < h - 1 ? g[e].y : g[e - 1].y + (g[e].y - g[e - 1].y) * (e === Math.ceil(r) ? t : 1);
1694
- n.lineTo(i, a);
1731
+ let r = 30 + i - e * i;
1732
+ t.strokeStyle = m(u.bd, .18), t.lineWidth = 1, t.setLineDash([3, 5]), t.beginPath(), t.moveTo(54, r), t.lineTo(54 + n, r), t.stroke(), t.setLineDash([]), t.font = f.font, t.fillStyle = f.color, t.textAlign = "right", t.fillText(String(Math.round(a * e)), 48, r + 3);
1733
+ }), t.save(), t.translate(12, 30 + i / 2), t.rotate(-Math.PI / 2), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Submissions", 0, 0), t.restore(), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Week", 54 + n / 2, G - 6), t.strokeStyle = m(u.bd, .3), t.lineWidth = 1, t.setLineDash([]), t.beginPath(), t.moveTo(54, 30 + i), t.lineTo(54 + n, 30 + i), t.stroke();
1734
+ let c = r * (s - 1), g = Math.floor(c) + 1;
1735
+ if (g >= 2) {
1736
+ t.beginPath(), t.moveTo(p[0].x, 30 + i), t.lineTo(p[0].x, p[0].y);
1737
+ for (let e = 1; e < g; e++) {
1738
+ let n = c - Math.floor(c), r = e < g - 1 ? p[e].x : p[e - 1].x + (p[e].x - p[e - 1].x) * (e === Math.ceil(c) ? n : 1), i = e < g - 1 ? p[e].y : p[e - 1].y + (p[e].y - p[e - 1].y) * (e === Math.ceil(c) ? n : 1);
1739
+ t.lineTo(r, i);
1695
1740
  }
1696
- let e = g[Math.min(h - 1, d - 1)];
1697
- n.lineTo(e.x, 30 + s), n.closePath();
1698
- let t = n.createLinearGradient(0, 30, 0, 30 + s);
1699
- t.addColorStop(0, m(u.cyan, .22)), t.addColorStop(1, m(u.cyan, .02)), n.fillStyle = t, n.fill();
1741
+ let e = p[Math.min(g - 1, s - 1)];
1742
+ t.lineTo(e.x, 30 + i), t.closePath();
1743
+ let n = t.createLinearGradient(0, 30, 0, 30 + i);
1744
+ n.addColorStop(0, m(u.cyan, .22)), n.addColorStop(1, m(u.cyan, .02)), t.fillStyle = n, t.fill();
1700
1745
  }
1701
- n.beginPath();
1702
- for (let e = 0; e < h; e++) {
1703
- let t = r - Math.floor(r), i = e === h - 1 && e > 0 && e === Math.ceil(r), a = e === 0 || e < h - 1 ? g[e].x : g[e - 1].x + (g[e].x - g[e - 1].x) * (i ? t : 1), o = e === 0 || e < h - 1 ? g[e].y : g[e - 1].y + (g[e].y - g[e - 1].y) * (i ? t : 1);
1704
- e === 0 ? n.moveTo(a, o) : n.lineTo(a, o);
1746
+ t.beginPath();
1747
+ for (let e = 0; e < g; e++) {
1748
+ let n = c - Math.floor(c), r = e === g - 1 && e > 0 && e === Math.ceil(c), i = e === 0 || e < g - 1 ? p[e].x : p[e - 1].x + (p[e].x - p[e - 1].x) * (r ? n : 1), a = e === 0 || e < g - 1 ? p[e].y : p[e - 1].y + (p[e].y - p[e - 1].y) * (r ? n : 1);
1749
+ e === 0 ? t.moveTo(i, a) : t.lineTo(i, a);
1705
1750
  }
1706
- n.strokeStyle = m(u.cyan, .85), n.lineWidth = 2, n.stroke(), g.forEach((e, t) => {
1707
- if (t >= h) return;
1708
- let r = `pt-${t}`, a = i.current.get(r) ?? 0;
1709
- w(p.current, r, e.x, e.y, 10, {
1751
+ t.strokeStyle = m(u.cyan, .85), t.lineWidth = 2, t.stroke(), p.forEach((e, n) => {
1752
+ if (n >= g) return;
1753
+ let r = `pt-${n}`, s = o.current.get(r) ?? 0;
1754
+ w(h.current, r, e.x, e.y, 10, {
1710
1755
  label: e.point.week,
1711
1756
  value: `${e.point.count} quotations submitted`,
1712
1757
  sublabel: `£${e.point.value}M value`,
1713
1758
  color: u.cyan
1714
- }), a > 0 && x(n, e.x, 30, 30 + s, m(u.cyan, .15 * a));
1715
- let o = e.point.count === c;
1716
- (a > 0 || o) && v(n, e.x, e.y, 14, u.cyan, (o ? .3 : 0) + a * .25), n.beginPath(), n.arc(e.x, e.y, a > 0 ? 5 : 3.5, 0, Math.PI * 2), n.fillStyle = m(u.cyan, a > 0 ? 1 : .8), n.fill(), (a > 0 || o) && (n.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = u.cyan, n.textAlign = "center", n.fillText(String(e.point.count), e.x, e.y - 10)), n.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = a > 0 ? u.cyan : f.color, n.textAlign = "center", n.fillText(e.point.week, e.x, W - 54 + 14);
1759
+ }), s > 0 && x(t, e.x, 30, 30 + i, m(u.cyan, .15 * s));
1760
+ let c = e.point.count === a;
1761
+ (s > 0 || c) && v(t, e.x, e.y, 14, u.cyan, (c ? .3 : 0) + s * .25), t.beginPath(), t.arc(e.x, e.y, s > 0 ? 5 : 3.5, 0, Math.PI * 2), t.fillStyle = m(u.cyan, s > 0 ? 1 : .8), t.fill(), (s > 0 || c) && (t.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", t.fillStyle = u.cyan, t.textAlign = "center", t.fillText(String(e.point.count), e.x, e.y - 10)), t.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", t.fillStyle = s > 0 ? u.cyan : f.color, t.textAlign = "center", t.fillText(e.point.week, e.x, G - 54 + 14);
1717
1762
  }), y = requestAnimationFrame(b);
1718
1763
  };
1719
1764
  return b(), () => cancelAnimationFrame(y);
1720
- }, [e]), /* @__PURE__ */ s("div", {
1765
+ }, [g]), g.length < 2 ? /* @__PURE__ */ s(F, {
1766
+ width: st,
1767
+ height: G,
1768
+ "data-testid": t
1769
+ }) : /* @__PURE__ */ s("div", {
1721
1770
  "data-testid": t,
1722
1771
  className: "trend-scroll",
1723
1772
  style: {
@@ -1728,7 +1777,7 @@ function ct({ trend: e = [], "data-testid": t }) {
1728
1777
  style: {
1729
1778
  position: "relative",
1730
1779
  width: st,
1731
- height: W
1780
+ height: G
1732
1781
  },
1733
1782
  children: [/* @__PURE__ */ s("canvas", {
1734
1783
  ref: r,
@@ -1736,171 +1785,210 @@ function ct({ trend: e = [], "data-testid": t }) {
1736
1785
  "aria-label": "Trend chart — count over time",
1737
1786
  style: {
1738
1787
  width: st,
1739
- height: W,
1788
+ height: G,
1740
1789
  display: "block"
1741
1790
  }
1742
1791
  }), /* @__PURE__ */ s(S, {
1743
- ...d,
1792
+ ...p,
1744
1793
  parentW: st,
1745
- parentH: W
1794
+ parentH: G
1746
1795
  })]
1747
1796
  })
1748
1797
  });
1749
1798
  }
1750
1799
  //#endregion
1751
1800
  //#region src/components/trend/Trend.tsx
1752
- var lt = 680, G = 280, ut = 54, dt = 28, ft = 64, pt = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", mt = 12;
1753
- function ht({ trend: e = [], "data-testid": t }) {
1754
- let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), d = i(() => {
1755
- if (e.length <= 1) return ft;
1756
- let t = document.createElement("canvas").getContext("2d");
1757
- if (!t) return ft;
1758
- t.font = pt;
1759
- let n = Math.max(...e.map((e) => t.measureText(e.week).width));
1760
- return Math.max(ft, n + mt);
1761
- }, [e]), p = Math.max(lt, ut + dt + Math.max(0, e.length - 1) * d), { hoveredRef: h, tooltip: g, hitZonesRef: y } = C(r, {
1762
- width: p,
1763
- height: G
1801
+ var lt = 680, K = 280, ut = 54, dt = 28, ft = 64, pt = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", mt = 12;
1802
+ function ht({ points: e = [], "data-testid": t }) {
1803
+ let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), d = a(null), p = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), h = i(() => {
1804
+ if (p.length <= 1) return ft;
1805
+ let e = document.createElement("canvas").getContext("2d");
1806
+ if (!e) return ft;
1807
+ e.font = pt;
1808
+ let t = Math.max(...p.map((t) => e.measureText(t.week).width));
1809
+ return Math.max(ft, t + mt);
1810
+ }, [p]), g = Math.max(lt, ut + dt + Math.max(0, p.length - 1) * h), { hoveredRef: y, tooltip: b, hitZonesRef: T } = C(r, {
1811
+ width: g,
1812
+ height: K
1764
1813
  });
1765
1814
  return n(() => {
1766
- let t = r.current;
1767
- if (!t) return;
1768
- let n = _(t, p, G);
1815
+ let e = r.current;
1816
+ if (!e) return;
1817
+ let t = _(e, g, K), n = d.current ? _(d.current, ut, K) : null;
1769
1818
  l.current = 0;
1770
- let i = ut, a = dt, s = p - i - a, c = G - 30 - 54, g = Math.max(...e.map((e) => e.count), 1), b = e.length, S = b > 1 ? Math.max(s / (b - 1), d) : s, C = e.map((e, t) => ({
1771
- x: i + t * S,
1772
- y: 30 + c - e.count / g * c,
1819
+ let i = ut, a = dt, s = g - i - a, c = K - 30 - 54, b = Math.max(...p.map((e) => e.count), 1), S = p.length, C = S > 1 ? Math.max(s / (S - 1), h) : s, D = p.map((e, t) => ({
1820
+ x: i + t * C,
1821
+ y: 30 + c - e.count / b * c,
1773
1822
  point: e
1774
- })), T, D = () => {
1823
+ })), O, k = () => {
1775
1824
  l.current++;
1776
1825
  let e = l.current;
1777
- n.clearRect(0, 0, p, G);
1778
- let t = E(Math.min(e / 72, 1));
1779
- M(o.current, h.current), y.current = [], [
1826
+ t.clearRect(0, 0, g, K), n && (n.clearRect(0, 0, ut, K), n.fillStyle = u.bg, n.fillRect(0, 0, ut, K), [
1780
1827
  .25,
1781
1828
  .5,
1782
1829
  .75,
1783
1830
  1
1784
1831
  ].forEach((e) => {
1785
1832
  let t = 30 + c - e * c;
1786
- n.strokeStyle = m(u.bd, .18), n.lineWidth = 1, n.setLineDash([3, 5]), n.beginPath(), n.moveTo(i, t), n.lineTo(i + s, t), n.stroke(), n.setLineDash([]), n.font = f.font, n.fillStyle = f.color, n.textAlign = "right", n.fillText(String(Math.round(g * e)), i - 6, t + 3);
1787
- }), n.save(), n.translate(12, 30 + c / 2), n.rotate(-Math.PI / 2), n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText("Count", 0, 0), n.restore(), n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText("Period", i + s / 2, G - 6), n.strokeStyle = m(u.bd, .3), n.lineWidth = 1, n.setLineDash([]), n.beginPath(), n.moveTo(i, 30 + c), n.lineTo(i + s, 30 + c), n.stroke();
1788
- let r = t * (b - 1), a = Math.floor(r) + 1;
1789
- if (a >= 2) {
1790
- n.beginPath(), n.moveTo(C[0].x, 30 + c), n.lineTo(C[0].x, C[0].y);
1791
- for (let e = 1; e < a; e++) {
1792
- let t = r - Math.floor(r), i = e < a - 1 ? C[e].x : C[e - 1].x + (C[e].x - C[e - 1].x) * (e === Math.ceil(r) ? t : 1), o = e < a - 1 ? C[e].y : C[e - 1].y + (C[e].y - C[e - 1].y) * (e === Math.ceil(r) ? t : 1);
1793
- n.lineTo(i, o);
1833
+ n.font = f.font, n.fillStyle = f.color, n.textAlign = "right", n.fillText(String(Math.round(b * e)), ut - 6, t + 3);
1834
+ }), n.save(), n.translate(12, 30 + c / 2), n.rotate(-Math.PI / 2), n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText("Count", 0, 0), n.restore());
1835
+ let r = E(Math.min(e / 72, 1)), a = y.current;
1836
+ if (o.current.forEach((e, t) => {
1837
+ t !== a && o.current.set(t, 0);
1838
+ }), a) {
1839
+ let e = o.current.get(a) ?? 0;
1840
+ o.current.set(a, Math.min(e + .2, 1));
1841
+ }
1842
+ T.current = [], [
1843
+ .25,
1844
+ .5,
1845
+ .75,
1846
+ 1
1847
+ ].forEach((e) => {
1848
+ let n = 30 + c - e * c;
1849
+ t.strokeStyle = m(u.bd, .18), t.lineWidth = 1, t.setLineDash([3, 5]), t.beginPath(), t.moveTo(i, n), t.lineTo(i + s, n), t.stroke(), t.setLineDash([]);
1850
+ }), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Period", i + s / 2, K - 6), t.strokeStyle = m(u.bd, .3), t.lineWidth = 1, t.setLineDash([]), t.beginPath(), t.moveTo(i, 30 + c), t.lineTo(i + s, 30 + c), t.stroke();
1851
+ let d = r * (S - 1), p = Math.floor(d) + 1;
1852
+ if (p >= 2) {
1853
+ t.beginPath(), t.moveTo(D[0].x, 30 + c), t.lineTo(D[0].x, D[0].y);
1854
+ for (let e = 1; e < p; e++) {
1855
+ let n = d - Math.floor(d), r = e < p - 1 ? D[e].x : D[e - 1].x + (D[e].x - D[e - 1].x) * (e === Math.ceil(d) ? n : 1), i = e < p - 1 ? D[e].y : D[e - 1].y + (D[e].y - D[e - 1].y) * (e === Math.ceil(d) ? n : 1);
1856
+ t.lineTo(r, i);
1794
1857
  }
1795
- let e = C[Math.min(a - 1, b - 1)];
1796
- n.lineTo(e.x, 30 + c), n.closePath();
1797
- let t = n.createLinearGradient(0, 30, 0, 30 + c);
1798
- t.addColorStop(0, m(u.cyan, .22)), t.addColorStop(1, m(u.cyan, .02)), n.fillStyle = t, n.fill();
1858
+ let e = D[Math.min(p - 1, S - 1)];
1859
+ t.lineTo(e.x, 30 + c), t.closePath();
1860
+ let n = t.createLinearGradient(0, 30, 0, 30 + c);
1861
+ n.addColorStop(0, m(u.cyan, .22)), n.addColorStop(1, m(u.cyan, .02)), t.fillStyle = n, t.fill();
1799
1862
  }
1800
- n.beginPath();
1801
- for (let e = 0; e < a; e++) {
1802
- let t = r - Math.floor(r), i = e === a - 1 && e > 0 && e === Math.ceil(r), o = e === 0 || e < a - 1 ? C[e].x : C[e - 1].x + (C[e].x - C[e - 1].x) * (i ? t : 1), s = e === 0 || e < a - 1 ? C[e].y : C[e - 1].y + (C[e].y - C[e - 1].y) * (i ? t : 1);
1803
- e === 0 ? n.moveTo(o, s) : n.lineTo(o, s);
1863
+ t.beginPath();
1864
+ for (let e = 0; e < p; e++) {
1865
+ let n = d - Math.floor(d), r = e === p - 1 && e > 0 && e === Math.ceil(d), i = e === 0 || e < p - 1 ? D[e].x : D[e - 1].x + (D[e].x - D[e - 1].x) * (r ? n : 1), a = e === 0 || e < p - 1 ? D[e].y : D[e - 1].y + (D[e].y - D[e - 1].y) * (r ? n : 1);
1866
+ e === 0 ? t.moveTo(i, a) : t.lineTo(i, a);
1804
1867
  }
1805
- n.strokeStyle = m(u.cyan, .85), n.lineWidth = 2, n.stroke(), C.forEach((e, t) => {
1806
- if (t >= a) return;
1807
- let r = `pt-${t}`, i = o.current.get(r) ?? 0;
1808
- w(y.current, r, e.x, e.y, 10, {
1868
+ t.strokeStyle = m(u.cyan, .85), t.lineWidth = 2, t.stroke(), D.forEach((e, n) => {
1869
+ if (n >= p) return;
1870
+ let r = `pt-${n}`, i = o.current.get(r) ?? 0;
1871
+ w(T.current, r, e.x, e.y, 10, {
1809
1872
  label: e.point.week,
1810
1873
  value: `${e.point.count} submissions`,
1811
1874
  sublabel: `£${e.point.value}M value`,
1812
1875
  color: u.cyan
1813
- }), i > 0 && x(n, e.x, 30, 30 + c, m(u.cyan, .15 * i));
1814
- let s = e.point.count === g;
1815
- (i > 0 || s) && v(n, e.x, e.y, 14, u.cyan, (s ? .3 : 0) + i * .25), n.beginPath(), n.arc(e.x, e.y, i > 0 ? 5 : 3.5, 0, Math.PI * 2), n.fillStyle = m(u.cyan, i > 0 ? 1 : .8), n.fill(), (i > 0 || s) && (n.font = pt, n.fillStyle = u.cyan, n.textAlign = "center", n.fillText(String(e.point.count), e.x, e.y - 10)), n.font = pt, n.fillStyle = i > 0 ? u.cyan : f.color, n.textAlign = "center", n.fillText(e.point.week, e.x, G - 54 + 14);
1816
- }), T = requestAnimationFrame(D);
1876
+ }), i > 0 && x(t, e.x, 30, 30 + c, m(u.cyan, .15 * i));
1877
+ let a = e.point.count === b;
1878
+ (i > 0 || a) && v(t, e.x, e.y, 14, u.cyan, (a ? .3 : 0) + i * .25), t.beginPath(), t.arc(e.x, e.y, i > 0 ? 5 : 3.5, 0, Math.PI * 2), t.fillStyle = m(u.cyan, i > 0 ? 1 : .8), t.fill(), (i > 0 || a) && (t.font = pt, t.fillStyle = u.cyan, t.textAlign = "center", t.fillText(String(e.point.count), e.x, e.y - 10)), t.font = pt, t.fillStyle = i > 0 ? u.cyan : f.color, t.textAlign = "center", t.fillText(e.point.week, e.x, K - 54 + 14);
1879
+ }), O = requestAnimationFrame(k);
1817
1880
  };
1818
- return D(), () => cancelAnimationFrame(T);
1881
+ return k(), () => cancelAnimationFrame(O);
1819
1882
  }, [
1820
- e,
1821
1883
  p,
1822
- d
1823
- ]), /* @__PURE__ */ s("div", {
1884
+ g,
1885
+ h
1886
+ ]), p.length < 2 ? /* @__PURE__ */ s(F, {
1887
+ width: lt,
1888
+ height: K,
1889
+ "data-testid": t
1890
+ }) : /* @__PURE__ */ c("div", {
1824
1891
  "data-testid": t,
1825
- className: "trend-scroll",
1826
1892
  style: {
1827
- width: "100%",
1828
- overflowX: "auto"
1893
+ position: "relative",
1894
+ width: "100%"
1829
1895
  },
1830
- children: /* @__PURE__ */ c("div", {
1896
+ children: [/* @__PURE__ */ s("div", {
1897
+ className: "trend-scroll",
1831
1898
  style: {
1832
- position: "relative",
1833
- width: p,
1834
- height: G
1899
+ width: "100%",
1900
+ overflowX: "auto"
1835
1901
  },
1836
- children: [/* @__PURE__ */ s("canvas", {
1837
- ref: r,
1838
- role: "img",
1839
- "aria-label": "Trend chart — count over time",
1902
+ children: /* @__PURE__ */ c("div", {
1840
1903
  style: {
1841
- width: p,
1842
- height: G,
1843
- display: "block"
1844
- }
1845
- }), /* @__PURE__ */ s(S, {
1846
- ...g,
1847
- parentW: p,
1848
- parentH: G
1849
- })]
1850
- })
1904
+ position: "relative",
1905
+ width: g,
1906
+ height: K
1907
+ },
1908
+ children: [/* @__PURE__ */ s("canvas", {
1909
+ ref: r,
1910
+ role: "img",
1911
+ "aria-label": "Trend chart — count over time",
1912
+ style: {
1913
+ width: g,
1914
+ height: K,
1915
+ display: "block"
1916
+ }
1917
+ }), /* @__PURE__ */ s(S, {
1918
+ ...b,
1919
+ parentW: g,
1920
+ parentH: K
1921
+ })]
1922
+ })
1923
+ }), /* @__PURE__ */ s("canvas", {
1924
+ ref: d,
1925
+ "aria-hidden": "true",
1926
+ style: {
1927
+ position: "absolute",
1928
+ top: 0,
1929
+ left: 0,
1930
+ width: ut,
1931
+ height: K,
1932
+ pointerEvents: "none"
1933
+ }
1934
+ })]
1851
1935
  });
1852
1936
  }
1853
1937
  //#endregion
1854
- //#region src/components/severityBands/SeverityBands.tsx
1855
- var K = 680, gt = 240, _t = {
1938
+ //#region src/components/proportionalBandChart/ProportionalBandChart.tsx
1939
+ var q = 680, gt = 240, _t = {
1856
1940
  Critical: u.red,
1857
1941
  High: u.orange,
1858
1942
  Medium: u.amber,
1859
1943
  Low: u.green
1860
1944
  };
1861
1945
  function vt({ severities: e = [], "data-testid": t }) {
1862
- let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: d, hitZonesRef: p } = C(r, {
1863
- width: K,
1946
+ let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), { hoveredRef: d, tooltip: p, hitZonesRef: h } = C(r, {
1947
+ width: q,
1864
1948
  height: gt
1865
- });
1949
+ }), g = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
1866
1950
  return n(() => {
1867
- let t = r.current;
1868
- if (!t) return;
1869
- let n = _(t, K, gt);
1870
- o.current = 0;
1871
- let a = e.reduce((e, t) => e + t.count, 0), s = K - 28 - 28, c = gt - 50 - 52, d = e.map((e) => e.count / a * s), h, g = () => {
1872
- o.current++;
1873
- let t = o.current;
1874
- n.clearRect(0, 0, K, gt);
1875
- let r = D(Math.min(t / 60, 1));
1876
- M(i.current, l.current), p.current = [], n.strokeStyle = m(u.bd, .2), n.lineWidth = 1, n.beginPath(), n.rect(28, 50, s, c), n.stroke(), n.strokeStyle = m(u.t4, .15), n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(K / 2, 50), n.lineTo(K / 2, 50 + c), n.stroke(), n.setLineDash([]);
1951
+ let e = r.current;
1952
+ if (!e) return;
1953
+ let t = _(e, q, gt);
1954
+ l.current = 0;
1955
+ let n = g.reduce((e, t) => e + t.count, 0), i = q - 28 - 28, a = gt - 50 - 52, s = g.map((e) => e.count / n * i), c, p = () => {
1956
+ l.current++;
1957
+ let e = l.current;
1958
+ t.clearRect(0, 0, q, gt);
1959
+ let r = D(Math.min(e / 60, 1));
1960
+ M(o.current, d.current), h.current = [], t.strokeStyle = m(u.bd, .2), t.lineWidth = 1, t.beginPath(), t.rect(28, 50, i, a), t.stroke(), t.strokeStyle = m(u.t4, .15), t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(q / 2, 50), t.lineTo(q / 2, 50 + a), t.stroke(), t.setLineDash([]);
1877
1961
  let _ = 28;
1878
- e.forEach((e, t) => {
1879
- let o = _t[e.severity] ?? u.blue, s = d[t];
1880
- s * r;
1881
- let l = i.current.get(e.severity) ?? 0, h = _ + s / 2, g = s * .85;
1882
- h - g / 2;
1883
- let y = s * r, b = g * r, x = h - b / 2;
1884
- if (y > 0 && (l > 0 && v(n, _ + y / 2, 50 + c / 2, y * .4, o, .15 * l), n.beginPath(), n.moveTo(x, 50), n.lineTo(x + b, 50), n.lineTo(_ + y, 50 + c), n.lineTo(_, 50 + c), n.closePath(), n.fillStyle = m(o, .45 + l * .25), n.fill(), n.strokeStyle = m(o, (.5 + l * .3) * r), n.lineWidth = l > 0 ? 2 : 1, n.beginPath(), n.moveTo(x, 50), n.lineTo(x + b, 50), n.stroke(), n.strokeStyle = m(o, (.3 + l * .3) * r), n.lineWidth = l > 0 ? 2 : 1, n.beginPath(), n.moveTo(_, 50 + c), n.lineTo(_ + y, 50 + c), n.stroke()), T(p.current, e.severity, _, 50, s, c, {
1962
+ g.forEach((e, i) => {
1963
+ let c = _t[e.severity] ?? u.blue, l = s[i];
1964
+ l * r;
1965
+ let d = o.current.get(e.severity) ?? 0, p = _ + l / 2, g = l * .85;
1966
+ p - g / 2;
1967
+ let y = l * r, b = g * r, x = p - b / 2;
1968
+ if (y > 0 && (d > 0 && v(t, _ + y / 2, 50 + a / 2, y * .4, c, .15 * d), t.beginPath(), t.moveTo(x, 50), t.lineTo(x + b, 50), t.lineTo(_ + y, 50 + a), t.lineTo(_, 50 + a), t.closePath(), t.fillStyle = m(c, .45 + d * .25), t.fill(), t.strokeStyle = m(c, (.5 + d * .3) * r), t.lineWidth = d > 0 ? 2 : 1, t.beginPath(), t.moveTo(x, 50), t.lineTo(x + b, 50), t.stroke(), t.strokeStyle = m(c, (.3 + d * .3) * r), t.lineWidth = d > 0 ? 2 : 1, t.beginPath(), t.moveTo(_, 50 + a), t.lineTo(_ + y, 50 + a), t.stroke()), T(h.current, e.severity, _, 50, l, a, {
1885
1969
  label: e.severity,
1886
1970
  value: `${e.count} Early Warnings`,
1887
- sublabel: `${Math.round(e.count / a * 100)}% of all EWs`,
1888
- color: o
1971
+ sublabel: `${Math.round(e.count / n * 100)}% of all EWs`,
1972
+ color: c
1889
1973
  }), r > .5) {
1890
- let t = Math.min(1, (r - .5) / .5), i = _ + s / 2;
1891
- n.globalAlpha = t, n.font = "bold " + f.font, n.fillStyle = l > 0 ? o : m(o, .9), n.textAlign = "center", n.fillText(e.severity, i, 38), n.font = "bold " + f.font, n.fillStyle = l > 0 ? u.t1 : m(u.t1, .85), n.fillText(String(e.count), i, 50 + c / 2 + 6), n.font = f.font, n.fillStyle = l > 0 ? o : f.color, n.fillText(`${Math.round(e.count / a * 100)}%`, i, 50 + c + 18), n.globalAlpha = 1;
1974
+ let i = Math.min(1, (r - .5) / .5), o = _ + l / 2;
1975
+ t.globalAlpha = i, t.font = "bold " + f.font, t.fillStyle = d > 0 ? c : m(c, .9), t.textAlign = "center", t.fillText(e.severity, o, 38), t.font = "bold " + f.font, t.fillStyle = d > 0 ? u.t1 : m(u.t1, .85), t.fillText(String(e.count), o, 50 + a / 2 + 6), t.font = f.font, t.fillStyle = d > 0 ? c : f.color, t.fillText(`${Math.round(e.count / n * 100)}%`, o, 50 + a + 18), t.globalAlpha = 1;
1892
1976
  }
1893
- _ += s;
1977
+ _ += l;
1894
1978
  });
1895
- let y = n.createLinearGradient(28, 0, 28 + s, 0);
1896
- y.addColorStop(0, m(u.red, .03)), y.addColorStop(.33, m(u.orange, .03)), y.addColorStop(.66, m(u.amber, .03)), y.addColorStop(1, m(u.green, .03)), n.fillStyle = y, n.fillRect(28, 50, s * r, c), h = requestAnimationFrame(g);
1979
+ let y = t.createLinearGradient(28, 0, 28 + i, 0);
1980
+ y.addColorStop(0, m(u.red, .03)), y.addColorStop(.33, m(u.orange, .03)), y.addColorStop(.66, m(u.amber, .03)), y.addColorStop(1, m(u.green, .03)), t.fillStyle = y, t.fillRect(28, 50, i * r, a), c = requestAnimationFrame(p);
1897
1981
  };
1898
- return g(), () => cancelAnimationFrame(h);
1899
- }, [e]), /* @__PURE__ */ c("div", {
1982
+ return p(), () => cancelAnimationFrame(c);
1983
+ }, [g]), g.length === 0 ? /* @__PURE__ */ s(F, {
1984
+ width: q,
1985
+ height: gt,
1986
+ "data-testid": t
1987
+ }) : /* @__PURE__ */ c("div", {
1900
1988
  "data-testid": t,
1901
1989
  style: {
1902
1990
  position: "relative",
1903
- width: K,
1991
+ width: q,
1904
1992
  height: gt
1905
1993
  },
1906
1994
  children: [/* @__PURE__ */ s("canvas", {
@@ -1908,96 +1996,100 @@ function vt({ severities: e = [], "data-testid": t }) {
1908
1996
  role: "img",
1909
1997
  "aria-label": "Early Warning severity distribution — prism spectrum bands",
1910
1998
  style: {
1911
- width: K,
1999
+ width: q,
1912
2000
  height: gt,
1913
2001
  display: "block"
1914
2002
  }
1915
2003
  }), /* @__PURE__ */ s(S, {
1916
- ...d,
1917
- parentW: K,
2004
+ ...p,
2005
+ parentW: q,
1918
2006
  parentH: gt
1919
2007
  })]
1920
2008
  });
1921
2009
  }
1922
2010
  //#endregion
1923
- //#region src/components/statusArc/StatusArc.tsx
1924
- var q = 460, J = 300, yt = {
2011
+ //#region src/components/hubAndSpokeRadialChart/HubAndSpokeRadialChart.tsx
2012
+ var J = 460, Y = 300, yt = {
1925
2013
  Open: u.red,
1926
2014
  Submitted: u.amber,
1927
2015
  Closed: u.green
1928
2016
  };
1929
2017
  function bt({ segments: e = [], title: t, "data-testid": r }) {
1930
- let i = a(null), o = a(0), l = a(/* @__PURE__ */ new Map()), { hoveredRef: d, tooltip: p, hitZonesRef: h } = C(i, {
1931
- width: q,
1932
- height: J
1933
- });
2018
+ let o = a(null), l = a(0), d = a(/* @__PURE__ */ new Map()), { hoveredRef: p, tooltip: h, hitZonesRef: g } = C(o, {
2019
+ width: J,
2020
+ height: Y
2021
+ }), x = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
1934
2022
  return n(() => {
1935
- let t = i.current;
1936
- if (!t) return;
1937
- let n = _(t, q, J);
1938
- o.current = 0;
1939
- let r = q * .5, a = J * .54, s = q * .22, c = e.reduce((e, t) => e + t.count, 0), p = Math.max(...e.map((e) => e.count), 1), g, x = () => {
1940
- o.current++;
1941
- let t = o.current;
1942
- n.clearRect(0, 0, q, J), h.current = [], l.current.forEach((e, t) => {
1943
- let n = t === d.current ? 1 : 0, r = e + (n - e) * .12;
1944
- Math.abs(r - n) < .005 ? n === 0 ? l.current.delete(t) : l.current.set(t, 1) : l.current.set(t, r);
1945
- }), d.current && !l.current.has(d.current) && l.current.set(d.current, 0), y(n, q, J, t, 40, m(u.blue, .04)), e.forEach((e, i) => {
1946
- let o = i / 3 * Math.PI * 2 - Math.PI / 2, c = r + Math.cos(o) * s, l = a + Math.sin(o) * s, d = yt[e.status] ?? u.blue, h = 2 + e.count / p * 8;
1947
- n.beginPath(), n.moveTo(r, a), n.lineTo(c, l), n.strokeStyle = m(d, .08), n.lineWidth = h * 2, n.stroke(), n.beginPath(), n.moveTo(r, a), n.lineTo(c, l), n.strokeStyle = m(d, .25), n.lineWidth = 1, n.stroke();
1948
- let g = (t * .005 + i * .33) % 1, _ = r + (c - r) * g, y = a + (l - a) * g;
1949
- v(n, _, y, 6, d, .4), n.beginPath(), n.arc(_, y, 2, 0, Math.PI * 2), n.fillStyle = m(d, .8), n.fill();
1950
- let b = (r + c) / 2, x = (a + l) / 2;
1951
- n.font = "bold " + f.font, n.textAlign = "center", n.textBaseline = "middle", n.fillStyle = m(d, .85), n.fillText(String(e.count), b, x);
1952
- }), e.forEach((e, t) => {
1953
- let i = t / 3 * Math.PI * 2 - Math.PI / 2, o = r + Math.cos(i) * s, d = a + Math.sin(i) * s, g = yt[e.status] ?? u.blue, _ = 10 + e.count / p * 18, y = l.current.get(e.status) ?? 0;
1954
- v(n, o, d, _ * 2.5, g, .2 + y * .15);
1955
- let b = n.createRadialGradient(o, d - _ * .2, 0, o, d, _);
1956
- b.addColorStop(0, m(g, .8 + y * .2)), b.addColorStop(1, m(g, .4 + y * .1)), n.beginPath(), n.arc(o, d, _, 0, Math.PI * 2), n.fillStyle = b, n.fill(), n.font = "bold " + f.font, n.textAlign = "center", n.textBaseline = "middle", n.fillStyle = m(u.t1, .9), n.fillText(e.status, o, d), w(h.current, e.status, o, d, _ + 6, {
2023
+ let e = o.current;
2024
+ if (!e) return;
2025
+ let t = _(e, J, Y);
2026
+ l.current = 0;
2027
+ let n = J * .5, r = Y * .54, i = J * .22, a = x.reduce((e, t) => e + t.count, 0), s = Math.max(...x.map((e) => e.count), 1), c, h = () => {
2028
+ l.current++;
2029
+ let e = l.current;
2030
+ t.clearRect(0, 0, J, Y), g.current = [], d.current.forEach((e, t) => {
2031
+ let n = t === p.current ? 1 : 0, r = e + (n - e) * .12;
2032
+ Math.abs(r - n) < .005 ? n === 0 ? d.current.delete(t) : d.current.set(t, 1) : d.current.set(t, r);
2033
+ }), p.current && !d.current.has(p.current) && d.current.set(p.current, 0), y(t, J, Y, e, 40, m(u.blue, .04)), x.forEach((a, o) => {
2034
+ let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, d = r + Math.sin(c) * i, p = yt[a.status] ?? u.blue, h = 2 + a.count / s * 8;
2035
+ t.beginPath(), t.moveTo(n, r), t.lineTo(l, d), t.strokeStyle = m(p, .08), t.lineWidth = h * 2, t.stroke(), t.beginPath(), t.moveTo(n, r), t.lineTo(l, d), t.strokeStyle = m(p, .25), t.lineWidth = 1, t.stroke();
2036
+ let g = (e * .005 + o * .33) % 1, _ = n + (l - n) * g, y = r + (d - r) * g;
2037
+ v(t, _, y, 6, p, .4), t.beginPath(), t.arc(_, y, 2, 0, Math.PI * 2), t.fillStyle = m(p, .8), t.fill();
2038
+ let b = (n + l) / 2, x = (r + d) / 2;
2039
+ t.font = "bold " + f.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = m(p, .85), t.fillText(String(a.count), b, x);
2040
+ }), x.forEach((e, o) => {
2041
+ let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, p = r + Math.sin(c) * i, h = yt[e.status] ?? u.blue, _ = 10 + e.count / s * 18, y = d.current.get(e.status) ?? 0;
2042
+ v(t, l, p, _ * 2.5, h, .2 + y * .15);
2043
+ let b = t.createRadialGradient(l, p - _ * .2, 0, l, p, _);
2044
+ b.addColorStop(0, m(h, .8 + y * .2)), b.addColorStop(1, m(h, .4 + y * .1)), t.beginPath(), t.arc(l, p, _, 0, Math.PI * 2), t.fillStyle = b, t.fill(), t.font = "bold " + f.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = m(u.t1, .9), t.fillText(e.status, l, p), w(g.current, e.status, l, p, _ + 6, {
1957
2045
  label: e.status,
1958
2046
  value: `${e.count} Early Warnings`,
1959
- sublabel: `${Math.round(e.count / c * 100)}%`,
1960
- color: g
2047
+ sublabel: `${Math.round(e.count / a * 100)}%`,
2048
+ color: h
1961
2049
  });
1962
2050
  });
1963
- let i = l.current.get("center") ?? 0;
1964
- v(n, r, a, 36, u.t3, .2 + i * .15);
1965
- let _ = n.createRadialGradient(r, a - 4, 0, r, a, 22);
1966
- _.addColorStop(0, m(u.t2, .9)), _.addColorStop(1, m(u.t3, .5)), n.beginPath(), n.arc(r, a, 22, 0, Math.PI * 2), n.fillStyle = _, n.fill(), n.font = f.font, n.textAlign = "center", n.textBaseline = "middle", n.fillStyle = m(u.t1, .9), n.fillText("EW Status", r, a - 4), n.font = "bold " + f.font, n.fillStyle = u.t1, n.fillText(String(c), r, a + 8), w(h.current, "center", r, a, 28, {
2051
+ let o = d.current.get("center") ?? 0;
2052
+ v(t, n, r, 36, u.t3, .2 + o * .15);
2053
+ let _ = t.createRadialGradient(n, r - 4, 0, n, r, 22);
2054
+ _.addColorStop(0, m(u.t2, .9)), _.addColorStop(1, m(u.t3, .5)), t.beginPath(), t.arc(n, r, 22, 0, Math.PI * 2), t.fillStyle = _, t.fill(), t.font = f.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = m(u.t1, .9), t.fillText("EW Status", n, r - 4), t.font = "bold " + f.font, t.fillStyle = u.t1, t.fillText(String(a), n, r + 8), w(g.current, "center", n, r, 28, {
1967
2055
  label: "Total EW Status",
1968
- value: `${c} Early Warnings`,
2056
+ value: `${a} Early Warnings`,
1969
2057
  color: u.t3
1970
- }), b(n, q, J, t, .015), g = requestAnimationFrame(x);
2058
+ }), b(t, J, Y, e, .015), c = requestAnimationFrame(h);
1971
2059
  };
1972
- return x(), () => cancelAnimationFrame(g);
1973
- }, [e, t]), /* @__PURE__ */ c("div", {
2060
+ return h(), () => cancelAnimationFrame(c);
2061
+ }, [x, t]), x.length === 0 ? /* @__PURE__ */ s(F, {
2062
+ width: J,
2063
+ height: Y,
2064
+ "data-testid": r
2065
+ }) : /* @__PURE__ */ c("div", {
1974
2066
  "data-testid": r,
1975
2067
  style: {
1976
2068
  position: "relative",
1977
- width: q,
1978
- height: J
2069
+ width: J,
2070
+ height: Y
1979
2071
  },
1980
2072
  children: [/* @__PURE__ */ s("canvas", {
1981
- ref: i,
2073
+ ref: o,
1982
2074
  role: "img",
1983
2075
  "aria-label": t ?? "EW status arc visualization",
1984
2076
  style: {
1985
- width: q,
1986
- height: J,
2077
+ width: J,
2078
+ height: Y,
1987
2079
  display: "block",
1988
2080
  borderRadius: 8
1989
2081
  }
1990
2082
  }), /* @__PURE__ */ s(S, {
1991
- ...p,
1992
- parentW: q,
1993
- parentH: J
2083
+ ...h,
2084
+ parentW: J,
2085
+ parentH: Y
1994
2086
  })]
1995
2087
  });
1996
2088
  }
1997
2089
  //#endregion
1998
2090
  //#region src/components/trendChart/TrendChart.tsx
1999
- var Y = 280, X = 96;
2000
- function xt({ points: e = [], className: t, colors: r }) {
2091
+ var xt = 280, X = 96;
2092
+ function St({ points: e = [], className: t, colors: r }) {
2001
2093
  let o = a(null), d = a(/* @__PURE__ */ new Map()), f = a(0), p = i(() => e.map(([e, t]) => {
2002
2094
  let n = String(t).match(/-?\d+(\.\d+)?/);
2003
2095
  return {
@@ -2005,18 +2097,18 @@ function xt({ points: e = [], className: t, colors: r }) {
2005
2097
  value: n ? Number(n[0]) : 0
2006
2098
  };
2007
2099
  }), [e]), { mouseRef: h, hoveredRef: g, tooltip: y, hitZonesRef: b } = C(o, {
2008
- width: Y,
2100
+ width: xt,
2009
2101
  height: X
2010
2102
  });
2011
2103
  return n(() => {
2012
2104
  let e = o.current;
2013
2105
  if (!e) return;
2014
- let t = _(e, Y, X);
2106
+ let t = _(e, xt, X);
2015
2107
  f.current = 0;
2016
2108
  let n = r?.line ?? u.blue, i = r?.point ?? u.blue, a = r?.axisLine ?? u.bd, s, c = () => {
2017
2109
  f.current++;
2018
2110
  let e = f.current;
2019
- if (t.clearRect(0, 0, Y, X), p.length < 2) {
2111
+ if (t.clearRect(0, 0, xt, X), p.length < 2) {
2020
2112
  s = requestAnimationFrame(c);
2021
2113
  return;
2022
2114
  }
@@ -2025,8 +2117,8 @@ function xt({ points: e = [], className: t, colors: r }) {
2025
2117
  right: 12,
2026
2118
  top: 16,
2027
2119
  bottom: 20
2028
- }, o = Y - r.left - r.right, l = X - r.top - r.bottom, _ = p.map((e) => e.value), y = Math.min(..._), S = Math.max(..._) - y || 1, C = (e) => r.left + e / (p.length - 1) * o, T = (e) => r.top + (1 - (e - y) / S) * l, E = 1 - (1 - Math.min(e / 48, 1)) ** 3, D = Math.max(2, Math.floor(E * p.length));
2029
- if (M(d.current, g.current), b.current = [], t.strokeStyle = m(a, .3), t.lineWidth = .5, t.setLineDash([]), t.beginPath(), t.moveTo(r.left, X - r.bottom), t.lineTo(Y - r.right, X - r.bottom), t.stroke(), t.font = "9px 'JetBrains Mono', monospace", t.fillStyle = m(u.t4, .9), t.textAlign = "center", p.forEach((e, n) => {
2120
+ }, o = xt - r.left - r.right, l = X - r.top - r.bottom, _ = p.map((e) => e.value), y = Math.min(..._), S = Math.max(..._) - y || 1, C = (e) => r.left + e / (p.length - 1) * o, T = (e) => r.top + (1 - (e - y) / S) * l, E = 1 - (1 - Math.min(e / 48, 1)) ** 3, D = Math.max(2, Math.floor(E * p.length));
2121
+ if (M(d.current, g.current), b.current = [], t.strokeStyle = m(a, .3), t.lineWidth = .5, t.setLineDash([]), t.beginPath(), t.moveTo(r.left, X - r.bottom), t.lineTo(xt - r.right, X - r.bottom), t.stroke(), t.font = "9px 'JetBrains Mono', monospace", t.fillStyle = m(u.t4, .9), t.textAlign = "center", p.forEach((e, n) => {
2030
2122
  t.fillText(e.label.replace("Day ", "D"), C(n), X - 4);
2031
2123
  }), h.current.over && g.current) {
2032
2124
  let e = parseInt(g.current.split("-")[1]);
@@ -2063,7 +2155,7 @@ function xt({ points: e = [], className: t, colors: r }) {
2063
2155
  children: /* @__PURE__ */ c("div", {
2064
2156
  style: {
2065
2157
  position: "relative",
2066
- width: Y,
2158
+ width: xt,
2067
2159
  height: X
2068
2160
  },
2069
2161
  children: [/* @__PURE__ */ s("canvas", {
@@ -2071,73 +2163,76 @@ function xt({ points: e = [], className: t, colors: r }) {
2071
2163
  role: "img",
2072
2164
  "aria-label": "trend chart",
2073
2165
  style: {
2074
- width: Y,
2166
+ width: xt,
2075
2167
  height: X,
2076
2168
  display: "block",
2077
2169
  borderRadius: 8
2078
2170
  }
2079
2171
  }), /* @__PURE__ */ s(S, {
2080
2172
  ...y,
2081
- parentW: Y,
2173
+ parentW: xt,
2082
2174
  parentH: X
2083
2175
  })]
2084
2176
  })
2085
2177
  });
2086
2178
  }
2087
2179
  //#endregion
2088
- //#region src/components/variationSplit/VariationSplit.tsx
2089
- var St = 680, Ct = 8, wt = 26, Tt = 14, Et = 16, Dt = 32;
2090
- function Ot({ contractors: e = [], "data-testid": t }) {
2091
- let r = a(null), l = a(/* @__PURE__ */ new Map()), f = a(0), [h, g] = o(!1), y = i(() => h ? e : e.slice(0, Ct), [e, h]), b = Et + Dt + y.length * (wt + Tt) - Tt, { hoveredRef: x, tooltip: w, hitZonesRef: E } = C(r, {
2092
- width: St,
2180
+ //#region src/components/segmentedSplitBarChart/SegmentedSplitBarChart.tsx
2181
+ var Ct = 680, wt = 8, Tt = 26, Et = 14, Dt = 16, Ot = 32;
2182
+ function kt({ items: e = [], "data-testid": t }) {
2183
+ let r = a(null), l = a(/* @__PURE__ */ new Map()), d = a(0), [f, h] = o(!1), g = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), y = i(() => f ? g : g.slice(0, wt), [g, f]), b = Dt + Ot + y.length * (Tt + Et) - Et, { hoveredRef: x, tooltip: w, hitZonesRef: E } = C(r, {
2184
+ width: Ct,
2093
2185
  height: b
2094
2186
  });
2095
2187
  return n(() => {
2096
2188
  let e = r.current;
2097
2189
  if (!e) return;
2098
- let t = _(e, St, b);
2099
- f.current = 0;
2100
- let n = Et, i = Dt, a = wt, o = Tt, s = St - 60 - 28, c = Math.max(...y.map((e) => (e.implemented ?? 0) + (e.unimplemented ?? 0))), h = y.length * (a + o) - o, g = n + (b - n - i - h) / 2, S, C = () => {
2101
- f.current++;
2102
- let e = f.current;
2103
- t.clearRect(0, 0, St, b);
2190
+ let t = _(e, Ct, b);
2191
+ d.current = 0;
2192
+ let n = Dt, i = Ot, a = Tt, o = Et, s = Ct - 60 - 28, c = Math.max(...y.map((e) => (e.implemented ?? 0) + (e.unimplemented ?? 0))), f = y.length * (a + o) - o, h = n + (b - n - i - f) / 2, g, S = () => {
2193
+ d.current++;
2194
+ let e = d.current;
2195
+ t.clearRect(0, 0, Ct, b);
2104
2196
  let n = D(Math.min(e / 60, 1));
2105
2197
  M(l.current, x.current), E.current = [], y.forEach((e, r) => {
2106
- d[r % d.length];
2107
- let i = j(n, r, y.length, D), f = g + r * (a + o), p = (e.implemented ?? 0) + (e.unimplemented ?? 0), h = (e.implemented ?? 0) / c * s * i, _ = (e.unimplemented ?? 0) / c * s * i, b = `${e.id}-impl`, x = `${e.id}-un`, S = l.current.get(b) ?? 0, C = l.current.get(x) ?? 0;
2108
- T(E.current, b, 60, f, h || 1, a, {
2198
+ let i = j(n, r, y.length, D), d = h + r * (a + o), f = (e.implemented ?? 0) + (e.unimplemented ?? 0), p = (e.implemented ?? 0) / c * s * i, g = (e.unimplemented ?? 0) / c * s * i, _ = `${e.id}-impl`, b = `${e.id}-un`, x = l.current.get(_) ?? 0, S = l.current.get(b) ?? 0;
2199
+ T(E.current, _, 60, d, p || 1, a, {
2109
2200
  label: `${e.name} — Implemented`,
2110
2201
  value: `${e.implemented ?? 0} variations`,
2111
- sublabel: `${Math.round((e.implemented ?? 0) / (p || 1) * 100)}% complete`,
2202
+ sublabel: `${Math.round((e.implemented ?? 0) / (f || 1) * 100)}% complete`,
2112
2203
  color: u.green
2113
- }), T(E.current, x, 60 + h, f, _ || 1, a, {
2204
+ }), T(E.current, b, 60 + p, d, g || 1, a, {
2114
2205
  label: `${e.name} — Unimplemented`,
2115
2206
  value: `${e.unimplemented ?? 0} variations`,
2116
- sublabel: `${Math.round((e.unimplemented ?? 0) / (p || 1) * 100)}% pending`,
2207
+ sublabel: `${Math.round((e.unimplemented ?? 0) / (f || 1) * 100)}% pending`,
2117
2208
  color: u.amber
2118
- }), t.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", t.fillStyle = u.t2, t.textAlign = "right", t.fillText(e.abbreviation ?? e.name.slice(0, 6), 52, f + a / 2 + 4), t.fillStyle = m(u.bd, .15), t.beginPath(), t.roundRect(60, f, p / c * s, a, 4), t.fill(), h > 0 && (S > 0 && v(t, 60 + h / 2, f + a / 2, h * .3, u.green, .12 * S), t.fillStyle = m(u.green, .6 + S * .2), t.beginPath(), t.roundRect(60, f, h, a, [
2209
+ }), t.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", t.fillStyle = u.t2, t.textAlign = "right", t.fillText(e.abbreviation ?? e.name.slice(0, 6), 52, d + a / 2 + 4), t.fillStyle = m(u.bd, .15), t.beginPath(), t.roundRect(60, d, f / c * s, a, 4), t.fill(), p > 0 && (x > 0 && v(t, 60 + p / 2, d + a / 2, p * .3, u.green, .12 * x), t.fillStyle = m(u.green, .6 + x * .2), t.beginPath(), t.roundRect(60, d, p, a, [
2119
2210
  4,
2120
2211
  0,
2121
2212
  0,
2122
2213
  4
2123
- ]), t.fill(), h > 28 && i > .5 && (t.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", t.fillStyle = S > 0 ? u.green : u.t2, t.textAlign = "center", t.fillText(String(e.implemented ?? 0), 60 + h / 2, f + a / 2 + 4))), _ > 0 && (C > 0 && v(t, 60 + h + _ / 2, f + a / 2, _ * .3, u.amber, .12 * C), t.fillStyle = m(u.amber, .18 + C * .18), t.strokeStyle = m(u.amber, .3 + C * .3), t.lineWidth = 1, t.beginPath(), t.roundRect(60 + h, f, _, a, [
2214
+ ]), t.fill(), p > 28 && i > .5 && (t.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", t.fillStyle = x > 0 ? u.green : u.t2, t.textAlign = "center", t.fillText(String(e.implemented ?? 0), 60 + p / 2, d + a / 2 + 4))), g > 0 && (S > 0 && v(t, 60 + p + g / 2, d + a / 2, g * .3, u.amber, .12 * S), t.fillStyle = m(u.amber, .18 + S * .18), t.strokeStyle = m(u.amber, .3 + S * .3), t.lineWidth = 1, t.beginPath(), t.roundRect(60 + p, d, g, a, [
2124
2215
  0,
2125
2216
  4,
2126
2217
  4,
2127
2218
  0
2128
- ]), t.fill(), t.stroke(), _ > 28 && i > .5 && (t.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", t.fillStyle = C > 0 ? u.amber : u.t2, t.textAlign = "center", t.fillText(String(e.unimplemented ?? 0), 60 + h + _ / 2, f + a / 2 + 4))), h > 0 && _ > 0 && (t.strokeStyle = m(u.bg, .7), t.lineWidth = 2, t.beginPath(), t.moveTo(60 + h, f), t.lineTo(60 + h, f + a), t.stroke());
2219
+ ]), t.fill(), t.stroke(), g > 28 && i > .5 && (t.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", t.fillStyle = S > 0 ? u.amber : u.t2, t.textAlign = "center", t.fillText(String(e.unimplemented ?? 0), 60 + p + g / 2, d + a / 2 + 4))), p > 0 && g > 0 && (t.strokeStyle = m(u.bg, .7), t.lineWidth = 2, t.beginPath(), t.moveTo(60 + p, d), t.lineTo(60 + p, d + a), t.stroke());
2129
2220
  });
2130
- let r = g + h + 24, i = 60 + s / 2;
2131
- t.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", t.textAlign = "right", t.fillStyle = u.green, t.fillText("■ Implemented", i - 10, r), t.textAlign = "left", t.fillStyle = p.color, t.fillText("■ Unimplemented", i + 10, r), S = requestAnimationFrame(C);
2221
+ let r = h + f + 24, i = 60 + s / 2;
2222
+ t.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", t.textAlign = "right", t.fillStyle = u.green, t.fillText("■ Implemented", i - 10, r), t.textAlign = "left", t.fillStyle = p.color, t.fillText("■ Unimplemented", i + 10, r), g = requestAnimationFrame(S);
2132
2223
  };
2133
- return C(), () => cancelAnimationFrame(S);
2134
- }, [y, b]), /* @__PURE__ */ c("div", {
2224
+ return S(), () => cancelAnimationFrame(g);
2225
+ }, [y, b]), g.length === 0 ? /* @__PURE__ */ s(F, {
2226
+ width: Ct,
2227
+ height: 160,
2228
+ "data-testid": t
2229
+ }) : /* @__PURE__ */ c("div", {
2135
2230
  "data-testid": t,
2136
- style: { width: St },
2231
+ style: { width: Ct },
2137
2232
  children: [/* @__PURE__ */ c("div", {
2138
2233
  style: {
2139
2234
  position: "relative",
2140
- width: St,
2235
+ width: Ct,
2141
2236
  height: b
2142
2237
  },
2143
2238
  children: [/* @__PURE__ */ s("canvas", {
@@ -2145,38 +2240,38 @@ function Ot({ contractors: e = [], "data-testid": t }) {
2145
2240
  role: "img",
2146
2241
  "aria-label": "Implemented vs unimplemented variations per contractor — split bar",
2147
2242
  style: {
2148
- width: St,
2243
+ width: Ct,
2149
2244
  height: b,
2150
2245
  display: "block"
2151
2246
  }
2152
2247
  }), /* @__PURE__ */ s(S, {
2153
2248
  ...w,
2154
- parentW: St,
2249
+ parentW: Ct,
2155
2250
  parentH: b
2156
2251
  })]
2157
- }), e.length > Ct && /* @__PURE__ */ s("div", {
2252
+ }), g.length > wt && /* @__PURE__ */ s("div", {
2158
2253
  style: { marginTop: 8 },
2159
2254
  children: /* @__PURE__ */ s(ae, {
2160
- expanded: h,
2161
- onToggle: () => g((e) => !e)
2255
+ expanded: f,
2256
+ onToggle: () => h((e) => !e)
2162
2257
  })
2163
2258
  })]
2164
2259
  });
2165
2260
  }
2166
2261
  //#endregion
2167
2262
  //#region src/components/weeklyFlow/WeeklyFlow.tsx
2168
- var kt = 800, At = 360;
2169
- function jt({ contractors: e = [], "data-testid": t }) {
2263
+ var At = 800, jt = 360;
2264
+ function Mt({ items: e = [], "data-testid": t }) {
2170
2265
  let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: f, hitZonesRef: p } = C(r, {
2171
- width: kt,
2172
- height: At
2266
+ width: At,
2267
+ height: jt
2173
2268
  });
2174
2269
  return n(() => {
2175
2270
  let t = r.current;
2176
2271
  if (!t) return;
2177
- let n = _(t, kt, At);
2272
+ let n = _(t, At, jt);
2178
2273
  o.current = 0;
2179
- let a = e.reduce((e, t) => e + (t.base ?? 0), 0), s = e.reduce((e, t) => e + (t.variation ?? 0), 0), c = e.reduce((e, t) => e + (t.total ?? 0), 0), f = At - 20 - 26, h = f - 6 * (e.length - 1), g = 20, y = e.map((e, t) => {
2274
+ let a = e.reduce((e, t) => e + (t.base ?? 0), 0), s = e.reduce((e, t) => e + (t.variation ?? 0), 0), c = e.reduce((e, t) => e + (t.total ?? 0), 0), f = jt - 20 - 26, h = f - 6 * (e.length - 1), g = 20, y = e.map((e, t) => {
2180
2275
  let n = Math.max(24, (e.total ?? 0) / (c || 1) * h), r = {
2181
2276
  x: 100 - 110 / 2,
2182
2277
  y: g,
@@ -2204,16 +2299,16 @@ function jt({ contractors: e = [], "data-testid": t }) {
2204
2299
  }, k, A = () => {
2205
2300
  o.current++;
2206
2301
  let t = o.current;
2207
- n.clearRect(0, 0, kt, At);
2302
+ n.clearRect(0, 0, At, jt);
2208
2303
  let r = E(Math.min(t / 80, 1));
2209
2304
  if (M(i.current, l.current), p.current = [], e.forEach((t, o) => {
2210
2305
  let c = y[o], l = j(r, o, e.length, E), u = i.current.get(t.id) ?? 0;
2211
2306
  if (l < .01) return;
2212
2307
  let d = (t.base ?? 0) / (t.total || 1), f = (t.variation ?? 0) / (t.total || 1), p = c.h * d, m = c.h * f, h = c.y + p / 2, g = c.y + p + m / 2, _ = Math.max(2, (t.base ?? 0) / a * x), v = Math.max(2, (t.variation ?? 0) / s * S), b = w.y + e.slice(0, o).reduce((e, t) => e + (t.base ?? 0) / a * x, 0) + _ / 2, C = D.y + e.slice(0, o).reduce((e, t) => e + (t.variation ?? 0) / s * S, 0) + v / 2, T = u * .2 + .18;
2213
- Mt(n, c.x + 110, h, 420 - 110 / 2, b, _ * l, c.color, T), Mt(n, c.x + 110, g, 420 - 110 / 2, C, v * l, c.color, T * .75);
2308
+ Nt(n, c.x + 110, h, 420 - 110 / 2, b, _ * l, c.color, T), Nt(n, c.x + 110, g, 420 - 110 / 2, C, v * l, c.color, T * .75);
2214
2309
  }), r > .3) {
2215
2310
  let e = Math.min(1, (r - .3) / .7), t = O.y + a / c * f / 2, i = O.y + f - s / c * f / 2;
2216
- Mt(n, 475, w.cy, 720 - 110 / 2, t, x * e, u.blue, .25 * e), Mt(n, 475, D.cy, 720 - 110 / 2, i, S * e, u.amber, .22 * e);
2311
+ Nt(n, 475, w.cy, 720 - 110 / 2, t, x * e, u.blue, .25 * e), Nt(n, 475, D.cy, 720 - 110 / 2, i, S * e, u.amber, .22 * e);
2217
2312
  }
2218
2313
  if ([
2219
2314
  "Contractors",
@@ -2225,7 +2320,7 @@ function jt({ contractors: e = [], "data-testid": t }) {
2225
2320
  420,
2226
2321
  720
2227
2322
  ][t];
2228
- n.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = m(u.t3, .5), n.textAlign = "center", n.fillText(e, r, At - 8);
2323
+ n.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = m(u.t3, .5), n.textAlign = "center", n.fillText(e, r, jt - 8);
2229
2324
  }), e.forEach((t, a) => {
2230
2325
  let o = y[a], s = j(r, a, e.length, E), c = i.current.get(t.id) ?? 0;
2231
2326
  T(p.current, t.id, o.x, o.y, 110, o.h, {
@@ -2249,32 +2344,32 @@ function jt({ contractors: e = [], "data-testid": t }) {
2249
2344
  "data-testid": t,
2250
2345
  style: {
2251
2346
  position: "relative",
2252
- width: kt,
2253
- height: At
2347
+ width: At,
2348
+ height: jt
2254
2349
  },
2255
2350
  children: [/* @__PURE__ */ s("canvas", {
2256
2351
  ref: r,
2257
2352
  role: "img",
2258
2353
  "aria-label": "Weekly report flow — base value and variations per contractor flowing to total commitment",
2259
2354
  style: {
2260
- width: kt,
2261
- height: At,
2355
+ width: At,
2356
+ height: jt,
2262
2357
  display: "block"
2263
2358
  }
2264
2359
  }), /* @__PURE__ */ s(S, {
2265
2360
  ...f,
2266
- parentW: kt,
2267
- parentH: At
2361
+ parentW: At,
2362
+ parentH: jt
2268
2363
  })]
2269
2364
  });
2270
2365
  }
2271
- function Mt(e, t, n, r, i, a, o, s) {
2366
+ function Nt(e, t, n, r, i, a, o, s) {
2272
2367
  let c = (t + r) / 2;
2273
2368
  e.beginPath(), e.moveTo(t, n - a / 2), e.bezierCurveTo(c, n - a / 2, c, i - a / 2, r, i - a / 2), e.lineTo(r, i + a / 2), e.bezierCurveTo(c, i + a / 2, c, n + a / 2, t, n + a / 2), e.closePath(), e.fillStyle = m(o, s), e.fill();
2274
2369
  }
2275
2370
  //#endregion
2276
2371
  //#region src/components/visualizationRenderer/VisualizationRenderer.tsx
2277
- function Nt({ config: e, className: t }) {
2372
+ function Pt({ config: e, className: t }) {
2278
2373
  return e.type === "line" ? /* @__PURE__ */ s(Ie, {
2279
2374
  rows: e.rows,
2280
2375
  className: t
@@ -2298,62 +2393,62 @@ function Nt({ config: e, className: t }) {
2298
2393
  }) : e.type === "flow" ? /* @__PURE__ */ s(nt, {
2299
2394
  selectedEntity: e.selectedEntity,
2300
2395
  className: t
2301
- }) : e.type === "trend" ? /* @__PURE__ */ s(xt, {
2396
+ }) : e.type === "trend" ? /* @__PURE__ */ s(St, {
2302
2397
  points: e.points,
2303
2398
  className: t
2304
2399
  }) : e.type === "mini-bars" ? /* @__PURE__ */ s(ze, {
2305
2400
  rows: e.rows,
2306
2401
  className: t
2307
- }) : e.type === "contract-value-orb" ? /* @__PURE__ */ s(Ae, { data: e.data }) : e.type === "contract-bars" ? /* @__PURE__ */ s(Ce, { contractors: e.contractors }) : e.type === "commitment-race" ? /* @__PURE__ */ s(fe, { contractors: e.contractors }) : e.type === "status-arc" ? /* @__PURE__ */ s(bt, {
2402
+ }) : e.type === "stacked-horizontal-bar-chart" ? /* @__PURE__ */ s(ke, { data: e.data }) : e.type === "multi-metric-constellation-chart" ? /* @__PURE__ */ s(Se, { items: e.items }) : e.type === "progress-race-chart" ? /* @__PURE__ */ s(fe, { items: e.items }) : e.type === "hub-and-spoke-radial-chart" ? /* @__PURE__ */ s(bt, {
2308
2403
  segments: e.segments,
2309
2404
  title: e.title
2310
- }) : e.type === "ew-category" ? /* @__PURE__ */ s(Fe, { categories: e.categories }) : e.type === "contractor-rank" ? /* @__PURE__ */ s(Pe, { contractors: e.contractors }) : e.type === "severity-bands" ? /* @__PURE__ */ s(vt, { severities: e.severities }) : e.type === "nce-tree" ? /* @__PURE__ */ s(He, {
2405
+ }) : e.type === "dot-matrix-chart" ? /* @__PURE__ */ s(Fe, { items: e.items }) : e.type === "ranked-card-leaderboard" ? /* @__PURE__ */ s(Pe, { items: e.items }) : e.type === "proportional-band-chart" ? /* @__PURE__ */ s(vt, { severities: e.severities }) : e.type === "radial-fan-tree-chart" ? /* @__PURE__ */ s(He, {
2311
2406
  total: e.total,
2312
- byContractor: e.byContractor
2313
- }) : e.type === "compensation-gauge" ? /* @__PURE__ */ s(he, {
2314
- pct: e.pct,
2407
+ items: e.items
2408
+ }) : e.type === "semi-circular-gauge-chart" ? /* @__PURE__ */ s(he, {
2409
+ value: e.value,
2315
2410
  confirmed: e.confirmed,
2316
2411
  total: e.total
2317
- }) : e.type === "variation-split" ? /* @__PURE__ */ s(Ot, { contractors: e.contractors }) : e.type === "quotation-balance" ? /* @__PURE__ */ s(ot, {
2318
- accepted: e.accepted,
2319
- submitted: e.submitted
2320
- }) : e.type === "quotation-trend" ? /* @__PURE__ */ s(ct, { trend: e.trend }) : e.type === "trend-view" ? /* @__PURE__ */ s(ht, { trend: e.trend }) : e.type === "weekly-flow" ? /* @__PURE__ */ s(jt, { contractors: e.contractors }) : /* @__PURE__ */ s("div", {
2412
+ }) : e.type === "segmented-split-bar-chart" ? /* @__PURE__ */ s(kt, { items: e.items }) : e.type === "balance-scale-chart" ? /* @__PURE__ */ s(ot, {
2413
+ left: e.left,
2414
+ right: e.right
2415
+ }) : e.type === "area-line-chart" ? /* @__PURE__ */ s(ct, { points: e.points }) : e.type === "trend-view" ? /* @__PURE__ */ s(ht, { points: e.points }) : e.type === "weekly-flow" ? /* @__PURE__ */ s(Mt, { items: e.items }) : /* @__PURE__ */ s("div", {
2321
2416
  className: "viz-empty",
2322
2417
  children: "Visualization unavailable"
2323
2418
  });
2324
2419
  }
2325
2420
  //#endregion
2326
2421
  //#region src/utils/mounts.tsx
2327
- var Pt = [];
2328
- function Ft(e) {
2422
+ var Ft = [];
2423
+ function It(e) {
2329
2424
  try {
2330
2425
  return JSON.parse(decodeURIComponent(e));
2331
2426
  } catch {
2332
2427
  return null;
2333
2428
  }
2334
2429
  }
2335
- function It() {
2336
- for (; Pt.length;) {
2337
- let e = Pt.pop();
2430
+ function Lt() {
2431
+ for (; Ft.length;) {
2432
+ let e = Ft.pop();
2338
2433
  e && e.unmount();
2339
2434
  }
2340
2435
  }
2341
- function Lt() {
2342
- It(), document.querySelectorAll("[data-d3-viz]").forEach((t) => {
2436
+ function Rt() {
2437
+ Lt(), document.querySelectorAll("[data-d3-viz]").forEach((t) => {
2343
2438
  let n = t.dataset.d3Viz;
2344
2439
  if (!n) return;
2345
- let r = Ft(n);
2440
+ let r = It(n);
2346
2441
  if (!r) return;
2347
2442
  let i = e(t);
2348
- Pt.push(i), i.render(/* @__PURE__ */ s(Nt, { config: r }));
2443
+ Ft.push(i), i.render(/* @__PURE__ */ s(Pt, { config: r }));
2349
2444
  });
2350
2445
  }
2351
- function Rt(e) {
2446
+ function zt(e) {
2352
2447
  return encodeURIComponent(JSON.stringify(e));
2353
2448
  }
2354
2449
  //#endregion
2355
2450
  //#region src/components/donutChart/DonutChart.tsx
2356
- function zt({ rows: e = [], className: t, colors: n }) {
2451
+ function Bt({ rows: e = [], className: t, colors: n }) {
2357
2452
  return /* @__PURE__ */ s(Ke, {
2358
2453
  rows: e,
2359
2454
  variant: "donut",
@@ -2373,7 +2468,7 @@ var Z = {
2373
2468
  red: u.red,
2374
2469
  amber: u.amber,
2375
2470
  green: u.green
2376
- }, Q = "'Satoshi Variable', 'DM Sans', sans-serif", Bt = {
2471
+ }, Q = "'Satoshi Variable', 'DM Sans', sans-serif", Vt = {
2377
2472
  color: "#F7F7F7",
2378
2473
  fontFamily: Q,
2379
2474
  fontSize: 24,
@@ -2386,7 +2481,7 @@ var Z = {
2386
2481
  fontWeight: 400,
2387
2482
  lineHeight: "20px"
2388
2483
  };
2389
- function Vt({ chips: e = [] }) {
2484
+ function Ht({ chips: e = [] }) {
2390
2485
  return /* @__PURE__ */ s("div", {
2391
2486
  style: {
2392
2487
  display: "flex",
@@ -2408,7 +2503,7 @@ function Vt({ chips: e = [] }) {
2408
2503
  },
2409
2504
  children: [/* @__PURE__ */ s("span", {
2410
2505
  style: {
2411
- ...Bt,
2506
+ ...Vt,
2412
2507
  color: e.color ?? Z.t1
2413
2508
  },
2414
2509
  children: e.value
@@ -2422,7 +2517,7 @@ function Vt({ chips: e = [] }) {
2422
2517
  }, t))
2423
2518
  });
2424
2519
  }
2425
- function Ht({ items: e = [] }) {
2520
+ function Ut({ items: e = [] }) {
2426
2521
  return /* @__PURE__ */ s("div", {
2427
2522
  style: {
2428
2523
  display: "flex",
@@ -2445,7 +2540,7 @@ function Ht({ items: e = [] }) {
2445
2540
  },
2446
2541
  children: [/* @__PURE__ */ s("div", {
2447
2542
  style: {
2448
- ...Bt,
2543
+ ...Vt,
2449
2544
  color: e.color ?? Z.t1
2450
2545
  },
2451
2546
  children: e.value
@@ -2456,7 +2551,7 @@ function Ht({ items: e = [] }) {
2456
2551
  }, t))
2457
2552
  });
2458
2553
  }
2459
- function Ut({ items: e = [] }) {
2554
+ function Wt({ items: e = [] }) {
2460
2555
  return /* @__PURE__ */ s("div", {
2461
2556
  style: {
2462
2557
  display: "flex",
@@ -2488,7 +2583,8 @@ function Ut({ items: e = [] }) {
2488
2583
  }),
2489
2584
  /* @__PURE__ */ s("span", {
2490
2585
  style: {
2491
- ...Bt,
2586
+ ...Vt,
2587
+ fontSize: 14,
2492
2588
  color: e.color ?? Z.t1,
2493
2589
  minWidth: 70,
2494
2590
  flexShrink: 0
@@ -2506,7 +2602,7 @@ function Ut({ items: e = [] }) {
2506
2602
  }, t))
2507
2603
  });
2508
2604
  }
2509
- function Wt({ items: e = [] }) {
2605
+ function Gt({ items: e = [] }) {
2510
2606
  return /* @__PURE__ */ s("div", {
2511
2607
  style: {
2512
2608
  display: "flex",
@@ -2529,7 +2625,7 @@ function Wt({ items: e = [] }) {
2529
2625
  },
2530
2626
  children: [/* @__PURE__ */ s("div", {
2531
2627
  style: {
2532
- ...Bt,
2628
+ ...Vt,
2533
2629
  color: e.color ?? Z.t1
2534
2630
  },
2535
2631
  children: e.value
@@ -2540,12 +2636,12 @@ function Wt({ items: e = [] }) {
2540
2636
  }, t))
2541
2637
  });
2542
2638
  }
2543
- var Gt = {
2639
+ var Kt = {
2544
2640
  red: Z.red,
2545
2641
  amber: Z.amber,
2546
2642
  green: Z.green
2547
2643
  };
2548
- function Kt({ items: e = [] }) {
2644
+ function qt({ items: e = [] }) {
2549
2645
  return /* @__PURE__ */ s("div", {
2550
2646
  style: {
2551
2647
  display: "flex",
@@ -2553,7 +2649,7 @@ function Kt({ items: e = [] }) {
2553
2649
  gap: 5
2554
2650
  },
2555
2651
  children: e.map((e, t) => {
2556
- let n = Gt[e.severity];
2652
+ let n = Kt[e.severity];
2557
2653
  return /* @__PURE__ */ c("div", {
2558
2654
  style: {
2559
2655
  display: "flex",
@@ -2578,7 +2674,7 @@ function Kt({ items: e = [] }) {
2578
2674
  })
2579
2675
  });
2580
2676
  }
2581
- function qt({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2677
+ function Jt({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2582
2678
  let a = t - e;
2583
2679
  return /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ c("div", {
2584
2680
  style: {
@@ -2688,9 +2784,9 @@ function qt({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2688
2784
  }, r);
2689
2785
  })
2690
2786
  ]
2691
- }), i && i.length > 0 && /* @__PURE__ */ s(Vt, { chips: i })] });
2787
+ }), i && i.length > 0 && /* @__PURE__ */ s(Ht, { chips: i })] });
2692
2788
  }
2693
- function Jt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i, rightLabel: a, rightValue: o, rightColor: l, chips: d }) {
2789
+ function Yt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i, rightLabel: a, rightValue: o, rightColor: l, chips: d }) {
2694
2790
  let f = r ?? u.blue, p = l ?? u.cyan;
2695
2791
  return /* @__PURE__ */ c("div", { children: [
2696
2792
  /* @__PURE__ */ c("div", {
@@ -2784,10 +2880,10 @@ function Jt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2784
2880
  })
2785
2881
  })]
2786
2882
  }),
2787
- d && d.length > 0 && /* @__PURE__ */ s(Vt, { chips: d })
2883
+ d && d.length > 0 && /* @__PURE__ */ s(Ht, { chips: d })
2788
2884
  ] });
2789
2885
  }
2790
- function Yt({ pct: e, label: t, color: n, chips: r }) {
2886
+ function Xt({ pct: e, label: t, color: n, chips: r }) {
2791
2887
  let i = n ?? u.blue, a = 2 * Math.PI * 30, o = a * (1 - e / 100);
2792
2888
  return /* @__PURE__ */ c("div", {
2793
2889
  style: {
@@ -2868,7 +2964,7 @@ function Yt({ pct: e, label: t, color: n, chips: r }) {
2868
2964
  },
2869
2965
  children: [/* @__PURE__ */ s("span", {
2870
2966
  style: {
2871
- ...Bt,
2967
+ ...Vt,
2872
2968
  color: e.color ?? Z.t1
2873
2969
  },
2874
2970
  children: e.value
@@ -2881,16 +2977,16 @@ function Yt({ pct: e, label: t, color: n, chips: r }) {
2881
2977
  })]
2882
2978
  });
2883
2979
  }
2884
- var Xt = {
2980
+ var Zt = {
2885
2981
  green: "#34D39918",
2886
2982
  amber: "#FBBF2418",
2887
2983
  red: "#F0606018"
2888
- }, Zt = {
2984
+ }, Qt = {
2889
2985
  green: "#34D399",
2890
2986
  amber: "#FBBF24",
2891
2987
  red: "#F06060"
2892
2988
  };
2893
- function Qt({ items: e = [] }) {
2989
+ function $t({ items: e = [] }) {
2894
2990
  return /* @__PURE__ */ s("div", {
2895
2991
  style: {
2896
2992
  display: "flex",
@@ -2954,8 +3050,8 @@ function Qt({ items: e = [] }) {
2954
3050
  style: {
2955
3051
  fontSize: 14,
2956
3052
  fontWeight: 600,
2957
- color: Zt[e.badgeSeverity],
2958
- background: Xt[e.badgeSeverity],
3053
+ color: Qt[e.badgeSeverity],
3054
+ background: Zt[e.badgeSeverity],
2959
3055
  padding: "2px 7px",
2960
3056
  borderRadius: 4,
2961
3057
  fontFamily: Q,
@@ -2978,12 +3074,12 @@ function Qt({ items: e = [] }) {
2978
3074
  }, t))
2979
3075
  });
2980
3076
  }
2981
- var $t = {
3077
+ var en = {
2982
3078
  red: Z.red,
2983
3079
  amber: Z.amber,
2984
3080
  green: Z.green
2985
3081
  };
2986
- function en({ items: e = [] }) {
3082
+ function tn({ items: e = [] }) {
2987
3083
  return /* @__PURE__ */ s("div", {
2988
3084
  style: {
2989
3085
  display: "flex",
@@ -2991,7 +3087,7 @@ function en({ items: e = [] }) {
2991
3087
  gap: 5
2992
3088
  },
2993
3089
  children: e.map((e, t) => {
2994
- let n = $t[e.severity];
3090
+ let n = en[e.severity];
2995
3091
  return /* @__PURE__ */ c("div", {
2996
3092
  style: {
2997
3093
  display: "flex",
@@ -2999,9 +3095,7 @@ function en({ items: e = [] }) {
2999
3095
  gap: 10,
3000
3096
  padding: "9px 12px",
3001
3097
  background: n + "0A",
3002
- border: `1px solid ${n}25`,
3003
- borderLeft: `3px solid ${n}`,
3004
- borderRadius: 6
3098
+ border: `1px solid ${n}25`
3005
3099
  },
3006
3100
  children: [
3007
3101
  /* @__PURE__ */ s("span", { style: {
@@ -3045,7 +3139,7 @@ function en({ items: e = [] }) {
3045
3139
  })
3046
3140
  });
3047
3141
  }
3048
- function tn({ columns: e = [], rows: t = [] }) {
3142
+ function nn({ columns: e = [], rows: t = [] }) {
3049
3143
  return /* @__PURE__ */ c("div", {
3050
3144
  style: {
3051
3145
  display: "flex",
@@ -3108,7 +3202,7 @@ function tn({ columns: e = [], rows: t = [] }) {
3108
3202
  }, t))]
3109
3203
  });
3110
3204
  }
3111
- function nn({ text: e }) {
3205
+ function rn({ text: e }) {
3112
3206
  return /* @__PURE__ */ c("div", {
3113
3207
  style: {
3114
3208
  padding: "8px 12px",
@@ -3133,22 +3227,22 @@ function nn({ text: e }) {
3133
3227
  })]
3134
3228
  });
3135
3229
  }
3136
- function rn({ block: e }) {
3230
+ function an({ block: e }) {
3137
3231
  if (!e) return null;
3138
3232
  let t = (() => {
3139
3233
  switch (e.type) {
3140
- case "stats": return /* @__PURE__ */ s(Ht, { items: e.items });
3141
- case "ranked": return /* @__PURE__ */ s(Ut, { items: e.items });
3142
- case "chips": return /* @__PURE__ */ s(Wt, { items: e.items });
3143
- case "badges": return /* @__PURE__ */ s(Kt, { items: e.items });
3144
- case "dot-strip": return /* @__PURE__ */ s(qt, {
3234
+ case "stats": return /* @__PURE__ */ s(Ut, { items: e.items });
3235
+ case "ranked": return /* @__PURE__ */ s(Wt, { items: e.items });
3236
+ case "chips": return /* @__PURE__ */ s(Gt, { items: e.items });
3237
+ case "badges": return /* @__PURE__ */ s(qt, { items: e.items });
3238
+ case "dot-strip": return /* @__PURE__ */ s(Jt, {
3145
3239
  min: e.min,
3146
3240
  max: e.max,
3147
3241
  unit: e.unit,
3148
3242
  dots: e.dots,
3149
3243
  chips: e.chips
3150
3244
  });
3151
- case "proportion": return /* @__PURE__ */ s(Jt, {
3245
+ case "proportion": return /* @__PURE__ */ s(Yt, {
3152
3246
  leftPct: e.leftPct,
3153
3247
  leftLabel: e.leftLabel,
3154
3248
  leftValue: e.leftValue,
@@ -3159,15 +3253,15 @@ function rn({ block: e }) {
3159
3253
  rightColor: e.rightColor,
3160
3254
  chips: e.chips
3161
3255
  });
3162
- case "ring": return /* @__PURE__ */ s(Yt, {
3256
+ case "ring": return /* @__PURE__ */ s(Xt, {
3163
3257
  pct: e.pct,
3164
3258
  label: e.label,
3165
3259
  color: e.color,
3166
3260
  chips: e.chips
3167
3261
  });
3168
- case "scorecard-rows": return /* @__PURE__ */ s(Qt, { items: e.items });
3169
- case "flags-list": return /* @__PURE__ */ s(en, { items: e.items });
3170
- case "comparison-rows": return /* @__PURE__ */ s(tn, {
3262
+ case "scorecard-rows": return /* @__PURE__ */ s($t, { items: e.items });
3263
+ case "flags-list": return /* @__PURE__ */ s(tn, { items: e.items });
3264
+ case "comparison-rows": return /* @__PURE__ */ s(nn, {
3171
3265
  columns: e.columns,
3172
3266
  rows: e.rows
3173
3267
  });
@@ -3180,8 +3274,8 @@ function rn({ block: e }) {
3180
3274
  flexDirection: "column",
3181
3275
  gap: 24
3182
3276
  },
3183
- children: [t, /* @__PURE__ */ s(nn, { text: e.takeaway })]
3277
+ children: [t, /* @__PURE__ */ s(rn, { text: e.takeaway })]
3184
3278
  }) : t;
3185
3279
  }
3186
3280
  //#endregion
3187
- export { ne as AreaChart, ie as BarChart, l as ChartFrame, zt as DonutChart, rn as KeyHighlights, Ie as LineChart, ze as MiniBars, Ke as PieChart, nt as ProcessSankey, rt as RankingSankey, Je as SankeySvg, te as SeriesChart, ht as Trend, xt as TrendChart, Nt as VisualizationRenderer, It as cleanupVisualizationMounts, Lt as hydrateVisualizationMounts, Rt as serializeVisualizationConfig };
3281
+ export { ne as AreaChart, ie as BarChart, l as ChartFrame, Bt as DonutChart, an as KeyHighlights, Ie as LineChart, ze as MiniBars, Ke as PieChart, nt as ProcessSankey, rt as RankingSankey, Je as SankeySvg, te as SeriesChart, ht as Trend, St as TrendChart, Pt as VisualizationRenderer, Lt as cleanupVisualizationMounts, Rt as hydrateVisualizationMounts, zt as serializeVisualizationConfig };