@epam/ai-dial-conversation-panel 1.2.0-dev.6 → 1.2.0-dev.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,11 +1,14 @@
1
1
  import { ConversationTransferJobStatus as e, DeploymentIcon as t, FilterTab as n, buildCssVars as r, getUtf8ByteLength as i, mergeClasses as a, sanitizeConversationName as o, stripTrailingDots as s } from "@epam/ai-dial-chat-shared";
2
2
  import { PanelEmpty as c, PanelNoResults as l, SidebarOrientation as u, SidebarPanel as d } from "@epam/ai-dial-sidebar";
3
- import { Button as f, ButtonVariant as p, ConfirmationPopup as m, ConfirmationPopupVariant as h, DIAL_ICON_SIZE as g, DIAL_KIT_ICON_STROKE as _, Dropdown as v, ElementSize as y, EllipsisTooltip as b, GhostIconButton as x, Highlight as S, Input as C, Popup as w, PopupSize as T, ProgressBar as E, Search as D, Skeleton as O, SkeletonVariant as k, Spinner as A, Tag as j, TagAppearance as M, Tooltip as ee, mergeClasses as N } from "@epam/ai-dial-ui-kit";
4
- import { createElement as te, memo as P, useCallback as F, useEffect as I, useId as ne, useImperativeHandle as re, useLayoutEffect as ie, useMemo as L, useRef as R, useState as z } from "react";
5
- import { Fragment as ae, jsx as B, jsxs as V } from "react/jsx-runtime";
6
- import { IconAlertCircleFilled as H, IconAlertTriangleFilled as oe, IconCaretDownFilled as se, IconCaretRightFilled as ce, IconCheck as U, IconChevronDown as le, IconChevronUp as ue, IconClock as de, IconDotsVertical as W, IconFile as fe, IconFileZip as pe, IconJson as me, IconPlus as he, IconSparkles as ge, IconX as _e } from "@tabler/icons-react";
7
- //#region ../../node_modules/react-window/dist/react-window.js
8
- var G = typeof window < "u" ? ie : I;
3
+ import { Button as f, ButtonVariant as p, ConfirmationPopup as m, ConfirmationPopupVariant as h, DIAL_ICON_SIZE as g, DIAL_KIT_ICON_STROKE as _, Dropdown as v, ElementSize as y, EllipsisTooltip as b, FilterChips as x, GhostIconButton as S, Highlight as C, Input as w, Popup as T, PopupSize as E, ProgressBar as D, Search as O, Skeleton as ee, SkeletonVariant as k, Spinner as A, Tooltip as j, mergeClasses as te } from "@epam/ai-dial-ui-kit";
4
+ import { createElement as M, memo as N, useCallback as P, useEffect as F, useId as ne, useImperativeHandle as re, useLayoutEffect as ie, useMemo as I, useRef as L, useState as R } from "react";
5
+ import { Fragment as ae, jsx as z, jsxs as B } from "react/jsx-runtime";
6
+ import { IconAlertCircleFilled as oe, IconAlertTriangleFilled as V, IconCaretDownFilled as se, IconCaretRightFilled as ce, IconCheck as le, IconChevronDown as H, IconChevronUp as ue, IconClock as de, IconDotsVertical as fe, IconFile as U, IconFileZip as W, IconJson as pe, IconPlus as me, IconSparkles as he, IconX as ge } from "@tabler/icons-react";
7
+ //#region src/constants/public-class-names.ts
8
+ var _e = {
9
+ newChatButton: "dial-cp-new-chat-button",
10
+ search: "dial-cp-search"
11
+ }, G = typeof window < "u" ? ie : F;
9
12
  function ve(e) {
10
13
  if (e !== void 0) switch (typeof e) {
11
14
  case "number": return e;
@@ -15,10 +18,10 @@ function ve(e) {
15
18
  }
16
19
  }
17
20
  function ye({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
18
- let { styleHeight: s, styleWidth: c } = L(() => ({
21
+ let { styleHeight: s, styleWidth: c } = I(() => ({
19
22
  styleHeight: ve(o?.height),
20
23
  styleWidth: ve(o?.width)
21
- }), [o?.height, o?.width]), [l, u] = z({
24
+ }), [o?.height, o?.width]), [l, u] = R({
22
25
  height: t,
23
26
  width: n
24
27
  }), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
@@ -42,7 +45,7 @@ function ye({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
42
45
  i,
43
46
  s,
44
47
  c
45
- ]), L(() => ({
48
+ ]), I(() => ({
46
49
  height: s ?? l.height,
47
50
  width: c ?? l.width
48
51
  }), [
@@ -52,12 +55,12 @@ function ye({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
52
55
  ]);
53
56
  }
54
57
  function be(e) {
55
- let t = R(() => {
58
+ let t = L(() => {
56
59
  throw Error("Cannot call during render.");
57
60
  });
58
61
  return G(() => {
59
62
  t.current = e;
60
- }, [e]), F((e) => t.current?.(e), [t]);
63
+ }, [e]), P((e) => t.current?.(e), [t]);
61
64
  }
62
65
  var K = null;
63
66
  function xe(e = !1) {
@@ -169,7 +172,7 @@ function Ee({ itemCount: e, itemProps: t, itemSize: n }) {
169
172
  };
170
173
  }
171
174
  function De({ itemCount: e, itemProps: t, itemSize: n }) {
172
- return L(() => Ee({
175
+ return I(() => Ee({
173
176
  itemCount: e,
174
177
  itemProps: t,
175
178
  itemSize: n
@@ -198,7 +201,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
198
201
  element: e,
199
202
  mode: r === "vertical" ? "only-height" : "only-width",
200
203
  style: t
201
- }), f = R({
204
+ }), f = L({
202
205
  height: 0,
203
206
  width: 0
204
207
  }), p = r === "vertical" ? u : d, m = Oe({
@@ -222,7 +225,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
222
225
  itemCount: a,
223
226
  itemProps: o,
224
227
  itemSize: m
225
- }), g = F((e) => h.get(e), [h]), [_, v] = z(() => Te({
228
+ }), g = P((e) => h.get(e), [h]), [_, v] = R(() => Te({
226
229
  cachedBounds: h,
227
230
  containerScrollOffset: 0,
228
231
  containerSize: p,
@@ -233,7 +236,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
233
236
  startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
234
237
  stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
235
238
  stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
236
- }, C = F(() => Ce({
239
+ }, C = P(() => Ce({
237
240
  cachedBounds: h,
238
241
  itemCount: a,
239
242
  itemSize: m
@@ -241,7 +244,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
241
244
  h,
242
245
  a,
243
246
  m
244
- ]), w = F((t) => Te({
247
+ ]), w = P((t) => Te({
245
248
  cachedBounds: h,
246
249
  containerScrollOffset: Se({
247
250
  containerElement: e,
@@ -329,7 +332,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
329
332
  };
330
333
  }
331
334
  function Ae(e) {
332
- return L(() => e, Object.values(e));
335
+ return I(() => e, Object.values(e));
333
336
  }
334
337
  function je(e, t) {
335
338
  let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
@@ -338,16 +341,16 @@ function je(e, t) {
338
341
  function Me(e) {
339
342
  return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
340
343
  }
341
- var Y = "data-react-window-index";
342
- function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onResize: i, onRowsRendered: a, overscanCount: o = 3, rowComponent: s, rowCount: c, rowHeight: l, rowProps: u, tagName: d = "div", style: f, ...p }) {
343
- let m = Ae(u), h = L(() => P(s, je), [s]), [g, _] = z(null), v = Me(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = ke({
344
+ var Ne = "data-react-window-index";
345
+ function Pe({ children: e, className: t, defaultHeight: n = 0, listRef: r, onResize: i, onRowsRendered: a, overscanCount: o = 3, rowComponent: s, rowCount: c, rowHeight: l, rowProps: u, tagName: d = "div", style: f, ...p }) {
346
+ let m = Ae(u), h = I(() => N(s, je), [s]), [g, _] = R(null), v = Me(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = ke({
344
347
  containerElement: g,
345
348
  containerStyle: f,
346
349
  defaultContainerSize: n,
347
350
  direction: "vertical",
348
351
  itemCount: c,
349
352
  itemProps: m,
350
- itemSize: L(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
353
+ itemSize: I(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
351
354
  onResize: i,
352
355
  overscanCount: o
353
356
  });
@@ -371,7 +374,7 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
371
374
  let e = Array.from(g.children).filter((e, t) => {
372
375
  if (e.hasAttribute("aria-hidden")) return !1;
373
376
  let n = `${S + t}`;
374
- return e.setAttribute(Y, n), !0;
377
+ return e.setAttribute(Ne, n), !0;
375
378
  });
376
379
  if (v) return l.observeRowElements(e);
377
380
  }, [
@@ -380,7 +383,7 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
380
383
  l,
381
384
  S,
382
385
  w
383
- ]), I(() => {
386
+ ]), F(() => {
384
387
  S >= 0 && w >= 0 && a && a({
385
388
  startIndex: C,
386
389
  stopIndex: T
@@ -395,11 +398,11 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
395
398
  w,
396
399
  T
397
400
  ]);
398
- let E = L(() => {
401
+ let E = I(() => {
399
402
  let e = [];
400
403
  if (c > 0) for (let t = S; t <= w; t++) {
401
404
  let n = y(t);
402
- e.push(/* @__PURE__ */ te(h, {
405
+ e.push(/* @__PURE__ */ M(h, {
403
406
  ...m,
404
407
  ariaAttributes: {
405
408
  "aria-posinset": t + 1,
@@ -426,7 +429,7 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
426
429
  m,
427
430
  S,
428
431
  w
429
- ]), D = /* @__PURE__ */ B("div", {
432
+ ]), D = /* @__PURE__ */ z("div", {
430
433
  "aria-hidden": !0,
431
434
  style: {
432
435
  height: b(),
@@ -434,7 +437,7 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
434
437
  zIndex: -1
435
438
  }
436
439
  });
437
- return te(d, {
440
+ return M(d, {
438
441
  role: "list",
439
442
  ...p,
440
443
  className: t,
@@ -450,9 +453,9 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
450
453
  }
451
454
  //#endregion
452
455
  //#region src/types/virtual-row.ts
453
- var X = /* @__PURE__ */ function(e) {
456
+ var Y = /* @__PURE__ */ function(e) {
454
457
  return e.Header = "header", e.Item = "item", e;
455
- }({}), Pe = (e) => `${60 + e * 23 % 35}%`, Fe = (e, t) => e ? t ? "pe-9" : "pe-2 group-focus-within/conversation:pe-9 group-hover/conversation:pe-9" : "pe-3", Ie = (e, t) => t.rows[e].kind === X.Item ? 36 : e === 0 ? 24 : 56, Le = (e) => {
458
+ }({}), Fe = (e) => `${60 + e * 23 % 35}%`, X = (e, t) => e ? t ? "pe-9" : "pe-2 group-focus-within/conversation:pe-9 group-hover/conversation:pe-9" : "pe-3", Ie = (e, t) => t.rows[e].kind === Y.Item ? 36 : e === 0 ? 24 : 56, Le = (e) => {
456
459
  switch (e) {
457
460
  case n.Shared: return n.Shared;
458
461
  case n.Organization: return n.Organization;
@@ -460,7 +463,7 @@ var X = /* @__PURE__ */ function(e) {
460
463
  }
461
464
  }, Re = (e, t) => {
462
465
  let n = null;
463
- for (let r of e) if (r.kind === X.Header) n = r.groupKey;
466
+ for (let r of e) if (r.kind === Y.Header) n = r.groupKey;
464
467
  else if (r.item.id === t) return n;
465
468
  return null;
466
469
  }, ze = (e, t, r) => {
@@ -474,7 +477,7 @@ var X = /* @__PURE__ */ function(e) {
474
477
  let i = e.currentTarget.getBoundingClientRect();
475
478
  if (e.clientY >= i.top + i.height / 2) return t;
476
479
  let a = null, o = !1;
477
- for (let e of n) if (e.kind === X.Header) o = e.groupKey === r;
480
+ for (let e of n) if (e.kind === Y.Header) o = e.groupKey === r;
478
481
  else if (o) {
479
482
  if (e.item.id === t) return a;
480
483
  a = e.item.id;
@@ -497,36 +500,34 @@ var X = /* @__PURE__ */ function(e) {
497
500
  value: n.Organization,
498
501
  labelKey: "organization"
499
502
  }
500
- ], He = P(({ activeTab: e, labels: t, onChange: n, tabClassName: r = "dial-tiny-semi-text", hiddenSources: i }) => {
501
- let a = Ve.filter(({ value: e }) => !i?.includes(e));
502
- return /* @__PURE__ */ B("div", {
503
- role: "group",
504
- "aria-label": t.groupAriaLabel ?? "Filter chats",
505
- className: "flex flex-nowrap gap-1 px-3 py-2",
506
- children: a.map(({ value: i, labelKey: a }) => /* @__PURE__ */ B(j, {
507
- label: t[a],
508
- appearance: M.Selectable,
509
- selected: e === i,
510
- onClick: () => n(i),
511
- className: N("flex-1 justify-center rounded-full", r)
512
- }, i))
513
- });
514
- }), Ue = { button: "_button_1vksy_1" }, We = P(({ label: e, onClick: t, labelClassName: n = "dial-small-semi-text", colors: i }) => /* @__PURE__ */ B("div", {
503
+ ], He = N(({ activeTab: e, labels: t, onChange: n, tabClassName: r = "dial-tiny-semi-text", hiddenSources: i }) => /* @__PURE__ */ z(x, {
504
+ items: I(() => Ve.filter(({ value: e }) => !i?.includes(e)).map(({ value: e, labelKey: n }) => ({
505
+ value: e,
506
+ label: t[n]
507
+ })), [t, i]),
508
+ value: e,
509
+ onChange: n,
510
+ stretch: !0,
511
+ "aria-label": t.groupAriaLabel ?? "Filter chats",
512
+ className: "px-3 py-2",
513
+ chipClassName: te("!px-2", r)
514
+ })), Ue = { button: "_button_1vksy_1" }, We = N(({ label: e, onClick: t, labelClassName: n = "dial-small-semi-text", colors: i }) => /* @__PURE__ */ z("div", {
515
515
  className: "px-3 py-2",
516
516
  style: r({
517
517
  "--cp-new-chat-bg": i?.background,
518
518
  "--cp-new-chat-text": i?.text,
519
519
  "--cp-new-chat-focus-outline": i?.focusOutline
520
520
  }),
521
- children: /* @__PURE__ */ V("button", {
521
+ children: /* @__PURE__ */ B("button", {
522
522
  onClick: t,
523
523
  type: "button",
524
- className: a("flex h-[36px] w-full cursor-pointer items-center justify-center gap-2 px-3 py-1 shadow-chat-button hover:shadow-xs focus-visible:shadow-xs active:shadow-xs", Ue.button),
525
- children: [/* @__PURE__ */ B(he, {
524
+ className: a("flex h-[36px] w-full cursor-pointer items-center justify-center gap-2 px-3 py-1 shadow-chat-button hover:shadow-xs focus-visible:shadow-xs active:shadow-xs", Ue.button, _e.newChatButton),
525
+ children: [/* @__PURE__ */ z(me, {
526
526
  size: 18,
527
527
  stroke: _,
528
- className: "shrink-0"
529
- }), /* @__PURE__ */ B("span", {
528
+ className: "shrink-0",
529
+ "aria-hidden": !0
530
+ }), /* @__PURE__ */ z("span", {
530
531
  className: n,
531
532
  children: e
532
533
  })]
@@ -542,9 +543,9 @@ var X = /* @__PURE__ */ function(e) {
542
543
  triggerIcon: "_triggerIcon_i3lsf_38",
543
544
  unreadDot: "_unreadDot_i3lsf_46",
544
545
  search: "_search_i3lsf_54"
545
- }, Q = ({ label: e, isExpanded: t, onToggle: n, listId: r, className: i = "dial-tiny-lead-text", dropZoneGroupKey: o, isDragOver: s, onDragOver: c, onDragLeave: l, onDrop: u }) => {
546
+ }, Ge = ({ label: e, isExpanded: t, onToggle: n, listId: r, className: i = "dial-tiny-lead-text", dropZoneGroupKey: o, isDragOver: s, onDragOver: c, onDragLeave: l, onDrop: u }) => {
546
547
  let d = o != null;
547
- return /* @__PURE__ */ V("button", {
548
+ return /* @__PURE__ */ B("button", {
548
549
  type: "button",
549
550
  "aria-expanded": t,
550
551
  "aria-controls": r,
@@ -558,105 +559,105 @@ var X = /* @__PURE__ */ function(e) {
558
559
  onDrop: d ? (e) => {
559
560
  d && (e.preventDefault(), u?.(o, o, null));
560
561
  } : void 0,
561
- className: a("flex h-6 w-full items-center gap-1 rounded py-1 pe-3 text-start", i, Z.groupHeader, s && Z.dropZoneActive),
562
- children: [t ? /* @__PURE__ */ B(se, {
562
+ className: a("group flex h-6 w-full items-center gap-1 rounded py-1 pe-3 text-start", i, Z.groupHeader, s && Z.dropZoneActive),
563
+ children: [t ? /* @__PURE__ */ z(se, {
563
564
  size: 12,
564
- className: "shrink-0",
565
+ className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100",
565
566
  "aria-hidden": !0
566
- }) : /* @__PURE__ */ B(ce, {
567
+ }) : /* @__PURE__ */ z(ce, {
567
568
  size: 12,
568
- className: "shrink-0 rtl:scale-x-[-1]",
569
+ className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100 rtl:scale-x-[-1]",
569
570
  "aria-hidden": !0
570
- }), /* @__PURE__ */ B(b, { text: e })]
571
+ }), /* @__PURE__ */ z(b, { text: e })]
571
572
  });
572
- }, Ge = ({ item: e, isActive: n, onSelectConversation: r, searchQuery: i = "", getActions: o, onActionMenuOpen: s, actionsLabel: c = "More actions", itemTitleClassName: l = "dial-small-text", itemIconBadgeClassName: u, taskBadgeClassName: d = "dial-caption-lead-semi-text", unreadIndicatorLabel: p = "Unread", rowGroupKey: m, rows: h, draggingId: b, dragOverId: C, allowedDropGroups: w, onDragStart: T, onDragEnd: E, onDragOver: D, onDragLeave: A, onDrop: j }) => {
573
- let [M, ee] = z(!1), N = R(null), te = F((t) => {
574
- ee(t), t && N.current && s?.(e, N.current);
575
- }, [e, s]), P = o?.(e) ?? [], I = P.length > 0, ne = e.isIconLoading ? /* @__PURE__ */ B(O, {
573
+ }, Q = ({ item: e, isActive: n, onSelectConversation: r, searchQuery: i = "", getActions: o, onActionMenuOpen: s, actionsLabel: c = "More actions", itemTitleClassName: l = "dial-small-text", itemIconBadgeClassName: u, taskBadgeClassName: d = "dial-caption-lead-semi-text", unreadIndicatorLabel: p = "Unread", rowGroupKey: m, rows: h, draggingId: b, dragOverId: x, allowedDropGroups: w, onDragStart: T, onDragEnd: E, onDragOver: D, onDragLeave: O, onDrop: A }) => {
574
+ let [j, te] = R(!1), M = L(null), N = P((t) => {
575
+ te(t), t && M.current && s?.(e, M.current);
576
+ }, [e, s]), F = o?.(e) ?? [], ne = F.length > 0, re = e.isIconLoading ? /* @__PURE__ */ z(ee, {
576
577
  variant: k.Circular,
577
578
  width: g.LG,
578
579
  height: g.LG,
579
580
  color: Z.skeletonColor,
580
581
  "aria-hidden": !0
581
- }) : /* @__PURE__ */ B(t, {
582
+ }) : /* @__PURE__ */ z(t, {
582
583
  src: e.iconUrl,
583
584
  size: g.LG,
584
585
  initialsName: e.iconTooltip ?? "",
585
586
  labels: { tooltip: e.iconTooltip },
586
587
  styles: { badgeClassName: u }
587
- }), re = /* @__PURE__ */ V("span", {
588
- className: "flex shrink-0 items-center",
589
- children: [/* @__PURE__ */ B("span", {
588
+ }), ie = /* @__PURE__ */ B("span", {
589
+ className: "flex shrink-0 items-center gap-0.5",
590
+ children: [/* @__PURE__ */ z("span", {
590
591
  className: "relative flex size-3 shrink-0 items-center justify-center",
591
- children: e.isUnread && /* @__PURE__ */ V(ae, { children: [/* @__PURE__ */ B("span", {
592
+ children: e.isUnread && /* @__PURE__ */ B(ae, { children: [/* @__PURE__ */ z("span", {
592
593
  className: a("size-[5.33px] rounded-full", Z.unreadDot),
593
594
  "aria-hidden": !0
594
- }), /* @__PURE__ */ B("span", {
595
+ }), /* @__PURE__ */ z("span", {
595
596
  className: "sr-only",
596
597
  children: p
597
598
  })] })
598
- }), ne]
599
- }), ie = Fe(I, M), L = e.showTaskBadge ? /* @__PURE__ */ V("span", {
599
+ }), re]
600
+ }), I = X(ne, j), oe = e.showTaskBadge ? /* @__PURE__ */ B("span", {
600
601
  className: a("flex h-5 shrink-0 items-center justify-center gap-0.5 rounded-full border pe-2 ps-1", Z.taskBadge, d),
601
- children: [/* @__PURE__ */ B(de, {
602
+ children: [/* @__PURE__ */ z(de, {
602
603
  size: 12,
603
604
  "aria-hidden": !0,
604
605
  stroke: _
605
606
  }), e.taskBadgeLabel]
606
- }) : void 0, H = m != null, oe = F((e) => {
607
- e.currentTarget.contains(e.relatedTarget) || A?.();
608
- }, [A]), se = F((t) => {
609
- if (!m || !h || !j) return;
607
+ }) : void 0, V = m != null, se = P((e) => {
608
+ e.currentTarget.contains(e.relatedTarget) || O?.();
609
+ }, [O]), ce = P((t) => {
610
+ if (!m || !h || !A) return;
610
611
  t.preventDefault();
611
612
  let n = Be(t, e.id, h, m);
612
- j(e.id, m, n);
613
+ A(e.id, m, n);
613
614
  }, [
614
615
  e.id,
615
616
  h,
616
617
  m,
617
- j
618
- ]), ce = e.id === b, U = e.id === C, le = m != null && (w?.has(m) ?? !1), ue = b != null;
619
- return /* @__PURE__ */ V("li", {
620
- className: a("group/conversation relative", ce && "cursor-grabbing opacity-50", U && le && "rounded", U && le && Z.dropZoneActive, ue && !ce && !le && "cursor-not-allowed"),
621
- draggable: H || void 0,
622
- onDragStart: H ? () => T?.(e.id) : void 0,
623
- onDragEnd: H ? E : void 0,
624
- onDragOver: H ? (t) => {
618
+ A
619
+ ]), le = e.id === b, H = e.id === x, ue = m != null && (w?.has(m) ?? !1), U = b != null;
620
+ return /* @__PURE__ */ B("li", {
621
+ className: a("group/conversation relative", le && "cursor-grabbing opacity-50", H && ue && "rounded", H && ue && Z.dropZoneActive, U && !le && !ue && "cursor-not-allowed"),
622
+ draggable: V || void 0,
623
+ onDragStart: V ? () => T?.(e.id) : void 0,
624
+ onDragEnd: V ? E : void 0,
625
+ onDragOver: V ? (t) => {
625
626
  t.preventDefault(), D?.(e.id);
626
627
  } : void 0,
627
- onDragLeave: H ? oe : void 0,
628
- onDrop: H ? se : void 0,
629
- children: [/* @__PURE__ */ B("a", {
628
+ onDragLeave: V ? se : void 0,
629
+ onDrop: V ? ce : void 0,
630
+ children: [/* @__PURE__ */ z("a", {
630
631
  href: e.href,
631
632
  className: "contents",
632
633
  onClick: (t) => {
633
634
  e.href && (t.preventDefault(), r(e.id));
634
635
  },
635
- children: /* @__PURE__ */ B(f, {
636
- iconBefore: re,
637
- label: /* @__PURE__ */ B(S, {
636
+ children: /* @__PURE__ */ z(f, {
637
+ iconBefore: ie,
638
+ label: /* @__PURE__ */ z(C, {
638
639
  text: e.title,
639
640
  query: i,
640
641
  className: l,
641
642
  maxLines: 1
642
643
  }),
643
- iconAfter: L,
644
+ iconAfter: oe,
644
645
  textClassName: "min-w-0 flex-1",
645
646
  "aria-current": n ? "page" : void 0,
646
647
  onClick: e.href ? void 0 : () => r(e.id),
647
648
  tabIndex: e.href ? -1 : void 0,
648
- className: a("h-8 w-full justify-start gap-2 py-2 ps-0 after:pointer-events-none", ie, Z.item, n && Z.itemActive, M && Z.itemActive)
649
+ className: a("h-8 w-full justify-start gap-2 py-2 ps-0 after:pointer-events-none", I, Z.item, n && Z.itemActive, j && Z.itemActive)
649
650
  })
650
- }), I && /* @__PURE__ */ B("div", {
651
- className: a("absolute inset-y-0 end-1 flex items-center", M ? "opacity-100" : "opacity-0 group-focus-within/conversation:opacity-100 group-hover/conversation:opacity-100"),
652
- children: /* @__PURE__ */ B(v, {
653
- items: P,
654
- onOpenChange: te,
651
+ }), ne && /* @__PURE__ */ z("div", {
652
+ className: a("absolute inset-y-0 end-1 flex items-center", j ? "opacity-100" : "opacity-0 group-focus-within/conversation:opacity-100 group-hover/conversation:opacity-100"),
653
+ children: /* @__PURE__ */ z(v, {
654
+ items: F,
655
+ onOpenChange: N,
655
656
  matchReferenceWidth: !1,
656
657
  listClassName: "w-[200px]",
657
- children: /* @__PURE__ */ B(x, {
658
- ref: N,
659
- icon: /* @__PURE__ */ B(W, {
658
+ children: /* @__PURE__ */ z(S, {
659
+ ref: M,
660
+ icon: /* @__PURE__ */ z(fe, {
660
661
  size: g.SM,
661
662
  className: Z.triggerIcon,
662
663
  "aria-hidden": !0,
@@ -664,20 +665,20 @@ var X = /* @__PURE__ */ function(e) {
664
665
  }),
665
666
  size: y.Small,
666
667
  "aria-label": c,
667
- className: a(M && Z.triggerActive)
668
+ className: a(j && Z.triggerActive)
668
669
  })
669
670
  })
670
671
  })]
671
672
  });
672
673
  }, Ke = ({ index: e, style: t, rows: r, expandedGroups: i, onToggleGroup: a, listId: o, activeConversationId: s, searchQuery: c, onSelectConversation: l, getActions: u, onActionMenuOpen: d, actionsLabel: f, unreadIndicatorLabel: p, styles: m, draggingId: h, dragOverId: g, allowedDropGroups: _, onDragStart: v, onDragEnd: y, onDragOver: b, onDragLeave: x, onDrop: S }) => {
673
674
  let C = r[e];
674
- if (C.kind === X.Header) {
675
+ if (C.kind === Y.Header) {
675
676
  let r = C.groupKey === n.Pinned;
676
- return /* @__PURE__ */ B("div", {
677
+ return /* @__PURE__ */ z("div", {
677
678
  role: "presentation",
678
679
  style: t,
679
680
  className: e === 0 ? "pt-0" : "pt-8",
680
- children: /* @__PURE__ */ B(Q, {
681
+ children: /* @__PURE__ */ z(Ge, {
681
682
  label: C.label,
682
683
  isExpanded: i.has(C.groupKey),
683
684
  onToggle: () => a(C.groupKey),
@@ -691,11 +692,11 @@ var X = /* @__PURE__ */ function(e) {
691
692
  })
692
693
  });
693
694
  }
694
- return /* @__PURE__ */ B("div", {
695
+ return /* @__PURE__ */ z("div", {
695
696
  role: "presentation",
696
697
  style: t,
697
698
  className: "pt-1",
698
- children: /* @__PURE__ */ B(Ge, {
699
+ children: /* @__PURE__ */ z(Q, {
699
700
  item: C.item,
700
701
  isActive: C.item.id === s,
701
702
  searchQuery: c,
@@ -724,46 +725,46 @@ var X = /* @__PURE__ */ function(e) {
724
725
  n.MyChats,
725
726
  n.Shared,
726
727
  n.Organization
727
- ]), Xe = P(({ conversations: e, isLoading: t, isOpen: i, onSelectConversation: o, activeConversationId: s, labels: f, onNewChat: p, styles: m, className: h, isOverlay: g = !1, getActions: _, onActionMenuOpen: v, onToggle: y, headerActions: b, onMoveConversation: x, activeFilter: S, onActiveFilterChange: C, isFilterTabsHidden: w = !1, hiddenSources: T }) => {
728
- let { colors: E, typography: k, newChatButton: A, searchWrapperClassName: j } = m ?? {}, { title: M, emptyLabel: ee, noResultsLabel: N, loadingLabel: te = "Loading conversations", newChatLabel: P, searchPlaceholder: re, searchClearLabel: ie, filterLabels: ae, groupLabels: H, actionsLabel: oe, unreadIndicatorLabel: se, closeAriaLabel: ce } = f, [U, le] = z(""), [ue, de] = z(n.All);
729
- I(() => {
730
- S != null && de(S);
728
+ ]), Xe = N(({ conversations: e, isLoading: t, isOpen: i, onSelectConversation: o, activeConversationId: s, labels: f, onNewChat: p, styles: m, className: h, isOverlay: g = !1, getActions: _, onActionMenuOpen: v, onToggle: y, headerActions: b, onMoveConversation: x, activeFilter: S, onActiveFilterChange: C, isFilterTabsHidden: w = !1, hiddenSources: T }) => {
729
+ let { colors: E, typography: D, newChatButton: k, searchWrapperClassName: A } = m ?? {}, { title: j, emptyLabel: te, noResultsLabel: M, loadingLabel: N = "Loading conversations", newChatLabel: re, searchPlaceholder: ie, searchClearLabel: ae, filterLabels: oe, groupLabels: V, actionsLabel: se, unreadIndicatorLabel: ce, closeAriaLabel: le } = f, [H, ue] = R(""), [de, fe] = R(n.All);
730
+ F(() => {
731
+ S != null && fe(S);
731
732
  }, [S]);
732
- let W = L(() => T?.length ? e.filter((e) => e.source == null || !T.includes(e.source)) : e, [e, T]), [fe, pe] = z(() => Ye), [me, he] = z(5), ge = ne(), _e = R(null), G = R(null), [ve, ye] = z(null), [be, K] = z(null), [xe, Se] = z(null), q = R(null), J = R(null), Ce = F(({ height: e }) => {
733
+ let U = I(() => T?.length ? e.filter((e) => e.source == null || !T.includes(e.source)) : e, [e, T]), [W, pe] = R(() => Ye), [me, he] = R(5), ge = ne(), G = L(null), ve = L(null), [ye, be] = R(null), [K, xe] = R(null), [Se, q] = R(null), J = L(null), Ce = L(null), we = P(({ height: e }) => {
733
734
  he(Math.ceil(e / 36 * 2));
734
- }, []), we = F((e) => {
735
- le(e ?? "");
736
- }, []), Te = F((e) => {
735
+ }, []), Te = P((e) => {
736
+ ue(e ?? "");
737
+ }, []), Ee = P((e) => {
737
738
  pe((t) => {
738
739
  let n = new Set(t);
739
740
  return n.has(e) ? n.delete(e) : n.add(e), n;
740
741
  });
741
- }, []), Ee = F(() => {
742
- q.current = null, J.current = null, ye(null), K(null), Se(null);
743
- }, []), De = F((e, t) => {
744
- let n = ze(e, Re(t, e), W);
745
- q.current = e, J.current = n, ye(e), Se(n);
746
- }, [W]), Oe = F(() => {
747
- Ee();
748
- }, [Ee]), ke = F((e) => {
749
- K(e);
750
- }, []), Ae = F(() => {
751
- K(null);
752
- }, []), je = F((e, t, n) => {
753
- let r = q.current, i = J.current;
754
- Ee(), r != null && r !== e && i?.has(t) && x?.({
742
+ }, []), De = P(() => {
743
+ J.current = null, Ce.current = null, be(null), xe(null), q(null);
744
+ }, []), Oe = P((e, t) => {
745
+ let n = ze(e, Re(t, e), U);
746
+ J.current = e, Ce.current = n, be(e), q(n);
747
+ }, [U]), ke = P(() => {
748
+ De();
749
+ }, [De]), Ae = P((e) => {
750
+ xe(e);
751
+ }, []), je = P(() => {
752
+ xe(null);
753
+ }, []), Me = P((e, t, n) => {
754
+ let r = J.current, i = Ce.current;
755
+ De(), r != null && r !== e && i?.has(t) && x?.({
755
756
  draggedId: r,
756
757
  targetGroupKey: t,
757
758
  afterId: n
758
759
  });
759
- }, [Ee, x]), Me = r({
760
+ }, [De, x]), Ne = r({
760
761
  "--cp-item-hover": E?.itemHover,
761
762
  "--cp-item-active": E?.itemActive,
762
763
  "--cp-text": E?.text,
763
764
  "--cp-text-secondary": E?.textSecondary,
764
- "--cp-new-chat-bg": A?.background,
765
- "--cp-new-chat-text": A?.text,
766
- "--cp-new-chat-focus-outline": A?.focusOutline,
765
+ "--cp-new-chat-bg": k?.background,
766
+ "--cp-new-chat-text": k?.text,
767
+ "--cp-new-chat-focus-outline": k?.focusOutline,
767
768
  "--cp-drop-zone-ring": E?.dropZoneRing,
768
769
  "--cp-trigger-bg": E?.triggerBackground,
769
770
  "--cp-trigger-icon": E?.triggerIcon,
@@ -773,123 +774,123 @@ var X = /* @__PURE__ */ function(e) {
773
774
  "--cp-task-badge-bg": E?.taskBadgeBackground,
774
775
  "--cp-task-badge-text": E?.taskBadgeText,
775
776
  "--cp-unread-dot": E?.unreadDot
776
- }), Y = L(() => W.filter((e) => qe(e, ue) && Je(e, U)), [
777
- W,
778
- ue,
779
- U
780
- ]), Fe = L(() => Y.filter((e) => e.isPinned), [Y]), Le = L(() => Y.filter((e) => !e.isPinned && e.source !== n.Shared && e.source !== n.Organization), [Y]), Be = L(() => Y.filter((e) => !e.isPinned && e.source === n.Shared), [Y]), Ve = L(() => Y.filter((e) => !e.isPinned && e.source === n.Organization), [Y]), Ue = L(() => [
777
+ }), X = I(() => U.filter((e) => qe(e, de) && Je(e, H)), [
778
+ U,
779
+ de,
780
+ H
781
+ ]), Le = I(() => X.filter((e) => e.isPinned), [X]), Be = I(() => X.filter((e) => !e.isPinned && e.source !== n.Shared && e.source !== n.Organization), [X]), Ve = I(() => X.filter((e) => !e.isPinned && e.source === n.Shared), [X]), Ue = I(() => X.filter((e) => !e.isPinned && e.source === n.Organization), [X]), Ge = I(() => [
781
782
  {
782
783
  key: n.Pinned,
783
- label: H?.pinned ?? "Pinned",
784
- items: Fe
784
+ label: V?.pinned ?? "Pinned",
785
+ items: Le
785
786
  },
786
787
  {
787
788
  key: n.MyChats,
788
- label: H?.myChats ?? "My chats",
789
- items: Le
789
+ label: V?.myChats ?? "My chats",
790
+ items: Be
790
791
  },
791
792
  {
792
793
  key: n.Shared,
793
- label: H?.shared ?? "Shared",
794
- items: Be
794
+ label: V?.shared ?? "Shared",
795
+ items: Ve
795
796
  },
796
797
  {
797
798
  key: n.Organization,
798
- label: H?.organization ?? "Organization",
799
- items: Ve
799
+ label: V?.organization ?? "Organization",
800
+ items: Ue
800
801
  }
801
802
  ], [
802
- H,
803
- Fe,
803
+ V,
804
804
  Le,
805
805
  Be,
806
- Ve
807
- ]), Q = L(() => {
806
+ Ve,
807
+ Ue
808
+ ]), Q = I(() => {
808
809
  let e = [];
809
- for (let t of Ue) if (t.items.length !== 0 && (e.push({
810
- kind: X.Header,
810
+ for (let t of Ge) if (t.items.length !== 0 && (e.push({
811
+ kind: Y.Header,
811
812
  groupKey: t.key,
812
813
  label: t.label
813
- }), fe.has(t.key))) for (let n of t.items) e.push({
814
- kind: X.Item,
814
+ }), W.has(t.key))) for (let n of t.items) e.push({
815
+ kind: Y.Item,
815
816
  item: n,
816
817
  groupKey: t.key
817
818
  });
818
819
  return e;
819
- }, [Ue, fe]);
820
- I(() => {
821
- if (!s || G.current === s) return;
822
- let e = Q.findIndex((e) => e.kind === X.Item && e.item.id === s);
823
- e >= 0 && (_e.current?.scrollToRow({
820
+ }, [Ge, W]);
821
+ F(() => {
822
+ if (!s || ve.current === s) return;
823
+ let e = Q.findIndex((e) => e.kind === Y.Item && e.item.id === s);
824
+ e >= 0 && (G.current?.scrollToRow({
824
825
  index: e,
825
826
  align: "smart",
826
827
  behavior: "smooth"
827
- }), G.current = s);
828
+ }), ve.current = s);
828
829
  }, [
829
830
  s,
830
- Ue,
831
- fe,
831
+ Ge,
832
+ W,
832
833
  Q
833
834
  ]);
834
- let Ge = L(() => ({
835
+ let Xe = I(() => ({
835
836
  rows: Q,
836
- expandedGroups: fe,
837
- onToggleGroup: Te,
837
+ expandedGroups: W,
838
+ onToggleGroup: Ee,
838
839
  listId: ge,
839
840
  activeConversationId: s,
840
- searchQuery: U,
841
+ searchQuery: H,
841
842
  onSelectConversation: o,
842
843
  getActions: _,
843
844
  onActionMenuOpen: v,
844
- actionsLabel: oe,
845
- unreadIndicatorLabel: se,
845
+ actionsLabel: se,
846
+ unreadIndicatorLabel: ce,
846
847
  styles: {
847
- groupHeaderClassName: k?.groupHeaderClassName,
848
- itemTitleClassName: k?.itemTitleClassName,
848
+ groupHeaderClassName: D?.groupHeaderClassName,
849
+ itemTitleClassName: D?.itemTitleClassName,
849
850
  itemIconBadgeClassName: m?.itemIconBadgeClassName,
850
851
  taskBadgeClassName: m?.taskBadgeClassName
851
852
  },
852
- draggingId: ve,
853
- dragOverId: be,
854
- allowedDropGroups: xe,
855
- onDragStart: (e) => De(e, Q),
856
- onDragEnd: Oe,
857
- onDragOver: ke,
858
- onDragLeave: Ae,
859
- onDrop: je
853
+ draggingId: ye,
854
+ dragOverId: K,
855
+ allowedDropGroups: Se,
856
+ onDragStart: (e) => Oe(e, Q),
857
+ onDragEnd: ke,
858
+ onDragOver: Ae,
859
+ onDragLeave: je,
860
+ onDrop: Me
860
861
  }), [
861
862
  Q,
862
- fe,
863
- Te,
863
+ W,
864
+ Ee,
864
865
  ge,
865
866
  s,
866
- U,
867
+ H,
867
868
  o,
868
869
  _,
869
870
  v,
870
- oe,
871
871
  se,
872
- k?.groupHeaderClassName,
873
- k?.itemTitleClassName,
872
+ ce,
873
+ D?.groupHeaderClassName,
874
+ D?.itemTitleClassName,
874
875
  m?.itemIconBadgeClassName,
875
876
  m?.taskBadgeClassName,
876
- ve,
877
- be,
878
- xe,
879
- De,
877
+ ye,
878
+ K,
879
+ Se,
880
880
  Oe,
881
881
  ke,
882
882
  Ae,
883
- je
884
- ]), Xe = W.length === 0, Ze = W.length > 0 && Y.length === 0;
885
- return /* @__PURE__ */ V(d, {
883
+ je,
884
+ Me
885
+ ]), Ze = U.length === 0, Qe = U.length > 0 && X.length === 0;
886
+ return /* @__PURE__ */ B(d, {
886
887
  isOpen: i,
887
888
  isOverlay: g,
888
889
  orientation: u.Left,
889
- title: M,
890
+ title: j,
890
891
  labels: {
891
- ariaLabel: M,
892
- closeLabel: ce
892
+ ariaLabel: j,
893
+ closeLabel: le
893
894
  },
894
895
  onClose: y,
895
896
  styles: {
@@ -897,61 +898,61 @@ var X = /* @__PURE__ */ function(e) {
897
898
  background: E?.background,
898
899
  border: E?.border
899
900
  },
900
- typography: { fontClassName: k?.fontClassName },
901
+ typography: { fontClassName: D?.fontClassName },
901
902
  bodyClassName: "flex flex-col overflow-hidden p-0 gap-3",
902
- cssVars: Me,
903
- titleClassName: k?.fontClassName,
903
+ cssVars: Ne,
904
+ titleClassName: D?.fontClassName,
904
905
  headerClassName: "h-[64px]",
905
906
  className: a(i ? "w-[324px] mobile:w-full" : "w-0", h)
906
907
  },
907
908
  rightActions: b,
908
909
  children: [
909
- /* @__PURE__ */ B(We, {
910
- label: P,
910
+ /* @__PURE__ */ z(We, {
911
+ label: re,
911
912
  onClick: p,
912
- labelClassName: k?.newChatLabelClassName,
913
- colors: A
913
+ labelClassName: D?.newChatLabelClassName,
914
+ colors: k
914
915
  }),
915
- /* @__PURE__ */ B("div", {
916
+ /* @__PURE__ */ z("div", {
916
917
  role: "search",
917
- className: "px-3 py-2",
918
- children: /* @__PURE__ */ B(D, {
919
- wrapperClassName: a(Z.search, j),
920
- value: U,
921
- onChange: we,
922
- placeholder: re,
923
- clearLabel: ie,
924
- "aria-label": re
918
+ className: a("px-3 py-2", _e.search),
919
+ children: /* @__PURE__ */ z(O, {
920
+ wrapperClassName: a(Z.search, A),
921
+ value: H,
922
+ onChange: Te,
923
+ placeholder: ie,
924
+ clearLabel: ae,
925
+ "aria-label": ie
925
926
  })
926
927
  }),
927
- !w && /* @__PURE__ */ B(He, {
928
- activeTab: ue,
929
- labels: ae,
928
+ !w && /* @__PURE__ */ z(He, {
929
+ activeTab: de,
930
+ labels: oe,
930
931
  onChange: (e) => {
931
- de(e), C?.(e);
932
+ fe(e), C?.(e);
932
933
  },
933
- tabClassName: k?.tabClassName,
934
+ tabClassName: D?.tabClassName,
934
935
  hiddenSources: T
935
936
  }),
936
- /* @__PURE__ */ B("span", {
937
+ /* @__PURE__ */ z("span", {
937
938
  role: "status",
938
939
  "aria-live": "polite",
939
940
  className: "sr-only",
940
- children: t ? te : Xe ? ee : Ze ? N : ""
941
+ children: t ? N : Ze ? te : Qe ? M : ""
941
942
  }),
942
- /* @__PURE__ */ B("div", {
943
- className: "flex-1 overflow-hidden px-2 py-1",
944
- children: t ? /* @__PURE__ */ B("div", {
943
+ /* @__PURE__ */ z("div", {
944
+ className: "flex-1 overflow-hidden py-1 pe-3 ps-2",
945
+ children: t ? /* @__PURE__ */ z("div", {
945
946
  className: "flex flex-col gap-3 px-2 py-3",
946
- children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */ B(O, {
947
+ children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */ z(ee, {
947
948
  avatar: { size: 24 },
948
- showTitle: { width: Pe(t) },
949
+ showTitle: { width: Fe(t) },
949
950
  paragraph: !1,
950
951
  active: !0,
951
952
  color: Z.skeletonColor
952
953
  }, t))
953
- }) : Xe ? /* @__PURE__ */ B(c, { label: ee }) : Ze ? /* @__PURE__ */ B(l, { label: N }) : /* @__PURE__ */ B(Ne, {
954
- listRef: _e,
954
+ }) : Ze ? /* @__PURE__ */ z(c, { label: te }) : Qe ? /* @__PURE__ */ z(l, { label: M }) : /* @__PURE__ */ z(Pe, {
955
+ listRef: G,
955
956
  id: ge,
956
957
  role: "list",
957
958
  style: { height: "100%" },
@@ -959,8 +960,8 @@ var X = /* @__PURE__ */ function(e) {
959
960
  rowCount: Q.length,
960
961
  rowHeight: Ie,
961
962
  overscanCount: me,
962
- onResize: Ce,
963
- rowProps: Ge
963
+ onResize: we,
964
+ rowProps: Xe
964
965
  })
965
966
  })
966
967
  ]
@@ -976,25 +977,25 @@ var X = /* @__PURE__ */ function(e) {
976
977
  warningIcon: "_warningIcon_11lia_35"
977
978
  }, $e = ({ title: e, failedCount: t, isCollapsed: n, jobsId: r, labels: i, styles: o, onToggleCollapse: s, onClose: c }) => {
978
979
  let l = o?.typography;
979
- return /* @__PURE__ */ V("div", {
980
+ return /* @__PURE__ */ B("div", {
980
981
  className: a($.divider, "mx-4 flex items-center justify-between py-3"),
981
- children: [/* @__PURE__ */ V("div", {
982
+ children: [/* @__PURE__ */ B("div", {
982
983
  className: "flex min-w-0 items-center gap-2",
983
- children: [/* @__PURE__ */ B("span", {
984
+ children: [/* @__PURE__ */ z("span", {
984
985
  className: a($.text, "truncate", l?.titleClassName || "dial-small-paragraph-semi-text"),
985
986
  children: e
986
- }), t > 0 && /* @__PURE__ */ B("span", {
987
+ }), t > 0 && /* @__PURE__ */ z("span", {
987
988
  className: a($.failureCount, "inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full px-1", l?.failureCountClassName || "dial-small-paragraph-semi-text"),
988
989
  children: t
989
990
  })]
990
- }), /* @__PURE__ */ V("div", {
991
+ }), /* @__PURE__ */ B("div", {
991
992
  className: "flex shrink-0 items-center gap-1",
992
- children: [/* @__PURE__ */ B(x, {
993
+ children: [/* @__PURE__ */ z(S, {
993
994
  "aria-label": n ? i.expandQueueAriaLabel : i.collapseQueueAriaLabel,
994
995
  size: y.Small,
995
996
  "aria-expanded": !n,
996
997
  "aria-controls": r,
997
- icon: B(n ? ue : le, {
998
+ icon: z(n ? ue : H, {
998
999
  size: g.SM,
999
1000
  className: $.textSecondary,
1000
1001
  stroke: _,
@@ -1002,10 +1003,10 @@ var X = /* @__PURE__ */ function(e) {
1002
1003
  }),
1003
1004
  onClick: s,
1004
1005
  className: Qe
1005
- }), /* @__PURE__ */ B(x, {
1006
+ }), /* @__PURE__ */ z(S, {
1006
1007
  "aria-label": i.closeQueueAriaLabel,
1007
1008
  size: y.Small,
1008
- icon: /* @__PURE__ */ B(_e, {
1009
+ icon: /* @__PURE__ */ z(ge, {
1009
1010
  size: g.SM,
1010
1011
  className: $.textSecondary,
1011
1012
  stroke: _,
@@ -1018,33 +1019,33 @@ var X = /* @__PURE__ */ function(e) {
1018
1019
  });
1019
1020
  }, et = [".dial", ".zip"], tt = (e) => {
1020
1021
  let t = e.toLowerCase();
1021
- return et.some((e) => t.endsWith(e)) ? pe : t.endsWith(".json") ? me : fe;
1022
+ return et.some((e) => t.endsWith(e)) ? W : t.endsWith(".json") ? pe : U;
1022
1023
  }, nt = ({ job: t, labels: n, onCancel: r, styles: i }) => {
1023
1024
  let o = i?.typography, s = tt(t.fileName), c = t.status === e.Canceled;
1024
- return /* @__PURE__ */ V("div", {
1025
+ return /* @__PURE__ */ B("div", {
1025
1026
  className: "group flex items-center gap-2 px-4 py-2",
1026
1027
  children: [
1027
- /* @__PURE__ */ B(s, {
1028
+ /* @__PURE__ */ z(s, {
1028
1029
  size: g.SM,
1029
1030
  stroke: _,
1030
1031
  className: $.textSecondary,
1031
1032
  "aria-hidden": !0
1032
1033
  }),
1033
- /* @__PURE__ */ B(b, {
1034
+ /* @__PURE__ */ z(b, {
1034
1035
  text: t.fileName,
1035
1036
  className: a(c ? $.textSecondary : $.text, o?.jobLabelClassName || "dial-small-text"),
1036
1037
  contentClassName: "!z-[80]"
1037
1038
  }),
1038
- t.status === e.InProgress && /* @__PURE__ */ V("div", {
1039
+ t.status === e.InProgress && /* @__PURE__ */ B("div", {
1039
1040
  className: a("flex size-7 shrink-0 items-center justify-center", "grid"),
1040
- children: [/* @__PURE__ */ B(A, {
1041
+ children: [/* @__PURE__ */ z(A, {
1041
1042
  size: g.SM,
1042
1043
  ariaLabel: n.jobProgressAriaLabel(t.fileName),
1043
1044
  className: "pointer-events-none col-start-1 row-start-1 opacity-100 transition-opacity group-focus-within:opacity-0 group-hover:opacity-0"
1044
- }), /* @__PURE__ */ B(x, {
1045
+ }), /* @__PURE__ */ z(S, {
1045
1046
  "aria-label": n.cancelJobAriaLabel(t.fileName),
1046
1047
  size: y.Small,
1047
- icon: /* @__PURE__ */ B(_e, {
1048
+ icon: /* @__PURE__ */ z(ge, {
1048
1049
  size: g.SM,
1049
1050
  className: $.textSecondary,
1050
1051
  stroke: _,
@@ -1054,55 +1055,55 @@ var X = /* @__PURE__ */ function(e) {
1054
1055
  className: "col-start-1 row-start-1 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100"
1055
1056
  })]
1056
1057
  }),
1057
- t.status === e.Success && /* @__PURE__ */ B("span", {
1058
+ t.status === e.Success && /* @__PURE__ */ z("span", {
1058
1059
  className: "flex size-7 shrink-0 items-center justify-center",
1059
- children: /* @__PURE__ */ B(U, {
1060
+ children: /* @__PURE__ */ z(le, {
1060
1061
  size: g.SM,
1061
1062
  stroke: _,
1062
1063
  className: $.successIcon,
1063
1064
  "aria-hidden": !0
1064
1065
  })
1065
1066
  }),
1066
- t.status === e.Warning && /* @__PURE__ */ B(ee, {
1067
- tooltip: n.jobWarningMessage(t.warningCode),
1067
+ t.status === e.Warning && /* @__PURE__ */ z(j, {
1068
+ tooltip: n.jobWarningMessage(t.warningCode, t.warningNames),
1068
1069
  contentClassName: "!z-[80]",
1069
1070
  asChild: !0,
1070
- children: /* @__PURE__ */ B("span", {
1071
+ children: /* @__PURE__ */ z("span", {
1071
1072
  className: "flex size-7 shrink-0 items-center justify-center",
1072
1073
  role: "img",
1073
- "aria-label": n.jobWarningMessage(t.warningCode),
1074
+ "aria-label": n.jobWarningMessage(t.warningCode, t.warningNames),
1074
1075
  tabIndex: 0,
1075
- children: /* @__PURE__ */ B(oe, {
1076
+ children: /* @__PURE__ */ z(V, {
1076
1077
  size: g.SM,
1077
1078
  className: $.warningIcon,
1078
1079
  "aria-hidden": !0
1079
1080
  })
1080
1081
  })
1081
1082
  }),
1082
- t.status === e.Failed && /* @__PURE__ */ B(ee, {
1083
+ t.status === e.Failed && /* @__PURE__ */ z(j, {
1083
1084
  tooltip: n.jobErrorMessage(t.errorCode),
1084
1085
  contentClassName: "!z-[80]",
1085
1086
  asChild: !0,
1086
- children: /* @__PURE__ */ B("span", {
1087
+ children: /* @__PURE__ */ z("span", {
1087
1088
  className: "flex size-7 shrink-0 items-center justify-center",
1088
1089
  role: "img",
1089
1090
  "aria-label": n.jobErrorMessage(t.errorCode),
1090
1091
  tabIndex: 0,
1091
- children: /* @__PURE__ */ B(H, {
1092
+ children: /* @__PURE__ */ z(oe, {
1092
1093
  size: g.SM,
1093
1094
  className: $.errorIcon,
1094
1095
  "aria-hidden": !0
1095
1096
  })
1096
1097
  })
1097
1098
  }),
1098
- c && /* @__PURE__ */ B("span", {
1099
+ c && /* @__PURE__ */ z("span", {
1099
1100
  className: a($.textSecondary, "shrink-0", o?.canceledLabelClassName || "dial-small-text"),
1100
1101
  children: n.canceledLabel
1101
1102
  })
1102
1103
  ]
1103
1104
  });
1104
- }, rt = (e) => Math.round(e.reduce((e, t) => e + t.progress.percent, 0) / e.length), it = (t) => t.filter((t) => t.status !== e.InProgress).length, at = (e, t, n) => e && t ? n.closeQueueConfirmDescriptionMixed : t ? n.closeQueueConfirmDescriptionFailed : n.closeQueueConfirmDescriptionInProgress, ot = P(({ title: t, jobs: n, onClose: i, onCancel: o, labels: s, styles: c }) => {
1105
- let [l, u] = z(!1), d = ne(), [f, p] = z(!1), g = c?.colors, _ = {
1105
+ }, rt = (e) => Math.round(e.reduce((e, t) => e + t.progress.percent, 0) / e.length), it = (t) => t.filter((t) => t.status !== e.InProgress).length, at = (e, t, n) => e && t ? n.closeQueueConfirmDescriptionMixed : t ? n.closeQueueConfirmDescriptionFailed : n.closeQueueConfirmDescriptionInProgress, ot = N(({ title: t, jobs: n, onClose: i, onCancel: o, labels: s, styles: c }) => {
1106
+ let [l, u] = R(!1), d = ne(), [f, p] = R(!1), g = c?.colors, _ = {
1106
1107
  ...r({
1107
1108
  "--cp-transfer-queue-bg": g?.background,
1108
1109
  "--cp-transfer-queue-text": g?.text,
@@ -1115,30 +1116,30 @@ var X = /* @__PURE__ */ function(e) {
1115
1116
  "--cp-transfer-queue-failure-count-text": g?.failureCountText
1116
1117
  }),
1117
1118
  ...c?.cssVars
1118
- }, v = n.some((t) => t.status === e.InProgress), b = n.some((t) => t.status === e.Failed), x = n.length > 0 && n.every((t) => t.status === e.Success), S = F(() => {
1119
+ }, v = n.some((t) => t.status === e.InProgress), b = n.some((t) => t.status === e.Failed), x = n.length > 0 && n.every((t) => t.status === e.Success), S = P(() => {
1119
1120
  v || b ? p(!0) : i();
1120
1121
  }, [
1121
1122
  v,
1122
1123
  b,
1123
1124
  i
1124
- ]), C = F(() => {
1125
+ ]), C = P(() => {
1125
1126
  p(!1), i();
1126
- }, [i]), w = F(() => {
1127
+ }, [i]), w = P(() => {
1127
1128
  u((e) => !e);
1128
1129
  }, []);
1129
- if (I(() => {
1130
+ if (F(() => {
1130
1131
  if (!x) return;
1131
1132
  let e = setTimeout(i, Ze);
1132
1133
  return () => clearTimeout(e);
1133
1134
  }, [x, i]), n.length === 0) return null;
1134
1135
  let T = n.filter((t) => t.status === e.Failed).length;
1135
- return /* @__PURE__ */ V("div", {
1136
+ return /* @__PURE__ */ B("div", {
1136
1137
  role: "status",
1137
1138
  "aria-live": "polite",
1138
1139
  style: _,
1139
1140
  className: a($.root, "w-[370px] max-w-[calc(100vw-2rem)] rounded-xl shadow-md", c?.rootClassName),
1140
1141
  children: [
1141
- /* @__PURE__ */ B($e, {
1142
+ /* @__PURE__ */ z($e, {
1142
1143
  title: t,
1143
1144
  failedCount: T,
1144
1145
  isCollapsed: l,
@@ -1148,23 +1149,23 @@ var X = /* @__PURE__ */ function(e) {
1148
1149
  onToggleCollapse: w,
1149
1150
  onClose: S
1150
1151
  }),
1151
- l && v && /* @__PURE__ */ B(E, {
1152
+ l && v && /* @__PURE__ */ z(D, {
1152
1153
  value: rt(n),
1153
1154
  size: y.Small,
1154
1155
  "aria-label": s.queueProgressAriaLabel,
1155
1156
  "aria-valuetext": s.queueProgressValueText(it(n), n.length)
1156
1157
  }),
1157
- !l && /* @__PURE__ */ B("div", {
1158
+ !l && /* @__PURE__ */ z("div", {
1158
1159
  id: d,
1159
1160
  className: a("flex max-h-[40vh] flex-col overflow-y-auto py-1", c?.bodyClassName),
1160
- children: n.map((e) => /* @__PURE__ */ B(nt, {
1161
+ children: n.map((e) => /* @__PURE__ */ z(nt, {
1161
1162
  job: e,
1162
1163
  labels: s,
1163
1164
  onCancel: o,
1164
1165
  styles: c
1165
1166
  }, e.id))
1166
1167
  }),
1167
- /* @__PURE__ */ B(m, {
1168
+ /* @__PURE__ */ z(m, {
1168
1169
  open: f,
1169
1170
  header: s.closeQueueConfirmHeader,
1170
1171
  description: at(v, b, s),
@@ -1180,30 +1181,30 @@ var X = /* @__PURE__ */ function(e) {
1180
1181
  ot.displayName = "ImportExportQueue";
1181
1182
  //#endregion
1182
1183
  //#region src/components/RenameConversationPopup/RenameConversationPopup.tsx
1183
- var st = P(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCancel: c, onGenerateWithAi: l, labels: u, styles: d }) => {
1184
- let [f, m] = z(t), [h, v] = z(!1), [y, b] = z(null), S = R(null), E = R(!1), D = R(0);
1185
- I(() => {
1186
- let n = e && !E.current;
1187
- if (E.current = e, !e) {
1184
+ var st = N(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCancel: c, onGenerateWithAi: l, labels: u, styles: d }) => {
1185
+ let [f, m] = R(t), [h, v] = R(!1), [y, b] = R(null), x = L(null), C = L(!1), D = L(0);
1186
+ F(() => {
1187
+ let n = e && !C.current;
1188
+ if (C.current = e, !e) {
1188
1189
  D.current += 1, v(!1);
1189
1190
  return;
1190
1191
  }
1191
1192
  if (!n) return;
1192
1193
  D.current += 1, m(t), b(null), v(!1);
1193
- let r = setTimeout(() => S.current?.focus(), 0);
1194
+ let r = setTimeout(() => x.current?.focus(), 0);
1194
1195
  return () => clearTimeout(r);
1195
- }, [e, t]), I(() => () => {
1196
+ }, [e, t]), F(() => () => {
1196
1197
  D.current += 1;
1197
1198
  }, []);
1198
- let O = s(f.trim()), k = i(O) > 255, j = n || O === "" || O === t.trim() || k, M = F(() => {
1199
- j || a(O);
1199
+ let O = s(f.trim()), ee = i(O) > 255, k = n || O === "" || O === t.trim() || ee, j = P(() => {
1200
+ k || a(O);
1200
1201
  }, [
1201
- j,
1202
+ k,
1202
1203
  a,
1203
1204
  O
1204
- ]), ee = F((e) => {
1205
- e.key === "Enter" && M();
1206
- }, [M]), N = F(async () => {
1205
+ ]), te = P((e) => {
1206
+ e.key === "Enter" && j();
1207
+ }, [j]), M = P(async () => {
1207
1208
  if (h) return;
1208
1209
  let e = ++D.current;
1209
1210
  v(!0), b(null);
@@ -1221,11 +1222,11 @@ var st = P(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCa
1221
1222
  h,
1222
1223
  l,
1223
1224
  u.renameWithAiError
1224
- ]), te;
1225
- return te = k ? u.nameTooLongError : y ?? r ?? void 0, /* @__PURE__ */ B(w, {
1225
+ ]), N;
1226
+ return N = ee ? u.nameTooLongError : y ?? r ?? void 0, /* @__PURE__ */ z(T, {
1226
1227
  open: e,
1227
1228
  header: u.popupTitle,
1228
- size: T.Sm,
1229
+ size: E.Sm,
1229
1230
  onClose: c,
1230
1231
  mainButtons: n ? void 0 : [{
1231
1232
  label: u.cancelLabel,
@@ -1233,33 +1234,33 @@ var st = P(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCa
1233
1234
  }, {
1234
1235
  label: u.saveLabel,
1235
1236
  variant: p.Primary,
1236
- disabled: j,
1237
- onClick: M
1237
+ disabled: k,
1238
+ onClick: j
1238
1239
  }],
1239
- children: /* @__PURE__ */ B("div", {
1240
+ children: /* @__PURE__ */ z("div", {
1240
1241
  className: d?.bodyClassName,
1241
1242
  style: d?.cssVars,
1242
- children: n ? /* @__PURE__ */ B("div", {
1243
+ children: n ? /* @__PURE__ */ z("div", {
1243
1244
  className: "h-[120px] px-6 py-4",
1244
- children: /* @__PURE__ */ B(A, { size: 50 })
1245
- }) : /* @__PURE__ */ V("div", {
1245
+ children: /* @__PURE__ */ z(A, { size: 50 })
1246
+ }) : /* @__PURE__ */ B("div", {
1246
1247
  className: "flex items-start gap-2 px-6 py-3",
1247
- children: [/* @__PURE__ */ B("div", {
1248
+ children: [/* @__PURE__ */ z("div", {
1248
1249
  className: "min-w-0 flex-1",
1249
- children: /* @__PURE__ */ B(C, {
1250
- inputRef: S,
1250
+ children: /* @__PURE__ */ z(w, {
1251
+ inputRef: x,
1251
1252
  value: f,
1252
1253
  placeholder: u.inputPlaceholder,
1253
- error: te,
1254
+ error: N,
1254
1255
  onChange: (e) => m(o(e ?? "")),
1255
- onKeyDown: ee
1256
+ onKeyDown: te
1256
1257
  })
1257
- }), /* @__PURE__ */ B(x, {
1258
+ }), /* @__PURE__ */ z(S, {
1258
1259
  "aria-label": u.renameWithAiLabel,
1259
1260
  tooltipProps: { tooltip: u.renameWithAiLabel },
1260
1261
  disabled: h || n,
1261
- onClick: N,
1262
- icon: h ? /* @__PURE__ */ B(A, { size: g.MD }) : /* @__PURE__ */ B(ge, {
1262
+ onClick: M,
1263
+ icon: h ? /* @__PURE__ */ z(A, { size: g.MD }) : /* @__PURE__ */ z(he, {
1263
1264
  size: g.MD,
1264
1265
  stroke: _
1265
1266
  })
@@ -1270,4 +1271,4 @@ var st = P(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCa
1270
1271
  });
1271
1272
  st.displayName = "RenameConversationPopup";
1272
1273
  //#endregion
1273
- export { Xe as ConversationPanel, ot as ImportExportQueue, st as RenameConversationPopup, tt as getTransferFileIcon };
1274
+ export { _e as CONVERSATION_PANEL_CLASS, Xe as ConversationPanel, ot as ImportExportQueue, st as RenameConversationPopup, tt as getTransferFileIcon };