@axos-web-dev/shared-components 2.0.0-dev.28 → 2.0.0-dev.29-toasts

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.
Files changed (224) hide show
  1. package/dist/ATMLocator/ATMLocator.js +7 -2
  2. package/dist/Article/Article.css.d.ts +8 -4
  3. package/dist/ArticlesSet/ArticlesSet.css.d.ts +23 -1
  4. package/dist/ArticlesSet/ArticlesSet.css.js +7 -7
  5. package/dist/ArticlesSet/ArticlesSet.js +3 -4
  6. package/dist/Auth/ErrorAlert.js +8 -3
  7. package/dist/Auth/SignInPassword.js +1 -1
  8. package/dist/AwardsItem/AwardsItem.js +2 -2
  9. package/dist/Button/Button.js +26 -3
  10. package/dist/Calculators/ApyCalculatorUserTest/ApyCalculatorUserTest.css.d.ts +95 -0
  11. package/dist/Calculators/ApyCalculatorUserTest/ApyCalculatorUserTest.css.js +101 -0
  12. package/dist/Calculators/ApyCalculatorUserTest/index.d.ts +12 -0
  13. package/dist/Calculators/ApyCalculatorUserTest/index.js +618 -0
  14. package/dist/Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js +2 -1
  15. package/dist/Calculators/Calculator.js +18 -3
  16. package/dist/Calculators/MarginTradingCalculator/index.js +7 -2
  17. package/dist/Calculators/index.d.ts +1 -0
  18. package/dist/Calculators/index.js +2 -0
  19. package/dist/Carousel/index.js +7 -2
  20. package/dist/Chatbot/AnimatedGradientBorder.css.d.ts +1 -0
  21. package/dist/Chatbot/AnimatedGradientBorder.css.js +2 -0
  22. package/dist/Chatbot/AudioManager.d.ts +19 -0
  23. package/dist/Chatbot/AudioManager.js +61 -0
  24. package/dist/Chatbot/Bubble.css.js +2 -2
  25. package/dist/Chatbot/Bubble.js +2 -11
  26. package/dist/Chatbot/ChatWindow.css.d.ts +4 -0
  27. package/dist/Chatbot/ChatWindow.css.js +44 -36
  28. package/dist/Chatbot/ChatWindow.js +461 -372
  29. package/dist/Chatbot/Chatbot.css.js +0 -1
  30. package/dist/Chatbot/Chatbot.css.ts.vanilla.css.js +1 -0
  31. package/dist/Chatbot/Chatbot.d.ts +3 -0
  32. package/dist/Chatbot/Chatbot.js +113 -41
  33. package/dist/Chatbot/ChatbotMessage.js +183 -197
  34. package/dist/Chatbot/EllipsisAnimation.js +0 -6
  35. package/dist/Chatbot/ExpandChatToggle.d.ts +8 -0
  36. package/dist/Chatbot/ExpandChatToggle.js +74 -0
  37. package/dist/Chatbot/index.js +7 -2
  38. package/dist/Chatbot/store/chat.d.ts +8 -0
  39. package/dist/Chatbot/store/chat.js +14 -2
  40. package/dist/Chevron/Chevron.interface.d.ts +1 -0
  41. package/dist/Chevron/index.js +12 -3
  42. package/dist/Comparison/Comparison.css.d.ts +1 -0
  43. package/dist/Comparison/Comparison.css.js +16 -13
  44. package/dist/Comparison/Comparison.js +7 -2
  45. package/dist/Comparison/ComparisonSet.js +2 -1
  46. package/dist/Comparison/index.js +2 -1
  47. package/dist/ExecutiveBio/ExecutiveBio.css.d.ts +27 -0
  48. package/dist/ExecutiveBio/ExecutiveBio.js +281 -262
  49. package/dist/FaqAccordion/index.js +7 -2
  50. package/dist/FdicCallout/index.js +2 -1
  51. package/dist/FooterDisclosure/FooterDisclosure.js +1 -0
  52. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +670 -659
  53. package/dist/Forms/ApplyNow.js +7 -2
  54. package/dist/Forms/CommercialDepositsACS.d.ts +3 -0
  55. package/dist/Forms/CommercialDepositsACS.js +278 -0
  56. package/dist/Forms/ContactUsBusiness.js +9 -4
  57. package/dist/Forms/ContactUsBusinessNameEmail.js +9 -4
  58. package/dist/Forms/ContactUsNMLSId.js +9 -4
  59. package/dist/Forms/ContactUsSchwabAAS.d.ts +11 -0
  60. package/dist/Forms/ContactUsSchwabAAS.js +263 -0
  61. package/dist/Forms/CpraRequest.js +8 -3
  62. package/dist/Forms/CraPublicFile.js +9 -4
  63. package/dist/Forms/EmailOnly.js +10 -5
  64. package/dist/Forms/Forms.css.d.ts +3 -0
  65. package/dist/Forms/MortgageRate/MortgageRateForm.js +7 -2
  66. package/dist/Forms/MortgageRate/MortgageRateWatch.js +7 -2
  67. package/dist/Forms/MortgageWarehouseLending.d.ts +1 -1
  68. package/dist/Forms/MortgageWarehouseLending.js +16 -11
  69. package/dist/Forms/SuccesForm.js +8 -3
  70. package/dist/Forms/index.d.ts +2 -0
  71. package/dist/Forms/index.js +4 -0
  72. package/dist/HeroBanner/HeroBanner.d.ts +1 -1
  73. package/dist/HeroBanner/HeroBanner.interface.d.ts +2 -0
  74. package/dist/HeroBanner/HeroBanner.js +33 -28
  75. package/dist/Hyperlink/index.js +9 -4
  76. package/dist/IconBillboard/IconBillboard.css.d.ts +16 -0
  77. package/dist/IconBillboard/IconBillboard.css.js +7 -4
  78. package/dist/IconBillboard/IconBillboard.interface.d.ts +2 -0
  79. package/dist/IconBillboard/IconBillboardSet.js +68 -62
  80. package/dist/IconBillboard/index.js +2 -1
  81. package/dist/IconBillboard/sections/CallToActionSection.js +3 -1
  82. package/dist/ImageBillboard/ImageBillboard.interface.d.ts +2 -0
  83. package/dist/ImageBillboard/ImageBillboardSet.d.ts +1 -1
  84. package/dist/ImageBillboard/ImageBillboardSet.js +28 -20
  85. package/dist/ImageLink/ImageLink.js +7 -2
  86. package/dist/ImageLink/ImageLinkSet.js +7 -2
  87. package/dist/ImageLink/index.js +8 -3
  88. package/dist/ImageToast/ImageToast.css.d.ts +5 -0
  89. package/dist/ImageToast/ImageToast.css.js +13 -0
  90. package/dist/ImageToast/index.d.ts +9 -0
  91. package/dist/{NavigationMenu/Navbar.js → ImageToast/index.js} +82 -93
  92. package/dist/Insight/Featured/CategorySelector.d.ts +1 -1
  93. package/dist/Insight/Featured/CategorySelector.js +10 -4
  94. package/dist/Insight/Featured/Featured.js +7 -2
  95. package/dist/Insight/Featured/Header.d.ts +1 -2
  96. package/dist/Insight/Featured/Header.js +7 -2
  97. package/dist/LandingPageHeader/LandingPageHeader.js +25 -16
  98. package/dist/Modal/Modal.js +8 -3
  99. package/dist/Modal/contextApi/store.d.ts +6 -1
  100. package/dist/Modal/contextApi/store.js +112 -6
  101. package/dist/NavigationMenu/AxosALTS/NavBar.module.js +23 -23
  102. package/dist/NavigationMenu/AxosALTS/index.js +42 -23
  103. package/dist/NavigationMenu/AxosAdvisor/NavBar.module.js +52 -52
  104. package/dist/NavigationMenu/AxosAdvisor/index.js +1 -1
  105. package/dist/NavigationMenu/AxosAdvisorServices/NavBar.module.js +53 -53
  106. package/dist/NavigationMenu/AxosAdvisorServices/index.js +31 -24
  107. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.js +7 -2
  108. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.d.ts +3 -9
  109. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +13 -25
  110. package/dist/NavigationMenu/AxosBank/SubNavBar.js +37 -116
  111. package/dist/NavigationMenu/AxosBank/index.js +58 -39
  112. package/dist/NavigationMenu/AxosClearing/NavBar.module.js +37 -37
  113. package/dist/NavigationMenu/AxosClearing/SubNavBar.js +6 -6
  114. package/dist/NavigationMenu/AxosClearing/index.js +31 -16
  115. package/dist/NavigationMenu/AxosFiduciary/NavBar.module.js +40 -43
  116. package/dist/NavigationMenu/AxosFiduciary/index.js +5 -3
  117. package/dist/NavigationMenu/LaVictoire/index.js +8 -3
  118. package/dist/NavigationMenu/NavItem/index.js +141 -1
  119. package/dist/NavigationMenu/ServerNavigation/DropwdownButton.d.ts +7 -0
  120. package/dist/NavigationMenu/ServerNavigation/DropwdownButton.js +248 -0
  121. package/dist/NavigationMenu/ServerNavigation/Menu.d.ts +40 -0
  122. package/dist/NavigationMenu/ServerNavigation/Menu.js +268 -0
  123. package/dist/NavigationMenu/ServerNavigation/MobileMenu/MobileMenu.d.ts +13 -0
  124. package/dist/NavigationMenu/ServerNavigation/MobileMenu/MobileMenu.js +637 -0
  125. package/dist/NavigationMenu/ServerNavigation/MobileMenu/MobileMenu.module.js +86 -0
  126. package/dist/NavigationMenu/ServerNavigation/MobileMenu/MobileNavData.d.ts +51 -0
  127. package/dist/NavigationMenu/ServerNavigation/MobileMenu/MobileNavData.js +96 -0
  128. package/dist/NavigationMenu/ServerNavigation/MobileMenu/mobileReducer.d.ts +36 -0
  129. package/dist/NavigationMenu/ServerNavigation/MobileMenu/mobileReducer.js +105 -0
  130. package/dist/NavigationMenu/ServerNavigation/NavBar.module.js +125 -0
  131. package/dist/NavigationMenu/ServerNavigation/NavigationBar.css.d.ts +7 -0
  132. package/dist/NavigationMenu/ServerNavigation/NavigationBar.css.js +22 -0
  133. package/dist/NavigationMenu/ServerNavigation/SubNavBar.d.ts +6 -0
  134. package/dist/NavigationMenu/ServerNavigation/SubNavBar.js +281 -0
  135. package/dist/NavigationMenu/ServerNavigation/SubNavItem.d.ts +1 -0
  136. package/dist/NavigationMenu/ServerNavigation/SubNavItem.js +317 -0
  137. package/dist/NavigationMenu/ServerNavigation/SubNavbar.css.d.ts +60 -0
  138. package/dist/NavigationMenu/ServerNavigation/SubNavbar.css.js +22 -0
  139. package/dist/NavigationMenu/ServerNavigation/index.d.ts +7 -0
  140. package/dist/NavigationMenu/ServerNavigation/index.js +297 -0
  141. package/dist/NavigationMenu/index.d.ts +2 -0
  142. package/dist/NavigationMenu/index.js +19 -10
  143. package/dist/NavigationMenu/utils.d.ts +480 -0
  144. package/dist/NavigationMenu/utils.js +128 -0
  145. package/dist/PageNavSet/PageNavSet.js +16 -8
  146. package/dist/SecondaryFooter/index.js +8 -1
  147. package/dist/SetContainer/SetContainer.css.d.ts +3 -0
  148. package/dist/SetContainer/SetContainer.js +14 -3
  149. package/dist/SocialMediaBar/iconsRepository.js +8 -3
  150. package/dist/SocialMediaBar/index.js +1 -1
  151. package/dist/StepItemSet/StepItemSet.css.d.ts +3 -0
  152. package/dist/Table/Table.css.d.ts +14 -1
  153. package/dist/Table/Table.css.js +21 -19
  154. package/dist/Table/Table.d.ts +1 -1
  155. package/dist/Table/Table.js +5 -3
  156. package/dist/TopicalNavItem/TopicalNavItem.css.d.ts +0 -1
  157. package/dist/TopicalNavItem/TopicalNavItem.css.js +2 -4
  158. package/dist/TopicalNavItem/TopicalNavItem.js +11 -33
  159. package/dist/TopicalNavItem/index.js +1 -2
  160. package/dist/TopicalNavSet/TopicalNavSet.js +17 -9
  161. package/dist/VideoTile/VideoTile.js +7 -2
  162. package/dist/VideoWrapper/index.js +8 -3
  163. package/dist/assets/Article/Article.css +8 -4
  164. package/dist/assets/ArticlesSet/ArticlesSet.css +54 -39
  165. package/dist/assets/Auth/SignIn.css +2 -1
  166. package/dist/assets/Calculators/ApyCalculatorUserTest/ApyCalculatorUserTest.css +424 -0
  167. package/dist/assets/Calculators/AxosOneCalculator/BalanceAPYCalculator.css +2 -2
  168. package/dist/assets/CallToActionBar/CallToActionBar.css +2 -0
  169. package/dist/assets/Chatbot/AnimatedGradientBorder.css +19 -19
  170. package/dist/assets/Chatbot/Bubble.css +7 -2
  171. package/dist/assets/Chatbot/ChatWindow.css +155 -98
  172. package/dist/assets/Comparison/Comparison.css +32 -29
  173. package/dist/assets/DownloadTile/DownloadTile.css +0 -5
  174. package/dist/assets/ExecutiveBio/ExecutiveBio.css +55 -17
  175. package/dist/assets/FaqAccordion/FaqAccordion.css +1 -1
  176. package/dist/assets/FooterSiteMap/AxosBank/FooterSiteMap.css +2 -2
  177. package/dist/assets/Forms/Forms.css +3 -2
  178. package/dist/assets/HeroBanner/HeroBanner.css +1 -0
  179. package/dist/assets/IconBillboard/IconBillboard.css +64 -13
  180. package/dist/assets/ImageToast/ImageToast.css +39 -0
  181. package/dist/assets/Insight/Featured/Header.css +4 -2
  182. package/dist/assets/NavigationMenu/AxosALTS/NavBar.css +265 -264
  183. package/dist/assets/NavigationMenu/AxosAdvisor/NavBar.css +609 -609
  184. package/dist/assets/NavigationMenu/AxosAdvisorServices/NavBar.css +631 -630
  185. package/dist/assets/NavigationMenu/AxosClearing/NavBar.css +485 -484
  186. package/dist/assets/NavigationMenu/AxosFiduciary/NavBar.css +428 -427
  187. package/dist/assets/NavigationMenu/ServerNavigation/MobileMenu/MobileMenu.css +353 -0
  188. package/dist/assets/NavigationMenu/ServerNavigation/NavBar.css +483 -0
  189. package/dist/assets/NavigationMenu/ServerNavigation/NavigationBar.css +40 -0
  190. package/dist/assets/NavigationMenu/ServerNavigation/SubNavbar.css +87 -0
  191. package/dist/assets/SetContainer/SetContainer.css +7 -10
  192. package/dist/assets/SocialMediaBar/SocialMediaBar.css +1 -0
  193. package/dist/assets/StepItemSet/StepItemSet.css +3 -3
  194. package/dist/assets/Table/Table.css +82 -77
  195. package/dist/assets/TopicalNavItem/TopicalNavItem.css +25 -52
  196. package/dist/assets/TopicalNavSet/TopicalNavSet.css +28 -6
  197. package/dist/assets/VideoTile/VideoTile.css +3 -0
  198. package/dist/assets/globals.css +34 -2
  199. package/dist/assets/themes/axos.css +8 -7
  200. package/dist/assets/themes/premier.css +9 -8
  201. package/dist/assets/themes/ufb.css +9 -8
  202. package/dist/assets/themes/victorie.css +9 -8
  203. package/dist/globals.css.js +8 -1
  204. package/dist/icons/QuoteIconGrey.js +1 -0
  205. package/dist/icons/QuoteIconWhite.js +1 -0
  206. package/dist/icons/QuoteIconYellow.js +1 -0
  207. package/dist/index.css.js +8 -1
  208. package/dist/main.js +40 -17
  209. package/dist/themes/axos.css.d.ts +1 -0
  210. package/dist/themes/axos.css.js +1 -1
  211. package/dist/utils/allowedAxosDomains.js +8 -13
  212. package/dist/utils/appendQueryParams.d.ts +3 -1
  213. package/dist/utils/appendQueryParams.js +66 -66
  214. package/dist/utils/index.js +3 -1
  215. package/dist/utils/tealiumOrganicFallback.d.ts +21 -0
  216. package/dist/utils/tealiumOrganicFallback.js +26 -0
  217. package/dist/utils/useVisibility.d.ts +1 -0
  218. package/dist/utils/useVisibility.js +21 -0
  219. package/dist/vite-env.d.js +1 -0
  220. package/package.json +2 -2
  221. package/dist/NavigationMenu/Navbar.d.ts +0 -5
  222. package/dist/NavigationMenu/SignInNavButton.d.ts +0 -1
  223. package/dist/NavigationMenu/SignInNavButton.js +0 -363
  224. package/dist/assets/Chatbot/Chatbot.css +0 -3
@@ -1,17 +1,19 @@
1
1
  "use client";
2
2
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
3
+ import { LoadingIndicator } from "../LoadingIndicator/index.js";
3
4
  import { vars } from "../themes/axos.css.js";
4
5
  import '../assets/themes/victorie.css';import '../assets/themes/ufb.css';import '../assets/themes/premier.css';import '../assets/themes/axos.css';/* empty css */
5
6
  /* empty css */
6
7
  /* empty css */
7
8
  /* empty css */
8
9
  import clsx from "clsx";
9
- import React, { useRef, useEffect } from "react";
10
+ import React, { useRef, useState, useEffect } from "react";
10
11
  import { useNetworkState, useMount } from "react-use";
11
- import { gradientFocus } from "./AnimatedGradientBorder.css.js";
12
+ import { focusAnimation, gradientFocus } from "./AnimatedGradientBorder.css.js";
12
13
  import { ChatbotMessage } from "./ChatbotMessage.js";
13
- import { windowBarStyle, left_bar_section, chat_title, button_bar, chatbotMenuItem, chatbotMenu, chatEndDialogOverlay, chatFinishDialog, chatEndCircle, endChatButtonStyle, noAnswerButton, arrowFill, button_reset, buttonss_section, chatNetworkStatus, shimmerText, messagesContainerStyle, inputStyle, autoResize, sendButtonStyle, windowStyle, windowOpenStyle } from "./ChatWindow.css.js";
14
+ import { windowBarStyle, left_bar_section, chat_title, button_bar, chatbotMenuItem, chatbotMenu, chatEndDialogOverlay, chatFinishDialog, chatEndCircle, endChatButtonStyle, noAnswerButton, arrowFill, button_reset, buttonss_section, chatNetworkStatus, shimmerText, messagesContainerStyle, formTextButton, inputStyle, autoResize, sendButtonStyle, chatAiDisclaimer, windowStyle, windowOpenStyle, windowExpandedStyle } from "./ChatWindow.css.js";
14
15
  import { EllipsisIcon } from "./EllipsisIcon.js";
16
+ import { ExpandChatToggle } from "./ExpandChatToggle.js";
15
17
  import { useOpenChat } from "./store/chat.js";
16
18
  import { ThankYouMessage } from "./ThankYouMessage.js";
17
19
  const ChatWindow = ({
@@ -39,12 +41,15 @@ const ChatWindow = ({
39
41
  }) => {
40
42
  const {
41
43
  showThankyouMessage,
42
- displayThankyouMessage,
43
44
  toggleThankyouMessage,
44
45
  hasEscalated,
45
46
  isBlockedInput,
46
47
  isOpen,
47
- hasOpenedOnce
48
+ hasOpenedOnce,
49
+ chatStatus,
50
+ setChatStatus,
51
+ isWindowExpanded,
52
+ toggleWindowExpanded
48
53
  } = useOpenChat();
49
54
  const [mounted, setMounted] = React.useState(false);
50
55
  const [menuOpen, setMenuOpen] = React.useState(false);
@@ -53,6 +58,7 @@ const ChatWindow = ({
53
58
  const [input, setInput] = React.useState("");
54
59
  const messagesEndRef = useRef(null);
55
60
  const inputRef = useRef(null);
61
+ const [focused, setFocused] = useState(false);
56
62
  useEffect(() => {
57
63
  messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
58
64
  }, [messages]);
@@ -83,9 +89,6 @@ const ChatWindow = ({
83
89
  useEffect(() => {
84
90
  autoResizeTextarea();
85
91
  }, [input]);
86
- const displayThankYouScreen = () => {
87
- displayThankyouMessage();
88
- };
89
92
  const onCancelEndChat = () => {
90
93
  setShowEndChatDialog(false);
91
94
  toggleThankyouMessage?.();
@@ -102,102 +105,177 @@ const ChatWindow = ({
102
105
  inputRef.current.focus();
103
106
  }
104
107
  }, [messages]);
105
- return /* @__PURE__ */ jsxs("div", { className: clsx(windowStyle, isOpen && windowOpenStyle), children: [
106
- /* @__PURE__ */ jsxs("div", { className: windowBarStyle, children: [
107
- /* @__PURE__ */ jsx("div", { className: clsx(left_bar_section) }),
108
- /* @__PURE__ */ jsxs(
109
- "div",
110
- {
111
- className: "flex middle center",
112
- style: { paddingBlock: "6px", gap: 4 },
113
- children: [
114
- /* @__PURE__ */ jsxs(
115
- "svg",
108
+ return /* @__PURE__ */ jsxs(
109
+ "div",
110
+ {
111
+ className: clsx(
112
+ windowStyle,
113
+ isOpen && windowOpenStyle,
114
+ isWindowExpanded && windowExpandedStyle
115
+ ),
116
+ children: [
117
+ /* @__PURE__ */ jsxs("div", { className: windowBarStyle, children: [
118
+ /* @__PURE__ */ jsx("div", { className: clsx(left_bar_section), children: /* @__PURE__ */ jsx(
119
+ ExpandChatToggle,
120
+ {
121
+ isExpanded: isWindowExpanded,
122
+ onToggle: toggleWindowExpanded
123
+ }
124
+ ) }),
125
+ /* @__PURE__ */ jsxs(
126
+ "div",
127
+ {
128
+ className: "flex middle center",
129
+ style: { paddingBlock: "6px", gap: 4 },
130
+ children: [
131
+ /* @__PURE__ */ jsxs(
132
+ "svg",
133
+ {
134
+ xmlns: "http://www.w3.org/2000/svg",
135
+ width: "20",
136
+ height: "17",
137
+ viewBox: "0 0 20 17",
138
+ fill: "none",
139
+ "aria-hidden": "true",
140
+ children: [
141
+ /* @__PURE__ */ jsx(
142
+ "path",
143
+ {
144
+ d: "M10.5277 2.78937C10.8911 2.78937 11.1852 3.08251 11.1853 3.44452C11.1852 3.80654 10.8911 4.10056 10.5277 4.10056H5.26386C4.5371 4.10064 3.94791 4.68761 3.94789 5.41175V10.6565C3.9479 11.3806 4.5371 11.9676 5.26386 11.9677H6.97488C7.12012 11.9678 7.23818 12.0854 7.23825 12.2301V15.6861L10.8932 12.0445C10.9424 11.9956 11.0092 11.9679 11.0786 11.9677H14.4765C15.2032 11.9676 15.7925 11.3806 15.7925 10.6565V9.27302C15.7925 8.91106 16.0868 8.61721 16.45 8.61697C16.8134 8.61699 17.1084 8.91093 17.1084 9.27302V10.6565C17.1084 12.1048 15.9301 13.2788 14.4765 13.2789H11.5149L8.16901 16.6135C7.33997 17.4393 5.92245 16.8542 5.92229 15.6861V13.2789H5.26386C3.81026 13.2788 2.63193 12.1048 2.63193 10.6565V5.41175C2.63194 3.96341 3.81027 2.78945 5.26386 2.78937H10.5277Z",
145
+ fill: "#1E3860"
146
+ }
147
+ ),
148
+ /* @__PURE__ */ jsx(
149
+ "path",
150
+ {
151
+ d: "M9.21265 0.166102C9.57579 0.166381 9.87012 0.460269 9.87018 0.822142C9.87004 1.18394 9.57574 1.47701 9.21265 1.47729H3.29036C2.20017 1.47729 1.31606 2.35831 1.31596 3.44452V6.72294C1.31577 7.08487 1.02083 7.37808 0.657534 7.37808C0.294361 7.37794 0.000196551 7.08478 0 6.72294V3.44452C9.80773e-05 1.63411 1.47333 0.166102 3.29036 0.166102H9.21265Z",
152
+ fill: "#1E3860"
153
+ }
154
+ ),
155
+ /* @__PURE__ */ jsx(
156
+ "path",
157
+ {
158
+ d: "M15.7145 0.475824C15.9558 -0.158638 16.8779 -0.158578 17.1192 0.475824L17.6459 1.8611C17.7218 2.06058 17.8835 2.2175 18.0885 2.29132L19.511 2.80454C20.163 3.03936 20.163 3.93626 19.511 4.17107L18.0885 4.6843C17.8835 4.75812 17.7218 4.91504 17.6459 5.11452L17.1192 6.49979C16.8779 7.1342 15.9558 7.13426 15.7145 6.49979L15.1878 5.11452C15.1119 4.91508 14.9502 4.75811 14.7453 4.6843L13.3227 4.17107C12.6708 3.93622 12.6708 3.0394 13.3227 2.80454L14.7453 2.29132C14.9502 2.21751 15.1119 2.06054 15.1878 1.8611L15.7145 0.475824Z",
159
+ fill: "#1E3860"
160
+ }
161
+ )
162
+ ]
163
+ }
164
+ ),
165
+ /* @__PURE__ */ jsx("h2", { className: chat_title, children: "Ask Evo AI" })
166
+ ]
167
+ }
168
+ ),
169
+ /* @__PURE__ */ jsxs("div", { className: clsx(buttonss_section), children: [
170
+ /* @__PURE__ */ jsx(
171
+ "button",
116
172
  {
117
- xmlns: "http://www.w3.org/2000/svg",
118
- width: "20",
119
- height: "17",
120
- viewBox: "0 0 20 17",
121
- fill: "none",
173
+ disabled: messages.length === 0,
174
+ onClick: () => {
175
+ setMenuOpen(!menuOpen);
176
+ },
177
+ className: clsx(button_bar),
178
+ style: {
179
+ border: menuOpen ? `1px solid ${vars.chatbot.window.headerText}` : "none",
180
+ cursor: "pointer",
181
+ padding: 0,
182
+ display: "flex",
183
+ alignContent: "center",
184
+ background: menuOpen ? "#0000000f" : void 0
185
+ },
186
+ "aria-label": "end chat with evo ai",
187
+ title: "end chat",
188
+ children: /* @__PURE__ */ jsx(EllipsisIcon, { color: vars.chatbot.window.headerText })
189
+ }
190
+ ),
191
+ menuOpen && /* @__PURE__ */ jsx("ul", { className: clsx(chatbotMenu), children: /* @__PURE__ */ jsx("li", { className: chatbotMenuItem, children: /* @__PURE__ */ jsxs(
192
+ "button",
193
+ {
194
+ type: "button",
195
+ onClick: () => {
196
+ setShowEndChatDialog(true);
197
+ setMenuOpen(false);
198
+ },
199
+ style: {
200
+ width: "100%",
201
+ display: "flex",
202
+ alignItems: "center",
203
+ gap: "12px"
204
+ },
122
205
  children: [
123
- /* @__PURE__ */ jsx(
124
- "path",
206
+ /* @__PURE__ */ jsx("div", { className: clsx(button_bar), children: /* @__PURE__ */ jsxs(
207
+ "svg",
125
208
  {
126
- d: "M10.5277 2.78937C10.8911 2.78937 11.1852 3.08251 11.1853 3.44452C11.1852 3.80654 10.8911 4.10056 10.5277 4.10056H5.26386C4.5371 4.10064 3.94791 4.68761 3.94789 5.41175V10.6565C3.9479 11.3806 4.5371 11.9676 5.26386 11.9677H6.97488C7.12012 11.9678 7.23818 12.0854 7.23825 12.2301V15.6861L10.8932 12.0445C10.9424 11.9956 11.0092 11.9679 11.0786 11.9677H14.4765C15.2032 11.9676 15.7925 11.3806 15.7925 10.6565V9.27302C15.7925 8.91106 16.0868 8.61721 16.45 8.61697C16.8134 8.61699 17.1084 8.91093 17.1084 9.27302V10.6565C17.1084 12.1048 15.9301 13.2788 14.4765 13.2789H11.5149L8.16901 16.6135C7.33997 17.4393 5.92245 16.8542 5.92229 15.6861V13.2789H5.26386C3.81026 13.2788 2.63193 12.1048 2.63193 10.6565V5.41175C2.63194 3.96341 3.81027 2.78945 5.26386 2.78937H10.5277Z",
127
- fill: "#1E3860"
209
+ xmlns: "http://www.w3.org/2000/svg",
210
+ width: "16",
211
+ height: "16",
212
+ viewBox: "0 0 16 16",
213
+ fill: "none",
214
+ "aria-hidden": true,
215
+ children: [
216
+ /* @__PURE__ */ jsxs("g", { clipPath: "url(#clip0_92_1389)", children: [
217
+ /* @__PURE__ */ jsx(
218
+ "path",
219
+ {
220
+ d: "M11.1236 5.37374L8.60278 7.89457L11.1236 10.4167L10.4166 11.1237L7.89445 8.6029L5.37362 11.1237L4.66658 10.4167L7.18742 7.89457L4.66658 5.37374L5.37362 4.66671L7.89445 7.18754L10.4166 4.66671L11.1236 5.37374Z",
221
+ fill: vars.chatbot.window.headerText
222
+ }
223
+ ),
224
+ /* @__PURE__ */ jsx(
225
+ "path",
226
+ {
227
+ fillRule: "evenodd",
228
+ clipRule: "evenodd",
229
+ d: "M13.3333 0.833374C14.3458 0.833374 15.1666 1.65419 15.1666 2.66671V13.3334C15.1666 14.3459 14.3458 15.1667 13.3333 15.1667H2.66659C1.65406 15.1667 0.833252 14.3459 0.833252 13.3334V2.66671C0.833252 1.65419 1.65406 0.833374 2.66659 0.833374H13.3333ZM2.66659 1.83337C2.20635 1.83337 1.83325 2.20647 1.83325 2.66671V13.3334C1.83325 13.7936 2.20635 14.1667 2.66659 14.1667H13.3333C13.7935 14.1667 14.1666 13.7936 14.1666 13.3334V2.66671C14.1666 2.20647 13.7935 1.83337 13.3333 1.83337H2.66659Z",
230
+ fill: vars.chatbot.window.headerText
231
+ }
232
+ )
233
+ ] }),
234
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "clip0_92_1389", children: /* @__PURE__ */ jsx("rect", { width: "16", height: "16", fill: "white" }) }) })
235
+ ]
128
236
  }
129
- ),
130
- /* @__PURE__ */ jsx(
131
- "path",
132
- {
133
- d: "M9.21265 0.166102C9.57579 0.166381 9.87012 0.460269 9.87018 0.822142C9.87004 1.18394 9.57574 1.47701 9.21265 1.47729H3.29036C2.20017 1.47729 1.31606 2.35831 1.31596 3.44452V6.72294C1.31577 7.08487 1.02083 7.37808 0.657534 7.37808C0.294361 7.37794 0.000196551 7.08478 0 6.72294V3.44452C9.80773e-05 1.63411 1.47333 0.166102 3.29036 0.166102H9.21265Z",
134
- fill: "#1E3860"
135
- }
136
- ),
137
- /* @__PURE__ */ jsx(
138
- "path",
139
- {
140
- d: "M15.7145 0.475824C15.9558 -0.158638 16.8779 -0.158578 17.1192 0.475824L17.6459 1.8611C17.7218 2.06058 17.8835 2.2175 18.0885 2.29132L19.511 2.80454C20.163 3.03936 20.163 3.93626 19.511 4.17107L18.0885 4.6843C17.8835 4.75812 17.7218 4.91504 17.6459 5.11452L17.1192 6.49979C16.8779 7.1342 15.9558 7.13426 15.7145 6.49979L15.1878 5.11452C15.1119 4.91508 14.9502 4.75811 14.7453 4.6843L13.3227 4.17107C12.6708 3.93622 12.6708 3.0394 13.3227 2.80454L14.7453 2.29132C14.9502 2.21751 15.1119 2.06054 15.1878 1.8611L15.7145 0.475824Z",
141
- fill: "#1E3860"
142
- }
143
- )
237
+ ) }),
238
+ /* @__PURE__ */ jsx("span", { children: "End Chat" })
144
239
  ]
145
240
  }
146
- ),
147
- /* @__PURE__ */ jsx("h2", { className: chat_title, children: "Ask Evo AI" })
148
- ]
149
- }
150
- ),
151
- /* @__PURE__ */ jsxs("div", { className: clsx(buttonss_section), children: [
152
- /* @__PURE__ */ jsx(
153
- "button",
154
- {
155
- disabled: messages.length === 0,
156
- onClick: () => {
157
- setMenuOpen(!menuOpen);
158
- },
159
- className: clsx(button_bar),
160
- style: {
161
- border: menuOpen ? `1px solid ${vars.chatbot.window.headerText}` : "none",
162
- cursor: "pointer",
163
- padding: 0,
164
- display: "flex",
165
- alignContent: "center",
166
- background: menuOpen ? "#0000000f" : void 0
167
- },
168
- children: /* @__PURE__ */ jsx(EllipsisIcon, {})
169
- }
170
- ),
171
- menuOpen && /* @__PURE__ */ jsx("ul", { className: clsx(chatbotMenu), children: /* @__PURE__ */ jsx("li", { className: chatbotMenuItem, children: /* @__PURE__ */ jsxs(
172
- "button",
173
- {
174
- type: "button",
175
- onClick: () => {
176
- setShowEndChatDialog(true);
177
- setMenuOpen(false);
178
- },
179
- style: {
180
- width: "100%",
181
- display: "flex",
182
- alignItems: "center",
183
- gap: "12px"
184
- },
185
- children: [
186
- /* @__PURE__ */ jsx("div", { className: clsx(button_bar), children: /* @__PURE__ */ jsxs(
187
- "svg",
241
+ ) }) }),
242
+ showEndChatDialog && /* @__PURE__ */ jsxs(Fragment, { children: [
243
+ /* @__PURE__ */ jsx(
244
+ "div",
188
245
  {
189
- xmlns: "http://www.w3.org/2000/svg",
190
- width: "16",
191
- height: "16",
192
- viewBox: "0 0 16 16",
193
- fill: "none",
194
- children: [
195
- /* @__PURE__ */ jsxs("g", { clipPath: "url(#clip0_92_1389)", children: [
246
+ style: {
247
+ background: "#00000080",
248
+ position: "fixed",
249
+ top: 0,
250
+ left: 0,
251
+ right: 0,
252
+ bottom: 0,
253
+ zIndex: 999
254
+ }
255
+ }
256
+ ),
257
+ /* @__PURE__ */ jsx("dialog", { open: showEndChatDialog, className: chatEndDialogOverlay, children: /* @__PURE__ */ jsxs("form", { method: "dialog", className: chatFinishDialog, children: [
258
+ /* @__PURE__ */ jsx("div", { className: clsx(button_bar, chatEndCircle), children: /* @__PURE__ */ jsxs(
259
+ "svg",
260
+ {
261
+ xmlns: "http://www.w3.org/2000/svg",
262
+ width: "24",
263
+ height: "24",
264
+ viewBox: "0 0 24 24",
265
+ fill: "none",
266
+ children: [
196
267
  /* @__PURE__ */ jsx(
197
268
  "path",
198
269
  {
199
- d: "M11.1236 5.37374L8.60278 7.89457L11.1236 10.4167L10.4166 11.1237L7.89445 8.6029L5.37362 11.1237L4.66658 10.4167L7.18742 7.89457L4.66658 5.37374L5.37362 4.66671L7.89445 7.18754L10.4166 4.66671L11.1236 5.37374Z",
200
- fill: "#1E3860"
270
+ d: "M12.7514 7.14531V15.3953H11.2514V7.14531H12.7514Z",
271
+ fill: "#D2272F"
272
+ }
273
+ ),
274
+ /* @__PURE__ */ jsx(
275
+ "path",
276
+ {
277
+ d: "M12.0014 16.8953C12.6227 16.8953 13.1264 17.399 13.1264 18.0203C13.1264 18.6416 12.6227 19.1453 12.0014 19.1453C11.3801 19.1453 10.8764 18.6416 10.8764 18.0203C10.8764 17.399 11.3801 16.8953 12.0014 16.8953Z",
278
+ fill: "#D2272F"
201
279
  }
202
280
  ),
203
281
  /* @__PURE__ */ jsx(
@@ -205,326 +283,337 @@ const ChatWindow = ({
205
283
  {
206
284
  fillRule: "evenodd",
207
285
  clipRule: "evenodd",
208
- d: "M13.3333 0.833374C14.3458 0.833374 15.1666 1.65419 15.1666 2.66671V13.3334C15.1666 14.3459 14.3458 15.1667 13.3333 15.1667H2.66659C1.65406 15.1667 0.833252 14.3459 0.833252 13.3334V2.66671C0.833252 1.65419 1.65406 0.833374 2.66659 0.833374H13.3333ZM2.66659 1.83337C2.20635 1.83337 1.83325 2.20647 1.83325 2.66671V13.3334C1.83325 13.7936 2.20635 14.1667 2.66659 14.1667H13.3333C13.7935 14.1667 14.1666 13.7936 14.1666 13.3334V2.66671C14.1666 2.20647 13.7935 1.83337 13.3333 1.83337H2.66659Z",
209
- fill: "#1E3860"
286
+ d: "M9.31805 3.51187L2.17215 17.8037C1.1748 19.7984 2.62529 22.1453 4.85543 22.1453H19.1472C21.3774 22.1453 22.8279 19.7984 21.8305 17.8037L14.6846 3.51188C13.579 1.30073 10.4236 1.30073 9.31805 3.51187ZM3.51379 18.4745L10.6597 4.18269C11.2125 3.07712 12.7902 3.07712 13.343 4.1827L20.4889 18.4745C20.9875 19.4718 20.2623 20.6453 19.1472 20.6453H4.85543C3.74036 20.6453 3.01512 19.4718 3.51379 18.4745Z",
287
+ fill: "#D2272F"
210
288
  }
211
289
  )
212
- ] }),
213
- /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "clip0_92_1389", children: /* @__PURE__ */ jsx("rect", { width: "16", height: "16", fill: "white" }) }) })
214
- ]
290
+ ]
291
+ }
292
+ ) }),
293
+ /* @__PURE__ */ jsxs("p", { children: [
294
+ "Are you sure you want to end",
295
+ /* @__PURE__ */ jsx("br", {}),
296
+ " this chat?"
297
+ ] }),
298
+ /* @__PURE__ */ jsxs(
299
+ "div",
300
+ {
301
+ style: {
302
+ display: "flex",
303
+ gap: "1rem",
304
+ marginTop: "1rem",
305
+ flexDirection: "column",
306
+ marginBottom: 24,
307
+ width: "100%"
308
+ },
309
+ children: [
310
+ /* @__PURE__ */ jsx(
311
+ "button",
312
+ {
313
+ className: endChatButtonStyle,
314
+ type: "submit",
315
+ onClick: () => {
316
+ endChat();
317
+ setChatStatus("ending");
318
+ setShowEndChatDialog(false);
319
+ },
320
+ children: "Yes, End Chat"
321
+ }
322
+ ),
323
+ /* @__PURE__ */ jsx(
324
+ "button",
325
+ {
326
+ className: clsx(endChatButtonStyle, noAnswerButton),
327
+ type: "button",
328
+ onClick: () => {
329
+ setShowEndChatDialog(false);
330
+ },
331
+ children: "No, Go Back"
332
+ }
333
+ )
334
+ ]
335
+ }
336
+ ),
337
+ " "
338
+ ] }) })
339
+ ] }),
340
+ chatStatus == "ending" && /* @__PURE__ */ jsxs("div", { children: [
341
+ /* @__PURE__ */ jsx(
342
+ "div",
343
+ {
344
+ style: {
345
+ background: "#00000080",
346
+ position: "fixed",
347
+ top: 0,
348
+ left: 0,
349
+ right: 0,
350
+ bottom: 0,
351
+ zIndex: 999
352
+ }
215
353
  }
216
- ) }),
217
- /* @__PURE__ */ jsx("span", { children: "End Chat" })
218
- ]
219
- }
220
- ) }) }),
221
- showEndChatDialog && /* @__PURE__ */ jsxs(Fragment, { children: [
222
- /* @__PURE__ */ jsx(
223
- "div",
224
- {
225
- style: {
226
- background: "#00000080",
227
- position: "fixed",
228
- top: 0,
229
- left: 0,
230
- right: 0,
231
- bottom: 0,
232
- zIndex: 999
233
- }
234
- }
235
- ),
236
- /* @__PURE__ */ jsx("dialog", { open: showEndChatDialog, className: chatEndDialogOverlay, children: /* @__PURE__ */ jsxs("form", { method: "dialog", className: chatFinishDialog, children: [
237
- /* @__PURE__ */ jsx("div", { className: clsx(button_bar, chatEndCircle), children: /* @__PURE__ */ jsxs(
238
- "svg",
239
- {
240
- xmlns: "http://www.w3.org/2000/svg",
241
- width: "24",
242
- height: "24",
243
- viewBox: "0 0 24 24",
244
- fill: "none",
245
- children: [
246
- /* @__PURE__ */ jsx(
247
- "path",
248
- {
249
- d: "M12.7514 7.14531V15.3953H11.2514V7.14531H12.7514Z",
250
- fill: "#D2272F"
251
- }
252
- ),
253
- /* @__PURE__ */ jsx(
254
- "path",
255
- {
256
- d: "M12.0014 16.8953C12.6227 16.8953 13.1264 17.399 13.1264 18.0203C13.1264 18.6416 12.6227 19.1453 12.0014 19.1453C11.3801 19.1453 10.8764 18.6416 10.8764 18.0203C10.8764 17.399 11.3801 16.8953 12.0014 16.8953Z",
257
- fill: "#D2272F"
258
- }
259
- ),
260
- /* @__PURE__ */ jsx(
261
- "path",
354
+ ),
355
+ /* @__PURE__ */ jsx(
356
+ "div",
357
+ {
358
+ style: {
359
+ position: "fixed",
360
+ top: 0,
361
+ left: 0,
362
+ right: 0,
363
+ bottom: 0,
364
+ zIndex: 1e3,
365
+ display: "flex",
366
+ justifyContent: "center",
367
+ alignItems: "center"
368
+ },
369
+ children: /* @__PURE__ */ jsx(
370
+ LoadingIndicator,
262
371
  {
263
- fillRule: "evenodd",
264
- clipRule: "evenodd",
265
- d: "M9.31805 3.51187L2.17215 17.8037C1.1748 19.7984 2.62529 22.1453 4.85543 22.1453H19.1472C21.3774 22.1453 22.8279 19.7984 21.8305 17.8037L14.6846 3.51188C13.579 1.30073 10.4236 1.30073 9.31805 3.51187ZM3.51379 18.4745L10.6597 4.18269C11.2125 3.07712 12.7902 3.07712 13.343 4.1827L20.4889 18.4745C20.9875 19.4718 20.2623 20.6453 19.1472 20.6453H4.85543C3.74036 20.6453 3.01512 19.4718 3.51379 18.4745Z",
266
- fill: "#D2272F"
372
+ variant: "primary",
373
+ style: { borderTopColor: vars.chatbot.bubble.glowShadow }
267
374
  }
268
375
  )
269
- ]
270
- }
271
- ) }),
272
- /* @__PURE__ */ jsxs("p", { children: [
273
- "Are you sure you want to end",
274
- /* @__PURE__ */ jsx("br", {}),
275
- " this chat?"
376
+ }
377
+ )
276
378
  ] }),
277
- /* @__PURE__ */ jsxs(
278
- "div",
379
+ /* @__PURE__ */ jsx(
380
+ ThankYouMessage,
279
381
  {
280
- style: {
281
- display: "flex",
282
- gap: "1rem",
283
- marginTop: "1rem",
284
- flexDirection: "column",
285
- marginBottom: 24,
286
- width: "100%"
382
+ showEndChatDialog: showThankyouMessage,
383
+ onStart: onStartChat,
384
+ onClose: onCancelEndChat
385
+ }
386
+ ),
387
+ onClose && /* @__PURE__ */ jsxs(
388
+ "button",
389
+ {
390
+ onClick: () => {
391
+ onClose();
392
+ setMenuOpen(false);
287
393
  },
394
+ className: clsx(button_reset, button_bar),
395
+ "aria-label": "Close chat window",
396
+ title: "Close",
288
397
  children: [
289
398
  /* @__PURE__ */ jsx(
290
- "button",
399
+ "svg",
291
400
  {
292
- className: endChatButtonStyle,
293
- type: "submit",
294
- onClick: () => {
295
- endChat();
296
- displayThankYouScreen();
297
- setShowEndChatDialog(false);
298
- },
299
- children: "Yes, End Chat"
401
+ xmlns: "http://www.w3.org/2000/svg",
402
+ width: "24",
403
+ height: "24",
404
+ viewBox: "0 0 24 24",
405
+ fill: "none",
406
+ "aria-hidden": "true",
407
+ children: /* @__PURE__ */ jsx(
408
+ "path",
409
+ {
410
+ className: arrowFill,
411
+ d: "M2.46875 7.76574L11.9991 17.2961L21.5294 7.76574L20.4687 6.70508L11.9991 15.1749L3.52941 6.70508L2.46875 7.76574Z"
412
+ }
413
+ )
300
414
  }
301
415
  ),
302
416
  /* @__PURE__ */ jsx(
303
- "button",
417
+ "svg",
304
418
  {
305
- className: clsx(endChatButtonStyle, noAnswerButton),
306
- type: "button",
307
- onClick: () => {
308
- setShowEndChatDialog(false);
309
- },
310
- children: "No, Go Back"
419
+ width: "15",
420
+ height: "15",
421
+ viewBox: "0 0 15 15",
422
+ fill: "none",
423
+ xmlns: "http://www.w3.org/2000/svg",
424
+ "aria-hidden": "true",
425
+ children: /* @__PURE__ */ jsx(
426
+ "path",
427
+ {
428
+ d: "M13.2187 0L14.0142 0.795495L7.803 7.0065L14.0142 13.2187L13.2187 14.0142L7.0065 7.803L0.795495 14.0142L0 13.2187L6.21112 7.0065L0 0.795495L0.795495 0L7.0065 6.21112L13.2187 0Z",
429
+ fill: vars.chatbot.window.headerText
430
+ }
431
+ )
311
432
  }
312
433
  )
313
434
  ]
314
435
  }
315
- ),
316
- " "
317
- ] }) })
436
+ )
437
+ ] })
318
438
  ] }),
319
- /* @__PURE__ */ jsx(
320
- ThankYouMessage,
321
- {
322
- showEndChatDialog: showThankyouMessage,
323
- onStart: onStartChat,
324
- onClose: onCancelEndChat
325
- }
326
- ),
327
- onClose && /* @__PURE__ */ jsxs(
328
- "button",
439
+ mounted && !state.online ? /* @__PURE__ */ jsx("div", { className: clsx(chatNetworkStatus), children: /* @__PURE__ */ jsxs(
440
+ "div",
329
441
  {
330
- onClick: () => {
331
- onClose();
332
- setMenuOpen(false);
442
+ style: {
443
+ color: "#d32f2f",
444
+ textAlign: "center",
445
+ padding: "8px 0",
446
+ fontWeight: 500
333
447
  },
334
- className: clsx(button_reset, button_bar),
335
- "aria-label": "Close chat window",
336
- title: "Close",
337
448
  children: [
338
449
  /* @__PURE__ */ jsx(
339
- "svg",
450
+ "span",
340
451
  {
341
- xmlns: "http://www.w3.org/2000/svg",
342
- width: "24",
343
- height: "24",
344
- viewBox: "0 0 24 24",
345
- fill: "none",
346
- children: /* @__PURE__ */ jsx(
347
- "path",
348
- {
349
- className: arrowFill,
350
- d: "M2.46875 7.76574L11.9991 17.2961L21.5294 7.76574L20.4687 6.70508L11.9991 15.1749L3.52941 6.70508L2.46875 7.76574Z",
351
- color: vars.chatbot.window.headerText
352
- }
353
- )
452
+ role: "img",
453
+ "aria-label": "disconnected",
454
+ style: { marginRight: 6 },
455
+ children: "⚠️"
354
456
  }
355
457
  ),
356
- /* @__PURE__ */ jsx(
357
- "svg",
358
- {
359
- width: "15",
360
- height: "15",
361
- viewBox: "0 0 15 15",
362
- fill: "none",
363
- xmlns: "http://www.w3.org/2000/svg",
364
- children: /* @__PURE__ */ jsx(
365
- "path",
366
- {
367
- d: "M13.2187 0L14.0142 0.795495L7.803 7.0065L14.0142 13.2187L13.2187 14.0142L7.0065 7.803L0.795495 14.0142L0 13.2187L6.21112 7.0065L0 0.795495L0.795495 0L7.0065 6.21112L13.2187 0Z",
368
- fill: vars.chatbot.window.headerText
369
- }
370
- )
371
- }
372
- )
458
+ "You are currently disconnected. Please check your connection."
373
459
  ]
374
460
  }
375
- )
376
- ] })
377
- ] }),
378
- mounted && !state.online ? /* @__PURE__ */ jsx("div", { className: clsx(chatNetworkStatus), children: /* @__PURE__ */ jsxs(
379
- "div",
380
- {
381
- style: {
382
- color: "#d32f2f",
383
- textAlign: "center",
384
- padding: "8px 0",
385
- fontWeight: 500
386
- },
387
- children: [
388
- /* @__PURE__ */ jsx(
389
- "span",
390
- {
391
- role: "img",
392
- "aria-label": "disconnected",
393
- style: { marginRight: 6 },
394
- children: "⚠️"
395
- }
396
- ),
397
- "You are currently disconnected. Please check your connection."
398
- ]
399
- }
400
- ) }) : null,
401
- /* @__PURE__ */ jsxs("div", { className: clsx(messagesContainerStyle), children: [
402
- (status === "idle" && messages.length == 0 || messages.length == 0) && /* @__PURE__ */ jsx(
403
- "div",
404
- {
405
- className: clsx(),
406
- style: {
407
- textAlign: "left",
408
- alignSelf: "flex-start",
409
- color: "#1e3860",
410
- borderRadius: 16,
411
- padding: "8px 8px",
412
- maxWidth: "80%",
413
- marginBottom: 2
414
- },
415
- children: /* @__PURE__ */ jsx(
461
+ ) }) : null,
462
+ /* @__PURE__ */ jsxs("div", { className: clsx(messagesContainerStyle), children: [
463
+ (status === "idle" && messages.length == 0 || messages.length == 0) && /* @__PURE__ */ jsx(
416
464
  "div",
417
465
  {
466
+ className: clsx(),
418
467
  style: {
419
- fontSize: 14,
420
- display: "flex",
421
- flexDirection: "column",
422
- gap: 4
468
+ textAlign: "left",
469
+ alignSelf: "flex-start",
470
+ color: "#1e3860",
471
+ borderRadius: 16,
472
+ padding: "8px 8px",
473
+ maxWidth: "80%",
474
+ marginBottom: 2
423
475
  },
424
- children: /* @__PURE__ */ jsx("p", { className: shimmerText, children: "Chat connecting..." })
425
- }
426
- )
427
- }
428
- ),
429
- messages?.map((msg) => {
430
- if (!hasOpenedOnce) {
431
- return null;
432
- }
433
- return /* @__PURE__ */ jsx(
434
- ChatbotMessage,
435
- {
436
- msg,
437
- onSend,
438
- showAvatar,
439
- showName,
440
- virtualAgent,
441
- onCancelEndChat,
442
- onEndChat: () => {
443
- endChat();
444
- onCloseAfterThankYou();
445
- },
446
- inputRef
447
- },
448
- msg?.$index
449
- );
450
- }),
451
- showReconnect && /* @__PURE__ */ jsx(
452
- "button",
453
- {
454
- style: { margin: "12px auto", display: "block" },
455
- onClick: () => {
456
- },
457
- children: "Reconnect Chat"
458
- }
459
- ),
460
- /* @__PURE__ */ jsx("div", { ref: messagesEndRef })
461
- ] }),
462
- /* @__PURE__ */ jsx("div", { style: { padding: "16px 16px 24px 16px" }, children: /* @__PURE__ */ jsx("form", { onSubmit: handleSend, className: clsx(gradientFocus), children: /* @__PURE__ */ jsxs(
463
- "div",
464
- {
465
- style: {
466
- display: "flex",
467
- padding: "12px 16px",
468
- background: isBlockedInput || inputDisabled || status !== "connected" || messages.length == 0 || escalationDeflected ? "light-dark(rgba(239, 239, 239, 0.3), rgba(59, 59, 59, 0.3))" : "#ffffff",
469
- borderRadius: 12
470
- },
471
- children: [
472
- /* @__PURE__ */ jsx(
473
- "textarea",
474
- {
475
- ref: inputRef,
476
- value: input,
477
- onChange: (e) => setInput(e.target.value),
478
- onKeyDown: (e) => {
479
- if (hasEscalated) {
480
- previewTyping(e.target?.value);
481
- }
482
- if (e.key === "Enter" && !e.shiftKey) {
483
- handleSend(e);
476
+ children: /* @__PURE__ */ jsx(
477
+ "div",
478
+ {
479
+ style: {
480
+ fontSize: 14,
481
+ display: "flex",
482
+ flexDirection: "column",
483
+ gap: 16
484
+ },
485
+ children: /* @__PURE__ */ jsx("p", { className: shimmerText, children: "Chat connecting..." })
484
486
  }
485
- },
486
- placeholder: "Ask anything...",
487
- className: clsx(inputStyle, autoResize),
488
- autoFocus: true,
489
- disabled: isBlockedInput || inputDisabled || status !== "connected" || messages.length == 0 || escalationDeflected,
490
- rows: 1
487
+ )
491
488
  }
492
489
  ),
493
- /* @__PURE__ */ jsx(
490
+ messages?.map((msg) => {
491
+ if (!hasOpenedOnce) {
492
+ return null;
493
+ }
494
+ return /* @__PURE__ */ jsx(
495
+ ChatbotMessage,
496
+ {
497
+ msg,
498
+ onSend,
499
+ showAvatar,
500
+ showName,
501
+ virtualAgent,
502
+ onCancelEndChat,
503
+ onEndChat: () => {
504
+ endChat();
505
+ onCloseAfterThankYou();
506
+ },
507
+ inputRef
508
+ },
509
+ msg?.$index
510
+ );
511
+ }),
512
+ showReconnect && /* @__PURE__ */ jsx(
494
513
  "button",
495
514
  {
496
- className: clsx(
497
- sendButtonStyle,
498
- input.trim().length > 0 && "active"
499
- ),
500
- type: "submit",
501
- title: "Send message",
502
- disabled: isBlockedInput || inputDisabled || status !== "connected" || !input.trim() || messages.length == 0 || escalationDeflected,
503
- children: /* @__PURE__ */ jsx(
504
- "svg",
505
- {
506
- xmlns: "http://www.w3.org/2000/svg",
507
- width: "16",
508
- height: "16",
509
- viewBox: "0 0 16 16",
510
- fill: "none",
511
- children: /* @__PURE__ */ jsx(
512
- "path",
515
+ style: { margin: "12px auto", display: "block" },
516
+ onClick: () => {
517
+ },
518
+ children: "Reconnect Chat"
519
+ }
520
+ ),
521
+ /* @__PURE__ */ jsx("div", { ref: messagesEndRef })
522
+ ] }),
523
+ /* @__PURE__ */ jsxs("div", { style: { padding: "16px 16px 24px 16px" }, children: [
524
+ /* @__PURE__ */ jsxs("form", { onSubmit: handleSend, className: clsx(gradientFocus), children: [
525
+ /* @__PURE__ */ jsx(
526
+ "div",
527
+ {
528
+ className: clsx(
529
+ focused && !inputDisabled && !isBlockedInput ? focusAnimation : ""
530
+ ),
531
+ style: {
532
+ position: "absolute",
533
+ left: "10%",
534
+ width: "80%",
535
+ height: "40px",
536
+ zIndex: "-1"
537
+ }
538
+ }
539
+ ),
540
+ /* @__PURE__ */ jsxs(
541
+ "div",
542
+ {
543
+ className: formTextButton,
544
+ style: {
545
+ display: "flex",
546
+ padding: "12px 16px",
547
+ background: isBlockedInput || inputDisabled || status !== "connected" || messages.length == 0 || escalationDeflected ? "light-dark(rgba(239, 239, 239, 0.3), rgba(59, 59, 59, 0.3))" : "#ffffff",
548
+ borderRadius: 12
549
+ },
550
+ children: [
551
+ /* @__PURE__ */ jsx(
552
+ "textarea",
513
553
  {
514
- fillRule: "evenodd",
515
- clipRule: "evenodd",
516
- d: "M0.0030533 5.42479C0.0273417 5.1795 0.193529 4.9714 0.427369 4.89345L15.0114 0.0320896C15.236 -0.0427712 15.4836 0.0156801 15.651 0.183075C15.8184 0.35047 15.8769 0.598075 15.802 0.822659L10.9407 15.4067C10.8627 15.6406 10.6546 15.8068 10.4093 15.8311C10.164 15.8553 9.92737 15.7332 9.80508 15.5192L6.35411 9.47999L0.314925 6.02903C0.100912 5.90673 -0.0212351 5.67008 0.0030533 5.42479ZM7.59169 9.1263L9.64202 12.7144C9.85645 13.0896 10.4138 13.0344 10.5505 12.6244L13.9046 2.56191C14.0349 2.17103 13.6631 1.79916 13.2722 1.92946L3.20969 5.28362C2.79967 5.4203 2.74448 5.97766 3.11973 6.19209L6.70781 8.24242L9.90579 5.04443C10.1499 4.80036 10.5456 4.80036 10.7897 5.04443C11.0337 5.28851 11.0337 5.68424 10.7897 5.92832L7.59169 9.1263Z",
517
- fill: "#435164"
554
+ ref: inputRef,
555
+ value: input,
556
+ onChange: (e) => setInput(e.target.value),
557
+ onKeyDown: (e) => {
558
+ if (hasEscalated) {
559
+ previewTyping(e.target?.value);
560
+ }
561
+ if (e.key === "Enter" && !e.shiftKey) {
562
+ handleSend(e);
563
+ }
564
+ },
565
+ onFocus: () => setFocused(() => true),
566
+ onBlur: () => setFocused(() => false),
567
+ placeholder: "Ask anything...",
568
+ "aria-label": "Ask anything...",
569
+ className: clsx(inputStyle, autoResize),
570
+ autoFocus: true,
571
+ disabled: isBlockedInput || inputDisabled || status !== "connected" || messages.length == 0 || escalationDeflected,
572
+ rows: 1
573
+ }
574
+ ),
575
+ /* @__PURE__ */ jsx(
576
+ "button",
577
+ {
578
+ className: clsx(
579
+ sendButtonStyle,
580
+ input.trim().length > 0 && "active"
581
+ ),
582
+ type: "submit",
583
+ title: "Send message",
584
+ "aria-label": "Send message",
585
+ disabled: isBlockedInput || inputDisabled || status !== "connected" || !input.trim() || messages.length == 0 || escalationDeflected,
586
+ children: /* @__PURE__ */ jsx(
587
+ "svg",
588
+ {
589
+ xmlns: "http://www.w3.org/2000/svg",
590
+ width: "20",
591
+ height: "20",
592
+ viewBox: "0 0 16 16",
593
+ fill: "none",
594
+ "aria-hidden": true,
595
+ children: /* @__PURE__ */ jsx(
596
+ "path",
597
+ {
598
+ fillRule: "evenodd",
599
+ clipRule: "evenodd",
600
+ d: "M0.0030533 5.42479C0.0273417 5.1795 0.193529 4.9714 0.427369 4.89345L15.0114 0.0320896C15.236 -0.0427712 15.4836 0.0156801 15.651 0.183075C15.8184 0.35047 15.8769 0.598075 15.802 0.822659L10.9407 15.4067C10.8627 15.6406 10.6546 15.8068 10.4093 15.8311C10.164 15.8553 9.92737 15.7332 9.80508 15.5192L6.35411 9.47999L0.314925 6.02903C0.100912 5.90673 -0.0212351 5.67008 0.0030533 5.42479ZM7.59169 9.1263L9.64202 12.7144C9.85645 13.0896 10.4138 13.0344 10.5505 12.6244L13.9046 2.56191C14.0349 2.17103 13.6631 1.79916 13.2722 1.92946L3.20969 5.28362C2.79967 5.4203 2.74448 5.97766 3.11973 6.19209L6.70781 8.24242L9.90579 5.04443C10.1499 4.80036 10.5456 4.80036 10.7897 5.04443C11.0337 5.28851 11.0337 5.68424 10.7897 5.92832L7.59169 9.1263Z",
601
+ fill: "#435164"
602
+ }
603
+ )
604
+ }
605
+ )
518
606
  }
519
607
  )
520
- }
521
- )
522
- }
523
- )
524
- ]
525
- }
526
- ) }) })
527
- ] });
608
+ ]
609
+ }
610
+ )
611
+ ] }),
612
+ /* @__PURE__ */ jsx("p", { className: chatAiDisclaimer, children: "Evo is AI and can make mistakes. Verify important details." })
613
+ ] })
614
+ ]
615
+ }
616
+ );
528
617
  };
529
618
  export {
530
619
  ChatWindow