@telia-ace/widget-conversation 1.1.1-rc.2 → 1.1.1-rc.3

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.
@@ -1,141 +1,113 @@
1
- import { jsx as n, jsxs as h, Fragment as B } from "react/jsx-runtime";
2
- import a from "@emotion/styled";
3
- import { css as f, keyframes as fe } from "@emotion/react";
4
- import { u as pe, a as ye, I as ne, B as L, b as y, S as x, c as N, d as oe, e as T, T as q, F as be, i as $e, H as Y, L as re, f as G, g as K, h as j, j as ve, k as J, l as xe, C as k, m as W, W as se, n as we } from "./index-4649598b.mjs";
5
- import { useState as z, useEffect as O, forwardRef as Q, Suspense as ke, useMemo as Ce, useCallback as ae, useRef as Se } from "react";
6
- import "react-dom";
7
- import "react-transition-group";
8
- import { u as ze, a as X } from "./use-dispatch-f89f5e06.mjs";
9
- import "react-router-dom";
10
- const Le = (e, t) => {
11
- const o = ze(), r = pe(), [s, i] = z(void 0), m = ye(), c = e || o.type || "";
12
- return O(() => {
13
- if (c) {
14
- let g;
15
- return (t || r).getAsync("componentResolver").then((p) => {
16
- if (m.current) {
17
- const d = p.getComponent(c);
18
- i(d);
19
- }
20
- g = p.registerResolver(c, (d) => {
21
- m.current && i(d);
22
- });
23
- }), () => {
24
- g && g();
25
- };
26
- }
27
- }, [m, c, t, r]), s;
28
- }, Ie = () => {
29
- const [e, t] = z(!1);
30
- return O(() => {
31
- const o = () => {
32
- t(!1);
33
- }, r = (s) => {
34
- s.keyCode === 9 && t(!0);
35
- };
36
- return window.addEventListener("keydown", r), window.addEventListener("click", o), () => {
37
- window.removeEventListener("keydown", r), window.removeEventListener("click", o);
38
- };
39
- }, []), e;
40
- }, Me = ({ className: e }) => {
41
- const [t, o] = z(""), [r, s] = z(!1), [i, m] = z(0), [c, g] = z(0), p = Ie(), d = X(), {
1
+ import { jsx as n, jsxs as u, Fragment as B } from "react/jsx-runtime";
2
+ import s from "@emotion/styled";
3
+ import { Input as te, Button as z, borderTabStyle as f, SymbolBadge as x, useIsTabbing as fe, useDispatch as V, useProperties as I, useScroll as ne, Typography as q, invertedHoverButton as pe, Html as Y, List as re, buttonCss as G, ItemList as K, itemList as j, useComponent as ye, genericHtml as be, headingElement as J, list as $e, WidgetOverlayOutlet as oe, ConversationContext as ve } from "@telia-ace/widget-ui";
4
+ import { appendClassNames as M } from "@telia-ace/widget-utilities";
5
+ import { css as g, keyframes as xe } from "@emotion/react";
6
+ import { useState as T, useEffect as se, forwardRef as Q, Suspense as we, useMemo as ke, useCallback as ae, useRef as Ce } from "react";
7
+ import { FormComponent as Se } from "@telia-ace/widget-forms";
8
+ import { ConversationMessageListItemType as k, ConversationMessageType as W } from "./index.mjs";
9
+ import "@telia-ace/widget-core";
10
+ import "@telia-ace/widget-services";
11
+ import "@telia-ace/widget-plugins";
12
+ const ze = ({ className: e }) => {
13
+ const [t, r] = T(""), [o, a] = T(!1), [i, h] = T(0), [c, p] = T(0), v = fe(), d = V(), {
42
14
  inputPlaceholder: l = "Type your message",
43
- inputHidden: v = !1,
15
+ inputHidden: $ = !1,
44
16
  inputDisabled: S = !1,
45
- sendButtonLabel: I = "Send message",
17
+ sendButtonLabel: L = "Send message",
46
18
  inputMultiline: w = !0,
47
- secondaryAction: b
48
- } = N(), [de, $] = oe(!0);
49
- O(() => {
50
- if ($.current) {
51
- const { lineHeight: u, maxHeight: H } = getComputedStyle($.current);
52
- if (u && u.indexOf("px") > -1) {
53
- const M = u.split("px"), he = parseInt(M[0], 10);
54
- m(he);
19
+ secondaryAction: y
20
+ } = I(), [de, b] = ne(!0);
21
+ se(() => {
22
+ if (b.current) {
23
+ const { lineHeight: m, maxHeight: H } = getComputedStyle(b.current);
24
+ if (m && m.indexOf("px") > -1) {
25
+ const N = m.split("px"), he = parseInt(N[0], 10);
26
+ h(he);
55
27
  const ge = H.split("px");
56
- g(parseInt(ge[0], 10));
28
+ p(parseInt(ge[0], 10));
57
29
  }
58
30
  }
59
- }, [$.current]);
60
- const E = (u) => {
61
- !u.shiftKey || !w ? (u.preventDefault(), t && t.length > 0 && (d("user-submit", { text: t }), o(""), D(""))) : t.length < 1 && u.preventDefault();
62
- }, me = (u) => {
63
- b && (u.preventDefault(), d("action", {
64
- actionKey: b.action,
65
- ...b
31
+ }, [b.current]);
32
+ const O = (m) => {
33
+ !m.shiftKey || !w ? (m.preventDefault(), t && t.length > 0 && (d("user-submit", { text: t }), r(""), D(""))) : t.length < 1 && m.preventDefault();
34
+ }, me = (m) => {
35
+ y && (m.preventDefault(), d("action", {
36
+ actionKey: y.action,
37
+ ...y
66
38
  }));
67
- }, ue = (u) => {
68
- if (w && $.current) {
69
- const H = $.current.scrollHeight;
39
+ }, ue = (m) => {
40
+ if (w && b.current) {
41
+ const H = b.current.scrollHeight;
70
42
  if (H > i) {
71
- $.current.style.height = "auto";
72
- let M = H;
73
- u.length < 1 && (M = i), $.current.style.height = `${M}px`, M >= c ? $.current.style.overflowY = "scroll" : $.current.style.overflowY = "hidden";
43
+ b.current.style.height = "auto";
44
+ let N = H;
45
+ m.length < 1 && (N = i), b.current.style.height = `${N}px`, N >= c ? b.current.style.overflowY = "scroll" : b.current.style.overflowY = "hidden";
74
46
  }
75
47
  }
76
- }, D = (u) => {
77
- ue(u), o(u), u && u.length > 0 && d("user-typing", { textLength: u.length });
48
+ }, D = (m) => {
49
+ ue(m), r(m), m && m.length > 0 && d("user-typing", { textLength: m.length });
78
50
  };
79
- return v ? null : /* @__PURE__ */ h(
80
- Ae,
51
+ return $ ? null : /* @__PURE__ */ u(
52
+ Me,
81
53
  {
82
54
  grow: w,
83
- className: T("humany-conversation-input", e),
84
- "data-has-focus": r,
55
+ className: M("humany-conversation-input", e),
56
+ "data-has-focus": o,
85
57
  scrollableCss: de,
86
- isTabbing: p,
58
+ isTabbing: v,
87
59
  children: [
88
- b && /* @__PURE__ */ n(
89
- He,
60
+ y && /* @__PURE__ */ n(
61
+ Ie,
90
62
  {
91
63
  disabled: S,
92
64
  onClick: me,
93
- title: b.label,
94
- "aria-label": b.label,
65
+ title: y.label,
66
+ "aria-label": y.label,
95
67
  children: /* @__PURE__ */ n(
96
68
  x,
97
69
  {
98
70
  size: 24,
99
- symbol: { type: "Svg", content: b.icon || "browse" }
71
+ symbol: { type: "Svg", content: y.icon || "browse" }
100
72
  }
101
73
  )
102
74
  }
103
75
  ),
104
76
  w ? /* @__PURE__ */ n(
105
- Ne,
77
+ Le,
106
78
  {
107
79
  value: t,
108
80
  onChange: D,
109
- onEnter: E,
81
+ onEnter: O,
110
82
  disabled: S,
111
83
  "aria-label": l,
112
84
  placeholder: l,
113
- onFocusChange: s,
85
+ onFocusChange: a,
114
86
  type: "textarea",
115
87
  rows: 1,
116
- ref: $
88
+ ref: b
117
89
  }
118
90
  ) : /* @__PURE__ */ n(
119
- Te,
91
+ Ne,
120
92
  {
121
93
  value: t,
122
94
  onChange: D,
123
- onEnter: E,
95
+ onEnter: O,
124
96
  disabled: S,
125
97
  "aria-label": l,
126
98
  placeholder: l,
127
- onFocusChange: s
99
+ onFocusChange: a
128
100
  }
129
101
  ),
130
102
  /* @__PURE__ */ n(
131
103
  ie,
132
104
  {
133
105
  disabled: S,
134
- onClick: E,
135
- title: I,
136
- "aria-label": I,
106
+ onClick: O,
107
+ title: L,
108
+ "aria-label": L,
137
109
  children: /* @__PURE__ */ n(
138
- Re,
110
+ He,
139
111
  {
140
112
  size: 22,
141
113
  symbol: { type: "Svg", content: "send" },
@@ -147,7 +119,7 @@ const Le = (e, t) => {
147
119
  ]
148
120
  }
149
121
  );
150
- }, Ne = a(ne)`
122
+ }, Le = s(te)`
151
123
  resize: none;
152
124
  flex: 1;
153
125
  flex-shrink: 1;
@@ -167,7 +139,7 @@ const Le = (e, t) => {
167
139
  border: none;
168
140
  transition: height 200ms linear;
169
141
  outline: none;
170
- `, Te = a(ne)`
142
+ `, Ne = s(te)`
171
143
  flex: 1;
172
144
  border: none;
173
145
  background-color: transparent;
@@ -193,7 +165,7 @@ const Le = (e, t) => {
193
165
  }};
194
166
  font-style: italic;
195
167
  }
196
- `, ie = a(L)`
168
+ `, ie = s(z)`
197
169
  flex: 0 0 50px;
198
170
  align-self: stretch;
199
171
  background-color: transparent;
@@ -203,19 +175,19 @@ const Le = (e, t) => {
203
175
  border: none;
204
176
  color: #a6a6a6;
205
177
  &:focus-visible {
206
- ${y};
178
+ ${f};
207
179
  }
208
- `, He = a(ie)`
180
+ `, Ie = s(ie)`
209
181
  border-right: ${(e) => e.theme.border};
210
182
  margin: ${(e) => {
211
183
  var t;
212
184
  return (t = e.theme.sizes) == null ? void 0 : t.normal;
213
185
  }} 0;
214
- `, Ae = a.div`
215
- ${(e) => e.grow ? f`
186
+ `, Me = s.div`
187
+ ${(e) => e.grow ? g`
216
188
  min-height: 50px;
217
189
  max-height: 150px;
218
- ` : f`
190
+ ` : g`
219
191
  height: 50px;
220
192
  `}
221
193
  flex: 0 0 auto;
@@ -226,11 +198,11 @@ const Le = (e, t) => {
226
198
  return (t = e.theme.colors) == null ? void 0 : t.accent;
227
199
  }};
228
200
  border-top: ${(e) => e.theme.inputBorder};
229
- ${(e) => e["data-has-focus"] && e.isTabbing && y}
201
+ ${(e) => e["data-has-focus"] && e.isTabbing && f}
230
202
  textarea {
231
203
  ${(e) => !!e.scrollableCss && e.scrollableCss}
232
204
  }
233
- `, Re = a(
205
+ `, He = s(
234
206
  ({
235
207
  hasContent: e,
236
208
  ...t
@@ -247,7 +219,7 @@ const Le = (e, t) => {
247
219
  return e.hasContent ? (t = e.theme.colors) == null ? void 0 : t.primary : "#a6a6a6";
248
220
  }};
249
221
  }
250
- `, Be = a.div`
222
+ `, Te = s.div`
251
223
  width: ${(e) => e.avatarSize || "32px"};
252
224
  height: ${(e) => e.avatarSize || "32px"};
253
225
  border-radius: 50%;
@@ -294,7 +266,7 @@ const Le = (e, t) => {
294
266
  }};
295
267
  }
296
268
  }
297
- `, Ke = fe`
269
+ `, Ae = xe`
298
270
  0% {
299
271
  opacity: 0;
300
272
  }
@@ -304,7 +276,7 @@ const Le = (e, t) => {
304
276
  100% {
305
277
  opacity: 0;
306
278
  }
307
- `, je = a.div`
279
+ `, Re = s.div`
308
280
  display: flex;
309
281
  justify-content: center;
310
282
  > div {
@@ -316,7 +288,7 @@ const Le = (e, t) => {
316
288
  var t;
317
289
  return (t = e.theme.colors) == null ? void 0 : t.text;
318
290
  }};
319
- animation: ${Ke} 1s infinite;
291
+ animation: ${Ae} 1s infinite;
320
292
  }
321
293
  > div:nth-of-type(2) {
322
294
  animation-delay: 100ms;
@@ -324,29 +296,29 @@ const Le = (e, t) => {
324
296
  > div:nth-of-type(3) {
325
297
  animation-delay: 200ms;
326
298
  }
327
- `, U = a.div`
299
+ `, P = s.div`
328
300
  grid-area: content;
329
301
  max-width: 100%;
330
302
  overflow: hidden;
331
- `, Oe = a(q)`
303
+ `, Be = s(q)`
332
304
  font-size: ${(e) => {
333
305
  var t;
334
306
  return (t = e.theme.fonts) == null ? void 0 : t.normal;
335
307
  }};
336
308
  font-weight: normal;
337
309
  margin: 0;
338
- `, _ = a.div`
310
+ `, U = s.div`
339
311
  display: flex;
340
312
  ${(e) => e.left && "justify-content: start;"};
341
313
  ${(e) => e.center && "justify-content: center;"};
342
314
  ${(e) => e.right && "justify-content: end;"};
343
- `, V = a.div`
315
+ `, _ = s.div`
344
316
  ${(e) => {
345
317
  var t;
346
318
  return e.padded && `padding: ${(t = e.theme.sizes) == null ? void 0 : t.medium};`;
347
319
  }}
348
- ${(e) => !e.user && e.stacked && Ee(e.stacked, e.theme)}
349
- ${(e) => e.user && e.stacked && De(e.stacked, e.theme)}
320
+ ${(e) => !e.user && e.stacked && Ke(e.stacked, e.theme)}
321
+ ${(e) => e.user && e.stacked && je(e.stacked, e.theme)}
350
322
 
351
323
  display: inline-block;
352
324
  margin-top: ${(e) => {
@@ -362,15 +334,15 @@ const Le = (e, t) => {
362
334
  }
363
335
  max-width: 100%;
364
336
  ${(e) => e.fullWidth && "width: 100%;"}
365
- `, Ee = (e, t) => {
366
- var r, s;
367
- const o = f`
368
- background-color: ${(r = t.colors) == null ? void 0 : r.accent};
369
- color: ${(s = t.colors) == null ? void 0 : s.text};
337
+ `, Ke = (e, t) => {
338
+ var o, a;
339
+ const r = g`
340
+ background-color: ${(o = t.colors) == null ? void 0 : o.accent};
341
+ color: ${(a = t.colors) == null ? void 0 : a.text};
370
342
  ${t.border && `border: ${t.border};`};
371
343
  `;
372
- return t.borderRadius ? f`
373
- ${o}
344
+ return t.borderRadius ? g`
345
+ ${r}
374
346
 
375
347
  border-top-right-radius: ${t.borderRadius};
376
348
  border-bottom-right-radius: ${t.borderRadius};
@@ -382,15 +354,15 @@ const Le = (e, t) => {
382
354
  ${e === "last" && `
383
355
  border-bottom-left-radius: ${t.borderRadius};
384
356
  `}
385
- ` : o;
386
- }, De = (e, t) => {
387
- var r, s;
388
- const o = f`
389
- background-color: ${(r = t.colors) == null ? void 0 : r.primary};
390
- color: ${(s = t.colors) == null ? void 0 : s.accent};
357
+ ` : r;
358
+ }, je = (e, t) => {
359
+ var o, a;
360
+ const r = g`
361
+ background-color: ${(o = t.colors) == null ? void 0 : o.primary};
362
+ color: ${(a = t.colors) == null ? void 0 : a.accent};
391
363
  `;
392
- return t.borderRadius ? f`
393
- ${o}
364
+ return t.borderRadius ? g`
365
+ ${r}
394
366
 
395
367
  border-top-left-radius: ${t.borderRadius};
396
368
  border-bottom-left-radius: ${t.borderRadius};
@@ -402,8 +374,8 @@ const Le = (e, t) => {
402
374
  ${e === "last" && `
403
375
  border-bottom-right-radius: ${t.borderRadius};
404
376
  `}
405
- ` : o;
406
- }, A = a.div`
377
+ ` : r;
378
+ }, A = s.div`
407
379
  margin-bottom: ${(e) => {
408
380
  var t;
409
381
  return (t = e.theme.sizes) == null ? void 0 : t.normal;
@@ -412,19 +384,19 @@ const Le = (e, t) => {
412
384
  margin-bottom: 0;
413
385
  }
414
386
  `, C = (e) => {
415
- var t, o;
416
- return f`
387
+ var t, r;
388
+ return g`
417
389
  margin: ${(t = e.theme.sizes) == null ? void 0 : t.medium} 0;
418
- padding: 0 ${(o = e.theme.sizes) == null ? void 0 : o.medium};
390
+ padding: 0 ${(r = e.theme.sizes) == null ? void 0 : r.medium};
419
391
  `;
420
- }, We = a(be)`
392
+ }, Oe = s(Se)`
421
393
  & button.humany-form-component-button {
422
394
  ${(e) => {
423
- var t, o, r, s;
424
- return ((t = e.theme.colors) == null ? void 0 : t.primary) && ((o = e.theme.colors) == null ? void 0 : o.accent) && $e({
395
+ var t, r, o, a;
396
+ return ((t = e.theme.colors) == null ? void 0 : t.primary) && ((r = e.theme.colors) == null ? void 0 : r.accent) && pe({
425
397
  active: !1,
426
- primaryColor: (r = e.theme.colors) == null ? void 0 : r.primary,
427
- secondaryColor: (s = e.theme.colors) == null ? void 0 : s.accent,
398
+ primaryColor: (o = e.theme.colors) == null ? void 0 : o.primary,
399
+ secondaryColor: (a = e.theme.colors) == null ? void 0 : a.accent,
428
400
  theme: e.theme
429
401
  });
430
402
  }};
@@ -445,18 +417,18 @@ const Le = (e, t) => {
445
417
  }};
446
418
  }
447
419
  }
448
- `, Fe = a(Y)`
420
+ `, De = s(Y)`
449
421
  white-space: pre-wrap;
450
422
  a {
451
423
  color: ${(e) => e.theme.colors.link};
452
424
  &:focus {
453
425
  ${(e) => {
454
426
  var t;
455
- return ((t = e.theme.accessibility) == null ? void 0 : t.isTabbing) && y;
427
+ return ((t = e.theme.accessibility) == null ? void 0 : t.isTabbing) && f;
456
428
  }};
457
429
  }
458
430
  }
459
- `, Pe = a(re)`
431
+ `, We = s(re)`
460
432
  padding: 0;
461
433
  list-style: none;
462
434
  margin: 0 -${(e) => {
@@ -469,7 +441,7 @@ const Le = (e, t) => {
469
441
  return (t = e.theme.sizes) == null ? void 0 : t.normal;
470
442
  }};
471
443
  }
472
- `, Ue = a.button`
444
+ `, Ee = s.button`
473
445
  ${(e) => G(e)};
474
446
  display: block;
475
447
  background-color: ${(e) => {
@@ -479,16 +451,16 @@ const Le = (e, t) => {
479
451
  width: 100%;
480
452
  color: #fff;
481
453
  &:focus-visible {
482
- ${y}
454
+ ${f}
483
455
  background-color: transparent;
484
456
  }
485
- `, ee = Q(
486
- ({ boxed: e, className: t, agentData: o }, r) => /* @__PURE__ */ n(U, { ref: r, children: /* @__PURE__ */ n(_, { left: e, center: !e, children: /* @__PURE__ */ n(V, { padded: !!e, stacked: e ? "first" : void 0, children: /* @__PURE__ */ h(je, { children: [
457
+ `, Z = Q(
458
+ ({ boxed: e, className: t, agentData: r }, o) => /* @__PURE__ */ n(P, { ref: o, children: /* @__PURE__ */ n(U, { left: e, center: !e, children: /* @__PURE__ */ n(_, { padded: !!e, stacked: e ? "first" : void 0, children: /* @__PURE__ */ u(Re, { children: [
487
459
  /* @__PURE__ */ n("div", {}),
488
460
  /* @__PURE__ */ n("div", {}),
489
461
  /* @__PURE__ */ n("div", {})
490
462
  ] }) }) }) })
491
- ), _e = a.p`
463
+ ), Fe = s.p`
492
464
  && {
493
465
  font-size: ${(e) => {
494
466
  var t;
@@ -503,77 +475,77 @@ const Le = (e, t) => {
503
475
  var t;
504
476
  return (t = e.theme.colors) == null ? void 0 : t.text;
505
477
  }};
506
- `, te = (e) => new Date(e).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }), R = ({ className: e, name: t, timestamp: o }) => {
507
- if (!t && !o)
478
+ `, ee = (e) => new Date(e).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }), R = ({ className: e, name: t, timestamp: r }) => {
479
+ if (!t && !r)
508
480
  return null;
509
- let r = "";
510
- return t ? o ? r = `${t}: ${te(o)}` : r = t : o && (r = te(o)), /* @__PURE__ */ n(_e, { children: r });
481
+ let o = "";
482
+ return t ? r ? o = `${t}: ${ee(r)}` : o = t : r && (o = ee(r)), /* @__PURE__ */ n(Fe, { children: o });
511
483
  }, le = ({
512
484
  className: e,
513
485
  children: t,
514
- sender: o,
515
- timestamp: r
486
+ sender: r,
487
+ timestamp: o
516
488
  }) => {
517
- const { avatar: s, name: i } = o, { avatarSize: m } = N();
518
- return /* @__PURE__ */ h(
519
- Ve,
489
+ const { avatar: a, name: i } = r, { avatarSize: h } = I();
490
+ return /* @__PURE__ */ u(
491
+ Pe,
520
492
  {
521
- hasAvatar: !!s,
522
- className: T(
493
+ hasAvatar: !!a,
494
+ className: M(
523
495
  e,
524
496
  "humany-conversation-agent-message"
525
497
  ),
526
498
  children: [
527
- s && /* @__PURE__ */ n(Be, { avatarSize: m, children: typeof s == "string" ? (
499
+ a && /* @__PURE__ */ n(Te, { avatarSize: h, children: typeof a == "string" ? (
528
500
  // eslint-disable-next-line jsx-a11y/alt-text
529
- /* @__PURE__ */ n("img", { src: s })
530
- ) : /* @__PURE__ */ n(x, { symbol: s }) }),
501
+ /* @__PURE__ */ n("img", { src: a })
502
+ ) : /* @__PURE__ */ n(x, { symbol: a }) }),
531
503
  t,
532
- /* @__PURE__ */ n(R, { name: i, timestamp: r })
504
+ /* @__PURE__ */ n(R, { name: i, timestamp: o })
533
505
  ]
534
506
  }
535
507
  );
536
- }, Ve = a.div`
508
+ }, Pe = s.div`
537
509
  display: grid;
538
510
  margin-right: 10%;
539
511
  width: 90%;
540
- ${(e) => e.hasAvatar ? f`
512
+ ${(e) => e.hasAvatar ? g`
541
513
  grid-template-columns: auto 1fr;
542
514
  grid-template-rows: 1fr auto;
543
515
  grid-template-areas:
544
516
  'avatar content'
545
517
  '. info';
546
- ` : f`
518
+ ` : g`
547
519
  grid-template-columns: 1fr;
548
520
  grid-template-rows: 1fr auto;
549
521
  grid-template-areas:
550
522
  'content'
551
523
  'info';
552
524
  `};
553
- `, qe = Q(
554
- ({ className: e, children: t, timestamp: o, discrete: r, fullWidth: s }, i) => /* @__PURE__ */ n(
555
- Ye,
525
+ `, Ue = Q(
526
+ ({ className: e, children: t, timestamp: r, discrete: o, fullWidth: a }, i) => /* @__PURE__ */ n(
527
+ _e,
556
528
  {
557
529
  ref: i,
558
- className: T(e, "humany-conversation-system-message"),
559
- fullWidth: s,
560
- children: r ? /* @__PURE__ */ h(Ge, { className: "humany-conversation-discrete-message", children: [
530
+ className: M(e, "humany-conversation-system-message"),
531
+ fullWidth: a,
532
+ children: o ? /* @__PURE__ */ u(Ve, { className: "humany-conversation-discrete-message", children: [
561
533
  t,
562
- /* @__PURE__ */ n(R, { timestamp: o })
563
- ] }) : /* @__PURE__ */ h(B, { children: [
534
+ /* @__PURE__ */ n(R, { timestamp: r })
535
+ ] }) : /* @__PURE__ */ u(B, { children: [
564
536
  t,
565
- /* @__PURE__ */ n(R, { timestamp: o })
537
+ /* @__PURE__ */ n(R, { timestamp: r })
566
538
  ] })
567
539
  }
568
540
  )
569
- ), Ye = a.div`
541
+ ), _e = s.div`
570
542
  ${(e) => e.fullWidth && "width: 100%"};
571
543
  padding: 0 ${(e) => {
572
544
  var t;
573
545
  return (t = e.theme.sizes) == null ? void 0 : t.large;
574
546
  }};
575
547
  overflow: auto;
576
- `, Ge = a.div`
548
+ `, Ve = s.div`
577
549
  text-align: center;
578
550
  word-wrap: break-word;
579
551
  font-size: ${(e) => {
@@ -587,49 +559,49 @@ const Le = (e, t) => {
587
559
  > p {
588
560
  margin: 0;
589
561
  }
590
- `, Je = ({ className: e, children: t, timestamp: o }) => {
591
- const { userLabel: r = "" } = N();
592
- return /* @__PURE__ */ h(
593
- Qe,
562
+ `, qe = ({ className: e, children: t, timestamp: r }) => {
563
+ const { userLabel: o = "" } = I();
564
+ return /* @__PURE__ */ u(
565
+ Ye,
594
566
  {
595
- className: T(e, "humany-conversation-user-message"),
567
+ className: M(e, "humany-conversation-user-message"),
596
568
  children: [
597
569
  t,
598
- /* @__PURE__ */ n(R, { name: r, timestamp: o })
570
+ /* @__PURE__ */ n(R, { name: o, timestamp: r })
599
571
  ]
600
572
  }
601
573
  );
602
- }, Qe = a.div`
574
+ }, Ye = s.div`
603
575
  margin-left: 10%;
604
576
  width: 90%;
605
577
  display: flex;
606
578
  flex-direction: column;
607
579
  align-items: flex-end;
608
- `, Z = (e) => Array.isArray(e) ? e : Object.keys(e).map((t) => ({
580
+ `, X = (e) => Array.isArray(e) ? e : Object.keys(e).map((t) => ({
609
581
  label: e[t],
610
582
  actionKey: t
611
- })), Xe = ({ header: e, actions: t, dispatch: o }) => /* @__PURE__ */ n(
612
- Ze,
583
+ })), Ge = ({ header: e, actions: t, dispatch: r }) => /* @__PURE__ */ n(
584
+ Je,
613
585
  {
614
586
  className: "humany-conversation-button-list",
615
587
  header: e,
616
- items: Z(t),
617
- renderItem: (r) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
618
- et,
588
+ items: X(t),
589
+ renderItem: (o) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ u(
590
+ Qe,
619
591
  {
620
592
  onClick: () => {
621
- o("action", r);
593
+ r("action", o);
622
594
  },
623
- "aria-label": r.label,
624
- title: r.label,
595
+ "aria-label": o.label,
596
+ title: o.label,
625
597
  children: [
626
- /* @__PURE__ */ n(x, { symbol: r.symbol }),
627
- r.label
598
+ /* @__PURE__ */ n(x, { symbol: o.symbol }),
599
+ o.label
628
600
  ]
629
601
  }
630
- ) }, r.actionKey)
602
+ ) }, o.actionKey)
631
603
  }
632
- ), Ze = a(K)`
604
+ ), Je = s(K)`
633
605
  ${j}
634
606
  > ul {
635
607
  display: flex;
@@ -643,7 +615,7 @@ const Le = (e, t) => {
643
615
  }
644
616
  }
645
617
  ${C}
646
- `, et = a(L)`
618
+ `, Qe = s(z)`
647
619
  ${G};
648
620
 
649
621
  display: block;
@@ -660,7 +632,7 @@ const Le = (e, t) => {
660
632
  overflow: hidden;
661
633
  text-overflow: ellipsis;
662
634
  &:focus-visible {
663
- ${y}
635
+ ${f}
664
636
  background-color: transparent;
665
637
  }
666
638
 
@@ -671,57 +643,57 @@ const Le = (e, t) => {
671
643
  return (t = e.theme.sizes) == null ? void 0 : t.small;
672
644
  }};
673
645
  }
674
- `, tt = ({ type: e, content: t = {} }) => {
675
- const o = Le(e);
676
- return !o || !e ? null : /* @__PURE__ */ n(ke, { fallback: null, children: /* @__PURE__ */ n(o, { ...t }) });
677
- }, nt = ({ body: e }) => /* @__PURE__ */ n(ot, { html: e }), ot = a(Y)`
678
- ${ve}
646
+ `, Xe = ({ type: e, content: t = {} }) => {
647
+ const r = ye(e);
648
+ return !r || !e ? null : /* @__PURE__ */ n(we, { fallback: null, children: /* @__PURE__ */ n(r, { ...t }) });
649
+ }, Ze = ({ body: e }) => /* @__PURE__ */ n(et, { html: e }), et = s(Y)`
650
+ ${be}
679
651
  color: inherit;
680
652
  white-space: pre-wrap;
681
653
  ${C}
682
654
  a {
683
655
  color: ${(e) => e.theme.colors.link};
684
656
  &:focus-visible {
685
- ${y};
657
+ ${f};
686
658
  }
687
659
  }
688
- `, rt = ({ header: e, actions: t, dispatch: o }) => /* @__PURE__ */ n(
689
- st,
660
+ `, tt = ({ header: e, actions: t, dispatch: r }) => /* @__PURE__ */ n(
661
+ nt,
690
662
  {
691
663
  className: "humany-conversation-item-list",
692
664
  header: e,
693
- items: Z(t),
694
- renderItem: (r) => {
695
- var s;
696
- return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(at, { children: [
697
- ((s = r.symbol) == null ? void 0 : s.content) && /* @__PURE__ */ n("div", { className: "item-icon", children: /* @__PURE__ */ n(
665
+ items: X(t),
666
+ renderItem: (o) => {
667
+ var a;
668
+ return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ u(rt, { children: [
669
+ ((a = o.symbol) == null ? void 0 : a.content) && /* @__PURE__ */ n("div", { className: "item-icon", children: /* @__PURE__ */ n(
698
670
  x,
699
671
  {
700
672
  size: 22,
701
673
  symbol: {
702
- type: r.symbol.type,
703
- content: r.symbol.content
674
+ type: o.symbol.type,
675
+ content: o.symbol.content
704
676
  }
705
677
  }
706
678
  ) }),
707
- /* @__PURE__ */ h("div", { className: "item-body", children: [
679
+ /* @__PURE__ */ u("div", { className: "item-body", children: [
708
680
  /* @__PURE__ */ n(
709
- L,
681
+ z,
710
682
  {
711
683
  onClick: () => {
712
- o("action", r);
684
+ r("action", o);
713
685
  },
714
- "aria-label": r.label,
715
- title: r.label,
716
- children: r.label
686
+ "aria-label": o.label,
687
+ title: o.label,
688
+ children: o.label
717
689
  }
718
690
  ),
719
- r.description && /* @__PURE__ */ n("p", { children: r.description })
691
+ o.description && /* @__PURE__ */ n("p", { children: o.description })
720
692
  ] })
721
- ] }) }, r.actionKey);
693
+ ] }) }, o.actionKey);
722
694
  }
723
695
  }
724
- ), st = a(K)`
696
+ ), nt = s(K)`
725
697
  ${j}
726
698
 
727
699
  > .humany-paragraph {
@@ -735,7 +707,7 @@ const Le = (e, t) => {
735
707
 
736
708
  ${(e) => J(e)(
737
709
  "h1",
738
- f`
710
+ g`
739
711
  white-space: normal;
740
712
  `
741
713
  )}
@@ -759,7 +731,7 @@ const Le = (e, t) => {
759
731
  border-bottom: none;
760
732
  }
761
733
  }
762
- `, at = a.div`
734
+ `, rt = s.div`
763
735
  display: flex;
764
736
  gap: ${(e) => {
765
737
  var t;
@@ -798,7 +770,7 @@ const Le = (e, t) => {
798
770
  margin: 0;
799
771
 
800
772
  &:focus-visible {
801
- ${y}
773
+ ${f}
802
774
  span {
803
775
  color: ${(e) => {
804
776
  var t;
@@ -808,24 +780,24 @@ const Le = (e, t) => {
808
780
  }
809
781
  }
810
782
  }
811
- `, it = ({ header: e, actions: t, dispatch: o }) => /* @__PURE__ */ n(
812
- lt,
783
+ `, ot = ({ header: e, actions: t, dispatch: r }) => /* @__PURE__ */ n(
784
+ st,
813
785
  {
814
786
  className: "humany-conversation-link-list",
815
787
  header: e,
816
- items: Z(t),
817
- renderItem: (r) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
818
- ct,
788
+ items: X(t),
789
+ renderItem: (o) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ u(
790
+ at,
819
791
  {
820
- help: r.actionKey === "help",
792
+ help: o.actionKey === "help",
821
793
  onClick: () => {
822
- o("action", r);
794
+ r("action", o);
823
795
  },
824
- "aria-label": r.label,
825
- title: r.label,
796
+ "aria-label": o.label,
797
+ title: o.label,
826
798
  children: [
827
- r.label,
828
- r.actionKey === "help" && /* @__PURE__ */ n(
799
+ o.label,
800
+ o.actionKey === "help" && /* @__PURE__ */ n(
829
801
  x,
830
802
  {
831
803
  size: 14,
@@ -837,15 +809,15 @@ const Le = (e, t) => {
837
809
  )
838
810
  ]
839
811
  }
840
- ) }, r.actionKey)
812
+ ) }, o.actionKey)
841
813
  }
842
- ), lt = a(K)`
814
+ ), st = s(K)`
843
815
  ${j}
844
816
  ${C}
845
817
 
846
818
  ${(e) => J(e)(
847
819
  "h1",
848
- f`
820
+ g`
849
821
  white-space: normal;
850
822
  `
851
823
  )}
@@ -861,7 +833,7 @@ const Le = (e, t) => {
861
833
  margin: 0;
862
834
  }
863
835
  }
864
- `, ct = a(L)`
836
+ `, at = s(z)`
865
837
  display: block;
866
838
  text-align: left;
867
839
  font-weight: 300;
@@ -874,20 +846,20 @@ const Le = (e, t) => {
874
846
  overflow: hidden;
875
847
 
876
848
  ${(e) => {
877
- var t, o;
878
- return e.help && f`
849
+ var t, r;
850
+ return e.help && g`
879
851
  color: ${(t = e.theme.colors) == null ? void 0 : t.text};
880
852
  text-decoration: underline;
881
853
 
882
854
  i,
883
855
  svg {
884
- margin-left: ${(o = e.theme.sizes) == null ? void 0 : o.small};
856
+ margin-left: ${(r = e.theme.sizes) == null ? void 0 : r.small};
885
857
  }
886
858
  `;
887
859
  }}
888
860
 
889
861
  &:focus-visible {
890
- ${y}
862
+ ${f}
891
863
  span {
892
864
  color: ${(e) => {
893
865
  var t;
@@ -896,18 +868,18 @@ const Le = (e, t) => {
896
868
  text-decoration: underline;
897
869
  }
898
870
  }
899
- `, dt = () => /* @__PURE__ */ n(mt, { className: "humany-conversation-separator" }), mt = a.div`
871
+ `, it = () => /* @__PURE__ */ n(lt, { className: "humany-conversation-separator" }), lt = s.div`
900
872
  ${(e) => e.theme.border && `border-bottom: ${e.theme.border};`}
901
873
  width: 100%;
902
- `, ut = ({ text: e }) => /* @__PURE__ */ n(ht, { className: "humany-conversation-text", variant: "span", children: e }), ht = a(q)`
874
+ `, ct = ({ text: e }) => /* @__PURE__ */ n(dt, { className: "humany-conversation-text", variant: "span", children: e }), dt = s(q)`
903
875
  ${C}
904
- `, gt = ({
876
+ `, mt = ({
905
877
  header: e = "Video call",
906
878
  acceptLabel: t = "Accept",
907
- declineLabel: o = "Decline",
908
- dispatch: r
879
+ declineLabel: r = "Decline",
880
+ dispatch: o
909
881
  }) => {
910
- const s = Ce(() => [
882
+ const a = ke(() => [
911
883
  {
912
884
  label: t,
913
885
  actionKey: "accept-video-call",
@@ -917,38 +889,38 @@ const Le = (e, t) => {
917
889
  }
918
890
  },
919
891
  {
920
- label: o,
892
+ label: r,
921
893
  actionKey: "decline-video-call",
922
894
  symbol: {
923
895
  type: "Svg",
924
896
  content: "close"
925
897
  }
926
898
  }
927
- ], [t, o]);
899
+ ], [t, r]);
928
900
  return /* @__PURE__ */ n(
929
- ft,
901
+ ut,
930
902
  {
931
903
  className: "humany-conversation-video-request",
932
904
  header: e,
933
- items: s,
905
+ items: a,
934
906
  renderItem: (i) => {
935
- const m = i.actionKey === "accept-video-call" ? "#70c48e" : "#da5c85";
907
+ const h = i.actionKey === "accept-video-call" ? "#70c48e" : "#da5c85";
936
908
  return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
937
- pt,
909
+ ht,
938
910
  {
939
911
  onClick: () => {
940
- r("action", i);
912
+ o("action", i);
941
913
  },
942
914
  "aria-label": i.label,
943
915
  title: i.label,
944
- bgColor: m,
916
+ bgColor: h,
945
917
  children: /* @__PURE__ */ n(x, { symbol: i.symbol, size: 25 })
946
918
  }
947
919
  ) }, i.actionKey);
948
920
  }
949
921
  }
950
922
  );
951
- }, ft = a(K)`
923
+ }, ut = s(K)`
952
924
  ${(e) => j(e)}
953
925
  > ul {
954
926
  display: flex;
@@ -962,7 +934,7 @@ const Le = (e, t) => {
962
934
  }
963
935
  }
964
936
  ${(e) => C(e)}
965
- `, pt = a(L)`
937
+ `, ht = s(z)`
966
938
  ${G};
967
939
 
968
940
  background-color: ${(e) => e.bgColor};
@@ -975,7 +947,7 @@ const Le = (e, t) => {
975
947
  border-radius: 100%;
976
948
 
977
949
  &:focus-visible {
978
- ${y}
950
+ ${f}
979
951
  background-color: transparent;
980
952
 
981
953
  i,
@@ -1002,139 +974,139 @@ const Le = (e, t) => {
1002
974
  stroke: #fff;
1003
975
  }
1004
976
  }
1005
- `, yt = ([e, t]) => ({ type: e, content: t }), bt = ({ items: e, dispatch: t }) => /* @__PURE__ */ n(
1006
- $t,
977
+ `, gt = ([e, t]) => ({ type: e, content: t }), ft = ({ items: e, dispatch: t }) => /* @__PURE__ */ n(
978
+ pt,
1007
979
  {
1008
980
  className: "humany-message-list",
1009
- items: e.map(yt),
981
+ items: e.map(gt),
1010
982
  renderLi: !0,
1011
- renderItem: (o) => {
1012
- switch (o.type) {
983
+ renderItem: (r) => {
984
+ switch (r.type) {
1013
985
  case k.Text:
1014
- return /* @__PURE__ */ n(ut, { text: o.content });
986
+ return /* @__PURE__ */ n(ct, { text: r.content });
1015
987
  case k.HTML:
1016
- return /* @__PURE__ */ n(nt, { ...o.content });
988
+ return /* @__PURE__ */ n(Ze, { ...r.content });
1017
989
  case k.Separator:
1018
- return /* @__PURE__ */ n(dt, { ...o.content });
990
+ return /* @__PURE__ */ n(it, { ...r.content });
1019
991
  case k.ItemList:
1020
- return /* @__PURE__ */ n(rt, { ...o.content, dispatch: t });
992
+ return /* @__PURE__ */ n(tt, { ...r.content, dispatch: t });
1021
993
  case k.LinkList:
1022
- return /* @__PURE__ */ n(it, { ...o.content, dispatch: t });
994
+ return /* @__PURE__ */ n(ot, { ...r.content, dispatch: t });
1023
995
  case k.ButtonList:
1024
- return /* @__PURE__ */ n(Xe, { ...o.content, dispatch: t });
996
+ return /* @__PURE__ */ n(Ge, { ...r.content, dispatch: t });
1025
997
  case k.VideoRequest:
1026
- return /* @__PURE__ */ n(gt, { ...o.content, dispatch: t });
998
+ return /* @__PURE__ */ n(mt, { ...r.content, dispatch: t });
1027
999
  default:
1028
- return /* @__PURE__ */ n(tt, { type: o.type, content: o.content });
1000
+ return /* @__PURE__ */ n(Xe, { type: r.type, content: r.content });
1029
1001
  }
1030
1002
  }
1031
1003
  }
1032
- ), $t = a(re)`
1033
- ${xe}
1004
+ ), pt = s(re)`
1005
+ ${$e}
1034
1006
 
1035
1007
  > li {
1036
1008
  margin: 0;
1037
1009
  }
1038
- `, vt = Q(
1039
- ({ className: e, timestamp: t, sender: o, type: r, content: s }, i) => {
1040
- const m = ae(
1010
+ `, yt = Q(
1011
+ ({ className: e, timestamp: t, sender: r, type: o, content: a }, i) => {
1012
+ const h = ae(
1041
1013
  (d) => {
1042
1014
  let l = "first";
1043
- return s.length > 1 && (l = d === 0 ? "first" : d + 1 === s.length ? "last" : "middle"), l;
1015
+ return a.length > 1 && (l = d === 0 ? "first" : d + 1 === a.length ? "last" : "middle"), l;
1044
1016
  },
1045
- [s]
1046
- ), c = () => /* @__PURE__ */ n(B, { children: s.map((d) => {
1047
- const { key: l, body: v, title: S, form: I, actions: w } = d, b = !!v && !S && !I && !w;
1017
+ [a]
1018
+ ), c = () => /* @__PURE__ */ n(B, { children: a.map((d) => {
1019
+ const { key: l, body: $, title: S, form: L, actions: w } = d, y = !!$ && !S && !L && !w;
1048
1020
  return /* @__PURE__ */ n(
1049
- qe,
1021
+ Ue,
1050
1022
  {
1051
1023
  className: e,
1052
- discrete: b,
1024
+ discrete: y,
1053
1025
  ref: i,
1054
1026
  timestamp: t,
1055
- fullWidth: !!I || !!w,
1056
- children: b && v ? /* @__PURE__ */ n(Y, { html: v }) : /* @__PURE__ */ n(F, { isSystem: !0, content: d })
1027
+ fullWidth: !!L || !!w,
1028
+ children: y && $ ? /* @__PURE__ */ n(Y, { html: $ }) : /* @__PURE__ */ n(E, { isSystem: !0, content: d })
1057
1029
  },
1058
1030
  l
1059
1031
  );
1060
- }) }), g = () => /* @__PURE__ */ n(le, { sender: o, timestamp: t, className: e, children: /* @__PURE__ */ n(U, { className: "humany-message-content-bundle", children: s.map((d, l) => /* @__PURE__ */ n(
1061
- _,
1032
+ }) }), p = () => /* @__PURE__ */ n(le, { sender: r, timestamp: t, className: e, children: /* @__PURE__ */ n(P, { className: "humany-message-content-bundle", children: a.map((d, l) => /* @__PURE__ */ n(
1033
+ U,
1062
1034
  {
1063
1035
  className: "humany-message-container",
1064
1036
  left: !0,
1065
1037
  ref: i,
1066
1038
  children: /* @__PURE__ */ n(
1067
- F,
1039
+ E,
1068
1040
  {
1069
1041
  content: d,
1070
- stacked: m(l)
1042
+ stacked: h(l)
1071
1043
  }
1072
1044
  )
1073
1045
  },
1074
1046
  d.key
1075
- )) }) }), p = () => /* @__PURE__ */ n(Je, { timestamp: t, className: e, children: /* @__PURE__ */ n(U, { className: "humany-message-content-bundle", children: s.map((d, l) => /* @__PURE__ */ n(
1076
- _,
1047
+ )) }) }), v = () => /* @__PURE__ */ n(qe, { timestamp: t, className: e, children: /* @__PURE__ */ n(P, { className: "humany-message-content-bundle", children: a.map((d, l) => /* @__PURE__ */ n(
1048
+ U,
1077
1049
  {
1078
1050
  className: "humany-message-container",
1079
1051
  right: !0,
1080
1052
  ref: i,
1081
1053
  children: /* @__PURE__ */ n(
1082
- F,
1054
+ E,
1083
1055
  {
1084
1056
  isUser: !0,
1085
1057
  content: d,
1086
- stacked: m(l)
1058
+ stacked: h(l)
1087
1059
  }
1088
1060
  )
1089
1061
  },
1090
1062
  d.key
1091
1063
  )) }) });
1092
- switch (r) {
1064
+ switch (o) {
1093
1065
  case W.System:
1094
1066
  return c();
1095
1067
  case W.Agent:
1096
- return g();
1097
- case W.User:
1098
1068
  return p();
1069
+ case W.User:
1070
+ return v();
1099
1071
  default:
1100
1072
  return null;
1101
1073
  }
1102
1074
  }
1103
- ), F = ({ content: e, isUser: t, isSystem: o, stacked: r }) => {
1104
- const s = X(), { title: i, body: m, actions: c, form: g, items: p } = e;
1105
- return p ? /* @__PURE__ */ n(V, { className: "humany-message-content", user: !!t, stacked: r, children: /* @__PURE__ */ n(bt, { items: p, dispatch: s }) }) : /* @__PURE__ */ h(
1106
- V,
1075
+ ), E = ({ content: e, isUser: t, isSystem: r, stacked: o }) => {
1076
+ const a = V(), { title: i, body: h, actions: c, form: p, items: v } = e;
1077
+ return v ? /* @__PURE__ */ n(_, { className: "humany-message-content", user: !!t, stacked: o, children: /* @__PURE__ */ n(ft, { items: v, dispatch: a }) }) : /* @__PURE__ */ u(
1078
+ _,
1107
1079
  {
1108
1080
  className: "humany-message-content",
1109
- padded: !o,
1081
+ padded: !r,
1110
1082
  user: !!t,
1111
- stacked: r,
1112
- fullWidth: !!g || !!c,
1083
+ stacked: o,
1084
+ fullWidth: !!p || !!c,
1113
1085
  children: [
1114
- i && /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(Oe, { variant: "h2", children: i }) }),
1115
- m && /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(Fe, { html: m }) }),
1116
- g && /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
1117
- We,
1086
+ i && /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(Be, { variant: "h2", children: i }) }),
1087
+ h && /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(De, { html: h }) }),
1088
+ p && /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
1089
+ Oe,
1118
1090
  {
1119
- ...g,
1120
- onChange: (l, v) => {
1121
- s("form", {
1122
- data: v,
1123
- formKey: g.schema.id,
1091
+ ...p,
1092
+ onChange: (l, $) => {
1093
+ a("form", {
1094
+ data: $,
1095
+ formKey: p.schema.id,
1124
1096
  actionKey: l
1125
1097
  });
1126
1098
  }
1127
1099
  }
1128
1100
  ) }),
1129
1101
  c && /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
1130
- Pe,
1102
+ We,
1131
1103
  {
1132
1104
  items: Object.keys(c).map((l) => ({ label: c[l], actionKey: l })),
1133
1105
  renderItem: (l) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
1134
- Ue,
1106
+ Ee,
1135
1107
  {
1136
1108
  onClick: () => {
1137
- s("action", l.actionKey);
1109
+ a("action", l.actionKey);
1138
1110
  },
1139
1111
  children: l.label
1140
1112
  }
@@ -1152,31 +1124,31 @@ const Le = (e, t) => {
1152
1124
  behavior: "smooth"
1153
1125
  });
1154
1126
  }, 250);
1155
- }, []), [t, o] = oe(!0), {
1156
- messages: r,
1157
- loading: s,
1127
+ }, []), [t, r] = ne(!0), {
1128
+ messages: o,
1129
+ loading: a,
1158
1130
  typingActors: i = []
1159
- } = N(), m = () => i && i.length ? i.map((c, g) => /* @__PURE__ */ n(P, { id: `typing_${c.name}`, children: /* @__PURE__ */ n(le, { timestamp: Date.now(), sender: c, children: /* @__PURE__ */ n(ee, { boxed: !0, ref: e }) }) }, `typing_${c.name}`)) : null;
1160
- return /* @__PURE__ */ h(B, { children: [
1161
- /* @__PURE__ */ h(xt, { tabIndex: 0, scrollableCss: t, ref: o, children: [
1162
- r && r.length ? r.map((c, g) => {
1163
- const { type: p, timestamp: d, sender: l, content: v } = c;
1131
+ } = I(), h = () => i && i.length ? i.map((c, p) => /* @__PURE__ */ n(F, { id: `typing_${c.name}`, children: /* @__PURE__ */ n(le, { timestamp: Date.now(), sender: c, children: /* @__PURE__ */ n(Z, { boxed: !0, ref: e }) }) }, `typing_${c.name}`)) : null;
1132
+ return /* @__PURE__ */ u(B, { children: [
1133
+ /* @__PURE__ */ u(bt, { tabIndex: 0, scrollableCss: t, ref: r, children: [
1134
+ o && o.length ? o.map((c, p) => {
1135
+ const { type: v, timestamp: d, sender: l, content: $ } = c;
1164
1136
  return /* @__PURE__ */ n(
1165
- P,
1137
+ F,
1166
1138
  {
1167
1139
  className: "humany-conversation-entry",
1168
1140
  tabIndex: -1,
1169
- children: /* @__PURE__ */ n(vt, { ...c, ref: e })
1141
+ children: /* @__PURE__ */ n(yt, { ...c, ref: e })
1170
1142
  },
1171
- `${p}_${l == null ? void 0 : l.name}_${d}_${v[0].key}`
1143
+ `${v}_${l == null ? void 0 : l.name}_${d}_${$[0].key}`
1172
1144
  );
1173
1145
  }) : null,
1174
- m(),
1175
- s && /* @__PURE__ */ n(P, { children: /* @__PURE__ */ n(ee, { ref: e }) })
1146
+ h(),
1147
+ a && /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(Z, { ref: e }) })
1176
1148
  ] }),
1177
- /* @__PURE__ */ n(Me, {})
1149
+ /* @__PURE__ */ n(ze, {})
1178
1150
  ] });
1179
- }, xt = a.div`
1151
+ }, bt = s.div`
1180
1152
  display: flex;
1181
1153
  flex-direction: column;
1182
1154
  align-items: stretch;
@@ -1187,9 +1159,9 @@ const Le = (e, t) => {
1187
1159
  }};
1188
1160
  ${(e) => !!e.scrollableCss && e.scrollableCss};
1189
1161
  &:focus-visible {
1190
- ${(e) => y(e)};
1162
+ ${(e) => f(e)};
1191
1163
  }
1192
- `, P = a.div`
1164
+ `, F = s.div`
1193
1165
  margin: 0;
1194
1166
  margin-bottom: ${(e) => {
1195
1167
  var t;
@@ -1223,39 +1195,39 @@ const Le = (e, t) => {
1223
1195
  }
1224
1196
  ${(e) => J(e)(
1225
1197
  "h1",
1226
- f`
1198
+ g`
1227
1199
  font-weight: normal;
1228
1200
  `
1229
1201
  )}
1230
- `, wt = ({ dispatch: e }) => {
1231
- const t = Se(null);
1232
- return O(() => {
1202
+ `, $t = ({ dispatch: e }) => {
1203
+ const t = Ce(null);
1204
+ return se(() => {
1233
1205
  t.current && t.current.parentNode && e("overlay-mounted", t.current);
1234
1206
  }, [t]), /* @__PURE__ */ n(
1235
- se,
1207
+ oe,
1236
1208
  {
1237
1209
  portalId: "humany-conversation-overlay-portal",
1238
1210
  className: "humany-conversation-overlay-outlet",
1239
1211
  ref: t
1240
1212
  }
1241
1213
  );
1242
- }, kt = ({
1214
+ }, vt = ({
1243
1215
  dispatch: e,
1244
1216
  header: t,
1245
- buttonLabel: o
1246
- }) => /* @__PURE__ */ h(
1247
- Ct,
1217
+ buttonLabel: r
1218
+ }) => /* @__PURE__ */ u(
1219
+ xt,
1248
1220
  {
1249
1221
  portalId: "humany-conversation-portal",
1250
1222
  className: "humany-conversation-outlet",
1251
1223
  children: [
1252
- /* @__PURE__ */ h(St, { className: "humany-conversation-outlet-head", children: [
1224
+ /* @__PURE__ */ u(wt, { className: "humany-conversation-outlet-head", children: [
1253
1225
  /* @__PURE__ */ n(
1254
- Lt,
1226
+ Ct,
1255
1227
  {
1256
1228
  className: "humany-conversation-outlet-head-button",
1257
- "aria-label": o,
1258
- title: o,
1229
+ "aria-label": r,
1230
+ title: r,
1259
1231
  onClick: () => e("hide-overlay-conversation"),
1260
1232
  children: /* @__PURE__ */ n(
1261
1233
  x,
@@ -1270,7 +1242,7 @@ const Le = (e, t) => {
1270
1242
  }
1271
1243
  ),
1272
1244
  t && /* @__PURE__ */ n(
1273
- zt,
1245
+ kt,
1274
1246
  {
1275
1247
  className: "humany-conversation-outlet-header",
1276
1248
  variant: "h1",
@@ -1281,7 +1253,7 @@ const Le = (e, t) => {
1281
1253
  /* @__PURE__ */ n(ce, {})
1282
1254
  ]
1283
1255
  }
1284
- ), Ct = a(se)`
1256
+ ), xt = s(oe)`
1285
1257
  z-index: 11;
1286
1258
  top: auto;
1287
1259
  height: 65%;
@@ -1296,7 +1268,7 @@ const Le = (e, t) => {
1296
1268
  var t;
1297
1269
  return (t = e.theme.sizes) == null ? void 0 : t.large;
1298
1270
  }};
1299
- `, St = a.div`
1271
+ `, wt = s.div`
1300
1272
  display: flex;
1301
1273
  flex-direction: column;
1302
1274
  justify-content: center;
@@ -1310,7 +1282,7 @@ const Le = (e, t) => {
1310
1282
  return (t = e.theme.sizes) == null ? void 0 : t.normal;
1311
1283
  }};
1312
1284
  ${(e) => e.theme.border && `border-bottom: ${e.theme.border};`}
1313
- `, zt = a(q)`
1285
+ `, kt = s(q)`
1314
1286
  font-size: ${(e) => {
1315
1287
  var t;
1316
1288
  return (t = e.theme.fonts) == null ? void 0 : t.medium;
@@ -1320,7 +1292,7 @@ const Le = (e, t) => {
1320
1292
  return (t = e.theme.colors) == null ? void 0 : t.text;
1321
1293
  }};
1322
1294
  margin: 0;
1323
- `, Lt = a(L)`
1295
+ `, Ct = s(z)`
1324
1296
  display: flex;
1325
1297
  align-items: center;
1326
1298
  justify-content: center;
@@ -1334,7 +1306,7 @@ const Le = (e, t) => {
1334
1306
  ${(e) => e.theme.borderRadius && `border-radius: ${e.theme.borderRadius};`}
1335
1307
 
1336
1308
  &:focus-visible {
1337
- ${y};
1309
+ ${f};
1338
1310
  }
1339
1311
 
1340
1312
  svg line {
@@ -1343,41 +1315,41 @@ const Le = (e, t) => {
1343
1315
  return (t = e.theme.colors) == null ? void 0 : t.text;
1344
1316
  }};
1345
1317
  }
1346
- `, Ot = ({ className: e, ...t }) => {
1318
+ `, jt = ({ className: e, ...t }) => {
1347
1319
  const {
1348
- overlay: o,
1349
- overlayConversationHeader: r,
1350
- overlayConversationCloseLabel: s,
1320
+ overlay: r,
1321
+ overlayConversationHeader: o,
1322
+ overlayConversationCloseLabel: a,
1351
1323
  conversationControllerId: i
1352
- } = N(), m = X();
1353
- return /* @__PURE__ */ h(
1354
- we.Provider,
1324
+ } = I(), h = V();
1325
+ return /* @__PURE__ */ u(
1326
+ ve.Provider,
1355
1327
  {
1356
1328
  value: i ? { id: i } : null,
1357
1329
  children: [
1358
1330
  /* @__PURE__ */ n(
1359
- It,
1331
+ St,
1360
1332
  {
1361
1333
  ...t,
1362
- className: T(e, "humany-conversation-component"),
1334
+ className: M(e, "humany-conversation-component"),
1363
1335
  children: /* @__PURE__ */ n(ce, {})
1364
1336
  }
1365
1337
  ),
1366
- o && /* @__PURE__ */ h(B, { children: [
1367
- /* @__PURE__ */ n(wt, { dispatch: m }),
1368
- o.conversation && /* @__PURE__ */ n(
1369
- kt,
1338
+ r && /* @__PURE__ */ u(B, { children: [
1339
+ /* @__PURE__ */ n($t, { dispatch: h }),
1340
+ r.conversation && /* @__PURE__ */ n(
1341
+ vt,
1370
1342
  {
1371
- dispatch: m,
1372
- header: r,
1373
- buttonLabel: s
1343
+ dispatch: h,
1344
+ header: o,
1345
+ buttonLabel: a
1374
1346
  }
1375
1347
  )
1376
1348
  ] })
1377
1349
  ]
1378
1350
  }
1379
1351
  );
1380
- }, It = a.div`
1352
+ }, St = s.div`
1381
1353
  position: absolute;
1382
1354
  right: 0;
1383
1355
  left: 0;
@@ -1388,5 +1360,5 @@ const Le = (e, t) => {
1388
1360
  flex-direction: column;
1389
1361
  `;
1390
1362
  export {
1391
- Ot as default
1363
+ jt as default
1392
1364
  };