@divami-artefacts/ai-design-system 1.0.3 → 1.0.5

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
@@ -11,20 +11,20 @@ function l({ children: e, className: t = "" }) {
11
11
  //#endregion
12
12
  //#region src/canvas/canvasUtils.ts
13
13
  var u = {
14
- bg: "#070B12",
14
+ bg: "#0C0E12",
15
15
  bgL: "#0C1420",
16
- sf: "#111B28",
17
- bd: "#1C2D42",
18
- blue: "#3B8BF6",
19
- cyan: "#22D3EE",
20
- orange: "#F0813A",
21
- red: "#F06060",
22
- green: "#34D399",
23
- purple: "#A78BFA",
24
- amber: "#FBBF24",
25
- t1: "#F1F5F9",
26
- t2: "#94A3B8",
27
- t3: "#64748B",
16
+ sf: "#13161B",
17
+ bd: "#22262F",
18
+ blue: "#2970FF",
19
+ cyan: "#36BFFA",
20
+ orange: "#EF6820",
21
+ red: "#D92D20",
22
+ green: "#16B364",
23
+ purple: "#7A5AF8",
24
+ amber: "#FAC515",
25
+ t1: "#F7F7F7",
26
+ t2: "#94979C",
27
+ t3: "#94979C",
28
28
  t4: "#334155"
29
29
  }, d = [
30
30
  u.blue,
@@ -33,15 +33,21 @@ var u = {
33
33
  u.purple,
34
34
  u.green,
35
35
  u.red
36
- ];
37
- function f(e, t = 1) {
36
+ ], f = {
37
+ font: "400 12px 'Satoshi Variable', 'DM Sans', sans-serif",
38
+ color: u.t2
39
+ }, p = {
40
+ font: "400 12px 'Satoshi Variable', 'DM Sans', sans-serif",
41
+ color: u.t2
42
+ };
43
+ function m(e, t = 1) {
38
44
  let n = e.replace("#", "");
39
45
  return `rgba(${parseInt(n.substring(0, 2), 16)},${parseInt(n.substring(2, 4), 16)},${parseInt(n.substring(4, 6), 16)},${t})`;
40
46
  }
41
- function p(e, t, n) {
47
+ function h(e, t, n) {
42
48
  return e + (t - e) * n;
43
49
  }
44
- function m(e, t, n) {
50
+ function g(e, t, n) {
45
51
  let r = (e) => {
46
52
  let t = e.replace("#", "");
47
53
  return [
@@ -51,34 +57,34 @@ function m(e, t, n) {
51
57
  ];
52
58
  }, [i, a, o] = r(e), [s, c, l] = r(t), u = (e) => Math.max(0, Math.min(255, Math.round(e)));
53
59
  return [
54
- u(p(i, s, n)),
55
- u(p(a, c, n)),
56
- u(p(o, l, n))
60
+ u(h(i, s, n)),
61
+ u(h(a, c, n)),
62
+ u(h(o, l, n))
57
63
  ].map((e) => e.toString(16).padStart(2, "0")).join("").replace(/^/, "#");
58
64
  }
59
- function h(e, t, n, r = 2) {
65
+ function _(e, t, n, r = 2) {
60
66
  e.width = t * r, e.height = n * r;
61
67
  let i = e.getContext("2d");
62
68
  return i.scale(r, r), i;
63
69
  }
64
- function g(e, t, n, r, i, a = .3) {
70
+ function v(e, t, n, r, i, a = .3) {
65
71
  let o = e.createRadialGradient(t, n, 0, t, n, r);
66
- o.addColorStop(0, f(i, a)), o.addColorStop(1, f(i, 0)), e.fillStyle = o, e.beginPath(), e.arc(t, n, r, 0, Math.PI * 2), e.fill();
72
+ o.addColorStop(0, m(i, a)), o.addColorStop(1, m(i, 0)), e.fillStyle = o, e.beginPath(), e.arc(t, n, r, 0, Math.PI * 2), e.fill();
67
73
  }
68
- function _(e, t, n, r, i = 50, a = f(u.blue, .05)) {
74
+ function y(e, t, n, r, i = 50, a = m(u.blue, .05)) {
69
75
  for (let o = 0; o < i; o++) e.beginPath(), e.arc((Math.sin(r * .001 + o * 23) * .5 + .5) * t, (Math.cos(r * 8e-4 + o * 37) * .5 + .5) * n, .6, 0, Math.PI * 2), e.fillStyle = a, e.fill();
70
76
  }
71
- function v(e, t, n, r, i = .015) {
77
+ function b(e, t, n, r, i = .015) {
72
78
  e.fillStyle = `rgba(0,0,0,${i})`;
73
79
  let a = r * .5 % 6;
74
80
  for (let r = a; r < n; r += 3) e.fillRect(0, r, t, 1);
75
81
  }
76
- function y(e, t, n, r, i = f(u.t1, .08)) {
82
+ function x(e, t, n, r, i = m(u.t1, .08)) {
77
83
  e.strokeStyle = i, e.lineWidth = 1, e.setLineDash([3, 3]), e.beginPath(), e.moveTo(t, n), e.lineTo(t, r), e.stroke(), e.setLineDash([]);
78
84
  }
79
85
  //#endregion
80
86
  //#region src/canvas/CanvasTooltip.tsx
81
- function b({ visible: e, x: t, y: n, content: i, parentW: o }) {
87
+ function S({ visible: e, x: t, y: n, content: i, parentW: o }) {
82
88
  let l = a(null);
83
89
  if (r(() => {
84
90
  let r = l.current;
@@ -107,38 +113,42 @@ function b({ visible: e, x: t, y: n, content: i, parentW: o }) {
107
113
  border: `1px solid ${u.bd}`,
108
114
  borderLeft: "2px solid var(--tooltip-accent)",
109
115
  borderRadius: 6,
110
- padding: "6px 10px",
116
+ padding: "8px 12px",
111
117
  opacity: 0,
112
118
  transition: "opacity 0.15s ease",
113
119
  zIndex: 20,
114
- fontFamily: "'JetBrains Mono', monospace"
120
+ fontFamily: "'Satoshi Variable', 'DM Sans', sans-serif"
115
121
  },
116
122
  children: [
117
123
  f && /* @__PURE__ */ s("div", {
118
124
  style: {
119
- fontFamily: "'DM Sans', sans-serif",
120
- fontSize: 10,
121
- color: u.t3,
122
- marginBottom: 2,
123
- whiteSpace: "nowrap"
125
+ fontSize: 12,
126
+ fontWeight: 400,
127
+ color: u.t2,
128
+ marginBottom: 3,
129
+ whiteSpace: "nowrap",
130
+ lineHeight: "18px"
124
131
  },
125
132
  children: f
126
133
  }),
127
134
  /* @__PURE__ */ s("div", {
128
135
  style: {
129
- fontSize: 11,
136
+ fontSize: 14,
137
+ fontWeight: 500,
130
138
  color: u.t1,
131
- fontWeight: 600,
132
- whiteSpace: "nowrap"
139
+ whiteSpace: "nowrap",
140
+ lineHeight: "20px"
133
141
  },
134
142
  children: p
135
143
  }),
136
144
  m && /* @__PURE__ */ s("div", {
137
145
  style: {
138
- fontSize: 9,
146
+ fontSize: 12,
147
+ fontWeight: 400,
139
148
  color: "var(--tooltip-accent)",
140
- marginTop: 2,
141
- whiteSpace: "nowrap"
149
+ marginTop: 3,
150
+ whiteSpace: "nowrap",
151
+ lineHeight: "18px"
142
152
  },
143
153
  children: m
144
154
  })
@@ -147,7 +157,7 @@ function b({ visible: e, x: t, y: n, content: i, parentW: o }) {
147
157
  }
148
158
  //#endregion
149
159
  //#region src/canvas/useCanvasInteraction.ts
150
- function x(e, { width: r, height: i, onClick: s, enabled: c = !0 }) {
160
+ function C(e, { width: r, height: i, onClick: s, enabled: c = !0 }) {
151
161
  let l = a({
152
162
  x: -1,
153
163
  y: -1,
@@ -219,14 +229,14 @@ function x(e, { width: r, height: i, onClick: s, enabled: c = !0 }) {
219
229
  hitZonesRef: d
220
230
  };
221
231
  }
222
- function S(e, t, n, r, i, a) {
232
+ function w(e, t, n, r, i, a) {
223
233
  e.push({
224
234
  id: t,
225
235
  data: a,
226
236
  test: (e, t) => (e - n) ** 2 + (t - r) ** 2 <= i * i
227
237
  });
228
238
  }
229
- function C(e, t, n, r, i, a, o) {
239
+ function T(e, t, n, r, i, a, o) {
230
240
  e.push({
231
241
  id: t,
232
242
  data: o,
@@ -235,14 +245,14 @@ function C(e, t, n, r, i, a, o) {
235
245
  }
236
246
  //#endregion
237
247
  //#region src/canvas/easing.ts
238
- var w = (e) => 1 - (1 - e) ** 3, T = (e) => 1 - (1 - e) ** 4, E = (e) => e === 1 ? 1 : 1 - 2 ** (-10 * e), D = (e) => {
248
+ var E = (e) => 1 - (1 - e) ** 3, D = (e) => 1 - (1 - e) ** 4, O = (e) => e === 1 ? 1 : 1 - 2 ** (-10 * e), k = (e) => {
239
249
  let t = 1.70158;
240
250
  return 1 + (t + 1) * (e - 1) ** 3 + t * (e - 1) ** 2;
241
- }, O = (e, t = .04, n = .001) => Math.sin(e * t) * Math.exp(-Math.min(e * n, 4)), k = (e, t, n, r = w) => {
251
+ }, A = (e, t = .04, n = .001) => Math.sin(e * t) * Math.exp(-Math.min(e * n, 4)), j = (e, t, n, r = E) => {
242
252
  let i = Math.min(.06, .5 / n), a = t * i, o = 1 - (n - 1) * i;
243
253
  return r(Math.max(0, Math.min((e - a) / o, 1)));
244
254
  };
245
- function A(e, t, n = .12) {
255
+ function M(e, t, n = .12) {
246
256
  e.forEach((r, i) => {
247
257
  let a = i === t ? 1 : 0, o = r + (a - r) * n;
248
258
  Math.abs(o - a) < .005 ? a === 0 ? e.delete(i) : e.set(i, 1) : e.set(i, o);
@@ -250,66 +260,66 @@ function A(e, t, n = .12) {
250
260
  }
251
261
  //#endregion
252
262
  //#region src/components/common/SeriesChart.tsx
253
- var j = 760, M = 250;
254
- function N({ rows: e = [], variant: t, className: r, colors: i }) {
255
- let o = a(null), d = a(/* @__PURE__ */ new Map()), p = a(0), { mouseRef: m, hoveredRef: _, tooltip: v, hitZonesRef: C } = x(o, {
256
- width: j,
257
- height: M
263
+ var ee = 760, N = 250;
264
+ function te({ rows: e = [], variant: t, className: r, colors: i }) {
265
+ let o = a(null), d = a(/* @__PURE__ */ new Map()), f = a(0), { mouseRef: p, hoveredRef: h, tooltip: g, hitZonesRef: y } = C(o, {
266
+ width: ee,
267
+ height: N
258
268
  });
259
269
  return n(() => {
260
270
  let n = o.current;
261
271
  if (!n) return;
262
- let r = h(n, j, M);
263
- p.current = 0;
264
- let a = i?.line ?? u.blue, s = i?.point ?? u.blue, c = i?.axisLine ?? u.bd, l = i?.areaFill ?? u.blue, v = {
272
+ let r = _(n, ee, N);
273
+ f.current = 0;
274
+ let a = i?.line ?? u.blue, s = i?.point ?? u.blue, c = i?.axisLine ?? u.bd, l = i?.areaFill ?? u.blue, g = {
265
275
  top: 24,
266
276
  right: 24,
267
277
  bottom: 44,
268
278
  left: 24
269
- }, b = j - v.left - v.right, x = M - v.top - v.bottom, w, T = () => {
270
- p.current++;
271
- let n = p.current;
272
- if (r.clearRect(0, 0, j, M), e.length < 2) {
273
- w = requestAnimationFrame(T);
279
+ }, b = ee - g.left - g.right, S = N - g.top - g.bottom, C, T = () => {
280
+ f.current++;
281
+ let n = f.current;
282
+ if (r.clearRect(0, 0, ee, N), e.length < 2) {
283
+ C = requestAnimationFrame(T);
274
284
  return;
275
285
  }
276
- let i = e.map((e) => e.pricing ?? 0), o = Math.max(100, ...i), h = (t) => v.left + t / (e.length - 1) * b, D = (e) => v.top + (1 - e / o) * x, k = E(Math.min(n / 48, 1)), N = Math.max(2, Math.floor(k * e.length));
277
- A(d.current, _.current), C.current = [], r.strokeStyle = f(u.bd, .2), r.lineWidth = .5;
286
+ let i = e.map((e) => e.pricing ?? 0), o = Math.max(100, ...i), _ = (t) => g.left + t / (e.length - 1) * b, E = (e) => g.top + (1 - e / o) * S, D = O(Math.min(n / 48, 1)), k = Math.max(2, Math.floor(D * e.length));
287
+ M(d.current, h.current), y.current = [], r.strokeStyle = m(u.bd, .2), r.lineWidth = .5;
278
288
  for (let e = 0; e <= 4; e++) {
279
- let t = v.top + e / 4 * x;
280
- r.beginPath(), r.moveTo(v.left, t), r.lineTo(v.left + b, t), r.stroke();
289
+ let t = g.top + e / 4 * S;
290
+ r.beginPath(), r.moveTo(g.left, t), r.lineTo(g.left + b, t), r.stroke();
281
291
  }
282
- if (r.strokeStyle = f(c, .4), r.lineWidth = 1, r.setLineDash([]), r.beginPath(), r.moveTo(v.left, D(0)), r.lineTo(v.left + b, D(0)), r.stroke(), m.current.over && _.current) {
283
- let e = parseInt(_.current.split("-")[1]);
284
- isNaN(e) || y(r, h(e), v.top, v.top + x);
292
+ if (r.strokeStyle = m(c, .4), r.lineWidth = 1, r.setLineDash([]), r.beginPath(), r.moveTo(g.left, E(0)), r.lineTo(g.left + b, E(0)), r.stroke(), p.current.over && h.current) {
293
+ let e = parseInt(h.current.split("-")[1]);
294
+ isNaN(e) || x(r, _(e), g.top, g.top + S);
285
295
  }
286
- if (t === "area" && N > 1) {
287
- let t = r.createLinearGradient(0, v.top, 0, v.top + x);
288
- t.addColorStop(0, f(l, .12)), t.addColorStop(1, f(l, 0)), r.fillStyle = t, r.beginPath(), r.moveTo(h(0), v.top + x);
289
- for (let t = 0; t < N; t++) r.lineTo(h(t), D(e[t].pricing ?? 0));
290
- r.lineTo(h(N - 1), v.top + x), r.closePath(), r.fill();
296
+ if (t === "area" && k > 1) {
297
+ let t = r.createLinearGradient(0, g.top, 0, g.top + S);
298
+ t.addColorStop(0, m(l, .12)), t.addColorStop(1, m(l, 0)), r.fillStyle = t, r.beginPath(), r.moveTo(_(0), g.top + S);
299
+ for (let t = 0; t < k; t++) r.lineTo(_(t), E(e[t].pricing ?? 0));
300
+ r.lineTo(_(k - 1), g.top + S), r.closePath(), r.fill();
291
301
  }
292
- if (N > 1) {
293
- r.strokeStyle = f(a, .85), r.lineWidth = 2, r.setLineDash([]), r.beginPath();
294
- for (let t = 0; t < N; t++) {
295
- let n = h(t), i = D(e[t].pricing ?? 0);
302
+ if (k > 1) {
303
+ r.strokeStyle = m(a, .85), r.lineWidth = 2, r.setLineDash([]), r.beginPath();
304
+ for (let t = 0; t < k; t++) {
305
+ let n = _(t), i = E(e[t].pricing ?? 0);
296
306
  t === 0 ? r.moveTo(n, i) : r.lineTo(n, i);
297
307
  }
298
308
  r.stroke();
299
309
  }
300
- for (let i = 0; i < N; i++) {
301
- let a = h(i), o = D(e[i].pricing ?? 0), c = `sc-${i}`, l = d.current.get(c) ?? 0, p = i === e.length - 1;
302
- S(C.current, c, a, o, 12, {
310
+ for (let i = 0; i < k; i++) {
311
+ let a = _(i), o = E(e[i].pricing ?? 0), c = `sc-${i}`, l = d.current.get(c) ?? 0, f = i === e.length - 1;
312
+ w(y.current, c, a, o, 12, {
303
313
  label: e[i].vendor,
304
314
  value: String(e[i].pricing ?? 0),
305
- color: p ? u.red : s
306
- }), l > 0 && g(r, a, o, 16 * l, s, .2 * l);
307
- let m = p ? O(n, .05, 5e-4) : 0, _ = t === "area" ? 5 : 6;
308
- p ? (r.shadowColor = f(u.red, .5), r.shadowBlur = (8 + m * 4) * (1 + l * .5), r.fillStyle = u.red, r.beginPath(), r.arc(a, o, (_ + m * 1.5) * (1 + l * .3), 0, Math.PI * 2), r.fill(), r.shadowBlur = 0) : (r.fillStyle = f(s, .7 + l * .3), r.beginPath(), r.arc(a, o, _ + l * 2, 0, Math.PI * 2), r.fill()), r.font = "10px 'JetBrains Mono', monospace", r.fillStyle = f(u.t3, .6 + l * .3), r.textAlign = "center", r.fillText(e[i].vendor, a, M - 14);
315
+ color: f ? u.red : s
316
+ }), l > 0 && v(r, a, o, 16 * l, s, .2 * l);
317
+ let p = f ? A(n, .05, 5e-4) : 0, h = t === "area" ? 5 : 6;
318
+ f ? (r.shadowColor = m(u.red, .5), r.shadowBlur = (8 + p * 4) * (1 + l * .5), r.fillStyle = u.red, r.beginPath(), r.arc(a, o, (h + p * 1.5) * (1 + l * .3), 0, Math.PI * 2), r.fill(), r.shadowBlur = 0) : (r.fillStyle = m(s, .7 + l * .3), r.beginPath(), r.arc(a, o, h + l * 2, 0, Math.PI * 2), r.fill()), r.font = "10px 'JetBrains Mono', monospace", r.fillStyle = m(u.t3, .6 + l * .3), r.textAlign = "center", r.fillText(e[i].vendor, a, N - 14);
309
319
  }
310
- w = requestAnimationFrame(T);
320
+ C = requestAnimationFrame(T);
311
321
  };
312
- return T(), () => cancelAnimationFrame(w);
322
+ return T(), () => cancelAnimationFrame(C);
313
323
  }, [
314
324
  e,
315
325
  t,
@@ -319,31 +329,31 @@ function N({ rows: e = [], variant: t, className: r, colors: i }) {
319
329
  children: /* @__PURE__ */ c("div", {
320
330
  style: {
321
331
  position: "relative",
322
- width: j,
323
- height: M
332
+ width: ee,
333
+ height: N
324
334
  },
325
335
  children: [/* @__PURE__ */ s("canvas", {
326
336
  ref: o,
327
337
  role: "img",
328
338
  "aria-label": `${t} chart`,
329
339
  style: {
330
- width: j,
331
- height: M,
340
+ width: ee,
341
+ height: N,
332
342
  display: "block",
333
343
  borderRadius: 8
334
344
  }
335
- }), /* @__PURE__ */ s(b, {
336
- ...v,
337
- parentW: j,
338
- parentH: M
345
+ }), /* @__PURE__ */ s(S, {
346
+ ...g,
347
+ parentW: ee,
348
+ parentH: N
339
349
  })]
340
350
  })
341
351
  });
342
352
  }
343
353
  //#endregion
344
354
  //#region src/components/areaChart/AreaChart.tsx
345
- function ee({ rows: e = [], className: t, colors: n }) {
346
- return /* @__PURE__ */ s(N, {
355
+ function ne({ rows: e = [], className: t, colors: n }) {
356
+ return /* @__PURE__ */ s(te, {
347
357
  rows: e,
348
358
  variant: "area",
349
359
  className: t,
@@ -352,54 +362,54 @@ function ee({ rows: e = [], className: t, colors: n }) {
352
362
  }
353
363
  //#endregion
354
364
  //#region src/components/barChart/BarChart.tsx
355
- var P = 760, F = 280;
356
- function te({ rows: e = [], className: t, colors: r }) {
357
- let i = a(null), o = a(/* @__PURE__ */ new Map()), p = a(0), { hoveredRef: m, tooltip: _, hitZonesRef: v } = x(i, {
365
+ var P = 760, re = 280;
366
+ function ie({ rows: e = [], className: t, colors: r }) {
367
+ let i = a(null), o = a(/* @__PURE__ */ new Map()), f = a(0), { hoveredRef: p, tooltip: h, hitZonesRef: g } = C(i, {
358
368
  width: P,
359
- height: F
369
+ height: re
360
370
  });
361
371
  return n(() => {
362
372
  let t = i.current;
363
373
  if (!t) return;
364
- let n = h(t, P, F);
365
- p.current = 0;
374
+ let n = _(t, P, re);
375
+ f.current = 0;
366
376
  let a = r?.bars ?? d, s = r?.axisLine ?? u.bd, c = r?.valueLabel ?? u.t2, l = {
367
377
  top: 24,
368
378
  right: 24,
369
379
  bottom: 56,
370
380
  left: 24
371
- }, _ = F - l.top - l.bottom, y = (P - l.left - l.right) / Math.max(e.length, 1), b = Math.max(100, ...e.map((e) => e.pricing ?? 0)), x = l.top + _, S, w = () => {
372
- p.current++;
373
- let t = p.current;
374
- n.clearRect(0, 0, P, F);
375
- let r = T(Math.min(t / 48, 1));
376
- A(o.current, m.current), v.current = [], n.strokeStyle = f(s, .4), n.lineWidth = 1, n.setLineDash([]), n.beginPath(), n.moveTo(l.left, x), n.lineTo(P - l.right, x), n.stroke(), e.forEach((t, i) => {
377
- let s = l.left + i * y, d = k(r, i, e.length, T), p = b > 0 ? (t.pricing ?? 0) / b * _ : 0, m = Math.max(p > 0 ? 4 : 0, p * d), h = a[i % a.length], S = o.current.get(t.id ?? `bar-${i}`) ?? 0;
378
- C(v.current, t.id ?? `bar-${i}`, s + 4, x - m, y - 8, m, {
381
+ }, h = re - l.top - l.bottom, y = (P - l.left - l.right) / Math.max(e.length, 1), b = Math.max(100, ...e.map((e) => e.pricing ?? 0)), x = l.top + h, S, C = () => {
382
+ f.current++;
383
+ let t = f.current;
384
+ n.clearRect(0, 0, P, re);
385
+ let r = D(Math.min(t / 48, 1));
386
+ M(o.current, p.current), g.current = [], n.strokeStyle = m(s, .4), n.lineWidth = 1, n.setLineDash([]), n.beginPath(), n.moveTo(l.left, x), n.lineTo(P - l.right, x), n.stroke(), e.forEach((t, i) => {
387
+ let s = l.left + i * y, d = j(r, i, e.length, D), f = b > 0 ? (t.pricing ?? 0) / b * h : 0, p = Math.max(f > 0 ? 4 : 0, f * d), _ = a[i % a.length], S = o.current.get(t.id ?? `bar-${i}`) ?? 0;
388
+ T(g.current, t.id ?? `bar-${i}`, s + 4, x - p, y - 8, p, {
379
389
  label: t.vendor,
380
390
  value: String(t.pricing ?? 0),
381
- color: h
382
- }), m > 0 && (S > 0 && g(n, s + y / 2, x - m / 2, y * .8, h, .12 * S), n.shadowColor = f(h, .2 * (S > 0 ? S : 0)), n.shadowBlur = S > 0 ? 6 : 0, n.fillStyle = f(h, .5 + S * .25), n.beginPath(), n.roundRect(s + 4, x - m, y - 8, m, [
391
+ color: _
392
+ }), p > 0 && (S > 0 && v(n, s + y / 2, x - p / 2, y * .8, _, .12 * S), n.shadowColor = m(_, .2 * (S > 0 ? S : 0)), n.shadowBlur = S > 0 ? 6 : 0, n.fillStyle = m(_, .5 + S * .25), n.beginPath(), n.roundRect(s + 4, x - p, y - 8, p, [
383
393
  4,
384
394
  4,
385
395
  0,
386
396
  0
387
- ]), n.fill(), n.shadowBlur = 0, S > 0 && (n.strokeStyle = f(h, .4 * S), n.lineWidth = 1, n.beginPath(), n.roundRect(s + 4, x - m, y - 8, m, [
397
+ ]), n.fill(), n.shadowBlur = 0, S > 0 && (n.strokeStyle = m(_, .4 * S), n.lineWidth = 1, n.beginPath(), n.roundRect(s + 4, x - p, y - 8, p, [
388
398
  4,
389
399
  4,
390
400
  0,
391
401
  0
392
- ]), n.stroke())), d > .5 && m > 0 && (n.globalAlpha = Math.min(1, (d - .5) * 2), n.font = "bold 10px 'JetBrains Mono', monospace", n.fillStyle = S > 0 ? h : f(c, .7), n.textAlign = "center", n.fillText(String(t.pricing ?? ""), s + y / 2, x - m - 6), n.globalAlpha = 1), n.font = `${S > 0 ? "bold " : ""}9px 'JetBrains Mono', monospace`, n.fillStyle = S > 0 ? h : f(u.t3, .6), n.textAlign = "center", n.fillText(t.vendor, s + y / 2, F - 14);
393
- }), S = requestAnimationFrame(w);
402
+ ]), n.stroke())), d > .5 && p > 0 && (n.globalAlpha = Math.min(1, (d - .5) * 2), n.font = "bold 10px 'JetBrains Mono', monospace", n.fillStyle = S > 0 ? _ : m(c, .7), n.textAlign = "center", n.fillText(String(t.pricing ?? ""), s + y / 2, x - p - 6), n.globalAlpha = 1), n.font = `${S > 0 ? "bold " : ""}9px 'JetBrains Mono', monospace`, n.fillStyle = S > 0 ? _ : m(u.t3, .6), n.textAlign = "center", n.fillText(t.vendor, s + y / 2, re - 14);
403
+ }), S = requestAnimationFrame(C);
394
404
  };
395
- return w(), () => cancelAnimationFrame(S);
405
+ return C(), () => cancelAnimationFrame(S);
396
406
  }, [e, r]), /* @__PURE__ */ s(l, {
397
407
  className: t,
398
408
  children: /* @__PURE__ */ c("div", {
399
409
  style: {
400
410
  position: "relative",
401
411
  width: P,
402
- height: F
412
+ height: re
403
413
  },
404
414
  children: [/* @__PURE__ */ s("canvas", {
405
415
  ref: i,
@@ -407,100 +417,100 @@ function te({ rows: e = [], className: t, colors: r }) {
407
417
  "aria-label": "bar chart",
408
418
  style: {
409
419
  width: P,
410
- height: F,
420
+ height: re,
411
421
  display: "block",
412
422
  borderRadius: 8
413
423
  }
414
- }), /* @__PURE__ */ s(b, {
415
- ..._,
424
+ }), /* @__PURE__ */ s(S, {
425
+ ...h,
416
426
  parentW: P,
417
- parentH: F
427
+ parentH: re
418
428
  })]
419
429
  })
420
430
  });
421
431
  }
422
432
  //#endregion
423
433
  //#region src/components/commitmentRace/CommitmentRace.tsx
424
- var I = 680, L = 300, ne = [
434
+ var F = 680, I = 300, ae = [
425
435
  u.green,
426
436
  u.blue,
427
437
  u.cyan,
428
438
  u.amber,
429
439
  u.red
430
440
  ];
431
- function re({ contractors: e = [], "data-testid": t }) {
432
- let r = a(null), i = a(0), o = a(/* @__PURE__ */ new Map()), l = [...e].sort((e, t) => (t.percentage ?? 0) - (e.percentage ?? 0)), { hoveredRef: d, tooltip: p, hitZonesRef: m } = x(r, {
433
- width: I,
434
- height: L
441
+ function oe({ contractors: e = [], "data-testid": t }) {
442
+ let r = a(null), i = a(0), o = a(/* @__PURE__ */ new Map()), l = [...e].sort((e, t) => (t.percentage ?? 0) - (e.percentage ?? 0)), { hoveredRef: d, tooltip: p, hitZonesRef: h } = C(r, {
443
+ width: F,
444
+ height: I
435
445
  });
436
446
  return n(() => {
437
447
  let e = r.current;
438
448
  if (!e) return;
439
- let t = h(e, I, L);
449
+ let t = _(e, F, I);
440
450
  i.current = 0;
441
- let n = I * .13, a = I * .08, s = L * .08, c = L * .14, p = I - n - a, y, b = () => {
451
+ let n = F * .13, a = F * .08, s = I * .08, c = I * .14, p = F - n - a, g, x = () => {
442
452
  i.current++;
443
453
  let e = i.current;
444
- t.clearRect(0, 0, I, L), m.current = [], o.current.forEach((e, t) => {
454
+ t.clearRect(0, 0, F, I), h.current = [], o.current.forEach((e, t) => {
445
455
  let n = t === d.current ? 1 : 0, r = e + (n - e) * .12;
446
456
  Math.abs(r - n) < .005 ? n === 0 ? o.current.delete(t) : o.current.set(t, 1) : o.current.set(t, r);
447
- }), d.current && !o.current.has(d.current) && o.current.set(d.current, 0), _(t, I, L, e, 40, f(u.blue, .04)), l.forEach((r, i) => {
448
- let a = ne[i % ne.length], l = o.current.get(r.id) ?? 0, d = s + i * (c + 10);
449
- t.fillStyle = f(a, .04 + l * .04), t.beginPath(), t.roundRect(n, d, p, c, 3), t.fill(), t.strokeStyle = f(a, .08), t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(n, d + c / 2), t.lineTo(n + p, d + c / 2), t.stroke(), t.setLineDash([]);
450
- let h = (r.percentage ?? 0) / 100, _ = n + p * Math.min(h, h * w(Math.min(1, e * .005)));
451
- if (_ > n + 4) {
452
- let e = t.createLinearGradient(n, 0, _, 0);
453
- e.addColorStop(0, f(a, .02)), e.addColorStop(1, f(a, .25 + l * .15)), t.fillStyle = e, t.beginPath(), t.roundRect(n, d + 2, _ - n, c - 4, 2), t.fill();
457
+ }), d.current && !o.current.has(d.current) && o.current.set(d.current, 0), y(t, F, I, e, 40, m(u.blue, .04)), l.forEach((r, i) => {
458
+ let a = ae[i % ae.length], l = o.current.get(r.id) ?? 0, u = s + i * (c + 10);
459
+ t.fillStyle = m(a, .04 + l * .04), t.beginPath(), t.roundRect(n, u, p, c, 3), t.fill(), t.strokeStyle = m(a, .08), t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(n, u + c / 2), t.lineTo(n + p, u + c / 2), t.stroke(), t.setLineDash([]);
460
+ let d = (r.percentage ?? 0) / 100, g = n + p * Math.min(d, d * E(Math.min(1, e * .005)));
461
+ if (g > n + 4) {
462
+ let e = t.createLinearGradient(n, 0, g, 0);
463
+ e.addColorStop(0, m(a, .02)), e.addColorStop(1, m(a, .25 + l * .15)), t.fillStyle = e, t.beginPath(), t.roundRect(n, u + 2, g - n, c - 4, 2), t.fill();
454
464
  }
455
- g(t, _, d + c / 2, 18 + l * 8, a, .3 + l * .2), t.beginPath(), t.arc(_, d + c / 2, 5 + l * 2, 0, Math.PI * 2), t.fillStyle = f(a, .9), t.fill(), S(m.current, r.id, _, d + c / 2, 14, {
465
+ v(t, g, u + c / 2, 18 + l * 8, a, .3 + l * .2), t.beginPath(), t.arc(g, u + c / 2, 5 + l * 2, 0, Math.PI * 2), t.fillStyle = m(a, .9), t.fill(), w(h.current, r.id, g, u + c / 2, 14, {
456
466
  label: r.name,
457
467
  value: `${r.percentage ?? 0}% commitment`,
458
468
  sublabel: `Base: £${r.base ?? 0}M · Variations: £${r.variation ?? 0}M`,
459
469
  color: a
460
- }), t.font = "bold 10px 'JetBrains Mono', monospace", t.fillStyle = f(a, .9 + l * .1), t.textAlign = "left", t.textBaseline = "middle", t.fillText(`${r.percentage ?? 0}%`, _ + 10, d + c / 2), t.font = `${l > 0 ? "bold " : ""}10px 'JetBrains Mono', monospace`, t.fillStyle = l > 0 ? a : f(u.t2, .8), t.textAlign = "right", t.fillText(r.abbreviation ?? r.name.slice(0, 6), n - 8, d + c / 2);
461
- }), t.strokeStyle = f(u.t3, .3), t.lineWidth = 1, t.setLineDash([]), t.beginPath(), t.moveTo(n + p, s), t.lineTo(n + p, s + (l.length - 1) * (c + 10) + c), t.stroke(), v(t, I, L, e, .015), y = requestAnimationFrame(b);
470
+ }), t.font = "bold " + f.font, t.fillStyle = m(a, .9 + l * .1), t.textAlign = "left", t.textBaseline = "middle", t.fillText(`${r.percentage ?? 0}%`, g + 10, u + c / 2), t.font = `${l > 0 ? "bold " : ""}` + f.font, t.fillStyle = l > 0 ? a : f.color, t.textAlign = "right", t.fillText(r.abbreviation ?? r.name.slice(0, 6), n - 8, u + c / 2);
471
+ }), t.strokeStyle = m(u.t3, .3), t.lineWidth = 1, t.setLineDash([]), t.beginPath(), t.moveTo(n + p, s), t.lineTo(n + p, s + (l.length - 1) * (c + 10) + c), t.stroke(), b(t, F, I, e, .015), g = requestAnimationFrame(x);
462
472
  };
463
- return b(), () => cancelAnimationFrame(y);
473
+ return x(), () => cancelAnimationFrame(g);
464
474
  }, [l]), /* @__PURE__ */ c("div", {
465
475
  "data-testid": t,
466
476
  style: {
467
477
  position: "relative",
468
- width: I,
469
- height: L
478
+ width: F,
479
+ height: I
470
480
  },
471
481
  children: [/* @__PURE__ */ s("canvas", {
472
482
  ref: r,
473
483
  role: "img",
474
484
  "aria-label": "Commitment race — contractors ranked by commitment percentage",
475
485
  style: {
476
- width: I,
477
- height: L,
486
+ width: F,
487
+ height: I,
478
488
  display: "block",
479
489
  borderRadius: 8
480
490
  }
481
- }), /* @__PURE__ */ s(b, {
491
+ }), /* @__PURE__ */ s(S, {
482
492
  ...p,
483
- parentW: I,
484
- parentH: L
493
+ parentW: F,
494
+ parentH: I
485
495
  })]
486
496
  });
487
497
  }
488
498
  //#endregion
489
499
  //#region src/components/compensationGauge/CompensationGauge.tsx
490
- var ie = 480, ae = 340;
491
- function oe({ pct: e, confirmed: t, total: r, "data-testid": i }) {
500
+ var se = 480, ce = 340;
501
+ function le({ pct: e, confirmed: t, total: r, "data-testid": i }) {
492
502
  let o = a(null), c = a(0);
493
503
  return n(() => {
494
504
  let n = o.current;
495
505
  if (!n) return;
496
- let i = h(n, ie, ae);
506
+ let i = _(n, se, ce);
497
507
  c.current = 0;
498
- let a = ie / 2, s = Math.PI, l = 2 * Math.PI, d = Math.PI, p, m = () => {
508
+ let a = se / 2, s = Math.PI, l = 2 * Math.PI, d = Math.PI, p, h = () => {
499
509
  c.current++;
500
510
  let n = c.current;
501
- i.clearRect(0, 0, ie, ae);
502
- let o = w(Math.min(n / 80, 1)), h = D(Math.min(n / 72, 1));
503
- i.beginPath(), i.arc(a, 220, 120, s, l), i.strokeStyle = f(u.bd, .35), i.lineWidth = 46, i.stroke(), [
511
+ i.clearRect(0, 0, se, ce);
512
+ let o = E(Math.min(n / 80, 1)), g = k(Math.min(n / 72, 1));
513
+ i.beginPath(), i.arc(a, 220, 120, s, l), i.strokeStyle = m(u.bd, .35), i.lineWidth = 46, i.stroke(), [
504
514
  {
505
515
  start: 0,
506
516
  end: .33,
@@ -518,7 +528,7 @@ function oe({ pct: e, confirmed: t, total: r, "data-testid": i }) {
518
528
  }
519
529
  ].forEach((e) => {
520
530
  let t = s + e.start * d, n = s + e.end * d;
521
- i.beginPath(), i.arc(a, 220, 194 / 2, t, n), i.strokeStyle = f(e.color, .12), i.lineWidth = 42, i.stroke();
531
+ i.beginPath(), i.arc(a, 220, 194 / 2, t, n), i.strokeStyle = m(e.color, .12), i.lineWidth = 42, i.stroke();
522
532
  }), [
523
533
  {
524
534
  label: "Low",
@@ -534,22 +544,22 @@ function oe({ pct: e, confirmed: t, total: r, "data-testid": i }) {
534
544
  }
535
545
  ].forEach(({ label: e, angle: t }) => {
536
546
  let n = a + Math.cos(t) * 166, r = 220 + Math.sin(t) * 166;
537
- i.font = "13px 'JetBrains Mono', monospace", i.fillStyle = f(u.t3, .55), i.textAlign = "center", i.fillText(e, n, r + 3);
547
+ i.font = "400 14px 'Satoshi Variable', 'DM Sans', sans-serif", i.fillStyle = m(u.t3, .55), i.textAlign = "center", i.fillText(e, n, r + 3);
538
548
  });
539
- let _ = s + e / 100 * d * o, v = e >= 66 ? u.green : e >= 33 ? u.amber : u.red;
540
- g(i, a + Math.cos(_) * 194 / 2, 220 + Math.sin(_) * 194 / 2, 18, v, .35 * o), i.beginPath(), i.arc(a, 220, 194 / 2, s, _), i.strokeStyle = f(v, .7 * o), i.lineWidth = 38, i.lineCap = "round", i.stroke(), i.lineCap = "butt";
541
- let y = s + e / 100 * d * h, b = a + Math.cos(y) * 82, x = 220 + Math.sin(y) * 82, S = a - Math.cos(y) * 14, C = 220 - Math.sin(y) * 14;
542
- i.strokeStyle = f(v, .18 * h), i.lineWidth = 6, i.lineCap = "round", i.beginPath(), i.moveTo(S, C), i.lineTo(b, x), i.stroke(), i.strokeStyle = f(u.t1, .92 * h), i.lineWidth = 2, i.lineCap = "round", i.beginPath(), i.moveTo(S, C), i.lineTo(b, x), i.stroke(), i.beginPath(), i.arc(b, x, 3, 0, Math.PI * 2), i.fillStyle = f(v, .9 * h), i.fill(), g(i, a, 220, 20, v, .25 * h), i.beginPath(), i.arc(a, 220, 9, 0, Math.PI * 2), i.strokeStyle = f(v, .5 * h), i.lineWidth = 1.5, i.stroke(), i.beginPath(), i.arc(a, 220, 5, 0, Math.PI * 2), i.fillStyle = u.t1, i.fill(), o > .5 && (i.globalAlpha = Math.min(1, (o - .5) / .5), i.font = "bold 22px 'JetBrains Mono', monospace", i.fillStyle = v, i.textAlign = "center", i.fillText(`${Math.round(e * h)}%`, a, 182), i.globalAlpha = 1), o > .7 && (i.globalAlpha = Math.min(1, (o - .7) / .3), i.font = "13px 'JetBrains Mono', monospace", i.fillStyle = u.t2, i.textAlign = "center", i.fillText("NCEs confirmed", a, 252), i.font = "bold 11px 'JetBrains Mono', monospace", i.fillStyle = u.t2, i.fillText(`${t} of ${r} NCEs are confirmed compensation events`, a, 272), i.globalAlpha = 1);
549
+ let _ = s + e / 100 * d * o, y = e >= 66 ? u.green : e >= 33 ? u.amber : u.red;
550
+ v(i, a + Math.cos(_) * 194 / 2, 220 + Math.sin(_) * 194 / 2, 18, y, .35 * o), i.beginPath(), i.arc(a, 220, 194 / 2, s, _), i.strokeStyle = m(y, .7 * o), i.lineWidth = 38, i.lineCap = "round", i.stroke(), i.lineCap = "butt";
551
+ let b = s + e / 100 * d * g, x = a + Math.cos(b) * 82, S = 220 + Math.sin(b) * 82, C = a - Math.cos(b) * 14, w = 220 - Math.sin(b) * 14;
552
+ i.strokeStyle = m(y, .18 * g), i.lineWidth = 6, i.lineCap = "round", i.beginPath(), i.moveTo(C, w), i.lineTo(x, S), i.stroke(), i.strokeStyle = m(u.t1, .92 * g), i.lineWidth = 2, i.lineCap = "round", i.beginPath(), i.moveTo(C, w), i.lineTo(x, S), i.stroke(), i.beginPath(), i.arc(x, S, 3, 0, Math.PI * 2), i.fillStyle = m(y, .9 * g), i.fill(), v(i, a, 220, 20, y, .25 * g), i.beginPath(), i.arc(a, 220, 9, 0, Math.PI * 2), i.strokeStyle = m(y, .5 * g), i.lineWidth = 1.5, i.stroke(), i.beginPath(), i.arc(a, 220, 5, 0, Math.PI * 2), i.fillStyle = u.t1, i.fill(), o > .5 && (i.globalAlpha = Math.min(1, (o - .5) / .5), i.font = "500 24px 'Satoshi Variable', 'DM Sans', sans-serif", i.fillStyle = y, i.textAlign = "center", i.fillText(`${Math.round(e * g)}%`, a, 182), i.globalAlpha = 1), o > .7 && (i.globalAlpha = Math.min(1, (o - .7) / .3), i.font = "400 14px 'Satoshi Variable', 'DM Sans', sans-serif", i.fillStyle = f.color, i.textAlign = "center", i.fillText("NCEs confirmed", a, 252), i.font = "400 14px 'Satoshi Variable', 'DM Sans', sans-serif", i.fillStyle = f.color, i.fillText(`${t} of ${r} NCEs are confirmed compensation events`, a, 272), i.globalAlpha = 1);
543
553
  for (let e = 0; e <= 10; e++) {
544
554
  let t = s + e / 10 * d;
545
- if (i.strokeStyle = f(u.bd, .5), i.lineWidth = e % 5 == 0 ? 1.5 : .8, i.beginPath(), i.moveTo(a + Math.cos(t) * 122, 220 + Math.sin(t) * 122), i.lineTo(a + Math.cos(t) * 128, 220 + Math.sin(t) * 128), i.stroke(), e % 5 == 0) {
555
+ if (i.strokeStyle = m(u.bd, .5), i.lineWidth = e % 5 == 0 ? 1.5 : .8, i.beginPath(), i.moveTo(a + Math.cos(t) * 122, 220 + Math.sin(t) * 122), i.lineTo(a + Math.cos(t) * 128, 220 + Math.sin(t) * 128), i.stroke(), e % 5 == 0) {
546
556
  let n = a + Math.cos(t) * 138, r = 220 + Math.sin(t) * 138;
547
- i.font = "11px 'JetBrains Mono', monospace", i.fillStyle = f(u.t3, .45), i.textAlign = "center", i.fillText(`${e * 10}%`, n, r + 3);
557
+ i.font = "400 14px 'Satoshi Variable', 'DM Sans', sans-serif", i.fillStyle = m(u.t3, .45), i.textAlign = "center", i.fillText(`${e * 10}%`, n, r + 3);
548
558
  }
549
559
  }
550
- p = requestAnimationFrame(m);
560
+ p = requestAnimationFrame(h);
551
561
  };
552
- return m(), () => cancelAnimationFrame(p);
562
+ return h(), () => cancelAnimationFrame(p);
553
563
  }, [
554
564
  e,
555
565
  t,
@@ -558,16 +568,16 @@ function oe({ pct: e, confirmed: t, total: r, "data-testid": i }) {
558
568
  "data-testid": i,
559
569
  style: {
560
570
  position: "relative",
561
- width: ie,
562
- height: ae
571
+ width: se,
572
+ height: ce
563
573
  },
564
574
  children: /* @__PURE__ */ s("canvas", {
565
575
  ref: o,
566
576
  role: "img",
567
577
  "aria-label": `Compensation event gauge — ${e}% of NCEs confirmed as compensation events`,
568
578
  style: {
569
- width: ie,
570
- height: ae,
579
+ width: se,
580
+ height: ce,
571
581
  display: "block"
572
582
  }
573
583
  })
@@ -575,8 +585,8 @@ function oe({ pct: e, confirmed: t, total: r, "data-testid": i }) {
575
585
  }
576
586
  //#endregion
577
587
  //#region src/canvas/useCanvasLoop.ts
578
- function se(e, t, r, i, o = !0, s = {}) {
579
- let c = a(0), { easing: l = w, durationFrames: u = 48 } = s;
588
+ function ue(e, t, r, i, o = !0, s = {}) {
589
+ let c = a(0), { easing: l = E, durationFrames: u = 48 } = s;
580
590
  n(() => {
581
591
  let n = e.current;
582
592
  if (!n || !t || !r) return;
@@ -607,29 +617,29 @@ function se(e, t, r, i, o = !0, s = {}) {
607
617
  }
608
618
  //#endregion
609
619
  //#region src/components/contractBars/ContractBars.tsx
610
- var R = 780, ce = 234, le = 130, ue = 52, de = [
620
+ var L = 780, R = 234, de = 130, fe = 52, pe = [
611
621
  u.blue,
612
622
  u.cyan,
613
623
  u.amber,
614
624
  u.purple,
615
625
  u.green
616
- ], fe = [
626
+ ], me = [
617
627
  "Base Value",
618
628
  "Variations",
619
629
  "Commitment"
620
- ], pe = [
630
+ ], he = [
621
631
  "Base",
622
632
  "Var",
623
633
  "Commit"
624
634
  ];
625
- function me({ contractors: e, "data-testid": t }) {
626
- let n = a(null), r = a(/* @__PURE__ */ new Map()), { hoveredRef: o, tooltip: l, hitZonesRef: d } = x(n, {
627
- width: R,
628
- height: ce
629
- }), p = i(() => {
635
+ function ge({ contractors: e = [], "data-testid": t }) {
636
+ let n = a(null), r = a(/* @__PURE__ */ new Map()), { hoveredRef: o, tooltip: l, hitZonesRef: d } = C(n, {
637
+ width: L,
638
+ height: R
639
+ }), f = i(() => {
630
640
  let t = Math.max(...e.map((e) => e.base ?? 0)), n = Math.max(...e.map((e) => e.variation ?? 0));
631
641
  return e.map((e, r) => {
632
- let i = R * (.12 + r * .19), a = le, o = Math.min(R * .075, ue), s = de[r % de.length], c = [
642
+ let i = L * (.12 + r * .19), a = de, o = Math.min(L * .075, fe), s = pe[r % pe.length], c = [
633
643
  (e.base ?? 0) / (t || 1) * 100,
634
644
  (e.variation ?? 0) / (n || 1) * 100,
635
645
  e.percentage ?? 0
@@ -638,10 +648,10 @@ function me({ contractors: e, "data-testid": t }) {
638
648
  `£${e.variation ?? 0}M`,
639
649
  `${e.percentage ?? 0}%`
640
650
  ], u = c.map((e, t) => {
641
- let n = -Math.PI / 2 + t / fe.length * Math.PI * 2, r = e / 100, s = o * Math.max(.08, r);
651
+ let n = -Math.PI / 2 + t / me.length * Math.PI * 2, r = e / 100, s = o * Math.max(.08, r);
642
652
  return {
643
- name: fe[t],
644
- short: pe[t],
653
+ name: me[t],
654
+ short: he[t],
645
655
  label: l[t],
646
656
  val: Math.round(e),
647
657
  x: i + Math.cos(n) * s,
@@ -661,54 +671,54 @@ function me({ contractors: e, "data-testid": t }) {
661
671
  };
662
672
  });
663
673
  }, [e]);
664
- return se(n, R, ce, (e, t, n) => {
665
- A(r.current, o.current), d.current = [], _(e, R, ce, n, 30), p.forEach((t, i) => {
674
+ return ue(n, L, R, (e, t, n) => {
675
+ M(r.current, o.current), d.current = [], y(e, L, R, n, 30), f.forEach((t, i) => {
666
676
  let a = t.color, o = `constellation-${i}`, s = r.current.get(o) ?? 0;
667
- e.beginPath(), e.arc(t.cx, t.cy, t.baseR + 5, 0, Math.PI * 2), e.strokeStyle = f(u.bd, .08 + .08 * s), e.lineWidth = .5, e.stroke(), e.beginPath(), t.stars.forEach((t, n) => {
677
+ e.beginPath(), e.arc(t.cx, t.cy, t.baseR + 5, 0, Math.PI * 2), e.strokeStyle = m(u.bd, .08 + .08 * s), e.lineWidth = .5, e.stroke(), e.beginPath(), t.stars.forEach((t, n) => {
668
678
  n === 0 ? e.moveTo(t.x, t.y) : e.lineTo(t.x, t.y);
669
- }), e.closePath(), e.fillStyle = f(a, .04 + .03 * s), e.fill(), e.strokeStyle = f(a, .15 + .1 * s), e.lineWidth = .8, e.stroke(), t.stars.forEach((o, s) => {
670
- let c = O(n, .05, 5e-4) * .3 + .7, l = 3.5 * c, u = `star-${i}-${s}`, p = r.current.get(u) ?? 0, m = e.createRadialGradient(o.x, o.y, 0, o.x, o.y, l * 4);
671
- m.addColorStop(0, f(a, (.2 + .1 * p) * c)), m.addColorStop(1, f(a, 0)), e.fillStyle = m, e.beginPath(), e.arc(o.x, o.y, l * 4, 0, Math.PI * 2), e.fill(), e.beginPath(), e.arc(o.x, o.y, l + p * 2, 0, Math.PI * 2), e.fillStyle = f(a, (.8 + .2 * p) * c), e.fill();
679
+ }), e.closePath(), e.fillStyle = m(a, .04 + .03 * s), e.fill(), e.strokeStyle = m(a, .15 + .1 * s), e.lineWidth = .8, e.stroke(), t.stars.forEach((o, s) => {
680
+ let c = A(n, .05, 5e-4) * .3 + .7, l = 3.5 * c, u = `star-${i}-${s}`, f = r.current.get(u) ?? 0, p = e.createRadialGradient(o.x, o.y, 0, o.x, o.y, l * 4);
681
+ p.addColorStop(0, m(a, (.2 + .1 * f) * c)), p.addColorStop(1, m(a, 0)), e.fillStyle = p, e.beginPath(), e.arc(o.x, o.y, l * 4, 0, Math.PI * 2), e.fill(), e.beginPath(), e.arc(o.x, o.y, l + f * 2, 0, Math.PI * 2), e.fillStyle = m(a, (.8 + .2 * f) * c), e.fill();
672
682
  let h = Math.sin(o.angle) < -.3;
673
- e.textAlign = "center", e.textBaseline = "middle", h ? (e.font = "8px 'DM Sans', sans-serif", e.fillStyle = f(a, .5 + .15 * p), e.fillText(o.short, o.x, o.y - 24), e.font = "bold 11px 'JetBrains Mono', monospace", e.fillStyle = f(a, .8 + .15 * p), e.fillText(o.label, o.x, o.y - 11)) : (e.font = "8px 'DM Sans', sans-serif", e.fillStyle = f(a, .5 + .15 * p), e.fillText(o.short, o.x, o.y + 11), e.font = "bold 11px 'JetBrains Mono', monospace", e.fillStyle = f(a, .8 + .15 * p), e.fillText(o.label, o.x, o.y + 24)), S(d.current, u, o.x, o.y, l * 4 + 2, {
683
+ e.textAlign = "center", e.textBaseline = "middle", h ? (e.font = "8px 'DM Sans', sans-serif", e.fillStyle = m(a, .5 + .15 * f), e.fillText(o.short, o.x, o.y - 24), e.font = "bold 11px 'JetBrains Mono', monospace", e.fillStyle = m(a, .8 + .15 * f), e.fillText(o.label, o.x, o.y - 11)) : (e.font = "8px 'DM Sans', sans-serif", e.fillStyle = m(a, .5 + .15 * f), e.fillText(o.short, o.x, o.y + 11), e.font = "bold 11px 'JetBrains Mono', monospace", e.fillStyle = m(a, .8 + .15 * f), e.fillText(o.label, o.x, o.y + 24)), w(d.current, u, o.x, o.y, l * 4 + 2, {
674
684
  label: o.name,
675
685
  value: o.label,
676
686
  sublabel: t.abbreviation ?? t.name.slice(0, 6),
677
687
  color: a
678
688
  });
679
- }), s > 0 && g(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 = f(a, .1 + O(n, .03, 5e-4) * .05), e.lineWidth = 1, e.stroke(), e.font = "bold 11px 'DM Sans', sans-serif", e.textAlign = "center", e.textBaseline = "alphabetic", e.fillStyle = f(u.t2, .65 + s * .25), e.fillText(t.abbreviation ?? t.name.slice(0, 6), t.cx, t.cy + t.baseR + 26), S(d.current, o, t.cx, t.cy, t.baseR + 5, {
689
+ }), s > 0 && v(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 = m(a, .1 + A(n, .03, 5e-4) * .05), e.lineWidth = 1, e.stroke(), e.font = "bold 11px 'DM Sans', sans-serif", e.textAlign = "center", e.textBaseline = "alphabetic", e.fillStyle = m(u.t2, .65 + s * .25), e.fillText(t.abbreviation ?? t.name.slice(0, 6), t.cx, t.cy + t.baseR + 26), w(d.current, o, t.cx, t.cy, t.baseR + 5, {
680
690
  label: t.name,
681
691
  value: `£${t.total ?? 0}M total`,
682
692
  sublabel: `${t.percentage ?? 0}% committed · scatter ${t.scatter.toFixed(1)}`,
683
693
  color: a
684
694
  });
685
- }), e.font = "11px 'DM Sans', sans-serif", e.textAlign = "center", e.textBaseline = "middle", e.fillStyle = f(u.t4, .55), e.fillText("▲ top = Base value · ▼▸ lower-right = Variations · ◂▼ lower-left = Commitment % · hover stars for details", R / 2, ce - 14), v(e, R, ce, n, .012);
695
+ }), e.font = "11px 'DM Sans', sans-serif", e.textAlign = "center", e.textBaseline = "middle", e.fillStyle = m(u.t4, .55), e.fillText("▲ top = Base value · ▼▸ lower-right = Variations · ◂▼ lower-left = Commitment % · hover stars for details", L / 2, R - 14), b(e, L, R, n, .012);
686
696
  }, !0), /* @__PURE__ */ c("div", {
687
697
  "data-testid": t,
688
698
  style: {
689
699
  position: "relative",
690
- width: R,
691
- height: ce
700
+ width: L,
701
+ height: R
692
702
  },
693
703
  children: [/* @__PURE__ */ s("canvas", {
694
704
  ref: n,
695
705
  role: "img",
696
706
  "aria-label": "Contract value breakdown per contractor — multi-KPI constellation chart",
697
707
  style: {
698
- width: R,
699
- height: ce,
708
+ width: L,
709
+ height: R,
700
710
  display: "block"
701
711
  }
702
- }), /* @__PURE__ */ s(b, {
712
+ }), /* @__PURE__ */ s(S, {
703
713
  ...l,
704
- parentW: R,
705
- parentH: ce
714
+ parentW: L,
715
+ parentH: R
706
716
  })]
707
717
  });
708
718
  }
709
719
  //#endregion
710
720
  //#region src/components/contractValueOrb/ContractValueOrb.tsx
711
- var he = 680, ge = 220, _e = [
721
+ var _e = 680, ve = 220, ye = [
712
722
  u.blue,
713
723
  u.cyan,
714
724
  u.amber,
@@ -719,98 +729,98 @@ var he = 680, ge = 220, _e = [
719
729
  right: 64,
720
730
  top: 16,
721
731
  bottom: 38
722
- }, ve = 88, B = 18;
723
- function ye({ data: e, "data-testid": t }) {
724
- let n = a(null), r = a(/* @__PURE__ */ new Map()), { hoveredRef: i, tooltip: o, hitZonesRef: l } = x(n, {
725
- width: he,
726
- height: ge
727
- }), { contractors: d = [], totals: p } = e, m = d.length, h = Math.max(...d.map((e) => e.total ?? 0), 1), _ = he - z.left - ve - z.right, v = m > 1 ? (ge - z.top - z.bottom - m * B) / (m - 1) : 0;
728
- return se(n, he, ge, (e, t) => {
729
- A(r.current, i.current), l.current = [], d.forEach((n, i) => {
730
- let a = _e[i % _e.length], o = k(t, i, m, T), s = z.top + i * (B + v), c = z.left + ve, d = r.current.get(n.id) ?? 0, p = (n.base ?? 0) / h * _ * o, y = (n.total ?? 0) / h * _ * o, b = y - p;
731
- e.font = `${d > 0 ? "bold " : ""}10px 'DM Sans', sans-serif`, e.fillStyle = d > 0 ? a : f(u.t2, .8), e.textAlign = "right", e.textBaseline = "middle", e.fillText(n.abbreviation ?? n.name.slice(0, 6), c - 8, s + B / 2), e.fillStyle = f(u.bd, .25), e.beginPath(), e.roundRect(c, s, _, B, 4), e.fill(), p > 0 && (d > 0 && g(e, c + p / 2, s + B / 2, p * .3, a, .1 * d), e.fillStyle = f(a, .5 + d * .15), e.beginPath(), e.roundRect(c, s, p, B, 4), e.fill()), b > 2 && (e.fillStyle = f(a, .22 + d * .08), e.beginPath(), e.roundRect(c + p, s, b, B, [
732
+ }, be = 88, B = 18;
733
+ function xe({ data: e, "data-testid": t }) {
734
+ let n = a(null), r = a(/* @__PURE__ */ new Map()), { hoveredRef: i, tooltip: o, hitZonesRef: l } = C(n, {
735
+ width: _e,
736
+ height: ve
737
+ }), { contractors: d = [], totals: h } = e, g = d.length, _ = Math.max(...d.map((e) => e.total ?? 0), 1), y = _e - z.left - be - z.right, b = g > 1 ? (ve - z.top - z.bottom - g * B) / (g - 1) : 0;
738
+ return ue(n, _e, ve, (e, t) => {
739
+ M(r.current, i.current), l.current = [], d.forEach((n, i) => {
740
+ let a = ye[i % ye.length], o = j(t, i, g, D), s = z.top + i * (B + b), c = z.left + be, d = r.current.get(n.id) ?? 0, p = (n.base ?? 0) / _ * y * o, h = (n.total ?? 0) / _ * y * o, x = h - p;
741
+ e.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", e.fillStyle = d > 0 ? a : f.color, e.textAlign = "right", e.textBaseline = "middle", e.fillText(n.abbreviation ?? n.name.slice(0, 6), c - 8, s + B / 2), e.fillStyle = m(u.bd, .25), e.beginPath(), e.roundRect(c, s, y, B, 4), e.fill(), p > 0 && (d > 0 && v(e, c + p / 2, s + B / 2, p * .3, a, .1 * d), e.fillStyle = m(a, .5 + d * .15), e.beginPath(), e.roundRect(c, s, p, B, 4), e.fill()), x > 2 && (e.fillStyle = m(a, .22 + d * .08), e.beginPath(), e.roundRect(c + p, s, x, B, [
732
742
  0,
733
743
  4,
734
744
  4,
735
745
  0
736
- ]), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = f(a, .55), e.lineWidth = 1, e.beginPath(), e.moveTo(c + p, s + 3), e.lineTo(c + p, s + B - 3), e.stroke(), e.setLineDash([])), d > 0 && y > 0 && (e.strokeStyle = f(a, .5 * d), e.lineWidth = 1, e.setLineDash([]), e.beginPath(), e.roundRect(c, s, y, B, 4), e.stroke()), o > .35 && (e.globalAlpha = Math.min(1, (o - .35) / .4), e.font = "bold 9px 'JetBrains Mono', monospace", e.fillStyle = d > 0 ? a : u.t2, e.textAlign = "left", e.textBaseline = "middle", e.fillText(`£${n.total ?? 0}M`, c + y + 6, s + B / 2), e.globalAlpha = 1), C(l.current, n.id, c, s, Math.max(y, 1), B, {
746
+ ]), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = m(a, .55), e.lineWidth = 1, e.beginPath(), e.moveTo(c + p, s + 3), e.lineTo(c + p, s + B - 3), e.stroke(), e.setLineDash([])), d > 0 && h > 0 && (e.strokeStyle = m(a, .5 * d), e.lineWidth = 1, e.setLineDash([]), e.beginPath(), e.roundRect(c, s, h, B, 4), e.stroke()), o > .35 && (e.globalAlpha = Math.min(1, (o - .35) / .4), e.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", e.fillStyle = d > 0 ? a : u.t2, e.textAlign = "left", e.textBaseline = "middle", e.fillText(`£${n.total ?? 0}M`, c + h + 6, s + B / 2), e.globalAlpha = 1), T(l.current, n.id, c, s, Math.max(h, 1), B, {
737
747
  label: n.name,
738
748
  value: `£${n.total ?? 0}M total`,
739
749
  sublabel: `Base £${n.base ?? 0}M + Var £${n.variation ?? 0}M · ${n.percentage ?? 0}% committed`,
740
750
  color: a
741
751
  });
742
752
  });
743
- let n = ge - 14;
744
- e.textBaseline = "middle", e.font = "7px 'DM Sans', sans-serif", e.textAlign = "left", e.fillStyle = f(u.cyan, .5), e.beginPath(), e.roundRect(z.left + ve, n - 3, 14, 6, 2), e.fill(), e.fillStyle = f(u.t3, .45), e.fillText("base value", z.left + ve + 18, n), e.fillStyle = f(u.cyan, .22), e.beginPath(), e.roundRect(z.left + ve + 94, n - 3, 14, 6, 2), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = f(u.cyan, .5), e.lineWidth = .5, e.beginPath(), e.moveTo(z.left + ve + 101, n - 3), e.lineTo(z.left + ve + 101, n + 3), e.stroke(), e.setLineDash([]), e.fillStyle = f(u.t3, .45), e.fillText("approved variations", z.left + ve + 112, n), e.font = "bold 8px 'JetBrains Mono', monospace", e.textAlign = "right", e.fillStyle = f(u.t2, .6), e.fillText(`Portfolio: £${p?.total ?? 0}M`, he - 8, n);
745
- }, !0, { easing: T }), /* @__PURE__ */ c("div", {
753
+ let n = ve - 14;
754
+ e.textBaseline = "middle", e.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", e.textAlign = "left", e.fillStyle = m(u.cyan, .5), e.beginPath(), e.roundRect(z.left + be, n - 3, 14, 6, 2), e.fill(), e.fillStyle = p.color, e.fillText("base value", z.left + be + 18, n), e.fillStyle = m(u.cyan, .22), e.beginPath(), e.roundRect(z.left + be + 94, n - 3, 14, 6, 2), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = m(u.cyan, .5), e.lineWidth = .5, e.beginPath(), e.moveTo(z.left + be + 101, n - 3), e.lineTo(z.left + be + 101, n + 3), e.stroke(), e.setLineDash([]), e.fillStyle = p.color, e.fillText("approved variations", z.left + be + 112, n), e.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", e.textAlign = "right", e.fillStyle = p.color, e.fillText(`Portfolio: £${h?.total ?? 0}M`, _e - 8, n);
755
+ }, !0, { easing: D }), /* @__PURE__ */ c("div", {
746
756
  "data-testid": t,
747
757
  style: {
748
758
  position: "relative",
749
- width: he,
750
- height: ge
759
+ width: _e,
760
+ height: ve
751
761
  },
752
762
  children: [/* @__PURE__ */ s("canvas", {
753
763
  ref: n,
754
764
  role: "img",
755
765
  "aria-label": "Total contract value per contractor — horizontal bar chart",
756
766
  style: {
757
- width: he,
758
- height: ge,
767
+ width: _e,
768
+ height: ve,
759
769
  display: "block",
760
770
  borderRadius: 8
761
771
  }
762
- }), /* @__PURE__ */ s(b, {
772
+ }), /* @__PURE__ */ s(S, {
763
773
  ...o,
764
- parentW: he,
765
- parentH: ge
774
+ parentW: _e,
775
+ parentH: ve
766
776
  })]
767
777
  });
768
778
  }
769
779
  //#endregion
770
780
  //#region src/components/contractorRank/ContractorRank.tsx
771
- var be = 780, V = 240, xe = 12, Se = 10, Ce = [
781
+ var Se = 780, V = 240, Ce = 12, we = 10, Te = [
772
782
  "Highest exposure",
773
783
  "Elevated risk",
774
784
  "Moderate exposure",
775
785
  "Moderate exposure",
776
786
  "Low exposure"
777
787
  ];
778
- function we({ contractors: e, "data-testid": t }) {
779
- let r = a(null), i = a(0), o = a(/* @__PURE__ */ new Map()), { hoveredRef: l, tooltip: d, hitZonesRef: p } = x(r, {
780
- width: be,
788
+ function Ee({ contractors: e = [], "data-testid": t }) {
789
+ let r = a(null), i = a(0), o = a(/* @__PURE__ */ new Map()), { hoveredRef: l, tooltip: p, hitZonesRef: h } = C(r, {
790
+ width: Se,
781
791
  height: V
782
- }), m = [...e].sort((e, t) => (t.count ?? 0) - (e.count ?? 0)).slice(0, 5), _ = m.reduce((e, t) => e + (t.count ?? 0), 0);
792
+ }), g = [...e].sort((e, t) => (t.count ?? 0) - (e.count ?? 0)).slice(0, 5), y = g.reduce((e, t) => e + (t.count ?? 0), 0);
783
793
  return n(() => {
784
794
  let e = r.current;
785
795
  if (!e) return;
786
- let t = h(e, be, V);
796
+ let t = _(e, Se, V);
787
797
  i.current = 0;
788
- let n = Math.min(5, m.length), a = (be - 2 * xe - (n - 1) * Se) / n, s = V * .84, c = V * .08, d, y = () => {
798
+ let n = Math.min(5, g.length), a = (Se - 2 * Ce - (n - 1) * we) / n, s = V * .84, c = V * .08, p, x = () => {
789
799
  i.current++;
790
800
  let e = i.current;
791
- t.clearRect(0, 0, be, V), p.current = [], o.current.forEach((e, t) => {
801
+ t.clearRect(0, 0, Se, V), h.current = [], o.current.forEach((e, t) => {
792
802
  let n = t === l.current ? 1 : 0, r = e + (n - e) * .12;
793
803
  Math.abs(r - n) < .005 ? n === 0 ? o.current.delete(t) : o.current.set(t, 1) : o.current.set(t, r);
794
- }), l.current && !o.current.has(l.current) && o.current.set(l.current, 0), m.forEach((n, r) => {
795
- let i = r === 0, l = i ? u.red : r === 1 ? u.amber : u.blue, d = xe + r * (a + Se), m = o.current.get(n.id) ?? 0, h = m * 8, v = d - h / 2, y = a + h, b = i ? O(e, .04, 3e-4) * .06 + .06 : 0;
796
- t.fillStyle = f(l, .08 + m * .07), t.beginPath(), t.roundRect(v, c, y, s, 6), t.fill(), t.strokeStyle = f(l, .2 + m * .4 + b), t.lineWidth = i ? 1.5 : 1, t.stroke(), (m > .01 || i) && g(t, v + y / 2, c + s / 2, y * .55, l, b + m * .14), t.font = "bold 8px 'JetBrains Mono', monospace", t.textAlign = "left", t.textBaseline = "top", t.fillStyle = f(l, .5 + m * .35), t.fillText(`#${r + 1}`, v + 7, c + 6);
797
- let x = a * .28, S = v + y / 2, w = c + s * .38, T = t.createRadialGradient(S, w - x * .2, 0, S, w, x);
798
- T.addColorStop(0, f(l, .5 + m * .2)), T.addColorStop(1, f(l, .2 + m * .1)), t.beginPath(), t.arc(S, w, x, 0, Math.PI * 2), t.fillStyle = T, t.fill(), t.strokeStyle = f(l, .4 + m * .3), t.lineWidth = 1, t.stroke(), t.font = `bold ${Math.min(10, a * .11)}px 'JetBrains Mono', monospace`, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = f(u.t1, .9), t.fillText(n.abbreviation ?? n.name.slice(0, 6), S, w), t.font = `bold ${Math.min(18, a * .18)}px 'JetBrains Mono', monospace`, t.textBaseline = "alphabetic", t.fillStyle = f(l, .9 + m * .1), t.fillText(String(n.count ?? 0), S, c + s * .76), t.font = "8px 'JetBrains Mono', monospace", t.fillStyle = f(u.t2, .6), t.fillText("open EWs", S, c + s * .88);
799
- let E = Math.round((n.count ?? 0) / (_ || 1) * 100), D = Ce[r] ?? "Low exposure";
800
- C(p.current, n.id, d, c, a, s, {
804
+ }), l.current && !o.current.has(l.current) && o.current.set(l.current, 0), g.forEach((n, r) => {
805
+ let i = r === 0, l = r === 0 ? u.red : r === 1 ? u.amber : d[r % d.length], p = Ce + r * (a + we), g = o.current.get(n.id) ?? 0, _ = g * 8, b = p - _ / 2, x = a + _, S = i ? A(e, .04, 3e-4) * .06 + .06 : 0;
806
+ t.fillStyle = m(l, .08 + g * .07), t.beginPath(), t.roundRect(b, c, x, s, 6), t.fill(), t.strokeStyle = m(l, .2 + g * .4 + S), t.lineWidth = i ? 1.5 : 1, t.stroke(), (g > .01 || i) && v(t, b + x / 2, c + s / 2, x * .55, l, S + g * .14), t.font = "bold " + f.font, t.textAlign = "left", t.textBaseline = "top", t.fillStyle = m(l, .5 + g * .35), t.fillText(`#${r + 1}`, b + 7, c + 6);
807
+ let C = Math.min(a * .28, s * .32, 72), w = b + x / 2, E = c + s * .38, D = t.createRadialGradient(w, E - C * .2, 0, w, E, C);
808
+ D.addColorStop(0, m(l, .5 + g * .2)), D.addColorStop(1, m(l, .2 + g * .1)), t.beginPath(), t.arc(w, E, C, 0, Math.PI * 2), t.fillStyle = D, t.fill(), t.strokeStyle = m(l, .4 + g * .3), t.lineWidth = 1, t.stroke(), t.font = "bold " + f.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = m(u.t1, .9), t.fillText(n.abbreviation ?? n.name.slice(0, 6), w, E), t.font = "bold 14px 'Satoshi Variable', 'DM Sans', sans-serif", t.textBaseline = "alphabetic", t.fillStyle = m(l, .9 + g * .1), t.fillText(String(n.count ?? 0), w, c + s * .76), t.font = f.font, t.fillStyle = f.color, t.fillText("open EWs", w, c + s * .88);
809
+ let O = Math.round((n.count ?? 0) / (y || 1) * 100), k = Te[r] ?? "Low exposure";
810
+ T(h.current, n.id, p, c, a, s, {
801
811
  label: n.name,
802
- value: `${n.count ?? 0} open · ${E}% of total`,
803
- sublabel: `Rank #${r + 1} · ${D}`,
812
+ value: `${n.count ?? 0} open · ${O}% of total`,
813
+ sublabel: `Rank #${r + 1} · ${k}`,
804
814
  color: l
805
815
  });
806
- }), v(t, be, V, e, .015), d = requestAnimationFrame(y);
816
+ }), b(t, Se, V, e, .015), p = requestAnimationFrame(x);
807
817
  };
808
- return y(), () => cancelAnimationFrame(d);
809
- }, [m, _]), /* @__PURE__ */ c("div", {
818
+ return x(), () => cancelAnimationFrame(p);
819
+ }, [g, y]), /* @__PURE__ */ c("div", {
810
820
  "data-testid": t,
811
821
  style: {
812
822
  position: "relative",
813
- width: be,
823
+ width: Se,
814
824
  height: V
815
825
  },
816
826
  children: [/* @__PURE__ */ s("canvas", {
@@ -818,14 +828,14 @@ function we({ contractors: e, "data-testid": t }) {
818
828
  role: "img",
819
829
  "aria-label": "Contractor rank — open EW count per contractor",
820
830
  style: {
821
- width: be,
831
+ width: Se,
822
832
  height: V,
823
833
  display: "block",
824
834
  borderRadius: 8
825
835
  }
826
- }), /* @__PURE__ */ s(b, {
827
- ...d,
828
- parentW: be,
836
+ }), /* @__PURE__ */ s(S, {
837
+ ...p,
838
+ parentW: Se,
829
839
  parentH: V
830
840
  })]
831
841
  });
@@ -833,43 +843,43 @@ function we({ contractors: e, "data-testid": t }) {
833
843
  //#endregion
834
844
  //#region src/components/ewCategory/EWCategory.tsx
835
845
  var H = 680, U = 260;
836
- function Te({ categories: e, "data-testid": t }) {
837
- let r = a(null), i = a(0), o = a(/* @__PURE__ */ new Map()), { hoveredRef: l, tooltip: d, hitZonesRef: p } = x(r, {
846
+ function De({ categories: e = [], "data-testid": t }) {
847
+ let r = a(null), i = a(0), o = a(/* @__PURE__ */ new Map()), { hoveredRef: l, tooltip: d, hitZonesRef: f } = C(r, {
838
848
  width: H,
839
849
  height: U
840
850
  });
841
851
  return n(() => {
842
852
  let t = r.current;
843
853
  if (!t) return;
844
- let n = h(t, H, U);
854
+ let n = _(t, H, U);
845
855
  i.current = 0;
846
- let a = e.length, s = Math.max(...e.map((e) => e.count), 1), c = s, d = H * .05, m = U * .1, y = H * .9 / a, b = U * .7 / c, x = e.reduce((e, t) => e + t.count, 0), C, w = () => {
856
+ let a = e.length, s = Math.max(...e.map((e) => e.count), 1), c = s, d = H * .05, p = U * .1, h = H * .9 / a, g = U * .7 / c, x = e.reduce((e, t) => e + t.count, 0), S, C = () => {
847
857
  i.current++;
848
858
  let t = i.current;
849
- n.clearRect(0, 0, H, U), p.current = [], o.current.forEach((e, t) => {
859
+ n.clearRect(0, 0, H, U), f.current = [], o.current.forEach((e, t) => {
850
860
  let n = t === l.current ? 1 : 0, r = e + (n - e) * .12;
851
861
  Math.abs(r - n) < .005 ? n === 0 ? o.current.delete(t) : o.current.set(t, 1) : o.current.set(t, r);
852
- }), l.current && !o.current.has(l.current) && o.current.set(l.current, 0), _(n, H, U, t, 40, f(u.blue, .04)), e.forEach((e, r) => {
862
+ }), l.current && !o.current.has(l.current) && o.current.set(l.current, 0), y(n, H, U, t, 40, m(u.blue, .04)), e.forEach((e, r) => {
853
863
  let i = e.count === s, a = i ? u.cyan : u.blue, l = o.current.get(`${e.category}-col`) ?? 0;
854
864
  for (let u = 0; u < c; u++) {
855
- let c = d + r * y + y / 2, h = m + u * b + b / 2, _ = Math.min(y, b) * .38;
865
+ let c = d + r * h + h / 2, _ = p + u * g + g / 2, y = Math.min(h, g) * .38;
856
866
  if (u >= s - e.count) {
857
- let s = _ * (1 + (O(t, .04, 5e-4) + Math.sin(r * .6 + u * 1.2) * .3) * .12);
858
- (i || l > .01) && g(n, c, h, s * 3, a, (i ? .2 : .1) + l * .1), n.beginPath(), n.arc(c, h, s, 0, Math.PI * 2), n.fillStyle = f(a, i ? .8 : .5 + l * .2), n.fill();
867
+ let s = y * (1 + (A(t, .04, 5e-4) + Math.sin(r * .6 + u * 1.2) * .3) * .12);
868
+ (i || l > .01) && v(n, c, _, s * 3, a, (i ? .2 : .1) + l * .1), n.beginPath(), n.arc(c, _, s, 0, Math.PI * 2), n.fillStyle = m(a, i ? .8 : .5 + l * .2), n.fill();
859
869
  let d = `${e.category}-${u}`;
860
- S(p.current, d, c, h, _ + 4, {
870
+ w(f.current, d, c, _, y + 4, {
861
871
  label: e.fullName,
862
872
  value: `${e.count} Early Warnings`,
863
873
  sublabel: `${Math.round(e.count / x * 100)}% of total`,
864
874
  color: a
865
875
  }), o.current.get(`${e.category}-col`);
866
- } else n.beginPath(), n.arc(c, h, 1, 0, Math.PI * 2), n.fillStyle = f(a, .08), n.fill();
876
+ } else n.beginPath(), n.arc(c, _, 1, 0, Math.PI * 2), n.fillStyle = m(a, .08), n.fill();
867
877
  }
868
- let h = m + c * b + 16;
869
- n.font = `${i ? "bold " : ""}9px 'JetBrains Mono', monospace`, n.textAlign = "center", n.textBaseline = "alphabetic", n.fillStyle = i ? u.cyan : f(u.t2, .65), n.fillText(e.category, d + r * y + y / 2, h);
870
- }), v(n, H, U, t, .015), C = requestAnimationFrame(w);
878
+ let _ = p + c * g + 16;
879
+ n.font = `${i ? "bold " : ""}9px 'JetBrains Mono', monospace`, n.textAlign = "center", n.textBaseline = "alphabetic", n.fillStyle = i ? u.cyan : m(u.t2, .65), n.fillText(e.category, d + r * h + h / 2, _);
880
+ }), b(n, H, U, t, .015), S = requestAnimationFrame(C);
871
881
  };
872
- return w(), () => cancelAnimationFrame(C);
882
+ return C(), () => cancelAnimationFrame(S);
873
883
  }, [e]), /* @__PURE__ */ c("div", {
874
884
  "data-testid": t,
875
885
  style: {
@@ -887,7 +897,7 @@ function Te({ categories: e, "data-testid": t }) {
887
897
  display: "block",
888
898
  borderRadius: 8
889
899
  }
890
- }), /* @__PURE__ */ s(b, {
900
+ }), /* @__PURE__ */ s(S, {
891
901
  ...d,
892
902
  parentW: H,
893
903
  parentH: U
@@ -896,8 +906,8 @@ function Te({ categories: e, "data-testid": t }) {
896
906
  }
897
907
  //#endregion
898
908
  //#region src/components/lineChart/LineChart.tsx
899
- function Ee({ rows: e = [], className: t, colors: n }) {
900
- return /* @__PURE__ */ s(N, {
909
+ function Oe({ rows: e = [], className: t, colors: n }) {
910
+ return /* @__PURE__ */ s(te, {
901
911
  rows: e,
902
912
  variant: "line",
903
913
  className: t,
@@ -906,14 +916,16 @@ function Ee({ rows: e = [], className: t, colors: n }) {
906
916
  }
907
917
  //#endregion
908
918
  //#region src/components/constants.ts
909
- var De = [
910
- "#6bbcff",
911
- "#5fe6dd",
912
- "#d7bc6d",
913
- "#95a9ff",
914
- "#7fb58a",
915
- "#ee8a8a"
916
- ], Oe = {
919
+ var ke = [
920
+ "#36BFFA",
921
+ "#16B364",
922
+ "#D444F1",
923
+ "#FAC515",
924
+ "#2970FF",
925
+ "#7A5AF8",
926
+ "#EF6820",
927
+ "#D92D20"
928
+ ], Ae = {
917
929
  nodes: [
918
930
  {
919
931
  id: "supplier-x",
@@ -956,8 +968,8 @@ var De = [
956
968
  };
957
969
  //#endregion
958
970
  //#region src/components/miniBars/MiniBars.tsx
959
- function ke({ rows: e = [], className: t, colors: n }) {
960
- let r = n?.slices ?? De;
971
+ function je({ rows: e = [], className: t, colors: n }) {
972
+ let r = n?.slices ?? ke;
961
973
  return /* @__PURE__ */ s("div", {
962
974
  className: ["d3-mini-bars", t].filter(Boolean).join(" "),
963
975
  children: e.map(([e, t, n], i) => /* @__PURE__ */ c("div", {
@@ -983,7 +995,7 @@ function ke({ rows: e = [], className: t, colors: n }) {
983
995
  width: Math.max(0, Math.min(100, t)),
984
996
  height: "12",
985
997
  rx: "6",
986
- className: `d3-mini-fill tone-${i % De.length}`,
998
+ className: `d3-mini-fill tone-${i % ke.length}`,
987
999
  fill: r[i % r.length]
988
1000
  })]
989
1001
  })
@@ -995,103 +1007,103 @@ function ke({ rows: e = [], className: t, colors: n }) {
995
1007
  }
996
1008
  //#endregion
997
1009
  //#region src/components/nceTree/NCETree.tsx
998
- var Ae = 680, W = 320;
999
- function je({ total: e = 0, byContractor: t = [], "data-testid": r }) {
1000
- let i = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), { hoveredRef: p, tooltip: m, hitZonesRef: _ } = x(i, {
1001
- width: Ae,
1002
- height: W
1010
+ var Me = 680, Ne = 320;
1011
+ function Pe({ total: e = 0, byContractor: t = [], "data-testid": r }) {
1012
+ let i = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), { hoveredRef: p, tooltip: h, hitZonesRef: g } = C(i, {
1013
+ width: Me,
1014
+ height: Ne
1003
1015
  });
1004
1016
  return n(() => {
1005
1017
  let n = i.current;
1006
1018
  if (!n) return;
1007
- let r = h(n, Ae, W);
1019
+ let r = _(n, Me, Ne);
1008
1020
  l.current = 0;
1009
- let a = W / 2, s = Ae - 80, c = Math.max(...t.map((e) => e.count ?? 0)), m = (W - 60) / (t.length - 1), v = t.map((e, t) => ({
1021
+ let a = Ne / 2, s = Me - 80, c = Math.max(...t.map((e) => e.count ?? 0)), h = (Ne - 60) / (t.length - 1), y = t.map((e, t) => ({
1010
1022
  x: s,
1011
- y: 30 + t * m
1012
- })), y, b = () => {
1023
+ y: 30 + t * h
1024
+ })), b, x = () => {
1013
1025
  l.current++;
1014
1026
  let n = l.current;
1015
- r.clearRect(0, 0, Ae, W);
1016
- let i = w(Math.min(n / 72, 1));
1017
- A(o.current, p.current), _.current = [], g(r, 88, a, 48 * i, u.blue, .15 * i), t.forEach((n, l) => {
1018
- let p = d[l % d.length], m = k(i, l, t.length, w), h = v[l], y = o.current.get(n.id) ?? 0, b = Math.max(1.5, (n.count ?? 0) / c * 6);
1019
- if (m < .01) return;
1020
- let x = 88 + (s - 88) * .4, C = a, T = 88 + (s - 88) * .6, E = h.y, D = m;
1027
+ r.clearRect(0, 0, Me, Ne);
1028
+ let i = E(Math.min(n / 72, 1));
1029
+ M(o.current, p.current), g.current = [], v(r, 88, a, 48 * i, u.blue, .15 * i), t.forEach((n, l) => {
1030
+ let p = d[l % d.length], h = j(i, l, t.length, E), _ = y[l], b = o.current.get(n.id) ?? 0, x = Math.max(1.5, (n.count ?? 0) / c * 6);
1031
+ if (h < .01) return;
1032
+ let S = 88 + (s - 88) * .4, C = a, T = 88 + (s - 88) * .6, D = _.y, O = h;
1021
1033
  r.beginPath();
1022
1034
  for (let e = 0; e <= 40; e++) {
1023
- let t = e / 40 * D, n = (1 - t) ** 3 * 88 + 3 * (1 - t) ** 2 * t * x + 3 * (1 - t) * t ** 2 * T + t ** 3 * h.x, i = (1 - t) ** 3 * a + 3 * (1 - t) ** 2 * t * C + 3 * (1 - t) * t ** 2 * E + t ** 3 * h.y;
1035
+ let t = e / 40 * O, n = (1 - t) ** 3 * 88 + 3 * (1 - t) ** 2 * t * S + 3 * (1 - t) * t ** 2 * T + t ** 3 * _.x, i = (1 - t) ** 3 * a + 3 * (1 - t) ** 2 * t * C + 3 * (1 - t) * t ** 2 * D + t ** 3 * _.y;
1024
1036
  e === 0 ? r.moveTo(n, i) : r.lineTo(n, i);
1025
1037
  }
1026
- if (r.strokeStyle = f(p, y > 0 ? .8 : .45), r.lineWidth = b * (y > 0 ? 1.3 : 1), r.stroke(), m > .85) {
1027
- let t = Math.min(1, (m - .85) / .15), i = 4 + (n.count ?? 0) / c * 12;
1028
- g(r, h.x, h.y, i * 2.5, p, (.25 + y * .2) * t), r.beginPath(), r.arc(h.x, h.y, i * t, 0, Math.PI * 2), r.fillStyle = f(p, (.7 + y * .2) * t), r.fill(), S(_.current, n.id, h.x, h.y, i + 8, {
1038
+ if (r.strokeStyle = m(p, b > 0 ? .8 : .45), r.lineWidth = x * (b > 0 ? 1.3 : 1), r.stroke(), h > .85) {
1039
+ let t = Math.min(1, (h - .85) / .15), i = 4 + (n.count ?? 0) / c * 12;
1040
+ v(r, _.x, _.y, i * 2.5, p, (.25 + b * .2) * t), r.beginPath(), r.arc(_.x, _.y, i * t, 0, Math.PI * 2), r.fillStyle = m(p, (.7 + b * .2) * t), r.fill(), w(g.current, n.id, _.x, _.y, i + 8, {
1029
1041
  label: n.name,
1030
1042
  value: `${n.count ?? 0} NCEs raised`,
1031
1043
  sublabel: `${Math.round((n.count ?? 0) / e * 100)}% of all NCEs`,
1032
1044
  color: p
1033
- }), r.globalAlpha = t, r.font = "bold 9px 'JetBrains Mono', monospace", r.fillStyle = y > 0 ? p : f(u.t2, .85), r.textAlign = "left", r.fillText(n.abbreviation ?? n.name.slice(0, 6), h.x + i + 6, h.y - 3), r.font = "bold 11px 'JetBrains Mono', monospace", r.fillStyle = y > 0 ? p : u.t1, r.fillText(String(n.count ?? 0), h.x + i + 6, h.y + 10), r.globalAlpha = 1;
1045
+ }), r.globalAlpha = t, r.font = f.font, r.fillStyle = b > 0 ? p : m(u.t2, .85), r.textAlign = "left", r.fillText(n.abbreviation ?? n.name.slice(0, 6), _.x + i + 6, _.y - 3), r.font = f.font, r.fillStyle = b > 0 ? p : u.t1, r.fillText(String(n.count ?? 0), _.x + i + 6, _.y + 10), r.globalAlpha = 1;
1034
1046
  }
1035
- }), r.beginPath(), r.arc(88, a, 32 * i, 0, Math.PI * 2), r.fillStyle = u.bgL, r.fill(), r.strokeStyle = f(u.blue, .6 * i), r.lineWidth = 2, r.stroke(), i > .4 && (r.globalAlpha = Math.min(1, (i - .4) / .4), r.font = "bold 18px 'JetBrains Mono', monospace", r.fillStyle = u.t1, r.textAlign = "center", r.fillText(String(e), 88, a + 5), r.font = "8px 'JetBrains Mono', monospace", r.fillStyle = u.t3, r.fillText("NCEs", 88, a + 18), r.globalAlpha = 1), y = requestAnimationFrame(b);
1047
+ }), r.beginPath(), r.arc(88, a, 32 * i, 0, Math.PI * 2), r.fillStyle = u.bgL, r.fill(), r.strokeStyle = m(u.blue, .6 * i), r.lineWidth = 2, r.stroke(), i > .4 && (r.globalAlpha = Math.min(1, (i - .4) / .4), r.font = "500 24px 'Satoshi Variable', 'DM Sans', sans-serif", r.fillStyle = u.t1, r.textAlign = "center", r.fillText(String(e), 88, a + 5), r.font = f.font, r.fillStyle = f.color, r.fillText("NCEs", 88, a + 18), r.globalAlpha = 1), b = requestAnimationFrame(x);
1036
1048
  };
1037
- return b(), () => cancelAnimationFrame(y);
1049
+ return x(), () => cancelAnimationFrame(b);
1038
1050
  }, [e, t]), /* @__PURE__ */ c("div", {
1039
1051
  "data-testid": r,
1040
1052
  style: {
1041
1053
  position: "relative",
1042
- width: Ae,
1043
- height: W
1054
+ width: Me,
1055
+ height: Ne
1044
1056
  },
1045
1057
  children: [/* @__PURE__ */ s("canvas", {
1046
1058
  ref: i,
1047
1059
  role: "img",
1048
1060
  "aria-label": "NCE fault tree — NCEs per contractor as branching tree",
1049
1061
  style: {
1050
- width: Ae,
1051
- height: W,
1062
+ width: Me,
1063
+ height: Ne,
1052
1064
  display: "block"
1053
1065
  }
1054
- }), /* @__PURE__ */ s(b, {
1055
- ...m,
1056
- parentW: Ae,
1057
- parentH: W
1066
+ }), /* @__PURE__ */ s(S, {
1067
+ ...h,
1068
+ parentW: Me,
1069
+ parentH: Ne
1058
1070
  })]
1059
1071
  });
1060
1072
  }
1061
1073
  //#endregion
1062
1074
  //#region src/components/pieChart/PieChart.tsx
1063
- var Me = 192, Ne = Me, Pe = Me + 80;
1064
- function Fe({ rows: e = [], variant: t, className: r, colors: i }) {
1065
- let o = a(null), p = a(/* @__PURE__ */ new Map()), _ = a(0), v = i?.slices ?? d, { hoveredRef: y, tooltip: C, hitZonesRef: w } = x(o, {
1066
- width: Ne,
1067
- height: Pe
1075
+ var Fe = 192, Ie = Fe, Le = Fe + 80;
1076
+ function Re({ rows: e = [], variant: t, className: r, colors: i }) {
1077
+ let o = a(null), f = a(/* @__PURE__ */ new Map()), p = a(0), h = i?.slices ?? d, { hoveredRef: y, tooltip: b, hitZonesRef: x } = C(o, {
1078
+ width: Ie,
1079
+ height: Le
1068
1080
  });
1069
1081
  return n(() => {
1070
1082
  let n = o.current;
1071
1083
  if (!n) return;
1072
- let r = h(n, Ne, Pe);
1073
- _.current = 0;
1074
- let i = Ne / 2, a = Me / 2, s = Me * .4, c = t === "donut" ? Me * .21 : 0, l = e.reduce((e, t) => e + (t.pricing ?? 0), 0) || 1, d, b = () => {
1075
- _.current++;
1076
- let n = _.current;
1077
- r.clearRect(0, 0, Ne, Pe);
1084
+ let r = _(n, Ie, Le);
1085
+ p.current = 0;
1086
+ let i = Ie / 2, a = Fe / 2, s = Fe * .4, c = t === "donut" ? Fe * .21 : 0, l = e.reduce((e, t) => e + (t.pricing ?? 0), 0) || 1, d, b = () => {
1087
+ p.current++;
1088
+ let n = p.current;
1089
+ r.clearRect(0, 0, Ie, Le);
1078
1090
  let o = 1 - (1 - Math.min(n / 48, 1)) ** 3;
1079
- A(p.current, y.current), w.current = [];
1080
- let h = -Math.PI / 2;
1091
+ M(f.current, y.current), x.current = [];
1092
+ let _ = -Math.PI / 2;
1081
1093
  e.forEach((e, t) => {
1082
- let d = (e.pricing ?? 0) / l, m = d * Math.PI * 2 * o, _ = h + m, y = v[t % v.length], b = p.current.get(e.id ?? `sl-${t}`) ?? 0, x = h + m / 2, C = (s + c) / 2, T = i + Math.cos(x) * C, E = a + Math.sin(x) * C, D = (s - c) / 2 + 8;
1083
- S(w.current, e.id ?? `sl-${t}`, T, E, D, {
1094
+ let d = (e.pricing ?? 0) / l, p = d * Math.PI * 2 * o, g = _ + p, y = h[t % h.length], b = f.current.get(e.id ?? `sl-${t}`) ?? 0, S = _ + p / 2, C = (s + c) / 2, T = i + Math.cos(S) * C, E = a + Math.sin(S) * C, D = (s - c) / 2 + 8;
1095
+ w(x.current, e.id ?? `sl-${t}`, T, E, D, {
1084
1096
  label: e.vendor,
1085
1097
  value: `${e.pricing ?? 0} (${Math.round(d * 100)}%)`,
1086
1098
  color: y
1087
- }), b > 0 && g(r, T, E, D * 2 * b, y, .2 * b);
1088
- let k = O(n, .03, 3e-4), A = s + b * 6 + (b > 0 ? k * 2 : 0);
1089
- r.beginPath(), r.moveTo(i + Math.cos(h) * c, a + Math.sin(h) * c), r.arc(i, a, A, h, _), c > 0 ? r.arc(i, a, c, _, h, !0) : r.lineTo(i, a), r.closePath(), r.fillStyle = f(y, .7 + b * .2), r.fill(), r.strokeStyle = f(u.bg, .8), r.lineWidth = 1.5, r.stroke(), h = _;
1090
- }), t === "donut" && e.length > 0 && g(r, i, a, c * .8, u.blue, .06);
1091
- let x = Me + 12;
1099
+ }), b > 0 && v(r, T, E, D * 2 * b, y, .2 * b);
1100
+ let O = A(n, .03, 3e-4), k = s + b * 6 + (b > 0 ? O * 2 : 0);
1101
+ r.beginPath(), r.moveTo(i + Math.cos(_) * c, a + Math.sin(_) * c), r.arc(i, a, k, _, g), c > 0 ? r.arc(i, a, c, g, _, !0) : r.lineTo(i, a), r.closePath(), r.fillStyle = m(y, .7 + b * .2), r.fill(), r.strokeStyle = m(u.bg, .8), r.lineWidth = 1.5, r.stroke(), _ = g;
1102
+ }), t === "donut" && e.length > 0 && v(r, i, a, c * .8, u.blue, .06);
1103
+ let S = Fe + 12;
1092
1104
  e.forEach((e, t) => {
1093
- let n = v[t % v.length], i = (e.pricing ?? 0) / l, a = p.current.get(e.id ?? `sl-${t}`) ?? 0, o = x + t * 18;
1094
- r.beginPath(), r.arc(8, o, 4, 0, Math.PI * 2), r.fillStyle = f(n, .8 + a * .2), r.fill(), r.font = "9px 'JetBrains Mono', monospace", r.fillStyle = f(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 = m(u.t3, n, a), r.textAlign = "right", r.fillText(`${e.pricing ?? 0} (${Math.round(i * 100)}%)`, Ne - 4, o + 3.5);
1105
+ let n = h[t % h.length], i = (e.pricing ?? 0) / l, a = f.current.get(e.id ?? `sl-${t}`) ?? 0, o = S + t * 18;
1106
+ r.beginPath(), r.arc(8, o, 4, 0, Math.PI * 2), r.fillStyle = m(n, .8 + a * .2), r.fill(), r.font = "9px 'JetBrains Mono', monospace", r.fillStyle = m(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 = g(u.t3, n, a), r.textAlign = "right", r.fillText(`${e.pricing ?? 0} (${Math.round(i * 100)}%)`, Ie - 4, o + 3.5);
1095
1107
  }), d = requestAnimationFrame(b);
1096
1108
  };
1097
1109
  return b(), () => cancelAnimationFrame(d);
@@ -1099,36 +1111,36 @@ function Fe({ rows: e = [], variant: t, className: r, colors: i }) {
1099
1111
  e,
1100
1112
  t,
1101
1113
  i,
1102
- v
1114
+ h
1103
1115
  ]), /* @__PURE__ */ s(l, {
1104
1116
  className: ["canvas-pie-frame", r].filter(Boolean).join(" "),
1105
1117
  children: /* @__PURE__ */ c("div", {
1106
1118
  style: {
1107
1119
  position: "relative",
1108
- width: Ne,
1109
- height: Pe
1120
+ width: Ie,
1121
+ height: Le
1110
1122
  },
1111
1123
  children: [/* @__PURE__ */ s("canvas", {
1112
1124
  ref: o,
1113
1125
  role: "img",
1114
1126
  "aria-label": `${t} chart`,
1115
1127
  style: {
1116
- width: Ne,
1117
- height: Pe,
1128
+ width: Ie,
1129
+ height: Le,
1118
1130
  display: "block",
1119
1131
  borderRadius: 8
1120
1132
  }
1121
- }), /* @__PURE__ */ s(b, {
1122
- ...C,
1123
- parentW: Ne,
1124
- parentH: Pe
1133
+ }), /* @__PURE__ */ s(S, {
1134
+ ...b,
1135
+ parentW: Ie,
1136
+ parentH: Le
1125
1137
  })]
1126
1138
  })
1127
1139
  });
1128
1140
  }
1129
1141
  //#endregion
1130
1142
  //#region src/components/sankey/SankeySvg.tsx
1131
- function Ie(e, t, n, r) {
1143
+ function ze(e, t, n, r) {
1132
1144
  let i = new Set(t.map((e) => e.source)), a = new Set(t.map((e) => e.target)), o = /* @__PURE__ */ new Map(), s = [];
1133
1145
  for (e.forEach((e) => {
1134
1146
  i.has(e.id) && !a.has(e.id) && s.push({
@@ -1173,67 +1185,67 @@ function Ie(e, t, n, r) {
1173
1185
  });
1174
1186
  }), f;
1175
1187
  }
1176
- function Le({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: p, selectedEntity: m, className: _, colors: y }) {
1177
- let w = a(null), T = a(/* @__PURE__ */ new Map()), E = a(0), D = a([]), k = y?.nodes ?? d, j = y?.links ?? u.bd, M = y?.activeLinks ?? u.blue, N = y?.activeNodes ?? u.blue, ee = i(() => Ie(e, t, r, o), [
1188
+ function Be({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f, selectedEntity: p, className: h, colors: g }) {
1189
+ let y = a(null), x = a(/* @__PURE__ */ new Map()), E = a(0), D = a([]), O = g?.nodes ?? d, k = g?.links ?? u.bd, j = g?.activeLinks ?? u.blue, ee = g?.activeNodes ?? u.blue, N = i(() => ze(e, t, r, o), [
1178
1190
  e,
1179
1191
  t,
1180
1192
  r,
1181
1193
  o
1182
- ]), { hoveredRef: P, tooltip: F, hitZonesRef: te } = x(w, {
1194
+ ]), { hoveredRef: te, tooltip: ne, hitZonesRef: P } = C(y, {
1183
1195
  width: r,
1184
1196
  height: o
1185
1197
  });
1186
1198
  return n(() => {
1187
- let n = w.current;
1199
+ let n = y.current;
1188
1200
  if (!n) return;
1189
- let i = h(n, r, o);
1201
+ let i = _(n, r, o);
1190
1202
  E.current = 0, D.current = [];
1191
1203
  let a = t.length > 0 ? Math.max(...t.map((e) => e.value)) : 1, s, c = () => {
1192
1204
  E.current++;
1193
1205
  let n = E.current;
1194
1206
  i.clearRect(0, 0, r, o);
1195
1207
  let l = 1 - (1 - Math.min(n / 56, 1)) ** 3;
1196
- A(T.current, P.current), te.current = [], t.forEach((e, t) => {
1197
- let r = ee.get(e.source), o = ee.get(e.target);
1208
+ M(x.current, te.current), P.current = [], t.forEach((e, t) => {
1209
+ let r = N.get(e.source), o = N.get(e.target);
1198
1210
  if (!r || !o) return;
1199
- let s = !!m && (e.source === m || e.target === m), c = s ? M : j, d = s ? .5 : .2, p = Math.max(3, e.value / a * 36 * l), h = p / 2, g = r.x + r.w, _ = r.y + r.h / 2, v = o.x, y = o.y + o.h / 2, b = (g + v) / 2;
1211
+ let s = !!p && (e.source === p || e.target === p), c = s ? j : k, d = s ? .5 : .2, f = Math.max(3, e.value / a * 36 * l), h = f / 2, g = r.x + r.w, _ = r.y + r.h / 2, v = o.x, y = o.y + o.h / 2, b = (g + v) / 2;
1200
1212
  for (let e = 0; e < 30; e++) {
1201
- let r = e / 30, a = (e + 1) / 30, o = 1 - r, s = 1 - a, l = o * o * g + 2 * o * r * b + r * r * v, u = o * o * _ + 2 * o * r * _ + r * r * y, p = s * s * g + 2 * s * a * b + a * a * v, m = s * s * _ + 2 * s * a * _ + a * a * y, x = O(n + r * 120 + t * 40, .025, 3e-4) * 1.2;
1202
- i.beginPath(), i.moveTo(l, u - h + x), i.lineTo(p, m - h + x), i.lineTo(p, m + h + x), i.lineTo(l, u + h + x), i.closePath(), i.fillStyle = f(c, d * (.5 + r * .5)), i.fill();
1213
+ let r = e / 30, a = (e + 1) / 30, o = 1 - r, s = 1 - a, l = o * o * g + 2 * o * r * b + r * r * v, u = o * o * _ + 2 * o * r * _ + r * r * y, f = s * s * g + 2 * s * a * b + a * a * v, p = s * s * _ + 2 * s * a * _ + a * a * y, x = A(n + r * 120 + t * 40, .025, 3e-4) * 1.2;
1214
+ i.beginPath(), i.moveTo(l, u - h + x), i.lineTo(f, p - h + x), i.lineTo(f, p + h + x), i.lineTo(l, u + h + x), i.closePath(), i.fillStyle = m(c, d * (.5 + r * .5)), i.fill();
1203
1215
  }
1204
- S(te.current, `link-${t}`, b, (_ + y) / 2, p + 6, {
1216
+ w(P.current, `link-${t}`, b, (_ + y) / 2, f + 6, {
1205
1217
  label: `${e.source} → ${e.target}`,
1206
1218
  value: String(e.value),
1207
- color: s ? M : u.blue
1219
+ color: s ? j : u.blue
1208
1220
  }), Math.random() < .08 && D.current.push({
1209
1221
  linkIdx: t,
1210
1222
  prog: 0,
1211
1223
  speed: .006 + Math.random() * .006,
1212
- off: (Math.random() - .5) * p * .5,
1224
+ off: (Math.random() - .5) * f * .5,
1213
1225
  sz: 1 + Math.random()
1214
1226
  });
1215
1227
  }), e.forEach((e, t) => {
1216
- let r = ee.get(e.id);
1228
+ let r = N.get(e.id);
1217
1229
  if (!r) return;
1218
- let a = m === e.id, o = P.current === `node-${t}`, s = T.current.get(`node-${t}`) ?? 0, c = a ? N : k[t % k.length];
1219
- C(te.current, `node-${t}`, r.x, r.y, r.w, r.h, {
1230
+ let a = p === e.id, o = te.current === `node-${t}`, s = x.current.get(`node-${t}`) ?? 0, c = a ? ee : O[t % O.length];
1231
+ T(P.current, `node-${t}`, r.x, r.y, r.w, r.h, {
1220
1232
  label: e.name,
1221
1233
  value: e.valueLabel ?? e.id,
1222
1234
  color: c
1223
- }), (s > 0 || a) && g(i, r.x + r.w / 2, r.y + r.h / 2, r.w * 2, c, .2 * Math.max(s, a ? .6 : 0));
1224
- let l = a ? O(n, .03, 3e-4) * .15 : 0;
1225
- i.fillStyle = f(c, .6 + s * .25 + l), i.beginPath(), i.roundRect(r.x, r.y, r.w, r.h, 4), i.fill(), (a || s > 0) && (i.strokeStyle = f(c, .5 * Math.max(s, a ? 1 : 0)), i.lineWidth = 1, i.beginPath(), i.roundRect(r.x, r.y, r.w, r.h, 4), i.stroke());
1235
+ }), (s > 0 || a) && v(i, r.x + r.w / 2, r.y + r.h / 2, r.w * 2, c, .2 * Math.max(s, a ? .6 : 0));
1236
+ let l = a ? A(n, .03, 3e-4) * .15 : 0;
1237
+ i.fillStyle = m(c, .6 + s * .25 + l), i.beginPath(), i.roundRect(r.x, r.y, r.w, r.h, 4), i.fill(), (a || s > 0) && (i.strokeStyle = m(c, .5 * Math.max(s, a ? 1 : 0)), i.lineWidth = 1, i.beginPath(), i.roundRect(r.x, r.y, r.w, r.h, 4), i.stroke());
1226
1238
  let d = r.x + r.w + 8;
1227
- i.font = `${a || o ? "bold " : ""}10px 'JetBrains Mono', monospace`, i.fillStyle = f(a ? c : u.t2, .7 + s * .2), i.textAlign = "left", i.fillText(e.name, d, r.y + r.h / 2 + 4), e.valueLabel && (i.font = "9px 'JetBrains Mono', monospace", i.fillStyle = f(c, .5 + s * .2), i.fillText(e.valueLabel, d, r.y + r.h / 2 + 17));
1239
+ i.font = `${a || o ? "bold " : ""}10px 'JetBrains Mono', monospace`, i.fillStyle = m(a ? c : u.t2, .7 + s * .2), i.textAlign = "left", i.fillText(e.name, d, r.y + r.h / 2 + 4), e.valueLabel && (i.font = "9px 'JetBrains Mono', monospace", i.fillStyle = m(c, .5 + s * .2), i.fillText(e.valueLabel, d, r.y + r.h / 2 + 17));
1228
1240
  }), D.current = D.current.filter((e) => {
1229
1241
  if (e.prog += e.speed, e.prog > 1) return !1;
1230
1242
  let n = t[e.linkIdx];
1231
1243
  if (!n) return !1;
1232
- let r = ee.get(n.source), a = ee.get(n.target);
1244
+ let r = N.get(n.source), a = N.get(n.target);
1233
1245
  if (!r || !a) return !1;
1234
- let o = r.x + r.w, s = r.y + r.h / 2, c = a.x, l = a.y + a.h / 2, d = (o + c) / 2, p = 1 - e.prog, m = p * p * o + 2 * p * e.prog * d + e.prog * e.prog * c, h = p * p * s + 2 * p * e.prog * s + e.prog * e.prog * l + e.off, g = Math.sin(e.prog * Math.PI) * .5, _ = y?.links ?? u.cyan;
1235
- return i.beginPath(), i.arc(m, h, e.sz, 0, Math.PI * 2), i.fillStyle = f(_, g), i.fill(), !0;
1236
- }), D.current.length > 150 && (D.current = D.current.slice(-150)), v(i, r, o, n, .01), s = requestAnimationFrame(c);
1246
+ let o = r.x + r.w, s = r.y + r.h / 2, c = a.x, l = a.y + a.h / 2, d = (o + c) / 2, f = 1 - e.prog, p = f * f * o + 2 * f * e.prog * d + e.prog * e.prog * c, h = f * f * s + 2 * f * e.prog * s + e.prog * e.prog * l + e.off, _ = Math.sin(e.prog * Math.PI) * .5, v = g?.links ?? u.cyan;
1247
+ return i.beginPath(), i.arc(p, h, e.sz, 0, Math.PI * 2), i.fillStyle = m(v, _), i.fill(), !0;
1248
+ }), D.current.length > 150 && (D.current = D.current.slice(-150)), b(i, r, o, n, .01), s = requestAnimationFrame(c);
1237
1249
  };
1238
1250
  return c(), () => {
1239
1251
  cancelAnimationFrame(s), D.current = [];
@@ -1243,29 +1255,29 @@ function Le({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: p,
1243
1255
  t,
1244
1256
  r,
1245
1257
  o,
1246
- m,
1247
- y,
1248
- ee
1258
+ p,
1259
+ g,
1260
+ N
1249
1261
  ]), /* @__PURE__ */ s(l, {
1250
- className: ["canvas-sankey-frame", _].filter(Boolean).join(" "),
1262
+ className: ["canvas-sankey-frame", h].filter(Boolean).join(" "),
1251
1263
  children: /* @__PURE__ */ c("div", {
1252
1264
  role: "img",
1253
- "aria-label": p,
1265
+ "aria-label": f,
1254
1266
  style: {
1255
1267
  position: "relative",
1256
1268
  width: r,
1257
1269
  height: o
1258
1270
  },
1259
1271
  children: [/* @__PURE__ */ s("canvas", {
1260
- ref: w,
1272
+ ref: y,
1261
1273
  style: {
1262
1274
  width: r,
1263
1275
  height: o,
1264
1276
  display: "block",
1265
1277
  borderRadius: 8
1266
1278
  }
1267
- }), /* @__PURE__ */ s(b, {
1268
- ...F,
1279
+ }), /* @__PURE__ */ s(S, {
1280
+ ...ne,
1269
1281
  parentW: r,
1270
1282
  parentH: o
1271
1283
  })]
@@ -1274,7 +1286,7 @@ function Le({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: p,
1274
1286
  }
1275
1287
  //#endregion
1276
1288
  //#region src/canvas/CausalFlowCanvas.tsx
1277
- var Re = [
1289
+ var Ve = [
1278
1290
  {
1279
1291
  x: .13,
1280
1292
  y: .48
@@ -1307,7 +1319,7 @@ var Re = [
1307
1319
  x: .92,
1308
1320
  y: .22
1309
1321
  }
1310
- ], ze = [
1322
+ ], He = [
1311
1323
  u.blue,
1312
1324
  u.cyan,
1313
1325
  u.orange,
@@ -1316,7 +1328,7 @@ var Re = [
1316
1328
  u.green,
1317
1329
  u.amber,
1318
1330
  u.t2
1319
- ], Be = [
1331
+ ], Ue = [
1320
1332
  26,
1321
1333
  24,
1322
1334
  24,
@@ -1326,21 +1338,21 @@ var Re = [
1326
1338
  22,
1327
1339
  22
1328
1340
  ];
1329
- function Ve(e, t) {
1341
+ function We(e, t) {
1330
1342
  let n = 1 - t;
1331
1343
  return {
1332
1344
  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,
1333
1345
  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
1334
1346
  };
1335
1347
  }
1336
- function He(e, t) {
1348
+ function Ge(e, t) {
1337
1349
  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;
1338
1350
  return {
1339
1351
  x: -i / a,
1340
1352
  y: r / a
1341
1353
  };
1342
1354
  }
1343
- function Ue(e, t) {
1355
+ function Ke(e, t) {
1344
1356
  let n = t.x - e.x, r = t.y - e.y;
1345
1357
  return {
1346
1358
  p0: {
@@ -1361,23 +1373,23 @@ function Ue(e, t) {
1361
1373
  }
1362
1374
  };
1363
1375
  }
1364
- function We({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntity: l }) {
1365
- let d = a(null), p = a(0), y = a([]), { hoveredRef: C, tooltip: T, hitZonesRef: E } = x(d, {
1376
+ function qe({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntity: l }) {
1377
+ let d = a(null), f = a(0), p = a([]), { hoveredRef: h, tooltip: x, hitZonesRef: T } = C(d, {
1366
1378
  width: r,
1367
1379
  height: o
1368
1380
  }), D = i(() => {
1369
1381
  let t = /* @__PURE__ */ new Map();
1370
1382
  return e.forEach((e, n) => t.set(e.id, n)), t;
1371
- }, [e]), k = i(() => t.length > 0 ? Math.max(...t.map((e) => e.value)) : 100, [t]), A = (e) => k > 1 ? e / 100 : e, j = i(() => e.map((e, t) => {
1372
- let n = Re[t % Re.length];
1383
+ }, [e]), O = i(() => t.length > 0 ? Math.max(...t.map((e) => e.value)) : 100, [t]), k = (e) => O > 1 ? e / 100 : e, j = i(() => e.map((e, t) => {
1384
+ let n = Ve[t % Ve.length];
1373
1385
  return {
1374
1386
  id: e.id,
1375
1387
  label: e.name,
1376
1388
  sub: e.valueLabel ?? "",
1377
1389
  x: n.x * r,
1378
1390
  y: n.y * o,
1379
- r: Be[t % Be.length],
1380
- color: ze[t % ze.length]
1391
+ r: Ue[t % Ue.length],
1392
+ color: He[t % He.length]
1381
1393
  };
1382
1394
  }), [
1383
1395
  e,
@@ -1386,63 +1398,63 @@ function We({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1386
1398
  ]), M = i(() => t.map((e) => ({
1387
1399
  fromIdx: D.get(e.source) ?? -1,
1388
1400
  toIdx: D.get(e.target) ?? -1,
1389
- conf: A(e.value)
1401
+ conf: k(e.value)
1390
1402
  })).filter((e) => e.fromIdx >= 0 && e.toIdx >= 0), [t, D]);
1391
1403
  return n(() => {
1392
1404
  let e = d.current;
1393
1405
  if (!e) return;
1394
- let t = h(e, r, o);
1395
- p.current = 0, y.current = [];
1406
+ let t = _(e, r, o);
1407
+ f.current = 0, p.current = [];
1396
1408
  let n, i = () => {
1397
- p.current++;
1398
- let e = p.current;
1399
- if (t.clearRect(0, 0, r, o), E.current = [], _(t, r, o, e, 50, f(u.blue, .05)), M.forEach((e, n) => {
1409
+ f.current++;
1410
+ let e = f.current;
1411
+ if (t.clearRect(0, 0, r, o), T.current = [], y(t, r, o, e, 50, m(u.blue, .05)), M.forEach((e, n) => {
1400
1412
  let r = j[e.fromIdx], i = j[e.toIdx];
1401
1413
  if (!r || !i) return;
1402
- let a = !!l && (r.id === l || i.id === l), o = m(r.color, i.color, .5), s = a ? .18 : .05, c = a ? .25 : .1, d = Ue(r, i);
1403
- 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 = f(o, s), t.lineWidth = 16, t.lineCap = "round", t.stroke(), t.strokeStyle = f(o, c), t.lineWidth = 1.5, t.stroke();
1404
- for (let t = 0; t < e.conf * 2.5; t++) Math.random() < .45 && y.current.push({
1414
+ let a = !!l && (r.id === l || i.id === l), o = g(r.color, i.color, .5), s = a ? .18 : .05, c = a ? .25 : .1, d = Ke(r, i);
1415
+ 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 = m(o, s), t.lineWidth = 16, t.lineCap = "round", t.stroke(), t.strokeStyle = m(o, c), t.lineWidth = 1.5, t.stroke();
1416
+ for (let t = 0; t < e.conf * 2.5; t++) Math.random() < .45 && p.current.push({
1405
1417
  edgeIdx: n,
1406
1418
  t: 0,
1407
1419
  speed: .003 + Math.random() * .004,
1408
1420
  off: (Math.random() - .5) * 13,
1409
1421
  sz: .7 + Math.random() * 2
1410
1422
  });
1411
- let p = Ve(d, .5), h = `${Math.round(e.conf * 100)}%`;
1423
+ let f = We(d, .5), h = `${Math.round(e.conf * 100)}%`;
1412
1424
  t.font = "bold 12px 'JetBrains Mono', monospace", t.textBaseline = "middle";
1413
- let g = t.measureText(h).width + 14;
1414
- t.fillStyle = "rgba(10,16,24,0.88)", t.beginPath(), t.roundRect(p.x - g / 2, p.y - 11, g, 22, 6), t.fill(), t.strokeStyle = f(u.cyan, .25), t.lineWidth = 1, t.stroke(), t.fillStyle = f(u.cyan, .9), t.textAlign = "center", t.fillText(h, p.x, p.y);
1415
- }), y.current = y.current.filter((e) => {
1425
+ let _ = t.measureText(h).width + 14;
1426
+ t.fillStyle = "rgba(10,16,24,0.88)", t.beginPath(), t.roundRect(f.x - _ / 2, f.y - 11, _, 22, 6), t.fill(), t.strokeStyle = m(u.cyan, .25), t.lineWidth = 1, t.stroke(), t.fillStyle = m(u.cyan, .9), t.textAlign = "center", t.fillText(h, f.x, f.y);
1427
+ }), p.current = p.current.filter((e) => {
1416
1428
  if (e.t += e.speed, e.t > 1) return !1;
1417
1429
  let n = M[e.edgeIdx];
1418
1430
  if (!n) return !1;
1419
1431
  let r = j[n.fromIdx], i = j[n.toIdx];
1420
1432
  if (!r || !i) return !1;
1421
- let a = Ue(r, i), o = Ve(a, e.t), s = He(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 = m(r.color, i.color, e.t);
1422
- return g(t, c, l, e.sz * 3, d, u * .1), t.beginPath(), t.arc(c, l, e.sz, 0, Math.PI * 2), t.fillStyle = f(d, u), t.fill(), !0;
1423
- }), y.current.length > 350 && (y.current = y.current.slice(-350)), j.forEach((n, r) => {
1424
- let i = l === n.id, a = C.current === `node-${r}`, o = O(e, .03, 3e-4) * .1 + 1, s = n.r * o * (i ? 1.15 : 1);
1425
- t.beginPath(), t.arc(n.x, n.y, s + 6, 0, Math.PI * 2), t.strokeStyle = f(n.color, i ? .3 : .1), t.lineWidth = i ? 1.5 : .7, t.stroke(), g(t, n.x, n.y, s * 3, n.color, i ? .22 : .12);
1433
+ let a = Ke(r, i), o = We(a, e.t), s = Ge(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 = g(r.color, i.color, e.t);
1434
+ return v(t, c, l, e.sz * 3, d, u * .1), t.beginPath(), t.arc(c, l, e.sz, 0, Math.PI * 2), t.fillStyle = m(d, u), t.fill(), !0;
1435
+ }), p.current.length > 350 && (p.current = p.current.slice(-350)), j.forEach((n, r) => {
1436
+ let i = l === n.id, a = h.current === `node-${r}`, o = A(e, .03, 3e-4) * .1 + 1, s = n.r * o * (i ? 1.15 : 1);
1437
+ t.beginPath(), t.arc(n.x, n.y, s + 6, 0, Math.PI * 2), t.strokeStyle = m(n.color, i ? .3 : .1), t.lineWidth = i ? 1.5 : .7, t.stroke(), v(t, n.x, n.y, s * 3, n.color, i ? .22 : .12);
1426
1438
  let c = t.createRadialGradient(n.x, n.y - s * .2, 0, n.x, n.y, s);
1427
- if (c.addColorStop(0, f(n.color, i ? 1 : .85)), c.addColorStop(1, f(n.color, i ? .65 : .45)), t.fillStyle = c, t.beginPath(), t.arc(n.x, n.y, s, 0, Math.PI * 2), t.fill(), i || r === j.length - 1) {
1439
+ if (c.addColorStop(0, m(n.color, i ? 1 : .85)), c.addColorStop(1, m(n.color, i ? .65 : .45)), t.fillStyle = c, t.beginPath(), t.arc(n.x, n.y, s, 0, Math.PI * 2), t.fill(), i || r === j.length - 1) {
1428
1440
  let r = s + 16, i = e * .04, a = n.x + Math.cos(i) * r, o = n.y + Math.sin(i) * r;
1429
- g(t, a, o, 6, n.color, .3), t.beginPath(), t.arc(a, o, 2, 0, Math.PI * 2), t.fillStyle = f(n.color, .75), t.fill();
1441
+ v(t, a, o, 6, n.color, .3), t.beginPath(), t.arc(a, o, 2, 0, Math.PI * 2), t.fillStyle = m(n.color, .75), t.fill();
1430
1442
  }
1431
- S(E.current, `node-${r}`, n.x, n.y, s + 8, {
1443
+ w(T.current, `node-${r}`, n.x, n.y, s + 8, {
1432
1444
  label: n.label,
1433
1445
  value: n.sub || n.id,
1434
1446
  color: n.color
1435
- }), t.font = `${i || a ? "bold " : ""}12px 'DM Sans', sans-serif`, t.textAlign = "center", t.textBaseline = "alphabetic", t.fillStyle = f(n.color, i ? 1 : .9), t.fillText(n.label, n.x, n.y + s + 18), n.sub && (t.font = "10px 'JetBrains Mono', monospace", t.fillStyle = f(u.t3, .65), t.fillText(n.sub, n.x, n.y + s + 32));
1447
+ }), t.font = `${i || a ? "bold " : ""}12px 'DM Sans', sans-serif`, t.textAlign = "center", t.textBaseline = "alphabetic", t.fillStyle = m(n.color, i ? 1 : .9), t.fillText(n.label, n.x, n.y + s + 18), n.sub && (t.font = "10px 'JetBrains Mono', monospace", t.fillStyle = m(u.t3, .65), t.fillText(n.sub, n.x, n.y + s + 32));
1436
1448
  }), M.length >= 2) {
1437
- let n = M.reduce((e, t) => e * t.conf, 1), i = o * .92, a = r * .12, s = r * .76, c = w(Math.min(e * .008, 1));
1438
- t.fillStyle = f(u.bd, .35), t.beginPath(), t.roundRect(a, i, s, 5, 3), t.fill(), t.fillStyle = f(u.orange, .6), t.beginPath(), t.roundRect(a, i, s * n * c, 5, 3), t.fill(), t.font = "bold 12px 'JetBrains Mono', monospace", t.textAlign = "left", t.textBaseline = "middle", t.fillStyle = f(u.orange, .85), t.fillText(`${Math.round(n * 100)}% compound confidence`, a + s * n * c + 10, i + 2);
1449
+ let n = M.reduce((e, t) => e * t.conf, 1), i = o * .92, a = r * .12, s = r * .76, c = E(Math.min(e * .008, 1));
1450
+ t.fillStyle = m(u.bd, .35), t.beginPath(), t.roundRect(a, i, s, 5, 3), t.fill(), t.fillStyle = m(u.orange, .6), t.beginPath(), t.roundRect(a, i, s * n * c, 5, 3), t.fill(), t.font = "bold 12px 'JetBrains Mono', monospace", t.textAlign = "left", t.textBaseline = "middle", t.fillStyle = m(u.orange, .85), t.fillText(`${Math.round(n * 100)}% compound confidence`, a + s * n * c + 10, i + 2);
1439
1451
  let l = M.map((e) => e.conf.toFixed(2)).join(" × ");
1440
- t.textAlign = "right", t.font = "9px 'JetBrains Mono', monospace", t.fillStyle = f(u.t4, .6), t.fillText(l, a - 6, i + 2);
1452
+ t.textAlign = "right", t.font = "9px 'JetBrains Mono', monospace", t.fillStyle = m(u.t4, .6), t.fillText(l, a - 6, i + 2);
1441
1453
  }
1442
- v(t, r, o, e, .012), n = requestAnimationFrame(i);
1454
+ b(t, r, o, e, .012), n = requestAnimationFrame(i);
1443
1455
  };
1444
1456
  return i(), () => {
1445
- cancelAnimationFrame(n), y.current = [];
1457
+ cancelAnimationFrame(n), p.current = [];
1446
1458
  };
1447
1459
  }, [
1448
1460
  j,
@@ -1466,8 +1478,8 @@ function We({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1466
1478
  },
1467
1479
  role: "img",
1468
1480
  "aria-label": "causal flow diagram"
1469
- }), /* @__PURE__ */ s(b, {
1470
- ...T,
1481
+ }), /* @__PURE__ */ s(S, {
1482
+ ...x,
1471
1483
  parentW: r,
1472
1484
  parentH: o
1473
1485
  })]
@@ -1475,10 +1487,10 @@ function We({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1475
1487
  }
1476
1488
  //#endregion
1477
1489
  //#region src/components/sankey/ProcessSankey.tsx
1478
- function Ge({ selectedEntity: e, colors: t }) {
1479
- return /* @__PURE__ */ s(We, {
1480
- nodes: Oe.nodes,
1481
- links: Oe.links,
1490
+ function Je({ selectedEntity: e, colors: t }) {
1491
+ return /* @__PURE__ */ s(qe, {
1492
+ nodes: Ae.nodes,
1493
+ links: Ae.links,
1482
1494
  width: 960,
1483
1495
  height: 280,
1484
1496
  selectedEntity: e
@@ -1486,7 +1498,7 @@ function Ge({ selectedEntity: e, colors: t }) {
1486
1498
  }
1487
1499
  //#endregion
1488
1500
  //#region src/components/sankey/RankingSankey.tsx
1489
- function Ke({ rows: e = [], className: t, colors: n }) {
1501
+ function Ye({ rows: e = [], className: t, colors: n }) {
1490
1502
  let { nodes: r, links: a } = i(() => {
1491
1503
  let t = e.slice(0, 5);
1492
1504
  return {
@@ -1504,7 +1516,7 @@ function Ke({ rows: e = [], className: t, colors: n }) {
1504
1516
  }))
1505
1517
  };
1506
1518
  }, [e]);
1507
- return /* @__PURE__ */ s(Le, {
1519
+ return /* @__PURE__ */ s(Be, {
1508
1520
  nodes: r,
1509
1521
  links: a,
1510
1522
  width: 760,
@@ -1516,62 +1528,62 @@ function Ke({ rows: e = [], className: t, colors: n }) {
1516
1528
  }
1517
1529
  //#endregion
1518
1530
  //#region src/components/quotationBalance/QuotationBalance.tsx
1519
- var qe = 500, Je = 320;
1520
- function Ye({ accepted: e, submitted: t, "data-testid": r }) {
1531
+ var Xe = 500, Ze = 320;
1532
+ function Qe({ accepted: e, submitted: t, "data-testid": r }) {
1521
1533
  let i = a(null), o = a(0);
1522
1534
  return n(() => {
1523
1535
  let n = i.current;
1524
1536
  if (!n) return;
1525
- let r = h(n, qe, Je);
1537
+ let r = _(n, Xe, Ze);
1526
1538
  o.current = 0;
1527
- let a = qe / 2, s = Math.max(e.value, t.value), c = (e.value - t.value) / s * 14, l, d = () => {
1539
+ let a = Xe / 2, s = Math.max(e.value, t.value), c = (e.value - t.value) / s * 14, l, d = () => {
1528
1540
  o.current++;
1529
1541
  let n = o.current;
1530
- r.clearRect(0, 0, qe, Je);
1531
- let i = w(Math.min(n / 80, 1)), p = c * D(Math.min(n / 80, 1)) * Math.PI / 180;
1532
- r.strokeStyle = f(u.bd, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(a, 100), r.lineTo(a, Je - 80), r.stroke(), r.beginPath(), r.arc(a, 100, 5 * i, 0, Math.PI * 2), r.fillStyle = u.t2, r.fill();
1533
- let m = {
1542
+ r.clearRect(0, 0, Xe, Ze);
1543
+ let i = E(Math.min(n / 80, 1)), p = c * k(Math.min(n / 80, 1)) * Math.PI / 180;
1544
+ r.strokeStyle = m(u.bd, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(a, 100), r.lineTo(a, Ze - 80), r.stroke(), r.beginPath(), r.arc(a, 100, 5 * i, 0, Math.PI * 2), r.fillStyle = u.t2, r.fill();
1545
+ let h = {
1534
1546
  x: a - Math.cos(p) * 160,
1535
1547
  y: 100 + Math.sin(-p) * 160
1536
- }, h = {
1548
+ }, g = {
1537
1549
  x: a + Math.cos(p) * 160,
1538
1550
  y: 100 + Math.sin(p) * 160
1539
1551
  };
1540
- r.strokeStyle = f(u.t2, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(m.x, m.y), r.lineTo(h.x, h.y), r.stroke();
1541
- let _ = Math.max(20, e.value / s * 100 * i), v = m.y + 18;
1542
- g(r, m.x, v + _ / 2, 90 * .5, u.green, .18 * i), r.fillStyle = f(u.green, .5 * i), r.beginPath(), r.roundRect(m.x - 90 / 2, v, 90, _, [
1552
+ r.strokeStyle = m(u.t2, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(h.x, h.y), r.lineTo(g.x, g.y), r.stroke();
1553
+ let _ = Math.max(20, e.value / s * 100 * i), y = h.y + 18;
1554
+ v(r, h.x, y + _ / 2, 90 * .5, u.green, .18 * i), r.fillStyle = m(u.green, .5 * i), r.beginPath(), r.roundRect(h.x - 90 / 2, y, 90, _, [
1543
1555
  0,
1544
1556
  0,
1545
1557
  6,
1546
1558
  6
1547
- ]), r.fill(), r.strokeStyle = f(u.green, .7 * i), r.lineWidth = 1.5, r.stroke(), r.strokeStyle = f(u.t3, .35 * i), r.lineWidth = 1, [-90 / 3, 90 / 3].forEach((e) => {
1548
- r.beginPath(), r.moveTo(m.x + e, m.y + 4), r.lineTo(m.x + e, v), r.stroke();
1549
- }), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = "bold 14px 'JetBrains Mono', monospace", r.fillStyle = u.green, r.textAlign = "center", r.fillText(e.label, m.x, v + _ + 18), r.font = "9px 'JetBrains Mono', monospace", r.fillStyle = u.t2, r.fillText("Accepted", m.x, v + _ + 32), r.fillText(`${e.count} quotations`, m.x, v + _ + 44), r.globalAlpha = 1);
1550
- let y = Math.max(20, t.value / s * 100 * i), b = h.y + 18;
1551
- r.fillStyle = f(u.amber, .3 * i), r.strokeStyle = f(u.amber, .5 * i), r.lineWidth = 1.5, r.beginPath(), r.roundRect(h.x - 90 / 2, b, 90, y, [
1559
+ ]), r.fill(), r.strokeStyle = m(u.green, .7 * i), r.lineWidth = 1.5, r.stroke(), r.strokeStyle = m(u.t3, .35 * i), r.lineWidth = 1, [-90 / 3, 90 / 3].forEach((e) => {
1560
+ r.beginPath(), r.moveTo(h.x + e, h.y + 4), r.lineTo(h.x + e, y), r.stroke();
1561
+ }), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = "bold 14px 'JetBrains Mono', monospace", r.fillStyle = u.green, r.textAlign = "center", r.fillText(e.label, h.x, y + _ + 18), r.font = f.font, r.fillStyle = f.color, r.fillText("Accepted", h.x, y + _ + 32), r.fillText(`${e.count} quotations`, h.x, y + _ + 44), r.globalAlpha = 1);
1562
+ let b = Math.max(20, t.value / s * 100 * i), x = g.y + 18;
1563
+ r.fillStyle = m(u.amber, .3 * i), r.strokeStyle = m(u.amber, .5 * i), r.lineWidth = 1.5, r.beginPath(), r.roundRect(g.x - 90 / 2, x, 90, b, [
1552
1564
  0,
1553
1565
  0,
1554
1566
  6,
1555
1567
  6
1556
- ]), r.fill(), r.stroke(), r.strokeStyle = f(u.t3, .35 * i), r.lineWidth = 1, [-90 / 3, 90 / 3].forEach((e) => {
1557
- r.beginPath(), r.moveTo(h.x + e, h.y + 4), r.lineTo(h.x + e, b), r.stroke();
1558
- }), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = "bold 14px 'JetBrains Mono', monospace", r.fillStyle = u.amber, r.textAlign = "center", r.fillText(t.label, h.x, b + y + 18), r.font = "9px 'JetBrains Mono', monospace", r.fillStyle = u.t2, r.fillText("Submitted", h.x, b + y + 32), r.fillText(`${t.count} quotations`, h.x, b + y + 44), r.globalAlpha = 1), i > .85 && Math.abs(c) > 1 && (r.globalAlpha = Math.min(1, (i - .85) / .15) * .6, r.font = "8px 'JetBrains Mono', monospace", r.fillStyle = u.t3, r.textAlign = "center", r.fillText(`${Math.abs(c).toFixed(1)}° tilt toward accepted`, a, Je - 12), r.globalAlpha = 1), l = requestAnimationFrame(d);
1568
+ ]), r.fill(), r.stroke(), r.strokeStyle = m(u.t3, .35 * i), r.lineWidth = 1, [-90 / 3, 90 / 3].forEach((e) => {
1569
+ r.beginPath(), r.moveTo(g.x + e, g.y + 4), r.lineTo(g.x + e, x), r.stroke();
1570
+ }), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = "bold 14px 'JetBrains Mono', monospace", r.fillStyle = u.amber, r.textAlign = "center", r.fillText(t.label, g.x, x + b + 18), r.font = f.font, r.fillStyle = f.color, r.fillText("Submitted", g.x, x + b + 32), r.fillText(`${t.count} quotations`, g.x, x + b + 44), r.globalAlpha = 1), i > .85 && Math.abs(c) > 1 && (r.globalAlpha = Math.min(1, (i - .85) / .15) * .6, r.font = f.font, r.fillStyle = f.color, r.textAlign = "center", r.fillText(`${Math.abs(c).toFixed(1)}° tilt toward accepted`, a, Ze - 12), r.globalAlpha = 1), l = requestAnimationFrame(d);
1559
1571
  };
1560
1572
  return d(), () => cancelAnimationFrame(l);
1561
1573
  }, [e, t]), /* @__PURE__ */ s("div", {
1562
1574
  "data-testid": r,
1563
1575
  style: {
1564
1576
  position: "relative",
1565
- width: qe,
1566
- height: Je
1577
+ width: Xe,
1578
+ height: Ze
1567
1579
  },
1568
1580
  children: /* @__PURE__ */ s("canvas", {
1569
1581
  ref: i,
1570
1582
  role: "img",
1571
1583
  "aria-label": "Quotation balance — accepted vs submitted quotation value",
1572
1584
  style: {
1573
- width: qe,
1574
- height: Je,
1585
+ width: Xe,
1586
+ height: Ze,
1575
1587
  display: "block"
1576
1588
  }
1577
1589
  })
@@ -1579,141 +1591,251 @@ function Ye({ accepted: e, submitted: t, "data-testid": r }) {
1579
1591
  }
1580
1592
  //#endregion
1581
1593
  //#region src/components/quotationTrend/QuotationTrend.tsx
1582
- var Xe = 680, G = 280;
1583
- function Ze({ trend: e = [], "data-testid": t }) {
1584
- let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: d, hitZonesRef: p } = x(r, {
1585
- width: Xe,
1586
- height: G
1594
+ var $e = 680, W = 280;
1595
+ function et({ trend: e = [], "data-testid": t }) {
1596
+ let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: d, hitZonesRef: p } = C(r, {
1597
+ width: $e,
1598
+ height: W
1587
1599
  });
1588
1600
  return n(() => {
1589
1601
  let t = r.current;
1590
1602
  if (!t) return;
1591
- let n = h(t, Xe, G);
1603
+ let n = _(t, $e, W);
1592
1604
  o.current = 0;
1593
- let a = Xe - 54 - 28, s = G - 30 - 54, c = Math.max(...e.map((e) => e.count)), d = e.length, m = d > 1 ? a / (d - 1) : a, _ = e.map((e, t) => ({
1594
- x: 54 + t * m,
1605
+ let a = $e - 54 - 28, s = W - 30 - 54, c = Math.max(...e.map((e) => e.count), 1), d = e.length, h = d > 1 ? a / (d - 1) : a, g = e.map((e, t) => ({
1606
+ x: 54 + t * h,
1595
1607
  y: 30 + s - e.count / c * s,
1596
1608
  point: e
1597
- })), v, b = () => {
1609
+ })), y, b = () => {
1598
1610
  o.current++;
1599
1611
  let e = o.current;
1600
- n.clearRect(0, 0, Xe, G);
1601
- let t = w(Math.min(e / 72, 1));
1602
- A(i.current, l.current), p.current = [], [
1612
+ n.clearRect(0, 0, $e, W);
1613
+ let t = E(Math.min(e / 72, 1));
1614
+ M(i.current, l.current), p.current = [], [
1603
1615
  .25,
1604
1616
  .5,
1605
1617
  .75,
1606
1618
  1
1607
1619
  ].forEach((e) => {
1608
1620
  let t = 30 + s - e * s;
1609
- n.strokeStyle = f(u.bd, .18), n.lineWidth = 1, n.setLineDash([3, 5]), n.beginPath(), n.moveTo(54, t), n.lineTo(54 + a, t), n.stroke(), n.setLineDash([]), n.font = "10px 'JetBrains Mono', monospace", n.fillStyle = f(u.t4, .6), n.textAlign = "right", n.fillText(String(Math.round(c * e)), 48, t + 3);
1610
- }), n.save(), n.translate(12, 30 + s / 2), n.rotate(-Math.PI / 2), n.font = "11px 'JetBrains Mono', monospace", n.fillStyle = f(u.t3, .5), n.textAlign = "center", n.fillText("Submissions", 0, 0), n.restore(), n.font = "11px 'JetBrains Mono', monospace", n.fillStyle = f(u.t3, .5), n.textAlign = "center", n.fillText("Week", 54 + a / 2, G - 6), n.strokeStyle = f(u.bd, .3), n.lineWidth = 1, n.setLineDash([]), n.beginPath(), n.moveTo(54, 30 + s), n.lineTo(54 + a, 30 + s), n.stroke();
1611
- let r = t * (d - 1), m = Math.floor(r) + 1;
1612
- if (m >= 2) {
1613
- n.beginPath(), n.moveTo(_[0].x, 30 + s), n.lineTo(_[0].x, _[0].y);
1614
- for (let e = 1; e < m; e++) {
1615
- let t = r - Math.floor(r), i = e < m - 1 ? _[e].x : _[e - 1].x + (_[e].x - _[e - 1].x) * (e === Math.ceil(r) ? t : 1), a = e < m - 1 ? _[e].y : _[e - 1].y + (_[e].y - _[e - 1].y) * (e === Math.ceil(r) ? t : 1);
1621
+ n.strokeStyle = m(u.bd, .18), n.lineWidth = 1, n.setLineDash([3, 5]), n.beginPath(), n.moveTo(54, t), n.lineTo(54 + a, t), n.stroke(), n.setLineDash([]), n.font = f.font, n.fillStyle = f.color, n.textAlign = "right", n.fillText(String(Math.round(c * e)), 48, t + 3);
1622
+ }), n.save(), n.translate(12, 30 + s / 2), n.rotate(-Math.PI / 2), n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText("Submissions", 0, 0), n.restore(), n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText("Week", 54 + a / 2, W - 6), n.strokeStyle = m(u.bd, .3), n.lineWidth = 1, n.setLineDash([]), n.beginPath(), n.moveTo(54, 30 + s), n.lineTo(54 + a, 30 + s), n.stroke();
1623
+ let r = t * (d - 1), h = Math.floor(r) + 1;
1624
+ if (h >= 2) {
1625
+ n.beginPath(), n.moveTo(g[0].x, 30 + s), n.lineTo(g[0].x, g[0].y);
1626
+ for (let e = 1; e < h; e++) {
1627
+ let t = r - Math.floor(r), i = e < h - 1 ? g[e].x : g[e - 1].x + (g[e].x - g[e - 1].x) * (e === Math.ceil(r) ? t : 1), a = e < h - 1 ? g[e].y : g[e - 1].y + (g[e].y - g[e - 1].y) * (e === Math.ceil(r) ? t : 1);
1616
1628
  n.lineTo(i, a);
1617
1629
  }
1618
- let e = _[Math.min(m - 1, d - 1)];
1630
+ let e = g[Math.min(h - 1, d - 1)];
1619
1631
  n.lineTo(e.x, 30 + s), n.closePath();
1620
1632
  let t = n.createLinearGradient(0, 30, 0, 30 + s);
1621
- t.addColorStop(0, f(u.cyan, .22)), t.addColorStop(1, f(u.cyan, .02)), n.fillStyle = t, n.fill();
1633
+ t.addColorStop(0, m(u.cyan, .22)), t.addColorStop(1, m(u.cyan, .02)), n.fillStyle = t, n.fill();
1622
1634
  }
1623
1635
  n.beginPath();
1624
- for (let e = 0; e < m; e++) {
1625
- let t = r - Math.floor(r), i = e === m - 1 && e > 0 && e === Math.ceil(r), a = e === 0 || e < m - 1 ? _[e].x : _[e - 1].x + (_[e].x - _[e - 1].x) * (i ? t : 1), o = e === 0 || e < m - 1 ? _[e].y : _[e - 1].y + (_[e].y - _[e - 1].y) * (i ? t : 1);
1636
+ for (let e = 0; e < h; e++) {
1637
+ let t = r - Math.floor(r), i = e === h - 1 && e > 0 && e === Math.ceil(r), a = e === 0 || e < h - 1 ? g[e].x : g[e - 1].x + (g[e].x - g[e - 1].x) * (i ? t : 1), o = e === 0 || e < h - 1 ? g[e].y : g[e - 1].y + (g[e].y - g[e - 1].y) * (i ? t : 1);
1626
1638
  e === 0 ? n.moveTo(a, o) : n.lineTo(a, o);
1627
1639
  }
1628
- n.strokeStyle = f(u.cyan, .85), n.lineWidth = 2, n.stroke(), _.forEach((e, t) => {
1629
- if (t >= m) return;
1640
+ n.strokeStyle = m(u.cyan, .85), n.lineWidth = 2, n.stroke(), g.forEach((e, t) => {
1641
+ if (t >= h) return;
1630
1642
  let r = `pt-${t}`, a = i.current.get(r) ?? 0;
1631
- S(p.current, r, e.x, e.y, 10, {
1643
+ w(p.current, r, e.x, e.y, 10, {
1632
1644
  label: e.point.week,
1633
1645
  value: `${e.point.count} quotations submitted`,
1634
1646
  sublabel: `£${e.point.value}M value`,
1635
1647
  color: u.cyan
1636
- }), a > 0 && y(n, e.x, 30, 30 + s, f(u.cyan, .15 * a));
1648
+ }), a > 0 && x(n, e.x, 30, 30 + s, m(u.cyan, .15 * a));
1637
1649
  let o = e.point.count === c;
1638
- (a > 0 || o) && g(n, e.x, e.y, 14, u.cyan, (o ? .3 : 0) + a * .25), n.beginPath(), n.arc(e.x, e.y, a > 0 ? 5 : 3.5, 0, Math.PI * 2), n.fillStyle = f(u.cyan, a > 0 ? 1 : .8), n.fill(), (a > 0 || o) && (n.font = "bold 10px 'JetBrains Mono', monospace", n.fillStyle = u.cyan, n.textAlign = "center", n.fillText(String(e.point.count), e.x, e.y - 10)), n.font = "10px 'JetBrains Mono', monospace", n.fillStyle = a > 0 ? u.cyan : f(u.t3, .6), n.textAlign = "center", n.fillText(e.point.week, e.x, G - 54 + 14);
1639
- }), v = requestAnimationFrame(b);
1650
+ (a > 0 || o) && v(n, e.x, e.y, 14, u.cyan, (o ? .3 : 0) + a * .25), n.beginPath(), n.arc(e.x, e.y, a > 0 ? 5 : 3.5, 0, Math.PI * 2), n.fillStyle = m(u.cyan, a > 0 ? 1 : .8), n.fill(), (a > 0 || o) && (n.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = u.cyan, n.textAlign = "center", n.fillText(String(e.point.count), e.x, e.y - 10)), n.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = a > 0 ? u.cyan : f.color, n.textAlign = "center", n.fillText(e.point.week, e.x, W - 54 + 14);
1651
+ }), y = requestAnimationFrame(b);
1640
1652
  };
1641
- return b(), () => cancelAnimationFrame(v);
1642
- }, [e]), /* @__PURE__ */ c("div", {
1653
+ return b(), () => cancelAnimationFrame(y);
1654
+ }, [e]), /* @__PURE__ */ s("div", {
1643
1655
  "data-testid": t,
1656
+ className: "trend-scroll",
1644
1657
  style: {
1645
- position: "relative",
1646
- width: Xe,
1647
- height: G
1658
+ width: "100%",
1659
+ overflowX: "auto"
1648
1660
  },
1649
- children: [/* @__PURE__ */ s("canvas", {
1650
- ref: r,
1651
- role: "img",
1652
- "aria-label": "Quotation submission trend — weekly count over 12 weeks",
1661
+ children: /* @__PURE__ */ c("div", {
1653
1662
  style: {
1654
- width: Xe,
1655
- height: G,
1656
- display: "block"
1663
+ position: "relative",
1664
+ width: $e,
1665
+ height: W
1666
+ },
1667
+ children: [/* @__PURE__ */ s("canvas", {
1668
+ ref: r,
1669
+ role: "img",
1670
+ "aria-label": "Trend chart — count over time",
1671
+ style: {
1672
+ width: $e,
1673
+ height: W,
1674
+ display: "block"
1675
+ }
1676
+ }), /* @__PURE__ */ s(S, {
1677
+ ...d,
1678
+ parentW: $e,
1679
+ parentH: W
1680
+ })]
1681
+ })
1682
+ });
1683
+ }
1684
+ //#endregion
1685
+ //#region src/components/trend/Trend.tsx
1686
+ var tt = 680, G = 280, nt = 54, rt = 28, it = 64, at = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", ot = 12;
1687
+ function st({ trend: e = [], "data-testid": t }) {
1688
+ let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), d = i(() => {
1689
+ if (e.length <= 1) return it;
1690
+ let t = document.createElement("canvas").getContext("2d");
1691
+ if (!t) return it;
1692
+ t.font = at;
1693
+ let n = Math.max(...e.map((e) => t.measureText(e.week).width));
1694
+ return Math.max(it, n + ot);
1695
+ }, [e]), p = Math.max(tt, nt + rt + Math.max(0, e.length - 1) * d), { hoveredRef: h, tooltip: g, hitZonesRef: y } = C(r, {
1696
+ width: p,
1697
+ height: G
1698
+ });
1699
+ return n(() => {
1700
+ let t = r.current;
1701
+ if (!t) return;
1702
+ let n = _(t, p, G);
1703
+ l.current = 0;
1704
+ let i = nt, a = rt, s = p - i - a, c = G - 30 - 54, g = Math.max(...e.map((e) => e.count), 1), b = e.length, S = b > 1 ? Math.max(s / (b - 1), d) : s, C = e.map((e, t) => ({
1705
+ x: i + t * S,
1706
+ y: 30 + c - e.count / g * c,
1707
+ point: e
1708
+ })), T, D = () => {
1709
+ l.current++;
1710
+ let e = l.current;
1711
+ n.clearRect(0, 0, p, G);
1712
+ let t = E(Math.min(e / 72, 1));
1713
+ M(o.current, h.current), y.current = [], [
1714
+ .25,
1715
+ .5,
1716
+ .75,
1717
+ 1
1718
+ ].forEach((e) => {
1719
+ let t = 30 + c - e * c;
1720
+ n.strokeStyle = m(u.bd, .18), n.lineWidth = 1, n.setLineDash([3, 5]), n.beginPath(), n.moveTo(i, t), n.lineTo(i + s, t), n.stroke(), n.setLineDash([]), n.font = f.font, n.fillStyle = f.color, n.textAlign = "right", n.fillText(String(Math.round(g * e)), i - 6, t + 3);
1721
+ }), n.save(), n.translate(12, 30 + c / 2), n.rotate(-Math.PI / 2), n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText("Count", 0, 0), n.restore(), n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText("Period", i + s / 2, G - 6), n.strokeStyle = m(u.bd, .3), n.lineWidth = 1, n.setLineDash([]), n.beginPath(), n.moveTo(i, 30 + c), n.lineTo(i + s, 30 + c), n.stroke();
1722
+ let r = t * (b - 1), a = Math.floor(r) + 1;
1723
+ if (a >= 2) {
1724
+ n.beginPath(), n.moveTo(C[0].x, 30 + c), n.lineTo(C[0].x, C[0].y);
1725
+ for (let e = 1; e < a; e++) {
1726
+ let t = r - Math.floor(r), i = e < a - 1 ? C[e].x : C[e - 1].x + (C[e].x - C[e - 1].x) * (e === Math.ceil(r) ? t : 1), o = e < a - 1 ? C[e].y : C[e - 1].y + (C[e].y - C[e - 1].y) * (e === Math.ceil(r) ? t : 1);
1727
+ n.lineTo(i, o);
1728
+ }
1729
+ let e = C[Math.min(a - 1, b - 1)];
1730
+ n.lineTo(e.x, 30 + c), n.closePath();
1731
+ let t = n.createLinearGradient(0, 30, 0, 30 + c);
1732
+ t.addColorStop(0, m(u.cyan, .22)), t.addColorStop(1, m(u.cyan, .02)), n.fillStyle = t, n.fill();
1657
1733
  }
1658
- }), /* @__PURE__ */ s(b, {
1659
- ...d,
1660
- parentW: Xe,
1661
- parentH: G
1662
- })]
1734
+ n.beginPath();
1735
+ for (let e = 0; e < a; e++) {
1736
+ let t = r - Math.floor(r), i = e === a - 1 && e > 0 && e === Math.ceil(r), o = e === 0 || e < a - 1 ? C[e].x : C[e - 1].x + (C[e].x - C[e - 1].x) * (i ? t : 1), s = e === 0 || e < a - 1 ? C[e].y : C[e - 1].y + (C[e].y - C[e - 1].y) * (i ? t : 1);
1737
+ e === 0 ? n.moveTo(o, s) : n.lineTo(o, s);
1738
+ }
1739
+ n.strokeStyle = m(u.cyan, .85), n.lineWidth = 2, n.stroke(), C.forEach((e, t) => {
1740
+ if (t >= a) return;
1741
+ let r = `pt-${t}`, i = o.current.get(r) ?? 0;
1742
+ w(y.current, r, e.x, e.y, 10, {
1743
+ label: e.point.week,
1744
+ value: `${e.point.count} submissions`,
1745
+ sublabel: `£${e.point.value}M value`,
1746
+ color: u.cyan
1747
+ }), i > 0 && x(n, e.x, 30, 30 + c, m(u.cyan, .15 * i));
1748
+ let s = e.point.count === g;
1749
+ (i > 0 || s) && v(n, e.x, e.y, 14, u.cyan, (s ? .3 : 0) + i * .25), n.beginPath(), n.arc(e.x, e.y, i > 0 ? 5 : 3.5, 0, Math.PI * 2), n.fillStyle = m(u.cyan, i > 0 ? 1 : .8), n.fill(), (i > 0 || s) && (n.font = at, n.fillStyle = u.cyan, n.textAlign = "center", n.fillText(String(e.point.count), e.x, e.y - 10)), n.font = at, n.fillStyle = i > 0 ? u.cyan : f.color, n.textAlign = "center", n.fillText(e.point.week, e.x, G - 54 + 14);
1750
+ }), T = requestAnimationFrame(D);
1751
+ };
1752
+ return D(), () => cancelAnimationFrame(T);
1753
+ }, [
1754
+ e,
1755
+ p,
1756
+ d
1757
+ ]), /* @__PURE__ */ s("div", {
1758
+ "data-testid": t,
1759
+ className: "trend-scroll",
1760
+ style: {
1761
+ width: "100%",
1762
+ overflowX: "auto"
1763
+ },
1764
+ children: /* @__PURE__ */ c("div", {
1765
+ style: {
1766
+ position: "relative",
1767
+ width: p,
1768
+ height: G
1769
+ },
1770
+ children: [/* @__PURE__ */ s("canvas", {
1771
+ ref: r,
1772
+ role: "img",
1773
+ "aria-label": "Trend chart — count over time",
1774
+ style: {
1775
+ width: p,
1776
+ height: G,
1777
+ display: "block"
1778
+ }
1779
+ }), /* @__PURE__ */ s(S, {
1780
+ ...g,
1781
+ parentW: p,
1782
+ parentH: G
1783
+ })]
1784
+ })
1663
1785
  });
1664
1786
  }
1665
1787
  //#endregion
1666
1788
  //#region src/components/severityBands/SeverityBands.tsx
1667
- var K = 680, Qe = 240, $e = {
1789
+ var K = 680, ct = 240, lt = {
1668
1790
  Critical: u.red,
1669
1791
  High: u.orange,
1670
1792
  Medium: u.amber,
1671
1793
  Low: u.green
1672
1794
  };
1673
- function et({ severities: e, "data-testid": t }) {
1674
- let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: d, hitZonesRef: p } = x(r, {
1795
+ function ut({ severities: e = [], "data-testid": t }) {
1796
+ let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: d, hitZonesRef: p } = C(r, {
1675
1797
  width: K,
1676
- height: Qe
1798
+ height: ct
1677
1799
  });
1678
1800
  return n(() => {
1679
1801
  let t = r.current;
1680
1802
  if (!t) return;
1681
- let n = h(t, K, Qe);
1803
+ let n = _(t, K, ct);
1682
1804
  o.current = 0;
1683
- let a = e.reduce((e, t) => e + t.count, 0), s = K - 28 - 28, c = Qe - 50 - 52, d = e.map((e) => e.count / a * s), m, _ = () => {
1805
+ let a = e.reduce((e, t) => e + t.count, 0), s = K - 28 - 28, c = ct - 50 - 52, d = e.map((e) => e.count / a * s), h, g = () => {
1684
1806
  o.current++;
1685
1807
  let t = o.current;
1686
- n.clearRect(0, 0, K, Qe);
1687
- let r = T(Math.min(t / 60, 1));
1688
- A(i.current, l.current), p.current = [], n.strokeStyle = f(u.bd, .2), n.lineWidth = 1, n.beginPath(), n.rect(28, 50, s, c), n.stroke(), n.strokeStyle = f(u.t4, .15), n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(K / 2, 50), n.lineTo(K / 2, 50 + c), n.stroke(), n.setLineDash([]);
1689
- let h = 28;
1808
+ n.clearRect(0, 0, K, ct);
1809
+ let r = D(Math.min(t / 60, 1));
1810
+ M(i.current, l.current), p.current = [], n.strokeStyle = m(u.bd, .2), n.lineWidth = 1, n.beginPath(), n.rect(28, 50, s, c), n.stroke(), n.strokeStyle = m(u.t4, .15), n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(K / 2, 50), n.lineTo(K / 2, 50 + c), n.stroke(), n.setLineDash([]);
1811
+ let _ = 28;
1690
1812
  e.forEach((e, t) => {
1691
- let o = $e[e.severity] ?? u.blue, s = d[t];
1813
+ let o = lt[e.severity] ?? u.blue, s = d[t];
1692
1814
  s * r;
1693
- let l = i.current.get(e.severity) ?? 0, m = h + s / 2, _ = s * .85;
1694
- m - _ / 2;
1695
- let v = s * r, y = _ * r, b = m - y / 2;
1696
- if (v > 0 && (l > 0 && g(n, h + v / 2, 50 + c / 2, v * .4, o, .15 * l), n.beginPath(), n.moveTo(b, 50), n.lineTo(b + y, 50), n.lineTo(h + v, 50 + c), n.lineTo(h, 50 + c), n.closePath(), n.fillStyle = f(o, .45 + l * .25), n.fill(), n.strokeStyle = f(o, (.5 + l * .3) * r), n.lineWidth = l > 0 ? 2 : 1, n.beginPath(), n.moveTo(b, 50), n.lineTo(b + y, 50), n.stroke(), n.strokeStyle = f(o, (.3 + l * .3) * r), n.lineWidth = l > 0 ? 2 : 1, n.beginPath(), n.moveTo(h, 50 + c), n.lineTo(h + v, 50 + c), n.stroke()), C(p.current, e.severity, h, 50, s, c, {
1815
+ let l = i.current.get(e.severity) ?? 0, h = _ + s / 2, g = s * .85;
1816
+ h - g / 2;
1817
+ let y = s * r, b = g * r, x = h - b / 2;
1818
+ if (y > 0 && (l > 0 && v(n, _ + y / 2, 50 + c / 2, y * .4, o, .15 * l), n.beginPath(), n.moveTo(x, 50), n.lineTo(x + b, 50), n.lineTo(_ + y, 50 + c), n.lineTo(_, 50 + c), n.closePath(), n.fillStyle = m(o, .45 + l * .25), n.fill(), n.strokeStyle = m(o, (.5 + l * .3) * r), n.lineWidth = l > 0 ? 2 : 1, n.beginPath(), n.moveTo(x, 50), n.lineTo(x + b, 50), n.stroke(), n.strokeStyle = m(o, (.3 + l * .3) * r), n.lineWidth = l > 0 ? 2 : 1, n.beginPath(), n.moveTo(_, 50 + c), n.lineTo(_ + y, 50 + c), n.stroke()), T(p.current, e.severity, _, 50, s, c, {
1697
1819
  label: e.severity,
1698
1820
  value: `${e.count} Early Warnings`,
1699
1821
  sublabel: `${Math.round(e.count / a * 100)}% of all EWs`,
1700
1822
  color: o
1701
1823
  }), r > .5) {
1702
- let t = Math.min(1, (r - .5) / .5), i = h + s / 2;
1703
- n.globalAlpha = t, n.font = "bold 10px 'JetBrains Mono', monospace", n.fillStyle = l > 0 ? o : f(o, .9), n.textAlign = "center", n.fillText(e.severity, i, 38), n.font = `bold ${s > 80 ? "18" : "13"}px 'JetBrains Mono', monospace`, n.fillStyle = l > 0 ? u.t1 : f(u.t1, .85), n.fillText(String(e.count), i, 50 + c / 2 + 6), n.font = "9px 'JetBrains Mono', monospace", n.fillStyle = l > 0 ? o : f(u.t3, .7), n.fillText(`${Math.round(e.count / a * 100)}%`, i, 50 + c + 18), n.globalAlpha = 1;
1824
+ let t = Math.min(1, (r - .5) / .5), i = _ + s / 2;
1825
+ n.globalAlpha = t, n.font = "bold " + f.font, n.fillStyle = l > 0 ? o : m(o, .9), n.textAlign = "center", n.fillText(e.severity, i, 38), n.font = "bold " + f.font, n.fillStyle = l > 0 ? u.t1 : m(u.t1, .85), n.fillText(String(e.count), i, 50 + c / 2 + 6), n.font = f.font, n.fillStyle = l > 0 ? o : f.color, n.fillText(`${Math.round(e.count / a * 100)}%`, i, 50 + c + 18), n.globalAlpha = 1;
1704
1826
  }
1705
- h += s;
1827
+ _ += s;
1706
1828
  });
1707
- let v = n.createLinearGradient(28, 0, 28 + s, 0);
1708
- v.addColorStop(0, f(u.red, .03)), v.addColorStop(.33, f(u.orange, .03)), v.addColorStop(.66, f(u.amber, .03)), v.addColorStop(1, f(u.green, .03)), n.fillStyle = v, n.fillRect(28, 50, s * r, c), m = requestAnimationFrame(_);
1829
+ let y = n.createLinearGradient(28, 0, 28 + s, 0);
1830
+ y.addColorStop(0, m(u.red, .03)), y.addColorStop(.33, m(u.orange, .03)), y.addColorStop(.66, m(u.amber, .03)), y.addColorStop(1, m(u.green, .03)), n.fillStyle = y, n.fillRect(28, 50, s * r, c), h = requestAnimationFrame(g);
1709
1831
  };
1710
- return _(), () => cancelAnimationFrame(m);
1832
+ return g(), () => cancelAnimationFrame(h);
1711
1833
  }, [e]), /* @__PURE__ */ c("div", {
1712
1834
  "data-testid": t,
1713
1835
  style: {
1714
1836
  position: "relative",
1715
1837
  width: K,
1716
- height: Qe
1838
+ height: ct
1717
1839
  },
1718
1840
  children: [/* @__PURE__ */ s("canvas", {
1719
1841
  ref: r,
@@ -1721,67 +1843,67 @@ function et({ severities: e, "data-testid": t }) {
1721
1843
  "aria-label": "Early Warning severity distribution — prism spectrum bands",
1722
1844
  style: {
1723
1845
  width: K,
1724
- height: Qe,
1846
+ height: ct,
1725
1847
  display: "block"
1726
1848
  }
1727
- }), /* @__PURE__ */ s(b, {
1849
+ }), /* @__PURE__ */ s(S, {
1728
1850
  ...d,
1729
1851
  parentW: K,
1730
- parentH: Qe
1852
+ parentH: ct
1731
1853
  })]
1732
1854
  });
1733
1855
  }
1734
1856
  //#endregion
1735
1857
  //#region src/components/statusArc/StatusArc.tsx
1736
- var q = 460, J = 300, tt = {
1858
+ var q = 460, J = 300, dt = {
1737
1859
  Open: u.red,
1738
1860
  Submitted: u.amber,
1739
1861
  Closed: u.green
1740
1862
  };
1741
- function nt({ segments: e, title: t, "data-testid": r }) {
1742
- let i = a(null), o = a(0), l = a(/* @__PURE__ */ new Map()), { hoveredRef: d, tooltip: p, hitZonesRef: m } = x(i, {
1863
+ function ft({ segments: e = [], title: t, "data-testid": r }) {
1864
+ let i = a(null), o = a(0), l = a(/* @__PURE__ */ new Map()), { hoveredRef: d, tooltip: p, hitZonesRef: h } = C(i, {
1743
1865
  width: q,
1744
1866
  height: J
1745
1867
  });
1746
1868
  return n(() => {
1747
1869
  let t = i.current;
1748
1870
  if (!t) return;
1749
- let n = h(t, q, J);
1871
+ let n = _(t, q, J);
1750
1872
  o.current = 0;
1751
- let r = q * .5, a = J * .54, s = q * .22, c = e.reduce((e, t) => e + t.count, 0), p = Math.max(...e.map((e) => e.count), 1), y, b = () => {
1873
+ let r = q * .5, a = J * .54, s = q * .22, c = e.reduce((e, t) => e + t.count, 0), p = Math.max(...e.map((e) => e.count), 1), g, x = () => {
1752
1874
  o.current++;
1753
1875
  let t = o.current;
1754
- n.clearRect(0, 0, q, J), m.current = [], l.current.forEach((e, t) => {
1876
+ n.clearRect(0, 0, q, J), h.current = [], l.current.forEach((e, t) => {
1755
1877
  let n = t === d.current ? 1 : 0, r = e + (n - e) * .12;
1756
1878
  Math.abs(r - n) < .005 ? n === 0 ? l.current.delete(t) : l.current.set(t, 1) : l.current.set(t, r);
1757
- }), d.current && !l.current.has(d.current) && l.current.set(d.current, 0), _(n, q, J, t, 40, f(u.blue, .04)), e.forEach((e, i) => {
1758
- let o = i / 3 * Math.PI * 2 - Math.PI / 2, c = r + Math.cos(o) * s, l = a + Math.sin(o) * s, d = tt[e.status] ?? u.blue, m = 2 + e.count / p * 8;
1759
- n.beginPath(), n.moveTo(r, a), n.lineTo(c, l), n.strokeStyle = f(d, .08), n.lineWidth = m * 2, n.stroke(), n.beginPath(), n.moveTo(r, a), n.lineTo(c, l), n.strokeStyle = f(d, .25), n.lineWidth = 1, n.stroke();
1760
- let h = (t * .005 + i * .33) % 1, _ = r + (c - r) * h, v = a + (l - a) * h;
1761
- g(n, _, v, 6, d, .4), n.beginPath(), n.arc(_, v, 2, 0, Math.PI * 2), n.fillStyle = f(d, .8), n.fill();
1762
- let y = (r + c) / 2, b = (a + l) / 2;
1763
- n.font = "bold 9px 'JetBrains Mono', monospace", n.textAlign = "center", n.textBaseline = "middle", n.fillStyle = f(d, .85), n.fillText(String(e.count), y, b);
1879
+ }), d.current && !l.current.has(d.current) && l.current.set(d.current, 0), y(n, q, J, t, 40, m(u.blue, .04)), e.forEach((e, i) => {
1880
+ let o = i / 3 * Math.PI * 2 - Math.PI / 2, c = r + Math.cos(o) * s, l = a + Math.sin(o) * s, d = dt[e.status] ?? u.blue, h = 2 + e.count / p * 8;
1881
+ n.beginPath(), n.moveTo(r, a), n.lineTo(c, l), n.strokeStyle = m(d, .08), n.lineWidth = h * 2, n.stroke(), n.beginPath(), n.moveTo(r, a), n.lineTo(c, l), n.strokeStyle = m(d, .25), n.lineWidth = 1, n.stroke();
1882
+ let g = (t * .005 + i * .33) % 1, _ = r + (c - r) * g, y = a + (l - a) * g;
1883
+ v(n, _, y, 6, d, .4), n.beginPath(), n.arc(_, y, 2, 0, Math.PI * 2), n.fillStyle = m(d, .8), n.fill();
1884
+ let b = (r + c) / 2, x = (a + l) / 2;
1885
+ n.font = "bold " + f.font, n.textAlign = "center", n.textBaseline = "middle", n.fillStyle = m(d, .85), n.fillText(String(e.count), b, x);
1764
1886
  }), e.forEach((e, t) => {
1765
- let i = t / 3 * Math.PI * 2 - Math.PI / 2, o = r + Math.cos(i) * s, d = a + Math.sin(i) * s, h = tt[e.status] ?? u.blue, _ = 10 + e.count / p * 18, v = l.current.get(e.status) ?? 0;
1766
- g(n, o, d, _ * 2.5, h, .2 + v * .15);
1767
- let y = n.createRadialGradient(o, d - _ * .2, 0, o, d, _);
1768
- y.addColorStop(0, f(h, .8 + v * .2)), y.addColorStop(1, f(h, .4 + v * .1)), n.beginPath(), n.arc(o, d, _, 0, Math.PI * 2), n.fillStyle = y, n.fill(), n.font = "bold 9px 'JetBrains Mono', monospace", n.textAlign = "center", n.textBaseline = "middle", n.fillStyle = f(u.t1, .9), n.fillText(e.status, o, d), S(m.current, e.status, o, d, _ + 6, {
1887
+ let i = t / 3 * Math.PI * 2 - Math.PI / 2, o = r + Math.cos(i) * s, d = a + Math.sin(i) * s, g = dt[e.status] ?? u.blue, _ = 10 + e.count / p * 18, y = l.current.get(e.status) ?? 0;
1888
+ v(n, o, d, _ * 2.5, g, .2 + y * .15);
1889
+ let b = n.createRadialGradient(o, d - _ * .2, 0, o, d, _);
1890
+ b.addColorStop(0, m(g, .8 + y * .2)), b.addColorStop(1, m(g, .4 + y * .1)), n.beginPath(), n.arc(o, d, _, 0, Math.PI * 2), n.fillStyle = b, n.fill(), n.font = "bold " + f.font, n.textAlign = "center", n.textBaseline = "middle", n.fillStyle = m(u.t1, .9), n.fillText(e.status, o, d), w(h.current, e.status, o, d, _ + 6, {
1769
1891
  label: e.status,
1770
1892
  value: `${e.count} Early Warnings`,
1771
1893
  sublabel: `${Math.round(e.count / c * 100)}%`,
1772
- color: h
1894
+ color: g
1773
1895
  });
1774
1896
  });
1775
1897
  let i = l.current.get("center") ?? 0;
1776
- g(n, r, a, 36, u.t3, .2 + i * .15);
1777
- let h = n.createRadialGradient(r, a - 4, 0, r, a, 22);
1778
- h.addColorStop(0, f(u.t2, .9)), h.addColorStop(1, f(u.t3, .5)), n.beginPath(), n.arc(r, a, 22, 0, Math.PI * 2), n.fillStyle = h, n.fill(), n.font = "bold 8px 'JetBrains Mono', monospace", n.textAlign = "center", n.textBaseline = "middle", n.fillStyle = f(u.t1, .9), n.fillText("EW Status", r, a - 4), n.font = "bold 10px 'JetBrains Mono', monospace", n.fillStyle = u.t1, n.fillText(String(c), r, a + 8), S(m.current, "center", r, a, 28, {
1898
+ v(n, r, a, 36, u.t3, .2 + i * .15);
1899
+ let _ = n.createRadialGradient(r, a - 4, 0, r, a, 22);
1900
+ _.addColorStop(0, m(u.t2, .9)), _.addColorStop(1, m(u.t3, .5)), n.beginPath(), n.arc(r, a, 22, 0, Math.PI * 2), n.fillStyle = _, n.fill(), n.font = f.font, n.textAlign = "center", n.textBaseline = "middle", n.fillStyle = m(u.t1, .9), n.fillText("EW Status", r, a - 4), n.font = "bold " + f.font, n.fillStyle = u.t1, n.fillText(String(c), r, a + 8), w(h.current, "center", r, a, 28, {
1779
1901
  label: "Total EW Status",
1780
1902
  value: `${c} Early Warnings`,
1781
1903
  color: u.t3
1782
- }), v(n, q, J, t, .015), y = requestAnimationFrame(b);
1904
+ }), b(n, q, J, t, .015), g = requestAnimationFrame(x);
1783
1905
  };
1784
- return b(), () => cancelAnimationFrame(y);
1906
+ return x(), () => cancelAnimationFrame(g);
1785
1907
  }, [e, t]), /* @__PURE__ */ c("div", {
1786
1908
  "data-testid": r,
1787
1909
  style: {
@@ -1799,7 +1921,7 @@ function nt({ segments: e, title: t, "data-testid": r }) {
1799
1921
  display: "block",
1800
1922
  borderRadius: 8
1801
1923
  }
1802
- }), /* @__PURE__ */ s(b, {
1924
+ }), /* @__PURE__ */ s(S, {
1803
1925
  ...p,
1804
1926
  parentW: q,
1805
1927
  parentH: J
@@ -1808,27 +1930,27 @@ function nt({ segments: e, title: t, "data-testid": r }) {
1808
1930
  }
1809
1931
  //#endregion
1810
1932
  //#region src/components/trendChart/TrendChart.tsx
1811
- var Y = 280, X = 96;
1812
- function rt({ points: e = [], className: t, colors: r }) {
1813
- let o = a(null), d = a(/* @__PURE__ */ new Map()), p = a(0), m = i(() => e.map(([e, t]) => {
1933
+ var pt = 280, Y = 96;
1934
+ function mt({ points: e = [], className: t, colors: r }) {
1935
+ let o = a(null), d = a(/* @__PURE__ */ new Map()), f = a(0), p = i(() => e.map(([e, t]) => {
1814
1936
  let n = String(t).match(/-?\d+(\.\d+)?/);
1815
1937
  return {
1816
1938
  label: e,
1817
1939
  value: n ? Number(n[0]) : 0
1818
1940
  };
1819
- }), [e]), { mouseRef: _, hoveredRef: v, tooltip: C, hitZonesRef: w } = x(o, {
1820
- width: Y,
1821
- height: X
1941
+ }), [e]), { mouseRef: h, hoveredRef: g, tooltip: y, hitZonesRef: b } = C(o, {
1942
+ width: pt,
1943
+ height: Y
1822
1944
  });
1823
1945
  return n(() => {
1824
1946
  let e = o.current;
1825
1947
  if (!e) return;
1826
- let t = h(e, Y, X);
1827
- p.current = 0;
1948
+ let t = _(e, pt, Y);
1949
+ f.current = 0;
1828
1950
  let n = r?.line ?? u.blue, i = r?.point ?? u.blue, a = r?.axisLine ?? u.bd, s, c = () => {
1829
- p.current++;
1830
- let e = p.current;
1831
- if (t.clearRect(0, 0, Y, X), m.length < 2) {
1951
+ f.current++;
1952
+ let e = f.current;
1953
+ if (t.clearRect(0, 0, pt, Y), p.length < 2) {
1832
1954
  s = requestAnimationFrame(c);
1833
1955
  return;
1834
1956
  }
@@ -1837,185 +1959,185 @@ function rt({ points: e = [], className: t, colors: r }) {
1837
1959
  right: 12,
1838
1960
  top: 16,
1839
1961
  bottom: 20
1840
- }, o = Y - r.left - r.right, l = X - r.top - r.bottom, h = m.map((e) => e.value), b = Math.min(...h), x = Math.max(...h) - b || 1, C = (e) => r.left + e / (m.length - 1) * o, T = (e) => r.top + (1 - (e - b) / x) * l, E = 1 - (1 - Math.min(e / 48, 1)) ** 3, D = Math.max(2, Math.floor(E * m.length));
1841
- if (A(d.current, v.current), w.current = [], t.strokeStyle = f(a, .3), t.lineWidth = .5, t.setLineDash([]), t.beginPath(), t.moveTo(r.left, X - r.bottom), t.lineTo(Y - r.right, X - r.bottom), t.stroke(), t.font = "9px 'JetBrains Mono', monospace", t.fillStyle = f(u.t4, .9), t.textAlign = "center", m.forEach((e, n) => {
1842
- t.fillText(e.label.replace("Day ", "D"), C(n), X - 4);
1843
- }), _.current.over && v.current) {
1844
- let e = parseInt(v.current.split("-")[1]);
1845
- isNaN(e) || y(t, C(e), r.top, r.top + l);
1962
+ }, o = pt - r.left - r.right, l = Y - r.top - r.bottom, _ = p.map((e) => e.value), y = Math.min(..._), S = Math.max(..._) - y || 1, C = (e) => r.left + e / (p.length - 1) * o, T = (e) => r.top + (1 - (e - y) / S) * l, E = 1 - (1 - Math.min(e / 48, 1)) ** 3, D = Math.max(2, Math.floor(E * p.length));
1963
+ if (M(d.current, g.current), b.current = [], t.strokeStyle = m(a, .3), t.lineWidth = .5, t.setLineDash([]), t.beginPath(), t.moveTo(r.left, Y - r.bottom), t.lineTo(pt - r.right, Y - r.bottom), t.stroke(), t.font = "9px 'JetBrains Mono', monospace", t.fillStyle = m(u.t4, .9), t.textAlign = "center", p.forEach((e, n) => {
1964
+ t.fillText(e.label.replace("Day ", "D"), C(n), Y - 4);
1965
+ }), h.current.over && g.current) {
1966
+ let e = parseInt(g.current.split("-")[1]);
1967
+ isNaN(e) || x(t, C(e), r.top, r.top + l);
1846
1968
  }
1847
1969
  if (D > 1) {
1848
1970
  let e = t.createLinearGradient(0, r.top, 0, r.top + l);
1849
- e.addColorStop(0, f(n, .15)), e.addColorStop(1, f(n, 0)), t.fillStyle = e, t.beginPath(), t.moveTo(C(0), r.top + l);
1850
- for (let e = 0; e < D; e++) t.lineTo(C(e), T(m[e].value));
1851
- t.lineTo(C(D - 1), r.top + l), t.closePath(), t.fill(), t.strokeStyle = f(n, .8), t.lineWidth = 1.5, t.setLineDash([]), t.beginPath();
1971
+ e.addColorStop(0, m(n, .15)), e.addColorStop(1, m(n, 0)), t.fillStyle = e, t.beginPath(), t.moveTo(C(0), r.top + l);
1972
+ for (let e = 0; e < D; e++) t.lineTo(C(e), T(p[e].value));
1973
+ t.lineTo(C(D - 1), r.top + l), t.closePath(), t.fill(), t.strokeStyle = m(n, .8), t.lineWidth = 1.5, t.setLineDash([]), t.beginPath();
1852
1974
  for (let e = 0; e < D; e++) {
1853
- let n = C(e), r = T(m[e].value);
1975
+ let n = C(e), r = T(p[e].value);
1854
1976
  e === 0 ? t.moveTo(n, r) : t.lineTo(n, r);
1855
1977
  }
1856
1978
  t.stroke();
1857
1979
  }
1858
1980
  for (let e = 0; e < D; e++) {
1859
- let n = C(e), r = T(m[e].value), a = `tp-${e}`, o = d.current.get(a) ?? 0, s = e === m.length - 1;
1860
- S(w.current, a, n, r, 10, {
1861
- label: m[e].label,
1862
- value: String(m[e].value),
1981
+ let n = C(e), r = T(p[e].value), a = `tp-${e}`, o = d.current.get(a) ?? 0, s = e === p.length - 1;
1982
+ w(b.current, a, n, r, 10, {
1983
+ label: p[e].label,
1984
+ value: String(p[e].value),
1863
1985
  color: s ? u.red : i
1864
- }), o > 0 && !s && (g(t, n, r, 12 * o, i, .2 * o), t.fillStyle = f(i, .8), t.beginPath(), t.arc(n, r, 3 + o * 2, 0, Math.PI * 2), t.fill());
1986
+ }), o > 0 && !s && (v(t, n, r, 12 * o, i, .2 * o), t.fillStyle = m(i, .8), t.beginPath(), t.arc(n, r, 3 + o * 2, 0, Math.PI * 2), t.fill());
1865
1987
  }
1866
- if (D >= m.length) {
1867
- let n = m.length - 1, r = C(n), i = T(m[n].value), a = d.current.get(`tp-${n}`) ?? 0, o = O(e, .05, 5e-4), s = 1 + a * .5;
1868
- t.shadowColor = f(u.red, .5), t.shadowBlur = (8 + o * 4) * s, t.fillStyle = u.red, t.beginPath(), t.arc(r, i, (3.5 + o * 1.5) * s, 0, Math.PI * 2), t.fill(), t.shadowBlur = 0;
1988
+ if (D >= p.length) {
1989
+ let n = p.length - 1, r = C(n), i = T(p[n].value), a = d.current.get(`tp-${n}`) ?? 0, o = A(e, .05, 5e-4), s = 1 + a * .5;
1990
+ t.shadowColor = m(u.red, .5), t.shadowBlur = (8 + o * 4) * s, t.fillStyle = u.red, t.beginPath(), t.arc(r, i, (3.5 + o * 1.5) * s, 0, Math.PI * 2), t.fill(), t.shadowBlur = 0;
1869
1991
  }
1870
1992
  s = requestAnimationFrame(c);
1871
1993
  };
1872
1994
  return c(), () => cancelAnimationFrame(s);
1873
- }, [m, r]), /* @__PURE__ */ s(l, {
1995
+ }, [p, r]), /* @__PURE__ */ s(l, {
1874
1996
  className: ["canvas-trend-frame", t].filter(Boolean).join(" "),
1875
1997
  children: /* @__PURE__ */ c("div", {
1876
1998
  style: {
1877
1999
  position: "relative",
1878
- width: Y,
1879
- height: X
2000
+ width: pt,
2001
+ height: Y
1880
2002
  },
1881
2003
  children: [/* @__PURE__ */ s("canvas", {
1882
2004
  ref: o,
1883
2005
  role: "img",
1884
2006
  "aria-label": "trend chart",
1885
2007
  style: {
1886
- width: Y,
1887
- height: X,
2008
+ width: pt,
2009
+ height: Y,
1888
2010
  display: "block",
1889
2011
  borderRadius: 8
1890
2012
  }
1891
- }), /* @__PURE__ */ s(b, {
1892
- ...C,
1893
- parentW: Y,
1894
- parentH: X
2013
+ }), /* @__PURE__ */ s(S, {
2014
+ ...y,
2015
+ parentW: pt,
2016
+ parentH: Y
1895
2017
  })]
1896
2018
  })
1897
2019
  });
1898
2020
  }
1899
2021
  //#endregion
1900
2022
  //#region src/components/variationSplit/VariationSplit.tsx
1901
- var it = 680, at = 320;
1902
- function ot({ contractors: e = [], "data-testid": t }) {
1903
- let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: p, hitZonesRef: m } = x(r, {
1904
- width: it,
1905
- height: at
2023
+ var ht = 680, gt = 320;
2024
+ function _t({ contractors: e = [], "data-testid": t }) {
2025
+ let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: f, hitZonesRef: h } = C(r, {
2026
+ width: ht,
2027
+ height: gt
1906
2028
  });
1907
2029
  return n(() => {
1908
2030
  let t = r.current;
1909
2031
  if (!t) return;
1910
- let n = h(t, it, at);
2032
+ let n = _(t, ht, gt);
1911
2033
  o.current = 0;
1912
- let a = it - 60 - 28, s = Math.max(...e.map((e) => (e.implemented ?? 0) + (e.unimplemented ?? 0))), c = e.length * 40 - 14, p = 16 + (at - 16 - 32 - c) / 2, _, v = () => {
2034
+ let a = ht - 60 - 28, s = Math.max(...e.map((e) => (e.implemented ?? 0) + (e.unimplemented ?? 0))), c = e.length * 40 - 14, f = 16 + (gt - 16 - 32 - c) / 2, g, y = () => {
1913
2035
  o.current++;
1914
2036
  let t = o.current;
1915
- n.clearRect(0, 0, it, at);
1916
- let r = T(Math.min(t / 60, 1));
1917
- A(i.current, l.current), m.current = [], e.forEach((t, o) => {
1918
- let c = d[o % d.length], l = k(r, o, e.length, T), h = p + o * 40, _ = (t.implemented ?? 0) + (t.unimplemented ?? 0), v = (t.implemented ?? 0) / s * a * l, y = (t.unimplemented ?? 0) / s * a * l, b = `${t.id}-impl`, x = `${t.id}-un`, S = i.current.get(b) ?? 0, w = i.current.get(x) ?? 0;
1919
- C(m.current, b, 60, h, v || 1, 26, {
2037
+ n.clearRect(0, 0, ht, gt);
2038
+ let r = D(Math.min(t / 60, 1));
2039
+ M(i.current, l.current), h.current = [], e.forEach((t, o) => {
2040
+ let c = d[o % d.length], l = j(r, o, e.length, D), p = f + o * 40, g = (t.implemented ?? 0) + (t.unimplemented ?? 0), _ = (t.implemented ?? 0) / s * a * l, y = (t.unimplemented ?? 0) / s * a * l, b = `${t.id}-impl`, x = `${t.id}-un`, S = i.current.get(b) ?? 0, C = i.current.get(x) ?? 0;
2041
+ T(h.current, b, 60, p, _ || 1, 26, {
1920
2042
  label: `${t.name} — Implemented`,
1921
2043
  value: `${t.implemented ?? 0} variations`,
1922
- sublabel: `${Math.round((t.implemented ?? 0) / (_ || 1) * 100)}% complete`,
2044
+ sublabel: `${Math.round((t.implemented ?? 0) / (g || 1) * 100)}% complete`,
1923
2045
  color: u.green
1924
- }), C(m.current, x, 60 + v, h, y || 1, 26, {
2046
+ }), T(h.current, x, 60 + _, p, y || 1, 26, {
1925
2047
  label: `${t.name} — Unimplemented`,
1926
2048
  value: `${t.unimplemented ?? 0} variations`,
1927
- sublabel: `${Math.round((t.unimplemented ?? 0) / (_ || 1) * 100)}% pending`,
2049
+ sublabel: `${Math.round((t.unimplemented ?? 0) / (g || 1) * 100)}% pending`,
1928
2050
  color: u.amber
1929
- }), n.font = "9px 'JetBrains Mono', monospace", n.fillStyle = f(c, .85), n.textAlign = "right", n.fillText(t.abbreviation ?? t.name.slice(0, 6), 52, h + 26 / 2 + 4), n.fillStyle = f(u.bd, .15), n.beginPath(), n.roundRect(60, h, _ / s * a, 26, 4), n.fill(), v > 0 && (S > 0 && g(n, 60 + v / 2, h + 26 / 2, v * .3, u.green, .12 * S), n.fillStyle = f(u.green, .6 + S * .2), n.beginPath(), n.roundRect(60, h, v, 26, [
2051
+ }), n.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = m(c, .85), n.textAlign = "right", n.fillText(t.abbreviation ?? t.name.slice(0, 6), 52, p + 26 / 2 + 4), n.fillStyle = m(u.bd, .15), n.beginPath(), n.roundRect(60, p, g / s * a, 26, 4), n.fill(), _ > 0 && (S > 0 && v(n, 60 + _ / 2, p + 26 / 2, _ * .3, u.green, .12 * S), n.fillStyle = m(u.green, .6 + S * .2), n.beginPath(), n.roundRect(60, p, _, 26, [
1930
2052
  4,
1931
2053
  0,
1932
2054
  0,
1933
2055
  4
1934
- ]), n.fill(), v > 28 && l > .5 && (n.font = "bold 10px 'JetBrains Mono', monospace", n.fillStyle = S > 0 ? u.green : f(u.t1, .8), n.textAlign = "center", n.fillText(String(t.implemented ?? 0), 60 + v / 2, h + 26 / 2 + 4))), y > 0 && (w > 0 && g(n, 60 + v + y / 2, h + 26 / 2, y * .3, u.amber, .12 * w), n.fillStyle = f(u.amber, .18 + w * .18), n.strokeStyle = f(u.amber, .3 + w * .3), n.lineWidth = 1, n.beginPath(), n.roundRect(60 + v, h, y, 26, [
2056
+ ]), n.fill(), _ > 28 && l > .5 && (n.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = S > 0 ? u.green : m(u.t1, .8), n.textAlign = "center", n.fillText(String(t.implemented ?? 0), 60 + _ / 2, p + 26 / 2 + 4))), y > 0 && (C > 0 && v(n, 60 + _ + y / 2, p + 26 / 2, y * .3, u.amber, .12 * C), n.fillStyle = m(u.amber, .18 + C * .18), n.strokeStyle = m(u.amber, .3 + C * .3), n.lineWidth = 1, n.beginPath(), n.roundRect(60 + _, p, y, 26, [
1935
2057
  0,
1936
2058
  4,
1937
2059
  4,
1938
2060
  0
1939
- ]), n.fill(), n.stroke(), y > 28 && l > .5 && (n.font = `${w > 0 ? "bold " : ""}10px 'JetBrains Mono', monospace`, n.fillStyle = w > 0 ? u.amber : f(u.t3, .8), n.textAlign = "center", n.fillText(String(t.unimplemented ?? 0), 60 + v + y / 2, h + 26 / 2 + 4))), v > 0 && y > 0 && (n.strokeStyle = f(u.bg, .7), n.lineWidth = 2, n.beginPath(), n.moveTo(60 + v, h), n.lineTo(60 + v, h + 26), n.stroke());
2061
+ ]), n.fill(), n.stroke(), y > 28 && l > .5 && (n.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = C > 0 ? u.amber : m(u.t3, .8), n.textAlign = "center", n.fillText(String(t.unimplemented ?? 0), 60 + _ + y / 2, p + 26 / 2 + 4))), _ > 0 && y > 0 && (n.strokeStyle = m(u.bg, .7), n.lineWidth = 2, n.beginPath(), n.moveTo(60 + _, p), n.lineTo(60 + _, p + 26), n.stroke());
1940
2062
  });
1941
- let h = p + c + 24, y = 60 + a / 2;
1942
- n.font = "9px 'JetBrains Mono', monospace", n.textAlign = "right", n.fillStyle = u.green, n.fillText("■ Implemented", y - 10, h), n.textAlign = "left", n.fillStyle = f(u.t3, .7), n.fillText("■ Unimplemented", y + 10, h), _ = requestAnimationFrame(v);
2063
+ let _ = f + c + 24, b = 60 + a / 2;
2064
+ n.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", n.textAlign = "right", n.fillStyle = u.green, n.fillText("■ Implemented", b - 10, _), n.textAlign = "left", n.fillStyle = p.color, n.fillText("■ Unimplemented", b + 10, _), g = requestAnimationFrame(y);
1943
2065
  };
1944
- return v(), () => cancelAnimationFrame(_);
2066
+ return y(), () => cancelAnimationFrame(g);
1945
2067
  }, [e]), /* @__PURE__ */ c("div", {
1946
2068
  "data-testid": t,
1947
2069
  style: {
1948
2070
  position: "relative",
1949
- width: it,
1950
- height: at
2071
+ width: ht,
2072
+ height: gt
1951
2073
  },
1952
2074
  children: [/* @__PURE__ */ s("canvas", {
1953
2075
  ref: r,
1954
2076
  role: "img",
1955
2077
  "aria-label": "Implemented vs unimplemented variations per contractor — split bar",
1956
2078
  style: {
1957
- width: it,
1958
- height: at,
2079
+ width: ht,
2080
+ height: gt,
1959
2081
  display: "block"
1960
2082
  }
1961
- }), /* @__PURE__ */ s(b, {
1962
- ...p,
1963
- parentW: it,
1964
- parentH: at
2083
+ }), /* @__PURE__ */ s(S, {
2084
+ ...f,
2085
+ parentW: ht,
2086
+ parentH: gt
1965
2087
  })]
1966
2088
  });
1967
2089
  }
1968
2090
  //#endregion
1969
2091
  //#region src/components/weeklyFlow/WeeklyFlow.tsx
1970
- var st = 800, ct = 360;
1971
- function lt({ contractors: e = [], "data-testid": t }) {
1972
- let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: p, hitZonesRef: m } = x(r, {
1973
- width: st,
1974
- height: ct
2092
+ var vt = 800, yt = 360;
2093
+ function bt({ contractors: e = [], "data-testid": t }) {
2094
+ let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: f, hitZonesRef: p } = C(r, {
2095
+ width: vt,
2096
+ height: yt
1975
2097
  });
1976
2098
  return n(() => {
1977
2099
  let t = r.current;
1978
2100
  if (!t) return;
1979
- let n = h(t, st, ct);
2101
+ let n = _(t, vt, yt);
1980
2102
  o.current = 0;
1981
- 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), p = ct - 20 - 26, _ = p - 6 * (e.length - 1), v = 20, y = e.map((e, t) => {
1982
- let n = Math.max(24, (e.total ?? 0) / (c || 1) * _), r = {
2103
+ let a = e.reduce((e, t) => e + (t.base ?? 0), 0), s = e.reduce((e, t) => e + (t.variation ?? 0), 0), c = e.reduce((e, t) => e + (t.total ?? 0), 0), f = yt - 20 - 26, h = f - 6 * (e.length - 1), g = 20, y = e.map((e, t) => {
2104
+ let n = Math.max(24, (e.total ?? 0) / (c || 1) * h), r = {
1983
2105
  x: 100 - 110 / 2,
1984
- y: v,
2106
+ y: g,
1985
2107
  h: n,
1986
- cy: v + n / 2,
2108
+ cy: g + n / 2,
1987
2109
  c: e,
1988
2110
  color: d[t % d.length]
1989
2111
  };
1990
- return v += n + 6, r;
1991
- }), b = _ - 14, x = Math.max(28, a / c * b), S = Math.max(18, s / c * b), T = 20 + (p - (x + S + 14)) / 2, E = {
2112
+ return g += n + 6, r;
2113
+ }), b = h - 14, x = Math.max(28, a / c * b), S = Math.max(18, s / c * b), C = 20 + (f - (x + S + 14)) / 2, w = {
1992
2114
  x: 420 - 110 / 2,
1993
- y: T,
2115
+ y: C,
1994
2116
  h: x,
1995
- cy: T + x / 2
2117
+ cy: C + x / 2
1996
2118
  }, D = {
1997
2119
  x: 420 - 110 / 2,
1998
- y: T + x + 14,
2120
+ y: C + x + 14,
1999
2121
  h: S,
2000
- cy: T + x + 14 + S / 2
2122
+ cy: C + x + 14 + S / 2
2001
2123
  }, O = {
2002
2124
  x: 720 - 110 / 2,
2003
2125
  y: 20,
2004
- h: p,
2005
- cy: 20 + p / 2
2006
- }, j, M = () => {
2126
+ h: f,
2127
+ cy: 20 + f / 2
2128
+ }, k, A = () => {
2007
2129
  o.current++;
2008
2130
  let t = o.current;
2009
- n.clearRect(0, 0, st, ct);
2010
- let r = w(Math.min(t / 80, 1));
2011
- if (A(i.current, l.current), m.current = [], e.forEach((t, o) => {
2012
- let c = y[o], l = k(r, o, e.length, w), u = i.current.get(t.id) ?? 0;
2131
+ n.clearRect(0, 0, vt, yt);
2132
+ let r = E(Math.min(t / 80, 1));
2133
+ if (M(i.current, l.current), p.current = [], e.forEach((t, o) => {
2134
+ let c = y[o], l = j(r, o, e.length, E), u = i.current.get(t.id) ?? 0;
2013
2135
  if (l < .01) return;
2014
- let d = (t.base ?? 0) / (t.total || 1), f = (t.variation ?? 0) / (t.total || 1), p = c.h * d, m = c.h * f, h = c.y + p / 2, g = c.y + p + m / 2, _ = Math.max(2, (t.base ?? 0) / a * x), v = Math.max(2, (t.variation ?? 0) / s * S), b = E.y + e.slice(0, o).reduce((e, t) => e + (t.base ?? 0) / a * x, 0) + _ / 2, C = D.y + e.slice(0, o).reduce((e, t) => e + (t.variation ?? 0) / s * S, 0) + v / 2, T = u * .2 + .18;
2015
- ut(n, c.x + 110, h, 420 - 110 / 2, b, _ * l, c.color, T), ut(n, c.x + 110, g, 420 - 110 / 2, C, v * l, c.color, T * .75);
2136
+ let d = (t.base ?? 0) / (t.total || 1), f = (t.variation ?? 0) / (t.total || 1), p = c.h * d, m = c.h * f, h = c.y + p / 2, g = c.y + p + m / 2, _ = Math.max(2, (t.base ?? 0) / a * x), v = Math.max(2, (t.variation ?? 0) / s * S), b = w.y + e.slice(0, o).reduce((e, t) => e + (t.base ?? 0) / a * x, 0) + _ / 2, C = D.y + e.slice(0, o).reduce((e, t) => e + (t.variation ?? 0) / s * S, 0) + v / 2, T = u * .2 + .18;
2137
+ xt(n, c.x + 110, h, 420 - 110 / 2, b, _ * l, c.color, T), xt(n, c.x + 110, g, 420 - 110 / 2, C, v * l, c.color, T * .75);
2016
2138
  }), r > .3) {
2017
- let e = Math.min(1, (r - .3) / .7), t = O.y + a / c * p / 2, i = O.y + p - s / c * p / 2;
2018
- ut(n, 475, E.cy, 720 - 110 / 2, t, x * e, u.blue, .25 * e), ut(n, 475, D.cy, 720 - 110 / 2, i, S * e, u.amber, .22 * e);
2139
+ let e = Math.min(1, (r - .3) / .7), t = O.y + a / c * f / 2, i = O.y + f - s / c * f / 2;
2140
+ xt(n, 475, w.cy, 720 - 110 / 2, t, x * e, u.blue, .25 * e), xt(n, 475, D.cy, 720 - 110 / 2, i, S * e, u.amber, .22 * e);
2019
2141
  }
2020
2142
  if ([
2021
2143
  "Contractors",
@@ -2027,136 +2149,136 @@ function lt({ contractors: e = [], "data-testid": t }) {
2027
2149
  420,
2028
2150
  720
2029
2151
  ][t];
2030
- n.font = "9px 'JetBrains Mono', monospace", n.fillStyle = f(u.t3, .5), n.textAlign = "center", n.fillText(e, r, ct - 8);
2152
+ n.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = m(u.t3, .5), n.textAlign = "center", n.fillText(e, r, yt - 8);
2031
2153
  }), e.forEach((t, a) => {
2032
- let o = y[a], s = k(r, a, e.length, w), c = i.current.get(t.id) ?? 0;
2033
- C(m.current, t.id, o.x, o.y, 110, o.h, {
2154
+ let o = y[a], s = j(r, a, e.length, E), c = i.current.get(t.id) ?? 0;
2155
+ T(p.current, t.id, o.x, o.y, 110, o.h, {
2034
2156
  label: t.name,
2035
2157
  value: `£${t.total ?? 0}M total commitment`,
2036
2158
  sublabel: `Base £${t.base ?? 0}M + Variations £${t.variation ?? 0}M`,
2037
2159
  color: o.color
2038
- }), c > 0 && g(n, o.x + 110 / 2, o.cy, 110 * .6, o.color, .12 * c), n.fillStyle = f(o.color, (.3 + c * .15) * s), n.strokeStyle = f(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 = `${c > 0 ? "bold " : ""}9px 'JetBrains Mono', monospace`, n.fillStyle = c > 0 ? o.color : f(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 = "8px 'JetBrains Mono', monospace", n.fillStyle = f(u.t3, .8), n.fillText(`£${t.total ?? 0}M`, o.x + 110 / 2, o.cy + 7)), n.globalAlpha = 1, n.textBaseline = "alphabetic");
2160
+ }), c > 0 && v(n, o.x + 110 / 2, o.cy, 110 * .6, o.color, .12 * c), n.fillStyle = m(o.color, (.3 + c * .15) * s), n.strokeStyle = m(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 = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = c > 0 ? o.color : m(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 = m(u.t3, .8), n.fillText(`£${t.total ?? 0}M`, o.x + 110 / 2, o.cy + 7)), n.globalAlpha = 1, n.textBaseline = "alphabetic");
2039
2161
  }), r > .2) {
2040
2162
  let e = Math.min(1, (r - .2) / .4);
2041
- g(n, 420, E.cy, 30, u.blue, .1 * e), n.fillStyle = f(u.blue, .3 * e), n.strokeStyle = f(u.blue, .5 * e), n.lineWidth = 1, n.beginPath(), n.roundRect(E.x, E.y, 110, E.h * e, 4), n.fill(), n.stroke(), n.globalAlpha = e, n.textBaseline = "middle", n.font = "bold 9px 'JetBrains Mono', monospace", n.fillStyle = u.blue, n.textAlign = "center", n.fillText("Base Value", 420, E.cy - 6), n.font = "10px 'JetBrains Mono', monospace", n.fillStyle = u.t1, n.fillText(`£${a}M`, 420, E.cy + 8), n.globalAlpha = 1, n.textBaseline = "alphabetic", g(n, 420, D.cy, 24, u.amber, .1 * e), n.fillStyle = f(u.amber, .22 * e), n.strokeStyle = f(u.amber, .4 * e), n.beginPath(), n.roundRect(D.x, D.y, 110, D.h * e, 4), n.fill(), n.stroke(), n.globalAlpha = e, n.textBaseline = "middle", n.font = "bold 9px 'JetBrains Mono', monospace", n.fillStyle = u.amber, n.textAlign = "center", n.fillText("Variations", 420, D.cy - 4), n.font = "10px 'JetBrains Mono', monospace", n.fillStyle = u.t1, n.fillText(`£${s}M`, 420, D.cy + 8), n.globalAlpha = 1, n.textBaseline = "alphabetic";
2163
+ v(n, 420, w.cy, 30, u.blue, .1 * e), n.fillStyle = m(u.blue, .3 * e), n.strokeStyle = m(u.blue, .5 * e), n.lineWidth = 1, n.beginPath(), n.roundRect(w.x, w.y, 110, w.h * e, 4), n.fill(), n.stroke(), n.globalAlpha = e, n.textBaseline = "middle", n.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = u.blue, n.textAlign = "center", n.fillText("Base Value", 420, w.cy - 6), n.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = u.t1, n.fillText(`£${a}M`, 420, w.cy + 8), n.globalAlpha = 1, n.textBaseline = "alphabetic", v(n, 420, D.cy, 24, u.amber, .1 * e), n.fillStyle = m(u.amber, .22 * e), n.strokeStyle = m(u.amber, .4 * e), n.beginPath(), n.roundRect(D.x, D.y, 110, D.h * e, 4), n.fill(), n.stroke(), n.globalAlpha = e, n.textBaseline = "middle", n.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = u.amber, n.textAlign = "center", n.fillText("Variations", 420, D.cy - 4), n.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = u.t1, n.fillText(`£${s}M`, 420, D.cy + 8), n.globalAlpha = 1, n.textBaseline = "alphabetic";
2042
2164
  }
2043
2165
  if (r > .5) {
2044
2166
  let e = Math.min(1, (r - .5) / .5);
2045
- g(n, 720, O.cy, 44, u.cyan, .2 * e), n.fillStyle = f(u.cyan, .25 * e), n.strokeStyle = f(u.cyan, .6 * e), n.lineWidth = 1.5, n.beginPath(), n.roundRect(O.x, O.y, 110, O.h * e, 6), n.fill(), n.stroke(), n.globalAlpha = e, n.textBaseline = "middle", n.font = "9px 'JetBrains Mono', monospace", n.fillStyle = u.t2, n.textAlign = "center", n.fillText("Total Commitment", 720, O.cy - 12), n.font = "bold 16px 'JetBrains Mono', monospace", n.fillStyle = u.cyan, n.fillText(`£${c}M`, 720, O.cy + 6), n.globalAlpha = 1, n.textBaseline = "alphabetic";
2167
+ v(n, 720, O.cy, 44, u.cyan, .2 * e), n.fillStyle = m(u.cyan, .25 * e), n.strokeStyle = m(u.cyan, .6 * e), n.lineWidth = 1.5, n.beginPath(), n.roundRect(O.x, O.y, 110, O.h * e, 6), n.fill(), n.stroke(), n.globalAlpha = e, n.textBaseline = "middle", n.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = u.t2, n.textAlign = "center", n.fillText("Total Commitment", 720, O.cy - 12), n.font = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = u.cyan, n.fillText(`£${c}M`, 720, O.cy + 6), n.globalAlpha = 1, n.textBaseline = "alphabetic";
2046
2168
  }
2047
- j = requestAnimationFrame(M);
2169
+ k = requestAnimationFrame(A);
2048
2170
  };
2049
- return M(), () => cancelAnimationFrame(j);
2171
+ return A(), () => cancelAnimationFrame(k);
2050
2172
  }, [e]), /* @__PURE__ */ c("div", {
2051
2173
  "data-testid": t,
2052
2174
  style: {
2053
2175
  position: "relative",
2054
- width: st,
2055
- height: ct
2176
+ width: vt,
2177
+ height: yt
2056
2178
  },
2057
2179
  children: [/* @__PURE__ */ s("canvas", {
2058
2180
  ref: r,
2059
2181
  role: "img",
2060
2182
  "aria-label": "Weekly report flow — base value and variations per contractor flowing to total commitment",
2061
2183
  style: {
2062
- width: st,
2063
- height: ct,
2184
+ width: vt,
2185
+ height: yt,
2064
2186
  display: "block"
2065
2187
  }
2066
- }), /* @__PURE__ */ s(b, {
2067
- ...p,
2068
- parentW: st,
2069
- parentH: ct
2188
+ }), /* @__PURE__ */ s(S, {
2189
+ ...f,
2190
+ parentW: vt,
2191
+ parentH: yt
2070
2192
  })]
2071
2193
  });
2072
2194
  }
2073
- function ut(e, t, n, r, i, a, o, s) {
2195
+ function xt(e, t, n, r, i, a, o, s) {
2074
2196
  let c = (t + r) / 2;
2075
- 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 = f(o, s), e.fill();
2197
+ e.beginPath(), e.moveTo(t, n - a / 2), e.bezierCurveTo(c, n - a / 2, c, i - a / 2, r, i - a / 2), e.lineTo(r, i + a / 2), e.bezierCurveTo(c, i + a / 2, c, n + a / 2, t, n + a / 2), e.closePath(), e.fillStyle = m(o, s), e.fill();
2076
2198
  }
2077
2199
  //#endregion
2078
2200
  //#region src/components/visualizationRenderer/VisualizationRenderer.tsx
2079
- function dt({ config: e, className: t }) {
2080
- return e.type === "line" ? /* @__PURE__ */ s(Ee, {
2201
+ function St({ config: e, className: t }) {
2202
+ return e.type === "line" ? /* @__PURE__ */ s(Oe, {
2081
2203
  rows: e.rows,
2082
2204
  className: t
2083
- }) : e.type === "area" ? /* @__PURE__ */ s(ee, {
2205
+ }) : e.type === "area" ? /* @__PURE__ */ s(ne, {
2084
2206
  rows: e.rows,
2085
2207
  className: t
2086
- }) : e.type === "bar" ? /* @__PURE__ */ s(te, {
2208
+ }) : e.type === "bar" ? /* @__PURE__ */ s(ie, {
2087
2209
  rows: e.rows,
2088
2210
  className: t
2089
- }) : e.type === "pie" ? /* @__PURE__ */ s(Fe, {
2211
+ }) : e.type === "pie" ? /* @__PURE__ */ s(Re, {
2090
2212
  rows: e.rows,
2091
2213
  variant: "pie",
2092
2214
  className: t
2093
- }) : e.type === "donut" ? /* @__PURE__ */ s(Fe, {
2215
+ }) : e.type === "donut" ? /* @__PURE__ */ s(Re, {
2094
2216
  rows: e.rows,
2095
2217
  variant: "donut",
2096
2218
  className: t
2097
- }) : e.type === "sankey" ? /* @__PURE__ */ s(Ke, {
2219
+ }) : e.type === "sankey" ? /* @__PURE__ */ s(Ye, {
2098
2220
  rows: e.rows,
2099
2221
  className: t
2100
- }) : e.type === "flow" ? /* @__PURE__ */ s(Ge, {
2222
+ }) : e.type === "flow" ? /* @__PURE__ */ s(Je, {
2101
2223
  selectedEntity: e.selectedEntity,
2102
2224
  className: t
2103
- }) : e.type === "trend" ? /* @__PURE__ */ s(rt, {
2225
+ }) : e.type === "trend" ? /* @__PURE__ */ s(mt, {
2104
2226
  points: e.points,
2105
2227
  className: t
2106
- }) : e.type === "mini-bars" ? /* @__PURE__ */ s(ke, {
2228
+ }) : e.type === "mini-bars" ? /* @__PURE__ */ s(je, {
2107
2229
  rows: e.rows,
2108
2230
  className: t
2109
- }) : e.type === "contract-value-orb" ? /* @__PURE__ */ s(ye, { data: e.data }) : e.type === "contract-bars" ? /* @__PURE__ */ s(me, { contractors: e.contractors }) : e.type === "commitment-race" ? /* @__PURE__ */ s(re, { contractors: e.contractors }) : e.type === "status-arc" ? /* @__PURE__ */ s(nt, {
2231
+ }) : e.type === "contract-value-orb" ? /* @__PURE__ */ s(xe, { data: e.data }) : e.type === "contract-bars" ? /* @__PURE__ */ s(ge, { contractors: e.contractors }) : e.type === "commitment-race" ? /* @__PURE__ */ s(oe, { contractors: e.contractors }) : e.type === "status-arc" ? /* @__PURE__ */ s(ft, {
2110
2232
  segments: e.segments,
2111
2233
  title: e.title
2112
- }) : e.type === "ew-category" ? /* @__PURE__ */ s(Te, { categories: e.categories }) : e.type === "contractor-rank" ? /* @__PURE__ */ s(we, { contractors: e.contractors }) : e.type === "severity-bands" ? /* @__PURE__ */ s(et, { severities: e.severities }) : e.type === "nce-tree" ? /* @__PURE__ */ s(je, {
2234
+ }) : e.type === "ew-category" ? /* @__PURE__ */ s(De, { categories: e.categories }) : e.type === "contractor-rank" ? /* @__PURE__ */ s(Ee, { contractors: e.contractors }) : e.type === "severity-bands" ? /* @__PURE__ */ s(ut, { severities: e.severities }) : e.type === "nce-tree" ? /* @__PURE__ */ s(Pe, {
2113
2235
  total: e.total,
2114
2236
  byContractor: e.byContractor
2115
- }) : e.type === "compensation-gauge" ? /* @__PURE__ */ s(oe, {
2237
+ }) : e.type === "compensation-gauge" ? /* @__PURE__ */ s(le, {
2116
2238
  pct: e.pct,
2117
2239
  confirmed: e.confirmed,
2118
2240
  total: e.total
2119
- }) : e.type === "variation-split" ? /* @__PURE__ */ s(ot, { contractors: e.contractors }) : e.type === "quotation-balance" ? /* @__PURE__ */ s(Ye, {
2241
+ }) : e.type === "variation-split" ? /* @__PURE__ */ s(_t, { contractors: e.contractors }) : e.type === "quotation-balance" ? /* @__PURE__ */ s(Qe, {
2120
2242
  accepted: e.accepted,
2121
2243
  submitted: e.submitted
2122
- }) : e.type === "quotation-trend" ? /* @__PURE__ */ s(Ze, { trend: e.trend }) : e.type === "weekly-flow" ? /* @__PURE__ */ s(lt, { contractors: e.contractors }) : /* @__PURE__ */ s("div", {
2244
+ }) : e.type === "quotation-trend" ? /* @__PURE__ */ s(et, { trend: e.trend }) : e.type === "trend-view" ? /* @__PURE__ */ s(st, { trend: e.trend }) : e.type === "weekly-flow" ? /* @__PURE__ */ s(bt, { contractors: e.contractors }) : /* @__PURE__ */ s("div", {
2123
2245
  className: "viz-empty",
2124
2246
  children: "Visualization unavailable"
2125
2247
  });
2126
2248
  }
2127
2249
  //#endregion
2128
2250
  //#region src/utils/mounts.tsx
2129
- var ft = [];
2130
- function pt(e) {
2251
+ var Ct = [];
2252
+ function wt(e) {
2131
2253
  try {
2132
2254
  return JSON.parse(decodeURIComponent(e));
2133
2255
  } catch {
2134
2256
  return null;
2135
2257
  }
2136
2258
  }
2137
- function mt() {
2138
- for (; ft.length;) {
2139
- let e = ft.pop();
2259
+ function Tt() {
2260
+ for (; Ct.length;) {
2261
+ let e = Ct.pop();
2140
2262
  e && e.unmount();
2141
2263
  }
2142
2264
  }
2143
- function ht() {
2144
- mt(), document.querySelectorAll("[data-d3-viz]").forEach((t) => {
2265
+ function Et() {
2266
+ Tt(), document.querySelectorAll("[data-d3-viz]").forEach((t) => {
2145
2267
  let n = t.dataset.d3Viz;
2146
2268
  if (!n) return;
2147
- let r = pt(n);
2269
+ let r = wt(n);
2148
2270
  if (!r) return;
2149
2271
  let i = e(t);
2150
- ft.push(i), i.render(/* @__PURE__ */ s(dt, { config: r }));
2272
+ Ct.push(i), i.render(/* @__PURE__ */ s(St, { config: r }));
2151
2273
  });
2152
2274
  }
2153
- function gt(e) {
2275
+ function Dt(e) {
2154
2276
  return encodeURIComponent(JSON.stringify(e));
2155
2277
  }
2156
2278
  //#endregion
2157
2279
  //#region src/components/donutChart/DonutChart.tsx
2158
- function _t({ rows: e = [], className: t, colors: n }) {
2159
- return /* @__PURE__ */ s(Fe, {
2280
+ function Ot({ rows: e = [], className: t, colors: n }) {
2281
+ return /* @__PURE__ */ s(Re, {
2160
2282
  rows: e,
2161
2283
  variant: "donut",
2162
2284
  className: t,
@@ -2165,18 +2287,30 @@ function _t({ rows: e = [], className: t, colors: n }) {
2165
2287
  }
2166
2288
  //#endregion
2167
2289
  //#region src/components/keyHighlights/KeyHighlights.tsx
2168
- var Z = {
2169
- bg: "rgba(255,255,255,0.025)",
2170
- border: "rgba(28,45,66,0.9)",
2171
- t1: "#F1F5F9",
2172
- t2: "#CBD5E1",
2173
- t3: "#94A3B8",
2174
- t4: "#64748B",
2175
- red: "#F06060",
2176
- amber: "#FBBF24",
2177
- green: "#34D399"
2178
- }, Q = "'JetBrains Mono', monospace", $ = "'DM Sans', sans-serif";
2179
- function vt({ chips: e }) {
2290
+ var X = {
2291
+ bg: u.sf,
2292
+ border: u.bd,
2293
+ t1: u.t1,
2294
+ t2: u.t2,
2295
+ t3: u.t3,
2296
+ t4: u.t4,
2297
+ red: u.red,
2298
+ amber: u.amber,
2299
+ green: u.green
2300
+ }, Z = "'JetBrains Mono', monospace", Q = "'Satoshi Variable', 'DM Sans', sans-serif", kt = {
2301
+ color: "#F7F7F7",
2302
+ fontFamily: Q,
2303
+ fontSize: 24,
2304
+ fontWeight: 500,
2305
+ lineHeight: "32px"
2306
+ }, $ = {
2307
+ color: "#CECFD2",
2308
+ fontFamily: Q,
2309
+ fontSize: 14,
2310
+ fontWeight: 400,
2311
+ lineHeight: "20px"
2312
+ };
2313
+ function At({ chips: e = [] }) {
2180
2314
  return /* @__PURE__ */ s("div", {
2181
2315
  style: {
2182
2316
  display: "flex",
@@ -2190,31 +2324,27 @@ function vt({ chips: e }) {
2190
2324
  alignItems: "baseline",
2191
2325
  gap: 8,
2192
2326
  padding: "8px 12px",
2193
- background: Z.bg,
2194
- border: `1px solid ${Z.border}`,
2327
+ background: X.bg,
2328
+ border: `1px solid ${X.border}`,
2195
2329
  borderRadius: 5
2196
2330
  },
2197
2331
  children: [/* @__PURE__ */ s("span", {
2198
2332
  style: {
2199
- fontSize: 13,
2200
- fontWeight: 700,
2201
- color: e.color ?? Z.t1,
2202
- fontFamily: Q
2333
+ ...kt,
2334
+ color: e.color ?? X.t1
2203
2335
  },
2204
2336
  children: e.value
2205
2337
  }), /* @__PURE__ */ s("span", {
2206
2338
  style: {
2207
- fontSize: 11,
2208
- color: Z.t4,
2209
- fontFamily: $,
2210
- lineHeight: 1.4
2339
+ ...$,
2340
+ flex: 1
2211
2341
  },
2212
2342
  children: e.label
2213
2343
  })]
2214
2344
  }, t))
2215
2345
  });
2216
2346
  }
2217
- function yt({ items: e }) {
2347
+ function jt({ items: e = [] }) {
2218
2348
  return /* @__PURE__ */ s("div", {
2219
2349
  style: {
2220
2350
  display: "flex",
@@ -2224,35 +2354,27 @@ function yt({ items: e }) {
2224
2354
  style: {
2225
2355
  flex: 1,
2226
2356
  padding: "12px 16px",
2227
- background: Z.bg,
2228
- border: `1px solid ${Z.border}`,
2229
- borderTop: `2px solid ${e.color ?? Z.t4}`,
2230
- borderRadius: 7,
2231
- textAlign: "center"
2357
+ border: `1px solid ${X.border}`,
2358
+ background: X.bg,
2359
+ textAlign: "left"
2232
2360
  },
2233
2361
  children: [/* @__PURE__ */ s("div", {
2234
2362
  style: {
2235
- fontSize: 22,
2236
- fontWeight: 700,
2237
- color: e.color ?? Z.t1,
2238
- fontFamily: Q,
2239
- lineHeight: 1.15
2363
+ ...kt,
2364
+ color: e.color ?? X.t1
2240
2365
  },
2241
2366
  children: e.value
2242
2367
  }), /* @__PURE__ */ s("div", {
2243
2368
  style: {
2244
- fontSize: 11,
2245
- color: Z.t4,
2246
- fontFamily: $,
2247
- marginTop: 5,
2248
- lineHeight: 1.45
2369
+ ...$,
2370
+ marginTop: 5
2249
2371
  },
2250
2372
  children: e.label
2251
2373
  })]
2252
2374
  }, t))
2253
2375
  });
2254
2376
  }
2255
- function bt({ items: e }) {
2377
+ function Mt({ items: e = [] }) {
2256
2378
  return /* @__PURE__ */ s("div", {
2257
2379
  style: {
2258
2380
  display: "flex",
@@ -2265,9 +2387,9 @@ function bt({ items: e }) {
2265
2387
  alignItems: "center",
2266
2388
  gap: 12,
2267
2389
  padding: "9px 14px",
2268
- background: Z.bg,
2269
- border: `1px solid ${Z.border}`,
2270
- borderLeft: `3px solid ${e.color}`,
2390
+ background: X.bg,
2391
+ border: `1px solid ${X.border}`,
2392
+ borderLeft: `3px solid ${e.color ?? X.t2}`,
2271
2393
  borderRadius: 6
2272
2394
  },
2273
2395
  children: [
@@ -2275,21 +2397,19 @@ function bt({ items: e }) {
2275
2397
  style: {
2276
2398
  fontSize: 11,
2277
2399
  fontWeight: 600,
2278
- color: e.color,
2279
- background: e.color + "22",
2400
+ color: e.color ?? X.t2,
2401
+ background: (e.color ?? X.t2) + "22",
2280
2402
  padding: "2px 8px",
2281
2403
  borderRadius: 4,
2282
- fontFamily: $,
2404
+ fontFamily: Q,
2283
2405
  flexShrink: 0
2284
2406
  },
2285
2407
  children: e.name
2286
2408
  }),
2287
2409
  /* @__PURE__ */ s("span", {
2288
2410
  style: {
2289
- fontSize: 18,
2290
- fontWeight: 700,
2291
- color: e.color,
2292
- fontFamily: Q,
2411
+ ...kt,
2412
+ color: e.color ?? X.t1,
2293
2413
  minWidth: 70,
2294
2414
  flexShrink: 0
2295
2415
  },
@@ -2297,11 +2417,8 @@ function bt({ items: e }) {
2297
2417
  }),
2298
2418
  /* @__PURE__ */ s("span", {
2299
2419
  style: {
2300
- fontSize: 11,
2301
- color: Z.t4,
2302
- fontFamily: $,
2303
- flex: 1,
2304
- lineHeight: 1.45
2420
+ ...$,
2421
+ flex: 1
2305
2422
  },
2306
2423
  children: e.kpiLabel
2307
2424
  })
@@ -2309,7 +2426,7 @@ function bt({ items: e }) {
2309
2426
  }, t))
2310
2427
  });
2311
2428
  }
2312
- function xt({ items: e }) {
2429
+ function Nt({ items: e = [] }) {
2313
2430
  return /* @__PURE__ */ s("div", {
2314
2431
  style: {
2315
2432
  display: "flex",
@@ -2319,38 +2436,31 @@ function xt({ items: e }) {
2319
2436
  style: {
2320
2437
  flex: 1,
2321
2438
  padding: "14px 16px",
2322
- background: Z.bg,
2323
- border: `1px solid ${e.color ? e.color + "30" : Z.border}`,
2324
- borderRadius: 7
2439
+ background: X.bg,
2440
+ border: `1px solid ${e.color ? e.color + "30" : X.border}`
2325
2441
  },
2326
2442
  children: [/* @__PURE__ */ s("div", {
2327
2443
  style: {
2328
- fontSize: 26,
2329
- fontWeight: 700,
2330
- color: e.color ?? Z.t1,
2331
- fontFamily: Q,
2332
- lineHeight: 1.1
2444
+ ...kt,
2445
+ color: e.color ?? X.t1
2333
2446
  },
2334
2447
  children: e.value
2335
2448
  }), /* @__PURE__ */ s("div", {
2336
2449
  style: {
2337
- fontSize: 14,
2338
- color: Z.t4,
2339
- fontFamily: $,
2340
- marginTop: 6,
2341
- lineHeight: 1.5
2450
+ ...$,
2451
+ marginTop: 6
2342
2452
  },
2343
2453
  children: e.label
2344
2454
  })]
2345
2455
  }, t))
2346
2456
  });
2347
2457
  }
2348
- var St = {
2349
- red: Z.red,
2350
- amber: Z.amber,
2351
- green: Z.green
2458
+ var Pt = {
2459
+ red: X.red,
2460
+ amber: X.amber,
2461
+ green: X.green
2352
2462
  };
2353
- function Ct({ items: e }) {
2463
+ function Ft({ items: e = [] }) {
2354
2464
  return /* @__PURE__ */ s("div", {
2355
2465
  style: {
2356
2466
  display: "flex",
@@ -2358,17 +2468,15 @@ function Ct({ items: e }) {
2358
2468
  gap: 5
2359
2469
  },
2360
2470
  children: e.map((e, t) => {
2361
- let n = St[e.severity];
2471
+ let n = Pt[e.severity];
2362
2472
  return /* @__PURE__ */ c("div", {
2363
2473
  style: {
2364
2474
  display: "flex",
2365
2475
  alignItems: "flex-start",
2366
2476
  gap: 10,
2367
2477
  padding: "10px 14px",
2368
- background: n + "0C",
2369
- border: `1px solid ${n}28`,
2370
- borderLeft: `3px solid ${n}`,
2371
- borderRadius: 6
2478
+ background: u.sf,
2479
+ border: `1px solid ${X.border}`
2372
2480
  },
2373
2481
  children: [/* @__PURE__ */ s("span", { style: {
2374
2482
  width: 7,
@@ -2378,19 +2486,14 @@ function Ct({ items: e }) {
2378
2486
  flexShrink: 0,
2379
2487
  marginTop: 5
2380
2488
  } }), /* @__PURE__ */ s("span", {
2381
- style: {
2382
- fontSize: 12,
2383
- color: Z.t2,
2384
- fontFamily: $,
2385
- lineHeight: 1.6
2386
- },
2489
+ style: { ...$ },
2387
2490
  children: e.text
2388
2491
  })]
2389
2492
  }, t);
2390
2493
  })
2391
2494
  });
2392
2495
  }
2393
- function wt({ min: e, max: t, unit: n, dots: r, chips: i }) {
2496
+ function It({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2394
2497
  let a = t - e;
2395
2498
  return /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ c("div", {
2396
2499
  style: {
@@ -2414,8 +2517,8 @@ function wt({ min: e, max: t, unit: n, dots: r, chips: i }) {
2414
2517
  top: 43,
2415
2518
  left: 0,
2416
2519
  fontSize: 9,
2417
- color: Z.t4,
2418
- fontFamily: Q
2520
+ color: X.t4,
2521
+ fontFamily: Z
2419
2522
  },
2420
2523
  children: [e, n]
2421
2524
  }),
@@ -2425,13 +2528,13 @@ function wt({ min: e, max: t, unit: n, dots: r, chips: i }) {
2425
2528
  top: 43,
2426
2529
  right: 0,
2427
2530
  fontSize: 9,
2428
- color: Z.t4,
2429
- fontFamily: Q
2531
+ color: X.t4,
2532
+ fontFamily: Z
2430
2533
  },
2431
2534
  children: [t, n]
2432
2535
  }),
2433
2536
  r.map((t, r) => {
2434
- let i = (t.val - e) / a * 100, o = r % 2 == 0;
2537
+ let i = (t.val - e) / a * 100, o = t.color ?? u.blue, l = r % 2 == 0;
2435
2538
  return /* @__PURE__ */ c("div", {
2436
2539
  style: {
2437
2540
  position: "absolute",
@@ -2440,7 +2543,7 @@ function wt({ min: e, max: t, unit: n, dots: r, chips: i }) {
2440
2543
  transform: "translateX(-50%)"
2441
2544
  },
2442
2545
  children: [
2443
- o && /* @__PURE__ */ c("div", {
2546
+ l && /* @__PURE__ */ c("div", {
2444
2547
  style: {
2445
2548
  textAlign: "center",
2446
2549
  marginBottom: 2
@@ -2448,8 +2551,8 @@ function wt({ min: e, max: t, unit: n, dots: r, chips: i }) {
2448
2551
  children: [/* @__PURE__ */ s("div", {
2449
2552
  style: {
2450
2553
  fontSize: 9,
2451
- color: t.color,
2452
- fontFamily: $,
2554
+ color: o,
2555
+ fontFamily: Q,
2453
2556
  whiteSpace: "nowrap"
2454
2557
  },
2455
2558
  children: t.name
@@ -2457,8 +2560,8 @@ function wt({ min: e, max: t, unit: n, dots: r, chips: i }) {
2457
2560
  style: {
2458
2561
  fontSize: 9,
2459
2562
  fontWeight: 700,
2460
- color: t.color,
2461
- fontFamily: Q,
2563
+ color: o,
2564
+ fontFamily: Z,
2462
2565
  whiteSpace: "nowrap"
2463
2566
  },
2464
2567
  children: [t.val, n]
@@ -2468,11 +2571,11 @@ function wt({ min: e, max: t, unit: n, dots: r, chips: i }) {
2468
2571
  width: 10,
2469
2572
  height: 10,
2470
2573
  borderRadius: "50%",
2471
- background: t.color,
2472
- boxShadow: `0 0 8px ${t.color}70`,
2473
- margin: o ? "0 auto" : "26px auto 0"
2574
+ background: o,
2575
+ boxShadow: `0 0 8px ${o}70`,
2576
+ margin: l ? "0 auto" : "26px auto 0"
2474
2577
  } }),
2475
- !o && /* @__PURE__ */ c("div", {
2578
+ !l && /* @__PURE__ */ c("div", {
2476
2579
  style: {
2477
2580
  textAlign: "center",
2478
2581
  marginTop: 4
@@ -2480,8 +2583,8 @@ function wt({ min: e, max: t, unit: n, dots: r, chips: i }) {
2480
2583
  children: [/* @__PURE__ */ s("div", {
2481
2584
  style: {
2482
2585
  fontSize: 9,
2483
- color: t.color,
2484
- fontFamily: $,
2586
+ color: o,
2587
+ fontFamily: Q,
2485
2588
  whiteSpace: "nowrap"
2486
2589
  },
2487
2590
  children: t.name
@@ -2489,8 +2592,8 @@ function wt({ min: e, max: t, unit: n, dots: r, chips: i }) {
2489
2592
  style: {
2490
2593
  fontSize: 9,
2491
2594
  fontWeight: 700,
2492
- color: t.color,
2493
- fontFamily: Q,
2595
+ color: o,
2596
+ fontFamily: Z,
2494
2597
  whiteSpace: "nowrap"
2495
2598
  },
2496
2599
  children: [t.val, n]
@@ -2500,9 +2603,10 @@ function wt({ min: e, max: t, unit: n, dots: r, chips: i }) {
2500
2603
  }, r);
2501
2604
  })
2502
2605
  ]
2503
- }), i && i.length > 0 && /* @__PURE__ */ s(vt, { chips: i })] });
2606
+ }), i && i.length > 0 && /* @__PURE__ */ s(At, { chips: i })] });
2504
2607
  }
2505
- function Tt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i, rightLabel: a, rightValue: o, rightColor: l, chips: u }) {
2608
+ function Lt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i, rightLabel: a, rightValue: o, rightColor: l, chips: d }) {
2609
+ let f = r ?? u.blue, p = l ?? u.cyan;
2506
2610
  return /* @__PURE__ */ c("div", { children: [
2507
2611
  /* @__PURE__ */ c("div", {
2508
2612
  style: {
@@ -2516,7 +2620,7 @@ function Tt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2516
2620
  /* @__PURE__ */ s("div", {
2517
2621
  style: {
2518
2622
  width: `${e}%`,
2519
- background: r + "38",
2623
+ background: f + "38",
2520
2624
  display: "flex",
2521
2625
  alignItems: "center",
2522
2626
  justifyContent: "flex-end",
@@ -2526,8 +2630,8 @@ function Tt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2526
2630
  style: {
2527
2631
  fontSize: 12,
2528
2632
  fontWeight: 700,
2529
- color: r,
2530
- fontFamily: Q
2633
+ color: f,
2634
+ fontFamily: Z
2531
2635
  },
2532
2636
  children: n
2533
2637
  })
@@ -2540,7 +2644,7 @@ function Tt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2540
2644
  /* @__PURE__ */ s("div", {
2541
2645
  style: {
2542
2646
  width: `${i}%`,
2543
- background: l + "2A",
2647
+ background: p + "2A",
2544
2648
  display: "flex",
2545
2649
  alignItems: "center",
2546
2650
  paddingLeft: 12
@@ -2549,8 +2653,8 @@ function Tt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2549
2653
  style: {
2550
2654
  fontSize: 12,
2551
2655
  fontWeight: 700,
2552
- color: l,
2553
- fontFamily: Q
2656
+ color: p,
2657
+ fontFamily: Z
2554
2658
  },
2555
2659
  children: o
2556
2660
  })
@@ -2560,15 +2664,15 @@ function Tt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2560
2664
  /* @__PURE__ */ c("div", {
2561
2665
  style: {
2562
2666
  display: "flex",
2563
- marginBottom: u ? 4 : 0
2667
+ marginBottom: d ? 4 : 0
2564
2668
  },
2565
2669
  children: [/* @__PURE__ */ s("div", {
2566
2670
  style: { width: `${e}%` },
2567
2671
  children: /* @__PURE__ */ c("span", {
2568
2672
  style: {
2569
2673
  fontSize: 10,
2570
- color: r,
2571
- fontFamily: $
2674
+ color: f,
2675
+ fontFamily: Q
2572
2676
  },
2573
2677
  children: [
2574
2678
  e,
@@ -2584,8 +2688,8 @@ function Tt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2584
2688
  children: /* @__PURE__ */ c("span", {
2585
2689
  style: {
2586
2690
  fontSize: 10,
2587
- color: l,
2588
- fontFamily: $
2691
+ color: p,
2692
+ fontFamily: Q
2589
2693
  },
2590
2694
  children: [
2591
2695
  i,
@@ -2595,11 +2699,11 @@ function Tt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2595
2699
  })
2596
2700
  })]
2597
2701
  }),
2598
- u && u.length > 0 && /* @__PURE__ */ s(vt, { chips: u })
2702
+ d && d.length > 0 && /* @__PURE__ */ s(At, { chips: d })
2599
2703
  ] });
2600
2704
  }
2601
- function Et({ pct: e, label: t, color: n, chips: r }) {
2602
- let i = 2 * Math.PI * 30, a = i * (1 - e / 100);
2705
+ function Rt({ pct: e, label: t, color: n, chips: r }) {
2706
+ let i = n ?? u.blue, a = 2 * Math.PI * 30, o = a * (1 - e / 100);
2603
2707
  return /* @__PURE__ */ c("div", {
2604
2708
  style: {
2605
2709
  display: "flex",
@@ -2629,10 +2733,10 @@ function Et({ pct: e, label: t, color: n, chips: r }) {
2629
2733
  cy: 40,
2630
2734
  r: 30,
2631
2735
  fill: "none",
2632
- stroke: n,
2736
+ stroke: i,
2633
2737
  strokeWidth: 8,
2634
- strokeDasharray: i,
2635
- strokeDashoffset: a,
2738
+ strokeDasharray: a,
2739
+ strokeDashoffset: o,
2636
2740
  strokeLinecap: "round"
2637
2741
  })]
2638
2742
  }), /* @__PURE__ */ s("div", {
@@ -2647,8 +2751,8 @@ function Et({ pct: e, label: t, color: n, chips: r }) {
2647
2751
  style: {
2648
2752
  fontSize: 15,
2649
2753
  fontWeight: 700,
2650
- color: n,
2651
- fontFamily: Q
2754
+ color: i,
2755
+ fontFamily: Z
2652
2756
  },
2653
2757
  children: [e, "%"]
2654
2758
  })
@@ -2657,11 +2761,8 @@ function Et({ pct: e, label: t, color: n, chips: r }) {
2657
2761
  style: { flex: 1 },
2658
2762
  children: [/* @__PURE__ */ s("div", {
2659
2763
  style: {
2660
- fontSize: 12,
2661
- color: Z.t3,
2662
- fontFamily: $,
2663
- marginBottom: 10,
2664
- lineHeight: 1.5
2764
+ ...$,
2765
+ marginBottom: 10
2665
2766
  },
2666
2767
  children: t
2667
2768
  }), r && /* @__PURE__ */ s("div", {
@@ -2676,25 +2777,18 @@ function Et({ pct: e, label: t, color: n, chips: r }) {
2676
2777
  alignItems: "baseline",
2677
2778
  gap: 8,
2678
2779
  padding: "7px 10px",
2679
- background: Z.bg,
2680
- border: `1px solid ${Z.border}`,
2780
+ background: X.bg,
2781
+ border: `1px solid ${X.border}`,
2681
2782
  borderRadius: 5
2682
2783
  },
2683
2784
  children: [/* @__PURE__ */ s("span", {
2684
2785
  style: {
2685
- fontSize: 13,
2686
- fontWeight: 700,
2687
- color: e.color ?? Z.t1,
2688
- fontFamily: Q
2786
+ ...kt,
2787
+ color: e.color ?? X.t1
2689
2788
  },
2690
2789
  children: e.value
2691
2790
  }), /* @__PURE__ */ s("span", {
2692
- style: {
2693
- fontSize: 11,
2694
- color: Z.t4,
2695
- fontFamily: $,
2696
- lineHeight: 1.4
2697
- },
2791
+ style: { ...$ },
2698
2792
  children: e.label
2699
2793
  })]
2700
2794
  }, t))
@@ -2702,16 +2796,16 @@ function Et({ pct: e, label: t, color: n, chips: r }) {
2702
2796
  })]
2703
2797
  });
2704
2798
  }
2705
- var Dt = {
2799
+ var zt = {
2706
2800
  green: "#34D39918",
2707
2801
  amber: "#FBBF2418",
2708
2802
  red: "#F0606018"
2709
- }, Ot = {
2803
+ }, Bt = {
2710
2804
  green: "#34D399",
2711
2805
  amber: "#FBBF24",
2712
2806
  red: "#F06060"
2713
2807
  };
2714
- function kt({ items: e }) {
2808
+ function Vt({ items: e = [] }) {
2715
2809
  return /* @__PURE__ */ s("div", {
2716
2810
  style: {
2717
2811
  display: "flex",
@@ -2724,9 +2818,9 @@ function kt({ items: e }) {
2724
2818
  alignItems: "center",
2725
2819
  gap: 10,
2726
2820
  padding: "8px 12px",
2727
- background: Z.bg,
2728
- border: `1px solid ${Z.border}`,
2729
- borderLeft: `3px solid ${e.color}`,
2821
+ background: X.bg,
2822
+ border: `1px solid ${X.border}`,
2823
+ borderLeft: `3px solid ${e.color ?? X.t2}`,
2730
2824
  borderRadius: 6
2731
2825
  },
2732
2826
  children: [
@@ -2734,11 +2828,11 @@ function kt({ items: e }) {
2734
2828
  style: {
2735
2829
  fontSize: 11,
2736
2830
  fontWeight: 600,
2737
- color: e.color,
2738
- background: e.color + "1A",
2831
+ color: e.color ?? X.t2,
2832
+ background: (e.color ?? X.t2) + "1A",
2739
2833
  padding: "2px 7px",
2740
2834
  borderRadius: 4,
2741
- fontFamily: $,
2835
+ fontFamily: Q,
2742
2836
  flexShrink: 0,
2743
2837
  minWidth: 62,
2744
2838
  textAlign: "center"
@@ -2756,7 +2850,7 @@ function kt({ items: e }) {
2756
2850
  children: /* @__PURE__ */ s("div", { style: {
2757
2851
  height: "100%",
2758
2852
  width: `${e.pct}%`,
2759
- background: e.color,
2853
+ background: e.color ?? X.t2,
2760
2854
  borderRadius: 2,
2761
2855
  opacity: .75
2762
2856
  } })
@@ -2765,8 +2859,8 @@ function kt({ items: e }) {
2765
2859
  style: {
2766
2860
  fontSize: 13,
2767
2861
  fontWeight: 700,
2768
- color: e.color,
2769
- fontFamily: Q,
2862
+ color: e.color ?? X.t1,
2863
+ fontFamily: Z,
2770
2864
  flexShrink: 0,
2771
2865
  minWidth: 52,
2772
2866
  textAlign: "right"
@@ -2777,11 +2871,11 @@ function kt({ items: e }) {
2777
2871
  style: {
2778
2872
  fontSize: 10,
2779
2873
  fontWeight: 600,
2780
- color: Ot[e.badgeSeverity],
2781
- background: Dt[e.badgeSeverity],
2874
+ color: Bt[e.badgeSeverity],
2875
+ background: zt[e.badgeSeverity],
2782
2876
  padding: "2px 7px",
2783
2877
  borderRadius: 4,
2784
- fontFamily: $,
2878
+ fontFamily: Q,
2785
2879
  flexShrink: 0,
2786
2880
  minWidth: 72,
2787
2881
  textAlign: "center"
@@ -2790,9 +2884,7 @@ function kt({ items: e }) {
2790
2884
  }),
2791
2885
  e.sublabel && /* @__PURE__ */ s("span", {
2792
2886
  style: {
2793
- fontSize: 10,
2794
- color: Z.t4,
2795
- fontFamily: $,
2887
+ ...$,
2796
2888
  flexShrink: 0,
2797
2889
  minWidth: 80,
2798
2890
  textAlign: "right"
@@ -2803,12 +2895,12 @@ function kt({ items: e }) {
2803
2895
  }, t))
2804
2896
  });
2805
2897
  }
2806
- var At = {
2807
- red: Z.red,
2808
- amber: Z.amber,
2809
- green: Z.green
2898
+ var Ht = {
2899
+ red: X.red,
2900
+ amber: X.amber,
2901
+ green: X.green
2810
2902
  };
2811
- function jt({ items: e }) {
2903
+ function Ut({ items: e = [] }) {
2812
2904
  return /* @__PURE__ */ s("div", {
2813
2905
  style: {
2814
2906
  display: "flex",
@@ -2816,7 +2908,7 @@ function jt({ items: e }) {
2816
2908
  gap: 5
2817
2909
  },
2818
2910
  children: e.map((e, t) => {
2819
- let n = At[e.severity];
2911
+ let n = Ht[e.severity];
2820
2912
  return /* @__PURE__ */ c("div", {
2821
2913
  style: {
2822
2914
  display: "flex",
@@ -2840,10 +2932,7 @@ function jt({ items: e }) {
2840
2932
  /* @__PURE__ */ s("span", {
2841
2933
  style: {
2842
2934
  flex: 1,
2843
- fontSize: 12,
2844
- color: Z.t2,
2845
- fontFamily: $,
2846
- lineHeight: 1.5
2935
+ ...$
2847
2936
  },
2848
2937
  children: e.text
2849
2938
  }),
@@ -2855,16 +2944,14 @@ function jt({ items: e }) {
2855
2944
  background: n + "20",
2856
2945
  padding: "2px 7px",
2857
2946
  borderRadius: 4,
2858
- fontFamily: $,
2947
+ fontFamily: Q,
2859
2948
  flexShrink: 0
2860
2949
  },
2861
2950
  children: e.tag
2862
2951
  }),
2863
2952
  /* @__PURE__ */ s("span", {
2864
2953
  style: {
2865
- fontSize: 10,
2866
- color: Z.t4,
2867
- fontFamily: Q,
2954
+ ...$,
2868
2955
  flexShrink: 0,
2869
2956
  marginTop: 1
2870
2957
  },
@@ -2875,7 +2962,7 @@ function jt({ items: e }) {
2875
2962
  })
2876
2963
  });
2877
2964
  }
2878
- function Mt({ columns: e, rows: t }) {
2965
+ function Wt({ columns: e = [], rows: t = [] }) {
2879
2966
  return /* @__PURE__ */ c("div", {
2880
2967
  style: {
2881
2968
  display: "flex",
@@ -2888,15 +2975,15 @@ function Mt({ columns: e, rows: t }) {
2888
2975
  alignItems: "center",
2889
2976
  gap: 10,
2890
2977
  padding: "0 12px 6px",
2891
- borderBottom: `1px solid ${Z.border}`
2978
+ borderBottom: `1px solid ${X.border}`
2892
2979
  },
2893
2980
  children: [/* @__PURE__ */ s("div", { style: { minWidth: 64 } }), e.map((e, t) => /* @__PURE__ */ s("div", {
2894
2981
  style: {
2895
2982
  flex: 1,
2896
2983
  fontSize: 9,
2897
2984
  fontWeight: 600,
2898
- color: Z.t4,
2899
- fontFamily: $,
2985
+ color: X.t4,
2986
+ fontFamily: Q,
2900
2987
  textTransform: "uppercase",
2901
2988
  letterSpacing: .6
2902
2989
  },
@@ -2908,20 +2995,20 @@ function Mt({ columns: e, rows: t }) {
2908
2995
  alignItems: "center",
2909
2996
  gap: 10,
2910
2997
  padding: "8px 12px",
2911
- background: Z.bg,
2912
- border: `1px solid ${Z.border}`,
2913
- borderLeft: `3px solid ${e.color ?? Z.t4}`,
2998
+ background: X.bg,
2999
+ border: `1px solid ${X.border}`,
3000
+ borderLeft: `3px solid ${e.color ?? X.t4}`,
2914
3001
  borderRadius: 6
2915
3002
  },
2916
3003
  children: [/* @__PURE__ */ s("span", {
2917
3004
  style: {
2918
3005
  fontSize: 11,
2919
3006
  fontWeight: 600,
2920
- color: e.color ?? Z.t2,
2921
- background: (e.color ?? Z.t4) + "1A",
3007
+ color: e.color ?? X.t2,
3008
+ background: (e.color ?? X.t4) + "1A",
2922
3009
  padding: "2px 8px",
2923
3010
  borderRadius: 4,
2924
- fontFamily: $,
3011
+ fontFamily: Q,
2925
3012
  flexShrink: 0,
2926
3013
  minWidth: 64,
2927
3014
  textAlign: "center"
@@ -2932,62 +3019,56 @@ function Mt({ columns: e, rows: t }) {
2932
3019
  flex: 1,
2933
3020
  fontSize: 13,
2934
3021
  fontWeight: 700,
2935
- color: e.color ?? Z.t1,
2936
- fontFamily: Q
3022
+ color: e.color ?? X.t1,
3023
+ fontFamily: Z
2937
3024
  },
2938
3025
  children: t
2939
3026
  }, n))]
2940
3027
  }, t))]
2941
3028
  });
2942
3029
  }
2943
- function Nt({ text: e }) {
3030
+ function Gt({ text: e }) {
2944
3031
  return /* @__PURE__ */ c("div", {
2945
3032
  style: {
2946
3033
  marginTop: 10,
2947
3034
  padding: "8px 12px",
2948
- background: "rgba(255,255,255,0.015)",
2949
- border: `1px solid ${Z.border}`,
2950
- borderLeft: "2px solid rgba(100,116,139,0.35)",
2951
- borderRadius: 5
3035
+ border: `1px solid ${u.bd}`,
3036
+ borderLeft: "4px solid #FFAE43",
3037
+ borderRadius: 5,
3038
+ background: `linear-gradient(90deg, rgba(255, 174, 67, 0.10) -48.4%, rgba(19, 22, 27, 0.10) 83.98%), ${u.sf}`
2952
3039
  },
2953
3040
  children: [/* @__PURE__ */ s("span", {
2954
3041
  style: {
2955
- fontSize: 10,
2956
- fontWeight: 700,
2957
- color: Z.t4,
2958
- fontFamily: $,
2959
- letterSpacing: .5,
2960
- textTransform: "uppercase",
3042
+ fontSize: 14,
3043
+ fontWeight: 500,
3044
+ color: u.t1,
3045
+ fontFamily: Q,
3046
+ lineHeight: "20px",
2961
3047
  marginRight: 8
2962
3048
  },
2963
3049
  children: "Takeaway"
2964
3050
  }), /* @__PURE__ */ s("span", {
2965
- style: {
2966
- fontSize: 11,
2967
- color: Z.t3,
2968
- fontFamily: $,
2969
- lineHeight: 1.6
2970
- },
3051
+ style: { ...$ },
2971
3052
  children: e
2972
3053
  })]
2973
3054
  });
2974
3055
  }
2975
- function Pt({ block: e }) {
3056
+ function Kt({ block: e }) {
2976
3057
  if (!e) return null;
2977
3058
  let t = (() => {
2978
3059
  switch (e.type) {
2979
- case "stats": return /* @__PURE__ */ s(yt, { items: e.items });
2980
- case "ranked": return /* @__PURE__ */ s(bt, { items: e.items });
2981
- case "chips": return /* @__PURE__ */ s(xt, { items: e.items });
2982
- case "badges": return /* @__PURE__ */ s(Ct, { items: e.items });
2983
- case "dot-strip": return /* @__PURE__ */ s(wt, {
3060
+ case "stats": return /* @__PURE__ */ s(jt, { items: e.items });
3061
+ case "ranked": return /* @__PURE__ */ s(Mt, { items: e.items });
3062
+ case "chips": return /* @__PURE__ */ s(Nt, { items: e.items });
3063
+ case "badges": return /* @__PURE__ */ s(Ft, { items: e.items });
3064
+ case "dot-strip": return /* @__PURE__ */ s(It, {
2984
3065
  min: e.min,
2985
3066
  max: e.max,
2986
3067
  unit: e.unit,
2987
3068
  dots: e.dots,
2988
3069
  chips: e.chips
2989
3070
  });
2990
- case "proportion": return /* @__PURE__ */ s(Tt, {
3071
+ case "proportion": return /* @__PURE__ */ s(Lt, {
2991
3072
  leftPct: e.leftPct,
2992
3073
  leftLabel: e.leftLabel,
2993
3074
  leftValue: e.leftValue,
@@ -2998,22 +3079,22 @@ function Pt({ block: e }) {
2998
3079
  rightColor: e.rightColor,
2999
3080
  chips: e.chips
3000
3081
  });
3001
- case "ring": return /* @__PURE__ */ s(Et, {
3082
+ case "ring": return /* @__PURE__ */ s(Rt, {
3002
3083
  pct: e.pct,
3003
3084
  label: e.label,
3004
3085
  color: e.color,
3005
3086
  chips: e.chips
3006
3087
  });
3007
- case "scorecard-rows": return /* @__PURE__ */ s(kt, { items: e.items });
3008
- case "flags-list": return /* @__PURE__ */ s(jt, { items: e.items });
3009
- case "comparison-rows": return /* @__PURE__ */ s(Mt, {
3088
+ case "scorecard-rows": return /* @__PURE__ */ s(Vt, { items: e.items });
3089
+ case "flags-list": return /* @__PURE__ */ s(Ut, { items: e.items });
3090
+ case "comparison-rows": return /* @__PURE__ */ s(Wt, {
3010
3091
  columns: e.columns,
3011
3092
  rows: e.rows
3012
3093
  });
3013
3094
  default: return null;
3014
3095
  }
3015
3096
  })();
3016
- return e.takeaway ? /* @__PURE__ */ c("div", { children: [t, /* @__PURE__ */ s(Nt, { text: e.takeaway })] }) : t;
3097
+ return e.takeaway ? /* @__PURE__ */ c("div", { children: [t, /* @__PURE__ */ s(Gt, { text: e.takeaway })] }) : t;
3017
3098
  }
3018
3099
  //#endregion
3019
- export { ee as AreaChart, te as BarChart, l as ChartFrame, _t as DonutChart, Pt as KeyHighlights, Ee as LineChart, ke as MiniBars, Fe as PieChart, Ge as ProcessSankey, Ke as RankingSankey, Le as SankeySvg, N as SeriesChart, rt as TrendChart, dt as VisualizationRenderer, mt as cleanupVisualizationMounts, ht as hydrateVisualizationMounts, gt as serializeVisualizationConfig };
3100
+ export { ne as AreaChart, ie as BarChart, l as ChartFrame, Ot as DonutChart, Kt as KeyHighlights, Oe as LineChart, je as MiniBars, Re as PieChart, Je as ProcessSankey, Ye as RankingSankey, Be as SankeySvg, te as SeriesChart, st as Trend, mt as TrendChart, St as VisualizationRenderer, Tt as cleanupVisualizationMounts, Et as hydrateVisualizationMounts, Dt as serializeVisualizationConfig };