@epam/ai-dial-conversation-panel 1.1.0-dev.447 → 1.1.0-dev.456

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,11 @@
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 ee, Tag as A, TagAppearance as j, Tooltip as te, mergeClasses as ne } from "@epam/ai-dial-ui-kit";
4
- import { createElement as re, memo as M, useCallback as N, useEffect as P, useId as ie, useImperativeHandle as ae, useLayoutEffect as oe, useMemo as F, useRef as I, useState as L } from "react";
5
- import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
6
- import { IconAlertCircleFilled as V, IconAlertTriangleFilled as se, IconCaretDownFilled as ce, IconCaretRightFilled as H, IconCheck as le, IconChevronDown as U, IconChevronUp as ue, IconClock as W, IconDotsVertical as de, IconFile as fe, IconFileZip as pe, IconJson as me, IconPlus as he, IconSparkles as ge, IconX as _e } from "@tabler/icons-react";
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
7
  //#region ../../node_modules/react-window/dist/react-window.js
8
- var G = typeof window < "u" ? oe : P;
8
+ var G = typeof window < "u" ? ie : I;
9
9
  function ve(e) {
10
10
  if (e !== void 0) switch (typeof e) {
11
11
  case "number": return e;
@@ -15,10 +15,10 @@ function ve(e) {
15
15
  }
16
16
  }
17
17
  function ye({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
18
- let { styleHeight: s, styleWidth: c } = F(() => ({
18
+ let { styleHeight: s, styleWidth: c } = L(() => ({
19
19
  styleHeight: ve(o?.height),
20
20
  styleWidth: ve(o?.width)
21
- }), [o?.height, o?.width]), [l, u] = L({
21
+ }), [o?.height, o?.width]), [l, u] = z({
22
22
  height: t,
23
23
  width: n
24
24
  }), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
@@ -42,7 +42,7 @@ function ye({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
42
42
  i,
43
43
  s,
44
44
  c
45
- ]), F(() => ({
45
+ ]), L(() => ({
46
46
  height: s ?? l.height,
47
47
  width: c ?? l.width
48
48
  }), [
@@ -52,12 +52,12 @@ function ye({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
52
52
  ]);
53
53
  }
54
54
  function be(e) {
55
- let t = I(() => {
55
+ let t = R(() => {
56
56
  throw Error("Cannot call during render.");
57
57
  });
58
58
  return G(() => {
59
59
  t.current = e;
60
- }, [e]), N((e) => t.current?.(e), [t]);
60
+ }, [e]), F((e) => t.current?.(e), [t]);
61
61
  }
62
62
  var K = null;
63
63
  function xe(e = !1) {
@@ -69,7 +69,7 @@ function xe(e = !1) {
69
69
  }
70
70
  return K;
71
71
  }
72
- function q({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
72
+ function Se({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
73
73
  if (t === "horizontal" && n) switch (xe()) {
74
74
  case "negative": return -r;
75
75
  case "positive-descending":
@@ -81,12 +81,12 @@ function q({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
81
81
  }
82
82
  return r;
83
83
  }
84
- function J(e, t = "Assertion error") {
84
+ function q(e, t = "Assertion error") {
85
85
  if (!e) throw console.error(t), Error(t);
86
86
  }
87
- function Se(e, t) {
87
+ function J(e, t) {
88
88
  if (e === t) return !0;
89
- if (!!e != !!t || (J(e !== void 0), J(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
89
+ if (!!e != !!t || (q(e !== void 0), q(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
90
90
  for (let n in e) if (!Object.is(t[n], e[n])) return !1;
91
91
  return !0;
92
92
  }
@@ -95,7 +95,7 @@ function Ce({ cachedBounds: e, itemCount: t, itemSize: n }) {
95
95
  if (typeof n == "number") return t * n;
96
96
  {
97
97
  let n = e.get(e.size === 0 ? 0 : e.size - 1);
98
- return J(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
98
+ return q(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
99
99
  }
100
100
  }
101
101
  function we({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
@@ -135,7 +135,7 @@ function Ee({ itemCount: e, itemProps: t, itemSize: n }) {
135
135
  let r = /* @__PURE__ */ new Map();
136
136
  return {
137
137
  get(i) {
138
- for (J(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
138
+ for (q(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
139
139
  let e = r.size, a;
140
140
  switch (typeof n) {
141
141
  case "function":
@@ -151,14 +151,14 @@ function Ee({ itemCount: e, itemProps: t, itemSize: n }) {
151
151
  });
152
152
  else {
153
153
  let t = r.get(e - 1);
154
- J(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
154
+ q(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
155
155
  scrollOffset: t.scrollOffset + t.size,
156
156
  size: a
157
157
  });
158
158
  }
159
159
  }
160
160
  let a = r.get(i);
161
- return J(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
161
+ return q(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
162
162
  },
163
163
  set(e, t) {
164
164
  r.set(e, t);
@@ -169,7 +169,7 @@ function Ee({ itemCount: e, itemProps: t, itemSize: n }) {
169
169
  };
170
170
  }
171
171
  function De({ itemCount: e, itemProps: t, itemSize: n }) {
172
- return F(() => Ee({
172
+ return L(() => Ee({
173
173
  itemCount: e,
174
174
  itemProps: t,
175
175
  itemSize: n
@@ -183,7 +183,7 @@ function Oe({ containerSize: e, itemSize: t }) {
183
183
  let n;
184
184
  switch (typeof t) {
185
185
  case "string":
186
- J(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), J(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseInt(t) / 100;
186
+ q(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), q(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseInt(t) / 100;
187
187
  break;
188
188
  default:
189
189
  n = t;
@@ -198,14 +198,14 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
198
198
  element: e,
199
199
  mode: r === "vertical" ? "only-height" : "only-width",
200
200
  style: t
201
- }), f = I({
201
+ }), f = R({
202
202
  height: 0,
203
203
  width: 0
204
204
  }), p = r === "vertical" ? u : d, m = Oe({
205
205
  containerSize: p,
206
206
  itemSize: s
207
207
  });
208
- oe(() => {
208
+ ie(() => {
209
209
  if (typeof c == "function") {
210
210
  let e = f.current;
211
211
  (e.height !== u || e.width !== d) && (c({
@@ -222,7 +222,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
222
222
  itemCount: a,
223
223
  itemProps: o,
224
224
  itemSize: m
225
- }), g = N((e) => h.get(e), [h]), [_, v] = L(() => Te({
225
+ }), g = F((e) => h.get(e), [h]), [_, v] = z(() => Te({
226
226
  cachedBounds: h,
227
227
  containerScrollOffset: 0,
228
228
  containerSize: p,
@@ -233,7 +233,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
233
233
  startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
234
234
  stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
235
235
  stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
236
- }, C = N(() => Ce({
236
+ }, C = F(() => Ce({
237
237
  cachedBounds: h,
238
238
  itemCount: a,
239
239
  itemSize: m
@@ -241,9 +241,9 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
241
241
  h,
242
242
  a,
243
243
  m
244
- ]), w = N((t) => Te({
244
+ ]), w = F((t) => Te({
245
245
  cachedBounds: h,
246
- containerScrollOffset: q({
246
+ containerScrollOffset: Se({
247
247
  containerElement: e,
248
248
  direction: r,
249
249
  isRtl: i,
@@ -273,7 +273,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
273
273
  v((t) => {
274
274
  let { scrollLeft: n, scrollTop: o } = e, s = Te({
275
275
  cachedBounds: h,
276
- containerScrollOffset: q({
276
+ containerScrollOffset: Se({
277
277
  containerElement: e,
278
278
  direction: r,
279
279
  isRtl: i,
@@ -283,7 +283,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
283
283
  itemCount: a,
284
284
  overscanCount: l
285
285
  });
286
- return Se(s, t) ? t : s;
286
+ return J(s, t) ? t : s;
287
287
  });
288
288
  };
289
289
  return e.addEventListener("scroll", t), () => {
@@ -310,14 +310,14 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
310
310
  itemSize: m
311
311
  });
312
312
  if (e) {
313
- if (s = q({
313
+ if (s = Se({
314
314
  containerElement: e,
315
315
  direction: r,
316
316
  isRtl: i,
317
317
  scrollOffset: s
318
318
  }), typeof e.scrollTo != "function") {
319
319
  let e = w(s);
320
- Se(_, e) || v(e);
320
+ J(_, e) || v(e);
321
321
  }
322
322
  return s;
323
323
  }
@@ -329,29 +329,29 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
329
329
  };
330
330
  }
331
331
  function Ae(e) {
332
- return F(() => e, Object.values(e));
332
+ return L(() => e, Object.values(e));
333
333
  }
334
- function Y(e, t) {
334
+ function je(e, t) {
335
335
  let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
336
- return Se(n, a) && Se(r, o) && Se(i, s);
336
+ return J(n, a) && J(r, o) && J(i, s);
337
337
  }
338
- function je(e) {
338
+ function Me(e) {
339
339
  return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
340
340
  }
341
- var Me = "data-react-window-index";
341
+ var Y = "data-react-window-index";
342
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 = F(() => M(s, Y), [s]), [g, _] = L(null), v = je(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = ke({
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
344
  containerElement: g,
345
345
  containerStyle: f,
346
346
  defaultContainerSize: n,
347
347
  direction: "vertical",
348
348
  itemCount: c,
349
349
  itemProps: m,
350
- itemSize: F(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
350
+ itemSize: L(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
351
351
  onResize: i,
352
352
  overscanCount: o
353
353
  });
354
- ae(r, () => ({
354
+ re(r, () => ({
355
355
  get element() {
356
356
  return g;
357
357
  },
@@ -371,7 +371,7 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
371
371
  let e = Array.from(g.children).filter((e, t) => {
372
372
  if (e.hasAttribute("aria-hidden")) return !1;
373
373
  let n = `${S + t}`;
374
- return e.setAttribute(Me, n), !0;
374
+ return e.setAttribute(Y, n), !0;
375
375
  });
376
376
  if (v) return l.observeRowElements(e);
377
377
  }, [
@@ -380,7 +380,7 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
380
380
  l,
381
381
  S,
382
382
  w
383
- ]), P(() => {
383
+ ]), I(() => {
384
384
  S >= 0 && w >= 0 && a && a({
385
385
  startIndex: C,
386
386
  stopIndex: T
@@ -395,11 +395,11 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
395
395
  w,
396
396
  T
397
397
  ]);
398
- let E = F(() => {
398
+ let E = L(() => {
399
399
  let e = [];
400
400
  if (c > 0) for (let t = S; t <= w; t++) {
401
401
  let n = y(t);
402
- e.push(/* @__PURE__ */ re(h, {
402
+ e.push(/* @__PURE__ */ te(h, {
403
403
  ...m,
404
404
  ariaAttributes: {
405
405
  "aria-posinset": t + 1,
@@ -426,7 +426,7 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
426
426
  m,
427
427
  S,
428
428
  w
429
- ]), D = /* @__PURE__ */ z("div", {
429
+ ]), D = /* @__PURE__ */ B("div", {
430
430
  "aria-hidden": !0,
431
431
  style: {
432
432
  height: b(),
@@ -434,7 +434,7 @@ function Ne({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
434
434
  zIndex: -1
435
435
  }
436
436
  });
437
- return re(d, {
437
+ return te(d, {
438
438
  role: "list",
439
439
  ...p,
440
440
  className: t,
@@ -480,7 +480,7 @@ var X = /* @__PURE__ */ function(e) {
480
480
  a = e.item.id;
481
481
  }
482
482
  return null;
483
- }, Z = [
483
+ }, Ve = [
484
484
  {
485
485
  value: n.All,
486
486
  labelKey: "all"
@@ -497,38 +497,41 @@ var X = /* @__PURE__ */ function(e) {
497
497
  value: n.Organization,
498
498
  labelKey: "organization"
499
499
  }
500
- ], Ve = M(({ activeTab: e, labels: t, onChange: n, tabClassName: r = "dial-tiny-semi-text" }) => /* @__PURE__ */ z("div", {
501
- role: "group",
502
- "aria-label": t.groupAriaLabel ?? "Filter chats",
503
- className: "flex flex-nowrap gap-1 px-3 py-2",
504
- children: Z.map(({ value: i, labelKey: a }) => /* @__PURE__ */ z(A, {
505
- label: t[a],
506
- appearance: j.Selectable,
507
- selected: e === i,
508
- onClick: () => n(i),
509
- className: ne("flex-1 justify-center rounded-full", r)
510
- }, i))
511
- })), He = { button: "_button_1vksy_1" }, Ue = M(({ label: e, onClick: t, labelClassName: n = "dial-small-semi-text", colors: i }) => /* @__PURE__ */ z("div", {
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", {
512
515
  className: "px-3 py-2",
513
516
  style: r({
514
517
  "--cp-new-chat-bg": i?.background,
515
518
  "--cp-new-chat-text": i?.text,
516
519
  "--cp-new-chat-focus-outline": i?.focusOutline
517
520
  }),
518
- children: /* @__PURE__ */ B("button", {
521
+ children: /* @__PURE__ */ V("button", {
519
522
  onClick: t,
520
523
  type: "button",
521
- 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", He.button),
522
- children: [/* @__PURE__ */ z(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),
525
+ children: [/* @__PURE__ */ B(he, {
523
526
  size: 18,
524
527
  stroke: _,
525
528
  className: "shrink-0"
526
- }), /* @__PURE__ */ z("span", {
529
+ }), /* @__PURE__ */ B("span", {
527
530
  className: n,
528
531
  children: e
529
532
  })]
530
533
  })
531
- })), Q = {
534
+ })), Z = {
532
535
  skeletonColor: "var(--cp-skeleton-color, var(--bg-control-disable-primary, #dce0e8))",
533
536
  item: "_item_i3lsf_2",
534
537
  itemActive: "_itemActive_i3lsf_15",
@@ -539,9 +542,9 @@ var X = /* @__PURE__ */ function(e) {
539
542
  triggerIcon: "_triggerIcon_i3lsf_38",
540
543
  unreadDot: "_unreadDot_i3lsf_46",
541
544
  search: "_search_i3lsf_54"
542
- }, We = ({ label: e, isExpanded: t, onToggle: n, listId: r, className: i = "dial-tiny-lead-text", dropZoneGroupKey: o, isDragOver: s, onDragOver: c, onDragLeave: l, onDrop: u }) => {
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 }) => {
543
546
  let d = o != null;
544
- return /* @__PURE__ */ B("button", {
547
+ return /* @__PURE__ */ V("button", {
545
548
  type: "button",
546
549
  "aria-expanded": t,
547
550
  "aria-controls": r,
@@ -555,113 +558,113 @@ var X = /* @__PURE__ */ function(e) {
555
558
  onDrop: d ? (e) => {
556
559
  d && (e.preventDefault(), u?.(o, o, null));
557
560
  } : void 0,
558
- className: a("flex h-6 w-full items-center gap-1 rounded py-1 pe-3 text-start", i, Q.groupHeader, s && Q.dropZoneActive),
559
- children: [t ? /* @__PURE__ */ z(ce, {
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, {
560
563
  size: 12,
561
564
  className: "shrink-0",
562
565
  "aria-hidden": !0
563
- }) : /* @__PURE__ */ z(H, {
566
+ }) : /* @__PURE__ */ B(ce, {
564
567
  size: 12,
565
568
  className: "shrink-0 rtl:scale-x-[-1]",
566
569
  "aria-hidden": !0
567
- }), /* @__PURE__ */ z(b, { text: e })]
570
+ }), /* @__PURE__ */ B(b, { text: e })]
568
571
  });
569
- }, 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: ee, onDrop: A }) => {
570
- let [j, te] = L(!1), ne = I(null), re = N((t) => {
571
- te(t), t && ne.current && s?.(e, ne.current);
572
- }, [e, s]), M = o?.(e) ?? [], P = M.length > 0, ie = e.isIconLoading ? /* @__PURE__ */ z(O, {
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
576
  variant: k.Circular,
574
577
  width: g.LG,
575
578
  height: g.LG,
576
- color: Q.skeletonColor,
579
+ color: Z.skeletonColor,
577
580
  "aria-hidden": !0
578
- }) : /* @__PURE__ */ z(t, {
581
+ }) : /* @__PURE__ */ B(t, {
579
582
  src: e.iconUrl,
580
583
  size: g.LG,
581
584
  initialsName: e.iconTooltip ?? "",
582
585
  labels: { tooltip: e.iconTooltip },
583
586
  styles: { badgeClassName: u }
584
- }), ae = /* @__PURE__ */ B("span", {
587
+ }), re = /* @__PURE__ */ V("span", {
585
588
  className: "flex shrink-0 items-center",
586
- children: [/* @__PURE__ */ z("span", {
589
+ children: [/* @__PURE__ */ B("span", {
587
590
  className: "relative flex size-3 shrink-0 items-center justify-center",
588
- children: e.isUnread && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z("span", {
589
- className: a("size-[5.33px] rounded-full", Q.unreadDot),
591
+ children: e.isUnread && /* @__PURE__ */ V(ae, { children: [/* @__PURE__ */ B("span", {
592
+ className: a("size-[5.33px] rounded-full", Z.unreadDot),
590
593
  "aria-hidden": !0
591
- }), /* @__PURE__ */ z("span", {
594
+ }), /* @__PURE__ */ B("span", {
592
595
  className: "sr-only",
593
596
  children: p
594
597
  })] })
595
- }), ie]
596
- }), oe = Fe(P, j), F = e.showTaskBadge ? /* @__PURE__ */ B("span", {
597
- className: a("flex h-5 shrink-0 items-center justify-center gap-0.5 rounded-full border pe-2 ps-1", Q.taskBadge, d),
598
- children: [/* @__PURE__ */ z(W, {
598
+ }), ne]
599
+ }), ie = Fe(I, M), L = e.showTaskBadge ? /* @__PURE__ */ V("span", {
600
+ 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, {
599
602
  size: 12,
600
603
  "aria-hidden": !0,
601
604
  stroke: _
602
605
  }), e.taskBadgeLabel]
603
- }) : void 0, V = m != null, se = N((e) => {
604
- e.currentTarget.contains(e.relatedTarget) || ee?.();
605
- }, [ee]), ce = N((t) => {
606
- if (!m || !h || !A) return;
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
610
  t.preventDefault();
608
611
  let n = Be(t, e.id, h, m);
609
- A(e.id, m, n);
612
+ j(e.id, m, n);
610
613
  }, [
611
614
  e.id,
612
615
  h,
613
616
  m,
614
- A
615
- ]), H = e.id === b, le = e.id === C, U = m != null && (w?.has(m) ?? !1), ue = b != null;
616
- return /* @__PURE__ */ B("li", {
617
- className: a("group/conversation relative", H && "cursor-grabbing opacity-50", le && U && "rounded", le && U && Q.dropZoneActive, ue && !H && !U && "cursor-not-allowed"),
618
- draggable: V || void 0,
619
- onDragStart: V ? () => T?.(e.id) : void 0,
620
- onDragEnd: V ? E : void 0,
621
- onDragOver: V ? (t) => {
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) => {
622
625
  t.preventDefault(), D?.(e.id);
623
626
  } : void 0,
624
- onDragLeave: V ? se : void 0,
625
- onDrop: V ? ce : void 0,
626
- children: [/* @__PURE__ */ z("a", {
627
+ onDragLeave: H ? oe : void 0,
628
+ onDrop: H ? se : void 0,
629
+ children: [/* @__PURE__ */ B("a", {
627
630
  href: e.href,
628
631
  className: "contents",
629
632
  onClick: (t) => {
630
633
  e.href && (t.preventDefault(), r(e.id));
631
634
  },
632
- children: /* @__PURE__ */ z(f, {
633
- iconBefore: ae,
634
- label: /* @__PURE__ */ z(S, {
635
+ children: /* @__PURE__ */ B(f, {
636
+ iconBefore: re,
637
+ label: /* @__PURE__ */ B(S, {
635
638
  text: e.title,
636
639
  query: i,
637
640
  className: l,
638
641
  maxLines: 1
639
642
  }),
640
- iconAfter: F,
643
+ iconAfter: L,
641
644
  textClassName: "min-w-0 flex-1",
642
645
  "aria-current": n ? "page" : void 0,
643
646
  onClick: e.href ? void 0 : () => r(e.id),
644
647
  tabIndex: e.href ? -1 : void 0,
645
- className: a("h-8 w-full justify-start gap-2 py-2 ps-0 after:pointer-events-none", oe, Q.item, n && Q.itemActive, j && Q.itemActive)
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)
646
649
  })
647
- }), P && /* @__PURE__ */ z("div", {
648
- 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"),
649
- children: /* @__PURE__ */ z(v, {
650
- items: M,
651
- onOpenChange: re,
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,
652
655
  matchReferenceWidth: !1,
653
656
  listClassName: "w-[200px]",
654
- children: /* @__PURE__ */ z(x, {
655
- ref: ne,
656
- icon: /* @__PURE__ */ z(de, {
657
+ children: /* @__PURE__ */ B(x, {
658
+ ref: N,
659
+ icon: /* @__PURE__ */ B(W, {
657
660
  size: g.SM,
658
- className: Q.triggerIcon,
661
+ className: Z.triggerIcon,
659
662
  "aria-hidden": !0,
660
663
  stroke: _
661
664
  }),
662
665
  size: y.Small,
663
666
  "aria-label": c,
664
- className: a(j && Q.triggerActive)
667
+ className: a(M && Z.triggerActive)
665
668
  })
666
669
  })
667
670
  })]
@@ -670,11 +673,11 @@ var X = /* @__PURE__ */ function(e) {
670
673
  let C = r[e];
671
674
  if (C.kind === X.Header) {
672
675
  let r = C.groupKey === n.Pinned;
673
- return /* @__PURE__ */ z("div", {
676
+ return /* @__PURE__ */ B("div", {
674
677
  role: "presentation",
675
678
  style: t,
676
679
  className: e === 0 ? "pt-0" : "pt-8",
677
- children: /* @__PURE__ */ z(We, {
680
+ children: /* @__PURE__ */ B(Q, {
678
681
  label: C.label,
679
682
  isExpanded: i.has(C.groupKey),
680
683
  onToggle: () => a(C.groupKey),
@@ -688,11 +691,11 @@ var X = /* @__PURE__ */ function(e) {
688
691
  })
689
692
  });
690
693
  }
691
- return /* @__PURE__ */ z("div", {
694
+ return /* @__PURE__ */ B("div", {
692
695
  role: "presentation",
693
696
  style: t,
694
697
  className: "pt-1",
695
- children: /* @__PURE__ */ z(Ge, {
698
+ children: /* @__PURE__ */ B(Ge, {
696
699
  item: C.item,
697
700
  isActive: C.item.id === s,
698
701
  searchQuery: c,
@@ -721,242 +724,243 @@ var X = /* @__PURE__ */ function(e) {
721
724
  n.MyChats,
722
725
  n.Shared,
723
726
  n.Organization
724
- ]), Xe = M(({ 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 }) => {
725
- let { colors: T, typography: E, newChatButton: k, searchWrapperClassName: ee } = m ?? {}, { title: A, emptyLabel: j, noResultsLabel: te, loadingLabel: ne = "Loading conversations", newChatLabel: re, searchPlaceholder: M, searchClearLabel: ae, filterLabels: oe, groupLabels: R, actionsLabel: V, unreadIndicatorLabel: se, closeAriaLabel: ce } = f, [H, le] = L(""), [U, ue] = L(n.All);
726
- P(() => {
727
- S != null && ue(S);
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
731
  }, [S]);
729
- let [W, de] = L(() => Ye), [fe, pe] = L(5), me = ie(), he = I(null), ge = I(null), [_e, G] = L(null), [ve, ye] = L(null), [be, K] = L(null), xe = I(null), q = I(null), J = N(({ height: e }) => {
730
- pe(Math.ceil(e / 36 * 2));
731
- }, []), Se = N((e) => {
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
+ he(Math.ceil(e / 36 * 2));
734
+ }, []), we = F((e) => {
732
735
  le(e ?? "");
733
- }, []), Ce = N((e) => {
734
- de((t) => {
736
+ }, []), Te = F((e) => {
737
+ pe((t) => {
735
738
  let n = new Set(t);
736
739
  return n.has(e) ? n.delete(e) : n.add(e), n;
737
740
  });
738
- }, []), we = N(() => {
739
- xe.current = null, q.current = null, G(null), ye(null), K(null);
740
- }, []), Te = N((t, n) => {
741
- let r = ze(t, Re(n, t), e);
742
- xe.current = t, q.current = r, G(t), K(r);
743
- }, [e]), Ee = N(() => {
744
- we();
745
- }, [we]), De = N((e) => {
746
- ye(e);
747
- }, []), Oe = N(() => {
748
- ye(null);
749
- }, []), ke = N((e, t, n) => {
750
- let r = xe.current, i = q.current;
751
- we(), r != null && r !== e && i?.has(t) && x?.({
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?.({
752
755
  draggedId: r,
753
756
  targetGroupKey: t,
754
757
  afterId: n
755
758
  });
756
- }, [we, x]), Ae = r({
757
- "--cp-item-hover": T?.itemHover,
758
- "--cp-item-active": T?.itemActive,
759
- "--cp-text": T?.text,
760
- "--cp-text-secondary": T?.textSecondary,
761
- "--cp-new-chat-bg": k?.background,
762
- "--cp-new-chat-text": k?.text,
763
- "--cp-new-chat-focus-outline": k?.focusOutline,
764
- "--cp-drop-zone-ring": T?.dropZoneRing,
765
- "--cp-trigger-bg": T?.triggerBackground,
766
- "--cp-trigger-icon": T?.triggerIcon,
767
- "--cp-trigger-icon-idle": T?.triggerIconIdle,
768
- "--cp-skeleton-color": T?.skeletonColor,
769
- "--cp-task-badge-border": T?.taskBadgeBorder,
770
- "--cp-task-badge-bg": T?.taskBadgeBackground,
771
- "--cp-task-badge-text": T?.taskBadgeText,
772
- "--cp-unread-dot": T?.unreadDot
773
- }), Y = F(() => e.filter((e) => qe(e, U) && Je(e, H)), [
774
- e,
775
- U,
776
- H
777
- ]), je = F(() => Y.filter((e) => e.isPinned), [Y]), Me = F(() => Y.filter((e) => !e.isPinned && e.source !== n.Shared && e.source !== n.Organization), [Y]), Fe = F(() => Y.filter((e) => !e.isPinned && e.source === n.Shared), [Y]), Le = F(() => Y.filter((e) => !e.isPinned && e.source === n.Organization), [Y]), Be = F(() => [
759
+ }, [Ee, x]), Me = r({
760
+ "--cp-item-hover": E?.itemHover,
761
+ "--cp-item-active": E?.itemActive,
762
+ "--cp-text": E?.text,
763
+ "--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,
767
+ "--cp-drop-zone-ring": E?.dropZoneRing,
768
+ "--cp-trigger-bg": E?.triggerBackground,
769
+ "--cp-trigger-icon": E?.triggerIcon,
770
+ "--cp-trigger-icon-idle": E?.triggerIconIdle,
771
+ "--cp-skeleton-color": E?.skeletonColor,
772
+ "--cp-task-badge-border": E?.taskBadgeBorder,
773
+ "--cp-task-badge-bg": E?.taskBadgeBackground,
774
+ "--cp-task-badge-text": E?.taskBadgeText,
775
+ "--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(() => [
778
781
  {
779
782
  key: n.Pinned,
780
- label: R?.pinned ?? "Pinned",
781
- items: je
783
+ label: H?.pinned ?? "Pinned",
784
+ items: Fe
782
785
  },
783
786
  {
784
787
  key: n.MyChats,
785
- label: R?.myChats ?? "My chats",
786
- items: Me
788
+ label: H?.myChats ?? "My chats",
789
+ items: Le
787
790
  },
788
791
  {
789
792
  key: n.Shared,
790
- label: R?.shared ?? "Shared",
791
- items: Fe
793
+ label: H?.shared ?? "Shared",
794
+ items: Be
792
795
  },
793
796
  {
794
797
  key: n.Organization,
795
- label: R?.organization ?? "Organization",
796
- items: Le
798
+ label: H?.organization ?? "Organization",
799
+ items: Ve
797
800
  }
798
801
  ], [
799
- R,
800
- je,
801
- Me,
802
+ H,
802
803
  Fe,
803
- Le
804
- ]), Z = F(() => {
804
+ Le,
805
+ Be,
806
+ Ve
807
+ ]), Q = L(() => {
805
808
  let e = [];
806
- for (let t of Be) if (t.items.length !== 0 && (e.push({
809
+ for (let t of Ue) if (t.items.length !== 0 && (e.push({
807
810
  kind: X.Header,
808
811
  groupKey: t.key,
809
812
  label: t.label
810
- }), W.has(t.key))) for (let n of t.items) e.push({
813
+ }), fe.has(t.key))) for (let n of t.items) e.push({
811
814
  kind: X.Item,
812
815
  item: n,
813
816
  groupKey: t.key
814
817
  });
815
818
  return e;
816
- }, [Be, W]);
817
- P(() => {
818
- if (!s || ge.current === s) return;
819
- let e = Z.findIndex((e) => e.kind === X.Item && e.item.id === s);
820
- e >= 0 && (he.current?.scrollToRow({
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({
821
824
  index: e,
822
825
  align: "smart",
823
826
  behavior: "smooth"
824
- }), ge.current = s);
827
+ }), G.current = s);
825
828
  }, [
826
829
  s,
827
- Be,
828
- W,
829
- Z
830
+ Ue,
831
+ fe,
832
+ Q
830
833
  ]);
831
- let He = F(() => ({
832
- rows: Z,
833
- expandedGroups: W,
834
- onToggleGroup: Ce,
835
- listId: me,
834
+ let Ge = L(() => ({
835
+ rows: Q,
836
+ expandedGroups: fe,
837
+ onToggleGroup: Te,
838
+ listId: ge,
836
839
  activeConversationId: s,
837
- searchQuery: H,
840
+ searchQuery: U,
838
841
  onSelectConversation: o,
839
842
  getActions: _,
840
843
  onActionMenuOpen: v,
841
- actionsLabel: V,
844
+ actionsLabel: oe,
842
845
  unreadIndicatorLabel: se,
843
846
  styles: {
844
- groupHeaderClassName: E?.groupHeaderClassName,
845
- itemTitleClassName: E?.itemTitleClassName,
847
+ groupHeaderClassName: k?.groupHeaderClassName,
848
+ itemTitleClassName: k?.itemTitleClassName,
846
849
  itemIconBadgeClassName: m?.itemIconBadgeClassName,
847
850
  taskBadgeClassName: m?.taskBadgeClassName
848
851
  },
849
- draggingId: _e,
850
- dragOverId: ve,
851
- allowedDropGroups: be,
852
- onDragStart: (e) => Te(e, Z),
853
- onDragEnd: Ee,
854
- onDragOver: De,
855
- onDragLeave: Oe,
856
- onDrop: ke
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
857
860
  }), [
858
- Z,
859
- W,
860
- Ce,
861
- me,
861
+ Q,
862
+ fe,
863
+ Te,
864
+ ge,
862
865
  s,
863
- H,
866
+ U,
864
867
  o,
865
868
  _,
866
869
  v,
867
- V,
870
+ oe,
868
871
  se,
869
- E?.groupHeaderClassName,
870
- E?.itemTitleClassName,
872
+ k?.groupHeaderClassName,
873
+ k?.itemTitleClassName,
871
874
  m?.itemIconBadgeClassName,
872
875
  m?.taskBadgeClassName,
873
- _e,
874
876
  ve,
875
877
  be,
876
- Te,
877
- Ee,
878
+ xe,
878
879
  De,
879
880
  Oe,
880
- ke
881
- ]), We = e.length === 0, Ge = e.length > 0 && Y.length === 0;
882
- return /* @__PURE__ */ B(d, {
881
+ ke,
882
+ Ae,
883
+ je
884
+ ]), Xe = W.length === 0, Ze = W.length > 0 && Y.length === 0;
885
+ return /* @__PURE__ */ V(d, {
883
886
  isOpen: i,
884
887
  isOverlay: g,
885
888
  orientation: u.Left,
886
- title: A,
889
+ title: M,
887
890
  labels: {
888
- ariaLabel: A,
891
+ ariaLabel: M,
889
892
  closeLabel: ce
890
893
  },
891
894
  onClose: y,
892
895
  styles: {
893
896
  colors: {
894
- background: T?.background,
895
- border: T?.border
897
+ background: E?.background,
898
+ border: E?.border
896
899
  },
897
- typography: { fontClassName: E?.fontClassName },
900
+ typography: { fontClassName: k?.fontClassName },
898
901
  bodyClassName: "flex flex-col overflow-hidden p-0 gap-3",
899
- cssVars: Ae,
900
- titleClassName: E?.fontClassName,
902
+ cssVars: Me,
903
+ titleClassName: k?.fontClassName,
901
904
  headerClassName: "h-[64px]",
902
905
  className: a(i ? "w-[324px] mobile:w-full" : "w-0", h)
903
906
  },
904
907
  rightActions: b,
905
908
  children: [
906
- /* @__PURE__ */ z(Ue, {
907
- label: re,
909
+ /* @__PURE__ */ B(We, {
910
+ label: P,
908
911
  onClick: p,
909
- labelClassName: E?.newChatLabelClassName,
910
- colors: k
912
+ labelClassName: k?.newChatLabelClassName,
913
+ colors: A
911
914
  }),
912
- /* @__PURE__ */ z("div", {
915
+ /* @__PURE__ */ B("div", {
913
916
  role: "search",
914
917
  className: "px-3 py-2",
915
- children: /* @__PURE__ */ z(D, {
916
- wrapperClassName: a(Q.search, ee),
917
- value: H,
918
- onChange: Se,
919
- placeholder: M,
920
- clearLabel: ae,
921
- "aria-label": M
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
922
925
  })
923
926
  }),
924
- !w && /* @__PURE__ */ z(Ve, {
925
- activeTab: U,
926
- labels: oe,
927
+ !w && /* @__PURE__ */ B(He, {
928
+ activeTab: ue,
929
+ labels: ae,
927
930
  onChange: (e) => {
928
- ue(e), C?.(e);
931
+ de(e), C?.(e);
929
932
  },
930
- tabClassName: E?.tabClassName
933
+ tabClassName: k?.tabClassName,
934
+ hiddenSources: T
931
935
  }),
932
- /* @__PURE__ */ z("span", {
936
+ /* @__PURE__ */ B("span", {
933
937
  role: "status",
934
938
  "aria-live": "polite",
935
939
  className: "sr-only",
936
- children: t ? ne : We ? j : Ge ? te : ""
940
+ children: t ? te : Xe ? ee : Ze ? N : ""
937
941
  }),
938
- /* @__PURE__ */ z("div", {
942
+ /* @__PURE__ */ B("div", {
939
943
  className: "flex-1 overflow-hidden px-2 py-1",
940
- children: t ? /* @__PURE__ */ z("div", {
944
+ children: t ? /* @__PURE__ */ B("div", {
941
945
  className: "flex flex-col gap-3 px-2 py-3",
942
- children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */ z(O, {
946
+ children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */ B(O, {
943
947
  avatar: { size: 24 },
944
948
  showTitle: { width: Pe(t) },
945
949
  paragraph: !1,
946
950
  active: !0,
947
- color: Q.skeletonColor
951
+ color: Z.skeletonColor
948
952
  }, t))
949
- }) : We ? /* @__PURE__ */ z(c, { label: j }) : Ge ? /* @__PURE__ */ z(l, { label: te }) : /* @__PURE__ */ z(Ne, {
950
- listRef: he,
951
- id: me,
953
+ }) : Xe ? /* @__PURE__ */ B(c, { label: ee }) : Ze ? /* @__PURE__ */ B(l, { label: N }) : /* @__PURE__ */ B(Ne, {
954
+ listRef: _e,
955
+ id: ge,
952
956
  role: "list",
953
957
  style: { height: "100%" },
954
958
  rowComponent: Ke,
955
- rowCount: Z.length,
959
+ rowCount: Q.length,
956
960
  rowHeight: Ie,
957
- overscanCount: fe,
958
- onResize: J,
959
- rowProps: He
961
+ overscanCount: me,
962
+ onResize: Ce,
963
+ rowProps: Ge
960
964
  })
961
965
  })
962
966
  ]
@@ -972,25 +976,25 @@ var X = /* @__PURE__ */ function(e) {
972
976
  warningIcon: "_warningIcon_11lia_35"
973
977
  }, $e = ({ title: e, failedCount: t, isCollapsed: n, jobsId: r, labels: i, styles: o, onToggleCollapse: s, onClose: c }) => {
974
978
  let l = o?.typography;
975
- return /* @__PURE__ */ B("div", {
979
+ return /* @__PURE__ */ V("div", {
976
980
  className: a($.divider, "mx-4 flex items-center justify-between py-3"),
977
- children: [/* @__PURE__ */ B("div", {
981
+ children: [/* @__PURE__ */ V("div", {
978
982
  className: "flex min-w-0 items-center gap-2",
979
- children: [/* @__PURE__ */ z("span", {
983
+ children: [/* @__PURE__ */ B("span", {
980
984
  className: a($.text, "truncate", l?.titleClassName || "dial-small-paragraph-semi-text"),
981
985
  children: e
982
- }), t > 0 && /* @__PURE__ */ z("span", {
986
+ }), t > 0 && /* @__PURE__ */ B("span", {
983
987
  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"),
984
988
  children: t
985
989
  })]
986
- }), /* @__PURE__ */ B("div", {
990
+ }), /* @__PURE__ */ V("div", {
987
991
  className: "flex shrink-0 items-center gap-1",
988
- children: [/* @__PURE__ */ z(x, {
992
+ children: [/* @__PURE__ */ B(x, {
989
993
  "aria-label": n ? i.expandQueueAriaLabel : i.collapseQueueAriaLabel,
990
994
  size: y.Small,
991
995
  "aria-expanded": !n,
992
996
  "aria-controls": r,
993
- icon: z(n ? ue : U, {
997
+ icon: B(n ? ue : le, {
994
998
  size: g.SM,
995
999
  className: $.textSecondary,
996
1000
  stroke: _,
@@ -998,10 +1002,10 @@ var X = /* @__PURE__ */ function(e) {
998
1002
  }),
999
1003
  onClick: s,
1000
1004
  className: Qe
1001
- }), /* @__PURE__ */ z(x, {
1005
+ }), /* @__PURE__ */ B(x, {
1002
1006
  "aria-label": i.closeQueueAriaLabel,
1003
1007
  size: y.Small,
1004
- icon: /* @__PURE__ */ z(_e, {
1008
+ icon: /* @__PURE__ */ B(_e, {
1005
1009
  size: g.SM,
1006
1010
  className: $.textSecondary,
1007
1011
  stroke: _,
@@ -1017,30 +1021,30 @@ var X = /* @__PURE__ */ function(e) {
1017
1021
  return et.some((e) => t.endsWith(e)) ? pe : t.endsWith(".json") ? me : fe;
1018
1022
  }, nt = ({ job: t, labels: n, onCancel: r, styles: i }) => {
1019
1023
  let o = i?.typography, s = tt(t.fileName), c = t.status === e.Canceled;
1020
- return /* @__PURE__ */ B("div", {
1024
+ return /* @__PURE__ */ V("div", {
1021
1025
  className: "group flex items-center gap-2 px-4 py-2",
1022
1026
  children: [
1023
- /* @__PURE__ */ z(s, {
1027
+ /* @__PURE__ */ B(s, {
1024
1028
  size: g.SM,
1025
1029
  stroke: _,
1026
1030
  className: $.textSecondary,
1027
1031
  "aria-hidden": !0
1028
1032
  }),
1029
- /* @__PURE__ */ z(b, {
1033
+ /* @__PURE__ */ B(b, {
1030
1034
  text: t.fileName,
1031
1035
  className: a(c ? $.textSecondary : $.text, o?.jobLabelClassName || "dial-small-text"),
1032
1036
  contentClassName: "!z-[80]"
1033
1037
  }),
1034
- t.status === e.InProgress && /* @__PURE__ */ B("div", {
1038
+ t.status === e.InProgress && /* @__PURE__ */ V("div", {
1035
1039
  className: a("flex size-7 shrink-0 items-center justify-center", "grid"),
1036
- children: [/* @__PURE__ */ z(ee, {
1040
+ children: [/* @__PURE__ */ B(A, {
1037
1041
  size: g.SM,
1038
1042
  ariaLabel: n.jobProgressAriaLabel(t.fileName),
1039
1043
  className: "pointer-events-none col-start-1 row-start-1 opacity-100 transition-opacity group-focus-within:opacity-0 group-hover:opacity-0"
1040
- }), /* @__PURE__ */ z(x, {
1044
+ }), /* @__PURE__ */ B(x, {
1041
1045
  "aria-label": n.cancelJobAriaLabel(t.fileName),
1042
1046
  size: y.Small,
1043
- icon: /* @__PURE__ */ z(_e, {
1047
+ icon: /* @__PURE__ */ B(_e, {
1044
1048
  size: g.SM,
1045
1049
  className: $.textSecondary,
1046
1050
  stroke: _,
@@ -1050,55 +1054,55 @@ var X = /* @__PURE__ */ function(e) {
1050
1054
  className: "col-start-1 row-start-1 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100"
1051
1055
  })]
1052
1056
  }),
1053
- t.status === e.Success && /* @__PURE__ */ z("span", {
1057
+ t.status === e.Success && /* @__PURE__ */ B("span", {
1054
1058
  className: "flex size-7 shrink-0 items-center justify-center",
1055
- children: /* @__PURE__ */ z(le, {
1059
+ children: /* @__PURE__ */ B(U, {
1056
1060
  size: g.SM,
1057
1061
  stroke: _,
1058
1062
  className: $.successIcon,
1059
1063
  "aria-hidden": !0
1060
1064
  })
1061
1065
  }),
1062
- t.status === e.Warning && /* @__PURE__ */ z(te, {
1066
+ t.status === e.Warning && /* @__PURE__ */ B(ee, {
1063
1067
  tooltip: n.jobWarningMessage(t.warningCode),
1064
1068
  contentClassName: "!z-[80]",
1065
1069
  asChild: !0,
1066
- children: /* @__PURE__ */ z("span", {
1070
+ children: /* @__PURE__ */ B("span", {
1067
1071
  className: "flex size-7 shrink-0 items-center justify-center",
1068
1072
  role: "img",
1069
1073
  "aria-label": n.jobWarningMessage(t.warningCode),
1070
1074
  tabIndex: 0,
1071
- children: /* @__PURE__ */ z(se, {
1075
+ children: /* @__PURE__ */ B(oe, {
1072
1076
  size: g.SM,
1073
1077
  className: $.warningIcon,
1074
1078
  "aria-hidden": !0
1075
1079
  })
1076
1080
  })
1077
1081
  }),
1078
- t.status === e.Failed && /* @__PURE__ */ z(te, {
1082
+ t.status === e.Failed && /* @__PURE__ */ B(ee, {
1079
1083
  tooltip: n.jobErrorMessage(t.errorCode),
1080
1084
  contentClassName: "!z-[80]",
1081
1085
  asChild: !0,
1082
- children: /* @__PURE__ */ z("span", {
1086
+ children: /* @__PURE__ */ B("span", {
1083
1087
  className: "flex size-7 shrink-0 items-center justify-center",
1084
1088
  role: "img",
1085
1089
  "aria-label": n.jobErrorMessage(t.errorCode),
1086
1090
  tabIndex: 0,
1087
- children: /* @__PURE__ */ z(V, {
1091
+ children: /* @__PURE__ */ B(H, {
1088
1092
  size: g.SM,
1089
1093
  className: $.errorIcon,
1090
1094
  "aria-hidden": !0
1091
1095
  })
1092
1096
  })
1093
1097
  }),
1094
- c && /* @__PURE__ */ z("span", {
1098
+ c && /* @__PURE__ */ B("span", {
1095
1099
  className: a($.textSecondary, "shrink-0", o?.canceledLabelClassName || "dial-small-text"),
1096
1100
  children: n.canceledLabel
1097
1101
  })
1098
1102
  ]
1099
1103
  });
1100
- }, 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 = M(({ title: t, jobs: n, onClose: i, onCancel: o, labels: s, styles: c }) => {
1101
- let [l, u] = L(!1), d = ie(), [f, p] = L(!1), g = c?.colors, _ = {
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, _ = {
1102
1106
  ...r({
1103
1107
  "--cp-transfer-queue-bg": g?.background,
1104
1108
  "--cp-transfer-queue-text": g?.text,
@@ -1111,30 +1115,30 @@ var X = /* @__PURE__ */ function(e) {
1111
1115
  "--cp-transfer-queue-failure-count-text": g?.failureCountText
1112
1116
  }),
1113
1117
  ...c?.cssVars
1114
- }, 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 = N(() => {
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(() => {
1115
1119
  v || b ? p(!0) : i();
1116
1120
  }, [
1117
1121
  v,
1118
1122
  b,
1119
1123
  i
1120
- ]), C = N(() => {
1124
+ ]), C = F(() => {
1121
1125
  p(!1), i();
1122
- }, [i]), w = N(() => {
1126
+ }, [i]), w = F(() => {
1123
1127
  u((e) => !e);
1124
1128
  }, []);
1125
- if (P(() => {
1129
+ if (I(() => {
1126
1130
  if (!x) return;
1127
1131
  let e = setTimeout(i, Ze);
1128
1132
  return () => clearTimeout(e);
1129
1133
  }, [x, i]), n.length === 0) return null;
1130
1134
  let T = n.filter((t) => t.status === e.Failed).length;
1131
- return /* @__PURE__ */ B("div", {
1135
+ return /* @__PURE__ */ V("div", {
1132
1136
  role: "status",
1133
1137
  "aria-live": "polite",
1134
1138
  style: _,
1135
1139
  className: a($.root, "w-[370px] max-w-[calc(100vw-2rem)] rounded-xl shadow-md", c?.rootClassName),
1136
1140
  children: [
1137
- /* @__PURE__ */ z($e, {
1141
+ /* @__PURE__ */ B($e, {
1138
1142
  title: t,
1139
1143
  failedCount: T,
1140
1144
  isCollapsed: l,
@@ -1144,23 +1148,23 @@ var X = /* @__PURE__ */ function(e) {
1144
1148
  onToggleCollapse: w,
1145
1149
  onClose: S
1146
1150
  }),
1147
- l && v && /* @__PURE__ */ z(E, {
1151
+ l && v && /* @__PURE__ */ B(E, {
1148
1152
  value: rt(n),
1149
1153
  size: y.Small,
1150
1154
  "aria-label": s.queueProgressAriaLabel,
1151
1155
  "aria-valuetext": s.queueProgressValueText(it(n), n.length)
1152
1156
  }),
1153
- !l && /* @__PURE__ */ z("div", {
1157
+ !l && /* @__PURE__ */ B("div", {
1154
1158
  id: d,
1155
1159
  className: a("flex max-h-[40vh] flex-col overflow-y-auto py-1", c?.bodyClassName),
1156
- children: n.map((e) => /* @__PURE__ */ z(nt, {
1160
+ children: n.map((e) => /* @__PURE__ */ B(nt, {
1157
1161
  job: e,
1158
1162
  labels: s,
1159
1163
  onCancel: o,
1160
1164
  styles: c
1161
1165
  }, e.id))
1162
1166
  }),
1163
- /* @__PURE__ */ z(m, {
1167
+ /* @__PURE__ */ B(m, {
1164
1168
  open: f,
1165
1169
  header: s.closeQueueConfirmHeader,
1166
1170
  description: at(v, b, s),
@@ -1176,9 +1180,9 @@ var X = /* @__PURE__ */ function(e) {
1176
1180
  ot.displayName = "ImportExportQueue";
1177
1181
  //#endregion
1178
1182
  //#region src/components/RenameConversationPopup/RenameConversationPopup.tsx
1179
- var st = M(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCancel: c, onGenerateWithAi: l, labels: u, styles: d }) => {
1180
- let [f, m] = L(t), [h, v] = L(!1), [y, b] = L(null), S = I(null), E = I(!1), D = I(0);
1181
- P(() => {
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(() => {
1182
1186
  let n = e && !E.current;
1183
1187
  if (E.current = e, !e) {
1184
1188
  D.current += 1, v(!1);
@@ -1188,18 +1192,18 @@ var st = M(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCa
1188
1192
  D.current += 1, m(t), b(null), v(!1);
1189
1193
  let r = setTimeout(() => S.current?.focus(), 0);
1190
1194
  return () => clearTimeout(r);
1191
- }, [e, t]), P(() => () => {
1195
+ }, [e, t]), I(() => () => {
1192
1196
  D.current += 1;
1193
1197
  }, []);
1194
- let O = s(f.trim()), k = i(O) > 255, A = n || O === "" || O === t.trim() || k, j = N(() => {
1195
- A || a(O);
1198
+ let O = s(f.trim()), k = i(O) > 255, j = n || O === "" || O === t.trim() || k, M = F(() => {
1199
+ j || a(O);
1196
1200
  }, [
1197
- A,
1201
+ j,
1198
1202
  a,
1199
1203
  O
1200
- ]), te = N((e) => {
1201
- e.key === "Enter" && j();
1202
- }, [j]), ne = N(async () => {
1204
+ ]), ee = F((e) => {
1205
+ e.key === "Enter" && M();
1206
+ }, [M]), N = F(async () => {
1203
1207
  if (h) return;
1204
1208
  let e = ++D.current;
1205
1209
  v(!0), b(null);
@@ -1217,8 +1221,8 @@ var st = M(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCa
1217
1221
  h,
1218
1222
  l,
1219
1223
  u.renameWithAiError
1220
- ]), re;
1221
- return re = k ? u.nameTooLongError : y ?? r ?? void 0, /* @__PURE__ */ z(w, {
1224
+ ]), te;
1225
+ return te = k ? u.nameTooLongError : y ?? r ?? void 0, /* @__PURE__ */ B(w, {
1222
1226
  open: e,
1223
1227
  header: u.popupTitle,
1224
1228
  size: T.Sm,
@@ -1229,33 +1233,33 @@ var st = M(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCa
1229
1233
  }, {
1230
1234
  label: u.saveLabel,
1231
1235
  variant: p.Primary,
1232
- disabled: A,
1233
- onClick: j
1236
+ disabled: j,
1237
+ onClick: M
1234
1238
  }],
1235
- children: /* @__PURE__ */ z("div", {
1239
+ children: /* @__PURE__ */ B("div", {
1236
1240
  className: d?.bodyClassName,
1237
1241
  style: d?.cssVars,
1238
- children: n ? /* @__PURE__ */ z("div", {
1242
+ children: n ? /* @__PURE__ */ B("div", {
1239
1243
  className: "h-[120px] px-6 py-4",
1240
- children: /* @__PURE__ */ z(ee, { size: 50 })
1241
- }) : /* @__PURE__ */ B("div", {
1244
+ children: /* @__PURE__ */ B(A, { size: 50 })
1245
+ }) : /* @__PURE__ */ V("div", {
1242
1246
  className: "flex items-start gap-2 px-6 py-3",
1243
- children: [/* @__PURE__ */ z("div", {
1247
+ children: [/* @__PURE__ */ B("div", {
1244
1248
  className: "min-w-0 flex-1",
1245
- children: /* @__PURE__ */ z(C, {
1249
+ children: /* @__PURE__ */ B(C, {
1246
1250
  inputRef: S,
1247
1251
  value: f,
1248
1252
  placeholder: u.inputPlaceholder,
1249
- error: re,
1253
+ error: te,
1250
1254
  onChange: (e) => m(o(e ?? "")),
1251
- onKeyDown: te
1255
+ onKeyDown: ee
1252
1256
  })
1253
- }), /* @__PURE__ */ z(x, {
1257
+ }), /* @__PURE__ */ B(x, {
1254
1258
  "aria-label": u.renameWithAiLabel,
1255
1259
  tooltipProps: { tooltip: u.renameWithAiLabel },
1256
1260
  disabled: h || n,
1257
- onClick: ne,
1258
- icon: h ? /* @__PURE__ */ z(ee, { size: g.MD }) : /* @__PURE__ */ z(ge, {
1261
+ onClick: N,
1262
+ icon: h ? /* @__PURE__ */ B(A, { size: g.MD }) : /* @__PURE__ */ B(ge, {
1259
1263
  size: g.MD,
1260
1264
  stroke: _
1261
1265
  })