@alan-ai/alan-sdk-web 1.8.52 → 1.8.54
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/alan_lib.js +1421 -1105
- package/dist/alan_lib.min.js +1 -1
- package/package.json +1 -1
package/dist/alan_lib.js
CHANGED
|
@@ -3229,13 +3229,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
3229
3229
|
var parseInline = marked.parseInline;
|
|
3230
3230
|
var parser = Parser.parse;
|
|
3231
3231
|
var lexer = Lexer.lex;
|
|
3232
|
-
// alan_btn/src/getTextAreaFontSize.ts
|
|
3233
|
-
function getTextAreaFontSize(mobile, value) {
|
|
3234
|
-
if (mobile) {
|
|
3235
|
-
return Math.max(16, value);
|
|
3236
|
-
}
|
|
3237
|
-
return value;
|
|
3238
|
-
}
|
|
3239
3232
|
// alan_btn/src/getMsgReadProp.ts
|
|
3240
3233
|
function getMsgReadProp(msg, textChatIsHidden) {
|
|
3241
3234
|
return {
|
|
@@ -3338,6 +3331,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
3338
3331
|
}
|
|
3339
3332
|
// alan_btn/src/replaceAttrInPopupHtml.ts
|
|
3340
3333
|
function replaceAttrInPopupHtml(html) {
|
|
3334
|
+
if (html === void 0) { html = ""; }
|
|
3341
3335
|
return html.replace(/send-text/gi, "data-alan-btn-send-text").replace(/call-project-api/gi, "data-alan-btn-call-project-api").replace(/project-api-param/gi, "data-alan-btn-project-api-param");
|
|
3342
3336
|
}
|
|
3343
3337
|
// alan_btn/src/processClickByButtonInPopup.ts
|
|
@@ -3367,61 +3361,1256 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
3367
3361
|
}
|
|
3368
3362
|
}
|
|
3369
3363
|
}
|
|
3370
|
-
// alan_btn/
|
|
3371
|
-
|
|
3372
|
-
var
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3364
|
+
// alan_btn/src/helpers/mini/copyTextToBuffer.ts
|
|
3365
|
+
function copyTextToBuffer(text) {
|
|
3366
|
+
var el = document.createElement("textarea");
|
|
3367
|
+
el.value = text;
|
|
3368
|
+
document.body.appendChild(el);
|
|
3369
|
+
el.select();
|
|
3370
|
+
document.execCommand("copy");
|
|
3371
|
+
document.body.removeChild(el);
|
|
3372
|
+
}
|
|
3373
|
+
// alan_btn/src/helpers/documentHelpers.ts
|
|
3374
|
+
function createDiv(options2) {
|
|
3375
|
+
if (options2 === void 0) { options2 = {}; }
|
|
3376
|
+
var div = document.createElement("div");
|
|
3377
|
+
if (options2.id) {
|
|
3378
|
+
div.id = options2.id;
|
|
3376
3379
|
}
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
var deviceId;
|
|
3380
|
-
var firstClick = null;
|
|
3381
|
-
var btnInstance;
|
|
3382
|
-
var isLocalStorageAvailable = false;
|
|
3383
|
-
try {
|
|
3384
|
-
localStorage.getItem("test");
|
|
3385
|
-
isLocalStorageAvailable = true;
|
|
3380
|
+
if (options2["class"]) {
|
|
3381
|
+
div.classList.add(options2["class"]);
|
|
3386
3382
|
}
|
|
3387
|
-
|
|
3388
|
-
|
|
3383
|
+
return div;
|
|
3384
|
+
}
|
|
3385
|
+
function createDivWithSvg(svgIcon, options2) {
|
|
3386
|
+
if (options2 === void 0) { options2 = {}; }
|
|
3387
|
+
var div = document.createElement("div");
|
|
3388
|
+
if (options2.id) {
|
|
3389
|
+
div.id = options2.id;
|
|
3389
3390
|
}
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
sessionStorage.getItem("test");
|
|
3393
|
-
isSessionStorageAvailable = true;
|
|
3391
|
+
if (options2["class"]) {
|
|
3392
|
+
div.classList.add(options2["class"]);
|
|
3394
3393
|
}
|
|
3395
|
-
|
|
3396
|
-
|
|
3394
|
+
div.innerHTML = svgIcon;
|
|
3395
|
+
return div;
|
|
3396
|
+
}
|
|
3397
|
+
function findHighestZIndex() {
|
|
3398
|
+
var elements = document.getElementsByTagName("*");
|
|
3399
|
+
var defaultZIndex = 4;
|
|
3400
|
+
for (var i = 0; i < elements.length; i++) {
|
|
3401
|
+
var zindex = Number.parseInt(document.defaultView.getComputedStyle(elements[i], null).getPropertyValue("z-index"), 10);
|
|
3402
|
+
if (zindex > defaultZIndex) {
|
|
3403
|
+
defaultZIndex = zindex;
|
|
3404
|
+
}
|
|
3397
3405
|
}
|
|
3398
|
-
|
|
3399
|
-
|
|
3406
|
+
return defaultZIndex;
|
|
3407
|
+
}
|
|
3408
|
+
// alan_btn/src/assets/chatIcons.ts
|
|
3409
|
+
var chatIcons = {
|
|
3410
|
+
toogleChatSideBar: '<svg fill="#000000" width="24px" height="24px" viewBox="0 0 32 32" id="icon" xmlns="http://www.w3.org/2000/svg"><defs><style>.cls-1{fill:none;}</style></defs><path d="M28,4H4A2,2,0,0,0,2,6V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V6A2,2,0,0,0,28,4ZM4,6h6V26H4ZM28,26H12V6H28Z"/><rect id="_Transparent_Rectangle_" data-name="<Transparent Rectangle>" class="cls-1" width="32" height="32"/></svg>',
|
|
3411
|
+
closeChat: "<svg width=\"17\" height=\"17\" viewBox=\"0 0 17 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M0.342029 15.0105C-0.113105 15.4658 -0.113035 16.2036 0.34217 16.6587C0.797374 17.1138 1.53533 17.1138 1.99046 16.6586L8.50015 10.1482L15.0104 16.658C15.4655 17.1131 16.2035 17.1131 16.6586 16.658C17.1138 16.2029 17.1138 15.4649 16.6586 15.0098L10.1483 8.49998L16.6582 1.98944C17.1132 1.53427 17.1132 0.796371 16.6579 0.341282C16.2028 -0.113819 15.4648 -0.113749 15.0097 0.341421L8.49991 6.85183L1.98966 0.341981C1.5345 -0.113143 0.796535 -0.113143 0.341377 0.341981C-0.113792 0.797116 -0.113792 1.53502 0.341377 1.99016L6.85187 8.5001L0.342029 15.0105Z\" fill=\"#080808\"/>\n</svg>",
|
|
3412
|
+
plus: "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M4 12H20M12 4V20\" stroke=\"#000000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>",
|
|
3413
|
+
clear: "<svg width=\"19\" height=\"22\" viewBox=\"0 0 19 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.33333 3.16667V2.63889C6.33333 1.93906 6.612 1.26772 7.10706 0.772667C7.60106 0.277611 8.27239 0 8.97222 0H10.0278C10.7276 0 11.399 0.277611 11.894 0.772667C12.3891 1.26772 12.6667 1.93906 12.6667 2.63889V3.16667H17.9444C18.5271 3.16667 19 3.63956 19 4.22222C19 4.80489 18.5271 5.27778 17.9444 5.27778H16.8889V16.8889C16.8889 19.2206 14.9994 21.1111 12.6667 21.1111C10.7329 21.1111 8.26817 21.1111 6.33333 21.1111C4.00161 21.1111 2.11111 19.2206 2.11111 16.8889V5.27778H1.05556C0.472889 5.27778 0 4.80489 0 4.22222C0 3.63956 0.472889 3.16667 1.05556 3.16667H6.33333ZM14.7778 5.27778H4.22222V16.8889C4.22222 18.0553 5.168 19 6.33333 19H12.6667C13.8331 19 14.7778 18.0553 14.7778 16.8889V5.27778ZM10.5556 8.44445V15.8333C10.5556 16.416 11.0284 16.8889 11.6111 16.8889C12.1938 16.8889 12.6667 16.416 12.6667 15.8333V8.44445C12.6667 7.86178 12.1938 7.38889 11.6111 7.38889C11.0284 7.38889 10.5556 7.86178 10.5556 8.44445ZM6.33333 8.44445V15.8333C6.33333 16.416 6.80622 16.8889 7.38889 16.8889C7.97156 16.8889 8.44444 16.416 8.44444 15.8333V8.44445C8.44444 7.86178 7.97156 7.38889 7.38889 7.38889C6.80622 7.38889 6.33333 7.86178 6.33333 8.44445ZM10.5556 3.16667V2.63889C10.5556 2.4985 10.5007 2.36444 10.4014 2.26522C10.3022 2.16706 10.1682 2.11111 10.0278 2.11111C9.68261 2.11111 9.31739 2.11111 8.97222 2.11111C8.83289 2.11111 8.69884 2.16706 8.59962 2.26522C8.50039 2.36444 8.44444 2.4985 8.44444 2.63889V3.16667H10.5556Z\" fill=\"black\"/>\n</svg>\n",
|
|
3414
|
+
resizer: {
|
|
3415
|
+
left: "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M13.7266 0.273364C14.0911 0.63786 14.0911 1.22881 13.7266 1.59331L1.59331 13.7266C1.22881 14.0911 0.63786 14.0911 0.273364 13.7266C-0.0911215 13.3622 -0.0911215 12.7712 0.273364 12.4067L12.4067 0.273364C12.7712 -0.0911215 13.3622 -0.0911215 13.7266 0.273364ZM13.7266 6.80672C14.0911 7.17119 14.0911 7.76217 13.7266 8.12664L8.12664 13.7266C7.76217 14.0911 7.17119 14.0911 6.80672 13.7266C6.44225 13.3622 6.44225 12.7712 6.80672 12.4067L12.4067 6.80672C12.7712 6.44225 13.3622 6.44225 13.7266 6.80672Z\" fill=\"#CCD4DD\"/>\n </svg>\n ",
|
|
3416
|
+
right: "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M13.7266 0.273364C14.0911 0.63786 14.0911 1.22881 13.7266 1.59331L1.59331 13.7266C1.22881 14.0911 0.63786 14.0911 0.273364 13.7266C-0.0911215 13.3622 -0.0911215 12.7712 0.273364 12.4067L12.4067 0.273364C12.7712 -0.0911215 13.3622 -0.0911215 13.7266 0.273364ZM13.7266 6.80672C14.0911 7.17119 14.0911 7.76217 13.7266 8.12664L8.12664 13.7266C7.76217 14.0911 7.17119 14.0911 6.80672 13.7266C6.44225 13.3622 6.44225 12.7712 6.80672 12.4067L12.4067 6.80672C12.7712 6.44225 13.3622 6.44225 13.7266 6.80672Z\" fill=\"#CCD4DD\"/>\n </svg>\n "
|
|
3417
|
+
},
|
|
3418
|
+
send: "\n<svg width=\"36\" height=\"36\" viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M28.0134 15.9238L8.98646 6.40981C7.82892 5.83162 6.75249 5.99963 6.17778 6.77248C5.89042 7.15832 5.61697 7.85122 5.94952 8.96241L8.09542 16.1092C8.39668 17.1138 8.39668 18.8797 8.09542 19.8843L5.94952 27.0311C5.61697 28.1423 5.88926 28.8363 6.17662 29.2222C6.51959 29.681 7.04564 29.9348 7.65743 29.9348C8.07109 29.9348 8.51834 29.8166 8.9853 29.5837L28.0134 20.0697C28.9635 19.5946 29.5093 18.838 29.5093 17.9968C29.5093 17.1555 28.9647 16.3989 28.0134 15.9238ZM8.27386 27.3486L10.3155 20.5494C10.4383 20.1403 10.5217 19.6606 10.575 19.1554H16.6868C17.3276 19.1554 17.8455 18.6375 17.8455 17.9968C17.8455 17.356 17.3276 16.8381 16.6868 16.8381H10.575C10.5217 16.3329 10.4395 15.8532 10.3155 15.4441L8.27386 8.64493L26.9775 17.9968L8.27386 27.3486Z\" fill=\"#B8B6B6\"/>\n</svg>",
|
|
3419
|
+
mic: "\n<svg width=\"36\" height=\"36\" viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M18.2623 24.0476C16.7915 24.0458 15.3814 23.4608 14.3414 22.4208C13.3014 21.3808 12.7164 19.9707 12.7147 18.5V10.7333C12.7147 9.26204 13.2992 7.85099 14.3395 6.81061C15.3799 5.77024 16.791 5.18576 18.2623 5.18576C19.7336 5.18576 21.1446 5.77024 22.185 6.81061C23.2254 7.85099 23.8099 9.26204 23.8099 10.7333V18.5C23.8081 19.9707 23.2231 21.3808 22.1831 22.4208C21.1431 23.4608 19.733 24.0458 18.2623 24.0476ZM18.2623 7.4048C17.3798 7.40576 16.5337 7.75676 15.9097 8.38078C15.2857 9.00479 14.9347 9.85086 14.9337 10.7333V18.5C14.9337 19.3828 15.2844 20.2294 15.9086 20.8536C16.5329 21.4778 17.3795 21.8285 18.2623 21.8285C19.1451 21.8285 19.9917 21.4778 20.6159 20.8536C21.2401 20.2294 21.5908 19.3828 21.5908 18.5V10.7333C21.5899 9.85086 21.2389 9.00479 20.6148 8.38078C19.9908 7.75676 19.1448 7.40576 18.2623 7.4048ZM28.2479 18.5C28.2479 18.2057 28.131 17.9235 27.923 17.7154C27.7149 17.5073 27.4327 17.3905 27.1384 17.3905C26.8441 17.3905 26.5619 17.5073 26.3539 17.7154C26.1458 17.9235 26.0289 18.2057 26.0289 18.5C26.0289 20.5598 25.2106 22.5353 23.7541 23.9918C22.2976 25.4483 20.3221 26.2666 18.2623 26.2666C16.2024 26.2666 14.227 25.4483 12.7704 23.9918C11.3139 22.5353 10.4956 20.5598 10.4956 18.5C10.4956 18.2057 10.3788 17.9235 10.1707 17.7154C9.9626 17.5073 9.68039 17.3905 9.38613 17.3905C9.09187 17.3905 8.80966 17.5073 8.60158 17.7154C8.39351 17.9235 8.27661 18.2057 8.27661 18.5C8.27661 21.1483 9.32867 23.6882 11.2013 25.5609C13.074 27.4336 15.6139 28.4856 18.2623 28.4856C20.9106 28.4856 23.4505 27.4336 25.3232 25.5609C27.1959 23.6882 28.2479 21.1483 28.2479 18.5ZM19.3718 30.7047V27.3761C19.3718 27.0818 19.2549 26.7996 19.0468 26.5916C18.8387 26.3835 18.5565 26.2666 18.2623 26.2666C17.968 26.2666 17.6858 26.3835 17.4777 26.5916C17.2696 26.7996 17.1528 27.0818 17.1528 27.3761V30.7047C17.1528 30.9989 17.2696 31.2811 17.4777 31.4892C17.6858 31.6973 17.968 31.8142 18.2623 31.8142C18.5565 31.8142 18.8387 31.6973 19.0468 31.4892C19.2549 31.2811 19.3718 30.9989 19.3718 30.7047Z\" fill=\"#171717\"/>\n</svg>\n<div class=\"alan-text-chat__animated-btn-bars\">\n <div class=\"alan-text-chat__bar alan-text-chat__bar-1\"></div>\n <div class=\"alan-text-chat__bar alan-text-chat__bar-2\"></div>\n <div class=\"alan-text-chat__bar alan-text-chat__bar-3\"></div>\n <div class=\"alan-text-chat__bar alan-text-chat__bar-3\"></div>\n <div class=\"alan-text-chat__bar alan-text-chat__bar-2\"></div>\n <div class=\"alan-text-chat__bar alan-text-chat__bar-1\"></div>\n</div>",
|
|
3420
|
+
noMic: "<svg width=\"36\" height=\"36\" viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.9675 16.3602V18.6166C12.9692 20.0539 13.541 21.432 14.5574 22.4483C15.5738 23.4647 16.9518 24.0365 18.3892 24.0382C19.2643 24.0371 20.1175 23.8248 20.8804 23.4294L19.0569 21.8003C18.8389 21.846 18.6153 21.8695 18.3892 21.8695C17.5264 21.8695 16.699 21.5268 16.089 20.9168C15.4789 20.3067 15.1362 19.4793 15.1362 18.6166V18.2976L12.9675 16.3602ZM21.6421 16.7466V11.0263C21.6412 10.1638 21.2982 9.33696 20.6883 8.72712C20.0785 8.11727 19.2516 7.77424 18.3892 7.7733C17.5267 7.77424 16.6999 8.11727 16.09 8.72712C15.5048 9.31233 15.1653 10.0974 15.138 10.9219L13.2678 9.24713C13.5339 8.48102 13.9711 7.77698 14.5555 7.1926C15.5723 6.17585 16.9513 5.60464 18.3892 5.60464C19.8271 5.60464 21.2061 6.17585 22.2228 7.1926C23.2396 8.20935 23.8108 9.58837 23.8108 11.0263V18.6166C23.8108 18.6404 23.8106 18.6643 23.8102 18.6882L21.6421 16.7466ZM22.5782 24.9462C21.345 25.7623 19.89 26.2068 18.3892 26.2068C16.3761 26.2068 14.4455 25.4071 13.022 23.9837C11.5986 22.5602 10.7989 20.6296 10.7989 18.6166C10.7989 18.329 10.6847 18.0532 10.4813 17.8498C10.2779 17.6465 10.0021 17.5322 9.71457 17.5322C9.42699 17.5322 9.15118 17.6465 8.94783 17.8498C8.74448 18.0532 8.63024 18.329 8.63024 18.6166C8.63024 21.2048 9.65841 23.687 11.4886 25.5172C13.0613 27.0899 15.1156 28.0704 17.3048 28.3151V30.5441C17.3048 30.8317 17.4191 31.1075 17.6224 31.3109C17.8258 31.5142 18.1016 31.6285 18.3892 31.6285C18.6768 31.6285 18.9526 31.5142 19.1559 31.3109C19.3593 31.1075 19.4735 30.8317 19.4735 30.5441V28.3151C21.2027 28.1218 22.8477 27.4695 24.2378 26.4288L22.5782 24.9462ZM27.5342 22.0231L25.7589 20.4332C25.9042 19.8436 25.9794 19.2339 25.9794 18.6166C25.9794 18.329 26.0937 18.0532 26.297 17.8498C26.5004 17.6465 26.7762 17.5322 27.0638 17.5322C27.3514 17.5322 27.6272 17.6465 27.8305 17.8498C28.0339 18.0532 28.1481 18.329 28.1481 18.6166C28.1481 19.7909 27.9364 20.9434 27.5342 22.0231Z\" fill=\"#B8B6B6\"/>\n<path d=\"M8.18825 6.56812L31.2883 27.1759C31.8123 27.6433 31.8581 28.4471 31.3906 28.9711C30.9232 29.4951 30.1194 29.5409 29.5954 29.0735L6.49538 8.46573C5.97137 7.99826 5.92553 7.1945 6.39301 6.67049C6.86048 6.14648 7.66424 6.10065 8.18825 6.56812Z\" fill=\"#B8B6B6\"/>\n</svg>\n",
|
|
3421
|
+
disconnected: "\n <svg class=\"alan-btn_disconnected-chat-icon-rotate\" width=\"35\" height=\"35\" viewBox=\"0 0 35 35\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path opacity=\"0.8\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M24.0579 3.47502C18.5874 0.922942 12.1534 1.67973 7.4383 5.76748C2.7232 9.85523 1.24337 15.2725 2.34798 20.767C3.45259 26.2615 7.87342 31.0097 13.2994 32.4594C19.715 34.174 26.6107 31.7302 30.2577 26.2615C26.9893 30.6213 20.7089 33.242 15.1228 32.2771C9.62181 31.3275 4.71002 26.606 3.45259 21.1573C2.11284 15.3541 3.59462 10.949 8.37598 6.57398C13.1573 2.19898 22.9638 1.8344 28.2519 8.2146C29.2614 9.43264 30.6224 11.6781 30.9871 14.4125C31.1694 15.5063 31.1694 15.6886 31.3518 16.6C31.3518 16.9646 31.7165 17.3292 32.0812 17.3292C32.6282 17.3292 33.0612 16.918 32.9929 16.2354C32.4459 10.7667 29.0622 5.80967 24.0579 3.47502Z\" fill=\"#B8B6B6\"/>\n </svg>",
|
|
3422
|
+
noWiFi: "<svg width=\"35\" height=\"35\" viewBox=\"0 0 35 35\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7.90233 10.4566C7.52988 9.72656 6.63602 9.42857 5.90602 9.78613C4.95254 10.2629 4.02887 11.0525 3.32866 11.708C2.71784 12.2593 2.68803 13.2127 3.23926 13.8086C3.53722 14.1215 3.93946 14.2854 4.34171 14.2854C4.69926 14.2854 5.05681 14.1513 5.35477 13.898C5.65273 13.6298 6.54661 12.7956 7.24682 12.4529C7.97682 12.0805 8.27478 11.1866 7.91723 10.4566H7.90233Z\" />\n <path d=\"M32.1414 11.4398C28.1636 7.92391 23.0983 5.9872 17.884 5.9872C15.4258 5.9872 13.0273 6.40437 10.733 7.22376C10.6883 7.23866 10.6436 7.28335 10.5989 7.31315L8.40888 4.97415C7.84276 4.37823 6.9042 4.33355 6.30828 4.89967C5.71236 5.4658 5.68256 6.40434 6.23379 7.00026L27.091 29.3472C27.3889 29.6601 27.7763 29.824 28.1785 29.824C28.5361 29.824 28.9085 29.6899 29.1916 29.4217C29.7875 28.8556 29.8173 27.917 29.2661 27.3211L18.2714 15.5368C21.5638 15.6411 24.6328 17.0266 26.9718 19.4848C27.2698 19.7976 27.6571 19.9466 28.0444 19.9466C28.4169 19.9466 28.7893 19.8127 29.0724 19.5296C29.6683 18.9635 29.6981 18.0248 29.132 17.4288C26.1375 14.2705 22.1299 12.5424 17.884 12.5424C17.1391 12.5424 16.3942 12.6019 15.6642 12.7062C15.6642 12.7062 15.6493 12.7062 15.6344 12.7062L12.8187 9.68189C14.4575 9.20515 16.1558 8.9519 17.884 8.9519C22.3683 8.9519 26.7334 10.6205 30.1749 13.6597C30.4579 13.913 30.8155 14.0322 31.1581 14.0322C31.5753 14.0322 31.9775 13.8682 32.2755 13.5256C32.8267 12.9148 32.7671 11.9613 32.1414 11.425V11.4398Z\" />\n <path d=\"M12.2079 15.1643C11.7908 14.4492 10.882 14.2109 10.1669 14.628C8.94526 15.3282 7.8279 16.2072 6.82973 17.2203C6.24871 17.8013 6.26361 18.7548 6.82973 19.3209C7.12769 19.6039 7.50014 19.7529 7.87259 19.7529C8.24504 19.7529 8.64731 19.6039 8.93037 19.306C9.74976 18.4717 10.6585 17.7715 11.6418 17.1905C12.3569 16.7733 12.5953 15.8645 12.1781 15.1494L12.2079 15.1643Z\" />\n <path d=\"M16.7666 20.3637C16.5282 19.5741 15.694 19.1421 14.9044 19.3805C13.355 19.8572 11.8354 21.2874 11.0756 22.0919C10.5094 22.6878 10.5243 23.6263 11.1352 24.1924C11.4182 24.4605 11.7907 24.6097 12.1631 24.6097C12.5505 24.6097 12.9527 24.4607 13.2358 24.1478C14.1595 23.1795 15.1576 22.4346 15.7833 22.2409C16.5729 22.0025 17.005 21.1682 16.7666 20.3786V20.3637Z\" />\n <path d=\"M17.7499 29.7644C18.7785 29.7644 19.6122 28.9307 19.6122 27.9021C19.6122 26.8737 18.7785 26.0399 17.7499 26.0399C16.7214 26.0399 15.8877 26.8737 15.8877 27.9021C15.8877 28.9307 16.7214 29.7644 17.7499 29.7644Z\"/>\n </svg>\n ",
|
|
3423
|
+
mute: "\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_185_822)\">\n <path d=\"M2.96822 1.83729C2.5972 1.46626 2.04066 1.46626 1.66963 1.83729C1.2986 2.20832 1.2986 2.76486 1.66963 3.13589L16.5107 17.977C16.8818 18.348 17.4383 18.348 17.8093 17.977C18.1804 17.606 18.1804 17.0494 17.8093 16.6784L2.96822 1.83729Z\" fill=\"#171717\"/>\n <path d=\"M14.2846 11.9477L15.5832 13.2463C17.0673 11.2984 16.9746 8.60848 15.4905 6.66059C15.2122 6.28956 14.5629 6.1968 14.1919 6.56783C13.8208 6.93886 13.7281 7.4954 14.0991 7.86643C15.1194 8.88675 15.1194 10.5564 14.2846 11.9477Z\" fill=\"#171717\"/>\n <path d=\"M18.1804 9.90719C18.1804 11.3913 17.5311 12.8754 16.5107 13.9885L17.8093 15.2871C19.2007 13.803 19.9427 11.9478 20.0355 9.90719C20.0355 7.49551 18.8297 5.17659 16.8818 3.59972C16.5107 3.22869 15.7687 3.32145 15.5832 3.69248C15.3976 4.06351 15.3049 4.7128 15.6759 4.99107C17.2528 6.19691 18.1804 7.9593 18.1804 9.90719Z\" fill=\"#171717\"/>\n <path d=\"M11.1308 15.6581L6.40023 12.4116C6.21471 12.3189 6.0292 12.2261 5.84368 12.2261H1.85514V7.77378H4.82336L2.96822 5.91864H0.927569C0.371028 5.91864 0 6.28967 0 6.84621V13.2464C0 13.803 0.371028 14.174 0.927569 14.174H5.56541L11.5019 18.2553C11.6874 18.3481 11.8729 18.4408 12.0584 18.4408C12.6149 18.4408 12.986 18.0698 12.986 17.5133V15.9364L11.1308 14.0812V15.6581Z\" fill=\"#171717\"/>\n <path d=\"M11.1309 4.24897V8.7013L12.986 10.5564V2.48659C12.986 1.93005 12.615 1.55902 12.0584 1.55902C11.8729 1.55902 11.6874 1.65178 11.5019 1.74453L7.14233 4.71276L8.44093 6.01135L11.1309 4.24897Z\" fill=\"#171717\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_185_822\">\n <rect width=\"20\" height=\"20\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n ",
|
|
3424
|
+
unmute: "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M15.5556 6.64349C15.2778 6.27312 14.6296 6.18053 14.2593 6.5509C13.8889 6.92127 13.7963 7.47682 14.1667 7.84719C15.0926 9.14348 15.0926 10.9027 14.1667 12.199C13.8889 12.5694 13.8889 13.2175 14.2593 13.4953C14.4445 13.5879 14.6296 13.6805 14.8148 13.6805C15.0926 13.6805 15.3704 13.5879 15.5556 13.3101C17.037 11.3657 17.037 8.58793 15.5556 6.64349Z\" fill=\"#171717\"/>\n <path d=\"M16.7593 3.68063C16.3889 3.31026 15.7408 3.40285 15.463 3.77322C15.1852 4.14359 15.1852 4.79174 15.5556 5.06952C17.1297 6.27322 18.0556 8.03247 18.0556 9.97691C18.0556 11.9213 17.1297 13.6806 15.6482 14.7917C15.2778 15.1621 15.1852 15.7176 15.5556 16.088C15.7408 16.2732 16.0186 16.4584 16.2963 16.4584C16.4815 16.4584 16.7593 16.3658 16.8519 16.2732C18.7963 14.7917 19.9074 12.4769 20 9.97691C19.9074 7.56951 18.7037 5.2547 16.7593 3.68063Z\" fill=\"#171717\"/>\n <path d=\"M12.5 1.73615C12.2222 1.55096 11.8518 1.55096 11.574 1.73615L5.55554 5.9028H0.925923C0.370369 5.9028 0 6.27317 0 6.82872V13.2176C0 13.7731 0.370369 14.1435 0.925923 14.1435H5.55554L11.4814 18.2176C11.6666 18.3102 11.8518 18.4028 12.037 18.4028C12.5926 18.4028 12.9629 18.0324 12.9629 17.4768V2.56948C12.9629 2.19911 12.7777 1.92133 12.5 1.73615ZM11.1111 15.625L6.38887 12.3843C6.20368 12.2917 6.0185 12.1991 5.83331 12.1991H1.85185V7.75465H5.83331C6.0185 7.75465 6.20368 7.66205 6.38887 7.56946L11.1111 4.32873V15.625Z\" fill=\"#171717\"/>\n </svg>\n ",
|
|
3425
|
+
like: "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M15.0501 7.04419C15.4673 5.79254 14.5357 4.5 13.2163 4.5C12.5921 4.5 12.0062 4.80147 11.6434 5.30944L8.47155 9.75H5.85748L5.10748 10.5V18L5.85748 18.75H16.8211L19.1247 14.1428C19.8088 12.7747 19.5406 11.1224 18.4591 10.0408C17.7926 9.37439 16.8888 9 15.9463 9H14.3981L15.0501 7.04419ZM9.60751 10.7404L12.864 6.1813C12.9453 6.06753 13.0765 6 13.2163 6C13.5118 6 13.7205 6.28951 13.627 6.56984L12.317 10.5H15.9463C16.491 10.5 17.0133 10.7164 17.3984 11.1015C18.0235 11.7265 18.1784 12.6814 17.7831 13.472L15.8941 17.25H9.60751V10.7404ZM8.10751 17.25H6.60748V11.25H8.10751V17.25Z\" fill=\"#080341\"/>\n </svg>",
|
|
3426
|
+
dislike: "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M15.0501 16.9558C15.4673 18.2075 14.5357 19.5 13.2164 19.5C12.5921 19.5 12.0063 19.1985 11.6435 18.6906L8.47164 14.25L5.85761 14.25L5.10761 13.5L5.10761 6L5.85761 5.25L16.8211 5.25L19.1247 9.85722C19.8088 11.2253 19.5407 12.8776 18.4591 13.9592C17.7927 14.6256 16.8888 15 15.9463 15L14.3982 15L15.0501 16.9558ZM9.60761 13.2596L12.8641 17.8187C12.9453 17.9325 13.0765 18 13.2164 18C13.5119 18 13.7205 17.7105 13.6271 17.4302L12.317 13.5L15.9463 13.5C16.491 13.5 17.0133 13.2836 17.3984 12.8985C18.0235 12.2735 18.1784 11.3186 17.7831 10.528L15.8941 6.75L9.60761 6.75L9.60761 13.2596ZM8.10761 6.75L6.60761 6.75L6.60761 12.75L8.10761 12.75L8.10761 6.75Z\" fill=\"#080341\"/>\n </svg>",
|
|
3427
|
+
copy: "<svg class=\"alan-btn__copy-icon\" width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M19.5 16.5L19.5 4.5L18.75 3.75H9L8.25 4.5L8.25 7.5L5.25 7.5L4.5 8.25V20.25L5.25 21H15L15.75 20.25V17.25H18.75L19.5 16.5ZM15.75 15.75L15.75 8.25L15 7.5L9.75 7.5V5.25L18 5.25V15.75H15.75ZM6 9L14.25 9L14.25 19.5L6 19.5L6 9Z\" fill=\"#080341\"/>\n </svg>",
|
|
3428
|
+
copied: "<svg class=\"alan-btn__copied-icon\" width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"okIconTitle\" stroke=\"#000000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" fill=\"none\" color=\"#000000\"> <title id=\"okIconTitle\">Copied!</title> <polyline points=\"4 13 9 18 20 7\"/> </svg>"
|
|
3429
|
+
};
|
|
3430
|
+
// alan_btn/src/textChat/fullscreen.ts
|
|
3431
|
+
function openChatInFullScreen(chatHolderDiv) {
|
|
3432
|
+
chatHolderDiv.classList.add("alan-btn_text-chat-full-screen");
|
|
3433
|
+
chatHolderDiv.classList.remove("with-hover");
|
|
3434
|
+
}
|
|
3435
|
+
function toogleChatSidePanel(chatHolderDiv) {
|
|
3436
|
+
var expandedClass = "alan-btn__side-bar-expanded";
|
|
3437
|
+
if (chatHolderDiv.classList.contains(expandedClass)) {
|
|
3438
|
+
chatHolderDiv.classList.remove(expandedClass);
|
|
3400
3439
|
}
|
|
3401
|
-
|
|
3402
|
-
|
|
3440
|
+
else {
|
|
3441
|
+
chatHolderDiv.classList.add(expandedClass);
|
|
3403
3442
|
}
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3443
|
+
}
|
|
3444
|
+
function fillSideBarContent(chatSideBar, options2) {
|
|
3445
|
+
var readyClass = "alan-btn__side-bar-ready";
|
|
3446
|
+
if (!chatSideBar.classList.contains(readyClass)) {
|
|
3447
|
+
chatSideBar.classList.add(readyClass);
|
|
3448
|
+
var sideChatHeader = chatSideBar.querySelector(".alan-btn__side-bar-header");
|
|
3449
|
+
var chatCollapseSideBarBtn = createDivWithSvg(chatIcons.toogleChatSideBar, { "class": "alan-btn__side-bar__toogle-side-bar-btn" });
|
|
3450
|
+
var chatCloseSideBarBtn = createDivWithSvg(chatIcons.closeChat, { "class": "alan-btn__side-bar__close-chat-btn" });
|
|
3451
|
+
var newChatSideBarBtn = createDiv({ "class": "alan-btn__side-bar__new-chat-btn" });
|
|
3452
|
+
newChatSideBarBtn.innerHTML = chatIcons.plus + "New Chat";
|
|
3453
|
+
sideChatHeader.appendChild(chatCloseSideBarBtn);
|
|
3454
|
+
sideChatHeader.appendChild(newChatSideBarBtn);
|
|
3455
|
+
sideChatHeader.appendChild(chatCollapseSideBarBtn);
|
|
3456
|
+
chatCloseSideBarBtn.addEventListener("click", options2.closeTextChat);
|
|
3457
|
+
chatCollapseSideBarBtn.addEventListener("click", options2.expandCollapseChatSidePanel);
|
|
3458
|
+
newChatSideBarBtn.addEventListener("click", options2.onClearChatClick);
|
|
3459
|
+
}
|
|
3460
|
+
}
|
|
3461
|
+
// alan_btn/src/helpers/mini/guid.ts
|
|
3462
|
+
function guid() {
|
|
3463
|
+
function s4() {
|
|
3464
|
+
return Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
|
|
3465
|
+
}
|
|
3466
|
+
return s4() + s4() + "-" + s4() + "-" + s4() + "-" + s4() + "-" + s4() + s4() + s4();
|
|
3467
|
+
}
|
|
3468
|
+
// alan_btn/src/state.ts
|
|
3469
|
+
var uiState = {
|
|
3470
|
+
lib: {
|
|
3471
|
+
version: ""
|
|
3472
|
+
},
|
|
3473
|
+
project: {
|
|
3474
|
+
id: null
|
|
3475
|
+
},
|
|
3476
|
+
btn: {
|
|
3477
|
+
isTopAligned: false,
|
|
3478
|
+
zIndex: void 0
|
|
3479
|
+
},
|
|
3480
|
+
textChat: {
|
|
3481
|
+
available: false,
|
|
3482
|
+
expanded: false,
|
|
3483
|
+
options: null,
|
|
3484
|
+
defaults: {
|
|
3485
|
+
minChatWidth: 250,
|
|
3486
|
+
appearAnimationMs: 200,
|
|
3487
|
+
chatMargin: 25,
|
|
3488
|
+
textarea: {
|
|
3489
|
+
padding: {
|
|
3490
|
+
top: 12
|
|
3491
|
+
}
|
|
3492
|
+
}
|
|
3493
|
+
}
|
|
3494
|
+
}
|
|
3495
|
+
};
|
|
3496
|
+
// alan_btn/src/helpers/mini/isStorageAvailable.ts
|
|
3497
|
+
var _isLocalStorageAvailable = false;
|
|
3498
|
+
try {
|
|
3499
|
+
localStorage.getItem("test");
|
|
3500
|
+
_isLocalStorageAvailable = true;
|
|
3501
|
+
}
|
|
3502
|
+
catch (e) {
|
|
3503
|
+
_isLocalStorageAvailable = false;
|
|
3504
|
+
}
|
|
3505
|
+
var _isSessionStorageAvailable = false;
|
|
3506
|
+
try {
|
|
3507
|
+
sessionStorage.getItem("test");
|
|
3508
|
+
_isSessionStorageAvailable = true;
|
|
3509
|
+
}
|
|
3510
|
+
catch (e) {
|
|
3511
|
+
_isSessionStorageAvailable = false;
|
|
3512
|
+
}
|
|
3513
|
+
var isSessionStorageAvailable = _isSessionStorageAvailable;
|
|
3514
|
+
var isLocalStorageAvailable = _isLocalStorageAvailable;
|
|
3515
|
+
// alan_btn/src/helpers/helpers.ts
|
|
3516
|
+
function debounce(func, wait) {
|
|
3517
|
+
var timeout;
|
|
3518
|
+
var delay = wait || 100;
|
|
3519
|
+
return function (args) {
|
|
3520
|
+
clearTimeout(timeout);
|
|
3521
|
+
timeout = setTimeout(function () {
|
|
3522
|
+
func.apply(this, args);
|
|
3523
|
+
}, delay);
|
|
3524
|
+
};
|
|
3525
|
+
}
|
|
3526
|
+
function throttle(func, wait) {
|
|
3527
|
+
if (wait === void 0) { wait = 100; }
|
|
3528
|
+
var timer = null;
|
|
3529
|
+
var throttlePause;
|
|
3530
|
+
return function () {
|
|
3531
|
+
var args = [];
|
|
3532
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3533
|
+
args[_i] = arguments[_i];
|
|
3534
|
+
}
|
|
3535
|
+
if (!throttlePause) {
|
|
3536
|
+
func.apply(this, args);
|
|
3537
|
+
throttlePause = true;
|
|
3538
|
+
if (timer === null) {
|
|
3539
|
+
timer = setTimeout(function () {
|
|
3540
|
+
timer = null;
|
|
3541
|
+
throttlePause = false;
|
|
3542
|
+
}, wait);
|
|
3543
|
+
}
|
|
3544
|
+
}
|
|
3545
|
+
};
|
|
3546
|
+
}
|
|
3547
|
+
function isSafari() {
|
|
3548
|
+
return /apple/i.test(navigator.vendor);
|
|
3549
|
+
}
|
|
3550
|
+
function isMobile() {
|
|
3551
|
+
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
|
|
3552
|
+
return true;
|
|
3553
|
+
}
|
|
3554
|
+
return false;
|
|
3555
|
+
}
|
|
3556
|
+
function isIpadOS() {
|
|
3557
|
+
return navigator.maxTouchPoints && navigator.maxTouchPoints > 2 && /MacIntel/.test(navigator.platform);
|
|
3558
|
+
}
|
|
3559
|
+
function isOriginSecure() {
|
|
3560
|
+
var isSecure = false;
|
|
3561
|
+
var protocol2 = window.location.protocol;
|
|
3562
|
+
var hostname = window.location.hostname;
|
|
3563
|
+
if (protocol2 === "https:") {
|
|
3564
|
+
isSecure = true;
|
|
3565
|
+
}
|
|
3566
|
+
if (isFileProtocol()) {
|
|
3567
|
+
isSecure = true;
|
|
3568
|
+
}
|
|
3569
|
+
if (protocol2 === "http:" && (hostname.indexOf("localhost") > -1 || hostname.indexOf("127.0.0.1") > -1)) {
|
|
3570
|
+
isSecure = true;
|
|
3571
|
+
}
|
|
3572
|
+
return isSecure;
|
|
3573
|
+
}
|
|
3574
|
+
function isFileProtocol() {
|
|
3575
|
+
var protocol2 = window.location.protocol;
|
|
3576
|
+
return protocol2 === "file:";
|
|
3577
|
+
}
|
|
3578
|
+
function isAudioSupported() {
|
|
3579
|
+
var available = false, fakeGetUserMedia, fakeContext;
|
|
3580
|
+
fakeGetUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.mediaDevices && navigator.mediaDevices.getUserMedia;
|
|
3581
|
+
fakeContext = window.AudioContext || window.webkitAudioContext || window.mozAudioContext;
|
|
3582
|
+
if (fakeGetUserMedia && fakeContext) {
|
|
3583
|
+
available = true;
|
|
3584
|
+
}
|
|
3585
|
+
return available;
|
|
3586
|
+
}
|
|
3587
|
+
function getProjectId() {
|
|
3588
|
+
var key;
|
|
3589
|
+
if (uiState.project.id) {
|
|
3590
|
+
key = uiState.project.id;
|
|
3591
|
+
return key.substr(0, key.indexOf("/"));
|
|
3592
|
+
}
|
|
3593
|
+
return "none";
|
|
3594
|
+
}
|
|
3595
|
+
function getDeviceId() {
|
|
3596
|
+
if (!uiState.project.id)
|
|
3597
|
+
return;
|
|
3598
|
+
var deviceIdKey = "alan-btn-uuid-" + uiState.project.id;
|
|
3599
|
+
var deviceId;
|
|
3600
|
+
if (isLocalStorageAvailable) {
|
|
3601
|
+
deviceId = localStorage.getItem(deviceIdKey);
|
|
3602
|
+
}
|
|
3603
|
+
if (!deviceId) {
|
|
3604
|
+
deviceId = guid();
|
|
3408
3605
|
if (isLocalStorageAvailable) {
|
|
3409
|
-
|
|
3606
|
+
localStorage.setItem(deviceIdKey, deviceId);
|
|
3410
3607
|
}
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3608
|
+
}
|
|
3609
|
+
return deviceId;
|
|
3610
|
+
}
|
|
3611
|
+
function printNavigatorFlag(flag) {
|
|
3612
|
+
return flag ? "1" : "0";
|
|
3613
|
+
}
|
|
3614
|
+
function getDebugInfo() {
|
|
3615
|
+
return "\n Debug Info:\n alanBtn: v.".concat(uiState.lib.version, "\n alanSDK: v.").concat(window.alanSDKVersion, "\n projectId: ").concat(uiState.project.id || "unknown", "\n deviceId: ").concat(getDeviceId(), "\n navigator: \n getUserMedia: ").concat(printNavigatorFlag(navigator.getUserMedia), ", \n mediaDevices: ").concat(printNavigatorFlag(navigator.mediaDevices), ", \n mediaDevices.getUserMedia: ").concat(printNavigatorFlag(navigator.mediaDevices && navigator.mediaDevices.getUserMedia), ",\n webkitGUM: ").concat(printNavigatorFlag(navigator.webkitGetUserMedia), ",\n mozGUM: ").concat(printNavigatorFlag(navigator.mozGetUserMedia), ",\n msGUM: ").concat(printNavigatorFlag(navigator.msGetUserMedia), ",\n window:\n AudioContext: ").concat(printNavigatorFlag(window.AudioContext), ",\n webkitAC: ").concat(printNavigatorFlag(window.webkitAudioContext), ",\n mozAC: ").concat(printNavigatorFlag(window.mozAudioContext), ",\n userAgent: ").concat(navigator.userAgent, "\n ");
|
|
3616
|
+
}
|
|
3617
|
+
// alan_btn/src/textChat/resize.ts
|
|
3618
|
+
var resizeInProcess = false;
|
|
3619
|
+
var dndInitMousePos = [0, 0];
|
|
3620
|
+
var chatHeight;
|
|
3621
|
+
var chatWidth;
|
|
3622
|
+
var typeBorderHor;
|
|
3623
|
+
var typeBorderVert;
|
|
3624
|
+
var chatInitLeftPos;
|
|
3625
|
+
var chatInitRightPos;
|
|
3626
|
+
var chatInitTopPos;
|
|
3627
|
+
var chatInitBottomPos;
|
|
3628
|
+
var chatTopPosBeforeResize;
|
|
3629
|
+
var chatBottomPosBeforeResize;
|
|
3630
|
+
var chatRightAligned;
|
|
3631
|
+
var chatLeftAligned;
|
|
3632
|
+
var chatTopAligned;
|
|
3633
|
+
var chatBottomAligned;
|
|
3634
|
+
function getBorderType(posInfo, chatHolderDiv) {
|
|
3635
|
+
if (Math.abs(chatHolderDiv.getBoundingClientRect().bottom - posInfo.clientY) < 10) {
|
|
3636
|
+
typeBorderHor = "bottom";
|
|
3637
|
+
}
|
|
3638
|
+
else if (Math.abs(chatHolderDiv.getBoundingClientRect().top - posInfo.clientY) < 10) {
|
|
3639
|
+
typeBorderHor = "top";
|
|
3640
|
+
}
|
|
3641
|
+
else {
|
|
3642
|
+
typeBorderHor = "none";
|
|
3643
|
+
}
|
|
3644
|
+
if (Math.abs(chatHolderDiv.getBoundingClientRect().left - posInfo.clientX) < 10) {
|
|
3645
|
+
typeBorderVert = "left";
|
|
3646
|
+
}
|
|
3647
|
+
else if (Math.abs(chatHolderDiv.getBoundingClientRect().right - posInfo.clientX) < 10) {
|
|
3648
|
+
typeBorderVert = "right";
|
|
3649
|
+
}
|
|
3650
|
+
else {
|
|
3651
|
+
typeBorderVert = "none";
|
|
3652
|
+
}
|
|
3653
|
+
return { typeBorderHor: typeBorderHor, typeBorderVert: typeBorderVert };
|
|
3654
|
+
}
|
|
3655
|
+
function isMouseInHeader(posInfo, chatHolderDiv) {
|
|
3656
|
+
if (chatHolderDiv.getBoundingClientRect().top < posInfo.clientY && posInfo.clientY < chatHolderDiv.getBoundingClientRect().top + 60 && chatHolderDiv.getBoundingClientRect().left < posInfo.clientX && posInfo.clientX < chatHolderDiv.getBoundingClientRect().right) {
|
|
3657
|
+
return true;
|
|
3658
|
+
}
|
|
3659
|
+
return false;
|
|
3660
|
+
}
|
|
3661
|
+
function onMouseHoverForResizeTextChat(e) {
|
|
3662
|
+
var chatHolderDiv = e.currentTarget;
|
|
3663
|
+
if (resizeInProcess)
|
|
3664
|
+
return;
|
|
3665
|
+
if (uiState.textChat.expanded)
|
|
3666
|
+
return;
|
|
3667
|
+
var posInfo = e.touches ? e.touches[0] : e;
|
|
3668
|
+
if (isMouseInHeader(posInfo, chatHolderDiv)) {
|
|
3669
|
+
chatHolderDiv.classList.add("with-hover");
|
|
3670
|
+
}
|
|
3671
|
+
else {
|
|
3672
|
+
chatHolderDiv.classList.remove("with-hover");
|
|
3673
|
+
}
|
|
3674
|
+
typeBorderHor = getBorderType(posInfo, chatHolderDiv).typeBorderHor;
|
|
3675
|
+
typeBorderVert = getBorderType(posInfo, chatHolderDiv).typeBorderVert;
|
|
3676
|
+
chatHolderDiv.classList.remove("none-none");
|
|
3677
|
+
chatHolderDiv.classList.remove("with-cursors");
|
|
3678
|
+
chatHolderDiv.classList.remove("top-left");
|
|
3679
|
+
chatHolderDiv.classList.remove("top-right");
|
|
3680
|
+
chatHolderDiv.classList.remove("bottom-left");
|
|
3681
|
+
chatHolderDiv.classList.remove("bottom-right");
|
|
3682
|
+
chatHolderDiv.classList.remove("none-left");
|
|
3683
|
+
chatHolderDiv.classList.remove("none-right");
|
|
3684
|
+
chatHolderDiv.classList.remove("top-none");
|
|
3685
|
+
chatHolderDiv.classList.remove("bottom-none");
|
|
3686
|
+
chatHolderDiv.classList.add(typeBorderHor + "-" + typeBorderVert);
|
|
3687
|
+
if (typeBorderHor !== "none" || typeBorderVert !== "none") {
|
|
3688
|
+
chatHolderDiv.classList.add("with-cursors");
|
|
3689
|
+
}
|
|
3690
|
+
}
|
|
3691
|
+
function onMouseDownForResizeTextChat(e) {
|
|
3692
|
+
var chatHolderDiv = e.currentTarget;
|
|
3693
|
+
if (uiState.textChat.expanded) {
|
|
3694
|
+
return;
|
|
3695
|
+
}
|
|
3696
|
+
resizeInProcess = true;
|
|
3697
|
+
var posInfo = e.touches ? e.touches[0] : e;
|
|
3698
|
+
dndInitMousePos = [
|
|
3699
|
+
posInfo.clientX,
|
|
3700
|
+
posInfo.clientY
|
|
3701
|
+
];
|
|
3702
|
+
var chatRect = chatHolderDiv.getBoundingClientRect();
|
|
3703
|
+
chatHeight = chatRect.height;
|
|
3704
|
+
chatWidth = chatRect.width;
|
|
3705
|
+
typeBorderHor = getBorderType(posInfo, chatHolderDiv).typeBorderHor;
|
|
3706
|
+
typeBorderVert = getBorderType(posInfo, chatHolderDiv).typeBorderVert;
|
|
3707
|
+
chatInitLeftPos = parseInt(chatHolderDiv.style.left);
|
|
3708
|
+
chatInitRightPos = parseInt(chatHolderDiv.style.right);
|
|
3709
|
+
chatInitTopPos = parseInt(chatHolderDiv.style.top);
|
|
3710
|
+
chatInitBottomPos = parseInt(chatHolderDiv.style.bottom);
|
|
3711
|
+
chatTopPosBeforeResize = chatRect.top;
|
|
3712
|
+
chatBottomPosBeforeResize = chatRect.bottom;
|
|
3713
|
+
chatRightAligned = chatHolderDiv.style.right;
|
|
3714
|
+
chatLeftAligned = chatHolderDiv.style.left;
|
|
3715
|
+
chatTopAligned = chatHolderDiv.style.top;
|
|
3716
|
+
chatBottomAligned = chatHolderDiv.style.bottom;
|
|
3717
|
+
}
|
|
3718
|
+
function onMouseUpForResizeTextChat() {
|
|
3719
|
+
resizeInProcess = false;
|
|
3720
|
+
}
|
|
3721
|
+
function onMouseMoveForResizeTextChat(e) {
|
|
3722
|
+
if (!resizeInProcess)
|
|
3723
|
+
return;
|
|
3724
|
+
var posInfo = e.touches ? e.touches[0] : e;
|
|
3725
|
+
if (posInfo.clientX >= 0 && posInfo.clientY >= 0 && posInfo.clientX <= window.innerWidth && posInfo.clientY <= window.innerHeight) {
|
|
3726
|
+
resizeTextChat(posInfo);
|
|
3727
|
+
}
|
|
3728
|
+
else {
|
|
3729
|
+
resizeInProcess = false;
|
|
3730
|
+
}
|
|
3731
|
+
}
|
|
3732
|
+
function resizeTextChat(posInfo) {
|
|
3733
|
+
var tempDeltaX = posInfo.clientX - dndInitMousePos[0];
|
|
3734
|
+
var tempDeltaY = posInfo.clientY - dndInitMousePos[1];
|
|
3735
|
+
if (typeBorderHor === "bottom") {
|
|
3736
|
+
if (canResizeByHeight(typeBorderHor, tempDeltaY)) {
|
|
3737
|
+
setChatHeight(chatHeight + tempDeltaY);
|
|
3738
|
+
changeBottomPosIfNeeded(tempDeltaY);
|
|
3739
|
+
}
|
|
3740
|
+
}
|
|
3741
|
+
else if (typeBorderHor === "top") {
|
|
3742
|
+
if (canResizeByHeight(typeBorderHor, tempDeltaY)) {
|
|
3743
|
+
setChatHeight(chatHeight - tempDeltaY);
|
|
3744
|
+
changeTopPosIfNeeded(tempDeltaY);
|
|
3745
|
+
}
|
|
3746
|
+
}
|
|
3747
|
+
if (typeBorderVert === "right") {
|
|
3748
|
+
if (canResizeByWidth(typeBorderVert, tempDeltaX)) {
|
|
3749
|
+
setChatWidth(chatWidth + tempDeltaX);
|
|
3750
|
+
changeRightPosIfNeeded(tempDeltaX);
|
|
3751
|
+
}
|
|
3752
|
+
}
|
|
3753
|
+
else if (typeBorderVert === "left") {
|
|
3754
|
+
if (canResizeByWidth(typeBorderVert, tempDeltaX)) {
|
|
3755
|
+
setChatWidth(chatWidth - tempDeltaX);
|
|
3756
|
+
changeLeftPosIfNeeded(tempDeltaX);
|
|
3757
|
+
}
|
|
3758
|
+
}
|
|
3759
|
+
}
|
|
3760
|
+
function canResizeByHeight(borderType, delta) {
|
|
3761
|
+
var _a, _b;
|
|
3762
|
+
var minChatHeight = ((_b = (_a = uiState.textChat.options) === null || _a === void 0 ? void 0 : _a.popup) === null || _b === void 0 ? void 0 : _b.minHeight) || uiState.textChat.defaults.minChatWidth;
|
|
3763
|
+
var expanding = borderType === "bottom" && delta > 0 || borderType === "top" && delta < 0;
|
|
3764
|
+
var h = borderType === "bottom" ? chatHeight + delta : chatHeight - delta;
|
|
3765
|
+
var newBottomtPos = chatBottomPosBeforeResize - delta;
|
|
3766
|
+
var newTopPos = chatTopPosBeforeResize + delta;
|
|
3767
|
+
if (borderType === "bottom" && newBottomtPos <= 0 && h >= chatHeight) {
|
|
3768
|
+
return false;
|
|
3769
|
+
}
|
|
3770
|
+
if (borderType === "top" && newTopPos <= 0 && h >= chatHeight) {
|
|
3771
|
+
return false;
|
|
3772
|
+
}
|
|
3773
|
+
return expanding ? h >= minChatHeight : h > minChatHeight;
|
|
3774
|
+
}
|
|
3775
|
+
function canResizeByWidth(borderType, delta) {
|
|
3776
|
+
var _a, _b;
|
|
3777
|
+
var minChatWidth = ((_b = (_a = uiState.textChat.options) === null || _a === void 0 ? void 0 : _a.popup) === null || _b === void 0 ? void 0 : _b.minWidth) || uiState.textChat.defaults.minChatWidth;
|
|
3778
|
+
var expanding = borderType === "right" && delta > 0 || borderType === "left" && delta < 0;
|
|
3779
|
+
var w = borderType === "right" ? chatWidth + delta : chatWidth - delta;
|
|
3780
|
+
var newRightPos = chatInitRightPos - delta;
|
|
3781
|
+
var newLeftPos = chatInitLeftPos + delta;
|
|
3782
|
+
if (borderType === "right" && newRightPos <= 0 && w >= chatWidth) {
|
|
3783
|
+
return false;
|
|
3784
|
+
}
|
|
3785
|
+
if (borderType === "left" && newLeftPos <= 0 && w >= chatWidth) {
|
|
3786
|
+
return false;
|
|
3787
|
+
}
|
|
3788
|
+
return expanding ? w >= minChatWidth : w > minChatWidth;
|
|
3789
|
+
}
|
|
3790
|
+
function setChatHeight(h) {
|
|
3791
|
+
var chatHolderDiv = document.getElementById("alan-btn-chat-holder");
|
|
3792
|
+
chatHolderDiv.style.height = h + "px";
|
|
3793
|
+
saveTextChatSizeAfterResize("height", h);
|
|
3794
|
+
}
|
|
3795
|
+
function setChatWidth(w) {
|
|
3796
|
+
var chatHolderDiv = document.getElementById("alan-btn-chat-holder");
|
|
3797
|
+
chatHolderDiv.style.width = w + "px";
|
|
3798
|
+
if (w < 300) {
|
|
3799
|
+
chatHolderDiv.classList.add("alan-chat-small");
|
|
3800
|
+
}
|
|
3801
|
+
else {
|
|
3802
|
+
chatHolderDiv.classList.remove("alan-chat-small");
|
|
3803
|
+
}
|
|
3804
|
+
saveTextChatSizeAfterResize("width", w);
|
|
3805
|
+
}
|
|
3806
|
+
function changeBottomPosIfNeeded(delta) {
|
|
3807
|
+
if (chatBottomAligned) {
|
|
3808
|
+
saveTextChatPositionAfterResize("bottom", chatInitBottomPos - delta);
|
|
3809
|
+
}
|
|
3810
|
+
}
|
|
3811
|
+
function changeTopPosIfNeeded(delta) {
|
|
3812
|
+
if (chatTopAligned) {
|
|
3813
|
+
saveTextChatPositionAfterResize("top", chatInitTopPos + delta);
|
|
3814
|
+
}
|
|
3815
|
+
}
|
|
3816
|
+
function changeRightPosIfNeeded(delta) {
|
|
3817
|
+
if (chatRightAligned) {
|
|
3818
|
+
saveTextChatPositionAfterResize("right", chatInitRightPos - delta);
|
|
3819
|
+
}
|
|
3820
|
+
}
|
|
3821
|
+
function changeLeftPosIfNeeded(delta) {
|
|
3822
|
+
if (chatLeftAligned) {
|
|
3823
|
+
saveTextChatPositionAfterResize("left", chatInitLeftPos + delta);
|
|
3824
|
+
}
|
|
3825
|
+
}
|
|
3826
|
+
function getKeyForSavingTextChatPositionAfterResize(prop) {
|
|
3827
|
+
return "alan-btn-text-chat-pos-".concat(prop, "-").concat(getProjectId());
|
|
3828
|
+
}
|
|
3829
|
+
function saveTextChatPositionAfterResize(prop, val) {
|
|
3830
|
+
if (val < 0)
|
|
3831
|
+
return;
|
|
3832
|
+
var chatHolderDiv = document.getElementById("alan-btn-chat-holder");
|
|
3833
|
+
chatHolderDiv.style[prop] = val + "px";
|
|
3834
|
+
if (isLocalStorageAvailable) {
|
|
3835
|
+
localStorage.setItem(getKeyForSavingTextChatPositionAfterResize(prop), val);
|
|
3836
|
+
}
|
|
3837
|
+
}
|
|
3838
|
+
function getTextChatSizeAfterResize(prop) {
|
|
3839
|
+
if (isLocalStorageAvailable) {
|
|
3840
|
+
return localStorage.getItem(getKeyForSavingTextChatPositionAfterResize(prop));
|
|
3841
|
+
}
|
|
3842
|
+
return null;
|
|
3843
|
+
}
|
|
3844
|
+
function saveTextChatSizeAfterResize(prop, val) {
|
|
3845
|
+
if (isLocalStorageAvailable) {
|
|
3846
|
+
localStorage.setItem(getKeyForSavingTextChatPositionAfterResize(prop), val);
|
|
3847
|
+
}
|
|
3848
|
+
}
|
|
3849
|
+
function getTextChatPositionAfterResize(prop) {
|
|
3850
|
+
if (isLocalStorageAvailable) {
|
|
3851
|
+
return localStorage.getItem(getKeyForSavingTextChatPositionAfterResize(prop));
|
|
3852
|
+
}
|
|
3853
|
+
return null;
|
|
3854
|
+
}
|
|
3855
|
+
function fixTextChatSizeIfNeeded(width, height, doubleMargin) {
|
|
3856
|
+
var defaultChatMargin = uiState.textChat.defaults.chatMargin;
|
|
3857
|
+
var margin = doubleMargin ? 2 * defaultChatMargin : defaultChatMargin;
|
|
3858
|
+
if (height !== null && window.innerHeight - defaultChatMargin < height) {
|
|
3859
|
+
setChatHeight(window.innerHeight - margin);
|
|
3860
|
+
}
|
|
3861
|
+
if (width !== null && window.innerWidth - defaultChatMargin < width) {
|
|
3862
|
+
setChatWidth(window.innerWidth - margin);
|
|
3863
|
+
}
|
|
3864
|
+
}
|
|
3865
|
+
// alan_btn/src/assets/btnIcons.ts
|
|
3866
|
+
var btnIcons = {
|
|
3867
|
+
roundedTriangleSecondLayerSrc: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iODBweCIgaGVpZ2h0PSI4MHB4IiB2aWV3Qm94PSIwIDAgODAgODAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjEgKDY3MDQ4KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5BbGFuIEJ1dHRvbiAvIEFuaW1hdGlvbiAvIGJ1dHRvbi1pbm5lci1zaGFwZTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iMTAwJSIgeTE9IjMuNzQ5Mzk5NDZlLTMxJSIgeDI9IjIuODYwODIwMDklIiB5Mj0iOTcuMTM5MTc5OSUiIGlkPSJsaW5lYXJHcmFkaWVudC0xIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEyIiBvZmZzZXQ9IjAlIj48L3N0b3A+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4wNCIgb2Zmc2V0PSIxMDAlIj48L3N0b3A+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxnIGlkPSJBbGFuLUJ1dHRvbi0vLUFuaW1hdGlvbi0vLWJ1dHRvbi1pbm5lci1zaGFwZSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPHBhdGggZD0iTTQwLjEwMDU0MjIsOSBMNDAuMTAwNTQyMiw5IEM1MC4wNzA0NzUxLDkgNTkuMTUxNjIzNSwxNC43MzM3OTM4IDYzLjQzODA5OCwyMy43MzUyMjE0IEw3MC40MjIwMjY3LDM4LjQwMTE5NyBDNzUuMTcxMDE0NSw0OC4zNzM4ODQ0IDcwLjkzNjM2OTMsNjAuMzA4MTYwMSA2MC45NjM2ODE5LDY1LjA1NzE0NzggQzU4LjI3NzU5NDksNjYuMzM2MjYwOCA1NS4zMzk5NzQ0LDY3IDUyLjM2NDg3ODksNjcgTDI3LjgzNjIwNTQsNjcgQzE2Ljc5MDUxMDQsNjcgNy44MzYyMDU0Myw1OC4wNDU2OTUgNy44MzYyMDU0Myw0NyBDNy44MzYyMDU0Myw0NC4wMjQ5MDQ1IDguNDk5OTQ0NTksNDEuMDg3Mjg0IDkuNzc5MDU3NiwzOC40MDExOTcgTDE2Ljc2Mjk4NjQsMjMuNzM1MjIxNCBDMjEuMDQ5NDYwOCwxNC43MzM3OTM4IDMwLjEzMDYwOTIsOSA0MC4xMDA1NDIyLDkgWiIgaWQ9ImlubmVyLWJnIiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTEpIj48L3BhdGg+CiAgICA8L2c+Cjwvc3ZnPg==\n",
|
|
3868
|
+
circleSecondLayerSrc: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iODBweCIgaGVpZ2h0PSI4MHB4IiB2aWV3Qm94PSIwIDAgODAgODAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjEgKDY3MDQ4KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5BbGFuIEJ1dHRvbiAvIEFuaW1hdGlvbiAvIGJ1dHRvbi1pbm5lci1zaGFwZS1zcGVha2luZyBiYWNrPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSIxMDAlIiB5MT0iMy43NDkzOTk0NmUtMzElIiB4Mj0iMi44NjA4MjAwOSUiIHkyPSI5Ny4xMzkxNzk5JSIgaWQ9ImxpbmVhckdyYWRpZW50LTEiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMTIiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjA0IiBvZmZzZXQ9IjEwMCUiPjwvc3RvcD4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgaWQ9IkFsYW4tQnV0dG9uLS8tQW5pbWF0aW9uLS8tYnV0dG9uLWlubmVyLXNoYXBlLXNwZWFraW5nLWJhY2siIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxjaXJjbGUgaWQ9ImlubmVyLWJnIiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTEpIiBjeD0iNDAiIGN5PSI0MCIgcj0iMzIiPjwvY2lyY2xlPgogICAgPC9nPgo8L3N2Zz4=\n",
|
|
3869
|
+
popupCloseIconImgBase64: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuNzczNDUgNy4wMDAwM0wxMy44Mzk4IDAuOTMzNjA0QzE0LjA1MzQgMC43MjAwMjIgMTQuMDUzNCAwLjM3Mzc0MSAxMy44Mzk4IDAuMTYwMTg2QzEzLjYyNjMgLTAuMDUzMzY4MSAxMy4yOCAtMC4wNTMzOTU1IDEzLjA2NjQgMC4xNjAxODZMNyA2LjIyNjYxTDAuOTMzNjA0IDAuMTYwMTg2QzAuNzIwMDIyIC0wLjA1MzM5NTUgMC4zNzM3NDEgLTAuMDUzMzk1NSAwLjE2MDE4NiAwLjE2MDE4NkMtMC4wNTMzNjgxIDAuMzczNzY4IC0wLjA1MzM5NTUgMC43MjAwNDkgMC4xNjAxODYgMC45MzM2MDRMNi4yMjY1OSA3TDAuMTYwMTg2IDEzLjA2NjRDLTAuMDUzMzk1NSAxMy4yOCAtMC4wNTMzOTU1IDEzLjYyNjMgMC4xNjAxODYgMTMuODM5OEMwLjI2Njk2NCAxMy45NDY2IDAuNDA2OTM2IDE0IDAuNTQ2OTA5IDE0QzAuNjg2ODgxIDE0IDAuODI2ODI3IDEzLjk0NjYgMC45MzM2MzEgMTMuODM5OEw3IDcuNzczNDVMMTMuMDY2NCAxMy44Mzk4QzEzLjE3MzIgMTMuOTQ2NiAxMy4zMTMyIDE0IDEzLjQ1MzEgMTRDMTMuNTkzMSAxNCAxMy43MzMgMTMuOTQ2NiAxMy44Mzk4IDEzLjgzOThDMTQuMDUzNCAxMy42MjYzIDE0LjA1MzQgMTMuMjggMTMuODM5OCAxMy4wNjY0TDcuNzczNDUgNy4wMDAwM1oiIGZpbGw9IiNCQkNGRTciLz4KPC9zdmc+Cg==",
|
|
3870
|
+
micIconSrc: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH9SURBVHgB7dvvUcIwGMfxByfADdjAEdQN3EA2YATcAJ2AEXADdALcgG4AGzwm13DQkNKWQBvK93OXF4W0Z36mf5IUEQAAAAAAAAAAgPOo6ocpS91bmfIuOM2ENHJhlVnbOoIwF1CVleCYCWas9U0kEQ+SjibXuDdJxEASYbtVg+rbwWDwKAm41QDFBJjE357SKXyTCDASAUYiwEgEGIkAIxFgJAKMRICRWgvQTRZs3IzLxef2rn38zmlxqmoT+L6Rpse/ltbGk36j/bFsKJRTqvZva6zc2TXQtHfofbSV+rYVx2pNmwFm3vbI2/6R+r4rjvUnLWkzQL9Rz972l9T3WXGsTPrGTsN794FloM5Uq00D+/kLUb28Cw8DYbwE6k1LgrOPKJNA/dBaykj6SItrvdZaAzcAzZc3bTBzVyYl9YZ6vJK3kL6yPS7QW+ZyJhvW3fS+HdPAWaDRiyYNdz1vecl/xs0oOe12p3Plxd+d2mX7t/482MnKlutt9i48CnydSf5M+Cv7xxFb78mUsSnDkn1ezeAjk3uh+Y0i1JOaWuu9vi/jTueZns/u29kwLhma98Z5g+CWpjwLirT4/Oezn01S63HJvNrhs4kdbqfyKoePKf1IBBiJACMRYCQCjESAkVIO8HDhKBM0o/tZFzsTzY9sAAAAAAAAAABAjH+9EqX09fBHaQAAAABJRU5ErkJggg==",
|
|
3871
|
+
alanLogoIconSrc: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgCAYAAACLz2ctAAAFtElEQVR4Ae3dL4wcZRjH8WeRKJJTTRBbc4JgkK26UCSXVIHkUBgS2uBAcCQIDAGCh8VAgkG0DsFhqAEqoKI1rCCgLiGhgYA53rd932S7bXdmdmfe3/vn+0kmW45pc7179tvZm3dmzQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0ZWaNOzs723cPJ247ZxrnZ7PZ0hr1hOFlt/1oOp9Zw5oeQFe/C+7habf97rY/TOPAfR4H1qjWC3i48mtlBd+xRjU7gKF+eysfooICLRfw8BEf+9Z0mqxgkwP4iPpFd9122zSarGCrBTzc8P9uuO1f02iugs0N4Ib6Rf+57RfTaK6CLRbwsMc+PxsVTKKpAexRv0hdwVesEc0MoPum+sHrU79IWcFja0RLBbxo/eoX+Qr+ZBrzVirYxACG+l2w4XwF/zKNY/d5P2WVa6WAL9iw+q1SnaKbu+0Nq1z1Axjq97xt747pTtFdqb2CLRRwyAuPx1FV0A9f1RWsegB3OPZbp1yoUHUFay/gGPWLqOAEqh3AEesXUcEJ1FzAMesXUcGRVTmAE9Qv8hVULdeqsoK1FnCK+kXKCla3UKG6AZywfpFftKoaQl/BuVWkxgIe2fRYrjWSqgYwXGS+b9NTLtc6qqmCtRVwymO/dcoKVnMxezUDGBabpqhfxNL9EdRUwJT1izgW3FEVAzhgqf3YfAU/N40qKlhLARX1827PZrPX3OPSNIqvYPEDKKyf91V4fNU0iq9gDQVU1e97V7/f/C/c44ndv8egQtEVLHoAxfW7vvbf75pG0RUsvYDK+p2ufoAKbqfYAcysfpGygpetQEUO4BYXmY/pofpF4gp+aAUqtYBDLzIfix+86x37qF4RF3kxe3EDmGC51SaPrV8U7ni/MI3iLmYvsYDK+t3oue9Vt/1p6c2tsKX7RQ1gqN+LpnGtq36R288P30emUdTS/dIKqHrhceqGqm/9oo9NU8GiLmAqZgDFx37XbCAq2E9JBSypfhEV7FDEAJZWv4gKdiulgCXW7x73+/3ZkaWlV0QFsx9Acf0WNg7VKbrsK1hCAVX1u+nqdcdG4P6chWlO0WVfwazfL9g9e59xD9+YxqfW7wXEaRiwjcKSKcVbgfm/w3O5vidx7gPov2EHlp6//8t3A/Zf9DlWFP59/OenOke9Ubb/BIdiHJjG0Ftv9D1MUB0LZnsxe87HgJ+Yhq/f3WG/xfbcN7jzFCHLtR6W5QC6b+aRe3jWNLa98dAl93k/2WM/VQUv57h0P9cCqpaY/2DD6xf54eu8G3+o4MI0slu6n90AhvrNLT3/hjS7/tgl9wpmdwFTjgVUPUu3OfZb17eCS9O9H1xWFcxqAMX1G+t94S6FszddVAsVsqpgbgVUPTvHvOOpr2CfV8TKhQrZVDCbASz82G/dxXCzzC7NVzCnAtZQv1WdP5ymgpkMoHs2vmn11C/ap4Ld5APovgjn3MPrpjH13e77VvCqachv9ZtDAf399eaWnn/TmanqF/WqYFhNs7T05BezSwcwnCBXfQF2Wuk8wFHP/VSrVY5NSF1A1bGf/6Fzr2t8R7AXbqS0kXChgq/gFRORrQcM9fvVNL6w3c96DOGH/T03ZH9v2km8aPV8OB5NSlnAkk+5DeXPjPRdqHBi6cmW7ksK2Fj9Il+/t6ngg1QFbKl+0ZDlWieWnqSCyQsorN8/bvvadAPo9a3g3DRfo+QVVBRQVb9bph0+r+9ChaVpFq0mr2DSAgqf2f6Um7/FhnoAo7e6bvUWvlY37f5QpJS0gqkLqFxwkMvweS917RAqqFiokLSCyQoYLjK/Zen5+n1p+fmg684L4bYa/l8MRQWTXMyesoDvm8bUCw62lfNyLT/wVb0zOwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANfsfb80MpE9p2rYAAAAASUVORK5CYII=",
|
|
3872
|
+
alanUserAvatarIconSrc: "data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iYWxhbi1idG5fX3VzZXItYXZhdGFyIiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjEyIiBjeT0iNiIgcj0iNCIgc3Ryb2tlPSIjMUMyNzRDIiBzdHJva2Utd2lkdGg9IjEuNSIvPgo8cGF0aCBkPSJNMTUgMjAuNjE1MUMxNC4wOTA3IDIwLjg2MTkgMTMuMDczNiAyMSAxMiAyMUM4LjEzNDAxIDIxIDUgMTkuMjA5MSA1IDE3QzUgMTQuNzkwOSA4LjEzNDAxIDEzIDEyIDEzQzE1Ljg2NiAxMyAxOSAxNC43OTA5IDE5IDE3QzE5IDE3LjM0NTMgMTguOTIzNCAxNy42ODA0IDE4Ljc3OTUgMTgiIHN0cm9rZT0iIzFDMjc0QyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4="
|
|
3873
|
+
};
|
|
3874
|
+
// alan_btn/src/getTextAreaFontSize.ts
|
|
3875
|
+
function getTextAreaFontSize(mobile, value) {
|
|
3876
|
+
if (mobile) {
|
|
3877
|
+
return Math.max(16, value);
|
|
3878
|
+
}
|
|
3879
|
+
return value;
|
|
3880
|
+
}
|
|
3881
|
+
// alan_btn/src/const/defaultBtnColorOptions.ts
|
|
3882
|
+
var defaultBtnColorOptions = {
|
|
3883
|
+
"idle": {
|
|
3884
|
+
"background": {
|
|
3885
|
+
"color": [
|
|
3886
|
+
"rgb(34, 203, 255)",
|
|
3887
|
+
"rgb(25, 149, 255)"
|
|
3888
|
+
]
|
|
3889
|
+
},
|
|
3890
|
+
"hover": {
|
|
3891
|
+
"color": [
|
|
3892
|
+
"rgba(0, 70, 255, 0.95)",
|
|
3893
|
+
"rgba(0, 156, 255, 0.95)"
|
|
3894
|
+
]
|
|
3895
|
+
}
|
|
3896
|
+
},
|
|
3897
|
+
"listen": {
|
|
3898
|
+
"background": {
|
|
3899
|
+
"color": [
|
|
3900
|
+
"rgba(0, 70, 255, 0.95)",
|
|
3901
|
+
"rgba(0, 156, 255, 0.95)"
|
|
3902
|
+
]
|
|
3903
|
+
},
|
|
3904
|
+
"hover": {
|
|
3905
|
+
"color": [
|
|
3906
|
+
"rgba(0, 70, 255, 0.95)",
|
|
3907
|
+
"rgb(0, 70, 255)"
|
|
3908
|
+
]
|
|
3909
|
+
}
|
|
3910
|
+
},
|
|
3911
|
+
"process": {
|
|
3912
|
+
"background": {
|
|
3913
|
+
"color": [
|
|
3914
|
+
"rgba(0, 255, 205, 0.95)",
|
|
3915
|
+
"rgba(0, 115, 255, 0.95)"
|
|
3916
|
+
]
|
|
3917
|
+
},
|
|
3918
|
+
"hover": {
|
|
3919
|
+
"color": [
|
|
3920
|
+
"rgb(0, 115, 255)",
|
|
3921
|
+
"rgba(0, 115, 255, 0.95)"
|
|
3922
|
+
]
|
|
3923
|
+
}
|
|
3924
|
+
},
|
|
3925
|
+
"reply": {
|
|
3926
|
+
"background": {
|
|
3927
|
+
"color": [
|
|
3928
|
+
"rgba(122, 40, 255, 0.95)",
|
|
3929
|
+
"rgba(61, 122, 255, 0.95)"
|
|
3930
|
+
]
|
|
3931
|
+
},
|
|
3932
|
+
"hover": {
|
|
3933
|
+
"color": [
|
|
3934
|
+
"rgba(122, 40, 255, 0.95)",
|
|
3935
|
+
"rgb(122, 40, 255)"
|
|
3936
|
+
]
|
|
3937
|
+
}
|
|
3938
|
+
},
|
|
3939
|
+
"textChat": {
|
|
3940
|
+
"background": {
|
|
3941
|
+
"color": ["#1eb6e5", "#1995ff"],
|
|
3942
|
+
"angle": 45
|
|
3943
|
+
},
|
|
3944
|
+
"hover": {
|
|
3945
|
+
"color": ["#1ba3ce", "#1686e5"],
|
|
3946
|
+
"angle": 45
|
|
3947
|
+
},
|
|
3948
|
+
"shadow": {
|
|
3949
|
+
"color": ["#6693bc", "#b3c9de"]
|
|
3950
|
+
}
|
|
3951
|
+
},
|
|
3952
|
+
"textChatAvatar": {
|
|
3953
|
+
"background": {
|
|
3954
|
+
"color": ["#1eb6e5", "#1995ff"],
|
|
3955
|
+
"angle": 45
|
|
3956
|
+
},
|
|
3957
|
+
"hover": {
|
|
3958
|
+
"color": ["#1ba3ce", "#1686e5"],
|
|
3959
|
+
"angle": 45
|
|
3960
|
+
},
|
|
3961
|
+
"shadow": {
|
|
3962
|
+
"color": ["#6693bc", "#b3c9de"]
|
|
3963
|
+
}
|
|
3964
|
+
},
|
|
3965
|
+
"textChatUserAvatar": {
|
|
3966
|
+
"background": {
|
|
3967
|
+
"color": ["#b2d6ff", "#b2d6ff"],
|
|
3968
|
+
"angle": 45
|
|
3969
|
+
},
|
|
3970
|
+
"hover": {
|
|
3971
|
+
"color": ["#1ba3ce", "#1686e5"],
|
|
3972
|
+
"angle": 45
|
|
3973
|
+
},
|
|
3974
|
+
"shadow": {
|
|
3975
|
+
"color": ["#6693bc", "#b3c9de"]
|
|
3976
|
+
}
|
|
3977
|
+
}
|
|
3978
|
+
};
|
|
3979
|
+
// alan_btn/src/styles/common.ts
|
|
3980
|
+
function getStyleSheetMarker(andFlag) {
|
|
3981
|
+
return ".alan-" + getProjectId() + (andFlag ? "" : " ");
|
|
3982
|
+
}
|
|
3983
|
+
function generateKeyFrame(name, rule) {
|
|
3984
|
+
var prefixes = ["@-webkit-keyframes", "@keyframes"];
|
|
3985
|
+
var r = "";
|
|
3986
|
+
for (var i = 0; i < prefixes.length; i++) {
|
|
3987
|
+
r += prefixes[i] + " " + name + "{" + rule + "} ";
|
|
3988
|
+
}
|
|
3989
|
+
return r;
|
|
3990
|
+
}
|
|
3991
|
+
function mergeOptionsForStyleSheet(webOptions) {
|
|
3992
|
+
var predefinedBtnColorOptions = defaultBtnColorOptions;
|
|
3993
|
+
if (webOptions === null || webOptions === void 0 ? void 0 : webOptions.btnOptions) {
|
|
3994
|
+
if (webOptions === null || webOptions === void 0 ? void 0 : webOptions.btnOptions.btnLayerOptions) {
|
|
3995
|
+
predefinedBtnColorOptions = defaultBtnColorOptions;
|
|
3996
|
+
}
|
|
3997
|
+
else {
|
|
3998
|
+
predefinedBtnColorOptions = (webOptions === null || webOptions === void 0 ? void 0 : webOptions.btnOptions) ? __assign(__assign({}, defaultBtnColorOptions), webOptions === null || webOptions === void 0 ? void 0 : webOptions.btnOptions) : defaultBtnColorOptions;
|
|
3999
|
+
}
|
|
4000
|
+
}
|
|
4001
|
+
return predefinedBtnColorOptions;
|
|
4002
|
+
}
|
|
4003
|
+
// alan_btn/src/styles/chat.ts
|
|
4004
|
+
function generateCssForChat(webOptions) {
|
|
4005
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, _159, _160, _161, _162, _163, _164, _165, _166, _167, _168, _169, _170, _171, _172, _173, _174, _175;
|
|
4006
|
+
var keyFrames = "";
|
|
4007
|
+
var textChatOptions = uiState.textChat.options;
|
|
4008
|
+
var defaultMinChatHeight = 400;
|
|
4009
|
+
var defaultChatHeight = 700;
|
|
4010
|
+
var chatHeaderHeight = 40;
|
|
4011
|
+
var chatTextareaLineHieght = 1.25;
|
|
4012
|
+
var textareaHolderHeight = 67;
|
|
4013
|
+
var chatTextareaHeight = 50;
|
|
4014
|
+
var chatMicBtnActiveSize = 34;
|
|
4015
|
+
var textChatScrollSize = 6;
|
|
4016
|
+
var defaultChatTextareaFontSize = 15;
|
|
4017
|
+
var textChatAppearAnimationMs = uiState.textChat.defaults.appearAnimationMs;
|
|
4018
|
+
var cssChatHeight = getTextChatSizeAfterResize("height");
|
|
4019
|
+
var cssChatWidth = getTextChatSizeAfterResize("width");
|
|
4020
|
+
fixTextChatSizeIfNeeded(cssChatWidth, cssChatHeight, true);
|
|
4021
|
+
cssChatHeight = getTextChatSizeAfterResize("height");
|
|
4022
|
+
cssChatWidth = getTextChatSizeAfterResize("width");
|
|
4023
|
+
if (cssChatHeight) {
|
|
4024
|
+
cssChatHeight = "".concat(cssChatHeight, "px");
|
|
4025
|
+
}
|
|
4026
|
+
else {
|
|
4027
|
+
cssChatHeight = "".concat(migrateHeightFromPercent((_a = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _a === void 0 ? void 0 : _a.height) || defaultChatHeight, "px");
|
|
4028
|
+
}
|
|
4029
|
+
function migrateHeightFromPercent(val) {
|
|
4030
|
+
if (val && +val <= 100) {
|
|
4031
|
+
return defaultChatHeight;
|
|
4032
|
+
}
|
|
4033
|
+
return val;
|
|
4034
|
+
}
|
|
4035
|
+
if (cssChatWidth) {
|
|
4036
|
+
cssChatWidth = "".concat(cssChatWidth, "px");
|
|
4037
|
+
}
|
|
4038
|
+
else {
|
|
4039
|
+
cssChatWidth = "".concat(((_b = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _b === void 0 ? void 0 : _b.width) || "400", "px");
|
|
4040
|
+
}
|
|
4041
|
+
var chatBgColor1 = ((_c = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _c === void 0 ? void 0 : _c.backgroundColor) || "#DAEBFF";
|
|
4042
|
+
var chatBgColor2 = ((_d = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _d === void 0 ? void 0 : _d.backgroundColor2) || "#ffffff";
|
|
4043
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder {\n position: fixed;\n height: ".concat(cssChatHeight, ";\n min-height: ").concat(((_e = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _e === void 0 ? void 0 : _e.minHeight) || defaultMinChatHeight, "px;\n max-height: ").concat(((_f = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _f === void 0 ? void 0 : _f.maxHeight) || "1200", "px;\n width: ").concat(cssChatWidth, ";\n min-width: ").concat(((_g = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _g === void 0 ? void 0 : _g.minWidth) || uiState.textChat.defaults.minChatWidth, "px;\n max-width: ").concat(((_h = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _h === void 0 ? void 0 : _h.maxWidth) || "1200", "px;\n display: none;\n transform: scale(0);\n opacity: 0;\n }");
|
|
4044
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.alan-btn_text-chat-full-screen {\n position: fixed;\n height: 100%!important;\n min-height: 100%!important;\n max-height: 100%!important;\n width: 100%!important;\n min-width: 100%!important;\n max-width: 100%!important;\n top:0!important;\n bottom:0!important;\n left:0!important;\n right:0!important;\n }";
|
|
4045
|
+
var sideBarAnimaDuration = 200;
|
|
4046
|
+
var sideBarWidth = 280;
|
|
4047
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-side-bar {\n min-height: 100%;\n max-height: 100%;\n height: 100%;\n background-color: ".concat(chatBgColor1, ";\n box-shadow: inset 1px 0px 13px 0px rgba(16, 39, 126, 0.2);\n display:none;\n transition: width ").concat(sideBarAnimaDuration, "ms ease-in-out, max-width ").concat(sideBarAnimaDuration, "ms ease-in-out, min-width ").concat(sideBarAnimaDuration, "ms ease-in-out;\n }");
|
|
4048
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_text-chat-full-screen .alan-btn__chat-side-bar {\n display: flex;\n width: 0px;\n min-width: 0px;\n max-width: 0px;\n }";
|
|
4049
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_text-chat-full-screen.alan-btn__side-bar-expanded .alan-btn__chat-side-bar {\n width: ".concat(sideBarWidth, "px;\n min-width: ").concat(sideBarWidth, "px;\n max-width: ").concat(sideBarWidth, "px;\n transition: width ").concat(sideBarAnimaDuration, "ms ease-in-out, max-width ").concat(sideBarAnimaDuration, "ms ease-in-out, min-width ").concat(sideBarAnimaDuration, "ms ease-in-out;\n }");
|
|
4050
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_text-chat-full-screen .alan-btn__chat {\n border-radius:0!important;\n flex-direction: row;\n }";
|
|
4051
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_text-chat-full-screen .alan-btn__chat-messages {\n max-width: 870px;\n width: 100%;\n margin: 0 auto;\n }";
|
|
4052
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_text-chat-full-screen .alan-btn__chat-textarea-holder {\n max-width: 900px;\n min-width: initial;\n margin: 0 auto;\n }";
|
|
4053
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-enter-full-screen-mode {\n display: block;\n min-width: 20px;\n }";
|
|
4054
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-exit-full-screen-mode {\n display: none;\n min-width: 20px;\n }";
|
|
4055
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_text-chat-full-screen .alan-btn__chat-enter-full-screen-mode {\n display: none;\n }";
|
|
4056
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_text-chat-full-screen .alan-btn__chat-exit-full-screen-mode {\n display: block;\n }";
|
|
4057
|
+
keyFrames += getStyleSheetMarker() + ".alan-text-chat__openning {\n transform: scale(0);\n opacity: 0;\n animation: text-chat-appear-anim ".concat(textChatAppearAnimationMs, "ms ease-in-out forwards;\n }");
|
|
4058
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("text-chat-appear-anim", "\n 0%{\n transform: scale(0);\n opacity: 0;\n }\n 100%{\n transform: scale(1);\n opacity: 1;\n }\n ");
|
|
4059
|
+
keyFrames += getStyleSheetMarker() + ".alan-text-chat__closing {\n transform: scale(1);\n opacity: 1;\n animation: text-chat-disappear-anim ".concat(textChatAppearAnimationMs, "ms ease-in-out forwards;\n }");
|
|
4060
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("text-chat-disappear-anim", "\n 0%{\n transform: scale(1);\n opacity: 1;\n }\n 100%{\n transform: scale(0);\n opacity: 0;\n }\n ");
|
|
4061
|
+
keyFrames += ".mobile" + getStyleSheetMarker() + ".alan-btn__chat-holder {\n position: fixed; \n height: 100%;\n min-height: 100%;\n max-height: 100%;\n width: 100vw;\n min-width: 100vw;\n max-width: 100vw;\n display: none;\n top: 0;\n bottom:0;\n left:0;\n right:0;\n border-radius: 0px;\n }";
|
|
4062
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.bottom-none {\n cursor: ns-resize;\n }";
|
|
4063
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.top-none {\n cursor: ns-resize;\n }";
|
|
4064
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.none-left {\n cursor: ew-resize;\n }";
|
|
4065
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.none-right {\n cursor: ew-resize;\n }";
|
|
4066
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.top-left {\n cursor: nwse-resize;\n }";
|
|
4067
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.bottom-right {\n cursor: nwse-resize;\n }";
|
|
4068
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.top-right {\n cursor: nesw-resize;\n }";
|
|
4069
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.bottom-left {\n cursor: nesw-resize;\n }";
|
|
4070
|
+
var defaulPopupBorderRadius = 20;
|
|
4071
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat {\n height: 100%;\n position: relative;\n overflow: hidden;\n display: flex;\n width: 100%;\n min-width: 100%;\n max-width: 100%;\n flex: 2;\n position: relative;\n flex-direction: column;\n box-shadow: 0px 5px 44px rgba(0, 0, 0, 0.15);\n border-radius: ".concat(((_k = (_j = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _j === void 0 ? void 0 : _j.borderRadius) === null || _k === void 0 ? void 0 : _k.topLeft) || defaulPopupBorderRadius, "px ").concat(((_m = (_l = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _l === void 0 ? void 0 : _l.borderRadius) === null || _m === void 0 ? void 0 : _m.topRight) || defaulPopupBorderRadius, "px ").concat(((_p = (_o = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _o === void 0 ? void 0 : _o.borderRadius) === null || _p === void 0 ? void 0 : _p.bottomRight) || defaulPopupBorderRadius, "px ").concat(((_r = (_q = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _q === void 0 ? void 0 : _q.borderRadius) === null || _r === void 0 ? void 0 : _r.bottomLeft) || defaulPopupBorderRadius, "px;\n }");
|
|
4072
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__popup-chat {\n height: 100%;\n position: relative;\n overflow: hidden;\n display: flex;\n flex: 2;\n position: relative;\n flex-direction: column;\n background: linear-gradient(180deg, ".concat(chatBgColor2, " 0%, ").concat(chatBgColor2, " 15%, ").concat(chatBgColor1, " 70%, ").concat(chatBgColor1, " 100%);\n animation: chat-appear 300ms ease-in-out forwards;\n transform: scale(1);\n opacity: 1; \n }");
|
|
4073
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-btn__sound-bar-1", "\n 0% {\n opacity: 0; \n transform: scale(0);\n }\n 100% {\n opacity: 1; \n transform: scale(1); \n }");
|
|
4074
|
+
keyFrames += ".mobile" + getStyleSheetMarker() + ".alan-btn__chat {\n border-radius: 0px;\n }";
|
|
4075
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-textarea-holder {\n width: 100%;\n height: ".concat(textareaHolderHeight, "px;\n max-height: ").concat(textareaHolderHeight, "px;\n min-height: ").concat(textareaHolderHeight, "px;\n position: relative;\n }");
|
|
4076
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages-empty-block {\n flex: 1 1 auto;\n }";
|
|
4077
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages-wrapper {\n width: 100%;\n height: calc(100% - ".concat(chatHeaderHeight + textareaHolderHeight, "px);\n max-height: calc(100% - ").concat(chatHeaderHeight + textareaHolderHeight, "px);\n min-height: calc(100% - ").concat(chatHeaderHeight + textareaHolderHeight, "px);\n overflow-y: scroll;\n overflow-x: hidden;\n padding: 20px 10px;\n display: flex;\n flex-shrink: 0;\n flex-direction: column-reverse;\n }");
|
|
4078
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages {\n display: flex;\n flex-shrink: 0;\n flex-direction: column;\n }";
|
|
4079
|
+
var headerBg = ((_s = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.header) === null || _s === void 0 ? void 0 : _s.backgroundColor) || "#FFFFFF";
|
|
4080
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header {\n width: 100%;\n height: ".concat(chatHeaderHeight, "px;\n max-height: ").concat(chatHeaderHeight, "px;\n min-height: ").concat(chatHeaderHeight, "px;\n color: #0f2029;\n padding: 0px 15px;\n padding-top: 12px;\n background: ").concat(headerBg, ";\n color: ").concat(((_t = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.header) === null || _t === void 0 ? void 0 : _t.color) || "#000000", ";\n text-align: center;\n text-overflow: ellipsis;\n white-space: nowrap;\n position:relative;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n }");
|
|
4081
|
+
var headerFontSize = ((_u = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.header) === null || _u === void 0 ? void 0 : _u.fontSize) || 16;
|
|
4082
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-title {\n max-width: calc(100% - 112px);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: inline-block;\n font-weight: 600;\n font-size: ".concat(headerFontSize, "px;\n position: relative;\n top: ").concat(headerFontSize >= 20 ? "-2" : "0", "px;\n }");
|
|
4083
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-gradient {\n width: 100%;\n height: 15px;\n max-height: 15px;\n min-height: 15px;\n position: absolute;\n left:0;\n width: 100%;\n top: ".concat(chatHeaderHeight, "px;\n background: linear-gradient(180deg, ").concat(headerBg, " 30%, rgba(255, 255, 255, 0) 100%);\n }");
|
|
4084
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-left-resizer {\n transition: 300ms opacity ease-in-out;\n position: absolute;\n top: 3px;\n left: 5px;\n transform: rotate(180deg);\n pointer-events: none;\n display: block;\n opacity: 0;\n height: 18px;\n width: 14px;\n }";
|
|
4085
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-right-resizer {\n transition: 300ms opacity ease-in-out;\n position: absolute;\n top: 3px;\n right: 5px;\n transform: rotate(-90deg);\n pointer-events: none;\n display: block;\n opacity: 0;\n height: 18px;\n width: 14px;\n }";
|
|
4086
|
+
keyFrames += getStyleSheetMarker() + ".with-hover .alan-btn__chat-header-right-resizer {\n opacity: 0.8;\n transition: 300ms opacity ease-in-out;\n }";
|
|
4087
|
+
keyFrames += getStyleSheetMarker() + ".with-hover .alan-btn__chat-header-left-resizer {\n opacity: 0.8;\n transition: 300ms opacity ease-in-out;\n }";
|
|
4088
|
+
keyFrames += getStyleSheetMarker() + ".with-hover .alan-btn__chat-header::after {\n opacity: 0.8;\n transition: 300ms opacity ease-in-out;\n }";
|
|
4089
|
+
keyFrames += getStyleSheetMarker() + ".with-cursors .alan-btn__chat-messages {\n pointer-events: none;\n }";
|
|
4090
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-unmute-btn {\n display: flex;\n align-items: center;\n height: ".concat(chatHeaderHeight, "px;\n font-size: 14px;\n cursor: pointer;\n margin-left: 6px;\n }");
|
|
4091
|
+
if (isMobile()) {
|
|
4092
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-unmute-btn {\n display: none;\n }";
|
|
4093
|
+
}
|
|
4094
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-unmute-btn svg path {\n fill: ".concat(((_y = (_x = (_w = (_v = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _v === void 0 ? void 0 : _v.icons) === null || _w === void 0 ? void 0 : _w.mute) === null || _x === void 0 ? void 0 : _x["default"]) === null || _y === void 0 ? void 0 : _y.fill) || "#969EB0", ";\n }");
|
|
4095
|
+
if (!isMobile()) {
|
|
4096
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-unmute-btn:hover svg path {\n fill: ".concat(((_2 = (_1 = (_0 = (_z = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _z === void 0 ? void 0 : _z.icons) === null || _0 === void 0 ? void 0 : _0.mute) === null || _1 === void 0 ? void 0 : _1.hover) === null || _2 === void 0 ? void 0 : _2.fill) || "#0046ff", ";\n }");
|
|
4097
|
+
}
|
|
4098
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-unmute-btn.disabled {\n pointer-events: none;\n }";
|
|
4099
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-unmute-btn.disabled {\n opacity: 0.4\n }";
|
|
4100
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-clear-btn {\n width: 17px;\n display: flex;\n align-items: center;\n height: ".concat(chatHeaderHeight, "px;\n font-size: 14px;\n cursor: pointer;\n margin-left: 6px;\n }");
|
|
4101
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_text-chat-full-screen .alan-btn__chat-header-clear-btn {\n display: none;\n }";
|
|
4102
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-clear-btn.disabled {\n pointer-events: none;\n }";
|
|
4103
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-clear-btn.disabled {\n opacity: 0.4\n }";
|
|
4104
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-clear-btn svg path {\n fill: ".concat(((_6 = (_5 = (_4 = (_3 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _3 === void 0 ? void 0 : _3.icons) === null || _4 === void 0 ? void 0 : _4.clear) === null || _5 === void 0 ? void 0 : _5["default"]) === null || _6 === void 0 ? void 0 : _6.fill) || "#969EB0", ";\n }");
|
|
4105
|
+
if (!isMobile()) {
|
|
4106
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-clear-btn:hover svg path {\n fill: ".concat(((_10 = (_9 = (_8 = (_7 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _7 === void 0 ? void 0 : _7.icons) === null || _8 === void 0 ? void 0 : _8.clear) === null || _9 === void 0 ? void 0 : _9.hover) === null || _10 === void 0 ? void 0 : _10.fill) || "#ff005c", ";\n }");
|
|
4107
|
+
}
|
|
4108
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-left-icons {\n position: relative;\n top: -12px;\n height: ".concat(chatHeaderHeight, "px;\n display: flex;\n align-items: center;\n }");
|
|
4109
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-right-icons {\n position: relative;\n top: -12px;\n height: ".concat(chatHeaderHeight, "px;\n display: flex;\n align-items: center;\n }");
|
|
4110
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__side-bar-header {\n display: flex;\n flex-direction: row;\n padding: 0 10px;\n width: 100%;\n justify-content: space-between;\n white-space:nowrap;\n }";
|
|
4111
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__side-bar__toogle-side-bar-btn {\n margin-right: 6px;\n height: ".concat(chatHeaderHeight, "px;\n display: flex;\n align-items: center;\n cursor: pointer;\n pointer-events: all;\n }");
|
|
4112
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__side-bar__toogle-side-bar-btn svg path {\n fill: ".concat(((_14 = (_13 = (_12 = (_11 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _11 === void 0 ? void 0 : _11.icons) === null || _12 === void 0 ? void 0 : _12.sideBar) === null || _13 === void 0 ? void 0 : _13["default"]) === null || _14 === void 0 ? void 0 : _14.fill) || "#969EB0", ";\n }");
|
|
4113
|
+
if (!isMobile()) {
|
|
4114
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__side-bar__toogle-side-bar-btn:hover svg path {\n fill: ".concat(((_18 = (_17 = (_16 = (_15 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _15 === void 0 ? void 0 : _15.icons) === null || _16 === void 0 ? void 0 : _16.sideBar) === null || _17 === void 0 ? void 0 : _17.hover) === null || _18 === void 0 ? void 0 : _18.fill) || "#0046ff", ";\n }");
|
|
4115
|
+
}
|
|
4116
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__side-bar__close-chat-btn {\n margin-right: 6px;\n height: ".concat(chatHeaderHeight, "px;\n display: flex;\n align-items: center;\n cursor: pointer;\n pointer-events: all;\n }");
|
|
4117
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__side-bar__close-chat-btn svg path {\n fill: ".concat(((_22 = (_21 = (_20 = (_19 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _19 === void 0 ? void 0 : _19.icons) === null || _20 === void 0 ? void 0 : _20.close) === null || _21 === void 0 ? void 0 : _21["default"]) === null || _22 === void 0 ? void 0 : _22.fill) || "#969EB0", ";\n }");
|
|
4118
|
+
if (!isMobile()) {
|
|
4119
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__side-bar__close-chat-btn:hover svg path {\n fill: ".concat(((_26 = (_25 = (_24 = (_23 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _23 === void 0 ? void 0 : _23.icons) === null || _24 === void 0 ? void 0 : _24.close) === null || _25 === void 0 ? void 0 : _25.hover) === null || _26 === void 0 ? void 0 : _26.fill) || "#97989c", ";\n }");
|
|
4120
|
+
}
|
|
4121
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__side-bar__new-chat-btn {\n margin-right: 6px;\n height: ".concat(chatHeaderHeight, "px;\n display: flex;\n align-items: center;\n cursor: pointer;\n pointer-events: all;\n color: #000;\n padding: 2px 8px;\n }");
|
|
4122
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__side-panel-chat-btn {\n margin-right: 6px;\n height: ".concat(chatHeaderHeight, "px;\n display: flex;\n align-items: center;\n cursor: pointer;\n pointer-events: all;\n display:none;\n }");
|
|
4123
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_text-chat-full-screen .alan-btn__side-panel-chat-btn {\n display:flex;\n }";
|
|
4124
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_text-chat-full-screen.alan-btn__side-bar-expanded .alan-btn__side-panel-chat-btn {\n display:none;\n }";
|
|
4125
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__side-panel-chat-btn svg {\n min-width: 22px;\n }";
|
|
4126
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__side-panel-chat-btn svg path {\n fill: ".concat(((_30 = (_29 = (_28 = (_27 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _27 === void 0 ? void 0 : _27.icons) === null || _28 === void 0 ? void 0 : _28.sideBar) === null || _29 === void 0 ? void 0 : _29["default"]) === null || _30 === void 0 ? void 0 : _30.fill) || "#969EB0", ";\n }");
|
|
4127
|
+
if (!isMobile()) {
|
|
4128
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__side-panel-chat-btn:hover svg path {\n fill: ".concat(((_34 = (_33 = (_32 = (_31 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _31 === void 0 ? void 0 : _31.icons) === null || _32 === void 0 ? void 0 : _32.sideBar) === null || _33 === void 0 ? void 0 : _33.hover) === null || _34 === void 0 ? void 0 : _34.fill) || "#0046ff", ";\n }");
|
|
4129
|
+
}
|
|
4130
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__close-chat-btn {\n width: 15px;\n margin-right: 6px;\n height: ".concat(chatHeaderHeight, "px;\n display: flex;\n align-items: center;\n cursor: pointer;\n pointer-events: all;\n }");
|
|
4131
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_text-chat-full-screen.alan-btn__side-bar-expanded .alan-btn__close-chat-btn {\n display: none;\n }";
|
|
4132
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__close-chat-btn svg path {\n fill: ".concat(((_38 = (_37 = (_36 = (_35 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _35 === void 0 ? void 0 : _35.icons) === null || _36 === void 0 ? void 0 : _36.close) === null || _37 === void 0 ? void 0 : _37["default"]) === null || _38 === void 0 ? void 0 : _38.fill) || "#969EB0", ";\n }");
|
|
4133
|
+
if (!isMobile()) {
|
|
4134
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__close-chat-btn:hover svg path {\n fill: ".concat(((_42 = (_41 = (_40 = (_39 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _39 === void 0 ? void 0 : _39.icons) === null || _40 === void 0 ? void 0 : _40.close) === null || _41 === void 0 ? void 0 : _41.hover) === null || _42 === void 0 ? void 0 : _42.fill) || "#97989c", ";\n }");
|
|
4135
|
+
}
|
|
4136
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__expand-collapse-chat-btn {\n width: 15px;\n margin-right: 6px;\n height: ".concat(chatHeaderHeight, "px;\n display: ").concat(((_44 = (_43 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _43 === void 0 ? void 0 : _43.fullScreenMode) === null || _44 === void 0 ? void 0 : _44.enabled) ? "flex" : "none", ";\n align-items: center;\n cursor: pointer;\n pointer-events: all;\n }");
|
|
4137
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__expand-collapse-chat-btn svg path {\n fill: ".concat(((_48 = (_47 = (_46 = (_45 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _45 === void 0 ? void 0 : _45.icons) === null || _46 === void 0 ? void 0 : _46.fullScreen) === null || _47 === void 0 ? void 0 : _47["default"]) === null || _48 === void 0 ? void 0 : _48.fill) || "#969EB0", ";\n }");
|
|
4138
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__expand-collapse-chat-btn:hover svg path {\n fill: ".concat(((_52 = (_51 = (_50 = (_49 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _49 === void 0 ? void 0 : _49.icons) === null || _50 === void 0 ? void 0 : _50.fullScreen) === null || _51 === void 0 ? void 0 : _51.hover) === null || _52 === void 0 ? void 0 : _52.fill) || "#0046ff", ";\n }");
|
|
4139
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages-wrapper::-webkit-scrollbar {\n width: ".concat(textChatScrollSize, "px;\n height: ").concat(textChatScrollSize, "px;\n }");
|
|
4140
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages-wrapper::-webkit-scrollbar-thumb {\n border-radius: 3px;\n background-color: rgba(224, 224, 224, 0.795);\n transition: background-color 300ms ease-in-out;\n }";
|
|
4141
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages-wrapper::-webkit-scrollbar-thumb:hover {\n background-color: rgba(230, 230, 230, 0.856);\n transition: background-color 300ms ease-in-out;\n }";
|
|
4142
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages-wrapper::-webkit-scrollbar-track {\n border-radius: 3px;\n background: transparent;\n }";
|
|
4143
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-textarea-holder-gradient {\n background: linear-gradient(0deg, ".concat(((_53 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _53 === void 0 ? void 0 : _53.backgroundColor) || "#DAEBFF", " 30%, rgba(255, 255, 255, 0) 100%);\n height:15px;\n min-height:15px;\n width: calc(100% - 10px);\n position: absolute;\n bottom: ").concat(textareaHolderHeight, "px;\n left:0;\n }");
|
|
4144
|
+
keyFrames += getStyleSheetMarker() + ".show-gradient .alan-btn__chat-textarea-left-gradient {\n position: absolute;\n left: 26px;\n border-radius: 16px;\n bottom: 15px;\n width: 15px;\n opacity: 0;\n transition: opacity 300ms ease-in-out;\n height: ".concat(chatTextareaHeight, "px;\n background: linear-gradient(90deg, ").concat(((_54 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.textarea) === null || _54 === void 0 ? void 0 : _54.backgroundColor) || "#ffffff", " 60%, rgba(255, 255, 255, 0) 100%);\n }");
|
|
4145
|
+
keyFrames += getStyleSheetMarker() + ".show-gradient .alan-btn__chat-textarea-right-gradient {\n position: absolute;\n right: 51px;\n border-radius: 16px;\n bottom: 15px;\n width: 15px;\n opacity: 0;\n transition: opacity 300ms ease-in-out;\n height: ".concat(chatTextareaHeight, "px;\n background: linear-gradient(270deg, ").concat(((_55 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.textarea) === null || _55 === void 0 ? void 0 : _55.backgroundColor) || "#ffffff", " 60%, rgba(255, 255, 255, 0) 100%);\n }");
|
|
4146
|
+
keyFrames += getStyleSheetMarker() + ".show-gradient-left .alan-btn__chat-textarea-left-gradient {\n opacity: 1;\n }";
|
|
4147
|
+
keyFrames += getStyleSheetMarker() + ".show-gradient-right .alan-btn__chat-textarea-right-gradient {\n opacity: 1;\n }";
|
|
4148
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.alan-text-chat__voice-enabled .show-gradient .alan-btn__chat-textarea-left-gradient {\n left: 50px;\n }";
|
|
4149
|
+
var defaultTextareaBorderRadius = 20;
|
|
4150
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-textarea {\n position: absolute;\n left: 15px;\n bottom: 15px;\n width: calc(100% - 30px);\n border-radius: ".concat(((_57 = (_56 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.textarea) === null || _56 === void 0 ? void 0 : _56.borderRadius) === null || _57 === void 0 ? void 0 : _57.topLeft) || defaultTextareaBorderRadius, "px ").concat(((_59 = (_58 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.textarea) === null || _58 === void 0 ? void 0 : _58.borderRadius) === null || _59 === void 0 ? void 0 : _59.topRight) || defaultTextareaBorderRadius, "px ").concat(((_61 = (_60 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.textarea) === null || _60 === void 0 ? void 0 : _60.borderRadius) === null || _61 === void 0 ? void 0 : _61.bottomRight) || defaultTextareaBorderRadius, "px ").concat(((_63 = (_62 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.textarea) === null || _62 === void 0 ? void 0 : _62.borderRadius) === null || _63 === void 0 ? void 0 : _63.bottomLeft) || defaultTextareaBorderRadius, "px;\n border: 1px solid ").concat(((_64 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.textarea) === null || _64 === void 0 ? void 0 : _64.borderColor) || ((_65 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.textarea) === null || _65 === void 0 ? void 0 : _65.backgroundColor) || "transparent", ";\n box-shadow: ").concat(!((_66 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.textarea) === null || _66 === void 0 ? void 0 : _66.hasShadow) ? "none" : "0px 1px 3px rgba(16, 39, 126, 0.2)", ";\n background-color: ").concat(((_67 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.textarea) === null || _67 === void 0 ? void 0 : _67.backgroundColor) || "#ffffff", " ;\n color: ").concat(((_68 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.textarea) === null || _68 === void 0 ? void 0 : _68.color) || "#171717", " ;\n overflow: hidden;\n outline: none;\n resize: none;\n -webkit-appearance: none;\n font-size: ").concat(getTextAreaFontSize(isMobile(), ((_69 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.textarea) === null || _69 === void 0 ? void 0 : _69.fontSize) || defaultChatTextareaFontSize), "px;\n line-height: ").concat(chatTextareaLineHieght, ";\n text-align: left;\n max-height: ").concat(chatTextareaHeight, "px;\n height: ").concat(chatTextareaHeight, "px;\n padding: ").concat(uiState.textChat.defaults.textarea.padding.top, "px 42px 12px 12px;\n margin: 0px!important;\n -webkit-user-select: text;\n -khtml-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n transition: opacity 300ms ease-in-out;\n }");
|
|
4151
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-textarea::placeholder {\n color: ".concat(((_70 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.textarea) === null || _70 === void 0 ? void 0 : _70.placeholderColor) || "#747474", " ;\n }");
|
|
4152
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-textarea::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }";
|
|
4153
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-textarea::-webkit-scrollbar-thumb {\n border-radius: 3px;\n background-color: rgba(224, 224, 224, 0.795);\n transition: background-color 300ms ease-in-out;\n }";
|
|
4154
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-textarea::-webkit-scrollbar-thumb:hover {\n background-color: rgba(230, 230, 230, 0.856);\n transition: background-color 300ms ease-in-out;\n }";
|
|
4155
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-textarea::-webkit-scrollbar-track {\n border-radius: 3px;\n background: transparent;\n }";
|
|
4156
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.alan-text-chat__voice-enabled .alan-btn__chat-textarea {\n padding-left: 42px;\n }";
|
|
4157
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat.alan-btn__mic-active .alan-btn__chat-textarea {\n opacity: 0.6;\n transition: opacity 300ms ease-in-out;\n pointer-events: none;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }";
|
|
4158
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat.alan-btn__mic-active .alan-btn__chat-send-btn {\n opacity: 0.2;\n pointer-events: none;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4159
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__inactive .alan-btn__chat-send-btn {\n opacity: 0.2;\n pointer-events: none;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4160
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat.alan-btn__disconnected .alan-btn__chat-textarea {\n opacity: 0.6;\n transition: opacity 300ms ease-in-out;\n pointer-events: none;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }";
|
|
4161
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat.alan-btn__disconnected .alan-btn__chat-send-btn {\n opacity: 0.2;\n pointer-events: none;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4162
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat.alan-btn__disconnected .alan-btn__chat-unmute-btn {\n opacity: 0.2;\n pointer-events: none;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4163
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat.alan-btn__disconnected .alan-btn__chat-header-clear-btn {\n opacity: 0.2;\n pointer-events: none;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4164
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat.alan-btn__disconnected .alan-btn__chat-send-btn svg path {\n opacity: 1;\n }";
|
|
4165
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat.alan-btn__disconnected .alan-btn__chat-mic-btn {\n opacity: 0.2;\n pointer-events: none;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4166
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__inactive .alan-btn__chat-mic-btn {\n opacity: 0.2;\n pointer-events: none;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4167
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_disconnected-chat-icon-rotate {\n animation: disconnected-chat-icon-rotate-animation 1500ms linear infinite;\n }";
|
|
4168
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("disconnected-chat-icon-rotate-animation", "0%{ transform: rotate(0deg); } 100%{ transform: rotate(360deg); }");
|
|
4169
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__disabled {\n opacity: 0.2;\n pointer-events: none;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4170
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-send-btn {\n position: absolute;\n transition: opacity 300ms ease-in-out;\n right: 20px;\n bottom: 20px;\n min-width: 40px;\n width: 40px;\n max-width: 40px;\n height: 40px;\n max-height: 40px;\n min-height: 40px;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Chrome/Safari/Opera */\n -khtml-user-select: none; /* Konqueror */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* IE/Edge */\n user-select: none;\n }";
|
|
4171
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-send-btn svg {\n position: relative;\n left: 2px;\n }";
|
|
4172
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-send-btn svg path {\n fill: ".concat(((_71 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.textarea) === null || _71 === void 0 ? void 0 : _71.placeholderColor) || "#747474", ";\n opacity: 0.5;\n }");
|
|
4173
|
+
keyFrames += getStyleSheetMarker() + ".ready-to-send:not(.alan-btn__inactive) .alan-btn__chat-send-btn svg path {\n fill: ".concat(((_75 = (_74 = (_73 = (_72 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _72 === void 0 ? void 0 : _72.icons) === null || _73 === void 0 ? void 0 : _73.general) === null || _74 === void 0 ? void 0 : _74["default"]) === null || _75 === void 0 ? void 0 : _75.fill) || "#171717", ";\n opacity: 1;\n }");
|
|
4174
|
+
if (!isMobile()) {
|
|
4175
|
+
keyFrames += getStyleSheetMarker() + ".ready-to-send:not(.alan-btn__inactive) .alan-btn__chat-send-btn:hover {\n cursor: pointer;\n }";
|
|
4176
|
+
keyFrames += getStyleSheetMarker() + ".ready-to-send:not(.alan-btn__inactive) .alan-btn__chat-send-btn:hover svg path {\n fill: ".concat(((_79 = (_78 = (_77 = (_76 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _76 === void 0 ? void 0 : _76.icons) === null || _77 === void 0 ? void 0 : _77.general) === null || _78 === void 0 ? void 0 : _78.hover) === null || _79 === void 0 ? void 0 : _79.fill) || "#0078ff", ";\n opacity:0.8;\n }");
|
|
4177
|
+
}
|
|
4178
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-mic-btn {\n position: absolute;\n left: 20px;\n bottom: 22px;\n min-width: ".concat(chatMicBtnActiveSize, "px;\n width: ").concat(chatMicBtnActiveSize, "px;\n max-width: ").concat(chatMicBtnActiveSize, "px;\n height: ").concat(chatMicBtnActiveSize, "px;\n max-height: ").concat(chatMicBtnActiveSize, "px;\n min-height: ").concat(chatMicBtnActiveSize, "px;\n display: flex;\n flex-direction: row;\n cursor: pointer;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n }");
|
|
4179
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-mic-btn.active::before {\n content: '';\n position: absolute;\n z-index: -1;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n background-color: ".concat(((_83 = (_82 = (_81 = (_80 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _80 === void 0 ? void 0 : _80.icons) === null || _81 === void 0 ? void 0 : _81.general) === null || _82 === void 0 ? void 0 : _82["default"]) === null || _83 === void 0 ? void 0 : _83.fill) || "#C8C8CC", ";\n opacity: 0.3;\n border-radius: 50%;\n }");
|
|
4180
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-notifications-bubble {\n position: absolute;\n right: 4px;\n top: -4px;\n height: 20px;\n width: 20px;\n background-color: ".concat(((_84 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.notifications) === null || _84 === void 0 ? void 0 : _84.backgroundColor) || "#D0021B", ";\n color: ").concat(((_85 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.notifications) === null || _85 === void 0 ? void 0 : _85.color) || "#ffffff", ";\n border-radius: 50%;\n z-index: ").concat(uiState.btn.zIndex + 1, ";\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: 10px;\n }");
|
|
4181
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-notifications-bubble:empty {\n display: none;\n }";
|
|
4182
|
+
if (!isMobile()) {
|
|
4183
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-mic-btn.active:hover::before {\n opacity: 0.35;\n }";
|
|
4184
|
+
}
|
|
4185
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-mic-btn svg {\n }";
|
|
4186
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-mic-btn svg path {\n fill: ".concat(((_89 = (_88 = (_87 = (_86 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _86 === void 0 ? void 0 : _86.icons) === null || _87 === void 0 ? void 0 : _87.general) === null || _88 === void 0 ? void 0 : _88["default"]) === null || _89 === void 0 ? void 0 : _89.fill) || "#171717", ";\n }");
|
|
4187
|
+
if (!isMobile()) {
|
|
4188
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-mic-btn:hover svg path {\n fill: ".concat(((_93 = (_92 = (_91 = (_90 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _90 === void 0 ? void 0 : _90.icons) === null || _91 === void 0 ? void 0 : _91.general) === null || _92 === void 0 ? void 0 : _92.hover) === null || _93 === void 0 ? void 0 : _93.fill) || "#007AFF", ";\n }");
|
|
4189
|
+
}
|
|
4190
|
+
keyFrames += getStyleSheetMarker() + ".alan-text-chat__animated-btn-bars {\n height:".concat(chatMicBtnActiveSize, "px;\n width:").concat(chatMicBtnActiveSize, "px;\n border-radius: 50%;\n justify-content: center;\n align-items: center;\n background: ").concat(((_97 = (_96 = (_95 = (_94 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _94 === void 0 ? void 0 : _94.icons) === null || _95 === void 0 ? void 0 : _95.general) === null || _96 === void 0 ? void 0 : _96.hover) === null || _97 === void 0 ? void 0 : _97.fill) || "#007AFF", ";\n display:none;\n }");
|
|
4191
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-mic-btn.active .alan-text-chat__animated-btn-bars {\n display: flex;\n }";
|
|
4192
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-mic-btn.active svg {\n display: none;\n }";
|
|
4193
|
+
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar {\n background: #ffffff;\n bottom: 1px;\n height: 3px;\n width: 2px;\n margin: 0px 1px;\n border-radius: 5px;\n }";
|
|
4194
|
+
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar-1 {\n animation: alan-btn__sound-bar-1 0ms -1200ms linear infinite alternate;\n }";
|
|
4195
|
+
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar-2 {\n animation: alan-btn__sound-bar-2 0ms -1200ms linear infinite alternate;\n }";
|
|
4196
|
+
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar-3 {\n animation: alan-btn__sound-bar-3 0ms -1200ms linear infinite alternate;\n }";
|
|
4197
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-btn__sound-bar-1", "\n 0% {\n\n height: 3px; \n }\n 100% {\n \n height: 10px; \n }");
|
|
4198
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-btn__sound-bar-2", "\n 0% {\n\n height: 8px; \n }\n 100% {\n \n height: 15px; \n }");
|
|
4199
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-btn__sound-bar-3", "\n 0% {\n\n height: 12px; \n }\n 100% {\n \n height: 28px; \n }");
|
|
4200
|
+
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar:nth-child(1) { animation-duration: 474ms; }";
|
|
4201
|
+
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar:nth-child(2) { animation-duration: 433ms; }";
|
|
4202
|
+
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar:nth-child(3) { animation-duration: 407ms; }";
|
|
4203
|
+
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar:nth-child(4) { animation-duration: 458ms; }";
|
|
4204
|
+
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar:nth-child(5) { animation-duration: 400ms; }";
|
|
4205
|
+
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar:nth-child(6) { animation-duration: 427ms; }";
|
|
4206
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_text-chat-full-screen .alan-btn__chat-msg-holder {\n display: flex;\n flex-direction: row;\n }";
|
|
4207
|
+
var defaultBubbleBorderRadius = 20;
|
|
4208
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-request {\n margin-bottom: 16px;\n max-width: 90%;\n min-height: 41px;\n padding: 9px 20px;\n line-height: 1.53;\n display: block;\n float: right;\n clear: both;\n border-radius: ".concat(((_100 = (_99 = (_98 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _98 === void 0 ? void 0 : _98.request) === null || _99 === void 0 ? void 0 : _99.borderRadius) === null || _100 === void 0 ? void 0 : _100.topLeft) || defaultBubbleBorderRadius, "px ").concat(((_103 = (_102 = (_101 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _101 === void 0 ? void 0 : _101.request) === null || _102 === void 0 ? void 0 : _102.borderRadius) === null || _103 === void 0 ? void 0 : _103.topRight) || defaultBubbleBorderRadius, "px ").concat(((_106 = (_105 = (_104 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _104 === void 0 ? void 0 : _104.request) === null || _105 === void 0 ? void 0 : _105.borderRadius) === null || _106 === void 0 ? void 0 : _106.bottomRight) || defaultBubbleBorderRadius, "px ").concat(((_109 = (_108 = (_107 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _107 === void 0 ? void 0 : _107.request) === null || _108 === void 0 ? void 0 : _108.borderRadius) === null || _109 === void 0 ? void 0 : _109.bottomLeft) || defaultBubbleBorderRadius, "px;\n position: relative;\n border: 1px solid ").concat(((_111 = (_110 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _110 === void 0 ? void 0 : _110.request) === null || _111 === void 0 ? void 0 : _111.borderColor) || ((_113 = (_112 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _112 === void 0 ? void 0 : _112.request) === null || _113 === void 0 ? void 0 : _113.backgroundColor) || "#b2d6ff", ";\n box-shadow: ").concat(!((_115 = (_114 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _114 === void 0 ? void 0 : _114.request) === null || _115 === void 0 ? void 0 : _115.hasShadow) ? "none" : "0px 1px 3px rgba(16, 39, 126, 0.2)", ";\n background-color: ").concat(((_117 = (_116 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _116 === void 0 ? void 0 : _116.request) === null || _117 === void 0 ? void 0 : _117.backgroundColor) || "#b2d6ff", ";\n color: ").concat(((_119 = (_118 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _118 === void 0 ? void 0 : _118.request) === null || _119 === void 0 ? void 0 : _119.color) || "#171717", ";\n font-size: ").concat(((_121 = (_120 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _120 === void 0 ? void 0 : _120.request) === null || _121 === void 0 ? void 0 : _121.fontSize) || "15", "px;\n word-break: break-word;\n text-align: left;\n -webkit-touch-callout: text; /* iOS Safari */\n -webkit-user-select: text; /* Chrome/Safari/Opera */\n -khtml-user-select: text; /* Konqueror */\n -moz-user-select: text; /* Firefox */\n -ms-user-select: text; /* IE/Edge */\n user-select: text;\n }");
|
|
4209
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_text-chat-full-screen .alan-btn__chat-request {\n margin-bottom: 16px;\n max-width: 100%;\n float: initial;\n clear: initial;\n border-radius: 4px;\n }";
|
|
4210
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-request * {\n -webkit-touch-callout: text; /* iOS Safari */\n -webkit-user-select: text; /* Chrome/Safari/Opera */\n -khtml-user-select: text; /* Konqueror */\n -moz-user-select: text; /* Firefox */\n -ms-user-select: text; /* IE/Edge */\n user-select: text;\n }";
|
|
4211
|
+
var responseBubbleFontSize = +(((_123 = (_122 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _122 === void 0 ? void 0 : _122.response) === null || _123 === void 0 ? void 0 : _123.fontSize) || 15);
|
|
4212
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response {\n margin-bottom: 16px;\n max-width: 90%;\n min-height: 41px;\n padding: 9px 20px;\n line-height: 1.53;\n display: block;\n float: left;\n clear: both;\n border-radius: ".concat(((_126 = (_125 = (_124 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _124 === void 0 ? void 0 : _124.response) === null || _125 === void 0 ? void 0 : _125.borderRadius) === null || _126 === void 0 ? void 0 : _126.topLeft) || defaultBubbleBorderRadius, "px ").concat(((_129 = (_128 = (_127 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _127 === void 0 ? void 0 : _127.response) === null || _128 === void 0 ? void 0 : _128.borderRadius) === null || _129 === void 0 ? void 0 : _129.topRight) || defaultBubbleBorderRadius, "px ").concat(((_132 = (_131 = (_130 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _130 === void 0 ? void 0 : _130.response) === null || _131 === void 0 ? void 0 : _131.borderRadius) === null || _132 === void 0 ? void 0 : _132.bottomRight) || defaultBubbleBorderRadius, "px ").concat(((_135 = (_134 = (_133 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _133 === void 0 ? void 0 : _133.response) === null || _134 === void 0 ? void 0 : _134.borderRadius) === null || _135 === void 0 ? void 0 : _135.bottomLeft) || defaultBubbleBorderRadius, "px;\n position: relative;\n background-color: ").concat(((_137 = (_136 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _136 === void 0 ? void 0 : _136.response) === null || _137 === void 0 ? void 0 : _137.backgroundColor) || "#ffffff", ";\n border: 1px solid ").concat(((_139 = (_138 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _138 === void 0 ? void 0 : _138.response) === null || _139 === void 0 ? void 0 : _139.borderColor) || ((_141 = (_140 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _140 === void 0 ? void 0 : _140.response) === null || _141 === void 0 ? void 0 : _141.backgroundColor) || "#ffffff", ";\n box-shadow: ").concat(!((_143 = (_142 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _142 === void 0 ? void 0 : _142.response) === null || _143 === void 0 ? void 0 : _143.hasShadow) ? "none" : "0px 1px 3px rgba(16, 39, 126, 0.2)", ";\n color: ").concat(((_145 = (_144 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _144 === void 0 ? void 0 : _144.response) === null || _145 === void 0 ? void 0 : _145.color) || "#171717", ";\n font-size: ").concat(responseBubbleFontSize, "px;\n word-break: break-word;\n text-align: left;\n -webkit-touch-callout: text; /* iOS Safari */\n -webkit-user-select: text; /* Chrome/Safari/Opera */\n -khtml-user-select: text; /* Konqueror */\n -moz-user-select: text; /* Firefox */\n -ms-user-select: text; /* IE/Edge */\n user-select: text;\n }");
|
|
4213
|
+
var chatResponseCssDeltaWidth = 82;
|
|
4214
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_text-chat-full-screen .alan-btn__chat-response {\n margin-bottom: 16px;\n max-width: calc(100% - ".concat(chatResponseCssDeltaWidth, "px);\n min-width: calc(100% - ").concat(chatResponseCssDeltaWidth, "px)!important;\n float: initial;\n clear: initial;\n border-radius: 4px;\n }");
|
|
4215
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response.with-images {\n min-width: 90%;\n }";
|
|
4216
|
+
keyFrames += getStyleSheetMarker() + ".alan-chat-small .alan-btn__chat-request {\n max-width: 100%;\n }";
|
|
4217
|
+
keyFrames += getStyleSheetMarker() + ".alan-chat-small .alan-btn__chat-response {\n max-width: 100%;\n }";
|
|
4218
|
+
keyFrames += getStyleSheetMarker() + ".alan-chat-small .alan-btn__chat-response.with-images {\n min-width: 100%;\n }";
|
|
4219
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-request.animated {\n opacity:0;\n animation: chat-bubble-appear-w-opacity 300ms ease-in-out forwards;\n animation-delay: 100ms;\n }";
|
|
4220
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response.animated {\n opacity:0;\n animation: chat-bubble-appear-w-opacity 300ms ease-in-out forwards;\n animation-delay: 200ms;\n }";
|
|
4221
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("chat-bubble-appear-w-opacity", "\n 0% { opacity:0;}\n \n 100% {\n opacity:1;\n }");
|
|
4222
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response * {\n -webkit-touch-callout: text; /* iOS Safari */\n -webkit-user-select: text; /* Chrome/Safari/Opera */\n -khtml-user-select: text; /* Konqueror */\n -moz-user-select: text; /* Firefox */\n -ms-user-select: text; /* IE/Edge */\n user-select: text;\n }";
|
|
4223
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-imgs-wrapper {\n display: flex;\n flex-wrap: wrap;\n position: relative;\n top: -9px;\n left: -20px;\n width: calc(100% + 40px);\n }";
|
|
4224
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-imgs-wrapper-left-arrow {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: 12px;\n opacity:0.85;\n }";
|
|
4225
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-imgs-wrapper-right-arrow {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: 12px;\n opacity:0.85;\n }";
|
|
4226
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-imgs-wrapper-left-arrow:hover {\n opacity:1;\n cursor: pointer;\n }";
|
|
4227
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-imgs-wrapper-right-arrow:hover {\n opacity:1;\n cursor: pointer;\n }";
|
|
4228
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-imgs-wrapper-left-arrow.invisible {\n opacity:0;\n pointer-events: none;\n }";
|
|
4229
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-imgs-wrapper-right-arrow.invisible {\n opacity:0;\n pointer-events: none;\n }";
|
|
4230
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-img-block {\n overflow: hidden;\n border-radius: 20px 20px 0 0;\n width: 100%;\n display: flex;\n }";
|
|
4231
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-video {\n width: 100%;\n min-width: 100%;\n min-height: 220px;\n height: 220px;\n max-height: 220px;\n }";
|
|
4232
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-img {\n cursor: pointer;\n transition: transform 300ms ease-in-out;\n width: 100%;\n min-width: 100%;\n min-height: 220px;\n height: 220px;\n max-height: 220px;\n object-fit: cover;\n pointer-events: initial;\n }";
|
|
4233
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-img.img-none {\n object-fit: none;\n }";
|
|
4234
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-img.not-found {\n opacity: 0.7;\n object-fit: none;\n }";
|
|
4235
|
+
if (!isMobile()) {
|
|
4236
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-imgs-wrapper:hover .alan-btn__chat-response-img {\n transform: scale(1.04);\n transition: transform 300ms ease-in-out;\n }";
|
|
4237
|
+
}
|
|
4238
|
+
keyFrames += ".alan-btn__image-preview-overlay {\n position: fixed;\n top: 0;\n left: 0;\n height: 100vh;\n min-height: 100vh;\n width: 100vw;\n min-width: 100vw;\n background-color: rgba(0,0,0,0.6);\n display: flex;\n align-items: center;\n justify-content: center;\n }";
|
|
4239
|
+
keyFrames += ".alan-btn__image-preview-overlay img {\n max-width: calc(100% - 100px);\n max-height: calc(100% - 100px);\n }";
|
|
4240
|
+
keyFrames += "@media only screen and (orientation: landscape) { \n .alan-btn__image-preview-overlay.mobile {\n align-items: flex-start;\n padding-top: 40px;\n }\n .alan-btn__image-preview-overlay img {\n max-height: calc(100% - 120px);\n }\n .alan-btn__image-preview-overlay iframe {\n max-height: calc(100% - 120px);\n }\n }";
|
|
4241
|
+
keyFrames += ".alan-btn__image-preview-overlay iframe {\n max-width: calc(100% - 100px);\n max-height: calc(100% - 100px);\n width: calc(100% - 100px);\n height: calc(100% - 100px);\n }";
|
|
4242
|
+
keyFrames += ".alan-btn__image-preview-overlay-close-icon {\n position: absolute;\n top: 16px;\n right: 16px;\n cursor: pointer;\n opacity: 0.7;\n }";
|
|
4243
|
+
if (!isMobile()) {
|
|
4244
|
+
keyFrames += ".alan-btn__image-preview-overlay-close-icon:hover {\n opacity: 1;\n }";
|
|
4245
|
+
}
|
|
4246
|
+
keyFrames += ".alan-btn__image-preview-overlay-left-icon {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: 16px;\n cursor: pointer;\n opacity: 0.7;\n }";
|
|
4247
|
+
keyFrames += ".alan-btn__image-preview-overlay-right-icon {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: 16px;\n cursor: pointer;\n opacity: 0.7;\n }";
|
|
4248
|
+
keyFrames += ".alan-btn__image-preview-overlay-left-icon.invisible {\n opacity:0;\n pointer-events: none;\n }";
|
|
4249
|
+
keyFrames += ".alan-btn__image-preview-overlay-right-icon.invisible {\n opacity:0;\n pointer-events: none;\n }";
|
|
4250
|
+
if (!isMobile()) {
|
|
4251
|
+
keyFrames += ".alan-btn__image-preview-overlay-left-icon:hover {\n opacity: 1;\n }";
|
|
4252
|
+
keyFrames += ".alan-btn__image-preview-overlay-right-icon:hover {\n opacity: 1;\n }";
|
|
4253
|
+
}
|
|
4254
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-links-wrapper {\n display: flex;\n flex-wrap: wrap;\n border-top: 1px solid #D2DAE5;\n padding: 10px 0 0 0;\n margin-top: 10px;\n align-items: center;\n }";
|
|
4255
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-link {\n background: #EAF2FC;\n border-radius: 15px;\n padding: 6px 8px;\n margin-right: 10px;\n margin-top: 4px;\n margin-bottom: 4px;\n display: flex;\n align-items: center;\n max-width: 100%;\n font-size: ".concat(responseBubbleFontSize - 2, "px;\n }");
|
|
4256
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages a.alan-btn__chat-response-link:hover {\n text-decoration: none !important;\n }";
|
|
4257
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-link-title {\n overflow: hidden;\n max-width: calc(100% - 15px);\n text-overflow: ellipsis;\n white-space: nowrap;\n display: inline-block;\n }";
|
|
4258
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-link svg {\n flex-shrink: 0;\n margin-right: 6px;\n }";
|
|
4259
|
+
if (!isMobile()) {
|
|
4260
|
+
keyFrames += getStyleSheetMarker() + "a.alan-btn__chat-response-link:hover svg path {\n fill: #0078FF;\n }";
|
|
4261
|
+
}
|
|
4262
|
+
var hasLikeBtn = (_148 = (_147 = (_146 = uiState.textChat.options) === null || _146 === void 0 ? void 0 : _146.bubbles) === null || _147 === void 0 ? void 0 : _147.response) === null || _148 === void 0 ? void 0 : _148.likeBtn;
|
|
4263
|
+
var hasCopyBtn = (_151 = (_150 = (_149 = uiState.textChat.options) === null || _149 === void 0 ? void 0 : _149.bubbles) === null || _150 === void 0 ? void 0 : _150.response) === null || _151 === void 0 ? void 0 : _151.copyBtn;
|
|
4264
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-commands-wrapper {\n margin-top: 10px;\n display: ".concat(hasLikeBtn || hasCopyBtn ? "block" : "none", ";\n }");
|
|
4265
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-like-btn {\n cursor: pointer;\n }";
|
|
4266
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-dislike-btn {\n cursor: pointer;\n }";
|
|
4267
|
+
if (!isMobile()) {
|
|
4268
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-like-btn {\n opacity: 0.7;\n cursor: pointer;\n }";
|
|
4269
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-like-btn:hover {\n opacity: 1;\n }";
|
|
4270
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-dislike-btn {\n opacity: 0.7;\n }";
|
|
4271
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-dislike-btn:hover {\n opacity: 1;\n }";
|
|
4272
|
+
}
|
|
4273
|
+
keyFrames += getStyleSheetMarker() + ".alan-incoming-msg {\n display: flex;\n align-items: center;\n overflow: hidden;\n animation:chat-bubble-appear-w-opacity 300ms ease-in-out forwards 100ms, hide-buble 300ms forwards ease 30000ms !important;\n }";
|
|
4274
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("hide-buble", "\n 0% { \n height: 41px; \n max-height:41px; \n min-height: 41px;\n }\n \n 100% {\n height: 0px;\n max-height: 0px;\n min-height: 0px;\n padding: 0px;\n margin-bottom:0;\n }");
|
|
4275
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-incomming-msg-wrapper {\n display: flex;\n align-items: center;\n }";
|
|
4276
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-incomming-msg {\n border-radius: 50%;\n background-color: ".concat(((_153 = (_152 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _152 === void 0 ? void 0 : _152.response) === null || _153 === void 0 ? void 0 : _153.color) || "#080808", ";\n margin: 2px;\n height: 6px;\n width: 6px;\n animation: alan-dot-bounce 1.5s infinite ease;\n }");
|
|
4277
|
+
keyFrames += getStyleSheetMarker() + ".msg-2 {\n animation-delay: .2s;\n }";
|
|
4278
|
+
keyFrames += getStyleSheetMarker() + ".msg-3 {\n animation-delay: .3s;\n }";
|
|
4279
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-dot-bounce", "\n 0%, 100% { opacity:1;}\n \n 60% {\n transform: translateY(3px);\n opacity:.0;\n }");
|
|
4280
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-like-btn {\n opacity: 0.5;\n display: ".concat(((_155 = (_154 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _154 === void 0 ? void 0 : _154.response) === null || _155 === void 0 ? void 0 : _155.likeBtn) ? "inline-block" : "none", ";\n }");
|
|
4281
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-dislike-btn {\n opacity: 0.5;\n display: ".concat(((_157 = (_156 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _156 === void 0 ? void 0 : _156.response) === null || _157 === void 0 ? void 0 : _157.likeBtn) ? "inline-block" : "none", ";\n }");
|
|
4282
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response__copy-btn {\n opacity: 0.5;\n display: ".concat(((_159 = (_158 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _158 === void 0 ? void 0 : _158.response) === null || _159 === void 0 ? void 0 : _159.copyBtn) ? "inline-block" : "none", ";\n }");
|
|
4283
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response__copy-btn svg {\n width: 20px;\n }";
|
|
4284
|
+
keyFrames += "\n @media screen and (min-width: 990px) {\n ".concat(getStyleSheetMarker(), ".alan-btn_text-chat-full-screen .alan-btn__chat-response-commands-wrapper {\n left: calc(100% + 5px);\n top: -10px;\n white-space: nowrap;\n position: absolute;\n }\n }\n ");
|
|
4285
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response__copy-btn alan-btn__copy-icon {\n width: 22px;\n }";
|
|
4286
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response__copy-btn .alan-btn__copied-icon {\n display: none;\n }";
|
|
4287
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response__copy-btn:hover {\n opacity: 1;\n cursor: pointer;\n }";
|
|
4288
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response__copy-btn.alan-copy-btn-copied .alan-btn__copy-icon {\n display: none;\n }";
|
|
4289
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response__copy-btn.alan-copy-btn-copied .alan-btn__copied-icon {\n display: inline-block;\n }";
|
|
4290
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_text-chat-full-screen .alan-btn__chat-popup {\n width: 100%;\n margin-left: 51px;\n margin-right: 30px;\n }";
|
|
4291
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-popup {\n position: relative;\n margin-bottom: 16px;\n -webkit-touch-callout: text; /* iOS Safari */\n -webkit-user-select: text; /* Chrome/Safari/Opera */\n -khtml-user-select: text; /* Konqueror */\n -moz-user-select: text; /* Firefox */\n -ms-user-select: text; /* IE/Edge */\n user-select: text;\n }";
|
|
4292
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-popup * {\n -webkit-touch-callout: text; /* iOS Safari */\n -webkit-user-select: text; /* Chrome/Safari/Opera */\n -khtml-user-select: text; /* Konqueror */\n -moz-user-select: text; /* Firefox */\n -ms-user-select: text; /* IE/Edge */\n user-select: text;\n }";
|
|
4293
|
+
keyFrames += getStyleSheetMarker(true) + ".hide-alan-btn-when-text-chat-is-opened-immediately .alanBtn {\n transform: scale(0);\n opacity: 0;\n animation: text-chat-disappear-anim 0ms ease-in-out forwards;\n }";
|
|
4294
|
+
keyFrames += getStyleSheetMarker(true) + ".hide-alan-btn-when-text-chat-is-opened .alanBtn {\n transform: scale(0);\n opacity: 0;\n animation: text-chat-disappear-anim ".concat(textChatAppearAnimationMs, "ms ease-in-out forwards;\n }");
|
|
4295
|
+
keyFrames += getStyleSheetMarker(true) + ".text-chat-is-closing .alanBtn {\n transform: scale(0);\n opacity: 0;\n animation: text-chat-appear-anim ".concat(textChatAppearAnimationMs, "ms ease-in-out forwards;\n }");
|
|
4296
|
+
keyFrames += getStyleSheetMarker(true) + ".hide-alan-btn-when-text-chat-is-opened .alanBtn-recognised-text-holder {\n display: none;\n }";
|
|
4297
|
+
keyFrames += getStyleSheetMarker() + " mjx-container svg {\n max-width: 100%;\n }";
|
|
4298
|
+
var avatarSize = 41;
|
|
4299
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-avatar {\n border-radius: 4px;\n margin-right: 10px;\n width: ".concat(avatarSize, "px;\n min-width: ").concat(avatarSize, "px;\n max-width: ").concat(avatarSize, "px;\n min-height: ").concat(avatarSize, "px;\n max-height: ").concat(avatarSize, "px;\n height: ").concat(avatarSize, "px;\n overflow: hidden;\n display: none;\n }");
|
|
4300
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-request-avatar {\n width: ".concat(avatarSize, "px;\n min-width: ").concat(avatarSize, "px;\n max-width: ").concat(avatarSize, "px;\n min-height: ").concat(avatarSize, "px;\n max-height: ").concat(avatarSize, "px;\n height: ").concat(avatarSize, "px;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: 100% 100%;\n background-image: url(").concat((webOptions === null || webOptions === void 0 ? void 0 : webOptions.logoTextChatUserAvatar) || btnIcons.alanUserAvatarIconSrc, ");\n }");
|
|
4301
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-avatar {\n width: ".concat(avatarSize, "px;\n min-width: ").concat(avatarSize, "px;\n max-width: ").concat(avatarSize, "px;\n min-height: ").concat(avatarSize, "px;\n max-height: ").concat(avatarSize, "px;\n height: ").concat(avatarSize, "px;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: 100% 100%;\n background-image: url(").concat((webOptions === null || webOptions === void 0 ? void 0 : webOptions.logoTextChatAvatar) || btnIcons.alanLogoIconSrc, ");\n }");
|
|
4302
|
+
var predefinedBtnColorOptions = mergeOptionsForStyleSheet(webOptions);
|
|
4303
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-avatar.request {\n background-image: linear-gradient(122deg, ".concat(predefinedBtnColorOptions["textChatUserAvatar"].background.color[0], ", ").concat(predefinedBtnColorOptions["textChatUserAvatar"].background.color[1], ");\n box-shadow: ").concat(!((_161 = (_160 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _160 === void 0 ? void 0 : _160.request) === null || _161 === void 0 ? void 0 : _161.hasShadow) ? "none" : "0px 1px 3px rgba(16, 39, 126, 0.2)", ";\n ").concat(((_163 = (_162 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _162 === void 0 ? void 0 : _162.request) === null || _163 === void 0 ? void 0 : _163.borderColor) ? "border: 1px solid ".concat((_165 = (_164 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _164 === void 0 ? void 0 : _164.request) === null || _165 === void 0 ? void 0 : _165.borderColor, ";") : "", "\n \n }");
|
|
4304
|
+
if (uiState.textChat.available) {
|
|
4305
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-avatar.response {\n background-image: linear-gradient(122deg, ".concat(predefinedBtnColorOptions["textChatAvatar"].background.color[0], ", ").concat(predefinedBtnColorOptions["textChatAvatar"].background.color[1], ");\n box-shadow: ").concat(!((_167 = (_166 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _166 === void 0 ? void 0 : _166.response) === null || _167 === void 0 ? void 0 : _167.hasShadow) ? "none" : "0px 1px 3px rgba(16, 39, 126, 0.2)", ";\n ").concat(((_169 = (_168 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _168 === void 0 ? void 0 : _168.response) === null || _169 === void 0 ? void 0 : _169.borderColor) ? "border: 1px solid ".concat((_171 = (_170 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _170 === void 0 ? void 0 : _170.response) === null || _171 === void 0 ? void 0 : _171.borderColor, ";") : "", "\n }");
|
|
4306
|
+
}
|
|
4307
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn_text-chat-full-screen .alan-btn__chat-avatar {\n display: flex;\n align-items: center;\n justify-content: center;\n }";
|
|
4308
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-avatar svg {\n width: 90%;\n height: 90%;\n }";
|
|
4309
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-avatar svg path {\n stroke: ".concat(((_173 = (_172 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _172 === void 0 ? void 0 : _172.request) === null || _173 === void 0 ? void 0 : _173.color) || "#171717", ";\n }");
|
|
4310
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-avatar svg circle {\n stroke: ".concat(((_175 = (_174 = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.bubbles) === null || _174 === void 0 ? void 0 : _174.request) === null || _175 === void 0 ? void 0 : _175.color) || "#171717", ";\n }");
|
|
4311
|
+
return keyFrames;
|
|
4312
|
+
}
|
|
4313
|
+
// alan_btn/src/styles/markdown.ts
|
|
4314
|
+
function generateCssForMarkdawn() {
|
|
4315
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
4316
|
+
var keyFrames = "";
|
|
4317
|
+
var responseBubbleFontSize = +(((_c = (_b = (_a = uiState.textChat.options) === null || _a === void 0 ? void 0 : _a.bubbles) === null || _b === void 0 ? void 0 : _b.response) === null || _c === void 0 ? void 0 : _c.fontSize) || 15);
|
|
4318
|
+
var responseBubbleBg = +(((_f = (_e = (_d = uiState.textChat.options) === null || _d === void 0 ? void 0 : _d.bubbles) === null || _e === void 0 ? void 0 : _e.response) === null || _f === void 0 ? void 0 : _f.backgroundColor) || "#ffffff");
|
|
4319
|
+
var responseBubbleFontColor = +(((_j = (_h = (_g = uiState.textChat.options) === null || _g === void 0 ? void 0 : _g.bubbles) === null || _h === void 0 ? void 0 : _h.response) === null || _j === void 0 ? void 0 : _j.color) || "#171717");
|
|
4320
|
+
var cssRules = [
|
|
4321
|
+
"a {\n color: #4183c4!important;\n text-decoration: none!important;\n }",
|
|
4322
|
+
"a:hover {\n text-decoration: underline!important;\n }",
|
|
4323
|
+
"p {\n margin: 0!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4324
|
+
"blockquote {\n margin: 0!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4325
|
+
"dl {\n margin: 0!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4326
|
+
"table {\n margin: 0!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n word-break: initial!important;\n }"),
|
|
4327
|
+
"ul {\n padding-left: 30px!important; \n margin: 0!important; \n list-style-type: disc!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4328
|
+
"ul li {\n list-style-type: disc!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4329
|
+
"ol {\n padding-left: 30px!important;\n margin: 0!important; \n list-style-type: decimal!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4330
|
+
"ol li {\n list-style-type: decimal!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4331
|
+
"h1 { font-size: 2.13em!important; line-height: 1.7!important; margin: 0 0 10px 0!important; font-weight: normal!important; text-transform: none!important;}",
|
|
4332
|
+
"h2 { font-size: 1.86em!important; line-height: 1.7!important; margin: 0 0 10px 0!important; font-weight: normal!important; text-transform: none!important;}",
|
|
4333
|
+
"h3 { font-size: 1.6em!important; line-height: 1.7!important; margin: 0 0 10px 0!important; font-weight: normal!important; text-transform: none!important;}",
|
|
4334
|
+
"h4 { font-size: 1.46em!important; line-height: 1.7!important; margin: 0 0 10px 0!important; font-weight: normal!important; text-transform: none!important;}",
|
|
4335
|
+
"h5 { font-size: 1.33em!important; line-height: 1.7!important; margin: 0 0 10px 0!important; font-weight: normal!important; text-transform: none!important;}",
|
|
4336
|
+
"h6 { font-size: 1.2em!important; line-height: 1.7!important; margin: 0 0 10px 0!important; font-weight: normal!important; text-transform: none!important;}",
|
|
4337
|
+
"h1:after { display: none!important;}",
|
|
4338
|
+
"h2:after { display: none!important;}",
|
|
4339
|
+
"h3:after { display: none!important;}",
|
|
4340
|
+
"h4:after { display: none!important;}",
|
|
4341
|
+
"h5:after { display: none!important;}",
|
|
4342
|
+
"h6:after { display: none!important;}",
|
|
4343
|
+
"h1:before { display: none!important;}",
|
|
4344
|
+
"h2:before { display: none!important;}",
|
|
4345
|
+
"h3:before { display: none!important;}",
|
|
4346
|
+
"h4:before { display: none!important;}",
|
|
4347
|
+
"h5:before { display: none!important;}",
|
|
4348
|
+
"h6:before { display: none!important;}",
|
|
4349
|
+
"h1 + p {\n margin-top: 10px!important;\n }",
|
|
4350
|
+
"h2 + p {\n margin-top: 10px!important;\n }",
|
|
4351
|
+
"h3 + p {\n margin-top: 10px!important;\n }",
|
|
4352
|
+
"h4 + p {\n margin-top: 10px!important;\n }",
|
|
4353
|
+
"h5 + p {\n margin-top: 10px!important;\n }",
|
|
4354
|
+
"h6 + p {\n margin-top: 10px!important;\n }",
|
|
4355
|
+
"p + p {\n margin-top: 10px!important;\n }",
|
|
4356
|
+
"* + pre {\n margin-top: 8px!important;\n }",
|
|
4357
|
+
"pre + * {\n margin-top: 16px!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4358
|
+
"* + ul {\n margin-top: 8px!important;\n }",
|
|
4359
|
+
"ul + * {\n margin-top: 16px!important;\n }",
|
|
4360
|
+
"* + ol {\n margin-top: 8px!important;\n }",
|
|
4361
|
+
"ol + * {\n margin-top: 16px!important;\n }",
|
|
4362
|
+
"* + blockquote {\n margin-top: 8px!important;\n }",
|
|
4363
|
+
"blockquote + * {\n margin-top: 16px!important;\n }",
|
|
4364
|
+
"audio {\n max-width: 100%!important;\n max-height: 100%!important;\n }",
|
|
4365
|
+
"video {\n max-width: 100%!important;\n max-height: 100%!important;\n }",
|
|
4366
|
+
"img {\n max-width: 100%!important;\n pointer-events: auto!important;\n cursor: pointer;\n max-height: 500px;\n }",
|
|
4367
|
+
"code {\n background-color: #F8F8F8!important;\n border-radius: 3px!important;\n border: 1px solid #DDD!important;\n font-family: Consolas, \"Liberation Mono\", Courier, monospace!important;\n margin: 0 2px!important;\n padding: 0 5px!important;\n white-space: pre-line!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4368
|
+
"pre {\n background-color: #F8F8F8!important;\n border-radius: 3px!important;\n border: 1px solid #DDD!important;\n font-family: Consolas, \"Liberation Mono\", Courier, monospace!important;\n padding: 0 5px!important;\n white-space: pre-line!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4369
|
+
"pre code {\n border: none!important;\n margin: 0!important;\n padding: 0!important;\n white-space: pre-wrap!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4370
|
+
"hr {\n display: block!important;\n unicode-bidi: isolate!important;\n margin-block-start: 0.5em!important;\n margin-block-end: 0.5em!important;\n margin-inline-start: auto!important;\n margin-inline-end: auto!important;\n overflow: hidden!important;\n border-style: inset!important;\n border-width: 1px!important;\n }",
|
|
4371
|
+
"blockquote {\n padding: 5px 20px 0!important;\n border-left: 5px solid #beb7b7!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4372
|
+
"table > tbody > tr > td {\n background-color: ".concat(responseBubbleBg, "!important;\n color: ").concat(responseBubbleFontColor, "!important;\n }"),
|
|
4373
|
+
"table > tbody > tr > th {\n color: ".concat(responseBubbleFontColor, "!important;\n background-color: ").concat(responseBubbleBg, "!important;\n }"),
|
|
4374
|
+
"table > thead > tr > th {\n padding: 4px!important;\n border-top: 1px solid #b7b5b5!important;\n }",
|
|
4375
|
+
"table > tbody > tr > th {\n padding: 4px!important;\n border-top: 1px solid #b7b5b5!important;\n }",
|
|
4376
|
+
"table > thead > tr > td {\n padding: 4px!important;\n border-top: 1px solid #b7b5b5!important;\n }",
|
|
4377
|
+
"table > tbody > tr > td {\n padding: 4px;\n border-top: 1px solid #b7b5b5!important;\n }",
|
|
4378
|
+
"strong {\n font-weight: bold!important;\n }"
|
|
4379
|
+
];
|
|
4380
|
+
for (var i = 0; i < cssRules.length; i++) {
|
|
4381
|
+
var curRule = cssRules[i];
|
|
4382
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages ".concat(curRule);
|
|
4383
|
+
}
|
|
4384
|
+
return keyFrames;
|
|
4385
|
+
}
|
|
4386
|
+
// alan_btn/src/styles/styles.ts
|
|
4387
|
+
function createAlanStyleSheet(options2, webOptions) {
|
|
4388
|
+
var _a;
|
|
4389
|
+
var _b, _c, _d;
|
|
4390
|
+
var style;
|
|
4391
|
+
var keyFrames = "";
|
|
4392
|
+
var projectId = getProjectId();
|
|
4393
|
+
var transitionCss = "transform 0.4s ease-in-out, opacity 0.4s ease-in-out";
|
|
4394
|
+
var existingStyleSheet;
|
|
4395
|
+
if (options2.shadowDOM) {
|
|
4396
|
+
existingStyleSheet = options2.shadowDOM.getElementById("alan-stylesheet-" + projectId);
|
|
4397
|
+
}
|
|
4398
|
+
else {
|
|
4399
|
+
existingStyleSheet = document.getElementById("alan-stylesheet-" + projectId);
|
|
4400
|
+
}
|
|
4401
|
+
style = document.createElement("style");
|
|
4402
|
+
style.setAttribute("id", "alan-stylesheet-" + projectId);
|
|
4403
|
+
style.type = "text/css";
|
|
4404
|
+
keyFrames += ".alanBtn-root * { box-sizing: border-box; font-family: ".concat(((_d = (_c = (_b = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _b === void 0 ? void 0 : _b.textChat) === null || _c === void 0 ? void 0 : _c.popup) === null || _d === void 0 ? void 0 : _d.fontFamily) || "Poppins", "; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;}");
|
|
4405
|
+
var hoverSelector = !isMobile() ? ":hover" : ":active";
|
|
4406
|
+
if (!isMobile()) {
|
|
4407
|
+
keyFrames += getStyleSheetMarker() + ".alanBtn{transform: scale(1); transition: " + transitionCss + ";} .alanBtn" + hoverSelector + "{transform: scale(1.11111);transition:" + transitionCss + ";}.alanBtn:focus {transform: scale(1);" + transitionCss + "; border: solid 3px #50e3c2; outline: none; }";
|
|
4408
|
+
keyFrames += getStyleSheetMarker(true) + ".alan-btn-disconnected .alanBtn" + hoverSelector + "{transform: scale(1);transition:" + transitionCss + ";}";
|
|
4409
|
+
keyFrames += getStyleSheetMarker(true) + ".alan-btn-offline .alanBtn" + hoverSelector + "{transform: scale(1);transition:" + transitionCss + ";}";
|
|
4410
|
+
keyFrames += getStyleSheetMarker(true) + ".alan-btn-no-voice-support .alanBtn" + hoverSelector + "{transform: scale(1);transition:" + transitionCss + ";}";
|
|
4411
|
+
}
|
|
4412
|
+
keyFrames += getStyleSheetMarker(true) + ".alan-btn__page-scrolled .alanBtn {\n transform: scale(0.4);\n opacity: 0.5;\n pointer-events: none;\n transition: ".concat(transitionCss, ";\n }");
|
|
4413
|
+
keyFrames += getStyleSheetMarker() + ".alanBtn-recognised-text-holder { position:fixed; transform: translateY(" + (uiState.btn.isTopAligned ? "-" : "") + "50%); max-width:236px; font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 18px; min-height: 40px; color: #000; font-weight: normal; background-color: #fff; border-radius:10px; box-shadow: 0px 1px 14px rgba(0, 0, 0, 0.35); display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack: activate;-ms-flex-pack: start;justify-content: start;}";
|
|
4414
|
+
keyFrames += getStyleSheetMarker() + " .alanBtn-recognised-text-holder.alan-btn-lib__with-text.alan-btn-lib__left-side { text-align: left;}";
|
|
4415
|
+
keyFrames += getStyleSheetMarker() + " .alanBtn-recognised-text-holder.alan-btn-lib__with-text.alan-btn-lib__right-side { text-align: right;}";
|
|
4416
|
+
keyFrames += getStyleSheetMarker() + " .alanBtn-recognised-text-holder .alanBtn-recognised-text-content:not(:empty) {padding: 10px;}";
|
|
4417
|
+
keyFrames += getStyleSheetMarker(true) + ".alanBtn-recognised-text-holder-long { font-size: 12px!important;line-height: 1.4!important;} ";
|
|
4418
|
+
keyFrames += getStyleSheetMarker(true) + ".alanBtn-recognised-text-holder-super-long { font-size: 11px!important;line-height: 1.4!important;} ";
|
|
4419
|
+
keyFrames += getStyleSheetMarker() + ".alanBtn-text-appearing { animation: text-holder-appear 800ms ease-in-out forwards; }";
|
|
4420
|
+
keyFrames += getStyleSheetMarker() + ".alanBtn-text-disappearing { animation: text-holder-disappear 800ms ease-in-out forwards; }";
|
|
4421
|
+
keyFrames += getStyleSheetMarker() + ".alanBtn-text-disappearing-immediately { animation: none; opactity: 0; }";
|
|
4422
|
+
keyFrames += getStyleSheetMarker() + ".alan-btn-disabled { pointer-events: none; opacity: .5; transition: all .2s ease-in-out; }";
|
|
4423
|
+
keyFrames += getStyleSheetMarker() + ".shadow-appear { opacity: 1 !important; }\n";
|
|
4424
|
+
keyFrames += getStyleSheetMarker() + ".shadow-disappear { opacity: 0 !important; transition: all .1s linear !important; }";
|
|
4425
|
+
keyFrames += getStyleSheetMarker(true) + ".alan-btn-offline .alanBtn-bg-default { background-image: linear-gradient(122deg,rgb(78,98,126),rgb(91,116,145));}";
|
|
4426
|
+
keyFrames += getStyleSheetMarker(true) + ".alan-btn-offline .alanBtn" + hoverSelector + " .alanBtn-bg-default { background-image: linear-gradient(122deg,rgb(78,98,126),rgb(91,116,145))!important;}";
|
|
4427
|
+
keyFrames += getStyleSheetMarker(true) + ".alan-btn-no-voice-support .alanBtn-bg-default { background-image: linear-gradient(122deg,rgb(78,98,126),rgb(91,116,145));}";
|
|
4428
|
+
keyFrames += getStyleSheetMarker(true) + ".alan-btn-no-voice-support .alanBtn" + hoverSelector + " .alanBtn-bg-default { background-image: linear-gradient(122deg,rgb(78,98,126),rgb(91,116,145))!important;}";
|
|
4429
|
+
keyFrames += getStyleSheetMarker(true) + ".alan-btn-permission-denied .alanBtn .alanBtn-bg-default { background-image: linear-gradient(122deg,rgb(78,98,126),rgb(91,116,145));}";
|
|
4430
|
+
keyFrames += getStyleSheetMarker(true) + ".alan-btn-permission-denied .alanBtn" + hoverSelector + " .alanBtn-bg-default { background-image: linear-gradient(122deg,rgb(78,98,126),rgb(91,116,145))!important;}";
|
|
4431
|
+
keyFrames += getStyleSheetMarker() + ".triangleMicIconBg {background-image:url(" + btnIcons.roundedTriangleSecondLayerSrc + "); pointer-events: none;}";
|
|
4432
|
+
keyFrames += getStyleSheetMarker() + ".circleMicIconBg {background-image:url(" + btnIcons.circleSecondLayerSrc + "); pointer-events: none;}";
|
|
4433
|
+
keyFrames += getStyleSheetMarker() + " img {pointer-events: none;}";
|
|
4434
|
+
keyFrames += getStyleSheetMarker() + "" + hoverSelector + " .triangleMicIconBg-default {opacity:0!important;}";
|
|
4435
|
+
keyFrames += getStyleSheetMarker() + ".alan-overlay-for-alert {position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 99;background: rgba(0, 0, 0, 0.57);opacity: 0;-webkit-animation: alan-fade-in 0.5s 0.2s forwards;-moz-animation: alan-fade-in 0.5s 0.2s forwards;-o-animation: alan-fade-in 0.5s 0.2s forwards;animation: alan-fade-in 0.5s 0.2s forwards;}";
|
|
4436
|
+
keyFrames += getStyleSheetMarker() + ".alan-alert-popup {border-radius:10px; box-shadow: 0px 5px 14px rgba(3, 3, 3, 0.25);padding:12px;padding-right:24px;text-align: center;width: 220px;background: rgb(255 255 255);position: fixed;left: 50%;transform: translateX(-50%);top: 10%; color: #000;font-size: 14px;line-height: 18px;}";
|
|
4437
|
+
keyFrames += getStyleSheetMarker() + '.alan-alert-popup__close-btn {background:url("' + btnIcons.popupCloseIconImgBase64 + '") no-repeat center;cursor:pointer; background-size:100% 100%;position: absolute;top: 12px;right: 12px;width: 14px;height: 14px;}';
|
|
4438
|
+
keyFrames += getStyleSheetMarker() + ".alan-overlay {position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 99;background: rgba(0, 0, 0, 0.57);opacity: 0;-webkit-animation: alan-fade-in 0.5s 0.2s forwards;-moz-animation: alan-fade-in 0.5s 0.2s forwards;-o-animation: alan-fade-in 0.5s 0.2s forwards;animation: alan-fade-in 0.5s 0.2s forwards;}";
|
|
4439
|
+
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup.alan-btn-lib__default-popup {border-radius:10px; box-shadow: 0px 5px 14px rgba(3, 3, 3, 0.25);padding:6px 30px 6px 12px;text-align: left;width: 220px;background: rgb(255 255 255);}";
|
|
4440
|
+
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup.alan-btn-lib__top.alan-btn-lib__right {border-top-right-radius: 0!important;}";
|
|
4441
|
+
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup.alan-btn-lib__top.alan-btn-lib__left {border-top-left-radius: 0!important;}";
|
|
4442
|
+
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup.alan-btn-lib__bottom.alan-btn-lib__left {border-bottom-left-radius: 0!important;}";
|
|
4443
|
+
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup.alan-btn-lib__bottom.alan-btn-lib__right {border-bottom-right-radius: 0!important;}";
|
|
4444
|
+
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup {position: fixed;opacity: 0;-webkit-animation: alan-fade-in 0.5s 0.2s forwards;-moz-animation: alan-fade-in 0.5s 0.2s forwards;-o-animation: alan-fade-in 0.5s 0.2s forwards;animation: alan-fade-in 0.5s 0.2s forwards;}";
|
|
4445
|
+
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup__body {position:relative;color: #0D1940;font-size: 16px;line-height: 20px;}";
|
|
4446
|
+
keyFrames += getStyleSheetMarker() + '.alan-overlay-popup__ok {background:url("' + btnIcons.popupCloseIconImgBase64 + '") no-repeat center; background-size:100% 100%;min-height:14px;height:14px;max-height:14px;min-width:14px;width:14px;max-width:14px;opacity:0;transition:opacity 300ms ease-in-out;position:absolute;top:8px;right:8px;cursor: pointer;pointer-events: auto!important;}';
|
|
4447
|
+
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup__ok:hover {opacity:0.9}";
|
|
4448
|
+
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup:hover .alan-overlay-popup__ok{opacity:1;transition:opacity 300ms ease-in-out;}";
|
|
4449
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-gradient", "0%{backgroundPosition: 0 0;}50%{backgroundPosition: -100% 0;}100%{backgroundPosition: 0 0;}");
|
|
4450
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-pulsating", "0%{transform: scale(1.11111);}50%{transform: scale(1.0);}100%{transform: scale(1.11111);}");
|
|
4451
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-text-chat-pulsating", "0%{transform: scale(1.09);}50%{transform: scale(1.0);}100%{transform: scale(1.09);}");
|
|
4452
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-mic-pulsating", "0%{transform: scale(0.91);}50%{transform: scale(1.0);}100%{transform: scale(0.91);}");
|
|
4453
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-triangle-mic-pulsating", "0%{transform: scale(0.94);}50%{transform: scale(1.0);}100%{transform: scale(0.94);}");
|
|
4454
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-fade-in", "0%{opacity: 0;}100%{opacity:1;}");
|
|
4455
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-fade-out", "0%{opacity: 1;}100%{opacity:0;}");
|
|
4456
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("text-holder-appear", "0%{\n opacity:0;\n color:transparent;\n background-color:rgba(245, 252, 252, 0.0);\n border: solid 1px transparent;\n }\n 100%{\n opacity:1;\n color:#000;\n background-color:rgba(245, 252, 252, 0.8);\n }");
|
|
4457
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("text-holder-disappear", "0%{\n opacity:1; \n color:#000;\n background-color:rgba(245, 252, 252, 0.8); \n }\n 100%{\n opacity:0; \n color:transparent;\n background-color:rgba(245, 252, 252, 0.0);\n border: solid 1px transparent;\n }");
|
|
4458
|
+
function generateLogoPartAnimation(partName, partIndex) {
|
|
4459
|
+
var animSteps = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
|
|
4460
|
+
var keyFrameContent = "";
|
|
4461
|
+
for (var i = 0; i < animSteps.length; i++) {
|
|
4462
|
+
var curOpacity = 0;
|
|
4463
|
+
if (partIndex === 0) {
|
|
4464
|
+
curOpacity = i === 0 || i === 10 ? 1 : 0;
|
|
4465
|
+
}
|
|
4466
|
+
else {
|
|
4467
|
+
curOpacity = i === partIndex ? 1 : 0;
|
|
3415
4468
|
}
|
|
4469
|
+
keyFrameContent += "".concat(animSteps[i], "% { opacity: ").concat(curOpacity, "; } ");
|
|
3416
4470
|
}
|
|
3417
|
-
return
|
|
4471
|
+
return getStyleSheetMarker() + generateKeyFrame(partName, keyFrameContent);
|
|
4472
|
+
}
|
|
4473
|
+
for (var i = 0; i < 10; i++) {
|
|
4474
|
+
keyFrames += generateLogoPartAnimation("logo-state-".concat(i + 1, "-animation"), i);
|
|
3418
4475
|
}
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
4476
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("disconnected-loader-animation", "0%{ transform: rotate(0deg); } 100%{ transform: rotate(360deg); }");
|
|
4477
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("oval1-animation", "0%{ transform: rotate(-315deg); } 50%{ transform: rotate(-495deg); } 100%{ transform: rotate(-315deg); }");
|
|
4478
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("oval2-animation", "0%{ transform: rotate(-45deg); } 50%{ transform: rotate(-215deg); } 100%{ transform: rotate(-45deg); }");
|
|
4479
|
+
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-text-fade-in", "0%{ opacity: 0; } 100%{ opacity: 1; }");
|
|
4480
|
+
keyFrames += getStyleSheetMarker() + ".alanBtn-bg-default.super-hidden{opacity:0!important;display:none;}";
|
|
4481
|
+
keyFrames += ".no-scroll-for-popup { overflow:hidden!important; position:fixed; }";
|
|
4482
|
+
keyFrames += ".no-scroll-for-popup video { visibility: hidden }";
|
|
4483
|
+
keyFrames += ".no-scroll-for-popup audio { visibility: hidden }";
|
|
4484
|
+
keyFrames += ".no-scroll-for-popup .alan-btn__chat-holder video { visibility: initial }";
|
|
4485
|
+
keyFrames += ".no-scroll-for-popup .alan-btn__chat-holder audio { visibility: initial }";
|
|
4486
|
+
var predefinedBtnColorOptions = mergeOptionsForStyleSheet(webOptions);
|
|
4487
|
+
var tempLayer;
|
|
4488
|
+
var stateName;
|
|
4489
|
+
var stateMapping = (_a = {},
|
|
4490
|
+
_a[uiState.textChat.available ? "textChat" : "idle"] = ["default"],
|
|
4491
|
+
_a.listen = ["listening"],
|
|
4492
|
+
_a.process = ["intermediate", "understood"],
|
|
4493
|
+
_a.reply = ["speaking"],
|
|
4494
|
+
_a);
|
|
4495
|
+
var stateNameClasses, stateNameClass;
|
|
4496
|
+
var states = Object.keys(stateMapping);
|
|
4497
|
+
for (var i = 0; i < states.length; i++) {
|
|
4498
|
+
stateName = states[i];
|
|
4499
|
+
stateNameClasses = stateMapping[stateName];
|
|
4500
|
+
tempLayer = predefinedBtnColorOptions[stateName];
|
|
4501
|
+
for (var j = 0; j < stateNameClasses.length; j++) {
|
|
4502
|
+
stateNameClass = stateNameClasses[j];
|
|
4503
|
+
if (tempLayer.background) {
|
|
4504
|
+
keyFrames += getStyleSheetMarker() + ".alanBtn-bg-" + stateNameClass + " {";
|
|
4505
|
+
keyFrames += "background-image: linear-gradient(122deg," + tempLayer.background.color[0] + "," + tempLayer.background.color[1] + ");";
|
|
4506
|
+
keyFrames += "}";
|
|
4507
|
+
keyFrames += getStyleSheetMarker() + ".alanBtn-oval-bg-" + stateNameClass + " {";
|
|
4508
|
+
keyFrames += "background-image: linear-gradient(122deg," + tempLayer.background.color[0] + "," + tempLayer.background.color[1] + ");";
|
|
4509
|
+
keyFrames += "}";
|
|
4510
|
+
}
|
|
4511
|
+
if (tempLayer.hover) {
|
|
4512
|
+
keyFrames += getStyleSheetMarker() + ".alanBtn" + hoverSelector + " .alanBtn-bg-" + stateNameClass + ":not(.super-hidden) {";
|
|
4513
|
+
keyFrames += "background-image: linear-gradient(122deg," + tempLayer.hover.color[0] + "," + tempLayer.hover.color[1] + ");";
|
|
4514
|
+
keyFrames += "}";
|
|
4515
|
+
keyFrames += getStyleSheetMarker() + ".alanBtn:active .alanBtn-bg-" + stateNameClass + ":not(.super-hidden) {";
|
|
4516
|
+
keyFrames += "background-image: linear-gradient(122deg," + tempLayer.hover.color[0] + "," + tempLayer.hover.color[1] + ");";
|
|
4517
|
+
keyFrames += "}";
|
|
4518
|
+
keyFrames += getStyleSheetMarker() + ".alanBtn" + hoverSelector + " .alanBtn-oval-bg-" + stateNameClass + ":not(.super-hidden) {";
|
|
4519
|
+
keyFrames += "background-image: linear-gradient(122deg," + tempLayer.hover.color[0] + "," + tempLayer.hover.color[1] + ");";
|
|
4520
|
+
keyFrames += "}";
|
|
4521
|
+
keyFrames += getStyleSheetMarker() + ".alanBtn:active .alanBtn-oval-bg-" + stateNameClass + ":not(.super-hidden) {";
|
|
4522
|
+
keyFrames += "background-image: linear-gradient(122deg," + tempLayer.hover.color[0] + "," + tempLayer.hover.color[1] + ");";
|
|
4523
|
+
keyFrames += "}";
|
|
4524
|
+
}
|
|
3422
4525
|
}
|
|
3423
|
-
return s4() + s4() + "-" + s4() + "-" + s4() + "-" + s4() + "-" + s4() + s4() + s4();
|
|
3424
4526
|
}
|
|
4527
|
+
keyFrames += generateCssForMarkdawn();
|
|
4528
|
+
keyFrames += generateCssForChat(webOptions);
|
|
4529
|
+
style.innerHTML = keyFrames;
|
|
4530
|
+
if (options2.shadowDOM) {
|
|
4531
|
+
options2.shadowDOM.prepend(style);
|
|
4532
|
+
}
|
|
4533
|
+
else {
|
|
4534
|
+
document.getElementsByTagName("head")[0].appendChild(style);
|
|
4535
|
+
}
|
|
4536
|
+
if (existingStyleSheet) {
|
|
4537
|
+
existingStyleSheet.disabled = true;
|
|
4538
|
+
existingStyleSheet.parentNode.removeChild(existingStyleSheet);
|
|
4539
|
+
}
|
|
4540
|
+
}
|
|
4541
|
+
// alan_btn/src/textChat/maxjax.ts
|
|
4542
|
+
function loadMathJax(msgCount, msgGetter) {
|
|
4543
|
+
window.MathJax = {
|
|
4544
|
+
startup: {
|
|
4545
|
+
pageReady: function () {
|
|
4546
|
+
return window.MathJax.startup.defaultPageReady();
|
|
4547
|
+
}
|
|
4548
|
+
},
|
|
4549
|
+
tex: {
|
|
4550
|
+
inlineMath: [["$", "$"], ["\\(", "\\)"]],
|
|
4551
|
+
processEscapes: true
|
|
4552
|
+
}
|
|
4553
|
+
};
|
|
4554
|
+
var script = document.createElement("script");
|
|
4555
|
+
script.src = "https://studio.alan.app/js/mathjax/tex-svg.js?v=1";
|
|
4556
|
+
script.async = true;
|
|
4557
|
+
script.setAttribute("id", "MathJax-script");
|
|
4558
|
+
script.onload = function () {
|
|
4559
|
+
for (var i = 0; i < msgCount; i++) {
|
|
4560
|
+
processFormulas(msgGetter(i));
|
|
4561
|
+
}
|
|
4562
|
+
};
|
|
4563
|
+
document.head.appendChild(script);
|
|
4564
|
+
}
|
|
4565
|
+
function processFormulas(el) {
|
|
4566
|
+
var MathJax = window.MathJax;
|
|
4567
|
+
if (MathJax) {
|
|
4568
|
+
setTimeout(function () {
|
|
4569
|
+
if (el && MathJax.texReset) {
|
|
4570
|
+
MathJax.texReset();
|
|
4571
|
+
MathJax.typesetClear();
|
|
4572
|
+
MathJax.typesetPromise([el])["catch"](function (err) {
|
|
4573
|
+
console.error(err);
|
|
4574
|
+
});
|
|
4575
|
+
}
|
|
4576
|
+
});
|
|
4577
|
+
}
|
|
4578
|
+
}
|
|
4579
|
+
// alan_btn/src/textChat/highlightJs.ts
|
|
4580
|
+
function loadHighlightJs(msgsHolderGetter) {
|
|
4581
|
+
var script = document.createElement("script");
|
|
4582
|
+
script.src = "https://studio.alan.app/js/hljs/highlight.min.js?v=1";
|
|
4583
|
+
script.async = true;
|
|
4584
|
+
script.onload = function () {
|
|
4585
|
+
highlightCode(msgsHolderGetter());
|
|
4586
|
+
};
|
|
4587
|
+
document.head.appendChild(script);
|
|
4588
|
+
var link = document.createElement("link");
|
|
4589
|
+
link.rel = "stylesheet";
|
|
4590
|
+
link.href = "https://studio.alan.app/js/hljs/github.min.css?v=1";
|
|
4591
|
+
document.getElementsByTagName("head")[0].appendChild(link);
|
|
4592
|
+
}
|
|
4593
|
+
function highlightCode(msgsHolder) {
|
|
4594
|
+
if (window.hljs) {
|
|
4595
|
+
setTimeout(function () {
|
|
4596
|
+
if (msgsHolder) {
|
|
4597
|
+
msgsHolder.querySelectorAll("pre code:not(.alan-btn__hljs-processed)").forEach(function (el) {
|
|
4598
|
+
window.hljs.highlightElement(el);
|
|
4599
|
+
el.classList.add("alan-btn__hljs-processed");
|
|
4600
|
+
});
|
|
4601
|
+
}
|
|
4602
|
+
});
|
|
4603
|
+
}
|
|
4604
|
+
}
|
|
4605
|
+
// alan_btn/alan_btn.ts
|
|
4606
|
+
(function (ns) {
|
|
4607
|
+
uiState.lib.version = "alan-version.1.8.54".replace("alan-version.", "");
|
|
4608
|
+
if (window.alanBtn) {
|
|
4609
|
+
console.warn("Alan: the Alan Button source code has already added (v." + uiState.lib.version + ")");
|
|
4610
|
+
}
|
|
4611
|
+
var alanAltPrefix = "Alan voice assistant";
|
|
4612
|
+
var firstClick = null;
|
|
4613
|
+
var btnInstance;
|
|
3425
4614
|
var AlanButtonTextMessageType;
|
|
3426
4615
|
(function (AlanButtonTextMessageType2) {
|
|
3427
4616
|
AlanButtonTextMessageType2["Request"] = "request";
|
|
@@ -3440,26 +4629,11 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
3440
4629
|
var dragAndDropEnabled = true;
|
|
3441
4630
|
var curDialogId = null;
|
|
3442
4631
|
var textChatIsHidden = true;
|
|
3443
|
-
var textChatIsAvailable = false;
|
|
3444
4632
|
var voiceEnabledInTextChat = true;
|
|
3445
4633
|
var textChatMessages = [];
|
|
3446
|
-
var textChatOptions = null;
|
|
3447
|
-
var clearChatIsInProcess = false;
|
|
3448
4634
|
var textChatScrollPosition = null;
|
|
3449
4635
|
var sentMessageInd = null;
|
|
3450
4636
|
var sentMessages = [];
|
|
3451
|
-
var defaultMinChatHeight = 400;
|
|
3452
|
-
var defaultChatHeight = 700;
|
|
3453
|
-
var defaultMinChatWidth = 250;
|
|
3454
|
-
var chatHeaderHeight = 40;
|
|
3455
|
-
var chatTextareaLineHieght = 1.25;
|
|
3456
|
-
var textareaHolderHeight = 67;
|
|
3457
|
-
var chatTextareaHeight = 50;
|
|
3458
|
-
var chatMicBtnActiveSize = 34;
|
|
3459
|
-
var textChatScrollSize = 6;
|
|
3460
|
-
var textChatAppearAnimationMs = 200;
|
|
3461
|
-
var defaultChatMargin = 25;
|
|
3462
|
-
var defaultChatTextareaFontSize = 15;
|
|
3463
4637
|
var textToSpeachVoiceEnabled = getVoiceEnabledFlag();
|
|
3464
4638
|
var mode;
|
|
3465
4639
|
if (options2.mode === "tutor") {
|
|
@@ -3472,16 +4646,16 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
3472
4646
|
else {
|
|
3473
4647
|
mode = "component";
|
|
3474
4648
|
}
|
|
3475
|
-
console.log("Alan: v." +
|
|
4649
|
+
console.log("Alan: v." + uiState.lib.version);
|
|
3476
4650
|
if (window.tutorProject && !isTutorMode() && btnInstance) {
|
|
3477
|
-
if (
|
|
4651
|
+
if (uiState.project.id === options2.key) {
|
|
3478
4652
|
return btnInstance;
|
|
3479
4653
|
}
|
|
3480
4654
|
throw new Error("The Alan Button instance has already been created. There cannot be two Alan Button instances created at the same time connected to the different projects.");
|
|
3481
4655
|
}
|
|
3482
4656
|
btnInstance = {
|
|
3483
4657
|
// Common public API
|
|
3484
|
-
version:
|
|
4658
|
+
version: uiState.lib.version,
|
|
3485
4659
|
setVisualState: function (visualStateData) {
|
|
3486
4660
|
if (btnDisabled) {
|
|
3487
4661
|
return;
|
|
@@ -3670,13 +4844,12 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
3670
4844
|
var isAlanActive = false;
|
|
3671
4845
|
var isLeftAligned = false;
|
|
3672
4846
|
var isRightAligned = true;
|
|
3673
|
-
var isTopAligned = false;
|
|
3674
4847
|
var isBottomAligned = false;
|
|
3675
4848
|
var recognisedTextVisible = false;
|
|
3676
4849
|
var playReadyToListenSound = true;
|
|
3677
4850
|
var turnOffTimeout = 3e4;
|
|
3678
4851
|
var turnOffVoiceFn;
|
|
3679
|
-
var
|
|
4852
|
+
var dndInitMousePos2 = [0, 0];
|
|
3680
4853
|
var dndIsDown = false;
|
|
3681
4854
|
var btnWasMoved = false;
|
|
3682
4855
|
var afterMouseMove = false;
|
|
@@ -3701,7 +4874,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
3701
4874
|
}, turnOffTimeout);
|
|
3702
4875
|
}
|
|
3703
4876
|
setTurnOffVoiceTimeout();
|
|
3704
|
-
var switchToLowVolumeStateTimer = null;
|
|
3705
4877
|
var pulsatingAnimation = "";
|
|
3706
4878
|
var pulsatingMicAnimation = "";
|
|
3707
4879
|
var pulsatingTriangleMicAnimation = "";
|
|
@@ -3717,21 +4889,23 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
3717
4889
|
var rootEl = options2.rootEl || document.createElement("div");
|
|
3718
4890
|
var body = document.getElementsByTagName("body")[0];
|
|
3719
4891
|
var btn = document.createElement("div");
|
|
3720
|
-
var noWiFiChatIcon = "<svg width=\"35\" height=\"35\" viewBox=\"0 0 35 35\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7.90233 10.4566C7.52988 9.72656 6.63602 9.42857 5.90602 9.78613C4.95254 10.2629 4.02887 11.0525 3.32866 11.708C2.71784 12.2593 2.68803 13.2127 3.23926 13.8086C3.53722 14.1215 3.93946 14.2854 4.34171 14.2854C4.69926 14.2854 5.05681 14.1513 5.35477 13.898C5.65273 13.6298 6.54661 12.7956 7.24682 12.4529C7.97682 12.0805 8.27478 11.1866 7.91723 10.4566H7.90233Z\" />\n <path d=\"M32.1414 11.4398C28.1636 7.92391 23.0983 5.9872 17.884 5.9872C15.4258 5.9872 13.0273 6.40437 10.733 7.22376C10.6883 7.23866 10.6436 7.28335 10.5989 7.31315L8.40888 4.97415C7.84276 4.37823 6.9042 4.33355 6.30828 4.89967C5.71236 5.4658 5.68256 6.40434 6.23379 7.00026L27.091 29.3472C27.3889 29.6601 27.7763 29.824 28.1785 29.824C28.5361 29.824 28.9085 29.6899 29.1916 29.4217C29.7875 28.8556 29.8173 27.917 29.2661 27.3211L18.2714 15.5368C21.5638 15.6411 24.6328 17.0266 26.9718 19.4848C27.2698 19.7976 27.6571 19.9466 28.0444 19.9466C28.4169 19.9466 28.7893 19.8127 29.0724 19.5296C29.6683 18.9635 29.6981 18.0248 29.132 17.4288C26.1375 14.2705 22.1299 12.5424 17.884 12.5424C17.1391 12.5424 16.3942 12.6019 15.6642 12.7062C15.6642 12.7062 15.6493 12.7062 15.6344 12.7062L12.8187 9.68189C14.4575 9.20515 16.1558 8.9519 17.884 8.9519C22.3683 8.9519 26.7334 10.6205 30.1749 13.6597C30.4579 13.913 30.8155 14.0322 31.1581 14.0322C31.5753 14.0322 31.9775 13.8682 32.2755 13.5256C32.8267 12.9148 32.7671 11.9613 32.1414 11.425V11.4398Z\" />\n <path d=\"M12.2079 15.1643C11.7908 14.4492 10.882 14.2109 10.1669 14.628C8.94526 15.3282 7.8279 16.2072 6.82973 17.2203C6.24871 17.8013 6.26361 18.7548 6.82973 19.3209C7.12769 19.6039 7.50014 19.7529 7.87259 19.7529C8.24504 19.7529 8.64731 19.6039 8.93037 19.306C9.74976 18.4717 10.6585 17.7715 11.6418 17.1905C12.3569 16.7733 12.5953 15.8645 12.1781 15.1494L12.2079 15.1643Z\" />\n <path d=\"M16.7666 20.3637C16.5282 19.5741 15.694 19.1421 14.9044 19.3805C13.355 19.8572 11.8354 21.2874 11.0756 22.0919C10.5094 22.6878 10.5243 23.6263 11.1352 24.1924C11.4182 24.4605 11.7907 24.6097 12.1631 24.6097C12.5505 24.6097 12.9527 24.4607 13.2358 24.1478C14.1595 23.1795 15.1576 22.4346 15.7833 22.2409C16.5729 22.0025 17.005 21.1682 16.7666 20.3786V20.3637Z\" />\n <path d=\"M17.7499 29.7644C18.7785 29.7644 19.6122 28.9307 19.6122 27.9021C19.6122 26.8737 18.7785 26.0399 17.7499 26.0399C16.7214 26.0399 15.8877 26.8737 15.8877 27.9021C15.8877 28.9307 16.7214 29.7644 17.7499 29.7644Z\"/>\n </svg>\n ";
|
|
3721
|
-
var disconnectedChatIcon = "\n <svg class=\"alan-btn_disconnected-chat-icon-rotate\" width=\"35\" height=\"35\" viewBox=\"0 0 35 35\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path opacity=\"0.8\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M24.0579 3.47502C18.5874 0.922942 12.1534 1.67973 7.4383 5.76748C2.7232 9.85523 1.24337 15.2725 2.34798 20.767C3.45259 26.2615 7.87342 31.0097 13.2994 32.4594C19.715 34.174 26.6107 31.7302 30.2577 26.2615C26.9893 30.6213 20.7089 33.242 15.1228 32.2771C9.62181 31.3275 4.71002 26.606 3.45259 21.1573C2.11284 15.3541 3.59462 10.949 8.37598 6.57398C13.1573 2.19898 22.9638 1.8344 28.2519 8.2146C29.2614 9.43264 30.6224 11.6781 30.9871 14.4125C31.1694 15.5063 31.1694 15.6886 31.3518 16.6C31.3518 16.9646 31.7165 17.3292 32.0812 17.3292C32.6282 17.3292 33.0612 16.918 32.9929 16.2354C32.4459 10.7667 29.0622 5.80967 24.0579 3.47502Z\" fill=\"#B8B6B6\"/>\n </svg>";
|
|
3722
|
-
var sendChatIcon = "\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M28.0134 15.9238L8.98646 6.40981C7.82892 5.83162 6.75249 5.99963 6.17778 6.77248C5.89042 7.15832 5.61697 7.85122 5.94952 8.96241L8.09542 16.1092C8.39668 17.1138 8.39668 18.8797 8.09542 19.8843L5.94952 27.0311C5.61697 28.1423 5.88926 28.8363 6.17662 29.2222C6.51959 29.681 7.04564 29.9348 7.65743 29.9348C8.07109 29.9348 8.51834 29.8166 8.9853 29.5837L28.0134 20.0697C28.9635 19.5946 29.5093 18.838 29.5093 17.9968C29.5093 17.1555 28.9647 16.3989 28.0134 15.9238ZM8.27386 27.3486L10.3155 20.5494C10.4383 20.1403 10.5217 19.6606 10.575 19.1554H16.6868C17.3276 19.1554 17.8455 18.6375 17.8455 17.9968C17.8455 17.356 17.3276 16.8381 16.6868 16.8381H10.575C10.5217 16.3329 10.4395 15.8532 10.3155 15.4441L8.27386 8.64493L26.9775 17.9968L8.27386 27.3486Z\" fill=\"#B8B6B6\"/>\n </svg>";
|
|
3723
|
-
var chatMicIcon = "\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M18.2623 24.0476C16.7915 24.0458 15.3814 23.4608 14.3414 22.4208C13.3014 21.3808 12.7164 19.9707 12.7147 18.5V10.7333C12.7147 9.26204 13.2992 7.85099 14.3395 6.81061C15.3799 5.77024 16.791 5.18576 18.2623 5.18576C19.7336 5.18576 21.1446 5.77024 22.185 6.81061C23.2254 7.85099 23.8099 9.26204 23.8099 10.7333V18.5C23.8081 19.9707 23.2231 21.3808 22.1831 22.4208C21.1431 23.4608 19.733 24.0458 18.2623 24.0476ZM18.2623 7.4048C17.3798 7.40576 16.5337 7.75676 15.9097 8.38078C15.2857 9.00479 14.9347 9.85086 14.9337 10.7333V18.5C14.9337 19.3828 15.2844 20.2294 15.9086 20.8536C16.5329 21.4778 17.3795 21.8285 18.2623 21.8285C19.1451 21.8285 19.9917 21.4778 20.6159 20.8536C21.2401 20.2294 21.5908 19.3828 21.5908 18.5V10.7333C21.5899 9.85086 21.2389 9.00479 20.6148 8.38078C19.9908 7.75676 19.1448 7.40576 18.2623 7.4048ZM28.2479 18.5C28.2479 18.2057 28.131 17.9235 27.923 17.7154C27.7149 17.5073 27.4327 17.3905 27.1384 17.3905C26.8441 17.3905 26.5619 17.5073 26.3539 17.7154C26.1458 17.9235 26.0289 18.2057 26.0289 18.5C26.0289 20.5598 25.2106 22.5353 23.7541 23.9918C22.2976 25.4483 20.3221 26.2666 18.2623 26.2666C16.2024 26.2666 14.227 25.4483 12.7704 23.9918C11.3139 22.5353 10.4956 20.5598 10.4956 18.5C10.4956 18.2057 10.3788 17.9235 10.1707 17.7154C9.9626 17.5073 9.68039 17.3905 9.38613 17.3905C9.09187 17.3905 8.80966 17.5073 8.60158 17.7154C8.39351 17.9235 8.27661 18.2057 8.27661 18.5C8.27661 21.1483 9.32867 23.6882 11.2013 25.5609C13.074 27.4336 15.6139 28.4856 18.2623 28.4856C20.9106 28.4856 23.4505 27.4336 25.3232 25.5609C27.1959 23.6882 28.2479 21.1483 28.2479 18.5ZM19.3718 30.7047V27.3761C19.3718 27.0818 19.2549 26.7996 19.0468 26.5916C18.8387 26.3835 18.5565 26.2666 18.2623 26.2666C17.968 26.2666 17.6858 26.3835 17.4777 26.5916C17.2696 26.7996 17.1528 27.0818 17.1528 27.3761V30.7047C17.1528 30.9989 17.2696 31.2811 17.4777 31.4892C17.6858 31.6973 17.968 31.8142 18.2623 31.8142C18.5565 31.8142 18.8387 31.6973 19.0468 31.4892C19.2549 31.2811 19.3718 30.9989 19.3718 30.7047Z\" fill=\"#171717\"/>\n </svg>\n <div class=\"alan-text-chat__animated-btn-bars\">\n <div class=\"alan-text-chat__bar alan-text-chat__bar-1\"></div>\n <div class=\"alan-text-chat__bar alan-text-chat__bar-2\"></div>\n <div class=\"alan-text-chat__bar alan-text-chat__bar-3\"></div>\n <div class=\"alan-text-chat__bar alan-text-chat__bar-3\"></div>\n <div class=\"alan-text-chat__bar alan-text-chat__bar-2\"></div>\n <div class=\"alan-text-chat__bar alan-text-chat__bar-1\"></div>\n </div>";
|
|
3724
|
-
var chatNoMicIcon = "<svg width=\"36\" height=\"36\" viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.9675 16.3602V18.6166C12.9692 20.0539 13.541 21.432 14.5574 22.4483C15.5738 23.4647 16.9518 24.0365 18.3892 24.0382C19.2643 24.0371 20.1175 23.8248 20.8804 23.4294L19.0569 21.8003C18.8389 21.846 18.6153 21.8695 18.3892 21.8695C17.5264 21.8695 16.699 21.5268 16.089 20.9168C15.4789 20.3067 15.1362 19.4793 15.1362 18.6166V18.2976L12.9675 16.3602ZM21.6421 16.7466V11.0263C21.6412 10.1638 21.2982 9.33696 20.6883 8.72712C20.0785 8.11727 19.2516 7.77424 18.3892 7.7733C17.5267 7.77424 16.6999 8.11727 16.09 8.72712C15.5048 9.31233 15.1653 10.0974 15.138 10.9219L13.2678 9.24713C13.5339 8.48102 13.9711 7.77698 14.5555 7.1926C15.5723 6.17585 16.9513 5.60464 18.3892 5.60464C19.8271 5.60464 21.2061 6.17585 22.2228 7.1926C23.2396 8.20935 23.8108 9.58837 23.8108 11.0263V18.6166C23.8108 18.6404 23.8106 18.6643 23.8102 18.6882L21.6421 16.7466ZM22.5782 24.9462C21.345 25.7623 19.89 26.2068 18.3892 26.2068C16.3761 26.2068 14.4455 25.4071 13.022 23.9837C11.5986 22.5602 10.7989 20.6296 10.7989 18.6166C10.7989 18.329 10.6847 18.0532 10.4813 17.8498C10.2779 17.6465 10.0021 17.5322 9.71457 17.5322C9.42699 17.5322 9.15118 17.6465 8.94783 17.8498C8.74448 18.0532 8.63024 18.329 8.63024 18.6166C8.63024 21.2048 9.65841 23.687 11.4886 25.5172C13.0613 27.0899 15.1156 28.0704 17.3048 28.3151V30.5441C17.3048 30.8317 17.4191 31.1075 17.6224 31.3109C17.8258 31.5142 18.1016 31.6285 18.3892 31.6285C18.6768 31.6285 18.9526 31.5142 19.1559 31.3109C19.3593 31.1075 19.4735 30.8317 19.4735 30.5441V28.3151C21.2027 28.1218 22.8477 27.4695 24.2378 26.4288L22.5782 24.9462ZM27.5342 22.0231L25.7589 20.4332C25.9042 19.8436 25.9794 19.2339 25.9794 18.6166C25.9794 18.329 26.0937 18.0532 26.297 17.8498C26.5004 17.6465 26.7762 17.5322 27.0638 17.5322C27.3514 17.5322 27.6272 17.6465 27.8305 17.8498C28.0339 18.0532 28.1481 18.329 28.1481 18.6166C28.1481 19.7909 27.9364 20.9434 27.5342 22.0231Z\" fill=\"#B8B6B6\"/>\n <path d=\"M8.18825 6.56812L31.2883 27.1759C31.8123 27.6433 31.8581 28.4471 31.3906 28.9711C30.9232 29.4951 30.1194 29.5409 29.5954 29.0735L6.49538 8.46573C5.97137 7.99826 5.92553 7.1945 6.39301 6.67049C6.86048 6.14648 7.66424 6.10065 8.18825 6.56812Z\" fill=\"#B8B6B6\"/>\n </svg>\n ";
|
|
3725
|
-
var micIconSrc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH9SURBVHgB7dvvUcIwGMfxByfADdjAEdQN3EA2YATcAJ2AEXADdALcgG4AGzwm13DQkNKWQBvK93OXF4W0Z36mf5IUEQAAAAAAAAAAgPOo6ocpS91bmfIuOM2ENHJhlVnbOoIwF1CVleCYCWas9U0kEQ+SjibXuDdJxEASYbtVg+rbwWDwKAm41QDFBJjE357SKXyTCDASAUYiwEgEGIkAIxFgJAKMRICRWgvQTRZs3IzLxef2rn38zmlxqmoT+L6Rpse/ltbGk36j/bFsKJRTqvZva6zc2TXQtHfofbSV+rYVx2pNmwFm3vbI2/6R+r4rjvUnLWkzQL9Rz972l9T3WXGsTPrGTsN794FloM5Uq00D+/kLUb28Cw8DYbwE6k1LgrOPKJNA/dBaykj6SItrvdZaAzcAzZc3bTBzVyYl9YZ6vJK3kL6yPS7QW+ZyJhvW3fS+HdPAWaDRiyYNdz1vecl/xs0oOe12p3Plxd+d2mX7t/482MnKlutt9i48CnydSf5M+Cv7xxFb78mUsSnDkn1ezeAjk3uh+Y0i1JOaWuu9vi/jTueZns/u29kwLhma98Z5g+CWpjwLirT4/Oezn01S63HJvNrhs4kdbqfyKoePKf1IBBiJACMRYCQCjESAkVIO8HDhKBM0o/tZFzsTzY9sAAAAAAAAAABAjH+9EqX09fBHaQAAAABJRU5ErkJggg==";
|
|
3726
|
-
var alanLogoIconSrc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgCAYAAACLz2ctAAAFtElEQVR4Ae3dL4wcZRjH8WeRKJJTTRBbc4JgkK26UCSXVIHkUBgS2uBAcCQIDAGCh8VAgkG0DsFhqAEqoKI1rCCgLiGhgYA53rd932S7bXdmdmfe3/vn+0kmW45pc7179tvZm3dmzQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0ZWaNOzs723cPJ247ZxrnZ7PZ0hr1hOFlt/1oOp9Zw5oeQFe/C+7habf97rY/TOPAfR4H1qjWC3i48mtlBd+xRjU7gKF+eysfooICLRfw8BEf+9Z0mqxgkwP4iPpFd9122zSarGCrBTzc8P9uuO1f02iugs0N4Ib6Rf+57RfTaK6CLRbwsMc+PxsVTKKpAexRv0hdwVesEc0MoPum+sHrU79IWcFja0RLBbxo/eoX+Qr+ZBrzVirYxACG+l2w4XwF/zKNY/d5P2WVa6WAL9iw+q1SnaKbu+0Nq1z1Axjq97xt747pTtFdqb2CLRRwyAuPx1FV0A9f1RWsegB3OPZbp1yoUHUFay/gGPWLqOAEqh3AEesXUcEJ1FzAMesXUcGRVTmAE9Qv8hVULdeqsoK1FnCK+kXKCla3UKG6AZywfpFftKoaQl/BuVWkxgIe2fRYrjWSqgYwXGS+b9NTLtc6qqmCtRVwymO/dcoKVnMxezUDGBabpqhfxNL9EdRUwJT1izgW3FEVAzhgqf3YfAU/N40qKlhLARX1827PZrPX3OPSNIqvYPEDKKyf91V4fNU0iq9gDQVU1e97V7/f/C/c44ndv8egQtEVLHoAxfW7vvbf75pG0RUsvYDK+p2ufoAKbqfYAcysfpGygpetQEUO4BYXmY/pofpF4gp+aAUqtYBDLzIfix+86x37qF4RF3kxe3EDmGC51SaPrV8U7ni/MI3iLmYvsYDK+t3oue9Vt/1p6c2tsKX7RQ1gqN+LpnGtq36R288P30emUdTS/dIKqHrhceqGqm/9oo9NU8GiLmAqZgDFx37XbCAq2E9JBSypfhEV7FDEAJZWv4gKdiulgCXW7x73+/3ZkaWlV0QFsx9Acf0WNg7VKbrsK1hCAVX1u+nqdcdG4P6chWlO0WVfwazfL9g9e59xD9+YxqfW7wXEaRiwjcKSKcVbgfm/w3O5vidx7gPov2EHlp6//8t3A/Zf9DlWFP59/OenOke9Ubb/BIdiHJjG0Ftv9D1MUB0LZnsxe87HgJ+Yhq/f3WG/xfbcN7jzFCHLtR6W5QC6b+aRe3jWNLa98dAl93k/2WM/VQUv57h0P9cCqpaY/2DD6xf54eu8G3+o4MI0slu6n90AhvrNLT3/hjS7/tgl9wpmdwFTjgVUPUu3OfZb17eCS9O9H1xWFcxqAMX1G+t94S6FszddVAsVsqpgbgVUPTvHvOOpr2CfV8TKhQrZVDCbASz82G/dxXCzzC7NVzCnAtZQv1WdP5ymgpkMoHs2vmn11C/ap4Ld5APovgjn3MPrpjH13e77VvCqachv9ZtDAf399eaWnn/TmanqF/WqYFhNs7T05BezSwcwnCBXfQF2Wuk8wFHP/VSrVY5NSF1A1bGf/6Fzr2t8R7AXbqS0kXChgq/gFRORrQcM9fvVNL6w3c96DOGH/T03ZH9v2km8aPV8OB5NSlnAkk+5DeXPjPRdqHBi6cmW7ksK2Fj9Il+/t6ngg1QFbKl+0ZDlWieWnqSCyQsorN8/bvvadAPo9a3g3DRfo+QVVBRQVb9bph0+r+9ChaVpFq0mr2DSAgqf2f6Um7/FhnoAo7e6bvUWvlY37f5QpJS0gqkLqFxwkMvweS917RAqqFiokLSCyQoYLjK/Zen5+n1p+fmg684L4bYa/l8MRQWTXMyesoDvm8bUCw62lfNyLT/wVb0zOwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANfsfb80MpE9p2rYAAAAASUVORK5CYII=";
|
|
3727
|
-
var roundedTriangleSecondLayerSrc = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iODBweCIgaGVpZ2h0PSI4MHB4IiB2aWV3Qm94PSIwIDAgODAgODAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjEgKDY3MDQ4KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5BbGFuIEJ1dHRvbiAvIEFuaW1hdGlvbiAvIGJ1dHRvbi1pbm5lci1zaGFwZTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iMTAwJSIgeTE9IjMuNzQ5Mzk5NDZlLTMxJSIgeDI9IjIuODYwODIwMDklIiB5Mj0iOTcuMTM5MTc5OSUiIGlkPSJsaW5lYXJHcmFkaWVudC0xIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEyIiBvZmZzZXQ9IjAlIj48L3N0b3A+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4wNCIgb2Zmc2V0PSIxMDAlIj48L3N0b3A+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxnIGlkPSJBbGFuLUJ1dHRvbi0vLUFuaW1hdGlvbi0vLWJ1dHRvbi1pbm5lci1zaGFwZSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPHBhdGggZD0iTTQwLjEwMDU0MjIsOSBMNDAuMTAwNTQyMiw5IEM1MC4wNzA0NzUxLDkgNTkuMTUxNjIzNSwxNC43MzM3OTM4IDYzLjQzODA5OCwyMy43MzUyMjE0IEw3MC40MjIwMjY3LDM4LjQwMTE5NyBDNzUuMTcxMDE0NSw0OC4zNzM4ODQ0IDcwLjkzNjM2OTMsNjAuMzA4MTYwMSA2MC45NjM2ODE5LDY1LjA1NzE0NzggQzU4LjI3NzU5NDksNjYuMzM2MjYwOCA1NS4zMzk5NzQ0LDY3IDUyLjM2NDg3ODksNjcgTDI3LjgzNjIwNTQsNjcgQzE2Ljc5MDUxMDQsNjcgNy44MzYyMDU0Myw1OC4wNDU2OTUgNy44MzYyMDU0Myw0NyBDNy44MzYyMDU0Myw0NC4wMjQ5MDQ1IDguNDk5OTQ0NTksNDEuMDg3Mjg0IDkuNzc5MDU3NiwzOC40MDExOTcgTDE2Ljc2Mjk4NjQsMjMuNzM1MjIxNCBDMjEuMDQ5NDYwOCwxNC43MzM3OTM4IDMwLjEzMDYwOTIsOSA0MC4xMDA1NDIyLDkgWiIgaWQ9ImlubmVyLWJnIiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTEpIj48L3BhdGg+CiAgICA8L2c+Cjwvc3ZnPg==\n";
|
|
3728
|
-
var circleSecondLayerSrc = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iODBweCIgaGVpZ2h0PSI4MHB4IiB2aWV3Qm94PSIwIDAgODAgODAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjEgKDY3MDQ4KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5BbGFuIEJ1dHRvbiAvIEFuaW1hdGlvbiAvIGJ1dHRvbi1pbm5lci1zaGFwZS1zcGVha2luZyBiYWNrPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSIxMDAlIiB5MT0iMy43NDkzOTk0NmUtMzElIiB4Mj0iMi44NjA4MjAwOSUiIHkyPSI5Ny4xMzkxNzk5JSIgaWQ9ImxpbmVhckdyYWRpZW50LTEiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMTIiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjA0IiBvZmZzZXQ9IjEwMCUiPjwvc3RvcD4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgaWQ9IkFsYW4tQnV0dG9uLS8tQW5pbWF0aW9uLS8tYnV0dG9uLWlubmVyLXNoYXBlLXNwZWFraW5nLWJhY2siIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxjaXJjbGUgaWQ9ImlubmVyLWJnIiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTEpIiBjeD0iNDAiIGN5PSI0MCIgcj0iMzIiPjwvY2lyY2xlPgogICAgPC9nPgo8L3N2Zz4=\n";
|
|
3729
4892
|
var micIconDiv = document.createElement("div");
|
|
3730
4893
|
var unreadChatMsgCount = 0;
|
|
3731
|
-
var chatHolderDiv =
|
|
4894
|
+
var chatHolderDiv = createDiv({ id: "alan-btn-chat-holder" });
|
|
4895
|
+
var chatDivWrapper = document.createElement("div");
|
|
4896
|
+
chatDivWrapper.id = "alan-text-chat-wrapper";
|
|
4897
|
+
var chatSideBar = document.createElement("div");
|
|
4898
|
+
chatSideBar.id = "alan-text-chat-side-bar";
|
|
4899
|
+
chatSideBar.classList.add("alan-btn__chat-side-bar");
|
|
4900
|
+
var chatSideBarHeader = document.createElement("div");
|
|
4901
|
+
chatSideBarHeader.classList.add("alan-btn__side-bar-header");
|
|
4902
|
+
chatSideBar.appendChild(chatSideBarHeader);
|
|
4903
|
+
chatDivWrapper.appendChild(chatSideBar);
|
|
4904
|
+
chatHolderDiv.appendChild(chatDivWrapper);
|
|
3732
4905
|
var chatDiv = document.createElement("div");
|
|
3733
4906
|
chatDiv.id = "alan-text-chat";
|
|
3734
|
-
|
|
4907
|
+
chatDiv.classList.add("alan-btn__popup-chat");
|
|
4908
|
+
chatDivWrapper.appendChild(chatDiv);
|
|
3735
4909
|
var chatNotificationsBubble = document.createElement("div");
|
|
3736
4910
|
chatNotificationsBubble.id = "chat-notifications-bubble";
|
|
3737
4911
|
chatNotificationsBubble.classList.add("alan-btn__chat-notifications-bubble");
|
|
@@ -3797,7 +4971,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
3797
4971
|
var bottomBtnPos;
|
|
3798
4972
|
var topBtnPos;
|
|
3799
4973
|
var initRightPos;
|
|
3800
|
-
var btnZIndex;
|
|
3801
4974
|
var btnIconsZIndex;
|
|
3802
4975
|
var btnTextPanelsZIndex;
|
|
3803
4976
|
var btnBgLayerZIndex;
|
|
@@ -3867,23 +5040,12 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
3867
5040
|
}
|
|
3868
5041
|
return value;
|
|
3869
5042
|
}
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
defaultZIndex = zindex;
|
|
3877
|
-
}
|
|
3878
|
-
}
|
|
3879
|
-
return defaultZIndex;
|
|
3880
|
-
}
|
|
3881
|
-
btnZIndex = options2.zIndex || findHighestZIndex() + 1;
|
|
3882
|
-
btnIconsZIndex = btnZIndex - 2;
|
|
3883
|
-
btnTextPanelsZIndex = btnZIndex - 1;
|
|
3884
|
-
btnBgLayerZIndex = btnZIndex - 3;
|
|
3885
|
-
if (btnZIndex) {
|
|
3886
|
-
rootEl.style.zIndex = btnZIndex;
|
|
5043
|
+
uiState.btn.zIndex = options2.zIndex || findHighestZIndex() + 1;
|
|
5044
|
+
btnIconsZIndex = uiState.btn.zIndex - 2;
|
|
5045
|
+
btnTextPanelsZIndex = uiState.btn.zIndex - 1;
|
|
5046
|
+
btnBgLayerZIndex = uiState.btn.zIndex - 3;
|
|
5047
|
+
if (uiState.btn.zIndex) {
|
|
5048
|
+
rootEl.style.zIndex = uiState.btn.zIndex;
|
|
3887
5049
|
}
|
|
3888
5050
|
rootEl.style.position = options2.position ? options2.position : "fixed";
|
|
3889
5051
|
setButtonPosition();
|
|
@@ -3908,7 +5070,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
3908
5070
|
isRightAligned = false;
|
|
3909
5071
|
}
|
|
3910
5072
|
if (options2.top !== void 0) {
|
|
3911
|
-
isTopAligned = true;
|
|
5073
|
+
uiState.btn.isTopAligned = true;
|
|
3912
5074
|
isBottomAligned = false;
|
|
3913
5075
|
}
|
|
3914
5076
|
if (isLeftAligned) {
|
|
@@ -3922,13 +5084,13 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
3922
5084
|
setDefaultBtnHorizontalPosition();
|
|
3923
5085
|
}
|
|
3924
5086
|
function setDefaultBtnHorizontalPosition() {
|
|
3925
|
-
if (isTopAligned) {
|
|
5087
|
+
if (uiState.btn.isTopAligned) {
|
|
3926
5088
|
topBtnPos = setDefautlPositionProps(options2.top !== void 0 ? options2.top : btnModes[mode].topPos);
|
|
3927
5089
|
}
|
|
3928
5090
|
else {
|
|
3929
5091
|
bottomBtnPos = setDefautlPositionProps(options2.bottom !== void 0 ? options2.bottom : btnModes[mode].bottomPos);
|
|
3930
5092
|
}
|
|
3931
|
-
if (isTopAligned) {
|
|
5093
|
+
if (uiState.btn.isTopAligned) {
|
|
3932
5094
|
rootEl.style.top = topBtnPos;
|
|
3933
5095
|
rootEl.style.setProperty("bottom", "");
|
|
3934
5096
|
}
|
|
@@ -3941,13 +5103,13 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
3941
5103
|
if (textChatIsHidden) {
|
|
3942
5104
|
return;
|
|
3943
5105
|
}
|
|
3944
|
-
el.style.zIndex =
|
|
5106
|
+
el.style.zIndex = uiState.btn.zIndex + 2;
|
|
3945
5107
|
if (isMobile()) {
|
|
3946
5108
|
return;
|
|
3947
5109
|
}
|
|
3948
5110
|
setTimeout(function () {
|
|
3949
5111
|
var _a, _b;
|
|
3950
|
-
var defaultMargin =
|
|
5112
|
+
var defaultMargin = uiState.textChat.defaults.chatMargin;
|
|
3951
5113
|
var chatHeight2 = el.clientHeight;
|
|
3952
5114
|
var canPutTextChatInSavedPos = false;
|
|
3953
5115
|
var savedPosTop = +getTextChatPositionAfterResize("top");
|
|
@@ -4051,7 +5213,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
4051
5213
|
el.style.right = (absolutePosition ? 0 : parseInt(rootEl.style.right, 10)) + _btnSize + 10 + "px";
|
|
4052
5214
|
}
|
|
4053
5215
|
if (!topPos) {
|
|
4054
|
-
if (isTopAligned) {
|
|
5216
|
+
if (uiState.btn.isTopAligned) {
|
|
4055
5217
|
el.style.bottom = "";
|
|
4056
5218
|
el.style.top = (absolutePosition ? 0 : parseInt(rootEl.style.top, 10)) + _btnSize / 2 + "px";
|
|
4057
5219
|
}
|
|
@@ -4115,7 +5277,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
4115
5277
|
btn.style.position = "absolute";
|
|
4116
5278
|
var transitionCss = "transform 0.4s ease-in-out, opacity 0.4s ease-in-out";
|
|
4117
5279
|
applyBtnSizeOptions(btnSize);
|
|
4118
|
-
if (isTopAligned) {
|
|
5280
|
+
if (uiState.btn.isTopAligned) {
|
|
4119
5281
|
btn.style.top = "0";
|
|
4120
5282
|
}
|
|
4121
5283
|
else {
|
|
@@ -4125,7 +5287,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
4125
5287
|
btn.style.borderRadius = "50%";
|
|
4126
5288
|
btn.style.textAlign = "center";
|
|
4127
5289
|
btn.style.transition = transitionCss;
|
|
4128
|
-
btn.style.zIndex =
|
|
5290
|
+
btn.style.zIndex = uiState.btn.zIndex;
|
|
4129
5291
|
if (options2 && options2.tabIndex) {
|
|
4130
5292
|
btn.tabIndex = options2.tabIndex;
|
|
4131
5293
|
}
|
|
@@ -4197,7 +5359,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
4197
5359
|
processStateBtnIconImg,
|
|
4198
5360
|
replyStateBtnIconImg
|
|
4199
5361
|
];
|
|
4200
|
-
defaultStateBtnIconImg.src = micIconSrc;
|
|
5362
|
+
defaultStateBtnIconImg.src = btnIcons.micIconSrc;
|
|
4201
5363
|
for (var i = 0; i < logoImgs.length; i++) {
|
|
4202
5364
|
var logoImgEl = logoImgs[i];
|
|
4203
5365
|
logoImgEl.style.minHeight = "100%";
|
|
@@ -4271,77 +5433,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
4271
5433
|
setStylesForBtnImage(lowVolumeMicIconImg, { height: "100%", top: "0%", altText: " low volume icon", src: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iODBweCIgaGVpZ2h0PSI4MHB4IiB2aWV3Qm94PSIwIDAgODAgODAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjEgKDY3MDQ4KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5BbGFuIEJ1dHRvbiAvIEFuaW1hdGlvbiAvIGJ1dHRvbi1uby1taWM8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZyBpZD0iQWxhbi1CdXR0b24tLy1BbmltYXRpb24tLy1idXR0b24tbm8tbWljIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iaWNvbiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjIuMDAwMDAwLCAxOS4wMDAwMDApIiBmaWxsPSIjRkZGRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iPgogICAgICAgICAgICA8cGF0aCBkPSJNMzIsMTguNDczNjg0MiBDMzIsMjUuNzE5NDczNyAyNi43OCwzMS42OTI2MzE2IDIwLDMyLjY5ODQyMTEgTDIwLDQwIEMyMCw0MS4xMDQ1Njk1IDE5LjEwNDU2OTUsNDIgMTgsNDIgQzE2Ljg5NTQzMDUsNDIgMTYsNDEuMTA0NTY5NSAxNiw0MCBMMTYsMzIuNjk4NDIxMSBDOS4yMiwzMS42OTI2MzE2IDQsMjUuNzE5NDczNyA0LDE4LjQ3MzY4NDIgTDQsMTggQzQsMTYuODk1NDMwNSA0Ljg5NTQzMDUsMTYgNiwxNiBDNy4xMDQ1Njk1LDE2IDgsMTYuODk1NDMwNSA4LDE4IEw4LDE4LjQ3MzY4NDIgQzgsMjQuMTQxODY5OCAxMi40NzcxNTI1LDI4LjczNjg0MjEgMTgsMjguNzM2ODQyMSBDMjMuNTIyODQ3NSwyOC43MzY4NDIxIDI4LDI0LjE0MTg2OTggMjgsMTguNDczNjg0MiBMMjgsMTggQzI4LDE2Ljg5NTQzMDUgMjguODk1NDMwNSwxNiAzMCwxNiBDMzEuMTA0NTY5NSwxNiAzMiwxNi44OTU0MzA1IDMyLDE4IEwzMiwxOC40NzM2ODQyIFoiIGlkPSJTaGFwZSIgZmlsbC1vcGFjaXR5PSIwLjgiPjwvcGF0aD4KICAgICAgICAgICAgPHBhdGggZD0iTTE4LC00LjUyNzM3MjYzZS0xNCBDMjEuMzEzNzA4NSwtNC42MTg1Mjc3OGUtMTQgMjQsMi43NTY5ODMzOCAyNCw2LjE1Nzg5NDc0IEwyNCwxOC40NzM2ODQyIEMyNCwyMS44NzQ1OTU2IDIxLjMxMzcwODUsMjQuNjMxNTc4OSAxOCwyNC42MzE1Nzg5IEMxNC42ODYyOTE1LDI0LjYzMTU3ODkgMTIsMjEuODc0NTk1NiAxMiwxOC40NzM2ODQyIEwxMiw2LjE1Nzg5NDc0IEMxMiwyLjc1Njk4MzM4IDE0LjY4NjI5MTUsLTQuNTI3MzcyNjNlLTE0IDE4LC00LjYxODUyNzc4ZS0xNCBaIiBpZD0iU2hhcGUiIGZpbGwtb3BhY2l0eT0iMC42Ij48L3BhdGg+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0zLjgxLDMuMjcgTDM0LjczLDM0LjE5IEMzNS40MzE0MDE2LDM0Ljg5MTQwMTYgMzUuNDMxNDAxNiwzNi4wMjg1OTg0IDM0LjczLDM2LjczIEMzNC4wMjg1OTg0LDM3LjQzMTQwMTYgMzIuODkxNDAxNiwzNy40MzE0MDE2IDMyLjE5LDM2LjczIEwxLjI3LDUuODEgQzAuNTY4NTk4MzY4LDUuMTA4NTk4MzcgMC41Njg1OTgzNjgsMy45NzE0MDE2MyAxLjI3LDMuMjcgQzEuOTcxNDAxNjMsMi41Njg1OTgzNyAzLjEwODU5ODM3LDIuNTY4NTk4MzcgMy44MSwzLjI3IFoiIGlkPSJQYXRoIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=\n" });
|
|
4272
5434
|
setStylesForBtnImage(noVoiceSupportMicIconImg, { height: "100%", top: "0%", altText: " no voice support icon", src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIuSURBVHgB7dvxUYMwFAbwpxMwAhvoBtVJygZ1A92gI1Qn6AjoBO0GsEG7wfPlgCtNA7xASzX5fnf5oyThLp+BQDiJAAAAAAAAAAAAAAAAxmHmDyk5n+ykLAn6SUhpHVaXwrQhcBsIr5FTLGSwb1IOmpkj9RnrxXE5+1x+fH7Pwyw0+PKSLLpCrGeq1oFiwNWiUGhCZE8UC22I7IliogmRPVFshkJkTxSjvhDZE8WqJ0QEqNURIgL0MTVEgmkhElTGhkix4WqzoNlYWFp1k1fhvvMHgc9n2cFRPzXAou/8t/JAM7EH/SD66ocM9bfrb+WR7kTGm1iHjqR3HDjXbOYMsLR+p9bvPentr3iuSeYM0B7Uwvr9RXqfA+cqKTRyma2sdSB3tMlZJ7X62Ru3Qa7CiSOIF6uN9pmw4NMuTjYUcDAcM8wEkTjaZdasytm9AfHsOL6lUJkZx5c2yr7a2ZlSyGSAa8egt5qBK0JU/TH+Na7uha4QzLHBm7+0ee8Iz/Sf/XlwtjeRtnq2mVU4dVSXUr6l/NDpccS0e5KSSekKybR9lReQkmLAV9hU7ZiFKcWCq8t5zeOtWfndOWhczcYN6+VSFq2+RfQhGnUYWUeY5ph5m0k6+iHENjs9RXuE2OYbYN3HFeKOYjQmwLrfRYgUo7EB1n2bEM03khXd0F0epDXs0Obaovd1ty39UCDAif5ygO0PRyWBH64eqJuFAP9kAwAAAAAAAAAAAAAAU/wC52820szaQtwAAAAASUVORK5CYII=" });
|
|
4273
5435
|
setStylesForBtnImage(offlineIconImg, { height: "100%", top: "0%", altText: " offline icon", src: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iODBweCIgaGVpZ2h0PSI4MHB4IiB2aWV3Qm94PSIwIDAgODAgODAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjEgKDY3MDQ4KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5BbGFuIEJ1dHRvbiAvIEFuaW1hdGlvbiAvIGJ1dHRvbi1uby1uZXR3b3JrPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGcgaWQ9IkFsYW4tQnV0dG9uLS8tQW5pbWF0aW9uLS8tYnV0dG9uLW5vLW5ldHdvcmsiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJpY29uIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyMS4wMDAwMDAsIDIyLjAwMDAwMCkiIGZpbGw9IiNGRkZGRkYiPgogICAgICAgICAgICA8cGF0aCBkPSJNMzMsMiBDMzQuNjU2ODU0MiwyIDM2LDMuMzQzMTQ1NzUgMzYsNSBMMzYsMjkgQzM2LDMwLjY1Njg1NDIgMzQuNjU2ODU0MiwzMiAzMywzMiBDMzEuMzQzMTQ1OCwzMiAzMCwzMC42NTY4NTQyIDMwLDI5IEwzMCw1IEMzMCwzLjM0MzE0NTc1IDMxLjM0MzE0NTgsMiAzMywyIFoiIGlkPSJTaGFwZSIgZmlsbC1vcGFjaXR5PSIwLjQiPjwvcGF0aD4KICAgICAgICAgICAgPHBhdGggZD0iTTIzLDggQzI0LjY1Njg1NDIsOCAyNiw5LjM0MzE0NTc1IDI2LDExIEwyNiwyOSBDMjYsMzAuNjU2ODU0MiAyNC42NTY4NTQyLDMyIDIzLDMyIEMyMS4zNDMxNDU4LDMyIDIwLDMwLjY1Njg1NDIgMjAsMjkgTDIwLDExIEMyMCw5LjM0MzE0NTc1IDIxLjM0MzE0NTgsOCAyMyw4IFoiIGlkPSJTaGFwZSIgZmlsbC1vcGFjaXR5PSIwLjYiPjwvcGF0aD4KICAgICAgICAgICAgPHBhdGggZD0iTTEzLDE2IEMxNC42NTY4NTQyLDE2IDE2LDE3LjM0MzE0NTggMTYsMTkgTDE2LDI5IEMxNiwzMC42NTY4NTQyIDE0LjY1Njg1NDIsMzIgMTMsMzIgQzExLjM0MzE0NTgsMzIgMTAsMzAuNjU2ODU0MiAxMCwyOSBMMTAsMTkgQzEwLDE3LjM0MzE0NTggMTEuMzQzMTQ1OCwxNiAxMywxNiBaIiBpZD0iU2hhcGUiIGZpbGwtb3BhY2l0eT0iMC44Ij48L3BhdGg+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0zLDIyIEM0LjY1Njg1NDI1LDIyIDYsMjMuMzQzMTQ1OCA2LDI1IEw2LDI5IEM2LDMwLjY1Njg1NDIgNC42NTY4NTQyNSwzMiAzLDMyIEMxLjM0MzE0NTc1LDMyIDIuMDI5MDYxMjVlLTE2LDMwLjY1Njg1NDIgMCwyOSBMMCwyNSBDLTIuMDI5MDYxMjVlLTE2LDIzLjM0MzE0NTggMS4zNDMxNDU3NSwyMiAzLDIyIFoiIGlkPSJTaGFwZSI+PC9wYXRoPgogICAgICAgICAgICA8cGF0aCBkPSJNNS44MSwxLjI3IEwzNi43MywzMi4xOSBDMzcuNDMxNDAxNiwzMi44OTE0MDE2IDM3LjQzMTQwMTYsMzQuMDI4NTk4NCAzNi43MywzNC43MyBDMzYuMDI4NTk4NCwzNS40MzE0MDE2IDM0Ljg5MTQwMTYsMzUuNDMxNDAxNiAzNC4xOSwzNC43MyBMMy4yNywzLjgxIEMyLjU2ODU5ODM3LDMuMTA4NTk4MzcgMi41Njg1OTgzNywxLjk3MTQwMTYzIDMuMjcsMS4yNyBDMy45NzE0MDE2MywwLjU2ODU5ODM2OCA1LjEwODU5ODM3LDAuNTY4NTk4MzY4IDUuODEsMS4yNyBaIiBpZD0iUGF0aCIgZmlsbC1ydWxlPSJub256ZXJvIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=\n" });
|
|
4274
|
-
var defaultBtnColorOptions = {
|
|
4275
|
-
"idle": {
|
|
4276
|
-
"background": {
|
|
4277
|
-
"color": [
|
|
4278
|
-
"rgb(34, 203, 255)",
|
|
4279
|
-
"rgb(25, 149, 255)"
|
|
4280
|
-
]
|
|
4281
|
-
},
|
|
4282
|
-
"hover": {
|
|
4283
|
-
"color": [
|
|
4284
|
-
"rgba(0, 70, 255, 0.95)",
|
|
4285
|
-
"rgba(0, 156, 255, 0.95)"
|
|
4286
|
-
]
|
|
4287
|
-
}
|
|
4288
|
-
},
|
|
4289
|
-
"listen": {
|
|
4290
|
-
"background": {
|
|
4291
|
-
"color": [
|
|
4292
|
-
"rgba(0, 70, 255, 0.95)",
|
|
4293
|
-
"rgba(0, 156, 255, 0.95)"
|
|
4294
|
-
]
|
|
4295
|
-
},
|
|
4296
|
-
"hover": {
|
|
4297
|
-
"color": [
|
|
4298
|
-
"rgba(0, 70, 255, 0.95)",
|
|
4299
|
-
"rgb(0, 70, 255)"
|
|
4300
|
-
]
|
|
4301
|
-
}
|
|
4302
|
-
},
|
|
4303
|
-
"process": {
|
|
4304
|
-
"background": {
|
|
4305
|
-
"color": [
|
|
4306
|
-
"rgba(0, 255, 205, 0.95)",
|
|
4307
|
-
"rgba(0, 115, 255, 0.95)"
|
|
4308
|
-
]
|
|
4309
|
-
},
|
|
4310
|
-
"hover": {
|
|
4311
|
-
"color": [
|
|
4312
|
-
"rgb(0, 115, 255)",
|
|
4313
|
-
"rgba(0, 115, 255, 0.95)"
|
|
4314
|
-
]
|
|
4315
|
-
}
|
|
4316
|
-
},
|
|
4317
|
-
"reply": {
|
|
4318
|
-
"background": {
|
|
4319
|
-
"color": [
|
|
4320
|
-
"rgba(122, 40, 255, 0.95)",
|
|
4321
|
-
"rgba(61, 122, 255, 0.95)"
|
|
4322
|
-
]
|
|
4323
|
-
},
|
|
4324
|
-
"hover": {
|
|
4325
|
-
"color": [
|
|
4326
|
-
"rgba(122, 40, 255, 0.95)",
|
|
4327
|
-
"rgb(122, 40, 255)"
|
|
4328
|
-
]
|
|
4329
|
-
}
|
|
4330
|
-
},
|
|
4331
|
-
"textChat": {
|
|
4332
|
-
"background": {
|
|
4333
|
-
"color": ["#1eb6e5", "#1995ff"],
|
|
4334
|
-
"angle": 45
|
|
4335
|
-
},
|
|
4336
|
-
"hover": {
|
|
4337
|
-
"color": ["#1ba3ce", "#1686e5"],
|
|
4338
|
-
"angle": 45
|
|
4339
|
-
},
|
|
4340
|
-
"shadow": {
|
|
4341
|
-
"color": ["#6693bc", "#b3c9de"]
|
|
4342
|
-
}
|
|
4343
|
-
}
|
|
4344
|
-
};
|
|
4345
5436
|
btnOval1.style.transform = "rotate(-315deg)";
|
|
4346
5437
|
btnOval2.style.transform = "rotate(-45deg)";
|
|
4347
5438
|
applySizeSettingsToBlurLayers([btnOval1, btnOval2]);
|
|
@@ -4365,7 +5456,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
4365
5456
|
el.classList.add("alanBtn-oval-bg-default");
|
|
4366
5457
|
}
|
|
4367
5458
|
}
|
|
4368
|
-
var popupCloseIconImgBase64 = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuNzczNDUgNy4wMDAwM0wxMy44Mzk4IDAuOTMzNjA0QzE0LjA1MzQgMC43MjAwMjIgMTQuMDUzNCAwLjM3Mzc0MSAxMy44Mzk4IDAuMTYwMTg2QzEzLjYyNjMgLTAuMDUzMzY4MSAxMy4yOCAtMC4wNTMzOTU1IDEzLjA2NjQgMC4xNjAxODZMNyA2LjIyNjYxTDAuOTMzNjA0IDAuMTYwMTg2QzAuNzIwMDIyIC0wLjA1MzM5NTUgMC4zNzM3NDEgLTAuMDUzMzk1NSAwLjE2MDE4NiAwLjE2MDE4NkMtMC4wNTMzNjgxIDAuMzczNzY4IC0wLjA1MzM5NTUgMC43MjAwNDkgMC4xNjAxODYgMC45MzM2MDRMNi4yMjY1OSA3TDAuMTYwMTg2IDEzLjA2NjRDLTAuMDUzMzk1NSAxMy4yOCAtMC4wNTMzOTU1IDEzLjYyNjMgMC4xNjAxODYgMTMuODM5OEMwLjI2Njk2NCAxMy45NDY2IDAuNDA2OTM2IDE0IDAuNTQ2OTA5IDE0QzAuNjg2ODgxIDE0IDAuODI2ODI3IDEzLjk0NjYgMC45MzM2MzEgMTMuODM5OEw3IDcuNzczNDVMMTMuMDY2NCAxMy44Mzk4QzEzLjE3MzIgMTMuOTQ2NiAxMy4zMTMyIDE0IDEzLjQ1MzEgMTRDMTMuNTkzMSAxNCAxMy43MzMgMTMuOTQ2NiAxMy44Mzk4IDEzLjgzOThDMTQuMDUzNCAxMy42MjYzIDE0LjA1MzQgMTMuMjggMTMuODM5OCAxMy4wNjY0TDcuNzczNDUgNy4wMDAwM1oiIGZpbGw9IiNCQkNGRTciLz4KPC9zdmc+Cg==";
|
|
4369
5459
|
btnBgDefault.classList.add("alanBtn-bg-default");
|
|
4370
5460
|
btnBgListening.classList.add("alanBtn-bg-listening");
|
|
4371
5461
|
btnBgSpeaking.classList.add("alanBtn-bg-speaking");
|
|
@@ -4424,475 +5514,9 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
4424
5514
|
if (isMobile()) {
|
|
4425
5515
|
rootEl.classList.add("mobile");
|
|
4426
5516
|
}
|
|
4427
|
-
|
|
4428
|
-
var margin = doubleMargin ? 2 * defaultChatMargin : defaultChatMargin;
|
|
4429
|
-
if (height !== null && window.innerHeight - defaultChatMargin < height) {
|
|
4430
|
-
setChatHeight(window.innerHeight - margin);
|
|
4431
|
-
}
|
|
4432
|
-
if (width !== null && window.innerWidth - defaultChatMargin < width) {
|
|
4433
|
-
setChatWidth(window.innerWidth - margin);
|
|
4434
|
-
}
|
|
4435
|
-
};
|
|
4436
|
-
createAlanStyleSheet();
|
|
4437
|
-
function getStyleSheetMarker(andFlag) {
|
|
4438
|
-
return ".alan-" + getProjectId() + (andFlag ? "" : " ");
|
|
4439
|
-
}
|
|
4440
|
-
function createAlanStyleSheet(webOptions) {
|
|
4441
|
-
var _a;
|
|
4442
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139;
|
|
4443
|
-
var style;
|
|
4444
|
-
var keyFrames = "";
|
|
4445
|
-
var projectId = getProjectId();
|
|
4446
|
-
var existingStyleSheet;
|
|
4447
|
-
if (options2.shadowDOM) {
|
|
4448
|
-
existingStyleSheet = options2.shadowDOM.getElementById("alan-stylesheet-" + projectId);
|
|
4449
|
-
}
|
|
4450
|
-
else {
|
|
4451
|
-
existingStyleSheet = document.getElementById("alan-stylesheet-" + projectId);
|
|
4452
|
-
}
|
|
4453
|
-
style = document.createElement("style");
|
|
4454
|
-
style.setAttribute("id", "alan-stylesheet-" + projectId);
|
|
4455
|
-
style.type = "text/css";
|
|
4456
|
-
keyFrames += ".alanBtn-root * { box-sizing: border-box; font-family: ".concat(((_d = (_c = (_b = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _b === void 0 ? void 0 : _b.textChat) === null || _c === void 0 ? void 0 : _c.popup) === null || _d === void 0 ? void 0 : _d.fontFamily) || "Poppins", "; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;}");
|
|
4457
|
-
var hoverSelector = !isMobile() ? ":hover" : ":active";
|
|
4458
|
-
if (!isMobile()) {
|
|
4459
|
-
keyFrames += getStyleSheetMarker() + ".alanBtn{transform: scale(1); transition: " + transitionCss + ";} .alanBtn" + hoverSelector + "{transform: scale(1.11111);transition:" + transitionCss + ";}.alanBtn:focus {transform: scale(1);" + transitionCss + "; border: solid 3px #50e3c2; outline: none; }";
|
|
4460
|
-
keyFrames += getStyleSheetMarker(true) + ".alan-btn-disconnected .alanBtn" + hoverSelector + "{transform: scale(1);transition:" + transitionCss + ";}";
|
|
4461
|
-
keyFrames += getStyleSheetMarker(true) + ".alan-btn-offline .alanBtn" + hoverSelector + "{transform: scale(1);transition:" + transitionCss + ";}";
|
|
4462
|
-
keyFrames += getStyleSheetMarker(true) + ".alan-btn-no-voice-support .alanBtn" + hoverSelector + "{transform: scale(1);transition:" + transitionCss + ";}";
|
|
4463
|
-
}
|
|
4464
|
-
keyFrames += getStyleSheetMarker(true) + ".alan-btn__page-scrolled .alanBtn {\n transform: scale(0.4);\n opacity: 0.5;\n pointer-events: none;\n transition: ".concat(transitionCss, ";\n }");
|
|
4465
|
-
keyFrames += getStyleSheetMarker() + ".alanBtn-recognised-text-holder { position:fixed; transform: translateY(" + (isTopAligned ? "-" : "") + "50%); max-width:236px; font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 18px; min-height: 40px; color: #000; font-weight: normal; background-color: #fff; border-radius:10px; box-shadow: 0px 1px 14px rgba(0, 0, 0, 0.35); display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack: activate;-ms-flex-pack: start;justify-content: start;}";
|
|
4466
|
-
keyFrames += getStyleSheetMarker() + " .alanBtn-recognised-text-holder.alan-btn-lib__with-text.alan-btn-lib__left-side { text-align: left;}";
|
|
4467
|
-
keyFrames += getStyleSheetMarker() + " .alanBtn-recognised-text-holder.alan-btn-lib__with-text.alan-btn-lib__right-side { text-align: right;}";
|
|
4468
|
-
keyFrames += getStyleSheetMarker() + " .alanBtn-recognised-text-holder .alanBtn-recognised-text-content:not(:empty) {padding: 10px;}";
|
|
4469
|
-
keyFrames += getStyleSheetMarker(true) + ".alanBtn-recognised-text-holder-long { font-size: 12px!important;line-height: 1.4!important;} ";
|
|
4470
|
-
keyFrames += getStyleSheetMarker(true) + ".alanBtn-recognised-text-holder-super-long { font-size: 11px!important;line-height: 1.4!important;} ";
|
|
4471
|
-
keyFrames += getStyleSheetMarker() + ".alanBtn-text-appearing { animation: text-holder-appear 800ms ease-in-out forwards; }";
|
|
4472
|
-
keyFrames += getStyleSheetMarker() + ".alanBtn-text-disappearing { animation: text-holder-disappear 800ms ease-in-out forwards; }";
|
|
4473
|
-
keyFrames += getStyleSheetMarker() + ".alanBtn-text-disappearing-immediately { animation: none; opactity: 0; }";
|
|
4474
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn-disabled { pointer-events: none; opacity: .5; transition: all .2s ease-in-out; }";
|
|
4475
|
-
keyFrames += getStyleSheetMarker() + ".shadow-appear { opacity: 1 !important; }\n";
|
|
4476
|
-
keyFrames += getStyleSheetMarker() + ".shadow-disappear { opacity: 0 !important; transition: all .1s linear !important; }";
|
|
4477
|
-
keyFrames += getStyleSheetMarker(true) + ".alan-btn-offline .alanBtn-bg-default { background-image: linear-gradient(122deg,rgb(78,98,126),rgb(91,116,145));}";
|
|
4478
|
-
keyFrames += getStyleSheetMarker(true) + ".alan-btn-offline .alanBtn" + hoverSelector + " .alanBtn-bg-default { background-image: linear-gradient(122deg,rgb(78,98,126),rgb(91,116,145))!important;}";
|
|
4479
|
-
keyFrames += getStyleSheetMarker(true) + ".alan-btn-no-voice-support .alanBtn-bg-default { background-image: linear-gradient(122deg,rgb(78,98,126),rgb(91,116,145));}";
|
|
4480
|
-
keyFrames += getStyleSheetMarker(true) + ".alan-btn-no-voice-support .alanBtn" + hoverSelector + " .alanBtn-bg-default { background-image: linear-gradient(122deg,rgb(78,98,126),rgb(91,116,145))!important;}";
|
|
4481
|
-
keyFrames += getStyleSheetMarker(true) + ".alan-btn-permission-denied .alanBtn .alanBtn-bg-default { background-image: linear-gradient(122deg,rgb(78,98,126),rgb(91,116,145));}";
|
|
4482
|
-
keyFrames += getStyleSheetMarker(true) + ".alan-btn-permission-denied .alanBtn" + hoverSelector + " .alanBtn-bg-default { background-image: linear-gradient(122deg,rgb(78,98,126),rgb(91,116,145))!important;}";
|
|
4483
|
-
keyFrames += getStyleSheetMarker() + ".triangleMicIconBg {background-image:url(" + roundedTriangleSecondLayerSrc + "); pointer-events: none;}";
|
|
4484
|
-
keyFrames += getStyleSheetMarker() + ".circleMicIconBg {background-image:url(" + circleSecondLayerSrc + "); pointer-events: none;}";
|
|
4485
|
-
keyFrames += getStyleSheetMarker() + " img {pointer-events: none;}";
|
|
4486
|
-
keyFrames += getStyleSheetMarker() + "" + hoverSelector + " .triangleMicIconBg-default {opacity:0!important;}";
|
|
4487
|
-
keyFrames += getStyleSheetMarker() + ".alan-overlay-for-alert {position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 99;background: rgba(0, 0, 0, 0.57);opacity: 0;-webkit-animation: alan-fade-in 0.5s 0.2s forwards;-moz-animation: alan-fade-in 0.5s 0.2s forwards;-o-animation: alan-fade-in 0.5s 0.2s forwards;animation: alan-fade-in 0.5s 0.2s forwards;}";
|
|
4488
|
-
keyFrames += getStyleSheetMarker() + ".alan-alert-popup {border-radius:10px; box-shadow: 0px 5px 14px rgba(3, 3, 3, 0.25);padding:12px;padding-right:24px;text-align: center;width: 220px;background: rgb(255 255 255);position: fixed;left: 50%;transform: translateX(-50%);top: 10%; color: #000;font-size: 14px;line-height: 18px;}";
|
|
4489
|
-
keyFrames += getStyleSheetMarker() + '.alan-alert-popup__close-btn {background:url("' + popupCloseIconImgBase64 + '") no-repeat center;cursor:pointer; background-size:100% 100%;position: absolute;top: 12px;right: 12px;width: 14px;height: 14px;}';
|
|
4490
|
-
var cssChatHeight = getTextChatSizeAfterResize("height");
|
|
4491
|
-
var cssChatWidth = getTextChatSizeAfterResize("width");
|
|
4492
|
-
fixTextChatSizeIfNeeded(cssChatWidth, cssChatHeight, true);
|
|
4493
|
-
cssChatHeight = getTextChatSizeAfterResize("height");
|
|
4494
|
-
cssChatWidth = getTextChatSizeAfterResize("width");
|
|
4495
|
-
if (cssChatHeight) {
|
|
4496
|
-
cssChatHeight = "".concat(cssChatHeight, "px");
|
|
4497
|
-
}
|
|
4498
|
-
else {
|
|
4499
|
-
cssChatHeight = "".concat(migrateHeightFromPercent((_g = (_f = (_e = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _e === void 0 ? void 0 : _e.textChat) === null || _f === void 0 ? void 0 : _f.popup) === null || _g === void 0 ? void 0 : _g.height) || defaultChatHeight, "px");
|
|
4500
|
-
}
|
|
4501
|
-
function migrateHeightFromPercent(val) {
|
|
4502
|
-
if (val && +val <= 100) {
|
|
4503
|
-
return defaultChatHeight;
|
|
4504
|
-
}
|
|
4505
|
-
return val;
|
|
4506
|
-
}
|
|
4507
|
-
if (cssChatWidth) {
|
|
4508
|
-
cssChatWidth = "".concat(cssChatWidth, "px");
|
|
4509
|
-
}
|
|
4510
|
-
else {
|
|
4511
|
-
cssChatWidth = "".concat(((_k = (_j = (_h = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _h === void 0 ? void 0 : _h.textChat) === null || _j === void 0 ? void 0 : _j.popup) === null || _k === void 0 ? void 0 : _k.width) || "400", "px");
|
|
4512
|
-
}
|
|
4513
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder {\n position: fixed;\n height: ".concat(cssChatHeight, ";\n min-height: ").concat(((_o = (_m = (_l = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _l === void 0 ? void 0 : _l.textChat) === null || _m === void 0 ? void 0 : _m.popup) === null || _o === void 0 ? void 0 : _o.minHeight) || defaultMinChatHeight, "px;\n max-height: ").concat(((_r = (_q = (_p = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _p === void 0 ? void 0 : _p.textChat) === null || _q === void 0 ? void 0 : _q.popup) === null || _r === void 0 ? void 0 : _r.maxHeight) || "1200", "px;\n width: ").concat(cssChatWidth, ";\n min-width: ").concat(((_u = (_t = (_s = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _s === void 0 ? void 0 : _s.textChat) === null || _t === void 0 ? void 0 : _t.popup) === null || _u === void 0 ? void 0 : _u.minWidth) || defaultMinChatWidth, "px;\n max-width: ").concat(((_x = (_w = (_v = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _v === void 0 ? void 0 : _v.textChat) === null || _w === void 0 ? void 0 : _w.popup) === null || _x === void 0 ? void 0 : _x.maxWidth) || "1200", "px;\n display: none;\n transform: scale(0);\n opacity: 0;\n }");
|
|
4514
|
-
keyFrames += getStyleSheetMarker() + ".alan-text-chat__openning {\n transform: scale(0);\n opacity: 0;\n animation: text-chat-appear-anim ".concat(textChatAppearAnimationMs, "ms ease-in-out forwards;\n }");
|
|
4515
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("text-chat-appear-anim", "\n 0%{\n transform: scale(0);\n opacity: 0;\n }\n 100%{\n transform: scale(1);\n opacity: 1;\n }\n ");
|
|
4516
|
-
keyFrames += getStyleSheetMarker() + ".alan-text-chat__closing {\n transform: scale(1);\n opacity: 1;\n animation: text-chat-disappear-anim ".concat(textChatAppearAnimationMs, "ms ease-in-out forwards;\n }");
|
|
4517
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("text-chat-disappear-anim", "\n 0%{\n transform: scale(1);\n opacity: 1;\n }\n 100%{\n transform: scale(0);\n opacity: 0;\n }\n ");
|
|
4518
|
-
keyFrames += ".mobile" + getStyleSheetMarker() + ".alan-btn__chat-holder {\n position: fixed; \n height: 100%;\n min-height: 100%;\n max-height: 100%;\n width: 100vw;\n min-width: 100vw;\n max-width: 100vw;\n display: none;\n top: 0;\n bottom:0;\n left:0;\n right:0;\n border-radius: 0px;\n }";
|
|
4519
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.bottom-none {\n cursor: ns-resize;\n }";
|
|
4520
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.top-none {\n cursor: ns-resize;\n }";
|
|
4521
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.none-left {\n cursor: ew-resize;\n }";
|
|
4522
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.none-right {\n cursor: ew-resize;\n }";
|
|
4523
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.top-left {\n cursor: nwse-resize;\n }";
|
|
4524
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.bottom-right {\n cursor: nwse-resize;\n }";
|
|
4525
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.top-right {\n cursor: nesw-resize;\n }";
|
|
4526
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.bottom-left {\n cursor: nesw-resize;\n }";
|
|
4527
|
-
var chatBgColor1 = ((_0 = (_z = (_y = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _y === void 0 ? void 0 : _y.textChat) === null || _z === void 0 ? void 0 : _z.popup) === null || _0 === void 0 ? void 0 : _0.backgroundColor) || "rgba(218, 235, 255, 1)";
|
|
4528
|
-
var chatBgColor2 = ((_3 = (_2 = (_1 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _1 === void 0 ? void 0 : _1.textChat) === null || _2 === void 0 ? void 0 : _2.popup) === null || _3 === void 0 ? void 0 : _3.backgroundColor2) || "rgba(255, 255, 255, 1)";
|
|
4529
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat {\n height: 100%;\n position: relative;\n overflow: hidden;\n display: flex;\n width: 100%;\n min-width: 100%;\n max-width: 100%;\n flex: 2;\n position: relative;\n flex-direction: column;\n background: linear-gradient(180deg, ".concat(chatBgColor2, " 0%, ").concat(chatBgColor2, " 15%, ").concat(chatBgColor1, " 70%, ").concat(chatBgColor1, " 100%);\n box-shadow: 0px 5px 44px rgba(0, 0, 0, 0.15);\n border-radius: 20px;\n animation: chat-appear 300ms ease-in-out forwards;\n transform: scale(1);\n opacity: 1; \n }");
|
|
4530
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-btn__sound-bar-1", "\n 0% {\n opacity: 0; \n transform: scale(0);\n }\n 100% {\n opacity: 1; \n transform: scale(1); \n }");
|
|
4531
|
-
keyFrames += ".mobile" + getStyleSheetMarker() + ".alan-btn__chat {\n border-radius: 0px;\n }";
|
|
4532
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-textarea-holder {\n width: 100%;\n height: ".concat(textareaHolderHeight, "px;\n max-height: ").concat(textareaHolderHeight, "px;\n min-height: ").concat(textareaHolderHeight, "px;\n }");
|
|
4533
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages-empty-block {\n flex: 1 1 auto;\n }";
|
|
4534
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages-wrapper {\n width: 100%;\n height: calc(100% - ".concat(chatHeaderHeight + textareaHolderHeight, "px);\n max-height: calc(100% - ").concat(chatHeaderHeight + textareaHolderHeight, "px);\n min-height: calc(100% - ").concat(chatHeaderHeight + textareaHolderHeight, "px);\n overflow-y: scroll;\n overflow-x: hidden;\n padding: 20px 10px;\n display: flex;\n flex-shrink: 0;\n flex-direction: column-reverse;\n }");
|
|
4535
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages {\n display: flex;\n flex-shrink: 0;\n flex-direction: column;\n }";
|
|
4536
|
-
var headerBg = ((_6 = (_5 = (_4 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _4 === void 0 ? void 0 : _4.textChat) === null || _5 === void 0 ? void 0 : _5.header) === null || _6 === void 0 ? void 0 : _6.backgroundColor) || "#FFFFFF";
|
|
4537
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header {\n width: 100%;\n height: ".concat(chatHeaderHeight, "px;\n max-height: ").concat(chatHeaderHeight, "px;\n min-height: ").concat(chatHeaderHeight, "px;\n color: #0f2029;\n padding: 0px 15px;\n padding-top: 12px;\n background: ").concat(headerBg, ";\n color: ").concat(((_9 = (_8 = (_7 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _7 === void 0 ? void 0 : _7.textChat) === null || _8 === void 0 ? void 0 : _8.header) === null || _9 === void 0 ? void 0 : _9.color) || "#000000", ";\n text-align: center;\n text-overflow: ellipsis;\n white-space: nowrap;\n position:relative;\n }");
|
|
4538
|
-
var headerFontSize = ((_12 = (_11 = (_10 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _10 === void 0 ? void 0 : _10.textChat) === null || _11 === void 0 ? void 0 : _11.header) === null || _12 === void 0 ? void 0 : _12.fontSize) || 16;
|
|
4539
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-title {\n max-width: calc(100% - 112px);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: inline-block;\n font-weight: 600;\n font-size: ".concat(headerFontSize, "px;\n position: relative;\n top: ").concat(headerFontSize >= 20 ? "-2" : "0", "px;\n }");
|
|
4540
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-gradient {\n width: 100%;\n height: 15px;\n max-height: 15px;\n min-height: 15px;\n position: absolute;\n left:0;\n width: 100%;\n top: ".concat(chatHeaderHeight, "px;\n background: linear-gradient(180deg, ").concat(headerBg, " 30%, rgba(255, 255, 255, 0) 100%);\n }");
|
|
4541
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-left-resizer {\n transition: 300ms opacity ease-in-out;\n position: absolute;\n top: 3px;\n left: 5px;\n transform: rotate(180deg);\n pointer-events: none;\n display: block;\n opacity: 0;\n height: 18px;\n width: 14px;\n }";
|
|
4542
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-right-resizer {\n transition: 300ms opacity ease-in-out;\n position: absolute;\n top: 3px;\n right: 5px;\n transform: rotate(-90deg);\n pointer-events: none;\n display: block;\n opacity: 0;\n height: 18px;\n width: 14px;\n }";
|
|
4543
|
-
keyFrames += getStyleSheetMarker() + ".with-hover .alan-btn__chat-header-right-resizer {\n opacity: 0.8;\n transition: 300ms opacity ease-in-out;\n }";
|
|
4544
|
-
keyFrames += getStyleSheetMarker() + ".with-hover .alan-btn__chat-header-left-resizer {\n opacity: 0.8;\n transition: 300ms opacity ease-in-out;\n }";
|
|
4545
|
-
keyFrames += getStyleSheetMarker() + ".with-hover .alan-btn__chat-header::after {\n opacity: 0.8;\n transition: 300ms opacity ease-in-out;\n }";
|
|
4546
|
-
keyFrames += getStyleSheetMarker() + ".with-cursors .alan-btn__chat-messages {\n pointer-events: none;\n }";
|
|
4547
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-unmute-btn {\n position: absolute;\n right: 15px;\n top: 3px;\n display: flex;\n align-items: center;\n height: ".concat(chatHeaderHeight, "px;\n font-size: 14px;\n cursor: pointer;\n }");
|
|
4548
|
-
if (isMobile()) {
|
|
4549
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-unmute-btn {\n display: none;\n }";
|
|
4550
|
-
}
|
|
4551
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-unmute-btn svg path {\n fill: ".concat(((_18 = (_17 = (_16 = (_15 = (_14 = (_13 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _13 === void 0 ? void 0 : _13.textChat) === null || _14 === void 0 ? void 0 : _14.popup) === null || _15 === void 0 ? void 0 : _15.icons) === null || _16 === void 0 ? void 0 : _16.mute) === null || _17 === void 0 ? void 0 : _17["default"]) === null || _18 === void 0 ? void 0 : _18.fill) || "rgba(8, 8, 8, 1)", ";\n }");
|
|
4552
|
-
if (!isMobile()) {
|
|
4553
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-unmute-btn:hover svg path {\n fill: ".concat(((_24 = (_23 = (_22 = (_21 = (_20 = (_19 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _19 === void 0 ? void 0 : _19.textChat) === null || _20 === void 0 ? void 0 : _20.popup) === null || _21 === void 0 ? void 0 : _21.icons) === null || _22 === void 0 ? void 0 : _22.mute) === null || _23 === void 0 ? void 0 : _23.hover) === null || _24 === void 0 ? void 0 : _24.fill) || "rgba(0, 70, 255, 1)", ";\n }");
|
|
4554
|
-
}
|
|
4555
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-unmute-btn.disabled {\n pointer-events: none;\n }";
|
|
4556
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-unmute-btn.disabled {\n opacity: 0.4\n }";
|
|
4557
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-clear-btn {\n position: absolute;\n right: ".concat(isMobile() ? 15 : 50, "px;\n top: 3px;\n width: 17px;\n display: flex;\n align-items: center;\n height: ").concat(chatHeaderHeight, "px;\n font-size: 14px;\n cursor: pointer;\n }");
|
|
4558
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-clear-btn.disabled {\n pointer-events: none;\n }";
|
|
4559
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-clear-btn.disabled {\n opacity: 0.4\n }";
|
|
4560
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-clear-btn svg path {\n fill: ".concat(((_30 = (_29 = (_28 = (_27 = (_26 = (_25 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _25 === void 0 ? void 0 : _25.textChat) === null || _26 === void 0 ? void 0 : _26.popup) === null || _27 === void 0 ? void 0 : _27.icons) === null || _28 === void 0 ? void 0 : _28.clear) === null || _29 === void 0 ? void 0 : _29["default"]) === null || _30 === void 0 ? void 0 : _30.fill) || "rgba(8, 8, 8, 1)", ";\n }");
|
|
4561
|
-
if (!isMobile()) {
|
|
4562
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-header-clear-btn:hover svg path {\n fill: ".concat(((_36 = (_35 = (_34 = (_33 = (_32 = (_31 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _31 === void 0 ? void 0 : _31.textChat) === null || _32 === void 0 ? void 0 : _32.popup) === null || _33 === void 0 ? void 0 : _33.icons) === null || _34 === void 0 ? void 0 : _34.clear) === null || _35 === void 0 ? void 0 : _35.hover) === null || _36 === void 0 ? void 0 : _36.fill) || "rgba(255, 0, 92, 1)", ";\n }");
|
|
4563
|
-
}
|
|
4564
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__close-chat-btn {\n position: absolute;\n left: 15px;\n top: 3px;\n width: 15px;\n height: ".concat(chatHeaderHeight, "px;\n display: flex;\n align-items: center;\n cursor: pointer;\n pointer-events: all;\n }");
|
|
4565
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__close-chat-btn svg path {\n fill: ".concat(((_42 = (_41 = (_40 = (_39 = (_38 = (_37 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _37 === void 0 ? void 0 : _37.textChat) === null || _38 === void 0 ? void 0 : _38.popup) === null || _39 === void 0 ? void 0 : _39.icons) === null || _40 === void 0 ? void 0 : _40.close) === null || _41 === void 0 ? void 0 : _41["default"]) === null || _42 === void 0 ? void 0 : _42.fill) || "rgba(8, 8, 8, 1)", ";\n }");
|
|
4566
|
-
if (!isMobile()) {
|
|
4567
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__close-chat-btn:hover svg path {\n fill: ".concat(((_48 = (_47 = (_46 = (_45 = (_44 = (_43 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _43 === void 0 ? void 0 : _43.textChat) === null || _44 === void 0 ? void 0 : _44.popup) === null || _45 === void 0 ? void 0 : _45.icons) === null || _46 === void 0 ? void 0 : _46.close) === null || _47 === void 0 ? void 0 : _47.hover) === null || _48 === void 0 ? void 0 : _48.fill) || "rgba(151, 152, 156, 1)", ";\n }");
|
|
4568
|
-
}
|
|
4569
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages-wrapper::-webkit-scrollbar {\n width: ".concat(textChatScrollSize, "px;\n height: ").concat(textChatScrollSize, "px;\n }");
|
|
4570
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages-wrapper::-webkit-scrollbar-thumb {\n border-radius: 3px;\n background-color: rgba(224, 224, 224, 0.795);\n transition: background-color 300ms ease-in-out;\n }";
|
|
4571
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages-wrapper::-webkit-scrollbar-thumb:hover {\n background-color: rgba(230, 230, 230, 0.856);\n transition: background-color 300ms ease-in-out;\n }";
|
|
4572
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages-wrapper::-webkit-scrollbar-track {\n border-radius: 3px;\n background: transparent;\n }";
|
|
4573
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-textarea-holder-gradient {\n background: linear-gradient(0deg, ".concat(((_51 = (_50 = (_49 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _49 === void 0 ? void 0 : _49.textChat) === null || _50 === void 0 ? void 0 : _50.popup) === null || _51 === void 0 ? void 0 : _51.backgroundColor) || "rgba(218, 235, 255, 1)", " 30%, rgba(255, 255, 255, 0) 100%);\n height:15px;\n min-height:15px;\n width: calc(100% - 10px);\n position: absolute;\n bottom: ").concat(textareaHolderHeight, "px;\n left:0;\n }");
|
|
4574
|
-
keyFrames += getStyleSheetMarker() + ".show-gradient .alan-btn__chat-textarea-gradient {\n position: absolute;\n left: 26px;\n border-radius: 16px;\n bottom: 15px;\n width: 15px;\n opacity: 0;\n transition: opacity 300ms ease-in-out;\n height: ".concat(chatTextareaHeight, "px;\n background: linear-gradient(90deg, ").concat(((_54 = (_53 = (_52 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _52 === void 0 ? void 0 : _52.textChat) === null || _53 === void 0 ? void 0 : _53.textarea) === null || _54 === void 0 ? void 0 : _54.backgroundColor) || "rgb(255, 255, 255)", " 60%, rgba(255, 255, 255, 0) 100%);\n }");
|
|
4575
|
-
keyFrames += getStyleSheetMarker() + ".show-gradient .alan-btn__chat-textarea-gradient {\n opacity: 1;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4576
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.alan-text-chat__voice-enabled .show-gradient .alan-btn__chat-textarea-gradient {\n left: 50px;\n }";
|
|
4577
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-textarea {\n position: absolute;\n left: 15px;\n bottom: 15px;\n width: calc(100% - 30px);\n border-radius: 20px;\n box-shadow: 0px 1px 3px rgba(16, 39, 126, 0.2);\n background-color: ".concat(((_57 = (_56 = (_55 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _55 === void 0 ? void 0 : _55.textChat) === null || _56 === void 0 ? void 0 : _56.textarea) === null || _57 === void 0 ? void 0 : _57.backgroundColor) || "rgb(255, 255, 255)", " ;\n color: ").concat(((_60 = (_59 = (_58 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _58 === void 0 ? void 0 : _58.textChat) === null || _59 === void 0 ? void 0 : _59.textarea) === null || _60 === void 0 ? void 0 : _60.color) || "rgba(23, 23, 23, 1)", " ;\n overflow: hidden;\n outline: none;\n resize: none;\n border: 1px solid transparent;\n -webkit-appearance: none;\n font-size: ").concat(getTextAreaFontSize(isMobile(), ((_63 = (_62 = (_61 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _61 === void 0 ? void 0 : _61.textChat) === null || _62 === void 0 ? void 0 : _62.textarea) === null || _63 === void 0 ? void 0 : _63.fontSize) || defaultChatTextareaFontSize), "px;\n line-height: ").concat(chatTextareaLineHieght, ";\n text-align: left;\n max-height: ").concat(chatTextareaHeight, "px;\n height: ").concat(chatTextareaHeight, "px;\n padding: ").concat(calculateTextareaTopPadding(), "px 42px 12px 12px;\n -webkit-user-select: text;\n -khtml-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n transition: opacity 300ms ease-in-out;\n }");
|
|
4578
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-textarea::placeholder {\n color: ".concat(((_66 = (_65 = (_64 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _64 === void 0 ? void 0 : _64.textChat) === null || _65 === void 0 ? void 0 : _65.textarea) === null || _66 === void 0 ? void 0 : _66.placeholderColor) || "rgba(116, 116, 116, 1)", " ;\n }");
|
|
4579
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-textarea::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }";
|
|
4580
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-textarea::-webkit-scrollbar-thumb {\n border-radius: 3px;\n background-color: rgba(224, 224, 224, 0.795);\n transition: background-color 300ms ease-in-out;\n }";
|
|
4581
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-textarea::-webkit-scrollbar-thumb:hover {\n background-color: rgba(230, 230, 230, 0.856);\n transition: background-color 300ms ease-in-out;\n }";
|
|
4582
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-textarea::-webkit-scrollbar-track {\n border-radius: 3px;\n background: transparent;\n }";
|
|
4583
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-holder.alan-text-chat__voice-enabled .alan-btn__chat-textarea {\n padding-left: 42px;\n }";
|
|
4584
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat.alan-btn__mic-active .alan-btn__chat-textarea {\n opacity: 0.6;\n transition: opacity 300ms ease-in-out;\n pointer-events: none;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }";
|
|
4585
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat.alan-btn__mic-active .alan-btn__chat-send-btn {\n opacity: 0.2;\n pointer-events: none;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4586
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__inactive .alan-btn__chat-send-btn {\n opacity: 0.2;\n pointer-events: none;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4587
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat.alan-btn__disconnected .alan-btn__chat-textarea {\n opacity: 0.6;\n transition: opacity 300ms ease-in-out;\n pointer-events: none;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }";
|
|
4588
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat.alan-btn__disconnected .alan-btn__chat-send-btn {\n opacity: 0.2;\n pointer-events: none;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4589
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat.alan-btn__disconnected .alan-btn__chat-unmute-btn {\n opacity: 0.2;\n pointer-events: none;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4590
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat.alan-btn__disconnected .alan-btn__chat-header-clear-btn {\n opacity: 0.2;\n pointer-events: none;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4591
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat.alan-btn__disconnected .alan-btn__chat-send-btn svg path {\n opacity: 1;\n }";
|
|
4592
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat.alan-btn__disconnected .alan-btn__chat-mic-btn {\n opacity: 0.2;\n pointer-events: none;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4593
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__inactive .alan-btn__chat-mic-btn {\n opacity: 0.2;\n pointer-events: none;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4594
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn_disconnected-chat-icon-rotate {\n animation: disconnected-chat-icon-rotate-animation 1500ms linear infinite;\n }";
|
|
4595
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("disconnected-chat-icon-rotate-animation", "0%{ transform: rotate(0deg); } 100%{ transform: rotate(360deg); }");
|
|
4596
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__disabled {\n opacity: 0.2;\n pointer-events: none;\n transition: opacity 300ms ease-in-out;\n }";
|
|
4597
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-send-btn {\n position: absolute;\n transition: opacity 300ms ease-in-out;\n right: 20px;\n bottom: 20px;\n min-width: 40px;\n width: 40px;\n max-width: 40px;\n height: 40px;\n max-height: 40px;\n min-height: 40px;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Chrome/Safari/Opera */\n -khtml-user-select: none; /* Konqueror */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* IE/Edge */\n user-select: none;\n }";
|
|
4598
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-send-btn svg {\n position: relative;\n left: 2px;\n }";
|
|
4599
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-send-btn svg path {\n fill: ".concat(((_69 = (_68 = (_67 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _67 === void 0 ? void 0 : _67.textChat) === null || _68 === void 0 ? void 0 : _68.textarea) === null || _69 === void 0 ? void 0 : _69.placeholderColor) || "rgba(116, 116, 116, 1)", ";\n opacity: 0.5;\n }");
|
|
4600
|
-
keyFrames += getStyleSheetMarker() + ".ready-to-send:not(.alan-btn__inactive) .alan-btn__chat-send-btn svg path {\n fill: ".concat(((_75 = (_74 = (_73 = (_72 = (_71 = (_70 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _70 === void 0 ? void 0 : _70.textChat) === null || _71 === void 0 ? void 0 : _71.popup) === null || _72 === void 0 ? void 0 : _72.icons) === null || _73 === void 0 ? void 0 : _73.general) === null || _74 === void 0 ? void 0 : _74["default"]) === null || _75 === void 0 ? void 0 : _75.fill) || "rgba(23, 23, 23, 1)", ";\n opacity: 1;\n }");
|
|
4601
|
-
if (!isMobile()) {
|
|
4602
|
-
keyFrames += getStyleSheetMarker() + ".ready-to-send:not(.alan-btn__inactive) .alan-btn__chat-send-btn:hover {\n cursor: pointer;\n }";
|
|
4603
|
-
keyFrames += getStyleSheetMarker() + ".ready-to-send:not(.alan-btn__inactive) .alan-btn__chat-send-btn:hover svg path {\n fill: ".concat(((_81 = (_80 = (_79 = (_78 = (_77 = (_76 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _76 === void 0 ? void 0 : _76.textChat) === null || _77 === void 0 ? void 0 : _77.popup) === null || _78 === void 0 ? void 0 : _78.icons) === null || _79 === void 0 ? void 0 : _79.general) === null || _80 === void 0 ? void 0 : _80.hover) === null || _81 === void 0 ? void 0 : _81.fill) || "rgba(0, 120, 255, 1)", ";\n opacity:0.8;\n }");
|
|
4604
|
-
}
|
|
4605
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-mic-btn {\n position: absolute;\n left: 20px;\n bottom: 22px;\n min-width: ".concat(chatMicBtnActiveSize, "px;\n width: ").concat(chatMicBtnActiveSize, "px;\n max-width: ").concat(chatMicBtnActiveSize, "px;\n height: ").concat(chatMicBtnActiveSize, "px;\n max-height: ").concat(chatMicBtnActiveSize, "px;\n min-height: ").concat(chatMicBtnActiveSize, "px;\n display: flex;\n flex-direction: row;\n cursor: pointer;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n }");
|
|
4606
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-mic-btn.active::before {\n content: '';\n position: absolute;\n z-index: -1;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n background-color: ".concat(((_87 = (_86 = (_85 = (_84 = (_83 = (_82 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _82 === void 0 ? void 0 : _82.textChat) === null || _83 === void 0 ? void 0 : _83.popup) === null || _84 === void 0 ? void 0 : _84.icons) === null || _85 === void 0 ? void 0 : _85.general) === null || _86 === void 0 ? void 0 : _86["default"]) === null || _87 === void 0 ? void 0 : _87.fill) || "#C8C8CC", ";\n opacity: 0.3;\n border-radius: 50%;\n }");
|
|
4607
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-notifications-bubble {\n position: absolute;\n right: 4px;\n top: -4px;\n height: 20px;\n width: 20px;\n background-color: ".concat(((_90 = (_89 = (_88 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _88 === void 0 ? void 0 : _88.textChat) === null || _89 === void 0 ? void 0 : _89.notifications) === null || _90 === void 0 ? void 0 : _90.backgroundColor) || "rgba(208, 2, 27, 1)", ";\n color: ").concat(((_93 = (_92 = (_91 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _91 === void 0 ? void 0 : _91.textChat) === null || _92 === void 0 ? void 0 : _92.notifications) === null || _93 === void 0 ? void 0 : _93.color) || "rgba(255, 255, 255, 1)", ";\n border-radius: 50%;\n z-index: ").concat(btnZIndex + 1, ";\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: 10px;\n }");
|
|
4608
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-notifications-bubble:empty {\n display: none;\n }";
|
|
4609
|
-
if (!isMobile()) {
|
|
4610
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-mic-btn.active:hover::before {\n opacity: 0.35;\n }";
|
|
4611
|
-
}
|
|
4612
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-mic-btn svg {\n }";
|
|
4613
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-mic-btn svg path {\n fill: ".concat(((_99 = (_98 = (_97 = (_96 = (_95 = (_94 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _94 === void 0 ? void 0 : _94.textChat) === null || _95 === void 0 ? void 0 : _95.popup) === null || _96 === void 0 ? void 0 : _96.icons) === null || _97 === void 0 ? void 0 : _97.general) === null || _98 === void 0 ? void 0 : _98["default"]) === null || _99 === void 0 ? void 0 : _99.fill) || "rgba(23, 23, 23, 1)", ";\n }");
|
|
4614
|
-
if (!isMobile()) {
|
|
4615
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-mic-btn:hover svg path {\n fill: ".concat(((_105 = (_104 = (_103 = (_102 = (_101 = (_100 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _100 === void 0 ? void 0 : _100.textChat) === null || _101 === void 0 ? void 0 : _101.popup) === null || _102 === void 0 ? void 0 : _102.icons) === null || _103 === void 0 ? void 0 : _103.general) === null || _104 === void 0 ? void 0 : _104.hover) === null || _105 === void 0 ? void 0 : _105.fill) || "#007AFF", ";\n }");
|
|
4616
|
-
}
|
|
4617
|
-
keyFrames += getStyleSheetMarker() + ".alan-text-chat__animated-btn-bars {\n height:".concat(chatMicBtnActiveSize, "px;\n width:").concat(chatMicBtnActiveSize, "px;\n border-radius: 50%;\n justify-content: center;\n align-items: center;\n background: ").concat(((_111 = (_110 = (_109 = (_108 = (_107 = (_106 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _106 === void 0 ? void 0 : _106.textChat) === null || _107 === void 0 ? void 0 : _107.popup) === null || _108 === void 0 ? void 0 : _108.icons) === null || _109 === void 0 ? void 0 : _109.general) === null || _110 === void 0 ? void 0 : _110.hover) === null || _111 === void 0 ? void 0 : _111.fill) || "#007AFF", ";\n display:none;\n }");
|
|
4618
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-mic-btn.active .alan-text-chat__animated-btn-bars {\n display: flex;\n }";
|
|
4619
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-mic-btn.active svg {\n display: none;\n }";
|
|
4620
|
-
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar {\n background: #ffffff;\n bottom: 1px;\n height: 3px;\n width: 2px;\n margin: 0px 1px;\n border-radius: 5px;\n }";
|
|
4621
|
-
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar-1 {\n animation: alan-btn__sound-bar-1 0ms -1200ms linear infinite alternate;\n }";
|
|
4622
|
-
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar-2 {\n animation: alan-btn__sound-bar-2 0ms -1200ms linear infinite alternate;\n }";
|
|
4623
|
-
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar-3 {\n animation: alan-btn__sound-bar-3 0ms -1200ms linear infinite alternate;\n }";
|
|
4624
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-btn__sound-bar-1", "\n 0% {\n \n height: 3px; \n }\n 100% {\n \n height: 10px; \n }");
|
|
4625
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-btn__sound-bar-2", "\n 0% {\n \n height: 8px; \n }\n 100% {\n \n height: 15px; \n }");
|
|
4626
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-btn__sound-bar-3", "\n 0% {\n \n height: 12px; \n }\n 100% {\n \n height: 28px; \n }");
|
|
4627
|
-
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar:nth-child(1) { animation-duration: 474ms; }";
|
|
4628
|
-
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar:nth-child(2) { animation-duration: 433ms; }";
|
|
4629
|
-
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar:nth-child(3) { animation-duration: 407ms; }";
|
|
4630
|
-
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar:nth-child(4) { animation-duration: 458ms; }";
|
|
4631
|
-
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar:nth-child(5) { animation-duration: 400ms; }";
|
|
4632
|
-
keyFrames += getStyleSheetMarker() + ".alan-text-chat__bar:nth-child(6) { animation-duration: 427ms; }";
|
|
4633
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-request {\n margin-bottom: 16px;\n max-width: 90%;\n min-height: 41px;\n padding: 9px 20px;\n line-height: 1.53;\n display: block;\n float: right;\n clear: both;\n border-radius: 20px;\n position: relative;\n box-shadow: 0px 1px 3px rgba(16, 39, 126, 0.2);\n background-color: ".concat(((_115 = (_114 = (_113 = (_112 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _112 === void 0 ? void 0 : _112.textChat) === null || _113 === void 0 ? void 0 : _113.bubbles) === null || _114 === void 0 ? void 0 : _114.request) === null || _115 === void 0 ? void 0 : _115.backgroundColor) || "rgba(178, 214, 255, 1)", ";\n color: ").concat(((_119 = (_118 = (_117 = (_116 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _116 === void 0 ? void 0 : _116.textChat) === null || _117 === void 0 ? void 0 : _117.bubbles) === null || _118 === void 0 ? void 0 : _118.request) === null || _119 === void 0 ? void 0 : _119.color) || "rgba(23, 23, 23, 1)", ";\n font-size: ").concat(((_123 = (_122 = (_121 = (_120 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _120 === void 0 ? void 0 : _120.textChat) === null || _121 === void 0 ? void 0 : _121.bubbles) === null || _122 === void 0 ? void 0 : _122.request) === null || _123 === void 0 ? void 0 : _123.fontSize) || "15", "px;\n word-break: break-word;\n text-align: left;\n -webkit-touch-callout: text; /* iOS Safari */\n -webkit-user-select: text; /* Chrome/Safari/Opera */\n -khtml-user-select: text; /* Konqueror */\n -moz-user-select: text; /* Firefox */\n -ms-user-select: text; /* IE/Edge */\n user-select: text;\n }");
|
|
4634
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-request * {\n -webkit-touch-callout: text; /* iOS Safari */\n -webkit-user-select: text; /* Chrome/Safari/Opera */\n -khtml-user-select: text; /* Konqueror */\n -moz-user-select: text; /* Firefox */\n -ms-user-select: text; /* IE/Edge */\n user-select: text;\n }";
|
|
4635
|
-
var responseBubbleFontSize = +(((_127 = (_126 = (_125 = (_124 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _124 === void 0 ? void 0 : _124.textChat) === null || _125 === void 0 ? void 0 : _125.bubbles) === null || _126 === void 0 ? void 0 : _126.response) === null || _127 === void 0 ? void 0 : _127.fontSize) || 15);
|
|
4636
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response {\n margin-bottom: 16px;\n max-width: 90%;\n min-height: 41px;\n padding: 9px 20px;\n line-height: 1.53;\n display: block;\n float: left;\n clear: both;\n border-radius: 20px;\n position: relative;\n background-color: ".concat(((_131 = (_130 = (_129 = (_128 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _128 === void 0 ? void 0 : _128.textChat) === null || _129 === void 0 ? void 0 : _129.bubbles) === null || _130 === void 0 ? void 0 : _130.response) === null || _131 === void 0 ? void 0 : _131.backgroundColor) || "rgba(255, 255, 255, 1)", ";\n box-shadow: 0px 1px 3px rgba(16, 39, 126, 0.2);\n color: ").concat(((_135 = (_134 = (_133 = (_132 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _132 === void 0 ? void 0 : _132.textChat) === null || _133 === void 0 ? void 0 : _133.bubbles) === null || _134 === void 0 ? void 0 : _134.response) === null || _135 === void 0 ? void 0 : _135.color) || "rgba(23, 23, 23, 1)", ";\n font-size: ").concat(responseBubbleFontSize, "px;\n word-break: break-word;\n text-align: left;\n -webkit-touch-callout: text; /* iOS Safari */\n -webkit-user-select: text; /* Chrome/Safari/Opera */\n -khtml-user-select: text; /* Konqueror */\n -moz-user-select: text; /* Firefox */\n -ms-user-select: text; /* IE/Edge */\n user-select: text;\n }");
|
|
4637
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response.with-images {\n min-width: 90%;\n }";
|
|
4638
|
-
keyFrames += getStyleSheetMarker() + ".alan-chat-small .alan-btn__chat-request {\n max-width: 100%;\n }";
|
|
4639
|
-
keyFrames += getStyleSheetMarker() + ".alan-chat-small .alan-btn__chat-response {\n max-width: 100%;\n }";
|
|
4640
|
-
keyFrames += getStyleSheetMarker() + ".alan-chat-small .alan-btn__chat-response.with-images {\n min-width: 100%;\n }";
|
|
4641
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-request.animated {\n opacity:0;\n animation: chat-bubble-appear-w-opacity 300ms ease-in-out forwards;\n animation-delay: 100ms;\n }";
|
|
4642
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response.animated {\n opacity:0;\n animation: chat-bubble-appear-w-opacity 300ms ease-in-out forwards;\n animation-delay: 200ms;\n }";
|
|
4643
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("chat-bubble-appear-w-opacity", "\n 0% { opacity:0;}\n \n 100% {\n opacity:1;\n }");
|
|
4644
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response * {\n -webkit-touch-callout: text; /* iOS Safari */\n -webkit-user-select: text; /* Chrome/Safari/Opera */\n -khtml-user-select: text; /* Konqueror */\n -moz-user-select: text; /* Firefox */\n -ms-user-select: text; /* IE/Edge */\n user-select: text;\n }";
|
|
4645
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-imgs-wrapper {\n display: flex;\n flex-wrap: wrap;\n position: relative;\n top: -9px;\n left: -20px;\n width: calc(100% + 40px);\n }";
|
|
4646
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-imgs-wrapper-left-arrow {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: 12px;\n opacity:0.85;\n }";
|
|
4647
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-imgs-wrapper-right-arrow {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: 12px;\n opacity:0.85;\n }";
|
|
4648
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-imgs-wrapper-left-arrow:hover {\n opacity:1;\n cursor: pointer;\n }";
|
|
4649
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-imgs-wrapper-right-arrow:hover {\n opacity:1;\n cursor: pointer;\n }";
|
|
4650
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-imgs-wrapper-left-arrow.invisible {\n opacity:0;\n pointer-events: none;\n }";
|
|
4651
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-imgs-wrapper-right-arrow.invisible {\n opacity:0;\n pointer-events: none;\n }";
|
|
4652
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-img-block {\n overflow: hidden;\n border-radius: 20px 20px 0 0;\n width: 100%;\n display: flex;\n }";
|
|
4653
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-video {\n width: 100%;\n min-width: 100%;\n min-height: 220px;\n height: 220px;\n max-height: 220px;\n }";
|
|
4654
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-img {\n cursor: pointer;\n transition: transform 300ms ease-in-out;\n width: 100%;\n min-width: 100%;\n min-height: 220px;\n height: 220px;\n max-height: 220px;\n object-fit: contain;\n pointer-events: initial;\n }";
|
|
4655
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-img.img-vertical {\n object-fit: cover;\n }";
|
|
4656
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-img.not-found {\n opacity: 0.7;\n }";
|
|
4657
|
-
if (!isMobile()) {
|
|
4658
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-imgs-wrapper:hover .alan-btn__chat-response-img {\n transform: scale(1.04);\n transition: transform 300ms ease-in-out;\n }";
|
|
4659
|
-
}
|
|
4660
|
-
keyFrames += ".alan-btn__image-preview-overlay {\n position: fixed;\n top: 0;\n left: 0;\n height: 100vh;\n min-height: 100vh;\n width: 100vw;\n min-width: 100vw;\n background-color: rgba(0,0,0,0.6);\n display: flex;\n align-items: center;\n justify-content: center;\n }";
|
|
4661
|
-
keyFrames += ".alan-btn__image-preview-overlay img {\n max-width: calc(100% - 100px);\n max-height: calc(100% - 100px);\n }";
|
|
4662
|
-
keyFrames += "@media (orientation: landscape) { \n .alan-btn__image-preview-overlay {\n align-items: flex-start;\n padding-top: 40px;\n }\n .alan-btn__image-preview-overlay img {\n max-height: calc(100% - 120px);\n }\n .alan-btn__image-preview-overlay iframe {\n max-height: calc(100% - 120px);\n }\n }";
|
|
4663
|
-
keyFrames += ".alan-btn__image-preview-overlay iframe {\n max-width: calc(100% - 100px);\n max-height: calc(100% - 100px);\n width: calc(100% - 100px);\n height: calc(100% - 100px);\n }";
|
|
4664
|
-
keyFrames += ".alan-btn__image-preview-overlay-close-icon {\n position: absolute;\n top: 16px;\n right: 16px;\n cursor: pointer;\n opacity: 0.7;\n }";
|
|
4665
|
-
if (!isMobile()) {
|
|
4666
|
-
keyFrames += ".alan-btn__image-preview-overlay-close-icon:hover {\n opacity: 1;\n }";
|
|
4667
|
-
}
|
|
4668
|
-
keyFrames += ".alan-btn__image-preview-overlay-left-icon {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: 16px;\n cursor: pointer;\n opacity: 0.7;\n }";
|
|
4669
|
-
keyFrames += ".alan-btn__image-preview-overlay-right-icon {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: 16px;\n cursor: pointer;\n opacity: 0.7;\n }";
|
|
4670
|
-
keyFrames += ".alan-btn__image-preview-overlay-left-icon.invisible {\n opacity:0;\n pointer-events: none;\n }";
|
|
4671
|
-
keyFrames += ".alan-btn__image-preview-overlay-right-icon.invisible {\n opacity:0;\n pointer-events: none;\n }";
|
|
4672
|
-
if (!isMobile()) {
|
|
4673
|
-
keyFrames += ".alan-btn__image-preview-overlay-left-icon:hover {\n opacity: 1;\n }";
|
|
4674
|
-
keyFrames += ".alan-btn__image-preview-overlay-right-icon:hover {\n opacity: 1;\n }";
|
|
4675
|
-
}
|
|
4676
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-links-wrapper {\n display: flex;\n flex-wrap: wrap;\n border-top: 1px solid #D2DAE5;\n padding: 10px 0 0 0;\n margin-top: 10px;\n align-items: center;\n }";
|
|
4677
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-link {\n background: #EAF2FC;\n border-radius: 15px;\n padding: 6px 8px;\n margin-right: 10px;\n margin-top: 4px;\n margin-bottom: 4px;\n display: flex;\n align-items: center;\n max-width: 100%;\n font-size: ".concat(responseBubbleFontSize - 2, "px;\n }");
|
|
4678
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages a.alan-btn__chat-response-link:hover {\n text-decoration: none !important;\n }";
|
|
4679
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-link-title {\n overflow: hidden;\n max-width: calc(100% - 15px);\n text-overflow: ellipsis;\n white-space: nowrap;\n display: inline-block;\n }";
|
|
4680
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-link svg {\n flex-shrink: 0;\n margin-right: 6px;\n }";
|
|
4681
|
-
if (!isMobile()) {
|
|
4682
|
-
keyFrames += getStyleSheetMarker() + "a.alan-btn__chat-response-link:hover svg path {\n fill: #0078FF;\n }";
|
|
4683
|
-
}
|
|
4684
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-likes-wrapper {\n font-size: ".concat(responseBubbleFontSize + 5, "px;\n margin-top: 10px;\n }");
|
|
4685
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-like-btn {\n cursor: pointer;\n }";
|
|
4686
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-dislike-btn {\n cursor: pointer;\n }";
|
|
4687
|
-
if (!isMobile()) {
|
|
4688
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-like-btn {\n opacity: 0.7;\n cursor: pointer;\n }";
|
|
4689
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-like-btn:hover {\n opacity: 1;\n }";
|
|
4690
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-dislike-btn {\n opacity: 0.7;\n }";
|
|
4691
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-response-dislike-btn:hover {\n opacity: 1;\n }";
|
|
4692
|
-
}
|
|
4693
|
-
keyFrames += getStyleSheetMarker() + ".alan-incoming-msg {\n display: flex;\n align-items: center;\n overflow: hidden;\n animation:chat-bubble-appear-w-opacity 300ms ease-in-out forwards 100ms, hide-buble 300ms forwards ease 30000ms !important;\n }";
|
|
4694
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("hide-buble", "\n 0% { \n height: 41px; \n max-height:41px; \n min-height: 41px;\n }\n \n 100% {\n height: 0px;\n max-height: 0px;\n min-height: 0px;\n padding: 0px;\n margin-bottom:0;\n }");
|
|
4695
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-incomming-msg-wrapper {\n display: flex;\n align-items: center;\n }";
|
|
4696
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-incomming-msg {\n border-radius: 50%;\n background-color: ".concat(((_139 = (_138 = (_137 = (_136 = webOptions === null || webOptions === void 0 ? void 0 : webOptions.chatOptions) === null || _136 === void 0 ? void 0 : _136.textChat) === null || _137 === void 0 ? void 0 : _137.bubbles) === null || _138 === void 0 ? void 0 : _138.response) === null || _139 === void 0 ? void 0 : _139.color) || "rgba(8, 8, 8, 1)", ";\n margin: 2px;\n height: 6px;\n width: 6px;\n animation: alan-dot-bounce 1.5s infinite ease;\n }");
|
|
4697
|
-
keyFrames += getStyleSheetMarker() + ".msg-2 {\n animation-delay: .2s;\n }";
|
|
4698
|
-
keyFrames += getStyleSheetMarker() + ".msg-3 {\n animation-delay: .3s;\n }";
|
|
4699
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-dot-bounce", "\n 0%, 100% { opacity:1;}\n \n 60% {\n transform: translateY(3px);\n opacity:.0;\n }");
|
|
4700
|
-
function addCssForMarkdown(cssRules) {
|
|
4701
|
-
for (var i2 = 0; i2 < cssRules.length; i2++) {
|
|
4702
|
-
var curRule = cssRules[i2];
|
|
4703
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-messages ".concat(curRule);
|
|
4704
|
-
}
|
|
4705
|
-
}
|
|
4706
|
-
addCssForMarkdown([
|
|
4707
|
-
"a {\n color: #4183c4!important;\n text-decoration: none!important;\n }",
|
|
4708
|
-
"a:hover {\n text-decoration: underline!important;\n }",
|
|
4709
|
-
"p {\n margin: 0!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4710
|
-
"blockquote {\n margin: 0!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4711
|
-
"dl {\n margin: 0!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4712
|
-
"table {\n margin: 0!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n word-break: initial!important;\n }"),
|
|
4713
|
-
"ul {\n padding-left: 30px!important; \n margin: 0!important; \n list-style-type: disc!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4714
|
-
"ul li {\n list-style-type: disc!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4715
|
-
"ol {\n padding-left: 30px!important;\n margin: 0!important; \n list-style-type: decimal!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4716
|
-
"ol li {\n list-style-type: decimal!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4717
|
-
"h1 { font-size: 2.13em!important; line-height: 1.7!important; margin: 0 0 10px 0!important; font-weight: normal!important; text-transform: none!important;}",
|
|
4718
|
-
"h2 { font-size: 1.86em!important; line-height: 1.7!important; margin: 0 0 10px 0!important; font-weight: normal!important; text-transform: none!important;}",
|
|
4719
|
-
"h3 { font-size: 1.6em!important; line-height: 1.7!important; margin: 0 0 10px 0!important; font-weight: normal!important; text-transform: none!important;}",
|
|
4720
|
-
"h4 { font-size: 1.46em!important; line-height: 1.7!important; margin: 0 0 10px 0!important; font-weight: normal!important; text-transform: none!important;}",
|
|
4721
|
-
"h5 { font-size: 1.33em!important; line-height: 1.7!important; margin: 0 0 10px 0!important; font-weight: normal!important; text-transform: none!important;}",
|
|
4722
|
-
"h6 { font-size: 1.2em!important; line-height: 1.7!important; margin: 0 0 10px 0!important; font-weight: normal!important; text-transform: none!important;}",
|
|
4723
|
-
"h1:after { display: none!important;}",
|
|
4724
|
-
"h2:after { display: none!important;}",
|
|
4725
|
-
"h3:after { display: none!important;}",
|
|
4726
|
-
"h4:after { display: none!important;}",
|
|
4727
|
-
"h5:after { display: none!important;}",
|
|
4728
|
-
"h6:after { display: none!important;}",
|
|
4729
|
-
"h1:before { display: none!important;}",
|
|
4730
|
-
"h2:before { display: none!important;}",
|
|
4731
|
-
"h3:before { display: none!important;}",
|
|
4732
|
-
"h4:before { display: none!important;}",
|
|
4733
|
-
"h5:before { display: none!important;}",
|
|
4734
|
-
"h6:before { display: none!important;}",
|
|
4735
|
-
"h1 + p {\n margin-top: 10px!important;\n }",
|
|
4736
|
-
"h2 + p {\n margin-top: 10px!important;\n }",
|
|
4737
|
-
"h3 + p {\n margin-top: 10px!important;\n }",
|
|
4738
|
-
"h4 + p {\n margin-top: 10px!important;\n }",
|
|
4739
|
-
"h5 + p {\n margin-top: 10px!important;\n }",
|
|
4740
|
-
"h6 + p {\n margin-top: 10px!important;\n }",
|
|
4741
|
-
"p + p {\n margin-top: 10px!important;\n }",
|
|
4742
|
-
"* + pre {\n margin-top: 8px!important;\n }",
|
|
4743
|
-
"pre + * {\n margin-top: 16px!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4744
|
-
"* + ul {\n margin-top: 8px!important;\n }",
|
|
4745
|
-
"ul + * {\n margin-top: 16px!important;\n }",
|
|
4746
|
-
"* + ol {\n margin-top: 8px!important;\n }",
|
|
4747
|
-
"ol + * {\n margin-top: 16px!important;\n }",
|
|
4748
|
-
"* + blockquote {\n margin-top: 8px!important;\n }",
|
|
4749
|
-
"blockquote + * {\n margin-top: 16px!important;\n }",
|
|
4750
|
-
"audio {\n max-width: 100%!important;\n max-height: 100%!important;\n }",
|
|
4751
|
-
"video {\n max-width: 100%!important;\n max-height: 100%!important;\n }",
|
|
4752
|
-
"img {\n max-width: 100%!important;\n pointer-events: auto!important;\n cursor: pointer;\n max-height: 500px;\n }",
|
|
4753
|
-
//;iuytfd
|
|
4754
|
-
"code {\n background-color: #F8F8F8!important;\n border-radius: 3px!important;\n border: 1px solid #DDD!important;\n font-family: Consolas, \"Liberation Mono\", Courier, monospace!important;\n margin: 0 2px!important;\n padding: 0 5px!important;\n white-space: pre-line!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4755
|
-
"pre {\n background-color: #F8F8F8!important;\n border-radius: 3px!important;\n border: 1px solid #DDD!important;\n font-family: Consolas, \"Liberation Mono\", Courier, monospace!important;\n padding: 0 5px!important;\n white-space: pre-line!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4756
|
-
"pre code {\n border: none!important;\n margin: 0!important;\n padding: 0!important;\n white-space: pre-wrap!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4757
|
-
"hr {\n display: block!important;\n unicode-bidi: isolate!important;\n margin-block-start: 0.5em!important;\n margin-block-end: 0.5em!important;\n margin-inline-start: auto!important;\n margin-inline-end: auto!important;\n overflow: hidden!important;\n border-style: inset!important;\n border-width: 1px!important;\n }",
|
|
4758
|
-
"blockquote {\n padding: 5px 20px 0!important;\n border-left: 5px solid #beb7b7!important;\n font-size: ".concat(responseBubbleFontSize, "px!important;\n }"),
|
|
4759
|
-
"table > tbody > tr > td {\n background-color: #fff!important;\n color: #000!important;\n }",
|
|
4760
|
-
"table > tbody > tr > th {\n color: #000!important;\n background-color: #fff!important;\n }",
|
|
4761
|
-
"table > thead > tr > th {\n padding: 4px!important;\n border-top: 1px solid #b7b5b5!important;\n }",
|
|
4762
|
-
"table > tbody > tr > th {\n padding: 4px!important;\n border-top: 1px solid #b7b5b5!important;\n }",
|
|
4763
|
-
"table > thead > tr > td {\n padding: 4px!important;\n border-top: 1px solid #b7b5b5!important;\n }",
|
|
4764
|
-
"table > tbody > tr > td {\n padding: 4px;\n border-top: 1px solid #b7b5b5!important;\n }",
|
|
4765
|
-
"strong {\n font-weight: bold!important;\n }"
|
|
4766
|
-
]);
|
|
4767
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-popup {\n position: relative;\n margin-bottom: 16px;\n -webkit-touch-callout: text; /* iOS Safari */\n -webkit-user-select: text; /* Chrome/Safari/Opera */\n -khtml-user-select: text; /* Konqueror */\n -moz-user-select: text; /* Firefox */\n -ms-user-select: text; /* IE/Edge */\n user-select: text;\n }";
|
|
4768
|
-
keyFrames += getStyleSheetMarker() + ".alan-btn__chat-popup * {\n -webkit-touch-callout: text; /* iOS Safari */\n -webkit-user-select: text; /* Chrome/Safari/Opera */\n -khtml-user-select: text; /* Konqueror */\n -moz-user-select: text; /* Firefox */\n -ms-user-select: text; /* IE/Edge */\n user-select: text;\n }";
|
|
4769
|
-
keyFrames += getStyleSheetMarker(true) + ".hide-alan-btn-when-text-chat-is-opened-immediately .alanBtn {\n transform: scale(0);\n opacity: 0;\n animation: text-chat-disappear-anim 0ms ease-in-out forwards;\n }";
|
|
4770
|
-
keyFrames += getStyleSheetMarker(true) + ".hide-alan-btn-when-text-chat-is-opened .alanBtn {\n transform: scale(0);\n opacity: 0;\n animation: text-chat-disappear-anim ".concat(textChatAppearAnimationMs, "ms ease-in-out forwards;\n }");
|
|
4771
|
-
keyFrames += getStyleSheetMarker(true) + ".text-chat-is-closing .alanBtn {\n transform: scale(0);\n opacity: 0;\n animation: text-chat-appear-anim ".concat(textChatAppearAnimationMs, "ms ease-in-out forwards;\n }");
|
|
4772
|
-
keyFrames += getStyleSheetMarker(true) + ".hide-alan-btn-when-text-chat-is-opened .alanBtn-recognised-text-holder {\n display: none;\n }";
|
|
4773
|
-
keyFrames += getStyleSheetMarker() + " mjx-container svg {\n max-width: 100%;\n }";
|
|
4774
|
-
keyFrames += getStyleSheetMarker() + ".alan-overlay {position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 99;background: rgba(0, 0, 0, 0.57);opacity: 0;-webkit-animation: alan-fade-in 0.5s 0.2s forwards;-moz-animation: alan-fade-in 0.5s 0.2s forwards;-o-animation: alan-fade-in 0.5s 0.2s forwards;animation: alan-fade-in 0.5s 0.2s forwards;}";
|
|
4775
|
-
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup.alan-btn-lib__default-popup {border-radius:10px; box-shadow: 0px 5px 14px rgba(3, 3, 3, 0.25);padding:6px 30px 6px 12px;text-align: left;width: 220px;background: rgb(255 255 255);}";
|
|
4776
|
-
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup.alan-btn-lib__top.alan-btn-lib__right {border-top-right-radius: 0!important;}";
|
|
4777
|
-
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup.alan-btn-lib__top.alan-btn-lib__left {border-top-left-radius: 0!important;}";
|
|
4778
|
-
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup.alan-btn-lib__bottom.alan-btn-lib__left {border-bottom-left-radius: 0!important;}";
|
|
4779
|
-
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup.alan-btn-lib__bottom.alan-btn-lib__right {border-bottom-right-radius: 0!important;}";
|
|
4780
|
-
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup {position: fixed;opacity: 0;-webkit-animation: alan-fade-in 0.5s 0.2s forwards;-moz-animation: alan-fade-in 0.5s 0.2s forwards;-o-animation: alan-fade-in 0.5s 0.2s forwards;animation: alan-fade-in 0.5s 0.2s forwards;}";
|
|
4781
|
-
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup__body {position:relative;color: #0D1940;font-size: 16px;line-height: 20px;}";
|
|
4782
|
-
keyFrames += getStyleSheetMarker() + '.alan-overlay-popup__ok {background:url("' + popupCloseIconImgBase64 + '") no-repeat center; background-size:100% 100%;min-height:14px;height:14px;max-height:14px;min-width:14px;width:14px;max-width:14px;opacity:0;transition:opacity 300ms ease-in-out;position:absolute;top:8px;right:8px;cursor: pointer;pointer-events: auto!important;}';
|
|
4783
|
-
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup__ok:hover {opacity:0.9}";
|
|
4784
|
-
keyFrames += getStyleSheetMarker() + ".alan-overlay-popup:hover .alan-overlay-popup__ok{opacity:1;transition:opacity 300ms ease-in-out;}";
|
|
4785
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-gradient", "0%{backgroundPosition: 0 0;}50%{backgroundPosition: -100% 0;}100%{backgroundPosition: 0 0;}");
|
|
4786
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-pulsating", "0%{transform: scale(1.11111);}50%{transform: scale(1.0);}100%{transform: scale(1.11111);}");
|
|
4787
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-text-chat-pulsating", "0%{transform: scale(1.09);}50%{transform: scale(1.0);}100%{transform: scale(1.09);}");
|
|
4788
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-mic-pulsating", "0%{transform: scale(0.91);}50%{transform: scale(1.0);}100%{transform: scale(0.91);}");
|
|
4789
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-triangle-mic-pulsating", "0%{transform: scale(0.94);}50%{transform: scale(1.0);}100%{transform: scale(0.94);}");
|
|
4790
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-fade-in", "0%{opacity: 0;}100%{opacity:1;}");
|
|
4791
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-fade-out", "0%{opacity: 1;}100%{opacity:0;}");
|
|
4792
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("text-holder-appear", "0%{\n opacity:0;\n color:transparent;\n background-color:rgba(245, 252, 252, 0.0);\n border: solid 1px transparent;\n }\n 100%{\n opacity:1;\n color:#000;\n background-color:rgba(245, 252, 252, 0.8);\n }");
|
|
4793
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("text-holder-disappear", "0%{\n opacity:1; \n color:#000;\n background-color:rgba(245, 252, 252, 0.8); \n }\n 100%{\n opacity:0; \n color:transparent;\n background-color:rgba(245, 252, 252, 0.0);\n border: solid 1px transparent;\n }");
|
|
4794
|
-
function generateLogoPartAnimation(partName, partIndex) {
|
|
4795
|
-
var animSteps = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
|
|
4796
|
-
var keyFrameContent = "";
|
|
4797
|
-
for (var i2 = 0; i2 < animSteps.length; i2++) {
|
|
4798
|
-
var curOpacity = 0;
|
|
4799
|
-
if (partIndex === 0) {
|
|
4800
|
-
curOpacity = i2 === 0 || i2 === 10 ? 1 : 0;
|
|
4801
|
-
}
|
|
4802
|
-
else {
|
|
4803
|
-
curOpacity = i2 === partIndex ? 1 : 0;
|
|
4804
|
-
}
|
|
4805
|
-
keyFrameContent += "".concat(animSteps[i2], "% { opacity: ").concat(curOpacity, "; } ");
|
|
4806
|
-
}
|
|
4807
|
-
return getStyleSheetMarker() + generateKeyFrame(partName, keyFrameContent);
|
|
4808
|
-
}
|
|
4809
|
-
for (var i2 = 0; i2 < 10; i2++) {
|
|
4810
|
-
keyFrames += generateLogoPartAnimation("logo-state-".concat(i2 + 1, "-animation"), i2);
|
|
4811
|
-
}
|
|
4812
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("disconnected-loader-animation", "0%{ transform: rotate(0deg); } 100%{ transform: rotate(360deg); }");
|
|
4813
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("oval1-animation", "0%{ transform: rotate(-315deg); } 50%{ transform: rotate(-495deg); } 100%{ transform: rotate(-315deg); }");
|
|
4814
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("oval2-animation", "0%{ transform: rotate(-45deg); } 50%{ transform: rotate(-215deg); } 100%{ transform: rotate(-45deg); }");
|
|
4815
|
-
keyFrames += getStyleSheetMarker() + generateKeyFrame("alan-text-fade-in", "0%{ opacity: 0; } 100%{ opacity: 1; }");
|
|
4816
|
-
keyFrames += getStyleSheetMarker() + ".alanBtn-bg-default.super-hidden{opacity:0!important;display:none;}";
|
|
4817
|
-
keyFrames += ".no-scroll-for-popup { overflow:hidden!important; position:fixed; }";
|
|
4818
|
-
keyFrames += ".no-scroll-for-popup video { visibility: hidden }";
|
|
4819
|
-
keyFrames += ".no-scroll-for-popup audio { visibility: hidden }";
|
|
4820
|
-
keyFrames += ".no-scroll-for-popup .alan-btn__chat-holder video { visibility: initial }";
|
|
4821
|
-
keyFrames += ".no-scroll-for-popup .alan-btn__chat-holder audio { visibility: initial }";
|
|
4822
|
-
var predefinedBtnColorOptions = defaultBtnColorOptions;
|
|
4823
|
-
if (webOptions === null || webOptions === void 0 ? void 0 : webOptions.btnOptions) {
|
|
4824
|
-
if (webOptions === null || webOptions === void 0 ? void 0 : webOptions.btnOptions.btnLayerOptions) {
|
|
4825
|
-
predefinedBtnColorOptions = defaultBtnColorOptions;
|
|
4826
|
-
}
|
|
4827
|
-
else {
|
|
4828
|
-
predefinedBtnColorOptions = (webOptions === null || webOptions === void 0 ? void 0 : webOptions.btnOptions) ? __assign(__assign({}, defaultBtnColorOptions), webOptions === null || webOptions === void 0 ? void 0 : webOptions.btnOptions) : defaultBtnColorOptions;
|
|
4829
|
-
}
|
|
4830
|
-
}
|
|
4831
|
-
var tempLayer;
|
|
4832
|
-
var stateName;
|
|
4833
|
-
var stateMapping = (_a = {},
|
|
4834
|
-
_a[textChatIsAvailable ? "textChat" : "idle"] = ["default"],
|
|
4835
|
-
_a.listen = ["listening"],
|
|
4836
|
-
_a.process = ["intermediate", "understood"],
|
|
4837
|
-
_a.reply = ["speaking"],
|
|
4838
|
-
_a);
|
|
4839
|
-
var stateNameClasses, stateNameClass;
|
|
4840
|
-
var states = Object.keys(stateMapping);
|
|
4841
|
-
for (i = 0; i < states.length; i++) {
|
|
4842
|
-
stateName = states[i];
|
|
4843
|
-
stateNameClasses = stateMapping[stateName];
|
|
4844
|
-
tempLayer = predefinedBtnColorOptions[stateName];
|
|
4845
|
-
for (var j = 0; j < stateNameClasses.length; j++) {
|
|
4846
|
-
stateNameClass = stateNameClasses[j];
|
|
4847
|
-
if (tempLayer.background) {
|
|
4848
|
-
keyFrames += getStyleSheetMarker() + ".alanBtn-bg-" + stateNameClass + " {";
|
|
4849
|
-
keyFrames += "background-image: linear-gradient(122deg," + tempLayer.background.color[0] + "," + tempLayer.background.color[1] + ");";
|
|
4850
|
-
keyFrames += "}";
|
|
4851
|
-
keyFrames += getStyleSheetMarker() + ".alanBtn-oval-bg-" + stateNameClass + " {";
|
|
4852
|
-
keyFrames += "background-image: linear-gradient(122deg," + tempLayer.background.color[0] + "," + tempLayer.background.color[1] + ");";
|
|
4853
|
-
keyFrames += "}";
|
|
4854
|
-
}
|
|
4855
|
-
if (tempLayer.hover) {
|
|
4856
|
-
keyFrames += getStyleSheetMarker() + ".alanBtn" + hoverSelector + " .alanBtn-bg-" + stateNameClass + ":not(.super-hidden) {";
|
|
4857
|
-
keyFrames += "background-image: linear-gradient(122deg," + tempLayer.hover.color[0] + "," + tempLayer.hover.color[1] + ");";
|
|
4858
|
-
keyFrames += "}";
|
|
4859
|
-
keyFrames += getStyleSheetMarker() + ".alanBtn:active .alanBtn-bg-" + stateNameClass + ":not(.super-hidden) {";
|
|
4860
|
-
keyFrames += "background-image: linear-gradient(122deg," + tempLayer.hover.color[0] + "," + tempLayer.hover.color[1] + ");";
|
|
4861
|
-
keyFrames += "}";
|
|
4862
|
-
keyFrames += getStyleSheetMarker() + ".alanBtn" + hoverSelector + " .alanBtn-oval-bg-" + stateNameClass + ":not(.super-hidden) {";
|
|
4863
|
-
keyFrames += "background-image: linear-gradient(122deg," + tempLayer.hover.color[0] + "," + tempLayer.hover.color[1] + ");";
|
|
4864
|
-
keyFrames += "}";
|
|
4865
|
-
keyFrames += getStyleSheetMarker() + ".alanBtn:active .alanBtn-oval-bg-" + stateNameClass + ":not(.super-hidden) {";
|
|
4866
|
-
keyFrames += "background-image: linear-gradient(122deg," + tempLayer.hover.color[0] + "," + tempLayer.hover.color[1] + ");";
|
|
4867
|
-
keyFrames += "}";
|
|
4868
|
-
}
|
|
4869
|
-
}
|
|
4870
|
-
}
|
|
4871
|
-
style.innerHTML = keyFrames;
|
|
4872
|
-
if (options2.shadowDOM) {
|
|
4873
|
-
options2.shadowDOM.prepend(style);
|
|
4874
|
-
}
|
|
4875
|
-
else {
|
|
4876
|
-
document.getElementsByTagName("head")[0].appendChild(style);
|
|
4877
|
-
}
|
|
4878
|
-
if (existingStyleSheet) {
|
|
4879
|
-
existingStyleSheet.disabled = true;
|
|
4880
|
-
existingStyleSheet.parentNode.removeChild(existingStyleSheet);
|
|
4881
|
-
}
|
|
4882
|
-
}
|
|
4883
|
-
function generateKeyFrame(name, rule) {
|
|
4884
|
-
var prefixes = ["@-webkit-keyframes", "@keyframes"];
|
|
4885
|
-
var r = "";
|
|
4886
|
-
for (var i2 = 0; i2 < prefixes.length; i2++) {
|
|
4887
|
-
r += prefixes[i2] + " " + name + "{" + rule + "} ";
|
|
4888
|
-
}
|
|
4889
|
-
return r;
|
|
4890
|
-
}
|
|
4891
|
-
function calculateTextareaTopPadding() {
|
|
4892
|
-
return "12";
|
|
4893
|
-
}
|
|
5517
|
+
createAlanStyleSheet(options2);
|
|
4894
5518
|
function connectProject() {
|
|
4895
|
-
|
|
5519
|
+
uiState.project.id = options2.key;
|
|
4896
5520
|
tryReadSettingsFromLocalStorage();
|
|
4897
5521
|
switchState(getDefaultBtnState(DISCONNECTED));
|
|
4898
5522
|
window.tutorProject = window.alan.project(options2.key, getAuthData(options2.authData), options2.host, null, {
|
|
@@ -4929,53 +5553,11 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
4929
5553
|
console.info("Alan: connect to dialog: ", options2.keepDialogSession !== false ? getSavedDialogId() : null);
|
|
4930
5554
|
return __assign(__assign({}, authData), { dialogId: options2.keepDialogSession !== false ? getSavedDialogId() : null, capabilities: { textFormats: ["text", "html", "markdown"] } });
|
|
4931
5555
|
}
|
|
4932
|
-
function getProjectId() {
|
|
4933
|
-
var key;
|
|
4934
|
-
if (options2.key) {
|
|
4935
|
-
key = options2.key;
|
|
4936
|
-
return key.substr(0, key.indexOf("/"));
|
|
4937
|
-
}
|
|
4938
|
-
return mode;
|
|
4939
|
-
}
|
|
4940
|
-
function throttle(func, wait) {
|
|
4941
|
-
if (wait === void 0) { wait = 100; }
|
|
4942
|
-
var timer = null;
|
|
4943
|
-
var throttlePause;
|
|
4944
|
-
return function () {
|
|
4945
|
-
var args = [];
|
|
4946
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
4947
|
-
args[_i] = arguments[_i];
|
|
4948
|
-
}
|
|
4949
|
-
if (!throttlePause) {
|
|
4950
|
-
func.apply(this, args);
|
|
4951
|
-
throttlePause = true;
|
|
4952
|
-
if (timer === null) {
|
|
4953
|
-
timer = setTimeout(function () {
|
|
4954
|
-
timer = null;
|
|
4955
|
-
throttlePause = false;
|
|
4956
|
-
}, wait);
|
|
4957
|
-
}
|
|
4958
|
-
}
|
|
4959
|
-
};
|
|
4960
|
-
}
|
|
4961
|
-
function debounce(func, wait) {
|
|
4962
|
-
var timeout;
|
|
4963
|
-
var delay = wait || 100;
|
|
4964
|
-
return function (args) {
|
|
4965
|
-
clearTimeout(timeout);
|
|
4966
|
-
timeout = setTimeout(function () {
|
|
4967
|
-
func.apply(this, args);
|
|
4968
|
-
}, delay);
|
|
4969
|
-
};
|
|
4970
|
-
}
|
|
4971
5556
|
var onresizeDebounced = debounce(function () {
|
|
4972
5557
|
togglePopupVisibility(true, true);
|
|
4973
5558
|
}, 400);
|
|
4974
5559
|
var windowPrevInnerHeight = window.innerHeight;
|
|
4975
5560
|
var windowPrevOrientation = window.orientation;
|
|
4976
|
-
function isSafari() {
|
|
4977
|
-
return /apple/i.test(navigator.vendor);
|
|
4978
|
-
}
|
|
4979
5561
|
window.onresize = function () {
|
|
4980
5562
|
if (isTutorMode())
|
|
4981
5563
|
return;
|
|
@@ -5006,8 +5588,10 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
5006
5588
|
}
|
|
5007
5589
|
togglePopupVisibility(false);
|
|
5008
5590
|
onresizeDebounced({});
|
|
5009
|
-
|
|
5010
|
-
|
|
5591
|
+
if (!uiState.textChat.expanded) {
|
|
5592
|
+
var chatHolderRect = chatHolderDiv.getBoundingClientRect();
|
|
5593
|
+
fixTextChatSizeIfNeeded(chatHolderRect.width, chatHolderRect.height, false);
|
|
5594
|
+
}
|
|
5011
5595
|
};
|
|
5012
5596
|
var initialPermissionWasAsked = false;
|
|
5013
5597
|
function checkPerrmissions() {
|
|
@@ -5068,7 +5652,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
5068
5652
|
return;
|
|
5069
5653
|
if (!dndBackAnimFinished)
|
|
5070
5654
|
return;
|
|
5071
|
-
if (
|
|
5655
|
+
if (uiState.textChat.available && textChatIsHidden) {
|
|
5072
5656
|
activateAlanButton();
|
|
5073
5657
|
}
|
|
5074
5658
|
else {
|
|
@@ -5129,7 +5713,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
5129
5713
|
coldPlayForSoundNext();
|
|
5130
5714
|
}
|
|
5131
5715
|
var continueWithAudio = true;
|
|
5132
|
-
if (
|
|
5716
|
+
if (uiState.textChat.available) {
|
|
5133
5717
|
continueWithAudio = false;
|
|
5134
5718
|
if (textChatIsHidden) {
|
|
5135
5719
|
sendClientEvent({ buttonClicked: true });
|
|
@@ -5331,8 +5915,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
5331
5915
|
else {
|
|
5332
5916
|
popup.style.position = "absolute";
|
|
5333
5917
|
popup.style[isLeftAligned ? "left" : "right"] = (-buttonMarginInPopup || 0) + "px";
|
|
5334
|
-
popup.style[isTopAligned ? "top" : "bottom"] = (buttonMarginInPopup ? -buttonMarginInPopup : _btnSize + popup2BtnMargin) + "px";
|
|
5335
|
-
popup.classList.add(isTopAligned ? "alan-btn-lib__top" : "alan-btn-lib__bottom");
|
|
5918
|
+
popup.style[uiState.btn.isTopAligned ? "top" : "bottom"] = (buttonMarginInPopup ? -buttonMarginInPopup : _btnSize + popup2BtnMargin) + "px";
|
|
5919
|
+
popup.classList.add(uiState.btn.isTopAligned ? "alan-btn-lib__top" : "alan-btn-lib__bottom");
|
|
5336
5920
|
}
|
|
5337
5921
|
if (!popupOptions.html) {
|
|
5338
5922
|
if (message) {
|
|
@@ -5399,7 +5983,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
5399
5983
|
popup.remove();
|
|
5400
5984
|
}
|
|
5401
5985
|
document.removeEventListener("keyup", hidePopupByEsc);
|
|
5402
|
-
btn.style.zIndex =
|
|
5986
|
+
btn.style.zIndex = uiState.btn.zIndex;
|
|
5403
5987
|
btn.style.pointerEvents = "auto";
|
|
5404
5988
|
popupIsVisible = false;
|
|
5405
5989
|
}
|
|
@@ -5526,9 +6110,9 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
5526
6110
|
}
|
|
5527
6111
|
if (!isTutorMode()) {
|
|
5528
6112
|
if (data && data.web && ((_e = (_d = data.web.chatOptions) === null || _d === void 0 ? void 0 : _d.textChat) === null || _e === void 0 ? void 0 : _e.enabled) === true) {
|
|
5529
|
-
|
|
6113
|
+
uiState.textChat.available = true;
|
|
5530
6114
|
voiceEnabledInTextChat = (_h = (_g = (_f = data.web.chatOptions) === null || _f === void 0 ? void 0 : _f.textChat) === null || _g === void 0 ? void 0 : _g.voice) === null || _h === void 0 ? void 0 : _h.enabled;
|
|
5531
|
-
|
|
6115
|
+
uiState.textChat.options = (_j = data.web.chatOptions) === null || _j === void 0 ? void 0 : _j.textChat;
|
|
5532
6116
|
if (getVoiceEnabledFlag() === null) {
|
|
5533
6117
|
if ((_m = (_l = (_k = data.web.chatOptions) === null || _k === void 0 ? void 0 : _k.textChat) === null || _l === void 0 ? void 0 : _l.audio) === null || _m === void 0 ? void 0 : _m.enabled) {
|
|
5534
6118
|
enableAudio(false);
|
|
@@ -5543,7 +6127,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
5543
6127
|
}
|
|
5544
6128
|
}
|
|
5545
6129
|
else {
|
|
5546
|
-
|
|
6130
|
+
uiState.textChat.available = false;
|
|
5547
6131
|
hideTextChat();
|
|
5548
6132
|
}
|
|
5549
6133
|
}
|
|
@@ -5722,7 +6306,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
5722
6306
|
if (alertPopup) {
|
|
5723
6307
|
alertPopup.remove();
|
|
5724
6308
|
}
|
|
5725
|
-
btn.style.zIndex =
|
|
6309
|
+
btn.style.zIndex = uiState.btn.zIndex;
|
|
5726
6310
|
btn.style.pointerEvents = "auto";
|
|
5727
6311
|
document.removeEventListener("keyup", hideAlertByEsc);
|
|
5728
6312
|
}
|
|
@@ -5800,7 +6384,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
5800
6384
|
switchState(INTERMEDIATE);
|
|
5801
6385
|
}
|
|
5802
6386
|
showRecognisedText(event);
|
|
5803
|
-
if (
|
|
6387
|
+
if (uiState.textChat.available && voiceEnabledInTextChat && !textChatIsHidden && (event === null || event === void 0 ? void 0 : event.final) === true) {
|
|
5804
6388
|
renderMessageInTextChat({
|
|
5805
6389
|
type: "response",
|
|
5806
6390
|
name: "loading",
|
|
@@ -5917,7 +6501,10 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
5917
6501
|
var imgPreviewOverlayEl = document.createElement("div");
|
|
5918
6502
|
imgPreviewOverlayEl.id = "img-preview-overlay";
|
|
5919
6503
|
imgPreviewOverlayEl.classList.add("alan-btn__image-preview-overlay");
|
|
5920
|
-
|
|
6504
|
+
if (isMobile()) {
|
|
6505
|
+
imgPreviewOverlayEl.classList.add("mobile");
|
|
6506
|
+
}
|
|
6507
|
+
imgPreviewOverlayEl.style.zIndex = uiState.btn.zIndex + 3;
|
|
5921
6508
|
if (parentEl) {
|
|
5922
6509
|
imgPreviewOverlayEl.setAttribute("data-img-index", parentEl.getAttribute("data-img-index"));
|
|
5923
6510
|
imgPreviewOverlayEl.setAttribute("data-msg-req-id", parentEl.getAttribute("data-msg-req-id"));
|
|
@@ -6089,7 +6676,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6089
6676
|
}
|
|
6090
6677
|
function getImageHtml(src) {
|
|
6091
6678
|
var imgNotFoundSrc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAIAAAD2HxkiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACldJREFUeNrs3Wtv03YbwGEoZRyebRLivA22aYhNQki82vf/Apu2Fdi6lh62MppTW0jTloYkz/20kpenFJo4dg72db1AiIMLrn+9/3Yd53yv1zsHTM55EYIIQYSACEGEgAhBhIAIQYSACEGEgAhBhIAIQYSACEGEgAhBhIAIQYSACEGEgAhBhIAIQYSACEGEgAhBhMBsRLi1tbW6umpfM4vu379/8+bNXD/E/Bj+G+12u9ls+nQyi+LozftDzNnLMFkiBBGCCAERgggBEYIIARGCCAERgggBEYIIARGCCAERggiBnM1P+b9vbm7uzp07Pk+MolKpdDodEaaP8OHDhw4jRrG1tTXNEVqOgghBhIAIQYSACEGEgAhBhIAIQYSACEGEgAhBhIAIQYSACEGEgAhBhIAIQYSACEGEgAhBhIAIQYRARubtgkEcHBy02+0LFy5cvXrV3kCE49Dr9ba3txuNRr1ef/v27f/tsvn5a9eu3bp1K36Mn9tXiDB7r169WltbO9Fe4t27d7UjMRjvHYmf2GmIMButVuv58+fx4yB/uNPpRKv//PPP999/f/36dXuPdFyY+VcsPn/++ecBC0wcHh4uLCz89ddfdiAiHEmlUomWUr+p8srKytLSkt2ICFN68+bN4uLiiBt5+fJlLE3tTEQ4tHa7/fTp0263O/qmlpeXo2e7FBEOJ07n4rwuk01FyS9evCjPrsvkKxdlj/Dg4CCWkRlu8PXr1/V6vSR7L86Em82mikQ4kjiLy/zL+d9//12GXbezsxNfv169eqUiEY6kWq1mvs04LYzzzGLvt06ns7i42Ov1KpVK6kvKiPB/35qP5Wjmm41Ds1arFXvXra6u7u/vH9cYHQpJhOnP33LacrHPlGK/9Z9IW5GKML08xuCx4ylRSHEK/ccff8S07/+K4xszIkzp3bt3OW25wOeEyUK0n2EoQsYkJt7Gxsb7vx6nhfl9RRNhkeX3EqSLFy+WYSHa/1suz4gwjStXruS05UuXLhVyIbq3t/eh33XfrAjT+PTTT3Pa8meffVaShWii1Wrld7VZhIUVqeS0brx27VpJFqKGoQhHcv78+Rs3bmS+2f8cKc9CNFGr1Qp/q5AIs/fVV19Fitlu8/79+6VaiPYPTJdnRJhmat29ezfb88xbt24VaSF6fI/ogH/eilSEaXz99ddZPbkwhup3332X+Wid7EJ0qIfuxKp1Z2fHQSXC4Vy6dOnRo0eZlPPtt98W6ZLM4AvRfu6eEWEaUc6DBw9G3Mjt27eLdDY47EI04fKMCFP68ssvf/jhh7m5lDvk3r178deLtEPW19eHffpjUu/m5qYjSoRp3Llz58mTJ5cvXx7qb8X5ZORXsFPBZrM5ypNUXZ4Z7hCyC/p9/vnnP/7448uXL2MOnHlHcozNu3fvfvPNNwW7U3TAb81/xP7+/vb2dsHuWBDhGNcGc3Oxtoy64jCqVqvx44kaY+LF4XX9+vUbN24U8h7R1AvRE8NQhCIcbb/Mz988cu7oCQ7J/SJR3SeffFLg//iIC9FEo9E4PDws9r4S4fhcuHCheDdk57QQ7d/U5uZmwW4eymvxZRdMp93d3fE/Wjdm4OgL0f4VaSY9i5AJiAXw0yPj7DCyz/a9pQ4ODuKM2mdThDNpfX09juCtra1nz56Np8PjhWjmH8v3KkQ4qwvR5GaxRqMxng5jBsbHzXyz8e//0BseI8LptbS01F9dHMfPnz/PtcPMF6KJOCd0K6kIZ0ys395/SES9Xs+vw5wWoomI0OUZEc6Mdru9urp66m/l12FOC9FELEfj5NYnV4SzYXl5+SOvP8ijw1arldNC9MR498kV4QyIVeiZz4aIDn///fesOoxVYq4L0URMwvzecUCEZHZitri4OMifrNVq0WEmZ1kxA8fzxjXxr/XiJhFOu42NjUEeZ5Z0GOvSETuMhej6+vrY/oPunhHhVNvf319bWxvqr4w4D8e2EE0cHh42Gg2faxFOqeXl5RQ9VKvV1B2ObSHar/8tDRHhFKlUKqlHRHSY4kUPY16IJnZ2dgr8to0inFWdTmdlZWXEhofqMP7k4uLi+F+fcc7dMyKcTi9evBj91sqhOtzY2Jjgu+pubm5OpH8Rcrrd3d2sJkN0OMjjCff29j50R854uDwjwilyfH0yw6v2MWQ+/p3G8V8RPZW7Z0Q4LWIGZn7HZnQYmU3nQjSxvb3t8owIJy/OA+NsMKeTrlPn4cQXooahCNPLY/22srLS6XTym7EnOpyShWj/VwqXZ0Q4xNop8we9NBqNvN/E70SHU7IQTbTb7Vqt5ugS4UBiCbe1tbWwsJBVh7Gd5eXl8Zxz/vnnn+eO7ombnoWoFempPHf0Y2PweIDET6LDx48fp367mMTa2trYLkscH+gTeXTimV6/fh2nqVevXnWYmYRnjMH+IH/77bcRj+Y47FK83d+IHU7VQtQwFGGaMZjY2dn59ddfR7mgMqn7xaZTnBjbGyIcdAz2L6JiHqbrMI6595/gVGbtdrtardoPIhx0DPZ3GPPwzHdNe/+AG8/1mNliRSrC4cZgIvqMeThUh7FB7yB96p7M8K0vRFiKMdh/9Aw+D2N4+pL/IV7pK8Khx2Ci2WxGh2fOt263u7S0ZK9+SJwW5nfzkAgLOwaH6nBjYyPXR+vOulhNuDwjwjRjMBGBfaTDg4ODiTxIYrZ4ub0IU47B/g5/+eWXUzuMhai11plin4//qVMiLMgYTLRarejw8PCw/xfr9bpXkRuGIsx9DPZ3GOvSpMMYgK7HDK5SqZR5ySDCUcfgiXl4/OCmtbU1b445uCgw75d3ibDgYzCxt7cX8zBWoWO+UbsAyvytVBFmMwb7O1xYWPC+C8Pa3d2d2hd8iHBmxiCGoQgnPwYZRbVaHfbOeBEag2Sp2+2W8/JM2SM0Bq1IRWgM8q9Wq1XClz6XOkJj0DAUoTHISbVarWwvgC5vhMbgdOp2u5ubmyI0Bpmkst3PXdIIjcFptre3F18lRWgMMkmlWpGWMUJjcPqV6vJM6SI0BmdCqS7PlC5CY3BWlOcbhuWK0BicIfv7+yW5PFOuCI1Bw1CExiBDqNfrJx6fJUJjkLHq9Xpl+MZ9WSI0BmdURFj4Z4WU5e2y4yz/iy++cEzPordv316+fFmEM0+BWI4CIgQRAiIEEQIiBBECIgQRAiIEEQIiBBGCCAERgggBEYIIgYmY9sdb9Hq9ZrPp88Qout2uCNPrdDo//fSTwwjLUUCEIEJAhCBCQIQgQkCEIEJAhCBCQIQgQkCEIEJAhCBCQIQgQkCEIEJAhCBCQIQgQkCEIEJAhCBCQIQgQkCEIEJAhCBCQIQgQkCEIEJAhCBCQIQgQkCEIEJAhCBCECEgQhAhIEIQISBCECEgQhAhIEIQISBCECEgQhAhIEIQISBCECEgQhAhIEIQIZCx871ez14AEYIIARGCCAERgggBEYIIARGCCAERgggBEYIIARGCCAERgggBEYIIARGCCAERgggBEYIIARGCCAERgggBEYIIARHC7PqvAAMA/BkrMLAeft8AAAAASUVORK5CYII=";
|
|
6092
|
-
return "<img class=\"alan-btn__chat-response-img alan-btn__chat-response-img-el\" src=\"".concat(src, "\" onerror=\"this.src = '").concat(imgNotFoundSrc, "'; this.classList.add('not-found');\" onload = \"
|
|
6679
|
+
return "<img class=\"alan-btn__chat-response-img alan-btn__chat-response-img-el\" src=\"".concat(src, "\" onerror=\"this.src = '").concat(imgNotFoundSrc, "'; this.classList.add('not-found');\" onload = \"if(this.naturalWidth <= this.width && this.naturalHeight <= this.height){this.classList.add('img-none'); this.style.height = this.naturalHeight + 20 + 'px';this.style.minHeight = this.naturalHeight + 20 + 'px'; this.style.maxHeight = this.naturalHeight + 20 + 'px'; }\"/>");
|
|
6093
6680
|
}
|
|
6094
6681
|
function getYoutubeFrameHtml(src) {
|
|
6095
6682
|
return "<iframe class=\"alan-btn__chat-response-video\" width=\"560\" height=\"315\" src=\"".concat(src, "?autoplay=1&mute=1\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen></iframe>");
|
|
@@ -6128,12 +6715,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6128
6715
|
}
|
|
6129
6716
|
return linksBlock;
|
|
6130
6717
|
}
|
|
6131
|
-
function
|
|
6132
|
-
|
|
6133
|
-
if (msg.hasLikes) {
|
|
6134
|
-
likesBlock = "<div class=\"alan-btn__chat-response-likes-wrapper\">\n <span class=\"alan-btn__chat-response-like-btn\">👎</span>\n <span class=\"alan-btn__chat-response-dislike-btn\">👍</span>\n </div>";
|
|
6135
|
-
}
|
|
6136
|
-
return likesBlock;
|
|
6718
|
+
function buildCommandsBlock(msg) {
|
|
6719
|
+
return "<div class=\"alan-btn__chat-response-commands-wrapper\">\n ".concat(buildCopyBtnContent(msg), "\n <span class=\"alan-btn__chat-response-like-btn\">").concat(chatIcons.like, "</span>\n <span class=\"alan-btn__chat-response-dislike-btn\">").concat(chatIcons.dislike, "</span>\n </div>");
|
|
6137
6720
|
}
|
|
6138
6721
|
function buildMsgTextContent(msg) {
|
|
6139
6722
|
var _a;
|
|
@@ -6148,81 +6731,39 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6148
6731
|
}
|
|
6149
6732
|
return result ? "<span class=\"alan-btn__chat-response-text-wrapper\">".concat(fixTargetForLinks(result), "</span>") : "";
|
|
6150
6733
|
}
|
|
6151
|
-
function
|
|
6152
|
-
|
|
6734
|
+
function buildCopyBtnContent(msg) {
|
|
6735
|
+
var copyBtn = "<div class = \"alan-btn__chat-response__copy-btn\">".concat(chatIcons.copy).concat(chatIcons.copied, "</div>");
|
|
6736
|
+
if (msg.initLoad)
|
|
6737
|
+
return copyBtn;
|
|
6738
|
+
return msg.type === "response" && isFinalMessage(msg) ? copyBtn : "";
|
|
6153
6739
|
}
|
|
6154
|
-
function
|
|
6155
|
-
|
|
6156
|
-
setTimeout(function () {
|
|
6157
|
-
var msgHolder = document.getElementById("chatMessages");
|
|
6158
|
-
if (msgHolder) {
|
|
6159
|
-
msgHolder.querySelectorAll("pre code:not(.alan-btn__hljs-processed)").forEach(function (el) {
|
|
6160
|
-
window.hljs.highlightElement(el);
|
|
6161
|
-
el.classList.add("alan-btn__hljs-processed");
|
|
6162
|
-
});
|
|
6163
|
-
}
|
|
6164
|
-
});
|
|
6165
|
-
}
|
|
6166
|
-
}
|
|
6167
|
-
function loadHighlightJs() {
|
|
6168
|
-
var script = document.createElement("script");
|
|
6169
|
-
script.src = "https://studio.alan.app/js/hljs/highlight.min.js?v=1";
|
|
6170
|
-
script.async = true;
|
|
6171
|
-
script.onload = function () {
|
|
6172
|
-
highlightCode();
|
|
6173
|
-
};
|
|
6174
|
-
document.head.appendChild(script);
|
|
6175
|
-
var link = document.createElement("link");
|
|
6176
|
-
link.rel = "stylesheet";
|
|
6177
|
-
link.href = "https://studio.alan.app/js/hljs/github.min.css?v=1";
|
|
6178
|
-
document.getElementsByTagName("head")[0].appendChild(link);
|
|
6179
|
-
}
|
|
6180
|
-
loadHighlightJs();
|
|
6181
|
-
function loadMathJax() {
|
|
6182
|
-
window.MathJax = {
|
|
6183
|
-
startup: {
|
|
6184
|
-
pageReady: function () {
|
|
6185
|
-
return window.MathJax.startup.defaultPageReady();
|
|
6186
|
-
}
|
|
6187
|
-
},
|
|
6188
|
-
tex: {
|
|
6189
|
-
inlineMath: [["$", "$"], ["\\(", "\\)"]],
|
|
6190
|
-
processEscapes: true
|
|
6191
|
-
}
|
|
6192
|
-
};
|
|
6193
|
-
var script = document.createElement("script");
|
|
6194
|
-
script.src = "https://studio.alan.app/js/mathjax/tex-svg.js?v=1";
|
|
6195
|
-
script.async = true;
|
|
6196
|
-
script.setAttribute("id", "MathJax-script");
|
|
6197
|
-
script.onload = function () {
|
|
6198
|
-
processFormulasInMsgs();
|
|
6199
|
-
};
|
|
6200
|
-
document.head.appendChild(script);
|
|
6740
|
+
function buildMsgContent(msg) {
|
|
6741
|
+
return "".concat(buildImagesContent(msg)).concat(buildMsgTextContent(msg)).concat(buildLinksContent(msg)).concat(buildCommandsBlock(msg)).concat(buildMsgIncommingLoader(msg));
|
|
6201
6742
|
}
|
|
6202
|
-
|
|
6203
|
-
function
|
|
6204
|
-
|
|
6205
|
-
|
|
6743
|
+
loadHighlightJs(function () { return document.getElementById("chatMessages"); });
|
|
6744
|
+
loadMathJax(textChatMessages.length, function (i2) { return getTextWrapperInMsgElByIndex(i2); });
|
|
6745
|
+
document.addEventListener("click", function (e) {
|
|
6746
|
+
var _a, _b, _c, _d;
|
|
6747
|
+
var clickedEl = e.target;
|
|
6748
|
+
clickedEl = clickedEl.closest(".alan-btn__chat-response__copy-btn");
|
|
6749
|
+
if (clickedEl) {
|
|
6750
|
+
clickedEl.classList.add("alan-copy-btn-copied");
|
|
6206
6751
|
setTimeout(function () {
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
for (var i2 = 0; i2 < textChatMessages.length; i2++) {
|
|
6220
|
-
processFormulas(i2);
|
|
6221
|
-
}
|
|
6222
|
-
}
|
|
6752
|
+
clickedEl.classList.remove("alan-copy-btn-copied");
|
|
6753
|
+
}, 2e3);
|
|
6754
|
+
var requestBubble = clickedEl.closest("[data-msg-index]");
|
|
6755
|
+
var msgInd = requestBubble.getAttribute("data-msg-index");
|
|
6756
|
+
var msg = textChatMessages[msgInd];
|
|
6757
|
+
var textToCopy = "";
|
|
6758
|
+
if (msg) {
|
|
6759
|
+
textToCopy = msg.text || "";
|
|
6760
|
+
copyTextToBuffer((((_a = msg.images) === null || _a === void 0 ? void 0 : _a.length) > 0 ? ((_b = msg.images) === null || _b === void 0 ? void 0 : _b.map(function (img) { return img.src; }).join("\n")) + "\n\n" : "") + textToCopy + (((_c = msg.links) === null || _c === void 0 ? void 0 : _c.length) > 0 ? "\n\nRead more:\n" + ((_d = msg.links) === null || _d === void 0 ? void 0 : _d.map(function (link) { return link.href; }).join("\n")) : ""));
|
|
6761
|
+
}
|
|
6762
|
+
}
|
|
6763
|
+
}, false);
|
|
6223
6764
|
function renderMessageInTextChat(msg, noAnimation, immidiateScroll) {
|
|
6224
6765
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
6225
|
-
if (!
|
|
6766
|
+
if (!uiState.textChat.available)
|
|
6226
6767
|
return;
|
|
6227
6768
|
var innerMsgPart = "";
|
|
6228
6769
|
var msgHtml = "";
|
|
@@ -6255,10 +6796,10 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6255
6796
|
else {
|
|
6256
6797
|
innerMsgPart = buildMsgContent(msg);
|
|
6257
6798
|
}
|
|
6258
|
-
msgHtml = "<div class=\"".concat(msg.type === "request" ? "alan-btn__chat-request" : "alan-btn__chat-response", " ").concat(((_f = msg.images) === null || _f === void 0 ? void 0 : _f.length) > 0 ? "with-images" : "", "\">").concat(innerMsgPart, "</div>");
|
|
6799
|
+
msgHtml = "<div class=\"alan-btn__chat-inner-msg ".concat(msg.type === "request" ? "alan-btn__chat-request" : "alan-btn__chat-response", " ").concat(((_f = msg.images) === null || _f === void 0 ? void 0 : _f.length) > 0 ? "with-images" : "", "\">").concat(innerMsgPart, "</div>");
|
|
6259
6800
|
}
|
|
6260
6801
|
if (msg.name === "loading") {
|
|
6261
|
-
msgHtml = "<div class=\"alan-btn__chat-response animated alan-incoming-msg\">".concat(getMsgLoader(), "</div>");
|
|
6802
|
+
msgHtml = "<div class=\"alan-btn__chat-inner-msg alan-btn__chat-response animated alan-incoming-msg\">".concat(getMsgLoader(), "</div>");
|
|
6262
6803
|
}
|
|
6263
6804
|
}
|
|
6264
6805
|
msg = __assign(__assign({}, msg), getMsgReadProp(msg, textChatIsHidden));
|
|
@@ -6266,12 +6807,15 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6266
6807
|
if (isNew) {
|
|
6267
6808
|
var div = document.createElement("div");
|
|
6268
6809
|
div.id = "msg-" + msgInd;
|
|
6810
|
+
div.classList.add("alan-btn__chat-msg-holder");
|
|
6811
|
+
div.setAttribute("data-msg-index", msgInd);
|
|
6269
6812
|
if (msg.type === "chat") {
|
|
6270
6813
|
addPopupStyle(msg, div);
|
|
6271
6814
|
}
|
|
6272
|
-
div.
|
|
6815
|
+
var avatarHtml = "<div class=\"alan-btn__chat-avatar ".concat(msg.type, "\">") + (msg.type === "request" ? "<div class=\"alan-btn__chat-request-avatar\"></div>" : "<div class=\"alan-btn__chat-response-avatar\"></div>") + "</div>";
|
|
6816
|
+
div.innerHTML = (msg.type === "chat" ? "" : avatarHtml) + msgHtml;
|
|
6273
6817
|
msgHolder.appendChild(div);
|
|
6274
|
-
if (
|
|
6818
|
+
if (uiState.textChat.available && textChatIsHidden && msg.type === "response" && msg.read !== true) {
|
|
6275
6819
|
unreadChatMsgCount++;
|
|
6276
6820
|
}
|
|
6277
6821
|
if (immidiateScroll !== true) {
|
|
@@ -6281,15 +6825,15 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6281
6825
|
scrollTextChat(msgHolder);
|
|
6282
6826
|
}
|
|
6283
6827
|
if (((_g = msg.ctx) === null || _g === void 0 ? void 0 : _g.final) !== false) {
|
|
6284
|
-
processFormulas(msgInd);
|
|
6285
|
-
highlightCode();
|
|
6828
|
+
processFormulas(getTextWrapperInMsgElByIndex(msgInd));
|
|
6829
|
+
highlightCode(document.getElementById("chatMessages"));
|
|
6286
6830
|
}
|
|
6287
6831
|
}
|
|
6288
6832
|
else {
|
|
6289
6833
|
var msgEl = document.getElementById("msg-" + msgInd);
|
|
6290
6834
|
if (msgEl) {
|
|
6291
6835
|
if (replaceLoader) {
|
|
6292
|
-
var innerEl = msgEl.
|
|
6836
|
+
var innerEl = msgEl.querySelector(".alan-btn__chat-inner-msg");
|
|
6293
6837
|
if (innerEl) {
|
|
6294
6838
|
innerEl.innerHTML = innerMsgPart;
|
|
6295
6839
|
innerEl.classList.remove("alan-incoming-msg");
|
|
@@ -6300,12 +6844,12 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6300
6844
|
}
|
|
6301
6845
|
}
|
|
6302
6846
|
else if (updateResponse && msg.type !== "chat") {
|
|
6303
|
-
var innerEl = msgEl.
|
|
6847
|
+
var innerEl = msgEl.querySelector(".alan-btn__chat-inner-msg");
|
|
6304
6848
|
var updatedMsg = textChatMessages[msgInd];
|
|
6305
6849
|
var imagesWrapper = innerEl.querySelector(".alan-btn__chat-response-imgs-wrapper");
|
|
6306
6850
|
if (((_j = updatedMsg.images) === null || _j === void 0 ? void 0 : _j.length) > 0 && !imagesWrapper) {
|
|
6307
6851
|
innerEl.insertAdjacentHTML("afterbegin", buildImagesContent(updatedMsg));
|
|
6308
|
-
innerEl = msgEl.
|
|
6852
|
+
innerEl = msgEl.querySelector(".alan-btn__chat-inner-msg");
|
|
6309
6853
|
}
|
|
6310
6854
|
if (((_k = updatedMsg.images) === null || _k === void 0 ? void 0 : _k.length) > 1 && imagesWrapper) {
|
|
6311
6855
|
imagesWrapper.querySelector(".alan-btn__chat-response-imgs-wrapper-right-arrow").classList.remove("invisible");
|
|
@@ -6320,7 +6864,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6320
6864
|
}
|
|
6321
6865
|
innerEl.insertAdjacentHTML("beforeend", buildMsgTextContent(updatedMsg));
|
|
6322
6866
|
innerEl.insertAdjacentHTML("beforeend", buildLinksContent(updatedMsg));
|
|
6323
|
-
innerEl.insertAdjacentHTML("beforeend",
|
|
6867
|
+
innerEl.insertAdjacentHTML("beforeend", buildCommandsBlock(msg));
|
|
6324
6868
|
innerEl.insertAdjacentHTML("beforeend", buildMsgIncommingLoader(msg));
|
|
6325
6869
|
setTimeout(function () {
|
|
6326
6870
|
scrollTextChat(msgHolder, "smooth");
|
|
@@ -6331,12 +6875,12 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6331
6875
|
}
|
|
6332
6876
|
}
|
|
6333
6877
|
if (((_o = msg.ctx) === null || _o === void 0 ? void 0 : _o.final) !== false) {
|
|
6334
|
-
processFormulas(msgInd);
|
|
6335
|
-
highlightCode();
|
|
6878
|
+
processFormulas(getTextWrapperInMsgElByIndex(msgInd));
|
|
6879
|
+
highlightCode(document.getElementById("chatMessages"));
|
|
6336
6880
|
}
|
|
6337
6881
|
}
|
|
6338
6882
|
saveMessageHistory();
|
|
6339
|
-
if (
|
|
6883
|
+
if (uiState.textChat.available && textChatIsHidden) {
|
|
6340
6884
|
showChatNotifications();
|
|
6341
6885
|
}
|
|
6342
6886
|
if (isFinalMessage(msg) && msg.type === "response" && textChatMessages.filter(function (m) { return !isFinalMessage(m); }).length === 0) {
|
|
@@ -6379,7 +6923,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6379
6923
|
function clearChat() {
|
|
6380
6924
|
unreadChatMsgCount = 0;
|
|
6381
6925
|
textChatMessages = [];
|
|
6382
|
-
if (
|
|
6926
|
+
if (uiState.textChat.available) {
|
|
6383
6927
|
var msgHolder = document.getElementById("chatMessages");
|
|
6384
6928
|
if (msgHolder) {
|
|
6385
6929
|
msgHolder.innerHTML = '<div class="alan-btn__chat-messages-empty-block"></div>';
|
|
@@ -6504,6 +7048,9 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6504
7048
|
});
|
|
6505
7049
|
});
|
|
6506
7050
|
}, 1e3);
|
|
7051
|
+
function getTextWrapperInMsgElByIndex(msgInd) {
|
|
7052
|
+
return document.getElementById("msg-" + msgInd).querySelectorAll(".alan-btn__chat-response-text-wrapper")[0];
|
|
7053
|
+
}
|
|
6507
7054
|
function addNewLine(textareaEl) {
|
|
6508
7055
|
var curText = textareaEl.value;
|
|
6509
7056
|
var newText;
|
|
@@ -6522,9 +7069,19 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6522
7069
|
var input = e.target;
|
|
6523
7070
|
if (input.scrollWidth > input.clientWidth) {
|
|
6524
7071
|
textareaHolder.classList.add("show-gradient");
|
|
7072
|
+
if (input.scrollLeft === 0) {
|
|
7073
|
+
textareaHolder.classList.add("show-gradient-right");
|
|
7074
|
+
textareaHolder.classList.remove("show-gradient-left");
|
|
7075
|
+
}
|
|
7076
|
+
else {
|
|
7077
|
+
textareaHolder.classList.add("show-gradient-left");
|
|
7078
|
+
textareaHolder.classList.remove("show-gradient-right");
|
|
7079
|
+
}
|
|
6525
7080
|
}
|
|
6526
7081
|
else {
|
|
6527
7082
|
textareaHolder.classList.remove("show-gradient");
|
|
7083
|
+
textareaHolder.classList.remove("show-gradient-right");
|
|
7084
|
+
textareaHolder.classList.remove("show-gradient-left");
|
|
6528
7085
|
}
|
|
6529
7086
|
if (textareaHolder) {
|
|
6530
7087
|
if (input.value.length > 0) {
|
|
@@ -6689,7 +7246,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6689
7246
|
return document.getElementById("chatTextarea");
|
|
6690
7247
|
}
|
|
6691
7248
|
function initTextChat() {
|
|
6692
|
-
var _a, _b, _c;
|
|
7249
|
+
var _a, _b, _c, _d, _e, _f;
|
|
6693
7250
|
var textareaDiv = document.getElementById("textarea-holder");
|
|
6694
7251
|
var chatTextarea = getChatTextareaEl();
|
|
6695
7252
|
var chatMicBtn = document.getElementById("chat-mic-btn");
|
|
@@ -6699,7 +7256,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6699
7256
|
var headerTille = document.getElementById("chat-header-title");
|
|
6700
7257
|
if (!chatDiv.classList.contains("alan-btn__chat")) {
|
|
6701
7258
|
document.addEventListener("touchstart", keyboardScrollFixListenerForChat, { passive: false });
|
|
6702
|
-
|
|
7259
|
+
chatDivWrapper.classList.add("alan-btn__chat");
|
|
6703
7260
|
var messagesDiv = document.createElement("div");
|
|
6704
7261
|
messagesDiv.id = "chatMessages";
|
|
6705
7262
|
messagesDiv.classList.add("alan-btn__chat-messages");
|
|
@@ -6718,34 +7275,34 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6718
7275
|
var messagesEmptyDiv = document.createElement("div");
|
|
6719
7276
|
messagesEmptyDiv.classList.add("alan-btn__chat-messages-empty-block");
|
|
6720
7277
|
messagesDiv.appendChild(messagesEmptyDiv);
|
|
6721
|
-
headerDiv =
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
var headerDivGr = document.createElement("div");
|
|
6725
|
-
headerDivGr.classList.add("alan-btn__chat-header-gradient");
|
|
6726
|
-
var clearChatBtn = document.createElement("div");
|
|
6727
|
-
clearChatBtn.id = "clear-chat-btn";
|
|
6728
|
-
clearChatBtn.classList.add("alan-btn__chat-header-clear-btn");
|
|
6729
|
-
clearChatBtn.innerHTML = "<svg width=\"19\" height=\"22\" viewBox=\"0 0 19 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.33333 3.16667V2.63889C6.33333 1.93906 6.612 1.26772 7.10706 0.772667C7.60106 0.277611 8.27239 0 8.97222 0H10.0278C10.7276 0 11.399 0.277611 11.894 0.772667C12.3891 1.26772 12.6667 1.93906 12.6667 2.63889V3.16667H17.9444C18.5271 3.16667 19 3.63956 19 4.22222C19 4.80489 18.5271 5.27778 17.9444 5.27778H16.8889V16.8889C16.8889 19.2206 14.9994 21.1111 12.6667 21.1111C10.7329 21.1111 8.26817 21.1111 6.33333 21.1111C4.00161 21.1111 2.11111 19.2206 2.11111 16.8889V5.27778H1.05556C0.472889 5.27778 0 4.80489 0 4.22222C0 3.63956 0.472889 3.16667 1.05556 3.16667H6.33333ZM14.7778 5.27778H4.22222V16.8889C4.22222 18.0553 5.168 19 6.33333 19H12.6667C13.8331 19 14.7778 18.0553 14.7778 16.8889V5.27778ZM10.5556 8.44445V15.8333C10.5556 16.416 11.0284 16.8889 11.6111 16.8889C12.1938 16.8889 12.6667 16.416 12.6667 15.8333V8.44445C12.6667 7.86178 12.1938 7.38889 11.6111 7.38889C11.0284 7.38889 10.5556 7.86178 10.5556 8.44445ZM6.33333 8.44445V15.8333C6.33333 16.416 6.80622 16.8889 7.38889 16.8889C7.97156 16.8889 8.44444 16.416 8.44444 15.8333V8.44445C8.44444 7.86178 7.97156 7.38889 7.38889 7.38889C6.80622 7.38889 6.33333 7.86178 6.33333 8.44445ZM10.5556 3.16667V2.63889C10.5556 2.4985 10.5007 2.36444 10.4014 2.26522C10.3022 2.16706 10.1682 2.11111 10.0278 2.11111C9.68261 2.11111 9.31739 2.11111 8.97222 2.11111C8.83289 2.11111 8.69884 2.16706 8.59962 2.26522C8.50039 2.36444 8.44444 2.4985 8.44444 2.63889V3.16667H10.5556Z\" fill=\"black\"/>\n </svg>\n ";
|
|
7278
|
+
headerDiv = createDiv({ id: "chat-header", "class": "alan-btn__chat-header" });
|
|
7279
|
+
var headerDivGr = createDiv({ "class": "alan-btn__chat-header-gradient" });
|
|
7280
|
+
var clearChatBtn = createDivWithSvg(chatIcons.clear, { id: "clear-chat-btn", "class": "alan-btn__chat-header-clear-btn" });
|
|
6730
7281
|
clearChatBtn.addEventListener("click", onClearChatClick);
|
|
6731
|
-
var leftResizer =
|
|
6732
|
-
|
|
6733
|
-
leftResizer.innerHTML = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M13.7266 0.273364C14.0911 0.63786 14.0911 1.22881 13.7266 1.59331L1.59331 13.7266C1.22881 14.0911 0.63786 14.0911 0.273364 13.7266C-0.0911215 13.3622 -0.0911215 12.7712 0.273364 12.4067L12.4067 0.273364C12.7712 -0.0911215 13.3622 -0.0911215 13.7266 0.273364ZM13.7266 6.80672C14.0911 7.17119 14.0911 7.76217 13.7266 8.12664L8.12664 13.7266C7.76217 14.0911 7.17119 14.0911 6.80672 13.7266C6.44225 13.3622 6.44225 12.7712 6.80672 12.4067L12.4067 6.80672C12.7712 6.44225 13.3622 6.44225 13.7266 6.80672Z\" fill=\"#CCD4DD\"/>\n </svg>\n ";
|
|
6734
|
-
var rightResizer = document.createElement("div");
|
|
6735
|
-
rightResizer.classList.add("alan-btn__chat-header-right-resizer");
|
|
6736
|
-
rightResizer.innerHTML = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M13.7266 0.273364C14.0911 0.63786 14.0911 1.22881 13.7266 1.59331L1.59331 13.7266C1.22881 14.0911 0.63786 14.0911 0.273364 13.7266C-0.0911215 13.3622 -0.0911215 12.7712 0.273364 12.4067L12.4067 0.273364C12.7712 -0.0911215 13.3622 -0.0911215 13.7266 0.273364ZM13.7266 6.80672C14.0911 7.17119 14.0911 7.76217 13.7266 8.12664L8.12664 13.7266C7.76217 14.0911 7.17119 14.0911 6.80672 13.7266C6.44225 13.3622 6.44225 12.7712 6.80672 12.4067L12.4067 6.80672C12.7712 6.44225 13.3622 6.44225 13.7266 6.80672Z\" fill=\"#CCD4DD\"/>\n </svg>\n ";
|
|
7282
|
+
var leftResizer = createDivWithSvg(chatIcons.resizer.left, { "class": "alan-btn__chat-header-left-resizer" });
|
|
7283
|
+
var rightResizer = createDivWithSvg(chatIcons.resizer.right, { "class": "alan-btn__chat-header-right-resizer" });
|
|
6737
7284
|
headerTille = document.createElement("span");
|
|
6738
7285
|
headerTille.id = "chat-header-title";
|
|
6739
7286
|
headerTille.classList.add("alan-btn__chat-header-title");
|
|
7287
|
+
var headerLeftIconsHolder = createDiv({ "class": "alan-btn__chat-header-left-icons" });
|
|
7288
|
+
var headerRightIconsHolder = createDiv({ "class": "alan-btn__chat-header-right-icons" });
|
|
7289
|
+
var closeChatBtnImg = createDivWithSvg(chatIcons.closeChat, { "class": "alan-btn__close-chat-btn" });
|
|
7290
|
+
headerLeftIconsHolder.appendChild(closeChatBtnImg);
|
|
7291
|
+
closeChatBtnImg.addEventListener("click", closeTextChat);
|
|
7292
|
+
if (!isMobile()) {
|
|
7293
|
+
var expandCollapseChatBtnImg = document.createElement("div");
|
|
7294
|
+
expandCollapseChatBtnImg.classList.add("alan-btn__expand-collapse-chat-btn");
|
|
7295
|
+
expandCollapseChatBtnImg.innerHTML = "\n <svg class=\"alan-btn__chat-enter-full-screen-mode\" width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M21.7092 2.29502C21.8041 2.3904 21.8757 2.50014 21.9241 2.61722C21.9727 2.73425 21.9996 2.8625 22 2.997L22 3V9C22 9.55228 21.5523 10 21 10C20.4477 10 20 9.55228 20 9V5.41421L14.7071 10.7071C14.3166 11.0976 13.6834 11.0976 13.2929 10.7071C12.9024 10.3166 12.9024 9.68342 13.2929 9.29289L18.5858 4H15C14.4477 4 14 3.55228 14 3C14 2.44772 14.4477 2 15 2H20.9998C21.2749 2 21.5242 2.11106 21.705 2.29078L21.7092 2.29502Z\" fill=\"#000000\"/>\n <path d=\"M10.7071 14.7071L5.41421 20H9C9.55228 20 10 20.4477 10 21C10 21.5523 9.55228 22 9 22H3.00069L2.997 22C2.74301 21.9992 2.48924 21.9023 2.29502 21.7092L2.29078 21.705C2.19595 21.6096 2.12432 21.4999 2.07588 21.3828C2.02699 21.2649 2 21.1356 2 21V15C2 14.4477 2.44772 14 3 14C3.55228 14 4 14.4477 4 15V18.5858L9.29289 13.2929C9.68342 12.9024 10.3166 12.9024 10.7071 13.2929C11.0976 13.6834 11.0976 14.3166 10.7071 14.7071Z\" fill=\"#000000\"/>\n </svg>\n \n <svg class=\"alan-btn__chat-exit-full-screen-mode\" width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M21.7071 3.70711L16.4142 9H20C20.5523 9 21 9.44772 21 10C21 10.5523 20.5523 11 20 11H14.0007L13.997 11C13.743 10.9992 13.4892 10.9023 13.295 10.7092L13.2908 10.705C13.196 10.6096 13.1243 10.4999 13.0759 10.3828C13.0273 10.2657 13.0004 10.1375 13 10.003L13 10V4C13 3.44772 13.4477 3 14 3C14.5523 3 15 3.44772 15 4V7.58579L20.2929 2.29289C20.6834 1.90237 21.3166 1.90237 21.7071 2.29289C22.0976 2.68342 22.0976 3.31658 21.7071 3.70711Z\" fill=\"#000000\"/>\n <path d=\"M9 20C9 20.5523 9.44772 21 10 21C10.5523 21 11 20.5523 11 20V14.0007C11 13.9997 11 13.998 11 13.997C10.9992 13.7231 10.8883 13.4752 10.7092 13.295C10.7078 13.2936 10.7064 13.2922 10.705 13.2908C10.6096 13.196 10.4999 13.1243 10.3828 13.0759C10.2657 13.0273 10.1375 13.0004 10.003 13C10.002 13 10.001 13 10 13H4C3.44772 13 3 13.4477 3 14C3 14.5523 3.44772 15 4 15H7.58579L2.29289 20.2929C1.90237 20.6834 1.90237 21.3166 2.29289 21.7071C2.68342 22.0976 3.31658 22.0976 3.70711 21.7071L9 16.4142V20Z\" fill=\"#000000\"/>\n </svg>\n \n ";
|
|
7296
|
+
headerLeftIconsHolder.appendChild(expandCollapseChatBtnImg);
|
|
7297
|
+
expandCollapseChatBtnImg.addEventListener("click", expandCollapseTextChat);
|
|
7298
|
+
}
|
|
7299
|
+
headerRightIconsHolder.appendChild(clearChatBtn);
|
|
7300
|
+
headerDiv.appendChild(headerLeftIconsHolder);
|
|
6740
7301
|
headerDiv.appendChild(headerTille);
|
|
7302
|
+
headerDiv.appendChild(headerRightIconsHolder);
|
|
6741
7303
|
headerDiv.appendChild(leftResizer);
|
|
6742
7304
|
headerDiv.appendChild(rightResizer);
|
|
6743
|
-
|
|
6744
|
-
var closeChatBtnImg = document.createElement("div");
|
|
6745
|
-
closeChatBtnImg.innerHTML = "\n <svg width=\"17\" height=\"17\" viewBox=\"0 0 17 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M0.342029 15.0105C-0.113105 15.4658 -0.113035 16.2036 0.34217 16.6587C0.797374 17.1138 1.53533 17.1138 1.99046 16.6586L8.50015 10.1482L15.0104 16.658C15.4655 17.1131 16.2035 17.1131 16.6586 16.658C17.1138 16.2029 17.1138 15.4649 16.6586 15.0098L10.1483 8.49998L16.6582 1.98944C17.1132 1.53427 17.1132 0.796371 16.6579 0.341282C16.2028 -0.113819 15.4648 -0.113749 15.0097 0.341421L8.49991 6.85183L1.98966 0.341981C1.5345 -0.113143 0.796535 -0.113143 0.341377 0.341981C-0.113792 0.797116 -0.113792 1.53502 0.341377 1.99016L6.85187 8.5001L0.342029 15.0105Z\" fill=\"#080808\"/>\n</svg>\n";
|
|
6746
|
-
closeChatBtnImg.classList.add("alan-btn__close-chat-btn");
|
|
6747
|
-
headerDiv.appendChild(closeChatBtnImg);
|
|
6748
|
-
closeChatBtnImg.addEventListener("click", closeTextChat);
|
|
7305
|
+
fillSideBarContent(chatSideBar, { onClearChatClick: onClearChatClick, expandCollapseChatSidePanel: expandCollapseChatSidePanel, closeTextChat: closeTextChat });
|
|
6749
7306
|
textareaDiv = document.createElement("div");
|
|
6750
7307
|
textareaDiv.id = "textarea-holder";
|
|
6751
7308
|
textareaDiv.classList.add("alan-btn__chat-textarea-holder");
|
|
@@ -6757,16 +7314,19 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6757
7314
|
chatTextarea.classList.add("alan-btn__chat-textarea");
|
|
6758
7315
|
chatTextarea.addEventListener("keydown", onChatTextAreaKeyDown);
|
|
6759
7316
|
chatTextarea.addEventListener("keyup", onChatTextAreaKeyUp);
|
|
6760
|
-
var
|
|
6761
|
-
|
|
7317
|
+
var leftTextareaGradient = document.createElement("div");
|
|
7318
|
+
leftTextareaGradient.classList.add("alan-btn__chat-textarea-left-gradient");
|
|
7319
|
+
var rightTextareaGradient = document.createElement("div");
|
|
7320
|
+
rightTextareaGradient.classList.add("alan-btn__chat-textarea-right-gradient");
|
|
6762
7321
|
chatSendBtn = document.createElement("div");
|
|
6763
7322
|
chatSendBtn.id = "chat-send-btn";
|
|
6764
7323
|
chatSendBtn.classList.add("alan-btn__chat-send-btn");
|
|
6765
7324
|
chatSendBtn.addEventListener("click", sendMessageToTextChat);
|
|
6766
|
-
chatSendBtn.innerHTML =
|
|
7325
|
+
chatSendBtn.innerHTML = chatIcons.send;
|
|
6767
7326
|
textareaDiv.appendChild(chatTextarea);
|
|
6768
7327
|
textareaDiv.appendChild(chatSendBtn);
|
|
6769
|
-
textareaDiv.appendChild(
|
|
7328
|
+
textareaDiv.appendChild(leftTextareaGradient);
|
|
7329
|
+
textareaDiv.appendChild(rightTextareaGradient);
|
|
6770
7330
|
textareaDiv.appendChild(textareaDivGr);
|
|
6771
7331
|
chatDiv.appendChild(headerDiv);
|
|
6772
7332
|
chatDiv.appendChild(messagesWrapperDiv);
|
|
@@ -6775,7 +7335,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6775
7335
|
chatHolderDiv.classList.add("alan-btn__chat-holder");
|
|
6776
7336
|
}
|
|
6777
7337
|
if (headerTille) {
|
|
6778
|
-
var title = ((_a =
|
|
7338
|
+
var title = ((_b = (_a = uiState.textChat.options) === null || _a === void 0 ? void 0 : _a.header) === null || _b === void 0 ? void 0 : _b.label) || "Alan AI Assistant";
|
|
6779
7339
|
headerTille.innerText = title;
|
|
6780
7340
|
headerTille.setAttribute("title", title);
|
|
6781
7341
|
}
|
|
@@ -6800,8 +7360,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6800
7360
|
}
|
|
6801
7361
|
}
|
|
6802
7362
|
manageUnmuteAlanIcon(unmuteAlanBtn, textToSpeachVoiceEnabled);
|
|
6803
|
-
if (
|
|
6804
|
-
|
|
7363
|
+
if (headerRightIconsHolder) {
|
|
7364
|
+
headerRightIconsHolder.appendChild(unmuteAlanBtn);
|
|
6805
7365
|
}
|
|
6806
7366
|
}
|
|
6807
7367
|
if (voiceEnabledInTextChat) {
|
|
@@ -6829,13 +7389,13 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6829
7389
|
case PERMISSION_DENIED:
|
|
6830
7390
|
case NO_VOICE_SUPPORT:
|
|
6831
7391
|
case NOT_SECURE_ORIGIN:
|
|
6832
|
-
chatMicBtn.innerHTML =
|
|
7392
|
+
chatMicBtn.innerHTML = chatIcons.noMic;
|
|
6833
7393
|
if (state === PERMISSION_DENIED) {
|
|
6834
7394
|
chatMicBtn.classList.add("alan-btn__disabled");
|
|
6835
7395
|
}
|
|
6836
7396
|
break;
|
|
6837
7397
|
default:
|
|
6838
|
-
chatMicBtn.innerHTML =
|
|
7398
|
+
chatMicBtn.innerHTML = chatIcons.mic;
|
|
6839
7399
|
break;
|
|
6840
7400
|
}
|
|
6841
7401
|
if (textareaDiv) {
|
|
@@ -6848,12 +7408,12 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6848
7408
|
chatMicBtn.remove();
|
|
6849
7409
|
}
|
|
6850
7410
|
chatTextarea.setAttribute("placeholder", "Ask me anything...");
|
|
6851
|
-
chatTextarea.style.paddingTop =
|
|
7411
|
+
chatTextarea.style.paddingTop = uiState.textChat.defaults.textarea.padding.top + "px";
|
|
6852
7412
|
chatHolderDiv.classList.remove("alan-text-chat__voice-enabled");
|
|
6853
7413
|
}
|
|
6854
7414
|
if (chatTextarea) {
|
|
6855
|
-
if ((
|
|
6856
|
-
chatTextarea.setAttribute("placeholder", (
|
|
7415
|
+
if ((_d = (_c = uiState.textChat.options) === null || _c === void 0 ? void 0 : _c.textarea) === null || _d === void 0 ? void 0 : _d.placeholder) {
|
|
7416
|
+
chatTextarea.setAttribute("placeholder", (_f = (_e = uiState.textChat.options) === null || _e === void 0 ? void 0 : _e.textarea) === null || _f === void 0 ? void 0 : _f.placeholder);
|
|
6857
7417
|
}
|
|
6858
7418
|
}
|
|
6859
7419
|
}
|
|
@@ -6909,7 +7469,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6909
7469
|
rootEl.classList.remove("hide-alan-btn-when-text-chat-is-opened-immediately");
|
|
6910
7470
|
rootEl.classList.remove("text-chat-is-closing");
|
|
6911
7471
|
fixPopupScrollOnMobileForTextChat(false);
|
|
6912
|
-
},
|
|
7472
|
+
}, uiState.textChat.defaults.appearAnimationMs);
|
|
6913
7473
|
textChatIsHidden = true;
|
|
6914
7474
|
if (isLocalStorageAvailable) {
|
|
6915
7475
|
localStorage.removeItem(getOpenCloseTextChatLocalStorageKey());
|
|
@@ -6926,6 +7486,19 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6926
7486
|
function closeTextChat() {
|
|
6927
7487
|
hideTextChat();
|
|
6928
7488
|
}
|
|
7489
|
+
function expandCollapseChatSidePanel() {
|
|
7490
|
+
toogleChatSidePanel(chatHolderDiv);
|
|
7491
|
+
}
|
|
7492
|
+
function expandCollapseTextChat() {
|
|
7493
|
+
if (!uiState.textChat.expanded) {
|
|
7494
|
+
uiState.textChat.expanded = true;
|
|
7495
|
+
openChatInFullScreen(chatHolderDiv);
|
|
7496
|
+
}
|
|
7497
|
+
else {
|
|
7498
|
+
uiState.textChat.expanded = false;
|
|
7499
|
+
chatHolderDiv.classList.remove("alan-btn_text-chat-full-screen");
|
|
7500
|
+
}
|
|
7501
|
+
}
|
|
6929
7502
|
function getVoiceEnabledFlagLocalStorageKey() {
|
|
6930
7503
|
return "alan-btn-text-chat__text-to-speach-voice-enabled__for-projectId-".concat(getProjectId());
|
|
6931
7504
|
}
|
|
@@ -6956,14 +7529,12 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
6956
7529
|
}
|
|
6957
7530
|
}
|
|
6958
7531
|
function manageUnmuteAlanIcon(iconEl, unmuted) {
|
|
6959
|
-
var muteIconSvg = "\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_185_822)\">\n <path d=\"M2.96822 1.83729C2.5972 1.46626 2.04066 1.46626 1.66963 1.83729C1.2986 2.20832 1.2986 2.76486 1.66963 3.13589L16.5107 17.977C16.8818 18.348 17.4383 18.348 17.8093 17.977C18.1804 17.606 18.1804 17.0494 17.8093 16.6784L2.96822 1.83729Z\" fill=\"#171717\"/>\n <path d=\"M14.2846 11.9477L15.5832 13.2463C17.0673 11.2984 16.9746 8.60848 15.4905 6.66059C15.2122 6.28956 14.5629 6.1968 14.1919 6.56783C13.8208 6.93886 13.7281 7.4954 14.0991 7.86643C15.1194 8.88675 15.1194 10.5564 14.2846 11.9477Z\" fill=\"#171717\"/>\n <path d=\"M18.1804 9.90719C18.1804 11.3913 17.5311 12.8754 16.5107 13.9885L17.8093 15.2871C19.2007 13.803 19.9427 11.9478 20.0355 9.90719C20.0355 7.49551 18.8297 5.17659 16.8818 3.59972C16.5107 3.22869 15.7687 3.32145 15.5832 3.69248C15.3976 4.06351 15.3049 4.7128 15.6759 4.99107C17.2528 6.19691 18.1804 7.9593 18.1804 9.90719Z\" fill=\"#171717\"/>\n <path d=\"M11.1308 15.6581L6.40023 12.4116C6.21471 12.3189 6.0292 12.2261 5.84368 12.2261H1.85514V7.77378H4.82336L2.96822 5.91864H0.927569C0.371028 5.91864 0 6.28967 0 6.84621V13.2464C0 13.803 0.371028 14.174 0.927569 14.174H5.56541L11.5019 18.2553C11.6874 18.3481 11.8729 18.4408 12.0584 18.4408C12.6149 18.4408 12.986 18.0698 12.986 17.5133V15.9364L11.1308 14.0812V15.6581Z\" fill=\"#171717\"/>\n <path d=\"M11.1309 4.24897V8.7013L12.986 10.5564V2.48659C12.986 1.93005 12.615 1.55902 12.0584 1.55902C11.8729 1.55902 11.6874 1.65178 11.5019 1.74453L7.14233 4.71276L8.44093 6.01135L11.1309 4.24897Z\" fill=\"#171717\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_185_822\">\n <rect width=\"20\" height=\"20\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n ";
|
|
6960
|
-
var unmuteIconSvg = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M15.5556 6.64349C15.2778 6.27312 14.6296 6.18053 14.2593 6.5509C13.8889 6.92127 13.7963 7.47682 14.1667 7.84719C15.0926 9.14348 15.0926 10.9027 14.1667 12.199C13.8889 12.5694 13.8889 13.2175 14.2593 13.4953C14.4445 13.5879 14.6296 13.6805 14.8148 13.6805C15.0926 13.6805 15.3704 13.5879 15.5556 13.3101C17.037 11.3657 17.037 8.58793 15.5556 6.64349Z\" fill=\"#171717\"/>\n <path d=\"M16.7593 3.68063C16.3889 3.31026 15.7408 3.40285 15.463 3.77322C15.1852 4.14359 15.1852 4.79174 15.5556 5.06952C17.1297 6.27322 18.0556 8.03247 18.0556 9.97691C18.0556 11.9213 17.1297 13.6806 15.6482 14.7917C15.2778 15.1621 15.1852 15.7176 15.5556 16.088C15.7408 16.2732 16.0186 16.4584 16.2963 16.4584C16.4815 16.4584 16.7593 16.3658 16.8519 16.2732C18.7963 14.7917 19.9074 12.4769 20 9.97691C19.9074 7.56951 18.7037 5.2547 16.7593 3.68063Z\" fill=\"#171717\"/>\n <path d=\"M12.5 1.73615C12.2222 1.55096 11.8518 1.55096 11.574 1.73615L5.55554 5.9028H0.925923C0.370369 5.9028 0 6.27317 0 6.82872V13.2176C0 13.7731 0.370369 14.1435 0.925923 14.1435H5.55554L11.4814 18.2176C11.6666 18.3102 11.8518 18.4028 12.037 18.4028C12.5926 18.4028 12.9629 18.0324 12.9629 17.4768V2.56948C12.9629 2.19911 12.7777 1.92133 12.5 1.73615ZM11.1111 15.625L6.38887 12.3843C6.20368 12.2917 6.0185 12.1991 5.83331 12.1991H1.85185V7.75465H5.83331C6.0185 7.75465 6.20368 7.66205 6.38887 7.56946L11.1111 4.32873V15.625Z\" fill=\"#171717\"/>\n </svg>\n ";
|
|
6961
7532
|
if (iconEl) {
|
|
6962
7533
|
if (unmuted) {
|
|
6963
|
-
iconEl.innerHTML =
|
|
7534
|
+
iconEl.innerHTML = chatIcons.unmute;
|
|
6964
7535
|
}
|
|
6965
7536
|
else {
|
|
6966
|
-
iconEl.innerHTML =
|
|
7537
|
+
iconEl.innerHTML = chatIcons.mute;
|
|
6967
7538
|
}
|
|
6968
7539
|
}
|
|
6969
7540
|
}
|
|
@@ -7165,7 +7736,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7165
7736
|
}
|
|
7166
7737
|
}
|
|
7167
7738
|
if (newState === LOW_VOLUME || newState === PERMISSION_DENIED || newState === NO_VOICE_SUPPORT || newState === NOT_SECURE_ORIGIN) {
|
|
7168
|
-
if (
|
|
7739
|
+
if (uiState.textChat.available) {
|
|
7169
7740
|
applyStylesForDefaultState();
|
|
7170
7741
|
}
|
|
7171
7742
|
else {
|
|
@@ -7212,7 +7783,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7212
7783
|
}
|
|
7213
7784
|
}
|
|
7214
7785
|
else if (newState === DISCONNECTED || newState === OFFLINE) {
|
|
7215
|
-
if (
|
|
7786
|
+
if (uiState.textChat.available) {
|
|
7216
7787
|
applyStylesForDefaultState();
|
|
7217
7788
|
}
|
|
7218
7789
|
else {
|
|
@@ -7256,7 +7827,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7256
7827
|
rootEl.classList.remove("alan-btn-offline");
|
|
7257
7828
|
rootEl.classList.remove("alan-btn-no-voice-support");
|
|
7258
7829
|
}
|
|
7259
|
-
if (
|
|
7830
|
+
if (uiState.textChat.available) {
|
|
7260
7831
|
var simpleAlanBtn = document.getElementById("chat-mic-btn");
|
|
7261
7832
|
var sendBtn = document.getElementById("chat-send-btn");
|
|
7262
7833
|
var textChatEl = document.getElementById("alan-text-chat");
|
|
@@ -7264,7 +7835,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7264
7835
|
switch (newState) {
|
|
7265
7836
|
case OFFLINE:
|
|
7266
7837
|
case DISCONNECTED:
|
|
7267
|
-
sendBtn.innerHTML = newState === OFFLINE ?
|
|
7838
|
+
sendBtn.innerHTML = newState === OFFLINE ? chatIcons.noWiFi : chatIcons.disconnected;
|
|
7268
7839
|
textChatEl.classList.add("alan-btn__disconnected");
|
|
7269
7840
|
break;
|
|
7270
7841
|
case LISTENING:
|
|
@@ -7276,7 +7847,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7276
7847
|
default:
|
|
7277
7848
|
textChatEl.classList.remove("alan-btn__mic-active");
|
|
7278
7849
|
textChatEl.classList.remove("alan-btn__disconnected");
|
|
7279
|
-
sendBtn.innerHTML =
|
|
7850
|
+
sendBtn.innerHTML = chatIcons.send;
|
|
7280
7851
|
break;
|
|
7281
7852
|
}
|
|
7282
7853
|
if (simpleAlanBtn) {
|
|
@@ -7291,7 +7862,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7291
7862
|
case PERMISSION_DENIED:
|
|
7292
7863
|
case NO_VOICE_SUPPORT:
|
|
7293
7864
|
case NOT_SECURE_ORIGIN:
|
|
7294
|
-
simpleAlanBtn.innerHTML =
|
|
7865
|
+
simpleAlanBtn.innerHTML = chatIcons.noMic;
|
|
7295
7866
|
if (state === PERMISSION_DENIED) {
|
|
7296
7867
|
simpleAlanBtn.classList.add("alan-btn__disabled");
|
|
7297
7868
|
}
|
|
@@ -7355,43 +7926,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7355
7926
|
}
|
|
7356
7927
|
return "alan-btn-options-" + key;
|
|
7357
7928
|
}
|
|
7358
|
-
function isMobile() {
|
|
7359
|
-
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
|
|
7360
|
-
return true;
|
|
7361
|
-
}
|
|
7362
|
-
return false;
|
|
7363
|
-
}
|
|
7364
|
-
function isIpadOS() {
|
|
7365
|
-
return navigator.maxTouchPoints && navigator.maxTouchPoints > 2 && /MacIntel/.test(navigator.platform);
|
|
7366
|
-
}
|
|
7367
|
-
function isOriginSecure() {
|
|
7368
|
-
var isSecure = false;
|
|
7369
|
-
var protocol2 = window.location.protocol;
|
|
7370
|
-
var hostname = window.location.hostname;
|
|
7371
|
-
if (protocol2 === "https:") {
|
|
7372
|
-
isSecure = true;
|
|
7373
|
-
}
|
|
7374
|
-
if (isFileProtocol()) {
|
|
7375
|
-
isSecure = true;
|
|
7376
|
-
}
|
|
7377
|
-
if (protocol2 === "http:" && (hostname.indexOf("localhost") > -1 || hostname.indexOf("127.0.0.1") > -1)) {
|
|
7378
|
-
isSecure = true;
|
|
7379
|
-
}
|
|
7380
|
-
return isSecure;
|
|
7381
|
-
}
|
|
7382
|
-
function isFileProtocol() {
|
|
7383
|
-
var protocol2 = window.location.protocol;
|
|
7384
|
-
return protocol2 === "file:";
|
|
7385
|
-
}
|
|
7386
|
-
function isAudioSupported() {
|
|
7387
|
-
var available = false, fakeGetUserMedia, fakeContext;
|
|
7388
|
-
fakeGetUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.mediaDevices && navigator.mediaDevices.getUserMedia;
|
|
7389
|
-
fakeContext = window.AudioContext || window.webkitAudioContext || window.mozAudioContext;
|
|
7390
|
-
if (fakeGetUserMedia && fakeContext) {
|
|
7391
|
-
available = true;
|
|
7392
|
-
}
|
|
7393
|
-
return available;
|
|
7394
|
-
}
|
|
7395
7929
|
function showBtn() {
|
|
7396
7930
|
rootEl.innerHTML = "";
|
|
7397
7931
|
recognisedTextHolder.appendChild(recognisedTextContent);
|
|
@@ -7417,10 +7951,10 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7417
7951
|
}
|
|
7418
7952
|
function applyBtnOptions(webOptions) {
|
|
7419
7953
|
if (webOptions) {
|
|
7420
|
-
createAlanStyleSheet(webOptions);
|
|
7954
|
+
createAlanStyleSheet(options2, webOptions);
|
|
7421
7955
|
}
|
|
7422
7956
|
else {
|
|
7423
|
-
createAlanStyleSheet();
|
|
7957
|
+
createAlanStyleSheet(options2);
|
|
7424
7958
|
}
|
|
7425
7959
|
}
|
|
7426
7960
|
function applyLogoOptions(data) {
|
|
@@ -7431,12 +7965,12 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7431
7965
|
replyStateBtnIconImg.src = data.web.logoUrl;
|
|
7432
7966
|
}
|
|
7433
7967
|
else {
|
|
7434
|
-
if (
|
|
7968
|
+
if (uiState.textChat.available) {
|
|
7435
7969
|
if (data.web.logoTextChat) {
|
|
7436
7970
|
defaultStateBtnIconImg.src = data.web.logoTextChat;
|
|
7437
7971
|
}
|
|
7438
7972
|
else {
|
|
7439
|
-
defaultStateBtnIconImg.src = alanLogoIconSrc;
|
|
7973
|
+
defaultStateBtnIconImg.src = btnIcons.alanLogoIconSrc;
|
|
7440
7974
|
}
|
|
7441
7975
|
}
|
|
7442
7976
|
else {
|
|
@@ -7444,7 +7978,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7444
7978
|
defaultStateBtnIconImg.src = data.web.logoIdle;
|
|
7445
7979
|
}
|
|
7446
7980
|
else {
|
|
7447
|
-
defaultStateBtnIconImg.src = micIconSrc;
|
|
7981
|
+
defaultStateBtnIconImg.src = btnIcons.micIconSrc;
|
|
7448
7982
|
}
|
|
7449
7983
|
if (data.web.logoListen) {
|
|
7450
7984
|
listenStateBtnIconImg.src = data.web.logoListen;
|
|
@@ -7531,7 +8065,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7531
8065
|
dndFinalHorPos = isLeftAligned ? rootElPosX : window.innerWidth - rootElPosX - btnSize - (window.innerWidth - document.documentElement.clientWidth);
|
|
7532
8066
|
}
|
|
7533
8067
|
dndBtnLeftPos = rootElPosX;
|
|
7534
|
-
|
|
8068
|
+
dndInitMousePos2 = [
|
|
7535
8069
|
posInfo.clientX,
|
|
7536
8070
|
posInfo.clientY
|
|
7537
8071
|
];
|
|
@@ -7559,10 +8093,10 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7559
8093
|
hideTextChat();
|
|
7560
8094
|
afterMouseMove = true;
|
|
7561
8095
|
}
|
|
7562
|
-
newLeftPos = dndBtnLeftPos + posInfo.clientX -
|
|
7563
|
-
newTopPos = dndBtnTopPos + posInfo.clientY -
|
|
7564
|
-
tempDeltaX = posInfo.clientX -
|
|
7565
|
-
tempDeltaY = posInfo.clientY -
|
|
8096
|
+
newLeftPos = dndBtnLeftPos + posInfo.clientX - dndInitMousePos2[0];
|
|
8097
|
+
newTopPos = dndBtnTopPos + posInfo.clientY - dndInitMousePos2[1];
|
|
8098
|
+
tempDeltaX = posInfo.clientX - dndInitMousePos2[0];
|
|
8099
|
+
tempDeltaY = posInfo.clientY - dndInitMousePos2[1];
|
|
7566
8100
|
rootEl.style.setProperty("left", correctXPos(newLeftPos) + "px", "important");
|
|
7567
8101
|
rootEl.style.setProperty("top", correctYPos(newTopPos) + "px", "important");
|
|
7568
8102
|
e.preventDefault();
|
|
@@ -7693,7 +8227,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7693
8227
|
rootEl.classList.remove("alan-btn__page-scrolled");
|
|
7694
8228
|
}, 300);
|
|
7695
8229
|
function onPageScroll() {
|
|
7696
|
-
if (!
|
|
8230
|
+
if (!uiState.textChat.available || uiState.textChat.available && textChatIsHidden) {
|
|
7697
8231
|
rootEl.classList.add("alan-btn__page-scrolled");
|
|
7698
8232
|
if (!pageScrolled) {
|
|
7699
8233
|
pageScrolled = true;
|
|
@@ -7701,13 +8235,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7701
8235
|
}
|
|
7702
8236
|
managePageScrollFlag({});
|
|
7703
8237
|
}
|
|
7704
|
-
var resizeInProcess = false;
|
|
7705
|
-
var dndInitMousePos = [0, 0];
|
|
7706
|
-
var chatHeight, chatWidth, typeBorderHor, typeBorderVert;
|
|
7707
|
-
var chatInitLeftPos, chatInitRightPos, chatInitTopPos, chatInitBottomPos;
|
|
7708
|
-
var chatTopPosBeforeResize;
|
|
7709
|
-
var chatBottomPosBeforeResize;
|
|
7710
|
-
var chatRightAligned, chatLeftAligned, chatTopAligned, chatBottomAligned;
|
|
7711
8238
|
if (!isMobile()) {
|
|
7712
8239
|
chatHolderDiv.addEventListener("mousedown", onMouseDownForResizeTextChat);
|
|
7713
8240
|
chatHolderDiv.addEventListener("mousemove", onMouseHoverForResizeTextChat);
|
|
@@ -7715,217 +8242,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7715
8242
|
document.addEventListener("mouseup", onMouseUpForResizeTextChat, true);
|
|
7716
8243
|
document.addEventListener("mousemove", onMouseMoveForResizeTextChat, true);
|
|
7717
8244
|
}
|
|
7718
|
-
function onMouseHoverForResizeTextChat(e) {
|
|
7719
|
-
if (resizeInProcess)
|
|
7720
|
-
return;
|
|
7721
|
-
var posInfo = e.touches ? e.touches[0] : e;
|
|
7722
|
-
if (isMouseInHeader(posInfo)) {
|
|
7723
|
-
chatHolderDiv.classList.add("with-hover");
|
|
7724
|
-
}
|
|
7725
|
-
else {
|
|
7726
|
-
chatHolderDiv.classList.remove("with-hover");
|
|
7727
|
-
}
|
|
7728
|
-
typeBorderHor = getBorderType(posInfo).typeBorderHor;
|
|
7729
|
-
typeBorderVert = getBorderType(posInfo).typeBorderVert;
|
|
7730
|
-
chatHolderDiv.classList.remove("none-none");
|
|
7731
|
-
chatHolderDiv.classList.remove("with-cursors");
|
|
7732
|
-
chatHolderDiv.classList.remove("top-left");
|
|
7733
|
-
chatHolderDiv.classList.remove("top-right");
|
|
7734
|
-
chatHolderDiv.classList.remove("bottom-left");
|
|
7735
|
-
chatHolderDiv.classList.remove("bottom-right");
|
|
7736
|
-
chatHolderDiv.classList.remove("none-left");
|
|
7737
|
-
chatHolderDiv.classList.remove("none-right");
|
|
7738
|
-
chatHolderDiv.classList.remove("top-none");
|
|
7739
|
-
chatHolderDiv.classList.remove("bottom-none");
|
|
7740
|
-
chatHolderDiv.classList.add(typeBorderHor + "-" + typeBorderVert);
|
|
7741
|
-
if (typeBorderHor !== "none" || typeBorderVert !== "none") {
|
|
7742
|
-
chatHolderDiv.classList.add("with-cursors");
|
|
7743
|
-
}
|
|
7744
|
-
}
|
|
7745
|
-
function onMouseDownForResizeTextChat(e) {
|
|
7746
|
-
resizeInProcess = true;
|
|
7747
|
-
var posInfo = e.touches ? e.touches[0] : e;
|
|
7748
|
-
dndInitMousePos = [
|
|
7749
|
-
posInfo.clientX,
|
|
7750
|
-
posInfo.clientY
|
|
7751
|
-
];
|
|
7752
|
-
var chatRect = chatHolderDiv.getBoundingClientRect();
|
|
7753
|
-
chatHeight = chatRect.height;
|
|
7754
|
-
chatWidth = chatRect.width;
|
|
7755
|
-
typeBorderHor = getBorderType(posInfo).typeBorderHor;
|
|
7756
|
-
typeBorderVert = getBorderType(posInfo).typeBorderVert;
|
|
7757
|
-
chatInitLeftPos = parseInt(chatHolderDiv.style.left);
|
|
7758
|
-
chatInitRightPos = parseInt(chatHolderDiv.style.right);
|
|
7759
|
-
chatInitTopPos = parseInt(chatHolderDiv.style.top);
|
|
7760
|
-
chatInitBottomPos = parseInt(chatHolderDiv.style.bottom);
|
|
7761
|
-
chatTopPosBeforeResize = chatRect.top;
|
|
7762
|
-
chatBottomPosBeforeResize = chatRect.bottom;
|
|
7763
|
-
chatRightAligned = chatHolderDiv.style.right;
|
|
7764
|
-
chatLeftAligned = chatHolderDiv.style.left;
|
|
7765
|
-
chatTopAligned = chatHolderDiv.style.top;
|
|
7766
|
-
chatBottomAligned = chatHolderDiv.style.bottom;
|
|
7767
|
-
}
|
|
7768
|
-
function onMouseUpForResizeTextChat() {
|
|
7769
|
-
resizeInProcess = false;
|
|
7770
|
-
}
|
|
7771
|
-
function onMouseMoveForResizeTextChat(e) {
|
|
7772
|
-
if (!resizeInProcess)
|
|
7773
|
-
return;
|
|
7774
|
-
var posInfo = e.touches ? e.touches[0] : e;
|
|
7775
|
-
if (posInfo.clientX >= 0 && posInfo.clientY >= 0 && posInfo.clientX <= window.innerWidth && posInfo.clientY <= window.innerHeight) {
|
|
7776
|
-
resizeTextChat(posInfo);
|
|
7777
|
-
}
|
|
7778
|
-
else {
|
|
7779
|
-
resizeInProcess = false;
|
|
7780
|
-
}
|
|
7781
|
-
}
|
|
7782
|
-
function resizeTextChat(posInfo) {
|
|
7783
|
-
var tempDeltaX2 = posInfo.clientX - dndInitMousePos[0];
|
|
7784
|
-
var tempDeltaY2 = posInfo.clientY - dndInitMousePos[1];
|
|
7785
|
-
if (typeBorderHor === "bottom") {
|
|
7786
|
-
if (canResizeByHeight(typeBorderHor, tempDeltaY2)) {
|
|
7787
|
-
setChatHeight(chatHeight + tempDeltaY2);
|
|
7788
|
-
changeBottomPosIfNeeded(tempDeltaY2);
|
|
7789
|
-
}
|
|
7790
|
-
}
|
|
7791
|
-
else if (typeBorderHor === "top") {
|
|
7792
|
-
if (canResizeByHeight(typeBorderHor, tempDeltaY2)) {
|
|
7793
|
-
setChatHeight(chatHeight - tempDeltaY2);
|
|
7794
|
-
changeTopPosIfNeeded(tempDeltaY2);
|
|
7795
|
-
}
|
|
7796
|
-
}
|
|
7797
|
-
if (typeBorderVert === "right") {
|
|
7798
|
-
if (canResizeByWidth(typeBorderVert, tempDeltaX2)) {
|
|
7799
|
-
setChatWidth(chatWidth + tempDeltaX2);
|
|
7800
|
-
changeRightPosIfNeeded(tempDeltaX2);
|
|
7801
|
-
}
|
|
7802
|
-
}
|
|
7803
|
-
else if (typeBorderVert === "left") {
|
|
7804
|
-
if (canResizeByWidth(typeBorderVert, tempDeltaX2)) {
|
|
7805
|
-
setChatWidth(chatWidth - tempDeltaX2);
|
|
7806
|
-
changeLeftPosIfNeeded(tempDeltaX2);
|
|
7807
|
-
}
|
|
7808
|
-
}
|
|
7809
|
-
}
|
|
7810
|
-
function canResizeByHeight(borderType, delta) {
|
|
7811
|
-
var _a;
|
|
7812
|
-
var minChatHeight = ((_a = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _a === void 0 ? void 0 : _a.minHeight) || defaultMinChatHeight;
|
|
7813
|
-
var expanding = borderType === "bottom" && delta > 0 || borderType === "top" && delta < 0;
|
|
7814
|
-
var h = borderType === "bottom" ? chatHeight + delta : chatHeight - delta;
|
|
7815
|
-
var newBottomtPos = chatBottomPosBeforeResize - delta;
|
|
7816
|
-
var newTopPos = chatTopPosBeforeResize + delta;
|
|
7817
|
-
if (borderType === "bottom" && newBottomtPos <= 0 && h >= chatHeight) {
|
|
7818
|
-
return false;
|
|
7819
|
-
}
|
|
7820
|
-
if (borderType === "top" && newTopPos <= 0 && h >= chatHeight) {
|
|
7821
|
-
return false;
|
|
7822
|
-
}
|
|
7823
|
-
return expanding ? h >= minChatHeight : h > minChatHeight;
|
|
7824
|
-
}
|
|
7825
|
-
function canResizeByWidth(borderType, delta) {
|
|
7826
|
-
var _a;
|
|
7827
|
-
var minChatWidth = ((_a = textChatOptions === null || textChatOptions === void 0 ? void 0 : textChatOptions.popup) === null || _a === void 0 ? void 0 : _a.minWidth) || defaultMinChatWidth;
|
|
7828
|
-
var expanding = borderType === "right" && delta > 0 || borderType === "left" && delta < 0;
|
|
7829
|
-
var w = borderType === "right" ? chatWidth + delta : chatWidth - delta;
|
|
7830
|
-
var newRightPos = chatInitRightPos - delta;
|
|
7831
|
-
var newLeftPos = chatInitLeftPos + delta;
|
|
7832
|
-
if (borderType === "right" && newRightPos <= 0 && w >= chatWidth) {
|
|
7833
|
-
return false;
|
|
7834
|
-
}
|
|
7835
|
-
if (borderType === "left" && newLeftPos <= 0 && w >= chatWidth) {
|
|
7836
|
-
return false;
|
|
7837
|
-
}
|
|
7838
|
-
return expanding ? w >= minChatWidth : w > minChatWidth;
|
|
7839
|
-
}
|
|
7840
|
-
function setChatHeight(h) {
|
|
7841
|
-
chatHolderDiv.style.height = h + "px";
|
|
7842
|
-
saveTextChatSizeAfterResize("height", h);
|
|
7843
|
-
}
|
|
7844
|
-
function setChatWidth(w) {
|
|
7845
|
-
chatHolderDiv.style.width = w + "px";
|
|
7846
|
-
if (w < 300) {
|
|
7847
|
-
chatHolderDiv.classList.add("alan-chat-small");
|
|
7848
|
-
}
|
|
7849
|
-
else {
|
|
7850
|
-
chatHolderDiv.classList.remove("alan-chat-small");
|
|
7851
|
-
}
|
|
7852
|
-
saveTextChatSizeAfterResize("width", w);
|
|
7853
|
-
}
|
|
7854
|
-
function changeBottomPosIfNeeded(delta) {
|
|
7855
|
-
if (chatBottomAligned) {
|
|
7856
|
-
saveTextChatPositionAfterResize("bottom", chatInitBottomPos - delta);
|
|
7857
|
-
}
|
|
7858
|
-
}
|
|
7859
|
-
function changeTopPosIfNeeded(delta) {
|
|
7860
|
-
if (chatTopAligned) {
|
|
7861
|
-
saveTextChatPositionAfterResize("top", chatInitTopPos + delta);
|
|
7862
|
-
}
|
|
7863
|
-
}
|
|
7864
|
-
function changeRightPosIfNeeded(delta) {
|
|
7865
|
-
if (chatRightAligned) {
|
|
7866
|
-
saveTextChatPositionAfterResize("right", chatInitRightPos - delta);
|
|
7867
|
-
}
|
|
7868
|
-
}
|
|
7869
|
-
function changeLeftPosIfNeeded(delta) {
|
|
7870
|
-
if (chatLeftAligned) {
|
|
7871
|
-
saveTextChatPositionAfterResize("left", chatInitLeftPos + delta);
|
|
7872
|
-
}
|
|
7873
|
-
}
|
|
7874
|
-
function getKeyForSavingTextChatPositionAfterResize(prop) {
|
|
7875
|
-
return "alan-btn-text-chat-pos-".concat(prop, "-").concat(getProjectId());
|
|
7876
|
-
}
|
|
7877
|
-
function saveTextChatPositionAfterResize(prop, val) {
|
|
7878
|
-
if (val < 0)
|
|
7879
|
-
return;
|
|
7880
|
-
chatHolderDiv.style[prop] = val + "px";
|
|
7881
|
-
if (isLocalStorageAvailable) {
|
|
7882
|
-
localStorage.setItem(getKeyForSavingTextChatPositionAfterResize(prop), val);
|
|
7883
|
-
}
|
|
7884
|
-
}
|
|
7885
|
-
function getTextChatSizeAfterResize(prop) {
|
|
7886
|
-
if (isLocalStorageAvailable) {
|
|
7887
|
-
return localStorage.getItem(getKeyForSavingTextChatPositionAfterResize(prop));
|
|
7888
|
-
}
|
|
7889
|
-
return null;
|
|
7890
|
-
}
|
|
7891
|
-
function saveTextChatSizeAfterResize(prop, val) {
|
|
7892
|
-
if (isLocalStorageAvailable) {
|
|
7893
|
-
localStorage.setItem(getKeyForSavingTextChatPositionAfterResize(prop), val);
|
|
7894
|
-
}
|
|
7895
|
-
}
|
|
7896
|
-
function getTextChatPositionAfterResize(prop) {
|
|
7897
|
-
if (isLocalStorageAvailable) {
|
|
7898
|
-
return localStorage.getItem(getKeyForSavingTextChatPositionAfterResize(prop));
|
|
7899
|
-
}
|
|
7900
|
-
return null;
|
|
7901
|
-
}
|
|
7902
|
-
function isMouseInHeader(posInfo) {
|
|
7903
|
-
if (chatHolderDiv.getBoundingClientRect().top < posInfo.clientY && posInfo.clientY < chatHolderDiv.getBoundingClientRect().top + 60 && chatHolderDiv.getBoundingClientRect().left < posInfo.clientX && posInfo.clientX < chatHolderDiv.getBoundingClientRect().right) {
|
|
7904
|
-
return true;
|
|
7905
|
-
}
|
|
7906
|
-
return false;
|
|
7907
|
-
}
|
|
7908
|
-
function getBorderType(posInfo) {
|
|
7909
|
-
if (Math.abs(chatHolderDiv.getBoundingClientRect().bottom - posInfo.clientY) < 10) {
|
|
7910
|
-
typeBorderHor = "bottom";
|
|
7911
|
-
}
|
|
7912
|
-
else if (Math.abs(chatHolderDiv.getBoundingClientRect().top - posInfo.clientY) < 10) {
|
|
7913
|
-
typeBorderHor = "top";
|
|
7914
|
-
}
|
|
7915
|
-
else {
|
|
7916
|
-
typeBorderHor = "none";
|
|
7917
|
-
}
|
|
7918
|
-
if (Math.abs(chatHolderDiv.getBoundingClientRect().left - posInfo.clientX) < 10) {
|
|
7919
|
-
typeBorderVert = "left";
|
|
7920
|
-
}
|
|
7921
|
-
else if (Math.abs(chatHolderDiv.getBoundingClientRect().right - posInfo.clientX) < 10) {
|
|
7922
|
-
typeBorderVert = "right";
|
|
7923
|
-
}
|
|
7924
|
-
else {
|
|
7925
|
-
typeBorderVert = "none";
|
|
7926
|
-
}
|
|
7927
|
-
return { typeBorderHor: typeBorderHor, typeBorderVert: typeBorderVert };
|
|
7928
|
-
}
|
|
7929
8245
|
return btnInstance;
|
|
7930
8246
|
}
|
|
7931
8247
|
ns.alanBtn = alanBtn;
|