@epam/statgpt-conversation-list 0.1.0 → 0.2.0-rc.1

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.mjs CHANGED
@@ -1,22 +1,22 @@
1
- import { jsx as E, jsxs as S, Fragment as v } from "react/jsx-runtime";
1
+ import { jsxs as B, jsx as g, Fragment as v } from "react/jsx-runtime";
2
2
  import J from "classnames";
3
- import T, { useState as F, useMemo as he, useEffect as ee, useCallback as _, useRef as ke } from "react";
4
- import { InvitationType as ze, getSharedConversationsRequest as le, ShareTarget as ie } from "@epam/statgpt-dial-toolkit";
5
- import { getClearedConversationName as fe, cleanConversationNames as K } from "@epam/statgpt-shared-toolkit";
6
- import { Button as X, Popup as me, PopUpSize as pe, Loader as Ce, InputWithIcon as we, Input as _e, PopUpState as Y, Dropdown as $e, HighlightText as He, IconButton as Ye } from "@epam/statgpt-ui-components";
7
- import { cloneDeep as Qe, omit as Ge, uniqBy as je } from "lodash";
8
- import { IconCheck as Ve, IconCopy as Xe, IconDotsVertical as We, IconCaretRightFilled as Ke, IconX as Ze, IconSearch as Je } from "@tabler/icons-react";
9
- import qe from "jszip";
10
- var z = /* @__PURE__ */ ((t) => (t.DELETE = "delete", t.EXPORT = "export", t.SHARE = "share", t.RENAME = "rename", t))(z || {}), U = /* @__PURE__ */ ((t) => (t.SHARED = "shared", t.TODAY = "today", t.YESTERDAY = "yesterday", t.WEEK = "week", t.EARLIER = "earlier", t))(U || {});
3
+ import O, { useState as F, useMemo as he, useEffect as ee, useCallback as _, useRef as ze } from "react";
4
+ import { cloneDeep as ke, omit as _e, uniqBy as $e } from "lodash";
5
+ import { Popup as fe, PopUpSize as me, Button as X, Loader as Ce, InputWithIcon as Re, Input as He, PopUpState as Y, Dropdown as Ye, HighlightText as Qe, IconButton as Ge } from "@epam/statgpt-ui-components";
6
+ import { IconCheck as je, IconCopy as Ve, IconDotsVertical as Xe, IconCaretRightFilled as We, IconX as Ke, IconSearch as Ze } from "@tabler/icons-react";
7
+ import Je from "jszip";
8
+ import { InvitationType as qe, getSharedConversationsRequest as le, ShareTarget as ie } from "@epam/statgpt-dial-toolkit";
9
+ import { getClearedConversationName as pe, cleanConversationNames as K } from "@epam/statgpt-shared-toolkit";
10
+ var k = /* @__PURE__ */ ((t) => (t.DELETE = "delete", t.EXPORT = "export", t.SHARE = "share", t.RENAME = "rename", t))(k || {}), U = /* @__PURE__ */ ((t) => (t.SHARED = "shared", t.TODAY = "today", t.YESTERDAY = "yesterday", t.WEEK = "week", t.EARLIER = "earlier", t))(U || {});
11
11
  const ce = (t, r) => {
12
- var l, a;
13
- return ((a = (l = t == null ? void 0 : t.resources) == null ? void 0 : l.filter((s) => (s == null ? void 0 : s.parentPath) === r)) == null ? void 0 : a.map((s) => {
12
+ var l, c;
13
+ return ((c = (l = t == null ? void 0 : t.resources) == null ? void 0 : l.filter((s) => (s == null ? void 0 : s.parentPath) === r)) == null ? void 0 : c.map((s) => {
14
14
  var h, e, n;
15
- const c = `${s == null ? void 0 : s.bucket}/${r}`, m = (n = (e = (h = s == null ? void 0 : s.url) == null ? void 0 : h.split("/")) == null ? void 0 : e.slice(1)) == null ? void 0 : n.join("/");
15
+ const a = `${s == null ? void 0 : s.bucket}/${r}`, p = (n = (e = (h = s == null ? void 0 : s.url) == null ? void 0 : h.split("/")) == null ? void 0 : e.slice(1)) == null ? void 0 : n.join("/");
16
16
  return {
17
17
  ...s,
18
- folderId: c,
19
- id: m,
18
+ folderId: a,
19
+ id: p,
20
20
  isShared: !0
21
21
  };
22
22
  })) || [];
@@ -27,44 +27,160 @@ const ce = (t, r) => {
27
27
  [U.YESTERDAY]: [],
28
28
  [U.WEEK]: [],
29
29
  [U.EARLIER]: []
30
- }, Re = (t, r) => t.toDateString() === r.toDateString(), tt = (t, r) => {
30
+ }, we = (t, r) => t.toDateString() === r.toDateString(), tt = (t, r) => {
31
31
  const l = new Date(
32
32
  t.getFullYear(),
33
33
  t.getMonth(),
34
34
  t.getDate() - 1
35
35
  );
36
- return Re(r, l);
36
+ return we(r, l);
37
37
  }, nt = (t, r) => {
38
38
  const l = t.getTime() - r.getTime();
39
39
  return Math.floor(l / (1e3 * 60 * 60 * 24));
40
40
  }, rt = (t) => {
41
- const r = /* @__PURE__ */ new Date(), l = Qe(et);
42
- for (const a of t)
43
- if (a.updatedAt) {
44
- const s = new Date(a.updatedAt);
45
- let c;
46
- Re(r, s) ? c = l[U.TODAY] : tt(r, s) ? c = l[U.YESTERDAY] : nt(r, s) <= 7 ? c = l[U.WEEK] : c = l[U.EARLIER], c != null && c.some(
47
- (m) => m.id === a.id
48
- ) || c.push(a);
41
+ const r = /* @__PURE__ */ new Date(), l = ke(et);
42
+ for (const c of t)
43
+ if (c.updatedAt) {
44
+ const s = new Date(c.updatedAt);
45
+ let a;
46
+ we(r, s) ? a = l[U.TODAY] : tt(r, s) ? a = l[U.YESTERDAY] : nt(r, s) <= 7 ? a = l[U.WEEK] : a = l[U.EARLIER], a != null && a.some(
47
+ (p) => p.id === c.id
48
+ ) || a.push(c);
49
49
  }
50
50
  return l;
51
51
  }, Me = (t) => t == null ? void 0 : t.sort(
52
52
  (r, l) => ((l == null ? void 0 : l.updatedAt) || 0) - ((r == null ? void 0 : r.updatedAt) || 0)
53
- ), ot = (t, r) => t === U.SHARED ? (r == null ? void 0 : r.shared) || "Shared" : t === U.TODAY ? (r == null ? void 0 : r.today) || "Today" : t === U.YESTERDAY ? (r == null ? void 0 : r.yesterday) || "Yesterday" : t === U.WEEK ? (r == null ? void 0 : r.lastWeek) || "Last week" : (r == null ? void 0 : r.earlier) || "Earlier";
54
- var lt = Object.defineProperty, se = Object.getOwnPropertySymbols, Ne = Object.prototype.hasOwnProperty, Ie = Object.prototype.propertyIsEnumerable, ge = (t, r, l) => r in t ? lt(t, r, { enumerable: !0, configurable: !0, writable: !0, value: l }) : t[r] = l, ue = (t, r) => {
53
+ ), ot = (t, r) => t === U.SHARED ? (r == null ? void 0 : r.shared) || "Shared" : t === U.TODAY ? (r == null ? void 0 : r.today) || "Today" : t === U.YESTERDAY ? (r == null ? void 0 : r.yesterday) || "Yesterday" : t === U.WEEK ? (r == null ? void 0 : r.lastWeek) || "Last week" : (r == null ? void 0 : r.earlier) || "Earlier", lt = ({
54
+ onCloseModal: t,
55
+ disableModalDividers: r,
56
+ deleteConversation: l,
57
+ isSmallButton: c,
58
+ titles: s,
59
+ locale: a
60
+ }) => /* @__PURE__ */ B(
61
+ fe,
62
+ {
63
+ heading: (s == null ? void 0 : s.deleteTitle) ?? "Delete conversation",
64
+ portalId: "delete-conversation",
65
+ containerClassName: "delete-conversation-popup",
66
+ size: me.SM,
67
+ dividers: !r,
68
+ onClose: t,
69
+ closeButtonTitle: (s == null ? void 0 : s.close) ?? "Cancel",
70
+ children: [
71
+ /* @__PURE__ */ g("div", { className: "py-4 px-6 sm:px-0", lang: a, children: (s == null ? void 0 : s.deleteMessage) ?? "Are you sure you want to delete this conversation? This action cannot be undone." }),
72
+ /* @__PURE__ */ B("div", { className: "flex justify-end gap-x-2 py-3 px-6 delete-conversation-popup-footer", children: [
73
+ /* @__PURE__ */ g(
74
+ X,
75
+ {
76
+ buttonClassName: "cancel-button",
77
+ title: (s == null ? void 0 : s.cancel) ?? "Cancel",
78
+ isSmallButton: c,
79
+ onClick: (p) => {
80
+ p.stopPropagation(), t();
81
+ }
82
+ }
83
+ ),
84
+ /* @__PURE__ */ g(
85
+ X,
86
+ {
87
+ buttonClassName: "text-button-primary text-button-primary-error",
88
+ title: (s == null ? void 0 : s.delete) ?? "Delete",
89
+ isSmallButton: c,
90
+ onClick: (p) => {
91
+ p.stopPropagation(), l();
92
+ }
93
+ }
94
+ )
95
+ ] })
96
+ ]
97
+ }
98
+ ), it = (t) => {
99
+ const r = t.messages.flatMap((c) => {
100
+ var p, h, e;
101
+ const s = ((p = c.custom_content) == null ? void 0 : p.attachments) || [], a = ((e = (h = c.custom_content) == null ? void 0 : h.stages) == null ? void 0 : e.flatMap(
102
+ ({ attachments: n }) => n ?? []
103
+ )) || [];
104
+ return [...s, ...a];
105
+ }) || [], l = ut(r).map(
106
+ (c) => ({
107
+ ...c,
108
+ relativePath: "",
109
+ contentLength: 0
110
+ })
111
+ );
112
+ return $e(
113
+ l,
114
+ (c) => te(c.relativePath, c.name)
115
+ );
116
+ }, st = (t) => t.endsWith("/"), at = (t) => {
117
+ const r = t.toLowerCase();
118
+ return [
119
+ "data:",
120
+ "//",
121
+ "http://",
122
+ "https://",
123
+ "file://",
124
+ "ftp://",
125
+ "mailto:",
126
+ "telnet://",
127
+ "api/files"
128
+ ].some((l) => r.startsWith(l));
129
+ }, ct = (t) => {
130
+ const r = te(
131
+ ...t.split("/").map((c) => decodeURIComponent(c))
132
+ ), l = r.lastIndexOf("/");
133
+ return {
134
+ absolutePath: r.slice(0, l),
135
+ name: r.slice(l + 1)
136
+ };
137
+ }, ut = (t) => t ? t.map((r) => {
138
+ if (!r.url || at(r.url) || st(r.url))
139
+ return null;
140
+ const { absolutePath: l, name: c } = ct(r.url);
141
+ return {
142
+ id: r.url,
143
+ name: c,
144
+ contentType: r.type,
145
+ folderId: l,
146
+ absolutePath: l
147
+ };
148
+ }).filter(Boolean) : [];
149
+ async function dt(t, r) {
150
+ const l = it(t), c = new Je();
151
+ l.forEach((h) => {
152
+ const e = encodeURI(te(h.absolutePath, h.name)), n = r(`${e}`.replace("files/", "")), o = ht(h.folderId), i = te("res", o, h.name);
153
+ c.file(i, n);
154
+ });
155
+ const s = {
156
+ version: 5,
157
+ history: [t].map(ft) || [],
158
+ folders: []
159
+ }, a = JSON.stringify(s, null, 2);
160
+ return c.file("conversations/conversations_history.json", a), await c.generateAsync({ type: "base64" });
161
+ }
162
+ const ht = (t) => {
163
+ const r = t.split("/");
164
+ return r.length > 2 ? te(...r.slice(2)) : void 0;
165
+ }, ft = (t) => _e(t, ["publicationInfo"]), te = (...t) => t.filter(Boolean).join("/");
166
+ function mt(t, r) {
167
+ const l = document.createElement("a");
168
+ l.download = r, l.href = t, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(t);
169
+ }
170
+ var pt = Object.defineProperty, se = Object.getOwnPropertySymbols, Ne = Object.prototype.hasOwnProperty, Ie = Object.prototype.propertyIsEnumerable, Ee = (t, r, l) => r in t ? pt(t, r, { enumerable: !0, configurable: !0, writable: !0, value: l }) : t[r] = l, ue = (t, r) => {
55
171
  for (var l in r || (r = {}))
56
- Ne.call(r, l) && ge(t, l, r[l]);
172
+ Ne.call(r, l) && Ee(t, l, r[l]);
57
173
  if (se)
58
174
  for (var l of se(r))
59
- Ie.call(r, l) && ge(t, l, r[l]);
175
+ Ie.call(r, l) && Ee(t, l, r[l]);
60
176
  return t;
61
177
  }, de = (t, r) => {
62
178
  var l = {};
63
- for (var a in t)
64
- Ne.call(t, a) && r.indexOf(a) < 0 && (l[a] = t[a]);
179
+ for (var c in t)
180
+ Ne.call(t, c) && r.indexOf(c) < 0 && (l[c] = t[c]);
65
181
  if (t != null && se)
66
- for (var a of se(t))
67
- r.indexOf(a) < 0 && Ie.call(t, a) && (l[a] = t[a]);
182
+ for (var c of se(t))
183
+ r.indexOf(c) < 0 && Ie.call(t, c) && (l[c] = t[c]);
68
184
  return l;
69
185
  };
70
186
  /**
@@ -74,14 +190,14 @@ var lt = Object.defineProperty, se = Object.getOwnPropertySymbols, Ne = Object.p
74
190
  */
75
191
  var W;
76
192
  ((t) => {
77
- const r = class w {
193
+ const r = class R {
78
194
  /*-- Constructor (low level) and fields --*/
79
195
  // Creates a new QR Code with the given version number,
80
196
  // error correction level, data codeword bytes, and mask number.
81
197
  // This is a low-level API that most users should not use directly.
82
198
  // A mid-level API is the encodeSegments() function.
83
199
  constructor(e, n, o, i) {
84
- if (this.version = e, this.errorCorrectionLevel = n, this.modules = [], this.isFunction = [], e < w.MIN_VERSION || e > w.MAX_VERSION)
200
+ if (this.version = e, this.errorCorrectionLevel = n, this.modules = [], this.isFunction = [], e < R.MIN_VERSION || e > R.MAX_VERSION)
85
201
  throw new RangeError("Version value out of range");
86
202
  if (i < -1 || i > 7)
87
203
  throw new RangeError("Mask value out of range");
@@ -97,8 +213,8 @@ var W;
97
213
  let d = 1e9;
98
214
  for (let C = 0; C < 8; C++) {
99
215
  this.applyMask(C), this.drawFormatBits(C);
100
- const p = this.getPenaltyScore();
101
- p < d && (i = C, d = p), this.applyMask(C);
216
+ const m = this.getPenaltyScore();
217
+ m < d && (i = C, d = m), this.applyMask(C);
102
218
  }
103
219
  }
104
220
  s(0 <= i && i <= 7), this.mask = i, this.applyMask(i), this.drawFormatBits(i), this.isFunction = [];
@@ -111,7 +227,7 @@ var W;
111
227
  // ecl argument if it can be done without increasing the version.
112
228
  static encodeText(e, n) {
113
229
  const o = t.QrSegment.makeSegments(e);
114
- return w.encodeSegments(o, n);
230
+ return R.encodeSegments(o, n);
115
231
  }
116
232
  // Returns a QR Code representing the given binary data at the given error correction level.
117
233
  // This function always encodes using the binary segment mode, not any text mode. The maximum number of
@@ -119,7 +235,7 @@ var W;
119
235
  // The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.
120
236
  static encodeBinary(e, n) {
121
237
  const o = t.QrSegment.makeBytes(e);
122
- return w.encodeSegments([o], n);
238
+ return R.encodeSegments([o], n);
123
239
  }
124
240
  /*-- Static factory functions (mid level) --*/
125
241
  // Returns a QR Code representing the given segments with the given encoding parameters.
@@ -132,35 +248,35 @@ var W;
132
248
  // between modes (such as alphanumeric and byte) to encode text in less space.
133
249
  // This is a mid-level API; the high-level API is encodeText() and encodeBinary().
134
250
  static encodeSegments(e, n, o = 1, i = 40, u = -1, f = !0) {
135
- if (!(w.MIN_VERSION <= o && o <= i && i <= w.MAX_VERSION) || u < -1 || u > 7)
251
+ if (!(R.MIN_VERSION <= o && o <= i && i <= R.MAX_VERSION) || u < -1 || u > 7)
136
252
  throw new RangeError("Invalid value");
137
253
  let d, C;
138
254
  for (d = o; ; d++) {
139
- const g = w.getNumDataCodewords(d, n) * 8, N = m.getTotalBits(e, d);
140
- if (N <= g) {
255
+ const E = R.getNumDataCodewords(d, n) * 8, N = p.getTotalBits(e, d);
256
+ if (N <= E) {
141
257
  C = N;
142
258
  break;
143
259
  }
144
260
  if (d >= i)
145
261
  throw new RangeError("Data too long");
146
262
  }
147
- for (const g of [w.Ecc.MEDIUM, w.Ecc.QUARTILE, w.Ecc.HIGH])
148
- f && C <= w.getNumDataCodewords(d, g) * 8 && (n = g);
149
- let p = [];
150
- for (const g of e) {
151
- l(g.mode.modeBits, 4, p), l(g.numChars, g.mode.numCharCountBits(d), p);
152
- for (const N of g.getData())
153
- p.push(N);
263
+ for (const E of [R.Ecc.MEDIUM, R.Ecc.QUARTILE, R.Ecc.HIGH])
264
+ f && C <= R.getNumDataCodewords(d, E) * 8 && (n = E);
265
+ let m = [];
266
+ for (const E of e) {
267
+ l(E.mode.modeBits, 4, m), l(E.numChars, E.mode.numCharCountBits(d), m);
268
+ for (const N of E.getData())
269
+ m.push(N);
154
270
  }
155
- s(p.length == C);
156
- const A = w.getNumDataCodewords(d, n) * 8;
157
- s(p.length <= A), l(0, Math.min(4, A - p.length), p), l(0, (8 - p.length % 8) % 8, p), s(p.length % 8 == 0);
158
- for (let g = 236; p.length < A; g ^= 253)
159
- l(g, 8, p);
160
- let R = [];
161
- for (; R.length * 8 < p.length; )
162
- R.push(0);
163
- return p.forEach((g, N) => R[N >>> 3] |= g << 7 - (N & 7)), new w(d, n, R, u);
271
+ s(m.length == C);
272
+ const I = R.getNumDataCodewords(d, n) * 8;
273
+ s(m.length <= I), l(0, Math.min(4, I - m.length), m), l(0, (8 - m.length % 8) % 8, m), s(m.length % 8 == 0);
274
+ for (let E = 236; m.length < I; E ^= 253)
275
+ l(E, 8, m);
276
+ let w = [];
277
+ for (; w.length * 8 < m.length; )
278
+ w.push(0);
279
+ return m.forEach((E, N) => w[N >>> 3] |= E << 7 - (N & 7)), new R(d, n, w, u);
164
280
  }
165
281
  /*-- Accessor methods --*/
166
282
  // Returns the color of the module (pixel) at the given coordinates, which is false
@@ -195,14 +311,14 @@ var W;
195
311
  const i = (n << 10 | o) ^ 21522;
196
312
  s(i >>> 15 == 0);
197
313
  for (let u = 0; u <= 5; u++)
198
- this.setFunctionModule(8, u, a(i, u));
199
- this.setFunctionModule(8, 7, a(i, 6)), this.setFunctionModule(8, 8, a(i, 7)), this.setFunctionModule(7, 8, a(i, 8));
314
+ this.setFunctionModule(8, u, c(i, u));
315
+ this.setFunctionModule(8, 7, c(i, 6)), this.setFunctionModule(8, 8, c(i, 7)), this.setFunctionModule(7, 8, c(i, 8));
200
316
  for (let u = 9; u < 15; u++)
201
- this.setFunctionModule(14 - u, 8, a(i, u));
317
+ this.setFunctionModule(14 - u, 8, c(i, u));
202
318
  for (let u = 0; u < 8; u++)
203
- this.setFunctionModule(this.size - 1 - u, 8, a(i, u));
319
+ this.setFunctionModule(this.size - 1 - u, 8, c(i, u));
204
320
  for (let u = 8; u < 15; u++)
205
- this.setFunctionModule(8, this.size - 15 + u, a(i, u));
321
+ this.setFunctionModule(8, this.size - 15 + u, c(i, u));
206
322
  this.setFunctionModule(8, this.size - 8, !0);
207
323
  }
208
324
  // Draws two copies of the version bits (with its own error correction code),
@@ -216,7 +332,7 @@ var W;
216
332
  const n = this.version << 12 | e;
217
333
  s(n >>> 18 == 0);
218
334
  for (let o = 0; o < 18; o++) {
219
- const i = a(n, o), u = this.size - 11 + o % 3, f = Math.floor(o / 3);
335
+ const i = c(n, o), u = this.size - 11 + o % 3, f = Math.floor(o / 3);
220
336
  this.setFunctionModule(u, f, i), this.setFunctionModule(f, u, i);
221
337
  }
222
338
  }
@@ -246,28 +362,28 @@ var W;
246
362
  // codewords appended to it, based on this object's version and error correction level.
247
363
  addEccAndInterleave(e) {
248
364
  const n = this.version, o = this.errorCorrectionLevel;
249
- if (e.length != w.getNumDataCodewords(n, o))
365
+ if (e.length != R.getNumDataCodewords(n, o))
250
366
  throw new RangeError("Invalid argument");
251
- const i = w.NUM_ERROR_CORRECTION_BLOCKS[o.ordinal][n], u = w.ECC_CODEWORDS_PER_BLOCK[o.ordinal][n], f = Math.floor(w.getNumRawDataModules(n) / 8), d = i - f % i, C = Math.floor(f / i);
252
- let p = [];
253
- const A = w.reedSolomonComputeDivisor(u);
254
- for (let g = 0, N = 0; g < i; g++) {
255
- let b = e.slice(N, N + C - u + (g < d ? 0 : 1));
367
+ const i = R.NUM_ERROR_CORRECTION_BLOCKS[o.ordinal][n], u = R.ECC_CODEWORDS_PER_BLOCK[o.ordinal][n], f = Math.floor(R.getNumRawDataModules(n) / 8), d = i - f % i, C = Math.floor(f / i);
368
+ let m = [];
369
+ const I = R.reedSolomonComputeDivisor(u);
370
+ for (let E = 0, N = 0; E < i; E++) {
371
+ let b = e.slice(N, N + C - u + (E < d ? 0 : 1));
256
372
  N += b.length;
257
- const P = w.reedSolomonComputeRemainder(b, A);
258
- g < d && b.push(0), p.push(b.concat(P));
373
+ const P = R.reedSolomonComputeRemainder(b, I);
374
+ E < d && b.push(0), m.push(b.concat(P));
259
375
  }
260
- let R = [];
261
- for (let g = 0; g < p[0].length; g++)
262
- p.forEach((N, b) => {
263
- (g != C - u || b >= d) && R.push(N[g]);
376
+ let w = [];
377
+ for (let E = 0; E < m[0].length; E++)
378
+ m.forEach((N, b) => {
379
+ (E != C - u || b >= d) && w.push(N[E]);
264
380
  });
265
- return s(R.length == f), R;
381
+ return s(w.length == f), w;
266
382
  }
267
383
  // Draws the given sequence of 8-bit codewords (data and error correction) onto the entire
268
384
  // data area of this QR Code. Function modules need to be marked off before this is called.
269
385
  drawCodewords(e) {
270
- if (e.length != Math.floor(w.getNumRawDataModules(this.version) / 8))
386
+ if (e.length != Math.floor(R.getNumRawDataModules(this.version) / 8))
271
387
  throw new RangeError("Invalid argument");
272
388
  let n = 0;
273
389
  for (let o = this.size - 1; o >= 1; o -= 2) {
@@ -275,7 +391,7 @@ var W;
275
391
  for (let i = 0; i < this.size; i++)
276
392
  for (let u = 0; u < 2; u++) {
277
393
  const f = o - u, C = (o + 1 & 2) == 0 ? this.size - 1 - i : i;
278
- !this.isFunction[C][f] && n < e.length * 8 && (this.modules[C][f] = a(e[n >>> 3], 7 - (n & 7)), n++);
394
+ !this.isFunction[C][f] && n < e.length * 8 && (this.modules[C][f] = c(e[n >>> 3], 7 - (n & 7)), n++);
279
395
  }
280
396
  }
281
397
  s(n == e.length * 8);
@@ -328,26 +444,26 @@ var W;
328
444
  let e = 0;
329
445
  for (let u = 0; u < this.size; u++) {
330
446
  let f = !1, d = 0, C = [0, 0, 0, 0, 0, 0, 0];
331
- for (let p = 0; p < this.size; p++)
332
- this.modules[u][p] == f ? (d++, d == 5 ? e += w.PENALTY_N1 : d > 5 && e++) : (this.finderPenaltyAddHistory(d, C), f || (e += this.finderPenaltyCountPatterns(C) * w.PENALTY_N3), f = this.modules[u][p], d = 1);
333
- e += this.finderPenaltyTerminateAndCount(f, d, C) * w.PENALTY_N3;
447
+ for (let m = 0; m < this.size; m++)
448
+ this.modules[u][m] == f ? (d++, d == 5 ? e += R.PENALTY_N1 : d > 5 && e++) : (this.finderPenaltyAddHistory(d, C), f || (e += this.finderPenaltyCountPatterns(C) * R.PENALTY_N3), f = this.modules[u][m], d = 1);
449
+ e += this.finderPenaltyTerminateAndCount(f, d, C) * R.PENALTY_N3;
334
450
  }
335
451
  for (let u = 0; u < this.size; u++) {
336
452
  let f = !1, d = 0, C = [0, 0, 0, 0, 0, 0, 0];
337
- for (let p = 0; p < this.size; p++)
338
- this.modules[p][u] == f ? (d++, d == 5 ? e += w.PENALTY_N1 : d > 5 && e++) : (this.finderPenaltyAddHistory(d, C), f || (e += this.finderPenaltyCountPatterns(C) * w.PENALTY_N3), f = this.modules[p][u], d = 1);
339
- e += this.finderPenaltyTerminateAndCount(f, d, C) * w.PENALTY_N3;
453
+ for (let m = 0; m < this.size; m++)
454
+ this.modules[m][u] == f ? (d++, d == 5 ? e += R.PENALTY_N1 : d > 5 && e++) : (this.finderPenaltyAddHistory(d, C), f || (e += this.finderPenaltyCountPatterns(C) * R.PENALTY_N3), f = this.modules[m][u], d = 1);
455
+ e += this.finderPenaltyTerminateAndCount(f, d, C) * R.PENALTY_N3;
340
456
  }
341
457
  for (let u = 0; u < this.size - 1; u++)
342
458
  for (let f = 0; f < this.size - 1; f++) {
343
459
  const d = this.modules[u][f];
344
- d == this.modules[u][f + 1] && d == this.modules[u + 1][f] && d == this.modules[u + 1][f + 1] && (e += w.PENALTY_N2);
460
+ d == this.modules[u][f + 1] && d == this.modules[u + 1][f] && d == this.modules[u + 1][f + 1] && (e += R.PENALTY_N2);
345
461
  }
346
462
  let n = 0;
347
463
  for (const u of this.modules)
348
464
  n = u.reduce((f, d) => f + (d ? 1 : 0), n);
349
465
  const o = this.size * this.size, i = Math.ceil(Math.abs(n * 20 - o * 10) / o) - 1;
350
- return s(0 <= i && i <= 9), e += i * w.PENALTY_N4, s(0 <= e && e <= 2568888), e;
466
+ return s(0 <= i && i <= 9), e += i * R.PENALTY_N4, s(0 <= e && e <= 2568888), e;
351
467
  }
352
468
  /*-- Private helper functions --*/
353
469
  // Returns an ascending list of positions of alignment patterns for this version number.
@@ -368,7 +484,7 @@ var W;
368
484
  // all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.
369
485
  // The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.
370
486
  static getNumRawDataModules(e) {
371
- if (e < w.MIN_VERSION || e > w.MAX_VERSION)
487
+ if (e < R.MIN_VERSION || e > R.MAX_VERSION)
372
488
  throw new RangeError("Version number out of range");
373
489
  let n = (16 * e + 128) * e + 64;
374
490
  if (e >= 2) {
@@ -381,7 +497,7 @@ var W;
381
497
  // QR Code of the given version number and error correction level, with remainder bits discarded.
382
498
  // This stateless pure function could be implemented as a (40*4)-cell lookup table.
383
499
  static getNumDataCodewords(e, n) {
384
- return Math.floor(w.getNumRawDataModules(e) / 8) - w.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e] * w.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e];
500
+ return Math.floor(R.getNumRawDataModules(e) / 8) - R.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e] * R.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e];
385
501
  }
386
502
  // Returns a Reed-Solomon ECC generator polynomial for the given degree. This could be
387
503
  // implemented as a lookup table over all possible parameter values, instead of as an algorithm.
@@ -395,8 +511,8 @@ var W;
395
511
  let o = 1;
396
512
  for (let i = 0; i < e; i++) {
397
513
  for (let u = 0; u < n.length; u++)
398
- n[u] = w.reedSolomonMultiply(n[u], o), u + 1 < n.length && (n[u] ^= n[u + 1]);
399
- o = w.reedSolomonMultiply(o, 2);
514
+ n[u] = R.reedSolomonMultiply(n[u], o), u + 1 < n.length && (n[u] ^= n[u + 1]);
515
+ o = R.reedSolomonMultiply(o, 2);
400
516
  }
401
517
  return n;
402
518
  }
@@ -405,7 +521,7 @@ var W;
405
521
  let o = n.map((i) => 0);
406
522
  for (const i of e) {
407
523
  const u = i ^ o.shift();
408
- o.push(0), n.forEach((f, d) => o[d] ^= w.reedSolomonMultiply(f, u));
524
+ o.push(0), n.forEach((f, d) => o[d] ^= R.reedSolomonMultiply(f, u));
409
525
  }
410
526
  return o;
411
527
  }
@@ -465,14 +581,14 @@ var W;
465
581
  for (let o = e - 1; o >= 0; o--)
466
582
  n.push(h >>> o & 1);
467
583
  }
468
- function a(h, e) {
584
+ function c(h, e) {
469
585
  return (h >>> e & 1) != 0;
470
586
  }
471
587
  function s(h) {
472
588
  if (!h)
473
589
  throw new Error("Assertion error");
474
590
  }
475
- const c = class y {
591
+ const a = class y {
476
592
  /*-- Constructor (low level) and fields --*/
477
593
  // Creates a new QR Code segment with the given attributes and data.
478
594
  // The character count (numChars) must agree with the mode and the bit buffer length,
@@ -574,17 +690,17 @@ var W;
574
690
  return n;
575
691
  }
576
692
  };
577
- c.NUMERIC_REGEX = /^[0-9]*$/, c.ALPHANUMERIC_REGEX = /^[A-Z0-9 $%*+.\/:-]*$/, c.ALPHANUMERIC_CHARSET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";
578
- let m = c;
579
- t.QrSegment = c;
693
+ a.NUMERIC_REGEX = /^[0-9]*$/, a.ALPHANUMERIC_REGEX = /^[A-Z0-9 $%*+.\/:-]*$/, a.ALPHANUMERIC_CHARSET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";
694
+ let p = a;
695
+ t.QrSegment = a;
580
696
  })(W || (W = {}));
581
697
  ((t) => {
582
698
  ((r) => {
583
699
  const l = class {
584
700
  // The QR Code can tolerate about 30% erroneous codewords
585
701
  /*-- Constructor and fields --*/
586
- constructor(s, c) {
587
- this.ordinal = s, this.formatBits = c;
702
+ constructor(s, a) {
703
+ this.ordinal = s, this.formatBits = a;
588
704
  }
589
705
  };
590
706
  l.LOW = new l(0, 1), l.MEDIUM = new l(1, 0), l.QUARTILE = new l(2, 3), l.HIGH = new l(3, 2), r.Ecc = l;
@@ -594,8 +710,8 @@ var W;
594
710
  ((r) => {
595
711
  const l = class {
596
712
  /*-- Constructor and fields --*/
597
- constructor(s, c) {
598
- this.modeBits = s, this.numBitsCharCount = c;
713
+ constructor(s, a) {
714
+ this.modeBits = s, this.numBitsCharCount = a;
599
715
  }
600
716
  /*-- Method --*/
601
717
  // (Package-private) Returns the bit width of the character count field for a segment in
@@ -613,89 +729,89 @@ var Z = W;
613
729
  * Copyright (c) Paul O'Shannessy
614
730
  * SPDX-License-Identifier: ISC
615
731
  */
616
- var it = {
732
+ var gt = {
617
733
  L: Z.QrCode.Ecc.LOW,
618
734
  M: Z.QrCode.Ecc.MEDIUM,
619
735
  Q: Z.QrCode.Ecc.QUARTILE,
620
736
  H: Z.QrCode.Ecc.HIGH
621
- }, Ae = 128, be = "L", ye = "#FFFFFF", Pe = "#000000", De = !1, Oe = 1, st = 4, at = 0, ct = 0.1;
622
- function Te(t, r = 0) {
737
+ }, Ae = 128, be = "L", ye = "#FFFFFF", Pe = "#000000", De = !1, Te = 1, Et = 4, Ct = 0, Rt = 0.1;
738
+ function Oe(t, r = 0) {
623
739
  const l = [];
624
- return t.forEach(function(a, s) {
625
- let c = null;
626
- a.forEach(function(m, h) {
627
- if (!m && c !== null) {
740
+ return t.forEach(function(c, s) {
741
+ let a = null;
742
+ c.forEach(function(p, h) {
743
+ if (!p && a !== null) {
628
744
  l.push(
629
- `M${c + r} ${s + r}h${h - c}v1H${c + r}z`
630
- ), c = null;
745
+ `M${a + r} ${s + r}h${h - a}v1H${a + r}z`
746
+ ), a = null;
631
747
  return;
632
748
  }
633
- if (h === a.length - 1) {
634
- if (!m)
749
+ if (h === c.length - 1) {
750
+ if (!p)
635
751
  return;
636
- c === null ? l.push(`M${h + r},${s + r} h1v1H${h + r}z`) : l.push(
637
- `M${c + r},${s + r} h${h + 1 - c}v1H${c + r}z`
752
+ a === null ? l.push(`M${h + r},${s + r} h1v1H${h + r}z`) : l.push(
753
+ `M${a + r},${s + r} h${h + 1 - a}v1H${a + r}z`
638
754
  );
639
755
  return;
640
756
  }
641
- m && c === null && (c = h);
757
+ p && a === null && (a = h);
642
758
  });
643
759
  }), l.join("");
644
760
  }
645
761
  function xe(t, r) {
646
- return t.slice().map((l, a) => a < r.y || a >= r.y + r.h ? l : l.map((s, c) => c < r.x || c >= r.x + r.w ? s : !1));
762
+ return t.slice().map((l, c) => c < r.y || c >= r.y + r.h ? l : l.map((s, a) => a < r.x || a >= r.x + r.w ? s : !1));
647
763
  }
648
- function ut(t, r, l, a) {
649
- if (a == null)
764
+ function wt(t, r, l, c) {
765
+ if (c == null)
650
766
  return null;
651
- const s = t.length + l * 2, c = Math.floor(r * ct), m = s / r, h = (a.width || c) * m, e = (a.height || c) * m, n = a.x == null ? t.length / 2 - h / 2 : a.x * m, o = a.y == null ? t.length / 2 - e / 2 : a.y * m, i = a.opacity == null ? 1 : a.opacity;
767
+ const s = t.length + l * 2, a = Math.floor(r * Rt), p = s / r, h = (c.width || a) * p, e = (c.height || a) * p, n = c.x == null ? t.length / 2 - h / 2 : c.x * p, o = c.y == null ? t.length / 2 - e / 2 : c.y * p, i = c.opacity == null ? 1 : c.opacity;
652
768
  let u = null;
653
- if (a.excavate) {
654
- let d = Math.floor(n), C = Math.floor(o), p = Math.ceil(h + n - d), A = Math.ceil(e + o - C);
655
- u = { x: d, y: C, w: p, h: A };
769
+ if (c.excavate) {
770
+ let d = Math.floor(n), C = Math.floor(o), m = Math.ceil(h + n - d), I = Math.ceil(e + o - C);
771
+ u = { x: d, y: C, w: m, h: I };
656
772
  }
657
- const f = a.crossOrigin;
773
+ const f = c.crossOrigin;
658
774
  return { x: n, y: o, h: e, w: h, excavation: u, opacity: i, crossOrigin: f };
659
775
  }
660
- function dt(t, r) {
661
- return r != null ? Math.max(Math.floor(r), 0) : t ? st : at;
776
+ function Mt(t, r) {
777
+ return r != null ? Math.max(Math.floor(r), 0) : t ? Et : Ct;
662
778
  }
663
779
  function Le({
664
780
  value: t,
665
781
  level: r,
666
782
  minVersion: l,
667
- includeMargin: a,
783
+ includeMargin: c,
668
784
  marginSize: s,
669
- imageSettings: c,
670
- size: m,
785
+ imageSettings: a,
786
+ size: p,
671
787
  boostLevel: h
672
788
  }) {
673
- let e = T.useMemo(() => {
674
- const d = (Array.isArray(t) ? t : [t]).reduce((C, p) => (C.push(...Z.QrSegment.makeSegments(p)), C), []);
789
+ let e = O.useMemo(() => {
790
+ const d = (Array.isArray(t) ? t : [t]).reduce((C, m) => (C.push(...Z.QrSegment.makeSegments(m)), C), []);
675
791
  return Z.QrCode.encodeSegments(
676
792
  d,
677
- it[r],
793
+ gt[r],
678
794
  l,
679
795
  void 0,
680
796
  void 0,
681
797
  h
682
798
  );
683
799
  }, [t, r, l, h]);
684
- const { cells: n, margin: o, numCells: i, calculatedImageSettings: u } = T.useMemo(() => {
800
+ const { cells: n, margin: o, numCells: i, calculatedImageSettings: u } = O.useMemo(() => {
685
801
  let f = e.getModules();
686
- const d = dt(a, s), C = f.length + d * 2, p = ut(
802
+ const d = Mt(c, s), C = f.length + d * 2, m = wt(
687
803
  f,
688
- m,
804
+ p,
689
805
  d,
690
- c
806
+ a
691
807
  );
692
808
  return {
693
809
  cells: f,
694
810
  margin: d,
695
811
  numCells: C,
696
- calculatedImageSettings: p
812
+ calculatedImageSettings: m
697
813
  };
698
- }, [e, m, c, a, s]);
814
+ }, [e, p, a, c, s]);
699
815
  return {
700
816
  qrcode: e,
701
817
  margin: o,
@@ -704,27 +820,27 @@ function Le({
704
820
  calculatedImageSettings: u
705
821
  };
706
822
  }
707
- var ht = (function() {
823
+ var Nt = (function() {
708
824
  try {
709
825
  new Path2D().addPath(new Path2D());
710
826
  } catch {
711
827
  return !1;
712
828
  }
713
829
  return !0;
714
- })(), ft = T.forwardRef(
830
+ })(), It = O.forwardRef(
715
831
  function(r, l) {
716
- const a = r, {
832
+ const c = r, {
717
833
  value: s,
718
- size: c = Ae,
719
- level: m = be,
834
+ size: a = Ae,
835
+ level: p = be,
720
836
  bgColor: h = ye,
721
837
  fgColor: e = Pe,
722
838
  includeMargin: n = De,
723
- minVersion: o = Oe,
839
+ minVersion: o = Te,
724
840
  boostLevel: i,
725
841
  marginSize: u,
726
842
  imageSettings: f
727
- } = a, C = de(a, [
843
+ } = c, C = de(c, [
728
844
  "value",
729
845
  "size",
730
846
  "level",
@@ -735,57 +851,57 @@ var ht = (function() {
735
851
  "boostLevel",
736
852
  "marginSize",
737
853
  "imageSettings"
738
- ]), { style: p } = C, A = de(C, ["style"]), R = f == null ? void 0 : f.src, g = T.useRef(null), N = T.useRef(null), b = T.useCallback(
739
- (B) => {
740
- g.current = B, typeof l == "function" ? l(B) : l && (l.current = B);
854
+ ]), { style: m } = C, I = de(C, ["style"]), w = f == null ? void 0 : f.src, E = O.useRef(null), N = O.useRef(null), b = O.useCallback(
855
+ (S) => {
856
+ E.current = S, typeof l == "function" ? l(S) : l && (l.current = S);
741
857
  },
742
858
  [l]
743
- ), [P, x] = T.useState(!1), { margin: O, cells: k, numCells: $, calculatedImageSettings: D } = Le({
859
+ ), [P, x] = O.useState(!1), { margin: T, cells: z, numCells: $, calculatedImageSettings: D } = Le({
744
860
  value: s,
745
- level: m,
861
+ level: p,
746
862
  minVersion: o,
747
863
  boostLevel: i,
748
864
  includeMargin: n,
749
865
  marginSize: u,
750
866
  imageSettings: f,
751
- size: c
867
+ size: a
752
868
  });
753
- T.useEffect(() => {
754
- if (g.current != null) {
755
- const B = g.current, M = B.getContext("2d");
869
+ O.useEffect(() => {
870
+ if (E.current != null) {
871
+ const S = E.current, M = S.getContext("2d");
756
872
  if (!M)
757
873
  return;
758
- let I = k;
874
+ let A = z;
759
875
  const L = N.current, j = D != null && L !== null && L.complete && L.naturalHeight !== 0 && L.naturalWidth !== 0;
760
- j && D.excavation != null && (I = xe(
761
- k,
876
+ j && D.excavation != null && (A = xe(
877
+ z,
762
878
  D.excavation
763
879
  ));
764
880
  const ne = window.devicePixelRatio || 1;
765
- B.height = B.width = c * ne;
766
- const re = c / $ * ne;
767
- M.scale(re, re), M.fillStyle = h, M.fillRect(0, 0, $, $), M.fillStyle = e, ht ? M.fill(new Path2D(Te(I, O))) : k.forEach(function(V, G) {
881
+ S.height = S.width = a * ne;
882
+ const re = a / $ * ne;
883
+ M.scale(re, re), M.fillStyle = h, M.fillRect(0, 0, $, $), M.fillStyle = e, Nt ? M.fill(new Path2D(Oe(A, T))) : z.forEach(function(V, G) {
768
884
  V.forEach(function(q, ae) {
769
- q && M.fillRect(ae + O, G + O, 1, 1);
885
+ q && M.fillRect(ae + T, G + T, 1, 1);
770
886
  });
771
887
  }), D && (M.globalAlpha = D.opacity), j && M.drawImage(
772
888
  L,
773
- D.x + O,
774
- D.y + O,
889
+ D.x + T,
890
+ D.y + T,
775
891
  D.w,
776
892
  D.h
777
893
  );
778
894
  }
779
- }), T.useEffect(() => {
895
+ }), O.useEffect(() => {
780
896
  x(!1);
781
- }, [R]);
782
- const H = ue({ height: c, width: c }, p);
897
+ }, [w]);
898
+ const H = ue({ height: a, width: a }, m);
783
899
  let Q = null;
784
- return R != null && (Q = /* @__PURE__ */ T.createElement(
900
+ return w != null && (Q = /* @__PURE__ */ O.createElement(
785
901
  "img",
786
902
  {
787
- src: R,
788
- key: R,
903
+ src: w,
904
+ key: w,
789
905
  style: { display: "none" },
790
906
  onLoad: () => {
791
907
  x(!0);
@@ -793,34 +909,34 @@ var ht = (function() {
793
909
  ref: N,
794
910
  crossOrigin: D == null ? void 0 : D.crossOrigin
795
911
  }
796
- )), /* @__PURE__ */ T.createElement(T.Fragment, null, /* @__PURE__ */ T.createElement(
912
+ )), /* @__PURE__ */ O.createElement(O.Fragment, null, /* @__PURE__ */ O.createElement(
797
913
  "canvas",
798
914
  ue({
799
915
  style: H,
800
- height: c,
801
- width: c,
916
+ height: a,
917
+ width: a,
802
918
  ref: b,
803
919
  role: "img"
804
- }, A)
920
+ }, I)
805
921
  ), Q);
806
922
  }
807
923
  );
808
- ft.displayName = "QRCodeCanvas";
809
- var Se = T.forwardRef(
924
+ It.displayName = "QRCodeCanvas";
925
+ var Be = O.forwardRef(
810
926
  function(r, l) {
811
- const a = r, {
927
+ const c = r, {
812
928
  value: s,
813
- size: c = Ae,
814
- level: m = be,
929
+ size: a = Ae,
930
+ level: p = be,
815
931
  bgColor: h = ye,
816
932
  fgColor: e = Pe,
817
933
  includeMargin: n = De,
818
- minVersion: o = Oe,
934
+ minVersion: o = Te,
819
935
  boostLevel: i,
820
936
  title: u,
821
937
  marginSize: f,
822
938
  imageSettings: d
823
- } = a, C = de(a, [
939
+ } = c, C = de(c, [
824
940
  "value",
825
941
  "size",
826
942
  "level",
@@ -832,96 +948,96 @@ var Se = T.forwardRef(
832
948
  "title",
833
949
  "marginSize",
834
950
  "imageSettings"
835
- ]), { margin: p, cells: A, numCells: R, calculatedImageSettings: g } = Le({
951
+ ]), { margin: m, cells: I, numCells: w, calculatedImageSettings: E } = Le({
836
952
  value: s,
837
- level: m,
953
+ level: p,
838
954
  minVersion: o,
839
955
  boostLevel: i,
840
956
  includeMargin: n,
841
957
  marginSize: f,
842
958
  imageSettings: d,
843
- size: c
959
+ size: a
844
960
  });
845
- let N = A, b = null;
846
- d != null && g != null && (g.excavation != null && (N = xe(
847
- A,
848
- g.excavation
849
- )), b = /* @__PURE__ */ T.createElement(
961
+ let N = I, b = null;
962
+ d != null && E != null && (E.excavation != null && (N = xe(
963
+ I,
964
+ E.excavation
965
+ )), b = /* @__PURE__ */ O.createElement(
850
966
  "image",
851
967
  {
852
968
  href: d.src,
853
- height: g.h,
854
- width: g.w,
855
- x: g.x + p,
856
- y: g.y + p,
969
+ height: E.h,
970
+ width: E.w,
971
+ x: E.x + m,
972
+ y: E.y + m,
857
973
  preserveAspectRatio: "none",
858
- opacity: g.opacity,
859
- crossOrigin: g.crossOrigin
974
+ opacity: E.opacity,
975
+ crossOrigin: E.crossOrigin
860
976
  }
861
977
  ));
862
- const P = Te(N, p);
863
- return /* @__PURE__ */ T.createElement(
978
+ const P = Oe(N, m);
979
+ return /* @__PURE__ */ O.createElement(
864
980
  "svg",
865
981
  ue({
866
- height: c,
867
- width: c,
868
- viewBox: `0 0 ${R} ${R}`,
982
+ height: a,
983
+ width: a,
984
+ viewBox: `0 0 ${w} ${w}`,
869
985
  ref: l,
870
986
  role: "img"
871
987
  }, C),
872
- !!u && /* @__PURE__ */ T.createElement("title", null, u),
873
- /* @__PURE__ */ T.createElement(
988
+ !!u && /* @__PURE__ */ O.createElement("title", null, u),
989
+ /* @__PURE__ */ O.createElement(
874
990
  "path",
875
991
  {
876
992
  fill: h,
877
- d: `M0,0 h${R}v${R}H0z`,
993
+ d: `M0,0 h${w}v${w}H0z`,
878
994
  shapeRendering: "crispEdges"
879
995
  }
880
996
  ),
881
- /* @__PURE__ */ T.createElement("path", { fill: e, d: P, shapeRendering: "crispEdges" }),
997
+ /* @__PURE__ */ O.createElement("path", { fill: e, d: P, shapeRendering: "crispEdges" }),
882
998
  b
883
999
  );
884
1000
  }
885
1001
  );
886
- Se.displayName = "QRCodeSVG";
887
- const Be = "share", mt = "onboarding", pt = (t, r) => ({
888
- invitationType: ze.LINK,
1002
+ Be.displayName = "QRCodeSVG";
1003
+ const Se = "share", At = "onboarding", bt = (t, r) => ({
1004
+ invitationType: qe.LINK,
889
1005
  resources: [
890
1006
  {
891
1007
  url: `conversations/${encodeURI(t)}`
892
1008
  },
893
1009
  ...r
894
1010
  ]
895
- }), Et = (t) => {
1011
+ }), yt = (t) => {
896
1012
  var l;
897
1013
  const r = ((l = t == null ? void 0 : t.invitationLink) == null ? void 0 : l.split("/").at(-1)) || "";
898
- return `/${Be}/${r}`;
899
- }, gt = (t, r) => r == null ? void 0 : r.find((l) => {
900
- var c, m, h, e;
901
- const a = (m = (c = t == null ? void 0 : t.id) == null ? void 0 : c.split("/")) == null ? void 0 : m.pop(), s = ((e = (h = l == null ? void 0 : l.url) == null ? void 0 : h.split("/")) == null ? void 0 : e.pop()) || "";
902
- return s === a || decodeURI(s) === a;
903
- }), Ct = (t) => {
904
- var l, a;
1014
+ return `/${Se}/${r}`;
1015
+ }, Pt = (t, r) => r == null ? void 0 : r.find((l) => {
1016
+ var a, p, h, e;
1017
+ const c = (p = (a = t == null ? void 0 : t.id) == null ? void 0 : a.split("/")) == null ? void 0 : p.pop(), s = ((e = (h = l == null ? void 0 : l.url) == null ? void 0 : h.split("/")) == null ? void 0 : e.pop()) || "";
1018
+ return s === c || decodeURI(s) === c;
1019
+ }), Dt = (t) => {
1020
+ var l, c;
905
1021
  const r = (l = t == null ? void 0 : t.messages) == null ? void 0 : l.filter(
906
1022
  (s) => {
907
- var c;
908
- return !!((c = s == null ? void 0 : s.custom_content) != null && c.attachments);
1023
+ var a;
1024
+ return !!((a = s == null ? void 0 : s.custom_content) != null && a.attachments);
909
1025
  }
910
1026
  );
911
- return ((a = r == null ? void 0 : r.flatMap((s) => {
912
- var c, m;
913
- return ((m = (c = s == null ? void 0 : s.custom_content) == null ? void 0 : c.attachments) == null ? void 0 : m.map((h) => ({
1027
+ return ((c = r == null ? void 0 : r.flatMap((s) => {
1028
+ var a, p;
1029
+ return ((p = (a = s == null ? void 0 : s.custom_content) == null ? void 0 : a.attachments) == null ? void 0 : p.map((h) => ({
914
1030
  url: (h == null ? void 0 : h.url) || ""
915
1031
  }))) || [];
916
- })) == null ? void 0 : a.filter((s) => !!(s != null && s.url))) || [];
917
- }, wt = ({
1032
+ })) == null ? void 0 : c.filter((s) => !!(s != null && s.url))) || [];
1033
+ }, Tt = ({
918
1034
  conversation: t,
919
1035
  locale: r,
920
1036
  onCloseModal: l,
921
- modalDividers: a,
1037
+ modalDividers: c,
922
1038
  getConversation: s,
923
- generateConversationLink: c,
924
- chatExpiration: m,
1039
+ generateConversationLink: a,
1040
+ chatExpiration: p,
925
1041
  chatExpirationDays: h,
926
1042
  close: e,
927
1043
  chatWarning: n,
@@ -931,33 +1047,33 @@ const Be = "share", mt = "onboarding", pt = (t, r) => ({
931
1047
  shareDescription: f,
932
1048
  shareRemoveAccessToUsers: d,
933
1049
  chatName: C,
934
- getSharedConversations: p,
935
- revokeSharedConversations: A,
936
- baseUrl: R,
937
- id: g,
1050
+ getSharedConversations: m,
1051
+ revokeSharedConversations: I,
1052
+ baseUrl: w,
1053
+ id: E,
938
1054
  clientSharedPage: N,
939
1055
  clientSharedProp: b
940
1056
  }) => {
941
- const [P, x] = F(null), [O, k] = F(), [$, D] = F(!1), [H, Q] = F(!1), [B, M] = F(), I = he(() => {
1057
+ const [P, x] = F(null), [T, z] = F(), [$, D] = F(!1), [H, Q] = F(!1), [S, M] = F(), A = he(() => {
942
1058
  var G;
943
- const V = R || window.location.origin;
944
- if (R && R !== window.location.origin && N && b) {
945
- const q = (G = P == null ? void 0 : P.split(`/${Be}/`)) == null ? void 0 : G[1];
1059
+ const V = w || window.location.origin;
1060
+ if (w && w !== window.location.origin && N && b) {
1061
+ const q = (G = P == null ? void 0 : P.split(`/${Se}/`)) == null ? void 0 : G[1];
946
1062
  return `${V}/${N}?${b}=${q}`;
947
1063
  }
948
1064
  return `${V}/${r}${P}`;
949
- }, [R, P, r, N, b]);
1065
+ }, [w, P, r, N, b]);
950
1066
  ee(() => {
951
1067
  (async () => {
952
1068
  try {
953
- const G = decodeURI(t ? t == null ? void 0 : t.id : `${g == null ? void 0 : g[0]}/${r}/${g == null ? void 0 : g[1]}`), q = `${decodeURI(G)}`, ae = await (s == null ? void 0 : s(q)), Ue = pt(
1069
+ const G = decodeURI(t ? t == null ? void 0 : t.id : `${E == null ? void 0 : E[0]}/${r}/${E == null ? void 0 : E[1]}`), q = `${decodeURI(G)}`, ae = await (s == null ? void 0 : s(q)), Ue = bt(
954
1070
  G,
955
- Ct(ae)
956
- ), Ee = await (c == null ? void 0 : c(Ue)), oe = await (p == null ? void 0 : p(
1071
+ Dt(ae)
1072
+ ), ge = await (a == null ? void 0 : a(Ue)), oe = await (m == null ? void 0 : m(
957
1073
  le(ie.OTHERS)
958
1074
  ));
959
- Ee && oe && (D(!0), x(Et(Ee)), k(
960
- gt(
1075
+ ge && oe && (D(!0), x(yt(ge)), z(
1076
+ Pt(
961
1077
  t,
962
1078
  oe == null ? void 0 : oe.resources
963
1079
  )
@@ -968,46 +1084,46 @@ const Be = "share", mt = "onboarding", pt = (t, r) => ({
968
1084
  })();
969
1085
  }, [
970
1086
  t,
971
- c,
1087
+ a,
972
1088
  s,
973
- p,
974
- g,
1089
+ m,
1090
+ E,
975
1091
  r
976
1092
  ]);
977
1093
  const L = _(() => {
978
1094
  l(), x(null), D(!1), Q(!1);
979
1095
  }, [l]), j = _(() => {
980
- Q(!0), navigator.clipboard.writeText(I || "");
981
- }, [I]), ne = async () => {
1096
+ Q(!0), navigator.clipboard.writeText(A || "");
1097
+ }, [A]), ne = async () => {
982
1098
  try {
983
- M(!0), O && await (A == null ? void 0 : A({ resources: [O] }));
1099
+ M(!0), T && await (I == null ? void 0 : I({ resources: [T] }));
984
1100
  } catch (V) {
985
1101
  M(!1), console.error("Error revoking shared conversation", V);
986
1102
  }
987
- }, re = _(() => /* @__PURE__ */ E(
1103
+ }, re = _(() => /* @__PURE__ */ g(
988
1104
  X,
989
1105
  {
990
1106
  buttonClassName: H ? "text-button-secondary" : "text-button-primary",
991
- iconBefore: H ? /* @__PURE__ */ E(Ve, { width: 20, height: 20 }) : /* @__PURE__ */ E(Xe, { width: 20, height: 20 }),
1107
+ iconBefore: H ? /* @__PURE__ */ g(je, { width: 20, height: 20 }) : /* @__PURE__ */ g(Ve, { width: 20, height: 20 }),
992
1108
  title: H ? u ?? "Copied" : i ?? "Copy link",
993
1109
  disabled: H,
994
1110
  onClick: j
995
1111
  }
996
1112
  ), [H, j, u, i]);
997
- return /* @__PURE__ */ S(
998
- me,
1113
+ return /* @__PURE__ */ B(
1114
+ fe,
999
1115
  {
1000
1116
  heading: o ?? "Share link",
1001
1117
  portalId: "share",
1002
- size: pe.SM,
1003
- dividers: a,
1118
+ size: me.SM,
1119
+ dividers: c,
1004
1120
  onClose: L,
1005
1121
  closeButtonTitle: e ?? "Close",
1006
1122
  children: [
1007
- $ ? /* @__PURE__ */ S("div", { className: "share flex flex-col gap-y-4 px-6 pb-6 overflow-auto sm:p-0", children: [
1008
- t != null && t.name ? /* @__PURE__ */ S("div", { className: "flex share-info w-full", children: [
1009
- /* @__PURE__ */ E("p", { className: "share-info-title text-neutrals-800 mr-1 body-1", children: C ?? "Chat name:" }),
1010
- /* @__PURE__ */ E(
1123
+ $ ? /* @__PURE__ */ B("div", { className: "share flex flex-col gap-y-4 px-6 pb-6 overflow-auto sm:p-0", children: [
1124
+ t != null && t.name ? /* @__PURE__ */ B("div", { className: "flex share-info w-full", children: [
1125
+ /* @__PURE__ */ g("p", { className: "share-info-title text-neutrals-800 mr-1 body-1", children: C ?? "Chat name:" }),
1126
+ /* @__PURE__ */ g(
1011
1127
  "h3",
1012
1128
  {
1013
1129
  className: "flex-1 min-w-0 truncate",
@@ -1016,196 +1132,79 @@ const Be = "share", mt = "onboarding", pt = (t, r) => ({
1016
1132
  }
1017
1133
  )
1018
1134
  ] }) : null,
1019
- /* @__PURE__ */ S("div", { className: "flex share-info", children: [
1020
- /* @__PURE__ */ E("p", { className: "share-info-title text-neutrals-800 mr-1 body-1", children: m ?? "Link expiration date:" }),
1021
- /* @__PURE__ */ S("h3", { children: [
1135
+ /* @__PURE__ */ B("div", { className: "flex share-info", children: [
1136
+ /* @__PURE__ */ g("p", { className: "share-info-title text-neutrals-800 mr-1 body-1", children: p ?? "Link expiration date:" }),
1137
+ /* @__PURE__ */ B("h3", { children: [
1022
1138
  "3 ",
1023
1139
  h ?? "days"
1024
1140
  ] })
1025
1141
  ] }),
1026
- /* @__PURE__ */ E(
1027
- Se,
1142
+ /* @__PURE__ */ g(
1143
+ Be,
1028
1144
  {
1029
1145
  className: "self-center border border-neutrals-600 p-2 rounded min-h-[200px]",
1030
- value: I,
1146
+ value: A,
1031
1147
  size: 200
1032
1148
  }
1033
1149
  ),
1034
- /* @__PURE__ */ E("p", { className: "body-2 text-neutrals-1000", children: f ?? "Your name, special instructions, and any messages you add after sharing remain confidential." }),
1035
- /* @__PURE__ */ E(
1036
- we,
1150
+ /* @__PURE__ */ g("p", { className: "body-2 text-neutrals-1000", children: f ?? "Your name, special instructions, and any messages you add after sharing remain confidential." }),
1151
+ /* @__PURE__ */ g(
1152
+ Re,
1037
1153
  {
1038
1154
  containerClasses: "share-input-container",
1039
1155
  cssClass: "share-input",
1040
1156
  readonly: !0,
1041
- placeholder: I,
1042
- value: I,
1157
+ placeholder: A,
1158
+ value: A,
1043
1159
  inputId: "conversationLink",
1044
1160
  iconAfterInput: re()
1045
1161
  }
1046
1162
  )
1047
- ] }) : /* @__PURE__ */ E("div", { className: "flex justify-center items-center py-6 px-6", children: /* @__PURE__ */ E(Ce, {}) }),
1048
- $ ? t && O ? /* @__PURE__ */ E("div", { className: "remove-access", children: /* @__PURE__ */ E(
1163
+ ] }) : /* @__PURE__ */ g("div", { className: "flex justify-center items-center py-6 px-6", children: /* @__PURE__ */ g(Ce, {}) }),
1164
+ $ ? t && T ? /* @__PURE__ */ g("div", { className: "remove-access", children: /* @__PURE__ */ g(
1049
1165
  X,
1050
1166
  {
1051
1167
  title: d ?? "Remove access to all users",
1052
1168
  buttonClassName: "remove-access-button py-3 px-4",
1053
1169
  isSmallButton: !0,
1054
- disabled: B,
1170
+ disabled: S,
1055
1171
  onClick: ne
1056
1172
  }
1057
- ) }) : /* @__PURE__ */ E("p", { className: "body-2 text-neutrals-800 share-footer", children: n ?? "This chat has not been shared with anyone yet." }) : /* @__PURE__ */ E("div", {})
1173
+ ) }) : /* @__PURE__ */ g("p", { className: "body-2 text-neutrals-800 share-footer", children: n ?? "This chat has not been shared with anyone yet." }) : /* @__PURE__ */ g("div", {})
1058
1174
  ]
1059
1175
  }
1060
1176
  );
1061
- }, Rt = (t) => {
1062
- const r = t.messages.flatMap((a) => {
1063
- var m, h, e;
1064
- const s = ((m = a.custom_content) == null ? void 0 : m.attachments) || [], c = ((e = (h = a.custom_content) == null ? void 0 : h.stages) == null ? void 0 : e.flatMap(
1065
- ({ attachments: n }) => n ?? []
1066
- )) || [];
1067
- return [...s, ...c];
1068
- }) || [], l = At(r).map(
1069
- (a) => ({
1070
- ...a,
1071
- relativePath: "",
1072
- contentLength: 0
1073
- })
1074
- );
1075
- return je(
1076
- l,
1077
- (a) => te(a.relativePath, a.name)
1078
- );
1079
- }, Mt = (t) => t.endsWith("/"), Nt = (t) => {
1080
- const r = t.toLowerCase();
1081
- return [
1082
- "data:",
1083
- "//",
1084
- "http://",
1085
- "https://",
1086
- "file://",
1087
- "ftp://",
1088
- "mailto:",
1089
- "telnet://",
1090
- "api/files"
1091
- ].some((l) => r.startsWith(l));
1092
- }, It = (t) => {
1093
- const r = te(
1094
- ...t.split("/").map((a) => decodeURIComponent(a))
1095
- ), l = r.lastIndexOf("/");
1096
- return {
1097
- absolutePath: r.slice(0, l),
1098
- name: r.slice(l + 1)
1099
- };
1100
- }, At = (t) => t ? t.map((r) => {
1101
- if (!r.url || Nt(r.url) || Mt(r.url))
1102
- return null;
1103
- const { absolutePath: l, name: a } = It(r.url);
1104
- return {
1105
- id: r.url,
1106
- name: a,
1107
- contentType: r.type,
1108
- folderId: l,
1109
- absolutePath: l
1110
- };
1111
- }).filter(Boolean) : [];
1112
- async function bt(t, r) {
1113
- const l = Rt(t), a = new qe();
1114
- l.forEach((h) => {
1115
- const e = encodeURI(te(h.absolutePath, h.name)), n = r(`${e}`.replace("files/", "")), o = yt(h.folderId), i = te("res", o, h.name);
1116
- a.file(i, n);
1117
- });
1118
- const s = {
1119
- version: 5,
1120
- history: [t].map(Pt) || [],
1121
- folders: []
1122
- }, c = JSON.stringify(s, null, 2);
1123
- return a.file("conversations/conversations_history.json", c), await a.generateAsync({ type: "base64" });
1124
- }
1125
- const yt = (t) => {
1126
- const r = t.split("/");
1127
- return r.length > 2 ? te(...r.slice(2)) : void 0;
1128
- }, Pt = (t) => Ge(t, ["publicationInfo"]), te = (...t) => t.filter(Boolean).join("/");
1129
- function Dt(t, r) {
1130
- const l = document.createElement("a");
1131
- l.download = r, l.href = t, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(t);
1132
- }
1133
- const Ot = ({
1134
- onCloseModal: t,
1135
- disableModalDividers: r,
1136
- deleteConversation: l,
1137
- isSmallButton: a,
1138
- titles: s,
1139
- locale: c
1140
- }) => /* @__PURE__ */ S(
1141
- me,
1142
- {
1143
- heading: (s == null ? void 0 : s.deleteTitle) ?? "Delete conversation",
1144
- portalId: "delete-conversation",
1145
- containerClassName: "delete-conversation-popup",
1146
- size: pe.SM,
1147
- dividers: !r,
1148
- onClose: t,
1149
- closeButtonTitle: (s == null ? void 0 : s.close) ?? "Cancel",
1150
- children: [
1151
- /* @__PURE__ */ E("div", { className: "py-4 px-6 sm:px-0", lang: c, children: (s == null ? void 0 : s.deleteMessage) ?? "Are you sure you want to delete this conversation? This action cannot be undone." }),
1152
- /* @__PURE__ */ S("div", { className: "flex justify-end gap-x-2 py-3 px-6 delete-conversation-popup-footer", children: [
1153
- /* @__PURE__ */ E(
1154
- X,
1155
- {
1156
- buttonClassName: "cancel-button",
1157
- title: (s == null ? void 0 : s.cancel) ?? "Cancel",
1158
- isSmallButton: a,
1159
- onClick: (m) => {
1160
- m.stopPropagation(), t();
1161
- }
1162
- }
1163
- ),
1164
- /* @__PURE__ */ E(
1165
- X,
1166
- {
1167
- buttonClassName: "text-button-primary text-button-primary-error",
1168
- title: (s == null ? void 0 : s.delete) ?? "Delete",
1169
- isSmallButton: a,
1170
- onClick: (m) => {
1171
- m.stopPropagation(), l();
1172
- }
1173
- }
1174
- )
1175
- ] })
1176
- ]
1177
- }
1178
- ), Tt = ({
1177
+ }, Ot = ({
1179
1178
  conversation: t,
1180
1179
  onCloseModal: r,
1181
- renameCoversation: l,
1182
- locale: a,
1180
+ renameConversation: l,
1181
+ locale: c,
1183
1182
  disableModalDividers: s,
1184
- titles: c,
1185
- isSmallButton: m
1183
+ titles: a,
1184
+ isSmallButton: p
1186
1185
  }) => {
1187
1186
  const [h, e] = F((t == null ? void 0 : t.name) || ""), n = (i) => {
1188
1187
  e(i);
1189
1188
  }, o = () => {
1190
- const i = `${t == null ? void 0 : t.folderId}/${encodeURIComponent(fe(h))}-${(/* @__PURE__ */ new Date()).getTime()}`;
1189
+ const i = `${t == null ? void 0 : t.folderId}/${encodeURIComponent(pe(h))}-${(/* @__PURE__ */ new Date()).getTime()}`;
1191
1190
  l(
1192
1191
  `conversations/${t.id}`,
1193
1192
  `conversations/${i}`
1194
1193
  );
1195
1194
  };
1196
- return /* @__PURE__ */ S(
1197
- me,
1195
+ return /* @__PURE__ */ B(
1196
+ fe,
1198
1197
  {
1199
- heading: (c == null ? void 0 : c.renameTitle) ?? "Rename conversation",
1198
+ heading: (a == null ? void 0 : a.renameTitle) ?? "Rename conversation",
1200
1199
  portalId: "rename-conversation",
1201
1200
  containerClassName: "rename-conversation-popup",
1202
- size: pe.SM,
1201
+ size: me.SM,
1203
1202
  dividers: !s,
1204
1203
  onClose: r,
1205
- closeButtonTitle: (c == null ? void 0 : c.close) ?? "Cancel",
1204
+ closeButtonTitle: (a == null ? void 0 : a.close) ?? "Cancel",
1206
1205
  children: [
1207
- /* @__PURE__ */ E("div", { className: "py-4 px-6 sm:px-0", lang: a, children: /* @__PURE__ */ E(
1208
- _e,
1206
+ /* @__PURE__ */ g("div", { className: "py-4 px-6 sm:px-0", lang: c, children: /* @__PURE__ */ g(
1207
+ He,
1209
1208
  {
1210
1209
  inputId: "rename",
1211
1210
  value: h,
@@ -1213,24 +1212,24 @@ const Ot = ({
1213
1212
  cssClass: "w-full"
1214
1213
  }
1215
1214
  ) }),
1216
- /* @__PURE__ */ S("div", { className: "flex justify-end gap-x-2 py-3 px-6 delete-conversation-popup-footer", children: [
1217
- /* @__PURE__ */ E(
1215
+ /* @__PURE__ */ B("div", { className: "flex justify-end gap-x-2 py-3 px-6 delete-conversation-popup-footer", children: [
1216
+ /* @__PURE__ */ g(
1218
1217
  X,
1219
1218
  {
1220
1219
  buttonClassName: "cancel-button",
1221
- title: (c == null ? void 0 : c.cancel) ?? "Cancel",
1222
- isSmallButton: m,
1220
+ title: (a == null ? void 0 : a.cancel) ?? "Cancel",
1221
+ isSmallButton: p,
1223
1222
  onClick: (i) => {
1224
1223
  i.stopPropagation(), r();
1225
1224
  }
1226
1225
  }
1227
1226
  ),
1228
- /* @__PURE__ */ E(
1227
+ /* @__PURE__ */ g(
1229
1228
  X,
1230
1229
  {
1231
1230
  buttonClassName: "text-button-primary text-button-primary",
1232
- title: (c == null ? void 0 : c.save) ?? "Rename",
1233
- isSmallButton: m,
1231
+ title: (a == null ? void 0 : a.save) ?? "Rename",
1232
+ isSmallButton: p,
1234
1233
  disabled: !h,
1235
1234
  onClick: (i) => {
1236
1235
  i.stopPropagation(), o();
@@ -1245,40 +1244,40 @@ const Ot = ({
1245
1244
  conversation: t,
1246
1245
  conversationStyles: r,
1247
1246
  shareConversationProps: l,
1248
- onConversationDelete: a,
1247
+ onConversationDelete: c,
1249
1248
  getConversation: s,
1250
- getFileBlob: c,
1251
- renameConversation: m,
1249
+ getFileBlob: a,
1250
+ renameConversation: p,
1252
1251
  triggerButton: h,
1253
1252
  locale: e
1254
1253
  }) => {
1255
1254
  var P;
1256
1255
  const n = he(() => {
1257
- var O, k, $, D, H, Q, B, M, I, L;
1256
+ var T, z, $, D, H, Q, S, M, A, L;
1258
1257
  const x = [
1259
1258
  {
1260
- key: z.DELETE,
1261
- title: ((O = r == null ? void 0 : r.titles) == null ? void 0 : O.delete) ?? "Delete",
1262
- icon: (k = r.actionsIcons) == null ? void 0 : k[z.DELETE]
1259
+ key: k.DELETE,
1260
+ title: ((T = r == null ? void 0 : r.titles) == null ? void 0 : T.delete) ?? "Delete",
1261
+ icon: (z = r.actionsIcons) == null ? void 0 : z[k.DELETE]
1263
1262
  }
1264
1263
  ];
1265
- return (D = ($ = t == null ? void 0 : t.model) == null ? void 0 : $.id) != null && D.endsWith(mt) ? x : [
1264
+ return (D = ($ = t == null ? void 0 : t.model) == null ? void 0 : $.id) != null && D.endsWith(At) ? x : [
1266
1265
  ...t.isShared ? [] : [
1267
1266
  {
1268
- key: z.SHARE,
1267
+ key: k.SHARE,
1269
1268
  title: ((H = r == null ? void 0 : r.titles) == null ? void 0 : H.share) ?? "Share",
1270
- icon: (Q = r.actionsIcons) == null ? void 0 : Q[z.SHARE]
1269
+ icon: (Q = r.actionsIcons) == null ? void 0 : Q[k.SHARE]
1271
1270
  },
1272
1271
  {
1273
- key: z.RENAME,
1274
- title: ((B = r == null ? void 0 : r.titles) == null ? void 0 : B.rename) ?? "Rename",
1275
- icon: (M = r.actionsIcons) == null ? void 0 : M[z.RENAME]
1272
+ key: k.RENAME,
1273
+ title: ((S = r == null ? void 0 : r.titles) == null ? void 0 : S.rename) ?? "Rename",
1274
+ icon: (M = r.actionsIcons) == null ? void 0 : M[k.RENAME]
1276
1275
  }
1277
1276
  ],
1278
1277
  {
1279
- key: z.EXPORT,
1280
- title: ((I = r == null ? void 0 : r.titles) == null ? void 0 : I.export) ?? "Export",
1281
- icon: (L = r.actionsIcons) == null ? void 0 : L[z.EXPORT]
1278
+ key: k.EXPORT,
1279
+ title: ((A = r == null ? void 0 : r.titles) == null ? void 0 : A.export) ?? "Export",
1280
+ icon: (L = r.actionsIcons) == null ? void 0 : L[k.EXPORT]
1282
1281
  },
1283
1282
  ...x
1284
1283
  ];
@@ -1287,33 +1286,33 @@ const Ot = ({
1287
1286
  (P = t == null ? void 0 : t.model) == null ? void 0 : P.id,
1288
1287
  r.titles,
1289
1288
  r.actionsIcons
1290
- ]), [o, i] = F(Y.Closed), [u, f] = F(Y.Closed), [d, C] = F(Y.Closed), p = _(() => {
1289
+ ]), [o, i] = F(Y.Closed), [u, f] = F(Y.Closed), [d, C] = F(Y.Closed), m = _(() => {
1291
1290
  i(Y.Closed);
1292
- }, [i]), A = _(() => {
1291
+ }, [i]), I = _(() => {
1293
1292
  f(Y.Closed);
1294
- }, [f]), R = _(() => {
1293
+ }, [f]), w = _(() => {
1295
1294
  C(Y.Closed);
1296
- }, [C]), g = _(() => {
1297
- a(t), p();
1298
- }, [t, a, p]), N = _(
1299
- (x, O) => {
1300
- m(x, O), R();
1295
+ }, [C]), E = _(() => {
1296
+ c(t), m();
1297
+ }, [t, c, m]), N = _(
1298
+ (x, T) => {
1299
+ p(x, T), w();
1301
1300
  },
1302
- [m, R]
1301
+ [p, w]
1303
1302
  );
1304
- return /* @__PURE__ */ S(v, { children: [
1305
- /* @__PURE__ */ E(
1306
- $e,
1303
+ return /* @__PURE__ */ B(v, { children: [
1304
+ /* @__PURE__ */ g(
1305
+ Ye,
1307
1306
  {
1308
- containerClassName: "transition-opacity ml-3 group-hover:opacity-100",
1309
- triggerButton: h ?? /* @__PURE__ */ E(Lt, {}),
1307
+ containerClassName: "invisible ml-3 group-hover:visible",
1308
+ triggerButton: h ?? /* @__PURE__ */ g(Lt, {}),
1310
1309
  options: n,
1311
1310
  openedClassName: "action-menu-opened",
1312
1311
  onOptionSelect: (x) => {
1313
- x === z.DELETE && i(Y.Opened), x === z.SHARE && f(Y.Opened), x === z.RENAME && C(Y.Opened), x === z.EXPORT && s(decodeURI(t.id)).then((O) => {
1314
- bt(O, c).then((k) => {
1315
- Dt(
1316
- `data:application/zip;base64,${k}`,
1312
+ x === k.DELETE && i(Y.Opened), x === k.SHARE && f(Y.Opened), x === k.RENAME && C(Y.Opened), x === k.EXPORT && s(decodeURI(t.id)).then((T) => {
1313
+ dt(T, a).then((z) => {
1314
+ mt(
1315
+ `data:application/zip;base64,${z}`,
1317
1316
  `chat_with_attachments_${(/* @__PURE__ */ new Date()).toLocaleDateString()}.dial`
1318
1317
  );
1319
1318
  });
@@ -1321,41 +1320,41 @@ const Ot = ({
1321
1320
  }
1322
1321
  }
1323
1322
  ),
1324
- o === Y.Opened && /* @__PURE__ */ E(
1325
- Ot,
1323
+ o === Y.Opened && /* @__PURE__ */ g(
1324
+ lt,
1326
1325
  {
1327
1326
  titles: r.titles,
1328
1327
  locale: e,
1329
1328
  disableModalDividers: r.disableModalDividers,
1330
1329
  isSmallButton: r.isSmallModalButton,
1331
- deleteConversation: g,
1332
- onCloseModal: p
1330
+ deleteConversation: E,
1331
+ onCloseModal: m
1333
1332
  }
1334
1333
  ),
1335
- u === Y.Opened && /* @__PURE__ */ E(
1336
- wt,
1334
+ u === Y.Opened && /* @__PURE__ */ g(
1335
+ Tt,
1337
1336
  {
1338
1337
  conversation: t,
1339
1338
  locale: e,
1340
- onCloseModal: A,
1339
+ onCloseModal: I,
1341
1340
  ...l
1342
1341
  }
1343
1342
  ),
1344
- d === Y.Opened && /* @__PURE__ */ E(
1345
- Tt,
1343
+ d === Y.Opened && /* @__PURE__ */ g(
1344
+ Ot,
1346
1345
  {
1347
1346
  conversation: t,
1348
1347
  locale: e,
1349
1348
  titles: r.titles,
1350
- renameCoversation: N,
1351
- onCloseModal: R,
1349
+ renameConversation: N,
1350
+ onCloseModal: w,
1352
1351
  disableModalDividers: r.disableModalDividers,
1353
1352
  isSmallButton: r.isSmallModalButton
1354
1353
  }
1355
1354
  )
1356
1355
  ] });
1357
- }, Lt = () => /* @__PURE__ */ E("div", { className: "cursor-pointer flex items-center justify-center w-[24px]", children: /* @__PURE__ */ E(
1358
- We,
1356
+ }, Lt = () => /* @__PURE__ */ g("div", { className: "cursor-pointer flex items-center justify-center w-[24px]", children: /* @__PURE__ */ g(
1357
+ Xe,
1359
1358
  {
1360
1359
  width: 20,
1361
1360
  height: 20,
@@ -1366,20 +1365,26 @@ const Ot = ({
1366
1365
  conversation: t,
1367
1366
  selectedConversationId: r,
1368
1367
  searchQuery: l,
1369
- onConversationClick: a,
1368
+ onConversationClick: c,
1370
1369
  actions: s,
1371
- locale: c,
1372
- conversationStyles: m,
1370
+ locale: a,
1371
+ conversationStyles: p,
1373
1372
  shareConversationProps: h
1374
1373
  }) => {
1375
- const e = ke(null), n = fe(t == null ? void 0 : t.name);
1374
+ const e = ze(null), n = pe(t == null ? void 0 : t.name);
1376
1375
  return ee(() => {
1377
- var o;
1378
- (t == null ? void 0 : t.id) === r && ((o = e == null ? void 0 : e.current) == null || o.scrollIntoView({
1379
- block: "center",
1380
- behavior: "smooth"
1381
- }));
1382
- }, [t, r]), /* @__PURE__ */ S(
1376
+ var o, i;
1377
+ if ((t == null ? void 0 : t.id) === r && e != null && e.current) {
1378
+ const u = (i = (o = e.current.parentElement) == null ? void 0 : o.parentElement) == null ? void 0 : i.parentElement;
1379
+ if (u) {
1380
+ const f = e.current.getBoundingClientRect(), d = u.getBoundingClientRect(), C = f.height, m = d.height, w = f.top - d.top + u.scrollTop - (m / 2 - C / 2);
1381
+ u.scrollTo({
1382
+ top: w,
1383
+ behavior: "smooth"
1384
+ });
1385
+ }
1386
+ }
1387
+ }, [t, r]), /* @__PURE__ */ B(
1383
1388
  "div",
1384
1389
  {
1385
1390
  ref: e,
@@ -1388,12 +1393,12 @@ const Ot = ({
1388
1393
  "conversation-item",
1389
1394
  r === (t == null ? void 0 : t.id) && "bg-hues-100 conversation-item-active"
1390
1395
  ),
1391
- onClick: () => a(t.folderId, t == null ? void 0 : t.id),
1396
+ onClick: () => c(t.folderId, t == null ? void 0 : t.id),
1392
1397
  title: n,
1393
1398
  children: [
1394
- /* @__PURE__ */ S("div", { className: "flex w-full min-w-0 items-center", children: [
1395
- m.conversationItemIcon ? m.conversationItemIcon : null,
1396
- /* @__PURE__ */ E(
1399
+ /* @__PURE__ */ B("div", { className: "flex flex-1 min-w-0 items-center", children: [
1400
+ p.conversationItemIcon ? p.conversationItemIcon : null,
1401
+ /* @__PURE__ */ g(
1397
1402
  "h3",
1398
1403
  {
1399
1404
  className: J(
@@ -1402,8 +1407,8 @@ const Ot = ({
1402
1407
  r === (t == null ? void 0 : t.id) ? "conversation-item-text-active" : ""
1403
1408
  ),
1404
1409
  title: n,
1405
- children: l != null && l.length ? /* @__PURE__ */ E(
1406
- He,
1410
+ children: l != null && l.length ? /* @__PURE__ */ g(
1411
+ Qe,
1407
1412
  {
1408
1413
  text: n,
1409
1414
  highlightText: l
@@ -1412,11 +1417,11 @@ const Ot = ({
1412
1417
  }
1413
1418
  )
1414
1419
  ] }),
1415
- /* @__PURE__ */ E(
1420
+ /* @__PURE__ */ g(
1416
1421
  xt,
1417
1422
  {
1418
- locale: c,
1419
- conversationStyles: m,
1423
+ locale: a,
1424
+ conversationStyles: p,
1420
1425
  conversation: t,
1421
1426
  onConversationDelete: s.deleteConversation,
1422
1427
  getConversation: s.getConversation,
@@ -1428,28 +1433,28 @@ const Ot = ({
1428
1433
  ]
1429
1434
  }
1430
1435
  );
1431
- }, St = ({
1436
+ }, Bt = ({
1432
1437
  handleConversationClick: t,
1433
1438
  actions: r,
1434
1439
  selectedConversationId: l,
1435
- groupLabel: a,
1440
+ groupLabel: c,
1436
1441
  conversationStyles: s,
1437
- groupedConversations: c,
1438
- shareConversationProps: m,
1442
+ groupedConversations: a,
1443
+ shareConversationProps: p,
1439
1444
  locale: h
1440
1445
  }) => {
1441
1446
  const [e, n] = F(!1), o = _(() => {
1442
1447
  n((i) => !i);
1443
1448
  }, [n]);
1444
- return /* @__PURE__ */ S("div", { children: [
1445
- /* @__PURE__ */ S(
1449
+ return /* @__PURE__ */ B("div", { children: [
1450
+ /* @__PURE__ */ B(
1446
1451
  "div",
1447
1452
  {
1448
1453
  className: "inline-flex gap-1 items-center text-neutrals-700 mb-3 cursor-pointer conversation-group-items-title",
1449
1454
  onClick: o,
1450
1455
  children: [
1451
- /* @__PURE__ */ E(
1452
- Ke,
1456
+ /* @__PURE__ */ g(
1457
+ We,
1453
1458
  {
1454
1459
  className: J(
1455
1460
  "w-3 h-3 conversation-group-items-arrow",
@@ -1457,19 +1462,19 @@ const Ot = ({
1457
1462
  )
1458
1463
  }
1459
1464
  ),
1460
- /* @__PURE__ */ E("span", { className: "body-3 conversation-group-items-title-text", children: ot(a, s == null ? void 0 : s.titles) })
1465
+ /* @__PURE__ */ g("span", { className: "body-3 conversation-group-items-title-text", children: ot(c, s == null ? void 0 : s.titles) })
1461
1466
  ]
1462
1467
  }
1463
1468
  ),
1464
- !e && /* @__PURE__ */ E(
1469
+ !e && /* @__PURE__ */ g(
1465
1470
  "div",
1466
1471
  {
1467
1472
  className: J(
1468
1473
  "flex flex-col gap-y-3",
1469
1474
  "conversation-group-items"
1470
1475
  ),
1471
- children: Me(c).map(
1472
- (i) => /* @__PURE__ */ E(
1476
+ children: Me(a).map(
1477
+ (i) => /* @__PURE__ */ g(
1473
1478
  Fe,
1474
1479
  {
1475
1480
  locale: h,
@@ -1478,53 +1483,54 @@ const Ot = ({
1478
1483
  selectedConversationId: l,
1479
1484
  onConversationClick: t,
1480
1485
  actions: r,
1481
- shareConversationProps: m
1486
+ shareConversationProps: p
1482
1487
  },
1483
1488
  i.id || i.name
1484
1489
  )
1485
1490
  )
1486
1491
  }
1487
1492
  )
1488
- ] }, a);
1489
- }, Bt = ({
1493
+ ] }, c);
1494
+ }, St = ({
1490
1495
  searchQuery: t,
1491
1496
  isExpandedSearch: r,
1492
1497
  titles: l,
1493
- onSearchConversations: a,
1494
- toggleSearchField: s
1495
- }) => /* @__PURE__ */ E(v, { children: r ? /* @__PURE__ */ E(
1496
- we,
1498
+ searchIcon: c,
1499
+ onSearchConversations: s,
1500
+ toggleSearchField: a
1501
+ }) => /* @__PURE__ */ g(v, { children: r ? /* @__PURE__ */ g(
1502
+ Re,
1497
1503
  {
1498
1504
  inputId: "conversations-search",
1499
1505
  placeholder: (l == null ? void 0 : l.searchPlaceholder) ?? "Search",
1500
1506
  containerClasses: "conversation-list-search-input h-[40px] bg-transparent px-4 py-2 rounded-full border-neutrals-400 shadow-none",
1501
1507
  cssClass: "h-auto",
1502
1508
  value: t,
1503
- iconAfterInput: /* @__PURE__ */ E(
1504
- Ye,
1509
+ iconAfterInput: /* @__PURE__ */ g(
1510
+ Ge,
1505
1511
  {
1506
1512
  buttonClassName: "text-button-tertiary items-center p-0 ml-4 border-0 w-5 h-5",
1507
- onClick: s,
1508
- icon: /* @__PURE__ */ E(Ze, {})
1513
+ onClick: a,
1514
+ icon: /* @__PURE__ */ g(Ke, {})
1509
1515
  }
1510
1516
  ),
1511
- onChange: a
1517
+ onChange: s
1512
1518
  }
1513
- ) : /* @__PURE__ */ E(
1519
+ ) : /* @__PURE__ */ g(
1514
1520
  X,
1515
1521
  {
1516
1522
  buttonClassName: "text-button-tertiary p-0 search-button",
1517
- iconBefore: /* @__PURE__ */ E(Je, { className: "w-5 h-5" }),
1518
- onClick: s
1523
+ iconBefore: c || /* @__PURE__ */ g(Ze, { className: "w-5 h-5" }),
1524
+ onClick: a
1519
1525
  }
1520
1526
  ) }), Ft = ({
1521
1527
  conversations: t,
1522
1528
  selectedConversationId: r,
1523
1529
  searchQuery: l,
1524
- conversationStyles: a,
1530
+ conversationStyles: c,
1525
1531
  handleConversationClick: s,
1526
- actions: c,
1527
- locale: m,
1532
+ actions: a,
1533
+ locale: p,
1528
1534
  shareConversationProps: h
1529
1535
  }) => {
1530
1536
  var o;
@@ -1535,38 +1541,38 @@ const Ot = ({
1535
1541
  t == null ? void 0 : t.filter(
1536
1542
  (i) => {
1537
1543
  var u;
1538
- return (u = fe(i == null ? void 0 : i.name)) == null ? void 0 : u.includes(
1544
+ return (u = pe(i == null ? void 0 : i.name)) == null ? void 0 : u.includes(
1539
1545
  l || ""
1540
1546
  );
1541
1547
  }
1542
1548
  )
1543
1549
  )
1544
1550
  );
1545
- }, [t, l]), /* @__PURE__ */ E(v, { children: e != null && e.length ? e.map((i) => /* @__PURE__ */ E(
1551
+ }, [t, l]), /* @__PURE__ */ g(v, { children: e != null && e.length ? e.map((i) => /* @__PURE__ */ g(
1546
1552
  Fe,
1547
1553
  {
1548
- locale: m,
1549
- conversationStyles: a,
1554
+ locale: p,
1555
+ conversationStyles: c,
1550
1556
  conversation: i,
1551
1557
  searchQuery: l,
1552
1558
  selectedConversationId: r,
1553
1559
  onConversationClick: s,
1554
- actions: c,
1560
+ actions: a,
1555
1561
  shareConversationProps: h
1556
1562
  },
1557
1563
  i.id
1558
- )) : /* @__PURE__ */ E("h3", { className: "text-neutrals-800", children: ((o = a == null ? void 0 : a.titles) == null ? void 0 : o.noConversation) ?? "No conversations yet" }) });
1559
- }, Ut = ({ titles: t }) => /* @__PURE__ */ S("div", { className: "p-8 text-center flex flex-col", children: [
1560
- /* @__PURE__ */ E("p", { className: "text-neutrals-800", children: (t == null ? void 0 : t.noConversation) ?? "No conversations yet" }),
1561
- /* @__PURE__ */ E("p", { className: "text-sm text-neutrals-800 mt-2", children: (t == null ? void 0 : t.clickNewChat) ?? 'Click "New Chat" to start a conversation' })
1564
+ )) : /* @__PURE__ */ g("h3", { className: "text-neutrals-800", children: ((o = c == null ? void 0 : c.titles) == null ? void 0 : o.noConversation) ?? "No conversations yet" }) });
1565
+ }, Ut = ({ titles: t }) => /* @__PURE__ */ B("div", { className: "p-8 text-center flex flex-col", children: [
1566
+ /* @__PURE__ */ g("p", { className: "text-neutrals-800", children: (t == null ? void 0 : t.noConversation) ?? "No conversations yet" }),
1567
+ /* @__PURE__ */ g("p", { className: "text-sm text-neutrals-800 mt-2", children: (t == null ? void 0 : t.clickNewChat) ?? 'Click "New Chat" to start a conversation' })
1562
1568
  ] }), Wt = ({
1563
1569
  handleConversationClick: t,
1564
1570
  selectedConversationId: r,
1565
1571
  actions: l,
1566
- children: a,
1572
+ children: c,
1567
1573
  isCollapsed: s,
1568
- conversationStyles: c,
1569
- conversations: m,
1574
+ conversationStyles: a,
1575
+ conversations: p,
1570
1576
  locale: h,
1571
1577
  sharedConversations: e,
1572
1578
  setConversations: n,
@@ -1574,34 +1580,34 @@ const Ot = ({
1574
1580
  shareConversationProps: i,
1575
1581
  handleSelectedConversationRemove: u
1576
1582
  }) => {
1577
- var B;
1578
- const [f, d] = F({}), [C, p] = F(!0), [A, R] = F(""), [g, N] = F(!1), {
1583
+ var S;
1584
+ const [f, d] = F({}), [C, m] = F(!0), [I, w] = F(""), [E, N] = F(!1), {
1579
1585
  getConversations: b,
1580
1586
  getSharedConversations: P,
1581
1587
  deleteConversation: x,
1582
- renameConversation: O
1583
- } = l, k = he(() => !!(A != null && A.length), [A]);
1588
+ renameConversation: T
1589
+ } = l, z = he(() => !!(I != null && I.length), [I]);
1584
1590
  ee(() => {
1585
1591
  d({
1586
1592
  ...ve(e),
1587
- ...rt(m)
1593
+ ...rt(p)
1588
1594
  });
1589
- }, [m, e]), ee(() => {
1595
+ }, [p, e]), ee(() => {
1590
1596
  async function M() {
1591
1597
  try {
1592
- p(!0);
1593
- const I = await b(h), L = await P(
1598
+ m(!0);
1599
+ const A = await b(h), L = await P(
1594
1600
  le(ie.ME)
1595
1601
  );
1596
- n(K(I)), o(
1602
+ n(K(A)), o(
1597
1603
  K(
1598
1604
  ce(L, h)
1599
1605
  )
1600
1606
  );
1601
- } catch (I) {
1602
- console.error("Error loading conversation", I);
1607
+ } catch (A) {
1608
+ console.error("Error loading conversation", A);
1603
1609
  } finally {
1604
- p(!1);
1610
+ m(!1);
1605
1611
  }
1606
1612
  }
1607
1613
  M();
@@ -1616,16 +1622,16 @@ const Ot = ({
1616
1622
  async (M) => {
1617
1623
  try {
1618
1624
  await x(M);
1619
- const I = await b(h), L = await P(
1625
+ const A = await b(h), L = await P(
1620
1626
  le(ie.ME)
1621
1627
  );
1622
- n(K(I)), o(
1628
+ n(K(A)), o(
1623
1629
  K(
1624
1630
  ce(L, h)
1625
1631
  )
1626
1632
  ), r === (M == null ? void 0 : M.id) && u();
1627
- } catch (I) {
1628
- console.error("Error deleting conversation", I);
1633
+ } catch (A) {
1634
+ console.error("Error deleting conversation", A);
1629
1635
  }
1630
1636
  },
1631
1637
  [
@@ -1639,9 +1645,9 @@ const Ot = ({
1639
1645
  u
1640
1646
  ]
1641
1647
  ), D = _(
1642
- async (M, I) => {
1648
+ async (M, A) => {
1643
1649
  try {
1644
- p(!0), await O(M, I);
1650
+ m(!0), await T(M, A);
1645
1651
  const L = await b(h), j = await P(
1646
1652
  le(ie.ME)
1647
1653
  );
@@ -1653,7 +1659,7 @@ const Ot = ({
1653
1659
  } catch (L) {
1654
1660
  console.error("Error renaming conversation", L);
1655
1661
  } finally {
1656
- p(!1);
1662
+ m(!1);
1657
1663
  }
1658
1664
  },
1659
1665
  [
@@ -1662,32 +1668,33 @@ const Ot = ({
1662
1668
  P,
1663
1669
  n,
1664
1670
  o,
1665
- O
1671
+ T
1666
1672
  ]
1667
1673
  ), H = _(
1668
1674
  (M) => {
1669
- R(M);
1675
+ w(M);
1670
1676
  },
1671
- [R]
1677
+ [w]
1672
1678
  ), Q = _(() => {
1673
- N((M) => !M), R("");
1679
+ N((M) => !M), w("");
1674
1680
  }, [N]);
1675
- return C ? /* @__PURE__ */ E(Ce, {}) : /* @__PURE__ */ S(v, { children: [
1676
- !s && /* @__PURE__ */ S(
1681
+ return C ? /* @__PURE__ */ g(Ce, {}) : /* @__PURE__ */ B(v, { children: [
1682
+ !s && /* @__PURE__ */ B(
1677
1683
  "div",
1678
1684
  {
1679
1685
  className: J(
1680
1686
  "flex justify-between items-center",
1681
- g ? " pt-4 pb-0 sm:pt-10" : " pt-6 pb-2 sm:pt-10"
1687
+ E ? " pt-4 pb-0 sm:pt-10" : " pt-6 pb-2 sm:pt-10"
1682
1688
  ),
1683
1689
  children: [
1684
- !g && /* @__PURE__ */ E("h3", { className: "text-neutrals-700 sm:body-2", children: ((B = c == null ? void 0 : c.titles) == null ? void 0 : B.allChats) ?? "All Chats" }),
1685
- /* @__PURE__ */ E(
1686
- Bt,
1690
+ !E && /* @__PURE__ */ g("h3", { className: "text-neutrals-700 sm:body-2", children: ((S = a == null ? void 0 : a.titles) == null ? void 0 : S.allChats) ?? "All Chats" }),
1691
+ /* @__PURE__ */ g(
1692
+ St,
1687
1693
  {
1688
- searchQuery: A,
1689
- titles: c.titles,
1690
- isExpandedSearch: g,
1694
+ searchQuery: I,
1695
+ searchIcon: a.searchIcon,
1696
+ titles: a.titles,
1697
+ isExpandedSearch: E,
1691
1698
  onSearchConversations: H,
1692
1699
  toggleSearchField: Q
1693
1700
  }
@@ -1695,20 +1702,20 @@ const Ot = ({
1695
1702
  ]
1696
1703
  }
1697
1704
  ),
1698
- /* @__PURE__ */ E(
1705
+ /* @__PURE__ */ g(
1699
1706
  "div",
1700
1707
  {
1701
1708
  className: J(
1702
1709
  "overflow-y-auto flex flex-col mt-4 flex-1 min-h-0 pr-2",
1703
- k ? "gap-y-1" : "gap-y-6"
1710
+ z ? "gap-y-1" : "gap-y-6"
1704
1711
  ),
1705
- children: s ? null : /* @__PURE__ */ E(v, { children: (m == null ? void 0 : m.length) === 0 && (e == null ? void 0 : e.length) === 0 ? /* @__PURE__ */ E(Ut, { titles: c.titles }) : k ? /* @__PURE__ */ E(
1712
+ children: s ? null : /* @__PURE__ */ g(v, { children: (p == null ? void 0 : p.length) === 0 && (e == null ? void 0 : e.length) === 0 ? /* @__PURE__ */ g(Ut, { titles: a.titles }) : z ? /* @__PURE__ */ g(
1706
1713
  Ft,
1707
1714
  {
1708
1715
  locale: h,
1709
- conversationStyles: c,
1710
- conversations: [...e, ...m],
1711
- searchQuery: A,
1716
+ conversationStyles: a,
1717
+ conversations: [...e, ...p],
1718
+ searchQuery: I,
1712
1719
  selectedConversationId: r,
1713
1720
  handleConversationClick: t,
1714
1721
  shareConversationProps: i,
@@ -1718,13 +1725,13 @@ const Ot = ({
1718
1725
  }
1719
1726
  }
1720
1727
  ) : Object.entries(f).map(
1721
- ([M, I]) => (I == null ? void 0 : I.length) > 0 && /* @__PURE__ */ E(
1722
- St,
1728
+ ([M, A]) => (A == null ? void 0 : A.length) > 0 && /* @__PURE__ */ g(
1729
+ Bt,
1723
1730
  {
1724
1731
  locale: h,
1725
1732
  groupLabel: M,
1726
- conversationStyles: c,
1727
- groupedConversations: I,
1733
+ conversationStyles: a,
1734
+ groupedConversations: A,
1728
1735
  handleConversationClick: t,
1729
1736
  actions: {
1730
1737
  ...l,
@@ -1739,12 +1746,12 @@ const Ot = ({
1739
1746
  ) })
1740
1747
  }
1741
1748
  ),
1742
- a
1749
+ c
1743
1750
  ] });
1744
1751
  };
1745
1752
  export {
1746
1753
  xt as ActionMenu,
1747
- z as ActionMenuItem,
1754
+ k as ActionMenuItem,
1748
1755
  Wt as ConversationList,
1749
1756
  ve as getSharedConversationsGroup,
1750
1757
  ce as transformSharedConversations