chordia-ui 3.8.2 → 3.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import { jsxs as n, Fragment as cn, jsx as e } from "react/jsx-runtime";
2
- import ce, { useState as D, useRef as N, useEffect as _e, useMemo as He } from "react";
3
- import { ShieldCheck as fn, TrendingUp as gn, Lightbulb as yt, ThumbsUp as mt, ChevronUp as vt, ChevronDown as xt, Pencil as hn, ThumbsDown as pn, FileSignal as bt, ScrollText as St, PauseCircle as kt, PlayCircle as wt, Info as Ct, MessagesSquare as rt, Check as un, CircleCheck as yn, Ellipsis as mn, X as lt, CornerDownRight as vn, ArrowLeft as Te, ArrowRight as ot, ClipboardList as xn, CalendarDays as at, PhoneIncoming as bn, Headset as st, CircleUser as Re, ChevronRight as Sn, History as kn, ExternalLink as wn } from "lucide-react";
4
- import { U as Cn } from "../UpdatedInteractionRecording.es.js";
5
- import { S as Fn } from "../SideDrawer.es.js";
1
+ import { jsxs as n, Fragment as fn, jsx as e } from "react/jsx-runtime";
2
+ import ce, { useState as D, useRef as N, useEffect as Ae, useMemo as Te } from "react";
3
+ import { ShieldCheck as gn, TrendingUp as hn, Lightbulb as mt, ThumbsUp as vt, ChevronUp as xt, ChevronDown as bt, Pencil as pn, ThumbsDown as un, FileSignal as St, ScrollText as kt, PauseCircle as wt, PlayCircle as Ct, Info as Ft, MessagesSquare as rt, Check as yn, CircleCheck as mn, Ellipsis as vn, X as ot, CornerDownRight as xn, ArrowLeft as _e, ArrowRight as lt, ClipboardList as bn, CalendarDays as at, PhoneIncoming as st, Headset as dt, CircleUser as Re, ChevronRight as Sn, History as kn, ExternalLink as wn, PhoneOutgoing as Cn } from "lucide-react";
4
+ import { U as Fn } from "../UpdatedInteractionRecording.es.js";
5
+ import { S as Wn } from "../SideDrawer.es.js";
6
6
  const A = {
7
7
  strong: "var(--Grey-Strong, #2E3236)",
8
8
  muted: "var(--Grey-Muted, #808183)",
@@ -12,17 +12,17 @@ const A = {
12
12
  quoteLine: "var(--border-warm, #B2AEA8)",
13
13
  quoteText: "var(--text-subtle-warm, #767473)",
14
14
  iconBg: "var(--surface-hover, #F3F7F7)"
15
- }, Wn = {
15
+ }, In = {
16
16
  effective: "Effective",
17
17
  strong: "Strong",
18
18
  needs_improvement: "Needs Improvement",
19
19
  mixed: "Mixed"
20
- }, dt = "updated-coaching-synthesis-keyframes";
21
- function In() {
22
- if (typeof document > "u" || document.getElementById(dt))
20
+ }, ct = "updated-coaching-synthesis-keyframes";
21
+ function Dn() {
22
+ if (typeof document > "u" || document.getElementById(ct))
23
23
  return;
24
24
  const t = document.createElement("style");
25
- t.id = dt, t.textContent = `
25
+ t.id = ct, t.textContent = `
26
26
  @keyframes updated-coaching-shimmer {
27
27
  0% { background-position: -200% 0; }
28
28
  100% { background-position: 200% 0; }
@@ -33,8 +33,8 @@ function In() {
33
33
  }
34
34
  `, document.head.appendChild(t);
35
35
  }
36
- function Dn({ overall: t }) {
37
- const r = Wn[t] || (t ? t.replace(/_/g, " ") : "");
36
+ function zn({ overall: t }) {
37
+ const r = In[t] || (t ? t.replace(/_/g, " ") : "");
38
38
  return /* @__PURE__ */ n("div", { style: {
39
39
  display: "flex",
40
40
  alignItems: "center",
@@ -53,7 +53,7 @@ function Dn({ overall: t }) {
53
53
  alignItems: "center",
54
54
  gap: 6
55
55
  }, children: [
56
- /* @__PURE__ */ e(mt, { size: 14, color: A.strong, strokeWidth: 1.5 }),
56
+ /* @__PURE__ */ e(vt, { size: 14, color: A.strong, strokeWidth: 1.5 }),
57
57
  /* @__PURE__ */ e("span", { style: {
58
58
  fontSize: 13,
59
59
  fontWeight: 600,
@@ -64,7 +64,7 @@ function Dn({ overall: t }) {
64
64
  ] })
65
65
  ] });
66
66
  }
67
- function zn({ item: t }) {
67
+ function Gn({ item: t }) {
68
68
  const r = typeof t == "string" ? t : (t == null ? void 0 : t.text) || "", i = typeof t == "object" ? t == null ? void 0 : t.quote : null;
69
69
  return /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 14 }, children: [
70
70
  /* @__PURE__ */ e("div", { style: {
@@ -98,7 +98,7 @@ function zn({ item: t }) {
98
98
  ] })
99
99
  ] });
100
100
  }
101
- function ct({ icon: t, label: r, items: i }) {
101
+ function ft({ icon: t, label: r, items: i }) {
102
102
  return !i || i.length === 0 ? null : /* @__PURE__ */ n("div", { style: {
103
103
  flex: 1,
104
104
  display: "flex",
@@ -129,15 +129,15 @@ function ct({ icon: t, label: r, items: i }) {
129
129
  lineHeight: "normal"
130
130
  }, children: r })
131
131
  ] }),
132
- /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 24 }, children: i.map((s, o) => /* @__PURE__ */ e(zn, { item: s }, o)) })
132
+ /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 24 }, children: i.map((l, a) => /* @__PURE__ */ e(Gn, { item: l }, a)) })
133
133
  ] });
134
134
  }
135
- const Gn = ({ data: t, loading: r, error: i }) => {
135
+ const Mn = ({ data: t, loading: r, error: i }) => {
136
136
  var p, y;
137
137
  if (ce.useEffect(() => {
138
- In();
138
+ Dn();
139
139
  }, []), r)
140
- return /* @__PURE__ */ n(cn, { children: [
140
+ return /* @__PURE__ */ n(fn, { children: [
141
141
  /* @__PURE__ */ e("style", { children: `
142
142
  @keyframes coaching-spinner-spin {
143
143
  from { transform: rotate(0deg); }
@@ -207,7 +207,7 @@ const Gn = ({ data: t, loading: r, error: i }) => {
207
207
  }, children: "Unable to generate coaching summary." });
208
208
  if (!t)
209
209
  return null;
210
- const s = t.strengths || [], o = t.improvements || [], d = typeof t.one_liner == "string" ? t.one_liner : ((p = t.one_liner) == null ? void 0 : p.text) || "", g = typeof t.context == "string" ? t.context : ((y = t.context) == null ? void 0 : y.text) || "";
210
+ const l = t.strengths || [], a = t.improvements || [], d = typeof t.one_liner == "string" ? t.one_liner : ((p = t.one_liner) == null ? void 0 : p.text) || "", g = typeof t.context == "string" ? t.context : ((y = t.context) == null ? void 0 : y.text) || "";
211
211
  return /* @__PURE__ */ n("div", { style: {
212
212
  display: "flex",
213
213
  flexDirection: "column",
@@ -219,7 +219,7 @@ const Gn = ({ data: t, loading: r, error: i }) => {
219
219
  alignItems: "center",
220
220
  gap: 8
221
221
  }, children: [
222
- /* @__PURE__ */ e(fn, { size: 20, color: A.accent, strokeWidth: 2 }),
222
+ /* @__PURE__ */ e(gn, { size: 20, color: A.accent, strokeWidth: 2 }),
223
223
  /* @__PURE__ */ e("span", { style: {
224
224
  fontSize: 16,
225
225
  fontWeight: 600,
@@ -250,38 +250,38 @@ const Gn = ({ data: t, loading: r, error: i }) => {
250
250
  lineHeight: 1.5,
251
251
  flex: 1
252
252
  }, children: g }),
253
- t.overall && /* @__PURE__ */ e(Dn, { overall: t.overall })
253
+ t.overall && /* @__PURE__ */ e(zn, { overall: t.overall })
254
254
  ] }),
255
- (s.length > 0 || o.length > 0) && /* @__PURE__ */ n("div", { style: {
255
+ (l.length > 0 || a.length > 0) && /* @__PURE__ */ n("div", { style: {
256
256
  display: "flex",
257
257
  gap: 24,
258
258
  paddingTop: 24,
259
259
  borderTop: `1px solid ${A.absent}`
260
260
  }, children: [
261
261
  /* @__PURE__ */ e(
262
- ct,
262
+ ft,
263
263
  {
264
- icon: /* @__PURE__ */ e(gn, { size: 14, color: A.strong, strokeWidth: 1.5 }),
264
+ icon: /* @__PURE__ */ e(hn, { size: 14, color: A.strong, strokeWidth: 1.5 }),
265
265
  label: "Key Strengths",
266
- items: s
266
+ items: l
267
267
  }
268
268
  ),
269
269
  /* @__PURE__ */ e(
270
- ct,
270
+ ft,
271
271
  {
272
- icon: /* @__PURE__ */ e(yt, { size: 14, color: A.strong, strokeWidth: 1.5 }),
272
+ icon: /* @__PURE__ */ e(mt, { size: 14, color: A.strong, strokeWidth: 1.5 }),
273
273
  label: "Improvements",
274
- items: o
274
+ items: a
275
275
  }
276
276
  )
277
277
  ] })
278
278
  ] });
279
279
  };
280
- function Mn(t) {
280
+ function En(t) {
281
281
  const r = Math.floor(t / 60), i = Math.round(t % 60);
282
282
  return `${r}:${i.toString().padStart(2, "0")}`;
283
283
  }
284
- const En = {
284
+ const Hn = {
285
285
  display: "flex",
286
286
  justifyContent: "space-between",
287
287
  padding: "8px 8px 12px 8px",
@@ -292,18 +292,18 @@ const En = {
292
292
  fontWeight: 400,
293
293
  lineHeight: "normal",
294
294
  borderBottom: "1px solid var(--Grey-absent, #D9D9D9)"
295
- }, ft = {
295
+ }, gt = {
296
296
  display: "flex",
297
297
  flexDirection: "column",
298
298
  flex: "1 0 0",
299
299
  gap: 0,
300
300
  minWidth: 0
301
- }, Hn = ({
301
+ }, Tn = ({
302
302
  meta: t = {},
303
303
  callPurpose: r = {},
304
304
  classification: i = {},
305
- dimensions: s = [],
306
- outcomeQuality: o = "Neutral",
305
+ dimensions: l = [],
306
+ outcomeQuality: a = "Neutral",
307
307
  onMoreDetails: d,
308
308
  moreDetails: g = [],
309
309
  resolutionOutcome: p,
@@ -312,42 +312,44 @@ const En = {
312
312
  canShowEditButton: x = !1,
313
313
  onEditInteraction: I
314
314
  }) => {
315
- const [a, b] = D(!1), w = N(null), C = t.duration_seconds != null ? Mn(t.duration_seconds) : null, z = t.message_count, T = r.interaction_driver, S = i.interaction_paradigm, F = (h) => s.find(($) => ($.key || "").toLowerCase().includes(h)), E = F("resolution_outcome"), L = F("customer_intent"), _ = F("location"), O = F("outcome_quality"), u = (h) => h ? h.replace(/_/g, " ").replace(/\b\w/g, ($) => $.toUpperCase()) : null, m = o !== "Neutral" ? o : O ? u(O.value) : o, c = p ?? (E ? u(E.value) : null), B = y ?? (L ? u(L.value) : null), J = W ?? (_ ? u(_.value) : null), ie = new Set(["resolution_outcome", "customer_intent", "location", "outcome_quality"].map((h) => `dim.${h}`)), R = s.filter((h) => !ie.has(h.key)), X = [], ee = [
315
+ const [s, b] = D(!1), w = N(null), C = t.duration_seconds != null ? En(t.duration_seconds) : null, z = t.message_count, T = r.interaction_driver, S = i.interaction_paradigm, F = (h) => l.find(($) => ($.key || "").toLowerCase().includes(h)), H = F("resolution_outcome"), L = F("customer_intent"), R = F("location"), O = F("outcome_quality"), u = (h) => h ? h.replace(/_/g, " ").replace(/\b\w/g, ($) => $.toUpperCase()) : null, m = a !== "Neutral" ? a : O ? u(O.value) : a, c = p ?? (H ? u(H.value) : null), B = y ?? (L ? u(L.value) : null), J = W ?? (R ? u(R.value) : null), X = S != null ? u(S) : null, U = new Set(["resolution_outcome", "customer_intent", "location", "outcome_quality"].map((h) => `dim.${h}`)), _ = l.filter((h) => !U.has(h.key)), ne = [], ie = [
316
316
  [
317
317
  C != null ? { label: "Duration", value: C } : null,
318
318
  z != null ? { label: "Messages", value: z } : null
319
319
  ],
320
320
  [
321
321
  T != null ? { label: "Driver", value: T } : null,
322
- S != null ? { label: "Paradigm", value: S } : null
322
+ // paradigm != null ? { label: 'Paradigm', value: paradigm } : null,
323
+ J != null ? { label: "Location", value: J } : null
323
324
  ]
324
325
  ];
325
- for (let h = 0; h < R.length; h += 2) {
326
- const $ = R[h] ? { label: R[h].display_name || R[h].label || R[h].key, value: u(R[h].value) } : null, U = R[h + 1] ? { label: R[h + 1].display_name || R[h + 1].label || R[h + 1].key, value: u(R[h + 1].value) } : null;
327
- ee.push([$, U]);
326
+ for (let h = 0; h < _.length; h += 2) {
327
+ const $ = _[h] ? { label: _[h].display_name || _[h].label || _[h].key, value: u(_[h].value) } : null, o = _[h + 1] ? { label: _[h + 1].display_name || _[h + 1].label || _[h + 1].key, value: u(_[h + 1].value) } : null;
328
+ ie.push([$, o]);
328
329
  }
329
- ee.push([
330
+ ie.push([
330
331
  { label: "Outcome Quality", value: m },
331
332
  { isMoreDetails: !0 }
332
- ]), ee.forEach((h) => X.push(h));
333
- const ae = [
333
+ ]), ie.forEach((h) => ne.push(h));
334
+ const Z = [
334
335
  c != null && { label: "Resolution Outcome", value: c },
335
336
  B != null && { label: "Customer Intent", value: B },
336
- J != null && { label: "Location", value: J },
337
+ // resolvedLocation != null && { label: 'Location', value: resolvedLocation },
338
+ X != null && { label: "Paradigm", value: X },
337
339
  ...g || []
338
340
  ].filter(Boolean);
339
- _e(() => {
340
- if (!a)
341
+ Ae(() => {
342
+ if (!s)
341
343
  return;
342
344
  const h = ($) => {
343
345
  w.current && !w.current.contains($.target) && b(!1);
344
346
  };
345
347
  return document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
346
- }, [a]);
347
- const q = (h) => /* @__PURE__ */ n(
348
+ }, [s]);
349
+ const ae = (h) => /* @__PURE__ */ n(
348
350
  "div",
349
351
  {
350
- style: En,
352
+ style: Hn,
351
353
  children: [
352
354
  /* @__PURE__ */ e("span", { style: { color: "var(--Grey-Strong, #2E3236)", whiteSpace: "nowrap", flexShrink: 0 }, children: h.label }),
353
355
  /* @__PURE__ */ e("span", { style: {
@@ -379,7 +381,7 @@ const En = {
379
381
  "button",
380
382
  {
381
383
  onClick: () => {
382
- b((h) => !h), d && !a && d();
384
+ b((h) => !h), d && !s && d();
383
385
  },
384
386
  style: {
385
387
  display: "flex",
@@ -399,7 +401,7 @@ const En = {
399
401
  },
400
402
  children: [
401
403
  /* @__PURE__ */ e("span", { children: "More Details" }),
402
- a ? /* @__PURE__ */ e(vt, { size: 16, color: "var(--Grey-Muted, #808183)", strokeWidth: 1.5 }) : /* @__PURE__ */ e(xt, { size: 16, color: "var(--Grey-Muted, #808183)", strokeWidth: 1.5 })
404
+ s ? /* @__PURE__ */ e(xt, { size: 16, color: "var(--Grey-Muted, #808183)", strokeWidth: 1.5 }) : /* @__PURE__ */ e(bt, { size: 16, color: "var(--Grey-Muted, #808183)", strokeWidth: 1.5 })
403
405
  ]
404
406
  }
405
407
  ),
@@ -425,7 +427,7 @@ const En = {
425
427
  flexShrink: 0
426
428
  },
427
429
  children: [
428
- /* @__PURE__ */ e(hn, { size: 15, color: "var(--Grey-Strong, #2E3236)", strokeWidth: 1.5 }),
430
+ /* @__PURE__ */ e(pn, { size: 15, color: "var(--Grey-Strong, #2E3236)", strokeWidth: 1.5 }),
429
431
  /* @__PURE__ */ e("span", { style: { fontSize: 13, lineHeight: "normal" }, children: "Edit" })
430
432
  ]
431
433
  }
@@ -447,8 +449,8 @@ const En = {
447
449
  overflow: "visible"
448
450
  },
449
451
  children: [
450
- X.map((h, $) => {
451
- var U;
452
+ ne.map((h, $) => {
453
+ var o;
452
454
  return /* @__PURE__ */ n(
453
455
  "div",
454
456
  {
@@ -460,14 +462,14 @@ const En = {
460
462
  flexWrap: "nowrap"
461
463
  },
462
464
  children: [
463
- /* @__PURE__ */ e("div", { style: ft, children: h[0] && !h[0].isMoreDetails ? q(h[0]) : /* @__PURE__ */ e("div", { style: { flex: 1 } }) }),
464
- /* @__PURE__ */ e("div", { style: ft, children: h[1] && !h[1].isMoreDetails ? q(h[1]) : (U = h[1]) != null && U.isMoreDetails ? fe() : /* @__PURE__ */ e("div", { style: { flex: 1 } }) })
465
+ /* @__PURE__ */ e("div", { style: gt, children: h[0] && !h[0].isMoreDetails ? ae(h[0]) : /* @__PURE__ */ e("div", { style: { flex: 1 } }) }),
466
+ /* @__PURE__ */ e("div", { style: gt, children: h[1] && !h[1].isMoreDetails ? ae(h[1]) : (o = h[1]) != null && o.isMoreDetails ? fe() : /* @__PURE__ */ e("div", { style: { flex: 1 } }) })
465
467
  ]
466
468
  },
467
469
  $
468
470
  );
469
471
  }),
470
- a && ae.length > 0 && /* @__PURE__ */ n(
472
+ s && Z.length > 0 && /* @__PURE__ */ n(
471
473
  "div",
472
474
  {
473
475
  style: {
@@ -496,7 +498,7 @@ const En = {
496
498
  borderBottom: "1px solid var(--Grey-absent, #D9D9D9)",
497
499
  alignSelf: "stretch"
498
500
  }, children: "More details" }),
499
- ae.map((h) => /* @__PURE__ */ n(
501
+ Z.map((h) => /* @__PURE__ */ n(
500
502
  "div",
501
503
  {
502
504
  style: {
@@ -531,22 +533,22 @@ const En = {
531
533
  ]
532
534
  }
533
535
  );
534
- }, M = {
536
+ }, E = {
535
537
  strong: "var(--Grey-Strong, #2E3236)",
536
538
  muted: "var(--Grey-Muted, #808183)",
537
539
  absent: "var(--Grey-absent, #D9D9D9)",
538
540
  white: "var(--Grey-White, #FFF)",
539
541
  cardBg: "var(--surface-warm-40, rgba(243, 241, 229, 0.40))"
540
- }, P = 1.2, gt = 3, ht = (t) => t != null ? Math.round(t * 100) + "%" : "—", Tn = (t) => {
542
+ }, P = 1.2, ht = 3, pt = (t) => t != null ? Math.round(t * 100) + "%" : "—", _n = (t) => {
541
543
  if (t == null)
542
544
  return "—";
543
545
  const r = (t * 100).toFixed(1);
544
546
  return t > 0 ? `+${r}pp` : `${r}pp`;
545
547
  }, Rn = ({ outcomeLift: t, driverLabels: r = [] }) => {
546
- var a;
548
+ var s;
547
549
  if (!t || t.lift == null)
548
550
  return null;
549
- const i = t.p_expected, s = t.p_full, o = t.lift_raw ?? (s != null && i != null ? s - i : null), d = t.lift, g = (a = t.interpretation) != null && a.lift_band ? t.interpretation.lift_band.replace(/_/g, " ") : d >= 0 ? "Positive" : "Negative", p = g.charAt(0).toUpperCase() + g.slice(1), W = /negative/i.test(g) ? pn : mt, x = r.slice(0, gt), I = r.length - gt;
551
+ const i = t.p_expected, l = t.p_full, a = t.lift_raw ?? (l != null && i != null ? l - i : null), d = t.lift, g = (s = t.interpretation) != null && s.lift_band ? t.interpretation.lift_band.replace(/_/g, " ") : d >= 0 ? "Positive" : "Negative", p = g.charAt(0).toUpperCase() + g.slice(1), W = /negative/i.test(g) ? un : vt, x = r.slice(0, ht), I = r.length - ht;
550
552
  return /* @__PURE__ */ n(
551
553
  "div",
552
554
  {
@@ -556,8 +558,8 @@ const En = {
556
558
  padding: 24,
557
559
  gap: 24,
558
560
  borderRadius: 8,
559
- border: `1px solid ${M.absent}`,
560
- background: M.cardBg,
561
+ border: `1px solid ${E.absent}`,
562
+ background: E.cardBg,
561
563
  alignSelf: "stretch"
562
564
  },
563
565
  children: [
@@ -579,7 +581,7 @@ const En = {
579
581
  style: {
580
582
  fontSize: 15,
581
583
  fontWeight: 600,
582
- color: M.strong,
584
+ color: E.strong,
583
585
  fontFamily: "var(--font-sans)",
584
586
  lineHeight: P
585
587
  },
@@ -606,8 +608,8 @@ const En = {
606
608
  // borderLeft: `1px solid ${COLORS.absent}`,
607
609
  },
608
610
  children: [
609
- /* @__PURE__ */ e(W, { size: 14, color: M.strong }),
610
- /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 600, color: M.strong, lineHeight: P }, children: p })
611
+ /* @__PURE__ */ e(W, { size: 14, color: E.strong }),
612
+ /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 600, color: E.strong, lineHeight: P }, children: p })
611
613
  ]
612
614
  }
613
615
  )
@@ -625,10 +627,10 @@ const En = {
625
627
  },
626
628
  children: [
627
629
  /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 16, alignItems: "flex-start", flex: 1, minWidth: 0 }, children: [
628
- /* @__PURE__ */ e("span", { style: { fontSize: 28, fontWeight: 400, color: M.muted, fontFamily: "var(--font-sans)", lineHeight: P }, children: ht(i) }),
630
+ /* @__PURE__ */ e("span", { style: { fontSize: 28, fontWeight: 400, color: E.muted, fontFamily: "var(--font-sans)", lineHeight: P }, children: pt(i) }),
629
631
  /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 8, alignItems: "flex-start", minHeight: 48 }, children: [
630
- /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: M.strong, fontFamily: "var(--font-sans)", lineHeight: P, whiteSpace: "nowrap" }, children: "Expected Outcome" }),
631
- /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: M.muted, fontFamily: "var(--font-sans)", lineHeight: P, textAlign: "left" }, children: "Based on call type & difficulty" })
632
+ /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: E.strong, fontFamily: "var(--font-sans)", lineHeight: P, whiteSpace: "nowrap" }, children: "Expected Outcome" }),
633
+ /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: E.muted, fontFamily: "var(--font-sans)", lineHeight: P, textAlign: "left" }, children: "Based on call type & difficulty" })
632
634
  ] })
633
635
  ] }),
634
636
  /* @__PURE__ */ n("div", { style: {
@@ -637,14 +639,14 @@ const En = {
637
639
  gap: 16,
638
640
  alignItems: "flex-start",
639
641
  paddingLeft: 24,
640
- borderLeft: `1px solid ${M.absent}`,
642
+ borderLeft: `1px solid ${E.absent}`,
641
643
  flex: 1,
642
644
  minWidth: 0
643
645
  }, children: [
644
- /* @__PURE__ */ e("span", { style: { fontSize: 28, fontWeight: 400, color: M.muted, fontFamily: "var(--font-sans)", lineHeight: P }, children: Tn(o) }),
646
+ /* @__PURE__ */ e("span", { style: { fontSize: 28, fontWeight: 400, color: E.muted, fontFamily: "var(--font-sans)", lineHeight: P }, children: _n(a) }),
645
647
  /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 8, alignItems: "flex-start", minHeight: 48 }, children: [
646
- /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: M.strong, fontFamily: "var(--font-sans)", lineHeight: P, whiteSpace: "nowrap" }, children: "Agent Impact" }),
647
- /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: M.muted, fontFamily: "var(--font-sans)", lineHeight: P, textAlign: "left" }, children: "Behavior-driven change" })
648
+ /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: E.strong, fontFamily: "var(--font-sans)", lineHeight: P, whiteSpace: "nowrap" }, children: "Agent Impact" }),
649
+ /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: E.muted, fontFamily: "var(--font-sans)", lineHeight: P, textAlign: "left" }, children: "Behavior-driven change" })
648
650
  ] })
649
651
  ] }),
650
652
  /* @__PURE__ */ n("div", { style: {
@@ -653,14 +655,14 @@ const En = {
653
655
  gap: 16,
654
656
  alignItems: "flex-start",
655
657
  paddingLeft: 24,
656
- borderLeft: `1px solid ${M.absent}`,
658
+ borderLeft: `1px solid ${E.absent}`,
657
659
  flex: 1,
658
660
  minWidth: 0
659
661
  }, children: [
660
- /* @__PURE__ */ e("span", { style: { fontSize: 28, fontWeight: 400, color: M.strong, fontFamily: "var(--font-sans)", lineHeight: P }, children: ht(s) }),
662
+ /* @__PURE__ */ e("span", { style: { fontSize: 28, fontWeight: 400, color: E.strong, fontFamily: "var(--font-sans)", lineHeight: P }, children: pt(l) }),
661
663
  /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 8, alignItems: "flex-start", minHeight: 48 }, children: [
662
- /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 600, color: M.strong, fontFamily: "var(--font-sans)", lineHeight: P, whiteSpace: "nowrap" }, children: "Outcome" }),
663
- /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: M.muted, fontFamily: "var(--font-sans)", lineHeight: P, textAlign: "left" }, children: "With agent behaviors" })
664
+ /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 600, color: E.strong, fontFamily: "var(--font-sans)", lineHeight: P, whiteSpace: "nowrap" }, children: "Outcome" }),
665
+ /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: E.muted, fontFamily: "var(--font-sans)", lineHeight: P, textAlign: "left" }, children: "With agent behaviors" })
664
666
  ] })
665
667
  ] })
666
668
  ]
@@ -674,7 +676,7 @@ const En = {
674
676
  style: {
675
677
  fontSize: 12,
676
678
  fontWeight: 600,
677
- color: M.strong,
679
+ color: E.strong,
678
680
  fontFamily: "var(--font-sans)",
679
681
  lineHeight: P
680
682
  },
@@ -691,8 +693,8 @@ const En = {
691
693
  alignItems: "center",
692
694
  justifyContent: "center",
693
695
  borderRadius: 4,
694
- border: `1px solid ${M.absent}`,
695
- background: M.white
696
+ border: `1px solid ${E.absent}`,
697
+ background: E.white
696
698
  },
697
699
  children: /* @__PURE__ */ e(
698
700
  "span",
@@ -700,7 +702,7 @@ const En = {
700
702
  style: {
701
703
  fontSize: 12,
702
704
  fontWeight: 400,
703
- color: M.strong,
705
+ color: E.strong,
704
706
  fontFamily: "var(--font-sans)",
705
707
  lineHeight: P,
706
708
  whiteSpace: "nowrap",
@@ -723,8 +725,8 @@ const En = {
723
725
  alignItems: "center",
724
726
  justifyContent: "center",
725
727
  borderRadius: 4,
726
- border: `1px solid ${M.absent}`,
727
- background: M.white
728
+ border: `1px solid ${E.absent}`,
729
+ background: E.white
728
730
  },
729
731
  children: /* @__PURE__ */ n(
730
732
  "span",
@@ -732,7 +734,7 @@ const En = {
732
734
  style: {
733
735
  fontSize: 12,
734
736
  fontWeight: 400,
735
- color: M.strong,
737
+ color: E.strong,
736
738
  fontFamily: "var(--font-sans)",
737
739
  lineHeight: P,
738
740
  whiteSpace: "nowrap"
@@ -750,12 +752,12 @@ const En = {
750
752
  ]
751
753
  }
752
754
  );
753
- }, pt = ({ children: t, size: r = 28, onClick: i, title: s }) => {
754
- const [o, d] = D(!1);
755
+ }, ut = ({ children: t, size: r = 28, onClick: i, title: l }) => {
756
+ const [a, d] = D(!1);
755
757
  return /* @__PURE__ */ e(
756
758
  "div",
757
759
  {
758
- title: s,
760
+ title: l,
759
761
  onClick: i,
760
762
  onMouseEnter: () => d(!0),
761
763
  onMouseLeave: () => d(!1),
@@ -766,7 +768,7 @@ const En = {
766
768
  width: r,
767
769
  height: r,
768
770
  borderRadius: 9999,
769
- background: o ? "var(--surface-hover, #F3F7F7)" : "transparent",
771
+ background: a ? "var(--surface-hover, #F3F7F7)" : "transparent",
770
772
  cursor: "pointer",
771
773
  flexShrink: 0,
772
774
  transition: "background 0.15s"
@@ -774,24 +776,24 @@ const En = {
774
776
  children: t
775
777
  }
776
778
  );
777
- }, _n = ({
779
+ }, An = ({
778
780
  signals: t = { signals: [], present_count: 0, total_signals_evaluated: 0 },
779
781
  expandedSignals: r = /* @__PURE__ */ new Set(),
780
782
  toggleSignal: i = () => {
781
783
  },
782
- playEvidence: s = () => {
784
+ playEvidence: l = () => {
783
785
  },
784
- highlightTurns: o = () => {
786
+ highlightTurns: a = () => {
785
787
  },
786
788
  onShowInTranscript: d = () => {
787
789
  },
788
790
  timelinePlaying: g = !1,
789
791
  currentTimeSeconds: p = 0
790
792
  }) => {
791
- const y = (t == null ? void 0 : t.signals) ?? [], W = (t == null ? void 0 : t.present_count) ?? y.length, x = (a) => {
792
- const b = Math.floor(a / 6e4), w = Math.floor(a % 6e4 / 1e3);
793
+ const y = (t == null ? void 0 : t.signals) ?? [], W = (t == null ? void 0 : t.present_count) ?? y.length, x = (s) => {
794
+ const b = Math.floor(s / 6e4), w = Math.floor(s % 6e4 / 1e3);
793
795
  return `${b.toString().padStart(2, "0")}:${w.toString().padStart(2, "0")}`;
794
- }, I = (a) => g && a.start_ms != null && p * 1e3 >= a.start_ms && p * 1e3 <= (a.end_ms ?? a.start_ms + 5e3);
796
+ }, I = (s) => g && s.start_ms != null && p * 1e3 >= s.start_ms && p * 1e3 <= (s.end_ms ?? s.start_ms + 5e3);
795
797
  return /* @__PURE__ */ n("div", { style: {
796
798
  display: "flex",
797
799
  flexDirection: "column",
@@ -815,7 +817,7 @@ const En = {
815
817
  borderRadius: 9999,
816
818
  background: "var(--surface-hover, #F3F7F7)",
817
819
  flexShrink: 0
818
- }, children: /* @__PURE__ */ e(bt, { size: 20, color: "#2E3236", strokeWidth: 1.5 }) }),
820
+ }, children: /* @__PURE__ */ e(St, { size: 20, color: "#2E3236", strokeWidth: 1.5 }) }),
819
821
  /* @__PURE__ */ n("div", { style: {
820
822
  display: "flex",
821
823
  alignItems: "center",
@@ -849,9 +851,9 @@ const En = {
849
851
  fontSize: 14,
850
852
  color: "var(--Grey-Muted, #808183)"
851
853
  }, children: "No signals detected." }),
852
- y.map((a, b) => {
854
+ y.map((s, b) => {
853
855
  var T, S, F;
854
- const w = a.key ?? a.id ?? b, C = r.has(w), z = ((T = a.observations) == null ? void 0 : T.length) ?? 0;
856
+ const w = s.key ?? s.id ?? b, C = r.has(w), z = ((T = s.observations) == null ? void 0 : T.length) ?? 0;
855
857
  return /* @__PURE__ */ n(
856
858
  "div",
857
859
  {
@@ -888,7 +890,7 @@ const En = {
888
890
  color: "var(--text-dark, #0B0A0A)",
889
891
  lineHeight: 1.71
890
892
  }, children: [
891
- a.display_name || ((S = a.key) == null ? void 0 : S.replace(/_/g, " ")),
893
+ s.display_name || ((S = s.key) == null ? void 0 : S.replace(/_/g, " ")),
892
894
  z > 0 && /* @__PURE__ */ n("span", { style: {
893
895
  fontWeight: 600,
894
896
  color: "var(--text-dark, #0B0A0A)",
@@ -899,17 +901,17 @@ const En = {
899
901
  ")"
900
902
  ] })
901
903
  ] }),
902
- C ? /* @__PURE__ */ e(vt, { size: 20, color: "#767473" }) : /* @__PURE__ */ e(xt, { size: 20, color: "#767473" })
904
+ C ? /* @__PURE__ */ e(xt, { size: 20, color: "#767473" }) : /* @__PURE__ */ e(bt, { size: 20, color: "#767473" })
903
905
  ]
904
906
  }
905
907
  ),
906
- C && ((F = a.observations) == null ? void 0 : F.length) > 0 && /* @__PURE__ */ e("div", { style: {
908
+ C && ((F = s.observations) == null ? void 0 : F.length) > 0 && /* @__PURE__ */ e("div", { style: {
907
909
  display: "flex",
908
910
  flexDirection: "column",
909
911
  alignSelf: "stretch",
910
912
  gap: 0
911
- }, children: a.observations.map((E, L) => {
912
- var _, O, u;
913
+ }, children: s.observations.map((H, L) => {
914
+ var R, O, u;
913
915
  return /* @__PURE__ */ n(
914
916
  "div",
915
917
  {
@@ -933,8 +935,8 @@ const En = {
933
935
  fontWeight: 400,
934
936
  color: "var(--text-subtle-warm, #767473)",
935
937
  lineHeight: 1.5
936
- }, children: E.reason || E.explanation }),
937
- ((O = (_ = E.evidence) == null ? void 0 : _[0]) == null ? void 0 : O.start_ms) != null && /* @__PURE__ */ n(
938
+ }, children: H.reason || H.explanation }),
939
+ ((O = (R = H.evidence) == null ? void 0 : R[0]) == null ? void 0 : O.start_ms) != null && /* @__PURE__ */ n(
938
940
  "div",
939
941
  {
940
942
  style: {
@@ -945,14 +947,14 @@ const En = {
945
947
  },
946
948
  children: [
947
949
  /* @__PURE__ */ e(
948
- pt,
950
+ ut,
949
951
  {
950
952
  size: 28,
951
953
  title: "Show in transcript",
952
954
  onClick: (m) => {
953
- m.stopPropagation(), d(E.evidence[0].start_ms);
955
+ m.stopPropagation(), d(H.evidence[0].start_ms);
954
956
  },
955
- children: /* @__PURE__ */ e(St, { size: 16, color: "#808183", strokeWidth: 1.5 })
957
+ children: /* @__PURE__ */ e(kt, { size: 16, color: "#808183", strokeWidth: 1.5 })
956
958
  }
957
959
  ),
958
960
  /* @__PURE__ */ e("span", { style: {
@@ -961,21 +963,21 @@ const En = {
961
963
  color: "var(--Grey-Muted, #808183)",
962
964
  lineHeight: 1.2,
963
965
  whiteSpace: "nowrap"
964
- }, children: x(E.evidence[0].start_ms) })
966
+ }, children: x(H.evidence[0].start_ms) })
965
967
  ]
966
968
  }
967
969
  )
968
970
  ] }),
969
- (u = E.evidence) == null ? void 0 : u.map((m, c) => {
971
+ (u = H.evidence) == null ? void 0 : u.map((m, c) => {
970
972
  const B = m.start_ms != null && m.end_ms != null;
971
973
  return m.text && /* @__PURE__ */ n(
972
974
  "div",
973
975
  {
974
976
  onClick: (J) => {
975
- J.stopPropagation(), B && s(m);
977
+ J.stopPropagation(), B && l(m);
976
978
  },
977
- onMouseEnter: () => o(m.turn_ids ?? []),
978
- onMouseLeave: () => o([]),
979
+ onMouseEnter: () => a(m.turn_ids ?? []),
980
+ onMouseLeave: () => a([]),
979
981
  style: {
980
982
  display: "flex",
981
983
  alignItems: "center",
@@ -984,15 +986,15 @@ const En = {
984
986
  cursor: B ? "pointer" : "default"
985
987
  },
986
988
  children: [
987
- B && /* @__PURE__ */ e(pt, { size: 28, children: I(m) ? /* @__PURE__ */ e(
988
- kt,
989
+ B && /* @__PURE__ */ e(ut, { size: 28, children: I(m) ? /* @__PURE__ */ e(
990
+ wt,
989
991
  {
990
992
  size: 17,
991
993
  color: "var(--Grey-Muted, #808183)",
992
994
  strokeWidth: 1.5
993
995
  }
994
996
  ) : /* @__PURE__ */ e(
995
- wt,
997
+ Ct,
996
998
  {
997
999
  size: 17,
998
1000
  color: "var(--Grey-Muted, #808183)",
@@ -1016,7 +1018,7 @@ const En = {
1016
1018
  })
1017
1019
  ]
1018
1020
  },
1019
- E.key ?? L
1021
+ H.key ?? L
1020
1022
  );
1021
1023
  }) })
1022
1024
  ]
@@ -1034,24 +1036,24 @@ const En = {
1034
1036
  accent: "var(--rail-orange, #C98A5A)",
1035
1037
  track: "var(--rail-surface-2, #E3E1D7)",
1036
1038
  infoIcon: "var(--color-input-border, #ACACAD)"
1037
- }, An = ({ score: t = 4, minScore: r = 0, maxScore: i = 5 }) => {
1038
- const x = Number(t), I = Number.isFinite(x) ? Math.min(Math.max(x, r), i) : r, a = i > r ? (I - r) / (i - r) * 5 : 0, b = 180 / 5, w = (T) => {
1039
+ }, Ln = ({ score: t = 4, minScore: r = 0, maxScore: i = 5 }) => {
1040
+ const x = Number(t), I = Number.isFinite(x) ? Math.min(Math.max(x, r), i) : r, s = i > r ? (I - r) / (i - r) * 5 : 0, b = 180 / 5, w = (T) => {
1039
1041
  const S = T * Math.PI / 180;
1040
1042
  return {
1041
1043
  x: 121.5 + 85 * Math.cos(S),
1042
1044
  y: 123 - 85 * Math.sin(S)
1043
1045
  };
1044
1046
  }, C = (T, S) => {
1045
- const F = w(T), E = w(S), L = T - S > 180 ? 1 : 0;
1046
- return `M ${F.x} ${F.y} A 85 85 0 ${L} 1 ${E.x} ${E.y}`;
1047
+ const F = w(T), H = w(S), L = T - S > 180 ? 1 : 0;
1048
+ return `M ${F.x} ${F.y} A 85 85 0 ${L} 1 ${H.x} ${H.y}`;
1047
1049
  }, z = 2;
1048
1050
  return /* @__PURE__ */ e("svg", { width: "100%", viewBox: "0 0 243 130", fill: "none", style: { maxWidth: 243 }, children: Array.from({ length: 5 }, (T, S) => {
1049
- const F = 180 - S * b - (S > 0 ? z / 2 : 0), E = 180 - (S + 1) * b + (S < 5 - 1 ? z / 2 : 0), L = Math.max(0, Math.min(1, a - S)), _ = C(F, E);
1051
+ const F = 180 - S * b - (S > 0 ? z / 2 : 0), H = 180 - (S + 1) * b + (S < 5 - 1 ? z / 2 : 0), L = Math.max(0, Math.min(1, s - S)), R = C(F, H);
1050
1052
  return /* @__PURE__ */ n("g", { children: [
1051
1053
  /* @__PURE__ */ e(
1052
1054
  "path",
1053
1055
  {
1054
- d: _,
1056
+ d: R,
1055
1057
  stroke: Y.track,
1056
1058
  strokeWidth: 30,
1057
1059
  strokeLinecap: "butt",
@@ -1061,7 +1063,7 @@ const En = {
1061
1063
  L > 0 && /* @__PURE__ */ e(
1062
1064
  "path",
1063
1065
  {
1064
- d: _,
1066
+ d: R,
1065
1067
  stroke: Y.strong,
1066
1068
  strokeWidth: 30,
1067
1069
  strokeLinecap: "butt",
@@ -1072,10 +1074,10 @@ const En = {
1072
1074
  )
1073
1075
  ] }, S);
1074
1076
  }) });
1075
- }, Ln = ({ value: t = 0, maxValue: r = 5 }) => {
1076
- const i = Number(t), s = Number.isFinite(i) ? Math.min(Math.max(i, 0), r) : 0;
1077
- return /* @__PURE__ */ e("div", { style: { display: "flex", gap: 2 }, children: Array.from({ length: r }, (o, d) => {
1078
- const g = Math.max(0, Math.min(1, s - d));
1077
+ }, Bn = ({ value: t = 0, maxValue: r = 5 }) => {
1078
+ const i = Number(t), l = Number.isFinite(i) ? Math.min(Math.max(i, 0), r) : 0;
1079
+ return /* @__PURE__ */ e("div", { style: { display: "flex", gap: 2 }, children: Array.from({ length: r }, (a, d) => {
1080
+ const g = Math.max(0, Math.min(1, l - d));
1079
1081
  return /* @__PURE__ */ e(
1080
1082
  "div",
1081
1083
  {
@@ -1100,29 +1102,29 @@ const En = {
1100
1102
  d
1101
1103
  );
1102
1104
  }) });
1103
- }, Bn = {
1105
+ }, jn = {
1104
1106
  CSAT: "Predicted Customer Satisfaction",
1105
1107
  Resolution: "Predicted Resolution: was the issue fully resolved?",
1106
1108
  "Process Adherence": "Process Adherence: Did the agent follow procedures?",
1107
1109
  Communication: "Predicted Communication Quality: Clarity, Empathy, Professionalism"
1108
- }, jn = ({ text: t, children: r }) => {
1109
- const [i, s] = D(!1), o = N(null), [d, g] = D({ top: 0, left: 0 });
1110
+ }, Nn = ({ text: t, children: r }) => {
1111
+ const [i, l] = D(!1), a = N(null), [d, g] = D({ top: 0, left: 0 });
1110
1112
  return /* @__PURE__ */ n(
1111
1113
  "div",
1112
1114
  {
1113
- ref: o,
1115
+ ref: a,
1114
1116
  style: { position: "relative", display: "inline-flex" },
1115
1117
  onMouseEnter: () => {
1116
- if (o.current) {
1117
- const y = o.current.getBoundingClientRect();
1118
+ if (a.current) {
1119
+ const y = a.current.getBoundingClientRect();
1118
1120
  g({
1119
1121
  top: y.top - 8,
1120
1122
  left: y.left + y.width / 2
1121
1123
  });
1122
1124
  }
1123
- s(!0);
1125
+ l(!0);
1124
1126
  },
1125
- onMouseLeave: () => s(!1),
1127
+ onMouseLeave: () => l(!1),
1126
1128
  children: [
1127
1129
  r,
1128
1130
  i && /* @__PURE__ */ e("div", { style: {
@@ -1149,7 +1151,7 @@ const En = {
1149
1151
  ]
1150
1152
  }
1151
1153
  );
1152
- }, Nn = ({ label: t, value: r = 0, maxValue: i = 5 }) => /* @__PURE__ */ n("div", { style: {
1154
+ }, On = ({ label: t, value: r = 0, maxValue: i = 5 }) => /* @__PURE__ */ n("div", { style: {
1153
1155
  display: "flex",
1154
1156
  flexDirection: "column",
1155
1157
  gap: 8,
@@ -1168,15 +1170,15 @@ const En = {
1168
1170
  fontFamily: "var(--font-sans)",
1169
1171
  lineHeight: "normal"
1170
1172
  }, children: t }),
1171
- /* @__PURE__ */ e(jn, { text: Bn[t] || t, children: /* @__PURE__ */ e(Ct, { size: 14, color: Y.infoIcon, strokeWidth: 1, style: { cursor: "pointer" } }) })
1173
+ /* @__PURE__ */ e(Nn, { text: jn[t] || t, children: /* @__PURE__ */ e(Ft, { size: 14, color: Y.infoIcon, strokeWidth: 1, style: { cursor: "pointer" } }) })
1172
1174
  ] }),
1173
- /* @__PURE__ */ e(Ln, { value: r, maxValue: i })
1174
- ] }), On = ({
1175
+ /* @__PURE__ */ e(Bn, { value: r, maxValue: i })
1176
+ ] }), $n = ({
1175
1177
  score: t = 4,
1176
1178
  minScore: r = 0,
1177
1179
  maxScore: i = 5,
1178
- predictedScore: s = 4,
1179
- predictedLabel: o = "Predicted Objective",
1180
+ predictedScore: l = 4,
1181
+ predictedLabel: a = "Predicted Objective",
1180
1182
  description: d = "",
1181
1183
  legends: g = [
1182
1184
  { label: "CSAT", value: 3 },
@@ -1234,9 +1236,9 @@ const En = {
1234
1236
  alignItems: "center",
1235
1237
  display: "flex"
1236
1238
  }, children: [
1237
- /* @__PURE__ */ e(An, { score: t, minScore: r, maxScore: i }),
1239
+ /* @__PURE__ */ e(Ln, { score: t, minScore: r, maxScore: i }),
1238
1240
  (() => {
1239
- const a = -(180 - (i > r ? (y - r) / (i - r) : 0) * 180 - 45);
1241
+ const s = -(180 - (i > r ? (y - r) / (i - r) : 0) * 180 - 45);
1240
1242
  return /* @__PURE__ */ n(
1241
1243
  "svg",
1242
1244
  {
@@ -1247,7 +1249,7 @@ const En = {
1247
1249
  xmlns: "http://www.w3.org/2000/svg",
1248
1250
  style: {
1249
1251
  marginTop: -24,
1250
- transform: `rotate(${a}deg)`,
1252
+ transform: `rotate(${s}deg)`,
1251
1253
  transformOrigin: "center center"
1252
1254
  },
1253
1255
  children: [
@@ -1298,7 +1300,7 @@ const En = {
1298
1300
  background: Y.absent
1299
1301
  } }),
1300
1302
  g.map((x, I) => /* @__PURE__ */ e(
1301
- Nn,
1303
+ On,
1302
1304
  {
1303
1305
  label: x.label,
1304
1306
  value: x.value
@@ -1308,13 +1310,13 @@ const En = {
1308
1310
  ] })
1309
1311
  ] })
1310
1312
  ] });
1311
- }, Ft = (t) => {
1313
+ }, Wt = (t) => {
1312
1314
  if (!t)
1313
1315
  return null;
1314
1316
  const i = String(t).trim().toLowerCase().split(/[^a-z]+/).filter(Boolean);
1315
1317
  return i.includes("supervisor") ? "var(--rail-compliance, #C98A5A)" : i.includes("admin") || i.includes("administrator") || i.includes("superadmin") ? "var(--rail-discovery, #5E88B0)" : i.includes("agent") ? "var(--rail-outcome, #6B7C93)" : null;
1316
- }, $n = (t) => {
1317
- var s, o, d, g, p, y;
1318
+ }, Pn = (t) => {
1319
+ var l, a, d, g, p, y;
1318
1320
  if (!t)
1319
1321
  return null;
1320
1322
  const r = t.role ?? t.userRole ?? t.user_role ?? t.author_role ?? t.roleName ?? t.role_name ?? t.userType ?? t.user_type ?? t.type;
@@ -1324,26 +1326,26 @@ const En = {
1324
1326
  return r.join(" ");
1325
1327
  if (r && typeof r == "object")
1326
1328
  return r.name || r.value || r.label || null;
1327
- const i = ((s = t.user) == null ? void 0 : s.role) ?? ((o = t.user) == null ? void 0 : o.userRole) ?? ((d = t.user) == null ? void 0 : d.user_role) ?? ((g = t.profile) == null ? void 0 : g.role) ?? ((p = t.profile) == null ? void 0 : p.userRole) ?? ((y = t.profile) == null ? void 0 : y.user_role);
1329
+ const i = ((l = t.user) == null ? void 0 : l.role) ?? ((a = t.user) == null ? void 0 : a.userRole) ?? ((d = t.user) == null ? void 0 : d.user_role) ?? ((g = t.profile) == null ? void 0 : g.role) ?? ((p = t.profile) == null ? void 0 : p.userRole) ?? ((y = t.profile) == null ? void 0 : y.user_role);
1328
1330
  return typeof i == "string" ? i : Array.isArray(i) ? i.join(" ") : i && typeof i == "object" && (i.name || i.value || i.label) || null;
1329
- }, Wt = (t) => {
1331
+ }, It = (t) => {
1330
1332
  if (!t)
1331
1333
  return "#6B7C93";
1332
- const r = $n(t);
1333
- return Ft(r) || t.color || "#6B7C93";
1334
- }, Ce = (t) => (t || "").split(" ").map((r) => r[0]).join("").toUpperCase() || "U", Pn = (t) => {
1334
+ const r = Pn(t);
1335
+ return Wt(r) || t.color || "#6B7C93";
1336
+ }, Ce = (t) => (t || "").split(" ").map((r) => r[0]).join("").toUpperCase() || "U", Yn = (t) => {
1335
1337
  if (!t || t === "Just now")
1336
1338
  return !0;
1337
1339
  if (/^\d{4}-\d{2}-\d{2}T/.test(t))
1338
1340
  try {
1339
- const i = /Z$|[+-]\d{2}:\d{2}$/.test(t) ? t : t + "Z", s = new Date(i);
1340
- return Number.isNaN(s.getTime()) ? !1 : Date.now() - s.getTime() < 15 * 60 * 1e3;
1341
+ const i = /Z$|[+-]\d{2}:\d{2}$/.test(t) ? t : t + "Z", l = new Date(i);
1342
+ return Number.isNaN(l.getTime()) ? !1 : Date.now() - l.getTime() < 15 * 60 * 1e3;
1341
1343
  } catch {
1342
1344
  return !1;
1343
1345
  }
1344
1346
  const r = t.match(/^(\d+)\s*min/);
1345
1347
  return r ? parseInt(r[1], 10) < 15 : !(/\d+\s*h/.test(t) || /\d+\s*day/.test(t));
1346
- }, Yn = (t) => {
1348
+ }, Kn = (t) => {
1347
1349
  if (!t)
1348
1350
  return "";
1349
1351
  if (!/^\d{4}-\d{2}-\d{2}T/.test(t))
@@ -1352,7 +1354,7 @@ const En = {
1352
1354
  const r = /Z$|[+-]\d{2}:\d{2}$/.test(t) ? t : t + "Z", i = new Date(r);
1353
1355
  if (Number.isNaN(i.getTime()))
1354
1356
  return t;
1355
- const o = (/* @__PURE__ */ new Date()).getTime() - i.getTime(), d = Math.floor(o / 6e4), g = Math.floor(o / 36e5);
1357
+ const a = (/* @__PURE__ */ new Date()).getTime() - i.getTime(), d = Math.floor(a / 6e4), g = Math.floor(a / 36e5);
1356
1358
  if (d < 1)
1357
1359
  return "Just now";
1358
1360
  if (d < 60)
@@ -1364,14 +1366,14 @@ const En = {
1364
1366
  } catch {
1365
1367
  return t;
1366
1368
  }
1367
- }, It = ({ name: t, initials: r, color: i, avatar: s, size: o = 36 }) => s ? /* @__PURE__ */ e(
1369
+ }, Dt = ({ name: t, initials: r, color: i, avatar: l, size: a = 36 }) => l ? /* @__PURE__ */ e(
1368
1370
  "img",
1369
1371
  {
1370
- src: s,
1372
+ src: l,
1371
1373
  alt: t,
1372
1374
  style: {
1373
- width: o,
1374
- height: o,
1375
+ width: a,
1376
+ height: a,
1375
1377
  borderRadius: "50%",
1376
1378
  objectFit: "cover",
1377
1379
  flexShrink: 0
@@ -1381,15 +1383,15 @@ const En = {
1381
1383
  "div",
1382
1384
  {
1383
1385
  style: {
1384
- width: o,
1385
- height: o,
1386
+ width: a,
1387
+ height: a,
1386
1388
  borderRadius: "50%",
1387
1389
  background: i || "#6B7C93",
1388
1390
  color: "#FFF",
1389
1391
  display: "flex",
1390
1392
  alignItems: "center",
1391
1393
  justifyContent: "center",
1392
- fontSize: o <= 32 ? "10px" : "11px",
1394
+ fontSize: a <= 32 ? "10px" : "11px",
1393
1395
  fontWeight: 650,
1394
1396
  flexShrink: 0,
1395
1397
  fontFamily: "var(--default-font-family)",
@@ -1398,40 +1400,40 @@ const En = {
1398
1400
  title: t,
1399
1401
  children: r || Ce(t)
1400
1402
  }
1401
- ), Kn = ({
1403
+ ), Vn = ({
1402
1404
  comment: t,
1403
1405
  isReply: r = !1,
1404
1406
  isConsecutive: i = !1,
1405
- onReply: s,
1406
- onSendReply: o,
1407
+ onReply: l,
1408
+ onSendReply: a,
1407
1409
  onEdit: d,
1408
1410
  onDelete: g,
1409
1411
  onMenuClick: p,
1410
1412
  showReply: y = !0
1411
1413
  }) => {
1412
- var $, U;
1413
- const [W, x] = D(!1), [I, a] = D(!1), [b, w] = D(!1), [C, z] = D(""), [T, S] = D(!1), [F, E] = D(""), [L, _] = D(!1), O = N(null), u = N(null), m = N(null), c = t.author || {}, B = c.name || t.author_name || "Unknown", J = c.initials || Ce(B), ie = c.role || t.author_role, R = c.color || Ft(ie) || "#6B7C93", X = c.avatar || t.avatar, ee = t.timestamp || t.created_at, ae = Yn(ee), q = Pn(ee), fe = !!(t.isEdited || t.is_edited || t.edited), h = Array.isArray(t.content) ? t.content : [t.content || t.text || ""];
1414
+ var h, $;
1415
+ const [W, x] = D(!1), [I, s] = D(!1), [b, w] = D(!1), [C, z] = D(""), [T, S] = D(!1), [F, H] = D(""), [L, R] = D(!1), O = N(null), u = N(null), m = N(null), c = t.author || {}, B = c.name || t.author_name || "Unknown", J = c.initials || Ce(B), X = c.role || t.author_role, U = c.color || Wt(X) || "#6B7C93", _ = c.avatar || t.avatar, ne = t.timestamp || t.created_at, ie = Kn(ne), Z = Yn(ne), ae = !!(t.isEdited || t.is_edited || t.edited), fe = Array.isArray(t.content) ? t.content : [t.content || t.text || ""];
1414
1416
  return ce.useEffect(() => {
1415
1417
  if (!I)
1416
1418
  return;
1417
- const l = (Z) => {
1418
- O.current && !O.current.contains(Z.target) && a(!1);
1419
+ const o = (Q) => {
1420
+ O.current && !O.current.contains(Q.target) && s(!1);
1419
1421
  };
1420
- return document.addEventListener("mousedown", l), () => document.removeEventListener("mousedown", l);
1422
+ return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
1421
1423
  }, [I]), ce.useEffect(() => {
1422
- const l = u.current;
1423
- if (!l)
1424
+ const o = u.current;
1425
+ if (!o)
1424
1426
  return;
1425
- l.style.height = "auto";
1426
- const Z = 140;
1427
- l.style.height = Math.min(l.scrollHeight, Z) + "px", l.style.overflowY = l.scrollHeight > Z ? "auto" : "hidden";
1427
+ o.style.height = "auto";
1428
+ const Q = 140;
1429
+ o.style.height = Math.min(o.scrollHeight, Q) + "px", o.style.overflowY = o.scrollHeight > Q ? "auto" : "hidden";
1428
1430
  }, [C, b]), ce.useEffect(() => {
1429
- const l = m.current;
1430
- if (!l)
1431
+ const o = m.current;
1432
+ if (!o)
1431
1433
  return;
1432
- l.style.height = "auto";
1433
- const Z = 140;
1434
- l.style.height = Math.min(l.scrollHeight, Z) + "px", l.style.overflowY = l.scrollHeight > Z ? "auto" : "hidden";
1434
+ o.style.height = "auto";
1435
+ const Q = 140;
1436
+ o.style.height = Math.min(o.scrollHeight, Q) + "px", o.style.overflowY = o.scrollHeight > Q ? "auto" : "hidden";
1435
1437
  }, [F, T]), /* @__PURE__ */ n(
1436
1438
  "div",
1437
1439
  {
@@ -1447,12 +1449,12 @@ const En = {
1447
1449
  },
1448
1450
  children: [
1449
1451
  i ? /* @__PURE__ */ e("div", { style: { width: 36, flexShrink: 0 } }) : /* @__PURE__ */ e(
1450
- It,
1452
+ Dt,
1451
1453
  {
1452
1454
  name: B,
1453
1455
  initials: J,
1454
- color: R,
1455
- avatar: X
1456
+ color: U,
1457
+ avatar: _
1456
1458
  }
1457
1459
  ),
1458
1460
  /* @__PURE__ */ n("div", { style: { flex: 1, minWidth: 0 }, children: [
@@ -1490,10 +1492,10 @@ const En = {
1490
1492
  lineHeight: "150%",
1491
1493
  fontFamily: "var(--default-font-family)"
1492
1494
  },
1493
- children: ae
1495
+ children: ie
1494
1496
  }
1495
1497
  ),
1496
- fe && /* @__PURE__ */ e(
1498
+ ae && /* @__PURE__ */ e(
1497
1499
  "span",
1498
1500
  {
1499
1501
  style: {
@@ -1512,7 +1514,7 @@ const En = {
1512
1514
  "button",
1513
1515
  {
1514
1516
  type: "button",
1515
- onClick: () => a((l) => !l),
1517
+ onClick: () => s((o) => !o),
1516
1518
  style: {
1517
1519
  padding: 2,
1518
1520
  border: "none",
@@ -1526,7 +1528,7 @@ const En = {
1526
1528
  transition: "opacity 0.15s",
1527
1529
  flexShrink: 0
1528
1530
  },
1529
- children: /* @__PURE__ */ e(mn, { size: 24, color: "var(--Grey-Muted, #808183)" })
1531
+ children: /* @__PURE__ */ e(vn, { size: 24, color: "var(--Grey-Muted, #808183)" })
1530
1532
  }
1531
1533
  ),
1532
1534
  I && /* @__PURE__ */ n(
@@ -1549,12 +1551,12 @@ const En = {
1549
1551
  overflow: "hidden"
1550
1552
  },
1551
1553
  children: [
1552
- s && /* @__PURE__ */ e(
1554
+ l && /* @__PURE__ */ e(
1553
1555
  "button",
1554
1556
  {
1555
1557
  type: "button",
1556
1558
  onClick: () => {
1557
- a(!1), S(!1), w(!0);
1559
+ s(!1), S(!1), w(!0);
1558
1560
  },
1559
1561
  style: {
1560
1562
  display: "flex",
@@ -1571,11 +1573,11 @@ const En = {
1571
1573
  lineHeight: "150%",
1572
1574
  textAlign: "left"
1573
1575
  },
1574
- onMouseEnter: (l) => {
1575
- l.currentTarget.style.background = "var(--surface-hover, #F3F7F7)";
1576
+ onMouseEnter: (o) => {
1577
+ o.currentTarget.style.background = "var(--surface-hover, #F3F7F7)";
1576
1578
  },
1577
- onMouseLeave: (l) => {
1578
- l.currentTarget.style.background = "transparent";
1579
+ onMouseLeave: (o) => {
1580
+ o.currentTarget.style.background = "transparent";
1579
1581
  },
1580
1582
  children: "Reply"
1581
1583
  }
@@ -1584,14 +1586,14 @@ const En = {
1584
1586
  "button",
1585
1587
  {
1586
1588
  type: "button",
1587
- disabled: !q,
1589
+ disabled: !Z,
1588
1590
  onClick: () => {
1589
- if (!q)
1591
+ if (!Z)
1590
1592
  return;
1591
- a(!1);
1592
- const l = Array.isArray(t.content) ? t.content.join(`
1593
+ s(!1);
1594
+ const o = Array.isArray(t.content) ? t.content.join(`
1593
1595
  `) : t.content || t.text || "";
1594
- E(l), S(!0), w(!1);
1596
+ H(o), S(!0), w(!1);
1595
1597
  },
1596
1598
  style: {
1597
1599
  display: "flex",
@@ -1600,20 +1602,20 @@ const En = {
1600
1602
  alignItems: "center",
1601
1603
  border: "none",
1602
1604
  background: "transparent",
1603
- cursor: q ? "pointer" : "not-allowed",
1605
+ cursor: Z ? "pointer" : "not-allowed",
1604
1606
  fontSize: 13,
1605
1607
  fontWeight: 400,
1606
- color: q ? "var(--Grey-Strong, #2E3236)" : "var(--Grey-Muted, #808183)",
1608
+ color: Z ? "var(--Grey-Strong, #2E3236)" : "var(--Grey-Muted, #808183)",
1607
1609
  fontFamily: "var(--default-font-family)",
1608
1610
  lineHeight: "150%",
1609
1611
  textAlign: "left",
1610
- opacity: q ? 1 : 0.5
1612
+ opacity: Z ? 1 : 0.5
1611
1613
  },
1612
- onMouseEnter: (l) => {
1613
- q && (l.currentTarget.style.background = "var(--surface-hover, #F3F7F7)");
1614
+ onMouseEnter: (o) => {
1615
+ Z && (o.currentTarget.style.background = "var(--surface-hover, #F3F7F7)");
1614
1616
  },
1615
- onMouseLeave: (l) => {
1616
- l.currentTarget.style.background = "transparent";
1617
+ onMouseLeave: (o) => {
1618
+ o.currentTarget.style.background = "transparent";
1617
1619
  },
1618
1620
  children: "Edit"
1619
1621
  }
@@ -1623,7 +1625,7 @@ const En = {
1623
1625
  {
1624
1626
  type: "button",
1625
1627
  onClick: () => {
1626
- a(!1), _(!0);
1628
+ s(!1), R(!0);
1627
1629
  },
1628
1630
  style: {
1629
1631
  display: "flex",
@@ -1640,11 +1642,11 @@ const En = {
1640
1642
  lineHeight: "150%",
1641
1643
  textAlign: "left"
1642
1644
  },
1643
- onMouseEnter: (l) => {
1644
- l.currentTarget.style.background = "var(--surface-hover, #F3F7F7)";
1645
+ onMouseEnter: (o) => {
1646
+ o.currentTarget.style.background = "var(--surface-hover, #F3F7F7)";
1645
1647
  },
1646
- onMouseLeave: (l) => {
1647
- l.currentTarget.style.background = "transparent";
1648
+ onMouseLeave: (o) => {
1649
+ o.currentTarget.style.background = "transparent";
1648
1650
  },
1649
1651
  children: "Delete"
1650
1652
  }
@@ -1698,7 +1700,7 @@ const En = {
1698
1700
  children: [
1699
1701
  "“",
1700
1702
  " ",
1701
- (($ = t.author) == null ? void 0 : $.name) || "Unknown"
1703
+ ((h = t.author) == null ? void 0 : h.name) || "Unknown"
1702
1704
  ]
1703
1705
  }
1704
1706
  ),
@@ -1716,7 +1718,7 @@ const En = {
1716
1718
  cursor: "pointer",
1717
1719
  padding: 0
1718
1720
  },
1719
- children: /* @__PURE__ */ e(lt, { size: 20, color: "var(--Grey-Muted, #808183)" })
1721
+ children: /* @__PURE__ */ e(ot, { size: 20, color: "var(--Grey-Muted, #808183)" })
1720
1722
  }
1721
1723
  )
1722
1724
  ]
@@ -1737,14 +1739,14 @@ const En = {
1737
1739
  {
1738
1740
  ref: m,
1739
1741
  value: F,
1740
- onChange: (l) => E(l.target.value),
1741
- onKeyDown: (l) => {
1742
- if (l.key === "Enter") {
1743
- if (l.metaKey || l.ctrlKey || l.shiftKey)
1742
+ onChange: (o) => H(o.target.value),
1743
+ onKeyDown: (o) => {
1744
+ if (o.key === "Enter") {
1745
+ if (o.metaKey || o.ctrlKey || o.shiftKey)
1744
1746
  return;
1745
- l.preventDefault(), F.trim() && (d == null || d({ ...t, content: F.trim(), isEdited: !0 }), S(!1));
1747
+ o.preventDefault(), F.trim() && (d == null || d({ ...t, content: F.trim(), isEdited: !0 }), S(!1));
1746
1748
  }
1747
- l.key === "Escape" && S(!1);
1749
+ o.key === "Escape" && S(!1);
1748
1750
  },
1749
1751
  autoFocus: !0,
1750
1752
  rows: 1,
@@ -1802,7 +1804,7 @@ const En = {
1802
1804
  }
1803
1805
  ) : (
1804
1806
  /* Message bubbles — stacked, gap: 4px, fit content */
1805
- /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 4, alignItems: "flex-start" }, children: h.map((l, Z) => /* @__PURE__ */ e(
1807
+ /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 4, alignItems: "flex-start" }, children: fe.map((o, Q) => /* @__PURE__ */ e(
1806
1808
  "div",
1807
1809
  {
1808
1810
  style: {
@@ -1817,9 +1819,9 @@ const En = {
1817
1819
  wordBreak: "break-word",
1818
1820
  whiteSpace: "pre-wrap"
1819
1821
  },
1820
- children: l
1822
+ children: o
1821
1823
  },
1822
- Z
1824
+ Q
1823
1825
  )) })
1824
1826
  ),
1825
1827
  L && /* @__PURE__ */ n(
@@ -1840,7 +1842,7 @@ const En = {
1840
1842
  {
1841
1843
  type: "button",
1842
1844
  onClick: () => {
1843
- _(!1), g == null || g(t);
1845
+ R(!1), g == null || g(t);
1844
1846
  },
1845
1847
  style: {
1846
1848
  background: "var(--grey-light, #e9e8e8a1)",
@@ -1854,11 +1856,11 @@ const En = {
1854
1856
  borderRadius: 6,
1855
1857
  transition: "background 0.15s"
1856
1858
  },
1857
- onMouseEnter: (l) => {
1858
- l.currentTarget.style.background = "var(--Grey-absent, #D9D9D9)";
1859
+ onMouseEnter: (o) => {
1860
+ o.currentTarget.style.background = "var(--Grey-absent, #D9D9D9)";
1859
1861
  },
1860
- onMouseLeave: (l) => {
1861
- l.currentTarget.style.background = "var(--grey-light, #e9e8e8a1)";
1862
+ onMouseLeave: (o) => {
1863
+ o.currentTarget.style.background = "var(--grey-light, #e9e8e8a1)";
1862
1864
  },
1863
1865
  children: "Delete"
1864
1866
  }
@@ -1867,7 +1869,7 @@ const En = {
1867
1869
  "button",
1868
1870
  {
1869
1871
  type: "button",
1870
- onClick: () => _(!1),
1872
+ onClick: () => R(!1),
1871
1873
  style: {
1872
1874
  background: "none",
1873
1875
  border: "none",
@@ -1880,11 +1882,11 @@ const En = {
1880
1882
  borderRadius: 6,
1881
1883
  transition: "background 0.15s"
1882
1884
  },
1883
- onMouseEnter: (l) => {
1884
- l.currentTarget.style.background = "var(--grey-light, #e9e8e8a1)";
1885
+ onMouseEnter: (o) => {
1886
+ o.currentTarget.style.background = "var(--grey-light, #e9e8e8a1)";
1885
1887
  },
1886
- onMouseLeave: (l) => {
1887
- l.currentTarget.style.background = "none";
1888
+ onMouseLeave: (o) => {
1889
+ o.currentTarget.style.background = "none";
1888
1890
  },
1889
1891
  children: "Cancel"
1890
1892
  }
@@ -1892,7 +1894,7 @@ const En = {
1892
1894
  ]
1893
1895
  }
1894
1896
  ),
1895
- y && s && !b && !L && /* @__PURE__ */ n(
1897
+ y && l && !b && !L && /* @__PURE__ */ n(
1896
1898
  "button",
1897
1899
  {
1898
1900
  type: "button",
@@ -1915,7 +1917,7 @@ const En = {
1915
1917
  transition: "color 0.15s"
1916
1918
  },
1917
1919
  children: [
1918
- /* @__PURE__ */ e(vn, { size: 20, color: "var(--Grey-Muted, #808183)", strokeWidth: 1.5 }),
1920
+ /* @__PURE__ */ e(xn, { size: 20, color: "var(--Grey-Muted, #808183)", strokeWidth: 1.5 }),
1919
1921
  "Reply"
1920
1922
  ]
1921
1923
  }
@@ -1963,7 +1965,7 @@ const En = {
1963
1965
  children: [
1964
1966
  "“",
1965
1967
  " ",
1966
- ((U = t.author) == null ? void 0 : U.name) || "Unknown"
1968
+ (($ = t.author) == null ? void 0 : $.name) || "Unknown"
1967
1969
  ]
1968
1970
  }
1969
1971
  ),
@@ -1983,7 +1985,7 @@ const En = {
1983
1985
  cursor: "pointer",
1984
1986
  padding: 0
1985
1987
  },
1986
- children: /* @__PURE__ */ e(lt, { size: 20, color: "var(--Grey-Muted, #808183)" })
1988
+ children: /* @__PURE__ */ e(ot, { size: 20, color: "var(--Grey-Muted, #808183)" })
1987
1989
  }
1988
1990
  )
1989
1991
  ]
@@ -2037,14 +2039,14 @@ const En = {
2037
2039
  {
2038
2040
  ref: u,
2039
2041
  value: C,
2040
- onChange: (l) => z(l.target.value),
2041
- onKeyDown: (l) => {
2042
- if (l.key === "Enter") {
2043
- if (l.metaKey || l.ctrlKey || l.shiftKey)
2042
+ onChange: (o) => z(o.target.value),
2043
+ onKeyDown: (o) => {
2044
+ if (o.key === "Enter") {
2045
+ if (o.metaKey || o.ctrlKey || o.shiftKey)
2044
2046
  return;
2045
- l.preventDefault(), C.trim() && (o == null || o({ content: C.trim(), parentId: t.id }), z(""), w(!1));
2047
+ o.preventDefault(), C.trim() && (a == null || a({ content: C.trim(), parentId: t.id }), z(""), w(!1));
2046
2048
  }
2047
- l.key === "Escape" && (z(""), w(!1));
2049
+ o.key === "Escape" && (z(""), w(!1));
2048
2050
  },
2049
2051
  autoFocus: !0,
2050
2052
  placeholder: "Add a reply",
@@ -2073,7 +2075,7 @@ const En = {
2073
2075
  {
2074
2076
  type: "button",
2075
2077
  onClick: () => {
2076
- C.trim() && (o == null || o({ content: C.trim(), parentId: t.id }), z(""), w(!1));
2078
+ C.trim() && (a == null || a({ content: C.trim(), parentId: t.id }), z(""), w(!1));
2077
2079
  },
2078
2080
  disabled: !C.trim(),
2079
2081
  style: {
@@ -2106,29 +2108,29 @@ const En = {
2106
2108
  ]
2107
2109
  }
2108
2110
  );
2109
- }, Vn = ({ currentUser: t, onSubmit: r }) => {
2110
- const [i, s] = D(""), [o, d] = D(!1), g = N(null);
2111
- _e(() => {
2112
- const a = g.current;
2113
- if (!a)
2111
+ }, qn = ({ currentUser: t, onSubmit: r }) => {
2112
+ const [i, l] = D(""), [a, d] = D(!1), g = N(null);
2113
+ Ae(() => {
2114
+ const s = g.current;
2115
+ if (!s)
2114
2116
  return;
2115
- a.style.height = "auto";
2117
+ s.style.height = "auto";
2116
2118
  const b = 140;
2117
- a.style.height = Math.min(a.scrollHeight, b) + "px", a.style.overflowY = a.scrollHeight > b ? "auto" : "hidden";
2119
+ s.style.height = Math.min(s.scrollHeight, b) + "px", s.style.overflowY = s.scrollHeight > b ? "auto" : "hidden";
2118
2120
  }, [i]);
2119
2121
  const p = () => {
2120
- const a = i.trim();
2121
- a && (r == null || r(a), s(""));
2122
- }, y = (a) => {
2123
- if (a.key === "Enter") {
2124
- if (a.metaKey || a.ctrlKey || a.shiftKey)
2122
+ const s = i.trim();
2123
+ s && (r == null || r(s), l(""));
2124
+ }, y = (s) => {
2125
+ if (s.key === "Enter") {
2126
+ if (s.metaKey || s.ctrlKey || s.shiftKey)
2125
2127
  return;
2126
- a.preventDefault(), p();
2128
+ s.preventDefault(), p();
2127
2129
  }
2128
- }, W = (t == null ? void 0 : t.initials) || Ce(t == null ? void 0 : t.name), x = Wt(t), I = t == null ? void 0 : t.avatar;
2130
+ }, W = (t == null ? void 0 : t.initials) || Ce(t == null ? void 0 : t.name), x = It(t), I = t == null ? void 0 : t.avatar;
2129
2131
  return /* @__PURE__ */ n("div", { style: { display: "flex", gap: 16, alignItems: "flex-start" }, children: [
2130
2132
  /* @__PURE__ */ e(
2131
- It,
2133
+ Dt,
2132
2134
  {
2133
2135
  name: t == null ? void 0 : t.name,
2134
2136
  initials: W,
@@ -2148,7 +2150,7 @@ const En = {
2148
2150
  alignItems: "flex-start",
2149
2151
  gap: 24,
2150
2152
  borderRadius: 8,
2151
- border: o ? "1px solid var(--Grey-Strong, #2E3236)" : "1px solid var(--Grey-absent, #D9D9D9)",
2153
+ border: a ? "1px solid var(--Grey-Strong, #2E3236)" : "1px solid var(--Grey-absent, #D9D9D9)",
2152
2154
  background: "var(--Grey-White, #FFF)",
2153
2155
  transition: "border-color 0.15s"
2154
2156
  },
@@ -2167,7 +2169,7 @@ const En = {
2167
2169
  {
2168
2170
  ref: g,
2169
2171
  value: i,
2170
- onChange: (a) => s(a.target.value),
2172
+ onChange: (s) => l(s.target.value),
2171
2173
  onFocus: () => d(!0),
2172
2174
  onBlur: () => d(!1),
2173
2175
  onKeyDown: y,
@@ -2223,17 +2225,17 @@ const En = {
2223
2225
  }
2224
2226
  )
2225
2227
  ] });
2226
- }, Dt = ({ comment: t, depth: r = 0, isConsecutive: i = !1, onReply: s, onSendReply: o, onEdit: d, onDelete: g, onMenuClick: p }) => {
2228
+ }, zt = ({ comment: t, depth: r = 0, isConsecutive: i = !1, onReply: l, onSendReply: a, onEdit: d, onDelete: g, onMenuClick: p }) => {
2227
2229
  const y = t.replies && t.replies.length > 0, W = !y;
2228
2230
  return /* @__PURE__ */ n(ce.Fragment, { children: [
2229
2231
  /* @__PURE__ */ e("div", { style: { paddingLeft: r > 0 ? Math.min(r * 32, 128) : 0 }, children: /* @__PURE__ */ e(
2230
- Kn,
2232
+ Vn,
2231
2233
  {
2232
2234
  comment: t,
2233
2235
  isReply: r > 0,
2234
2236
  isConsecutive: i,
2235
- onReply: s,
2236
- onSendReply: o,
2237
+ onReply: l,
2238
+ onSendReply: a,
2237
2239
  onEdit: d,
2238
2240
  onDelete: g,
2239
2241
  onMenuClick: p,
@@ -2241,12 +2243,12 @@ const En = {
2241
2243
  }
2242
2244
  ) }),
2243
2245
  y && t.replies.map((x) => /* @__PURE__ */ e(
2244
- Dt,
2246
+ zt,
2245
2247
  {
2246
2248
  comment: x,
2247
2249
  depth: r + 1,
2248
- onReply: s,
2249
- onSendReply: o,
2250
+ onReply: l,
2251
+ onSendReply: a,
2250
2252
  onEdit: d,
2251
2253
  onDelete: g,
2252
2254
  onMenuClick: p
@@ -2254,12 +2256,12 @@ const En = {
2254
2256
  x.id
2255
2257
  ))
2256
2258
  ] });
2257
- }, qn = ({
2259
+ }, Zn = ({
2258
2260
  comments: t = [],
2259
2261
  totalComments: r,
2260
2262
  children: i,
2261
- onSendComment: s,
2262
- onReply: o,
2263
+ onSendComment: l,
2264
+ onReply: a,
2263
2265
  onSendReply: d,
2264
2266
  onEdit: g,
2265
2267
  onDelete: p,
@@ -2268,18 +2270,18 @@ const En = {
2268
2270
  currentUser: x,
2269
2271
  isResolved: I = !1
2270
2272
  }) => {
2271
- const [a, b] = D([]), [w, C] = D(!1), z = He(() => {
2272
- const u = new Set(t.map((c) => c.id)), m = a.filter((c) => !u.has(c.id));
2273
+ const [s, b] = D([]), [w, C] = D(!1), z = Te(() => {
2274
+ const u = new Set(t.map((c) => c.id)), m = s.filter((c) => !u.has(c.id));
2273
2275
  return [...t, ...m];
2274
- }, [t, a]);
2276
+ }, [t, s]);
2275
2277
  ce.useEffect(() => {
2276
2278
  const u = new Set(t.map((m) => m.id));
2277
2279
  b((m) => m.filter((c) => !u.has(c.id)));
2278
2280
  }, [t]);
2279
- const T = He(() => {
2281
+ const T = Te(() => {
2280
2282
  if (!x)
2281
2283
  return { name: "You", initials: "YO", color: "#6B7C93" };
2282
- const u = x.name || "You", m = x.initials || Ce(u), c = Wt(x);
2284
+ const u = x.name || "You", m = x.initials || Ce(u), c = It(x);
2283
2285
  return { ...x, name: u, initials: m, color: c };
2284
2286
  }, [x]), S = async ({ content: u, parentId: m }) => {
2285
2287
  if (d) {
@@ -2301,10 +2303,10 @@ const En = {
2301
2303
  b((B) => [...B, c]);
2302
2304
  }
2303
2305
  }, F = async (u) => {
2304
- if (s) {
2306
+ if (l) {
2305
2307
  C(!0);
2306
2308
  try {
2307
- await s(u);
2309
+ await l(u);
2308
2310
  } finally {
2309
2311
  C(!1);
2310
2312
  }
@@ -2318,13 +2320,13 @@ const En = {
2318
2320
  };
2319
2321
  b((c) => [...c, m]);
2320
2322
  }
2321
- }, E = (u) => {
2323
+ }, H = (u) => {
2322
2324
  b(
2323
2325
  (m) => m.map((c) => c.id === u.id ? { ...c, content: u.content, isEdited: !0 } : c)
2324
2326
  ), g == null || g(u);
2325
2327
  }, L = (u) => {
2326
2328
  b((m) => m.filter((c) => c.id !== u.id)), p == null || p(u);
2327
- }, _ = He(() => {
2329
+ }, R = Te(() => {
2328
2330
  const u = {};
2329
2331
  z.forEach((c) => {
2330
2332
  c.parentId && (u[c.parentId] || (u[c.parentId] = []), u[c.parentId].push(c));
@@ -2458,7 +2460,7 @@ const En = {
2458
2460
  flexShrink: 0
2459
2461
  },
2460
2462
  children: [
2461
- /* @__PURE__ */ e(un, { size: 16, color: "var(--Grey-Strong, #2E3236)", strokeWidth: 2 }),
2463
+ /* @__PURE__ */ e(yn, { size: 16, color: "var(--Grey-Strong, #2E3236)", strokeWidth: 2 }),
2462
2464
  /* @__PURE__ */ e(
2463
2465
  "span",
2464
2466
  {
@@ -2497,7 +2499,7 @@ const En = {
2497
2499
  flexShrink: 0
2498
2500
  },
2499
2501
  children: [
2500
- /* @__PURE__ */ e(yn, { size: 16, color: "var(--Grey-Strong, #2E3236)", strokeWidth: 1.5 }),
2502
+ /* @__PURE__ */ e(mn, { size: 16, color: "var(--Grey-Strong, #2E3236)", strokeWidth: 1.5 }),
2501
2503
  "Mark as Resolved"
2502
2504
  ]
2503
2505
  }
@@ -2516,18 +2518,18 @@ const En = {
2516
2518
  maxHeight: 600,
2517
2519
  overflowY: z.length > 6 ? "auto" : "visible"
2518
2520
  },
2519
- children: _.map((u, m) => {
2520
- var R, X;
2521
- const c = m > 0 ? _[m - 1] : null, B = ((R = c == null ? void 0 : c.author) == null ? void 0 : R.name) || (c == null ? void 0 : c.author_name), J = ((X = u.author) == null ? void 0 : X.name) || u.author_name, ie = c && B === J && (!c.replies || c.replies.length === 0);
2521
+ children: R.map((u, m) => {
2522
+ var U, _;
2523
+ const c = m > 0 ? R[m - 1] : null, B = ((U = c == null ? void 0 : c.author) == null ? void 0 : U.name) || (c == null ? void 0 : c.author_name), J = ((_ = u.author) == null ? void 0 : _.name) || u.author_name, X = c && B === J && (!c.replies || c.replies.length === 0);
2522
2524
  return /* @__PURE__ */ e(
2523
- Dt,
2525
+ zt,
2524
2526
  {
2525
2527
  comment: u,
2526
2528
  depth: 0,
2527
- isConsecutive: !!ie,
2528
- onReply: o,
2529
+ isConsecutive: !!X,
2530
+ onReply: a,
2529
2531
  onSendReply: S,
2530
- onEdit: E,
2532
+ onEdit: H,
2531
2533
  onDelete: L,
2532
2534
  onMenuClick: y
2533
2535
  },
@@ -2547,7 +2549,7 @@ const En = {
2547
2549
  marginLeft: 48
2548
2550
  },
2549
2551
  children: [
2550
- /* @__PURE__ */ e(Ct, { size: 16, color: "var(--Grey-Muted, #808183)" }),
2552
+ /* @__PURE__ */ e(Ft, { size: 16, color: "var(--Grey-Muted, #808183)" }),
2551
2553
  /* @__PURE__ */ e(
2552
2554
  "span",
2553
2555
  {
@@ -2602,7 +2604,7 @@ const En = {
2602
2604
  ]
2603
2605
  }
2604
2606
  ),
2605
- /* @__PURE__ */ e(Vn, { currentUser: T, onSubmit: F })
2607
+ /* @__PURE__ */ e(qn, { currentUser: T, onSubmit: F })
2606
2608
  ] }),
2607
2609
  /* @__PURE__ */ e(
2608
2610
  "div",
@@ -2620,12 +2622,12 @@ const En = {
2620
2622
  ]
2621
2623
  }
2622
2624
  );
2623
- }, ut = ({ children: t, size: r = 28, onClick: i, title: s }) => {
2624
- const [o, d] = D(!1);
2625
+ }, yt = ({ children: t, size: r = 28, onClick: i, title: l }) => {
2626
+ const [a, d] = D(!1);
2625
2627
  return /* @__PURE__ */ e(
2626
2628
  "div",
2627
2629
  {
2628
- title: s,
2630
+ title: l,
2629
2631
  onClick: i,
2630
2632
  onMouseEnter: () => d(!0),
2631
2633
  onMouseLeave: () => d(!1),
@@ -2636,7 +2638,7 @@ const En = {
2636
2638
  width: r,
2637
2639
  height: r,
2638
2640
  borderRadius: 9999,
2639
- background: o ? "var(--surface-hover, #F3F7F7)" : "transparent",
2641
+ background: a ? "var(--surface-hover, #F3F7F7)" : "transparent",
2640
2642
  cursor: "pointer",
2641
2643
  flexShrink: 0,
2642
2644
  transition: "background 0.15s"
@@ -2644,15 +2646,15 @@ const En = {
2644
2646
  children: t
2645
2647
  }
2646
2648
  );
2647
- }, Zn = (t) => {
2649
+ }, Qn = (t) => {
2648
2650
  const r = Math.floor(t / 6e4), i = Math.floor(t % 6e4 / 1e3);
2649
2651
  return `${r.toString().padStart(2, "0")}:${i.toString().padStart(2, "0")}`;
2650
- }, Qn = ({ item: t, isLast: r, onPlayEvidence: i, onShowInTranscript: s, timelinePlaying: o, currentTimeSeconds: d }) => {
2651
- var a;
2652
- const g = (a = t.signal_refs) == null ? void 0 : a.map((b) => {
2652
+ }, Jn = ({ item: t, isLast: r, onPlayEvidence: i, onShowInTranscript: l, timelinePlaying: a, currentTimeSeconds: d }) => {
2653
+ var s;
2654
+ const g = (s = t.signal_refs) == null ? void 0 : s.map((b) => {
2653
2655
  const w = b.display_name || b.signal_key || "", C = b.confidence != null ? ` (${Math.round(b.confidence * 100)}%)` : "";
2654
2656
  return w + C;
2655
- }).join(", "), p = t.start_ms ?? t.startMs, y = t.end_ms ?? t.endMs, W = p != null, x = (d ?? 0) * 1e3, I = o && W && x >= p && x <= (y ?? p + 5e3);
2657
+ }).join(", "), p = t.start_ms ?? t.startMs, y = t.end_ms ?? t.endMs, W = p != null, x = (d ?? 0) * 1e3, I = a && W && x >= p && x <= (y ?? p + 5e3);
2656
2658
  return /* @__PURE__ */ n(
2657
2659
  "div",
2658
2660
  {
@@ -2712,7 +2714,7 @@ const En = {
2712
2714
  },
2713
2715
  children: [
2714
2716
  /* @__PURE__ */ e(
2715
- ut,
2717
+ yt,
2716
2718
  {
2717
2719
  size: 28,
2718
2720
  title: I ? "Pause" : "Play evidence",
@@ -2721,14 +2723,14 @@ const En = {
2721
2723
  end_ms: y
2722
2724
  }),
2723
2725
  children: I ? /* @__PURE__ */ e(
2724
- kt,
2726
+ wt,
2725
2727
  {
2726
2728
  size: 17,
2727
2729
  color: "var(--Grey-Strong, #2E3236)",
2728
2730
  strokeWidth: 1
2729
2731
  }
2730
2732
  ) : /* @__PURE__ */ e(
2731
- wt,
2733
+ Ct,
2732
2734
  {
2733
2735
  size: 17,
2734
2736
  color: "var(--Grey-Muted, #808183)",
@@ -2738,12 +2740,12 @@ const En = {
2738
2740
  }
2739
2741
  ),
2740
2742
  /* @__PURE__ */ e(
2741
- ut,
2743
+ yt,
2742
2744
  {
2743
2745
  size: 28,
2744
2746
  title: "Show in transcript",
2745
- onClick: () => s == null ? void 0 : s(p),
2746
- children: /* @__PURE__ */ e(St, { size: 16, color: "#808183", strokeWidth: 1.5 })
2747
+ onClick: () => l == null ? void 0 : l(p),
2748
+ children: /* @__PURE__ */ e(kt, { size: 16, color: "#808183", strokeWidth: 1.5 })
2747
2749
  }
2748
2750
  ),
2749
2751
  /* @__PURE__ */ e(
@@ -2756,7 +2758,7 @@ const En = {
2756
2758
  lineHeight: 1.2,
2757
2759
  whiteSpace: "nowrap"
2758
2760
  },
2759
- children: Zn(p)
2761
+ children: Qn(p)
2760
2762
  }
2761
2763
  )
2762
2764
  ]
@@ -2768,12 +2770,12 @@ const En = {
2768
2770
  ]
2769
2771
  }
2770
2772
  );
2771
- }, Jn = ({
2773
+ }, Xn = ({
2772
2774
  items: t = [],
2773
2775
  guidanceCount: r,
2774
2776
  loading: i = !1,
2775
- onPlayEvidence: s,
2776
- onShowInTranscript: o,
2777
+ onPlayEvidence: l,
2778
+ onShowInTranscript: a,
2777
2779
  timelinePlaying: d = !1,
2778
2780
  currentTimeSeconds: g = 0
2779
2781
  }) => {
@@ -2813,7 +2815,7 @@ const En = {
2813
2815
  flexShrink: 0
2814
2816
  },
2815
2817
  children: /* @__PURE__ */ e(
2816
- yt,
2818
+ mt,
2817
2819
  {
2818
2820
  style: { width: 20, height: 20, flexShrink: 0 },
2819
2821
  color: "var(--Grey-Strong, #2E3236)",
@@ -2855,12 +2857,12 @@ const En = {
2855
2857
  }
2856
2858
  ),
2857
2859
  t.map((y, W) => /* @__PURE__ */ e(
2858
- Qn,
2860
+ Jn,
2859
2861
  {
2860
2862
  item: y,
2861
2863
  isLast: W === t.length - 1,
2862
- onPlayEvidence: s,
2863
- onShowInTranscript: o,
2864
+ onPlayEvidence: l,
2865
+ onShowInTranscript: a,
2864
2866
  timelinePlaying: d,
2865
2867
  currentTimeSeconds: g
2866
2868
  },
@@ -2869,24 +2871,24 @@ const En = {
2869
2871
  ]
2870
2872
  }
2871
2873
  );
2872
- }, oe = ({ text: t, children: r }) => {
2873
- const [i, s] = D(!1), o = N(null), [d, g] = D({ top: 0, left: 0 });
2874
+ }, le = ({ text: t, children: r }) => {
2875
+ const [i, l] = D(!1), a = N(null), [d, g] = D({ top: 0, left: 0 });
2874
2876
  return t ? /* @__PURE__ */ n(
2875
2877
  "div",
2876
2878
  {
2877
- ref: o,
2879
+ ref: a,
2878
2880
  style: { position: "relative", display: "inline-flex" },
2879
2881
  onMouseEnter: () => {
2880
- if (o.current) {
2881
- const y = o.current.getBoundingClientRect();
2882
+ if (a.current) {
2883
+ const y = a.current.getBoundingClientRect();
2882
2884
  g({
2883
2885
  top: y.bottom + 6,
2884
2886
  left: y.left + y.width / 2
2885
2887
  });
2886
2888
  }
2887
- s(!0);
2889
+ l(!0);
2888
2890
  },
2889
- onMouseLeave: () => s(!1),
2891
+ onMouseLeave: () => l(!1),
2890
2892
  children: [
2891
2893
  r,
2892
2894
  i && /* @__PURE__ */ e("div", { style: {
@@ -2912,18 +2914,26 @@ const En = {
2912
2914
  ]
2913
2915
  }
2914
2916
  ) : r;
2915
- }, Xn = [
2917
+ }, Un = [
2916
2918
  { key: "overview", label: "Overview" },
2917
2919
  { key: "coaching", label: "Coaching Summary" },
2918
2920
  { key: "signals", label: "Signals & Recording" },
2919
2921
  { key: "comments", label: "Feedback" }
2920
- ], oi = ({
2922
+ ];
2923
+ function ei(t, r) {
2924
+ const i = (t == null ? void 0 : t.direction) ?? (t == null ? void 0 : t.interaction_direction) ?? (t == null ? void 0 : t.call_direction) ?? r;
2925
+ if (i == null || i === "")
2926
+ return null;
2927
+ const l = String(i).toLowerCase().trim();
2928
+ return l === "outbound" || l.startsWith("outbound") ? "outbound" : l === "inbound" || l.startsWith("inbound") ? "inbound" : null;
2929
+ }
2930
+ const si = ({
2921
2931
  title: t = "Wheel Stud Replacement Enquiry",
2922
2932
  onBack: r,
2923
2933
  // Data props — all optional with defaults for demo
2924
2934
  data: i,
2925
- coachingData: s,
2926
- coachingLoading: o = !1,
2935
+ coachingData: l,
2936
+ coachingLoading: a = !1,
2927
2937
  audioUrl: d,
2928
2938
  // Audio/playback props — pass these when the host app manages audio externally
2929
2939
  // (like InteractionDetailPanel does). If omitted, UpdatedInteractionRecording
@@ -2934,7 +2944,7 @@ const En = {
2934
2944
  playbackRate: W,
2935
2945
  timelineSegments: x,
2936
2946
  onSeek: I,
2937
- onTogglePlay: a,
2947
+ onTogglePlay: s,
2938
2948
  onSeekBack: b,
2939
2949
  onSeekForward: w,
2940
2950
  onSetPlaybackRate: C,
@@ -2944,9 +2954,9 @@ const En = {
2944
2954
  customerName: S,
2945
2955
  customerFullName: F,
2946
2956
  // Transcript props — pass real transcript data from the host app
2947
- transcript: E,
2957
+ transcript: H,
2948
2958
  activeTurnIndex: L,
2949
- turnObservations: _,
2959
+ turnObservations: R,
2950
2960
  highlightedTurns: O,
2951
2961
  onTurnPlayPause: u,
2952
2962
  // Signal evidence playback — host app can provide to play audio segments from signals
@@ -2955,112 +2965,112 @@ const En = {
2955
2965
  // Context props — pass from host app to override block-derived defaults
2956
2966
  callPurpose: B,
2957
2967
  classification: J,
2958
- outcomeQuality: ie,
2968
+ outcomeQuality: X,
2959
2969
  // Context "More Details" expandable section
2960
- resolutionOutcome: R,
2961
- customerIntent: X,
2962
- location: ee,
2963
- interactionId: ae,
2964
- moreDetails: q,
2970
+ resolutionOutcome: U,
2971
+ customerIntent: _,
2972
+ location: ne,
2973
+ interactionId: ie,
2974
+ moreDetails: Z,
2965
2975
  // Compass score props
2966
- compassScore: fe,
2976
+ compassScore: ae,
2967
2977
  // gauge meter value — compass_score, range 0.5-5
2968
- compassMaxScore: h = 5,
2969
- predictedCsat: $,
2978
+ compassMaxScore: fe = 5,
2979
+ predictedCsat: h,
2970
2980
  // predicted objective number (e.g. compass_score) — shown as "03" top-right
2971
- predictedLabel: U = "Predicted Objective",
2972
- compassLegends: l,
2981
+ predictedLabel: $ = "Predicted Objective",
2982
+ compassLegends: o,
2973
2983
  // Customer session history drawer
2974
- customerSessions: Z,
2975
- customerSessionCount: zt,
2976
- onSessionClick: Ae,
2977
- onViewAllSessions: Le,
2984
+ customerSessions: Q,
2985
+ customerSessionCount: Gt,
2986
+ onSessionClick: Le,
2987
+ onViewAllSessions: Be,
2978
2988
  // Footer navigation
2979
- prevSessionDesc: Be,
2980
- prevSessionDisabled: te = !1,
2981
- nextSessionDesc: je,
2982
- nextSessionDisabled: ne = !1,
2989
+ prevSessionDesc: je,
2990
+ prevSessionDisabled: ee = !1,
2991
+ nextSessionDesc: Ne,
2992
+ nextSessionDisabled: te = !1,
2983
2993
  onPreviousSession: ye,
2984
2994
  onNextSession: me,
2985
2995
  // Comments
2986
- comments: Ne = [],
2987
- guidance: Gt = [],
2996
+ comments: Oe = [],
2997
+ guidance: Mt = [],
2988
2998
  currentUser: j,
2989
- onSendComment: Mt,
2990
- onSendReply: Et,
2991
- onReply: Ht,
2992
- onEdit: Tt,
2999
+ onSendComment: Et,
3000
+ onSendReply: Ht,
3001
+ onReply: Tt,
3002
+ onEdit: _t,
2993
3003
  onEditInteraction: Rt,
2994
- onDelete: _t,
2995
- onMenuClick: At,
2996
- onMarkResolved: Lt,
2997
- commentsResolved: Bt
3004
+ onDelete: At,
3005
+ onMenuClick: Lt,
3006
+ onMarkResolved: Bt,
3007
+ commentsResolved: jt
2998
3008
  }) => {
2999
3009
  var nt;
3000
- const [Fe, ve] = D("overview"), [jt, Oe] = D(/* @__PURE__ */ new Set()), [Nt, xe] = D(!1), [Ot, $e] = D(null), [Pe, Ye] = D(!1), [Ke, $t] = D(0), [Ve, Pt] = D(!1), re = N(null), be = N(null), We = N(null), ge = N(null), Ie = N(null), Yt = { overview: be, coaching: We, signals: ge, comments: Ie }, he = N(null), De = N(!1);
3001
- _e(() => {
3010
+ const [Fe, ve] = D("overview"), [Nt, $e] = D(/* @__PURE__ */ new Set()), [Ot, xe] = D(!1), [$t, Pe] = D(null), [Ye, Ke] = D(!1), [Ve, Pt] = D(0), [qe, Yt] = D(!1), re = N(null), be = N(null), We = N(null), ge = N(null), Ie = N(null), Kt = { overview: be, coaching: We, signals: ge, comments: Ie }, he = N(null), De = N(!1);
3011
+ Ae(() => {
3002
3012
  const f = he.current;
3003
3013
  if (!f)
3004
3014
  return;
3005
- const G = ["overview", "coaching", "signals", "comments"], v = [be, We, ge, Ie], H = ((V) => {
3006
- let le = V.parentElement;
3007
- for (; le; ) {
3008
- const { overflow: we, overflowY: de } = window.getComputedStyle(le);
3015
+ const G = ["overview", "coaching", "signals", "comments"], v = [be, We, ge, Ie], M = ((q) => {
3016
+ let oe = q.parentElement;
3017
+ for (; oe; ) {
3018
+ const { overflow: we, overflowY: de } = window.getComputedStyle(oe);
3009
3019
  if (/(auto|scroll)/.test(we + de))
3010
- return le;
3011
- le = le.parentElement;
3020
+ return oe;
3021
+ oe = oe.parentElement;
3012
3022
  }
3013
3023
  return null;
3014
- })(f), Q = () => {
3024
+ })(f), V = () => {
3015
3025
  var we;
3016
3026
  if (De.current)
3017
3027
  return;
3018
- let V = G[0];
3028
+ let q = G[0];
3019
3029
  for (let de = v.length - 1; de >= 0; de--) {
3020
3030
  const it = v[de].current;
3021
3031
  if (!it)
3022
3032
  continue;
3023
3033
  if (it.getBoundingClientRect().top <= 150) {
3024
- V = G[de];
3034
+ q = G[de];
3025
3035
  break;
3026
3036
  }
3027
3037
  }
3028
- ve(V);
3029
- const le = ((we = be.current) == null ? void 0 : we.getBoundingClientRect().top) ?? Number.POSITIVE_INFINITY;
3030
- Pt(le <= 150);
3038
+ ve(q);
3039
+ const oe = ((we = be.current) == null ? void 0 : we.getBoundingClientRect().top) ?? Number.POSITIVE_INFINITY;
3040
+ Yt(oe <= 150);
3031
3041
  };
3032
- return f.addEventListener("scroll", Q, { passive: !0 }), H && H !== f && H.addEventListener("scroll", Q, { passive: !0 }), window.addEventListener("scroll", Q, { passive: !0, capture: !0 }), Q(), () => {
3033
- f.removeEventListener("scroll", Q), H && H !== f && H.removeEventListener("scroll", Q), window.removeEventListener("scroll", Q, { capture: !0 });
3042
+ return f.addEventListener("scroll", V, { passive: !0 }), M && M !== f && M.addEventListener("scroll", V, { passive: !0 }), window.addEventListener("scroll", V, { passive: !0, capture: !0 }), V(), () => {
3043
+ f.removeEventListener("scroll", V), M && M !== f && M.removeEventListener("scroll", V), window.removeEventListener("scroll", V, { capture: !0 });
3034
3044
  };
3035
3045
  }, []);
3036
- const qe = N(null), Kt = (f) => {
3046
+ const Ze = N(null), Vt = (f) => {
3037
3047
  var v;
3038
- ve(f), De.current = !0, qe.current = f;
3039
- const G = (v = Yt[f]) == null ? void 0 : v.current;
3048
+ ve(f), De.current = !0, Ze.current = f;
3049
+ const G = (v = Kt[f]) == null ? void 0 : v.current;
3040
3050
  if (G) {
3041
3051
  const k = he.current;
3042
3052
  if (k && k.scrollHeight > k.clientHeight) {
3043
- const H = k.getBoundingClientRect().top, V = G.getBoundingClientRect().top - H + k.scrollTop - 16;
3044
- k.scrollTo({ top: V, behavior: "smooth" });
3053
+ const M = k.getBoundingClientRect().top, q = G.getBoundingClientRect().top - M + k.scrollTop - 16;
3054
+ k.scrollTo({ top: q, behavior: "smooth" });
3045
3055
  } else {
3046
- const H = G.getBoundingClientRect().top + window.scrollY - 120;
3047
- window.scrollTo({ top: H, behavior: "smooth" });
3056
+ const M = G.getBoundingClientRect().top + window.scrollY - 120;
3057
+ window.scrollTo({ top: M, behavior: "smooth" });
3048
3058
  }
3049
3059
  }
3050
3060
  setTimeout(() => {
3051
- De.current = !1, qe.current = null;
3061
+ De.current = !1, Ze.current = null;
3052
3062
  }, 1200);
3053
- }, ze = Z || [], Ge = ze.length > 1, Ze = (f) => {
3063
+ }, ze = Q || [], Ge = ze.length > 1, Qe = (f) => {
3054
3064
  ve("signals");
3055
3065
  const G = ge.current;
3056
3066
  if (G) {
3057
3067
  const k = he.current;
3058
3068
  if (k && k.scrollHeight > k.clientHeight) {
3059
- const H = k.getBoundingClientRect().top, V = G.getBoundingClientRect().top - H + k.scrollTop - 16;
3060
- k.scrollTo({ top: V, behavior: "smooth" });
3069
+ const M = k.getBoundingClientRect().top, q = G.getBoundingClientRect().top - M + k.scrollTop - 16;
3070
+ k.scrollTo({ top: q, behavior: "smooth" });
3061
3071
  } else {
3062
- const H = G.getBoundingClientRect().top + window.scrollY - 120;
3063
- window.scrollTo({ top: H, behavior: "smooth" });
3072
+ const M = G.getBoundingClientRect().top + window.scrollY - 120;
3073
+ window.scrollTo({ top: M, behavior: "smooth" });
3064
3074
  }
3065
3075
  }
3066
3076
  const v = f / 1e3;
@@ -3068,43 +3078,43 @@ const En = {
3068
3078
  var k;
3069
3079
  (k = re.current) != null && k.scrollToTranscript && re.current.scrollToTranscript(v);
3070
3080
  }, 220);
3071
- }, Qe = (f) => {
3081
+ }, Je = (f) => {
3072
3082
  ve("signals");
3073
3083
  const G = ge.current;
3074
3084
  if (G) {
3075
3085
  const k = he.current;
3076
3086
  if (k && k.scrollHeight > k.clientHeight) {
3077
- const H = k.getBoundingClientRect().top, V = G.getBoundingClientRect().top - H + k.scrollTop - 16;
3078
- k.scrollTo({ top: V, behavior: "smooth" });
3087
+ const M = k.getBoundingClientRect().top, q = G.getBoundingClientRect().top - M + k.scrollTop - 16;
3088
+ k.scrollTo({ top: q, behavior: "smooth" });
3079
3089
  } else {
3080
- const H = G.getBoundingClientRect().top + window.scrollY - 120;
3081
- window.scrollTo({ top: H, behavior: "smooth" });
3090
+ const M = G.getBoundingClientRect().top + window.scrollY - 120;
3091
+ window.scrollTo({ top: M, behavior: "smooth" });
3082
3092
  }
3083
3093
  }
3084
3094
  const v = (f == null ? void 0 : f.start_ms) ?? (f == null ? void 0 : f.startMs);
3085
3095
  setTimeout(() => {
3086
- var k, H;
3096
+ var k, M;
3087
3097
  if (v != null && ((k = re.current) != null && k.scrollToTranscript) && re.current.scrollToTranscript(v / 1e3), m)
3088
3098
  m(f);
3089
- else if (v != null && ((H = re.current) != null && H.seekTo)) {
3090
- re.current.seekTo(v / 1e3), Ye(!0), $t(v / 1e3);
3091
- const V = (f.end_ms ?? f.endMs ?? v + 5e3) - v;
3092
- setTimeout(() => Ye(!1), V);
3099
+ else if (v != null && ((M = re.current) != null && M.seekTo)) {
3100
+ re.current.seekTo(v / 1e3), Ke(!0), Pt(v / 1e3);
3101
+ const q = (f.end_ms ?? f.endMs ?? v + 5e3) - v;
3102
+ setTimeout(() => Ke(!1), q);
3093
3103
  }
3094
3104
  }, 220);
3095
- }, Vt = (f) => {
3096
- c && c(f);
3097
3105
  }, qt = (f) => {
3098
- Oe((G) => {
3106
+ c && c(f);
3107
+ }, Zt = (f) => {
3108
+ $e((G) => {
3099
3109
  const v = new Set(G);
3100
3110
  return v.has(f) ? v.delete(f) : v.add(f), v;
3101
3111
  });
3102
- }, Zt = (i == null ? void 0 : i.blocks) || [], pe = (f) => {
3112
+ }, Qt = (i == null ? void 0 : i.blocks) || [], pe = (f) => {
3103
3113
  var G;
3104
- return ((G = Zt.find((v) => v.block_id === f)) == null ? void 0 : G.payload) || {};
3105
- }, K = pe("interaction-metadata"), se = pe("interaction-context"), Se = pe("interaction-signals"), Qt = pe("interaction-outcome-lift"), Jt = pe("interaction-dimensions").dimensions || [], Xt = se.call_purpose || {}, Ut = se.classification || {}, Je = K || {}, Xe = B || Xt || {}, en = J || Ut || {}, Ue = Qt || {}, tn = (Ue.driver_signal_keys || []).map((f) => f.replace(/^sig\./, "").replace(/_/g, " ")), nn = s || null, rn = (nt = Se == null ? void 0 : Se.signals) != null && nt.length ? Se : { present_count: 0, total_signals_evaluated: 0, signals: [] }, et = Gt || [], Me = z || K.agent_name || K.agent || se.agent_name || "Agent", ln = T || K.agent_full_name || K.agent_name || Me, ue = S || K.customer_name || K.customer || se.customer_name || "Customer", tt = F || K.customer_full_name || K.customer_name || ue, on = String(
3114
+ return ((G = Qt.find((v) => v.block_id === f)) == null ? void 0 : G.payload) || {};
3115
+ }, K = pe("interaction-metadata"), se = pe("interaction-context"), Se = pe("interaction-signals"), Jt = pe("interaction-outcome-lift"), Xt = pe("interaction-dimensions").dimensions || [], Ut = se.call_purpose || {}, en = se.classification || {}, Xe = K || {}, Me = B || Ut || {}, tn = J || en || {}, Ue = Jt || {}, nn = (Ue.driver_signal_keys || []).map((f) => f.replace(/^sig\./, "").replace(/_/g, " ")), rn = l || null, on = (nt = Se == null ? void 0 : Se.signals) != null && nt.length ? Se : { present_count: 0, total_signals_evaluated: 0, signals: [] }, et = Mt || [], Ee = z || K.agent_name || K.agent || se.agent_name || "Agent", ln = T || K.agent_full_name || K.agent_name || Ee, ue = S || K.customer_name || K.customer || se.customer_name || "Customer", tt = F || K.customer_full_name || K.customer_name || ue, an = String(
3106
3116
  (j == null ? void 0 : j.role) ?? (j == null ? void 0 : j.userRole) ?? (j == null ? void 0 : j.user_role) ?? (j == null ? void 0 : j.roleName) ?? (j == null ? void 0 : j.role_name) ?? ""
3107
- ).toLowerCase(), an = /(admin|superadmin|administrator)/.test(on), Ee = zt ?? ze.length, ke = K.created_dt || (i == null ? void 0 : i.created_dt) || se.created_dt || "", sn = ke ? new Date(/Z$|[+-]\d{2}:\d{2}$/.test(ke) ? ke : ke + "Z").toLocaleString() : "", dn = Xe.interaction_direction === "inbound" ? "Inbound" : "Outbound";
3117
+ ).toLowerCase(), sn = /(admin|superadmin|administrator)/.test(an), He = Gt ?? ze.length, ke = K.created_dt || (i == null ? void 0 : i.created_dt) || se.created_dt || "", dn = ke ? new Date(/Z$|[+-]\d{2}:\d{2}$/.test(ke) ? ke : ke + "Z").toLocaleString() : "", cn = Me.interaction_direction === "inbound" ? "Inbound" : "Outbound";
3108
3118
  return /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", width: "100%", height: "100%", background: "var(--Grey-White, #FFF)" }, children: [
3109
3119
  /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 12, padding: "18px 24px 0" }, children: [
3110
3120
  /* @__PURE__ */ e(
@@ -3121,7 +3131,7 @@ const En = {
3121
3131
  padding: 0,
3122
3132
  flexShrink: 0
3123
3133
  },
3124
- children: /* @__PURE__ */ e(Te, { size: 24, color: "var(--Grey-Strong, #2E3236)" })
3134
+ children: /* @__PURE__ */ e(_e, { size: 24, color: "var(--Grey-Strong, #2E3236)" })
3125
3135
  }
3126
3136
  ),
3127
3137
  /* @__PURE__ */ e("div", { style: { width: 1, height: 28, background: "var(--Base-absent, #D9D9D9)" } }),
@@ -3134,12 +3144,12 @@ const En = {
3134
3144
  margin: 0,
3135
3145
  flex: 1
3136
3146
  }, children: t }),
3137
- (ye || me) && !Ve && /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", flexShrink: 0 }, children: [
3138
- /* @__PURE__ */ e(oe, { text: Be, children: /* @__PURE__ */ n(
3147
+ (ye || me) && !qe && /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", flexShrink: 0 }, children: [
3148
+ /* @__PURE__ */ e(le, { text: je, children: /* @__PURE__ */ n(
3139
3149
  "button",
3140
3150
  {
3141
- onClick: te ? void 0 : ye,
3142
- disabled: te,
3151
+ onClick: ee ? void 0 : ye,
3152
+ disabled: ee,
3143
3153
  style: {
3144
3154
  display: "flex",
3145
3155
  alignItems: "center",
@@ -3147,11 +3157,11 @@ const En = {
3147
3157
  padding: "4px 12px",
3148
3158
  background: "none",
3149
3159
  border: "none",
3150
- cursor: te ? "default" : "pointer",
3151
- opacity: te ? 0.4 : 1
3160
+ cursor: ee ? "default" : "pointer",
3161
+ opacity: ee ? 0.4 : 1
3152
3162
  },
3153
3163
  children: [
3154
- /* @__PURE__ */ e(Te, { size: 16, color: "var(--Neutral-800, #323232)", strokeWidth: 1.5 }),
3164
+ /* @__PURE__ */ e(_e, { size: 16, color: "var(--Neutral-800, #323232)", strokeWidth: 1.5 }),
3155
3165
  /* @__PURE__ */ e("span", { style: {
3156
3166
  color: "var(--Neutral-800, #323232)",
3157
3167
  fontSize: 13,
@@ -3169,11 +3179,11 @@ const En = {
3169
3179
  background: "var(--Grey-absent, #D9D9D9)",
3170
3180
  flexShrink: 0
3171
3181
  } }),
3172
- /* @__PURE__ */ e(oe, { text: je, children: /* @__PURE__ */ n(
3182
+ /* @__PURE__ */ e(le, { text: Ne, children: /* @__PURE__ */ n(
3173
3183
  "button",
3174
3184
  {
3175
- onClick: ne ? void 0 : me,
3176
- disabled: ne,
3185
+ onClick: te ? void 0 : me,
3186
+ disabled: te,
3177
3187
  style: {
3178
3188
  display: "flex",
3179
3189
  alignItems: "center",
@@ -3181,8 +3191,8 @@ const En = {
3181
3191
  padding: "4px 12px",
3182
3192
  background: "none",
3183
3193
  border: "none",
3184
- cursor: ne ? "default" : "pointer",
3185
- opacity: ne ? 0.4 : 1
3194
+ cursor: te ? "default" : "pointer",
3195
+ opacity: te ? 0.4 : 1
3186
3196
  },
3187
3197
  children: [
3188
3198
  /* @__PURE__ */ e("span", { style: {
@@ -3193,7 +3203,7 @@ const En = {
3193
3203
  fontFamily: "var(--default-font-family)",
3194
3204
  whiteSpace: "nowrap"
3195
3205
  }, children: "Next Interaction" }),
3196
- /* @__PURE__ */ e(ot, { size: 16, color: "var(--Neutral-800, #323232)", strokeWidth: 1.5 })
3206
+ /* @__PURE__ */ e(lt, { size: 16, color: "var(--Neutral-800, #323232)", strokeWidth: 1.5 })
3197
3207
  ]
3198
3208
  }
3199
3209
  ) })
@@ -3209,10 +3219,10 @@ const En = {
3209
3219
  padding: "0 24px",
3210
3220
  marginTop: 8
3211
3221
  }, children: [
3212
- /* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "flex-start", minWidth: 0 }, children: Xn.map((f) => /* @__PURE__ */ e(
3222
+ /* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "flex-start", minWidth: 0 }, children: Un.map((f) => /* @__PURE__ */ e(
3213
3223
  "button",
3214
3224
  {
3215
- onClick: () => Kt(f.key),
3225
+ onClick: () => Vt(f.key),
3216
3226
  style: {
3217
3227
  display: "flex",
3218
3228
  padding: 16,
@@ -3232,12 +3242,12 @@ const En = {
3232
3242
  },
3233
3243
  f.key
3234
3244
  )) }),
3235
- (ye || me) && Ve && /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", flexShrink: 0 }, children: [
3236
- /* @__PURE__ */ e(oe, { text: Be, children: /* @__PURE__ */ n(
3245
+ (ye || me) && qe && /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", flexShrink: 0 }, children: [
3246
+ /* @__PURE__ */ e(le, { text: je, children: /* @__PURE__ */ n(
3237
3247
  "button",
3238
3248
  {
3239
- onClick: te ? void 0 : ye,
3240
- disabled: te,
3249
+ onClick: ee ? void 0 : ye,
3250
+ disabled: ee,
3241
3251
  style: {
3242
3252
  display: "flex",
3243
3253
  alignItems: "center",
@@ -3245,11 +3255,11 @@ const En = {
3245
3255
  padding: "4px 12px",
3246
3256
  background: "none",
3247
3257
  border: "none",
3248
- cursor: te ? "default" : "pointer",
3249
- opacity: te ? 0.4 : 1
3258
+ cursor: ee ? "default" : "pointer",
3259
+ opacity: ee ? 0.4 : 1
3250
3260
  },
3251
3261
  children: [
3252
- /* @__PURE__ */ e(Te, { size: 16, color: "var(--Neutral-800, #323232)", strokeWidth: 1.5 }),
3262
+ /* @__PURE__ */ e(_e, { size: 16, color: "var(--Neutral-800, #323232)", strokeWidth: 1.5 }),
3253
3263
  /* @__PURE__ */ e("span", { style: {
3254
3264
  color: "var(--Neutral-800, #323232)",
3255
3265
  fontSize: 13,
@@ -3267,11 +3277,11 @@ const En = {
3267
3277
  background: "var(--Grey-absent, #D9D9D9)",
3268
3278
  flexShrink: 0
3269
3279
  } }),
3270
- /* @__PURE__ */ e(oe, { text: je, children: /* @__PURE__ */ n(
3280
+ /* @__PURE__ */ e(le, { text: Ne, children: /* @__PURE__ */ n(
3271
3281
  "button",
3272
3282
  {
3273
- onClick: ne ? void 0 : me,
3274
- disabled: ne,
3283
+ onClick: te ? void 0 : me,
3284
+ disabled: te,
3275
3285
  style: {
3276
3286
  display: "flex",
3277
3287
  alignItems: "center",
@@ -3279,8 +3289,8 @@ const En = {
3279
3289
  padding: "4px 12px",
3280
3290
  background: "none",
3281
3291
  border: "none",
3282
- cursor: ne ? "default" : "pointer",
3283
- opacity: ne ? 0.4 : 1
3292
+ cursor: te ? "default" : "pointer",
3293
+ opacity: te ? 0.4 : 1
3284
3294
  },
3285
3295
  children: [
3286
3296
  /* @__PURE__ */ e("span", { style: {
@@ -3291,7 +3301,7 @@ const En = {
3291
3301
  fontFamily: "var(--default-font-family)",
3292
3302
  whiteSpace: "nowrap"
3293
3303
  }, children: "Next Interaction" }),
3294
- /* @__PURE__ */ e(ot, { size: 16, color: "var(--Neutral-800, #323232)", strokeWidth: 1.5 })
3304
+ /* @__PURE__ */ e(lt, { size: 16, color: "var(--Neutral-800, #323232)", strokeWidth: 1.5 })
3295
3305
  ]
3296
3306
  }
3297
3307
  ) })
@@ -3314,7 +3324,7 @@ const En = {
3314
3324
  alignSelf: "stretch"
3315
3325
  }, children: [
3316
3326
  /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 8, flex: 1 }, children: [
3317
- /* @__PURE__ */ e(xn, { size: 24, color: "var(--rail-orange, #C98A5A)", strokeWidth: 2 }),
3327
+ /* @__PURE__ */ e(bn, { size: 24, color: "var(--rail-orange, #C98A5A)", strokeWidth: 2 }),
3318
3328
  /* @__PURE__ */ e("span", { style: {
3319
3329
  fontSize: 16,
3320
3330
  fontWeight: 600,
@@ -3326,11 +3336,11 @@ const En = {
3326
3336
  /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 16, flexShrink: 0 }, children: [
3327
3337
  /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 6, padding: "8px 0" }, children: [
3328
3338
  /* @__PURE__ */ e(at, { size: 16, color: "var(--Grey-Muted, #808183)", strokeWidth: 1.5 }),
3329
- /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Strong, #2E3236)", fontFamily: "var(--font-sans)", lineHeight: 1.2 }, children: sn })
3339
+ /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Strong, #2E3236)", fontFamily: "var(--font-sans)", lineHeight: 1.2 }, children: dn })
3330
3340
  ] }),
3331
3341
  /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 6, padding: "8px 0" }, children: [
3332
- /* @__PURE__ */ e(bn, { size: 16, color: "var(--Grey-Muted, #808183)", strokeWidth: 1.5 }),
3333
- /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Strong, #2E3236)", fontFamily: "var(--font-sans)", lineHeight: 1.2 }, children: dn })
3342
+ /* @__PURE__ */ e(st, { size: 16, color: "var(--Grey-Muted, #808183)", strokeWidth: 1.5 }),
3343
+ /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Strong, #2E3236)", fontFamily: "var(--font-sans)", lineHeight: 1.2 }, children: cn })
3334
3344
  ] }),
3335
3345
  /* @__PURE__ */ n("div", { style: {
3336
3346
  display: "flex",
@@ -3339,11 +3349,11 @@ const En = {
3339
3349
  paddingLeft: 16,
3340
3350
  borderLeft: "1px solid var(--Grey-absent, #D9D9D9)"
3341
3351
  }, children: [
3342
- /* @__PURE__ */ e(oe, { text: ln, children: /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 6, padding: "8px 0", cursor: "pointer" }, children: [
3343
- /* @__PURE__ */ e(st, { size: 16, color: "var(--Grey-Muted, #808183)", strokeWidth: 1.5 }),
3344
- /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Strong, #2E3236)", fontFamily: "var(--font-sans)", lineHeight: 1.2 }, children: Me })
3352
+ /* @__PURE__ */ e(le, { text: ln, children: /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 6, padding: "8px 0", cursor: "pointer" }, children: [
3353
+ /* @__PURE__ */ e(dt, { size: 16, color: "var(--Grey-Muted, #808183)", strokeWidth: 1.5 }),
3354
+ /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Strong, #2E3236)", fontFamily: "var(--font-sans)", lineHeight: 1.2 }, children: Ee })
3345
3355
  ] }) }),
3346
- Ee > 1 ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(oe, { text: tt, children: /* @__PURE__ */ n(
3356
+ He > 1 ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(le, { text: tt, children: /* @__PURE__ */ n(
3347
3357
  "button",
3348
3358
  {
3349
3359
  onClick: () => xe(!0),
@@ -3366,7 +3376,7 @@ const En = {
3366
3376
  " ",
3367
3377
  /* @__PURE__ */ n("span", { children: [
3368
3378
  "(",
3369
- Ee,
3379
+ He,
3370
3380
  " Interactions)"
3371
3381
  ] })
3372
3382
  ] })
@@ -3374,7 +3384,7 @@ const En = {
3374
3384
  /* @__PURE__ */ e(Sn, { size: 16, color: "var(--Grey-Strong, #2E3236)", strokeWidth: 1.7 })
3375
3385
  ]
3376
3386
  }
3377
- ) }) }) : /* @__PURE__ */ e(oe, { text: tt, children: /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 4, padding: "8px 0", cursor: "pointer" }, children: [
3387
+ ) }) }) : /* @__PURE__ */ e(le, { text: tt, children: /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 4, padding: "8px 0", cursor: "pointer" }, children: [
3378
3388
  /* @__PURE__ */ e(Re, { size: 16, color: "var(--Grey-Muted, #808183)", strokeWidth: 1.5 }),
3379
3389
  /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Strong, #2E3236)", lineHeight: 1.2 }, children: ue })
3380
3390
  ] }) })
@@ -3388,14 +3398,14 @@ const En = {
3388
3398
  alignSelf: "stretch"
3389
3399
  }, children: [
3390
3400
  /* @__PURE__ */ e("div", { style: { flex: 1, minWidth: 0, display: "flex" }, children: /* @__PURE__ */ e(
3391
- On,
3401
+ $n,
3392
3402
  {
3393
- score: fe ?? 0.5,
3403
+ score: ae ?? 0.5,
3394
3404
  minScore: 0,
3395
- maxScore: h,
3396
- predictedScore: $ ?? 0.5,
3397
- predictedLabel: U,
3398
- legends: l
3405
+ maxScore: fe,
3406
+ predictedScore: h ?? 0.5,
3407
+ predictedLabel: $,
3408
+ legends: o
3399
3409
  }
3400
3410
  ) }),
3401
3411
  /* @__PURE__ */ n("div", { style: {
@@ -3408,19 +3418,19 @@ const En = {
3408
3418
  minWidth: 0
3409
3419
  }, children: [
3410
3420
  /* @__PURE__ */ e(
3411
- Hn,
3421
+ Tn,
3412
3422
  {
3413
- meta: Je,
3414
- callPurpose: Xe,
3415
- classification: en,
3416
- outcomeQuality: ie || "Neutral",
3417
- dimensions: Jt,
3418
- resolutionOutcome: R,
3419
- customerIntent: X,
3420
- location: ee ?? K.location ?? K.location_name ?? se.location,
3421
- interactionId: ae ?? K.interaction_id,
3422
- moreDetails: q,
3423
- canShowEditButton: an,
3423
+ meta: Xe,
3424
+ callPurpose: Me,
3425
+ classification: tn,
3426
+ outcomeQuality: X || "Neutral",
3427
+ dimensions: Xt,
3428
+ resolutionOutcome: U,
3429
+ customerIntent: _,
3430
+ location: ne ?? K.location ?? K.location_name ?? se.location,
3431
+ interactionId: ie ?? K.interaction_id,
3432
+ moreDetails: Z,
3433
+ canShowEditButton: sn,
3424
3434
  onEditInteraction: Rt
3425
3435
  }
3426
3436
  ),
@@ -3428,13 +3438,13 @@ const En = {
3428
3438
  Rn,
3429
3439
  {
3430
3440
  outcomeLift: Ue,
3431
- driverLabels: tn
3441
+ driverLabels: nn
3432
3442
  }
3433
3443
  )
3434
3444
  ] })
3435
3445
  ] })
3436
3446
  ] }),
3437
- /* @__PURE__ */ e("div", { ref: We, style: { paddingTop: 24 }, children: /* @__PURE__ */ e(Gn, { data: o ? null : nn, loading: o }) }),
3447
+ /* @__PURE__ */ e("div", { ref: We, style: { paddingTop: 24 }, children: /* @__PURE__ */ e(Mn, { data: a ? null : rn, loading: a }) }),
3438
3448
  /* @__PURE__ */ n("div", { ref: ge, style: {
3439
3449
  display: "flex",
3440
3450
  flexDirection: "column",
@@ -3447,7 +3457,7 @@ const En = {
3447
3457
  alignItems: "center",
3448
3458
  gap: 8
3449
3459
  }, children: [
3450
- /* @__PURE__ */ e(bt, { size: 24, color: "#C98A5A", strokeWidth: 2 }),
3460
+ /* @__PURE__ */ e(St, { size: 24, color: "#C98A5A", strokeWidth: 2 }),
3451
3461
  /* @__PURE__ */ e("span", { style: {
3452
3462
  fontSize: 16,
3453
3463
  fontWeight: 600,
@@ -3465,85 +3475,85 @@ const En = {
3465
3475
  borderTop: "1px solid #D9D9D9"
3466
3476
  }, children: [
3467
3477
  /* @__PURE__ */ e("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ e(
3468
- _n,
3478
+ An,
3469
3479
  {
3470
- signals: rn,
3471
- expandedSignals: jt,
3472
- toggleSignal: qt,
3473
- playEvidence: Qe,
3474
- highlightTurns: Vt,
3475
- onShowInTranscript: Ze,
3476
- timelinePlaying: y || Pe,
3477
- currentTimeSeconds: p ?? Ke
3480
+ signals: on,
3481
+ expandedSignals: Nt,
3482
+ toggleSignal: Zt,
3483
+ playEvidence: Je,
3484
+ highlightTurns: qt,
3485
+ onShowInTranscript: Qe,
3486
+ timelinePlaying: y || Ye,
3487
+ currentTimeSeconds: p ?? Ve
3478
3488
  }
3479
3489
  ) }),
3480
3490
  /* @__PURE__ */ e("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ e(
3481
- Cn,
3491
+ Fn,
3482
3492
  {
3483
3493
  ref: re,
3484
3494
  audioUrl: d,
3485
- durationSeconds: Je.duration_seconds,
3495
+ durationSeconds: Xe.duration_seconds,
3486
3496
  audioRef: g,
3487
- agentName: Me,
3497
+ agentName: Ee,
3488
3498
  customerName: ue,
3489
3499
  currentTimeSeconds: p,
3490
3500
  timelinePlaying: y,
3491
3501
  playbackRate: W,
3492
3502
  timelineSegments: x,
3493
3503
  onSeek: I,
3494
- onTogglePlay: a,
3504
+ onTogglePlay: s,
3495
3505
  onSeekBack: b,
3496
3506
  onSeekForward: w,
3497
3507
  onSetPlaybackRate: C,
3498
- transcript: E,
3508
+ transcript: H,
3499
3509
  activeTurnIndex: L,
3500
- turnObservations: _,
3510
+ turnObservations: R,
3501
3511
  highlightedTurns: O,
3502
3512
  onTurnPlayPause: u,
3503
- setExpandedSignals: Oe
3513
+ setExpandedSignals: $e
3504
3514
  }
3505
3515
  ) })
3506
3516
  ] })
3507
3517
  ] }),
3508
3518
  /* @__PURE__ */ e("div", { ref: Ie, style: { paddingTop: 24 }, children: /* @__PURE__ */ e(
3509
- qn,
3519
+ Zn,
3510
3520
  {
3511
- comments: Ne,
3512
- totalComments: Ne.length,
3521
+ comments: Oe,
3522
+ totalComments: Oe.length,
3513
3523
  currentUser: j,
3514
- onSendComment: Mt || (() => {
3524
+ onSendComment: Et || (() => {
3515
3525
  }),
3516
- onSendReply: Et || (() => {
3526
+ onSendReply: Ht || (() => {
3517
3527
  }),
3518
- onReply: Ht || (() => {
3528
+ onReply: Tt || (() => {
3519
3529
  }),
3520
- onEdit: Tt || (() => {
3530
+ onEdit: _t || (() => {
3521
3531
  }),
3522
- onDelete: _t || (() => {
3532
+ onDelete: At || (() => {
3523
3533
  }),
3524
- onMenuClick: At || (() => {
3534
+ onMenuClick: Lt || (() => {
3525
3535
  }),
3526
- onMarkResolved: Lt || (() => {
3536
+ onMarkResolved: Bt || (() => {
3527
3537
  }),
3528
- isResolved: Bt,
3538
+ isResolved: jt,
3529
3539
  children: /* @__PURE__ */ e(
3530
- Jn,
3540
+ Xn,
3531
3541
  {
3532
3542
  items: et,
3533
3543
  guidanceCount: et.length,
3534
- onPlayEvidence: Qe,
3535
- onShowInTranscript: Ze,
3536
- timelinePlaying: y || Pe,
3537
- currentTimeSeconds: p ?? Ke
3544
+ onPlayEvidence: Je,
3545
+ onShowInTranscript: Qe,
3546
+ timelinePlaying: y || Ye,
3547
+ currentTimeSeconds: p ?? Ve
3538
3548
  }
3539
3549
  )
3540
3550
  }
3541
3551
  ) })
3542
3552
  ] }),
3543
3553
  /* @__PURE__ */ e(
3544
- Fn,
3554
+ Wn,
3545
3555
  {
3546
- open: Nt,
3556
+ open: Ot,
3547
3557
  onClose: () => xe(!1),
3548
3558
  title: /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 10, minWidth: 0 }, children: [
3549
3559
  /* @__PURE__ */ e("div", { style: {
@@ -3572,7 +3582,7 @@ const En = {
3572
3582
  color: "var(--Grey-Muted, #808183)",
3573
3583
  lineHeight: 1.5
3574
3584
  }, children: [
3575
- Ee,
3585
+ He,
3576
3586
  " Interactions"
3577
3587
  ] }) : null,
3578
3588
  width: 470,
@@ -3582,7 +3592,7 @@ const En = {
3582
3592
  "button",
3583
3593
  {
3584
3594
  onClick: () => {
3585
- Le && Le(), xe(!1);
3595
+ Be && Be(), xe(!1);
3586
3596
  },
3587
3597
  style: {
3588
3598
  display: "flex",
@@ -3611,15 +3621,18 @@ const En = {
3611
3621
  overflowY: "auto"
3612
3622
  },
3613
3623
  children: Ge ? ze.map((f, G) => {
3614
- const v = !!f.isCurrent, k = !v && Ot === G;
3624
+ const v = !!f.isCurrent, k = !v && $t === G, M = ei(
3625
+ f,
3626
+ Me.interaction_direction
3627
+ );
3615
3628
  return /* @__PURE__ */ n(
3616
3629
  "div",
3617
3630
  {
3618
3631
  onClick: v ? void 0 : () => {
3619
- Ae && Ae(f), xe(!1);
3632
+ Le && Le(f), xe(!1);
3620
3633
  },
3621
- onMouseEnter: v ? void 0 : () => $e(G),
3622
- onMouseLeave: v ? void 0 : () => $e(null),
3634
+ onMouseEnter: v ? void 0 : () => Pe(G),
3635
+ onMouseLeave: v ? void 0 : () => Pe(null),
3623
3636
  "aria-current": v ? "page" : void 0,
3624
3637
  style: {
3625
3638
  display: "flex",
@@ -3634,7 +3647,7 @@ const En = {
3634
3647
  },
3635
3648
  children: [
3636
3649
  /* @__PURE__ */ n("div", { style: { minWidth: 0 }, children: [
3637
- /* @__PURE__ */ e(
3650
+ /* @__PURE__ */ n(
3638
3651
  "div",
3639
3652
  {
3640
3653
  style: {
@@ -3650,7 +3663,29 @@ const En = {
3650
3663
  overflow: "hidden",
3651
3664
  textOverflow: "ellipsis"
3652
3665
  },
3653
- children: f.title
3666
+ children: [
3667
+ M && /* @__PURE__ */ e(
3668
+ M === "outbound" ? Cn : st,
3669
+ {
3670
+ size: 16,
3671
+ color: "var(--Grey-Muted, #808183)",
3672
+ strokeWidth: 1.5,
3673
+ style: { flexShrink: 0 },
3674
+ "aria-hidden": !0
3675
+ }
3676
+ ),
3677
+ /* @__PURE__ */ e(
3678
+ "span",
3679
+ {
3680
+ style: {
3681
+ overflow: "hidden",
3682
+ textOverflow: "ellipsis",
3683
+ minWidth: 0
3684
+ },
3685
+ children: f.title
3686
+ }
3687
+ )
3688
+ ]
3654
3689
  }
3655
3690
  ),
3656
3691
  f.status && /* @__PURE__ */ n("div", { style: { fontSize: 13, color: "var(--Grey-Strong, #2E3236)", marginBottom: 12, lineHeight: 1.2 }, children: [
@@ -3663,7 +3698,7 @@ const En = {
3663
3698
  f.date
3664
3699
  ] }),
3665
3700
  (f.agent || f.agent_name) && /* @__PURE__ */ n("span", { style: { display: "inline-flex", alignItems: "center", gap: 6, fontSize: 13, fontWeight: 400, color: "var(--Grey-Muted, #808183)", lineHeight: 1.1 }, children: [
3666
- /* @__PURE__ */ e(st, { size: 16, color: "var(--Grey-Muted, #808183)", strokeWidth: 1.8 }),
3701
+ /* @__PURE__ */ e(dt, { size: 16, color: "var(--Grey-Muted, #808183)", strokeWidth: 1.8 }),
3667
3702
  f.agent || f.agent_name
3668
3703
  ] })
3669
3704
  ] })
@@ -3697,14 +3732,14 @@ const En = {
3697
3732
  ] });
3698
3733
  };
3699
3734
  export {
3700
- Gn as UpdatedCoachingSynthesisCard,
3701
- On as UpdatedCompassScore,
3702
- Jn as UpdatedGuidance,
3703
- Hn as UpdatedInteractionContext,
3704
- oi as UpdatedInteractionDetails,
3705
- Cn as UpdatedInteractionRecording,
3735
+ Mn as UpdatedCoachingSynthesisCard,
3736
+ $n as UpdatedCompassScore,
3737
+ Xn as UpdatedGuidance,
3738
+ Tn as UpdatedInteractionContext,
3739
+ si as UpdatedInteractionDetails,
3740
+ Fn as UpdatedInteractionRecording,
3706
3741
  Rn as UpdatedInteractionScores,
3707
- _n as UpdatedInteractionSignals,
3708
- qn as UpdatedThreads
3742
+ An as UpdatedInteractionSignals,
3743
+ Zn as UpdatedThreads
3709
3744
  };
3710
3745
  //# sourceMappingURL=UpdatedInteractionDetails.es.js.map