@helpway/react 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +31 -3
- package/dist/index.js +723 -432
- package/dist/index.js.map +1 -1
- package/package.json +5 -3
- package/src/themed/styles.css +427 -30
package/dist/index.js
CHANGED
|
@@ -462,6 +462,23 @@ function createWidgetStore() {
|
|
|
462
462
|
state.setTyping(event.conversationId, false);
|
|
463
463
|
break;
|
|
464
464
|
}
|
|
465
|
+
case "conversationCreated": {
|
|
466
|
+
const conv = event.conversation;
|
|
467
|
+
const alreadyPresent = state.conversations.some((c) => c.id === conv.id);
|
|
468
|
+
if (alreadyPresent) break;
|
|
469
|
+
state.addConversation({
|
|
470
|
+
id: conv.id,
|
|
471
|
+
title: conv.title,
|
|
472
|
+
status: conv.status,
|
|
473
|
+
lastMessageText: conv.lastMessageText ?? null,
|
|
474
|
+
lastMessageAt: conv.lastMessageAt ?? null,
|
|
475
|
+
lastMessageSenderType: conv.lastMessageSenderType ?? null,
|
|
476
|
+
lastMessageSenderName: null,
|
|
477
|
+
lastMessageSenderImage: null,
|
|
478
|
+
unreadCount: 0
|
|
479
|
+
});
|
|
480
|
+
break;
|
|
481
|
+
}
|
|
465
482
|
default:
|
|
466
483
|
break;
|
|
467
484
|
}
|
|
@@ -513,7 +530,7 @@ var en = {
|
|
|
513
530
|
// Date separators (today is implicit — never rendered)
|
|
514
531
|
"widget.yesterday": "Yesterday",
|
|
515
532
|
// Sender labels
|
|
516
|
-
"widget.
|
|
533
|
+
"widget.helpway_ai": "Helpway AI",
|
|
517
534
|
"widget.support": "Support",
|
|
518
535
|
// Events
|
|
519
536
|
"widget.joined": "joined the conversation",
|
|
@@ -809,6 +826,9 @@ function SupportProvider({
|
|
|
809
826
|
status: c.status,
|
|
810
827
|
lastMessageText: c.lastMessageText,
|
|
811
828
|
lastMessageAt: c.lastMessageAt,
|
|
829
|
+
lastMessageSenderType: c.lastMessageSenderType,
|
|
830
|
+
lastMessageSenderName: c.lastMessageSenderName,
|
|
831
|
+
lastMessageSenderImage: c.lastMessageSenderImage,
|
|
812
832
|
unreadCount: 0
|
|
813
833
|
})
|
|
814
834
|
)
|
|
@@ -908,7 +928,7 @@ function inferApiUrl() {
|
|
|
908
928
|
}
|
|
909
929
|
|
|
910
930
|
// src/themed/default-widget.tsx
|
|
911
|
-
import { useCallback as useCallback12, useEffect as
|
|
931
|
+
import { useCallback as useCallback12, useEffect as useEffect11, useRef as useRef13, useState as useState12 } from "react";
|
|
912
932
|
|
|
913
933
|
// src/hooks/use-composer.ts
|
|
914
934
|
import { useCallback as useCallback2, useState as useState2 } from "react";
|
|
@@ -920,6 +940,7 @@ function useComposer(conversationId) {
|
|
|
920
940
|
const [isSubmitting, setIsSubmitting] = useState2(false);
|
|
921
941
|
const [attachments, setAttachments] = useState2([]);
|
|
922
942
|
const [sendError, setSendError] = useState2(null);
|
|
943
|
+
const [emailGateConvId, setEmailGateConvId] = useState2(null);
|
|
923
944
|
const addFiles = useCallback2(
|
|
924
945
|
async (files) => {
|
|
925
946
|
if (!conversationId) return;
|
|
@@ -1025,6 +1046,9 @@ function useComposer(conversationId) {
|
|
|
1025
1046
|
if (result.item) {
|
|
1026
1047
|
store.getState().replaceMessage(conv.id, optimisticId, result.item);
|
|
1027
1048
|
}
|
|
1049
|
+
if (result.requireEmail) {
|
|
1050
|
+
setEmailGateConvId(conv.id);
|
|
1051
|
+
}
|
|
1028
1052
|
} else {
|
|
1029
1053
|
const result = await client.widget.sendMessage.mutate({
|
|
1030
1054
|
conversationId,
|
|
@@ -1057,7 +1081,8 @@ function useComposer(conversationId) {
|
|
|
1057
1081
|
addFiles,
|
|
1058
1082
|
removeAttachment,
|
|
1059
1083
|
sendError,
|
|
1060
|
-
clearSendError
|
|
1084
|
+
clearSendError,
|
|
1085
|
+
emailGateConvId
|
|
1061
1086
|
};
|
|
1062
1087
|
}
|
|
1063
1088
|
function fileToBase64(file) {
|
|
@@ -1113,6 +1138,9 @@ function useConversations() {
|
|
|
1113
1138
|
status: "open",
|
|
1114
1139
|
lastMessageText: text,
|
|
1115
1140
|
lastMessageAt: now,
|
|
1141
|
+
lastMessageSenderType: "visitor",
|
|
1142
|
+
lastMessageSenderName: null,
|
|
1143
|
+
lastMessageSenderImage: null,
|
|
1116
1144
|
unreadCount: 0
|
|
1117
1145
|
});
|
|
1118
1146
|
store2.setMessages(tempConversationId, [optimisticMsg]);
|
|
@@ -1294,39 +1322,215 @@ function useWidget() {
|
|
|
1294
1322
|
import { useCallback as useCallback7, useRef as useRef7, useState as useState7 } from "react";
|
|
1295
1323
|
|
|
1296
1324
|
// src/themed/icons.tsx
|
|
1297
|
-
import {
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1325
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
1326
|
+
function XIcon({ size = 24, ...props }) {
|
|
1327
|
+
return /* @__PURE__ */ jsx2(
|
|
1328
|
+
"svg",
|
|
1329
|
+
{
|
|
1330
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1331
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1332
|
+
viewBox: "0 0 24 24",
|
|
1333
|
+
fill: "none",
|
|
1334
|
+
"aria-hidden": true,
|
|
1335
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1336
|
+
...props,
|
|
1337
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M6.5 6.5L17.5 17.5M17.5 6.5L6.5 17.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
1338
|
+
}
|
|
1339
|
+
);
|
|
1340
|
+
}
|
|
1341
|
+
function SendIcon({ size = 24, ...props }) {
|
|
1342
|
+
return /* @__PURE__ */ jsx2(
|
|
1343
|
+
"svg",
|
|
1344
|
+
{
|
|
1345
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1346
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1347
|
+
viewBox: "0 0 24 24",
|
|
1348
|
+
fill: "none",
|
|
1349
|
+
"aria-hidden": true,
|
|
1350
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1351
|
+
...props,
|
|
1352
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M9.61946 10.8613L20.9997 4.55422M9.04735 10.9043L4.10061 5.68812C3.49632 5.05091 3.94803 4 4.82621 4H20.2513C21.0247 4 21.5054 4.84039 21.1132 5.50702L13.1902 18.9762C12.7433 19.7358 11.6035 19.5879 11.3654 18.7393L9.28458 11.3223C9.24066 11.1658 9.15923 11.0223 9.04735 10.9043Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1353
|
+
}
|
|
1354
|
+
);
|
|
1355
|
+
}
|
|
1356
|
+
function PaperclipIcon({ size = 24, ...props }) {
|
|
1357
|
+
return /* @__PURE__ */ jsx2(
|
|
1358
|
+
"svg",
|
|
1359
|
+
{
|
|
1360
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1361
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1362
|
+
viewBox: "0 0 24 24",
|
|
1363
|
+
fill: "none",
|
|
1364
|
+
"aria-hidden": true,
|
|
1365
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1366
|
+
...props,
|
|
1367
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M6 11V15C6 18.3137 8.68629 21 12 21C15.3137 21 18 18.3137 18 15V7C18 4.79086 16.2091 3 14 3C11.7909 3 10 4.79086 10 7V15C10 16.1046 10.8954 17 12 17C13.1046 17 14 16.1046 14 15V7", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
1368
|
+
}
|
|
1369
|
+
);
|
|
1370
|
+
}
|
|
1371
|
+
function HomeIcon({ size = 24, ...props }) {
|
|
1372
|
+
return /* @__PURE__ */ jsx2(
|
|
1373
|
+
"svg",
|
|
1374
|
+
{
|
|
1375
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1376
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1377
|
+
viewBox: "0 0 24 24",
|
|
1378
|
+
fill: "none",
|
|
1379
|
+
"aria-hidden": true,
|
|
1380
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1381
|
+
...props,
|
|
1382
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M4 9.77313C4 9.2136 4 8.93383 4.07063 8.67517C4.1332 8.446 4.23609 8.22982 4.3745 8.03675C4.53071 7.81882 4.74784 7.6424 5.1821 7.28957L9.9821 3.38956C10.7014 2.80513 11.0611 2.51291 11.4609 2.40099C11.8135 2.30229 12.1865 2.30229 12.5391 2.40099C12.9389 2.51291 13.2986 2.80513 14.0179 3.38957L18.8179 7.28957C19.2522 7.6424 19.4693 7.81882 19.6255 8.03675C19.7639 8.22982 19.8668 8.446 19.9294 8.67517C20 8.93383 20 9.2136 20 9.77313V16.8C20 17.9201 20 18.4802 19.782 18.908C19.5903 19.2843 19.2843 19.5903 18.908 19.782C18.4802 20 17.9201 20 16.8 20H7.2C6.07989 20 5.51984 20 5.09202 19.782C4.71569 19.5903 4.40973 19.2843 4.21799 18.908C4 18.4802 4 17.9201 4 16.8V9.77313Z", stroke: "currentColor", strokeWidth: "2", strokeLinejoin: "round" })
|
|
1383
|
+
}
|
|
1384
|
+
);
|
|
1385
|
+
}
|
|
1386
|
+
function MessagesIcon({ size = 24, ...props }) {
|
|
1387
|
+
return /* @__PURE__ */ jsxs(
|
|
1388
|
+
"svg",
|
|
1389
|
+
{
|
|
1390
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1391
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1392
|
+
viewBox: "0 0 24 24",
|
|
1393
|
+
fill: "none",
|
|
1394
|
+
"aria-hidden": true,
|
|
1395
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1396
|
+
...props,
|
|
1397
|
+
children: [
|
|
1398
|
+
/* @__PURE__ */ jsx2("path", { d: "M4.00195 6.00003C4.00195 4.89546 4.89738 4.00003 6.00195 4.00002L18.0019 4C19.1065 4 20.002 4.89543 20.002 6V16.0358C20.002 17.1403 19.1065 18.0358 18.002 18.0358L15.3757 18.0358C15.1427 18.0358 14.9171 18.1171 14.7377 18.2657L11.9977 20.5358L9.29398 18.2694C9.11393 18.1185 8.8865 18.0358 8.65157 18.0358H6.00195C4.89738 18.0358 4.00195 17.1403 4.00195 16.0358V6.00003Z", stroke: "currentColor", strokeWidth: "2", strokeLinejoin: "round" }),
|
|
1399
|
+
/* @__PURE__ */ jsx2("path", { d: "M6.875 11.25C6.875 11.7332 7.26675 12.125 7.75 12.125C8.23325 12.125 8.625 11.7332 8.625 11.25C8.625 10.7668 8.23325 10.375 7.75 10.375C7.26675 10.375 6.875 10.7668 6.875 11.25ZM11.125 11.25C11.125 11.7332 11.5168 12.125 12 12.125C12.4832 12.125 12.875 11.7332 12.875 11.25C12.875 10.7668 12.4832 10.375 12 10.375C11.5168 10.375 11.125 10.7668 11.125 11.25ZM15.375 11.25C15.375 11.7332 15.7668 12.125 16.25 12.125C16.7332 12.125 17.125 11.7332 17.125 11.25C17.125 10.7668 16.7332 10.375 16.25 10.375C15.7668 10.375 15.375 10.7668 15.375 11.25Z", fill: "currentColor", stroke: "currentColor", strokeWidth: "0.75", strokeLinecap: "square" })
|
|
1400
|
+
]
|
|
1401
|
+
}
|
|
1402
|
+
);
|
|
1403
|
+
}
|
|
1404
|
+
function BookIcon({ size = 24, ...props }) {
|
|
1405
|
+
return /* @__PURE__ */ jsx2(
|
|
1406
|
+
"svg",
|
|
1407
|
+
{
|
|
1408
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1409
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1410
|
+
viewBox: "0 0 24 24",
|
|
1411
|
+
fill: "none",
|
|
1412
|
+
"aria-hidden": true,
|
|
1413
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1414
|
+
...props,
|
|
1415
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M9 6C8.44772 6 8 6.44772 8 7C8 7.55228 8.44772 8 9 8V6ZM15 8C15.5523 8 16 7.55228 16 7C16 6.44772 15.5523 6 15 6V8ZM9 10C8.44772 10 8 10.4477 8 11C8 11.5523 8.44772 12 9 12V10ZM12 12C12.5523 12 13 11.5523 13 11C13 10.4477 12.5523 10 12 10V12ZM7 4H17V2H7V4ZM18 5V19H20V5H18ZM17 20H7V22H17V20ZM6 19V5H4V19H6ZM7 20C6.44771 20 6 19.5523 6 19H4C4 20.6569 5.34315 22 7 22V20ZM18 19C18 19.5523 17.5523 20 17 20V22C18.6569 22 20 20.6569 20 19H18ZM17 4C17.5523 4 18 4.44772 18 5H20C20 3.34315 18.6569 2 17 2V4ZM7 2C5.34315 2 4 3.34315 4 5H6C6 4.44772 6.44772 4 7 4V2ZM18 12V15H20V12H18ZM17 16H7V18H17V16ZM7 22H10V20H7V22ZM7 16C5.34315 16 4 17.3431 4 19H6C6 18.4477 6.44772 18 7 18V16ZM18 15C18 15.5523 17.5523 16 17 16V18C18.6569 18 20 16.6569 20 15H18ZM9 8H15V6H9V8ZM9 12H12V10H9V12Z", fill: "currentColor" })
|
|
1416
|
+
}
|
|
1417
|
+
);
|
|
1418
|
+
}
|
|
1419
|
+
function MegaphoneIcon({ size = 24, ...props }) {
|
|
1420
|
+
return /* @__PURE__ */ jsx2(
|
|
1421
|
+
"svg",
|
|
1422
|
+
{
|
|
1423
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1424
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1425
|
+
viewBox: "0 0 24 24",
|
|
1426
|
+
fill: "none",
|
|
1427
|
+
"aria-hidden": true,
|
|
1428
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1429
|
+
...props,
|
|
1430
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M17.9961 14.0001C19.6529 14.0001 20.9961 12.657 20.9961 11.0001C20.9961 9.34325 19.6529 8.0001 17.9961 8.0001M12.8254 18.0001C12.4136 19.1653 11.3023 20.0001 9.99609 20.0001C8.33924 20.0001 6.99609 18.657 6.99609 17.0001V15.5001M6.99829 6.5001V15.5001M17.9961 5.73752V16.2627C17.9961 17.617 16.6784 18.5797 15.3882 18.1681L4.38819 14.6585C3.55899 14.394 2.99609 13.6235 2.99609 12.7532V9.24704C2.99609 8.37667 3.55899 7.60622 4.38819 7.34167L15.3882 3.83215C16.6784 3.42051 17.9961 4.38325 17.9961 5.73752Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1431
|
+
}
|
|
1432
|
+
);
|
|
1433
|
+
}
|
|
1434
|
+
function LightbulbIcon({ size = 24, ...props }) {
|
|
1435
|
+
return /* @__PURE__ */ jsx2(
|
|
1436
|
+
"svg",
|
|
1437
|
+
{
|
|
1438
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1439
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1440
|
+
viewBox: "0 0 24 24",
|
|
1441
|
+
fill: "none",
|
|
1442
|
+
"aria-hidden": true,
|
|
1443
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1444
|
+
...props,
|
|
1445
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M10 21H14M15.6076 15C17.6404 13.7751 19 11.5463 19 9C19 5.13401 15.866 2 12 2C8.13401 2 5 5.13401 5 9C5 11.5463 6.35958 13.7751 8.39241 15M15.6076 15C15.4111 15.1184 15.2084 15.2274 15 15.3264V17C15 17.5523 14.5523 18 14 18H10C9.44772 18 9 17.5523 9 17V15.3264C8.7916 15.2274 8.58886 15.1184 8.39241 15M15.6076 15H8.39241", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1446
|
+
}
|
|
1447
|
+
);
|
|
1448
|
+
}
|
|
1449
|
+
function HelpCircleIcon({ size = 24, ...props }) {
|
|
1450
|
+
return /* @__PURE__ */ jsxs(
|
|
1451
|
+
"svg",
|
|
1452
|
+
{
|
|
1453
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1454
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1455
|
+
viewBox: "0 0 24 24",
|
|
1456
|
+
fill: "none",
|
|
1457
|
+
"aria-hidden": true,
|
|
1458
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1459
|
+
...props,
|
|
1460
|
+
children: [
|
|
1461
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1462
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 16V16.01", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }),
|
|
1463
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 13C12 11.3608 14 11.9319 14 10C14 8.89543 13.1046 8 12 8C11.2597 8 10.6134 8.4022 10.2676 9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1464
|
+
]
|
|
1465
|
+
}
|
|
1466
|
+
);
|
|
1467
|
+
}
|
|
1468
|
+
function NewspaperIcon({ size = 24, ...props }) {
|
|
1469
|
+
return /* @__PURE__ */ jsx2(
|
|
1470
|
+
"svg",
|
|
1471
|
+
{
|
|
1472
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1473
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1474
|
+
viewBox: "0 0 24 24",
|
|
1475
|
+
fill: "none",
|
|
1476
|
+
"aria-hidden": true,
|
|
1477
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1478
|
+
...props,
|
|
1479
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M16 12V6C16 4.89543 15.1046 4 14 4H5C3.89543 4 3 4.89543 3 6V17.5C3 18.8807 4.11929 20 5.5 20H18.5M16 12V17.5C16 18.8807 17.1193 20 18.5 20M16 12H19C20.1046 12 21 12.8954 21 14V17.5C21 18.8807 19.8807 20 18.5 20M7 16H12M7 8H12V12H7V8Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1480
|
+
}
|
|
1481
|
+
);
|
|
1482
|
+
}
|
|
1483
|
+
function StarIcon({ size = 24, ...props }) {
|
|
1484
|
+
return /* @__PURE__ */ jsx2(
|
|
1485
|
+
"svg",
|
|
1486
|
+
{
|
|
1487
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1488
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1489
|
+
viewBox: "0 0 24 24",
|
|
1490
|
+
fill: "none",
|
|
1491
|
+
"aria-hidden": true,
|
|
1492
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1493
|
+
...props,
|
|
1494
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M11.5288 2.29524C11.7179 1.90159 12.2821 1.90159 12.4712 2.29524L14.9458 7.44648C15.0219 7.60491 15.1735 7.71434 15.3487 7.73728L21.0456 8.4832C21.4809 8.5402 21.6552 9.07312 21.3368 9.37342L17.1693 13.303C17.0412 13.4238 16.9832 13.6009 17.0154 13.7735L18.0616 19.3857C18.1416 19.8146 17.6852 20.144 17.2993 19.9359L12.249 17.2133C12.0937 17.1296 11.9063 17.1296 11.751 17.2133L6.70073 19.9359C6.3148 20.144 5.85841 19.8146 5.93837 19.3857L6.98459 13.7735C7.01677 13.6009 6.95885 13.4238 6.83068 13.303L2.66324 9.37342C2.34476 9.07312 2.51909 8.5402 2.95444 8.4832L8.65127 7.73728C8.82648 7.71434 8.97811 7.60491 9.05422 7.44648L11.5288 2.29524Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1495
|
+
}
|
|
1496
|
+
);
|
|
1497
|
+
}
|
|
1318
1498
|
|
|
1319
1499
|
// src/themed/message-bubble.tsx
|
|
1320
|
-
import { useCallback as useCallback6, useLayoutEffect, useRef as useRef6, useState as useState6 } from "react";
|
|
1500
|
+
import { useCallback as useCallback6, useEffect as useEffect5, useLayoutEffect, useRef as useRef6, useState as useState6 } from "react";
|
|
1321
1501
|
import { createPortal } from "react-dom";
|
|
1322
1502
|
|
|
1323
1503
|
// src/themed/content/simple-markdown.tsx
|
|
1324
1504
|
import { useEffect as useEffect4, useRef as useRef5 } from "react";
|
|
1325
|
-
import { jsx as
|
|
1505
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
1506
|
+
var COPY_ICON = `<svg class="hw-code-copy-icon" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M15 9V4.25C15 3.55964 14.4404 3 13.75 3H4.25C3.55964 3 3 3.55964 3 4.25V13.75C3 14.4404 3.55964 15 4.25 15H9M10.25 9H19.75C20.4404 9 21 9.55964 21 10.25V19.75C21 20.4404 20.4404 21 19.75 21H10.25C9.55964 21 9 20.4404 9 19.75V10.25C9 9.55964 9.55964 9 10.25 9Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;
|
|
1507
|
+
var CHECK_ICON = `<svg class="hw-code-check-icon" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M8 13L11 16L16 8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;
|
|
1508
|
+
function inferCodeLanguage(code, lang) {
|
|
1509
|
+
if (lang) return lang;
|
|
1510
|
+
const trimmed = code.trim();
|
|
1511
|
+
if (/^(npm|pnpm|yarn|bun|npx|curl|cd|mkdir|cp|mv|rm|export)\b/m.test(trimmed)) return "bash";
|
|
1512
|
+
if (/\b(import|export)\b/.test(trimmed) && /<[A-Z_a-z][\w.:-]*(\s|>)/.test(trimmed)) return "tsx";
|
|
1513
|
+
if (/\b(import|export|const|let|function|type|interface)\b/.test(trimmed)) return "ts";
|
|
1514
|
+
if (/^\s*[{[]/.test(trimmed)) return "json";
|
|
1515
|
+
return "code";
|
|
1516
|
+
}
|
|
1517
|
+
function handleCodeBlockClick(e, root) {
|
|
1518
|
+
const target = e.target;
|
|
1519
|
+
const btn = target?.closest(".hw-code-copy");
|
|
1520
|
+
if (!btn || !root.contains(btn)) return;
|
|
1521
|
+
const block = btn.closest(".hw-code");
|
|
1522
|
+
const code = block?.querySelector("pre code");
|
|
1523
|
+
const text = code?.textContent ?? "";
|
|
1524
|
+
if (!text) return;
|
|
1525
|
+
void navigator.clipboard?.writeText(text).then(
|
|
1526
|
+
() => flashCopied(btn),
|
|
1527
|
+
() => flashCopied(btn, true)
|
|
1528
|
+
);
|
|
1529
|
+
}
|
|
1326
1530
|
function renderMarkdown(md) {
|
|
1327
1531
|
const codeBlocks = [];
|
|
1328
1532
|
const codeBlockPlaceholder = (i) => `\0CODEBLOCK${i}\0`;
|
|
1329
|
-
|
|
1533
|
+
const body = md.replace(
|
|
1330
1534
|
// Eat ALL newlines around the fence (zero-or-more both sides). The
|
|
1331
1535
|
// replacement re-emits its own `\n\n` pair so the paragraph splitter
|
|
1332
1536
|
// cleanly bookends the fence. Without this, `before\n\n` + `\n\n` from
|
|
@@ -1334,11 +1538,11 @@ function renderMarkdown(md) {
|
|
|
1334
1538
|
/\n*```(\w+)?\n?([\s\S]*?)```\n*/g,
|
|
1335
1539
|
(_match, lang, code) => {
|
|
1336
1540
|
const escaped = code.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1337
|
-
const
|
|
1338
|
-
const
|
|
1541
|
+
const langLabel = inferCodeLanguage(code, lang);
|
|
1542
|
+
const className = langLabel !== "code" ? ` class="language-${langLabel}"` : "";
|
|
1339
1543
|
const trimmed = escaped.replace(/\n$/, "");
|
|
1340
1544
|
codeBlocks.push(
|
|
1341
|
-
`<div class="hw-code" data-hw-code="1"><div class="hw-code-header"><span class="hw-code-lang">${langLabel}</span><button type="button" class="hw-code-copy" aria-label="Copy code"
|
|
1545
|
+
`<div class="hw-code" data-hw-code="1"><div class="hw-code-header"><span class="hw-code-lang">${langLabel}</span><div class="hw-code-actions"><button type="button" class="hw-code-action hw-code-copy" aria-label="Copy code" title="Copy code">${COPY_ICON}${CHECK_ICON}<span class="hw-code-copy-label">Copy</span></button></div></div><pre><code${className}>${trimmed}</code></pre></div>`
|
|
1342
1546
|
);
|
|
1343
1547
|
return `
|
|
1344
1548
|
|
|
@@ -1363,10 +1567,7 @@ ${codeBlockPlaceholder(codeBlocks.length - 1)}
|
|
|
1363
1567
|
const i = Number.parseInt(idx, 10);
|
|
1364
1568
|
return codeBlocks[i] ?? "";
|
|
1365
1569
|
});
|
|
1366
|
-
html = html.replace(
|
|
1367
|
-
/<p>(\s*<div class="hw-code"[\s\S]*?<\/div>\s*)<\/p>/g,
|
|
1368
|
-
"$1"
|
|
1369
|
-
);
|
|
1570
|
+
html = html.replace(/<p>(\s*<div class="hw-code"[\s\S]*?<\/div>\s*)<\/p>/g, "$1");
|
|
1370
1571
|
}
|
|
1371
1572
|
return html;
|
|
1372
1573
|
}
|
|
@@ -1386,26 +1587,35 @@ function MarkdownContent({
|
|
|
1386
1587
|
useEffect4(() => {
|
|
1387
1588
|
const root = rootRef.current;
|
|
1388
1589
|
if (!root) return;
|
|
1389
|
-
const
|
|
1390
|
-
const
|
|
1391
|
-
|
|
1392
|
-
if (!btn || !root.contains(btn)) return;
|
|
1393
|
-
const block = btn.closest(".hw-code");
|
|
1394
|
-
const code = block?.querySelector("pre code");
|
|
1395
|
-
const text = code?.textContent ?? "";
|
|
1396
|
-
if (!text) return;
|
|
1397
|
-
void navigator.clipboard?.writeText(text).then(
|
|
1398
|
-
() => flashCopied(btn),
|
|
1399
|
-
() => flashCopied(btn, true)
|
|
1590
|
+
const isWhitespaceOnly = (el) => {
|
|
1591
|
+
const hasNonBrChild = Array.from(el.children).some(
|
|
1592
|
+
(c) => c.tagName !== "BR"
|
|
1400
1593
|
);
|
|
1594
|
+
if (hasNonBrChild) return false;
|
|
1595
|
+
const text = el.textContent ?? "";
|
|
1596
|
+
return text.replace(/[\s ]/g, "") === "";
|
|
1597
|
+
};
|
|
1598
|
+
const removeEmpties = () => {
|
|
1599
|
+
const candidates = root.querySelectorAll("p, div");
|
|
1600
|
+
candidates.forEach((el) => {
|
|
1601
|
+
if (isWhitespaceOnly(el)) el.remove();
|
|
1602
|
+
});
|
|
1603
|
+
};
|
|
1604
|
+
removeEmpties();
|
|
1605
|
+
}, [html]);
|
|
1606
|
+
useEffect4(() => {
|
|
1607
|
+
const root = rootRef.current;
|
|
1608
|
+
if (!root) return;
|
|
1609
|
+
const handler = (e) => {
|
|
1610
|
+
handleCodeBlockClick(e, root);
|
|
1401
1611
|
};
|
|
1402
1612
|
root.addEventListener("click", handler);
|
|
1403
1613
|
return () => {
|
|
1404
1614
|
root.removeEventListener("click", handler);
|
|
1405
1615
|
};
|
|
1406
|
-
}, [
|
|
1616
|
+
}, []);
|
|
1407
1617
|
if (!html) return null;
|
|
1408
|
-
return /* @__PURE__ */
|
|
1618
|
+
return /* @__PURE__ */ jsx3(
|
|
1409
1619
|
"div",
|
|
1410
1620
|
{
|
|
1411
1621
|
ref: rootRef,
|
|
@@ -1427,31 +1637,42 @@ function flashCopied(btn, failed = false) {
|
|
|
1427
1637
|
}
|
|
1428
1638
|
|
|
1429
1639
|
// src/themed/message-bubble.tsx
|
|
1430
|
-
import { Fragment, jsx as
|
|
1431
|
-
function MessageBubble({ text, sender, senderName,
|
|
1640
|
+
import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1641
|
+
function MessageBubble({ text, sender, senderName, parts }) {
|
|
1432
1642
|
const senderClass = `hw-msg--${sender}`;
|
|
1433
|
-
const agentName = useWidgetStore((s) => s.agentConfig?.name) ?? t("widget.
|
|
1434
|
-
const
|
|
1435
|
-
const
|
|
1643
|
+
const agentName = useWidgetStore((s) => s.agentConfig?.name) ?? t("widget.helpway_ai");
|
|
1644
|
+
const senderLabel = sender === "ai" ? agentName : sender === "team" ? senderName ?? t("widget.support") : null;
|
|
1645
|
+
const bubbleRef = useRef6(null);
|
|
1436
1646
|
const imageParts = parts?.filter((p) => p.type === "image") ?? [];
|
|
1437
1647
|
const fileParts = parts?.filter((p) => p.type === "file") ?? [];
|
|
1438
1648
|
const hasText = text.length > 0;
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1649
|
+
useEffect5(() => {
|
|
1650
|
+
const bubble = bubbleRef.current;
|
|
1651
|
+
if (!bubble || sender !== "ai" && sender !== "team") return;
|
|
1652
|
+
const handleClick = (event) => {
|
|
1653
|
+
handleCodeBlockClick(event, bubble);
|
|
1654
|
+
};
|
|
1655
|
+
bubble.addEventListener("click", handleClick);
|
|
1656
|
+
return () => {
|
|
1657
|
+
bubble.removeEventListener("click", handleClick);
|
|
1658
|
+
};
|
|
1659
|
+
}, [sender]);
|
|
1660
|
+
return /* @__PURE__ */ jsx4("div", { className: `hw-msg ${senderClass}`, children: /* @__PURE__ */ jsxs2("div", { className: "hw-msg-body", children: [
|
|
1661
|
+
sender === "team" && /* @__PURE__ */ jsx4("div", { className: "hw-msg-sender", children: senderName ?? t("widget.support") }),
|
|
1662
|
+
imageParts.length > 0 && /* @__PURE__ */ jsx4("div", { className: "hw-msg-images", children: imageParts.map((img, i) => /* @__PURE__ */ jsx4(PreviewableThumbnail, { src: img.url }, i)) }),
|
|
1663
|
+
hasText && /* @__PURE__ */ jsx4("div", { className: "hw-msg-bubble", ref: bubbleRef, children: sender === "ai" || sender === "team" ? /* @__PURE__ */ jsx4("span", { dangerouslySetInnerHTML: { __html: renderMarkdown(text) } }) : /* @__PURE__ */ jsx4("span", { dangerouslySetInnerHTML: { __html: linkifyText(text) } }) }),
|
|
1664
|
+
fileParts.length > 0 && /* @__PURE__ */ jsx4("div", { className: "hw-msg-files", children: fileParts.map((file, i) => /* @__PURE__ */ jsx4(FileCard, { file }, i)) }),
|
|
1665
|
+
/* @__PURE__ */ jsxs2("div", { className: "hw-msg-meta", children: [
|
|
1666
|
+
senderLabel && /* @__PURE__ */ jsx4("span", { className: "hw-msg-sender-label", children: senderLabel }),
|
|
1667
|
+
hasText && /* @__PURE__ */ jsx4(CopyButton, { text })
|
|
1447
1668
|
] })
|
|
1448
1669
|
] }) });
|
|
1449
1670
|
}
|
|
1450
|
-
function PreviewableThumbnail({ src
|
|
1671
|
+
function PreviewableThumbnail({ src }) {
|
|
1451
1672
|
const [hover, setHover] = useState6(false);
|
|
1452
1673
|
const ref = useRef6(null);
|
|
1453
|
-
return /* @__PURE__ */
|
|
1454
|
-
/* @__PURE__ */
|
|
1674
|
+
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1675
|
+
/* @__PURE__ */ jsx4(
|
|
1455
1676
|
"a",
|
|
1456
1677
|
{
|
|
1457
1678
|
ref,
|
|
@@ -1461,10 +1682,10 @@ function PreviewableThumbnail({ src, type }) {
|
|
|
1461
1682
|
className: "hw-msg-image-link",
|
|
1462
1683
|
onMouseEnter: () => setHover(true),
|
|
1463
1684
|
onMouseLeave: () => setHover(false),
|
|
1464
|
-
children: /* @__PURE__ */
|
|
1685
|
+
children: /* @__PURE__ */ jsx4("img", { src, alt: "", className: "hw-msg-image", loading: "lazy" })
|
|
1465
1686
|
}
|
|
1466
1687
|
),
|
|
1467
|
-
hover && /* @__PURE__ */
|
|
1688
|
+
hover && /* @__PURE__ */ jsx4(AnchoredPreview, { src, anchorRef: ref, href: src })
|
|
1468
1689
|
] });
|
|
1469
1690
|
}
|
|
1470
1691
|
var PREVIEWABLE_EXTS = /* @__PURE__ */ new Set(["pdf", "csv", "png", "jpg", "jpeg", "gif", "webp", "svg"]);
|
|
@@ -1474,8 +1695,8 @@ function FileCard({ file }) {
|
|
|
1474
1695
|
const ext = file.fileName.split(".").pop()?.toLowerCase() ?? "";
|
|
1475
1696
|
const isPreviewable = PREVIEWABLE_EXTS.has(ext);
|
|
1476
1697
|
const isImage = file.mimeType.startsWith("image/");
|
|
1477
|
-
return /* @__PURE__ */
|
|
1478
|
-
/* @__PURE__ */
|
|
1698
|
+
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1699
|
+
/* @__PURE__ */ jsxs2(
|
|
1479
1700
|
"a",
|
|
1480
1701
|
{
|
|
1481
1702
|
ref,
|
|
@@ -1486,15 +1707,15 @@ function FileCard({ file }) {
|
|
|
1486
1707
|
onMouseEnter: () => isPreviewable && setHover(true),
|
|
1487
1708
|
onMouseLeave: () => setHover(false),
|
|
1488
1709
|
children: [
|
|
1489
|
-
/* @__PURE__ */
|
|
1490
|
-
/* @__PURE__ */
|
|
1491
|
-
/* @__PURE__ */
|
|
1492
|
-
/* @__PURE__ */
|
|
1710
|
+
/* @__PURE__ */ jsx4("span", { className: "hw-msg-file-icon", children: /* @__PURE__ */ jsx4(FileTypeIcon, { ext }) }),
|
|
1711
|
+
/* @__PURE__ */ jsxs2("span", { className: "hw-msg-file-info", children: [
|
|
1712
|
+
/* @__PURE__ */ jsx4("span", { className: "hw-msg-file-name", children: file.fileName }),
|
|
1713
|
+
/* @__PURE__ */ jsx4("span", { className: "hw-msg-file-size", children: formatFileSize(file.fileSize) })
|
|
1493
1714
|
] })
|
|
1494
1715
|
]
|
|
1495
1716
|
}
|
|
1496
1717
|
),
|
|
1497
|
-
hover && isPreviewable && (isImage ? /* @__PURE__ */
|
|
1718
|
+
hover && isPreviewable && (isImage ? /* @__PURE__ */ jsx4(AnchoredPreview, { src: file.url, anchorRef: ref, href: file.url }) : /* @__PURE__ */ jsx4(AnchoredDocPreview, { fileName: file.fileName, ext, anchorRef: ref, href: file.url }))
|
|
1498
1719
|
] });
|
|
1499
1720
|
}
|
|
1500
1721
|
function AnchoredPreview({
|
|
@@ -1528,7 +1749,7 @@ function AnchoredPreview({
|
|
|
1528
1749
|
};
|
|
1529
1750
|
if (!portalTarget) return null;
|
|
1530
1751
|
return createPortal(
|
|
1531
|
-
/* @__PURE__ */
|
|
1752
|
+
/* @__PURE__ */ jsx4("div", { className: "hw-hover-preview", style, onClick: handleClick, children: /* @__PURE__ */ jsx4("img", { src, alt: "", className: "hw-hover-preview-img" }) }),
|
|
1532
1753
|
portalTarget
|
|
1533
1754
|
);
|
|
1534
1755
|
}
|
|
@@ -1559,17 +1780,17 @@ function AnchoredDocPreview({
|
|
|
1559
1780
|
}, [anchorRef]);
|
|
1560
1781
|
if (!portalTarget) return null;
|
|
1561
1782
|
return createPortal(
|
|
1562
|
-
/* @__PURE__ */
|
|
1783
|
+
/* @__PURE__ */ jsxs2(
|
|
1563
1784
|
"div",
|
|
1564
1785
|
{
|
|
1565
1786
|
className: "hw-hover-preview hw-hover-preview--doc",
|
|
1566
1787
|
style,
|
|
1567
1788
|
onClick: () => window.open(href, "_blank"),
|
|
1568
1789
|
children: [
|
|
1569
|
-
/* @__PURE__ */
|
|
1570
|
-
/* @__PURE__ */
|
|
1571
|
-
/* @__PURE__ */
|
|
1572
|
-
/* @__PURE__ */
|
|
1790
|
+
/* @__PURE__ */ jsx4("div", { className: "hw-hover-preview-doc-icon", children: /* @__PURE__ */ jsx4(FileTypeIcon, { ext }) }),
|
|
1791
|
+
/* @__PURE__ */ jsxs2("div", { className: "hw-hover-preview-doc-info", children: [
|
|
1792
|
+
/* @__PURE__ */ jsx4("span", { className: "hw-hover-preview-doc-name", children: fileName }),
|
|
1793
|
+
/* @__PURE__ */ jsx4("span", { className: "hw-hover-preview-doc-hint", children: t("widget.click_to_open") })
|
|
1573
1794
|
] })
|
|
1574
1795
|
]
|
|
1575
1796
|
}
|
|
@@ -1596,14 +1817,14 @@ function CopyButton({ text }) {
|
|
|
1596
1817
|
},
|
|
1597
1818
|
[text]
|
|
1598
1819
|
);
|
|
1599
|
-
return /* @__PURE__ */
|
|
1820
|
+
return /* @__PURE__ */ jsx4(
|
|
1600
1821
|
"button",
|
|
1601
1822
|
{
|
|
1602
1823
|
type: "button",
|
|
1603
1824
|
className: `hw-msg-copy ${copied ? "hw-msg-copy--done" : ""}`,
|
|
1604
1825
|
onClick: handleCopy,
|
|
1605
1826
|
"aria-label": copied ? t("widget.copied") : t("widget.copy"),
|
|
1606
|
-
children: copied ? /* @__PURE__ */
|
|
1827
|
+
children: copied ? /* @__PURE__ */ jsx4(
|
|
1607
1828
|
"svg",
|
|
1608
1829
|
{
|
|
1609
1830
|
viewBox: "0 0 24 24",
|
|
@@ -1612,9 +1833,9 @@ function CopyButton({ text }) {
|
|
|
1612
1833
|
strokeWidth: 2,
|
|
1613
1834
|
strokeLinecap: "round",
|
|
1614
1835
|
strokeLinejoin: "round",
|
|
1615
|
-
children: /* @__PURE__ */
|
|
1836
|
+
children: /* @__PURE__ */ jsx4("polyline", { points: "20 6 9 17 4 12" })
|
|
1616
1837
|
}
|
|
1617
|
-
) : /* @__PURE__ */
|
|
1838
|
+
) : /* @__PURE__ */ jsxs2(
|
|
1618
1839
|
"svg",
|
|
1619
1840
|
{
|
|
1620
1841
|
viewBox: "0 0 24 24",
|
|
@@ -1624,8 +1845,8 @@ function CopyButton({ text }) {
|
|
|
1624
1845
|
strokeLinecap: "round",
|
|
1625
1846
|
strokeLinejoin: "round",
|
|
1626
1847
|
children: [
|
|
1627
|
-
/* @__PURE__ */
|
|
1628
|
-
/* @__PURE__ */
|
|
1848
|
+
/* @__PURE__ */ jsx4("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
1849
|
+
/* @__PURE__ */ jsx4("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
1629
1850
|
]
|
|
1630
1851
|
}
|
|
1631
1852
|
)
|
|
@@ -1644,7 +1865,7 @@ function FileTypeIcon({ ext }) {
|
|
|
1644
1865
|
zip: "#f59e0b"
|
|
1645
1866
|
};
|
|
1646
1867
|
const color = colors[ext] ?? "currentColor";
|
|
1647
|
-
return /* @__PURE__ */
|
|
1868
|
+
return /* @__PURE__ */ jsxs2(
|
|
1648
1869
|
"svg",
|
|
1649
1870
|
{
|
|
1650
1871
|
viewBox: "0 0 24 24",
|
|
@@ -1654,17 +1875,17 @@ function FileTypeIcon({ ext }) {
|
|
|
1654
1875
|
strokeLinecap: "round",
|
|
1655
1876
|
strokeLinejoin: "round",
|
|
1656
1877
|
children: [
|
|
1657
|
-
/* @__PURE__ */
|
|
1658
|
-
/* @__PURE__ */
|
|
1659
|
-
ext === "pdf" && /* @__PURE__ */
|
|
1660
|
-
ext === "csv" && /* @__PURE__ */
|
|
1878
|
+
/* @__PURE__ */ jsx4("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
1879
|
+
/* @__PURE__ */ jsx4("polyline", { points: "14 2 14 8 20 8" }),
|
|
1880
|
+
ext === "pdf" && /* @__PURE__ */ jsx4("text", { x: "8", y: "18", fontSize: "6", fill: color, stroke: "none", fontWeight: "700", children: "PDF" }),
|
|
1881
|
+
ext === "csv" && /* @__PURE__ */ jsx4("text", { x: "7", y: "18", fontSize: "6", fill: color, stroke: "none", fontWeight: "700", children: "CSV" })
|
|
1661
1882
|
]
|
|
1662
1883
|
}
|
|
1663
1884
|
);
|
|
1664
1885
|
}
|
|
1665
1886
|
|
|
1666
1887
|
// src/themed/composer.tsx
|
|
1667
|
-
import { jsx as
|
|
1888
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1668
1889
|
var MAX_CHARS = 5e3;
|
|
1669
1890
|
var CHAR_WARN_THRESHOLD = 4800;
|
|
1670
1891
|
var ACCEPTED_TYPES = [
|
|
@@ -1775,7 +1996,7 @@ function Composer({
|
|
|
1775
1996
|
const canSend = (hasText || hasAttachments) && !stillUploading;
|
|
1776
1997
|
const showCharCount = text.length >= CHAR_WARN_THRESHOLD;
|
|
1777
1998
|
const isOverLimit = text.length > MAX_CHARS;
|
|
1778
|
-
return /* @__PURE__ */
|
|
1999
|
+
return /* @__PURE__ */ jsx5(
|
|
1779
2000
|
"div",
|
|
1780
2001
|
{
|
|
1781
2002
|
className: `hw-composer ${compact ? "hw-composer--compact" : ""} ${isDragging ? "hw-composer--dragging" : ""}`,
|
|
@@ -1783,9 +2004,9 @@ function Composer({
|
|
|
1783
2004
|
onDragLeave: handleDragLeave,
|
|
1784
2005
|
onDragOver: handleDragOver,
|
|
1785
2006
|
onDrop: handleDrop,
|
|
1786
|
-
children: /* @__PURE__ */
|
|
1787
|
-
isDragging && /* @__PURE__ */
|
|
1788
|
-
attachments && attachments.length > 0 && /* @__PURE__ */
|
|
2007
|
+
children: /* @__PURE__ */ jsxs3("div", { className: "hw-composer-box", style: { position: "relative" }, children: [
|
|
2008
|
+
isDragging && /* @__PURE__ */ jsx5("div", { className: "hw-composer-drop-overlay", children: /* @__PURE__ */ jsx5("span", { className: "hw-composer-drop-text", children: t("widget.drop_files") }) }),
|
|
2009
|
+
attachments && attachments.length > 0 && /* @__PURE__ */ jsx5("div", { className: "hw-composer-previews", children: attachments.map((a) => /* @__PURE__ */ jsx5(
|
|
1789
2010
|
PreviewThumb,
|
|
1790
2011
|
{
|
|
1791
2012
|
attachment: a,
|
|
@@ -1793,7 +2014,7 @@ function Composer({
|
|
|
1793
2014
|
},
|
|
1794
2015
|
a.id
|
|
1795
2016
|
)) }),
|
|
1796
|
-
/* @__PURE__ */
|
|
2017
|
+
/* @__PURE__ */ jsx5(
|
|
1797
2018
|
"textarea",
|
|
1798
2019
|
{
|
|
1799
2020
|
ref,
|
|
@@ -1808,9 +2029,9 @@ function Composer({
|
|
|
1808
2029
|
"aria-label": t("widget.aria_input")
|
|
1809
2030
|
}
|
|
1810
2031
|
),
|
|
1811
|
-
/* @__PURE__ */
|
|
1812
|
-
/* @__PURE__ */
|
|
1813
|
-
/* @__PURE__ */
|
|
2032
|
+
/* @__PURE__ */ jsxs3("div", { className: "hw-composer-toolbar", children: [
|
|
2033
|
+
/* @__PURE__ */ jsxs3("div", { className: "hw-composer-toolbar-left", children: [
|
|
2034
|
+
/* @__PURE__ */ jsx5(
|
|
1814
2035
|
"button",
|
|
1815
2036
|
{
|
|
1816
2037
|
type: "button",
|
|
@@ -1818,10 +2039,10 @@ function Composer({
|
|
|
1818
2039
|
onClick: handleFileClick,
|
|
1819
2040
|
disabled: disabled || isSubmitting,
|
|
1820
2041
|
"aria-label": t("widget.aria_attach"),
|
|
1821
|
-
children: /* @__PURE__ */
|
|
2042
|
+
children: /* @__PURE__ */ jsx5(PaperclipIcon, {})
|
|
1822
2043
|
}
|
|
1823
2044
|
),
|
|
1824
|
-
/* @__PURE__ */
|
|
2045
|
+
/* @__PURE__ */ jsx5(
|
|
1825
2046
|
"input",
|
|
1826
2047
|
{
|
|
1827
2048
|
ref: fileInputRef,
|
|
@@ -1832,9 +2053,9 @@ function Composer({
|
|
|
1832
2053
|
onChange: handleFileChange
|
|
1833
2054
|
}
|
|
1834
2055
|
),
|
|
1835
|
-
showCharCount && /* @__PURE__ */
|
|
2056
|
+
showCharCount && /* @__PURE__ */ jsx5("span", { className: `hw-composer-charcount ${isOverLimit ? "hw-composer-charcount--over" : ""}`, children: MAX_CHARS - text.length })
|
|
1836
2057
|
] }),
|
|
1837
|
-
/* @__PURE__ */
|
|
2058
|
+
/* @__PURE__ */ jsx5(
|
|
1838
2059
|
"button",
|
|
1839
2060
|
{
|
|
1840
2061
|
type: "button",
|
|
@@ -1842,7 +2063,7 @@ function Composer({
|
|
|
1842
2063
|
onClick: onSubmit,
|
|
1843
2064
|
disabled: disabled || !canSend || isSubmitting || isOverLimit,
|
|
1844
2065
|
"aria-label": t("widget.aria_send"),
|
|
1845
|
-
children: /* @__PURE__ */
|
|
2066
|
+
children: /* @__PURE__ */ jsx5(SendIcon, {})
|
|
1846
2067
|
}
|
|
1847
2068
|
)
|
|
1848
2069
|
] })
|
|
@@ -1853,7 +2074,7 @@ function Composer({
|
|
|
1853
2074
|
function PreviewThumb({ attachment: a, onRemove }) {
|
|
1854
2075
|
const [hover, setHover] = useState7(false);
|
|
1855
2076
|
const ref = useRef7(null);
|
|
1856
|
-
return /* @__PURE__ */
|
|
2077
|
+
return /* @__PURE__ */ jsxs3(
|
|
1857
2078
|
"div",
|
|
1858
2079
|
{
|
|
1859
2080
|
ref,
|
|
@@ -1861,20 +2082,20 @@ function PreviewThumb({ attachment: a, onRemove }) {
|
|
|
1861
2082
|
onMouseEnter: () => setHover(true),
|
|
1862
2083
|
onMouseLeave: () => setHover(false),
|
|
1863
2084
|
children: [
|
|
1864
|
-
a.previewUrl ? /* @__PURE__ */
|
|
1865
|
-
a.isUploading && /* @__PURE__ */
|
|
1866
|
-
a.error && /* @__PURE__ */
|
|
1867
|
-
onRemove && /* @__PURE__ */
|
|
2085
|
+
a.previewUrl ? /* @__PURE__ */ jsx5("img", { src: a.previewUrl, alt: a.file.name, className: "hw-composer-preview-img" }) : /* @__PURE__ */ jsx5("div", { className: "hw-composer-preview-file", children: /* @__PURE__ */ jsx5("span", { className: "hw-composer-preview-ext", children: a.file.name.split(".").pop()?.toUpperCase() ?? "FILE" }) }),
|
|
2086
|
+
a.isUploading && /* @__PURE__ */ jsx5("div", { className: "hw-composer-preview-loader" }),
|
|
2087
|
+
a.error && /* @__PURE__ */ jsx5("div", { className: "hw-composer-preview-badge", title: a.error, children: "!" }),
|
|
2088
|
+
onRemove && /* @__PURE__ */ jsx5(
|
|
1868
2089
|
"button",
|
|
1869
2090
|
{
|
|
1870
2091
|
type: "button",
|
|
1871
2092
|
className: "hw-composer-preview-remove",
|
|
1872
2093
|
onClick: onRemove,
|
|
1873
2094
|
"aria-label": t("widget.aria_remove"),
|
|
1874
|
-
children: /* @__PURE__ */
|
|
2095
|
+
children: /* @__PURE__ */ jsx5(XIcon, {})
|
|
1875
2096
|
}
|
|
1876
2097
|
),
|
|
1877
|
-
hover && a.previewUrl && !a.isUploading && /* @__PURE__ */
|
|
2098
|
+
hover && a.previewUrl && !a.isUploading && /* @__PURE__ */ jsx5(AnchoredPreview, { src: a.previewUrl, anchorRef: ref })
|
|
1878
2099
|
]
|
|
1879
2100
|
}
|
|
1880
2101
|
);
|
|
@@ -1891,8 +2112,8 @@ function extractFiles(data) {
|
|
|
1891
2112
|
}
|
|
1892
2113
|
|
|
1893
2114
|
// src/themed/debug-overlay.tsx
|
|
1894
|
-
import { useEffect as
|
|
1895
|
-
import { jsx as
|
|
2115
|
+
import { useEffect as useEffect6, useMemo, useRef as useRef8, useState as useState8 } from "react";
|
|
2116
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1896
2117
|
var MAX_EVENTS = 60;
|
|
1897
2118
|
function isDebugEnabled() {
|
|
1898
2119
|
if (typeof window === "undefined") return false;
|
|
@@ -1918,7 +2139,7 @@ function WidgetDebugOverlay() {
|
|
|
1918
2139
|
const typingUsers = useWidgetStore((s) => s.typingUsers);
|
|
1919
2140
|
const aiProcessingMap = useWidgetStore((s) => s.aiProcessing);
|
|
1920
2141
|
const { store } = useWidgetContext();
|
|
1921
|
-
|
|
2142
|
+
useEffect6(() => {
|
|
1922
2143
|
setEnabled(isDebugEnabled());
|
|
1923
2144
|
}, []);
|
|
1924
2145
|
const pushEvent = useMemo(
|
|
@@ -1933,7 +2154,7 @@ function WidgetDebugOverlay() {
|
|
|
1933
2154
|
},
|
|
1934
2155
|
[]
|
|
1935
2156
|
);
|
|
1936
|
-
|
|
2157
|
+
useEffect6(() => {
|
|
1937
2158
|
if (!enabled) return;
|
|
1938
2159
|
if (typeof window === "undefined" || typeof window.fetch !== "function") return;
|
|
1939
2160
|
const originalFetch = window.fetch.bind(window);
|
|
@@ -1965,7 +2186,7 @@ function WidgetDebugOverlay() {
|
|
|
1965
2186
|
window.fetch = originalFetch;
|
|
1966
2187
|
};
|
|
1967
2188
|
}, [enabled, pushEvent]);
|
|
1968
|
-
|
|
2189
|
+
useEffect6(() => {
|
|
1969
2190
|
if (!enabled) return;
|
|
1970
2191
|
const original = store.getState().handleRealtimeEvent;
|
|
1971
2192
|
store.setState({
|
|
@@ -1984,7 +2205,7 @@ function WidgetDebugOverlay() {
|
|
|
1984
2205
|
[activeMessages]
|
|
1985
2206
|
);
|
|
1986
2207
|
const prevSigRef = useRef8(lastMsgSignature);
|
|
1987
|
-
|
|
2208
|
+
useEffect6(() => {
|
|
1988
2209
|
if (!enabled) return;
|
|
1989
2210
|
if (prevSigRef.current !== lastMsgSignature) {
|
|
1990
2211
|
prevSigRef.current = lastMsgSignature;
|
|
@@ -1998,10 +2219,10 @@ function WidgetDebugOverlay() {
|
|
|
1998
2219
|
if (!enabled) return null;
|
|
1999
2220
|
const isTyping = activeId ? typingUsers.get(activeId) : false;
|
|
2000
2221
|
const isAi = activeId ? aiProcessingMap.get(activeId) : false;
|
|
2001
|
-
return /* @__PURE__ */
|
|
2002
|
-
/* @__PURE__ */
|
|
2003
|
-
/* @__PURE__ */
|
|
2004
|
-
/* @__PURE__ */
|
|
2222
|
+
return /* @__PURE__ */ jsxs4("div", { style: styles.wrap, children: [
|
|
2223
|
+
/* @__PURE__ */ jsxs4("div", { style: styles.header, children: [
|
|
2224
|
+
/* @__PURE__ */ jsx6("strong", { children: "hw debug" }),
|
|
2225
|
+
/* @__PURE__ */ jsxs4("span", { style: styles.meta, children: [
|
|
2005
2226
|
" ",
|
|
2006
2227
|
"\xB7 conv ",
|
|
2007
2228
|
activeId ? activeId.slice(0, 10) : "\u2014",
|
|
@@ -2012,29 +2233,29 @@ function WidgetDebugOverlay() {
|
|
|
2012
2233
|
" \xB7 ai ",
|
|
2013
2234
|
isAi ? "Y" : "n"
|
|
2014
2235
|
] }),
|
|
2015
|
-
/* @__PURE__ */
|
|
2016
|
-
/* @__PURE__ */
|
|
2236
|
+
/* @__PURE__ */ jsx6("button", { type: "button", style: styles.btn, onClick: () => setOpen((v) => !v), children: open ? "hide" : "show" }),
|
|
2237
|
+
/* @__PURE__ */ jsx6("button", { type: "button", style: styles.btn, onClick: () => {
|
|
2017
2238
|
eventsRef.current = [];
|
|
2018
2239
|
setEvents([]);
|
|
2019
2240
|
}, children: "clear" })
|
|
2020
2241
|
] }),
|
|
2021
|
-
open && /* @__PURE__ */
|
|
2022
|
-
/* @__PURE__ */
|
|
2023
|
-
/* @__PURE__ */
|
|
2024
|
-
activeMessages.length === 0 ? /* @__PURE__ */
|
|
2025
|
-
/* @__PURE__ */
|
|
2026
|
-
/* @__PURE__ */
|
|
2027
|
-
/* @__PURE__ */
|
|
2028
|
-
/* @__PURE__ */
|
|
2242
|
+
open && /* @__PURE__ */ jsxs4("div", { style: styles.body, children: [
|
|
2243
|
+
/* @__PURE__ */ jsxs4("div", { style: styles.section, children: [
|
|
2244
|
+
/* @__PURE__ */ jsx6("div", { style: styles.sectionTitle, children: "messages (active)" }),
|
|
2245
|
+
activeMessages.length === 0 ? /* @__PURE__ */ jsx6("div", { style: styles.empty, children: "empty" }) : activeMessages.map((m, i) => /* @__PURE__ */ jsxs4("div", { style: styles.row, children: [
|
|
2246
|
+
/* @__PURE__ */ jsx6("span", { style: { ...styles.badge, background: colorFor(senderOf(m)) }, children: i }),
|
|
2247
|
+
/* @__PURE__ */ jsx6("span", { style: styles.sender, children: senderOf(m) }),
|
|
2248
|
+
/* @__PURE__ */ jsx6("span", { style: styles.ts, children: m.createdAt.slice(11, 23) }),
|
|
2249
|
+
/* @__PURE__ */ jsx6("span", { style: styles.text, children: (m.text ?? "").slice(0, 60) })
|
|
2029
2250
|
] }, m.id))
|
|
2030
2251
|
] }),
|
|
2031
|
-
/* @__PURE__ */
|
|
2032
|
-
/* @__PURE__ */
|
|
2033
|
-
events.length === 0 ? /* @__PURE__ */
|
|
2034
|
-
/* @__PURE__ */
|
|
2035
|
-
/* @__PURE__ */
|
|
2036
|
-
/* @__PURE__ */
|
|
2037
|
-
e.detail && /* @__PURE__ */
|
|
2252
|
+
/* @__PURE__ */ jsxs4("div", { style: styles.section, children: [
|
|
2253
|
+
/* @__PURE__ */ jsx6("div", { style: styles.sectionTitle, children: "events" }),
|
|
2254
|
+
events.length === 0 ? /* @__PURE__ */ jsx6("div", { style: styles.empty, children: "no events yet \u2014 send a message" }) : events.map((e) => /* @__PURE__ */ jsxs4("div", { style: styles.row, children: [
|
|
2255
|
+
/* @__PURE__ */ jsx6("span", { style: { ...styles.badge, background: kindColor(e.kind) }, children: e.kind }),
|
|
2256
|
+
/* @__PURE__ */ jsx6("span", { style: styles.ts, children: new Date(e.t).toISOString().slice(11, 23) }),
|
|
2257
|
+
/* @__PURE__ */ jsx6("span", { style: styles.evLabel, children: e.label }),
|
|
2258
|
+
e.detail && /* @__PURE__ */ jsx6("span", { style: styles.detail, children: e.detail })
|
|
2038
2259
|
] }, e.id))
|
|
2039
2260
|
] })
|
|
2040
2261
|
] })
|
|
@@ -2137,10 +2358,10 @@ var styles = {
|
|
|
2137
2358
|
};
|
|
2138
2359
|
|
|
2139
2360
|
// src/themed/content/content-tab-view.tsx
|
|
2140
|
-
import { useCallback as useCallback11, useEffect as
|
|
2361
|
+
import { useCallback as useCallback11, useEffect as useEffect9 } from "react";
|
|
2141
2362
|
|
|
2142
2363
|
// src/hooks/use-content-tab.ts
|
|
2143
|
-
import { useCallback as useCallback8, useEffect as
|
|
2364
|
+
import { useCallback as useCallback8, useEffect as useEffect7, useState as useState9 } from "react";
|
|
2144
2365
|
var EMPTY_TABS = [];
|
|
2145
2366
|
function listKey(tabId, lang) {
|
|
2146
2367
|
return `flat:${tabId}:${lang}:list`;
|
|
@@ -2255,7 +2476,7 @@ function useContentTab(tabId) {
|
|
|
2255
2476
|
const clearDetail = useCallback8(() => {
|
|
2256
2477
|
setDetail(null);
|
|
2257
2478
|
}, []);
|
|
2258
|
-
|
|
2479
|
+
useEffect7(() => {
|
|
2259
2480
|
if (tab && entries.length === 0) {
|
|
2260
2481
|
fetchEntries({ page: 1, reset: true });
|
|
2261
2482
|
}
|
|
@@ -2276,39 +2497,96 @@ function useContentTab(tabId) {
|
|
|
2276
2497
|
}
|
|
2277
2498
|
|
|
2278
2499
|
// src/themed/content/content-detail-view.tsx
|
|
2279
|
-
import { jsx as
|
|
2500
|
+
import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2280
2501
|
function ContentDetailView({
|
|
2281
2502
|
entry,
|
|
2282
2503
|
isLoading
|
|
2283
2504
|
}) {
|
|
2284
2505
|
if (isLoading || !entry) {
|
|
2285
|
-
return /* @__PURE__ */
|
|
2286
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "60%", height: 18 } }),
|
|
2287
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "35%", height: 12 } }),
|
|
2288
|
-
/* @__PURE__ */ jsxs4("div", { style: { marginTop: 8, display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
2289
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "100%", height: 12 } }),
|
|
2290
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "95%", height: 12 } }),
|
|
2291
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "80%", height: 12 } }),
|
|
2292
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "60%", height: 12 } })
|
|
2293
|
-
] })
|
|
2294
|
-
] });
|
|
2506
|
+
return /* @__PURE__ */ jsx7(ArticleSkeleton, {});
|
|
2295
2507
|
}
|
|
2296
2508
|
const badge = entry.customFields.version ?? entry.customFields.priority ?? entry.customFields.type ?? null;
|
|
2297
|
-
return /* @__PURE__ */
|
|
2298
|
-
/* @__PURE__ */
|
|
2299
|
-
/* @__PURE__ */
|
|
2300
|
-
(badge || entry.publishedAt) && /* @__PURE__ */
|
|
2301
|
-
badge && /* @__PURE__ */
|
|
2302
|
-
entry.publishedAt && /* @__PURE__ */
|
|
2509
|
+
return /* @__PURE__ */ jsxs5("div", { className: "hw-content-detail", children: [
|
|
2510
|
+
/* @__PURE__ */ jsxs5("div", { className: "hw-content-detail-header", children: [
|
|
2511
|
+
/* @__PURE__ */ jsx7("h1", { className: "hw-content-detail-title", children: entry.title }),
|
|
2512
|
+
(badge || entry.publishedAt) && /* @__PURE__ */ jsxs5("div", { className: "hw-content-detail-meta", children: [
|
|
2513
|
+
badge && /* @__PURE__ */ jsx7("span", { className: "hw-content-entry-badge", children: badge }),
|
|
2514
|
+
entry.publishedAt && /* @__PURE__ */ jsx7("span", { className: "hw-content-detail-date", children: formatRelativeTime(entry.publishedAt) })
|
|
2515
|
+
] })
|
|
2516
|
+
] }),
|
|
2517
|
+
(entry.body || entry.bodyHtml) && /* @__PURE__ */ jsx7("div", { className: "hw-content-detail-body", children: /* @__PURE__ */ jsx7(MarkdownContent, { bodyHtml: entry.bodyHtml, bodyMarkdown: entry.body }) })
|
|
2518
|
+
] });
|
|
2519
|
+
}
|
|
2520
|
+
function ArticleSkeleton() {
|
|
2521
|
+
const sections = [
|
|
2522
|
+
{
|
|
2523
|
+
headerWidth: "30%",
|
|
2524
|
+
items: [
|
|
2525
|
+
{ l1: "98%", l2: "62%" },
|
|
2526
|
+
{ l1: "94%", l2: "48%" },
|
|
2527
|
+
{ l1: "96%", l2: "70%" }
|
|
2528
|
+
]
|
|
2529
|
+
},
|
|
2530
|
+
{
|
|
2531
|
+
headerWidth: "26%",
|
|
2532
|
+
items: [
|
|
2533
|
+
{ l1: "92%", l2: "55%" },
|
|
2534
|
+
{ l1: "88%", l2: "40%" }
|
|
2535
|
+
]
|
|
2536
|
+
}
|
|
2537
|
+
];
|
|
2538
|
+
return /* @__PURE__ */ jsxs5("div", { className: "hw-content-detail", children: [
|
|
2539
|
+
/* @__PURE__ */ jsxs5("div", { className: "hw-content-detail-header", children: [
|
|
2540
|
+
/* @__PURE__ */ jsx7("h1", { className: "hw-content-detail-title", children: /* @__PURE__ */ jsx7("span", { className: "hw-skeleton hw-skeleton-title" }) }),
|
|
2541
|
+
/* @__PURE__ */ jsxs5("div", { className: "hw-content-detail-meta", children: [
|
|
2542
|
+
/* @__PURE__ */ jsx7("span", { className: "hw-skeleton hw-skeleton-badge" }),
|
|
2543
|
+
/* @__PURE__ */ jsx7("span", { className: "hw-skeleton hw-skeleton-date" })
|
|
2303
2544
|
] })
|
|
2304
2545
|
] }),
|
|
2305
|
-
|
|
2546
|
+
/* @__PURE__ */ jsx7("div", { className: "hw-content-detail-body", children: /* @__PURE__ */ jsx7("div", { className: "hw-markdown", children: sections.map((s, i) => /* @__PURE__ */ jsx7(
|
|
2547
|
+
SkeletonSection,
|
|
2548
|
+
{
|
|
2549
|
+
headerWidth: s.headerWidth,
|
|
2550
|
+
items: s.items
|
|
2551
|
+
},
|
|
2552
|
+
i
|
|
2553
|
+
)) }) })
|
|
2554
|
+
] });
|
|
2555
|
+
}
|
|
2556
|
+
function SkeletonSection({
|
|
2557
|
+
headerWidth,
|
|
2558
|
+
items
|
|
2559
|
+
}) {
|
|
2560
|
+
return /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
2561
|
+
/* @__PURE__ */ jsx7("h2", { children: /* @__PURE__ */ jsx7(
|
|
2562
|
+
"span",
|
|
2563
|
+
{
|
|
2564
|
+
className: "hw-skeleton hw-skeleton-h2",
|
|
2565
|
+
style: { display: "block", width: headerWidth }
|
|
2566
|
+
}
|
|
2567
|
+
) }),
|
|
2568
|
+
items.map((item, j) => /* @__PURE__ */ jsx7("ul", { children: /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsxs5("div", { className: "hw-skeleton-bullet-lines", children: [
|
|
2569
|
+
/* @__PURE__ */ jsx7(
|
|
2570
|
+
"span",
|
|
2571
|
+
{
|
|
2572
|
+
className: "hw-skeleton hw-skeleton-bullet-line",
|
|
2573
|
+
style: { display: "block", width: item.l1 }
|
|
2574
|
+
}
|
|
2575
|
+
),
|
|
2576
|
+
/* @__PURE__ */ jsx7(
|
|
2577
|
+
"span",
|
|
2578
|
+
{
|
|
2579
|
+
className: "hw-skeleton hw-skeleton-bullet-line",
|
|
2580
|
+
style: { display: "block", width: item.l2, marginTop: 8 }
|
|
2581
|
+
}
|
|
2582
|
+
)
|
|
2583
|
+
] }) }) }, j))
|
|
2306
2584
|
] });
|
|
2307
2585
|
}
|
|
2308
2586
|
|
|
2309
2587
|
// src/themed/content/content-list-view.tsx
|
|
2310
2588
|
import { useCallback as useCallback9, useRef as useRef9, useState as useState10 } from "react";
|
|
2311
|
-
import { jsx as
|
|
2589
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2312
2590
|
function ContentListView({
|
|
2313
2591
|
entries,
|
|
2314
2592
|
isLoading,
|
|
@@ -2332,13 +2610,13 @@ function ContentListView({
|
|
|
2332
2610
|
},
|
|
2333
2611
|
[onSearch]
|
|
2334
2612
|
);
|
|
2335
|
-
return /* @__PURE__ */
|
|
2336
|
-
onSearch && /* @__PURE__ */
|
|
2337
|
-
/* @__PURE__ */
|
|
2338
|
-
/* @__PURE__ */
|
|
2339
|
-
/* @__PURE__ */
|
|
2613
|
+
return /* @__PURE__ */ jsxs6("div", { className: "hw-content-list", children: [
|
|
2614
|
+
onSearch && /* @__PURE__ */ jsx8("div", { className: "hw-content-search", children: /* @__PURE__ */ jsxs6("div", { className: "hw-content-search-box", children: [
|
|
2615
|
+
/* @__PURE__ */ jsxs6("svg", { className: "hw-content-search-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2616
|
+
/* @__PURE__ */ jsx8("circle", { cx: "11", cy: "11", r: "8" }),
|
|
2617
|
+
/* @__PURE__ */ jsx8("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
|
|
2340
2618
|
] }),
|
|
2341
|
-
/* @__PURE__ */
|
|
2619
|
+
/* @__PURE__ */ jsx8(
|
|
2342
2620
|
"input",
|
|
2343
2621
|
{
|
|
2344
2622
|
type: "text",
|
|
@@ -2349,18 +2627,18 @@ function ContentListView({
|
|
|
2349
2627
|
}
|
|
2350
2628
|
)
|
|
2351
2629
|
] }) }),
|
|
2352
|
-
isLoading && entries.length === 0 && /* @__PURE__ */
|
|
2353
|
-
/* @__PURE__ */
|
|
2354
|
-
/* @__PURE__ */
|
|
2355
|
-
/* @__PURE__ */
|
|
2630
|
+
isLoading && entries.length === 0 && /* @__PURE__ */ jsx8("div", { className: "hw-skeleton-content", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsxs6("div", { className: "hw-skeleton-content-item", children: [
|
|
2631
|
+
/* @__PURE__ */ jsx8("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "70%", height: 14 } }),
|
|
2632
|
+
/* @__PURE__ */ jsx8("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "90%", height: 12 } }),
|
|
2633
|
+
/* @__PURE__ */ jsx8("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "40%", height: 10 } })
|
|
2356
2634
|
] }, i)) }),
|
|
2357
|
-
!isLoading && entries.length === 0 && /* @__PURE__ */
|
|
2358
|
-
/* @__PURE__ */
|
|
2359
|
-
/* @__PURE__ */
|
|
2635
|
+
!isLoading && entries.length === 0 && /* @__PURE__ */ jsxs6("div", { className: "hw-content-empty", children: [
|
|
2636
|
+
/* @__PURE__ */ jsx8("div", { className: "hw-content-empty-title", children: searchText ? t("widget.no_results") : t("widget.nothing_yet") }),
|
|
2637
|
+
/* @__PURE__ */ jsx8("div", { className: "hw-content-empty-desc", children: searchText ? t("widget.try_different") : t("widget.check_back") })
|
|
2360
2638
|
] }),
|
|
2361
|
-
entries.length > 0 && /* @__PURE__ */
|
|
2362
|
-
entries.map((entry) => /* @__PURE__ */
|
|
2363
|
-
hasMore && /* @__PURE__ */
|
|
2639
|
+
entries.length > 0 && /* @__PURE__ */ jsxs6("div", { className: "hw-content-entries", children: [
|
|
2640
|
+
entries.map((entry) => /* @__PURE__ */ jsx8(ContentEntryCard, { entry, onSelect, display }, entry.slug)),
|
|
2641
|
+
hasMore && /* @__PURE__ */ jsx8(
|
|
2364
2642
|
"button",
|
|
2365
2643
|
{
|
|
2366
2644
|
type: "button",
|
|
@@ -2387,21 +2665,21 @@ function ContentEntryCard({
|
|
|
2387
2665
|
const badge = display?.badgeField ? customFields[display.badgeField] ?? null : customFields.version ?? customFields.priority ?? customFields.type ?? null;
|
|
2388
2666
|
const subtitleValue = display?.subtitleField ? (display.subtitleField === "body" ? entry.body : customFields[display.subtitleField]) ?? null : customFields.excerpt ?? customFields.summary ?? customFields.description ?? null;
|
|
2389
2667
|
const preview = subtitleValue ? truncateText(subtitleValue) : truncateText(entry.body);
|
|
2390
|
-
return /* @__PURE__ */
|
|
2391
|
-
/* @__PURE__ */
|
|
2392
|
-
/* @__PURE__ */
|
|
2393
|
-
preview && /* @__PURE__ */
|
|
2394
|
-
(badge || entry.publishedAt) && /* @__PURE__ */
|
|
2395
|
-
badge && /* @__PURE__ */
|
|
2396
|
-
entry.publishedAt && /* @__PURE__ */
|
|
2668
|
+
return /* @__PURE__ */ jsx8("button", { type: "button", className: "hw-content-entry", onClick: () => onSelect(entry.slug), children: /* @__PURE__ */ jsxs6("div", { className: "hw-content-entry-main", children: [
|
|
2669
|
+
/* @__PURE__ */ jsxs6("div", { className: "hw-content-entry-text", children: [
|
|
2670
|
+
/* @__PURE__ */ jsx8("span", { className: "hw-content-entry-title", children: entry.title }),
|
|
2671
|
+
preview && /* @__PURE__ */ jsx8("span", { className: "hw-content-entry-desc", children: preview }),
|
|
2672
|
+
(badge || entry.publishedAt) && /* @__PURE__ */ jsxs6("div", { className: "hw-content-entry-meta", children: [
|
|
2673
|
+
badge && /* @__PURE__ */ jsx8("span", { className: "hw-content-entry-badge", children: badge }),
|
|
2674
|
+
entry.publishedAt && /* @__PURE__ */ jsx8("span", { className: "hw-content-entry-date", children: formatRelativeTime(entry.publishedAt) })
|
|
2397
2675
|
] })
|
|
2398
2676
|
] }),
|
|
2399
|
-
/* @__PURE__ */
|
|
2677
|
+
/* @__PURE__ */ jsx8("svg", { className: "hw-content-entry-chevron", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx8("polyline", { points: "9 18 15 12 9 6" }) })
|
|
2400
2678
|
] }) });
|
|
2401
2679
|
}
|
|
2402
2680
|
|
|
2403
2681
|
// src/themed/content/grouped-content-tab-view.tsx
|
|
2404
|
-
import { useEffect as
|
|
2682
|
+
import { useEffect as useEffect8, useRef as useRef11 } from "react";
|
|
2405
2683
|
|
|
2406
2684
|
// src/hooks/use-grouped-content-tab.ts
|
|
2407
2685
|
import { useCallback as useCallback10, useRef as useRef10, useState as useState11 } from "react";
|
|
@@ -2620,7 +2898,7 @@ function useGroupedContentTab(tabId) {
|
|
|
2620
2898
|
}
|
|
2621
2899
|
|
|
2622
2900
|
// src/themed/content/grouped-content-tab-view.tsx
|
|
2623
|
-
import { jsx as
|
|
2901
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
2624
2902
|
function GroupedContentTabView({
|
|
2625
2903
|
tab,
|
|
2626
2904
|
subView,
|
|
@@ -2645,26 +2923,26 @@ function GroupedContentTabView({
|
|
|
2645
2923
|
fetchDetail,
|
|
2646
2924
|
clearCategory
|
|
2647
2925
|
} = useGroupedContentTab(tab.id);
|
|
2648
|
-
|
|
2926
|
+
useEffect8(() => {
|
|
2649
2927
|
initFetch();
|
|
2650
2928
|
}, [initFetch]);
|
|
2651
|
-
|
|
2929
|
+
useEffect8(() => {
|
|
2652
2930
|
if (detailSlug && subView === "content-detail") {
|
|
2653
2931
|
fetchDetail(detailSlug);
|
|
2654
2932
|
}
|
|
2655
2933
|
}, [detailSlug, subView, fetchDetail]);
|
|
2656
2934
|
const prevSubView = useRef11(subView);
|
|
2657
|
-
|
|
2935
|
+
useEffect8(() => {
|
|
2658
2936
|
if (prevSubView.current === "content-category" && subView === null) {
|
|
2659
2937
|
clearCategory();
|
|
2660
2938
|
}
|
|
2661
2939
|
prevSubView.current = subView;
|
|
2662
2940
|
}, [subView, clearCategory]);
|
|
2663
2941
|
if (subView === "content-detail" && detailSlug) {
|
|
2664
|
-
return /* @__PURE__ */
|
|
2942
|
+
return /* @__PURE__ */ jsx9(ContentDetailView, { entry: detail, isLoading: isLoadingDetail });
|
|
2665
2943
|
}
|
|
2666
2944
|
if (subView === "content-category" && activeCategory) {
|
|
2667
|
-
return /* @__PURE__ */
|
|
2945
|
+
return /* @__PURE__ */ jsx9(
|
|
2668
2946
|
ContentListView,
|
|
2669
2947
|
{
|
|
2670
2948
|
entries: items,
|
|
@@ -2678,7 +2956,7 @@ function GroupedContentTabView({
|
|
|
2678
2956
|
}
|
|
2679
2957
|
);
|
|
2680
2958
|
}
|
|
2681
|
-
return /* @__PURE__ */
|
|
2959
|
+
return /* @__PURE__ */ jsx9(
|
|
2682
2960
|
ContentListView,
|
|
2683
2961
|
{
|
|
2684
2962
|
entries: categories,
|
|
@@ -2700,7 +2978,7 @@ function GroupedContentTabView({
|
|
|
2700
2978
|
}
|
|
2701
2979
|
|
|
2702
2980
|
// src/themed/content/content-tab-view.tsx
|
|
2703
|
-
import { jsx as
|
|
2981
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
2704
2982
|
function ContentTabView({
|
|
2705
2983
|
tab,
|
|
2706
2984
|
showDetail,
|
|
@@ -2710,7 +2988,7 @@ function ContentTabView({
|
|
|
2710
2988
|
onSelectCategory
|
|
2711
2989
|
}) {
|
|
2712
2990
|
if (tab.tabType === "grouped" && tab.itemsModelSlug) {
|
|
2713
|
-
return /* @__PURE__ */
|
|
2991
|
+
return /* @__PURE__ */ jsx10(
|
|
2714
2992
|
GroupedContentTabView,
|
|
2715
2993
|
{
|
|
2716
2994
|
tab,
|
|
@@ -2722,7 +3000,7 @@ function ContentTabView({
|
|
|
2722
3000
|
}
|
|
2723
3001
|
);
|
|
2724
3002
|
}
|
|
2725
|
-
return /* @__PURE__ */
|
|
3003
|
+
return /* @__PURE__ */ jsx10(
|
|
2726
3004
|
FlatContentTabView,
|
|
2727
3005
|
{
|
|
2728
3006
|
tab,
|
|
@@ -2748,7 +3026,7 @@ function FlatContentTabView({
|
|
|
2748
3026
|
loadMore,
|
|
2749
3027
|
fetchDetail
|
|
2750
3028
|
} = useContentTab(tab.id);
|
|
2751
|
-
|
|
3029
|
+
useEffect9(() => {
|
|
2752
3030
|
if (detailSlug) fetchDetail(detailSlug);
|
|
2753
3031
|
}, [detailSlug, fetchDetail]);
|
|
2754
3032
|
const handleSearch = useCallback11(
|
|
@@ -2758,9 +3036,9 @@ function FlatContentTabView({
|
|
|
2758
3036
|
[fetchEntries]
|
|
2759
3037
|
);
|
|
2760
3038
|
if (showDetail && detailSlug) {
|
|
2761
|
-
return /* @__PURE__ */
|
|
3039
|
+
return /* @__PURE__ */ jsx10(ContentDetailView, { entry: detail, isLoading: isLoadingDetail });
|
|
2762
3040
|
}
|
|
2763
|
-
return /* @__PURE__ */
|
|
3041
|
+
return /* @__PURE__ */ jsx10(
|
|
2764
3042
|
ContentListView,
|
|
2765
3043
|
{
|
|
2766
3044
|
entries,
|
|
@@ -2776,23 +3054,23 @@ function FlatContentTabView({
|
|
|
2776
3054
|
}
|
|
2777
3055
|
|
|
2778
3056
|
// src/themed/content/tab-icon.tsx
|
|
2779
|
-
import { jsx as
|
|
3057
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
2780
3058
|
var ICON_MAP = {
|
|
2781
|
-
book:
|
|
2782
|
-
megaphone:
|
|
2783
|
-
lightbulb:
|
|
2784
|
-
"help-circle":
|
|
2785
|
-
newspaper:
|
|
2786
|
-
star:
|
|
3059
|
+
book: BookIcon,
|
|
3060
|
+
megaphone: MegaphoneIcon,
|
|
3061
|
+
lightbulb: LightbulbIcon,
|
|
3062
|
+
"help-circle": HelpCircleIcon,
|
|
3063
|
+
newspaper: NewspaperIcon,
|
|
3064
|
+
star: StarIcon
|
|
2787
3065
|
};
|
|
2788
3066
|
function ContentTabIconComponent({ icon }) {
|
|
2789
|
-
const Icon = ICON_MAP[icon] ??
|
|
2790
|
-
return /* @__PURE__ */
|
|
3067
|
+
const Icon = ICON_MAP[icon] ?? BookIcon;
|
|
3068
|
+
return /* @__PURE__ */ jsx11(Icon, {});
|
|
2791
3069
|
}
|
|
2792
3070
|
|
|
2793
3071
|
// src/themed/message-list.tsx
|
|
2794
|
-
import React, { useEffect as
|
|
2795
|
-
import { jsx as
|
|
3072
|
+
import React, { useEffect as useEffect10, useRef as useRef12 } from "react";
|
|
3073
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2796
3074
|
function parseParts(raw) {
|
|
2797
3075
|
if (!raw) return null;
|
|
2798
3076
|
if (Array.isArray(raw)) return raw;
|
|
@@ -2818,8 +3096,8 @@ function MessageList({
|
|
|
2818
3096
|
const containerRef = useRef12(null);
|
|
2819
3097
|
const prevItemCountRef = useRef12(items.length);
|
|
2820
3098
|
const isInitialLoadRef = useRef12(true);
|
|
2821
|
-
const agentName = useWidgetStore((s) => s.agentConfig?.name) ?? t("widget.
|
|
2822
|
-
|
|
3099
|
+
const agentName = useWidgetStore((s) => s.agentConfig?.name) ?? t("widget.helpway_ai");
|
|
3100
|
+
useEffect10(() => {
|
|
2823
3101
|
const prevCount = prevItemCountRef.current;
|
|
2824
3102
|
const newCount = items.length;
|
|
2825
3103
|
prevItemCountRef.current = newCount;
|
|
@@ -2834,12 +3112,12 @@ function MessageList({
|
|
|
2834
3112
|
isInitialLoadRef.current = false;
|
|
2835
3113
|
}
|
|
2836
3114
|
}, [items]);
|
|
2837
|
-
|
|
3115
|
+
useEffect10(() => {
|
|
2838
3116
|
if (isTyping || isAiProcessing) {
|
|
2839
3117
|
bottomRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
2840
3118
|
}
|
|
2841
3119
|
}, [isTyping, isAiProcessing]);
|
|
2842
|
-
|
|
3120
|
+
useEffect10(() => {
|
|
2843
3121
|
if (!hasMore || !onLoadMore || !topRef.current) return;
|
|
2844
3122
|
const observer = new IntersectionObserver(
|
|
2845
3123
|
(entries) => {
|
|
@@ -2862,16 +3140,16 @@ function MessageList({
|
|
|
2862
3140
|
return () => observer.disconnect();
|
|
2863
3141
|
}, [hasMore, onLoadMore, isLoadingMore]);
|
|
2864
3142
|
if (items.length === 0) {
|
|
2865
|
-
return /* @__PURE__ */
|
|
3143
|
+
return /* @__PURE__ */ jsx12(
|
|
2866
3144
|
"div",
|
|
2867
3145
|
{
|
|
2868
3146
|
className: "hw-messages",
|
|
2869
3147
|
role: "log",
|
|
2870
3148
|
"aria-label": t("widget.aria_messages"),
|
|
2871
3149
|
"aria-live": "polite",
|
|
2872
|
-
children: /* @__PURE__ */
|
|
2873
|
-
/* @__PURE__ */
|
|
2874
|
-
/* @__PURE__ */
|
|
3150
|
+
children: /* @__PURE__ */ jsxs7("div", { className: "hw-empty", children: [
|
|
3151
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-empty-icon", children: /* @__PURE__ */ jsx12("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx12("path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z" }) }) }),
|
|
3152
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-empty-text", children: t("widget.start_a_conversation") })
|
|
2875
3153
|
] })
|
|
2876
3154
|
}
|
|
2877
3155
|
);
|
|
@@ -2881,7 +3159,7 @@ function MessageList({
|
|
|
2881
3159
|
const yesterday = /* @__PURE__ */ new Date();
|
|
2882
3160
|
yesterday.setDate(yesterday.getDate() - 1);
|
|
2883
3161
|
const yesterdayKey = yesterday.toLocaleDateString("en-CA");
|
|
2884
|
-
return /* @__PURE__ */
|
|
3162
|
+
return /* @__PURE__ */ jsxs7(
|
|
2885
3163
|
"div",
|
|
2886
3164
|
{
|
|
2887
3165
|
ref: containerRef,
|
|
@@ -2890,14 +3168,14 @@ function MessageList({
|
|
|
2890
3168
|
"aria-label": t("widget.aria_messages"),
|
|
2891
3169
|
"aria-live": "polite",
|
|
2892
3170
|
children: [
|
|
2893
|
-
/* @__PURE__ */
|
|
2894
|
-
/* @__PURE__ */
|
|
2895
|
-
/* @__PURE__ */
|
|
2896
|
-
/* @__PURE__ */
|
|
3171
|
+
/* @__PURE__ */ jsx12("div", { ref: topRef, className: "hw-load-more-trigger", children: isLoadingMore && /* @__PURE__ */ jsxs7("div", { className: "hw-load-more-spinner", children: [
|
|
3172
|
+
/* @__PURE__ */ jsx12("div", {}),
|
|
3173
|
+
/* @__PURE__ */ jsx12("div", {}),
|
|
3174
|
+
/* @__PURE__ */ jsx12("div", {})
|
|
2897
3175
|
] }) }),
|
|
2898
3176
|
items.map((item) => {
|
|
2899
3177
|
if (item.type === "event") {
|
|
2900
|
-
return /* @__PURE__ */
|
|
3178
|
+
return /* @__PURE__ */ jsx12(EventCard, { text: item.text ?? "" }, item._stableKey ?? item.id);
|
|
2901
3179
|
}
|
|
2902
3180
|
const itemDate = new Date(item.createdAt);
|
|
2903
3181
|
const dateKey = itemDate.toLocaleDateString("en-CA");
|
|
@@ -2910,39 +3188,38 @@ function MessageList({
|
|
|
2910
3188
|
day: "numeric"
|
|
2911
3189
|
});
|
|
2912
3190
|
const sender = item.visitorId ? "visitor" : item.aiAgentId ? "ai" : "team";
|
|
2913
|
-
return /* @__PURE__ */
|
|
2914
|
-
showDateSep && /* @__PURE__ */
|
|
2915
|
-
/* @__PURE__ */
|
|
2916
|
-
/* @__PURE__ */
|
|
2917
|
-
/* @__PURE__ */
|
|
3191
|
+
return /* @__PURE__ */ jsxs7(React.Fragment, { children: [
|
|
3192
|
+
showDateSep && /* @__PURE__ */ jsxs7("div", { className: "hw-date-sep", children: [
|
|
3193
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-date-sep-line" }),
|
|
3194
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-date-sep-text", children: dateLabel }),
|
|
3195
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-date-sep-line" })
|
|
2918
3196
|
] }),
|
|
2919
|
-
/* @__PURE__ */
|
|
3197
|
+
/* @__PURE__ */ jsx12(
|
|
2920
3198
|
MessageBubble,
|
|
2921
3199
|
{
|
|
2922
3200
|
text: item.text ?? "",
|
|
2923
3201
|
sender,
|
|
2924
3202
|
senderName: sender === "visitor" ? visitorName : item.userName ?? void 0,
|
|
2925
|
-
time: item.createdAt,
|
|
2926
3203
|
parts: parseParts(item.parts)
|
|
2927
3204
|
}
|
|
2928
3205
|
)
|
|
2929
3206
|
] }, item._stableKey ?? item.id);
|
|
2930
3207
|
}),
|
|
2931
3208
|
renderAfterMessages,
|
|
2932
|
-
isAiProcessing && /* @__PURE__ */
|
|
2933
|
-
/* @__PURE__ */
|
|
2934
|
-
/* @__PURE__ */
|
|
2935
|
-
/* @__PURE__ */
|
|
2936
|
-
/* @__PURE__ */
|
|
2937
|
-
/* @__PURE__ */
|
|
3209
|
+
isAiProcessing && /* @__PURE__ */ jsxs7("div", { className: "hw-typing", children: [
|
|
3210
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-label", children: agentName }),
|
|
3211
|
+
/* @__PURE__ */ jsxs7("div", { className: "hw-typing-dots", children: [
|
|
3212
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" }),
|
|
3213
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" }),
|
|
3214
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" })
|
|
2938
3215
|
] })
|
|
2939
3216
|
] }),
|
|
2940
|
-
isTyping && !isAiProcessing && /* @__PURE__ */
|
|
2941
|
-
/* @__PURE__ */
|
|
2942
|
-
/* @__PURE__ */
|
|
2943
|
-
/* @__PURE__ */
|
|
3217
|
+
isTyping && !isAiProcessing && /* @__PURE__ */ jsx12("div", { className: "hw-typing", children: /* @__PURE__ */ jsxs7("div", { className: "hw-typing-dots", children: [
|
|
3218
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" }),
|
|
3219
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" }),
|
|
3220
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" })
|
|
2944
3221
|
] }) }),
|
|
2945
|
-
/* @__PURE__ */
|
|
3222
|
+
/* @__PURE__ */ jsx12("div", { ref: bottomRef })
|
|
2946
3223
|
]
|
|
2947
3224
|
}
|
|
2948
3225
|
);
|
|
@@ -2960,20 +3237,20 @@ function EventCard({ text }) {
|
|
|
2960
3237
|
const data = parseEventData(text);
|
|
2961
3238
|
if (data) {
|
|
2962
3239
|
const message = data.action === "joined" ? t("widget.joined") : t("widget.left");
|
|
2963
|
-
return /* @__PURE__ */
|
|
2964
|
-
/* @__PURE__ */
|
|
2965
|
-
/* @__PURE__ */
|
|
2966
|
-
/* @__PURE__ */
|
|
3240
|
+
return /* @__PURE__ */ jsxs7("div", { className: "hw-event hw-event--card", children: [
|
|
3241
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-event-avatar", children: data.image ? /* @__PURE__ */ jsx12("img", { src: data.image, alt: "", className: "hw-event-avatar-img" }) : /* @__PURE__ */ jsx12("span", { children: getInitials(data.name) }) }),
|
|
3242
|
+
/* @__PURE__ */ jsxs7("div", { className: "hw-event-body", children: [
|
|
3243
|
+
/* @__PURE__ */ jsx12("span", { className: "hw-event-name", children: data.name }),
|
|
2967
3244
|
" ",
|
|
2968
|
-
/* @__PURE__ */
|
|
3245
|
+
/* @__PURE__ */ jsx12("span", { className: "hw-event-action", children: message })
|
|
2969
3246
|
] })
|
|
2970
3247
|
] });
|
|
2971
3248
|
}
|
|
2972
|
-
return /* @__PURE__ */
|
|
3249
|
+
return /* @__PURE__ */ jsx12("div", { className: "hw-event", children: /* @__PURE__ */ jsx12("div", { className: "hw-event-text", children: text }) });
|
|
2973
3250
|
}
|
|
2974
3251
|
|
|
2975
3252
|
// src/themed/default-widget.tsx
|
|
2976
|
-
import { Fragment as
|
|
3253
|
+
import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2977
3254
|
function resolveLabel2(label) {
|
|
2978
3255
|
if (!label.startsWith("widget.")) return label;
|
|
2979
3256
|
const resolved = t(label);
|
|
@@ -2985,7 +3262,7 @@ var EMPTY_CONTENT_TABS = [];
|
|
|
2985
3262
|
var DEFAULT_EN_WELCOME = "Hi there \u{1F44B}\nHow can we help?";
|
|
2986
3263
|
var DEFAULT_EN_SUBTITLE = "Usually replies in minutes";
|
|
2987
3264
|
function HelpwayMark({ className }) {
|
|
2988
|
-
return /* @__PURE__ */
|
|
3265
|
+
return /* @__PURE__ */ jsx13(
|
|
2989
3266
|
"svg",
|
|
2990
3267
|
{
|
|
2991
3268
|
className,
|
|
@@ -2995,7 +3272,7 @@ function HelpwayMark({ className }) {
|
|
|
2995
3272
|
fill: "none",
|
|
2996
3273
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2997
3274
|
"aria-hidden": "true",
|
|
2998
|
-
children: /* @__PURE__ */
|
|
3275
|
+
children: /* @__PURE__ */ jsx13(
|
|
2999
3276
|
"path",
|
|
3000
3277
|
{
|
|
3001
3278
|
d: "M28.7 0H12.8L0 12.8V28.7L12.8 41.5H28.7L41.5 28.7V12.8L28.7 0ZM15 28.9L6.80002 20.7L15 12.5C18.1 9.4 23.2 9.4 26.3 12.5L34.5 20.7L26.3 28.9C23.2 32 18.2 32 15 28.9Z",
|
|
@@ -3009,11 +3286,11 @@ function WidgetLogo({ className }) {
|
|
|
3009
3286
|
const agentConfig = useWidgetStore((s) => s.agentConfig);
|
|
3010
3287
|
const logoUrl = useWidgetStore((s) => s.website?.logoUrl);
|
|
3011
3288
|
if (agentConfig?.avatarUrl) {
|
|
3012
|
-
return /* @__PURE__ */
|
|
3289
|
+
return /* @__PURE__ */ jsx13("img", { src: agentConfig.avatarUrl, alt: "", className: `hw-agent-img ${className ?? ""}` });
|
|
3013
3290
|
}
|
|
3014
3291
|
if (agentConfig?.avatarPreset) {
|
|
3015
3292
|
const color = agentConfig.brandColor ?? "#0a0a0a";
|
|
3016
|
-
return /* @__PURE__ */
|
|
3293
|
+
return /* @__PURE__ */ jsx13(
|
|
3017
3294
|
"div",
|
|
3018
3295
|
{
|
|
3019
3296
|
className: `hw-agent-icon ${className ?? ""}`,
|
|
@@ -3024,14 +3301,14 @@ function WidgetLogo({ className }) {
|
|
|
3024
3301
|
justifyContent: "center",
|
|
3025
3302
|
borderRadius: 8
|
|
3026
3303
|
},
|
|
3027
|
-
children: /* @__PURE__ */
|
|
3304
|
+
children: /* @__PURE__ */ jsx13(AgentPresetIcon, { presetId: agentConfig.avatarPreset })
|
|
3028
3305
|
}
|
|
3029
3306
|
);
|
|
3030
3307
|
}
|
|
3031
3308
|
if (logoUrl) {
|
|
3032
|
-
return /* @__PURE__ */
|
|
3309
|
+
return /* @__PURE__ */ jsx13("img", { src: logoUrl, alt: "", className: `hw-agent-img ${className ?? ""}` });
|
|
3033
3310
|
}
|
|
3034
|
-
return /* @__PURE__ */
|
|
3311
|
+
return /* @__PURE__ */ jsx13(HelpwayMark, { className });
|
|
3035
3312
|
}
|
|
3036
3313
|
var PRESET_SVG = {
|
|
3037
3314
|
// Helpway brand mark — octagonal chamfer with stylized "W" inside.
|
|
@@ -3090,7 +3367,7 @@ function AgentPresetIcon({ presetId }) {
|
|
|
3090
3367
|
const svgContent = PRESET_SVG[presetId] ?? PRESET_SVG.sparkle;
|
|
3091
3368
|
return (
|
|
3092
3369
|
// biome-ignore lint: trusted static SVG content from our icon library
|
|
3093
|
-
/* @__PURE__ */
|
|
3370
|
+
/* @__PURE__ */ jsx13(
|
|
3094
3371
|
"svg",
|
|
3095
3372
|
{
|
|
3096
3373
|
viewBox: "0 0 24 24",
|
|
@@ -3275,7 +3552,7 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3275
3552
|
handleClose();
|
|
3276
3553
|
}
|
|
3277
3554
|
}, [handleClose]);
|
|
3278
|
-
|
|
3555
|
+
useEffect11(() => {
|
|
3279
3556
|
if (!isOpen || !windowRef.current) return;
|
|
3280
3557
|
const vv = window.visualViewport;
|
|
3281
3558
|
if (!vv) return;
|
|
@@ -3292,7 +3569,7 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3292
3569
|
win.style.removeProperty("--hw-visible-height");
|
|
3293
3570
|
};
|
|
3294
3571
|
}, [isOpen]);
|
|
3295
|
-
|
|
3572
|
+
useEffect11(() => {
|
|
3296
3573
|
if (!isOpen || !windowRef.current) return;
|
|
3297
3574
|
const win = windowRef.current;
|
|
3298
3575
|
const handleKeyDown = (e) => {
|
|
@@ -3308,7 +3585,7 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3308
3585
|
win.addEventListener("keydown", handleKeyDown);
|
|
3309
3586
|
return () => win.removeEventListener("keydown", handleKeyDown);
|
|
3310
3587
|
}, [isOpen, subView, handleClose, goBack]);
|
|
3311
|
-
|
|
3588
|
+
useEffect11(() => {
|
|
3312
3589
|
if (!isOpen || !windowRef.current) return;
|
|
3313
3590
|
const win = windowRef.current;
|
|
3314
3591
|
const getFocusable = () => win.querySelectorAll(
|
|
@@ -3340,6 +3617,12 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3340
3617
|
return () => win.removeEventListener("keydown", handleTab);
|
|
3341
3618
|
}, [isOpen]);
|
|
3342
3619
|
const showTabBar = subView === null;
|
|
3620
|
+
const activeConvSummary = useWidgetStore((s) => {
|
|
3621
|
+
const id = s.activeConversationId;
|
|
3622
|
+
return id ? s.conversations.find((c) => c.id === id) : null;
|
|
3623
|
+
});
|
|
3624
|
+
const hasTeamAgent = activeConvSummary?.lastMessageSenderType === "team" && activeConvSummary?.lastMessageSenderName;
|
|
3625
|
+
const headerName = hasTeamAgent ? activeConvSummary.lastMessageSenderName : agentConfig?.name ?? website?.name ?? "Support";
|
|
3343
3626
|
const companyName = agentConfig?.name ?? website?.name ?? "Support";
|
|
3344
3627
|
const subtitleMsg = agentConfig?.subtitleText;
|
|
3345
3628
|
const subtitleIsFactoryDefault = !subtitleMsg || subtitleMsg === DEFAULT_EN_SUBTITLE;
|
|
@@ -3348,7 +3631,7 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3348
3631
|
const widgetPosition = agentConfig?.widgetPosition ?? "bottom-right";
|
|
3349
3632
|
const launcherStyle = agentConfig?.launcherStyle ?? "icon";
|
|
3350
3633
|
const bubbleStyle = agentConfig?.bubbleStyle ?? "rounded";
|
|
3351
|
-
return /* @__PURE__ */
|
|
3634
|
+
return /* @__PURE__ */ jsxs8(
|
|
3352
3635
|
"div",
|
|
3353
3636
|
{
|
|
3354
3637
|
className: "hw-widget",
|
|
@@ -3360,20 +3643,20 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3360
3643
|
"--hw-window-left": widgetPosition === "bottom-left" ? "0" : "auto"
|
|
3361
3644
|
},
|
|
3362
3645
|
children: [
|
|
3363
|
-
isOpen && !isReady && !hasBootstrapError && /* @__PURE__ */
|
|
3364
|
-
/* @__PURE__ */
|
|
3365
|
-
/* @__PURE__ */
|
|
3366
|
-
/* @__PURE__ */
|
|
3646
|
+
isOpen && !isReady && !hasBootstrapError && /* @__PURE__ */ jsx13("div", { className: `hw-window ${isClosing ? "hw-window--closing" : ""}`, children: /* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-loading", children: [
|
|
3647
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 120 } }),
|
|
3648
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 200 } }),
|
|
3649
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 160 } })
|
|
3367
3650
|
] }) }),
|
|
3368
|
-
isOpen && hasBootstrapError && /* @__PURE__ */
|
|
3369
|
-
/* @__PURE__ */
|
|
3370
|
-
/* @__PURE__ */
|
|
3651
|
+
isOpen && hasBootstrapError && /* @__PURE__ */ jsx13("div", { className: `hw-window ${isClosing ? "hw-window--closing" : ""}`, children: /* @__PURE__ */ jsxs8("div", { className: "hw-bootstrap-error", children: [
|
|
3652
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-bootstrap-error-text", children: t("widget.error_desc") }),
|
|
3653
|
+
/* @__PURE__ */ jsx13("button", { type: "button", className: "hw-bootstrap-error-retry", onClick: retryBootstrap, children: t("widget.retry") })
|
|
3371
3654
|
] }) }),
|
|
3372
|
-
isOpen && isReady && /* @__PURE__ */
|
|
3655
|
+
isOpen && isReady && /* @__PURE__ */ jsxs8(
|
|
3373
3656
|
"div",
|
|
3374
3657
|
{
|
|
3375
3658
|
ref: windowRef,
|
|
3376
|
-
className: `hw-window ${isClosing ? "hw-window--closing" : ""}`,
|
|
3659
|
+
className: `hw-window ${isClosing ? "hw-window--closing" : ""} ${subView === "content-detail" ? "hw-window--reading" : ""}`,
|
|
3377
3660
|
role: "dialog",
|
|
3378
3661
|
"aria-label": t("widget.aria_chat"),
|
|
3379
3662
|
"aria-modal": "true",
|
|
@@ -3381,24 +3664,24 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3381
3664
|
onTouchMove: handleTouchMove,
|
|
3382
3665
|
onTouchEnd: handleTouchEnd,
|
|
3383
3666
|
children: [
|
|
3384
|
-
/* @__PURE__ */
|
|
3385
|
-
wsDisconnected && /* @__PURE__ */
|
|
3386
|
-
/* @__PURE__ */
|
|
3667
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-drag-handle", children: /* @__PURE__ */ jsx13("div", { className: "hw-drag-handle-pill" }) }),
|
|
3668
|
+
wsDisconnected && /* @__PURE__ */ jsxs8("div", { className: "hw-disconnect", children: [
|
|
3669
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-disconnect-dot" }),
|
|
3387
3670
|
t("widget.reconnecting")
|
|
3388
3671
|
] }),
|
|
3389
3672
|
(subView === "content-detail" || subView === "content-category") && (() => {
|
|
3390
3673
|
const tabId = activeTab.replace("content:", "");
|
|
3391
3674
|
const contentTab = contentTabs.find((t2) => t2.id === tabId);
|
|
3392
3675
|
const headerTitle = subView === "content-category" && contentCategoryName ? contentCategoryName : contentTab?.label ? resolveLabel2(contentTab.label) : t("widget.content");
|
|
3393
|
-
return /* @__PURE__ */
|
|
3394
|
-
/* @__PURE__ */
|
|
3676
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-header hw-header--centered", children: [
|
|
3677
|
+
/* @__PURE__ */ jsx13(
|
|
3395
3678
|
"button",
|
|
3396
3679
|
{
|
|
3397
3680
|
type: "button",
|
|
3398
3681
|
className: "hw-header-back",
|
|
3399
3682
|
onClick: goBack,
|
|
3400
3683
|
"aria-label": t("widget.aria_back"),
|
|
3401
|
-
children: /* @__PURE__ */
|
|
3684
|
+
children: /* @__PURE__ */ jsx13(
|
|
3402
3685
|
"svg",
|
|
3403
3686
|
{
|
|
3404
3687
|
viewBox: "0 0 24 24",
|
|
@@ -3407,33 +3690,33 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3407
3690
|
strokeWidth: 2,
|
|
3408
3691
|
strokeLinecap: "round",
|
|
3409
3692
|
strokeLinejoin: "round",
|
|
3410
|
-
children: /* @__PURE__ */
|
|
3693
|
+
children: /* @__PURE__ */ jsx13("path", { d: "M15 18l-6-6 6-6" })
|
|
3411
3694
|
}
|
|
3412
3695
|
)
|
|
3413
3696
|
}
|
|
3414
3697
|
),
|
|
3415
|
-
/* @__PURE__ */
|
|
3416
|
-
/* @__PURE__ */
|
|
3698
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-title", children: headerTitle }),
|
|
3699
|
+
/* @__PURE__ */ jsx13(
|
|
3417
3700
|
"button",
|
|
3418
3701
|
{
|
|
3419
3702
|
type: "button",
|
|
3420
3703
|
className: "hw-header-close",
|
|
3421
3704
|
onClick: handleClose,
|
|
3422
3705
|
"aria-label": t("widget.aria_close"),
|
|
3423
|
-
children: /* @__PURE__ */
|
|
3706
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
3424
3707
|
}
|
|
3425
3708
|
)
|
|
3426
3709
|
] });
|
|
3427
3710
|
})(),
|
|
3428
|
-
subView !== null && subView !== "content-detail" && subView !== "content-category" && /* @__PURE__ */
|
|
3429
|
-
/* @__PURE__ */
|
|
3711
|
+
subView !== null && subView !== "content-detail" && subView !== "content-category" && /* @__PURE__ */ jsxs8("div", { className: "hw-header hw-header--sub", children: [
|
|
3712
|
+
/* @__PURE__ */ jsx13(
|
|
3430
3713
|
"button",
|
|
3431
3714
|
{
|
|
3432
3715
|
type: "button",
|
|
3433
3716
|
className: "hw-header-back",
|
|
3434
3717
|
onClick: goBack,
|
|
3435
3718
|
"aria-label": t("widget.aria_back"),
|
|
3436
|
-
children: /* @__PURE__ */
|
|
3719
|
+
children: /* @__PURE__ */ jsx13(
|
|
3437
3720
|
"svg",
|
|
3438
3721
|
{
|
|
3439
3722
|
viewBox: "0 0 24 24",
|
|
@@ -3442,66 +3725,66 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3442
3725
|
strokeWidth: 2,
|
|
3443
3726
|
strokeLinecap: "round",
|
|
3444
3727
|
strokeLinejoin: "round",
|
|
3445
|
-
children: /* @__PURE__ */
|
|
3728
|
+
children: /* @__PURE__ */ jsx13("path", { d: "M15 18l-6-6 6-6" })
|
|
3446
3729
|
}
|
|
3447
3730
|
)
|
|
3448
3731
|
}
|
|
3449
3732
|
),
|
|
3450
|
-
/* @__PURE__ */
|
|
3451
|
-
/* @__PURE__ */
|
|
3452
|
-
/* @__PURE__ */
|
|
3453
|
-
/* @__PURE__ */
|
|
3454
|
-
/* @__PURE__ */
|
|
3733
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-header-identity", children: [
|
|
3734
|
+
/* @__PURE__ */ jsx13("div", { className: `hw-header-bot-icon${hasTeamAgent ? " hw-header-bot-icon--team" : ""}`, children: hasTeamAgent && activeConvSummary?.lastMessageSenderImage ? /* @__PURE__ */ jsx13("img", { src: activeConvSummary.lastMessageSenderImage, alt: headerName, className: "hw-header-agent-img" }) : hasTeamAgent ? /* @__PURE__ */ jsx13("span", { className: "hw-header-agent-initials", children: headerName.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase() }) : /* @__PURE__ */ jsx13(WidgetLogo, {}) }),
|
|
3735
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-header-info", children: [
|
|
3736
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-name", children: headerName }),
|
|
3737
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-status", children: subtitleText })
|
|
3455
3738
|
] })
|
|
3456
3739
|
] }),
|
|
3457
|
-
/* @__PURE__ */
|
|
3740
|
+
/* @__PURE__ */ jsx13(
|
|
3458
3741
|
"button",
|
|
3459
3742
|
{
|
|
3460
3743
|
type: "button",
|
|
3461
3744
|
className: "hw-header-close",
|
|
3462
3745
|
onClick: handleClose,
|
|
3463
3746
|
"aria-label": t("widget.aria_close"),
|
|
3464
|
-
children: /* @__PURE__ */
|
|
3747
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
3465
3748
|
}
|
|
3466
3749
|
)
|
|
3467
3750
|
] }),
|
|
3468
|
-
subView === null && activeTab === "home" && /* @__PURE__ */
|
|
3469
|
-
/* @__PURE__ */
|
|
3470
|
-
/* @__PURE__ */
|
|
3471
|
-
/* @__PURE__ */
|
|
3472
|
-
/* @__PURE__ */
|
|
3751
|
+
subView === null && activeTab === "home" && /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
3752
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-hero", children: [
|
|
3753
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-hero-top", children: [
|
|
3754
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-hero-bot-icon", children: /* @__PURE__ */ jsx13(WidgetLogo, {}) }),
|
|
3755
|
+
/* @__PURE__ */ jsx13(
|
|
3473
3756
|
"button",
|
|
3474
3757
|
{
|
|
3475
3758
|
type: "button",
|
|
3476
3759
|
className: "hw-hero-close",
|
|
3477
3760
|
onClick: handleClose,
|
|
3478
3761
|
"aria-label": t("widget.aria_close"),
|
|
3479
|
-
children: /* @__PURE__ */
|
|
3762
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
3480
3763
|
}
|
|
3481
3764
|
)
|
|
3482
3765
|
] }),
|
|
3483
|
-
/* @__PURE__ */
|
|
3766
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-hero-greeting", children: welcomeMessage.split("\n").map((line, i) => /* @__PURE__ */ jsxs8(
|
|
3484
3767
|
"span",
|
|
3485
3768
|
{
|
|
3486
3769
|
className: i === 0 ? "hw-hero-greeting-name" : "hw-hero-greeting-question",
|
|
3487
3770
|
children: [
|
|
3488
|
-
i > 0 && /* @__PURE__ */
|
|
3771
|
+
i > 0 && /* @__PURE__ */ jsx13("br", {}),
|
|
3489
3772
|
line
|
|
3490
3773
|
]
|
|
3491
3774
|
},
|
|
3492
3775
|
i
|
|
3493
3776
|
)) }),
|
|
3494
|
-
/* @__PURE__ */
|
|
3777
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-hero-subtitle", children: subtitleText })
|
|
3495
3778
|
] }),
|
|
3496
|
-
/* @__PURE__ */
|
|
3497
|
-
/* @__PURE__ */
|
|
3498
|
-
/* @__PURE__ */
|
|
3499
|
-
/* @__PURE__ */
|
|
3500
|
-
/* @__PURE__ */
|
|
3779
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-sheet", children: /* @__PURE__ */ jsxs8("div", { className: "hw-sheet-inner", children: [
|
|
3780
|
+
/* @__PURE__ */ jsxs8("button", { type: "button", className: "hw-card", onClick: openNewConversation, children: [
|
|
3781
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-card-body", children: [
|
|
3782
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-card-title", children: t("widget.send_us_message") }),
|
|
3783
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-card-meta", children: t("widget.reply_time") })
|
|
3501
3784
|
] }),
|
|
3502
|
-
/* @__PURE__ */
|
|
3785
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-card-arrow", children: /* @__PURE__ */ jsx13(SendIcon, {}) })
|
|
3503
3786
|
] }),
|
|
3504
|
-
/* @__PURE__ */
|
|
3787
|
+
/* @__PURE__ */ jsx13(
|
|
3505
3788
|
HomeView,
|
|
3506
3789
|
{
|
|
3507
3790
|
conversations,
|
|
@@ -3511,17 +3794,17 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3511
3794
|
)
|
|
3512
3795
|
] }) })
|
|
3513
3796
|
] }),
|
|
3514
|
-
subView === null && activeTab === "messages" && /* @__PURE__ */
|
|
3515
|
-
/* @__PURE__ */
|
|
3516
|
-
/* @__PURE__ */
|
|
3517
|
-
/* @__PURE__ */
|
|
3797
|
+
subView === null && activeTab === "messages" && /* @__PURE__ */ jsxs8("div", { className: "hw-header hw-header--centered", children: [
|
|
3798
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-spacer" }),
|
|
3799
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-title", children: t("widget.messages") }),
|
|
3800
|
+
/* @__PURE__ */ jsx13(
|
|
3518
3801
|
"button",
|
|
3519
3802
|
{
|
|
3520
3803
|
type: "button",
|
|
3521
3804
|
className: "hw-header-close",
|
|
3522
3805
|
onClick: handleClose,
|
|
3523
3806
|
"aria-label": t("widget.aria_close"),
|
|
3524
|
-
children: /* @__PURE__ */
|
|
3807
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
3525
3808
|
}
|
|
3526
3809
|
)
|
|
3527
3810
|
] }),
|
|
@@ -3529,23 +3812,23 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3529
3812
|
const tabId = activeTab.replace("content:", "");
|
|
3530
3813
|
const contentTab = contentTabs.find((t2) => t2.id === tabId);
|
|
3531
3814
|
if (!contentTab) return null;
|
|
3532
|
-
return /* @__PURE__ */
|
|
3533
|
-
/* @__PURE__ */
|
|
3534
|
-
/* @__PURE__ */
|
|
3535
|
-
/* @__PURE__ */
|
|
3815
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-header hw-header--centered", children: [
|
|
3816
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-spacer" }),
|
|
3817
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-title", children: resolveLabel2(contentTab.label) }),
|
|
3818
|
+
/* @__PURE__ */ jsx13(
|
|
3536
3819
|
"button",
|
|
3537
3820
|
{
|
|
3538
3821
|
type: "button",
|
|
3539
3822
|
className: "hw-header-close",
|
|
3540
3823
|
onClick: handleClose,
|
|
3541
3824
|
"aria-label": t("widget.aria_close"),
|
|
3542
|
-
children: /* @__PURE__ */
|
|
3825
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
3543
3826
|
}
|
|
3544
3827
|
)
|
|
3545
3828
|
] });
|
|
3546
3829
|
})(),
|
|
3547
|
-
(subView !== null || activeTab !== "home") && /* @__PURE__ */
|
|
3548
|
-
subView === null && activeTab === "messages" && /* @__PURE__ */
|
|
3830
|
+
(subView !== null || activeTab !== "home") && /* @__PURE__ */ jsxs8("div", { className: "hw-content", children: [
|
|
3831
|
+
subView === null && activeTab === "messages" && /* @__PURE__ */ jsx13(
|
|
3549
3832
|
MessagesView,
|
|
3550
3833
|
{
|
|
3551
3834
|
conversations,
|
|
@@ -3553,7 +3836,7 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3553
3836
|
onNewClick: openNewConversation
|
|
3554
3837
|
}
|
|
3555
3838
|
),
|
|
3556
|
-
subView === "new" && /* @__PURE__ */
|
|
3839
|
+
subView === "new" && /* @__PURE__ */ jsx13(
|
|
3557
3840
|
NewConversationView,
|
|
3558
3841
|
{
|
|
3559
3842
|
text: newText,
|
|
@@ -3563,12 +3846,12 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3563
3846
|
welcomeMessage
|
|
3564
3847
|
}
|
|
3565
3848
|
),
|
|
3566
|
-
subView === "conversation" && activeId && /* @__PURE__ */
|
|
3849
|
+
subView === "conversation" && activeId && /* @__PURE__ */ jsx13(ConversationView, { conversationId: activeId }),
|
|
3567
3850
|
activeTab.startsWith("content:") && (() => {
|
|
3568
3851
|
const tabId = activeTab.replace("content:", "");
|
|
3569
3852
|
const contentTab = contentTabs.find((t2) => t2.id === tabId);
|
|
3570
3853
|
if (!contentTab) return null;
|
|
3571
|
-
return /* @__PURE__ */
|
|
3854
|
+
return /* @__PURE__ */ jsx13(
|
|
3572
3855
|
ContentTabView,
|
|
3573
3856
|
{
|
|
3574
3857
|
tab: contentTab,
|
|
@@ -3587,7 +3870,7 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3587
3870
|
);
|
|
3588
3871
|
})()
|
|
3589
3872
|
] }),
|
|
3590
|
-
showTabBar && /* @__PURE__ */
|
|
3873
|
+
showTabBar && /* @__PURE__ */ jsx13(
|
|
3591
3874
|
TabBar,
|
|
3592
3875
|
{
|
|
3593
3876
|
activeTab,
|
|
@@ -3597,17 +3880,17 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3597
3880
|
showMessagesTab: agentConfig?.showMessagesTab ?? true
|
|
3598
3881
|
}
|
|
3599
3882
|
),
|
|
3600
|
-
/* @__PURE__ */
|
|
3883
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-powered", children: [
|
|
3601
3884
|
t("widget.powered_by"),
|
|
3602
3885
|
" ",
|
|
3603
|
-
/* @__PURE__ */
|
|
3886
|
+
/* @__PURE__ */ jsx13("a", { href: "https://helpway.ai", target: "_blank", rel: "noopener noreferrer", children: "Helpway" })
|
|
3604
3887
|
] })
|
|
3605
3888
|
]
|
|
3606
3889
|
}
|
|
3607
3890
|
),
|
|
3608
|
-
!isOpen && /* @__PURE__ */
|
|
3609
|
-
/* @__PURE__ */
|
|
3610
|
-
/* @__PURE__ */
|
|
3891
|
+
!isOpen && /* @__PURE__ */ jsx13(MessagePreview, { onOpen: handleBubbleClick }),
|
|
3892
|
+
/* @__PURE__ */ jsx13(WidgetDebugOverlay, {}),
|
|
3893
|
+
/* @__PURE__ */ jsxs8(
|
|
3611
3894
|
"button",
|
|
3612
3895
|
{
|
|
3613
3896
|
ref: bubbleRef,
|
|
@@ -3624,22 +3907,22 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3624
3907
|
"aria-expanded": isOpen,
|
|
3625
3908
|
"aria-haspopup": "dialog",
|
|
3626
3909
|
children: [
|
|
3627
|
-
/* @__PURE__ */
|
|
3910
|
+
/* @__PURE__ */ jsx13(
|
|
3628
3911
|
"span",
|
|
3629
3912
|
{
|
|
3630
3913
|
className: `hw-bubble-icon hw-bubble-icon--bot ${isOpen ? "hw-bubble-icon--hidden" : ""}`,
|
|
3631
|
-
children: /* @__PURE__ */
|
|
3914
|
+
children: /* @__PURE__ */ jsx13(WidgetLogo, {})
|
|
3632
3915
|
}
|
|
3633
3916
|
),
|
|
3634
|
-
/* @__PURE__ */
|
|
3917
|
+
/* @__PURE__ */ jsx13(
|
|
3635
3918
|
"span",
|
|
3636
3919
|
{
|
|
3637
3920
|
className: `hw-bubble-icon hw-bubble-icon--close ${!isOpen ? "hw-bubble-icon--hidden" : ""}`,
|
|
3638
|
-
children: /* @__PURE__ */
|
|
3921
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 24 })
|
|
3639
3922
|
}
|
|
3640
3923
|
),
|
|
3641
|
-
launcherStyle !== "icon" && !isOpen && /* @__PURE__ */
|
|
3642
|
-
!isOpen && totalUnread > 0 && /* @__PURE__ */
|
|
3924
|
+
launcherStyle !== "icon" && !isOpen && /* @__PURE__ */ jsx13("span", { className: "hw-bubble-label", children: launcherStyle === "help" ? t("widget.help") : companyName }),
|
|
3925
|
+
!isOpen && totalUnread > 0 && /* @__PURE__ */ jsx13("div", { className: "hw-bubble-badge", children: totalUnread })
|
|
3643
3926
|
]
|
|
3644
3927
|
}
|
|
3645
3928
|
)
|
|
@@ -3654,8 +3937,8 @@ function TabBar({
|
|
|
3654
3937
|
contentTabs,
|
|
3655
3938
|
showMessagesTab = true
|
|
3656
3939
|
}) {
|
|
3657
|
-
return /* @__PURE__ */
|
|
3658
|
-
/* @__PURE__ */
|
|
3940
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-tabs", role: "tablist", children: [
|
|
3941
|
+
/* @__PURE__ */ jsxs8(
|
|
3659
3942
|
"button",
|
|
3660
3943
|
{
|
|
3661
3944
|
type: "button",
|
|
@@ -3664,12 +3947,12 @@ function TabBar({
|
|
|
3664
3947
|
role: "tab",
|
|
3665
3948
|
"aria-selected": activeTab === "home",
|
|
3666
3949
|
children: [
|
|
3667
|
-
/* @__PURE__ */
|
|
3668
|
-
/* @__PURE__ */
|
|
3950
|
+
/* @__PURE__ */ jsx13(HomeIcon, {}),
|
|
3951
|
+
/* @__PURE__ */ jsx13("span", { children: t("widget.home") })
|
|
3669
3952
|
]
|
|
3670
3953
|
}
|
|
3671
3954
|
),
|
|
3672
|
-
showMessagesTab && /* @__PURE__ */
|
|
3955
|
+
showMessagesTab && /* @__PURE__ */ jsxs8(
|
|
3673
3956
|
"button",
|
|
3674
3957
|
{
|
|
3675
3958
|
type: "button",
|
|
@@ -3678,15 +3961,15 @@ function TabBar({
|
|
|
3678
3961
|
role: "tab",
|
|
3679
3962
|
"aria-selected": activeTab === "messages",
|
|
3680
3963
|
children: [
|
|
3681
|
-
/* @__PURE__ */
|
|
3682
|
-
/* @__PURE__ */
|
|
3683
|
-
unreadCount > 0 && /* @__PURE__ */
|
|
3964
|
+
/* @__PURE__ */ jsxs8("span", { className: "hw-tabs-icon-wrap", children: [
|
|
3965
|
+
/* @__PURE__ */ jsx13(MessagesIcon, {}),
|
|
3966
|
+
unreadCount > 0 && /* @__PURE__ */ jsx13("span", { className: "hw-tabs-badge", children: unreadCount > 99 ? "99+" : unreadCount })
|
|
3684
3967
|
] }),
|
|
3685
|
-
/* @__PURE__ */
|
|
3968
|
+
/* @__PURE__ */ jsx13("span", { children: t("widget.messages") })
|
|
3686
3969
|
]
|
|
3687
3970
|
}
|
|
3688
3971
|
),
|
|
3689
|
-
contentTabs.map((tab) => /* @__PURE__ */
|
|
3972
|
+
contentTabs.map((tab) => /* @__PURE__ */ jsxs8(
|
|
3690
3973
|
"button",
|
|
3691
3974
|
{
|
|
3692
3975
|
type: "button",
|
|
@@ -3695,8 +3978,8 @@ function TabBar({
|
|
|
3695
3978
|
role: "tab",
|
|
3696
3979
|
"aria-selected": activeTab === `content:${tab.id}`,
|
|
3697
3980
|
children: [
|
|
3698
|
-
/* @__PURE__ */
|
|
3699
|
-
/* @__PURE__ */
|
|
3981
|
+
/* @__PURE__ */ jsx13(ContentTabIconComponent, { icon: tab.icon }),
|
|
3982
|
+
/* @__PURE__ */ jsx13("span", { children: resolveLabel2(tab.label) })
|
|
3700
3983
|
]
|
|
3701
3984
|
},
|
|
3702
3985
|
tab.id
|
|
@@ -3710,9 +3993,9 @@ function HomeView({
|
|
|
3710
3993
|
}) {
|
|
3711
3994
|
const recent = conversations.slice(0, 3);
|
|
3712
3995
|
if (recent.length === 0) return null;
|
|
3713
|
-
return /* @__PURE__ */
|
|
3714
|
-
/* @__PURE__ */
|
|
3715
|
-
recent.map((conv, i) => /* @__PURE__ */
|
|
3996
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-recent-card", children: [
|
|
3997
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-recent-header", children: t("widget.recent_conversations") }),
|
|
3998
|
+
recent.map((conv, i) => /* @__PURE__ */ jsx13(
|
|
3716
3999
|
ConversationRow,
|
|
3717
4000
|
{
|
|
3718
4001
|
conversation: conv,
|
|
@@ -3721,7 +4004,7 @@ function HomeView({
|
|
|
3721
4004
|
},
|
|
3722
4005
|
conv.id
|
|
3723
4006
|
)),
|
|
3724
|
-
conversations.length > 3 && /* @__PURE__ */
|
|
4007
|
+
conversations.length > 3 && /* @__PURE__ */ jsx13("button", { type: "button", className: "hw-recent-see-all", onClick: onMessagesClick, children: t("widget.see_all") })
|
|
3725
4008
|
] });
|
|
3726
4009
|
}
|
|
3727
4010
|
function MessagesView({
|
|
@@ -3730,26 +4013,28 @@ function MessagesView({
|
|
|
3730
4013
|
onNewClick
|
|
3731
4014
|
}) {
|
|
3732
4015
|
if (conversations.length === 0) {
|
|
3733
|
-
return /* @__PURE__ */
|
|
3734
|
-
/* @__PURE__ */
|
|
3735
|
-
/* @__PURE__ */
|
|
3736
|
-
/* @__PURE__ */
|
|
3737
|
-
/* @__PURE__ */
|
|
4016
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-empty-state", children: [
|
|
4017
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-empty-icon-wrap", children: /* @__PURE__ */ jsx13(MessagesIcon, {}) }),
|
|
4018
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-empty-title", children: t("widget.no_messages") }),
|
|
4019
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-empty-desc", children: t("widget.no_messages_desc") }),
|
|
4020
|
+
/* @__PURE__ */ jsx13("button", { type: "button", className: "hw-empty-btn", onClick: onNewClick, children: t("widget.start_conversation") })
|
|
3738
4021
|
] });
|
|
3739
4022
|
}
|
|
3740
|
-
return /* @__PURE__ */
|
|
4023
|
+
return /* @__PURE__ */ jsx13("div", { className: "hw-msgs-tab", children: conversations.map((conv) => /* @__PURE__ */ jsx13(ConversationCard, { conversation: conv, onSelect }, conv.id)) });
|
|
3741
4024
|
}
|
|
3742
4025
|
function ConvCardBody({ conv }) {
|
|
3743
4026
|
const agentName = useWidgetStore((s) => s.agentConfig?.name) ?? "Support";
|
|
4027
|
+
const isTeam = conv.lastMessageSenderType === "team" && conv.lastMessageSenderName;
|
|
4028
|
+
const displayName = isTeam ? conv.lastMessageSenderName : agentName;
|
|
3744
4029
|
const preview = conv.lastMessageText ?? t("widget.no_preview");
|
|
3745
|
-
return /* @__PURE__ */
|
|
3746
|
-
/* @__PURE__ */
|
|
3747
|
-
/* @__PURE__ */
|
|
3748
|
-
/* @__PURE__ */
|
|
3749
|
-
/* @__PURE__ */
|
|
3750
|
-
conv.lastMessageAt && /* @__PURE__ */
|
|
4030
|
+
return /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
4031
|
+
/* @__PURE__ */ jsx13("div", { className: `hw-conv-card-avatar${isTeam ? " hw-conv-card-avatar--team" : ""}`, children: isTeam ? conv.lastMessageSenderImage ? /* @__PURE__ */ jsx13("img", { src: conv.lastMessageSenderImage, alt: displayName, className: "hw-conv-card-avatar-img" }) : /* @__PURE__ */ jsx13("span", { className: "hw-conv-card-avatar-initials", children: displayName.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase() }) : /* @__PURE__ */ jsx13(WidgetLogo, {}) }),
|
|
4032
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-conv-card-content", children: [
|
|
4033
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-conv-card-top", children: [
|
|
4034
|
+
/* @__PURE__ */ jsx13("span", { className: "hw-conv-card-name", children: displayName }),
|
|
4035
|
+
conv.lastMessageAt && /* @__PURE__ */ jsx13("span", { className: "hw-conv-card-time", children: formatRelativeTime(conv.lastMessageAt) })
|
|
3751
4036
|
] }),
|
|
3752
|
-
/* @__PURE__ */
|
|
4037
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-conv-card-preview", children: preview })
|
|
3753
4038
|
] })
|
|
3754
4039
|
] });
|
|
3755
4040
|
}
|
|
@@ -3758,15 +4043,15 @@ function ConversationCard({
|
|
|
3758
4043
|
onSelect
|
|
3759
4044
|
}) {
|
|
3760
4045
|
const hasUnread = conv.unreadCount > 0;
|
|
3761
|
-
return /* @__PURE__ */
|
|
4046
|
+
return /* @__PURE__ */ jsxs8(
|
|
3762
4047
|
"button",
|
|
3763
4048
|
{
|
|
3764
4049
|
type: "button",
|
|
3765
4050
|
className: `hw-conv-card ${hasUnread ? "hw-conv-card--unread" : ""}`,
|
|
3766
4051
|
onClick: () => onSelect(conv.id),
|
|
3767
4052
|
children: [
|
|
3768
|
-
/* @__PURE__ */
|
|
3769
|
-
hasUnread && /* @__PURE__ */
|
|
4053
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-conv-card-row", children: /* @__PURE__ */ jsx13(ConvCardBody, { conv }) }),
|
|
4054
|
+
hasUnread && /* @__PURE__ */ jsx13("div", { className: "hw-conv-card-badge", children: conv.unreadCount })
|
|
3770
4055
|
]
|
|
3771
4056
|
}
|
|
3772
4057
|
);
|
|
@@ -3777,20 +4062,20 @@ function ConversationRow({
|
|
|
3777
4062
|
isLast
|
|
3778
4063
|
}) {
|
|
3779
4064
|
const hasUnread = conv.unreadCount > 0;
|
|
3780
|
-
return /* @__PURE__ */
|
|
4065
|
+
return /* @__PURE__ */ jsxs8(
|
|
3781
4066
|
"button",
|
|
3782
4067
|
{
|
|
3783
4068
|
type: "button",
|
|
3784
4069
|
className: `hw-recent-row ${hasUnread ? "hw-recent-row--unread" : ""} ${isLast ? "hw-recent-row--last" : ""}`,
|
|
3785
4070
|
onClick: () => onSelect(conv.id),
|
|
3786
4071
|
children: [
|
|
3787
|
-
/* @__PURE__ */
|
|
3788
|
-
hasUnread && /* @__PURE__ */
|
|
4072
|
+
/* @__PURE__ */ jsx13(ConvCardBody, { conv }),
|
|
4073
|
+
hasUnread && /* @__PURE__ */ jsx13("div", { className: "hw-recent-row-badge", children: conv.unreadCount })
|
|
3789
4074
|
]
|
|
3790
4075
|
}
|
|
3791
4076
|
);
|
|
3792
4077
|
}
|
|
3793
|
-
function InlineEmailPrompt() {
|
|
4078
|
+
function InlineEmailPrompt({ conversationId }) {
|
|
3794
4079
|
const { client, store } = useWidgetContext();
|
|
3795
4080
|
const updateContact = useWidgetStore((s) => s.updateVisitorContact);
|
|
3796
4081
|
const [email, setEmail] = useState12("");
|
|
@@ -3814,7 +4099,10 @@ function InlineEmailPrompt() {
|
|
|
3814
4099
|
setIsSuccess(true);
|
|
3815
4100
|
setIsSubmitting(true);
|
|
3816
4101
|
try {
|
|
3817
|
-
const result = await client.widget.collectEmail.mutate({
|
|
4102
|
+
const result = await client.widget.collectEmail.mutate({
|
|
4103
|
+
email: trimmed,
|
|
4104
|
+
...conversationId ? { conversationId } : {}
|
|
4105
|
+
});
|
|
3818
4106
|
if (result.contact) {
|
|
3819
4107
|
updateContact({
|
|
3820
4108
|
id: result.contact.id,
|
|
@@ -3834,23 +4122,23 @@ function InlineEmailPrompt() {
|
|
|
3834
4122
|
}
|
|
3835
4123
|
};
|
|
3836
4124
|
if (isSuccess) {
|
|
3837
|
-
return /* @__PURE__ */
|
|
3838
|
-
/* @__PURE__ */
|
|
4125
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-email-card hw-email-card--success", children: [
|
|
4126
|
+
/* @__PURE__ */ jsx13("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "#22c55e", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx13("polyline", { points: "20 6 9 17 4 12" }) }),
|
|
3839
4127
|
t("widget.email_saved")
|
|
3840
4128
|
] });
|
|
3841
4129
|
}
|
|
3842
|
-
return /* @__PURE__ */
|
|
3843
|
-
/* @__PURE__ */
|
|
3844
|
-
/* @__PURE__ */
|
|
3845
|
-
/* @__PURE__ */
|
|
3846
|
-
/* @__PURE__ */
|
|
4130
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-email-card", children: [
|
|
4131
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-email-card-header", children: [
|
|
4132
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-email-card-icon", children: /* @__PURE__ */ jsxs8("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
4133
|
+
/* @__PURE__ */ jsx13("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }),
|
|
4134
|
+
/* @__PURE__ */ jsx13("path", { d: "M22 7l-10 7L2 7" })
|
|
3847
4135
|
] }) }),
|
|
3848
|
-
/* @__PURE__ */
|
|
3849
|
-
/* @__PURE__ */
|
|
3850
|
-
/* @__PURE__ */
|
|
4136
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
4137
|
+
/* @__PURE__ */ jsx13("p", { className: "hw-email-card-title", children: t("widget.email_title") }),
|
|
4138
|
+
/* @__PURE__ */ jsx13("p", { className: "hw-email-card-subtitle", children: t("widget.email_subtitle") })
|
|
3851
4139
|
] })
|
|
3852
4140
|
] }),
|
|
3853
|
-
/* @__PURE__ */
|
|
4141
|
+
/* @__PURE__ */ jsx13(
|
|
3854
4142
|
"input",
|
|
3855
4143
|
{
|
|
3856
4144
|
type: "email",
|
|
@@ -3866,14 +4154,14 @@ function InlineEmailPrompt() {
|
|
|
3866
4154
|
placeholder: t("widget.email_placeholder")
|
|
3867
4155
|
}
|
|
3868
4156
|
),
|
|
3869
|
-
/* @__PURE__ */
|
|
4157
|
+
/* @__PURE__ */ jsx13(
|
|
3870
4158
|
"button",
|
|
3871
4159
|
{
|
|
3872
4160
|
type: "button",
|
|
3873
4161
|
className: "hw-email-card-submit",
|
|
3874
4162
|
onClick: handleSubmit,
|
|
3875
4163
|
disabled: isSubmitting || !email.trim(),
|
|
3876
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
4164
|
+
children: isSubmitting ? /* @__PURE__ */ jsx13("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx13("circle", { cx: "12", cy: "12", r: "10", strokeDasharray: "32", strokeDashoffset: "32", children: /* @__PURE__ */ jsx13("animate", { attributeName: "stroke-dashoffset", values: "32;0", dur: "1s", repeatCount: "indefinite" }) }) }) : t("widget.email_continue")
|
|
3877
4165
|
}
|
|
3878
4166
|
)
|
|
3879
4167
|
] });
|
|
@@ -3885,18 +4173,16 @@ function NewConversationView({
|
|
|
3885
4173
|
isSubmitting,
|
|
3886
4174
|
welcomeMessage
|
|
3887
4175
|
}) {
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
/* @__PURE__ */ jsx12("div", { className: "hw-new-welcome", children: /* @__PURE__ */ jsx12(
|
|
4176
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-new", children: [
|
|
4177
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-new-welcome", children: /* @__PURE__ */ jsx13(
|
|
3891
4178
|
MessageBubble,
|
|
3892
4179
|
{
|
|
3893
4180
|
text: welcomeMessage,
|
|
3894
4181
|
sender: "ai",
|
|
3895
|
-
time: welcomeTime,
|
|
3896
4182
|
parts: null
|
|
3897
4183
|
}
|
|
3898
4184
|
) }),
|
|
3899
|
-
/* @__PURE__ */
|
|
4185
|
+
/* @__PURE__ */ jsx13(
|
|
3900
4186
|
Composer,
|
|
3901
4187
|
{
|
|
3902
4188
|
text,
|
|
@@ -3919,7 +4205,8 @@ function ConversationView({ conversationId }) {
|
|
|
3919
4205
|
addFiles,
|
|
3920
4206
|
removeAttachment,
|
|
3921
4207
|
sendError,
|
|
3922
|
-
clearSendError
|
|
4208
|
+
clearSendError,
|
|
4209
|
+
emailGateConvId
|
|
3923
4210
|
} = useComposer(conversationId);
|
|
3924
4211
|
const { isTyping, isAiProcessing, setTyping } = usePresence(conversationId);
|
|
3925
4212
|
const agentConfig = useWidgetStore((s) => s.agentConfig);
|
|
@@ -3934,29 +4221,30 @@ function ConversationView({ conversationId }) {
|
|
|
3934
4221
|
const hasAiReply = items.some(
|
|
3935
4222
|
(it) => it.type === "message" && Boolean(it.aiAgentId)
|
|
3936
4223
|
);
|
|
3937
|
-
const
|
|
4224
|
+
const needsEmailPostReply = !!agentConfig?.requireVisitorEmail && !visitorContact?.email && hasVisitorMessage && hasAiReply;
|
|
4225
|
+
const needsEmail = needsEmailPostReply || !!emailGateConvId;
|
|
3938
4226
|
if (isLoading && items.length === 0) {
|
|
3939
|
-
return /* @__PURE__ */
|
|
3940
|
-
/* @__PURE__ */
|
|
3941
|
-
/* @__PURE__ */
|
|
3942
|
-
/* @__PURE__ */
|
|
3943
|
-
/* @__PURE__ */
|
|
3944
|
-
/* @__PURE__ */
|
|
4227
|
+
return /* @__PURE__ */ jsx13("div", { className: "hw-messages", children: /* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-messages", children: [
|
|
4228
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-msg", children: [
|
|
4229
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-avatar" }),
|
|
4230
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-bubble", children: [
|
|
4231
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 140 } }),
|
|
4232
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 200 } })
|
|
3945
4233
|
] })
|
|
3946
4234
|
] }),
|
|
3947
|
-
/* @__PURE__ */
|
|
3948
|
-
/* @__PURE__ */
|
|
3949
|
-
/* @__PURE__ */
|
|
3950
|
-
/* @__PURE__ */
|
|
3951
|
-
/* @__PURE__ */
|
|
3952
|
-
/* @__PURE__ */
|
|
3953
|
-
/* @__PURE__ */
|
|
4235
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton-msg hw-skeleton-msg--right", children: /* @__PURE__ */ jsx13("div", { className: "hw-skeleton-bubble", style: { alignItems: "flex-end" }, children: /* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 160 } }) }) }),
|
|
4236
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-msg", children: [
|
|
4237
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-avatar" }),
|
|
4238
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-bubble", children: [
|
|
4239
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 180 } }),
|
|
4240
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 120 } }),
|
|
4241
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 80 } })
|
|
3954
4242
|
] })
|
|
3955
4243
|
] })
|
|
3956
4244
|
] }) });
|
|
3957
4245
|
}
|
|
3958
|
-
return /* @__PURE__ */
|
|
3959
|
-
/* @__PURE__ */
|
|
4246
|
+
return /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
4247
|
+
/* @__PURE__ */ jsx13(
|
|
3960
4248
|
MessageList,
|
|
3961
4249
|
{
|
|
3962
4250
|
items,
|
|
@@ -3967,11 +4255,11 @@ function ConversationView({ conversationId }) {
|
|
|
3967
4255
|
onLoadMore: loadMore
|
|
3968
4256
|
}
|
|
3969
4257
|
),
|
|
3970
|
-
isResolved ? /* @__PURE__ */
|
|
3971
|
-
needsEmail && /* @__PURE__ */
|
|
3972
|
-
sendError && /* @__PURE__ */
|
|
4258
|
+
isResolved ? /* @__PURE__ */ jsx13(ResolvedBanner, { conversationId }) : /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
4259
|
+
needsEmail && /* @__PURE__ */ jsx13(InlineEmailPrompt, { conversationId: emailGateConvId ?? void 0 }),
|
|
4260
|
+
sendError && /* @__PURE__ */ jsxs8("div", { className: "hw-send-error", children: [
|
|
3973
4261
|
sendError,
|
|
3974
|
-
/* @__PURE__ */
|
|
4262
|
+
/* @__PURE__ */ jsx13(
|
|
3975
4263
|
"button",
|
|
3976
4264
|
{
|
|
3977
4265
|
type: "button",
|
|
@@ -3984,7 +4272,7 @@ function ConversationView({ conversationId }) {
|
|
|
3984
4272
|
}
|
|
3985
4273
|
)
|
|
3986
4274
|
] }),
|
|
3987
|
-
/* @__PURE__ */
|
|
4275
|
+
/* @__PURE__ */ jsx13(
|
|
3988
4276
|
Composer,
|
|
3989
4277
|
{
|
|
3990
4278
|
text,
|
|
@@ -4018,12 +4306,12 @@ function ResolvedBanner({ conversationId }) {
|
|
|
4018
4306
|
client.widget.sendCsat.mutate({ conversationId, rating }).catch(() => {
|
|
4019
4307
|
});
|
|
4020
4308
|
};
|
|
4021
|
-
return /* @__PURE__ */
|
|
4022
|
-
/* @__PURE__ */
|
|
4023
|
-
!csatSubmitted ? /* @__PURE__ */
|
|
4024
|
-
/* @__PURE__ */
|
|
4025
|
-
/* @__PURE__ */
|
|
4026
|
-
/* @__PURE__ */
|
|
4309
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-resolved", children: [
|
|
4310
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-resolved-text", children: t("widget.resolved_text") }),
|
|
4311
|
+
!csatSubmitted ? /* @__PURE__ */ jsxs8("div", { className: "hw-csat", children: [
|
|
4312
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-csat-label", children: t("widget.csat_label") }),
|
|
4313
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-csat-buttons", children: [
|
|
4314
|
+
/* @__PURE__ */ jsx13(
|
|
4027
4315
|
"button",
|
|
4028
4316
|
{
|
|
4029
4317
|
type: "button",
|
|
@@ -4033,7 +4321,7 @@ function ResolvedBanner({ conversationId }) {
|
|
|
4033
4321
|
children: "\u{1F44D}"
|
|
4034
4322
|
}
|
|
4035
4323
|
),
|
|
4036
|
-
/* @__PURE__ */
|
|
4324
|
+
/* @__PURE__ */ jsx13(
|
|
4037
4325
|
"button",
|
|
4038
4326
|
{
|
|
4039
4327
|
type: "button",
|
|
@@ -4044,8 +4332,8 @@ function ResolvedBanner({ conversationId }) {
|
|
|
4044
4332
|
}
|
|
4045
4333
|
)
|
|
4046
4334
|
] })
|
|
4047
|
-
] }) : /* @__PURE__ */
|
|
4048
|
-
/* @__PURE__ */
|
|
4335
|
+
] }) : /* @__PURE__ */ jsx13("div", { className: "hw-csat-thanks", children: t("widget.csat_thanks") }),
|
|
4336
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-resolved-actions", children: /* @__PURE__ */ jsx13("button", { type: "button", className: "hw-resolved-reopen", onClick: handleReopen, children: t("widget.send_followup") }) })
|
|
4049
4337
|
] });
|
|
4050
4338
|
}
|
|
4051
4339
|
function MessagePreview({ onOpen }) {
|
|
@@ -4053,7 +4341,7 @@ function MessagePreview({ onOpen }) {
|
|
|
4053
4341
|
const dismissPreview = useWidgetStore((s) => s.dismissPreview);
|
|
4054
4342
|
const agentName = useWidgetStore((s) => s.agentConfig?.name) ?? "Support";
|
|
4055
4343
|
const [closing, setClosing] = useState12(false);
|
|
4056
|
-
|
|
4344
|
+
useEffect11(() => {
|
|
4057
4345
|
if (!preview) return;
|
|
4058
4346
|
const timer = setTimeout(() => {
|
|
4059
4347
|
setClosing(true);
|
|
@@ -4074,7 +4362,7 @@ function MessagePreview({ onOpen }) {
|
|
|
4074
4362
|
dismissPreview();
|
|
4075
4363
|
onOpen();
|
|
4076
4364
|
};
|
|
4077
|
-
return /* @__PURE__ */
|
|
4365
|
+
return /* @__PURE__ */ jsxs8(
|
|
4078
4366
|
"div",
|
|
4079
4367
|
{
|
|
4080
4368
|
className: `hw-preview ${closing ? "hw-preview--closing" : ""}`,
|
|
@@ -4082,21 +4370,21 @@ function MessagePreview({ onOpen }) {
|
|
|
4082
4370
|
role: "button",
|
|
4083
4371
|
tabIndex: 0,
|
|
4084
4372
|
children: [
|
|
4085
|
-
/* @__PURE__ */
|
|
4086
|
-
/* @__PURE__ */
|
|
4087
|
-
/* @__PURE__ */
|
|
4088
|
-
/* @__PURE__ */
|
|
4373
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-preview-header", children: [
|
|
4374
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-preview-avatar", children: /* @__PURE__ */ jsx13(WidgetLogo, {}) }),
|
|
4375
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-preview-name", children: agentName }),
|
|
4376
|
+
/* @__PURE__ */ jsx13(
|
|
4089
4377
|
"button",
|
|
4090
4378
|
{
|
|
4091
4379
|
type: "button",
|
|
4092
4380
|
className: "hw-preview-close",
|
|
4093
4381
|
onClick: handleClose,
|
|
4094
4382
|
"aria-label": t("widget.aria_dismiss"),
|
|
4095
|
-
children: /* @__PURE__ */
|
|
4383
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
4096
4384
|
}
|
|
4097
4385
|
)
|
|
4098
4386
|
] }),
|
|
4099
|
-
/* @__PURE__ */
|
|
4387
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-preview-body", children: preview.text })
|
|
4100
4388
|
]
|
|
4101
4389
|
}
|
|
4102
4390
|
);
|
|
@@ -4125,10 +4413,10 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
4125
4413
|
}
|
|
4126
4414
|
|
|
4127
4415
|
// src/themed/styles.css
|
|
4128
|
-
styleInject(':host {\n all: initial;\n font-family:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif;\n font-size: 14px;\n line-height: 1.5;\n color: #1a1a1a;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.hw-widget {\n font-family:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif;\n font-size: 14px;\n line-height: 1.5;\n color: #1a1a1a;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.hw-widget *,\n.hw-widget *::before,\n.hw-widget *::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.hw-widget {\n --hw-primary: #171717;\n --hw-primary-hover: #2a2a2a;\n --hw-focus-border: #9ca3af;\n --hw-focus-ring: rgba(0, 0, 0, 0.06);\n --hw-accent: #6366f1;\n --hw-bg: #ffffff;\n --hw-bg-subtle: #fafafa;\n --hw-bg-hover: #f5f5f5;\n --hw-border: #f0f0f0;\n --hw-border-md: #e5e5e5;\n --hw-text: #111;\n --hw-text-1: #111;\n --hw-text-2: #666;\n --hw-text-3: #999;\n --hw-text-4: #bbb;\n --hw-radius: 16px;\n --hw-visitor-bubble-bg: #f0f0f0;\n --hw-visitor-bubble-text: #1a1a1a;\n --hw-font:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif;\n}\n.hw-agent-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.hw-agent-icon {\n width: 100%;\n height: 100%;\n border-radius: inherit;\n}\n.hw-widget :focus-visible {\n outline: 2px solid var(--hw-primary);\n outline-offset: 2px;\n}\n.hw-widget :focus:not(:focus-visible) {\n outline: none;\n}\n.hw-widget {\n position: fixed;\n bottom: 20px;\n right: var(--hw-position-right, 20px);\n left: var(--hw-position-left, auto);\n z-index: 999999;\n font-family: var(--hw-font);\n}\n.hw-bubble {\n width: 48px;\n height: 48px;\n border-radius: 14px;\n background: var(--hw-primary);\n color: white;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;\n position: relative;\n overflow: visible;\n}\n.hw-bubble--rounded {\n border-radius: 14px;\n}\n.hw-bubble--square {\n border-radius: 8px;\n}\n.hw-bubble--pill {\n border-radius: 24px;\n}\n.hw-bubble--launcher-bubble,\n.hw-bubble--launcher-help {\n width: auto;\n padding: 0 16px 0 12px;\n gap: 8px;\n border-radius: 24px;\n}\n.hw-bubble--launcher-bubble.hw-bubble--square,\n.hw-bubble--launcher-help.hw-bubble--square {\n border-radius: 8px;\n}\n.hw-bubble--launcher-bubble.hw-bubble--rounded,\n.hw-bubble--launcher-help.hw-bubble--rounded {\n border-radius: 14px;\n}\n.hw-bubble-label {\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n line-height: 1;\n position: static;\n opacity: 1;\n transform: none;\n}\n.hw-bubble--launcher-bubble .hw-bubble-icon,\n.hw-bubble--launcher-help .hw-bubble-icon {\n position: static;\n}\n.hw-bubble:hover {\n transform: scale(1.05);\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);\n}\n.hw-bubble:active {\n transform: scale(0.95);\n}\n.hw-bubble--open {\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);\n}\n.hw-bubble:focus-visible {\n outline: 2px solid white;\n outline-offset: 2px;\n}\n.hw-bubble-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;\n}\n.hw-bubble-icon svg {\n width: 22px;\n height: 22px;\n}\n.hw-bubble-icon--hidden {\n transform: scale(0.3) rotate(90deg);\n opacity: 0;\n}\n.hw-bubble-icon--bot {\n}\n.hw-bubble--avatar .hw-bubble-icon--bot {\n width: 100%;\n height: 100%;\n}\n.hw-bubble--avatar .hw-bubble-icon--bot .hw-agent-img {\n width: 100%;\n height: 100%;\n border-radius: 0;\n}\n.hw-bubble-icon--close svg {\n width: 22px;\n height: 22px;\n}\n.hw-bubble-badge {\n position: absolute;\n top: -4px;\n right: -4px;\n min-width: 20px;\n height: 20px;\n border-radius: 10px;\n background: var(--hw-primary);\n color: white;\n font-size: 11px;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 5px;\n border: 2px solid white;\n animation: hw-badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);\n}\n@keyframes hw-badge-pop {\n from {\n transform: scale(0);\n }\n to {\n transform: scale(1);\n }\n}\n.hw-bubble-badge::after {\n content: "";\n position: absolute;\n inset: -2px;\n border-radius: inherit;\n background: var(--hw-primary);\n opacity: 0;\n animation: hw-badge-pulse 2s ease-out infinite;\n}\n@keyframes hw-badge-pulse {\n 0% {\n opacity: 0.5;\n transform: scale(1);\n }\n 100% {\n opacity: 0;\n transform: scale(1.8);\n }\n}\n.hw-window {\n position: absolute;\n bottom: 72px;\n right: var(--hw-window-right, 0);\n left: var(--hw-window-left, auto);\n width: 440px;\n height: 640px;\n background: var(--hw-bg-subtle);\n color: var(--hw-text);\n border-radius: var(--hw-radius);\n box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n animation: hw-window-open 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);\n}\n@keyframes hw-window-open {\n from {\n opacity: 0;\n transform: translateY(12px) scale(0.96);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n.hw-window--closing {\n animation: hw-window-close 0.2s ease forwards;\n}\n@keyframes hw-window-close {\n from {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n to {\n opacity: 0;\n transform: translateY(8px) scale(0.98);\n }\n}\n.hw-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-height: 0;\n}\n@media (prefers-reduced-motion: reduce) {\n .hw-window,\n .hw-window--closing,\n .hw-content,\n .hw-msg,\n .hw-bubble-icon,\n .hw-bubble-badge,\n .hw-bubble-badge::after,\n .hw-typing-dot,\n .hw-loading-dot {\n animation-duration: 0.01ms !important;\n transition-duration: 0.01ms !important;\n }\n}\n.hw-hero {\n flex-shrink: 0;\n background:\n linear-gradient(\n 160deg,\n color-mix(in srgb, var(--hw-primary) 60%, black) 0%,\n var(--hw-primary) 50%,\n color-mix(in srgb, var(--hw-primary) 40%, black) 100%);\n color: white;\n padding: 20px 22px 40px;\n}\n.hw-hero-top {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n}\n.hw-hero-close {\n width: 30px;\n height: 30px;\n border-radius: 50%;\n border: none;\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.6);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background 0.15s, color 0.15s;\n}\n.hw-hero-close:hover {\n background: rgba(255, 255, 255, 0.2);\n color: white;\n}\n.hw-hero-close:active {\n transform: scale(0.92);\n transition:\n transform 0.14s cubic-bezier(0.23, 1, 0.32, 1),\n background 0.15s,\n color 0.15s;\n}\n.hw-hero-close svg {\n width: 20px;\n height: 20px;\n}\n.hw-hero-bot-icon {\n width: 36px;\n height: 36px;\n flex-shrink: 0;\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 10px;\n overflow: hidden;\n}\n.hw-hero-bot-icon svg {\n width: 32px;\n height: 32px;\n}\n.hw-hero-greeting {\n font-size: 26px;\n font-weight: 700;\n line-height: 1.15;\n margin-bottom: 6px;\n}\n.hw-hero-greeting-name {\n font-weight: 300;\n}\n.hw-hero-greeting-question {\n font-weight: 700;\n}\n.hw-hero-subtitle {\n font-size: 15px;\n color: rgba(255, 255, 255, 0.5);\n line-height: 1.35;\n}\n.hw-sheet {\n flex: 1;\n overflow-y: auto;\n min-height: 0;\n background: #ffffff;\n border-radius: 20px 20px 0 0;\n margin-top: -24px;\n box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);\n position: relative;\n z-index: 1;\n}\n.hw-sheet-inner {\n padding: 20px 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n.hw-header {\n display: flex;\n align-items: center;\n padding: 12px 16px;\n background: var(--hw-primary);\n color: white;\n flex-shrink: 0;\n gap: 10px;\n}\n.hw-header--sub {\n justify-content: space-between;\n background: transparent;\n color: var(--hw-text);\n border-bottom: 1px solid var(--hw-border);\n}\n.hw-header-back {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n border: none;\n background: transparent;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: color 0.15s, background 0.15s;\n flex-shrink: 0;\n}\n.hw-header-back svg {\n width: 18px;\n height: 18px;\n}\n.hw-header-back:hover {\n color: var(--hw-text);\n background: var(--hw-bg-subtle);\n}\n.hw-header-identity {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n min-width: 0;\n}\n.hw-header-bot-icon {\n width: 28px;\n height: 28px;\n flex-shrink: 0;\n color: var(--hw-text);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n overflow: hidden;\n}\n.hw-header-bot-icon svg {\n width: 24px;\n height: 24px;\n}\n.hw-header-info {\n flex: 1;\n min-width: 0;\n}\n.hw-header-name {\n font-size: 14px;\n font-weight: 600;\n line-height: 1.3;\n}\n.hw-header-status {\n font-size: 12px;\n color: var(--hw-text-3);\n line-height: 1.3;\n}\n.hw-header-close {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n border: none;\n background: transparent;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition:\n background-color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 140ms cubic-bezier(0.23, 1, 0.32, 1);\n flex-shrink: 0;\n}\n.hw-header-close svg {\n width: 20px;\n height: 20px;\n}\n.hw-header-close:hover {\n background: var(--hw-bg-subtle);\n color: var(--hw-text);\n}\n.hw-header-close:active {\n transform: scale(0.92);\n}\n.hw-header--centered {\n justify-content: space-between;\n background: transparent;\n color: var(--hw-text);\n border-bottom: 1px solid var(--hw-border);\n}\n.hw-header--centered .hw-header-title {\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n max-width: calc(100% - 88px);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: center;\n}\n.hw-header-spacer {\n width: 28px;\n flex-shrink: 0;\n}\n.hw-header--messages {\n justify-content: space-between;\n background: transparent;\n color: var(--hw-text);\n border-bottom: 1px solid var(--hw-border);\n}\n.hw-header-title {\n font-size: 16px;\n font-weight: 600;\n}\n.hw-header-actions {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.hw-header-action {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n border: none;\n background: transparent;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition:\n background-color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 140ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n.hw-header-action svg {\n width: 16px;\n height: 16px;\n}\n.hw-header-action:hover {\n background: var(--hw-bg-subtle);\n color: var(--hw-text);\n}\n.hw-header-action:active {\n transform: scale(0.94);\n}\n.hw-card {\n display: flex;\n align-items: center;\n gap: 12px;\n width: 100%;\n padding: 14px 16px;\n border-radius: 14px;\n background: var(--hw-bg);\n border: 1px solid rgba(0, 0, 0, 0.06);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);\n cursor: pointer;\n transition: box-shadow 180ms cubic-bezier(0.23, 1, 0.32, 1), transform 180ms cubic-bezier(0.23, 1, 0.32, 1);\n text-align: left;\n color: var(--hw-text);\n font-family: inherit;\n}\n.hw-card:hover {\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);\n transform: translateY(-1px);\n}\n.hw-card:active {\n transform: translateY(0) scale(0.99);\n transition-duration: 120ms;\n}\n.hw-card-body {\n flex: 1;\n min-width: 0;\n}\n.hw-card-title {\n font-size: 14px;\n font-weight: 600;\n line-height: 1.3;\n color: var(--hw-text);\n}\n.hw-card-meta {\n font-size: 12px;\n color: var(--hw-text-3);\n line-height: 1.3;\n margin-top: 1px;\n}\n.hw-card-arrow {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background: var(--hw-primary);\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n.hw-card-arrow svg {\n width: 14px;\n height: 14px;\n}\n.hw-msgs-tab {\n flex: 1;\n overflow-y: auto;\n padding: 12px 16px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.hw-recent-card {\n border-radius: 14px;\n background: var(--hw-bg);\n border: 1px solid rgba(0, 0, 0, 0.06);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);\n overflow: hidden;\n}\n.hw-recent-header {\n font-size: 12px;\n font-weight: 600;\n color: var(--hw-text-2);\n padding: 12px 14px 0;\n}\n.hw-recent-row {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 10px 14px;\n border: none;\n border-bottom: 1px solid var(--hw-border);\n background: none;\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n color: var(--hw-text);\n transition: background-color 140ms cubic-bezier(0.23, 1, 0.32, 1), transform 140ms cubic-bezier(0.23, 1, 0.32, 1);\n position: relative;\n}\n.hw-recent-row:hover {\n background: rgba(0, 0, 0, 0.03);\n}\n.hw-recent-row:active {\n transform: scale(0.995);\n}\n.hw-recent-row--last {\n border-bottom: none;\n}\n.hw-recent-row .hw-conv-card-avatar {\n width: 32px;\n height: 32px;\n border-radius: 8px;\n}\n.hw-recent-row .hw-conv-card-avatar svg {\n width: 18px;\n height: 18px;\n}\n.hw-recent-row .hw-conv-card-name {\n font-size: 13px;\n}\n.hw-recent-row .hw-conv-card-preview {\n font-size: 12px;\n}\n.hw-recent-row--unread .hw-conv-card-name {\n color: var(--hw-text);\n}\n.hw-recent-row--unread .hw-conv-card-time {\n color: var(--hw-accent);\n font-weight: 500;\n}\n.hw-recent-row-badge {\n min-width: 18px;\n height: 18px;\n border-radius: 9px;\n background: var(--hw-primary);\n color: white;\n font-size: 11px;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 5px;\n flex-shrink: 0;\n font-variant-numeric: tabular-nums;\n}\n.hw-recent-see-all {\n display: block;\n width: 100%;\n padding: 10px 14px;\n text-align: center;\n font-size: 13px;\n font-weight: 500;\n color: var(--hw-text);\n background: none;\n border: none;\n border-top: 1px solid var(--hw-border);\n cursor: pointer;\n font-family: inherit;\n transition: background 0.1s;\n}\n.hw-recent-see-all:hover {\n background: rgba(0, 0, 0, 0.02);\n}\n.hw-conv-card {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 4px;\n width: 100%;\n padding: 14px 16px;\n border-radius: 14px;\n background: var(--hw-bg);\n border: 1px solid rgba(0, 0, 0, 0.06);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);\n cursor: pointer;\n transition: box-shadow 0.15s, transform 0.1s;\n text-align: left;\n font-family: inherit;\n color: var(--hw-text);\n}\n.hw-conv-card:hover {\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);\n}\n.hw-conv-card:active {\n transform: scale(0.99);\n}\n.hw-conv-card-row {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.hw-conv-card-avatar {\n width: 36px;\n height: 36px;\n border-radius: 10px;\n background: var(--hw-bg-subtle);\n color: var(--hw-text-3);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n overflow: hidden;\n}\n.hw-conv-card-avatar svg {\n width: 20px;\n height: 20px;\n}\n.hw-conv-card-content {\n flex: 1;\n min-width: 0;\n}\n.hw-conv-card-top {\n display: flex;\n align-items: baseline;\n gap: 8px;\n}\n.hw-conv-card-name {\n flex: 1;\n font-size: 14px;\n font-weight: 600;\n color: var(--hw-text);\n}\n.hw-conv-card-time {\n font-size: 11px;\n color: var(--hw-text-3);\n flex-shrink: 0;\n font-variant-numeric: tabular-nums;\n}\n.hw-conv-card-preview {\n font-size: 13px;\n color: var(--hw-text-2);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n line-height: 1.4;\n margin-top: 1px;\n}\n.hw-conv-card--unread .hw-conv-card-name {\n color: var(--hw-text);\n}\n.hw-conv-card--unread .hw-conv-card-time {\n color: var(--hw-accent);\n font-weight: 500;\n}\n.hw-conv-card-badge {\n position: absolute;\n top: 12px;\n right: 12px;\n min-width: 18px;\n height: 18px;\n border-radius: 9px;\n background: var(--hw-primary);\n color: white;\n font-size: 11px;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 5px;\n font-variant-numeric: tabular-nums;\n}\n.hw-empty-state {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px;\n text-align: center;\n}\n.hw-empty-icon-wrap {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n background: var(--hw-bg-subtle);\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 16px;\n color: var(--hw-text-3);\n}\n.hw-empty-icon-wrap svg {\n width: 24px;\n height: 24px;\n}\n.hw-empty-title {\n font-size: 15px;\n font-weight: 600;\n color: var(--hw-text);\n margin-bottom: 4px;\n}\n.hw-empty-desc {\n font-size: 13px;\n color: var(--hw-text-3);\n margin-bottom: 20px;\n}\n.hw-empty-btn {\n padding: 8px 20px;\n border-radius: 10px;\n background: var(--hw-primary);\n color: white;\n border: none;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n font-family: inherit;\n transition: background 0.15s;\n}\n.hw-empty-btn:hover {\n background: var(--hw-primary-hover);\n}\n.hw-tabs {\n display: flex;\n border-top: 1px solid var(--hw-border);\n flex-shrink: 0;\n background: var(--hw-bg-subtle);\n}\n.hw-tabs-item {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 2px;\n padding: 8px 0;\n border: none;\n background: none;\n cursor: pointer;\n font-family: inherit;\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-text-3);\n transition: color 0.15s;\n}\n.hw-tabs-item svg {\n width: 22px;\n height: 22px;\n}\n.hw-tabs-item--active {\n color: var(--hw-text);\n}\n.hw-tabs-item:hover {\n color: var(--hw-text-2);\n}\n.hw-tabs-item:active {\n transform: scale(0.94);\n transition: transform 0.14s cubic-bezier(0.23, 1, 0.32, 1), color 0.15s;\n}\n.hw-tabs-icon-wrap {\n position: relative;\n display: inline-flex;\n}\n.hw-tabs-badge {\n position: absolute;\n top: -6px;\n right: -10px;\n min-width: 16px;\n height: 16px;\n border-radius: 8px;\n background: var(--hw-primary);\n color: white;\n font-size: 10px;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 4px;\n font-variant-numeric: tabular-nums;\n}\n.hw-messages {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n padding: 16px 20px;\n background: var(--hw-bg-subtle);\n display: flex;\n flex-direction: column;\n gap: 2px;\n overscroll-behavior: contain;\n min-width: 0;\n}\n.hw-empty {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px;\n color: var(--hw-text-3);\n text-align: center;\n}\n.hw-empty-icon {\n width: 40px;\n height: 40px;\n margin-bottom: 12px;\n opacity: 0.3;\n}\n.hw-date-sep {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 0;\n}\n.hw-date-sep-line {\n flex: 1;\n height: 1px;\n background: var(--hw-border-md);\n}\n.hw-date-sep-text {\n font-size: 11px;\n color: var(--hw-text-3);\n font-weight: 500;\n white-space: nowrap;\n}\n.hw-msg {\n display: flex;\n padding: 4px 0;\n max-width: 75%;\n min-width: 0;\n animation: hw-msg-appear 0.25s ease-out;\n}\n@keyframes hw-msg-appear {\n from {\n opacity: 0;\n transform: translateY(6px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n.hw-msg--visitor {\n align-self: flex-end;\n}\n.hw-msg--team,\n.hw-msg--ai {\n align-self: flex-start;\n}\n.hw-msg-body {\n display: flex;\n flex-direction: column;\n min-width: 0;\n max-width: 100%;\n}\n.hw-msg-bubble {\n padding: 10px 14px;\n border-radius: 18px;\n font-size: 14px;\n line-height: 1.45;\n white-space: pre-wrap;\n word-break: break-word;\n overflow-wrap: anywhere;\n max-width: 100%;\n}\n.hw-msg--visitor .hw-msg-bubble {\n background: var(--hw-primary);\n color: white;\n border-bottom-right-radius: 4px;\n}\n.hw-msg--team .hw-msg-bubble {\n background: var(--hw-visitor-bubble-bg);\n color: var(--hw-visitor-bubble-text);\n border-bottom-left-radius: 4px;\n}\n.hw-msg--ai .hw-msg-bubble {\n background: var(--hw-visitor-bubble-bg);\n color: var(--hw-text);\n border-bottom-left-radius: 4px;\n white-space: normal;\n}\n.hw-msg-meta {\n font-size: 11px;\n color: var(--hw-text-3);\n margin-top: 3px;\n padding: 0 4px;\n opacity: 0;\n transition: opacity 0.15s;\n font-variant-numeric: tabular-nums;\n}\n.hw-msg:hover .hw-msg-meta,\n.hw-msg:focus-within .hw-msg-meta {\n opacity: 1;\n}\n.hw-msg--visitor .hw-msg-meta {\n text-align: right;\n}\n.hw-msg--team .hw-msg-body,\n.hw-msg--ai .hw-msg-body {\n align-items: flex-start;\n}\n.hw-msg--visitor .hw-msg-body {\n align-items: flex-end;\n}\n.hw-msg-sender {\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-text-3);\n margin-bottom: 3px;\n padding: 0 4px;\n}\n.hw-typing {\n display: flex;\n flex-direction: column;\n gap: 3px;\n padding: 8px 0;\n width: fit-content;\n animation: hw-msg-appear 0.25s ease-out;\n}\n.hw-typing-label {\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-text-3);\n padding: 0 4px;\n}\n.hw-typing-dots {\n display: flex;\n gap: 3px;\n padding: 10px 14px;\n width: fit-content;\n background: var(--hw-visitor-bubble-bg);\n border-radius: var(--hw-radius);\n border-bottom-left-radius: 4px;\n}\n.hw-typing-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: var(--hw-text-3);\n animation: hw-typing-bounce 1.4s infinite;\n}\n.hw-typing-dot:nth-child(2) {\n animation-delay: 0.2s;\n}\n.hw-typing-dot:nth-child(3) {\n animation-delay: 0.4s;\n}\n@keyframes hw-typing-bounce {\n 0%, 60%, 100% {\n transform: translateY(0);\n }\n 30% {\n transform: translateY(-4px);\n }\n}\n.hw-loading {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.hw-loading-dots {\n display: flex;\n gap: 4px;\n}\n.hw-loading-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--hw-text-4);\n animation: hw-loading-pulse 1.4s infinite;\n}\n.hw-loading-dot:nth-child(2) {\n animation-delay: 0.2s;\n}\n.hw-loading-dot:nth-child(3) {\n animation-delay: 0.4s;\n}\n@keyframes hw-loading-pulse {\n 0%, 60%, 100% {\n opacity: 0.3;\n transform: scale(0.8);\n }\n 30% {\n opacity: 1;\n transform: scale(1);\n }\n}\n@keyframes hw-skeleton-shimmer {\n 0% {\n background-position: -200px 0;\n }\n 100% {\n background-position: calc(200px + 100%) 0;\n }\n}\n.hw-skeleton {\n background:\n linear-gradient(\n 90deg,\n var(--hw-bg-subtle) 25%,\n rgba(0, 0, 0, 0.04) 50%,\n var(--hw-bg-subtle) 75%);\n background-size: 200px 100%;\n animation: hw-skeleton-shimmer 1.5s ease-in-out infinite;\n border-radius: 6px;\n}\n.hw-skeleton-messages {\n flex: 1;\n display: flex;\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n}\n.hw-skeleton-msg {\n display: flex;\n gap: 10px;\n align-items: flex-start;\n}\n.hw-skeleton-msg--right {\n flex-direction: row-reverse;\n}\n.hw-skeleton-avatar {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n flex-shrink: 0;\n}\n.hw-skeleton-bubble {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.hw-skeleton-line {\n height: 12px;\n border-radius: 6px;\n}\n.hw-skeleton-convs {\n display: flex;\n flex-direction: column;\n padding: 8px 0;\n}\n.hw-skeleton-conv {\n display: flex;\n gap: 10px;\n align-items: center;\n padding: 10px 16px;\n}\n.hw-skeleton-conv-avatar {\n width: 36px;\n height: 36px;\n border-radius: 8px;\n flex-shrink: 0;\n}\n.hw-skeleton-conv-lines {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.hw-skeleton-content {\n display: flex;\n flex-direction: column;\n padding: 12px 16px;\n gap: 12px;\n}\n.hw-skeleton-content-item {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px;\n border-radius: 10px;\n background: var(--hw-bg);\n}\n.hw-email-card {\n margin: 0 12px;\n padding: 14px 16px 10px;\n border: 1px solid var(--hw-border, rgba(0,0,0,0.08));\n border-radius: 14px;\n background: var(--hw-surface, #fff);\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.03);\n animation: hw-email-slide-in 0.25s ease-out;\n}\n@keyframes hw-email-slide-in {\n from {\n opacity: 0;\n transform: translateY(8px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n.hw-email-card-header {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n margin-bottom: 12px;\n}\n.hw-email-card-icon {\n flex-shrink: 0;\n width: 32px;\n height: 32px;\n border-radius: 8px;\n background: var(--hw-brand, #0a0a0a);\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n}\n.hw-email-card-title {\n font-size: 13px;\n font-weight: 600;\n color: var(--hw-text, #1a1a1a);\n line-height: 1.3;\n margin: 0 0 2px;\n}\n.hw-email-card-subtitle {\n font-size: 12px;\n color: var(--hw-text-muted, #888);\n line-height: 1.4;\n margin: 0;\n}\n.hw-email-card-input {\n width: 100%;\n padding: 9px 12px;\n border-radius: 10px;\n border: 1px solid var(--hw-border, rgba(0,0,0,0.1));\n background: var(--hw-bg, #fafafa);\n color: var(--hw-text, #1a1a1a);\n font-size: 13px;\n outline: none;\n margin-bottom: 8px;\n box-sizing: border-box;\n transition: border-color 0.15s;\n}\n.hw-email-card-input:focus {\n border-color: var(--hw-brand, #0a0a0a);\n box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);\n}\n.hw-email-card-input--error {\n border-color: #ef4444;\n}\n.hw-email-card-submit {\n width: 100%;\n padding: 9px;\n border-radius: 10px;\n border: none;\n background: var(--hw-brand, #0a0a0a);\n color: #fff;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: opacity 0.15s;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n}\n.hw-email-card-submit:hover:not(:disabled) {\n opacity: 0.88;\n}\n.hw-email-card-submit:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n.hw-email-card--success {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 10px 16px;\n font-size: 13px;\n color: var(--hw-text-muted, #888);\n animation: hw-email-slide-in 0.2s ease-out;\n}\n.hw-email-card--success svg {\n flex-shrink: 0;\n}\n.hw-composer {\n display: flex;\n flex-direction: column;\n padding: 12px 16px;\n background: transparent;\n flex-shrink: 0;\n}\n.hw-composer--compact {\n padding: 8px 12px;\n}\n.hw-composer-box {\n display: flex;\n flex-direction: column;\n border: 2px solid var(--hw-border-md);\n border-radius: 16px;\n overflow: hidden;\n transition: border-color 0.2s;\n background: var(--hw-bg);\n}\n.hw-composer-box:focus-within {\n border-color: var(--hw-focus-border);\n box-shadow: 0 0 0 3px var(--hw-focus-ring);\n}\n.hw-composer-input {\n flex: 1;\n resize: none;\n border: none;\n padding: 12px 16px 4px;\n font-size: 14px;\n font-family: inherit;\n line-height: 1.4;\n outline: none;\n min-height: 40px;\n max-height: 120px;\n background: transparent;\n color: var(--hw-text);\n}\n.hw-composer-input:focus {\n outline: none;\n}\n.hw-composer-input:focus-visible {\n outline: none;\n}\n.hw-composer-input::placeholder {\n color: var(--hw-text-4);\n}\n.hw-composer-toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 4px 10px 10px;\n}\n.hw-composer-toolbar-left {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.hw-composer-send {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition:\n background-color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 140ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n.hw-composer-send:active:not(:disabled) {\n transform: scale(0.9);\n}\n.hw-composer-send--active {\n background: var(--hw-primary);\n color: white;\n}\n.hw-composer-send--inactive {\n background: var(--hw-border);\n color: var(--hw-text-4);\n cursor: default;\n}\n.hw-composer-send svg {\n width: 14px;\n height: 14px;\n}\n.hw-composer-charcount {\n font-size: 11px;\n color: var(--hw-text-3);\n font-variant-numeric: tabular-nums;\n opacity: 1;\n transform: translateY(0);\n transition:\n color 180ms cubic-bezier(0.23, 1, 0.32, 1),\n opacity 180ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 180ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n@starting-style {\n .hw-composer-charcount {\n opacity: 0;\n transform: translateY(3px);\n }\n}\n.hw-composer-charcount--over {\n color: #ef4444;\n font-weight: 600;\n}\n@media (prefers-reduced-motion: reduce) {\n .hw-composer-charcount {\n transform: none;\n transition: color 160ms ease, opacity 160ms ease;\n }\n @starting-style {\n .hw-composer-charcount {\n transform: none;\n }\n }\n}\n.hw-composer-previews {\n display: flex;\n gap: 6px;\n padding: 8px 10px 0;\n overflow-x: auto;\n scrollbar-width: none;\n}\n.hw-composer-previews::-webkit-scrollbar {\n display: none;\n}\n.hw-composer-preview {\n position: relative;\n width: 48px;\n height: 48px;\n border-radius: 8px;\n overflow: hidden;\n flex-shrink: 0;\n background: var(--hw-border);\n cursor: pointer;\n}\n.hw-composer-preview--error {\n outline: 2px solid #ef4444;\n outline-offset: -2px;\n}\n.hw-composer-preview-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.hw-composer-preview-file {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--hw-bg-subtle);\n}\n.hw-composer-preview-ext {\n font-size: 10px;\n font-weight: 700;\n color: var(--hw-text-3);\n text-transform: uppercase;\n}\n.hw-composer-preview-loader {\n position: absolute;\n inset: 0;\n background: rgba(0, 0, 0, 0.35);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.hw-composer-preview-loader::after {\n content: "";\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top-color: white;\n border-radius: 50%;\n animation: hw-spin 0.6s linear infinite;\n}\n@keyframes hw-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.hw-composer-preview-badge {\n position: absolute;\n top: 2px;\n right: 2px;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: #ef4444;\n color: white;\n font-size: 10px;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.hw-composer-preview-remove {\n position: absolute;\n top: 2px;\n right: 2px;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n border: none;\n background: rgba(0, 0, 0, 0.55);\n color: white;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.15s;\n}\n.hw-composer-preview-remove svg {\n width: 10px;\n height: 10px;\n}\n.hw-composer-preview:hover .hw-composer-preview-remove {\n opacity: 1;\n}\n.hw-composer-attach {\n width: 28px;\n height: 28px;\n border: none;\n background: none;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n opacity: 0.7;\n transition: opacity 0.15s;\n}\n.hw-composer-attach:hover {\n opacity: 1;\n}\n.hw-composer-attach svg {\n width: 16px;\n height: 16px;\n}\n.hw-msg-images {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin-bottom: 4px;\n}\n.hw-msg-image-link {\n display: block;\n border-radius: 14px;\n overflow: hidden;\n line-height: 0;\n}\n.hw-msg-image {\n max-width: 140px;\n max-height: 80px;\n object-fit: cover;\n border-radius: 8px;\n outline: 1px solid rgba(0, 0, 0, 0.08);\n outline-offset: -1px;\n}\n.hw-msg-files {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin-top: 4px;\n}\n.hw-msg-file {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-radius: 10px;\n background: var(--hw-bg-subtle);\n text-decoration: none;\n color: var(--hw-text);\n transition: background 0.15s;\n}\n.hw-msg-file:hover {\n background: var(--hw-border);\n}\n.hw-msg-file-icon {\n flex-shrink: 0;\n width: 20px;\n height: 20px;\n color: var(--hw-text-3);\n}\n.hw-msg-file-icon svg {\n width: 100%;\n height: 100%;\n}\n.hw-msg-file-info {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n.hw-msg-file-name {\n font-size: 13px;\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.hw-msg-file-size {\n font-size: 11px;\n color: var(--hw-text-3);\n}\n.hw-msg-image-link {\n cursor: pointer;\n border: none;\n padding: 0;\n background: none;\n display: block;\n line-height: 0;\n}\n.hw-hover-preview {\n position: fixed;\n z-index: 99998;\n padding: 6px;\n border-radius: 14px;\n background: white;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);\n cursor: pointer;\n animation: hw-hover-in 0.15s ease-out;\n}\n@media (prefers-color-scheme: dark) {\n .hw-hover-preview {\n background: #1c1c1e;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);\n }\n}\n@keyframes hw-hover-in {\n from {\n opacity: 0;\n transform: scale(0.96) translateY(4px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n}\n.hw-hover-preview-img {\n width: 100%;\n max-height: 200px;\n object-fit: contain;\n border-radius: 10px;\n display: block;\n outline: 1px solid rgba(0, 0, 0, 0.08);\n outline-offset: -1px;\n}\n.hw-hover-preview--doc {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 14px;\n}\n.hw-hover-preview-doc-icon {\n width: 28px;\n height: 28px;\n flex-shrink: 0;\n}\n.hw-hover-preview-doc-icon svg {\n width: 100%;\n height: 100%;\n}\n.hw-hover-preview-doc-info {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n.hw-hover-preview-doc-name {\n font-size: 13px;\n font-weight: 500;\n color: var(--hw-text);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.hw-hover-preview-doc-hint {\n font-size: 11px;\n color: var(--hw-text-3);\n}\n.hw-event {\n display: flex;\n justify-content: center;\n padding: 8px 16px;\n}\n.hw-event-text {\n font-size: 12px;\n color: var(--hw-text-3);\n text-align: center;\n}\n.hw-event--card {\n justify-content: flex-start;\n align-items: center;\n gap: 10px;\n background: var(--hw-bg-subtle);\n padding: 10px 14px;\n border-radius: 12px;\n margin: 4px 16px;\n}\n.hw-event-avatar {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background: #e0e0e0;\n color: #555;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n font-weight: 600;\n flex-shrink: 0;\n overflow: hidden;\n}\n.hw-event-avatar-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.hw-event-body {\n font-size: 13px;\n line-height: 1.3;\n}\n.hw-event-name {\n font-weight: 600;\n color: var(--hw-text);\n}\n.hw-event-action {\n color: var(--hw-text-2);\n}\n.hw-resolved-banner {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px 16px;\n border-top: 1px solid var(--hw-border);\n background: var(--hw-bg-subtle);\n color: var(--hw-text-2);\n font-size: 13px;\n flex-shrink: 0;\n}\n.hw-new {\n flex: 1;\n display: flex;\n flex-direction: column;\n background: var(--hw-bg-subtle);\n}\n.hw-new-body {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px 24px;\n text-align: center;\n}\n.hw-new-welcome {\n flex: 1;\n padding: 16px 20px;\n overflow-y: auto;\n}\n.hw-new-heading {\n font-size: 17px;\n font-weight: 600;\n color: var(--hw-text);\n margin-bottom: 6px;\n}\n.hw-new-desc {\n font-size: 13px;\n color: var(--hw-text-2);\n margin-bottom: 24px;\n}\n.hw-powered {\n text-align: center;\n padding: 8px;\n font-size: 11px;\n color: var(--hw-text-4);\n flex-shrink: 0;\n}\n.hw-powered a {\n color: var(--hw-text-2);\n text-decoration: none;\n font-weight: 500;\n}\n.hw-powered a:hover {\n color: var(--hw-text);\n}\n@media (max-width: 479px) {\n .hw-widget {\n bottom: 16px;\n right: 16px;\n left: auto;\n }\n .hw-window {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 100%;\n height: var(--hw-visible-height, 100%);\n border-radius: 0;\n animation: hw-mob-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);\n }\n .hw-window--closing {\n animation: hw-mob-down 0.2s ease forwards;\n }\n @keyframes hw-mob-up {\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n @keyframes hw-mob-down {\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(100%);\n }\n }\n .hw-hero {\n padding-top: calc(20px + env(safe-area-inset-top, 0px));\n }\n .hw-header {\n padding-top: env(safe-area-inset-top, 0px);\n }\n .hw-tabs {\n padding-bottom: env(safe-area-inset-bottom, 0px);\n }\n .hw-composer {\n padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));\n }\n .hw-powered {\n padding-bottom: calc(5px + env(safe-area-inset-bottom, 0px));\n }\n .hw-header-close,\n .hw-header-back,\n .hw-header-action {\n width: 34px;\n height: 34px;\n }\n .hw-composer-send {\n width: 40px;\n height: 40px;\n }\n .hw-window ~ .hw-bubble {\n display: none;\n }\n .hw-messages {\n padding: 12px 14px;\n }\n .hw-msg {\n max-width: 82%;\n }\n}\n.hw-preview {\n position: absolute;\n bottom: calc(100% + 12px);\n right: 0;\n width: 300px;\n max-width: calc(100vw - 40px);\n background: var(--hw-bg);\n border: 1px solid var(--hw-border);\n border-radius: 16px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);\n animation: hw-preview-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);\n overflow: hidden;\n cursor: pointer;\n transition: transform 0.15s, box-shadow 0.15s;\n}\n.hw-preview:hover {\n transform: translateY(-2px);\n box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);\n}\n.hw-preview--closing {\n animation: hw-preview-out 0.2s ease forwards;\n}\n@keyframes hw-preview-in {\n from {\n opacity: 0;\n transform: translateY(8px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n@keyframes hw-preview-out {\n from {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n to {\n opacity: 0;\n transform: translateY(8px) scale(0.95);\n }\n}\n.hw-preview-header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 14px 0;\n}\n.hw-preview-avatar {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background:\n linear-gradient(\n 135deg,\n var(--hw-primary),\n color-mix(in srgb, var(--hw-primary) 50%, black));\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n flex-shrink: 0;\n overflow: hidden;\n}\n.hw-preview-avatar svg {\n width: 16px;\n height: 16px;\n}\n.hw-preview-name {\n font-size: 13px;\n font-weight: 600;\n color: var(--hw-text);\n flex: 1;\n}\n.hw-preview-close {\n width: 24px;\n height: 24px;\n border: none;\n background: transparent;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n transition: background 0.15s, color 0.15s;\n flex-shrink: 0;\n}\n.hw-preview-close:hover {\n background: var(--hw-bg-subtle);\n color: var(--hw-text-2);\n}\n.hw-preview-close:active {\n transform: scale(0.90);\n transition:\n transform 0.14s cubic-bezier(0.23, 1, 0.32, 1),\n background 0.15s,\n color 0.15s;\n}\n.hw-preview-close svg {\n width: 12px;\n height: 12px;\n}\n.hw-preview-body {\n padding: 8px 14px 14px;\n font-size: 14px;\n line-height: 1.45;\n color: var(--hw-text-2);\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n.hw-content-search {\n padding: 10px 16px;\n}\n.hw-content-search-box {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n background: var(--hw-bg);\n border: 1px solid var(--hw-border-md);\n border-radius: 10px;\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.hw-content-search-box:focus-within {\n border-color: var(--hw-focus-border);\n box-shadow: 0 0 0 3px var(--hw-focus-ring);\n}\n.hw-content-search-input {\n flex: 1;\n border: none !important;\n outline: none !important;\n box-shadow: none !important;\n background: none;\n font-size: 13px;\n color: var(--hw-text-1);\n font-family: inherit;\n line-height: 1;\n -webkit-appearance: none;\n}\n.hw-content-search-input:focus,\n.hw-content-search-input:focus-visible {\n outline: none !important;\n box-shadow: none !important;\n border: none !important;\n}\n.hw-content-search-input::placeholder {\n color: var(--hw-text-3);\n}\n.hw-content-search-icon {\n width: 15px;\n height: 15px;\n color: var(--hw-text-3);\n flex-shrink: 0;\n}\n.hw-content-list {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.hw-content-entries {\n flex: 1;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n.hw-content-entry {\n display: block;\n width: 100%;\n padding: 14px 16px;\n border: none;\n border-bottom: 1px solid var(--hw-border);\n background: none;\n cursor: pointer;\n text-align: left;\n transition: background-color 0.15s ease;\n -webkit-tap-highlight-color: transparent;\n}\n.hw-content-entry:hover {\n background: var(--hw-bg-hover);\n}\n.hw-content-entry:active {\n background: var(--hw-border);\n}\n.hw-content-entry:last-child {\n border-bottom: none;\n}\n.hw-content-entry-main {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.hw-content-entry-text {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 3px;\n}\n.hw-content-entry-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--hw-text-1);\n line-height: 1.3;\n}\n.hw-content-entry-desc {\n font-size: 13px;\n color: var(--hw-text-2);\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n.hw-content-entry-meta {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-top: 2px;\n}\n.hw-content-entry-badge {\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-text-3);\n background: var(--hw-bg-hover);\n padding: 1px 6px;\n border-radius: 4px;\n}\n.hw-content-entry-date {\n font-size: 11px;\n color: var(--hw-text-3);\n}\n.hw-content-entry-chevron {\n width: 16px;\n height: 16px;\n color: var(--hw-text-3);\n flex-shrink: 0;\n opacity: 0.5;\n}\n.hw-content-detail {\n padding: 16px;\n overflow-y: auto;\n overscroll-behavior: contain;\n height: 100%;\n}\n.hw-content-detail-header {\n margin-bottom: 16px;\n}\n.hw-content-detail-title {\n font-size: 17px;\n font-weight: 700;\n color: var(--hw-text-1);\n margin: 0 0 6px;\n line-height: 1.3;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.hw-content-detail-meta {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-wrap: wrap;\n}\n.hw-content-detail-date {\n font-size: 12px;\n color: var(--hw-text-3);\n}\n.hw-content-detail-body {\n font-size: 14px;\n line-height: 1.6;\n color: var(--hw-text-1);\n}\n.hw-markdown h1 {\n font-size: 17px;\n font-weight: 700;\n margin: 20px 0 8px;\n}\n.hw-markdown h2 {\n font-size: 15px;\n font-weight: 600;\n margin: 16px 0 6px;\n}\n.hw-markdown h3 {\n font-size: 14px;\n font-weight: 600;\n margin: 12px 0 4px;\n}\n.hw-markdown p {\n margin: 0 0 12px;\n}\n.hw-markdown ul {\n margin: 0 0 12px;\n padding-left: 20px;\n}\n.hw-markdown li {\n margin: 4px 0;\n}\n.hw-markdown code {\n font-family:\n ui-monospace,\n "SF Mono",\n monospace;\n font-size: 12px;\n background: var(--hw-bg-hover);\n padding: 1px 5px;\n border-radius: 4px;\n}\n.hw-code {\n margin: 10px 0;\n border-radius: 10px;\n overflow: hidden;\n border: 1px solid var(--hw-border, rgba(0, 0, 0, 0.08));\n background: var(--hw-bg-hover, #f5f5f4);\n font-family:\n ui-monospace,\n "SF Mono",\n "Menlo",\n monospace;\n}\n.hw-code-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 6px 12px;\n font-size: 11px;\n color: var(--hw-text-2, #6b7280);\n background: rgba(0, 0, 0, 0.03);\n border-bottom: 1px solid var(--hw-border, rgba(0, 0, 0, 0.06));\n}\n.hw-code-lang {\n text-transform: lowercase;\n letter-spacing: 0.02em;\n font-weight: 500;\n}\n.hw-code-copy {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 2px 8px;\n font-size: 11px;\n font-family: inherit;\n color: var(--hw-text-2, #6b7280);\n background: transparent;\n border: 1px solid transparent;\n border-radius: 5px;\n cursor: pointer;\n transition: background 120ms ease, color 120ms ease;\n}\n.hw-code-copy:hover {\n color: var(--hw-text, #111);\n background: rgba(0, 0, 0, 0.06);\n}\n.hw-code-copy--copied {\n color: #16a34a;\n}\n.hw-code-copy--failed {\n color: #dc2626;\n}\n.hw-code pre {\n margin: 0;\n padding: 10px 12px;\n background: transparent;\n border-radius: 0;\n overflow-x: auto;\n max-width: 100%;\n}\n.hw-code pre code {\n display: block;\n background: transparent;\n padding: 0;\n font-size: 12px;\n line-height: 1.55;\n white-space: pre;\n color: var(--hw-text, #111);\n}\n@media (prefers-color-scheme: dark) {\n .hw-code {\n background: rgba(255, 255, 255, 0.04);\n border-color: rgba(255, 255, 255, 0.08);\n }\n .hw-code-header {\n background: rgba(255, 255, 255, 0.03);\n border-bottom-color: rgba(255, 255, 255, 0.06);\n }\n .hw-code-copy:hover {\n background: rgba(255, 255, 255, 0.08);\n }\n}\n.hw-markdown pre {\n margin: 8px 0;\n padding: 10px 12px;\n background: var(--hw-bg-hover);\n border-radius: 8px;\n overflow-x: auto;\n max-width: 100%;\n}\n.hw-markdown pre code {\n display: block;\n background: transparent;\n padding: 0;\n border-radius: 0;\n font-size: 12px;\n line-height: 1.5;\n white-space: pre;\n word-break: normal;\n color: inherit;\n}\n.hw-msg-bubble pre {\n margin: 6px 0;\n padding: 8px 10px;\n background: rgba(0, 0, 0, 0.06);\n border-radius: 6px;\n overflow-x: auto;\n max-width: 100%;\n}\n.hw-msg-bubble pre code {\n background: transparent;\n padding: 0;\n font-size: 12px;\n line-height: 1.5;\n white-space: pre;\n}\n.hw-msg--team .hw-msg-bubble pre,\n.hw-msg--visitor .hw-msg-bubble pre {\n background: rgba(255, 255, 255, 0.12);\n}\n.hw-markdown blockquote {\n margin: 0 0 12px;\n padding: 8px 12px;\n border-left: 3px solid var(--hw-border);\n color: var(--hw-text-2);\n font-style: italic;\n}\n.hw-markdown a {\n color: var(--hw-primary);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.hw-markdown img {\n max-width: 100%;\n border-radius: 8px;\n margin: 8px 0;\n outline: 1px solid rgba(0, 0, 0, 0.08);\n outline-offset: -1px;\n}\n.hw-markdown hr {\n border: none;\n border-top: 1px solid var(--hw-border);\n margin: 16px 0;\n}\n.hw-content-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px 20px;\n text-align: center;\n}\n.hw-content-empty-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--hw-text-1);\n margin-bottom: 4px;\n}\n.hw-content-empty-desc {\n font-size: 12px;\n color: var(--hw-text-3);\n}\n.hw-content-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 40px 20px;\n}\n.hw-content-load-more {\n display: block;\n width: 100%;\n padding: 10px;\n border: none;\n background: none;\n color: var(--hw-primary);\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n text-align: center;\n}\n.hw-content-load-more:hover {\n background: var(--hw-bg-hover);\n}\n.hw-content-load-more:disabled {\n opacity: 0.5;\n cursor: default;\n}\n@media (hover: none) {\n .hw-composer-preview-remove {\n opacity: 0.7;\n }\n .hw-msg-meta {\n opacity: 1;\n }\n}\n.hw-composer--dragging .hw-composer-box {\n border-color: var(--hw-primary);\n background: color-mix(in srgb, var(--hw-primary) 4%, transparent);\n}\n.hw-composer-drop-overlay {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: color-mix(in srgb, var(--hw-bg) 90%, transparent);\n border: 2px dashed var(--hw-primary);\n border-radius: 12px;\n z-index: 10;\n pointer-events: none;\n animation: hw-drop-pulse 1.5s ease-in-out infinite;\n}\n.hw-composer-drop-text {\n font-size: 13px;\n font-weight: 500;\n color: var(--hw-primary);\n}\n@keyframes hw-drop-pulse {\n 0%, 100% {\n opacity: 0.8;\n }\n 50% {\n opacity: 1;\n }\n}\n.hw-msg-copy {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n margin-left: 4px;\n border: none;\n border-radius: 4px;\n background: none;\n color: var(--hw-text-4);\n cursor: pointer;\n vertical-align: middle;\n transition: color 0.15s, background 0.15s;\n padding: 0;\n flex-shrink: 0;\n}\n.hw-msg-copy:hover {\n background: var(--hw-bg-hover);\n color: var(--hw-text-2);\n}\n.hw-msg-copy svg {\n width: 12px;\n height: 12px;\n}\n.hw-msg-copy--done {\n color: #22c55e;\n}\n.hw-disconnect {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 6px 12px;\n background: #fef3c7;\n color: #92400e;\n font-size: 12px;\n font-weight: 500;\n flex-shrink: 0;\n animation: hw-msg-appear 0.25s ease-out;\n}\n.hw-disconnect-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: #f59e0b;\n animation: hw-loading-pulse 1.4s infinite;\n}\n.hw-error-state {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px 24px;\n text-align: center;\n gap: 12px;\n}\n.hw-error-icon {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n background: #fef2f2;\n color: #ef4444;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.hw-error-icon svg {\n width: 24px;\n height: 24px;\n}\n.hw-error-title {\n font-size: 15px;\n font-weight: 600;\n color: var(--hw-text);\n}\n.hw-error-desc {\n font-size: 13px;\n color: var(--hw-text-2);\n}\n.hw-error-btn {\n padding: 8px 20px;\n border: 1px solid var(--hw-border-md);\n border-radius: 8px;\n background: var(--hw-bg);\n color: var(--hw-text);\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s;\n}\n.hw-error-btn:hover {\n background: var(--hw-bg-hover);\n}\n.hw-send-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n background: #fef2f2;\n color: #dc2626;\n font-size: 12px;\n font-weight: 500;\n flex-shrink: 0;\n animation: hw-msg-appear 0.25s ease-out;\n}\n.hw-send-error-retry {\n margin-left: auto;\n padding: 2px 8px;\n border: 1px solid #fca5a5;\n border-radius: 4px;\n background: none;\n color: #dc2626;\n font-size: 11px;\n font-weight: 600;\n cursor: pointer;\n}\n.hw-send-error-retry:hover {\n background: #fee2e2;\n}\n.hw-resolved {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 12px;\n padding: 16px 20px;\n border-top: 1px solid var(--hw-border);\n flex-shrink: 0;\n}\n.hw-resolved-text {\n font-size: 13px;\n color: var(--hw-text-3);\n font-weight: 500;\n}\n.hw-resolved-actions {\n display: flex;\n gap: 8px;\n}\n.hw-resolved-reopen {\n padding: 6px 16px;\n border: 1px solid var(--hw-border-md);\n border-radius: 8px;\n background: var(--hw-bg);\n color: var(--hw-text);\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s;\n}\n.hw-resolved-reopen:hover {\n background: var(--hw-bg-hover);\n}\n.hw-csat {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n}\n.hw-csat-label {\n font-size: 12px;\n color: var(--hw-text-3);\n}\n.hw-csat-buttons {\n display: flex;\n gap: 8px;\n}\n.hw-csat-btn {\n width: 36px;\n height: 36px;\n border: 1px solid var(--hw-border-md);\n border-radius: 8px;\n background: var(--hw-bg);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n transition:\n transform 0.15s,\n border-color 0.15s,\n background 0.15s;\n}\n.hw-csat-btn:hover {\n transform: scale(1.1);\n border-color: var(--hw-text-3);\n}\n.hw-csat-btn--selected {\n border-color: var(--hw-primary);\n background: var(--hw-bg-hover);\n transform: scale(1.15);\n}\n.hw-csat-thanks {\n font-size: 12px;\n color: #22c55e;\n font-weight: 500;\n animation: hw-msg-appear 0.25s ease-out;\n}\n.hw-load-more-trigger {\n display: flex;\n justify-content: center;\n min-height: 1px;\n}\n.hw-load-more-trigger:has(.hw-load-more-spinner) {\n padding: 8px 0;\n}\n.hw-load-more-spinner {\n display: flex;\n gap: 3px;\n}\n.hw-load-more-spinner > div {\n width: 5px;\n height: 5px;\n border-radius: 50%;\n background: var(--hw-text-4);\n animation: hw-loading-pulse 1.4s infinite;\n}\n.hw-load-more-spinner > div:nth-child(2) {\n animation-delay: 0.2s;\n}\n.hw-load-more-spinner > div:nth-child(3) {\n animation-delay: 0.4s;\n}\n.hw-drag-handle {\n display: none;\n}\n@media (max-width: 479px) {\n .hw-drag-handle {\n display: flex;\n justify-content: center;\n padding: 8px 0 4px;\n flex-shrink: 0;\n }\n .hw-drag-handle-pill {\n width: 32px;\n height: 4px;\n border-radius: 2px;\n background: var(--hw-text-4);\n }\n}\n.hw-msg-bubble p {\n margin: 0 0 8px;\n}\n.hw-msg-bubble p:last-child {\n margin-bottom: 0;\n}\n.hw-msg-bubble strong {\n font-weight: 600;\n}\n.hw-msg-bubble em {\n font-style: italic;\n}\n.hw-msg-bubble a {\n color: var(--hw-primary);\n text-decoration: underline;\n text-underline-offset: 2px;\n word-break: break-all;\n}\n.hw-msg-bubble a:hover {\n opacity: 0.8;\n}\n.hw-msg--visitor .hw-msg-bubble a {\n color: rgba(255, 255, 255, 0.9);\n}\n.hw-msg--visitor .hw-msg-bubble a:hover {\n color: white;\n}\n.hw-msg-bubble ul,\n.hw-msg-bubble ol {\n margin: 4px 0 8px;\n padding-left: 20px;\n}\n.hw-msg-bubble li {\n margin: 2px 0;\n}\n.hw-msg-bubble code {\n padding: 1px 4px;\n border-radius: 3px;\n background: rgba(0, 0, 0, 0.06);\n font-size: 0.9em;\n font-family:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n monospace;\n}\n.hw-msg-bubble pre {\n margin: 4px 0 8px;\n padding: 8px 10px;\n border-radius: 6px;\n background: rgba(0, 0, 0, 0.06);\n overflow-x: auto;\n font-size: 0.85em;\n}\n.hw-msg-bubble pre code {\n padding: 0;\n background: none;\n}\n.hw-msg-bubble blockquote {\n margin: 4px 0 8px;\n padding: 4px 0 4px 12px;\n border-left: 3px solid var(--hw-border-md);\n color: var(--hw-text-2);\n}\n.hw-widget[data-theme=dark] {\n --hw-bg: #1c1c1e;\n --hw-bg-subtle: #161618;\n --hw-bg-hover: #2c2c2e;\n --hw-border: rgba(255, 255, 255, 0.08);\n --hw-border-md: rgba(255, 255, 255, 0.14);\n --hw-text: #f5f5f5;\n --hw-text-1: #f5f5f5;\n --hw-text-2: #a1a1aa;\n --hw-text-3: #71717a;\n --hw-text-4: #52525b;\n --hw-visitor-bubble-bg: #2c2c2e;\n --hw-visitor-bubble-text: #f5f5f5;\n --hw-focus-border: rgba(255, 255, 255, 0.28);\n --hw-focus-ring: rgba(255, 255, 255, 0.08);\n}\n@media (prefers-color-scheme: dark) {\n .hw-widget:not([data-theme=light]) {\n --hw-bg: #1c1c1e;\n --hw-bg-subtle: #161618;\n --hw-bg-hover: #2c2c2e;\n --hw-border: rgba(255, 255, 255, 0.08);\n --hw-border-md: rgba(255, 255, 255, 0.14);\n --hw-text: #f5f5f5;\n --hw-text-1: #f5f5f5;\n --hw-text-2: #a1a1aa;\n --hw-text-3: #71717a;\n --hw-text-4: #52525b;\n --hw-visitor-bubble-bg: #2c2c2e;\n --hw-visitor-bubble-text: #f5f5f5;\n --hw-focus-border: rgba(255, 255, 255, 0.28);\n --hw-focus-ring: rgba(255, 255, 255, 0.08);\n }\n}\n@media (prefers-color-scheme: dark) {\n .hw-widget:not([data-theme=light]) .hw-header {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n .hw-header-bot-icon {\n background: var(--hw-bg-hover);\n }\n .hw-header-name,\n .hw-header-title {\n color: var(--hw-text);\n }\n .hw-header-status {\n color: var(--hw-text-2);\n }\n .hw-header-close,\n .hw-header-back {\n color: var(--hw-text-2);\n }\n .hw-header-close:hover,\n .hw-header-back:hover {\n background: var(--hw-bg-hover);\n color: var(--hw-text);\n }\n .hw-content-entry {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n .hw-content-entry:hover {\n background: var(--hw-bg-hover);\n border-color: var(--hw-border-md);\n }\n .hw-content-empty,\n .hw-empty {\n color: var(--hw-text-3);\n }\n .hw-conv-card {\n border-color: var(--hw-border);\n }\n .hw-recent-row {\n border-color: var(--hw-border);\n }\n .hw-composer-drop-overlay {\n background: rgba(0, 0, 0, 0.6);\n color: var(--hw-text);\n }\n .hw-composer--dragging .hw-composer-box {\n border-color: var(--hw-focus-border);\n box-shadow: 0 0 0 3px var(--hw-focus-ring);\n }\n .hw-hero {\n background:\n linear-gradient(\n 160deg,\n color-mix(in srgb, var(--hw-primary) 40%, black) 0%,\n var(--hw-primary) 50%,\n color-mix(in srgb, var(--hw-primary) 25%, black) 100%);\n }\n .hw-sheet {\n background: var(--hw-bg);\n }\n .hw-card {\n background: var(--hw-bg-hover);\n border-color: var(--hw-border);\n }\n .hw-card:hover {\n background: #333;\n }\n .hw-window {\n box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);\n }\n .hw-bubble:focus-visible {\n outline-color: var(--hw-text-3);\n }\n .hw-msg--visitor .hw-msg-bubble {\n background: var(--hw-primary);\n color: white;\n }\n .hw-msg-bubble code {\n background: rgba(255, 255, 255, 0.08);\n }\n .hw-msg-bubble pre {\n background: rgba(255, 255, 255, 0.08);\n }\n .hw-composer-box {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n .hw-composer-input {\n color: var(--hw-text);\n }\n .hw-tabs {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n .hw-conv-card:hover,\n .hw-recent-row:hover {\n background: var(--hw-bg-hover);\n }\n .hw-disconnect {\n background: #422006;\n color: #fcd34d;\n }\n .hw-send-error {\n background: #450a0a;\n color: #fca5a5;\n }\n .hw-error-icon {\n background: #450a0a;\n color: #f87171;\n }\n .hw-msg-copy:hover {\n background: var(--hw-bg-hover);\n color: var(--hw-text-2);\n }\n .hw-resolved {\n border-color: var(--hw-border);\n }\n .hw-resolved-reopen,\n .hw-csat-btn {\n background: var(--hw-bg-hover);\n border-color: var(--hw-border-md);\n color: var(--hw-text);\n }\n .hw-hover-preview {\n background: #1c1c1e;\n border-color: var(--hw-border);\n }\n .hw-content-search-box {\n background: var(--hw-bg-hover);\n border-color: var(--hw-border-md);\n }\n .hw-preview {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n}\n');
|
|
4416
|
+
styleInject(':host {\n all: initial;\n font-family:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif;\n font-size: 14px;\n line-height: 1.5;\n color: #1a1a1a;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.hw-widget {\n font-family:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif;\n font-size: 14px;\n line-height: 1.5;\n color: #1a1a1a;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.hw-widget *,\n.hw-widget *::before,\n.hw-widget *::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.hw-widget {\n --hw-primary: #171717;\n --hw-primary-hover: #2a2a2a;\n --hw-brand: #171717;\n --hw-on-brand: #ffffff;\n --hw-focus-border: #9ca3af;\n --hw-focus-ring: rgba(0, 0, 0, 0.06);\n --hw-accent: #6366f1;\n --hw-bg: #ffffff;\n --hw-bg-subtle: #fafafa;\n --hw-bg-hover: #f5f5f5;\n --hw-border: #f0f0f0;\n --hw-border-md: #e5e5e5;\n --hw-text: #111;\n --hw-text-1: #111;\n --hw-text-2: #666;\n --hw-text-3: #999;\n --hw-text-4: #bbb;\n --hw-radius: 16px;\n --hw-visitor-bubble-bg: #f0f0f0;\n --hw-visitor-bubble-text: #1a1a1a;\n --hw-font:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif;\n}\n.hw-agent-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.hw-agent-icon {\n width: 100%;\n height: 100%;\n border-radius: inherit;\n}\n.hw-widget :focus-visible {\n outline: 2px solid var(--hw-primary);\n outline-offset: 2px;\n}\n.hw-widget :focus:not(:focus-visible) {\n outline: none;\n}\n.hw-widget {\n position: fixed;\n bottom: 20px;\n right: var(--hw-position-right, 20px);\n left: var(--hw-position-left, auto);\n z-index: 999999;\n font-family: var(--hw-font);\n}\n.hw-bubble {\n width: 48px;\n height: 48px;\n border-radius: 14px;\n background: var(--hw-primary);\n color: white;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;\n position: relative;\n overflow: visible;\n}\n.hw-bubble--rounded {\n border-radius: 14px;\n}\n.hw-bubble--square {\n border-radius: 8px;\n}\n.hw-bubble--pill {\n border-radius: 24px;\n}\n.hw-bubble--launcher-bubble,\n.hw-bubble--launcher-help {\n width: auto;\n padding: 0 16px 0 12px;\n gap: 8px;\n border-radius: 24px;\n}\n.hw-bubble--launcher-bubble.hw-bubble--square,\n.hw-bubble--launcher-help.hw-bubble--square {\n border-radius: 8px;\n}\n.hw-bubble--launcher-bubble.hw-bubble--rounded,\n.hw-bubble--launcher-help.hw-bubble--rounded {\n border-radius: 14px;\n}\n.hw-bubble-label {\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n line-height: 1;\n position: static;\n opacity: 1;\n transform: none;\n}\n.hw-bubble--launcher-bubble .hw-bubble-icon,\n.hw-bubble--launcher-help .hw-bubble-icon {\n position: static;\n}\n.hw-bubble:hover {\n transform: scale(1.05);\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);\n}\n.hw-bubble:active {\n transform: scale(0.95);\n}\n.hw-bubble--open {\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);\n}\n.hw-bubble:focus-visible {\n outline: 2px solid white;\n outline-offset: 2px;\n}\n.hw-bubble-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;\n}\n.hw-bubble-icon svg {\n width: 22px;\n height: 22px;\n}\n.hw-bubble-icon--hidden {\n transform: scale(0.3) rotate(90deg);\n opacity: 0;\n}\n.hw-bubble-icon--bot {\n}\n.hw-bubble--avatar .hw-bubble-icon--bot {\n width: 100%;\n height: 100%;\n}\n.hw-bubble--avatar .hw-bubble-icon--bot .hw-agent-img {\n width: 100%;\n height: 100%;\n border-radius: 0;\n}\n.hw-bubble-icon--close svg {\n width: 22px;\n height: 22px;\n}\n.hw-bubble-badge {\n position: absolute;\n top: -4px;\n right: -4px;\n min-width: 20px;\n height: 20px;\n border-radius: 10px;\n background: var(--hw-primary);\n color: white;\n font-size: 11px;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 5px;\n border: 2px solid white;\n animation: hw-badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);\n}\n@keyframes hw-badge-pop {\n from {\n transform: scale(0);\n }\n to {\n transform: scale(1);\n }\n}\n.hw-bubble-badge::after {\n content: "";\n position: absolute;\n inset: -2px;\n border-radius: inherit;\n background: var(--hw-primary);\n opacity: 0;\n animation: hw-badge-pulse 2s ease-out infinite;\n}\n@keyframes hw-badge-pulse {\n 0% {\n opacity: 0.5;\n transform: scale(1);\n }\n 100% {\n opacity: 0;\n transform: scale(1.8);\n }\n}\n.hw-window {\n position: absolute;\n bottom: 72px;\n right: var(--hw-window-right, 0);\n left: var(--hw-window-left, auto);\n width: 440px;\n height: 640px;\n background: var(--hw-bg-subtle);\n color: var(--hw-text);\n border-radius: var(--hw-radius);\n box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n animation: hw-window-open 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);\n transition: width 280ms cubic-bezier(0.4, 0, 0.2, 1), height 280ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.hw-window--reading {\n width: min(720px, calc(100vw - 40px));\n height: min(800px, calc(100vh - 100px));\n}\n@keyframes hw-window-open {\n from {\n opacity: 0;\n transform: translateY(12px) scale(0.96);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n.hw-window--closing {\n animation: hw-window-close 0.2s ease forwards;\n}\n@keyframes hw-window-close {\n from {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n to {\n opacity: 0;\n transform: translateY(8px) scale(0.98);\n }\n}\n.hw-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-height: 0;\n}\n@media (prefers-reduced-motion: reduce) {\n .hw-window,\n .hw-window--closing,\n .hw-content,\n .hw-msg,\n .hw-bubble-icon,\n .hw-bubble-badge,\n .hw-bubble-badge::after,\n .hw-typing-dot,\n .hw-loading-dot {\n animation-duration: 0.01ms !important;\n transition-duration: 0.01ms !important;\n }\n}\n.hw-hero {\n flex-shrink: 0;\n background:\n linear-gradient(\n 160deg,\n color-mix(in srgb, var(--hw-primary) 60%, black) 0%,\n var(--hw-primary) 50%,\n color-mix(in srgb, var(--hw-primary) 40%, black) 100%);\n color: white;\n padding: 20px 22px 40px;\n}\n.hw-hero-top {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n}\n.hw-hero-close {\n width: 30px;\n height: 30px;\n border-radius: 50%;\n border: none;\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.6);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background 0.15s, color 0.15s;\n}\n.hw-hero-close:hover {\n background: rgba(255, 255, 255, 0.2);\n color: white;\n}\n.hw-hero-close:active {\n transform: scale(0.92);\n transition:\n transform 0.14s cubic-bezier(0.23, 1, 0.32, 1),\n background 0.15s,\n color 0.15s;\n}\n.hw-hero-close svg {\n width: 20px;\n height: 20px;\n}\n.hw-hero-bot-icon {\n width: 36px;\n height: 36px;\n flex-shrink: 0;\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 10px;\n overflow: hidden;\n}\n.hw-hero-bot-icon svg {\n width: 32px;\n height: 32px;\n}\n.hw-hero-greeting {\n font-size: 26px;\n font-weight: 700;\n line-height: 1.15;\n margin-bottom: 6px;\n}\n.hw-hero-greeting-name {\n font-weight: 300;\n}\n.hw-hero-greeting-question {\n font-weight: 700;\n}\n.hw-hero-subtitle {\n font-size: 15px;\n color: rgba(255, 255, 255, 0.5);\n line-height: 1.35;\n}\n.hw-sheet {\n flex: 1;\n overflow-y: auto;\n min-height: 0;\n background: #ffffff;\n border-radius: 20px 20px 0 0;\n margin-top: -24px;\n box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);\n position: relative;\n z-index: 1;\n}\n.hw-sheet-inner {\n padding: 20px 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n.hw-header {\n display: flex;\n align-items: center;\n padding: 12px 16px;\n background: var(--hw-primary);\n color: white;\n flex-shrink: 0;\n gap: 10px;\n}\n.hw-header--sub {\n justify-content: space-between;\n background: transparent;\n color: var(--hw-text);\n border-bottom: 1px solid var(--hw-border);\n}\n.hw-header-back {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n border: none;\n background: transparent;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: color 0.15s, background 0.15s;\n flex-shrink: 0;\n}\n.hw-header-back svg {\n width: 18px;\n height: 18px;\n}\n.hw-header-back:hover {\n color: var(--hw-text);\n background: var(--hw-bg-subtle);\n}\n.hw-header-identity {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n min-width: 0;\n}\n.hw-header-bot-icon {\n width: 28px;\n height: 28px;\n flex-shrink: 0;\n color: var(--hw-text);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n overflow: hidden;\n}\n.hw-header-bot-icon svg {\n width: 24px;\n height: 24px;\n}\n.hw-header-bot-icon--team {\n background: var(--hw-brand, #0a0a0a);\n color: var(--hw-on-brand, #fff);\n}\n.hw-header-agent-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.hw-header-agent-initials {\n font-size: 11px;\n font-weight: 600;\n line-height: 1;\n}\n.hw-header-info {\n flex: 1;\n min-width: 0;\n}\n.hw-header-name {\n font-size: 14px;\n font-weight: 600;\n line-height: 1.3;\n}\n.hw-header-status {\n font-size: 12px;\n color: var(--hw-text-3);\n line-height: 1.3;\n}\n.hw-header-close {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n border: none;\n background: transparent;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition:\n background-color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 140ms cubic-bezier(0.23, 1, 0.32, 1);\n flex-shrink: 0;\n}\n.hw-header-close svg {\n width: 20px;\n height: 20px;\n}\n.hw-header-close:hover {\n background: var(--hw-bg-subtle);\n color: var(--hw-text);\n}\n.hw-header-close:active {\n transform: scale(0.92);\n}\n.hw-header--centered {\n justify-content: space-between;\n background: transparent;\n color: var(--hw-text);\n border-bottom: 1px solid var(--hw-border);\n}\n.hw-header--centered .hw-header-title {\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n max-width: calc(100% - 88px);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: center;\n}\n.hw-header-spacer {\n width: 28px;\n flex-shrink: 0;\n}\n.hw-header--messages {\n justify-content: space-between;\n background: transparent;\n color: var(--hw-text);\n border-bottom: 1px solid var(--hw-border);\n}\n.hw-header-title {\n font-size: 16px;\n font-weight: 600;\n}\n.hw-header-actions {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.hw-header-action {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n border: none;\n background: transparent;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition:\n background-color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 140ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n.hw-header-action svg {\n width: 16px;\n height: 16px;\n}\n.hw-header-action:hover {\n background: var(--hw-bg-subtle);\n color: var(--hw-text);\n}\n.hw-header-action:active {\n transform: scale(0.94);\n}\n.hw-card {\n display: flex;\n align-items: center;\n gap: 12px;\n width: 100%;\n padding: 14px 16px;\n border-radius: 14px;\n background: var(--hw-bg);\n border: 1px solid rgba(0, 0, 0, 0.06);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);\n cursor: pointer;\n transition: box-shadow 180ms cubic-bezier(0.23, 1, 0.32, 1), transform 180ms cubic-bezier(0.23, 1, 0.32, 1);\n text-align: left;\n color: var(--hw-text);\n font-family: inherit;\n}\n.hw-card:hover {\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);\n transform: translateY(-1px);\n}\n.hw-card:active {\n transform: translateY(0) scale(0.99);\n transition-duration: 120ms;\n}\n.hw-card-body {\n flex: 1;\n min-width: 0;\n}\n.hw-card-title {\n font-size: 14px;\n font-weight: 600;\n line-height: 1.3;\n color: var(--hw-text);\n}\n.hw-card-meta {\n font-size: 12px;\n color: var(--hw-text-3);\n line-height: 1.3;\n margin-top: 1px;\n}\n.hw-card-arrow {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background: var(--hw-primary);\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n.hw-card-arrow svg {\n width: 14px;\n height: 14px;\n}\n.hw-msgs-tab {\n flex: 1;\n overflow-y: auto;\n padding: 12px 16px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.hw-recent-card {\n border-radius: 14px;\n background: var(--hw-bg);\n border: 1px solid rgba(0, 0, 0, 0.06);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);\n overflow: hidden;\n}\n.hw-recent-header {\n font-size: 12px;\n font-weight: 600;\n color: var(--hw-text-2);\n padding: 12px 14px 0;\n}\n.hw-recent-row {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 10px 14px;\n border: none;\n border-bottom: 1px solid var(--hw-border);\n background: none;\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n color: var(--hw-text);\n transition: background-color 140ms cubic-bezier(0.23, 1, 0.32, 1), transform 140ms cubic-bezier(0.23, 1, 0.32, 1);\n position: relative;\n}\n.hw-recent-row:hover {\n background: rgba(0, 0, 0, 0.03);\n}\n.hw-recent-row:active {\n transform: scale(0.995);\n}\n.hw-recent-row--last {\n border-bottom: none;\n}\n.hw-recent-row .hw-conv-card-avatar {\n width: 32px;\n height: 32px;\n border-radius: 8px;\n}\n.hw-recent-row .hw-conv-card-avatar svg {\n width: 18px;\n height: 18px;\n}\n.hw-recent-row .hw-conv-card-name {\n font-size: 13px;\n}\n.hw-recent-row .hw-conv-card-preview {\n font-size: 12px;\n}\n.hw-recent-row--unread .hw-conv-card-name {\n color: var(--hw-text);\n}\n.hw-recent-row--unread .hw-conv-card-time {\n color: var(--hw-accent);\n font-weight: 500;\n}\n.hw-recent-row-badge {\n min-width: 18px;\n height: 18px;\n border-radius: 9px;\n background: var(--hw-primary);\n color: white;\n font-size: 11px;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 5px;\n flex-shrink: 0;\n font-variant-numeric: tabular-nums;\n}\n.hw-recent-see-all {\n display: block;\n width: 100%;\n padding: 10px 14px;\n text-align: center;\n font-size: 13px;\n font-weight: 500;\n color: var(--hw-text);\n background: none;\n border: none;\n border-top: 1px solid var(--hw-border);\n cursor: pointer;\n font-family: inherit;\n transition: background 0.1s;\n}\n.hw-recent-see-all:hover {\n background: rgba(0, 0, 0, 0.02);\n}\n.hw-conv-card {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 4px;\n width: 100%;\n padding: 14px 16px;\n border-radius: 14px;\n background: var(--hw-bg);\n border: 1px solid rgba(0, 0, 0, 0.06);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);\n cursor: pointer;\n transition: box-shadow 0.15s, transform 0.1s;\n text-align: left;\n font-family: inherit;\n color: var(--hw-text);\n}\n.hw-conv-card:hover {\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);\n}\n.hw-conv-card:active {\n transform: scale(0.99);\n}\n.hw-conv-card-row {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.hw-conv-card-avatar {\n width: 36px;\n height: 36px;\n border-radius: 10px;\n background: var(--hw-bg-subtle);\n color: var(--hw-text-3);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n overflow: hidden;\n}\n.hw-conv-card-avatar svg {\n width: 20px;\n height: 20px;\n}\n.hw-conv-card-avatar-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.hw-conv-card-avatar--team {\n background: var(--hw-brand, #0a0a0a);\n color: var(--hw-on-brand, #fff);\n}\n.hw-conv-card-avatar-initials {\n font-size: 12px;\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.02em;\n}\n.hw-conv-card-content {\n flex: 1;\n min-width: 0;\n}\n.hw-conv-card-top {\n display: flex;\n align-items: baseline;\n gap: 8px;\n}\n.hw-conv-card-name {\n flex: 1;\n font-size: 14px;\n font-weight: 600;\n color: var(--hw-text);\n}\n.hw-conv-card-time {\n font-size: 11px;\n color: var(--hw-text-3);\n flex-shrink: 0;\n font-variant-numeric: tabular-nums;\n}\n.hw-conv-card-preview {\n font-size: 13px;\n color: var(--hw-text-2);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n line-height: 1.4;\n margin-top: 1px;\n}\n.hw-conv-card--unread .hw-conv-card-name {\n color: var(--hw-text);\n}\n.hw-conv-card--unread .hw-conv-card-time {\n color: var(--hw-accent);\n font-weight: 500;\n}\n.hw-conv-card-badge {\n position: absolute;\n top: 12px;\n right: 12px;\n min-width: 18px;\n height: 18px;\n border-radius: 9px;\n background: var(--hw-primary);\n color: white;\n font-size: 11px;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 5px;\n font-variant-numeric: tabular-nums;\n}\n.hw-empty-state {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px;\n text-align: center;\n}\n.hw-empty-icon-wrap {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n background: var(--hw-bg-subtle);\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 16px;\n color: var(--hw-text-3);\n}\n.hw-empty-icon-wrap svg {\n width: 24px;\n height: 24px;\n}\n.hw-empty-title {\n font-size: 15px;\n font-weight: 600;\n color: var(--hw-text);\n margin-bottom: 4px;\n}\n.hw-empty-desc {\n font-size: 13px;\n color: var(--hw-text-3);\n margin-bottom: 20px;\n}\n.hw-empty-btn {\n padding: 8px 20px;\n border-radius: 10px;\n background: var(--hw-primary);\n color: white;\n border: none;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n font-family: inherit;\n transition: background 0.15s;\n}\n.hw-empty-btn:hover {\n background: var(--hw-primary-hover);\n}\n.hw-tabs {\n display: flex;\n border-top: 1px solid var(--hw-border);\n flex-shrink: 0;\n background: var(--hw-bg-subtle);\n}\n.hw-tabs-item {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 2px;\n padding: 8px 0;\n border: none;\n background: none;\n cursor: pointer;\n font-family: inherit;\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-text-3);\n transition: color 0.15s;\n}\n.hw-tabs-item svg {\n width: 22px;\n height: 22px;\n}\n.hw-tabs-item--active {\n color: var(--hw-text);\n}\n.hw-tabs-item:hover {\n color: var(--hw-text-2);\n}\n.hw-tabs-item:active {\n transform: scale(0.94);\n transition: transform 0.14s cubic-bezier(0.23, 1, 0.32, 1), color 0.15s;\n}\n.hw-tabs-icon-wrap {\n position: relative;\n display: inline-flex;\n}\n.hw-tabs-badge {\n position: absolute;\n top: -6px;\n right: -10px;\n min-width: 16px;\n height: 16px;\n border-radius: 8px;\n background: var(--hw-primary);\n color: white;\n font-size: 10px;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 4px;\n font-variant-numeric: tabular-nums;\n}\n.hw-messages {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n padding: 16px 20px;\n background: var(--hw-bg-subtle);\n display: flex;\n flex-direction: column;\n gap: 2px;\n overscroll-behavior: contain;\n min-width: 0;\n scrollbar-color: rgba(0, 0, 0, 0.2) transparent;\n scrollbar-width: thin;\n}\n.hw-messages::-webkit-scrollbar {\n width: 10px;\n height: 10px;\n}\n.hw-messages::-webkit-scrollbar-track {\n background: transparent;\n}\n.hw-messages::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.16);\n background-clip: content-box;\n border: 3px solid transparent;\n border-radius: 999px;\n}\n.hw-messages::-webkit-scrollbar-thumb:hover {\n background: rgba(0, 0, 0, 0.28);\n background-clip: content-box;\n}\n.hw-widget[data-theme=dark] .hw-messages {\n scrollbar-color: rgba(255, 255, 255, 0.26) transparent;\n}\n.hw-widget[data-theme=dark] .hw-messages::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2);\n background-clip: content-box;\n}\n.hw-widget[data-theme=dark] .hw-messages::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.32);\n background-clip: content-box;\n}\n.hw-empty {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px;\n color: var(--hw-text-3);\n text-align: center;\n}\n.hw-empty-icon {\n width: 40px;\n height: 40px;\n margin-bottom: 12px;\n opacity: 0.3;\n}\n.hw-empty-text {\n font-size: 13px;\n}\n.hw-date-sep {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 0;\n}\n.hw-date-sep-line {\n flex: 1;\n height: 1px;\n background: var(--hw-border-md);\n}\n.hw-date-sep-text {\n font-size: 11px;\n color: var(--hw-text-3);\n font-weight: 500;\n white-space: nowrap;\n}\n.hw-msg {\n display: flex;\n padding: 4px 0;\n max-width: 75%;\n min-width: 0;\n animation: hw-msg-appear 0.25s ease-out;\n}\n@keyframes hw-msg-appear {\n from {\n opacity: 0;\n transform: translateY(6px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n.hw-msg--visitor {\n align-self: flex-end;\n}\n.hw-msg--team,\n.hw-msg--ai {\n align-self: flex-start;\n}\n.hw-msg--ai {\n width: 100%;\n max-width: 100%;\n}\n.hw-msg-body {\n display: flex;\n flex-direction: column;\n min-width: 0;\n max-width: 100%;\n}\n.hw-msg-bubble {\n padding: 10px 14px;\n border-radius: 18px;\n font-size: 14px;\n line-height: 1.45;\n white-space: pre-wrap;\n word-break: break-word;\n overflow-wrap: anywhere;\n max-width: 100%;\n}\n.hw-msg--visitor .hw-msg-bubble {\n background: var(--hw-primary);\n color: white;\n border-bottom-right-radius: 4px;\n}\n.hw-msg--team .hw-msg-bubble {\n background: var(--hw-visitor-bubble-bg);\n color: var(--hw-visitor-bubble-text);\n border-bottom-left-radius: 4px;\n}\n.hw-msg--ai .hw-msg-bubble {\n background: var(--hw-visitor-bubble-bg);\n color: var(--hw-text);\n border-bottom-left-radius: 4px;\n white-space: normal;\n max-width: min(100%, 640px);\n}\n.hw-msg--ai .hw-msg-body {\n width: 100%;\n}\n.hw-msg--ai .hw-msg-bubble:has(.hw-code),\n.hw-msg--ai .hw-msg-bubble:has(pre) {\n width: 100%;\n}\n.hw-msg--ai .hw-code {\n width: 100%;\n box-sizing: border-box;\n}\n.hw-msg-meta {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 11px;\n color: var(--hw-text-3);\n margin-top: 3px;\n padding: 0 4px;\n opacity: 0;\n font-variant-numeric: tabular-nums;\n min-height: 0;\n height: 0;\n overflow: hidden;\n transition: opacity 140ms ease, height 140ms ease;\n}\n.hw-msg:hover .hw-msg-meta,\n.hw-msg:focus-within .hw-msg-meta {\n opacity: 1;\n height: 20px;\n min-height: 20px;\n}\n.hw-msg-sender-label {\n white-space: nowrap;\n}\n.hw-msg--visitor .hw-msg-meta {\n text-align: right;\n}\n.hw-msg--team .hw-msg-body,\n.hw-msg--ai .hw-msg-body {\n align-items: flex-start;\n}\n.hw-msg--visitor .hw-msg-body {\n align-items: flex-end;\n}\n.hw-msg-sender {\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-text-3);\n margin-bottom: 3px;\n padding: 0 4px;\n}\n.hw-typing {\n display: flex;\n flex-direction: column;\n gap: 3px;\n padding: 8px 0;\n width: fit-content;\n animation: hw-msg-appear 0.25s ease-out;\n}\n.hw-typing-label {\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-text-3);\n padding: 0 4px;\n}\n.hw-typing-dots {\n display: flex;\n gap: 3px;\n padding: 10px 14px;\n width: fit-content;\n background: var(--hw-visitor-bubble-bg);\n border-radius: var(--hw-radius);\n border-bottom-left-radius: 4px;\n}\n.hw-typing-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: var(--hw-text-3);\n animation: hw-typing-bounce 1.4s infinite;\n}\n.hw-typing-dot:nth-child(2) {\n animation-delay: 0.2s;\n}\n.hw-typing-dot:nth-child(3) {\n animation-delay: 0.4s;\n}\n@keyframes hw-typing-bounce {\n 0%, 60%, 100% {\n transform: translateY(0);\n }\n 30% {\n transform: translateY(-4px);\n }\n}\n.hw-loading {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.hw-loading-dots {\n display: flex;\n gap: 4px;\n}\n.hw-loading-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--hw-text-4);\n animation: hw-loading-pulse 1.4s infinite;\n}\n.hw-loading-dot:nth-child(2) {\n animation-delay: 0.2s;\n}\n.hw-loading-dot:nth-child(3) {\n animation-delay: 0.4s;\n}\n@keyframes hw-loading-pulse {\n 0%, 60%, 100% {\n opacity: 0.3;\n transform: scale(0.8);\n }\n 30% {\n opacity: 1;\n transform: scale(1);\n }\n}\n@keyframes hw-skeleton-shimmer {\n 0% {\n background-position: -200px 0;\n }\n 100% {\n background-position: calc(200px + 100%) 0;\n }\n}\n.hw-skeleton {\n background:\n linear-gradient(\n 90deg,\n var(--hw-bg-subtle) 25%,\n rgba(0, 0, 0, 0.04) 50%,\n var(--hw-bg-subtle) 75%);\n background-size: 200px 100%;\n animation: hw-skeleton-shimmer 1.5s ease-in-out infinite;\n border-radius: 6px;\n}\n.hw-skeleton-messages {\n flex: 1;\n display: flex;\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n}\n.hw-skeleton-msg {\n display: flex;\n gap: 10px;\n align-items: flex-start;\n}\n.hw-skeleton-msg--right {\n flex-direction: row-reverse;\n}\n.hw-skeleton-avatar {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n flex-shrink: 0;\n}\n.hw-skeleton-bubble {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.hw-skeleton-line {\n height: 12px;\n border-radius: 6px;\n}\n.hw-skeleton-convs {\n display: flex;\n flex-direction: column;\n padding: 8px 0;\n}\n.hw-skeleton-conv {\n display: flex;\n gap: 10px;\n align-items: center;\n padding: 10px 16px;\n}\n.hw-skeleton-conv-avatar {\n width: 36px;\n height: 36px;\n border-radius: 8px;\n flex-shrink: 0;\n}\n.hw-skeleton-conv-lines {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.hw-skeleton-content {\n display: flex;\n flex-direction: column;\n padding: 12px 16px;\n gap: 12px;\n}\n.hw-skeleton-content-item {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px;\n border-radius: 10px;\n background: var(--hw-bg);\n}\n.hw-skeleton-title {\n height: 22px;\n width: 65%;\n border-radius: 6px;\n}\n.hw-skeleton-badge {\n width: 42px;\n height: 18px;\n border-radius: 9px;\n}\n.hw-skeleton-date {\n width: 60px;\n height: 12px;\n border-radius: 6px;\n}\n.hw-skeleton-h2 {\n height: 16px;\n border-radius: 6px;\n}\n.hw-skeleton-bullet {\n padding-left: 20px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.hw-skeleton-bullet-line {\n height: 14px;\n border-radius: 7px;\n}\n.hw-email-card {\n margin: 0 12px;\n padding: 14px 16px 10px;\n border: 1px solid var(--hw-border, rgba(0,0,0,0.08));\n border-radius: 14px;\n background: var(--hw-bg, #fff);\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.03);\n animation: hw-email-slide-in 0.25s ease-out;\n}\n@keyframes hw-email-slide-in {\n from {\n opacity: 0;\n transform: translateY(8px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n.hw-email-card-header {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n margin-bottom: 12px;\n}\n.hw-email-card-icon {\n flex-shrink: 0;\n width: 32px;\n height: 32px;\n border-radius: 8px;\n background: var(--hw-bg-hover, #f5f5f5);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--hw-text, #1a1a1a);\n}\n.hw-email-card-title {\n font-size: 13px;\n font-weight: 600;\n color: var(--hw-text, #1a1a1a);\n line-height: 1.3;\n margin: 0 0 2px;\n}\n.hw-email-card-subtitle {\n font-size: 12px;\n color: var(--hw-text-2, #888);\n line-height: 1.4;\n margin: 0;\n}\n.hw-email-card-input {\n width: 100%;\n padding: 9px 12px;\n border-radius: 10px;\n border: 1px solid var(--hw-border, rgba(0,0,0,0.1));\n background: var(--hw-bg-subtle, #fafafa);\n color: var(--hw-text, #1a1a1a);\n font-size: 13px;\n outline: none;\n margin-bottom: 8px;\n box-sizing: border-box;\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.hw-email-card-input::placeholder {\n color: var(--hw-text-3, #999);\n}\n.hw-email-card-input:focus {\n border-color: var(--hw-focus-border, rgba(0,0,0,0.2));\n box-shadow: 0 0 0 2px var(--hw-focus-ring, rgba(0,0,0,0.06));\n}\n.hw-email-card-input--error {\n border-color: #ef4444;\n}\n.hw-email-card-submit {\n width: 100%;\n padding: 9px;\n border-radius: 10px;\n border: none;\n background: var(--hw-brand, #0a0a0a);\n color: var(--hw-on-brand, #fff);\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: opacity 0.15s;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n}\n.hw-email-card-submit:hover:not(:disabled) {\n opacity: 0.88;\n}\n.hw-email-card-submit:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n.hw-email-card--success {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 10px 16px;\n font-size: 13px;\n color: var(--hw-text-2, #888);\n animation: hw-email-slide-in 0.2s ease-out;\n}\n.hw-email-card--success svg {\n flex-shrink: 0;\n}\n.hw-composer {\n display: flex;\n flex-direction: column;\n padding: 12px 16px;\n background: transparent;\n flex-shrink: 0;\n}\n.hw-composer--compact {\n padding: 8px 12px;\n}\n.hw-composer-box {\n display: flex;\n flex-direction: column;\n border: 2px solid var(--hw-border-md);\n border-radius: 16px;\n overflow: hidden;\n transition: border-color 0.2s;\n background: var(--hw-bg);\n}\n.hw-composer-box:focus-within {\n border-color: var(--hw-focus-border);\n box-shadow: 0 0 0 3px var(--hw-focus-ring);\n}\n.hw-composer-input {\n flex: 1;\n resize: none;\n border: none;\n padding: 12px 16px 4px;\n font-size: 14px;\n font-family: inherit;\n line-height: 1.4;\n outline: none;\n min-height: 40px;\n max-height: 120px;\n background: transparent;\n color: var(--hw-text);\n}\n.hw-composer-input:focus {\n outline: none;\n}\n.hw-composer-input:focus-visible {\n outline: none;\n}\n.hw-composer-input::placeholder {\n color: var(--hw-text-4);\n}\n.hw-composer-toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 4px 10px 10px;\n}\n.hw-composer-toolbar-left {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.hw-composer-send {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition:\n background-color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 140ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n.hw-composer-send:active:not(:disabled) {\n transform: scale(0.9);\n}\n.hw-composer-send--active {\n background: var(--hw-primary);\n color: white;\n}\n.hw-composer-send--inactive {\n background: var(--hw-border);\n color: var(--hw-text-4);\n cursor: default;\n}\n.hw-composer-send svg {\n width: 14px;\n height: 14px;\n}\n.hw-composer-charcount {\n font-size: 11px;\n color: var(--hw-text-3);\n font-variant-numeric: tabular-nums;\n opacity: 1;\n transform: translateY(0);\n transition:\n color 180ms cubic-bezier(0.23, 1, 0.32, 1),\n opacity 180ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 180ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n@starting-style {\n .hw-composer-charcount {\n opacity: 0;\n transform: translateY(3px);\n }\n}\n.hw-composer-charcount--over {\n color: #ef4444;\n font-weight: 600;\n}\n@media (prefers-reduced-motion: reduce) {\n .hw-composer-charcount {\n transform: none;\n transition: color 160ms ease, opacity 160ms ease;\n }\n @starting-style {\n .hw-composer-charcount {\n transform: none;\n }\n }\n}\n.hw-composer-previews {\n display: flex;\n gap: 6px;\n padding: 8px 10px 0;\n overflow-x: auto;\n scrollbar-width: none;\n}\n.hw-composer-previews::-webkit-scrollbar {\n display: none;\n}\n.hw-composer-preview {\n position: relative;\n width: 48px;\n height: 48px;\n border-radius: 8px;\n overflow: hidden;\n flex-shrink: 0;\n background: var(--hw-border);\n cursor: pointer;\n}\n.hw-composer-preview--error {\n outline: 2px solid #ef4444;\n outline-offset: -2px;\n}\n.hw-composer-preview-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.hw-composer-preview-file {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--hw-bg-subtle);\n}\n.hw-composer-preview-ext {\n font-size: 10px;\n font-weight: 700;\n color: var(--hw-text-3);\n text-transform: uppercase;\n}\n.hw-composer-preview-loader {\n position: absolute;\n inset: 0;\n background: rgba(0, 0, 0, 0.35);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.hw-composer-preview-loader::after {\n content: "";\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top-color: white;\n border-radius: 50%;\n animation: hw-spin 0.6s linear infinite;\n}\n@keyframes hw-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.hw-composer-preview-badge {\n position: absolute;\n top: 2px;\n right: 2px;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: #ef4444;\n color: white;\n font-size: 10px;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.hw-composer-preview-remove {\n position: absolute;\n top: 2px;\n right: 2px;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n border: none;\n background: rgba(0, 0, 0, 0.55);\n color: white;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.15s;\n}\n.hw-composer-preview-remove svg {\n width: 10px;\n height: 10px;\n}\n.hw-composer-preview:hover .hw-composer-preview-remove {\n opacity: 1;\n}\n.hw-composer-attach {\n width: 28px;\n height: 28px;\n border: none;\n background: none;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n opacity: 0.7;\n transition: opacity 0.15s;\n}\n.hw-composer-attach:hover {\n opacity: 1;\n}\n.hw-composer-attach svg {\n width: 16px;\n height: 16px;\n}\n.hw-msg-images {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin-bottom: 4px;\n}\n.hw-msg-image-link {\n display: block;\n border-radius: 14px;\n overflow: hidden;\n line-height: 0;\n}\n.hw-msg-image {\n max-width: 140px;\n max-height: 80px;\n object-fit: cover;\n border-radius: 8px;\n outline: 1px solid rgba(0, 0, 0, 0.08);\n outline-offset: -1px;\n}\n.hw-msg-files {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin-top: 4px;\n}\n.hw-msg-file {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-radius: 10px;\n background: var(--hw-bg-subtle);\n text-decoration: none;\n color: var(--hw-text);\n transition: background 0.15s;\n}\n.hw-msg-file:hover {\n background: var(--hw-border);\n}\n.hw-msg-file-icon {\n flex-shrink: 0;\n width: 20px;\n height: 20px;\n color: var(--hw-text-3);\n}\n.hw-msg-file-icon svg {\n width: 100%;\n height: 100%;\n}\n.hw-msg-file-info {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n.hw-msg-file-name {\n font-size: 13px;\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.hw-msg-file-size {\n font-size: 11px;\n color: var(--hw-text-3);\n}\n.hw-msg-image-link {\n cursor: pointer;\n border: none;\n padding: 0;\n background: none;\n display: block;\n line-height: 0;\n}\n.hw-hover-preview {\n position: fixed;\n z-index: 99998;\n padding: 6px;\n border-radius: 14px;\n background: white;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);\n cursor: pointer;\n animation: hw-hover-in 0.15s ease-out;\n}\n@media (prefers-color-scheme: dark) {\n .hw-hover-preview {\n background: #1c1c1e;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);\n }\n}\n@keyframes hw-hover-in {\n from {\n opacity: 0;\n transform: scale(0.96) translateY(4px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n}\n.hw-hover-preview-img {\n width: 100%;\n max-height: 200px;\n object-fit: contain;\n border-radius: 10px;\n display: block;\n outline: 1px solid rgba(0, 0, 0, 0.08);\n outline-offset: -1px;\n}\n.hw-hover-preview--doc {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 14px;\n}\n.hw-hover-preview-doc-icon {\n width: 28px;\n height: 28px;\n flex-shrink: 0;\n}\n.hw-hover-preview-doc-icon svg {\n width: 100%;\n height: 100%;\n}\n.hw-hover-preview-doc-info {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n.hw-hover-preview-doc-name {\n font-size: 13px;\n font-weight: 500;\n color: var(--hw-text);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.hw-hover-preview-doc-hint {\n font-size: 11px;\n color: var(--hw-text-3);\n}\n.hw-event {\n display: flex;\n justify-content: center;\n padding: 8px 16px;\n}\n.hw-event-text {\n font-size: 12px;\n color: var(--hw-text-3);\n text-align: center;\n}\n.hw-event--card {\n justify-content: flex-start;\n align-items: center;\n gap: 10px;\n background: var(--hw-bg-subtle);\n padding: 10px 14px;\n border-radius: 12px;\n margin: 4px 16px;\n}\n.hw-event-avatar {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background: var(--hw-bg-hover, #e0e0e0);\n color: var(--hw-text-2, #555);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n font-weight: 600;\n flex-shrink: 0;\n overflow: hidden;\n}\n.hw-event-avatar-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.hw-event-body {\n font-size: 13px;\n line-height: 1.3;\n}\n.hw-event-name {\n font-weight: 600;\n color: var(--hw-text);\n}\n.hw-event-action {\n color: var(--hw-text-2);\n}\n.hw-resolved-banner {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px 16px;\n border-top: 1px solid var(--hw-border);\n background: var(--hw-bg-subtle);\n color: var(--hw-text-2);\n font-size: 13px;\n flex-shrink: 0;\n}\n.hw-new {\n flex: 1;\n display: flex;\n flex-direction: column;\n background: var(--hw-bg-subtle);\n}\n.hw-new-body {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px 24px;\n text-align: center;\n}\n.hw-new-welcome {\n flex: 1;\n padding: 16px 20px;\n overflow-y: auto;\n}\n.hw-new-heading {\n font-size: 17px;\n font-weight: 600;\n color: var(--hw-text);\n margin-bottom: 6px;\n}\n.hw-new-desc {\n font-size: 13px;\n color: var(--hw-text-2);\n margin-bottom: 24px;\n}\n.hw-powered {\n text-align: center;\n padding: 8px;\n font-size: 11px;\n color: var(--hw-text-4);\n flex-shrink: 0;\n}\n.hw-powered a {\n color: var(--hw-text-2);\n text-decoration: none;\n font-weight: 500;\n}\n.hw-powered a:hover {\n color: var(--hw-text);\n}\n@media (max-width: 479px) {\n .hw-widget {\n bottom: 16px;\n right: 16px;\n left: auto;\n }\n .hw-window {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 100%;\n height: var(--hw-visible-height, 100%);\n border-radius: 0;\n animation: hw-mob-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);\n }\n .hw-window--closing {\n animation: hw-mob-down 0.2s ease forwards;\n }\n @keyframes hw-mob-up {\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n @keyframes hw-mob-down {\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(100%);\n }\n }\n .hw-hero {\n padding-top: calc(20px + env(safe-area-inset-top, 0px));\n }\n .hw-header {\n padding-top: env(safe-area-inset-top, 0px);\n }\n .hw-tabs {\n padding-bottom: env(safe-area-inset-bottom, 0px);\n }\n .hw-composer {\n padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));\n }\n .hw-powered {\n padding-bottom: calc(5px + env(safe-area-inset-bottom, 0px));\n }\n .hw-header-close,\n .hw-header-back,\n .hw-header-action {\n width: 34px;\n height: 34px;\n }\n .hw-composer-send {\n width: 40px;\n height: 40px;\n }\n .hw-window ~ .hw-bubble {\n display: none;\n }\n .hw-messages {\n padding: 12px 14px;\n }\n .hw-msg {\n max-width: 82%;\n }\n .hw-msg--ai {\n max-width: 100%;\n }\n}\n.hw-preview {\n position: absolute;\n bottom: calc(100% + 12px);\n right: 0;\n width: 300px;\n max-width: calc(100vw - 40px);\n background: var(--hw-bg);\n border: 1px solid var(--hw-border);\n border-radius: 16px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);\n animation: hw-preview-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);\n overflow: hidden;\n cursor: pointer;\n transition: transform 0.15s, box-shadow 0.15s;\n}\n.hw-preview:hover {\n transform: translateY(-2px);\n box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);\n}\n.hw-preview--closing {\n animation: hw-preview-out 0.2s ease forwards;\n}\n@keyframes hw-preview-in {\n from {\n opacity: 0;\n transform: translateY(8px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n@keyframes hw-preview-out {\n from {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n to {\n opacity: 0;\n transform: translateY(8px) scale(0.95);\n }\n}\n.hw-preview-header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 14px 0;\n}\n.hw-preview-avatar {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background:\n linear-gradient(\n 135deg,\n var(--hw-primary),\n color-mix(in srgb, var(--hw-primary) 50%, black));\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n flex-shrink: 0;\n overflow: hidden;\n}\n.hw-preview-avatar svg {\n width: 16px;\n height: 16px;\n}\n.hw-preview-name {\n font-size: 13px;\n font-weight: 600;\n color: var(--hw-text);\n flex: 1;\n}\n.hw-preview-close {\n width: 24px;\n height: 24px;\n border: none;\n background: transparent;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n transition: background 0.15s, color 0.15s;\n flex-shrink: 0;\n}\n.hw-preview-close:hover {\n background: var(--hw-bg-subtle);\n color: var(--hw-text-2);\n}\n.hw-preview-close:active {\n transform: scale(0.90);\n transition:\n transform 0.14s cubic-bezier(0.23, 1, 0.32, 1),\n background 0.15s,\n color 0.15s;\n}\n.hw-preview-close svg {\n width: 12px;\n height: 12px;\n}\n.hw-preview-body {\n padding: 8px 14px 14px;\n font-size: 14px;\n line-height: 1.45;\n color: var(--hw-text-2);\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n.hw-content-search {\n padding: 10px 16px;\n}\n.hw-content-search-box {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n background: var(--hw-bg);\n border: 1px solid var(--hw-border-md);\n border-radius: 10px;\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.hw-content-search-box:focus-within {\n border-color: var(--hw-focus-border);\n box-shadow: 0 0 0 3px var(--hw-focus-ring);\n}\n.hw-content-search-input {\n flex: 1;\n border: none !important;\n outline: none !important;\n box-shadow: none !important;\n background: none;\n font-size: 13px;\n color: var(--hw-text-1);\n font-family: inherit;\n line-height: 1;\n -webkit-appearance: none;\n}\n.hw-content-search-input:focus,\n.hw-content-search-input:focus-visible {\n outline: none !important;\n box-shadow: none !important;\n border: none !important;\n}\n.hw-content-search-input::placeholder {\n color: var(--hw-text-3);\n}\n.hw-content-search-icon {\n width: 15px;\n height: 15px;\n color: var(--hw-text-3);\n flex-shrink: 0;\n}\n.hw-content-list {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.hw-content-entries {\n flex: 1;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n.hw-content-entry {\n display: block;\n width: 100%;\n padding: 14px 16px;\n border: none;\n border-bottom: 1px solid var(--hw-border);\n background: none;\n cursor: pointer;\n text-align: left;\n transition: background-color 0.15s ease;\n -webkit-tap-highlight-color: transparent;\n}\n.hw-content-entry:hover {\n background: var(--hw-bg-hover);\n}\n.hw-content-entry:active {\n background: var(--hw-border);\n}\n.hw-content-entry:last-child {\n border-bottom: none;\n}\n.hw-content-entry-main {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.hw-content-entry-text {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 3px;\n}\n.hw-content-entry-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--hw-text-1);\n line-height: 1.3;\n}\n.hw-content-entry-desc {\n font-size: 13px;\n color: var(--hw-text-2);\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n.hw-content-entry-meta {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-top: 2px;\n}\n.hw-content-entry-badge {\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-text-3);\n background: var(--hw-bg-hover);\n padding: 1px 6px;\n border-radius: 4px;\n}\n.hw-content-entry-date {\n font-size: 11px;\n color: var(--hw-text-3);\n}\n.hw-content-entry-chevron {\n width: 16px;\n height: 16px;\n color: var(--hw-text-3);\n flex-shrink: 0;\n opacity: 0.5;\n}\n.hw-content-detail {\n padding: 16px;\n overflow-y: auto;\n overscroll-behavior: contain;\n height: 100%;\n}\n.hw-content-detail-header {\n margin-bottom: 16px;\n}\n.hw-content-detail-title {\n font-size: 17px;\n font-weight: 700;\n color: var(--hw-text-1);\n margin: 0 0 6px;\n line-height: 1.3;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.hw-content-detail-meta {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-wrap: wrap;\n}\n.hw-content-detail-date {\n font-size: 12px;\n color: var(--hw-text-3);\n}\n.hw-content-detail-body {\n font-size: 14px;\n line-height: 1.6;\n color: var(--hw-text-1);\n}\n.hw-markdown h1 {\n font-size: 17px;\n font-weight: 700;\n margin: 0;\n}\n.hw-markdown h2 {\n font-size: 15px;\n font-weight: 600;\n margin: 0;\n}\n.hw-markdown h3 {\n font-size: 14px;\n font-weight: 600;\n margin: 0;\n}\n.hw-markdown p {\n margin: 0;\n}\n.hw-markdown p:empty,\n.hw-markdown div:empty,\n.hw-markdown p:has(> br:only-child),\n.hw-markdown div:has(> br:only-child) {\n display: none;\n}\n.hw-markdown > * + * {\n margin-top: 12px;\n}\n.hw-markdown > * + h1,\n.hw-markdown > * + h2 {\n margin-top: 20px;\n}\n.hw-markdown > * + h3 {\n margin-top: 16px;\n}\n.hw-markdown > h1 + *,\n.hw-markdown > h2 + *,\n.hw-markdown > h3 + * {\n margin-top: 8px;\n}\n.hw-markdown > *:first-child {\n margin-top: 0;\n}\n.hw-markdown > *:last-child {\n margin-bottom: 0;\n}\n.hw-markdown > br {\n display: none;\n}\n.hw-markdown ul {\n margin: 0;\n padding-left: 20px;\n}\n.hw-markdown li {\n margin: 4px 0;\n}\n.hw-markdown code {\n font-family:\n ui-monospace,\n "SF Mono",\n monospace;\n font-size: 12px;\n background: var(--hw-bg-hover);\n padding: 1px 5px;\n border-radius: 4px;\n}\n.hw-code {\n margin: 10px 0;\n border-radius: 10px;\n overflow: hidden;\n border: 1px solid var(--hw-border, rgba(0, 0, 0, 0.08));\n background: var(--hw-bg-hover, #f5f5f4);\n font-family:\n ui-monospace,\n "SF Mono",\n "Menlo",\n monospace;\n}\n.hw-code-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n padding: 7px 8px 7px 12px;\n font-size: 11px;\n color: var(--hw-text-2, #6b7280);\n background: rgba(0, 0, 0, 0.03);\n border-bottom: 1px solid var(--hw-border, rgba(0, 0, 0, 0.06));\n}\n.hw-code-lang {\n text-transform: lowercase;\n letter-spacing: 0.02em;\n font-weight: 500;\n}\n.hw-code-actions {\n display: inline-flex;\n align-items: center;\n gap: 1px;\n}\n.hw-code-action {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n padding: 0;\n font-family: inherit;\n color: var(--hw-text-2, #6b7280);\n background: transparent;\n border: 1px solid transparent;\n border-radius: 6px;\n cursor: pointer;\n opacity: 0.62;\n transition:\n background 120ms ease,\n color 120ms ease,\n opacity 120ms ease,\n scale 120ms ease;\n}\n.hw-code-action:hover {\n color: var(--hw-text, #111);\n background: rgba(0, 0, 0, 0.06);\n opacity: 1;\n}\n.hw-code-action:active {\n scale: 0.96;\n}\n.hw-code-action svg {\n width: 13px;\n height: 13px;\n}\n.hw-code-copy-icon,\n.hw-code-check-icon {\n position: absolute;\n inset: 50% auto auto 50%;\n transition:\n opacity 180ms cubic-bezier(0.2, 0, 0, 1),\n scale 180ms cubic-bezier(0.2, 0, 0, 1),\n filter 180ms cubic-bezier(0.2, 0, 0, 1);\n translate: -50% -50%;\n}\n.hw-code-check-icon {\n filter: blur(4px);\n opacity: 0;\n scale: 0.25;\n}\n.hw-code-copy--copied .hw-code-copy-icon {\n filter: blur(4px);\n opacity: 0;\n scale: 0.25;\n}\n.hw-code-copy--copied .hw-code-check-icon {\n filter: blur(0);\n opacity: 1;\n scale: 1;\n}\n.hw-code-copy-label {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n}\n.hw-code-copy--copied {\n color: #16a34a;\n}\n.hw-code-copy--failed {\n color: #dc2626;\n}\n.hw-code pre {\n margin: 0;\n padding: 10px 12px;\n background: transparent;\n border-radius: 0;\n overflow-x: auto;\n max-width: 100%;\n max-height: 320px;\n scrollbar-color: rgba(0, 0, 0, 0.22) transparent;\n scrollbar-width: thin;\n}\n.hw-code pre::-webkit-scrollbar {\n width: 10px;\n height: 10px;\n}\n.hw-code pre::-webkit-scrollbar-track {\n background: transparent;\n}\n.hw-code pre::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.18);\n background-clip: content-box;\n border: 3px solid transparent;\n border-radius: 999px;\n}\n.hw-code pre::-webkit-scrollbar-thumb:hover {\n background: rgba(0, 0, 0, 0.28);\n background-clip: content-box;\n}\n.hw-code pre code {\n display: block;\n background: transparent;\n padding: 0;\n font-size: 12px;\n line-height: 1.55;\n white-space: pre;\n color: var(--hw-text, #111);\n}\n@media (prefers-color-scheme: dark) {\n .hw-code {\n background: rgba(255, 255, 255, 0.04);\n border-color: rgba(255, 255, 255, 0.08);\n }\n .hw-code-header {\n background: rgba(255, 255, 255, 0.03);\n border-bottom-color: rgba(255, 255, 255, 0.06);\n }\n .hw-code-action:hover,\n .hw-code-action:focus-visible {\n background: rgba(255, 255, 255, 0.08);\n }\n .hw-code pre {\n scrollbar-color: rgba(255, 255, 255, 0.26) transparent;\n }\n .hw-code pre::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.22);\n background-clip: content-box;\n }\n .hw-code pre::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.32);\n background-clip: content-box;\n }\n}\n.hw-markdown pre {\n margin: 8px 0;\n padding: 10px 12px;\n background: var(--hw-bg-hover);\n border-radius: 8px;\n overflow-x: auto;\n max-width: 100%;\n}\n.hw-markdown pre code {\n display: block;\n background: transparent;\n padding: 0;\n border-radius: 0;\n font-size: 12px;\n line-height: 1.5;\n white-space: pre;\n word-break: normal;\n color: inherit;\n}\n.hw-msg-bubble pre {\n margin: 6px 0;\n padding: 8px 10px;\n background: rgba(0, 0, 0, 0.06);\n border-radius: 6px;\n overflow-x: auto;\n max-width: 100%;\n}\n.hw-msg-bubble pre code {\n background: transparent;\n padding: 0;\n font-size: 12px;\n line-height: 1.5;\n white-space: pre;\n}\n.hw-msg-bubble .hw-code pre {\n margin: 0;\n padding: 10px 12px;\n background: transparent;\n border-radius: 0;\n}\n.hw-msg-bubble .hw-code pre code {\n background: transparent;\n padding: 0;\n font-size: 12px;\n line-height: 1.55;\n}\n.hw-msg--team .hw-msg-bubble pre,\n.hw-msg--visitor .hw-msg-bubble pre {\n background: rgba(255, 255, 255, 0.12);\n}\n.hw-markdown blockquote {\n margin: 0 0 12px;\n padding: 8px 12px;\n border-left: 3px solid var(--hw-border);\n color: var(--hw-text-2);\n font-style: italic;\n}\n.hw-markdown a {\n color: var(--hw-primary);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.hw-markdown img {\n max-width: 100%;\n border-radius: 8px;\n margin: 8px 0;\n outline: 1px solid rgba(0, 0, 0, 0.08);\n outline-offset: -1px;\n}\n.hw-markdown hr {\n border: none;\n border-top: 1px solid var(--hw-border);\n margin: 16px 0;\n}\n.hw-content-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px 20px;\n text-align: center;\n}\n.hw-content-empty-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--hw-text-1);\n margin-bottom: 4px;\n}\n.hw-content-empty-desc {\n font-size: 12px;\n color: var(--hw-text-3);\n}\n.hw-content-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 40px 20px;\n}\n.hw-content-load-more {\n display: block;\n width: 100%;\n padding: 10px;\n border: none;\n background: none;\n color: var(--hw-primary);\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n text-align: center;\n}\n.hw-content-load-more:hover {\n background: var(--hw-bg-hover);\n}\n.hw-content-load-more:disabled {\n opacity: 0.5;\n cursor: default;\n}\n@media (hover: none) {\n .hw-composer-preview-remove {\n opacity: 0.7;\n }\n .hw-msg-meta {\n opacity: 1;\n height: auto;\n min-height: 20px;\n overflow: visible;\n }\n .hw-msg-copy {\n opacity: 1;\n }\n}\n.hw-composer--dragging .hw-composer-box {\n border-color: var(--hw-primary);\n background: color-mix(in srgb, var(--hw-primary) 4%, transparent);\n}\n.hw-composer-drop-overlay {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: color-mix(in srgb, var(--hw-bg) 90%, transparent);\n border: 2px dashed var(--hw-primary);\n border-radius: 12px;\n z-index: 10;\n pointer-events: none;\n animation: hw-drop-pulse 1.5s ease-in-out infinite;\n}\n.hw-composer-drop-text {\n font-size: 13px;\n font-weight: 500;\n color: var(--hw-primary);\n}\n@keyframes hw-drop-pulse {\n 0%, 100% {\n opacity: 0.8;\n }\n 50% {\n opacity: 1;\n }\n}\n.hw-msg-copy {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n margin-left: 4px;\n border: none;\n border-radius: 4px;\n background: none;\n color: var(--hw-text-4);\n cursor: pointer;\n vertical-align: middle;\n opacity: 0;\n transition:\n color 0.15s,\n background 0.15s,\n opacity 0.15s;\n padding: 0;\n flex-shrink: 0;\n}\n.hw-msg:hover .hw-msg-copy,\n.hw-msg:focus-within .hw-msg-copy {\n opacity: 1;\n}\n.hw-msg-copy:hover {\n background: var(--hw-bg-hover);\n color: var(--hw-text-2);\n}\n.hw-msg-copy svg {\n width: 12px;\n height: 12px;\n}\n.hw-msg-copy--done {\n color: #22c55e;\n}\n.hw-disconnect {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 6px 12px;\n background: #fef3c7;\n color: #92400e;\n font-size: 12px;\n font-weight: 500;\n flex-shrink: 0;\n animation: hw-msg-appear 0.25s ease-out;\n}\n.hw-disconnect-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: #f59e0b;\n animation: hw-loading-pulse 1.4s infinite;\n}\n.hw-error-state {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px 24px;\n text-align: center;\n gap: 12px;\n}\n.hw-error-icon {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n background: #fef2f2;\n color: #ef4444;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.hw-error-icon svg {\n width: 24px;\n height: 24px;\n}\n.hw-error-title {\n font-size: 15px;\n font-weight: 600;\n color: var(--hw-text);\n}\n.hw-error-desc {\n font-size: 13px;\n color: var(--hw-text-2);\n}\n.hw-error-btn {\n padding: 8px 20px;\n border: 1px solid var(--hw-border-md);\n border-radius: 8px;\n background: var(--hw-bg);\n color: var(--hw-text);\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s;\n}\n.hw-error-btn:hover {\n background: var(--hw-bg-hover);\n}\n.hw-send-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n background: #fef2f2;\n color: #dc2626;\n font-size: 12px;\n font-weight: 500;\n flex-shrink: 0;\n animation: hw-msg-appear 0.25s ease-out;\n}\n.hw-send-error-retry {\n margin-left: auto;\n padding: 2px 8px;\n border: 1px solid #fca5a5;\n border-radius: 4px;\n background: none;\n color: #dc2626;\n font-size: 11px;\n font-weight: 600;\n cursor: pointer;\n}\n.hw-send-error-retry:hover {\n background: #fee2e2;\n}\n.hw-resolved {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 12px;\n padding: 16px 20px;\n border-top: 1px solid var(--hw-border);\n flex-shrink: 0;\n}\n.hw-resolved-text {\n font-size: 13px;\n color: var(--hw-text-3);\n font-weight: 500;\n}\n.hw-resolved-actions {\n display: flex;\n gap: 8px;\n}\n.hw-resolved-reopen {\n padding: 6px 16px;\n border: 1px solid var(--hw-border-md);\n border-radius: 8px;\n background: var(--hw-bg);\n color: var(--hw-text);\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s;\n}\n.hw-resolved-reopen:hover {\n background: var(--hw-bg-hover);\n}\n.hw-csat {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n}\n.hw-csat-label {\n font-size: 12px;\n color: var(--hw-text-3);\n}\n.hw-csat-buttons {\n display: flex;\n gap: 8px;\n}\n.hw-csat-btn {\n width: 36px;\n height: 36px;\n border: 1px solid var(--hw-border-md);\n border-radius: 8px;\n background: var(--hw-bg);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n transition:\n transform 0.15s,\n border-color 0.15s,\n background 0.15s;\n}\n.hw-csat-btn:hover {\n transform: scale(1.1);\n border-color: var(--hw-text-3);\n}\n.hw-csat-btn--selected {\n border-color: var(--hw-primary);\n background: var(--hw-bg-hover);\n transform: scale(1.15);\n}\n.hw-csat-thanks {\n font-size: 12px;\n color: #22c55e;\n font-weight: 500;\n animation: hw-msg-appear 0.25s ease-out;\n}\n.hw-load-more-trigger {\n display: flex;\n justify-content: center;\n min-height: 1px;\n}\n.hw-load-more-trigger:has(.hw-load-more-spinner) {\n padding: 8px 0;\n}\n.hw-load-more-spinner {\n display: flex;\n gap: 3px;\n}\n.hw-load-more-spinner > div {\n width: 5px;\n height: 5px;\n border-radius: 50%;\n background: var(--hw-text-4);\n animation: hw-loading-pulse 1.4s infinite;\n}\n.hw-load-more-spinner > div:nth-child(2) {\n animation-delay: 0.2s;\n}\n.hw-load-more-spinner > div:nth-child(3) {\n animation-delay: 0.4s;\n}\n.hw-drag-handle {\n display: none;\n}\n@media (max-width: 479px) {\n .hw-drag-handle {\n display: flex;\n justify-content: center;\n padding: 8px 0 4px;\n flex-shrink: 0;\n }\n .hw-drag-handle-pill {\n width: 32px;\n height: 4px;\n border-radius: 2px;\n background: var(--hw-text-4);\n }\n}\n.hw-msg-bubble p {\n margin: 0 0 8px;\n}\n.hw-msg-bubble p:last-child {\n margin-bottom: 0;\n}\n.hw-msg-bubble strong {\n font-weight: 600;\n}\n.hw-msg-bubble em {\n font-style: italic;\n}\n.hw-msg-bubble a {\n color: var(--hw-primary);\n text-decoration: underline;\n text-underline-offset: 2px;\n word-break: break-all;\n}\n.hw-msg-bubble a:hover {\n opacity: 0.8;\n}\n.hw-msg--visitor .hw-msg-bubble a {\n color: rgba(255, 255, 255, 0.9);\n}\n.hw-msg--visitor .hw-msg-bubble a:hover {\n color: white;\n}\n.hw-msg-bubble ul,\n.hw-msg-bubble ol {\n margin: 4px 0 8px;\n padding-left: 20px;\n}\n.hw-msg-bubble li {\n margin: 2px 0;\n}\n.hw-msg-bubble code {\n padding: 1px 4px;\n border-radius: 3px;\n background: rgba(0, 0, 0, 0.06);\n font-size: 0.9em;\n font-family:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n monospace;\n}\n.hw-msg-bubble pre {\n margin: 4px 0 8px;\n padding: 8px 10px;\n border-radius: 6px;\n background: rgba(0, 0, 0, 0.06);\n overflow-x: auto;\n font-size: 0.85em;\n}\n.hw-msg-bubble pre code {\n padding: 0;\n background: none;\n}\n.hw-msg-bubble blockquote {\n margin: 4px 0 8px;\n padding: 4px 0 4px 12px;\n border-left: 3px solid var(--hw-border-md);\n color: var(--hw-text-2);\n}\n.hw-widget[data-theme=dark] {\n --hw-bg: #1c1c1e;\n --hw-bg-subtle: #161618;\n --hw-bg-hover: #2c2c2e;\n --hw-border: rgba(255, 255, 255, 0.08);\n --hw-border-md: rgba(255, 255, 255, 0.14);\n --hw-text: #f5f5f5;\n --hw-text-1: #f5f5f5;\n --hw-text-2: #a1a1aa;\n --hw-text-3: #71717a;\n --hw-text-4: #52525b;\n --hw-visitor-bubble-bg: #2c2c2e;\n --hw-visitor-bubble-text: #f5f5f5;\n --hw-focus-border: rgba(255, 255, 255, 0.28);\n --hw-focus-ring: rgba(255, 255, 255, 0.08);\n --hw-brand: #f5f5f5;\n --hw-on-brand: #1c1c1e;\n}\n@media (prefers-color-scheme: dark) {\n .hw-widget:not([data-theme=light]) .hw-messages {\n scrollbar-color: rgba(255, 255, 255, 0.26) transparent;\n }\n .hw-widget:not([data-theme=light]) .hw-messages::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2);\n background-clip: content-box;\n }\n .hw-widget:not([data-theme=light]) .hw-messages::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.32);\n background-clip: content-box;\n }\n .hw-widget:not([data-theme=light]) {\n --hw-bg: #1c1c1e;\n --hw-bg-subtle: #161618;\n --hw-bg-hover: #2c2c2e;\n --hw-border: rgba(255, 255, 255, 0.08);\n --hw-border-md: rgba(255, 255, 255, 0.14);\n --hw-text: #f5f5f5;\n --hw-text-1: #f5f5f5;\n --hw-text-2: #a1a1aa;\n --hw-text-3: #71717a;\n --hw-text-4: #52525b;\n --hw-visitor-bubble-bg: #2c2c2e;\n --hw-visitor-bubble-text: #f5f5f5;\n --hw-focus-border: rgba(255, 255, 255, 0.28);\n --hw-focus-ring: rgba(255, 255, 255, 0.08);\n --hw-brand: #f5f5f5;\n --hw-on-brand: #1c1c1e;\n }\n}\n@media (prefers-color-scheme: dark) {\n .hw-widget:not([data-theme=light]) .hw-header {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n .hw-header-bot-icon {\n background: var(--hw-bg-hover);\n }\n .hw-header-name,\n .hw-header-title {\n color: var(--hw-text);\n }\n .hw-header-status {\n color: var(--hw-text-2);\n }\n .hw-header-close,\n .hw-header-back {\n color: var(--hw-text-2);\n }\n .hw-header-close:hover,\n .hw-header-back:hover {\n background: var(--hw-bg-hover);\n color: var(--hw-text);\n }\n .hw-content-entry {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n .hw-content-entry:hover {\n background: var(--hw-bg-hover);\n border-color: var(--hw-border-md);\n }\n .hw-content-empty,\n .hw-empty {\n color: var(--hw-text-3);\n }\n .hw-conv-card {\n border-color: var(--hw-border);\n }\n .hw-recent-row {\n border-color: var(--hw-border);\n }\n .hw-composer-drop-overlay {\n background: rgba(0, 0, 0, 0.6);\n color: var(--hw-text);\n }\n .hw-composer--dragging .hw-composer-box {\n border-color: var(--hw-focus-border);\n box-shadow: 0 0 0 3px var(--hw-focus-ring);\n }\n .hw-hero {\n background:\n linear-gradient(\n 160deg,\n color-mix(in srgb, var(--hw-primary) 40%, black) 0%,\n var(--hw-primary) 50%,\n color-mix(in srgb, var(--hw-primary) 25%, black) 100%);\n }\n .hw-sheet {\n background: var(--hw-bg);\n }\n .hw-card {\n background: var(--hw-bg-hover);\n border-color: var(--hw-border);\n }\n .hw-card:hover {\n background: #333;\n }\n .hw-window {\n box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);\n }\n .hw-bubble:focus-visible {\n outline-color: var(--hw-text-3);\n }\n .hw-msg--visitor .hw-msg-bubble {\n background: var(--hw-primary);\n color: white;\n }\n .hw-msg-bubble code {\n background: rgba(255, 255, 255, 0.08);\n }\n .hw-msg-bubble pre {\n background: rgba(255, 255, 255, 0.08);\n }\n .hw-composer-box {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n .hw-composer-input {\n color: var(--hw-text);\n }\n .hw-tabs {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n .hw-conv-card:hover,\n .hw-recent-row:hover {\n background: var(--hw-bg-hover);\n }\n .hw-disconnect {\n background: #422006;\n color: #fcd34d;\n }\n .hw-send-error {\n background: #450a0a;\n color: #fca5a5;\n }\n .hw-error-icon {\n background: #450a0a;\n color: #f87171;\n }\n .hw-msg-copy:hover {\n background: var(--hw-bg-hover);\n color: var(--hw-text-2);\n }\n .hw-resolved {\n border-color: var(--hw-border);\n }\n .hw-resolved-reopen,\n .hw-csat-btn {\n background: var(--hw-bg-hover);\n border-color: var(--hw-border-md);\n color: var(--hw-text);\n }\n .hw-hover-preview {\n background: #1c1c1e;\n border-color: var(--hw-border);\n }\n .hw-content-search-box {\n background: var(--hw-bg-hover);\n border-color: var(--hw-border-md);\n }\n .hw-preview {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n}\n');
|
|
4129
4417
|
|
|
4130
4418
|
// src/helpway-widget.tsx
|
|
4131
|
-
import { jsx as
|
|
4419
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
4132
4420
|
function HelpwayWidget({
|
|
4133
4421
|
apiKey,
|
|
4134
4422
|
apiUrl,
|
|
@@ -4139,7 +4427,7 @@ function HelpwayWidget({
|
|
|
4139
4427
|
src
|
|
4140
4428
|
}) {
|
|
4141
4429
|
const resolvedApiUrl = apiUrl ?? (src ? src.replace(/\/widget\.js$/, "") : void 0);
|
|
4142
|
-
return /* @__PURE__ */
|
|
4430
|
+
return /* @__PURE__ */ jsx14(
|
|
4143
4431
|
SupportProvider,
|
|
4144
4432
|
{
|
|
4145
4433
|
apiKey,
|
|
@@ -4147,16 +4435,16 @@ function HelpwayWidget({
|
|
|
4147
4435
|
locale,
|
|
4148
4436
|
initialConversationId,
|
|
4149
4437
|
onReady,
|
|
4150
|
-
children: /* @__PURE__ */
|
|
4438
|
+
children: /* @__PURE__ */ jsx14(DefaultWidget, {})
|
|
4151
4439
|
}
|
|
4152
4440
|
);
|
|
4153
4441
|
}
|
|
4154
4442
|
|
|
4155
4443
|
// src/hooks/use-realtime.ts
|
|
4156
|
-
import { useEffect as
|
|
4444
|
+
import { useEffect as useEffect12 } from "react";
|
|
4157
4445
|
function useRealtime(handler) {
|
|
4158
4446
|
const { ws } = useWidgetContext();
|
|
4159
|
-
|
|
4447
|
+
useEffect12(() => {
|
|
4160
4448
|
return ws.onEvent(handler);
|
|
4161
4449
|
}, [ws, handler]);
|
|
4162
4450
|
}
|
|
@@ -4164,6 +4452,7 @@ export {
|
|
|
4164
4452
|
Composer,
|
|
4165
4453
|
DefaultWidget,
|
|
4166
4454
|
HelpwayWidget,
|
|
4455
|
+
MarkdownContent,
|
|
4167
4456
|
MessageBubble,
|
|
4168
4457
|
MessageList,
|
|
4169
4458
|
SupportProvider,
|
|
@@ -4172,6 +4461,8 @@ export {
|
|
|
4172
4461
|
formatTime,
|
|
4173
4462
|
getInitials,
|
|
4174
4463
|
getOrCreateVisitorId,
|
|
4464
|
+
linkifyText,
|
|
4465
|
+
renderMarkdown,
|
|
4175
4466
|
useComposer,
|
|
4176
4467
|
useConversations,
|
|
4177
4468
|
useIdentify,
|