chordia-ui 3.3.2 → 3.3.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.
Files changed (33) hide show
  1. package/README.md +4 -0
  2. package/dist/SmallButton.cjs.js +1 -1
  3. package/dist/SmallButton.cjs.js.map +1 -1
  4. package/dist/SmallButton.es.js +170 -162
  5. package/dist/SmallButton.es.js.map +1 -1
  6. package/dist/components/chat.cjs.js +8 -8
  7. package/dist/components/chat.cjs.js.map +1 -1
  8. package/dist/components/chat.es.js +329 -335
  9. package/dist/components/chat.es.js.map +1 -1
  10. package/dist/components/data.cjs.js +1 -1
  11. package/dist/components/data.cjs.js.map +1 -1
  12. package/dist/components/data.es.js +83 -80
  13. package/dist/components/data.es.js.map +1 -1
  14. package/dist/components/layout.cjs.js +1 -1
  15. package/dist/components/layout.cjs.js.map +1 -1
  16. package/dist/components/layout.es.js +3 -1
  17. package/dist/components/layout.es.js.map +1 -1
  18. package/dist/index.cjs2.js +1 -1
  19. package/dist/index.cjs2.js.map +1 -1
  20. package/dist/index.es2.js +4 -4
  21. package/dist/index.es2.js.map +1 -1
  22. package/dist/pages/interactionDetails.cjs.js +2 -2
  23. package/dist/pages/interactionDetails.cjs.js.map +1 -1
  24. package/dist/pages/interactionDetails.es.js +117 -123
  25. package/dist/pages/interactionDetails.es.js.map +1 -1
  26. package/package.json +1 -1
  27. package/src/components/chat/ChatHistoryPanel.jsx +3 -3
  28. package/src/components/chat/ChatInterface.jsx +14 -14
  29. package/src/components/common/MessageThread.jsx +19 -19
  30. package/src/components/data/DataTable.jsx +18 -15
  31. package/src/components/layout/SplitPane.jsx +2 -0
  32. package/src/components/login/LoginPage.jsx +4 -4
  33. package/src/components/primitives/SmallButton.jsx +14 -6
@@ -28,7 +28,7 @@ function ft() {
28
28
  `, document.head.appendChild(n);
29
29
  }
30
30
  function ht({ data: n, loading: a, error: l }) {
31
- var z, I;
31
+ var C, I;
32
32
  if (Ge.useEffect(() => {
33
33
  ft();
34
34
  }, []), a)
@@ -83,7 +83,7 @@ function ht({ data: n, loading: a, error: l }) {
83
83
  }, children: "Unable to generate coaching summary." });
84
84
  if (!n)
85
85
  return null;
86
- const s = n.strengths || [], i = n.improvements || [], m = n.organizational || n.organizational_insights || [], b = typeof n.one_liner == "string" ? n.one_liner : ((z = n.one_liner) == null ? void 0 : z.text) || "", y = typeof n.context == "string" ? n.context : ((I = n.context) == null ? void 0 : I.text) || "";
86
+ const s = n.strengths || [], i = n.improvements || [], m = n.organizational || n.organizational_insights || [], b = typeof n.one_liner == "string" ? n.one_liner : ((C = n.one_liner) == null ? void 0 : C.text) || "", y = typeof n.context == "string" ? n.context : ((I = n.context) == null ? void 0 : I.text) || "";
87
87
  return /* @__PURE__ */ o("div", { style: {
88
88
  display: "flex",
89
89
  flexDirection: "column",
@@ -102,7 +102,7 @@ function ht({ data: n, loading: a, error: l }) {
102
102
  lineHeight: 1.45
103
103
  }, children: y }),
104
104
  s.length > 0 && /* @__PURE__ */ e(
105
- Le,
105
+ Fe,
106
106
  {
107
107
  icon: /* @__PURE__ */ e(et, { size: 13 }),
108
108
  label: "Strengths",
@@ -111,7 +111,7 @@ function ht({ data: n, loading: a, error: l }) {
111
111
  }
112
112
  ),
113
113
  i.length > 0 && /* @__PURE__ */ e(
114
- Le,
114
+ Fe,
115
115
  {
116
116
  icon: /* @__PURE__ */ e(Ae, { size: 13 }),
117
117
  label: "Improvements",
@@ -120,7 +120,7 @@ function ht({ data: n, loading: a, error: l }) {
120
120
  }
121
121
  ),
122
122
  m.length > 0 && /* @__PURE__ */ e(
123
- Le,
123
+ Fe,
124
124
  {
125
125
  icon: /* @__PURE__ */ e(tt, { size: 13 }),
126
126
  label: "Organizational",
@@ -139,7 +139,7 @@ function ht({ data: n, loading: a, error: l }) {
139
139
  ] })
140
140
  ] });
141
141
  }
142
- function Le({ icon: n, label: a, color: l, items: s }) {
142
+ function Fe({ icon: n, label: a, color: l, items: s }) {
143
143
  return /* @__PURE__ */ o("div", { children: [
144
144
  /* @__PURE__ */ o("div", { style: {
145
145
  display: "flex",
@@ -235,10 +235,10 @@ function xt({ title: n, meta: a, callPurpose: l, classification: s, dimensions:
235
235
  /* @__PURE__ */ e("span", { style: { fontSize: 11, color: "var(--text-faint)" }, children: "Paradigm" }),
236
236
  /* @__PURE__ */ e("div", { style: { fontSize: 12, color: "var(--text-base)" }, children: b.interaction_paradigm })
237
237
  ] }),
238
- i.map((y, z) => /* @__PURE__ */ o("div", { children: [
238
+ i.map((y, C) => /* @__PURE__ */ o("div", { children: [
239
239
  /* @__PURE__ */ e("span", { style: { fontSize: 10, color: "var(--text-faint)" }, children: y.label || y.key }),
240
240
  /* @__PURE__ */ e("div", { style: { fontSize: 12, color: "var(--text-base)" }, children: y.value })
241
- ] }, z))
241
+ ] }, C))
242
242
  ] }),
243
243
  a.session_id && /* @__PURE__ */ e("div", { style: { fontSize: 10, color: "var(--text-faint)", fontFamily: "var(--font-mono)", marginTop: 4, userSelect: "all" }, children: a.session_id })
244
244
  ] });
@@ -276,7 +276,7 @@ function bt({
276
276
  var I;
277
277
  if (!((I = n == null ? void 0 : n.signals) != null && I.length))
278
278
  return null;
279
- const z = oe(() => {
279
+ const C = oe(() => {
280
280
  const k = {};
281
281
  for (const g of n.signals) {
282
282
  const S = g.group || "experience";
@@ -284,7 +284,7 @@ function bt({
284
284
  }
285
285
  return k;
286
286
  }, [n]);
287
- return /* @__PURE__ */ e(ae, { title: `Signals (${n.present_count} present / ${n.total_signals_evaluated} evaluated)`, borderRadius: y, children: Object.entries(z).map(([k, g]) => {
287
+ return /* @__PURE__ */ e(ae, { title: `Signals (${n.present_count} present / ${n.total_signals_evaluated} evaluated)`, borderRadius: y, children: Object.entries(C).map(([k, g]) => {
288
288
  const S = je[k] || je.experience;
289
289
  return /* @__PURE__ */ o("div", { style: { marginBottom: 10 }, children: [
290
290
  /* @__PURE__ */ o(dt, { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
@@ -293,7 +293,7 @@ function bt({
293
293
  ] }),
294
294
  /* @__PURE__ */ e("div", { style: { marginTop: 4, display: "flex", flexDirection: "column", gap: 6 }, children: g.map((u, x) => {
295
295
  var E, F, j;
296
- const R = u.display_name || u.key || "", H = (E = u.baseline) == null ? void 0 : E.delta, D = ((F = u.observations) == null ? void 0 : F.length) > 0, _ = a.has(u.key);
296
+ const R = u.display_name || u.key || "", L = (E = u.baseline) == null ? void 0 : E.delta, D = ((F = u.observations) == null ? void 0 : F.length) > 0, _ = a.has(u.key);
297
297
  return /* @__PURE__ */ o(
298
298
  "div",
299
299
  {
@@ -327,7 +327,7 @@ function bt({
327
327
  },
328
328
  title: [
329
329
  u.confidence != null ? `Confidence: ${Math.round(u.confidence * 100)}%` : "",
330
- H != null ? `Δ baseline: ${H > 0 ? "+" : ""}${(H * 100).toFixed(1)}%` : ""
330
+ L != null ? `Δ baseline: ${L > 0 ? "+" : ""}${(L * 100).toFixed(1)}%` : ""
331
331
  ].filter(Boolean).join(" · "),
332
332
  children: [
333
333
  /* @__PURE__ */ o(
@@ -423,8 +423,8 @@ function bt({
423
423
  const A = J.start_ms, M = J.end_ms;
424
424
  let $ = !1;
425
425
  if (A != null && i) {
426
- const O = A / 1e3, P = M != null ? M / 1e3 : O + 1, Y = m ?? 0;
427
- $ = Y >= O && Y <= P + 0.25;
426
+ const O = A / 1e3, H = M != null ? M / 1e3 : O + 1, Y = m ?? 0;
427
+ $ = Y >= O && Y <= H + 0.25;
428
428
  }
429
429
  return /* @__PURE__ */ e(
430
430
  Ye,
@@ -432,7 +432,7 @@ function bt({
432
432
  ev: J,
433
433
  isPlaying: $,
434
434
  railColor: S.color,
435
- onPlay: (O, P) => s == null ? void 0 : s(O, P, J.turn_ids),
435
+ onPlay: (O, H) => s == null ? void 0 : s(O, H, J.turn_ids),
436
436
  onHighlight: b
437
437
  },
438
438
  N
@@ -467,7 +467,7 @@ function vt({
467
467
  borderRadius: m
468
468
  }) {
469
469
  var b;
470
- return (b = n == null ? void 0 : n.items) != null && b.length ? /* @__PURE__ */ e(ae, { title: `Guidance (${n.total_items} items)`, borderRadius: m, children: /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: n.items.map((y, z) => {
470
+ return (b = n == null ? void 0 : n.items) != null && b.length ? /* @__PURE__ */ e(ae, { title: `Guidance (${n.total_items} items)`, borderRadius: m, children: /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: n.items.map((y, C) => {
471
471
  var g;
472
472
  const I = Ne[y.guidance_kind] || Ne.excellence, k = y.owner === "organization" ? { bg: "color-mix(in srgb, var(--rail-discovery) 15%, transparent)", color: "var(--rail-discovery)", text: "ORG" } : y.owner === "shared" ? { bg: "color-mix(in srgb, var(--state-unknown) 15%, transparent)", color: "var(--state-unknown)", text: "SHARED" } : { bg: "color-mix(in srgb, var(--rail-teal) 10%, transparent)", color: "var(--rail-teal)", text: "AGENT" };
473
473
  return /* @__PURE__ */ o("div", { style: {
@@ -519,7 +519,7 @@ function vt({
519
519
  ]
520
520
  }
521
521
  ),
522
- (x = S.evidence) == null ? void 0 : x.map((R, H) => {
522
+ (x = S.evidence) == null ? void 0 : x.map((R, L) => {
523
523
  const D = R.start_ms, _ = R.end_ms;
524
524
  let E = !1;
525
525
  if (D != null && l) {
@@ -534,12 +534,12 @@ function vt({
534
534
  onPlay: (F, j) => a == null ? void 0 : a(F, j, R.turn_ids),
535
535
  onHighlight: i
536
536
  },
537
- H
537
+ L
538
538
  );
539
539
  })
540
540
  ] }, u);
541
541
  })
542
- ] }, z);
542
+ ] }, C);
543
543
  }) }) }) : null;
544
544
  }
545
545
  function St({ nba: n }) {
@@ -560,7 +560,7 @@ function kt({
560
560
  playbackRate: m,
561
561
  onSeek: b,
562
562
  onTogglePlay: y,
563
- onSeekBack: z,
563
+ onSeekBack: C,
564
564
  onSeekForward: I,
565
565
  onSetPlaybackRate: k,
566
566
  audioRef: g
@@ -578,7 +578,7 @@ function kt({
578
578
  timelinePlaying: i,
579
579
  playbackRate: m,
580
580
  onTogglePlay: y,
581
- onSeekBack: z,
581
+ onSeekBack: C,
582
582
  onSeekForward: I,
583
583
  onSetPlaybackRate: k
584
584
  }
@@ -599,11 +599,11 @@ function wt({
599
599
  var k;
600
600
  if (!((k = n == null ? void 0 : n.messages) != null && k.length))
601
601
  return null;
602
- const z = (g, S) => {
602
+ const C = (g, S) => {
603
603
  if (g == null)
604
604
  return;
605
- const u = (H) => {
606
- const D = Math.floor(H / 6e4), _ = Math.floor(H % 6e4 / 1e3);
605
+ const u = (L) => {
606
+ const D = Math.floor(L / 6e4), _ = Math.floor(L % 6e4 / 1e3);
607
607
  return `${D.toString().padStart(2, "0")}:${_.toString().padStart(2, "0")}`;
608
608
  }, x = u(g), R = S != null ? u(S) : x;
609
609
  return `${x}–${R}`;
@@ -613,15 +613,15 @@ function wt({
613
613
  actor: g.actor === "agent" ? ((u = n.actor_map) == null ? void 0 : u.agent) || "Agent" : ((x = n.actor_map) == null ? void 0 : x.customer) || "Customer",
614
614
  actorType: g.actor === "agent" ? "agent" : "customer",
615
615
  text: g.text || "",
616
- timeRange: z(g.start ?? g.start_ms, g.end ?? g.end_ms),
616
+ timeRange: C(g.start ?? g.start_ms, g.end ?? g.end_ms),
617
617
  isHighlighted: l.has(S),
618
618
  highlightColor: i && s === S ? g.actor === "agent" ? "var(--rail-outcome)" : "var(--rail-discovery)" : void 0,
619
619
  observations: (m[S] || []).map((R) => ({
620
620
  ...R,
621
621
  onClick: () => {
622
- b((H) => /* @__PURE__ */ new Set([...H, R.signalKey])), setTimeout(() => {
623
- const H = document.getElementById(`signal-${R.signalKey}`);
624
- H && H.scrollIntoView({ behavior: "smooth", block: "nearest" });
622
+ b((L) => /* @__PURE__ */ new Set([...L, R.signalKey])), setTimeout(() => {
623
+ const L = document.getElementById(`signal-${R.signalKey}`);
624
+ L && L.scrollIntoView({ behavior: "smooth", block: "nearest" });
625
625
  }, 100);
626
626
  }
627
627
  }))
@@ -639,7 +639,7 @@ function wt({
639
639
  }
640
640
  ) });
641
641
  }
642
- const Fe = {
642
+ const Le = {
643
643
  padding: 0,
644
644
  border: "none",
645
645
  background: "transparent",
@@ -670,11 +670,11 @@ const Fe = {
670
670
  }, Pe = (n, a = null, l = 0) => {
671
671
  const s = [];
672
672
  return (n || []).forEach((i, m) => {
673
- const b = i.author || {}, y = b.name || i.author_name || "Unknown", z = b.initials || y.split(" ").map((x) => x[0]).join("").toUpperCase() || "U", I = b.role || i.author_role, k = Qe(I), g = b.color || i.author_color || k || "#6B7C93", S = i.id || `msg-${l + m}`, u = {
673
+ const b = i.author || {}, y = b.name || i.author_name || "Unknown", C = b.initials || y.split(" ").map((x) => x[0]).join("").toUpperCase() || "U", I = b.role || i.author_role, k = Qe(I), g = b.color || i.author_color || k || "#6B7C93", S = i.id || `msg-${l + m}`, u = {
674
674
  id: S,
675
675
  author: {
676
676
  name: y,
677
- initials: z,
677
+ initials: C,
678
678
  color: g,
679
679
  role: I
680
680
  },
@@ -689,7 +689,7 @@ const Fe = {
689
689
  ...Pe(i.replies, S, l + s.length)
690
690
  );
691
691
  }), s;
692
- }, zt = (n) => {
692
+ }, Ct = (n) => {
693
693
  if (!n)
694
694
  return "";
695
695
  if (!/^\d{4}-\d{2}-\d{2}T/.test(n))
@@ -709,8 +709,8 @@ const Fe = {
709
709
  return `Today at ${b}`;
710
710
  if (m)
711
711
  return `Yesterday at ${b}`;
712
- const z = (l.getTime() - a.getTime()) / (1e3 * 60 * 60 * 24);
713
- return z < 7 && z > 0 ? `${a.toLocaleDateString(void 0, { weekday: "long" })} at ${b}` : `${a.toLocaleDateString(void 0, {
712
+ const C = (l.getTime() - a.getTime()) / (1e3 * 60 * 60 * 24);
713
+ return C < 7 && C > 0 ? `${a.toLocaleDateString(void 0, { weekday: "long" })} at ${b}` : `${a.toLocaleDateString(void 0, {
714
714
  month: "short",
715
715
  day: "numeric",
716
716
  year: a.getFullYear() !== l.getFullYear() ? "numeric" : void 0
@@ -719,7 +719,7 @@ const Fe = {
719
719
  return n;
720
720
  }
721
721
  };
722
- function Ct({
722
+ function zt({
723
723
  sessionTitle: n,
724
724
  sessionSubtitle: a,
725
725
  threadLabel: l,
@@ -728,7 +728,7 @@ function Ct({
728
728
  onSendMessage: m,
729
729
  onReplyMessage: b,
730
730
  onEditMessage: y,
731
- onDeleteMessage: z,
731
+ onDeleteMessage: C,
732
732
  onCreateNewThread: I,
733
733
  // optional: host can handle new thread creation
734
734
  onThreadSelect: k,
@@ -736,14 +736,14 @@ function Ct({
736
736
  currentUser: g,
737
737
  isLoading: S = !1
738
738
  }) {
739
- const [u, x] = T(""), [R, H] = T(!1), [D, _] = T(s || []), [E, F] = T(!1), [j, w] = T(null), [K, q] = T([]), [J, N] = T(null), [A, M] = T(null), [$, O] = T(""), [P, Y] = T(null), [B, Z] = T(""), [le, te] = T(null), [Te, ne] = T(!1), [X, se] = T(""), [V, he] = T(!1), [Ie, U] = T(/* @__PURE__ */ new Set()), ee = fe(null), _e = fe(null), re = g && g.role && String(g.role).toLowerCase() || "", ie = oe(() => {
739
+ const [u, x] = T(""), [R, L] = T(!1), [D, _] = T(s || []), [E, F] = T(!1), [j, w] = T(null), [K, q] = T([]), [J, N] = T(null), [A, M] = T(null), [$, O] = T(""), [H, Y] = T(null), [P, Z] = T(""), [le, te] = T(null), [Te, ne] = T(!1), [X, se] = T(""), [V, he] = T(!1), [Ie, U] = T(/* @__PURE__ */ new Set()), ee = fe(null), _e = fe(null), re = g && g.role && String(g.role).toLowerCase() || "", ie = oe(() => {
740
740
  if (!g)
741
741
  return {
742
742
  name: "You",
743
743
  initials: "YO",
744
744
  color: "#6B7C93"
745
745
  };
746
- const t = g.name || "You", f = g.initials || t.split(" ").map((c) => c[0]).join("").toUpperCase() || "YO", v = g.role && String(g.role).toLowerCase(), C = Qe(v), r = g.color || C || "#6B7C93";
746
+ const t = g.name || "You", f = g.initials || t.split(" ").map((c) => c[0]).join("").toUpperCase() || "YO", v = g.role && String(g.role).toLowerCase(), z = Qe(v), r = g.color || z || "#6B7C93";
747
747
  return {
748
748
  ...g,
749
749
  name: t,
@@ -758,7 +758,7 @@ function Ct({
758
758
  }, [D]), me = oe(
759
759
  () => (D || []).filter((t) => !t.parentId),
760
760
  [D]
761
- ), ce = (t) => A === t, Re = (t) => P === t, De = l || n || a, Ee = A ? D.find((t) => t.id === A) : null;
761
+ ), ce = (t) => A === t, Re = (t) => H === t, De = l || n || a, Ee = A ? D.find((t) => t.id === A) : null;
762
762
  ge(() => {
763
763
  i || s && _(s);
764
764
  }, [s, i]), ge(() => {
@@ -767,25 +767,25 @@ function Ct({
767
767
  const t = Array.isArray(i.threads) ? i.threads : Array.isArray(i.items) ? i.items : [];
768
768
  if (t.length > 0) {
769
769
  const v = t.map((c, p) => {
770
- const h = c.id || c.thread_id || `thread-${p + 1}`, W = c.label || c.title || (p === 0 ? l || "Session" : `Thread ${p + 1}`), d = Ke(c), L = Pe(d);
771
- return { id: h, label: W, messages: L };
770
+ const h = c.id || c.thread_id || `thread-${p + 1}`, B = c.label || c.title || (p === 0 ? l || "Session" : `Thread ${p + 1}`), d = Ke(c), W = Pe(d);
771
+ return { id: h, label: B, messages: W };
772
772
  });
773
773
  q(v);
774
- const C = v.find((c) => (c.messages || []).length > 0) || v[0], r = (C == null ? void 0 : C.messages) || [];
775
- _(r), U(/* @__PURE__ */ new Set()), N((C == null ? void 0 : C.id) || null);
774
+ const z = v.find((c) => (c.messages || []).length > 0) || v[0], r = (z == null ? void 0 : z.messages) || [];
775
+ _(r), U(/* @__PURE__ */ new Set()), N((z == null ? void 0 : z.id) || null);
776
776
  return;
777
777
  }
778
778
  const f = Ke(i);
779
779
  if (f.length) {
780
780
  const v = Pe(f);
781
781
  _(v), U(/* @__PURE__ */ new Set());
782
- const C = i.id || "thread-1", r = i.title || l || "Thread 1";
782
+ const z = i.id || "thread-1", r = i.title || l || "Thread 1";
783
783
  q([
784
784
  {
785
- id: C,
785
+ id: z,
786
786
  label: r
787
787
  }
788
- ]), N(C);
788
+ ]), N(z);
789
789
  }
790
790
  }, [i, l]), ge(() => {
791
791
  l && q(
@@ -824,7 +824,7 @@ function Ct({
824
824
  return;
825
825
  const f = t;
826
826
  x("");
827
- const v = `temp-${Date.now()}`, C = {
827
+ const v = `temp-${Date.now()}`, z = {
828
828
  id: v,
829
829
  author: ie,
830
830
  content: f,
@@ -833,7 +833,7 @@ function Ct({
833
833
  isOptimistic: !0,
834
834
  parentId: A || null
835
835
  };
836
- if (_((r) => [...r, C]), m) {
836
+ if (_((r) => [...r, z]), m) {
837
837
  F(!0);
838
838
  try {
839
839
  await m({
@@ -865,7 +865,7 @@ function Ct({
865
865
  const f = $.trim();
866
866
  if (!f)
867
867
  return;
868
- const v = `reply-${Date.now()}`, C = {
868
+ const v = `reply-${Date.now()}`, z = {
869
869
  id: v,
870
870
  author: ie,
871
871
  content: f,
@@ -874,7 +874,7 @@ function Ct({
874
874
  isOptimistic: !m,
875
875
  parentId: t
876
876
  };
877
- _((r) => [...r, C]), F(!0);
877
+ _((r) => [...r, z]), F(!0);
878
878
  try {
879
879
  m && (await m({
880
880
  content: f,
@@ -892,15 +892,15 @@ function Ct({
892
892
  }, we = (t) => {
893
893
  Y(t.id), Z(t.content || ""), M(null), O(""), w(null);
894
894
  }, de = async () => {
895
- const t = B.trim();
896
- if (!(!t || !P))
895
+ const t = P.trim();
896
+ if (!(!t || !H))
897
897
  try {
898
- const f = await (y == null ? void 0 : y({ id: P, content: t }));
898
+ const f = await (y == null ? void 0 : y({ id: H, content: t }));
899
899
  if (f && typeof f == "object" && f.success === !1)
900
900
  return;
901
901
  _(
902
902
  (v) => v.map(
903
- (C) => C.id === P ? { ...C, content: t, isEdited: !0 } : C
903
+ (z) => z.id === H ? { ...z, content: t, isEdited: !0 } : z
904
904
  )
905
905
  ), Y(null), Z("");
906
906
  } catch (f) {
@@ -908,16 +908,16 @@ function Ct({
908
908
  }
909
909
  }, pe = () => {
910
910
  Y(null), Z("");
911
- }, ze = (t) => {
911
+ }, Ce = (t) => {
912
912
  te(t), w(null);
913
- }, Ce = async () => {
913
+ }, ze = async () => {
914
914
  if (!le)
915
915
  return;
916
916
  const t = le;
917
- te(null), _((f) => f.filter((v) => v.id !== t.id)), await (z == null ? void 0 : z(t));
917
+ te(null), _((f) => f.filter((v) => v.id !== t.id)), await (C == null ? void 0 : C(t));
918
918
  }, ue = (t, f = 0) => {
919
- var h, W;
920
- const v = xe[t.id] || [], C = v.length > 0, r = Ie.has(t.id), c = Re(t.id), p = ce(t.id);
919
+ var h, B;
920
+ const v = xe[t.id] || [], z = v.length > 0, r = Ie.has(t.id), c = Re(t.id), p = ce(t.id);
921
921
  return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ o(
922
922
  "div",
923
923
  {
@@ -1010,7 +1010,7 @@ function Ct({
1010
1010
  fontFamily: "var(--default-mono-font-family)",
1011
1011
  color: "rgba(30, 33, 37, 0.5)"
1012
1012
  },
1013
- children: zt(t.timestamp)
1013
+ children: Ct(t.timestamp)
1014
1014
  }
1015
1015
  ),
1016
1016
  ((h = t.author) == null ? void 0 : h.role) && /* @__PURE__ */ e(
@@ -1062,7 +1062,7 @@ function Ct({
1062
1062
  onClick: (d) => {
1063
1063
  d.preventDefault(), d.stopPropagation(), Se(t);
1064
1064
  },
1065
- style: Fe,
1065
+ style: Le,
1066
1066
  children: "Reply"
1067
1067
  }
1068
1068
  ),
@@ -1073,19 +1073,19 @@ function Ct({
1073
1073
  onClick: (d) => {
1074
1074
  d.preventDefault(), d.stopPropagation(), we(t);
1075
1075
  },
1076
- style: Fe,
1076
+ style: Le,
1077
1077
  children: "Edit"
1078
1078
  }
1079
1079
  ),
1080
- z && /* @__PURE__ */ e(
1080
+ C && /* @__PURE__ */ e(
1081
1081
  "button",
1082
1082
  {
1083
1083
  type: "button",
1084
1084
  onClick: (d) => {
1085
- d.preventDefault(), d.stopPropagation(), ze(t);
1085
+ d.preventDefault(), d.stopPropagation(), Ce(t);
1086
1086
  },
1087
1087
  style: {
1088
- ...Fe,
1088
+ ...Le,
1089
1089
  color: "rgba(198, 99, 99, 0.9)"
1090
1090
  },
1091
1091
  children: "Delete"
@@ -1101,7 +1101,7 @@ function Ct({
1101
1101
  /* @__PURE__ */ e(
1102
1102
  "textarea",
1103
1103
  {
1104
- value: B,
1104
+ value: P,
1105
1105
  onChange: (d) => Z(d.target.value),
1106
1106
  onKeyDown: (d) => {
1107
1107
  d.key === "Enter" && !d.shiftKey && (d.preventDefault(), de()), d.key === "Escape" && pe();
@@ -1168,28 +1168,22 @@ function Ct({
1168
1168
  {
1169
1169
  type: "button",
1170
1170
  onClick: de,
1171
- disabled: !(B != null && B.trim()),
1171
+ disabled: !(P != null && P.trim()),
1172
1172
  style: {
1173
1173
  padding: "8px 16px",
1174
1174
  fontSize: "12px",
1175
1175
  fontWeight: 600,
1176
- color: B != null && B.trim() ? "white" : "rgba(30, 33, 37, 0.45)",
1177
- background: B != null && B.trim() ? "#5e88b0" : "rgba(30, 33, 37, 0.1)",
1176
+ color: P != null && P.trim() ? "white" : "rgba(30, 33, 37, 0.45)",
1177
+ background: P != null && P.trim() ? "var(--Base-Strong, #0B0B0B)" : "#ECEEF2",
1178
1178
  border: "none",
1179
1179
  borderRadius: "6px",
1180
- cursor: B != null && B.trim() ? "pointer" : "not-allowed",
1180
+ cursor: P != null && P.trim() ? "pointer" : "not-allowed",
1181
1181
  display: "flex",
1182
1182
  alignItems: "center",
1183
1183
  gap: "6px",
1184
1184
  transition: "all 0.15s ease"
1185
1185
  },
1186
- onMouseEnter: (d) => {
1187
- B != null && B.trim() && (d.currentTarget.style.background = "#4d7290");
1188
- },
1189
- onMouseLeave: (d) => {
1190
- B != null && B.trim() && (d.currentTarget.style.background = "#5e88b0");
1191
- },
1192
- children: "Save"
1186
+ children: "Edit"
1193
1187
  }
1194
1188
  )
1195
1189
  ]
@@ -1202,7 +1196,7 @@ function Ct({
1202
1196
  fontSize: "13px",
1203
1197
  color: "rgba(30, 33, 37, 0.88)",
1204
1198
  lineHeight: 1.55,
1205
- marginBottom: (W = t.references) != null && W.length ? "8px" : 0
1199
+ marginBottom: (B = t.references) != null && B.length ? "8px" : 0
1206
1200
  },
1207
1201
  children: t.content
1208
1202
  }
@@ -1278,26 +1272,26 @@ function Ct({
1278
1272
  fontSize: "12px",
1279
1273
  fontWeight: 600,
1280
1274
  color: $.trim() && !E ? "white" : "rgba(30, 33, 37, 0.45)",
1281
- background: $.trim() && !E ? "#5e88b0" : "rgba(30, 33, 37, 0.12)",
1275
+ background: $.trim() && !E ? "var(--Base-Strong, #0B0B0B)" : "#ECEEF2",
1282
1276
  border: "none",
1283
1277
  borderRadius: "6px",
1284
1278
  cursor: $.trim() && !E ? "pointer" : "not-allowed"
1285
1279
  },
1286
- children: "Send"
1280
+ children: "Reply"
1287
1281
  }
1288
1282
  )
1289
1283
  ]
1290
1284
  }
1291
1285
  )
1292
1286
  ] }),
1293
- C && /* @__PURE__ */ o("div", { style: { marginTop: 8 }, children: [
1287
+ z && /* @__PURE__ */ o("div", { style: { marginTop: 8 }, children: [
1294
1288
  /* @__PURE__ */ o(
1295
1289
  "button",
1296
1290
  {
1297
1291
  type: "button",
1298
1292
  onClick: () => U((d) => {
1299
- const L = new Set(d);
1300
- return L.has(t.id) ? L.delete(t.id) : L.add(t.id), L;
1293
+ const W = new Set(d);
1294
+ return W.has(t.id) ? W.delete(t.id) : W.add(t.id), W;
1301
1295
  }),
1302
1296
  style: {
1303
1297
  display: "inline-flex",
@@ -1439,13 +1433,13 @@ function Ct({
1439
1433
  "button",
1440
1434
  {
1441
1435
  type: "button",
1442
- onClick: Ce,
1436
+ onClick: ze,
1443
1437
  style: {
1444
1438
  padding: "8px 16px",
1445
1439
  fontSize: "12px",
1446
1440
  fontWeight: 600,
1447
1441
  color: "white",
1448
- background: "#5e88b0",
1442
+ background: "var(--Base-Strong, #0B0B0B)",
1449
1443
  border: "none",
1450
1444
  borderRadius: "6px",
1451
1445
  cursor: "pointer"
@@ -2534,8 +2528,8 @@ function Ct({
2534
2528
  value: u,
2535
2529
  onChange: (t) => x(t.target.value),
2536
2530
  onKeyDown: We,
2537
- onFocus: () => H(!0),
2538
- onBlur: () => H(!1),
2531
+ onFocus: () => L(!0),
2532
+ onBlur: () => L(!1),
2539
2533
  placeholder: Ee ? "Type your reply..." : "Add a comment...",
2540
2534
  style: {
2541
2535
  width: "100%",
@@ -2571,7 +2565,7 @@ function Ct({
2571
2565
  disabled: !u.trim() || E,
2572
2566
  style: {
2573
2567
  padding: "8px 16px",
2574
- background: u.trim() && !E ? "#5e88b0" : "rgba(30, 33, 37, 0.1)",
2568
+ background: u.trim() && !E ? "var(--Base-Strong, #0B0B0B)" : "#ECEEF2",
2575
2569
  border: "none",
2576
2570
  borderRadius: "6px",
2577
2571
  color: u.trim() && !E ? "white" : "rgba(30, 33, 37, 0.45)",
@@ -2631,18 +2625,18 @@ function Tt({
2631
2625
  // Optional callbacks for host apps to wire MessageThread to real APIs.
2632
2626
  onThreadSendMessage: b,
2633
2627
  onThreadEditMessage: y,
2634
- onThreadDeleteMessage: z,
2628
+ onThreadDeleteMessage: C,
2635
2629
  onThreadCreateNewThread: I,
2636
2630
  onThreadSelect: k,
2637
2631
  threadLoading: g,
2638
2632
  threadCurrentUser: S
2639
2633
  }) {
2640
- var Se, ke, we, de, pe, ze, Ce, ue, t, f, v, C;
2634
+ var Se, ke, we, de, pe, Ce, ze, ue, t, f, v, z;
2641
2635
  const u = n.blocks || [];
2642
2636
  n.evidence_index;
2643
- const x = fe(null), R = fe(null), [H, D] = T(/* @__PURE__ */ new Set()), [_, E] = T(/* @__PURE__ */ new Set()), [F, j] = T(0), [w, K] = T(!1), [q, J] = T(1), N = ((Se = G(u, "interaction-metadata")) == null ? void 0 : Se.payload) || {}, A = ((ke = G(u, "interaction-context")) == null ? void 0 : ke.payload) || {}, M = ((we = G(u, "interaction-summary")) == null ? void 0 : we.payload) || {};
2637
+ const x = fe(null), R = fe(null), [L, D] = T(/* @__PURE__ */ new Set()), [_, E] = T(/* @__PURE__ */ new Set()), [F, j] = T(0), [w, K] = T(!1), [q, J] = T(1), N = ((Se = G(u, "interaction-metadata")) == null ? void 0 : Se.payload) || {}, A = ((ke = G(u, "interaction-context")) == null ? void 0 : ke.payload) || {}, M = ((we = G(u, "interaction-summary")) == null ? void 0 : we.payload) || {};
2644
2638
  (de = G(u, "interaction-scores")) != null && de.payload;
2645
- const $ = ((pe = G(u, "interaction-signals")) == null ? void 0 : pe.payload) || {}, O = ((ze = G(u, "interaction-guidance")) == null ? void 0 : ze.payload) || {}, P = ((Ce = G(u, "interaction-transcript")) == null ? void 0 : Ce.payload) || {}, Y = ((ue = G(u, "interaction-nba")) == null ? void 0 : ue.payload) || {}, Z = ((((t = G(u, "interaction-dimensions")) == null ? void 0 : t.payload) || {}).dimensions || []).filter((r) => r.value), le = ((f = G(u, "interaction-outcome-lift")) == null ? void 0 : f.payload) || {}, te = oe(() => {
2639
+ const $ = ((pe = G(u, "interaction-signals")) == null ? void 0 : pe.payload) || {}, O = ((Ce = G(u, "interaction-guidance")) == null ? void 0 : Ce.payload) || {}, H = ((ze = G(u, "interaction-transcript")) == null ? void 0 : ze.payload) || {}, Y = ((ue = G(u, "interaction-nba")) == null ? void 0 : ue.payload) || {}, Z = ((((t = G(u, "interaction-dimensions")) == null ? void 0 : t.payload) || {}).dimensions || []).filter((r) => r.value), le = ((f = G(u, "interaction-outcome-lift")) == null ? void 0 : f.payload) || {}, te = oe(() => {
2646
2640
  var p;
2647
2641
  const r = {}, c = {
2648
2642
  outcome: { color: "var(--rail-outcome)" },
@@ -2652,39 +2646,39 @@ function Tt({
2652
2646
  experience: { color: "var(--rail-teal)" }
2653
2647
  };
2654
2648
  for (const h of $.signals || []) {
2655
- const W = c[h.group] || {};
2649
+ const B = c[h.group] || {};
2656
2650
  for (const d of h.observations || [])
2657
- for (const L of d.evidence || [])
2658
- if ((p = L.turn_ids) != null && p.length)
2659
- for (const Q of L.turn_ids)
2651
+ for (const W of d.evidence || [])
2652
+ if ((p = W.turn_ids) != null && p.length)
2653
+ for (const Q of W.turn_ids)
2660
2654
  r[Q] || (r[Q] = []), r[Q].some((Ze) => Ze.label === (d.key || h.display_name || h.key)) || r[Q].push({
2661
2655
  label: d.key || h.display_name || h.key,
2662
2656
  reason: d.reason || d.explanation || "",
2663
- color: W.color || "var(--state-present)",
2657
+ color: B.color || "var(--state-present)",
2664
2658
  signalKey: h.key
2665
2659
  });
2666
2660
  }
2667
2661
  return r;
2668
- }, [$.signals]), Te = ((v = P.messages) == null ? void 0 : v.map((r, c) => {
2669
- var L, Q;
2670
- const p = r.start ?? r.start_ms ? (r.start ?? r.start_ms) / 1e3 : 0, h = r.end ?? r.end_ms ? (r.end ?? r.end_ms) / 1e3 : p + 1, W = r.actor === "agent", d = W ? ((L = P.actor_map) == null ? void 0 : L.agent) || "Agent" : ((Q = P.actor_map) == null ? void 0 : Q.customer) || "Customer";
2662
+ }, [$.signals]), Te = ((v = H.messages) == null ? void 0 : v.map((r, c) => {
2663
+ var W, Q;
2664
+ const p = r.start ?? r.start_ms ? (r.start ?? r.start_ms) / 1e3 : 0, h = r.end ?? r.end_ms ? (r.end ?? r.end_ms) / 1e3 : p + 1, B = r.actor === "agent", d = B ? ((W = H.actor_map) == null ? void 0 : W.agent) || "Agent" : ((Q = H.actor_map) == null ? void 0 : Q.customer) || "Customer";
2671
2665
  return {
2672
2666
  startTime: p,
2673
2667
  endTime: h,
2674
2668
  actor: d,
2675
- actorColor: W ? "var(--rail-outcome)" : "var(--rail-discovery)"
2669
+ actorColor: B ? "var(--rail-outcome)" : "var(--rail-discovery)"
2676
2670
  };
2677
2671
  })) || [], ne = oe(() => {
2678
2672
  if (!w && F === 0)
2679
2673
  return -1;
2680
- const r = P.messages || [], c = F * 1e3;
2674
+ const r = H.messages || [], c = F * 1e3;
2681
2675
  for (let p = r.length - 1; p >= 0; p--) {
2682
2676
  const h = r[p].start ?? r[p].start_ms;
2683
2677
  if (h != null && c >= h)
2684
2678
  return p;
2685
2679
  }
2686
2680
  return -1;
2687
- }, [F, w, P.messages]), X = (r) => {
2681
+ }, [F, w, H.messages]), X = (r) => {
2688
2682
  x.current && (x.current.currentTime = r, j(r));
2689
2683
  }, se = () => {
2690
2684
  if (x.current)
@@ -2709,9 +2703,9 @@ function Tt({
2709
2703
  const r = x.current;
2710
2704
  if (!r)
2711
2705
  return;
2712
- const c = () => j(r.currentTime), p = () => K(!0), h = () => K(!1), W = () => K(!1);
2713
- return r.addEventListener("timeupdate", c), r.addEventListener("play", p), r.addEventListener("pause", h), r.addEventListener("ended", W), () => {
2714
- r.removeEventListener("timeupdate", c), r.removeEventListener("play", p), r.removeEventListener("pause", h), r.removeEventListener("ended", W);
2706
+ const c = () => j(r.currentTime), p = () => K(!0), h = () => K(!1), B = () => K(!1);
2707
+ return r.addEventListener("timeupdate", c), r.addEventListener("play", p), r.addEventListener("pause", h), r.addEventListener("ended", B), () => {
2708
+ r.removeEventListener("timeupdate", c), r.removeEventListener("play", p), r.removeEventListener("pause", h), r.removeEventListener("ended", B);
2715
2709
  };
2716
2710
  }, [a]);
2717
2711
  const U = (r, c) => {
@@ -2720,34 +2714,34 @@ function Tt({
2720
2714
  return;
2721
2715
  const h = r / 1e3;
2722
2716
  p.currentTime = h, j(h);
2723
- const W = p.play();
2724
- if (W !== void 0 && W.catch(() => {
2717
+ const B = p.play();
2718
+ if (B !== void 0 && B.catch(() => {
2725
2719
  }), R.current && (p.removeEventListener("timeupdate", R.current), R.current = null), c != null) {
2726
- const d = c / 1e3, L = () => {
2720
+ const d = c / 1e3, W = () => {
2727
2721
  p.currentTime >= d && (p.pause(), R.current && (p.removeEventListener("timeupdate", R.current), R.current = null));
2728
2722
  };
2729
- R.current = L, p.addEventListener("timeupdate", L);
2723
+ R.current = W, p.addEventListener("timeupdate", W);
2730
2724
  }
2731
2725
  }, ee = (r, c, p) => {
2732
2726
  const h = x.current;
2733
2727
  if (!h || r == null)
2734
2728
  return;
2735
- const W = r / 1e3, d = c != null ? c / 1e3 : W + 1, L = h.currentTime;
2736
- if (w && L >= W && (d == null || L <= d + 0.25)) {
2729
+ const B = r / 1e3, d = c != null ? c / 1e3 : B + 1, W = h.currentTime;
2730
+ if (w && W >= B && (d == null || W <= d + 0.25)) {
2737
2731
  h.pause();
2738
2732
  return;
2739
2733
  }
2740
2734
  U(r, c), p != null && p.length && re(p);
2741
2735
  }, _e = (r, c) => {
2742
- const h = (P.messages || [])[c], W = x.current;
2743
- if (!h || !W)
2736
+ const h = (H.messages || [])[c], B = x.current;
2737
+ if (!h || !B)
2744
2738
  return;
2745
- const d = h.start ?? h.start_ms, L = h.end ?? h.end_ms;
2739
+ const d = h.start ?? h.start_ms, W = h.end ?? h.end_ms;
2746
2740
  if (w && ne === c) {
2747
- W.pause();
2741
+ B.pause();
2748
2742
  return;
2749
2743
  }
2750
- d != null && U(d, L);
2744
+ d != null && U(d, W);
2751
2745
  }, re = (r) => {
2752
2746
  D(new Set(r));
2753
2747
  const c = document.getElementById("transcript-container");
@@ -2757,7 +2751,7 @@ function Tt({
2757
2751
  const p = new Set(c);
2758
2752
  return p.has(r) ? p.delete(r) : p.add(r), p;
2759
2753
  });
2760
- }, ye = ((C = A.call_purpose) == null ? void 0 : C.interaction_driver) || M.one_liner || "Interaction Detail", [xe, me] = T("signals"), ce = fe(null), [Re, De] = T(null);
2754
+ }, ye = ((z = A.call_purpose) == null ? void 0 : z.interaction_driver) || M.one_liner || "Interaction Detail", [xe, me] = T("signals"), ce = fe(null), [Re, De] = T(null);
2761
2755
  Ue(() => {
2762
2756
  if (i || !ce.current)
2763
2757
  return;
@@ -2779,8 +2773,8 @@ function Tt({
2779
2773
  if (y)
2780
2774
  return y(r);
2781
2775
  }, Be = async (r) => {
2782
- if (z) {
2783
- await z(r);
2776
+ if (C) {
2777
+ await C(r);
2784
2778
  return;
2785
2779
  }
2786
2780
  }, ve = async (r) => {
@@ -2925,9 +2919,9 @@ function Tt({
2925
2919
  /* @__PURE__ */ e(
2926
2920
  wt,
2927
2921
  {
2928
- transcript: P,
2922
+ transcript: H,
2929
2923
  audioUrl: a,
2930
- highlightedTurns: H,
2924
+ highlightedTurns: L,
2931
2925
  activeTurnIndex: ne,
2932
2926
  timelinePlaying: w,
2933
2927
  turnObservations: te,
@@ -2936,7 +2930,7 @@ function Tt({
2936
2930
  }
2937
2931
  ),
2938
2932
  /* @__PURE__ */ e(
2939
- Ct,
2933
+ zt,
2940
2934
  {
2941
2935
  sessionTitle: ye,
2942
2936
  messageThread: We,