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0P,sBACpC,E","sources":["webpack://apexchatwidgets/./widgets/templates/invitations/videoGreet/videoGreet.ejs","webpack://apexchatwidgets/./widgets/videogreet/VideoGreetBaseMessageHandler.js","webpack://apexchatwidgets/./widgets/videogreet/VideoGreetMessageHandler.js","webpack://apexchatwidgets/./widgets/videogreet/VideoGreetInvitation.js"],"sourcesContent":["module.exports = function(obj) {\nobj || (obj = {});\nvar __t, __p = '';\nwith (obj) {\n__p += '\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n

\\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n Close\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
';\n\n}\nreturn __p\n}","/**\r\n * A base and generic class to handle chat messages regardless of context\r\n */\r\nimport BaseClass from '../core/BaseClass';\r\nimport WidgetTypes from '../core/enums/WidgetTypes';\r\nimport TempCache from '../core/enums/TempCache';\r\nimport { PreChatMessageAnimation } from '../core/enums/Enum';\r\nimport getHeightOfElement from '../core/hooks/getHeightOfElement';\r\nimport MessageStatus from '../core/hooks/MessageStatus';\r\nimport MessageVisibility from '../core/hooks/MessageVisibility';\r\nimport PreChatMessageAnimations from '../core/hooks/PreChatMessageAnimations';\r\nimport MessageView from '../core/MessageView';\r\n\r\nexport default class VideoGreetBaseMessageHandler extends BaseClass {\r\n // inheriting with BaseClass\r\n constructor(options) {\r\n super(options);\r\n this.options = Object.assign(options, {\r\n objectType: WidgetTypes.MessageHandler,\r\n ADAHandler: options.ADAHandler,\r\n context: options.context,\r\n videoGreetModel: options.videoGreetModel\r\n });\r\n\r\n this.messages = [];\r\n }\r\n\r\n push(model) {\r\n // push is not array push, its taking model as argument and doing several tasks.\r\n const me = this;\r\n const msg = new MessageView({\r\n context: this.options.context,\r\n wrap: this.options.wrap,\r\n targetElementSelector: this.options.targetElementSelector,\r\n renderOninit: this.options.renderOninit,\r\n model,\r\n template: model.template,\r\n index: this.messages.length,\r\n status: MessageStatus.Unread,\r\n visibility: MessageVisibility.Visible\r\n });\r\n const last = this.getLastMessage();\r\n\r\n if (this.messages.length > 0) {\r\n msg.isFirstMessage = false;\r\n this.messages[this.messages.length - 1].isLastMessage = false;\r\n }\r\n this.messages.push(msg);\r\n msg.view.removeClass('apexchat_prechat_show_message_fade_out');\r\n // getting lastMsg's duration of being on screen.\r\n const lastMsgModel = me.options.videoGreetModel.videoGreetMessages.filter(\r\n (prechatMsgArray) => {\r\n if (last) {\r\n return prechatMsgArray.id === last.view.model.id;\r\n }\r\n }\r\n );\r\n const duration = lastMsgModel[0] || { duration: 1 }; // Default:1//getting lastMsg's duration of being on screen.\r\n const animationConfig = {};\r\n // we are defining some configs for animations as we have similar animations Stacking & Mobile-Stacking\r\n // both are similar just few differences, like; faddingout timing, effect, close button difference, etc.\r\n if (this.options.preChatMessageAnimation == PreChatMessageAnimation.Stacking) {\r\n // defining config for Stacking\r\n animationConfig.StartFaddingOutAfter = 1000; // msg fadeout time\r\n animationConfig.HideMessageAfter = animationConfig.StartFaddingOutAfter; // hide the msg (which will resize iframe too)\r\n animationConfig.IFrameResizeAfterFaddingOut = animationConfig.StartFaddingOutAfter + 20; // adding 20ms in timeout for iframe resizing\r\n animationConfig.closeButtonSupported = 'No'; // close button is not supported in Stacking\r\n } else if (this.options.preChatMessageAnimation == PreChatMessageAnimation.MobileStacking) {\r\n // defining config for MobileStacking\r\n animationConfig.HideMessageAfter = duration.duration * 1000; // msg fadeout time\r\n animationConfig.StartFaddingOutAfter = 0.4 * 1000; // hide the msg (which will resize iframe too)\r\n animationConfig.closeButtonHeight = 30; // close button Height\r\n animationConfig.IFrameResizeAfterFaddingOut = 1000 + 20; // 20ms more // hide the msg (which will resize iframe too)\r\n animationConfig.closeButtonSupported = 'Yes'; // close button is supported in Mobile-Stacking\r\n }\r\n const heightCalculation = new this.heightCalculation({\r\n me: this,\r\n currentMsgView: msg.view,\r\n lastMsg: last,\r\n animationConfig,\r\n model\r\n });\r\n if (msg.isFirstMessage) {\r\n // FIRST Message\r\n // encapsulated the whole logic to make the clean implementation..\r\n heightCalculation.fixFirstElement();\r\n // Adding Animation to First/current msg.\r\n msg.animate(PreChatMessageAnimations.First, 0);\r\n } else {\r\n // NORMAL Messaging\r\n\r\n if (model.isFromHistory && me.isPageRefreshed()) {\r\n // encapsulated the whole logic to make the clean implementation..\r\n heightCalculation.fixFirstElement(duration);\r\n } else {\r\n // encapsulated the whole logic to make the clean implementation..\r\n heightCalculation.fixUpComingElement(duration);\r\n // Adding Animation to previous msgs and fading them after user's defined time.\r\n // duration of being on screen.\r\n if (last.animate) {\r\n last.animate(PreChatMessageAnimations.Previous, 0);\r\n last.animate(\r\n PreChatMessageAnimations.FadeOut,\r\n animationConfig.StartFaddingOutAfter || 0\r\n );\r\n }\r\n }\r\n // Adding Animation to current msg.\r\n msg.animate(PreChatMessageAnimations.Upcoming, 0);\r\n }\r\n }\r\n\r\n heightCalculation(options) {\r\n const self = this;\r\n self.elementObj = options;\r\n const { animationConfig } = options;\r\n const { me } = options;\r\n const extraHeight = 5;\r\n const msgPopupElementFirst = () => {\r\n // we need this timeout as DOM takes time to render, without timeout.\r\n // ApexChat.getStyle giving wrong values without timeout.\r\n setTimeout(() => {\r\n const { currentMsgView } = self.elementObj;\r\n const ele = me.$(`#${currentMsgView.identifier}`, currentMsgView.context);\r\n if (ele[0]) {\r\n // jquery selector element[0] returns default DOM html ele obj.\r\n // we need calculations here for placing msg popup with animation one over the other.\r\n me.postMessage({\r\n event: 'prechat-auto-resizing',\r\n data: {\r\n currentMsgHeight: getHeightOfElement(ele[0]),\r\n isSingleMsg: true\r\n }\r\n });\r\n const calcCurrentMsgHeight =\r\n TempCache.PRECHAT_Rounded_Message_Popup_Current_Height -\r\n getHeightOfElement(ele[0]) +\r\n extraHeight;\r\n ele.css(\r\n 'top',\r\n `${calcCurrentMsgHeight + (animationConfig.closeButtonHeight || 0)}px`\r\n );\r\n }\r\n }, 50);\r\n };\r\n function msgPopupElementUpcoming(duration) {\r\n const { currentMsgView } = self.elementObj;\r\n const last = self.elementObj.lastMsg;\r\n // Its obvious that UpComing msg scenario, FirstMsg or Prev has already been executed.\r\n // removing classes of first and upcoming msg from previous popup\r\n if (last.view.removeClass) {\r\n last.view.removeClass('apexchat_prechat_show_message_fade_out');\r\n last.view.removeClass(PreChatMessageAnimations.First);\r\n last.view.removeClass(PreChatMessageAnimations.Upcoming);\r\n }\r\n // duration timeout to keep them in vision according to user defined time.\r\n setTimeout(() => {\r\n me.$(`#${last.view.identifier}`, last.view.context).hide();\r\n }, animationConfig.HideMessageAfter);\r\n const elementlast = me.$(`#${last.view.identifier}`, last.view.context);\r\n const elementmsg = me.$(`#${currentMsgView.identifier}`, currentMsgView.context);\r\n // we need this timeout as DOM takes time to render, without timeout.\r\n // ApexChat.getStyle giving wrong values without timeout.\r\n setTimeout(() => {\r\n if (elementlast[0]) {\r\n // we need calculations here for placing msg popup with animation one over the other.\r\n // Resizing IFrame incase of Stack Msgs and making IFrame Wide enough to show the Stacked Msgs.\r\n me.postMessage({\r\n event: 'prechat-auto-resizing',\r\n data: {\r\n currentMsgHeight: getHeightOfElement(elementmsg[0]),\r\n prevMsgHeight: getHeightOfElement(elementlast[0]),\r\n dontAnimateClosebutton: true\r\n }\r\n });\r\n const calcLastMsgHeight =\r\n TempCache.PRECHAT_Rounded_Message_Popup_Last_Height -\r\n getHeightOfElement(elementmsg[0]) -\r\n getHeightOfElement(elementlast[0]); //\r\n const calcCurrentMsgHeight =\r\n TempCache.PRECHAT_Rounded_Message_Popup_Current_Height -\r\n getHeightOfElement(elementmsg[0]) -\r\n 20; //\r\n elementlast.animate({ top: calcLastMsgHeight }, 300);\r\n elementmsg.css(\r\n 'top',\r\n calcCurrentMsgHeight + (animationConfig.closeButtonHeight || 0)\r\n );\r\n }\r\n }, 50);\r\n // After fadding out of msg we need to decrease the IFrame size again.\r\n iFrameResizeOnFadeOut(elementmsg);\r\n }\r\n const lastMsgOnPageRefresh = function () {\r\n const { currentMsgView } = self.elementObj;\r\n const elementmsg = me.$(`#${currentMsgView.identifier}`, currentMsgView.context);\r\n const elementlast = me.$(`#${last.view.identifier}`, last.view.context);\r\n // we need this timeout as DOM takes time to render, without timeout.\r\n // ApexChat.getStyle giving wrong values without timeout.\r\n setTimeout(() => {\r\n // Resizing IFrame incase of Stack Msgs and making IFrame Wide enough to show the Stacked Msgs.\r\n me.postMessage({\r\n event: 'prechat-auto-resizing',\r\n data: {\r\n currentMsgHeight: getHeightOfElement(elementmsg[0]),\r\n prevMsgHeight: getHeightOfElement(elementlast[0])\r\n }\r\n });\r\n if (elementmsg[0]) {\r\n // we need calculations here for placing msg popup with animation one over the other.\r\n const calcCurrentHeight =\r\n TempCache.PRECHAT_Rounded_Message_Popup_Current_Height -\r\n getHeightOfElement(elementmsg[0]);\r\n elementmsg.css('top', calcCurrentHeight, 'height');\r\n }\r\n }, 50);\r\n // After fadding out of msg we need to decrease the IFrame size again.\r\n // _iFrameResize(elementmsg[0]);\r\n };\r\n let iFrameResizeOnFadeOut = function (ele) {\r\n let { IFrameResizeAfterFaddingOut } = animationConfig;\r\n if (me.isPageRefreshed() && !me.noLastMessageOnRefresh) {\r\n me.noLastMessageOnRefresh = true;\r\n IFrameResizeAfterFaddingOut = 1;\r\n }\r\n setTimeout(() => {\r\n me.postMessage({\r\n event: 'prechat-auto-resizing',\r\n data: {\r\n currentMsgHeight: getHeightOfElement(ele[0]),\r\n isSingleMsg: true,\r\n closeButtonSupported: animationConfig.closeButtonSupported\r\n }\r\n });\r\n ele.animate({ top: 15 + (animationConfig.closeButtonHeight || 0) }, 1);\r\n }, IFrameResizeAfterFaddingOut); // for Iframe resizing (animating msg and iframe was causing a glitch).\r\n };\r\n return {\r\n fixFirstElement: msgPopupElementFirst,\r\n fixUpComingElement: msgPopupElementUpcoming,\r\n fixLastMsgOnPageRefresh: lastMsgOnPageRefresh\r\n };\r\n }\r\n}\r\n","/*\r\n The class used to encapsulate VideoGreet specific logic to show and hide messages and hanlde state management \r\n */\r\nimport VideoGreetBaseMessageHandler from './VideoGreetBaseMessageHandler';\r\nimport WidgetTypes from '../core/enums/WidgetTypes';\r\nimport { ScriptsQuestionType } from '../core/enums/Enum';\r\nimport WebStorage from '../core/hooks/WebStorage';\r\n\r\nexport default class VideoGreetMessageHandler extends VideoGreetBaseMessageHandler {\r\n constructor(options) {\r\n super(options);\r\n this.options = Object.assign(options, {\r\n objectType: WidgetTypes.VideoGreetMessageHandler\r\n });\r\n\r\n // vars definination\r\n this.options.wrap = true; // create a wrapper div; use targetElement instead queried through targetElementSelector\r\n this.options.targetElementSelector = '#apexchat_prechat_message_popup_container'; // '#apexchat_prechat_message';//this will be the placeholder for all messages to render\r\n this.options.renderOninit = false; /* with this we stop auto-rendering and give the control to the caller(i.e. PreChatMessageHandler) to take care of rendering: in this case QuestionTypeRenderer */\r\n // reset storageAPI to use sessionStorage\r\n this.storageAPI = WebStorage({ type: 'session' });\r\n ApexChat.sessionAPI = this.storageAPI;\r\n\r\n this.loadAll(); // this will fetch the cashed messages from sessionStorage and parse them back and put them in this.messages; also render them\r\n }\r\n\r\n /* @param {any} model\r\n * used to show and save new messages\r\n summary: push actually takes model and call its parent push function which does whole job.. */\r\n push(model) {\r\n // push is not array push, its taking model as argument and doing several tasks.\r\n const template = this.getTemplate(model.messageType); // for now it does not matter for QR types\r\n this.options.renderOninit = model.questionType == ScriptsQuestionType.None; // render plain text messages or else let something else render it; e.g. questionTypeRenderer\r\n\r\n super.push(\r\n Object.assign(model, {\r\n template: this.messageTemplate || model.template,\r\n userId: model.userId || 0,\r\n participantDisplayName: model.participantDisplayName || '',\r\n createdOn: new Date()\r\n })\r\n );\r\n this.saveAll();\r\n }\r\n\r\n // a must-call method before push()\r\n setMessageTemplate(template) {\r\n this.messageTemplate = template;\r\n }\r\n\r\n // currently this is void; we are using this.messageTemplate already\r\n getTemplate(messageType) {\r\n const template = null;\r\n return template;\r\n }\r\n\r\n /* summary: returns the last msg view object frequently used for\r\n * taking previous msg in video greet to animate its html in unique style.\r\n */\r\n getLastMessage() {\r\n // returns view of LastMsg\r\n for (let i = 0; i < this.messages.length; i++) {\r\n if (this.messages[i].isLastMessage) {\r\n return this.messages[i];\r\n }\r\n }\r\n }\r\n\r\n getFirstMessage() {\r\n for (let i = 0; i < this.messages.length; i++) {\r\n if (this.messages[i].isFirstMessage) {\r\n return this.messages[i];\r\n }\r\n }\r\n }\r\n\r\n saveAll() {\r\n this.storageAPI.Store('livechat_prechat_messages_store', JSON.stringify(this.messages));\r\n }\r\n\r\n // makes sense only in reload scenarios\r\n loadAll() {\r\n const self = this;\r\n const cache = this.storageAPI.Get('livechat_prechat_messages_store');\r\n this.messages = cache ? JSON.parse(cache) : this.messages;\r\n const _render = function (messageObj) {\r\n messageObj.isFromHistory = true;\r\n self.push(messageObj);\r\n };\r\n\r\n for (let i = 0; i < self.messages.length; i++) {\r\n if (self.isChatActive() && self.isPageRefreshed()) {\r\n if (i == self.messages.length - 1) {\r\n // TODO: When Chat is started and is in progress, If the Prechat message is appeared doesnt remain appeared.\r\n // _render(this.messages[i]);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","/**\r\n * VideoGreet invitation loaded inside its own iframe\r\n */\r\n\r\nimport videojs from 'video.js';\r\nimport videoGreetInvitationTemplate from '../templates/invitations/videoGreet/videoGreet.ejs';\r\nimport VideoGreetMessageHandler from './VideoGreetMessageHandler';\r\nimport QuestionTypeRendererExtentions from '../questiontypes/QuestionTypeRendererExtension';\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 SourceType from '../core/enums/SourceTypes';\r\nimport BrandingWidget from '../core/enums/BrandingWidget';\r\nimport ParticipantIds from '../core/enums/ParticipantIds';\r\nimport GlobalVariables from '../core/GlobalVariables';\r\nimport cleanInvalidHtml from '../core/hooks/cleanInvalidHtml';\r\nimport ChatMode from '../core/hooks/ChatMode';\r\nimport PipedMessageHandler from '../core/hooks/PipedMessageHandler';\r\nimport ADACompliant from '../core/hooks/ADACompliant';\r\nimport {\r\n Position,\r\n PreChatMessageAnimation,\r\n PreChatMessageType,\r\n ScriptVisitorResponseStatus,\r\n ScriptsQuestionType\r\n} 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 Browser from '../core/hooks/Browser';\r\nimport removeMultipleCSSClasses from '../core/hooks/removeMultipleCSSClasses';\r\nimport encodeHTML from '../core/hooks/encodeHTML';\r\nimport decodeHTML from '../core/hooks/decodeHTML';\r\nimport removeTextFollowedByColon from '../core/hooks/removeTextFollowedByColon';\r\nimport stringify from '../core/hooks/stringify';\r\nimport addOptionProperty from '../core/hooks/addOptionProperty';\r\nimport setPrechatStyles from '../core/hooks/setPrechatStyles';\r\nimport RunAsSoonAs from '../core/hooks/RunAsSoonAs';\r\nimport Cookies from '../core/hooks/Cookies';\r\nimport ChatEvents from '../core/hooks/ChatEvents';\r\nimport WidgetStates from '../core/hooks/WidgetStates';\r\nimport getCookieValue from '../core/hooks/getCookieValue';\r\nimport getStorageAPIValue from '../core/hooks/getStorageAPIValue';\r\nimport localStorageAPIGet from '../core/hooks/localStorageAPIGet';\r\nimport storageAPIExists from '../core/hooks/storageAPIExists';\r\nimport hideElement from '../core/hooks/hideElement';\r\nimport removeClass from '../core/hooks/removeClass';\r\nimport addClass from '../core/hooks/addClass';\r\nimport localstorageAPIExists from '../core/hooks/localstorageAPIExists';\r\nimport logIt from '../../logIt';\r\nimport getStyleForIframe from '../core/hooks/getStyleForIframe';\r\nimport AgentImageHandler from '../core/hooks/AgentImageHandler';\r\n\r\nexport default class VideoGreetInvitation extends BaseWidget {\r\n constructor(options) {\r\n super(Object.assign(options, { styleName: 'videogreet' }));\r\n if (!options.videoGreetEnabled) {\r\n logIt('▶ Video Greet:: is disabled');\r\n return;\r\n }\r\n const me = this;\r\n me.templateRenderer = null;\r\n if (!me.options) {\r\n me.options = options;\r\n }\r\n me.initElements();\r\n if (me.options.videoGreet.chatbotGreetingMessages) {\r\n const script = structuredClone(me.options.videoGreet.chatbotGreetingMessages[0]);\r\n me.options.videoGreet.chatbotGreetingMessages[0].agentScript = script;\r\n delete me.options.videoGreet.chatbotGreetingMessages[0].agentScript.agentScript; // remove circular properties\r\n me.options.videoGreet.chatbotGreetingMessages[0].agentScript.options = JSON.stringify(me.options.videoGreet.chatbotGreetingMessages[0].agentScript.options)\r\n me.options.videoGreet.videoGreetMessages = me.options.videoGreet.chatbotGreetingMessages;\r\n }\r\n me.pipeMessageHandler = new PipedMessageHandler();\r\n me.DEFAULT_PRECHAT_CONFIG = {\r\n general: { template: 'Simple Style' },\r\n outerObject: {\r\n hideOuterObject: false,\r\n showImage: false,\r\n backgroundImage: '',\r\n background1Color: '#5FADD1',\r\n background2Color: '#5FADD1',\r\n borderColor: '#FFFFFF',\r\n borderWidth: '0px',\r\n borderRadius: '60px',\r\n padding: '20px 20px 20px 20px'\r\n },\r\n innerObject: {\r\n hideInnerObject: false,\r\n showImage: true,\r\n defaultImage: 'chat-icon-simple.png',\r\n backgroundImage: '',\r\n background1Color: '',\r\n background2Color: '',\r\n borderColor: '#FFFFFF',\r\n borderWidth: '0px',\r\n borderRadius: '0px',\r\n padding: '5px 5px 5px 5px'\r\n },\r\n messagePopup: {\r\n font: {\r\n italic: false,\r\n bold: false,\r\n underline: false,\r\n family: 'inherit',\r\n size: '18px',\r\n color: '#202024'\r\n },\r\n backgroundColor: '#feffe0',\r\n padding: '11.2px 11.2px 11.2px 11.2px',\r\n borderColor: '#e5e6c8',\r\n closeIcon: '/contents/themes/skinnable/invitation/close.png',\r\n closeIconSize: { width: '12px', height: '12px' },\r\n shadowDepth: '0px',\r\n borderRadius: '6px',\r\n borderWidth: '1px'\r\n },\r\n messageCounter: {\r\n font: {\r\n italic: false,\r\n bold: false,\r\n underline: false,\r\n family: 'inherit',\r\n size: '10px',\r\n color: '#FFFFFF'\r\n },\r\n backgroundColor: '#823710',\r\n counterTop: '7px',\r\n counterRight: '3px'\r\n }\r\n };\r\n const TemplateRenderer = function () {\r\n const self = this;\r\n self.hideMessagePopup = function () {\r\n // me.DOM.getElementById('apexchat_prechat_message_popup').style.display = 'none';\r\n removeMultipleCSSClasses(\r\n me.DOM.getElementById('apexchat_prechat_message_popup'),\r\n 'prechat_zoom_in_animation_left prechat_zoom_in_animation_right'\r\n );\r\n removeMultipleCSSClasses(\r\n me.DOM.getElementById('apexchat_prechat_typing_div'),\r\n 'prechat_zoom_in_animation_left prechat_zoom_in_animation_right'\r\n );\r\n const roundedMessagePopup = me\r\n .$(me.DOM.getElementById('apexchat_prechat_message_popup_container'))\r\n .find('.apexchat_prechat_message_bubble');\r\n if (roundedMessagePopup.length > 0) {\r\n hideElement(roundedMessagePopup[roundedMessagePopup.length - 1]);\r\n } else {\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_message_popup'),\r\n 'apexchat_prechat_show_message_fade_out'\r\n );\r\n }\r\n // resize iframe\r\n // me.postMessage({ event: 'prechat-size', data: { width: me.iconWidth, height: me.iconHeight } });\r\n };\r\n self.heightPosition = 20;\r\n self.widgetWidth = 295;\r\n self.renderOnLeftPosition = function () {\r\n me.$('#apexchat_video_greet_invitation_frame').addClass(\r\n 'apexchat_video_greet_iframe_left'\r\n );\r\n addClass(\r\n me.DOM.getElementById('apexchat_video_greet_invitation_max'),\r\n 'video_greet_invitation_left'\r\n );\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_message_popup'),\r\n 'apexchat_prechat_tri_left apexchat_prechat_left_bottom'\r\n );\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_main_container'),\r\n 'apexchat_prechat_bottom'\r\n );\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_main_bg'),\r\n 'apexchat_prechat_bottom'\r\n );\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_close_message_popup'),\r\n 'apexchat_prechat_x_right'\r\n );\r\n // Mobile responsive\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_message_popup'),\r\n 'apexchat_prechat_talk_bubbleMsg_left'\r\n );\r\n };\r\n self.renderOnRightPosition = function () {\r\n me.$('#apexchat_video_greet_invitation_frame').addClass(\r\n 'apexchat_video_greet_iframe_right'\r\n );\r\n me.$('#apexchat_video_greet_invitation_frame').css('float', 'right');\r\n addClass(\r\n me.DOM.getElementById('apexchat_video_greet_invitation_max'),\r\n 'video_greet_invitation_right'\r\n );\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_message_popup'),\r\n 'apexchat_prechat_tri_right apexchat_prechat_right_bottom'\r\n );\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_main_bg'),\r\n 'apexchat_prechat_right'\r\n );\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_main_container'),\r\n 'apexchat_prechat_bottom'\r\n );\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_main_bg'),\r\n 'apexchat_prechat_bottom'\r\n );\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_close_message_popup'),\r\n 'apexchat_prechat_x_left'\r\n );\r\n // Mobile responsive\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_message_popup'),\r\n 'apexchat_prechat_talk_bubbleMsg_right'\r\n );\r\n };\r\n self.showOnlineAgentTag = function () {\r\n const agentName = me.DOM.getElementsByClassName('online-agent-tag');\r\n agentName[0].innerHTML = me.options.preChat.preChatAgentStatusText;\r\n // agentName[0].style.display = 'block';\r\n // hide online tag and glow invitation aftr 45 seconds\r\n setTimeout(() => {\r\n // hide tag\r\n // me.DOM.getElementsByClassName('online-agent-tag')[0].style.display = 'none';\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_chat_icon'),\r\n 'glow_pre_chat_icon'\r\n );\r\n }, 45000);\r\n };\r\n self.popupUI = function (isPreChatRoundedTheme) {\r\n const _render = function (message) {\r\n if (!message.message && message.text) {\r\n message.message = message.text;\r\n }\r\n me.DOM.getElementById('apexchat_prechat_message').innerHTML = message.message;\r\n };\r\n const _clearContent = function () {\r\n me.DOM.getElementById('apexchat_prechat_message').innerHTML = '';\r\n };\r\n const _doNothing = function () {\r\n // do nothing..\r\n };\r\n const _questionTypeUIConfiguration = function (questionType) {\r\n me.setAllowBackgroundClick(questionType);\r\n me.$('.apexchat_question_type_close_button', me.DOM).attr(\r\n 'style',\r\n 'display:none !important'\r\n );\r\n me.$('#apexchat_click_instruction', me.DOM).attr(\r\n 'style',\r\n 'display: none !important'\r\n );\r\n me.$('#apexchat_participant_display_name', me.DOM).attr(\r\n 'style',\r\n 'display: none !important'\r\n );\r\n me.$('#apexchat_participant_display_col', me.DOM).attr(\r\n 'style',\r\n 'display: none !important'\r\n );\r\n };\r\n return {\r\n render: _render,\r\n clear: _clearContent,\r\n setMessageTemplate: _doNothing,\r\n questionTypeUIConfiguration: _questionTypeUIConfiguration\r\n };\r\n };\r\n };\r\n\r\n const RoundedTemplateRenderer = function (renderer, heightPosition) {\r\n const self = this;\r\n self.hideMessagePopup = function () {\r\n self.renderer.hideMessagePopup();\r\n };\r\n self.heightPosition = heightPosition;\r\n self.renderer = renderer;\r\n self.widgetWidth = 98;\r\n self.renderOnLeftPosition = function () {\r\n renderer.renderOnLeftPosition();\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_message_popup_container'),\r\n 'apexchat_prechat_rounded_theme_left'\r\n );\r\n addClass(me.DOM.getElementById('apexchat_prechat_typing_div'), 'talk_bubble_left');\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_main_container'),\r\n 'apexchat_prechat_left'\r\n );\r\n removeClass(\r\n me.DOM.getElementById('apexchat_prechat_typing_div'),\r\n 'talk_bubble_right'\r\n );\r\n };\r\n self.renderOnRightPosition = function () {\r\n renderer.renderOnRightPosition();\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_message_popup_container'),\r\n 'apexchat_prechat_rounded_theme_right'\r\n );\r\n addClass(me.DOM.getElementById('apexchat_prechat_typing_div'), 'talk_bubble_right');\r\n removeClass(\r\n me.DOM.getElementById('apexchat_prechat_typing_div'),\r\n 'talk_bubble_left'\r\n );\r\n };\r\n self.popupUI = function (isPreChatRoundedTheme) {\r\n const container = me.$('#apexchat_prechat_message', me.DOM);\r\n const setMessageTemplate = function () {\r\n if (!isPreChatRoundedTheme) {\r\n return;\r\n }\r\n if (!ApexChat.preChatMsgTemplate) {\r\n const message = document.createTextNode('##message##'); // Create a text node\r\n me.$('#apexchat_prechat_message', me.DOM).html(message);\r\n\r\n const participants = ApexChat.localStorageAPI.Get(\r\n 'livechat_chat_participants'\r\n );\r\n let participantInfo = JSON.parse(participants || '{}');\r\n participantInfo = participantInfo[participantInfo.length - 1];\r\n\r\n // me.generateVideoGreet()\r\n // if participants found then we need to update the image and agent name of the next pre-chat pop-up message\r\n if (\r\n participants &&\r\n participantInfo &&\r\n participantInfo.userId !== ParticipantIds.visitor\r\n ) {\r\n // Dont run for visitor case\r\n\r\n if (participantInfo.handlerImageUrl) {\r\n me.$(\r\n '.agent_image_prechat_rounded_theme .apexchat_prechat_chat_icon',\r\n me.DOM\r\n ).css(\r\n 'background-image',\r\n `url(${participantInfo.handlerImageUrl})`\r\n );\r\n }\r\n me.$('.agent_name_prechat_rounded_theme', me.DOM).html(\r\n participantInfo.displayName\r\n );\r\n } else {\r\n me.$('.agent_name_prechat_rounded_theme', me.DOM).html(\r\n me.options.agentName\r\n );\r\n }\r\n ApexChat.preChatMsgTemplate = me\r\n .$('
')\r\n .append(me.$('#apexchat_prechat_message_popup', me.DOM).clone())\r\n .html();\r\n me.$('#apexchat_prechat_message_popup_container', me.DOM).addClass(\r\n 'apexchat_prechat_default_animation'\r\n );\r\n ApexChat.sessionAPI.Store(\r\n 'livechat_prechat_msg_template',\r\n ApexChat.preChatMsgTemplate\r\n );\r\n me.messenger.setMessageTemplate(ApexChat.preChatMsgTemplate);\r\n }\r\n };\r\n const setTabIndex = function () {\r\n container.attr('tabindex', 0);\r\n };\r\n const removeTabIndex = function () {\r\n container.attr('tabindex', -1);\r\n };\r\n const push = function (message) {\r\n // once we showing the button then we have to hide again to do not\r\n // show for Questiontypes\r\n me.$('#apexchat_greet_video_start_trigger', me.DOM).hide();\r\n if (!isPreChatRoundedTheme) {\r\n return;\r\n }\r\n if (!message.message && message.text) {\r\n message.message = message.text;\r\n }\r\n message.message = decodeHTML(\r\n cleanInvalidHtml(removeTextFollowedByColon(message.message))\r\n );\r\n // on this switch we will take decision.\r\n switch (me.options.preChatMessageAnimation) {\r\n case PreChatMessageAnimation.Default:\r\n renderDefault(message);\r\n break;\r\n case PreChatMessageAnimation.Stacking:\r\n case PreChatMessageAnimation.MobileStacking:\r\n renderStacking(message);\r\n break;\r\n default:\r\n break;\r\n }\r\n // check chatMsg variable is exists and ApexChat.preChatElement is not undefined livechat_participant_display_text\r\n if (message.questionType == ScriptsQuestionType.None) {\r\n setTabIndex();\r\n } else {\r\n removeTabIndex();\r\n }\r\n };\r\n\r\n let renderDefault = function (message) {\r\n if (!message.dontAppendExisitngContent) {\r\n me.$('#apexchat_prechat_message', me.DOM).html(message.message);\r\n me.$('#apexchat_greet_video_start_trigger', me.DOM).show();\r\n } else {\r\n me.$('#apexchat_prechat_message', me.DOM).html('');\r\n }\r\n // we are showing with opacity 0; because we cant calculate dynamic height differences If element is Hidden,\r\n // Initially, we were adding CSS Class for making Opacity 0 & 1 but adding and removing class was making a jerk we needed the animation effect between 0 to 1, in decimal manner like 0.1, 0.2, 0.3... to 0.9, 1\r\n me.$('#apexchat_prechat_message_popup', me.DOM).show().css({ opacity: 0 });\r\n // we need this timeout as DOM takes time to render, without timeout.\r\n // ApexChat.getStyle giving wrong values without timeout.\r\n const ele = me.$('#apexchat_prechat_message_popup', me.DOM);\r\n\r\n // padding and shadow\r\n const padding = 15; // increased 15px// CHAT-5979 [V3] Pre - chat with default animation is cutting of shadow on top.\r\n // Initially, we were adding CSS Class for making Opacity 0 & 1 but adding and removing class was making a jerk we needed the animation effect between 0 to 1, in decimal manner like 0.1, 0.2, 0.3... to 0.9, 1\r\n ele.css({ opacity: 0 });\r\n ele.hide().show().animate({ opacity: 1, top: padding }, 300);\r\n };\r\n const renderStacking = function (message) {\r\n me.messenger.push(message);\r\n };\r\n const doNothing = function () { };\r\n const questionTypeUIConfiguration = function (questionType) {\r\n me.setAllowBackgroundClick(questionType);\r\n me.$('.apexchat_question_type_close_button', me.DOM).attr(\r\n 'style',\r\n 'display:none !important'\r\n );\r\n me.$(\r\n '.apexchat_participant_display_text#apexchat_participant_display_name',\r\n me.DOM\r\n ).attr('style', 'display: none !important');\r\n me.$(\r\n '.apexchat_participant_display_text#apexchat_participant_display_col',\r\n me.DOM\r\n ).attr('style', 'display: none !important');\r\n };\r\n return {\r\n setMessageTemplate,\r\n render: push,\r\n clear: doNothing,\r\n questionTypeUIConfiguration\r\n };\r\n };\r\n };\r\n\r\n let renderer = new TemplateRenderer();\r\n me.options.isPreChatRoundedTheme = true;\r\n renderer = new RoundedTemplateRenderer(renderer, 130);\r\n me.templateRenderer = renderer;\r\n\r\n if (options.chatMode == ChatMode.Windowed) {\r\n this.mode = WidgetTypes.Windowed;\r\n } else if (options.chatMode == ChatMode.DOM) {\r\n this.mode = WidgetTypes.DOM;\r\n }\r\n this.lastMessageStoreName = 'livechat_prechat_lastmessage';\r\n this.messageCounterStoreName = 'livechat_prechat_messagecounter';\r\n\r\n if (me.isPageRefreshed() || !me.options.videoGreet) {\r\n me.ready();\r\n } else {\r\n setTimeout(() => {\r\n me.ready();\r\n }, 50);\r\n }\r\n this.messageArray = [];\r\n }\r\n\r\n ready() {\r\n const me = this;\r\n super.ready();\r\n me.create();\r\n /* messenger is taking instance of VideoGreetMessageHandler with few important arguments\r\n * */\r\n if (me.options.videoGreet) {\r\n me.messenger = new VideoGreetMessageHandler( // encapsulated message handler for VideoGreet\r\n Object.assign(me.options, {\r\n context: me.DOM,\r\n videoGreetTemplate: me.options.videoGreet.videoGreetInvitationWidgetTemplate,\r\n videoGreetModel: me.options.videoGreet\r\n })\r\n );\r\n }\r\n }\r\n\r\n create() {\r\n super.create();\r\n const me = this;\r\n\r\n me.view = new WidgetView({\r\n dom: this.DOM,\r\n identifier: WidgetTypes.VideoGreetInvitation,\r\n templates: [\r\n {\r\n key: WidgetStates.ShownMaximized,\r\n tpl: videoGreetInvitationTemplate(me.options.videoGreet), // // me.options.videoGreet.videoGreetInvitationWidgetTemplate,\r\n model: me.options.videoGreet,\r\n async afterRender(tpl) {\r\n me.messagesContainer = me.DOM.getElementById('apexchat_prechat_message');\r\n const handleQuestionTypeResponse = async function (res) {\r\n await me.handleQuestionType(res.res || res);\r\n };\r\n me.postMessage({ event: 'videogreet-init', data: {} });\r\n // message rendering\r\n if (!me.QTRendererExt && me.options.videoGreet) {\r\n me.QTRendererExt = new QuestionTypeRendererExtentions();\r\n await me.QTRendererExt.initComponent(\r\n Object.assign(me.options.videoGreet, {\r\n isUpdateSupported: false,\r\n context: me.DOM,\r\n messagesContainer: me.DOM.getElementById(\r\n 'apexchat_prechat_message'\r\n ),\r\n responseCallback: handleQuestionTypeResponse,\r\n enableFullTextLogic: true,\r\n widgetType: WidgetTypes.VideoGreetInvitation,\r\n countryCode: me.options.countryCode\r\n })\r\n );\r\n }\r\n const isVideoGreetMaximized =\r\n me.state.getStateValue(WidgetTypes.VideoGreetInvitation) ===\r\n WidgetStates.ShownMaximized;\r\n // JIRA_7493 & 7477 ChatId Null issue\r\n me.options.chatId = me.options.chatId || me.getChatId();\r\n if (\r\n me.isChatActive() &&\r\n me.isPageRefreshed() &&\r\n isVideoGreetMaximized &&\r\n me.options.chatId\r\n ) {\r\n RunAsSoonAs(\r\n () => {\r\n // Creating ChatRoom object for sending the Video Greet Agent Script's replies to dashboard via websync.\r\n me.videoGreetRoom = new ApexChat.ChatRoomV3(\r\n Object.assign(me.options, me.options.model)\r\n );\r\n\r\n // We don't need to subscribe this channel if exit-popup is in maximize state and user refresh the page,\r\n // if we do that the last message of the user will show as a duplicate message on exit-popup\r\n me.videoGreetRoom.subscribeToChatChannel(me.options.chatId);\r\n },\r\n () => ApexChat.ChatRoomV3 != undefined\r\n );\r\n }\r\n // pasre/apply pre chat theme setting\r\n if (me.options.videoGreet) {\r\n const prechatSkin = JSON.parse(me.options.preChat?.preChatThemeSetting ?? \"{}\");\r\n\r\n me.skin = me.DEFAULT_PRECHAT_CONFIG;\r\n if (prechatSkin.messagePopup) {\r\n me.skin.messagePopup = prechatSkin.messagePopup;\r\n }\r\n // if the user name has a space then we need to enclose the image URL in single quote.\r\n me.skin.handlerImageUrl = `'${AgentImageHandler(me.options.handlerImageUrl)}'`;\r\n const rdThemeSettings =\r\n me.options && me.options.rdThemeSettings\r\n ? ApexChat.TryParse(me.options.rdThemeSettings)\r\n : null;\r\n let skinJson = {\r\n container: '',\r\n preChat: me.skin\r\n };\r\n\r\n skinJson.rdThemeSettings = rdThemeSettings;\r\n /* Branding - PreChat */\r\n const brandingInfo = skinJson.rdThemeSettings.branding || {};\r\n if (brandingInfo.brandingIsEnabled && brandingInfo.brandColorCode) {\r\n skinJson.global = { branding: brandingInfo };\r\n skinJson = new Branding()\r\n .init({\r\n widget: BrandingWidget.RD_PreChat,\r\n brandConfig: skinJson\r\n })\r\n .getBrandedConfig();\r\n }\r\n // add css\r\n // const bindingDynamicStyles = parseTemplate(\r\n // me.options.videoGreet.videoGreetCSS,\r\n // skinJson\r\n // );\r\n // const bindingDynamicPrechatStyles = parseTemplate(\r\n // me.options.videoGreet.preChatCSS,\r\n // skinJson\r\n // );\r\n setPrechatStyles(me.DOM, skinJson);\r\n // addStyleTextInIframe(\r\n // bindingDynamicStyles,\r\n // 'apexchat_video_greet_css',\r\n // undefined,\r\n // me.DOM\r\n // );\r\n // addStyleTextInIframe(\r\n // bindingDynamicPrechatStyles,\r\n // 'apexchat_pre_chat_css',\r\n // undefined,\r\n // me.DOM\r\n // );\r\n\r\n // set UI configuration\r\n // Utils.fontsLoaded({\r\n // fontName: 'Avenir',\r\n // context: me.DOM,\r\n // window: me.iFrameWindow,\r\n // onSuccess() {\r\n // me.UIConfiguration();\r\n // }\r\n // });\r\n setTimeout(() => {\r\n me.UIConfiguration();\r\n }, 0);\r\n hideElement(me.DOM.getElementById('apexchat_prechat_message_popup')); // Hide the initial popup\r\n\r\n // CHAT_8288 - Remove white background for all image extension and added for .png only\r\n if (me.DOM && me.DOM.getElementById('apexchat_prechat_chat_icon')) {\r\n const backgroundImage = getStyle(\r\n me.DOM.getElementById('apexchat_prechat_chat_icon'),\r\n 'background-image'\r\n );\r\n if (backgroundImage && backgroundImage.indexOf('.png') === -1) {\r\n me.$('#apexchat_prechat_main_bg', me.DOM).addClass(\r\n 'apexchat_css_background_transparent'\r\n );\r\n }\r\n }\r\n }\r\n }\r\n }\r\n ],\r\n initialState: WidgetStates.ShownMaximized\r\n });\r\n }\r\n\r\n initElements() {\r\n const me = this;\r\n me.options.prechatMessagesContainer = '.apexchat_prechat_videogreet_container';\r\n me.options.videoGreetCloseTrigger = '.apexchat_greet_video_close';\r\n me.options.isVideoGreetMaximized = 'apexchat_video_greet_maximized';\r\n me.options.videoGreetInvitationContainer = '#apexchat_invitation_container_wrapper';\r\n me.options.videoGreetInvitationOverlayTrigger = '#apexchat_greet_video_trigger_overlay';\r\n me.options.videoGreetSeekbar = '#apexchat_greet_video_seekbar';\r\n me.options.videoGreetPlayTrigger = '#apexchat_greet_video_play';\r\n me.options.videoGreetPlayPauseIcon = '#play_pause_icon';\r\n me.options.togglePlayerClassess =\r\n 'greet_video_invitation_container_minimized greet_video_invitation_container_maximized';\r\n me.options.vimeoAPIURL = 'https://embed.cloudflarestream.com/embed/sdk.latest.js';\r\n me.options.playerElementId = 'greet_video_player';\r\n me.options.vimeoScriptID = 'vimeo_js';\r\n me.options.videoGreetLoader = '#video_greet_loader';\r\n me.options.videoGreetControls = '#apexchat_greet_video_controls';\r\n ApexChat.WidgetMinimizedWidth = 234;\r\n ApexChat.WidgetMinimizedHeight = 451;\r\n ApexChat.WidgetMaximizedWidth = me.options.videoGreet.persistVideoRatioForWidget\r\n ? 366\r\n : 380;\r\n ApexChat.WidgetMaximizedHeight = me.options.videoGreet.persistVideoRatioForWidget\r\n ? 650\r\n : 508;\r\n\r\n me.options.videoPlayerConfig = {\r\n id: me.options.videoGreet.videoGreetURL,\r\n width: 300,\r\n loop: true,\r\n controls: false,\r\n byline: false,\r\n title: false,\r\n muted: true,\r\n autoplay: true,\r\n background: true\r\n };\r\n me.options.videoGreetMuteTrigger = '#apexchat_greet_video_mute';\r\n me.options.videoGreetTooltip = '.video_greet_text';\r\n me.options.videoGreetTooltipText = '.video_greet_text_thought';\r\n }\r\n\r\n postVideoGreetMessages(res) {\r\n const me = this;\r\n // We need to prevent multiple posting of same ChatLogID, created an array and saving the chatlogId\r\n me.postedVideoGreetMessagesArray = me.postedVideoGreetMessagesArray || [];\r\n // if the chatlogId is already being posted, preventing it to repost which was making text appear twice in dashboard\r\n if (\r\n res.chatLogId &&\r\n me.postedVideoGreetMessagesArray.indexOf(res.chatLogId) !== -1 &&\r\n !(res.questionType != ScriptsQuestionType.Text)\r\n ) {\r\n return false;\r\n }\r\n // saving chatlogId is array\r\n // check checklogid exists or not\r\n if (res.chatLogId && me.postedVideoGreetMessagesArray.indexOf(res.chatLogId) !== -1) {\r\n me.postedVideoGreetMessagesArray.push(res.chatLogId);\r\n }\r\n me.postMessage({\r\n event: WidgetTypes.VideoGreetInvitation + WidgetStates.MessageSent,\r\n data: res\r\n });\r\n const domRendered = ApexChat.PubSub.allSubscriptions()[WidgetTypes.DOMUIController]; // DOM has not opened?\r\n // We only need to send the VideoGreet Agent Script's replies to dashboard via 'videoGreetRoom' object until DOM appeared.\r\n me.startChatFromVideoGreet(); /* <--CHAT-6961 - Open Chat window, no need to continue mapping on VideoGreet */\r\n if (!domRendered) {\r\n me.videoGreetRoom.setWebSyncClient();\r\n me.videoGreetRoom.publishQuestionTypeResponse(res);\r\n // Set the visitor selection of question type\r\n res.visitorSelectedOptions = res.answers;\r\n res.questionType = me.QTRendererExt.questionTypeRenderer.renderer.model.questionType;\r\n res.questionTypeDisplayListForVisitor =\r\n me.QTRendererExt.questionTypeRenderer.renderer.model.questionTypeDisplayListForVisitor;\r\n res.id = res.chatLogId;\r\n\r\n res.visitorScriptAnswer = res.answers;\r\n res.visitorResponseStatus = res.isSkipped\r\n ? ScriptVisitorResponseStatus.Skipped\r\n : ScriptVisitorResponseStatus.Answered;\r\n me.QTRendererExt.questionTypeRenderer.setVisitorSelection(res);\r\n me.videoGreetRoom.sendMessage({\r\n chatMsg: res.msgText,\r\n questionTypeChatLogIdToBeUpdated: res.questionTypeChatLogIdToBeUpdated\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Handling all question type message like, true, false, MC, ATA etc (Click and selection) events\r\n * This also handling a mapped question for example user select a yes button in true false question type and the\r\n * yes button is mapped with other question, it will call the api to get the next mapped question.\r\n * @param {res} message response\r\n */\r\n async handleQuestionType(res) {\r\n const me = this;\r\n const url = `${GlobalVariables.ApexChatBaseUrl}api/prechat/messages`;\r\n const message = me.getLastMessageCache();\r\n // commenting below code because we dont need to decrease counter immediately when question answered we first need to check\r\n // if map question associated with questiontype then mapped question must be answered before decreasing counter.\r\n if (!me.isLastMessageMappedWithNextQuestion && me.isChatActive()) {\r\n // The counter will not decrease when it was already decreased by it's parent question type\r\n // Decrease the message counter when user response on any question type\r\n // for example click on Yes or No button then we decrease the counter\r\n }\r\n // This variable (isLastMessageMappedWithNextQuestion) is become true when the next question exist for this response\r\n // At user response time we do not know that either this question is mapped or not we only\r\n me.templateRenderer.hideMessagePopup();\r\n me.isLastMessageMappedWithNextQuestion = false;\r\n window.clearTimeout(me.messageTimeout);\r\n if (!me.isVideoGreetMessage) {\r\n me.postVideoGreetMessages(res);\r\n return;\r\n }\r\n const log = {};\r\n log.visitorId = me.options.visitorId;\r\n log.companyId = me.options.companyId;\r\n log.language = me.options.language;\r\n log.id = me.videoGreetMessageId;\r\n log.scriptAnswerId = me.agentScriptAnswerId;\r\n log.sourceType = SourceType.VideoGreet;\r\n // In case of FULL TEXT PreChat, We dont send the response to server, It renders multiple times, We save it and send it via websync object.\r\n if (res.questionType === ScriptsQuestionType.FullText) {\r\n log.visitorResponseStatus = ScriptVisitorResponseStatus.Skipped;\r\n ApexChat.FullTextVisitorResponse = res.answers;\r\n } else {\r\n log.visitorScriptAnswer = res.answers;\r\n log.visitorResponseStatus = res.isSkipped\r\n ? ScriptVisitorResponseStatus.Skipped\r\n : ScriptVisitorResponseStatus.Answered;\r\n }\r\n\r\n // checking if visitor respond any script question than do not display EP\r\n if (!res.isSkipped) {\r\n ApexChat.storageAPI.StoreTemp('livechat_prechat_started', true);\r\n window.clearTimeout(me.prechatStartedTimeout);\r\n }\r\n\r\n let isLastPreChatMessage = true;\r\n ApexChat.shouldContinueMapping = true;\r\n const encodedLog = encodeHTML(JSON.stringify(log));\r\n\r\n /* #ScriptBot-CHAT-6961:TODO - START - commenting the below code for ScriptBot Flow, When the feature will be final, will remove all commented TODOs */\r\n if (!ApexChat.ContactInfo) {\r\n const response = await fetch(url, {\r\n headers: {\r\n Accept: 'application/json',\r\n 'Content-Type': 'application/json; charset=utf-8'\r\n },\r\n method: 'POST',\r\n body: encodedLog\r\n });\r\n const result = await response.json();\r\n if (!response.ok) {\r\n // throw new Error(\"Network response was not ok\");\r\n logIt('Error: Network response was not ok');\r\n }\r\n }\r\n /* #ScriptBot-CHAT-6961:TODO - END - */\r\n if (!ApexChat.ContactInfo) {\r\n const timerToStartChat = setInterval(() => {\r\n if (isLastPreChatMessage && !res.isSkipped) {\r\n // JIRA_4308 - closing prechat triggers the chat (Fixed by adding this isSkipped Flag)\r\n isLastPreChatMessage = false;\r\n // point 1 in case of qt\r\n me.startChatFromVideoGreet();\r\n } else {\r\n clearInterval(timerToStartChat);\r\n }\r\n }, 500);\r\n }\r\n // In case of TEXT PreChat, We save it and send it via websync object.\r\n if (res.questionType === ScriptsQuestionType.Text && res.contactInfo) {\r\n ApexChat.ContactInfo = res.contactInfo;\r\n }\r\n }\r\n\r\n startChatFromVideoGreet(e, config) {\r\n const me = this;\r\n me.$('#apexchat_invitation_container_wrapper', me.DOM).addClass(\r\n 'greet_video_invitation_container_start_chat'\r\n );\r\n setTimeout(() => {\r\n // is there a srcElement passed and it has a data attribute named shouldStartChat with value = false? return.\r\n if (\r\n (config && !config.srcElement) ||\r\n (config && config.srcElement && !me.$(config.srcElement).data('shouldStartChat'))\r\n ) {\r\n return false;\r\n }\r\n // me.resetVideoGreetVideo();\r\n // me.postMessage({ event: WidgetTypes.VideoGreetInvitation + WidgetStates.Clicked, data: {} });\r\n // me.initiatedBy = 'PreChat';\r\n me.state.changeState({\r\n toState: WidgetStates.Clicked,\r\n value: { initiatedBy: 'PreChat' }\r\n });\r\n me.updateClassBasedOnVisibility();\r\n if (me.isWindowedStarted() || me.options.chatMode == ChatMode.Windowed) {\r\n me.options.chatInitiatedBy = 'PreChat';\r\n me.startWindowedChat(\r\n Object.assign(me.options, {\r\n shouldContinueMapping: ApexChat.shouldContinueMapping,\r\n FullTextVisitorResponse: ApexChat.FullTextVisitorResponse\r\n })\r\n ); // pass parameter as a querystring\r\n }\r\n }, 100);\r\n }\r\n\r\n UIConfiguration() {\r\n const me = this;\r\n const position = me.options.videoGreet.videoGreetPosition;\r\n // get width/height of prechat object without popup message\r\n const el = me.DOM.getElementById('apexchat_prechat_chat_icon');\r\n if (el) {\r\n me.iconWidth = el.offsetWidth + 30;\r\n me.iconHeight = el.offsetHeight + (me.skin.outerObject.hideOuterObject ? 0 : 20);\r\n ApexChat.PreChatIconDimensions = {\r\n Width: me.iconWidth,\r\n Height: me.iconHeight\r\n };\r\n }\r\n\r\n me.templateRenderer.hideMessagePopup();\r\n // apply css class to prechat object base on position\r\n me.applyCssClass(position);\r\n\r\n const isMaximized = me.isVideoGreetStateMaximized();\r\n // notify iframe for resize\r\n me.postMessage({\r\n event: 'videogreet-size',\r\n data: {\r\n isPreChatRoundedTheme: me.options.isPreChatRoundedTheme,\r\n width: isMaximized ? ApexChat.WidgetMaximizedWidth : me.iconWidth,\r\n height: isMaximized ? ApexChat.WidgetMaximizedHeight : me.iconHeight\r\n }\r\n });\r\n\r\n if (!me.isChatInProgress()) {\r\n // ref. CHAT-4589: we should stop pre-chat message popups on susequent page reloads\r\n // me.queueAutoMessaging();\r\n }\r\n\r\n // bind close button\r\n if (me.options.isMobile) {\r\n me.$('#apexchat_prechat_close_message_popup', me.DOM).show();\r\n }\r\n me.$(this.options.videoGreetTooltip, me.DOM)\r\n .children(this.options.videoGreetTooltipText)\r\n .on('click', () => {\r\n me.$(me.options.videoGreetInvitationOverlayTrigger, me.DOM).trigger('click');\r\n });\r\n me.$(me.DOM).on('click', '.apexchat_mc_ata_list', (e) => {\r\n me.startChatFromVideoGreet(); // click on option DOM window open\r\n });\r\n me.$(me.DOM).on('click', '.apexchat_mc_ata_list', (e) => {\r\n me.startChatFromVideoGreet(); // click on option DOM window open\r\n });\r\n me.$(me.DOM).on('click', '.live_chat_scheduler_bg', (e) => {\r\n me.startChatFromVideoGreet(); // click on option DOM window open\r\n });\r\n me.eventSubscription();\r\n // get icon object for start chat event binding default use inner object but if inner object is hide then use outer object\r\n let startChatDiv = 'apexchat_prechat_chat_icon';\r\n if (me.skin.innerObject.hideInnerObject) {\r\n startChatDiv = 'apexchat_prechat_main_bg';\r\n }\r\n this.options.containerId = startChatDiv;\r\n\r\n me.setClickCallToAction(startChatDiv, 'PreChat', {\r\n shouldContinueMapping: ApexChat.shouldContinueMapping,\r\n FullTextVisitorResponse: ApexChat.FullTextVisitorResponse\r\n }); // pass parameter to send via query string\r\n const domState = me.state.getStateValue(WidgetTypes.DOM);\r\n const isChatInActiveAndDomMinimized =\r\n (domState == WidgetStates.ShownMinimized || domState == WidgetStates.Closed) &&\r\n !me.isChatActive();\r\n if (isChatInActiveAndDomMinimized) {\r\n // when dom is minimized/closed and chat is inactive we need to show prechat widget\r\n me.show();\r\n me.initVideoGreet();\r\n } else if (me.getCurrentState() === WidgetStates.Hidden && me.isChatActive()) {\r\n me.hide();\r\n } else {\r\n // Stop to show the prechat initial messages and hide the widget when chat started already.\r\n if (\r\n domState == WidgetStates.ShownMaximized ||\r\n me.getCurrentState() == WidgetStates.Hidden\r\n ) {\r\n me.options.videoGreet.videoGreetMessages = [];\r\n me.hide();\r\n } else {\r\n me.initVideoGreet();\r\n }\r\n }\r\n }\r\n\r\n initVideoGreet() {\r\n const me = this;\r\n if (!ApexChat.Vimeo && me.options.videoGreet.videoGreetURL) {\r\n getStyleForIframe(\r\n `https://vjs.zencdn.net/8.16.1/video-js.css`,\r\n 'apexchat_Iframe_videogreet',\r\n me.options.iframeId || me.options.model.iframeId || 'apexchat_browser_chatwindow_max'\r\n );\r\n const videoTemplate = `\r\n \r\n `;\r\n me.DOM.getElementById('greet_video_player').innerHTML = videoTemplate;\r\n const options = {\r\n controls: false,\r\n autoplay: true,\r\n preload: 'auto',\r\n fill: true,\r\n muted: true,\r\n playsinline: true\r\n };\r\n const player = me.DOM.getElementById('video-greet-pl');\r\n videojs(player, options).ready(function () {\r\n me.DOM.getElementById('apexchat_greet_video_controls').style.display = 'block';\r\n me.DOM.getElementById('apexchat_prechat_message_popup').style.display = 'block';\r\n const myPlayer = this;\r\n myPlayer.play();\r\n me.videoPlayer = this;\r\n me.generateVideoGreet();\r\n });\r\n }\r\n }\r\n\r\n eventSubscription() {\r\n const me = this;\r\n const hideIt = function (isMobile) {\r\n me.isChatStartedFromPreChat = true; // CHAT-7681 Iphone prechat double greeting Issue\r\n if (me.options.chatMode === ChatMode.DOM || isMobile) {\r\n me.hide();\r\n } else {\r\n window.clearTimeout(me.messageTimeout);\r\n }\r\n };\r\n const chatStartedFromExitPopup = function () {\r\n me.hide();\r\n if (me.videoPlayer) {\r\n // check vimeo player exists then pause the video\r\n me.videoPlayer.pause();\r\n }\r\n };\r\n const chatStartedFromPrechat = function () {\r\n me.isChatStartedFromPreChat = true; // CHAT-7681 Iphone prechat double greeting Issue\r\n if (me.videoPlayer) {\r\n // check vimeo player exists then pause the video\r\n me.videoPlayer.pause();\r\n }\r\n // CHAT-6794 // need to remove the last stored mapped question because another parent question has appeared.\r\n ApexChat.storageAPI.Remove(TempCache.APEXCHAT_PRECHAT_MAPPED_QUESTION_COOKIE);\r\n // Show Windowed Widget instead DOM, when Windowed chat already started\r\n if (me.options.chatMode === ChatMode.DOM) {\r\n hideIt();\r\n }\r\n };\r\n const cleanUp = function () {\r\n // JIRA_6472 - Greeting was not appearing on reinitializing\r\n // summary: Removing the PreChat Message Sent helped the greeting to appear it again.\r\n ApexChat.storageAPI.Remove(TempCache.PreChat_Message_Sent);\r\n };\r\n const showIt = function () {\r\n const domState = me.state.getStateValue(WidgetTypes.DOM);\r\n if (domState == WidgetStates.ShownMaximized) {\r\n return;\r\n }\r\n me.show();\r\n };\r\n // subscribe for chat Message and typing indicator when chat mode has set to dom\r\n if (me.options.chatMode == ChatMode.DOM) {\r\n me.subscribe(WidgetTypes.DOM + WidgetStates.Closed, hideIt);\r\n me.subscribe(WidgetTypes.DOM + WidgetStates.ShownMinimized, hideIt);\r\n }\r\n // subscribe for start chat event from any invitation\r\n me.subscribe(WidgetTypes.ExitPopup + WidgetStates.ShownMaximized, chatStartedFromExitPopup);\r\n me.subscribe(WidgetTypes.ExitPopup + WidgetStates.Closed, () => {\r\n me.postMessage({\r\n event: 'videogreet-gif-file-loaded',\r\n data: {\r\n imageUrl: me.options.videoGreet.animatedImageUrl\r\n }\r\n });\r\n });\r\n me.subscribe(WidgetTypes.VideoGreetInvitation + WidgetStates.Closed, () => {\r\n hideIt(me.options.isMobile || false);\r\n });\r\n me.subscribe(WidgetTypes.DropDown + WidgetStates.Clicked, hideIt);\r\n me.subscribe(WidgetTypes.Bar + WidgetStates.Clicked, hideIt);\r\n me.subscribe(WidgetTypes.Tab + WidgetStates.Clicked, hideIt);\r\n me.subscribe(\r\n WidgetTypes.VideoGreetInvitation + WidgetStates.Clicked,\r\n chatStartedFromPrechat\r\n );\r\n // When Chat Session Ends, On very next message from Visitor, an overlay mask for starting new chat appears,\r\n // & visitor starts the chat at this point we need to delete few cookies for PreChat.\r\n me.subscribe(WidgetTypes.ChatRoom + ChatEvents.OnSendMessageFailure, cleanUp);\r\n }\r\n\r\n applyCssClass(position) {\r\n // apply css classes base on pre chat position\r\n const me = this;\r\n // remove default classes\r\n removeClass(\r\n me.DOM.getElementById('apexchat_prechat_main_container'),\r\n 'apexchat_prechat_theme_margin'\r\n );\r\n removeClass(\r\n me.DOM.getElementById('apexchat_prechat_message_popup'),\r\n 'apexchat_prechat_tri_left'\r\n );\r\n removeClass(\r\n me.DOM.getElementById('apexchat_prechat_message_popup'),\r\n 'apexchat_prechat_left_top'\r\n );\r\n removeClass(\r\n me.DOM.getElementById('apexchat_prechat_close_message_popup'),\r\n 'apexchat_prechat_x_right'\r\n );\r\n removeClass(\r\n me.DOM.getElementById('apexchat_prechat_message_popup'),\r\n 'apexchat_prechat_tri_left_theme'\r\n );\r\n addClass(\r\n me.DOM.getElementById('apexchat_prechat_close_message_popup'),\r\n 'apexchat_prechat_x'\r\n );\r\n\r\n me.DOM.getElementById('apexchat_prechat_main_container').style.position = 'relative';\r\n me.DOM.getElementById('apexchat_rd_invitation_bg').style.position = 'fixed';\r\n switch (position) {\r\n case Position.Left:\r\n me.templateRenderer.renderOnLeftPosition();\r\n break;\r\n case Position.Right:\r\n me.templateRenderer.renderOnRightPosition();\r\n break;\r\n default:\r\n }\r\n }\r\n\r\n async autoMessageRendering(options) {\r\n const me = this;\r\n const { message } = options;\r\n const { chatMsg } = options;\r\n // as we are making Mock JSON for Pipe messaging, In case of Default Animation, we need to prevent the appending of content\r\n if (me.options.preChatMessageAnimation === PreChatMessageAnimation.Default) {\r\n if (message && message.messageType !== PreChatMessageType.plain_Text) {\r\n message.dontAppendExisitngContent = true;\r\n }\r\n if (chatMsg && chatMsg.messageType !== PreChatMessageType.plain_Text) {\r\n chatMsg.dontAppendExisitngContent = true;\r\n }\r\n }\r\n const { index } = options;\r\n // check message type is script message or plain message\r\n if (\r\n (index == -1 && chatMsg) ||\r\n (message &&\r\n message.messageType == PreChatMessageType.agent_Script &&\r\n message.agentScript)\r\n ) {\r\n const questionType = chatMsg ? chatMsg.questionType : message.questionType;\r\n me.messagePopupUI.render(chatMsg || message);\r\n me.messagePopupUI.clear();\r\n await me.renderScriptMessage(chatMsg || message.agentScript);\r\n me.messagePopupUI.questionTypeUIConfiguration(questionType);\r\n } else {\r\n // create model for message logging\r\n const messageLog = {};\r\n messageLog.visitorId = me.options.visitorId;\r\n messageLog.text = message.message;\r\n messageLog.sourceType = SourceType.VideoGreet;\r\n me.logMessageOnServer(messageLog);\r\n // render plain text message\r\n me.messagePopupUI.render(message);\r\n }\r\n // check message is prechat or chat flow\r\n if (\r\n !options.isPipedMessage &&\r\n message &&\r\n message.questionType == ScriptsQuestionType.None\r\n ) {\r\n me.queueNextMessage(index + 1, message.duration * 1000);\r\n }\r\n if (options.cb) {\r\n options.cb();\r\n }\r\n }\r\n\r\n async displayMessage(index, isVideoGreetMessage, chatMsg) {\r\n const me = this;\r\n if (me.isWindowedStarted()) {\r\n return; // no pop message if Windowed has started\r\n }\r\n // if chat started from prechat and chatmsg is undefined and isVideoGreetMessage true appears thats means its a prechat messages appearing so we dont need it to show because chat has already been started\r\n // Also, on windowed mode if chat started then we dont need to show popup while windowed mode is on.\r\n if (!chatMsg && me.isChatStartedFromPreChat && isVideoGreetMessage) {\r\n return;\r\n }\r\n const preChatMsg = me.options.videoGreet.videoGreetMessages[index];\r\n // CHAT-7226 Next Mapped Question Logic Change\r\n // as option property removed from backend now we explicity add option property to our msg.options object,\r\n // because all QT UI depend upon that property.\r\n if (\r\n preChatMsg &&\r\n preChatMsg.questionType != ScriptsQuestionType.None &&\r\n preChatMsg.agentScript &&\r\n preChatMsg.agentScript.options\r\n ) {\r\n preChatMsg.agentScript.options = addOptionProperty(preChatMsg.agentScript.options);\r\n }\r\n me.messagePopupUI = me.templateRenderer.popupUI(me.options.isPreChatRoundedTheme);\r\n me.messagePopupUI.setMessageTemplate();\r\n me.isVideoGreetMessage = isVideoGreetMessage;\r\n me.agentScriptAnswerId = 0;\r\n me.allowBackgroundClick = true;\r\n /// Wait for the flag/setting called “re-show after” which wipes the cookies after X amount of minutes and will treat them as a new visitor\r\n me.prechatStartedTimeout = window.setTimeout(() => {\r\n ApexChat.storageAPI.StoreTemp('livechat_prechat_started', false);\r\n }, me.options.reShowIntervalMinutes * 60 * 1000);\r\n // checking message type is prechat message or chat message\r\n if (isVideoGreetMessage && !me.isChatStartedFromPreChat) {\r\n // get prechat message\r\n const message = me.options.videoGreet.videoGreetMessages[index];\r\n if (message) {\r\n message.message = parseTemplate(\r\n removeTextFollowedByColon(message.message),\r\n me.options\r\n );\r\n }\r\n message.text = message.text || message.message;\r\n const msgObject = {\r\n m: message.agentScript || message\r\n };\r\n if (me.pipeMessageHandler.isValidPipedMessage(msgObject)) {\r\n msgObject.isSplitMessage = true; // if message is piped define isSplitMessage to true\r\n // CHAT-7351- Split Message send as a one message on server.\r\n // in below logic we just send a pipe message as one message to server\r\n const messageLog = {};\r\n // create model for message logging\r\n messageLog.visitorId = me.options.visitorId;\r\n messageLog.text = removeTextFollowedByColon(msgObject.m.text);\r\n messageLog.scriptAnswerId = msgObject.m.id;\r\n messageLog.questionType = msgObject.m.questionType;\r\n messageLog.visitorResponseType = msgObject.m.visitorResponseType;\r\n messageLog.options = msgObject.m.options;\r\n messageLog.visitorResponseStatus = ScriptVisitorResponseStatus.UnAnswered;\r\n messageLog.questionTypeDisplayListForVisitor = msgObject.m.displayListForVisitor;\r\n messageLog.sourceType = SourceType.VideoGreet;\r\n me.logMessageOnServer(messageLog); // logging message to server\r\n me.pipeMessageHandler.startPolling({\r\n messageDisplayDuration:\r\n message.duration > 100 ? message.duration : message.duration * 1000, // detecting either Its Seconds or Milliseconds\r\n init() { },\r\n async startPollingCallback(m) {\r\n m.message = m.text;\r\n await me.autoMessageRendering({\r\n chatMsg: m,\r\n index: -1,\r\n isPipedMessage: true\r\n });\r\n // In Piped messages the message can be QT we need QT to not to start chat IF user clicks on their DIV HTML Element\r\n const shouldStartChat = m.questionType == ScriptsQuestionType.None;\r\n me.bindPopupForStartingChat({\r\n popupSelector: '.apexchat_prechat_message_bubble',\r\n shouldStartChat\r\n });\r\n },\r\n lastPollingCallback(args) {\r\n const { m } = args;\r\n m.message = m.text;\r\n me.autoMessageRendering({\r\n chatMsg: m,\r\n index: -1,\r\n isPipedMessage: true,\r\n cb: args.cb\r\n });\r\n // In Piped messages the last message can be QT we need QT to not to start chat IF user clicks on their DIV HTML Element\r\n const shouldStartChat = m.questionType == ScriptsQuestionType.None;\r\n me.bindPopupForStartingChat({\r\n popupSelector: '.apexchat_prechat_message_bubble',\r\n shouldStartChat\r\n });\r\n }\r\n });\r\n } else {\r\n me.autoMessageRendering({\r\n message,\r\n chatMsg,\r\n index\r\n });\r\n }\r\n // checking chatroom msg is script message aur text message\r\n } else if (\r\n chatMsg.scriptAnswerId > 0 &&\r\n (chatMsg.questionType != ScriptsQuestionType.None || chatMsg.agentScriptDocuments) &&\r\n chatMsg.visitorResponseStatus == ScriptVisitorResponseStatus.UnAnswered\r\n ) {\r\n logIt(chatMsg);\r\n me.agentScriptAnswerId = -1;\r\n chatMsg.dontAppendExisitngContent = true; // we need detection here for QT is from Dashboard to handle animation.\r\n me.messagePopupUI.clear();\r\n me.messagePopupUI.render(chatMsg);\r\n await me.QTRendererExt.questionTypeRenderer.renderMessage(\r\n chatMsg,\r\n me.QTRendererExt.afterRenderMessage.bind2(me.QTRendererExt)\r\n );\r\n me.messagePopupUI.questionTypeUIConfiguration(chatMsg.questionType);\r\n } else {\r\n me.messagePopupUI.render(chatMsg);\r\n }\r\n }\r\n\r\n queueAutoMessaging() {\r\n const me = this;\r\n if (\r\n me.options.videoGreet.videoGreetMessages &&\r\n me.options.videoGreet.videoGreetMessages.length > 0\r\n ) {\r\n let lastPreChatPopoutMessage = me.getLastMessageCache();\r\n if (!lastPreChatPopoutMessage) {\r\n // It means the next message is first to be display\r\n lastPreChatPopoutMessage = {\r\n index: 0,\r\n duration: me.options.videoGreet.preChatFirstMessageTimeout\r\n ? 1000 * me.options.videoGreet.preChatFirstMessageTimeout\r\n : 1000\r\n };\r\n }\r\n // CHAT-6794 [PreChat] - Mapped Question on Page Refresh not appearing\r\n // summary: if mapped question has appeared, in case of refresh it should appear again instead of parent question\r\n const hasMappedQuestionAppeared = storageAPIExists(\r\n TempCache.APEXCHAT_PRECHAT_MAPPED_QUESTION_COOKIE\r\n );\r\n let lastMappedQuestion;\r\n if (hasMappedQuestionAppeared) {\r\n lastMappedQuestion = JSON.parse(\r\n getStorageAPIValue(TempCache.APEXCHAT_PRECHAT_MAPPED_QUESTION_COOKIE)\r\n );\r\n }\r\n me.queueNextMessage(\r\n lastPreChatPopoutMessage.index,\r\n lastPreChatPopoutMessage.duration,\r\n lastMappedQuestion\r\n );\r\n }\r\n }\r\n\r\n queueNextMessage(index, duration, lastMappedQuestion) {\r\n // show next message if available\r\n const me = this;\r\n if (me.options.videoGreet.videoGreetMessages.length == index) {\r\n return;\r\n }\r\n if (index < 0) {\r\n // Do not show the next message if somebody close the message and then refresh the page\r\n // In message close event we are setting the index of the last message = -1\r\n return;\r\n }\r\n if (me.options.videoGreet.videoGreetMessages.length > index) {\r\n // CHAT-6794 [PreChat] - Mapped Question on Page Refresh not appearing\r\n // summary: Once a mapped question appears and the visitor decides to refresh the page, rather than the parent question appearing, the visitor will now see the mapped question.\r\n // lastMappedQuestion: Its only for Predefined messages.\r\n // it will be always 'NULL' in case of running Chat session,\r\n // It could be 'Object' only if the last prechat msg was not Parent Question.\r\n me.messageTimeout = window.setTimeout(() => {\r\n me.displayMessage(index, true, lastMappedQuestion);\r\n }, duration);\r\n }\r\n // summary: isPlainText is the plain text when user adds plain text from edit profile not agent scripted plain text.\r\n const isPlainText =\r\n me.options.videoGreet.videoGreetMessages[index - 1] &&\r\n me.options.videoGreet.videoGreetMessages[index - 1].messageType ==\r\n PreChatMessageType.plain_Text;\r\n // isAgentScript means its agent script.\r\n const isAgentScript =\r\n me.options.videoGreet.videoGreetMessages[index - 1] &&\r\n me.options.videoGreet.videoGreetMessages[index - 1].messageType ==\r\n PreChatMessageType.agent_Script;\r\n // isQuestionType and None means Plain Text.\r\n const isQTNone =\r\n me.options.videoGreet.videoGreetMessages[index - 1] &&\r\n me.options.videoGreet.videoGreetMessages[index - 1].questionType ==\r\n ScriptsQuestionType.None;\r\n // JIRA_4241 - Checking that Prechat message is Last, Plain Text and prevent multi-rendering.\r\n if (\r\n me.options.videoGreet.videoGreetMessages.length == index && // To Make sure Last PreChat Msg\r\n (isPlainText || (isAgentScript && isQTNone)) &&\r\n !me.options.videoGreet.videoGreetMessages[index - 1].isLastPreChatMessage\r\n ) {\r\n // prevent multi-rendering\r\n me.options.videoGreet.videoGreetMessages[index - 1].isLastPreChatMessage = true;\r\n me.messageTimeout = window.setTimeout(() => {\r\n me.displayMessage(index - 1, true);\r\n }, duration);\r\n // return;\r\n }\r\n me.setLastMessageCache(index, duration);\r\n }\r\n\r\n bindPopupForStartingChat(options) {\r\n const me = this;\r\n const { popupSelector } = options;\r\n const { message } = options;\r\n me.$(popupSelector, me.DOM).data('shouldStartChat', options.shouldStartChat);\r\n if (options.shouldStartChat) {\r\n me.$(popupSelector, me.DOM).on('click.startchat', function (e) {\r\n me.startChatFromVideoGreet(e, {\r\n srcElement: this,\r\n message\r\n });\r\n });\r\n } else {\r\n // unbind event when qt is not none\r\n me.$(popupSelector, me.DOM).off('click.startchat');\r\n }\r\n me.handleADA(\r\n me.DOM.querySelector(popupSelector),\r\n me.startChatFromVideoGreet.bind2(this, {\r\n srcElement: me.$(popupSelector, me.DOM),\r\n message\r\n })\r\n );\r\n }\r\n\r\n async renderScriptMessage(message) {\r\n const me = this;\r\n const messageLog = {};\r\n message.text = parseTemplate(removeTextFollowedByColon(message.text), me.options);\r\n me.agentScriptAnswerId = message.id;\r\n // create model for message logging\r\n messageLog.visitorId = me.options.visitorId;\r\n messageLog.text = message.text;\r\n messageLog.scriptAnswerId = message.id;\r\n messageLog.questionType = message.questionType;\r\n messageLog.options = message.options;\r\n messageLog.visitorResponseStatus = ScriptVisitorResponseStatus.UnAnswered;\r\n messageLog.visitorResponseType = message.visitorResponseType;\r\n messageLog.questionTypeDisplayListForVisitor = message.displayListForVisitor;\r\n messageLog.isSplitMessage = message.isSplitMessage;\r\n messageLog.sourceType = SourceType.VideoGreet;\r\n me.logMessageOnServer(messageLog);\r\n if (message.questionType == ScriptsQuestionType.FullText) {\r\n message.userId = message.userId || 0;\r\n message.participantDisplayName = message.participantDisplayName || '';\r\n message.createdOn = new Date();\r\n me.QTRendererExt.questionTypeRenderer.renderMessage(\r\n message,\r\n me.QTRendererExt.afterRenderMessage.bind2(me.QTRendererExt)\r\n );\r\n }\r\n // check if question type is None and msg does not contain files\r\n // it prevent to go to QTRenderer to render message\r\n else if (\r\n message.questionType === ScriptsQuestionType.None &&\r\n !message.agentScriptDocuments\r\n ) {\r\n me.DOM.getElementById('apexchat_prechat_message').innerHTML = message.text;\r\n me.$('#apexchat_greet_video_start_trigger', me.DOM).show();\r\n } else {\r\n // render agent script message\r\n me.DOM.getElementById('apexchat_prechat_message').innerHTML = '';\r\n message.userId = message.userId || 0;\r\n message.participantDisplayName = message.participantDisplayName || '';\r\n message.createdOn = new Date();\r\n message.questionTypeDisplayListForVisitor = message.displayListForVisitor;\r\n await me.QTRendererExt.questionTypeRenderer.renderMessage(message);\r\n if (message.questionType == ScriptsQuestionType.None) {\r\n me.$('#apexchat_greet_video_start_trigger', me.DOM).show();\r\n }\r\n me.questionTypeUIConfiguration();\r\n }\r\n // here, we make sure we grab the messages which have been shown\r\n // while prechat is displayed/not hidden\r\n const m = message;\r\n const currentPreChatState = me.getCurrentState();\r\n m.isShown = currentPreChatState === WidgetStates.ShownMaximized;\r\n ApexChat.videoGreetMessagesDisplayed = ApexChat.videoGreetMessagesDisplayed || [];\r\n if (m.isShown) {\r\n ApexChat.videoGreetMessagesDisplayed.push(m);\r\n }\r\n }\r\n\r\n setAllowBackgroundClick(questionType) {\r\n const me = this;\r\n if (\r\n questionType >= 0 &&\r\n questionType !== ScriptsQuestionType.None &&\r\n questionType !== ScriptsQuestionType.Text &&\r\n questionType !== ScriptsQuestionType.Time &&\r\n questionType !== ScriptsQuestionType.TimeCalendar &&\r\n questionType !== ScriptsQuestionType.CalendarDate\r\n ) {\r\n me.allowBackgroundClick = false;\r\n }\r\n }\r\n\r\n questionTypeUIConfiguration(questionType) {\r\n const me = this;\r\n me.setAllowBackgroundClick(questionType);\r\n ADACompliant.push(me.$('.apexchat_ada_compliance', me.DOM)).apply();\r\n me.$('.apexchat_question_type_close_button', me.DOM).attr(\r\n 'style',\r\n 'display:none !important'\r\n );\r\n me.$('#apexchat_click_instruction', me.DOM).attr('style', 'display: none !important');\r\n me.$('#apexchat_participant_display_name', me.DOM).attr(\r\n 'style',\r\n 'display: none !important'\r\n );\r\n me.$('#apexchat_participant_display_col', me.DOM).attr('style', 'display: none !important');\r\n }\r\n\r\n logMessageOnServer(log) {\r\n const me = this;\r\n if (localstorageAPIExists('livechat_prechat_msg_array')) {\r\n me.messageArray = JSON.parse(localStorageAPIGet('livechat_prechat_msg_array'));\r\n }\r\n if (log.isSplitMessage) {\r\n // if message is splitted message then we dont need to log on server because we already did it\r\n return;\r\n }\r\n const videoGreetMsgObj = me.getDuplicatedObjectFromArray(me.messageArray, log.text, 'text');\r\n\r\n if (videoGreetMsgObj) {\r\n me.videoGreetMessageId = videoGreetMsgObj.id;\r\n return; // duplicated message.\r\n }\r\n const url = `${GlobalVariables.ApexChatBaseUrl}api/prechat/messages`;\r\n // encode just in case there are any HTML tags to avoid request failure due to CSRF\r\n const encodedLog = encodeHTML(JSON.stringify(log));\r\n me.$.ajax({\r\n type: 'POST',\r\n url,\r\n dataType: 'json',\r\n data: encodedLog,\r\n contentType: 'application/json; charset=utf-8',\r\n success(response) {\r\n me.videoGreetMessageId = response.id;\r\n me.messageArray.push({ id: me.videoGreetMessageId, text: log.text });\r\n ApexChat.localStorageAPI.Store(\r\n 'livechat_prechat_msg_array',\r\n JSON.stringify(me.messageArray)\r\n );\r\n me.setVideoGreetMessageIdsCache(me.videoGreetMessageId);\r\n },\r\n failure(err) {\r\n logIt(err);\r\n }\r\n });\r\n }\r\n\r\n getDuplicatedObjectFromArray(array, msg, property) {\r\n let i = array.length;\r\n while (i--) {\r\n if (array[i][property] === msg) {\r\n return array[i];\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n setLastMessageCache(index, duration) {\r\n const me = this;\r\n const message = { index, duration };\r\n Cookies.set(me.lastMessageStoreName, JSON.stringify(message));\r\n }\r\n\r\n getLastMessageCache() {\r\n const me = this;\r\n const message = Cookies.get(me.lastMessageStoreName);\r\n return message ? JSON.parse(message) : null;\r\n }\r\n\r\n getMessageCounterCache() {\r\n const me = this;\r\n const counter = Cookies.get(me.messageCounterStoreName) || 0;\r\n return parseInt(counter);\r\n }\r\n\r\n setVideoGreetMessageIdsCache(id) {\r\n // store pre chat message data in local storage\r\n const storeData = getCookieValue(TempCache.APEXCHAT_PRECHAT_MESSAGE_IDS_COOKIE);\r\n if (storeData) {\r\n var storeJson = JSON.parse(storeData);\r\n }\r\n if (!storeJson) {\r\n storeJson = [];\r\n }\r\n storeJson.push(id);\r\n Cookies.set(TempCache.APEXCHAT_PRECHAT_MESSAGE_IDS_COOKIE, stringify(storeJson));\r\n }\r\n\r\n show() {\r\n super.show();\r\n this.maximize();\r\n }\r\n\r\n displayLastMessageFromHistory() {\r\n const me = this;\r\n const lastMessage = ApexChat.TryParse(Cookies.get('livechat_chat_lastmessage')); // get last message of chat from cookies\r\n if (\r\n lastMessage &&\r\n lastMessage.questionType !== ScriptsQuestionType.None &&\r\n (!me.lastMessageDisplayed ||\r\n (me.lastMessageDisplayed && me.lastMessageDisplayed.id != lastMessage.id))\r\n ) {\r\n // check if message is question type and message is not appear before so show it\r\n if (lastMessage.text.indexOf('||') > -1) {\r\n // we are not handling pipe message here, as this is perfectly render by onMessageArrived\r\n return;\r\n }\r\n if (lastMessage.options) {\r\n lastMessage.options = addOptionProperty(lastMessage.options);\r\n }\r\n me.lastMessageDisplayed = lastMessage;\r\n window.setTimeout(() => {\r\n me.displayMessage(0, false, lastMessage);\r\n }, lastMessage.questionTypeDelaySeconds * 1000);\r\n }\r\n }\r\n\r\n hide() {\r\n super.hide();\r\n // resize iframe\r\n this.postMessage(\r\n {\r\n event: WidgetTypes.VideoGreetInvitation + WidgetStates.Hidden,\r\n data: {}\r\n },\r\n '*'\r\n );\r\n window.clearTimeout(this.messageTimeout);\r\n this.pipeMessageHandler.reset(); // stop all processing of pipe messages if its running\r\n }\r\n\r\n maximize() {\r\n super.maximize();\r\n }\r\n\r\n generateVideoGreet() {\r\n const me = this;\r\n const iframeEl = document.getElementById('apexchat_video_greet_invitation_frame');\r\n const isMaximized = me.isVideoGreetStateMaximized();\r\n if (isMaximized) {\r\n me.maximizeVideoGreet();\r\n me.$(me.options.videoGreetPlayPauseIcon, me.DOM).toggleClass('play_icon pause_icon');\r\n me.videoPlayerState = 'paused';\r\n if (me.isPageRefreshed()) {\r\n me.videoPlayer.pause();\r\n me.handleVideoGreetMute();\r\n me.togglePlayIcon();\r\n }\r\n me.$(me.options.videoGreetInvitationOverlayTrigger, me.DOM).hide();\r\n me.$(me.options.videoGreetLoader, me.DOM).hide();\r\n if (!me.isChatInProgress()) {\r\n // ref. CHAT-4589: we should stop pre-chat message popups on susequent page reloads\r\n me.queueAutoMessaging();\r\n } else {\r\n me.startChatFromVideoGreet();\r\n }\r\n }\r\n if (me.options.videoGreet.greetText) {\r\n me.$(this.options.videoGreetTooltip, me.DOM)\r\n .children(this.options.videoGreetTooltipText)\r\n .text(me.options.videoGreet.greetText);\r\n } else {\r\n me.$(this.options.videoGreetTooltip, me.DOM).hide();\r\n }\r\n if (me.isMobile()) {\r\n const container = me.$('#apexchat_video_greet_invitation_max', me.DOM);\r\n container.addClass('apexchat_video_greet_invitation_mobile');\r\n }\r\n if (me.videoPlayer) {\r\n me.videoPlayer.on('ready', () => {\r\n if (me.options.videoGreet.animatedImageUrl) {\r\n me.postMessage({\r\n event: 'videogreet-gif-file-loaded',\r\n data: {\r\n imageUrl: me.options.videoGreet.animatedImageUrl\r\n }\r\n });\r\n }\r\n\r\n Promise.all([me.videoPlayer.height(), me.videoPlayer.width()]).then(\r\n (dimensions) => {\r\n const width = dimensions[0];\r\n const height = dimensions[1];\r\n if (width > height) {\r\n me.$(me.options.videoGreetInvitationContainer, me.DOM).addClass(\r\n 'video_greet_landscape_video'\r\n );\r\n }\r\n }\r\n );\r\n\r\n if (!me.videoPlayerState) {\r\n me.videoPlayerState = 'playing';\r\n }\r\n\r\n me.$(me.options.videoGreetPlayTrigger, me.DOM).on('click', () => {\r\n me.handlePlayPause();\r\n });\r\n\r\n me.$(me.options.videoGreetMuteTrigger, me.DOM).on('click', () => {\r\n me.handleVideoGreetMute();\r\n });\r\n\r\n me.$('#apexchat_greet_video_start_trigger', me.DOM).on('click', () => {\r\n me.videoPlayer.pause();\r\n me.videoPlayer.currentTime(0);\r\n me.startChatFromVideoGreet();\r\n });\r\n\r\n let playedInitially = false;\r\n me.videoPlayer.on('play', () => {\r\n if (!playedInitially) {\r\n me.show();\r\n setTimeout(() => {\r\n me.$(me.options.prechatMessagesContainer, me.DOM).css({\r\n visibility: 'visible',\r\n opacity: 1\r\n });\r\n me.$(me.options.videoGreetTooltip, me.DOM).addClass(\r\n 'video_greet_slide_text'\r\n );\r\n if (\r\n me.$(me.options.videoGreetTooltip, me.DOM).text() &&\r\n me.$(me.options.videoGreetTooltip, me.DOM).text().length > 34\r\n ) {\r\n me.$(me.options.videoGreetTooltip, me.DOM).addClass(\r\n 'video_greet_slide_text_smaller'\r\n );\r\n }\r\n me.$(me.options.videoGreetControls, me.DOM).addClass(\r\n 'apexchat_greet_video_controls_show'\r\n );\r\n if (!isMaximized) {\r\n if (!me.isChatInProgress()) {\r\n // ref. CHAT-4589: we should stop pre-chat message popups on susequent page reloads\r\n me.queueAutoMessaging();\r\n }\r\n }\r\n });\r\n }\r\n logIt('▶ Video Greet:: played!');\r\n playedInitially = true;\r\n });\r\n\r\n me.videoPlayer.on('timeupdate', function (data) {\r\n if (\r\n this.currentTime() > 0 &&\r\n me.$(me.options.videoGreetLoader, me.DOM).is(':visible')\r\n ) {\r\n me.$(me.options.videoGreetLoader, me.DOM).fadeOut();\r\n }\r\n if (this.currentTime()) {\r\n logIt(\r\n `▶ Video Greet:: in progress! ${this.currentTime().toFixed(\r\n 2\r\n )} seconds watched`\r\n );\r\n ApexChat.options.videoGreetWatchTime = this.currentTime().toFixed(2);\r\n }\r\n\r\n me.resetPlayerAfterVideoEnded(data);\r\n });\r\n\r\n me.$(me.options.videoGreetCloseTrigger, me.DOM).on('click', () => {\r\n me.minimizeVideoGreet();\r\n me.updateClassBasedOnVisibility();\r\n });\r\n\r\n const h = iframeEl.clientHeight - 10;\r\n const w = iframeEl.clientWidth;\r\n me.videoGreetDimenstionRatio = w / h;\r\n\r\n me.$(me.options.videoGreetInvitationOverlayTrigger, me.DOM).on(\r\n 'click',\r\n function () {\r\n me.$(me.options.videoGreetControls, me.DOM)\r\n .removeClass('apexchat_greet_video_controls_show')\r\n .delay()\r\n .queue(function (next) {\r\n me.$(this).addClass('apexchat_greet_video_controls_show');\r\n next();\r\n });\r\n me.maximizeVideoGreet();\r\n setTimeout(() => {\r\n me.$(me.options.videoGreetPlayTrigger, me.DOM)\r\n .find(me.options.videoGreetPlayPauseIcon)\r\n .toggleClass('play_icon pause_icon');\r\n me.replaceMuteIcon(false);\r\n });\r\n me.onWindowResize(me.videoGreetDimenstionRatio);\r\n me.$(this).hide();\r\n }\r\n );\r\n\r\n if (me.isVideoGreetStateMaximized()) {\r\n me.resetPlayerAndPlay();\r\n }\r\n\r\n me.videoPlayer.on('ended', () => {\r\n me.onVideoEnded();\r\n });\r\n\r\n me.$(window).resize(() => {\r\n me.onWindowResize(me.videoGreetDimenstionRatio);\r\n });\r\n me.updateClassBasedOnVisibility();\r\n });\r\n }\r\n }\r\n\r\n resetPlayerAfterVideoEnded(data) {\r\n const me = this;\r\n if (me.videoPlayer.muted()) {\r\n // hack to reset the vimeo player in case of\r\n // hiding free account video suggestion\r\n // checking if the duration of the video is about to end\r\n // then reset the player, the video will end 100 ms before of it's actual time\r\n\r\n if (data.duration - data.seconds <= 0.3) {\r\n me.videoPlayer.currentTime(0);\r\n }\r\n if (data.duration - data.seconds <= 0.3) {\r\n setTimeout(() => {\r\n me.videoPlayer.currentTime(0);\r\n me.triggerPauseIfPlaying();\r\n me.videoPlayerState = 'paused';\r\n me.togglePlayIcon();\r\n me.$(me.options.videoGreetSeekbar, me.DOM).css('width', 0);\r\n }, 200);\r\n }\r\n }\r\n }\r\n\r\n onWindowResize(ratio) {\r\n const me = this;\r\n const winHeight = window.innerHeight;\r\n const isMaximized = me.isVideoGreetStateMaximized();\r\n const widgetInitialHeight = isMaximized\r\n ? ApexChat.WidgetMaximizedHeight\r\n : ApexChat.WidgetMinimizedHeight;\r\n const widgetInitialWidth = isMaximized\r\n ? ApexChat.WidgetMaximizedWidth\r\n : ApexChat.WidgetMinimizedWidth;\r\n let newHeight = widgetInitialHeight;\r\n const newWidth = widgetInitialWidth;\r\n if (winHeight < widgetInitialHeight) {\r\n newHeight = winHeight - 20;\r\n // if keep the ration on maximizing\r\n // newWidth = ratio * winHeight;\r\n }\r\n if (!me.isMobile()) {\r\n me.postMessage({\r\n event: 'videogreet-size',\r\n data: {\r\n width: newWidth,\r\n height: newHeight,\r\n isPreChatRoundedTheme: me.options.isPreChatRoundedTheme\r\n }\r\n });\r\n }\r\n logIt('▶ Video Greet:: window resized');\r\n }\r\n\r\n onVideoEnded() {\r\n const me = this;\r\n me.videoPlayerState = 'paused';\r\n me.togglePlayIcon();\r\n me.$(me.options.videoGreetSeekbar, me.DOM).css('width', 0);\r\n logIt('▶ Video Greet:: video ended!');\r\n }\r\n\r\n handlePlayPause() {\r\n const me = this;\r\n me.$(me.options.videoGreetPlayTrigger, me.DOM)\r\n .find(me.options.videoGreetPlayPauseIcon)\r\n .toggleClass('play_icon pause_icon');\r\n if (me.videoPlayerState === 'playing') {\r\n me.videoPlayerState = 'paused';\r\n me.videoPlayer.pause();\r\n logIt('▶ Video Greet:: paused');\r\n } else {\r\n me.videoPlayerState = 'playing';\r\n me.videoPlayer.play();\r\n logIt('▶ Video Greet:: resumed');\r\n }\r\n }\r\n\r\n handleVideoGreetMute() {\r\n const me = this;\r\n if (me.videoPlayer) {\r\n console.log(`video is on mute:${me.videoPlayer.muted()}`);\r\n if (me.videoPlayer.muted()) {\r\n // If the video is muted, unmute it\r\n me.videoPlayer.muted(false);\r\n me.replaceMuteIcon(false);\r\n } else {\r\n // If the video is not muted, mute it\r\n me.videoPlayer.muted(true);\r\n me.replaceMuteIcon(true);\r\n }\r\n }\r\n }\r\n\r\n replaceMuteIcon(muted) {\r\n const me = this;\r\n me.$(me.$(me.options.videoGreetMuteTrigger, me.DOM))\r\n .find('img')\r\n .attr('src', `https://d3b4i635mede5k.cloudfront.net/${muted ? 'mute' : 'unmute'}.png`);\r\n logIt(`▶ Video Greet:: icon changed to ${muted}` ? 'mute' : 'unmute');\r\n }\r\n\r\n isElementVisible(el) {\r\n return [...el.children].some(child => {\r\n const style = window.getComputedStyle(child);\r\n return style.visibility !== \"hidden\" && style.display !== \"none\" && child.offsetParent !== null;\r\n });\r\n }\r\n updateClassBasedOnVisibility() {\r\n var me = this;\r\n const videoGreetWrapper = document.querySelector(\"#apexchat_video_greet_invitation_wrapper\");\r\n const prechatWrapper = document.querySelector(\"#apexchat_prechat_invitation_wrapper\");\r\n\r\n if (videoGreetWrapper && prechatWrapper) {\r\n if (me.isElementVisible(videoGreetWrapper)) {\r\n // Element is visible\r\n prechatWrapper.classList.add(\"hide-prechat-on-video-greet\");\r\n } else {\r\n // Element is hidden\r\n prechatWrapper.classList.remove(\"hide-prechat-on-video-greet\");\r\n }\r\n }\r\n }\r\n maximizeVideoGreet() {\r\n const me = this;\r\n me.$(this.options.videoGreetTooltip, me.DOM).hide();\r\n me.setVideoGreetStateMaximized('true');\r\n if (me.videoPlayer) {\r\n me.resetPlayerAndPlay();\r\n }\r\n me.$(me.options.videoGreetInvitationContainer, me.DOM).toggleClass(\r\n me.options.togglePlayerClassess\r\n );\r\n me.options.wiggleEnabled = false;\r\n clearTimeout(ApexChat.wigglingTimeouts);\r\n // full screen on mobile\r\n if (me.isMobile()) {\r\n const container = me.$('#apexchat_video_greet_invitation_max', me.DOM);\r\n container.addClass('apexchat_video_greet_invitation_mobile_maximized');\r\n const outerWrpper = me.$('#apexchat_video_greet_invitation_wrapper');\r\n outerWrpper.css({\r\n margin: 0,\r\n padding: 0,\r\n left: 0\r\n });\r\n me.postMessage({\r\n event: 'videogreet-size',\r\n data: {\r\n width: window.innerWidth,\r\n height: window.innerHeight,\r\n isPreChatRoundedTheme: me.options.isPreChatRoundedTheme\r\n }\r\n });\r\n } else {\r\n me.postMessage({\r\n event: 'videogreet-size',\r\n data: {\r\n width: ApexChat.WidgetMaximizedWidth,\r\n height: ApexChat.WidgetMaximizedHeight,\r\n onCreateSizing: true,\r\n addValue: me.templateRenderer.heightPosition,\r\n isPreChatRoundedTheme: me.options.isPreChatRoundedTheme\r\n }\r\n });\r\n }\r\n logIt('▶ Video Greet:: maximized');\r\n }\r\n\r\n isMobile() {\r\n return this.options.isMobile || Browser.isiOS() || Browser.isAndroid();\r\n }\r\n\r\n resetVideoGreetVideo() {\r\n const me = this;\r\n ApexChat.logIt('▶ Video Greet:: reset');\r\n if (me.videoPlayer) {\r\n me.videoPlayer.pause();\r\n me.videoPlayer.currentTime(0);\r\n // me.minimizeVideoGreet(true);\r\n me.$(me.options.videoGreetPlayPauseIcon, me.DOM).toggleClass('play_icon pause_icon');\r\n me.videoPlayerState = 'paused';\r\n ApexChat.Vimeo = null;\r\n }\r\n }\r\n\r\n resetPlayerAndPlay() {\r\n const me = this;\r\n me.videoPlayer.currentTime(0);\r\n me.triggerPlayIfPaused();\r\n me.videoPlayer.on('timeupdate', function (data) {\r\n if (this.currentTime()) {\r\n const currentTime = this.currentTime();\r\n const duration = this.duration();\r\n // Calculate the percentage of playtime\r\n const playtimePercentage = (currentTime / duration) * 100;\r\n logIt(`▶ Video Greet:: progress ${playtimePercentage}%`);\r\n me.$(me.options.videoGreetSeekbar, me.DOM).css('width', `${playtimePercentage}%`);\r\n }\r\n });\r\n me.videoPlayer.currentTime(0);\r\n me.videoPlayer.loop(false);\r\n me.videoPlayer.muted(false);\r\n }\r\n\r\n minimizeVideoGreet(isPaused) {\r\n const me = this;\r\n me.videoPlayer.muted(true);\r\n me.triggerPauseIfPlaying();\r\n me.state.changeState({\r\n origin: WidgetTypes.VideoGreetInvitation,\r\n toState: WidgetStates.Closed\r\n });\r\n logIt('▶ Video Greet:: closed');\r\n }\r\n\r\n triggerPlayIfPaused() {\r\n const me = this;\r\n if (me.videoPlayer.paused()) {\r\n me.videoPlayer.play();\r\n }\r\n }\r\n\r\n triggerPauseIfPlaying() {\r\n const me = this;\r\n if (me.videoPlayer.paused()) {\r\n me.videoPlayer.pause();\r\n }\r\n }\r\n\r\n togglePlayIcon() {\r\n const me = this;\r\n me.$(me.options.videoGreetPlayTrigger, me.DOM)\r\n .find(me.options.videoGreetPlayPauseIcon)\r\n .addClass('play_icon')\r\n .removeClass('pause_icon');\r\n }\r\n\r\n togglePauseIcon() {\r\n const me = this;\r\n me.$(me.options.videoGreetPlayTrigger, me.DOM)\r\n .find(me.options.videoGreetPlayPauseIcon)\r\n .addClass('pause_icon')\r\n .removeClass('play_icon');\r\n }\r\n\r\n setVideoGreetStateMaximized(status) {\r\n Cookies.set(this.options.isVideoGreetMaximized, status);\r\n }\r\n\r\n isVideoGreetStateMaximized() {\r\n return Cookies.get(this.options.isVideoGreetMaximized) === 'true';\r\n }\r\n\r\n isVideoGreetStateSmall() {\r\n return Cookies.get(this.options.isVideoGreetMaximized) === 'small';\r\n }\r\n}\r\n"],"names":["module","exports","obj","__t","__p","VideoGreetBaseMessageHandler","BaseClass","constructor","options","super","this","Object","assign","objectType","WidgetTypes","MessageHandler","ADAHandler","context","videoGreetModel","messages","push","model","msg","MessageView","wrap","targetElementSelector","renderOninit","template","index","length","status","MessageStatus","Unread","visibility","MessageVisibility","Visible","last","getLastMessage","isFirstMessage","isLastMessage","view","removeClass","duration","videoGreetMessages","filter","prechatMsgArray","id","animationConfig","preChatMessageAnimation","PreChatMessageAnimation","Stacking","StartFaddingOutAfter","HideMessageAfter","IFrameResizeAfterFaddingOut","closeButtonSupported","MobileStacking","closeButtonHeight","heightCalculation","me","currentMsgView","lastMsg","fixFirstElement","animate","PreChatMessageAnimations","First","isFromHistory","isPageRefreshed","fixUpComingElement","Previous","FadeOut","Upcoming","self","elementObj","msgPopupElementFirst","setTimeout","ele","$","identifier","postMessage","event","data","currentMsgHeight","getHeightOfElement","isSingleMsg","calcCurrentMsgHeight","TempCache","PRECHAT_Rounded_Message_Popup_Current_Height","css","hide","elementlast","elementmsg","prevMsgHeight","dontAnimateClosebutton","calcLastMsgHeight","PRECHAT_Rounded_Message_Popup_Last_Height","top","noLastMessageOnRefresh","iFrameResizeOnFadeOut","fixLastMsgOnPageRefresh","calcCurrentHeight","VideoGreetMessageHandler","storageAPI","WebStorage","type","ApexChat","sessionAPI","loadAll","getTemplate","messageType","questionType","ScriptsQuestionType","None","messageTemplate","userId","participantDisplayName","createdOn","Date","saveAll","setMessageTemplate","i","getFirstMessage","Store","JSON","stringify","cache","Get","parse","isChatActive","VideoGreetInvitation","BaseWidget","styleName","videoGreetEnabled","logIt","templateRenderer","initElements","videoGreet","chatbotGreetingMessages","script","structuredClone","agentScript","pipeMessageHandler","PipedMessageHandler","DEFAULT_PRECHAT_CONFIG","general","outerObject","hideOuterObject","showImage","backgroundImage","background1Color","background2Color","borderColor","borderWidth","borderRadius","padding","innerObject","hideInnerObject","defaultImage","messagePopup","font","italic","bold","underline","family","size","color","backgroundColor","closeIcon","closeIconSize","width","height","shadowDepth","messageCounter","counterTop","counterRight","renderer","hideMessagePopup","removeMultipleCSSClasses","DOM","getElementById","roundedMessagePopup","find","hideElement","addClass","heightPosition","widgetWidth","renderOnLeftPosition","renderOnRightPosition","showOnlineAgentTag","getElementsByClassName","innerHTML","preChat","preChatAgentStatusText","popupUI","isPreChatRoundedTheme","render","message","text","clear","questionTypeUIConfiguration","setAllowBackgroundClick","attr","container","preChatMsgTemplate","document","createTextNode","html","participants","localStorageAPI","participantInfo","ParticipantIds","visitor","handlerImageUrl","displayName","agentName","append","clone","messenger","decodeHTML","cleanInvalidHtml","removeTextFollowedByColon","Default","dontAppendExisitngContent","show","opacity","renderDefault","renderStacking","chatMode","ChatMode","Windowed","mode","lastMessageStoreName","messageCounterStoreName","ready","messageArray","create","videoGreetTemplate","videoGreetInvitationWidgetTemplate","WidgetView","dom","templates","key","WidgetStates","ShownMaximized","tpl","videoGreetInvitationTemplate","afterRender","messagesContainer","QTRendererExt","QuestionTypeRendererExtentions","initComponent","isUpdateSupported","responseCallback","async","res","handleQuestionType","enableFullTextLogic","widgetType","countryCode","isVideoGreetMaximized","state","getStateValue","chatId","getChatId","RunAsSoonAs","videoGreetRoom","ChatRoomV3","subscribeToChatChannel","undefined","prechatSkin","preChatThemeSetting","skin","AgentImageHandler","rdThemeSettings","TryParse","skinJson","brandingInfo","branding","brandingIsEnabled","brandColorCode","global","Branding","init","widget","BrandingWidget","RD_PreChat","brandConfig","getBrandedConfig","setPrechatStyles","UIConfiguration","getStyle","indexOf","initialState","prechatMessagesContainer","videoGreetCloseTrigger","videoGreetInvitationContainer","videoGreetInvitationOverlayTrigger","videoGreetSeekbar","videoGreetPlayTrigger","videoGreetPlayPauseIcon","togglePlayerClassess","vimeoAPIURL","playerElementId","vimeoScriptID","videoGreetLoader","videoGreetControls","WidgetMinimizedWidth","WidgetMinimizedHeight","WidgetMaximizedWidth","persistVideoRatioForWidget","WidgetMaximizedHeight","videoPlayerConfig","videoGreetURL","loop","controls","byline","title","muted","autoplay","background","videoGreetMuteTrigger","videoGreetTooltip","videoGreetTooltipText","postVideoGreetMessages","postedVideoGreetMessagesArray","chatLogId","Text","MessageSent","domRendered","PubSub","allSubscriptions","DOMUIController","startChatFromVideoGreet","setWebSyncClient","publishQuestionTypeResponse","visitorSelectedOptions","answers","questionTypeRenderer","questionTypeDisplayListForVisitor","visitorScriptAnswer","visitorResponseStatus","isSkipped","ScriptVisitorResponseStatus","Skipped","Answered","setVisitorSelection","sendMessage","chatMsg","msgText","questionTypeChatLogIdToBeUpdated","url","GlobalVariables","ApexChatBaseUrl","getLastMessageCache","isLastMessageMappedWithNextQuestion","window","clearTimeout","messageTimeout","isVideoGreetMessage","log","visitorId","companyId","language","videoGreetMessageId","scriptAnswerId","agentScriptAnswerId","sourceType","SourceType","VideoGreet","FullText","FullTextVisitorResponse","StoreTemp","prechatStartedTimeout","isLastPreChatMessage","shouldContinueMapping","encodedLog","encodeHTML","ContactInfo","response","fetch","headers","Accept","method","body","json","ok","timerToStartChat","setInterval","clearInterval","contactInfo","e","config","srcElement","changeState","toState","Clicked","value","initiatedBy","updateClassBasedOnVisibility","isWindowedStarted","chatInitiatedBy","startWindowedChat","position","videoGreetPosition","el","iconWidth","offsetWidth","iconHeight","offsetHeight","PreChatIconDimensions","Width","Height","applyCssClass","isMaximized","isVideoGreetStateMaximized","isChatInProgress","isMobile","children","on","trigger","eventSubscription","startChatDiv","containerId","setClickCallToAction","domState","ShownMinimized","Closed","getCurrentState","Hidden","initVideoGreet","Vimeo","getStyleForIframe","iframeId","videoTemplate","preload","fill","playsinline","player","videojs","style","display","play","videoPlayer","generateVideoGreet","hideIt","isChatStartedFromPreChat","subscribe","ExitPopup","pause","imageUrl","animatedImageUrl","DropDown","Bar","Tab","Remove","APEXCHAT_PRECHAT_MAPPED_QUESTION_COOKIE","ChatRoom","ChatEvents","OnSendMessageFailure","PreChat_Message_Sent","Position","Left","Right","autoMessageRendering","PreChatMessageType","plain_Text","agent_Script","messagePopupUI","renderScriptMessage","messageLog","logMessageOnServer","isPipedMessage","queueNextMessage","cb","displayMessage","preChatMsg","addOptionProperty","allowBackgroundClick","reShowIntervalMinutes","parseTemplate","msgObject","m","isValidPipedMessage","isSplitMessage","visitorResponseType","UnAnswered","displayListForVisitor","startPolling","messageDisplayDuration","startPollingCallback","shouldStartChat","bindPopupForStartingChat","popupSelector","lastPollingCallback","args","agentScriptDocuments","renderMessage","afterRenderMessage","bind2","queueAutoMessaging","lastMappedQuestion","lastPreChatPopoutMessage","preChatFirstMessageTimeout","storageAPIExists","getStorageAPIValue","isPlainText","isAgentScript","isQTNone","setLastMessageCache","off","handleADA","querySelector","currentPreChatState","isShown","videoGreetMessagesDisplayed","Time","TimeCalendar","CalendarDate","ADACompliant","apply","localstorageAPIExists","localStorageAPIGet","videoGreetMsgObj","getDuplicatedObjectFromArray","ajax","dataType","contentType","success","setVideoGreetMessageIdsCache","failure","err","array","property","Cookies","set","get","getMessageCounterCache","counter","parseInt","storeData","getCookieValue","APEXCHAT_PRECHAT_MESSAGE_IDS_COOKIE","storeJson","maximize","displayLastMessageFromHistory","lastMessage","lastMessageDisplayed","questionTypeDelaySeconds","reset","iframeEl","maximizeVideoGreet","toggleClass","videoPlayerState","handleVideoGreetMute","togglePlayIcon","greetText","Promise","all","then","dimensions","handlePlayPause","currentTime","playedInitially","is","fadeOut","toFixed","videoGreetWatchTime","resetPlayerAfterVideoEnded","minimizeVideoGreet","h","clientHeight","w","clientWidth","videoGreetDimenstionRatio","delay","queue","next","replaceMuteIcon","onWindowResize","resetPlayerAndPlay","onVideoEnded","resize","seconds","triggerPauseIfPlaying","ratio","winHeight","innerHeight","widgetInitialHeight","newHeight","newWidth","console","isElementVisible","some","child","getComputedStyle","offsetParent","videoGreetWrapper","prechatWrapper","classList","add","remove","setVideoGreetStateMaximized","wiggleEnabled","wigglingTimeouts","margin","left","innerWidth","onCreateSizing","addValue","Browser","isiOS","isAndroid","resetVideoGreetVideo","triggerPlayIfPaused","playtimePercentage","isPaused","origin","paused","togglePauseIcon","isVideoGreetStateSmall"],"sourceRoot":""}