@telia-ace/widget-conversation 1.1.5 → 1.1.6
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/agent.d.ts +3 -0
- package/{conversation-8fab4c79.mjs → conversation-8295aeca.mjs} +429 -422
- package/{conversation-56aaee96.js → conversation-a202d402.js} +76 -76
- package/conversation-controller.d.ts +2 -1
- package/index.js +3 -3
- package/index.mjs +241 -224
- package/package.json +8 -8
- package/user.d.ts +3 -0
|
@@ -1,110 +1,114 @@
|
|
|
1
|
-
import { jsx as n, jsxs as u, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { Input as
|
|
4
|
-
import { appendClassNames as
|
|
5
|
-
import { css as b, keyframes as
|
|
6
|
-
import
|
|
7
|
-
import { FormComponent as
|
|
8
|
-
import { ConversationMessageListItemType as w, ConversationMessageType as
|
|
1
|
+
import { jsx as n, jsxs as u, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import i from "@emotion/styled";
|
|
3
|
+
import { Input as oe, borderTabStyle as f, Button as I, SymbolBadge as k, useIsTabbing as se, useDispatch as Y, useProperties as C, useScroll as ae, useContainer as T, Typography as X, invertedHoverButton as $e, Html as G, List as ie, buttonCss as B, ItemList as K, itemList as E, Link as ve, useComponent as xe, genericHtml as ke, headingElement as J, usePrevious as we, list as Ce, WidgetOverlayOutlet as le, ConversationContext as Se } from "@telia-ace/widget-ui";
|
|
4
|
+
import { appendClassNames as A, htmlParentContains as ze } from "@telia-ace/widget-utilities";
|
|
5
|
+
import { css as b, keyframes as Le } from "@emotion/react";
|
|
6
|
+
import Ne, { useState as P, useEffect as Q, forwardRef as Z, useContext as Me, Suspense as Ie, useRef as ce, useMemo as He, useCallback as de } from "react";
|
|
7
|
+
import { FormComponent as Te } from "@telia-ace/widget-forms";
|
|
8
|
+
import { ConversationMessageListItemType as w, ConversationMessageType as W } from "./index.mjs";
|
|
9
9
|
import "@telia-ace/widget-core";
|
|
10
10
|
import "@telia-ace/widget-services";
|
|
11
11
|
import "@telia-ace/widget-plugins";
|
|
12
|
-
const
|
|
13
|
-
const [e,
|
|
14
|
-
inputPlaceholder:
|
|
15
|
-
inputHidden:
|
|
12
|
+
const Ae = ({ className: t }) => {
|
|
13
|
+
const [e, r] = P(""), [o, s] = P(0), [a, m] = P(0), d = se(), c = Y(), {
|
|
14
|
+
inputPlaceholder: p = "Type your message",
|
|
15
|
+
inputHidden: x = !1,
|
|
16
16
|
inputDisabled: l = !1,
|
|
17
17
|
sendButtonLabel: h = "Send message",
|
|
18
|
-
inputMultiline:
|
|
19
|
-
secondaryAction:
|
|
20
|
-
} = C(), [
|
|
21
|
-
|
|
18
|
+
inputMultiline: v = !0,
|
|
19
|
+
secondaryAction: $
|
|
20
|
+
} = C(), [z, y] = ae(!0), O = T();
|
|
21
|
+
Q(() => {
|
|
22
22
|
if (y.current) {
|
|
23
|
-
const { lineHeight: g, maxHeight:
|
|
23
|
+
const { lineHeight: g, maxHeight: L } = getComputedStyle(y.current);
|
|
24
24
|
if (g && g.indexOf("px") > -1) {
|
|
25
|
-
const
|
|
26
|
-
s(
|
|
27
|
-
const
|
|
28
|
-
|
|
25
|
+
const H = g.split("px"), ye = parseInt(H[0], 10);
|
|
26
|
+
s(ye);
|
|
27
|
+
const be = L.split("px");
|
|
28
|
+
m(parseInt(be[0], 10));
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}, [y.current]);
|
|
32
|
-
const
|
|
33
|
-
!g.shiftKey ||
|
|
34
|
-
}, ge = (g) => {
|
|
35
|
-
v && (g.preventDefault(), m("action", {
|
|
36
|
-
actionKey: v.action,
|
|
37
|
-
...v
|
|
38
|
-
}));
|
|
32
|
+
const D = (g) => {
|
|
33
|
+
!g.shiftKey || !v ? (g.preventDefault(), e && e.length > 0 && (c("user-submit", { text: e }), r(""), j(""))) : e.length < 1 && g.preventDefault();
|
|
39
34
|
}, fe = (g) => {
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
if (!$)
|
|
36
|
+
return;
|
|
37
|
+
g.preventDefault(), c("action", {
|
|
38
|
+
actionKey: $.action,
|
|
39
|
+
...$
|
|
40
|
+
});
|
|
41
|
+
const { events: L } = O.get("$widget");
|
|
42
|
+
L.dispatch("tracking:secondary-clicked", {});
|
|
43
|
+
}, pe = (g) => {
|
|
44
|
+
if (v && y.current) {
|
|
45
|
+
const L = y.current.scrollHeight;
|
|
46
|
+
if (L > o) {
|
|
43
47
|
y.current.style.height = "auto";
|
|
44
|
-
let
|
|
45
|
-
g.length < 1 && (
|
|
48
|
+
let H = L;
|
|
49
|
+
g.length < 1 && (H = o), y.current.style.height = `${H}px`, H >= a ? y.current.style.overflowY = "scroll" : y.current.style.overflowY = "hidden";
|
|
46
50
|
}
|
|
47
51
|
}
|
|
48
|
-
},
|
|
49
|
-
|
|
52
|
+
}, j = (g) => {
|
|
53
|
+
pe(g), r(g), g && g.length > 0 && c("user-typing", { textLength: g.length });
|
|
50
54
|
};
|
|
51
|
-
return
|
|
52
|
-
|
|
55
|
+
return x ? null : /* @__PURE__ */ u(
|
|
56
|
+
Ke,
|
|
53
57
|
{
|
|
54
|
-
grow:
|
|
55
|
-
className:
|
|
56
|
-
scrollableCss:
|
|
58
|
+
grow: v,
|
|
59
|
+
className: A("humany-conversation-input", t),
|
|
60
|
+
scrollableCss: z,
|
|
57
61
|
isTabbing: d,
|
|
58
62
|
children: [
|
|
59
|
-
|
|
60
|
-
|
|
63
|
+
$ && /* @__PURE__ */ n(
|
|
64
|
+
Be,
|
|
61
65
|
{
|
|
62
66
|
disabled: l,
|
|
63
|
-
onClick:
|
|
64
|
-
title:
|
|
65
|
-
"aria-label":
|
|
67
|
+
onClick: fe,
|
|
68
|
+
title: $.label,
|
|
69
|
+
"aria-label": $.label,
|
|
66
70
|
children: /* @__PURE__ */ n(
|
|
67
|
-
|
|
71
|
+
k,
|
|
68
72
|
{
|
|
69
73
|
size: 24,
|
|
70
|
-
symbol: { type: "Svg", content:
|
|
74
|
+
symbol: { type: "Svg", content: $.icon || "browse" }
|
|
71
75
|
}
|
|
72
76
|
)
|
|
73
77
|
}
|
|
74
78
|
),
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
v ? /* @__PURE__ */ n(
|
|
80
|
+
Oe,
|
|
77
81
|
{
|
|
78
82
|
value: e,
|
|
79
|
-
onChange:
|
|
80
|
-
onEnter:
|
|
83
|
+
onChange: j,
|
|
84
|
+
onEnter: D,
|
|
81
85
|
disabled: l,
|
|
82
|
-
"aria-label":
|
|
83
|
-
placeholder:
|
|
86
|
+
"aria-label": p,
|
|
87
|
+
placeholder: p,
|
|
84
88
|
type: "textarea",
|
|
85
89
|
rows: 1,
|
|
86
90
|
ref: y
|
|
87
91
|
}
|
|
88
92
|
) : /* @__PURE__ */ n(
|
|
89
|
-
|
|
93
|
+
Re,
|
|
90
94
|
{
|
|
91
95
|
value: e,
|
|
92
|
-
onChange:
|
|
93
|
-
onEnter:
|
|
96
|
+
onChange: j,
|
|
97
|
+
onEnter: D,
|
|
94
98
|
disabled: l,
|
|
95
|
-
"aria-label":
|
|
96
|
-
placeholder:
|
|
99
|
+
"aria-label": p,
|
|
100
|
+
placeholder: p
|
|
97
101
|
}
|
|
98
102
|
),
|
|
99
103
|
/* @__PURE__ */ n(
|
|
100
|
-
|
|
104
|
+
me,
|
|
101
105
|
{
|
|
102
106
|
disabled: !1,
|
|
103
|
-
onClick:
|
|
107
|
+
onClick: D,
|
|
104
108
|
title: h,
|
|
105
109
|
"aria-label": h,
|
|
106
110
|
children: /* @__PURE__ */ n(
|
|
107
|
-
|
|
111
|
+
Ee,
|
|
108
112
|
{
|
|
109
113
|
size: 22,
|
|
110
114
|
symbol: { type: "Svg", content: "send" },
|
|
@@ -116,7 +120,7 @@ const Te = ({ className: t }) => {
|
|
|
116
120
|
]
|
|
117
121
|
}
|
|
118
122
|
);
|
|
119
|
-
},
|
|
123
|
+
}, Oe = i(oe)`
|
|
120
124
|
resize: none;
|
|
121
125
|
flex: 1;
|
|
122
126
|
flex-shrink: 1;
|
|
@@ -137,10 +141,10 @@ const Te = ({ className: t }) => {
|
|
|
137
141
|
transition: height 200ms linear;
|
|
138
142
|
outline: none;
|
|
139
143
|
&:focus-visible {
|
|
140
|
-
${
|
|
144
|
+
${f};
|
|
141
145
|
outline-offset: 12px;
|
|
142
146
|
}
|
|
143
|
-
`,
|
|
147
|
+
`, Re = i(oe)`
|
|
144
148
|
flex: 1;
|
|
145
149
|
border: none;
|
|
146
150
|
background-color: transparent;
|
|
@@ -166,7 +170,7 @@ const Te = ({ className: t }) => {
|
|
|
166
170
|
}};
|
|
167
171
|
font-style: italic;
|
|
168
172
|
}
|
|
169
|
-
`,
|
|
173
|
+
`, me = i(I)`
|
|
170
174
|
flex: 0 0 50px;
|
|
171
175
|
align-self: stretch;
|
|
172
176
|
background-color: transparent;
|
|
@@ -176,15 +180,15 @@ const Te = ({ className: t }) => {
|
|
|
176
180
|
border: none;
|
|
177
181
|
color: #a6a6a6;
|
|
178
182
|
&:focus-visible {
|
|
179
|
-
${
|
|
183
|
+
${f};
|
|
180
184
|
}
|
|
181
|
-
`,
|
|
185
|
+
`, Be = i(me)`
|
|
182
186
|
border-right: ${(t) => t.theme.border};
|
|
183
187
|
margin: ${(t) => {
|
|
184
188
|
var e;
|
|
185
189
|
return (e = t.theme.sizes) == null ? void 0 : e.normal;
|
|
186
190
|
}} 0;
|
|
187
|
-
`,
|
|
191
|
+
`, Ke = i.div`
|
|
188
192
|
${(t) => t.grow ? b`
|
|
189
193
|
min-height: 50px;
|
|
190
194
|
max-height: 150px;
|
|
@@ -199,15 +203,15 @@ const Te = ({ className: t }) => {
|
|
|
199
203
|
return (e = t.theme.colors) == null ? void 0 : e.accent;
|
|
200
204
|
}};
|
|
201
205
|
border-top: ${(t) => t.theme.inputBorder};
|
|
202
|
-
${(t) => t["data-has-focus"] && t.isTabbing &&
|
|
206
|
+
${(t) => t["data-has-focus"] && t.isTabbing && f}
|
|
203
207
|
textarea {
|
|
204
208
|
${(t) => !!t.scrollableCss && t.scrollableCss}
|
|
205
209
|
}
|
|
206
|
-
`,
|
|
210
|
+
`, Ee = i(
|
|
207
211
|
({
|
|
208
212
|
hasContent: t,
|
|
209
213
|
...e
|
|
210
|
-
}) => /* @__PURE__ */ n(
|
|
214
|
+
}) => /* @__PURE__ */ n(k, { ...e })
|
|
211
215
|
)`
|
|
212
216
|
line,
|
|
213
217
|
path {
|
|
@@ -220,7 +224,7 @@ const Te = ({ className: t }) => {
|
|
|
220
224
|
return t.hasContent ? (e = t.theme.colors) == null ? void 0 : e.primary : "#a6a6a6";
|
|
221
225
|
}};
|
|
222
226
|
}
|
|
223
|
-
`,
|
|
227
|
+
`, De = i.div`
|
|
224
228
|
width: ${(t) => t.avatarSize || "32px"};
|
|
225
229
|
height: ${(t) => t.avatarSize || "32px"};
|
|
226
230
|
border-radius: 50%;
|
|
@@ -267,7 +271,7 @@ const Te = ({ className: t }) => {
|
|
|
267
271
|
}};
|
|
268
272
|
}
|
|
269
273
|
}
|
|
270
|
-
`,
|
|
274
|
+
`, je = Le`
|
|
271
275
|
0% {
|
|
272
276
|
opacity: 0;
|
|
273
277
|
}
|
|
@@ -277,7 +281,7 @@ const Te = ({ className: t }) => {
|
|
|
277
281
|
100% {
|
|
278
282
|
opacity: 0;
|
|
279
283
|
}
|
|
280
|
-
`,
|
|
284
|
+
`, Pe = i.div`
|
|
281
285
|
display: flex;
|
|
282
286
|
justify-content: center;
|
|
283
287
|
> div {
|
|
@@ -289,7 +293,7 @@ const Te = ({ className: t }) => {
|
|
|
289
293
|
var e;
|
|
290
294
|
return (e = t.theme.colors) == null ? void 0 : e.text;
|
|
291
295
|
}};
|
|
292
|
-
animation: ${
|
|
296
|
+
animation: ${je} 1s infinite;
|
|
293
297
|
}
|
|
294
298
|
> div:nth-of-type(2) {
|
|
295
299
|
animation-delay: 100ms;
|
|
@@ -297,29 +301,29 @@ const Te = ({ className: t }) => {
|
|
|
297
301
|
> div:nth-of-type(3) {
|
|
298
302
|
animation-delay: 200ms;
|
|
299
303
|
}
|
|
300
|
-
`,
|
|
304
|
+
`, V = i.div`
|
|
301
305
|
grid-area: content;
|
|
302
306
|
max-width: 100%;
|
|
303
307
|
overflow: hidden;
|
|
304
|
-
`,
|
|
308
|
+
`, We = i(X)`
|
|
305
309
|
font-size: ${(t) => {
|
|
306
310
|
var e;
|
|
307
311
|
return (e = t.theme.fonts) == null ? void 0 : e.normal;
|
|
308
312
|
}};
|
|
309
313
|
font-weight: normal;
|
|
310
314
|
margin: 0;
|
|
311
|
-
`,
|
|
315
|
+
`, _ = i.div`
|
|
312
316
|
display: flex;
|
|
313
317
|
${(t) => t.left && "justify-content: start;"};
|
|
314
318
|
${(t) => t.center && "justify-content: center;"};
|
|
315
319
|
${(t) => t.right && "justify-content: end;"};
|
|
316
|
-
`,
|
|
320
|
+
`, F = i.div`
|
|
317
321
|
${(t) => {
|
|
318
322
|
var e;
|
|
319
323
|
return t.padded && `padding: ${(e = t.theme.sizes) == null ? void 0 : e.medium};`;
|
|
320
324
|
}}
|
|
321
|
-
${(t) => !t.user && t.stacked &&
|
|
322
|
-
${(t) => t.user && t.stacked &&
|
|
325
|
+
${(t) => !t.user && t.stacked && qe(t.stacked, t.theme)}
|
|
326
|
+
${(t) => t.user && t.stacked && Ue(t.stacked, t.theme)}
|
|
323
327
|
|
|
324
328
|
display: inline-block;
|
|
325
329
|
margin-top: ${(t) => {
|
|
@@ -335,15 +339,15 @@ const Te = ({ className: t }) => {
|
|
|
335
339
|
}
|
|
336
340
|
max-width: 100%;
|
|
337
341
|
${(t) => t.fullWidth && "width: 100%;"}
|
|
338
|
-
`,
|
|
339
|
-
var
|
|
340
|
-
const
|
|
341
|
-
background-color: ${(
|
|
342
|
+
`, qe = (t, e) => {
|
|
343
|
+
var o, s;
|
|
344
|
+
const r = b`
|
|
345
|
+
background-color: ${(o = e.colors) == null ? void 0 : o.accent};
|
|
342
346
|
color: ${(s = e.colors) == null ? void 0 : s.text};
|
|
343
347
|
${e.border && `border: ${e.border};`};
|
|
344
348
|
`;
|
|
345
349
|
return e.borderRadius ? b`
|
|
346
|
-
${
|
|
350
|
+
${r}
|
|
347
351
|
|
|
348
352
|
border-top-right-radius: ${e.borderRadius};
|
|
349
353
|
border-bottom-right-radius: ${e.borderRadius};
|
|
@@ -355,15 +359,15 @@ const Te = ({ className: t }) => {
|
|
|
355
359
|
${t === "last" && `
|
|
356
360
|
border-bottom-left-radius: ${e.borderRadius};
|
|
357
361
|
`}
|
|
358
|
-
` :
|
|
359
|
-
},
|
|
360
|
-
var
|
|
361
|
-
const
|
|
362
|
-
background-color: ${(
|
|
362
|
+
` : r;
|
|
363
|
+
}, Ue = (t, e) => {
|
|
364
|
+
var o, s;
|
|
365
|
+
const r = b`
|
|
366
|
+
background-color: ${(o = e.colors) == null ? void 0 : o.primary};
|
|
363
367
|
color: ${(s = e.colors) == null ? void 0 : s.accent};
|
|
364
368
|
`;
|
|
365
369
|
return e.borderRadius ? b`
|
|
366
|
-
${
|
|
370
|
+
${r}
|
|
367
371
|
|
|
368
372
|
border-top-left-radius: ${e.borderRadius};
|
|
369
373
|
border-bottom-left-radius: ${e.borderRadius};
|
|
@@ -375,8 +379,8 @@ const Te = ({ className: t }) => {
|
|
|
375
379
|
${t === "last" && `
|
|
376
380
|
border-bottom-right-radius: ${e.borderRadius};
|
|
377
381
|
`}
|
|
378
|
-
` :
|
|
379
|
-
},
|
|
382
|
+
` : r;
|
|
383
|
+
}, R = i.div`
|
|
380
384
|
margin-bottom: ${(t) => {
|
|
381
385
|
var e;
|
|
382
386
|
return (e = t.theme.sizes) == null ? void 0 : e.normal;
|
|
@@ -385,18 +389,18 @@ const Te = ({ className: t }) => {
|
|
|
385
389
|
margin-bottom: 0;
|
|
386
390
|
}
|
|
387
391
|
`, S = (t) => {
|
|
388
|
-
var e,
|
|
392
|
+
var e, r;
|
|
389
393
|
return b`
|
|
390
394
|
margin: ${(e = t.theme.sizes) == null ? void 0 : e.medium} 0;
|
|
391
|
-
padding: 0 ${(
|
|
395
|
+
padding: 0 ${(r = t.theme.sizes) == null ? void 0 : r.medium};
|
|
392
396
|
`;
|
|
393
|
-
},
|
|
397
|
+
}, Ve = i(Te)`
|
|
394
398
|
& button.humany-form-component-button {
|
|
395
399
|
${(t) => {
|
|
396
|
-
var e,
|
|
397
|
-
return ((e = t.theme.colors) == null ? void 0 : e.primary) && ((
|
|
400
|
+
var e, r, o, s;
|
|
401
|
+
return ((e = t.theme.colors) == null ? void 0 : e.primary) && ((r = t.theme.colors) == null ? void 0 : r.accent) && $e({
|
|
398
402
|
active: !1,
|
|
399
|
-
primaryColor: (
|
|
403
|
+
primaryColor: (o = t.theme.colors) == null ? void 0 : o.primary,
|
|
400
404
|
secondaryColor: (s = t.theme.colors) == null ? void 0 : s.accent,
|
|
401
405
|
theme: t.theme
|
|
402
406
|
});
|
|
@@ -418,18 +422,18 @@ const Te = ({ className: t }) => {
|
|
|
418
422
|
}};
|
|
419
423
|
}
|
|
420
424
|
}
|
|
421
|
-
`,
|
|
425
|
+
`, _e = i(G)`
|
|
422
426
|
white-space: pre-wrap;
|
|
423
427
|
a {
|
|
424
428
|
color: ${(t) => t.theme.colors.link};
|
|
425
429
|
&:focus {
|
|
426
430
|
${(t) => {
|
|
427
431
|
var e;
|
|
428
|
-
return ((e = t.theme.accessibility) == null ? void 0 : e.isTabbing) &&
|
|
432
|
+
return ((e = t.theme.accessibility) == null ? void 0 : e.isTabbing) && f;
|
|
429
433
|
}};
|
|
430
434
|
}
|
|
431
435
|
}
|
|
432
|
-
`,
|
|
436
|
+
`, Fe = i(ie)`
|
|
433
437
|
padding: 0;
|
|
434
438
|
list-style: none;
|
|
435
439
|
margin: 0 -${(t) => {
|
|
@@ -442,8 +446,8 @@ const Te = ({ className: t }) => {
|
|
|
442
446
|
return (e = t.theme.sizes) == null ? void 0 : e.normal;
|
|
443
447
|
}};
|
|
444
448
|
}
|
|
445
|
-
`,
|
|
446
|
-
${(t) =>
|
|
449
|
+
`, Ye = i.button`
|
|
450
|
+
${(t) => B(t)};
|
|
447
451
|
display: block;
|
|
448
452
|
background-color: ${(t) => {
|
|
449
453
|
var e;
|
|
@@ -452,23 +456,23 @@ const Te = ({ className: t }) => {
|
|
|
452
456
|
width: 100%;
|
|
453
457
|
color: #fff;
|
|
454
458
|
&:focus-visible {
|
|
455
|
-
${
|
|
459
|
+
${f}
|
|
456
460
|
background-color: transparent;
|
|
457
461
|
}
|
|
458
|
-
`,
|
|
459
|
-
({ boxed: t, className: e, agentData:
|
|
460
|
-
|
|
462
|
+
`, te = Z(
|
|
463
|
+
({ boxed: t, className: e, agentData: r }, o) => /* @__PURE__ */ n(V, { ref: o, children: /* @__PURE__ */ n(_, { left: t, center: !t, children: /* @__PURE__ */ n(
|
|
464
|
+
F,
|
|
461
465
|
{
|
|
462
466
|
padded: !!t,
|
|
463
467
|
stacked: t ? "first" : void 0,
|
|
464
|
-
children: /* @__PURE__ */ u(
|
|
468
|
+
children: /* @__PURE__ */ u(Pe, { children: [
|
|
465
469
|
/* @__PURE__ */ n("div", {}),
|
|
466
470
|
/* @__PURE__ */ n("div", {}),
|
|
467
471
|
/* @__PURE__ */ n("div", {})
|
|
468
472
|
] })
|
|
469
473
|
}
|
|
470
474
|
) }) })
|
|
471
|
-
),
|
|
475
|
+
), ue = Ne.createContext(null), Xe = i.p`
|
|
472
476
|
&& {
|
|
473
477
|
font-size: ${(t) => {
|
|
474
478
|
var e;
|
|
@@ -483,53 +487,53 @@ const Te = ({ className: t }) => {
|
|
|
483
487
|
var e;
|
|
484
488
|
return (e = t.theme.colors) == null ? void 0 : e.text;
|
|
485
489
|
}};
|
|
486
|
-
`,
|
|
490
|
+
`, ne = (t, e) => new Date(t).toLocaleTimeString(e || [], {
|
|
487
491
|
hour: "numeric",
|
|
488
492
|
minute: "2-digit"
|
|
489
|
-
}),
|
|
493
|
+
}), M = ({
|
|
490
494
|
className: t,
|
|
491
495
|
name: e,
|
|
492
|
-
timestamp:
|
|
493
|
-
ariaHidden:
|
|
496
|
+
timestamp: r,
|
|
497
|
+
ariaHidden: o = !1
|
|
494
498
|
}) => {
|
|
495
|
-
const s =
|
|
496
|
-
if (!e && !
|
|
499
|
+
const s = Me(ue);
|
|
500
|
+
if (!e && !r)
|
|
497
501
|
return null;
|
|
498
|
-
let
|
|
499
|
-
return e ?
|
|
500
|
-
},
|
|
502
|
+
let a = "";
|
|
503
|
+
return e ? r ? a = `${e}: ${ne(r, s)}` : a = e : r && (a = ne(r, s)), /* @__PURE__ */ n(Xe, { "aria-hidden": o, children: a });
|
|
504
|
+
}, he = ({
|
|
501
505
|
className: t,
|
|
502
506
|
children: e,
|
|
503
|
-
sender:
|
|
504
|
-
timestamp:
|
|
507
|
+
sender: r,
|
|
508
|
+
timestamp: o
|
|
505
509
|
}) => {
|
|
506
|
-
const { avatar: s, name:
|
|
510
|
+
const { avatar: s, name: a } = r, { avatarSize: m } = C();
|
|
507
511
|
return /* @__PURE__ */ u(
|
|
508
|
-
|
|
512
|
+
Ge,
|
|
509
513
|
{
|
|
510
514
|
hasAvatar: !!s,
|
|
511
|
-
className:
|
|
515
|
+
className: A(
|
|
512
516
|
t,
|
|
513
517
|
"humany-conversation-agent-message"
|
|
514
518
|
),
|
|
515
519
|
children: [
|
|
516
|
-
s && /* @__PURE__ */ n(
|
|
520
|
+
s && /* @__PURE__ */ n(De, { avatarSize: m, children: typeof s == "string" ? (
|
|
517
521
|
// eslint-disable-next-line jsx-a11y/alt-text
|
|
518
522
|
/* @__PURE__ */ n("img", { src: s })
|
|
519
|
-
) : /* @__PURE__ */ n(
|
|
523
|
+
) : /* @__PURE__ */ n(k, { symbol: s }) }),
|
|
520
524
|
e,
|
|
521
525
|
/* @__PURE__ */ n(
|
|
522
|
-
|
|
526
|
+
M,
|
|
523
527
|
{
|
|
524
|
-
name:
|
|
525
|
-
timestamp:
|
|
528
|
+
name: a,
|
|
529
|
+
timestamp: o,
|
|
526
530
|
ariaHidden: !0
|
|
527
531
|
}
|
|
528
532
|
)
|
|
529
533
|
]
|
|
530
534
|
}
|
|
531
535
|
);
|
|
532
|
-
},
|
|
536
|
+
}, Ge = i.div`
|
|
533
537
|
display: grid;
|
|
534
538
|
margin-right: 10%;
|
|
535
539
|
width: 90%;
|
|
@@ -546,33 +550,33 @@ const Te = ({ className: t }) => {
|
|
|
546
550
|
'content'
|
|
547
551
|
'info';
|
|
548
552
|
`};
|
|
549
|
-
`,
|
|
550
|
-
({ className: t, children: e, timestamp:
|
|
551
|
-
|
|
553
|
+
`, Je = Z(
|
|
554
|
+
({ className: t, children: e, timestamp: r, discrete: o, fullWidth: s }, a) => /* @__PURE__ */ n(
|
|
555
|
+
Qe,
|
|
552
556
|
{
|
|
553
|
-
ref:
|
|
554
|
-
className:
|
|
557
|
+
ref: a,
|
|
558
|
+
className: A(
|
|
555
559
|
t,
|
|
556
560
|
"humany-conversation-system-message"
|
|
557
561
|
),
|
|
558
562
|
fullWidth: s,
|
|
559
|
-
children:
|
|
563
|
+
children: o ? /* @__PURE__ */ u(Ze, { className: "humany-conversation-discrete-message", children: [
|
|
560
564
|
e,
|
|
561
|
-
/* @__PURE__ */ n(
|
|
562
|
-
] }) : /* @__PURE__ */ u(
|
|
565
|
+
/* @__PURE__ */ n(M, { timestamp: r })
|
|
566
|
+
] }) : /* @__PURE__ */ u(N, { children: [
|
|
563
567
|
e,
|
|
564
|
-
/* @__PURE__ */ n(
|
|
568
|
+
/* @__PURE__ */ n(M, { timestamp: r })
|
|
565
569
|
] })
|
|
566
570
|
}
|
|
567
571
|
)
|
|
568
|
-
),
|
|
572
|
+
), Qe = i.div`
|
|
569
573
|
${(t) => t.fullWidth && "width: 100%"};
|
|
570
574
|
padding: 0 ${(t) => {
|
|
571
575
|
var e;
|
|
572
576
|
return (e = t.theme.sizes) == null ? void 0 : e.large;
|
|
573
577
|
}};
|
|
574
578
|
overflow: auto;
|
|
575
|
-
`,
|
|
579
|
+
`, Ze = i.div`
|
|
576
580
|
text-align: center;
|
|
577
581
|
word-wrap: break-word;
|
|
578
582
|
font-size: ${(t) => {
|
|
@@ -586,79 +590,82 @@ const Te = ({ className: t }) => {
|
|
|
586
590
|
> p {
|
|
587
591
|
margin: 0;
|
|
588
592
|
}
|
|
589
|
-
`,
|
|
590
|
-
const { userLabel:
|
|
593
|
+
`, et = ({ className: t, children: e, timestamp: r }) => {
|
|
594
|
+
const { userLabel: o = "" } = C();
|
|
591
595
|
return /* @__PURE__ */ u(
|
|
592
|
-
|
|
596
|
+
tt,
|
|
593
597
|
{
|
|
594
|
-
className:
|
|
598
|
+
className: A(
|
|
595
599
|
t,
|
|
596
600
|
"humany-conversation-user-message"
|
|
597
601
|
),
|
|
598
602
|
children: [
|
|
599
603
|
e,
|
|
600
604
|
/* @__PURE__ */ n(
|
|
601
|
-
|
|
605
|
+
M,
|
|
602
606
|
{
|
|
603
|
-
name:
|
|
604
|
-
timestamp:
|
|
607
|
+
name: o,
|
|
608
|
+
timestamp: r,
|
|
605
609
|
ariaHidden: !0
|
|
606
610
|
}
|
|
607
611
|
)
|
|
608
612
|
]
|
|
609
613
|
}
|
|
610
614
|
);
|
|
611
|
-
},
|
|
615
|
+
}, tt = i.div`
|
|
612
616
|
margin-left: 10%;
|
|
613
617
|
width: 90%;
|
|
614
618
|
display: flex;
|
|
615
619
|
flex-direction: column;
|
|
616
620
|
align-items: flex-end;
|
|
617
|
-
`,
|
|
621
|
+
`, ee = (t) => Array.isArray(t) ? t : Object.keys(t).map((e) => ({
|
|
618
622
|
label: t[e],
|
|
619
623
|
actionKey: e
|
|
620
|
-
})),
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
{
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
624
|
+
})), nt = ({ header: t, actions: e, dispatch: r }) => {
|
|
625
|
+
const o = T(), { events: s } = o.get("$widget");
|
|
626
|
+
return /* @__PURE__ */ n(
|
|
627
|
+
rt,
|
|
628
|
+
{
|
|
629
|
+
className: "humany-conversation-button-list",
|
|
630
|
+
header: t,
|
|
631
|
+
items: ee(e),
|
|
632
|
+
renderItem: (a) => {
|
|
633
|
+
var d;
|
|
634
|
+
const m = !!((d = a == null ? void 0 : a.data) != null && d.href);
|
|
635
|
+
return /* @__PURE__ */ n("li", { children: m ? /* @__PURE__ */ u(
|
|
636
|
+
ot,
|
|
637
|
+
{
|
|
638
|
+
onClick: () => {
|
|
639
|
+
r("action", a), s.dispatch("tracking:button-list-item-clicked", a);
|
|
640
|
+
},
|
|
641
|
+
href: a.data.href,
|
|
642
|
+
target: a.data.target,
|
|
643
|
+
"aria-label": a.label,
|
|
644
|
+
title: a.label,
|
|
645
|
+
children: [
|
|
646
|
+
/* @__PURE__ */ n(k, { symbol: a.symbol }),
|
|
647
|
+
a.label
|
|
648
|
+
]
|
|
649
|
+
}
|
|
650
|
+
) : /* @__PURE__ */ u(
|
|
651
|
+
st,
|
|
652
|
+
{
|
|
653
|
+
onClick: () => {
|
|
654
|
+
r("action", a), s.dispatch("tracking:button-list-item-clicked", a);
|
|
655
|
+
},
|
|
656
|
+
"aria-label": a.label,
|
|
657
|
+
title: a.label,
|
|
658
|
+
children: [
|
|
659
|
+
/* @__PURE__ */ n(k, { symbol: a.symbol }),
|
|
660
|
+
a.label
|
|
661
|
+
]
|
|
662
|
+
}
|
|
663
|
+
) }, a.actionKey);
|
|
664
|
+
}
|
|
658
665
|
}
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
${
|
|
666
|
+
);
|
|
667
|
+
}, rt = i(K)`
|
|
668
|
+
${E}
|
|
662
669
|
> ul {
|
|
663
670
|
display: flex;
|
|
664
671
|
flex-wrap: wrap;
|
|
@@ -671,8 +678,8 @@ const Te = ({ className: t }) => {
|
|
|
671
678
|
}
|
|
672
679
|
}
|
|
673
680
|
${S}
|
|
674
|
-
`,
|
|
675
|
-
${
|
|
681
|
+
`, ot = i(ve)`
|
|
682
|
+
${B};
|
|
676
683
|
|
|
677
684
|
display: block;
|
|
678
685
|
padding: ${(t) => {
|
|
@@ -688,7 +695,7 @@ const Te = ({ className: t }) => {
|
|
|
688
695
|
overflow: hidden;
|
|
689
696
|
text-overflow: ellipsis;
|
|
690
697
|
&:focus-visible {
|
|
691
|
-
${
|
|
698
|
+
${f}
|
|
692
699
|
background-color: transparent;
|
|
693
700
|
}
|
|
694
701
|
|
|
@@ -699,8 +706,8 @@ const Te = ({ className: t }) => {
|
|
|
699
706
|
return (e = t.theme.sizes) == null ? void 0 : e.small;
|
|
700
707
|
}};
|
|
701
708
|
}
|
|
702
|
-
`,
|
|
703
|
-
${
|
|
709
|
+
`, st = i(I)`
|
|
710
|
+
${B};
|
|
704
711
|
|
|
705
712
|
display: block;
|
|
706
713
|
padding: ${(t) => {
|
|
@@ -716,7 +723,7 @@ const Te = ({ className: t }) => {
|
|
|
716
723
|
overflow: hidden;
|
|
717
724
|
text-overflow: ellipsis;
|
|
718
725
|
&:focus-visible {
|
|
719
|
-
${
|
|
726
|
+
${f}
|
|
720
727
|
background-color: transparent;
|
|
721
728
|
}
|
|
722
729
|
|
|
@@ -727,58 +734,58 @@ const Te = ({ className: t }) => {
|
|
|
727
734
|
return (e = t.theme.sizes) == null ? void 0 : e.small;
|
|
728
735
|
}};
|
|
729
736
|
}
|
|
730
|
-
`,
|
|
731
|
-
const
|
|
732
|
-
return !
|
|
733
|
-
},
|
|
734
|
-
${
|
|
737
|
+
`, at = ({ type: t, content: e = {} }) => {
|
|
738
|
+
const r = xe(t);
|
|
739
|
+
return !r || !t ? null : /* @__PURE__ */ n(Ie, { fallback: null, children: /* @__PURE__ */ n(r, { ...e }) });
|
|
740
|
+
}, it = ({ body: t }) => /* @__PURE__ */ n(lt, { html: t }), lt = i(G)`
|
|
741
|
+
${ke}
|
|
735
742
|
color: inherit;
|
|
736
743
|
white-space: pre-wrap;
|
|
737
744
|
${S}
|
|
738
745
|
a {
|
|
739
746
|
color: ${(t) => t.theme.colors.link};
|
|
740
747
|
&:focus-visible {
|
|
741
|
-
${
|
|
748
|
+
${f};
|
|
742
749
|
}
|
|
743
750
|
}
|
|
744
|
-
`,
|
|
745
|
-
|
|
751
|
+
`, ct = ({ header: t, actions: e, dispatch: r }) => /* @__PURE__ */ n(
|
|
752
|
+
dt,
|
|
746
753
|
{
|
|
747
754
|
className: "humany-conversation-item-list",
|
|
748
755
|
header: t,
|
|
749
|
-
items:
|
|
750
|
-
renderItem: (
|
|
756
|
+
items: ee(e),
|
|
757
|
+
renderItem: (o) => {
|
|
751
758
|
var s;
|
|
752
|
-
return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ u(
|
|
753
|
-
((s =
|
|
754
|
-
|
|
759
|
+
return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ u(mt, { children: [
|
|
760
|
+
((s = o.symbol) == null ? void 0 : s.content) && /* @__PURE__ */ n("div", { className: "item-icon", children: /* @__PURE__ */ n(
|
|
761
|
+
k,
|
|
755
762
|
{
|
|
756
763
|
size: 22,
|
|
757
764
|
symbol: {
|
|
758
|
-
type:
|
|
759
|
-
content:
|
|
765
|
+
type: o.symbol.type,
|
|
766
|
+
content: o.symbol.content
|
|
760
767
|
}
|
|
761
768
|
}
|
|
762
769
|
) }),
|
|
763
770
|
/* @__PURE__ */ u("div", { className: "item-body", children: [
|
|
764
771
|
/* @__PURE__ */ n(
|
|
765
|
-
|
|
772
|
+
I,
|
|
766
773
|
{
|
|
767
774
|
onClick: () => {
|
|
768
|
-
|
|
775
|
+
r("action", o);
|
|
769
776
|
},
|
|
770
|
-
"aria-label":
|
|
771
|
-
title:
|
|
772
|
-
children:
|
|
777
|
+
"aria-label": o.label,
|
|
778
|
+
title: o.label,
|
|
779
|
+
children: o.label
|
|
773
780
|
}
|
|
774
781
|
),
|
|
775
|
-
|
|
782
|
+
o.description && /* @__PURE__ */ n("p", { children: o.description })
|
|
776
783
|
] })
|
|
777
|
-
] }) },
|
|
784
|
+
] }) }, o.actionKey);
|
|
778
785
|
}
|
|
779
786
|
}
|
|
780
|
-
),
|
|
781
|
-
${
|
|
787
|
+
), dt = i(K)`
|
|
788
|
+
${E}
|
|
782
789
|
|
|
783
790
|
> .humany-paragraph {
|
|
784
791
|
${S}
|
|
@@ -789,7 +796,7 @@ const Te = ({ className: t }) => {
|
|
|
789
796
|
}
|
|
790
797
|
}
|
|
791
798
|
|
|
792
|
-
${(t) =>
|
|
799
|
+
${(t) => J(t)(
|
|
793
800
|
"h1",
|
|
794
801
|
b`
|
|
795
802
|
white-space: normal;
|
|
@@ -815,7 +822,7 @@ const Te = ({ className: t }) => {
|
|
|
815
822
|
border-bottom: none;
|
|
816
823
|
}
|
|
817
824
|
}
|
|
818
|
-
`,
|
|
825
|
+
`, mt = i.div`
|
|
819
826
|
display: flex;
|
|
820
827
|
gap: ${(t) => {
|
|
821
828
|
var e;
|
|
@@ -854,7 +861,7 @@ const Te = ({ className: t }) => {
|
|
|
854
861
|
margin: 0;
|
|
855
862
|
|
|
856
863
|
&:focus-visible {
|
|
857
|
-
${
|
|
864
|
+
${f}
|
|
858
865
|
span {
|
|
859
866
|
color: ${(t) => {
|
|
860
867
|
var e;
|
|
@@ -864,32 +871,32 @@ const Te = ({ className: t }) => {
|
|
|
864
871
|
}
|
|
865
872
|
}
|
|
866
873
|
}
|
|
867
|
-
`,
|
|
868
|
-
const
|
|
869
|
-
return
|
|
870
|
-
if (
|
|
874
|
+
`, ut = ({ header: t, actions: e, dispatch: r }) => {
|
|
875
|
+
const o = we(e), s = ce(), a = se(), m = T(), { events: d } = m.get("$widget");
|
|
876
|
+
return Q(() => {
|
|
877
|
+
if (o && Array.isArray(e) && Array.isArray(o) && o.length < e.length && s.current) {
|
|
871
878
|
const c = s.current.querySelectorAll(
|
|
872
879
|
".humany-conversation-link-list > ul > li"
|
|
873
|
-
),
|
|
874
|
-
if (c.length === e.length &&
|
|
875
|
-
const
|
|
876
|
-
if (
|
|
877
|
-
const
|
|
880
|
+
), p = c[o.length];
|
|
881
|
+
if (c.length === e.length && o.length) {
|
|
882
|
+
const x = c[o.length - 1];
|
|
883
|
+
if (x) {
|
|
884
|
+
const l = x.querySelector(
|
|
878
885
|
".humany-button"
|
|
879
886
|
);
|
|
880
|
-
|
|
887
|
+
l && l.focus();
|
|
881
888
|
}
|
|
882
889
|
} else
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
if (
|
|
886
|
-
const
|
|
887
|
-
|
|
888
|
-
).find((
|
|
889
|
-
|
|
890
|
+
p && new MutationObserver((l, h) => {
|
|
891
|
+
l.forEach((v) => {
|
|
892
|
+
if (v.addedNodes) {
|
|
893
|
+
const $ = Array.from(
|
|
894
|
+
v.addedNodes
|
|
895
|
+
).find((z) => z.tagName === "BUTTON");
|
|
896
|
+
$ && ze(s.current, document.activeElement) && (a && $.focus(), h.disconnect());
|
|
890
897
|
}
|
|
891
898
|
});
|
|
892
|
-
}).observe(
|
|
899
|
+
}).observe(p, {
|
|
893
900
|
attributes: !1,
|
|
894
901
|
characterData: !1,
|
|
895
902
|
childList: !0,
|
|
@@ -899,25 +906,25 @@ const Te = ({ className: t }) => {
|
|
|
899
906
|
});
|
|
900
907
|
}
|
|
901
908
|
}), /* @__PURE__ */ n(
|
|
902
|
-
|
|
909
|
+
ht,
|
|
903
910
|
{
|
|
904
911
|
ref: s,
|
|
905
912
|
className: "humany-conversation-link-list",
|
|
906
913
|
header: t,
|
|
907
|
-
items:
|
|
914
|
+
items: ee(e),
|
|
908
915
|
renderItem: (c) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ u(
|
|
909
|
-
|
|
916
|
+
gt,
|
|
910
917
|
{
|
|
911
918
|
help: c.actionKey === "help",
|
|
912
919
|
onClick: () => {
|
|
913
|
-
|
|
920
|
+
r("action", c), d.dispatch("tracking:link-list-item-clicked", c);
|
|
914
921
|
},
|
|
915
922
|
"aria-label": c.label,
|
|
916
923
|
title: c.label,
|
|
917
924
|
children: [
|
|
918
925
|
c.label,
|
|
919
926
|
c.actionKey === "help" && /* @__PURE__ */ n(
|
|
920
|
-
|
|
927
|
+
k,
|
|
921
928
|
{
|
|
922
929
|
size: 14,
|
|
923
930
|
symbol: {
|
|
@@ -931,11 +938,11 @@ const Te = ({ className: t }) => {
|
|
|
931
938
|
) }, c.actionKey)
|
|
932
939
|
}
|
|
933
940
|
);
|
|
934
|
-
},
|
|
935
|
-
${
|
|
941
|
+
}, ht = i(K)`
|
|
942
|
+
${E}
|
|
936
943
|
${S}
|
|
937
944
|
|
|
938
|
-
${(t) =>
|
|
945
|
+
${(t) => J(t)(
|
|
939
946
|
"h1",
|
|
940
947
|
b`
|
|
941
948
|
white-space: normal;
|
|
@@ -953,7 +960,7 @@ const Te = ({ className: t }) => {
|
|
|
953
960
|
margin: 0;
|
|
954
961
|
}
|
|
955
962
|
}
|
|
956
|
-
`,
|
|
963
|
+
`, gt = i(I)`
|
|
957
964
|
display: block;
|
|
958
965
|
text-align: left;
|
|
959
966
|
font-weight: 300;
|
|
@@ -966,20 +973,20 @@ const Te = ({ className: t }) => {
|
|
|
966
973
|
overflow: hidden;
|
|
967
974
|
|
|
968
975
|
${(t) => {
|
|
969
|
-
var e,
|
|
976
|
+
var e, r;
|
|
970
977
|
return t.help && b`
|
|
971
978
|
color: ${(e = t.theme.colors) == null ? void 0 : e.text};
|
|
972
979
|
text-decoration: underline;
|
|
973
980
|
|
|
974
981
|
i,
|
|
975
982
|
svg {
|
|
976
|
-
margin-left: ${(
|
|
983
|
+
margin-left: ${(r = t.theme.sizes) == null ? void 0 : r.small};
|
|
977
984
|
}
|
|
978
985
|
`;
|
|
979
986
|
}}
|
|
980
987
|
|
|
981
988
|
&:focus-visible {
|
|
982
|
-
${
|
|
989
|
+
${f}
|
|
983
990
|
span {
|
|
984
991
|
color: ${(t) => {
|
|
985
992
|
var e;
|
|
@@ -988,18 +995,18 @@ const Te = ({ className: t }) => {
|
|
|
988
995
|
text-decoration: underline;
|
|
989
996
|
}
|
|
990
997
|
}
|
|
991
|
-
`,
|
|
998
|
+
`, ft = () => /* @__PURE__ */ n(pt, { className: "humany-conversation-separator" }), pt = i.div`
|
|
992
999
|
${(t) => t.theme.border && `border-bottom: ${t.theme.border};`}
|
|
993
1000
|
width: 100%;
|
|
994
|
-
`,
|
|
1001
|
+
`, yt = ({ text: t }) => /* @__PURE__ */ n(bt, { className: "humany-conversation-text", variant: "span", children: t }), bt = i(X)`
|
|
995
1002
|
${S}
|
|
996
|
-
`,
|
|
1003
|
+
`, $t = ({
|
|
997
1004
|
header: t = "Video call",
|
|
998
1005
|
acceptLabel: e = "Accept",
|
|
999
|
-
declineLabel:
|
|
1000
|
-
dispatch:
|
|
1006
|
+
declineLabel: r = "Decline",
|
|
1007
|
+
dispatch: o
|
|
1001
1008
|
}) => {
|
|
1002
|
-
const s =
|
|
1009
|
+
const s = He(() => [
|
|
1003
1010
|
{
|
|
1004
1011
|
label: e,
|
|
1005
1012
|
actionKey: "accept-video-call",
|
|
@@ -1009,39 +1016,39 @@ const Te = ({ className: t }) => {
|
|
|
1009
1016
|
}
|
|
1010
1017
|
},
|
|
1011
1018
|
{
|
|
1012
|
-
label:
|
|
1019
|
+
label: r,
|
|
1013
1020
|
actionKey: "decline-video-call",
|
|
1014
1021
|
symbol: {
|
|
1015
1022
|
type: "Svg",
|
|
1016
1023
|
content: "close"
|
|
1017
1024
|
}
|
|
1018
1025
|
}
|
|
1019
|
-
], [e,
|
|
1026
|
+
], [e, r]);
|
|
1020
1027
|
return /* @__PURE__ */ n(
|
|
1021
|
-
|
|
1028
|
+
vt,
|
|
1022
1029
|
{
|
|
1023
1030
|
className: "humany-conversation-video-request",
|
|
1024
1031
|
header: t,
|
|
1025
1032
|
items: s,
|
|
1026
|
-
renderItem: (
|
|
1027
|
-
const
|
|
1033
|
+
renderItem: (a) => {
|
|
1034
|
+
const m = a.actionKey === "accept-video-call" ? "#70c48e" : "#da5c85";
|
|
1028
1035
|
return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
|
|
1029
|
-
|
|
1036
|
+
xt,
|
|
1030
1037
|
{
|
|
1031
1038
|
onClick: () => {
|
|
1032
|
-
|
|
1039
|
+
o("action", a);
|
|
1033
1040
|
},
|
|
1034
|
-
"aria-label":
|
|
1035
|
-
title:
|
|
1036
|
-
bgColor:
|
|
1037
|
-
children: /* @__PURE__ */ n(
|
|
1041
|
+
"aria-label": a.label,
|
|
1042
|
+
title: a.label,
|
|
1043
|
+
bgColor: m,
|
|
1044
|
+
children: /* @__PURE__ */ n(k, { symbol: a.symbol, size: 25 })
|
|
1038
1045
|
}
|
|
1039
|
-
) },
|
|
1046
|
+
) }, a.actionKey);
|
|
1040
1047
|
}
|
|
1041
1048
|
}
|
|
1042
1049
|
);
|
|
1043
|
-
},
|
|
1044
|
-
${(t) =>
|
|
1050
|
+
}, vt = i(K)`
|
|
1051
|
+
${(t) => E(t)}
|
|
1045
1052
|
> ul {
|
|
1046
1053
|
display: flex;
|
|
1047
1054
|
flex-wrap: wrap;
|
|
@@ -1054,8 +1061,8 @@ const Te = ({ className: t }) => {
|
|
|
1054
1061
|
}
|
|
1055
1062
|
}
|
|
1056
1063
|
${(t) => S(t)}
|
|
1057
|
-
`,
|
|
1058
|
-
${
|
|
1064
|
+
`, xt = i(I)`
|
|
1065
|
+
${B};
|
|
1059
1066
|
|
|
1060
1067
|
background-color: ${(t) => t.bgColor};
|
|
1061
1068
|
display: flex;
|
|
@@ -1067,7 +1074,7 @@ const Te = ({ className: t }) => {
|
|
|
1067
1074
|
border-radius: 100%;
|
|
1068
1075
|
|
|
1069
1076
|
&:focus-visible {
|
|
1070
|
-
${
|
|
1077
|
+
${f}
|
|
1071
1078
|
background-color: transparent;
|
|
1072
1079
|
|
|
1073
1080
|
i,
|
|
@@ -1094,81 +1101,81 @@ const Te = ({ className: t }) => {
|
|
|
1094
1101
|
stroke: #fff;
|
|
1095
1102
|
}
|
|
1096
1103
|
}
|
|
1097
|
-
`,
|
|
1098
|
-
|
|
1104
|
+
`, kt = ([t, e]) => ({ type: t, content: e }), wt = ({ items: t, dispatch: e }) => /* @__PURE__ */ n(
|
|
1105
|
+
Ct,
|
|
1099
1106
|
{
|
|
1100
1107
|
role: "none",
|
|
1101
1108
|
className: "humany-message-list",
|
|
1102
|
-
items: t.map(
|
|
1109
|
+
items: t.map(kt),
|
|
1103
1110
|
renderLi: !0,
|
|
1104
|
-
renderItem: (
|
|
1105
|
-
switch (
|
|
1111
|
+
renderItem: (r) => {
|
|
1112
|
+
switch (r.type) {
|
|
1106
1113
|
case w.Text:
|
|
1107
|
-
return /* @__PURE__ */ n(
|
|
1114
|
+
return /* @__PURE__ */ n(yt, { text: r.content });
|
|
1108
1115
|
case w.HTML:
|
|
1109
|
-
return /* @__PURE__ */ n(
|
|
1116
|
+
return /* @__PURE__ */ n(it, { ...r.content });
|
|
1110
1117
|
case w.Separator:
|
|
1111
|
-
return /* @__PURE__ */ n(
|
|
1118
|
+
return /* @__PURE__ */ n(ft, { ...r.content });
|
|
1112
1119
|
case w.ItemList:
|
|
1113
|
-
return /* @__PURE__ */ n(
|
|
1120
|
+
return /* @__PURE__ */ n(ct, { ...r.content, dispatch: e });
|
|
1114
1121
|
case w.LinkList:
|
|
1115
|
-
return /* @__PURE__ */ n(
|
|
1122
|
+
return /* @__PURE__ */ n(ut, { ...r.content, dispatch: e });
|
|
1116
1123
|
case w.ButtonList:
|
|
1117
|
-
return /* @__PURE__ */ n(
|
|
1124
|
+
return /* @__PURE__ */ n(nt, { ...r.content, dispatch: e });
|
|
1118
1125
|
case w.VideoRequest:
|
|
1119
|
-
return /* @__PURE__ */ n(
|
|
1126
|
+
return /* @__PURE__ */ n($t, { ...r.content, dispatch: e });
|
|
1120
1127
|
default:
|
|
1121
|
-
return /* @__PURE__ */ n(
|
|
1128
|
+
return /* @__PURE__ */ n(at, { type: r.type, content: r.content });
|
|
1122
1129
|
}
|
|
1123
1130
|
}
|
|
1124
1131
|
}
|
|
1125
|
-
),
|
|
1126
|
-
${
|
|
1132
|
+
), Ct = i(ie)`
|
|
1133
|
+
${Ce}
|
|
1127
1134
|
|
|
1128
1135
|
> li {
|
|
1129
1136
|
margin: 0;
|
|
1130
1137
|
}
|
|
1131
|
-
`,
|
|
1132
|
-
({ className: t, timestamp: e, sender:
|
|
1133
|
-
const
|
|
1138
|
+
`, St = Z(
|
|
1139
|
+
({ className: t, timestamp: e, sender: r, type: o, content: s }, a) => {
|
|
1140
|
+
const m = de(
|
|
1134
1141
|
(l) => {
|
|
1135
1142
|
let h = "first";
|
|
1136
1143
|
return s.length > 1 && (h = l === 0 ? "first" : l + 1 === s.length ? "last" : "middle"), h;
|
|
1137
1144
|
},
|
|
1138
1145
|
[s]
|
|
1139
|
-
), { userLabel: d = "" } = C(),
|
|
1140
|
-
const { key: h, body:
|
|
1146
|
+
), { userLabel: d = "" } = C(), c = () => /* @__PURE__ */ n(N, { children: s.map((l) => {
|
|
1147
|
+
const { key: h, body: v, title: $, form: z, actions: y } = l, O = !!v && !$ && !z && !y;
|
|
1141
1148
|
return /* @__PURE__ */ n(
|
|
1142
|
-
|
|
1149
|
+
Je,
|
|
1143
1150
|
{
|
|
1144
1151
|
className: t,
|
|
1145
|
-
discrete:
|
|
1146
|
-
ref:
|
|
1152
|
+
discrete: O,
|
|
1153
|
+
ref: a,
|
|
1147
1154
|
timestamp: e,
|
|
1148
|
-
fullWidth: !!
|
|
1149
|
-
children:
|
|
1155
|
+
fullWidth: !!z || !!y,
|
|
1156
|
+
children: O && v ? /* @__PURE__ */ n(G, { html: v }) : /* @__PURE__ */ n(q, { isSystem: !0, content: l })
|
|
1150
1157
|
},
|
|
1151
1158
|
h
|
|
1152
1159
|
);
|
|
1153
|
-
}) }),
|
|
1154
|
-
/* @__PURE__ */ n(
|
|
1160
|
+
}) }), p = () => /* @__PURE__ */ u(N, { children: [
|
|
1161
|
+
/* @__PURE__ */ n(re, { className: "humany-sr-only", children: /* @__PURE__ */ n(M, { name: r == null ? void 0 : r.name, timestamp: e }) }),
|
|
1155
1162
|
/* @__PURE__ */ n(
|
|
1156
|
-
|
|
1163
|
+
he,
|
|
1157
1164
|
{
|
|
1158
|
-
sender:
|
|
1165
|
+
sender: r,
|
|
1159
1166
|
timestamp: e,
|
|
1160
1167
|
className: t,
|
|
1161
|
-
children: /* @__PURE__ */ n(
|
|
1162
|
-
|
|
1168
|
+
children: /* @__PURE__ */ n(V, { className: "humany-message-content-bundle", children: s.map((l, h) => /* @__PURE__ */ n(
|
|
1169
|
+
_,
|
|
1163
1170
|
{
|
|
1164
1171
|
className: "humany-message-container",
|
|
1165
1172
|
left: !0,
|
|
1166
|
-
ref:
|
|
1173
|
+
ref: a,
|
|
1167
1174
|
children: /* @__PURE__ */ n(
|
|
1168
|
-
|
|
1175
|
+
q,
|
|
1169
1176
|
{
|
|
1170
1177
|
content: l,
|
|
1171
|
-
stacked:
|
|
1178
|
+
stacked: m(h)
|
|
1172
1179
|
}
|
|
1173
1180
|
)
|
|
1174
1181
|
},
|
|
@@ -1176,82 +1183,82 @@ const Te = ({ className: t }) => {
|
|
|
1176
1183
|
)) })
|
|
1177
1184
|
}
|
|
1178
1185
|
)
|
|
1179
|
-
] }),
|
|
1180
|
-
/* @__PURE__ */ n(
|
|
1181
|
-
/* @__PURE__ */ n(
|
|
1182
|
-
|
|
1186
|
+
] }), x = () => /* @__PURE__ */ u(N, { children: [
|
|
1187
|
+
/* @__PURE__ */ n(re, { className: "humany-sr-only", children: /* @__PURE__ */ n(M, { name: d, timestamp: e }) }),
|
|
1188
|
+
/* @__PURE__ */ n(et, { timestamp: e, className: t, children: /* @__PURE__ */ n(V, { className: "humany-message-content-bundle", children: s.map((l, h) => /* @__PURE__ */ n(
|
|
1189
|
+
_,
|
|
1183
1190
|
{
|
|
1184
1191
|
className: "humany-message-container",
|
|
1185
1192
|
right: !0,
|
|
1186
|
-
ref:
|
|
1193
|
+
ref: a,
|
|
1187
1194
|
children: /* @__PURE__ */ n(
|
|
1188
|
-
|
|
1195
|
+
q,
|
|
1189
1196
|
{
|
|
1190
1197
|
isUser: !0,
|
|
1191
1198
|
content: l,
|
|
1192
|
-
stacked:
|
|
1199
|
+
stacked: m(h)
|
|
1193
1200
|
}
|
|
1194
1201
|
)
|
|
1195
1202
|
},
|
|
1196
1203
|
l.key
|
|
1197
1204
|
)) }) })
|
|
1198
1205
|
] });
|
|
1199
|
-
switch (
|
|
1200
|
-
case
|
|
1201
|
-
return
|
|
1202
|
-
case
|
|
1203
|
-
return
|
|
1204
|
-
case
|
|
1205
|
-
return
|
|
1206
|
+
switch (o) {
|
|
1207
|
+
case W.System:
|
|
1208
|
+
return c();
|
|
1209
|
+
case W.Agent:
|
|
1210
|
+
return p();
|
|
1211
|
+
case W.User:
|
|
1212
|
+
return x();
|
|
1206
1213
|
default:
|
|
1207
1214
|
return null;
|
|
1208
1215
|
}
|
|
1209
1216
|
}
|
|
1210
|
-
),
|
|
1217
|
+
), q = ({
|
|
1211
1218
|
content: t,
|
|
1212
1219
|
isUser: e,
|
|
1213
|
-
isSystem:
|
|
1214
|
-
stacked:
|
|
1220
|
+
isSystem: r,
|
|
1221
|
+
stacked: o
|
|
1215
1222
|
}) => {
|
|
1216
|
-
const s =
|
|
1217
|
-
return
|
|
1218
|
-
|
|
1223
|
+
const s = Y(), { title: a, body: m, actions: d, form: c, items: p } = t;
|
|
1224
|
+
return p ? /* @__PURE__ */ n(
|
|
1225
|
+
F,
|
|
1219
1226
|
{
|
|
1220
1227
|
className: "humany-message-content",
|
|
1221
1228
|
user: !!e,
|
|
1222
|
-
stacked:
|
|
1223
|
-
children: /* @__PURE__ */ n(
|
|
1229
|
+
stacked: o,
|
|
1230
|
+
children: /* @__PURE__ */ n(wt, { items: p, dispatch: s })
|
|
1224
1231
|
}
|
|
1225
1232
|
) : /* @__PURE__ */ u(
|
|
1226
|
-
|
|
1233
|
+
F,
|
|
1227
1234
|
{
|
|
1228
1235
|
className: "humany-message-content",
|
|
1229
|
-
padded: !
|
|
1236
|
+
padded: !r,
|
|
1230
1237
|
user: !!e,
|
|
1231
|
-
stacked:
|
|
1232
|
-
fullWidth: !!
|
|
1238
|
+
stacked: o,
|
|
1239
|
+
fullWidth: !!c || !!d,
|
|
1233
1240
|
children: [
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1241
|
+
a && /* @__PURE__ */ n(R, { children: /* @__PURE__ */ n(We, { variant: "h2", children: a }) }),
|
|
1242
|
+
m && /* @__PURE__ */ n(R, { children: /* @__PURE__ */ n(_e, { html: m }) }),
|
|
1243
|
+
c && /* @__PURE__ */ n(R, { children: /* @__PURE__ */ n(
|
|
1244
|
+
Ve,
|
|
1238
1245
|
{
|
|
1239
|
-
...
|
|
1246
|
+
...c,
|
|
1240
1247
|
onChange: (l, h) => {
|
|
1241
1248
|
s("form", {
|
|
1242
1249
|
data: h,
|
|
1243
|
-
formKey:
|
|
1250
|
+
formKey: c.schema.id,
|
|
1244
1251
|
actionKey: l
|
|
1245
1252
|
});
|
|
1246
1253
|
}
|
|
1247
1254
|
}
|
|
1248
1255
|
) }),
|
|
1249
|
-
d && /* @__PURE__ */ n(
|
|
1250
|
-
|
|
1256
|
+
d && /* @__PURE__ */ n(R, { children: /* @__PURE__ */ n(
|
|
1257
|
+
Fe,
|
|
1251
1258
|
{
|
|
1252
1259
|
items: Object.keys(d).map((l) => ({ label: d[l], actionKey: l })),
|
|
1253
1260
|
renderItem: (l) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
|
|
1254
|
-
|
|
1261
|
+
Ye,
|
|
1255
1262
|
{
|
|
1256
1263
|
onClick: () => {
|
|
1257
1264
|
s("action", l.actionKey);
|
|
@@ -1264,7 +1271,7 @@ const Te = ({ className: t }) => {
|
|
|
1264
1271
|
]
|
|
1265
1272
|
}
|
|
1266
1273
|
);
|
|
1267
|
-
},
|
|
1274
|
+
}, re = i.div`
|
|
1268
1275
|
position: absolute !important;
|
|
1269
1276
|
height: 1px;
|
|
1270
1277
|
width: 1px;
|
|
@@ -1273,28 +1280,28 @@ const Te = ({ className: t }) => {
|
|
|
1273
1280
|
clip: rect(1px, 1px, 1px, 1px);
|
|
1274
1281
|
left: -10000000px;
|
|
1275
1282
|
top: auto;
|
|
1276
|
-
`,
|
|
1277
|
-
const { skipToLatestMessageLabel: t = "Skip to latest message" } = C(), e =
|
|
1278
|
-
const
|
|
1279
|
-
if (
|
|
1280
|
-
const s =
|
|
1283
|
+
`, zt = () => {
|
|
1284
|
+
const { skipToLatestMessageLabel: t = "Skip to latest message" } = C(), e = T(), r = () => {
|
|
1285
|
+
const o = e.get("widgetDOMElement");
|
|
1286
|
+
if (o) {
|
|
1287
|
+
const s = o.querySelectorAll(
|
|
1281
1288
|
".humany-conversation-entry"
|
|
1282
1289
|
);
|
|
1283
1290
|
s.length && s[s.length - 1].focus();
|
|
1284
1291
|
}
|
|
1285
1292
|
};
|
|
1286
1293
|
return /* @__PURE__ */ n(
|
|
1287
|
-
|
|
1294
|
+
Lt,
|
|
1288
1295
|
{
|
|
1289
1296
|
className: "humany-skip-to-latest-message",
|
|
1290
|
-
onKeyDown: (
|
|
1291
|
-
(
|
|
1297
|
+
onKeyDown: (o) => {
|
|
1298
|
+
(o.key === "Enter" || o.keyCode === 13) && r();
|
|
1292
1299
|
},
|
|
1293
|
-
onClick:
|
|
1300
|
+
onClick: r,
|
|
1294
1301
|
children: t
|
|
1295
1302
|
}
|
|
1296
1303
|
);
|
|
1297
|
-
},
|
|
1304
|
+
}, Lt = i.button`
|
|
1298
1305
|
position: absolute;
|
|
1299
1306
|
bottom: 60px;
|
|
1300
1307
|
text-align: center;
|
|
@@ -1312,26 +1319,26 @@ const Te = ({ className: t }) => {
|
|
|
1312
1319
|
&:focus-visible {
|
|
1313
1320
|
left: 50%;
|
|
1314
1321
|
transform: translateX(-50%);
|
|
1315
|
-
${
|
|
1322
|
+
${f};
|
|
1316
1323
|
}
|
|
1317
|
-
`,
|
|
1318
|
-
const t =
|
|
1324
|
+
`, ge = () => {
|
|
1325
|
+
const t = de((d) => {
|
|
1319
1326
|
d && setTimeout(() => {
|
|
1320
1327
|
d.scrollIntoView({
|
|
1321
1328
|
block: "start",
|
|
1322
1329
|
behavior: "smooth"
|
|
1323
1330
|
});
|
|
1324
1331
|
}, 250);
|
|
1325
|
-
}, []), [e,
|
|
1326
|
-
messages:
|
|
1332
|
+
}, []), [e, r] = ae(!0), {
|
|
1333
|
+
messages: o,
|
|
1327
1334
|
loading: s,
|
|
1328
|
-
typingActors:
|
|
1329
|
-
} = C(),
|
|
1330
|
-
|
|
1335
|
+
typingActors: a = []
|
|
1336
|
+
} = C(), m = () => a && a.length ? a.map((d, c) => /* @__PURE__ */ n(
|
|
1337
|
+
U,
|
|
1331
1338
|
{
|
|
1332
1339
|
id: `typing_${d.name}`,
|
|
1333
|
-
children: /* @__PURE__ */ n(
|
|
1334
|
-
|
|
1340
|
+
children: /* @__PURE__ */ n(he, { timestamp: Date.now(), sender: d, children: /* @__PURE__ */ n(
|
|
1341
|
+
te,
|
|
1335
1342
|
{
|
|
1336
1343
|
boxed: !0,
|
|
1337
1344
|
ref: t
|
|
@@ -1340,27 +1347,27 @@ const Te = ({ className: t }) => {
|
|
|
1340
1347
|
},
|
|
1341
1348
|
`typing_${d.name}`
|
|
1342
1349
|
)) : null;
|
|
1343
|
-
return /* @__PURE__ */ u(
|
|
1344
|
-
/* @__PURE__ */ u(
|
|
1345
|
-
|
|
1346
|
-
const { type:
|
|
1350
|
+
return /* @__PURE__ */ u(N, { children: [
|
|
1351
|
+
/* @__PURE__ */ u(Nt, { tabIndex: 0, scrollableCss: e, ref: r, children: [
|
|
1352
|
+
o && o.length ? o.map((d, c) => {
|
|
1353
|
+
const { type: p, timestamp: x, sender: l, content: h } = d;
|
|
1347
1354
|
return /* @__PURE__ */ n(
|
|
1348
|
-
|
|
1355
|
+
U,
|
|
1349
1356
|
{
|
|
1350
1357
|
className: "humany-conversation-entry",
|
|
1351
1358
|
tabIndex: -1,
|
|
1352
|
-
children: /* @__PURE__ */ n(
|
|
1359
|
+
children: /* @__PURE__ */ n(St, { ...d, ref: t })
|
|
1353
1360
|
},
|
|
1354
|
-
`${
|
|
1361
|
+
`${p}_${l == null ? void 0 : l.name}_${x}_${h[0].key}`
|
|
1355
1362
|
);
|
|
1356
1363
|
}) : null,
|
|
1357
|
-
|
|
1358
|
-
s && /* @__PURE__ */ n(
|
|
1364
|
+
m(),
|
|
1365
|
+
s && /* @__PURE__ */ n(U, { children: /* @__PURE__ */ n(te, { ref: t }) })
|
|
1359
1366
|
] }),
|
|
1360
|
-
/* @__PURE__ */ n(
|
|
1361
|
-
/* @__PURE__ */ n(
|
|
1367
|
+
/* @__PURE__ */ n(Ae, {}),
|
|
1368
|
+
/* @__PURE__ */ n(zt, {})
|
|
1362
1369
|
] });
|
|
1363
|
-
},
|
|
1370
|
+
}, Nt = i.div`
|
|
1364
1371
|
display: flex;
|
|
1365
1372
|
flex-direction: column;
|
|
1366
1373
|
align-items: stretch;
|
|
@@ -1371,9 +1378,9 @@ const Te = ({ className: t }) => {
|
|
|
1371
1378
|
}};
|
|
1372
1379
|
${(t) => !!t.scrollableCss && t.scrollableCss};
|
|
1373
1380
|
&:focus-visible {
|
|
1374
|
-
${(t) =>
|
|
1381
|
+
${(t) => f(t)};
|
|
1375
1382
|
}
|
|
1376
|
-
`,
|
|
1383
|
+
`, U = i.div`
|
|
1377
1384
|
margin: 0;
|
|
1378
1385
|
margin-bottom: ${(t) => {
|
|
1379
1386
|
var e;
|
|
@@ -1407,50 +1414,50 @@ const Te = ({ className: t }) => {
|
|
|
1407
1414
|
}
|
|
1408
1415
|
|
|
1409
1416
|
&:focus-visible {
|
|
1410
|
-
${
|
|
1417
|
+
${f}
|
|
1411
1418
|
border-radius: ${(t) => {
|
|
1412
1419
|
var e;
|
|
1413
1420
|
return (e = t.theme.sizes) == null ? void 0 : e.small;
|
|
1414
1421
|
}};
|
|
1415
1422
|
}
|
|
1416
|
-
${(t) =>
|
|
1423
|
+
${(t) => J(t)(
|
|
1417
1424
|
"h1",
|
|
1418
1425
|
b`
|
|
1419
1426
|
font-weight: normal;
|
|
1420
1427
|
`
|
|
1421
1428
|
)}
|
|
1422
|
-
`,
|
|
1423
|
-
const e =
|
|
1424
|
-
return
|
|
1429
|
+
`, Mt = ({ dispatch: t }) => {
|
|
1430
|
+
const e = ce(null);
|
|
1431
|
+
return Q(() => {
|
|
1425
1432
|
e.current && e.current.parentNode && t("overlay-mounted", e.current);
|
|
1426
1433
|
}, [e]), /* @__PURE__ */ n(
|
|
1427
|
-
|
|
1434
|
+
le,
|
|
1428
1435
|
{
|
|
1429
1436
|
portalId: "humany-conversation-overlay-portal",
|
|
1430
1437
|
className: "humany-conversation-overlay-outlet",
|
|
1431
1438
|
ref: e
|
|
1432
1439
|
}
|
|
1433
1440
|
);
|
|
1434
|
-
},
|
|
1441
|
+
}, It = ({
|
|
1435
1442
|
dispatch: t,
|
|
1436
1443
|
header: e,
|
|
1437
|
-
buttonLabel:
|
|
1444
|
+
buttonLabel: r
|
|
1438
1445
|
}) => /* @__PURE__ */ u(
|
|
1439
|
-
|
|
1446
|
+
Ht,
|
|
1440
1447
|
{
|
|
1441
1448
|
portalId: "humany-conversation-portal",
|
|
1442
1449
|
className: "humany-conversation-outlet",
|
|
1443
1450
|
children: [
|
|
1444
|
-
/* @__PURE__ */ u(
|
|
1451
|
+
/* @__PURE__ */ u(Tt, { className: "humany-conversation-outlet-head", children: [
|
|
1445
1452
|
/* @__PURE__ */ n(
|
|
1446
|
-
|
|
1453
|
+
Ot,
|
|
1447
1454
|
{
|
|
1448
1455
|
className: "humany-conversation-outlet-head-button",
|
|
1449
|
-
"aria-label":
|
|
1450
|
-
title:
|
|
1456
|
+
"aria-label": r,
|
|
1457
|
+
title: r,
|
|
1451
1458
|
onClick: () => t("hide-overlay-conversation"),
|
|
1452
1459
|
children: /* @__PURE__ */ n(
|
|
1453
|
-
|
|
1460
|
+
k,
|
|
1454
1461
|
{
|
|
1455
1462
|
symbol: {
|
|
1456
1463
|
type: "Svg",
|
|
@@ -1462,7 +1469,7 @@ const Te = ({ className: t }) => {
|
|
|
1462
1469
|
}
|
|
1463
1470
|
),
|
|
1464
1471
|
e && /* @__PURE__ */ n(
|
|
1465
|
-
|
|
1472
|
+
At,
|
|
1466
1473
|
{
|
|
1467
1474
|
className: "humany-conversation-outlet-header",
|
|
1468
1475
|
variant: "h1",
|
|
@@ -1470,10 +1477,10 @@ const Te = ({ className: t }) => {
|
|
|
1470
1477
|
}
|
|
1471
1478
|
)
|
|
1472
1479
|
] }),
|
|
1473
|
-
/* @__PURE__ */ n(
|
|
1480
|
+
/* @__PURE__ */ n(ge, {})
|
|
1474
1481
|
]
|
|
1475
1482
|
}
|
|
1476
|
-
),
|
|
1483
|
+
), Ht = i(le)`
|
|
1477
1484
|
z-index: 11;
|
|
1478
1485
|
top: auto;
|
|
1479
1486
|
height: 65%;
|
|
@@ -1488,7 +1495,7 @@ const Te = ({ className: t }) => {
|
|
|
1488
1495
|
var e;
|
|
1489
1496
|
return (e = t.theme.sizes) == null ? void 0 : e.large;
|
|
1490
1497
|
}};
|
|
1491
|
-
`,
|
|
1498
|
+
`, Tt = i.div`
|
|
1492
1499
|
display: flex;
|
|
1493
1500
|
flex-direction: column;
|
|
1494
1501
|
justify-content: center;
|
|
@@ -1502,7 +1509,7 @@ const Te = ({ className: t }) => {
|
|
|
1502
1509
|
return (e = t.theme.sizes) == null ? void 0 : e.normal;
|
|
1503
1510
|
}};
|
|
1504
1511
|
${(t) => t.theme.border && `border-bottom: ${t.theme.border};`}
|
|
1505
|
-
`,
|
|
1512
|
+
`, At = i(X)`
|
|
1506
1513
|
font-size: ${(t) => {
|
|
1507
1514
|
var e;
|
|
1508
1515
|
return (e = t.theme.fonts) == null ? void 0 : e.medium;
|
|
@@ -1512,7 +1519,7 @@ const Te = ({ className: t }) => {
|
|
|
1512
1519
|
return (e = t.theme.colors) == null ? void 0 : e.text;
|
|
1513
1520
|
}};
|
|
1514
1521
|
margin: 0;
|
|
1515
|
-
`,
|
|
1522
|
+
`, Ot = i(I)`
|
|
1516
1523
|
display: flex;
|
|
1517
1524
|
align-items: center;
|
|
1518
1525
|
justify-content: center;
|
|
@@ -1526,7 +1533,7 @@ const Te = ({ className: t }) => {
|
|
|
1526
1533
|
${(t) => t.theme.borderRadius && `border-radius: ${t.theme.borderRadius};`}
|
|
1527
1534
|
|
|
1528
1535
|
&:focus-visible {
|
|
1529
|
-
${
|
|
1536
|
+
${f};
|
|
1530
1537
|
}
|
|
1531
1538
|
|
|
1532
1539
|
svg line {
|
|
@@ -1535,37 +1542,37 @@ const Te = ({ className: t }) => {
|
|
|
1535
1542
|
return (e = t.theme.colors) == null ? void 0 : e.text;
|
|
1536
1543
|
}};
|
|
1537
1544
|
}
|
|
1538
|
-
`,
|
|
1545
|
+
`, Ft = ({ className: t, ...e }) => {
|
|
1539
1546
|
const {
|
|
1540
|
-
overlay:
|
|
1541
|
-
overlayConversationHeader:
|
|
1547
|
+
overlay: r,
|
|
1548
|
+
overlayConversationHeader: o,
|
|
1542
1549
|
overlayConversationCloseLabel: s,
|
|
1543
|
-
conversationControllerId:
|
|
1544
|
-
} = C(),
|
|
1550
|
+
conversationControllerId: a
|
|
1551
|
+
} = C(), m = Y(), c = T().get("$settings");
|
|
1545
1552
|
return /* @__PURE__ */ n(
|
|
1546
|
-
|
|
1553
|
+
Se.Provider,
|
|
1547
1554
|
{
|
|
1548
|
-
value:
|
|
1549
|
-
children: /* @__PURE__ */ u(
|
|
1555
|
+
value: a ? { id: a } : null,
|
|
1556
|
+
children: /* @__PURE__ */ u(ue.Provider, { value: c == null ? void 0 : c.language, children: [
|
|
1550
1557
|
/* @__PURE__ */ n(
|
|
1551
|
-
|
|
1558
|
+
Rt,
|
|
1552
1559
|
{
|
|
1553
1560
|
"aria-live": "assertive",
|
|
1554
1561
|
...e,
|
|
1555
|
-
className:
|
|
1562
|
+
className: A(
|
|
1556
1563
|
t,
|
|
1557
1564
|
"humany-conversation-component"
|
|
1558
1565
|
),
|
|
1559
|
-
children: /* @__PURE__ */ n(
|
|
1566
|
+
children: /* @__PURE__ */ n(ge, {})
|
|
1560
1567
|
}
|
|
1561
1568
|
),
|
|
1562
|
-
|
|
1563
|
-
/* @__PURE__ */ n(
|
|
1564
|
-
|
|
1565
|
-
|
|
1569
|
+
r && /* @__PURE__ */ u(N, { children: [
|
|
1570
|
+
/* @__PURE__ */ n(Mt, { dispatch: m }),
|
|
1571
|
+
r.conversation && /* @__PURE__ */ n(
|
|
1572
|
+
It,
|
|
1566
1573
|
{
|
|
1567
|
-
dispatch:
|
|
1568
|
-
header:
|
|
1574
|
+
dispatch: m,
|
|
1575
|
+
header: o,
|
|
1569
1576
|
buttonLabel: s
|
|
1570
1577
|
}
|
|
1571
1578
|
)
|
|
@@ -1573,7 +1580,7 @@ const Te = ({ className: t }) => {
|
|
|
1573
1580
|
] })
|
|
1574
1581
|
}
|
|
1575
1582
|
);
|
|
1576
|
-
},
|
|
1583
|
+
}, Rt = i.div`
|
|
1577
1584
|
position: absolute;
|
|
1578
1585
|
right: 0;
|
|
1579
1586
|
left: 0;
|
|
@@ -1584,5 +1591,5 @@ const Te = ({ className: t }) => {
|
|
|
1584
1591
|
flex-direction: column;
|
|
1585
1592
|
`;
|
|
1586
1593
|
export {
|
|
1587
|
-
|
|
1594
|
+
Ft as default
|
|
1588
1595
|
};
|