chordia-ui 4.0.6 → 4.0.7

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 (36) hide show
  1. package/dist/MessageThread.cjs.js +4 -6
  2. package/dist/MessageThread.cjs.js.map +1 -1
  3. package/dist/MessageThread.es.js +348 -475
  4. package/dist/MessageThread.es.js.map +1 -1
  5. package/dist/ThinkingIndicator.cjs.js +17 -0
  6. package/dist/ThinkingIndicator.cjs.js.map +1 -0
  7. package/dist/{ChatMessage.es.js → ThinkingIndicator.es.js} +415 -288
  8. package/dist/ThinkingIndicator.es.js.map +1 -0
  9. package/dist/Toast.cjs.js +2 -2
  10. package/dist/Toast.cjs.js.map +1 -1
  11. package/dist/Toast.es.js +103 -115
  12. package/dist/Toast.es.js.map +1 -1
  13. package/dist/components/chat.cjs.js +1 -1
  14. package/dist/components/chat.cjs.js.map +1 -1
  15. package/dist/components/chat.es.js +5 -5
  16. package/dist/components/common.cjs.js +1 -1
  17. package/dist/components/common.es.js +1 -1
  18. package/dist/components/policies.cjs.js +1 -1
  19. package/dist/components/policies.cjs.js.map +1 -1
  20. package/dist/components/policies.es.js +357 -283
  21. package/dist/components/policies.es.js.map +1 -1
  22. package/dist/components/reports.cjs.js +2 -2
  23. package/dist/components/reports.cjs.js.map +1 -1
  24. package/dist/components/reports.es.js +25 -20
  25. package/dist/components/reports.es.js.map +1 -1
  26. package/dist/index.cjs.js +1 -1
  27. package/dist/index.es.js +5 -5
  28. package/package.json +1 -1
  29. package/src/components/common/AskCompass.jsx +2 -15
  30. package/src/components/policies/PoliciesPage.jsx +15 -13
  31. package/src/components/policies/PolicyCard.jsx +35 -5
  32. package/src/components/policies/PolicyDetailsDrawer.jsx +101 -34
  33. package/src/components/reports/ReportsList.jsx +8 -2
  34. package/dist/ChatMessage.cjs.js +0 -15
  35. package/dist/ChatMessage.cjs.js.map +0 -1
  36. package/dist/ChatMessage.es.js.map +0 -1
@@ -1,174 +1,48 @@
1
- import { jsxs as a, jsx as e, Fragment as oe } from "react/jsx-runtime";
2
- import { useState as u, useRef as te, useEffect as O, useMemo as xe } from "react";
3
- import { Send as me, PanelLeftClose as Ce, Search as Me, Pin as ue, MessageSquare as Te, Check as ze, X as Ie, MoreVertical as Ee, ChevronLeft as Fe, ChevronRight as De, Clock as fe, Hash as be, AtSign as Re, Paperclip as Be } from "lucide-react";
4
- import { C as he } from "./ChatMessage.es.js";
5
- const ye = "#2e3236", Le = "#e3e1d7", We = "#2e3236";
6
- function Pe({ size: d = 32 }) {
7
- const p = Math.round(d * 0.75);
8
- return /* @__PURE__ */ e(
9
- "div",
10
- {
11
- style: {
12
- width: d,
13
- height: d,
14
- borderRadius: "9999px",
15
- background: ye,
16
- display: "flex",
17
- alignItems: "center",
18
- justifyContent: "center",
19
- overflow: "hidden",
20
- flexShrink: 0
21
- },
22
- children: /* @__PURE__ */ a(
23
- "svg",
24
- {
25
- width: p,
26
- height: p,
27
- viewBox: "0 0 24 24",
28
- fill: "none",
29
- xmlns: "http://www.w3.org/2000/svg",
30
- style: { display: "block" },
31
- "aria-hidden": "true",
32
- children: [
33
- /* @__PURE__ */ e(
34
- "path",
35
- {
36
- d: "M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z",
37
- fill: ye
38
- }
39
- ),
40
- /* @__PURE__ */ e(
41
- "path",
42
- {
43
- d: "M12.0281 1.54883C15.1413 1.54883 17.9364 2.90958 19.8514 5.06845C21.4881 6.9137 22.4824 9.34236 22.4824 12.0032C22.4824 15.0939 21.1413 17.8711 19.0094 19.7849C17.1586 21.4463 14.7113 22.4575 12.0281 22.4575C9.34478 22.4575 6.74638 21.3828 4.8764 19.6286C2.84343 17.7216 1.57373 15.0107 1.57373 12.0032C1.57373 9.28897 2.60792 6.81646 4.30366 4.95829C6.21523 2.86349 8.9682 1.54883 12.0281 1.54883Z",
44
- stroke: "#E8D4A3",
45
- strokeWidth: "1.6",
46
- strokeMiterlimit: "10"
47
- }
48
- ),
49
- /* @__PURE__ */ e(
50
- "path",
51
- {
52
- d: "M12.0281 4.27832C14.237 4.27832 16.2239 5.21303 17.6307 6.69799C18.9409 8.08066 19.7525 9.94558 19.7525 12.0027C19.7525 14.2369 18.8032 16.2491 17.2862 17.6582C15.9086 18.9419 14.06 19.7271 12.0281 19.7271C9.99626 19.7271 8.46689 18.4265 7.08366 17.1225C5.58971 15.714 4.30371 14.2184 4.30371 12.0027C4.30371 10.0097 5.05856 8.19307 6.2979 6.82333C7.71148 5.26024 9.75514 4.27832 12.0281 4.27832Z",
53
- stroke: "#9BDB9C",
54
- strokeWidth: "1.2",
55
- strokeMiterlimit: "10"
56
- }
57
- ),
58
- /* @__PURE__ */ e(
59
- "path",
60
- {
61
- d: "M12.0282 7.00837C13.3327 7.00837 14.5209 7.50861 15.4101 8.32753C16.4016 9.24032 17.0226 10.5488 17.0226 12.0028C17.0226 13.3805 16.4651 14.6282 15.563 15.5315C14.6592 16.4369 13.4091 16.9973 12.0282 16.9973C10.6472 16.9973 10.1869 15.4702 9.29093 14.6164C8.33599 13.7065 7.03369 13.426 7.03369 12.0023C7.03369 10.7303 7.50919 9.56969 8.29158 8.68781C9.20662 7.65699 10.5415 7.00781 12.0282 7.00781V7.00837Z",
62
- stroke: "#4DE294",
63
- strokeWidth: "0.8",
64
- strokeMiterlimit: "10"
65
- }
66
- )
67
- ]
68
- }
69
- )
70
- }
71
- );
72
- }
73
- function Ae({
74
- phase: d = "thinking",
75
- label: p,
76
- // eslint-disable-next-line no-unused-vars
77
- toolSteps: k = [],
78
- // eslint-disable-next-line no-unused-vars
79
- elapsedMs: S,
80
- compact: c = !1
81
- }) {
82
- return /* @__PURE__ */ a(
83
- "div",
84
- {
85
- style: {
86
- display: "flex",
87
- alignItems: "center",
88
- gap: "8px",
89
- animation: "cuiThinkingPulse 1.6s ease-in-out infinite"
90
- },
91
- children: [
92
- /* @__PURE__ */ e("style", { children: `
93
- @keyframes cuiThinkingPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
94
- ` }),
95
- /* @__PURE__ */ e(Pe, { size: c ? 28 : 32 }),
96
- /* @__PURE__ */ e(
97
- "div",
98
- {
99
- style: {
100
- display: "inline-flex",
101
- alignItems: "center",
102
- background: Le,
103
- padding: c ? "8px 12px" : "12px 16px",
104
- borderRadius: "20px",
105
- maxWidth: "100%",
106
- minWidth: 0
107
- },
108
- children: /* @__PURE__ */ e(
109
- "p",
110
- {
111
- style: {
112
- margin: 0,
113
- fontSize: "14px",
114
- fontWeight: 400,
115
- lineHeight: "normal",
116
- color: We,
117
- fontFamily: "inherit",
118
- // Grow / shrink (and wrap) with the message text.
119
- overflowWrap: "anywhere",
120
- wordBreak: "break-word"
121
- },
122
- children: p || (d === "responding" || d === "generating" ? "Compass is generating response..." : "Thinking...")
123
- }
124
- )
125
- }
126
- )
127
- ]
128
- }
129
- );
130
- }
131
- const He = { error: (...d) => console.warn("toast.error:", ...d) };
132
- function qe({
133
- initialMessages: d = [],
134
- onSendMessage: p,
1
+ import { jsxs as l, jsx as e, Fragment as ie } from "react/jsx-runtime";
2
+ import { useState as d, useRef as te, useEffect as j, useMemo as xe } from "react";
3
+ import { Send as he, PanelLeftClose as we, Search as Ce, Pin as ue, MessageSquare as Te, Check as Me, X as ze, MoreVertical as Ie, ChevronLeft as Fe, ChevronRight as Ee, Clock as fe, Hash as be, AtSign as De, Paperclip as Re } from "lucide-react";
4
+ import { C as ye, T as Le } from "./ThinkingIndicator.es.js";
5
+ const Be = { error: (...h) => console.warn("toast.error:", ...h) };
6
+ function Ye({
7
+ initialMessages: h = [],
8
+ onSendMessage: b,
135
9
  onStreamMessage: k,
136
10
  // NEW: streaming version of onSendMessage
137
11
  onMessagesChange: S,
138
12
  // NEW: callback when messages array changes
139
13
  onCodeBlockClick: c,
140
14
  // callback when "Canvas" button clicked on a code block: ({ code, language }) => void
141
- placeholder: I = "Ask a question about this interaction...",
142
- title: P = "Chat with Chordia"
15
+ placeholder: B = "Ask a question about this interaction...",
16
+ title: O = "Chat with Chordia"
143
17
  }) {
144
- const [M, A] = u(d || []), [h, ne] = u(""), [K, E] = u(!1), [m, g] = u(!1), [y, H] = u(null), [F, V] = u("thinking"), [_, n] = u(null), [v, D] = u(0), b = te(null), R = te(null), N = te(null), Q = te(null), j = te(null), [$, Y] = u(!1), [re, q] = u(0);
145
- O(() => {
146
- var l;
147
- (l = b.current) == null || l.scrollIntoView({ behavior: "smooth" });
148
- }, [M, K]), O(() => {
149
- R.current && (R.current.style.height = "auto", R.current.style.height = `${Math.min(
150
- R.current.scrollHeight,
18
+ const [T, P] = d(h || []), [f, ne] = d(""), [U, I] = d(!1), [m, p] = d(!1), [y, A] = d(null), [F, V] = d("thinking"), [_, n] = d(null), [v, E] = d(0), x = te(null), D = te(null), N = te(null), G = te(null), H = te(null), [$, Y] = d(!1), [re, q] = d(0);
19
+ j(() => {
20
+ var a;
21
+ (a = x.current) == null || a.scrollIntoView({ behavior: "smooth" });
22
+ }, [T, U]), j(() => {
23
+ D.current && (D.current.style.height = "auto", D.current.style.height = `${Math.min(
24
+ D.current.scrollHeight,
151
25
  120
152
26
  )}px`);
153
- }, [h]), O(() => {
27
+ }, [f]), j(() => {
154
28
  if (S) {
155
- const l = [...M];
156
- y && l.push(y), S(l);
29
+ const a = [...T];
30
+ y && a.push(y), S(a);
157
31
  }
158
- }, [M, y, S]), O(() => {
159
- let l;
160
- return K && _ && (l = setInterval(() => {
161
- if (D(Date.now() - _), j.current) {
162
- const s = (Date.now() - j.current) / 1e3;
32
+ }, [T, y, S]), j(() => {
33
+ let a;
34
+ return U && _ && (a = setInterval(() => {
35
+ if (E(Date.now() - _), H.current) {
36
+ const s = (Date.now() - H.current) / 1e3;
163
37
  s >= 3 ? (Y(!0), q(Math.floor(s))) : Y(!1);
164
38
  }
165
- }, 500)), () => l && clearInterval(l);
166
- }, [K, _]);
167
- const X = () => {
168
- E(!1), g(!1), H(null), Q.current = null, V("thinking"), Y(!1), q(0), j.current = null, n(null), D(0), N.current && (N.current.abort(), N.current = null);
169
- }, ae = (l) => {
170
- if (l.startsWith("data: ")) {
171
- const s = l.slice(6);
39
+ }, 500)), () => a && clearInterval(a);
40
+ }, [U, _]);
41
+ const Z = () => {
42
+ I(!1), p(!1), A(null), G.current = null, V("thinking"), Y(!1), q(0), H.current = null, n(null), E(0), N.current && (N.current.abort(), N.current = null);
43
+ }, ae = (a) => {
44
+ if (a.startsWith("data: ")) {
45
+ const s = a.slice(6);
172
46
  if (s === "[DONE]")
173
47
  return { type: "done" };
174
48
  try {
@@ -178,18 +52,18 @@ function qe({
178
52
  }
179
53
  }
180
54
  return null;
181
- }, de = (l) => {
182
- var T, x;
183
- if (!((x = (T = l.choices) == null ? void 0 : T[0]) != null && x.delta))
55
+ }, de = (a) => {
56
+ var M, u;
57
+ if (!((u = (M = a.choices) == null ? void 0 : M[0]) != null && u.delta))
184
58
  return;
185
- j.current = Date.now(), Y(!1);
186
- const s = l.choices[0].delta;
59
+ H.current = Date.now(), Y(!1);
60
+ const s = a.choices[0].delta;
187
61
  if (s.tool_calls || s.tool_results) {
188
62
  V("tool");
189
63
  return;
190
64
  }
191
- s.content !== void 0 && (V("responding"), H((w) => {
192
- const U = w || {
65
+ s.content !== void 0 && (V("responding"), A((w) => {
66
+ const K = w || {
193
67
  id: Date.now().toString(),
194
68
  role: "assistant",
195
69
  content: "",
@@ -198,31 +72,31 @@ function qe({
198
72
  minute: "2-digit"
199
73
  }),
200
74
  isStreaming: !0
201
- }, Z = {
202
- ...U,
203
- content: (U.content || "") + (s.content || "")
75
+ }, J = {
76
+ ...K,
77
+ content: (K.content || "") + (s.content || "")
204
78
  };
205
- return Q.current = Z, Z;
79
+ return G.current = J, J;
206
80
  }));
207
- }, ee = async (l) => {
208
- const s = l.getReader(), T = new TextDecoder();
209
- let x = "";
81
+ }, ee = async (a) => {
82
+ const s = a.getReader(), M = new TextDecoder();
83
+ let u = "";
210
84
  try {
211
85
  for (; ; ) {
212
- const { done: w, value: U } = await s.read();
86
+ const { done: w, value: K } = await s.read();
213
87
  if (w)
214
88
  break;
215
- x += T.decode(U, { stream: !0 });
216
- const Z = x.split(`
89
+ u += M.decode(K, { stream: !0 });
90
+ const J = u.split(`
217
91
  `);
218
- x = Z.pop() || "";
219
- for (const ce of Z)
92
+ u = J.pop() || "";
93
+ for (const ce of J)
220
94
  if (ce.trim()) {
221
- const ie = ae(ce);
222
- if (ie) {
223
- if (ie.type === "done")
95
+ const oe = ae(ce);
96
+ if (oe) {
97
+ if (oe.type === "done")
224
98
  return;
225
- ie.type === "data" && de(ie.data);
99
+ oe.type === "data" && de(oe.data);
226
100
  }
227
101
  }
228
102
  }
@@ -230,24 +104,24 @@ function qe({
230
104
  s.releaseLock();
231
105
  }
232
106
  }, le = async () => {
233
- if (!h.trim() || m)
107
+ if (!f.trim() || m)
234
108
  return;
235
- const l = h.trim(), s = {
109
+ const a = f.trim(), s = {
236
110
  id: Date.now().toString(),
237
111
  role: "user",
238
- content: l,
112
+ content: a,
239
113
  timestamp: (/* @__PURE__ */ new Date()).toLocaleTimeString(void 0, {
240
114
  hour: "2-digit",
241
115
  minute: "2-digit"
242
116
  })
243
- }, T = [...M, s];
244
- A(T), ne(""), E(!0), g(!0), V("thinking"), n(Date.now()), j.current = Date.now(), N.current = new AbortController();
117
+ }, M = [...T, s];
118
+ P(M), ne(""), I(!0), p(!0), V("thinking"), n(Date.now()), H.current = Date.now(), N.current = new AbortController();
245
119
  try {
246
- let x;
120
+ let u;
247
121
  if (k)
248
- x = await k(l, T);
249
- else if (p)
250
- x = await p(l, T);
122
+ u = await k(a, M);
123
+ else if (b)
124
+ u = await b(a, M);
251
125
  else {
252
126
  setTimeout(() => {
253
127
  const w = {
@@ -259,31 +133,31 @@ function qe({
259
133
  minute: "2-digit"
260
134
  })
261
135
  };
262
- A((U) => [...U, w]), X();
136
+ P((K) => [...K, w]), Z();
263
137
  }, 1e3);
264
138
  return;
265
139
  }
266
- if (x instanceof ReadableStream)
267
- await ee(x);
268
- else if (x instanceof Response && x.body)
269
- await ee(x.body);
270
- else if (x && typeof x.then == "function") {
271
- const w = await x;
140
+ if (u instanceof ReadableStream)
141
+ await ee(u);
142
+ else if (u instanceof Response && u.body)
143
+ await ee(u.body);
144
+ else if (u && typeof u.then == "function") {
145
+ const w = await u;
272
146
  w instanceof ReadableStream ? await ee(w) : w instanceof Response && w.body && await ee(w.body);
273
147
  }
274
- Q.current && A((w) => [...w, {
275
- ...Q.current,
148
+ G.current && P((w) => [...w, {
149
+ ...G.current,
276
150
  isStreaming: !1
277
151
  }]);
278
- } catch (x) {
279
- x.name !== "AbortError" && (He.error("Failed to send message"), console.error("Stream error:", x));
152
+ } catch (u) {
153
+ u.name !== "AbortError" && (Be.error("Failed to send message"), console.error("Stream error:", u));
280
154
  } finally {
281
- X();
155
+ Z();
282
156
  }
283
- }, B = (l) => {
284
- l.key === "Enter" && !l.shiftKey && (l.preventDefault(), le());
157
+ }, R = (a) => {
158
+ a.key === "Enter" && !a.shiftKey && (a.preventDefault(), le());
285
159
  };
286
- return /* @__PURE__ */ a(
160
+ return /* @__PURE__ */ l(
287
161
  "div",
288
162
  {
289
163
  style: {
@@ -296,7 +170,7 @@ function qe({
296
170
  overflow: "hidden"
297
171
  },
298
172
  children: [
299
- P ? /* @__PURE__ */ a(
173
+ O ? /* @__PURE__ */ l(
300
174
  "div",
301
175
  {
302
176
  style: {
@@ -314,7 +188,7 @@ function qe({
314
188
  letterSpacing: "-0.01em",
315
189
  color: "var(--text-strong, rgba(30,33,37,0.92))"
316
190
  },
317
- children: P
191
+ children: O
318
192
  }
319
193
  ),
320
194
  /* @__PURE__ */ e(
@@ -342,7 +216,7 @@ function qe({
342
216
  display: "flex",
343
217
  flexDirection: "column"
344
218
  },
345
- children: M.length === 0 ? /* @__PURE__ */ e(
219
+ children: T.length === 0 ? /* @__PURE__ */ e(
346
220
  "div",
347
221
  {
348
222
  style: {
@@ -357,22 +231,22 @@ function qe({
357
231
  },
358
232
  children: "No messages yet. Start a conversation by asking a question below."
359
233
  }
360
- ) : /* @__PURE__ */ a(oe, { children: [
361
- M.map((l) => /* @__PURE__ */ e(
362
- he,
234
+ ) : /* @__PURE__ */ l(ie, { children: [
235
+ T.map((a) => /* @__PURE__ */ e(
236
+ ye,
363
237
  {
364
- role: l.role,
365
- content: l.content,
366
- html: l.html,
367
- timestamp: l.timestamp,
368
- toolBadges: l.toolBadges,
369
- isStreaming: l.isStreaming,
238
+ role: a.role,
239
+ content: a.content,
240
+ html: a.html,
241
+ timestamp: a.timestamp,
242
+ toolBadges: a.toolBadges,
243
+ isStreaming: a.isStreaming,
370
244
  onCodeBlockClick: c
371
245
  },
372
- l.id
246
+ a.id
373
247
  )),
374
248
  y && /* @__PURE__ */ e(
375
- he,
249
+ ye,
376
250
  {
377
251
  role: y.role,
378
252
  content: y.content,
@@ -382,19 +256,19 @@ function qe({
382
256
  },
383
257
  y.id
384
258
  ),
385
- K && (!y || $) && /* @__PURE__ */ e("div", { style: { marginBottom: "16px" }, children: /* @__PURE__ */ e(
386
- Ae,
259
+ U && (!y || $) && /* @__PURE__ */ e("div", { style: { marginBottom: "16px" }, children: /* @__PURE__ */ e(
260
+ Le,
387
261
  {
388
262
  phase: $ ? "tool" : F,
389
263
  elapsedMs: v,
390
264
  label: $ && re >= 30 ? "Compacting conversation — trimming context to stay sharp..." : $ && re >= 10 ? "Running background tasks..." : $ ? "Still working..." : void 0
391
265
  }
392
266
  ) }),
393
- /* @__PURE__ */ e("div", { ref: b })
267
+ /* @__PURE__ */ e("div", { ref: x })
394
268
  ] })
395
269
  }
396
270
  ),
397
- /* @__PURE__ */ a(
271
+ /* @__PURE__ */ l(
398
272
  "div",
399
273
  {
400
274
  style: {
@@ -403,7 +277,7 @@ function qe({
403
277
  background: "var(--paper-elevated, rgba(255,255,255,0.82))"
404
278
  },
405
279
  children: [
406
- /* @__PURE__ */ a(
280
+ /* @__PURE__ */ l(
407
281
  "div",
408
282
  {
409
283
  style: {
@@ -415,11 +289,11 @@ function qe({
415
289
  /* @__PURE__ */ e(
416
290
  "textarea",
417
291
  {
418
- ref: R,
419
- value: h,
420
- onChange: (l) => ne(l.target.value),
421
- onKeyDown: B,
422
- placeholder: I,
292
+ ref: D,
293
+ value: f,
294
+ onChange: (a) => ne(a.target.value),
295
+ onKeyDown: R,
296
+ placeholder: B,
423
297
  rows: 1,
424
298
  disabled: m,
425
299
  style: {
@@ -440,11 +314,11 @@ function qe({
440
314
  opacity: m ? 0.6 : 1,
441
315
  cursor: m ? "not-allowed" : "text"
442
316
  },
443
- onFocus: (l) => {
444
- m || (l.target.style.borderColor = "rgba(94, 136, 176, 0.35)");
317
+ onFocus: (a) => {
318
+ m || (a.target.style.borderColor = "rgba(94, 136, 176, 0.35)");
445
319
  },
446
- onBlur: (l) => {
447
- l.target.style.borderColor = "rgba(52, 58, 64, 0.18)";
320
+ onBlur: (a) => {
321
+ a.target.style.borderColor = "rgba(52, 58, 64, 0.18)";
448
322
  }
449
323
  }
450
324
  ),
@@ -452,14 +326,14 @@ function qe({
452
326
  "button",
453
327
  {
454
328
  onClick: le,
455
- disabled: !h.trim() || m,
329
+ disabled: !f.trim() || m,
456
330
  style: {
457
331
  padding: "10px 16px",
458
- background: h.trim() && !m ? "var(--Base-Strong, #0B0B0B)" : "#ECEEF2",
459
- color: h.trim() && !m ? "white" : "var(--text-base)",
332
+ background: f.trim() && !m ? "var(--Base-Strong, #0B0B0B)" : "#ECEEF2",
333
+ color: f.trim() && !m ? "white" : "var(--text-base)",
460
334
  border: "none",
461
335
  borderRadius: "var(--radius-md, 8px)",
462
- cursor: h.trim() && !m ? "pointer" : "not-allowed",
336
+ cursor: f.trim() && !m ? "pointer" : "not-allowed",
463
337
  display: "flex",
464
338
  alignItems: "center",
465
339
  gap: "6px",
@@ -468,7 +342,7 @@ function qe({
468
342
  transition: "all 0.15s ease",
469
343
  height: "42px"
470
344
  },
471
- children: m ? /* @__PURE__ */ a(oe, { children: [
345
+ children: m ? /* @__PURE__ */ l(ie, { children: [
472
346
  /* @__PURE__ */ e("style", { children: `
473
347
  @keyframes buttonSpin {
474
348
  from { transform: rotate(0deg); }
@@ -489,8 +363,8 @@ function qe({
489
363
  }
490
364
  ),
491
365
  "Sending..."
492
- ] }) : /* @__PURE__ */ a(oe, { children: [
493
- /* @__PURE__ */ e(me, { size: 16 }),
366
+ ] }) : /* @__PURE__ */ l(ie, { children: [
367
+ /* @__PURE__ */ e(he, { size: 16 }),
494
368
  "Send"
495
369
  ] })
496
370
  }
@@ -516,7 +390,7 @@ function qe({
516
390
  }
517
391
  );
518
392
  }
519
- const i = {
393
+ const o = {
520
394
  title: "#2e3236",
521
395
  // grey/strong
522
396
  muted: "#808183",
@@ -537,19 +411,19 @@ const i = {
537
411
  searchTrack: "#d8d8d8"
538
412
  // neutral/150
539
413
  };
540
- function je(d) {
541
- const p = d ? new Date(d) : null;
542
- if (!p || Number.isNaN(p.getTime()))
414
+ function We(h) {
415
+ const b = h ? new Date(h) : null;
416
+ if (!b || Number.isNaN(b.getTime()))
543
417
  return "Older";
544
418
  const k = /* @__PURE__ */ new Date(), S = new Date(k.getFullYear(), k.getMonth(), k.getDate()), c = new Date(S);
545
- return c.setDate(S.getDate() - 1), p >= S ? "Today" : p >= c ? "Yesterday" : "Older";
419
+ return c.setDate(S.getDate() - 1), b >= S ? "Today" : b >= c ? "Yesterday" : "Older";
546
420
  }
547
- const Oe = ["Today", "Yesterday", "Older"];
548
- function _e(d) {
549
- const p = d ? new Date(d) : null;
550
- if (!p || Number.isNaN(p.getTime()))
421
+ const Pe = ["Today", "Yesterday", "Older"];
422
+ function Ae(h) {
423
+ const b = h ? new Date(h) : null;
424
+ if (!b || Number.isNaN(b.getTime()))
551
425
  return "";
552
- const k = Date.now() - p.getTime(), S = Math.floor(k / 6e4);
426
+ const k = Date.now() - b.getTime(), S = Math.floor(k / 6e4);
553
427
  if (S < 1)
554
428
  return "just now";
555
429
  if (S < 60)
@@ -557,98 +431,98 @@ function _e(d) {
557
431
  const c = Math.floor(S / 60);
558
432
  if (c < 24)
559
433
  return `${c}h ago`;
560
- const I = Math.floor(c / 24);
561
- return I < 7 ? `${I}d ago` : p.toLocaleDateString(void 0, { month: "short", day: "numeric" });
434
+ const B = Math.floor(c / 24);
435
+ return B < 7 ? `${B}d ago` : b.toLocaleDateString(void 0, { month: "short", day: "numeric" });
562
436
  }
563
- function Ze({
564
- threads: d = [],
565
- activeThreadId: p,
437
+ function Ke({
438
+ threads: h = [],
439
+ activeThreadId: b,
566
440
  onSelectThread: k,
567
441
  onNewChat: S,
568
442
  onCollapse: c,
569
- onRenameThread: I,
570
- onDeleteThread: P,
571
- onPinThread: M,
572
- loading: A = !1,
573
- pageSize: h = 10,
443
+ onRenameThread: B,
444
+ onDeleteThread: O,
445
+ onPinThread: T,
446
+ loading: P = !1,
447
+ pageSize: f = 10,
574
448
  // Server-side pagination (controlled). When `onPageChange` is provided the
575
449
  // panel renders whatever `threads` it's given as the current page, drives the
576
450
  // controls from `page` / `pageCount`, and asks the parent to fetch new pages.
577
451
  page: ne,
578
- pageCount: K,
579
- onPageChange: E,
452
+ pageCount: U,
453
+ onPageChange: I,
580
454
  // Called when the All/Pinned filter changes. When provided, the parent is
581
455
  // expected to (re)fetch — e.g. hit the API with `&pinned=true`.
582
456
  onFilterChange: m
583
457
  }) {
584
- const g = typeof E == "function", [y, H] = u(""), [F, V] = u("all"), _ = (o) => {
585
- V(o), m == null || m(o);
586
- }, [n, v] = u(1), [D, b] = u(null), [R, N] = u(null), [Q, j] = u(""), [$, Y] = u(null), [re, q] = u(null), X = te(null);
587
- O(() => {
588
- R && X.current && (X.current.focus(), X.current.select());
589
- }, [R]), O(() => {
458
+ const p = typeof I == "function", [y, A] = d(""), [F, V] = d("all"), _ = (i) => {
459
+ V(i), m == null || m(i);
460
+ }, [n, v] = d(1), [E, x] = d(null), [D, N] = d(null), [G, H] = d(""), [$, Y] = d(null), [re, q] = d(null), Z = te(null);
461
+ j(() => {
462
+ D && Z.current && (Z.current.focus(), Z.current.select());
463
+ }, [D]), j(() => {
590
464
  if (!re)
591
465
  return;
592
- const o = () => q(null), r = (L) => {
466
+ const i = () => q(null), r = (L) => {
593
467
  L.key === "Escape" && q(null);
594
468
  };
595
- return document.addEventListener("click", o), document.addEventListener("keydown", r), () => {
596
- document.removeEventListener("click", o), document.removeEventListener("keydown", r);
469
+ return document.addEventListener("click", i), document.addEventListener("keydown", r), () => {
470
+ document.removeEventListener("click", i), document.removeEventListener("keydown", r);
597
471
  };
598
472
  }, [re]);
599
- const ae = typeof I == "function", de = typeof P == "function", ee = typeof M == "function", { groups: le, totalPages: B } = xe(() => {
600
- const o = y.trim().toLowerCase(), L = [...d.filter((f) => F === "pinned" && !f.pinned ? !1 : o ? (f.title || "").toLowerCase().includes(o) || (f.last_message_preview || "").toLowerCase().includes(o) : !0)].sort((f, z) => {
601
- if (f.pinned && !z.pinned)
473
+ const ae = typeof B == "function", de = typeof O == "function", ee = typeof T == "function", { groups: le, totalPages: R } = xe(() => {
474
+ const i = y.trim().toLowerCase(), L = [...h.filter((g) => F === "pinned" && !g.pinned ? !1 : i ? (g.title || "").toLowerCase().includes(i) || (g.last_message_preview || "").toLowerCase().includes(i) : !0)].sort((g, z) => {
475
+ if (g.pinned && !z.pinned)
602
476
  return -1;
603
- if (!f.pinned && z.pinned)
477
+ if (!g.pinned && z.pinned)
604
478
  return 1;
605
- const pe = new Date(f.updated_at || f.created_at || 0).getTime();
479
+ const pe = new Date(g.updated_at || g.created_at || 0).getTime();
606
480
  return new Date(z.updated_at || z.created_at || 0).getTime() - pe;
607
- }), G = g ? Math.max(1, K || 1) : Math.max(1, Math.ceil(L.length / h));
481
+ }), Q = p ? Math.max(1, U || 1) : Math.max(1, Math.ceil(L.length / f));
608
482
  let C;
609
- if (g)
483
+ if (p)
610
484
  C = L;
611
485
  else {
612
- const z = (Math.min(n, G) - 1) * h;
613
- C = L.slice(z, z + h);
486
+ const z = (Math.min(n, Q) - 1) * f;
487
+ C = L.slice(z, z + f);
614
488
  }
615
489
  const W = {};
616
- for (const f of C) {
617
- const z = je(f.updated_at || f.created_at);
618
- (W[z] || (W[z] = [])).push(f);
490
+ for (const g of C) {
491
+ const z = We(g.updated_at || g.created_at);
492
+ (W[z] || (W[z] = [])).push(g);
619
493
  }
620
- return { groups: Oe.map((f) => ({
621
- label: f,
622
- items: W[f] || []
623
- })).filter((f) => f.items.length > 0), totalPages: G };
624
- }, [d, y, F, n, h, g, K]), l = le.reduce((o, r) => o + r.items.length, 0), s = g ? Math.max(1, ne || 1) : n, T = g ? E : v;
625
- O(() => {
626
- g || v(1);
627
- }, [y, F, g]), O(() => {
628
- g || v((o) => Math.min(o, B));
629
- }, [B, g]);
630
- const x = xe(() => {
631
- if (B <= 5)
632
- return Array.from({ length: B }, (G, C) => C + 1);
494
+ return { groups: Pe.map((g) => ({
495
+ label: g,
496
+ items: W[g] || []
497
+ })).filter((g) => g.items.length > 0), totalPages: Q };
498
+ }, [h, y, F, n, f, p, U]), a = le.reduce((i, r) => i + r.items.length, 0), s = p ? Math.max(1, ne || 1) : n, M = p ? I : v;
499
+ j(() => {
500
+ p || v(1);
501
+ }, [y, F, p]), j(() => {
502
+ p || v((i) => Math.min(i, R));
503
+ }, [R, p]);
504
+ const u = xe(() => {
505
+ if (R <= 5)
506
+ return Array.from({ length: R }, (Q, C) => C + 1);
633
507
  let r = Math.max(1, s - 2);
634
- const L = Math.min(B, r + 5 - 1);
635
- return r = Math.max(1, L - 5 + 1), Array.from({ length: L - r + 1 }, (G, C) => r + C);
636
- }, [B, s]), w = (o, r) => {
637
- o.stopPropagation(), q(null), Y(null), N(r.id), j(r.title || r.name || "");
638
- }, U = (o) => {
639
- o && o.stopPropagation();
640
- const r = (Q || "").trim();
641
- R && r && (I == null || I(R, r)), N(null), j("");
642
- }, Z = (o) => {
643
- o && o.stopPropagation(), N(null), j("");
644
- }, ce = (o, r) => {
645
- o.stopPropagation(), q(null), N(null), Y(r.id);
646
- }, ie = (o) => {
647
- o && o.stopPropagation(), $ && (P == null || P($)), Y(null);
648
- }, ve = (o) => {
649
- o && o.stopPropagation(), Y(null);
650
- }, ke = (o, r) => {
651
- o.stopPropagation(), M == null || M(r.id, !r.pinned);
508
+ const L = Math.min(R, r + 5 - 1);
509
+ return r = Math.max(1, L - 5 + 1), Array.from({ length: L - r + 1 }, (Q, C) => r + C);
510
+ }, [R, s]), w = (i, r) => {
511
+ i.stopPropagation(), q(null), Y(null), N(r.id), H(r.title || r.name || "");
512
+ }, K = (i) => {
513
+ i && i.stopPropagation();
514
+ const r = (G || "").trim();
515
+ D && r && (B == null || B(D, r)), N(null), H("");
516
+ }, J = (i) => {
517
+ i && i.stopPropagation(), N(null), H("");
518
+ }, ce = (i, r) => {
519
+ i.stopPropagation(), q(null), N(null), Y(r.id);
520
+ }, oe = (i) => {
521
+ i && i.stopPropagation(), $ && (O == null || O($)), Y(null);
522
+ }, me = (i) => {
523
+ i && i.stopPropagation(), Y(null);
524
+ }, ve = (i, r) => {
525
+ i.stopPropagation(), T == null || T(r.id, !r.pinned);
652
526
  }, se = {
653
527
  display: "inline-flex",
654
528
  alignItems: "center",
@@ -660,11 +534,11 @@ function Ze({
660
534
  border: "none",
661
535
  borderRadius: "6px",
662
536
  cursor: "pointer",
663
- color: i.muted,
537
+ color: o.muted,
664
538
  transition: "all 0.12s ease",
665
539
  flexShrink: 0
666
540
  };
667
- return /* @__PURE__ */ a(
541
+ return /* @__PURE__ */ l(
668
542
  "div",
669
543
  {
670
544
  style: {
@@ -675,8 +549,8 @@ function Ze({
675
549
  overflow: "hidden"
676
550
  },
677
551
  children: [
678
- /* @__PURE__ */ a("div", { style: { padding: "16px 16px 0 16px", flexShrink: 0 }, children: [
679
- /* @__PURE__ */ a(
552
+ /* @__PURE__ */ l("div", { style: { padding: "16px 16px 0 16px", flexShrink: 0 }, children: [
553
+ /* @__PURE__ */ l(
680
554
  "div",
681
555
  {
682
556
  style: {
@@ -686,7 +560,7 @@ function Ze({
686
560
  height: "32px"
687
561
  },
688
562
  children: [
689
- /* @__PURE__ */ e("div", { style: { fontSize: "14px", fontWeight: 400, color: i.title }, children: "Threads" }),
563
+ /* @__PURE__ */ e("div", { style: { fontSize: "14px", fontWeight: 400, color: o.title }, children: "Threads" }),
690
564
  c && /* @__PURE__ */ e(
691
565
  "button",
692
566
  {
@@ -697,11 +571,11 @@ function Ze({
697
571
  ...se,
698
572
  width: "20px",
699
573
  height: "20px",
700
- color: i.muted
574
+ color: o.muted
701
575
  },
702
- onMouseEnter: (o) => o.currentTarget.style.background = i.hoverBg,
703
- onMouseLeave: (o) => o.currentTarget.style.background = "transparent",
704
- children: /* @__PURE__ */ e(Ce, { size: 20, strokeWidth: 1.5 })
576
+ onMouseEnter: (i) => i.currentTarget.style.background = o.hoverBg,
577
+ onMouseLeave: (i) => i.currentTarget.style.background = "transparent",
578
+ children: /* @__PURE__ */ e(we, { size: 20, strokeWidth: 1.5 })
705
579
  }
706
580
  )
707
581
  ]
@@ -714,12 +588,12 @@ function Ze({
714
588
  display: "flex",
715
589
  alignItems: "center",
716
590
  height: "32px",
717
- background: i.searchTrack,
591
+ background: o.searchTrack,
718
592
  borderRadius: "11px",
719
593
  padding: "1px",
720
594
  marginTop: "12px"
721
595
  },
722
- children: /* @__PURE__ */ a(
596
+ children: /* @__PURE__ */ l(
723
597
  "div",
724
598
  {
725
599
  style: {
@@ -733,13 +607,13 @@ function Ze({
733
607
  padding: "4px 8px"
734
608
  },
735
609
  children: [
736
- /* @__PURE__ */ e(Me, { size: 18, style: { color: i.faint, flexShrink: 0 } }),
610
+ /* @__PURE__ */ e(Ce, { size: 18, style: { color: o.faint, flexShrink: 0 } }),
737
611
  /* @__PURE__ */ e(
738
612
  "input",
739
613
  {
740
614
  type: "text",
741
615
  value: y,
742
- onChange: (o) => H(o.target.value),
616
+ onChange: (i) => A(i.target.value),
743
617
  placeholder: "Search",
744
618
  style: {
745
619
  flex: 1,
@@ -749,7 +623,7 @@ function Ze({
749
623
  background: "transparent",
750
624
  fontSize: "14px",
751
625
  fontWeight: 500,
752
- color: i.title
626
+ color: o.title
753
627
  }
754
628
  }
755
629
  )
@@ -758,7 +632,7 @@ function Ze({
758
632
  )
759
633
  }
760
634
  ),
761
- /* @__PURE__ */ a("div", { style: { display: "flex", alignItems: "center", gap: "16px", marginTop: "12px" }, children: [
635
+ /* @__PURE__ */ l("div", { style: { display: "flex", alignItems: "center", gap: "16px", marginTop: "12px" }, children: [
762
636
  /* @__PURE__ */ e(
763
637
  "button",
764
638
  {
@@ -777,13 +651,13 @@ function Ze({
777
651
  fontWeight: 400,
778
652
  lineHeight: "24px",
779
653
  transition: "all 0.12s ease",
780
- background: F === "all" ? i.pillDarkBg : i.hoverBg,
781
- color: F === "all" ? i.pillDarkText : i.title
654
+ background: F === "all" ? o.pillDarkBg : o.hoverBg,
655
+ color: F === "all" ? o.pillDarkText : o.title
782
656
  },
783
657
  children: "All"
784
658
  }
785
659
  ),
786
- /* @__PURE__ */ a(
660
+ /* @__PURE__ */ l(
787
661
  "button",
788
662
  {
789
663
  type: "button",
@@ -802,8 +676,8 @@ function Ze({
802
676
  fontWeight: 400,
803
677
  lineHeight: "24px",
804
678
  transition: "all 0.12s ease",
805
- background: F === "pinned" ? i.pillDarkBg : i.hoverBg,
806
- color: F === "pinned" ? i.pillDarkText : i.title
679
+ background: F === "pinned" ? o.pillDarkBg : o.hoverBg,
680
+ color: F === "pinned" ? o.pillDarkText : o.title
807
681
  },
808
682
  children: [
809
683
  /* @__PURE__ */ e(ue, { size: 16, style: { flexShrink: 0 } }),
@@ -813,29 +687,29 @@ function Ze({
813
687
  )
814
688
  ] })
815
689
  ] }),
816
- /* @__PURE__ */ e("div", { style: { flex: 1, overflowY: "auto", padding: "16px 16px 8px 16px" }, children: A ? /* @__PURE__ */ e("div", { style: { padding: "30px 16px", textAlign: "center", color: i.faint, fontSize: "13px" }, children: "Loading threads..." }) : l === 0 ? /* @__PURE__ */ e("div", { style: { padding: "30px 16px", textAlign: "center", color: i.faint, fontSize: "13px" }, children: y ? "No threads found" : F === "pinned" ? "No pinned threads" : "No threads yet" }) : le.map((o) => /* @__PURE__ */ a("div", { style: { marginBottom: "8px" }, children: [
690
+ /* @__PURE__ */ e("div", { style: { flex: 1, overflowY: "auto", padding: "16px 16px 8px 16px" }, children: P ? /* @__PURE__ */ e("div", { style: { padding: "30px 16px", textAlign: "center", color: o.faint, fontSize: "13px" }, children: "Loading threads..." }) : a === 0 ? /* @__PURE__ */ e("div", { style: { padding: "30px 16px", textAlign: "center", color: o.faint, fontSize: "13px" }, children: y ? "No threads found" : F === "pinned" ? "No pinned threads" : "No threads yet" }) : le.map((i) => /* @__PURE__ */ l("div", { style: { marginBottom: "8px" }, children: [
817
691
  /* @__PURE__ */ e(
818
692
  "div",
819
693
  {
820
694
  style: {
821
695
  fontSize: "13px",
822
696
  fontWeight: 500,
823
- color: i.title,
697
+ color: o.title,
824
698
  padding: "8px 0 4px 0"
825
699
  },
826
- children: o.label
700
+ children: i.label
827
701
  }
828
702
  ),
829
- o.items.map((r) => {
830
- const L = r.id === p, G = D === r.id, C = R === r.id, W = $ === r.id, J = re === r.id, f = ae || de, z = (ee || f) && (G || L || J) && !C && !W, pe = J || W || C, ge = L ? i.selectedBg : G || pe ? i.hoverBg : "transparent", Se = L || G || pe ? `1px solid ${i.border}` : "1px solid transparent";
831
- return /* @__PURE__ */ a(
703
+ i.items.map((r) => {
704
+ const L = r.id === b, Q = E === r.id, C = D === r.id, W = $ === r.id, X = re === r.id, g = ae || de, z = (ee || g) && (Q || L || X) && !C && !W, pe = X || W || C, ge = L ? o.selectedBg : Q || pe ? o.hoverBg : "transparent", ke = L || Q || pe ? `1px solid ${o.border}` : "1px solid transparent";
705
+ return /* @__PURE__ */ l(
832
706
  "div",
833
707
  {
834
708
  onClick: () => {
835
709
  C || W || k == null || k(r.id);
836
710
  },
837
- onMouseEnter: () => b(r.id),
838
- onMouseLeave: () => b((t) => t === r.id ? null : t),
711
+ onMouseEnter: () => x(r.id),
712
+ onMouseLeave: () => x((t) => t === r.id ? null : t),
839
713
  style: {
840
714
  display: "flex",
841
715
  alignItems: "center",
@@ -844,7 +718,7 @@ function Ze({
844
718
  marginBottom: "2px",
845
719
  borderRadius: "8px",
846
720
  background: ge,
847
- border: Se,
721
+ border: ke,
848
722
  cursor: C || W ? "default" : "pointer",
849
723
  transition: "background 0.12s ease, border-color 0.12s ease",
850
724
  boxSizing: "border-box",
@@ -861,7 +735,7 @@ function Ze({
861
735
  width: "40px",
862
736
  height: "40px",
863
737
  flexShrink: 0,
864
- color: i.muted
738
+ color: o.muted
865
739
  },
866
740
  children: /* @__PURE__ */ e(Te, { size: 20 })
867
741
  }
@@ -869,29 +743,29 @@ function Ze({
869
743
  C ? /* @__PURE__ */ e(
870
744
  "input",
871
745
  {
872
- ref: X,
746
+ ref: Z,
873
747
  type: "text",
874
- value: Q,
875
- onChange: (t) => j(t.target.value),
748
+ value: G,
749
+ onChange: (t) => H(t.target.value),
876
750
  onClick: (t) => t.stopPropagation(),
877
751
  onKeyDown: (t) => {
878
- t.stopPropagation(), t.key === "Enter" ? U(t) : t.key === "Escape" && Z(t);
752
+ t.stopPropagation(), t.key === "Enter" ? K(t) : t.key === "Escape" && J(t);
879
753
  },
880
754
  style: {
881
755
  flex: 1,
882
756
  minWidth: 0,
883
757
  fontSize: "14px",
884
758
  fontWeight: 600,
885
- color: i.title,
759
+ color: o.title,
886
760
  background: "#fff",
887
- border: `1px solid ${i.border}`,
761
+ border: `1px solid ${o.border}`,
888
762
  borderRadius: "6px",
889
763
  padding: "4px 8px",
890
764
  outline: "none",
891
765
  boxSizing: "border-box"
892
766
  }
893
767
  }
894
- ) : /* @__PURE__ */ a(
768
+ ) : /* @__PURE__ */ l(
895
769
  "div",
896
770
  {
897
771
  style: {
@@ -913,7 +787,7 @@ function Ze({
913
787
  maxWidth: "100%",
914
788
  fontSize: "14px",
915
789
  fontWeight: L ? 550 : 500,
916
- color: i.title,
790
+ color: o.title,
917
791
  overflow: "hidden",
918
792
  textOverflow: "ellipsis",
919
793
  whiteSpace: "nowrap",
@@ -922,7 +796,7 @@ function Ze({
922
796
  children: r.title || r.name || "Untitled thread"
923
797
  }
924
798
  ),
925
- W ? /* @__PURE__ */ a(
799
+ W ? /* @__PURE__ */ l(
926
800
  "div",
927
801
  {
928
802
  style: {
@@ -938,7 +812,7 @@ function Ze({
938
812
  style: {
939
813
  fontSize: "12px",
940
814
  fontWeight: 500,
941
- color: i.title
815
+ color: o.title
942
816
  },
943
817
  children: "Confirm: delete this thread?"
944
818
  }
@@ -947,14 +821,14 @@ function Ze({
947
821
  "button",
948
822
  {
949
823
  type: "button",
950
- onClick: ie,
824
+ onClick: oe,
951
825
  style: {
952
826
  padding: "3px 12px",
953
827
  fontSize: "12px",
954
828
  fontWeight: 600,
955
- color: i.title,
829
+ color: o.title,
956
830
  background: "#ECEEF2",
957
- border: `1px solid ${i.borderSubtle}`,
831
+ border: `1px solid ${o.borderSubtle}`,
958
832
  borderRadius: "6px",
959
833
  cursor: "pointer"
960
834
  },
@@ -967,59 +841,59 @@ function Ze({
967
841
  "button",
968
842
  {
969
843
  type: "button",
970
- onClick: ve,
844
+ onClick: me,
971
845
  style: {
972
846
  padding: "3px 6px",
973
847
  fontSize: "12px",
974
848
  fontWeight: 500,
975
- color: i.muted,
849
+ color: o.muted,
976
850
  background: "transparent",
977
851
  border: "none",
978
852
  cursor: "pointer"
979
853
  },
980
- onMouseEnter: (t) => t.currentTarget.style.color = i.title,
981
- onMouseLeave: (t) => t.currentTarget.style.color = i.muted,
854
+ onMouseEnter: (t) => t.currentTarget.style.color = o.title,
855
+ onMouseLeave: (t) => t.currentTarget.style.color = o.muted,
982
856
  children: "No"
983
857
  }
984
858
  )
985
859
  ]
986
860
  }
987
- ) : /* @__PURE__ */ a(
861
+ ) : /* @__PURE__ */ l(
988
862
  "div",
989
863
  {
990
864
  style: {
991
865
  fontSize: "12px",
992
- color: i.muted,
866
+ color: o.muted,
993
867
  overflow: "hidden",
994
868
  textOverflow: "ellipsis",
995
869
  whiteSpace: "nowrap",
996
870
  lineHeight: 1.5
997
871
  },
998
872
  children: [
999
- r.message_count != null && /* @__PURE__ */ a(oe, { children: [
873
+ r.message_count != null && /* @__PURE__ */ l(ie, { children: [
1000
874
  r.message_count,
1001
875
  " msg",
1002
876
  r.message_count !== 1 ? "s" : "",
1003
877
  " · "
1004
878
  ] }),
1005
- _e(r.updated_at || r.created_at)
879
+ Ae(r.updated_at || r.created_at)
1006
880
  ]
1007
881
  }
1008
882
  )
1009
883
  ]
1010
884
  }
1011
885
  ),
1012
- C && /* @__PURE__ */ a("div", { style: { display: "inline-flex", alignItems: "center", gap: "2px", flexShrink: 0 }, children: [
886
+ C && /* @__PURE__ */ l("div", { style: { display: "inline-flex", alignItems: "center", gap: "2px", flexShrink: 0 }, children: [
1013
887
  /* @__PURE__ */ e(
1014
888
  "button",
1015
889
  {
1016
890
  type: "button",
1017
891
  title: "Save",
1018
- onClick: U,
892
+ onClick: K,
1019
893
  style: { ...se, color: "#1f9d57" },
1020
894
  onMouseEnter: (t) => t.currentTarget.style.background = "rgba(31,157,87,0.12)",
1021
895
  onMouseLeave: (t) => t.currentTarget.style.background = "transparent",
1022
- children: /* @__PURE__ */ e(ze, { size: 15 })
896
+ children: /* @__PURE__ */ e(Me, { size: 15 })
1023
897
  }
1024
898
  ),
1025
899
  /* @__PURE__ */ e(
@@ -1027,11 +901,11 @@ function Ze({
1027
901
  {
1028
902
  type: "button",
1029
903
  title: "Cancel",
1030
- onClick: Z,
904
+ onClick: J,
1031
905
  style: se,
1032
906
  onMouseEnter: (t) => t.currentTarget.style.background = "rgba(0,0,0,0.06)",
1033
907
  onMouseLeave: (t) => t.currentTarget.style.background = "transparent",
1034
- children: /* @__PURE__ */ e(Ie, { size: 15 })
908
+ children: /* @__PURE__ */ e(ze, { size: 15 })
1035
909
  }
1036
910
  )
1037
911
  ] }),
@@ -1039,54 +913,54 @@ function Ze({
1039
913
  ue,
1040
914
  {
1041
915
  size: 14,
1042
- style: { color: i.title, flexShrink: 0 },
916
+ style: { color: o.title, flexShrink: 0 },
1043
917
  fill: "currentColor"
1044
918
  }
1045
919
  ),
1046
- z && /* @__PURE__ */ a("div", { style: { display: "inline-flex", alignItems: "center", gap: "2px", flexShrink: 0 }, children: [
920
+ z && /* @__PURE__ */ l("div", { style: { display: "inline-flex", alignItems: "center", gap: "2px", flexShrink: 0 }, children: [
1047
921
  ee && /* @__PURE__ */ e(
1048
922
  "button",
1049
923
  {
1050
924
  type: "button",
1051
925
  title: r.pinned ? "Unpin" : "Pin",
1052
- onClick: (t) => ke(t, r),
926
+ onClick: (t) => ve(t, r),
1053
927
  style: {
1054
928
  ...se,
1055
- color: r.pinned ? i.title : i.muted
929
+ color: r.pinned ? o.title : o.muted
1056
930
  },
1057
931
  onMouseEnter: (t) => {
1058
- t.currentTarget.style.background = "rgba(0,0,0,0.06)", t.currentTarget.style.color = i.title;
932
+ t.currentTarget.style.background = "rgba(0,0,0,0.06)", t.currentTarget.style.color = o.title;
1059
933
  },
1060
934
  onMouseLeave: (t) => {
1061
- t.currentTarget.style.background = "transparent", t.currentTarget.style.color = r.pinned ? i.title : i.muted;
935
+ t.currentTarget.style.background = "transparent", t.currentTarget.style.color = r.pinned ? o.title : o.muted;
1062
936
  },
1063
937
  children: /* @__PURE__ */ e(ue, { size: 14, fill: r.pinned ? "currentColor" : "none" })
1064
938
  }
1065
939
  ),
1066
- f && /* @__PURE__ */ e(
940
+ g && /* @__PURE__ */ e(
1067
941
  "button",
1068
942
  {
1069
943
  type: "button",
1070
944
  title: "More",
1071
945
  onClick: (t) => {
1072
- t.stopPropagation(), q((we) => we === r.id ? null : r.id);
946
+ t.stopPropagation(), q((Se) => Se === r.id ? null : r.id);
1073
947
  },
1074
948
  style: {
1075
949
  ...se,
1076
- color: J ? i.title : i.muted,
1077
- background: J ? "rgba(0,0,0,0.06)" : "transparent"
950
+ color: X ? o.title : o.muted,
951
+ background: X ? "rgba(0,0,0,0.06)" : "transparent"
1078
952
  },
1079
953
  onMouseEnter: (t) => {
1080
- t.currentTarget.style.background = "rgba(0,0,0,0.06)", t.currentTarget.style.color = i.title;
954
+ t.currentTarget.style.background = "rgba(0,0,0,0.06)", t.currentTarget.style.color = o.title;
1081
955
  },
1082
956
  onMouseLeave: (t) => {
1083
- t.currentTarget.style.background = J ? "rgba(0,0,0,0.06)" : "transparent", t.currentTarget.style.color = J ? i.title : i.muted;
957
+ t.currentTarget.style.background = X ? "rgba(0,0,0,0.06)" : "transparent", t.currentTarget.style.color = X ? o.title : o.muted;
1084
958
  },
1085
- children: /* @__PURE__ */ e(Ee, { size: 14 })
959
+ children: /* @__PURE__ */ e(Ie, { size: 14 })
1086
960
  }
1087
961
  )
1088
962
  ] }),
1089
- J && f && /* @__PURE__ */ a(
963
+ X && g && /* @__PURE__ */ l(
1090
964
  "div",
1091
965
  {
1092
966
  onClick: (t) => t.stopPropagation(),
@@ -1097,7 +971,7 @@ function Ze({
1097
971
  zIndex: 20,
1098
972
  width: "144px",
1099
973
  background: "#FFFFFF",
1100
- border: `1px solid ${i.border}`,
974
+ border: `1px solid ${o.border}`,
1101
975
  borderRadius: "4px",
1102
976
  boxShadow: "-2px 2px 4px rgba(0,0,0,0.1)",
1103
977
  overflow: "hidden"
@@ -1114,12 +988,12 @@ function Ze({
1114
988
  textAlign: "left",
1115
989
  padding: "12px",
1116
990
  fontSize: "13px",
1117
- color: i.title,
991
+ color: o.title,
1118
992
  background: "transparent",
1119
993
  border: "none",
1120
994
  cursor: "pointer"
1121
995
  },
1122
- onMouseEnter: (t) => t.currentTarget.style.background = i.hoverBg,
996
+ onMouseEnter: (t) => t.currentTarget.style.background = o.hoverBg,
1123
997
  onMouseLeave: (t) => t.currentTarget.style.background = "transparent",
1124
998
  children: "Rename"
1125
999
  }
@@ -1135,13 +1009,13 @@ function Ze({
1135
1009
  textAlign: "left",
1136
1010
  padding: "12px",
1137
1011
  fontSize: "13px",
1138
- color: i.title,
1012
+ color: o.title,
1139
1013
  background: "transparent",
1140
1014
  border: "none",
1141
- borderTop: ae ? `1px solid ${i.border}` : "none",
1015
+ borderTop: ae ? `1px solid ${o.border}` : "none",
1142
1016
  cursor: "pointer"
1143
1017
  },
1144
- onMouseEnter: (t) => t.currentTarget.style.background = i.hoverBg,
1018
+ onMouseEnter: (t) => t.currentTarget.style.background = o.hoverBg,
1145
1019
  onMouseLeave: (t) => t.currentTarget.style.background = "transparent",
1146
1020
  children: "Delete"
1147
1021
  }
@@ -1154,8 +1028,8 @@ function Ze({
1154
1028
  r.id
1155
1029
  );
1156
1030
  })
1157
- ] }, o.label)) }),
1158
- !A && B > 1 && /* @__PURE__ */ a(
1031
+ ] }, i.label)) }),
1032
+ !P && R > 1 && /* @__PURE__ */ l(
1159
1033
  "div",
1160
1034
  {
1161
1035
  style: {
@@ -1167,15 +1041,15 @@ function Ze({
1167
1041
  height: "64px",
1168
1042
  padding: "0 16px",
1169
1043
  boxSizing: "border-box",
1170
- borderTop: `1px solid ${i.border}`
1044
+ borderTop: `1px solid ${o.border}`
1171
1045
  },
1172
1046
  children: [
1173
- /* @__PURE__ */ a(
1047
+ /* @__PURE__ */ l(
1174
1048
  "button",
1175
1049
  {
1176
1050
  type: "button",
1177
1051
  disabled: s <= 1,
1178
- onClick: () => T(Math.max(1, s - 1)),
1052
+ onClick: () => M(Math.max(1, s - 1)),
1179
1053
  style: {
1180
1054
  display: "inline-flex",
1181
1055
  alignItems: "center",
@@ -1185,7 +1059,7 @@ function Ze({
1185
1059
  padding: "4px 8px",
1186
1060
  borderRadius: "10px",
1187
1061
  background: "#FFFFFF",
1188
- border: `1px solid ${i.borderSubtle}`,
1062
+ border: `1px solid ${o.borderSubtle}`,
1189
1063
  fontSize: "12px",
1190
1064
  lineHeight: "16px",
1191
1065
  color: "#0b0b0b",
@@ -1198,13 +1072,13 @@ function Ze({
1198
1072
  ]
1199
1073
  }
1200
1074
  ),
1201
- x.map((o) => {
1202
- const r = o === s;
1075
+ u.map((i) => {
1076
+ const r = i === s;
1203
1077
  return /* @__PURE__ */ e(
1204
1078
  "button",
1205
1079
  {
1206
1080
  type: "button",
1207
- onClick: () => T(o),
1081
+ onClick: () => M(i),
1208
1082
  style: {
1209
1083
  display: "inline-flex",
1210
1084
  alignItems: "center",
@@ -1218,20 +1092,20 @@ function Ze({
1218
1092
  cursor: "pointer",
1219
1093
  background: r ? "#0b0b0b" : "#FFFFFF",
1220
1094
  color: r ? "#FFFFFF" : "#0b0b0b",
1221
- border: r ? "1px solid #0b0b0b" : `1px solid ${i.borderSubtle}`,
1095
+ border: r ? "1px solid #0b0b0b" : `1px solid ${o.borderSubtle}`,
1222
1096
  fontWeight: r ? 600 : 400
1223
1097
  },
1224
- children: o
1098
+ children: i
1225
1099
  },
1226
- o
1100
+ i
1227
1101
  );
1228
1102
  }),
1229
- /* @__PURE__ */ a(
1103
+ /* @__PURE__ */ l(
1230
1104
  "button",
1231
1105
  {
1232
1106
  type: "button",
1233
- disabled: s >= B,
1234
- onClick: () => T(Math.min(B, s + 1)),
1107
+ disabled: s >= R,
1108
+ onClick: () => M(Math.min(R, s + 1)),
1235
1109
  style: {
1236
1110
  display: "inline-flex",
1237
1111
  alignItems: "center",
@@ -1241,16 +1115,16 @@ function Ze({
1241
1115
  padding: "4px 8px",
1242
1116
  borderRadius: "10px",
1243
1117
  background: "#FFFFFF",
1244
- border: `1px solid ${i.borderSubtle}`,
1118
+ border: `1px solid ${o.borderSubtle}`,
1245
1119
  fontSize: "12px",
1246
1120
  lineHeight: "16px",
1247
1121
  color: "#0b0b0b",
1248
- cursor: s >= B ? "default" : "pointer",
1249
- opacity: s >= B ? 0.5 : 1
1122
+ cursor: s >= R ? "default" : "pointer",
1123
+ opacity: s >= R ? 0.5 : 1
1250
1124
  },
1251
1125
  children: [
1252
1126
  "Next",
1253
- /* @__PURE__ */ e(De, { size: 12 })
1127
+ /* @__PURE__ */ e(Ee, { size: 12 })
1254
1128
  ]
1255
1129
  }
1256
1130
  )
@@ -1261,67 +1135,67 @@ function Ze({
1261
1135
  }
1262
1136
  );
1263
1137
  }
1264
- const Ne = { error: (...d) => console.warn("toast.error:", ...d) }, $e = () => ({ userData: { name: "User", email: "" } });
1265
- function Ge({
1266
- sessionTitle: d,
1267
- messages: p,
1138
+ const He = { error: (...h) => console.warn("toast.error:", ...h) }, je = () => ({ userData: { name: "User", email: "" } });
1139
+ function Ue({
1140
+ sessionTitle: h,
1141
+ messages: b,
1268
1142
  onSendMessage: k,
1269
1143
  currentUser: S
1270
1144
  }) {
1271
1145
  var _;
1272
- const [c, I] = u(""), [P, M] = u(!1), [A, h] = u(p || []), [ne, K] = u(!1), [E, m] = u(!1), { userData: g } = $e(), y = te(null), H = S || {
1273
- name: (g == null ? void 0 : g.name) || "You",
1274
- initials: ((_ = g == null ? void 0 : g.name) == null ? void 0 : _.split(" ").map((n) => n[0]).join("").toUpperCase()) || "YO",
1146
+ const [c, B] = d(""), [O, T] = d(!1), [P, f] = d(b || []), [ne, U] = d(!1), [I, m] = d(!1), { userData: p } = je(), y = te(null), A = S || {
1147
+ name: (p == null ? void 0 : p.name) || "You",
1148
+ initials: ((_ = p == null ? void 0 : p.name) == null ? void 0 : _.split(" ").map((n) => n[0]).join("").toUpperCase()) || "YO",
1275
1149
  color: "#6B7C93"
1276
1150
  };
1277
- O(() => {
1278
- h(p || []);
1279
- }, [p]), O(() => {
1151
+ j(() => {
1152
+ f(b || []);
1153
+ }, [b]), j(() => {
1280
1154
  y.current && y.current.scrollIntoView({ behavior: "smooth" });
1281
- }, [A]);
1155
+ }, [P]);
1282
1156
  const F = async () => {
1283
1157
  if (!c.trim())
1284
1158
  return;
1285
1159
  const n = c.trim();
1286
- I(""), m(!0);
1160
+ B(""), m(!0);
1287
1161
  const v = {
1288
1162
  id: `temp-${Date.now()}`,
1289
1163
  author: {
1290
- name: H.name,
1291
- role: (g == null ? void 0 : g.role) || "",
1292
- initials: H.initials,
1293
- color: H.color
1164
+ name: A.name,
1165
+ role: (p == null ? void 0 : p.role) || "",
1166
+ initials: A.initials,
1167
+ color: A.color
1294
1168
  },
1295
1169
  content: n,
1296
1170
  timestamp: "Just now",
1297
1171
  type: "comment",
1298
1172
  isOptimistic: !0
1299
1173
  };
1300
- if (h((D) => [...D, v]), k) {
1174
+ if (f((E) => [...E, v]), k) {
1301
1175
  try {
1302
- await k(n), h(
1303
- (D) => D.map(
1304
- (b) => b.id === v.id ? { ...b, isOptimistic: !1 } : b
1176
+ await k(n), f(
1177
+ (E) => E.map(
1178
+ (x) => x.id === v.id ? { ...x, isOptimistic: !1 } : x
1305
1179
  )
1306
1180
  );
1307
1181
  } catch {
1308
- h((b) => b.filter((R) => R.id !== v.id)), Ne.error("Failed to send message");
1182
+ f((x) => x.filter((D) => D.id !== v.id)), He.error("Failed to send message");
1309
1183
  } finally {
1310
1184
  m(!1);
1311
1185
  }
1312
1186
  return;
1313
1187
  }
1314
1188
  setTimeout(() => {
1315
- h(
1316
- (D) => D.map(
1317
- (b) => b.id === v.id ? { ...b, isOptimistic: !1 } : b
1189
+ f(
1190
+ (E) => E.map(
1191
+ (x) => x.id === v.id ? { ...x, isOptimistic: !1 } : x
1318
1192
  )
1319
1193
  ), m(!1);
1320
1194
  }, 500);
1321
1195
  }, V = (n) => {
1322
1196
  n.key === "Enter" && !n.shiftKey && (n.preventDefault(), F());
1323
1197
  };
1324
- return /* @__PURE__ */ a(
1198
+ return /* @__PURE__ */ l(
1325
1199
  "div",
1326
1200
  {
1327
1201
  style: {
@@ -1334,7 +1208,7 @@ function Ge({
1334
1208
  overflow: "hidden"
1335
1209
  },
1336
1210
  children: [
1337
- d && /* @__PURE__ */ a(
1211
+ h && /* @__PURE__ */ l(
1338
1212
  "div",
1339
1213
  {
1340
1214
  style: {
@@ -1355,7 +1229,7 @@ function Ge({
1355
1229
  children: "Session Discussion"
1356
1230
  }
1357
1231
  ),
1358
- d && /* @__PURE__ */ e(
1232
+ h && /* @__PURE__ */ e(
1359
1233
  "div",
1360
1234
  {
1361
1235
  style: {
@@ -1365,13 +1239,13 @@ function Ge({
1365
1239
  alignItems: "center",
1366
1240
  gap: "8px"
1367
1241
  },
1368
- children: /* @__PURE__ */ e("span", { children: d })
1242
+ children: /* @__PURE__ */ e("span", { children: h })
1369
1243
  }
1370
1244
  )
1371
1245
  ]
1372
1246
  }
1373
1247
  ),
1374
- /* @__PURE__ */ a(
1248
+ /* @__PURE__ */ l(
1375
1249
  "div",
1376
1250
  {
1377
1251
  style: {
@@ -1395,7 +1269,7 @@ function Ge({
1395
1269
  },
1396
1270
  children: "Loading messages..."
1397
1271
  }
1398
- ) : A.length === 0 ? /* @__PURE__ */ e(
1272
+ ) : P.length === 0 ? /* @__PURE__ */ e(
1399
1273
  "div",
1400
1274
  {
1401
1275
  style: {
@@ -1407,7 +1281,7 @@ function Ge({
1407
1281
  },
1408
1282
  children: "No messages yet. Start the conversation!"
1409
1283
  }
1410
- ) : A.map((n) => /* @__PURE__ */ a(
1284
+ ) : P.map((n) => /* @__PURE__ */ l(
1411
1285
  "div",
1412
1286
  {
1413
1287
  style: {
@@ -1455,8 +1329,8 @@ function Ge({
1455
1329
  children: /* @__PURE__ */ e(fe, { size: 14 })
1456
1330
  }
1457
1331
  ),
1458
- /* @__PURE__ */ a("div", { style: { flex: 1, minWidth: 0 }, children: [
1459
- /* @__PURE__ */ a(
1332
+ /* @__PURE__ */ l("div", { style: { flex: 1, minWidth: 0 }, children: [
1333
+ /* @__PURE__ */ l(
1460
1334
  "div",
1461
1335
  {
1462
1336
  style: {
@@ -1539,7 +1413,7 @@ function Ge({
1539
1413
  gap: "6px",
1540
1414
  marginTop: "8px"
1541
1415
  },
1542
- children: n.references.map((v, D) => /* @__PURE__ */ a(
1416
+ children: n.references.map((v, E) => /* @__PURE__ */ l(
1543
1417
  "button",
1544
1418
  {
1545
1419
  type: "button",
@@ -1557,11 +1431,11 @@ function Ge({
1557
1431
  transition: "all 0.15s ease",
1558
1432
  fontWeight: 550
1559
1433
  },
1560
- onMouseEnter: (b) => {
1561
- b.currentTarget.style.background = "rgba(255, 255, 255, 0.95)", b.currentTarget.style.borderColor = "rgba(52, 58, 64, 0.24)";
1434
+ onMouseEnter: (x) => {
1435
+ x.currentTarget.style.background = "rgba(255, 255, 255, 0.95)", x.currentTarget.style.borderColor = "rgba(52, 58, 64, 0.24)";
1562
1436
  },
1563
- onMouseLeave: (b) => {
1564
- b.currentTarget.style.background = "rgba(255, 255, 255, 0.7)", b.currentTarget.style.borderColor = "rgba(52, 58, 64, 0.16)";
1437
+ onMouseLeave: (x) => {
1438
+ x.currentTarget.style.background = "rgba(255, 255, 255, 0.7)", x.currentTarget.style.borderColor = "rgba(52, 58, 64, 0.16)";
1565
1439
  },
1566
1440
  children: [
1567
1441
  v.type === "timestamp" && /* @__PURE__ */ e(fe, { size: 12 }),
@@ -1569,7 +1443,7 @@ function Ge({
1569
1443
  v.label
1570
1444
  ]
1571
1445
  },
1572
- D
1446
+ E
1573
1447
  ))
1574
1448
  }
1575
1449
  )
@@ -1582,7 +1456,7 @@ function Ge({
1582
1456
  ]
1583
1457
  }
1584
1458
  ),
1585
- /* @__PURE__ */ a(
1459
+ /* @__PURE__ */ l(
1586
1460
  "div",
1587
1461
  {
1588
1462
  style: {
@@ -1591,7 +1465,7 @@ function Ge({
1591
1465
  background: "var(--paper-elevated, rgba(255,255,255,0.82))"
1592
1466
  },
1593
1467
  children: [
1594
- /* @__PURE__ */ a(
1468
+ /* @__PURE__ */ l(
1595
1469
  "div",
1596
1470
  {
1597
1471
  style: {
@@ -1607,7 +1481,7 @@ function Ge({
1607
1481
  width: "32px",
1608
1482
  height: "32px",
1609
1483
  borderRadius: "var(--radius-md, 8px)",
1610
- background: H.color,
1484
+ background: A.color,
1611
1485
  color: "white",
1612
1486
  display: "flex",
1613
1487
  alignItems: "center",
@@ -1617,10 +1491,10 @@ function Ge({
1617
1491
  flexShrink: 0,
1618
1492
  opacity: 0.9
1619
1493
  },
1620
- children: H.initials
1494
+ children: A.initials
1621
1495
  }
1622
1496
  ),
1623
- /* @__PURE__ */ a(
1497
+ /* @__PURE__ */ l(
1624
1498
  "div",
1625
1499
  {
1626
1500
  style: {
@@ -1634,10 +1508,10 @@ function Ge({
1634
1508
  "textarea",
1635
1509
  {
1636
1510
  value: c,
1637
- onChange: (n) => I(n.target.value),
1511
+ onChange: (n) => B(n.target.value),
1638
1512
  onKeyDown: V,
1639
- onFocus: () => M(!0),
1640
- onBlur: () => M(!1),
1513
+ onFocus: () => T(!0),
1514
+ onBlur: () => T(!1),
1641
1515
  placeholder: "Add a comment...",
1642
1516
  style: {
1643
1517
  width: "100%",
@@ -1647,7 +1521,7 @@ function Ge({
1647
1521
  fontSize: "var(--text-md, 13px)",
1648
1522
  color: "var(--text-base, rgba(30,33,37,0.78))",
1649
1523
  background: "white",
1650
- border: `1px solid ${P ? "rgba(94, 136, 176, 0.35)" : "rgba(52, 58, 64, 0.16)"}`,
1524
+ border: `1px solid ${O ? "rgba(94, 136, 176, 0.35)" : "rgba(52, 58, 64, 0.16)"}`,
1651
1525
  borderRadius: "var(--radius-md, 8px)",
1652
1526
  resize: "vertical",
1653
1527
  outline: "none",
@@ -1657,7 +1531,7 @@ function Ge({
1657
1531
  }
1658
1532
  }
1659
1533
  ),
1660
- /* @__PURE__ */ a(
1534
+ /* @__PURE__ */ l(
1661
1535
  "div",
1662
1536
  {
1663
1537
  style: {
@@ -1666,7 +1540,7 @@ function Ge({
1666
1540
  justifyContent: "space-between"
1667
1541
  },
1668
1542
  children: [
1669
- /* @__PURE__ */ a("div", { style: { display: "flex", gap: "4px" }, children: [
1543
+ /* @__PURE__ */ l("div", { style: { display: "flex", gap: "4px" }, children: [
1670
1544
  /* @__PURE__ */ e(
1671
1545
  "button",
1672
1546
  {
@@ -1689,7 +1563,7 @@ function Ge({
1689
1563
  n.currentTarget.style.background = "transparent", n.currentTarget.style.color = "rgba(30, 33, 37, 0.52)";
1690
1564
  },
1691
1565
  title: "Mention user",
1692
- children: /* @__PURE__ */ e(Re, { size: 16 })
1566
+ children: /* @__PURE__ */ e(De, { size: 16 })
1693
1567
  }
1694
1568
  ),
1695
1569
  /* @__PURE__ */ e(
@@ -1739,7 +1613,7 @@ function Ge({
1739
1613
  n.currentTarget.style.background = "transparent", n.currentTarget.style.color = "rgba(30, 33, 37, 0.52)";
1740
1614
  },
1741
1615
  title: "Attach file",
1742
- children: /* @__PURE__ */ e(Be, { size: 16 })
1616
+ children: /* @__PURE__ */ e(Re, { size: 16 })
1743
1617
  }
1744
1618
  )
1745
1619
  ] }),
@@ -1748,28 +1622,28 @@ function Ge({
1748
1622
  {
1749
1623
  type: "button",
1750
1624
  onClick: F,
1751
- disabled: !c.trim() || E,
1625
+ disabled: !c.trim() || I,
1752
1626
  style: {
1753
1627
  padding: "6px 12px",
1754
- background: c.trim() && !E ? "rgba(94, 136, 176, 0.85)" : "var(--border-subtle, rgba(52,58,64,0.08))",
1628
+ background: c.trim() && !I ? "rgba(94, 136, 176, 0.85)" : "var(--border-subtle, rgba(52,58,64,0.08))",
1755
1629
  border: "none",
1756
1630
  borderRadius: "6px",
1757
- color: c.trim() && !E ? "white" : "var(--text-faint, rgba(30,33,37,0.36))",
1631
+ color: c.trim() && !I ? "white" : "var(--text-faint, rgba(30,33,37,0.36))",
1758
1632
  fontSize: "var(--text-sm, 11px)",
1759
1633
  fontWeight: 600,
1760
- cursor: c.trim() && !E ? "pointer" : "not-allowed",
1634
+ cursor: c.trim() && !I ? "pointer" : "not-allowed",
1761
1635
  display: "flex",
1762
1636
  alignItems: "center",
1763
1637
  gap: "6px",
1764
1638
  transition: "all 0.15s ease"
1765
1639
  },
1766
1640
  onMouseEnter: (n) => {
1767
- c.trim() && !E && (n.currentTarget.style.background = "rgba(94, 136, 176, 1)");
1641
+ c.trim() && !I && (n.currentTarget.style.background = "rgba(94, 136, 176, 1)");
1768
1642
  },
1769
1643
  onMouseLeave: (n) => {
1770
- c.trim() && !E && (n.currentTarget.style.background = "rgba(94, 136, 176, 0.85)");
1644
+ c.trim() && !I && (n.currentTarget.style.background = "rgba(94, 136, 176, 0.85)");
1771
1645
  },
1772
- children: E ? /* @__PURE__ */ a(oe, { children: [
1646
+ children: I ? /* @__PURE__ */ l(ie, { children: [
1773
1647
  /* @__PURE__ */ e("style", { children: `
1774
1648
  @keyframes messageSpin {
1775
1649
  from { transform: rotate(0deg); }
@@ -1790,8 +1664,8 @@ function Ge({
1790
1664
  }
1791
1665
  ),
1792
1666
  "Sending..."
1793
- ] }) : /* @__PURE__ */ a(oe, { children: [
1794
- /* @__PURE__ */ e(me, { size: 14 }),
1667
+ ] }) : /* @__PURE__ */ l(ie, { children: [
1668
+ /* @__PURE__ */ e(he, { size: 14 }),
1795
1669
  "Send"
1796
1670
  ] })
1797
1671
  }
@@ -1805,7 +1679,7 @@ function Ge({
1805
1679
  ]
1806
1680
  }
1807
1681
  ),
1808
- /* @__PURE__ */ a(
1682
+ /* @__PURE__ */ l(
1809
1683
  "div",
1810
1684
  {
1811
1685
  style: {
@@ -1860,9 +1734,8 @@ function Ge({
1860
1734
  );
1861
1735
  }
1862
1736
  export {
1863
- qe as C,
1864
- Ge as M,
1865
- Ae as T,
1866
- Ze as a
1737
+ Ye as C,
1738
+ Ue as M,
1739
+ Ke as a
1867
1740
  };
1868
1741
  //# sourceMappingURL=MessageThread.es.js.map