@helpway/react 0.3.0 → 0.3.2
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 +2 -2
- package/dist/index.js +638 -396
- package/dist/index.js.map +1 -1
- package/package.json +5 -3
- package/src/themed/styles.css +190 -38
package/dist/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
1
3
|
// ../widget-core/src/client.ts
|
|
2
4
|
import { createTRPCClient, httpBatchLink } from "@trpc/client";
|
|
3
5
|
|
|
@@ -462,6 +464,23 @@ function createWidgetStore() {
|
|
|
462
464
|
state.setTyping(event.conversationId, false);
|
|
463
465
|
break;
|
|
464
466
|
}
|
|
467
|
+
case "conversationCreated": {
|
|
468
|
+
const conv = event.conversation;
|
|
469
|
+
const alreadyPresent = state.conversations.some((c) => c.id === conv.id);
|
|
470
|
+
if (alreadyPresent) break;
|
|
471
|
+
state.addConversation({
|
|
472
|
+
id: conv.id,
|
|
473
|
+
title: conv.title,
|
|
474
|
+
status: conv.status,
|
|
475
|
+
lastMessageText: conv.lastMessageText ?? null,
|
|
476
|
+
lastMessageAt: conv.lastMessageAt ?? null,
|
|
477
|
+
lastMessageSenderType: conv.lastMessageSenderType ?? null,
|
|
478
|
+
lastMessageSenderName: null,
|
|
479
|
+
lastMessageSenderImage: null,
|
|
480
|
+
unreadCount: 0
|
|
481
|
+
});
|
|
482
|
+
break;
|
|
483
|
+
}
|
|
465
484
|
default:
|
|
466
485
|
break;
|
|
467
486
|
}
|
|
@@ -907,7 +926,7 @@ function inferApiUrl() {
|
|
|
907
926
|
}
|
|
908
927
|
}
|
|
909
928
|
}
|
|
910
|
-
return
|
|
929
|
+
return "https://api.helpway.ai";
|
|
911
930
|
}
|
|
912
931
|
|
|
913
932
|
// src/themed/default-widget.tsx
|
|
@@ -923,6 +942,7 @@ function useComposer(conversationId) {
|
|
|
923
942
|
const [isSubmitting, setIsSubmitting] = useState2(false);
|
|
924
943
|
const [attachments, setAttachments] = useState2([]);
|
|
925
944
|
const [sendError, setSendError] = useState2(null);
|
|
945
|
+
const [emailGateConvId, setEmailGateConvId] = useState2(null);
|
|
926
946
|
const addFiles = useCallback2(
|
|
927
947
|
async (files) => {
|
|
928
948
|
if (!conversationId) return;
|
|
@@ -1028,6 +1048,9 @@ function useComposer(conversationId) {
|
|
|
1028
1048
|
if (result.item) {
|
|
1029
1049
|
store.getState().replaceMessage(conv.id, optimisticId, result.item);
|
|
1030
1050
|
}
|
|
1051
|
+
if (result.requireEmail) {
|
|
1052
|
+
setEmailGateConvId(conv.id);
|
|
1053
|
+
}
|
|
1031
1054
|
} else {
|
|
1032
1055
|
const result = await client.widget.sendMessage.mutate({
|
|
1033
1056
|
conversationId,
|
|
@@ -1060,7 +1083,8 @@ function useComposer(conversationId) {
|
|
|
1060
1083
|
addFiles,
|
|
1061
1084
|
removeAttachment,
|
|
1062
1085
|
sendError,
|
|
1063
|
-
clearSendError
|
|
1086
|
+
clearSendError,
|
|
1087
|
+
emailGateConvId
|
|
1064
1088
|
};
|
|
1065
1089
|
}
|
|
1066
1090
|
function fileToBase64(file) {
|
|
@@ -1300,27 +1324,179 @@ function useWidget() {
|
|
|
1300
1324
|
import { useCallback as useCallback7, useRef as useRef7, useState as useState7 } from "react";
|
|
1301
1325
|
|
|
1302
1326
|
// src/themed/icons.tsx
|
|
1303
|
-
import {
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1327
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
1328
|
+
function XIcon({ size = 24, ...props }) {
|
|
1329
|
+
return /* @__PURE__ */ jsx2(
|
|
1330
|
+
"svg",
|
|
1331
|
+
{
|
|
1332
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1333
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1334
|
+
viewBox: "0 0 24 24",
|
|
1335
|
+
fill: "none",
|
|
1336
|
+
"aria-hidden": true,
|
|
1337
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1338
|
+
...props,
|
|
1339
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M6.5 6.5L17.5 17.5M17.5 6.5L6.5 17.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
1340
|
+
}
|
|
1341
|
+
);
|
|
1342
|
+
}
|
|
1343
|
+
function SendIcon({ size = 24, ...props }) {
|
|
1344
|
+
return /* @__PURE__ */ jsx2(
|
|
1345
|
+
"svg",
|
|
1346
|
+
{
|
|
1347
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1348
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1349
|
+
viewBox: "0 0 24 24",
|
|
1350
|
+
fill: "none",
|
|
1351
|
+
"aria-hidden": true,
|
|
1352
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1353
|
+
...props,
|
|
1354
|
+
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" })
|
|
1355
|
+
}
|
|
1356
|
+
);
|
|
1357
|
+
}
|
|
1358
|
+
function PaperclipIcon({ size = 24, ...props }) {
|
|
1359
|
+
return /* @__PURE__ */ jsx2(
|
|
1360
|
+
"svg",
|
|
1361
|
+
{
|
|
1362
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1363
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1364
|
+
viewBox: "0 0 24 24",
|
|
1365
|
+
fill: "none",
|
|
1366
|
+
"aria-hidden": true,
|
|
1367
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1368
|
+
...props,
|
|
1369
|
+
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" })
|
|
1370
|
+
}
|
|
1371
|
+
);
|
|
1372
|
+
}
|
|
1373
|
+
function HomeIcon({ size = 24, ...props }) {
|
|
1374
|
+
return /* @__PURE__ */ jsx2(
|
|
1375
|
+
"svg",
|
|
1376
|
+
{
|
|
1377
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1378
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1379
|
+
viewBox: "0 0 24 24",
|
|
1380
|
+
fill: "none",
|
|
1381
|
+
"aria-hidden": true,
|
|
1382
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1383
|
+
...props,
|
|
1384
|
+
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" })
|
|
1385
|
+
}
|
|
1386
|
+
);
|
|
1387
|
+
}
|
|
1388
|
+
function MessagesIcon({ size = 24, ...props }) {
|
|
1389
|
+
return /* @__PURE__ */ jsxs(
|
|
1390
|
+
"svg",
|
|
1391
|
+
{
|
|
1392
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1393
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1394
|
+
viewBox: "0 0 24 24",
|
|
1395
|
+
fill: "none",
|
|
1396
|
+
"aria-hidden": true,
|
|
1397
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1398
|
+
...props,
|
|
1399
|
+
children: [
|
|
1400
|
+
/* @__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" }),
|
|
1401
|
+
/* @__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" })
|
|
1402
|
+
]
|
|
1403
|
+
}
|
|
1404
|
+
);
|
|
1405
|
+
}
|
|
1406
|
+
function BookIcon({ size = 24, ...props }) {
|
|
1407
|
+
return /* @__PURE__ */ jsx2(
|
|
1408
|
+
"svg",
|
|
1409
|
+
{
|
|
1410
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1411
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1412
|
+
viewBox: "0 0 24 24",
|
|
1413
|
+
fill: "none",
|
|
1414
|
+
"aria-hidden": true,
|
|
1415
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1416
|
+
...props,
|
|
1417
|
+
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" })
|
|
1418
|
+
}
|
|
1419
|
+
);
|
|
1420
|
+
}
|
|
1421
|
+
function MegaphoneIcon({ size = 24, ...props }) {
|
|
1422
|
+
return /* @__PURE__ */ jsx2(
|
|
1423
|
+
"svg",
|
|
1424
|
+
{
|
|
1425
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1426
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1427
|
+
viewBox: "0 0 24 24",
|
|
1428
|
+
fill: "none",
|
|
1429
|
+
"aria-hidden": true,
|
|
1430
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1431
|
+
...props,
|
|
1432
|
+
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" })
|
|
1433
|
+
}
|
|
1434
|
+
);
|
|
1435
|
+
}
|
|
1436
|
+
function LightbulbIcon({ size = 24, ...props }) {
|
|
1437
|
+
return /* @__PURE__ */ jsx2(
|
|
1438
|
+
"svg",
|
|
1439
|
+
{
|
|
1440
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1441
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1442
|
+
viewBox: "0 0 24 24",
|
|
1443
|
+
fill: "none",
|
|
1444
|
+
"aria-hidden": true,
|
|
1445
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1446
|
+
...props,
|
|
1447
|
+
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" })
|
|
1448
|
+
}
|
|
1449
|
+
);
|
|
1450
|
+
}
|
|
1451
|
+
function HelpCircleIcon({ size = 24, ...props }) {
|
|
1452
|
+
return /* @__PURE__ */ jsxs(
|
|
1453
|
+
"svg",
|
|
1454
|
+
{
|
|
1455
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1456
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1457
|
+
viewBox: "0 0 24 24",
|
|
1458
|
+
fill: "none",
|
|
1459
|
+
"aria-hidden": true,
|
|
1460
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1461
|
+
...props,
|
|
1462
|
+
children: [
|
|
1463
|
+
/* @__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" }),
|
|
1464
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 16V16.01", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }),
|
|
1465
|
+
/* @__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" })
|
|
1466
|
+
]
|
|
1467
|
+
}
|
|
1468
|
+
);
|
|
1469
|
+
}
|
|
1470
|
+
function NewspaperIcon({ size = 24, ...props }) {
|
|
1471
|
+
return /* @__PURE__ */ jsx2(
|
|
1472
|
+
"svg",
|
|
1473
|
+
{
|
|
1474
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1475
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1476
|
+
viewBox: "0 0 24 24",
|
|
1477
|
+
fill: "none",
|
|
1478
|
+
"aria-hidden": true,
|
|
1479
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1480
|
+
...props,
|
|
1481
|
+
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" })
|
|
1482
|
+
}
|
|
1483
|
+
);
|
|
1484
|
+
}
|
|
1485
|
+
function StarIcon({ size = 24, ...props }) {
|
|
1486
|
+
return /* @__PURE__ */ jsx2(
|
|
1487
|
+
"svg",
|
|
1488
|
+
{
|
|
1489
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1490
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1491
|
+
viewBox: "0 0 24 24",
|
|
1492
|
+
fill: "none",
|
|
1493
|
+
"aria-hidden": true,
|
|
1494
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1495
|
+
...props,
|
|
1496
|
+
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" })
|
|
1497
|
+
}
|
|
1498
|
+
);
|
|
1499
|
+
}
|
|
1324
1500
|
|
|
1325
1501
|
// src/themed/message-bubble.tsx
|
|
1326
1502
|
import { useCallback as useCallback6, useEffect as useEffect5, useLayoutEffect, useRef as useRef6, useState as useState6 } from "react";
|
|
@@ -1328,7 +1504,7 @@ import { createPortal } from "react-dom";
|
|
|
1328
1504
|
|
|
1329
1505
|
// src/themed/content/simple-markdown.tsx
|
|
1330
1506
|
import { useEffect as useEffect4, useRef as useRef5 } from "react";
|
|
1331
|
-
import { jsx as
|
|
1507
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
1332
1508
|
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>`;
|
|
1333
1509
|
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>`;
|
|
1334
1510
|
function inferCodeLanguage(code, lang) {
|
|
@@ -1410,6 +1586,25 @@ function MarkdownContent({
|
|
|
1410
1586
|
}) {
|
|
1411
1587
|
const rootRef = useRef5(null);
|
|
1412
1588
|
const html = bodyHtml ?? (bodyMarkdown ? renderMarkdown(bodyMarkdown) : "");
|
|
1589
|
+
useEffect4(() => {
|
|
1590
|
+
const root = rootRef.current;
|
|
1591
|
+
if (!root) return;
|
|
1592
|
+
const isWhitespaceOnly = (el) => {
|
|
1593
|
+
const hasNonBrChild = Array.from(el.children).some(
|
|
1594
|
+
(c) => c.tagName !== "BR"
|
|
1595
|
+
);
|
|
1596
|
+
if (hasNonBrChild) return false;
|
|
1597
|
+
const text = el.textContent ?? "";
|
|
1598
|
+
return text.replace(/[\s ]/g, "") === "";
|
|
1599
|
+
};
|
|
1600
|
+
const removeEmpties = () => {
|
|
1601
|
+
const candidates = root.querySelectorAll("p, div");
|
|
1602
|
+
candidates.forEach((el) => {
|
|
1603
|
+
if (isWhitespaceOnly(el)) el.remove();
|
|
1604
|
+
});
|
|
1605
|
+
};
|
|
1606
|
+
removeEmpties();
|
|
1607
|
+
}, [html]);
|
|
1413
1608
|
useEffect4(() => {
|
|
1414
1609
|
const root = rootRef.current;
|
|
1415
1610
|
if (!root) return;
|
|
@@ -1422,7 +1617,7 @@ function MarkdownContent({
|
|
|
1422
1617
|
};
|
|
1423
1618
|
}, []);
|
|
1424
1619
|
if (!html) return null;
|
|
1425
|
-
return /* @__PURE__ */
|
|
1620
|
+
return /* @__PURE__ */ jsx3(
|
|
1426
1621
|
"div",
|
|
1427
1622
|
{
|
|
1428
1623
|
ref: rootRef,
|
|
@@ -1444,13 +1639,11 @@ function flashCopied(btn, failed = false) {
|
|
|
1444
1639
|
}
|
|
1445
1640
|
|
|
1446
1641
|
// src/themed/message-bubble.tsx
|
|
1447
|
-
import { Fragment, jsx as
|
|
1448
|
-
function MessageBubble({ text, sender, senderName,
|
|
1642
|
+
import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1643
|
+
function MessageBubble({ text, sender, senderName, parts }) {
|
|
1449
1644
|
const senderClass = `hw-msg--${sender}`;
|
|
1450
1645
|
const agentName = useWidgetStore((s) => s.agentConfig?.name) ?? t("widget.helpway_ai");
|
|
1451
|
-
const
|
|
1452
|
-
const meta = sender === "ai" ? `${agentName} \xB7 ${relativeTime}` : relativeTime;
|
|
1453
|
-
const clockTime = formatClockTime(time);
|
|
1646
|
+
const senderLabel = sender === "ai" ? agentName : sender === "team" ? senderName ?? t("widget.support") : null;
|
|
1454
1647
|
const bubbleRef = useRef6(null);
|
|
1455
1648
|
const imageParts = parts?.filter((p) => p.type === "image") ?? [];
|
|
1456
1649
|
const fileParts = parts?.filter((p) => p.type === "file") ?? [];
|
|
@@ -1466,23 +1659,22 @@ function MessageBubble({ text, sender, senderName, time, parts }) {
|
|
|
1466
1659
|
bubble.removeEventListener("click", handleClick);
|
|
1467
1660
|
};
|
|
1468
1661
|
}, [sender]);
|
|
1469
|
-
return /* @__PURE__ */
|
|
1470
|
-
sender === "team" && /* @__PURE__ */
|
|
1471
|
-
imageParts.length > 0 && /* @__PURE__ */
|
|
1472
|
-
hasText && /* @__PURE__ */
|
|
1473
|
-
fileParts.length > 0 && /* @__PURE__ */
|
|
1474
|
-
/* @__PURE__ */
|
|
1475
|
-
/* @__PURE__ */
|
|
1476
|
-
/* @__PURE__ */
|
|
1477
|
-
hasText && /* @__PURE__ */ jsx3(CopyButton, { text })
|
|
1662
|
+
return /* @__PURE__ */ jsx4("div", { className: `hw-msg ${senderClass}`, children: /* @__PURE__ */ jsxs2("div", { className: "hw-msg-body", children: [
|
|
1663
|
+
sender === "team" && /* @__PURE__ */ jsx4("div", { className: "hw-msg-sender", children: senderName ?? t("widget.support") }),
|
|
1664
|
+
imageParts.length > 0 && /* @__PURE__ */ jsx4("div", { className: "hw-msg-images", children: imageParts.map((img, i) => /* @__PURE__ */ jsx4(PreviewableThumbnail, { src: img.url }, i)) }),
|
|
1665
|
+
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) } }) }),
|
|
1666
|
+
fileParts.length > 0 && /* @__PURE__ */ jsx4("div", { className: "hw-msg-files", children: fileParts.map((file, i) => /* @__PURE__ */ jsx4(FileCard, { file }, i)) }),
|
|
1667
|
+
/* @__PURE__ */ jsxs2("div", { className: "hw-msg-meta", children: [
|
|
1668
|
+
senderLabel && /* @__PURE__ */ jsx4("span", { className: "hw-msg-sender-label", children: senderLabel }),
|
|
1669
|
+
hasText && /* @__PURE__ */ jsx4(CopyButton, { text })
|
|
1478
1670
|
] })
|
|
1479
1671
|
] }) });
|
|
1480
1672
|
}
|
|
1481
|
-
function PreviewableThumbnail({ src
|
|
1673
|
+
function PreviewableThumbnail({ src }) {
|
|
1482
1674
|
const [hover, setHover] = useState6(false);
|
|
1483
1675
|
const ref = useRef6(null);
|
|
1484
|
-
return /* @__PURE__ */
|
|
1485
|
-
/* @__PURE__ */
|
|
1676
|
+
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1677
|
+
/* @__PURE__ */ jsx4(
|
|
1486
1678
|
"a",
|
|
1487
1679
|
{
|
|
1488
1680
|
ref,
|
|
@@ -1492,10 +1684,10 @@ function PreviewableThumbnail({ src, type }) {
|
|
|
1492
1684
|
className: "hw-msg-image-link",
|
|
1493
1685
|
onMouseEnter: () => setHover(true),
|
|
1494
1686
|
onMouseLeave: () => setHover(false),
|
|
1495
|
-
children: /* @__PURE__ */
|
|
1687
|
+
children: /* @__PURE__ */ jsx4("img", { src, alt: "", className: "hw-msg-image", loading: "lazy" })
|
|
1496
1688
|
}
|
|
1497
1689
|
),
|
|
1498
|
-
hover && /* @__PURE__ */
|
|
1690
|
+
hover && /* @__PURE__ */ jsx4(AnchoredPreview, { src, anchorRef: ref, href: src })
|
|
1499
1691
|
] });
|
|
1500
1692
|
}
|
|
1501
1693
|
var PREVIEWABLE_EXTS = /* @__PURE__ */ new Set(["pdf", "csv", "png", "jpg", "jpeg", "gif", "webp", "svg"]);
|
|
@@ -1505,8 +1697,8 @@ function FileCard({ file }) {
|
|
|
1505
1697
|
const ext = file.fileName.split(".").pop()?.toLowerCase() ?? "";
|
|
1506
1698
|
const isPreviewable = PREVIEWABLE_EXTS.has(ext);
|
|
1507
1699
|
const isImage = file.mimeType.startsWith("image/");
|
|
1508
|
-
return /* @__PURE__ */
|
|
1509
|
-
/* @__PURE__ */
|
|
1700
|
+
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1701
|
+
/* @__PURE__ */ jsxs2(
|
|
1510
1702
|
"a",
|
|
1511
1703
|
{
|
|
1512
1704
|
ref,
|
|
@@ -1517,15 +1709,15 @@ function FileCard({ file }) {
|
|
|
1517
1709
|
onMouseEnter: () => isPreviewable && setHover(true),
|
|
1518
1710
|
onMouseLeave: () => setHover(false),
|
|
1519
1711
|
children: [
|
|
1520
|
-
/* @__PURE__ */
|
|
1521
|
-
/* @__PURE__ */
|
|
1522
|
-
/* @__PURE__ */
|
|
1523
|
-
/* @__PURE__ */
|
|
1712
|
+
/* @__PURE__ */ jsx4("span", { className: "hw-msg-file-icon", children: /* @__PURE__ */ jsx4(FileTypeIcon, { ext }) }),
|
|
1713
|
+
/* @__PURE__ */ jsxs2("span", { className: "hw-msg-file-info", children: [
|
|
1714
|
+
/* @__PURE__ */ jsx4("span", { className: "hw-msg-file-name", children: file.fileName }),
|
|
1715
|
+
/* @__PURE__ */ jsx4("span", { className: "hw-msg-file-size", children: formatFileSize(file.fileSize) })
|
|
1524
1716
|
] })
|
|
1525
1717
|
]
|
|
1526
1718
|
}
|
|
1527
1719
|
),
|
|
1528
|
-
hover && isPreviewable && (isImage ? /* @__PURE__ */
|
|
1720
|
+
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 }))
|
|
1529
1721
|
] });
|
|
1530
1722
|
}
|
|
1531
1723
|
function AnchoredPreview({
|
|
@@ -1559,7 +1751,7 @@ function AnchoredPreview({
|
|
|
1559
1751
|
};
|
|
1560
1752
|
if (!portalTarget) return null;
|
|
1561
1753
|
return createPortal(
|
|
1562
|
-
/* @__PURE__ */
|
|
1754
|
+
/* @__PURE__ */ jsx4("div", { className: "hw-hover-preview", style, onClick: handleClick, children: /* @__PURE__ */ jsx4("img", { src, alt: "", className: "hw-hover-preview-img" }) }),
|
|
1563
1755
|
portalTarget
|
|
1564
1756
|
);
|
|
1565
1757
|
}
|
|
@@ -1590,17 +1782,17 @@ function AnchoredDocPreview({
|
|
|
1590
1782
|
}, [anchorRef]);
|
|
1591
1783
|
if (!portalTarget) return null;
|
|
1592
1784
|
return createPortal(
|
|
1593
|
-
/* @__PURE__ */
|
|
1785
|
+
/* @__PURE__ */ jsxs2(
|
|
1594
1786
|
"div",
|
|
1595
1787
|
{
|
|
1596
1788
|
className: "hw-hover-preview hw-hover-preview--doc",
|
|
1597
1789
|
style,
|
|
1598
1790
|
onClick: () => window.open(href, "_blank"),
|
|
1599
1791
|
children: [
|
|
1600
|
-
/* @__PURE__ */
|
|
1601
|
-
/* @__PURE__ */
|
|
1602
|
-
/* @__PURE__ */
|
|
1603
|
-
/* @__PURE__ */
|
|
1792
|
+
/* @__PURE__ */ jsx4("div", { className: "hw-hover-preview-doc-icon", children: /* @__PURE__ */ jsx4(FileTypeIcon, { ext }) }),
|
|
1793
|
+
/* @__PURE__ */ jsxs2("div", { className: "hw-hover-preview-doc-info", children: [
|
|
1794
|
+
/* @__PURE__ */ jsx4("span", { className: "hw-hover-preview-doc-name", children: fileName }),
|
|
1795
|
+
/* @__PURE__ */ jsx4("span", { className: "hw-hover-preview-doc-hint", children: t("widget.click_to_open") })
|
|
1604
1796
|
] })
|
|
1605
1797
|
]
|
|
1606
1798
|
}
|
|
@@ -1613,15 +1805,6 @@ function formatFileSize(bytes) {
|
|
|
1613
1805
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(0)} KB`;
|
|
1614
1806
|
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
1615
1807
|
}
|
|
1616
|
-
function formatClockTime(value) {
|
|
1617
|
-
const date = new Date(value);
|
|
1618
|
-
if (Number.isNaN(date.getTime())) return "";
|
|
1619
|
-
return date.toLocaleTimeString(void 0, {
|
|
1620
|
-
hour: "2-digit",
|
|
1621
|
-
hour12: false,
|
|
1622
|
-
minute: "2-digit"
|
|
1623
|
-
});
|
|
1624
|
-
}
|
|
1625
1808
|
function CopyButton({ text }) {
|
|
1626
1809
|
const [copied, setCopied] = useState6(false);
|
|
1627
1810
|
const handleCopy = useCallback6(
|
|
@@ -1636,14 +1819,14 @@ function CopyButton({ text }) {
|
|
|
1636
1819
|
},
|
|
1637
1820
|
[text]
|
|
1638
1821
|
);
|
|
1639
|
-
return /* @__PURE__ */
|
|
1822
|
+
return /* @__PURE__ */ jsx4(
|
|
1640
1823
|
"button",
|
|
1641
1824
|
{
|
|
1642
1825
|
type: "button",
|
|
1643
1826
|
className: `hw-msg-copy ${copied ? "hw-msg-copy--done" : ""}`,
|
|
1644
1827
|
onClick: handleCopy,
|
|
1645
1828
|
"aria-label": copied ? t("widget.copied") : t("widget.copy"),
|
|
1646
|
-
children: copied ? /* @__PURE__ */
|
|
1829
|
+
children: copied ? /* @__PURE__ */ jsx4(
|
|
1647
1830
|
"svg",
|
|
1648
1831
|
{
|
|
1649
1832
|
viewBox: "0 0 24 24",
|
|
@@ -1652,9 +1835,9 @@ function CopyButton({ text }) {
|
|
|
1652
1835
|
strokeWidth: 2,
|
|
1653
1836
|
strokeLinecap: "round",
|
|
1654
1837
|
strokeLinejoin: "round",
|
|
1655
|
-
children: /* @__PURE__ */
|
|
1838
|
+
children: /* @__PURE__ */ jsx4("polyline", { points: "20 6 9 17 4 12" })
|
|
1656
1839
|
}
|
|
1657
|
-
) : /* @__PURE__ */
|
|
1840
|
+
) : /* @__PURE__ */ jsxs2(
|
|
1658
1841
|
"svg",
|
|
1659
1842
|
{
|
|
1660
1843
|
viewBox: "0 0 24 24",
|
|
@@ -1664,8 +1847,8 @@ function CopyButton({ text }) {
|
|
|
1664
1847
|
strokeLinecap: "round",
|
|
1665
1848
|
strokeLinejoin: "round",
|
|
1666
1849
|
children: [
|
|
1667
|
-
/* @__PURE__ */
|
|
1668
|
-
/* @__PURE__ */
|
|
1850
|
+
/* @__PURE__ */ jsx4("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
1851
|
+
/* @__PURE__ */ jsx4("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
1669
1852
|
]
|
|
1670
1853
|
}
|
|
1671
1854
|
)
|
|
@@ -1684,7 +1867,7 @@ function FileTypeIcon({ ext }) {
|
|
|
1684
1867
|
zip: "#f59e0b"
|
|
1685
1868
|
};
|
|
1686
1869
|
const color = colors[ext] ?? "currentColor";
|
|
1687
|
-
return /* @__PURE__ */
|
|
1870
|
+
return /* @__PURE__ */ jsxs2(
|
|
1688
1871
|
"svg",
|
|
1689
1872
|
{
|
|
1690
1873
|
viewBox: "0 0 24 24",
|
|
@@ -1694,17 +1877,17 @@ function FileTypeIcon({ ext }) {
|
|
|
1694
1877
|
strokeLinecap: "round",
|
|
1695
1878
|
strokeLinejoin: "round",
|
|
1696
1879
|
children: [
|
|
1697
|
-
/* @__PURE__ */
|
|
1698
|
-
/* @__PURE__ */
|
|
1699
|
-
ext === "pdf" && /* @__PURE__ */
|
|
1700
|
-
ext === "csv" && /* @__PURE__ */
|
|
1880
|
+
/* @__PURE__ */ jsx4("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
1881
|
+
/* @__PURE__ */ jsx4("polyline", { points: "14 2 14 8 20 8" }),
|
|
1882
|
+
ext === "pdf" && /* @__PURE__ */ jsx4("text", { x: "8", y: "18", fontSize: "6", fill: color, stroke: "none", fontWeight: "700", children: "PDF" }),
|
|
1883
|
+
ext === "csv" && /* @__PURE__ */ jsx4("text", { x: "7", y: "18", fontSize: "6", fill: color, stroke: "none", fontWeight: "700", children: "CSV" })
|
|
1701
1884
|
]
|
|
1702
1885
|
}
|
|
1703
1886
|
);
|
|
1704
1887
|
}
|
|
1705
1888
|
|
|
1706
1889
|
// src/themed/composer.tsx
|
|
1707
|
-
import { jsx as
|
|
1890
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1708
1891
|
var MAX_CHARS = 5e3;
|
|
1709
1892
|
var CHAR_WARN_THRESHOLD = 4800;
|
|
1710
1893
|
var ACCEPTED_TYPES = [
|
|
@@ -1815,7 +1998,7 @@ function Composer({
|
|
|
1815
1998
|
const canSend = (hasText || hasAttachments) && !stillUploading;
|
|
1816
1999
|
const showCharCount = text.length >= CHAR_WARN_THRESHOLD;
|
|
1817
2000
|
const isOverLimit = text.length > MAX_CHARS;
|
|
1818
|
-
return /* @__PURE__ */
|
|
2001
|
+
return /* @__PURE__ */ jsx5(
|
|
1819
2002
|
"div",
|
|
1820
2003
|
{
|
|
1821
2004
|
className: `hw-composer ${compact ? "hw-composer--compact" : ""} ${isDragging ? "hw-composer--dragging" : ""}`,
|
|
@@ -1823,9 +2006,9 @@ function Composer({
|
|
|
1823
2006
|
onDragLeave: handleDragLeave,
|
|
1824
2007
|
onDragOver: handleDragOver,
|
|
1825
2008
|
onDrop: handleDrop,
|
|
1826
|
-
children: /* @__PURE__ */
|
|
1827
|
-
isDragging && /* @__PURE__ */
|
|
1828
|
-
attachments && attachments.length > 0 && /* @__PURE__ */
|
|
2009
|
+
children: /* @__PURE__ */ jsxs3("div", { className: "hw-composer-box", style: { position: "relative" }, children: [
|
|
2010
|
+
isDragging && /* @__PURE__ */ jsx5("div", { className: "hw-composer-drop-overlay", children: /* @__PURE__ */ jsx5("span", { className: "hw-composer-drop-text", children: t("widget.drop_files") }) }),
|
|
2011
|
+
attachments && attachments.length > 0 && /* @__PURE__ */ jsx5("div", { className: "hw-composer-previews", children: attachments.map((a) => /* @__PURE__ */ jsx5(
|
|
1829
2012
|
PreviewThumb,
|
|
1830
2013
|
{
|
|
1831
2014
|
attachment: a,
|
|
@@ -1833,7 +2016,7 @@ function Composer({
|
|
|
1833
2016
|
},
|
|
1834
2017
|
a.id
|
|
1835
2018
|
)) }),
|
|
1836
|
-
/* @__PURE__ */
|
|
2019
|
+
/* @__PURE__ */ jsx5(
|
|
1837
2020
|
"textarea",
|
|
1838
2021
|
{
|
|
1839
2022
|
ref,
|
|
@@ -1848,9 +2031,9 @@ function Composer({
|
|
|
1848
2031
|
"aria-label": t("widget.aria_input")
|
|
1849
2032
|
}
|
|
1850
2033
|
),
|
|
1851
|
-
/* @__PURE__ */
|
|
1852
|
-
/* @__PURE__ */
|
|
1853
|
-
/* @__PURE__ */
|
|
2034
|
+
/* @__PURE__ */ jsxs3("div", { className: "hw-composer-toolbar", children: [
|
|
2035
|
+
/* @__PURE__ */ jsxs3("div", { className: "hw-composer-toolbar-left", children: [
|
|
2036
|
+
/* @__PURE__ */ jsx5(
|
|
1854
2037
|
"button",
|
|
1855
2038
|
{
|
|
1856
2039
|
type: "button",
|
|
@@ -1858,10 +2041,10 @@ function Composer({
|
|
|
1858
2041
|
onClick: handleFileClick,
|
|
1859
2042
|
disabled: disabled || isSubmitting,
|
|
1860
2043
|
"aria-label": t("widget.aria_attach"),
|
|
1861
|
-
children: /* @__PURE__ */
|
|
2044
|
+
children: /* @__PURE__ */ jsx5(PaperclipIcon, {})
|
|
1862
2045
|
}
|
|
1863
2046
|
),
|
|
1864
|
-
/* @__PURE__ */
|
|
2047
|
+
/* @__PURE__ */ jsx5(
|
|
1865
2048
|
"input",
|
|
1866
2049
|
{
|
|
1867
2050
|
ref: fileInputRef,
|
|
@@ -1872,9 +2055,9 @@ function Composer({
|
|
|
1872
2055
|
onChange: handleFileChange
|
|
1873
2056
|
}
|
|
1874
2057
|
),
|
|
1875
|
-
showCharCount && /* @__PURE__ */
|
|
2058
|
+
showCharCount && /* @__PURE__ */ jsx5("span", { className: `hw-composer-charcount ${isOverLimit ? "hw-composer-charcount--over" : ""}`, children: MAX_CHARS - text.length })
|
|
1876
2059
|
] }),
|
|
1877
|
-
/* @__PURE__ */
|
|
2060
|
+
/* @__PURE__ */ jsx5(
|
|
1878
2061
|
"button",
|
|
1879
2062
|
{
|
|
1880
2063
|
type: "button",
|
|
@@ -1882,7 +2065,7 @@ function Composer({
|
|
|
1882
2065
|
onClick: onSubmit,
|
|
1883
2066
|
disabled: disabled || !canSend || isSubmitting || isOverLimit,
|
|
1884
2067
|
"aria-label": t("widget.aria_send"),
|
|
1885
|
-
children: /* @__PURE__ */
|
|
2068
|
+
children: /* @__PURE__ */ jsx5(SendIcon, {})
|
|
1886
2069
|
}
|
|
1887
2070
|
)
|
|
1888
2071
|
] })
|
|
@@ -1893,7 +2076,7 @@ function Composer({
|
|
|
1893
2076
|
function PreviewThumb({ attachment: a, onRemove }) {
|
|
1894
2077
|
const [hover, setHover] = useState7(false);
|
|
1895
2078
|
const ref = useRef7(null);
|
|
1896
|
-
return /* @__PURE__ */
|
|
2079
|
+
return /* @__PURE__ */ jsxs3(
|
|
1897
2080
|
"div",
|
|
1898
2081
|
{
|
|
1899
2082
|
ref,
|
|
@@ -1901,20 +2084,20 @@ function PreviewThumb({ attachment: a, onRemove }) {
|
|
|
1901
2084
|
onMouseEnter: () => setHover(true),
|
|
1902
2085
|
onMouseLeave: () => setHover(false),
|
|
1903
2086
|
children: [
|
|
1904
|
-
a.previewUrl ? /* @__PURE__ */
|
|
1905
|
-
a.isUploading && /* @__PURE__ */
|
|
1906
|
-
a.error && /* @__PURE__ */
|
|
1907
|
-
onRemove && /* @__PURE__ */
|
|
2087
|
+
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" }) }),
|
|
2088
|
+
a.isUploading && /* @__PURE__ */ jsx5("div", { className: "hw-composer-preview-loader" }),
|
|
2089
|
+
a.error && /* @__PURE__ */ jsx5("div", { className: "hw-composer-preview-badge", title: a.error, children: "!" }),
|
|
2090
|
+
onRemove && /* @__PURE__ */ jsx5(
|
|
1908
2091
|
"button",
|
|
1909
2092
|
{
|
|
1910
2093
|
type: "button",
|
|
1911
2094
|
className: "hw-composer-preview-remove",
|
|
1912
2095
|
onClick: onRemove,
|
|
1913
2096
|
"aria-label": t("widget.aria_remove"),
|
|
1914
|
-
children: /* @__PURE__ */
|
|
2097
|
+
children: /* @__PURE__ */ jsx5(XIcon, {})
|
|
1915
2098
|
}
|
|
1916
2099
|
),
|
|
1917
|
-
hover && a.previewUrl && !a.isUploading && /* @__PURE__ */
|
|
2100
|
+
hover && a.previewUrl && !a.isUploading && /* @__PURE__ */ jsx5(AnchoredPreview, { src: a.previewUrl, anchorRef: ref })
|
|
1918
2101
|
]
|
|
1919
2102
|
}
|
|
1920
2103
|
);
|
|
@@ -1932,7 +2115,7 @@ function extractFiles(data) {
|
|
|
1932
2115
|
|
|
1933
2116
|
// src/themed/debug-overlay.tsx
|
|
1934
2117
|
import { useEffect as useEffect6, useMemo, useRef as useRef8, useState as useState8 } from "react";
|
|
1935
|
-
import { jsx as
|
|
2118
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1936
2119
|
var MAX_EVENTS = 60;
|
|
1937
2120
|
function isDebugEnabled() {
|
|
1938
2121
|
if (typeof window === "undefined") return false;
|
|
@@ -2038,10 +2221,10 @@ function WidgetDebugOverlay() {
|
|
|
2038
2221
|
if (!enabled) return null;
|
|
2039
2222
|
const isTyping = activeId ? typingUsers.get(activeId) : false;
|
|
2040
2223
|
const isAi = activeId ? aiProcessingMap.get(activeId) : false;
|
|
2041
|
-
return /* @__PURE__ */
|
|
2042
|
-
/* @__PURE__ */
|
|
2043
|
-
/* @__PURE__ */
|
|
2044
|
-
/* @__PURE__ */
|
|
2224
|
+
return /* @__PURE__ */ jsxs4("div", { style: styles.wrap, children: [
|
|
2225
|
+
/* @__PURE__ */ jsxs4("div", { style: styles.header, children: [
|
|
2226
|
+
/* @__PURE__ */ jsx6("strong", { children: "hw debug" }),
|
|
2227
|
+
/* @__PURE__ */ jsxs4("span", { style: styles.meta, children: [
|
|
2045
2228
|
" ",
|
|
2046
2229
|
"\xB7 conv ",
|
|
2047
2230
|
activeId ? activeId.slice(0, 10) : "\u2014",
|
|
@@ -2052,29 +2235,29 @@ function WidgetDebugOverlay() {
|
|
|
2052
2235
|
" \xB7 ai ",
|
|
2053
2236
|
isAi ? "Y" : "n"
|
|
2054
2237
|
] }),
|
|
2055
|
-
/* @__PURE__ */
|
|
2056
|
-
/* @__PURE__ */
|
|
2238
|
+
/* @__PURE__ */ jsx6("button", { type: "button", style: styles.btn, onClick: () => setOpen((v) => !v), children: open ? "hide" : "show" }),
|
|
2239
|
+
/* @__PURE__ */ jsx6("button", { type: "button", style: styles.btn, onClick: () => {
|
|
2057
2240
|
eventsRef.current = [];
|
|
2058
2241
|
setEvents([]);
|
|
2059
2242
|
}, children: "clear" })
|
|
2060
2243
|
] }),
|
|
2061
|
-
open && /* @__PURE__ */
|
|
2062
|
-
/* @__PURE__ */
|
|
2063
|
-
/* @__PURE__ */
|
|
2064
|
-
activeMessages.length === 0 ? /* @__PURE__ */
|
|
2065
|
-
/* @__PURE__ */
|
|
2066
|
-
/* @__PURE__ */
|
|
2067
|
-
/* @__PURE__ */
|
|
2068
|
-
/* @__PURE__ */
|
|
2244
|
+
open && /* @__PURE__ */ jsxs4("div", { style: styles.body, children: [
|
|
2245
|
+
/* @__PURE__ */ jsxs4("div", { style: styles.section, children: [
|
|
2246
|
+
/* @__PURE__ */ jsx6("div", { style: styles.sectionTitle, children: "messages (active)" }),
|
|
2247
|
+
activeMessages.length === 0 ? /* @__PURE__ */ jsx6("div", { style: styles.empty, children: "empty" }) : activeMessages.map((m, i) => /* @__PURE__ */ jsxs4("div", { style: styles.row, children: [
|
|
2248
|
+
/* @__PURE__ */ jsx6("span", { style: { ...styles.badge, background: colorFor(senderOf(m)) }, children: i }),
|
|
2249
|
+
/* @__PURE__ */ jsx6("span", { style: styles.sender, children: senderOf(m) }),
|
|
2250
|
+
/* @__PURE__ */ jsx6("span", { style: styles.ts, children: m.createdAt.slice(11, 23) }),
|
|
2251
|
+
/* @__PURE__ */ jsx6("span", { style: styles.text, children: (m.text ?? "").slice(0, 60) })
|
|
2069
2252
|
] }, m.id))
|
|
2070
2253
|
] }),
|
|
2071
|
-
/* @__PURE__ */
|
|
2072
|
-
/* @__PURE__ */
|
|
2073
|
-
events.length === 0 ? /* @__PURE__ */
|
|
2074
|
-
/* @__PURE__ */
|
|
2075
|
-
/* @__PURE__ */
|
|
2076
|
-
/* @__PURE__ */
|
|
2077
|
-
e.detail && /* @__PURE__ */
|
|
2254
|
+
/* @__PURE__ */ jsxs4("div", { style: styles.section, children: [
|
|
2255
|
+
/* @__PURE__ */ jsx6("div", { style: styles.sectionTitle, children: "events" }),
|
|
2256
|
+
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: [
|
|
2257
|
+
/* @__PURE__ */ jsx6("span", { style: { ...styles.badge, background: kindColor(e.kind) }, children: e.kind }),
|
|
2258
|
+
/* @__PURE__ */ jsx6("span", { style: styles.ts, children: new Date(e.t).toISOString().slice(11, 23) }),
|
|
2259
|
+
/* @__PURE__ */ jsx6("span", { style: styles.evLabel, children: e.label }),
|
|
2260
|
+
e.detail && /* @__PURE__ */ jsx6("span", { style: styles.detail, children: e.detail })
|
|
2078
2261
|
] }, e.id))
|
|
2079
2262
|
] })
|
|
2080
2263
|
] })
|
|
@@ -2316,39 +2499,96 @@ function useContentTab(tabId) {
|
|
|
2316
2499
|
}
|
|
2317
2500
|
|
|
2318
2501
|
// src/themed/content/content-detail-view.tsx
|
|
2319
|
-
import { jsx as
|
|
2502
|
+
import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2320
2503
|
function ContentDetailView({
|
|
2321
2504
|
entry,
|
|
2322
2505
|
isLoading
|
|
2323
2506
|
}) {
|
|
2324
2507
|
if (isLoading || !entry) {
|
|
2325
|
-
return /* @__PURE__ */
|
|
2326
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "60%", height: 18 } }),
|
|
2327
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "35%", height: 12 } }),
|
|
2328
|
-
/* @__PURE__ */ jsxs4("div", { style: { marginTop: 8, display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
2329
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "100%", height: 12 } }),
|
|
2330
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "95%", height: 12 } }),
|
|
2331
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "80%", height: 12 } }),
|
|
2332
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "60%", height: 12 } })
|
|
2333
|
-
] })
|
|
2334
|
-
] });
|
|
2508
|
+
return /* @__PURE__ */ jsx7(ArticleSkeleton, {});
|
|
2335
2509
|
}
|
|
2336
2510
|
const badge = entry.customFields.version ?? entry.customFields.priority ?? entry.customFields.type ?? null;
|
|
2337
|
-
return /* @__PURE__ */
|
|
2338
|
-
/* @__PURE__ */
|
|
2339
|
-
/* @__PURE__ */
|
|
2340
|
-
(badge || entry.publishedAt) && /* @__PURE__ */
|
|
2341
|
-
badge && /* @__PURE__ */
|
|
2342
|
-
entry.publishedAt && /* @__PURE__ */
|
|
2511
|
+
return /* @__PURE__ */ jsxs5("div", { className: "hw-content-detail", children: [
|
|
2512
|
+
/* @__PURE__ */ jsxs5("div", { className: "hw-content-detail-header", children: [
|
|
2513
|
+
/* @__PURE__ */ jsx7("h1", { className: "hw-content-detail-title", children: entry.title }),
|
|
2514
|
+
(badge || entry.publishedAt) && /* @__PURE__ */ jsxs5("div", { className: "hw-content-detail-meta", children: [
|
|
2515
|
+
badge && /* @__PURE__ */ jsx7("span", { className: "hw-content-entry-badge", children: badge }),
|
|
2516
|
+
entry.publishedAt && /* @__PURE__ */ jsx7("span", { className: "hw-content-detail-date", children: formatRelativeTime(entry.publishedAt) })
|
|
2517
|
+
] })
|
|
2518
|
+
] }),
|
|
2519
|
+
(entry.body || entry.bodyHtml) && /* @__PURE__ */ jsx7("div", { className: "hw-content-detail-body", children: /* @__PURE__ */ jsx7(MarkdownContent, { bodyHtml: entry.bodyHtml, bodyMarkdown: entry.body }) })
|
|
2520
|
+
] });
|
|
2521
|
+
}
|
|
2522
|
+
function ArticleSkeleton() {
|
|
2523
|
+
const sections = [
|
|
2524
|
+
{
|
|
2525
|
+
headerWidth: "30%",
|
|
2526
|
+
items: [
|
|
2527
|
+
{ l1: "98%", l2: "62%" },
|
|
2528
|
+
{ l1: "94%", l2: "48%" },
|
|
2529
|
+
{ l1: "96%", l2: "70%" }
|
|
2530
|
+
]
|
|
2531
|
+
},
|
|
2532
|
+
{
|
|
2533
|
+
headerWidth: "26%",
|
|
2534
|
+
items: [
|
|
2535
|
+
{ l1: "92%", l2: "55%" },
|
|
2536
|
+
{ l1: "88%", l2: "40%" }
|
|
2537
|
+
]
|
|
2538
|
+
}
|
|
2539
|
+
];
|
|
2540
|
+
return /* @__PURE__ */ jsxs5("div", { className: "hw-content-detail", children: [
|
|
2541
|
+
/* @__PURE__ */ jsxs5("div", { className: "hw-content-detail-header", children: [
|
|
2542
|
+
/* @__PURE__ */ jsx7("h1", { className: "hw-content-detail-title", children: /* @__PURE__ */ jsx7("span", { className: "hw-skeleton hw-skeleton-title" }) }),
|
|
2543
|
+
/* @__PURE__ */ jsxs5("div", { className: "hw-content-detail-meta", children: [
|
|
2544
|
+
/* @__PURE__ */ jsx7("span", { className: "hw-skeleton hw-skeleton-badge" }),
|
|
2545
|
+
/* @__PURE__ */ jsx7("span", { className: "hw-skeleton hw-skeleton-date" })
|
|
2343
2546
|
] })
|
|
2344
2547
|
] }),
|
|
2345
|
-
|
|
2548
|
+
/* @__PURE__ */ jsx7("div", { className: "hw-content-detail-body", children: /* @__PURE__ */ jsx7("div", { className: "hw-markdown", children: sections.map((s, i) => /* @__PURE__ */ jsx7(
|
|
2549
|
+
SkeletonSection,
|
|
2550
|
+
{
|
|
2551
|
+
headerWidth: s.headerWidth,
|
|
2552
|
+
items: s.items
|
|
2553
|
+
},
|
|
2554
|
+
i
|
|
2555
|
+
)) }) })
|
|
2556
|
+
] });
|
|
2557
|
+
}
|
|
2558
|
+
function SkeletonSection({
|
|
2559
|
+
headerWidth,
|
|
2560
|
+
items
|
|
2561
|
+
}) {
|
|
2562
|
+
return /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
2563
|
+
/* @__PURE__ */ jsx7("h2", { children: /* @__PURE__ */ jsx7(
|
|
2564
|
+
"span",
|
|
2565
|
+
{
|
|
2566
|
+
className: "hw-skeleton hw-skeleton-h2",
|
|
2567
|
+
style: { display: "block", width: headerWidth }
|
|
2568
|
+
}
|
|
2569
|
+
) }),
|
|
2570
|
+
items.map((item, j) => /* @__PURE__ */ jsx7("ul", { children: /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsxs5("div", { className: "hw-skeleton-bullet-lines", children: [
|
|
2571
|
+
/* @__PURE__ */ jsx7(
|
|
2572
|
+
"span",
|
|
2573
|
+
{
|
|
2574
|
+
className: "hw-skeleton hw-skeleton-bullet-line",
|
|
2575
|
+
style: { display: "block", width: item.l1 }
|
|
2576
|
+
}
|
|
2577
|
+
),
|
|
2578
|
+
/* @__PURE__ */ jsx7(
|
|
2579
|
+
"span",
|
|
2580
|
+
{
|
|
2581
|
+
className: "hw-skeleton hw-skeleton-bullet-line",
|
|
2582
|
+
style: { display: "block", width: item.l2, marginTop: 8 }
|
|
2583
|
+
}
|
|
2584
|
+
)
|
|
2585
|
+
] }) }) }, j))
|
|
2346
2586
|
] });
|
|
2347
2587
|
}
|
|
2348
2588
|
|
|
2349
2589
|
// src/themed/content/content-list-view.tsx
|
|
2350
2590
|
import { useCallback as useCallback9, useRef as useRef9, useState as useState10 } from "react";
|
|
2351
|
-
import { jsx as
|
|
2591
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2352
2592
|
function ContentListView({
|
|
2353
2593
|
entries,
|
|
2354
2594
|
isLoading,
|
|
@@ -2372,13 +2612,13 @@ function ContentListView({
|
|
|
2372
2612
|
},
|
|
2373
2613
|
[onSearch]
|
|
2374
2614
|
);
|
|
2375
|
-
return /* @__PURE__ */
|
|
2376
|
-
onSearch && /* @__PURE__ */
|
|
2377
|
-
/* @__PURE__ */
|
|
2378
|
-
/* @__PURE__ */
|
|
2379
|
-
/* @__PURE__ */
|
|
2615
|
+
return /* @__PURE__ */ jsxs6("div", { className: "hw-content-list", children: [
|
|
2616
|
+
onSearch && /* @__PURE__ */ jsx8("div", { className: "hw-content-search", children: /* @__PURE__ */ jsxs6("div", { className: "hw-content-search-box", children: [
|
|
2617
|
+
/* @__PURE__ */ jsxs6("svg", { className: "hw-content-search-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2618
|
+
/* @__PURE__ */ jsx8("circle", { cx: "11", cy: "11", r: "8" }),
|
|
2619
|
+
/* @__PURE__ */ jsx8("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
|
|
2380
2620
|
] }),
|
|
2381
|
-
/* @__PURE__ */
|
|
2621
|
+
/* @__PURE__ */ jsx8(
|
|
2382
2622
|
"input",
|
|
2383
2623
|
{
|
|
2384
2624
|
type: "text",
|
|
@@ -2389,18 +2629,18 @@ function ContentListView({
|
|
|
2389
2629
|
}
|
|
2390
2630
|
)
|
|
2391
2631
|
] }) }),
|
|
2392
|
-
isLoading && entries.length === 0 && /* @__PURE__ */
|
|
2393
|
-
/* @__PURE__ */
|
|
2394
|
-
/* @__PURE__ */
|
|
2395
|
-
/* @__PURE__ */
|
|
2632
|
+
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: [
|
|
2633
|
+
/* @__PURE__ */ jsx8("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "70%", height: 14 } }),
|
|
2634
|
+
/* @__PURE__ */ jsx8("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "90%", height: 12 } }),
|
|
2635
|
+
/* @__PURE__ */ jsx8("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "40%", height: 10 } })
|
|
2396
2636
|
] }, i)) }),
|
|
2397
|
-
!isLoading && entries.length === 0 && /* @__PURE__ */
|
|
2398
|
-
/* @__PURE__ */
|
|
2399
|
-
/* @__PURE__ */
|
|
2637
|
+
!isLoading && entries.length === 0 && /* @__PURE__ */ jsxs6("div", { className: "hw-content-empty", children: [
|
|
2638
|
+
/* @__PURE__ */ jsx8("div", { className: "hw-content-empty-title", children: searchText ? t("widget.no_results") : t("widget.nothing_yet") }),
|
|
2639
|
+
/* @__PURE__ */ jsx8("div", { className: "hw-content-empty-desc", children: searchText ? t("widget.try_different") : t("widget.check_back") })
|
|
2400
2640
|
] }),
|
|
2401
|
-
entries.length > 0 && /* @__PURE__ */
|
|
2402
|
-
entries.map((entry) => /* @__PURE__ */
|
|
2403
|
-
hasMore && /* @__PURE__ */
|
|
2641
|
+
entries.length > 0 && /* @__PURE__ */ jsxs6("div", { className: "hw-content-entries", children: [
|
|
2642
|
+
entries.map((entry) => /* @__PURE__ */ jsx8(ContentEntryCard, { entry, onSelect, display }, entry.slug)),
|
|
2643
|
+
hasMore && /* @__PURE__ */ jsx8(
|
|
2404
2644
|
"button",
|
|
2405
2645
|
{
|
|
2406
2646
|
type: "button",
|
|
@@ -2427,16 +2667,16 @@ function ContentEntryCard({
|
|
|
2427
2667
|
const badge = display?.badgeField ? customFields[display.badgeField] ?? null : customFields.version ?? customFields.priority ?? customFields.type ?? null;
|
|
2428
2668
|
const subtitleValue = display?.subtitleField ? (display.subtitleField === "body" ? entry.body : customFields[display.subtitleField]) ?? null : customFields.excerpt ?? customFields.summary ?? customFields.description ?? null;
|
|
2429
2669
|
const preview = subtitleValue ? truncateText(subtitleValue) : truncateText(entry.body);
|
|
2430
|
-
return /* @__PURE__ */
|
|
2431
|
-
/* @__PURE__ */
|
|
2432
|
-
/* @__PURE__ */
|
|
2433
|
-
preview && /* @__PURE__ */
|
|
2434
|
-
(badge || entry.publishedAt) && /* @__PURE__ */
|
|
2435
|
-
badge && /* @__PURE__ */
|
|
2436
|
-
entry.publishedAt && /* @__PURE__ */
|
|
2670
|
+
return /* @__PURE__ */ jsx8("button", { type: "button", className: "hw-content-entry", onClick: () => onSelect(entry.slug), children: /* @__PURE__ */ jsxs6("div", { className: "hw-content-entry-main", children: [
|
|
2671
|
+
/* @__PURE__ */ jsxs6("div", { className: "hw-content-entry-text", children: [
|
|
2672
|
+
/* @__PURE__ */ jsx8("span", { className: "hw-content-entry-title", children: entry.title }),
|
|
2673
|
+
preview && /* @__PURE__ */ jsx8("span", { className: "hw-content-entry-desc", children: preview }),
|
|
2674
|
+
(badge || entry.publishedAt) && /* @__PURE__ */ jsxs6("div", { className: "hw-content-entry-meta", children: [
|
|
2675
|
+
badge && /* @__PURE__ */ jsx8("span", { className: "hw-content-entry-badge", children: badge }),
|
|
2676
|
+
entry.publishedAt && /* @__PURE__ */ jsx8("span", { className: "hw-content-entry-date", children: formatRelativeTime(entry.publishedAt) })
|
|
2437
2677
|
] })
|
|
2438
2678
|
] }),
|
|
2439
|
-
/* @__PURE__ */
|
|
2679
|
+
/* @__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" }) })
|
|
2440
2680
|
] }) });
|
|
2441
2681
|
}
|
|
2442
2682
|
|
|
@@ -2660,7 +2900,7 @@ function useGroupedContentTab(tabId) {
|
|
|
2660
2900
|
}
|
|
2661
2901
|
|
|
2662
2902
|
// src/themed/content/grouped-content-tab-view.tsx
|
|
2663
|
-
import { jsx as
|
|
2903
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
2664
2904
|
function GroupedContentTabView({
|
|
2665
2905
|
tab,
|
|
2666
2906
|
subView,
|
|
@@ -2701,10 +2941,10 @@ function GroupedContentTabView({
|
|
|
2701
2941
|
prevSubView.current = subView;
|
|
2702
2942
|
}, [subView, clearCategory]);
|
|
2703
2943
|
if (subView === "content-detail" && detailSlug) {
|
|
2704
|
-
return /* @__PURE__ */
|
|
2944
|
+
return /* @__PURE__ */ jsx9(ContentDetailView, { entry: detail, isLoading: isLoadingDetail });
|
|
2705
2945
|
}
|
|
2706
2946
|
if (subView === "content-category" && activeCategory) {
|
|
2707
|
-
return /* @__PURE__ */
|
|
2947
|
+
return /* @__PURE__ */ jsx9(
|
|
2708
2948
|
ContentListView,
|
|
2709
2949
|
{
|
|
2710
2950
|
entries: items,
|
|
@@ -2718,7 +2958,7 @@ function GroupedContentTabView({
|
|
|
2718
2958
|
}
|
|
2719
2959
|
);
|
|
2720
2960
|
}
|
|
2721
|
-
return /* @__PURE__ */
|
|
2961
|
+
return /* @__PURE__ */ jsx9(
|
|
2722
2962
|
ContentListView,
|
|
2723
2963
|
{
|
|
2724
2964
|
entries: categories,
|
|
@@ -2740,7 +2980,7 @@ function GroupedContentTabView({
|
|
|
2740
2980
|
}
|
|
2741
2981
|
|
|
2742
2982
|
// src/themed/content/content-tab-view.tsx
|
|
2743
|
-
import { jsx as
|
|
2983
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
2744
2984
|
function ContentTabView({
|
|
2745
2985
|
tab,
|
|
2746
2986
|
showDetail,
|
|
@@ -2750,7 +2990,7 @@ function ContentTabView({
|
|
|
2750
2990
|
onSelectCategory
|
|
2751
2991
|
}) {
|
|
2752
2992
|
if (tab.tabType === "grouped" && tab.itemsModelSlug) {
|
|
2753
|
-
return /* @__PURE__ */
|
|
2993
|
+
return /* @__PURE__ */ jsx10(
|
|
2754
2994
|
GroupedContentTabView,
|
|
2755
2995
|
{
|
|
2756
2996
|
tab,
|
|
@@ -2762,7 +3002,7 @@ function ContentTabView({
|
|
|
2762
3002
|
}
|
|
2763
3003
|
);
|
|
2764
3004
|
}
|
|
2765
|
-
return /* @__PURE__ */
|
|
3005
|
+
return /* @__PURE__ */ jsx10(
|
|
2766
3006
|
FlatContentTabView,
|
|
2767
3007
|
{
|
|
2768
3008
|
tab,
|
|
@@ -2798,9 +3038,9 @@ function FlatContentTabView({
|
|
|
2798
3038
|
[fetchEntries]
|
|
2799
3039
|
);
|
|
2800
3040
|
if (showDetail && detailSlug) {
|
|
2801
|
-
return /* @__PURE__ */
|
|
3041
|
+
return /* @__PURE__ */ jsx10(ContentDetailView, { entry: detail, isLoading: isLoadingDetail });
|
|
2802
3042
|
}
|
|
2803
|
-
return /* @__PURE__ */
|
|
3043
|
+
return /* @__PURE__ */ jsx10(
|
|
2804
3044
|
ContentListView,
|
|
2805
3045
|
{
|
|
2806
3046
|
entries,
|
|
@@ -2816,23 +3056,23 @@ function FlatContentTabView({
|
|
|
2816
3056
|
}
|
|
2817
3057
|
|
|
2818
3058
|
// src/themed/content/tab-icon.tsx
|
|
2819
|
-
import { jsx as
|
|
3059
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
2820
3060
|
var ICON_MAP = {
|
|
2821
|
-
book:
|
|
2822
|
-
megaphone:
|
|
2823
|
-
lightbulb:
|
|
2824
|
-
"help-circle":
|
|
2825
|
-
newspaper:
|
|
2826
|
-
star:
|
|
3061
|
+
book: BookIcon,
|
|
3062
|
+
megaphone: MegaphoneIcon,
|
|
3063
|
+
lightbulb: LightbulbIcon,
|
|
3064
|
+
"help-circle": HelpCircleIcon,
|
|
3065
|
+
newspaper: NewspaperIcon,
|
|
3066
|
+
star: StarIcon
|
|
2827
3067
|
};
|
|
2828
3068
|
function ContentTabIconComponent({ icon }) {
|
|
2829
|
-
const Icon = ICON_MAP[icon] ??
|
|
2830
|
-
return /* @__PURE__ */
|
|
3069
|
+
const Icon = ICON_MAP[icon] ?? BookIcon;
|
|
3070
|
+
return /* @__PURE__ */ jsx11(Icon, {});
|
|
2831
3071
|
}
|
|
2832
3072
|
|
|
2833
3073
|
// src/themed/message-list.tsx
|
|
2834
3074
|
import React, { useEffect as useEffect10, useRef as useRef12 } from "react";
|
|
2835
|
-
import { jsx as
|
|
3075
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2836
3076
|
function parseParts(raw) {
|
|
2837
3077
|
if (!raw) return null;
|
|
2838
3078
|
if (Array.isArray(raw)) return raw;
|
|
@@ -2902,16 +3142,16 @@ function MessageList({
|
|
|
2902
3142
|
return () => observer.disconnect();
|
|
2903
3143
|
}, [hasMore, onLoadMore, isLoadingMore]);
|
|
2904
3144
|
if (items.length === 0) {
|
|
2905
|
-
return /* @__PURE__ */
|
|
3145
|
+
return /* @__PURE__ */ jsx12(
|
|
2906
3146
|
"div",
|
|
2907
3147
|
{
|
|
2908
3148
|
className: "hw-messages",
|
|
2909
3149
|
role: "log",
|
|
2910
3150
|
"aria-label": t("widget.aria_messages"),
|
|
2911
3151
|
"aria-live": "polite",
|
|
2912
|
-
children: /* @__PURE__ */
|
|
2913
|
-
/* @__PURE__ */
|
|
2914
|
-
/* @__PURE__ */
|
|
3152
|
+
children: /* @__PURE__ */ jsxs7("div", { className: "hw-empty", children: [
|
|
3153
|
+
/* @__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" }) }) }),
|
|
3154
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-empty-text", children: t("widget.start_a_conversation") })
|
|
2915
3155
|
] })
|
|
2916
3156
|
}
|
|
2917
3157
|
);
|
|
@@ -2921,7 +3161,7 @@ function MessageList({
|
|
|
2921
3161
|
const yesterday = /* @__PURE__ */ new Date();
|
|
2922
3162
|
yesterday.setDate(yesterday.getDate() - 1);
|
|
2923
3163
|
const yesterdayKey = yesterday.toLocaleDateString("en-CA");
|
|
2924
|
-
return /* @__PURE__ */
|
|
3164
|
+
return /* @__PURE__ */ jsxs7(
|
|
2925
3165
|
"div",
|
|
2926
3166
|
{
|
|
2927
3167
|
ref: containerRef,
|
|
@@ -2930,14 +3170,14 @@ function MessageList({
|
|
|
2930
3170
|
"aria-label": t("widget.aria_messages"),
|
|
2931
3171
|
"aria-live": "polite",
|
|
2932
3172
|
children: [
|
|
2933
|
-
/* @__PURE__ */
|
|
2934
|
-
/* @__PURE__ */
|
|
2935
|
-
/* @__PURE__ */
|
|
2936
|
-
/* @__PURE__ */
|
|
3173
|
+
/* @__PURE__ */ jsx12("div", { ref: topRef, className: "hw-load-more-trigger", children: isLoadingMore && /* @__PURE__ */ jsxs7("div", { className: "hw-load-more-spinner", children: [
|
|
3174
|
+
/* @__PURE__ */ jsx12("div", {}),
|
|
3175
|
+
/* @__PURE__ */ jsx12("div", {}),
|
|
3176
|
+
/* @__PURE__ */ jsx12("div", {})
|
|
2937
3177
|
] }) }),
|
|
2938
3178
|
items.map((item) => {
|
|
2939
3179
|
if (item.type === "event") {
|
|
2940
|
-
return /* @__PURE__ */
|
|
3180
|
+
return /* @__PURE__ */ jsx12(EventCard, { text: item.text ?? "" }, item._stableKey ?? item.id);
|
|
2941
3181
|
}
|
|
2942
3182
|
const itemDate = new Date(item.createdAt);
|
|
2943
3183
|
const dateKey = itemDate.toLocaleDateString("en-CA");
|
|
@@ -2950,39 +3190,38 @@ function MessageList({
|
|
|
2950
3190
|
day: "numeric"
|
|
2951
3191
|
});
|
|
2952
3192
|
const sender = item.visitorId ? "visitor" : item.aiAgentId ? "ai" : "team";
|
|
2953
|
-
return /* @__PURE__ */
|
|
2954
|
-
showDateSep && /* @__PURE__ */
|
|
2955
|
-
/* @__PURE__ */
|
|
2956
|
-
/* @__PURE__ */
|
|
2957
|
-
/* @__PURE__ */
|
|
3193
|
+
return /* @__PURE__ */ jsxs7(React.Fragment, { children: [
|
|
3194
|
+
showDateSep && /* @__PURE__ */ jsxs7("div", { className: "hw-date-sep", children: [
|
|
3195
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-date-sep-line" }),
|
|
3196
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-date-sep-text", children: dateLabel }),
|
|
3197
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-date-sep-line" })
|
|
2958
3198
|
] }),
|
|
2959
|
-
/* @__PURE__ */
|
|
3199
|
+
/* @__PURE__ */ jsx12(
|
|
2960
3200
|
MessageBubble,
|
|
2961
3201
|
{
|
|
2962
3202
|
text: item.text ?? "",
|
|
2963
3203
|
sender,
|
|
2964
3204
|
senderName: sender === "visitor" ? visitorName : item.userName ?? void 0,
|
|
2965
|
-
time: item.createdAt,
|
|
2966
3205
|
parts: parseParts(item.parts)
|
|
2967
3206
|
}
|
|
2968
3207
|
)
|
|
2969
3208
|
] }, item._stableKey ?? item.id);
|
|
2970
3209
|
}),
|
|
2971
3210
|
renderAfterMessages,
|
|
2972
|
-
isAiProcessing && /* @__PURE__ */
|
|
2973
|
-
/* @__PURE__ */
|
|
2974
|
-
/* @__PURE__ */
|
|
2975
|
-
/* @__PURE__ */
|
|
2976
|
-
/* @__PURE__ */
|
|
2977
|
-
/* @__PURE__ */
|
|
3211
|
+
isAiProcessing && /* @__PURE__ */ jsxs7("div", { className: "hw-typing", children: [
|
|
3212
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-label", children: agentName }),
|
|
3213
|
+
/* @__PURE__ */ jsxs7("div", { className: "hw-typing-dots", children: [
|
|
3214
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" }),
|
|
3215
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" }),
|
|
3216
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" })
|
|
2978
3217
|
] })
|
|
2979
3218
|
] }),
|
|
2980
|
-
isTyping && !isAiProcessing && /* @__PURE__ */
|
|
2981
|
-
/* @__PURE__ */
|
|
2982
|
-
/* @__PURE__ */
|
|
2983
|
-
/* @__PURE__ */
|
|
3219
|
+
isTyping && !isAiProcessing && /* @__PURE__ */ jsx12("div", { className: "hw-typing", children: /* @__PURE__ */ jsxs7("div", { className: "hw-typing-dots", children: [
|
|
3220
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" }),
|
|
3221
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" }),
|
|
3222
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" })
|
|
2984
3223
|
] }) }),
|
|
2985
|
-
/* @__PURE__ */
|
|
3224
|
+
/* @__PURE__ */ jsx12("div", { ref: bottomRef })
|
|
2986
3225
|
]
|
|
2987
3226
|
}
|
|
2988
3227
|
);
|
|
@@ -3000,20 +3239,20 @@ function EventCard({ text }) {
|
|
|
3000
3239
|
const data = parseEventData(text);
|
|
3001
3240
|
if (data) {
|
|
3002
3241
|
const message = data.action === "joined" ? t("widget.joined") : t("widget.left");
|
|
3003
|
-
return /* @__PURE__ */
|
|
3004
|
-
/* @__PURE__ */
|
|
3005
|
-
/* @__PURE__ */
|
|
3006
|
-
/* @__PURE__ */
|
|
3242
|
+
return /* @__PURE__ */ jsxs7("div", { className: "hw-event hw-event--card", children: [
|
|
3243
|
+
/* @__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) }) }),
|
|
3244
|
+
/* @__PURE__ */ jsxs7("div", { className: "hw-event-body", children: [
|
|
3245
|
+
/* @__PURE__ */ jsx12("span", { className: "hw-event-name", children: data.name }),
|
|
3007
3246
|
" ",
|
|
3008
|
-
/* @__PURE__ */
|
|
3247
|
+
/* @__PURE__ */ jsx12("span", { className: "hw-event-action", children: message })
|
|
3009
3248
|
] })
|
|
3010
3249
|
] });
|
|
3011
3250
|
}
|
|
3012
|
-
return /* @__PURE__ */
|
|
3251
|
+
return /* @__PURE__ */ jsx12("div", { className: "hw-event", children: /* @__PURE__ */ jsx12("div", { className: "hw-event-text", children: text }) });
|
|
3013
3252
|
}
|
|
3014
3253
|
|
|
3015
3254
|
// src/themed/default-widget.tsx
|
|
3016
|
-
import { Fragment as
|
|
3255
|
+
import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3017
3256
|
function resolveLabel2(label) {
|
|
3018
3257
|
if (!label.startsWith("widget.")) return label;
|
|
3019
3258
|
const resolved = t(label);
|
|
@@ -3025,7 +3264,7 @@ var EMPTY_CONTENT_TABS = [];
|
|
|
3025
3264
|
var DEFAULT_EN_WELCOME = "Hi there \u{1F44B}\nHow can we help?";
|
|
3026
3265
|
var DEFAULT_EN_SUBTITLE = "Usually replies in minutes";
|
|
3027
3266
|
function HelpwayMark({ className }) {
|
|
3028
|
-
return /* @__PURE__ */
|
|
3267
|
+
return /* @__PURE__ */ jsx13(
|
|
3029
3268
|
"svg",
|
|
3030
3269
|
{
|
|
3031
3270
|
className,
|
|
@@ -3035,7 +3274,7 @@ function HelpwayMark({ className }) {
|
|
|
3035
3274
|
fill: "none",
|
|
3036
3275
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3037
3276
|
"aria-hidden": "true",
|
|
3038
|
-
children: /* @__PURE__ */
|
|
3277
|
+
children: /* @__PURE__ */ jsx13(
|
|
3039
3278
|
"path",
|
|
3040
3279
|
{
|
|
3041
3280
|
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",
|
|
@@ -3049,11 +3288,11 @@ function WidgetLogo({ className }) {
|
|
|
3049
3288
|
const agentConfig = useWidgetStore((s) => s.agentConfig);
|
|
3050
3289
|
const logoUrl = useWidgetStore((s) => s.website?.logoUrl);
|
|
3051
3290
|
if (agentConfig?.avatarUrl) {
|
|
3052
|
-
return /* @__PURE__ */
|
|
3291
|
+
return /* @__PURE__ */ jsx13("img", { src: agentConfig.avatarUrl, alt: "", className: `hw-agent-img ${className ?? ""}` });
|
|
3053
3292
|
}
|
|
3054
3293
|
if (agentConfig?.avatarPreset) {
|
|
3055
3294
|
const color = agentConfig.brandColor ?? "#0a0a0a";
|
|
3056
|
-
return /* @__PURE__ */
|
|
3295
|
+
return /* @__PURE__ */ jsx13(
|
|
3057
3296
|
"div",
|
|
3058
3297
|
{
|
|
3059
3298
|
className: `hw-agent-icon ${className ?? ""}`,
|
|
@@ -3064,14 +3303,14 @@ function WidgetLogo({ className }) {
|
|
|
3064
3303
|
justifyContent: "center",
|
|
3065
3304
|
borderRadius: 8
|
|
3066
3305
|
},
|
|
3067
|
-
children: /* @__PURE__ */
|
|
3306
|
+
children: /* @__PURE__ */ jsx13(AgentPresetIcon, { presetId: agentConfig.avatarPreset })
|
|
3068
3307
|
}
|
|
3069
3308
|
);
|
|
3070
3309
|
}
|
|
3071
3310
|
if (logoUrl) {
|
|
3072
|
-
return /* @__PURE__ */
|
|
3311
|
+
return /* @__PURE__ */ jsx13("img", { src: logoUrl, alt: "", className: `hw-agent-img ${className ?? ""}` });
|
|
3073
3312
|
}
|
|
3074
|
-
return /* @__PURE__ */
|
|
3313
|
+
return /* @__PURE__ */ jsx13(HelpwayMark, { className });
|
|
3075
3314
|
}
|
|
3076
3315
|
var PRESET_SVG = {
|
|
3077
3316
|
// Helpway brand mark — octagonal chamfer with stylized "W" inside.
|
|
@@ -3130,7 +3369,7 @@ function AgentPresetIcon({ presetId }) {
|
|
|
3130
3369
|
const svgContent = PRESET_SVG[presetId] ?? PRESET_SVG.sparkle;
|
|
3131
3370
|
return (
|
|
3132
3371
|
// biome-ignore lint: trusted static SVG content from our icon library
|
|
3133
|
-
/* @__PURE__ */
|
|
3372
|
+
/* @__PURE__ */ jsx13(
|
|
3134
3373
|
"svg",
|
|
3135
3374
|
{
|
|
3136
3375
|
viewBox: "0 0 24 24",
|
|
@@ -3394,7 +3633,7 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3394
3633
|
const widgetPosition = agentConfig?.widgetPosition ?? "bottom-right";
|
|
3395
3634
|
const launcherStyle = agentConfig?.launcherStyle ?? "icon";
|
|
3396
3635
|
const bubbleStyle = agentConfig?.bubbleStyle ?? "rounded";
|
|
3397
|
-
return /* @__PURE__ */
|
|
3636
|
+
return /* @__PURE__ */ jsxs8(
|
|
3398
3637
|
"div",
|
|
3399
3638
|
{
|
|
3400
3639
|
className: "hw-widget",
|
|
@@ -3406,20 +3645,20 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3406
3645
|
"--hw-window-left": widgetPosition === "bottom-left" ? "0" : "auto"
|
|
3407
3646
|
},
|
|
3408
3647
|
children: [
|
|
3409
|
-
isOpen && !isReady && !hasBootstrapError && /* @__PURE__ */
|
|
3410
|
-
/* @__PURE__ */
|
|
3411
|
-
/* @__PURE__ */
|
|
3412
|
-
/* @__PURE__ */
|
|
3648
|
+
isOpen && !isReady && !hasBootstrapError && /* @__PURE__ */ jsx13("div", { className: `hw-window ${isClosing ? "hw-window--closing" : ""}`, children: /* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-loading", children: [
|
|
3649
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 120 } }),
|
|
3650
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 200 } }),
|
|
3651
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 160 } })
|
|
3413
3652
|
] }) }),
|
|
3414
|
-
isOpen && hasBootstrapError && /* @__PURE__ */
|
|
3415
|
-
/* @__PURE__ */
|
|
3416
|
-
/* @__PURE__ */
|
|
3653
|
+
isOpen && hasBootstrapError && /* @__PURE__ */ jsx13("div", { className: `hw-window ${isClosing ? "hw-window--closing" : ""}`, children: /* @__PURE__ */ jsxs8("div", { className: "hw-bootstrap-error", children: [
|
|
3654
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-bootstrap-error-text", children: t("widget.error_desc") }),
|
|
3655
|
+
/* @__PURE__ */ jsx13("button", { type: "button", className: "hw-bootstrap-error-retry", onClick: retryBootstrap, children: t("widget.retry") })
|
|
3417
3656
|
] }) }),
|
|
3418
|
-
isOpen && isReady && /* @__PURE__ */
|
|
3657
|
+
isOpen && isReady && /* @__PURE__ */ jsxs8(
|
|
3419
3658
|
"div",
|
|
3420
3659
|
{
|
|
3421
3660
|
ref: windowRef,
|
|
3422
|
-
className: `hw-window ${isClosing ? "hw-window--closing" : ""}`,
|
|
3661
|
+
className: `hw-window ${isClosing ? "hw-window--closing" : ""} ${subView === "content-detail" ? "hw-window--reading" : ""}`,
|
|
3423
3662
|
role: "dialog",
|
|
3424
3663
|
"aria-label": t("widget.aria_chat"),
|
|
3425
3664
|
"aria-modal": "true",
|
|
@@ -3427,24 +3666,24 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3427
3666
|
onTouchMove: handleTouchMove,
|
|
3428
3667
|
onTouchEnd: handleTouchEnd,
|
|
3429
3668
|
children: [
|
|
3430
|
-
/* @__PURE__ */
|
|
3431
|
-
wsDisconnected && /* @__PURE__ */
|
|
3432
|
-
/* @__PURE__ */
|
|
3669
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-drag-handle", children: /* @__PURE__ */ jsx13("div", { className: "hw-drag-handle-pill" }) }),
|
|
3670
|
+
wsDisconnected && /* @__PURE__ */ jsxs8("div", { className: "hw-disconnect", children: [
|
|
3671
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-disconnect-dot" }),
|
|
3433
3672
|
t("widget.reconnecting")
|
|
3434
3673
|
] }),
|
|
3435
3674
|
(subView === "content-detail" || subView === "content-category") && (() => {
|
|
3436
3675
|
const tabId = activeTab.replace("content:", "");
|
|
3437
3676
|
const contentTab = contentTabs.find((t2) => t2.id === tabId);
|
|
3438
3677
|
const headerTitle = subView === "content-category" && contentCategoryName ? contentCategoryName : contentTab?.label ? resolveLabel2(contentTab.label) : t("widget.content");
|
|
3439
|
-
return /* @__PURE__ */
|
|
3440
|
-
/* @__PURE__ */
|
|
3678
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-header hw-header--centered", children: [
|
|
3679
|
+
/* @__PURE__ */ jsx13(
|
|
3441
3680
|
"button",
|
|
3442
3681
|
{
|
|
3443
3682
|
type: "button",
|
|
3444
3683
|
className: "hw-header-back",
|
|
3445
3684
|
onClick: goBack,
|
|
3446
3685
|
"aria-label": t("widget.aria_back"),
|
|
3447
|
-
children: /* @__PURE__ */
|
|
3686
|
+
children: /* @__PURE__ */ jsx13(
|
|
3448
3687
|
"svg",
|
|
3449
3688
|
{
|
|
3450
3689
|
viewBox: "0 0 24 24",
|
|
@@ -3453,33 +3692,33 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3453
3692
|
strokeWidth: 2,
|
|
3454
3693
|
strokeLinecap: "round",
|
|
3455
3694
|
strokeLinejoin: "round",
|
|
3456
|
-
children: /* @__PURE__ */
|
|
3695
|
+
children: /* @__PURE__ */ jsx13("path", { d: "M15 18l-6-6 6-6" })
|
|
3457
3696
|
}
|
|
3458
3697
|
)
|
|
3459
3698
|
}
|
|
3460
3699
|
),
|
|
3461
|
-
/* @__PURE__ */
|
|
3462
|
-
/* @__PURE__ */
|
|
3700
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-title", children: headerTitle }),
|
|
3701
|
+
/* @__PURE__ */ jsx13(
|
|
3463
3702
|
"button",
|
|
3464
3703
|
{
|
|
3465
3704
|
type: "button",
|
|
3466
3705
|
className: "hw-header-close",
|
|
3467
3706
|
onClick: handleClose,
|
|
3468
3707
|
"aria-label": t("widget.aria_close"),
|
|
3469
|
-
children: /* @__PURE__ */
|
|
3708
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
3470
3709
|
}
|
|
3471
3710
|
)
|
|
3472
3711
|
] });
|
|
3473
3712
|
})(),
|
|
3474
|
-
subView !== null && subView !== "content-detail" && subView !== "content-category" && /* @__PURE__ */
|
|
3475
|
-
/* @__PURE__ */
|
|
3713
|
+
subView !== null && subView !== "content-detail" && subView !== "content-category" && /* @__PURE__ */ jsxs8("div", { className: "hw-header hw-header--sub", children: [
|
|
3714
|
+
/* @__PURE__ */ jsx13(
|
|
3476
3715
|
"button",
|
|
3477
3716
|
{
|
|
3478
3717
|
type: "button",
|
|
3479
3718
|
className: "hw-header-back",
|
|
3480
3719
|
onClick: goBack,
|
|
3481
3720
|
"aria-label": t("widget.aria_back"),
|
|
3482
|
-
children: /* @__PURE__ */
|
|
3721
|
+
children: /* @__PURE__ */ jsx13(
|
|
3483
3722
|
"svg",
|
|
3484
3723
|
{
|
|
3485
3724
|
viewBox: "0 0 24 24",
|
|
@@ -3488,66 +3727,66 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3488
3727
|
strokeWidth: 2,
|
|
3489
3728
|
strokeLinecap: "round",
|
|
3490
3729
|
strokeLinejoin: "round",
|
|
3491
|
-
children: /* @__PURE__ */
|
|
3730
|
+
children: /* @__PURE__ */ jsx13("path", { d: "M15 18l-6-6 6-6" })
|
|
3492
3731
|
}
|
|
3493
3732
|
)
|
|
3494
3733
|
}
|
|
3495
3734
|
),
|
|
3496
|
-
/* @__PURE__ */
|
|
3497
|
-
/* @__PURE__ */
|
|
3498
|
-
/* @__PURE__ */
|
|
3499
|
-
/* @__PURE__ */
|
|
3500
|
-
/* @__PURE__ */
|
|
3735
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-header-identity", children: [
|
|
3736
|
+
/* @__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, {}) }),
|
|
3737
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-header-info", children: [
|
|
3738
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-name", children: headerName }),
|
|
3739
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-status", children: subtitleText })
|
|
3501
3740
|
] })
|
|
3502
3741
|
] }),
|
|
3503
|
-
/* @__PURE__ */
|
|
3742
|
+
/* @__PURE__ */ jsx13(
|
|
3504
3743
|
"button",
|
|
3505
3744
|
{
|
|
3506
3745
|
type: "button",
|
|
3507
3746
|
className: "hw-header-close",
|
|
3508
3747
|
onClick: handleClose,
|
|
3509
3748
|
"aria-label": t("widget.aria_close"),
|
|
3510
|
-
children: /* @__PURE__ */
|
|
3749
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
3511
3750
|
}
|
|
3512
3751
|
)
|
|
3513
3752
|
] }),
|
|
3514
|
-
subView === null && activeTab === "home" && /* @__PURE__ */
|
|
3515
|
-
/* @__PURE__ */
|
|
3516
|
-
/* @__PURE__ */
|
|
3517
|
-
/* @__PURE__ */
|
|
3518
|
-
/* @__PURE__ */
|
|
3753
|
+
subView === null && activeTab === "home" && /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
3754
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-hero", children: [
|
|
3755
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-hero-top", children: [
|
|
3756
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-hero-bot-icon", children: /* @__PURE__ */ jsx13(WidgetLogo, {}) }),
|
|
3757
|
+
/* @__PURE__ */ jsx13(
|
|
3519
3758
|
"button",
|
|
3520
3759
|
{
|
|
3521
3760
|
type: "button",
|
|
3522
3761
|
className: "hw-hero-close",
|
|
3523
3762
|
onClick: handleClose,
|
|
3524
3763
|
"aria-label": t("widget.aria_close"),
|
|
3525
|
-
children: /* @__PURE__ */
|
|
3764
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
3526
3765
|
}
|
|
3527
3766
|
)
|
|
3528
3767
|
] }),
|
|
3529
|
-
/* @__PURE__ */
|
|
3768
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-hero-greeting", children: welcomeMessage.split("\n").map((line, i) => /* @__PURE__ */ jsxs8(
|
|
3530
3769
|
"span",
|
|
3531
3770
|
{
|
|
3532
3771
|
className: i === 0 ? "hw-hero-greeting-name" : "hw-hero-greeting-question",
|
|
3533
3772
|
children: [
|
|
3534
|
-
i > 0 && /* @__PURE__ */
|
|
3773
|
+
i > 0 && /* @__PURE__ */ jsx13("br", {}),
|
|
3535
3774
|
line
|
|
3536
3775
|
]
|
|
3537
3776
|
},
|
|
3538
3777
|
i
|
|
3539
3778
|
)) }),
|
|
3540
|
-
/* @__PURE__ */
|
|
3779
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-hero-subtitle", children: subtitleText })
|
|
3541
3780
|
] }),
|
|
3542
|
-
/* @__PURE__ */
|
|
3543
|
-
/* @__PURE__ */
|
|
3544
|
-
/* @__PURE__ */
|
|
3545
|
-
/* @__PURE__ */
|
|
3546
|
-
/* @__PURE__ */
|
|
3781
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-sheet", children: /* @__PURE__ */ jsxs8("div", { className: "hw-sheet-inner", children: [
|
|
3782
|
+
/* @__PURE__ */ jsxs8("button", { type: "button", className: "hw-card", onClick: openNewConversation, children: [
|
|
3783
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-card-body", children: [
|
|
3784
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-card-title", children: t("widget.send_us_message") }),
|
|
3785
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-card-meta", children: t("widget.reply_time") })
|
|
3547
3786
|
] }),
|
|
3548
|
-
/* @__PURE__ */
|
|
3787
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-card-arrow", children: /* @__PURE__ */ jsx13(SendIcon, {}) })
|
|
3549
3788
|
] }),
|
|
3550
|
-
/* @__PURE__ */
|
|
3789
|
+
/* @__PURE__ */ jsx13(
|
|
3551
3790
|
HomeView,
|
|
3552
3791
|
{
|
|
3553
3792
|
conversations,
|
|
@@ -3557,17 +3796,17 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3557
3796
|
)
|
|
3558
3797
|
] }) })
|
|
3559
3798
|
] }),
|
|
3560
|
-
subView === null && activeTab === "messages" && /* @__PURE__ */
|
|
3561
|
-
/* @__PURE__ */
|
|
3562
|
-
/* @__PURE__ */
|
|
3563
|
-
/* @__PURE__ */
|
|
3799
|
+
subView === null && activeTab === "messages" && /* @__PURE__ */ jsxs8("div", { className: "hw-header hw-header--centered", children: [
|
|
3800
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-spacer" }),
|
|
3801
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-title", children: t("widget.messages") }),
|
|
3802
|
+
/* @__PURE__ */ jsx13(
|
|
3564
3803
|
"button",
|
|
3565
3804
|
{
|
|
3566
3805
|
type: "button",
|
|
3567
3806
|
className: "hw-header-close",
|
|
3568
3807
|
onClick: handleClose,
|
|
3569
3808
|
"aria-label": t("widget.aria_close"),
|
|
3570
|
-
children: /* @__PURE__ */
|
|
3809
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
3571
3810
|
}
|
|
3572
3811
|
)
|
|
3573
3812
|
] }),
|
|
@@ -3575,23 +3814,23 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3575
3814
|
const tabId = activeTab.replace("content:", "");
|
|
3576
3815
|
const contentTab = contentTabs.find((t2) => t2.id === tabId);
|
|
3577
3816
|
if (!contentTab) return null;
|
|
3578
|
-
return /* @__PURE__ */
|
|
3579
|
-
/* @__PURE__ */
|
|
3580
|
-
/* @__PURE__ */
|
|
3581
|
-
/* @__PURE__ */
|
|
3817
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-header hw-header--centered", children: [
|
|
3818
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-spacer" }),
|
|
3819
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-title", children: resolveLabel2(contentTab.label) }),
|
|
3820
|
+
/* @__PURE__ */ jsx13(
|
|
3582
3821
|
"button",
|
|
3583
3822
|
{
|
|
3584
3823
|
type: "button",
|
|
3585
3824
|
className: "hw-header-close",
|
|
3586
3825
|
onClick: handleClose,
|
|
3587
3826
|
"aria-label": t("widget.aria_close"),
|
|
3588
|
-
children: /* @__PURE__ */
|
|
3827
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
3589
3828
|
}
|
|
3590
3829
|
)
|
|
3591
3830
|
] });
|
|
3592
3831
|
})(),
|
|
3593
|
-
(subView !== null || activeTab !== "home") && /* @__PURE__ */
|
|
3594
|
-
subView === null && activeTab === "messages" && /* @__PURE__ */
|
|
3832
|
+
(subView !== null || activeTab !== "home") && /* @__PURE__ */ jsxs8("div", { className: "hw-content", children: [
|
|
3833
|
+
subView === null && activeTab === "messages" && /* @__PURE__ */ jsx13(
|
|
3595
3834
|
MessagesView,
|
|
3596
3835
|
{
|
|
3597
3836
|
conversations,
|
|
@@ -3599,7 +3838,7 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3599
3838
|
onNewClick: openNewConversation
|
|
3600
3839
|
}
|
|
3601
3840
|
),
|
|
3602
|
-
subView === "new" && /* @__PURE__ */
|
|
3841
|
+
subView === "new" && /* @__PURE__ */ jsx13(
|
|
3603
3842
|
NewConversationView,
|
|
3604
3843
|
{
|
|
3605
3844
|
text: newText,
|
|
@@ -3609,12 +3848,12 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3609
3848
|
welcomeMessage
|
|
3610
3849
|
}
|
|
3611
3850
|
),
|
|
3612
|
-
subView === "conversation" && activeId && /* @__PURE__ */
|
|
3851
|
+
subView === "conversation" && activeId && /* @__PURE__ */ jsx13(ConversationView, { conversationId: activeId }),
|
|
3613
3852
|
activeTab.startsWith("content:") && (() => {
|
|
3614
3853
|
const tabId = activeTab.replace("content:", "");
|
|
3615
3854
|
const contentTab = contentTabs.find((t2) => t2.id === tabId);
|
|
3616
3855
|
if (!contentTab) return null;
|
|
3617
|
-
return /* @__PURE__ */
|
|
3856
|
+
return /* @__PURE__ */ jsx13(
|
|
3618
3857
|
ContentTabView,
|
|
3619
3858
|
{
|
|
3620
3859
|
tab: contentTab,
|
|
@@ -3633,7 +3872,7 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3633
3872
|
);
|
|
3634
3873
|
})()
|
|
3635
3874
|
] }),
|
|
3636
|
-
showTabBar && /* @__PURE__ */
|
|
3875
|
+
showTabBar && /* @__PURE__ */ jsx13(
|
|
3637
3876
|
TabBar,
|
|
3638
3877
|
{
|
|
3639
3878
|
activeTab,
|
|
@@ -3643,17 +3882,17 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3643
3882
|
showMessagesTab: agentConfig?.showMessagesTab ?? true
|
|
3644
3883
|
}
|
|
3645
3884
|
),
|
|
3646
|
-
/* @__PURE__ */
|
|
3885
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-powered", children: [
|
|
3647
3886
|
t("widget.powered_by"),
|
|
3648
3887
|
" ",
|
|
3649
|
-
/* @__PURE__ */
|
|
3888
|
+
/* @__PURE__ */ jsx13("a", { href: "https://helpway.ai", target: "_blank", rel: "noopener noreferrer", children: "Helpway" })
|
|
3650
3889
|
] })
|
|
3651
3890
|
]
|
|
3652
3891
|
}
|
|
3653
3892
|
),
|
|
3654
|
-
!isOpen && /* @__PURE__ */
|
|
3655
|
-
/* @__PURE__ */
|
|
3656
|
-
/* @__PURE__ */
|
|
3893
|
+
!isOpen && /* @__PURE__ */ jsx13(MessagePreview, { onOpen: handleBubbleClick }),
|
|
3894
|
+
/* @__PURE__ */ jsx13(WidgetDebugOverlay, {}),
|
|
3895
|
+
/* @__PURE__ */ jsxs8(
|
|
3657
3896
|
"button",
|
|
3658
3897
|
{
|
|
3659
3898
|
ref: bubbleRef,
|
|
@@ -3670,22 +3909,22 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3670
3909
|
"aria-expanded": isOpen,
|
|
3671
3910
|
"aria-haspopup": "dialog",
|
|
3672
3911
|
children: [
|
|
3673
|
-
/* @__PURE__ */
|
|
3912
|
+
/* @__PURE__ */ jsx13(
|
|
3674
3913
|
"span",
|
|
3675
3914
|
{
|
|
3676
3915
|
className: `hw-bubble-icon hw-bubble-icon--bot ${isOpen ? "hw-bubble-icon--hidden" : ""}`,
|
|
3677
|
-
children: /* @__PURE__ */
|
|
3916
|
+
children: /* @__PURE__ */ jsx13(WidgetLogo, {})
|
|
3678
3917
|
}
|
|
3679
3918
|
),
|
|
3680
|
-
/* @__PURE__ */
|
|
3919
|
+
/* @__PURE__ */ jsx13(
|
|
3681
3920
|
"span",
|
|
3682
3921
|
{
|
|
3683
3922
|
className: `hw-bubble-icon hw-bubble-icon--close ${!isOpen ? "hw-bubble-icon--hidden" : ""}`,
|
|
3684
|
-
children: /* @__PURE__ */
|
|
3923
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 24 })
|
|
3685
3924
|
}
|
|
3686
3925
|
),
|
|
3687
|
-
launcherStyle !== "icon" && !isOpen && /* @__PURE__ */
|
|
3688
|
-
!isOpen && totalUnread > 0 && /* @__PURE__ */
|
|
3926
|
+
launcherStyle !== "icon" && !isOpen && /* @__PURE__ */ jsx13("span", { className: "hw-bubble-label", children: launcherStyle === "help" ? t("widget.help") : companyName }),
|
|
3927
|
+
!isOpen && totalUnread > 0 && /* @__PURE__ */ jsx13("div", { className: "hw-bubble-badge", children: totalUnread })
|
|
3689
3928
|
]
|
|
3690
3929
|
}
|
|
3691
3930
|
)
|
|
@@ -3700,8 +3939,8 @@ function TabBar({
|
|
|
3700
3939
|
contentTabs,
|
|
3701
3940
|
showMessagesTab = true
|
|
3702
3941
|
}) {
|
|
3703
|
-
return /* @__PURE__ */
|
|
3704
|
-
/* @__PURE__ */
|
|
3942
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-tabs", role: "tablist", children: [
|
|
3943
|
+
/* @__PURE__ */ jsxs8(
|
|
3705
3944
|
"button",
|
|
3706
3945
|
{
|
|
3707
3946
|
type: "button",
|
|
@@ -3710,12 +3949,12 @@ function TabBar({
|
|
|
3710
3949
|
role: "tab",
|
|
3711
3950
|
"aria-selected": activeTab === "home",
|
|
3712
3951
|
children: [
|
|
3713
|
-
/* @__PURE__ */
|
|
3714
|
-
/* @__PURE__ */
|
|
3952
|
+
/* @__PURE__ */ jsx13(HomeIcon, {}),
|
|
3953
|
+
/* @__PURE__ */ jsx13("span", { children: t("widget.home") })
|
|
3715
3954
|
]
|
|
3716
3955
|
}
|
|
3717
3956
|
),
|
|
3718
|
-
showMessagesTab && /* @__PURE__ */
|
|
3957
|
+
showMessagesTab && /* @__PURE__ */ jsxs8(
|
|
3719
3958
|
"button",
|
|
3720
3959
|
{
|
|
3721
3960
|
type: "button",
|
|
@@ -3724,15 +3963,15 @@ function TabBar({
|
|
|
3724
3963
|
role: "tab",
|
|
3725
3964
|
"aria-selected": activeTab === "messages",
|
|
3726
3965
|
children: [
|
|
3727
|
-
/* @__PURE__ */
|
|
3728
|
-
/* @__PURE__ */
|
|
3729
|
-
unreadCount > 0 && /* @__PURE__ */
|
|
3966
|
+
/* @__PURE__ */ jsxs8("span", { className: "hw-tabs-icon-wrap", children: [
|
|
3967
|
+
/* @__PURE__ */ jsx13(MessagesIcon, {}),
|
|
3968
|
+
unreadCount > 0 && /* @__PURE__ */ jsx13("span", { className: "hw-tabs-badge", children: unreadCount > 99 ? "99+" : unreadCount })
|
|
3730
3969
|
] }),
|
|
3731
|
-
/* @__PURE__ */
|
|
3970
|
+
/* @__PURE__ */ jsx13("span", { children: t("widget.messages") })
|
|
3732
3971
|
]
|
|
3733
3972
|
}
|
|
3734
3973
|
),
|
|
3735
|
-
contentTabs.map((tab) => /* @__PURE__ */
|
|
3974
|
+
contentTabs.map((tab) => /* @__PURE__ */ jsxs8(
|
|
3736
3975
|
"button",
|
|
3737
3976
|
{
|
|
3738
3977
|
type: "button",
|
|
@@ -3741,8 +3980,8 @@ function TabBar({
|
|
|
3741
3980
|
role: "tab",
|
|
3742
3981
|
"aria-selected": activeTab === `content:${tab.id}`,
|
|
3743
3982
|
children: [
|
|
3744
|
-
/* @__PURE__ */
|
|
3745
|
-
/* @__PURE__ */
|
|
3983
|
+
/* @__PURE__ */ jsx13(ContentTabIconComponent, { icon: tab.icon }),
|
|
3984
|
+
/* @__PURE__ */ jsx13("span", { children: resolveLabel2(tab.label) })
|
|
3746
3985
|
]
|
|
3747
3986
|
},
|
|
3748
3987
|
tab.id
|
|
@@ -3756,9 +3995,9 @@ function HomeView({
|
|
|
3756
3995
|
}) {
|
|
3757
3996
|
const recent = conversations.slice(0, 3);
|
|
3758
3997
|
if (recent.length === 0) return null;
|
|
3759
|
-
return /* @__PURE__ */
|
|
3760
|
-
/* @__PURE__ */
|
|
3761
|
-
recent.map((conv, i) => /* @__PURE__ */
|
|
3998
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-recent-card", children: [
|
|
3999
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-recent-header", children: t("widget.recent_conversations") }),
|
|
4000
|
+
recent.map((conv, i) => /* @__PURE__ */ jsx13(
|
|
3762
4001
|
ConversationRow,
|
|
3763
4002
|
{
|
|
3764
4003
|
conversation: conv,
|
|
@@ -3767,7 +4006,7 @@ function HomeView({
|
|
|
3767
4006
|
},
|
|
3768
4007
|
conv.id
|
|
3769
4008
|
)),
|
|
3770
|
-
conversations.length > 3 && /* @__PURE__ */
|
|
4009
|
+
conversations.length > 3 && /* @__PURE__ */ jsx13("button", { type: "button", className: "hw-recent-see-all", onClick: onMessagesClick, children: t("widget.see_all") })
|
|
3771
4010
|
] });
|
|
3772
4011
|
}
|
|
3773
4012
|
function MessagesView({
|
|
@@ -3776,28 +4015,28 @@ function MessagesView({
|
|
|
3776
4015
|
onNewClick
|
|
3777
4016
|
}) {
|
|
3778
4017
|
if (conversations.length === 0) {
|
|
3779
|
-
return /* @__PURE__ */
|
|
3780
|
-
/* @__PURE__ */
|
|
3781
|
-
/* @__PURE__ */
|
|
3782
|
-
/* @__PURE__ */
|
|
3783
|
-
/* @__PURE__ */
|
|
4018
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-empty-state", children: [
|
|
4019
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-empty-icon-wrap", children: /* @__PURE__ */ jsx13(MessagesIcon, {}) }),
|
|
4020
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-empty-title", children: t("widget.no_messages") }),
|
|
4021
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-empty-desc", children: t("widget.no_messages_desc") }),
|
|
4022
|
+
/* @__PURE__ */ jsx13("button", { type: "button", className: "hw-empty-btn", onClick: onNewClick, children: t("widget.start_conversation") })
|
|
3784
4023
|
] });
|
|
3785
4024
|
}
|
|
3786
|
-
return /* @__PURE__ */
|
|
4025
|
+
return /* @__PURE__ */ jsx13("div", { className: "hw-msgs-tab", children: conversations.map((conv) => /* @__PURE__ */ jsx13(ConversationCard, { conversation: conv, onSelect }, conv.id)) });
|
|
3787
4026
|
}
|
|
3788
4027
|
function ConvCardBody({ conv }) {
|
|
3789
4028
|
const agentName = useWidgetStore((s) => s.agentConfig?.name) ?? "Support";
|
|
3790
4029
|
const isTeam = conv.lastMessageSenderType === "team" && conv.lastMessageSenderName;
|
|
3791
4030
|
const displayName = isTeam ? conv.lastMessageSenderName : agentName;
|
|
3792
4031
|
const preview = conv.lastMessageText ?? t("widget.no_preview");
|
|
3793
|
-
return /* @__PURE__ */
|
|
3794
|
-
/* @__PURE__ */
|
|
3795
|
-
/* @__PURE__ */
|
|
3796
|
-
/* @__PURE__ */
|
|
3797
|
-
/* @__PURE__ */
|
|
3798
|
-
conv.lastMessageAt && /* @__PURE__ */
|
|
4032
|
+
return /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
4033
|
+
/* @__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, {}) }),
|
|
4034
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-conv-card-content", children: [
|
|
4035
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-conv-card-top", children: [
|
|
4036
|
+
/* @__PURE__ */ jsx13("span", { className: "hw-conv-card-name", children: displayName }),
|
|
4037
|
+
conv.lastMessageAt && /* @__PURE__ */ jsx13("span", { className: "hw-conv-card-time", children: formatRelativeTime(conv.lastMessageAt) })
|
|
3799
4038
|
] }),
|
|
3800
|
-
/* @__PURE__ */
|
|
4039
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-conv-card-preview", children: preview })
|
|
3801
4040
|
] })
|
|
3802
4041
|
] });
|
|
3803
4042
|
}
|
|
@@ -3806,15 +4045,15 @@ function ConversationCard({
|
|
|
3806
4045
|
onSelect
|
|
3807
4046
|
}) {
|
|
3808
4047
|
const hasUnread = conv.unreadCount > 0;
|
|
3809
|
-
return /* @__PURE__ */
|
|
4048
|
+
return /* @__PURE__ */ jsxs8(
|
|
3810
4049
|
"button",
|
|
3811
4050
|
{
|
|
3812
4051
|
type: "button",
|
|
3813
4052
|
className: `hw-conv-card ${hasUnread ? "hw-conv-card--unread" : ""}`,
|
|
3814
4053
|
onClick: () => onSelect(conv.id),
|
|
3815
4054
|
children: [
|
|
3816
|
-
/* @__PURE__ */
|
|
3817
|
-
hasUnread && /* @__PURE__ */
|
|
4055
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-conv-card-row", children: /* @__PURE__ */ jsx13(ConvCardBody, { conv }) }),
|
|
4056
|
+
hasUnread && /* @__PURE__ */ jsx13("div", { className: "hw-conv-card-badge", children: conv.unreadCount })
|
|
3818
4057
|
]
|
|
3819
4058
|
}
|
|
3820
4059
|
);
|
|
@@ -3825,20 +4064,20 @@ function ConversationRow({
|
|
|
3825
4064
|
isLast
|
|
3826
4065
|
}) {
|
|
3827
4066
|
const hasUnread = conv.unreadCount > 0;
|
|
3828
|
-
return /* @__PURE__ */
|
|
4067
|
+
return /* @__PURE__ */ jsxs8(
|
|
3829
4068
|
"button",
|
|
3830
4069
|
{
|
|
3831
4070
|
type: "button",
|
|
3832
4071
|
className: `hw-recent-row ${hasUnread ? "hw-recent-row--unread" : ""} ${isLast ? "hw-recent-row--last" : ""}`,
|
|
3833
4072
|
onClick: () => onSelect(conv.id),
|
|
3834
4073
|
children: [
|
|
3835
|
-
/* @__PURE__ */
|
|
3836
|
-
hasUnread && /* @__PURE__ */
|
|
4074
|
+
/* @__PURE__ */ jsx13(ConvCardBody, { conv }),
|
|
4075
|
+
hasUnread && /* @__PURE__ */ jsx13("div", { className: "hw-recent-row-badge", children: conv.unreadCount })
|
|
3837
4076
|
]
|
|
3838
4077
|
}
|
|
3839
4078
|
);
|
|
3840
4079
|
}
|
|
3841
|
-
function InlineEmailPrompt() {
|
|
4080
|
+
function InlineEmailPrompt({ conversationId }) {
|
|
3842
4081
|
const { client, store } = useWidgetContext();
|
|
3843
4082
|
const updateContact = useWidgetStore((s) => s.updateVisitorContact);
|
|
3844
4083
|
const [email, setEmail] = useState12("");
|
|
@@ -3862,7 +4101,10 @@ function InlineEmailPrompt() {
|
|
|
3862
4101
|
setIsSuccess(true);
|
|
3863
4102
|
setIsSubmitting(true);
|
|
3864
4103
|
try {
|
|
3865
|
-
const result = await client.widget.collectEmail.mutate({
|
|
4104
|
+
const result = await client.widget.collectEmail.mutate({
|
|
4105
|
+
email: trimmed,
|
|
4106
|
+
...conversationId ? { conversationId } : {}
|
|
4107
|
+
});
|
|
3866
4108
|
if (result.contact) {
|
|
3867
4109
|
updateContact({
|
|
3868
4110
|
id: result.contact.id,
|
|
@@ -3882,23 +4124,23 @@ function InlineEmailPrompt() {
|
|
|
3882
4124
|
}
|
|
3883
4125
|
};
|
|
3884
4126
|
if (isSuccess) {
|
|
3885
|
-
return /* @__PURE__ */
|
|
3886
|
-
/* @__PURE__ */
|
|
4127
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-email-card hw-email-card--success", children: [
|
|
4128
|
+
/* @__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" }) }),
|
|
3887
4129
|
t("widget.email_saved")
|
|
3888
4130
|
] });
|
|
3889
4131
|
}
|
|
3890
|
-
return /* @__PURE__ */
|
|
3891
|
-
/* @__PURE__ */
|
|
3892
|
-
/* @__PURE__ */
|
|
3893
|
-
/* @__PURE__ */
|
|
3894
|
-
/* @__PURE__ */
|
|
4132
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-email-card", children: [
|
|
4133
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-email-card-header", children: [
|
|
4134
|
+
/* @__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: [
|
|
4135
|
+
/* @__PURE__ */ jsx13("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }),
|
|
4136
|
+
/* @__PURE__ */ jsx13("path", { d: "M22 7l-10 7L2 7" })
|
|
3895
4137
|
] }) }),
|
|
3896
|
-
/* @__PURE__ */
|
|
3897
|
-
/* @__PURE__ */
|
|
3898
|
-
/* @__PURE__ */
|
|
4138
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
4139
|
+
/* @__PURE__ */ jsx13("p", { className: "hw-email-card-title", children: t("widget.email_title") }),
|
|
4140
|
+
/* @__PURE__ */ jsx13("p", { className: "hw-email-card-subtitle", children: t("widget.email_subtitle") })
|
|
3899
4141
|
] })
|
|
3900
4142
|
] }),
|
|
3901
|
-
/* @__PURE__ */
|
|
4143
|
+
/* @__PURE__ */ jsx13(
|
|
3902
4144
|
"input",
|
|
3903
4145
|
{
|
|
3904
4146
|
type: "email",
|
|
@@ -3914,14 +4156,14 @@ function InlineEmailPrompt() {
|
|
|
3914
4156
|
placeholder: t("widget.email_placeholder")
|
|
3915
4157
|
}
|
|
3916
4158
|
),
|
|
3917
|
-
/* @__PURE__ */
|
|
4159
|
+
/* @__PURE__ */ jsx13(
|
|
3918
4160
|
"button",
|
|
3919
4161
|
{
|
|
3920
4162
|
type: "button",
|
|
3921
4163
|
className: "hw-email-card-submit",
|
|
3922
4164
|
onClick: handleSubmit,
|
|
3923
4165
|
disabled: isSubmitting || !email.trim(),
|
|
3924
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
4166
|
+
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")
|
|
3925
4167
|
}
|
|
3926
4168
|
)
|
|
3927
4169
|
] });
|
|
@@ -3933,18 +4175,16 @@ function NewConversationView({
|
|
|
3933
4175
|
isSubmitting,
|
|
3934
4176
|
welcomeMessage
|
|
3935
4177
|
}) {
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
/* @__PURE__ */ jsx12("div", { className: "hw-new-welcome", children: /* @__PURE__ */ jsx12(
|
|
4178
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-new", children: [
|
|
4179
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-new-welcome", children: /* @__PURE__ */ jsx13(
|
|
3939
4180
|
MessageBubble,
|
|
3940
4181
|
{
|
|
3941
4182
|
text: welcomeMessage,
|
|
3942
4183
|
sender: "ai",
|
|
3943
|
-
time: welcomeTime,
|
|
3944
4184
|
parts: null
|
|
3945
4185
|
}
|
|
3946
4186
|
) }),
|
|
3947
|
-
/* @__PURE__ */
|
|
4187
|
+
/* @__PURE__ */ jsx13(
|
|
3948
4188
|
Composer,
|
|
3949
4189
|
{
|
|
3950
4190
|
text,
|
|
@@ -3967,7 +4207,8 @@ function ConversationView({ conversationId }) {
|
|
|
3967
4207
|
addFiles,
|
|
3968
4208
|
removeAttachment,
|
|
3969
4209
|
sendError,
|
|
3970
|
-
clearSendError
|
|
4210
|
+
clearSendError,
|
|
4211
|
+
emailGateConvId
|
|
3971
4212
|
} = useComposer(conversationId);
|
|
3972
4213
|
const { isTyping, isAiProcessing, setTyping } = usePresence(conversationId);
|
|
3973
4214
|
const agentConfig = useWidgetStore((s) => s.agentConfig);
|
|
@@ -3982,29 +4223,30 @@ function ConversationView({ conversationId }) {
|
|
|
3982
4223
|
const hasAiReply = items.some(
|
|
3983
4224
|
(it) => it.type === "message" && Boolean(it.aiAgentId)
|
|
3984
4225
|
);
|
|
3985
|
-
const
|
|
4226
|
+
const needsEmailPostReply = !!agentConfig?.requireVisitorEmail && !visitorContact?.email && hasVisitorMessage && hasAiReply;
|
|
4227
|
+
const needsEmail = needsEmailPostReply || !!emailGateConvId;
|
|
3986
4228
|
if (isLoading && items.length === 0) {
|
|
3987
|
-
return /* @__PURE__ */
|
|
3988
|
-
/* @__PURE__ */
|
|
3989
|
-
/* @__PURE__ */
|
|
3990
|
-
/* @__PURE__ */
|
|
3991
|
-
/* @__PURE__ */
|
|
3992
|
-
/* @__PURE__ */
|
|
4229
|
+
return /* @__PURE__ */ jsx13("div", { className: "hw-messages", children: /* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-messages", children: [
|
|
4230
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-msg", children: [
|
|
4231
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-avatar" }),
|
|
4232
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-bubble", children: [
|
|
4233
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 140 } }),
|
|
4234
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 200 } })
|
|
3993
4235
|
] })
|
|
3994
4236
|
] }),
|
|
3995
|
-
/* @__PURE__ */
|
|
3996
|
-
/* @__PURE__ */
|
|
3997
|
-
/* @__PURE__ */
|
|
3998
|
-
/* @__PURE__ */
|
|
3999
|
-
/* @__PURE__ */
|
|
4000
|
-
/* @__PURE__ */
|
|
4001
|
-
/* @__PURE__ */
|
|
4237
|
+
/* @__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 } }) }) }),
|
|
4238
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-msg", children: [
|
|
4239
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-avatar" }),
|
|
4240
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-bubble", children: [
|
|
4241
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 180 } }),
|
|
4242
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 120 } }),
|
|
4243
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 80 } })
|
|
4002
4244
|
] })
|
|
4003
4245
|
] })
|
|
4004
4246
|
] }) });
|
|
4005
4247
|
}
|
|
4006
|
-
return /* @__PURE__ */
|
|
4007
|
-
/* @__PURE__ */
|
|
4248
|
+
return /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
4249
|
+
/* @__PURE__ */ jsx13(
|
|
4008
4250
|
MessageList,
|
|
4009
4251
|
{
|
|
4010
4252
|
items,
|
|
@@ -4015,11 +4257,11 @@ function ConversationView({ conversationId }) {
|
|
|
4015
4257
|
onLoadMore: loadMore
|
|
4016
4258
|
}
|
|
4017
4259
|
),
|
|
4018
|
-
isResolved ? /* @__PURE__ */
|
|
4019
|
-
needsEmail && /* @__PURE__ */
|
|
4020
|
-
sendError && /* @__PURE__ */
|
|
4260
|
+
isResolved ? /* @__PURE__ */ jsx13(ResolvedBanner, { conversationId }) : /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
4261
|
+
needsEmail && /* @__PURE__ */ jsx13(InlineEmailPrompt, { conversationId: emailGateConvId ?? void 0 }),
|
|
4262
|
+
sendError && /* @__PURE__ */ jsxs8("div", { className: "hw-send-error", children: [
|
|
4021
4263
|
sendError,
|
|
4022
|
-
/* @__PURE__ */
|
|
4264
|
+
/* @__PURE__ */ jsx13(
|
|
4023
4265
|
"button",
|
|
4024
4266
|
{
|
|
4025
4267
|
type: "button",
|
|
@@ -4032,7 +4274,7 @@ function ConversationView({ conversationId }) {
|
|
|
4032
4274
|
}
|
|
4033
4275
|
)
|
|
4034
4276
|
] }),
|
|
4035
|
-
/* @__PURE__ */
|
|
4277
|
+
/* @__PURE__ */ jsx13(
|
|
4036
4278
|
Composer,
|
|
4037
4279
|
{
|
|
4038
4280
|
text,
|
|
@@ -4066,12 +4308,12 @@ function ResolvedBanner({ conversationId }) {
|
|
|
4066
4308
|
client.widget.sendCsat.mutate({ conversationId, rating }).catch(() => {
|
|
4067
4309
|
});
|
|
4068
4310
|
};
|
|
4069
|
-
return /* @__PURE__ */
|
|
4070
|
-
/* @__PURE__ */
|
|
4071
|
-
!csatSubmitted ? /* @__PURE__ */
|
|
4072
|
-
/* @__PURE__ */
|
|
4073
|
-
/* @__PURE__ */
|
|
4074
|
-
/* @__PURE__ */
|
|
4311
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-resolved", children: [
|
|
4312
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-resolved-text", children: t("widget.resolved_text") }),
|
|
4313
|
+
!csatSubmitted ? /* @__PURE__ */ jsxs8("div", { className: "hw-csat", children: [
|
|
4314
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-csat-label", children: t("widget.csat_label") }),
|
|
4315
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-csat-buttons", children: [
|
|
4316
|
+
/* @__PURE__ */ jsx13(
|
|
4075
4317
|
"button",
|
|
4076
4318
|
{
|
|
4077
4319
|
type: "button",
|
|
@@ -4081,7 +4323,7 @@ function ResolvedBanner({ conversationId }) {
|
|
|
4081
4323
|
children: "\u{1F44D}"
|
|
4082
4324
|
}
|
|
4083
4325
|
),
|
|
4084
|
-
/* @__PURE__ */
|
|
4326
|
+
/* @__PURE__ */ jsx13(
|
|
4085
4327
|
"button",
|
|
4086
4328
|
{
|
|
4087
4329
|
type: "button",
|
|
@@ -4092,8 +4334,8 @@ function ResolvedBanner({ conversationId }) {
|
|
|
4092
4334
|
}
|
|
4093
4335
|
)
|
|
4094
4336
|
] })
|
|
4095
|
-
] }) : /* @__PURE__ */
|
|
4096
|
-
/* @__PURE__ */
|
|
4337
|
+
] }) : /* @__PURE__ */ jsx13("div", { className: "hw-csat-thanks", children: t("widget.csat_thanks") }),
|
|
4338
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-resolved-actions", children: /* @__PURE__ */ jsx13("button", { type: "button", className: "hw-resolved-reopen", onClick: handleReopen, children: t("widget.send_followup") }) })
|
|
4097
4339
|
] });
|
|
4098
4340
|
}
|
|
4099
4341
|
function MessagePreview({ onOpen }) {
|
|
@@ -4122,7 +4364,7 @@ function MessagePreview({ onOpen }) {
|
|
|
4122
4364
|
dismissPreview();
|
|
4123
4365
|
onOpen();
|
|
4124
4366
|
};
|
|
4125
|
-
return /* @__PURE__ */
|
|
4367
|
+
return /* @__PURE__ */ jsxs8(
|
|
4126
4368
|
"div",
|
|
4127
4369
|
{
|
|
4128
4370
|
className: `hw-preview ${closing ? "hw-preview--closing" : ""}`,
|
|
@@ -4130,21 +4372,21 @@ function MessagePreview({ onOpen }) {
|
|
|
4130
4372
|
role: "button",
|
|
4131
4373
|
tabIndex: 0,
|
|
4132
4374
|
children: [
|
|
4133
|
-
/* @__PURE__ */
|
|
4134
|
-
/* @__PURE__ */
|
|
4135
|
-
/* @__PURE__ */
|
|
4136
|
-
/* @__PURE__ */
|
|
4375
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-preview-header", children: [
|
|
4376
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-preview-avatar", children: /* @__PURE__ */ jsx13(WidgetLogo, {}) }),
|
|
4377
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-preview-name", children: agentName }),
|
|
4378
|
+
/* @__PURE__ */ jsx13(
|
|
4137
4379
|
"button",
|
|
4138
4380
|
{
|
|
4139
4381
|
type: "button",
|
|
4140
4382
|
className: "hw-preview-close",
|
|
4141
4383
|
onClick: handleClose,
|
|
4142
4384
|
"aria-label": t("widget.aria_dismiss"),
|
|
4143
|
-
children: /* @__PURE__ */
|
|
4385
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
4144
4386
|
}
|
|
4145
4387
|
)
|
|
4146
4388
|
] }),
|
|
4147
|
-
/* @__PURE__ */
|
|
4389
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-preview-body", children: preview.text })
|
|
4148
4390
|
]
|
|
4149
4391
|
}
|
|
4150
4392
|
);
|
|
@@ -4173,10 +4415,10 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
4173
4415
|
}
|
|
4174
4416
|
|
|
4175
4417
|
// src/themed/styles.css
|
|
4176
|
-
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-bot-icon--team {\n background: var(--hw-brand, #0a0a0a);\n color: #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: #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-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: 1;\n font-variant-numeric: tabular-nums;\n min-height: 20px;\n}\n.hw-msg-time {\n opacity: 0.72;\n}\n.hw-msg-hover-meta {\n max-width: 0;\n opacity: 0;\n overflow: hidden;\n white-space: nowrap;\n transition: max-width 180ms ease, opacity 140ms ease;\n}\n.hw-msg:hover .hw-msg-hover-meta,\n.hw-msg:focus-within .hw-msg-hover-meta {\n max-width: 180px;\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 .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: 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 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 }\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}\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 }\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');
|
|
4418
|
+
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');
|
|
4177
4419
|
|
|
4178
4420
|
// src/helpway-widget.tsx
|
|
4179
|
-
import { jsx as
|
|
4421
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
4180
4422
|
function HelpwayWidget({
|
|
4181
4423
|
apiKey,
|
|
4182
4424
|
apiUrl,
|
|
@@ -4187,7 +4429,7 @@ function HelpwayWidget({
|
|
|
4187
4429
|
src
|
|
4188
4430
|
}) {
|
|
4189
4431
|
const resolvedApiUrl = apiUrl ?? (src ? src.replace(/\/widget\.js$/, "") : void 0);
|
|
4190
|
-
return /* @__PURE__ */
|
|
4432
|
+
return /* @__PURE__ */ jsx14(
|
|
4191
4433
|
SupportProvider,
|
|
4192
4434
|
{
|
|
4193
4435
|
apiKey,
|
|
@@ -4195,7 +4437,7 @@ function HelpwayWidget({
|
|
|
4195
4437
|
locale,
|
|
4196
4438
|
initialConversationId,
|
|
4197
4439
|
onReady,
|
|
4198
|
-
children: /* @__PURE__ */
|
|
4440
|
+
children: /* @__PURE__ */ jsx14(DefaultWidget, {})
|
|
4199
4441
|
}
|
|
4200
4442
|
);
|
|
4201
4443
|
}
|