@copart/ops-tool-kit 1.12.1-alpha.27 → 1.12.1-alpha.29

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.
@@ -32,7 +32,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
32
32
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
33
33
 
34
34
  const name$r = "@copart/ops-tool-kit";
35
- const version$7 = "1.12.1-alpha.27";
35
+ const version$7 = "1.12.1-alpha.29";
36
36
  const main$1 = "dist/ops-tool-kit.js";
37
37
  const style = "dist/ops-tool-kit.css";
38
38
  const files = [
@@ -35811,7 +35811,7 @@ var GoHome = function GoHome(props) {
35811
35811
  }, props.reason));
35812
35812
  };
35813
35813
 
35814
- var css_248z$3 = ".utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper {\r\n position: absolute;\r\n /* right: 50px;\r\n bottom: 30px; */\r\n z-index: 9999;\r\n height: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatIcon {\r\n position: absolute;\r\n right: 0;\r\n bottom: 0px;\r\n background: #1d5ab9;\r\n border-radius: 50%;\r\n width: 60px;\r\n height: 60px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n border: 5px solid #fff;\r\n box-shadow: 0 0px 6px #c1c1c1;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n position: absolute;\r\n /* right: 0;\r\n bottom: 68px; */\r\n box-shadow: 0 0px 6px #c1c1c1;\r\n height: 600px;\r\n width: 500px;\r\n border-radius: 8px;\r\n overflow: hidden;\r\n display: flex;\r\n flex-direction: column;\r\n background: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--spinner{\r\n position: absolute;\r\n background: rgba(0, 0, 0, 0.5);\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowHeader {\r\n background: #1d5ab9;\r\n display: flex;\r\n justify-content: space-between;\r\n padding: 15px;\r\n align-items: center;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowHeader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--title {\r\n font-size: 16px;\r\n font-weight: 600;\r\n line-height: 22px;\r\n color: #fff;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody {\r\n flex: 1;\r\n padding: 12px 36px;\r\n overflow: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatVisible {\r\n padding-top: 56px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer {\r\n padding: 8px 0;\r\n border-bottom: 1px solid #d1d1d1;\r\n display: flex;\r\n justify-content: end;\r\n align-items: center;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatVisible .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer {\r\n position: absolute;\r\n width: calc(100% - 72px);\r\n top: 57px;\r\n background: #fff;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messagesContainer {\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 16px;\r\n gap: 16px;\r\n cursor: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatButton {\r\n display: flex;\r\n align-items: center;\r\n grid-gap: 6px;\r\n gap: 6px;\r\n cursor: pointer;\r\n border: 1px solid #d1d1d1;\r\n border-radius: 4px;\r\n padding: 6px 12px;\r\n font-weight: 600;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message {\r\n display: flex;\r\n align-items: flex-start;\r\n grid-gap: 10px;\r\n gap: 10px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--user {\r\n justify-content: flex-end;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--welcomeQuestion {\r\n margin-top: 5px;\r\n margin-left: 36px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions {\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 12px;\r\n gap: 12px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestionWrapper {\r\n display: flex;\r\n flex-direction: row-reverse;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestionContainer {\r\n max-width: 95%;\r\n word-break: break-all;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestion {\r\n border: 1px solid #3261bd;\r\n border-radius: 16px;\r\n padding: 6px 8px;\r\n font-size: 14px;\r\n color: #3261bd;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--agentIcon {\r\n width: 26px;\r\n border-radius: 50%;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble {\r\n background-color: #f5f5f5;\r\n border-radius: 0px 12px 12px 12px;\r\n padding: 10px 15px;\r\n max-width: 85%;\r\n font-size: 14px;\r\n line-height: 1.5;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--error {\r\n border: 1px solid #f1bbbc;\r\n background: #fdf6f6;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--user .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble {\r\n background: #3261bd;\r\n color: #fff;\r\n border-radius: 12px 0px 12px 12px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--feedbackContainer {\r\n display: flex;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n margin-top: 10px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p {\r\n margin: 0;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p a {\r\n color: #1e54ad;\r\n text-decoration: underline;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p ol,\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p ul {\r\n padding-left: 15px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowFooter {\r\n border-top: 1px solid #d1d1d1;\r\n padding: 16px 24px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer {\r\n display: flex;\r\n align-items: center;\r\n border: 1px solid #ddd;\r\n border-radius: 12px;\r\n padding: 10px 15px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--disabled {\r\n background-color: #fafafa;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input {\r\n border: none;\r\n outline: none;\r\n flex-grow: 1;\r\n font-size: 14px !important;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-webkit-input-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-moz-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-ms-input-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::placeholder {\r\n color: #757575;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 10px;\r\n width: 75px;\r\n background-color: #f5f5f5;\r\n border-radius: 0px 12px 12px 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot {\r\n width: 8px;\r\n height: 8px;\r\n margin: 0 3px;\r\n background-color: #3261bd;\r\n border-radius: 50%;\r\n display: inline-block;\r\n -webkit-animation: utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce 1.2s infinite ease-in-out both;\r\n animation: utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce 1.2s infinite ease-in-out both;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot:nth-child(1) {\r\n -webkit-animation-delay: -0.32s;\r\n animation-delay: -0.32s;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot:nth-child(2) {\r\n -webkit-animation-delay: -0.16s;\r\n animation-delay: -0.16s;\r\n}\r\n\r\n@-webkit-keyframes utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce {\r\n 0%,\r\n 80%,\r\n 100% {\r\n -webkit-transform: scale(0);\r\n transform: scale(0);\r\n }\r\n 40% {\r\n -webkit-transform: scale(1);\r\n transform: scale(1);\r\n }\r\n}\r\n\r\n@keyframes utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce {\r\n 0%,\r\n 80%,\r\n 100% {\r\n -webkit-transform: scale(0);\r\n transform: scale(0);\r\n }\r\n 40% {\r\n -webkit-transform: scale(1);\r\n transform: scale(1);\r\n }\r\n}\r\n\r\n@media (max-width: 575px) {\r\n /* .mihelpAgentWrapper {\r\n right: 20px;\r\n bottom: 100px;\r\n } */\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--iphoneChrome {\r\n bottom: 125px;\r\n }\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 450px;\r\n }\r\n}\r\n\r\n@media (max-width: 475px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 400px;\r\n }\r\n}\r\n\r\n@media (max-width: 425px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 350px;\r\n }\r\n}\r\n\r\n@media (max-width: 375px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 325px;\r\n }\r\n}\r\n\r\n@media (max-width: 350px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 300px;\r\n }\r\n}\r\n\r\n@media (max-width: 325px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 275px;\r\n }\r\n}\r\n";
35814
+ var css_248z$3 = ".utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper {\r\n position: absolute;\r\n /* right: 50px;\r\n bottom: 30px; */\r\n z-index: 9999;\r\n height: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatIcon {\r\n position: absolute;\r\n right: 0;\r\n bottom: 0px;\r\n background: #1d5ab9;\r\n border-radius: 50%;\r\n width: 60px;\r\n height: 60px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n border: 5px solid #fff;\r\n box-shadow: 0 0px 6px #c1c1c1;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n position: absolute;\r\n /* right: 0;\r\n bottom: 68px; */\r\n box-shadow: 0 0px 6px #c1c1c1;\r\n height: 600px;\r\n width: 500px;\r\n border-radius: 8px;\r\n overflow: hidden;\r\n display: flex;\r\n flex-direction: column;\r\n background: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--spinner{\r\n position: absolute;\r\n background: rgba(0, 0, 0, 0.5);\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n cursor: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowHeader {\r\n background: #1d5ab9;\r\n display: flex;\r\n justify-content: space-between;\r\n padding: 15px;\r\n align-items: center;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowHeader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--title {\r\n font-size: 16px;\r\n font-weight: 600;\r\n line-height: 22px;\r\n color: #fff;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody {\r\n flex: 1;\r\n padding: 12px 36px;\r\n overflow: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatVisible {\r\n padding-top: 56px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer {\r\n padding: 8px 0;\r\n border-bottom: 1px solid #d1d1d1;\r\n display: flex;\r\n justify-content: end;\r\n align-items: center;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatVisible .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer {\r\n position: absolute;\r\n width: calc(100% - 72px);\r\n top: 57px;\r\n background: #fff;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messagesContainer {\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 16px;\r\n gap: 16px;\r\n cursor: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatButton {\r\n display: flex;\r\n align-items: center;\r\n grid-gap: 6px;\r\n gap: 6px;\r\n cursor: pointer;\r\n border: 1px solid #d1d1d1;\r\n border-radius: 4px;\r\n padding: 6px 12px;\r\n font-weight: 600;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message {\r\n display: flex;\r\n align-items: flex-start;\r\n grid-gap: 10px;\r\n gap: 10px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--user {\r\n justify-content: flex-end;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--welcomeQuestion {\r\n margin-top: 5px;\r\n margin-left: 36px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions {\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 12px;\r\n gap: 12px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestionWrapper {\r\n display: flex;\r\n flex-direction: row-reverse;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestionContainer {\r\n max-width: 95%;\r\n word-break: break-all;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestion {\r\n border: 1px solid #3261bd;\r\n border-radius: 16px;\r\n padding: 6px 8px;\r\n font-size: 14px;\r\n color: #3261bd;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--agentIcon {\r\n width: 26px;\r\n border-radius: 50%;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble {\r\n background-color: #f5f5f5;\r\n border-radius: 0px 12px 12px 12px;\r\n padding: 10px 15px;\r\n max-width: 85%;\r\n font-size: 14px;\r\n line-height: 1.5;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--error {\r\n border: 1px solid #f1bbbc;\r\n background: #fdf6f6;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--user .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble {\r\n background: #3261bd;\r\n color: #fff;\r\n border-radius: 12px 0px 12px 12px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--feedbackContainer {\r\n display: flex;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n margin-top: 10px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--feedbackContainer i {\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p {\r\n margin: 0;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p a {\r\n color: #1e54ad;\r\n text-decoration: underline;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p ol,\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p ul {\r\n padding-left: 15px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowFooter {\r\n border-top: 1px solid #d1d1d1;\r\n padding: 16px 24px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer {\r\n display: flex;\r\n align-items: center;\r\n border: 1px solid #ddd;\r\n border-radius: 12px;\r\n padding: 10px 15px;\r\n cursor: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--disabled {\r\n background-color: #fafafa;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input {\r\n border: none;\r\n outline: none;\r\n flex-grow: 1;\r\n font-size: 14px !important;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-webkit-input-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-moz-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-ms-input-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::placeholder {\r\n color: #757575;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 10px;\r\n width: 75px;\r\n background-color: #f5f5f5;\r\n border-radius: 0px 12px 12px 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot {\r\n width: 8px;\r\n height: 8px;\r\n margin: 0 3px;\r\n background-color: #3261bd;\r\n border-radius: 50%;\r\n display: inline-block;\r\n -webkit-animation: utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce 1.2s infinite ease-in-out both;\r\n animation: utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce 1.2s infinite ease-in-out both;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot:nth-child(1) {\r\n -webkit-animation-delay: -0.32s;\r\n animation-delay: -0.32s;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot:nth-child(2) {\r\n -webkit-animation-delay: -0.16s;\r\n animation-delay: -0.16s;\r\n}\r\n\r\n@-webkit-keyframes utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce {\r\n 0%,\r\n 80%,\r\n 100% {\r\n -webkit-transform: scale(0);\r\n transform: scale(0);\r\n }\r\n 40% {\r\n -webkit-transform: scale(1);\r\n transform: scale(1);\r\n }\r\n}\r\n\r\n@keyframes utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce {\r\n 0%,\r\n 80%,\r\n 100% {\r\n -webkit-transform: scale(0);\r\n transform: scale(0);\r\n }\r\n 40% {\r\n -webkit-transform: scale(1);\r\n transform: scale(1);\r\n }\r\n}\r\n\r\n@media (max-width: 575px) {\r\n /* .mihelpAgentWrapper {\r\n right: 20px;\r\n bottom: 100px;\r\n } */\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--iphoneChrome {\r\n bottom: 125px;\r\n }\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 450px;\r\n }\r\n}\r\n\r\n@media (max-width: 475px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 400px;\r\n }\r\n}\r\n\r\n@media (max-width: 425px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 350px;\r\n }\r\n}\r\n\r\n@media (max-width: 375px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 325px;\r\n }\r\n}\r\n\r\n@media (max-width: 350px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 300px;\r\n }\r\n}\r\n\r\n@media (max-width: 325px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 275px;\r\n }\r\n}\r\n";
35815
35815
  styleInject(css_248z$3);
35816
35816
 
35817
35817
  var _styleModuleImportMap$2 = {
@@ -35856,6 +35856,8 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
35856
35856
  systemPrompt = _ref$systemPrompt === void 0 ? '' : _ref$systemPrompt,
35857
35857
  _ref$contextMessagesC = _ref.contextMessagesCount,
35858
35858
  contextMessagesCount = _ref$contextMessagesC === void 0 ? 5 : _ref$contextMessagesC,
35859
+ _ref$contextChunks = _ref.contextChunks,
35860
+ contextChunks = _ref$contextChunks === void 0 ? 10 : _ref$contextChunks,
35859
35861
  mihelpAgentRef = _ref.mihelpAgentRef;
35860
35862
  var _useState = React.useState(false),
35861
35863
  _useState2 = _slicedToArray(_useState, 2),
@@ -35875,6 +35877,8 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
35875
35877
  setCollectionError = _useState8[1];
35876
35878
  var retryCount = React.useRef(0);
35877
35879
  var messagesContainerRef = React.useRef(null);
35880
+ var inputContainerRef = React.useRef(null);
35881
+ var spinnerRef = React.useRef(null);
35878
35882
  var _useState9 = React.useState(false),
35879
35883
  _useState10 = _slicedToArray(_useState9, 2),
35880
35884
  messageError = _useState10[0],
@@ -35936,7 +35940,11 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
35936
35940
  _useState34 = _slicedToArray(_useState33, 2),
35937
35941
  windowInnerWidthForMobile = _useState34[0],
35938
35942
  setWindowInnerWidthForMobile = _useState34[1];
35939
- var chatWindowHeight = 600; //update this if changed in css
35943
+ var _useState35 = React.useState(600),
35944
+ _useState36 = _slicedToArray(_useState35, 2),
35945
+ chatWindowHeight = _useState36[0],
35946
+ setchatWindowHeight = _useState36[1]; //update this if changed in css
35947
+
35940
35948
  var chatIconSize = 60; //update this if changed in css
35941
35949
 
35942
35950
  React.useEffect(function () {
@@ -35975,8 +35983,9 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
35975
35983
  };
35976
35984
  }, []);
35977
35985
  var handleStart = function handleStart(e) {
35986
+ var _e$target;
35978
35987
  var target = e.target;
35979
- if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || messagesContainerRef.current && messagesContainerRef.current.contains(target)) {
35988
+ if (inputContainerRef.current && inputContainerRef.current.contains(target) || messagesContainerRef.current && messagesContainerRef.current.contains(target) || spinnerRef.current && spinnerRef.current.contains(target) || e !== null && e !== void 0 && (_e$target = e.target) !== null && _e$target !== void 0 && _e$target.closest('#chatCloseIcon')) {
35980
35989
  return;
35981
35990
  }
35982
35991
  e.preventDefault();
@@ -35990,8 +35999,8 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
35990
35999
  });
35991
36000
  };
35992
36001
  var handleMove = function handleMove(e) {
35993
- var _e$target;
35994
- if (e !== null && e !== void 0 && (_e$target = e.target) !== null && _e$target !== void 0 && _e$target.closest('#chatCloseIcon')) return;
36002
+ var _e$target2;
36003
+ if (e !== null && e !== void 0 && (_e$target2 = e.target) !== null && _e$target2 !== void 0 && _e$target2.closest('#chatCloseIcon')) return;
35995
36004
  if (isDragging) {
35996
36005
  setDragged(true);
35997
36006
  var clientX = e.touches ? e.touches[0].clientX : e.clientX;
@@ -36023,12 +36032,16 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
36023
36032
  }
36024
36033
  }, [isDragging, position, showChatWindow]);
36025
36034
  React.useEffect(function () {
36026
- var isMobile = window.innerWidth < 575;
36027
- if (showChatWindow && isMobile && !dragged) {
36035
+ var isSmallDevice = windowInnerWidthForMobile < 1000;
36036
+ if (showChatWindow && isSmallDevice && !dragged) {
36028
36037
  adjustChatWindowPosition();
36029
36038
  }
36030
36039
  }, [position, dragged]);
36031
36040
  var adjustChatWindowPosition = function adjustChatWindowPosition() {
36041
+ if (chatWindowHeight + chatIconSize + 20 > window.innerHeight) {
36042
+ return setchatWindowHeight(window.innerHeight - chatIconSize - 20);
36043
+ }
36044
+ // if (chatWindowHeight + chatIconSize + 20 > window.innerHeight) return
36032
36045
  var bufferForMobile = window.innerWidth <= 575 ? 40 : 0;
36033
36046
  // let chatX = 0 - chatIconSize + bufferForMobile
36034
36047
  var chatX = 0 - chatIconSize;
@@ -36050,9 +36063,12 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
36050
36063
  });
36051
36064
  };
36052
36065
  var adjustChatIconPosition = function adjustChatIconPosition() {
36066
+ // if (chatWindowHeight + chatIconSize + 20 > window.innerHeight) {
36067
+ // return setchatWindowHeight(500)
36068
+ // }
36053
36069
  var newX = position.x;
36054
36070
  var newY = position.y;
36055
- var isMobile = windowInnerWidthForMobile < 575;
36071
+ var isSmallDevice = windowInnerWidthForMobile < 1000;
36056
36072
  var middleX = windowInnerWidthForMobile / 2; // Middle of the screen
36057
36073
  var closerToLeft = position.x < middleX; // Check if icon is closer to left or right
36058
36074
 
@@ -36067,7 +36083,7 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
36067
36083
  }
36068
36084
 
36069
36085
  // In Mobile, move chat icon to the nearest screen edge (left or right)
36070
- if (isMobile) {
36086
+ if (isSmallDevice) {
36071
36087
  newX = closerToLeft ? 70 : windowInnerWidthForMobile - 10;
36072
36088
  }
36073
36089
  if (newX !== position.x || newY !== position.y) {
@@ -36077,6 +36093,12 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
36077
36093
  });
36078
36094
  }
36079
36095
  };
36096
+ React.useEffect(function () {
36097
+ if (chatWindowHeight !== 600) {
36098
+ adjustChatWindowPosition();
36099
+ // adjustChatIconPosition()
36100
+ }
36101
+ }, [chatWindowHeight]);
36080
36102
  React.useEffect(function () {
36081
36103
  if (isDragging) {
36082
36104
  document.addEventListener('mousemove', handleMove);
@@ -36110,6 +36132,27 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
36110
36132
  adjustChatIconPosition();
36111
36133
  }
36112
36134
  }, [showChatWindow]);
36135
+ var saveCurrentContext = function saveCurrentContext(conversationsToBeSaved) {
36136
+ var _systemPrompts;
36137
+ var systemPrompts = conversationsToBeSaved.filter(function (c) {
36138
+ return (c === null || c === void 0 ? void 0 : c.role) === 'system';
36139
+ });
36140
+ var latestPrompt = ((_systemPrompts = systemPrompts[systemPrompts.length - 1]) === null || _systemPrompts === void 0 ? void 0 : _systemPrompts.content) || '';
36141
+ var match = latestPrompt.match(/<context>\s*([\s\S]*?)\s*<\/context>/);
36142
+ if (match) {
36143
+ var latestContext = {};
36144
+ try {
36145
+ latestContext = JSON.parse(match[1]);
36146
+ } catch (e) {
36147
+ console.log('context parse error', e);
36148
+ }
36149
+ if (!isEmpty$2(latestContext)) {
36150
+ setCurrentContext(latestContext);
36151
+ }
36152
+ } else {
36153
+ console.log('No context found');
36154
+ }
36155
+ };
36113
36156
  React.useEffect(function () {
36114
36157
  var conversationsFromSession = storage$1.getLocalItem('mihelpAgentConversations');
36115
36158
  var conversationsToBeSaved = !isEmpty$2(conversationsFromSession) ? conversationsFromSession : [];
@@ -36118,25 +36161,7 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
36118
36161
  var feedbacksToBeSaved = !isEmpty$2(feedbacksFromSession) ? feedbacksFromSession : {};
36119
36162
  setFeedbacks(feedbacksToBeSaved);
36120
36163
  if (conversationsToBeSaved.length) {
36121
- var _systemPrompts;
36122
- var systemPrompts = conversationsToBeSaved.filter(function (c) {
36123
- return (c === null || c === void 0 ? void 0 : c.role) === 'system';
36124
- });
36125
- var latestPrompt = ((_systemPrompts = systemPrompts[systemPrompts.length - 1]) === null || _systemPrompts === void 0 ? void 0 : _systemPrompts.content) || '';
36126
- var match = latestPrompt.match(/<context>\s*([\s\S]*?)\s*<\/context>/);
36127
- if (match) {
36128
- var latestContext = {};
36129
- try {
36130
- latestContext = JSON.parse(match[1]);
36131
- } catch (e) {
36132
- console.log('context parse error', e);
36133
- }
36134
- if (!isEmpty$2(latestContext)) {
36135
- setCurrentContext(latestContext);
36136
- }
36137
- } else {
36138
- console.log('No context found');
36139
- }
36164
+ saveCurrentContext(conversationsToBeSaved);
36140
36165
  }
36141
36166
  if (mihelpAgentRef && _typeof(mihelpAgentRef) === 'object') {
36142
36167
  mihelpAgentRef.current = {
@@ -36155,6 +36180,9 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
36155
36180
  var conversationsFromSession = JSON.parse(event.newValue);
36156
36181
  var conversationsToBeSaved = !isEmpty$2(conversationsFromSession) ? conversationsFromSession : [];
36157
36182
  setConversations(conversationsToBeSaved);
36183
+ if (conversationsToBeSaved.length) {
36184
+ saveCurrentContext(conversationsToBeSaved);
36185
+ }
36158
36186
  }
36159
36187
  if (event.key === 'mihelpAgentFeedbacks') {
36160
36188
  var feedbacksFromSession = JSON.parse(event.newValue);
@@ -36239,7 +36267,8 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
36239
36267
  messages: messagesWithOutId,
36240
36268
  collection: collection,
36241
36269
  last_n: contextMessagesCount,
36242
- appName: isCoreApp ? 'g2Home' : appAuthName
36270
+ appName: isCoreApp ? 'g2Home' : appAuthName,
36271
+ k: contextChunks
36243
36272
  };
36244
36273
  endpoint = (_storage$getLocalItem = storage$1.getLocalItem('opsportal-core:config')) === null || _storage$getLocalItem === void 0 ? void 0 : (_storage$getLocalItem2 = _storage$getLocalItem.endpoints) === null || _storage$getLocalItem2 === void 0 ? void 0 : _storage$getLocalItem2.mihelpChat;
36245
36274
  _context.next = 15;
@@ -36477,7 +36506,8 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
36477
36506
  className: "utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow",
36478
36507
  style: {
36479
36508
  left: "".concat(chatPosition.x, "px"),
36480
- top: "".concat(chatPosition.y, "px")
36509
+ top: "".concat(chatPosition.y, "px"),
36510
+ height: chatWindowHeight
36481
36511
  }
36482
36512
  }, /*#__PURE__*/React__default["default"].createElement("div", {
36483
36513
  className: "utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowHeader"
@@ -36638,6 +36668,7 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
36638
36668
  }, /*#__PURE__*/React__default["default"].createElement("p", null, "Oops! Something went wrong. Please try again."))))), /*#__PURE__*/React__default["default"].createElement("div", {
36639
36669
  className: "utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowFooter"
36640
36670
  }, /*#__PURE__*/React__default["default"].createElement("div", {
36671
+ ref: inputContainerRef,
36641
36672
  className: _getClassName("inputContainer ".concat(collectionError ? 'disabled' : ''), _styleModuleImportMap$2, {
36642
36673
  "handleMissingStyleName": "warn"
36643
36674
  })
@@ -36664,7 +36695,8 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
36664
36695
  },
36665
36696
  disabled: isLoading || collectionError
36666
36697
  })))), isFeedbackLoading && /*#__PURE__*/React__default["default"].createElement("div", {
36667
- className: "utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--spinner"
36698
+ className: "utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--spinner",
36699
+ ref: spinnerRef
36668
36700
  }, /*#__PURE__*/React__default["default"].createElement(coreComponents.Spinner, {
36669
36701
  size: "60px"
36670
36702
  }))), /*#__PURE__*/React__default["default"].createElement("span", {
@@ -47644,7 +47676,7 @@ var SCROLL = {
47644
47676
  var NO_SCROLL = {};
47645
47677
  var defaultSystemPrompt = 'Format all of the subsequent AI responses in valid HTML5, without markdown code blocks or any additional formatting, ensuring that the response consists only of raw HTML tags. Format your response in this structure:<html> <p> Your answer here </p> </html>';
47646
47678
  var AppFrame = function AppFrame(props) {
47647
- var _props$mihelpAgentPro, _props$mihelpAgentPro2, _props$mihelpAgentPro3, _props$mihelpAgentPro4, _props$mihelpAgentPro5;
47679
+ var _props$mihelpAgentPro, _props$mihelpAgentPro2, _props$mihelpAgentPro3, _props$mihelpAgentPro4, _props$mihelpAgentPro5, _props$mihelpAgentPro6;
47648
47680
  // Check if the child AppBar is mounted
47649
47681
  var _useState = React.useState(false),
47650
47682
  _useState2 = _slicedToArray(_useState, 2),
@@ -47667,6 +47699,7 @@ var AppFrame = function AppFrame(props) {
47667
47699
  _useState10 = _slicedToArray(_useState9, 2),
47668
47700
  showNavigationCounts = _useState10[0],
47669
47701
  setShowNavigationCounts = _useState10[1];
47702
+ var chatBotEnabledRef = React.useRef(false);
47670
47703
  var setChatBotEnableStatus = function setChatBotEnableStatus() {
47671
47704
  var coreAppConfig = storage$1.getLocalItem('opsportal-core:config');
47672
47705
  var tileData = findAppData(coreAppConfig.tiles, coreAppConfig.tileOverrides) || {};
@@ -47676,6 +47709,7 @@ var AppFrame = function AppFrame(props) {
47676
47709
  console.log("***chatBotEnabled=", chatBotEnabled, coreAppConfig);
47677
47710
  console.log("***isCoreRoute=", isCoreRoute, enableChatBot, window.location.pathname, !window.location.pathname.includes('embedded'));
47678
47711
  setChatBotEnabled(chatBotEnabled);
47712
+ chatBotEnabledRef.current = chatBotEnabled;
47679
47713
  };
47680
47714
 
47681
47715
  // useEffect(() => {
@@ -47705,17 +47739,28 @@ var AppFrame = function AppFrame(props) {
47705
47739
  });
47706
47740
  var isMobileLandscape = function isMobileLandscape() {
47707
47741
  var userAgent = navigator.userAgent || navigator.vendor || window.opera;
47708
- var isMobile = /android|iphone|ipod|blackberry|iemobile|opera mini/i.test(userAgent) && !/ipad|tablet|playbook|silk/i.test(userAgent);
47742
+ var isMobile = /android|iphone|ipod|blackberry|iemobile|opera mini/i.test(userAgent) && !/ipad|tablet|playbook|silk|mediapad/i.test(userAgent);
47743
+ var isSmallDevice = Math.min(screen.width, screen.height) <= 500;
47709
47744
  var isLandscape = window.innerWidth > window.innerHeight;
47710
- return isMobile && isLandscape;
47745
+ return isMobile && isLandscape && isSmallDevice;
47711
47746
  };
47712
47747
  React.useEffect(function () {
47713
47748
  var handleResize = function handleResize() {
47714
47749
  setIsLandscapeInMobile(isMobileLandscape());
47715
47750
  };
47751
+ var handleOrientationChange = function handleOrientationChange() {
47752
+ if (chatBotEnabledRef.current) {
47753
+ setChatBotEnabled(false);
47754
+ setTimeout(function () {
47755
+ setChatBotEnabled(true);
47756
+ }, 200);
47757
+ }
47758
+ };
47716
47759
  window.addEventListener("resize", handleResize);
47760
+ window.addEventListener("orientationchange", handleOrientationChange);
47717
47761
  return function () {
47718
- return window.removeEventListener("resize", handleResize);
47762
+ window.removeEventListener("resize", handleResize);
47763
+ window.removeEventListener("orientationchange", handleOrientationChange);
47719
47764
  };
47720
47765
  }, []);
47721
47766
 
@@ -47765,7 +47810,8 @@ var AppFrame = function AppFrame(props) {
47765
47810
  collection: props === null || props === void 0 ? void 0 : (_props$mihelpAgentPro2 = props.mihelpAgentProps) === null || _props$mihelpAgentPro2 === void 0 ? void 0 : _props$mihelpAgentPro2.collection,
47766
47811
  systemPrompt: (props === null || props === void 0 ? void 0 : (_props$mihelpAgentPro3 = props.mihelpAgentProps) === null || _props$mihelpAgentPro3 === void 0 ? void 0 : _props$mihelpAgentPro3.systemPrompt) || defaultSystemPrompt,
47767
47812
  contextMessagesCount: props === null || props === void 0 ? void 0 : (_props$mihelpAgentPro4 = props.mihelpAgentProps) === null || _props$mihelpAgentPro4 === void 0 ? void 0 : _props$mihelpAgentPro4.contextMessagesCount,
47768
- mihelpAgentRef: props === null || props === void 0 ? void 0 : (_props$mihelpAgentPro5 = props.mihelpAgentProps) === null || _props$mihelpAgentPro5 === void 0 ? void 0 : _props$mihelpAgentPro5.mihelpAgentRef
47813
+ contextChunks: props === null || props === void 0 ? void 0 : (_props$mihelpAgentPro5 = props.mihelpAgentProps) === null || _props$mihelpAgentPro5 === void 0 ? void 0 : _props$mihelpAgentPro5.contextChunksCount,
47814
+ mihelpAgentRef: props === null || props === void 0 ? void 0 : (_props$mihelpAgentPro6 = props.mihelpAgentProps) === null || _props$mihelpAgentPro6 === void 0 ? void 0 : _props$mihelpAgentPro6.mihelpAgentRef
47769
47815
  }))))));
47770
47816
  };
47771
47817
  AppFrame.defaultProps = {