chordia-ui 3.9.2 → 3.9.4

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 (42) hide show
  1. package/dist/ChatMessage.cjs.js +5 -5
  2. package/dist/ChatMessage.cjs.js.map +1 -1
  3. package/dist/ChatMessage.es.js +583 -353
  4. package/dist/ChatMessage.es.js.map +1 -1
  5. package/dist/MessageThread.cjs.js +15 -0
  6. package/dist/MessageThread.cjs.js.map +1 -0
  7. package/dist/MessageThread.es.js +1868 -0
  8. package/dist/MessageThread.es.js.map +1 -0
  9. package/dist/PerformancePanel.cjs.js +1 -1
  10. package/dist/PerformancePanel.cjs.js.map +1 -1
  11. package/dist/PerformancePanel.es.js +587 -749
  12. package/dist/PerformancePanel.es.js.map +1 -1
  13. package/dist/components/chat.cjs.js +1 -27
  14. package/dist/components/chat.cjs.js.map +1 -1
  15. package/dist/components/chat.es.js +276 -1617
  16. package/dist/components/chat.es.js.map +1 -1
  17. package/dist/components/layout.cjs.js +2 -2
  18. package/dist/components/layout.cjs.js.map +1 -1
  19. package/dist/components/layout.es.js +289 -272
  20. package/dist/components/layout.es.js.map +1 -1
  21. package/dist/components/media.cjs.js +1 -1
  22. package/dist/components/media.cjs.js.map +1 -1
  23. package/dist/components/media.es.js +4 -4
  24. package/dist/components/media.es.js.map +1 -1
  25. package/dist/components/reports.cjs.js +2 -2
  26. package/dist/components/reports.cjs.js.map +1 -1
  27. package/dist/components/reports.es.js +18 -18
  28. package/dist/components/reports.es.js.map +1 -1
  29. package/dist/index.cjs.js +1 -1
  30. package/dist/index.es.js +8 -8
  31. package/package.json +1 -1
  32. package/src/components/chat/ChatHistoryPanel.jsx +740 -388
  33. package/src/components/chat/ChatInterface.jsx +3 -3
  34. package/src/components/chat/ChatMessage.jsx +338 -48
  35. package/src/components/chat/ChatWelcome.jsx +386 -0
  36. package/src/components/chat/ThinkingIndicator.jsx +121 -275
  37. package/src/components/chat/index.js +1 -0
  38. package/src/components/layout/SplitPane.jsx +21 -13
  39. package/src/components/media/InteractionSummaryCard.jsx +1 -1
  40. package/src/components/performance/PerformanceDetailsPage.jsx +51 -52
  41. package/src/components/performance/performanceRangeFormat.js +3 -2
  42. package/src/components/reports/ReportsDetails.jsx +2 -2
@@ -0,0 +1,1868 @@
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,
135
+ onStreamMessage: k,
136
+ // NEW: streaming version of onSendMessage
137
+ onMessagesChange: S,
138
+ // NEW: callback when messages array changes
139
+ onCodeBlockClick: c,
140
+ // 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"
143
+ }) {
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,
151
+ 120
152
+ )}px`);
153
+ }, [h]), O(() => {
154
+ if (S) {
155
+ const l = [...M];
156
+ y && l.push(y), S(l);
157
+ }
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;
163
+ s >= 3 ? (Y(!0), q(Math.floor(s))) : Y(!1);
164
+ }
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);
172
+ if (s === "[DONE]")
173
+ return { type: "done" };
174
+ try {
175
+ return { type: "data", data: JSON.parse(s) };
176
+ } catch {
177
+ return null;
178
+ }
179
+ }
180
+ return null;
181
+ }, de = (l) => {
182
+ var T, x;
183
+ if (!((x = (T = l.choices) == null ? void 0 : T[0]) != null && x.delta))
184
+ return;
185
+ j.current = Date.now(), Y(!1);
186
+ const s = l.choices[0].delta;
187
+ if (s.tool_calls || s.tool_results) {
188
+ V("tool");
189
+ return;
190
+ }
191
+ s.content !== void 0 && (V("responding"), H((w) => {
192
+ const U = w || {
193
+ id: Date.now().toString(),
194
+ role: "assistant",
195
+ content: "",
196
+ timestamp: (/* @__PURE__ */ new Date()).toLocaleTimeString(void 0, {
197
+ hour: "2-digit",
198
+ minute: "2-digit"
199
+ }),
200
+ isStreaming: !0
201
+ }, Z = {
202
+ ...U,
203
+ content: (U.content || "") + (s.content || "")
204
+ };
205
+ return Q.current = Z, Z;
206
+ }));
207
+ }, ee = async (l) => {
208
+ const s = l.getReader(), T = new TextDecoder();
209
+ let x = "";
210
+ try {
211
+ for (; ; ) {
212
+ const { done: w, value: U } = await s.read();
213
+ if (w)
214
+ break;
215
+ x += T.decode(U, { stream: !0 });
216
+ const Z = x.split(`
217
+ `);
218
+ x = Z.pop() || "";
219
+ for (const ce of Z)
220
+ if (ce.trim()) {
221
+ const ie = ae(ce);
222
+ if (ie) {
223
+ if (ie.type === "done")
224
+ return;
225
+ ie.type === "data" && de(ie.data);
226
+ }
227
+ }
228
+ }
229
+ } finally {
230
+ s.releaseLock();
231
+ }
232
+ }, le = async () => {
233
+ if (!h.trim() || m)
234
+ return;
235
+ const l = h.trim(), s = {
236
+ id: Date.now().toString(),
237
+ role: "user",
238
+ content: l,
239
+ timestamp: (/* @__PURE__ */ new Date()).toLocaleTimeString(void 0, {
240
+ hour: "2-digit",
241
+ minute: "2-digit"
242
+ })
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();
245
+ try {
246
+ let x;
247
+ if (k)
248
+ x = await k(l, T);
249
+ else if (p)
250
+ x = await p(l, T);
251
+ else {
252
+ setTimeout(() => {
253
+ const w = {
254
+ id: (Date.now() + 1).toString(),
255
+ role: "assistant",
256
+ content: "This is a demonstration response. In a real implementation, this would connect to your LLM backend.",
257
+ timestamp: (/* @__PURE__ */ new Date()).toLocaleTimeString(void 0, {
258
+ hour: "2-digit",
259
+ minute: "2-digit"
260
+ })
261
+ };
262
+ A((U) => [...U, w]), X();
263
+ }, 1e3);
264
+ return;
265
+ }
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;
272
+ w instanceof ReadableStream ? await ee(w) : w instanceof Response && w.body && await ee(w.body);
273
+ }
274
+ Q.current && A((w) => [...w, {
275
+ ...Q.current,
276
+ isStreaming: !1
277
+ }]);
278
+ } catch (x) {
279
+ x.name !== "AbortError" && (He.error("Failed to send message"), console.error("Stream error:", x));
280
+ } finally {
281
+ X();
282
+ }
283
+ }, B = (l) => {
284
+ l.key === "Enter" && !l.shiftKey && (l.preventDefault(), le());
285
+ };
286
+ return /* @__PURE__ */ a(
287
+ "div",
288
+ {
289
+ style: {
290
+ display: "flex",
291
+ flexDirection: "column",
292
+ height: "100%",
293
+ border: "1px solid var(--border, rgba(52,58,64,0.12))",
294
+ borderRadius: "var(--radius-lg, 12px)",
295
+ background: "var(--paper-elevated, rgba(255,255,255,0.82))",
296
+ overflow: "hidden"
297
+ },
298
+ children: [
299
+ P ? /* @__PURE__ */ a(
300
+ "div",
301
+ {
302
+ style: {
303
+ padding: "16px 20px",
304
+ borderBottom: "1px solid var(--border-subtle, rgba(52,58,64,0.08))",
305
+ background: "var(--paper-elevated, rgba(255,255,255,0.82))"
306
+ },
307
+ children: [
308
+ /* @__PURE__ */ e(
309
+ "div",
310
+ {
311
+ style: {
312
+ fontSize: "var(--text-lg, 16px)",
313
+ fontWeight: 720,
314
+ letterSpacing: "-0.01em",
315
+ color: "var(--text-strong, rgba(30,33,37,0.92))"
316
+ },
317
+ children: P
318
+ }
319
+ ),
320
+ /* @__PURE__ */ e(
321
+ "div",
322
+ {
323
+ style: {
324
+ fontSize: "var(--text-sm, 11px)",
325
+ color: "var(--text-muted, rgba(30,33,37,0.56))",
326
+ marginTop: "2px"
327
+ },
328
+ children: "Ask questions, get insights from analyzed interactions"
329
+ }
330
+ )
331
+ ]
332
+ }
333
+ ) : null,
334
+ /* @__PURE__ */ e(
335
+ "div",
336
+ {
337
+ style: {
338
+ flex: 1,
339
+ minHeight: 0,
340
+ overflowY: "auto",
341
+ padding: "20px",
342
+ display: "flex",
343
+ flexDirection: "column"
344
+ },
345
+ children: M.length === 0 ? /* @__PURE__ */ e(
346
+ "div",
347
+ {
348
+ style: {
349
+ flex: 1,
350
+ display: "flex",
351
+ alignItems: "center",
352
+ justifyContent: "center",
353
+ color: "var(--text-faint, rgba(30,33,37,0.36))",
354
+ fontSize: "var(--text-md, 13px)",
355
+ textAlign: "center",
356
+ padding: "40px"
357
+ },
358
+ children: "No messages yet. Start a conversation by asking a question below."
359
+ }
360
+ ) : /* @__PURE__ */ a(oe, { children: [
361
+ M.map((l) => /* @__PURE__ */ e(
362
+ he,
363
+ {
364
+ role: l.role,
365
+ content: l.content,
366
+ html: l.html,
367
+ timestamp: l.timestamp,
368
+ toolBadges: l.toolBadges,
369
+ isStreaming: l.isStreaming,
370
+ onCodeBlockClick: c
371
+ },
372
+ l.id
373
+ )),
374
+ y && /* @__PURE__ */ e(
375
+ he,
376
+ {
377
+ role: y.role,
378
+ content: y.content,
379
+ timestamp: y.timestamp,
380
+ isStreaming: !0,
381
+ onCodeBlockClick: c
382
+ },
383
+ y.id
384
+ ),
385
+ K && (!y || $) && /* @__PURE__ */ e("div", { style: { marginBottom: "16px" }, children: /* @__PURE__ */ e(
386
+ Ae,
387
+ {
388
+ phase: $ ? "tool" : F,
389
+ elapsedMs: v,
390
+ label: $ && re >= 30 ? "Compacting conversation — trimming context to stay sharp..." : $ && re >= 10 ? "Running background tasks..." : $ ? "Still working..." : void 0
391
+ }
392
+ ) }),
393
+ /* @__PURE__ */ e("div", { ref: b })
394
+ ] })
395
+ }
396
+ ),
397
+ /* @__PURE__ */ a(
398
+ "div",
399
+ {
400
+ style: {
401
+ borderTop: "1px solid var(--border-subtle, rgba(52,58,64,0.08))",
402
+ padding: "16px 20px",
403
+ background: "var(--paper-elevated, rgba(255,255,255,0.82))"
404
+ },
405
+ children: [
406
+ /* @__PURE__ */ a(
407
+ "div",
408
+ {
409
+ style: {
410
+ display: "flex",
411
+ gap: "12px",
412
+ alignItems: "flex-end"
413
+ },
414
+ children: [
415
+ /* @__PURE__ */ e(
416
+ "textarea",
417
+ {
418
+ ref: R,
419
+ value: h,
420
+ onChange: (l) => ne(l.target.value),
421
+ onKeyDown: B,
422
+ placeholder: I,
423
+ rows: 1,
424
+ disabled: m,
425
+ style: {
426
+ flex: 1,
427
+ padding: "10px 14px",
428
+ fontSize: "var(--text-base, 14px)",
429
+ lineHeight: 1.5,
430
+ color: "var(--text-strong, rgba(30,33,37,0.92))",
431
+ background: "rgba(255, 255, 255, 0.95)",
432
+ border: "1px solid rgba(52, 58, 64, 0.18)",
433
+ borderRadius: "var(--radius-md, 8px)",
434
+ resize: "none",
435
+ outline: "none",
436
+ transition: "border-color 0.15s ease",
437
+ fontFamily: "inherit",
438
+ minHeight: "42px",
439
+ maxHeight: "120px",
440
+ opacity: m ? 0.6 : 1,
441
+ cursor: m ? "not-allowed" : "text"
442
+ },
443
+ onFocus: (l) => {
444
+ m || (l.target.style.borderColor = "rgba(94, 136, 176, 0.35)");
445
+ },
446
+ onBlur: (l) => {
447
+ l.target.style.borderColor = "rgba(52, 58, 64, 0.18)";
448
+ }
449
+ }
450
+ ),
451
+ /* @__PURE__ */ e(
452
+ "button",
453
+ {
454
+ onClick: le,
455
+ disabled: !h.trim() || m,
456
+ style: {
457
+ padding: "10px 16px",
458
+ background: h.trim() && !m ? "var(--Base-Strong, #0B0B0B)" : "#ECEEF2",
459
+ color: h.trim() && !m ? "white" : "var(--text-base)",
460
+ border: "none",
461
+ borderRadius: "var(--radius-md, 8px)",
462
+ cursor: h.trim() && !m ? "pointer" : "not-allowed",
463
+ display: "flex",
464
+ alignItems: "center",
465
+ gap: "6px",
466
+ fontSize: "var(--text-md, 13px)",
467
+ fontWeight: 650,
468
+ transition: "all 0.15s ease",
469
+ height: "42px"
470
+ },
471
+ children: m ? /* @__PURE__ */ a(oe, { children: [
472
+ /* @__PURE__ */ e("style", { children: `
473
+ @keyframes buttonSpin {
474
+ from { transform: rotate(0deg); }
475
+ to { transform: rotate(360deg); }
476
+ }
477
+ ` }),
478
+ /* @__PURE__ */ e(
479
+ "div",
480
+ {
481
+ style: {
482
+ width: "14px",
483
+ height: "14px",
484
+ border: "2px solid rgba(255, 255, 255, 0.3)",
485
+ borderTopColor: "white",
486
+ borderRadius: "50%",
487
+ animation: "buttonSpin 0.6s linear infinite"
488
+ }
489
+ }
490
+ ),
491
+ "Sending..."
492
+ ] }) : /* @__PURE__ */ a(oe, { children: [
493
+ /* @__PURE__ */ e(me, { size: 16 }),
494
+ "Send"
495
+ ] })
496
+ }
497
+ )
498
+ ]
499
+ }
500
+ ),
501
+ /* @__PURE__ */ e(
502
+ "div",
503
+ {
504
+ style: {
505
+ fontSize: "var(--text-sm, 11px)",
506
+ color: "var(--text-faint, rgba(30,33,37,0.36))",
507
+ marginTop: "8px"
508
+ },
509
+ children: "Press Enter to send, Shift+Enter for new line"
510
+ }
511
+ )
512
+ ]
513
+ }
514
+ )
515
+ ]
516
+ }
517
+ );
518
+ }
519
+ const i = {
520
+ title: "#2e3236",
521
+ // grey/strong
522
+ muted: "#808183",
523
+ // grey/muted
524
+ faint: "#989898",
525
+ // neutral/400
526
+ hoverBg: "#f3f7f7",
527
+ // grey/hover
528
+ selectedBg: "#FAF5E9",
529
+ // selected thread background
530
+ border: "#d9d9d9",
531
+ // grey/absent
532
+ borderSubtle: "#e6e6e6",
533
+ pillDarkBg: "#272727",
534
+ // neutral/850
535
+ pillDarkText: "#f2f2f0",
536
+ // neutral/50
537
+ searchTrack: "#d8d8d8"
538
+ // neutral/150
539
+ };
540
+ function je(d) {
541
+ const p = d ? new Date(d) : null;
542
+ if (!p || Number.isNaN(p.getTime()))
543
+ return "Older";
544
+ 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";
546
+ }
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()))
551
+ return "";
552
+ const k = Date.now() - p.getTime(), S = Math.floor(k / 6e4);
553
+ if (S < 1)
554
+ return "just now";
555
+ if (S < 60)
556
+ return `${S}m ago`;
557
+ const c = Math.floor(S / 60);
558
+ if (c < 24)
559
+ 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" });
562
+ }
563
+ function Ze({
564
+ threads: d = [],
565
+ activeThreadId: p,
566
+ onSelectThread: k,
567
+ onNewChat: S,
568
+ onCollapse: c,
569
+ onRenameThread: I,
570
+ onDeleteThread: P,
571
+ onPinThread: M,
572
+ loading: A = !1,
573
+ pageSize: h = 10,
574
+ // Server-side pagination (controlled). When `onPageChange` is provided the
575
+ // panel renders whatever `threads` it's given as the current page, drives the
576
+ // controls from `page` / `pageCount`, and asks the parent to fetch new pages.
577
+ page: ne,
578
+ pageCount: K,
579
+ onPageChange: E,
580
+ // Called when the All/Pinned filter changes. When provided, the parent is
581
+ // expected to (re)fetch — e.g. hit the API with `&pinned=true`.
582
+ onFilterChange: m
583
+ }) {
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(() => {
590
+ if (!re)
591
+ return;
592
+ const o = () => q(null), r = (L) => {
593
+ L.key === "Escape" && q(null);
594
+ };
595
+ return document.addEventListener("click", o), document.addEventListener("keydown", r), () => {
596
+ document.removeEventListener("click", o), document.removeEventListener("keydown", r);
597
+ };
598
+ }, [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)
602
+ return -1;
603
+ if (!f.pinned && z.pinned)
604
+ return 1;
605
+ const pe = new Date(f.updated_at || f.created_at || 0).getTime();
606
+ 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));
608
+ let C;
609
+ if (g)
610
+ C = L;
611
+ else {
612
+ const z = (Math.min(n, G) - 1) * h;
613
+ C = L.slice(z, z + h);
614
+ }
615
+ 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);
619
+ }
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);
633
+ 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);
652
+ }, se = {
653
+ display: "inline-flex",
654
+ alignItems: "center",
655
+ justifyContent: "center",
656
+ width: "24px",
657
+ height: "24px",
658
+ padding: 0,
659
+ background: "transparent",
660
+ border: "none",
661
+ borderRadius: "6px",
662
+ cursor: "pointer",
663
+ color: i.muted,
664
+ transition: "all 0.12s ease",
665
+ flexShrink: 0
666
+ };
667
+ return /* @__PURE__ */ a(
668
+ "div",
669
+ {
670
+ style: {
671
+ display: "flex",
672
+ flexDirection: "column",
673
+ height: "100%",
674
+ background: "#FFFFFF",
675
+ overflow: "hidden"
676
+ },
677
+ children: [
678
+ /* @__PURE__ */ a("div", { style: { padding: "16px 16px 0 16px", flexShrink: 0 }, children: [
679
+ /* @__PURE__ */ a(
680
+ "div",
681
+ {
682
+ style: {
683
+ display: "flex",
684
+ justifyContent: "space-between",
685
+ alignItems: "center",
686
+ height: "32px"
687
+ },
688
+ children: [
689
+ /* @__PURE__ */ e("div", { style: { fontSize: "14px", fontWeight: 400, color: i.title }, children: "Threads" }),
690
+ c && /* @__PURE__ */ e(
691
+ "button",
692
+ {
693
+ type: "button",
694
+ title: "Collapse",
695
+ onClick: c,
696
+ style: {
697
+ ...se,
698
+ width: "20px",
699
+ height: "20px",
700
+ color: i.muted
701
+ },
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 })
705
+ }
706
+ )
707
+ ]
708
+ }
709
+ ),
710
+ /* @__PURE__ */ e(
711
+ "div",
712
+ {
713
+ style: {
714
+ display: "flex",
715
+ alignItems: "center",
716
+ height: "32px",
717
+ background: i.searchTrack,
718
+ borderRadius: "11px",
719
+ padding: "1px",
720
+ marginTop: "12px"
721
+ },
722
+ children: /* @__PURE__ */ a(
723
+ "div",
724
+ {
725
+ style: {
726
+ display: "flex",
727
+ flex: 1,
728
+ alignItems: "center",
729
+ gap: "8px",
730
+ height: "30px",
731
+ background: "#FFFFFF",
732
+ borderRadius: "10px",
733
+ padding: "4px 8px"
734
+ },
735
+ children: [
736
+ /* @__PURE__ */ e(Me, { size: 18, style: { color: i.faint, flexShrink: 0 } }),
737
+ /* @__PURE__ */ e(
738
+ "input",
739
+ {
740
+ type: "text",
741
+ value: y,
742
+ onChange: (o) => H(o.target.value),
743
+ placeholder: "Search",
744
+ style: {
745
+ flex: 1,
746
+ minWidth: 0,
747
+ border: "none",
748
+ outline: "none",
749
+ background: "transparent",
750
+ fontSize: "14px",
751
+ fontWeight: 500,
752
+ color: i.title
753
+ }
754
+ }
755
+ )
756
+ ]
757
+ }
758
+ )
759
+ }
760
+ ),
761
+ /* @__PURE__ */ a("div", { style: { display: "flex", alignItems: "center", gap: "16px", marginTop: "12px" }, children: [
762
+ /* @__PURE__ */ e(
763
+ "button",
764
+ {
765
+ type: "button",
766
+ onClick: () => _("all"),
767
+ style: {
768
+ display: "inline-flex",
769
+ alignItems: "center",
770
+ justifyContent: "center",
771
+ height: "28px",
772
+ padding: "0 12px",
773
+ borderRadius: "8px",
774
+ border: "none",
775
+ cursor: "pointer",
776
+ fontSize: "14px",
777
+ fontWeight: 400,
778
+ lineHeight: "24px",
779
+ transition: "all 0.12s ease",
780
+ background: F === "all" ? i.pillDarkBg : i.hoverBg,
781
+ color: F === "all" ? i.pillDarkText : i.title
782
+ },
783
+ children: "All"
784
+ }
785
+ ),
786
+ /* @__PURE__ */ a(
787
+ "button",
788
+ {
789
+ type: "button",
790
+ onClick: () => _("pinned"),
791
+ style: {
792
+ display: "inline-flex",
793
+ alignItems: "center",
794
+ justifyContent: "center",
795
+ gap: "8px",
796
+ height: "28px",
797
+ padding: "0 16px",
798
+ borderRadius: "10px",
799
+ border: "none",
800
+ cursor: "pointer",
801
+ fontSize: "14px",
802
+ fontWeight: 400,
803
+ lineHeight: "24px",
804
+ transition: "all 0.12s ease",
805
+ background: F === "pinned" ? i.pillDarkBg : i.hoverBg,
806
+ color: F === "pinned" ? i.pillDarkText : i.title
807
+ },
808
+ children: [
809
+ /* @__PURE__ */ e(ue, { size: 16, style: { flexShrink: 0 } }),
810
+ "Pinned"
811
+ ]
812
+ }
813
+ )
814
+ ] })
815
+ ] }),
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: [
817
+ /* @__PURE__ */ e(
818
+ "div",
819
+ {
820
+ style: {
821
+ fontSize: "13px",
822
+ fontWeight: 500,
823
+ color: i.title,
824
+ padding: "8px 0 4px 0"
825
+ },
826
+ children: o.label
827
+ }
828
+ ),
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(
832
+ "div",
833
+ {
834
+ onClick: () => {
835
+ C || W || k == null || k(r.id);
836
+ },
837
+ onMouseEnter: () => b(r.id),
838
+ onMouseLeave: () => b((t) => t === r.id ? null : t),
839
+ style: {
840
+ display: "flex",
841
+ alignItems: "center",
842
+ gap: "4px",
843
+ padding: "8px 4px",
844
+ marginBottom: "2px",
845
+ borderRadius: "8px",
846
+ background: ge,
847
+ border: Se,
848
+ cursor: C || W ? "default" : "pointer",
849
+ transition: "background 0.12s ease, border-color 0.12s ease",
850
+ boxSizing: "border-box",
851
+ position: "relative"
852
+ },
853
+ children: [
854
+ /* @__PURE__ */ e(
855
+ "div",
856
+ {
857
+ style: {
858
+ display: "flex",
859
+ alignItems: "center",
860
+ justifyContent: "center",
861
+ width: "40px",
862
+ height: "40px",
863
+ flexShrink: 0,
864
+ color: i.muted
865
+ },
866
+ children: /* @__PURE__ */ e(Te, { size: 20 })
867
+ }
868
+ ),
869
+ C ? /* @__PURE__ */ e(
870
+ "input",
871
+ {
872
+ ref: X,
873
+ type: "text",
874
+ value: Q,
875
+ onChange: (t) => j(t.target.value),
876
+ onClick: (t) => t.stopPropagation(),
877
+ onKeyDown: (t) => {
878
+ t.stopPropagation(), t.key === "Enter" ? U(t) : t.key === "Escape" && Z(t);
879
+ },
880
+ style: {
881
+ flex: 1,
882
+ minWidth: 0,
883
+ fontSize: "14px",
884
+ fontWeight: 600,
885
+ color: i.title,
886
+ background: "#fff",
887
+ border: `1px solid ${i.border}`,
888
+ borderRadius: "6px",
889
+ padding: "4px 8px",
890
+ outline: "none",
891
+ boxSizing: "border-box"
892
+ }
893
+ }
894
+ ) : /* @__PURE__ */ a(
895
+ "div",
896
+ {
897
+ style: {
898
+ flex: 1,
899
+ minWidth: 0,
900
+ display: "flex",
901
+ flexDirection: "column",
902
+ gap: "4px",
903
+ textAlign: "left"
904
+ },
905
+ children: [
906
+ /* @__PURE__ */ e(
907
+ "div",
908
+ {
909
+ title: r.title || r.name || "Untitled thread",
910
+ style: {
911
+ display: "block",
912
+ minWidth: 0,
913
+ maxWidth: "100%",
914
+ fontSize: "14px",
915
+ fontWeight: L ? 550 : 500,
916
+ color: i.title,
917
+ overflow: "hidden",
918
+ textOverflow: "ellipsis",
919
+ whiteSpace: "nowrap",
920
+ lineHeight: 1.2
921
+ },
922
+ children: r.title || r.name || "Untitled thread"
923
+ }
924
+ ),
925
+ W ? /* @__PURE__ */ a(
926
+ "div",
927
+ {
928
+ style: {
929
+ display: "flex",
930
+ alignItems: "center",
931
+ flexWrap: "wrap",
932
+ gap: "8px"
933
+ },
934
+ children: [
935
+ /* @__PURE__ */ e(
936
+ "span",
937
+ {
938
+ style: {
939
+ fontSize: "12px",
940
+ fontWeight: 500,
941
+ color: i.title
942
+ },
943
+ children: "Confirm: delete this thread?"
944
+ }
945
+ ),
946
+ /* @__PURE__ */ e(
947
+ "button",
948
+ {
949
+ type: "button",
950
+ onClick: ie,
951
+ style: {
952
+ padding: "3px 12px",
953
+ fontSize: "12px",
954
+ fontWeight: 600,
955
+ color: i.title,
956
+ background: "#ECEEF2",
957
+ border: `1px solid ${i.borderSubtle}`,
958
+ borderRadius: "6px",
959
+ cursor: "pointer"
960
+ },
961
+ onMouseEnter: (t) => t.currentTarget.style.background = "#E2E5EA",
962
+ onMouseLeave: (t) => t.currentTarget.style.background = "#ECEEF2",
963
+ children: "Yes"
964
+ }
965
+ ),
966
+ /* @__PURE__ */ e(
967
+ "button",
968
+ {
969
+ type: "button",
970
+ onClick: ve,
971
+ style: {
972
+ padding: "3px 6px",
973
+ fontSize: "12px",
974
+ fontWeight: 500,
975
+ color: i.muted,
976
+ background: "transparent",
977
+ border: "none",
978
+ cursor: "pointer"
979
+ },
980
+ onMouseEnter: (t) => t.currentTarget.style.color = i.title,
981
+ onMouseLeave: (t) => t.currentTarget.style.color = i.muted,
982
+ children: "No"
983
+ }
984
+ )
985
+ ]
986
+ }
987
+ ) : /* @__PURE__ */ a(
988
+ "div",
989
+ {
990
+ style: {
991
+ fontSize: "12px",
992
+ color: i.muted,
993
+ overflow: "hidden",
994
+ textOverflow: "ellipsis",
995
+ whiteSpace: "nowrap",
996
+ lineHeight: 1.5
997
+ },
998
+ children: [
999
+ r.message_count != null && /* @__PURE__ */ a(oe, { children: [
1000
+ r.message_count,
1001
+ " msg",
1002
+ r.message_count !== 1 ? "s" : "",
1003
+ " · "
1004
+ ] }),
1005
+ _e(r.updated_at || r.created_at)
1006
+ ]
1007
+ }
1008
+ )
1009
+ ]
1010
+ }
1011
+ ),
1012
+ C && /* @__PURE__ */ a("div", { style: { display: "inline-flex", alignItems: "center", gap: "2px", flexShrink: 0 }, children: [
1013
+ /* @__PURE__ */ e(
1014
+ "button",
1015
+ {
1016
+ type: "button",
1017
+ title: "Save",
1018
+ onClick: U,
1019
+ style: { ...se, color: "#1f9d57" },
1020
+ onMouseEnter: (t) => t.currentTarget.style.background = "rgba(31,157,87,0.12)",
1021
+ onMouseLeave: (t) => t.currentTarget.style.background = "transparent",
1022
+ children: /* @__PURE__ */ e(ze, { size: 15 })
1023
+ }
1024
+ ),
1025
+ /* @__PURE__ */ e(
1026
+ "button",
1027
+ {
1028
+ type: "button",
1029
+ title: "Cancel",
1030
+ onClick: Z,
1031
+ style: se,
1032
+ onMouseEnter: (t) => t.currentTarget.style.background = "rgba(0,0,0,0.06)",
1033
+ onMouseLeave: (t) => t.currentTarget.style.background = "transparent",
1034
+ children: /* @__PURE__ */ e(Ie, { size: 15 })
1035
+ }
1036
+ )
1037
+ ] }),
1038
+ !C && !W && !z && r.pinned && /* @__PURE__ */ e(
1039
+ ue,
1040
+ {
1041
+ size: 14,
1042
+ style: { color: i.title, flexShrink: 0 },
1043
+ fill: "currentColor"
1044
+ }
1045
+ ),
1046
+ z && /* @__PURE__ */ a("div", { style: { display: "inline-flex", alignItems: "center", gap: "2px", flexShrink: 0 }, children: [
1047
+ ee && /* @__PURE__ */ e(
1048
+ "button",
1049
+ {
1050
+ type: "button",
1051
+ title: r.pinned ? "Unpin" : "Pin",
1052
+ onClick: (t) => ke(t, r),
1053
+ style: {
1054
+ ...se,
1055
+ color: r.pinned ? i.title : i.muted
1056
+ },
1057
+ onMouseEnter: (t) => {
1058
+ t.currentTarget.style.background = "rgba(0,0,0,0.06)", t.currentTarget.style.color = i.title;
1059
+ },
1060
+ onMouseLeave: (t) => {
1061
+ t.currentTarget.style.background = "transparent", t.currentTarget.style.color = r.pinned ? i.title : i.muted;
1062
+ },
1063
+ children: /* @__PURE__ */ e(ue, { size: 14, fill: r.pinned ? "currentColor" : "none" })
1064
+ }
1065
+ ),
1066
+ f && /* @__PURE__ */ e(
1067
+ "button",
1068
+ {
1069
+ type: "button",
1070
+ title: "More",
1071
+ onClick: (t) => {
1072
+ t.stopPropagation(), q((we) => we === r.id ? null : r.id);
1073
+ },
1074
+ style: {
1075
+ ...se,
1076
+ color: J ? i.title : i.muted,
1077
+ background: J ? "rgba(0,0,0,0.06)" : "transparent"
1078
+ },
1079
+ onMouseEnter: (t) => {
1080
+ t.currentTarget.style.background = "rgba(0,0,0,0.06)", t.currentTarget.style.color = i.title;
1081
+ },
1082
+ onMouseLeave: (t) => {
1083
+ t.currentTarget.style.background = J ? "rgba(0,0,0,0.06)" : "transparent", t.currentTarget.style.color = J ? i.title : i.muted;
1084
+ },
1085
+ children: /* @__PURE__ */ e(Ee, { size: 14 })
1086
+ }
1087
+ )
1088
+ ] }),
1089
+ J && f && /* @__PURE__ */ a(
1090
+ "div",
1091
+ {
1092
+ onClick: (t) => t.stopPropagation(),
1093
+ style: {
1094
+ position: "absolute",
1095
+ top: "calc(100% - 2px)",
1096
+ right: "8px",
1097
+ zIndex: 20,
1098
+ width: "144px",
1099
+ background: "#FFFFFF",
1100
+ border: `1px solid ${i.border}`,
1101
+ borderRadius: "4px",
1102
+ boxShadow: "-2px 2px 4px rgba(0,0,0,0.1)",
1103
+ overflow: "hidden"
1104
+ },
1105
+ children: [
1106
+ ae && /* @__PURE__ */ e(
1107
+ "button",
1108
+ {
1109
+ type: "button",
1110
+ onClick: (t) => w(t, r),
1111
+ style: {
1112
+ display: "block",
1113
+ width: "100%",
1114
+ textAlign: "left",
1115
+ padding: "12px",
1116
+ fontSize: "13px",
1117
+ color: i.title,
1118
+ background: "transparent",
1119
+ border: "none",
1120
+ cursor: "pointer"
1121
+ },
1122
+ onMouseEnter: (t) => t.currentTarget.style.background = i.hoverBg,
1123
+ onMouseLeave: (t) => t.currentTarget.style.background = "transparent",
1124
+ children: "Rename"
1125
+ }
1126
+ ),
1127
+ de && /* @__PURE__ */ e(
1128
+ "button",
1129
+ {
1130
+ type: "button",
1131
+ onClick: (t) => ce(t, r),
1132
+ style: {
1133
+ display: "block",
1134
+ width: "100%",
1135
+ textAlign: "left",
1136
+ padding: "12px",
1137
+ fontSize: "13px",
1138
+ color: i.title,
1139
+ background: "transparent",
1140
+ border: "none",
1141
+ borderTop: ae ? `1px solid ${i.border}` : "none",
1142
+ cursor: "pointer"
1143
+ },
1144
+ onMouseEnter: (t) => t.currentTarget.style.background = i.hoverBg,
1145
+ onMouseLeave: (t) => t.currentTarget.style.background = "transparent",
1146
+ children: "Delete"
1147
+ }
1148
+ )
1149
+ ]
1150
+ }
1151
+ )
1152
+ ]
1153
+ },
1154
+ r.id
1155
+ );
1156
+ })
1157
+ ] }, o.label)) }),
1158
+ !A && B > 1 && /* @__PURE__ */ a(
1159
+ "div",
1160
+ {
1161
+ style: {
1162
+ flexShrink: 0,
1163
+ display: "flex",
1164
+ alignItems: "center",
1165
+ justifyContent: "center",
1166
+ gap: "6px",
1167
+ height: "64px",
1168
+ padding: "0 16px",
1169
+ boxSizing: "border-box",
1170
+ borderTop: `1px solid ${i.border}`
1171
+ },
1172
+ children: [
1173
+ /* @__PURE__ */ a(
1174
+ "button",
1175
+ {
1176
+ type: "button",
1177
+ disabled: s <= 1,
1178
+ onClick: () => T(Math.max(1, s - 1)),
1179
+ style: {
1180
+ display: "inline-flex",
1181
+ alignItems: "center",
1182
+ justifyContent: "center",
1183
+ gap: "4px",
1184
+ height: "24px",
1185
+ padding: "4px 8px",
1186
+ borderRadius: "10px",
1187
+ background: "#FFFFFF",
1188
+ border: `1px solid ${i.borderSubtle}`,
1189
+ fontSize: "12px",
1190
+ lineHeight: "16px",
1191
+ color: "#0b0b0b",
1192
+ cursor: s <= 1 ? "default" : "pointer",
1193
+ opacity: s <= 1 ? 0.5 : 1
1194
+ },
1195
+ children: [
1196
+ /* @__PURE__ */ e(Fe, { size: 12 }),
1197
+ "Back"
1198
+ ]
1199
+ }
1200
+ ),
1201
+ x.map((o) => {
1202
+ const r = o === s;
1203
+ return /* @__PURE__ */ e(
1204
+ "button",
1205
+ {
1206
+ type: "button",
1207
+ onClick: () => T(o),
1208
+ style: {
1209
+ display: "inline-flex",
1210
+ alignItems: "center",
1211
+ justifyContent: "center",
1212
+ height: "24px",
1213
+ minWidth: "22px",
1214
+ padding: "4px 8px",
1215
+ borderRadius: "10px",
1216
+ fontSize: "12px",
1217
+ lineHeight: "16px",
1218
+ cursor: "pointer",
1219
+ background: r ? "#0b0b0b" : "#FFFFFF",
1220
+ color: r ? "#FFFFFF" : "#0b0b0b",
1221
+ border: r ? "1px solid #0b0b0b" : `1px solid ${i.borderSubtle}`,
1222
+ fontWeight: r ? 600 : 400
1223
+ },
1224
+ children: o
1225
+ },
1226
+ o
1227
+ );
1228
+ }),
1229
+ /* @__PURE__ */ a(
1230
+ "button",
1231
+ {
1232
+ type: "button",
1233
+ disabled: s >= B,
1234
+ onClick: () => T(Math.min(B, s + 1)),
1235
+ style: {
1236
+ display: "inline-flex",
1237
+ alignItems: "center",
1238
+ justifyContent: "center",
1239
+ gap: "4px",
1240
+ height: "24px",
1241
+ padding: "4px 8px",
1242
+ borderRadius: "10px",
1243
+ background: "#FFFFFF",
1244
+ border: `1px solid ${i.borderSubtle}`,
1245
+ fontSize: "12px",
1246
+ lineHeight: "16px",
1247
+ color: "#0b0b0b",
1248
+ cursor: s >= B ? "default" : "pointer",
1249
+ opacity: s >= B ? 0.5 : 1
1250
+ },
1251
+ children: [
1252
+ "Next",
1253
+ /* @__PURE__ */ e(De, { size: 12 })
1254
+ ]
1255
+ }
1256
+ )
1257
+ ]
1258
+ }
1259
+ )
1260
+ ]
1261
+ }
1262
+ );
1263
+ }
1264
+ const Ne = { error: (...d) => console.warn("toast.error:", ...d) }, $e = () => ({ userData: { name: "User", email: "" } });
1265
+ function Ge({
1266
+ sessionTitle: d,
1267
+ messages: p,
1268
+ onSendMessage: k,
1269
+ currentUser: S
1270
+ }) {
1271
+ 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",
1275
+ color: "#6B7C93"
1276
+ };
1277
+ O(() => {
1278
+ h(p || []);
1279
+ }, [p]), O(() => {
1280
+ y.current && y.current.scrollIntoView({ behavior: "smooth" });
1281
+ }, [A]);
1282
+ const F = async () => {
1283
+ if (!c.trim())
1284
+ return;
1285
+ const n = c.trim();
1286
+ I(""), m(!0);
1287
+ const v = {
1288
+ id: `temp-${Date.now()}`,
1289
+ author: {
1290
+ name: H.name,
1291
+ role: (g == null ? void 0 : g.role) || "",
1292
+ initials: H.initials,
1293
+ color: H.color
1294
+ },
1295
+ content: n,
1296
+ timestamp: "Just now",
1297
+ type: "comment",
1298
+ isOptimistic: !0
1299
+ };
1300
+ if (h((D) => [...D, v]), k) {
1301
+ try {
1302
+ await k(n), h(
1303
+ (D) => D.map(
1304
+ (b) => b.id === v.id ? { ...b, isOptimistic: !1 } : b
1305
+ )
1306
+ );
1307
+ } catch {
1308
+ h((b) => b.filter((R) => R.id !== v.id)), Ne.error("Failed to send message");
1309
+ } finally {
1310
+ m(!1);
1311
+ }
1312
+ return;
1313
+ }
1314
+ setTimeout(() => {
1315
+ h(
1316
+ (D) => D.map(
1317
+ (b) => b.id === v.id ? { ...b, isOptimistic: !1 } : b
1318
+ )
1319
+ ), m(!1);
1320
+ }, 500);
1321
+ }, V = (n) => {
1322
+ n.key === "Enter" && !n.shiftKey && (n.preventDefault(), F());
1323
+ };
1324
+ return /* @__PURE__ */ a(
1325
+ "div",
1326
+ {
1327
+ style: {
1328
+ display: "flex",
1329
+ flexDirection: "column",
1330
+ height: "100%",
1331
+ background: "var(--paper-elevated, rgba(255,255,255,0.82))",
1332
+ border: "1px solid var(--border, rgba(52,58,64,0.12))",
1333
+ borderRadius: "var(--radius-lg, 12px)",
1334
+ overflow: "hidden"
1335
+ },
1336
+ children: [
1337
+ d && /* @__PURE__ */ a(
1338
+ "div",
1339
+ {
1340
+ style: {
1341
+ padding: "14px 16px",
1342
+ borderBottom: "1px solid var(--border, rgba(52,58,64,0.12))",
1343
+ background: "var(--paper-elevated, rgba(255,255,255,0.82))"
1344
+ },
1345
+ children: [
1346
+ /* @__PURE__ */ e(
1347
+ "div",
1348
+ {
1349
+ style: {
1350
+ fontSize: "var(--text-md, 13px)",
1351
+ fontWeight: 680,
1352
+ color: "var(--text-strong, rgba(30,33,37,0.92))",
1353
+ marginBottom: "3px"
1354
+ },
1355
+ children: "Session Discussion"
1356
+ }
1357
+ ),
1358
+ d && /* @__PURE__ */ e(
1359
+ "div",
1360
+ {
1361
+ style: {
1362
+ fontSize: "var(--text-sm, 11px)",
1363
+ color: "var(--text-muted, rgba(30,33,37,0.56))",
1364
+ display: "flex",
1365
+ alignItems: "center",
1366
+ gap: "8px"
1367
+ },
1368
+ children: /* @__PURE__ */ e("span", { children: d })
1369
+ }
1370
+ )
1371
+ ]
1372
+ }
1373
+ ),
1374
+ /* @__PURE__ */ a(
1375
+ "div",
1376
+ {
1377
+ style: {
1378
+ flex: 1,
1379
+ overflowY: "auto",
1380
+ padding: "16px",
1381
+ display: "flex",
1382
+ flexDirection: "column",
1383
+ gap: "16px"
1384
+ },
1385
+ children: [
1386
+ ne ? /* @__PURE__ */ e(
1387
+ "div",
1388
+ {
1389
+ style: {
1390
+ display: "flex",
1391
+ alignItems: "center",
1392
+ justifyContent: "center",
1393
+ padding: "40px",
1394
+ color: "var(--text-faint, rgba(30,33,37,0.36))"
1395
+ },
1396
+ children: "Loading messages..."
1397
+ }
1398
+ ) : A.length === 0 ? /* @__PURE__ */ e(
1399
+ "div",
1400
+ {
1401
+ style: {
1402
+ display: "flex",
1403
+ alignItems: "center",
1404
+ justifyContent: "center",
1405
+ padding: "40px",
1406
+ color: "var(--text-faint, rgba(30,33,37,0.36))"
1407
+ },
1408
+ children: "No messages yet. Start the conversation!"
1409
+ }
1410
+ ) : A.map((n) => /* @__PURE__ */ a(
1411
+ "div",
1412
+ {
1413
+ style: {
1414
+ display: "flex",
1415
+ gap: "12px",
1416
+ opacity: n.type === "system" ? 0.75 : 1
1417
+ },
1418
+ children: [
1419
+ n.type !== "system" && /* @__PURE__ */ e(
1420
+ "div",
1421
+ {
1422
+ style: {
1423
+ width: "32px",
1424
+ height: "32px",
1425
+ borderRadius: "8px",
1426
+ background: n.author.color,
1427
+ color: "white",
1428
+ display: "flex",
1429
+ alignItems: "center",
1430
+ justifyContent: "center",
1431
+ fontSize: "11px",
1432
+ fontWeight: 650,
1433
+ flexShrink: 0,
1434
+ opacity: 0.9
1435
+ },
1436
+ children: n.author.initials
1437
+ }
1438
+ ),
1439
+ n.type === "system" && /* @__PURE__ */ e(
1440
+ "div",
1441
+ {
1442
+ style: {
1443
+ width: "32px",
1444
+ height: "32px",
1445
+ borderRadius: "8px",
1446
+ background: "rgba(30, 33, 37, 0.08)",
1447
+ color: "rgba(30, 33, 37, 0.52)",
1448
+ display: "flex",
1449
+ alignItems: "center",
1450
+ justifyContent: "center",
1451
+ fontSize: "11px",
1452
+ fontWeight: 650,
1453
+ flexShrink: 0
1454
+ },
1455
+ children: /* @__PURE__ */ e(fe, { size: 14 })
1456
+ }
1457
+ ),
1458
+ /* @__PURE__ */ a("div", { style: { flex: 1, minWidth: 0 }, children: [
1459
+ /* @__PURE__ */ a(
1460
+ "div",
1461
+ {
1462
+ style: {
1463
+ display: "flex",
1464
+ alignItems: "baseline",
1465
+ gap: "8px",
1466
+ marginBottom: "4px"
1467
+ },
1468
+ children: [
1469
+ /* @__PURE__ */ e(
1470
+ "span",
1471
+ {
1472
+ style: {
1473
+ fontSize: "var(--text-sm, 11px)",
1474
+ fontWeight: 650,
1475
+ color: "var(--text-base, rgba(30,33,37,0.78))"
1476
+ },
1477
+ children: n.author.name
1478
+ }
1479
+ ),
1480
+ /* @__PURE__ */ e(
1481
+ "span",
1482
+ {
1483
+ style: {
1484
+ fontSize: "var(--text-sm, 11px)",
1485
+ color: "var(--text-faint, rgba(30,33,37,0.36))",
1486
+ fontFamily: "var(--font-mono, monospace)"
1487
+ },
1488
+ children: n.timestamp
1489
+ }
1490
+ ),
1491
+ n.author.role && /* @__PURE__ */ e(
1492
+ "span",
1493
+ {
1494
+ style: {
1495
+ fontSize: "var(--text-xs, 10px)",
1496
+ color: "var(--text-muted, rgba(30,33,37,0.56))",
1497
+ background: "rgba(30, 33, 37, 0.06)",
1498
+ padding: "2px 6px",
1499
+ borderRadius: "4px",
1500
+ textTransform: "uppercase",
1501
+ letterSpacing: "0.04em",
1502
+ fontWeight: 600
1503
+ },
1504
+ children: n.author.role
1505
+ }
1506
+ ),
1507
+ n.isEdited && /* @__PURE__ */ e(
1508
+ "span",
1509
+ {
1510
+ style: {
1511
+ fontSize: "var(--text-xs, 10px)",
1512
+ color: "var(--text-faint, rgba(30,33,37,0.36))",
1513
+ fontStyle: "italic"
1514
+ },
1515
+ children: "(edited)"
1516
+ }
1517
+ )
1518
+ ]
1519
+ }
1520
+ ),
1521
+ /* @__PURE__ */ e(
1522
+ "div",
1523
+ {
1524
+ style: {
1525
+ fontSize: "var(--text-md, 13px)",
1526
+ color: "var(--text-base, rgba(30,33,37,0.78))",
1527
+ lineHeight: 1.5,
1528
+ marginBottom: n.references ? "8px" : 0
1529
+ },
1530
+ children: n.content
1531
+ }
1532
+ ),
1533
+ n.references && n.references.length > 0 && /* @__PURE__ */ e(
1534
+ "div",
1535
+ {
1536
+ style: {
1537
+ display: "flex",
1538
+ flexWrap: "wrap",
1539
+ gap: "6px",
1540
+ marginTop: "8px"
1541
+ },
1542
+ children: n.references.map((v, D) => /* @__PURE__ */ a(
1543
+ "button",
1544
+ {
1545
+ type: "button",
1546
+ style: {
1547
+ fontSize: "11px",
1548
+ padding: "4px 8px",
1549
+ borderRadius: "6px",
1550
+ border: "1px solid rgba(52, 58, 64, 0.16)",
1551
+ background: "rgba(255, 255, 255, 0.7)",
1552
+ color: v.type === "condition" ? "rgba(94, 136, 176, 0.85)" : v.type === "observation" ? "rgba(107, 123, 147, 0.85)" : v.type === "timestamp" ? "rgba(184, 156, 106, 0.85)" : "rgba(30, 33, 37, 0.65)",
1553
+ cursor: "pointer",
1554
+ display: "inline-flex",
1555
+ alignItems: "center",
1556
+ gap: "4px",
1557
+ transition: "all 0.15s ease",
1558
+ fontWeight: 550
1559
+ },
1560
+ onMouseEnter: (b) => {
1561
+ b.currentTarget.style.background = "rgba(255, 255, 255, 0.95)", b.currentTarget.style.borderColor = "rgba(52, 58, 64, 0.24)";
1562
+ },
1563
+ onMouseLeave: (b) => {
1564
+ b.currentTarget.style.background = "rgba(255, 255, 255, 0.7)", b.currentTarget.style.borderColor = "rgba(52, 58, 64, 0.16)";
1565
+ },
1566
+ children: [
1567
+ v.type === "timestamp" && /* @__PURE__ */ e(fe, { size: 12 }),
1568
+ (v.type === "condition" || v.type === "observation") && /* @__PURE__ */ e(be, { size: 12 }),
1569
+ v.label
1570
+ ]
1571
+ },
1572
+ D
1573
+ ))
1574
+ }
1575
+ )
1576
+ ] })
1577
+ ]
1578
+ },
1579
+ n.id
1580
+ )),
1581
+ /* @__PURE__ */ e("div", { ref: y })
1582
+ ]
1583
+ }
1584
+ ),
1585
+ /* @__PURE__ */ a(
1586
+ "div",
1587
+ {
1588
+ style: {
1589
+ padding: "12px",
1590
+ borderTop: "1px solid var(--border, rgba(52,58,64,0.12))",
1591
+ background: "var(--paper-elevated, rgba(255,255,255,0.82))"
1592
+ },
1593
+ children: [
1594
+ /* @__PURE__ */ a(
1595
+ "div",
1596
+ {
1597
+ style: {
1598
+ display: "flex",
1599
+ gap: "8px",
1600
+ alignItems: "flex-end"
1601
+ },
1602
+ children: [
1603
+ /* @__PURE__ */ e(
1604
+ "div",
1605
+ {
1606
+ style: {
1607
+ width: "32px",
1608
+ height: "32px",
1609
+ borderRadius: "var(--radius-md, 8px)",
1610
+ background: H.color,
1611
+ color: "white",
1612
+ display: "flex",
1613
+ alignItems: "center",
1614
+ justifyContent: "center",
1615
+ fontSize: "var(--text-sm, 11px)",
1616
+ fontWeight: 650,
1617
+ flexShrink: 0,
1618
+ opacity: 0.9
1619
+ },
1620
+ children: H.initials
1621
+ }
1622
+ ),
1623
+ /* @__PURE__ */ a(
1624
+ "div",
1625
+ {
1626
+ style: {
1627
+ flex: 1,
1628
+ display: "flex",
1629
+ flexDirection: "column",
1630
+ gap: "8px"
1631
+ },
1632
+ children: [
1633
+ /* @__PURE__ */ e(
1634
+ "textarea",
1635
+ {
1636
+ value: c,
1637
+ onChange: (n) => I(n.target.value),
1638
+ onKeyDown: V,
1639
+ onFocus: () => M(!0),
1640
+ onBlur: () => M(!1),
1641
+ placeholder: "Add a comment...",
1642
+ style: {
1643
+ width: "100%",
1644
+ minHeight: "38px",
1645
+ maxHeight: "120px",
1646
+ padding: "8px 12px",
1647
+ fontSize: "var(--text-md, 13px)",
1648
+ color: "var(--text-base, rgba(30,33,37,0.78))",
1649
+ background: "white",
1650
+ border: `1px solid ${P ? "rgba(94, 136, 176, 0.35)" : "rgba(52, 58, 64, 0.16)"}`,
1651
+ borderRadius: "var(--radius-md, 8px)",
1652
+ resize: "vertical",
1653
+ outline: "none",
1654
+ transition: "border-color 0.15s ease",
1655
+ fontFamily: "inherit",
1656
+ lineHeight: 1.5
1657
+ }
1658
+ }
1659
+ ),
1660
+ /* @__PURE__ */ a(
1661
+ "div",
1662
+ {
1663
+ style: {
1664
+ display: "flex",
1665
+ alignItems: "center",
1666
+ justifyContent: "space-between"
1667
+ },
1668
+ children: [
1669
+ /* @__PURE__ */ a("div", { style: { display: "flex", gap: "4px" }, children: [
1670
+ /* @__PURE__ */ e(
1671
+ "button",
1672
+ {
1673
+ type: "button",
1674
+ style: {
1675
+ padding: "6px",
1676
+ background: "transparent",
1677
+ border: "none",
1678
+ borderRadius: "6px",
1679
+ color: "rgba(30, 33, 37, 0.52)",
1680
+ cursor: "pointer",
1681
+ display: "flex",
1682
+ alignItems: "center",
1683
+ transition: "all 0.15s ease"
1684
+ },
1685
+ onMouseEnter: (n) => {
1686
+ n.currentTarget.style.background = "rgba(30, 33, 37, 0.06)", n.currentTarget.style.color = "rgba(30, 33, 37, 0.75)";
1687
+ },
1688
+ onMouseLeave: (n) => {
1689
+ n.currentTarget.style.background = "transparent", n.currentTarget.style.color = "rgba(30, 33, 37, 0.52)";
1690
+ },
1691
+ title: "Mention user",
1692
+ children: /* @__PURE__ */ e(Re, { size: 16 })
1693
+ }
1694
+ ),
1695
+ /* @__PURE__ */ e(
1696
+ "button",
1697
+ {
1698
+ type: "button",
1699
+ style: {
1700
+ padding: "6px",
1701
+ background: "transparent",
1702
+ border: "none",
1703
+ borderRadius: "6px",
1704
+ color: "rgba(30, 33, 37, 0.52)",
1705
+ cursor: "pointer",
1706
+ display: "flex",
1707
+ alignItems: "center",
1708
+ transition: "all 0.15s ease"
1709
+ },
1710
+ onMouseEnter: (n) => {
1711
+ n.currentTarget.style.background = "rgba(30, 33, 37, 0.06)", n.currentTarget.style.color = "rgba(30, 33, 37, 0.75)";
1712
+ },
1713
+ onMouseLeave: (n) => {
1714
+ n.currentTarget.style.background = "transparent", n.currentTarget.style.color = "rgba(30, 33, 37, 0.52)";
1715
+ },
1716
+ title: "Reference condition",
1717
+ children: /* @__PURE__ */ e(be, { size: 16 })
1718
+ }
1719
+ ),
1720
+ /* @__PURE__ */ e(
1721
+ "button",
1722
+ {
1723
+ type: "button",
1724
+ style: {
1725
+ padding: "6px",
1726
+ background: "transparent",
1727
+ border: "none",
1728
+ borderRadius: "6px",
1729
+ color: "rgba(30, 33, 37, 0.52)",
1730
+ cursor: "pointer",
1731
+ display: "flex",
1732
+ alignItems: "center",
1733
+ transition: "all 0.15s ease"
1734
+ },
1735
+ onMouseEnter: (n) => {
1736
+ n.currentTarget.style.background = "rgba(30, 33, 37, 0.06)", n.currentTarget.style.color = "rgba(30, 33, 37, 0.75)";
1737
+ },
1738
+ onMouseLeave: (n) => {
1739
+ n.currentTarget.style.background = "transparent", n.currentTarget.style.color = "rgba(30, 33, 37, 0.52)";
1740
+ },
1741
+ title: "Attach file",
1742
+ children: /* @__PURE__ */ e(Be, { size: 16 })
1743
+ }
1744
+ )
1745
+ ] }),
1746
+ /* @__PURE__ */ e(
1747
+ "button",
1748
+ {
1749
+ type: "button",
1750
+ onClick: F,
1751
+ disabled: !c.trim() || E,
1752
+ style: {
1753
+ padding: "6px 12px",
1754
+ background: c.trim() && !E ? "rgba(94, 136, 176, 0.85)" : "var(--border-subtle, rgba(52,58,64,0.08))",
1755
+ border: "none",
1756
+ borderRadius: "6px",
1757
+ color: c.trim() && !E ? "white" : "var(--text-faint, rgba(30,33,37,0.36))",
1758
+ fontSize: "var(--text-sm, 11px)",
1759
+ fontWeight: 600,
1760
+ cursor: c.trim() && !E ? "pointer" : "not-allowed",
1761
+ display: "flex",
1762
+ alignItems: "center",
1763
+ gap: "6px",
1764
+ transition: "all 0.15s ease"
1765
+ },
1766
+ onMouseEnter: (n) => {
1767
+ c.trim() && !E && (n.currentTarget.style.background = "rgba(94, 136, 176, 1)");
1768
+ },
1769
+ onMouseLeave: (n) => {
1770
+ c.trim() && !E && (n.currentTarget.style.background = "rgba(94, 136, 176, 0.85)");
1771
+ },
1772
+ children: E ? /* @__PURE__ */ a(oe, { children: [
1773
+ /* @__PURE__ */ e("style", { children: `
1774
+ @keyframes messageSpin {
1775
+ from { transform: rotate(0deg); }
1776
+ to { transform: rotate(360deg); }
1777
+ }
1778
+ ` }),
1779
+ /* @__PURE__ */ e(
1780
+ "div",
1781
+ {
1782
+ style: {
1783
+ width: "14px",
1784
+ height: "14px",
1785
+ border: "2px solid rgba(255, 255, 255, 0.3)",
1786
+ borderTopColor: "white",
1787
+ borderRadius: "50%",
1788
+ animation: "messageSpin 0.6s linear infinite"
1789
+ }
1790
+ }
1791
+ ),
1792
+ "Sending..."
1793
+ ] }) : /* @__PURE__ */ a(oe, { children: [
1794
+ /* @__PURE__ */ e(me, { size: 14 }),
1795
+ "Send"
1796
+ ] })
1797
+ }
1798
+ )
1799
+ ]
1800
+ }
1801
+ )
1802
+ ]
1803
+ }
1804
+ )
1805
+ ]
1806
+ }
1807
+ ),
1808
+ /* @__PURE__ */ a(
1809
+ "div",
1810
+ {
1811
+ style: {
1812
+ marginTop: "8px",
1813
+ fontSize: "var(--text-sm, 11px)",
1814
+ color: "var(--text-faint, rgba(30,33,37,0.36))",
1815
+ lineHeight: 1.4
1816
+ },
1817
+ children: [
1818
+ /* @__PURE__ */ e("strong", { children: "Tip:" }),
1819
+ " Use",
1820
+ " ",
1821
+ /* @__PURE__ */ e(
1822
+ "code",
1823
+ {
1824
+ style: {
1825
+ background: "rgba(30, 33, 37, 0.06)",
1826
+ padding: "2px 4px",
1827
+ borderRadius: "3px",
1828
+ fontFamily: "var(--font-mono, monospace)",
1829
+ fontSize: "var(--text-xs, 10px)"
1830
+ },
1831
+ children: "@"
1832
+ }
1833
+ ),
1834
+ " ",
1835
+ "to mention teammates,",
1836
+ " ",
1837
+ /* @__PURE__ */ e(
1838
+ "code",
1839
+ {
1840
+ style: {
1841
+ background: "rgba(30, 33, 37, 0.06)",
1842
+ padding: "2px 4px",
1843
+ borderRadius: "3px",
1844
+ fontFamily: "var(--font-mono, monospace)",
1845
+ fontSize: "var(--text-xs, 10px)"
1846
+ },
1847
+ children: "#"
1848
+ }
1849
+ ),
1850
+ " ",
1851
+ "to reference conditions"
1852
+ ]
1853
+ }
1854
+ )
1855
+ ]
1856
+ }
1857
+ )
1858
+ ]
1859
+ }
1860
+ );
1861
+ }
1862
+ export {
1863
+ qe as C,
1864
+ Ge as M,
1865
+ Ae as T,
1866
+ Ze as a
1867
+ };
1868
+ //# sourceMappingURL=MessageThread.es.js.map