@divami-artefacts/ai-design-system 1.0.22 → 1.0.24

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.
package/dist/index.js CHANGED
@@ -126,33 +126,33 @@ function C({ visible: e, x: t, y: n, content: i, parentW: o }) {
126
126
  children: [
127
127
  f && /* @__PURE__ */ s("div", {
128
128
  style: {
129
- fontSize: 12,
129
+ fontSize: 14,
130
130
  fontWeight: 400,
131
131
  color: u.t2,
132
132
  marginBottom: 3,
133
133
  whiteSpace: "nowrap",
134
- lineHeight: "18px"
134
+ lineHeight: "20px"
135
135
  },
136
136
  children: f
137
137
  }),
138
138
  /* @__PURE__ */ s("div", {
139
139
  style: {
140
- fontSize: 14,
140
+ fontSize: 16,
141
141
  fontWeight: 500,
142
142
  color: u.t1,
143
143
  whiteSpace: "nowrap",
144
- lineHeight: "20px"
144
+ lineHeight: "22px"
145
145
  },
146
146
  children: p
147
147
  }),
148
148
  m && /* @__PURE__ */ s("div", {
149
149
  style: {
150
- fontSize: 12,
150
+ fontSize: 14,
151
151
  fontWeight: 400,
152
152
  color: "var(--tooltip-accent)",
153
153
  marginTop: 3,
154
154
  whiteSpace: "nowrap",
155
- lineHeight: "18px"
155
+ lineHeight: "20px"
156
156
  },
157
157
  children: m
158
158
  })
@@ -504,7 +504,11 @@ var L = 680, R = 42, oe = 10, se = 24, ce = 24, le = 8, ue = [
504
504
  u.amber,
505
505
  u.red
506
506
  ];
507
- function de({ items: e = [], "data-testid": t }) {
507
+ function de(e) {
508
+ let t = Math.abs(e), n = e < 0 ? "-" : "";
509
+ return t >= 1e6 ? `${n}£${(t / 1e6).toFixed(1)}M` : t >= 1e3 ? `${n}£${(t / 1e3).toFixed(1)}K` : `${n}£${t.toFixed(0)}`;
510
+ }
511
+ function fe({ items: e = [], "data-testid": t }) {
508
512
  let r = a(null), l = a(0), d = a(/* @__PURE__ */ new Map()), [m, g] = o(!1), _ = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), S = i(() => [..._].sort((e, t) => (t.percentage ?? 0) - (e.percentage ?? 0)), [_]), E = i(() => m ? S : S.slice(0, le), [S, m]), O = E.length, k = se + ce + O * R + Math.max(0, O - 1) * oe, { hoveredRef: A, tooltip: j, hitZonesRef: M } = w(r, {
509
513
  width: L,
510
514
  height: k
@@ -532,7 +536,7 @@ function de({ items: e = [], "data-testid": t }) {
532
536
  let m = {
533
537
  label: r.name,
534
538
  value: `${r.percentage ?? 0}% commitment`,
535
- sublabel: `Base: ${r.baseLabel ?? String(r.base ?? 0)} · Variations: ${r.variationLabel ?? String(r.variation ?? 0)}`,
539
+ sublabel: `Base: ${de(r.base ?? 0)} · Variations: ${de(r.variation ?? 0)}`,
536
540
  color: o
537
541
  };
538
542
  T(M.current, r.id, u, c + R / 2, 14, m), t.font = p.font, t.fillStyle = h(o, .9 + s * .1), t.textAlign = "left", t.textBaseline = "middle", t.fillText(`${r.percentage ?? 0}%`, u + 10, c + R / 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 + R / 2);
@@ -574,18 +578,18 @@ function de({ items: e = [], "data-testid": t }) {
574
578
  }
575
579
  //#endregion
576
580
  //#region src/components/semiCircularGaugeChart/SemiCircularGaugeChart.tsx
577
- var fe = 480, pe = 340;
578
- function me({ value: e, confirmed: t, total: r, "data-testid": i }) {
581
+ var pe = 480, me = 340;
582
+ function he({ value: e, confirmed: t, total: r, "data-testid": i }) {
579
583
  let o = a(null), c = a(0);
580
584
  return n(() => {
581
585
  let n = o.current;
582
586
  if (!n) return;
583
- let i = v(n, fe, pe);
587
+ let i = v(n, pe, me);
584
588
  c.current = 0;
585
- let a = fe / 2, s = Math.PI, l = 2 * Math.PI, d = Math.PI, p, g = () => {
589
+ let a = pe / 2, s = Math.PI, l = 2 * Math.PI, d = Math.PI, p, g = () => {
586
590
  c.current++;
587
591
  let n = c.current;
588
- i.clearRect(0, 0, fe, pe), i.letterSpacing = f.letterSpacing;
592
+ i.clearRect(0, 0, pe, me), i.letterSpacing = f.letterSpacing;
589
593
  let o = D(Math.min(n / 80, 1)), _ = A(Math.min(n / 72, 1));
590
594
  i.beginPath(), i.arc(a, 220, 120, s, l), i.strokeStyle = h(u.bd, .35), i.lineWidth = 46, i.stroke(), [
591
595
  {
@@ -645,16 +649,16 @@ function me({ value: e, confirmed: t, total: r, "data-testid": i }) {
645
649
  "data-testid": i,
646
650
  style: {
647
651
  position: "relative",
648
- width: fe,
649
- height: pe
652
+ width: pe,
653
+ height: me
650
654
  },
651
655
  children: /* @__PURE__ */ s("canvas", {
652
656
  ref: o,
653
657
  role: "img",
654
658
  "aria-label": `Compensation event gauge — ${e}% of NCEs confirmed as compensation events`,
655
659
  style: {
656
- width: fe,
657
- height: pe,
660
+ width: pe,
661
+ height: me,
658
662
  display: "block"
659
663
  }
660
664
  })
@@ -662,7 +666,7 @@ function me({ value: e, confirmed: t, total: r, "data-testid": i }) {
662
666
  }
663
667
  //#endregion
664
668
  //#region src/canvas/useCanvasLoop.ts
665
- function he(e, t, r, i, o = !0, s = {}) {
669
+ function ge(e, t, r, i, o = !0, s = {}) {
666
670
  let c = a(0), { easing: l = D, durationFrames: u = 48 } = s;
667
671
  n(() => {
668
672
  let n = e.current;
@@ -694,40 +698,40 @@ function he(e, t, r, i, o = !0, s = {}) {
694
698
  }
695
699
  //#endregion
696
700
  //#region src/components/multiMetricConstellationChart/MultiMetricConstellationChart.tsx
697
- var z = 780, ge = 234, _e = 130, ve = 52, ye = [
701
+ var z = 780, _e = 234, ve = 130, ye = 52, be = [
698
702
  u.blue,
699
703
  u.amber,
700
704
  u.purple,
701
705
  u.green
702
- ], be = [
706
+ ], xe = [
703
707
  "Base Value",
704
708
  "Variations",
705
709
  "Commitment"
706
- ], xe = [
710
+ ], Se = [
707
711
  "Base",
708
712
  "Var",
709
713
  "Commit"
710
714
  ];
711
- function Se({ items: e = [], "data-testid": t }) {
715
+ function Ce({ items: e = [], "data-testid": t }) {
712
716
  let n = a(null), r = a(/* @__PURE__ */ new Map()), { hoveredRef: o, tooltip: l, hitZonesRef: d } = w(n, {
713
717
  width: z,
714
- height: ge
718
+ height: _e
715
719
  }), p = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), g = i(() => {
716
720
  let e = Math.max(...p.map((e) => e.base ?? 0)), t = Math.max(...p.map((e) => e.variation ?? 0));
717
721
  return p.map((n, r) => {
718
- let i = z * (.12 + r * .19), a = _e, o = Math.min(z * .075, ve), s = ye[r % ye.length], c = [
722
+ let i = z * (.12 + r * .19), a = ve, o = Math.min(z * .075, ye), s = be[r % be.length], c = [
719
723
  (n.base ?? 0) / (e || 1) * 100,
720
724
  (n.variation ?? 0) / (t || 1) * 100,
721
725
  n.percentage ?? 0
722
726
  ], l = [
723
- n.baseLabel ?? String(n.base ?? 0),
724
- n.variationLabel ?? String(n.variation ?? 0),
727
+ `£${n.base ?? 0}M`,
728
+ `£${n.variation ?? 0}M`,
725
729
  `${n.percentage ?? 0}%`
726
730
  ], u = c.map((e, t) => {
727
- let n = -Math.PI / 2 + t / be.length * Math.PI * 2, r = e / 100, s = o * Math.max(.08, r);
731
+ let n = -Math.PI / 2 + t / xe.length * Math.PI * 2, r = e / 100, s = o * Math.max(.08, r);
728
732
  return {
729
- name: be[t],
730
- short: xe[t],
733
+ name: xe[t],
734
+ short: Se[t],
731
735
  label: l[t],
732
736
  val: Math.round(e),
733
737
  x: i + Math.cos(n) * s,
@@ -747,8 +751,8 @@ function Se({ items: e = [], "data-testid": t }) {
747
751
  };
748
752
  });
749
753
  }, [p]);
750
- return he(n, z, ge, (e, t, n) => {
751
- N(r.current, o.current), d.current = [], b(e, z, ge, n, 30), g.forEach((t, i) => {
754
+ return ge(n, z, _e, (e, t, n) => {
755
+ N(r.current, o.current), d.current = [], b(e, z, _e, n, 30), g.forEach((t, i) => {
752
756
  let a = t.color, o = `constellation-${i}`, s = r.current.get(o) ?? 0;
753
757
  e.beginPath(), e.arc(t.cx, t.cy, t.baseR + 5, 0, Math.PI * 2), e.strokeStyle = h(u.bd, .08 + .08 * s), e.lineWidth = .5, e.stroke(), e.beginPath(), t.stars.forEach((t, n) => {
754
758
  n === 0 ? e.moveTo(t.x, t.y) : e.lineTo(t.x, t.y);
@@ -764,21 +768,21 @@ function Se({ items: e = [], "data-testid": t }) {
764
768
  });
765
769
  }), s > 0 && y(e, t.cx, t.cy, 16 * s, a, .15 * s), e.beginPath(), e.arc(t.cx, t.cy, t.baseR + 12, 0, Math.PI * 2), e.strokeStyle = h(a, .1 + j(n, .03, 5e-4) * .05), e.lineWidth = 1, e.stroke(), e.font = f.font, e.textAlign = "center", e.textBaseline = "alphabetic", e.fillStyle = s > 0 ? t.color : f.color, e.fillText(t.abbreviation ?? t.name.slice(0, 6), t.cx, t.cy + t.baseR + 26), T(d.current, o, t.cx, t.cy, t.baseR + 5, {
766
770
  label: t.name,
767
- value: `${t.totalLabel ?? String(t.total ?? 0)} total`,
771
+ value: `£${t.total ?? 0}M total`,
768
772
  sublabel: `${t.percentage ?? 0}% committed · scatter ${t.scatter.toFixed(1)}`,
769
773
  color: a
770
774
  });
771
- }), e.font = m.font, e.textAlign = "center", e.textBaseline = "middle", e.fillStyle = m.color, e.fillText("▲ top = Base value · ▼▸ lower-right = Variations · ◂▼ lower-left = Commitment % · hover stars for details", z / 2, ge - 14), x(e, z, ge, n, .012);
775
+ }), e.font = m.font, e.textAlign = "center", e.textBaseline = "middle", e.fillStyle = m.color, e.fillText("▲ top = Base value · ▼▸ lower-right = Variations · ◂▼ lower-left = Commitment % · hover stars for details", z / 2, _e - 14), x(e, z, _e, n, .012);
772
776
  }, !0), g.length === 0 ? /* @__PURE__ */ s(I, {
773
777
  width: z,
774
- height: ge,
778
+ height: _e,
775
779
  "data-testid": t
776
780
  }) : /* @__PURE__ */ c("div", {
777
781
  "data-testid": t,
778
782
  style: {
779
783
  position: "relative",
780
784
  width: z,
781
- height: ge
785
+ height: _e
782
786
  },
783
787
  children: [/* @__PURE__ */ s("canvas", {
784
788
  ref: n,
@@ -786,19 +790,19 @@ function Se({ items: e = [], "data-testid": t }) {
786
790
  "aria-label": "Contract value breakdown per contractor — multi-KPI constellation chart",
787
791
  style: {
788
792
  width: z,
789
- height: ge,
793
+ height: _e,
790
794
  display: "block"
791
795
  }
792
796
  }), /* @__PURE__ */ s(C, {
793
797
  ...l,
794
798
  parentW: z,
795
- parentH: ge
799
+ parentH: _e
796
800
  })]
797
801
  });
798
802
  }
799
803
  //#endregion
800
804
  //#region src/components/stackedHorizontalBarChart/StackedHorizontalBarChart.tsx
801
- var Ce = 680, we = 220, Te = 8, Ee = [
805
+ var we = 680, Te = 220, Ee = 8, De = [
802
806
  u.blue,
803
807
  u.amber,
804
808
  u.purple,
@@ -808,38 +812,48 @@ var Ce = 680, we = 220, Te = 8, Ee = [
808
812
  right: 80,
809
813
  top: 16,
810
814
  bottom: 38
811
- }, De = 88, V = 18;
812
- function Oe({ data: e, "data-testid": t }) {
813
- let n = a(null), r = a(/* @__PURE__ */ new Map()), [i, l] = o(!1), { items: d = [], totals: g } = e, _ = d.filter((e) => typeof e == "object" && !!e), v = [..._].sort((e, t) => (t.total ?? 0) - (e.total ?? 0)), b = i ? v : v.slice(0, Te), x = b.length, S = Math.max(...v.map((e) => Math.abs(e.total ?? 0)), 1), T = Math.max(we, B.top + B.bottom + x * V + Math.max(0, x - 1) * 8), D = Ce - B.left - De - B.right, k = x > 1 ? (T - B.top - B.bottom - x * V) / (x - 1) : 0, A = _.length === 0, { hoveredRef: j, tooltip: P, hitZonesRef: F } = w(n, {
814
- width: Ce,
815
+ }, Oe = 150, V = 18;
816
+ function ke(e, t, n) {
817
+ if (e.measureText(t).width <= n) return t;
818
+ let r = t;
819
+ for (; r.length > 0 && e.measureText(r + "…").width > n;) r = r.slice(0, -1);
820
+ return r + "…";
821
+ }
822
+ function Ae(e) {
823
+ let t = Math.abs(e), n = e < 0 ? "-" : "";
824
+ return t >= 1e6 ? `${n}£${(t / 1e6).toFixed(1)}M` : t >= 1e3 ? `${n}£${(t / 1e3).toFixed(1)}K` : `${n}£${t.toFixed(0)}`;
825
+ }
826
+ function je({ data: e, "data-testid": t }) {
827
+ let n = a(null), r = a(/* @__PURE__ */ new Map()), [i, l] = o(!1), { items: d = [], totals: g } = e, _ = d.filter((e) => typeof e == "object" && !!e), v = [..._].sort((e, t) => (t.total ?? 0) - (e.total ?? 0)), b = i ? v : v.slice(0, Ee), x = b.length, S = Math.max(...v.map((e) => Math.abs(e.total ?? 0)), 1), T = Math.max(Te, B.top + B.bottom + x * V + Math.max(0, x - 1) * 8), D = we - B.left - Oe - B.right, k = x > 1 ? (T - B.top - B.bottom - x * V) / (x - 1) : 0, A = _.length === 0, { hoveredRef: j, tooltip: P, hitZonesRef: F } = w(n, {
828
+ width: we,
815
829
  height: T
816
830
  });
817
- return he(n, Ce, T, (e, t) => {
831
+ return ge(n, we, T, (e, t) => {
818
832
  N(r.current, j.current), F.current = [], b.forEach((n, i) => {
819
- let a = Ee[i % Ee.length], o = M(t, i, x, O), s = B.top + i * (V + k), c = B.left + De, l = r.current.get(n.id) ?? 0, d = Math.max(n.base ?? 0, 0), m = Math.max(n.total ?? 0, 0), g = d / S * D * o, _ = m / S * D * o, v = _ - g;
820
- e.font = f.font, 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 = h(u.bd, .25), e.beginPath(), e.roundRect(c, s, D, V, 4), e.fill(), g > 0 && (l > 0 && y(e, c + g / 2, s + V / 2, g * .3, a, .1 * l), e.fillStyle = h(a, .5 + l * .15), e.beginPath(), e.roundRect(c, s, g, V, 4), e.fill()), v > 2 && (e.fillStyle = h(a, .22 + l * .08), e.beginPath(), e.roundRect(c + g, s, v, V, [
833
+ let a = De[i % De.length], o = M(t, i, x, O), s = B.top + i * (V + k), c = B.left + Oe, l = r.current.get(n.id) ?? 0, d = Math.max(n.base ?? 0, 0), m = Math.max(n.total ?? 0, 0), g = d / S * D * o, _ = m / S * D * o, v = _ - g;
834
+ e.font = f.font, e.fillStyle = l > 0 ? a : f.color, e.textAlign = "right", e.textBaseline = "middle", e.fillText(ke(e, n.name, Oe - 16), c - 8, s + V / 2), e.fillStyle = h(u.bd, .25), e.beginPath(), e.roundRect(c, s, D, V, 4), e.fill(), g > 0 && (l > 0 && y(e, c + g / 2, s + V / 2, g * .3, a, .1 * l), e.fillStyle = h(a, .5 + l * .15), e.beginPath(), e.roundRect(c, s, g, V, 4), e.fill()), v > 2 && (e.fillStyle = h(a, .22 + l * .08), e.beginPath(), e.roundRect(c + g, s, v, V, [
821
835
  0,
822
836
  4,
823
837
  4,
824
838
  0
825
- ]), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = h(a, .55), e.lineWidth = 1, e.beginPath(), e.moveTo(c + g, s + 3), e.lineTo(c + g, s + V - 3), e.stroke(), e.setLineDash([])), l > 0 && _ > 0 && (e.strokeStyle = h(a, .5 * l), e.lineWidth = 1, e.setLineDash([]), e.beginPath(), e.roundRect(c, s, _, V, 4), e.stroke()), o > .35 && (e.globalAlpha = Math.min(1, (o - .35) / .4), e.font = p.font, e.fillStyle = l > 0 ? a : p.color, e.textAlign = "left", e.textBaseline = "middle", e.fillText(n.totalLabel ?? String(n.total ?? 0), c + _ + 6, s + V / 2), e.globalAlpha = 1), E(F.current, n.id, c, s, Math.max(_, 1), V, {
839
+ ]), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = h(a, .55), e.lineWidth = 1, e.beginPath(), e.moveTo(c + g, s + 3), e.lineTo(c + g, s + V - 3), e.stroke(), e.setLineDash([])), l > 0 && _ > 0 && (e.strokeStyle = h(a, .5 * l), e.lineWidth = 1, e.setLineDash([]), e.beginPath(), e.roundRect(c, s, _, V, 4), e.stroke()), o > .35 && (e.globalAlpha = Math.min(1, (o - .35) / .4), e.font = p.font, e.fillStyle = l > 0 ? a : p.color, e.textAlign = "left", e.textBaseline = "middle", e.fillText(Ae(n.total ?? 0), c + _ + 6, s + V / 2), e.globalAlpha = 1), E(F.current, n.id, c, s, Math.max(_, 1), V, {
826
840
  label: n.name,
827
- value: `${n.totalLabel ?? String(n.total ?? 0)} total`,
828
- sublabel: `Base ${n.baseLabel ?? String(n.base ?? 0)} + Var ${n.variationLabel ?? String(n.variation ?? 0)} · ${n.percentage ?? 0}% committed`,
841
+ value: `${Ae(n.total ?? 0)} total`,
842
+ sublabel: `Base ${Ae(n.base ?? 0)} + Var ${Ae(n.variation ?? 0)} · ${n.percentage ?? 0}% committed`,
829
843
  color: a
830
844
  });
831
845
  });
832
846
  let n = T - 14;
833
- e.textBaseline = "middle", e.font = m.font, e.textAlign = "left", e.fillStyle = h(u.blue, .5), e.beginPath(), e.roundRect(B.left + De, n - 3, 14, 6, 2), e.fill(), e.fillStyle = m.color, e.fillText("base value", B.left + De + 18, n), e.fillStyle = h(u.blue, .22), e.beginPath(), e.roundRect(B.left + De + 94, n - 3, 14, 6, 2), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = h(u.blue, .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 = m.color, e.fillText("approved variations", B.left + De + 112, n), e.font = m.font, e.textAlign = "right", e.fillStyle = m.color, e.fillText(`Portfolio: ${String(g?.total ?? 0)}`, Ce - 8, n);
847
+ e.textBaseline = "middle", e.font = m.font, e.textAlign = "left", e.fillStyle = h(u.blue, .5), e.beginPath(), e.roundRect(B.left + Oe, n - 3, 14, 6, 2), e.fill(), e.fillStyle = m.color, e.fillText("base value", B.left + Oe + 18, n), e.fillStyle = h(u.blue, .22), e.beginPath(), e.roundRect(B.left + Oe + 94, n - 3, 14, 6, 2), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = h(u.blue, .5), e.lineWidth = .5, e.beginPath(), e.moveTo(B.left + Oe + 101, n - 3), e.lineTo(B.left + Oe + 101, n + 3), e.stroke(), e.setLineDash([]), e.fillStyle = m.color, e.fillText("approved variations", B.left + Oe + 112, n), e.font = m.font, e.textAlign = "right", e.fillStyle = m.color, e.fillText(`Portfolio: ${Ae(g?.total ?? 0)}`, we - 8, n);
834
848
  }, !0, { easing: O }), A ? /* @__PURE__ */ s(I, {
835
- width: Ce,
836
- height: we,
849
+ width: we,
850
+ height: Te,
837
851
  message: "No contract data available",
838
852
  "data-testid": t
839
853
  }) : /* @__PURE__ */ c("div", {
840
854
  "data-testid": t,
841
855
  style: {
842
- width: Ce,
856
+ width: we,
843
857
  transition: "all 0.25s ease"
844
858
  },
845
859
  children: [/* @__PURE__ */ c("div", {
@@ -849,17 +863,17 @@ function Oe({ data: e, "data-testid": t }) {
849
863
  role: "img",
850
864
  "aria-label": "Total contract value per contractor — horizontal bar chart",
851
865
  style: {
852
- width: Ce,
866
+ width: we,
853
867
  height: T,
854
868
  display: "block",
855
869
  borderRadius: 8
856
870
  }
857
871
  }), /* @__PURE__ */ s(C, {
858
872
  ...P,
859
- parentW: Ce,
873
+ parentW: we,
860
874
  parentH: T
861
875
  })]
862
- }), _.length > Te && /* @__PURE__ */ s("div", {
876
+ }), _.length > Ee && /* @__PURE__ */ s("div", {
863
877
  style: { marginTop: 8 },
864
878
  children: /* @__PURE__ */ s(ae, {
865
879
  expanded: i,
@@ -870,94 +884,92 @@ function Oe({ data: e, "data-testid": t }) {
870
884
  }
871
885
  //#endregion
872
886
  //#region src/components/rankedCardLeaderboard/RankedCardLeaderboard.tsx
873
- var ke = 780, H = 240, Ae = 12, je = 10, Me = [
887
+ var H = 780, U = 240, Me = 12, Ne = 10, Pe = [
874
888
  "Highest exposure",
875
889
  "Elevated risk",
876
890
  "Moderate exposure",
877
891
  "Moderate exposure",
878
892
  "Low exposure"
879
893
  ];
880
- function Ne({ items: e = [], "data-testid": t }) {
894
+ function Fe({ items: e = [], "data-testid": t }) {
881
895
  let r = a(null), o = a(0), l = a(/* @__PURE__ */ new Map()), { hoveredRef: m, tooltip: g, hitZonesRef: _ } = w(r, {
882
- width: ke,
883
- height: H
896
+ width: H,
897
+ height: U
884
898
  }), b = [...i(() => e.filter((e) => typeof e == "object" && !!e), [e])].sort((e, t) => (t.count ?? 0) - (e.count ?? 0)).slice(0, 5), S = b.reduce((e, t) => e + (t.count ?? 0), 0);
885
899
  return n(() => {
886
900
  let e = r.current;
887
901
  if (!e) return;
888
- let t = v(e, ke, H);
902
+ let t = v(e, H, U);
889
903
  o.current = 0;
890
- let n = Math.min(5, b.length), i = (ke - 2 * Ae - (n - 1) * je) / n, a = H * .84, s = H * .08, c, g = () => {
904
+ let n = Math.min(5, b.length), i = (H - 2 * Me - 4 * Ne) / 5, a = U * .84, s = U * .08, c = n * i + (n - 1) * Ne, g = Math.round((H - c) / 2), C, w = () => {
891
905
  o.current++;
892
906
  let e = o.current;
893
- t.clearRect(0, 0, ke, H), t.letterSpacing = f.letterSpacing, _.current = [], l.current.forEach((e, t) => {
907
+ t.clearRect(0, 0, H, U), t.letterSpacing = f.letterSpacing, _.current = [], l.current.forEach((e, t) => {
894
908
  let n = t === m.current ? 1 : 0, r = e + (n - e) * .12;
895
909
  Math.abs(r - n) < .005 ? n === 0 ? l.current.delete(t) : l.current.set(t, 1) : l.current.set(t, r);
896
910
  }), m.current && !l.current.has(m.current) && l.current.set(m.current, 0), b.forEach((n, r) => {
897
- let o = r === 0, c = r === 0 ? u.red : r === 1 ? u.amber : d[r % d.length], m = Ae + r * (i + je), g = l.current.get(n.id) ?? 0, v = g * 8, b = m - v / 2, x = i + v, C = o ? j(e, .04, 3e-4) * .06 + .06 : 0;
898
- t.fillStyle = h(c, .08 + g * .07), t.beginPath(), t.roundRect(b, s, x, a, 6), t.fill(), t.strokeStyle = h(c, .2 + g * .4 + C), t.lineWidth = o ? 1.5 : 1, t.stroke(), (g > .01 || o) && y(t, b + x / 2, s + a / 2, x * .55, c, C + g * .14), t.font = p.font, t.textAlign = "left", t.textBaseline = "top", t.fillStyle = h(c, .5 + g * .35), t.fillText(`#${r + 1}`, b + 7, s + 6);
911
+ let o = r === 0, c = r === 0 ? u.red : r === 1 ? u.amber : d[r % d.length], f = g + r * (i + Ne), m = l.current.get(n.id) ?? 0, v = m * 8, b = f - v / 2, x = i + v, C = o ? j(e, .04, 3e-4) * .06 + .06 : 0;
912
+ t.fillStyle = h(c, .08 + m * .07), t.beginPath(), t.roundRect(b, s, x, a, 6), t.fill(), t.strokeStyle = h(c, .2 + m * .4 + C), t.lineWidth = o ? 1.5 : 1, t.stroke(), (m > .01 || o) && y(t, b + x / 2, s + a / 2, x * .55, c, C + m * .14), t.font = p.font, t.textAlign = "left", t.textBaseline = "top", t.fillStyle = h(c, .5 + m * .35), t.fillText(`#${r + 1}`, b + 7, s + 6);
899
913
  let w = Math.min(i * .28, a * .32, 72), T = b + x / 2, D = s + a * .38, O = t.createRadialGradient(T, D - w * .2, 0, T, D, w);
900
- O.addColorStop(0, h(c, .5 + g * .2)), O.addColorStop(1, h(c, .2 + g * .1)), t.beginPath(), t.arc(T, D, w, 0, Math.PI * 2), t.fillStyle = O, t.fill(), t.strokeStyle = h(c, .4 + g * .3), t.lineWidth = 1, t.stroke(), t.font = p.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = h(u.t1, .9), t.fillText(n.abbreviation ?? n.name.slice(0, 6), T, D);
901
- let k = n.label ?? String(n.count ?? 0);
902
- t.font = p.font, t.textBaseline = "alphabetic", t.fillStyle = h(c, .9 + g * .1), t.fillText(k, T, s + a * .76), n.label || (t.font = f.font, t.fillStyle = f.color, t.fillText("open EWs", T, s + a * .88));
903
- let A = Math.round((n.count ?? 0) / (S || 1) * 100), M = Me[r] ?? "Low exposure";
904
- E(_.current, n.id, m, s, i, a, {
914
+ O.addColorStop(0, h(c, .5 + m * .2)), O.addColorStop(1, h(c, .2 + m * .1)), t.beginPath(), t.arc(T, D, w, 0, Math.PI * 2), t.fillStyle = O, t.fill(), t.strokeStyle = h(c, .4 + m * .3), t.lineWidth = 1, t.stroke(), t.font = p.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = h(u.t1, .9), t.fillText(n.abbreviation ?? n.name.slice(0, 6), T, D), t.font = p.font, t.textBaseline = "alphabetic", t.fillStyle = h(c, .9 + m * .1), t.fillText(String(n.count ?? 0), T, s + a * .76);
915
+ let k = Math.round((n.count ?? 0) / (S || 1) * 100), A = Pe[r] ?? "Low exposure";
916
+ E(_.current, n.id, f, s, i, a, {
905
917
  label: n.name,
906
- value: `${k} open · ${A}% of total`,
907
- sublabel: `Rank #${r + 1} · ${M}`,
918
+ value: `${n.count ?? 0} · ${k}% of total`,
919
+ sublabel: `Rank #${r + 1} · ${A}`,
908
920
  color: c
909
921
  });
910
- }), x(t, ke, H, e, .015), c = requestAnimationFrame(g);
922
+ }), x(t, H, U, e, .015), C = requestAnimationFrame(w);
911
923
  };
912
- return g(), () => cancelAnimationFrame(c);
924
+ return w(), () => cancelAnimationFrame(C);
913
925
  }, [b, S]), b.length === 0 ? /* @__PURE__ */ s(I, {
914
- width: ke,
915
- height: H,
926
+ width: H,
927
+ height: U,
916
928
  "data-testid": t
917
929
  }) : /* @__PURE__ */ c("div", {
918
930
  "data-testid": t,
919
931
  style: {
920
932
  position: "relative",
921
- width: ke,
922
- height: H
933
+ width: H,
934
+ height: U
923
935
  },
924
936
  children: [/* @__PURE__ */ s("canvas", {
925
937
  ref: r,
926
938
  role: "img",
927
- "aria-label": "Contractor rank — open EW count per contractor",
939
+ "aria-label": "Contractor rank — count per contractor",
928
940
  style: {
929
- width: ke,
930
- height: H,
941
+ width: H,
942
+ height: U,
931
943
  display: "block",
932
944
  borderRadius: 8
933
945
  }
934
946
  }), /* @__PURE__ */ s(C, {
935
947
  ...g,
936
- parentW: ke,
937
- parentH: H
948
+ parentW: H,
949
+ parentH: U
938
950
  })]
939
951
  });
940
952
  }
941
953
  //#endregion
942
954
  //#region src/components/dotMatrixChart/DotMatrixChart.tsx
943
- var U = 680, W = 260;
944
- function Pe({ items: e = [], "data-testid": t }) {
955
+ var W = 680, G = 260;
956
+ function Ie({ items: e = [], "data-testid": t }) {
945
957
  let r = a(null), o = a(0), l = a(/* @__PURE__ */ new Map()), { hoveredRef: d, tooltip: p, hitZonesRef: m } = w(r, {
946
- width: U,
947
- height: W
958
+ width: W,
959
+ height: G
948
960
  }), g = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
949
961
  return n(() => {
950
962
  let e = r.current;
951
963
  if (!e) return;
952
- let t = v(e, U, W);
964
+ let t = v(e, W, G);
953
965
  o.current = 0;
954
- let n = g.length, i = Math.max(...g.map((e) => e.count), 1), a = i, s = U * .05, c = W * .1, p = U * .9 / n, _ = W * .7 / a, S = g.reduce((e, t) => e + t.count, 0), C, w = () => {
966
+ let n = g.length, i = Math.max(...g.map((e) => e.count), 1), a = i, s = W * .05, c = G * .1, p = W * .9 / n, _ = G * .7 / a, S = g.reduce((e, t) => e + t.count, 0), C, w = () => {
955
967
  o.current++;
956
968
  let e = o.current;
957
- t.clearRect(0, 0, U, W), m.current = [], l.current.forEach((e, t) => {
969
+ t.clearRect(0, 0, W, G), m.current = [], l.current.forEach((e, t) => {
958
970
  let n = t === d.current ? 1 : 0, r = e + (n - e) * .12;
959
971
  Math.abs(r - n) < .005 ? n === 0 ? l.current.delete(t) : l.current.set(t, 1) : l.current.set(t, r);
960
- }), d.current && !l.current.has(d.current) && l.current.set(d.current, 0), b(t, U, W, e, 40, h(u.blue, .04)), g.forEach((n, r) => {
972
+ }), d.current && !l.current.has(d.current) && l.current.set(d.current, 0), b(t, W, G, e, 40, h(u.blue, .04)), g.forEach((n, r) => {
961
973
  let o = n.count === i, d = u.blue, g = l.current.get(`${n.category}-col`) ?? 0;
962
974
  for (let u = 0; u < a; u++) {
963
975
  let a = s + r * p + p / 2, f = c + u * _ + _ / 2, v = Math.min(p, _) * .38;
@@ -975,40 +987,40 @@ function Pe({ items: e = [], "data-testid": t }) {
975
987
  }
976
988
  let v = c + a * _ + 16;
977
989
  t.font = f.font, t.textAlign = "center", t.textBaseline = "alphabetic", t.fillStyle = o ? u.blue : h(u.t2, .65), t.fillText(n.category, s + r * p + p / 2, v);
978
- }), x(t, U, W, e, .015), C = requestAnimationFrame(w);
990
+ }), x(t, W, G, e, .015), C = requestAnimationFrame(w);
979
991
  };
980
992
  return w(), () => cancelAnimationFrame(C);
981
993
  }, [g]), g.length === 0 ? /* @__PURE__ */ s(I, {
982
- width: U,
983
- height: W,
994
+ width: W,
995
+ height: G,
984
996
  "data-testid": t
985
997
  }) : /* @__PURE__ */ c("div", {
986
998
  "data-testid": t,
987
999
  style: {
988
1000
  position: "relative",
989
- width: U,
990
- height: W
1001
+ width: W,
1002
+ height: G
991
1003
  },
992
1004
  children: [/* @__PURE__ */ s("canvas", {
993
1005
  ref: r,
994
1006
  role: "img",
995
1007
  "aria-label": "Early Warning count by category — breathing dot grid",
996
1008
  style: {
997
- width: U,
998
- height: W,
1009
+ width: W,
1010
+ height: G,
999
1011
  display: "block",
1000
1012
  borderRadius: 8
1001
1013
  }
1002
1014
  }), /* @__PURE__ */ s(C, {
1003
1015
  ...p,
1004
- parentW: U,
1005
- parentH: W
1016
+ parentW: W,
1017
+ parentH: G
1006
1018
  })]
1007
1019
  });
1008
1020
  }
1009
1021
  //#endregion
1010
1022
  //#region src/components/lineChart/LineChart.tsx
1011
- function Fe({ rows: e = [], className: t, colors: n }) {
1023
+ function Le({ rows: e = [], className: t, colors: n }) {
1012
1024
  return /* @__PURE__ */ s(ee, {
1013
1025
  rows: e,
1014
1026
  variant: "line",
@@ -1018,7 +1030,7 @@ function Fe({ rows: e = [], className: t, colors: n }) {
1018
1030
  }
1019
1031
  //#endregion
1020
1032
  //#region src/components/constants.ts
1021
- var Ie = [
1033
+ var Re = [
1022
1034
  "#4C93D9",
1023
1035
  "#5DA537",
1024
1036
  "#F3862C",
@@ -1026,7 +1038,7 @@ var Ie = [
1026
1038
  "#A0B724",
1027
1039
  "#EEBF3B",
1028
1040
  "#3C45D1"
1029
- ], Le = {
1041
+ ], ze = {
1030
1042
  nodes: [
1031
1043
  {
1032
1044
  id: "supplier-x",
@@ -1069,8 +1081,8 @@ var Ie = [
1069
1081
  };
1070
1082
  //#endregion
1071
1083
  //#region src/components/miniBars/MiniBars.tsx
1072
- function Re({ rows: e = [], className: t, colors: n }) {
1073
- let r = n?.slices ?? Ie;
1084
+ function Be({ rows: e = [], className: t, colors: n }) {
1085
+ let r = n?.slices ?? Re;
1074
1086
  return /* @__PURE__ */ s("div", {
1075
1087
  className: ["d3-mini-bars", t].filter(Boolean).join(" "),
1076
1088
  children: e.map(([e, t, n], i) => /* @__PURE__ */ c("div", {
@@ -1096,7 +1108,7 @@ function Re({ rows: e = [], className: t, colors: n }) {
1096
1108
  width: Math.max(0, Math.min(100, t)),
1097
1109
  height: "12",
1098
1110
  rx: "6",
1099
- className: `d3-mini-fill tone-${i % Ie.length}`,
1111
+ className: `d3-mini-fill tone-${i % Re.length}`,
1100
1112
  fill: r[i % r.length]
1101
1113
  })]
1102
1114
  })
@@ -1108,101 +1120,98 @@ function Re({ rows: e = [], className: t, colors: n }) {
1108
1120
  }
1109
1121
  //#endregion
1110
1122
  //#region src/components/radialFanTreeChart/RadialFanTreeChart.tsx
1111
- var ze = 680, Be = 320, Ve = 60, He = 28;
1112
- function Ue({ total: e = 0, totalLabel: t, items: r = [], "data-testid": o }) {
1113
- let l = a(null), m = a(/* @__PURE__ */ new Map()), g = a(0), _ = i(() => r.filter((e) => typeof e == "object" && !!e), [r]), b = i(() => Math.max(Be, Ve + Math.max(0, _.length - 1) * He), [_.length]), { hoveredRef: x, tooltip: S, hitZonesRef: E } = w(l, {
1114
- width: ze,
1115
- height: b
1123
+ var Ve = 680, He = 320, Ue = 60, We = 28;
1124
+ function Ge({ total: e = 0, items: t = [], "data-testid": r }) {
1125
+ let o = a(null), l = a(/* @__PURE__ */ new Map()), m = a(0), g = i(() => t.filter((e) => typeof e == "object" && !!e), [t]), _ = i(() => Math.max(He, Ue + Math.max(0, g.length - 1) * We), [g.length]), { hoveredRef: b, tooltip: x, hitZonesRef: S } = w(o, {
1126
+ width: Ve,
1127
+ height: _
1116
1128
  });
1117
1129
  return n(() => {
1118
- let n = l.current;
1119
- if (!n) return;
1120
- let r = v(n, ze, b);
1121
- g.current = 0;
1122
- let i = b / 2, a = ze - 80, o = Math.max(..._.map((e) => e.count ?? 0)), s = (b - 60) / (_.length - 1), c = _.map((e, t) => ({
1123
- x: a,
1130
+ let t = o.current;
1131
+ if (!t) return;
1132
+ let n = v(t, Ve, _);
1133
+ m.current = 0;
1134
+ let r = _ / 2, i = Ve - 80, a = Math.max(...g.map((e) => e.count ?? 0)), s = (_ - 60) / (g.length - 1), c = g.map((e, t) => ({
1135
+ x: i,
1124
1136
  y: 30 + t * s
1125
- })), S, C = () => {
1126
- g.current++;
1127
- let n = g.current;
1128
- r.clearRect(0, 0, ze, b), r.letterSpacing = f.letterSpacing;
1129
- let s = D(Math.min(n / 72, 1));
1130
- N(m.current, x.current), E.current = [], y(r, 88, i, 48 * s, u.blue, .15 * s), _.forEach((t, n) => {
1131
- let l = d[n % d.length], g = M(s, n, _.length, D), v = c[n], b = m.current.get(t.id) ?? 0, x = Math.max(1.5, (t.count ?? 0) / o * 6);
1132
- if (g < .01) return;
1133
- let S = 88 + (a - 88) * .4, C = i, w = 88 + (a - 88) * .6, O = v.y, k = g;
1134
- r.beginPath();
1137
+ })), x, C = () => {
1138
+ m.current++;
1139
+ let t = m.current;
1140
+ n.clearRect(0, 0, Ve, _), n.letterSpacing = f.letterSpacing;
1141
+ let o = D(Math.min(t / 72, 1));
1142
+ N(l.current, b.current), S.current = [], y(n, 88, r, 48 * o, u.blue, .15 * o), g.forEach((t, s) => {
1143
+ let m = d[s % d.length], _ = M(o, s, g.length, D), v = c[s], b = l.current.get(t.id) ?? 0, x = Math.max(1.5, (t.count ?? 0) / a * 6);
1144
+ if (_ < .01) return;
1145
+ let C = 88 + (i - 88) * .4, w = r, E = 88 + (i - 88) * .6, O = v.y, k = _;
1146
+ n.beginPath();
1135
1147
  for (let e = 0; e <= 40; e++) {
1136
- let t = e / 40 * k, n = (1 - t) ** 3 * 88 + 3 * (1 - t) ** 2 * t * S + 3 * (1 - t) * t ** 2 * w + t ** 3 * v.x, a = (1 - t) ** 3 * i + 3 * (1 - t) ** 2 * t * C + 3 * (1 - t) * t ** 2 * O + t ** 3 * v.y;
1137
- e === 0 ? r.moveTo(n, a) : r.lineTo(n, a);
1148
+ let t = e / 40 * k, i = (1 - t) ** 3 * 88 + 3 * (1 - t) ** 2 * t * C + 3 * (1 - t) * t ** 2 * E + t ** 3 * v.x, a = (1 - t) ** 3 * r + 3 * (1 - t) ** 2 * t * w + 3 * (1 - t) * t ** 2 * O + t ** 3 * v.y;
1149
+ e === 0 ? n.moveTo(i, a) : n.lineTo(i, a);
1138
1150
  }
1139
- if (r.strokeStyle = h(l, b > 0 ? .8 : .45), r.lineWidth = x * (b > 0 ? 1.3 : 1), r.stroke(), g > .85) {
1140
- let n = Math.min(1, (g - .85) / .15), i = 4 + (t.count ?? 0) / o * 12;
1141
- y(r, v.x, v.y, i * 2.5, l, (.25 + b * .2) * n), r.beginPath(), r.arc(v.x, v.y, i * n, 0, Math.PI * 2), r.fillStyle = h(l, (.7 + b * .2) * n), r.fill();
1142
- let a = t.label ?? String(t.count ?? 0);
1143
- T(E.current, t.id, v.x, v.y, i + 8, {
1151
+ if (n.strokeStyle = h(m, b > 0 ? .8 : .45), n.lineWidth = x * (b > 0 ? 1.3 : 1), n.stroke(), _ > .85) {
1152
+ let r = Math.min(1, (_ - .85) / .15), i = 4 + (t.count ?? 0) / a * 12;
1153
+ y(n, v.x, v.y, i * 2.5, m, (.25 + b * .2) * r), n.beginPath(), n.arc(v.x, v.y, i * r, 0, Math.PI * 2), n.fillStyle = h(m, (.7 + b * .2) * r), n.fill(), T(S.current, t.id, v.x, v.y, i + 8, {
1144
1154
  label: t.name,
1145
- value: `${a} NCEs raised`,
1155
+ value: `${t.count ?? 0} NCEs raised`,
1146
1156
  sublabel: `${Math.round((t.count ?? 0) / e * 100)}% of all NCEs`,
1147
- color: l
1148
- }), r.globalAlpha = n, r.font = f.font, r.textAlign = "left";
1149
- let s = t.abbreviation ?? t.name.slice(0, 6), c = ` ${a}`, d = v.x + i + 6, m = v.y + 4;
1150
- r.fillStyle = b > 0 ? l : h(u.t2, .85), r.fillText(s, d, m);
1151
- let _ = r.measureText(s).width;
1152
- r.font = p.font, r.fillStyle = b > 0 ? l : u.t1, r.fillText(c, d + _, m), r.globalAlpha = 1;
1157
+ color: m
1158
+ }), n.globalAlpha = r, n.font = f.font, n.textAlign = "left";
1159
+ let o = t.abbreviation ?? t.name.slice(0, 6), s = ` ${t.count ?? 0}`, c = v.x + i + 6, l = v.y + 4;
1160
+ n.fillStyle = b > 0 ? m : h(u.t2, .85), n.fillText(o, c, l);
1161
+ let d = n.measureText(o).width;
1162
+ n.font = p.font, n.fillStyle = b > 0 ? m : u.t1, n.fillText(s, c + d, l), n.globalAlpha = 1;
1153
1163
  }
1154
- }), r.beginPath(), r.arc(88, i, 32 * s, 0, Math.PI * 2), r.fillStyle = u.bgL, r.fill(), r.strokeStyle = h(u.blue, .6 * s), r.lineWidth = 2, r.stroke(), s > .4 && (r.globalAlpha = Math.min(1, (s - .4) / .4), r.font = "500 24px 'Satoshi Variable', 'DM Sans', sans-serif", r.fillStyle = u.t1, r.textAlign = "center", r.fillText(t ?? String(e), 88, i + 5), r.font = f.font, r.fillStyle = f.color, r.fillText("NCEs", 88, i + 18), r.globalAlpha = 1), S = requestAnimationFrame(C);
1164
+ }), n.beginPath(), n.arc(88, r, 32 * o, 0, Math.PI * 2), n.fillStyle = u.bgL, n.fill(), n.strokeStyle = h(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), x = requestAnimationFrame(C);
1155
1165
  };
1156
- return C(), () => cancelAnimationFrame(S);
1166
+ return C(), () => cancelAnimationFrame(x);
1157
1167
  }, [
1158
1168
  e,
1159
- t,
1160
- _,
1161
- b
1162
- ]), _.length === 0 ? /* @__PURE__ */ s(I, {
1163
- width: ze,
1164
- height: Be,
1165
- "data-testid": o
1169
+ g,
1170
+ _
1171
+ ]), g.length === 0 ? /* @__PURE__ */ s(I, {
1172
+ width: Ve,
1173
+ height: He,
1174
+ "data-testid": r
1166
1175
  }) : /* @__PURE__ */ c("div", {
1167
- "data-testid": o,
1176
+ "data-testid": r,
1168
1177
  style: {
1169
1178
  position: "relative",
1170
- width: ze,
1171
- height: b
1179
+ width: Ve,
1180
+ height: _
1172
1181
  },
1173
1182
  children: [/* @__PURE__ */ s("canvas", {
1174
- ref: l,
1183
+ ref: o,
1175
1184
  role: "img",
1176
1185
  "aria-label": "NCE fault tree — NCEs per contractor as branching tree",
1177
1186
  style: {
1178
- width: ze,
1179
- height: b,
1187
+ width: Ve,
1188
+ height: _,
1180
1189
  display: "block"
1181
1190
  }
1182
1191
  }), /* @__PURE__ */ s(C, {
1183
- ...S,
1184
- parentW: ze,
1185
- parentH: b
1192
+ ...x,
1193
+ parentW: Ve,
1194
+ parentH: _
1186
1195
  })]
1187
1196
  });
1188
1197
  }
1189
1198
  //#endregion
1190
1199
  //#region src/components/pieChart/PieChart.tsx
1191
- var We = 192, Ge = We, Ke = We + 80;
1192
- function qe({ rows: e = [], variant: t, className: r, colors: i }) {
1200
+ var Ke = 192, qe = Ke, Je = Ke + 80;
1201
+ function Ye({ rows: e = [], variant: t, className: r, colors: i }) {
1193
1202
  let o = a(null), f = a(/* @__PURE__ */ new Map()), p = a(0), m = i?.slices ?? d, { hoveredRef: g, tooltip: b, hitZonesRef: x } = w(o, {
1194
- width: Ge,
1195
- height: Ke
1203
+ width: qe,
1204
+ height: Je
1196
1205
  });
1197
1206
  return n(() => {
1198
1207
  let n = o.current;
1199
1208
  if (!n) return;
1200
- let r = v(n, Ge, Ke);
1209
+ let r = v(n, qe, Je);
1201
1210
  p.current = 0;
1202
- let i = Ge / 2, a = We / 2, s = We * .4, c = t === "donut" ? We * .21 : 0, l = e.reduce((e, t) => e + (t.pricing ?? 0), 0) || 1, d, b = () => {
1211
+ let i = qe / 2, a = Ke / 2, s = Ke * .4, c = t === "donut" ? Ke * .21 : 0, l = e.reduce((e, t) => e + (t.pricing ?? 0), 0) || 1, d, b = () => {
1203
1212
  p.current++;
1204
1213
  let n = p.current;
1205
- r.clearRect(0, 0, Ge, Ke);
1214
+ r.clearRect(0, 0, qe, Je);
1206
1215
  let o = 1 - (1 - Math.min(n / 48, 1)) ** 3;
1207
1216
  N(f.current, g.current), x.current = [];
1208
1217
  let v = -Math.PI / 2;
@@ -1216,10 +1225,10 @@ function qe({ rows: e = [], variant: t, className: r, colors: i }) {
1216
1225
  let O = j(n, .03, 3e-4), k = s + b * 6 + (b > 0 ? O * 2 : 0);
1217
1226
  r.beginPath(), r.moveTo(i + Math.cos(v) * c, a + Math.sin(v) * c), r.arc(i, a, k, v, g), c > 0 ? r.arc(i, a, c, g, v, !0) : r.lineTo(i, a), r.closePath(), r.fillStyle = h(_, .7 + b * .2), r.fill(), r.strokeStyle = h(u.bg, .8), r.lineWidth = 1.5, r.stroke(), v = g;
1218
1227
  }), t === "donut" && e.length > 0 && y(r, i, a, c * .8, u.blue, .06);
1219
- let S = We + 12;
1228
+ let S = Ke + 12;
1220
1229
  e.forEach((e, t) => {
1221
1230
  let n = m[t % m.length], i = (e.pricing ?? 0) / l, a = f.current.get(e.id ?? `sl-${t}`) ?? 0, o = S + t * 18;
1222
- r.beginPath(), r.arc(8, o, 4, 0, Math.PI * 2), r.fillStyle = h(n, .8 + a * .2), r.fill(), r.font = "9px 'JetBrains Mono', monospace", r.fillStyle = h(u.t2, .7 + a * .2), r.textAlign = "left", r.fillText(e.vendor, 18, o + 3.5), r.font = "bold 9px 'JetBrains Mono', monospace", r.fillStyle = _(u.t3, n, a), r.textAlign = "right", r.fillText(`${e.pricing ?? 0} (${Math.round(i * 100)}%)`, Ge - 4, o + 3.5);
1231
+ r.beginPath(), r.arc(8, o, 4, 0, Math.PI * 2), r.fillStyle = h(n, .8 + a * .2), r.fill(), r.font = "9px 'JetBrains Mono', monospace", r.fillStyle = h(u.t2, .7 + a * .2), r.textAlign = "left", r.fillText(e.vendor, 18, o + 3.5), r.font = "bold 9px 'JetBrains Mono', monospace", r.fillStyle = _(u.t3, n, a), r.textAlign = "right", r.fillText(`${e.pricing ?? 0} (${Math.round(i * 100)}%)`, qe - 4, o + 3.5);
1223
1232
  }), d = requestAnimationFrame(b);
1224
1233
  };
1225
1234
  return b(), () => cancelAnimationFrame(d);
@@ -1233,30 +1242,30 @@ function qe({ rows: e = [], variant: t, className: r, colors: i }) {
1233
1242
  children: /* @__PURE__ */ c("div", {
1234
1243
  style: {
1235
1244
  position: "relative",
1236
- width: Ge,
1237
- height: Ke
1245
+ width: qe,
1246
+ height: Je
1238
1247
  },
1239
1248
  children: [/* @__PURE__ */ s("canvas", {
1240
1249
  ref: o,
1241
1250
  role: "img",
1242
1251
  "aria-label": `${t} chart`,
1243
1252
  style: {
1244
- width: Ge,
1245
- height: Ke,
1253
+ width: qe,
1254
+ height: Je,
1246
1255
  display: "block",
1247
1256
  borderRadius: 8
1248
1257
  }
1249
1258
  }), /* @__PURE__ */ s(C, {
1250
1259
  ...b,
1251
- parentW: Ge,
1252
- parentH: Ke
1260
+ parentW: qe,
1261
+ parentH: Je
1253
1262
  })]
1254
1263
  })
1255
1264
  });
1256
1265
  }
1257
1266
  //#endregion
1258
1267
  //#region src/components/sankey/SankeySvg.tsx
1259
- function Je(e, t, n, r) {
1268
+ function Xe(e, t, n, r) {
1260
1269
  let i = new Set(t.map((e) => e.source)), a = new Set(t.map((e) => e.target)), o = /* @__PURE__ */ new Map(), s = [];
1261
1270
  for (e.forEach((e) => {
1262
1271
  i.has(e.id) && !a.has(e.id) && s.push({
@@ -1301,8 +1310,8 @@ function Je(e, t, n, r) {
1301
1310
  });
1302
1311
  }), f;
1303
1312
  }
1304
- function Ye({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f, selectedEntity: p, className: m, colors: g }) {
1305
- let _ = a(null), b = a(/* @__PURE__ */ new Map()), S = a(0), D = a([]), O = g?.nodes ?? d, k = g?.links ?? u.bd, A = g?.activeLinks ?? u.blue, M = g?.activeNodes ?? u.blue, P = i(() => Je(e, t, r, o), [
1313
+ function Ze({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f, selectedEntity: p, className: m, colors: g }) {
1314
+ let _ = a(null), b = a(/* @__PURE__ */ new Map()), S = a(0), D = a([]), O = g?.nodes ?? d, k = g?.links ?? u.bd, A = g?.activeLinks ?? u.blue, M = g?.activeNodes ?? u.blue, P = i(() => Xe(e, t, r, o), [
1306
1315
  e,
1307
1316
  t,
1308
1317
  r,
@@ -1402,7 +1411,7 @@ function Ye({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f,
1402
1411
  }
1403
1412
  //#endregion
1404
1413
  //#region src/canvas/CausalFlowCanvas.tsx
1405
- var Xe = [
1414
+ var Qe = [
1406
1415
  {
1407
1416
  x: .13,
1408
1417
  y: .48
@@ -1435,7 +1444,7 @@ var Xe = [
1435
1444
  x: .92,
1436
1445
  y: .22
1437
1446
  }
1438
- ], Ze = [
1447
+ ], $e = [
1439
1448
  u.blue,
1440
1449
  u.orange,
1441
1450
  u.red,
@@ -1443,7 +1452,7 @@ var Xe = [
1443
1452
  u.green,
1444
1453
  u.amber,
1445
1454
  u.t2
1446
- ], Qe = [
1455
+ ], et = [
1447
1456
  26,
1448
1457
  24,
1449
1458
  24,
@@ -1453,21 +1462,21 @@ var Xe = [
1453
1462
  22,
1454
1463
  22
1455
1464
  ];
1456
- function $e(e, t) {
1465
+ function tt(e, t) {
1457
1466
  let n = 1 - t;
1458
1467
  return {
1459
1468
  x: n * n * n * e.p0.x + 3 * n * n * t * e.p1.x + 3 * n * t * t * e.p2.x + t * t * t * e.p3.x,
1460
1469
  y: n * n * n * e.p0.y + 3 * n * n * t * e.p1.y + 3 * n * t * t * e.p2.y + t * t * t * e.p3.y
1461
1470
  };
1462
1471
  }
1463
- function et(e, t) {
1472
+ function nt(e, t) {
1464
1473
  let n = 1 - t, r = 3 * n * n * (e.p1.x - e.p0.x) + 6 * n * t * (e.p2.x - e.p1.x) + 3 * t * t * (e.p3.x - e.p2.x), i = 3 * n * n * (e.p1.y - e.p0.y) + 6 * n * t * (e.p2.y - e.p1.y) + 3 * t * t * (e.p3.y - e.p2.y), a = Math.sqrt(r * r + i * i) || 1;
1465
1474
  return {
1466
1475
  x: -i / a,
1467
1476
  y: r / a
1468
1477
  };
1469
1478
  }
1470
- function tt(e, t) {
1479
+ function rt(e, t) {
1471
1480
  let n = t.x - e.x, r = t.y - e.y;
1472
1481
  return {
1473
1482
  p0: {
@@ -1488,7 +1497,7 @@ function tt(e, t) {
1488
1497
  }
1489
1498
  };
1490
1499
  }
1491
- function nt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntity: l }) {
1500
+ function it({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntity: l }) {
1492
1501
  let d = a(null), f = a(0), p = a([]), { hoveredRef: m, tooltip: g, hitZonesRef: S } = w(d, {
1493
1502
  width: r,
1494
1503
  height: o
@@ -1496,15 +1505,15 @@ function nt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1496
1505
  let t = /* @__PURE__ */ new Map();
1497
1506
  return e.forEach((e, n) => t.set(e.id, n)), t;
1498
1507
  }, [e]), O = i(() => t.length > 0 ? Math.max(...t.map((e) => e.value)) : 100, [t]), k = (e) => O > 1 ? e / 100 : e, A = i(() => e.map((e, t) => {
1499
- let n = Xe[t % Xe.length];
1508
+ let n = Qe[t % Qe.length];
1500
1509
  return {
1501
1510
  id: e.id,
1502
1511
  label: e.name,
1503
1512
  sub: e.valueLabel ?? "",
1504
1513
  x: n.x * r,
1505
1514
  y: n.y * o,
1506
- r: Qe[t % Qe.length],
1507
- color: Ze[t % Ze.length]
1515
+ r: et[t % et.length],
1516
+ color: $e[t % $e.length]
1508
1517
  };
1509
1518
  }), [
1510
1519
  e,
@@ -1526,7 +1535,7 @@ function nt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1526
1535
  if (t.clearRect(0, 0, r, o), S.current = [], b(t, r, o, e, 50, h(u.blue, .05)), M.forEach((e, n) => {
1527
1536
  let r = A[e.fromIdx], i = A[e.toIdx];
1528
1537
  if (!r || !i) return;
1529
- let a = !!l && (r.id === l || i.id === l), o = _(r.color, i.color, .5), s = a ? .18 : .05, c = a ? .25 : .1, d = tt(r, i);
1538
+ let a = !!l && (r.id === l || i.id === l), o = _(r.color, i.color, .5), s = a ? .18 : .05, c = a ? .25 : .1, d = rt(r, i);
1530
1539
  t.beginPath(), t.moveTo(d.p0.x, d.p0.y), t.bezierCurveTo(d.p1.x, d.p1.y, d.p2.x, d.p2.y, d.p3.x, d.p3.y), t.strokeStyle = h(o, s), t.lineWidth = 16, t.lineCap = "round", t.stroke(), t.strokeStyle = h(o, c), t.lineWidth = 1.5, t.stroke();
1531
1540
  for (let t = 0; t < e.conf * 2.5; t++) Math.random() < .45 && p.current.push({
1532
1541
  edgeIdx: n,
@@ -1535,7 +1544,7 @@ function nt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1535
1544
  off: (Math.random() - .5) * 13,
1536
1545
  sz: .7 + Math.random() * 2
1537
1546
  });
1538
- let f = $e(d, .5), m = `${Math.round(e.conf * 100)}%`;
1547
+ let f = tt(d, .5), m = `${Math.round(e.conf * 100)}%`;
1539
1548
  t.font = "bold 12px 'JetBrains Mono', monospace", t.textBaseline = "middle";
1540
1549
  let g = t.measureText(m).width + 14;
1541
1550
  t.fillStyle = "rgba(10,16,24,0.88)", t.beginPath(), t.roundRect(f.x - g / 2, f.y - 11, g, 22, 6), t.fill(), t.strokeStyle = h(u.blue, .25), t.lineWidth = 1, t.stroke(), t.fillStyle = h(u.blue, .9), t.textAlign = "center", t.fillText(m, f.x, f.y);
@@ -1545,7 +1554,7 @@ function nt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1545
1554
  if (!n) return !1;
1546
1555
  let r = A[n.fromIdx], i = A[n.toIdx];
1547
1556
  if (!r || !i) return !1;
1548
- let a = tt(r, i), o = $e(a, e.t), s = et(a, e.t), c = o.x + s.x * e.off, l = o.y + s.y * e.off, u = Math.sin(e.t * Math.PI) * .7, d = _(r.color, i.color, e.t);
1557
+ let a = rt(r, i), o = tt(a, e.t), s = nt(a, e.t), c = o.x + s.x * e.off, l = o.y + s.y * e.off, u = Math.sin(e.t * Math.PI) * .7, d = _(r.color, i.color, e.t);
1549
1558
  return y(t, c, l, e.sz * 3, d, u * .1), t.beginPath(), t.arc(c, l, e.sz, 0, Math.PI * 2), t.fillStyle = h(d, u), t.fill(), !0;
1550
1559
  }), p.current.length > 350 && (p.current = p.current.slice(-350)), A.forEach((n, r) => {
1551
1560
  let i = l === n.id, a = m.current === `node-${r}`, o = j(e, .03, 3e-4) * .1 + 1, s = n.r * o * (i ? 1.15 : 1);
@@ -1602,10 +1611,10 @@ function nt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1602
1611
  }
1603
1612
  //#endregion
1604
1613
  //#region src/components/sankey/ProcessSankey.tsx
1605
- function rt({ selectedEntity: e, colors: t }) {
1606
- return /* @__PURE__ */ s(nt, {
1607
- nodes: Le.nodes,
1608
- links: Le.links,
1614
+ function at({ selectedEntity: e, colors: t }) {
1615
+ return /* @__PURE__ */ s(it, {
1616
+ nodes: ze.nodes,
1617
+ links: ze.links,
1609
1618
  width: 960,
1610
1619
  height: 280,
1611
1620
  selectedEntity: e
@@ -1613,7 +1622,7 @@ function rt({ selectedEntity: e, colors: t }) {
1613
1622
  }
1614
1623
  //#endregion
1615
1624
  //#region src/components/sankey/RankingSankey.tsx
1616
- function it({ rows: e = [], className: t, colors: n }) {
1625
+ function ot({ rows: e = [], className: t, colors: n }) {
1617
1626
  let { nodes: r, links: a } = i(() => {
1618
1627
  let t = e.slice(0, 5);
1619
1628
  return {
@@ -1631,7 +1640,7 @@ function it({ rows: e = [], className: t, colors: n }) {
1631
1640
  }))
1632
1641
  };
1633
1642
  }, [e]);
1634
- return /* @__PURE__ */ s(Ye, {
1643
+ return /* @__PURE__ */ s(Ze, {
1635
1644
  nodes: r,
1636
1645
  links: a,
1637
1646
  width: 760,
@@ -1643,20 +1652,20 @@ function it({ rows: e = [], className: t, colors: n }) {
1643
1652
  }
1644
1653
  //#endregion
1645
1654
  //#region src/components/balanceScaleChart/BalanceScaleChart.tsx
1646
- var at = 500, ot = 320;
1647
- function st({ left: e, right: t, "data-testid": r }) {
1655
+ var st = 500, ct = 320;
1656
+ function lt({ left: e, right: t, "data-testid": r }) {
1648
1657
  let i = a(null), o = a(0);
1649
1658
  return n(() => {
1650
1659
  let n = i.current;
1651
1660
  if (!n) return;
1652
- let r = v(n, at, ot);
1661
+ let r = v(n, st, ct);
1653
1662
  o.current = 0;
1654
- let a = at / 2, s = Math.max(e.value, t.value), c = (e.value - t.value) / s * 14, l, d = () => {
1663
+ let a = st / 2, s = Math.max(e.value, t.value), c = (e.value - t.value) / s * 14, l, d = () => {
1655
1664
  o.current++;
1656
1665
  let n = o.current;
1657
- r.clearRect(0, 0, at, ot), r.letterSpacing = f.letterSpacing;
1666
+ r.clearRect(0, 0, st, ct), r.letterSpacing = f.letterSpacing;
1658
1667
  let i = D(Math.min(n / 80, 1)), g = c * A(Math.min(n / 80, 1)) * Math.PI / 180;
1659
- r.strokeStyle = h(u.bd, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(a, 100), r.lineTo(a, ot - 80), r.stroke(), r.beginPath(), r.arc(a, 100, 5 * i, 0, Math.PI * 2), r.fillStyle = u.t2, r.fill();
1668
+ r.strokeStyle = h(u.bd, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(a, 100), r.lineTo(a, ct - 80), r.stroke(), r.beginPath(), r.arc(a, 100, 5 * i, 0, Math.PI * 2), r.fillStyle = u.t2, r.fill();
1660
1669
  let _ = {
1661
1670
  x: a - Math.cos(g) * 160,
1662
1671
  y: 100 + Math.sin(-g) * 160
@@ -1682,23 +1691,23 @@ function st({ left: e, right: t, "data-testid": r }) {
1682
1691
  6
1683
1692
  ]), r.fill(), r.stroke(), r.strokeStyle = h(u.t2, .35 * i), r.lineWidth = 1, [-90 / 3, 90 / 3].forEach((e) => {
1684
1693
  r.beginPath(), r.moveTo(v.x + e, v.y + 4), r.lineTo(v.x + e, C), r.stroke();
1685
- }), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = p.font, r.fillStyle = u.amber, r.textAlign = "center", r.fillText(t.label, v.x, C + S + 18), r.font = f.font, r.fillStyle = f.color, r.fillText("Submitted", v.x, C + S + 32), r.fillText(`${t.count} quotations`, v.x, C + S + 44), r.globalAlpha = 1), i > .85 && Math.abs(c) > 1 && (r.globalAlpha = Math.min(1, (i - .85) / .15) * .6, r.font = m.font, r.fillStyle = m.color, r.textAlign = "center", r.fillText(`${Math.abs(c).toFixed(1)}° tilt toward accepted`, a, ot - 12), r.globalAlpha = 1), l = requestAnimationFrame(d);
1694
+ }), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = p.font, r.fillStyle = u.amber, r.textAlign = "center", r.fillText(t.label, v.x, C + S + 18), r.font = f.font, r.fillStyle = f.color, r.fillText("Submitted", v.x, C + S + 32), r.fillText(`${t.count} quotations`, v.x, C + S + 44), r.globalAlpha = 1), i > .85 && Math.abs(c) > 1 && (r.globalAlpha = Math.min(1, (i - .85) / .15) * .6, r.font = m.font, r.fillStyle = m.color, r.textAlign = "center", r.fillText(`${Math.abs(c).toFixed(1)}° tilt toward accepted`, a, ct - 12), r.globalAlpha = 1), l = requestAnimationFrame(d);
1686
1695
  };
1687
1696
  return d(), () => cancelAnimationFrame(l);
1688
1697
  }, [e, t]), /* @__PURE__ */ s("div", {
1689
1698
  "data-testid": r,
1690
1699
  style: {
1691
1700
  position: "relative",
1692
- width: at,
1693
- height: ot
1701
+ width: st,
1702
+ height: ct
1694
1703
  },
1695
1704
  children: /* @__PURE__ */ s("canvas", {
1696
1705
  ref: i,
1697
1706
  role: "img",
1698
1707
  "aria-label": "Quotation balance — accepted vs submitted quotation value",
1699
1708
  style: {
1700
- width: at,
1701
- height: ot,
1709
+ width: st,
1710
+ height: ct,
1702
1711
  display: "block"
1703
1712
  }
1704
1713
  })
@@ -1706,25 +1715,25 @@ function st({ left: e, right: t, "data-testid": r }) {
1706
1715
  }
1707
1716
  //#endregion
1708
1717
  //#region src/components/areaLineChart/AreaLineChart.tsx
1709
- var ct = 680, G = 280;
1710
- function lt({ points: e = [], "data-testid": t }) {
1718
+ var ut = 680, K = 280;
1719
+ function dt({ points: e = [], "data-testid": t }) {
1711
1720
  let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), { hoveredRef: d, tooltip: p, hitZonesRef: m } = w(r, {
1712
- width: ct,
1713
- height: G
1721
+ width: ut,
1722
+ height: K
1714
1723
  }), g = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
1715
1724
  return n(() => {
1716
1725
  let e = r.current;
1717
1726
  if (!e) return;
1718
- let t = v(e, ct, G);
1727
+ let t = v(e, ut, K);
1719
1728
  l.current = 0;
1720
- let n = ct - 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) => ({
1729
+ let n = ut - 54 - 28, i = K - 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) => ({
1721
1730
  x: 54 + t * c,
1722
1731
  y: 30 + i - e.count / a * i,
1723
1732
  point: e
1724
1733
  })), _, b = () => {
1725
1734
  l.current++;
1726
1735
  let e = l.current;
1727
- t.clearRect(0, 0, ct, G), t.letterSpacing = f.letterSpacing;
1736
+ t.clearRect(0, 0, ut, K), t.letterSpacing = f.letterSpacing;
1728
1737
  let r = D(Math.min(e / 72, 1));
1729
1738
  N(o.current, d.current), m.current = [], [
1730
1739
  .25,
@@ -1734,7 +1743,7 @@ function lt({ points: e = [], "data-testid": t }) {
1734
1743
  ].forEach((e) => {
1735
1744
  let r = 30 + i - e * i;
1736
1745
  t.strokeStyle = h(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);
1737
- }), 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 = h(u.bd, .3), t.lineWidth = 1, t.setLineDash([]), t.beginPath(), t.moveTo(54, 30 + i), t.lineTo(54 + n, 30 + i), t.stroke();
1746
+ }), 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, K - 6), t.strokeStyle = h(u.bd, .3), t.lineWidth = 1, t.setLineDash([]), t.beginPath(), t.moveTo(54, 30 + i), t.lineTo(54 + n, 30 + i), t.stroke();
1738
1747
  let c = r * (s - 1), g = Math.floor(c) + 1;
1739
1748
  if (g >= 2) {
1740
1749
  t.beginPath(), t.moveTo(p[0].x, 30 + i), t.lineTo(p[0].x, p[0].y);
@@ -1762,13 +1771,13 @@ function lt({ points: e = [], "data-testid": t }) {
1762
1771
  color: u.blue
1763
1772
  }), s > 0 && S(t, e.x, 30, 30 + i, h(u.blue, .15 * s));
1764
1773
  let c = e.point.count === a;
1765
- (s > 0 || c) && y(t, e.x, e.y, 14, u.blue, (c ? .3 : 0) + s * .25), t.beginPath(), t.arc(e.x, e.y, s > 0 ? 5 : 3.5, 0, Math.PI * 2), t.fillStyle = h(u.blue, s > 0 ? 1 : .8), t.fill(), (s > 0 || c) && (t.font = f.font, t.fillStyle = u.blue, t.textAlign = "center", t.fillText(String(e.point.count), e.x, e.y - 10)), t.font = f.font, t.fillStyle = s > 0 ? u.blue : f.color, t.textAlign = "center", t.fillText(e.point.week, e.x, G - 54 + 14);
1774
+ (s > 0 || c) && y(t, e.x, e.y, 14, u.blue, (c ? .3 : 0) + s * .25), t.beginPath(), t.arc(e.x, e.y, s > 0 ? 5 : 3.5, 0, Math.PI * 2), t.fillStyle = h(u.blue, s > 0 ? 1 : .8), t.fill(), (s > 0 || c) && (t.font = f.font, t.fillStyle = u.blue, t.textAlign = "center", t.fillText(String(e.point.count), e.x, e.y - 10)), t.font = f.font, t.fillStyle = s > 0 ? u.blue : f.color, t.textAlign = "center", t.fillText(e.point.week, e.x, K - 54 + 14);
1766
1775
  }), _ = requestAnimationFrame(b);
1767
1776
  };
1768
1777
  return b(), () => cancelAnimationFrame(_);
1769
1778
  }, [g]), g.length < 2 ? /* @__PURE__ */ s(I, {
1770
- width: ct,
1771
- height: G,
1779
+ width: ut,
1780
+ height: K,
1772
1781
  "data-testid": t
1773
1782
  }) : /* @__PURE__ */ s("div", {
1774
1783
  "data-testid": t,
@@ -1780,106 +1789,114 @@ function lt({ points: e = [], "data-testid": t }) {
1780
1789
  children: /* @__PURE__ */ c("div", {
1781
1790
  style: {
1782
1791
  position: "relative",
1783
- width: ct,
1784
- height: G
1792
+ width: ut,
1793
+ height: K
1785
1794
  },
1786
1795
  children: [/* @__PURE__ */ s("canvas", {
1787
1796
  ref: r,
1788
1797
  role: "img",
1789
1798
  "aria-label": "Trend chart — count over time",
1790
1799
  style: {
1791
- width: ct,
1792
- height: G,
1800
+ width: ut,
1801
+ height: K,
1793
1802
  display: "block"
1794
1803
  }
1795
1804
  }), /* @__PURE__ */ s(C, {
1796
1805
  ...p,
1797
- parentW: ct,
1798
- parentH: G
1806
+ parentW: ut,
1807
+ parentH: K
1799
1808
  })]
1800
1809
  })
1801
1810
  });
1802
1811
  }
1803
1812
  //#endregion
1804
1813
  //#region src/components/trend/Trend.tsx
1805
- var ut = 680, K = 280, dt = 54, ft = 28, pt = 64, mt = f.font, ht = 12;
1806
- function gt({ points: e = [], "data-testid": t }) {
1814
+ var ft = 680, q = 280, pt = 54, mt = 28, ht = 64, gt = f.font, _t = 12, vt = Math.PI * 2, yt = 72, bt = 20, xt = 5e3;
1815
+ function St({ points: e = [], "data-testid": t }) {
1807
1816
  let r = a(null), o = a(null), l = a(0), d = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), p = i(() => {
1808
- if (d.length <= 1) return pt;
1817
+ if (d.length <= 1) return ht;
1809
1818
  let e = document.createElement("canvas").getContext("2d");
1810
- if (!e) return pt;
1811
- e.font = mt;
1812
- let t = Math.max(...d.map((t) => e.measureText(t.week).width));
1813
- return Math.max(pt, t + ht);
1814
- }, [d]), m = Math.round(p / 2), g = Math.max(ut - dt, ft + m + Math.max(0, d.length - 1) * p), { tooltip: _, hitZonesRef: y } = w(r, {
1815
- width: g,
1816
- height: K
1819
+ if (!e) return ht;
1820
+ e.font = gt;
1821
+ let t = Math.max(1, Math.ceil(d.length / bt)), n = Math.max(...d.filter((e, n) => n % t === 0).map((t) => e.measureText(t.week).width));
1822
+ return Math.max(ht, n + _t);
1823
+ }, [d]), m = Math.round(p / 2), g = mt + m + Math.max(0, d.length - 1) * p, _ = Math.max(ft - pt, Math.min(g, xt)), { tooltip: y, hitZonesRef: b } = w(r, {
1824
+ width: _,
1825
+ height: q
1817
1826
  });
1818
1827
  return n(() => {
1819
1828
  let e = r.current;
1820
1829
  if (!e) return;
1821
- let t = v(e, g, K), n = o.current ? v(o.current, dt, K) : null;
1830
+ let t = v(e, _, q), n = o.current ? v(o.current, pt, q) : null;
1822
1831
  l.current = 0;
1823
- let i = g - ft, a = K - 30 - 54, s = Math.max(...d.map((e) => e.count), 1), c = d.length, _ = c > 1 ? Math.max((i - m) / (c - 1), p) : i - m, b = d.map((e, t) => ({
1824
- x: m + t * _,
1825
- y: 30 + a - e.count / s * a,
1832
+ let i = d.length <= yt ? yt : Math.max(24, Math.round(yt * (yt / d.length))), a = _ - mt, s = q - 30 - 54, c = Math.max(...d.map((e) => e.count), 1), g = d.length, y = g > 1 ? (a - m) / (g - 1) : a - m, x = Math.max(1, Math.ceil(p / y)), S = d.map((e, t) => ({
1833
+ x: m + t * y,
1834
+ y: 30 + s - e.count / c * s,
1826
1835
  point: e
1827
1836
  }));
1828
- n && (n.clearRect(0, 0, dt, K), n.letterSpacing = f.letterSpacing, [
1837
+ n && (n.clearRect(0, 0, pt, q), n.letterSpacing = f.letterSpacing, [
1829
1838
  .25,
1830
1839
  .5,
1831
1840
  .75,
1832
1841
  1
1833
1842
  ].forEach((e) => {
1834
- let t = 30 + a - e * a;
1835
- n.font = f.font, n.fillStyle = f.color, n.textAlign = "right", n.fillText(String(Math.round(s * e)), dt - 6, t + 3);
1836
- }), n.save(), n.translate(12, 30 + a / 2), n.rotate(-Math.PI / 2), n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText("Count", 0, 0), n.restore());
1837
- let x, S = () => {
1843
+ let t = 30 + s - e * s;
1844
+ n.font = f.font, n.fillStyle = f.color, n.textAlign = "right", n.fillText(String(Math.round(c * e)), pt - 6, t + 3);
1845
+ }), 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("Count", 0, 0), n.restore());
1846
+ let C = t.createLinearGradient(0, 30, 0, 30 + s);
1847
+ C.addColorStop(0, h(u.blue, .22)), C.addColorStop(1, h(u.blue, .02));
1848
+ let w = 0, E, O = (e) => {
1849
+ t.font = gt, t.fillStyle = f.color, t.textAlign = "center";
1850
+ for (let n = 0; n < e; n++) n % x === 0 && t.fillText(S[n].point.week, S[n].x, q - 54 + 14);
1851
+ }, k = () => {
1838
1852
  l.current++;
1839
- let e = Math.min(l.current / 72, 1), n = D(e);
1840
- t.clearRect(0, 0, g, K), t.letterSpacing = f.letterSpacing, [
1853
+ let e = Math.min(l.current / i, 1), n = D(e), r = e >= 1;
1854
+ t.clearRect(0, 0, _, q), t.letterSpacing = f.letterSpacing, [
1841
1855
  .25,
1842
1856
  .5,
1843
1857
  .75,
1844
1858
  1
1845
1859
  ].forEach((e) => {
1846
- let n = 30 + a - e * a;
1847
- t.strokeStyle = h(u.bd, .18), t.lineWidth = 1, t.setLineDash([3, 5]), t.beginPath(), t.moveTo(0, n), t.lineTo(i, n), t.stroke(), t.setLineDash([]);
1848
- }), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Period", m + (i - m) / 2, K - 6), t.strokeStyle = h(u.bd, .3), t.lineWidth = 1, t.beginPath(), t.moveTo(m, 30 + a), t.lineTo(i, 30 + a), t.stroke();
1849
- let r = n * (c - 1), o = Math.floor(r) + 1;
1850
- if (o >= 2) {
1851
- t.beginPath(), t.moveTo(b[0].x, 30 + a), t.lineTo(b[0].x, b[0].y);
1852
- for (let e = 1; e < o; e++) {
1853
- let n = r - Math.floor(r), i = e === o - 1 && e === Math.ceil(r) && n > 0, a = i ? b[e - 1].x + (b[e].x - b[e - 1].x) * n : b[e].x, s = i ? b[e - 1].y + (b[e].y - b[e - 1].y) * n : b[e].y;
1854
- t.lineTo(a, s);
1860
+ let n = 30 + s - e * s;
1861
+ t.strokeStyle = h(u.bd, .18), t.lineWidth = 1, t.setLineDash([3, 5]), t.beginPath(), t.moveTo(0, n), t.lineTo(a, n), t.stroke(), t.setLineDash([]);
1862
+ }), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Period", m + (a - m) / 2, q - 6), t.strokeStyle = h(u.bd, .3), t.lineWidth = 1, t.beginPath(), t.moveTo(m, 30 + s), t.lineTo(a, 30 + s), t.stroke();
1863
+ let o = n * (g - 1), c = Math.floor(o) + 1;
1864
+ if (c >= 2) {
1865
+ t.beginPath(), t.moveTo(S[0].x, 30 + s), t.lineTo(S[0].x, S[0].y);
1866
+ for (let e = 1; e < c; e++) {
1867
+ let n = o - Math.floor(o), r = e === c - 1 && e === Math.ceil(o) && n > 0, i = r ? S[e - 1].x + (S[e].x - S[e - 1].x) * n : S[e].x, a = r ? S[e - 1].y + (S[e].y - S[e - 1].y) * n : S[e].y;
1868
+ t.lineTo(i, a);
1855
1869
  }
1856
- t.lineTo(b[o - 1].x, 30 + a), t.closePath();
1857
- let e = t.createLinearGradient(0, 30, 0, 30 + a);
1858
- e.addColorStop(0, h(u.blue, .22)), e.addColorStop(1, h(u.blue, .02)), t.fillStyle = e, t.fill();
1870
+ t.lineTo(S[c - 1].x, 30 + s), t.closePath(), t.fillStyle = C, t.fill();
1859
1871
  }
1860
1872
  t.beginPath();
1861
- for (let e = 0; e < o; e++) {
1862
- let n = r - Math.floor(r), i = e === o - 1 && e > 0 && e === Math.ceil(r) && n > 0, a = i ? b[e - 1].x + (b[e].x - b[e - 1].x) * n : b[e].x, s = i ? b[e - 1].y + (b[e].y - b[e - 1].y) * n : b[e].y;
1863
- e === 0 ? t.moveTo(a, s) : t.lineTo(a, s);
1873
+ for (let e = 0; e < c; e++) {
1874
+ let n = o - Math.floor(o), r = e === c - 1 && e > 0 && e === Math.ceil(o) && n > 0, i = r ? S[e - 1].x + (S[e].x - S[e - 1].x) * n : S[e].x, a = r ? S[e - 1].y + (S[e].y - S[e - 1].y) * n : S[e].y;
1875
+ e === 0 ? t.moveTo(i, a) : t.lineTo(i, a);
1864
1876
  }
1865
- t.strokeStyle = h(u.blue, .85), t.lineWidth = 2, t.stroke(), y.current = [], b.forEach((e, n) => {
1866
- n >= o || (T(y.current, `pt-${n}`, e.x, e.y, 10, {
1867
- label: e.point.week,
1868
- value: `${e.point.count} submissions`,
1869
- sublabel: `£${e.point.value}M value`,
1877
+ t.strokeStyle = h(u.blue, .85), t.lineWidth = 2, t.stroke(), t.fillStyle = h(u.blue, .8), t.beginPath();
1878
+ for (let e = 0; e < c; e++) t.moveTo(S[e].x + 3.5, S[e].y), t.arc(S[e].x, S[e].y, 3.5, 0, vt);
1879
+ if (t.fill(), c > w) {
1880
+ b.current = [];
1881
+ for (let e = 0; e < c; e++) T(b.current, `pt-${e}`, S[e].x, S[e].y, 10, {
1882
+ label: S[e].point.week,
1883
+ value: `${S[e].point.count} submissions`,
1884
+ sublabel: `£${S[e].point.value}M value`,
1870
1885
  color: u.blue
1871
- }), t.beginPath(), t.arc(e.x, e.y, 3.5, 0, Math.PI * 2), t.fillStyle = h(u.blue, .8), t.fill(), t.font = mt, t.fillStyle = f.color, t.textAlign = "center", t.fillText(e.point.week, e.x, K - 54 + 14));
1872
- }), e < 1 && (x = requestAnimationFrame(S));
1886
+ });
1887
+ w = c;
1888
+ }
1889
+ r && O(g), r || (E = requestAnimationFrame(k));
1873
1890
  };
1874
- return S(), () => cancelAnimationFrame(x);
1891
+ return k(), () => cancelAnimationFrame(E);
1875
1892
  }, [
1876
1893
  d,
1877
- g,
1894
+ _,
1878
1895
  p,
1879
- y
1896
+ b
1880
1897
  ]), d.length < 2 ? /* @__PURE__ */ s(I, {
1881
- width: ut,
1882
- height: K,
1898
+ width: ft,
1899
+ height: q,
1883
1900
  "data-testid": t
1884
1901
  }) : /* @__PURE__ */ c("div", {
1885
1902
  "data-testid": t,
@@ -1892,8 +1909,8 @@ function gt({ points: e = [], "data-testid": t }) {
1892
1909
  ref: o,
1893
1910
  "aria-hidden": "true",
1894
1911
  style: {
1895
- width: dt,
1896
- height: K,
1912
+ width: pt,
1913
+ height: q,
1897
1914
  display: "block",
1898
1915
  flexShrink: 0
1899
1916
  }
@@ -1906,22 +1923,22 @@ function gt({ points: e = [], "data-testid": t }) {
1906
1923
  children: /* @__PURE__ */ c("div", {
1907
1924
  style: {
1908
1925
  position: "relative",
1909
- width: g,
1910
- height: K
1926
+ width: _,
1927
+ height: q
1911
1928
  },
1912
1929
  children: [/* @__PURE__ */ s("canvas", {
1913
1930
  ref: r,
1914
1931
  role: "img",
1915
1932
  "aria-label": "Trend chart — count over time",
1916
1933
  style: {
1917
- width: g,
1918
- height: K,
1934
+ width: _,
1935
+ height: q,
1919
1936
  display: "block"
1920
1937
  }
1921
1938
  }), /* @__PURE__ */ s(C, {
1922
- ..._,
1923
- parentW: g,
1924
- parentH: K
1939
+ ...y,
1940
+ parentW: _,
1941
+ parentH: q
1925
1942
  })]
1926
1943
  })
1927
1944
  })]
@@ -1929,38 +1946,38 @@ function gt({ points: e = [], "data-testid": t }) {
1929
1946
  }
1930
1947
  //#endregion
1931
1948
  //#region src/components/proportionalBandChart/ProportionalBandChart.tsx
1932
- var q = 680, _t = 240;
1933
- function vt(e, t, n) {
1949
+ var J = 680, Ct = 240;
1950
+ function wt(e, t, n) {
1934
1951
  if (e.measureText(t).width <= n) return t;
1935
1952
  let r = t;
1936
1953
  for (; r.length > 0 && e.measureText(`${r}…`).width > n;) r = r.slice(0, -1);
1937
1954
  return `${r}…`;
1938
1955
  }
1939
- var yt = {
1956
+ var Tt = {
1940
1957
  Critical: u.red,
1941
1958
  High: u.orange,
1942
1959
  Medium: u.amber,
1943
1960
  Low: u.green
1944
1961
  };
1945
- function bt({ severities: e = [], "data-testid": t }) {
1962
+ function Et({ severities: e = [], "data-testid": t }) {
1946
1963
  let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), { hoveredRef: d, tooltip: m, hitZonesRef: g } = w(r, {
1947
- width: q,
1948
- height: _t
1964
+ width: J,
1965
+ height: Ct
1949
1966
  }), _ = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
1950
1967
  return n(() => {
1951
1968
  let e = r.current;
1952
1969
  if (!e) return;
1953
- let t = v(e, q, _t);
1970
+ let t = v(e, J, Ct);
1954
1971
  l.current = 0;
1955
- let n = _.reduce((e, t) => e + t.count, 0), i = q - 28 - 28, a = _t - 50 - 52, s = _.map((e) => e.count / n * i), c, m = () => {
1972
+ let n = _.reduce((e, t) => e + t.count, 0), i = J - 28 - 28, a = Ct - 50 - 52, s = _.map((e) => e.count / n * i), c, m = () => {
1956
1973
  l.current++;
1957
1974
  let e = l.current;
1958
- t.clearRect(0, 0, q, _t), t.letterSpacing = f.letterSpacing;
1975
+ t.clearRect(0, 0, J, Ct), t.letterSpacing = f.letterSpacing;
1959
1976
  let r = O(Math.min(e / 60, 1));
1960
- N(o.current, d.current), g.current = [], t.strokeStyle = h(u.bd, .2), t.lineWidth = 1, t.beginPath(), t.rect(28, 50, i, a), t.stroke(), t.strokeStyle = h(u.t2, .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([]);
1977
+ N(o.current, d.current), g.current = [], t.strokeStyle = h(u.bd, .2), t.lineWidth = 1, t.beginPath(), t.rect(28, 50, i, a), t.stroke(), t.strokeStyle = h(u.t2, .15), t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(J / 2, 50), t.lineTo(J / 2, 50 + a), t.stroke(), t.setLineDash([]);
1961
1978
  let v = 28;
1962
1979
  _.forEach((e, i) => {
1963
- let c = yt[e.severity] ?? u.blue, l = s[i];
1980
+ let c = Tt[e.severity] ?? u.blue, l = s[i];
1964
1981
  l * r;
1965
1982
  let d = o.current.get(e.severity) ?? 0, m = v + l / 2, _ = l * .85;
1966
1983
  m - _ / 2;
@@ -1972,7 +1989,7 @@ function bt({ severities: e = [], "data-testid": t }) {
1972
1989
  color: c
1973
1990
  }), r > .5) {
1974
1991
  let i = Math.min(1, (r - .5) / .5), o = v + l / 2;
1975
- t.globalAlpha = i, t.font = f.font, t.fillStyle = d > 0 ? c : h(c, .9), t.textAlign = "center", t.fillText(vt(t, e.severity, l - 12), o, 38), t.font = p.font, t.fillStyle = d > 0 ? u.t1 : h(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;
1992
+ t.globalAlpha = i, t.font = f.font, t.fillStyle = d > 0 ? c : h(c, .9), t.textAlign = "center", t.fillText(wt(t, e.severity, l - 12), o, 38), t.font = p.font, t.fillStyle = d > 0 ? u.t1 : h(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;
1976
1993
  }
1977
1994
  v += l;
1978
1995
  });
@@ -1981,64 +1998,64 @@ function bt({ severities: e = [], "data-testid": t }) {
1981
1998
  };
1982
1999
  return m(), () => cancelAnimationFrame(c);
1983
2000
  }, [_]), _.length === 0 ? /* @__PURE__ */ s(I, {
1984
- width: q,
1985
- height: _t,
2001
+ width: J,
2002
+ height: Ct,
1986
2003
  "data-testid": t
1987
2004
  }) : /* @__PURE__ */ c("div", {
1988
2005
  "data-testid": t,
1989
2006
  style: {
1990
2007
  position: "relative",
1991
- width: q,
1992
- height: _t
2008
+ width: J,
2009
+ height: Ct
1993
2010
  },
1994
2011
  children: [/* @__PURE__ */ s("canvas", {
1995
2012
  ref: r,
1996
2013
  role: "img",
1997
2014
  "aria-label": "Early Warning severity distribution — prism spectrum bands",
1998
2015
  style: {
1999
- width: q,
2000
- height: _t,
2016
+ width: J,
2017
+ height: Ct,
2001
2018
  display: "block"
2002
2019
  }
2003
2020
  }), /* @__PURE__ */ s(C, {
2004
2021
  ...m,
2005
- parentW: q,
2006
- parentH: _t
2022
+ parentW: J,
2023
+ parentH: Ct
2007
2024
  })]
2008
2025
  });
2009
2026
  }
2010
2027
  //#endregion
2011
2028
  //#region src/components/hubAndSpokeRadialChart/HubAndSpokeRadialChart.tsx
2012
- var J = 460, Y = 300, xt = {
2029
+ var Y = 460, X = 300, Dt = {
2013
2030
  Open: u.red,
2014
2031
  Submitted: u.amber,
2015
2032
  Closed: u.green
2016
2033
  };
2017
- function St({ segments: e = [], title: t, "data-testid": r }) {
2034
+ function Ot({ segments: e = [], title: t, "data-testid": r }) {
2018
2035
  let o = a(null), l = a(0), d = a(/* @__PURE__ */ new Map()), { hoveredRef: m, tooltip: g, hitZonesRef: _ } = w(o, {
2019
- width: J,
2020
- height: Y
2036
+ width: Y,
2037
+ height: X
2021
2038
  }), S = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
2022
2039
  return n(() => {
2023
2040
  let e = o.current;
2024
2041
  if (!e) return;
2025
- let t = v(e, J, Y);
2042
+ let t = v(e, Y, X);
2026
2043
  l.current = 0;
2027
- let n = J * .5, r = Y * .54, i = J * .22, a = S.reduce((e, t) => e + t.count, 0), s = Math.max(...S.map((e) => e.count), 1), c, g = () => {
2044
+ let n = Y * .5, r = X * .54, i = Y * .22, a = S.reduce((e, t) => e + t.count, 0), s = Math.max(...S.map((e) => e.count), 1), c, g = () => {
2028
2045
  l.current++;
2029
2046
  let e = l.current;
2030
- t.clearRect(0, 0, J, Y), t.letterSpacing = f.letterSpacing, _.current = [], d.current.forEach((e, t) => {
2047
+ t.clearRect(0, 0, Y, X), t.letterSpacing = f.letterSpacing, _.current = [], d.current.forEach((e, t) => {
2031
2048
  let n = t === m.current ? 1 : 0, r = e + (n - e) * .12;
2032
2049
  Math.abs(r - n) < .005 ? n === 0 ? d.current.delete(t) : d.current.set(t, 1) : d.current.set(t, r);
2033
- }), m.current && !d.current.has(m.current) && d.current.set(m.current, 0), b(t, J, Y, e, 40, h(u.blue, .04)), S.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, f = xt[a.status] ?? u.blue, m = 2 + a.count / s * 8;
2050
+ }), m.current && !d.current.has(m.current) && d.current.set(m.current, 0), b(t, Y, X, e, 40, h(u.blue, .04)), S.forEach((a, o) => {
2051
+ let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, d = r + Math.sin(c) * i, f = Dt[a.status] ?? u.blue, m = 2 + a.count / s * 8;
2035
2052
  t.beginPath(), t.moveTo(n, r), t.lineTo(l, d), t.strokeStyle = h(f, .08), t.lineWidth = m * 2, t.stroke(), t.beginPath(), t.moveTo(n, r), t.lineTo(l, d), t.strokeStyle = h(f, .25), t.lineWidth = 1, t.stroke();
2036
2053
  let g = (e * .005 + o * .33) % 1, _ = n + (l - n) * g, v = r + (d - r) * g;
2037
2054
  y(t, _, v, 6, f, .4), t.beginPath(), t.arc(_, v, 2, 0, Math.PI * 2), t.fillStyle = h(f, .8), t.fill();
2038
2055
  let b = (n + l) / 2, x = (r + d) / 2;
2039
2056
  t.font = p.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = h(f, .85), t.fillText(String(a.count), b, x);
2040
2057
  }), S.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, m = xt[e.status] ?? u.blue, g = 10 + e.count / s * 18, v = d.current.get(e.status) ?? 0;
2058
+ let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, p = r + Math.sin(c) * i, m = Dt[e.status] ?? u.blue, g = 10 + e.count / s * 18, v = d.current.get(e.status) ?? 0;
2042
2059
  y(t, l, p, g * 2.5, m, .2 + v * .15);
2043
2060
  let b = t.createRadialGradient(l, p - g * .2, 0, l, p, g);
2044
2061
  b.addColorStop(0, h(m, .8 + v * .2)), b.addColorStop(1, h(m, .4 + v * .1)), t.beginPath(), t.arc(l, p, g, 0, Math.PI * 2), t.fillStyle = b, t.fill(), t.font = "bold " + f.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = h(u.t1, .9), t.fillText(e.status, l, p), T(_.current, e.status, l, p, g + 6, {
@@ -2055,41 +2072,41 @@ function St({ segments: e = [], title: t, "data-testid": r }) {
2055
2072
  label: "Total EW Status",
2056
2073
  value: `${a} Early Warnings`,
2057
2074
  color: u.t2
2058
- }), x(t, J, Y, e, .015), c = requestAnimationFrame(g);
2075
+ }), x(t, Y, X, e, .015), c = requestAnimationFrame(g);
2059
2076
  };
2060
2077
  return g(), () => cancelAnimationFrame(c);
2061
2078
  }, [S, t]), S.length === 0 ? /* @__PURE__ */ s(I, {
2062
- width: J,
2063
- height: Y,
2079
+ width: Y,
2080
+ height: X,
2064
2081
  "data-testid": r
2065
2082
  }) : /* @__PURE__ */ c("div", {
2066
2083
  "data-testid": r,
2067
2084
  style: {
2068
2085
  position: "relative",
2069
- width: J,
2070
- height: Y
2086
+ width: Y,
2087
+ height: X
2071
2088
  },
2072
2089
  children: [/* @__PURE__ */ s("canvas", {
2073
2090
  ref: o,
2074
2091
  role: "img",
2075
2092
  "aria-label": t ?? "EW status arc visualization",
2076
2093
  style: {
2077
- width: J,
2078
- height: Y,
2094
+ width: Y,
2095
+ height: X,
2079
2096
  display: "block",
2080
2097
  borderRadius: 8
2081
2098
  }
2082
2099
  }), /* @__PURE__ */ s(C, {
2083
2100
  ...g,
2084
- parentW: J,
2085
- parentH: Y
2101
+ parentW: Y,
2102
+ parentH: X
2086
2103
  })]
2087
2104
  });
2088
2105
  }
2089
2106
  //#endregion
2090
2107
  //#region src/components/trendChart/TrendChart.tsx
2091
- var Ct = 280, X = 96;
2092
- function wt({ points: e = [], className: t, colors: r }) {
2108
+ var kt = 280, Z = 96;
2109
+ function At({ points: e = [], className: t, colors: r }) {
2093
2110
  let o = a(null), d = a(/* @__PURE__ */ new Map()), f = a(0), p = i(() => e.map(([e, t]) => {
2094
2111
  let n = String(t).match(/-?\d+(\.\d+)?/);
2095
2112
  return {
@@ -2097,18 +2114,18 @@ function wt({ points: e = [], className: t, colors: r }) {
2097
2114
  value: n ? Number(n[0]) : 0
2098
2115
  };
2099
2116
  }), [e]), { mouseRef: m, hoveredRef: g, tooltip: _, hitZonesRef: b } = w(o, {
2100
- width: Ct,
2101
- height: X
2117
+ width: kt,
2118
+ height: Z
2102
2119
  });
2103
2120
  return n(() => {
2104
2121
  let e = o.current;
2105
2122
  if (!e) return;
2106
- let t = v(e, Ct, X);
2123
+ let t = v(e, kt, Z);
2107
2124
  f.current = 0;
2108
2125
  let n = r?.line ?? u.blue, i = r?.point ?? u.blue, a = r?.axisLine ?? u.bd, s, c = () => {
2109
2126
  f.current++;
2110
2127
  let e = f.current;
2111
- if (t.clearRect(0, 0, Ct, X), p.length < 2) {
2128
+ if (t.clearRect(0, 0, kt, Z), p.length < 2) {
2112
2129
  s = requestAnimationFrame(c);
2113
2130
  return;
2114
2131
  }
@@ -2117,9 +2134,9 @@ function wt({ points: e = [], className: t, colors: r }) {
2117
2134
  right: 12,
2118
2135
  top: 16,
2119
2136
  bottom: 20
2120
- }, o = Ct - r.left - r.right, l = X - r.top - r.bottom, _ = p.map((e) => e.value), v = Math.min(..._), x = Math.max(..._) - v || 1, C = (e) => r.left + e / (p.length - 1) * o, w = (e) => r.top + (1 - (e - v) / x) * l, E = 1 - (1 - Math.min(e / 48, 1)) ** 3, D = Math.max(2, Math.floor(E * p.length));
2121
- if (N(d.current, g.current), b.current = [], t.strokeStyle = h(a, .3), t.lineWidth = .5, t.setLineDash([]), t.beginPath(), t.moveTo(r.left, X - r.bottom), t.lineTo(Ct - r.right, X - r.bottom), t.stroke(), t.font = "9px 'JetBrains Mono', monospace", t.fillStyle = h(u.t4, .9), t.textAlign = "center", p.forEach((e, n) => {
2122
- t.fillText(e.label.replace("Day ", "D"), C(n), X - 4);
2137
+ }, o = kt - r.left - r.right, l = Z - r.top - r.bottom, _ = p.map((e) => e.value), v = Math.min(..._), x = Math.max(..._) - v || 1, C = (e) => r.left + e / (p.length - 1) * o, w = (e) => r.top + (1 - (e - v) / x) * l, E = 1 - (1 - Math.min(e / 48, 1)) ** 3, D = Math.max(2, Math.floor(E * p.length));
2138
+ if (N(d.current, g.current), b.current = [], t.strokeStyle = h(a, .3), t.lineWidth = .5, t.setLineDash([]), t.beginPath(), t.moveTo(r.left, Z - r.bottom), t.lineTo(kt - r.right, Z - r.bottom), t.stroke(), t.font = "9px 'JetBrains Mono', monospace", t.fillStyle = h(u.t4, .9), t.textAlign = "center", p.forEach((e, n) => {
2139
+ t.fillText(e.label.replace("Day ", "D"), C(n), Z - 4);
2123
2140
  }), m.current.over && g.current) {
2124
2141
  let e = parseInt(g.current.split("-")[1]);
2125
2142
  isNaN(e) || S(t, C(e), r.top, r.top + l);
@@ -2155,44 +2172,44 @@ function wt({ points: e = [], className: t, colors: r }) {
2155
2172
  children: /* @__PURE__ */ c("div", {
2156
2173
  style: {
2157
2174
  position: "relative",
2158
- width: Ct,
2159
- height: X
2175
+ width: kt,
2176
+ height: Z
2160
2177
  },
2161
2178
  children: [/* @__PURE__ */ s("canvas", {
2162
2179
  ref: o,
2163
2180
  role: "img",
2164
2181
  "aria-label": "trend chart",
2165
2182
  style: {
2166
- width: Ct,
2167
- height: X,
2183
+ width: kt,
2184
+ height: Z,
2168
2185
  display: "block",
2169
2186
  borderRadius: 8
2170
2187
  }
2171
2188
  }), /* @__PURE__ */ s(C, {
2172
2189
  ..._,
2173
- parentW: Ct,
2174
- parentH: X
2190
+ parentW: kt,
2191
+ parentH: Z
2175
2192
  })]
2176
2193
  })
2177
2194
  });
2178
2195
  }
2179
2196
  //#endregion
2180
2197
  //#region src/components/segmentedSplitBarChart/SegmentedSplitBarChart.tsx
2181
- var Tt = 680, Et = 8, Dt = 26, Ot = 14, kt = 16, At = 32;
2182
- function jt({ items: e = [], "data-testid": t }) {
2183
- let r = a(null), l = a(/* @__PURE__ */ new Map()), d = a(0), [g, _] = o(!1), b = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), x = i(() => g ? b : b.slice(0, Et), [b, g]), S = kt + At + x.length * (Dt + Ot) - Ot, { hoveredRef: T, tooltip: D, hitZonesRef: k } = w(r, {
2184
- width: Tt,
2198
+ var jt = 680, Mt = 8, Nt = 26, Pt = 14, Ft = 16, It = 32;
2199
+ function Lt({ items: e = [], "data-testid": t }) {
2200
+ let r = a(null), l = a(/* @__PURE__ */ new Map()), d = a(0), [g, _] = o(!1), b = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), x = i(() => g ? b : b.slice(0, Mt), [b, g]), S = Ft + It + x.length * (Nt + Pt) - Pt, { hoveredRef: T, tooltip: D, hitZonesRef: k } = w(r, {
2201
+ width: jt,
2185
2202
  height: S
2186
2203
  });
2187
2204
  return n(() => {
2188
2205
  let e = r.current;
2189
2206
  if (!e) return;
2190
- let t = v(e, Tt, S);
2207
+ let t = v(e, jt, S);
2191
2208
  d.current = 0;
2192
- let n = kt, i = At, a = Dt, o = Ot, s = Tt - 60 - 28, c = Math.max(...x.map((e) => (e.implemented ?? 0) + (e.unimplemented ?? 0))), g = x.length * (a + o) - o, _ = n + (S - n - i - g) / 2, b, C = () => {
2209
+ let n = Ft, i = It, a = Nt, o = Pt, s = jt - 60 - 28, c = Math.max(...x.map((e) => (e.implemented ?? 0) + (e.unimplemented ?? 0))), g = x.length * (a + o) - o, _ = n + (S - n - i - g) / 2, b, C = () => {
2193
2210
  d.current++;
2194
2211
  let e = d.current;
2195
- t.clearRect(0, 0, Tt, S);
2212
+ t.clearRect(0, 0, jt, S);
2196
2213
  let n = O(Math.min(e / 60, 1));
2197
2214
  N(l.current, T.current), k.current = [], x.forEach((e, r) => {
2198
2215
  let i = M(n, r, x.length, O), d = _ + r * (a + o), m = (e.implemented ?? 0) + (e.unimplemented ?? 0), g = (e.implemented ?? 0) / c * s * i, v = (e.unimplemented ?? 0) / c * s * i, b = `${e.id}-impl`, S = `${e.id}-un`, C = l.current.get(b) ?? 0, w = l.current.get(S) ?? 0;
@@ -2223,16 +2240,16 @@ function jt({ items: e = [], "data-testid": t }) {
2223
2240
  };
2224
2241
  return C(), () => cancelAnimationFrame(b);
2225
2242
  }, [x, S]), b.length === 0 ? /* @__PURE__ */ s(I, {
2226
- width: Tt,
2243
+ width: jt,
2227
2244
  height: 160,
2228
2245
  "data-testid": t
2229
2246
  }) : /* @__PURE__ */ c("div", {
2230
2247
  "data-testid": t,
2231
- style: { width: Tt },
2248
+ style: { width: jt },
2232
2249
  children: [/* @__PURE__ */ c("div", {
2233
2250
  style: {
2234
2251
  position: "relative",
2235
- width: Tt,
2252
+ width: jt,
2236
2253
  height: S
2237
2254
  },
2238
2255
  children: [/* @__PURE__ */ s("canvas", {
@@ -2240,16 +2257,16 @@ function jt({ items: e = [], "data-testid": t }) {
2240
2257
  role: "img",
2241
2258
  "aria-label": "Implemented vs unimplemented variations per contractor — split bar",
2242
2259
  style: {
2243
- width: Tt,
2260
+ width: jt,
2244
2261
  height: S,
2245
2262
  display: "block"
2246
2263
  }
2247
2264
  }), /* @__PURE__ */ s(C, {
2248
2265
  ...D,
2249
- parentW: Tt,
2266
+ parentW: jt,
2250
2267
  parentH: S
2251
2268
  })]
2252
- }), b.length > Et && /* @__PURE__ */ s("div", {
2269
+ }), b.length > Mt && /* @__PURE__ */ s("div", {
2253
2270
  style: { marginTop: 8 },
2254
2271
  children: /* @__PURE__ */ s(ae, {
2255
2272
  expanded: g,
@@ -2260,18 +2277,18 @@ function jt({ items: e = [], "data-testid": t }) {
2260
2277
  }
2261
2278
  //#endregion
2262
2279
  //#region src/components/weeklyFlow/WeeklyFlow.tsx
2263
- var Mt = 800, Nt = 360;
2264
- function Pt({ items: e = [], "data-testid": t }) {
2280
+ var Rt = 800, zt = 360;
2281
+ function Bt({ items: e = [], "data-testid": t }) {
2265
2282
  let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: m, hitZonesRef: g } = w(r, {
2266
- width: Mt,
2267
- height: Nt
2283
+ width: Rt,
2284
+ height: zt
2268
2285
  });
2269
2286
  return n(() => {
2270
2287
  let t = r.current;
2271
2288
  if (!t) return;
2272
- let n = v(t, Mt, Nt);
2289
+ let n = v(t, Rt, zt);
2273
2290
  o.current = 0;
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), m = Nt - 20 - 26, _ = m - 6 * (e.length - 1), b = 20, x = e.map((e, t) => {
2291
+ 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), m = zt - 20 - 26, _ = m - 6 * (e.length - 1), b = 20, x = e.map((e, t) => {
2275
2292
  let n = Math.max(24, (e.total ?? 0) / (c || 1) * _), r = {
2276
2293
  x: 100 - 110 / 2,
2277
2294
  y: b,
@@ -2299,16 +2316,16 @@ function Pt({ items: e = [], "data-testid": t }) {
2299
2316
  }, j, P = () => {
2300
2317
  o.current++;
2301
2318
  let t = o.current;
2302
- n.clearRect(0, 0, Mt, Nt), n.letterSpacing = f.letterSpacing;
2319
+ n.clearRect(0, 0, Rt, zt), n.letterSpacing = f.letterSpacing;
2303
2320
  let r = D(Math.min(t / 80, 1));
2304
2321
  if (N(i.current, l.current), g.current = [], e.forEach((t, o) => {
2305
2322
  let c = x[o], l = M(r, o, e.length, D), u = i.current.get(t.id) ?? 0;
2306
2323
  if (l < .01) return;
2307
2324
  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 * C), v = Math.max(2, (t.variation ?? 0) / s * w), y = O.y + e.slice(0, o).reduce((e, t) => e + (t.base ?? 0) / a * C, 0) + _ / 2, b = k.y + e.slice(0, o).reduce((e, t) => e + (t.variation ?? 0) / s * w, 0) + v / 2, S = u * .2 + .18;
2308
- Ft(n, c.x + 110, h, 420 - 110 / 2, y, _ * l, c.color, S), Ft(n, c.x + 110, g, 420 - 110 / 2, b, v * l, c.color, S * .75);
2325
+ Vt(n, c.x + 110, h, 420 - 110 / 2, y, _ * l, c.color, S), Vt(n, c.x + 110, g, 420 - 110 / 2, b, v * l, c.color, S * .75);
2309
2326
  }), r > .3) {
2310
2327
  let e = Math.min(1, (r - .3) / .7), t = A.y + a / c * m / 2, i = A.y + m - s / c * m / 2;
2311
- Ft(n, 475, O.cy, 720 - 110 / 2, t, C * e, u.blue, .25 * e), Ft(n, 475, k.cy, 720 - 110 / 2, i, w * e, u.amber, .22 * e);
2328
+ Vt(n, 475, O.cy, 720 - 110 / 2, t, C * e, u.blue, .25 * e), Vt(n, 475, k.cy, 720 - 110 / 2, i, w * e, u.amber, .22 * e);
2312
2329
  }
2313
2330
  if ([
2314
2331
  "Contractors",
@@ -2320,15 +2337,15 @@ function Pt({ items: e = [], "data-testid": t }) {
2320
2337
  420,
2321
2338
  720
2322
2339
  ][t];
2323
- n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText(e, r, Nt - 8);
2340
+ n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText(e, r, zt - 8);
2324
2341
  }), e.forEach((t, a) => {
2325
2342
  let o = x[a], s = M(r, a, e.length, D), c = i.current.get(t.id) ?? 0;
2326
2343
  E(g.current, t.id, o.x, o.y, 110, o.h, {
2327
2344
  label: t.name,
2328
- value: `${t.totalLabel ?? String(t.total ?? 0)} total commitment`,
2329
- sublabel: `Base ${t.baseLabel ?? String(t.base ?? 0)} + Variations ${t.variationLabel ?? String(t.variation ?? 0)}`,
2345
+ value: `£${t.total ?? 0}M total commitment`,
2346
+ sublabel: `Base £${t.base ?? 0}M + Variations £${t.variation ?? 0}M`,
2330
2347
  color: o.color
2331
- }), c > 0 && y(n, o.x + 110 / 2, o.cy, 110 * .6, o.color, .12 * c), n.fillStyle = h(o.color, (.3 + c * .15) * s), n.strokeStyle = h(o.color, (.55 + c * .25) * s), n.lineWidth = 1, n.beginPath(), n.roundRect(o.x, o.y, 110 * s, o.h, 4), n.fill(), n.stroke(), s > .6 && o.h >= 24 && (n.globalAlpha = Math.min(1, (s - .6) / .4), n.font = f.font, n.fillStyle = c > 0 ? o.color : h(u.t2, .9), n.textAlign = "center", n.textBaseline = "middle", n.fillText(t.abbreviation ?? t.name.slice(0, 6), o.x + 110 / 2, o.h >= 36 ? o.cy - 5 : o.cy), o.h >= 36 && (n.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = h(u.t3, .8), n.fillText(t.totalLabel ?? String(t.total ?? 0), o.x + 110 / 2, o.cy + 7)), n.globalAlpha = 1, n.textBaseline = "alphabetic");
2348
+ }), c > 0 && y(n, o.x + 110 / 2, o.cy, 110 * .6, o.color, .12 * c), n.fillStyle = h(o.color, (.3 + c * .15) * s), n.strokeStyle = h(o.color, (.55 + c * .25) * s), n.lineWidth = 1, n.beginPath(), n.roundRect(o.x, o.y, 110 * s, o.h, 4), n.fill(), n.stroke(), s > .6 && o.h >= 24 && (n.globalAlpha = Math.min(1, (s - .6) / .4), n.font = f.font, n.fillStyle = c > 0 ? o.color : h(u.t2, .9), n.textAlign = "center", n.textBaseline = "middle", n.fillText(t.abbreviation ?? t.name.slice(0, 6), o.x + 110 / 2, o.h >= 36 ? o.cy - 5 : o.cy), o.h >= 36 && (n.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = h(u.t3, .8), n.fillText(`£${t.total ?? 0}M`, o.x + 110 / 2, o.cy + 7)), n.globalAlpha = 1, n.textBaseline = "alphabetic");
2332
2349
  }), r > .2) {
2333
2350
  let e = Math.min(1, (r - .2) / .4);
2334
2351
  y(n, 420, O.cy, 30, u.blue, .1 * e), n.fillStyle = h(u.blue, .3 * e), n.strokeStyle = h(u.blue, .5 * e), n.lineWidth = 1, n.beginPath(), n.roundRect(O.x, O.y, 110, O.h * e, 4), n.fill(), n.stroke(), n.globalAlpha = e, n.textBaseline = "middle", n.font = f.font, n.fillStyle = u.blue, n.textAlign = "center", n.fillText("Base Value", 420, O.cy - 6), n.font = p.font, n.fillStyle = p.color, n.fillText(`£${a}M`, 420, O.cy + 8), n.globalAlpha = 1, n.textBaseline = "alphabetic", y(n, 420, k.cy, 24, u.amber, .1 * e), n.fillStyle = h(u.amber, .22 * e), n.strokeStyle = h(u.amber, .4 * e), n.beginPath(), n.roundRect(k.x, k.y, 110, k.h * e, 4), n.fill(), n.stroke(), n.globalAlpha = e, n.textBaseline = "middle", n.font = f.font, n.fillStyle = u.amber, n.textAlign = "center", n.fillText("Variations", 420, k.cy - 4), n.font = p.font, n.fillStyle = p.color, n.fillText(`£${s}M`, 420, k.cy + 8), n.globalAlpha = 1, n.textBaseline = "alphabetic";
@@ -2344,33 +2361,33 @@ function Pt({ items: e = [], "data-testid": t }) {
2344
2361
  "data-testid": t,
2345
2362
  style: {
2346
2363
  position: "relative",
2347
- width: Mt,
2348
- height: Nt
2364
+ width: Rt,
2365
+ height: zt
2349
2366
  },
2350
2367
  children: [/* @__PURE__ */ s("canvas", {
2351
2368
  ref: r,
2352
2369
  role: "img",
2353
2370
  "aria-label": "Weekly report flow — base value and variations per contractor flowing to total commitment",
2354
2371
  style: {
2355
- width: Mt,
2356
- height: Nt,
2372
+ width: Rt,
2373
+ height: zt,
2357
2374
  display: "block"
2358
2375
  }
2359
2376
  }), /* @__PURE__ */ s(C, {
2360
2377
  ...m,
2361
- parentW: Mt,
2362
- parentH: Nt
2378
+ parentW: Rt,
2379
+ parentH: zt
2363
2380
  })]
2364
2381
  });
2365
2382
  }
2366
- function Ft(e, t, n, r, i, a, o, s) {
2383
+ function Vt(e, t, n, r, i, a, o, s) {
2367
2384
  let c = (t + r) / 2;
2368
2385
  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 = h(o, s), e.fill();
2369
2386
  }
2370
2387
  //#endregion
2371
2388
  //#region src/components/visualizationRenderer/VisualizationRenderer.tsx
2372
- function It({ config: e, className: t }) {
2373
- return e.type === "line" ? /* @__PURE__ */ s(Fe, {
2389
+ function Ht({ config: e, className: t }) {
2390
+ return e.type === "line" ? /* @__PURE__ */ s(Le, {
2374
2391
  rows: e.rows,
2375
2392
  className: t
2376
2393
  }) : e.type === "area" ? /* @__PURE__ */ s(te, {
@@ -2379,78 +2396,77 @@ function It({ config: e, className: t }) {
2379
2396
  }) : e.type === "bar" ? /* @__PURE__ */ s(ie, {
2380
2397
  rows: e.rows,
2381
2398
  className: t
2382
- }) : e.type === "pie" ? /* @__PURE__ */ s(qe, {
2399
+ }) : e.type === "pie" ? /* @__PURE__ */ s(Ye, {
2383
2400
  rows: e.rows,
2384
2401
  variant: "pie",
2385
2402
  className: t
2386
- }) : e.type === "donut" ? /* @__PURE__ */ s(qe, {
2403
+ }) : e.type === "donut" ? /* @__PURE__ */ s(Ye, {
2387
2404
  rows: e.rows,
2388
2405
  variant: "donut",
2389
2406
  className: t
2390
- }) : e.type === "sankey" ? /* @__PURE__ */ s(it, {
2407
+ }) : e.type === "sankey" ? /* @__PURE__ */ s(ot, {
2391
2408
  rows: e.rows,
2392
2409
  className: t
2393
- }) : e.type === "flow" ? /* @__PURE__ */ s(rt, {
2410
+ }) : e.type === "flow" ? /* @__PURE__ */ s(at, {
2394
2411
  selectedEntity: e.selectedEntity,
2395
2412
  className: t
2396
- }) : e.type === "trend" ? /* @__PURE__ */ s(wt, {
2413
+ }) : e.type === "trend" ? /* @__PURE__ */ s(At, {
2397
2414
  points: e.points,
2398
2415
  className: t
2399
- }) : e.type === "mini-bars" ? /* @__PURE__ */ s(Re, {
2416
+ }) : e.type === "mini-bars" ? /* @__PURE__ */ s(Be, {
2400
2417
  rows: e.rows,
2401
2418
  className: t
2402
- }) : e.type === "stacked-horizontal-bar-chart" ? /* @__PURE__ */ s(Oe, { data: e.data }) : e.type === "multi-metric-constellation-chart" ? /* @__PURE__ */ s(Se, { items: e.items }) : e.type === "progress-race-chart" ? /* @__PURE__ */ s(de, { items: e.items }) : e.type === "hub-and-spoke-radial-chart" ? /* @__PURE__ */ s(St, {
2419
+ }) : e.type === "stacked-horizontal-bar-chart" ? /* @__PURE__ */ s(je, { data: e.data }) : e.type === "multi-metric-constellation-chart" ? /* @__PURE__ */ s(Ce, { items: e.items }) : e.type === "progress-race-chart" ? /* @__PURE__ */ s(fe, { items: e.items }) : e.type === "hub-and-spoke-radial-chart" ? /* @__PURE__ */ s(Ot, {
2403
2420
  segments: e.segments,
2404
2421
  title: e.title
2405
- }) : e.type === "dot-matrix-chart" ? /* @__PURE__ */ s(Pe, { items: e.items }) : e.type === "ranked-card-leaderboard" ? /* @__PURE__ */ s(Ne, { items: e.items }) : e.type === "proportional-band-chart" ? /* @__PURE__ */ s(bt, { severities: e.severities }) : e.type === "radial-fan-tree-chart" ? /* @__PURE__ */ s(Ue, {
2422
+ }) : e.type === "dot-matrix-chart" ? /* @__PURE__ */ s(Ie, { items: e.items }) : e.type === "ranked-card-leaderboard" ? /* @__PURE__ */ s(Fe, { items: e.items }) : e.type === "proportional-band-chart" ? /* @__PURE__ */ s(Et, { severities: e.severities }) : e.type === "radial-fan-tree-chart" ? /* @__PURE__ */ s(Ge, {
2406
2423
  total: e.total,
2407
- totalLabel: e.totalLabel,
2408
2424
  items: e.items
2409
- }) : e.type === "semi-circular-gauge-chart" ? /* @__PURE__ */ s(me, {
2425
+ }) : e.type === "semi-circular-gauge-chart" ? /* @__PURE__ */ s(he, {
2410
2426
  value: e.value,
2411
2427
  confirmed: e.confirmed,
2412
2428
  total: e.total
2413
- }) : e.type === "segmented-split-bar-chart" ? /* @__PURE__ */ s(jt, { items: e.items }) : e.type === "balance-scale-chart" ? /* @__PURE__ */ s(st, {
2429
+ }) : e.type === "segmented-split-bar-chart" ? /* @__PURE__ */ s(Lt, { items: e.items }) : e.type === "balance-scale-chart" ? /* @__PURE__ */ s(lt, {
2414
2430
  left: e.left,
2415
2431
  right: e.right
2416
- }) : e.type === "area-line-chart" ? /* @__PURE__ */ s(lt, { points: e.points }) : e.type === "trend-view" ? /* @__PURE__ */ s(gt, { points: e.points }) : e.type === "weekly-flow" ? /* @__PURE__ */ s(Pt, { items: e.items }) : /* @__PURE__ */ s("div", {
2432
+ }) : e.type === "area-line-chart" ? /* @__PURE__ */ s(dt, { points: e.points }) : e.type === "trend-view" ? /* @__PURE__ */ s(St, { points: e.points }) : e.type === "weekly-flow" ? /* @__PURE__ */ s(Bt, { items: e.items }) : /* @__PURE__ */ s("div", {
2417
2433
  className: "viz-empty",
2418
2434
  children: "Visualization unavailable"
2419
2435
  });
2420
2436
  }
2421
2437
  //#endregion
2422
2438
  //#region src/utils/mounts.tsx
2423
- var Lt = [];
2424
- function Rt(e) {
2439
+ var Ut = [];
2440
+ function Wt(e) {
2425
2441
  try {
2426
2442
  return JSON.parse(decodeURIComponent(e));
2427
2443
  } catch {
2428
2444
  return null;
2429
2445
  }
2430
2446
  }
2431
- function zt() {
2432
- for (; Lt.length;) {
2433
- let e = Lt.pop();
2447
+ function Gt() {
2448
+ for (; Ut.length;) {
2449
+ let e = Ut.pop();
2434
2450
  e && e.unmount();
2435
2451
  }
2436
2452
  }
2437
- function Bt() {
2438
- zt(), document.querySelectorAll("[data-d3-viz]").forEach((t) => {
2453
+ function Kt() {
2454
+ Gt(), document.querySelectorAll("[data-d3-viz]").forEach((t) => {
2439
2455
  let n = t.dataset.d3Viz;
2440
2456
  if (!n) return;
2441
- let r = Rt(n);
2457
+ let r = Wt(n);
2442
2458
  if (!r) return;
2443
2459
  let i = e(t);
2444
- Lt.push(i), i.render(/* @__PURE__ */ s(It, { config: r }));
2460
+ Ut.push(i), i.render(/* @__PURE__ */ s(Ht, { config: r }));
2445
2461
  });
2446
2462
  }
2447
- function Vt(e) {
2463
+ function qt(e) {
2448
2464
  return encodeURIComponent(JSON.stringify(e));
2449
2465
  }
2450
2466
  //#endregion
2451
2467
  //#region src/components/donutChart/DonutChart.tsx
2452
- function Ht({ rows: e = [], className: t, colors: n }) {
2453
- return /* @__PURE__ */ s(qe, {
2468
+ function Jt({ rows: e = [], className: t, colors: n }) {
2469
+ return /* @__PURE__ */ s(Ye, {
2454
2470
  rows: e,
2455
2471
  variant: "donut",
2456
2472
  className: t,
@@ -2459,7 +2475,7 @@ function Ht({ rows: e = [], className: t, colors: n }) {
2459
2475
  }
2460
2476
  //#endregion
2461
2477
  //#region src/components/keyHighlights/KeyHighlights.tsx
2462
- var Z = {
2478
+ var Q = {
2463
2479
  bg: "transparent",
2464
2480
  border: "transparent",
2465
2481
  t1: u.t1,
@@ -2469,20 +2485,20 @@ var Z = {
2469
2485
  red: u.red,
2470
2486
  amber: u.amber,
2471
2487
  green: u.green
2472
- }, Q = "'Satoshi Variable', 'DM Sans', sans-serif", Ut = {
2488
+ }, $ = "'Satoshi Variable', 'DM Sans', sans-serif", Yt = {
2473
2489
  color: "#F7F7F7",
2474
- fontFamily: Q,
2490
+ fontFamily: $,
2475
2491
  fontSize: 24,
2476
2492
  fontWeight: 500,
2477
2493
  lineHeight: "32px"
2478
- }, $ = {
2494
+ }, Xt = {
2479
2495
  color: "#C2C2C2",
2480
- fontFamily: Q,
2496
+ fontFamily: $,
2481
2497
  fontSize: 18,
2482
2498
  fontWeight: 400,
2483
2499
  lineHeight: "20px"
2484
2500
  };
2485
- function Wt({ chips: e = [] }) {
2501
+ function Zt({ chips: e = [] }) {
2486
2502
  return /* @__PURE__ */ s("div", {
2487
2503
  style: {
2488
2504
  display: "flex",
@@ -2497,20 +2513,20 @@ function Wt({ chips: e = [] }) {
2497
2513
  alignItems: "baseline",
2498
2514
  gap: 8,
2499
2515
  padding: "8px 12px",
2500
- background: Z.bg,
2501
- border: `1px solid ${Z.border}`,
2516
+ background: Q.bg,
2517
+ border: `1px solid ${Q.border}`,
2502
2518
  borderRadius: 5,
2503
2519
  boxSizing: "border-box"
2504
2520
  },
2505
2521
  children: [/* @__PURE__ */ s("span", {
2506
2522
  style: {
2507
- ...Ut,
2508
- color: e.color ?? Z.t1
2523
+ ...Yt,
2524
+ color: e.color ?? Q.t1
2509
2525
  },
2510
2526
  children: e.value
2511
2527
  }), /* @__PURE__ */ s("span", {
2512
2528
  style: {
2513
- ...$,
2529
+ ...Xt,
2514
2530
  flex: 1
2515
2531
  },
2516
2532
  children: e.label
@@ -2518,7 +2534,7 @@ function Wt({ chips: e = [] }) {
2518
2534
  }, t))
2519
2535
  });
2520
2536
  }
2521
- function Gt({ items: e = [] }) {
2537
+ function Qt({ items: e = [] }) {
2522
2538
  return /* @__PURE__ */ s("div", {
2523
2539
  style: {
2524
2540
  display: "flex",
@@ -2535,24 +2551,24 @@ function Gt({ items: e = [] }) {
2535
2551
  padding: 24,
2536
2552
  gap: 8,
2537
2553
  flexShrink: 0,
2538
- border: `1px solid ${Z.border}`,
2539
- background: Z.bg,
2554
+ border: `1px solid ${Q.border}`,
2555
+ background: Q.bg,
2540
2556
  boxSizing: "border-box"
2541
2557
  },
2542
2558
  children: [/* @__PURE__ */ s("div", {
2543
2559
  style: {
2544
- ...Ut,
2545
- color: e.color ?? Z.t1
2560
+ ...Yt,
2561
+ color: e.color ?? Q.t1
2546
2562
  },
2547
2563
  children: e.value
2548
2564
  }), /* @__PURE__ */ s("div", {
2549
- style: { ...$ },
2565
+ style: { ...Xt },
2550
2566
  children: e.label
2551
2567
  })]
2552
2568
  }, t))
2553
2569
  });
2554
2570
  }
2555
- function Kt({ items: e = [] }) {
2571
+ function $t({ items: e = [] }) {
2556
2572
  return /* @__PURE__ */ s("div", {
2557
2573
  style: {
2558
2574
  display: "flex",
@@ -2565,28 +2581,28 @@ function Kt({ items: e = [] }) {
2565
2581
  alignItems: "center",
2566
2582
  gap: 12,
2567
2583
  padding: "9px 14px",
2568
- background: Z.bg,
2569
- border: `1px solid ${Z.border}`
2584
+ background: Q.bg,
2585
+ border: `1px solid ${Q.border}`
2570
2586
  },
2571
2587
  children: [
2572
2588
  /* @__PURE__ */ s("span", {
2573
2589
  style: {
2574
2590
  fontSize: 18,
2575
2591
  fontWeight: 500,
2576
- color: e.color ?? Z.t2,
2577
- background: (e.color ?? Z.t2) + "22",
2592
+ color: e.color ?? Q.t2,
2593
+ background: (e.color ?? Q.t2) + "22",
2578
2594
  padding: "2px 8px",
2579
2595
  borderRadius: 4,
2580
- fontFamily: Q,
2596
+ fontFamily: $,
2581
2597
  flexShrink: 0
2582
2598
  },
2583
2599
  children: e.name
2584
2600
  }),
2585
2601
  /* @__PURE__ */ s("span", {
2586
2602
  style: {
2587
- ...Ut,
2603
+ ...Yt,
2588
2604
  fontSize: 18,
2589
- color: e.color ?? Z.t1,
2605
+ color: e.color ?? Q.t1,
2590
2606
  minWidth: 70,
2591
2607
  flexShrink: 0
2592
2608
  },
@@ -2594,7 +2610,7 @@ function Kt({ items: e = [] }) {
2594
2610
  }),
2595
2611
  /* @__PURE__ */ s("span", {
2596
2612
  style: {
2597
- ...$,
2613
+ ...Xt,
2598
2614
  flex: 1
2599
2615
  },
2600
2616
  children: e.kpiLabel
@@ -2603,7 +2619,7 @@ function Kt({ items: e = [] }) {
2603
2619
  }, t))
2604
2620
  });
2605
2621
  }
2606
- function qt({ items: e = [] }) {
2622
+ function en({ items: e = [] }) {
2607
2623
  return /* @__PURE__ */ s("div", {
2608
2624
  style: {
2609
2625
  display: "flex",
@@ -2620,28 +2636,28 @@ function qt({ items: e = [] }) {
2620
2636
  padding: 24,
2621
2637
  gap: 8,
2622
2638
  flexShrink: 0,
2623
- background: Z.bg,
2639
+ background: Q.bg,
2624
2640
  boxSizing: "border-box"
2625
2641
  },
2626
2642
  children: [/* @__PURE__ */ s("div", {
2627
2643
  style: {
2628
- ...Ut,
2629
- color: e.color ?? Z.t1
2644
+ ...Yt,
2645
+ color: e.color ?? Q.t1
2630
2646
  },
2631
2647
  children: e.value
2632
2648
  }), /* @__PURE__ */ s("div", {
2633
- style: { ...$ },
2649
+ style: { ...Xt },
2634
2650
  children: e.label
2635
2651
  })]
2636
2652
  }, t))
2637
2653
  });
2638
2654
  }
2639
- var Jt = {
2640
- red: Z.red,
2641
- amber: Z.amber,
2642
- green: Z.green
2655
+ var tn = {
2656
+ red: Q.red,
2657
+ amber: Q.amber,
2658
+ green: Q.green
2643
2659
  };
2644
- function Yt({ items: e = [] }) {
2660
+ function nn({ items: e = [] }) {
2645
2661
  return /* @__PURE__ */ s("div", {
2646
2662
  style: {
2647
2663
  display: "flex",
@@ -2649,15 +2665,15 @@ function Yt({ items: e = [] }) {
2649
2665
  gap: 5
2650
2666
  },
2651
2667
  children: e.map((e, t) => {
2652
- let n = Jt[e.severity];
2668
+ let n = tn[e.severity];
2653
2669
  return /* @__PURE__ */ c("div", {
2654
2670
  style: {
2655
2671
  display: "flex",
2656
2672
  alignItems: "flex-start",
2657
2673
  gap: 10,
2658
2674
  padding: "10px 14px",
2659
- background: Z.bg,
2660
- border: `1px solid ${Z.border}`
2675
+ background: Q.bg,
2676
+ border: `1px solid ${Q.border}`
2661
2677
  },
2662
2678
  children: [/* @__PURE__ */ s("span", { style: {
2663
2679
  width: 7,
@@ -2667,14 +2683,14 @@ function Yt({ items: e = [] }) {
2667
2683
  flexShrink: 0,
2668
2684
  marginTop: 5
2669
2685
  } }), /* @__PURE__ */ s("span", {
2670
- style: { ...$ },
2686
+ style: { ...Xt },
2671
2687
  children: e.text
2672
2688
  })]
2673
2689
  }, t);
2674
2690
  })
2675
2691
  });
2676
2692
  }
2677
- function Xt({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2693
+ function rn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2678
2694
  let a = t - e;
2679
2695
  return /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ c("div", {
2680
2696
  style: {
@@ -2698,8 +2714,8 @@ function Xt({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2698
2714
  top: 43,
2699
2715
  left: 0,
2700
2716
  fontSize: 16,
2701
- color: Z.t4,
2702
- fontFamily: Q
2717
+ color: Q.t4,
2718
+ fontFamily: $
2703
2719
  },
2704
2720
  children: [e, n]
2705
2721
  }),
@@ -2709,8 +2725,8 @@ function Xt({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2709
2725
  top: 43,
2710
2726
  right: 0,
2711
2727
  fontSize: 16,
2712
- color: Z.t4,
2713
- fontFamily: Q
2728
+ color: Q.t4,
2729
+ fontFamily: $
2714
2730
  },
2715
2731
  children: [t, n]
2716
2732
  }),
@@ -2733,7 +2749,7 @@ function Xt({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2733
2749
  style: {
2734
2750
  fontSize: 18,
2735
2751
  color: o,
2736
- fontFamily: Q,
2752
+ fontFamily: $,
2737
2753
  whiteSpace: "nowrap"
2738
2754
  },
2739
2755
  children: t.name
@@ -2742,7 +2758,7 @@ function Xt({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2742
2758
  fontSize: 18,
2743
2759
  fontWeight: 500,
2744
2760
  color: o,
2745
- fontFamily: Q,
2761
+ fontFamily: $,
2746
2762
  whiteSpace: "nowrap"
2747
2763
  },
2748
2764
  children: [t.val, n]
@@ -2765,7 +2781,7 @@ function Xt({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2765
2781
  style: {
2766
2782
  fontSize: 18,
2767
2783
  color: o,
2768
- fontFamily: Q,
2784
+ fontFamily: $,
2769
2785
  whiteSpace: "nowrap"
2770
2786
  },
2771
2787
  children: t.name
@@ -2774,7 +2790,7 @@ function Xt({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2774
2790
  fontSize: 18,
2775
2791
  fontWeight: 500,
2776
2792
  color: o,
2777
- fontFamily: Q,
2793
+ fontFamily: $,
2778
2794
  whiteSpace: "nowrap"
2779
2795
  },
2780
2796
  children: [t.val, n]
@@ -2784,9 +2800,9 @@ function Xt({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2784
2800
  }, r);
2785
2801
  })
2786
2802
  ]
2787
- }), i && i.length > 0 && /* @__PURE__ */ s(Wt, { chips: i })] });
2803
+ }), i && i.length > 0 && /* @__PURE__ */ s(Zt, { chips: i })] });
2788
2804
  }
2789
- function Zt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i, rightLabel: a, rightValue: o, rightColor: l, chips: d }) {
2805
+ function an({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i, rightLabel: a, rightValue: o, rightColor: l, chips: d }) {
2790
2806
  let f = r ?? u.blue, p = l ?? u.blue;
2791
2807
  return /* @__PURE__ */ c("div", { children: [
2792
2808
  /* @__PURE__ */ c("div", {
@@ -2812,7 +2828,7 @@ function Zt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2812
2828
  fontSize: 18,
2813
2829
  fontWeight: 500,
2814
2830
  color: f,
2815
- fontFamily: Q
2831
+ fontFamily: $
2816
2832
  },
2817
2833
  children: n
2818
2834
  })
@@ -2835,7 +2851,7 @@ function Zt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2835
2851
  fontSize: 18,
2836
2852
  fontWeight: 500,
2837
2853
  color: p,
2838
- fontFamily: Q
2854
+ fontFamily: $
2839
2855
  },
2840
2856
  children: o
2841
2857
  })
@@ -2853,7 +2869,7 @@ function Zt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2853
2869
  style: {
2854
2870
  fontSize: 18,
2855
2871
  color: f,
2856
- fontFamily: Q
2872
+ fontFamily: $
2857
2873
  },
2858
2874
  children: [
2859
2875
  e,
@@ -2870,7 +2886,7 @@ function Zt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2870
2886
  style: {
2871
2887
  fontSize: 18,
2872
2888
  color: p,
2873
- fontFamily: Q
2889
+ fontFamily: $
2874
2890
  },
2875
2891
  children: [
2876
2892
  i,
@@ -2880,10 +2896,10 @@ function Zt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2880
2896
  })
2881
2897
  })]
2882
2898
  }),
2883
- d && d.length > 0 && /* @__PURE__ */ s(Wt, { chips: d })
2899
+ d && d.length > 0 && /* @__PURE__ */ s(Zt, { chips: d })
2884
2900
  ] });
2885
2901
  }
2886
- function Qt({ pct: e, label: t, color: n, chips: r }) {
2902
+ function on({ pct: e, label: t, color: n, chips: r }) {
2887
2903
  let i = n ?? u.blue, a = 2 * Math.PI * 30, o = a * (1 - e / 100);
2888
2904
  return /* @__PURE__ */ c("div", {
2889
2905
  style: {
@@ -2933,7 +2949,7 @@ function Qt({ pct: e, label: t, color: n, chips: r }) {
2933
2949
  fontSize: 18,
2934
2950
  fontWeight: 500,
2935
2951
  color: i,
2936
- fontFamily: Q
2952
+ fontFamily: $
2937
2953
  },
2938
2954
  children: [e, "%"]
2939
2955
  })
@@ -2942,7 +2958,7 @@ function Qt({ pct: e, label: t, color: n, chips: r }) {
2942
2958
  style: { flex: 1 },
2943
2959
  children: [/* @__PURE__ */ s("div", {
2944
2960
  style: {
2945
- ...$,
2961
+ ...Xt,
2946
2962
  marginBottom: 10
2947
2963
  },
2948
2964
  children: t
@@ -2958,18 +2974,18 @@ function Qt({ pct: e, label: t, color: n, chips: r }) {
2958
2974
  alignItems: "baseline",
2959
2975
  gap: 8,
2960
2976
  padding: "7px 10px",
2961
- background: Z.bg,
2962
- border: `1px solid ${Z.border}`,
2977
+ background: Q.bg,
2978
+ border: `1px solid ${Q.border}`,
2963
2979
  borderRadius: 5
2964
2980
  },
2965
2981
  children: [/* @__PURE__ */ s("span", {
2966
2982
  style: {
2967
- ...Ut,
2968
- color: e.color ?? Z.t1
2983
+ ...Yt,
2984
+ color: e.color ?? Q.t1
2969
2985
  },
2970
2986
  children: e.value
2971
2987
  }), /* @__PURE__ */ s("span", {
2972
- style: { ...$ },
2988
+ style: { ...Xt },
2973
2989
  children: e.label
2974
2990
  })]
2975
2991
  }, t))
@@ -2977,16 +2993,16 @@ function Qt({ pct: e, label: t, color: n, chips: r }) {
2977
2993
  })]
2978
2994
  });
2979
2995
  }
2980
- var $t = {
2996
+ var sn = {
2981
2997
  green: "#34D39918",
2982
2998
  amber: "#FBBF2418",
2983
2999
  red: "#F0606018"
2984
- }, en = {
3000
+ }, cn = {
2985
3001
  green: "#34D399",
2986
3002
  amber: "#FBBF24",
2987
3003
  red: "#F06060"
2988
3004
  };
2989
- function tn({ items: e = [] }) {
3005
+ function ln({ items: e = [] }) {
2990
3006
  return /* @__PURE__ */ s("div", {
2991
3007
  style: {
2992
3008
  display: "flex",
@@ -2999,19 +3015,19 @@ function tn({ items: e = [] }) {
2999
3015
  alignItems: "center",
3000
3016
  gap: 10,
3001
3017
  padding: "8px 12px",
3002
- background: Z.bg,
3003
- border: `1px solid ${Z.border}`
3018
+ background: Q.bg,
3019
+ border: `1px solid ${Q.border}`
3004
3020
  },
3005
3021
  children: [
3006
3022
  /* @__PURE__ */ s("span", {
3007
3023
  style: {
3008
3024
  fontSize: 18,
3009
3025
  fontWeight: 500,
3010
- color: e.color ?? Z.t2,
3011
- background: (e.color ?? Z.t2) + "1A",
3026
+ color: e.color ?? Q.t2,
3027
+ background: (e.color ?? Q.t2) + "1A",
3012
3028
  padding: "2px 7px",
3013
3029
  borderRadius: 4,
3014
- fontFamily: Q,
3030
+ fontFamily: $,
3015
3031
  flexShrink: 0,
3016
3032
  minWidth: 62,
3017
3033
  textAlign: "center"
@@ -3029,7 +3045,7 @@ function tn({ items: e = [] }) {
3029
3045
  children: /* @__PURE__ */ s("div", { style: {
3030
3046
  height: "100%",
3031
3047
  width: `${e.pct}%`,
3032
- background: e.color ?? Z.t2,
3048
+ background: e.color ?? Q.t2,
3033
3049
  borderRadius: 2,
3034
3050
  opacity: .75
3035
3051
  } })
@@ -3038,8 +3054,8 @@ function tn({ items: e = [] }) {
3038
3054
  style: {
3039
3055
  fontSize: 18,
3040
3056
  fontWeight: 500,
3041
- color: e.color ?? Z.t1,
3042
- fontFamily: Q,
3057
+ color: e.color ?? Q.t1,
3058
+ fontFamily: $,
3043
3059
  flexShrink: 0,
3044
3060
  minWidth: 52,
3045
3061
  textAlign: "right"
@@ -3050,11 +3066,11 @@ function tn({ items: e = [] }) {
3050
3066
  style: {
3051
3067
  fontSize: 18,
3052
3068
  fontWeight: 500,
3053
- color: en[e.badgeSeverity],
3054
- background: $t[e.badgeSeverity],
3069
+ color: cn[e.badgeSeverity],
3070
+ background: sn[e.badgeSeverity],
3055
3071
  padding: "2px 7px",
3056
3072
  borderRadius: 4,
3057
- fontFamily: Q,
3073
+ fontFamily: $,
3058
3074
  flexShrink: 0,
3059
3075
  minWidth: 72,
3060
3076
  textAlign: "center"
@@ -3063,7 +3079,7 @@ function tn({ items: e = [] }) {
3063
3079
  }),
3064
3080
  e.sublabel && /* @__PURE__ */ s("span", {
3065
3081
  style: {
3066
- ...$,
3082
+ ...Xt,
3067
3083
  flexShrink: 0,
3068
3084
  minWidth: 80,
3069
3085
  textAlign: "right"
@@ -3074,12 +3090,12 @@ function tn({ items: e = [] }) {
3074
3090
  }, t))
3075
3091
  });
3076
3092
  }
3077
- var nn = {
3078
- red: Z.red,
3079
- amber: Z.amber,
3080
- green: Z.green
3093
+ var un = {
3094
+ red: Q.red,
3095
+ amber: Q.amber,
3096
+ green: Q.green
3081
3097
  };
3082
- function rn({ items: e = [] }) {
3098
+ function dn({ items: e = [] }) {
3083
3099
  return /* @__PURE__ */ s("div", {
3084
3100
  style: {
3085
3101
  display: "flex",
@@ -3087,7 +3103,7 @@ function rn({ items: e = [] }) {
3087
3103
  gap: 5
3088
3104
  },
3089
3105
  children: e.map((e, t) => {
3090
- let n = nn[e.severity];
3106
+ let n = un[e.severity];
3091
3107
  return /* @__PURE__ */ c("div", {
3092
3108
  style: {
3093
3109
  display: "flex",
@@ -3109,7 +3125,7 @@ function rn({ items: e = [] }) {
3109
3125
  /* @__PURE__ */ s("span", {
3110
3126
  style: {
3111
3127
  flex: 1,
3112
- ...$
3128
+ ...Xt
3113
3129
  },
3114
3130
  children: e.text
3115
3131
  }),
@@ -3121,14 +3137,14 @@ function rn({ items: e = [] }) {
3121
3137
  background: n + "20",
3122
3138
  padding: "2px 7px",
3123
3139
  borderRadius: 4,
3124
- fontFamily: Q,
3140
+ fontFamily: $,
3125
3141
  flexShrink: 0
3126
3142
  },
3127
3143
  children: e.tag
3128
3144
  }),
3129
3145
  /* @__PURE__ */ s("span", {
3130
3146
  style: {
3131
- ...$,
3147
+ ...Xt,
3132
3148
  flexShrink: 0,
3133
3149
  marginTop: 1
3134
3150
  },
@@ -3139,7 +3155,7 @@ function rn({ items: e = [] }) {
3139
3155
  })
3140
3156
  });
3141
3157
  }
3142
- function an({ columns: e = [], rows: t = [] }) {
3158
+ function fn({ columns: e = [], rows: t = [] }) {
3143
3159
  return /* @__PURE__ */ c("div", {
3144
3160
  style: {
3145
3161
  display: "flex",
@@ -3152,15 +3168,15 @@ function an({ columns: e = [], rows: t = [] }) {
3152
3168
  alignItems: "center",
3153
3169
  gap: 10,
3154
3170
  padding: "0 12px 6px",
3155
- borderBottom: `1px solid ${Z.border}`
3171
+ borderBottom: `1px solid ${Q.border}`
3156
3172
  },
3157
3173
  children: [/* @__PURE__ */ s("div", { style: { minWidth: 64 } }), e.map((e, t) => /* @__PURE__ */ s("div", {
3158
3174
  style: {
3159
3175
  flex: 1,
3160
3176
  fontSize: 18,
3161
3177
  fontWeight: 500,
3162
- color: Z.t2,
3163
- fontFamily: Q,
3178
+ color: Q.t2,
3179
+ fontFamily: $,
3164
3180
  textTransform: "uppercase",
3165
3181
  letterSpacing: .6
3166
3182
  },
@@ -3172,18 +3188,18 @@ function an({ columns: e = [], rows: t = [] }) {
3172
3188
  alignItems: "center",
3173
3189
  gap: 10,
3174
3190
  padding: "8px 12px",
3175
- background: Z.bg,
3176
- border: `1px solid ${Z.border}`
3191
+ background: Q.bg,
3192
+ border: `1px solid ${Q.border}`
3177
3193
  },
3178
3194
  children: [/* @__PURE__ */ s("span", {
3179
3195
  style: {
3180
3196
  fontSize: 18,
3181
3197
  fontWeight: 600,
3182
- color: Z.t2,
3183
- background: (e.color ?? Z.t4) + "1A",
3198
+ color: Q.t2,
3199
+ background: (e.color ?? Q.t4) + "1A",
3184
3200
  padding: "2px 8px",
3185
3201
  borderRadius: 4,
3186
- fontFamily: Q,
3202
+ fontFamily: $,
3187
3203
  flexShrink: 0,
3188
3204
  minWidth: 64,
3189
3205
  textAlign: "center"
@@ -3194,29 +3210,29 @@ function an({ columns: e = [], rows: t = [] }) {
3194
3210
  flex: 1,
3195
3211
  fontSize: 18,
3196
3212
  fontWeight: 500,
3197
- color: e.color ?? Z.t1,
3198
- fontFamily: Q
3213
+ color: e.color ?? Q.t1,
3214
+ fontFamily: $
3199
3215
  },
3200
3216
  children: t
3201
3217
  }, n))]
3202
3218
  }, t))]
3203
3219
  });
3204
3220
  }
3205
- function on({ block: e }) {
3221
+ function pn({ block: e }) {
3206
3222
  if (!e) return null;
3207
3223
  switch (e.type) {
3208
- case "stats": return /* @__PURE__ */ s(Gt, { items: e.items });
3209
- case "ranked": return /* @__PURE__ */ s(Kt, { items: e.items });
3210
- case "chips": return /* @__PURE__ */ s(qt, { items: e.items });
3211
- case "badges": return /* @__PURE__ */ s(Yt, { items: e.items });
3212
- case "dot-strip": return /* @__PURE__ */ s(Xt, {
3224
+ case "stats": return /* @__PURE__ */ s(Qt, { items: e.items });
3225
+ case "ranked": return /* @__PURE__ */ s($t, { items: e.items });
3226
+ case "chips": return /* @__PURE__ */ s(en, { items: e.items });
3227
+ case "badges": return /* @__PURE__ */ s(nn, { items: e.items });
3228
+ case "dot-strip": return /* @__PURE__ */ s(rn, {
3213
3229
  min: e.min,
3214
3230
  max: e.max,
3215
3231
  unit: e.unit,
3216
3232
  dots: e.dots,
3217
3233
  chips: e.chips
3218
3234
  });
3219
- case "proportion": return /* @__PURE__ */ s(Zt, {
3235
+ case "proportion": return /* @__PURE__ */ s(an, {
3220
3236
  leftPct: e.leftPct,
3221
3237
  leftLabel: e.leftLabel,
3222
3238
  leftValue: e.leftValue,
@@ -3227,15 +3243,15 @@ function on({ block: e }) {
3227
3243
  rightColor: e.rightColor,
3228
3244
  chips: e.chips
3229
3245
  });
3230
- case "ring": return /* @__PURE__ */ s(Qt, {
3246
+ case "ring": return /* @__PURE__ */ s(on, {
3231
3247
  pct: e.pct,
3232
3248
  label: e.label,
3233
3249
  color: e.color,
3234
3250
  chips: e.chips
3235
3251
  });
3236
- case "scorecard-rows": return /* @__PURE__ */ s(tn, { items: e.items });
3237
- case "flags-list": return /* @__PURE__ */ s(rn, { items: e.items });
3238
- case "comparison-rows": return /* @__PURE__ */ s(an, {
3252
+ case "scorecard-rows": return /* @__PURE__ */ s(ln, { items: e.items });
3253
+ case "flags-list": return /* @__PURE__ */ s(dn, { items: e.items });
3254
+ case "comparison-rows": return /* @__PURE__ */ s(fn, {
3239
3255
  columns: e.columns,
3240
3256
  rows: e.rows
3241
3257
  });
@@ -3244,14 +3260,14 @@ function on({ block: e }) {
3244
3260
  }
3245
3261
  //#endregion
3246
3262
  //#region src/components/keyHighlights/Takeaway.tsx
3247
- var sn = "'Satoshi Variable', 'DM Sans', sans-serif", cn = {
3263
+ var mn = "'Satoshi Variable', 'DM Sans', sans-serif", hn = {
3248
3264
  color: "#C2C2C2",
3249
- fontFamily: sn,
3265
+ fontFamily: mn,
3250
3266
  fontSize: 18,
3251
3267
  fontWeight: 400,
3252
3268
  lineHeight: "20px"
3253
3269
  };
3254
- function ln({ text: e }) {
3270
+ function gn({ text: e }) {
3255
3271
  return /* @__PURE__ */ c("div", {
3256
3272
  style: {
3257
3273
  padding: "8px 0px",
@@ -3264,16 +3280,16 @@ function ln({ text: e }) {
3264
3280
  fontSize: 18,
3265
3281
  fontWeight: 500,
3266
3282
  color: u.t1,
3267
- fontFamily: sn,
3283
+ fontFamily: mn,
3268
3284
  lineHeight: "20px",
3269
3285
  marginRight: 8
3270
3286
  },
3271
3287
  children: "Takeaway"
3272
3288
  }), /* @__PURE__ */ s("span", {
3273
- style: { ...cn },
3289
+ style: { ...hn },
3274
3290
  children: e
3275
3291
  })]
3276
3292
  });
3277
3293
  }
3278
3294
  //#endregion
3279
- export { te as AreaChart, ie as BarChart, l as ChartFrame, Ht as DonutChart, on as KeyHighlights, Fe as LineChart, Re as MiniBars, qe as PieChart, rt as ProcessSankey, it as RankingSankey, Ye as SankeySvg, ee as SeriesChart, ln as Takeaway, gt as Trend, wt as TrendChart, It as VisualizationRenderer, zt as cleanupVisualizationMounts, Bt as hydrateVisualizationMounts, Vt as serializeVisualizationConfig };
3295
+ export { te as AreaChart, ie as BarChart, l as ChartFrame, Jt as DonutChart, pn as KeyHighlights, Le as LineChart, Be as MiniBars, Ye as PieChart, at as ProcessSankey, ot as RankingSankey, Ze as SankeySvg, ee as SeriesChart, gn as Takeaway, St as Trend, At as TrendChart, Ht as VisualizationRenderer, Gt as cleanupVisualizationMounts, Kt as hydrateVisualizationMounts, qt as serializeVisualizationConfig };