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,GAAI,IAM1B,IAAM,UAAY,SACzC,C,qBCLA,IAfsB,SAAUkN,EAAK6e,EAAQ9jB,EAAI+jB,GAC7C,MAAMhjB,EAAKkc,SAASzP,cAAcsW,GAAU,OAY5C,OAXI7e,IACAlE,EAAG8N,UAAY5J,GAEfjF,GACAe,EAAGoiB,aAAa,KAAMnjB,GAEtB+jB,IACAhjB,EAAG8hB,UAAYkB,GAGnBhjB,EAAGoiB,aAAa,YAAa,GACtBpiB,CACX,C","sources":["webpack://apexchatwidgets/./widgets/core/hooks/setHexWithAlphaToSolid.js","webpack://apexchatwidgets/./widgets/exitpopup/EPUIController.js","webpack://apexchatwidgets/./widgets/exitpopup/RDEPUIController.js","webpack://apexchatwidgets/./widgets/exitpopup/ExitChatWindow.js","webpack://apexchatwidgets/./widgets/core/hooks/setEpWindowStyles.js","webpack://apexchatwidgets/./widgets/core/hooks/centerElement.js","webpack://apexchatwidgets/./widgets/core/hooks/addClass.js","webpack://apexchatwidgets/./widgets/core/hooks/addTargetBlankToAnchorString.js","webpack://apexchatwidgets/./widgets/core/hooks/hasClass.js","webpack://apexchatwidgets/./widgets/core/enums/BrandingWidget.js","webpack://apexchatwidgets/./widgets/core/hooks/underscore.js","webpack://apexchatwidgets/./widgets/core/extend.js","webpack://apexchatwidgets/./widgets/core/hooks/Branding.js","webpack://apexchatwidgets/./widgets/core/WidgetView.js","webpack://apexchatwidgets/./widgets/core/hooks/setTextColorBasedOnBg.js","webpack://apexchatwidgets/./widgets/core/hooks/createElement.js"],"sourcesContent":["function setHexWithAlphaToSolid(hexColor) {\r\n // Remove the \"#\" if it exists\r\n hexColor = hexColor.replace(\"#\", \"\");\r\n\r\n // If it's a 3-character hex, expand to 6 characters\r\n if (hexColor.length === 4) {\r\n hexColor = hexColor.split(\"\").map(x => x + x).join(\"\");\r\n }\r\n\r\n // Convert hex to RGB\r\n const r = parseInt(hexColor.substring(0, 2), 16);\r\n const g = parseInt(hexColor.substring(2, 4), 16);\r\n const b = parseInt(hexColor.substring(4, 6), 16);\r\n\r\n // Calculate luminance (lighter colors will have higher luminance)\r\n const luminance = 0.2126 * r + 0.7152 * g + 0.0722 * b;\r\n\r\n // If the color is light (luminance > 128), return it as is (no alpha blending)\r\n if (luminance > 128) {\r\n return `#${hexColor}`; // Return the original hex color without modification\r\n }\r\n\r\n // If it's a 4-character hex (with alpha), expand it\r\n if (hexColor.length === 8) {\r\n const a = parseInt(hexColor.substring(6, 8), 16) / 255; // Convert alpha to a 0-1 range\r\n\r\n // Blend with white (255, 255, 255) based on alpha\r\n const solidR = Math.round(r * a + (1 - a) * 255);\r\n const solidG = Math.round(g * a + (1 - a) * 255);\r\n const solidB = Math.round(b * a + (1 - a) * 255);\r\n\r\n // Return the solid color as hex\r\n return `#${solidR.toString(16).padStart(2, '0')}${solidG.toString(16).padStart(2, '0')}${solidB.toString(16).padStart(2, '0')}`;\r\n }\r\n\r\n // If it's just a solid 6-character hex, return it as is\r\n return `#${hexColor}`;\r\n}\r\n\r\n\r\nexport default setHexWithAlphaToSolid;","/*\r\n * a class specifically for EP UI handling\r\n */\r\nimport ChatUIController from '../core/ChatUIController';\r\nimport WidgetTypes from '../core/enums/WidgetTypes';\r\nimport TempCache from '../core/enums/TempCache';\r\nimport ParticipantIds from '../core/enums/ParticipantIds';\r\n//import FancyDropdown from '../core/FancyDropdown';\r\nimport UserIds from '../core/hooks/UserIds';\r\nimport { ScriptVisitorResponseStatus, ScriptsQuestionType } from '../core/enums/Enum';\r\nimport GlobalVariables from '../core/GlobalVariables';\r\nimport GetChatID from '../core/hooks/GetChatID';\r\nimport AgentImageHandler from '../core/hooks/AgentImageHandler';\r\nimport RunAsSoonAs from '../core/hooks/RunAsSoonAs';\r\nimport isEnterKeyPressed from '../core/hooks/isEnterKeyPressed';\r\nimport Cookies from '../core/hooks/Cookies';\r\nimport WidgetStates from '../core/hooks/WidgetStates';\r\nimport logIt from '../../logIt';\r\n\r\nexport default class EPUIController extends ChatUIController {\r\n constructor(options) {\r\n const opt = options;\r\n Object.assign(opt.elements, {\r\n textboxSelector: '.apex-input',\r\n // containerSelector: '.apex-popup-container',\r\n // minimizeSelector: '#apexchat-ep-minimize',\r\n agentTitle: '.apex-profile-usertitle', // participantsSelector\r\n clickSourceId: '.apex-powerdby',\r\n messagesContainerSelector: '.apex-transcript',\r\n typingIndicatorSelector: '.apex-agent',\r\n autoCompleteInput: '#apexchat #txtAutocompleteInput',\r\n // minimizeSelector: '.apex-ep-minimizestate',\r\n maximizeState: '.apex-ep-maximizestate',\r\n closeSelector: '.apex-popup-close',\r\n handlerImageSelector: '.Apex-agentImage',\r\n minimizedImage: '.apex-img-minimized-invite',\r\n companyTitle: '.apex-company-title',\r\n clicktoStart: '.apex-start-chat',\r\n minimizePoweredBy: '.apex-powerdby-minimized',\r\n popoutSelector: '.apex-ep-openpopup',\r\n clickSelector: '.apex-btn',\r\n soundControl: '.apex-msg-notification',\r\n soundMute: '.apex-sound-mute',\r\n soundUnmute: '.apex-sound-unmute',\r\n regionEditorContainer: '#apexchat_exitpopup_region_container',\r\n regionEditorContainerWrapper: `#${options.model.exitPopupRegionEditorContainerId}`,\r\n multiLanguage_dropdown_wrapperSelector: '.apexchat_ep_multilang_wrapper',\r\n multiLanguage_dropdown_container: 'apexchat_ep_multilang_dropdown_container',\r\n multiLanguage_dropdown_select: 'apexchat_ep_multilang_dropdown',\r\n inputContainerSelector: '.apex-msg-type',\r\n actionMenuStartSMSChat: '.switchto-text-chat',\r\n smsBottomSheetClose: '#livechat_bottom_sheet_sms_close'\r\n });\r\n opt.widget = WidgetTypes.EPUIController;\r\n opt.objectType = WidgetTypes.EPUIController;\r\n super(opt);\r\n this.mode = WidgetTypes.ExitPopup;\r\n this.chatStarted = false;\r\n }\r\n\r\n bind(state) {\r\n const me = this;\r\n if (state !== WidgetStates.ShownMinimized) {\r\n super.bind();\r\n }\r\n // me.$(me.options.elements.containerSelector, me.context).removeClass('apex-container-fix').show().css({\r\n // 'top': null, 'left': null\r\n // });\r\n if (!me.options.model.headerDisclaimer || me.options.model.headerDisclaimer.trim() == '') {\r\n // Added .trim() So if someone used 'Blank Spaces' this condition will catch it and will not show the header disclaimer\r\n me.$('.apexchat_ep_rd_additionalHeaderDisclaimer', me.context).hide();\r\n }\r\n me.$(me.options.elements.closeSelector, me.context).click(() => {\r\n ApexChat.preLoadedOptions = null; // dispense with it as DOM should load it on tis own - Zee\r\n // me.state.changeState({ origin: WidgetTypes.ExitPopup, toState: WidgetStates.Hidden });\r\n });\r\n me.$('#apexchat-ep', me.context).on('click', () => {\r\n me.$(me.options.elements.actionMenuSelector, me.context).hide();\r\n });\r\n if (!ApexChat.IsRoundedDynamicPlusTheme) {\r\n // finally, apply extra logic when shown\r\n me.$(me.options.elements.clickSourceId, me.context).html(me.options.model.poweredBy);\r\n me.$(me.options.elements.companyTitle, me.context).html(\r\n me.options.model.exitPopupChat.chatTitle\r\n );\r\n // handlerImageUrl should be coming from what was assigned in widgetbase.js\r\n me.$(me.options.elements.handlerImageSelector, me.context).attr(\r\n 'src',\r\n AgentImageHandler(me.options.model.handlerImageUrl)\r\n );\r\n me.$(me.options.elements.agentTitle, me.context).html(me.options.model.agentName);\r\n }\r\n me.hideOnlineAgent(); // CHAT-8631 check Enable Generic Aliasing handler is enabled and also scriptbot enabled then hide online tag.\r\n }\r\n\r\n hideOnlineAgent() {\r\n const me = this;\r\n const onlineAgentText = me.$(me.options.elements.agentOnlineText, me.context);\r\n const checkgenericHandlerScriptBot =\r\n me.options.model &&\r\n me.options.model.genericHandlerAliasingEnabled &&\r\n me.options.model.scriptBotEnabled &&\r\n onlineAgentText;\r\n if (checkgenericHandlerScriptBot) {\r\n onlineAgentText.hide();\r\n }\r\n }\r\n\r\n invokeKeyDown(e) {\r\n const me = this;\r\n // var e = jQuery.Event('keydown', { which: $.ui.keyCode.ENTER });\r\n // $(me.options.elements.textboxSelector).trigger(e);\r\n // var el = $(me.options.elements.textboxSelector, me.context);\r\n\r\n // $(me.options.elements.textboxSelector, me.context).keydown(e);\r\n }\r\n\r\n loadChatRoom(cb) {\r\n super.loadChatRoom(cb);\r\n }\r\n\r\n show(state) {\r\n const me = this;\r\n super.show(state);\r\n const isPageRefreshed = this.isPageRefreshed();\r\n if (ApexChat.options.exitpopup.chatbotGreetingMessages) {\r\n var script = structuredClone(ApexChat.options.exitpopup.chatbotGreetingMessages[0]);\r\n ApexChat.options.exitpopup.chatbotGreetingMessages[0].agentScript = script\r\n delete ApexChat.options.exitpopup.chatbotGreetingMessages[0].agentScript.agentScript\r\n ApexChat.options.exitpopup.chatbotGreetingMessages[0].agentScript.options = JSON.stringify(ApexChat.options.exitpopup.chatbotGreetingMessages[0].agentScript.options)\r\n\r\n ApexChat.options.exitpopup.chatbotGreetingMessages[0].agentScript.agentScriptOptions = JSON.stringify(ApexChat.options.exitpopup.chatbotGreetingMessages[0].agentScript.options)\r\n ApexChat.options.exitpopup.exitPopupMessages = ApexChat.options.exitpopup.chatbotGreetingMessages\r\n }\r\n const { exitPopupMessages } = ApexChat.options.exitpopup;\r\n exitPopupMessages.forEach(function (msg) {\r\n msg.message = me.fixDataBinding(msg.message);\r\n });\r\n if (!isPageRefreshed && state == WidgetStates.ShownMaximized) {\r\n if (exitPopupMessages.length > 0) {\r\n me.queuePredefinedQTs();\r\n } else {\r\n me.renderPredefinedMessages();\r\n }\r\n // appointment scheduler is set a predined QT then make chat room alive\r\n if (\r\n exitPopupMessages.length > 0 &&\r\n exitPopupMessages[0].questionType ==\r\n ScriptsQuestionType.AppointmentScheduler &&\r\n !me.isChatActive()\r\n ) {\r\n me.bindAppointmenSchedulePredefined.call(me);\r\n }\r\n }\r\n // Render predefined messages in page referesh case\r\n if (\r\n isPageRefreshed &&\r\n state === WidgetStates.ShownMaximized &&\r\n exitPopupMessages.length > 0 &&\r\n exitPopupMessages[0].questionType ==\r\n ScriptsQuestionType.AppointmentScheduler &&\r\n me.isChatActive()\r\n ) {\r\n if (exitPopupMessages.length > 0) {\r\n me.queuePredefinedQTs({ isPageRefreshed });\r\n } else {\r\n me.renderPredefinedMessages(isPageRefreshed);\r\n }\r\n }\r\n if (\r\n isPageRefreshed &&\r\n state === WidgetStates.ShownMaximized &&\r\n !me.isChatActive()\r\n ) {\r\n if (exitPopupMessages.length > 0) {\r\n me.queuePredefinedQTs({ isPageRefreshed });\r\n } else {\r\n me.renderPredefinedMessages(isPageRefreshed);\r\n }\r\n }\r\n // apply any css/html tweak here - optional\r\n }\r\n\r\n hide() {\r\n // ToDo: we need to implement this destroy functionality for other types as well.\r\n const me = this;\r\n // also dispens with all resources: nullify objects and remove event subscriptions\r\n me.questionTypeRenderer = null;\r\n me.clearAllSubscriptions();\r\n }\r\n\r\n pop() {\r\n super.pop();\r\n }\r\n\r\n end() {\r\n this.hide(); // now we want EP to just hide/close w/o ending the active chat\r\n this.state.changeState({\r\n origin: WidgetTypes.ExitPopup,\r\n toState: WidgetStates.Closed\r\n });\r\n }\r\n\r\n endChat() {\r\n const me = this;\r\n super.endChat();\r\n ApexChat.storageAPI.StoreTemp('livechat_exitpopup_is_closed', true);\r\n }\r\n\r\n endChatSession() {\r\n super.endChatSession();\r\n const me = this;\r\n\r\n me.state.changeState({\r\n origin: WidgetTypes.ExitPopup,\r\n toState: WidgetStates.Closed\r\n });\r\n }\r\n\r\n renderPredefinedMessages(isPageRefreshed) {\r\n ApexChat.storageAPI.Remove(TempCache.APEXCHAT_PRECHAT_MESSAGE_IDS_COOKIE); // JIRA_4341 - Pre-Chat message shouldn't append in EP\r\n super.renderPredefinedMessages({\r\n text: '',\r\n participantDisplayName: this.options.model.agentName,\r\n id: -2,\r\n userId: TempCache.EP_PREDEFINED_AGENT_ID,\r\n createdOn: new Date(),\r\n isPredefinedMsg: true,\r\n isPageRefreshed\r\n });\r\n }\r\n\r\n queuePredefinedQTs(isPageRefreshed) {\r\n ApexChat.storageAPI.Remove(TempCache.APEXCHAT_PRECHAT_MESSAGE_IDS_COOKIE); // JIRA_4341 - Pre-Chat message shouldn't append in EP\r\n super.queuePredefinedQTs({\r\n text: '',\r\n participantDisplayName: this.options.model.agentName,\r\n id: -2,\r\n userId: TempCache.EP_PREDEFINED_AGENT_ID,\r\n createdOn: new Date(),\r\n isPredefinedMsg: true,\r\n isPageRefreshed\r\n });\r\n }\r\n\r\n renderMultiLanguageDropDown(config) {\r\n super.renderMultiLanguageDropDown(config);\r\n }\r\n\r\n implementMultiLanguageSupport(config) {\r\n const me = this;\r\n if (!me.options.model.showMultiLangDropDown || me.nonSMSLanguages.length <= 1) {\r\n me.multiLanguage_dropdown_wrapper.style.display = 'none';\r\n return;\r\n }\r\n // FancyDropdown({\r\n // context: me.context,\r\n // containerId: config.containerId, // Container ID of container in which dropdown exist.\r\n // dropdownId: config.dropdownId, // dropdown ID\r\n // model: me.nonSMSLanguages, // Data model which should contain value and text which you wanna render\r\n // value: 'threeLetterISOLanguageName', // In your Data model the specific property you wanna show for value field\r\n // innerHTML: 'languageFullName', // In your Data model the specific property you wanna show for innerHTML Text field\r\n // onSelect() {\r\n // // on click of dropdown or selection.\r\n // const multiLangDropDown = me.context.getElementById(config.dropdownId);\r\n // me.chatLanguageName =\r\n // multiLangDropDown.options[multiLangDropDown.selectedIndex].text;\r\n // TempCache.chatLanguage = multiLangDropDown.value;\r\n // me.requestTransferringChat(config);\r\n // },\r\n // onComplete() {\r\n // // after render callback\r\n // ApexChat.addClass(\r\n // me.context.getElementsByClassName('apex-msg-notification')[0],\r\n // 'apex-msg-notification-with-multilang'\r\n // );\r\n // ApexChat.addClass(\r\n // me.context.getElementsByClassName('apex-agent')[0],\r\n // 'apex-agent-with-multilang'\r\n // );\r\n // // Ref. CHAT-5206\r\n // const soundIcon = me.context.getElementById('apex-msg-audio-notification');\r\n // if (soundIcon) {\r\n // soundIcon.style.cssText = 'top:-16px !important;';\r\n // }\r\n // const langSelect = me.context.getElementById(config.containerId);\r\n // if (langSelect) {\r\n // langSelect.style.cssText = 'left: auto !important;';\r\n // }\r\n // }\r\n // });\r\n }\r\n\r\n sendMessage(el) {\r\n const me = this;\r\n const text = me.$(el || me.messageInput, me.context);\r\n let v = text.val().trim();\r\n const isChatEnded = ApexChat.storageAPI.Get('livechat_exitpopup_is_closed');\r\n\r\n\r\n if (v == '' && me.messageInputText != '') {\r\n v = me.messageInputText;\r\n me.messageInputText = '';\r\n }\r\n if (!v || v.replace(/\\s/g, '') === '' || v == text.attr('title')) {\r\n return;\r\n }\r\n const isPredefinedResponse = !me.firstMsgSent && !me.isChatroomAlive(); // no 1st msg sent and no chatroom, it's gotta be 1st response to the predef\r\n if (me.QTRendererExt && me.QTRendererExt.isLastMessageFullText()) {\r\n me.QTRendererExt.validateFullTextMessage(v, {\r\n isPredefinedResponse\r\n }); // just validate and return\r\n return; // we are separately handling Fulltext scenario in handleFullTextType()\r\n }\r\n if (!me.firstMsgSent) {\r\n // cache the upfront 1st predef response by visitor to be sent along with predef below\r\n me.preserveChatArray.push({\r\n index: me.preserveChatArray.length + 1,\r\n text: v,\r\n userId: ParticipantIds.visitor,\r\n isPredefinedResponse,\r\n createdOn: new Date(),\r\n participantDisplayName: 'Visitor',\r\n participantId: ParticipantIds.visitor,\r\n agentParticipantId: ParticipantIds.predefined\r\n });\r\n }\r\n // check chatroom alive, and push them as soon as it's available\r\n if (\r\n me.preserveChatArray.length > 0 &&\r\n me.options &&\r\n me.options.msg &&\r\n me.options.msg.questionType == ScriptsQuestionType.AppointmentScheduler &&\r\n me.isChatroomAlive()\r\n ) {\r\n if (!me.isPreDefinedMessagesSent) {\r\n me.publishPredefinedMessages(() => {\r\n me.preserveChatArray = []; // clear\r\n });\r\n }\r\n } else {\r\n // wait for a chatroom, and push them as soon as it's available\r\n if (me.preserveChatArray.length > 0) {\r\n RunAsSoonAs(\r\n () => {\r\n if (!me.isPreDefinedMessagesSent) {\r\n me.publishPredefinedMessages(() => {\r\n me.startWaiting();\r\n me.room.sendLive();\r\n me.preserveChatArray = []; // clear\r\n });\r\n me.showTyptingIndicatorForAIBot(me);\r\n }\r\n },\r\n () => me.isChatroomAlive()\r\n );\r\n return; // for the v 1st msg bail out\r\n }\r\n }\r\n // for any subsequent messages\r\n super.sendMessage(v);\r\n if (me.QTRendererExt && me.QTRendererExt.isLastPhoneTypeValidated()) {\r\n // Do not empty the input field if phone number is invalid\r\n return;\r\n }\r\n text[0].value = ''\r\n }\r\n\r\n /**\r\n * overloaded version of onMessageTyping in widgetbase.js to write separate logic for EP\r\n * @param {any} e\r\n */\r\n onMessageTyping(e) {\r\n const me = this;\r\n const autoComplete = me.$(me.autoCompleteInput).is(':visible') ? me.$(me.autoCompleteInput) : null;\r\n try {\r\n me.isUserTyping = true;\r\n if (isEnterKeyPressed(e)) {\r\n // if (me.room && me.room.isConnectionEstablished) {//now that visitor can shoot a message w/o an active chat connection, we must not let onMessageTyping sendMessage\r\n logIt('EP::sending msg on typing');\r\n me.sendMessage(autoComplete);\r\n window.clearTimeout(me.timeout);\r\n me.typing = false;\r\n if (me.isChatroomAlive()) {\r\n me.room.sendTyping(false);\r\n }\r\n e.preventDefault();\r\n // const text = [];\r\n } else if (me.room) {\r\n me.sendTyping(e);\r\n }\r\n } catch (ex) {\r\n console.log(ex.message);\r\n }\r\n }\r\n\r\n simulatePlainTextPredefinedResponse(msg) {\r\n const me = this;\r\n me.onMessageArrived({\r\n id: GlobalVariables.predefinedMessageId,\r\n userId: ParticipantIds.visitor,\r\n createdOn: new Date(),\r\n participantDisplayName: 'Visitor',\r\n text: msg.msgText,\r\n allowDupe: false,\r\n isFirstPredefinedMsgResponse: true,\r\n participantId: ParticipantIds.visitor,\r\n showTime: true // show time for simulated message\r\n });\r\n }\r\n\r\n resetCurrentEPState() {\r\n const me = this;\r\n Cookies.del('livechat_exitpopup_is_closed');\r\n me.state.changeState({\r\n origin: WidgetTypes.ExitPopup,\r\n toState: WidgetStates.ShownMaximized\r\n });\r\n ApexChat.storageAPI.Store(TempCache.IS_PAGE_REFRESHED, false);\r\n }\r\n\r\n startNewChatForEP() {\r\n const me = this;\r\n me.isUserTyping = false; // when new chat start user typing must be false\r\n me.room = null; // chat room should be null\r\n me.isPreDefinedMessagesSent = false; // assign false value when new chat start\r\n me.reInitializeChat();\r\n me.hideReInitOverlay('#apexchat_reinit_chat_ep');\r\n }\r\n\r\n showChatEndedNotificationEP() {\r\n const me = this;\r\n me.optInConsentTaken = false;\r\n const epReinitInner = me.$('#apexchat_reinit_chat_ep', me.context);\r\n const epReinitWrapper = epReinitInner.parent('.apexchat_reinit_chat_wrapper_ep');\r\n epReinitWrapper.addClass('livechat_reinit_show');\r\n epReinitInner.css('display', 'block');\r\n setTimeout(function () {\r\n epReinitInner.addClass('apexchat_optin_concent_show');\r\n });\r\n me.$('.apexchat_closebtn_ep', me.context).bind('click', () => {\r\n me.hideReInitOverlay('#apexchat_reinit_chat_ep');\r\n epReinitInner.removeClass('apexchat_optin_concent_show');\r\n epReinitWrapper.removeClass('livechat_reinit_show');\r\n });\r\n me.ADAHandler(\r\n me.context.querySelector('.apexchat_closebtn_ep'),\r\n me.hideReInitOverlay.bind2(me, '#apexchat_reinit_chat_ep')\r\n );\r\n me.ADAHandler(me.context.querySelector('.apexchat_new_chat_start_ep'), () => {\r\n me.startNewChatForEP();\r\n epReinitWrapper.removeClass('livechat_reinit_show');\r\n });\r\n me.$('.apexchat_new_chat_start_ep', me.context).bind('click', () => {\r\n me.startNewChatForEP();\r\n epReinitWrapper.removeClass('livechat_reinit_show');\r\n });\r\n }\r\n\r\n handleExitPopupPredefinedQT(res, isFromPreChat) {\r\n const me = this;\r\n // simulate predefined selection without delay.\r\n if (!res.isSkipped) {\r\n if (\r\n res.questionType == ScriptsQuestionType.TimeCalendar ||\r\n res.questionType == ScriptsQuestionType.Text\r\n ) {\r\n if (!me.responseArray) {\r\n me.responseArray = new Array(); // create an array object\r\n res.predefinedMessageId = GlobalVariables.predefinedMessageId; // simulate first message to assign predefined message id\r\n } else {\r\n res.predefinedMessageId = --GlobalVariables.predefinedMessageId; // to remove duplication predefined message id\r\n }\r\n me.responseArray.push(res); // push item in array item and pass it to the function to execute handle question functionality\r\n }\r\n me.simulatePredefinedResponse(res);\r\n if (\r\n me.firstMsgSent &&\r\n (res.questionType == ScriptsQuestionType.TimeCalendar ||\r\n res.questionType == ScriptsQuestionType.Text)\r\n ) {\r\n // when QT is time calendar and first message are render then avoid to run below statement\r\n return;\r\n }\r\n }\r\n me.firstMsgSent = true;\r\n // In case of RD EP Predefined msg of QT, the poke message job was not stopping and causing the CHAT-9148\r\n if (me.pokeMessageJob) {\r\n // in case of RD EP\r\n me.pokeMessageJob?.stop(); // after first response, the pokeMessage job for predefinned is over\r\n }\r\n me.reInitChatSubscribeForEP = false;\r\n if (GetChatID(me.options)) {\r\n // check chatId is created\r\n me.publishedPredefinedMessages(res, isFromPreChat);\r\n } else {\r\n // create room then call back.. recusive\r\n me.options.execChatStartHandler(() => {\r\n me.publishedPredefinedMessages(res, isFromPreChat);\r\n });\r\n }\r\n }\r\n\r\n // handle comma separted QTs\r\n handleQTCommaSepartedRow(m, res, isFromPreChat) {\r\n const me = this;\r\n me.responseArray.forEach((option) => {\r\n setTimeout(() => {\r\n me.hasAnswerInQTChatLogIdToBeUpdated = true;\r\n res = option;\r\n res.isExitPopupPredefinedMessage = false;\r\n res.participantDisplayName = me.options.agentName || me.options.model.agentName;\r\n res.agentParticipantId = ParticipantIds.predefined; // CHAT-6370 predefined participantId -4\r\n res.userId = UserIds.simulated;\r\n res.visitorResponseStatus = ScriptVisitorResponseStatus.Answered;\r\n res.visitorSelectedOptions = `[{ \"option\": \"${res.msgText}\"}]`;\r\n res.chatLogId = m.id;\r\n res.isPredefinedResponse = me.isPredefinedResponse || false;\r\n me.handleQuestionType(res, isFromPreChat);\r\n }, 500);\r\n });\r\n }\r\n\r\n // check chatRoom loaded\r\n publishedPredefinedMessages(res, isFromPreChat) {\r\n const me = this;\r\n me.checkChatRoomLoaded(() => {\r\n // publish previously rendered messages here.\r\n me.publishPredefinedMessages((m) => {\r\n if (\r\n !me.hasAnswerInQTChatLogIdToBeUpdated &&\r\n m.questionType > ScriptsQuestionType.None\r\n ) {\r\n // when QT time calendar then execute below function\r\n if (\r\n m.questionType == ScriptsQuestionType.TimeCalendar ||\r\n m.questionType == ScriptsQuestionType.Text\r\n ) {\r\n me.handleQTCommaSepartedRow(m, res, isFromPreChat);\r\n } else {\r\n me.hasAnswerInQTChatLogIdToBeUpdated = true;\r\n res.isExitPopupPredefinedMessage = false;\r\n res.participantDisplayName =\r\n me.options.agentName || me.options.model.agentName;\r\n res.agentParticipantId = ParticipantIds.predefined; // CHAT-6370 predefined participantId -4\r\n res.userId = UserIds.simulated;\r\n res.visitorResponseStatus = ScriptVisitorResponseStatus.Answered;\r\n res.visitorSelectedOptions = `[{ \"option\": \"${res.msgText}\"}]`;\r\n res.chatLogId = m.id;\r\n res.isPredefinedResponse = me.isPredefinedResponse || false;\r\n res.questionTypeChatLogIdToBeUpdated = m.id;\r\n me.handleQuestionType(res, isFromPreChat);\r\n }\r\n }\r\n });\r\n });\r\n }\r\n\r\n // because, EP's FT could occur as v 1st predef msg, so we want EP to override widgetbase's handleFullTextType to do custom/additional job of sending it\r\n handleFullTextType(options) {\r\n const me = this;\r\n // $txt = me.$(el || me.messageInput, me.context);\r\n const res = options && options.res;\r\n const cb = options && options.cb;\r\n const isPredefinedResponse = res && res.isPredefinedResponse;\r\n const isSkippable = res && res.isSkipped;\r\n if (isSkippable === true) {\r\n me.skipFullTextType(res);\r\n return;\r\n }\r\n // make sure Chat Is Active and In Progress before sending the message to Websync\r\n if (!me.QTRendererExt.isLastFullTextValidated) {\r\n return;\r\n }\r\n RunAsSoonAs(\r\n () => {\r\n if (isPredefinedResponse) {\r\n me.publishPredefinedMessages((m) => {\r\n me.preserveChatArray = []; // clear\r\n logIt('FT::sent');\r\n me.room.sendMessage({\r\n chatMsg: res.msgText,\r\n isGreeting: res.isGreeting,\r\n shouldRenderResponseAsText: true,\r\n isPredefinedResponse,\r\n questionTypeChatLogIdToBeUpdated: m.id,\r\n onSuccess(data) {\r\n // on success of websync publish\r\n // if (isPredefinedResponse) {\r\n res.chatLogId = m.id;\r\n // // res.questionTypeChatLogIdToBeUpdated = data.id;\r\n // }\r\n logIt('FT::publishing EP FT Pred...');\r\n me.room.publishQuestionTypeResponse(res, cb);\r\n }\r\n });\r\n });\r\n }\r\n // logIt('FT::publishing FT res? ' + isPredefinedResponse);\r\n if (isPredefinedResponse) {\r\n return;\r\n }\r\n me.room.sendMessage({\r\n chatMsg: res.msgText,\r\n isGreeting: res.isGreeting,\r\n shouldRenderResponseAsText: true,\r\n isPredefinedResponse,\r\n questionTypeChatLogIdToBeUpdated: res.questionTypeChatLogIdToBeUpdated,\r\n onSuccess() {\r\n // on success of websync publish\r\n logIt('FT::publishing DOM/EP FT...');\r\n me.room.publishQuestionTypeResponse(res, cb);\r\n }\r\n });\r\n if (me.autoCompleteInput) {\r\n me.autoCompleteInput.value = ''; // clear text area when response submitted\r\n }\r\n },\r\n () =>\r\n // logIt('FT::handleFullTextType waiting for chatrrom connection...');\r\n me.isChatroomAlive() == true\r\n );\r\n }\r\n fixDataBinding(dataBindingTerm) {\r\n // FogBugs [2292] - START - Agent name and company name should be picked up dynamically as in classical widget.\r\n if (\r\n dataBindingTerm.indexOf('<#=companyName#>') !== -1 ||\r\n dataBindingTerm.indexOf('<#=companyName#>') !== -1\r\n ) {\r\n dataBindingTerm = dataBindingTerm\r\n .replace(/<#=companyName#>/g, this.options.model.companyName)\r\n .replace(/<#=companyName#>/g, this.options.model.companyName);\r\n }\r\n if (\r\n dataBindingTerm.indexOf('<#=agentName#>') !== -1 ||\r\n dataBindingTerm.indexOf('<#=agentName#>') !== -1\r\n ) {\r\n dataBindingTerm = dataBindingTerm\r\n .replace(/<#=agentName#>/g, this.options.model.agentName)\r\n .replace(/<#=agentName#>/g, this.options.model.agentName);\r\n }\r\n return dataBindingTerm;\r\n // FogBugs [2292] - END - Agent name and company name should be picked up dynamically as in classical widget.\r\n }\r\n}\r\n","/*\r\n * a class specifically for RD EP UI handling\r\n */\r\nimport EPUIController from './EPUIController';\r\nimport WidgetTypes from '../core/enums/WidgetTypes';\r\nimport TempCache from '../core/enums/TempCache';\r\n// import PokeMessageJob from '../PokeMessageJob';\r\nimport Utils from '../core/Utils';\r\nimport ChatMode from '../core/hooks/ChatMode';\r\nimport { LogoLocation } from '../core/enums/Enum';\r\nimport TempStorageCache from '../core/hooks/TempStorageCache';\r\nimport createElement from '../core/hooks/createElement';\r\nimport ChatEvents from '../core/hooks/ChatEvents';\r\nimport WidgetStates from '../core/hooks/WidgetStates';\r\nimport getStorageAPIValue from '../core/hooks/getStorageAPIValue';\r\nimport showElement from '../core/hooks/showElement';\r\nimport disableTypingInput from '../core/hooks/disableTypingInput';\r\nimport logIt from '../../logIt';\r\nimport applyResizeClassOnInput from '../core/hooks/resizeChatInput';\r\nimport toggleSendButtonClasses from '../core/hooks/toggleSendButton';\r\n\r\nexport default class RDEPUIController extends EPUIController {\r\n constructor(options) {\r\n super(options);\r\n const me = this;\r\n me.options = options;\r\n Object.assign(me.options.elements, {\r\n multiLanguage_dropdown_wrapperSelector: '.apexchat_rd_ep_language_select_wrapper',\r\n multiLanguage_dropdown_container: 'apexchat_rd_ep_language_select_wrapper',\r\n multiLanguage_dropdown_select: 'apexchat_rd_ep_language_select',\r\n emoticonsAreaSelector: '.livechat_emoticons_area_content',\r\n clickSelector: '#livechat_send_message_button',\r\n closeSelector: '.apex-ep-closemodel',\r\n typingIndicatorSelector: '.apexchat_rd_ep_typing',\r\n agentTitle: '.apex-profile-agent', // participantsSelector\r\n regionLabelSelector: '.apex-ep-rd-phone',\r\n rDEPHeaderLogoURLSelector: '.apex_rd_apex_title_logo',\r\n emojiIconSelector: '.livechat_emoticons_area',\r\n emojiContentSelector: '.livechat_emoticons_area_content',\r\n sidePanelHeaderText: '#apexchat-ep #apexchat-span-greeting',\r\n sidePanelWelcomeText: '#apexchat-ep .apex_rd_ep_hello_title',\r\n agentOnlineText: '.apex-profile-agent-online',\r\n textboxContainerSelector: '#apexchat-ep .apex-msg-wrapper',\r\n actionMenuSelector: '#apexchat_custom_dropdown_menu'\r\n });\r\n me.options.model.isRoundedDynamic = true;\r\n me.rdActionButtons();\r\n\r\n // [V3 - RD - EP] Profile level custom logo for header\r\n const rDEPHeaderLogoURL = me.$(me.options.elements.rDEPHeaderLogoURLSelector, me.context);\r\n me.options.model.rDEPHeaderLogoURL =\r\n me.options.model.rDEPHeaderLogoURL || 'apexchat-logo.png'; // default sample logo\r\n me.setLogoLocation({\r\n location: me.options.model.rDEPLogoLocation,\r\n logoUrl: me.options.model.rDEPHeaderLogoURL,\r\n logoSize: `${me.options.model.rDEPLogoSize}%`\r\n });\r\n me.options.model.rDEPLogoSize = me.options.model.rDEPLogoSize || '50';\r\n if (me.options.model.rDEPHeaderLogoURL.indexOf('apexchat-logo.png') === -1) {\r\n rDEPHeaderLogoURL.css({\r\n 'background-image': `url(${encodeURI(me.options.model.rDEPHeaderLogoURL)})`,\r\n 'background-size': `${me.options.model.rDEPLogoSize}%`\r\n });\r\n // summary: else if is introduced in case of those skins who are old have have not setup profile level header logo\r\n // and are still using the old themebuilder based logo.\r\n } else if (me.options.model.rDEPHeaderLogoURL.indexOf('apexchat-logo.png') > -1) {\r\n // apexchat-logo is the default logo which appears when there is no logo in profile setup\r\n rDEPHeaderLogoURL.css({\r\n 'background-size': `${me.options.model.rDEPLogoSize}%`\r\n });\r\n }\r\n // ExitPopup Side Panel content is dynamic here we are no longer using hardcoded values.\r\n me.options.model.sidePanelHeaderText =\r\n me.options.model.sidePanelHeaderText || TempCache.EP_SIDEPANEL_HEADER_TEXT; // for safe-side if value null, we are using default value.\r\n me.options.model.sidePanelWelcomeText =\r\n me.options.model.sidePanelWelcomeText || TempCache.EP_SIDEPANEL_WELCOME_TEXT;\r\n // For non Rd Plus Theme\r\n if (!ApexChat.IsRoundedDynamicPlusTheme) {\r\n const regionLabel = me.$(me.options.elements.regionLabelSelector, me.context);\r\n if (me.options.model.regionLabel) {\r\n regionLabel.text(me.options.model.regionLabel);\r\n }\r\n me.$(me.options.elements.sidePanelHeaderText, me.context).html(\r\n me.options.model.sidePanelHeaderText\r\n );\r\n me.$(me.options.elements.sidePanelWelcomeText, me.context).html(\r\n me.options.model.sidePanelWelcomeText\r\n );\r\n }\r\n\r\n me.changeFontSize(\r\n me.options.elements.sidePanelHeaderText,\r\n 'apexchat_ep_side_header_small_font',\r\n 18\r\n );\r\n me.changeFontSize(\r\n me.options.elements.sidePanelWelcomeText,\r\n 'apexchat_ep_side_welcome_small_font',\r\n 29\r\n );\r\n\r\n const innerWrapper = me.$(\r\n `#${WidgetTypes.ExitPopup + WidgetStates.ShownMaximized}`,\r\n me.context\r\n );\r\n innerWrapper.css('cssText', 'bottom: 30px !important;position:absolute; right: 25px'); // CHAT-5421 {V3] RD EP language drop down is being cut off.\r\n\r\n const helloRegion = me.$('#apexchat-ep #apexchat-span-hello .apex_rd_ep_hello', me.context);\r\n helloRegion.css('cssText', 'top: 40px;');\r\n // registering emoji events\r\n me.addEmojiEvents();\r\n if (me.options.model.scriptBotEnabled) {\r\n import(/* webpackChunkName: \"pokeMessageJob\" */ '../pokeMessage/PokeMessageJob').then(\r\n (module) => {\r\n const PokeMessageJob = module.default;\r\n me.pokeMessageJob = new PokeMessageJob(\r\n Object.assign(me.options, {\r\n isChatActive: me.isChatActive,\r\n isPageRefreshed: me.isPageRefreshed,\r\n postMessage: me.postMessage,\r\n preserveChatArray: me.preserveChatArray\r\n })\r\n );\r\n }\r\n );\r\n }\r\n me.subscribe(ChatEvents.onOperatorNotAvailable, () => {\r\n me.$(me.options.elements.transferChatSelector, me.context).remove();\r\n });\r\n me.subscribe(ChatEvents.OnChatTransferredToOperator, () => {\r\n me.options.model.aiBotEnabled = false;\r\n me.setTransferredToLiveAgent();\r\n me.$(me.options.elements.transferChatSelector, me.context).remove();\r\n if (\r\n me.multiLanguage_dropdown_wrapper &&\r\n me.options.model.showMultiLangDropDown &&\r\n me.nonSMSLanguages.length > 1\r\n ) {\r\n showElement(me.multiLanguage_dropdown_wrapper, true);\r\n }\r\n me.adjustRdActionMenu();\r\n });\r\n me.subscribe(ChatEvents.OnPredefinedCompleted, (args) => {\r\n if (me.options.model.scriptBotEnabled) {\r\n if (!me.isChatActive()) {\r\n me.pokeMessageJob?.start(); // Start Poke Messages when all predefined messages appeared.\r\n }\r\n }\r\n });\r\n me.adjustRdActionMenu();\r\n }\r\n\r\n // toggles new action icons based on chatMode and scriptBotEnabled flags\r\n // 1- show only Restart Chat icon if chatMode==Windowed\r\n // 2- show new Rd menu for Dom with Restart and popout items if scriptBotEnabled=true\r\n // 3- show just popout icon for DOM if scriptBotEnabled=false\r\n adjustRdActionMenu() {\r\n const me = this;\r\n // TODO: This function should not be executed when chatMode is Exit popup. we have to remove this function in exit popup case\r\n const reShowIntervalWindowed =\r\n me.options.reShowIntervalMinutes || me.options.model.reShowIntervalMinutes;\r\n if (\r\n me.isWindowedStarted() ||\r\n (me.options.chatMode && me.options.chatMode == ChatMode.Windowed)\r\n ) {\r\n // me.$('.apexchat_header_dropdown:not(.apexchat_tooltip)', me.context).remove();\r\n if (!me.options.model.scriptBotEnabled && !me.options.model.hasSmsNumber) {\r\n me.hideScriptbotMenuItems();\r\n me.$('.livechat_Headericon_wrapper', me.context).hide();\r\n me.$('.apexchat_header_dropdown', me.context).hide();\r\n } else if (me.isTransferredToLiveAgent()) {\r\n me.$('.apexchat_restartbutton', me.context).hide();\r\n if (reShowIntervalWindowed) {\r\n setTimeout(() => {\r\n me.rdWindowedActionButtons();\r\n }, reShowIntervalWindowed * 60 * 1000);\r\n }\r\n } else {\r\n me.hideScriptbotMenuItems();\r\n me.$('.apexchat_header_mute_button', me.context).hide();\r\n if (reShowIntervalWindowed) {\r\n setTimeout(() => {\r\n me.rdWindowedActionButtons();\r\n }, reShowIntervalWindowed * 60 * 1000);\r\n }\r\n }\r\n if (me.isTransferredToLiveAgent()) {\r\n me.$('.apexchat_restartbutton', me.context).hide();\r\n me.$('#menuItemRestart', me.context).hide();\r\n me.$('#menuItemRestart', me.context).hide();\r\n if (!me.options.model.hasSmsNumber) {\r\n me.$('.apexchat_header_mute_button', me.context).show();\r\n me.$('.apexchat_header_dropdown', me.context).hide();\r\n } else {\r\n me.$('.apexchat_header_mute_button', me.context).hide();\r\n }\r\n }\r\n } else {\r\n me.rdActionButtons();\r\n if (me.options.model.scriptBotEnabled || me.options.model.hasSmsNumber) {\r\n me.$('.apexchat_header_mute_button', me.context).hide();\r\n me.hideScriptbotMenuItems();\r\n } else if (!me.options.model.scriptBotEnabled) {\r\n me.$('.apexchat_header_dropdown', me.context).hide();\r\n me.$('.apexchat_focus_remove', me.context).hide();\r\n } else {\r\n me.rdActionButtons();\r\n }\r\n if (me.isTransferredToLiveAgent()) {\r\n me.$('#menuItemRestart', me.context).hide();\r\n me.$('.apexchat_header_mute_button', me.context).show();\r\n me.$('.apexchat_header_dropdown', me.context).hide();\r\n me.$('#menuItemRestart', me.context).hide();\r\n }\r\n }\r\n }\r\n\r\n hideScriptbotMenuItems() {\r\n const me = this;\r\n if (!me.options.model.scriptBotEnabled) {\r\n me.$('#menuItemRestart', me.context).hide();\r\n me.$('#menuItemTransfer', me.context).hide();\r\n }\r\n }\r\n changeFontSize(element, fontCss, length) {\r\n // change font size depend upon length of text.\r\n const me = this;\r\n me.$(element, me.context).each(function () {\r\n const el = me.$(this);\r\n const textLength = el.html().length;\r\n if (textLength > length) {\r\n el.addClass(fontCss);\r\n }\r\n });\r\n }\r\n\r\n setLogoLocation(options) {\r\n const me = this;\r\n switch (options.location) {\r\n case LogoLocation.Header:\r\n me.$('#apexchat-rd-logo-wrapper', me.context).show();\r\n me.$('#apexchat_ep_brand_logo', me.context).hide();\r\n break;\r\n case LogoLocation.Side: // do here\r\n me.$('#apexchat_ep_brand_logo', me.context).show();\r\n // we need to hide these specifc\r\n me.$('.apex_rd_apex_title_logo', me.context).hide();\r\n me.$('#apexchat-rd-logo-wrapper svg', me.context).css('opacity', '0');\r\n me.$('#apexchat-span-hello', me.context).hide();\r\n me.$('#apexchat_ep_img_brand_logo', me.context).attr('src', options.logoUrl);\r\n me.$('#apexchat_ep_img_brand_logo', me.context).css('width', options.logoSize);\r\n break;\r\n }\r\n }\r\n\r\n showTyping(args) {\r\n const me = this;\r\n me.typingIndicator.show();\r\n }\r\n\r\n hideTyping(args) {\r\n const me = this;\r\n me.typingIndicator.hide();\r\n }\r\n\r\n onTypingArrived(args, self) {\r\n const me = this;\r\n // TODO: will implement UI after integrating with Mahad's PR changes\r\n // var msgs = me.$('.apexchat_auto_genned_message_wrapper', me.context);\r\n // var msgCount = msgs.length;\r\n // var lastMsg = msgs[msgCount - 1];\r\n // var indicator = me.$(\"
\", me.context);\r\n // msgs.append(indicator);\r\n // logIt(args);\r\n // if (args.indicator) {\r\n // me.typingIndicator.show();\r\n // }\r\n // else {\r\n // me.typingIndicator.hide();\r\n // }\r\n if (args.indicator) {\r\n // restarting chat sets messages container's html empty removing typing indicator as well therefore checking and adding it again if removed\r\n if (!me.$('.apexchat_rd_ep_typing', me.context).length) {\r\n me.messagesContainer.append(me.typingIndicator.prop('outerHTML'));\r\n me.typingIndicator = me.$('.apexchat_rd_ep_typing', me.context);\r\n }\r\n me.typingIndicator.show().removeClass('disabled');\r\n } else {\r\n me.typingIndicator.addClass('disabled');\r\n // me.$('.apexchat_rd_chat_typing', me.context).hide();\r\n }\r\n me.autoScroll();\r\n }\r\n\r\n onMessageArrived(m, initialLoad, index, lastSplitMsgCallback) {\r\n const me = this;\r\n super.onMessageArrived(m, initialLoad, index, lastSplitMsgCallback).then(_ => {\r\n me.typingIndicator.hide();\r\n });\r\n setTimeout(() => {\r\n me.$(`\r\n .apexchat_contact_textarea,\r\n .apexchat_contact_qt`,\r\n me.context\r\n ).on('input, keyup', function (e) {\r\n toggleSendButtonClasses({ e, me });\r\n });\r\n }, 100);\r\n }\r\n\r\n /**\r\n * Adjusts the height of the text area based on the number of lines of text entered by the user.\r\n * Also toggles the send button classes based on whether the user has sent the text or not.\r\n * @memberof RDEPUIController\r\n * @instance\r\n * @param {RDEPUIController} me - The instance of the RDEPUIController class.\r\n */\r\n adjustTextAreaHeight(me) {\r\n me.$(`\r\n ${me.options.elements.clickSelector}`,\r\n me.context\r\n ).on('click', function (e) {\r\n toggleSendButtonClasses({ me, forceInactive: true });\r\n });\r\n const events = ['input', 'keyup', 'cut', 'paste'];\r\n events.forEach(event => {\r\n me.$(`\r\n ${me.options.elements.textboxSelector}, \r\n ${me.options.elements.autoCompleteInput}`,\r\n me.context\r\n ).on(event, function (e) {\r\n const isCleanUp = e.keyCode == 13 || e.target.value?.length == 0;\r\n toggleSendButtonClasses({ e, me });\r\n setTimeout(() => {\r\n applyResizeClassOnInput({\r\n me,\r\n textarea: '.livechat_typing_textarea',\r\n wrapper: '.livechat_typing_area',\r\n mainWrapper: '#apexchat-ep',\r\n classes: {\r\n 1: 'livechat_single_line',\r\n 2: 'livechat_two_lines',\r\n 3: 'livechat_three_lines',\r\n 4: 'livechat_four_lines',\r\n max: 'livechat_max_lines'\r\n },\r\n cleanup: isCleanUp\r\n });\r\n }, 200);\r\n });\r\n });\r\n }\r\n\r\n // adjustTextAreaHeight(e, me, options) {\r\n // const targetElem = me.$(options.targetElement, me.context);\r\n // // this resets to the min-height defined in the targetElement.\r\n // const resetHeight = targetElem.css('minHeight');\r\n // if (options) {\r\n // if (options.reset || e.scrollHeight < 50) {\r\n // targetElem.css({ height: resetHeight });\r\n // } else if (e.scrollHeight > 50) {\r\n // targetElem.css({ height: '1px' });\r\n // targetElem.css({ height: `${e.scrollHeight}px` });\r\n // }\r\n // }\r\n // }\r\n\r\n bind() {\r\n const me = this;\r\n super.bind();\r\n // me.$(me.options.elements.textboxSelector, me.context).apexChatFlexTextArea(\r\n // { context: me.context }\r\n // );\r\n const ghostElement = createElement(\r\n null,\r\n null,\r\n 'apexchat_rd_chat_invisible_textarea'\r\n );\r\n me.$('.apex-msg-type', me.context).append(ghostElement);\r\n\r\n const transcriptContent = me.$('.apex-transcript', me.context);\r\n me.$(me.options.elements.textboxSelector, me.context).on('input', function (e) {\r\n me.$(me.options.elements.inputContainerSelector, me.context).removeValidationTooltip({\r\n toolTipCss: 'livechat_validation_tooltip'\r\n });\r\n });\r\n me.adjustTextAreaHeight(me);\r\n\r\n // disable typing input area before predefinded message show\r\n disableTypingInput.bind2(me)(\r\n me.options.elements.inputContainerSelector,\r\n '', me.options\r\n );\r\n }\r\n\r\n showPokeMessages(m) {\r\n const me = this;\r\n super.showPokeMessages(m);\r\n }\r\n\r\n hidePokeMessages() {\r\n const me = this;\r\n super.hidePokeMessages();\r\n if (!me.isChatActive() && me.pokeMessageJob) {\r\n // when we click I'm back restart poke message job, it will reset interval.(For RD EP only)\r\n me.pokeMessageJob?.start();\r\n }\r\n }\r\n\r\n endChat() {\r\n const me = this;\r\n super.endChat();\r\n me.multiLanguage_dropdown_wrapper.remove();\r\n ApexChat.storageAPI.StoreTemp('livechat_exitpopup_is_closed', true);\r\n }\r\n\r\n sendMessage(el) {\r\n const me = this;\r\n me.resetInputHeightAfterSendMessage();\r\n super.sendMessage(el);\r\n }\r\n\r\n resetInputHeightAfterSendMessage() {\r\n const me = this;\r\n const textAreaContainer = me.$('.apex-msg-type', me.context);\r\n textAreaContainer.removeClass(\r\n 'apexchat_rd_ep_textarea_max_height apexchat_rd_ep_textarea_two_lines'\r\n );\r\n // CHAT-5821-Reset Height of text area input\r\n // After sending message of 2-3 lines reset height of text input back to normal\r\n me.adjustTextAreaHeight(me, {\r\n cleanup: true,\r\n });\r\n }\r\n\r\n renderMultiLanguageDropDown(config) {\r\n const me = this;\r\n super.renderMultiLanguageDropDown(config);\r\n }\r\n\r\n async implementMultiLanguageSupport(config) {\r\n const me = this;\r\n if (!me.options.model.showMultiLangDropDown || me.nonSMSLanguages.length <= 1) {\r\n // todo have to revise element selection logic\r\n me.multiLanguage_dropdown_wrapper.style.display = 'none';\r\n return;\r\n }\r\n const chatLanguageInSession = TempStorageCache.get('apex_rd_ep_chat_language');\r\n if (chatLanguageInSession) {\r\n TempCache.chatLanguage = chatLanguageInSession;\r\n }\r\n const textPairValue = [];\r\n for (let i = 0; i < me.nonSMSLanguages.length; i++) {\r\n const item = me.nonSMSLanguages[i];\r\n textPairValue.push({\r\n value: item.threeLetterISOLanguageName,\r\n text: item.languageFullName,\r\n selected: i == 0\r\n });\r\n }\r\n if (me.options.model && me.options.model.scriptBotEnabled) {\r\n me.multiLanguage_dropdown_wrapper.style.display = 'none';\r\n } else {\r\n //me.multiLanguage_dropdown_wrapper.style.display = 'block';\r\n }\r\n const langSelect = me.$(\r\n `#${me.options.elements.multiLanguage_dropdown_select}`,\r\n me.context\r\n );\r\n langSelect.populateSelectList(textPairValue);\r\n\r\n const module = await import(/* webpackChunkName: \"dropSelect\" */ '../../libs/dropSelect')\r\n const pluginDropSelect = module.default;\r\n pluginDropSelect(me.$);\r\n langSelect.apexChatDropSelect({\r\n className: 'apexchat_rd_ep_language_select',\r\n wordWrap: false,\r\n context: me.context, // Pass context in Drop select Dropdown\r\n callBack(value) {\r\n const selectedItem = me.nonSMSLanguages.filter(\r\n (item) => item.threeLetterISOLanguageName == value\r\n );\r\n me.chatLanguageName = selectedItem[0].languageFullName;\r\n TempStorageCache.add('apex_rd_ep_chat_language', value, true); // we need this cross page-reloads\r\n // Scenarios:\r\n // 1. item is being set on page-reloads, so no need to fire the following\r\n // 2. allow to fire when lang changes 2nd time\r\n if (\r\n !chatLanguageInSession /* Scenario#1 */ ||\r\n TempCache.chatLanguage != value /* Scenario#2 */\r\n ) {\r\n me.requestTransferringChat(config);\r\n }\r\n TempCache.chatLanguage = value;\r\n }\r\n // className: 'apexchat_rd_ep_language_select'\r\n });\r\n if (chatLanguageInSession) {\r\n // item already selected? set it again; e.g. in reload scenario\r\n const langDropSelect = me.$(\r\n `#${me.options.elements.multiLanguage_dropdown_select}`,\r\n me.context\r\n );\r\n me.setSelectedDropdownItem(langDropSelect, chatLanguageInSession);\r\n }\r\n }\r\n\r\n addEmojiEvents() {\r\n const me = this;\r\n // show emoji on mouse click\r\n me.$(me.context)\r\n .find(me.options.elements.emojiIconSelector)\r\n .on('click', (e) => {\r\n const emojiContainer = me\r\n .$(me.context)\r\n .find(me.options.elements.emojiContentSelector);\r\n if (emojiContainer.hasClass('livechat_emoticons_area_content_active')) {\r\n emojiContainer.removeClass('livechat_emoticons_area_content_active');\r\n } else {\r\n emojiContainer.addClass('livechat_emoticons_area_content_active');\r\n }\r\n });\r\n\r\n // hide emoji container on click on window.\r\n me.$(me.context).on('mouseup', (e) => {\r\n if (!e.target.classList.contains('apexchat_rd_emoji')) {\r\n me.$(me.context)\r\n .find(me.options.elements.emojiContentSelector)\r\n .removeClass('livechat_emoticons_area_content_active');\r\n }\r\n });\r\n }\r\n\r\n rdActionButtons() {\r\n const me = this;\r\n me.options.elements.volumeMuteUnmute = '#apexchat_volume_toggle';\r\n me.$('.apexchat_header_mute_button', me.context).removeAttr('style');\r\n me.options.elements.restartVAChatSelector = '#menuItemRestart';\r\n me.options.elements.transferChatSelector = '#menuItemTransfer';\r\n if (!me.isOperatorActive(me.options)) {\r\n me.$(me.options.elements.transferChatSelector, me.context).remove();\r\n }\r\n if (!me.options.model.hasSmsNumber) {\r\n me.$('.switchto-text-chat', me.context).remove();\r\n }\r\n }\r\n\r\n bindVolumeMuteEvents(el, toggleMuteClass) {\r\n // function for menudropdown ada compliance\r\n const me = this;\r\n if (!el) {\r\n return;\r\n }\r\n // el.on('keyup click', (e) => {\r\n // // check if button already not selected then do the action\r\n // e.stopPropagation();\r\n // if (e.type == 'click' || (e.type == 'keyup' && isAcceptKey(e))) {\r\n // // check for mouse click or tab and enter key\r\n // me.volumeMuteUnmute();\r\n // me.$(me.options.elements.actionMenuSelector, me.context).toggle(); // When restart chat overlay is visible then we should hide the action menu.\r\n // }\r\n // toggleMuteClass(me, el);\r\n // });\r\n\r\n \"keyup click\".split(\" \").forEach(function (e) {\r\n if (!el) {\r\n return;\r\n }\r\n el.addEventListener(e, (e) => {\r\n // check if button already not selected then do the action\r\n e.stopPropagation();\r\n if (e.type == 'click' || (e.type == 'keyup' && isAcceptKey(e))) {\r\n // check for mouse click or tab and enter key\r\n me.volumeMuteUnmute();\r\n me.$(me.options.elements.actionMenuSelector, me.context).toggle(); // When restart chat overlay is visible then we should hide the action menu.\r\n }\r\n toggleMuteClass(me, el);\r\n });\r\n })\r\n }\r\n\r\n toggleMuteClass(context, el) {\r\n setTimeout(() => {\r\n if (getStorageAPIValue(TempCache.CHAT_SOUND_ENABLED) == 'true') {\r\n context\r\n .$(el, context.DOM)\r\n .removeClass('muted')\r\n .find('.apexchat_dropdown_item_content')\r\n .text('Mute');\r\n } else {\r\n context\r\n .$(el, context.DOM)\r\n .addClass('muted')\r\n .find('.apexchat_dropdown_item_content')\r\n .text('Unmute');\r\n }\r\n });\r\n }\r\n\r\n bindTransferChatEvents(el) {\r\n // function for menudropdown ada compliance\r\n const me = this;\r\n if (!el) {\r\n return;\r\n }\r\n el.on('keyup click', (e) => {\r\n // check if button already not selected then do the action\r\n e.stopPropagation();\r\n if (e.type == 'click' || (e.type == 'keyup' && isAcceptKey(e))) {\r\n // check for mouse click or tab and enter key\r\n if (!me.uicontroller.isChatroomAlive()) {\r\n // if chatroom is not alive and user click on transfer chat option\r\n me.execChatStartHandler(() => {\r\n // hack to resize the textarea - bringing focus back to textarea\r\n me.uicontroller.messageInput.focus();\r\n me.chatStarted = true;\r\n logIt('loading chat room on 1st msg...');\r\n me.uicontroller.loadChatRoom();\r\n me.uicontroller.transferChatWhenChatroomAvailable();\r\n me.uicontroller.firstMsgSent = true; // when chatroom is not alive and chat successfully transfered\r\n // for all subsequent msgs\r\n me.handleADA(\r\n me.uicontroller.clickButton,\r\n me.uicontroller.sendMessage.bind2(me.uicontroller)\r\n );\r\n });\r\n me.options.chatTransfer = true;\r\n me.uicontroller.showTyping();\r\n } else {\r\n me.uicontroller.enableChatTransfer().then(_ => {\r\n me.uicontroller.transferChat();\r\n })\r\n }\r\n me.$(me.uicontroller.actionMenu, me.context).toggle(); // When restart chat overlay is visible then we should hide the action menu.\r\n }\r\n });\r\n }\r\n\r\n bindAppointmenSchedulePredefined() {\r\n const me = this;\r\n if (!me.isChatroomAlive()) {\r\n // if chatroom is not alive and user click on transfer chat option\r\n me.options.execChatStartHandler(() => {\r\n // hack to resize the textarea - bringing focus back to textarea\r\n me.messageInput.focus();\r\n me.chatStarted = true;\r\n logIt('loading chat room on 1st msg...');\r\n me.loadChatRoom();\r\n me.firstMsgSent = true;\r\n // for all subsequent msgs\r\n me.ADAHandler(me.clickButton, me.sendMessage.bind2(me.uicontroller));\r\n });\r\n }\r\n }\r\n}\r\n","/**\r\n * Exitpopup widget loaded inside its own iframe\r\n */\r\n// import chatExitPopupTemplate from '../templates/exit_popup/exitpopup_template.ejs';\r\n\r\nimport RDEPUIController from './RDEPUIController';\r\nimport { BaseWidget } from '../core/BaseWidget';\r\nimport WidgetTypes from '../core/enums/WidgetTypes';\r\nimport WidgetView from '../core/WidgetView';\r\nimport TempCache from '../core/enums/TempCache';\r\nimport BrandingWidget from '../core/enums/BrandingWidget';\r\nimport ChatMode from '../core/hooks/ChatMode';\r\n// import WebSmsFormValidator from '../core/hooks/WebSmsFormValidator';\r\nimport ADACompliant from '../core/hooks/ADACompliant';\r\nimport { InviteSize } from '../core/enums/Enum';\r\nimport parseTemplate from '../core/hooks/parseTemplate';\r\nimport Branding from '../core/hooks/Branding';\r\nimport getStyle from '../core/hooks/getStyle';\r\nimport throttleByFunctionName from '../core/hooks/throttleByFunctionName';\r\nimport AgentImageHandler from '../core/hooks/AgentImageHandler';\r\nimport loadJQuery from '../core/hooks/loadJQuery';\r\nimport loadJQueryPlugins from '../core/loadJQueryPlugins';\r\nimport setEpWindowStyles from '../core/hooks/setEpWindowStyles';\r\nimport GlobalVariables from '../core/GlobalVariables';\r\nimport RunAsSoonAs from '../core/hooks/RunAsSoonAs';\r\nimport centerElement from '../core/hooks/centerElement';\r\nimport StringUtils from '../core/hooks/StringUtils';\r\nimport ChatEvents from '../core/hooks/ChatEvents';\r\nimport WidgetStates from '../core/hooks/WidgetStates';\r\nimport getCookieValue from '../core/hooks/getCookieValue';\r\nimport hideElement from '../core/hooks/hideElement';\r\nimport logIt from '../../logIt';\r\nimport ImportEPTemplateFactory from '../core/imports/ImportEPTemplateFactory';\r\nimport addTargetBlank from '../core/hooks/addTargetBlankToAnchorString';\r\n\r\nexport default class ExitChatWindow extends BaseWidget {\r\n constructor(options) {\r\n super(\r\n Object.assign(options, {\r\n widget: WidgetTypes.ExitPopup,\r\n })\r\n );\r\n this.adjustTextAreaHeight = function (e, me, options) {\r\n var targetElem = me.$(options.targetElement, me.context);\r\n //this resets to the min-height defined in the targetElement.\r\n var resetHeight = targetElem.css('minHeight');\r\n if (options) {\r\n if (options.reset || e.scrollHeight < 50) {\r\n targetElem.css({ height: resetHeight });\r\n } else if (e.scrollHeight > 50) {\r\n targetElem.css({ height: '1px' });\r\n targetElem.css({ height: e.scrollHeight + 'px' });\r\n }\r\n }\r\n };\r\n this.CONTAINER_Z_INDEX = 9999999;\r\n this.view = null;\r\n if (this.isPageRefreshed()) {\r\n loadJQuery().then(_ => {\r\n loadJQueryPlugins(ApexChat.ApexChatJquery)\r\n this.$ = ApexChat.ApexChatJquery;\r\n this.ready();\r\n })\r\n } else {\r\n this.ready();\r\n }\r\n }\r\n\r\n ready() {\r\n super.ready();\r\n const me = this;\r\n const hideIt = function () {\r\n me.hide();\r\n };\r\n const maximizeIt = function (args) {\r\n if (me.shouldEPAppear()) {\r\n me.invokeChatInterceptor();\r\n me.maximize();\r\n }\r\n };\r\n const minimizeIt = function (args) {\r\n me.minimize();\r\n };\r\n this.subscribe(WidgetTypes.Bar + WidgetStates.Clicked, hideIt);\r\n this.subscribe(WidgetTypes.Tab + WidgetStates.Clicked, hideIt);\r\n this.subscribe(WidgetTypes.PreChat + WidgetStates.Clicked, hideIt);\r\n this.subscribe(WidgetTypes.ExitPopup + WidgetStates.MouseExit, maximizeIt);\r\n this.subscribe(WidgetTypes.ExitPopup + WidgetStates.ShownMinimized, minimizeIt);\r\n this.subscribe(WidgetTypes.EPUIController + ChatEvents.OnChatReInit, () => {\r\n if (me.uicontroller && !me.uicontroller?.reInitChatSubscribeForEP) {\r\n me.reInitChatEP();\r\n }\r\n });\r\n this.create();\r\n }\r\n\r\n reInitChatEP() {\r\n const me = this;\r\n me.uicontroller.reInitChatSubscribeForEP = true; // only once time subscribe OnChatReInit function\r\n if (ApexChat.options.exitpopup.exitPopupMessages.length > 0) {\r\n me.uicontroller.queuePredefinedQTs();\r\n } else {\r\n me.uicontroller.renderPredefinedMessages();\r\n }\r\n me.uicontroller.resetCurrentEPState();\r\n me.uicontroller.firstMsgSent = false;\r\n }\r\n\r\n shouldEPAppear() {\r\n const me = this;\r\n const isEPChatEnded = ApexChat.storageAPI.Get('livechat_exitpopup_is_closed');\r\n if (me.isChatClosed() && isEPChatEnded) {\r\n return false;\r\n }\r\n const currentState = me.getCurrentState();\r\n const domState = me.state.getStateValue(WidgetTypes.DOM);\r\n const winState = me.state.getStateValue(WidgetTypes.Windowed);\r\n const formState = me.state.getStateValue(WidgetTypes.VisitorForm);\r\n if (\r\n currentState == WidgetStates.ShownMaximized ||\r\n currentState == WidgetStates.ShownMinimized ||\r\n currentState == WidgetStates.Closed ||\r\n currentState == WidgetStates.Hidden\r\n ) {\r\n return false;\r\n }\r\n if (formState == WidgetStates.ShownMaximized) {\r\n return false;\r\n }\r\n if (\r\n ApexChat.options.chatMode == ChatMode.DOM &&\r\n domState &&\r\n domState !== WidgetStates.ShownNormal\r\n ) {\r\n return false;\r\n }\r\n if (\r\n ApexChat.options.chatMode == ChatMode.Windowed &&\r\n winState == WidgetStates.ShownNormal\r\n ) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n create() {\r\n super.create();\r\n const me = this;\r\n me.show();\r\n }\r\n\r\n show() {\r\n const lastState = this.getCurrentState();\r\n const pageIsRefreshed = this.isPageRefreshed();\r\n const me = this;\r\n super.show();\r\n // if the chat options aren't preloaded, load them on-demand\r\n if (me.options.preloadEnabled) {\r\n me.preloadChatOptions(() => {\r\n me.preLoadedOptions = ApexChat.getPreloadedChatOptions();\r\n ApexChat.preLoadedOptions = me.preLoadedOptions;\r\n });\r\n }\r\n if (pageIsRefreshed) {\r\n if (lastState === WidgetStates.ShownMaximized) {\r\n me.maximize(true);\r\n } else if (lastState == WidgetStates.ShownMinimized) {\r\n me.minimize(true);\r\n }\r\n } else if (lastState === WidgetStates.ShownMaximized && !pageIsRefreshed) {\r\n // this happens when user opens ep on one tab and opens the same page on another tab without\r\n // refreshing.\r\n me.maximize(true);\r\n }\r\n }\r\n\r\n createView(chatOptions) {\r\n const me = this;\r\n /**\r\n * Parse and return theme css template file for EP\r\n * @param options\r\n * @returns {string|string|ApexChat.Portal.ThemePanel.getSkinData.chatStyle}\r\n */\r\n const GetEpSkinTemplate = (options) => {\r\n const epConig = JSON.parse(options.exitPopupChat.rdEpThemeSettings);\r\n const chatConfig = JSON.parse(options.rdThemeSettings);\r\n if (!epConig.footer) {\r\n // some old themes do not have footer section\r\n epConig.footer = { poweredByFont: '' };\r\n }\r\n let skinConfig = {\r\n container: '', // set empty the <#=container#> property\r\n rdChat: chatConfig, // we need to set some general RD Chat setting\r\n exitPopupChat: epConig\r\n };\r\n const brandingInfo = chatConfig.branding || {};\r\n if (brandingInfo.brandingIsEnabled) {\r\n skinConfig.global = { branding: brandingInfo };\r\n skinConfig = new Branding().init({\r\n widget: BrandingWidget.RD_EP,\r\n brandConfig: skinConfig\r\n }).getBrandedConfig();\r\n }\r\n return skinConfig;\r\n };\r\n const styleConfig = GetEpSkinTemplate(me.options);\r\n if (!chatOptions && me.renderedEPOnce) {\r\n return;\r\n }\r\n setEpWindowStyles(me.DOM, styleConfig);\r\n me.renderedEPOnce = true;\r\n me.uicontroller = null; // controller gets set on state transition: min or max because\r\n me.options.getFormatedDay = ApexChat.getFormatedDay(\"dddd, d MMMM\");\r\n\r\n const epTemplate = ImportEPTemplateFactory(me.updateOptions(Object.assign(me.options, me.preLoadedOptions)));\r\n me.options.poweredBy = addTargetBlank(me.options.poweredBy || \"\");\r\n\r\n me.view = new WidgetView({\r\n identifier: WidgetTypes.ExitPopup,\r\n dom: this.DOM,\r\n cssLinkId: 'ExitChatWindow',\r\n cssLink: `${GlobalVariables.CdnBaseUrl}contents/scripts/dist/${ApexChat.Theme}/exitpopup.css?ver=${env.BUILD_HASH}`,\r\n templates: [\r\n {\r\n key: WidgetStates.ShownMaximized,\r\n tpl: epTemplate.exitPopupThemeTemplate(me.updateOptions(Object.assign(me.options, me.preLoadedOptions))),\r\n // tpl: chatExitPopupTemplate(Object.assign(me.options, me.preLoadedOptions)),\r\n model: Object.assign(me.options, me.preLoadedOptions),\r\n beforeRender(tpl) {\r\n tpl.model.chatMessageTemplate = epTemplate.exitPopupThemeTemplate(me.updateOptions(tpl.model)),\r\n // tpl.model.chatMessageTemplate = chatExitPopupTemplate(tpl.model);\r\n tpl.model.exitPopupChat.chatTitle = parseTemplate(\r\n tpl.model.exitPopupChat.chatTitleTemplate,\r\n tpl.model\r\n );\r\n\r\n },\r\n afterRender(tpl) {\r\n const vwMax = this;\r\n Object.assign(vwMax.elements, {\r\n textboxSelector: '.apex-input',\r\n containerSelector: `#${WidgetTypes.ExitPopup}${WidgetStates.ShownMaximized}`,\r\n // minimizeSelector: '#apexchat-ep-minimize',\r\n agentTitle: '.apex-profile-usertitle', // participantsSelector\r\n clickSourceId: '.apex-powerdby',\r\n messagesContainerSelector: '.apex-transcript',\r\n typingIndicatorSelector: '.apex-agent',\r\n minimizeSelector: '.apex-ep-minimizestate',\r\n maximizeState: '.apex-ep-maximizestate',\r\n closeSelector: '.apex-ep-closemodel',\r\n handlerImageSelector: '.Apex-agentImage',\r\n minimizedImage: '.apex-img-minimized-invite',\r\n companyTitle: '.apex-company-title',\r\n clicktoStart: '.apex-start-chat',\r\n minimizePoweredBy: '.apex-powerdby-minimized',\r\n popoutSelector: '.apex-ep-openpopup',\r\n clickSelector: '.apex-btn',\r\n soundControl: '.apex-msg-notification',\r\n soundMute: '.apex-sound-mute',\r\n soundUnmute: '.apex-sound-unmute',\r\n regionEditorContainer: '#apexchat_exitpopup_region_container',\r\n regionEditorContainerWrapper: `#${tpl.model.exitPopupRegionEditorContainerId}`\r\n });\r\n // me.createRegionEditor();\r\n me.$(vwMax.elements.clickSelector, me.DOM).click(() => { });\r\n me.uicontroller = new RDEPUIController({\r\n model: tpl.model,\r\n elements: vwMax.elements,\r\n context: me.DOM,\r\n ADAHandler: me.handleADA.bind2(me),\r\n execChatStartHandler: me.execChatStartHandler.bind2(me),\r\n execChatStartHandlerWithThrottle:\r\n me.execChatStartHandlerWithThrottle.bind2(me)\r\n });\r\n me.uicontroller.bindVolumeMuteEvents(\r\n me.DOM.querySelector(me.uicontroller.options.elements.volumeMuteUnmute),\r\n me.uicontroller.toggleMuteClass\r\n );\r\n me.uicontroller.toggleMuteClass(\r\n me,\r\n me.DOM.querySelector(me.uicontroller.options.elements.volumeMuteUnmute)\r\n );\r\n\r\n if (me.options.chatMode === ChatMode.Windowed) {\r\n me.$(vwMax.elements.popoutSelector, me.DOM).click(() => {\r\n me.options.chatInitiatedBy = 'ExitPopup';\r\n me.state.changeState({\r\n origin: WidgetTypes.ExitPopup,\r\n toState: WidgetStates.Hidden\r\n });\r\n me.startWindowedChat(me.options);\r\n });\r\n }\r\n me.uicontroller.initAgentNotFoundOverlay('.apex-col-2');\r\n me.uicontroller.show(tpl.key); // _max or _min\r\n if (me.options && me.options.scriptBotEnabled) {\r\n // if script bot is enabled removed menu\r\n me.uicontroller.bindRestartChatEvents(\r\n me.DOM.querySelector(\r\n me.uicontroller.options.elements.restartVAChatSelector\r\n\r\n ),\r\n true\r\n );\r\n me.uicontroller.bindTransferChatEvents.bind2(me)(\r\n me.$(me.uicontroller.options.elements.transferChatSelector, me.DOM)\r\n );\r\n me.uicontroller.initRestartOverlay();\r\n }\r\n me.options.$ = me.$;\r\n me.options.context = me.DOM;\r\n me.options.phoneWarningSelector = '.apexchat_error_message';\r\n import(/* webpackChunkName: \"webSmsFormValidator\" */ '../core/hooks/WebSmsFormValidator').then(module => {\r\n const WebSmsFormValidator = module.default\r\n const smsForm = WebSmsFormValidator(me.options);\r\n smsForm.init();\r\n smsForm.reset();\r\n smsForm.bind();\r\n })\r\n\r\n if (me.options.hasSmsNumber) {\r\n me.$('.ep-submit-button', me.DOM).on('click', () => {\r\n throttleByFunctionName(() => {\r\n me.$('.ep-submit-button', me.DOM).text('Sending...').addClass('pointer-event-none');\r\n if (!me.uicontroller.isChatroomAlive()) { // if chatroom is not alive and user click on transfer chat option\r\n me.execChatStartHandler(function () {\r\n //hack to resize the textarea - bringing focus back to textarea\r\n me.uicontroller.messageInput.focus();\r\n me.chatStarted = true;\r\n logIt('loading chat room on 1st msg...');\r\n me.uicontroller.loadChatRoom();\r\n me.handleADA(me.uicontroller.clickButton[0], me.uicontroller.sendMessage.bind2(me.uicontroller));\r\n RunAsSoonAs(function () {\r\n me.$('.submit-button', me.DOM).click();\r\n me.uicontroller.firstMsgSent = true; // when chatroom is not alive and chat successfully transfered\r\n //for all subsequent msgs\r\n me.$('.ep-submit-button', me.DOM).text('Continue').removeClass('pointer-event-none');\r\n\r\n }, function () {\r\n return getCookieValue('livechat_chat_id') > 0;\r\n })\r\n });\r\n me.options.chatTransfer = true;\r\n me.uicontroller.showTyping();\r\n } else {\r\n me.$('.ep-submit-button', me.DOM).text('Continue').removeClass('pointer-event-none');\r\n me.$('.submit-button', me.DOM).click();\r\n }\r\n }, 7, 'transferWebToTextEP')();\r\n });\r\n\r\n }\r\n // ADA Compliance\r\n // summary: CSS Class 'apexchat_ada_compliance' has no CSS Styling behind it means it won't effect on UI.\r\n // Its only for detecting the ADA Complianced HTML elements on which we do need to have the TAB Focus.\r\n // This is the Utility function which takes all HTML elements having the class 'apexchat_ada_compliance' as ARRAY, and apply the TabIndex on all of them.\r\n ADACompliant.push(\r\n me.$('.apexchat_ada_compliance', me.DOM)\r\n ).apply();\r\n // me.handleADA(me.uicontroller.closeButton[0], me.uicontroller.end.bind2(me.uicontroller));\r\n me.handleADA(me.$(vwMax.elements.closeSelector, me.DOM)[0], () => {\r\n me.uicontroller.end();\r\n });\r\n me.handleADA(me.$(vwMax.elements.minimizeSelector, me.DOM)[0], () => {\r\n me.minOrMax(WidgetStates.ShownMinimized);\r\n });\r\n // CHAT-5210 - [Discarded] - unbinding is not needed and causing CHAT-9148\r\n // me.$(vwMax.elements.clickSelector, me.DOM).unbind('click');\r\n const startChatOnFirstMsg = function (simulateMessages) {\r\n // restricting user from sending empty message CHAT-9556\r\n // also check page is refreshed or not if not then execute\r\n if (\r\n StringUtils.isNull(\r\n me.$(me.uicontroller.messageInput).val().trim()\r\n ) &&\r\n !me.uicontroller.isPageRefreshed()\r\n ) {\r\n return;\r\n }\r\n if (!me.uicontroller.firstMsgSent) {\r\n if (me.uicontroller.pokeMessageJob) {\r\n // in case of RD EP\r\n me.uicontroller.pokeMessageJob.stop(); // after first response, the pokeMessage job for predefinned is over\r\n }\r\n if (\r\n me.uicontroller.QTRendererExt &&\r\n me.uicontroller.QTRendererExt.isLastMessageFullText()\r\n ) {\r\n if (!me.uicontroller.QTRendererExt.isLastFullTextValidated) {\r\n // just return if FT was invalid as per sendMessage\r\n return;\r\n }\r\n // me.uicontroller.disableInput();\r\n }\r\n if (\r\n !ApexChat.IsShowDisclaimeOverlay &&\r\n me.options.shouldShowLocationDisclaimer\r\n ) {\r\n ApexChat.IsShowDisclaimeOverlay = true;\r\n me.uicontroller.showDisclaimerOverlay(\r\n me.options.locationDisclaimerText\r\n );\r\n }\r\n me.uicontroller.firstMsgSent = true;\r\n me.uicontroller.reInitChatSubscribeForEP = false;\r\n me.uicontroller.messageInputText =\r\n me.$(me.uicontroller.autoCompleteInput).is(':visible')\r\n ? me.$(me.uicontroller.autoCompleteInput).val()\r\n : me.$(me.uicontroller.messageInput).val();\r\n me.uicontroller.messageInput.value = '';\r\n me.uicontroller.autoCompleteInput.value = '';\r\n if (simulateMessages) {\r\n me.uicontroller.simulatePlainTextPredefinedResponse({\r\n msgText: me.uicontroller.messageInputText\r\n });\r\n me.uicontroller.messageInputText = ''; // do not keep message in inputText after simulated message send\r\n }\r\n // CHAT-5821-Reset Height of text area input\r\n // After sending message of 2-3 lines reset height of text input back to normal, on first message sent\r\n // me.adjustTextAreaHeight(this, me.uicontroller, {\r\n // reset: true,\r\n // targetElement: '#apexchat_ep_textarea_input'\r\n // });\r\n // hack to resize the textarea\r\n me.uicontroller.messageInput.blur();\r\n me.execChatStartHandler(() => {\r\n // hack to resize the textarea - bringing focus back to textarea\r\n me.uicontroller.messageInput.focus();\r\n me.chatStarted = true;\r\n logIt('loading chat room on 1st msg...');\r\n me.uicontroller.loadChatRoom();\r\n me.uicontroller.sendMsgWhenChatroomAvailable();\r\n // for all subsequent msgs\r\n me.handleADA(\r\n me.uicontroller.clickButton[0],\r\n me.uicontroller.sendMessage.bind2(me.uicontroller)\r\n );\r\n });\r\n }\r\n };\r\n // the following must run once in the life of an EP\r\n me.$(vwMax.elements.clickSelector, me.DOM).click((e) => {\r\n startChatOnFirstMsg(true);\r\n });\r\n // for 1st msg\r\n me.handleADA(me.uicontroller.clickButton[0], startChatOnFirstMsg.bind2(me));\r\n me.$(me.uicontroller.autoCompleteInput, me.DOM).keydown, ((e) => {\r\n if (e.keyCode === 13) {\r\n startChatOnFirstMsg(true);\r\n }\r\n });\r\n me.$(vwMax.elements.textboxSelector, me.DOM).keydown((e) => {\r\n if (\r\n e.keyCode === 13 &&\r\n !me.$(me.uicontroller.autoCompleteInput, me.DOM).is(':visible')\r\n ) {\r\n startChatOnFirstMsg(true);\r\n }\r\n });\r\n\r\n // ZEE: the following block is buggy, no me.DOM specified; TODO: double check\r\n me.$('#livechat_send_message_button').click(() => {\r\n me.$('[data-role=footer]').show();\r\n me.$('.livechat_body').addClass('reset_messages_box_height');\r\n });\r\n me.$(vwMax.elements.minimizeSelector, me.DOM).click(() => {\r\n me.state.changeState({\r\n origin: WidgetTypes.ExitPopup,\r\n toState: WidgetStates.ShownMinimized\r\n });\r\n me.minOrMax(WidgetStates.ShownMinimized);\r\n });\r\n const chatId = ApexChat.storageAPI.Get(TempCache.CHAT_ID_COOKIE) || 0;\r\n if (chatId) {\r\n startChatOnFirstMsg();\r\n }\r\n me.uicontroller.renderMultiLanguageDropDown({\r\n containerId: vwMax.elements.multiLanguage_dropdown_container,\r\n dropdownId: vwMax.elements.multiLanguage_dropdown_select\r\n });\r\n me.uicontroller.toggleSMSNumberInput(\r\n me.DOM.querySelectorAll(me.uicontroller.options.elements.actionMenuStartSMSChat), {\r\n container: '#apexchat_rd_chat_content',\r\n element: '#switchto-text-chat-in-content'\r\n }\r\n );\r\n me.uicontroller.toggleSMSNumberInput(\r\n me.DOM.querySelectorAll(me.uicontroller.options.elements.smsBottomSheetClose)\r\n );\r\n me.resize(tpl.key);\r\n // if (me.options && me.options.exitPopupADACss) {\r\n // // apply ADA CSS when user zooming the widget.\r\n // handleZooming(\r\n // me.options.exitPopupADACss,\r\n // 'apexchat_Iframe_ep_ada_css',\r\n // me.DOM\r\n // );\r\n // }\r\n }\r\n },\r\n {\r\n key: WidgetStates.ShownMinimized,\r\n tpl: me.options.exitPopupWidgetTemplateMinimized,\r\n model: Object.assign(me.options, me.preLoadedOptions),\r\n beforeRender(tpl) {\r\n tpl.model.invitationMinimizedText = parseTemplate(\r\n tpl.model.invitationMinimizedTextTemplate,\r\n tpl.model\r\n );\r\n tpl.model.exitPopupChat.chatTitle = parseTemplate(\r\n tpl.model.exitPopupChat.chatTitleTemplate,\r\n tpl.model\r\n );\r\n },\r\n afterRender(tpl) {\r\n const vwMin = this;\r\n Object.assign(vwMin.elements, {\r\n containerSelector: `#${WidgetTypes.ExitPopup}${WidgetStates.ShownMinimized}`,\r\n agentTitle: '.apex-profile-usertitle',\r\n maximizeState: '.apex-ep-maximizestate',\r\n closeSelector: '.apex-ep-closemodel',\r\n handlerImageSelector: '.Apex-agentImage',\r\n minimizedImage: '.apex-img-minimized-invite',\r\n companyTitle: '.apex-company-title',\r\n clicktoStart: '.apex-start-chat',\r\n clickSourceId: '.apex-powerdby-minimized',\r\n popoutSelector: '.apex-ep-openpopup',\r\n regionEditorContainer: '#apexchat_exitpopup_region_container',\r\n regionEditorContainerWrapper: `#${tpl.model.exitPopupRegionEditorContainerId}`\r\n });\r\n // me.uicontroller = new ApexChat.EPUIController({ model: tpl.model, chatModel: me.preLoadedOptions, elements: vwMin.elements, context: me.DOM });\r\n // do event binding\r\n if (me.options.chatMode == ChatMode.Windowed) {\r\n me.$(vwMin.elements.popoutSelector, me.DOM).click(() => {\r\n me.options.chatInitiatedBy = 'ExitPopup';\r\n me.state.changeState({\r\n origin: WidgetTypes.ExitPopup,\r\n toState: WidgetStates.Hidden\r\n });\r\n me.startWindowedChat(me.options);\r\n });\r\n }\r\n me.$(vwMin.elements.maximizeState, me.DOM).click(() => {\r\n me.state.changeState({\r\n origin: WidgetTypes.ExitPopup,\r\n toState: WidgetStates.ShownMaximized\r\n });\r\n me.minOrMax(WidgetStates.ShownMaximized);\r\n });\r\n me.handleADA(me.$(vwMin.elements.closeSelector, me.DOM), () => {\r\n me.uicontroller.end();\r\n });\r\n me.handleADA(me.$(vwMin.elements.maximizeState, me.DOM)[0], () => {\r\n me.minOrMax(WidgetStates.ShownMaximized);\r\n });\r\n me.$(vwMin.elements.clickSourceId, me.DOM).html(tpl.model.poweredBy);\r\n me.$(vwMin.elements.clicktoStart, me.DOM).html(\r\n tpl.model.invitationMinimizedText\r\n );\r\n me.$(vwMin.elements.companyTitle, me.DOM).html(\r\n tpl.model.exitPopupChat.chatTitle\r\n );\r\n // handlerImageUrl should be coming from what was assigned in widgetbase.js\r\n me.$(vwMin.elements.handlerImageSelector, me.DOM).attr(\r\n 'src',\r\n AgentImageHandler(tpl.model.handlerImageUrl)\r\n );\r\n me.$(vwMin.elements.agentTitle, me.DOM).html(tpl.model.agentName);\r\n me.$(vwMin.elements.minimizedImage, me.DOM).attr(\r\n 'src',\r\n tpl.model.handlerImageUrl\r\n );\r\n // finally, apply extra logic when shown\r\n if (me.uicontroller) me.uicontroller.show(tpl.key); // _max or _min\r\n // ADA Compliance\r\n // summary: CSS Class 'apexchat_ada_compliance' has no CSS Styling behind it means it won't effect on UI.\r\n // Its only for detecting the ADA Complianced HTML elements on which we do need to have the TAB Focus.\r\n // This is the Utility function which takes all HTML elements having the class 'apexchat_ada_compliance' as ARRAY, and apply the TabIndex on all of them.\r\n ApexChat.ADACompliant.push(\r\n me.$('.apexchat_ada_compliance', me.DOM)\r\n ).apply();\r\n me.resize(tpl.key);\r\n }\r\n }\r\n ],\r\n style: [\r\n // skinTemplate,\r\n me.options.invitationWidgetStyle,\r\n me.options.apexChatFontAwesomeCss\r\n ]\r\n // initialState: WidgetStates.ShownMaximized\r\n });\r\n }\r\n\r\n updateOptions(options) {\r\n options.handlerImageUrl = AgentImageHandler(options.handlerImageUrl);\r\n options.chatTitle = parseTemplate(\r\n options.exitPopupChat.chatTitleTemplate,\r\n options\r\n );\r\n if (options.headerDisclaimer) {\r\n options.headerDisclaimer = parseTemplate(\r\n options.headerDisclaimer,\r\n options\r\n );\r\n }\r\n return options\r\n }\r\n\r\n uiTweaks() {\r\n const me = this;\r\n me.$('.apex-msg-type', me.DOM).css('position', 'relative');\r\n me.$('.apex-popup-container', me.DOM).removeClass('HideClass');\r\n me.$('#apexchat-ep-minimize', me.DOM).removeClass('HideClass');\r\n me.$('.apex-popup-container', me.DOM).removeClass('apex-container-fix');\r\n // handle popup icon\r\n me.handlePopupIcon({\r\n chatMode: me.options.chatMode,\r\n popoutSelector: me.view.elements.popoutSelector,\r\n DOM: me.DOM\r\n });\r\n // me.$('.apex-input', me.DOM).css({ 'position': 'absolute', 'left': '0', 'float': '' });\r\n me.$('.apex-btn', me.DOM).css({ position: 'absolute', right: '0', float: '' });\r\n }\r\n\r\n handlePopupIcon(options) {\r\n const me = this;\r\n if (options.chatMode == ChatMode.DOM) {\r\n me.$(options.popoutSelector, options.DOM).hide();\r\n } else {\r\n me.$(options.popoutSelector, options.DOM).show();\r\n }\r\n }\r\n\r\n resize(state) {\r\n const me = this;\r\n setTimeout(() => {\r\n me.resizeIframe(state);\r\n }, 0);\r\n }\r\n\r\n resizeIframe(state) {\r\n const me = this;\r\n if (!me.resizeIFrameEP) {\r\n me.resizeIFrameEP = true;\r\n } else {\r\n return false;\r\n }\r\n setTimeout(() => {\r\n me.resizeIFrameEP = false;\r\n }, 500);\r\n me.uiTweaks();\r\n const widgetWrapper = document.getElementById(me.options.parentDivId);\r\n if (state == WidgetStates.ShownMaximized) {\r\n let width = '651px';\r\n let height = getStyle(me.DOM.querySelector('.apex-transcript'), 'height');\r\n // TODO: we have to move this into Positioner\r\n const widgetIframe = document.getElementById(me.options.iframeId);\r\n widgetIframe.style.display = 'block';\r\n widgetWrapper.style.zIndex = '9999999';\r\n centerElement(widgetWrapper, {\r\n width: ApexChat.TempSize.iframeWidth,\r\n height: ApexChat.TempSize.iframeHeight\r\n });\r\n // For RD EP, we have different resizing.\r\n const headerLogo = getStyle(\r\n me.DOM.querySelector('.apex_rd_apex_title_logo'),\r\n 'display'\r\n );\r\n // 5480 - hiding draggable area if headerLogo is not displaying.\r\n if (\r\n headerLogo === 'none' &&\r\n widgetWrapper.childNodes[1] && // Safety checks\r\n widgetWrapper.childNodes[1].getAttribute('id') === 'apexchat_ep_dragndrop'\r\n ) {\r\n hideElement(widgetWrapper.childNodes[1]);\r\n }\r\n if (height === 'auto') {\r\n height = '390px';\r\n }\r\n height = `${parseInt(height) + 40}px`;\r\n } else if (state == WidgetStates.ShownMinimized) {\r\n widgetWrapper.style.marginLeft = '0px'; // CHAT-5403 - Minimize state was not appearing due to 5359 change above.\r\n // me.$('#apexchat-ep-minimize', me.DOM).show();\r\n // me.$('#' + WidgetTypes.ExitPopup + WidgetStates.ShownMinimized, me.DOM).show();\r\n var width = '385px';\r\n var height = '185px';\r\n const display = 'block';\r\n me.postMessage({\r\n event: `${WidgetTypes.ExitPopup}_resize_iframe`,\r\n data: { state, height, width, display }\r\n });\r\n }\r\n }\r\n\r\n hide() {\r\n super.hide();\r\n const me = this;\r\n if (me.uicontroller) {\r\n me.uicontroller.hide();\r\n }\r\n }\r\n\r\n maximize() {\r\n super.maximize();\r\n const me = this;\r\n me.minOrMax(WidgetStates.ShownMaximized);\r\n // inform all interested of EP _max state\r\n }\r\n\r\n minOrMax(state) {\r\n const me = this;\r\n const stateToHide =\r\n state == WidgetStates.ShownMaximized\r\n ? WidgetStates.ShownMinimized\r\n : WidgetStates.ShownMaximized;\r\n // chat started but user maximizing from Min state? just show Max state\r\n if (me.chatStarted && me.chatStartOptions && me.chatStartOptions.chatId) {\r\n // TODO: improve this condition and convert to a function\r\n me.view.render(state); // will just show already present and hidden state of the widget\r\n } else {\r\n // On very 1st EP appear or page reload: 1. preload chat options, 2. render UI, 3. do after render stuff like event-binding and start pre-defined msgs\r\n if (!ApexChat.preLoadedOptions) {\r\n me.createView();\r\n me.preloadChatOptions(() => {\r\n me.view.render(state);\r\n // me.resize(state);//adjust size/position\r\n });\r\n return; // as this is v 1st display of EP on mouse exit\r\n }\r\n // on subsequent EP appear on User Max button click; just show Max state cuz both chat options and UI is already on page\r\n me.createView();\r\n me.view.render(state);\r\n me.view.unrender();\r\n }\r\n me.resize(state); // adjust size\r\n me.view.unrender(stateToHide); // hide another state if visible\r\n }\r\n\r\n minimize() {\r\n const me = this;\r\n me.minOrMax(WidgetStates.ShownMinimized);\r\n // inform all interested of EP _min state\r\n // me._super();\r\n }\r\n\r\n close() {\r\n const me = this;\r\n // this.resizeIframe(WidgetStates.ShownMaximized);\r\n me.state.changeState({\r\n origin: WidgetTypes.ExitPopup,\r\n toState: WidgetStates.Hidden\r\n });\r\n }\r\n\r\n // createRegionEditor() {\r\n // const me = this;\r\n // let regionEditorContainerWrapper = me.$(`#${me.options.exitPopupRegionEditorContainerId}`, me.DOM);\r\n // if (regionEditorContainerWrapper && regionEditorContainerWrapper.length > 0) {\r\n // return;\r\n // }\r\n // // Create region editor image\r\n // me.createImage(me.options.exitPopupRegionEditorContainerId, InviteSize.ExitPopup);\r\n // const regionEditorContainer = me.$('#apexchat_exitpopup_region_container', me.DOM);\r\n // regionEditorContainerWrapper = me.$(`#${me.options.exitPopupRegionEditorContainerId}`, me.DOM);\r\n // // Set Exit Popup region Editor html inside designated region\r\n // regionEditorContainer.html(regionEditorContainerWrapper.html());\r\n // }\r\n}\r\n","import setHexWithAlphaToSolid from \"./setHexWithAlphaToSolid\";\r\nimport setTextColorBasedOnBg from \"./setTextColorBasedOnBg\";\r\n\r\nconst setEpWindowStyles = (root, epStyleConfig) => {\r\n const { rdChat, exitPopupChat } = epStyleConfig;\r\n root.documentElement.style.setProperty('--headerColor', rdChat.general.headerColor);\r\n root.documentElement.style.setProperty('--sendbuttonColor', exitPopupChat.sendButton.sendbuttonBackgroundColor);\r\n root.documentElement.style.setProperty(\r\n '--leftBarBackground1Color',\r\n exitPopupChat.general.leftBarBackground1Color\r\n );\r\n root.documentElement.style.setProperty(\r\n '--leftBarBackground2Color',\r\n exitPopupChat.general.leftBarBackground2Color\r\n );\r\n root.documentElement.style.setProperty(\r\n '--leftBarBackground1ColorTop',\r\n exitPopupChat.general.leftBarBackground1Color.concat(' 0%')\r\n );\r\n root.documentElement.style.setProperty(\r\n '--leftBarBackground2ColorTop',\r\n exitPopupChat.general.leftBarBackground2Color.concat(' 100%')\r\n );\r\n\r\n root.documentElement.style.setProperty(\r\n '--participantsFontColor',\r\n exitPopupChat.header.participantsFont.color\r\n );\r\n root.documentElement.style.setProperty(\r\n '--participantsFontSize',\r\n exitPopupChat.header.participantsFont.size\r\n );\r\n root.documentElement.style.setProperty(\r\n '--participantsFontFamily',\r\n exitPopupChat.header.participantsFont.family\r\n );\r\n root.documentElement.style.setProperty(\r\n '--patiicipantsFontitalic',\r\n exitPopupChat.header.participantsFont.italic\r\n );\r\n root.documentElement.style.setProperty(\r\n '--patiicipantsFontbold',\r\n exitPopupChat.header.participantsFont.bold\r\n );\r\n root.documentElement.style.setProperty(\r\n '--patiicipantsFontunderline',\r\n exitPopupChat.header.participantsFont.underline\r\n );\r\n\r\n root.documentElement.style.setProperty(\r\n '--phoneFontColor',\r\n exitPopupChat.general.phoneFontField.color\r\n );\r\n root.documentElement.style.setProperty(\r\n '--phoneFontSize',\r\n exitPopupChat.general.phoneFontField.size\r\n );\r\n root.documentElement.style.setProperty(\r\n '--phoneFontFamily',\r\n exitPopupChat.general.phoneFontField.family\r\n );\r\n root.documentElement.style.setProperty(\r\n '--phoneFontitalic',\r\n exitPopupChat.general.phoneFontField.italic\r\n );\r\n root.documentElement.style.setProperty(\r\n '--phoneFontbold',\r\n exitPopupChat.general.phoneFontField.bold\r\n );\r\n root.documentElement.style.setProperty(\r\n '--phoneFontunderline',\r\n exitPopupChat.general.phoneFontField.underline\r\n );\r\n if (exitPopupChat.enableBranding) {\r\n root.documentElement.style.setProperty('--btnClose', exitPopupChat.general.btnClose);\r\n\r\n root.documentElement.style.setProperty(\r\n '--disclaimerFontColor',\r\n exitPopupChat.general.disclaimerFont.color\r\n );\r\n root.documentElement.style.setProperty(\r\n '--brandingLeftBarBackground1Color',\r\n exitPopupChat.general.leftBarBackground1Color\r\n );\r\n root.documentElement.style.setProperty(\r\n '--brandingBtnClose',\r\n exitPopupChat.general.brandingBtnClose\r\n );\r\n root.documentElement.style.setProperty(\r\n '--brandingOpacityBrandColor',\r\n exitPopupChat.general.opacityBrandColor\r\n );\r\n root.documentElement.style.setProperty(\r\n '--brandingleftBarBackground1ColorSelect',\r\n exitPopupChat.general.leftBarBackground1Color\r\n );\r\n root.documentElement.style.setProperty(\r\n '--opacityBrandColor',\r\n exitPopupChat.general.opacityBrandColor\r\n );\r\n } else {\r\n root.documentElement.style.setProperty('--brandingBtnClose', '#EBF8FF');\r\n root.documentElement.style.setProperty('--brandingLeftBarBackground1Color', '#0056D0');\r\n root.documentElement.style.setProperty(\r\n '--brandingleftBarBackground1ColorSelect',\r\n '#83570E'\r\n );\r\n }\r\n root.documentElement.style.setProperty(\r\n '--disclaimerFontSize',\r\n exitPopupChat.footer.disclaimerFont.size\r\n );\r\n root.documentElement.style.setProperty(\r\n '--disclaimerFontFamily',\r\n exitPopupChat.footer.disclaimerFont.family\r\n );\r\n root.documentElement.style.setProperty(\r\n '--disclaimerFontitalic',\r\n exitPopupChat.footer.disclaimerFont.italic ? 'italic' : 'normal'\r\n );\r\n root.documentElement.style.setProperty(\r\n '--disclaimerFontbold',\r\n exitPopupChat.footer.disclaimerFont.bold ? 'bold' : 'normal'\r\n );\r\n root.documentElement.style.setProperty(\r\n '--disclaimerFontunderline',\r\n exitPopupChat.footer.disclaimerFont.underline ? 'underline' : 'unset'\r\n );\r\n root.documentElement.style.setProperty(\r\n '--disclaimerBgColor',\r\n exitPopupChat.general.disclaimerBgColor || \"#F3F3F3\"\r\n );\r\n\r\n root.documentElement.style.setProperty('--agentBgColor', rdChat.messages.agentBgColor);\r\n\r\n root.documentElement.style.setProperty(\r\n '--agentFontFieldColor',\r\n exitPopupChat.messages.agentFontField.color\r\n );\r\n root.documentElement.style.setProperty(\r\n '--agentFontFieldFontSize',\r\n exitPopupChat.messages.agentFontField.size\r\n );\r\n root.documentElement.style.setProperty(\r\n '--agentFontFieldFontFamily',\r\n exitPopupChat.messages.agentFontField.family\r\n );\r\n root.documentElement.style.setProperty(\r\n '--agentFontFielditalic',\r\n exitPopupChat.messages.agentFontField.italic\r\n );\r\n root.documentElement.style.setProperty(\r\n '--agentFontFieldbold',\r\n exitPopupChat.messages.agentFontField.bold\r\n );\r\n root.documentElement.style.setProperty(\r\n '--agentFontFieldunderline',\r\n exitPopupChat.messages.agentFontField.underline\r\n );\r\n\r\n root.documentElement.style.setProperty(\r\n '--visitorFontColor',\r\n exitPopupChat.messages.visitorFontField.color\r\n );\r\n root.documentElement.style.setProperty(\r\n '--visitorFontSize',\r\n exitPopupChat.messages.visitorFontField.size\r\n );\r\n root.documentElement.style.setProperty(\r\n '--visitorFontFamily',\r\n exitPopupChat.messages.visitorFontField.family\r\n );\r\n root.documentElement.style.setProperty(\r\n '--visitorFontitalic',\r\n exitPopupChat.messages.visitorFontField.italic\r\n );\r\n root.documentElement.style.setProperty(\r\n '--visitorFontbold',\r\n exitPopupChat.messages.visitorFontField.bold\r\n );\r\n root.documentElement.style.setProperty(\r\n '--visitorFontunderline',\r\n exitPopupChat.messages.visitorFontField.underline\r\n );\r\n\r\n root.documentElement.style.setProperty(\r\n '--visitorFontFieldColor',\r\n exitPopupChat.messages.visitorFontField.color\r\n );\r\n root.documentElement.style.setProperty(\r\n '--visitorFontFieldFontSize',\r\n exitPopupChat.messages.visitorFontField.size\r\n );\r\n root.documentElement.style.setProperty(\r\n '--visitorFontFieldFontFamily',\r\n exitPopupChat.messages.visitorFontField.family\r\n );\r\n root.documentElement.style.setProperty(\r\n '--visitorFontFielditalic',\r\n exitPopupChat.messages.visitorFontField.italic\r\n );\r\n root.documentElement.style.setProperty(\r\n '--visitorFontFieldbold',\r\n exitPopupChat.messages.visitorFontField.bold\r\n );\r\n root.documentElement.style.setProperty(\r\n '--visitorFontFieldunderline',\r\n exitPopupChat.messages.visitorFontField.underline\r\n );\r\n\r\n root.documentElement.style.setProperty(\r\n '--powerByFontColor',\r\n exitPopupChat.footer.poweredByFont.color\r\n );\r\n root.documentElement.style.setProperty(\r\n '--powerByFontSize',\r\n exitPopupChat.footer.poweredByFont.size\r\n );\r\n root.documentElement.style.setProperty(\r\n '--powerByFontFamily',\r\n exitPopupChat.footer.poweredByFont.family\r\n );\r\n root.documentElement.style.setProperty(\r\n '--powerByFontitalic',\r\n exitPopupChat.footer.poweredByFont.italic\r\n );\r\n root.documentElement.style.setProperty(\r\n '--powerByFontbold',\r\n exitPopupChat.footer.poweredByFont.bold\r\n );\r\n root.documentElement.style.setProperty(\r\n '--powerByFontunderline',\r\n exitPopupChat.footer.poweredByFont.underline\r\n );\r\n\r\n root.documentElement.style.setProperty(\r\n '--headerTitleFontColor',\r\n exitPopupChat.header.titleFont.color\r\n );\r\n root.documentElement.style.setProperty(\r\n '--headerTitleFontSize',\r\n exitPopupChat.header.titleFont.size\r\n );\r\n root.documentElement.style.setProperty(\r\n '--headerTitleFontFamily',\r\n exitPopupChat.header.titleFont.family\r\n );\r\n root.documentElement.style.setProperty(\r\n '--headerTitleFontitalic',\r\n exitPopupChat.header.titleFont.italic\r\n );\r\n root.documentElement.style.setProperty(\r\n '--headerTitleFontbold',\r\n exitPopupChat.header.titleFont.bold\r\n );\r\n root.documentElement.style.setProperty(\r\n '--headerTitleFontunderline',\r\n exitPopupChat.header.titleFont.underline\r\n );\r\n\r\n root.documentElement.style.setProperty(\r\n '--typingIndicatorFontColor',\r\n exitPopupChat.body.typingIndicatorFont.color\r\n );\r\n root.documentElement.style.setProperty(\r\n '--sendbuttonBackgroundColor',\r\n exitPopupChat.sendButton.sendbuttonBackgroundColor\r\n );\r\n root.documentElement.style.setProperty(\r\n '--sendbuttonTextColor',\r\n setTextColorBasedOnBg(exitPopupChat.sendButton.sendbuttonBackgroundColor)\r\n );\r\n root.documentElement.style.setProperty('--qTQuestion', rdChat.questionType.qTQuestion);\r\n\r\n root.documentElement.style.setProperty(\r\n '--phoneTextField',\r\n exitPopupChat.general.phoneTextField\r\n );\r\n if (exitPopupChat.header.exitPopupOnlineIndicator) {\r\n root.documentElement.style.setProperty('--exitPopupOnlineIndicator', 'block');\r\n } else {\r\n root.documentElement.style.setProperty('--exitPopupOnlineIndicator', 'none');\r\n }\r\n\r\n if (exitPopupChat.header.hideHeaderLogo) {\r\n root.documentElement.style.setProperty('--hideHeaderLogoDisplay', 'none');\r\n } else {\r\n root.documentElement.style.setProperty('--hideHeaderLogoDisplay', 'block');\r\n }\r\n if (exitPopupChat.footer.hidePoweredBySection) {\r\n root.documentElement.style.setProperty('--hidePoweredByDisplay', 'none');\r\n } else {\r\n root.documentElement.style.setProperty('--hidePoweredByDisplay', 'block');\r\n }\r\n root.documentElement.style.setProperty('--footerBackgroundColor', exitPopupChat.footer.backgroundColor);\r\n if (exitPopupChat.messages.visitorFontField.color) {\r\n root.documentElement.style.setProperty(\r\n '--visitorFontFieldOpacityColor',\r\n `${exitPopupChat.messages.visitorFontField.color}0a`\r\n );\r\n }\r\n if (exitPopupChat.messages.visitorFontField.color) {\r\n const agentFontFieldOpacityColor = `${exitPopupChat.messages.agentFontField.color}0a`;\r\n root.documentElement.style.setProperty(\r\n '--agentFontFieldOpacityColor',\r\n agentFontFieldOpacityColor\r\n );\r\n }\r\n if (exitPopupChat.messages.agentFontField.color) {\r\n const messageBgColor = `${exitPopupChat.messages.agentFontField.color}0F`;\r\n root.documentElement.style.setProperty('--messageBgColor', messageBgColor);\r\n }\r\n if (exitPopupChat.header.imageShape === 'Circle') {\r\n root.documentElement.style.setProperty('--imageShape', '50%');\r\n } else {\r\n root.documentElement.style.setProperty(\r\n '--imageShape',\r\n `${exitPopupChat.header.imageShape.match(/\\d/g).join('')}%`\r\n );\r\n }\r\n\r\n if (exitPopupChat.header.imageShape === 'Circle') {\r\n root.documentElement.style.setProperty('--imageShape', '50%');\r\n } else {\r\n root.documentElement.style.setProperty(\r\n '--imageShape',\r\n `${exitPopupChat.header.imageShape.match(/\\d/g).join('')}%`\r\n );\r\n }\r\n root.documentElement.style.setProperty(\r\n '--sendbuttonBackgroundColorOpacity',\r\n `${exitPopupChat.sendButton.sendbuttonBackgroundColor}30`\r\n );\r\n root.documentElement.style.setProperty(\r\n '--qTButton',\r\n `${exitPopupChat.sendButton.sendbuttonBackgroundColor}`\r\n );\r\n root.documentElement.style.setProperty('--hallowBtn', exitPopupChat.sendButton.sendbuttonBackgroundColor);\r\n\r\n root.documentElement.style.setProperty(\r\n '--qTButtonIcon',\r\n `${exitPopupChat.sendButton.sendbuttonBackgroundColor}`\r\n );\r\n\r\n root.documentElement.style.setProperty(\r\n '--qTButtonText',\r\n `${exitPopupChat.sendButton?.sendbuttonFont?.color}`\r\n );\r\n\r\n root.documentElement.style.setProperty(\r\n '--visitorBgColor',\r\n `${exitPopupChat.messages?.visitorBackgroundColor}`\r\n );\r\n root.documentElement.style.setProperty(\r\n '--visitorFontColor',\r\n `${exitPopupChat.messages?.visitorFontField?.color}`\r\n );\r\n\r\n root.documentElement.style.setProperty(\r\n '--headerFontColor',\r\n `${exitPopupChat.sendButton?.sendbuttonFont?.color}`\r\n );\r\n\r\n if (exitPopupChat.header.hideHeaderLogo) {\r\n root.documentElement.style.setProperty('--hideHeaderLogoOpacity', '0');\r\n } else {\r\n root.documentElement.style.setProperty('--hideHeaderLogoOpacity', '1');\r\n }\r\n\r\n if (exitPopupChat.enableBranding) {\r\n\r\n const brandSolid = exitPopupChat.general.leftBarBackground1Color;\r\n const visitorMsgBubble = `${brandSolid}b3`;\r\n const staticDark = \"#020202\";\r\n\r\n root.documentElement.style.setProperty('--sendbuttonColor', brandSolid);\r\n root.documentElement.style.setProperty('--headerColor', brandSolid);\r\n root.documentElement.style.setProperty('--brandColor', visitorMsgBubble);\r\n root.documentElement.style.setProperty('--brandingLeftBarBackground1Color', brandSolid);\r\n\r\n // message bubble\r\n root.documentElement.style.setProperty('--visitorBgColor', setHexWithAlphaToSolid(visitorMsgBubble));\r\n root.documentElement.style.setProperty('--visitorFontColor', setTextColorBasedOnBg(brandSolid));\r\n\r\n // left bar\r\n const textColor = setTextColorBasedOnBg(brandSolid)\r\n root.documentElement.style.setProperty('--participantsFontColor', textColor);\r\n root.documentElement.style.setProperty('--headerTitleFontColor', textColor);\r\n root.documentElement.style.setProperty('--phoneFontColor', textColor);\r\n root.documentElement.style.setProperty('--powerByFontColor', textColor);\r\n root.documentElement.style.setProperty('--leftBarBackground1Color', setHexWithAlphaToSolid(brandSolid));\r\n root.documentElement.style.setProperty('--headerFontColor', textColor);\r\n root.documentElement.style.setProperty('--qTButtonText', textColor);\r\n root.documentElement.style.setProperty('--qTBorder', staticDark);\r\n root.documentElement.style.setProperty('--hallowBtn', staticDark);\r\n root.documentElement.style.setProperty('--qTButtonIcon', staticDark);\r\n\r\n }\r\n};\r\nexport default setEpWindowStyles;\r\n","import getStyle from './getStyle';\r\n\r\nconst centerElement = function (el, extra) {\r\n let width;\r\n let height;\r\n if (extra) {\r\n if (!extra.width) {\r\n throw '2nd args must have width value';\r\n }\r\n if (!extra.height) {\r\n throw '2nd args must have height value';\r\n }\r\n width = parseInt(extra.width);\r\n height = parseInt(extra.height);\r\n } else {\r\n // not required for now\r\n width = getStyle(el, 'width');\r\n height = getStyle(el, 'height');\r\n }\r\n const marginLeft = width / 2;\r\n const marginTop = height / 2;\r\n el.style.left = '50%';\r\n el.style.top = '50%';\r\n el.style.position = 'fixed';\r\n el.style.marginLeft = `-${marginLeft}px`;\r\n el.style.marginTop = `-${marginTop}px`;\r\n};\r\nexport default centerElement;\r\n","import hasClass from './hasClass';\r\n\r\nconst addClass = function (ele, cls) {\r\n if (ele) {\r\n if (!hasClass(ele, cls)) {\r\n ele.className += ` ${cls}`;\r\n }\r\n }\r\n};\r\nexport default addClass;\r\n","const addTargetBlank = function (htmlString) {\r\n return htmlString.replace(/]*\\btarget=)[^>]*>/gi, match => {\r\n return match.replace('>', ' target=\"_blank\">');\r\n });\r\n};\r\nexport default addTargetBlank;\r\n","const hasClass = function (ele, cls) {\r\n if (ele) {\r\n return ele.className.match(new RegExp(`(\\\\s|^)${cls}(\\\\s|$)`));\r\n }\r\n};\r\nexport default hasClass;\r\n","const BrandingWidget = {\r\n RD_DOM: 1,\r\n RD_Invitation: 2,\r\n RD_EP: 3,\r\n RD_PreChat: 4\r\n};\r\nexport default BrandingWidget;\r\n","// note: contains utility function like lodash.js\r\n// todo: this should be move to some other location in a better way\r\nconst underscore = {\r\n // todo: very basic implementation without any typechecking\r\n firstIndex(items, predicate) {\r\n let selectedindex = -1;\r\n for (let i = 0; i < items.length; i++) {\r\n if (predicate(items[i])) {\r\n selectedindex = i;\r\n break;\r\n }\r\n }\r\n return selectedindex;\r\n },\r\n isFunction(func) {\r\n return typeof func === 'function';\r\n },\r\n // isArray: function (func) {\r\n // // for safe-side for very old browsers like chrome 5 and current version is Chrome#90.\r\n // if (typeof Array.isArray === 'undefined') {\r\n // Array.isArray = function (obj) {\r\n // return Object.prototype.toString.call(obj) === '[object Array]';\r\n // }\r\n // }\r\n // return Array.isArray(func);\r\n // },\r\n isPlainObject(obj) {\r\n /**\r\n * Because of IE, we must also check the constructor properties to ensure that node objects and window objects are not passed.\r\n */\r\n if (!obj || typeof obj !== 'object' || obj.nodeType || underscore.isWindow(obj)) {\r\n return false;\r\n }\r\n try {\r\n // If obj has no constructor attribute and no obj in the prototype chain of obj returns false\r\n if (\r\n obj.constructor &&\r\n !underscore.hasOwn.call(obj, 'constructor') &&\r\n !underscore.hasOwn.call(obj.constructor.prototype, 'isPrototypeOf')\r\n ) {\r\n return false;\r\n }\r\n } catch (e) {\r\n // IE8,9 will throw throw exceptions on certain host\r\n return false;\r\n }\r\n let key;\r\n for (key in obj) {\r\n }\r\n /**\r\n * If the key is not assigned, return fasle\r\n */\r\n return key === undefined || underscore.hasOwn.call(obj, key);\r\n },\r\n hasOwn:\r\n {}.hasOwnProperty ||\r\n function (prop) {\r\n if (prop in this) {\r\n const value = this[prop];\r\n\r\n if (!delete this[prop]) {\r\n return true;\r\n }\r\n if (!(prop in this) || this[prop] !== value) {\r\n this[prop] = value;\r\n return true;\r\n }\r\n }\r\n return false;\r\n },\r\n isWindow(obj) {\r\n return obj != null && obj === obj.window;\r\n }\r\n};\r\nexport default underscore;\r\n","import underscore from \"./hooks/underscore\";\r\n\r\nexport default function extend() {\r\n let options;\r\n let name;\r\n let src;\r\n let copy;\r\n let copyIsArray;\r\n let clone;\r\n let target = arguments[0] || {};\r\n let i = 1;\r\n const { length } = arguments;\r\n let deep = false;\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean') {\r\n deep = target;\r\n target = arguments[1] || {};\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n // Handle case when target is a string or something (possible in deep copy)\r\n if (typeof target !== 'object' && !underscore.isFunction(target)) {\r\n target = {};\r\n }\r\n // extend jQuery itself if only one argument is passed\r\n if (length === i) {\r\n target = this;\r\n --i;\r\n }\r\n for (; i < length; i++) {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null) {\r\n // Extend the base object\r\n for (name in options) {\r\n src = target[name];\r\n copy = options[name];\r\n // Prevent never-ending loop\r\n if (target === copy) {\r\n continue;\r\n }\r\n // Recurse if we're merging plain objects or arrays\r\n if (\r\n deep &&\r\n copy &&\r\n (underscore.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))\r\n ) {\r\n if (copyIsArray) {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n } else {\r\n clone = src && underscore.isPlainObject(src) ? src : {};\r\n }\r\n // Never move original objects, clone them\r\n target[name] = extend(deep, clone, copy);\r\n // Don't bring in undefined values\r\n } else if (copy !== undefined) {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n // Return the modified object\r\n return target;\r\n}\r\n","import extend from '../extend';\r\nimport BrandingWidget from '../enums/BrandingWidget';\r\n\r\n/**\r\n * Apply Branding.\r\n * takes config as param returns by settings branding values\r\n * used in Portal & Visitor-end\r\n */\r\nexport default class Branding {\r\n init(options, me) {\r\n this.widget = options.widget;\r\n // Brand config\r\n this.brand = { config: options.brandConfig };\r\n this.brandColor = this.brand.config.global.branding.brandColorCode;\r\n this.brandColorOpacity = `${this.brand.config.global.branding.brandColorCode}0F`; // Hex code 0F for 4% opacity\r\n\r\n // Apply Branding config\r\n this.applyBranding(this.widget);\r\n return this;\r\n }\r\n\r\n applyBranding(widget) {\r\n const me = this;\r\n switch (widget) {\r\n case BrandingWidget.RD_DOM:\r\n return (function () {\r\n // Generic function for RD DOM, takes property of specfic widget, and set up the config.\r\n me.overrideConfig(BrandingWidget.RD_DOM, 'rdChat');\r\n })();\r\n case BrandingWidget.RD_Invitation:\r\n return (function () {\r\n // Generic function, takes property of specfic widget, and set up the config.\r\n me.overrideConfig(BrandingWidget.RD_Invitation, 'rdInvitation');\r\n })();\r\n case BrandingWidget.RD_EP:\r\n return (function () {\r\n // Generic function, takes property of specfic widget, and set up the config.\r\n me.overrideConfig(BrandingWidget.RD_EP, 'exitPopupChat');\r\n })();\r\n case BrandingWidget.RD_PreChat:\r\n return (function () {\r\n // Generic function, takes property of specfic widget, and set up the config.\r\n me.overrideConfig(BrandingWidget.RD_DOM, 'rdThemeSettings');\r\n me.overrideConfig(BrandingWidget.RD_PreChat, 'preChat');\r\n })();\r\n default:\r\n }\r\n }\r\n\r\n /**\r\n * / Generic function which override the config for branding\r\n * @param {any} widget\r\n * @param {any} propertyName\r\n */\r\n overrideConfig(widget, propertyName) {\r\n const me = this;\r\n // getting branding object\r\n const brandedConfig = me.getBrandingElements(widget);\r\n const backupConfig = JSON.parse(JSON.stringify(me.brand.config)); // Cloning object\r\n\r\n // overriding the orignal config with branding\r\n const config = extend(true, me.brand.config[propertyName], brandedConfig);\r\n backupConfig[propertyName] = config;\r\n me.brandedConfig = backupConfig;\r\n }\r\n\r\n getBrandedConfig() {\r\n return this.brandedConfig;\r\n }\r\n\r\n getBrandingElements(widget) {\r\n const me = this;\r\n // In case of branding Visitor Response text is static #3A3A3A\r\n const brandingStaticValues = {\r\n color: '#3A3A3A',\r\n backgroundColor: '#3A3A3A0F',\r\n whiteText: '#FFFFFF',\r\n darkOpacity: `#303030${80}`\r\n };\r\n switch (widget) {\r\n case BrandingWidget.RD_DOM:\r\n return {\r\n enableBranding: true,\r\n brandColor: me.brandColor,\r\n brandColorOpacity: me.brandColorOpacity,\r\n whiteText: brandingStaticValues.whiteText,\r\n general: {\r\n headerColor: me.brandColor,\r\n disclaimerFont: {\r\n color: me.brandColor\r\n },\r\n disclaimerBgColor: me.brandColorOpacity\r\n },\r\n messages: {\r\n agentFont: {\r\n color: me.brandColor\r\n },\r\n visitorFont: {\r\n color: brandingStaticValues.color\r\n },\r\n visitorBgColor: brandingStaticValues.backgroundColor,\r\n typingIndicatorDots: me.brandColor,\r\n agentBgColor: me.brandColorOpacity\r\n },\r\n questionType: {\r\n qTBorder: me.brandColor,\r\n qTQuestion: me.brandColor,\r\n qTButton: me.brandColor\r\n }\r\n };\r\n case BrandingWidget.RD_Invitation:\r\n return {\r\n general: {\r\n backgroundColor: me.brandColor,\r\n typingIndicator: me.brandColor,\r\n btnClose: me.brandColorOpacity\r\n },\r\n rdIcon: {\r\n dotColor: me.brandColor,\r\n dotAnimationColor: me.brandColor\r\n }\r\n };\r\n case BrandingWidget.RD_EP:\r\n return {\r\n enableBranding: true,\r\n general: {\r\n leftBarBackground1Color: me.brandColor,\r\n leftBarBackground2Color: me.brandColor,\r\n btnClose: me.brandColorOpacity,\r\n opacityBrandColor: me.brandColorOpacity,\r\n disclaimerFont: {\r\n color: me.brandColor\r\n }\r\n },\r\n header: {\r\n participantsFont: {\r\n color: brandingStaticValues.whiteText\r\n }\r\n },\r\n messages: {\r\n agentFontField: {\r\n color: me.brandColor\r\n },\r\n visitorFontField: {\r\n color: brandingStaticValues.color\r\n }\r\n },\r\n body: {\r\n typingIndicatorFont: {\r\n color: me.brandColor\r\n }\r\n },\r\n sendButton: {\r\n sendbuttonBackgroundColor: me.brandColor\r\n }\r\n };\r\n case BrandingWidget.RD_PreChat:\r\n return {\r\n enableBranding: true,\r\n messagePopup: {\r\n highLightColor: me.brandColor,\r\n rdGlowTagColor: me.brandColor\r\n }\r\n };\r\n }\r\n }\r\n}\r\n","/*\r\nA Generic class to create an HTML View in browser's window.document\r\nRequired: identifier, 0-many templates \r\n*/\r\nimport addStyleTextInIframe from './hooks/addStyleTextInIframe';\r\nimport parseTemplate from './hooks/parseTemplate';\r\nimport WidgetTypes from './enums/WidgetTypes';\r\nimport AgentImageHandler from './hooks/AgentImageHandler';\r\nimport getStyleForIframe from './hooks/getStyleForIframe';\r\nimport observe from './hooks/observe';\r\nimport showElement from './hooks/showElement';\r\nimport hideElement from './hooks/hideElement';\r\n\r\nexport default class WidgetView {\r\n constructor(options) {\r\n // if (!options.identifier) {\r\n // throw 'identifier is mandatory';\r\n // }\r\n this.options = options;\r\n this.DOM = options.dom;\r\n this.identifier = options.identifier; // EP, DOM or Windowed, etc\r\n this.elements = options.elements ? options.elements : {}; // key-val\r\n this.templates = options.templates; // key-val\r\n if (this.options.style) {\r\n // w idget level css\r\n this.style(this.options.style);\r\n }\r\n if (this.options.cssLink) {\r\n getStyleForIframe(this.options.cssLink, this.options.linkId, undefined, this.DOM);\r\n }\r\n // widget level beforeRender\r\n if (this.options.beforeRender) {\r\n window.setTimeout(this.options.beforeRender.bind2(this), 0);\r\n }\r\n if (options.initialState) {\r\n this.render(options.initialState);\r\n }\r\n // apply polyfills if any - widget level\r\n if (this.options.polyfills) {\r\n this.pollyfill(this, this.options.polyfills);\r\n }\r\n }\r\n\r\n getBody() {\r\n return this.DOM.getElementsByTagName('body')[0];\r\n }\r\n\r\n /*\r\n selectors: is a string containing one or more CSS selectors separated by commas.\r\n */\r\n bind(selector, ev, cb) {\r\n // not tested/used much yet\r\n let elMatched;\r\n try {\r\n elMatched = this.DOM.querySelector(selector);\r\n } catch (e) {\r\n throw 'invalid selector';\r\n }\r\n if (elMatched) {\r\n observe(elMatched, ev, cb.bind2(this, cb)); // invoke cb with in 'this' context\r\n }\r\n }\r\n\r\n reRender(model) {\r\n const wrapper = this.DOM.querySelector(this.elements.containerSelector);\r\n wrapper.innerHTML = parseTemplate(model.chatWidgetTemplate, model);\r\n }\r\n\r\n getContainer() {\r\n return this.elements.containerSelector;\r\n }\r\n\r\n render(state) {\r\n const me = this;\r\n // grab target based on state and show it if already present\r\n const wrapperContainer = this.DOM.getElementById(this.identifier + state);\r\n if (wrapperContainer) {\r\n showElement(wrapperContainer);\r\n return;\r\n }\r\n const tpl = this.templates.find((tpl) => tpl.key == state);\r\n let wrapper;\r\n if (tpl) {\r\n // tpl level beforeRender\r\n if (tpl.beforeRender) {\r\n tpl.beforeRender(tpl);\r\n }\r\n const target = tpl.model.targetElementId\r\n ? this.DOM.getElementById(tpl.model.targetElementId)\r\n : this.getBody();\r\n wrapper = tpl.containerElemType\r\n ? this.DOM.createElement(tpl.containerElemType)\r\n : this.DOM.createElement('div');\r\n\r\n tpl.model.handlerImageUrl = AgentImageHandler(tpl.model.handlerImageUrl);\r\n wrapper.innerHTML = tpl.tpl;\r\n if (tpl.style) {\r\n // tpl level css\r\n this.style(tpl.style);\r\n }\r\n if (tpl.cssLink) {\r\n getStyleForIframe(tpl.cssLink, tpl.linkId, undefined, this.DOM);\r\n }\r\n const containerId = tpl.containerId ? tpl.containerId : this.identifier + state;\r\n wrapper.setAttribute('id', containerId);\r\n if (this.identifier != WidgetTypes.ExitPopup) {\r\n // In case of ExitPopup we dont need this.\r\n hideElement(wrapper);\r\n }\r\n this.elements.containerSelector = `#${containerId}`;\r\n target.appendChild(wrapper);\r\n\r\n // apply polyfills if any - particular template/view level\r\n if (tpl.polyfills) {\r\n this.pollyfill(tpl, tpl.polyfills);\r\n }\r\n } else {\r\n throw `no state found with the key: ${state}`;\r\n }\r\n // tpl level afterRender\r\n if (tpl.afterRender) {\r\n if (\r\n this.identifier === WidgetTypes.ExitPopup ||\r\n this.identifier === WidgetTypes.PreChat\r\n ) {\r\n // In case of ExitPopup and prechat we dont need this.\r\n } else {\r\n window.setTimeout(() => {\r\n if (this.identifier === WidgetTypes.DOM) {\r\n wrapper.style.visibility = 'hidden';\r\n }\r\n showElement(wrapper);\r\n }, 0);\r\n }\r\n window.setTimeout(tpl.afterRender.bind2(this, tpl), 0);\r\n }\r\n // widget level afterRender\r\n if (this.options.afterRender) {\r\n this.options.afterRender.bind2(this);\r\n }\r\n }\r\n\r\n unrender(state, remove) {\r\n // grab target based on state and hide it if already present\r\n const wrapperContainer = this.DOM.getElementById(this.identifier + state);\r\n if (wrapperContainer) {\r\n hideElement(wrapperContainer);\r\n }\r\n // remove altogether if asked\r\n if (remove == true) {\r\n try {\r\n this.DOM.body.removeChild(wrapperContainer);\r\n } catch (e) { }\r\n }\r\n }\r\n\r\n style(css) {\r\n const cssArr = Array.isArray(css) ? css : [css]; // css could be a single obj or list of css obj's\r\n for (let i = 0; i < cssArr.length; i++) {\r\n addStyleTextInIframe(cssArr[i], undefined, undefined, this.DOM);\r\n }\r\n }\r\n\r\n // These are callback functions which get invoked after rendering a view\r\n pollyfill(scope, callbacks) {\r\n const tweaksArr = Array.isArray(callbacks) ? callbacks : [callbacks]; // tweaks could be a single func or list of func\r\n for (let i = 0; i < tweaksArr.length; i++) {\r\n const tweak = tweaksArr[i];\r\n if (typeof tweak === 'function') {\r\n try {\r\n tweak.apply(scope, tweak.arguments);\r\n } catch (e) {\r\n // console.log(e);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","import setHexWithAlphaToSolid from \"./setHexWithAlphaToSolid\";\r\n\r\nfunction setTextColorBasedOnBg(hex) {\r\n let hexColor = hex\r\n // Remove the \"#\" if it exists\r\n hexColor = hex.replace(\"#\", \"\");\r\n\r\n if (hexColor.length == 8) {\r\n hexColor = setHexWithAlphaToSolid(hexColor)\r\n }\r\n // Convert hex to RGB\r\n const r = parseInt(hexColor.substring(0, 2), 16);\r\n const g = parseInt(hexColor.substring(2, 4), 16);\r\n const b = parseInt(hexColor.substring(4, 6), 16);\r\n\r\n // Calculate relative luminance\r\n const luminance = 0.2126 * r + 0.7152 * g + 0.0722 * b;\r\n\r\n // Return text color based on luminance\r\n return luminance < 128 ? \"#FFFFFF\" : \"#020202\";\r\n}\r\n\r\nexport default setTextColorBasedOnBg","const createElement = function (css, elType, id, innerHtml) {\r\n const el = document.createElement(elType || 'div');\r\n if (css) {\r\n el.className = css;\r\n }\r\n if (id) {\r\n el.setAttribute('id', id);\r\n }\r\n if (innerHtml) {\r\n el.innerHTML = innerHtml;\r\n }\r\n // apply default tabindex\r\n el.setAttribute('tabindex', -1);\r\n return el;\r\n};\r\nexport default createElement;\r\n"],"names":["hexColor","replace","length","split","map","x","join","r","parseInt","substring","g","b","a","solidR","Math","round","solidG","solidB","toString","padStart","EPUIController","ChatUIController","constructor","options","opt","Object","assign","elements","textboxSelector","agentTitle","clickSourceId","messagesContainerSelector","typingIndicatorSelector","autoCompleteInput","maximizeState","closeSelector","handlerImageSelector","minimizedImage","companyTitle","clicktoStart","minimizePoweredBy","popoutSelector","clickSelector","soundControl","soundMute","soundUnmute","regionEditorContainer","regionEditorContainerWrapper","model","exitPopupRegionEditorContainerId","multiLanguage_dropdown_wrapperSelector","multiLanguage_dropdown_container","multiLanguage_dropdown_select","inputContainerSelector","actionMenuStartSMSChat","smsBottomSheetClose","widget","WidgetTypes","objectType","super","this","mode","ExitPopup","chatStarted","bind","state","me","WidgetStates","ShownMinimized","headerDisclaimer","trim","$","context","hide","click","ApexChat","preLoadedOptions","on","actionMenuSelector","IsRoundedDynamicPlusTheme","html","poweredBy","exitPopupChat","chatTitle","attr","AgentImageHandler","handlerImageUrl","agentName","hideOnlineAgent","onlineAgentText","agentOnlineText","genericHandlerAliasingEnabled","scriptBotEnabled","invokeKeyDown","e","loadChatRoom","cb","show","isPageRefreshed","exitpopup","chatbotGreetingMessages","script","structuredClone","agentScript","JSON","stringify","agentScriptOptions","exitPopupMessages","forEach","msg","message","fixDataBinding","ShownMaximized","queuePredefinedQTs","renderPredefinedMessages","questionType","ScriptsQuestionType","AppointmentScheduler","isChatActive","bindAppointmenSchedulePredefined","call","questionTypeRenderer","clearAllSubscriptions","pop","end","changeState","origin","toState","Closed","endChat","storageAPI","StoreTemp","endChatSession","Remove","TempCache","APEXCHAT_PRECHAT_MESSAGE_IDS_COOKIE","text","participantDisplayName","id","userId","EP_PREDEFINED_AGENT_ID","createdOn","Date","isPredefinedMsg","renderMultiLanguageDropDown","config","implementMultiLanguageSupport","showMultiLangDropDown","nonSMSLanguages","multiLanguage_dropdown_wrapper","style","display","sendMessage","el","messageInput","v","val","Get","messageInputText","isPredefinedResponse","firstMsgSent","isChatroomAlive","QTRendererExt","isLastMessageFullText","validateFullTextMessage","preserveChatArray","push","index","ParticipantIds","visitor","participantId","agentParticipantId","predefined","isPreDefinedMessagesSent","publishPredefinedMessages","RunAsSoonAs","startWaiting","room","sendLive","showTyptingIndicatorForAIBot","isLastPhoneTypeValidated","value","onMessageTyping","autoComplete","is","isUserTyping","isEnterKeyPressed","logIt","window","clearTimeout","timeout","typing","sendTyping","preventDefault","ex","console","log","simulatePlainTextPredefinedResponse","onMessageArrived","GlobalVariables","predefinedMessageId","msgText","allowDupe","isFirstPredefinedMsgResponse","showTime","resetCurrentEPState","Cookies","del","Store","IS_PAGE_REFRESHED","startNewChatForEP","reInitializeChat","hideReInitOverlay","showChatEndedNotificationEP","optInConsentTaken","epReinitInner","epReinitWrapper","parent","addClass","css","setTimeout","removeClass","ADAHandler","querySelector","bind2","handleExitPopupPredefinedQT","res","isFromPreChat","isSkipped","TimeCalendar","Text","responseArray","Array","simulatePredefinedResponse","pokeMessageJob","stop","reInitChatSubscribeForEP","GetChatID","publishedPredefinedMessages","execChatStartHandler","handleQTCommaSepartedRow","m","option","hasAnswerInQTChatLogIdToBeUpdated","isExitPopupPredefinedMessage","UserIds","simulated","visitorResponseStatus","ScriptVisitorResponseStatus","Answered","visitorSelectedOptions","chatLogId","handleQuestionType","checkChatRoomLoaded","None","questionTypeChatLogIdToBeUpdated","handleFullTextType","isLastFullTextValidated","chatMsg","isGreeting","shouldRenderResponseAsText","onSuccess","data","publishQuestionTypeResponse","skipFullTextType","dataBindingTerm","indexOf","companyName","RDEPUIController","emoticonsAreaSelector","regionLabelSelector","rDEPHeaderLogoURLSelector","emojiIconSelector","emojiContentSelector","sidePanelHeaderText","sidePanelWelcomeText","textboxContainerSelector","isRoundedDynamic","rdActionButtons","rDEPHeaderLogoURL","setLogoLocation","location","rDEPLogoLocation","logoUrl","logoSize","rDEPLogoSize","encodeURI","EP_SIDEPANEL_HEADER_TEXT","EP_SIDEPANEL_WELCOME_TEXT","regionLabel","changeFontSize","addEmojiEvents","then","module","PokeMessageJob","default","postMessage","subscribe","ChatEvents","onOperatorNotAvailable","transferChatSelector","remove","OnChatTransferredToOperator","aiBotEnabled","setTransferredToLiveAgent","showElement","adjustRdActionMenu","OnPredefinedCompleted","args","start","reShowIntervalWindowed","reShowIntervalMinutes","isWindowedStarted","chatMode","ChatMode","Windowed","hasSmsNumber","isTransferredToLiveAgent","rdWindowedActionButtons","hideScriptbotMenuItems","element","fontCss","each","LogoLocation","Header","Side","showTyping","typingIndicator","hideTyping","onTypingArrived","self","indicator","messagesContainer","append","prop","autoScroll","initialLoad","lastSplitMsgCallback","_","toggleSendButtonClasses","adjustTextAreaHeight","forceInactive","event","isCleanUp","keyCode","target","applyResizeClassOnInput","textarea","wrapper","mainWrapper","classes","max","cleanup","ghostElement","createElement","removeValidationTooltip","toolTipCss","disableTypingInput","showPokeMessages","hidePokeMessages","resetInputHeightAfterSendMessage","chatLanguageInSession","TempStorageCache","get","chatLanguage","textPairValue","i","item","threeLetterISOLanguageName","languageFullName","selected","langSelect","populateSelectList","pluginDropSelect","apexChatDropSelect","className","wordWrap","callBack","selectedItem","filter","chatLanguageName","add","requestTransferringChat","langDropSelect","setSelectedDropdownItem","find","emojiContainer","hasClass","classList","contains","volumeMuteUnmute","removeAttr","restartVAChatSelector","isOperatorActive","bindVolumeMuteEvents","toggleMuteClass","addEventListener","stopPropagation","type","isAcceptKey","toggle","getStorageAPIValue","CHAT_SOUND_ENABLED","DOM","bindTransferChatEvents","uicontroller","enableChatTransfer","transferChat","focus","transferChatWhenChatroomAvailable","handleADA","clickButton","chatTransfer","actionMenu","ExitChatWindow","BaseWidget","targetElem","targetElement","resetHeight","reset","scrollHeight","height","CONTAINER_Z_INDEX","view","loadJQuery","loadJQueryPlugins","ApexChatJquery","ready","hideIt","Bar","Clicked","Tab","PreChat","MouseExit","shouldEPAppear","invokeChatInterceptor","maximize","minimize","OnChatReInit","reInitChatEP","create","isEPChatEnded","isChatClosed","currentState","getCurrentState","domState","getStateValue","winState","formState","VisitorForm","Hidden","ShownNormal","lastState","pageIsRefreshed","preloadEnabled","preloadChatOptions","getPreloadedChatOptions","createView","chatOptions","styleConfig","epConig","parse","rdEpThemeSettings","chatConfig","rdThemeSettings","footer","poweredByFont","skinConfig","container","rdChat","brandingInfo","branding","brandingIsEnabled","global","Branding","init","BrandingWidget","RD_EP","brandConfig","getBrandedConfig","GetEpSkinTemplate","renderedEPOnce","setEpWindowStyles","root","epStyleConfig","documentElement","setProperty","general","headerColor","sendButton","sendbuttonBackgroundColor","leftBarBackground1Color","leftBarBackground2Color","concat","header","participantsFont","color","size","family","italic","bold","underline","phoneFontField","enableBranding","btnClose","disclaimerFont","brandingBtnClose","opacityBrandColor","disclaimerBgColor","messages","agentBgColor","agentFontField","visitorFontField","titleFont","body","typingIndicatorFont","setTextColorBasedOnBg","qTQuestion","phoneTextField","exitPopupOnlineIndicator","hideHeaderLogo","hidePoweredBySection","backgroundColor","agentFontFieldOpacityColor","messageBgColor","imageShape","match","sendbuttonFont","visitorBackgroundColor","brandSolid","visitorMsgBubble","staticDark","setHexWithAlphaToSolid","textColor","getFormatedDay","epTemplate","ImportEPTemplateFactory","updateOptions","addTargetBlank","WidgetView","identifier","dom","cssLinkId","cssLink","CdnBaseUrl","Theme","templates","key","tpl","exitPopupThemeTemplate","beforeRender","chatMessageTemplate","parseTemplate","chatTitleTemplate","afterRender","vwMax","containerSelector","minimizeSelector","execChatStartHandlerWithThrottle","chatInitiatedBy","startWindowedChat","initAgentNotFoundOverlay","bindRestartChatEvents","initRestartOverlay","phoneWarningSelector","smsForm","WebSmsFormValidator","throttleByFunctionName","getCookieValue","ADACompliant","apply","minOrMax","startChatOnFirstMsg","simulateMessages","StringUtils","isNull","IsShowDisclaimeOverlay","shouldShowLocationDisclaimer","showDisclaimerOverlay","locationDisclaimerText","blur","sendMsgWhenChatroomAvailable","keydown","CHAT_ID_COOKIE","containerId","dropdownId","toggleSMSNumberInput","querySelectorAll","resize","exitPopupWidgetTemplateMinimized","invitationMinimizedText","invitationMinimizedTextTemplate","vwMin","invitationWidgetStyle","apexChatFontAwesomeCss","uiTweaks","handlePopupIcon","position","right","float","resizeIframe","resizeIFrameEP","widgetWrapper","document","getElementById","parentDivId","getStyle","iframeId","zIndex","extra","width","marginLeft","marginTop","left","top","centerElement","TempSize","iframeWidth","iframeHeight","childNodes","getAttribute","hideElement","stateToHide","chatStartOptions","chatId","render","unrender","close","ele","cls","htmlString","RegExp","RD_DOM","RD_Invitation","RD_PreChat","underscore","firstIndex","items","predicate","selectedindex","isFunction","func","isPlainObject","obj","nodeType","isWindow","hasOwn","prototype","undefined","hasOwnProperty","extend","name","src","copy","copyIsArray","clone","arguments","deep","isArray","brand","brandColor","brandColorCode","brandColorOpacity","applyBranding","overrideConfig","propertyName","brandedConfig","getBrandingElements","backupConfig","brandingStaticValues","whiteText","agentFont","visitorFont","visitorBgColor","typingIndicatorDots","qTBorder","qTButton","rdIcon","dotColor","dotAnimationColor","messagePopup","highLightColor","rdGlowTagColor","getStyleForIframe","linkId","initialState","polyfills","pollyfill","getBody","getElementsByTagName","selector","ev","elMatched","observe","reRender","innerHTML","chatWidgetTemplate","getContainer","wrapperContainer","targetElementId","containerElemType","setAttribute","appendChild","visibility","removeChild","cssArr","addStyleTextInIframe","scope","callbacks","tweaksArr","tweak","hex","elType","innerHtml"],"sourceRoot":""}