"use strict";(self.webpackChunkLiveHelperChat=self.webpackChunkLiveHelperChat||[]).push([[81],{7081:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{analyticEvents:function(){return analyticEvents}});var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5671),_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(3144),_util_domEventsHandler__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(593),_lib_helperFunctions__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(2137),_analyticEvents=function(){function _analyticEvents(){(0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__.Z)(this,_analyticEvents),this.params={}}return(0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__.Z)(_analyticEvents,[{key:"setParams",value:function(e,t){this.params=e,this.attributes=t,this.initMonitoring()}},{key:"initMonitoring",value:function initMonitoring(){var _this=this;this.params.ga.events.forEach((function(itemList){_this.attributes.eventEmitter.addListener(itemList.ev,(function(params){var item=JSON.parse(JSON.stringify(itemList));if("hideInvitation"!=item.ev||void 0===params||!params.full){var label=item.el;if("trackingEvent"==item.ev&&void 0!==params)item.ev=params.ev|item.ev,item.ec=params.ec||item.ec,item.ea=params.ea||item.ea,label=params.el||item.el;else if("showInvitation"!=item.ev&&"readInvitation"!=item.ev&&"fullInvitation"!=item.ev&&"cancelInvitation"!=item.ev||void 0===params||!params.name){if("botTrigger"==item.ev)return void 0!==params&&params.trigger&&params.trigger.length>0?void params.trigger.forEach((function(triggerLabel){var js=_this.params.ga.js.replace(/\{\{eventCategory\}\}/g,JSON.stringify(item.ec)).replace(/\{\{eventAction\}\}/g,JSON.stringify(item.ea)).replace(/\{\{eventLabel\}\}/g,JSON.stringify(triggerLabel)).replace(/\{\{eventInternal\}\}/g,JSON.stringify(item.ev));try{eval(js)}catch(e){console.log(e)}})):void 0}else label=label||params.name;var js=_this.params.ga.js.replace(/\{\{eventCategory\}\}/g,JSON.stringify(item.ec)).replace(/\{\{eventAction\}\}/g,JSON.stringify(item.ea)).replace(/\{\{eventLabel\}\}/g,JSON.stringify(label)).replace(/\{\{eventInternal\}\}/g,JSON.stringify(item.ev));try{eval(js)}catch(e){console.log(e)}}}))}))}}]),_analyticEvents}(),analyticEvents=new _analyticEvents}}]);
//# sourceMappingURL=75d1d932aa8416f0bf23.js.map