From 8bba39a890547ff1faa9abedec7bca364bcbc6f3 Mon Sep 17 00:00:00 2001
From: support
Date: Wed, 15 Mar 2023 10:47:12 +0000
Subject: [PATCH] Built motion from commit 71df090e.|2.6.31
---
apidoc/api_project.js | 2 +-
apidoc/api_project.json | 2 +-
server/api/action/action.attributes.js | 2 +-
server/api/action/action.controller.js | 2 +-
server/api/action/action.model.js | 2 +-
server/api/action/action.rpc.js | 2 +-
server/api/action/index.js | 2 +-
.../analyticCustomReport.attributes.js | 2 +-
.../analyticCustomReport.controller.js | 2 +-
.../analyticCustomReport.model.js | 2 +-
.../analyticCustomReport.rpc.js | 2 +-
server/api/analyticCustomReport/index.js | 2 +-
.../analyticDefaultReport.attributes.js | 2 +-
.../analyticDefaultReport.controller.js | 2 +-
.../analyticDefaultReport.model.js | 2 +-
.../analyticDefaultReport.rpc.js | 2 +-
server/api/analyticDefaultReport/index.js | 2 +-
.../analyticExtractedReport.attributes.js | 2 +-
.../analyticExtractedReport.controller.js | 2 +-
.../analyticExtractedReport.model.js | 2 +-
.../analyticExtractedReport.rpc.js | 2 +-
server/api/analyticExtractedReport/index.js | 2 +-
.../analyticFieldReport.attributes.js | 2 +-
.../analyticFieldReport.controller.js | 2 +-
.../analyticFieldReport.model.js | 2 +-
.../analyticFieldReport/analyticFieldReport.rpc.js | 2 +-
server/api/analyticFieldReport/index.js | 2 +-
.../analyticMetric/analyticMetric.attributes.js | 2 +-
.../analyticMetric/analyticMetric.controller.js | 2 +-
server/api/analyticMetric/analyticMetric.model.js | 2 +-
server/api/analyticMetric/analyticMetric.rpc.js | 2 +-
server/api/analyticMetric/index.js | 2 +-
.../analyticTreeReport.attributes.js | 2 +-
.../analyticTreeReport.controller.js | 2 +-
.../analyticTreeReport/analyticTreeReport.model.js | 2 +-
.../analyticTreeReport/analyticTreeReport.rpc.js | 2 +-
server/api/analyticTreeReport/index.js | 2 +-
server/api/attachment/attachment.attributes.js | 2 +-
server/api/attachment/attachment.controller.js | 2 +-
server/api/attachment/attachment.model.js | 2 +-
server/api/attachment/attachment.rpc.js | 2 +-
server/api/attachment/index.js | 2 +-
.../authActiveDirectory.controller.js | 2 +-
server/api/authActiveDirectory/index.js | 2 +-
server/api/authGoogle/authGoogle.controller.js | 2 +-
server/api/authGoogle/index.js | 2 +-
server/api/authLocal/authLocal.controller.js | 2 +-
server/api/authLocal/index.js | 2 +-
server/api/automation/automation.attributes.js | 2 +-
server/api/automation/automation.controller.js | 2 +-
server/api/automation/automation.model.js | 2 +-
server/api/automation/automation.rpc.js | 2 +-
server/api/automation/index.js | 2 +-
server/api/campaign/campaign.attributes.js | 2 +-
server/api/campaign/campaign.controller.js | 2 +-
server/api/campaign/campaign.model.js | 2 +-
server/api/campaign/campaign.rpc.js | 2 +-
server/api/campaign/index.js | 2 +-
server/api/cannedAnswer/cannedAnswer.attributes.js | 2 +-
server/api/cannedAnswer/cannedAnswer.controller.js | 2 +-
server/api/cannedAnswer/cannedAnswer.model.js | 2 +-
server/api/cannedAnswer/cannedAnswer.rpc.js | 2 +-
server/api/cannedAnswer/index.js | 2 +-
server/api/cdr/cdr.attributes.js | 2 +-
server/api/cdr/cdr.controller.js | 2 +-
server/api/cdr/cdr.model.js | 2 +-
server/api/cdr/cdr.rpc.js | 2 +-
server/api/cdr/index.js | 2 +-
.../chatApplication/chatApplication.attributes.js | 2 +-
.../chatApplication/chatApplication.controller.js | 2 +-
.../api/chatApplication/chatApplication.model.js | 2 +-
server/api/chatApplication/chatApplication.rpc.js | 2 +-
server/api/chatApplication/index.js | 2 +-
server/api/chatGroup/chatGroup.attributes.js | 2 +-
server/api/chatGroup/chatGroup.controller.js | 2 +-
server/api/chatGroup/chatGroup.events.js | 2 +-
server/api/chatGroup/chatGroup.model.js | 2 +-
server/api/chatGroup/chatGroup.rpc.js | 2 +-
server/api/chatGroup/chatGroup.socket.js | 2 +-
server/api/chatGroup/index.js | 2 +-
.../chatInteraction/chatInteraction.attributes.js | 2 +-
.../chatInteraction/chatInteraction.controller.js | 2 +-
.../api/chatInteraction/chatInteraction.events.js | 2 +-
.../api/chatInteraction/chatInteraction.model.js | 2 +-
server/api/chatInteraction/chatInteraction.rpc.js | 2 +-
.../api/chatInteraction/chatInteraction.socket.js | 2 +-
server/api/chatInteraction/index.js | 2 +-
.../chatInternalMessage.attributes.js | 2 +-
.../chatInternalMessage.controller.js | 2 +-
.../chatInternalMessage.events.js | 2 +-
.../chatInternalMessage.model.js | 2 +-
.../chatInternalMessage/chatInternalMessage.rpc.js | 2 +-
.../chatInternalMessage.socket.js | 2 +-
server/api/chatInternalMessage/index.js | 2 +-
server/api/chatMessage/chatMessage.attributes.js | 2 +-
server/api/chatMessage/chatMessage.controller.js | 2 +-
server/api/chatMessage/chatMessage.events.js | 2 +-
server/api/chatMessage/chatMessage.model.js | 2 +-
server/api/chatMessage/chatMessage.rpc.js | 2 +-
server/api/chatMessage/chatMessage.socket.js | 2 +-
server/api/chatMessage/index.js | 2 +-
.../chatOfflineMessage.attributes.js | 2 +-
.../chatOfflineMessage.controller.js | 2 +-
.../chatOfflineMessage.events.js | 2 +-
.../chatOfflineMessage/chatOfflineMessage.model.js | 2 +-
.../chatOfflineMessage/chatOfflineMessage.rpc.js | 2 +-
server/api/chatOfflineMessage/index.js | 2 +-
.../chatProactiveAction.attributes.js | 2 +-
.../chatProactiveAction.controller.js | 2 +-
.../chatProactiveAction.model.js | 2 +-
.../chatProactiveAction/chatProactiveAction.rpc.js | 2 +-
server/api/chatProactiveAction/index.js | 2 +-
server/api/chatQueue/chatQueue.attributes.js | 2 +-
server/api/chatQueue/chatQueue.controller.js | 2 +-
server/api/chatQueue/chatQueue.events.js | 2 +-
server/api/chatQueue/chatQueue.model.js | 2 +-
server/api/chatQueue/chatQueue.rpc.js | 2 +-
server/api/chatQueue/chatQueue.socket.js | 2 +-
server/api/chatQueue/index.js | 2 +-
.../chatQueueReport/chatQueueReport.attributes.js | 2 +-
.../chatQueueReport/chatQueueReport.controller.js | 2 +-
.../api/chatQueueReport/chatQueueReport.model.js | 2 +-
server/api/chatQueueReport/chatQueueReport.rpc.js | 2 +-
server/api/chatQueueReport/index.js | 2 +-
.../chatTransferReport.attributes.js | 2 +-
.../chatTransferReport.controller.js | 2 +-
.../chatTransferReport/chatTransferReport.model.js | 2 +-
.../chatTransferReport/chatTransferReport.rpc.js | 2 +-
server/api/chatTransferReport/index.js | 2 +-
server/api/chatWebsite/chatWebsite.attributes.js | 2 +-
server/api/chatWebsite/chatWebsite.controller.js | 2 +-
server/api/chatWebsite/chatWebsite.events.js | 2 +-
server/api/chatWebsite/chatWebsite.model.js | 2 +-
server/api/chatWebsite/chatWebsite.rpc.js | 2 +-
server/api/chatWebsite/chatWebsite.socket.js | 2 +-
.../chatWebsite/helpers/wildcard-expressions.js | 2 +-
server/api/chatWebsite/index.js | 2 +-
server/api/client-side-logs.js | 2 +-
.../api/cloudProvider/cloudProvider.attributes.js | 2 +-
.../api/cloudProvider/cloudProvider.controller.js | 2 +-
server/api/cloudProvider/cloudProvider.model.js | 2 +-
server/api/cloudProvider/cloudProvider.oauth.js | 2 +-
server/api/cloudProvider/cloudProvider.rpc.js | 2 +-
server/api/cloudProvider/index.js | 2 +-
server/api/cmCompany/cmCompany.attributes.js | 2 +-
server/api/cmCompany/cmCompany.controller.js | 2 +-
server/api/cmCompany/cmCompany.model.js | 2 +-
server/api/cmCompany/cmCompany.rpc.js | 2 +-
server/api/cmCompany/index.js | 2 +-
server/api/cmContact/cmContact.attributes.js | 2 +-
server/api/cmContact/cmContact.controller.js | 2 +-
server/api/cmContact/cmContact.events.js | 2 +-
server/api/cmContact/cmContact.model.js | 2 +-
server/api/cmContact/cmContact.rpc.js | 2 +-
server/api/cmContact/cmContact.socket.js | 2 +-
server/api/cmContact/index.js | 2 +-
.../cmContactHasItem.attributes.js | 2 +-
.../cmContactHasItem.controller.js | 2 +-
.../api/cmContactHasItem/cmContactHasItem.model.js | 2 +-
.../api/cmContactHasItem/cmContactHasItem.rpc.js | 2 +-
server/api/cmContactHasItem/index.js | 2 +-
.../api/cmCustomField/cmCustomField.attributes.js | 2 +-
.../api/cmCustomField/cmCustomField.controller.js | 2 +-
server/api/cmCustomField/cmCustomField.model.js | 2 +-
server/api/cmCustomField/cmCustomField.rpc.js | 2 +-
server/api/cmCustomField/index.js | 2 +-
server/api/cmHopper/cmHopper.attributes.js | 2 +-
server/api/cmHopper/cmHopper.controller.js | 2 +-
server/api/cmHopper/cmHopper.model.js | 2 +-
server/api/cmHopper/cmHopper.rpc.js | 2 +-
server/api/cmHopper/index.js | 2 +-
.../cmHopperAdditionalPhone.attributes.js | 2 +-
.../cmHopperAdditionalPhone.controller.js | 2 +-
.../cmHopperAdditionalPhone.model.js | 2 +-
.../cmHopperAdditionalPhone.rpc.js | 2 +-
server/api/cmHopperAdditionalPhone/index.js | 2 +-
.../api/cmHopperBlack/cmHopperBlack.attributes.js | 2 +-
.../api/cmHopperBlack/cmHopperBlack.controller.js | 2 +-
server/api/cmHopperBlack/cmHopperBlack.model.js | 2 +-
server/api/cmHopperBlack/cmHopperBlack.rpc.js | 2 +-
server/api/cmHopperBlack/index.js | 2 +-
.../api/cmHopperFinal/cmHopperFinal.attributes.js | 2 +-
.../api/cmHopperFinal/cmHopperFinal.controller.js | 2 +-
server/api/cmHopperFinal/cmHopperFinal.model.js | 2 +-
server/api/cmHopperFinal/cmHopperFinal.rpc.js | 2 +-
server/api/cmHopperFinal/index.js | 2 +-
.../cmHopperHistory/cmHopperHistory.attributes.js | 2 +-
.../cmHopperHistory/cmHopperHistory.controller.js | 2 +-
.../api/cmHopperHistory/cmHopperHistory.model.js | 2 +-
server/api/cmHopperHistory/cmHopperHistory.rpc.js | 2 +-
server/api/cmHopperHistory/index.js | 2 +-
server/api/cmList/cmList.attributes.js | 2 +-
server/api/cmList/cmList.controller.js | 2 +-
server/api/cmList/cmList.events.js | 2 +-
server/api/cmList/cmList.model.js | 2 +-
server/api/cmList/cmList.rpc.js | 2 +-
server/api/cmList/cmList.socket.js | 2 +-
server/api/cmList/index.js | 2 +-
server/api/condition/condition.attributes.js | 2 +-
server/api/condition/condition.controller.js | 2 +-
server/api/condition/condition.model.js | 2 +-
server/api/condition/condition.rpc.js | 2 +-
server/api/condition/index.js | 2 +-
.../contactItemType/contactItemType.attributes.js | 2 +-
.../contactItemType/contactItemType.controller.js | 2 +-
.../api/contactItemType/contactItemType.model.js | 2 +-
server/api/contactItemType/contactItemType.rpc.js | 2 +-
server/api/contactItemType/index.js | 2 +-
server/api/dashboard/dashboard.attributes.js | 2 +-
server/api/dashboard/dashboard.controller.js | 2 +-
server/api/dashboard/dashboard.events.js | 2 +-
server/api/dashboard/dashboard.model.js | 2 +-
server/api/dashboard/dashboard.rpc.js | 2 +-
server/api/dashboard/dashboard.socket.js | 2 +-
server/api/dashboard/index.js | 2 +-
.../api/dashboardItem/dashboardItem.attributes.js | 2 +-
.../api/dashboardItem/dashboardItem.controller.js | 2 +-
server/api/dashboardItem/dashboardItem.events.js | 2 +-
server/api/dashboardItem/dashboardItem.model.js | 2 +-
server/api/dashboardItem/dashboardItem.rpc.js | 2 +-
server/api/dashboardItem/dashboardItem.socket.js | 2 +-
server/api/dashboardItem/index.js | 2 +-
server/api/disposition/disposition.attributes.js | 2 +-
server/api/disposition/disposition.controller.js | 2 +-
server/api/disposition/disposition.model.js | 2 +-
server/api/disposition/disposition.rpc.js | 2 +-
server/api/disposition/index.js | 2 +-
server/api/faxAccount/faxAccount.attributes.js | 2 +-
server/api/faxAccount/faxAccount.controller.js | 2 +-
server/api/faxAccount/faxAccount.events.js | 2 +-
server/api/faxAccount/faxAccount.model.js | 2 +-
server/api/faxAccount/faxAccount.rpc.js | 2 +-
server/api/faxAccount/faxAccount.socket.js | 2 +-
server/api/faxAccount/index.js | 2 +-
.../faxApplication/faxApplication.attributes.js | 2 +-
.../faxApplication/faxApplication.controller.js | 2 +-
server/api/faxApplication/faxApplication.model.js | 2 +-
server/api/faxApplication/faxApplication.rpc.js | 2 +-
server/api/faxApplication/index.js | 2 +-
.../faxInteraction/faxInteraction.attributes.js | 2 +-
.../faxInteraction/faxInteraction.controller.js | 2 +-
server/api/faxInteraction/faxInteraction.events.js | 2 +-
server/api/faxInteraction/faxInteraction.model.js | 2 +-
server/api/faxInteraction/faxInteraction.rpc.js | 2 +-
server/api/faxInteraction/faxInteraction.socket.js | 2 +-
server/api/faxInteraction/index.js | 2 +-
server/api/faxMessage/faxMessage.attributes.js | 2 +-
server/api/faxMessage/faxMessage.controller.js | 2 +-
server/api/faxMessage/faxMessage.events.js | 2 +-
server/api/faxMessage/faxMessage.model.js | 2 +-
server/api/faxMessage/faxMessage.rpc.js | 2 +-
server/api/faxMessage/faxMessage.socket.js | 2 +-
server/api/faxMessage/index.js | 2 +-
server/api/faxQueue/faxQueue.attributes.js | 2 +-
server/api/faxQueue/faxQueue.controller.js | 2 +-
server/api/faxQueue/faxQueue.events.js | 2 +-
server/api/faxQueue/faxQueue.model.js | 2 +-
server/api/faxQueue/faxQueue.rpc.js | 2 +-
server/api/faxQueue/faxQueue.socket.js | 2 +-
server/api/faxQueue/index.js | 2 +-
.../faxQueueReport/faxQueueReport.attributes.js | 2 +-
.../faxQueueReport/faxQueueReport.controller.js | 2 +-
server/api/faxQueueReport/faxQueueReport.model.js | 2 +-
server/api/faxQueueReport/faxQueueReport.rpc.js | 2 +-
server/api/faxQueueReport/index.js | 2 +-
.../faxTransferReport.attributes.js | 2 +-
.../faxTransferReport.controller.js | 2 +-
.../faxTransferReport/faxTransferReport.model.js | 2 +-
.../api/faxTransferReport/faxTransferReport.rpc.js | 2 +-
server/api/faxTransferReport/index.js | 2 +-
server/api/intDeskAccount/index.js | 2 +-
.../intDeskAccount/intDeskAccount.attributes.js | 2 +-
.../intDeskAccount/intDeskAccount.controller.js | 2 +-
server/api/intDeskAccount/intDeskAccount.model.js | 2 +-
server/api/intDeskAccount/intDeskAccount.rpc.js | 2 +-
server/api/intDeskConfiguration/index.js | 2 +-
.../intDeskConfiguration.attributes.js | 2 +-
.../intDeskConfiguration.controller.js | 2 +-
.../intDeskConfiguration.model.js | 2 +-
.../intDeskConfiguration.rpc.js | 2 +-
server/api/intDeskField/index.js | 2 +-
server/api/intDeskField/intDeskField.attributes.js | 2 +-
server/api/intDeskField/intDeskField.controller.js | 2 +-
server/api/intDeskField/intDeskField.model.js | 2 +-
server/api/intDeskField/intDeskField.rpc.js | 2 +-
server/api/intDynamics365Account/index.js | 2 +-
.../intDynamics365Account.attributes.js | 2 +-
.../intDynamics365Account.controller.js | 2 +-
.../intDynamics365Account.model.js | 2 +-
.../intDynamics365Account.rpc.js | 2 +-
server/api/intDynamics365Configuration/index.js | 2 +-
.../intDynamics365Configuration.attributes.js | 2 +-
.../intDynamics365Configuration.controller.js | 2 +-
.../intDynamics365Configuration.model.js | 2 +-
.../intDynamics365Configuration.rpc.js | 2 +-
server/api/intDynamics365Field/index.js | 2 +-
.../intDynamics365Field.attributes.js | 2 +-
.../intDynamics365Field.controller.js | 2 +-
.../intDynamics365Field.model.js | 2 +-
.../intDynamics365Field/intDynamics365Field.rpc.js | 2 +-
server/api/intFreshdeskAccount/index.js | 2 +-
.../intFreshdeskAccount.attributes.js | 2 +-
.../intFreshdeskAccount.controller.js | 2 +-
.../intFreshdeskAccount.model.js | 2 +-
.../intFreshdeskAccount/intFreshdeskAccount.rpc.js | 2 +-
server/api/intFreshdeskConfiguration/index.js | 2 +-
.../intFreshdeskConfiguration.attributes.js | 2 +-
.../intFreshdeskConfiguration.controller.js | 2 +-
.../intFreshdeskConfiguration.model.js | 2 +-
.../intFreshdeskConfiguration.rpc.js | 2 +-
server/api/intFreshdeskField/index.js | 2 +-
.../intFreshdeskField.attributes.js | 2 +-
.../intFreshdeskField.controller.js | 2 +-
.../intFreshdeskField/intFreshdeskField.model.js | 2 +-
.../api/intFreshdeskField/intFreshdeskField.rpc.js | 2 +-
server/api/intFreshsalesAccount/index.js | 2 +-
.../intFreshsalesAccount.attributes.js | 2 +-
.../intFreshsalesAccount.controller.js | 2 +-
.../intFreshsalesAccount.model.js | 2 +-
.../intFreshsalesAccount.rpc.js | 2 +-
server/api/intFreshsalesConfiguration/index.js | 2 +-
.../intFreshsalesConfiguration.attributes.js | 2 +-
.../intFreshsalesConfiguration.controller.js | 2 +-
.../intFreshsalesConfiguration.model.js | 2 +-
.../intFreshsalesConfiguration.rpc.js | 2 +-
server/api/intFreshsalesField/index.js | 2 +-
.../intFreshsalesField.attributes.js | 2 +-
.../intFreshsalesField.controller.js | 2 +-
.../intFreshsalesField/intFreshsalesField.model.js | 2 +-
.../intFreshsalesField/intFreshsalesField.rpc.js | 2 +-
server/api/intSalesforceAccount/index.js | 2 +-
.../intSalesforceAccount.attributes.js | 2 +-
.../intSalesforceAccount.controller.js | 2 +-
.../intSalesforceAccount.model.js | 2 +-
.../intSalesforceAccount.rpc.js | 2 +-
server/api/intSalesforceConfiguration/index.js | 2 +-
.../intSalesforceConfiguration.attributes.js | 2 +-
.../intSalesforceConfiguration.controller.js | 2 +-
.../intSalesforceConfiguration.model.js | 2 +-
.../intSalesforceConfiguration.rpc.js | 2 +-
server/api/intSalesforceField/index.js | 2 +-
.../intSalesforceField.attributes.js | 2 +-
.../intSalesforceField.controller.js | 2 +-
.../intSalesforceField/intSalesforceField.model.js | 2 +-
.../intSalesforceField/intSalesforceField.rpc.js | 2 +-
server/api/intServicenowAccount/index.js | 2 +-
.../intServicenowAccount.attributes.js | 2 +-
.../intServicenowAccount.controller.js | 2 +-
.../intServicenowAccount.model.js | 2 +-
.../intServicenowAccount.rpc.js | 2 +-
server/api/intServicenowConfiguration/index.js | 2 +-
.../intServicenowConfiguration.attributes.js | 2 +-
.../intServicenowConfiguration.controller.js | 2 +-
.../intServicenowConfiguration.model.js | 2 +-
.../intServicenowConfiguration.rpc.js | 2 +-
server/api/intServicenowField/index.js | 2 +-
.../intServicenowField.attributes.js | 2 +-
.../intServicenowField.controller.js | 2 +-
.../intServicenowField/intServicenowField.model.js | 2 +-
.../intServicenowField/intServicenowField.rpc.js | 2 +-
server/api/intSugarcrmAccount/index.js | 2 +-
.../intSugarcrmAccount.attributes.js | 2 +-
.../intSugarcrmAccount.controller.js | 2 +-
.../intSugarcrmAccount/intSugarcrmAccount.model.js | 2 +-
.../intSugarcrmAccount/intSugarcrmAccount.rpc.js | 2 +-
server/api/intSugarcrmConfiguration/index.js | 2 +-
.../intSugarcrmConfiguration.attributes.js | 2 +-
.../intSugarcrmConfiguration.controller.js | 2 +-
.../intSugarcrmConfiguration.model.js | 2 +-
.../intSugarcrmConfiguration.rpc.js | 2 +-
server/api/intSugarcrmField/index.js | 2 +-
.../intSugarcrmField.attributes.js | 2 +-
.../intSugarcrmField.controller.js | 2 +-
.../api/intSugarcrmField/intSugarcrmField.model.js | 2 +-
.../api/intSugarcrmField/intSugarcrmField.rpc.js | 2 +-
server/api/intVtigerAccount/index.js | 2 +-
.../intVtigerAccount.attributes.js | 2 +-
.../intVtigerAccount.controller.js | 2 +-
.../api/intVtigerAccount/intVtigerAccount.model.js | 2 +-
.../api/intVtigerAccount/intVtigerAccount.rpc.js | 2 +-
server/api/intVtigerConfiguration/index.js | 2 +-
.../intVtigerConfiguration.attributes.js | 2 +-
.../intVtigerConfiguration.controller.js | 2 +-
.../intVtigerConfiguration.model.js | 2 +-
.../intVtigerConfiguration.rpc.js | 2 +-
server/api/intVtigerField/index.js | 2 +-
.../intVtigerField/intVtigerField.attributes.js | 2 +-
.../intVtigerField/intVtigerField.controller.js | 2 +-
server/api/intVtigerField/intVtigerField.model.js | 2 +-
server/api/intVtigerField/intVtigerField.rpc.js | 2 +-
server/api/intZendeskAccount/index.js | 2 +-
.../intZendeskAccount.attributes.js | 2 +-
.../intZendeskAccount.controller.js | 2 +-
.../intZendeskAccount/intZendeskAccount.model.js | 2 +-
.../api/intZendeskAccount/intZendeskAccount.rpc.js | 2 +-
server/api/intZendeskConfiguration/index.js | 2 +-
.../intZendeskConfiguration.attributes.js | 2 +-
.../intZendeskConfiguration.controller.js | 2 +-
.../intZendeskConfiguration.model.js | 2 +-
.../intZendeskConfiguration.rpc.js | 2 +-
server/api/intZendeskField/index.js | 2 +-
.../intZendeskField/intZendeskField.attributes.js | 2 +-
.../intZendeskField/intZendeskField.controller.js | 2 +-
.../api/intZendeskField/intZendeskField.model.js | 2 +-
server/api/intZendeskField/intZendeskField.rpc.js | 2 +-
server/api/intZohoAccount/index.js | 2 +-
.../intZohoAccount/intZohoAccount.attributes.js | 2 +-
.../intZohoAccount/intZohoAccount.controller.js | 2 +-
server/api/intZohoAccount/intZohoAccount.model.js | 2 +-
server/api/intZohoAccount/intZohoAccount.rpc.js | 2 +-
server/api/intZohoConfiguration/index.js | 2 +-
.../intZohoConfiguration.attributes.js | 2 +-
.../intZohoConfiguration.controller.js | 2 +-
.../intZohoConfiguration.model.js | 2 +-
.../intZohoConfiguration.rpc.js | 2 +-
server/api/intZohoField/index.js | 2 +-
server/api/intZohoField/intZohoField.attributes.js | 2 +-
server/api/intZohoField/intZohoField.controller.js | 2 +-
server/api/intZohoField/intZohoField.model.js | 2 +-
server/api/intZohoField/intZohoField.rpc.js | 2 +-
server/api/integration/index.js | 2 +-
server/api/integration/integration.attributes.js | 2 +-
server/api/integration/integration.controller.js | 2 +-
server/api/integration/integration.model.js | 2 +-
server/api/integration/integration.rpc.js | 2 +-
server/api/integrationReport/index.js | 2 +-
.../integrationReport.attributes.js | 2 +-
.../integrationReport.controller.js | 2 +-
.../integrationReport/integrationReport.model.js | 2 +-
.../api/integrationReport/integrationReport.rpc.js | 2 +-
server/api/interval/index.js | 2 +-
server/api/interval/interval.attributes.js | 2 +-
server/api/interval/interval.controller.js | 2 +-
server/api/interval/interval.model.js | 2 +-
server/api/interval/interval.rpc.js | 2 +-
server/api/jira/index.js | 2 +-
server/api/jira/jira.controller.js | 2 +-
server/api/jscriptyAnswerReport/index.js | 2 +-
.../jscriptyAnswerReport.attributes.js | 2 +-
.../jscriptyAnswerReport.controller.js | 2 +-
.../jscriptyAnswerReport.model.js | 2 +-
.../jscriptyAnswerReport.rpc.js | 2 +-
server/api/jscriptyProject/index.js | 2 +-
.../jscriptyProject/jscriptyProject.attributes.js | 2 +-
.../jscriptyProject/jscriptyProject.controller.js | 2 +-
.../api/jscriptyProject/jscriptyProject.model.js | 2 +-
server/api/jscriptyProject/jscriptyProject.rpc.js | 2 +-
server/api/jscriptyQuestionReport/index.js | 2 +-
.../jscriptyQuestionReport.attributes.js | 2 +-
.../jscriptyQuestionReport.controller.js | 2 +-
.../jscriptyQuestionReport.model.js | 2 +-
.../jscriptyQuestionReport.rpc.js | 2 +-
server/api/jscriptySessionReport/index.js | 2 +-
.../jscriptySessionReport.attributes.js | 2 +-
.../jscriptySessionReport.controller.js | 2 +-
.../jscriptySessionReport.model.js | 2 +-
.../jscriptySessionReport.rpc.js | 2 +-
server/api/license/index.js | 2 +-
server/api/license/license.attributes.js | 2 +-
server/api/license/license.controller.js | 2 +-
server/api/license/license.model.js | 2 +-
server/api/license/license.rpc.js | 2 +-
server/api/mailAccount/index.js | 2 +-
server/api/mailAccount/mailAccount.attributes.js | 2 +-
server/api/mailAccount/mailAccount.controller.js | 2 +-
server/api/mailAccount/mailAccount.events.js | 2 +-
server/api/mailAccount/mailAccount.model.js | 2 +-
server/api/mailAccount/mailAccount.rpc.js | 2 +-
server/api/mailAccount/mailAccount.socket.js | 2 +-
server/api/mailApplication/index.js | 2 +-
.../mailApplication/mailApplication.attributes.js | 2 +-
.../mailApplication/mailApplication.controller.js | 2 +-
.../api/mailApplication/mailApplication.model.js | 2 +-
server/api/mailApplication/mailApplication.rpc.js | 2 +-
server/api/mailInteraction/index.js | 2 +-
.../mailInteraction/mailInteraction.attributes.js | 2 +-
.../mailInteraction/mailInteraction.controller.js | 2 +-
.../api/mailInteraction/mailInteraction.events.js | 2 +-
.../api/mailInteraction/mailInteraction.model.js | 2 +-
server/api/mailInteraction/mailInteraction.rpc.js | 2 +-
.../api/mailInteraction/mailInteraction.socket.js | 2 +-
server/api/mailInteractionHasTag/index.js | 2 +-
.../mailInteractionHasTag.controller.js | 2 +-
.../mailInteractionHasTag/mailInteractionHasTag.js | 2 +-
.../mailInteractionHasTag.model.js | 2 +-
server/api/mailMessage/index.js | 2 +-
server/api/mailMessage/mailMessage.attributes.js | 2 +-
server/api/mailMessage/mailMessage.controller.js | 2 +-
server/api/mailMessage/mailMessage.events.js | 2 +-
server/api/mailMessage/mailMessage.model.js | 2 +-
server/api/mailMessage/mailMessage.rpc.js | 2 +-
server/api/mailMessage/mailMessage.socket.js | 2 +-
server/api/mailQueue/index.js | 2 +-
server/api/mailQueue/mailQueue.attributes.js | 2 +-
server/api/mailQueue/mailQueue.controller.js | 2 +-
server/api/mailQueue/mailQueue.events.js | 2 +-
server/api/mailQueue/mailQueue.model.js | 2 +-
server/api/mailQueue/mailQueue.rpc.js | 2 +-
server/api/mailQueue/mailQueue.socket.js | 2 +-
server/api/mailQueueReport/index.js | 2 +-
.../mailQueueReport/mailQueueReport.attributes.js | 2 +-
.../mailQueueReport/mailQueueReport.controller.js | 2 +-
.../api/mailQueueReport/mailQueueReport.model.js | 2 +-
server/api/mailQueueReport/mailQueueReport.rpc.js | 2 +-
server/api/mailServerIn/index.js | 2 +-
server/api/mailServerIn/mailServerIn.attributes.js | 2 +-
server/api/mailServerIn/mailServerIn.model.js | 2 +-
server/api/mailServerIn/mailServerIn.rpc.js | 2 +-
server/api/mailServerOut/index.js | 2 +-
.../api/mailServerOut/mailServerOut.attributes.js | 2 +-
.../api/mailServerOut/mailServerOut.controller.js | 2 +-
server/api/mailServerOut/mailServerOut.model.js | 2 +-
server/api/mailServerOut/mailServerOut.rpc.js | 2 +-
server/api/mailSubstatus/index.js | 2 +-
.../api/mailSubstatus/mailSubstatus.attributes.js | 2 +-
.../api/mailSubstatus/mailSubstatus.controller.js | 2 +-
server/api/mailSubstatus/mailSubstatus.events.js | 2 +-
server/api/mailSubstatus/mailSubstatus.model.js | 2 +-
server/api/mailSubstatus/mailSubstatus.rpc.js | 2 +-
server/api/mailTransferReport/index.js | 2 +-
.../mailTransferReport.attributes.js | 2 +-
.../mailTransferReport.controller.js | 2 +-
.../mailTransferReport/mailTransferReport.model.js | 2 +-
.../mailTransferReport/mailTransferReport.rpc.js | 2 +-
server/api/memberReport/index.js | 2 +-
server/api/memberReport/memberReport.attributes.js | 2 +-
server/api/memberReport/memberReport.controller.js | 2 +-
server/api/memberReport/memberReport.model.js | 2 +-
server/api/memberReport/memberReport.rpc.js | 2 +-
server/api/migration/index.js | 2 +-
server/api/migration/migration.attributes.js | 2 +-
server/api/migration/migration.controller.js | 2 +-
server/api/migration/migration.model.js | 2 +-
server/api/migration/migration.rpc.js | 2 +-
server/api/network/index.js | 2 +-
server/api/network/network.attributes.js | 2 +-
server/api/network/network.controller.js | 2 +-
server/api/network/network.model.js | 2 +-
server/api/network/network.rpc.js | 2 +-
server/api/openchannelAccount/index.js | 2 +-
.../openchannelAccount.attributes.js | 2 +-
.../openchannelAccount.controller.js | 2 +-
.../openchannelAccount.events.js | 2 +-
.../openchannelAccount/openchannelAccount.model.js | 2 +-
.../openchannelAccount/openchannelAccount.rpc.js | 2 +-
.../openchannelAccount.socket.js | 2 +-
server/api/openchannelApplication/index.js | 2 +-
.../openchannelApplication.attributes.js | 2 +-
.../openchannelApplication.controller.js | 2 +-
.../openchannelApplication.model.js | 2 +-
.../openchannelApplication.rpc.js | 2 +-
server/api/openchannelInteraction/index.js | 2 +-
.../openchannelInteraction.attributes.js | 2 +-
.../openchannelInteraction.controller.js | 2 +-
.../openchannelInteraction.events.js | 2 +-
.../openchannelInteraction.model.js | 2 +-
.../openchannelInteraction.rpc.js | 2 +-
.../openchannelInteraction.socket.js | 2 +-
server/api/openchannelMessage/index.js | 2 +-
.../openchannelMessage.attributes.js | 2 +-
.../openchannelMessage.controller.js | 2 +-
.../openchannelMessage.events.js | 2 +-
.../openchannelMessage/openchannelMessage.model.js | 2 +-
.../openchannelMessage/openchannelMessage.rpc.js | 2 +-
.../openchannelMessage.socket.js | 2 +-
server/api/openchannelQueue/index.js | 2 +-
.../openchannelQueue.attributes.js | 2 +-
.../openchannelQueue.controller.js | 2 +-
.../openchannelQueue/openchannelQueue.events.js | 2 +-
.../api/openchannelQueue/openchannelQueue.model.js | 2 +-
.../api/openchannelQueue/openchannelQueue.rpc.js | 2 +-
.../openchannelQueue/openchannelQueue.socket.js | 2 +-
server/api/openchannelQueueReport/index.js | 2 +-
.../openchannelQueueReport.attributes.js | 2 +-
.../openchannelQueueReport.controller.js | 2 +-
.../openchannelQueueReport.model.js | 2 +-
.../openchannelQueueReport.rpc.js | 2 +-
server/api/openchannelTransferReport/index.js | 2 +-
.../openchannelTransferReport.attributes.js | 2 +-
.../openchannelTransferReport.controller.js | 2 +-
.../openchannelTransferReport.model.js | 2 +-
.../openchannelTransferReport.rpc.js | 2 +-
server/api/pause/index.js | 2 +-
server/api/pause/pause.attributes.js | 2 +-
server/api/pause/pause.controller.js | 2 +-
server/api/pause/pause.model.js | 2 +-
server/api/pause/pause.rpc.js | 2 +-
server/api/plugin/index.js | 2 +-
server/api/plugin/plugin.attributes.js | 2 +-
server/api/plugin/plugin.controller.js | 2 +-
server/api/plugin/plugin.events.js | 2 +-
server/api/plugin/plugin.model.js | 2 +-
server/api/plugin/plugin.rpc.js | 2 +-
server/api/plugin/plugin.socket.js | 2 +-
server/api/pm2/index.js | 2 +-
server/api/pm2/pm2.controller.js | 2 +-
server/api/realtime/index.js | 2 +-
server/api/realtime/realtime.controller.js | 2 +-
server/api/reportAgentPreview/index.js | 2 +-
.../reportAgentPreview.attributes.js | 2 +-
.../reportAgentPreview/reportAgentPreview.model.js | 2 +-
.../reportAgentPreview/reportAgentPreview.rpc.js | 2 +-
server/api/rpc/index.js | 2 +-
server/api/rpc/rpc.controller.js | 2 +-
server/api/schedule/index.js | 2 +-
server/api/schedule/schedule.attributes.js | 2 +-
server/api/schedule/schedule.controller.js | 2 +-
server/api/schedule/schedule.model.js | 2 +-
server/api/schedule/schedule.rpc.js | 2 +-
server/api/screenRecording/index.js | 2 +-
.../screenRecording/screenRecording.attributes.js | 2 +-
.../screenRecording/screenRecording.controller.js | 2 +-
.../api/screenRecording/screenRecording.model.js | 2 +-
server/api/screenRecording/screenRecording.rpc.js | 2 +-
server/api/setting/index.js | 2 +-
server/api/setting/setting.attributes.js | 2 +-
server/api/setting/setting.controller.js | 2 +-
server/api/setting/setting.model.js | 2 +-
server/api/setting/setting.rpc.js | 2 +-
server/api/smsAccount/index.js | 2 +-
server/api/smsAccount/smsAccount.attributes.js | 2 +-
server/api/smsAccount/smsAccount.controller.js | 2 +-
server/api/smsAccount/smsAccount.events.js | 2 +-
server/api/smsAccount/smsAccount.model.js | 2 +-
server/api/smsAccount/smsAccount.rpc.js | 2 +-
server/api/smsAccount/smsAccount.socket.js | 2 +-
server/api/smsApplication/index.js | 2 +-
.../smsApplication/smsApplication.attributes.js | 2 +-
.../smsApplication/smsApplication.controller.js | 2 +-
server/api/smsApplication/smsApplication.model.js | 2 +-
server/api/smsApplication/smsApplication.rpc.js | 2 +-
server/api/smsInteraction/index.js | 2 +-
.../smsInteraction/smsInteraction.attributes.js | 2 +-
.../smsInteraction/smsInteraction.controller.js | 2 +-
server/api/smsInteraction/smsInteraction.events.js | 2 +-
server/api/smsInteraction/smsInteraction.model.js | 2 +-
server/api/smsInteraction/smsInteraction.rpc.js | 2 +-
server/api/smsInteraction/smsInteraction.socket.js | 2 +-
server/api/smsMessage/index.js | 2 +-
server/api/smsMessage/smsMessage.attributes.js | 2 +-
server/api/smsMessage/smsMessage.controller.js | 2 +-
server/api/smsMessage/smsMessage.events.js | 2 +-
server/api/smsMessage/smsMessage.model.js | 2 +-
server/api/smsMessage/smsMessage.rpc.js | 2 +-
server/api/smsMessage/smsMessage.socket.js | 2 +-
server/api/smsQueue/index.js | 2 +-
server/api/smsQueue/smsQueue.attributes.js | 2 +-
server/api/smsQueue/smsQueue.controller.js | 2 +-
server/api/smsQueue/smsQueue.events.js | 2 +-
server/api/smsQueue/smsQueue.model.js | 2 +-
server/api/smsQueue/smsQueue.rpc.js | 2 +-
server/api/smsQueue/smsQueue.socket.js | 2 +-
server/api/smsQueueReport/index.js | 2 +-
.../smsQueueReport/smsQueueReport.attributes.js | 2 +-
.../smsQueueReport/smsQueueReport.controller.js | 2 +-
server/api/smsQueueReport/smsQueueReport.model.js | 2 +-
server/api/smsQueueReport/smsQueueReport.rpc.js | 2 +-
server/api/smsTransferReport/index.js | 2 +-
.../smsTransferReport.attributes.js | 2 +-
.../smsTransferReport.controller.js | 2 +-
.../smsTransferReport/smsTransferReport.model.js | 2 +-
.../api/smsTransferReport/smsTransferReport.rpc.js | 2 +-
server/api/sound/index.js | 2 +-
server/api/sound/sound.attributes.js | 2 +-
server/api/sound/sound.controller.js | 2 +-
server/api/sound/sound.model.js | 2 +-
server/api/sound/sound.rpc.js | 2 +-
server/api/squareMessage/index.js | 2 +-
.../api/squareMessage/squareMessage.attributes.js | 2 +-
.../api/squareMessage/squareMessage.controller.js | 2 +-
server/api/squareMessage/squareMessage.model.js | 2 +-
server/api/squareMessage/squareMessage.rpc.js | 2 +-
server/api/squareOdbc/index.js | 2 +-
server/api/squareOdbc/squareOdbc.attributes.js | 2 +-
server/api/squareOdbc/squareOdbc.controller.js | 2 +-
server/api/squareOdbc/squareOdbc.model.js | 2 +-
server/api/squareOdbc/squareOdbc.rpc.js | 2 +-
server/api/squareProject/index.js | 2 +-
.../api/squareProject/squareProject.attributes.js | 2 +-
.../api/squareProject/squareProject.controller.js | 2 +-
server/api/squareProject/squareProject.events.js | 2 +-
server/api/squareProject/squareProject.model.js | 2 +-
server/api/squareProject/squareProject.rpc.js | 2 +-
server/api/squareProject/squareProject.socket.js | 2 +-
server/api/squareRecording/index.js | 2 +-
.../squareRecording/squareRecording.attributes.js | 2 +-
.../squareRecording/squareRecording.controller.js | 2 +-
.../api/squareRecording/squareRecording.model.js | 2 +-
server/api/squareRecording/squareRecording.rpc.js | 2 +-
server/api/squareReport/index.js | 2 +-
server/api/squareReport/squareReport.attributes.js | 2 +-
server/api/squareReport/squareReport.controller.js | 2 +-
server/api/squareReport/squareReport.model.js | 2 +-
server/api/squareReport/squareReport.rpc.js | 2 +-
server/api/squareReportDetail/index.js | 2 +-
.../squareReportDetail.attributes.js | 2 +-
.../squareReportDetail.controller.js | 2 +-
.../squareReportDetail/squareReportDetail.model.js | 2 +-
.../squareReportDetail/squareReportDetail.rpc.js | 2 +-
server/api/system/index.js | 2 +-
server/api/system/system.controller.js | 2 +-
server/api/tag/index.js | 2 +-
server/api/tag/tag.attributes.js | 2 +-
server/api/tag/tag.controller.js | 2 +-
server/api/tag/tag.model.js | 2 +-
server/api/tag/tag.rpc.js | 2 +-
server/api/team/index.js | 2 +-
server/api/team/team.attributes.js | 2 +-
server/api/team/team.controller.js | 2 +-
server/api/team/team.events.js | 2 +-
server/api/team/team.model.js | 2 +-
server/api/team/team.rpc.js | 2 +-
server/api/team/team.socket.js | 2 +-
.../teamVoicePrefix/teamVoicePrefix.attributes.js | 2 +-
.../api/teamVoicePrefix/teamVoicePrefix.model.js | 2 +-
server/api/teamVoiceQueue/index.js | 2 +-
.../teamVoiceQueue/teamVoiceQueue.attributes.js | 2 +-
server/api/teamVoiceQueue/teamVoiceQueue.model.js | 2 +-
server/api/teamVoiceQueue/teamVoiceQueue.rpc.js | 2 +-
server/api/template/index.js | 2 +-
server/api/template/template.attributes.js | 2 +-
server/api/template/template.controller.js | 2 +-
server/api/template/template.model.js | 2 +-
server/api/template/template.rpc.js | 2 +-
server/api/trigger/index.js | 2 +-
server/api/trigger/trigger.attributes.js | 2 +-
server/api/trigger/trigger.controller.js | 2 +-
server/api/trigger/trigger.model.js | 2 +-
server/api/trigger/trigger.rpc.js | 2 +-
server/api/trunk/index.js | 2 +-
server/api/trunk/trunk.attributes.js | 2 +-
server/api/trunk/trunk.controller.js | 2 +-
server/api/trunk/trunk.model.js | 2 +-
server/api/trunk/trunk.rpc.js | 2 +-
server/api/user-setting/index.js | 2 +-
server/api/user-setting/user-setting.attributes.js | 2 +-
server/api/user-setting/user-setting.controller.js | 2 +-
server/api/user-setting/user-setting.events.js | 2 +-
server/api/user-setting/user-setting.model.js | 2 +-
server/api/user-setting/user-setting.socket.js | 2 +-
server/api/user/index.js | 2 +-
server/api/user/user.attributes.js | 2 +-
server/api/user/user.controller.js | 2 +-
server/api/user/user.events.js | 2 +-
server/api/user/user.model.js | 2 +-
server/api/user/user.rpc.js | 2 +-
server/api/user/user.socket.js | 2 +-
server/api/userChatQueue/index.js | 2 +-
.../api/userChatQueue/userChatQueue.attributes.js | 2 +-
server/api/userChatQueue/userChatQueue.model.js | 2 +-
server/api/userChatQueue/userChatQueue.rpc.js | 2 +-
server/api/userFaxQueue/index.js | 2 +-
server/api/userFaxQueue/userFaxQueue.attributes.js | 2 +-
server/api/userFaxQueue/userFaxQueue.model.js | 2 +-
server/api/userFaxQueue/userFaxQueue.rpc.js | 2 +-
server/api/userMailQueue/index.js | 2 +-
.../api/userMailQueue/userMailQueue.attributes.js | 2 +-
server/api/userMailQueue/userMailQueue.model.js | 2 +-
server/api/userMailQueue/userMailQueue.rpc.js | 2 +-
server/api/userNotification/index.js | 2 +-
.../userNotification.attributes.js | 2 +-
.../userNotification.controller.js | 2 +-
.../userNotification/userNotification.events.js | 2 +-
.../api/userNotification/userNotification.model.js | 2 +-
.../api/userNotification/userNotification.rpc.js | 2 +-
.../userNotification/userNotification.socket.js | 2 +-
server/api/userOpenchannelQueue/index.js | 2 +-
.../userOpenchannelQueue.attributes.js | 2 +-
.../userOpenchannelQueue.model.js | 2 +-
.../userOpenchannelQueue.rpc.js | 2 +-
server/api/userProfile/index.js | 2 +-
server/api/userProfile/userProfile.attributes.js | 2 +-
server/api/userProfile/userProfile.controller.js | 2 +-
server/api/userProfile/userProfile.events.js | 2 +-
server/api/userProfile/userProfile.model.js | 2 +-
server/api/userProfile/userProfile.rpc.js | 2 +-
server/api/userProfile/userProfile.socket.js | 2 +-
server/api/userProfileResource/index.js | 2 +-
.../userProfileResource.attributes.js | 2 +-
.../userProfileResource.controller.js | 2 +-
.../userProfileResource.model.js | 2 +-
.../userProfileResource/userProfileResource.rpc.js | 2 +-
server/api/userProfileSection/index.js | 2 +-
.../userProfileSection.attributes.js | 2 +-
.../userProfileSection.controller.js | 2 +-
.../userProfileSection/userProfileSection.model.js | 2 +-
.../userProfileSection/userProfileSection.rpc.js | 2 +-
server/api/userSmsQueue/index.js | 2 +-
server/api/userSmsQueue/userSmsQueue.attributes.js | 2 +-
server/api/userSmsQueue/userSmsQueue.model.js | 2 +-
server/api/userSmsQueue/userSmsQueue.rpc.js | 2 +-
.../userVoicePrefix/userVoicePrefix.attributes.js | 2 +-
.../api/userVoicePrefix/userVoicePrefix.model.js | 2 +-
server/api/userVoiceQueue/index.js | 2 +-
.../userVoiceQueue/userVoiceQueue.attributes.js | 2 +-
server/api/userVoiceQueue/userVoiceQueue.model.js | 2 +-
server/api/userVoiceQueue/userVoiceQueue.rpc.js | 2 +-
server/api/userVoiceQueueRt/index.js | 2 +-
.../userVoiceQueueRt.attributes.js | 2 +-
.../userVoiceQueueRt/userVoiceQueueRt.events.js | 2 +-
.../api/userVoiceQueueRt/userVoiceQueueRt.model.js | 2 +-
.../api/userVoiceQueueRt/userVoiceQueueRt.rpc.js | 2 +-
.../userVoiceQueueRt/userVoiceQueueRt.socket.js | 2 +-
server/api/userWhatsappQueue/index.js | 2 +-
.../userWhatsappQueue.attributes.js | 2 +-
.../userWhatsappQueue/userWhatsappQueue.model.js | 2 +-
.../api/userWhatsappQueue/userWhatsappQueue.rpc.js | 2 +-
server/api/variable/index.js | 2 +-
server/api/variable/variable.attributes.js | 2 +-
server/api/variable/variable.controller.js | 2 +-
server/api/variable/variable.model.js | 2 +-
server/api/variable/variable.rpc.js | 2 +-
server/api/version/index.js | 2 +-
server/api/version/version.controller.js | 2 +-
server/api/voiceAgentReport/index.js | 2 +-
.../voiceAgentReport.attributes.js | 2 +-
.../voiceAgentReport.controller.js | 2 +-
.../api/voiceAgentReport/voiceAgentReport.model.js | 2 +-
.../api/voiceAgentReport/voiceAgentReport.rpc.js | 2 +-
server/api/voiceCallReport/index.js | 2 +-
.../voiceCallReport/voiceCallReport.attributes.js | 2 +-
.../voiceCallReport/voiceCallReport.controller.js | 2 +-
.../api/voiceCallReport/voiceCallReport.model.js | 2 +-
server/api/voiceCallReport/voiceCallReport.rpc.js | 2 +-
server/api/voiceChanSpy/index.js | 2 +-
server/api/voiceChanSpy/voiceChanSpy.attributes.js | 2 +-
server/api/voiceChanSpy/voiceChanSpy.controller.js | 2 +-
server/api/voiceChanSpy/voiceChanSpy.model.js | 2 +-
server/api/voiceChanSpy/voiceChanSpy.rpc.js | 2 +-
server/api/voiceContext/index.js | 2 +-
server/api/voiceContext/voiceContext.attributes.js | 2 +-
server/api/voiceContext/voiceContext.controller.js | 2 +-
server/api/voiceContext/voiceContext.model.js | 2 +-
server/api/voiceContext/voiceContext.rpc.js | 2 +-
server/api/voiceDialReport/index.js | 2 +-
.../voiceDialReport/voiceDialReport.attributes.js | 2 +-
.../voiceDialReport/voiceDialReport.controller.js | 2 +-
.../api/voiceDialReport/voiceDialReport.model.js | 2 +-
server/api/voiceDialReport/voiceDialReport.rpc.js | 2 +-
server/api/voiceExtension/index.js | 2 +-
.../voiceExtension/voiceExtension.attributes.js | 2 +-
.../voiceExtension/voiceExtension.controller.js | 2 +-
server/api/voiceExtension/voiceExtension.events.js | 2 +-
server/api/voiceExtension/voiceExtension.model.js | 2 +-
server/api/voiceExtension/voiceExtension.rpc.js | 2 +-
server/api/voiceExtension/voiceExtension.socket.js | 2 +-
server/api/voiceMail/index.js | 2 +-
server/api/voiceMail/voiceMail.attributes.js | 2 +-
server/api/voiceMail/voiceMail.controller.js | 2 +-
server/api/voiceMail/voiceMail.model.js | 2 +-
server/api/voiceMail/voiceMail.rpc.js | 2 +-
server/api/voiceMailMessage/index.js | 2 +-
.../voiceMailMessage.attributes.js | 2 +-
.../voiceMailMessage.controller.js | 2 +-
.../api/voiceMailMessage/voiceMailMessage.model.js | 2 +-
.../api/voiceMailMessage/voiceMailMessage.rpc.js | 2 +-
server/api/voiceMusicOnHold/index.js | 2 +-
.../voiceMusicOnHold.attributes.js | 2 +-
.../voiceMusicOnHold.controller.js | 2 +-
.../api/voiceMusicOnHold/voiceMusicOnHold.model.js | 2 +-
.../api/voiceMusicOnHold/voiceMusicOnHold.rpc.js | 2 +-
server/api/voicePrefix/index.js | 2 +-
server/api/voicePrefix/voicePrefix.attributes.js | 2 +-
server/api/voicePrefix/voicePrefix.controller.js | 2 +-
server/api/voicePrefix/voicePrefix.events.js | 2 +-
server/api/voicePrefix/voicePrefix.model.js | 2 +-
server/api/voicePrefix/voicePrefix.rpc.js | 2 +-
server/api/voicePrefix/voicePrefix.socket.js | 2 +-
server/api/voiceQueue/index.js | 2 +-
server/api/voiceQueue/voiceQueue.attributes.js | 2 +-
server/api/voiceQueue/voiceQueue.controller.js | 2 +-
server/api/voiceQueue/voiceQueue.events.js | 2 +-
server/api/voiceQueue/voiceQueue.model.js | 2 +-
server/api/voiceQueue/voiceQueue.rpc.js | 2 +-
server/api/voiceQueue/voiceQueue.socket.js | 2 +-
server/api/voiceQueueReport/index.js | 2 +-
.../voiceQueueReport.attributes.js | 2 +-
.../voiceQueueReport.controller.js | 2 +-
.../voiceQueueReport/voiceQueueReport.events.js | 2 +-
.../api/voiceQueueReport/voiceQueueReport.model.js | 2 +-
.../api/voiceQueueReport/voiceQueueReport.rpc.js | 2 +-
.../voiceQueueReport/voiceQueueReport.socket.js | 2 +-
server/api/voiceQueuesLog/index.js | 2 +-
.../voiceQueuesLog/voiceQueuesLog.attributes.js | 2 +-
.../voiceQueuesLog/voiceQueuesLog.controller.js | 2 +-
server/api/voiceQueuesLog/voiceQueuesLog.model.js | 2 +-
server/api/voiceQueuesLog/voiceQueuesLog.rpc.js | 2 +-
server/api/voiceRecording/index.js | 2 +-
.../voiceRecording/voiceRecording.attributes.js | 2 +-
.../voiceRecording/voiceRecording.controller.js | 2 +-
server/api/voiceRecording/voiceRecording.model.js | 2 +-
server/api/voiceRecording/voiceRecording.rpc.js | 2 +-
server/api/voiceTransferReport/index.js | 2 +-
.../voiceTransferReport.attributes.js | 2 +-
.../voiceTransferReport.controller.js | 2 +-
.../voiceTransferReport.model.js | 2 +-
.../voiceTransferReport/voiceTransferReport.rpc.js | 2 +-
server/api/webbar/index.js | 2 +-
server/api/webbar/webbar.controller.js | 2 +-
server/api/whatsappAccount/index.js | 2 +-
.../whatsappAccount/whatsappAccount.attributes.js | 2 +-
.../whatsappAccount/whatsappAccount.controller.js | 2 +-
.../api/whatsappAccount/whatsappAccount.events.js | 2 +-
.../api/whatsappAccount/whatsappAccount.model.js | 2 +-
server/api/whatsappAccount/whatsappAccount.rpc.js | 2 +-
.../api/whatsappAccount/whatsappAccount.socket.js | 2 +-
server/api/whatsappApplication/index.js | 2 +-
.../whatsappApplication.attributes.js | 2 +-
.../whatsappApplication.controller.js | 2 +-
.../whatsappApplication.model.js | 2 +-
.../whatsappApplication/whatsappApplication.rpc.js | 2 +-
server/api/whatsappInteraction/index.js | 2 +-
.../whatsappInteraction.attributes.js | 2 +-
.../whatsappInteraction.controller.js | 2 +-
.../whatsappInteraction.events.js | 2 +-
.../whatsappInteraction.model.js | 2 +-
.../whatsappInteraction/whatsappInteraction.rpc.js | 2 +-
.../whatsappInteraction.socket.js | 2 +-
server/api/whatsappMessage/index.js | 2 +-
.../whatsappMessage/whatsappMessage.attributes.js | 2 +-
.../whatsappMessage/whatsappMessage.controller.js | 2 +-
.../api/whatsappMessage/whatsappMessage.events.js | 2 +-
.../api/whatsappMessage/whatsappMessage.model.js | 2 +-
server/api/whatsappMessage/whatsappMessage.rpc.js | 2 +-
.../api/whatsappMessage/whatsappMessage.socket.js | 2 +-
server/api/whatsappQueue/index.js | 2 +-
.../api/whatsappQueue/whatsappQueue.attributes.js | 2 +-
.../api/whatsappQueue/whatsappQueue.controller.js | 2 +-
server/api/whatsappQueue/whatsappQueue.events.js | 2 +-
server/api/whatsappQueue/whatsappQueue.model.js | 2 +-
server/api/whatsappQueue/whatsappQueue.rpc.js | 2 +-
server/api/whatsappQueue/whatsappQueue.socket.js | 2 +-
server/api/whatsappQueueReport/index.js | 2 +-
.../whatsappQueueReport.attributes.js | 2 +-
.../whatsappQueueReport.controller.js | 2 +-
.../whatsappQueueReport.model.js | 2 +-
.../whatsappQueueReport/whatsappQueueReport.rpc.js | 2 +-
server/api/whatsappTransferReport/index.js | 2 +-
.../whatsappTransferReport.attributes.js | 2 +-
.../whatsappTransferReport.controller.js | 2 +-
.../whatsappTransferReport.model.js | 2 +-
.../whatsappTransferReport.rpc.js | 2 +-
server/app.js | 2 +-
server/components/auth/service.js | 2 +-
server/components/contacts/index.js | 2 +-
server/components/contacts/sql-utils.js | 2 +-
server/components/encryptor/index.js | 2 +-
server/components/export/csv.js | 2 +-
server/components/export/pdf.js | 2 +-
server/components/export/xlsx.js | 2 +-
server/components/extensions/rewrite.js | 2 +-
server/components/import/cm/csv.js | 2 +-
server/components/import/cm/csv2.js | 2 +-
server/components/import/cm/csvUpdates.js | 2 +-
server/components/integrations/configuration.js | 2 +-
server/components/interaction/accept-message.js | 2 +-
server/components/interaction/service.js | 2 +-
server/components/interaction/sql-utils.js | 2 +-
.../components/interaction/update-interaction.js | 2 +-
server/components/interaction/utils.js | 2 +-
server/components/license/service.js | 2 +-
server/components/parsers/advancedSearch.js | 2 +-
server/components/parsers/qs.js | 2 +-
server/components/realtime/agents.js | 2 +-
server/components/realtime/queues.js | 2 +-
server/config/express.js | 2 +-
server/config/license/hardware.js | 2 +-
server/config/license/index.js | 2 +-
server/config/license/util.js | 2 +-
server/config/local.env.js | 2 +-
server/config/logger.js | 2 +-
server/config/pm2/config.js | 2 +-
server/config/pm2/index.js | 2 +-
server/config/schedule/chat.js | 2 +-
server/config/schedule/cloud-provider.js | 2 +-
server/config/schedule/index.js | 2 +-
server/config/schedule/transcribe.js | 2 +-
server/config/schedule/whatsapp.js | 2 +-
server/config/seedContact.js | 2 +-
server/config/seedUsers.js | 2 +-
server/config/socketio.js | 2 +-
server/config/triggers/index.js | 2 +-
server/config/utils.js | 2 +-
server/errors/api.js | 2 +-
server/errors/index.js | 2 +-
server/mysqldb/index.js | 2 +-
server/routes.js | 2 +-
server/rpc/index.js | 2 +-
server/services/agi/channel.js | 2 +-
server/services/agi/error.js | 2 +-
server/services/agi/events.js | 2 +-
server/services/agi/graph/index.js | 2 +-
server/services/agi/index.js | 2 +-
server/services/agi/mailRpc/index.js | 2 +-
server/services/agi/project.js | 2 +-
server/services/agi/reply.js | 2 +-
server/services/agi/rpc/index.js | 2 +-
server/services/agi/scripts/aws/index.js | 2 +-
server/services/agi/scripts/aws/lex/index.js | 2 +-
server/services/agi/scripts/aws/lex/lib/api.js | 2 +-
server/services/agi/scripts/aws/polly/index.js | 2 +-
server/services/agi/scripts/aws/polly/lib/api.js | 2 +-
server/services/agi/scripts/google/asr/index.js | 2 +-
server/services/agi/scripts/google/asr/lib/api.js | 2 +-
server/services/agi/scripts/google/index.js | 2 +-
server/services/agi/scripts/index.js | 2 +-
server/services/agi/scripts/sestek/index.js | 2 +-
server/services/agi/scripts/sestek/nda/index.js | 2 +-
server/services/agi/scripts/tilde/asr/index.js | 2 +-
server/services/agi/scripts/tilde/asr/lib/api.js | 2 +-
server/services/agi/scripts/tilde/index.js | 2 +-
server/services/agi/server.js | 2 +-
server/services/agi/vertices.js | 2 +-
server/services/ami/acw/index.js | 2 +-
server/services/ami/ami.js | 2 +-
server/services/ami/client.js | 2 +-
server/services/ami/dialer/index.js | 2 +-
server/services/ami/dialer/models/action.js | 2 +-
server/services/ami/dialer/models/agentComplete.js | 2 +-
server/services/ami/dialer/models/final.js | 2 +-
server/services/ami/dialer/models/hangup.js | 2 +-
server/services/ami/dialer/models/history.js | 2 +-
.../ami/dialer/models/queueCallerAbandon.js | 2 +-
server/services/ami/dialer/utils/hopper.js | 2 +-
server/services/ami/dialer/utils/index.js | 2 +-
server/services/ami/fax/action.js | 2 +-
server/services/ami/fax/index.js | 2 +-
server/services/ami/fax/rpcDb.js | 2 +-
server/services/ami/fax/util/gs.js | 2 +-
server/services/ami/fax/util/util.js | 2 +-
server/services/ami/index.js | 2 +-
server/services/ami/model/agent.js | 2 +-
server/services/ami/model/campaign.js | 2 +-
server/services/ami/model/channel.js | 2 +-
server/services/ami/model/deskAccount.js | 2 +-
server/services/ami/model/dynamics365Account.js | 2 +-
server/services/ami/model/faxAccount.js | 2 +-
server/services/ami/model/freshdeskAccount.js | 2 +-
server/services/ami/model/freshsalesAccount.js | 2 +-
server/services/ami/model/queueReport.js | 2 +-
server/services/ami/model/salesforceAccount.js | 2 +-
server/services/ami/model/servicenowAccount.js | 2 +-
server/services/ami/model/sugarcrmAccount.js | 2 +-
server/services/ami/model/telephone.js | 2 +-
server/services/ami/model/template.js | 2 +-
server/services/ami/model/trigger.js | 2 +-
server/services/ami/model/trunk.js | 2 +-
server/services/ami/model/voiceExtension.js | 2 +-
server/services/ami/model/voiceQueue.js | 2 +-
server/services/ami/model/voiceQueueSummary.js | 2 +-
server/services/ami/model/vtigerAccount.js | 2 +-
server/services/ami/model/zendeskAccount.js | 2 +-
server/services/ami/model/zohoAccount.js | 2 +-
server/services/ami/preview/action.js | 2 +-
server/services/ami/preview/index.js | 2 +-
server/services/ami/preview/rpcDb.js | 2 +-
server/services/ami/preview/util/util.js | 2 +-
server/services/ami/properties.js | 2 +-
server/services/ami/realtime/index.js | 2 +-
server/services/ami/realtime/utils.js | 2 +-
server/services/ami/report/index.js | 2 +-
server/services/ami/report/userReport.js | 2 +-
server/services/ami/report/voiceAgentReport.js | 2 +-
server/services/ami/report/voiceCallReport.js | 2 +-
server/services/ami/report/voiceDialReport.js | 2 +-
server/services/ami/report/voiceQueueReport.js | 2 +-
server/services/ami/rpc/agentReportPreview.js | 2 +-
server/services/ami/rpc/attachment.js | 2 +-
server/services/ami/rpc/campaign.js | 2 +-
server/services/ami/rpc/cmContact.js | 2 +-
server/services/ami/rpc/cmHopper.js | 2 +-
server/services/ami/rpc/cmHopperAdditionalPhone.js | 2 +-
server/services/ami/rpc/cmHopperBlack.js | 2 +-
server/services/ami/rpc/cmHopperFinal.js | 2 +-
server/services/ami/rpc/cmHopperHistory.js | 2 +-
server/services/ami/rpc/faxAccount.js | 2 +-
server/services/ami/rpc/faxMessage.js | 2 +-
server/services/ami/rpc/integrations/desk.js | 2 +-
.../services/ami/rpc/integrations/dynamics365.js | 2 +-
server/services/ami/rpc/integrations/freshdesk.js | 2 +-
server/services/ami/rpc/integrations/freshsales.js | 2 +-
server/services/ami/rpc/integrations/salesforce.js | 2 +-
server/services/ami/rpc/integrations/servicenow.js | 2 +-
server/services/ami/rpc/integrations/sugarcrm.js | 2 +-
server/services/ami/rpc/integrations/vtiger.js | 2 +-
server/services/ami/rpc/integrations/zendesk.js | 2 +-
server/services/ami/rpc/integrations/zoho.js | 2 +-
server/services/ami/rpc/interval.js | 2 +-
server/services/ami/rpc/memberReport.js | 2 +-
server/services/ami/rpc/setting.js | 2 +-
server/services/ami/rpc/template.js | 2 +-
server/services/ami/rpc/trigger.js | 2 +-
server/services/ami/rpc/trunk.js | 2 +-
server/services/ami/rpc/user.js | 2 +-
server/services/ami/rpc/voiceAgentReport.js | 2 +-
server/services/ami/rpc/voiceCallReport.js | 2 +-
server/services/ami/rpc/voiceDialReport.js | 2 +-
server/services/ami/rpc/voiceExtension.js | 2 +-
server/services/ami/rpc/voiceQueue.js | 2 +-
server/services/ami/rpc/voiceQueueReport.js | 2 +-
server/services/ami/rpc/voiceQueueRt.js | 2 +-
server/services/ami/rpc/voiceRecording.js | 2 +-
server/services/ami/rpc/voiceTransferReport.js | 2 +-
server/services/ami/server/index.js | 2 +-
server/services/ami/trigger/cmContact/index.js | 2 +-
server/services/ami/trigger/index.js | 2 +-
server/services/ami/trigger/integration/desk.js | 2 +-
.../ami/trigger/integration/dynamics365.js | 2 +-
.../services/ami/trigger/integration/freshdesk.js | 2 +-
.../services/ami/trigger/integration/freshsales.js | 2 +-
server/services/ami/trigger/integration/index.js | 2 +-
.../services/ami/trigger/integration/salesforce.js | 2 +-
.../services/ami/trigger/integration/servicenow.js | 2 +-
.../services/ami/trigger/integration/sugarcrm.js | 2 +-
server/services/ami/trigger/integration/util.js | 2 +-
server/services/ami/trigger/integration/vtiger.js | 2 +-
server/services/ami/trigger/integration/zendesk.js | 2 +-
server/services/ami/trigger/integration/zoho.js | 2 +-
server/services/ami/trigger/script/index.js | 2 +-
server/services/ami/trigger/urlforward/index.js | 2 +-
server/services/email/client.js | 2 +-
server/services/email/index.js | 2 +-
server/services/email/lib/email.js | 2 +-
server/services/email/lib/imap.js | 2 +-
server/services/email/lib/smtp.js | 2 +-
server/services/email/lib/utils.js | 2 +-
server/services/email/model/mailAccount.js | 2 +-
server/services/email/realtime/index.js | 2 +-
server/services/email/rpc/mailAccount.js | 2 +-
server/services/email/rpc/setting.js | 2 +-
server/services/email/server/index.js | 2 +-
server/services/express/index.js | 2 +-
server/services/routing/client.js | 2 +-
server/services/routing/index.js | 2 +-
server/services/routing/lib/rule-engine.js | 2 +-
server/services/routing/mailRpc/index.js | 2 +-
server/services/routing/model/agent.js | 2 +-
server/services/routing/model/chatQueue.js | 2 +-
server/services/routing/model/faxQueue.js | 2 +-
server/services/routing/model/interval.js | 2 +-
server/services/routing/model/mailQueue.js | 2 +-
server/services/routing/model/openchannelQueue.js | 2 +-
server/services/routing/model/smsQueue.js | 2 +-
server/services/routing/model/whatsappQueue.js | 2 +-
server/services/routing/realtime/index.js | 2 +-
server/services/routing/rpc/chatInteraction.js | 2 +-
server/services/routing/rpc/chatMessage.js | 2 +-
server/services/routing/rpc/chatQueue.js | 2 +-
server/services/routing/rpc/chatQueueReport.js | 2 +-
server/services/routing/rpc/faxInteraction.js | 2 +-
server/services/routing/rpc/faxMessage.js | 2 +-
server/services/routing/rpc/faxQueue.js | 2 +-
server/services/routing/rpc/faxQueueReport.js | 2 +-
server/services/routing/rpc/interval.js | 2 +-
server/services/routing/rpc/mailInteraction.js | 2 +-
server/services/routing/rpc/mailMessage.js | 2 +-
server/services/routing/rpc/mailQueue.js | 2 +-
server/services/routing/rpc/mailQueueReport.js | 2 +-
.../services/routing/rpc/openchannelInteraction.js | 2 +-
server/services/routing/rpc/openchannelMessage.js | 2 +-
server/services/routing/rpc/openchannelQueue.js | 2 +-
.../services/routing/rpc/openchannelQueueReport.js | 2 +-
server/services/routing/rpc/smsInteraction.js | 2 +-
server/services/routing/rpc/smsMessage.js | 2 +-
server/services/routing/rpc/smsQueue.js | 2 +-
server/services/routing/rpc/smsQueueReport.js | 2 +-
server/services/routing/rpc/user.js | 2 +-
server/services/routing/rpc/whatsappInteraction.js | 2 +-
server/services/routing/rpc/whatsappMessage.js | 2 +-
server/services/routing/rpc/whatsappQueue.js | 2 +-
server/services/routing/rpc/whatsappQueueReport.js | 2 +-
.../services/routing/server/applications/agent.js | 2 +-
.../routing/server/applications/amazonlex.js | 2 +-
.../routing/server/applications/autoreply.js | 2 +-
.../services/routing/server/applications/close.js | 2 +-
.../routing/server/applications/dialogflow.js | 2 +-
.../routing/server/applications/dialogflowV2.js | 2 +-
.../services/routing/server/applications/gotoif.js | 2 +-
.../services/routing/server/applications/gotop.js | 2 +-
.../routing/server/applications/message.js | 2 +-
.../services/routing/server/applications/noop.js | 2 +-
.../services/routing/server/applications/queue.js | 2 +-
.../routing/server/applications/strategy/agent.js | 2 +-
.../server/applications/strategy/beepall.js | 2 +-
.../routing/server/applications/strategy/index.js | 2 +-
.../server/applications/strategy/rrmemory.js | 2 +-
.../routing/server/applications/strategy/util.js | 2 +-
.../services/routing/server/applications/system.js | 2 +-
server/services/routing/server/applications/tag.js | 2 +-
.../services/routing/server/applications/tvox.js | 2 +-
.../services/routing/server/applications/utils.js | 2 +-
server/services/routing/server/index.js | 2 +-
server/services/routing/server/interval.js | 2 +-
server/services/xdr/agents.controller.js | 2 +-
server/services/xdr/calls.controller.js | 2 +-
server/services/xdr/core.controller.js | 2 +-
server/services/xdr/dials.controller.js | 2 +-
server/services/xdr/index.js | 2 +-
server/services/xdr/members.controller.js | 2 +-
server/services/xdr/queues.controller.js | 2 +-
server/services/xdr/recordings.controller.js | 2 +-
server/services/xdr/transfers.controller.js | 2 +-
server/services/xdr/utils.js | 2 +-
server/utils/client-side-logger.js | 2 +-
server/utils/iftime.js | 2 +-
server/utils/loggers.js | 2 +-
server/utils/mask-sensitive-data.js | 2 +-
server/utils/misc.js | 2 +-
server/utils/safe-template.js | 2 +-
server/utils/update-app-config.js | 2 +-
.../3.12.2/assets/fonts/74bd8541f6152e9aa0cb.ttf | Bin 322456 -> 0 bytes
.../3.12.2/assets/fonts/8a4db4218c8e3ba96535.woff | Bin 13080 -> 0 bytes
.../3.12.2/assets/fonts/c90b9e812971d29ad6eb.eot | Bin 322676 -> 0 bytes
.../3.12.2/assets/fonts/db15fb94f19c4e36b451.woff | Bin 158576 -> 0 bytes
.../3.12.2/assets/fonts/dc116c4c8ce73229b683.ttf | Bin 13004 -> 0 bytes
.../3.12.2/assets/fonts/f2fc8fdab7e77dd45cca.eot | Bin 13168 -> 0 bytes
.../3.12.2/assets/fonts/ffef7f48a358edc53224.woff2 | Bin 119340 -> 0 bytes
.../3.12.2/assets/images/00fe515d7113c2841e5d.svg | 44 -
.../3.12.2/assets/images/369ccd33e5368870b112.png | Bin 2366542 -> 0 bytes
.../3.12.2/assets/images/3b24a6b94b2631f4d565.svg | 17 -
.../3.12.2/assets/images/b45cb1fa106a1150f12e.png | Bin 792641 -> 0 bytes
.../3.12.2/assets/images/c9f502ad417b1b987198.svg | 6741 -
snippet/3.12.2/index.html | 156 -
snippet/3.12.2/scripts/app.js | 42 -
snippet/3.12.2/scripts/app.js.map | 1 -
snippet/3.12.2/scripts/chat.js |151610 --------------------
snippet/3.12.2/scripts/chat.js.map | 1 -
snippet/3.12.2/scripts/mobile.js | 28 -
snippet/3.12.2/scripts/mobile.js.map | 1 -
snippet/3.12.2/scripts/runtime.js | 207 -
snippet/3.12.2/scripts/runtime.js.map | 1 -
snippet/3.12.2/styles/app.css |33580 -----
snippet/3.12.2/styles/app.css.map | 1 -
snippet/3.12.2/styles/mobile.css | 143 -
snippet/3.12.2/styles/mobile.css.map | 1 -
snippet/3.12.2/templates/00860aee362cdeeb1080.html | 161 -
snippet/3.12.2/templates/3f18dac5f545add792db.html | 82 -
snippet/3.12.2/templates/56adb62107e750fc7c3a.html | 236 -
snippet/3.12.2/templates/6043a16afdb829ba5934.html | 33 -
snippet/3.12.2/templates/690a6e80356646eaf088.html | 18 -
snippet/3.12.2/templates/9962474df74f9405ac72.html | 262 -
snippet/3.12.2/templates/aa115958da0c50d34968.html | 42 -
snippet/3.12.2/templates/caf0e553108b226443aa.html | 202 -
snippet/3.12.2/templates/cd4ab380f3d41616949b.html | 36 -
.../3.13.0/assets/fonts/74bd8541f6152e9aa0cb.ttf | Bin 0 -> 322456 bytes
.../3.13.0/assets/fonts/8a4db4218c8e3ba96535.woff | Bin 0 -> 13080 bytes
.../3.13.0/assets/fonts/c90b9e812971d29ad6eb.eot | Bin 0 -> 322676 bytes
.../3.13.0/assets/fonts/db15fb94f19c4e36b451.woff | Bin 0 -> 158576 bytes
.../3.13.0/assets/fonts/dc116c4c8ce73229b683.ttf | Bin 0 -> 13004 bytes
.../3.13.0/assets/fonts/f2fc8fdab7e77dd45cca.eot | Bin 0 -> 13168 bytes
.../3.13.0/assets/fonts/ffef7f48a358edc53224.woff2 | Bin 0 -> 119340 bytes
.../3.13.0/assets/images/00fe515d7113c2841e5d.svg | 44 +
.../3.13.0/assets/images/369ccd33e5368870b112.png | Bin 0 -> 2366542 bytes
.../3.13.0/assets/images/3b24a6b94b2631f4d565.svg | 17 +
.../3.13.0/assets/images/b45cb1fa106a1150f12e.png | Bin 0 -> 792641 bytes
.../3.13.0/assets/images/c9f502ad417b1b987198.svg | 6741 +
snippet/3.13.0/index.html | 29 +
snippet/3.13.0/scripts/app.js | 2 +
snippet/3.13.0/scripts/app.js.LICENSE.txt | 19 +
snippet/3.13.0/scripts/chat-e96e9bea.js | 3 +
.../3.13.0/scripts/chat-e96e9bea.js.LICENSE.txt | 7 +
snippet/3.13.0/scripts/chat-e96e9bea.js.map | 1 +
snippet/3.13.0/scripts/chat-fecd0807.js | 2 +
snippet/3.13.0/scripts/chat-fecd0807.js.map | 1 +
snippet/3.13.0/scripts/mobile.js | 1 +
snippet/3.13.0/scripts/runtime.js | 2 +
snippet/3.13.0/scripts/runtime.js.map | 1 +
snippet/3.13.0/scripts/vendor-angular-58d021f3.js | 2 +
.../3.13.0/scripts/vendor-angular-58d021f3.js.map | 1 +
snippet/3.13.0/scripts/vendor-angular-76f2ed34.js | 3 +
.../scripts/vendor-angular-76f2ed34.js.LICENSE.txt | 5 +
.../3.13.0/scripts/vendor-angular-76f2ed34.js.map | 1 +
snippet/3.13.0/scripts/vendor-angular-animate.js | 3 +
.../scripts/vendor-angular-animate.js.LICENSE.txt | 5 +
.../3.13.0/scripts/vendor-angular-animate.js.map | 1 +
.../3.13.0/scripts/vendor-angular-local-storage.js | 3 +
.../vendor-angular-local-storage.js.LICENSE.txt | 7 +
.../scripts/vendor-angular-local-storage.js.map | 1 +
snippet/3.13.0/scripts/vendor-angular-material.js | 3 +
.../scripts/vendor-angular-material.js.LICENSE.txt | 6 +
.../3.13.0/scripts/vendor-angular-material.js.map | 1 +
snippet/3.13.0/scripts/vendor-angular-messages.js | 3 +
.../scripts/vendor-angular-messages.js.LICENSE.txt | 5 +
.../3.13.0/scripts/vendor-angular-messages.js.map | 1 +
snippet/3.13.0/scripts/vendor-angular-resource.js | 3 +
.../scripts/vendor-angular-resource.js.LICENSE.txt | 5 +
.../3.13.0/scripts/vendor-angular-resource.js.map | 1 +
snippet/3.13.0/scripts/vendor-angular-sanitize.js | 3 +
.../scripts/vendor-angular-sanitize.js.LICENSE.txt | 5 +
.../3.13.0/scripts/vendor-angular-sanitize.js.map | 1 +
snippet/3.13.0/scripts/vendor-emojione.js | 2 +
snippet/3.13.0/scripts/vendor-emojione.js.map | 1 +
snippet/3.13.0/scripts/vendor-emojionearea.js | 3 +
.../scripts/vendor-emojionearea.js.LICENSE.txt | 7 +
snippet/3.13.0/scripts/vendor-emojionearea.js.map | 1 +
snippet/3.13.0/scripts/vendor-flow.js | 3 +
snippet/3.13.0/scripts/vendor-flow.js.LICENSE.txt | 3 +
snippet/3.13.0/scripts/vendor-flow.js.map | 1 +
snippet/3.13.0/scripts/vendor-index.js | 2 +
snippet/3.13.0/scripts/vendor-index.js.map | 1 +
snippet/3.13.0/scripts/vendor-jquery.js | 3 +
.../3.13.0/scripts/vendor-jquery.js.LICENSE.txt | 24 +
snippet/3.13.0/scripts/vendor-jquery.js.map | 1 +
.../3.13.0/scripts/vendor-jquery.textcomplete.js | 3 +
.../vendor-jquery.textcomplete.js.LICENSE.txt | 7 +
.../scripts/vendor-jquery.textcomplete.js.map | 1 +
snippet/3.13.0/scripts/vendor-moment.js | 3 +
.../3.13.0/scripts/vendor-moment.js.LICENSE.txt | 1 +
snippet/3.13.0/scripts/vendor-moment.js.map | 1 +
snippet/3.13.0/scripts/vendor-ng-embed.js | 2 +
snippet/3.13.0/scripts/vendor-ng-embed.js.map | 1 +
snippet/3.13.0/scripts/vendor-stateDirectives.js | 2 +
.../3.13.0/scripts/vendor-stateDirectives.js.map | 1 +
snippet/3.13.0/scripts/vendor-stateService.js | 2 +
snippet/3.13.0/scripts/vendor-stateService.js.map | 1 +
snippet/3.13.0/scripts/vendor-transition.js | 2 +
snippet/3.13.0/scripts/vendor-transition.js.map | 1 +
snippet/3.13.0/scripts/vendor-urlMatcher.js | 2 +
snippet/3.13.0/scripts/vendor-urlMatcher.js.map | 1 +
snippet/3.13.0/styles/app.css | 28 +
snippet/3.13.0/styles/app.css.map | 1 +
snippet/3.13.0/styles/mobile.css | 3 +
snippet/3.13.0/styles/mobile.css.map | 1 +
snippet/3.13.0/styles/vendor.css | 4463 +
snippet/3.13.0/styles/vendor.css.map | 1 +
snippet/3.13.0/templates/00860aee362cdeeb1080.html | 161 +
snippet/3.13.0/templates/3f18dac5f545add792db.html | 82 +
snippet/3.13.0/templates/56adb62107e750fc7c3a.html | 236 +
snippet/3.13.0/templates/6043a16afdb829ba5934.html | 33 +
snippet/3.13.0/templates/690a6e80356646eaf088.html | 18 +
snippet/3.13.0/templates/9962474df74f9405ac72.html | 262 +
snippet/3.13.0/templates/aa115958da0c50d34968.html | 42 +
snippet/3.13.0/templates/caf0e553108b226443aa.html | 202 +
snippet/3.13.0/templates/cd4ab380f3d41616949b.html | 36 +
1334 files changed, 13801 insertions(+), 194856 deletions(-)
delete mode 100644 snippet/3.12.2/assets/fonts/74bd8541f6152e9aa0cb.ttf
delete mode 100644 snippet/3.12.2/assets/fonts/8a4db4218c8e3ba96535.woff
delete mode 100644 snippet/3.12.2/assets/fonts/c90b9e812971d29ad6eb.eot
delete mode 100644 snippet/3.12.2/assets/fonts/db15fb94f19c4e36b451.woff
delete mode 100644 snippet/3.12.2/assets/fonts/dc116c4c8ce73229b683.ttf
delete mode 100644 snippet/3.12.2/assets/fonts/f2fc8fdab7e77dd45cca.eot
delete mode 100644 snippet/3.12.2/assets/fonts/ffef7f48a358edc53224.woff2
delete mode 100644 snippet/3.12.2/assets/images/00fe515d7113c2841e5d.svg
delete mode 100644 snippet/3.12.2/assets/images/369ccd33e5368870b112.png
delete mode 100644 snippet/3.12.2/assets/images/3b24a6b94b2631f4d565.svg
delete mode 100644 snippet/3.12.2/assets/images/b45cb1fa106a1150f12e.png
delete mode 100644 snippet/3.12.2/assets/images/c9f502ad417b1b987198.svg
delete mode 100644 snippet/3.12.2/index.html
delete mode 100644 snippet/3.12.2/scripts/app.js
delete mode 100644 snippet/3.12.2/scripts/app.js.map
delete mode 100644 snippet/3.12.2/scripts/chat.js
delete mode 100644 snippet/3.12.2/scripts/chat.js.map
delete mode 100644 snippet/3.12.2/scripts/mobile.js
delete mode 100644 snippet/3.12.2/scripts/mobile.js.map
delete mode 100644 snippet/3.12.2/scripts/runtime.js
delete mode 100644 snippet/3.12.2/scripts/runtime.js.map
delete mode 100644 snippet/3.12.2/styles/app.css
delete mode 100644 snippet/3.12.2/styles/app.css.map
delete mode 100644 snippet/3.12.2/styles/mobile.css
delete mode 100644 snippet/3.12.2/styles/mobile.css.map
delete mode 100644 snippet/3.12.2/templates/00860aee362cdeeb1080.html
delete mode 100644 snippet/3.12.2/templates/3f18dac5f545add792db.html
delete mode 100644 snippet/3.12.2/templates/56adb62107e750fc7c3a.html
delete mode 100644 snippet/3.12.2/templates/6043a16afdb829ba5934.html
delete mode 100644 snippet/3.12.2/templates/690a6e80356646eaf088.html
delete mode 100644 snippet/3.12.2/templates/9962474df74f9405ac72.html
delete mode 100644 snippet/3.12.2/templates/aa115958da0c50d34968.html
delete mode 100644 snippet/3.12.2/templates/caf0e553108b226443aa.html
delete mode 100644 snippet/3.12.2/templates/cd4ab380f3d41616949b.html
create mode 100644 snippet/3.13.0/assets/fonts/74bd8541f6152e9aa0cb.ttf
create mode 100644 snippet/3.13.0/assets/fonts/8a4db4218c8e3ba96535.woff
create mode 100644 snippet/3.13.0/assets/fonts/c90b9e812971d29ad6eb.eot
create mode 100644 snippet/3.13.0/assets/fonts/db15fb94f19c4e36b451.woff
create mode 100644 snippet/3.13.0/assets/fonts/dc116c4c8ce73229b683.ttf
create mode 100644 snippet/3.13.0/assets/fonts/f2fc8fdab7e77dd45cca.eot
create mode 100644 snippet/3.13.0/assets/fonts/ffef7f48a358edc53224.woff2
create mode 100644 snippet/3.13.0/assets/images/00fe515d7113c2841e5d.svg
create mode 100644 snippet/3.13.0/assets/images/369ccd33e5368870b112.png
create mode 100644 snippet/3.13.0/assets/images/3b24a6b94b2631f4d565.svg
create mode 100644 snippet/3.13.0/assets/images/b45cb1fa106a1150f12e.png
create mode 100644 snippet/3.13.0/assets/images/c9f502ad417b1b987198.svg
create mode 100644 snippet/3.13.0/index.html
create mode 100644 snippet/3.13.0/scripts/app.js
create mode 100644 snippet/3.13.0/scripts/app.js.LICENSE.txt
create mode 100644 snippet/3.13.0/scripts/chat-e96e9bea.js
create mode 100644 snippet/3.13.0/scripts/chat-e96e9bea.js.LICENSE.txt
create mode 100644 snippet/3.13.0/scripts/chat-e96e9bea.js.map
create mode 100644 snippet/3.13.0/scripts/chat-fecd0807.js
create mode 100644 snippet/3.13.0/scripts/chat-fecd0807.js.map
create mode 100644 snippet/3.13.0/scripts/mobile.js
create mode 100644 snippet/3.13.0/scripts/runtime.js
create mode 100644 snippet/3.13.0/scripts/runtime.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-angular-58d021f3.js
create mode 100644 snippet/3.13.0/scripts/vendor-angular-58d021f3.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-angular-76f2ed34.js
create mode 100644 snippet/3.13.0/scripts/vendor-angular-76f2ed34.js.LICENSE.txt
create mode 100644 snippet/3.13.0/scripts/vendor-angular-76f2ed34.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-angular-animate.js
create mode 100644 snippet/3.13.0/scripts/vendor-angular-animate.js.LICENSE.txt
create mode 100644 snippet/3.13.0/scripts/vendor-angular-animate.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-angular-local-storage.js
create mode 100644 snippet/3.13.0/scripts/vendor-angular-local-storage.js.LICENSE.txt
create mode 100644 snippet/3.13.0/scripts/vendor-angular-local-storage.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-angular-material.js
create mode 100644 snippet/3.13.0/scripts/vendor-angular-material.js.LICENSE.txt
create mode 100644 snippet/3.13.0/scripts/vendor-angular-material.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-angular-messages.js
create mode 100644 snippet/3.13.0/scripts/vendor-angular-messages.js.LICENSE.txt
create mode 100644 snippet/3.13.0/scripts/vendor-angular-messages.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-angular-resource.js
create mode 100644 snippet/3.13.0/scripts/vendor-angular-resource.js.LICENSE.txt
create mode 100644 snippet/3.13.0/scripts/vendor-angular-resource.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-angular-sanitize.js
create mode 100644 snippet/3.13.0/scripts/vendor-angular-sanitize.js.LICENSE.txt
create mode 100644 snippet/3.13.0/scripts/vendor-angular-sanitize.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-emojione.js
create mode 100644 snippet/3.13.0/scripts/vendor-emojione.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-emojionearea.js
create mode 100644 snippet/3.13.0/scripts/vendor-emojionearea.js.LICENSE.txt
create mode 100644 snippet/3.13.0/scripts/vendor-emojionearea.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-flow.js
create mode 100644 snippet/3.13.0/scripts/vendor-flow.js.LICENSE.txt
create mode 100644 snippet/3.13.0/scripts/vendor-flow.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-index.js
create mode 100644 snippet/3.13.0/scripts/vendor-index.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-jquery.js
create mode 100644 snippet/3.13.0/scripts/vendor-jquery.js.LICENSE.txt
create mode 100644 snippet/3.13.0/scripts/vendor-jquery.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-jquery.textcomplete.js
create mode 100644 snippet/3.13.0/scripts/vendor-jquery.textcomplete.js.LICENSE.txt
create mode 100644 snippet/3.13.0/scripts/vendor-jquery.textcomplete.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-moment.js
create mode 100644 snippet/3.13.0/scripts/vendor-moment.js.LICENSE.txt
create mode 100644 snippet/3.13.0/scripts/vendor-moment.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-ng-embed.js
create mode 100644 snippet/3.13.0/scripts/vendor-ng-embed.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-stateDirectives.js
create mode 100644 snippet/3.13.0/scripts/vendor-stateDirectives.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-stateService.js
create mode 100644 snippet/3.13.0/scripts/vendor-stateService.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-transition.js
create mode 100644 snippet/3.13.0/scripts/vendor-transition.js.map
create mode 100644 snippet/3.13.0/scripts/vendor-urlMatcher.js
create mode 100644 snippet/3.13.0/scripts/vendor-urlMatcher.js.map
create mode 100644 snippet/3.13.0/styles/app.css
create mode 100644 snippet/3.13.0/styles/app.css.map
create mode 100644 snippet/3.13.0/styles/mobile.css
create mode 100644 snippet/3.13.0/styles/mobile.css.map
create mode 100644 snippet/3.13.0/styles/vendor.css
create mode 100644 snippet/3.13.0/styles/vendor.css.map
create mode 100644 snippet/3.13.0/templates/00860aee362cdeeb1080.html
create mode 100644 snippet/3.13.0/templates/3f18dac5f545add792db.html
create mode 100644 snippet/3.13.0/templates/56adb62107e750fc7c3a.html
create mode 100644 snippet/3.13.0/templates/6043a16afdb829ba5934.html
create mode 100644 snippet/3.13.0/templates/690a6e80356646eaf088.html
create mode 100644 snippet/3.13.0/templates/9962474df74f9405ac72.html
create mode 100644 snippet/3.13.0/templates/aa115958da0c50d34968.html
create mode 100644 snippet/3.13.0/templates/caf0e553108b226443aa.html
create mode 100644 snippet/3.13.0/templates/cd4ab380f3d41616949b.html
diff --git a/apidoc/api_project.js b/apidoc/api_project.js
index 7931981..fce271d 100644
--- a/apidoc/api_project.js
+++ b/apidoc/api_project.js
@@ -17,7 +17,7 @@ define({
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
- "time": "2023-03-15T09:21:20.897Z",
+ "time": "2023-03-15T10:38:25.011Z",
"url": "http://apidocjs.com",
"version": "0.24.0"
}
diff --git a/apidoc/api_project.json b/apidoc/api_project.json
index d809b86..ec2b1e0 100644
--- a/apidoc/api_project.json
+++ b/apidoc/api_project.json
@@ -17,7 +17,7 @@
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
- "time": "2023-03-15T09:21:20.897Z",
+ "time": "2023-03-15T10:38:25.011Z",
"url": "http://apidocjs.com",
"version": "0.24.0"
}
diff --git a/server/api/action/action.attributes.js b/server/api/action/action.attributes.js
index 1132464..a0e2772 100644
--- a/server/api/action/action.attributes.js
+++ b/server/api/action/action.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4134=['integration','jscripty','Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script','jscripty[ProjectId],\x20browser[type(0=Popup,1=CTI\x20URL)],\x20contactManager[ListId],\x20urlForward[type(GET,POST,PUT,DELETE)],\x20script[info],\x20integration[intName(desk,dynamics365,freshdesk,freshsales,salesforce,sugarcrm,vtiger,zendesk,zoho)],\x20motionbar[type(0=Popup,1=CTI\x20URL,2=WinApp)]','contactManager[searchFields],\x20script[script],\x20integration[ConfigurationId],\x20motionbar[NULL,eventVariables(0=No,1=Yes),WinAppArguments],\x20browser[NULL,eventVariables(0=No,1=Yes)]','browser[location(0=NewTab,1=NewWindow,2=MotionTab)],\x20contactManager[autoCreateField]','STRING','urlForward[timeout],\x20browser[windowWidth],\x20contactManager[ignoreDialerContactId]','urlForward[headers],\x20browser[wsindowHeight]','TEXT','urlForward[body]','sequelize','VIRTUAL','contactManager'];(function(_0x1f2104,_0x3d1a56){var _0x590031=function(_0x16e37d){while(--_0x16e37d){_0x1f2104['push'](_0x1f2104['shift']());}};_0x590031(++_0x3d1a56);}(_0x4134,0x89));var _0x4413=function(_0x373285,_0xd7c6ad){_0x373285=_0x373285-0x0;var _0x498640=_0x4134[_0x373285];return _0x498640;};'use strict';var Sequelize=require(_0x4413('0x0'));module['exports']={'name':{'type':Sequelize[_0x4413('0x1')],'get':function(_0x11dc8f){return this['getDataValue']('action');}},'action':{'type':Sequelize['STRING'],'allowNull':![],'validate':{'isIn':{'args':[[_0x4413('0x2'),_0x4413('0x3'),'motionbar',_0x4413('0x4'),'urlForward','browser','bot','script']],'msg':_0x4413('0x5')}},'comment':'Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script'},'data1':{'type':Sequelize['STRING'](0x1000),'comment':_0x4413('0x6')},'data2':{'type':Sequelize['STRING'](0x1000),'comment':'contactManager[autoCreate(0=No,1=Yes)],\x20urlForward[URL],\x20script[type],\x20integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20browser[TemplateId,URL]'},'data3':{'type':Sequelize['STRING'](0x1000),'comment':_0x4413('0x7')},'data4':{'type':Sequelize['STRING'](0x1000),'comments':_0x4413('0x8')},'data5':{'type':Sequelize[_0x4413('0x9')](0x1000),'comments':_0x4413('0xa')},'data6':{'type':Sequelize['STRING'],'comments':_0x4413('0xb')},'data7':{'type':Sequelize[_0x4413('0xc')],'comments':_0x4413('0xd')}};
\ No newline at end of file
+var _0x19d0=['getDataValue','action','contactManager','integration','motionbar','jscripty','urlForward','browser','bot','script','Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script','STRING','jscripty[ProjectId],\x20browser[type(0=Popup,1=CTI\x20URL)],\x20contactManager[ListId],\x20urlForward[type(GET,POST,PUT,DELETE)],\x20script[info],\x20integration[intName(desk,dynamics365,freshdesk,freshsales,salesforce,sugarcrm,vtiger,zendesk,zoho)],\x20motionbar[type(0=Popup,1=CTI\x20URL,2=WinApp)]','contactManager[autoCreate(0=No,1=Yes)],\x20urlForward[URL],\x20script[type],\x20integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20browser[TemplateId,URL]','contactManager[searchFields],\x20script[script],\x20integration[ConfigurationId],\x20motionbar[NULL,eventVariables(0=No,1=Yes),WinAppArguments],\x20browser[NULL,eventVariables(0=No,1=Yes)]','browser[location(0=NewTab,1=NewWindow,2=MotionTab)],\x20contactManager[autoCreateField]','urlForward[timeout],\x20browser[windowWidth],\x20contactManager[ignoreDialerContactId]','urlForward[headers],\x20browser[wsindowHeight]','TEXT','sequelize','exports','VIRTUAL'];(function(_0x1a09b9,_0x2c9f0a){var _0xe67872=function(_0x38f8d6){while(--_0x38f8d6){_0x1a09b9['push'](_0x1a09b9['shift']());}};_0xe67872(++_0x2c9f0a);}(_0x19d0,0xd9));var _0x019d=function(_0x1c96d3,_0x2448d3){_0x1c96d3=_0x1c96d3-0x0;var _0x452cbe=_0x19d0[_0x1c96d3];return _0x452cbe;};'use strict';var Sequelize=require(_0x019d('0x0'));module[_0x019d('0x1')]={'name':{'type':Sequelize[_0x019d('0x2')],'get':function(_0x35ec9){return this[_0x019d('0x3')](_0x019d('0x4'));}},'action':{'type':Sequelize['STRING'],'allowNull':![],'validate':{'isIn':{'args':[[_0x019d('0x5'),_0x019d('0x6'),_0x019d('0x7'),_0x019d('0x8'),_0x019d('0x9'),_0x019d('0xa'),_0x019d('0xb'),_0x019d('0xc')]],'msg':_0x019d('0xd')}},'comment':_0x019d('0xd')},'data1':{'type':Sequelize[_0x019d('0xe')](0x1000),'comment':_0x019d('0xf')},'data2':{'type':Sequelize[_0x019d('0xe')](0x1000),'comment':_0x019d('0x10')},'data3':{'type':Sequelize[_0x019d('0xe')](0x1000),'comment':_0x019d('0x11')},'data4':{'type':Sequelize['STRING'](0x1000),'comments':_0x019d('0x12')},'data5':{'type':Sequelize[_0x019d('0xe')](0x1000),'comments':_0x019d('0x13')},'data6':{'type':Sequelize[_0x019d('0xe')],'comments':_0x019d('0x14')},'data7':{'type':Sequelize[_0x019d('0x15')],'comments':'urlForward[body]'}};
\ No newline at end of file
diff --git a/server/api/action/action.controller.js b/server/api/action/action.controller.js
index 08ef0ab..82b6d15 100644
--- a/server/api/action/action.controller.js
+++ b/server/api/action/action.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4823=['save','update','then','destroy','sendStatus','error','name','body','Action','params','catch','eml-format','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','limit','undefined','count','set','Content-Range','apply','reject'];(function(_0x2d2d11,_0x2eafd9){var _0x2628a6=function(_0x9df7b1){while(--_0x9df7b1){_0x2d2d11['push'](_0x2d2d11['shift']());}};_0x2628a6(++_0x2eafd9);}(_0x4823,0x9b));var _0x3482=function(_0x3cc9d9,_0x69ed38){_0x3cc9d9=_0x3cc9d9-0x0;var _0x1a425d=_0x4823[_0x3cc9d9];return _0x1a425d;};'use strict';var emlformat=require(_0x3482('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x3482('0x1'));var moment=require(_0x3482('0x2'));var BPromise=require(_0x3482('0x3'));var Mustache=require(_0x3482('0x4'));var util=require('util');var path=require(_0x3482('0x5'));var sox=require(_0x3482('0x6'));var csv=require(_0x3482('0x7'));var ejs=require(_0x3482('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x3482('0x9'));var squel=require('squel');var crypto=require(_0x3482('0xa'));var jsforce=require(_0x3482('0xb'));var deskjs=require(_0x3482('0xc'));var toCsv=require(_0x3482('0x7'));var querystring=require(_0x3482('0xd'));var Papa=require(_0x3482('0xe'));var Redis=require(_0x3482('0xf'));var authService=require(_0x3482('0x10'));var qs=require(_0x3482('0x11'));var as=require(_0x3482('0x12'));var hardwareService=require(_0x3482('0x13'));var logger=require(_0x3482('0x14'))(_0x3482('0x15'));var utils=require(_0x3482('0x16'));var config=require(_0x3482('0x17'));var licenseUtil=require(_0x3482('0x18'));var db=require(_0x3482('0x19'))['db'];function respondWithStatusCode(_0xdbde6e,_0x5547f5){_0x5547f5=_0x5547f5||0xcc;return function(_0x5c4afb){if(_0x5c4afb){return _0xdbde6e['sendStatus'](_0x5547f5);}return _0xdbde6e[_0x3482('0x1a')](_0x5547f5)[_0x3482('0x1b')]();};}function respondWithResult(_0x11ce85,_0x10d5c4){_0x10d5c4=_0x10d5c4||0xc8;return function(_0x2fd57d){if(_0x2fd57d){return _0x11ce85['status'](_0x10d5c4)[_0x3482('0x1c')](_0x2fd57d);}};}function respondWithFilteredResult(_0x3bd7cb,_0xea0164){return function(_0x3c8aac){if(_0x3c8aac){var _0x5af75c=typeof _0xea0164[_0x3482('0x1d')]==='undefined'&&typeof _0xea0164[_0x3482('0x1e')]===_0x3482('0x1f');var _0x59d556=_0x3c8aac[_0x3482('0x20')];var _0x35c84f=_0x5af75c?0x0:_0xea0164[_0x3482('0x1d')];var _0x431b5d=_0x5af75c?_0x3c8aac[_0x3482('0x20')]:_0xea0164['offset']+_0xea0164[_0x3482('0x1e')];var _0x38774f;if(_0x431b5d>=_0x59d556){_0x431b5d=_0x59d556;_0x38774f=0xc8;}else{_0x38774f=0xce;}_0x3bd7cb[_0x3482('0x1a')](_0x38774f);return _0x3bd7cb[_0x3482('0x21')](_0x3482('0x22'),_0x35c84f+'-'+_0x431b5d+'/'+_0x59d556)[_0x3482('0x1c')](_0x3c8aac);}return null;};}function patchUpdates(_0xd3c3fb){return function(_0x232e89){try{jsonpatch[_0x3482('0x23')](_0x232e89,_0xd3c3fb,!![]);}catch(_0x119afd){return BPromise[_0x3482('0x24')](_0x119afd);}return _0x232e89[_0x3482('0x25')]();};}function saveUpdates(_0x45e121,_0x4469dd){return function(_0x58810c){if(_0x58810c){return _0x58810c[_0x3482('0x26')](_0x45e121)[_0x3482('0x27')](function(_0x326cfe){return _0x326cfe;});}return null;};}function removeEntity(_0x54d729,_0x59286a){return function(_0x4a6c1d){if(_0x4a6c1d){return _0x4a6c1d[_0x3482('0x28')]()[_0x3482('0x27')](function(){_0x54d729[_0x3482('0x1a')](0xcc)[_0x3482('0x1b')]();});}};}function handleEntityNotFound(_0x5e1ebd,_0x51c815){return function(_0x5ee542){if(!_0x5ee542){_0x5e1ebd[_0x3482('0x29')](0x194);}return _0x5ee542;};}function handleError(_0x472411,_0x29538c){_0x29538c=_0x29538c||0x1f4;return function(_0x302c9a){logger[_0x3482('0x2a')](_0x302c9a['stack']);if(_0x302c9a[_0x3482('0x2b')]){delete _0x302c9a['name'];}_0x472411[_0x3482('0x1a')](_0x29538c)['send'](_0x302c9a);};}exports['update']=function(_0x399c93,_0x18ca10){if(_0x399c93[_0x3482('0x2c')]['id']){delete _0x399c93[_0x3482('0x2c')]['id'];}return db[_0x3482('0x2d')]['find']({'where':{'id':_0x399c93[_0x3482('0x2e')]['id']}})[_0x3482('0x27')](handleEntityNotFound(_0x18ca10,null))['then'](saveUpdates(_0x399c93['body'],null))['then'](respondWithResult(_0x18ca10,null))[_0x3482('0x2f')](handleError(_0x18ca10,null));};exports['destroy']=function(_0x59638d,_0x169097){return db[_0x3482('0x2d')]['find']({'where':{'id':_0x59638d[_0x3482('0x2e')]['id']}})[_0x3482('0x27')](handleEntityNotFound(_0x169097,null))['then'](removeEntity(_0x169097,null))[_0x3482('0x2f')](handleError(_0x169097,null));};
\ No newline at end of file
+var _0xccd7=['../../config/license/util','../../mysqldb','sendStatus','status','json','undefined','limit','count','offset','set','Content-Range','apply','reject','save','then','end','stack','name','update','find','params','catch','destroy','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','sox','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment'];(function(_0x5e6bae,_0x51f5ee){var _0x5f5a34=function(_0x30d270){while(--_0x30d270){_0x5e6bae['push'](_0x5e6bae['shift']());}};_0x5f5a34(++_0x51f5ee);}(_0xccd7,0x131));var _0x7ccd=function(_0x3e69ae,_0x366e8d){_0x3e69ae=_0x3e69ae-0x0;var _0x3d7f42=_0xccd7[_0x3e69ae];return _0x3d7f42;};'use strict';var emlformat=require(_0x7ccd('0x0'));var rimraf=require(_0x7ccd('0x1'));var zipdir=require(_0x7ccd('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x7ccd('0x3'));var moment=require(_0x7ccd('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x7ccd('0x5'));var util=require(_0x7ccd('0x6'));var path=require('path');var sox=require(_0x7ccd('0x7'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x7ccd('0x8'));var _=require(_0x7ccd('0x9'));var squel=require(_0x7ccd('0xa'));var crypto=require(_0x7ccd('0xb'));var jsforce=require(_0x7ccd('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x7ccd('0xd'));var Papa=require(_0x7ccd('0xe'));var Redis=require(_0x7ccd('0xf'));var authService=require(_0x7ccd('0x10'));var qs=require(_0x7ccd('0x11'));var as=require(_0x7ccd('0x12'));var hardwareService=require(_0x7ccd('0x13'));var logger=require(_0x7ccd('0x14'))(_0x7ccd('0x15'));var utils=require(_0x7ccd('0x16'));var config=require(_0x7ccd('0x17'));var licenseUtil=require(_0x7ccd('0x18'));var db=require(_0x7ccd('0x19'))['db'];function respondWithStatusCode(_0x613845,_0x2773d4){_0x2773d4=_0x2773d4||0xcc;return function(_0x41ca46){if(_0x41ca46){return _0x613845[_0x7ccd('0x1a')](_0x2773d4);}return _0x613845['status'](_0x2773d4)['end']();};}function respondWithResult(_0x2aad7b,_0x2e9144){_0x2e9144=_0x2e9144||0xc8;return function(_0x35f603){if(_0x35f603){return _0x2aad7b[_0x7ccd('0x1b')](_0x2e9144)[_0x7ccd('0x1c')](_0x35f603);}};}function respondWithFilteredResult(_0x695ffb,_0x116cc9){return function(_0x3f798f){if(_0x3f798f){var _0x117dab=typeof _0x116cc9['offset']===_0x7ccd('0x1d')&&typeof _0x116cc9[_0x7ccd('0x1e')]==='undefined';var _0x2f95cd=_0x3f798f[_0x7ccd('0x1f')];var _0x19b648=_0x117dab?0x0:_0x116cc9[_0x7ccd('0x20')];var _0x4fb9e3=_0x117dab?_0x3f798f['count']:_0x116cc9['offset']+_0x116cc9['limit'];var _0x1881d0;if(_0x4fb9e3>=_0x2f95cd){_0x4fb9e3=_0x2f95cd;_0x1881d0=0xc8;}else{_0x1881d0=0xce;}_0x695ffb['status'](_0x1881d0);return _0x695ffb[_0x7ccd('0x21')](_0x7ccd('0x22'),_0x19b648+'-'+_0x4fb9e3+'/'+_0x2f95cd)[_0x7ccd('0x1c')](_0x3f798f);}return null;};}function patchUpdates(_0x136815){return function(_0x1446a7){try{jsonpatch[_0x7ccd('0x23')](_0x1446a7,_0x136815,!![]);}catch(_0x3e4d0b){return BPromise[_0x7ccd('0x24')](_0x3e4d0b);}return _0x1446a7[_0x7ccd('0x25')]();};}function saveUpdates(_0x1ba9ad,_0x5a1d66){return function(_0x3e91dc){if(_0x3e91dc){return _0x3e91dc['update'](_0x1ba9ad)[_0x7ccd('0x26')](function(_0x2eaa40){return _0x2eaa40;});}return null;};}function removeEntity(_0x2cd009,_0x3b75be){return function(_0x49bcf4){if(_0x49bcf4){return _0x49bcf4['destroy']()[_0x7ccd('0x26')](function(){_0x2cd009[_0x7ccd('0x1b')](0xcc)[_0x7ccd('0x27')]();});}};}function handleEntityNotFound(_0x2f7c14,_0x537c90){return function(_0x983b0c){if(!_0x983b0c){_0x2f7c14['sendStatus'](0x194);}return _0x983b0c;};}function handleError(_0x288237,_0x2397b5){_0x2397b5=_0x2397b5||0x1f4;return function(_0x107b2d){logger['error'](_0x107b2d[_0x7ccd('0x28')]);if(_0x107b2d['name']){delete _0x107b2d[_0x7ccd('0x29')];}_0x288237[_0x7ccd('0x1b')](_0x2397b5)['send'](_0x107b2d);};}exports[_0x7ccd('0x2a')]=function(_0x17522d,_0x2e2cf3){if(_0x17522d['body']['id']){delete _0x17522d['body']['id'];}return db['Action'][_0x7ccd('0x2b')]({'where':{'id':_0x17522d[_0x7ccd('0x2c')]['id']}})['then'](handleEntityNotFound(_0x2e2cf3,null))[_0x7ccd('0x26')](saveUpdates(_0x17522d['body'],null))[_0x7ccd('0x26')](respondWithResult(_0x2e2cf3,null))[_0x7ccd('0x2d')](handleError(_0x2e2cf3,null));};exports[_0x7ccd('0x2e')]=function(_0x319b23,_0x483750){return db['Action'][_0x7ccd('0x2b')]({'where':{'id':_0x319b23[_0x7ccd('0x2c')]['id']}})['then'](handleEntityNotFound(_0x483750,null))[_0x7ccd('0x26')](removeEntity(_0x483750,null))[_0x7ccd('0x2d')](handleError(_0x483750,null));};
\ No newline at end of file
diff --git a/server/api/action/action.model.js b/server/api/action/action.model.js
index 5445543..ca3b5bb 100644
--- a/server/api/action/action.model.js
+++ b/server/api/action/action.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa6f9=['Action','tools_actions','util','../../config/logger','api','bluebird','../../config/environment','define'];(function(_0x90743f,_0x5d89b8){var _0x2e3ab5=function(_0x17dc66){while(--_0x17dc66){_0x90743f['push'](_0x90743f['shift']());}};_0x2e3ab5(++_0x5d89b8);}(_0xa6f9,0x11a));var _0x9a6f=function(_0x2bac1e,_0x38ed30){_0x2bac1e=_0x2bac1e-0x0;var _0x4a3370=_0xa6f9[_0x2bac1e];return _0x4a3370;};'use strict';var _=require('lodash');var util=require(_0x9a6f('0x0'));var logger=require(_0x9a6f('0x1'))(_0x9a6f('0x2'));var moment=require('moment');var BPromise=require(_0x9a6f('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x9a6f('0x4'));var attributes=require('./action.attributes');module['exports']=function(_0x3261f7,_0x30d9a7){return _0x3261f7[_0x9a6f('0x5')](_0x9a6f('0x6'),attributes,{'tableName':_0x9a6f('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x854f=['../../config/logger','api','moment','bluebird','path','../../config/environment','./action.attributes','exports','define','Action','tools_actions','lodash','util'];(function(_0x5a6ffd,_0x4ad38c){var _0x375ef2=function(_0x412850){while(--_0x412850){_0x5a6ffd['push'](_0x5a6ffd['shift']());}};_0x375ef2(++_0x4ad38c);}(_0x854f,0xc1));var _0xf854=function(_0x407853,_0x1a6796){_0x407853=_0x407853-0x0;var _0x4dcfb3=_0x854f[_0x407853];return _0x4dcfb3;};'use strict';var _=require(_0xf854('0x0'));var util=require(_0xf854('0x1'));var logger=require(_0xf854('0x2'))(_0xf854('0x3'));var moment=require(_0xf854('0x4'));var BPromise=require(_0xf854('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xf854('0x6'));var rimraf=require('rimraf');var config=require(_0xf854('0x7'));var attributes=require(_0xf854('0x8'));module[_0xf854('0x9')]=function(_0x1f5ec4,_0x4b1ca8){return _0x1f5ec4[_0xf854('0xa')](_0xf854('0xb'),attributes,{'tableName':_0xf854('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/action/action.rpc.js b/server/api/action/action.rpc.js
index 6ec8e62..2b70a8b 100644
--- a/server/api/action/action.rpc.js
+++ b/server/api/action/action.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1cb9=['error','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','info','Action,\x20%s,\x20%s','request\x20sent','debug','Action,\x20%s,\x20%s,\x20%s','stringify'];(function(_0xefd519,_0xc62635){var _0x4bb882=function(_0x37e0a1){while(--_0x37e0a1){_0xefd519['push'](_0xefd519['shift']());}};_0x4bb882(++_0xc62635);}(_0x1cb9,0x14e));var _0x91cb=function(_0x27b2bb,_0x4a9b6b){_0x27b2bb=_0x27b2bb-0x0;var _0x2d29f8=_0x1cb9[_0x27b2bb];return _0x2d29f8;};'use strict';var _=require(_0x91cb('0x0'));var util=require('util');var moment=require(_0x91cb('0x1'));var BPromise=require(_0x91cb('0x2'));var rs=require(_0x91cb('0x3'));var fs=require('fs');var Redis=require(_0x91cb('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x91cb('0x5'));var logger=require(_0x91cb('0x6'))('rpc');var config=require(_0x91cb('0x7'));var jayson=require(_0x91cb('0x8'));var client=jayson[_0x91cb('0x9')][_0x91cb('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3b9d98,_0x8f8a3b,_0x4c1f56){return new BPromise(function(_0x15c517,_0x5bda2f){return client[_0x91cb('0xb')](_0x3b9d98,_0x4c1f56)['then'](function(_0xa43e7a){logger[_0x91cb('0xc')](_0x91cb('0xd'),_0x8f8a3b,_0x91cb('0xe'));logger[_0x91cb('0xf')](_0x91cb('0x10'),_0x8f8a3b,_0x91cb('0xe'),JSON[_0x91cb('0x11')](_0xa43e7a));if(_0xa43e7a[_0x91cb('0x12')]){if(_0xa43e7a[_0x91cb('0x12')]['code']===0x1f4){logger[_0x91cb('0x12')](_0x91cb('0xd'),_0x8f8a3b,_0xa43e7a['error'][_0x91cb('0x13')]);return _0x5bda2f(_0xa43e7a[_0x91cb('0x12')][_0x91cb('0x13')]);}logger[_0x91cb('0x12')]('Action,\x20%s,\x20%s',_0x8f8a3b,_0xa43e7a['error'][_0x91cb('0x13')]);return _0x15c517(_0xa43e7a[_0x91cb('0x12')]['message']);}else{logger['info'](_0x91cb('0xd'),_0x8f8a3b,_0x91cb('0xe'));_0x15c517(_0xa43e7a[_0x91cb('0x14')]['message']);}})[_0x91cb('0x15')](function(_0x135890){logger['error'](_0x91cb('0xd'),_0x8f8a3b,_0x135890);_0x5bda2f(_0x135890);});});}
\ No newline at end of file
+var _0xc4aa=['moment','bluebird','randomstring','ioredis','rpc','../../config/environment','jayson/promise','client','http','request','then','Action,\x20%s,\x20%s','request\x20sent','debug','error','code','message','info','catch','lodash','util'];(function(_0x1a0d69,_0x102561){var _0x1337e3=function(_0x3e7753){while(--_0x3e7753){_0x1a0d69['push'](_0x1a0d69['shift']());}};_0x1337e3(++_0x102561);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xc4aa[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0xac4a('0x0'));var util=require(_0xac4a('0x1'));var moment=require(_0xac4a('0x2'));var BPromise=require(_0xac4a('0x3'));var rs=require(_0xac4a('0x4'));var fs=require('fs');var Redis=require(_0xac4a('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xac4a('0x6'));var config=require(_0xac4a('0x7'));var jayson=require(_0xac4a('0x8'));var client=jayson[_0xac4a('0x9')][_0xac4a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x15cd34,_0x3ef77c,_0x10525b){return new BPromise(function(_0x5c6179,_0x5b8339){return client[_0xac4a('0xb')](_0x15cd34,_0x10525b)[_0xac4a('0xc')](function(_0x26ec84){logger['info'](_0xac4a('0xd'),_0x3ef77c,_0xac4a('0xe'));logger[_0xac4a('0xf')]('Action,\x20%s,\x20%s,\x20%s',_0x3ef77c,_0xac4a('0xe'),JSON['stringify'](_0x26ec84));if(_0x26ec84[_0xac4a('0x10')]){if(_0x26ec84['error'][_0xac4a('0x11')]===0x1f4){logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x26ec84['error'][_0xac4a('0x12')]);return _0x5b8339(_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);}logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);return _0x5c6179(_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);}else{logger[_0xac4a('0x13')](_0xac4a('0xd'),_0x3ef77c,_0xac4a('0xe'));_0x5c6179(_0x26ec84['result'][_0xac4a('0x12')]);}})[_0xac4a('0x14')](function(_0x23eb66){logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x23eb66);_0x5b8339(_0x23eb66);});});}
\ No newline at end of file
diff --git a/server/api/action/index.js b/server/api/action/index.js
index b8215cc..433b9fb 100644
--- a/server/api/action/index.js
+++ b/server/api/action/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xed08=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./action.controller','put','/:id','isAuthenticated','update','delete','exports','multer','util','path','connect-timeout','express'];(function(_0x3452ce,_0x124927){var _0xee20c5=function(_0x16dceb){while(--_0x16dceb){_0x3452ce['push'](_0x3452ce['shift']());}};_0xee20c5(++_0x124927);}(_0xed08,0x14b));var _0x8ed0=function(_0x3d750b,_0x330074){_0x3d750b=_0x3d750b-0x0;var _0x7ffc20=_0xed08[_0x3d750b];return _0x7ffc20;};'use strict';var multer=require(_0x8ed0('0x0'));var util=require(_0x8ed0('0x1'));var path=require(_0x8ed0('0x2'));var timeout=require(_0x8ed0('0x3'));var express=require(_0x8ed0('0x4'));var router=express[_0x8ed0('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x8ed0('0x6'));var interaction=require(_0x8ed0('0x7'));var config=require(_0x8ed0('0x8'));var controller=require(_0x8ed0('0x9'));router[_0x8ed0('0xa')](_0x8ed0('0xb'),auth[_0x8ed0('0xc')](),controller[_0x8ed0('0xd')]);router[_0x8ed0('0xe')](_0x8ed0('0xb'),auth[_0x8ed0('0xc')](),controller['destroy']);module[_0x8ed0('0xf')]=router;
\ No newline at end of file
+var _0xa566=['exports','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','put','/:id','delete','destroy'];(function(_0x43e8b0,_0x3e6cd5){var _0x136980=function(_0x26359f){while(--_0x26359f){_0x43e8b0['push'](_0x43e8b0['shift']());}};_0x136980(++_0x3e6cd5);}(_0xa566,0xcd));var _0x6a56=function(_0x5e64e4,_0x2de132){_0x5e64e4=_0x5e64e4-0x0;var _0x591b4d=_0xa566[_0x5e64e4];return _0x591b4d;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x6a56('0x0'));var timeout=require('connect-timeout');var express=require(_0x6a56('0x1'));var router=express[_0x6a56('0x2')]();var fs_extra=require(_0x6a56('0x3'));var auth=require(_0x6a56('0x4'));var interaction=require(_0x6a56('0x5'));var config=require(_0x6a56('0x6'));var controller=require('./action.controller');router[_0x6a56('0x7')](_0x6a56('0x8'),auth['isAuthenticated'](),controller['update']);router[_0x6a56('0x9')](_0x6a56('0x8'),auth['isAuthenticated'](),controller[_0x6a56('0xa')]);module[_0x6a56('0xb')]=router;
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.attributes.js b/server/api/analyticCustomReport/analyticCustomReport.attributes.js
index 5068e15..4fce374 100644
--- a/server/api/analyticCustomReport/analyticCustomReport.attributes.js
+++ b/server/api/analyticCustomReport/analyticCustomReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x038b=['exports','STRING','TEXT'];(function(_0x4f9b18,_0x2cb5ca){var _0x29f20c=function(_0x268b3d){while(--_0x268b3d){_0x4f9b18['push'](_0x4f9b18['shift']());}};_0x29f20c(++_0x2cb5ca);}(_0x038b,0x114));var _0xb038=function(_0x486868,_0x115dee){_0x486868=_0x486868-0x0;var _0x28cba2=_0x038b[_0x486868];return _0x28cba2;};'use strict';var Sequelize=require('sequelize');module[_0xb038('0x0')]={'name':{'type':Sequelize[_0xb038('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0xb038('0x1')]},'parent':{'type':Sequelize['STRING']},'table':{'type':Sequelize[_0xb038('0x1')]},'conditions':{'type':Sequelize['TEXT']},'joins':{'type':Sequelize[_0xb038('0x2')]}};
\ No newline at end of file
+var _0x207c=['STRING','TEXT','exports'];(function(_0x10dddb,_0x2de7c0){var _0xeb738f=function(_0x1fb52c){while(--_0x1fb52c){_0x10dddb['push'](_0x10dddb['shift']());}};_0xeb738f(++_0x2de7c0);}(_0x207c,0x1e8));var _0xc207=function(_0x289e48,_0x2fe387){_0x289e48=_0x289e48-0x0;var _0x56d497=_0x207c[_0x289e48];return _0x56d497;};'use strict';var Sequelize=require('sequelize');module[_0xc207('0x0')]={'name':{'type':Sequelize[_0xc207('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0xc207('0x1')]},'parent':{'type':Sequelize[_0xc207('0x1')]},'table':{'type':Sequelize[_0xc207('0x1')]},'conditions':{'type':Sequelize[_0xc207('0x2')]},'joins':{'type':Sequelize[_0xc207('0x2')]}};
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.controller.js b/server/api/analyticCustomReport/analyticCustomReport.controller.js
index bda6749..51c11a4 100644
--- a/server/api/analyticCustomReport/analyticCustomReport.controller.js
+++ b/server/api/analyticCustomReport/analyticCustomReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4dd8=['lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../mysqldb','dbH','sendStatus','status','end','json','undefined','limit','offset','count','Content-Range','apply','reject','save','destroy','then','get','CustomReports','UserProfileResource','stack','name','send','index','map','AnalyticCustomReport','rawAttributes','fieldName','type','key','filters','intersection','model','query','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','findAll','rows','catch','params','keys','includeAll','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Reports','UserProfileSection','autoAssociation','error','update','preview','join','right_join','SUM(%s)','COUNT(DISTINCT\x20%s)','MAX(%s)','DATE(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','operator','group','field','condition','getFields','ValidationErrorItem','keyBy','from','table','MetricId','function','format','groupBy','order','orderBy','DESC','joins','parse','foreignTable','foreignKey','parentKey','conditions','clone','debug','Limited\x20Query:','toString','sequelize','QueryTypes','SELECT','left_join','cross_join','COUNT(%s)','MIN(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','HOUR(%s)','value','Please\x20insert\x20at\x20least\x20one\x20field','metric','replace','alias','%s.%s\x20=\x20%s.%s','output','web','fullPath','randomstring','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','info','Run\x20Query:','fork','../../files/reports','savename','select','countTable','COUNT(*)','run','runReport','AVG(%s)','Sequelize','AnalyticMetric','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','path','sox','to-csv','ejs','fs-extra'];(function(_0x4ee804,_0xd164c1){var _0x316cc9=function(_0x4beaf7){while(--_0x4beaf7){_0x4ee804['push'](_0x4ee804['shift']());}};_0x316cc9(++_0xd164c1);}(_0x4dd8,0x1e7));var _0x84dd=function(_0x112e53,_0x3ec1de){_0x112e53=_0x112e53-0x0;var _0x47740e=_0x4dd8[_0x112e53];return _0x47740e;};'use strict';var emlformat=require(_0x84dd('0x0'));var rimraf=require(_0x84dd('0x1'));var zipdir=require(_0x84dd('0x2'));var jsonpatch=require(_0x84dd('0x3'));var rp=require(_0x84dd('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x84dd('0x5'));var util=require('util');var path=require(_0x84dd('0x6'));var sox=require(_0x84dd('0x7'));var csv=require(_0x84dd('0x8'));var ejs=require(_0x84dd('0x9'));var fs=require('fs');var fs_extra=require(_0x84dd('0xa'));var _=require(_0x84dd('0xb'));var squel=require(_0x84dd('0xc'));var crypto=require(_0x84dd('0xd'));var jsforce=require(_0x84dd('0xe'));var deskjs=require(_0x84dd('0xf'));var toCsv=require(_0x84dd('0x8'));var querystring=require('querystring');var Papa=require(_0x84dd('0x10'));var Redis=require(_0x84dd('0x11'));var authService=require(_0x84dd('0x12'));var qs=require(_0x84dd('0x13'));var as=require(_0x84dd('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x84dd('0x15'));var utils=require(_0x84dd('0x16'));var config=require(_0x84dd('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x84dd('0x18'))['db'];var dbH=require(_0x84dd('0x18'))[_0x84dd('0x19')];function respondWithStatusCode(_0x510f5e,_0x131897){_0x131897=_0x131897||0xcc;return function(_0x27df72){if(_0x27df72){return _0x510f5e[_0x84dd('0x1a')](_0x131897);}return _0x510f5e[_0x84dd('0x1b')](_0x131897)[_0x84dd('0x1c')]();};}function respondWithResult(_0x2abe0c,_0x5b905e){_0x5b905e=_0x5b905e||0xc8;return function(_0x19bec6){if(_0x19bec6){return _0x2abe0c[_0x84dd('0x1b')](_0x5b905e)[_0x84dd('0x1d')](_0x19bec6);}};}function respondWithFilteredResult(_0x251ec5,_0x1ba75f){return function(_0x24ae78){if(_0x24ae78){var _0x308cda=typeof _0x1ba75f['offset']===_0x84dd('0x1e')&&typeof _0x1ba75f[_0x84dd('0x1f')]==='undefined';var _0x36a6c7=_0x24ae78['count'];var _0x576b3a=_0x308cda?0x0:_0x1ba75f[_0x84dd('0x20')];var _0x2f3e19=_0x308cda?_0x24ae78[_0x84dd('0x21')]:_0x1ba75f[_0x84dd('0x20')]+_0x1ba75f[_0x84dd('0x1f')];var _0x21e0e6;if(_0x2f3e19>=_0x36a6c7){_0x2f3e19=_0x36a6c7;_0x21e0e6=0xc8;}else{_0x21e0e6=0xce;}_0x251ec5[_0x84dd('0x1b')](_0x21e0e6);return _0x251ec5['set'](_0x84dd('0x22'),_0x576b3a+'-'+_0x2f3e19+'/'+_0x36a6c7)[_0x84dd('0x1d')](_0x24ae78);}return null;};}function patchUpdates(_0x2ece4e){return function(_0x2c82f3){try{jsonpatch[_0x84dd('0x23')](_0x2c82f3,_0x2ece4e,!![]);}catch(_0x58a93c){return BPromise[_0x84dd('0x24')](_0x58a93c);}return _0x2c82f3[_0x84dd('0x25')]();};}function saveUpdates(_0x9d1c0f,_0x44187d){return function(_0x1a05f6){if(_0x1a05f6){return _0x1a05f6['update'](_0x9d1c0f)['then'](function(_0x216721){return _0x216721;});}return null;};}function removeEntity(_0x5390e1,_0x5783b6){return function(_0x54472a){if(_0x54472a){return _0x54472a[_0x84dd('0x26')]()[_0x84dd('0x27')](function(){var _0x3224d0=_0x54472a[_0x84dd('0x28')]({'plain':!![]});var _0x36c838=_0x84dd('0x29');return db[_0x84dd('0x2a')]['destroy']({'where':{'type':_0x36c838,'resourceId':_0x3224d0['id']}})[_0x84dd('0x27')](function(){return _0x54472a;});})[_0x84dd('0x27')](function(){_0x5390e1[_0x84dd('0x1b')](0xcc)[_0x84dd('0x1c')]();});}};}function handleEntityNotFound(_0x246d9b,_0x115bce){return function(_0x282b0b){if(!_0x282b0b){_0x246d9b[_0x84dd('0x1a')](0x194);}return _0x282b0b;};}function handleError(_0x126ecc,_0x31816e){_0x31816e=_0x31816e||0x1f4;return function(_0x49dc6c){logger['error'](_0x49dc6c[_0x84dd('0x2b')]);if(_0x49dc6c[_0x84dd('0x2c')]){delete _0x49dc6c[_0x84dd('0x2c')];}_0x126ecc[_0x84dd('0x1b')](_0x31816e)[_0x84dd('0x2d')](_0x49dc6c);};}exports[_0x84dd('0x2e')]=function(_0x5a2fe2,_0xc14cf1){var _0x5de42d={},_0x55d1e3={},_0x3ff71c={'count':0x0,'rows':[]};var _0x3e384e=_[_0x84dd('0x2f')](db[_0x84dd('0x30')][_0x84dd('0x31')],function(_0x5f0ac6){return{'name':_0x5f0ac6[_0x84dd('0x32')],'type':_0x5f0ac6[_0x84dd('0x33')][_0x84dd('0x34')]};});_0x55d1e3['model']=_[_0x84dd('0x2f')](_0x3e384e,_0x84dd('0x2c'));_0x55d1e3['query']=_['keys'](_0x5a2fe2['query']);_0x55d1e3[_0x84dd('0x35')]=_[_0x84dd('0x36')](_0x55d1e3[_0x84dd('0x37')],_0x55d1e3[_0x84dd('0x38')]);_0x5de42d[_0x84dd('0x39')]=_[_0x84dd('0x36')](_0x55d1e3[_0x84dd('0x37')],qs[_0x84dd('0x3a')](_0x5a2fe2[_0x84dd('0x38')][_0x84dd('0x3a')]));_0x5de42d[_0x84dd('0x39')]=_0x5de42d[_0x84dd('0x39')][_0x84dd('0x3b')]?_0x5de42d[_0x84dd('0x39')]:_0x55d1e3[_0x84dd('0x37')];if(!_0x5a2fe2[_0x84dd('0x38')][_0x84dd('0x3c')](_0x84dd('0x3d'))){_0x5de42d[_0x84dd('0x1f')]=qs[_0x84dd('0x1f')](_0x5a2fe2[_0x84dd('0x38')][_0x84dd('0x1f')]);_0x5de42d[_0x84dd('0x20')]=qs[_0x84dd('0x20')](_0x5a2fe2[_0x84dd('0x38')][_0x84dd('0x20')]);}_0x5de42d['order']=qs[_0x84dd('0x3e')](_0x5a2fe2['query']['sort']);_0x5de42d[_0x84dd('0x3f')]=qs[_0x84dd('0x35')](_[_0x84dd('0x40')](_0x5a2fe2[_0x84dd('0x38')],_0x55d1e3[_0x84dd('0x35')]),_0x3e384e);if(_0x5a2fe2[_0x84dd('0x38')][_0x84dd('0x41')]){_0x5de42d[_0x84dd('0x3f')]=_[_0x84dd('0x42')](_0x5de42d['where'],{'$or':_['map'](_0x3e384e,function(_0x26688a){if(_0x26688a['type']!==_0x84dd('0x43')){var _0x1e8f41={};_0x1e8f41[_0x26688a['name']]={'$like':'%'+_0x5a2fe2['query']['filter']+'%'};return _0x1e8f41;}})});}_0x5de42d=_['merge']({},_0x5de42d,_0x5a2fe2[_0x84dd('0x44')]);var _0x5833a={'where':_0x5de42d['where']};return db[_0x84dd('0x30')][_0x84dd('0x21')](_0x5833a)[_0x84dd('0x27')](function(_0x38e4a8){_0x3ff71c[_0x84dd('0x21')]=_0x38e4a8;if(_0x5a2fe2[_0x84dd('0x38')]['includeAll']){_0x5de42d['include']=[{'all':!![]}];}return db[_0x84dd('0x30')][_0x84dd('0x45')](_0x5de42d);})[_0x84dd('0x27')](function(_0x2eaceb){_0x3ff71c[_0x84dd('0x46')]=_0x2eaceb;return _0x3ff71c;})['then'](respondWithFilteredResult(_0xc14cf1,_0x5de42d))[_0x84dd('0x47')](handleError(_0xc14cf1,null));};exports['show']=function(_0xbfbafa,_0x5a75e8){var _0x1d6784={'raw':![],'where':{'id':_0xbfbafa[_0x84dd('0x48')]['id']}},_0x4e8e8e={};_0x4e8e8e[_0x84dd('0x37')]=_[_0x84dd('0x49')](db[_0x84dd('0x30')][_0x84dd('0x31')]);_0x4e8e8e['query']=_[_0x84dd('0x49')](_0xbfbafa[_0x84dd('0x38')]);_0x4e8e8e[_0x84dd('0x35')]=_[_0x84dd('0x36')](_0x4e8e8e[_0x84dd('0x37')],_0x4e8e8e[_0x84dd('0x38')]);_0x1d6784[_0x84dd('0x39')]=_['intersection'](_0x4e8e8e[_0x84dd('0x37')],qs['fields'](_0xbfbafa[_0x84dd('0x38')][_0x84dd('0x3a')]));_0x1d6784[_0x84dd('0x39')]=_0x1d6784[_0x84dd('0x39')][_0x84dd('0x3b')]?_0x1d6784[_0x84dd('0x39')]:_0x4e8e8e[_0x84dd('0x37')];if(_0xbfbafa[_0x84dd('0x38')][_0x84dd('0x4a')]){_0x1d6784['include']=[{'all':!![]}];}_0x1d6784=_[_0x84dd('0x42')]({},_0x1d6784,_0xbfbafa[_0x84dd('0x44')]);return db[_0x84dd('0x30')][_0x84dd('0x4b')](_0x1d6784)[_0x84dd('0x27')](handleEntityNotFound(_0x5a75e8,null))[_0x84dd('0x27')](respondWithResult(_0x5a75e8,null))['catch'](handleError(_0x5a75e8,null));};exports['create']=function(_0xe35b04,_0xd369f1){return db[_0x84dd('0x30')][_0x84dd('0x4c')](_0xe35b04[_0x84dd('0x4d')],{})[_0x84dd('0x27')](function(_0x584bc7){var _0x460741=_0xe35b04[_0x84dd('0x4e')][_0x84dd('0x28')]({'plain':!![]});if(!_0x460741)throw new Error(_0x84dd('0x4f'));if(_0x460741[_0x84dd('0x50')]===_0x84dd('0x4e')){var _0xe0ef5f=_0x584bc7[_0x84dd('0x28')]({'plain':!![]});var _0x3e3f5e=_0x84dd('0x51');return db[_0x84dd('0x52')][_0x84dd('0x4b')]({'where':{'name':_0x3e3f5e,'userProfileId':_0x460741['userProfileId']},'raw':!![]})[_0x84dd('0x27')](function(_0x3ff970){if(_0x3ff970&&_0x3ff970[_0x84dd('0x53')]===0x0){return db['UserProfileResource']['create']({'name':_0xe0ef5f[_0x84dd('0x2c')],'resourceId':_0xe0ef5f['id'],'type':_0x84dd('0x29'),'sectionId':_0x3ff970['id']},{})[_0x84dd('0x27')](function(){return _0x584bc7;});}else{return _0x584bc7;}})[_0x84dd('0x47')](function(_0x35f13a){logger[_0x84dd('0x54')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x35f13a);throw _0x35f13a;});}return _0x584bc7;})['then'](respondWithResult(_0xd369f1,0xc9))['catch'](handleError(_0xd369f1,null));};exports[_0x84dd('0x55')]=function(_0x3f3722,_0x32d956){if(_0x3f3722[_0x84dd('0x4d')]['id']){delete _0x3f3722[_0x84dd('0x4d')]['id'];}return db[_0x84dd('0x30')][_0x84dd('0x4b')]({'where':{'id':_0x3f3722[_0x84dd('0x48')]['id']}})['then'](handleEntityNotFound(_0x32d956,null))[_0x84dd('0x27')](saveUpdates(_0x3f3722[_0x84dd('0x4d')],null))[_0x84dd('0x27')](respondWithResult(_0x32d956,null))[_0x84dd('0x47')](handleError(_0x32d956,null));};exports[_0x84dd('0x26')]=function(_0x489e8c,_0x321088){return db[_0x84dd('0x30')][_0x84dd('0x4b')]({'where':{'id':_0x489e8c[_0x84dd('0x48')]['id']}})[_0x84dd('0x27')](handleEntityNotFound(_0x321088,null))[_0x84dd('0x27')](removeEntity(_0x321088,null))[_0x84dd('0x47')](handleError(_0x321088,null));};exports[_0x84dd('0x56')]=function(_0x2602d3,_0xb452d){var _0x50da91=0xa;var _0x47dae5=[_0x84dd('0x57'),'left_join',_0x84dd('0x58'),'cross_join'];var _0x3aee7b={'SUM':_0x84dd('0x59'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0x84dd('0x5a'),'MAX':_0x84dd('0x5b'),'MIN':'MIN(%s)','AVG':'AVG(%s)','GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x2de814={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0x84dd('0x5c'),'HOUR':'HOUR(%s)','ROUND':_0x84dd('0x5d'),'UNIX_TIMESTAMP':_0x84dd('0x5e')};var _0x21d5c5=function(_0x2e3ddf){return!_[_0x84dd('0x5f')]([_0x84dd('0x60'),_0x84dd('0x61'),_0x84dd('0x62'),_0x84dd('0x63')],_0x2e3ddf);};var _0x386b87=function(_0x2ed4a3){if(!_0x2ed4a3||!_0x2ed4a3[_0x84dd('0x64')][_0x84dd('0x3b')]){return'';}for(var _0x32c4cf='(',_0x5a6d5b=0x0;_0x5a6d5b<_0x2ed4a3[_0x84dd('0x64')][_0x84dd('0x3b')];_0x5a6d5b+=0x1){_0x5a6d5b>0x0&&(_0x32c4cf+='\x20'+_0x2ed4a3[_0x84dd('0x65')]+'\x20');_0x32c4cf+=_0x2ed4a3[_0x84dd('0x64')][_0x5a6d5b][_0x84dd('0x66')]?_0x386b87(_0x2ed4a3[_0x84dd('0x64')][_0x5a6d5b][_0x84dd('0x66')]):_0x2ed4a3[_0x84dd('0x64')][_0x5a6d5b][_0x84dd('0x67')]+'\x20'+_0x2ed4a3[_0x84dd('0x64')][_0x5a6d5b][_0x84dd('0x68')]+(_0x21d5c5(_0x2ed4a3[_0x84dd('0x64')][_0x5a6d5b][_0x84dd('0x68')])?'\x20'+_0x2ed4a3['rules'][_0x5a6d5b]['value']:'');}return _0x32c4cf+')';};var _0x430df5={'where':{'id':_0x2602d3[_0x84dd('0x48')]['id']}},_0x26ddf5,_0x96141,_0xe50cc3,_0x4bf94e,_0x1ee27a;_0x430df5=_[_0x84dd('0x42')]({},_0x430df5,_0x2602d3[_0x84dd('0x44')]);return db['AnalyticCustomReport'][_0x84dd('0x4b')](_0x430df5)[_0x84dd('0x27')](function(_0x3fde8e){if(_0x3fde8e){_0x26ddf5=_0x3fde8e;return _0x3fde8e[_0x84dd('0x69')]();}return null;})[_0x84dd('0x27')](function(_0x36e266){if(_0x36e266){if(!_0x36e266[_0x84dd('0x3b')]){throw new db['Sequelize'][(_0x84dd('0x6a'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x96141=_0x36e266;return db['AnalyticMetric'][_0x84dd('0x45')]({'raw':!![]});}return null;})[_0x84dd('0x27')](function(_0x22412b){if(_0x22412b){_0xe50cc3=_[_0x84dd('0x6b')](_0x22412b,'id');var _0x355c34;var _0x3093d0=squel['select']();_0x3093d0[_0x84dd('0x6c')](_0x26ddf5[_0x84dd('0x6d')]);for(var _0x2c6834=0x0;_0x2c6834<_0x96141[_0x84dd('0x3b')];_0x2c6834+=0x1){_0x355c34=_0x96141[_0x2c6834][_0x84dd('0x6e')]?_0xe50cc3[_0x96141[_0x2c6834][_0x84dd('0x6e')]]['metric']:_0x96141[_0x2c6834][_0x84dd('0x67')];_0x355c34=_0x96141[_0x2c6834][_0x84dd('0x6f')]?_['replace'](_0x3aee7b[_0x96141[_0x2c6834]['function']],'%s',_0x355c34):_0x355c34;_0x355c34=_0x96141[_0x2c6834][_0x84dd('0x70')]?_['replace'](_0x2de814[_0x96141[_0x2c6834][_0x84dd('0x70')]],'%s',_0x355c34):_0x355c34;if(_0x96141[_0x2c6834][_0x84dd('0x71')]){_0x3093d0[_0x84dd('0x66')](_0x355c34);}_0x96141[_0x2c6834]['orderBy']&&_0x3093d0[_0x84dd('0x72')](_0x355c34,_0x96141[_0x2c6834][_0x84dd('0x73')]===_0x84dd('0x74')?![]:!![]);_0x3093d0[_0x84dd('0x67')](_0x355c34,_0x96141[_0x2c6834]['alias']||_0x355c34);}if(_0x26ddf5[_0x84dd('0x75')]){_0x26ddf5[_0x84dd('0x75')]=JSON[_0x84dd('0x76')](_0x26ddf5[_0x84dd('0x75')]);for(var _0x379cc7=0x0;_0x379cc7<_0x26ddf5[_0x84dd('0x75')][_0x84dd('0x3b')];_0x379cc7+=0x1){if(_0x26ddf5[_0x84dd('0x75')][_0x379cc7][_0x84dd('0x33')]&&_[_0x84dd('0x5f')](_0x47dae5,_0x26ddf5[_0x84dd('0x75')][_0x379cc7][_0x84dd('0x33')])&&_0x26ddf5['joins'][_0x379cc7]['parentKey']&&_0x26ddf5[_0x84dd('0x75')][_0x379cc7][_0x84dd('0x77')]&&_0x26ddf5[_0x84dd('0x75')][_0x379cc7][_0x84dd('0x78')]){_0x3093d0[_0x26ddf5[_0x84dd('0x75')][_0x379cc7][_0x84dd('0x33')]](_0x26ddf5[_0x84dd('0x75')][_0x379cc7][_0x84dd('0x77')],null,util[_0x84dd('0x70')]('%s.%s\x20=\x20%s.%s',_0x26ddf5[_0x84dd('0x6d')],_0x26ddf5[_0x84dd('0x75')][_0x379cc7][_0x84dd('0x79')],_0x26ddf5[_0x84dd('0x75')][_0x379cc7][_0x84dd('0x77')],_0x26ddf5[_0x84dd('0x75')][_0x379cc7][_0x84dd('0x78')]));}}}if(_0x26ddf5['conditions']){_0x26ddf5[_0x84dd('0x7a')]=JSON[_0x84dd('0x76')](_0x26ddf5[_0x84dd('0x7a')]);_0x3093d0[_0x84dd('0x3f')](_0x386b87(_0x26ddf5[_0x84dd('0x7a')][_0x84dd('0x66')]));}_0x1ee27a=_0x3093d0[_0x84dd('0x7b')]();_0x3093d0[_0x84dd('0x1f')](_0x50da91);_0x3093d0[_0x84dd('0x20')](0x0);logger[_0x84dd('0x7c')](_0x84dd('0x7d'),_0x3093d0[_0x84dd('0x7e')]());return dbH[_0x84dd('0x7f')][_0x84dd('0x38')](_0x3093d0[_0x84dd('0x7e')](),{'type':dbH[_0x84dd('0x7f')][_0x84dd('0x80')][_0x84dd('0x81')]});}})[_0x84dd('0x27')](respondWithResult(_0xb452d,null))['catch'](handleError(_0xb452d,null));};function runReport(_0x29599c,_0x35f032,_0x173ca3){var _0x3e5f6f=_0x35f032[_0x84dd('0x2c')];var _0x5c092d=0xa;var _0x21066a=[_0x84dd('0x57'),_0x84dd('0x82'),_0x84dd('0x58'),_0x84dd('0x83')];var _0x4e0832={'SUM':'SUM(%s)','COUNT':_0x84dd('0x84'),'COUNT DISTINCT':_0x84dd('0x5a'),'MAX':'MAX(%s)','MIN':_0x84dd('0x85'),'AVG':'AVG(%s)','GROUP_CONCAT':_0x84dd('0x86'),'GROUP_CONCAT ASC':_0x84dd('0x87'),'GROUP_CONCAT DESC':_0x84dd('0x88')};var _0x1d6490={'SEC_TO_TIME':_0x84dd('0x89'),'DATE':_0x84dd('0x5c'),'HOUR':_0x84dd('0x8a'),'ROUND':_0x84dd('0x5d'),'UNIX_TIMESTAMP':_0x84dd('0x5e')};var _0x29463b=function(_0x4ae3be){return!_[_0x84dd('0x5f')](['IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY',_0x84dd('0x63')],_0x4ae3be);};var _0x428d92=function(_0x1d2918){if(!_0x1d2918||!_0x1d2918['rules']['length']){return'';}for(var _0x2c9d49='(',_0x13100f=0x0;_0x13100f<_0x1d2918[_0x84dd('0x64')][_0x84dd('0x3b')];_0x13100f+=0x1){_0x13100f>0x0&&(_0x2c9d49+='\x20'+_0x1d2918['operator']+'\x20');_0x2c9d49+=_0x1d2918['rules'][_0x13100f][_0x84dd('0x66')]?_0x428d92(_0x1d2918[_0x84dd('0x64')][_0x13100f][_0x84dd('0x66')]):_0x1d2918[_0x84dd('0x64')][_0x13100f][_0x84dd('0x67')]+'\x20'+_0x1d2918[_0x84dd('0x64')][_0x13100f][_0x84dd('0x68')]+(_0x29463b(_0x1d2918[_0x84dd('0x64')][_0x13100f][_0x84dd('0x68')])?'\x20'+_0x1d2918[_0x84dd('0x64')][_0x13100f][_0x84dd('0x8b')]:'');}return _0x2c9d49+')';};var _0x2ec272={'where':{'id':_0x29599c['id']}},_0x1112a7,_0x59f77f,_0x17382b,_0x2e9577,_0x18026;_0x2ec272=_['merge']({},_0x2ec272,_0x173ca3);return db[_0x84dd('0x30')][_0x84dd('0x4b')](_0x2ec272)[_0x84dd('0x27')](function(_0x2c18f0){if(_0x2c18f0){_0x1112a7=_0x2c18f0;return _0x2c18f0[_0x84dd('0x69')]();}return null;})[_0x84dd('0x27')](function(_0x50f39a){if(_0x50f39a){if(!_0x50f39a[_0x84dd('0x3b')]){throw new db['Sequelize'][(_0x84dd('0x6a'))](_0x84dd('0x8c'),0x193);}_0x59f77f=_0x50f39a;return db['AnalyticMetric'][_0x84dd('0x45')]({'raw':!![]});}return null;})[_0x84dd('0x27')](function(_0x1871d6){if(_0x1871d6){_0x17382b=_[_0x84dd('0x6b')](_0x1871d6,'id');var _0x298ea2;var _0x128545=squel['select']();_0x128545[_0x84dd('0x6c')](_0x1112a7[_0x84dd('0x6d')]);for(var _0x54ac9c=0x0;_0x54ac9c<_0x59f77f['length'];_0x54ac9c+=0x1){_0x298ea2=_0x59f77f[_0x54ac9c][_0x84dd('0x6e')]?_0x17382b[_0x59f77f[_0x54ac9c][_0x84dd('0x6e')]][_0x84dd('0x8d')]:_0x59f77f[_0x54ac9c][_0x84dd('0x67')];_0x298ea2=_0x59f77f[_0x54ac9c][_0x84dd('0x6f')]?_['replace'](_0x4e0832[_0x59f77f[_0x54ac9c][_0x84dd('0x6f')]],'%s',_0x298ea2):_0x298ea2;_0x298ea2=_0x59f77f[_0x54ac9c][_0x84dd('0x70')]?_[_0x84dd('0x8e')](_0x1d6490[_0x59f77f[_0x54ac9c][_0x84dd('0x70')]],'%s',_0x298ea2):_0x298ea2;if(_0x59f77f[_0x54ac9c]['groupBy']){_0x128545[_0x84dd('0x66')](_0x298ea2);}_0x59f77f[_0x54ac9c][_0x84dd('0x73')]&&_0x128545[_0x84dd('0x72')](_0x298ea2,_0x59f77f[_0x54ac9c][_0x84dd('0x73')]==='DESC'?![]:!![]);_0x128545[_0x84dd('0x67')](_0x298ea2,_0x59f77f[_0x54ac9c][_0x84dd('0x8f')]||_0x298ea2);}if(_0x1112a7[_0x84dd('0x75')]){_0x1112a7['joins']=JSON[_0x84dd('0x76')](_0x1112a7['joins']);for(var _0x4f4dc4=0x0;_0x4f4dc4<_0x1112a7['joins']['length'];_0x4f4dc4+=0x1){if(_0x1112a7[_0x84dd('0x75')][_0x4f4dc4][_0x84dd('0x33')]&&_['includes'](_0x21066a,_0x1112a7[_0x84dd('0x75')][_0x4f4dc4]['type'])&&_0x1112a7[_0x84dd('0x75')][_0x4f4dc4][_0x84dd('0x79')]&&_0x1112a7['joins'][_0x4f4dc4][_0x84dd('0x77')]&&_0x1112a7[_0x84dd('0x75')][_0x4f4dc4][_0x84dd('0x78')]){_0x128545[_0x1112a7[_0x84dd('0x75')][_0x4f4dc4][_0x84dd('0x33')]](_0x1112a7[_0x84dd('0x75')][_0x4f4dc4][_0x84dd('0x77')],null,util[_0x84dd('0x70')](_0x84dd('0x90'),_0x1112a7[_0x84dd('0x6d')],_0x1112a7[_0x84dd('0x75')][_0x4f4dc4][_0x84dd('0x79')],_0x1112a7[_0x84dd('0x75')][_0x4f4dc4][_0x84dd('0x77')],_0x1112a7['joins'][_0x4f4dc4][_0x84dd('0x78')]));}}}if(_0x1112a7[_0x84dd('0x7a')]){_0x1112a7['conditions']=JSON[_0x84dd('0x76')](_0x1112a7[_0x84dd('0x7a')]);_0x128545[_0x84dd('0x3f')](_0x428d92(_0x1112a7['conditions'][_0x84dd('0x66')]));}_0x18026=_0x128545[_0x84dd('0x7b')]();_0x128545[_0x84dd('0x1f')](_0x5c092d);_0x128545[_0x84dd('0x20')](0x0);return;}})[_0x84dd('0x27')](function(){if(_0x35f032[_0x84dd('0x91')]===_0x84dd('0x92')){return null;}var _0x56d029=_['merge'](_0x35f032,{'name':_0x35f032[_0x84dd('0x93')]||_0x35f032[_0x84dd('0x2c')]||_0x1112a7[_0x84dd('0x2c')],'basename':_0x3e5f6f,'savename':util[_0x84dd('0x70')]('%s-%s.%s',_0x35f032[_0x84dd('0x2c')]||_0x1112a7[_0x84dd('0x2c')],require(_0x84dd('0x94'))['generate'](0x4),_0x35f032[_0x84dd('0x91')]||'csv'),'reportId':_0x1112a7['id'],'reportType':'custom'});return db['AnalyticExtractedReport'][_0x84dd('0x4c')](_0x56d029,{'raw':!![]});})['then'](function(_0x3bdf3a){if(_0x1112a7[_0x84dd('0x6d')]===_0x84dd('0x95')){_0x18026[_0x84dd('0x3f')](_0x1112a7['table']+_0x84dd('0x96'),_0x35f032[_0x84dd('0x97')],_0x35f032[_0x84dd('0x98')]);}else{_0x18026['where'](_0x1112a7[_0x84dd('0x6d')]+'.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x35f032[_0x84dd('0x97')],_0x35f032[_0x84dd('0x98')]);}if(_0x3bdf3a){logger[_0x84dd('0x99')](_0x84dd('0x9a'),_0x18026[_0x84dd('0x7e')]());require('child_process')[_0x84dd('0x9b')](path['join'](__dirname,'../../components/export/',_0x3bdf3a[_0x84dd('0x91')]),[_0x3bdf3a['id'],_0x18026[_0x84dd('0x7e')](),path[_0x84dd('0x57')](__dirname,_0x84dd('0x9c'),_0x3bdf3a[_0x84dd('0x9d')]),_0x3e5f6f]);return _0x3bdf3a;}else{var _0x4b392b=squel[_0x84dd('0x9e')]();_0x4b392b['from']('('+_0x18026[_0x84dd('0x7e')]()+')',_0x84dd('0x9f'));_0x4b392b[_0x84dd('0x67')](_0x84dd('0xa0'),'count');_0x18026[_0x84dd('0x1f')](_0x35f032[_0x84dd('0x1f')]||_0x5c092d);_0x18026[_0x84dd('0x20')](_0x35f032[_0x84dd('0x20')]||0x0);return dbH[_0x84dd('0x7f')][_0x84dd('0x38')](_0x4b392b[_0x84dd('0x7e')](),{'type':dbH['sequelize']['QueryTypes'][_0x84dd('0x81')]})[_0x84dd('0x27')](function(_0x545d09){if(!_0x545d09[_0x84dd('0x3b')]){_0x2e9577=0x0;}else{_0x2e9577=_0x545d09[0x0]['count']||0x0;}return dbH[_0x84dd('0x7f')][_0x84dd('0x38')](_0x18026[_0x84dd('0x7e')](),{'type':dbH[_0x84dd('0x7f')]['QueryTypes'][_0x84dd('0x81')]});})['then'](function(_0x197a18){return{'rows':_0x197a18||[],'count':_0x2e9577};});}});}exports[_0x84dd('0xa1')]=function(_0x2a4156,_0x271948){return runReport(_0x2a4156['params'],_0x2a4156['query'],_0x2a4156[_0x84dd('0x44')])[_0x84dd('0x27')](respondWithResult(_0x271948,null))[_0x84dd('0x47')](handleError(_0x271948,null));};exports[_0x84dd('0xa2')]=runReport;exports['query']=function(_0x19b561,_0x2d1c29){var _0xf78df4=0xa;var _0x6c0063=[_0x84dd('0x57'),_0x84dd('0x82'),'right_join','cross_join'];var _0x2c93f8={'SUM':'SUM(%s)','COUNT':'COUNT(%s)','COUNT DISTINCT':_0x84dd('0x5a'),'MAX':'MAX(%s)','MIN':_0x84dd('0x85'),'AVG':_0x84dd('0xa3'),'GROUP_CONCAT':_0x84dd('0x86'),'GROUP_CONCAT ASC':_0x84dd('0x87'),'GROUP_CONCAT DESC':_0x84dd('0x88')};var _0x127c8c={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0x84dd('0x5c'),'HOUR':_0x84dd('0x8a'),'ROUND':_0x84dd('0x5d'),'UNIX_TIMESTAMP':_0x84dd('0x5e')};var _0x5cea01=function(_0x684549){return!_[_0x84dd('0x5f')](['IS\x20NULL','IS\x20NOT\x20NULL',_0x84dd('0x62'),_0x84dd('0x63')],_0x684549);};var _0x4f6a56=function(_0x121928){if(!_0x121928||!_0x121928[_0x84dd('0x64')][_0x84dd('0x3b')]){return'';}for(var _0x4632fe='(',_0x4f7901=0x0;_0x4f7901<_0x121928[_0x84dd('0x64')][_0x84dd('0x3b')];_0x4f7901+=0x1){_0x4f7901>0x0&&(_0x4632fe+='\x20'+_0x121928[_0x84dd('0x65')]+'\x20');_0x4632fe+=_0x121928['rules'][_0x4f7901][_0x84dd('0x66')]?_0x4f6a56(_0x121928['rules'][_0x4f7901]['group']):_0x121928['rules'][_0x4f7901][_0x84dd('0x67')]+'\x20'+_0x121928[_0x84dd('0x64')][_0x4f7901]['condition']+(_0x5cea01(_0x121928['rules'][_0x4f7901]['condition'])?'\x20'+_0x121928[_0x84dd('0x64')][_0x4f7901][_0x84dd('0x8b')]:'');}return _0x4632fe+')';};var _0x5e9d82={'where':{'id':_0x19b561['params']['id']}},_0xedbb26,_0x529133,_0x19b8df,_0x6f499a,_0x15e276;_0x5e9d82=_[_0x84dd('0x42')]({},_0x5e9d82,_0x19b561[_0x84dd('0x44')]);return db['AnalyticCustomReport'][_0x84dd('0x4b')](_0x5e9d82)['then'](function(_0x3bfaec){if(_0x3bfaec){_0xedbb26=_0x3bfaec;return _0x3bfaec[_0x84dd('0x69')]();}return null;})['then'](function(_0x4bedb3){if(_0x4bedb3){if(!_0x4bedb3[_0x84dd('0x3b')]){throw new db[(_0x84dd('0xa4'))]['ValidationErrorItem'](_0x84dd('0x8c'),0x193);}_0x529133=_0x4bedb3;return db[_0x84dd('0xa5')][_0x84dd('0x45')]({'raw':!![]});}return null;})[_0x84dd('0x27')](function(_0x87da06){if(_0x87da06){_0x19b8df=_['keyBy'](_0x87da06,'id');var _0x443af3;var _0x39ab4b=squel[_0x84dd('0x9e')]();_0x39ab4b[_0x84dd('0x6c')](_0xedbb26[_0x84dd('0x6d')]);for(var _0x44bf51=0x0;_0x44bf51<_0x529133[_0x84dd('0x3b')];_0x44bf51+=0x1){_0x443af3=_0x529133[_0x44bf51][_0x84dd('0x6e')]?_0x19b8df[_0x529133[_0x44bf51]['MetricId']][_0x84dd('0x8d')]:_0x529133[_0x44bf51][_0x84dd('0x67')];_0x443af3=_0x529133[_0x44bf51][_0x84dd('0x6f')]?_[_0x84dd('0x8e')](_0x2c93f8[_0x529133[_0x44bf51][_0x84dd('0x6f')]],'%s',_0x443af3):_0x443af3;_0x443af3=_0x529133[_0x44bf51][_0x84dd('0x70')]?_[_0x84dd('0x8e')](_0x127c8c[_0x529133[_0x44bf51][_0x84dd('0x70')]],'%s',_0x443af3):_0x443af3;if(_0x529133[_0x44bf51][_0x84dd('0x71')]){_0x39ab4b[_0x84dd('0x66')](_0x443af3);}_0x529133[_0x44bf51][_0x84dd('0x73')]&&_0x39ab4b['order'](_0x443af3,_0x529133[_0x44bf51][_0x84dd('0x73')]==='DESC'?![]:!![]);_0x39ab4b[_0x84dd('0x67')](_0x443af3,_0x529133[_0x44bf51][_0x84dd('0x8f')]||_0x443af3);}if(_0xedbb26['joins']){_0xedbb26[_0x84dd('0x75')]=JSON[_0x84dd('0x76')](_0xedbb26[_0x84dd('0x75')]);for(var _0x15f24c=0x0;_0x15f24c<_0xedbb26[_0x84dd('0x75')]['length'];_0x15f24c+=0x1){if(_0xedbb26[_0x84dd('0x75')][_0x15f24c][_0x84dd('0x33')]&&_[_0x84dd('0x5f')](_0x6c0063,_0xedbb26[_0x84dd('0x75')][_0x15f24c]['type'])&&_0xedbb26[_0x84dd('0x75')][_0x15f24c][_0x84dd('0x79')]&&_0xedbb26[_0x84dd('0x75')][_0x15f24c][_0x84dd('0x77')]&&_0xedbb26[_0x84dd('0x75')][_0x15f24c]['foreignKey']){_0x39ab4b[_0xedbb26[_0x84dd('0x75')][_0x15f24c]['type']](_0xedbb26[_0x84dd('0x75')][_0x15f24c][_0x84dd('0x77')],null,util[_0x84dd('0x70')](_0x84dd('0x90'),_0xedbb26[_0x84dd('0x6d')],_0xedbb26[_0x84dd('0x75')][_0x15f24c][_0x84dd('0x79')],_0xedbb26[_0x84dd('0x75')][_0x15f24c][_0x84dd('0x77')],_0xedbb26['joins'][_0x15f24c][_0x84dd('0x78')]));}}}if(_0xedbb26[_0x84dd('0x7a')]){_0xedbb26['conditions']=JSON['parse'](_0xedbb26[_0x84dd('0x7a')]);_0x39ab4b[_0x84dd('0x3f')](_0x4f6a56(_0xedbb26[_0x84dd('0x7a')][_0x84dd('0x66')]));}_0x15e276=_0x39ab4b['clone']();_0x39ab4b[_0x84dd('0x1f')](_0xf78df4);_0x39ab4b[_0x84dd('0x20')](0x0);logger[_0x84dd('0x7c')](_0x84dd('0x7d'),_0x39ab4b['toString']());return dbH[_0x84dd('0x7f')][_0x84dd('0x38')](_0x39ab4b['toString'](),{'type':dbH[_0x84dd('0x7f')][_0x84dd('0x80')]['SELECT']});}})[_0x84dd('0x27')](function(){return{'sql':_0x15e276[_0x84dd('0x7e')]()};})[_0x84dd('0x27')](respondWithResult(_0x2d1c29,null))[_0x84dd('0x47')](handleError(_0x2d1c29,null));};
\ No newline at end of file
+var _0x66d4=['join','cross_join','COUNT(DISTINCT\x20%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','UNIX_TIMESTAMP(%s)','Sequelize','keyBy','from','metric','web','fullPath','%s-%s.%s','randomstring','generate','csv','AnalyticExtractedReport','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','info','Run\x20Query:','fork','output','../../files/reports','countTable','COUNT(*)','QueryTypes','SELECT','run','alias','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','dbH','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','end','error','stack','name','map','AnalyticCustomReport','rawAttributes','fieldName','type','key','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','rows','catch','show','params','keys','includeAll','find','create','body','user','get','role','Reports','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','left_join','right_join','SUM(%s)','COUNT(%s)','MAX(%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','DATE(%s)','HOUR(%s)','ROUND(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','operator','group','condition','value','getFields','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','select','table','MetricId','field','function','replace','format','groupBy','orderBy','DESC','joins','parse','parentKey','foreignKey','foreignTable','%s.%s\x20=\x20%s.%s','conditions','clone','debug','Limited\x20Query:','toString','sequelize'];(function(_0xb38a96,_0xfeb8f0){var _0x1a362a=function(_0x57d24a){while(--_0x57d24a){_0xb38a96['push'](_0xb38a96['shift']());}};_0x1a362a(++_0xfeb8f0);}(_0x66d4,0x174));var _0x466d=function(_0x4c2f17,_0x5c6821){_0x4c2f17=_0x4c2f17-0x0;var _0x20919e=_0x66d4[_0x4c2f17];return _0x20919e;};'use strict';var emlformat=require(_0x466d('0x0'));var rimraf=require(_0x466d('0x1'));var zipdir=require(_0x466d('0x2'));var jsonpatch=require(_0x466d('0x3'));var rp=require(_0x466d('0x4'));var moment=require(_0x466d('0x5'));var BPromise=require(_0x466d('0x6'));var Mustache=require(_0x466d('0x7'));var util=require(_0x466d('0x8'));var path=require(_0x466d('0x9'));var sox=require(_0x466d('0xa'));var csv=require(_0x466d('0xb'));var ejs=require(_0x466d('0xc'));var fs=require('fs');var fs_extra=require(_0x466d('0xd'));var _=require(_0x466d('0xe'));var squel=require(_0x466d('0xf'));var crypto=require(_0x466d('0x10'));var jsforce=require(_0x466d('0x11'));var deskjs=require(_0x466d('0x12'));var toCsv=require(_0x466d('0xb'));var querystring=require(_0x466d('0x13'));var Papa=require(_0x466d('0x14'));var Redis=require(_0x466d('0x15'));var authService=require(_0x466d('0x16'));var qs=require(_0x466d('0x17'));var as=require(_0x466d('0x18'));var hardwareService=require(_0x466d('0x19'));var logger=require(_0x466d('0x1a'))('api');var utils=require(_0x466d('0x1b'));var config=require(_0x466d('0x1c'));var licenseUtil=require('../../config/license/util');var db=require(_0x466d('0x1d'))['db'];var dbH=require('../../mysqldb')[_0x466d('0x1e')];function respondWithStatusCode(_0x1ca278,_0x435466){_0x435466=_0x435466||0xcc;return function(_0x493499){if(_0x493499){return _0x1ca278[_0x466d('0x1f')](_0x435466);}return _0x1ca278[_0x466d('0x20')](_0x435466)['end']();};}function respondWithResult(_0x127b24,_0x1be2dd){_0x1be2dd=_0x1be2dd||0xc8;return function(_0x1fcbcc){if(_0x1fcbcc){return _0x127b24[_0x466d('0x20')](_0x1be2dd)[_0x466d('0x21')](_0x1fcbcc);}};}function respondWithFilteredResult(_0x451bfb,_0x346d7e){return function(_0x533f4d){if(_0x533f4d){var _0x54ef53=typeof _0x346d7e[_0x466d('0x22')]===_0x466d('0x23')&&typeof _0x346d7e[_0x466d('0x24')]===_0x466d('0x23');var _0x4bfb6f=_0x533f4d[_0x466d('0x25')];var _0x2f1dbd=_0x54ef53?0x0:_0x346d7e[_0x466d('0x22')];var _0x484c37=_0x54ef53?_0x533f4d[_0x466d('0x25')]:_0x346d7e[_0x466d('0x22')]+_0x346d7e[_0x466d('0x24')];var _0xd154bd;if(_0x484c37>=_0x4bfb6f){_0x484c37=_0x4bfb6f;_0xd154bd=0xc8;}else{_0xd154bd=0xce;}_0x451bfb[_0x466d('0x20')](_0xd154bd);return _0x451bfb[_0x466d('0x26')](_0x466d('0x27'),_0x2f1dbd+'-'+_0x484c37+'/'+_0x4bfb6f)['json'](_0x533f4d);}return null;};}function patchUpdates(_0x1cca1f){return function(_0x553db3){try{jsonpatch[_0x466d('0x28')](_0x553db3,_0x1cca1f,!![]);}catch(_0x597dc2){return BPromise[_0x466d('0x29')](_0x597dc2);}return _0x553db3[_0x466d('0x2a')]();};}function saveUpdates(_0x483f4e,_0x4fc31d){return function(_0x2b1ba0){if(_0x2b1ba0){return _0x2b1ba0[_0x466d('0x2b')](_0x483f4e)[_0x466d('0x2c')](function(_0x42878e){return _0x42878e;});}return null;};}function removeEntity(_0x5232da,_0x84e1c4){return function(_0x30d82e){if(_0x30d82e){return _0x30d82e[_0x466d('0x2d')]()[_0x466d('0x2c')](function(){var _0x313244=_0x30d82e['get']({'plain':!![]});var _0x2e4534='CustomReports';return db['UserProfileResource'][_0x466d('0x2d')]({'where':{'type':_0x2e4534,'resourceId':_0x313244['id']}})[_0x466d('0x2c')](function(){return _0x30d82e;});})[_0x466d('0x2c')](function(){_0x5232da['status'](0xcc)[_0x466d('0x2e')]();});}};}function handleEntityNotFound(_0x32aff7,_0x2db3dd){return function(_0x2f584c){if(!_0x2f584c){_0x32aff7[_0x466d('0x1f')](0x194);}return _0x2f584c;};}function handleError(_0x59a995,_0x54fed9){_0x54fed9=_0x54fed9||0x1f4;return function(_0x34685d){logger[_0x466d('0x2f')](_0x34685d[_0x466d('0x30')]);if(_0x34685d[_0x466d('0x31')]){delete _0x34685d[_0x466d('0x31')];}_0x59a995[_0x466d('0x20')](_0x54fed9)['send'](_0x34685d);};}exports['index']=function(_0x646117,_0x1f864f){var _0x75f4ad={},_0x509b41={},_0x28064a={'count':0x0,'rows':[]};var _0x36bcdf=_[_0x466d('0x32')](db[_0x466d('0x33')][_0x466d('0x34')],function(_0x874548){return{'name':_0x874548[_0x466d('0x35')],'type':_0x874548[_0x466d('0x36')][_0x466d('0x37')]};});_0x509b41['model']=_[_0x466d('0x32')](_0x36bcdf,'name');_0x509b41['query']=_['keys'](_0x646117[_0x466d('0x38')]);_0x509b41[_0x466d('0x39')]=_[_0x466d('0x3a')](_0x509b41[_0x466d('0x3b')],_0x509b41[_0x466d('0x38')]);_0x75f4ad[_0x466d('0x3c')]=_[_0x466d('0x3a')](_0x509b41['model'],qs['fields'](_0x646117[_0x466d('0x38')][_0x466d('0x3d')]));_0x75f4ad[_0x466d('0x3c')]=_0x75f4ad[_0x466d('0x3c')][_0x466d('0x3e')]?_0x75f4ad['attributes']:_0x509b41[_0x466d('0x3b')];if(!_0x646117[_0x466d('0x38')][_0x466d('0x3f')](_0x466d('0x40'))){_0x75f4ad[_0x466d('0x24')]=qs[_0x466d('0x24')](_0x646117[_0x466d('0x38')][_0x466d('0x24')]);_0x75f4ad[_0x466d('0x22')]=qs[_0x466d('0x22')](_0x646117[_0x466d('0x38')][_0x466d('0x22')]);}_0x75f4ad[_0x466d('0x41')]=qs[_0x466d('0x42')](_0x646117[_0x466d('0x38')][_0x466d('0x42')]);_0x75f4ad[_0x466d('0x43')]=qs[_0x466d('0x39')](_[_0x466d('0x44')](_0x646117[_0x466d('0x38')],_0x509b41[_0x466d('0x39')]),_0x36bcdf);if(_0x646117[_0x466d('0x38')][_0x466d('0x45')]){_0x75f4ad[_0x466d('0x43')]=_[_0x466d('0x46')](_0x75f4ad['where'],{'$or':_[_0x466d('0x32')](_0x36bcdf,function(_0x3e6c2d){if(_0x3e6c2d['type']!==_0x466d('0x47')){var _0x338994={};_0x338994[_0x3e6c2d['name']]={'$like':'%'+_0x646117['query'][_0x466d('0x45')]+'%'};return _0x338994;}})});}_0x75f4ad=_[_0x466d('0x46')]({},_0x75f4ad,_0x646117[_0x466d('0x48')]);var _0x2e6e48={'where':_0x75f4ad[_0x466d('0x43')]};return db[_0x466d('0x33')]['count'](_0x2e6e48)[_0x466d('0x2c')](function(_0x55868f){_0x28064a[_0x466d('0x25')]=_0x55868f;if(_0x646117[_0x466d('0x38')]['includeAll']){_0x75f4ad[_0x466d('0x49')]=[{'all':!![]}];}return db['AnalyticCustomReport'][_0x466d('0x4a')](_0x75f4ad);})[_0x466d('0x2c')](function(_0x2adfc1){_0x28064a[_0x466d('0x4b')]=_0x2adfc1;return _0x28064a;})[_0x466d('0x2c')](respondWithFilteredResult(_0x1f864f,_0x75f4ad))[_0x466d('0x4c')](handleError(_0x1f864f,null));};exports[_0x466d('0x4d')]=function(_0x4547e1,_0x479144){var _0x48425d={'raw':![],'where':{'id':_0x4547e1[_0x466d('0x4e')]['id']}},_0x1ab80e={};_0x1ab80e['model']=_[_0x466d('0x4f')](db[_0x466d('0x33')][_0x466d('0x34')]);_0x1ab80e[_0x466d('0x38')]=_[_0x466d('0x4f')](_0x4547e1[_0x466d('0x38')]);_0x1ab80e[_0x466d('0x39')]=_[_0x466d('0x3a')](_0x1ab80e['model'],_0x1ab80e['query']);_0x48425d['attributes']=_[_0x466d('0x3a')](_0x1ab80e[_0x466d('0x3b')],qs[_0x466d('0x3d')](_0x4547e1[_0x466d('0x38')][_0x466d('0x3d')]));_0x48425d[_0x466d('0x3c')]=_0x48425d[_0x466d('0x3c')]['length']?_0x48425d[_0x466d('0x3c')]:_0x1ab80e[_0x466d('0x3b')];if(_0x4547e1['query'][_0x466d('0x50')]){_0x48425d[_0x466d('0x49')]=[{'all':!![]}];}_0x48425d=_[_0x466d('0x46')]({},_0x48425d,_0x4547e1[_0x466d('0x48')]);return db[_0x466d('0x33')][_0x466d('0x51')](_0x48425d)['then'](handleEntityNotFound(_0x479144,null))['then'](respondWithResult(_0x479144,null))[_0x466d('0x4c')](handleError(_0x479144,null));};exports[_0x466d('0x52')]=function(_0x3b4cbd,_0xb84a82){return db[_0x466d('0x33')]['create'](_0x3b4cbd[_0x466d('0x53')],{})[_0x466d('0x2c')](function(_0x43fb3e){var _0x23b9f8=_0x3b4cbd[_0x466d('0x54')][_0x466d('0x55')]({'plain':!![]});if(!_0x23b9f8)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x23b9f8[_0x466d('0x56')]===_0x466d('0x54')){var _0x1d8d4e=_0x43fb3e[_0x466d('0x55')]({'plain':!![]});var _0x1ad05a=_0x466d('0x57');return db[_0x466d('0x58')][_0x466d('0x51')]({'where':{'name':_0x1ad05a,'userProfileId':_0x23b9f8[_0x466d('0x59')]},'raw':!![]})['then'](function(_0x44ec89){if(_0x44ec89&&_0x44ec89[_0x466d('0x5a')]===0x0){return db[_0x466d('0x5b')][_0x466d('0x52')]({'name':_0x1d8d4e[_0x466d('0x31')],'resourceId':_0x1d8d4e['id'],'type':'CustomReports','sectionId':_0x44ec89['id']},{})[_0x466d('0x2c')](function(){return _0x43fb3e;});}else{return _0x43fb3e;}})[_0x466d('0x4c')](function(_0x5e853e){logger[_0x466d('0x2f')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5e853e);throw _0x5e853e;});}return _0x43fb3e;})[_0x466d('0x2c')](respondWithResult(_0xb84a82,0xc9))[_0x466d('0x4c')](handleError(_0xb84a82,null));};exports[_0x466d('0x2b')]=function(_0x777dda,_0x325ea6){if(_0x777dda['body']['id']){delete _0x777dda[_0x466d('0x53')]['id'];}return db[_0x466d('0x33')][_0x466d('0x51')]({'where':{'id':_0x777dda[_0x466d('0x4e')]['id']}})[_0x466d('0x2c')](handleEntityNotFound(_0x325ea6,null))[_0x466d('0x2c')](saveUpdates(_0x777dda[_0x466d('0x53')],null))[_0x466d('0x2c')](respondWithResult(_0x325ea6,null))['catch'](handleError(_0x325ea6,null));};exports['destroy']=function(_0x2dfd87,_0x555aa1){return db['AnalyticCustomReport'][_0x466d('0x51')]({'where':{'id':_0x2dfd87[_0x466d('0x4e')]['id']}})[_0x466d('0x2c')](handleEntityNotFound(_0x555aa1,null))['then'](removeEntity(_0x555aa1,null))[_0x466d('0x4c')](handleError(_0x555aa1,null));};exports['preview']=function(_0x564755,_0x3a2ae3){var _0x2883ae=0xa;var _0x5c6855=['join',_0x466d('0x5c'),_0x466d('0x5d'),'cross_join'];var _0x5624a7={'SUM':_0x466d('0x5e'),'COUNT':_0x466d('0x5f'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0x466d('0x60'),'MIN':_0x466d('0x61'),'AVG':_0x466d('0x62'),'GROUP_CONCAT':_0x466d('0x63'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0x466d('0x64')};var _0x3da099={'SEC_TO_TIME':_0x466d('0x65'),'DATE':_0x466d('0x66'),'HOUR':_0x466d('0x67'),'ROUND':_0x466d('0x68'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x179f76=function(_0x514c66){return!_[_0x466d('0x69')]([_0x466d('0x6a'),_0x466d('0x6b'),_0x466d('0x6c'),_0x466d('0x6d')],_0x514c66);};var _0x29f54d=function(_0x30ddef){if(!_0x30ddef||!_0x30ddef[_0x466d('0x6e')][_0x466d('0x3e')]){return'';}for(var _0x2a18e2='(',_0x3f620e=0x0;_0x3f620e<_0x30ddef['rules'][_0x466d('0x3e')];_0x3f620e+=0x1){_0x3f620e>0x0&&(_0x2a18e2+='\x20'+_0x30ddef[_0x466d('0x6f')]+'\x20');_0x2a18e2+=_0x30ddef[_0x466d('0x6e')][_0x3f620e][_0x466d('0x70')]?_0x29f54d(_0x30ddef[_0x466d('0x6e')][_0x3f620e][_0x466d('0x70')]):_0x30ddef[_0x466d('0x6e')][_0x3f620e]['field']+'\x20'+_0x30ddef[_0x466d('0x6e')][_0x3f620e]['condition']+(_0x179f76(_0x30ddef[_0x466d('0x6e')][_0x3f620e][_0x466d('0x71')])?'\x20'+_0x30ddef['rules'][_0x3f620e][_0x466d('0x72')]:'');}return _0x2a18e2+')';};var _0x3c30d9={'where':{'id':_0x564755[_0x466d('0x4e')]['id']}},_0x36a9f6,_0x3cb2ef,_0x4f4a49,_0x3f3a38,_0x31c56e;_0x3c30d9=_[_0x466d('0x46')]({},_0x3c30d9,_0x564755['options']);return db[_0x466d('0x33')]['find'](_0x3c30d9)[_0x466d('0x2c')](function(_0x18bab9){if(_0x18bab9){_0x36a9f6=_0x18bab9;return _0x18bab9[_0x466d('0x73')]();}return null;})['then'](function(_0x592ece){if(_0x592ece){if(!_0x592ece[_0x466d('0x3e')]){throw new db['Sequelize'][(_0x466d('0x74'))](_0x466d('0x75'),0x193);}_0x3cb2ef=_0x592ece;return db[_0x466d('0x76')][_0x466d('0x4a')]({'raw':!![]});}return null;})[_0x466d('0x2c')](function(_0x1b6e68){if(_0x1b6e68){_0x4f4a49=_['keyBy'](_0x1b6e68,'id');var _0x308a84;var _0x122895=squel[_0x466d('0x77')]();_0x122895['from'](_0x36a9f6[_0x466d('0x78')]);for(var _0x38ebaa=0x0;_0x38ebaa<_0x3cb2ef[_0x466d('0x3e')];_0x38ebaa+=0x1){_0x308a84=_0x3cb2ef[_0x38ebaa][_0x466d('0x79')]?_0x4f4a49[_0x3cb2ef[_0x38ebaa][_0x466d('0x79')]]['metric']:_0x3cb2ef[_0x38ebaa][_0x466d('0x7a')];_0x308a84=_0x3cb2ef[_0x38ebaa][_0x466d('0x7b')]?_[_0x466d('0x7c')](_0x5624a7[_0x3cb2ef[_0x38ebaa]['function']],'%s',_0x308a84):_0x308a84;_0x308a84=_0x3cb2ef[_0x38ebaa][_0x466d('0x7d')]?_[_0x466d('0x7c')](_0x3da099[_0x3cb2ef[_0x38ebaa][_0x466d('0x7d')]],'%s',_0x308a84):_0x308a84;if(_0x3cb2ef[_0x38ebaa][_0x466d('0x7e')]){_0x122895['group'](_0x308a84);}_0x3cb2ef[_0x38ebaa][_0x466d('0x7f')]&&_0x122895[_0x466d('0x41')](_0x308a84,_0x3cb2ef[_0x38ebaa][_0x466d('0x7f')]===_0x466d('0x80')?![]:!![]);_0x122895[_0x466d('0x7a')](_0x308a84,_0x3cb2ef[_0x38ebaa]['alias']||_0x308a84);}if(_0x36a9f6[_0x466d('0x81')]){_0x36a9f6[_0x466d('0x81')]=JSON[_0x466d('0x82')](_0x36a9f6[_0x466d('0x81')]);for(var _0x3bcb54=0x0;_0x3bcb54<_0x36a9f6['joins'][_0x466d('0x3e')];_0x3bcb54+=0x1){if(_0x36a9f6[_0x466d('0x81')][_0x3bcb54][_0x466d('0x36')]&&_[_0x466d('0x69')](_0x5c6855,_0x36a9f6[_0x466d('0x81')][_0x3bcb54]['type'])&&_0x36a9f6['joins'][_0x3bcb54][_0x466d('0x83')]&&_0x36a9f6[_0x466d('0x81')][_0x3bcb54]['foreignTable']&&_0x36a9f6[_0x466d('0x81')][_0x3bcb54][_0x466d('0x84')]){_0x122895[_0x36a9f6[_0x466d('0x81')][_0x3bcb54]['type']](_0x36a9f6[_0x466d('0x81')][_0x3bcb54][_0x466d('0x85')],null,util[_0x466d('0x7d')](_0x466d('0x86'),_0x36a9f6['table'],_0x36a9f6[_0x466d('0x81')][_0x3bcb54][_0x466d('0x83')],_0x36a9f6['joins'][_0x3bcb54]['foreignTable'],_0x36a9f6[_0x466d('0x81')][_0x3bcb54]['foreignKey']));}}}if(_0x36a9f6[_0x466d('0x87')]){_0x36a9f6[_0x466d('0x87')]=JSON[_0x466d('0x82')](_0x36a9f6['conditions']);_0x122895[_0x466d('0x43')](_0x29f54d(_0x36a9f6[_0x466d('0x87')]['group']));}_0x31c56e=_0x122895[_0x466d('0x88')]();_0x122895[_0x466d('0x24')](_0x2883ae);_0x122895[_0x466d('0x22')](0x0);logger[_0x466d('0x89')](_0x466d('0x8a'),_0x122895[_0x466d('0x8b')]());return dbH[_0x466d('0x8c')][_0x466d('0x38')](_0x122895[_0x466d('0x8b')](),{'type':dbH['sequelize']['QueryTypes']['SELECT']});}})['then'](respondWithResult(_0x3a2ae3,null))[_0x466d('0x4c')](handleError(_0x3a2ae3,null));};function runReport(_0x1c9726,_0x47856b,_0x402c1e){var _0x118040=_0x47856b[_0x466d('0x31')];var _0x73eb91=0xa;var _0x42de5c=[_0x466d('0x8d'),_0x466d('0x5c'),_0x466d('0x5d'),_0x466d('0x8e')];var _0x281003={'SUM':'SUM(%s)','COUNT':_0x466d('0x5f'),'COUNT DISTINCT':_0x466d('0x8f'),'MAX':_0x466d('0x60'),'MIN':'MIN(%s)','AVG':_0x466d('0x62'),'GROUP_CONCAT':_0x466d('0x63'),'GROUP_CONCAT ASC':_0x466d('0x90'),'GROUP_CONCAT DESC':_0x466d('0x64')};var _0x20926b={'SEC_TO_TIME':_0x466d('0x65'),'DATE':_0x466d('0x66'),'HOUR':'HOUR(%s)','ROUND':'ROUND(%s)','UNIX_TIMESTAMP':_0x466d('0x91')};var _0x55d86e=function(_0x283983){return!_['includes'](['IS\x20NULL',_0x466d('0x6b'),_0x466d('0x6c'),_0x466d('0x6d')],_0x283983);};var _0x2eab48=function(_0x262bb5){if(!_0x262bb5||!_0x262bb5[_0x466d('0x6e')]['length']){return'';}for(var _0x21992d='(',_0x445140=0x0;_0x445140<_0x262bb5['rules'][_0x466d('0x3e')];_0x445140+=0x1){_0x445140>0x0&&(_0x21992d+='\x20'+_0x262bb5['operator']+'\x20');_0x21992d+=_0x262bb5[_0x466d('0x6e')][_0x445140][_0x466d('0x70')]?_0x2eab48(_0x262bb5[_0x466d('0x6e')][_0x445140][_0x466d('0x70')]):_0x262bb5[_0x466d('0x6e')][_0x445140][_0x466d('0x7a')]+'\x20'+_0x262bb5[_0x466d('0x6e')][_0x445140]['condition']+(_0x55d86e(_0x262bb5[_0x466d('0x6e')][_0x445140]['condition'])?'\x20'+_0x262bb5[_0x466d('0x6e')][_0x445140][_0x466d('0x72')]:'');}return _0x21992d+')';};var _0x1d7bcb={'where':{'id':_0x1c9726['id']}},_0x105428,_0xe2d1c,_0x48c541,_0x20aa79,_0x45f314;_0x1d7bcb=_[_0x466d('0x46')]({},_0x1d7bcb,_0x402c1e);return db['AnalyticCustomReport'][_0x466d('0x51')](_0x1d7bcb)[_0x466d('0x2c')](function(_0x3d78a2){if(_0x3d78a2){_0x105428=_0x3d78a2;return _0x3d78a2[_0x466d('0x73')]();}return null;})['then'](function(_0x578e19){if(_0x578e19){if(!_0x578e19['length']){throw new db[(_0x466d('0x92'))][(_0x466d('0x74'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0xe2d1c=_0x578e19;return db[_0x466d('0x76')][_0x466d('0x4a')]({'raw':!![]});}return null;})['then'](function(_0xa7cca0){if(_0xa7cca0){_0x48c541=_[_0x466d('0x93')](_0xa7cca0,'id');var _0x23a8c9;var _0x34aaf1=squel[_0x466d('0x77')]();_0x34aaf1[_0x466d('0x94')](_0x105428[_0x466d('0x78')]);for(var _0x20c6f6=0x0;_0x20c6f6<_0xe2d1c[_0x466d('0x3e')];_0x20c6f6+=0x1){_0x23a8c9=_0xe2d1c[_0x20c6f6][_0x466d('0x79')]?_0x48c541[_0xe2d1c[_0x20c6f6][_0x466d('0x79')]][_0x466d('0x95')]:_0xe2d1c[_0x20c6f6][_0x466d('0x7a')];_0x23a8c9=_0xe2d1c[_0x20c6f6][_0x466d('0x7b')]?_[_0x466d('0x7c')](_0x281003[_0xe2d1c[_0x20c6f6][_0x466d('0x7b')]],'%s',_0x23a8c9):_0x23a8c9;_0x23a8c9=_0xe2d1c[_0x20c6f6][_0x466d('0x7d')]?_[_0x466d('0x7c')](_0x20926b[_0xe2d1c[_0x20c6f6]['format']],'%s',_0x23a8c9):_0x23a8c9;if(_0xe2d1c[_0x20c6f6][_0x466d('0x7e')]){_0x34aaf1['group'](_0x23a8c9);}_0xe2d1c[_0x20c6f6]['orderBy']&&_0x34aaf1[_0x466d('0x41')](_0x23a8c9,_0xe2d1c[_0x20c6f6][_0x466d('0x7f')]===_0x466d('0x80')?![]:!![]);_0x34aaf1[_0x466d('0x7a')](_0x23a8c9,_0xe2d1c[_0x20c6f6]['alias']||_0x23a8c9);}if(_0x105428['joins']){_0x105428[_0x466d('0x81')]=JSON['parse'](_0x105428[_0x466d('0x81')]);for(var _0x48dd61=0x0;_0x48dd61<_0x105428[_0x466d('0x81')]['length'];_0x48dd61+=0x1){if(_0x105428[_0x466d('0x81')][_0x48dd61][_0x466d('0x36')]&&_[_0x466d('0x69')](_0x42de5c,_0x105428[_0x466d('0x81')][_0x48dd61]['type'])&&_0x105428[_0x466d('0x81')][_0x48dd61][_0x466d('0x83')]&&_0x105428[_0x466d('0x81')][_0x48dd61][_0x466d('0x85')]&&_0x105428[_0x466d('0x81')][_0x48dd61]['foreignKey']){_0x34aaf1[_0x105428[_0x466d('0x81')][_0x48dd61][_0x466d('0x36')]](_0x105428['joins'][_0x48dd61]['foreignTable'],null,util['format'](_0x466d('0x86'),_0x105428['table'],_0x105428[_0x466d('0x81')][_0x48dd61]['parentKey'],_0x105428['joins'][_0x48dd61][_0x466d('0x85')],_0x105428[_0x466d('0x81')][_0x48dd61][_0x466d('0x84')]));}}}if(_0x105428['conditions']){_0x105428[_0x466d('0x87')]=JSON['parse'](_0x105428[_0x466d('0x87')]);_0x34aaf1[_0x466d('0x43')](_0x2eab48(_0x105428['conditions'][_0x466d('0x70')]));}_0x45f314=_0x34aaf1['clone']();_0x34aaf1[_0x466d('0x24')](_0x73eb91);_0x34aaf1['offset'](0x0);return;}})[_0x466d('0x2c')](function(){if(_0x47856b['output']===_0x466d('0x96')){return null;}var _0x2a4d14=_['merge'](_0x47856b,{'name':_0x47856b[_0x466d('0x97')]||_0x47856b['name']||_0x105428[_0x466d('0x31')],'basename':_0x118040,'savename':util[_0x466d('0x7d')](_0x466d('0x98'),_0x47856b['name']||_0x105428[_0x466d('0x31')],require(_0x466d('0x99'))[_0x466d('0x9a')](0x4),_0x47856b['output']||_0x466d('0x9b')),'reportId':_0x105428['id'],'reportType':'custom'});return db[_0x466d('0x9c')][_0x466d('0x52')](_0x2a4d14,{'raw':!![]});})['then'](function(_0x4592e1){if(_0x105428[_0x466d('0x78')]==='cdr'){_0x45f314[_0x466d('0x43')](_0x105428[_0x466d('0x78')]+_0x466d('0x9d'),_0x47856b[_0x466d('0x9e')],_0x47856b[_0x466d('0x9f')]);}else{_0x45f314[_0x466d('0x43')](_0x105428[_0x466d('0x78')]+'.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x47856b[_0x466d('0x9e')],_0x47856b[_0x466d('0x9f')]);}if(_0x4592e1){logger[_0x466d('0xa0')](_0x466d('0xa1'),_0x45f314[_0x466d('0x8b')]());require('child_process')[_0x466d('0xa2')](path[_0x466d('0x8d')](__dirname,'../../components/export/',_0x4592e1[_0x466d('0xa3')]),[_0x4592e1['id'],_0x45f314[_0x466d('0x8b')](),path[_0x466d('0x8d')](__dirname,_0x466d('0xa4'),_0x4592e1['savename']),_0x118040]);return _0x4592e1;}else{var _0x27d936=squel[_0x466d('0x77')]();_0x27d936['from']('('+_0x45f314['toString']()+')',_0x466d('0xa5'));_0x27d936['field'](_0x466d('0xa6'),'count');_0x45f314['limit'](_0x47856b[_0x466d('0x24')]||_0x73eb91);_0x45f314[_0x466d('0x22')](_0x47856b[_0x466d('0x22')]||0x0);return dbH[_0x466d('0x8c')][_0x466d('0x38')](_0x27d936['toString'](),{'type':dbH['sequelize'][_0x466d('0xa7')][_0x466d('0xa8')]})['then'](function(_0x56c1d7){if(!_0x56c1d7[_0x466d('0x3e')]){_0x20aa79=0x0;}else{_0x20aa79=_0x56c1d7[0x0][_0x466d('0x25')]||0x0;}return dbH['sequelize'][_0x466d('0x38')](_0x45f314[_0x466d('0x8b')](),{'type':dbH[_0x466d('0x8c')]['QueryTypes'][_0x466d('0xa8')]});})[_0x466d('0x2c')](function(_0x5c55ec){return{'rows':_0x5c55ec||[],'count':_0x20aa79};});}});}exports[_0x466d('0xa9')]=function(_0x40f028,_0x42e883){return runReport(_0x40f028[_0x466d('0x4e')],_0x40f028['query'],_0x40f028['options'])[_0x466d('0x2c')](respondWithResult(_0x42e883,null))[_0x466d('0x4c')](handleError(_0x42e883,null));};exports['runReport']=runReport;exports[_0x466d('0x38')]=function(_0x5a91d4,_0x4775c4){var _0x171bb2=0xa;var _0x3569b1=[_0x466d('0x8d'),_0x466d('0x5c'),_0x466d('0x5d'),_0x466d('0x8e')];var _0x67f602={'SUM':_0x466d('0x5e'),'COUNT':_0x466d('0x5f'),'COUNT DISTINCT':_0x466d('0x8f'),'MAX':_0x466d('0x60'),'MIN':_0x466d('0x61'),'AVG':'AVG(%s)','GROUP_CONCAT':_0x466d('0x63'),'GROUP_CONCAT ASC':_0x466d('0x90'),'GROUP_CONCAT DESC':_0x466d('0x64')};var _0x22610b={'SEC_TO_TIME':_0x466d('0x65'),'DATE':_0x466d('0x66'),'HOUR':_0x466d('0x67'),'ROUND':_0x466d('0x68'),'UNIX_TIMESTAMP':_0x466d('0x91')};var _0x5f0697=function(_0x270546){return!_[_0x466d('0x69')]([_0x466d('0x6a'),_0x466d('0x6b'),_0x466d('0x6c'),_0x466d('0x6d')],_0x270546);};var _0x6cfe92=function(_0x5ac828){if(!_0x5ac828||!_0x5ac828[_0x466d('0x6e')][_0x466d('0x3e')]){return'';}for(var _0x119bc5='(',_0x2b5f6e=0x0;_0x2b5f6e<_0x5ac828[_0x466d('0x6e')][_0x466d('0x3e')];_0x2b5f6e+=0x1){_0x2b5f6e>0x0&&(_0x119bc5+='\x20'+_0x5ac828[_0x466d('0x6f')]+'\x20');_0x119bc5+=_0x5ac828[_0x466d('0x6e')][_0x2b5f6e]['group']?_0x6cfe92(_0x5ac828['rules'][_0x2b5f6e]['group']):_0x5ac828[_0x466d('0x6e')][_0x2b5f6e][_0x466d('0x7a')]+'\x20'+_0x5ac828[_0x466d('0x6e')][_0x2b5f6e]['condition']+(_0x5f0697(_0x5ac828[_0x466d('0x6e')][_0x2b5f6e]['condition'])?'\x20'+_0x5ac828[_0x466d('0x6e')][_0x2b5f6e][_0x466d('0x72')]:'');}return _0x119bc5+')';};var _0x45bd04={'where':{'id':_0x5a91d4[_0x466d('0x4e')]['id']}},_0x1edc97,_0x5f13c7,_0x3ed851,_0x260b6b,_0x1054b2;_0x45bd04=_['merge']({},_0x45bd04,_0x5a91d4['options']);return db[_0x466d('0x33')]['find'](_0x45bd04)[_0x466d('0x2c')](function(_0x324a87){if(_0x324a87){_0x1edc97=_0x324a87;return _0x324a87[_0x466d('0x73')]();}return null;})[_0x466d('0x2c')](function(_0x58047b){if(_0x58047b){if(!_0x58047b[_0x466d('0x3e')]){throw new db[(_0x466d('0x92'))][(_0x466d('0x74'))](_0x466d('0x75'),0x193);}_0x5f13c7=_0x58047b;return db[_0x466d('0x76')][_0x466d('0x4a')]({'raw':!![]});}return null;})['then'](function(_0x1c6c51){if(_0x1c6c51){_0x3ed851=_[_0x466d('0x93')](_0x1c6c51,'id');var _0x48b8b3;var _0x324747=squel[_0x466d('0x77')]();_0x324747['from'](_0x1edc97[_0x466d('0x78')]);for(var _0x54d89c=0x0;_0x54d89c<_0x5f13c7[_0x466d('0x3e')];_0x54d89c+=0x1){_0x48b8b3=_0x5f13c7[_0x54d89c][_0x466d('0x79')]?_0x3ed851[_0x5f13c7[_0x54d89c]['MetricId']][_0x466d('0x95')]:_0x5f13c7[_0x54d89c][_0x466d('0x7a')];_0x48b8b3=_0x5f13c7[_0x54d89c]['function']?_[_0x466d('0x7c')](_0x67f602[_0x5f13c7[_0x54d89c]['function']],'%s',_0x48b8b3):_0x48b8b3;_0x48b8b3=_0x5f13c7[_0x54d89c][_0x466d('0x7d')]?_[_0x466d('0x7c')](_0x22610b[_0x5f13c7[_0x54d89c][_0x466d('0x7d')]],'%s',_0x48b8b3):_0x48b8b3;if(_0x5f13c7[_0x54d89c]['groupBy']){_0x324747[_0x466d('0x70')](_0x48b8b3);}_0x5f13c7[_0x54d89c][_0x466d('0x7f')]&&_0x324747[_0x466d('0x41')](_0x48b8b3,_0x5f13c7[_0x54d89c][_0x466d('0x7f')]===_0x466d('0x80')?![]:!![]);_0x324747[_0x466d('0x7a')](_0x48b8b3,_0x5f13c7[_0x54d89c][_0x466d('0xaa')]||_0x48b8b3);}if(_0x1edc97['joins']){_0x1edc97['joins']=JSON['parse'](_0x1edc97[_0x466d('0x81')]);for(var _0x31be55=0x0;_0x31be55<_0x1edc97[_0x466d('0x81')][_0x466d('0x3e')];_0x31be55+=0x1){if(_0x1edc97[_0x466d('0x81')][_0x31be55][_0x466d('0x36')]&&_[_0x466d('0x69')](_0x3569b1,_0x1edc97['joins'][_0x31be55][_0x466d('0x36')])&&_0x1edc97[_0x466d('0x81')][_0x31be55][_0x466d('0x83')]&&_0x1edc97[_0x466d('0x81')][_0x31be55]['foreignTable']&&_0x1edc97[_0x466d('0x81')][_0x31be55][_0x466d('0x84')]){_0x324747[_0x1edc97[_0x466d('0x81')][_0x31be55]['type']](_0x1edc97[_0x466d('0x81')][_0x31be55][_0x466d('0x85')],null,util[_0x466d('0x7d')]('%s.%s\x20=\x20%s.%s',_0x1edc97[_0x466d('0x78')],_0x1edc97[_0x466d('0x81')][_0x31be55][_0x466d('0x83')],_0x1edc97[_0x466d('0x81')][_0x31be55][_0x466d('0x85')],_0x1edc97[_0x466d('0x81')][_0x31be55][_0x466d('0x84')]));}}}if(_0x1edc97['conditions']){_0x1edc97['conditions']=JSON[_0x466d('0x82')](_0x1edc97[_0x466d('0x87')]);_0x324747[_0x466d('0x43')](_0x6cfe92(_0x1edc97[_0x466d('0x87')][_0x466d('0x70')]));}_0x1054b2=_0x324747['clone']();_0x324747[_0x466d('0x24')](_0x171bb2);_0x324747[_0x466d('0x22')](0x0);logger[_0x466d('0x89')]('Limited\x20Query:',_0x324747[_0x466d('0x8b')]());return dbH[_0x466d('0x8c')]['query'](_0x324747[_0x466d('0x8b')](),{'type':dbH['sequelize'][_0x466d('0xa7')][_0x466d('0xa8')]});}})['then'](function(){return{'sql':_0x1054b2[_0x466d('0x8b')]()};})[_0x466d('0x2c')](respondWithResult(_0x4775c4,null))[_0x466d('0x4c')](handleError(_0x4775c4,null));};
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.model.js b/server/api/analyticCustomReport/analyticCustomReport.model.js
index aa2e96c..70cecc8 100644
--- a/server/api/analyticCustomReport/analyticCustomReport.model.js
+++ b/server/api/analyticCustomReport/analyticCustomReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x22bd=['exports','define','AnalyticCustomReport','lodash','util','bluebird','request-promise','path','./analyticCustomReport.attributes'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x22bd,0x1aa));var _0xd22b=function(_0x41f278,_0x172157){_0x41f278=_0x41f278-0x0;var _0x57688d=_0x22bd[_0x41f278];return _0x57688d;};'use strict';var _=require(_0xd22b('0x0'));var util=require(_0xd22b('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0xd22b('0x2'));var rp=require(_0xd22b('0x3'));var fs=require('fs');var path=require(_0xd22b('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xd22b('0x5'));module[_0xd22b('0x6')]=function(_0x30db8c,_0x449de8){return _0x30db8c[_0xd22b('0x7')](_0xd22b('0x8'),attributes,{'tableName':'analytics_custom_reports','paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xf418=['lodash','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./analyticCustomReport.attributes','exports','define','analytics_custom_reports'];(function(_0x42a791,_0x1f32c7){var _0x1732b1=function(_0x5ed167){while(--_0x5ed167){_0x42a791['push'](_0x42a791['shift']());}};_0x1732b1(++_0x1f32c7);}(_0xf418,0xf0));var _0x8f41=function(_0x1da3a4,_0x5a5a8b){_0x1da3a4=_0x1da3a4-0x0;var _0x88c6ab=_0xf418[_0x1da3a4];return _0x88c6ab;};'use strict';var _=require(_0x8f41('0x0'));var util=require('util');var logger=require(_0x8f41('0x1'))(_0x8f41('0x2'));var moment=require(_0x8f41('0x3'));var BPromise=require(_0x8f41('0x4'));var rp=require(_0x8f41('0x5'));var fs=require('fs');var path=require(_0x8f41('0x6'));var rimraf=require('rimraf');var config=require(_0x8f41('0x7'));var attributes=require(_0x8f41('0x8'));module[_0x8f41('0x9')]=function(_0x1bb3d1,_0x3d002b){return _0x1bb3d1[_0x8f41('0xa')]('AnalyticCustomReport',attributes,{'tableName':_0x8f41('0xb'),'paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.rpc.js b/server/api/analyticCustomReport/analyticCustomReport.rpc.js
index fa44b9c..f8aee97 100644
--- a/server/api/analyticCustomReport/analyticCustomReport.rpc.js
+++ b/server/api/analyticCustomReport/analyticCustomReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa6d8=['lodash','util','moment','randomstring','ioredis','../../config/logger','rpc','jayson/promise','client','http','request','then','request\x20sent','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','stringify','error','message','info','AnalyticCustomReport,\x20%s,\x20%s','result'];(function(_0xb41680,_0x39f19c){var _0x56ce27=function(_0x3745e1){while(--_0x3745e1){_0xb41680['push'](_0xb41680['shift']());}};_0x56ce27(++_0x39f19c);}(_0xa6d8,0xd2));var _0x8a6d=function(_0x22a409,_0x1e7083){_0x22a409=_0x22a409-0x0;var _0x4ffcf0=_0xa6d8[_0x22a409];return _0x4ffcf0;};'use strict';var _=require(_0x8a6d('0x0'));var util=require(_0x8a6d('0x1'));var moment=require(_0x8a6d('0x2'));var BPromise=require('bluebird');var rs=require(_0x8a6d('0x3'));var fs=require('fs');var Redis=require(_0x8a6d('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x8a6d('0x5'))(_0x8a6d('0x6'));var config=require('../../config/environment');var jayson=require(_0x8a6d('0x7'));var client=jayson[_0x8a6d('0x8')][_0x8a6d('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xe06879,_0x11a94c,_0x4d2a83){return new BPromise(function(_0x5dd35f,_0x410f65){return client[_0x8a6d('0xa')](_0xe06879,_0x4d2a83)[_0x8a6d('0xb')](function(_0xc4e7bd){logger['info']('AnalyticCustomReport,\x20%s,\x20%s',_0x11a94c,_0x8a6d('0xc'));logger[_0x8a6d('0xd')](_0x8a6d('0xe'),_0x11a94c,_0x8a6d('0xc'),JSON[_0x8a6d('0xf')](_0xc4e7bd));if(_0xc4e7bd['error']){if(_0xc4e7bd[_0x8a6d('0x10')]['code']===0x1f4){logger[_0x8a6d('0x10')]('AnalyticCustomReport,\x20%s,\x20%s',_0x11a94c,_0xc4e7bd['error']['message']);return _0x410f65(_0xc4e7bd[_0x8a6d('0x10')][_0x8a6d('0x11')]);}logger[_0x8a6d('0x10')]('AnalyticCustomReport,\x20%s,\x20%s',_0x11a94c,_0xc4e7bd[_0x8a6d('0x10')][_0x8a6d('0x11')]);return _0x5dd35f(_0xc4e7bd[_0x8a6d('0x10')]['message']);}else{logger[_0x8a6d('0x12')](_0x8a6d('0x13'),_0x11a94c,'request\x20sent');_0x5dd35f(_0xc4e7bd[_0x8a6d('0x14')]['message']);}})['catch'](function(_0x304dff){logger[_0x8a6d('0x10')]('AnalyticCustomReport,\x20%s,\x20%s',_0x11a94c,_0x304dff);_0x410f65(_0x304dff);});});}
\ No newline at end of file
+var _0x81d0=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','request','then','info','AnalyticCustomReport,\x20%s,\x20%s','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','catch','lodash','util','moment','randomstring','ioredis'];(function(_0x35fc3a,_0x327ea7){var _0x339c58=function(_0x1a22ff){while(--_0x1a22ff){_0x35fc3a['push'](_0x35fc3a['shift']());}};_0x339c58(++_0x327ea7);}(_0x81d0,0x119));var _0x081d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x81d0[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x081d('0x0'));var util=require(_0x081d('0x1'));var moment=require(_0x081d('0x2'));var BPromise=require('bluebird');var rs=require(_0x081d('0x3'));var fs=require('fs');var Redis=require(_0x081d('0x4'));var db=require(_0x081d('0x5'))['db'];var utils=require(_0x081d('0x6'));var logger=require(_0x081d('0x7'))(_0x081d('0x8'));var config=require(_0x081d('0x9'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x7922d9,_0x17cb85,_0x296270){return new BPromise(function(_0x4406ee,_0x3b3b6a){return client[_0x081d('0xa')](_0x7922d9,_0x296270)[_0x081d('0xb')](function(_0x15a1b8){logger[_0x081d('0xc')](_0x081d('0xd'),_0x17cb85,'request\x20sent');logger[_0x081d('0xe')](_0x081d('0xf'),_0x17cb85,'request\x20sent',JSON[_0x081d('0x10')](_0x15a1b8));if(_0x15a1b8[_0x081d('0x11')]){if(_0x15a1b8[_0x081d('0x11')]['code']===0x1f4){logger[_0x081d('0x11')](_0x081d('0xd'),_0x17cb85,_0x15a1b8[_0x081d('0x11')][_0x081d('0x12')]);return _0x3b3b6a(_0x15a1b8[_0x081d('0x11')][_0x081d('0x12')]);}logger[_0x081d('0x11')]('AnalyticCustomReport,\x20%s,\x20%s',_0x17cb85,_0x15a1b8[_0x081d('0x11')][_0x081d('0x12')]);return _0x4406ee(_0x15a1b8['error'][_0x081d('0x12')]);}else{logger[_0x081d('0xc')]('AnalyticCustomReport,\x20%s,\x20%s',_0x17cb85,_0x081d('0x13'));_0x4406ee(_0x15a1b8[_0x081d('0x14')][_0x081d('0x12')]);}})[_0x081d('0x15')](function(_0x1cbcf5){logger[_0x081d('0x11')](_0x081d('0xd'),_0x17cb85,_0x1cbcf5);_0x3b3b6a(_0x1cbcf5);});});}
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/index.js b/server/api/analyticCustomReport/index.js
index 7cea083..72efb4a 100644
--- a/server/api/analyticCustomReport/index.js
+++ b/server/api/analyticCustomReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc13c=['query','post','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticCustomReport.controller','get','/:id','isAuthenticated','show','/:id/preview','preview','/:id/run','/:id/query'];(function(_0x2b742d,_0x55c8ed){var _0x4bc41e=function(_0x30f8e1){while(--_0x30f8e1){_0x2b742d['push'](_0x2b742d['shift']());}};_0x4bc41e(++_0x55c8ed);}(_0xc13c,0x197));var _0xcc13=function(_0x3e9fdd,_0xb15aec){_0x3e9fdd=_0x3e9fdd-0x0;var _0x483704=_0xc13c[_0x3e9fdd];return _0x483704;};'use strict';var multer=require(_0xcc13('0x0'));var util=require(_0xcc13('0x1'));var path=require(_0xcc13('0x2'));var timeout=require(_0xcc13('0x3'));var express=require(_0xcc13('0x4'));var router=express[_0xcc13('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xcc13('0x6'));var interaction=require(_0xcc13('0x7'));var config=require(_0xcc13('0x8'));var controller=require(_0xcc13('0x9'));router[_0xcc13('0xa')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0xcc13('0xb'),auth[_0xcc13('0xc')](),controller[_0xcc13('0xd')]);router['get'](_0xcc13('0xe'),auth[_0xcc13('0xc')](),controller[_0xcc13('0xf')]);router[_0xcc13('0xa')](_0xcc13('0x10'),auth[_0xcc13('0xc')](),controller['run']);router[_0xcc13('0xa')](_0xcc13('0x11'),auth[_0xcc13('0xc')](),controller[_0xcc13('0x12')]);router[_0xcc13('0x13')]('/',auth[_0xcc13('0xc')](),controller['create']);router[_0xcc13('0x14')](_0xcc13('0xb'),auth['isAuthenticated'](),controller[_0xcc13('0x15')]);router[_0xcc13('0x16')](_0xcc13('0xb'),auth['isAuthenticated'](),controller[_0xcc13('0x17')]);module[_0xcc13('0x18')]=router;
\ No newline at end of file
+var _0xbc2c=['/:id/query','query','create','update','delete','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticCustomReport.controller','get','isAuthenticated','index','/:id','show','/:id/preview','preview','/:id/run'];(function(_0x1305a5,_0x43a964){var _0x4df750=function(_0x217da7){while(--_0x217da7){_0x1305a5['push'](_0x1305a5['shift']());}};_0x4df750(++_0x43a964);}(_0xbc2c,0x19e));var _0xcbc2=function(_0x2fe383,_0x4ca01b){_0x2fe383=_0x2fe383-0x0;var _0x496a15=_0xbc2c[_0x2fe383];return _0x496a15;};'use strict';var multer=require(_0xcbc2('0x0'));var util=require(_0xcbc2('0x1'));var path=require(_0xcbc2('0x2'));var timeout=require('connect-timeout');var express=require(_0xcbc2('0x3'));var router=express[_0xcbc2('0x4')]();var fs_extra=require(_0xcbc2('0x5'));var auth=require(_0xcbc2('0x6'));var interaction=require(_0xcbc2('0x7'));var config=require(_0xcbc2('0x8'));var controller=require(_0xcbc2('0x9'));router[_0xcbc2('0xa')]('/',auth[_0xcbc2('0xb')](),controller[_0xcbc2('0xc')]);router[_0xcbc2('0xa')](_0xcbc2('0xd'),auth[_0xcbc2('0xb')](),controller[_0xcbc2('0xe')]);router['get'](_0xcbc2('0xf'),auth[_0xcbc2('0xb')](),controller[_0xcbc2('0x10')]);router[_0xcbc2('0xa')](_0xcbc2('0x11'),auth[_0xcbc2('0xb')](),controller['run']);router[_0xcbc2('0xa')](_0xcbc2('0x12'),auth[_0xcbc2('0xb')](),controller[_0xcbc2('0x13')]);router['post']('/',auth[_0xcbc2('0xb')](),controller[_0xcbc2('0x14')]);router['put']('/:id',auth[_0xcbc2('0xb')](),controller[_0xcbc2('0x15')]);router[_0xcbc2('0x16')](_0xcbc2('0xd'),auth['isAuthenticated'](),controller['destroy']);module[_0xcbc2('0x17')]=router;
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js b/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js
index d6828f4..e6d98bf 100644
--- a/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js
+++ b/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4819=['TEXT','exports','STRING'];(function(_0x3ce2c4,_0x4544c1){var _0x4047c1=function(_0x3fece6){while(--_0x3fece6){_0x3ce2c4['push'](_0x3ce2c4['shift']());}};_0x4047c1(++_0x4544c1);}(_0x4819,0xcd));var _0x9481=function(_0x4b366e,_0x479e1f){_0x4b366e=_0x4b366e-0x0;var _0x464dff=_0x4819[_0x4b366e];return _0x464dff;};'use strict';var Sequelize=require('sequelize');module[_0x9481('0x0')]={'name':{'type':Sequelize[_0x9481('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x9481('0x1')]},'parent':{'type':Sequelize[_0x9481('0x1')]},'table':{'type':Sequelize[_0x9481('0x1')]},'conditions':{'type':Sequelize[_0x9481('0x2')]},'joins':{'type':Sequelize[_0x9481('0x2')]}};
\ No newline at end of file
+var _0x71ab=['TEXT','exports','STRING'];(function(_0x4e611c,_0x3a3057){var _0x168a72=function(_0x32ddcf){while(--_0x32ddcf){_0x4e611c['push'](_0x4e611c['shift']());}};_0x168a72(++_0x3a3057);}(_0x71ab,0x64));var _0xb71a=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x71ab[_0x502c7d];return _0x30b7ed;};'use strict';var Sequelize=require('sequelize');module[_0xb71a('0x0')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize[_0xb71a('0x1')]},'parent':{'type':Sequelize['STRING']},'table':{'type':Sequelize[_0xb71a('0x1')]},'conditions':{'type':Sequelize[_0xb71a('0x2')]},'joins':{'type':Sequelize[_0xb71a('0x2')]}};
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.controller.js b/server/api/analyticDefaultReport/analyticDefaultReport.controller.js
index 884b396..430acb4 100644
--- a/server/api/analyticDefaultReport/analyticDefaultReport.controller.js
+++ b/server/api/analyticDefaultReport/analyticDefaultReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x326f=['order','orderBy','DESC','joins','foreignTable','foreignKey','parentKey','conditions','Limited\x20Query:','toString','sequelize','SELECT','SUM(%s)','COUNT(DISTINCT\x20%s)','MAX(%s)','AVG(%s)','UNIX_TIMESTAMP(%s)','operator','AnalyticMetric','select','from','function','parse','%s.%s\x20=\x20%s.%s','output','web','fullPath','%s-%s.%s','generate','csv','default','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','endDate','Run\x20Query:','child_process','fork','join','../../files/reports','savename','countTable','COUNT(*)','QueryTypes','SEC_TO_TIME(%s)','debug','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','dbH','sendStatus','status','json','offset','undefined','count','apply','update','then','get','DefaultReports','UserProfileResource','destroy','end','error','name','send','index','map','AnalyticDefaultReport','fieldName','type','model','query','filters','intersection','attributes','fields','hasOwnProperty','limit','sort','where','pick','filter','merge','options','includeAll','include','findAll','catch','show','params','rawAttributes','keys','length','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','preview','left_join','right_join','cross_join','COUNT(%s)','MIN(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','DATE(%s)','HOUR(%s)','ROUND(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','group','field','condition','value','getFields','Sequelize','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','keyBy','table','MetricId','metric','format','replace','groupBy'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0x326f,0xd1));var _0xf326=function(_0xaa7b76,_0xbe504f){_0xaa7b76=_0xaa7b76-0x0;var _0x158e48=_0x326f[_0xaa7b76];return _0x158e48;};'use strict';var emlformat=require(_0xf326('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xf326('0x1'));var rp=require(_0xf326('0x2'));var moment=require(_0xf326('0x3'));var BPromise=require(_0xf326('0x4'));var Mustache=require(_0xf326('0x5'));var util=require(_0xf326('0x6'));var path=require(_0xf326('0x7'));var sox=require(_0xf326('0x8'));var csv=require(_0xf326('0x9'));var ejs=require(_0xf326('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xf326('0xb'));var squel=require(_0xf326('0xc'));var crypto=require(_0xf326('0xd'));var jsforce=require(_0xf326('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xf326('0xf'));var Redis=require(_0xf326('0x10'));var authService=require(_0xf326('0x11'));var qs=require(_0xf326('0x12'));var as=require(_0xf326('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xf326('0x14'))('api');var utils=require(_0xf326('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xf326('0x16'));var db=require('../../mysqldb')['db'];var dbH=require(_0xf326('0x17'))[_0xf326('0x18')];function respondWithStatusCode(_0x4b3966,_0x342fe5){_0x342fe5=_0x342fe5||0xcc;return function(_0x472632){if(_0x472632){return _0x4b3966[_0xf326('0x19')](_0x342fe5);}return _0x4b3966[_0xf326('0x1a')](_0x342fe5)['end']();};}function respondWithResult(_0x45c1b6,_0x5204ee){_0x5204ee=_0x5204ee||0xc8;return function(_0x54bd1a){if(_0x54bd1a){return _0x45c1b6[_0xf326('0x1a')](_0x5204ee)[_0xf326('0x1b')](_0x54bd1a);}};}function respondWithFilteredResult(_0x1f2e5a,_0xa63d1a){return function(_0x292f4b){if(_0x292f4b){var _0x287a2a=typeof _0xa63d1a[_0xf326('0x1c')]===_0xf326('0x1d')&&typeof _0xa63d1a['limit']===_0xf326('0x1d');var _0x453100=_0x292f4b[_0xf326('0x1e')];var _0x31ffb9=_0x287a2a?0x0:_0xa63d1a[_0xf326('0x1c')];var _0x311af0=_0x287a2a?_0x292f4b['count']:_0xa63d1a['offset']+_0xa63d1a['limit'];var _0x16e605;if(_0x311af0>=_0x453100){_0x311af0=_0x453100;_0x16e605=0xc8;}else{_0x16e605=0xce;}_0x1f2e5a[_0xf326('0x1a')](_0x16e605);return _0x1f2e5a['set']('Content-Range',_0x31ffb9+'-'+_0x311af0+'/'+_0x453100)[_0xf326('0x1b')](_0x292f4b);}return null;};}function patchUpdates(_0x4dfa76){return function(_0x5b6d3c){try{jsonpatch[_0xf326('0x1f')](_0x5b6d3c,_0x4dfa76,!![]);}catch(_0x18ead3){return BPromise['reject'](_0x18ead3);}return _0x5b6d3c['save']();};}function saveUpdates(_0x19b8ba,_0xb1efcf){return function(_0x5f21a2){if(_0x5f21a2){return _0x5f21a2[_0xf326('0x20')](_0x19b8ba)[_0xf326('0x21')](function(_0x43c53e){return _0x43c53e;});}return null;};}function removeEntity(_0x295752,_0x17c157){return function(_0x2049ec){if(_0x2049ec){return _0x2049ec['destroy']()['then'](function(){var _0x4f31f6=_0x2049ec[_0xf326('0x22')]({'plain':!![]});var _0x1a2c4e=_0xf326('0x23');return db[_0xf326('0x24')][_0xf326('0x25')]({'where':{'type':_0x1a2c4e,'resourceId':_0x4f31f6['id']}})[_0xf326('0x21')](function(){return _0x2049ec;});})['then'](function(){_0x295752[_0xf326('0x1a')](0xcc)[_0xf326('0x26')]();});}};}function handleEntityNotFound(_0x212d5d,_0x581531){return function(_0x1617d2){if(!_0x1617d2){_0x212d5d['sendStatus'](0x194);}return _0x1617d2;};}function handleError(_0x4a9abf,_0x6a8e89){_0x6a8e89=_0x6a8e89||0x1f4;return function(_0x1ae23a){logger[_0xf326('0x27')](_0x1ae23a['stack']);if(_0x1ae23a[_0xf326('0x28')]){delete _0x1ae23a[_0xf326('0x28')];}_0x4a9abf['status'](_0x6a8e89)[_0xf326('0x29')](_0x1ae23a);};}exports[_0xf326('0x2a')]=function(_0xd77aba,_0x18d110){var _0xa80156={},_0x269be9={},_0x161143={'count':0x0,'rows':[]};var _0x39a1e2=_[_0xf326('0x2b')](db[_0xf326('0x2c')]['rawAttributes'],function(_0x1035ed){return{'name':_0x1035ed[_0xf326('0x2d')],'type':_0x1035ed[_0xf326('0x2e')]['key']};});_0x269be9[_0xf326('0x2f')]=_[_0xf326('0x2b')](_0x39a1e2,_0xf326('0x28'));_0x269be9['query']=_['keys'](_0xd77aba[_0xf326('0x30')]);_0x269be9[_0xf326('0x31')]=_[_0xf326('0x32')](_0x269be9[_0xf326('0x2f')],_0x269be9[_0xf326('0x30')]);_0xa80156[_0xf326('0x33')]=_[_0xf326('0x32')](_0x269be9[_0xf326('0x2f')],qs['fields'](_0xd77aba[_0xf326('0x30')][_0xf326('0x34')]));_0xa80156['attributes']=_0xa80156[_0xf326('0x33')]['length']?_0xa80156[_0xf326('0x33')]:_0x269be9['model'];if(!_0xd77aba['query'][_0xf326('0x35')]('nolimit')){_0xa80156[_0xf326('0x36')]=qs['limit'](_0xd77aba[_0xf326('0x30')][_0xf326('0x36')]);_0xa80156[_0xf326('0x1c')]=qs['offset'](_0xd77aba[_0xf326('0x30')][_0xf326('0x1c')]);}_0xa80156['order']=qs[_0xf326('0x37')](_0xd77aba[_0xf326('0x30')][_0xf326('0x37')]);_0xa80156[_0xf326('0x38')]=qs['filters'](_[_0xf326('0x39')](_0xd77aba[_0xf326('0x30')],_0x269be9[_0xf326('0x31')]),_0x39a1e2);if(_0xd77aba[_0xf326('0x30')][_0xf326('0x3a')]){_0xa80156['where']=_[_0xf326('0x3b')](_0xa80156[_0xf326('0x38')],{'$or':_['map'](_0x39a1e2,function(_0x4dd361){if(_0x4dd361[_0xf326('0x2e')]!=='VIRTUAL'){var _0x55dfa8={};_0x55dfa8[_0x4dd361[_0xf326('0x28')]]={'$like':'%'+_0xd77aba['query'][_0xf326('0x3a')]+'%'};return _0x55dfa8;}})});}_0xa80156=_[_0xf326('0x3b')]({},_0xa80156,_0xd77aba[_0xf326('0x3c')]);var _0x39611e={'where':_0xa80156['where']};return db[_0xf326('0x2c')][_0xf326('0x1e')](_0x39611e)[_0xf326('0x21')](function(_0x365627){_0x161143[_0xf326('0x1e')]=_0x365627;if(_0xd77aba[_0xf326('0x30')][_0xf326('0x3d')]){_0xa80156[_0xf326('0x3e')]=[{'all':!![]}];}return db[_0xf326('0x2c')][_0xf326('0x3f')](_0xa80156);})[_0xf326('0x21')](function(_0x2bab13){_0x161143['rows']=_0x2bab13;return _0x161143;})[_0xf326('0x21')](respondWithFilteredResult(_0x18d110,_0xa80156))[_0xf326('0x40')](handleError(_0x18d110,null));};exports[_0xf326('0x41')]=function(_0x270288,_0x1dd262){var _0x1a2d0d={'raw':!![],'where':{'id':_0x270288[_0xf326('0x42')]['id']}},_0x4f4c51={};_0x4f4c51[_0xf326('0x2f')]=_['keys'](db[_0xf326('0x2c')][_0xf326('0x43')]);_0x4f4c51[_0xf326('0x30')]=_[_0xf326('0x44')](_0x270288[_0xf326('0x30')]);_0x4f4c51['filters']=_['intersection'](_0x4f4c51[_0xf326('0x2f')],_0x4f4c51[_0xf326('0x30')]);_0x1a2d0d['attributes']=_['intersection'](_0x4f4c51[_0xf326('0x2f')],qs[_0xf326('0x34')](_0x270288[_0xf326('0x30')]['fields']));_0x1a2d0d[_0xf326('0x33')]=_0x1a2d0d[_0xf326('0x33')][_0xf326('0x45')]?_0x1a2d0d[_0xf326('0x33')]:_0x4f4c51[_0xf326('0x2f')];if(_0x270288[_0xf326('0x30')][_0xf326('0x3d')]){_0x1a2d0d[_0xf326('0x3e')]=[{'all':!![]}];}_0x1a2d0d=_[_0xf326('0x3b')]({},_0x1a2d0d,_0x270288[_0xf326('0x3c')]);return db[_0xf326('0x2c')][_0xf326('0x46')](_0x1a2d0d)[_0xf326('0x21')](handleEntityNotFound(_0x1dd262,null))[_0xf326('0x21')](respondWithResult(_0x1dd262,null))[_0xf326('0x40')](handleError(_0x1dd262,null));};exports['create']=function(_0x199f8b,_0x1b0e03){return db[_0xf326('0x2c')][_0xf326('0x47')](_0x199f8b['body'],{})[_0xf326('0x21')](function(_0x2f5511){var _0xca88e=_0x199f8b[_0xf326('0x48')]['get']({'plain':!![]});if(!_0xca88e)throw new Error(_0xf326('0x49'));if(_0xca88e[_0xf326('0x4a')]===_0xf326('0x48')){var _0x451ac7=_0x2f5511[_0xf326('0x22')]({'plain':!![]});var _0x4970fb='Reports';return db[_0xf326('0x4b')][_0xf326('0x46')]({'where':{'name':_0x4970fb,'userProfileId':_0xca88e[_0xf326('0x4c')]},'raw':!![]})['then'](function(_0x102fba){if(_0x102fba&&_0x102fba[_0xf326('0x4d')]===0x0){return db[_0xf326('0x24')]['create']({'name':_0x451ac7['name'],'resourceId':_0x451ac7['id'],'type':_0xf326('0x23'),'sectionId':_0x102fba['id']},{})['then'](function(){return _0x2f5511;});}else{return _0x2f5511;}})[_0xf326('0x40')](function(_0x554277){logger[_0xf326('0x27')](_0xf326('0x4e'),_0x554277);throw _0x554277;});}return _0x2f5511;})[_0xf326('0x21')](respondWithResult(_0x1b0e03,0xc9))[_0xf326('0x40')](handleError(_0x1b0e03,null));};exports[_0xf326('0x20')]=function(_0x35d3c8,_0x7f7ece){if(_0x35d3c8['body']['id']){delete _0x35d3c8[_0xf326('0x4f')]['id'];}return db[_0xf326('0x2c')][_0xf326('0x46')]({'where':{'id':_0x35d3c8['params']['id']}})[_0xf326('0x21')](handleEntityNotFound(_0x7f7ece,null))[_0xf326('0x21')](saveUpdates(_0x35d3c8[_0xf326('0x4f')],null))[_0xf326('0x21')](respondWithResult(_0x7f7ece,null))[_0xf326('0x40')](handleError(_0x7f7ece,null));};exports['destroy']=function(_0x161fb3,_0x21eac7){return db[_0xf326('0x2c')][_0xf326('0x46')]({'where':{'id':_0x161fb3['params']['id']}})[_0xf326('0x21')](handleEntityNotFound(_0x21eac7,null))[_0xf326('0x21')](removeEntity(_0x21eac7,null))[_0xf326('0x40')](handleError(_0x21eac7,null));};exports[_0xf326('0x50')]=function(_0x4d3b9e,_0x5be2b1){var _0x18b46e=0xa;var _0x44d2ed=['join',_0xf326('0x51'),_0xf326('0x52'),_0xf326('0x53')];var _0x1258d1={'SUM':'SUM(%s)','COUNT':_0xf326('0x54'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':'MAX(%s)','MIN':_0xf326('0x55'),'AVG':'AVG(%s)','GROUP_CONCAT':_0xf326('0x56'),'GROUP_CONCAT ASC':_0xf326('0x57'),'GROUP_CONCAT DESC':_0xf326('0x58')};var _0x4eef49={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0xf326('0x59'),'HOUR':_0xf326('0x5a'),'ROUND':_0xf326('0x5b'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x2759d7=function(_0x487020){return!_[_0xf326('0x5c')]([_0xf326('0x5d'),_0xf326('0x5e'),_0xf326('0x5f'),_0xf326('0x60')],_0x487020);};var _0x18dbfc=function(_0x23a9e8){if(!_0x23a9e8||!_0x23a9e8[_0xf326('0x61')][_0xf326('0x45')]){return'';}for(var _0x33f9dd='(',_0x33ffb8=0x0;_0x33ffb8<_0x23a9e8[_0xf326('0x61')][_0xf326('0x45')];_0x33ffb8+=0x1){_0x33ffb8>0x0&&(_0x33f9dd+='\x20'+_0x23a9e8['operator']+'\x20');_0x33f9dd+=_0x23a9e8[_0xf326('0x61')][_0x33ffb8]['group']?_0x18dbfc(_0x23a9e8[_0xf326('0x61')][_0x33ffb8][_0xf326('0x62')]):_0x23a9e8['rules'][_0x33ffb8][_0xf326('0x63')]+'\x20'+_0x23a9e8['rules'][_0x33ffb8][_0xf326('0x64')]+(_0x2759d7(_0x23a9e8[_0xf326('0x61')][_0x33ffb8][_0xf326('0x64')])?'\x20'+_0x23a9e8[_0xf326('0x61')][_0x33ffb8][_0xf326('0x65')]:'');}return _0x33f9dd+')';};var _0x51ff5e={'where':{'id':_0x4d3b9e[_0xf326('0x42')]['id']}},_0x4ec099,_0x1209ca,_0x32fe3a,_0x15a538,_0x21b3cc;_0x51ff5e=_['merge']({},_0x51ff5e,_0x4d3b9e[_0xf326('0x3c')]);return db[_0xf326('0x2c')]['find'](_0x51ff5e)['then'](function(_0x5b25ca){if(_0x5b25ca){_0x4ec099=_0x5b25ca;return _0x5b25ca[_0xf326('0x66')]();}return null;})[_0xf326('0x21')](function(_0x4150fa){if(_0x4150fa){if(!_0x4150fa[_0xf326('0x45')]){throw new db[(_0xf326('0x67'))][(_0xf326('0x68'))](_0xf326('0x69'),0x193);}_0x1209ca=_0x4150fa;return db['AnalyticMetric'][_0xf326('0x3f')]({'raw':!![]});}return null;})[_0xf326('0x21')](function(_0x3c3379){if(_0x3c3379){_0x32fe3a=_[_0xf326('0x6a')](_0x3c3379,'id');var _0x58de1e;var _0x3717fe=squel['select']();_0x3717fe['from'](_0x4ec099[_0xf326('0x6b')]);for(var _0x540fa0=0x0;_0x540fa0<_0x1209ca[_0xf326('0x45')];_0x540fa0+=0x1){_0x58de1e=_0x1209ca[_0x540fa0][_0xf326('0x6c')]?_0x32fe3a[_0x1209ca[_0x540fa0][_0xf326('0x6c')]][_0xf326('0x6d')]:_0x1209ca[_0x540fa0][_0xf326('0x63')];_0x58de1e=_0x1209ca[_0x540fa0]['function']?_['replace'](_0x1258d1[_0x1209ca[_0x540fa0]['function']],'%s',_0x58de1e):_0x58de1e;_0x58de1e=_0x1209ca[_0x540fa0][_0xf326('0x6e')]?_[_0xf326('0x6f')](_0x4eef49[_0x1209ca[_0x540fa0][_0xf326('0x6e')]],'%s',_0x58de1e):_0x58de1e;if(_0x1209ca[_0x540fa0][_0xf326('0x70')]){_0x3717fe[_0xf326('0x62')](_0x58de1e);}_0x1209ca[_0x540fa0]['orderBy']&&_0x3717fe[_0xf326('0x71')](_0x58de1e,_0x1209ca[_0x540fa0][_0xf326('0x72')]===_0xf326('0x73')?![]:!![]);_0x3717fe['field'](_0x58de1e,_0x1209ca[_0x540fa0]['alias']||_0x58de1e);}if(_0x4ec099[_0xf326('0x74')]){_0x4ec099[_0xf326('0x74')]=JSON['parse'](_0x4ec099['joins']);for(var _0x2497fd=0x0;_0x2497fd<_0x4ec099['joins'][_0xf326('0x45')];_0x2497fd+=0x1){if(_0x4ec099['joins'][_0x2497fd]['type']&&_['includes'](_0x44d2ed,_0x4ec099[_0xf326('0x74')][_0x2497fd][_0xf326('0x2e')])&&_0x4ec099[_0xf326('0x74')][_0x2497fd]['parentKey']&&_0x4ec099[_0xf326('0x74')][_0x2497fd][_0xf326('0x75')]&&_0x4ec099[_0xf326('0x74')][_0x2497fd][_0xf326('0x76')]){_0x3717fe[_0x4ec099[_0xf326('0x74')][_0x2497fd][_0xf326('0x2e')]](_0x4ec099[_0xf326('0x74')][_0x2497fd][_0xf326('0x75')],null,util[_0xf326('0x6e')]('%s.%s\x20=\x20%s.%s',_0x4ec099[_0xf326('0x6b')],_0x4ec099['joins'][_0x2497fd][_0xf326('0x77')],_0x4ec099[_0xf326('0x74')][_0x2497fd][_0xf326('0x75')],_0x4ec099['joins'][_0x2497fd][_0xf326('0x76')]));}}}if(_0x4ec099[_0xf326('0x78')]){_0x4ec099[_0xf326('0x78')]=JSON['parse'](_0x4ec099[_0xf326('0x78')]);_0x3717fe[_0xf326('0x38')](_0x18dbfc(_0x4ec099[_0xf326('0x78')][_0xf326('0x62')]));}_0x21b3cc=_0x3717fe['clone']();_0x3717fe[_0xf326('0x36')](_0x18b46e);_0x3717fe['offset'](0x0);logger['debug'](_0xf326('0x79'),_0x3717fe[_0xf326('0x7a')]());return dbH['sequelize']['query'](_0x3717fe['toString'](),{'type':dbH[_0xf326('0x7b')]['QueryTypes'][_0xf326('0x7c')]});}})[_0xf326('0x21')](respondWithResult(_0x5be2b1,null))[_0xf326('0x40')](handleError(_0x5be2b1,null));};function runReport(_0x2ec314,_0xf76a89,_0x25b56c){var _0x5d23f0=_0xf76a89[_0xf326('0x28')];var _0x323926=0xa;var _0x5f1724=['join',_0xf326('0x51'),'right_join',_0xf326('0x53')];var _0x147d51={'SUM':_0xf326('0x7d'),'COUNT':_0xf326('0x54'),'COUNT DISTINCT':_0xf326('0x7e'),'MAX':_0xf326('0x7f'),'MIN':_0xf326('0x55'),'AVG':_0xf326('0x80'),'GROUP_CONCAT':_0xf326('0x56'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0xf326('0x58')};var _0x26bbb1={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0xf326('0x59'),'HOUR':'HOUR(%s)','ROUND':_0xf326('0x5b'),'UNIX_TIMESTAMP':_0xf326('0x81')};var _0x14e8c0=function(_0x5814ad){return!_[_0xf326('0x5c')]([_0xf326('0x5d'),_0xf326('0x5e'),_0xf326('0x5f'),_0xf326('0x60')],_0x5814ad);};var _0x1e50aa=function(_0x148779){if(!_0x148779||!_0x148779[_0xf326('0x61')][_0xf326('0x45')]){return'';}for(var _0x38b696='(',_0x384b46=0x0;_0x384b46<_0x148779[_0xf326('0x61')][_0xf326('0x45')];_0x384b46+=0x1){_0x384b46>0x0&&(_0x38b696+='\x20'+_0x148779[_0xf326('0x82')]+'\x20');_0x38b696+=_0x148779[_0xf326('0x61')][_0x384b46]['group']?_0x1e50aa(_0x148779[_0xf326('0x61')][_0x384b46][_0xf326('0x62')]):_0x148779['rules'][_0x384b46][_0xf326('0x63')]+'\x20'+_0x148779[_0xf326('0x61')][_0x384b46]['condition']+(_0x14e8c0(_0x148779[_0xf326('0x61')][_0x384b46][_0xf326('0x64')])?'\x20'+_0x148779[_0xf326('0x61')][_0x384b46][_0xf326('0x65')]:'');}return _0x38b696+')';};var _0x2ab607={'where':{'id':_0x2ec314['id']}},_0x35c228,_0x1bb7cc,_0x5794d0,_0x15d61e,_0x107c00;_0x2ab607=_[_0xf326('0x3b')]({},_0x2ab607,_0x25b56c);return db[_0xf326('0x2c')][_0xf326('0x46')](_0x2ab607)[_0xf326('0x21')](function(_0x204002){if(_0x204002){_0x35c228=_0x204002;return _0x204002[_0xf326('0x66')]();}return null;})['then'](function(_0xa8e05b){if(_0xa8e05b){if(!_0xa8e05b[_0xf326('0x45')]){throw new db['Sequelize'][(_0xf326('0x68'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x1bb7cc=_0xa8e05b;return db[_0xf326('0x83')][_0xf326('0x3f')]({'raw':!![]});}return null;})[_0xf326('0x21')](function(_0x2a0f36){if(_0x2a0f36){_0x5794d0=_[_0xf326('0x6a')](_0x2a0f36,'id');var _0x3097cf;var _0xf66b70=squel[_0xf326('0x84')]();_0xf66b70[_0xf326('0x85')](_0x35c228[_0xf326('0x6b')]);for(var _0x3f073c=0x0;_0x3f073c<_0x1bb7cc[_0xf326('0x45')];_0x3f073c+=0x1){_0x3097cf=_0x1bb7cc[_0x3f073c][_0xf326('0x6c')]?_0x5794d0[_0x1bb7cc[_0x3f073c][_0xf326('0x6c')]]['metric']:_0x1bb7cc[_0x3f073c][_0xf326('0x63')];_0x3097cf=_0x1bb7cc[_0x3f073c][_0xf326('0x86')]?_[_0xf326('0x6f')](_0x147d51[_0x1bb7cc[_0x3f073c][_0xf326('0x86')]],'%s',_0x3097cf):_0x3097cf;_0x3097cf=_0x1bb7cc[_0x3f073c][_0xf326('0x6e')]?_['replace'](_0x26bbb1[_0x1bb7cc[_0x3f073c][_0xf326('0x6e')]],'%s',_0x3097cf):_0x3097cf;if(_0x1bb7cc[_0x3f073c][_0xf326('0x70')]){_0xf66b70[_0xf326('0x62')](_0x3097cf);}_0x1bb7cc[_0x3f073c][_0xf326('0x72')]&&_0xf66b70[_0xf326('0x71')](_0x3097cf,_0x1bb7cc[_0x3f073c]['orderBy']==='DESC'?![]:!![]);_0xf66b70[_0xf326('0x63')](_0x3097cf,_0x1bb7cc[_0x3f073c]['alias']||_0x3097cf);}if(_0x35c228[_0xf326('0x74')]){_0x35c228[_0xf326('0x74')]=JSON[_0xf326('0x87')](_0x35c228['joins']);for(var _0x54b023=0x0;_0x54b023<_0x35c228[_0xf326('0x74')][_0xf326('0x45')];_0x54b023+=0x1){if(_0x35c228[_0xf326('0x74')][_0x54b023][_0xf326('0x2e')]&&_[_0xf326('0x5c')](_0x5f1724,_0x35c228['joins'][_0x54b023][_0xf326('0x2e')])&&_0x35c228[_0xf326('0x74')][_0x54b023][_0xf326('0x77')]&&_0x35c228['joins'][_0x54b023]['foreignTable']&&_0x35c228['joins'][_0x54b023][_0xf326('0x76')]){_0xf66b70[_0x35c228[_0xf326('0x74')][_0x54b023][_0xf326('0x2e')]](_0x35c228[_0xf326('0x74')][_0x54b023][_0xf326('0x75')],null,util[_0xf326('0x6e')](_0xf326('0x88'),_0x35c228['table'],_0x35c228['joins'][_0x54b023][_0xf326('0x77')],_0x35c228[_0xf326('0x74')][_0x54b023][_0xf326('0x75')],_0x35c228['joins'][_0x54b023][_0xf326('0x76')]));}}}if(_0x35c228[_0xf326('0x78')]){_0x35c228[_0xf326('0x78')]=JSON['parse'](_0x35c228[_0xf326('0x78')]);_0xf66b70[_0xf326('0x38')](_0x1e50aa(_0x35c228[_0xf326('0x78')][_0xf326('0x62')]));}_0x107c00=_0xf66b70['clone']();_0xf66b70['limit'](_0x323926);_0xf66b70['offset'](0x0);return;}})[_0xf326('0x21')](function(){if(_0xf76a89[_0xf326('0x89')]===_0xf326('0x8a')){return null;}var _0x5f0b45=_[_0xf326('0x3b')](_0xf76a89,{'name':_0xf76a89[_0xf326('0x8b')]||_0xf76a89[_0xf326('0x28')]||_0x35c228['name'],'basename':_0x5d23f0,'savename':util[_0xf326('0x6e')](_0xf326('0x8c'),_0xf76a89[_0xf326('0x28')]||_0x35c228[_0xf326('0x28')],require('randomstring')[_0xf326('0x8d')](0x4),_0xf76a89['output']||_0xf326('0x8e')),'reportId':_0x35c228['id'],'reportType':_0xf326('0x8f')});return db[_0xf326('0x90')][_0xf326('0x47')](_0x5f0b45,{'raw':!![]});})['then'](function(_0x2e2f70){if(_0x35c228['table']===_0xf326('0x91')){_0x107c00[_0xf326('0x38')](_0x35c228[_0xf326('0x6b')]+_0xf326('0x92'),_0xf76a89[_0xf326('0x93')],_0xf76a89['endDate']);}else{_0x107c00['where'](_0x35c228[_0xf326('0x6b')]+_0xf326('0x94'),_0xf76a89[_0xf326('0x93')],_0xf76a89[_0xf326('0x95')]);}if(_0x2e2f70){logger['info'](_0xf326('0x96'),_0x107c00['toString']());require(_0xf326('0x97'))[_0xf326('0x98')](path[_0xf326('0x99')](__dirname,'../../components/export/',_0x2e2f70[_0xf326('0x89')]),[_0x2e2f70['id'],_0x107c00[_0xf326('0x7a')](),path[_0xf326('0x99')](__dirname,_0xf326('0x9a'),_0x2e2f70[_0xf326('0x9b')]),_0x5d23f0]);return _0x2e2f70;}else{var _0x4dc4bc=squel[_0xf326('0x84')]();_0x4dc4bc[_0xf326('0x85')]('('+_0x107c00['toString']()+')',_0xf326('0x9c'));_0x4dc4bc[_0xf326('0x63')](_0xf326('0x9d'),_0xf326('0x1e'));_0x107c00['limit'](_0xf76a89['limit']||_0x323926);_0x107c00[_0xf326('0x1c')](_0xf76a89[_0xf326('0x1c')]||0x0);return dbH['sequelize'][_0xf326('0x30')](_0x4dc4bc['toString'](),{'type':dbH['sequelize'][_0xf326('0x9e')][_0xf326('0x7c')]})[_0xf326('0x21')](function(_0x37cd6f){if(!_0x37cd6f[_0xf326('0x45')]){_0x15d61e=0x0;}else{_0x15d61e=_0x37cd6f[0x0][_0xf326('0x1e')]||0x0;}return dbH[_0xf326('0x7b')][_0xf326('0x30')](_0x107c00[_0xf326('0x7a')](),{'type':dbH['sequelize'][_0xf326('0x9e')][_0xf326('0x7c')]});})[_0xf326('0x21')](function(_0x1c7f81){return{'rows':_0x1c7f81||[],'count':_0x15d61e};});}});}exports['run']=function(_0x3e6a5d,_0x20020c){return runReport(_0x3e6a5d[_0xf326('0x42')],_0x3e6a5d[_0xf326('0x30')],_0x3e6a5d[_0xf326('0x3c')])['then'](respondWithResult(_0x20020c,null))[_0xf326('0x40')](handleError(_0x20020c,null));};exports['runReport']=runReport;exports[_0xf326('0x30')]=function(_0x14d255,_0xffd165){var _0x2bc501=0xa;var _0x4bd216=[_0xf326('0x99'),_0xf326('0x51'),_0xf326('0x52'),'cross_join'];var _0x23451e={'SUM':_0xf326('0x7d'),'COUNT':_0xf326('0x54'),'COUNT DISTINCT':_0xf326('0x7e'),'MAX':'MAX(%s)','MIN':_0xf326('0x55'),'AVG':_0xf326('0x80'),'GROUP_CONCAT':_0xf326('0x56'),'GROUP_CONCAT ASC':_0xf326('0x57'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x310223={'SEC_TO_TIME':_0xf326('0x9f'),'DATE':_0xf326('0x59'),'HOUR':'HOUR(%s)','ROUND':_0xf326('0x5b'),'UNIX_TIMESTAMP':_0xf326('0x81')};var _0x539d23=function(_0x171c53){return!_[_0xf326('0x5c')]([_0xf326('0x5d'),_0xf326('0x5e'),_0xf326('0x5f'),_0xf326('0x60')],_0x171c53);};var _0x4c7fc0=function(_0x4ffde1){if(!_0x4ffde1||!_0x4ffde1[_0xf326('0x61')][_0xf326('0x45')]){return'';}for(var _0x4307d9='(',_0x2fa05b=0x0;_0x2fa05b<_0x4ffde1[_0xf326('0x61')][_0xf326('0x45')];_0x2fa05b+=0x1){_0x2fa05b>0x0&&(_0x4307d9+='\x20'+_0x4ffde1['operator']+'\x20');_0x4307d9+=_0x4ffde1[_0xf326('0x61')][_0x2fa05b][_0xf326('0x62')]?_0x4c7fc0(_0x4ffde1[_0xf326('0x61')][_0x2fa05b][_0xf326('0x62')]):_0x4ffde1[_0xf326('0x61')][_0x2fa05b][_0xf326('0x63')]+'\x20'+_0x4ffde1[_0xf326('0x61')][_0x2fa05b][_0xf326('0x64')]+(_0x539d23(_0x4ffde1[_0xf326('0x61')][_0x2fa05b]['condition'])?'\x20'+_0x4ffde1[_0xf326('0x61')][_0x2fa05b]['value']:'');}return _0x4307d9+')';};var _0x590dc0={'where':{'id':_0x14d255[_0xf326('0x42')]['id']}},_0x32fc6e,_0x549a1f,_0x1f37f9,_0x3e0918,_0x3398fd;_0x590dc0=_[_0xf326('0x3b')]({},_0x590dc0,_0x14d255[_0xf326('0x3c')]);return db[_0xf326('0x2c')][_0xf326('0x46')](_0x590dc0)[_0xf326('0x21')](function(_0x314442){if(_0x314442){_0x32fc6e=_0x314442;return _0x314442[_0xf326('0x66')]();}return null;})[_0xf326('0x21')](function(_0x4c1fcd){if(_0x4c1fcd){if(!_0x4c1fcd[_0xf326('0x45')]){throw new db[(_0xf326('0x67'))][(_0xf326('0x68'))](_0xf326('0x69'),0x193);}_0x549a1f=_0x4c1fcd;return db[_0xf326('0x83')][_0xf326('0x3f')]({'raw':!![]});}return null;})[_0xf326('0x21')](function(_0x5429a2){if(_0x5429a2){_0x1f37f9=_[_0xf326('0x6a')](_0x5429a2,'id');var _0x15f799;var _0x320ab3=squel[_0xf326('0x84')]();_0x320ab3[_0xf326('0x85')](_0x32fc6e[_0xf326('0x6b')]);for(var _0x2094bf=0x0;_0x2094bf<_0x549a1f['length'];_0x2094bf+=0x1){_0x15f799=_0x549a1f[_0x2094bf][_0xf326('0x6c')]?_0x1f37f9[_0x549a1f[_0x2094bf][_0xf326('0x6c')]][_0xf326('0x6d')]:_0x549a1f[_0x2094bf][_0xf326('0x63')];_0x15f799=_0x549a1f[_0x2094bf][_0xf326('0x86')]?_[_0xf326('0x6f')](_0x23451e[_0x549a1f[_0x2094bf][_0xf326('0x86')]],'%s',_0x15f799):_0x15f799;_0x15f799=_0x549a1f[_0x2094bf][_0xf326('0x6e')]?_[_0xf326('0x6f')](_0x310223[_0x549a1f[_0x2094bf][_0xf326('0x6e')]],'%s',_0x15f799):_0x15f799;if(_0x549a1f[_0x2094bf][_0xf326('0x70')]){_0x320ab3[_0xf326('0x62')](_0x15f799);}_0x549a1f[_0x2094bf]['orderBy']&&_0x320ab3[_0xf326('0x71')](_0x15f799,_0x549a1f[_0x2094bf][_0xf326('0x72')]===_0xf326('0x73')?![]:!![]);_0x320ab3['field'](_0x15f799,_0x549a1f[_0x2094bf]['alias']||_0x15f799);}if(_0x32fc6e[_0xf326('0x74')]){_0x32fc6e[_0xf326('0x74')]=JSON[_0xf326('0x87')](_0x32fc6e[_0xf326('0x74')]);for(var _0x5384a5=0x0;_0x5384a5<_0x32fc6e[_0xf326('0x74')][_0xf326('0x45')];_0x5384a5+=0x1){if(_0x32fc6e[_0xf326('0x74')][_0x5384a5]['type']&&_['includes'](_0x4bd216,_0x32fc6e['joins'][_0x5384a5][_0xf326('0x2e')])&&_0x32fc6e[_0xf326('0x74')][_0x5384a5][_0xf326('0x77')]&&_0x32fc6e['joins'][_0x5384a5][_0xf326('0x75')]&&_0x32fc6e['joins'][_0x5384a5][_0xf326('0x76')]){_0x320ab3[_0x32fc6e['joins'][_0x5384a5][_0xf326('0x2e')]](_0x32fc6e[_0xf326('0x74')][_0x5384a5][_0xf326('0x75')],null,util[_0xf326('0x6e')](_0xf326('0x88'),_0x32fc6e[_0xf326('0x6b')],_0x32fc6e[_0xf326('0x74')][_0x5384a5][_0xf326('0x77')],_0x32fc6e[_0xf326('0x74')][_0x5384a5][_0xf326('0x75')],_0x32fc6e[_0xf326('0x74')][_0x5384a5][_0xf326('0x76')]));}}}if(_0x32fc6e[_0xf326('0x78')]){_0x32fc6e[_0xf326('0x78')]=JSON['parse'](_0x32fc6e[_0xf326('0x78')]);_0x320ab3[_0xf326('0x38')](_0x4c7fc0(_0x32fc6e[_0xf326('0x78')]['group']));}_0x3398fd=_0x320ab3['clone']();_0x320ab3['limit'](_0x2bc501);_0x320ab3[_0xf326('0x1c')](0x0);logger[_0xf326('0xa0')](_0xf326('0x79'),_0x320ab3[_0xf326('0x7a')]());return dbH[_0xf326('0x7b')][_0xf326('0x30')](_0x320ab3['toString'](),{'type':dbH[_0xf326('0x7b')][_0xf326('0x9e')][_0xf326('0x7c')]});}})[_0xf326('0x21')](function(){return{'sql':_0x3398fd[_0xf326('0x7a')]()};})['then'](respondWithResult(_0xffd165,null))[_0xf326('0x40')](handleError(_0xffd165,null));};
\ No newline at end of file
+var _0x4975=['set','Content-Range','save','update','then','destroy','get','DefaultReports','UserProfileResource','error','stack','name','index','AnalyticDefaultReport','rawAttributes','type','key','map','query','filters','intersection','model','fields','attributes','length','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','params','keys','find','body','role','user','Reports','UserProfileSection','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','preview','join','SUM(%s)','COUNT(%s)','MAX(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','DATE(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','group','field','condition','value','Sequelize','ValidationErrorItem','AnalyticMetric','keyBy','select','from','table','MetricId','metric','function','format','groupBy','orderBy','DESC','joins','includes','parentKey','foreignKey','foreignTable','conditions','parse','debug','Limited\x20Query:','sequelize','QueryTypes','SELECT','left_join','COUNT(DISTINCT\x20%s)','MIN(%s)','AVG(%s)','HOUR(%s)','operator','Please\x20insert\x20at\x20least\x20one\x20field','alias','%s.%s\x20=\x20%s.%s','output','web','fullPath','%s-%s.%s','randomstring','generate','csv','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','Run\x20Query:','toString','child_process','fork','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','run','runReport','cross_join','getFields','replace','clone','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb','dbH','sendStatus','status','end','json','offset','undefined','count','limit'];(function(_0x3af576,_0x2b4be0){var _0xca84cd=function(_0x68403b){while(--_0x68403b){_0x3af576['push'](_0x3af576['shift']());}};_0xca84cd(++_0x2b4be0);}(_0x4975,0x86));var _0x5497=function(_0x4af63b,_0x3fa86b){_0x4af63b=_0x4af63b-0x0;var _0x1d59ab=_0x4975[_0x4af63b];return _0x1d59ab;};'use strict';var emlformat=require(_0x5497('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x5497('0x1'));var jsonpatch=require(_0x5497('0x2'));var rp=require(_0x5497('0x3'));var moment=require(_0x5497('0x4'));var BPromise=require(_0x5497('0x5'));var Mustache=require(_0x5497('0x6'));var util=require(_0x5497('0x7'));var path=require(_0x5497('0x8'));var sox=require(_0x5497('0x9'));var csv=require(_0x5497('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x5497('0xb'));var _=require('lodash');var squel=require(_0x5497('0xc'));var crypto=require(_0x5497('0xd'));var jsforce=require(_0x5497('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x5497('0xa'));var querystring=require('querystring');var Papa=require(_0x5497('0xf'));var Redis=require(_0x5497('0x10'));var authService=require(_0x5497('0x11'));var qs=require(_0x5497('0x12'));var as=require(_0x5497('0x13'));var hardwareService=require(_0x5497('0x14'));var logger=require(_0x5497('0x15'))(_0x5497('0x16'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x5497('0x17'))['db'];var dbH=require(_0x5497('0x17'))[_0x5497('0x18')];function respondWithStatusCode(_0x984990,_0x747dc7){_0x747dc7=_0x747dc7||0xcc;return function(_0x365144){if(_0x365144){return _0x984990[_0x5497('0x19')](_0x747dc7);}return _0x984990[_0x5497('0x1a')](_0x747dc7)[_0x5497('0x1b')]();};}function respondWithResult(_0x1a4c74,_0x55f590){_0x55f590=_0x55f590||0xc8;return function(_0x11b0a9){if(_0x11b0a9){return _0x1a4c74['status'](_0x55f590)[_0x5497('0x1c')](_0x11b0a9);}};}function respondWithFilteredResult(_0x2bfd8a,_0x19e5f3){return function(_0x3ce50b){if(_0x3ce50b){var _0x37c18e=typeof _0x19e5f3[_0x5497('0x1d')]===_0x5497('0x1e')&&typeof _0x19e5f3['limit']==='undefined';var _0x3f4d20=_0x3ce50b[_0x5497('0x1f')];var _0x3a47fd=_0x37c18e?0x0:_0x19e5f3['offset'];var _0xbf1ba7=_0x37c18e?_0x3ce50b[_0x5497('0x1f')]:_0x19e5f3[_0x5497('0x1d')]+_0x19e5f3[_0x5497('0x20')];var _0x1b1b43;if(_0xbf1ba7>=_0x3f4d20){_0xbf1ba7=_0x3f4d20;_0x1b1b43=0xc8;}else{_0x1b1b43=0xce;}_0x2bfd8a[_0x5497('0x1a')](_0x1b1b43);return _0x2bfd8a[_0x5497('0x21')](_0x5497('0x22'),_0x3a47fd+'-'+_0xbf1ba7+'/'+_0x3f4d20)[_0x5497('0x1c')](_0x3ce50b);}return null;};}function patchUpdates(_0x3f54ef){return function(_0x186065){try{jsonpatch['apply'](_0x186065,_0x3f54ef,!![]);}catch(_0x720767){return BPromise['reject'](_0x720767);}return _0x186065[_0x5497('0x23')]();};}function saveUpdates(_0xd0868d,_0x44265c){return function(_0x2f587d){if(_0x2f587d){return _0x2f587d[_0x5497('0x24')](_0xd0868d)[_0x5497('0x25')](function(_0x5018fa){return _0x5018fa;});}return null;};}function removeEntity(_0x54043a,_0x1eefce){return function(_0x34b97f){if(_0x34b97f){return _0x34b97f[_0x5497('0x26')]()[_0x5497('0x25')](function(){var _0x5223b5=_0x34b97f[_0x5497('0x27')]({'plain':!![]});var _0x57268c=_0x5497('0x28');return db[_0x5497('0x29')][_0x5497('0x26')]({'where':{'type':_0x57268c,'resourceId':_0x5223b5['id']}})[_0x5497('0x25')](function(){return _0x34b97f;});})[_0x5497('0x25')](function(){_0x54043a[_0x5497('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4af5f4,_0x5406e2){return function(_0x583d06){if(!_0x583d06){_0x4af5f4['sendStatus'](0x194);}return _0x583d06;};}function handleError(_0x39a2b7,_0x48d146){_0x48d146=_0x48d146||0x1f4;return function(_0x5e9356){logger[_0x5497('0x2a')](_0x5e9356[_0x5497('0x2b')]);if(_0x5e9356[_0x5497('0x2c')]){delete _0x5e9356['name'];}_0x39a2b7['status'](_0x48d146)['send'](_0x5e9356);};}exports[_0x5497('0x2d')]=function(_0x471e0b,_0xf4c117){var _0x5b8f79={},_0x489f71={},_0x594866={'count':0x0,'rows':[]};var _0xa28dd8=_['map'](db[_0x5497('0x2e')][_0x5497('0x2f')],function(_0x77c575){return{'name':_0x77c575['fieldName'],'type':_0x77c575[_0x5497('0x30')][_0x5497('0x31')]};});_0x489f71['model']=_[_0x5497('0x32')](_0xa28dd8,_0x5497('0x2c'));_0x489f71[_0x5497('0x33')]=_['keys'](_0x471e0b[_0x5497('0x33')]);_0x489f71[_0x5497('0x34')]=_[_0x5497('0x35')](_0x489f71[_0x5497('0x36')],_0x489f71[_0x5497('0x33')]);_0x5b8f79['attributes']=_[_0x5497('0x35')](_0x489f71[_0x5497('0x36')],qs['fields'](_0x471e0b[_0x5497('0x33')][_0x5497('0x37')]));_0x5b8f79[_0x5497('0x38')]=_0x5b8f79[_0x5497('0x38')][_0x5497('0x39')]?_0x5b8f79[_0x5497('0x38')]:_0x489f71['model'];if(!_0x471e0b[_0x5497('0x33')]['hasOwnProperty'](_0x5497('0x3a'))){_0x5b8f79[_0x5497('0x20')]=qs[_0x5497('0x20')](_0x471e0b['query']['limit']);_0x5b8f79[_0x5497('0x1d')]=qs[_0x5497('0x1d')](_0x471e0b[_0x5497('0x33')][_0x5497('0x1d')]);}_0x5b8f79[_0x5497('0x3b')]=qs[_0x5497('0x3c')](_0x471e0b['query'][_0x5497('0x3c')]);_0x5b8f79[_0x5497('0x3d')]=qs[_0x5497('0x34')](_[_0x5497('0x3e')](_0x471e0b[_0x5497('0x33')],_0x489f71[_0x5497('0x34')]),_0xa28dd8);if(_0x471e0b[_0x5497('0x33')][_0x5497('0x3f')]){_0x5b8f79[_0x5497('0x3d')]=_['merge'](_0x5b8f79[_0x5497('0x3d')],{'$or':_[_0x5497('0x32')](_0xa28dd8,function(_0x1e9616){if(_0x1e9616[_0x5497('0x30')]!==_0x5497('0x40')){var _0xa5ebe6={};_0xa5ebe6[_0x1e9616[_0x5497('0x2c')]]={'$like':'%'+_0x471e0b['query'][_0x5497('0x3f')]+'%'};return _0xa5ebe6;}})});}_0x5b8f79=_[_0x5497('0x41')]({},_0x5b8f79,_0x471e0b[_0x5497('0x42')]);var _0x35993c={'where':_0x5b8f79[_0x5497('0x3d')]};return db[_0x5497('0x2e')][_0x5497('0x1f')](_0x35993c)['then'](function(_0x2137bd){_0x594866[_0x5497('0x1f')]=_0x2137bd;if(_0x471e0b[_0x5497('0x33')][_0x5497('0x43')]){_0x5b8f79[_0x5497('0x44')]=[{'all':!![]}];}return db[_0x5497('0x2e')][_0x5497('0x45')](_0x5b8f79);})[_0x5497('0x25')](function(_0x2021ae){_0x594866[_0x5497('0x46')]=_0x2021ae;return _0x594866;})['then'](respondWithFilteredResult(_0xf4c117,_0x5b8f79))[_0x5497('0x47')](handleError(_0xf4c117,null));};exports['show']=function(_0x40822a,_0x9fc24){var _0x26ef01={'raw':!![],'where':{'id':_0x40822a[_0x5497('0x48')]['id']}},_0x3602ec={};_0x3602ec['model']=_[_0x5497('0x49')](db[_0x5497('0x2e')]['rawAttributes']);_0x3602ec[_0x5497('0x33')]=_['keys'](_0x40822a[_0x5497('0x33')]);_0x3602ec['filters']=_[_0x5497('0x35')](_0x3602ec[_0x5497('0x36')],_0x3602ec[_0x5497('0x33')]);_0x26ef01[_0x5497('0x38')]=_[_0x5497('0x35')](_0x3602ec['model'],qs['fields'](_0x40822a['query']['fields']));_0x26ef01[_0x5497('0x38')]=_0x26ef01[_0x5497('0x38')][_0x5497('0x39')]?_0x26ef01[_0x5497('0x38')]:_0x3602ec[_0x5497('0x36')];if(_0x40822a[_0x5497('0x33')][_0x5497('0x43')]){_0x26ef01[_0x5497('0x44')]=[{'all':!![]}];}_0x26ef01=_[_0x5497('0x41')]({},_0x26ef01,_0x40822a['options']);return db[_0x5497('0x2e')][_0x5497('0x4a')](_0x26ef01)[_0x5497('0x25')](handleEntityNotFound(_0x9fc24,null))['then'](respondWithResult(_0x9fc24,null))[_0x5497('0x47')](handleError(_0x9fc24,null));};exports['create']=function(_0x12ffbc,_0x31f1ba){return db[_0x5497('0x2e')]['create'](_0x12ffbc[_0x5497('0x4b')],{})[_0x5497('0x25')](function(_0x515c3e){var _0x3abc92=_0x12ffbc['user'][_0x5497('0x27')]({'plain':!![]});if(!_0x3abc92)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x3abc92[_0x5497('0x4c')]===_0x5497('0x4d')){var _0x26fd9f=_0x515c3e[_0x5497('0x27')]({'plain':!![]});var _0x25e80c=_0x5497('0x4e');return db[_0x5497('0x4f')][_0x5497('0x4a')]({'where':{'name':_0x25e80c,'userProfileId':_0x3abc92['userProfileId']},'raw':!![]})[_0x5497('0x25')](function(_0x5b2c22){if(_0x5b2c22&&_0x5b2c22['autoAssociation']===0x0){return db[_0x5497('0x29')][_0x5497('0x50')]({'name':_0x26fd9f['name'],'resourceId':_0x26fd9f['id'],'type':_0x5497('0x28'),'sectionId':_0x5b2c22['id']},{})[_0x5497('0x25')](function(){return _0x515c3e;});}else{return _0x515c3e;}})[_0x5497('0x47')](function(_0x3094c7){logger['error'](_0x5497('0x51'),_0x3094c7);throw _0x3094c7;});}return _0x515c3e;})['then'](respondWithResult(_0x31f1ba,0xc9))['catch'](handleError(_0x31f1ba,null));};exports[_0x5497('0x24')]=function(_0x33dd07,_0x2f7ec8){if(_0x33dd07['body']['id']){delete _0x33dd07['body']['id'];}return db[_0x5497('0x2e')]['find']({'where':{'id':_0x33dd07[_0x5497('0x48')]['id']}})['then'](handleEntityNotFound(_0x2f7ec8,null))[_0x5497('0x25')](saveUpdates(_0x33dd07['body'],null))[_0x5497('0x25')](respondWithResult(_0x2f7ec8,null))[_0x5497('0x47')](handleError(_0x2f7ec8,null));};exports['destroy']=function(_0x418f17,_0x5dccfb){return db['AnalyticDefaultReport'][_0x5497('0x4a')]({'where':{'id':_0x418f17[_0x5497('0x48')]['id']}})['then'](handleEntityNotFound(_0x5dccfb,null))[_0x5497('0x25')](removeEntity(_0x5dccfb,null))[_0x5497('0x47')](handleError(_0x5dccfb,null));};exports[_0x5497('0x52')]=function(_0x28b2a3,_0x3fca40){var _0x25c75e=0xa;var _0x590be7=[_0x5497('0x53'),'left_join','right_join','cross_join'];var _0x1f3965={'SUM':_0x5497('0x54'),'COUNT':_0x5497('0x55'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0x5497('0x56'),'MIN':'MIN(%s)','AVG':'AVG(%s)','GROUP_CONCAT':_0x5497('0x57'),'GROUP_CONCAT ASC':_0x5497('0x58'),'GROUP_CONCAT DESC':_0x5497('0x59')};var _0x25f349={'SEC_TO_TIME':_0x5497('0x5a'),'DATE':_0x5497('0x5b'),'HOUR':'HOUR(%s)','ROUND':_0x5497('0x5c'),'UNIX_TIMESTAMP':_0x5497('0x5d')};var _0x425995=function(_0xc783ce){return!_['includes']([_0x5497('0x5e'),_0x5497('0x5f'),_0x5497('0x60'),_0x5497('0x61')],_0xc783ce);};var _0x5823f6=function(_0x31271c){if(!_0x31271c||!_0x31271c[_0x5497('0x62')][_0x5497('0x39')]){return'';}for(var _0x542bcf='(',_0x1ab48f=0x0;_0x1ab48f<_0x31271c['rules']['length'];_0x1ab48f+=0x1){_0x1ab48f>0x0&&(_0x542bcf+='\x20'+_0x31271c['operator']+'\x20');_0x542bcf+=_0x31271c[_0x5497('0x62')][_0x1ab48f][_0x5497('0x63')]?_0x5823f6(_0x31271c[_0x5497('0x62')][_0x1ab48f]['group']):_0x31271c[_0x5497('0x62')][_0x1ab48f][_0x5497('0x64')]+'\x20'+_0x31271c[_0x5497('0x62')][_0x1ab48f][_0x5497('0x65')]+(_0x425995(_0x31271c['rules'][_0x1ab48f][_0x5497('0x65')])?'\x20'+_0x31271c[_0x5497('0x62')][_0x1ab48f][_0x5497('0x66')]:'');}return _0x542bcf+')';};var _0x49617c={'where':{'id':_0x28b2a3[_0x5497('0x48')]['id']}},_0x164de1,_0x465bed,_0xb3eec2,_0x4368e3,_0x1467c4;_0x49617c=_[_0x5497('0x41')]({},_0x49617c,_0x28b2a3['options']);return db[_0x5497('0x2e')][_0x5497('0x4a')](_0x49617c)[_0x5497('0x25')](function(_0x20efea){if(_0x20efea){_0x164de1=_0x20efea;return _0x20efea['getFields']();}return null;})['then'](function(_0x4a7360){if(_0x4a7360){if(!_0x4a7360[_0x5497('0x39')]){throw new db[(_0x5497('0x67'))][(_0x5497('0x68'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x465bed=_0x4a7360;return db[_0x5497('0x69')][_0x5497('0x45')]({'raw':!![]});}return null;})[_0x5497('0x25')](function(_0x464df3){if(_0x464df3){_0xb3eec2=_[_0x5497('0x6a')](_0x464df3,'id');var _0x4338d4;var _0x3f38bf=squel[_0x5497('0x6b')]();_0x3f38bf[_0x5497('0x6c')](_0x164de1[_0x5497('0x6d')]);for(var _0x1fc6ad=0x0;_0x1fc6ad<_0x465bed['length'];_0x1fc6ad+=0x1){_0x4338d4=_0x465bed[_0x1fc6ad][_0x5497('0x6e')]?_0xb3eec2[_0x465bed[_0x1fc6ad][_0x5497('0x6e')]][_0x5497('0x6f')]:_0x465bed[_0x1fc6ad]['field'];_0x4338d4=_0x465bed[_0x1fc6ad][_0x5497('0x70')]?_['replace'](_0x1f3965[_0x465bed[_0x1fc6ad][_0x5497('0x70')]],'%s',_0x4338d4):_0x4338d4;_0x4338d4=_0x465bed[_0x1fc6ad][_0x5497('0x71')]?_['replace'](_0x25f349[_0x465bed[_0x1fc6ad][_0x5497('0x71')]],'%s',_0x4338d4):_0x4338d4;if(_0x465bed[_0x1fc6ad][_0x5497('0x72')]){_0x3f38bf[_0x5497('0x63')](_0x4338d4);}_0x465bed[_0x1fc6ad][_0x5497('0x73')]&&_0x3f38bf['order'](_0x4338d4,_0x465bed[_0x1fc6ad][_0x5497('0x73')]===_0x5497('0x74')?![]:!![]);_0x3f38bf[_0x5497('0x64')](_0x4338d4,_0x465bed[_0x1fc6ad]['alias']||_0x4338d4);}if(_0x164de1[_0x5497('0x75')]){_0x164de1[_0x5497('0x75')]=JSON['parse'](_0x164de1[_0x5497('0x75')]);for(var _0xebe694=0x0;_0xebe694<_0x164de1[_0x5497('0x75')]['length'];_0xebe694+=0x1){if(_0x164de1['joins'][_0xebe694][_0x5497('0x30')]&&_[_0x5497('0x76')](_0x590be7,_0x164de1[_0x5497('0x75')][_0xebe694][_0x5497('0x30')])&&_0x164de1[_0x5497('0x75')][_0xebe694][_0x5497('0x77')]&&_0x164de1[_0x5497('0x75')][_0xebe694]['foreignTable']&&_0x164de1['joins'][_0xebe694][_0x5497('0x78')]){_0x3f38bf[_0x164de1[_0x5497('0x75')][_0xebe694]['type']](_0x164de1[_0x5497('0x75')][_0xebe694][_0x5497('0x79')],null,util[_0x5497('0x71')]('%s.%s\x20=\x20%s.%s',_0x164de1[_0x5497('0x6d')],_0x164de1[_0x5497('0x75')][_0xebe694]['parentKey'],_0x164de1[_0x5497('0x75')][_0xebe694][_0x5497('0x79')],_0x164de1[_0x5497('0x75')][_0xebe694][_0x5497('0x78')]));}}}if(_0x164de1[_0x5497('0x7a')]){_0x164de1['conditions']=JSON[_0x5497('0x7b')](_0x164de1[_0x5497('0x7a')]);_0x3f38bf[_0x5497('0x3d')](_0x5823f6(_0x164de1[_0x5497('0x7a')][_0x5497('0x63')]));}_0x1467c4=_0x3f38bf['clone']();_0x3f38bf[_0x5497('0x20')](_0x25c75e);_0x3f38bf[_0x5497('0x1d')](0x0);logger[_0x5497('0x7c')](_0x5497('0x7d'),_0x3f38bf['toString']());return dbH[_0x5497('0x7e')][_0x5497('0x33')](_0x3f38bf['toString'](),{'type':dbH[_0x5497('0x7e')][_0x5497('0x7f')][_0x5497('0x80')]});}})[_0x5497('0x25')](respondWithResult(_0x3fca40,null))['catch'](handleError(_0x3fca40,null));};function runReport(_0x547de7,_0x4ff64f,_0x5343d5){var _0x594761=_0x4ff64f[_0x5497('0x2c')];var _0x2375cc=0xa;var _0x15d0da=[_0x5497('0x53'),_0x5497('0x81'),'right_join','cross_join'];var _0x392987={'SUM':_0x5497('0x54'),'COUNT':_0x5497('0x55'),'COUNT DISTINCT':_0x5497('0x82'),'MAX':_0x5497('0x56'),'MIN':_0x5497('0x83'),'AVG':_0x5497('0x84'),'GROUP_CONCAT':_0x5497('0x57'),'GROUP_CONCAT ASC':_0x5497('0x58'),'GROUP_CONCAT DESC':_0x5497('0x59')};var _0x4c41c4={'SEC_TO_TIME':_0x5497('0x5a'),'DATE':_0x5497('0x5b'),'HOUR':_0x5497('0x85'),'ROUND':_0x5497('0x5c'),'UNIX_TIMESTAMP':_0x5497('0x5d')};var _0x22b019=function(_0x4aa4ba){return!_[_0x5497('0x76')](['IS\x20NULL',_0x5497('0x5f'),_0x5497('0x60'),_0x5497('0x61')],_0x4aa4ba);};var _0x5b0f9d=function(_0x59960b){if(!_0x59960b||!_0x59960b[_0x5497('0x62')][_0x5497('0x39')]){return'';}for(var _0x953b31='(',_0xeb52c9=0x0;_0xeb52c9<_0x59960b[_0x5497('0x62')][_0x5497('0x39')];_0xeb52c9+=0x1){_0xeb52c9>0x0&&(_0x953b31+='\x20'+_0x59960b[_0x5497('0x86')]+'\x20');_0x953b31+=_0x59960b[_0x5497('0x62')][_0xeb52c9]['group']?_0x5b0f9d(_0x59960b['rules'][_0xeb52c9]['group']):_0x59960b[_0x5497('0x62')][_0xeb52c9][_0x5497('0x64')]+'\x20'+_0x59960b[_0x5497('0x62')][_0xeb52c9][_0x5497('0x65')]+(_0x22b019(_0x59960b['rules'][_0xeb52c9]['condition'])?'\x20'+_0x59960b[_0x5497('0x62')][_0xeb52c9][_0x5497('0x66')]:'');}return _0x953b31+')';};var _0x5dd9bc={'where':{'id':_0x547de7['id']}},_0x83b240,_0x2fc11a,_0x3ce2ee,_0x36c09f,_0x51e9fb;_0x5dd9bc=_['merge']({},_0x5dd9bc,_0x5343d5);return db['AnalyticDefaultReport']['find'](_0x5dd9bc)['then'](function(_0x497295){if(_0x497295){_0x83b240=_0x497295;return _0x497295['getFields']();}return null;})[_0x5497('0x25')](function(_0x5aa5e1){if(_0x5aa5e1){if(!_0x5aa5e1[_0x5497('0x39')]){throw new db[(_0x5497('0x67'))][(_0x5497('0x68'))](_0x5497('0x87'),0x193);}_0x2fc11a=_0x5aa5e1;return db[_0x5497('0x69')][_0x5497('0x45')]({'raw':!![]});}return null;})['then'](function(_0x77d52c){if(_0x77d52c){_0x3ce2ee=_['keyBy'](_0x77d52c,'id');var _0x15a67d;var _0x2721b2=squel[_0x5497('0x6b')]();_0x2721b2[_0x5497('0x6c')](_0x83b240[_0x5497('0x6d')]);for(var _0x38fa59=0x0;_0x38fa59<_0x2fc11a[_0x5497('0x39')];_0x38fa59+=0x1){_0x15a67d=_0x2fc11a[_0x38fa59][_0x5497('0x6e')]?_0x3ce2ee[_0x2fc11a[_0x38fa59][_0x5497('0x6e')]][_0x5497('0x6f')]:_0x2fc11a[_0x38fa59]['field'];_0x15a67d=_0x2fc11a[_0x38fa59][_0x5497('0x70')]?_['replace'](_0x392987[_0x2fc11a[_0x38fa59][_0x5497('0x70')]],'%s',_0x15a67d):_0x15a67d;_0x15a67d=_0x2fc11a[_0x38fa59][_0x5497('0x71')]?_['replace'](_0x4c41c4[_0x2fc11a[_0x38fa59][_0x5497('0x71')]],'%s',_0x15a67d):_0x15a67d;if(_0x2fc11a[_0x38fa59][_0x5497('0x72')]){_0x2721b2[_0x5497('0x63')](_0x15a67d);}_0x2fc11a[_0x38fa59][_0x5497('0x73')]&&_0x2721b2[_0x5497('0x3b')](_0x15a67d,_0x2fc11a[_0x38fa59][_0x5497('0x73')]===_0x5497('0x74')?![]:!![]);_0x2721b2[_0x5497('0x64')](_0x15a67d,_0x2fc11a[_0x38fa59][_0x5497('0x88')]||_0x15a67d);}if(_0x83b240[_0x5497('0x75')]){_0x83b240[_0x5497('0x75')]=JSON[_0x5497('0x7b')](_0x83b240[_0x5497('0x75')]);for(var _0x22426e=0x0;_0x22426e<_0x83b240['joins'][_0x5497('0x39')];_0x22426e+=0x1){if(_0x83b240[_0x5497('0x75')][_0x22426e][_0x5497('0x30')]&&_[_0x5497('0x76')](_0x15d0da,_0x83b240[_0x5497('0x75')][_0x22426e]['type'])&&_0x83b240[_0x5497('0x75')][_0x22426e][_0x5497('0x77')]&&_0x83b240['joins'][_0x22426e]['foreignTable']&&_0x83b240[_0x5497('0x75')][_0x22426e][_0x5497('0x78')]){_0x2721b2[_0x83b240[_0x5497('0x75')][_0x22426e][_0x5497('0x30')]](_0x83b240[_0x5497('0x75')][_0x22426e]['foreignTable'],null,util['format'](_0x5497('0x89'),_0x83b240['table'],_0x83b240[_0x5497('0x75')][_0x22426e][_0x5497('0x77')],_0x83b240[_0x5497('0x75')][_0x22426e][_0x5497('0x79')],_0x83b240[_0x5497('0x75')][_0x22426e][_0x5497('0x78')]));}}}if(_0x83b240['conditions']){_0x83b240['conditions']=JSON[_0x5497('0x7b')](_0x83b240[_0x5497('0x7a')]);_0x2721b2[_0x5497('0x3d')](_0x5b0f9d(_0x83b240['conditions'][_0x5497('0x63')]));}_0x51e9fb=_0x2721b2['clone']();_0x2721b2[_0x5497('0x20')](_0x2375cc);_0x2721b2['offset'](0x0);return;}})['then'](function(){if(_0x4ff64f[_0x5497('0x8a')]===_0x5497('0x8b')){return null;}var _0x4ce768=_[_0x5497('0x41')](_0x4ff64f,{'name':_0x4ff64f[_0x5497('0x8c')]||_0x4ff64f[_0x5497('0x2c')]||_0x83b240[_0x5497('0x2c')],'basename':_0x594761,'savename':util['format'](_0x5497('0x8d'),_0x4ff64f[_0x5497('0x2c')]||_0x83b240[_0x5497('0x2c')],require(_0x5497('0x8e'))[_0x5497('0x8f')](0x4),_0x4ff64f['output']||_0x5497('0x90')),'reportId':_0x83b240['id'],'reportType':'default'});return db[_0x5497('0x91')][_0x5497('0x50')](_0x4ce768,{'raw':!![]});})[_0x5497('0x25')](function(_0x314db4){if(_0x83b240[_0x5497('0x6d')]===_0x5497('0x92')){_0x51e9fb[_0x5497('0x3d')](_0x83b240[_0x5497('0x6d')]+_0x5497('0x93'),_0x4ff64f[_0x5497('0x94')],_0x4ff64f[_0x5497('0x95')]);}else{_0x51e9fb['where'](_0x83b240[_0x5497('0x6d')]+_0x5497('0x96'),_0x4ff64f[_0x5497('0x94')],_0x4ff64f[_0x5497('0x95')]);}if(_0x314db4){logger[_0x5497('0x97')](_0x5497('0x98'),_0x51e9fb[_0x5497('0x99')]());require(_0x5497('0x9a'))[_0x5497('0x9b')](path[_0x5497('0x53')](__dirname,_0x5497('0x9c'),_0x314db4['output']),[_0x314db4['id'],_0x51e9fb[_0x5497('0x99')](),path[_0x5497('0x53')](__dirname,_0x5497('0x9d'),_0x314db4[_0x5497('0x9e')]),_0x594761]);return _0x314db4;}else{var _0x46be08=squel[_0x5497('0x6b')]();_0x46be08[_0x5497('0x6c')]('('+_0x51e9fb[_0x5497('0x99')]()+')',_0x5497('0x9f'));_0x46be08[_0x5497('0x64')](_0x5497('0xa0'),_0x5497('0x1f'));_0x51e9fb[_0x5497('0x20')](_0x4ff64f[_0x5497('0x20')]||_0x2375cc);_0x51e9fb['offset'](_0x4ff64f['offset']||0x0);return dbH[_0x5497('0x7e')][_0x5497('0x33')](_0x46be08[_0x5497('0x99')](),{'type':dbH['sequelize'][_0x5497('0x7f')][_0x5497('0x80')]})[_0x5497('0x25')](function(_0x2bd48c){if(!_0x2bd48c[_0x5497('0x39')]){_0x36c09f=0x0;}else{_0x36c09f=_0x2bd48c[0x0][_0x5497('0x1f')]||0x0;}return dbH[_0x5497('0x7e')][_0x5497('0x33')](_0x51e9fb['toString'](),{'type':dbH['sequelize']['QueryTypes'][_0x5497('0x80')]});})[_0x5497('0x25')](function(_0x4dab6a){return{'rows':_0x4dab6a||[],'count':_0x36c09f};});}});}exports[_0x5497('0xa1')]=function(_0x27f42b,_0x1bef85){return runReport(_0x27f42b['params'],_0x27f42b[_0x5497('0x33')],_0x27f42b['options'])[_0x5497('0x25')](respondWithResult(_0x1bef85,null))[_0x5497('0x47')](handleError(_0x1bef85,null));};exports[_0x5497('0xa2')]=runReport;exports['query']=function(_0x1c3dad,_0xfba062){var _0x494cc3=0xa;var _0x401f04=[_0x5497('0x53'),_0x5497('0x81'),'right_join',_0x5497('0xa3')];var _0x1a5c32={'SUM':_0x5497('0x54'),'COUNT':_0x5497('0x55'),'COUNT DISTINCT':_0x5497('0x82'),'MAX':_0x5497('0x56'),'MIN':_0x5497('0x83'),'AVG':_0x5497('0x84'),'GROUP_CONCAT':_0x5497('0x57'),'GROUP_CONCAT ASC':_0x5497('0x58'),'GROUP_CONCAT DESC':_0x5497('0x59')};var _0x1dfb76={'SEC_TO_TIME':_0x5497('0x5a'),'DATE':_0x5497('0x5b'),'HOUR':_0x5497('0x85'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':_0x5497('0x5d')};var _0x5c2517=function(_0x367929){return!_[_0x5497('0x76')](['IS\x20NULL','IS\x20NOT\x20NULL',_0x5497('0x60'),_0x5497('0x61')],_0x367929);};var _0x2fd2e3=function(_0x2fe770){if(!_0x2fe770||!_0x2fe770['rules'][_0x5497('0x39')]){return'';}for(var _0x1299cd='(',_0x4c2b14=0x0;_0x4c2b14<_0x2fe770['rules'][_0x5497('0x39')];_0x4c2b14+=0x1){_0x4c2b14>0x0&&(_0x1299cd+='\x20'+_0x2fe770[_0x5497('0x86')]+'\x20');_0x1299cd+=_0x2fe770[_0x5497('0x62')][_0x4c2b14][_0x5497('0x63')]?_0x2fd2e3(_0x2fe770[_0x5497('0x62')][_0x4c2b14]['group']):_0x2fe770['rules'][_0x4c2b14][_0x5497('0x64')]+'\x20'+_0x2fe770[_0x5497('0x62')][_0x4c2b14]['condition']+(_0x5c2517(_0x2fe770[_0x5497('0x62')][_0x4c2b14][_0x5497('0x65')])?'\x20'+_0x2fe770[_0x5497('0x62')][_0x4c2b14][_0x5497('0x66')]:'');}return _0x1299cd+')';};var _0x358ec5={'where':{'id':_0x1c3dad['params']['id']}},_0x5cddbc,_0x188d21,_0xf92129,_0x2d5cc1,_0x4f9228;_0x358ec5=_[_0x5497('0x41')]({},_0x358ec5,_0x1c3dad[_0x5497('0x42')]);return db[_0x5497('0x2e')]['find'](_0x358ec5)[_0x5497('0x25')](function(_0x30a248){if(_0x30a248){_0x5cddbc=_0x30a248;return _0x30a248[_0x5497('0xa4')]();}return null;})['then'](function(_0x1d4c76){if(_0x1d4c76){if(!_0x1d4c76[_0x5497('0x39')]){throw new db['Sequelize']['ValidationErrorItem'](_0x5497('0x87'),0x193);}_0x188d21=_0x1d4c76;return db[_0x5497('0x69')]['findAll']({'raw':!![]});}return null;})[_0x5497('0x25')](function(_0x5001d5){if(_0x5001d5){_0xf92129=_[_0x5497('0x6a')](_0x5001d5,'id');var _0x2c58e6;var _0x300f3e=squel[_0x5497('0x6b')]();_0x300f3e[_0x5497('0x6c')](_0x5cddbc[_0x5497('0x6d')]);for(var _0x23732d=0x0;_0x23732d<_0x188d21['length'];_0x23732d+=0x1){_0x2c58e6=_0x188d21[_0x23732d]['MetricId']?_0xf92129[_0x188d21[_0x23732d][_0x5497('0x6e')]][_0x5497('0x6f')]:_0x188d21[_0x23732d]['field'];_0x2c58e6=_0x188d21[_0x23732d]['function']?_[_0x5497('0xa5')](_0x1a5c32[_0x188d21[_0x23732d][_0x5497('0x70')]],'%s',_0x2c58e6):_0x2c58e6;_0x2c58e6=_0x188d21[_0x23732d][_0x5497('0x71')]?_[_0x5497('0xa5')](_0x1dfb76[_0x188d21[_0x23732d][_0x5497('0x71')]],'%s',_0x2c58e6):_0x2c58e6;if(_0x188d21[_0x23732d][_0x5497('0x72')]){_0x300f3e['group'](_0x2c58e6);}_0x188d21[_0x23732d][_0x5497('0x73')]&&_0x300f3e[_0x5497('0x3b')](_0x2c58e6,_0x188d21[_0x23732d][_0x5497('0x73')]===_0x5497('0x74')?![]:!![]);_0x300f3e[_0x5497('0x64')](_0x2c58e6,_0x188d21[_0x23732d][_0x5497('0x88')]||_0x2c58e6);}if(_0x5cddbc['joins']){_0x5cddbc[_0x5497('0x75')]=JSON['parse'](_0x5cddbc[_0x5497('0x75')]);for(var _0x261804=0x0;_0x261804<_0x5cddbc[_0x5497('0x75')]['length'];_0x261804+=0x1){if(_0x5cddbc[_0x5497('0x75')][_0x261804]['type']&&_['includes'](_0x401f04,_0x5cddbc[_0x5497('0x75')][_0x261804][_0x5497('0x30')])&&_0x5cddbc['joins'][_0x261804][_0x5497('0x77')]&&_0x5cddbc[_0x5497('0x75')][_0x261804][_0x5497('0x79')]&&_0x5cddbc[_0x5497('0x75')][_0x261804][_0x5497('0x78')]){_0x300f3e[_0x5cddbc[_0x5497('0x75')][_0x261804][_0x5497('0x30')]](_0x5cddbc[_0x5497('0x75')][_0x261804][_0x5497('0x79')],null,util['format'](_0x5497('0x89'),_0x5cddbc[_0x5497('0x6d')],_0x5cddbc[_0x5497('0x75')][_0x261804][_0x5497('0x77')],_0x5cddbc[_0x5497('0x75')][_0x261804][_0x5497('0x79')],_0x5cddbc[_0x5497('0x75')][_0x261804][_0x5497('0x78')]));}}}if(_0x5cddbc[_0x5497('0x7a')]){_0x5cddbc[_0x5497('0x7a')]=JSON[_0x5497('0x7b')](_0x5cddbc[_0x5497('0x7a')]);_0x300f3e[_0x5497('0x3d')](_0x2fd2e3(_0x5cddbc[_0x5497('0x7a')][_0x5497('0x63')]));}_0x4f9228=_0x300f3e[_0x5497('0xa6')]();_0x300f3e[_0x5497('0x20')](_0x494cc3);_0x300f3e[_0x5497('0x1d')](0x0);logger[_0x5497('0x7c')]('Limited\x20Query:',_0x300f3e[_0x5497('0x99')]());return dbH[_0x5497('0x7e')]['query'](_0x300f3e['toString'](),{'type':dbH[_0x5497('0x7e')]['QueryTypes'][_0x5497('0x80')]});}})[_0x5497('0x25')](function(){return{'sql':_0x4f9228[_0x5497('0x99')]()};})[_0x5497('0x25')](respondWithResult(_0xfba062,null))[_0x5497('0x47')](handleError(_0xfba062,null));};
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.model.js b/server/api/analyticDefaultReport/analyticDefaultReport.model.js
index e428237..b17b6b0 100644
--- a/server/api/analyticDefaultReport/analyticDefaultReport.model.js
+++ b/server/api/analyticDefaultReport/analyticDefaultReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbb9c=['analytics_default_reports','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','AnalyticDefaultReport'];(function(_0xf71120,_0x25b7f9){var _0xbe2fd3=function(_0x1acbdd){while(--_0x1acbdd){_0xf71120['push'](_0xf71120['shift']());}};_0xbe2fd3(++_0x25b7f9);}(_0xbb9c,0x198));var _0xcbb9=function(_0x55e08b,_0x421620){_0x55e08b=_0x55e08b-0x0;var _0xd1a7ff=_0xbb9c[_0x55e08b];return _0xd1a7ff;};'use strict';var _=require(_0xcbb9('0x0'));var util=require(_0xcbb9('0x1'));var logger=require(_0xcbb9('0x2'))(_0xcbb9('0x3'));var moment=require('moment');var BPromise=require(_0xcbb9('0x4'));var rp=require(_0xcbb9('0x5'));var fs=require('fs');var path=require(_0xcbb9('0x6'));var rimraf=require(_0xcbb9('0x7'));var config=require(_0xcbb9('0x8'));var attributes=require('./analyticDefaultReport.attributes');module['exports']=function(_0x1b872c,_0x202037){return _0x1b872c['define'](_0xcbb9('0x9'),attributes,{'tableName':_0xcbb9('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xdee9=['../../config/environment','exports','define','AnalyticDefaultReport','analytics_default_reports','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0xdee9,0x1b2));var _0x9dee=function(_0x2f3848,_0x48564d){_0x2f3848=_0x2f3848-0x0;var _0x102668=_0xdee9[_0x2f3848];return _0x102668;};'use strict';var _=require(_0x9dee('0x0'));var util=require(_0x9dee('0x1'));var logger=require(_0x9dee('0x2'))(_0x9dee('0x3'));var moment=require('moment');var BPromise=require(_0x9dee('0x4'));var rp=require(_0x9dee('0x5'));var fs=require('fs');var path=require(_0x9dee('0x6'));var rimraf=require(_0x9dee('0x7'));var config=require(_0x9dee('0x8'));var attributes=require('./analyticDefaultReport.attributes');module[_0x9dee('0x9')]=function(_0x17a4b7,_0x687199){return _0x17a4b7[_0x9dee('0xa')](_0x9dee('0xb'),attributes,{'tableName':_0x9dee('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js b/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js
index 35e87c5..5b756f8 100644
--- a/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js
+++ b/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x147f=['util','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','AnalyticDefaultReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash'];(function(_0x476839,_0x51dbad){var _0x220636=function(_0x556762){while(--_0x556762){_0x476839['push'](_0x476839['shift']());}};_0x220636(++_0x51dbad);}(_0x147f,0xa7));var _0xf147=function(_0x8a0ed3,_0x23981b){_0x8a0ed3=_0x8a0ed3-0x0;var _0x561cf2=_0x147f[_0x8a0ed3];return _0x561cf2;};'use strict';var _=require(_0xf147('0x0'));var util=require(_0xf147('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf147('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0xf147('0x3'));var logger=require(_0xf147('0x4'))(_0xf147('0x5'));var config=require(_0xf147('0x6'));var jayson=require(_0xf147('0x7'));var client=jayson[_0xf147('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1f3c17,_0x4ad92f,_0x8626c9){return new BPromise(function(_0xd9e60f,_0x17e0cf){return client[_0xf147('0x9')](_0x1f3c17,_0x8626c9)[_0xf147('0xa')](function(_0x61e491){logger[_0xf147('0xb')](_0xf147('0xc'),_0x4ad92f,_0xf147('0xd'));logger[_0xf147('0xe')]('AnalyticDefaultReport,\x20%s,\x20%s,\x20%s',_0x4ad92f,_0xf147('0xd'),JSON[_0xf147('0xf')](_0x61e491));if(_0x61e491[_0xf147('0x10')]){if(_0x61e491[_0xf147('0x10')][_0xf147('0x11')]===0x1f4){logger['error'](_0xf147('0xc'),_0x4ad92f,_0x61e491[_0xf147('0x10')][_0xf147('0x12')]);return _0x17e0cf(_0x61e491[_0xf147('0x10')][_0xf147('0x12')]);}logger[_0xf147('0x10')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x4ad92f,_0x61e491['error'][_0xf147('0x12')]);return _0xd9e60f(_0x61e491[_0xf147('0x10')][_0xf147('0x12')]);}else{logger[_0xf147('0xb')](_0xf147('0xc'),_0x4ad92f,_0xf147('0xd'));_0xd9e60f(_0x61e491[_0xf147('0x13')][_0xf147('0x12')]);}})[_0xf147('0x14')](function(_0x1b2bfe){logger['error'](_0xf147('0xc'),_0x4ad92f,_0x1b2bfe);_0x17e0cf(_0x1b2bfe);});});}
\ No newline at end of file
+var _0xcf7a=['AnalyticDefaultReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','result','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then'];(function(_0x35b201,_0x4a6e0c){var _0x998cc0=function(_0x2f0565){while(--_0x2f0565){_0x35b201['push'](_0x35b201['shift']());}};_0x998cc0(++_0x4a6e0c);}(_0xcf7a,0x1a7));var _0xacf7=function(_0x169c25,_0xb9b181){_0x169c25=_0x169c25-0x0;var _0x3688b4=_0xcf7a[_0x169c25];return _0x3688b4;};'use strict';var _=require(_0xacf7('0x0'));var util=require(_0xacf7('0x1'));var moment=require(_0xacf7('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xacf7('0x3'));var db=require(_0xacf7('0x4'))['db'];var utils=require(_0xacf7('0x5'));var logger=require(_0xacf7('0x6'))(_0xacf7('0x7'));var config=require(_0xacf7('0x8'));var jayson=require(_0xacf7('0x9'));var client=jayson[_0xacf7('0xa')][_0xacf7('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x17d1f9,_0x616916,_0x3cc8e9){return new BPromise(function(_0x5cf8a9,_0x4547a1){return client[_0xacf7('0xc')](_0x17d1f9,_0x3cc8e9)[_0xacf7('0xd')](function(_0x1266e0){logger['info'](_0xacf7('0xe'),_0x616916,_0xacf7('0xf'));logger[_0xacf7('0x10')]('AnalyticDefaultReport,\x20%s,\x20%s,\x20%s',_0x616916,_0xacf7('0xf'),JSON[_0xacf7('0x11')](_0x1266e0));if(_0x1266e0['error']){if(_0x1266e0[_0xacf7('0x12')][_0xacf7('0x13')]===0x1f4){logger[_0xacf7('0x12')](_0xacf7('0xe'),_0x616916,_0x1266e0[_0xacf7('0x12')][_0xacf7('0x14')]);return _0x4547a1(_0x1266e0[_0xacf7('0x12')][_0xacf7('0x14')]);}logger['error'](_0xacf7('0xe'),_0x616916,_0x1266e0[_0xacf7('0x12')][_0xacf7('0x14')]);return _0x5cf8a9(_0x1266e0[_0xacf7('0x12')]['message']);}else{logger[_0xacf7('0x15')](_0xacf7('0xe'),_0x616916,'request\x20sent');_0x5cf8a9(_0x1266e0[_0xacf7('0x16')]['message']);}})['catch'](function(_0x230022){logger[_0xacf7('0x12')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x616916,_0x230022);_0x4547a1(_0x230022);});});}
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/index.js b/server/api/analyticDefaultReport/index.js
index 44e840f..42e3a16 100644
--- a/server/api/analyticDefaultReport/index.js
+++ b/server/api/analyticDefaultReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x278b=['destroy','exports','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticDefaultReport.controller','isAuthenticated','index','get','show','/:id/preview','preview','/:id/run','run','/:id/query','query','create','put','/:id','update','delete'];(function(_0x12a01a,_0x3937db){var _0x131ebe=function(_0x292b7a){while(--_0x292b7a){_0x12a01a['push'](_0x12a01a['shift']());}};_0x131ebe(++_0x3937db);}(_0x278b,0xec));var _0xb278=function(_0x4e1d03,_0x786f3a){_0x4e1d03=_0x4e1d03-0x0;var _0x362d4b=_0x278b[_0x4e1d03];return _0x362d4b;};'use strict';var multer=require('multer');var util=require(_0xb278('0x0'));var path=require(_0xb278('0x1'));var timeout=require(_0xb278('0x2'));var express=require(_0xb278('0x3'));var router=express[_0xb278('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xb278('0x5'));var interaction=require(_0xb278('0x6'));var config=require(_0xb278('0x7'));var controller=require(_0xb278('0x8'));router['get']('/',auth[_0xb278('0x9')](),controller[_0xb278('0xa')]);router[_0xb278('0xb')]('/:id',auth[_0xb278('0x9')](),controller[_0xb278('0xc')]);router[_0xb278('0xb')](_0xb278('0xd'),auth[_0xb278('0x9')](),controller[_0xb278('0xe')]);router[_0xb278('0xb')](_0xb278('0xf'),auth[_0xb278('0x9')](),controller[_0xb278('0x10')]);router['get'](_0xb278('0x11'),auth[_0xb278('0x9')](),controller[_0xb278('0x12')]);router['post']('/',auth[_0xb278('0x9')](),controller[_0xb278('0x13')]);router[_0xb278('0x14')](_0xb278('0x15'),auth['isAuthenticated'](),controller[_0xb278('0x16')]);router[_0xb278('0x17')]('/:id',auth[_0xb278('0x9')](),controller[_0xb278('0x18')]);module[_0xb278('0x19')]=router;
\ No newline at end of file
+var _0xc627=['get','/:id','show','/:id/run','run','/:id/query','query','post','create','put','update','delete','destroy','multer','util','path','connect-timeout','express','../../config/environment','./analyticDefaultReport.controller','isAuthenticated','index'];(function(_0x243b59,_0x3f9495){var _0x3e1676=function(_0x354052){while(--_0x354052){_0x243b59['push'](_0x243b59['shift']());}};_0x3e1676(++_0x3f9495);}(_0xc627,0x12b));var _0x7c62=function(_0x2ea107,_0xd3322a){_0x2ea107=_0x2ea107-0x0;var _0xd82057=_0xc627[_0x2ea107];return _0xd82057;};'use strict';var multer=require(_0x7c62('0x0'));var util=require(_0x7c62('0x1'));var path=require(_0x7c62('0x2'));var timeout=require(_0x7c62('0x3'));var express=require(_0x7c62('0x4'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x7c62('0x5'));var controller=require(_0x7c62('0x6'));router['get']('/',auth[_0x7c62('0x7')](),controller[_0x7c62('0x8')]);router[_0x7c62('0x9')](_0x7c62('0xa'),auth[_0x7c62('0x7')](),controller[_0x7c62('0xb')]);router['get']('/:id/preview',auth[_0x7c62('0x7')](),controller['preview']);router[_0x7c62('0x9')](_0x7c62('0xc'),auth[_0x7c62('0x7')](),controller[_0x7c62('0xd')]);router['get'](_0x7c62('0xe'),auth[_0x7c62('0x7')](),controller[_0x7c62('0xf')]);router[_0x7c62('0x10')]('/',auth[_0x7c62('0x7')](),controller[_0x7c62('0x11')]);router[_0x7c62('0x12')](_0x7c62('0xa'),auth['isAuthenticated'](),controller[_0x7c62('0x13')]);router[_0x7c62('0x14')](_0x7c62('0xa'),auth[_0x7c62('0x7')](),controller[_0x7c62('0x15')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js b/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js
index fb818e7..1a64d61 100644
--- a/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js
+++ b/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x41e8=['ENUM','pdf','xlsx','csv','DATE','Loading','manual','scheduled','INTEGER','UNSIGNED','sequelize','moment','exports','STRING'];(function(_0x3e0136,_0x43cb63){var _0x4f9b41=function(_0x29fa9b){while(--_0x29fa9b){_0x3e0136['push'](_0x3e0136['shift']());}};_0x4f9b41(++_0x43cb63);}(_0x41e8,0x106));var _0x841e=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0x41e8[_0x4cf98e];return _0x1623ac;};'use strict';var Sequelize=require(_0x841e('0x0'));var moment=require(_0x841e('0x1'));module[_0x841e('0x2')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'basename':{'type':Sequelize[_0x841e('0x3')],'allowNull':![]},'output':{'type':Sequelize[_0x841e('0x4')]('csv',_0x841e('0x5'),_0x841e('0x6')),'allowNull':![],'defaultValue':_0x841e('0x7')},'savename':{'type':Sequelize[_0x841e('0x3')],'allowNull':![]},'startDate':{'type':Sequelize[_0x841e('0x8')]},'endDate':{'type':Sequelize[_0x841e('0x8')]},'status':{'type':Sequelize['STRING'],'defaultValue':_0x841e('0x9')},'type':{'type':Sequelize[_0x841e('0x4')](_0x841e('0xa'),_0x841e('0xb')),'allowNull':![],'defaultValue':_0x841e('0xa')},'reportId':{'type':Sequelize[_0x841e('0xc')](0xb)[_0x841e('0xd')]},'reportType':{'type':Sequelize[_0x841e('0x3')]}};
\ No newline at end of file
+var _0x6574=['exports','STRING','ENUM','xlsx','DATE','scheduled','manual','INTEGER','sequelize','moment'];(function(_0x5bfdc1,_0x7b1e19){var _0xd18268=function(_0x43ff55){while(--_0x43ff55){_0x5bfdc1['push'](_0x5bfdc1['shift']());}};_0xd18268(++_0x7b1e19);}(_0x6574,0x18e));var _0x4657=function(_0x50dea1,_0x3dc580){_0x50dea1=_0x50dea1-0x0;var _0x300b3f=_0x6574[_0x50dea1];return _0x300b3f;};'use strict';var Sequelize=require(_0x4657('0x0'));var moment=require(_0x4657('0x1'));module[_0x4657('0x2')]={'name':{'type':Sequelize[_0x4657('0x3')],'allowNull':![]},'basename':{'type':Sequelize[_0x4657('0x3')],'allowNull':![]},'output':{'type':Sequelize[_0x4657('0x4')]('csv','pdf',_0x4657('0x5')),'allowNull':![],'defaultValue':'csv'},'savename':{'type':Sequelize[_0x4657('0x3')],'allowNull':![]},'startDate':{'type':Sequelize['DATE']},'endDate':{'type':Sequelize[_0x4657('0x6')]},'status':{'type':Sequelize[_0x4657('0x3')],'defaultValue':'Loading'},'type':{'type':Sequelize['ENUM']('manual',_0x4657('0x7')),'allowNull':![],'defaultValue':_0x4657('0x8')},'reportId':{'type':Sequelize[_0x4657('0x9')](0xb)['UNSIGNED']},'reportType':{'type':Sequelize[_0x4657('0x3')]}};
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.controller.js b/server/api/analyticExtractedReport/analyticExtractedReport.controller.js
index 8123ab3..47f12e6 100644
--- a/server/api/analyticExtractedReport/analyticExtractedReport.controller.js
+++ b/server/api/analyticExtractedReport/analyticExtractedReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc64c=['apply','reject','save','update','then','destroy','get','ExtractedReports','UserProfileResource','stack','name','send','index','map','AnalyticExtractedReport','rawAttributes','fieldName','type','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filter','where','VIRTUAL','includeAll','include','rows','catch','params','options','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','basename','savename','existsSync','server/files/reports','Sequelize','ValidationError','Report\x20not\x20found\x20or\x20empty','download','join','root','format','%s.%s','output','toLowerCase','request-promise','moment','mustache','util','path','sox','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/license/util','../../mysqldb','sendStatus','status','undefined','limit','count','offset','set','Content-Range','json'];(function(_0x550d12,_0x5384bd){var _0x12103d=function(_0x2a9834){while(--_0x2a9834){_0x550d12['push'](_0x550d12['shift']());}};_0x12103d(++_0x5384bd);}(_0xc64c,0x9f));var _0xcc64=function(_0x59d89e,_0x55edf5){_0x59d89e=_0x59d89e-0x0;var _0x554e93=_0xc64c[_0x59d89e];return _0x554e93;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xcc64('0x0'));var moment=require(_0xcc64('0x1'));var BPromise=require('bluebird');var Mustache=require(_0xcc64('0x2'));var util=require(_0xcc64('0x3'));var path=require(_0xcc64('0x4'));var sox=require(_0xcc64('0x5'));var csv=require('to-csv');var ejs=require(_0xcc64('0x6'));var fs=require('fs');var fs_extra=require(_0xcc64('0x7'));var _=require(_0xcc64('0x8'));var squel=require(_0xcc64('0x9'));var crypto=require('crypto');var jsforce=require(_0xcc64('0xa'));var deskjs=require(_0xcc64('0xb'));var toCsv=require('to-csv');var querystring=require(_0xcc64('0xc'));var Papa=require(_0xcc64('0xd'));var Redis=require('ioredis');var authService=require(_0xcc64('0xe'));var qs=require(_0xcc64('0xf'));var as=require(_0xcc64('0x10'));var hardwareService=require(_0xcc64('0x11'));var logger=require(_0xcc64('0x12'))(_0xcc64('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xcc64('0x14'));var db=require(_0xcc64('0x15'))['db'];function respondWithStatusCode(_0x20eff1,_0x49bd09){_0x49bd09=_0x49bd09||0xcc;return function(_0x1dd770){if(_0x1dd770){return _0x20eff1[_0xcc64('0x16')](_0x49bd09);}return _0x20eff1[_0xcc64('0x17')](_0x49bd09)['end']();};}function respondWithResult(_0x154390,_0x189040){_0x189040=_0x189040||0xc8;return function(_0x5e3642){if(_0x5e3642){return _0x154390[_0xcc64('0x17')](_0x189040)['json'](_0x5e3642);}};}function respondWithFilteredResult(_0x2e36e1,_0x576f22){return function(_0x288e20){if(_0x288e20){var _0x434a69=typeof _0x576f22['offset']===_0xcc64('0x18')&&typeof _0x576f22[_0xcc64('0x19')]===_0xcc64('0x18');var _0x50130f=_0x288e20[_0xcc64('0x1a')];var _0x2d4467=_0x434a69?0x0:_0x576f22['offset'];var _0x679904=_0x434a69?_0x288e20['count']:_0x576f22[_0xcc64('0x1b')]+_0x576f22[_0xcc64('0x19')];var _0x54cf1b;if(_0x679904>=_0x50130f){_0x679904=_0x50130f;_0x54cf1b=0xc8;}else{_0x54cf1b=0xce;}_0x2e36e1['status'](_0x54cf1b);return _0x2e36e1[_0xcc64('0x1c')](_0xcc64('0x1d'),_0x2d4467+'-'+_0x679904+'/'+_0x50130f)[_0xcc64('0x1e')](_0x288e20);}return null;};}function patchUpdates(_0x4d5e47){return function(_0x36be91){try{jsonpatch[_0xcc64('0x1f')](_0x36be91,_0x4d5e47,!![]);}catch(_0x43ce25){return BPromise[_0xcc64('0x20')](_0x43ce25);}return _0x36be91[_0xcc64('0x21')]();};}function saveUpdates(_0x59d109,_0x1d551d){return function(_0x3a9df6){if(_0x3a9df6){return _0x3a9df6[_0xcc64('0x22')](_0x59d109)[_0xcc64('0x23')](function(_0x1d37e5){return _0x1d37e5;});}return null;};}function removeEntity(_0x868c6c,_0x5d9835){return function(_0x455df6){if(_0x455df6){return _0x455df6[_0xcc64('0x24')]()['then'](function(){var _0x34dd35=_0x455df6[_0xcc64('0x25')]({'plain':!![]});var _0x41b552=_0xcc64('0x26');return db[_0xcc64('0x27')][_0xcc64('0x24')]({'where':{'type':_0x41b552,'resourceId':_0x34dd35['id']}})['then'](function(){return _0x455df6;});})[_0xcc64('0x23')](function(){_0x868c6c[_0xcc64('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x131acc,_0x342add){return function(_0x3ba3b3){if(!_0x3ba3b3){_0x131acc['sendStatus'](0x194);}return _0x3ba3b3;};}function handleError(_0x247b06,_0x2e3ebc){_0x2e3ebc=_0x2e3ebc||0x1f4;return function(_0x4bf17c){logger['error'](_0x4bf17c[_0xcc64('0x28')]);if(_0x4bf17c['name']){delete _0x4bf17c[_0xcc64('0x29')];}_0x247b06[_0xcc64('0x17')](_0x2e3ebc)[_0xcc64('0x2a')](_0x4bf17c);};}exports[_0xcc64('0x2b')]=function(_0x347db5,_0x5d1cea){var _0x3e2188={},_0xdf4b1a={},_0xde3ffe={'count':0x0,'rows':[]};var _0x120a3a=_[_0xcc64('0x2c')](db[_0xcc64('0x2d')][_0xcc64('0x2e')],function(_0x5ea920){return{'name':_0x5ea920[_0xcc64('0x2f')],'type':_0x5ea920[_0xcc64('0x30')]['key']};});_0xdf4b1a[_0xcc64('0x31')]=_[_0xcc64('0x2c')](_0x120a3a,_0xcc64('0x29'));_0xdf4b1a['query']=_[_0xcc64('0x32')](_0x347db5[_0xcc64('0x33')]);_0xdf4b1a[_0xcc64('0x34')]=_[_0xcc64('0x35')](_0xdf4b1a[_0xcc64('0x31')],_0xdf4b1a['query']);_0x3e2188[_0xcc64('0x36')]=_[_0xcc64('0x35')](_0xdf4b1a[_0xcc64('0x31')],qs[_0xcc64('0x37')](_0x347db5[_0xcc64('0x33')][_0xcc64('0x37')]));_0x3e2188[_0xcc64('0x36')]=_0x3e2188[_0xcc64('0x36')][_0xcc64('0x38')]?_0x3e2188['attributes']:_0xdf4b1a[_0xcc64('0x31')];if(!_0x347db5[_0xcc64('0x33')][_0xcc64('0x39')](_0xcc64('0x3a'))){_0x3e2188['limit']=qs[_0xcc64('0x19')](_0x347db5[_0xcc64('0x33')]['limit']);_0x3e2188[_0xcc64('0x1b')]=qs[_0xcc64('0x1b')](_0x347db5['query'][_0xcc64('0x1b')]);}_0x3e2188[_0xcc64('0x3b')]=qs[_0xcc64('0x3c')](_0x347db5[_0xcc64('0x33')]['sort']);_0x3e2188['where']=qs[_0xcc64('0x34')](_['pick'](_0x347db5['query'],_0xdf4b1a[_0xcc64('0x34')]),_0x120a3a);if(_0x347db5[_0xcc64('0x33')][_0xcc64('0x3d')]){_0x3e2188['where']=_['merge'](_0x3e2188[_0xcc64('0x3e')],{'$or':_[_0xcc64('0x2c')](_0x120a3a,function(_0x519a2e){if(_0x519a2e[_0xcc64('0x30')]!==_0xcc64('0x3f')){var _0x23a440={};_0x23a440[_0x519a2e[_0xcc64('0x29')]]={'$like':'%'+_0x347db5[_0xcc64('0x33')][_0xcc64('0x3d')]+'%'};return _0x23a440;}})});}_0x3e2188=_['merge']({},_0x3e2188,_0x347db5['options']);var _0x1bf37f={'where':_0x3e2188[_0xcc64('0x3e')]};return db[_0xcc64('0x2d')]['count'](_0x1bf37f)[_0xcc64('0x23')](function(_0x43fbf6){_0xde3ffe[_0xcc64('0x1a')]=_0x43fbf6;if(_0x347db5[_0xcc64('0x33')][_0xcc64('0x40')]){_0x3e2188[_0xcc64('0x41')]=[{'all':!![]}];}return db[_0xcc64('0x2d')]['findAll'](_0x3e2188);})['then'](function(_0x41a32b){_0xde3ffe[_0xcc64('0x42')]=_0x41a32b;return _0xde3ffe;})[_0xcc64('0x23')](respondWithFilteredResult(_0x5d1cea,_0x3e2188))[_0xcc64('0x43')](handleError(_0x5d1cea,null));};exports['show']=function(_0xc4782a,_0x1de3d9){var _0x2f2ca7={'raw':!![],'where':{'id':_0xc4782a[_0xcc64('0x44')]['id']}},_0x6180aa={};_0x6180aa[_0xcc64('0x31')]=_[_0xcc64('0x32')](db[_0xcc64('0x2d')][_0xcc64('0x2e')]);_0x6180aa[_0xcc64('0x33')]=_[_0xcc64('0x32')](_0xc4782a['query']);_0x6180aa[_0xcc64('0x34')]=_[_0xcc64('0x35')](_0x6180aa[_0xcc64('0x31')],_0x6180aa[_0xcc64('0x33')]);_0x2f2ca7['attributes']=_[_0xcc64('0x35')](_0x6180aa[_0xcc64('0x31')],qs[_0xcc64('0x37')](_0xc4782a['query']['fields']));_0x2f2ca7[_0xcc64('0x36')]=_0x2f2ca7['attributes'][_0xcc64('0x38')]?_0x2f2ca7[_0xcc64('0x36')]:_0x6180aa[_0xcc64('0x31')];if(_0xc4782a[_0xcc64('0x33')][_0xcc64('0x40')]){_0x2f2ca7[_0xcc64('0x41')]=[{'all':!![]}];}_0x2f2ca7=_['merge']({},_0x2f2ca7,_0xc4782a[_0xcc64('0x45')]);return db[_0xcc64('0x2d')][_0xcc64('0x46')](_0x2f2ca7)[_0xcc64('0x23')](handleEntityNotFound(_0x1de3d9,null))[_0xcc64('0x23')](respondWithResult(_0x1de3d9,null))[_0xcc64('0x43')](handleError(_0x1de3d9,null));};exports[_0xcc64('0x47')]=function(_0x402c0e,_0x2c9fe4){return db[_0xcc64('0x2d')][_0xcc64('0x47')](_0x402c0e[_0xcc64('0x48')],{})[_0xcc64('0x23')](function(_0x28471d){var _0x3defc7=_0x402c0e[_0xcc64('0x49')][_0xcc64('0x25')]({'plain':!![]});if(!_0x3defc7)throw new Error(_0xcc64('0x4a'));if(_0x3defc7[_0xcc64('0x4b')]===_0xcc64('0x49')){var _0x2325a6=_0x28471d[_0xcc64('0x25')]({'plain':!![]});var _0x150e22=_0xcc64('0x26');return db[_0xcc64('0x4c')][_0xcc64('0x46')]({'where':{'name':_0x150e22,'userProfileId':_0x3defc7[_0xcc64('0x4d')]},'raw':!![]})[_0xcc64('0x23')](function(_0x26ab07){if(_0x26ab07&&_0x26ab07[_0xcc64('0x4e')]===0x0){return db[_0xcc64('0x27')][_0xcc64('0x47')]({'name':_0x2325a6[_0xcc64('0x29')],'resourceId':_0x2325a6['id'],'type':_0x26ab07[_0xcc64('0x29')],'sectionId':_0x26ab07['id']},{})[_0xcc64('0x23')](function(){return _0x28471d;});}else{return _0x28471d;}})['catch'](function(_0x13fd87){logger[_0xcc64('0x4f')](_0xcc64('0x50'),_0x13fd87);throw _0x13fd87;});}return _0x28471d;})[_0xcc64('0x23')](respondWithResult(_0x2c9fe4,0xc9))[_0xcc64('0x43')](handleError(_0x2c9fe4,null));};exports[_0xcc64('0x22')]=function(_0xf86724,_0x3def5e){if(_0xf86724['body']['id']){delete _0xf86724[_0xcc64('0x48')]['id'];}return db['AnalyticExtractedReport']['find']({'where':{'id':_0xf86724[_0xcc64('0x44')]['id']}})[_0xcc64('0x23')](handleEntityNotFound(_0x3def5e,null))[_0xcc64('0x23')](saveUpdates(_0xf86724[_0xcc64('0x48')],null))[_0xcc64('0x23')](respondWithResult(_0x3def5e,null))[_0xcc64('0x43')](handleError(_0x3def5e,null));};exports['destroy']=function(_0x4b83c7,_0x76eed2){return db['AnalyticExtractedReport'][_0xcc64('0x46')]({'where':{'id':_0x4b83c7[_0xcc64('0x44')]['id']}})[_0xcc64('0x23')](handleEntityNotFound(_0x76eed2,null))['then'](removeEntity(_0x76eed2,null))[_0xcc64('0x43')](handleError(_0x76eed2,null));};exports['download']=function(_0x30c43e,_0x4348d1,_0x43aa75){return db['AnalyticExtractedReport']['find']({'where':{'id':_0x30c43e[_0xcc64('0x44')]['id']},'attributes':[_0xcc64('0x29'),_0xcc64('0x51'),_0xcc64('0x52'),'output'],'raw':!![]})['then'](handleEntityNotFound(_0x4348d1,null))[_0xcc64('0x23')](function(_0xb867e1){if(_0xb867e1){if(!fs[_0xcc64('0x53')](path['join'](config['root'],_0xcc64('0x54'),_0xb867e1[_0xcc64('0x52')]))){throw new db[(_0xcc64('0x55'))][(_0xcc64('0x56'))](_0xcc64('0x57'));}if(_0x30c43e[_0xcc64('0x33')]['exists']){return _0x4348d1[_0xcc64('0x16')](0xc8);}return _0x4348d1[_0xcc64('0x58')](path[_0xcc64('0x59')](config[_0xcc64('0x5a')],_0xcc64('0x54'),_0xb867e1['savename']),util[_0xcc64('0x5b')](_0xcc64('0x5c'),_0xb867e1[_0xcc64('0x51')]||_0xb867e1['name'],_0xb867e1[_0xcc64('0x5d')][_0xcc64('0x5e')]()));}})[_0xcc64('0x43')](handleError(_0x4348d1,null));};
\ No newline at end of file
+var _0x24d5=['request-promise','moment','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','undefined','limit','count','Content-Range','update','then','destroy','ExtractedReports','end','sendStatus','error','name','send','map','AnalyticExtractedReport','rawAttributes','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','create','body','user','get','role','UserProfileSection','find','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','download','basename','output','existsSync','root','server/files/reports','Sequelize','ValidationError','Report\x20not\x20found\x20or\x20empty','join','savename','toLowerCase','eml-format','rimraf','zip-dir','fast-json-patch'];(function(_0x14639e,_0x2407e0){var _0x49be63=function(_0x27dbc4){while(--_0x27dbc4){_0x14639e['push'](_0x14639e['shift']());}};_0x49be63(++_0x2407e0);}(_0x24d5,0x116));var _0x524d=function(_0x377408,_0x1e2f33){_0x377408=_0x377408-0x0;var _0x4769d4=_0x24d5[_0x377408];return _0x4769d4;};'use strict';var emlformat=require(_0x524d('0x0'));var rimraf=require(_0x524d('0x1'));var zipdir=require(_0x524d('0x2'));var jsonpatch=require(_0x524d('0x3'));var rp=require(_0x524d('0x4'));var moment=require(_0x524d('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x524d('0x6'));var util=require('util');var path=require(_0x524d('0x7'));var sox=require(_0x524d('0x8'));var csv=require(_0x524d('0x9'));var ejs=require(_0x524d('0xa'));var fs=require('fs');var fs_extra=require(_0x524d('0xb'));var _=require(_0x524d('0xc'));var squel=require(_0x524d('0xd'));var crypto=require(_0x524d('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x524d('0xf'));var toCsv=require(_0x524d('0x9'));var querystring=require('querystring');var Papa=require(_0x524d('0x10'));var Redis=require(_0x524d('0x11'));var authService=require(_0x524d('0x12'));var qs=require(_0x524d('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x524d('0x14'));var logger=require(_0x524d('0x15'))('api');var utils=require(_0x524d('0x16'));var config=require(_0x524d('0x17'));var licenseUtil=require(_0x524d('0x18'));var db=require(_0x524d('0x19'))['db'];function respondWithStatusCode(_0x3d6b1a,_0x36d164){_0x36d164=_0x36d164||0xcc;return function(_0x4f473c){if(_0x4f473c){return _0x3d6b1a['sendStatus'](_0x36d164);}return _0x3d6b1a['status'](_0x36d164)['end']();};}function respondWithResult(_0x23d557,_0x1aa443){_0x1aa443=_0x1aa443||0xc8;return function(_0x2f0e8f){if(_0x2f0e8f){return _0x23d557[_0x524d('0x1a')](_0x1aa443)[_0x524d('0x1b')](_0x2f0e8f);}};}function respondWithFilteredResult(_0x8297f,_0x47a8d8){return function(_0x5b3491){if(_0x5b3491){var _0x1de0e9=typeof _0x47a8d8[_0x524d('0x1c')]===_0x524d('0x1d')&&typeof _0x47a8d8[_0x524d('0x1e')]===_0x524d('0x1d');var _0x2ab3fd=_0x5b3491[_0x524d('0x1f')];var _0x44f4bb=_0x1de0e9?0x0:_0x47a8d8[_0x524d('0x1c')];var _0x427124=_0x1de0e9?_0x5b3491[_0x524d('0x1f')]:_0x47a8d8['offset']+_0x47a8d8[_0x524d('0x1e')];var _0x27ac00;if(_0x427124>=_0x2ab3fd){_0x427124=_0x2ab3fd;_0x27ac00=0xc8;}else{_0x27ac00=0xce;}_0x8297f['status'](_0x27ac00);return _0x8297f['set'](_0x524d('0x20'),_0x44f4bb+'-'+_0x427124+'/'+_0x2ab3fd)[_0x524d('0x1b')](_0x5b3491);}return null;};}function patchUpdates(_0x575808){return function(_0x34ef9d){try{jsonpatch['apply'](_0x34ef9d,_0x575808,!![]);}catch(_0x8d6f64){return BPromise['reject'](_0x8d6f64);}return _0x34ef9d['save']();};}function saveUpdates(_0x3550cd,_0x43897b){return function(_0x129ca0){if(_0x129ca0){return _0x129ca0[_0x524d('0x21')](_0x3550cd)[_0x524d('0x22')](function(_0x511d35){return _0x511d35;});}return null;};}function removeEntity(_0x4167e6,_0x34241e){return function(_0x2fd24a){if(_0x2fd24a){return _0x2fd24a[_0x524d('0x23')]()[_0x524d('0x22')](function(){var _0x2aab56=_0x2fd24a['get']({'plain':!![]});var _0x12decf=_0x524d('0x24');return db['UserProfileResource']['destroy']({'where':{'type':_0x12decf,'resourceId':_0x2aab56['id']}})[_0x524d('0x22')](function(){return _0x2fd24a;});})['then'](function(){_0x4167e6[_0x524d('0x1a')](0xcc)[_0x524d('0x25')]();});}};}function handleEntityNotFound(_0x2846ad,_0x28d73d){return function(_0x2d9ffa){if(!_0x2d9ffa){_0x2846ad[_0x524d('0x26')](0x194);}return _0x2d9ffa;};}function handleError(_0x19a3f9,_0x8bd9be){_0x8bd9be=_0x8bd9be||0x1f4;return function(_0x4745e1){logger[_0x524d('0x27')](_0x4745e1['stack']);if(_0x4745e1[_0x524d('0x28')]){delete _0x4745e1[_0x524d('0x28')];}_0x19a3f9[_0x524d('0x1a')](_0x8bd9be)[_0x524d('0x29')](_0x4745e1);};}exports['index']=function(_0x18018c,_0x384a36){var _0x38c955={},_0x1b3681={},_0x5a1a0f={'count':0x0,'rows':[]};var _0x15ca45=_[_0x524d('0x2a')](db[_0x524d('0x2b')][_0x524d('0x2c')],function(_0x16a980){return{'name':_0x16a980['fieldName'],'type':_0x16a980[_0x524d('0x2d')][_0x524d('0x2e')]};});_0x1b3681[_0x524d('0x2f')]=_[_0x524d('0x2a')](_0x15ca45,_0x524d('0x28'));_0x1b3681[_0x524d('0x30')]=_[_0x524d('0x31')](_0x18018c[_0x524d('0x30')]);_0x1b3681[_0x524d('0x32')]=_[_0x524d('0x33')](_0x1b3681['model'],_0x1b3681[_0x524d('0x30')]);_0x38c955['attributes']=_[_0x524d('0x33')](_0x1b3681['model'],qs[_0x524d('0x34')](_0x18018c[_0x524d('0x30')][_0x524d('0x34')]));_0x38c955['attributes']=_0x38c955[_0x524d('0x35')][_0x524d('0x36')]?_0x38c955[_0x524d('0x35')]:_0x1b3681[_0x524d('0x2f')];if(!_0x18018c[_0x524d('0x30')][_0x524d('0x37')](_0x524d('0x38'))){_0x38c955['limit']=qs['limit'](_0x18018c[_0x524d('0x30')][_0x524d('0x1e')]);_0x38c955[_0x524d('0x1c')]=qs[_0x524d('0x1c')](_0x18018c[_0x524d('0x30')]['offset']);}_0x38c955['order']=qs[_0x524d('0x39')](_0x18018c['query']['sort']);_0x38c955[_0x524d('0x3a')]=qs[_0x524d('0x32')](_[_0x524d('0x3b')](_0x18018c[_0x524d('0x30')],_0x1b3681[_0x524d('0x32')]),_0x15ca45);if(_0x18018c['query'][_0x524d('0x3c')]){_0x38c955[_0x524d('0x3a')]=_[_0x524d('0x3d')](_0x38c955['where'],{'$or':_[_0x524d('0x2a')](_0x15ca45,function(_0x11534f){if(_0x11534f[_0x524d('0x2d')]!==_0x524d('0x3e')){var _0x7534e={};_0x7534e[_0x11534f[_0x524d('0x28')]]={'$like':'%'+_0x18018c['query'][_0x524d('0x3c')]+'%'};return _0x7534e;}})});}_0x38c955=_[_0x524d('0x3d')]({},_0x38c955,_0x18018c[_0x524d('0x3f')]);var _0x12ff5a={'where':_0x38c955['where']};return db[_0x524d('0x2b')][_0x524d('0x1f')](_0x12ff5a)[_0x524d('0x22')](function(_0x243968){_0x5a1a0f[_0x524d('0x1f')]=_0x243968;if(_0x18018c[_0x524d('0x30')][_0x524d('0x40')]){_0x38c955[_0x524d('0x41')]=[{'all':!![]}];}return db[_0x524d('0x2b')][_0x524d('0x42')](_0x38c955);})[_0x524d('0x22')](function(_0x1da597){_0x5a1a0f[_0x524d('0x43')]=_0x1da597;return _0x5a1a0f;})[_0x524d('0x22')](respondWithFilteredResult(_0x384a36,_0x38c955))[_0x524d('0x44')](handleError(_0x384a36,null));};exports[_0x524d('0x45')]=function(_0x1c9b32,_0x4e7d56){var _0x3b7f04={'raw':!![],'where':{'id':_0x1c9b32[_0x524d('0x46')]['id']}},_0x3352f8={};_0x3352f8['model']=_[_0x524d('0x31')](db['AnalyticExtractedReport'][_0x524d('0x2c')]);_0x3352f8[_0x524d('0x30')]=_[_0x524d('0x31')](_0x1c9b32[_0x524d('0x30')]);_0x3352f8['filters']=_[_0x524d('0x33')](_0x3352f8[_0x524d('0x2f')],_0x3352f8[_0x524d('0x30')]);_0x3b7f04['attributes']=_[_0x524d('0x33')](_0x3352f8[_0x524d('0x2f')],qs[_0x524d('0x34')](_0x1c9b32[_0x524d('0x30')][_0x524d('0x34')]));_0x3b7f04['attributes']=_0x3b7f04[_0x524d('0x35')][_0x524d('0x36')]?_0x3b7f04['attributes']:_0x3352f8[_0x524d('0x2f')];if(_0x1c9b32['query'][_0x524d('0x40')]){_0x3b7f04['include']=[{'all':!![]}];}_0x3b7f04=_[_0x524d('0x3d')]({},_0x3b7f04,_0x1c9b32[_0x524d('0x3f')]);return db[_0x524d('0x2b')]['find'](_0x3b7f04)[_0x524d('0x22')](handleEntityNotFound(_0x4e7d56,null))[_0x524d('0x22')](respondWithResult(_0x4e7d56,null))[_0x524d('0x44')](handleError(_0x4e7d56,null));};exports['create']=function(_0x1d0ffa,_0x194bb7){return db[_0x524d('0x2b')][_0x524d('0x47')](_0x1d0ffa[_0x524d('0x48')],{})[_0x524d('0x22')](function(_0x4b3984){var _0x16cdf3=_0x1d0ffa[_0x524d('0x49')][_0x524d('0x4a')]({'plain':!![]});if(!_0x16cdf3)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x16cdf3[_0x524d('0x4b')]===_0x524d('0x49')){var _0x767e35=_0x4b3984[_0x524d('0x4a')]({'plain':!![]});var _0x157222=_0x524d('0x24');return db[_0x524d('0x4c')][_0x524d('0x4d')]({'where':{'name':_0x157222,'userProfileId':_0x16cdf3[_0x524d('0x4e')]},'raw':!![]})['then'](function(_0x60dd60){if(_0x60dd60&&_0x60dd60[_0x524d('0x4f')]===0x0){return db[_0x524d('0x50')]['create']({'name':_0x767e35['name'],'resourceId':_0x767e35['id'],'type':_0x60dd60['name'],'sectionId':_0x60dd60['id']},{})[_0x524d('0x22')](function(){return _0x4b3984;});}else{return _0x4b3984;}})['catch'](function(_0x1371ea){logger[_0x524d('0x27')](_0x524d('0x51'),_0x1371ea);throw _0x1371ea;});}return _0x4b3984;})[_0x524d('0x22')](respondWithResult(_0x194bb7,0xc9))[_0x524d('0x44')](handleError(_0x194bb7,null));};exports['update']=function(_0x4dca41,_0x1b073c){if(_0x4dca41[_0x524d('0x48')]['id']){delete _0x4dca41[_0x524d('0x48')]['id'];}return db[_0x524d('0x2b')][_0x524d('0x4d')]({'where':{'id':_0x4dca41[_0x524d('0x46')]['id']}})[_0x524d('0x22')](handleEntityNotFound(_0x1b073c,null))[_0x524d('0x22')](saveUpdates(_0x4dca41[_0x524d('0x48')],null))[_0x524d('0x22')](respondWithResult(_0x1b073c,null))[_0x524d('0x44')](handleError(_0x1b073c,null));};exports[_0x524d('0x23')]=function(_0x3082b4,_0x5e433d){return db[_0x524d('0x2b')][_0x524d('0x4d')]({'where':{'id':_0x3082b4[_0x524d('0x46')]['id']}})[_0x524d('0x22')](handleEntityNotFound(_0x5e433d,null))[_0x524d('0x22')](removeEntity(_0x5e433d,null))[_0x524d('0x44')](handleError(_0x5e433d,null));};exports[_0x524d('0x52')]=function(_0x25f33c,_0x497191,_0x496c5e){return db[_0x524d('0x2b')]['find']({'where':{'id':_0x25f33c[_0x524d('0x46')]['id']},'attributes':[_0x524d('0x28'),_0x524d('0x53'),'savename',_0x524d('0x54')],'raw':!![]})['then'](handleEntityNotFound(_0x497191,null))[_0x524d('0x22')](function(_0x1d9f48){if(_0x1d9f48){if(!fs[_0x524d('0x55')](path['join'](config[_0x524d('0x56')],_0x524d('0x57'),_0x1d9f48['savename']))){throw new db[(_0x524d('0x58'))][(_0x524d('0x59'))](_0x524d('0x5a'));}if(_0x25f33c['query']['exists']){return _0x497191['sendStatus'](0xc8);}return _0x497191[_0x524d('0x52')](path[_0x524d('0x5b')](config[_0x524d('0x56')],_0x524d('0x57'),_0x1d9f48[_0x524d('0x5c')]),util['format']('%s.%s',_0x1d9f48[_0x524d('0x53')]||_0x1d9f48[_0x524d('0x28')],_0x1d9f48[_0x524d('0x54')][_0x524d('0x5d')]()));}})['catch'](handleError(_0x497191,null));};
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.model.js b/server/api/analyticExtractedReport/analyticExtractedReport.model.js
index c4ba7a5..237d2d7 100644
--- a/server/api/analyticExtractedReport/analyticExtractedReport.model.js
+++ b/server/api/analyticExtractedReport/analyticExtractedReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcd32=['AnalyticExtractedReport','lodash','util','api','moment','bluebird','request-promise','path','rimraf','./analyticExtractedReport.attributes','exports','define'];(function(_0x154b19,_0x21e4cf){var _0x10f433=function(_0x44e746){while(--_0x44e746){_0x154b19['push'](_0x154b19['shift']());}};_0x10f433(++_0x21e4cf);}(_0xcd32,0xe5));var _0x2cd3=function(_0x4df274,_0x413c22){_0x4df274=_0x4df274-0x0;var _0x41d37b=_0xcd32[_0x4df274];return _0x41d37b;};'use strict';var _=require(_0x2cd3('0x0'));var util=require(_0x2cd3('0x1'));var logger=require('../../config/logger')(_0x2cd3('0x2'));var moment=require(_0x2cd3('0x3'));var BPromise=require(_0x2cd3('0x4'));var rp=require(_0x2cd3('0x5'));var fs=require('fs');var path=require(_0x2cd3('0x6'));var rimraf=require(_0x2cd3('0x7'));var config=require('../../config/environment');var attributes=require(_0x2cd3('0x8'));module[_0x2cd3('0x9')]=function(_0x27a260,_0x36945d){return _0x27a260[_0x2cd3('0xa')](_0x2cd3('0xb'),attributes,{'tableName':'analytics_extracted_reports','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x1188=['AnalyticExtractedReport','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./analyticExtractedReport.attributes','exports','define'];(function(_0x2be2c7,_0x32900e){var _0x4cc9a7=function(_0x2a3c37){while(--_0x2a3c37){_0x2be2c7['push'](_0x2be2c7['shift']());}};_0x4cc9a7(++_0x32900e);}(_0x1188,0x69));var _0x8118=function(_0x1920a3,_0x22bf25){_0x1920a3=_0x1920a3-0x0;var _0x482fc9=_0x1188[_0x1920a3];return _0x482fc9;};'use strict';var _=require(_0x8118('0x0'));var util=require(_0x8118('0x1'));var logger=require(_0x8118('0x2'))(_0x8118('0x3'));var moment=require('moment');var BPromise=require(_0x8118('0x4'));var rp=require(_0x8118('0x5'));var fs=require('fs');var path=require(_0x8118('0x6'));var rimraf=require(_0x8118('0x7'));var config=require(_0x8118('0x8'));var attributes=require(_0x8118('0x9'));module[_0x8118('0xa')]=function(_0x4e0d25,_0x2f47f3){return _0x4e0d25[_0x8118('0xb')](_0x8118('0xc'),attributes,{'tableName':'analytics_extracted_reports','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js b/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js
index 7ec316c..61c611b 100644
--- a/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js
+++ b/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0dd9=['AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','stringify','error','message','info','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','then','AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x20efe6,_0x2d6285){var _0x2680c2=function(_0x1c969b){while(--_0x1c969b){_0x20efe6['push'](_0x20efe6['shift']());}};_0x2680c2(++_0x2d6285);}(_0x0dd9,0x84));var _0x90dd=function(_0x2e1d31,_0x4b580f){_0x2e1d31=_0x2e1d31-0x0;var _0x106d77=_0x0dd9[_0x2e1d31];return _0x106d77;};'use strict';var _=require(_0x90dd('0x0'));var util=require(_0x90dd('0x1'));var moment=require('moment');var BPromise=require(_0x90dd('0x2'));var rs=require(_0x90dd('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x90dd('0x4'))['db'];var utils=require(_0x90dd('0x5'));var logger=require('../../config/logger')(_0x90dd('0x6'));var config=require(_0x90dd('0x7'));var jayson=require(_0x90dd('0x8'));var client=jayson[_0x90dd('0x9')][_0x90dd('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x28bc25,_0x3be145,_0x4d1d61){return new BPromise(function(_0x3b4a60,_0x34f138){return client['request'](_0x28bc25,_0x4d1d61)[_0x90dd('0xb')](function(_0x414127){logger['info'](_0x90dd('0xc'),_0x3be145,_0x90dd('0xd'));logger[_0x90dd('0xe')](_0x90dd('0xf'),_0x3be145,_0x90dd('0xd'),JSON[_0x90dd('0x10')](_0x414127));if(_0x414127[_0x90dd('0x11')]){if(_0x414127['error']['code']===0x1f4){logger[_0x90dd('0x11')](_0x90dd('0xc'),_0x3be145,_0x414127[_0x90dd('0x11')][_0x90dd('0x12')]);return _0x34f138(_0x414127[_0x90dd('0x11')][_0x90dd('0x12')]);}logger[_0x90dd('0x11')](_0x90dd('0xc'),_0x3be145,_0x414127[_0x90dd('0x11')][_0x90dd('0x12')]);return _0x3b4a60(_0x414127[_0x90dd('0x11')][_0x90dd('0x12')]);}else{logger[_0x90dd('0x13')](_0x90dd('0xc'),_0x3be145,_0x90dd('0xd'));_0x3b4a60(_0x414127['result'][_0x90dd('0x12')]);}})[_0x90dd('0x14')](function(_0x1fdadf){logger[_0x90dd('0x11')](_0x90dd('0xc'),_0x3be145,_0x1fdadf);_0x34f138(_0x1fdadf);});});}
\ No newline at end of file
+var _0xcc55=['../../config/environment','jayson/promise','client','http','request','AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','error','code','message','info','result','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc'];(function(_0x51df70,_0xe0b02b){var _0x252bad=function(_0x1de606){while(--_0x1de606){_0x51df70['push'](_0x51df70['shift']());}};_0x252bad(++_0xe0b02b);}(_0xcc55,0x173));var _0x5cc5=function(_0x3be353,_0x491043){_0x3be353=_0x3be353-0x0;var _0x53b513=_0xcc55[_0x3be353];return _0x53b513;};'use strict';var _=require('lodash');var util=require(_0x5cc5('0x0'));var moment=require(_0x5cc5('0x1'));var BPromise=require(_0x5cc5('0x2'));var rs=require(_0x5cc5('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5cc5('0x4'))['db'];var utils=require(_0x5cc5('0x5'));var logger=require('../../config/logger')(_0x5cc5('0x6'));var config=require(_0x5cc5('0x7'));var jayson=require(_0x5cc5('0x8'));var client=jayson[_0x5cc5('0x9')][_0x5cc5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1ab107,_0x4003b9,_0x43f936){return new BPromise(function(_0x4ce93a,_0x162b80){return client[_0x5cc5('0xb')](_0x1ab107,_0x43f936)['then'](function(_0x336e26){logger['info'](_0x5cc5('0xc'),_0x4003b9,_0x5cc5('0xd'));logger[_0x5cc5('0xe')](_0x5cc5('0xf'),_0x4003b9,_0x5cc5('0xd'),JSON['stringify'](_0x336e26));if(_0x336e26[_0x5cc5('0x10')]){if(_0x336e26[_0x5cc5('0x10')][_0x5cc5('0x11')]===0x1f4){logger[_0x5cc5('0x10')](_0x5cc5('0xc'),_0x4003b9,_0x336e26[_0x5cc5('0x10')][_0x5cc5('0x12')]);return _0x162b80(_0x336e26[_0x5cc5('0x10')][_0x5cc5('0x12')]);}logger[_0x5cc5('0x10')](_0x5cc5('0xc'),_0x4003b9,_0x336e26[_0x5cc5('0x10')][_0x5cc5('0x12')]);return _0x4ce93a(_0x336e26[_0x5cc5('0x10')][_0x5cc5('0x12')]);}else{logger[_0x5cc5('0x13')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x4003b9,_0x5cc5('0xd'));_0x4ce93a(_0x336e26[_0x5cc5('0x14')][_0x5cc5('0x12')]);}})['catch'](function(_0x26cd2d){logger[_0x5cc5('0x10')](_0x5cc5('0xc'),_0x4003b9,_0x26cd2d);_0x162b80(_0x26cd2d);});});}
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/index.js b/server/api/analyticExtractedReport/index.js
index 7835d99..2001d67 100644
--- a/server/api/analyticExtractedReport/index.js
+++ b/server/api/analyticExtractedReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0427=['isAuthenticated','index','show','/:id/download','post','put','/:id','update','delete','destroy','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','./analyticExtractedReport.controller','get'];(function(_0x18d058,_0x5850ef){var _0x1c5870=function(_0x2faedc){while(--_0x2faedc){_0x18d058['push'](_0x18d058['shift']());}};_0x1c5870(++_0x5850ef);}(_0x0427,0x199));var _0x7042=function(_0x57fa70,_0x2f1ba0){_0x57fa70=_0x57fa70-0x0;var _0x2b9671=_0x0427[_0x57fa70];return _0x2b9671;};'use strict';var multer=require('multer');var util=require(_0x7042('0x0'));var path=require(_0x7042('0x1'));var timeout=require(_0x7042('0x2'));var express=require(_0x7042('0x3'));var router=express['Router']();var fs_extra=require(_0x7042('0x4'));var auth=require(_0x7042('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x7042('0x6'));var controller=require(_0x7042('0x7'));router[_0x7042('0x8')]('/',auth[_0x7042('0x9')](),controller[_0x7042('0xa')]);router[_0x7042('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x7042('0xb')]);router['get'](_0x7042('0xc'),auth[_0x7042('0x9')](),controller['download']);router[_0x7042('0xd')]('/',auth[_0x7042('0x9')](),controller['create']);router[_0x7042('0xe')](_0x7042('0xf'),auth[_0x7042('0x9')](),controller[_0x7042('0x10')]);router[_0x7042('0x11')](_0x7042('0xf'),auth[_0x7042('0x9')](),controller[_0x7042('0x12')]);module['exports']=router;
\ No newline at end of file
+var _0x119f=['create','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../config/environment','./analyticExtractedReport.controller','get','isAuthenticated','index','/:id','download','post'];(function(_0x2a009e,_0x19d263){var _0x261192=function(_0x8ca28d){while(--_0x8ca28d){_0x2a009e['push'](_0x2a009e['shift']());}};_0x261192(++_0x19d263);}(_0x119f,0x8a));var _0xf119=function(_0x193a5d,_0x161cad){_0x193a5d=_0x193a5d-0x0;var _0x3b2626=_0x119f[_0x193a5d];return _0x3b2626;};'use strict';var multer=require(_0xf119('0x0'));var util=require(_0xf119('0x1'));var path=require(_0xf119('0x2'));var timeout=require(_0xf119('0x3'));var express=require('express');var router=express[_0xf119('0x4')]();var fs_extra=require(_0xf119('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xf119('0x6'));var controller=require(_0xf119('0x7'));router[_0xf119('0x8')]('/',auth[_0xf119('0x9')](),controller[_0xf119('0xa')]);router['get'](_0xf119('0xb'),auth[_0xf119('0x9')](),controller['show']);router[_0xf119('0x8')]('/:id/download',auth[_0xf119('0x9')](),controller[_0xf119('0xc')]);router[_0xf119('0xd')]('/',auth[_0xf119('0x9')](),controller[_0xf119('0xe')]);router['put']('/:id',auth[_0xf119('0x9')](),controller[_0xf119('0xf')]);router[_0xf119('0x10')](_0xf119('0xb'),auth[_0xf119('0x9')](),controller[_0xf119('0x11')]);module[_0xf119('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.attributes.js b/server/api/analyticFieldReport/analyticFieldReport.attributes.js
index 5d98c2c..7a4202f 100644
--- a/server/api/analyticFieldReport/analyticFieldReport.attributes.js
+++ b/server/api/analyticFieldReport/analyticFieldReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7008=['TEXT','STRING','BOOLEAN','sequelize','exports'];(function(_0x17e751,_0x59eb9b){var _0x3c8367=function(_0x21b2dd){while(--_0x21b2dd){_0x17e751['push'](_0x17e751['shift']());}};_0x3c8367(++_0x59eb9b);}(_0x7008,0x1ac));var _0x8700=function(_0x89ca46,_0x4b0536){_0x89ca46=_0x89ca46-0x0;var _0x519ea8=_0x7008[_0x89ca46];return _0x519ea8;};'use strict';var Sequelize=require(_0x8700('0x0'));module[_0x8700('0x1')]={'field':{'type':Sequelize[_0x8700('0x2')]},'alias':{'type':Sequelize[_0x8700('0x3')]},'function':{'type':Sequelize[_0x8700('0x3')]},'format':{'type':Sequelize['STRING']},'groupBy':{'type':Sequelize[_0x8700('0x4')],'defaultValue':![]},'orderBy':{'type':Sequelize['STRING']},'custom':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}};
\ No newline at end of file
+var _0x94cb=['BOOLEAN','sequelize','exports','TEXT','STRING'];(function(_0x51fb0c,_0x937d84){var _0x6b1d12=function(_0xb70b58){while(--_0xb70b58){_0x51fb0c['push'](_0x51fb0c['shift']());}};_0x6b1d12(++_0x937d84);}(_0x94cb,0x137));var _0xb94c=function(_0x2cb08e,_0x48f58a){_0x2cb08e=_0x2cb08e-0x0;var _0x3b5f48=_0x94cb[_0x2cb08e];return _0x3b5f48;};'use strict';var Sequelize=require(_0xb94c('0x0'));module[_0xb94c('0x1')]={'field':{'type':Sequelize[_0xb94c('0x2')]},'alias':{'type':Sequelize[_0xb94c('0x3')]},'function':{'type':Sequelize['STRING']},'format':{'type':Sequelize[_0xb94c('0x3')]},'groupBy':{'type':Sequelize[_0xb94c('0x4')],'defaultValue':![]},'orderBy':{'type':Sequelize[_0xb94c('0x3')]},'custom':{'type':Sequelize[_0xb94c('0x4')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.controller.js b/server/api/analyticFieldReport/analyticFieldReport.controller.js
index 367dfae..6ee95a0 100644
--- a/server/api/analyticFieldReport/analyticFieldReport.controller.js
+++ b/server/api/analyticFieldReport/analyticFieldReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x923c=['util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','status','undefined','count','offset','limit','set','json','apply','reject','update','then','destroy','error','stack','name','send','index','map','AnalyticFieldReport','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','where','VIRTUAL','filter','merge','options','includeAll','include','findAll','catch','params','rawAttributes','find','create','bulkCreate','body','ids','addFields','AnalyticCustomReport','findOne','sequelize','transaction','CustomReportId','zip-dir','moment','mustache'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x923c,0xa1));var _0xc923=function(_0x5bebee,_0x330ddf){_0x5bebee=_0x5bebee-0x0;var _0xcd8a8e=_0x923c[_0x5bebee];return _0xcd8a8e;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xc923('0x0'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xc923('0x1'));var BPromise=require('bluebird');var Mustache=require(_0xc923('0x2'));var util=require(_0xc923('0x3'));var path=require(_0xc923('0x4'));var sox=require(_0xc923('0x5'));var csv=require('to-csv');var ejs=require(_0xc923('0x6'));var fs=require('fs');var fs_extra=require(_0xc923('0x7'));var _=require(_0xc923('0x8'));var squel=require(_0xc923('0x9'));var crypto=require(_0xc923('0xa'));var jsforce=require(_0xc923('0xb'));var deskjs=require(_0xc923('0xc'));var toCsv=require(_0xc923('0xd'));var querystring=require('querystring');var Papa=require(_0xc923('0xe'));var Redis=require(_0xc923('0xf'));var authService=require(_0xc923('0x10'));var qs=require(_0xc923('0x11'));var as=require(_0xc923('0x12'));var hardwareService=require(_0xc923('0x13'));var logger=require(_0xc923('0x14'))(_0xc923('0x15'));var utils=require('../../config/utils');var config=require(_0xc923('0x16'));var licenseUtil=require(_0xc923('0x17'));var db=require(_0xc923('0x18'))['db'];function respondWithStatusCode(_0x483877,_0x473e1e){_0x473e1e=_0x473e1e||0xcc;return function(_0x46a886){if(_0x46a886){return _0x483877['sendStatus'](_0x473e1e);}return _0x483877[_0xc923('0x19')](_0x473e1e)['end']();};}function respondWithResult(_0x48613e,_0x3a8dca){_0x3a8dca=_0x3a8dca||0xc8;return function(_0x1678bd){if(_0x1678bd){return _0x48613e[_0xc923('0x19')](_0x3a8dca)['json'](_0x1678bd);}};}function respondWithFilteredResult(_0x17dfa9,_0x9491a4){return function(_0x43e21d){if(_0x43e21d){var _0x477f6d=typeof _0x9491a4['offset']==='undefined'&&typeof _0x9491a4['limit']===_0xc923('0x1a');var _0x351ad2=_0x43e21d[_0xc923('0x1b')];var _0x587ca3=_0x477f6d?0x0:_0x9491a4[_0xc923('0x1c')];var _0x2a5402=_0x477f6d?_0x43e21d[_0xc923('0x1b')]:_0x9491a4[_0xc923('0x1c')]+_0x9491a4[_0xc923('0x1d')];var _0x1c4165;if(_0x2a5402>=_0x351ad2){_0x2a5402=_0x351ad2;_0x1c4165=0xc8;}else{_0x1c4165=0xce;}_0x17dfa9[_0xc923('0x19')](_0x1c4165);return _0x17dfa9[_0xc923('0x1e')]('Content-Range',_0x587ca3+'-'+_0x2a5402+'/'+_0x351ad2)[_0xc923('0x1f')](_0x43e21d);}return null;};}function patchUpdates(_0x4fd8e1){return function(_0x24a719){try{jsonpatch[_0xc923('0x20')](_0x24a719,_0x4fd8e1,!![]);}catch(_0x4f1ff3){return BPromise[_0xc923('0x21')](_0x4f1ff3);}return _0x24a719['save']();};}function saveUpdates(_0x5bb872,_0xe3d1ac){return function(_0x358051){if(_0x358051){return _0x358051[_0xc923('0x22')](_0x5bb872)[_0xc923('0x23')](function(_0x6a931b){return _0x6a931b;});}return null;};}function removeEntity(_0x140c81,_0x118dee){return function(_0x2507a0){if(_0x2507a0){return _0x2507a0[_0xc923('0x24')]()[_0xc923('0x23')](function(){_0x140c81[_0xc923('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5af964,_0x3c3588){return function(_0x57df17){if(!_0x57df17){_0x5af964['sendStatus'](0x194);}return _0x57df17;};}function handleError(_0x52bffe,_0x4c4592){_0x4c4592=_0x4c4592||0x1f4;return function(_0x52b296){logger[_0xc923('0x25')](_0x52b296[_0xc923('0x26')]);if(_0x52b296[_0xc923('0x27')]){delete _0x52b296['name'];}_0x52bffe[_0xc923('0x19')](_0x4c4592)[_0xc923('0x28')](_0x52b296);};}exports[_0xc923('0x29')]=function(_0x158e7e,_0x5c29b4){var _0x300477={},_0x399d9a={},_0x48fd02={'count':0x0,'rows':[]};var _0x24cb58=_[_0xc923('0x2a')](db[_0xc923('0x2b')]['rawAttributes'],function(_0x2e4ef9){return{'name':_0x2e4ef9[_0xc923('0x2c')],'type':_0x2e4ef9[_0xc923('0x2d')][_0xc923('0x2e')]};});_0x399d9a[_0xc923('0x2f')]=_[_0xc923('0x2a')](_0x24cb58,'name');_0x399d9a[_0xc923('0x30')]=_[_0xc923('0x31')](_0x158e7e[_0xc923('0x30')]);_0x399d9a[_0xc923('0x32')]=_[_0xc923('0x33')](_0x399d9a[_0xc923('0x2f')],_0x399d9a[_0xc923('0x30')]);_0x300477[_0xc923('0x34')]=_[_0xc923('0x33')](_0x399d9a[_0xc923('0x2f')],qs[_0xc923('0x35')](_0x158e7e[_0xc923('0x30')][_0xc923('0x35')]));_0x300477[_0xc923('0x34')]=_0x300477['attributes'][_0xc923('0x36')]?_0x300477[_0xc923('0x34')]:_0x399d9a[_0xc923('0x2f')];if(!_0x158e7e[_0xc923('0x30')][_0xc923('0x37')](_0xc923('0x38'))){_0x300477[_0xc923('0x1d')]=qs['limit'](_0x158e7e[_0xc923('0x30')][_0xc923('0x1d')]);_0x300477[_0xc923('0x1c')]=qs['offset'](_0x158e7e['query'][_0xc923('0x1c')]);}_0x300477[_0xc923('0x39')]=qs['sort'](_0x158e7e['query'][_0xc923('0x3a')]);_0x300477['where']=qs[_0xc923('0x32')](_[_0xc923('0x3b')](_0x158e7e['query'],_0x399d9a[_0xc923('0x32')]),_0x24cb58);if(_0x158e7e[_0xc923('0x30')]['filter']){_0x300477['where']=_['merge'](_0x300477[_0xc923('0x3c')],{'$or':_[_0xc923('0x2a')](_0x24cb58,function(_0x53946a){if(_0x53946a['type']!==_0xc923('0x3d')){var _0x332dd4={};_0x332dd4[_0x53946a[_0xc923('0x27')]]={'$like':'%'+_0x158e7e[_0xc923('0x30')][_0xc923('0x3e')]+'%'};return _0x332dd4;}})});}_0x300477=_[_0xc923('0x3f')]({},_0x300477,_0x158e7e[_0xc923('0x40')]);var _0x2001c5={'where':_0x300477[_0xc923('0x3c')]};return db['AnalyticFieldReport']['count'](_0x2001c5)[_0xc923('0x23')](function(_0x385da4){_0x48fd02[_0xc923('0x1b')]=_0x385da4;if(_0x158e7e[_0xc923('0x30')][_0xc923('0x41')]){_0x300477[_0xc923('0x42')]=[{'all':!![]}];}return db[_0xc923('0x2b')][_0xc923('0x43')](_0x300477);})[_0xc923('0x23')](function(_0x36cc2a){_0x48fd02['rows']=_0x36cc2a;return _0x48fd02;})[_0xc923('0x23')](respondWithFilteredResult(_0x5c29b4,_0x300477))[_0xc923('0x44')](handleError(_0x5c29b4,null));};exports['show']=function(_0x179d8e,_0x44ffb0){var _0x23891a={'raw':![],'where':{'id':_0x179d8e[_0xc923('0x45')]['id']}},_0x4a69f3={};_0x4a69f3[_0xc923('0x2f')]=_[_0xc923('0x31')](db[_0xc923('0x2b')][_0xc923('0x46')]);_0x4a69f3[_0xc923('0x30')]=_[_0xc923('0x31')](_0x179d8e[_0xc923('0x30')]);_0x4a69f3[_0xc923('0x32')]=_[_0xc923('0x33')](_0x4a69f3['model'],_0x4a69f3[_0xc923('0x30')]);_0x23891a['attributes']=_[_0xc923('0x33')](_0x4a69f3[_0xc923('0x2f')],qs[_0xc923('0x35')](_0x179d8e[_0xc923('0x30')]['fields']));_0x23891a[_0xc923('0x34')]=_0x23891a[_0xc923('0x34')]['length']?_0x23891a['attributes']:_0x4a69f3['model'];if(_0x179d8e['query'][_0xc923('0x41')]){_0x23891a[_0xc923('0x42')]=[{'all':!![]}];}_0x23891a=_['merge']({},_0x23891a,_0x179d8e['options']);return db[_0xc923('0x2b')][_0xc923('0x47')](_0x23891a)[_0xc923('0x23')](handleEntityNotFound(_0x44ffb0,null))['then'](respondWithResult(_0x44ffb0,null))[_0xc923('0x44')](handleError(_0x44ffb0,null));};exports[_0xc923('0x48')]=function(_0x5137c5,_0x4fc951){return db[_0xc923('0x2b')][_0xc923('0x48')](_0x5137c5['body'],{})[_0xc923('0x23')](respondWithResult(_0x4fc951,0xc9))['catch'](handleError(_0x4fc951,null));};exports[_0xc923('0x49')]=function(_0x5c5710,_0x1d234a){return db['AnalyticFieldReport'][_0xc923('0x49')](_0x5c5710['body'],{'raw':![],'individualHooks':!![]})[_0xc923('0x23')](respondWithResult(_0x1d234a,0xc9))['catch'](handleError(_0x1d234a,null));};exports[_0xc923('0x22')]=function(_0x25d5b0,_0x49cada){if(_0x25d5b0[_0xc923('0x4a')]['id']){delete _0x25d5b0[_0xc923('0x4a')]['id'];}return db['AnalyticFieldReport'][_0xc923('0x47')]({'where':{'id':_0x25d5b0[_0xc923('0x45')]['id']}})['then'](handleEntityNotFound(_0x49cada,null))['then'](saveUpdates(_0x25d5b0[_0xc923('0x4a')],null))[_0xc923('0x23')](respondWithResult(_0x49cada,null))['catch'](handleError(_0x49cada,null));};exports[_0xc923('0x24')]=function(_0xa41e5a,_0x1d6037){return db[_0xc923('0x2b')][_0xc923('0x47')]({'where':{'id':_0xa41e5a['params']['id']}})['then'](handleEntityNotFound(_0x1d6037,null))[_0xc923('0x23')](removeEntity(_0x1d6037,null))[_0xc923('0x44')](handleError(_0x1d6037,null));};exports['bulkDestroy']=function(_0x3d3adf,_0xc76c8c){return db['AnalyticFieldReport'][_0xc923('0x24')]({'where':{'id':_0x3d3adf[_0xc923('0x30')][_0xc923('0x4b')]||[]},'raw':![],'individualHooks':!![]})[_0xc923('0x23')](respondWithResult(_0xc76c8c,0xcc))[_0xc923('0x44')](handleError(_0xc76c8c,null));};exports[_0xc923('0x4c')]=function(_0xe9d8,_0x30ca05,_0x5da10f){return db[_0xc923('0x4d')][_0xc923('0x4e')]({'where':{'id':_0xe9d8[_0xc923('0x45')]['id']}})[_0xc923('0x23')](handleEntityNotFound(_0x30ca05,null))[_0xc923('0x23')](function(_0x3cf707){if(_0x3cf707){return db[_0xc923('0x4f')][_0xc923('0x50')](function(_0x5648c7){return db['AnalyticFieldReport']['destroy']({'where':{'CustomReportId':_0xe9d8[_0xc923('0x45')]['id']},'transaction':_0x5648c7})[_0xc923('0x23')](function(_0x351139){var _0x244c6e=_[_0xc923('0x2a')](_0xe9d8[_0xc923('0x4a')],function(_0x33fc96){delete _0x33fc96['id'];_0x33fc96[_0xc923('0x51')]=_0xe9d8[_0xc923('0x45')]['id'];return _0x33fc96;});return db[_0xc923('0x2b')][_0xc923('0x49')](_0x244c6e,{'transaction':_0x5648c7});});})[_0xc923('0x23')](function(){return db['AnalyticFieldReport'][_0xc923('0x43')]({'where':{'CustomReportId':_0xe9d8['params']['id']}});});}})[_0xc923('0x23')](respondWithResult(_0x30ca05,null))['catch'](handleError(_0x30ca05,null));};
\ No newline at end of file
+var _0xea51=['filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','where','VIRTUAL','filter','merge','options','includeAll','include','findAll','rows','params','AnalyticFieldReport','find','catch','create','body','bulkCreate','ids','addFields','AnalyticCustomReport','sequelize','transaction','CustomReportId','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','fs-extra','squel','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','status','json','limit','undefined','count','offset','apply','reject','save','update','then','destroy','stack','name','send','index','rawAttributes','fieldName','type','model','map','query','keys'];(function(_0x25d542,_0x462ad9){var _0x377a7e=function(_0x5bd8ee){while(--_0x5bd8ee){_0x25d542['push'](_0x25d542['shift']());}};_0x377a7e(++_0x462ad9);}(_0xea51,0x70));var _0x1ea5=function(_0x2e8adf,_0x246201){_0x2e8adf=_0x2e8adf-0x0;var _0x505ca3=_0xea51[_0x2e8adf];return _0x505ca3;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x1ea5('0x0'));var zipdir=require(_0x1ea5('0x1'));var jsonpatch=require(_0x1ea5('0x2'));var rp=require(_0x1ea5('0x3'));var moment=require(_0x1ea5('0x4'));var BPromise=require(_0x1ea5('0x5'));var Mustache=require(_0x1ea5('0x6'));var util=require(_0x1ea5('0x7'));var path=require(_0x1ea5('0x8'));var sox=require('sox');var csv=require(_0x1ea5('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x1ea5('0xa'));var _=require('lodash');var squel=require(_0x1ea5('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x1ea5('0xc'));var toCsv=require('to-csv');var querystring=require(_0x1ea5('0xd'));var Papa=require(_0x1ea5('0xe'));var Redis=require(_0x1ea5('0xf'));var authService=require(_0x1ea5('0x10'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x1ea5('0x11'));var logger=require(_0x1ea5('0x12'))(_0x1ea5('0x13'));var utils=require(_0x1ea5('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0x1ea5('0x15'));var db=require(_0x1ea5('0x16'))['db'];function respondWithStatusCode(_0x3e8fcd,_0x38fafd){_0x38fafd=_0x38fafd||0xcc;return function(_0x42359d){if(_0x42359d){return _0x3e8fcd[_0x1ea5('0x17')](_0x38fafd);}return _0x3e8fcd['status'](_0x38fafd)[_0x1ea5('0x18')]();};}function respondWithResult(_0xfdd9c2,_0xed00c5){_0xed00c5=_0xed00c5||0xc8;return function(_0x4ebd1c){if(_0x4ebd1c){return _0xfdd9c2[_0x1ea5('0x19')](_0xed00c5)[_0x1ea5('0x1a')](_0x4ebd1c);}};}function respondWithFilteredResult(_0x182a70,_0x51da19){return function(_0x25144c){if(_0x25144c){var _0x3a46e4=typeof _0x51da19['offset']==='undefined'&&typeof _0x51da19[_0x1ea5('0x1b')]===_0x1ea5('0x1c');var _0x3b5a4a=_0x25144c[_0x1ea5('0x1d')];var _0x3e8c8f=_0x3a46e4?0x0:_0x51da19[_0x1ea5('0x1e')];var _0x24e368=_0x3a46e4?_0x25144c[_0x1ea5('0x1d')]:_0x51da19['offset']+_0x51da19[_0x1ea5('0x1b')];var _0x455b5d;if(_0x24e368>=_0x3b5a4a){_0x24e368=_0x3b5a4a;_0x455b5d=0xc8;}else{_0x455b5d=0xce;}_0x182a70[_0x1ea5('0x19')](_0x455b5d);return _0x182a70['set']('Content-Range',_0x3e8c8f+'-'+_0x24e368+'/'+_0x3b5a4a)[_0x1ea5('0x1a')](_0x25144c);}return null;};}function patchUpdates(_0x4f6b8f){return function(_0x150130){try{jsonpatch[_0x1ea5('0x1f')](_0x150130,_0x4f6b8f,!![]);}catch(_0x131124){return BPromise[_0x1ea5('0x20')](_0x131124);}return _0x150130[_0x1ea5('0x21')]();};}function saveUpdates(_0x561b40,_0x3e95a8){return function(_0x234400){if(_0x234400){return _0x234400[_0x1ea5('0x22')](_0x561b40)[_0x1ea5('0x23')](function(_0x2c0821){return _0x2c0821;});}return null;};}function removeEntity(_0x576e9d,_0x1dbb79){return function(_0x57f434){if(_0x57f434){return _0x57f434[_0x1ea5('0x24')]()['then'](function(){_0x576e9d[_0x1ea5('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x6aab88,_0x5f34d5){return function(_0xf3290c){if(!_0xf3290c){_0x6aab88[_0x1ea5('0x17')](0x194);}return _0xf3290c;};}function handleError(_0x1343e9,_0x43fc05){_0x43fc05=_0x43fc05||0x1f4;return function(_0x282d8d){logger['error'](_0x282d8d[_0x1ea5('0x25')]);if(_0x282d8d[_0x1ea5('0x26')]){delete _0x282d8d[_0x1ea5('0x26')];}_0x1343e9[_0x1ea5('0x19')](_0x43fc05)[_0x1ea5('0x27')](_0x282d8d);};}exports[_0x1ea5('0x28')]=function(_0x7cff4b,_0x3a7290){var _0x456250={},_0x4f6556={},_0x527ecf={'count':0x0,'rows':[]};var _0x4979eb=_['map'](db['AnalyticFieldReport'][_0x1ea5('0x29')],function(_0xaeb697){return{'name':_0xaeb697[_0x1ea5('0x2a')],'type':_0xaeb697[_0x1ea5('0x2b')]['key']};});_0x4f6556[_0x1ea5('0x2c')]=_[_0x1ea5('0x2d')](_0x4979eb,_0x1ea5('0x26'));_0x4f6556[_0x1ea5('0x2e')]=_[_0x1ea5('0x2f')](_0x7cff4b[_0x1ea5('0x2e')]);_0x4f6556[_0x1ea5('0x30')]=_[_0x1ea5('0x31')](_0x4f6556[_0x1ea5('0x2c')],_0x4f6556[_0x1ea5('0x2e')]);_0x456250[_0x1ea5('0x32')]=_[_0x1ea5('0x31')](_0x4f6556['model'],qs['fields'](_0x7cff4b['query'][_0x1ea5('0x33')]));_0x456250[_0x1ea5('0x32')]=_0x456250['attributes'][_0x1ea5('0x34')]?_0x456250[_0x1ea5('0x32')]:_0x4f6556[_0x1ea5('0x2c')];if(!_0x7cff4b['query'][_0x1ea5('0x35')](_0x1ea5('0x36'))){_0x456250[_0x1ea5('0x1b')]=qs[_0x1ea5('0x1b')](_0x7cff4b[_0x1ea5('0x2e')][_0x1ea5('0x1b')]);_0x456250[_0x1ea5('0x1e')]=qs[_0x1ea5('0x1e')](_0x7cff4b[_0x1ea5('0x2e')]['offset']);}_0x456250[_0x1ea5('0x37')]=qs[_0x1ea5('0x38')](_0x7cff4b[_0x1ea5('0x2e')][_0x1ea5('0x38')]);_0x456250['where']=qs[_0x1ea5('0x30')](_[_0x1ea5('0x39')](_0x7cff4b[_0x1ea5('0x2e')],_0x4f6556[_0x1ea5('0x30')]),_0x4979eb);if(_0x7cff4b['query']['filter']){_0x456250[_0x1ea5('0x3a')]=_['merge'](_0x456250['where'],{'$or':_['map'](_0x4979eb,function(_0x2218c4){if(_0x2218c4[_0x1ea5('0x2b')]!==_0x1ea5('0x3b')){var _0x1de8d2={};_0x1de8d2[_0x2218c4[_0x1ea5('0x26')]]={'$like':'%'+_0x7cff4b[_0x1ea5('0x2e')][_0x1ea5('0x3c')]+'%'};return _0x1de8d2;}})});}_0x456250=_[_0x1ea5('0x3d')]({},_0x456250,_0x7cff4b[_0x1ea5('0x3e')]);var _0x2a0ced={'where':_0x456250[_0x1ea5('0x3a')]};return db['AnalyticFieldReport'][_0x1ea5('0x1d')](_0x2a0ced)['then'](function(_0x5736c3){_0x527ecf[_0x1ea5('0x1d')]=_0x5736c3;if(_0x7cff4b[_0x1ea5('0x2e')][_0x1ea5('0x3f')]){_0x456250[_0x1ea5('0x40')]=[{'all':!![]}];}return db['AnalyticFieldReport'][_0x1ea5('0x41')](_0x456250);})[_0x1ea5('0x23')](function(_0x29a215){_0x527ecf[_0x1ea5('0x42')]=_0x29a215;return _0x527ecf;})[_0x1ea5('0x23')](respondWithFilteredResult(_0x3a7290,_0x456250))['catch'](handleError(_0x3a7290,null));};exports['show']=function(_0x4e7d88,_0x163e0c){var _0x536910={'raw':![],'where':{'id':_0x4e7d88[_0x1ea5('0x43')]['id']}},_0x351785={};_0x351785['model']=_[_0x1ea5('0x2f')](db[_0x1ea5('0x44')]['rawAttributes']);_0x351785[_0x1ea5('0x2e')]=_[_0x1ea5('0x2f')](_0x4e7d88['query']);_0x351785['filters']=_[_0x1ea5('0x31')](_0x351785['model'],_0x351785[_0x1ea5('0x2e')]);_0x536910[_0x1ea5('0x32')]=_[_0x1ea5('0x31')](_0x351785['model'],qs['fields'](_0x4e7d88['query']['fields']));_0x536910['attributes']=_0x536910[_0x1ea5('0x32')][_0x1ea5('0x34')]?_0x536910[_0x1ea5('0x32')]:_0x351785[_0x1ea5('0x2c')];if(_0x4e7d88['query'][_0x1ea5('0x3f')]){_0x536910['include']=[{'all':!![]}];}_0x536910=_['merge']({},_0x536910,_0x4e7d88[_0x1ea5('0x3e')]);return db[_0x1ea5('0x44')][_0x1ea5('0x45')](_0x536910)[_0x1ea5('0x23')](handleEntityNotFound(_0x163e0c,null))['then'](respondWithResult(_0x163e0c,null))[_0x1ea5('0x46')](handleError(_0x163e0c,null));};exports['create']=function(_0x12d5f2,_0x4421ea){return db[_0x1ea5('0x44')][_0x1ea5('0x47')](_0x12d5f2[_0x1ea5('0x48')],{})['then'](respondWithResult(_0x4421ea,0xc9))[_0x1ea5('0x46')](handleError(_0x4421ea,null));};exports[_0x1ea5('0x49')]=function(_0x15c77f,_0x596fb1){return db[_0x1ea5('0x44')]['bulkCreate'](_0x15c77f[_0x1ea5('0x48')],{'raw':![],'individualHooks':!![]})[_0x1ea5('0x23')](respondWithResult(_0x596fb1,0xc9))[_0x1ea5('0x46')](handleError(_0x596fb1,null));};exports['update']=function(_0x5e423c,_0x39512d){if(_0x5e423c[_0x1ea5('0x48')]['id']){delete _0x5e423c[_0x1ea5('0x48')]['id'];}return db[_0x1ea5('0x44')][_0x1ea5('0x45')]({'where':{'id':_0x5e423c['params']['id']}})[_0x1ea5('0x23')](handleEntityNotFound(_0x39512d,null))['then'](saveUpdates(_0x5e423c[_0x1ea5('0x48')],null))['then'](respondWithResult(_0x39512d,null))[_0x1ea5('0x46')](handleError(_0x39512d,null));};exports[_0x1ea5('0x24')]=function(_0x439c56,_0x332381){return db[_0x1ea5('0x44')][_0x1ea5('0x45')]({'where':{'id':_0x439c56[_0x1ea5('0x43')]['id']}})['then'](handleEntityNotFound(_0x332381,null))['then'](removeEntity(_0x332381,null))[_0x1ea5('0x46')](handleError(_0x332381,null));};exports['bulkDestroy']=function(_0x311960,_0x524933){return db[_0x1ea5('0x44')][_0x1ea5('0x24')]({'where':{'id':_0x311960['query'][_0x1ea5('0x4a')]||[]},'raw':![],'individualHooks':!![]})[_0x1ea5('0x23')](respondWithResult(_0x524933,0xcc))[_0x1ea5('0x46')](handleError(_0x524933,null));};exports[_0x1ea5('0x4b')]=function(_0x52012a,_0xc50773,_0x4116e5){return db[_0x1ea5('0x4c')]['findOne']({'where':{'id':_0x52012a[_0x1ea5('0x43')]['id']}})[_0x1ea5('0x23')](handleEntityNotFound(_0xc50773,null))['then'](function(_0x589217){if(_0x589217){return db[_0x1ea5('0x4d')][_0x1ea5('0x4e')](function(_0x4af3df){return db['AnalyticFieldReport'][_0x1ea5('0x24')]({'where':{'CustomReportId':_0x52012a[_0x1ea5('0x43')]['id']},'transaction':_0x4af3df})[_0x1ea5('0x23')](function(_0x26e5e9){var _0x3c61ba=_['map'](_0x52012a[_0x1ea5('0x48')],function(_0x3460a8){delete _0x3460a8['id'];_0x3460a8[_0x1ea5('0x4f')]=_0x52012a[_0x1ea5('0x43')]['id'];return _0x3460a8;});return db['AnalyticFieldReport'][_0x1ea5('0x49')](_0x3c61ba,{'transaction':_0x4af3df});});})[_0x1ea5('0x23')](function(){return db[_0x1ea5('0x44')]['findAll']({'where':{'CustomReportId':_0x52012a[_0x1ea5('0x43')]['id']}});});}})['then'](respondWithResult(_0xc50773,null))[_0x1ea5('0x46')](handleError(_0xc50773,null));};
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.model.js b/server/api/analyticFieldReport/analyticFieldReport.model.js
index 38b882c..4f27fde 100644
--- a/server/api/analyticFieldReport/analyticFieldReport.model.js
+++ b/server/api/analyticFieldReport/analyticFieldReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x556e=['define','AnalyticFieldReport','analytics_report_fields','lodash','api','moment','request-promise','path','../../config/environment','./analyticFieldReport.attributes'];(function(_0x597e84,_0xfb6943){var _0x29ae7d=function(_0x4ddd07){while(--_0x4ddd07){_0x597e84['push'](_0x597e84['shift']());}};_0x29ae7d(++_0xfb6943);}(_0x556e,0x1cf));var _0xe556=function(_0x597106,_0x44de51){_0x597106=_0x597106-0x0;var _0x3ca6b5=_0x556e[_0x597106];return _0x3ca6b5;};'use strict';var _=require(_0xe556('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xe556('0x1'));var moment=require(_0xe556('0x2'));var BPromise=require('bluebird');var rp=require(_0xe556('0x3'));var fs=require('fs');var path=require(_0xe556('0x4'));var rimraf=require('rimraf');var config=require(_0xe556('0x5'));var attributes=require(_0xe556('0x6'));module['exports']=function(_0x2cafed,_0x64c1ce){return _0x2cafed[_0xe556('0x7')](_0xe556('0x8'),attributes,{'tableName':_0xe556('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xfcdf=['bluebird','path','rimraf','../../config/environment','./analyticFieldReport.attributes','exports','define','AnalyticFieldReport','lodash','util','../../config/logger','moment'];(function(_0x500206,_0x3e623b){var _0x4bcb84=function(_0x59fa82){while(--_0x59fa82){_0x500206['push'](_0x500206['shift']());}};_0x4bcb84(++_0x3e623b);}(_0xfcdf,0xbc));var _0xffcd=function(_0x522936,_0x323a9c){_0x522936=_0x522936-0x0;var _0x3a7b4c=_0xfcdf[_0x522936];return _0x3a7b4c;};'use strict';var _=require(_0xffcd('0x0'));var util=require(_0xffcd('0x1'));var logger=require(_0xffcd('0x2'))('api');var moment=require(_0xffcd('0x3'));var BPromise=require(_0xffcd('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xffcd('0x5'));var rimraf=require(_0xffcd('0x6'));var config=require(_0xffcd('0x7'));var attributes=require(_0xffcd('0x8'));module[_0xffcd('0x9')]=function(_0x148507,_0x317310){return _0x148507[_0xffcd('0xa')](_0xffcd('0xb'),attributes,{'tableName':'analytics_report_fields','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.rpc.js b/server/api/analyticFieldReport/analyticFieldReport.rpc.js
index fcfe25a..1746659 100644
--- a/server/api/analyticFieldReport/analyticFieldReport.rpc.js
+++ b/server/api/analyticFieldReport/analyticFieldReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5894=['client','http','request','then','info','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x3b2f12,_0x1e7128){var _0x36a818=function(_0x5cca31){while(--_0x5cca31){_0x3b2f12['push'](_0x3b2f12['shift']());}};_0x36a818(++_0x1e7128);}(_0x5894,0xff));var _0x4589=function(_0x175e22,_0x3d7be1){_0x175e22=_0x175e22-0x0;var _0x393b37=_0x5894[_0x175e22];return _0x393b37;};'use strict';var _=require('lodash');var util=require(_0x4589('0x0'));var moment=require(_0x4589('0x1'));var BPromise=require(_0x4589('0x2'));var rs=require(_0x4589('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x4589('0x4'));var logger=require(_0x4589('0x5'))(_0x4589('0x6'));var config=require(_0x4589('0x7'));var jayson=require(_0x4589('0x8'));var client=jayson[_0x4589('0x9')][_0x4589('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x46268c,_0x240238,_0x399e11){return new BPromise(function(_0x238d46,_0x50c75a){return client[_0x4589('0xb')](_0x46268c,_0x399e11)[_0x4589('0xc')](function(_0x5b35c7){logger[_0x4589('0xd')](_0x4589('0xe'),_0x240238,_0x4589('0xf'));logger[_0x4589('0x10')]('AnalyticFieldReport,\x20%s,\x20%s,\x20%s',_0x240238,_0x4589('0xf'),JSON[_0x4589('0x11')](_0x5b35c7));if(_0x5b35c7[_0x4589('0x12')]){if(_0x5b35c7[_0x4589('0x12')][_0x4589('0x13')]===0x1f4){logger[_0x4589('0x12')]('AnalyticFieldReport,\x20%s,\x20%s',_0x240238,_0x5b35c7[_0x4589('0x12')]['message']);return _0x50c75a(_0x5b35c7[_0x4589('0x12')][_0x4589('0x14')]);}logger[_0x4589('0x12')](_0x4589('0xe'),_0x240238,_0x5b35c7[_0x4589('0x12')]['message']);return _0x238d46(_0x5b35c7[_0x4589('0x12')][_0x4589('0x14')]);}else{logger[_0x4589('0xd')](_0x4589('0xe'),_0x240238,_0x4589('0xf'));_0x238d46(_0x5b35c7['result']['message']);}})[_0x4589('0x15')](function(_0x5c8471){logger[_0x4589('0x12')]('AnalyticFieldReport,\x20%s,\x20%s',_0x240238,_0x5c8471);_0x50c75a(_0x5c8471);});});}
\ No newline at end of file
+var _0xd94b=['util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash'];(function(_0x2f34cb,_0x4aebda){var _0x448f63=function(_0x2019f6){while(--_0x2019f6){_0x2f34cb['push'](_0x2f34cb['shift']());}};_0x448f63(++_0x4aebda);}(_0xd94b,0xbf));var _0xbd94=function(_0xfeb39,_0x1d20b7){_0xfeb39=_0xfeb39-0x0;var _0x167aa8=_0xd94b[_0xfeb39];return _0x167aa8;};'use strict';var _=require(_0xbd94('0x0'));var util=require(_0xbd94('0x1'));var moment=require(_0xbd94('0x2'));var BPromise=require(_0xbd94('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xbd94('0x4'));var db=require(_0xbd94('0x5'))['db'];var utils=require(_0xbd94('0x6'));var logger=require(_0xbd94('0x7'))('rpc');var config=require(_0xbd94('0x8'));var jayson=require(_0xbd94('0x9'));var client=jayson[_0xbd94('0xa')][_0xbd94('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x31a79c,_0x289cb4,_0x2ef2f2){return new BPromise(function(_0x20635d,_0x4aa203){return client[_0xbd94('0xc')](_0x31a79c,_0x2ef2f2)[_0xbd94('0xd')](function(_0x4a525e){logger[_0xbd94('0xe')](_0xbd94('0xf'),_0x289cb4,_0xbd94('0x10'));logger[_0xbd94('0x11')](_0xbd94('0x12'),_0x289cb4,'request\x20sent',JSON[_0xbd94('0x13')](_0x4a525e));if(_0x4a525e[_0xbd94('0x14')]){if(_0x4a525e['error'][_0xbd94('0x15')]===0x1f4){logger[_0xbd94('0x14')](_0xbd94('0xf'),_0x289cb4,_0x4a525e[_0xbd94('0x14')][_0xbd94('0x16')]);return _0x4aa203(_0x4a525e[_0xbd94('0x14')][_0xbd94('0x16')]);}logger[_0xbd94('0x14')](_0xbd94('0xf'),_0x289cb4,_0x4a525e[_0xbd94('0x14')][_0xbd94('0x16')]);return _0x20635d(_0x4a525e[_0xbd94('0x14')][_0xbd94('0x16')]);}else{logger['info'](_0xbd94('0xf'),_0x289cb4,_0xbd94('0x10'));_0x20635d(_0x4a525e[_0xbd94('0x17')][_0xbd94('0x16')]);}})['catch'](function(_0xdb778e){logger[_0xbd94('0x14')](_0xbd94('0xf'),_0x289cb4,_0xdb778e);_0x4aa203(_0xdb778e);});});}
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/index.js b/server/api/analyticFieldReport/index.js
index fb2299e..a13f2f5 100644
--- a/server/api/analyticFieldReport/index.js
+++ b/server/api/analyticFieldReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['delete','/destroy_many','bulkDestroy','destroy','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticFieldReport.controller','get','index','/:id','post','/create_many','isAuthenticated','bulkCreate','/:id/create_many','update'];(function(_0x3836cf,_0x479950){var _0x53e36b=function(_0x14f844){while(--_0x14f844){_0x3836cf['push'](_0x3836cf['shift']());}};_0x53e36b(++_0x479950);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2160a9,_0x3cbd9e){_0x2160a9=_0x2160a9-0x0;var _0xa88cf7=_0xa9e0[_0x2160a9];return _0xa88cf7;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x0a9e('0xb')]('/',auth['isAuthenticated'](),controller['create']);router[_0x0a9e('0xb')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xb')](_0x0a9e('0xf'),auth['isAuthenticated'](),controller['addFields']);router['put']('/:id',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x11')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router['delete'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x14')]);module[_0x0a9e('0x15')]=router;
\ No newline at end of file
+var _0xa9e0=['delete','/destroy_many','bulkDestroy','destroy','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticFieldReport.controller','get','index','/:id','post','/create_many','isAuthenticated','bulkCreate','/:id/create_many','update'];(function(_0x531bc7,_0x113e06){var _0x26547c=function(_0x1d8cfd){while(--_0x1d8cfd){_0x531bc7['push'](_0x531bc7['shift']());}};_0x26547c(++_0x113e06);}(_0xa9e0,0x123));var _0x0a9e=function(_0x92c450,_0x41f1e3){_0x92c450=_0x92c450-0x0;var _0x2a9599=_0xa9e0[_0x92c450];return _0x2a9599;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x0a9e('0xb')]('/',auth['isAuthenticated'](),controller['create']);router[_0x0a9e('0xb')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xb')](_0x0a9e('0xf'),auth['isAuthenticated'](),controller['addFields']);router['put']('/:id',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x11')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router['delete'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x14')]);module[_0x0a9e('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.attributes.js b/server/api/analyticMetric/analyticMetric.attributes.js
index 0245c3b..0306e7a 100644
--- a/server/api/analyticMetric/analyticMetric.attributes.js
+++ b/server/api/analyticMetric/analyticMetric.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfd6f=['name','sequelize','exports','STRING'];(function(_0x3e5458,_0x2eeddb){var _0x316ee5=function(_0x2424e7){while(--_0x2424e7){_0x3e5458['push'](_0x3e5458['shift']());}};_0x316ee5(++_0x2eeddb);}(_0xfd6f,0x19d));var _0xffd6=function(_0x302b51,_0x538aa0){_0x302b51=_0x302b51-0x0;var _0x4083f9=_0xfd6f[_0x302b51];return _0x4083f9;};'use strict';var Sequelize=require(_0xffd6('0x0'));module[_0xffd6('0x1')]={'name':{'type':Sequelize[_0xffd6('0x2')],'allowNull':![],'unique':_0xffd6('0x3')},'table':{'type':Sequelize[_0xffd6('0x2')]},'metric':{'type':Sequelize['TEXT']},'description':{'type':Sequelize[_0xffd6('0x2')]}};
\ No newline at end of file
+var _0x61a5=['name','TEXT','sequelize','STRING'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x61a5,0x19e));var _0x561a=function(_0x416cdc,_0x213b87){_0x416cdc=_0x416cdc-0x0;var _0x1931ce=_0x61a5[_0x416cdc];return _0x1931ce;};'use strict';var Sequelize=require(_0x561a('0x0'));module['exports']={'name':{'type':Sequelize[_0x561a('0x1')],'allowNull':![],'unique':_0x561a('0x2')},'table':{'type':Sequelize['STRING']},'metric':{'type':Sequelize[_0x561a('0x3')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.controller.js b/server/api/analyticMetric/analyticMetric.controller.js
index dcc3283..856dcdb 100644
--- a/server/api/analyticMetric/analyticMetric.controller.js
+++ b/server/api/analyticMetric/analyticMetric.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x84ab=['UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','path','sox','to-csv','squel','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','update','then','destroy','get','Metrics','UserProfileResource','error','stack','name','map','AnalyticMetric','rawAttributes','fieldName','key','query','filters','intersection','model','attributes','fields','length','nolimit','order','sort','where','filter','type','VIRTUAL','includeAll','include','catch','show','params','keys','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','user'];(function(_0x513aa5,_0x1fba79){var _0x1a1a7c=function(_0x240e3f){while(--_0x240e3f){_0x513aa5['push'](_0x513aa5['shift']());}};_0x1a1a7c(++_0x1fba79);}(_0x84ab,0x12f));var _0xb84a=function(_0x186376,_0x5d988a){_0x186376=_0x186376-0x0;var _0x2dbdd9=_0x84ab[_0x186376];return _0x2dbdd9;};'use strict';var emlformat=require(_0xb84a('0x0'));var rimraf=require(_0xb84a('0x1'));var zipdir=require(_0xb84a('0x2'));var jsonpatch=require(_0xb84a('0x3'));var rp=require(_0xb84a('0x4'));var moment=require('moment');var BPromise=require(_0xb84a('0x5'));var Mustache=require(_0xb84a('0x6'));var util=require('util');var path=require(_0xb84a('0x7'));var sox=require(_0xb84a('0x8'));var csv=require(_0xb84a('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xb84a('0xa'));var crypto=require('crypto');var jsforce=require(_0xb84a('0xb'));var deskjs=require(_0xb84a('0xc'));var toCsv=require('to-csv');var querystring=require(_0xb84a('0xd'));var Papa=require('papaparse');var Redis=require(_0xb84a('0xe'));var authService=require(_0xb84a('0xf'));var qs=require(_0xb84a('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xb84a('0x11'));var utils=require(_0xb84a('0x12'));var config=require(_0xb84a('0x13'));var licenseUtil=require(_0xb84a('0x14'));var db=require(_0xb84a('0x15'))['db'];function respondWithStatusCode(_0x4d3758,_0x83444e){_0x83444e=_0x83444e||0xcc;return function(_0x4777dc){if(_0x4777dc){return _0x4d3758[_0xb84a('0x16')](_0x83444e);}return _0x4d3758[_0xb84a('0x17')](_0x83444e)[_0xb84a('0x18')]();};}function respondWithResult(_0x11dfe9,_0x12ccab){_0x12ccab=_0x12ccab||0xc8;return function(_0x475b){if(_0x475b){return _0x11dfe9[_0xb84a('0x17')](_0x12ccab)[_0xb84a('0x19')](_0x475b);}};}function respondWithFilteredResult(_0xc0b2e0,_0x1251ec){return function(_0x5716bd){if(_0x5716bd){var _0x11dd4d=typeof _0x1251ec[_0xb84a('0x1a')]===_0xb84a('0x1b')&&typeof _0x1251ec[_0xb84a('0x1c')]===_0xb84a('0x1b');var _0x1be87a=_0x5716bd[_0xb84a('0x1d')];var _0x34d82f=_0x11dd4d?0x0:_0x1251ec[_0xb84a('0x1a')];var _0x3f7437=_0x11dd4d?_0x5716bd[_0xb84a('0x1d')]:_0x1251ec[_0xb84a('0x1a')]+_0x1251ec[_0xb84a('0x1c')];var _0x200289;if(_0x3f7437>=_0x1be87a){_0x3f7437=_0x1be87a;_0x200289=0xc8;}else{_0x200289=0xce;}_0xc0b2e0['status'](_0x200289);return _0xc0b2e0[_0xb84a('0x1e')](_0xb84a('0x1f'),_0x34d82f+'-'+_0x3f7437+'/'+_0x1be87a)['json'](_0x5716bd);}return null;};}function patchUpdates(_0xac76d3){return function(_0x61ef03){try{jsonpatch[_0xb84a('0x20')](_0x61ef03,_0xac76d3,!![]);}catch(_0x19f637){return BPromise['reject'](_0x19f637);}return _0x61ef03['save']();};}function saveUpdates(_0x1466ae,_0x19097d){return function(_0x2d70fd){if(_0x2d70fd){return _0x2d70fd[_0xb84a('0x21')](_0x1466ae)[_0xb84a('0x22')](function(_0x3b8fb2){return _0x3b8fb2;});}return null;};}function removeEntity(_0x8b28cd,_0x21d0d3){return function(_0x3aa06f){if(_0x3aa06f){return _0x3aa06f[_0xb84a('0x23')]()[_0xb84a('0x22')](function(){var _0x1aab7d=_0x3aa06f[_0xb84a('0x24')]({'plain':!![]});var _0x409df0=_0xb84a('0x25');return db[_0xb84a('0x26')][_0xb84a('0x23')]({'where':{'type':_0x409df0,'resourceId':_0x1aab7d['id']}})[_0xb84a('0x22')](function(){return _0x3aa06f;});})[_0xb84a('0x22')](function(){_0x8b28cd[_0xb84a('0x17')](0xcc)[_0xb84a('0x18')]();});}};}function handleEntityNotFound(_0x1db72c,_0x2fe40d){return function(_0x35d1f7){if(!_0x35d1f7){_0x1db72c[_0xb84a('0x16')](0x194);}return _0x35d1f7;};}function handleError(_0x97d71b,_0x5349ea){_0x5349ea=_0x5349ea||0x1f4;return function(_0x582954){logger[_0xb84a('0x27')](_0x582954[_0xb84a('0x28')]);if(_0x582954['name']){delete _0x582954[_0xb84a('0x29')];}_0x97d71b[_0xb84a('0x17')](_0x5349ea)['send'](_0x582954);};}exports['index']=function(_0x28f2e7,_0x8e9319){var _0x49ba3d={},_0x251778={},_0xba1147={'count':0x0,'rows':[]};var _0x3abc22=_[_0xb84a('0x2a')](db[_0xb84a('0x2b')][_0xb84a('0x2c')],function(_0x34b212){return{'name':_0x34b212[_0xb84a('0x2d')],'type':_0x34b212['type'][_0xb84a('0x2e')]};});_0x251778['model']=_['map'](_0x3abc22,_0xb84a('0x29'));_0x251778[_0xb84a('0x2f')]=_['keys'](_0x28f2e7['query']);_0x251778[_0xb84a('0x30')]=_[_0xb84a('0x31')](_0x251778[_0xb84a('0x32')],_0x251778[_0xb84a('0x2f')]);_0x49ba3d[_0xb84a('0x33')]=_[_0xb84a('0x31')](_0x251778[_0xb84a('0x32')],qs[_0xb84a('0x34')](_0x28f2e7['query'][_0xb84a('0x34')]));_0x49ba3d[_0xb84a('0x33')]=_0x49ba3d[_0xb84a('0x33')][_0xb84a('0x35')]?_0x49ba3d[_0xb84a('0x33')]:_0x251778[_0xb84a('0x32')];if(!_0x28f2e7[_0xb84a('0x2f')]['hasOwnProperty'](_0xb84a('0x36'))){_0x49ba3d['limit']=qs[_0xb84a('0x1c')](_0x28f2e7[_0xb84a('0x2f')][_0xb84a('0x1c')]);_0x49ba3d['offset']=qs['offset'](_0x28f2e7[_0xb84a('0x2f')][_0xb84a('0x1a')]);}_0x49ba3d[_0xb84a('0x37')]=qs[_0xb84a('0x38')](_0x28f2e7[_0xb84a('0x2f')]['sort']);_0x49ba3d[_0xb84a('0x39')]=qs[_0xb84a('0x30')](_['pick'](_0x28f2e7[_0xb84a('0x2f')],_0x251778[_0xb84a('0x30')]),_0x3abc22);if(_0x28f2e7[_0xb84a('0x2f')][_0xb84a('0x3a')]){_0x49ba3d['where']=_['merge'](_0x49ba3d['where'],{'$or':_[_0xb84a('0x2a')](_0x3abc22,function(_0x11e1ac){if(_0x11e1ac[_0xb84a('0x3b')]!==_0xb84a('0x3c')){var _0x55b0b8={};_0x55b0b8[_0x11e1ac[_0xb84a('0x29')]]={'$like':'%'+_0x28f2e7['query'][_0xb84a('0x3a')]+'%'};return _0x55b0b8;}})});}_0x49ba3d=_['merge']({},_0x49ba3d,_0x28f2e7['options']);var _0x59d7a1={'where':_0x49ba3d[_0xb84a('0x39')]};return db[_0xb84a('0x2b')][_0xb84a('0x1d')](_0x59d7a1)[_0xb84a('0x22')](function(_0x5e547e){_0xba1147[_0xb84a('0x1d')]=_0x5e547e;if(_0x28f2e7[_0xb84a('0x2f')][_0xb84a('0x3d')]){_0x49ba3d[_0xb84a('0x3e')]=[{'all':!![]}];}return db['AnalyticMetric']['findAll'](_0x49ba3d);})[_0xb84a('0x22')](function(_0x1f3e04){_0xba1147['rows']=_0x1f3e04;return _0xba1147;})[_0xb84a('0x22')](respondWithFilteredResult(_0x8e9319,_0x49ba3d))[_0xb84a('0x3f')](handleError(_0x8e9319,null));};exports[_0xb84a('0x40')]=function(_0x25280a,_0x3f005b){var _0x241536={'raw':!![],'where':{'id':_0x25280a[_0xb84a('0x41')]['id']}},_0x24d700={};_0x24d700[_0xb84a('0x32')]=_[_0xb84a('0x42')](db[_0xb84a('0x2b')][_0xb84a('0x2c')]);_0x24d700[_0xb84a('0x2f')]=_[_0xb84a('0x42')](_0x25280a[_0xb84a('0x2f')]);_0x24d700['filters']=_[_0xb84a('0x31')](_0x24d700[_0xb84a('0x32')],_0x24d700[_0xb84a('0x2f')]);_0x241536[_0xb84a('0x33')]=_[_0xb84a('0x31')](_0x24d700[_0xb84a('0x32')],qs['fields'](_0x25280a[_0xb84a('0x2f')]['fields']));_0x241536[_0xb84a('0x33')]=_0x241536[_0xb84a('0x33')][_0xb84a('0x35')]?_0x241536[_0xb84a('0x33')]:_0x24d700['model'];if(_0x25280a[_0xb84a('0x2f')][_0xb84a('0x3d')]){_0x241536[_0xb84a('0x3e')]=[{'all':!![]}];}_0x241536=_['merge']({},_0x241536,_0x25280a['options']);return db[_0xb84a('0x2b')][_0xb84a('0x43')](_0x241536)[_0xb84a('0x22')](handleEntityNotFound(_0x3f005b,null))['then'](respondWithResult(_0x3f005b,null))['catch'](handleError(_0x3f005b,null));};exports['create']=function(_0x45630d,_0x384a0d){return db[_0xb84a('0x2b')][_0xb84a('0x44')](_0x45630d[_0xb84a('0x45')],{})['then'](function(_0x4b40fe){var _0x5b853a=_0x45630d['user'][_0xb84a('0x24')]({'plain':!![]});if(!_0x5b853a)throw new Error(_0xb84a('0x46'));if(_0x5b853a['role']===_0xb84a('0x47')){var _0xc8bac2=_0x4b40fe[_0xb84a('0x24')]({'plain':!![]});var _0x2f70f0=_0xb84a('0x25');return db[_0xb84a('0x48')]['find']({'where':{'name':_0x2f70f0,'userProfileId':_0x5b853a['userProfileId']},'raw':!![]})[_0xb84a('0x22')](function(_0x50172a){if(_0x50172a&&_0x50172a[_0xb84a('0x49')]===0x0){return db['UserProfileResource']['create']({'name':_0xc8bac2['name'],'resourceId':_0xc8bac2['id'],'type':_0x50172a[_0xb84a('0x29')],'sectionId':_0x50172a['id']},{})[_0xb84a('0x22')](function(){return _0x4b40fe;});}else{return _0x4b40fe;}})[_0xb84a('0x3f')](function(_0x25b6a0){logger[_0xb84a('0x27')](_0xb84a('0x4a'),_0x25b6a0);throw _0x25b6a0;});}return _0x4b40fe;})[_0xb84a('0x22')](respondWithResult(_0x384a0d,0xc9))[_0xb84a('0x3f')](handleError(_0x384a0d,null));};exports['update']=function(_0x5afdd0,_0x4c5bdf){if(_0x5afdd0[_0xb84a('0x45')]['id']){delete _0x5afdd0[_0xb84a('0x45')]['id'];}return db['AnalyticMetric'][_0xb84a('0x43')]({'where':{'id':_0x5afdd0['params']['id']}})['then'](handleEntityNotFound(_0x4c5bdf,null))['then'](saveUpdates(_0x5afdd0[_0xb84a('0x45')],null))[_0xb84a('0x22')](respondWithResult(_0x4c5bdf,null))[_0xb84a('0x3f')](handleError(_0x4c5bdf,null));};exports['destroy']=function(_0x5f757e,_0x2e98bf){return db[_0xb84a('0x2b')]['find']({'where':{'id':_0x5f757e[_0xb84a('0x41')]['id']}})['then'](handleEntityNotFound(_0x2e98bf,null))['then'](removeEntity(_0x2e98bf,null))[_0xb84a('0x3f')](handleError(_0x2e98bf,null));};
\ No newline at end of file
+var _0x4b84=['status','end','json','limit','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','get','Metrics','UserProfileResource','sendStatus','stack','name','map','AnalyticMetric','rawAttributes','fieldName','type','key','query','keys','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','catch','show','params','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','request-promise','mustache','util','path','fs-extra','squel','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb'];(function(_0x1f8184,_0x59e343){var _0x3e19d8=function(_0x1a2a68){while(--_0x1a2a68){_0x1f8184['push'](_0x1f8184['shift']());}};_0x3e19d8(++_0x59e343);}(_0x4b84,0x1cc));var _0x44b8=function(_0x2a238a,_0x1d5054){_0x2a238a=_0x2a238a-0x0;var _0xeef802=_0x4b84[_0x2a238a];return _0xeef802;};'use strict';var emlformat=require(_0x44b8('0x0'));var rimraf=require(_0x44b8('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x44b8('0x2'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x44b8('0x3'));var util=require(_0x44b8('0x4'));var path=require(_0x44b8('0x5'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x44b8('0x6'));var _=require('lodash');var squel=require(_0x44b8('0x7'));var crypto=require('crypto');var jsforce=require(_0x44b8('0x8'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x44b8('0x9'));var Papa=require(_0x44b8('0xa'));var Redis=require(_0x44b8('0xb'));var authService=require('../../components/auth/service');var qs=require(_0x44b8('0xc'));var as=require(_0x44b8('0xd'));var hardwareService=require(_0x44b8('0xe'));var logger=require(_0x44b8('0xf'))(_0x44b8('0x10'));var utils=require(_0x44b8('0x11'));var config=require(_0x44b8('0x12'));var licenseUtil=require('../../config/license/util');var db=require(_0x44b8('0x13'))['db'];function respondWithStatusCode(_0x4301a6,_0x4bcc43){_0x4bcc43=_0x4bcc43||0xcc;return function(_0x194230){if(_0x194230){return _0x4301a6['sendStatus'](_0x4bcc43);}return _0x4301a6[_0x44b8('0x14')](_0x4bcc43)[_0x44b8('0x15')]();};}function respondWithResult(_0x4df670,_0x63e8f6){_0x63e8f6=_0x63e8f6||0xc8;return function(_0x4be54c){if(_0x4be54c){return _0x4df670['status'](_0x63e8f6)[_0x44b8('0x16')](_0x4be54c);}};}function respondWithFilteredResult(_0x2af0ad,_0x1722da){return function(_0x41ab46){if(_0x41ab46){var _0x5e52f2=typeof _0x1722da['offset']==='undefined'&&typeof _0x1722da[_0x44b8('0x17')]==='undefined';var _0x28ef36=_0x41ab46[_0x44b8('0x18')];var _0x55e258=_0x5e52f2?0x0:_0x1722da[_0x44b8('0x19')];var _0xe3de8f=_0x5e52f2?_0x41ab46['count']:_0x1722da[_0x44b8('0x19')]+_0x1722da[_0x44b8('0x17')];var _0x4b600f;if(_0xe3de8f>=_0x28ef36){_0xe3de8f=_0x28ef36;_0x4b600f=0xc8;}else{_0x4b600f=0xce;}_0x2af0ad[_0x44b8('0x14')](_0x4b600f);return _0x2af0ad[_0x44b8('0x1a')](_0x44b8('0x1b'),_0x55e258+'-'+_0xe3de8f+'/'+_0x28ef36)[_0x44b8('0x16')](_0x41ab46);}return null;};}function patchUpdates(_0x102ef9){return function(_0x369c09){try{jsonpatch[_0x44b8('0x1c')](_0x369c09,_0x102ef9,!![]);}catch(_0x9b0536){return BPromise[_0x44b8('0x1d')](_0x9b0536);}return _0x369c09[_0x44b8('0x1e')]();};}function saveUpdates(_0x1d642b,_0x14996c){return function(_0x48327e){if(_0x48327e){return _0x48327e[_0x44b8('0x1f')](_0x1d642b)[_0x44b8('0x20')](function(_0x416b34){return _0x416b34;});}return null;};}function removeEntity(_0x1418db,_0x305a5c){return function(_0x51a34a){if(_0x51a34a){return _0x51a34a[_0x44b8('0x21')]()['then'](function(){var _0x41a922=_0x51a34a[_0x44b8('0x22')]({'plain':!![]});var _0x25a0c1=_0x44b8('0x23');return db[_0x44b8('0x24')]['destroy']({'where':{'type':_0x25a0c1,'resourceId':_0x41a922['id']}})[_0x44b8('0x20')](function(){return _0x51a34a;});})['then'](function(){_0x1418db[_0x44b8('0x14')](0xcc)[_0x44b8('0x15')]();});}};}function handleEntityNotFound(_0x549a26,_0x17ac44){return function(_0x470f49){if(!_0x470f49){_0x549a26[_0x44b8('0x25')](0x194);}return _0x470f49;};}function handleError(_0x59c1bf,_0xb22107){_0xb22107=_0xb22107||0x1f4;return function(_0x242342){logger['error'](_0x242342[_0x44b8('0x26')]);if(_0x242342['name']){delete _0x242342[_0x44b8('0x27')];}_0x59c1bf['status'](_0xb22107)['send'](_0x242342);};}exports['index']=function(_0x387293,_0x29b18d){var _0x44ce5a={},_0x1bd1be={},_0x38cd17={'count':0x0,'rows':[]};var _0xc3f667=_[_0x44b8('0x28')](db[_0x44b8('0x29')][_0x44b8('0x2a')],function(_0x28f918){return{'name':_0x28f918[_0x44b8('0x2b')],'type':_0x28f918[_0x44b8('0x2c')][_0x44b8('0x2d')]};});_0x1bd1be['model']=_[_0x44b8('0x28')](_0xc3f667,'name');_0x1bd1be[_0x44b8('0x2e')]=_[_0x44b8('0x2f')](_0x387293[_0x44b8('0x2e')]);_0x1bd1be[_0x44b8('0x30')]=_[_0x44b8('0x31')](_0x1bd1be['model'],_0x1bd1be[_0x44b8('0x2e')]);_0x44ce5a[_0x44b8('0x32')]=_[_0x44b8('0x31')](_0x1bd1be[_0x44b8('0x33')],qs[_0x44b8('0x34')](_0x387293['query'][_0x44b8('0x34')]));_0x44ce5a[_0x44b8('0x32')]=_0x44ce5a[_0x44b8('0x32')][_0x44b8('0x35')]?_0x44ce5a[_0x44b8('0x32')]:_0x1bd1be[_0x44b8('0x33')];if(!_0x387293[_0x44b8('0x2e')][_0x44b8('0x36')](_0x44b8('0x37'))){_0x44ce5a[_0x44b8('0x17')]=qs[_0x44b8('0x17')](_0x387293[_0x44b8('0x2e')][_0x44b8('0x17')]);_0x44ce5a[_0x44b8('0x19')]=qs[_0x44b8('0x19')](_0x387293[_0x44b8('0x2e')][_0x44b8('0x19')]);}_0x44ce5a[_0x44b8('0x38')]=qs[_0x44b8('0x39')](_0x387293[_0x44b8('0x2e')][_0x44b8('0x39')]);_0x44ce5a[_0x44b8('0x3a')]=qs['filters'](_[_0x44b8('0x3b')](_0x387293[_0x44b8('0x2e')],_0x1bd1be['filters']),_0xc3f667);if(_0x387293[_0x44b8('0x2e')][_0x44b8('0x3c')]){_0x44ce5a[_0x44b8('0x3a')]=_[_0x44b8('0x3d')](_0x44ce5a['where'],{'$or':_[_0x44b8('0x28')](_0xc3f667,function(_0x11e4e3){if(_0x11e4e3[_0x44b8('0x2c')]!==_0x44b8('0x3e')){var _0x9cb2a={};_0x9cb2a[_0x11e4e3[_0x44b8('0x27')]]={'$like':'%'+_0x387293[_0x44b8('0x2e')][_0x44b8('0x3c')]+'%'};return _0x9cb2a;}})});}_0x44ce5a=_[_0x44b8('0x3d')]({},_0x44ce5a,_0x387293[_0x44b8('0x3f')]);var _0x1c9983={'where':_0x44ce5a[_0x44b8('0x3a')]};return db[_0x44b8('0x29')][_0x44b8('0x18')](_0x1c9983)[_0x44b8('0x20')](function(_0x29b43f){_0x38cd17['count']=_0x29b43f;if(_0x387293[_0x44b8('0x2e')][_0x44b8('0x40')]){_0x44ce5a[_0x44b8('0x41')]=[{'all':!![]}];}return db['AnalyticMetric'][_0x44b8('0x42')](_0x44ce5a);})[_0x44b8('0x20')](function(_0x229cc9){_0x38cd17['rows']=_0x229cc9;return _0x38cd17;})[_0x44b8('0x20')](respondWithFilteredResult(_0x29b18d,_0x44ce5a))[_0x44b8('0x43')](handleError(_0x29b18d,null));};exports[_0x44b8('0x44')]=function(_0x334f86,_0xfd590a){var _0x499a3e={'raw':!![],'where':{'id':_0x334f86[_0x44b8('0x45')]['id']}},_0x5ae5f9={};_0x5ae5f9[_0x44b8('0x33')]=_[_0x44b8('0x2f')](db[_0x44b8('0x29')][_0x44b8('0x2a')]);_0x5ae5f9[_0x44b8('0x2e')]=_[_0x44b8('0x2f')](_0x334f86[_0x44b8('0x2e')]);_0x5ae5f9[_0x44b8('0x30')]=_[_0x44b8('0x31')](_0x5ae5f9[_0x44b8('0x33')],_0x5ae5f9[_0x44b8('0x2e')]);_0x499a3e[_0x44b8('0x32')]=_[_0x44b8('0x31')](_0x5ae5f9[_0x44b8('0x33')],qs[_0x44b8('0x34')](_0x334f86[_0x44b8('0x2e')][_0x44b8('0x34')]));_0x499a3e[_0x44b8('0x32')]=_0x499a3e['attributes']['length']?_0x499a3e[_0x44b8('0x32')]:_0x5ae5f9[_0x44b8('0x33')];if(_0x334f86[_0x44b8('0x2e')][_0x44b8('0x40')]){_0x499a3e[_0x44b8('0x41')]=[{'all':!![]}];}_0x499a3e=_[_0x44b8('0x3d')]({},_0x499a3e,_0x334f86[_0x44b8('0x3f')]);return db['AnalyticMetric'][_0x44b8('0x46')](_0x499a3e)['then'](handleEntityNotFound(_0xfd590a,null))[_0x44b8('0x20')](respondWithResult(_0xfd590a,null))[_0x44b8('0x43')](handleError(_0xfd590a,null));};exports[_0x44b8('0x47')]=function(_0x9207bf,_0x103d57){return db[_0x44b8('0x29')]['create'](_0x9207bf[_0x44b8('0x48')],{})[_0x44b8('0x20')](function(_0x10602c){var _0x25d266=_0x9207bf['user'][_0x44b8('0x22')]({'plain':!![]});if(!_0x25d266)throw new Error(_0x44b8('0x49'));if(_0x25d266[_0x44b8('0x4a')]===_0x44b8('0x4b')){var _0x44ec23=_0x10602c[_0x44b8('0x22')]({'plain':!![]});var _0x500bad=_0x44b8('0x23');return db[_0x44b8('0x4c')][_0x44b8('0x46')]({'where':{'name':_0x500bad,'userProfileId':_0x25d266[_0x44b8('0x4d')]},'raw':!![]})[_0x44b8('0x20')](function(_0x57d0e2){if(_0x57d0e2&&_0x57d0e2['autoAssociation']===0x0){return db[_0x44b8('0x24')]['create']({'name':_0x44ec23[_0x44b8('0x27')],'resourceId':_0x44ec23['id'],'type':_0x57d0e2['name'],'sectionId':_0x57d0e2['id']},{})[_0x44b8('0x20')](function(){return _0x10602c;});}else{return _0x10602c;}})[_0x44b8('0x43')](function(_0x1a29f6){logger[_0x44b8('0x4e')](_0x44b8('0x4f'),_0x1a29f6);throw _0x1a29f6;});}return _0x10602c;})[_0x44b8('0x20')](respondWithResult(_0x103d57,0xc9))[_0x44b8('0x43')](handleError(_0x103d57,null));};exports['update']=function(_0x3ad278,_0x37b2c2){if(_0x3ad278[_0x44b8('0x48')]['id']){delete _0x3ad278['body']['id'];}return db[_0x44b8('0x29')][_0x44b8('0x46')]({'where':{'id':_0x3ad278[_0x44b8('0x45')]['id']}})[_0x44b8('0x20')](handleEntityNotFound(_0x37b2c2,null))['then'](saveUpdates(_0x3ad278[_0x44b8('0x48')],null))[_0x44b8('0x20')](respondWithResult(_0x37b2c2,null))['catch'](handleError(_0x37b2c2,null));};exports[_0x44b8('0x21')]=function(_0x19f22b,_0x35136e){return db[_0x44b8('0x29')][_0x44b8('0x46')]({'where':{'id':_0x19f22b['params']['id']}})['then'](handleEntityNotFound(_0x35136e,null))[_0x44b8('0x20')](removeEntity(_0x35136e,null))[_0x44b8('0x43')](handleError(_0x35136e,null));};
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.model.js b/server/api/analyticMetric/analyticMetric.model.js
index 2eb1dd3..60a7c23 100644
--- a/server/api/analyticMetric/analyticMetric.model.js
+++ b/server/api/analyticMetric/analyticMetric.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x87f1=['path','../../config/environment','exports','AnalyticMetric','analytics_metrics','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x15c659,_0x2bd857){var _0x2f018c=function(_0x4bc351){while(--_0x4bc351){_0x15c659['push'](_0x15c659['shift']());}};_0x2f018c(++_0x2bd857);}(_0x87f1,0x170));var _0x187f=function(_0x160af8,_0xaa32a3){_0x160af8=_0x160af8-0x0;var _0x3baef8=_0x87f1[_0x160af8];return _0x3baef8;};'use strict';var _=require('lodash');var util=require(_0x187f('0x0'));var logger=require(_0x187f('0x1'))(_0x187f('0x2'));var moment=require(_0x187f('0x3'));var BPromise=require(_0x187f('0x4'));var rp=require(_0x187f('0x5'));var fs=require('fs');var path=require(_0x187f('0x6'));var rimraf=require('rimraf');var config=require(_0x187f('0x7'));var attributes=require('./analyticMetric.attributes');module[_0x187f('0x8')]=function(_0x591147,_0x1115d1){return _0x591147['define'](_0x187f('0x9'),attributes,{'tableName':_0x187f('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x13c5=['exports','analytics_metrics','lodash','path','./analyticMetric.attributes'];(function(_0x343343,_0x46874d){var _0x25462d=function(_0x2f88a4){while(--_0x2f88a4){_0x343343['push'](_0x343343['shift']());}};_0x25462d(++_0x46874d);}(_0x13c5,0x7a));var _0x513c=function(_0x4861fd,_0x43c3bd){_0x4861fd=_0x4861fd-0x0;var _0x2b7231=_0x13c5[_0x4861fd];return _0x2b7231;};'use strict';var _=require(_0x513c('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x513c('0x1'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x513c('0x2'));module[_0x513c('0x3')]=function(_0x982017,_0x2ad2db){return _0x982017['define']('AnalyticMetric',attributes,{'tableName':_0x513c('0x4'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.rpc.js b/server/api/analyticMetric/analyticMetric.rpc.js
index 6449ce8..dee7898 100644
--- a/server/api/analyticMetric/analyticMetric.rpc.js
+++ b/server/api/analyticMetric/analyticMetric.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa587=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify','error','code','AnalyticMetric,\x20%s,\x20%s','message','result','catch','bluebird','ioredis'];(function(_0x27538b,_0x47639d){var _0x4a0938=function(_0x10fdf5){while(--_0x10fdf5){_0x27538b['push'](_0x27538b['shift']());}};_0x4a0938(++_0x47639d);}(_0xa587,0xc4));var _0x7a58=function(_0x153268,_0x10fb17){_0x153268=_0x153268-0x0;var _0x120f98=_0xa587[_0x153268];return _0x120f98;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0x7a58('0x0'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7a58('0x1'));var db=require(_0x7a58('0x2'))['db'];var utils=require(_0x7a58('0x3'));var logger=require(_0x7a58('0x4'))(_0x7a58('0x5'));var config=require(_0x7a58('0x6'));var jayson=require(_0x7a58('0x7'));var client=jayson['client'][_0x7a58('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x20f207,_0x3c0992,_0x2e91b9){return new BPromise(function(_0x40d384,_0x5d6bb4){return client[_0x7a58('0x9')](_0x20f207,_0x2e91b9)[_0x7a58('0xa')](function(_0x4aad23){logger[_0x7a58('0xb')]('AnalyticMetric,\x20%s,\x20%s',_0x3c0992,_0x7a58('0xc'));logger[_0x7a58('0xd')](_0x7a58('0xe'),_0x3c0992,'request\x20sent',JSON[_0x7a58('0xf')](_0x4aad23));if(_0x4aad23[_0x7a58('0x10')]){if(_0x4aad23[_0x7a58('0x10')][_0x7a58('0x11')]===0x1f4){logger['error'](_0x7a58('0x12'),_0x3c0992,_0x4aad23[_0x7a58('0x10')]['message']);return _0x5d6bb4(_0x4aad23['error'][_0x7a58('0x13')]);}logger[_0x7a58('0x10')](_0x7a58('0x12'),_0x3c0992,_0x4aad23[_0x7a58('0x10')][_0x7a58('0x13')]);return _0x40d384(_0x4aad23[_0x7a58('0x10')][_0x7a58('0x13')]);}else{logger[_0x7a58('0xb')]('AnalyticMetric,\x20%s,\x20%s',_0x3c0992,_0x7a58('0xc'));_0x40d384(_0x4aad23[_0x7a58('0x14')]['message']);}})[_0x7a58('0x15')](function(_0x2d8f61){logger['error'](_0x7a58('0x12'),_0x3c0992,_0x2d8f61);_0x5d6bb4(_0x2d8f61);});});}
\ No newline at end of file
+var _0xc583=['stringify','error','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request','then','info','AnalyticMetric,\x20%s,\x20%s','request\x20sent'];(function(_0x220c6e,_0x1c328c){var _0x534e93=function(_0xaa73ff){while(--_0xaa73ff){_0x220c6e['push'](_0x220c6e['shift']());}};_0x534e93(++_0x1c328c);}(_0xc583,0x194));var _0x3c58=function(_0x22b96f,_0x35cc0a){_0x22b96f=_0x22b96f-0x0;var _0x2bee8a=_0xc583[_0x22b96f];return _0x2bee8a;};'use strict';var _=require(_0x3c58('0x0'));var util=require('util');var moment=require(_0x3c58('0x1'));var BPromise=require(_0x3c58('0x2'));var rs=require(_0x3c58('0x3'));var fs=require('fs');var Redis=require(_0x3c58('0x4'));var db=require(_0x3c58('0x5'))['db'];var utils=require(_0x3c58('0x6'));var logger=require(_0x3c58('0x7'))(_0x3c58('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x3c58('0x9')][_0x3c58('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x31cf0d,_0x137a4d,_0x3d1974){return new BPromise(function(_0x3439a7,_0x935da2){return client[_0x3c58('0xb')](_0x31cf0d,_0x3d1974)[_0x3c58('0xc')](function(_0x405c25){logger[_0x3c58('0xd')](_0x3c58('0xe'),_0x137a4d,_0x3c58('0xf'));logger['debug']('AnalyticMetric,\x20%s,\x20%s,\x20%s',_0x137a4d,'request\x20sent',JSON[_0x3c58('0x10')](_0x405c25));if(_0x405c25['error']){if(_0x405c25[_0x3c58('0x11')]['code']===0x1f4){logger[_0x3c58('0x11')](_0x3c58('0xe'),_0x137a4d,_0x405c25['error'][_0x3c58('0x12')]);return _0x935da2(_0x405c25[_0x3c58('0x11')][_0x3c58('0x12')]);}logger[_0x3c58('0x11')](_0x3c58('0xe'),_0x137a4d,_0x405c25[_0x3c58('0x11')][_0x3c58('0x12')]);return _0x3439a7(_0x405c25['error'][_0x3c58('0x12')]);}else{logger[_0x3c58('0xd')](_0x3c58('0xe'),_0x137a4d,_0x3c58('0xf'));_0x3439a7(_0x405c25[_0x3c58('0x13')][_0x3c58('0x12')]);}})[_0x3c58('0x14')](function(_0x59be62){logger[_0x3c58('0x11')](_0x3c58('0xe'),_0x137a4d,_0x59be62);_0x935da2(_0x59be62);});});}
\ No newline at end of file
diff --git a/server/api/analyticMetric/index.js b/server/api/analyticMetric/index.js
index 27a1cc7..def7732 100644
--- a/server/api/analyticMetric/index.js
+++ b/server/api/analyticMetric/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4250=['post','create','put','update','delete','destroy','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../config/environment','./analyticMetric.controller','get','isAuthenticated','index','/:id','show'];(function(_0x5028d8,_0x538b4b){var _0x1ba240=function(_0xa6c8a3){while(--_0xa6c8a3){_0x5028d8['push'](_0x5028d8['shift']());}};_0x1ba240(++_0x538b4b);}(_0x4250,0x146));var _0x0425=function(_0x3b5250,_0x7a0b2c){_0x3b5250=_0x3b5250-0x0;var _0xc844a1=_0x4250[_0x3b5250];return _0xc844a1;};'use strict';var multer=require(_0x0425('0x0'));var util=require(_0x0425('0x1'));var path=require(_0x0425('0x2'));var timeout=require(_0x0425('0x3'));var express=require('express');var router=express[_0x0425('0x4')]();var fs_extra=require(_0x0425('0x5'));var auth=require(_0x0425('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x0425('0x7'));var controller=require(_0x0425('0x8'));router[_0x0425('0x9')]('/',auth[_0x0425('0xa')](),controller[_0x0425('0xb')]);router[_0x0425('0x9')](_0x0425('0xc'),auth[_0x0425('0xa')](),controller[_0x0425('0xd')]);router[_0x0425('0xe')]('/',auth[_0x0425('0xa')](),controller[_0x0425('0xf')]);router[_0x0425('0x10')](_0x0425('0xc'),auth[_0x0425('0xa')](),controller[_0x0425('0x11')]);router[_0x0425('0x12')]('/:id',auth['isAuthenticated'](),controller[_0x0425('0x13')]);module['exports']=router;
\ No newline at end of file
+var _0x6d19=['../../config/environment','./analyticMetric.controller','get','index','/:id','show','post','isAuthenticated','create','put','delete','destroy','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service'];(function(_0x1bb54c,_0x1ae739){var _0x431e02=function(_0x513416){while(--_0x513416){_0x1bb54c['push'](_0x1bb54c['shift']());}};_0x431e02(++_0x1ae739);}(_0x6d19,0x160));var _0x96d1=function(_0x548627,_0x4ec392){_0x548627=_0x548627-0x0;var _0x844a84=_0x6d19[_0x548627];return _0x844a84;};'use strict';var multer=require(_0x96d1('0x0'));var util=require(_0x96d1('0x1'));var path=require(_0x96d1('0x2'));var timeout=require(_0x96d1('0x3'));var express=require(_0x96d1('0x4'));var router=express[_0x96d1('0x5')]();var fs_extra=require(_0x96d1('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x96d1('0x7'));var config=require(_0x96d1('0x8'));var controller=require(_0x96d1('0x9'));router[_0x96d1('0xa')]('/',auth['isAuthenticated'](),controller[_0x96d1('0xb')]);router[_0x96d1('0xa')](_0x96d1('0xc'),auth['isAuthenticated'](),controller[_0x96d1('0xd')]);router[_0x96d1('0xe')]('/',auth[_0x96d1('0xf')](),controller[_0x96d1('0x10')]);router[_0x96d1('0x11')](_0x96d1('0xc'),auth['isAuthenticated'](),controller['update']);router[_0x96d1('0x12')](_0x96d1('0xc'),auth['isAuthenticated'](),controller[_0x96d1('0x13')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.attributes.js b/server/api/analyticTreeReport/analyticTreeReport.attributes.js
index a08377c..71df0f5 100644
--- a/server/api/analyticTreeReport/analyticTreeReport.attributes.js
+++ b/server/api/analyticTreeReport/analyticTreeReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4858=['sequelize','exports','TEXT'];(function(_0x4bfd15,_0x57c9f2){var _0xfd58be=function(_0x23d742){while(--_0x23d742){_0x4bfd15['push'](_0x4bfd15['shift']());}};_0xfd58be(++_0x57c9f2);}(_0x4858,0x12c));var _0x8485=function(_0x1331b8,_0x24465f){_0x1331b8=_0x1331b8-0x0;var _0x3a57ce=_0x4858[_0x1331b8];return _0x3a57ce;};'use strict';var Sequelize=require(_0x8485('0x0'));module[_0x8485('0x1')]={'tree':{'type':Sequelize[_0x8485('0x2')],'allowNull':![]}};
\ No newline at end of file
+var _0xe24a=['TEXT','exports'];(function(_0x3cd133,_0x222fcb){var _0x2512c8=function(_0x484491){while(--_0x484491){_0x3cd133['push'](_0x3cd133['shift']());}};_0x2512c8(++_0x222fcb);}(_0xe24a,0x87));var _0xae24=function(_0x1c57f9,_0x474d9b){_0x1c57f9=_0x1c57f9-0x0;var _0x5c8aac=_0xe24a[_0x1c57f9];return _0x5c8aac;};'use strict';var Sequelize=require('sequelize');module[_0xae24('0x0')]={'tree':{'type':Sequelize[_0xae24('0x1')],'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.controller.js b/server/api/analyticTreeReport/analyticTreeReport.controller.js
index f83e92c..2b46f7d 100644
--- a/server/api/analyticTreeReport/analyticTreeReport.controller.js
+++ b/server/api/analyticTreeReport/analyticTreeReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x48b4=['key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','limit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','rows','catch','show','params','length','include','find','create','body','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','to-csv','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','status','end','json','undefined','count','offset','set','reject','update','then','destroy','error','stack','name','send','map','AnalyticTreeReport','rawAttributes','fieldName','type'];(function(_0x22da09,_0x29f1b0){var _0x56a486=function(_0x5cdfb0){while(--_0x5cdfb0){_0x22da09['push'](_0x22da09['shift']());}};_0x56a486(++_0x29f1b0);}(_0x48b4,0x13c));var _0x448b=function(_0x33ab3e,_0x5ed230){_0x33ab3e=_0x33ab3e-0x0;var _0x5592c5=_0x48b4[_0x33ab3e];return _0x5592c5;};'use strict';var emlformat=require(_0x448b('0x0'));var rimraf=require(_0x448b('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x448b('0x2'));var rp=require('request-promise');var moment=require(_0x448b('0x3'));var BPromise=require(_0x448b('0x4'));var Mustache=require(_0x448b('0x5'));var util=require(_0x448b('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0x448b('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x448b('0x8'));var _=require('lodash');var squel=require(_0x448b('0x9'));var crypto=require(_0x448b('0xa'));var jsforce=require(_0x448b('0xb'));var deskjs=require(_0x448b('0xc'));var toCsv=require(_0x448b('0x7'));var querystring=require(_0x448b('0xd'));var Papa=require(_0x448b('0xe'));var Redis=require(_0x448b('0xf'));var authService=require(_0x448b('0x10'));var qs=require(_0x448b('0x11'));var as=require(_0x448b('0x12'));var hardwareService=require(_0x448b('0x13'));var logger=require('../../config/logger')(_0x448b('0x14'));var utils=require(_0x448b('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x448b('0x16'));var db=require(_0x448b('0x17'))['db'];function respondWithStatusCode(_0xb03c78,_0x499666){_0x499666=_0x499666||0xcc;return function(_0x2dd993){if(_0x2dd993){return _0xb03c78['sendStatus'](_0x499666);}return _0xb03c78[_0x448b('0x18')](_0x499666)[_0x448b('0x19')]();};}function respondWithResult(_0x43a5b9,_0x59a627){_0x59a627=_0x59a627||0xc8;return function(_0x3c053f){if(_0x3c053f){return _0x43a5b9[_0x448b('0x18')](_0x59a627)[_0x448b('0x1a')](_0x3c053f);}};}function respondWithFilteredResult(_0x189f62,_0x1f83d2){return function(_0x21e421){if(_0x21e421){var _0x37a542=typeof _0x1f83d2['offset']===_0x448b('0x1b')&&typeof _0x1f83d2['limit']==='undefined';var _0x42320d=_0x21e421['count'];var _0x359648=_0x37a542?0x0:_0x1f83d2['offset'];var _0x85731f=_0x37a542?_0x21e421[_0x448b('0x1c')]:_0x1f83d2[_0x448b('0x1d')]+_0x1f83d2['limit'];var _0x2f54a0;if(_0x85731f>=_0x42320d){_0x85731f=_0x42320d;_0x2f54a0=0xc8;}else{_0x2f54a0=0xce;}_0x189f62['status'](_0x2f54a0);return _0x189f62[_0x448b('0x1e')]('Content-Range',_0x359648+'-'+_0x85731f+'/'+_0x42320d)[_0x448b('0x1a')](_0x21e421);}return null;};}function patchUpdates(_0x5a9dce){return function(_0x3d481e){try{jsonpatch['apply'](_0x3d481e,_0x5a9dce,!![]);}catch(_0x30c26a){return BPromise[_0x448b('0x1f')](_0x30c26a);}return _0x3d481e['save']();};}function saveUpdates(_0x311641,_0x4bf1dc){return function(_0x485a0a){if(_0x485a0a){return _0x485a0a[_0x448b('0x20')](_0x311641)[_0x448b('0x21')](function(_0x5dd52b){return _0x5dd52b;});}return null;};}function removeEntity(_0x16d1d1,_0xd7e150){return function(_0x1254ef){if(_0x1254ef){return _0x1254ef[_0x448b('0x22')]()[_0x448b('0x21')](function(){_0x16d1d1[_0x448b('0x18')](0xcc)[_0x448b('0x19')]();});}};}function handleEntityNotFound(_0x529fdb,_0x26668d){return function(_0x33d77f){if(!_0x33d77f){_0x529fdb['sendStatus'](0x194);}return _0x33d77f;};}function handleError(_0x48da72,_0x5dfdf9){_0x5dfdf9=_0x5dfdf9||0x1f4;return function(_0x3cea5c){logger[_0x448b('0x23')](_0x3cea5c[_0x448b('0x24')]);if(_0x3cea5c[_0x448b('0x25')]){delete _0x3cea5c[_0x448b('0x25')];}_0x48da72[_0x448b('0x18')](_0x5dfdf9)[_0x448b('0x26')](_0x3cea5c);};}exports['index']=function(_0x2a03b8,_0x5ec38c){var _0x4af15c={},_0x1b7419={},_0x366aa4={'count':0x0,'rows':[]};var _0xf0537e=_[_0x448b('0x27')](db[_0x448b('0x28')][_0x448b('0x29')],function(_0x539714){return{'name':_0x539714[_0x448b('0x2a')],'type':_0x539714[_0x448b('0x2b')][_0x448b('0x2c')]};});_0x1b7419[_0x448b('0x2d')]=_['map'](_0xf0537e,'name');_0x1b7419[_0x448b('0x2e')]=_[_0x448b('0x2f')](_0x2a03b8[_0x448b('0x2e')]);_0x1b7419[_0x448b('0x30')]=_[_0x448b('0x31')](_0x1b7419[_0x448b('0x2d')],_0x1b7419[_0x448b('0x2e')]);_0x4af15c[_0x448b('0x32')]=_[_0x448b('0x31')](_0x1b7419['model'],qs[_0x448b('0x33')](_0x2a03b8[_0x448b('0x2e')][_0x448b('0x33')]));_0x4af15c[_0x448b('0x32')]=_0x4af15c[_0x448b('0x32')]['length']?_0x4af15c[_0x448b('0x32')]:_0x1b7419['model'];if(!_0x2a03b8['query'][_0x448b('0x34')](_0x448b('0x35'))){_0x4af15c['limit']=qs[_0x448b('0x36')](_0x2a03b8[_0x448b('0x2e')][_0x448b('0x36')]);_0x4af15c['offset']=qs[_0x448b('0x1d')](_0x2a03b8[_0x448b('0x2e')][_0x448b('0x1d')]);}_0x4af15c[_0x448b('0x37')]=qs[_0x448b('0x38')](_0x2a03b8['query'][_0x448b('0x38')]);_0x4af15c[_0x448b('0x39')]=qs[_0x448b('0x30')](_['pick'](_0x2a03b8[_0x448b('0x2e')],_0x1b7419['filters']),_0xf0537e);if(_0x2a03b8[_0x448b('0x2e')][_0x448b('0x3a')]){_0x4af15c[_0x448b('0x39')]=_[_0x448b('0x3b')](_0x4af15c[_0x448b('0x39')],{'$or':_[_0x448b('0x27')](_0xf0537e,function(_0x2aa6e5){if(_0x2aa6e5[_0x448b('0x2b')]!==_0x448b('0x3c')){var _0x342061={};_0x342061[_0x2aa6e5[_0x448b('0x25')]]={'$like':'%'+_0x2a03b8[_0x448b('0x2e')][_0x448b('0x3a')]+'%'};return _0x342061;}})});}_0x4af15c=_[_0x448b('0x3b')]({},_0x4af15c,_0x2a03b8[_0x448b('0x3d')]);var _0x5231c0={'where':_0x4af15c['where']};return db[_0x448b('0x28')][_0x448b('0x1c')](_0x5231c0)['then'](function(_0x307aa1){_0x366aa4[_0x448b('0x1c')]=_0x307aa1;if(_0x2a03b8[_0x448b('0x2e')][_0x448b('0x3e')]){_0x4af15c['include']=[{'all':!![]}];}return db['AnalyticTreeReport']['findAll'](_0x4af15c);})[_0x448b('0x21')](function(_0x4b052e){_0x366aa4[_0x448b('0x3f')]=_0x4b052e;return _0x366aa4;})[_0x448b('0x21')](respondWithFilteredResult(_0x5ec38c,_0x4af15c))[_0x448b('0x40')](handleError(_0x5ec38c,null));};exports[_0x448b('0x41')]=function(_0x5f2ade,_0x31bcff){var _0x5a273f={'raw':!![],'where':{'id':_0x5f2ade[_0x448b('0x42')]['id']}},_0x8dcf1f={};_0x8dcf1f[_0x448b('0x2d')]=_[_0x448b('0x2f')](db[_0x448b('0x28')][_0x448b('0x29')]);_0x8dcf1f[_0x448b('0x2e')]=_['keys'](_0x5f2ade[_0x448b('0x2e')]);_0x8dcf1f[_0x448b('0x30')]=_[_0x448b('0x31')](_0x8dcf1f[_0x448b('0x2d')],_0x8dcf1f[_0x448b('0x2e')]);_0x5a273f[_0x448b('0x32')]=_[_0x448b('0x31')](_0x8dcf1f[_0x448b('0x2d')],qs[_0x448b('0x33')](_0x5f2ade['query'][_0x448b('0x33')]));_0x5a273f['attributes']=_0x5a273f['attributes'][_0x448b('0x43')]?_0x5a273f[_0x448b('0x32')]:_0x8dcf1f[_0x448b('0x2d')];if(_0x5f2ade['query'][_0x448b('0x3e')]){_0x5a273f[_0x448b('0x44')]=[{'all':!![]}];}_0x5a273f=_[_0x448b('0x3b')]({},_0x5a273f,_0x5f2ade[_0x448b('0x3d')]);return db[_0x448b('0x28')][_0x448b('0x45')](_0x5a273f)[_0x448b('0x21')](handleEntityNotFound(_0x31bcff,null))[_0x448b('0x21')](respondWithResult(_0x31bcff,null))['catch'](handleError(_0x31bcff,null));};exports[_0x448b('0x46')]=function(_0x3107a9,_0x1d4203){return db[_0x448b('0x28')][_0x448b('0x46')](_0x3107a9[_0x448b('0x47')],{})[_0x448b('0x21')](respondWithResult(_0x1d4203,0xc9))[_0x448b('0x40')](handleError(_0x1d4203,null));};exports['update']=function(_0x2b50de,_0xe25ab9){if(_0x2b50de[_0x448b('0x47')]['id']){delete _0x2b50de['body']['id'];}return db['AnalyticTreeReport'][_0x448b('0x45')]({'where':{'id':_0x2b50de['params']['id']}})[_0x448b('0x21')](handleEntityNotFound(_0xe25ab9,null))[_0x448b('0x21')](saveUpdates(_0x2b50de[_0x448b('0x47')],null))[_0x448b('0x21')](respondWithResult(_0xe25ab9,null))[_0x448b('0x40')](handleError(_0xe25ab9,null));};exports[_0x448b('0x22')]=function(_0xba4f4b,_0x5b3ca8){return db['AnalyticTreeReport']['find']({'where':{'id':_0xba4f4b[_0x448b('0x42')]['id']}})[_0x448b('0x21')](handleEntityNotFound(_0x5b3ca8,null))['then'](removeEntity(_0x5b3ca8,null))[_0x448b('0x40')](handleError(_0x5b3ca8,null));};
\ No newline at end of file
+var _0x8bed=['jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','status','end','offset','undefined','limit','count','set','json','reject','update','then','destroy','sendStatus','error','stack','name','map','AnalyticTreeReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','merge','VIRTUAL','filter','includeAll','include','catch','show','find','create','body','params','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto'];(function(_0x4a8535,_0x100001){var _0x2e48dd=function(_0x20e9b5){while(--_0x20e9b5){_0x4a8535['push'](_0x4a8535['shift']());}};_0x2e48dd(++_0x100001);}(_0x8bed,0xca));var _0xd8be=function(_0x4ff939,_0x5f54ea){_0x4ff939=_0x4ff939-0x0;var _0x3f8ba8=_0x8bed[_0x4ff939];return _0x3f8ba8;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xd8be('0x0'));var zipdir=require(_0xd8be('0x1'));var jsonpatch=require(_0xd8be('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xd8be('0x3'));var Mustache=require(_0xd8be('0x4'));var util=require(_0xd8be('0x5'));var path=require(_0xd8be('0x6'));var sox=require(_0xd8be('0x7'));var csv=require(_0xd8be('0x8'));var ejs=require(_0xd8be('0x9'));var fs=require('fs');var fs_extra=require(_0xd8be('0xa'));var _=require(_0xd8be('0xb'));var squel=require(_0xd8be('0xc'));var crypto=require(_0xd8be('0xd'));var jsforce=require(_0xd8be('0xe'));var deskjs=require(_0xd8be('0xf'));var toCsv=require(_0xd8be('0x8'));var querystring=require(_0xd8be('0x10'));var Papa=require(_0xd8be('0x11'));var Redis=require(_0xd8be('0x12'));var authService=require(_0xd8be('0x13'));var qs=require(_0xd8be('0x14'));var as=require(_0xd8be('0x15'));var hardwareService=require(_0xd8be('0x16'));var logger=require(_0xd8be('0x17'))(_0xd8be('0x18'));var utils=require(_0xd8be('0x19'));var config=require(_0xd8be('0x1a'));var licenseUtil=require(_0xd8be('0x1b'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2504c8,_0x151719){_0x151719=_0x151719||0xcc;return function(_0x447d92){if(_0x447d92){return _0x2504c8['sendStatus'](_0x151719);}return _0x2504c8[_0xd8be('0x1c')](_0x151719)[_0xd8be('0x1d')]();};}function respondWithResult(_0x450dd8,_0x2f6b07){_0x2f6b07=_0x2f6b07||0xc8;return function(_0x12fd09){if(_0x12fd09){return _0x450dd8[_0xd8be('0x1c')](_0x2f6b07)['json'](_0x12fd09);}};}function respondWithFilteredResult(_0x14bbd6,_0x52a2da){return function(_0x5b6c0e){if(_0x5b6c0e){var _0x5d0ae3=typeof _0x52a2da[_0xd8be('0x1e')]===_0xd8be('0x1f')&&typeof _0x52a2da[_0xd8be('0x20')]===_0xd8be('0x1f');var _0x382d4a=_0x5b6c0e[_0xd8be('0x21')];var _0x52cf76=_0x5d0ae3?0x0:_0x52a2da[_0xd8be('0x1e')];var _0x269a99=_0x5d0ae3?_0x5b6c0e['count']:_0x52a2da['offset']+_0x52a2da[_0xd8be('0x20')];var _0xd75dbb;if(_0x269a99>=_0x382d4a){_0x269a99=_0x382d4a;_0xd75dbb=0xc8;}else{_0xd75dbb=0xce;}_0x14bbd6[_0xd8be('0x1c')](_0xd75dbb);return _0x14bbd6[_0xd8be('0x22')]('Content-Range',_0x52cf76+'-'+_0x269a99+'/'+_0x382d4a)[_0xd8be('0x23')](_0x5b6c0e);}return null;};}function patchUpdates(_0xe34c12){return function(_0x156857){try{jsonpatch['apply'](_0x156857,_0xe34c12,!![]);}catch(_0x48f423){return BPromise[_0xd8be('0x24')](_0x48f423);}return _0x156857['save']();};}function saveUpdates(_0x284f80,_0x31b4ec){return function(_0x10dab6){if(_0x10dab6){return _0x10dab6[_0xd8be('0x25')](_0x284f80)[_0xd8be('0x26')](function(_0x2e9828){return _0x2e9828;});}return null;};}function removeEntity(_0x2f9c19,_0x1914d1){return function(_0x5ae535){if(_0x5ae535){return _0x5ae535[_0xd8be('0x27')]()[_0xd8be('0x26')](function(){_0x2f9c19[_0xd8be('0x1c')](0xcc)[_0xd8be('0x1d')]();});}};}function handleEntityNotFound(_0x5a17e4,_0x4ee1c4){return function(_0x5220b2){if(!_0x5220b2){_0x5a17e4[_0xd8be('0x28')](0x194);}return _0x5220b2;};}function handleError(_0x33fb6a,_0x592c4c){_0x592c4c=_0x592c4c||0x1f4;return function(_0x10789a){logger[_0xd8be('0x29')](_0x10789a[_0xd8be('0x2a')]);if(_0x10789a[_0xd8be('0x2b')]){delete _0x10789a[_0xd8be('0x2b')];}_0x33fb6a[_0xd8be('0x1c')](_0x592c4c)['send'](_0x10789a);};}exports['index']=function(_0x47247f,_0x45ce44){var _0x295faa={},_0x22ac51={},_0x5efc59={'count':0x0,'rows':[]};var _0x5de0ec=_[_0xd8be('0x2c')](db[_0xd8be('0x2d')][_0xd8be('0x2e')],function(_0x1c62eb){return{'name':_0x1c62eb[_0xd8be('0x2f')],'type':_0x1c62eb[_0xd8be('0x30')][_0xd8be('0x31')]};});_0x22ac51[_0xd8be('0x32')]=_[_0xd8be('0x2c')](_0x5de0ec,_0xd8be('0x2b'));_0x22ac51[_0xd8be('0x33')]=_[_0xd8be('0x34')](_0x47247f[_0xd8be('0x33')]);_0x22ac51[_0xd8be('0x35')]=_[_0xd8be('0x36')](_0x22ac51['model'],_0x22ac51['query']);_0x295faa[_0xd8be('0x37')]=_['intersection'](_0x22ac51[_0xd8be('0x32')],qs[_0xd8be('0x38')](_0x47247f[_0xd8be('0x33')][_0xd8be('0x38')]));_0x295faa[_0xd8be('0x37')]=_0x295faa[_0xd8be('0x37')][_0xd8be('0x39')]?_0x295faa['attributes']:_0x22ac51[_0xd8be('0x32')];if(!_0x47247f[_0xd8be('0x33')][_0xd8be('0x3a')]('nolimit')){_0x295faa[_0xd8be('0x20')]=qs['limit'](_0x47247f[_0xd8be('0x33')][_0xd8be('0x20')]);_0x295faa[_0xd8be('0x1e')]=qs['offset'](_0x47247f[_0xd8be('0x33')][_0xd8be('0x1e')]);}_0x295faa['order']=qs[_0xd8be('0x3b')](_0x47247f[_0xd8be('0x33')][_0xd8be('0x3b')]);_0x295faa[_0xd8be('0x3c')]=qs[_0xd8be('0x35')](_['pick'](_0x47247f[_0xd8be('0x33')],_0x22ac51['filters']),_0x5de0ec);if(_0x47247f[_0xd8be('0x33')]['filter']){_0x295faa[_0xd8be('0x3c')]=_[_0xd8be('0x3d')](_0x295faa[_0xd8be('0x3c')],{'$or':_[_0xd8be('0x2c')](_0x5de0ec,function(_0xb960b6){if(_0xb960b6[_0xd8be('0x30')]!==_0xd8be('0x3e')){var _0xd50b91={};_0xd50b91[_0xb960b6[_0xd8be('0x2b')]]={'$like':'%'+_0x47247f[_0xd8be('0x33')][_0xd8be('0x3f')]+'%'};return _0xd50b91;}})});}_0x295faa=_[_0xd8be('0x3d')]({},_0x295faa,_0x47247f['options']);var _0x1a61f2={'where':_0x295faa[_0xd8be('0x3c')]};return db[_0xd8be('0x2d')][_0xd8be('0x21')](_0x1a61f2)[_0xd8be('0x26')](function(_0x1adb91){_0x5efc59[_0xd8be('0x21')]=_0x1adb91;if(_0x47247f['query'][_0xd8be('0x40')]){_0x295faa[_0xd8be('0x41')]=[{'all':!![]}];}return db[_0xd8be('0x2d')]['findAll'](_0x295faa);})[_0xd8be('0x26')](function(_0x4246f8){_0x5efc59['rows']=_0x4246f8;return _0x5efc59;})[_0xd8be('0x26')](respondWithFilteredResult(_0x45ce44,_0x295faa))[_0xd8be('0x42')](handleError(_0x45ce44,null));};exports[_0xd8be('0x43')]=function(_0x2db83f,_0x2829eb){var _0xe9aabe={'raw':!![],'where':{'id':_0x2db83f['params']['id']}},_0x880fde={};_0x880fde[_0xd8be('0x32')]=_['keys'](db['AnalyticTreeReport']['rawAttributes']);_0x880fde[_0xd8be('0x33')]=_[_0xd8be('0x34')](_0x2db83f['query']);_0x880fde[_0xd8be('0x35')]=_[_0xd8be('0x36')](_0x880fde['model'],_0x880fde['query']);_0xe9aabe[_0xd8be('0x37')]=_[_0xd8be('0x36')](_0x880fde[_0xd8be('0x32')],qs[_0xd8be('0x38')](_0x2db83f[_0xd8be('0x33')][_0xd8be('0x38')]));_0xe9aabe['attributes']=_0xe9aabe[_0xd8be('0x37')][_0xd8be('0x39')]?_0xe9aabe['attributes']:_0x880fde[_0xd8be('0x32')];if(_0x2db83f[_0xd8be('0x33')][_0xd8be('0x40')]){_0xe9aabe[_0xd8be('0x41')]=[{'all':!![]}];}_0xe9aabe=_[_0xd8be('0x3d')]({},_0xe9aabe,_0x2db83f['options']);return db[_0xd8be('0x2d')][_0xd8be('0x44')](_0xe9aabe)['then'](handleEntityNotFound(_0x2829eb,null))[_0xd8be('0x26')](respondWithResult(_0x2829eb,null))[_0xd8be('0x42')](handleError(_0x2829eb,null));};exports[_0xd8be('0x45')]=function(_0x3dfe33,_0x5af887){return db['AnalyticTreeReport'][_0xd8be('0x45')](_0x3dfe33['body'],{})[_0xd8be('0x26')](respondWithResult(_0x5af887,0xc9))['catch'](handleError(_0x5af887,null));};exports[_0xd8be('0x25')]=function(_0xb64434,_0x47ddf1){if(_0xb64434[_0xd8be('0x46')]['id']){delete _0xb64434['body']['id'];}return db[_0xd8be('0x2d')][_0xd8be('0x44')]({'where':{'id':_0xb64434[_0xd8be('0x47')]['id']}})[_0xd8be('0x26')](handleEntityNotFound(_0x47ddf1,null))[_0xd8be('0x26')](saveUpdates(_0xb64434['body'],null))['then'](respondWithResult(_0x47ddf1,null))[_0xd8be('0x42')](handleError(_0x47ddf1,null));};exports[_0xd8be('0x27')]=function(_0x2f8e37,_0xefcb14){return db[_0xd8be('0x2d')][_0xd8be('0x44')]({'where':{'id':_0x2f8e37[_0xd8be('0x47')]['id']}})['then'](handleEntityNotFound(_0xefcb14,null))[_0xd8be('0x26')](removeEntity(_0xefcb14,null))[_0xd8be('0x42')](handleError(_0xefcb14,null));};
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.model.js b/server/api/analyticTreeReport/analyticTreeReport.model.js
index 2a9bca5..361de0d 100644
--- a/server/api/analyticTreeReport/analyticTreeReport.model.js
+++ b/server/api/analyticTreeReport/analyticTreeReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc2b3=['util','../../config/logger','api','moment','request-promise','rimraf','exports','define','AnalyticTreeReport','analytics_report_trees'];(function(_0xbe200f,_0x4b50eb){var _0x192597=function(_0x106cfd){while(--_0x106cfd){_0xbe200f['push'](_0xbe200f['shift']());}};_0x192597(++_0x4b50eb);}(_0xc2b3,0x168));var _0x3c2b=function(_0x31cf2b,_0x5296c2){_0x31cf2b=_0x31cf2b-0x0;var _0x45acb1=_0xc2b3[_0x31cf2b];return _0x45acb1;};'use strict';var _=require('lodash');var util=require(_0x3c2b('0x0'));var logger=require(_0x3c2b('0x1'))(_0x3c2b('0x2'));var moment=require(_0x3c2b('0x3'));var BPromise=require('bluebird');var rp=require(_0x3c2b('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3c2b('0x5'));var config=require('../../config/environment');var attributes=require('./analyticTreeReport.attributes');module[_0x3c2b('0x6')]=function(_0x5bd430,_0xfbfeb0){return _0x5bd430[_0x3c2b('0x7')](_0x3c2b('0x8'),attributes,{'tableName':_0x3c2b('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x44ef=['moment','bluebird','path','rimraf','../../config/environment','./analyticTreeReport.attributes','exports','define','AnalyticTreeReport','analytics_report_trees','lodash','util','../../config/logger','api'];(function(_0x474771,_0x50efa1){var _0x6388b6=function(_0x56f4c0){while(--_0x56f4c0){_0x474771['push'](_0x474771['shift']());}};_0x6388b6(++_0x50efa1);}(_0x44ef,0x88));var _0xf44e=function(_0x4306f9,_0x55b768){_0x4306f9=_0x4306f9-0x0;var _0xb960db=_0x44ef[_0x4306f9];return _0xb960db;};'use strict';var _=require(_0xf44e('0x0'));var util=require(_0xf44e('0x1'));var logger=require(_0xf44e('0x2'))(_0xf44e('0x3'));var moment=require(_0xf44e('0x4'));var BPromise=require(_0xf44e('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xf44e('0x6'));var rimraf=require(_0xf44e('0x7'));var config=require(_0xf44e('0x8'));var attributes=require(_0xf44e('0x9'));module[_0xf44e('0xa')]=function(_0x392679,_0x5f1409){return _0x392679[_0xf44e('0xb')](_0xf44e('0xc'),attributes,{'tableName':_0xf44e('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.rpc.js b/server/api/analyticTreeReport/analyticTreeReport.rpc.js
index ece3af2..4f74ff3 100644
--- a/server/api/analyticTreeReport/analyticTreeReport.rpc.js
+++ b/server/api/analyticTreeReport/analyticTreeReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2ef3=['bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','request','then','info','AnalyticTreeReport,\x20%s,\x20%s','AnalyticTreeReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','lodash','util','moment'];(function(_0xfe328a,_0x40602a){var _0x54d9a4=function(_0x591e40){while(--_0x591e40){_0xfe328a['push'](_0xfe328a['shift']());}};_0x54d9a4(++_0x40602a);}(_0x2ef3,0xba));var _0x32ef=function(_0x39a5ae,_0x7678ef){_0x39a5ae=_0x39a5ae-0x0;var _0x459a37=_0x2ef3[_0x39a5ae];return _0x459a37;};'use strict';var _=require(_0x32ef('0x0'));var util=require(_0x32ef('0x1'));var moment=require(_0x32ef('0x2'));var BPromise=require(_0x32ef('0x3'));var rs=require(_0x32ef('0x4'));var fs=require('fs');var Redis=require(_0x32ef('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x32ef('0x6'));var logger=require(_0x32ef('0x7'))('rpc');var config=require(_0x32ef('0x8'));var jayson=require(_0x32ef('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2c0089,_0x4bfcf8,_0x367c39){return new BPromise(function(_0x2fb8eb,_0x234863){return client[_0x32ef('0xa')](_0x2c0089,_0x367c39)[_0x32ef('0xb')](function(_0x2bbb50){logger[_0x32ef('0xc')](_0x32ef('0xd'),_0x4bfcf8,'request\x20sent');logger['debug'](_0x32ef('0xe'),_0x4bfcf8,_0x32ef('0xf'),JSON[_0x32ef('0x10')](_0x2bbb50));if(_0x2bbb50[_0x32ef('0x11')]){if(_0x2bbb50['error'][_0x32ef('0x12')]===0x1f4){logger['error'](_0x32ef('0xd'),_0x4bfcf8,_0x2bbb50['error'][_0x32ef('0x13')]);return _0x234863(_0x2bbb50[_0x32ef('0x11')]['message']);}logger['error'](_0x32ef('0xd'),_0x4bfcf8,_0x2bbb50['error'][_0x32ef('0x13')]);return _0x2fb8eb(_0x2bbb50[_0x32ef('0x11')][_0x32ef('0x13')]);}else{logger[_0x32ef('0xc')]('AnalyticTreeReport,\x20%s,\x20%s',_0x4bfcf8,'request\x20sent');_0x2fb8eb(_0x2bbb50['result'][_0x32ef('0x13')]);}})[_0x32ef('0x14')](function(_0xb5aed2){logger['error']('AnalyticTreeReport,\x20%s,\x20%s',_0x4bfcf8,_0xb5aed2);_0x234863(_0xb5aed2);});});}
\ No newline at end of file
+var _0xc4aa=['moment','bluebird','randomstring','ioredis','rpc','../../config/environment','jayson/promise','client','http','request','then','AnalyticTreeReport,\x20%s,\x20%s','request\x20sent','debug','error','code','message','info','catch','lodash','util'];(function(_0x1b4355,_0xa1c0b5){var _0xa12783=function(_0x270dcf){while(--_0x270dcf){_0x1b4355['push'](_0x1b4355['shift']());}};_0xa12783(++_0xa1c0b5);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x346737,_0x3e6081){_0x346737=_0x346737-0x0;var _0x1ade2e=_0xc4aa[_0x346737];return _0x1ade2e;};'use strict';var _=require(_0xac4a('0x0'));var util=require(_0xac4a('0x1'));var moment=require(_0xac4a('0x2'));var BPromise=require(_0xac4a('0x3'));var rs=require(_0xac4a('0x4'));var fs=require('fs');var Redis=require(_0xac4a('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xac4a('0x6'));var config=require(_0xac4a('0x7'));var jayson=require(_0xac4a('0x8'));var client=jayson[_0xac4a('0x9')][_0xac4a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x15cd34,_0x3ef77c,_0x10525b){return new BPromise(function(_0x5c6179,_0x5b8339){return client[_0xac4a('0xb')](_0x15cd34,_0x10525b)[_0xac4a('0xc')](function(_0x26ec84){logger['info'](_0xac4a('0xd'),_0x3ef77c,_0xac4a('0xe'));logger[_0xac4a('0xf')]('AnalyticTreeReport,\x20%s,\x20%s,\x20%s',_0x3ef77c,_0xac4a('0xe'),JSON['stringify'](_0x26ec84));if(_0x26ec84[_0xac4a('0x10')]){if(_0x26ec84['error'][_0xac4a('0x11')]===0x1f4){logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x26ec84['error'][_0xac4a('0x12')]);return _0x5b8339(_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);}logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);return _0x5c6179(_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);}else{logger[_0xac4a('0x13')](_0xac4a('0xd'),_0x3ef77c,_0xac4a('0xe'));_0x5c6179(_0x26ec84['result'][_0xac4a('0x12')]);}})[_0xac4a('0x14')](function(_0x23eb66){logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x23eb66);_0x5b8339(_0x23eb66);});});}
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/index.js b/server/api/analyticTreeReport/index.js
index 0050efa..c25ba10 100644
--- a/server/api/analyticTreeReport/index.js
+++ b/server/api/analyticTreeReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0cab=['Router','../../components/auth/service','../../components/interaction/service','./analyticTreeReport.controller','isAuthenticated','index','get','/:id','post','create','update','delete','destroy','multer','util','connect-timeout','express'];(function(_0x4a5438,_0x19aa59){var _0x35a70d=function(_0x42b805){while(--_0x42b805){_0x4a5438['push'](_0x4a5438['shift']());}};_0x35a70d(++_0x19aa59);}(_0x0cab,0x1b6));var _0xb0ca=function(_0x351e3d,_0x13c1f4){_0x351e3d=_0x351e3d-0x0;var _0x2d1b16=_0x0cab[_0x351e3d];return _0x2d1b16;};'use strict';var multer=require(_0xb0ca('0x0'));var util=require(_0xb0ca('0x1'));var path=require('path');var timeout=require(_0xb0ca('0x2'));var express=require(_0xb0ca('0x3'));var router=express[_0xb0ca('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xb0ca('0x5'));var interaction=require(_0xb0ca('0x6'));var config=require('../../config/environment');var controller=require(_0xb0ca('0x7'));router['get']('/',auth[_0xb0ca('0x8')](),controller[_0xb0ca('0x9')]);router[_0xb0ca('0xa')](_0xb0ca('0xb'),auth[_0xb0ca('0x8')](),controller['show']);router[_0xb0ca('0xc')]('/',auth[_0xb0ca('0x8')](),controller[_0xb0ca('0xd')]);router['put']('/:id',auth[_0xb0ca('0x8')](),controller[_0xb0ca('0xe')]);router[_0xb0ca('0xf')]('/:id',auth[_0xb0ca('0x8')](),controller[_0xb0ca('0x10')]);module['exports']=router;
\ No newline at end of file
+var _0x9b93=['Router','fs-extra','../../components/interaction/service','../../config/environment','./analyticTreeReport.controller','get','isAuthenticated','index','post','create','/:id','update','delete','destroy','exports','util','path'];(function(_0x187399,_0x40c56d){var _0x40fa92=function(_0x36058c){while(--_0x36058c){_0x187399['push'](_0x187399['shift']());}};_0x40fa92(++_0x40c56d);}(_0x9b93,0xb9));var _0x39b9=function(_0x5d80de,_0x2cf15d){_0x5d80de=_0x5d80de-0x0;var _0x1c7556=_0x9b93[_0x5d80de];return _0x1c7556;};'use strict';var multer=require('multer');var util=require(_0x39b9('0x0'));var path=require(_0x39b9('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x39b9('0x2')]();var fs_extra=require(_0x39b9('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x39b9('0x4'));var config=require(_0x39b9('0x5'));var controller=require(_0x39b9('0x6'));router[_0x39b9('0x7')]('/',auth[_0x39b9('0x8')](),controller[_0x39b9('0x9')]);router[_0x39b9('0x7')]('/:id',auth[_0x39b9('0x8')](),controller['show']);router[_0x39b9('0xa')]('/',auth[_0x39b9('0x8')](),controller[_0x39b9('0xb')]);router['put'](_0x39b9('0xc'),auth[_0x39b9('0x8')](),controller[_0x39b9('0xd')]);router[_0x39b9('0xe')]('/:id',auth[_0x39b9('0x8')](),controller[_0x39b9('0xf')]);module[_0x39b9('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/attachment/attachment.attributes.js b/server/api/attachment/attachment.attributes.js
index 6de6195..6bf8caf 100644
--- a/server/api/attachment/attachment.attributes.js
+++ b/server/api/attachment/attachment.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xba47=['exports','STRING','sequelize'];(function(_0x819464,_0x46fc91){var _0x49dcc0=function(_0x36b2b2){while(--_0x36b2b2){_0x819464['push'](_0x819464['shift']());}};_0x49dcc0(++_0x46fc91);}(_0xba47,0x1ac));var _0x7ba4=function(_0x39259d,_0x21399d){_0x39259d=_0x39259d-0x0;var _0x18e87d=_0xba47[_0x39259d];return _0x18e87d;};'use strict';var Sequelize=require(_0x7ba4('0x0'));module[_0x7ba4('0x1')]={'name':{'type':Sequelize[_0x7ba4('0x2')]},'basename':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x7ba4('0x2')]}};
\ No newline at end of file
+var _0xfd2f=['sequelize','exports','STRING'];(function(_0x5f2854,_0x24dd94){var _0xd871cc=function(_0x242c39){while(--_0x242c39){_0x5f2854['push'](_0x5f2854['shift']());}};_0xd871cc(++_0x24dd94);}(_0xfd2f,0x14a));var _0xffd2=function(_0xadb003,_0x35765e){_0xadb003=_0xadb003-0x0;var _0x43cbc2=_0xfd2f[_0xadb003];return _0x43cbc2;};'use strict';var Sequelize=require(_0xffd2('0x0'));module[_0xffd2('0x1')]={'name':{'type':Sequelize[_0xffd2('0x2')]},'basename':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0xffd2('0x2')]}};
\ No newline at end of file
diff --git a/server/api/attachment/attachment.controller.js b/server/api/attachment/attachment.controller.js
index 34a3ee1..1eb7dad 100644
--- a/server/api/attachment/attachment.controller.js
+++ b/server/api/attachment/attachment.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa7fe=['../../config/utils','../../mysqldb','sendStatus','status','end','offset','limit','undefined','set','apply','reject','save','then','destroy','error','stack','name','send','index','map','fieldName','type','key','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','Attachment','count','includeAll','include','findAll','catch','params','rawAttributes','merge','options','find','get','omit','body','createdAt','updatedAt','create','update','file','basename','mimetype','download','findOne','ChatOfflineMessageId','join','server/files/attachments/','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','querystring','papaparse','ioredis','../../config/license/hardware','../../config/logger','api'];(function(_0x1ccefa,_0x5f0dd9){var _0x2ffc70=function(_0x552c06){while(--_0x552c06){_0x1ccefa['push'](_0x1ccefa['shift']());}};_0x2ffc70(++_0x5f0dd9);}(_0xa7fe,0x142));var _0xea7f=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa7fe[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0xea7f('0x0'));var rimraf=require(_0xea7f('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xea7f('0x2'));var rp=require(_0xea7f('0x3'));var moment=require(_0xea7f('0x4'));var BPromise=require(_0xea7f('0x5'));var Mustache=require(_0xea7f('0x6'));var util=require(_0xea7f('0x7'));var path=require(_0xea7f('0x8'));var sox=require(_0xea7f('0x9'));var csv=require(_0xea7f('0xa'));var ejs=require(_0xea7f('0xb'));var fs=require('fs');var fs_extra=require(_0xea7f('0xc'));var _=require(_0xea7f('0xd'));var squel=require('squel');var crypto=require(_0xea7f('0xe'));var jsforce=require(_0xea7f('0xf'));var deskjs=require('desk.js');var toCsv=require(_0xea7f('0xa'));var querystring=require(_0xea7f('0x10'));var Papa=require(_0xea7f('0x11'));var Redis=require(_0xea7f('0x12'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xea7f('0x13'));var logger=require(_0xea7f('0x14'))(_0xea7f('0x15'));var utils=require(_0xea7f('0x16'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xea7f('0x17'))['db'];function respondWithStatusCode(_0x54d84c,_0x2a3703){_0x2a3703=_0x2a3703||0xcc;return function(_0x154f26){if(_0x154f26){return _0x54d84c[_0xea7f('0x18')](_0x2a3703);}return _0x54d84c[_0xea7f('0x19')](_0x2a3703)[_0xea7f('0x1a')]();};}function respondWithResult(_0x4d20bc,_0x5c5e72){_0x5c5e72=_0x5c5e72||0xc8;return function(_0x13563b){if(_0x13563b){return _0x4d20bc[_0xea7f('0x19')](_0x5c5e72)['json'](_0x13563b);}};}function respondWithFilteredResult(_0x6f833c,_0x2f2d8d){return function(_0x8b9b7e){if(_0x8b9b7e){var _0x19309d=typeof _0x2f2d8d[_0xea7f('0x1b')]==='undefined'&&typeof _0x2f2d8d[_0xea7f('0x1c')]===_0xea7f('0x1d');var _0x515a39=_0x8b9b7e['count'];var _0x33a1ff=_0x19309d?0x0:_0x2f2d8d['offset'];var _0x2862a3=_0x19309d?_0x8b9b7e['count']:_0x2f2d8d[_0xea7f('0x1b')]+_0x2f2d8d[_0xea7f('0x1c')];var _0x515b8d;if(_0x2862a3>=_0x515a39){_0x2862a3=_0x515a39;_0x515b8d=0xc8;}else{_0x515b8d=0xce;}_0x6f833c[_0xea7f('0x19')](_0x515b8d);return _0x6f833c[_0xea7f('0x1e')]('Content-Range',_0x33a1ff+'-'+_0x2862a3+'/'+_0x515a39)['json'](_0x8b9b7e);}return null;};}function patchUpdates(_0x1dc282){return function(_0x4dae2d){try{jsonpatch[_0xea7f('0x1f')](_0x4dae2d,_0x1dc282,!![]);}catch(_0x5498d9){return BPromise[_0xea7f('0x20')](_0x5498d9);}return _0x4dae2d[_0xea7f('0x21')]();};}function saveUpdates(_0x4cdc8d,_0x49059f){return function(_0x2867c2){if(_0x2867c2){return _0x2867c2['update'](_0x4cdc8d)[_0xea7f('0x22')](function(_0x498441){return _0x498441;});}return null;};}function removeEntity(_0x3bd639,_0x5ccd83){return function(_0x1e1989){if(_0x1e1989){return _0x1e1989[_0xea7f('0x23')]()[_0xea7f('0x22')](function(){_0x3bd639['status'](0xcc)[_0xea7f('0x1a')]();});}};}function handleEntityNotFound(_0x139236,_0x42c42f){return function(_0x5814bc){if(!_0x5814bc){_0x139236[_0xea7f('0x18')](0x194);}return _0x5814bc;};}function handleError(_0x3dd0ab,_0x3cb148){_0x3cb148=_0x3cb148||0x1f4;return function(_0x1dc081){logger[_0xea7f('0x24')](_0x1dc081[_0xea7f('0x25')]);if(_0x1dc081[_0xea7f('0x26')]){delete _0x1dc081[_0xea7f('0x26')];}_0x3dd0ab['status'](_0x3cb148)[_0xea7f('0x27')](_0x1dc081);};}exports[_0xea7f('0x28')]=function(_0x2f6049,_0x3db025){var _0x1693f2={},_0x3f7f39={},_0x8061eb={'count':0x0,'rows':[]};var _0x43f960=_[_0xea7f('0x29')](db['Attachment']['rawAttributes'],function(_0x17f1ea){return{'name':_0x17f1ea[_0xea7f('0x2a')],'type':_0x17f1ea[_0xea7f('0x2b')][_0xea7f('0x2c')]};});_0x3f7f39[_0xea7f('0x2d')]=_[_0xea7f('0x29')](_0x43f960,_0xea7f('0x26'));_0x3f7f39['query']=_[_0xea7f('0x2e')](_0x2f6049[_0xea7f('0x2f')]);_0x3f7f39[_0xea7f('0x30')]=_[_0xea7f('0x31')](_0x3f7f39[_0xea7f('0x2d')],_0x3f7f39[_0xea7f('0x2f')]);_0x1693f2[_0xea7f('0x32')]=_[_0xea7f('0x31')](_0x3f7f39[_0xea7f('0x2d')],qs[_0xea7f('0x33')](_0x2f6049[_0xea7f('0x2f')][_0xea7f('0x33')]));_0x1693f2['attributes']=_0x1693f2[_0xea7f('0x32')][_0xea7f('0x34')]?_0x1693f2[_0xea7f('0x32')]:_0x3f7f39[_0xea7f('0x2d')];if(!_0x2f6049[_0xea7f('0x2f')][_0xea7f('0x35')](_0xea7f('0x36'))){_0x1693f2[_0xea7f('0x1c')]=qs['limit'](_0x2f6049[_0xea7f('0x2f')][_0xea7f('0x1c')]);_0x1693f2[_0xea7f('0x1b')]=qs['offset'](_0x2f6049['query'][_0xea7f('0x1b')]);}_0x1693f2[_0xea7f('0x37')]=qs[_0xea7f('0x38')](_0x2f6049[_0xea7f('0x2f')][_0xea7f('0x38')]);_0x1693f2['where']=qs[_0xea7f('0x30')](_[_0xea7f('0x39')](_0x2f6049[_0xea7f('0x2f')],_0x3f7f39[_0xea7f('0x30')]),_0x43f960);if(_0x2f6049[_0xea7f('0x2f')][_0xea7f('0x3a')]){_0x1693f2['where']=_['merge'](_0x1693f2[_0xea7f('0x3b')],{'$or':_['map'](_0x43f960,function(_0x3f3715){if(_0x3f3715['type']!=='VIRTUAL'){var _0x5118da={};_0x5118da[_0x3f3715['name']]={'$like':'%'+_0x2f6049[_0xea7f('0x2f')][_0xea7f('0x3a')]+'%'};return _0x5118da;}})});}_0x1693f2=_['merge']({},_0x1693f2,_0x2f6049['options']);var _0xe41079={'where':_0x1693f2[_0xea7f('0x3b')]};return db[_0xea7f('0x3c')][_0xea7f('0x3d')](_0xe41079)[_0xea7f('0x22')](function(_0x271220){_0x8061eb[_0xea7f('0x3d')]=_0x271220;if(_0x2f6049[_0xea7f('0x2f')][_0xea7f('0x3e')]){_0x1693f2[_0xea7f('0x3f')]=[{'all':!![]}];}return db[_0xea7f('0x3c')][_0xea7f('0x40')](_0x1693f2);})['then'](function(_0x3173ff){_0x8061eb['rows']=_0x3173ff;return _0x8061eb;})['then'](respondWithFilteredResult(_0x3db025,_0x1693f2))[_0xea7f('0x41')](handleError(_0x3db025,null));};exports['show']=function(_0x13a0b9,_0x5a4f5d){var _0x1e0f42={'raw':!![],'where':{'id':_0x13a0b9[_0xea7f('0x42')]['id']}},_0x18b6a4={};_0x18b6a4[_0xea7f('0x2d')]=_[_0xea7f('0x2e')](db[_0xea7f('0x3c')][_0xea7f('0x43')]);_0x18b6a4['query']=_[_0xea7f('0x2e')](_0x13a0b9[_0xea7f('0x2f')]);_0x18b6a4[_0xea7f('0x30')]=_[_0xea7f('0x31')](_0x18b6a4['model'],_0x18b6a4[_0xea7f('0x2f')]);_0x1e0f42[_0xea7f('0x32')]=_[_0xea7f('0x31')](_0x18b6a4[_0xea7f('0x2d')],qs[_0xea7f('0x33')](_0x13a0b9[_0xea7f('0x2f')][_0xea7f('0x33')]));_0x1e0f42[_0xea7f('0x32')]=_0x1e0f42[_0xea7f('0x32')][_0xea7f('0x34')]?_0x1e0f42[_0xea7f('0x32')]:_0x18b6a4[_0xea7f('0x2d')];if(_0x13a0b9['query'][_0xea7f('0x3e')]){_0x1e0f42[_0xea7f('0x3f')]=[{'all':!![]}];}_0x1e0f42=_[_0xea7f('0x44')]({},_0x1e0f42,_0x13a0b9[_0xea7f('0x45')]);return db[_0xea7f('0x3c')]['find'](_0x1e0f42)['then'](handleEntityNotFound(_0x5a4f5d,null))['then'](respondWithResult(_0x5a4f5d,null))[_0xea7f('0x41')](handleError(_0x5a4f5d,null));};exports['clone']=function(_0x3abbae,_0xdbfc0b){var _0x42252a={'where':{'id':_0x3abbae['params']['id']}},_0x23e432={};_0x23e432[_0xea7f('0x2d')]=_['keys'](db[_0xea7f('0x3c')][_0xea7f('0x43')]);_0x42252a['attributes']=_[_0xea7f('0x31')](_0x23e432[_0xea7f('0x2d')],qs[_0xea7f('0x33')](_0x3abbae[_0xea7f('0x2f')][_0xea7f('0x33')]));_0x42252a[_0xea7f('0x32')]=_0x42252a['attributes'][_0xea7f('0x34')]?_0x42252a[_0xea7f('0x32')]:_0x23e432['model'];if(_0x3abbae[_0xea7f('0x2f')]['includeAll']){_0x42252a[_0xea7f('0x3f')]=[{'all':!![]}];}_0x42252a=_['merge']({},_0x42252a,_0x3abbae['options']);return db[_0xea7f('0x3c')][_0xea7f('0x46')](_0x42252a)['then'](handleEntityNotFound(_0xdbfc0b,null))['then'](function(_0x42fb4d){if(_0x42fb4d){var _0x8e1f27=_0x42fb4d[_0xea7f('0x47')]({'plain':!![]});_0x8e1f27=qs[_0xea7f('0x48')](_0x8e1f27,['id','createdAt','updatedAt']);_0x3abbae[_0xea7f('0x49')]=_[_0xea7f('0x48')](_0x3abbae['body'],['id',_0xea7f('0x4a'),_0xea7f('0x4b')]);return db[_0xea7f('0x3c')][_0xea7f('0x4c')](_[_0xea7f('0x44')](_0x8e1f27,_0x3abbae[_0xea7f('0x49')]),{'include':_0x3abbae[_0xea7f('0x2f')][_0xea7f('0x3e')]?[{'all':!![]}]:undefined});}})[_0xea7f('0x22')](respondWithResult(_0xdbfc0b,0xc9))[_0xea7f('0x41')](handleError(_0xdbfc0b,null));};exports[_0xea7f('0x4d')]=function(_0x231a96,_0x1a4b92){if(_0x231a96['body']['id']){delete _0x231a96[_0xea7f('0x49')]['id'];}return db[_0xea7f('0x3c')][_0xea7f('0x46')]({'where':{'id':_0x231a96[_0xea7f('0x42')]['id']}})[_0xea7f('0x22')](handleEntityNotFound(_0x1a4b92,null))[_0xea7f('0x22')](saveUpdates(_0x231a96[_0xea7f('0x49')],null))['then'](respondWithResult(_0x1a4b92,null))[_0xea7f('0x41')](handleError(_0x1a4b92,null));};exports[_0xea7f('0x23')]=function(_0x1a95cc,_0xd1152){return db[_0xea7f('0x3c')][_0xea7f('0x46')]({'where':{'id':_0x1a95cc[_0xea7f('0x42')]['id']}})[_0xea7f('0x22')](handleEntityNotFound(_0xd1152,null))[_0xea7f('0x22')](removeEntity(_0xd1152,null))['catch'](handleError(_0xd1152,null));};exports[_0xea7f('0x4c')]=function(_0x17d89a,_0x3c3c16,_0x22a584){_0x17d89a['body']['name']=_0x17d89a[_0xea7f('0x4e')]['originalname'];_0x17d89a[_0xea7f('0x49')][_0xea7f('0x4f')]=_0x17d89a['file']['filename'];_0x17d89a[_0xea7f('0x49')][_0xea7f('0x2b')]=_0x17d89a[_0xea7f('0x4e')][_0xea7f('0x50')];return db[_0xea7f('0x3c')]['create'](_0x17d89a[_0xea7f('0x49')])[_0xea7f('0x22')](respondWithResult(_0x3c3c16,0xc9))[_0xea7f('0x41')](handleError(_0x3c3c16,null));};exports[_0xea7f('0x51')]=function(_0x651b4d,_0x5445b6,_0x405650){return db['Attachment'][_0xea7f('0x52')]({'where':{'id':_0x651b4d['params']['id']},'raw':!![]})[_0xea7f('0x22')](handleEntityNotFound(_0x5445b6,null))['then'](function(_0x33c5c0){if(_0x33c5c0){var _0x347223=_0x33c5c0[_0xea7f('0x53')]!==null;var _0x161fa7=path[_0xea7f('0x54')](config['root'],_0xea7f('0x55'));if(_0x347223){_0x161fa7=path[_0xea7f('0x54')](_0x161fa7,'offline-chat/');}var _0x55fe00=path[_0xea7f('0x54')](_0x161fa7,_0x33c5c0[_0xea7f('0x4f')]);return _0x5445b6[_0xea7f('0x51')](_0x55fe00);}})[_0xea7f('0x41')](handleError(_0x5445b6,null));};
\ No newline at end of file
+var _0xa7c4=['crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','end','json','offset','undefined','count','set','Content-Range','reject','save','update','then','error','stack','name','send','map','Attachment','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','merge','VIRTUAL','filter','includeAll','include','findAll','catch','params','fields','options','find','clone','get','omit','createdAt','updatedAt','body','create','originalname','file','mimetype','ChatOfflineMessageId','server/files/attachments/','join','download','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','fs-extra','lodash','squel'];(function(_0x363789,_0x285ecd){var _0x129141=function(_0x38c792){while(--_0x38c792){_0x363789['push'](_0x363789['shift']());}};_0x129141(++_0x285ecd);}(_0xa7c4,0x1ac));var _0x4a7c=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa7c4[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x4a7c('0x0'));var rimraf=require(_0x4a7c('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x4a7c('0x2'));var rp=require(_0x4a7c('0x3'));var moment=require(_0x4a7c('0x4'));var BPromise=require(_0x4a7c('0x5'));var Mustache=require(_0x4a7c('0x6'));var util=require(_0x4a7c('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0x4a7c('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x4a7c('0x9'));var _=require(_0x4a7c('0xa'));var squel=require(_0x4a7c('0xb'));var crypto=require(_0x4a7c('0xc'));var jsforce=require(_0x4a7c('0xd'));var deskjs=require(_0x4a7c('0xe'));var toCsv=require('to-csv');var querystring=require(_0x4a7c('0xf'));var Papa=require(_0x4a7c('0x10'));var Redis=require(_0x4a7c('0x11'));var authService=require(_0x4a7c('0x12'));var qs=require(_0x4a7c('0x13'));var as=require(_0x4a7c('0x14'));var hardwareService=require(_0x4a7c('0x15'));var logger=require(_0x4a7c('0x16'))(_0x4a7c('0x17'));var utils=require(_0x4a7c('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0x4a7c('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x206795,_0x991f8f){_0x991f8f=_0x991f8f||0xcc;return function(_0x50a600){if(_0x50a600){return _0x206795[_0x4a7c('0x1a')](_0x991f8f);}return _0x206795[_0x4a7c('0x1b')](_0x991f8f)[_0x4a7c('0x1c')]();};}function respondWithResult(_0x4abd95,_0x4ef7fb){_0x4ef7fb=_0x4ef7fb||0xc8;return function(_0x23fead){if(_0x23fead){return _0x4abd95[_0x4a7c('0x1b')](_0x4ef7fb)[_0x4a7c('0x1d')](_0x23fead);}};}function respondWithFilteredResult(_0x2c77cc,_0x50f592){return function(_0xf822af){if(_0xf822af){var _0x57cec6=typeof _0x50f592[_0x4a7c('0x1e')]===_0x4a7c('0x1f')&&typeof _0x50f592['limit']===_0x4a7c('0x1f');var _0xac751c=_0xf822af[_0x4a7c('0x20')];var _0x5a8ba3=_0x57cec6?0x0:_0x50f592['offset'];var _0xe13446=_0x57cec6?_0xf822af[_0x4a7c('0x20')]:_0x50f592['offset']+_0x50f592['limit'];var _0x10a4b0;if(_0xe13446>=_0xac751c){_0xe13446=_0xac751c;_0x10a4b0=0xc8;}else{_0x10a4b0=0xce;}_0x2c77cc['status'](_0x10a4b0);return _0x2c77cc[_0x4a7c('0x21')](_0x4a7c('0x22'),_0x5a8ba3+'-'+_0xe13446+'/'+_0xac751c)[_0x4a7c('0x1d')](_0xf822af);}return null;};}function patchUpdates(_0x125b4a){return function(_0x59232e){try{jsonpatch['apply'](_0x59232e,_0x125b4a,!![]);}catch(_0x14eac8){return BPromise[_0x4a7c('0x23')](_0x14eac8);}return _0x59232e[_0x4a7c('0x24')]();};}function saveUpdates(_0x55bf1a,_0x560a42){return function(_0x15516a){if(_0x15516a){return _0x15516a[_0x4a7c('0x25')](_0x55bf1a)[_0x4a7c('0x26')](function(_0x2968a0){return _0x2968a0;});}return null;};}function removeEntity(_0x33aefe,_0x277c53){return function(_0x2278b1){if(_0x2278b1){return _0x2278b1['destroy']()[_0x4a7c('0x26')](function(){_0x33aefe[_0x4a7c('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x39a06a,_0x70ddb3){return function(_0x5dc3f6){if(!_0x5dc3f6){_0x39a06a[_0x4a7c('0x1a')](0x194);}return _0x5dc3f6;};}function handleError(_0x3ddb54,_0xe3e136){_0xe3e136=_0xe3e136||0x1f4;return function(_0x5b4535){logger[_0x4a7c('0x27')](_0x5b4535[_0x4a7c('0x28')]);if(_0x5b4535[_0x4a7c('0x29')]){delete _0x5b4535[_0x4a7c('0x29')];}_0x3ddb54[_0x4a7c('0x1b')](_0xe3e136)[_0x4a7c('0x2a')](_0x5b4535);};}exports['index']=function(_0x2b1b28,_0x54b07d){var _0x210817={},_0x5dcb2e={},_0x1028a4={'count':0x0,'rows':[]};var _0x43d743=_[_0x4a7c('0x2b')](db[_0x4a7c('0x2c')][_0x4a7c('0x2d')],function(_0x3057cb){return{'name':_0x3057cb[_0x4a7c('0x2e')],'type':_0x3057cb[_0x4a7c('0x2f')][_0x4a7c('0x30')]};});_0x5dcb2e[_0x4a7c('0x31')]=_[_0x4a7c('0x2b')](_0x43d743,_0x4a7c('0x29'));_0x5dcb2e[_0x4a7c('0x32')]=_[_0x4a7c('0x33')](_0x2b1b28[_0x4a7c('0x32')]);_0x5dcb2e[_0x4a7c('0x34')]=_[_0x4a7c('0x35')](_0x5dcb2e[_0x4a7c('0x31')],_0x5dcb2e[_0x4a7c('0x32')]);_0x210817['attributes']=_['intersection'](_0x5dcb2e['model'],qs['fields'](_0x2b1b28['query']['fields']));_0x210817[_0x4a7c('0x36')]=_0x210817[_0x4a7c('0x36')][_0x4a7c('0x37')]?_0x210817[_0x4a7c('0x36')]:_0x5dcb2e[_0x4a7c('0x31')];if(!_0x2b1b28[_0x4a7c('0x32')][_0x4a7c('0x38')](_0x4a7c('0x39'))){_0x210817[_0x4a7c('0x3a')]=qs['limit'](_0x2b1b28['query']['limit']);_0x210817[_0x4a7c('0x1e')]=qs[_0x4a7c('0x1e')](_0x2b1b28[_0x4a7c('0x32')][_0x4a7c('0x1e')]);}_0x210817[_0x4a7c('0x3b')]=qs[_0x4a7c('0x3c')](_0x2b1b28[_0x4a7c('0x32')][_0x4a7c('0x3c')]);_0x210817[_0x4a7c('0x3d')]=qs[_0x4a7c('0x34')](_[_0x4a7c('0x3e')](_0x2b1b28[_0x4a7c('0x32')],_0x5dcb2e['filters']),_0x43d743);if(_0x2b1b28[_0x4a7c('0x32')]['filter']){_0x210817['where']=_[_0x4a7c('0x3f')](_0x210817[_0x4a7c('0x3d')],{'$or':_[_0x4a7c('0x2b')](_0x43d743,function(_0x39f22b){if(_0x39f22b['type']!==_0x4a7c('0x40')){var _0x23e611={};_0x23e611[_0x39f22b[_0x4a7c('0x29')]]={'$like':'%'+_0x2b1b28[_0x4a7c('0x32')][_0x4a7c('0x41')]+'%'};return _0x23e611;}})});}_0x210817=_[_0x4a7c('0x3f')]({},_0x210817,_0x2b1b28['options']);var _0x45652a={'where':_0x210817[_0x4a7c('0x3d')]};return db[_0x4a7c('0x2c')][_0x4a7c('0x20')](_0x45652a)[_0x4a7c('0x26')](function(_0x69f34e){_0x1028a4[_0x4a7c('0x20')]=_0x69f34e;if(_0x2b1b28[_0x4a7c('0x32')][_0x4a7c('0x42')]){_0x210817[_0x4a7c('0x43')]=[{'all':!![]}];}return db[_0x4a7c('0x2c')][_0x4a7c('0x44')](_0x210817);})[_0x4a7c('0x26')](function(_0x38ac1e){_0x1028a4['rows']=_0x38ac1e;return _0x1028a4;})[_0x4a7c('0x26')](respondWithFilteredResult(_0x54b07d,_0x210817))[_0x4a7c('0x45')](handleError(_0x54b07d,null));};exports['show']=function(_0x5dd955,_0x265c75){var _0x5288c3={'raw':!![],'where':{'id':_0x5dd955[_0x4a7c('0x46')]['id']}},_0x206192={};_0x206192[_0x4a7c('0x31')]=_[_0x4a7c('0x33')](db[_0x4a7c('0x2c')][_0x4a7c('0x2d')]);_0x206192[_0x4a7c('0x32')]=_['keys'](_0x5dd955[_0x4a7c('0x32')]);_0x206192[_0x4a7c('0x34')]=_[_0x4a7c('0x35')](_0x206192['model'],_0x206192[_0x4a7c('0x32')]);_0x5288c3[_0x4a7c('0x36')]=_[_0x4a7c('0x35')](_0x206192[_0x4a7c('0x31')],qs['fields'](_0x5dd955[_0x4a7c('0x32')][_0x4a7c('0x47')]));_0x5288c3[_0x4a7c('0x36')]=_0x5288c3['attributes']['length']?_0x5288c3[_0x4a7c('0x36')]:_0x206192['model'];if(_0x5dd955['query']['includeAll']){_0x5288c3['include']=[{'all':!![]}];}_0x5288c3=_[_0x4a7c('0x3f')]({},_0x5288c3,_0x5dd955[_0x4a7c('0x48')]);return db['Attachment'][_0x4a7c('0x49')](_0x5288c3)[_0x4a7c('0x26')](handleEntityNotFound(_0x265c75,null))[_0x4a7c('0x26')](respondWithResult(_0x265c75,null))[_0x4a7c('0x45')](handleError(_0x265c75,null));};exports[_0x4a7c('0x4a')]=function(_0x10ae40,_0x4ef1b4){var _0x2dc01d={'where':{'id':_0x10ae40[_0x4a7c('0x46')]['id']}},_0x1cc515={};_0x1cc515[_0x4a7c('0x31')]=_[_0x4a7c('0x33')](db[_0x4a7c('0x2c')][_0x4a7c('0x2d')]);_0x2dc01d[_0x4a7c('0x36')]=_[_0x4a7c('0x35')](_0x1cc515[_0x4a7c('0x31')],qs[_0x4a7c('0x47')](_0x10ae40[_0x4a7c('0x32')][_0x4a7c('0x47')]));_0x2dc01d[_0x4a7c('0x36')]=_0x2dc01d[_0x4a7c('0x36')][_0x4a7c('0x37')]?_0x2dc01d[_0x4a7c('0x36')]:_0x1cc515['model'];if(_0x10ae40[_0x4a7c('0x32')]['includeAll']){_0x2dc01d[_0x4a7c('0x43')]=[{'all':!![]}];}_0x2dc01d=_[_0x4a7c('0x3f')]({},_0x2dc01d,_0x10ae40['options']);return db['Attachment'][_0x4a7c('0x49')](_0x2dc01d)['then'](handleEntityNotFound(_0x4ef1b4,null))[_0x4a7c('0x26')](function(_0x1d9536){if(_0x1d9536){var _0x134567=_0x1d9536[_0x4a7c('0x4b')]({'plain':!![]});_0x134567=qs[_0x4a7c('0x4c')](_0x134567,['id',_0x4a7c('0x4d'),_0x4a7c('0x4e')]);_0x10ae40[_0x4a7c('0x4f')]=_['omit'](_0x10ae40[_0x4a7c('0x4f')],['id','createdAt','updatedAt']);return db[_0x4a7c('0x2c')][_0x4a7c('0x50')](_[_0x4a7c('0x3f')](_0x134567,_0x10ae40[_0x4a7c('0x4f')]),{'include':_0x10ae40[_0x4a7c('0x32')][_0x4a7c('0x42')]?[{'all':!![]}]:undefined});}})[_0x4a7c('0x26')](respondWithResult(_0x4ef1b4,0xc9))['catch'](handleError(_0x4ef1b4,null));};exports[_0x4a7c('0x25')]=function(_0x1b063d,_0x286cd5){if(_0x1b063d[_0x4a7c('0x4f')]['id']){delete _0x1b063d['body']['id'];}return db[_0x4a7c('0x2c')][_0x4a7c('0x49')]({'where':{'id':_0x1b063d['params']['id']}})[_0x4a7c('0x26')](handleEntityNotFound(_0x286cd5,null))[_0x4a7c('0x26')](saveUpdates(_0x1b063d[_0x4a7c('0x4f')],null))[_0x4a7c('0x26')](respondWithResult(_0x286cd5,null))['catch'](handleError(_0x286cd5,null));};exports['destroy']=function(_0x21e756,_0x26f54e){return db[_0x4a7c('0x2c')][_0x4a7c('0x49')]({'where':{'id':_0x21e756[_0x4a7c('0x46')]['id']}})[_0x4a7c('0x26')](handleEntityNotFound(_0x26f54e,null))['then'](removeEntity(_0x26f54e,null))['catch'](handleError(_0x26f54e,null));};exports['create']=function(_0x243ec5,_0x15ebbc,_0x2c05c0){_0x243ec5['body']['name']=_0x243ec5['file'][_0x4a7c('0x51')];_0x243ec5[_0x4a7c('0x4f')]['basename']=_0x243ec5[_0x4a7c('0x52')]['filename'];_0x243ec5['body'][_0x4a7c('0x2f')]=_0x243ec5[_0x4a7c('0x52')][_0x4a7c('0x53')];return db[_0x4a7c('0x2c')]['create'](_0x243ec5[_0x4a7c('0x4f')])[_0x4a7c('0x26')](respondWithResult(_0x15ebbc,0xc9))[_0x4a7c('0x45')](handleError(_0x15ebbc,null));};exports['download']=function(_0x5f57e5,_0x301215,_0x239972){return db[_0x4a7c('0x2c')]['findOne']({'where':{'id':_0x5f57e5[_0x4a7c('0x46')]['id']},'raw':!![]})['then'](handleEntityNotFound(_0x301215,null))['then'](function(_0x6d71e8){if(_0x6d71e8){var _0x12d972=_0x6d71e8[_0x4a7c('0x54')]!==null;var _0x254056=path['join'](config['root'],_0x4a7c('0x55'));if(_0x12d972){_0x254056=path[_0x4a7c('0x56')](_0x254056,'offline-chat/');}var _0x24468a=path[_0x4a7c('0x56')](_0x254056,_0x6d71e8['basename']);return _0x301215[_0x4a7c('0x57')](_0x24468a);}})['catch'](handleError(_0x301215,null));};
\ No newline at end of file
diff --git a/server/api/attachment/attachment.model.js b/server/api/attachment/attachment.model.js
index a816fc3..c5eb2bc 100644
--- a/server/api/attachment/attachment.model.js
+++ b/server/api/attachment/attachment.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x87a2=['exports','define','Attachment','attachments','lodash','util','api','moment','bluebird','rimraf'];(function(_0x4eb832,_0x324bff){var _0x2e5927=function(_0x4687ce){while(--_0x4687ce){_0x4eb832['push'](_0x4eb832['shift']());}};_0x2e5927(++_0x324bff);}(_0x87a2,0xcc));var _0x287a=function(_0x2a453b,_0x479c50){_0x2a453b=_0x2a453b-0x0;var _0x132f79=_0x87a2[_0x2a453b];return _0x132f79;};'use strict';var _=require(_0x287a('0x0'));var util=require(_0x287a('0x1'));var logger=require('../../config/logger')(_0x287a('0x2'));var moment=require(_0x287a('0x3'));var BPromise=require(_0x287a('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x287a('0x5'));var config=require('../../config/environment');var attributes=require('./attachment.attributes');module[_0x287a('0x6')]=function(_0x92d3d5,_0x4b1f9d){return _0x92d3d5[_0x287a('0x7')](_0x287a('0x8'),attributes,{'tableName':_0x287a('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc0b8=['bluebird','path','rimraf','../../config/environment','./attachment.attributes','Attachment','attachments','lodash','util','../../config/logger','api','moment'];(function(_0x3a6ec0,_0x39220a){var _0x336102=function(_0x496e14){while(--_0x496e14){_0x3a6ec0['push'](_0x3a6ec0['shift']());}};_0x336102(++_0x39220a);}(_0xc0b8,0x1f3));var _0x8c0b=function(_0x3a27cb,_0x361775){_0x3a27cb=_0x3a27cb-0x0;var _0x3aa498=_0xc0b8[_0x3a27cb];return _0x3aa498;};'use strict';var _=require(_0x8c0b('0x0'));var util=require(_0x8c0b('0x1'));var logger=require(_0x8c0b('0x2'))(_0x8c0b('0x3'));var moment=require(_0x8c0b('0x4'));var BPromise=require(_0x8c0b('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x8c0b('0x6'));var rimraf=require(_0x8c0b('0x7'));var config=require(_0x8c0b('0x8'));var attributes=require(_0x8c0b('0x9'));module['exports']=function(_0x493937,_0x913fc9){return _0x493937['define'](_0x8c0b('0xa'),attributes,{'tableName':_0x8c0b('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/attachment/attachment.rpc.js b/server/api/attachment/attachment.rpc.js
index c3e7fd0..bc2cad4 100644
--- a/server/api/attachment/attachment.rpc.js
+++ b/server/api/attachment/attachment.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4d46=['debug','Attachment,\x20%s,\x20%s,\x20%s','stringify','error','code','message','Attachment,\x20%s,\x20%s','info','result','catch','Attachment','create','body','options','raw','then','CreateAttachment','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request\x20sent'];(function(_0x1d6cb8,_0x31a3f3){var _0x38a43f=function(_0x4ef6bd){while(--_0x4ef6bd){_0x1d6cb8['push'](_0x1d6cb8['shift']());}};_0x38a43f(++_0x31a3f3);}(_0x4d46,0x197));var _0x64d4=function(_0x913c5f,_0x1d68db){_0x913c5f=_0x913c5f-0x0;var _0xe39136=_0x4d46[_0x913c5f];return _0xe39136;};'use strict';var _=require(_0x64d4('0x0'));var util=require(_0x64d4('0x1'));var moment=require(_0x64d4('0x2'));var BPromise=require(_0x64d4('0x3'));var rs=require(_0x64d4('0x4'));var fs=require('fs');var Redis=require(_0x64d4('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x64d4('0x6'));var logger=require(_0x64d4('0x7'))(_0x64d4('0x8'));var config=require(_0x64d4('0x9'));var jayson=require(_0x64d4('0xa'));var client=jayson[_0x64d4('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x321a51,_0x33b72d,_0x51faf7){return new BPromise(function(_0x45158d,_0x34d00a){return client['request'](_0x321a51,_0x51faf7)['then'](function(_0x4d9e23){logger['info']('Attachment,\x20%s,\x20%s',_0x33b72d,_0x64d4('0xc'));logger[_0x64d4('0xd')](_0x64d4('0xe'),_0x33b72d,_0x64d4('0xc'),JSON[_0x64d4('0xf')](_0x4d9e23));if(_0x4d9e23[_0x64d4('0x10')]){if(_0x4d9e23[_0x64d4('0x10')][_0x64d4('0x11')]===0x1f4){logger[_0x64d4('0x10')]('Attachment,\x20%s,\x20%s',_0x33b72d,_0x4d9e23[_0x64d4('0x10')]['message']);return _0x34d00a(_0x4d9e23[_0x64d4('0x10')][_0x64d4('0x12')]);}logger[_0x64d4('0x10')](_0x64d4('0x13'),_0x33b72d,_0x4d9e23[_0x64d4('0x10')][_0x64d4('0x12')]);return _0x45158d(_0x4d9e23['error'][_0x64d4('0x12')]);}else{logger[_0x64d4('0x14')](_0x64d4('0x13'),_0x33b72d,_0x64d4('0xc'));_0x45158d(_0x4d9e23[_0x64d4('0x15')][_0x64d4('0x12')]);}})[_0x64d4('0x16')](function(_0x4b3335){logger[_0x64d4('0x10')](_0x64d4('0x13'),_0x33b72d,_0x4b3335);_0x34d00a(_0x4b3335);});});}exports['CreateAttachment']=function(_0x1bbaf0){var _0x155b60=this;return new Promise(function(_0x13900e,_0xe79978){return db[_0x64d4('0x17')][_0x64d4('0x18')](_0x1bbaf0[_0x64d4('0x19')],{'raw':_0x1bbaf0[_0x64d4('0x1a')]?_0x1bbaf0['options'][_0x64d4('0x1b')]===undefined?!![]:![]:!![]})[_0x64d4('0x1c')](function(_0x35ee04){logger[_0x64d4('0x14')]('CreateAttachment',_0x1bbaf0);logger['debug'](_0x64d4('0x1d'),_0x1bbaf0,JSON[_0x64d4('0xf')](_0x35ee04));_0x13900e(_0x35ee04);})[_0x64d4('0x16')](function(_0x4c0b0b){logger[_0x64d4('0x10')](_0x64d4('0x1d'),_0x4c0b0b[_0x64d4('0x12')],_0x1bbaf0);_0xe79978(_0x155b60[_0x64d4('0x10')](0x1f4,_0x4c0b0b[_0x64d4('0x12')]));});});};
\ No newline at end of file
+var _0x1094=['create','body','options','raw','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','debug','request\x20sent','stringify','error','code','Attachment,\x20%s,\x20%s','message','result','catch','CreateAttachment','Attachment'];(function(_0x398256,_0x4e19cc){var _0x4af8a9=function(_0x1b497c){while(--_0x1b497c){_0x398256['push'](_0x398256['shift']());}};_0x4af8a9(++_0x4e19cc);}(_0x1094,0x143));var _0x4109=function(_0x5c1345,_0x40116e){_0x5c1345=_0x5c1345-0x0;var _0x1c070d=_0x1094[_0x5c1345];return _0x1c070d;};'use strict';var _=require(_0x4109('0x0'));var util=require(_0x4109('0x1'));var moment=require('moment');var BPromise=require(_0x4109('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4109('0x3'));var db=require(_0x4109('0x4'))['db'];var utils=require(_0x4109('0x5'));var logger=require(_0x4109('0x6'))(_0x4109('0x7'));var config=require('../../config/environment');var jayson=require(_0x4109('0x8'));var client=jayson[_0x4109('0x9')][_0x4109('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x36c3e9,_0xd2df16,_0x2c34f){return new BPromise(function(_0x5512e8,_0x5b4ecf){return client[_0x4109('0xb')](_0x36c3e9,_0x2c34f)[_0x4109('0xc')](function(_0x2fa1d8){logger[_0x4109('0xd')]('Attachment,\x20%s,\x20%s',_0xd2df16,'request\x20sent');logger[_0x4109('0xe')]('Attachment,\x20%s,\x20%s,\x20%s',_0xd2df16,_0x4109('0xf'),JSON[_0x4109('0x10')](_0x2fa1d8));if(_0x2fa1d8[_0x4109('0x11')]){if(_0x2fa1d8['error'][_0x4109('0x12')]===0x1f4){logger[_0x4109('0x11')](_0x4109('0x13'),_0xd2df16,_0x2fa1d8[_0x4109('0x11')][_0x4109('0x14')]);return _0x5b4ecf(_0x2fa1d8['error'][_0x4109('0x14')]);}logger[_0x4109('0x11')](_0x4109('0x13'),_0xd2df16,_0x2fa1d8[_0x4109('0x11')]['message']);return _0x5512e8(_0x2fa1d8['error'][_0x4109('0x14')]);}else{logger[_0x4109('0xd')](_0x4109('0x13'),_0xd2df16,_0x4109('0xf'));_0x5512e8(_0x2fa1d8[_0x4109('0x15')][_0x4109('0x14')]);}})[_0x4109('0x16')](function(_0x3c6542){logger['error']('Attachment,\x20%s,\x20%s',_0xd2df16,_0x3c6542);_0x5b4ecf(_0x3c6542);});});}exports[_0x4109('0x17')]=function(_0x328f1c){var _0x6945ae=this;return new Promise(function(_0x2e3fd6,_0x415e48){return db[_0x4109('0x18')][_0x4109('0x19')](_0x328f1c[_0x4109('0x1a')],{'raw':_0x328f1c[_0x4109('0x1b')]?_0x328f1c['options'][_0x4109('0x1c')]===undefined?!![]:![]:!![]})[_0x4109('0xc')](function(_0x5cde5d){logger[_0x4109('0xd')](_0x4109('0x17'),_0x328f1c);logger['debug']('CreateAttachment',_0x328f1c,JSON[_0x4109('0x10')](_0x5cde5d));_0x2e3fd6(_0x5cde5d);})['catch'](function(_0x369de0){logger[_0x4109('0x11')](_0x4109('0x17'),_0x369de0[_0x4109('0x14')],_0x328f1c);_0x415e48(_0x6945ae['error'](0x1f4,_0x369de0[_0x4109('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/attachment/index.js b/server/api/attachment/index.js
index b8c2ca9..874361e 100644
--- a/server/api/attachment/index.js
+++ b/server/api/attachment/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5f66=['fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','/:id','show','/:id/download','/:id/clone','clone','diskStorage','root','format','%s-%s','now','originalname','replace','post','single','file','create','delete','destroy','exports','util','connect-timeout','express','Router'];(function(_0x3ccdf8,_0x584ceb){var _0x243dab=function(_0x1a90d1){while(--_0x1a90d1){_0x3ccdf8['push'](_0x3ccdf8['shift']());}};_0x243dab(++_0x584ceb);}(_0x5f66,0x1a0));var _0x65f6=function(_0x580576,_0x2f107d){_0x580576=_0x580576-0x0;var _0x3f55a0=_0x5f66[_0x580576];return _0x3f55a0;};'use strict';var multer=require('multer');var util=require(_0x65f6('0x0'));var path=require('path');var timeout=require(_0x65f6('0x1'));var express=require(_0x65f6('0x2'));var router=express[_0x65f6('0x3')]();var fs_extra=require(_0x65f6('0x4'));var auth=require(_0x65f6('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x65f6('0x6'));var controller=require('./attachment.controller');router[_0x65f6('0x7')]('/',auth[_0x65f6('0x8')](),controller['index']);router['get'](_0x65f6('0x9'),auth[_0x65f6('0x8')](),controller[_0x65f6('0xa')]);router[_0x65f6('0x7')](_0x65f6('0xb'),auth[_0x65f6('0x8')](),controller['download']);router['post'](_0x65f6('0xc'),auth[_0x65f6('0x8')](),controller[_0x65f6('0xd')]);var upload=multer({'storage':multer[_0x65f6('0xe')]({'destination':function(_0x50d26d,_0x41a7fd,_0x571436){_0x571436(null,path['join'](config[_0x65f6('0xf')],'server/files/attachments/'));},'filename':function(_0x419819,_0x4862a5,_0x2f964a){_0x2f964a(null,util[_0x65f6('0x10')](_0x65f6('0x11'),Date[_0x65f6('0x12')](),_0x4862a5[_0x65f6('0x13')][_0x65f6('0x14')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x65f6('0x15')]('/',upload[_0x65f6('0x16')](_0x65f6('0x17')),controller[_0x65f6('0x18')]);router['put'](_0x65f6('0x9'),auth['isAuthenticated'](),controller['update']);router[_0x65f6('0x19')](_0x65f6('0x9'),auth[_0x65f6('0x8')](),controller[_0x65f6('0x1a')]);module[_0x65f6('0x1b')]=router;
\ No newline at end of file
+var _0x757a=['put','/:id','update','delete','destroy','exports','util','path','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./attachment.controller','get','index','isAuthenticated','show','/:id/download','post','/:id/clone','clone','diskStorage','%s-%s','replace','single','file','create'];(function(_0x45e329,_0x29482f){var _0x31282b=function(_0x4e6609){while(--_0x4e6609){_0x45e329['push'](_0x45e329['shift']());}};_0x31282b(++_0x29482f);}(_0x757a,0xde));var _0xa757=function(_0x20de4e,_0x468e68){_0x20de4e=_0x20de4e-0x0;var _0x2228d0=_0x757a[_0x20de4e];return _0x2228d0;};'use strict';var multer=require('multer');var util=require(_0xa757('0x0'));var path=require(_0xa757('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0xa757('0x2'));var auth=require(_0xa757('0x3'));var interaction=require(_0xa757('0x4'));var config=require(_0xa757('0x5'));var controller=require(_0xa757('0x6'));router[_0xa757('0x7')]('/',auth['isAuthenticated'](),controller[_0xa757('0x8')]);router[_0xa757('0x7')]('/:id',auth[_0xa757('0x9')](),controller[_0xa757('0xa')]);router[_0xa757('0x7')](_0xa757('0xb'),auth[_0xa757('0x9')](),controller['download']);router[_0xa757('0xc')](_0xa757('0xd'),auth[_0xa757('0x9')](),controller[_0xa757('0xe')]);var upload=multer({'storage':multer[_0xa757('0xf')]({'destination':function(_0x188ad5,_0x17408b,_0x483d77){_0x483d77(null,path['join'](config['root'],'server/files/attachments/'));},'filename':function(_0x4db68e,_0x421040,_0x544b45){_0x544b45(null,util['format'](_0xa757('0x10'),Date['now'](),_0x421040['originalname'][_0xa757('0x11')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xa757('0xc')]('/',upload[_0xa757('0x12')](_0xa757('0x13')),controller[_0xa757('0x14')]);router[_0xa757('0x15')](_0xa757('0x16'),auth[_0xa757('0x9')](),controller[_0xa757('0x17')]);router[_0xa757('0x18')]('/:id',auth[_0xa757('0x9')](),controller[_0xa757('0x19')]);module[_0xa757('0x1a')]=router;
\ No newline at end of file
diff --git a/server/api/authActiveDirectory/authActiveDirectory.controller.js b/server/api/authActiveDirectory/authActiveDirectory.controller.js
index 8759314..ff46bdb 100644
--- a/server/api/authActiveDirectory/authActiveDirectory.controller.js
+++ b/server/api/authActiveDirectory/authActiveDirectory.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6fe4=['minutes','clearBlockUser','getLicense','catch','status','send','message','ad-login','Something\x20went\x20wrong,\x20please\x20try\x20again.','json','use','User','passport','passport-local','Strategy','moment','activedirectory2','bluebird','util','../../mysqldb','../../components/auth/service','../../config/environment','undefined','activedirectory','url','domain','authenticate','error','Error\x20authenticate\x20%s:\x20%s','inspect','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','Error\x20authenticate\x20%s:\x20Wrong\x20credentials','Setting','adSsoEnabled','blockDuration','then','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20enabled','findOne','name','password','role','disabled','online','admin','agent','blocked','blockedAt'];(function(_0x46aff0,_0x122890){var _0x9d78cf=function(_0x3f14cb){while(--_0x3f14cb){_0x46aff0['push'](_0x46aff0['shift']());}};_0x9d78cf(++_0x122890);}(_0x6fe4,0xc8));var _0x46fe=function(_0x2c1f4f,_0xa3c2c8){_0x2c1f4f=_0x2c1f4f-0x0;var _0x957b1a=_0x6fe4[_0x2c1f4f];return _0x957b1a;};'use strict';var passport=require(_0x46fe('0x0'));var LocalStrategy=require(_0x46fe('0x1'))[_0x46fe('0x2')];var moment=require(_0x46fe('0x3'));var ActiveDirectory=require(_0x46fe('0x4'));var BPromise=require(_0x46fe('0x5'));var util=require(_0x46fe('0x6'));var db=require(_0x46fe('0x7'))['db'];var authService=require(_0x46fe('0x8'));var utils=require('../../config/utils');var config=require(_0x46fe('0x9'));var logger=require('../../config/logger')('api');function isActiveDirectoryConfigured(_0x4a212f){var _0x240d2d=![];if(typeof _0x4a212f['activedirectory']!==_0x46fe('0xa')){_0x240d2d=_0x4a212f[_0x46fe('0xb')]['baseDN']&&_0x4a212f[_0x46fe('0xb')][_0x46fe('0xc')]&&_0x4a212f[_0x46fe('0xb')][_0x46fe('0xd')];}return _0x240d2d;}function adAuthenticate(_0x2154ea,_0xebbc1b,_0x24689f){return new BPromise(function(_0x35c2ff,_0x40501a){try{var _0x5991b1=new ActiveDirectory(_0x2154ea);_0x5991b1[_0x46fe('0xe')](_0xebbc1b,_0x24689f,function(_0x3e61d4,_0x367352){if(_0x3e61d4){logger[_0x46fe('0xf')](_0x46fe('0x10'),_0xebbc1b,util[_0x46fe('0x11')](_0x3e61d4,{'showHidden':![],'depth':null}));_0x40501a(_0x46fe('0x12'));}else if(!_0x367352){logger[_0x46fe('0xf')](_0x46fe('0x13'),_0xebbc1b);_0x40501a(_0x46fe('0x12'));}else{_0x35c2ff(_0x367352);}});}catch(_0x572b9e){_0x40501a(_0x572b9e);}});}function ActiveDirectoryAuthenticate(_0x3d40d9,_0x55dbf4,_0x281bbb,_0xfe22bd){var _0x13dec3,_0x2a7646;if(!isActiveDirectoryConfigured(config)){logger[_0x46fe('0xf')]('Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20configured',_0x55dbf4);return _0xfe22bd(null,![],{'message':_0x46fe('0x12')});}return db[_0x46fe('0x14')]['findOne']({'where':{'id':0x1},'attributes':[_0x46fe('0x15'),_0x46fe('0x16')],'raw':!![]})[_0x46fe('0x17')](function(_0x4a92d6){_0x13dec3=_0x4a92d6;if(!_0x13dec3[_0x46fe('0x15')]){logger[_0x46fe('0xf')](_0x46fe('0x18'),_0x55dbf4);throw new Error(_0x46fe('0x12'));}return _0x3d40d9[_0x46fe('0x19')]({'attributes':['id',_0x46fe('0x1a'),_0x46fe('0x1b'),'salt',_0x46fe('0x1c'),_0x46fe('0x1d'),'blocked','blockedAt',_0x46fe('0x1e')],'where':{'name':_0x55dbf4,'role':{'$or':[_0x46fe('0x1f'),'user',_0x46fe('0x20')]},'adSsoEnabled':!![]}});})[_0x46fe('0x17')](function(_0x24ace7){if(!_0x24ace7||_0x24ace7&&_0x24ace7['name']!==_0x55dbf4){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}_0x2a7646=_0x24ace7;var _0x5a736b=_0x2a7646[_0x46fe('0x1a')]+'@'+config[_0x46fe('0xb')][_0x46fe('0xd')];return adAuthenticate(config['activedirectory'],_0x5a736b,_0x281bbb);})[_0x46fe('0x17')](function(_0x110ab8){if(_0x2a7646['disabled']){throw new Error(_0x46fe('0x12'));}if(_0x13dec3[_0x46fe('0x16')]>0x0){if(_0x2a7646[_0x46fe('0x21')]){if(moment(_0x2a7646[_0x46fe('0x22')])['add'](_0x13dec3[_0x46fe('0x16')],_0x46fe('0x23'))>moment()){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}return utils[_0x46fe('0x24')](_0x2a7646,0x0,![],null)[_0x46fe('0x17')](function(){return utils[_0x46fe('0x25')](_0x2a7646);})['then'](function(){return _0xfe22bd(null,_0x2a7646);});}else{return utils[_0x46fe('0x25')](_0x2a7646)[_0x46fe('0x17')](function(){return _0xfe22bd(null,_0x2a7646);});}}else{return utils[_0x46fe('0x25')](_0x2a7646)['then'](function(){return _0xfe22bd(null,_0x2a7646);});}})[_0x46fe('0x26')](function(_0x7ac065){return _0xfe22bd(null,![],_0x7ac065);});}function handleError(_0x1dd469,_0x20064d,_0x5aebd8){return _0x1dd469[_0x46fe('0x27')](_0x20064d||0x1f4)[_0x46fe('0x28')]({'message':_0x5aebd8?_0x5aebd8[_0x46fe('0x29')]||_0x5aebd8:''});}exports['login']=function(_0x6947d4,_0x42a2b1,_0x334218){passport[_0x46fe('0xe')](_0x46fe('0x2a'),function(_0x3c197a,_0x5767e8,_0x7a0d31){var _0x15e63d=_0x3c197a||_0x7a0d31;if(_0x15e63d){return handleError(_0x42a2b1,0x191,_0x15e63d);}if(!_0x5767e8){return handleError(_0x42a2b1,0x194,{'message':_0x46fe('0x2b')});}else{var _0x4c3bc2={'payload':{'id':_0x5767e8['id'],'role':_0x5767e8[_0x46fe('0x1c')]},'options':{'expiresIn':0x15180}};return authService['signToken'](_0x4c3bc2)[_0x46fe('0x17')](function(_0x2ca3cf){_0x42a2b1[_0x46fe('0x2c')]({'id':_0x5767e8['id'],'token':_0x2ca3cf,'statusCall':'','isAlreadyLogged':_0x5767e8[_0x46fe('0x1e')]});});}})(_0x6947d4,_0x42a2b1,_0x334218);};passport[_0x46fe('0x2d')]('ad-login',new LocalStrategy({'usernameField':_0x46fe('0x1a'),'passwordField':'password'},function(_0x7945a5,_0x10ecfa,_0x1f0ce3){return ActiveDirectoryAuthenticate(db[_0x46fe('0x2e')],_0x7945a5,_0x10ecfa,_0x1f0ce3);}));
\ No newline at end of file
+var _0x5f5d=['clearBlockUser','getLicense','catch','status','send','login','authenticate','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','json','use','password','User','passport-local','Strategy','moment','bluebird','../../mysqldb','../../components/auth/service','../../config/utils','../../config/environment','../../config/logger','api','activedirectory','baseDN','url','domain','error','Error\x20authenticate\x20%s:\x20%s','inspect','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','Error\x20authenticate\x20%s:\x20Wrong\x20credentials','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20configured','findOne','blockDuration','then','adSsoEnabled','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20enabled','name','salt','role','disabled','blocked','blockedAt','online','user','agent','add'];(function(_0x4c2e41,_0x5408d7){var _0x57fcc9=function(_0x4d7492){while(--_0x4d7492){_0x4c2e41['push'](_0x4c2e41['shift']());}};_0x57fcc9(++_0x5408d7);}(_0x5f5d,0x15d));var _0xd5f5=function(_0x27b1ba,_0x452e63){_0x27b1ba=_0x27b1ba-0x0;var _0x72679e=_0x5f5d[_0x27b1ba];return _0x72679e;};'use strict';var passport=require('passport');var LocalStrategy=require(_0xd5f5('0x0'))[_0xd5f5('0x1')];var moment=require(_0xd5f5('0x2'));var ActiveDirectory=require('activedirectory2');var BPromise=require(_0xd5f5('0x3'));var util=require('util');var db=require(_0xd5f5('0x4'))['db'];var authService=require(_0xd5f5('0x5'));var utils=require(_0xd5f5('0x6'));var config=require(_0xd5f5('0x7'));var logger=require(_0xd5f5('0x8'))(_0xd5f5('0x9'));function isActiveDirectoryConfigured(_0x2a8647){var _0xe3f28a=![];if(typeof _0x2a8647[_0xd5f5('0xa')]!=='undefined'){_0xe3f28a=_0x2a8647[_0xd5f5('0xa')][_0xd5f5('0xb')]&&_0x2a8647[_0xd5f5('0xa')][_0xd5f5('0xc')]&&_0x2a8647[_0xd5f5('0xa')][_0xd5f5('0xd')];}return _0xe3f28a;}function adAuthenticate(_0x417340,_0x1a078d,_0x175b56){return new BPromise(function(_0x34598f,_0x2faf52){try{var _0x1be92b=new ActiveDirectory(_0x417340);_0x1be92b['authenticate'](_0x1a078d,_0x175b56,function(_0x41cef6,_0x4141c3){if(_0x41cef6){logger[_0xd5f5('0xe')](_0xd5f5('0xf'),_0x1a078d,util[_0xd5f5('0x10')](_0x41cef6,{'showHidden':![],'depth':null}));_0x2faf52(_0xd5f5('0x11'));}else if(!_0x4141c3){logger[_0xd5f5('0xe')](_0xd5f5('0x12'),_0x1a078d);_0x2faf52('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else{_0x34598f(_0x4141c3);}});}catch(_0x26f3be){_0x2faf52(_0x26f3be);}});}function ActiveDirectoryAuthenticate(_0x4de0e9,_0x85cc4b,_0x5aa485,_0x387fd7){var _0x213239,_0x3d9a3e;if(!isActiveDirectoryConfigured(config)){logger[_0xd5f5('0xe')](_0xd5f5('0x13'),_0x85cc4b);return _0x387fd7(null,![],{'message':_0xd5f5('0x11')});}return db['Setting'][_0xd5f5('0x14')]({'where':{'id':0x1},'attributes':['adSsoEnabled',_0xd5f5('0x15')],'raw':!![]})[_0xd5f5('0x16')](function(_0x49e266){_0x213239=_0x49e266;if(!_0x213239[_0xd5f5('0x17')]){logger[_0xd5f5('0xe')](_0xd5f5('0x18'),_0x85cc4b);throw new Error(_0xd5f5('0x11'));}return _0x4de0e9[_0xd5f5('0x14')]({'attributes':['id',_0xd5f5('0x19'),'password',_0xd5f5('0x1a'),_0xd5f5('0x1b'),_0xd5f5('0x1c'),_0xd5f5('0x1d'),_0xd5f5('0x1e'),_0xd5f5('0x1f')],'where':{'name':_0x85cc4b,'role':{'$or':['admin',_0xd5f5('0x20'),_0xd5f5('0x21')]},'adSsoEnabled':!![]}});})[_0xd5f5('0x16')](function(_0x10848a){if(!_0x10848a||_0x10848a&&_0x10848a[_0xd5f5('0x19')]!==_0x85cc4b){throw new Error(_0xd5f5('0x11'));}_0x3d9a3e=_0x10848a;var _0x4b14e4=_0x3d9a3e[_0xd5f5('0x19')]+'@'+config[_0xd5f5('0xa')]['domain'];return adAuthenticate(config['activedirectory'],_0x4b14e4,_0x5aa485);})['then'](function(_0x12ebd8){if(_0x3d9a3e[_0xd5f5('0x1c')]){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}if(_0x213239[_0xd5f5('0x15')]>0x0){if(_0x3d9a3e[_0xd5f5('0x1d')]){if(moment(_0x3d9a3e['blockedAt'])[_0xd5f5('0x22')](_0x213239[_0xd5f5('0x15')],'minutes')>moment()){throw new Error(_0xd5f5('0x11'));}return utils[_0xd5f5('0x23')](_0x3d9a3e,0x0,![],null)[_0xd5f5('0x16')](function(){return utils[_0xd5f5('0x24')](_0x3d9a3e);})['then'](function(){return _0x387fd7(null,_0x3d9a3e);});}else{return utils['getLicense'](_0x3d9a3e)['then'](function(){return _0x387fd7(null,_0x3d9a3e);});}}else{return utils['getLicense'](_0x3d9a3e)['then'](function(){return _0x387fd7(null,_0x3d9a3e);});}})[_0xd5f5('0x25')](function(_0x50177b){return _0x387fd7(null,![],_0x50177b);});}function handleError(_0x80a0df,_0x227fcb,_0xdbbf58){return _0x80a0df[_0xd5f5('0x26')](_0x227fcb||0x1f4)[_0xd5f5('0x27')]({'message':_0xdbbf58?_0xdbbf58['message']||_0xdbbf58:''});}exports[_0xd5f5('0x28')]=function(_0x50d2fc,_0x31960a,_0x36ed2f){passport[_0xd5f5('0x29')]('ad-login',function(_0x535f92,_0xe058a9,_0xa7ab60){var _0x5ea408=_0x535f92||_0xa7ab60;if(_0x5ea408){return handleError(_0x31960a,0x191,_0x5ea408);}if(!_0xe058a9){return handleError(_0x31960a,0x194,{'message':_0xd5f5('0x2a')});}else{var _0x433620={'payload':{'id':_0xe058a9['id'],'role':_0xe058a9[_0xd5f5('0x1b')]},'options':{'expiresIn':0x15180}};return authService[_0xd5f5('0x2b')](_0x433620)[_0xd5f5('0x16')](function(_0x488e6b){_0x31960a[_0xd5f5('0x2c')]({'id':_0xe058a9['id'],'token':_0x488e6b,'statusCall':'','isAlreadyLogged':_0xe058a9[_0xd5f5('0x1f')]});});}})(_0x50d2fc,_0x31960a,_0x36ed2f);};passport[_0xd5f5('0x2d')]('ad-login',new LocalStrategy({'usernameField':_0xd5f5('0x19'),'passwordField':_0xd5f5('0x2e')},function(_0x2e7d4d,_0x5e361a,_0x436880){return ActiveDirectoryAuthenticate(db[_0xd5f5('0x2f')],_0x2e7d4d,_0x5e361a,_0x436880);}));
\ No newline at end of file
diff --git a/server/api/authActiveDirectory/index.js b/server/api/authActiveDirectory/index.js
index 2c2e70f..a25e508 100644
--- a/server/api/authActiveDirectory/index.js
+++ b/server/api/authActiveDirectory/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x78ad=['Router','./authActiveDirectory.controller','post','login','express'];(function(_0x246568,_0x57af04){var _0x19b302=function(_0x4ae034){while(--_0x4ae034){_0x246568['push'](_0x246568['shift']());}};_0x19b302(++_0x57af04);}(_0x78ad,0x1da));var _0xd78a=function(_0x39b94d,_0x21cae0){_0x39b94d=_0x39b94d-0x0;var _0x1934fe=_0x78ad[_0x39b94d];return _0x1934fe;};'use strict';var express=require(_0xd78a('0x0'));var router=express[_0xd78a('0x1')]();var controller=require(_0xd78a('0x2'));router[_0xd78a('0x3')]('/',controller[_0xd78a('0x4')]);module['exports']=router;
\ No newline at end of file
+var _0x20e2=['exports','Router','./authActiveDirectory.controller','post','login'];(function(_0x177e72,_0x28bf32){var _0x392698=function(_0x45a052){while(--_0x45a052){_0x177e72['push'](_0x177e72['shift']());}};_0x392698(++_0x28bf32);}(_0x20e2,0x1c3));var _0x220e=function(_0x3f4f99,_0x673680){_0x3f4f99=_0x3f4f99-0x0;var _0xde7221=_0x20e2[_0x3f4f99];return _0xde7221;};'use strict';var express=require('express');var router=express[_0x220e('0x0')]();var controller=require(_0x220e('0x1'));router[_0x220e('0x2')]('/',controller[_0x220e('0x3')]);module[_0x220e('0x4')]=router;
\ No newline at end of file
diff --git a/server/api/authGoogle/authGoogle.controller.js b/server/api/authGoogle/authGoogle.controller.js
index 7c1fb94..0dae410 100644
--- a/server/api/authGoogle/authGoogle.controller.js
+++ b/server/api/authGoogle/authGoogle.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9957=['../../config/environment','../../config/utils','login','google','/login','profile','email','callback','authenticate','use','clientID','clientSecret','secret','callbackURL','Setting','findOne','allowedLoginAttempts','User','find','map','emails','value','admin','user','then','disabled','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','blockDuration','blocked','blockedAt','add','getLicense','catch','lodash','passport','passport-google-oauth20','Strategy','../../mysqldb'];(function(_0x46fa5e,_0x3973d7){var _0x2a9360=function(_0x5673eb){while(--_0x5673eb){_0x46fa5e['push'](_0x46fa5e['shift']());}};_0x2a9360(++_0x3973d7);}(_0x9957,0x93));var _0x7995=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x9957[_0x5b644e];return _0x49c6bf;};'use strict';var _=require(_0x7995('0x0'));var passport=require(_0x7995('0x1'));var GoogleStrategy=require(_0x7995('0x2'))[_0x7995('0x3')];var moment=require('moment');var db=require(_0x7995('0x4'))['db'];var config=require(_0x7995('0x5'));var utils=require(_0x7995('0x6'));exports[_0x7995('0x7')]=passport['authenticate'](_0x7995('0x8'),{'failureRedirect':_0x7995('0x9'),'scope':[_0x7995('0xa'),_0x7995('0xb')],'session':![]});exports[_0x7995('0xc')]=passport[_0x7995('0xd')]('google',{'failureRedirect':_0x7995('0x9'),'session':![]});passport[_0x7995('0xe')](new GoogleStrategy({'clientID':config['google']?config[_0x7995('0x8')][_0x7995('0xf')]:'id','clientSecret':config[_0x7995('0x8')]?config[_0x7995('0x8')][_0x7995('0x10')]:_0x7995('0x11'),'callbackURL':config[_0x7995('0x8')]?config['google'][_0x7995('0x12')]:''},function(_0x41c652,_0x581f22,_0xb0c872,_0x2cb37a){var _0x19a27e,_0x385f00;return db[_0x7995('0x13')][_0x7995('0x14')]({'where':{'id':0x1},'attributes':[_0x7995('0x15'),'blockDuration'],'raw':!![]})['then'](function(_0x2b4e94){_0x19a27e=_0x2b4e94;return db[_0x7995('0x16')][_0x7995('0x17')]({'where':{'email':_[_0x7995('0x18')](_0xb0c872[_0x7995('0x19')],_0x7995('0x1a')),'role':{'$or':[_0x7995('0x1b'),_0x7995('0x1c'),'agent']}}});})[_0x7995('0x1d')](function(_0x565d97){_0x385f00=_0x565d97;if(_0x385f00){if(_0x385f00[_0x7995('0x1e')]){return _0x2cb37a(_0x7995('0x1f'));}else if(_0x19a27e[_0x7995('0x20')]>0x0){if(_0x385f00[_0x7995('0x21')]){if(moment(_0x385f00[_0x7995('0x22')])[_0x7995('0x23')](_0x19a27e['blockDuration'],'minutes')>moment()){return _0x2cb37a(_0x7995('0x1f'));}else{return utils['clearBlockUser'](_0x385f00,0x0,![],null)['then'](function(){return utils[_0x7995('0x24')](_0x385f00);})[_0x7995('0x1d')](function(){return _0x2cb37a(null,_0x385f00);});}}else{return utils['getLicense'](_0x385f00)[_0x7995('0x1d')](function(){return _0x2cb37a(null,_0x385f00);});}}else{return utils['getLicense'](_0x385f00)['then'](function(){return _0x2cb37a(null,_0x385f00);});}}return _0x2cb37a(_0x7995('0x1f'));})[_0x7995('0x25')](function(_0x350fd9){_0x2cb37a(_0x350fd9);});}));
\ No newline at end of file
+var _0x9957=['../../config/environment','../../config/utils','login','google','/login','profile','email','callback','authenticate','use','clientID','clientSecret','secret','callbackURL','Setting','findOne','allowedLoginAttempts','User','find','map','emails','value','admin','user','then','disabled','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','blockDuration','blocked','blockedAt','add','getLicense','catch','lodash','passport','passport-google-oauth20','Strategy','../../mysqldb'];(function(_0x1ea92e,_0x3dcf0e){var _0x2afe32=function(_0x3fe338){while(--_0x3fe338){_0x1ea92e['push'](_0x1ea92e['shift']());}};_0x2afe32(++_0x3dcf0e);}(_0x9957,0x93));var _0x7995=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x9957[_0xbca1b1];return _0x4e1686;};'use strict';var _=require(_0x7995('0x0'));var passport=require(_0x7995('0x1'));var GoogleStrategy=require(_0x7995('0x2'))[_0x7995('0x3')];var moment=require('moment');var db=require(_0x7995('0x4'))['db'];var config=require(_0x7995('0x5'));var utils=require(_0x7995('0x6'));exports[_0x7995('0x7')]=passport['authenticate'](_0x7995('0x8'),{'failureRedirect':_0x7995('0x9'),'scope':[_0x7995('0xa'),_0x7995('0xb')],'session':![]});exports[_0x7995('0xc')]=passport[_0x7995('0xd')]('google',{'failureRedirect':_0x7995('0x9'),'session':![]});passport[_0x7995('0xe')](new GoogleStrategy({'clientID':config['google']?config[_0x7995('0x8')][_0x7995('0xf')]:'id','clientSecret':config[_0x7995('0x8')]?config[_0x7995('0x8')][_0x7995('0x10')]:_0x7995('0x11'),'callbackURL':config[_0x7995('0x8')]?config['google'][_0x7995('0x12')]:''},function(_0x41c652,_0x581f22,_0xb0c872,_0x2cb37a){var _0x19a27e,_0x385f00;return db[_0x7995('0x13')][_0x7995('0x14')]({'where':{'id':0x1},'attributes':[_0x7995('0x15'),'blockDuration'],'raw':!![]})['then'](function(_0x2b4e94){_0x19a27e=_0x2b4e94;return db[_0x7995('0x16')][_0x7995('0x17')]({'where':{'email':_[_0x7995('0x18')](_0xb0c872[_0x7995('0x19')],_0x7995('0x1a')),'role':{'$or':[_0x7995('0x1b'),_0x7995('0x1c'),'agent']}}});})[_0x7995('0x1d')](function(_0x565d97){_0x385f00=_0x565d97;if(_0x385f00){if(_0x385f00[_0x7995('0x1e')]){return _0x2cb37a(_0x7995('0x1f'));}else if(_0x19a27e[_0x7995('0x20')]>0x0){if(_0x385f00[_0x7995('0x21')]){if(moment(_0x385f00[_0x7995('0x22')])[_0x7995('0x23')](_0x19a27e['blockDuration'],'minutes')>moment()){return _0x2cb37a(_0x7995('0x1f'));}else{return utils['clearBlockUser'](_0x385f00,0x0,![],null)['then'](function(){return utils[_0x7995('0x24')](_0x385f00);})[_0x7995('0x1d')](function(){return _0x2cb37a(null,_0x385f00);});}}else{return utils['getLicense'](_0x385f00)[_0x7995('0x1d')](function(){return _0x2cb37a(null,_0x385f00);});}}else{return utils['getLicense'](_0x385f00)['then'](function(){return _0x2cb37a(null,_0x385f00);});}}return _0x2cb37a(_0x7995('0x1f'));})[_0x7995('0x25')](function(_0x350fd9){_0x2cb37a(_0x350fd9);});}));
\ No newline at end of file
diff --git a/server/api/authGoogle/index.js b/server/api/authGoogle/index.js
index e40c755..8343cb6 100644
--- a/server/api/authGoogle/index.js
+++ b/server/api/authGoogle/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x53f3=['../../components/auth/service','get','login','/callback','callback','isMiddleware','setTokenCookie','exports','express','passport','Router','./authGoogle.controller'];(function(_0x4247f7,_0x34a9aa){var _0x571ccd=function(_0xf5360d){while(--_0xf5360d){_0x4247f7['push'](_0x4247f7['shift']());}};_0x571ccd(++_0x34a9aa);}(_0x53f3,0xe0));var _0x353f=function(_0xc05e87,_0x5c6dba){_0xc05e87=_0xc05e87-0x0;var _0x47c69f=_0x53f3[_0xc05e87];return _0x47c69f;};'use strict';var express=require(_0x353f('0x0'));var passport=require(_0x353f('0x1'));var router=express[_0x353f('0x2')]();var controller=require(_0x353f('0x3'));var userController=require('../user/user.controller.js');var authService=require(_0x353f('0x4'));router[_0x353f('0x5')]('/',controller[_0x353f('0x6')]);router[_0x353f('0x5')](_0x353f('0x7'),controller[_0x353f('0x8')],authService[_0x353f('0x9')],userController[_0x353f('0x6')],authService[_0x353f('0xa')]);module[_0x353f('0xb')]=router;
\ No newline at end of file
+var _0x87a4=['/callback','callback','isMiddleware','login','exports','express','passport','../user/user.controller.js','../../components/auth/service'];(function(_0x1d99f1,_0x284c97){var _0x595325=function(_0x41e059){while(--_0x41e059){_0x1d99f1['push'](_0x1d99f1['shift']());}};_0x595325(++_0x284c97);}(_0x87a4,0x12e));var _0x487a=function(_0x1adf0e,_0x3bd542){_0x1adf0e=_0x1adf0e-0x0;var _0x460f14=_0x87a4[_0x1adf0e];return _0x460f14;};'use strict';var express=require(_0x487a('0x0'));var passport=require(_0x487a('0x1'));var router=express['Router']();var controller=require('./authGoogle.controller');var userController=require(_0x487a('0x2'));var authService=require(_0x487a('0x3'));router['get']('/',controller['login']);router['get'](_0x487a('0x4'),controller[_0x487a('0x5')],authService[_0x487a('0x6')],userController[_0x487a('0x7')],authService['setTokenCookie']);module[_0x487a('0x8')]=router;
\ No newline at end of file
diff --git a/server/api/authLocal/authLocal.controller.js b/server/api/authLocal/authLocal.controller.js
index 12f6e23..b5de359 100644
--- a/server/api/authLocal/authLocal.controller.js
+++ b/server/api/authLocal/authLocal.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x58d2=['The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.','resetPasswordToken','resetPasswordExpires','now','save','xCally\x20Motion\x20Password\x20Reset','You\x20are\x20receiving\x20this\x20because\x20you\x20(or\x20someone\x20else)\x20have\x20requested\x20the\x20reset\x20of\x20the\x20password\x20for\x20your\x20account.\x0a\x0a','Please\x20click\x20on\x20the\x20following\x20link,\x20or\x20paste\x20this\x20into\x20your\x20browser\x20to\x20complete\x20the\x20process:\x0a\x0a','headers','host','If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a','Reset\x20Email\x20sent!','reset','params','Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.','securePassword','enforcePasswordHistory','passwordHistoryLimit','validatePasswordPattern','previousPasswords','validatePasswordHistory','Password\x20reset!','use','util','passport','Strategy','lodash','moment','../../components/auth/service','../../config/utils','http','Setting','allowedLoginAttempts','blockDuration','findOne','password','salt','role','disabled','blocked','blockedAt','loginAttempts','admin','user','agent','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','authenticate','add','minutes','then','clearBlockUser','getLicense','catch','MailAccount','MailServerOut','Smtp','CloudProvider','Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!','getSmtpOptions','merge','format','\x22%s\x22\x20<%s>','email','error','message','stringify','status','send','login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','json','online','forgot','body','Email\x20parameter\x20is\x20missing','generate','trim','toLowerCase','User','find','The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.'];(function(_0x592e40,_0x2ed011){var _0x5d4288=function(_0x366e87){while(--_0x366e87){_0x592e40['push'](_0x592e40['shift']());}};_0x5d4288(++_0x2ed011);}(_0x58d2,0x69));var _0x258d=function(_0x3a0579,_0x17d535){_0x3a0579=_0x3a0579-0x0;var _0xa6faf3=_0x58d2[_0x3a0579];return _0xa6faf3;};'use strict';var util=require(_0x258d('0x0'));var passport=require(_0x258d('0x1'));var LocalStrategy=require('passport-local')[_0x258d('0x2')];var jayson=require('jayson/promise');var _=require(_0x258d('0x3'));var rs=require('randomstring');var moment=require(_0x258d('0x4'));var db=require('../../mysqldb')['db'];var authService=require(_0x258d('0x5'));var utils=require(_0x258d('0x6'));var client=jayson['client'][_0x258d('0x7')]({'port':0x232b});function localAuthenticate(_0x352767,_0x23135b,_0x50600d,_0x1c7438){var _0x9c7ba8,_0x2dabb2;return db[_0x258d('0x8')]['findOne']({'where':{'id':0x1},'attributes':[_0x258d('0x9'),_0x258d('0xa')],'raw':!![]})['then'](function(_0x564cc0){_0x9c7ba8=_0x564cc0;return _0x352767[_0x258d('0xb')]({'attributes':['id','name',_0x258d('0xc'),_0x258d('0xd'),_0x258d('0xe'),_0x258d('0xf'),_0x258d('0x10'),_0x258d('0x11'),_0x258d('0x12')],'where':{'name':_0x23135b,'role':{'$or':[_0x258d('0x13'),_0x258d('0x14'),_0x258d('0x15')]}}});})['then'](function(_0x7fa00c){if(!_0x7fa00c||_0x7fa00c&&_0x7fa00c['name']!==_0x23135b){throw new Error(_0x258d('0x16'));}else{_0x2dabb2=_0x7fa00c;return _0x2dabb2;}})['then'](function(){_0x2dabb2[_0x258d('0x17')](_0x50600d,function(_0x256625,_0x114786){var _0x28bac7=_0x2dabb2['loginAttempts']+0x1;if(_0x256625){return _0x1c7438(_0x256625);}else if(!_0x114786){if(_0x2dabb2[_0x258d('0xf')]){return _0x1c7438(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else if(_0x9c7ba8[_0x258d('0x9')]>0x0){if(_0x2dabb2[_0x258d('0x10')]){if(_0x9c7ba8['blockDuration']>0x0){if(moment(_0x2dabb2['blockedAt'])[_0x258d('0x18')](_0x9c7ba8[_0x258d('0xa')],_0x258d('0x19'))>moment()){return _0x1c7438(null,![],{'message':_0x258d('0x16')});}else{return utils['clearBlockUser'](_0x2dabb2,_0x28bac7,![],null)[_0x258d('0x1a')](function(){return _0x1c7438(null,![],{'message':_0x258d('0x16')});});}}else{return _0x1c7438(null,![],{'message':_0x258d('0x16')});}}else{if(_0x28bac7>=_0x9c7ba8[_0x258d('0x9')]){return utils[_0x258d('0x1b')](_0x2dabb2,0x0,!![],moment())[_0x258d('0x1a')](function(){return _0x1c7438(null,![],{'message':_0x258d('0x16')});});}else{return utils['clearBlockUser'](_0x2dabb2,_0x28bac7,![],null)[_0x258d('0x1a')](function(){return _0x1c7438(null,![],{'message':_0x258d('0x16')});});}}}else{return _0x1c7438(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{if(_0x2dabb2[_0x258d('0xf')]){return _0x1c7438(null,![],{'message':_0x258d('0x16')});}else if(_0x9c7ba8[_0x258d('0x9')]>0x0){if(_0x2dabb2[_0x258d('0x10')]){if(_0x9c7ba8[_0x258d('0xa')]>0x0){if(moment(_0x2dabb2[_0x258d('0x11')])[_0x258d('0x18')](_0x9c7ba8['blockDuration'],_0x258d('0x19'))>moment()){return _0x1c7438(null,![],{'message':_0x258d('0x16')});}else{return utils['clearBlockUser'](_0x2dabb2,0x0,![],null)['then'](function(){return utils[_0x258d('0x1c')](_0x2dabb2);})['then'](function(){return _0x1c7438(null,_0x2dabb2);});}}else{return _0x1c7438(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{return utils['clearBlockUser'](_0x2dabb2,0x0,![],null)[_0x258d('0x1a')](function(){return utils[_0x258d('0x1c')](_0x2dabb2);})['then'](function(){return _0x1c7438(null,_0x2dabb2);})[_0x258d('0x1d')](function(_0x80b84a){return _0x1c7438(null,![],_0x80b84a);});}}else{if(_0x2dabb2[_0x258d('0x10')]){return _0x1c7438(null,![],{'message':_0x258d('0x16')});}else{return utils[_0x258d('0x1c')](_0x2dabb2)[_0x258d('0x1a')](function(){return _0x1c7438(null,_0x2dabb2);});}}}});})[_0x258d('0x1d')](function(_0xe95354){return _0x1c7438(null,![],_0xe95354);});}function sendServiceMail(_0x250871){return db[_0x258d('0x1e')]['find']({'where':{'service':!![]},'attributes':['id','name','email'],'include':[{'model':db[_0x258d('0x1f')],'as':_0x258d('0x20'),'include':[{'model':db[_0x258d('0x21')],'as':_0x258d('0x21')}]}]})[_0x258d('0x1a')](function(_0x33b933){if(!_0x33b933){throw new Error(_0x258d('0x22'));}var _0x4b9ab9=_0x33b933[_0x258d('0x23')]();var _0x19205c={'account':_0x4b9ab9,'message':_[_0x258d('0x24')]({'from':util[_0x258d('0x25')](_0x258d('0x26'),_0x33b933['name'],_0x33b933[_0x258d('0x27')]||_0x33b933['Smtp'][_0x258d('0x14')])},_0x250871)};return client['request']('SendMail',_0x19205c);})[_0x258d('0x1a')](function(_0x445b97){if(_0x445b97[_0x258d('0x28')]){throw new Error(util[_0x258d('0x25')]('SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!',_0x445b97[_0x258d('0x28')][_0x258d('0x29')]||JSON[_0x258d('0x2a')](_0x445b97[_0x258d('0x28')])));}return!![];});}function handleError(_0x374c8f,_0xe16998,_0xc0fd60){return _0x374c8f[_0x258d('0x2b')](_0xe16998||0x1f4)[_0x258d('0x2c')]({'message':_0xc0fd60?_0xc0fd60[_0x258d('0x29')]||_0xc0fd60:''});}exports[_0x258d('0x2d')]=function(_0x2ee75f,_0x498a60,_0x21314f){passport['authenticate']('local-login',function(_0x547ed8,_0x23b1e1,_0x5b070d){var _0x1e41e5=_0x547ed8||_0x5b070d;if(_0x1e41e5){return handleError(_0x498a60,0x191,_0x1e41e5);}if(!_0x23b1e1){return handleError(_0x498a60,0x194,{'message':_0x258d('0x2e')});}else{var _0x309a93={'payload':{'id':_0x23b1e1['id'],'role':_0x23b1e1[_0x258d('0xe')]},'options':{'expiresIn':0x15180}};return authService[_0x258d('0x2f')](_0x309a93)[_0x258d('0x1a')](function(_0xfeb598){_0x498a60[_0x258d('0x30')]({'id':_0x23b1e1['id'],'token':_0xfeb598,'statusCall':'','isAlreadyLogged':_0x23b1e1[_0x258d('0x31')]});});}})(_0x2ee75f,_0x498a60,_0x21314f);};exports[_0x258d('0x32')]=function(_0x35d57b,_0x41a482){if(!_0x35d57b[_0x258d('0x33')][_0x258d('0x27')]){return handleError(_0x41a482,0x1f4,{'message':_0x258d('0x34')});}var _0x571237=rs[_0x258d('0x35')]();_0x35d57b[_0x258d('0x33')][_0x258d('0x27')]=_0x35d57b[_0x258d('0x33')]['email'][_0x258d('0x36')]()[_0x258d('0x37')]();var _0x19fd11;return db[_0x258d('0x8')][_0x258d('0xb')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts','blockDuration'],'raw':!![]})['then'](function(_0x4d960d){_0x19fd11=_0x4d960d;return db[_0x258d('0x38')][_0x258d('0x39')]({'where':{'email':_0x35d57b[_0x258d('0x33')]['email']}});})[_0x258d('0x1a')](function(_0x1299d4){if(!_0x1299d4){throw new Error('This\x20email\x20is\x20not\x20registered.');}if(_0x1299d4['disabled']){throw new Error(_0x258d('0x3a'));}if(_0x1299d4[_0x258d('0x10')]){if(moment(_0x1299d4[_0x258d('0x11')])['add'](_0x19fd11[_0x258d('0xa')],_0x258d('0x19'))>moment()){throw new Error(_0x258d('0x3b'));}else{_0x1299d4[_0x258d('0x10')]=![];_0x1299d4['blockedAt']=null;}}_0x1299d4[_0x258d('0x3c')]=_0x571237;_0x1299d4[_0x258d('0x3d')]=Date[_0x258d('0x3e')]()+0x36ee80;return _0x1299d4[_0x258d('0x3f')]();})['then'](function(){return sendServiceMail({'to':_0x35d57b[_0x258d('0x33')][_0x258d('0x27')],'subject':_0x258d('0x40'),'text':_0x258d('0x41')+_0x258d('0x42')+'https://'+_0x35d57b[_0x258d('0x43')][_0x258d('0x44')]+'/reset/'+_0x571237+'\x0a\x0a'+_0x258d('0x45')});})[_0x258d('0x1a')](function(){_0x41a482[_0x258d('0x2b')](0xc8)[_0x258d('0x2c')]({'message':_0x258d('0x46')});})['catch'](function(_0x41f768){return handleError(_0x41a482,0x1f4,_0x41f768);});};exports[_0x258d('0x47')]=function(_0x7ce7e4,_0x40898c){return db['User']['find']({'where':{'resetPasswordToken':_0x7ce7e4[_0x258d('0x48')]['token'],'resetPasswordExpires':{'$gt':Date[_0x258d('0x3e')]()}}})[_0x258d('0x1a')](function(_0x5c24d7){if(!_0x5c24d7){throw new Error(_0x258d('0x49'));}return db[_0x258d('0x8')][_0x258d('0xb')]({'attributes':['id',_0x258d('0x4a'),_0x258d('0x4b'),_0x258d('0x4c')]})[_0x258d('0x1a')](function(_0xeecf44){if(_0xeecf44[_0x258d('0x4a')])authService[_0x258d('0x4d')](_0x7ce7e4[_0x258d('0x33')][_0x258d('0xc')]);if(!_0xeecf44[_0x258d('0x4b')]||!_0x5c24d7[_0x258d('0x4e')])return _0x5c24d7;authService[_0x258d('0x4f')](_0x7ce7e4[_0x258d('0x33')][_0x258d('0xc')],_0x5c24d7[_0x258d('0x4e')],_0xeecf44[_0x258d('0x4c')]);return _0x5c24d7;})[_0x258d('0x1a')](function(){_0x5c24d7[_0x258d('0xc')]=_0x7ce7e4[_0x258d('0x33')]['password'];_0x5c24d7[_0x258d('0x3c')]=null;_0x5c24d7[_0x258d('0x3d')]=null;return _0x5c24d7[_0x258d('0x3f')]();});})[_0x258d('0x1a')](function(){_0x40898c['status'](0xc8)[_0x258d('0x2c')]({'message':_0x258d('0x50')});})[_0x258d('0x1d')](function(_0x5a3416){return handleError(_0x40898c,0x1f4,_0x5a3416);});};passport[_0x258d('0x51')]('local-login',new LocalStrategy({'usernameField':'name','passwordField':'password'},function(_0x210a34,_0x1213f2,_0x4b3f90){return localAuthenticate(db[_0x258d('0x38')],_0x210a34,_0x1213f2,_0x4b3f90);}));
\ No newline at end of file
+var _0x325c=['lodash','moment','../../mysqldb','../../components/auth/service','../../config/utils','client','http','Setting','findOne','allowedLoginAttempts','blockDuration','password','salt','role','disabled','blockedAt','user','agent','then','name','loginAttempts','blocked','add','minutes','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','clearBlockUser','getLicense','catch','find','email','MailServerOut','Smtp','CloudProvider','getSmtpOptions','format','\x22%s\x22\x20<%s>','request','error','message','stringify','send','login','local-login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','json','online','forgot','body','generate','trim','User','The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.','The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.','resetPasswordToken','resetPasswordExpires','now','save','xCally\x20Motion\x20Password\x20Reset','You\x20are\x20receiving\x20this\x20because\x20you\x20(or\x20someone\x20else)\x20have\x20requested\x20the\x20reset\x20of\x20the\x20password\x20for\x20your\x20account.\x0a\x0a','Please\x20click\x20on\x20the\x20following\x20link,\x20or\x20paste\x20this\x20into\x20your\x20browser\x20to\x20complete\x20the\x20process:\x0a\x0a','https://','headers','host','If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a','status','Reset\x20Email\x20sent!','params','Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.','securePassword','passwordHistoryLimit','validatePasswordHistory','use','passport','passport-local','Strategy','jayson/promise'];(function(_0x1c6abb,_0x5884e6){var _0x2aee50=function(_0x3e3c96){while(--_0x3e3c96){_0x1c6abb['push'](_0x1c6abb['shift']());}};_0x2aee50(++_0x5884e6);}(_0x325c,0x96));var _0xc325=function(_0x49775a,_0x28de4f){_0x49775a=_0x49775a-0x0;var _0x4fc888=_0x325c[_0x49775a];return _0x4fc888;};'use strict';var util=require('util');var passport=require(_0xc325('0x0'));var LocalStrategy=require(_0xc325('0x1'))[_0xc325('0x2')];var jayson=require(_0xc325('0x3'));var _=require(_0xc325('0x4'));var rs=require('randomstring');var moment=require(_0xc325('0x5'));var db=require(_0xc325('0x6'))['db'];var authService=require(_0xc325('0x7'));var utils=require(_0xc325('0x8'));var client=jayson[_0xc325('0x9')][_0xc325('0xa')]({'port':0x232b});function localAuthenticate(_0x2fff39,_0x3b62fe,_0x3e35e4,_0x686b03){var _0x16dd0d,_0x2e053a;return db[_0xc325('0xb')][_0xc325('0xc')]({'where':{'id':0x1},'attributes':[_0xc325('0xd'),_0xc325('0xe')],'raw':!![]})['then'](function(_0x3a7ae6){_0x16dd0d=_0x3a7ae6;return _0x2fff39[_0xc325('0xc')]({'attributes':['id','name',_0xc325('0xf'),_0xc325('0x10'),_0xc325('0x11'),_0xc325('0x12'),'blocked',_0xc325('0x13'),'loginAttempts'],'where':{'name':_0x3b62fe,'role':{'$or':['admin',_0xc325('0x14'),_0xc325('0x15')]}}});})[_0xc325('0x16')](function(_0x85b83c){if(!_0x85b83c||_0x85b83c&&_0x85b83c[_0xc325('0x17')]!==_0x3b62fe){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else{_0x2e053a=_0x85b83c;return _0x2e053a;}})[_0xc325('0x16')](function(){_0x2e053a['authenticate'](_0x3e35e4,function(_0x158d30,_0x680757){var _0x213884=_0x2e053a[_0xc325('0x18')]+0x1;if(_0x158d30){return _0x686b03(_0x158d30);}else if(!_0x680757){if(_0x2e053a['disabled']){return _0x686b03(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else if(_0x16dd0d[_0xc325('0xd')]>0x0){if(_0x2e053a[_0xc325('0x19')]){if(_0x16dd0d[_0xc325('0xe')]>0x0){if(moment(_0x2e053a[_0xc325('0x13')])[_0xc325('0x1a')](_0x16dd0d[_0xc325('0xe')],_0xc325('0x1b'))>moment()){return _0x686b03(null,![],{'message':_0xc325('0x1c')});}else{return utils[_0xc325('0x1d')](_0x2e053a,_0x213884,![],null)[_0xc325('0x16')](function(){return _0x686b03(null,![],{'message':_0xc325('0x1c')});});}}else{return _0x686b03(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{if(_0x213884>=_0x16dd0d[_0xc325('0xd')]){return utils[_0xc325('0x1d')](_0x2e053a,0x0,!![],moment())['then'](function(){return _0x686b03(null,![],{'message':_0xc325('0x1c')});});}else{return utils['clearBlockUser'](_0x2e053a,_0x213884,![],null)['then'](function(){return _0x686b03(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});});}}}else{return _0x686b03(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{if(_0x2e053a[_0xc325('0x12')]){return _0x686b03(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else if(_0x16dd0d[_0xc325('0xd')]>0x0){if(_0x2e053a[_0xc325('0x19')]){if(_0x16dd0d[_0xc325('0xe')]>0x0){if(moment(_0x2e053a['blockedAt'])['add'](_0x16dd0d[_0xc325('0xe')],_0xc325('0x1b'))>moment()){return _0x686b03(null,![],{'message':_0xc325('0x1c')});}else{return utils[_0xc325('0x1d')](_0x2e053a,0x0,![],null)[_0xc325('0x16')](function(){return utils[_0xc325('0x1e')](_0x2e053a);})['then'](function(){return _0x686b03(null,_0x2e053a);});}}else{return _0x686b03(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{return utils[_0xc325('0x1d')](_0x2e053a,0x0,![],null)[_0xc325('0x16')](function(){return utils[_0xc325('0x1e')](_0x2e053a);})[_0xc325('0x16')](function(){return _0x686b03(null,_0x2e053a);})[_0xc325('0x1f')](function(_0x4d2216){return _0x686b03(null,![],_0x4d2216);});}}else{if(_0x2e053a[_0xc325('0x19')]){return _0x686b03(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils[_0xc325('0x1e')](_0x2e053a)[_0xc325('0x16')](function(){return _0x686b03(null,_0x2e053a);});}}}});})[_0xc325('0x1f')](function(_0x1091be){return _0x686b03(null,![],_0x1091be);});}function sendServiceMail(_0x23fe68){return db['MailAccount'][_0xc325('0x20')]({'where':{'service':!![]},'attributes':['id',_0xc325('0x17'),_0xc325('0x21')],'include':[{'model':db[_0xc325('0x22')],'as':_0xc325('0x23'),'include':[{'model':db[_0xc325('0x24')],'as':'CloudProvider'}]}]})[_0xc325('0x16')](function(_0x485f14){if(!_0x485f14){throw new Error('Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!');}var _0x5bdaec=_0x485f14[_0xc325('0x25')]();var _0xa8973f={'account':_0x5bdaec,'message':_['merge']({'from':util[_0xc325('0x26')](_0xc325('0x27'),_0x485f14[_0xc325('0x17')],_0x485f14['email']||_0x485f14[_0xc325('0x23')]['user'])},_0x23fe68)};return client[_0xc325('0x28')]('SendMail',_0xa8973f);})['then'](function(_0x496da8){if(_0x496da8['error']){throw new Error(util[_0xc325('0x26')]('SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!',_0x496da8[_0xc325('0x29')][_0xc325('0x2a')]||JSON[_0xc325('0x2b')](_0x496da8[_0xc325('0x29')])));}return!![];});}function handleError(_0x2d442d,_0x174f0e,_0x323c65){return _0x2d442d['status'](_0x174f0e||0x1f4)[_0xc325('0x2c')]({'message':_0x323c65?_0x323c65['message']||_0x323c65:''});}exports[_0xc325('0x2d')]=function(_0x30eda9,_0x25766e,_0x1384cb){passport['authenticate'](_0xc325('0x2e'),function(_0x22b3ef,_0x4506a2,_0x2570e9){var _0xa62122=_0x22b3ef||_0x2570e9;if(_0xa62122){return handleError(_0x25766e,0x191,_0xa62122);}if(!_0x4506a2){return handleError(_0x25766e,0x194,{'message':_0xc325('0x2f')});}else{var _0x13c984={'payload':{'id':_0x4506a2['id'],'role':_0x4506a2[_0xc325('0x11')]},'options':{'expiresIn':0x15180}};return authService[_0xc325('0x30')](_0x13c984)[_0xc325('0x16')](function(_0x133d60){_0x25766e[_0xc325('0x31')]({'id':_0x4506a2['id'],'token':_0x133d60,'statusCall':'','isAlreadyLogged':_0x4506a2[_0xc325('0x32')]});});}})(_0x30eda9,_0x25766e,_0x1384cb);};exports[_0xc325('0x33')]=function(_0x12b322,_0x3dfb3e){if(!_0x12b322[_0xc325('0x34')][_0xc325('0x21')]){return handleError(_0x3dfb3e,0x1f4,{'message':'Email\x20parameter\x20is\x20missing'});}var _0x1610ab=rs[_0xc325('0x35')]();_0x12b322['body'][_0xc325('0x21')]=_0x12b322[_0xc325('0x34')]['email'][_0xc325('0x36')]()['toLowerCase']();var _0x27fa69;return db['Setting'][_0xc325('0xc')]({'where':{'id':0x1},'attributes':[_0xc325('0xd'),'blockDuration'],'raw':!![]})[_0xc325('0x16')](function(_0x4d1d3a){_0x27fa69=_0x4d1d3a;return db[_0xc325('0x37')]['find']({'where':{'email':_0x12b322[_0xc325('0x34')][_0xc325('0x21')]}});})['then'](function(_0x18bfeb){if(!_0x18bfeb){throw new Error('This\x20email\x20is\x20not\x20registered.');}if(_0x18bfeb[_0xc325('0x12')]){throw new Error(_0xc325('0x38'));}if(_0x18bfeb[_0xc325('0x19')]){if(moment(_0x18bfeb[_0xc325('0x13')])[_0xc325('0x1a')](_0x27fa69[_0xc325('0xe')],_0xc325('0x1b'))>moment()){throw new Error(_0xc325('0x39'));}else{_0x18bfeb[_0xc325('0x19')]=![];_0x18bfeb[_0xc325('0x13')]=null;}}_0x18bfeb[_0xc325('0x3a')]=_0x1610ab;_0x18bfeb[_0xc325('0x3b')]=Date[_0xc325('0x3c')]()+0x36ee80;return _0x18bfeb[_0xc325('0x3d')]();})[_0xc325('0x16')](function(){return sendServiceMail({'to':_0x12b322[_0xc325('0x34')][_0xc325('0x21')],'subject':_0xc325('0x3e'),'text':_0xc325('0x3f')+_0xc325('0x40')+_0xc325('0x41')+_0x12b322[_0xc325('0x42')][_0xc325('0x43')]+'/reset/'+_0x1610ab+'\x0a\x0a'+_0xc325('0x44')});})[_0xc325('0x16')](function(){_0x3dfb3e[_0xc325('0x45')](0xc8)['send']({'message':_0xc325('0x46')});})[_0xc325('0x1f')](function(_0xebae56){return handleError(_0x3dfb3e,0x1f4,_0xebae56);});};exports['reset']=function(_0x1fe5f2,_0x3afefe){return db[_0xc325('0x37')]['find']({'where':{'resetPasswordToken':_0x1fe5f2[_0xc325('0x47')]['token'],'resetPasswordExpires':{'$gt':Date[_0xc325('0x3c')]()}}})[_0xc325('0x16')](function(_0x743746){if(!_0x743746){throw new Error(_0xc325('0x48'));}return db['Setting'][_0xc325('0xc')]({'attributes':['id',_0xc325('0x49'),'enforcePasswordHistory',_0xc325('0x4a')]})[_0xc325('0x16')](function(_0x2f5244){if(_0x2f5244[_0xc325('0x49')])authService['validatePasswordPattern'](_0x1fe5f2[_0xc325('0x34')][_0xc325('0xf')]);if(!_0x2f5244['enforcePasswordHistory']||!_0x743746['previousPasswords'])return _0x743746;authService[_0xc325('0x4b')](_0x1fe5f2[_0xc325('0x34')][_0xc325('0xf')],_0x743746['previousPasswords'],_0x2f5244[_0xc325('0x4a')]);return _0x743746;})[_0xc325('0x16')](function(){_0x743746[_0xc325('0xf')]=_0x1fe5f2['body'][_0xc325('0xf')];_0x743746['resetPasswordToken']=null;_0x743746[_0xc325('0x3b')]=null;return _0x743746[_0xc325('0x3d')]();});})[_0xc325('0x16')](function(){_0x3afefe[_0xc325('0x45')](0xc8)[_0xc325('0x2c')]({'message':'Password\x20reset!'});})[_0xc325('0x1f')](function(_0x5a7d99){return handleError(_0x3afefe,0x1f4,_0x5a7d99);});};passport[_0xc325('0x4c')](_0xc325('0x2e'),new LocalStrategy({'usernameField':_0xc325('0x17'),'passwordField':_0xc325('0xf')},function(_0x12e0d7,_0x447e92,_0xa775ef){return localAuthenticate(db[_0xc325('0x37')],_0x12e0d7,_0x447e92,_0xa775ef);}));
\ No newline at end of file
diff --git a/server/api/authLocal/index.js b/server/api/authLocal/index.js
index 3d55252..d6724a8 100644
--- a/server/api/authLocal/index.js
+++ b/server/api/authLocal/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7d90=['post','/forgot','/reset/:token','reset','exports','express','./authLocal.controller'];(function(_0x4d2943,_0x501535){var _0x51f1b3=function(_0x3432da){while(--_0x3432da){_0x4d2943['push'](_0x4d2943['shift']());}};_0x51f1b3(++_0x501535);}(_0x7d90,0x132));var _0x07d9=function(_0x460e63,_0x8a47d6){_0x460e63=_0x460e63-0x0;var _0x5c65ba=_0x7d90[_0x460e63];return _0x5c65ba;};'use strict';var express=require(_0x07d9('0x0'));var router=express['Router']();var controller=require(_0x07d9('0x1'));router[_0x07d9('0x2')]('/',controller['login']);router[_0x07d9('0x2')](_0x07d9('0x3'),controller['forgot']);router[_0x07d9('0x2')](_0x07d9('0x4'),controller[_0x07d9('0x5')]);module[_0x07d9('0x6')]=router;
\ No newline at end of file
+var _0x9714=['express','Router','login','post','/forgot','forgot','/reset/:token','exports'];(function(_0x2c2980,_0x34282a){var _0x2a20a9=function(_0x537b18){while(--_0x537b18){_0x2c2980['push'](_0x2c2980['shift']());}};_0x2a20a9(++_0x34282a);}(_0x9714,0xa0));var _0x4971=function(_0x4e697a,_0x56a14b){_0x4e697a=_0x4e697a-0x0;var _0x88850c=_0x9714[_0x4e697a];return _0x88850c;};'use strict';var express=require(_0x4971('0x0'));var router=express[_0x4971('0x1')]();var controller=require('./authLocal.controller');router['post']('/',controller[_0x4971('0x2')]);router[_0x4971('0x3')](_0x4971('0x4'),controller[_0x4971('0x5')]);router[_0x4971('0x3')](_0x4971('0x6'),controller['reset']);module[_0x4971('0x7')]=router;
\ No newline at end of file
diff --git a/server/api/automation/automation.attributes.js b/server/api/automation/automation.attributes.js
index efed69b..dcf5dc5 100644
--- a/server/api/automation/automation.attributes.js
+++ b/server/api/automation/automation.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x07c5=['BOOLEAN','INTEGER','sequelize','exports','STRING'];(function(_0xbe5ecd,_0x1a48bd){var _0x27ffa8=function(_0x105001){while(--_0x105001){_0xbe5ecd['push'](_0xbe5ecd['shift']());}};_0x27ffa8(++_0x1a48bd);}(_0x07c5,0x151));var _0x507c=function(_0x4d35e6,_0x5d3ab9){_0x4d35e6=_0x4d35e6-0x0;var _0x14fba6=_0x07c5[_0x4d35e6];return _0x14fba6;};'use strict';var Sequelize=require(_0x507c('0x0'));module[_0x507c('0x1')]={'name':{'type':Sequelize[_0x507c('0x2')],'allowNull':![]},'channel':{'type':Sequelize[_0x507c('0x2')]},'description':{'type':Sequelize[_0x507c('0x2')]},'status':{'type':Sequelize[_0x507c('0x3')],'defaultValue':![]},'timeout':{'type':Sequelize[_0x507c('0x4')],'defaultValue':0xa}};
\ No newline at end of file
+var _0xe654=['BOOLEAN','sequelize','exports','STRING'];(function(_0x743abc,_0x84a83){var _0x5ceb31=function(_0x43857e){while(--_0x43857e){_0x743abc['push'](_0x743abc['shift']());}};_0x5ceb31(++_0x84a83);}(_0xe654,0x1ad));var _0x4e65=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xe654[_0x14add3];return _0x4a174f;};'use strict';var Sequelize=require(_0x4e65('0x0'));module[_0x4e65('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'channel':{'type':Sequelize[_0x4e65('0x2')]},'description':{'type':Sequelize[_0x4e65('0x2')]},'status':{'type':Sequelize[_0x4e65('0x3')],'defaultValue':![]},'timeout':{'type':Sequelize['INTEGER'],'defaultValue':0xa}};
\ No newline at end of file
diff --git a/server/api/automation/automation.controller.js b/server/api/automation/automation.controller.js
index 6604f33..460ef90 100644
--- a/server/api/automation/automation.controller.js
+++ b/server/api/automation/automation.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfc98=['save','update','then','destroy','error','name','index','map','Automation','rawAttributes','key','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','offset','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','rows','catch','show','params','include','find','create','body','addConditions','Condition','ids','omit','findOne','keys','getConditions','Action','getActions','order','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','undefined','limit','count','set','Content-Range','reject'];(function(_0x128043,_0x53dde9){var _0x1e7aa3=function(_0x485410){while(--_0x485410){_0x128043['push'](_0x128043['shift']());}};_0x1e7aa3(++_0x53dde9);}(_0xfc98,0x83));var _0x8fc9=function(_0x29d94e,_0xf386d6){_0x29d94e=_0x29d94e-0x0;var _0x106237=_0xfc98[_0x29d94e];return _0x106237;};'use strict';var emlformat=require(_0x8fc9('0x0'));var rimraf=require(_0x8fc9('0x1'));var zipdir=require(_0x8fc9('0x2'));var jsonpatch=require(_0x8fc9('0x3'));var rp=require(_0x8fc9('0x4'));var moment=require('moment');var BPromise=require(_0x8fc9('0x5'));var Mustache=require('mustache');var util=require(_0x8fc9('0x6'));var path=require(_0x8fc9('0x7'));var sox=require(_0x8fc9('0x8'));var csv=require(_0x8fc9('0x9'));var ejs=require(_0x8fc9('0xa'));var fs=require('fs');var fs_extra=require(_0x8fc9('0xb'));var _=require(_0x8fc9('0xc'));var squel=require(_0x8fc9('0xd'));var crypto=require(_0x8fc9('0xe'));var jsforce=require(_0x8fc9('0xf'));var deskjs=require(_0x8fc9('0x10'));var toCsv=require(_0x8fc9('0x9'));var querystring=require('querystring');var Papa=require(_0x8fc9('0x11'));var Redis=require(_0x8fc9('0x12'));var authService=require(_0x8fc9('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x8fc9('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x8fc9('0x15'))(_0x8fc9('0x16'));var utils=require(_0x8fc9('0x17'));var config=require(_0x8fc9('0x18'));var licenseUtil=require(_0x8fc9('0x19'));var db=require(_0x8fc9('0x1a'))['db'];function respondWithStatusCode(_0x1d918d,_0x149bf7){_0x149bf7=_0x149bf7||0xcc;return function(_0xdb80b7){if(_0xdb80b7){return _0x1d918d[_0x8fc9('0x1b')](_0x149bf7);}return _0x1d918d['status'](_0x149bf7)[_0x8fc9('0x1c')]();};}function respondWithResult(_0x590708,_0x168640){_0x168640=_0x168640||0xc8;return function(_0x15242a){if(_0x15242a){return _0x590708[_0x8fc9('0x1d')](_0x168640)[_0x8fc9('0x1e')](_0x15242a);}};}function respondWithFilteredResult(_0x270174,_0x503774){return function(_0x1fb082){if(_0x1fb082){var _0x291d7b=typeof _0x503774['offset']===_0x8fc9('0x1f')&&typeof _0x503774[_0x8fc9('0x20')]===_0x8fc9('0x1f');var _0x1a66a8=_0x1fb082[_0x8fc9('0x21')];var _0x3f7298=_0x291d7b?0x0:_0x503774['offset'];var _0x350915=_0x291d7b?_0x1fb082['count']:_0x503774['offset']+_0x503774[_0x8fc9('0x20')];var _0x5efa12;if(_0x350915>=_0x1a66a8){_0x350915=_0x1a66a8;_0x5efa12=0xc8;}else{_0x5efa12=0xce;}_0x270174['status'](_0x5efa12);return _0x270174[_0x8fc9('0x22')](_0x8fc9('0x23'),_0x3f7298+'-'+_0x350915+'/'+_0x1a66a8)['json'](_0x1fb082);}return null;};}function patchUpdates(_0x24c05d){return function(_0xd8b37a){try{jsonpatch['apply'](_0xd8b37a,_0x24c05d,!![]);}catch(_0x7f50d9){return BPromise[_0x8fc9('0x24')](_0x7f50d9);}return _0xd8b37a[_0x8fc9('0x25')]();};}function saveUpdates(_0x256330,_0x5793f0){return function(_0x4ae26f){if(_0x4ae26f){return _0x4ae26f[_0x8fc9('0x26')](_0x256330)[_0x8fc9('0x27')](function(_0x2a764b){return _0x2a764b;});}return null;};}function removeEntity(_0x141b20,_0x420f5b){return function(_0x161f75){if(_0x161f75){return _0x161f75[_0x8fc9('0x28')]()[_0x8fc9('0x27')](function(){_0x141b20[_0x8fc9('0x1d')](0xcc)[_0x8fc9('0x1c')]();});}};}function handleEntityNotFound(_0x5356b2,_0x1a33c0){return function(_0x1907a7){if(!_0x1907a7){_0x5356b2[_0x8fc9('0x1b')](0x194);}return _0x1907a7;};}function handleError(_0x148f26,_0x3c58f2){_0x3c58f2=_0x3c58f2||0x1f4;return function(_0x1dac1e){logger[_0x8fc9('0x29')](_0x1dac1e['stack']);if(_0x1dac1e[_0x8fc9('0x2a')]){delete _0x1dac1e[_0x8fc9('0x2a')];}_0x148f26[_0x8fc9('0x1d')](_0x3c58f2)['send'](_0x1dac1e);};}exports[_0x8fc9('0x2b')]=function(_0x672830,_0x1b2678){var _0x370647={},_0x1a09a8={},_0x5f484b={'count':0x0,'rows':[]};var _0x286e35=_[_0x8fc9('0x2c')](db[_0x8fc9('0x2d')][_0x8fc9('0x2e')],function(_0x5c861d){return{'name':_0x5c861d['fieldName'],'type':_0x5c861d['type'][_0x8fc9('0x2f')]};});_0x1a09a8['model']=_['map'](_0x286e35,_0x8fc9('0x2a'));_0x1a09a8['query']=_['keys'](_0x672830[_0x8fc9('0x30')]);_0x1a09a8[_0x8fc9('0x31')]=_[_0x8fc9('0x32')](_0x1a09a8[_0x8fc9('0x33')],_0x1a09a8[_0x8fc9('0x30')]);_0x370647[_0x8fc9('0x34')]=_[_0x8fc9('0x32')](_0x1a09a8['model'],qs[_0x8fc9('0x35')](_0x672830[_0x8fc9('0x30')][_0x8fc9('0x35')]));_0x370647[_0x8fc9('0x34')]=_0x370647[_0x8fc9('0x34')][_0x8fc9('0x36')]?_0x370647[_0x8fc9('0x34')]:_0x1a09a8[_0x8fc9('0x33')];if(!_0x672830[_0x8fc9('0x30')][_0x8fc9('0x37')](_0x8fc9('0x38'))){_0x370647[_0x8fc9('0x20')]=qs[_0x8fc9('0x20')](_0x672830['query'][_0x8fc9('0x20')]);_0x370647[_0x8fc9('0x39')]=qs['offset'](_0x672830[_0x8fc9('0x30')][_0x8fc9('0x39')]);}_0x370647['order']=qs[_0x8fc9('0x3a')](_0x672830[_0x8fc9('0x30')][_0x8fc9('0x3a')]);_0x370647[_0x8fc9('0x3b')]=qs[_0x8fc9('0x31')](_[_0x8fc9('0x3c')](_0x672830[_0x8fc9('0x30')],_0x1a09a8[_0x8fc9('0x31')]),_0x286e35);if(_0x672830[_0x8fc9('0x30')][_0x8fc9('0x3d')]){_0x370647['where']=_[_0x8fc9('0x3e')](_0x370647[_0x8fc9('0x3b')],{'$or':_[_0x8fc9('0x2c')](_0x286e35,function(_0x369ad0){if(_0x369ad0['type']!==_0x8fc9('0x3f')){var _0xc6641f={};_0xc6641f[_0x369ad0[_0x8fc9('0x2a')]]={'$like':'%'+_0x672830[_0x8fc9('0x30')][_0x8fc9('0x3d')]+'%'};return _0xc6641f;}})});}_0x370647=_['merge']({},_0x370647,_0x672830[_0x8fc9('0x40')]);var _0x3dfd65={'where':_0x370647[_0x8fc9('0x3b')]};return db[_0x8fc9('0x2d')][_0x8fc9('0x21')](_0x3dfd65)[_0x8fc9('0x27')](function(_0x3670bf){_0x5f484b['count']=_0x3670bf;if(_0x672830[_0x8fc9('0x30')][_0x8fc9('0x41')]){_0x370647['include']=[{'all':!![]}];}return db['Automation']['findAll'](_0x370647);})['then'](function(_0x239828){_0x5f484b[_0x8fc9('0x42')]=_0x239828;return _0x5f484b;})[_0x8fc9('0x27')](respondWithFilteredResult(_0x1b2678,_0x370647))[_0x8fc9('0x43')](handleError(_0x1b2678,null));};exports[_0x8fc9('0x44')]=function(_0x3db037,_0x4e2741){var _0x32d50f={'raw':![],'where':{'id':_0x3db037[_0x8fc9('0x45')]['id']}},_0x19b4aa={};_0x19b4aa[_0x8fc9('0x33')]=_['keys'](db[_0x8fc9('0x2d')][_0x8fc9('0x2e')]);_0x19b4aa[_0x8fc9('0x30')]=_['keys'](_0x3db037[_0x8fc9('0x30')]);_0x19b4aa[_0x8fc9('0x31')]=_[_0x8fc9('0x32')](_0x19b4aa[_0x8fc9('0x33')],_0x19b4aa[_0x8fc9('0x30')]);_0x32d50f[_0x8fc9('0x34')]=_[_0x8fc9('0x32')](_0x19b4aa['model'],qs[_0x8fc9('0x35')](_0x3db037[_0x8fc9('0x30')][_0x8fc9('0x35')]));_0x32d50f[_0x8fc9('0x34')]=_0x32d50f[_0x8fc9('0x34')][_0x8fc9('0x36')]?_0x32d50f[_0x8fc9('0x34')]:_0x19b4aa[_0x8fc9('0x33')];if(_0x3db037['query'][_0x8fc9('0x41')]){_0x32d50f[_0x8fc9('0x46')]=[{'all':!![]}];}_0x32d50f=_['merge']({},_0x32d50f,_0x3db037[_0x8fc9('0x40')]);return db[_0x8fc9('0x2d')][_0x8fc9('0x47')](_0x32d50f)[_0x8fc9('0x27')](handleEntityNotFound(_0x4e2741,null))[_0x8fc9('0x27')](respondWithResult(_0x4e2741,null))[_0x8fc9('0x43')](handleError(_0x4e2741,null));};exports[_0x8fc9('0x48')]=function(_0x2c2abc,_0x30c14d){return db[_0x8fc9('0x2d')][_0x8fc9('0x48')](_0x2c2abc['body'],{})[_0x8fc9('0x27')](respondWithResult(_0x30c14d,0xc9))[_0x8fc9('0x43')](handleError(_0x30c14d,null));};exports[_0x8fc9('0x26')]=function(_0x22a3d0,_0x2a76a7){if(_0x22a3d0[_0x8fc9('0x49')]['id']){delete _0x22a3d0[_0x8fc9('0x49')]['id'];}return db['Automation'][_0x8fc9('0x47')]({'where':{'id':_0x22a3d0['params']['id']}})[_0x8fc9('0x27')](handleEntityNotFound(_0x2a76a7,null))[_0x8fc9('0x27')](saveUpdates(_0x22a3d0[_0x8fc9('0x49')],null))[_0x8fc9('0x27')](respondWithResult(_0x2a76a7,null))[_0x8fc9('0x43')](handleError(_0x2a76a7,null));};exports[_0x8fc9('0x28')]=function(_0x1ae513,_0x50f73d){return db[_0x8fc9('0x2d')][_0x8fc9('0x47')]({'where':{'id':_0x1ae513[_0x8fc9('0x45')]['id']}})['then'](handleEntityNotFound(_0x50f73d,null))[_0x8fc9('0x27')](removeEntity(_0x50f73d,null))[_0x8fc9('0x43')](handleError(_0x50f73d,null));};exports[_0x8fc9('0x4a')]=function(_0x2b32b7,_0x5ab0e6,_0x1baab2){return db[_0x8fc9('0x4b')]['find']({'where':{'id':_0x2b32b7[_0x8fc9('0x45')]['id']}})[_0x8fc9('0x27')](handleEntityNotFound(_0x5ab0e6,null))[_0x8fc9('0x27')](function(_0x30b385){if(_0x30b385){return _0x30b385[_0x8fc9('0x4a')](_0x2b32b7['body'][_0x8fc9('0x4c')],_[_0x8fc9('0x4d')](_0x2b32b7[_0x8fc9('0x49')],[_0x8fc9('0x4c'),'id'])||{});}})[_0x8fc9('0x27')](respondWithResult(_0x5ab0e6,null))[_0x8fc9('0x43')](handleError(_0x5ab0e6,null));};exports['getConditions']=function(_0xadb5d7,_0x607a85,_0x1ddc79){var _0x1d070f={};var _0x416edb={};var _0x53ad3a;var _0x49f2dd;return db['Automation'][_0x8fc9('0x4e')]({'where':{'id':_0xadb5d7[_0x8fc9('0x45')]['id']}})['then'](handleEntityNotFound(_0x607a85,null))[_0x8fc9('0x27')](function(_0x1c7786){if(_0x1c7786){_0x53ad3a=_0x1c7786;_0x416edb[_0x8fc9('0x33')]=_[_0x8fc9('0x4f')](db[_0x8fc9('0x4b')][_0x8fc9('0x2e')]);_0x416edb[_0x8fc9('0x30')]=_[_0x8fc9('0x4f')](_0xadb5d7[_0x8fc9('0x30')]);_0x416edb[_0x8fc9('0x31')]=_['intersection'](_0x416edb[_0x8fc9('0x33')],_0x416edb['query']);_0x1d070f[_0x8fc9('0x34')]=_[_0x8fc9('0x32')](_0x416edb[_0x8fc9('0x33')],qs[_0x8fc9('0x35')](_0xadb5d7[_0x8fc9('0x30')]['fields']));_0x1d070f[_0x8fc9('0x34')]=_0x1d070f[_0x8fc9('0x34')][_0x8fc9('0x36')]?_0x1d070f[_0x8fc9('0x34')]:_0x416edb[_0x8fc9('0x33')];_0x1d070f['order']=qs[_0x8fc9('0x3a')](_0xadb5d7['query'][_0x8fc9('0x3a')]);_0x1d070f[_0x8fc9('0x3b')]=qs['filters'](_['pick'](_0xadb5d7[_0x8fc9('0x30')],_0x416edb['filters']));if(_0xadb5d7[_0x8fc9('0x30')][_0x8fc9('0x3d')]){_0x1d070f['where']=_[_0x8fc9('0x3e')](_0x1d070f[_0x8fc9('0x3b')],{'$or':_[_0x8fc9('0x2c')](_0x1d070f['attributes'],function(_0x2b9fdc){var _0x3b3ada={};_0x3b3ada[_0x2b9fdc]={'$like':'%'+_0xadb5d7['query']['filter']+'%'};return _0x3b3ada;})});}_0x1d070f=_[_0x8fc9('0x3e')]({},_0x1d070f,_0xadb5d7[_0x8fc9('0x40')]);return _0x53ad3a[_0x8fc9('0x50')](_0x1d070f);}})[_0x8fc9('0x27')](function(_0x19f85a){if(_0x19f85a){_0x49f2dd=_0x19f85a[_0x8fc9('0x36')];if(!_0xadb5d7[_0x8fc9('0x30')]['hasOwnProperty'](_0x8fc9('0x38'))){_0x1d070f[_0x8fc9('0x20')]=qs[_0x8fc9('0x20')](_0xadb5d7[_0x8fc9('0x30')][_0x8fc9('0x20')]);_0x1d070f[_0x8fc9('0x39')]=qs[_0x8fc9('0x39')](_0xadb5d7['query'][_0x8fc9('0x39')]);}return _0x53ad3a[_0x8fc9('0x50')](_0x1d070f);}})['then'](function(_0x1cb197){if(_0x1cb197){return _0x1cb197?{'count':_0x49f2dd,'rows':_0x1cb197}:null;}})['then'](respondWithResult(_0x607a85,null))[_0x8fc9('0x43')](handleError(_0x607a85,null));};exports['addActions']=function(_0x45eb16,_0x46fb06,_0x3413b7){return db[_0x8fc9('0x51')][_0x8fc9('0x47')]({'where':{'id':_0x45eb16[_0x8fc9('0x45')]['id']}})['then'](handleEntityNotFound(_0x46fb06,null))[_0x8fc9('0x27')](function(_0x2cee81){if(_0x2cee81){return _0x2cee81['addActions'](_0x45eb16['body'][_0x8fc9('0x4c')],_[_0x8fc9('0x4d')](_0x45eb16[_0x8fc9('0x49')],[_0x8fc9('0x4c'),'id'])||{});}})[_0x8fc9('0x27')](respondWithResult(_0x46fb06,null))['catch'](handleError(_0x46fb06,null));};exports[_0x8fc9('0x52')]=function(_0xfbf7b2,_0x1c0bc9,_0x5c3a6c){var _0x48f3e0={};var _0x22f65e={};var _0x51febc;var _0x1d97df;return db[_0x8fc9('0x2d')][_0x8fc9('0x4e')]({'where':{'id':_0xfbf7b2['params']['id']}})[_0x8fc9('0x27')](handleEntityNotFound(_0x1c0bc9,null))['then'](function(_0x51a411){if(_0x51a411){_0x51febc=_0x51a411;_0x22f65e[_0x8fc9('0x33')]=_[_0x8fc9('0x4f')](db[_0x8fc9('0x51')][_0x8fc9('0x2e')]);_0x22f65e[_0x8fc9('0x30')]=_[_0x8fc9('0x4f')](_0xfbf7b2[_0x8fc9('0x30')]);_0x22f65e[_0x8fc9('0x31')]=_[_0x8fc9('0x32')](_0x22f65e[_0x8fc9('0x33')],_0x22f65e[_0x8fc9('0x30')]);_0x48f3e0[_0x8fc9('0x34')]=_[_0x8fc9('0x32')](_0x22f65e[_0x8fc9('0x33')],qs[_0x8fc9('0x35')](_0xfbf7b2[_0x8fc9('0x30')][_0x8fc9('0x35')]));_0x48f3e0[_0x8fc9('0x34')]=_0x48f3e0[_0x8fc9('0x34')]['length']?_0x48f3e0['attributes']:_0x22f65e[_0x8fc9('0x33')];_0x48f3e0[_0x8fc9('0x53')]=qs[_0x8fc9('0x3a')](_0xfbf7b2[_0x8fc9('0x30')][_0x8fc9('0x3a')]);_0x48f3e0['where']=qs['filters'](_['pick'](_0xfbf7b2[_0x8fc9('0x30')],_0x22f65e[_0x8fc9('0x31')]));if(_0xfbf7b2['query'][_0x8fc9('0x3d')]){_0x48f3e0['where']=_[_0x8fc9('0x3e')](_0x48f3e0[_0x8fc9('0x3b')],{'$or':_[_0x8fc9('0x2c')](_0x48f3e0[_0x8fc9('0x34')],function(_0xb06341){var _0x26f1ca={};_0x26f1ca[_0xb06341]={'$like':'%'+_0xfbf7b2[_0x8fc9('0x30')]['filter']+'%'};return _0x26f1ca;})});}_0x48f3e0=_[_0x8fc9('0x3e')]({},_0x48f3e0,_0xfbf7b2[_0x8fc9('0x40')]);return _0x51febc[_0x8fc9('0x52')](_0x48f3e0);}})[_0x8fc9('0x27')](function(_0x268519){if(_0x268519){_0x1d97df=_0x268519['length'];if(!_0xfbf7b2[_0x8fc9('0x30')][_0x8fc9('0x37')](_0x8fc9('0x38'))){_0x48f3e0[_0x8fc9('0x20')]=qs[_0x8fc9('0x20')](_0xfbf7b2[_0x8fc9('0x30')][_0x8fc9('0x20')]);_0x48f3e0[_0x8fc9('0x39')]=qs[_0x8fc9('0x39')](_0xfbf7b2[_0x8fc9('0x30')][_0x8fc9('0x39')]);}return _0x51febc['getActions'](_0x48f3e0);}})['then'](function(_0xe98f80){if(_0xe98f80){return _0xe98f80?{'count':_0x1d97df,'rows':_0xe98f80}:null;}})['then'](respondWithResult(_0x1c0bc9,null))[_0x8fc9('0x43')](handleError(_0x1c0bc9,null));};
\ No newline at end of file
+var _0xc738=['request-promise','bluebird','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../config/logger','../../config/environment','../../config/license/util','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','then','destroy','error','name','send','index','map','Automation','rawAttributes','fieldName','type','key','query','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','rows','catch','params','keys','find','create','body','update','Condition','omit','ids','findOne','length','getConditions','addActions','Action','getActions','zip-dir'];(function(_0x4ed520,_0x21be63){var _0x4415a6=function(_0x14b151){while(--_0x14b151){_0x4ed520['push'](_0x4ed520['shift']());}};_0x4415a6(++_0x21be63);}(_0xc738,0x18a));var _0x8c73=function(_0x127a60,_0x37f33a){_0x127a60=_0x127a60-0x0;var _0xc1f6a3=_0xc738[_0x127a60];return _0xc1f6a3;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x8c73('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0x8c73('0x1'));var moment=require('moment');var BPromise=require(_0x8c73('0x2'));var Mustache=require(_0x8c73('0x3'));var util=require(_0x8c73('0x4'));var path=require(_0x8c73('0x5'));var sox=require(_0x8c73('0x6'));var csv=require(_0x8c73('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x8c73('0x8'));var _=require('lodash');var squel=require(_0x8c73('0x9'));var crypto=require(_0x8c73('0xa'));var jsforce=require(_0x8c73('0xb'));var deskjs=require(_0x8c73('0xc'));var toCsv=require(_0x8c73('0x7'));var querystring=require(_0x8c73('0xd'));var Papa=require('papaparse');var Redis=require(_0x8c73('0xe'));var authService=require(_0x8c73('0xf'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x8c73('0x10'))('api');var utils=require('../../config/utils');var config=require(_0x8c73('0x11'));var licenseUtil=require(_0x8c73('0x12'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1de4d1,_0x138654){_0x138654=_0x138654||0xcc;return function(_0x690c7){if(_0x690c7){return _0x1de4d1[_0x8c73('0x13')](_0x138654);}return _0x1de4d1[_0x8c73('0x14')](_0x138654)[_0x8c73('0x15')]();};}function respondWithResult(_0x5b578a,_0x303eda){_0x303eda=_0x303eda||0xc8;return function(_0x456702){if(_0x456702){return _0x5b578a[_0x8c73('0x14')](_0x303eda)['json'](_0x456702);}};}function respondWithFilteredResult(_0x49447d,_0x278061){return function(_0x2e4096){if(_0x2e4096){var _0x5a9963=typeof _0x278061[_0x8c73('0x16')]===_0x8c73('0x17')&&typeof _0x278061[_0x8c73('0x18')]===_0x8c73('0x17');var _0x386717=_0x2e4096[_0x8c73('0x19')];var _0x3bcb44=_0x5a9963?0x0:_0x278061[_0x8c73('0x16')];var _0x204fb4=_0x5a9963?_0x2e4096[_0x8c73('0x19')]:_0x278061[_0x8c73('0x16')]+_0x278061[_0x8c73('0x18')];var _0x52e93c;if(_0x204fb4>=_0x386717){_0x204fb4=_0x386717;_0x52e93c=0xc8;}else{_0x52e93c=0xce;}_0x49447d['status'](_0x52e93c);return _0x49447d[_0x8c73('0x1a')](_0x8c73('0x1b'),_0x3bcb44+'-'+_0x204fb4+'/'+_0x386717)[_0x8c73('0x1c')](_0x2e4096);}return null;};}function patchUpdates(_0x5b8d2e){return function(_0x2c6789){try{jsonpatch[_0x8c73('0x1d')](_0x2c6789,_0x5b8d2e,!![]);}catch(_0x19b14f){return BPromise[_0x8c73('0x1e')](_0x19b14f);}return _0x2c6789[_0x8c73('0x1f')]();};}function saveUpdates(_0x2b7d4b,_0xbeeecb){return function(_0xcac2f7){if(_0xcac2f7){return _0xcac2f7['update'](_0x2b7d4b)[_0x8c73('0x20')](function(_0x3f2bfe){return _0x3f2bfe;});}return null;};}function removeEntity(_0x774cfb,_0x49ebfd){return function(_0x58ed95){if(_0x58ed95){return _0x58ed95[_0x8c73('0x21')]()[_0x8c73('0x20')](function(){_0x774cfb[_0x8c73('0x14')](0xcc)[_0x8c73('0x15')]();});}};}function handleEntityNotFound(_0x2e4cbd,_0x4761ae){return function(_0x580535){if(!_0x580535){_0x2e4cbd[_0x8c73('0x13')](0x194);}return _0x580535;};}function handleError(_0x4d0c4a,_0x27652d){_0x27652d=_0x27652d||0x1f4;return function(_0x2d0658){logger[_0x8c73('0x22')](_0x2d0658['stack']);if(_0x2d0658[_0x8c73('0x23')]){delete _0x2d0658[_0x8c73('0x23')];}_0x4d0c4a[_0x8c73('0x14')](_0x27652d)[_0x8c73('0x24')](_0x2d0658);};}exports[_0x8c73('0x25')]=function(_0xbaac60,_0x427332){var _0x590c72={},_0x3eb387={},_0x129d6e={'count':0x0,'rows':[]};var _0x5f88c7=_[_0x8c73('0x26')](db[_0x8c73('0x27')][_0x8c73('0x28')],function(_0x397c48){return{'name':_0x397c48[_0x8c73('0x29')],'type':_0x397c48[_0x8c73('0x2a')][_0x8c73('0x2b')]};});_0x3eb387['model']=_[_0x8c73('0x26')](_0x5f88c7,_0x8c73('0x23'));_0x3eb387[_0x8c73('0x2c')]=_['keys'](_0xbaac60[_0x8c73('0x2c')]);_0x3eb387[_0x8c73('0x2d')]=_[_0x8c73('0x2e')](_0x3eb387[_0x8c73('0x2f')],_0x3eb387[_0x8c73('0x2c')]);_0x590c72[_0x8c73('0x30')]=_[_0x8c73('0x2e')](_0x3eb387[_0x8c73('0x2f')],qs[_0x8c73('0x31')](_0xbaac60[_0x8c73('0x2c')]['fields']));_0x590c72['attributes']=_0x590c72[_0x8c73('0x30')]['length']?_0x590c72['attributes']:_0x3eb387['model'];if(!_0xbaac60[_0x8c73('0x2c')][_0x8c73('0x32')](_0x8c73('0x33'))){_0x590c72[_0x8c73('0x18')]=qs[_0x8c73('0x18')](_0xbaac60[_0x8c73('0x2c')]['limit']);_0x590c72[_0x8c73('0x16')]=qs[_0x8c73('0x16')](_0xbaac60['query'][_0x8c73('0x16')]);}_0x590c72[_0x8c73('0x34')]=qs[_0x8c73('0x35')](_0xbaac60[_0x8c73('0x2c')]['sort']);_0x590c72[_0x8c73('0x36')]=qs[_0x8c73('0x2d')](_[_0x8c73('0x37')](_0xbaac60['query'],_0x3eb387['filters']),_0x5f88c7);if(_0xbaac60[_0x8c73('0x2c')][_0x8c73('0x38')]){_0x590c72[_0x8c73('0x36')]=_[_0x8c73('0x39')](_0x590c72[_0x8c73('0x36')],{'$or':_[_0x8c73('0x26')](_0x5f88c7,function(_0x202311){if(_0x202311['type']!=='VIRTUAL'){var _0x353788={};_0x353788[_0x202311[_0x8c73('0x23')]]={'$like':'%'+_0xbaac60['query'][_0x8c73('0x38')]+'%'};return _0x353788;}})});}_0x590c72=_[_0x8c73('0x39')]({},_0x590c72,_0xbaac60[_0x8c73('0x3a')]);var _0x64d3f={'where':_0x590c72['where']};return db[_0x8c73('0x27')]['count'](_0x64d3f)[_0x8c73('0x20')](function(_0x40d7ea){_0x129d6e[_0x8c73('0x19')]=_0x40d7ea;if(_0xbaac60[_0x8c73('0x2c')][_0x8c73('0x3b')]){_0x590c72[_0x8c73('0x3c')]=[{'all':!![]}];}return db[_0x8c73('0x27')][_0x8c73('0x3d')](_0x590c72);})[_0x8c73('0x20')](function(_0x19f9e7){_0x129d6e[_0x8c73('0x3e')]=_0x19f9e7;return _0x129d6e;})[_0x8c73('0x20')](respondWithFilteredResult(_0x427332,_0x590c72))[_0x8c73('0x3f')](handleError(_0x427332,null));};exports['show']=function(_0x42c111,_0x4e2606){var _0x228882={'raw':![],'where':{'id':_0x42c111[_0x8c73('0x40')]['id']}},_0x366773={};_0x366773['model']=_['keys'](db['Automation'][_0x8c73('0x28')]);_0x366773['query']=_[_0x8c73('0x41')](_0x42c111['query']);_0x366773[_0x8c73('0x2d')]=_['intersection'](_0x366773['model'],_0x366773[_0x8c73('0x2c')]);_0x228882[_0x8c73('0x30')]=_[_0x8c73('0x2e')](_0x366773[_0x8c73('0x2f')],qs[_0x8c73('0x31')](_0x42c111[_0x8c73('0x2c')][_0x8c73('0x31')]));_0x228882['attributes']=_0x228882['attributes']['length']?_0x228882['attributes']:_0x366773[_0x8c73('0x2f')];if(_0x42c111[_0x8c73('0x2c')]['includeAll']){_0x228882[_0x8c73('0x3c')]=[{'all':!![]}];}_0x228882=_[_0x8c73('0x39')]({},_0x228882,_0x42c111['options']);return db[_0x8c73('0x27')][_0x8c73('0x42')](_0x228882)['then'](handleEntityNotFound(_0x4e2606,null))[_0x8c73('0x20')](respondWithResult(_0x4e2606,null))[_0x8c73('0x3f')](handleError(_0x4e2606,null));};exports[_0x8c73('0x43')]=function(_0x719c3a,_0x1499f7){return db[_0x8c73('0x27')][_0x8c73('0x43')](_0x719c3a[_0x8c73('0x44')],{})[_0x8c73('0x20')](respondWithResult(_0x1499f7,0xc9))[_0x8c73('0x3f')](handleError(_0x1499f7,null));};exports[_0x8c73('0x45')]=function(_0x48e119,_0xbfd284){if(_0x48e119[_0x8c73('0x44')]['id']){delete _0x48e119[_0x8c73('0x44')]['id'];}return db[_0x8c73('0x27')][_0x8c73('0x42')]({'where':{'id':_0x48e119[_0x8c73('0x40')]['id']}})[_0x8c73('0x20')](handleEntityNotFound(_0xbfd284,null))[_0x8c73('0x20')](saveUpdates(_0x48e119[_0x8c73('0x44')],null))[_0x8c73('0x20')](respondWithResult(_0xbfd284,null))[_0x8c73('0x3f')](handleError(_0xbfd284,null));};exports[_0x8c73('0x21')]=function(_0x182fb7,_0x38a965){return db[_0x8c73('0x27')][_0x8c73('0x42')]({'where':{'id':_0x182fb7[_0x8c73('0x40')]['id']}})[_0x8c73('0x20')](handleEntityNotFound(_0x38a965,null))[_0x8c73('0x20')](removeEntity(_0x38a965,null))['catch'](handleError(_0x38a965,null));};exports['addConditions']=function(_0x1497ab,_0x129186,_0x2de2b8){return db[_0x8c73('0x46')][_0x8c73('0x42')]({'where':{'id':_0x1497ab['params']['id']}})[_0x8c73('0x20')](handleEntityNotFound(_0x129186,null))[_0x8c73('0x20')](function(_0x34206d){if(_0x34206d){return _0x34206d['addConditions'](_0x1497ab[_0x8c73('0x44')]['ids'],_[_0x8c73('0x47')](_0x1497ab[_0x8c73('0x44')],[_0x8c73('0x48'),'id'])||{});}})['then'](respondWithResult(_0x129186,null))[_0x8c73('0x3f')](handleError(_0x129186,null));};exports['getConditions']=function(_0x46bdb8,_0x32fbfa,_0x1c7e2f){var _0x145062={};var _0x33a1f6={};var _0x181b5a;var _0x4611b4;return db[_0x8c73('0x27')][_0x8c73('0x49')]({'where':{'id':_0x46bdb8['params']['id']}})[_0x8c73('0x20')](handleEntityNotFound(_0x32fbfa,null))['then'](function(_0x3140bf){if(_0x3140bf){_0x181b5a=_0x3140bf;_0x33a1f6[_0x8c73('0x2f')]=_['keys'](db[_0x8c73('0x46')]['rawAttributes']);_0x33a1f6[_0x8c73('0x2c')]=_[_0x8c73('0x41')](_0x46bdb8[_0x8c73('0x2c')]);_0x33a1f6[_0x8c73('0x2d')]=_['intersection'](_0x33a1f6[_0x8c73('0x2f')],_0x33a1f6[_0x8c73('0x2c')]);_0x145062['attributes']=_[_0x8c73('0x2e')](_0x33a1f6[_0x8c73('0x2f')],qs[_0x8c73('0x31')](_0x46bdb8[_0x8c73('0x2c')]['fields']));_0x145062[_0x8c73('0x30')]=_0x145062[_0x8c73('0x30')][_0x8c73('0x4a')]?_0x145062[_0x8c73('0x30')]:_0x33a1f6[_0x8c73('0x2f')];_0x145062['order']=qs['sort'](_0x46bdb8[_0x8c73('0x2c')][_0x8c73('0x35')]);_0x145062[_0x8c73('0x36')]=qs[_0x8c73('0x2d')](_[_0x8c73('0x37')](_0x46bdb8[_0x8c73('0x2c')],_0x33a1f6[_0x8c73('0x2d')]));if(_0x46bdb8['query'][_0x8c73('0x38')]){_0x145062[_0x8c73('0x36')]=_[_0x8c73('0x39')](_0x145062[_0x8c73('0x36')],{'$or':_[_0x8c73('0x26')](_0x145062[_0x8c73('0x30')],function(_0x215ae0){var _0x46d187={};_0x46d187[_0x215ae0]={'$like':'%'+_0x46bdb8[_0x8c73('0x2c')][_0x8c73('0x38')]+'%'};return _0x46d187;})});}_0x145062=_['merge']({},_0x145062,_0x46bdb8[_0x8c73('0x3a')]);return _0x181b5a[_0x8c73('0x4b')](_0x145062);}})['then'](function(_0x22a2cc){if(_0x22a2cc){_0x4611b4=_0x22a2cc['length'];if(!_0x46bdb8[_0x8c73('0x2c')][_0x8c73('0x32')](_0x8c73('0x33'))){_0x145062[_0x8c73('0x18')]=qs[_0x8c73('0x18')](_0x46bdb8[_0x8c73('0x2c')][_0x8c73('0x18')]);_0x145062['offset']=qs[_0x8c73('0x16')](_0x46bdb8[_0x8c73('0x2c')][_0x8c73('0x16')]);}return _0x181b5a[_0x8c73('0x4b')](_0x145062);}})[_0x8c73('0x20')](function(_0x11f849){if(_0x11f849){return _0x11f849?{'count':_0x4611b4,'rows':_0x11f849}:null;}})[_0x8c73('0x20')](respondWithResult(_0x32fbfa,null))[_0x8c73('0x3f')](handleError(_0x32fbfa,null));};exports[_0x8c73('0x4c')]=function(_0x2c93fb,_0x248a96,_0x31e464){return db[_0x8c73('0x4d')][_0x8c73('0x42')]({'where':{'id':_0x2c93fb[_0x8c73('0x40')]['id']}})['then'](handleEntityNotFound(_0x248a96,null))['then'](function(_0x5f548c){if(_0x5f548c){return _0x5f548c['addActions'](_0x2c93fb['body'][_0x8c73('0x48')],_[_0x8c73('0x47')](_0x2c93fb[_0x8c73('0x44')],[_0x8c73('0x48'),'id'])||{});}})['then'](respondWithResult(_0x248a96,null))[_0x8c73('0x3f')](handleError(_0x248a96,null));};exports[_0x8c73('0x4e')]=function(_0x366dce,_0x59a26e,_0x17f853){var _0x34a7ca={};var _0x56a594={};var _0x43336c;var _0x487049;return db['Automation'][_0x8c73('0x49')]({'where':{'id':_0x366dce[_0x8c73('0x40')]['id']}})[_0x8c73('0x20')](handleEntityNotFound(_0x59a26e,null))[_0x8c73('0x20')](function(_0x1934d7){if(_0x1934d7){_0x43336c=_0x1934d7;_0x56a594['model']=_['keys'](db[_0x8c73('0x4d')][_0x8c73('0x28')]);_0x56a594[_0x8c73('0x2c')]=_[_0x8c73('0x41')](_0x366dce[_0x8c73('0x2c')]);_0x56a594[_0x8c73('0x2d')]=_[_0x8c73('0x2e')](_0x56a594[_0x8c73('0x2f')],_0x56a594['query']);_0x34a7ca['attributes']=_[_0x8c73('0x2e')](_0x56a594[_0x8c73('0x2f')],qs['fields'](_0x366dce[_0x8c73('0x2c')][_0x8c73('0x31')]));_0x34a7ca[_0x8c73('0x30')]=_0x34a7ca[_0x8c73('0x30')][_0x8c73('0x4a')]?_0x34a7ca[_0x8c73('0x30')]:_0x56a594[_0x8c73('0x2f')];_0x34a7ca[_0x8c73('0x34')]=qs['sort'](_0x366dce['query'][_0x8c73('0x35')]);_0x34a7ca['where']=qs[_0x8c73('0x2d')](_['pick'](_0x366dce['query'],_0x56a594[_0x8c73('0x2d')]));if(_0x366dce['query'][_0x8c73('0x38')]){_0x34a7ca['where']=_[_0x8c73('0x39')](_0x34a7ca[_0x8c73('0x36')],{'$or':_[_0x8c73('0x26')](_0x34a7ca[_0x8c73('0x30')],function(_0x1e62fc){var _0x477b28={};_0x477b28[_0x1e62fc]={'$like':'%'+_0x366dce[_0x8c73('0x2c')][_0x8c73('0x38')]+'%'};return _0x477b28;})});}_0x34a7ca=_[_0x8c73('0x39')]({},_0x34a7ca,_0x366dce[_0x8c73('0x3a')]);return _0x43336c[_0x8c73('0x4e')](_0x34a7ca);}})['then'](function(_0x56889b){if(_0x56889b){_0x487049=_0x56889b[_0x8c73('0x4a')];if(!_0x366dce['query'][_0x8c73('0x32')](_0x8c73('0x33'))){_0x34a7ca['limit']=qs[_0x8c73('0x18')](_0x366dce[_0x8c73('0x2c')][_0x8c73('0x18')]);_0x34a7ca['offset']=qs[_0x8c73('0x16')](_0x366dce['query'][_0x8c73('0x16')]);}return _0x43336c[_0x8c73('0x4e')](_0x34a7ca);}})[_0x8c73('0x20')](function(_0x39c77f){if(_0x39c77f){return _0x39c77f?{'count':_0x487049,'rows':_0x39c77f}:null;}})[_0x8c73('0x20')](respondWithResult(_0x59a26e,null))['catch'](handleError(_0x59a26e,null));};
\ No newline at end of file
diff --git a/server/api/automation/automation.model.js b/server/api/automation/automation.model.js
index 4115901..147f4f2 100644
--- a/server/api/automation/automation.model.js
+++ b/server/api/automation/automation.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6251=['api','moment','bluebird','path','../../config/environment','./automation.attributes','define','Automation','tools_automations','lodash','util'];(function(_0x1fa226,_0x575465){var _0x3579a6=function(_0xf8a680){while(--_0xf8a680){_0x1fa226['push'](_0x1fa226['shift']());}};_0x3579a6(++_0x575465);}(_0x6251,0x1b6));var _0x1625=function(_0x52b250,_0x5e6396){_0x52b250=_0x52b250-0x0;var _0x592993=_0x6251[_0x52b250];return _0x592993;};'use strict';var _=require(_0x1625('0x0'));var util=require(_0x1625('0x1'));var logger=require('../../config/logger')(_0x1625('0x2'));var moment=require(_0x1625('0x3'));var BPromise=require(_0x1625('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x1625('0x5'));var rimraf=require('rimraf');var config=require(_0x1625('0x6'));var attributes=require(_0x1625('0x7'));module['exports']=function(_0x2ace66,_0x2e3eab){return _0x2ace66[_0x1625('0x8')](_0x1625('0x9'),attributes,{'tableName':_0x1625('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x9cf2=['tools_automations','lodash','util','../../config/logger','api','moment','bluebird','path','../../config/environment','./automation.attributes','exports','Automation'];(function(_0x17035c,_0x4128f1){var _0x5adf50=function(_0xa0335c){while(--_0xa0335c){_0x17035c['push'](_0x17035c['shift']());}};_0x5adf50(++_0x4128f1);}(_0x9cf2,0x1bd));var _0x29cf=function(_0x512e16,_0x4f7249){_0x512e16=_0x512e16-0x0;var _0xedb9bd=_0x9cf2[_0x512e16];return _0xedb9bd;};'use strict';var _=require(_0x29cf('0x0'));var util=require(_0x29cf('0x1'));var logger=require(_0x29cf('0x2'))(_0x29cf('0x3'));var moment=require(_0x29cf('0x4'));var BPromise=require(_0x29cf('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x29cf('0x6'));var rimraf=require('rimraf');var config=require(_0x29cf('0x7'));var attributes=require(_0x29cf('0x8'));module[_0x29cf('0x9')]=function(_0x3a7a04,_0x4cc76b){return _0x3a7a04['define'](_0x29cf('0xa'),attributes,{'tableName':_0x29cf('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/automation/automation.rpc.js b/server/api/automation/automation.rpc.js
index 4a7811c..731a80d 100644
--- a/server/api/automation/automation.rpc.js
+++ b/server/api/automation/automation.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa329=['ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','info','Automation,\x20%s,\x20%s','request\x20sent','debug','Automation,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','bluebird'];(function(_0x46f0e7,_0xf642b1){var _0x31bc18=function(_0x1c7f25){while(--_0x1c7f25){_0x46f0e7['push'](_0x46f0e7['shift']());}};_0x31bc18(++_0xf642b1);}(_0xa329,0x162));var _0x9a32=function(_0x1a761a,_0xb6f892){_0x1a761a=_0x1a761a-0x0;var _0x4d4149=_0xa329[_0x1a761a];return _0x4d4149;};'use strict';var _=require(_0x9a32('0x0'));var util=require(_0x9a32('0x1'));var moment=require('moment');var BPromise=require(_0x9a32('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9a32('0x3'));var db=require(_0x9a32('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x9a32('0x5'));var config=require(_0x9a32('0x6'));var jayson=require(_0x9a32('0x7'));var client=jayson[_0x9a32('0x8')][_0x9a32('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x235b92,_0x4a8fba,_0x5b8b5e){return new BPromise(function(_0x4dc7f8,_0x344b35){return client[_0x9a32('0xa')](_0x235b92,_0x5b8b5e)['then'](function(_0x38f6cc){logger[_0x9a32('0xb')](_0x9a32('0xc'),_0x4a8fba,_0x9a32('0xd'));logger[_0x9a32('0xe')](_0x9a32('0xf'),_0x4a8fba,'request\x20sent',JSON[_0x9a32('0x10')](_0x38f6cc));if(_0x38f6cc[_0x9a32('0x11')]){if(_0x38f6cc['error']['code']===0x1f4){logger[_0x9a32('0x11')](_0x9a32('0xc'),_0x4a8fba,_0x38f6cc['error']['message']);return _0x344b35(_0x38f6cc[_0x9a32('0x11')][_0x9a32('0x12')]);}logger[_0x9a32('0x11')](_0x9a32('0xc'),_0x4a8fba,_0x38f6cc['error'][_0x9a32('0x12')]);return _0x4dc7f8(_0x38f6cc[_0x9a32('0x11')]['message']);}else{logger[_0x9a32('0xb')](_0x9a32('0xc'),_0x4a8fba,_0x9a32('0xd'));_0x4dc7f8(_0x38f6cc[_0x9a32('0x13')][_0x9a32('0x12')]);}})[_0x9a32('0x14')](function(_0x4fa645){logger[_0x9a32('0x11')](_0x9a32('0xc'),_0x4a8fba,_0x4fa645);_0x344b35(_0x4fa645);});});}
\ No newline at end of file
+var _0xc5b3=['client','request','then','info','Automation,\x20%s,\x20%s','request\x20sent','debug','Automation,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment'];(function(_0x4a3898,_0x4c9853){var _0x25ceb0=function(_0x528b6d){while(--_0x528b6d){_0x4a3898['push'](_0x4a3898['shift']());}};_0x25ceb0(++_0x4c9853);}(_0xc5b3,0x1ee));var _0x3c5b=function(_0x1a0600,_0x41feef){_0x1a0600=_0x1a0600-0x0;var _0x734670=_0xc5b3[_0x1a0600];return _0x734670;};'use strict';var _=require(_0x3c5b('0x0'));var util=require(_0x3c5b('0x1'));var moment=require(_0x3c5b('0x2'));var BPromise=require(_0x3c5b('0x3'));var rs=require(_0x3c5b('0x4'));var fs=require('fs');var Redis=require(_0x3c5b('0x5'));var db=require(_0x3c5b('0x6'))['db'];var utils=require(_0x3c5b('0x7'));var logger=require('../../config/logger')(_0x3c5b('0x8'));var config=require(_0x3c5b('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x3c5b('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x7a363e,_0x4730e9,_0x894f97){return new BPromise(function(_0xae86a0,_0x32586d){return client[_0x3c5b('0xb')](_0x7a363e,_0x894f97)[_0x3c5b('0xc')](function(_0x5f5df9){logger[_0x3c5b('0xd')](_0x3c5b('0xe'),_0x4730e9,_0x3c5b('0xf'));logger[_0x3c5b('0x10')](_0x3c5b('0x11'),_0x4730e9,'request\x20sent',JSON[_0x3c5b('0x12')](_0x5f5df9));if(_0x5f5df9[_0x3c5b('0x13')]){if(_0x5f5df9[_0x3c5b('0x13')][_0x3c5b('0x14')]===0x1f4){logger[_0x3c5b('0x13')](_0x3c5b('0xe'),_0x4730e9,_0x5f5df9[_0x3c5b('0x13')]['message']);return _0x32586d(_0x5f5df9[_0x3c5b('0x13')][_0x3c5b('0x15')]);}logger[_0x3c5b('0x13')](_0x3c5b('0xe'),_0x4730e9,_0x5f5df9['error'][_0x3c5b('0x15')]);return _0xae86a0(_0x5f5df9['error'][_0x3c5b('0x15')]);}else{logger[_0x3c5b('0xd')]('Automation,\x20%s,\x20%s',_0x4730e9,_0x3c5b('0xf'));_0xae86a0(_0x5f5df9[_0x3c5b('0x16')]['message']);}})[_0x3c5b('0x17')](function(_0x1cbe52){logger[_0x3c5b('0x13')]('Automation,\x20%s,\x20%s',_0x4730e9,_0x1cbe52);_0x32586d(_0x1cbe52);});});}
\ No newline at end of file
diff --git a/server/api/automation/index.js b/server/api/automation/index.js
index 4c10c19..3ab10f4 100644
--- a/server/api/automation/index.js
+++ b/server/api/automation/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4d33=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./automation.controller','get','isAuthenticated','/:id','show','/:id/actions','getActions','post','create','/:id/conditions','addConditions','addActions','put','update','destroy','util','connect-timeout'];(function(_0x2ff2a5,_0x564e1){var _0x2f7dcb=function(_0x45fbb5){while(--_0x45fbb5){_0x2ff2a5['push'](_0x2ff2a5['shift']());}};_0x2f7dcb(++_0x564e1);}(_0x4d33,0x1cc));var _0x34d3=function(_0xac0de1,_0x12d3d9){_0xac0de1=_0xac0de1-0x0;var _0x1c1995=_0x4d33[_0xac0de1];return _0x1c1995;};'use strict';var multer=require('multer');var util=require(_0x34d3('0x0'));var path=require('path');var timeout=require(_0x34d3('0x1'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x34d3('0x2'));var auth=require(_0x34d3('0x3'));var interaction=require(_0x34d3('0x4'));var config=require(_0x34d3('0x5'));var controller=require(_0x34d3('0x6'));router[_0x34d3('0x7')]('/',auth[_0x34d3('0x8')](),controller['index']);router[_0x34d3('0x7')](_0x34d3('0x9'),auth[_0x34d3('0x8')](),controller[_0x34d3('0xa')]);router['get']('/:id/conditions',auth[_0x34d3('0x8')](),controller['getConditions']);router[_0x34d3('0x7')](_0x34d3('0xb'),auth['isAuthenticated'](),controller[_0x34d3('0xc')]);router[_0x34d3('0xd')]('/',auth[_0x34d3('0x8')](),controller[_0x34d3('0xe')]);router[_0x34d3('0xd')](_0x34d3('0xf'),auth['isAuthenticated'](),controller[_0x34d3('0x10')]);router[_0x34d3('0xd')](_0x34d3('0xb'),auth[_0x34d3('0x8')](),controller[_0x34d3('0x11')]);router[_0x34d3('0x12')]('/:id',auth['isAuthenticated'](),controller[_0x34d3('0x13')]);router['delete']('/:id',auth[_0x34d3('0x8')](),controller[_0x34d3('0x14')]);module['exports']=router;
\ No newline at end of file
+var _0xb2ff=['show','/:id/conditions','post','create','addConditions','/:id/actions','addActions','put','delete','destroy','exports','multer','util','connect-timeout','../../components/auth/service','../../config/environment','./automation.controller','get','isAuthenticated','/:id'];(function(_0x1c22ac,_0x4c86bd){var _0x4c867a=function(_0x370c7d){while(--_0x370c7d){_0x1c22ac['push'](_0x1c22ac['shift']());}};_0x4c867a(++_0x4c86bd);}(_0xb2ff,0x123));var _0xfb2f=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0xb2ff[_0x3bf83f];return _0x22c4a9;};'use strict';var multer=require(_0xfb2f('0x0'));var util=require(_0xfb2f('0x1'));var path=require('path');var timeout=require(_0xfb2f('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xfb2f('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0xfb2f('0x4'));var controller=require(_0xfb2f('0x5'));router[_0xfb2f('0x6')]('/',auth[_0xfb2f('0x7')](),controller['index']);router['get'](_0xfb2f('0x8'),auth['isAuthenticated'](),controller[_0xfb2f('0x9')]);router[_0xfb2f('0x6')](_0xfb2f('0xa'),auth[_0xfb2f('0x7')](),controller['getConditions']);router[_0xfb2f('0x6')]('/:id/actions',auth[_0xfb2f('0x7')](),controller['getActions']);router[_0xfb2f('0xb')]('/',auth[_0xfb2f('0x7')](),controller[_0xfb2f('0xc')]);router[_0xfb2f('0xb')](_0xfb2f('0xa'),auth['isAuthenticated'](),controller[_0xfb2f('0xd')]);router[_0xfb2f('0xb')](_0xfb2f('0xe'),auth[_0xfb2f('0x7')](),controller[_0xfb2f('0xf')]);router[_0xfb2f('0x10')](_0xfb2f('0x8'),auth[_0xfb2f('0x7')](),controller['update']);router[_0xfb2f('0x11')](_0xfb2f('0x8'),auth[_0xfb2f('0x7')](),controller[_0xfb2f('0x12')]);module[_0xfb2f('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/campaign/campaign.attributes.js b/server/api/campaign/campaign.attributes.js
index 5a7e498..68b0dc8 100644
--- a/server/api/campaign/campaign.attributes.js
+++ b/server/api/campaign/campaign.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9c3b=['onlyIfOpen','Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Min\x20Word\x20Length','#AMD\x20Maximum\x20Word\x20Length','DESC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','#Drop\x20Retry\x20(min:1,\x20max:999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Abandoned\x20Retry\x20(min:1,\x20max:999)','Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#AgentReject\x20Retry\x20(min:1,\x20max:999)','STRING','name','ivr','BOOLEAN','Active/Disactive\x20Campaign','INTEGER','UNSIGNED','Max\x20200\x20calls.','Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Busy\x20Retry\x20(min:1,\x20max:999)','Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','ENUM','always','never'];(function(_0x1e5681,_0xe9698f){var _0x484a8a=function(_0xa4c0e8){while(--_0xa4c0e8){_0x1e5681['push'](_0x1e5681['shift']());}};_0x484a8a(++_0xe9698f);}(_0x9c3b,0x12f));var _0xb9c3=function(_0x237340,_0x39b15d){_0x237340=_0x237340-0x0;var _0x5542c8=_0x9c3b[_0x237340];return _0x5542c8;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xb9c3('0x0')],'unique':_0xb9c3('0x1'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize['ENUM']('ivr'),'allowNull':![],'defaultValue':_0xb9c3('0x2')},'description':{'type':Sequelize['STRING']},'active':{'type':Sequelize[_0xb9c3('0x3')],'defaultValue':0x0,'comment':_0xb9c3('0x4')},'limitCalls':{'type':Sequelize[_0xb9c3('0x5')](0x4)[_0xb9c3('0x6')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0xb9c3('0x7')},'dialOriginateCallerIdName':{'type':Sequelize[_0xb9c3('0x0')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0xb9c3('0x0')]},'dialOriginateTimeout':{'type':Sequelize[_0xb9c3('0x5')](0x3)[_0xb9c3('0x6')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':'Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)'},'dialCongestionMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0xb9c3('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Congestion\x20Retry\x20(min:1,\x20max:999)'},'dialCongestionRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0xb9c3('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xb9c3('0x8')},'dialBusyMaxRetry':{'type':Sequelize[_0xb9c3('0x5')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xb9c3('0x9')},'dialBusyRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0xb9c3('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xb9c3('0xa')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0xb9c3('0x5')](0x3)[_0xb9c3('0x6')],'defaultValue':0x3,'comment':_0xb9c3('0xb')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0xb9c3('0x5')](0x5)[_0xb9c3('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xb9c3('0xc')},'dialGlobalMaxRetry':{'type':Sequelize[_0xb9c3('0x5')](0x3)[_0xb9c3('0x6')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0xb9c3('0xd')},'dialTimezone':{'type':Sequelize['STRING'],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0xb9c3('0x0')],'defaultValue':'07:00-22:00,*,*,*'},'dialCheckDuplicateType':{'type':Sequelize[_0xb9c3('0xe')](_0xb9c3('0xf'),_0xb9c3('0x10'),_0xb9c3('0x11')),'defaultValue':'always'},'dialAMDActive':{'type':Sequelize[_0xb9c3('0x3')],'defaultValue':0x0,'comment':_0xb9c3('0x12')},'dialAMDInitialSilence':{'type':Sequelize[_0xb9c3('0x5')](0x9)[_0xb9c3('0x6')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0xb9c3('0x13')},'dialAMDGreeting':{'type':Sequelize[_0xb9c3('0x5')](0x9)[_0xb9c3('0x6')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':'#AMD\x20Greeting'},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0xb9c3('0x5')](0x9)[_0xb9c3('0x6')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0xb9c3('0x14')},'dialAMDTotalAnalysisTime':{'type':Sequelize['INTEGER'](0x9)[_0xb9c3('0x6')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0xb9c3('0x15')},'dialAMDMinWordLength':{'type':Sequelize[_0xb9c3('0x5')](0x9)[_0xb9c3('0x6')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0xb9c3('0x16')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0xb9c3('0x5')](0x9)[_0xb9c3('0x6')],'defaultValue':0x32,'validate':{'min':0x0},'comment':'#AMD\x20Between\x20Words\x20Silence'},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0xb9c3('0x5')](0x9)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x0},'comment':'#AMD\x20Maximum\x20Number\x20Of\x20Words'},'dialAMDSilenceThreshold':{'type':Sequelize[_0xb9c3('0x5')](0x5)['UNSIGNED'],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':'#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)'},'dialAMDMaximumWordLength':{'type':Sequelize['INTEGER'](0x9)[_0xb9c3('0x6')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0xb9c3('0x17')},'dialOrderByScheduledAt':{'type':Sequelize[_0xb9c3('0xe')](_0xb9c3('0x18'),'ASC'),'defaultValue':'DESC'},'dialPrefix':{'type':Sequelize[_0xb9c3('0x0')],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0xb9c3('0x5')](0x3)[_0xb9c3('0x6')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xb9c3('0x19')},'dialCutDigit':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Cut\x20Digit\x20(min:1,\x20max:15)'},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0xb9c3('0x5')](0x3)[_0xb9c3('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)'},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0xb9c3('0x5')](0x5)[_0xb9c3('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialDropMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0xb9c3('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xb9c3('0x1a')},'dialDropRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0xb9c3('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xb9c3('0x1b')},'dialAbandonedMaxRetry':{'type':Sequelize[_0xb9c3('0x5')](0x3)[_0xb9c3('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xb9c3('0x1c')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0xb9c3('0x5')](0x5)[_0xb9c3('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xb9c3('0x1d')},'dialMachineMaxRetry':{'type':Sequelize[_0xb9c3('0x5')](0x3)[_0xb9c3('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Machine\x20Retry\x20(min:1,\x20max:999)'},'dialMachineRetryFrequency':{'type':Sequelize[_0xb9c3('0x5')](0x5)[_0xb9c3('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xb9c3('0x1e')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0xb9c3('0x5')](0x3)[_0xb9c3('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xb9c3('0x1f')},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0xb9c3('0x5')](0x5)[_0xb9c3('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'}};
\ No newline at end of file
+var _0xef6a=['INTEGER','UNSIGNED','Max\x20200\x20calls.','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','#Congestion\x20Retry\x20(min:1,\x20max:999)','#Busy\x20Retry\x20(min:1,\x20max:999)','Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','ENUM','always','onlyIfOpen','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Min\x20Word\x20Length','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','DESC','ASC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Abandoned\x20Retry\x20(min:1,\x20max:999)','Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#AgentReject\x20Retry\x20(min:1,\x20max:999)','AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','exports','STRING','name','BOOLEAN'];(function(_0x51d1ae,_0x22ab91){var _0x44959d=function(_0x19f122){while(--_0x19f122){_0x51d1ae['push'](_0x51d1ae['shift']());}};_0x44959d(++_0x22ab91);}(_0xef6a,0x1b8));var _0xaef6=function(_0x26462c,_0xd20a35){_0x26462c=_0x26462c-0x0;var _0x509a42=_0xef6a[_0x26462c];return _0x509a42;};'use strict';var Sequelize=require('sequelize');module[_0xaef6('0x0')]={'name':{'type':Sequelize[_0xaef6('0x1')],'unique':_0xaef6('0x2'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize['ENUM']('ivr'),'allowNull':![],'defaultValue':'ivr'},'description':{'type':Sequelize[_0xaef6('0x1')]},'active':{'type':Sequelize[_0xaef6('0x3')],'defaultValue':0x0,'comment':'Active/Disactive\x20Campaign'},'limitCalls':{'type':Sequelize[_0xaef6('0x4')](0x4)[_0xaef6('0x5')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0xaef6('0x6')},'dialOriginateCallerIdName':{'type':Sequelize['STRING']},'dialOriginateCallerIdNumber':{'type':Sequelize[_0xaef6('0x1')]},'dialOriginateTimeout':{'type':Sequelize[_0xaef6('0x4')](0x3)[_0xaef6('0x5')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0xaef6('0x7')},'dialCongestionMaxRetry':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xaef6('0x8')},'dialCongestionRetryFrequency':{'type':Sequelize[_0xaef6('0x4')](0x5)[_0xaef6('0x5')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialBusyMaxRetry':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xaef6('0x9')},'dialBusyRetryFrequency':{'type':Sequelize[_0xaef6('0x4')](0x5)[_0xaef6('0x5')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xaef6('0xa')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0xaef6('0x4')](0x3)[_0xaef6('0x5')],'defaultValue':0x3,'comment':_0xaef6('0xb')},'dialNoAnswerRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialGlobalMaxRetry':{'type':Sequelize[_0xaef6('0x4')](0x3)[_0xaef6('0x5')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0xaef6('0xc')},'dialTimezone':{'type':Sequelize[_0xaef6('0x1')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0xaef6('0x1')],'defaultValue':_0xaef6('0xd')},'dialCheckDuplicateType':{'type':Sequelize[_0xaef6('0xe')](_0xaef6('0xf'),'never',_0xaef6('0x10')),'defaultValue':_0xaef6('0xf')},'dialAMDActive':{'type':Sequelize[_0xaef6('0x3')],'defaultValue':0x0,'comment':'Active/Disactive\x20AMD'},'dialAMDInitialSilence':{'type':Sequelize[_0xaef6('0x4')](0x9)[_0xaef6('0x5')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0xaef6('0x11')},'dialAMDGreeting':{'type':Sequelize[_0xaef6('0x4')](0x9)[_0xaef6('0x5')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0xaef6('0x12')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0xaef6('0x4')](0x9)[_0xaef6('0x5')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0xaef6('0x13')},'dialAMDTotalAnalysisTime':{'type':Sequelize['INTEGER'](0x9)[_0xaef6('0x5')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0xaef6('0x14')},'dialAMDMinWordLength':{'type':Sequelize[_0xaef6('0x4')](0x9)[_0xaef6('0x5')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0xaef6('0x15')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0xaef6('0x4')](0x9)[_0xaef6('0x5')],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0xaef6('0x16')},'dialAMDMaximumNumberOfWords':{'type':Sequelize['INTEGER'](0x9)[_0xaef6('0x5')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0xaef6('0x17')},'dialAMDSilenceThreshold':{'type':Sequelize[_0xaef6('0x4')](0x5)[_0xaef6('0x5')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0xaef6('0x18')},'dialAMDMaximumWordLength':{'type':Sequelize['INTEGER'](0x9)[_0xaef6('0x5')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0xaef6('0x19')},'dialOrderByScheduledAt':{'type':Sequelize[_0xaef6('0xe')](_0xaef6('0x1a'),_0xaef6('0x1b')),'defaultValue':_0xaef6('0x1a')},'dialPrefix':{'type':Sequelize[_0xaef6('0x1')],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xaef6('0x1c')},'dialCutDigit':{'type':Sequelize[_0xaef6('0x4')](0x3)[_0xaef6('0x5')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xaef6('0x1d')},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0xaef6('0x4')](0x3)[_0xaef6('0x5')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)'},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0xaef6('0x4')](0x5)[_0xaef6('0x5')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xaef6('0x1e')},'dialDropMaxRetry':{'type':Sequelize[_0xaef6('0x4')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Drop\x20Retry\x20(min:1,\x20max:999)'},'dialDropRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0xaef6('0x5')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xaef6('0x1f')},'dialAbandonedMaxRetry':{'type':Sequelize[_0xaef6('0x4')](0x3)[_0xaef6('0x5')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xaef6('0x20')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0xaef6('0x4')](0x5)[_0xaef6('0x5')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xaef6('0x21')},'dialMachineMaxRetry':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Machine\x20Retry\x20(min:1,\x20max:999)'},'dialMachineRetryFrequency':{'type':Sequelize[_0xaef6('0x4')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xaef6('0x22')},'dialAgentRejectMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0xaef6('0x5')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xaef6('0x23')},'dialAgentRejectRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0xaef6('0x5')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xaef6('0x24')}};
\ No newline at end of file
diff --git a/server/api/campaign/campaign.controller.js b/server/api/campaign/campaign.controller.js
index 8cca80e..cf86145 100644
--- a/server/api/campaign/campaign.controller.js
+++ b/server/api/campaign/campaign.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb8fb=['OrderBy','h.id','ci.item','ci.OrderBY','cm_contact_has_items','h.CampaignId=?','h.createdAt\x20=\x20?','push','all','removeLists','getBlackLists','addBlackLists','format','cm_hopper_black','sequelize','removeBlackLists','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','IvrCampaigns','UserProfileResource','end','sendStatus','error','name','send','index','map','rawAttributes','fieldName','key','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','order','sort','where','pick','filter','merge','type','VIRTUAL','options','Campaign','includeAll','include','findAll','rows','catch','show','length','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','get','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','omit','createdAt','updatedAt','findOne','nolimit','CmHopper','getHopperHistories','CampaignId','CmHopperHistory','getHopperFinals','CmHopperFinal','CmHopperBlack','getLists','CmList','addLists','YYYY-MM-DD\x20HH:mm:ss','ids','spread','dialCheckDuplicateType','always','insert','into','cm_hopper','fromQuery','phone','scheduledAt','ContactId','ListId','select','field','NOW()','CmListId','toString','from','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','COALESCE(calleridnum,\x27\x27)','CampaignId\x20=\x20?','phone\x20NOT\x20IN\x20(?)','COALESCE(phone,\x27\x27)','onlyIfOpen','cm_contacts','cm_hopper_additional_phones'];(function(_0x81e39d,_0x4c3934){var _0x548fbb=function(_0x1adda5){while(--_0x1adda5){_0x81e39d['push'](_0x81e39d['shift']());}};_0x548fbb(++_0x4c3934);}(_0xb8fb,0xa4));var _0xbb8f=function(_0x46ff3f,_0x27e699){_0x46ff3f=_0x46ff3f-0x0;var _0x4b88ec=_0xb8fb[_0x46ff3f];return _0x4b88ec;};'use strict';var emlformat=require(_0xbb8f('0x0'));var rimraf=require(_0xbb8f('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xbb8f('0x2'));var rp=require(_0xbb8f('0x3'));var moment=require(_0xbb8f('0x4'));var BPromise=require(_0xbb8f('0x5'));var Mustache=require(_0xbb8f('0x6'));var util=require(_0xbb8f('0x7'));var path=require(_0xbb8f('0x8'));var sox=require(_0xbb8f('0x9'));var csv=require('to-csv');var ejs=require(_0xbb8f('0xa'));var fs=require('fs');var fs_extra=require(_0xbb8f('0xb'));var _=require(_0xbb8f('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xbb8f('0xd'));var deskjs=require(_0xbb8f('0xe'));var toCsv=require(_0xbb8f('0xf'));var querystring=require(_0xbb8f('0x10'));var Papa=require(_0xbb8f('0x11'));var Redis=require(_0xbb8f('0x12'));var authService=require(_0xbb8f('0x13'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xbb8f('0x14'));var logger=require(_0xbb8f('0x15'))(_0xbb8f('0x16'));var utils=require(_0xbb8f('0x17'));var config=require(_0xbb8f('0x18'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x17dc8e,_0xd1ed57){_0xd1ed57=_0xd1ed57||0xcc;return function(_0x550863){if(_0x550863){return _0x17dc8e['sendStatus'](_0xd1ed57);}return _0x17dc8e[_0xbb8f('0x19')](_0xd1ed57)['end']();};}function respondWithResult(_0x580e59,_0x27dfc7){_0x27dfc7=_0x27dfc7||0xc8;return function(_0x220e2e){if(_0x220e2e){return _0x580e59[_0xbb8f('0x19')](_0x27dfc7)[_0xbb8f('0x1a')](_0x220e2e);}};}function respondWithFilteredResult(_0x3b1319,_0xcb28dc){return function(_0x3d8bf9){if(_0x3d8bf9){var _0x59a50b=typeof _0xcb28dc[_0xbb8f('0x1b')]===_0xbb8f('0x1c')&&typeof _0xcb28dc[_0xbb8f('0x1d')]==='undefined';var _0x49407d=_0x3d8bf9[_0xbb8f('0x1e')];var _0x5a3b42=_0x59a50b?0x0:_0xcb28dc['offset'];var _0x4569cf=_0x59a50b?_0x3d8bf9[_0xbb8f('0x1e')]:_0xcb28dc['offset']+_0xcb28dc['limit'];var _0x30b927;if(_0x4569cf>=_0x49407d){_0x4569cf=_0x49407d;_0x30b927=0xc8;}else{_0x30b927=0xce;}_0x3b1319[_0xbb8f('0x19')](_0x30b927);return _0x3b1319[_0xbb8f('0x1f')](_0xbb8f('0x20'),_0x5a3b42+'-'+_0x4569cf+'/'+_0x49407d)[_0xbb8f('0x1a')](_0x3d8bf9);}return null;};}function patchUpdates(_0x17af11){return function(_0xe44ce6){try{jsonpatch[_0xbb8f('0x21')](_0xe44ce6,_0x17af11,!![]);}catch(_0x251ab5){return BPromise[_0xbb8f('0x22')](_0x251ab5);}return _0xe44ce6[_0xbb8f('0x23')]();};}function saveUpdates(_0x168cc9,_0x3694e6){return function(_0x2fd010){if(_0x2fd010){return _0x2fd010[_0xbb8f('0x24')](_0x168cc9)[_0xbb8f('0x25')](function(_0x36ee1c){return _0x36ee1c;});}return null;};}function removeEntity(_0x1ed971,_0x5ac3d7){return function(_0x138883){if(_0x138883){return _0x138883[_0xbb8f('0x26')]()[_0xbb8f('0x25')](function(){var _0x48936f=_0x138883['get']({'plain':!![]});var _0x4de617=_0xbb8f('0x27');return db[_0xbb8f('0x28')][_0xbb8f('0x26')]({'where':{'type':_0x4de617,'resourceId':_0x48936f['id']}})['then'](function(){return _0x138883;});})['then'](function(){_0x1ed971[_0xbb8f('0x19')](0xcc)[_0xbb8f('0x29')]();});}};}function handleEntityNotFound(_0x16c705,_0xab1b4){return function(_0x432e3f){if(!_0x432e3f){_0x16c705[_0xbb8f('0x2a')](0x194);}return _0x432e3f;};}function handleError(_0x1b44d3,_0x51ec97){_0x51ec97=_0x51ec97||0x1f4;return function(_0x31d1e3){logger[_0xbb8f('0x2b')](_0x31d1e3['stack']);if(_0x31d1e3['name']){delete _0x31d1e3[_0xbb8f('0x2c')];}_0x1b44d3[_0xbb8f('0x19')](_0x51ec97)[_0xbb8f('0x2d')](_0x31d1e3);};}exports[_0xbb8f('0x2e')]=function(_0x4937c7,_0x1a695b){var _0x18d24f={},_0x40f78f={},_0x4948e5={'count':0x0,'rows':[]};var _0x51800d=_[_0xbb8f('0x2f')](db['Campaign'][_0xbb8f('0x30')],function(_0x44c24f){return{'name':_0x44c24f[_0xbb8f('0x31')],'type':_0x44c24f['type'][_0xbb8f('0x32')]};});_0x40f78f[_0xbb8f('0x33')]=_[_0xbb8f('0x2f')](_0x51800d,'name');_0x40f78f['query']=_[_0xbb8f('0x34')](_0x4937c7[_0xbb8f('0x35')]);_0x40f78f[_0xbb8f('0x36')]=_[_0xbb8f('0x37')](_0x40f78f[_0xbb8f('0x33')],_0x40f78f[_0xbb8f('0x35')]);_0x18d24f[_0xbb8f('0x38')]=_['intersection'](_0x40f78f['model'],qs[_0xbb8f('0x39')](_0x4937c7[_0xbb8f('0x35')][_0xbb8f('0x39')]));_0x18d24f[_0xbb8f('0x38')]=_0x18d24f[_0xbb8f('0x38')]['length']?_0x18d24f['attributes']:_0x40f78f['model'];if(!_0x4937c7[_0xbb8f('0x35')][_0xbb8f('0x3a')]('nolimit')){_0x18d24f[_0xbb8f('0x1d')]=qs[_0xbb8f('0x1d')](_0x4937c7[_0xbb8f('0x35')]['limit']);_0x18d24f[_0xbb8f('0x1b')]=qs[_0xbb8f('0x1b')](_0x4937c7[_0xbb8f('0x35')][_0xbb8f('0x1b')]);}_0x18d24f[_0xbb8f('0x3b')]=qs[_0xbb8f('0x3c')](_0x4937c7[_0xbb8f('0x35')][_0xbb8f('0x3c')]);_0x18d24f[_0xbb8f('0x3d')]=qs[_0xbb8f('0x36')](_[_0xbb8f('0x3e')](_0x4937c7['query'],_0x40f78f[_0xbb8f('0x36')]),_0x51800d);if(_0x4937c7['query'][_0xbb8f('0x3f')]){_0x18d24f[_0xbb8f('0x3d')]=_[_0xbb8f('0x40')](_0x18d24f[_0xbb8f('0x3d')],{'$or':_['map'](_0x51800d,function(_0x15d440){if(_0x15d440[_0xbb8f('0x41')]!==_0xbb8f('0x42')){var _0x2a4fd9={};_0x2a4fd9[_0x15d440[_0xbb8f('0x2c')]]={'$like':'%'+_0x4937c7[_0xbb8f('0x35')][_0xbb8f('0x3f')]+'%'};return _0x2a4fd9;}})});}_0x18d24f=_[_0xbb8f('0x40')]({},_0x18d24f,_0x4937c7[_0xbb8f('0x43')]);var _0x752d7={'where':_0x18d24f[_0xbb8f('0x3d')]};return db[_0xbb8f('0x44')]['count'](_0x752d7)[_0xbb8f('0x25')](function(_0x4117a7){_0x4948e5[_0xbb8f('0x1e')]=_0x4117a7;if(_0x4937c7[_0xbb8f('0x35')][_0xbb8f('0x45')]){_0x18d24f[_0xbb8f('0x46')]=[{'all':!![]}];}return db['Campaign'][_0xbb8f('0x47')](_0x18d24f);})[_0xbb8f('0x25')](function(_0x35d82a){_0x4948e5[_0xbb8f('0x48')]=_0x35d82a;return _0x4948e5;})[_0xbb8f('0x25')](respondWithFilteredResult(_0x1a695b,_0x18d24f))[_0xbb8f('0x49')](handleError(_0x1a695b,null));};exports[_0xbb8f('0x4a')]=function(_0x14470d,_0x2c0df5){var _0x4d074a={'raw':![],'where':{'id':_0x14470d['params']['id']}},_0x519e00={};_0x519e00[_0xbb8f('0x33')]=_[_0xbb8f('0x34')](db['Campaign'][_0xbb8f('0x30')]);_0x519e00['query']=_[_0xbb8f('0x34')](_0x14470d[_0xbb8f('0x35')]);_0x519e00[_0xbb8f('0x36')]=_[_0xbb8f('0x37')](_0x519e00[_0xbb8f('0x33')],_0x519e00[_0xbb8f('0x35')]);_0x4d074a[_0xbb8f('0x38')]=_['intersection'](_0x519e00[_0xbb8f('0x33')],qs['fields'](_0x14470d[_0xbb8f('0x35')][_0xbb8f('0x39')]));_0x4d074a['attributes']=_0x4d074a[_0xbb8f('0x38')][_0xbb8f('0x4b')]?_0x4d074a[_0xbb8f('0x38')]:_0x519e00['model'];if(_0x14470d['query'][_0xbb8f('0x45')]){_0x4d074a[_0xbb8f('0x46')]=[{'all':!![]}];}_0x4d074a=_[_0xbb8f('0x40')]({},_0x4d074a,_0x14470d[_0xbb8f('0x43')]);return db[_0xbb8f('0x44')][_0xbb8f('0x4c')](_0x4d074a)[_0xbb8f('0x25')](handleEntityNotFound(_0x2c0df5,null))['then'](respondWithResult(_0x2c0df5,null))[_0xbb8f('0x49')](handleError(_0x2c0df5,null));};exports['create']=function(_0x3769dc,_0xb3cb20){return db['Campaign'][_0xbb8f('0x4d')](_0x3769dc[_0xbb8f('0x4e')],{})[_0xbb8f('0x25')](function(_0xbcb01f){var _0x18a516=_0x3769dc[_0xbb8f('0x4f')]['get']({'plain':!![]});if(!_0x18a516)throw new Error(_0xbb8f('0x50'));if(_0x18a516[_0xbb8f('0x51')]===_0xbb8f('0x4f')){var _0x2d3ace=_0xbcb01f[_0xbb8f('0x52')]({'plain':!![]});var _0x3f90af=_0xbb8f('0x27');return db[_0xbb8f('0x53')][_0xbb8f('0x4c')]({'where':{'name':_0x3f90af,'userProfileId':_0x18a516[_0xbb8f('0x54')]},'raw':!![]})[_0xbb8f('0x25')](function(_0x27cfaa){if(_0x27cfaa&&_0x27cfaa[_0xbb8f('0x55')]===0x0){return db[_0xbb8f('0x28')][_0xbb8f('0x4d')]({'name':_0x2d3ace[_0xbb8f('0x2c')],'resourceId':_0x2d3ace['id'],'type':_0x27cfaa[_0xbb8f('0x2c')],'sectionId':_0x27cfaa['id']},{})[_0xbb8f('0x25')](function(){return _0xbcb01f;});}else{return _0xbcb01f;}})[_0xbb8f('0x49')](function(_0x3c78ad){logger[_0xbb8f('0x2b')](_0xbb8f('0x56'),_0x3c78ad);throw _0x3c78ad;});}return _0xbcb01f;})[_0xbb8f('0x25')](respondWithResult(_0xb3cb20,0xc9))[_0xbb8f('0x49')](handleError(_0xb3cb20,null));};exports['clone']=function(_0x11615e,_0x132058){var _0x199590={'where':{'id':_0x11615e[_0xbb8f('0x57')]['id']}},_0x4b53cf={};_0x4b53cf[_0xbb8f('0x33')]=_['keys'](db[_0xbb8f('0x44')]['rawAttributes']);_0x199590['attributes']=_['intersection'](_0x4b53cf[_0xbb8f('0x33')],qs[_0xbb8f('0x39')](_0x11615e[_0xbb8f('0x35')][_0xbb8f('0x39')]));_0x199590[_0xbb8f('0x38')]=_0x199590['attributes'][_0xbb8f('0x4b')]?_0x199590[_0xbb8f('0x38')]:_0x4b53cf['model'];if(_0x11615e[_0xbb8f('0x35')][_0xbb8f('0x45')]){_0x199590['include']=[{'all':!![]}];}_0x199590=_[_0xbb8f('0x40')]({},_0x199590,_0x11615e['options']);return db['Campaign'][_0xbb8f('0x4c')](_0x199590)[_0xbb8f('0x25')](handleEntityNotFound(_0x132058,null))['then'](function(_0xc3227c){if(_0xc3227c){var _0x4b978f=_0xc3227c[_0xbb8f('0x52')]({'plain':!![]});_0x4b978f=qs[_0xbb8f('0x58')](_0x4b978f,['id','createdAt','updatedAt']);_0x11615e[_0xbb8f('0x4e')]=_[_0xbb8f('0x58')](_0x11615e['body'],['id',_0xbb8f('0x59'),_0xbb8f('0x5a')]);return db[_0xbb8f('0x44')][_0xbb8f('0x4d')](_['merge'](_0x4b978f,_0x11615e[_0xbb8f('0x4e')]),{'include':_0x11615e[_0xbb8f('0x35')]['includeAll']?[{'all':!![]}]:undefined})['then'](function(_0x54d846){var _0x467d0d=_0x11615e['user'][_0xbb8f('0x52')]({'plain':!![]});if(!_0x467d0d)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x467d0d[_0xbb8f('0x51')]===_0xbb8f('0x4f')){var _0xe5b4bb=_0x54d846[_0xbb8f('0x52')]({'plain':!![]});var _0x3cc52e=_0xbb8f('0x27');return db['UserProfileSection'][_0xbb8f('0x4c')]({'where':{'name':_0x3cc52e,'userProfileId':_0x467d0d[_0xbb8f('0x54')]},'raw':!![]})[_0xbb8f('0x25')](function(_0x10607d){if(_0x10607d&&_0x10607d[_0xbb8f('0x55')]===0x0){return db[_0xbb8f('0x28')]['create']({'name':_0xe5b4bb[_0xbb8f('0x2c')],'resourceId':_0xe5b4bb['id'],'type':_0x10607d[_0xbb8f('0x2c')],'sectionId':_0x10607d['id']},{})[_0xbb8f('0x25')](function(){return _0x54d846;});}else{return _0x54d846;}})['catch'](function(_0x5e38a7){logger[_0xbb8f('0x2b')](_0xbb8f('0x56'),_0x5e38a7);throw _0x5e38a7;});}return _0x54d846;});}})[_0xbb8f('0x25')](respondWithResult(_0x132058,0xc9))[_0xbb8f('0x49')](handleError(_0x132058,null));};exports[_0xbb8f('0x24')]=function(_0x4fc9d7,_0xd76966){if(_0x4fc9d7[_0xbb8f('0x4e')]['id']){delete _0x4fc9d7[_0xbb8f('0x4e')]['id'];}return db[_0xbb8f('0x44')][_0xbb8f('0x4c')]({'where':{'id':_0x4fc9d7['params']['id']}})['then'](handleEntityNotFound(_0xd76966,null))[_0xbb8f('0x25')](saveUpdates(_0x4fc9d7['body'],null))[_0xbb8f('0x25')](respondWithResult(_0xd76966,null))[_0xbb8f('0x49')](handleError(_0xd76966,null));};exports['destroy']=function(_0x34428f,_0x1bf763){return db[_0xbb8f('0x44')]['find']({'where':{'id':_0x34428f[_0xbb8f('0x57')]['id']}})['then'](handleEntityNotFound(_0x1bf763,null))[_0xbb8f('0x25')](removeEntity(_0x1bf763,null))[_0xbb8f('0x49')](handleError(_0x1bf763,null));};exports['getHoppers']=function(_0x3e5bc0,_0x143202,_0x3273c4){var _0x2f38b3={'raw':!![],'where':{}};var _0x5be30b={};var _0x5d8853={'count':0x0,'rows':[]};return db[_0xbb8f('0x44')][_0xbb8f('0x5b')]({'where':{'id':_0x3e5bc0[_0xbb8f('0x57')]['id']}})[_0xbb8f('0x25')](handleEntityNotFound(_0x143202,null))[_0xbb8f('0x25')](function(_0x1a89c5){if(_0x1a89c5){_0x5be30b['model']=_[_0xbb8f('0x34')](db['CmHopper'][_0xbb8f('0x30')]);_0x5be30b[_0xbb8f('0x35')]=_[_0xbb8f('0x34')](_0x3e5bc0[_0xbb8f('0x35')]);_0x5be30b[_0xbb8f('0x36')]=_[_0xbb8f('0x37')](_0x5be30b[_0xbb8f('0x33')],_0x5be30b[_0xbb8f('0x35')]);_0x2f38b3[_0xbb8f('0x38')]=_[_0xbb8f('0x37')](_0x5be30b[_0xbb8f('0x33')],qs[_0xbb8f('0x39')](_0x3e5bc0[_0xbb8f('0x35')]['fields']));_0x2f38b3['attributes']=_0x2f38b3[_0xbb8f('0x38')][_0xbb8f('0x4b')]?_0x2f38b3[_0xbb8f('0x38')]:_0x5be30b[_0xbb8f('0x33')];if(!_0x3e5bc0[_0xbb8f('0x35')][_0xbb8f('0x3a')](_0xbb8f('0x5c'))){_0x2f38b3[_0xbb8f('0x1d')]=qs[_0xbb8f('0x1d')](_0x3e5bc0[_0xbb8f('0x35')][_0xbb8f('0x1d')]);_0x2f38b3[_0xbb8f('0x1b')]=qs['offset'](_0x3e5bc0['query'][_0xbb8f('0x1b')]);}_0x2f38b3['order']=qs[_0xbb8f('0x3c')](_0x3e5bc0[_0xbb8f('0x35')][_0xbb8f('0x3c')]);_0x2f38b3[_0xbb8f('0x3d')]=qs['filters'](_[_0xbb8f('0x3e')](_0x3e5bc0[_0xbb8f('0x35')],_0x5be30b[_0xbb8f('0x36')]));_0x2f38b3[_0xbb8f('0x3d')]['CampaignId']=_0x1a89c5['id'];if(_0x3e5bc0[_0xbb8f('0x35')][_0xbb8f('0x3f')]){_0x2f38b3[_0xbb8f('0x3d')]=_[_0xbb8f('0x40')](_0x2f38b3[_0xbb8f('0x3d')],{'$or':_[_0xbb8f('0x2f')](_0x2f38b3['attributes'],function(_0x39c087){var _0x549449={};_0x549449[_0x39c087]={'$like':'%'+_0x3e5bc0[_0xbb8f('0x35')][_0xbb8f('0x3f')]+'%'};return _0x549449;})});}_0x2f38b3=_[_0xbb8f('0x40')]({},_0x2f38b3,_0x3e5bc0[_0xbb8f('0x43')]);return db[_0xbb8f('0x5d')]['count']({'where':_0x2f38b3[_0xbb8f('0x3d')]})['then'](function(_0x318651){_0x5d8853['count']=_0x318651;if(_0x3e5bc0['query'][_0xbb8f('0x45')]){_0x2f38b3[_0xbb8f('0x46')]=[{'all':!![]}];}return db[_0xbb8f('0x5d')][_0xbb8f('0x47')](_0x2f38b3);})[_0xbb8f('0x25')](function(_0x5a979d){_0x5d8853[_0xbb8f('0x48')]=_0x5a979d;return _0x5d8853;});}})[_0xbb8f('0x25')](respondWithFilteredResult(_0x143202,_0x2f38b3))[_0xbb8f('0x49')](handleError(_0x143202,null));};exports[_0xbb8f('0x5e')]=function(_0x260a60,_0xc54f1e,_0x195063){var _0xd4b433={'raw':!![],'where':{}};var _0x4cb14f={};var _0x474c70={'count':0x0,'rows':[]};return db[_0xbb8f('0x44')][_0xbb8f('0x5b')]({'where':{'id':_0x260a60[_0xbb8f('0x57')]['id']}})['then'](handleEntityNotFound(_0xc54f1e,null))['then'](function(_0x36329f){if(_0x36329f){_0x4cb14f[_0xbb8f('0x33')]=_['keys'](db['CmHopperHistory'][_0xbb8f('0x30')]);_0x4cb14f[_0xbb8f('0x35')]=_[_0xbb8f('0x34')](_0x260a60[_0xbb8f('0x35')]);_0x4cb14f[_0xbb8f('0x36')]=_[_0xbb8f('0x37')](_0x4cb14f[_0xbb8f('0x33')],_0x4cb14f[_0xbb8f('0x35')]);_0xd4b433[_0xbb8f('0x38')]=_[_0xbb8f('0x37')](_0x4cb14f[_0xbb8f('0x33')],qs[_0xbb8f('0x39')](_0x260a60[_0xbb8f('0x35')][_0xbb8f('0x39')]));_0xd4b433['attributes']=_0xd4b433[_0xbb8f('0x38')][_0xbb8f('0x4b')]?_0xd4b433['attributes']:_0x4cb14f[_0xbb8f('0x33')];if(!_0x260a60['query']['hasOwnProperty'](_0xbb8f('0x5c'))){_0xd4b433[_0xbb8f('0x1d')]=qs[_0xbb8f('0x1d')](_0x260a60[_0xbb8f('0x35')][_0xbb8f('0x1d')]);_0xd4b433[_0xbb8f('0x1b')]=qs['offset'](_0x260a60[_0xbb8f('0x35')][_0xbb8f('0x1b')]);}_0xd4b433['order']=qs[_0xbb8f('0x3c')](_0x260a60[_0xbb8f('0x35')][_0xbb8f('0x3c')]);_0xd4b433[_0xbb8f('0x3d')]=qs['filters'](_[_0xbb8f('0x3e')](_0x260a60[_0xbb8f('0x35')],_0x4cb14f[_0xbb8f('0x36')]));_0xd4b433['where'][_0xbb8f('0x5f')]=_0x36329f['id'];if(_0x260a60['query'][_0xbb8f('0x3f')]){_0xd4b433['where']=_[_0xbb8f('0x40')](_0xd4b433[_0xbb8f('0x3d')],{'$or':_[_0xbb8f('0x2f')](_0xd4b433[_0xbb8f('0x38')],function(_0x283cd5){var _0x5311e2={};_0x5311e2[_0x283cd5]={'$like':'%'+_0x260a60[_0xbb8f('0x35')][_0xbb8f('0x3f')]+'%'};return _0x5311e2;})});}_0xd4b433=_[_0xbb8f('0x40')]({},_0xd4b433,_0x260a60[_0xbb8f('0x43')]);return db['CmHopperHistory'][_0xbb8f('0x1e')]({'where':_0xd4b433[_0xbb8f('0x3d')]})[_0xbb8f('0x25')](function(_0x1190c6){_0x474c70[_0xbb8f('0x1e')]=_0x1190c6;if(_0x260a60[_0xbb8f('0x35')][_0xbb8f('0x45')]){_0xd4b433[_0xbb8f('0x46')]=[{'all':!![]}];}return db[_0xbb8f('0x60')]['findAll'](_0xd4b433);})['then'](function(_0x43d0ec){_0x474c70[_0xbb8f('0x48')]=_0x43d0ec;return _0x474c70;});}})[_0xbb8f('0x25')](respondWithFilteredResult(_0xc54f1e,_0xd4b433))[_0xbb8f('0x49')](handleError(_0xc54f1e,null));};exports[_0xbb8f('0x61')]=function(_0x3ab72e,_0x9b8604,_0x59f1e1){var _0x21c7f8={'raw':!![],'where':{}};var _0x815664={};var _0x251b36={'count':0x0,'rows':[]};return db[_0xbb8f('0x44')][_0xbb8f('0x5b')]({'where':{'id':_0x3ab72e['params']['id']}})[_0xbb8f('0x25')](handleEntityNotFound(_0x9b8604,null))['then'](function(_0x5a7676){if(_0x5a7676){_0x815664[_0xbb8f('0x33')]=_[_0xbb8f('0x34')](db[_0xbb8f('0x62')][_0xbb8f('0x30')]);_0x815664[_0xbb8f('0x35')]=_['keys'](_0x3ab72e[_0xbb8f('0x35')]);_0x815664[_0xbb8f('0x36')]=_[_0xbb8f('0x37')](_0x815664[_0xbb8f('0x33')],_0x815664['query']);_0x21c7f8[_0xbb8f('0x38')]=_[_0xbb8f('0x37')](_0x815664[_0xbb8f('0x33')],qs['fields'](_0x3ab72e[_0xbb8f('0x35')]['fields']));_0x21c7f8[_0xbb8f('0x38')]=_0x21c7f8['attributes'][_0xbb8f('0x4b')]?_0x21c7f8['attributes']:_0x815664[_0xbb8f('0x33')];if(!_0x3ab72e['query'][_0xbb8f('0x3a')](_0xbb8f('0x5c'))){_0x21c7f8[_0xbb8f('0x1d')]=qs[_0xbb8f('0x1d')](_0x3ab72e[_0xbb8f('0x35')][_0xbb8f('0x1d')]);_0x21c7f8[_0xbb8f('0x1b')]=qs[_0xbb8f('0x1b')](_0x3ab72e[_0xbb8f('0x35')][_0xbb8f('0x1b')]);}_0x21c7f8[_0xbb8f('0x3b')]=qs[_0xbb8f('0x3c')](_0x3ab72e[_0xbb8f('0x35')][_0xbb8f('0x3c')]);_0x21c7f8['where']=qs[_0xbb8f('0x36')](_['pick'](_0x3ab72e[_0xbb8f('0x35')],_0x815664[_0xbb8f('0x36')]));_0x21c7f8[_0xbb8f('0x3d')][_0xbb8f('0x5f')]=_0x5a7676['id'];if(_0x3ab72e[_0xbb8f('0x35')][_0xbb8f('0x3f')]){_0x21c7f8[_0xbb8f('0x3d')]=_[_0xbb8f('0x40')](_0x21c7f8[_0xbb8f('0x3d')],{'$or':_[_0xbb8f('0x2f')](_0x21c7f8[_0xbb8f('0x38')],function(_0x492a22){var _0x3f5d56={};_0x3f5d56[_0x492a22]={'$like':'%'+_0x3ab72e[_0xbb8f('0x35')][_0xbb8f('0x3f')]+'%'};return _0x3f5d56;})});}_0x21c7f8=_[_0xbb8f('0x40')]({},_0x21c7f8,_0x3ab72e['options']);return db[_0xbb8f('0x62')][_0xbb8f('0x1e')]({'where':_0x21c7f8['where']})[_0xbb8f('0x25')](function(_0x30b92d){_0x251b36[_0xbb8f('0x1e')]=_0x30b92d;if(_0x3ab72e[_0xbb8f('0x35')][_0xbb8f('0x45')]){_0x21c7f8[_0xbb8f('0x46')]=[{'all':!![]}];}return db[_0xbb8f('0x62')][_0xbb8f('0x47')](_0x21c7f8);})['then'](function(_0x26d0f5){_0x251b36['rows']=_0x26d0f5;return _0x251b36;});}})[_0xbb8f('0x25')](respondWithFilteredResult(_0x9b8604,_0x21c7f8))[_0xbb8f('0x49')](handleError(_0x9b8604,null));};exports['getHopperBlacks']=function(_0x45cda2,_0x5ef55f,_0x2333e3){var _0x26f30b={'raw':!![],'where':{}};var _0x20b2a9={};var _0x3de54c={'count':0x0,'rows':[]};return db['Campaign'][_0xbb8f('0x5b')]({'where':{'id':_0x45cda2[_0xbb8f('0x57')]['id']}})['then'](handleEntityNotFound(_0x5ef55f,null))['then'](function(_0x731f4c){if(_0x731f4c){_0x20b2a9['model']=_[_0xbb8f('0x34')](db[_0xbb8f('0x63')]['rawAttributes']);_0x20b2a9[_0xbb8f('0x35')]=_[_0xbb8f('0x34')](_0x45cda2[_0xbb8f('0x35')]);_0x20b2a9['filters']=_[_0xbb8f('0x37')](_0x20b2a9[_0xbb8f('0x33')],_0x20b2a9[_0xbb8f('0x35')]);_0x26f30b[_0xbb8f('0x38')]=_[_0xbb8f('0x37')](_0x20b2a9[_0xbb8f('0x33')],qs[_0xbb8f('0x39')](_0x45cda2[_0xbb8f('0x35')][_0xbb8f('0x39')]));_0x26f30b[_0xbb8f('0x38')]=_0x26f30b[_0xbb8f('0x38')][_0xbb8f('0x4b')]?_0x26f30b[_0xbb8f('0x38')]:_0x20b2a9[_0xbb8f('0x33')];if(!_0x45cda2[_0xbb8f('0x35')][_0xbb8f('0x3a')](_0xbb8f('0x5c'))){_0x26f30b[_0xbb8f('0x1d')]=qs[_0xbb8f('0x1d')](_0x45cda2['query']['limit']);_0x26f30b[_0xbb8f('0x1b')]=qs[_0xbb8f('0x1b')](_0x45cda2[_0xbb8f('0x35')][_0xbb8f('0x1b')]);}_0x26f30b[_0xbb8f('0x3b')]=qs[_0xbb8f('0x3c')](_0x45cda2[_0xbb8f('0x35')]['sort']);_0x26f30b[_0xbb8f('0x3d')]=qs[_0xbb8f('0x36')](_[_0xbb8f('0x3e')](_0x45cda2[_0xbb8f('0x35')],_0x20b2a9['filters']));_0x26f30b[_0xbb8f('0x3d')][_0xbb8f('0x5f')]=_0x731f4c['id'];if(_0x45cda2[_0xbb8f('0x35')][_0xbb8f('0x3f')]){_0x26f30b['where']=_[_0xbb8f('0x40')](_0x26f30b[_0xbb8f('0x3d')],{'$or':_[_0xbb8f('0x2f')](_0x26f30b[_0xbb8f('0x38')],function(_0x32464e){var _0x267b1c={};_0x267b1c[_0x32464e]={'$like':'%'+_0x45cda2['query']['filter']+'%'};return _0x267b1c;})});}_0x26f30b=_[_0xbb8f('0x40')]({},_0x26f30b,_0x45cda2[_0xbb8f('0x43')]);return db[_0xbb8f('0x63')][_0xbb8f('0x1e')]({'where':_0x26f30b[_0xbb8f('0x3d')]})[_0xbb8f('0x25')](function(_0x43b817){_0x3de54c['count']=_0x43b817;if(_0x45cda2['query'][_0xbb8f('0x45')]){_0x26f30b[_0xbb8f('0x46')]=[{'all':!![]}];}return db[_0xbb8f('0x63')][_0xbb8f('0x47')](_0x26f30b);})[_0xbb8f('0x25')](function(_0x339621){_0x3de54c[_0xbb8f('0x48')]=_0x339621;return _0x3de54c;});}})[_0xbb8f('0x25')](respondWithFilteredResult(_0x5ef55f,_0x26f30b))[_0xbb8f('0x49')](handleError(_0x5ef55f,null));};exports[_0xbb8f('0x64')]=function(_0x35a6be,_0xfa1bac,_0x1dfa2f){var _0x4cf8ae={};var _0x1e20ed={};var _0x35ab2a;var _0x4ad4a8;return db[_0xbb8f('0x44')]['findOne']({'where':{'id':_0x35a6be[_0xbb8f('0x57')]['id']}})[_0xbb8f('0x25')](handleEntityNotFound(_0xfa1bac,null))[_0xbb8f('0x25')](function(_0x13d6af){if(_0x13d6af){_0x35ab2a=_0x13d6af;_0x1e20ed[_0xbb8f('0x33')]=_[_0xbb8f('0x34')](db[_0xbb8f('0x65')][_0xbb8f('0x30')]);_0x1e20ed[_0xbb8f('0x35')]=_[_0xbb8f('0x34')](_0x35a6be[_0xbb8f('0x35')]);_0x1e20ed[_0xbb8f('0x36')]=_[_0xbb8f('0x37')](_0x1e20ed[_0xbb8f('0x33')],_0x1e20ed[_0xbb8f('0x35')]);_0x4cf8ae[_0xbb8f('0x38')]=_[_0xbb8f('0x37')](_0x1e20ed['model'],qs[_0xbb8f('0x39')](_0x35a6be[_0xbb8f('0x35')][_0xbb8f('0x39')]));_0x4cf8ae[_0xbb8f('0x38')]=_0x4cf8ae['attributes'][_0xbb8f('0x4b')]?_0x4cf8ae[_0xbb8f('0x38')]:_0x1e20ed['model'];_0x4cf8ae[_0xbb8f('0x3b')]=qs[_0xbb8f('0x3c')](_0x35a6be[_0xbb8f('0x35')][_0xbb8f('0x3c')]);_0x4cf8ae[_0xbb8f('0x3d')]=qs[_0xbb8f('0x36')](_['pick'](_0x35a6be[_0xbb8f('0x35')],_0x1e20ed[_0xbb8f('0x36')]));if(_0x35a6be['query']['filter']){_0x4cf8ae[_0xbb8f('0x3d')]=_[_0xbb8f('0x40')](_0x4cf8ae[_0xbb8f('0x3d')],{'$or':_[_0xbb8f('0x2f')](_0x4cf8ae[_0xbb8f('0x38')],function(_0x3974e5){var _0xeb2186={};_0xeb2186[_0x3974e5]={'$like':'%'+_0x35a6be['query']['filter']+'%'};return _0xeb2186;})});}_0x4cf8ae=_[_0xbb8f('0x40')]({},_0x4cf8ae,_0x35a6be['options']);return _0x35ab2a['getLists'](_0x4cf8ae);}})['then'](function(_0x1e0d58){if(_0x1e0d58){_0x4ad4a8=_0x1e0d58[_0xbb8f('0x4b')];if(!_0x35a6be['query'][_0xbb8f('0x3a')](_0xbb8f('0x5c'))){_0x4cf8ae['limit']=qs[_0xbb8f('0x1d')](_0x35a6be[_0xbb8f('0x35')][_0xbb8f('0x1d')]);_0x4cf8ae['offset']=qs[_0xbb8f('0x1b')](_0x35a6be[_0xbb8f('0x35')][_0xbb8f('0x1b')]);}return _0x35ab2a['getLists'](_0x4cf8ae);}})['then'](function(_0x146c70){if(_0x146c70){return _0x146c70?{'count':_0x4ad4a8,'rows':_0x146c70}:null;}})[_0xbb8f('0x25')](respondWithResult(_0xfa1bac,null))[_0xbb8f('0x49')](handleError(_0xfa1bac,null));};exports[_0xbb8f('0x66')]=function(_0x12380b,_0x1eadf9,_0x1ca25b){var _0x2a73d7,_0xbff0e6;var _0x477a94=[];var _0x21e6e6=moment()['format'](_0xbb8f('0x67'));return db[_0xbb8f('0x44')]['find']({'where':{'id':_0x12380b[_0xbb8f('0x57')]['id']}})['then'](handleEntityNotFound(_0x1eadf9,null))[_0xbb8f('0x25')](function(_0x218e4d){if(_0x218e4d){_0xbff0e6=_0x218e4d;return _0x218e4d[_0xbb8f('0x66')](_0x12380b[_0xbb8f('0x4e')][_0xbb8f('0x68')],_[_0xbb8f('0x58')](_0x12380b[_0xbb8f('0x4e')],[_0xbb8f('0x68'),'id'])||{});}return null;})[_0xbb8f('0x69')](function(_0x1b3f1e){var _0x5cbbe8;var _0x4f6be2;_0x2a73d7=_0x1b3f1e||[];var _0x2b481c=[];if(_0x1b3f1e){for(var _0x20f1a7=0x0;_0x20f1a7<_0x1b3f1e[_0xbb8f('0x4b')];_0x20f1a7+=0x1){var _0x3397db=_0x1b3f1e[_0x20f1a7]['get']({'plain':!![]});_0xbff0e6['dialCheckDuplicateType']=_0x12380b[_0xbb8f('0x4e')]['dialCheckDuplicateType']?_0x12380b[_0xbb8f('0x4e')][_0xbb8f('0x6a')]:_0xbff0e6[_0xbb8f('0x6a')];switch(_0xbff0e6['dialCheckDuplicateType']){case _0xbb8f('0x6b'):_0x5cbbe8=squel[_0xbb8f('0x6c')]()[_0xbb8f('0x6d')](_0xbb8f('0x6e'))[_0xbb8f('0x6f')]([_0xbb8f('0x70'),_0xbb8f('0x71'),_0xbb8f('0x72'),_0xbb8f('0x73'),'CampaignId',_0xbb8f('0x59'),'updatedAt'],squel[_0xbb8f('0x74')]()[_0xbb8f('0x75')](_0xbb8f('0x70'),'phone')[_0xbb8f('0x75')](_0xbb8f('0x76'),_0xbb8f('0x71'))[_0xbb8f('0x75')]('id','ContactId')[_0xbb8f('0x75')](_0x3397db[_0xbb8f('0x77')][_0xbb8f('0x78')](),_0xbb8f('0x73'))['field'](_0x12380b['params']['id'][_0xbb8f('0x78')](),_0xbb8f('0x5f'))[_0xbb8f('0x75')]('\x27'+_0x21e6e6+'\x27','createdAt')[_0xbb8f('0x75')]('\x27'+_0x21e6e6+'\x27','updatedAt')[_0xbb8f('0x79')]('cm_contacts')['where'](_0xbb8f('0x7a'))[_0xbb8f('0x3d')](_0xbb8f('0x7b'),_0x3397db[_0xbb8f('0x77')][_0xbb8f('0x78')]())[_0xbb8f('0x3d')](_0xbb8f('0x7c'))[_0xbb8f('0x3d')]('phone\x20NOT\x20IN\x20(?)',squel[_0xbb8f('0x74')]()[_0xbb8f('0x75')](_0xbb8f('0x7d'))[_0xbb8f('0x79')]('cm_hopper_final')[_0xbb8f('0x3d')](_0xbb8f('0x7e'),_0x12380b[_0xbb8f('0x57')]['id'][_0xbb8f('0x78')]()))[_0xbb8f('0x3d')](_0xbb8f('0x7f'),squel[_0xbb8f('0x74')]()[_0xbb8f('0x75')](_0xbb8f('0x80'))[_0xbb8f('0x79')](_0xbb8f('0x6e'))[_0xbb8f('0x3d')](_0xbb8f('0x7e'),_0x12380b[_0xbb8f('0x57')]['id']['toString']())))[_0xbb8f('0x78')]();break;case _0xbb8f('0x81'):_0x5cbbe8=squel[_0xbb8f('0x6c')]()['into'](_0xbb8f('0x6e'))['fromQuery']([_0xbb8f('0x70'),_0xbb8f('0x71'),_0xbb8f('0x72'),_0xbb8f('0x73'),_0xbb8f('0x5f'),'createdAt',_0xbb8f('0x5a')],squel['select']()[_0xbb8f('0x75')](_0xbb8f('0x70'),_0xbb8f('0x70'))['field'](_0xbb8f('0x76'),_0xbb8f('0x71'))[_0xbb8f('0x75')]('id','ContactId')[_0xbb8f('0x75')](_0x3397db['CmListId'][_0xbb8f('0x78')](),_0xbb8f('0x73'))[_0xbb8f('0x75')](_0x12380b[_0xbb8f('0x57')]['id'][_0xbb8f('0x78')](),_0xbb8f('0x5f'))[_0xbb8f('0x75')]('\x27'+_0x21e6e6+'\x27',_0xbb8f('0x59'))[_0xbb8f('0x75')]('\x27'+_0x21e6e6+'\x27',_0xbb8f('0x5a'))[_0xbb8f('0x79')](_0xbb8f('0x82'))[_0xbb8f('0x3d')](_0xbb8f('0x7a'))[_0xbb8f('0x3d')]('ListId\x20=\x20?',_0x3397db[_0xbb8f('0x77')][_0xbb8f('0x78')]())[_0xbb8f('0x3d')](_0xbb8f('0x7c'))['where'](_0xbb8f('0x7f'),squel[_0xbb8f('0x74')]()[_0xbb8f('0x75')](_0xbb8f('0x80'))[_0xbb8f('0x79')](_0xbb8f('0x6e'))[_0xbb8f('0x3d')](_0xbb8f('0x7e'),_0x12380b[_0xbb8f('0x57')]['id']['toString']())))[_0xbb8f('0x78')]();break;default:_0x5cbbe8=squel['insert']()[_0xbb8f('0x6d')](_0xbb8f('0x6e'))[_0xbb8f('0x6f')](['phone',_0xbb8f('0x71'),_0xbb8f('0x72'),'ListId',_0xbb8f('0x5f'),_0xbb8f('0x59'),_0xbb8f('0x5a')],squel['select']()[_0xbb8f('0x75')](_0xbb8f('0x70'),_0xbb8f('0x70'))[_0xbb8f('0x75')]('NOW()','scheduledAt')[_0xbb8f('0x75')]('id','ContactId')[_0xbb8f('0x75')](_0x3397db['CmListId'][_0xbb8f('0x78')](),_0xbb8f('0x73'))[_0xbb8f('0x75')](_0x12380b['params']['id'][_0xbb8f('0x78')](),_0xbb8f('0x5f'))[_0xbb8f('0x75')]('\x27'+_0x21e6e6+'\x27',_0xbb8f('0x59'))[_0xbb8f('0x75')]('\x27'+_0x21e6e6+'\x27',_0xbb8f('0x5a'))[_0xbb8f('0x79')](_0xbb8f('0x82'))[_0xbb8f('0x3d')](_0xbb8f('0x7a'))['where'](_0xbb8f('0x7b'),_0x3397db[_0xbb8f('0x77')]['toString']())['where'](_0xbb8f('0x7c')))['toString']();}_0x4f6be2=squel['insert']()[_0xbb8f('0x6d')](_0xbb8f('0x83'))['fromQuery'](['cmHopperId',_0xbb8f('0x71'),'phone',_0xbb8f('0x84'),_0xbb8f('0x59'),'updatedAt'],squel[_0xbb8f('0x74')]()['field'](_0xbb8f('0x85'),'id')[_0xbb8f('0x75')](_0xbb8f('0x76'),_0xbb8f('0x71'))[_0xbb8f('0x75')](_0xbb8f('0x86'),_0xbb8f('0x70'))[_0xbb8f('0x75')](_0xbb8f('0x87'),'OrderBy')[_0xbb8f('0x75')]('\x27'+_0x21e6e6+'\x27',_0xbb8f('0x59'))['field']('\x27'+_0x21e6e6+'\x27',_0xbb8f('0x5a'))[_0xbb8f('0x79')](_0xbb8f('0x88'),'ci')['join'](_0xbb8f('0x6e'),'h','h.ContactId\x20=\x20ci.CmContactId')[_0xbb8f('0x3d')]('h.ListId\x20=\x20?',_0x3397db['CmListId']['toString']())[_0xbb8f('0x3d')](_0xbb8f('0x89'),_0x12380b[_0xbb8f('0x57')]['id'][_0xbb8f('0x78')]())[_0xbb8f('0x3d')](_0xbb8f('0x8a'),_0x21e6e6))['toString']();_0x2b481c['push'](db['sequelize'][_0xbb8f('0x35')](_0x5cbbe8));_0x477a94[_0xbb8f('0x8b')](db['sequelize'][_0xbb8f('0x35')](_0x4f6be2));}return BPromise[_0xbb8f('0x8c')](_0x2b481c);}})[_0xbb8f('0x25')](function(){return BPromise[_0xbb8f('0x8c')](_0x477a94);})['then'](function(){return _0x2a73d7;})[_0xbb8f('0x25')](respondWithResult(_0x1eadf9,null))['catch'](handleError(_0x1eadf9,null));};exports[_0xbb8f('0x8d')]=function(_0x1af1da,_0x39a8b0,_0x36039c){return db['Campaign'][_0xbb8f('0x4c')]({'where':{'id':_0x1af1da[_0xbb8f('0x57')]['id']}})[_0xbb8f('0x25')](handleEntityNotFound(_0x39a8b0,null))[_0xbb8f('0x25')](function(_0x4b072f){if(_0x4b072f){return _0x4b072f[_0xbb8f('0x8d')](_0x1af1da['query'][_0xbb8f('0x68')]);}})[_0xbb8f('0x25')](function(_0x274f5d){if(_0x274f5d){return db[_0xbb8f('0x5d')][_0xbb8f('0x26')]({'where':{'ListId':_0x1af1da[_0xbb8f('0x35')][_0xbb8f('0x68')],'CampaignId':_0x1af1da[_0xbb8f('0x57')]['id']}})[_0xbb8f('0x25')](function(){return _0x274f5d;});}})[_0xbb8f('0x25')](respondWithStatusCode(_0x39a8b0,null))[_0xbb8f('0x49')](handleError(_0x39a8b0,null));};exports['getBlackLists']=function(_0x37691f,_0x339f7f,_0x37f677){var _0xc8b880={};var _0x192fdf={};var _0x207ba5;var _0x3dc08d;return db[_0xbb8f('0x44')]['findOne']({'where':{'id':_0x37691f['params']['id']}})['then'](handleEntityNotFound(_0x339f7f,null))[_0xbb8f('0x25')](function(_0x442880){if(_0x442880){_0x207ba5=_0x442880;_0x192fdf[_0xbb8f('0x33')]=_['keys'](db[_0xbb8f('0x65')][_0xbb8f('0x30')]);_0x192fdf['query']=_[_0xbb8f('0x34')](_0x37691f[_0xbb8f('0x35')]);_0x192fdf[_0xbb8f('0x36')]=_[_0xbb8f('0x37')](_0x192fdf['model'],_0x192fdf['query']);_0xc8b880[_0xbb8f('0x38')]=_[_0xbb8f('0x37')](_0x192fdf[_0xbb8f('0x33')],qs['fields'](_0x37691f['query'][_0xbb8f('0x39')]));_0xc8b880['attributes']=_0xc8b880[_0xbb8f('0x38')][_0xbb8f('0x4b')]?_0xc8b880['attributes']:_0x192fdf[_0xbb8f('0x33')];_0xc8b880[_0xbb8f('0x3b')]=qs[_0xbb8f('0x3c')](_0x37691f[_0xbb8f('0x35')][_0xbb8f('0x3c')]);_0xc8b880['where']=qs[_0xbb8f('0x36')](_['pick'](_0x37691f[_0xbb8f('0x35')],_0x192fdf[_0xbb8f('0x36')]));if(_0x37691f[_0xbb8f('0x35')][_0xbb8f('0x3f')]){_0xc8b880[_0xbb8f('0x3d')]=_[_0xbb8f('0x40')](_0xc8b880[_0xbb8f('0x3d')],{'$or':_[_0xbb8f('0x2f')](_0xc8b880[_0xbb8f('0x38')],function(_0xe96fad){var _0x1166c4={};_0x1166c4[_0xe96fad]={'$like':'%'+_0x37691f['query'][_0xbb8f('0x3f')]+'%'};return _0x1166c4;})});}_0xc8b880=_[_0xbb8f('0x40')]({},_0xc8b880,_0x37691f[_0xbb8f('0x43')]);return _0x207ba5[_0xbb8f('0x8e')](_0xc8b880);}})[_0xbb8f('0x25')](function(_0x415640){if(_0x415640){_0x3dc08d=_0x415640['length'];if(!_0x37691f[_0xbb8f('0x35')][_0xbb8f('0x3a')](_0xbb8f('0x5c'))){_0xc8b880['limit']=qs[_0xbb8f('0x1d')](_0x37691f[_0xbb8f('0x35')][_0xbb8f('0x1d')]);_0xc8b880[_0xbb8f('0x1b')]=qs['offset'](_0x37691f['query'][_0xbb8f('0x1b')]);}return _0x207ba5[_0xbb8f('0x8e')](_0xc8b880);}})[_0xbb8f('0x25')](function(_0x5cc49d){if(_0x5cc49d){return _0x5cc49d?{'count':_0x3dc08d,'rows':_0x5cc49d}:null;}})['then'](respondWithResult(_0x339f7f,null))[_0xbb8f('0x49')](handleError(_0x339f7f,null));};exports[_0xbb8f('0x8f')]=function(_0x5c3038,_0x43d55e,_0x376071){var _0x528a4a,_0x3757ca;var _0x2800b8=[];var _0x34e226=moment()[_0xbb8f('0x90')](_0xbb8f('0x67'));return db[_0xbb8f('0x44')][_0xbb8f('0x4c')]({'where':{'id':_0x5c3038[_0xbb8f('0x57')]['id']}})['then'](handleEntityNotFound(_0x43d55e,null))[_0xbb8f('0x25')](function(_0x12cf8c){if(_0x12cf8c){_0x3757ca=_0x12cf8c;return _0x12cf8c['addBlackLists'](_0x5c3038[_0xbb8f('0x4e')][_0xbb8f('0x68')],_[_0xbb8f('0x58')](_0x5c3038['body'],[_0xbb8f('0x68'),'id'])||{});}return null;})[_0xbb8f('0x69')](function(_0x158f82){var _0x49012a;var _0x1678c2;_0x528a4a=_0x158f82||[];var _0x510e7d=[];if(_0x158f82){for(var _0x3669a2=0x0;_0x3669a2<_0x158f82[_0xbb8f('0x4b')];_0x3669a2+=0x1){var _0x392a68=_0x158f82[_0x3669a2]['get']({'plain':!![]});_0x49012a=squel[_0xbb8f('0x6c')]()['into'](_0xbb8f('0x91'))['fromQuery']([_0xbb8f('0x70'),_0xbb8f('0x72'),_0xbb8f('0x73'),_0xbb8f('0x5f'),_0xbb8f('0x59'),_0xbb8f('0x5a')],squel[_0xbb8f('0x74')]()[_0xbb8f('0x75')]('phone','phone')[_0xbb8f('0x75')]('id',_0xbb8f('0x72'))[_0xbb8f('0x75')](_0x392a68[_0xbb8f('0x77')][_0xbb8f('0x78')](),_0xbb8f('0x73'))[_0xbb8f('0x75')](_0x5c3038['params']['id'][_0xbb8f('0x78')](),_0xbb8f('0x5f'))['field'](_0xbb8f('0x76'),_0xbb8f('0x59'))[_0xbb8f('0x75')](_0xbb8f('0x76'),'updatedAt')[_0xbb8f('0x79')](_0xbb8f('0x82'))[_0xbb8f('0x3d')](_0xbb8f('0x7a'))[_0xbb8f('0x3d')](_0xbb8f('0x7b'),_0x392a68['CmListId']['toString']())[_0xbb8f('0x3d')](_0xbb8f('0x7c')))[_0xbb8f('0x78')]();_0x510e7d[_0xbb8f('0x8b')](db[_0xbb8f('0x92')][_0xbb8f('0x35')](_0x49012a));}return BPromise[_0xbb8f('0x8c')](_0x510e7d);}})[_0xbb8f('0x25')](function(){return _0x528a4a;})[_0xbb8f('0x25')](respondWithResult(_0x43d55e,null))[_0xbb8f('0x49')](handleError(_0x43d55e,null));};exports[_0xbb8f('0x93')]=function(_0x6adae,_0x1b3dee,_0x4b2b79){return db[_0xbb8f('0x44')][_0xbb8f('0x4c')]({'where':{'id':_0x6adae[_0xbb8f('0x57')]['id']}})[_0xbb8f('0x25')](handleEntityNotFound(_0x1b3dee,null))[_0xbb8f('0x25')](function(_0x3dc6bb){if(_0x3dc6bb){return _0x3dc6bb[_0xbb8f('0x93')](_0x6adae[_0xbb8f('0x35')][_0xbb8f('0x68')]);}})[_0xbb8f('0x25')](function(_0x271f8c){if(_0x271f8c){return db[_0xbb8f('0x63')][_0xbb8f('0x26')]({'where':{'ListId':_0x6adae[_0xbb8f('0x35')][_0xbb8f('0x68')],'CampaignId':_0x6adae[_0xbb8f('0x57')]['id']}})[_0xbb8f('0x25')](function(){return _0x271f8c;});}})['then'](respondWithStatusCode(_0x1b3dee,null))[_0xbb8f('0x49')](handleError(_0x1b3dee,null));};
\ No newline at end of file
+var _0x39d0=['into','cm_hopper','scheduledAt','ContactId','ListId','select','field','phone','NOW()','CmListId','toString','from','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','COALESCE(phone,\x27\x27)','CampaignId\x20=\x20?','onlyIfOpen','fromQuery','cm_hopper_additional_phones','cmHopperId','h.id','OrderBy','join','h.ContactId\x20=\x20ci.CmContactId','h.CampaignId=?','h.createdAt\x20=\x20?','sequelize','push','all','removeLists','getBlackLists','addBlackLists','removeBlackLists','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','undefined','limit','offset','Content-Range','reject','update','then','get','IvrCampaigns','destroy','error','stack','name','send','index','map','key','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','type','VIRTUAL','merge','Campaign','count','includeAll','include','catch','show','params','rawAttributes','options','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','length','updatedAt','createdAt','UserProfileResource','getHoppers','CmHopper','CampaignId','rows','CmHopperHistory','findAll','getHopperFinals','CmHopperFinal','findOne','CmHopperBlack','getLists','CmList','addLists','format','YYYY-MM-DD\x20HH:mm:ss','ids','omit','spread','dialCheckDuplicateType','always','insert'];(function(_0x131162,_0x4c2814){var _0x45285d=function(_0x19fb1f){while(--_0x19fb1f){_0x131162['push'](_0x131162['shift']());}};_0x45285d(++_0x4c2814);}(_0x39d0,0x144));var _0x039d=function(_0x4835fc,_0x53ffb5){_0x4835fc=_0x4835fc-0x0;var _0x295770=_0x39d0[_0x4835fc];return _0x295770;};'use strict';var emlformat=require(_0x039d('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x039d('0x1'));var rp=require(_0x039d('0x2'));var moment=require(_0x039d('0x3'));var BPromise=require(_0x039d('0x4'));var Mustache=require(_0x039d('0x5'));var util=require('util');var path=require(_0x039d('0x6'));var sox=require(_0x039d('0x7'));var csv=require(_0x039d('0x8'));var ejs=require(_0x039d('0x9'));var fs=require('fs');var fs_extra=require(_0x039d('0xa'));var _=require(_0x039d('0xb'));var squel=require(_0x039d('0xc'));var crypto=require(_0x039d('0xd'));var jsforce=require(_0x039d('0xe'));var deskjs=require(_0x039d('0xf'));var toCsv=require(_0x039d('0x8'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x039d('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x039d('0x11'));var as=require(_0x039d('0x12'));var hardwareService=require(_0x039d('0x13'));var logger=require(_0x039d('0x14'))('api');var utils=require(_0x039d('0x15'));var config=require(_0x039d('0x16'));var licenseUtil=require(_0x039d('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x9930eb,_0x111f41){_0x111f41=_0x111f41||0xcc;return function(_0x24de67){if(_0x24de67){return _0x9930eb[_0x039d('0x18')](_0x111f41);}return _0x9930eb[_0x039d('0x19')](_0x111f41)[_0x039d('0x1a')]();};}function respondWithResult(_0x3147c0,_0x54cf8e){_0x54cf8e=_0x54cf8e||0xc8;return function(_0x4dc3a4){if(_0x4dc3a4){return _0x3147c0[_0x039d('0x19')](_0x54cf8e)[_0x039d('0x1b')](_0x4dc3a4);}};}function respondWithFilteredResult(_0x33e289,_0x138193){return function(_0x24c16f){if(_0x24c16f){var _0x330966=typeof _0x138193['offset']===_0x039d('0x1c')&&typeof _0x138193[_0x039d('0x1d')]===_0x039d('0x1c');var _0x4dfc0c=_0x24c16f['count'];var _0xaedb24=_0x330966?0x0:_0x138193[_0x039d('0x1e')];var _0x360233=_0x330966?_0x24c16f['count']:_0x138193['offset']+_0x138193[_0x039d('0x1d')];var _0x37ff76;if(_0x360233>=_0x4dfc0c){_0x360233=_0x4dfc0c;_0x37ff76=0xc8;}else{_0x37ff76=0xce;}_0x33e289['status'](_0x37ff76);return _0x33e289['set'](_0x039d('0x1f'),_0xaedb24+'-'+_0x360233+'/'+_0x4dfc0c)['json'](_0x24c16f);}return null;};}function patchUpdates(_0x2a8602){return function(_0x1e526e){try{jsonpatch['apply'](_0x1e526e,_0x2a8602,!![]);}catch(_0x2e33e1){return BPromise[_0x039d('0x20')](_0x2e33e1);}return _0x1e526e['save']();};}function saveUpdates(_0x6e1cb9,_0x15dcaa){return function(_0xd5c776){if(_0xd5c776){return _0xd5c776[_0x039d('0x21')](_0x6e1cb9)[_0x039d('0x22')](function(_0x5b9ade){return _0x5b9ade;});}return null;};}function removeEntity(_0x2f21b7,_0x7e230f){return function(_0x15b103){if(_0x15b103){return _0x15b103['destroy']()[_0x039d('0x22')](function(){var _0x4a3177=_0x15b103[_0x039d('0x23')]({'plain':!![]});var _0x109b2b=_0x039d('0x24');return db['UserProfileResource'][_0x039d('0x25')]({'where':{'type':_0x109b2b,'resourceId':_0x4a3177['id']}})[_0x039d('0x22')](function(){return _0x15b103;});})[_0x039d('0x22')](function(){_0x2f21b7[_0x039d('0x19')](0xcc)[_0x039d('0x1a')]();});}};}function handleEntityNotFound(_0x1ef877,_0x3ad778){return function(_0x170e34){if(!_0x170e34){_0x1ef877[_0x039d('0x18')](0x194);}return _0x170e34;};}function handleError(_0x9da588,_0x33f704){_0x33f704=_0x33f704||0x1f4;return function(_0x38ff1e){logger[_0x039d('0x26')](_0x38ff1e[_0x039d('0x27')]);if(_0x38ff1e[_0x039d('0x28')]){delete _0x38ff1e[_0x039d('0x28')];}_0x9da588[_0x039d('0x19')](_0x33f704)[_0x039d('0x29')](_0x38ff1e);};}exports[_0x039d('0x2a')]=function(_0xf477c5,_0x1f89a5){var _0xf074d8={},_0xf32a01={},_0x2eef2b={'count':0x0,'rows':[]};var _0x1babe4=_[_0x039d('0x2b')](db['Campaign']['rawAttributes'],function(_0x12ee85){return{'name':_0x12ee85['fieldName'],'type':_0x12ee85['type'][_0x039d('0x2c')]};});_0xf32a01[_0x039d('0x2d')]=_[_0x039d('0x2b')](_0x1babe4,_0x039d('0x28'));_0xf32a01[_0x039d('0x2e')]=_[_0x039d('0x2f')](_0xf477c5['query']);_0xf32a01['filters']=_[_0x039d('0x30')](_0xf32a01[_0x039d('0x2d')],_0xf32a01['query']);_0xf074d8[_0x039d('0x31')]=_[_0x039d('0x30')](_0xf32a01['model'],qs[_0x039d('0x32')](_0xf477c5[_0x039d('0x2e')][_0x039d('0x32')]));_0xf074d8[_0x039d('0x31')]=_0xf074d8['attributes']['length']?_0xf074d8[_0x039d('0x31')]:_0xf32a01[_0x039d('0x2d')];if(!_0xf477c5[_0x039d('0x2e')][_0x039d('0x33')](_0x039d('0x34'))){_0xf074d8['limit']=qs[_0x039d('0x1d')](_0xf477c5[_0x039d('0x2e')][_0x039d('0x1d')]);_0xf074d8[_0x039d('0x1e')]=qs[_0x039d('0x1e')](_0xf477c5['query'][_0x039d('0x1e')]);}_0xf074d8[_0x039d('0x35')]=qs[_0x039d('0x36')](_0xf477c5['query'][_0x039d('0x36')]);_0xf074d8[_0x039d('0x37')]=qs[_0x039d('0x38')](_[_0x039d('0x39')](_0xf477c5['query'],_0xf32a01[_0x039d('0x38')]),_0x1babe4);if(_0xf477c5[_0x039d('0x2e')][_0x039d('0x3a')]){_0xf074d8[_0x039d('0x37')]=_['merge'](_0xf074d8['where'],{'$or':_[_0x039d('0x2b')](_0x1babe4,function(_0x1b83ba){if(_0x1b83ba[_0x039d('0x3b')]!==_0x039d('0x3c')){var _0xbb1a62={};_0xbb1a62[_0x1b83ba['name']]={'$like':'%'+_0xf477c5[_0x039d('0x2e')]['filter']+'%'};return _0xbb1a62;}})});}_0xf074d8=_[_0x039d('0x3d')]({},_0xf074d8,_0xf477c5['options']);var _0x40df67={'where':_0xf074d8[_0x039d('0x37')]};return db[_0x039d('0x3e')][_0x039d('0x3f')](_0x40df67)['then'](function(_0x397d9e){_0x2eef2b[_0x039d('0x3f')]=_0x397d9e;if(_0xf477c5['query'][_0x039d('0x40')]){_0xf074d8[_0x039d('0x41')]=[{'all':!![]}];}return db['Campaign']['findAll'](_0xf074d8);})[_0x039d('0x22')](function(_0x4485dc){_0x2eef2b['rows']=_0x4485dc;return _0x2eef2b;})[_0x039d('0x22')](respondWithFilteredResult(_0x1f89a5,_0xf074d8))[_0x039d('0x42')](handleError(_0x1f89a5,null));};exports[_0x039d('0x43')]=function(_0x13e74c,_0x3c39ec){var _0x35da4d={'raw':![],'where':{'id':_0x13e74c[_0x039d('0x44')]['id']}},_0x18f09e={};_0x18f09e['model']=_['keys'](db['Campaign'][_0x039d('0x45')]);_0x18f09e[_0x039d('0x2e')]=_['keys'](_0x13e74c[_0x039d('0x2e')]);_0x18f09e[_0x039d('0x38')]=_[_0x039d('0x30')](_0x18f09e[_0x039d('0x2d')],_0x18f09e[_0x039d('0x2e')]);_0x35da4d['attributes']=_[_0x039d('0x30')](_0x18f09e[_0x039d('0x2d')],qs[_0x039d('0x32')](_0x13e74c[_0x039d('0x2e')]['fields']));_0x35da4d[_0x039d('0x31')]=_0x35da4d[_0x039d('0x31')]['length']?_0x35da4d['attributes']:_0x18f09e['model'];if(_0x13e74c[_0x039d('0x2e')]['includeAll']){_0x35da4d[_0x039d('0x41')]=[{'all':!![]}];}_0x35da4d=_[_0x039d('0x3d')]({},_0x35da4d,_0x13e74c[_0x039d('0x46')]);return db[_0x039d('0x3e')]['find'](_0x35da4d)[_0x039d('0x22')](handleEntityNotFound(_0x3c39ec,null))[_0x039d('0x22')](respondWithResult(_0x3c39ec,null))[_0x039d('0x42')](handleError(_0x3c39ec,null));};exports['create']=function(_0x207835,_0x763622){return db[_0x039d('0x3e')][_0x039d('0x47')](_0x207835[_0x039d('0x48')],{})[_0x039d('0x22')](function(_0x11642b){var _0x1efc9e=_0x207835[_0x039d('0x49')]['get']({'plain':!![]});if(!_0x1efc9e)throw new Error(_0x039d('0x4a'));if(_0x1efc9e[_0x039d('0x4b')]===_0x039d('0x49')){var _0x6a7798=_0x11642b[_0x039d('0x23')]({'plain':!![]});var _0x43c3f5=_0x039d('0x24');return db[_0x039d('0x4c')][_0x039d('0x4d')]({'where':{'name':_0x43c3f5,'userProfileId':_0x1efc9e['userProfileId']},'raw':!![]})[_0x039d('0x22')](function(_0x4f6323){if(_0x4f6323&&_0x4f6323[_0x039d('0x4e')]===0x0){return db['UserProfileResource'][_0x039d('0x47')]({'name':_0x6a7798[_0x039d('0x28')],'resourceId':_0x6a7798['id'],'type':_0x4f6323['name'],'sectionId':_0x4f6323['id']},{})['then'](function(){return _0x11642b;});}else{return _0x11642b;}})[_0x039d('0x42')](function(_0x226628){logger[_0x039d('0x26')](_0x039d('0x4f'),_0x226628);throw _0x226628;});}return _0x11642b;})[_0x039d('0x22')](respondWithResult(_0x763622,0xc9))['catch'](handleError(_0x763622,null));};exports['clone']=function(_0x482c77,_0x3613a5){var _0x56834c={'where':{'id':_0x482c77['params']['id']}},_0x45cd5b={};_0x45cd5b[_0x039d('0x2d')]=_[_0x039d('0x2f')](db['Campaign'][_0x039d('0x45')]);_0x56834c[_0x039d('0x31')]=_['intersection'](_0x45cd5b[_0x039d('0x2d')],qs[_0x039d('0x32')](_0x482c77[_0x039d('0x2e')][_0x039d('0x32')]));_0x56834c[_0x039d('0x31')]=_0x56834c[_0x039d('0x31')][_0x039d('0x50')]?_0x56834c[_0x039d('0x31')]:_0x45cd5b[_0x039d('0x2d')];if(_0x482c77[_0x039d('0x2e')][_0x039d('0x40')]){_0x56834c[_0x039d('0x41')]=[{'all':!![]}];}_0x56834c=_['merge']({},_0x56834c,_0x482c77[_0x039d('0x46')]);return db[_0x039d('0x3e')][_0x039d('0x4d')](_0x56834c)[_0x039d('0x22')](handleEntityNotFound(_0x3613a5,null))[_0x039d('0x22')](function(_0x56b61c){if(_0x56b61c){var _0x4f8559=_0x56b61c[_0x039d('0x23')]({'plain':!![]});_0x4f8559=qs['omit'](_0x4f8559,['id','createdAt',_0x039d('0x51')]);_0x482c77[_0x039d('0x48')]=_['omit'](_0x482c77[_0x039d('0x48')],['id',_0x039d('0x52'),'updatedAt']);return db[_0x039d('0x3e')][_0x039d('0x47')](_[_0x039d('0x3d')](_0x4f8559,_0x482c77['body']),{'include':_0x482c77[_0x039d('0x2e')][_0x039d('0x40')]?[{'all':!![]}]:undefined})[_0x039d('0x22')](function(_0x4729dc){var _0x536bce=_0x482c77['user'][_0x039d('0x23')]({'plain':!![]});if(!_0x536bce)throw new Error(_0x039d('0x4a'));if(_0x536bce[_0x039d('0x4b')]===_0x039d('0x49')){var _0x44ab8a=_0x4729dc[_0x039d('0x23')]({'plain':!![]});var _0x5b3083=_0x039d('0x24');return db[_0x039d('0x4c')][_0x039d('0x4d')]({'where':{'name':_0x5b3083,'userProfileId':_0x536bce['userProfileId']},'raw':!![]})[_0x039d('0x22')](function(_0x14ed0f){if(_0x14ed0f&&_0x14ed0f[_0x039d('0x4e')]===0x0){return db[_0x039d('0x53')][_0x039d('0x47')]({'name':_0x44ab8a[_0x039d('0x28')],'resourceId':_0x44ab8a['id'],'type':_0x14ed0f['name'],'sectionId':_0x14ed0f['id']},{})[_0x039d('0x22')](function(){return _0x4729dc;});}else{return _0x4729dc;}})['catch'](function(_0x5c29b0){logger[_0x039d('0x26')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5c29b0);throw _0x5c29b0;});}return _0x4729dc;});}})[_0x039d('0x22')](respondWithResult(_0x3613a5,0xc9))[_0x039d('0x42')](handleError(_0x3613a5,null));};exports['update']=function(_0x338a03,_0x2fbf5f){if(_0x338a03['body']['id']){delete _0x338a03[_0x039d('0x48')]['id'];}return db['Campaign'][_0x039d('0x4d')]({'where':{'id':_0x338a03[_0x039d('0x44')]['id']}})[_0x039d('0x22')](handleEntityNotFound(_0x2fbf5f,null))[_0x039d('0x22')](saveUpdates(_0x338a03[_0x039d('0x48')],null))[_0x039d('0x22')](respondWithResult(_0x2fbf5f,null))[_0x039d('0x42')](handleError(_0x2fbf5f,null));};exports[_0x039d('0x25')]=function(_0x2eeb5d,_0x3f8fc2){return db['Campaign'][_0x039d('0x4d')]({'where':{'id':_0x2eeb5d[_0x039d('0x44')]['id']}})['then'](handleEntityNotFound(_0x3f8fc2,null))[_0x039d('0x22')](removeEntity(_0x3f8fc2,null))[_0x039d('0x42')](handleError(_0x3f8fc2,null));};exports[_0x039d('0x54')]=function(_0x3de906,_0xb8c3a0,_0x345e23){var _0x6bfc15={'raw':!![],'where':{}};var _0x4256a8={};var _0x12d02c={'count':0x0,'rows':[]};return db[_0x039d('0x3e')]['findOne']({'where':{'id':_0x3de906[_0x039d('0x44')]['id']}})[_0x039d('0x22')](handleEntityNotFound(_0xb8c3a0,null))[_0x039d('0x22')](function(_0x2304b3){if(_0x2304b3){_0x4256a8[_0x039d('0x2d')]=_[_0x039d('0x2f')](db[_0x039d('0x55')]['rawAttributes']);_0x4256a8[_0x039d('0x2e')]=_['keys'](_0x3de906[_0x039d('0x2e')]);_0x4256a8['filters']=_['intersection'](_0x4256a8[_0x039d('0x2d')],_0x4256a8[_0x039d('0x2e')]);_0x6bfc15[_0x039d('0x31')]=_['intersection'](_0x4256a8[_0x039d('0x2d')],qs['fields'](_0x3de906['query'][_0x039d('0x32')]));_0x6bfc15[_0x039d('0x31')]=_0x6bfc15['attributes'][_0x039d('0x50')]?_0x6bfc15['attributes']:_0x4256a8[_0x039d('0x2d')];if(!_0x3de906[_0x039d('0x2e')]['hasOwnProperty'](_0x039d('0x34'))){_0x6bfc15[_0x039d('0x1d')]=qs['limit'](_0x3de906[_0x039d('0x2e')][_0x039d('0x1d')]);_0x6bfc15['offset']=qs[_0x039d('0x1e')](_0x3de906[_0x039d('0x2e')][_0x039d('0x1e')]);}_0x6bfc15['order']=qs['sort'](_0x3de906[_0x039d('0x2e')][_0x039d('0x36')]);_0x6bfc15[_0x039d('0x37')]=qs[_0x039d('0x38')](_[_0x039d('0x39')](_0x3de906[_0x039d('0x2e')],_0x4256a8[_0x039d('0x38')]));_0x6bfc15[_0x039d('0x37')][_0x039d('0x56')]=_0x2304b3['id'];if(_0x3de906[_0x039d('0x2e')]['filter']){_0x6bfc15[_0x039d('0x37')]=_[_0x039d('0x3d')](_0x6bfc15['where'],{'$or':_['map'](_0x6bfc15[_0x039d('0x31')],function(_0x2dc97f){var _0x3172e0={};_0x3172e0[_0x2dc97f]={'$like':'%'+_0x3de906[_0x039d('0x2e')][_0x039d('0x3a')]+'%'};return _0x3172e0;})});}_0x6bfc15=_[_0x039d('0x3d')]({},_0x6bfc15,_0x3de906[_0x039d('0x46')]);return db[_0x039d('0x55')][_0x039d('0x3f')]({'where':_0x6bfc15[_0x039d('0x37')]})[_0x039d('0x22')](function(_0x298786){_0x12d02c[_0x039d('0x3f')]=_0x298786;if(_0x3de906['query']['includeAll']){_0x6bfc15[_0x039d('0x41')]=[{'all':!![]}];}return db[_0x039d('0x55')]['findAll'](_0x6bfc15);})[_0x039d('0x22')](function(_0x4c7d3e){_0x12d02c[_0x039d('0x57')]=_0x4c7d3e;return _0x12d02c;});}})[_0x039d('0x22')](respondWithFilteredResult(_0xb8c3a0,_0x6bfc15))[_0x039d('0x42')](handleError(_0xb8c3a0,null));};exports['getHopperHistories']=function(_0x4bbefe,_0x285da7,_0x5595a0){var _0x322b44={'raw':!![],'where':{}};var _0x5e451b={};var _0x102d68={'count':0x0,'rows':[]};return db[_0x039d('0x3e')]['findOne']({'where':{'id':_0x4bbefe[_0x039d('0x44')]['id']}})[_0x039d('0x22')](handleEntityNotFound(_0x285da7,null))[_0x039d('0x22')](function(_0x3c95ea){if(_0x3c95ea){_0x5e451b['model']=_[_0x039d('0x2f')](db[_0x039d('0x58')][_0x039d('0x45')]);_0x5e451b[_0x039d('0x2e')]=_[_0x039d('0x2f')](_0x4bbefe[_0x039d('0x2e')]);_0x5e451b[_0x039d('0x38')]=_[_0x039d('0x30')](_0x5e451b[_0x039d('0x2d')],_0x5e451b[_0x039d('0x2e')]);_0x322b44[_0x039d('0x31')]=_['intersection'](_0x5e451b[_0x039d('0x2d')],qs[_0x039d('0x32')](_0x4bbefe[_0x039d('0x2e')][_0x039d('0x32')]));_0x322b44[_0x039d('0x31')]=_0x322b44[_0x039d('0x31')]['length']?_0x322b44[_0x039d('0x31')]:_0x5e451b['model'];if(!_0x4bbefe['query']['hasOwnProperty'](_0x039d('0x34'))){_0x322b44[_0x039d('0x1d')]=qs[_0x039d('0x1d')](_0x4bbefe[_0x039d('0x2e')][_0x039d('0x1d')]);_0x322b44[_0x039d('0x1e')]=qs[_0x039d('0x1e')](_0x4bbefe['query'][_0x039d('0x1e')]);}_0x322b44[_0x039d('0x35')]=qs['sort'](_0x4bbefe[_0x039d('0x2e')][_0x039d('0x36')]);_0x322b44[_0x039d('0x37')]=qs['filters'](_['pick'](_0x4bbefe[_0x039d('0x2e')],_0x5e451b[_0x039d('0x38')]));_0x322b44[_0x039d('0x37')]['CampaignId']=_0x3c95ea['id'];if(_0x4bbefe[_0x039d('0x2e')][_0x039d('0x3a')]){_0x322b44[_0x039d('0x37')]=_[_0x039d('0x3d')](_0x322b44[_0x039d('0x37')],{'$or':_[_0x039d('0x2b')](_0x322b44[_0x039d('0x31')],function(_0x1d42c8){var _0x3a6bb4={};_0x3a6bb4[_0x1d42c8]={'$like':'%'+_0x4bbefe[_0x039d('0x2e')][_0x039d('0x3a')]+'%'};return _0x3a6bb4;})});}_0x322b44=_[_0x039d('0x3d')]({},_0x322b44,_0x4bbefe[_0x039d('0x46')]);return db[_0x039d('0x58')][_0x039d('0x3f')]({'where':_0x322b44[_0x039d('0x37')]})[_0x039d('0x22')](function(_0x2d7e97){_0x102d68[_0x039d('0x3f')]=_0x2d7e97;if(_0x4bbefe[_0x039d('0x2e')][_0x039d('0x40')]){_0x322b44[_0x039d('0x41')]=[{'all':!![]}];}return db['CmHopperHistory'][_0x039d('0x59')](_0x322b44);})[_0x039d('0x22')](function(_0x3f8be2){_0x102d68['rows']=_0x3f8be2;return _0x102d68;});}})[_0x039d('0x22')](respondWithFilteredResult(_0x285da7,_0x322b44))[_0x039d('0x42')](handleError(_0x285da7,null));};exports[_0x039d('0x5a')]=function(_0x52666f,_0x107679,_0x2c03ab){var _0x17200c={'raw':!![],'where':{}};var _0x5e1b33={};var _0x2c1982={'count':0x0,'rows':[]};return db[_0x039d('0x3e')]['findOne']({'where':{'id':_0x52666f[_0x039d('0x44')]['id']}})[_0x039d('0x22')](handleEntityNotFound(_0x107679,null))[_0x039d('0x22')](function(_0x46c177){if(_0x46c177){_0x5e1b33[_0x039d('0x2d')]=_[_0x039d('0x2f')](db[_0x039d('0x5b')][_0x039d('0x45')]);_0x5e1b33[_0x039d('0x2e')]=_['keys'](_0x52666f[_0x039d('0x2e')]);_0x5e1b33[_0x039d('0x38')]=_['intersection'](_0x5e1b33[_0x039d('0x2d')],_0x5e1b33['query']);_0x17200c[_0x039d('0x31')]=_[_0x039d('0x30')](_0x5e1b33[_0x039d('0x2d')],qs['fields'](_0x52666f[_0x039d('0x2e')][_0x039d('0x32')]));_0x17200c['attributes']=_0x17200c[_0x039d('0x31')]['length']?_0x17200c[_0x039d('0x31')]:_0x5e1b33[_0x039d('0x2d')];if(!_0x52666f[_0x039d('0x2e')][_0x039d('0x33')]('nolimit')){_0x17200c[_0x039d('0x1d')]=qs[_0x039d('0x1d')](_0x52666f[_0x039d('0x2e')][_0x039d('0x1d')]);_0x17200c[_0x039d('0x1e')]=qs[_0x039d('0x1e')](_0x52666f['query'][_0x039d('0x1e')]);}_0x17200c[_0x039d('0x35')]=qs[_0x039d('0x36')](_0x52666f[_0x039d('0x2e')][_0x039d('0x36')]);_0x17200c[_0x039d('0x37')]=qs[_0x039d('0x38')](_[_0x039d('0x39')](_0x52666f[_0x039d('0x2e')],_0x5e1b33[_0x039d('0x38')]));_0x17200c[_0x039d('0x37')][_0x039d('0x56')]=_0x46c177['id'];if(_0x52666f[_0x039d('0x2e')][_0x039d('0x3a')]){_0x17200c[_0x039d('0x37')]=_[_0x039d('0x3d')](_0x17200c['where'],{'$or':_[_0x039d('0x2b')](_0x17200c['attributes'],function(_0x1e4942){var _0x266096={};_0x266096[_0x1e4942]={'$like':'%'+_0x52666f[_0x039d('0x2e')][_0x039d('0x3a')]+'%'};return _0x266096;})});}_0x17200c=_[_0x039d('0x3d')]({},_0x17200c,_0x52666f[_0x039d('0x46')]);return db['CmHopperFinal'][_0x039d('0x3f')]({'where':_0x17200c[_0x039d('0x37')]})[_0x039d('0x22')](function(_0x281c42){_0x2c1982[_0x039d('0x3f')]=_0x281c42;if(_0x52666f[_0x039d('0x2e')][_0x039d('0x40')]){_0x17200c[_0x039d('0x41')]=[{'all':!![]}];}return db[_0x039d('0x5b')][_0x039d('0x59')](_0x17200c);})[_0x039d('0x22')](function(_0x1a3fb6){_0x2c1982['rows']=_0x1a3fb6;return _0x2c1982;});}})[_0x039d('0x22')](respondWithFilteredResult(_0x107679,_0x17200c))[_0x039d('0x42')](handleError(_0x107679,null));};exports['getHopperBlacks']=function(_0x3f8cc3,_0x5d4328,_0x47b3f2){var _0x2468c8={'raw':!![],'where':{}};var _0x402091={};var _0x393145={'count':0x0,'rows':[]};return db[_0x039d('0x3e')][_0x039d('0x5c')]({'where':{'id':_0x3f8cc3[_0x039d('0x44')]['id']}})[_0x039d('0x22')](handleEntityNotFound(_0x5d4328,null))[_0x039d('0x22')](function(_0x3239b8){if(_0x3239b8){_0x402091[_0x039d('0x2d')]=_['keys'](db[_0x039d('0x5d')][_0x039d('0x45')]);_0x402091[_0x039d('0x2e')]=_[_0x039d('0x2f')](_0x3f8cc3[_0x039d('0x2e')]);_0x402091[_0x039d('0x38')]=_[_0x039d('0x30')](_0x402091[_0x039d('0x2d')],_0x402091[_0x039d('0x2e')]);_0x2468c8[_0x039d('0x31')]=_[_0x039d('0x30')](_0x402091[_0x039d('0x2d')],qs[_0x039d('0x32')](_0x3f8cc3[_0x039d('0x2e')][_0x039d('0x32')]));_0x2468c8[_0x039d('0x31')]=_0x2468c8['attributes']['length']?_0x2468c8[_0x039d('0x31')]:_0x402091[_0x039d('0x2d')];if(!_0x3f8cc3[_0x039d('0x2e')][_0x039d('0x33')](_0x039d('0x34'))){_0x2468c8[_0x039d('0x1d')]=qs[_0x039d('0x1d')](_0x3f8cc3[_0x039d('0x2e')][_0x039d('0x1d')]);_0x2468c8[_0x039d('0x1e')]=qs[_0x039d('0x1e')](_0x3f8cc3[_0x039d('0x2e')][_0x039d('0x1e')]);}_0x2468c8[_0x039d('0x35')]=qs[_0x039d('0x36')](_0x3f8cc3[_0x039d('0x2e')][_0x039d('0x36')]);_0x2468c8[_0x039d('0x37')]=qs['filters'](_[_0x039d('0x39')](_0x3f8cc3[_0x039d('0x2e')],_0x402091['filters']));_0x2468c8[_0x039d('0x37')]['CampaignId']=_0x3239b8['id'];if(_0x3f8cc3[_0x039d('0x2e')][_0x039d('0x3a')]){_0x2468c8[_0x039d('0x37')]=_[_0x039d('0x3d')](_0x2468c8['where'],{'$or':_['map'](_0x2468c8[_0x039d('0x31')],function(_0x1558c3){var _0x483097={};_0x483097[_0x1558c3]={'$like':'%'+_0x3f8cc3[_0x039d('0x2e')][_0x039d('0x3a')]+'%'};return _0x483097;})});}_0x2468c8=_[_0x039d('0x3d')]({},_0x2468c8,_0x3f8cc3[_0x039d('0x46')]);return db[_0x039d('0x5d')][_0x039d('0x3f')]({'where':_0x2468c8['where']})[_0x039d('0x22')](function(_0x3cd9ff){_0x393145[_0x039d('0x3f')]=_0x3cd9ff;if(_0x3f8cc3[_0x039d('0x2e')][_0x039d('0x40')]){_0x2468c8[_0x039d('0x41')]=[{'all':!![]}];}return db[_0x039d('0x5d')]['findAll'](_0x2468c8);})['then'](function(_0x4021f0){_0x393145[_0x039d('0x57')]=_0x4021f0;return _0x393145;});}})[_0x039d('0x22')](respondWithFilteredResult(_0x5d4328,_0x2468c8))['catch'](handleError(_0x5d4328,null));};exports[_0x039d('0x5e')]=function(_0x601405,_0x40aa7b,_0xe171e9){var _0x75447b={};var _0x1f6425={};var _0x4f81a1;var _0x10de9f;return db['Campaign']['findOne']({'where':{'id':_0x601405['params']['id']}})[_0x039d('0x22')](handleEntityNotFound(_0x40aa7b,null))[_0x039d('0x22')](function(_0x2206f3){if(_0x2206f3){_0x4f81a1=_0x2206f3;_0x1f6425['model']=_[_0x039d('0x2f')](db[_0x039d('0x5f')][_0x039d('0x45')]);_0x1f6425['query']=_['keys'](_0x601405[_0x039d('0x2e')]);_0x1f6425[_0x039d('0x38')]=_[_0x039d('0x30')](_0x1f6425[_0x039d('0x2d')],_0x1f6425[_0x039d('0x2e')]);_0x75447b[_0x039d('0x31')]=_[_0x039d('0x30')](_0x1f6425[_0x039d('0x2d')],qs[_0x039d('0x32')](_0x601405[_0x039d('0x2e')][_0x039d('0x32')]));_0x75447b[_0x039d('0x31')]=_0x75447b['attributes'][_0x039d('0x50')]?_0x75447b['attributes']:_0x1f6425[_0x039d('0x2d')];_0x75447b['order']=qs[_0x039d('0x36')](_0x601405['query'][_0x039d('0x36')]);_0x75447b[_0x039d('0x37')]=qs[_0x039d('0x38')](_['pick'](_0x601405[_0x039d('0x2e')],_0x1f6425['filters']));if(_0x601405['query'][_0x039d('0x3a')]){_0x75447b[_0x039d('0x37')]=_[_0x039d('0x3d')](_0x75447b['where'],{'$or':_[_0x039d('0x2b')](_0x75447b[_0x039d('0x31')],function(_0x853111){var _0x3279e2={};_0x3279e2[_0x853111]={'$like':'%'+_0x601405[_0x039d('0x2e')][_0x039d('0x3a')]+'%'};return _0x3279e2;})});}_0x75447b=_[_0x039d('0x3d')]({},_0x75447b,_0x601405[_0x039d('0x46')]);return _0x4f81a1[_0x039d('0x5e')](_0x75447b);}})[_0x039d('0x22')](function(_0x50938a){if(_0x50938a){_0x10de9f=_0x50938a[_0x039d('0x50')];if(!_0x601405[_0x039d('0x2e')][_0x039d('0x33')]('nolimit')){_0x75447b[_0x039d('0x1d')]=qs[_0x039d('0x1d')](_0x601405['query'][_0x039d('0x1d')]);_0x75447b[_0x039d('0x1e')]=qs['offset'](_0x601405[_0x039d('0x2e')][_0x039d('0x1e')]);}return _0x4f81a1[_0x039d('0x5e')](_0x75447b);}})['then'](function(_0x4ba749){if(_0x4ba749){return _0x4ba749?{'count':_0x10de9f,'rows':_0x4ba749}:null;}})[_0x039d('0x22')](respondWithResult(_0x40aa7b,null))[_0x039d('0x42')](handleError(_0x40aa7b,null));};exports[_0x039d('0x60')]=function(_0x4b2a2d,_0x1bedc0,_0x372c50){var _0x1d9e51,_0x34af30;var _0x13d85d=[];var _0x278d69=moment()[_0x039d('0x61')](_0x039d('0x62'));return db[_0x039d('0x3e')][_0x039d('0x4d')]({'where':{'id':_0x4b2a2d[_0x039d('0x44')]['id']}})[_0x039d('0x22')](handleEntityNotFound(_0x1bedc0,null))[_0x039d('0x22')](function(_0x328f00){if(_0x328f00){_0x34af30=_0x328f00;return _0x328f00[_0x039d('0x60')](_0x4b2a2d[_0x039d('0x48')][_0x039d('0x63')],_[_0x039d('0x64')](_0x4b2a2d[_0x039d('0x48')],[_0x039d('0x63'),'id'])||{});}return null;})[_0x039d('0x65')](function(_0x3cdaff){var _0x3c8b9d;var _0xb03b44;_0x1d9e51=_0x3cdaff||[];var _0xdd86ad=[];if(_0x3cdaff){for(var _0x1a6c95=0x0;_0x1a6c95<_0x3cdaff['length'];_0x1a6c95+=0x1){var _0x5e6aa1=_0x3cdaff[_0x1a6c95][_0x039d('0x23')]({'plain':!![]});_0x34af30[_0x039d('0x66')]=_0x4b2a2d[_0x039d('0x48')][_0x039d('0x66')]?_0x4b2a2d[_0x039d('0x48')][_0x039d('0x66')]:_0x34af30['dialCheckDuplicateType'];switch(_0x34af30[_0x039d('0x66')]){case _0x039d('0x67'):_0x3c8b9d=squel[_0x039d('0x68')]()[_0x039d('0x69')](_0x039d('0x6a'))['fromQuery'](['phone',_0x039d('0x6b'),_0x039d('0x6c'),_0x039d('0x6d'),_0x039d('0x56'),_0x039d('0x52'),_0x039d('0x51')],squel[_0x039d('0x6e')]()[_0x039d('0x6f')](_0x039d('0x70'),_0x039d('0x70'))[_0x039d('0x6f')](_0x039d('0x71'),_0x039d('0x6b'))[_0x039d('0x6f')]('id','ContactId')[_0x039d('0x6f')](_0x5e6aa1[_0x039d('0x72')][_0x039d('0x73')](),_0x039d('0x6d'))[_0x039d('0x6f')](_0x4b2a2d[_0x039d('0x44')]['id'][_0x039d('0x73')](),_0x039d('0x56'))['field']('\x27'+_0x278d69+'\x27','createdAt')[_0x039d('0x6f')]('\x27'+_0x278d69+'\x27',_0x039d('0x51'))[_0x039d('0x74')](_0x039d('0x75'))[_0x039d('0x37')](_0x039d('0x76'))[_0x039d('0x37')](_0x039d('0x77'),_0x5e6aa1[_0x039d('0x72')][_0x039d('0x73')]())[_0x039d('0x37')](_0x039d('0x78'))[_0x039d('0x37')](_0x039d('0x79'),squel[_0x039d('0x6e')]()['field'](_0x039d('0x7a'))[_0x039d('0x74')](_0x039d('0x7b'))[_0x039d('0x37')]('CampaignId\x20=\x20?',_0x4b2a2d[_0x039d('0x44')]['id'][_0x039d('0x73')]()))[_0x039d('0x37')](_0x039d('0x79'),squel[_0x039d('0x6e')]()['field'](_0x039d('0x7c'))[_0x039d('0x74')]('cm_hopper')[_0x039d('0x37')](_0x039d('0x7d'),_0x4b2a2d[_0x039d('0x44')]['id'][_0x039d('0x73')]())))['toString']();break;case _0x039d('0x7e'):_0x3c8b9d=squel[_0x039d('0x68')]()[_0x039d('0x69')](_0x039d('0x6a'))[_0x039d('0x7f')](['phone',_0x039d('0x6b'),_0x039d('0x6c'),_0x039d('0x6d'),_0x039d('0x56'),'createdAt',_0x039d('0x51')],squel[_0x039d('0x6e')]()['field']('phone',_0x039d('0x70'))[_0x039d('0x6f')]('NOW()',_0x039d('0x6b'))['field']('id',_0x039d('0x6c'))[_0x039d('0x6f')](_0x5e6aa1[_0x039d('0x72')][_0x039d('0x73')](),_0x039d('0x6d'))[_0x039d('0x6f')](_0x4b2a2d[_0x039d('0x44')]['id'][_0x039d('0x73')](),_0x039d('0x56'))[_0x039d('0x6f')]('\x27'+_0x278d69+'\x27',_0x039d('0x52'))[_0x039d('0x6f')]('\x27'+_0x278d69+'\x27',_0x039d('0x51'))[_0x039d('0x74')](_0x039d('0x75'))['where']('deletedAt\x20IS\x20NULL')['where']('ListId\x20=\x20?',_0x5e6aa1[_0x039d('0x72')][_0x039d('0x73')]())[_0x039d('0x37')](_0x039d('0x78'))[_0x039d('0x37')](_0x039d('0x79'),squel[_0x039d('0x6e')]()[_0x039d('0x6f')](_0x039d('0x7c'))[_0x039d('0x74')](_0x039d('0x6a'))[_0x039d('0x37')](_0x039d('0x7d'),_0x4b2a2d[_0x039d('0x44')]['id'][_0x039d('0x73')]())))[_0x039d('0x73')]();break;default:_0x3c8b9d=squel[_0x039d('0x68')]()[_0x039d('0x69')](_0x039d('0x6a'))['fromQuery']([_0x039d('0x70'),_0x039d('0x6b'),'ContactId',_0x039d('0x6d'),_0x039d('0x56'),_0x039d('0x52'),_0x039d('0x51')],squel[_0x039d('0x6e')]()['field'](_0x039d('0x70'),_0x039d('0x70'))['field'](_0x039d('0x71'),'scheduledAt')['field']('id',_0x039d('0x6c'))[_0x039d('0x6f')](_0x5e6aa1['CmListId'][_0x039d('0x73')](),_0x039d('0x6d'))[_0x039d('0x6f')](_0x4b2a2d[_0x039d('0x44')]['id']['toString'](),_0x039d('0x56'))[_0x039d('0x6f')]('\x27'+_0x278d69+'\x27',_0x039d('0x52'))[_0x039d('0x6f')]('\x27'+_0x278d69+'\x27',_0x039d('0x51'))['from'](_0x039d('0x75'))[_0x039d('0x37')](_0x039d('0x76'))['where']('ListId\x20=\x20?',_0x5e6aa1[_0x039d('0x72')][_0x039d('0x73')]())[_0x039d('0x37')](_0x039d('0x78')))['toString']();}_0xb03b44=squel['insert']()['into'](_0x039d('0x80'))[_0x039d('0x7f')]([_0x039d('0x81'),_0x039d('0x6b'),_0x039d('0x70'),'OrderBy','createdAt',_0x039d('0x51')],squel[_0x039d('0x6e')]()['field'](_0x039d('0x82'),'id')[_0x039d('0x6f')](_0x039d('0x71'),'scheduledAt')['field']('ci.item',_0x039d('0x70'))['field']('ci.OrderBY',_0x039d('0x83'))[_0x039d('0x6f')]('\x27'+_0x278d69+'\x27',_0x039d('0x52'))[_0x039d('0x6f')]('\x27'+_0x278d69+'\x27',_0x039d('0x51'))['from']('cm_contact_has_items','ci')[_0x039d('0x84')](_0x039d('0x6a'),'h',_0x039d('0x85'))['where']('h.ListId\x20=\x20?',_0x5e6aa1['CmListId'][_0x039d('0x73')]())[_0x039d('0x37')](_0x039d('0x86'),_0x4b2a2d[_0x039d('0x44')]['id']['toString']())[_0x039d('0x37')](_0x039d('0x87'),_0x278d69))[_0x039d('0x73')]();_0xdd86ad['push'](db[_0x039d('0x88')]['query'](_0x3c8b9d));_0x13d85d[_0x039d('0x89')](db[_0x039d('0x88')][_0x039d('0x2e')](_0xb03b44));}return BPromise['all'](_0xdd86ad);}})[_0x039d('0x22')](function(){return BPromise[_0x039d('0x8a')](_0x13d85d);})[_0x039d('0x22')](function(){return _0x1d9e51;})['then'](respondWithResult(_0x1bedc0,null))['catch'](handleError(_0x1bedc0,null));};exports[_0x039d('0x8b')]=function(_0x363d6d,_0x4aedab,_0x7f77fe){return db[_0x039d('0x3e')][_0x039d('0x4d')]({'where':{'id':_0x363d6d['params']['id']}})[_0x039d('0x22')](handleEntityNotFound(_0x4aedab,null))[_0x039d('0x22')](function(_0x200f24){if(_0x200f24){return _0x200f24[_0x039d('0x8b')](_0x363d6d[_0x039d('0x2e')]['ids']);}})[_0x039d('0x22')](function(_0x193021){if(_0x193021){return db[_0x039d('0x55')][_0x039d('0x25')]({'where':{'ListId':_0x363d6d['query']['ids'],'CampaignId':_0x363d6d[_0x039d('0x44')]['id']}})[_0x039d('0x22')](function(){return _0x193021;});}})[_0x039d('0x22')](respondWithStatusCode(_0x4aedab,null))[_0x039d('0x42')](handleError(_0x4aedab,null));};exports['getBlackLists']=function(_0x25a310,_0x11a835,_0x31f666){var _0x46752d={};var _0x20b012={};var _0x48a38b;var _0x394251;return db[_0x039d('0x3e')]['findOne']({'where':{'id':_0x25a310[_0x039d('0x44')]['id']}})[_0x039d('0x22')](handleEntityNotFound(_0x11a835,null))[_0x039d('0x22')](function(_0x11146f){if(_0x11146f){_0x48a38b=_0x11146f;_0x20b012[_0x039d('0x2d')]=_[_0x039d('0x2f')](db[_0x039d('0x5f')][_0x039d('0x45')]);_0x20b012[_0x039d('0x2e')]=_[_0x039d('0x2f')](_0x25a310[_0x039d('0x2e')]);_0x20b012[_0x039d('0x38')]=_[_0x039d('0x30')](_0x20b012[_0x039d('0x2d')],_0x20b012[_0x039d('0x2e')]);_0x46752d[_0x039d('0x31')]=_[_0x039d('0x30')](_0x20b012[_0x039d('0x2d')],qs[_0x039d('0x32')](_0x25a310[_0x039d('0x2e')][_0x039d('0x32')]));_0x46752d[_0x039d('0x31')]=_0x46752d[_0x039d('0x31')][_0x039d('0x50')]?_0x46752d[_0x039d('0x31')]:_0x20b012[_0x039d('0x2d')];_0x46752d[_0x039d('0x35')]=qs[_0x039d('0x36')](_0x25a310[_0x039d('0x2e')][_0x039d('0x36')]);_0x46752d['where']=qs[_0x039d('0x38')](_[_0x039d('0x39')](_0x25a310[_0x039d('0x2e')],_0x20b012['filters']));if(_0x25a310['query'][_0x039d('0x3a')]){_0x46752d['where']=_[_0x039d('0x3d')](_0x46752d[_0x039d('0x37')],{'$or':_[_0x039d('0x2b')](_0x46752d['attributes'],function(_0x50c6a2){var _0x5b549e={};_0x5b549e[_0x50c6a2]={'$like':'%'+_0x25a310[_0x039d('0x2e')][_0x039d('0x3a')]+'%'};return _0x5b549e;})});}_0x46752d=_[_0x039d('0x3d')]({},_0x46752d,_0x25a310[_0x039d('0x46')]);return _0x48a38b['getBlackLists'](_0x46752d);}})[_0x039d('0x22')](function(_0x17ae98){if(_0x17ae98){_0x394251=_0x17ae98[_0x039d('0x50')];if(!_0x25a310[_0x039d('0x2e')][_0x039d('0x33')](_0x039d('0x34'))){_0x46752d[_0x039d('0x1d')]=qs[_0x039d('0x1d')](_0x25a310[_0x039d('0x2e')][_0x039d('0x1d')]);_0x46752d[_0x039d('0x1e')]=qs[_0x039d('0x1e')](_0x25a310[_0x039d('0x2e')][_0x039d('0x1e')]);}return _0x48a38b[_0x039d('0x8c')](_0x46752d);}})[_0x039d('0x22')](function(_0x4fdfe2){if(_0x4fdfe2){return _0x4fdfe2?{'count':_0x394251,'rows':_0x4fdfe2}:null;}})[_0x039d('0x22')](respondWithResult(_0x11a835,null))[_0x039d('0x42')](handleError(_0x11a835,null));};exports[_0x039d('0x8d')]=function(_0x241ce5,_0x1f9bc7,_0xb512a7){var _0xe543d4,_0x28b87b;var _0x4f03bb=[];var _0x2be376=moment()[_0x039d('0x61')](_0x039d('0x62'));return db[_0x039d('0x3e')][_0x039d('0x4d')]({'where':{'id':_0x241ce5[_0x039d('0x44')]['id']}})[_0x039d('0x22')](handleEntityNotFound(_0x1f9bc7,null))[_0x039d('0x22')](function(_0x4d7133){if(_0x4d7133){_0x28b87b=_0x4d7133;return _0x4d7133[_0x039d('0x8d')](_0x241ce5[_0x039d('0x48')]['ids'],_[_0x039d('0x64')](_0x241ce5[_0x039d('0x48')],[_0x039d('0x63'),'id'])||{});}return null;})[_0x039d('0x65')](function(_0x19a016){var _0x3cf081;var _0x573eed;_0xe543d4=_0x19a016||[];var _0xc8fe5b=[];if(_0x19a016){for(var _0x39154b=0x0;_0x39154b<_0x19a016['length'];_0x39154b+=0x1){var _0x1eaefe=_0x19a016[_0x39154b][_0x039d('0x23')]({'plain':!![]});_0x3cf081=squel[_0x039d('0x68')]()[_0x039d('0x69')]('cm_hopper_black')[_0x039d('0x7f')]([_0x039d('0x70'),'ContactId','ListId',_0x039d('0x56'),_0x039d('0x52'),_0x039d('0x51')],squel[_0x039d('0x6e')]()['field'](_0x039d('0x70'),_0x039d('0x70'))[_0x039d('0x6f')]('id',_0x039d('0x6c'))[_0x039d('0x6f')](_0x1eaefe[_0x039d('0x72')][_0x039d('0x73')](),_0x039d('0x6d'))['field'](_0x241ce5[_0x039d('0x44')]['id'][_0x039d('0x73')](),_0x039d('0x56'))[_0x039d('0x6f')](_0x039d('0x71'),_0x039d('0x52'))[_0x039d('0x6f')](_0x039d('0x71'),_0x039d('0x51'))[_0x039d('0x74')](_0x039d('0x75'))[_0x039d('0x37')](_0x039d('0x76'))[_0x039d('0x37')](_0x039d('0x77'),_0x1eaefe[_0x039d('0x72')]['toString']())[_0x039d('0x37')](_0x039d('0x78')))[_0x039d('0x73')]();_0xc8fe5b['push'](db[_0x039d('0x88')]['query'](_0x3cf081));}return BPromise[_0x039d('0x8a')](_0xc8fe5b);}})[_0x039d('0x22')](function(){return _0xe543d4;})[_0x039d('0x22')](respondWithResult(_0x1f9bc7,null))[_0x039d('0x42')](handleError(_0x1f9bc7,null));};exports[_0x039d('0x8e')]=function(_0x1c70f1,_0x129de4,_0x3da412){return db[_0x039d('0x3e')][_0x039d('0x4d')]({'where':{'id':_0x1c70f1[_0x039d('0x44')]['id']}})['then'](handleEntityNotFound(_0x129de4,null))[_0x039d('0x22')](function(_0x562a05){if(_0x562a05){return _0x562a05[_0x039d('0x8e')](_0x1c70f1[_0x039d('0x2e')][_0x039d('0x63')]);}})[_0x039d('0x22')](function(_0x39cbd3){if(_0x39cbd3){return db[_0x039d('0x5d')][_0x039d('0x25')]({'where':{'ListId':_0x1c70f1[_0x039d('0x2e')][_0x039d('0x63')],'CampaignId':_0x1c70f1['params']['id']}})[_0x039d('0x22')](function(){return _0x39cbd3;});}})[_0x039d('0x22')](respondWithStatusCode(_0x129de4,null))['catch'](handleError(_0x129de4,null));};
\ No newline at end of file
diff --git a/server/api/campaign/campaign.model.js b/server/api/campaign/campaign.model.js
index d825eae..388ddc0 100644
--- a/server/api/campaign/campaign.model.js
+++ b/server/api/campaign/campaign.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9957=['exports','define','Campaign','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./campaign.attributes'];(function(_0x40a825,_0x3bac79){var _0x273a54=function(_0x5628d8){while(--_0x5628d8){_0x40a825['push'](_0x40a825['shift']());}};_0x273a54(++_0x3bac79);}(_0x9957,0x93));var _0x7995=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x9957[_0xbca1b1];return _0x4e1686;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var logger=require(_0x7995('0x2'))(_0x7995('0x3'));var moment=require('moment');var BPromise=require(_0x7995('0x4'));var rp=require(_0x7995('0x5'));var fs=require('fs');var path=require(_0x7995('0x6'));var rimraf=require(_0x7995('0x7'));var config=require('../../config/environment');var attributes=require(_0x7995('0x8'));module[_0x7995('0x9')]=function(_0x137b6b,_0x219534){return _0x137b6b[_0x7995('0xa')](_0x7995('0xb'),attributes,{'tableName':'campaigns','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x9957=['exports','define','Campaign','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./campaign.attributes'];(function(_0x1b6186,_0x1ec7f2){var _0x186121=function(_0x1748a8){while(--_0x1748a8){_0x1b6186['push'](_0x1b6186['shift']());}};_0x186121(++_0x1ec7f2);}(_0x9957,0x93));var _0x7995=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x9957[_0x6c993a];return _0x27f547;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var logger=require(_0x7995('0x2'))(_0x7995('0x3'));var moment=require('moment');var BPromise=require(_0x7995('0x4'));var rp=require(_0x7995('0x5'));var fs=require('fs');var path=require(_0x7995('0x6'));var rimraf=require(_0x7995('0x7'));var config=require('../../config/environment');var attributes=require(_0x7995('0x8'));module[_0x7995('0x9')]=function(_0x137b6b,_0x219534){return _0x137b6b[_0x7995('0xa')](_0x7995('0xb'),attributes,{'tableName':'campaigns','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/campaign/campaign.rpc.js b/server/api/campaign/campaign.rpc.js
index 91a80cf..9fd417a 100644
--- a/server/api/campaign/campaign.rpc.js
+++ b/server/api/campaign/campaign.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x92e8=['where','attributes','limit','include','map','model','catch','lodash','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','info','Campaign,\x20%s,\x20%s','request\x20sent','debug','Campaign,\x20%s,\x20%s,\x20%s','stringify','error','message','GetCampaign','findAll','options','raw'];(function(_0x14e899,_0x3da87f){var _0x1fc140=function(_0x446dbe){while(--_0x446dbe){_0x14e899['push'](_0x14e899['shift']());}};_0x1fc140(++_0x3da87f);}(_0x92e8,0x7f));var _0x892e=function(_0x1c1b8c,_0x4c253d){_0x1c1b8c=_0x1c1b8c-0x0;var _0x1ee4c4=_0x92e8[_0x1c1b8c];return _0x1ee4c4;};'use strict';var _=require(_0x892e('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x892e('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x892e('0x2'));var db=require(_0x892e('0x3'))['db'];var utils=require(_0x892e('0x4'));var logger=require(_0x892e('0x5'))(_0x892e('0x6'));var config=require(_0x892e('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x892e('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x41a2c8,_0x5f2fd8,_0x35856f){return new BPromise(function(_0x5bfa77,_0x2724e3){return client[_0x892e('0x9')](_0x41a2c8,_0x35856f)[_0x892e('0xa')](function(_0x5b37af){logger[_0x892e('0xb')](_0x892e('0xc'),_0x5f2fd8,_0x892e('0xd'));logger[_0x892e('0xe')](_0x892e('0xf'),_0x5f2fd8,'request\x20sent',JSON[_0x892e('0x10')](_0x5b37af));if(_0x5b37af[_0x892e('0x11')]){if(_0x5b37af[_0x892e('0x11')]['code']===0x1f4){logger[_0x892e('0x11')]('Campaign,\x20%s,\x20%s',_0x5f2fd8,_0x5b37af[_0x892e('0x11')][_0x892e('0x12')]);return _0x2724e3(_0x5b37af[_0x892e('0x11')][_0x892e('0x12')]);}logger[_0x892e('0x11')](_0x892e('0xc'),_0x5f2fd8,_0x5b37af[_0x892e('0x11')][_0x892e('0x12')]);return _0x5bfa77(_0x5b37af[_0x892e('0x11')][_0x892e('0x12')]);}else{logger[_0x892e('0xb')]('Campaign,\x20%s,\x20%s',_0x5f2fd8,_0x892e('0xd'));_0x5bfa77(_0x5b37af['result'][_0x892e('0x12')]);}})['catch'](function(_0x54da87){logger[_0x892e('0x11')](_0x892e('0xc'),_0x5f2fd8,_0x54da87);_0x2724e3(_0x54da87);});});}exports[_0x892e('0x13')]=function(_0x4366a2){var _0x263ae9=this;return new Promise(function(_0x628dc2,_0xdb6924){return db['Campaign'][_0x892e('0x14')]({'raw':_0x4366a2[_0x892e('0x15')]?_0x4366a2[_0x892e('0x15')][_0x892e('0x16')]===undefined?!![]:![]:!![],'where':_0x4366a2[_0x892e('0x15')]?_0x4366a2[_0x892e('0x15')][_0x892e('0x17')]||null:null,'attributes':_0x4366a2[_0x892e('0x15')]?_0x4366a2[_0x892e('0x15')][_0x892e('0x18')]||null:null,'limit':_0x4366a2[_0x892e('0x15')]?_0x4366a2[_0x892e('0x15')][_0x892e('0x19')]||null:null,'include':_0x4366a2['options']?_0x4366a2['options'][_0x892e('0x1a')]?_[_0x892e('0x1b')](_0x4366a2[_0x892e('0x15')]['include'],function(_0x2a9a0b){return{'model':db[_0x2a9a0b[_0x892e('0x1c')]],'as':_0x2a9a0b['as'],'attributes':_0x2a9a0b[_0x892e('0x18')],'include':_0x2a9a0b['include']?_[_0x892e('0x1b')](_0x2a9a0b['include'],function(_0x5d8f7c){return{'model':db[_0x5d8f7c['model']],'as':_0x5d8f7c['as'],'attributes':_0x5d8f7c[_0x892e('0x18')],'include':_0x5d8f7c[_0x892e('0x1a')]?_[_0x892e('0x1b')](_0x5d8f7c[_0x892e('0x1a')],function(_0x32505d){return{'model':db[_0x32505d['model']],'as':_0x32505d['as'],'attributes':_0x32505d['attributes']};}):[]};}):[]};}):[]:[]})[_0x892e('0xa')](function(_0x1dfc69){logger[_0x892e('0xb')]('GetCampaign',_0x4366a2);logger['debug'](_0x892e('0x13'),_0x4366a2,JSON['stringify'](_0x1dfc69));_0x628dc2(_0x1dfc69);})[_0x892e('0x1d')](function(_0x253c76){logger['error']('GetCampaign',_0x253c76[_0x892e('0x12')],_0x4366a2);_0xdb6924(_0x263ae9[_0x892e('0x11')](0x1f4,_0x253c76['message']));});});};
\ No newline at end of file
+var _0x2060=['Campaign,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','catch','GetCampaign','Campaign','findAll','options','raw','where','attributes','map','include','model','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','client','http','request','then','info','Campaign,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0x2060,0x1be));var _0x0206=function(_0x57f295,_0x4ca3c4){_0x57f295=_0x57f295-0x0;var _0x51fd23=_0x2060[_0x57f295];return _0x51fd23;};'use strict';var _=require(_0x0206('0x0'));var util=require('util');var moment=require(_0x0206('0x1'));var BPromise=require(_0x0206('0x2'));var rs=require(_0x0206('0x3'));var fs=require('fs');var Redis=require(_0x0206('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x0206('0x5'));var logger=require(_0x0206('0x6'))('rpc');var config=require(_0x0206('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x0206('0x8')][_0x0206('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x529d59,_0x2eda0e,_0x5c8dbb){return new BPromise(function(_0x4ffb51,_0x46dd94){return client[_0x0206('0xa')](_0x529d59,_0x5c8dbb)[_0x0206('0xb')](function(_0x194718){logger[_0x0206('0xc')](_0x0206('0xd'),_0x2eda0e,_0x0206('0xe'));logger[_0x0206('0xf')](_0x0206('0x10'),_0x2eda0e,_0x0206('0xe'),JSON[_0x0206('0x11')](_0x194718));if(_0x194718['error']){if(_0x194718['error'][_0x0206('0x12')]===0x1f4){logger[_0x0206('0x13')]('Campaign,\x20%s,\x20%s',_0x2eda0e,_0x194718[_0x0206('0x13')][_0x0206('0x14')]);return _0x46dd94(_0x194718[_0x0206('0x13')]['message']);}logger[_0x0206('0x13')](_0x0206('0xd'),_0x2eda0e,_0x194718[_0x0206('0x13')][_0x0206('0x14')]);return _0x4ffb51(_0x194718['error'][_0x0206('0x14')]);}else{logger['info'](_0x0206('0xd'),_0x2eda0e,_0x0206('0xe'));_0x4ffb51(_0x194718[_0x0206('0x15')][_0x0206('0x14')]);}})[_0x0206('0x16')](function(_0x26c261){logger['error']('Campaign,\x20%s,\x20%s',_0x2eda0e,_0x26c261);_0x46dd94(_0x26c261);});});}exports[_0x0206('0x17')]=function(_0x5641df){var _0x58291b=this;return new Promise(function(_0x2db2da,_0x3ecd80){return db[_0x0206('0x18')][_0x0206('0x19')]({'raw':_0x5641df['options']?_0x5641df[_0x0206('0x1a')][_0x0206('0x1b')]===undefined?!![]:![]:!![],'where':_0x5641df[_0x0206('0x1a')]?_0x5641df[_0x0206('0x1a')][_0x0206('0x1c')]||null:null,'attributes':_0x5641df[_0x0206('0x1a')]?_0x5641df[_0x0206('0x1a')][_0x0206('0x1d')]||null:null,'limit':_0x5641df['options']?_0x5641df[_0x0206('0x1a')]['limit']||null:null,'include':_0x5641df['options']?_0x5641df[_0x0206('0x1a')]['include']?_[_0x0206('0x1e')](_0x5641df[_0x0206('0x1a')][_0x0206('0x1f')],function(_0x4c5452){return{'model':db[_0x4c5452[_0x0206('0x20')]],'as':_0x4c5452['as'],'attributes':_0x4c5452[_0x0206('0x1d')],'include':_0x4c5452[_0x0206('0x1f')]?_['map'](_0x4c5452['include'],function(_0x3b9890){return{'model':db[_0x3b9890[_0x0206('0x20')]],'as':_0x3b9890['as'],'attributes':_0x3b9890['attributes'],'include':_0x3b9890[_0x0206('0x1f')]?_[_0x0206('0x1e')](_0x3b9890[_0x0206('0x1f')],function(_0x38ebfe){return{'model':db[_0x38ebfe[_0x0206('0x20')]],'as':_0x38ebfe['as'],'attributes':_0x38ebfe['attributes']};}):[]};}):[]};}):[]:[]})[_0x0206('0xb')](function(_0x18513c){logger[_0x0206('0xc')]('GetCampaign',_0x5641df);logger[_0x0206('0xf')](_0x0206('0x17'),_0x5641df,JSON[_0x0206('0x11')](_0x18513c));_0x2db2da(_0x18513c);})['catch'](function(_0xe6320c){logger[_0x0206('0x13')]('GetCampaign',_0xe6320c[_0x0206('0x14')],_0x5641df);_0x3ecd80(_0x58291b[_0x0206('0x13')](0x1f4,_0xe6320c[_0x0206('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/campaign/index.js b/server/api/campaign/index.js
index e8e2b46..b100da0 100644
--- a/server/api/campaign/index.js
+++ b/server/api/campaign/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9fb1=['connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','/:id','show','/:id/hoppers','getHoppers','/:id/hopper_histories','/:id/hopper_black','/:id/lists','getLists','getBlackLists','post','/:id/clone','clone','addLists','/:id/blacklists','addBlackLists','put','update','delete','destroy','removeLists','exports','multer','util','path'];(function(_0x26166b,_0x1d2fb6){var _0x470ac3=function(_0x2a3e55){while(--_0x2a3e55){_0x26166b['push'](_0x26166b['shift']());}};_0x470ac3(++_0x1d2fb6);}(_0x9fb1,0x11d));var _0x19fb=function(_0x2b4411,_0x2625ed){_0x2b4411=_0x2b4411-0x0;var _0x8e41ef=_0x9fb1[_0x2b4411];return _0x8e41ef;};'use strict';var multer=require(_0x19fb('0x0'));var util=require(_0x19fb('0x1'));var path=require(_0x19fb('0x2'));var timeout=require(_0x19fb('0x3'));var express=require(_0x19fb('0x4'));var router=express[_0x19fb('0x5')]();var fs_extra=require(_0x19fb('0x6'));var auth=require(_0x19fb('0x7'));var interaction=require(_0x19fb('0x8'));var config=require('../../config/environment');var controller=require('./campaign.controller');router[_0x19fb('0x9')]('/',auth[_0x19fb('0xa')](),controller['index']);router[_0x19fb('0x9')](_0x19fb('0xb'),auth[_0x19fb('0xa')](),controller[_0x19fb('0xc')]);router[_0x19fb('0x9')](_0x19fb('0xd'),auth['isAuthenticated'](),controller[_0x19fb('0xe')]);router[_0x19fb('0x9')](_0x19fb('0xf'),auth[_0x19fb('0xa')](),controller['getHopperHistories']);router[_0x19fb('0x9')]('/:id/hopper_finals',auth[_0x19fb('0xa')](),controller['getHopperFinals']);router[_0x19fb('0x9')](_0x19fb('0x10'),auth[_0x19fb('0xa')](),controller['getHopperBlacks']);router['get'](_0x19fb('0x11'),auth[_0x19fb('0xa')](),controller[_0x19fb('0x12')]);router[_0x19fb('0x9')]('/:id/blacklists',auth[_0x19fb('0xa')](),controller[_0x19fb('0x13')]);router[_0x19fb('0x14')]('/',auth['isAuthenticated'](),controller['create']);router[_0x19fb('0x14')](_0x19fb('0x15'),auth[_0x19fb('0xa')](),controller[_0x19fb('0x16')]);router['post'](_0x19fb('0x11'),auth[_0x19fb('0xa')](),controller[_0x19fb('0x17')]);router['post'](_0x19fb('0x18'),auth[_0x19fb('0xa')](),controller[_0x19fb('0x19')]);router[_0x19fb('0x1a')](_0x19fb('0xb'),auth[_0x19fb('0xa')](),controller[_0x19fb('0x1b')]);router[_0x19fb('0x1c')](_0x19fb('0xb'),auth[_0x19fb('0xa')](),controller[_0x19fb('0x1d')]);router['delete'](_0x19fb('0x11'),auth[_0x19fb('0xa')](),controller[_0x19fb('0x1e')]);router[_0x19fb('0x1c')](_0x19fb('0x18'),auth['isAuthenticated'](),controller['removeBlackLists']);module[_0x19fb('0x1f')]=router;
\ No newline at end of file
+var _0x18a5=['destroy','removeLists','removeBlackLists','exports','multer','util','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./campaign.controller','get','/:id','isAuthenticated','show','/:id/hoppers','getHoppers','/:id/hopper_histories','getHopperHistories','/:id/hopper_finals','/:id/lists','getLists','/:id/blacklists','post','create','/:id/clone','addLists','addBlackLists','put','update','delete'];(function(_0x24cf7f,_0xcda231){var _0x4c6742=function(_0x2469db){while(--_0x2469db){_0x24cf7f['push'](_0x24cf7f['shift']());}};_0x4c6742(++_0xcda231);}(_0x18a5,0x164));var _0x518a=function(_0x395bd2,_0x4e0a20){_0x395bd2=_0x395bd2-0x0;var _0x518dc4=_0x18a5[_0x395bd2];return _0x518dc4;};'use strict';var multer=require(_0x518a('0x0'));var util=require(_0x518a('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x518a('0x2'));var router=express['Router']();var fs_extra=require(_0x518a('0x3'));var auth=require(_0x518a('0x4'));var interaction=require(_0x518a('0x5'));var config=require(_0x518a('0x6'));var controller=require(_0x518a('0x7'));router['get']('/',auth['isAuthenticated'](),controller['index']);router[_0x518a('0x8')](_0x518a('0x9'),auth[_0x518a('0xa')](),controller[_0x518a('0xb')]);router[_0x518a('0x8')](_0x518a('0xc'),auth[_0x518a('0xa')](),controller[_0x518a('0xd')]);router[_0x518a('0x8')](_0x518a('0xe'),auth[_0x518a('0xa')](),controller[_0x518a('0xf')]);router[_0x518a('0x8')](_0x518a('0x10'),auth[_0x518a('0xa')](),controller['getHopperFinals']);router[_0x518a('0x8')]('/:id/hopper_black',auth[_0x518a('0xa')](),controller['getHopperBlacks']);router[_0x518a('0x8')](_0x518a('0x11'),auth[_0x518a('0xa')](),controller[_0x518a('0x12')]);router[_0x518a('0x8')](_0x518a('0x13'),auth[_0x518a('0xa')](),controller['getBlackLists']);router[_0x518a('0x14')]('/',auth[_0x518a('0xa')](),controller[_0x518a('0x15')]);router['post'](_0x518a('0x16'),auth[_0x518a('0xa')](),controller['clone']);router['post'](_0x518a('0x11'),auth['isAuthenticated'](),controller[_0x518a('0x17')]);router[_0x518a('0x14')](_0x518a('0x13'),auth[_0x518a('0xa')](),controller[_0x518a('0x18')]);router[_0x518a('0x19')](_0x518a('0x9'),auth[_0x518a('0xa')](),controller[_0x518a('0x1a')]);router[_0x518a('0x1b')](_0x518a('0x9'),auth[_0x518a('0xa')](),controller[_0x518a('0x1c')]);router['delete'](_0x518a('0x11'),auth['isAuthenticated'](),controller[_0x518a('0x1d')]);router['delete'](_0x518a('0x13'),auth[_0x518a('0xa')](),controller[_0x518a('0x1e')]);module[_0x518a('0x1f')]=router;
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.attributes.js b/server/api/cannedAnswer/cannedAnswer.attributes.js
index 88f0eab..e6d2b87 100644
--- a/server/api/cannedAnswer/cannedAnswer.attributes.js
+++ b/server/api/cannedAnswer/cannedAnswer.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe0c9=['getDataValue','exports','STRING','medium','VIRTUAL'];(function(_0x55e229,_0x41fa8b){var _0x309db0=function(_0x23bfcf){while(--_0x23bfcf){_0x55e229['push'](_0x55e229['shift']());}};_0x309db0(++_0x41fa8b);}(_0xe0c9,0x1d7));var _0x9e0c=function(_0x3d6452,_0x505d30){_0x3d6452=_0x3d6452-0x0;var _0x8d324c=_0xe0c9[_0x3d6452];return _0x8d324c;};'use strict';var Sequelize=require('sequelize');module[_0x9e0c('0x0')]={'key':{'type':Sequelize[_0x9e0c('0x1')],'allowNull':![]},'value':{'type':Sequelize['TEXT'],'length':_0x9e0c('0x2'),'allowNull':![]},'description':{'type':Sequelize[_0x9e0c('0x1')]},'name':{'type':Sequelize[_0x9e0c('0x3')],'get':function(){return this[_0x9e0c('0x4')]('key');}}};
\ No newline at end of file
+var _0xd9cf=['medium','VIRTUAL','sequelize','STRING','TEXT'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0xd9cf,0x19c));var _0xfd9c=function(_0x3856d1,_0x39feb0){_0x3856d1=_0x3856d1-0x0;var _0x2b6824=_0xd9cf[_0x3856d1];return _0x2b6824;};'use strict';var Sequelize=require(_0xfd9c('0x0'));module['exports']={'key':{'type':Sequelize[_0xfd9c('0x1')],'allowNull':![]},'value':{'type':Sequelize[_0xfd9c('0x2')],'length':_0xfd9c('0x3'),'allowNull':![]},'description':{'type':Sequelize[_0xfd9c('0x1')]},'name':{'type':Sequelize[_0xfd9c('0x4')],'get':function(){return this['getDataValue']('key');}}};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.controller.js b/server/api/cannedAnswer/cannedAnswer.controller.js
index c154378..f047d6c 100644
--- a/server/api/cannedAnswer/cannedAnswer.controller.js
+++ b/server/api/cannedAnswer/cannedAnswer.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x73dd=['rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','hasOwnProperty','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','rows','catch','params','keys','length','find','body','create','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','Sequelize','ValidationError','The\x20inserted\x20key\x20already\x20exists.','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','squel','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','count','limit','Content-Range','reject','update','destroy','get','CannedAnswers','UserProfileResource','then','end','stack','name','index','map','CannedAnswer'];(function(_0x532112,_0x37d94b){var _0x23e5fb=function(_0x690ac8){while(--_0x690ac8){_0x532112['push'](_0x532112['shift']());}};_0x23e5fb(++_0x37d94b);}(_0x73dd,0x1d7));var _0xd73d=function(_0x2309a0,_0xe0e409){_0x2309a0=_0x2309a0-0x0;var _0x274abc=_0x73dd[_0x2309a0];return _0x274abc;};'use strict';var emlformat=require(_0xd73d('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xd73d('0x1'));var jsonpatch=require(_0xd73d('0x2'));var rp=require(_0xd73d('0x3'));var moment=require(_0xd73d('0x4'));var BPromise=require(_0xd73d('0x5'));var Mustache=require(_0xd73d('0x6'));var util=require(_0xd73d('0x7'));var path=require(_0xd73d('0x8'));var sox=require(_0xd73d('0x9'));var csv=require('to-csv');var ejs=require(_0xd73d('0xa'));var fs=require('fs');var fs_extra=require(_0xd73d('0xb'));var _=require('lodash');var squel=require(_0xd73d('0xc'));var crypto=require('crypto');var jsforce=require(_0xd73d('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xd73d('0xe'));var Papa=require(_0xd73d('0xf'));var Redis=require(_0xd73d('0x10'));var authService=require(_0xd73d('0x11'));var qs=require(_0xd73d('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xd73d('0x13'));var logger=require('../../config/logger')('api');var utils=require(_0xd73d('0x14'));var config=require(_0xd73d('0x15'));var licenseUtil=require(_0xd73d('0x16'));var db=require(_0xd73d('0x17'))['db'];function respondWithStatusCode(_0x16c5b8,_0x530e43){_0x530e43=_0x530e43||0xcc;return function(_0x3ebf38){if(_0x3ebf38){return _0x16c5b8[_0xd73d('0x18')](_0x530e43);}return _0x16c5b8[_0xd73d('0x19')](_0x530e43)['end']();};}function respondWithResult(_0x20d64c,_0x20641c){_0x20641c=_0x20641c||0xc8;return function(_0x26c6fb){if(_0x26c6fb){return _0x20d64c['status'](_0x20641c)[_0xd73d('0x1a')](_0x26c6fb);}};}function respondWithFilteredResult(_0x417fd4,_0xb27fab){return function(_0x23f6cf){if(_0x23f6cf){var _0x37ac3a=typeof _0xb27fab[_0xd73d('0x1b')]===_0xd73d('0x1c')&&typeof _0xb27fab['limit']===_0xd73d('0x1c');var _0x160d93=_0x23f6cf[_0xd73d('0x1d')];var _0x1cad83=_0x37ac3a?0x0:_0xb27fab[_0xd73d('0x1b')];var _0x2c81a0=_0x37ac3a?_0x23f6cf[_0xd73d('0x1d')]:_0xb27fab[_0xd73d('0x1b')]+_0xb27fab[_0xd73d('0x1e')];var _0x136574;if(_0x2c81a0>=_0x160d93){_0x2c81a0=_0x160d93;_0x136574=0xc8;}else{_0x136574=0xce;}_0x417fd4['status'](_0x136574);return _0x417fd4['set'](_0xd73d('0x1f'),_0x1cad83+'-'+_0x2c81a0+'/'+_0x160d93)[_0xd73d('0x1a')](_0x23f6cf);}return null;};}function patchUpdates(_0x2f3de4){return function(_0x3e87ad){try{jsonpatch['apply'](_0x3e87ad,_0x2f3de4,!![]);}catch(_0x579146){return BPromise[_0xd73d('0x20')](_0x579146);}return _0x3e87ad['save']();};}function saveUpdates(_0x356357,_0x3c11ec){return function(_0x155b87){if(_0x155b87){return _0x155b87[_0xd73d('0x21')](_0x356357)['then'](function(_0x520331){return _0x520331;});}return null;};}function removeEntity(_0x21b578,_0x115608){return function(_0x42482f){if(_0x42482f){return _0x42482f[_0xd73d('0x22')]()['then'](function(){var _0x3d43f5=_0x42482f[_0xd73d('0x23')]({'plain':!![]});var _0x2f84e4=_0xd73d('0x24');return db[_0xd73d('0x25')]['destroy']({'where':{'type':_0x2f84e4,'resourceId':_0x3d43f5['id']}})[_0xd73d('0x26')](function(){return _0x42482f;});})[_0xd73d('0x26')](function(){_0x21b578[_0xd73d('0x19')](0xcc)[_0xd73d('0x27')]();});}};}function handleEntityNotFound(_0x5093d1,_0x1466b6){return function(_0x498d92){if(!_0x498d92){_0x5093d1[_0xd73d('0x18')](0x194);}return _0x498d92;};}function handleError(_0x5688c5,_0x2475cb){_0x2475cb=_0x2475cb||0x1f4;return function(_0x27f5e6){logger['error'](_0x27f5e6[_0xd73d('0x28')]);if(_0x27f5e6[_0xd73d('0x29')]){delete _0x27f5e6[_0xd73d('0x29')];}_0x5688c5['status'](_0x2475cb)['send'](_0x27f5e6);};}exports[_0xd73d('0x2a')]=function(_0x28a97f,_0x26609d){var _0x58aa73={},_0x51b8e4={},_0x439f12={'count':0x0,'rows':[]};var _0xe48b4c=_[_0xd73d('0x2b')](db[_0xd73d('0x2c')][_0xd73d('0x2d')],function(_0x5d3983){return{'name':_0x5d3983[_0xd73d('0x2e')],'type':_0x5d3983[_0xd73d('0x2f')][_0xd73d('0x30')]};});_0x51b8e4[_0xd73d('0x31')]=_[_0xd73d('0x2b')](_0xe48b4c,_0xd73d('0x29'));_0x51b8e4['query']=_['keys'](_0x28a97f[_0xd73d('0x32')]);_0x51b8e4[_0xd73d('0x33')]=_[_0xd73d('0x34')](_0x51b8e4[_0xd73d('0x31')],_0x51b8e4[_0xd73d('0x32')]);_0x58aa73[_0xd73d('0x35')]=_[_0xd73d('0x34')](_0x51b8e4[_0xd73d('0x31')],qs['fields'](_0x28a97f[_0xd73d('0x32')]['fields']));_0x58aa73['attributes']=_0x58aa73[_0xd73d('0x35')]['length']?_0x58aa73['attributes']:_0x51b8e4['model'];if(!_0x28a97f[_0xd73d('0x32')][_0xd73d('0x36')]('nolimit')){_0x58aa73[_0xd73d('0x1e')]=qs[_0xd73d('0x1e')](_0x28a97f[_0xd73d('0x32')][_0xd73d('0x1e')]);_0x58aa73[_0xd73d('0x1b')]=qs['offset'](_0x28a97f[_0xd73d('0x32')][_0xd73d('0x1b')]);}_0x58aa73[_0xd73d('0x37')]=qs[_0xd73d('0x38')](_0x28a97f['query']['sort']);_0x58aa73[_0xd73d('0x39')]=qs[_0xd73d('0x33')](_[_0xd73d('0x3a')](_0x28a97f[_0xd73d('0x32')],_0x51b8e4[_0xd73d('0x33')]),_0xe48b4c);if(_0x28a97f['query'][_0xd73d('0x3b')]){_0x58aa73[_0xd73d('0x39')]=_['merge'](_0x58aa73[_0xd73d('0x39')],{'$or':[{'key':{'$like':'%'+_0x28a97f['query']['filter']+'%'}},{'value':{'$like':'%'+_0x28a97f['query']['filter']+'%'}}]});}_0x58aa73=_[_0xd73d('0x3c')]({},_0x58aa73,_0x28a97f[_0xd73d('0x3d')]);var _0x731a8f={'where':_0x58aa73[_0xd73d('0x39')]};return db[_0xd73d('0x2c')]['count'](_0x731a8f)['then'](function(_0x4c5772){_0x439f12[_0xd73d('0x1d')]=_0x4c5772;if(_0x28a97f[_0xd73d('0x32')][_0xd73d('0x3e')]){_0x58aa73[_0xd73d('0x3f')]=[{'all':!![]}];}return db[_0xd73d('0x2c')][_0xd73d('0x40')](_0x58aa73);})[_0xd73d('0x26')](function(_0x195d97){_0x439f12[_0xd73d('0x41')]=_0x195d97;return _0x439f12;})['then'](respondWithFilteredResult(_0x26609d,_0x58aa73))[_0xd73d('0x42')](handleError(_0x26609d,null));};exports['show']=function(_0x1c5733,_0x13cdc6){var _0x447885={'raw':!![],'where':{'id':_0x1c5733[_0xd73d('0x43')]['id']}},_0x23a2a9={};_0x23a2a9[_0xd73d('0x31')]=_['keys'](db[_0xd73d('0x2c')]['rawAttributes']);_0x23a2a9[_0xd73d('0x32')]=_[_0xd73d('0x44')](_0x1c5733['query']);_0x23a2a9[_0xd73d('0x33')]=_[_0xd73d('0x34')](_0x23a2a9[_0xd73d('0x31')],_0x23a2a9[_0xd73d('0x32')]);_0x447885[_0xd73d('0x35')]=_[_0xd73d('0x34')](_0x23a2a9[_0xd73d('0x31')],qs['fields'](_0x1c5733['query']['fields']));_0x447885[_0xd73d('0x35')]=_0x447885['attributes'][_0xd73d('0x45')]?_0x447885[_0xd73d('0x35')]:_0x23a2a9[_0xd73d('0x31')];if(_0x1c5733[_0xd73d('0x32')][_0xd73d('0x3e')]){_0x447885[_0xd73d('0x3f')]=[{'all':!![]}];}_0x447885=_[_0xd73d('0x3c')]({},_0x447885,_0x1c5733[_0xd73d('0x3d')]);return db[_0xd73d('0x2c')][_0xd73d('0x46')](_0x447885)[_0xd73d('0x26')](handleEntityNotFound(_0x13cdc6,null))['then'](respondWithResult(_0x13cdc6,null))['catch'](handleError(_0x13cdc6,null));};exports['update']=function(_0x189a63,_0x1cb0bd){if(_0x189a63[_0xd73d('0x47')]['id']){delete _0x189a63['body']['id'];}return db[_0xd73d('0x2c')][_0xd73d('0x46')]({'where':{'id':_0x189a63[_0xd73d('0x43')]['id']}})[_0xd73d('0x26')](handleEntityNotFound(_0x1cb0bd,null))[_0xd73d('0x26')](saveUpdates(_0x189a63['body'],null))[_0xd73d('0x26')](respondWithResult(_0x1cb0bd,null))[_0xd73d('0x42')](handleError(_0x1cb0bd,null));};exports[_0xd73d('0x22')]=function(_0x5ef318,_0x19b7bd){return db[_0xd73d('0x2c')]['find']({'where':{'id':_0x5ef318[_0xd73d('0x43')]['id']}})[_0xd73d('0x26')](handleEntityNotFound(_0x19b7bd,null))[_0xd73d('0x26')](removeEntity(_0x19b7bd,null))['catch'](handleError(_0x19b7bd,null));};exports[_0xd73d('0x48')]=function(_0x38478e,_0x1eb8e2){var _0x232396={'key':_0x38478e[_0xd73d('0x47')]['key']};if(_0x38478e[_0xd73d('0x47')]['MailAccountId']){_0x232396[_0xd73d('0x49')]=_0x38478e[_0xd73d('0x47')][_0xd73d('0x49')];}else if(_0x38478e[_0xd73d('0x47')][_0xd73d('0x4a')]){_0x232396[_0xd73d('0x4a')]=_0x38478e[_0xd73d('0x47')][_0xd73d('0x4a')];}else if(_0x38478e[_0xd73d('0x47')][_0xd73d('0x4b')]){_0x232396[_0xd73d('0x4b')]=_0x38478e['body'][_0xd73d('0x4b')];}else if(_0x38478e[_0xd73d('0x47')][_0xd73d('0x4c')]){_0x232396['ChatWebsiteId']=_0x38478e[_0xd73d('0x47')][_0xd73d('0x4c')];}return db[_0xd73d('0x2c')][_0xd73d('0x46')]({'where':_0x232396})[_0xd73d('0x26')](function(_0x3e457a){if(_0x3e457a){throw new db[(_0xd73d('0x4d'))][(_0xd73d('0x4e'))](_0xd73d('0x4f'));}return db[_0xd73d('0x2c')][_0xd73d('0x48')](_0x38478e[_0xd73d('0x47')]);})[_0xd73d('0x26')](function(_0x37178b){var _0x3e8493=_0x38478e[_0xd73d('0x50')]['get']({'plain':!![]});if(!_0x3e8493)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x3e8493[_0xd73d('0x51')]===_0xd73d('0x50')){var _0x32d9c8=_0x37178b[_0xd73d('0x23')]({'plain':!![]});return db[_0xd73d('0x52')][_0xd73d('0x46')]({'where':{'name':'CannedAnswers','userProfileId':_0x3e8493[_0xd73d('0x53')]},'raw':!![]})[_0xd73d('0x26')](function(_0x5c1bb2){if(_0x5c1bb2&&_0x5c1bb2[_0xd73d('0x54')]===0x0){return db[_0xd73d('0x25')]['create']({'name':_0x32d9c8[_0xd73d('0x29')],'resourceId':_0x32d9c8['id'],'type':_0x5c1bb2[_0xd73d('0x29')],'sectionId':_0x5c1bb2['id']},{})[_0xd73d('0x26')](function(){return _0x37178b;});}else{return _0x37178b;}})[_0xd73d('0x42')](function(_0x1c383b){logger['error'](_0xd73d('0x55'),_0x1c383b);throw _0x1c383b;});}return _0x37178b;})[_0xd73d('0x26')](respondWithResult(_0x1eb8e2,0xc9))[_0xd73d('0x42')](handleError(_0x1eb8e2,null));};
\ No newline at end of file
+var _0xe61b=['UserProfileSection','CannedAnswers','userProfileId','UserProfileResource','error','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','squel','crypto','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','count','set','Content-Range','apply','save','update','destroy','get','then','stack','name','send','index','CannedAnswer','rawAttributes','fieldName','type','key','model','keys','filters','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','show','params','find','catch','body','create','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','The\x20inserted\x20key\x20already\x20exists.','user','Unable\x20to\x20retrieve\x20the\x20current\x20user'];(function(_0x15c421,_0x6366f7){var _0x5e5ed5=function(_0x206e66){while(--_0x206e66){_0x15c421['push'](_0x15c421['shift']());}};_0x5e5ed5(++_0x6366f7);}(_0xe61b,0xad));var _0xbe61=function(_0x34b1b8,_0x54c9bf){_0x34b1b8=_0x34b1b8-0x0;var _0x542dd8=_0xe61b[_0x34b1b8];return _0x542dd8;};'use strict';var emlformat=require(_0xbe61('0x0'));var rimraf=require(_0xbe61('0x1'));var zipdir=require(_0xbe61('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xbe61('0x3'));var moment=require(_0xbe61('0x4'));var BPromise=require(_0xbe61('0x5'));var Mustache=require(_0xbe61('0x6'));var util=require(_0xbe61('0x7'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xbe61('0x8'));var crypto=require(_0xbe61('0x9'));var jsforce=require('jsforce');var deskjs=require(_0xbe61('0xa'));var toCsv=require(_0xbe61('0xb'));var querystring=require(_0xbe61('0xc'));var Papa=require(_0xbe61('0xd'));var Redis=require(_0xbe61('0xe'));var authService=require('../../components/auth/service');var qs=require(_0xbe61('0xf'));var as=require(_0xbe61('0x10'));var hardwareService=require(_0xbe61('0x11'));var logger=require('../../config/logger')(_0xbe61('0x12'));var utils=require('../../config/utils');var config=require(_0xbe61('0x13'));var licenseUtil=require(_0xbe61('0x14'));var db=require(_0xbe61('0x15'))['db'];function respondWithStatusCode(_0xc67b2f,_0x29fe4f){_0x29fe4f=_0x29fe4f||0xcc;return function(_0x11256f){if(_0x11256f){return _0xc67b2f[_0xbe61('0x16')](_0x29fe4f);}return _0xc67b2f[_0xbe61('0x17')](_0x29fe4f)['end']();};}function respondWithResult(_0x2a282b,_0x4bcba7){_0x4bcba7=_0x4bcba7||0xc8;return function(_0x4e8afe){if(_0x4e8afe){return _0x2a282b[_0xbe61('0x17')](_0x4bcba7)[_0xbe61('0x18')](_0x4e8afe);}};}function respondWithFilteredResult(_0x15b87d,_0x59cecf){return function(_0x151081){if(_0x151081){var _0xb95d7b=typeof _0x59cecf[_0xbe61('0x19')]===_0xbe61('0x1a')&&typeof _0x59cecf['limit']===_0xbe61('0x1a');var _0x256529=_0x151081[_0xbe61('0x1b')];var _0x168c2b=_0xb95d7b?0x0:_0x59cecf[_0xbe61('0x19')];var _0x556a3f=_0xb95d7b?_0x151081[_0xbe61('0x1b')]:_0x59cecf['offset']+_0x59cecf['limit'];var _0x3a96c5;if(_0x556a3f>=_0x256529){_0x556a3f=_0x256529;_0x3a96c5=0xc8;}else{_0x3a96c5=0xce;}_0x15b87d['status'](_0x3a96c5);return _0x15b87d[_0xbe61('0x1c')](_0xbe61('0x1d'),_0x168c2b+'-'+_0x556a3f+'/'+_0x256529)[_0xbe61('0x18')](_0x151081);}return null;};}function patchUpdates(_0x7cb326){return function(_0x20bbb1){try{jsonpatch[_0xbe61('0x1e')](_0x20bbb1,_0x7cb326,!![]);}catch(_0x5657e6){return BPromise['reject'](_0x5657e6);}return _0x20bbb1[_0xbe61('0x1f')]();};}function saveUpdates(_0x53107a,_0x261b7c){return function(_0x428de9){if(_0x428de9){return _0x428de9[_0xbe61('0x20')](_0x53107a)['then'](function(_0x205ac4){return _0x205ac4;});}return null;};}function removeEntity(_0xb3ce7d,_0x4904a6){return function(_0x2b779a){if(_0x2b779a){return _0x2b779a[_0xbe61('0x21')]()['then'](function(){var _0x52dc3f=_0x2b779a[_0xbe61('0x22')]({'plain':!![]});var _0x700643='CannedAnswers';return db['UserProfileResource'][_0xbe61('0x21')]({'where':{'type':_0x700643,'resourceId':_0x52dc3f['id']}})['then'](function(){return _0x2b779a;});})[_0xbe61('0x23')](function(){_0xb3ce7d[_0xbe61('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3a7eb8,_0x4b53aa){return function(_0x14358c){if(!_0x14358c){_0x3a7eb8['sendStatus'](0x194);}return _0x14358c;};}function handleError(_0x399467,_0x52de8f){_0x52de8f=_0x52de8f||0x1f4;return function(_0x589e09){logger['error'](_0x589e09[_0xbe61('0x24')]);if(_0x589e09[_0xbe61('0x25')]){delete _0x589e09[_0xbe61('0x25')];}_0x399467[_0xbe61('0x17')](_0x52de8f)[_0xbe61('0x26')](_0x589e09);};}exports[_0xbe61('0x27')]=function(_0x31823b,_0x3d6af2){var _0xf89eef={},_0x501b7c={},_0x326f56={'count':0x0,'rows':[]};var _0x55fde3=_['map'](db[_0xbe61('0x28')][_0xbe61('0x29')],function(_0x1fa080){return{'name':_0x1fa080[_0xbe61('0x2a')],'type':_0x1fa080[_0xbe61('0x2b')][_0xbe61('0x2c')]};});_0x501b7c[_0xbe61('0x2d')]=_['map'](_0x55fde3,_0xbe61('0x25'));_0x501b7c['query']=_[_0xbe61('0x2e')](_0x31823b['query']);_0x501b7c[_0xbe61('0x2f')]=_[_0xbe61('0x30')](_0x501b7c[_0xbe61('0x2d')],_0x501b7c[_0xbe61('0x31')]);_0xf89eef[_0xbe61('0x32')]=_[_0xbe61('0x30')](_0x501b7c[_0xbe61('0x2d')],qs['fields'](_0x31823b['query'][_0xbe61('0x33')]));_0xf89eef[_0xbe61('0x32')]=_0xf89eef[_0xbe61('0x32')][_0xbe61('0x34')]?_0xf89eef[_0xbe61('0x32')]:_0x501b7c['model'];if(!_0x31823b[_0xbe61('0x31')][_0xbe61('0x35')](_0xbe61('0x36'))){_0xf89eef[_0xbe61('0x37')]=qs[_0xbe61('0x37')](_0x31823b[_0xbe61('0x31')]['limit']);_0xf89eef[_0xbe61('0x19')]=qs['offset'](_0x31823b[_0xbe61('0x31')][_0xbe61('0x19')]);}_0xf89eef[_0xbe61('0x38')]=qs[_0xbe61('0x39')](_0x31823b['query']['sort']);_0xf89eef[_0xbe61('0x3a')]=qs['filters'](_[_0xbe61('0x3b')](_0x31823b[_0xbe61('0x31')],_0x501b7c[_0xbe61('0x2f')]),_0x55fde3);if(_0x31823b[_0xbe61('0x31')][_0xbe61('0x3c')]){_0xf89eef[_0xbe61('0x3a')]=_['merge'](_0xf89eef[_0xbe61('0x3a')],{'$or':[{'key':{'$like':'%'+_0x31823b[_0xbe61('0x31')][_0xbe61('0x3c')]+'%'}},{'value':{'$like':'%'+_0x31823b['query']['filter']+'%'}}]});}_0xf89eef=_[_0xbe61('0x3d')]({},_0xf89eef,_0x31823b[_0xbe61('0x3e')]);var _0x2b60={'where':_0xf89eef[_0xbe61('0x3a')]};return db[_0xbe61('0x28')]['count'](_0x2b60)['then'](function(_0xf900d2){_0x326f56['count']=_0xf900d2;if(_0x31823b['query'][_0xbe61('0x3f')]){_0xf89eef[_0xbe61('0x40')]=[{'all':!![]}];}return db[_0xbe61('0x28')][_0xbe61('0x41')](_0xf89eef);})[_0xbe61('0x23')](function(_0x51e968){_0x326f56['rows']=_0x51e968;return _0x326f56;})[_0xbe61('0x23')](respondWithFilteredResult(_0x3d6af2,_0xf89eef))['catch'](handleError(_0x3d6af2,null));};exports[_0xbe61('0x42')]=function(_0x1b96cf,_0x1d694b){var _0x5cee48={'raw':!![],'where':{'id':_0x1b96cf[_0xbe61('0x43')]['id']}},_0x1b2dbc={};_0x1b2dbc[_0xbe61('0x2d')]=_[_0xbe61('0x2e')](db[_0xbe61('0x28')][_0xbe61('0x29')]);_0x1b2dbc[_0xbe61('0x31')]=_[_0xbe61('0x2e')](_0x1b96cf[_0xbe61('0x31')]);_0x1b2dbc[_0xbe61('0x2f')]=_[_0xbe61('0x30')](_0x1b2dbc[_0xbe61('0x2d')],_0x1b2dbc['query']);_0x5cee48[_0xbe61('0x32')]=_[_0xbe61('0x30')](_0x1b2dbc['model'],qs['fields'](_0x1b96cf[_0xbe61('0x31')][_0xbe61('0x33')]));_0x5cee48['attributes']=_0x5cee48[_0xbe61('0x32')][_0xbe61('0x34')]?_0x5cee48[_0xbe61('0x32')]:_0x1b2dbc[_0xbe61('0x2d')];if(_0x1b96cf[_0xbe61('0x31')]['includeAll']){_0x5cee48['include']=[{'all':!![]}];}_0x5cee48=_[_0xbe61('0x3d')]({},_0x5cee48,_0x1b96cf[_0xbe61('0x3e')]);return db[_0xbe61('0x28')][_0xbe61('0x44')](_0x5cee48)[_0xbe61('0x23')](handleEntityNotFound(_0x1d694b,null))[_0xbe61('0x23')](respondWithResult(_0x1d694b,null))[_0xbe61('0x45')](handleError(_0x1d694b,null));};exports[_0xbe61('0x20')]=function(_0x4ca17c,_0x279fef){if(_0x4ca17c['body']['id']){delete _0x4ca17c['body']['id'];}return db[_0xbe61('0x28')][_0xbe61('0x44')]({'where':{'id':_0x4ca17c[_0xbe61('0x43')]['id']}})[_0xbe61('0x23')](handleEntityNotFound(_0x279fef,null))[_0xbe61('0x23')](saveUpdates(_0x4ca17c[_0xbe61('0x46')],null))[_0xbe61('0x23')](respondWithResult(_0x279fef,null))['catch'](handleError(_0x279fef,null));};exports[_0xbe61('0x21')]=function(_0x354fae,_0xc26b1c){return db[_0xbe61('0x28')][_0xbe61('0x44')]({'where':{'id':_0x354fae['params']['id']}})[_0xbe61('0x23')](handleEntityNotFound(_0xc26b1c,null))[_0xbe61('0x23')](removeEntity(_0xc26b1c,null))['catch'](handleError(_0xc26b1c,null));};exports[_0xbe61('0x47')]=function(_0x533530,_0xcbd6e3){var _0xf1ecba={'key':_0x533530[_0xbe61('0x46')][_0xbe61('0x2c')]};if(_0x533530[_0xbe61('0x46')][_0xbe61('0x48')]){_0xf1ecba[_0xbe61('0x48')]=_0x533530[_0xbe61('0x46')][_0xbe61('0x48')];}else if(_0x533530[_0xbe61('0x46')][_0xbe61('0x49')]){_0xf1ecba['SmsAccountId']=_0x533530[_0xbe61('0x46')][_0xbe61('0x49')];}else if(_0x533530[_0xbe61('0x46')][_0xbe61('0x4a')]){_0xf1ecba['OpenchannelAccountId']=_0x533530[_0xbe61('0x46')]['OpenchannelAccountId'];}else if(_0x533530[_0xbe61('0x46')][_0xbe61('0x4b')]){_0xf1ecba[_0xbe61('0x4b')]=_0x533530[_0xbe61('0x46')][_0xbe61('0x4b')];}return db[_0xbe61('0x28')][_0xbe61('0x44')]({'where':_0xf1ecba})[_0xbe61('0x23')](function(_0x6138ef){if(_0x6138ef){throw new db['Sequelize']['ValidationError'](_0xbe61('0x4c'));}return db[_0xbe61('0x28')][_0xbe61('0x47')](_0x533530[_0xbe61('0x46')]);})[_0xbe61('0x23')](function(_0x10261d){var _0x4bd691=_0x533530[_0xbe61('0x4d')][_0xbe61('0x22')]({'plain':!![]});if(!_0x4bd691)throw new Error(_0xbe61('0x4e'));if(_0x4bd691['role']==='user'){var _0x3d66f5=_0x10261d[_0xbe61('0x22')]({'plain':!![]});return db[_0xbe61('0x4f')]['find']({'where':{'name':_0xbe61('0x50'),'userProfileId':_0x4bd691[_0xbe61('0x51')]},'raw':!![]})[_0xbe61('0x23')](function(_0x386b00){if(_0x386b00&&_0x386b00['autoAssociation']===0x0){return db[_0xbe61('0x52')]['create']({'name':_0x3d66f5[_0xbe61('0x25')],'resourceId':_0x3d66f5['id'],'type':_0x386b00[_0xbe61('0x25')],'sectionId':_0x386b00['id']},{})[_0xbe61('0x23')](function(){return _0x10261d;});}else{return _0x10261d;}})[_0xbe61('0x45')](function(_0x509a21){logger[_0xbe61('0x53')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x509a21);throw _0x509a21;});}return _0x10261d;})['then'](respondWithResult(_0xcbd6e3,0xc9))[_0xbe61('0x45')](handleError(_0xcbd6e3,null));};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.model.js b/server/api/cannedAnswer/cannedAnswer.model.js
index 4154122..29f3380 100644
--- a/server/api/cannedAnswer/cannedAnswer.model.js
+++ b/server/api/cannedAnswer/cannedAnswer.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc0f3=['define','CannedAnswer','tools_canned_answers','utf8mb4','util','../../config/logger','api','bluebird','rimraf','../../config/environment','./cannedAnswer.attributes','exports'];(function(_0x725b8e,_0xc22b48){var _0x43ac45=function(_0x46bb4a){while(--_0x46bb4a){_0x725b8e['push'](_0x725b8e['shift']());}};_0x43ac45(++_0xc22b48);}(_0xc0f3,0x1d8));var _0x3c0f=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0xc0f3[_0x501510];return _0x1e6ee5;};'use strict';var _=require('lodash');var util=require(_0x3c0f('0x0'));var logger=require(_0x3c0f('0x1'))(_0x3c0f('0x2'));var moment=require('moment');var BPromise=require(_0x3c0f('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x3c0f('0x4'));var config=require(_0x3c0f('0x5'));var attributes=require(_0x3c0f('0x6'));module[_0x3c0f('0x7')]=function(_0x1512d2,_0x5871c0){return _0x1512d2[_0x3c0f('0x8')](_0x3c0f('0x9'),attributes,{'tableName':_0x3c0f('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x3c0f('0xb'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0xca0d=['../../config/environment','./cannedAnswer.attributes','exports','define','CannedAnswer','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','request-promise','rimraf'];(function(_0x501c4c,_0x30ce7f){var _0x318509=function(_0x2f5c93){while(--_0x2f5c93){_0x501c4c['push'](_0x501c4c['shift']());}};_0x318509(++_0x30ce7f);}(_0xca0d,0x17b));var _0xdca0=function(_0x3f267c,_0x150415){_0x3f267c=_0x3f267c-0x0;var _0x124815=_0xca0d[_0x3f267c];return _0x124815;};'use strict';var _=require(_0xdca0('0x0'));var util=require(_0xdca0('0x1'));var logger=require(_0xdca0('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xdca0('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xdca0('0x4'));var config=require(_0xdca0('0x5'));var attributes=require(_0xdca0('0x6'));module[_0xdca0('0x7')]=function(_0x2af9b7,_0x1897b8){return _0x2af9b7[_0xdca0('0x8')](_0xdca0('0x9'),attributes,{'tableName':'tools_canned_answers','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xdca0('0xa'),'collate':_0xdca0('0xb')});};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.rpc.js b/server/api/cannedAnswer/cannedAnswer.rpc.js
index a48bb0b..0fe1965 100644
--- a/server/api/cannedAnswer/cannedAnswer.rpc.js
+++ b/server/api/cannedAnswer/cannedAnswer.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['http','info','CannedAnswer,\x20%s,\x20%s','request\x20sent','debug','CannedAnswer,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x3b3d75,_0x546685){var _0x477866=function(_0x127da3){while(--_0x127da3){_0x3b3d75['push'](_0x3b3d75['shift']());}};_0x477866(++_0x546685);}(_0xa9e0,0x123));var _0x0a9e=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0xa9e0[_0x6c993a];return _0x27f547;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});}
\ No newline at end of file
+var _0xa9e0=['http','info','CannedAnswer,\x20%s,\x20%s','request\x20sent','debug','CannedAnswer,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x300361,_0x1e6ad5){var _0x2a7301=function(_0x441fe6){while(--_0x441fe6){_0x300361['push'](_0x300361['shift']());}};_0x2a7301(++_0x1e6ad5);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3899d1,_0x4aa04c){_0x3899d1=_0x3899d1-0x0;var _0xeb4a7d=_0xa9e0[_0x3899d1];return _0xeb4a7d;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});}
\ No newline at end of file
diff --git a/server/api/cannedAnswer/index.js b/server/api/cannedAnswer/index.js
index ee9e24e..f877c66 100644
--- a/server/api/cannedAnswer/index.js
+++ b/server/api/cannedAnswer/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe72a=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cannedAnswer.controller','index','/:id','show','post','put','isAuthenticated','update','destroy','exports','util','path','connect-timeout'];(function(_0x2283dc,_0x2fcfc5){var _0x16db90=function(_0x376c35){while(--_0x376c35){_0x2283dc['push'](_0x2283dc['shift']());}};_0x16db90(++_0x2fcfc5);}(_0xe72a,0xe7));var _0xae72=function(_0x4a1359,_0x30cf06){_0x4a1359=_0x4a1359-0x0;var _0x1fe0a6=_0xe72a[_0x4a1359];return _0x1fe0a6;};'use strict';var multer=require('multer');var util=require(_0xae72('0x0'));var path=require(_0xae72('0x1'));var timeout=require(_0xae72('0x2'));var express=require('express');var router=express[_0xae72('0x3')]();var fs_extra=require(_0xae72('0x4'));var auth=require(_0xae72('0x5'));var interaction=require(_0xae72('0x6'));var config=require(_0xae72('0x7'));var controller=require(_0xae72('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0xae72('0x9')]);router['get'](_0xae72('0xa'),auth['isAuthenticated'](),controller[_0xae72('0xb')]);router[_0xae72('0xc')]('/',auth['isAuthenticated'](),controller['create']);router[_0xae72('0xd')]('/:id',auth[_0xae72('0xe')](),controller[_0xae72('0xf')]);router['delete']('/:id',auth[_0xae72('0xe')](),controller[_0xae72('0x10')]);module[_0xae72('0x11')]=router;
\ No newline at end of file
+var _0x8be8=['update','delete','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./cannedAnswer.controller','get','isAuthenticated','index','/:id','show','post','create','put'];(function(_0x1efcaa,_0x508b7e){var _0x4e5dd9=function(_0x2ef160){while(--_0x2ef160){_0x1efcaa['push'](_0x1efcaa['shift']());}};_0x4e5dd9(++_0x508b7e);}(_0x8be8,0x1e3));var _0x88be=function(_0x41c03d,_0x11991f){_0x41c03d=_0x41c03d-0x0;var _0x4428e4=_0x8be8[_0x41c03d];return _0x4428e4;};'use strict';var multer=require('multer');var util=require(_0x88be('0x0'));var path=require(_0x88be('0x1'));var timeout=require(_0x88be('0x2'));var express=require(_0x88be('0x3'));var router=express[_0x88be('0x4')]();var fs_extra=require(_0x88be('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x88be('0x6'));var config=require(_0x88be('0x7'));var controller=require(_0x88be('0x8'));router[_0x88be('0x9')]('/',auth[_0x88be('0xa')](),controller[_0x88be('0xb')]);router[_0x88be('0x9')](_0x88be('0xc'),auth['isAuthenticated'](),controller[_0x88be('0xd')]);router[_0x88be('0xe')]('/',auth[_0x88be('0xa')](),controller[_0x88be('0xf')]);router[_0x88be('0x10')](_0x88be('0xc'),auth[_0x88be('0xa')](),controller[_0x88be('0x11')]);router[_0x88be('0x12')](_0x88be('0xc'),auth[_0x88be('0xa')](),controller['destroy']);module[_0x88be('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/cdr/cdr.attributes.js b/server/api/cdr/cdr.attributes.js
index e5571fe..0cbb306 100644
--- a/server/api/cdr/cdr.attributes.js
+++ b/server/api/cdr/cdr.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0aaf=['DATE','1970-01-01\x2000:00:01','STRING','INTEGER'];(function(_0x1fc73f,_0x3ecabc){var _0x1df95a=function(_0x350d0f){while(--_0x350d0f){_0x1fc73f['push'](_0x1fc73f['shift']());}};_0x1df95a(++_0x3ecabc);}(_0x0aaf,0x1c8));var _0xf0aa=function(_0x17266e,_0x5d273d){_0x17266e=_0x17266e-0x0;var _0x8eeaf4=_0x0aaf[_0x17266e];return _0x8eeaf4;};'use strict';var Sequelize=require('sequelize');module['exports']={'calldate':{'type':Sequelize[_0xf0aa('0x0')],'allowNull':![],'defaultValue':_0xf0aa('0x1')},'clid':{'type':Sequelize[_0xf0aa('0x2')]},'src':{'type':Sequelize[_0xf0aa('0x2')]},'dst':{'type':Sequelize[_0xf0aa('0x2')]},'dcontext':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0xf0aa('0x2')]},'dstchannel':{'type':Sequelize[_0xf0aa('0x2')]},'lastapp':{'type':Sequelize['STRING']},'lastdata':{'type':Sequelize[_0xf0aa('0x2')]},'duration':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize[_0xf0aa('0x3')],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize['STRING']},'amaflags':{'type':Sequelize[_0xf0aa('0x3')],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize[_0xf0aa('0x2')]},'userfield':{'type':Sequelize[_0xf0aa('0x2')]},'uniqueid':{'type':Sequelize['STRING']},'linkedid':{'type':Sequelize[_0xf0aa('0x2')]},'sequence':{'type':Sequelize[_0xf0aa('0x2')]},'peeraccount':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0xf0aa('0x2')]},'tag':{'type':Sequelize[_0xf0aa('0x2')]}};
\ No newline at end of file
+var _0x22d5=['STRING','INTEGER','sequelize','exports','1970-01-01\x2000:00:01'];(function(_0x3b4d50,_0x4f8332){var _0x27cffc=function(_0x5117cd){while(--_0x5117cd){_0x3b4d50['push'](_0x3b4d50['shift']());}};_0x27cffc(++_0x4f8332);}(_0x22d5,0xc5));var _0x522d=function(_0x4f8722,_0x47e4ae){_0x4f8722=_0x4f8722-0x0;var _0x1430eb=_0x22d5[_0x4f8722];return _0x1430eb;};'use strict';var Sequelize=require(_0x522d('0x0'));module[_0x522d('0x1')]={'calldate':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':_0x522d('0x2')},'clid':{'type':Sequelize['STRING']},'src':{'type':Sequelize[_0x522d('0x3')]},'dst':{'type':Sequelize[_0x522d('0x3')]},'dcontext':{'type':Sequelize[_0x522d('0x3')]},'channel':{'type':Sequelize['STRING']},'dstchannel':{'type':Sequelize[_0x522d('0x3')]},'lastapp':{'type':Sequelize['STRING']},'lastdata':{'type':Sequelize[_0x522d('0x3')]},'duration':{'type':Sequelize[_0x522d('0x4')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize[_0x522d('0x4')],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize[_0x522d('0x3')]},'amaflags':{'type':Sequelize[_0x522d('0x4')],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize[_0x522d('0x3')]},'userfield':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize[_0x522d('0x3')]},'linkedid':{'type':Sequelize[_0x522d('0x3')]},'sequence':{'type':Sequelize[_0x522d('0x3')]},'peeraccount':{'type':Sequelize[_0x522d('0x3')]},'type':{'type':Sequelize['STRING']},'tag':{'type':Sequelize[_0x522d('0x3')]}};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.controller.js b/server/api/cdr/cdr.controller.js
index a8a5560..7a3b4a2 100644
--- a/server/api/cdr/cdr.controller.js
+++ b/server/api/cdr/cdr.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0d4d=['zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','ejs','fs-extra','lodash','crypto','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','json','limit','undefined','count','offset','status','Content-Range','apply','save','update','then','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','Cdr','rows','catch','show','params','keys','length','find','create','body','destroy','describe','eml-format','rimraf'];(function(_0x4c587a,_0x3bf54a){var _0x3e66fc=function(_0x48529b){while(--_0x48529b){_0x4c587a['push'](_0x4c587a['shift']());}};_0x3e66fc(++_0x3bf54a);}(_0x0d4d,0x132));var _0xd0d4=function(_0x5da23b,_0x264565){_0x5da23b=_0x5da23b-0x0;var _0x10d8ce=_0x0d4d[_0x5da23b];return _0x10d8ce;};'use strict';var emlformat=require(_0xd0d4('0x0'));var rimraf=require(_0xd0d4('0x1'));var zipdir=require(_0xd0d4('0x2'));var jsonpatch=require(_0xd0d4('0x3'));var rp=require(_0xd0d4('0x4'));var moment=require(_0xd0d4('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xd0d4('0x6'));var util=require('util');var path=require(_0xd0d4('0x7'));var sox=require(_0xd0d4('0x8'));var csv=require('to-csv');var ejs=require(_0xd0d4('0x9'));var fs=require('fs');var fs_extra=require(_0xd0d4('0xa'));var _=require(_0xd0d4('0xb'));var squel=require('squel');var crypto=require(_0xd0d4('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xd0d4('0xd'));var toCsv=require('to-csv');var querystring=require(_0xd0d4('0xe'));var Papa=require(_0xd0d4('0xf'));var Redis=require(_0xd0d4('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xd0d4('0x11'));var as=require(_0xd0d4('0x12'));var hardwareService=require(_0xd0d4('0x13'));var logger=require(_0xd0d4('0x14'))(_0xd0d4('0x15'));var utils=require(_0xd0d4('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0xd0d4('0x17'));var db=require(_0xd0d4('0x18'))['db'];function respondWithStatusCode(_0x29ee49,_0x2ddeca){_0x2ddeca=_0x2ddeca||0xcc;return function(_0x38ca06){if(_0x38ca06){return _0x29ee49[_0xd0d4('0x19')](_0x2ddeca);}return _0x29ee49['status'](_0x2ddeca)[_0xd0d4('0x1a')]();};}function respondWithResult(_0x2131c8,_0x10a175){_0x10a175=_0x10a175||0xc8;return function(_0x5d6dd7){if(_0x5d6dd7){return _0x2131c8['status'](_0x10a175)[_0xd0d4('0x1b')](_0x5d6dd7);}};}function respondWithFilteredResult(_0x186405,_0x553b47){return function(_0x29bda4){if(_0x29bda4){var _0x1e8608=typeof _0x553b47['offset']==='undefined'&&typeof _0x553b47[_0xd0d4('0x1c')]===_0xd0d4('0x1d');var _0x268e1a=_0x29bda4['count'];var _0x5cf4c6=_0x1e8608?0x0:_0x553b47['offset'];var _0x407cda=_0x1e8608?_0x29bda4[_0xd0d4('0x1e')]:_0x553b47[_0xd0d4('0x1f')]+_0x553b47['limit'];var _0x568c75;if(_0x407cda>=_0x268e1a){_0x407cda=_0x268e1a;_0x568c75=0xc8;}else{_0x568c75=0xce;}_0x186405[_0xd0d4('0x20')](_0x568c75);return _0x186405['set'](_0xd0d4('0x21'),_0x5cf4c6+'-'+_0x407cda+'/'+_0x268e1a)[_0xd0d4('0x1b')](_0x29bda4);}return null;};}function patchUpdates(_0x1dcc1b){return function(_0x485cd8){try{jsonpatch[_0xd0d4('0x22')](_0x485cd8,_0x1dcc1b,!![]);}catch(_0x4d9fac){return BPromise['reject'](_0x4d9fac);}return _0x485cd8[_0xd0d4('0x23')]();};}function saveUpdates(_0xda03dd,_0x49b6f0){return function(_0x50f959){if(_0x50f959){return _0x50f959[_0xd0d4('0x24')](_0xda03dd)[_0xd0d4('0x25')](function(_0x398a00){return _0x398a00;});}return null;};}function removeEntity(_0x4c94b1,_0x1d8033){return function(_0x1c0831){if(_0x1c0831){return _0x1c0831['destroy']()[_0xd0d4('0x25')](function(){_0x4c94b1['status'](0xcc)[_0xd0d4('0x1a')]();});}};}function handleEntityNotFound(_0x1b03ef,_0x16808c){return function(_0x5380c3){if(!_0x5380c3){_0x1b03ef['sendStatus'](0x194);}return _0x5380c3;};}function handleError(_0x131de5,_0x4e7cc1){_0x4e7cc1=_0x4e7cc1||0x1f4;return function(_0x50e7f0){logger[_0xd0d4('0x26')](_0x50e7f0[_0xd0d4('0x27')]);if(_0x50e7f0[_0xd0d4('0x28')]){delete _0x50e7f0[_0xd0d4('0x28')];}_0x131de5['status'](_0x4e7cc1)[_0xd0d4('0x29')](_0x50e7f0);};}exports[_0xd0d4('0x2a')]=function(_0x45acf8,_0x22e142){var _0x7eecce={},_0xefce4f={},_0x1b07e8={'count':0x0,'rows':[]};var _0x266b91=_[_0xd0d4('0x2b')](db['Cdr'][_0xd0d4('0x2c')],function(_0x7aa87e){return{'name':_0x7aa87e[_0xd0d4('0x2d')],'type':_0x7aa87e[_0xd0d4('0x2e')][_0xd0d4('0x2f')]};});_0xefce4f[_0xd0d4('0x30')]=_['map'](_0x266b91,'name');_0xefce4f[_0xd0d4('0x31')]=_['keys'](_0x45acf8[_0xd0d4('0x31')]);_0xefce4f[_0xd0d4('0x32')]=_[_0xd0d4('0x33')](_0xefce4f[_0xd0d4('0x30')],_0xefce4f[_0xd0d4('0x31')]);_0x7eecce[_0xd0d4('0x34')]=_[_0xd0d4('0x33')](_0xefce4f['model'],qs['fields'](_0x45acf8[_0xd0d4('0x31')][_0xd0d4('0x35')]));_0x7eecce['attributes']=_0x7eecce[_0xd0d4('0x34')]['length']?_0x7eecce['attributes']:_0xefce4f[_0xd0d4('0x30')];if(!_0x45acf8[_0xd0d4('0x31')][_0xd0d4('0x36')](_0xd0d4('0x37'))){_0x7eecce['limit']=qs['limit'](_0x45acf8[_0xd0d4('0x31')][_0xd0d4('0x1c')]);_0x7eecce[_0xd0d4('0x1f')]=qs['offset'](_0x45acf8[_0xd0d4('0x31')][_0xd0d4('0x1f')]);}_0x7eecce[_0xd0d4('0x38')]=qs[_0xd0d4('0x39')](_0x45acf8[_0xd0d4('0x31')][_0xd0d4('0x39')]);_0x7eecce[_0xd0d4('0x3a')]=qs[_0xd0d4('0x32')](_['pick'](_0x45acf8[_0xd0d4('0x31')],_0xefce4f['filters']),_0x266b91);if(_0x45acf8['query'][_0xd0d4('0x3b')]){_0x7eecce['where']=_[_0xd0d4('0x3c')](_0x7eecce[_0xd0d4('0x3a')],{'$or':_[_0xd0d4('0x2b')](_0x266b91,function(_0x1d6329){if(_0x1d6329[_0xd0d4('0x2e')]!==_0xd0d4('0x3d')){var _0x560e77={};_0x560e77[_0x1d6329[_0xd0d4('0x28')]]={'$like':'%'+_0x45acf8[_0xd0d4('0x31')]['filter']+'%'};return _0x560e77;}})});}_0x7eecce=_['merge']({},_0x7eecce,_0x45acf8[_0xd0d4('0x3e')]);var _0x3e6527={'where':_0x7eecce[_0xd0d4('0x3a')]};return db['Cdr'][_0xd0d4('0x1e')](_0x3e6527)[_0xd0d4('0x25')](function(_0x230101){_0x1b07e8[_0xd0d4('0x1e')]=_0x230101;if(_0x45acf8[_0xd0d4('0x31')][_0xd0d4('0x3f')]){_0x7eecce[_0xd0d4('0x40')]=[{'all':!![]}];}return db[_0xd0d4('0x41')]['findAll'](_0x7eecce);})[_0xd0d4('0x25')](function(_0x4174e8){_0x1b07e8[_0xd0d4('0x42')]=_0x4174e8;return _0x1b07e8;})['then'](respondWithFilteredResult(_0x22e142,_0x7eecce))[_0xd0d4('0x43')](handleError(_0x22e142,null));};exports[_0xd0d4('0x44')]=function(_0x5db657,_0x11b77e){var _0x32d1c1={'raw':!![],'where':{'id':_0x5db657[_0xd0d4('0x45')]['id']}},_0x429b84={};_0x429b84[_0xd0d4('0x30')]=_[_0xd0d4('0x46')](db['Cdr'][_0xd0d4('0x2c')]);_0x429b84[_0xd0d4('0x31')]=_[_0xd0d4('0x46')](_0x5db657[_0xd0d4('0x31')]);_0x429b84['filters']=_[_0xd0d4('0x33')](_0x429b84[_0xd0d4('0x30')],_0x429b84[_0xd0d4('0x31')]);_0x32d1c1[_0xd0d4('0x34')]=_[_0xd0d4('0x33')](_0x429b84[_0xd0d4('0x30')],qs[_0xd0d4('0x35')](_0x5db657['query'][_0xd0d4('0x35')]));_0x32d1c1[_0xd0d4('0x34')]=_0x32d1c1['attributes'][_0xd0d4('0x47')]?_0x32d1c1[_0xd0d4('0x34')]:_0x429b84[_0xd0d4('0x30')];if(_0x5db657[_0xd0d4('0x31')][_0xd0d4('0x3f')]){_0x32d1c1[_0xd0d4('0x40')]=[{'all':!![]}];}_0x32d1c1=_['merge']({},_0x32d1c1,_0x5db657[_0xd0d4('0x3e')]);return db['Cdr'][_0xd0d4('0x48')](_0x32d1c1)[_0xd0d4('0x25')](handleEntityNotFound(_0x11b77e,null))['then'](respondWithResult(_0x11b77e,null))[_0xd0d4('0x43')](handleError(_0x11b77e,null));};exports['create']=function(_0x5d61d5,_0x1dad8b){return db['Cdr'][_0xd0d4('0x49')](_0x5d61d5[_0xd0d4('0x4a')],{})['then'](respondWithResult(_0x1dad8b,0xc9))[_0xd0d4('0x43')](handleError(_0x1dad8b,null));};exports['update']=function(_0xdf2562,_0x258cd1){if(_0xdf2562[_0xd0d4('0x4a')]['id']){delete _0xdf2562[_0xd0d4('0x4a')]['id'];}return db[_0xd0d4('0x41')][_0xd0d4('0x48')]({'where':{'id':_0xdf2562[_0xd0d4('0x45')]['id']}})[_0xd0d4('0x25')](handleEntityNotFound(_0x258cd1,null))[_0xd0d4('0x25')](saveUpdates(_0xdf2562['body'],null))['then'](respondWithResult(_0x258cd1,null))[_0xd0d4('0x43')](handleError(_0x258cd1,null));};exports[_0xd0d4('0x4b')]=function(_0x333a5b,_0x6af64e){return db[_0xd0d4('0x41')][_0xd0d4('0x48')]({'where':{'id':_0x333a5b[_0xd0d4('0x45')]['id']}})[_0xd0d4('0x25')](handleEntityNotFound(_0x6af64e,null))[_0xd0d4('0x25')](removeEntity(_0x6af64e,null))['catch'](handleError(_0x6af64e,null));};exports[_0xd0d4('0x4c')]=function(_0x5b23bb,_0x4b97e1){return db[_0xd0d4('0x41')]['describe']()[_0xd0d4('0x25')](respondWithResult(_0x4b97e1,null))[_0xd0d4('0x43')](handleError(_0x4b97e1,null));};
\ No newline at end of file
+var _0x99c9=['merge','options','include','rows','catch','show','length','find','create','body','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','offset','limit','undefined','count','set','Content-Range','json','apply','reject','save','update','then','end','stack','name','map','Cdr','rawAttributes','type','key','model','query','keys','attributes','intersection','fields','hasOwnProperty','nolimit','sort','where','filters','VIRTUAL','filter'];(function(_0x3b2c66,_0x1bf0ee){var _0x1f16f9=function(_0x5d1570){while(--_0x5d1570){_0x3b2c66['push'](_0x3b2c66['shift']());}};_0x1f16f9(++_0x1bf0ee);}(_0x99c9,0x13c));var _0x999c=function(_0x27af45,_0x1b57aa){_0x27af45=_0x27af45-0x0;var _0x18df21=_0x99c9[_0x27af45];return _0x18df21;};'use strict';var emlformat=require(_0x999c('0x0'));var rimraf=require(_0x999c('0x1'));var zipdir=require(_0x999c('0x2'));var jsonpatch=require(_0x999c('0x3'));var rp=require(_0x999c('0x4'));var moment=require(_0x999c('0x5'));var BPromise=require(_0x999c('0x6'));var Mustache=require('mustache');var util=require(_0x999c('0x7'));var path=require(_0x999c('0x8'));var sox=require(_0x999c('0x9'));var csv=require(_0x999c('0xa'));var ejs=require(_0x999c('0xb'));var fs=require('fs');var fs_extra=require(_0x999c('0xc'));var _=require(_0x999c('0xd'));var squel=require(_0x999c('0xe'));var crypto=require(_0x999c('0xf'));var jsforce=require(_0x999c('0x10'));var deskjs=require(_0x999c('0x11'));var toCsv=require(_0x999c('0xa'));var querystring=require(_0x999c('0x12'));var Papa=require(_0x999c('0x13'));var Redis=require('ioredis');var authService=require(_0x999c('0x14'));var qs=require(_0x999c('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x999c('0x16'));var logger=require(_0x999c('0x17'))(_0x999c('0x18'));var utils=require(_0x999c('0x19'));var config=require(_0x999c('0x1a'));var licenseUtil=require(_0x999c('0x1b'));var db=require(_0x999c('0x1c'))['db'];function respondWithStatusCode(_0x3d7c6d,_0x2e5f7e){_0x2e5f7e=_0x2e5f7e||0xcc;return function(_0x44a5bc){if(_0x44a5bc){return _0x3d7c6d[_0x999c('0x1d')](_0x2e5f7e);}return _0x3d7c6d[_0x999c('0x1e')](_0x2e5f7e)['end']();};}function respondWithResult(_0x15f812,_0xd14862){_0xd14862=_0xd14862||0xc8;return function(_0x4f2916){if(_0x4f2916){return _0x15f812['status'](_0xd14862)['json'](_0x4f2916);}};}function respondWithFilteredResult(_0x161434,_0xb3e981){return function(_0x203a73){if(_0x203a73){var _0x116f08=typeof _0xb3e981[_0x999c('0x1f')]==='undefined'&&typeof _0xb3e981[_0x999c('0x20')]===_0x999c('0x21');var _0x2b6126=_0x203a73[_0x999c('0x22')];var _0x110486=_0x116f08?0x0:_0xb3e981['offset'];var _0x1b327f=_0x116f08?_0x203a73[_0x999c('0x22')]:_0xb3e981[_0x999c('0x1f')]+_0xb3e981[_0x999c('0x20')];var _0x32c66c;if(_0x1b327f>=_0x2b6126){_0x1b327f=_0x2b6126;_0x32c66c=0xc8;}else{_0x32c66c=0xce;}_0x161434['status'](_0x32c66c);return _0x161434[_0x999c('0x23')](_0x999c('0x24'),_0x110486+'-'+_0x1b327f+'/'+_0x2b6126)[_0x999c('0x25')](_0x203a73);}return null;};}function patchUpdates(_0x1ec406){return function(_0xceb421){try{jsonpatch[_0x999c('0x26')](_0xceb421,_0x1ec406,!![]);}catch(_0x4a2865){return BPromise[_0x999c('0x27')](_0x4a2865);}return _0xceb421[_0x999c('0x28')]();};}function saveUpdates(_0x24f637,_0x2bcfc9){return function(_0x1c6e55){if(_0x1c6e55){return _0x1c6e55[_0x999c('0x29')](_0x24f637)[_0x999c('0x2a')](function(_0x2a7986){return _0x2a7986;});}return null;};}function removeEntity(_0x4002d2,_0x281720){return function(_0x2cfd83){if(_0x2cfd83){return _0x2cfd83['destroy']()[_0x999c('0x2a')](function(){_0x4002d2[_0x999c('0x1e')](0xcc)[_0x999c('0x2b')]();});}};}function handleEntityNotFound(_0x2e9d58,_0x2256fd){return function(_0x15d102){if(!_0x15d102){_0x2e9d58['sendStatus'](0x194);}return _0x15d102;};}function handleError(_0x4755c2,_0x43293f){_0x43293f=_0x43293f||0x1f4;return function(_0x1c866f){logger['error'](_0x1c866f[_0x999c('0x2c')]);if(_0x1c866f[_0x999c('0x2d')]){delete _0x1c866f['name'];}_0x4755c2[_0x999c('0x1e')](_0x43293f)['send'](_0x1c866f);};}exports['index']=function(_0xedf57d,_0x42cb25){var _0x457df3={},_0x2de6d5={},_0x3737e9={'count':0x0,'rows':[]};var _0x42c2e8=_[_0x999c('0x2e')](db[_0x999c('0x2f')][_0x999c('0x30')],function(_0x3b836a){return{'name':_0x3b836a['fieldName'],'type':_0x3b836a[_0x999c('0x31')][_0x999c('0x32')]};});_0x2de6d5[_0x999c('0x33')]=_[_0x999c('0x2e')](_0x42c2e8,_0x999c('0x2d'));_0x2de6d5[_0x999c('0x34')]=_[_0x999c('0x35')](_0xedf57d[_0x999c('0x34')]);_0x2de6d5['filters']=_['intersection'](_0x2de6d5[_0x999c('0x33')],_0x2de6d5[_0x999c('0x34')]);_0x457df3[_0x999c('0x36')]=_[_0x999c('0x37')](_0x2de6d5['model'],qs[_0x999c('0x38')](_0xedf57d[_0x999c('0x34')][_0x999c('0x38')]));_0x457df3[_0x999c('0x36')]=_0x457df3['attributes']['length']?_0x457df3[_0x999c('0x36')]:_0x2de6d5[_0x999c('0x33')];if(!_0xedf57d[_0x999c('0x34')][_0x999c('0x39')](_0x999c('0x3a'))){_0x457df3[_0x999c('0x20')]=qs[_0x999c('0x20')](_0xedf57d['query']['limit']);_0x457df3['offset']=qs[_0x999c('0x1f')](_0xedf57d[_0x999c('0x34')]['offset']);}_0x457df3['order']=qs['sort'](_0xedf57d[_0x999c('0x34')][_0x999c('0x3b')]);_0x457df3[_0x999c('0x3c')]=qs[_0x999c('0x3d')](_['pick'](_0xedf57d[_0x999c('0x34')],_0x2de6d5[_0x999c('0x3d')]),_0x42c2e8);if(_0xedf57d['query']['filter']){_0x457df3[_0x999c('0x3c')]=_['merge'](_0x457df3[_0x999c('0x3c')],{'$or':_['map'](_0x42c2e8,function(_0x3605a3){if(_0x3605a3[_0x999c('0x31')]!==_0x999c('0x3e')){var _0xcd729={};_0xcd729[_0x3605a3['name']]={'$like':'%'+_0xedf57d['query'][_0x999c('0x3f')]+'%'};return _0xcd729;}})});}_0x457df3=_[_0x999c('0x40')]({},_0x457df3,_0xedf57d[_0x999c('0x41')]);var _0xf26ba3={'where':_0x457df3['where']};return db[_0x999c('0x2f')][_0x999c('0x22')](_0xf26ba3)[_0x999c('0x2a')](function(_0x5fa1de){_0x3737e9['count']=_0x5fa1de;if(_0xedf57d[_0x999c('0x34')]['includeAll']){_0x457df3[_0x999c('0x42')]=[{'all':!![]}];}return db[_0x999c('0x2f')]['findAll'](_0x457df3);})[_0x999c('0x2a')](function(_0x357915){_0x3737e9[_0x999c('0x43')]=_0x357915;return _0x3737e9;})[_0x999c('0x2a')](respondWithFilteredResult(_0x42cb25,_0x457df3))[_0x999c('0x44')](handleError(_0x42cb25,null));};exports[_0x999c('0x45')]=function(_0xa6b0f1,_0x3edf69){var _0x4ef478={'raw':!![],'where':{'id':_0xa6b0f1['params']['id']}},_0x563e11={};_0x563e11['model']=_[_0x999c('0x35')](db[_0x999c('0x2f')][_0x999c('0x30')]);_0x563e11[_0x999c('0x34')]=_[_0x999c('0x35')](_0xa6b0f1['query']);_0x563e11[_0x999c('0x3d')]=_[_0x999c('0x37')](_0x563e11[_0x999c('0x33')],_0x563e11[_0x999c('0x34')]);_0x4ef478[_0x999c('0x36')]=_['intersection'](_0x563e11[_0x999c('0x33')],qs[_0x999c('0x38')](_0xa6b0f1[_0x999c('0x34')][_0x999c('0x38')]));_0x4ef478[_0x999c('0x36')]=_0x4ef478[_0x999c('0x36')][_0x999c('0x46')]?_0x4ef478[_0x999c('0x36')]:_0x563e11[_0x999c('0x33')];if(_0xa6b0f1['query']['includeAll']){_0x4ef478[_0x999c('0x42')]=[{'all':!![]}];}_0x4ef478=_[_0x999c('0x40')]({},_0x4ef478,_0xa6b0f1[_0x999c('0x41')]);return db[_0x999c('0x2f')][_0x999c('0x47')](_0x4ef478)[_0x999c('0x2a')](handleEntityNotFound(_0x3edf69,null))[_0x999c('0x2a')](respondWithResult(_0x3edf69,null))[_0x999c('0x44')](handleError(_0x3edf69,null));};exports[_0x999c('0x48')]=function(_0x26ebd7,_0x3457d6){return db['Cdr'][_0x999c('0x48')](_0x26ebd7[_0x999c('0x49')],{})[_0x999c('0x2a')](respondWithResult(_0x3457d6,0xc9))[_0x999c('0x44')](handleError(_0x3457d6,null));};exports[_0x999c('0x29')]=function(_0x386be6,_0x11f3bf){if(_0x386be6[_0x999c('0x49')]['id']){delete _0x386be6['body']['id'];}return db[_0x999c('0x2f')][_0x999c('0x47')]({'where':{'id':_0x386be6[_0x999c('0x4a')]['id']}})[_0x999c('0x2a')](handleEntityNotFound(_0x11f3bf,null))[_0x999c('0x2a')](saveUpdates(_0x386be6[_0x999c('0x49')],null))[_0x999c('0x2a')](respondWithResult(_0x11f3bf,null))['catch'](handleError(_0x11f3bf,null));};exports['destroy']=function(_0x1139f6,_0x3f134a){return db[_0x999c('0x2f')][_0x999c('0x47')]({'where':{'id':_0x1139f6[_0x999c('0x4a')]['id']}})['then'](handleEntityNotFound(_0x3f134a,null))[_0x999c('0x2a')](removeEntity(_0x3f134a,null))[_0x999c('0x44')](handleError(_0x3f134a,null));};exports[_0x999c('0x4b')]=function(_0x11cc72,_0x5c066e){return db[_0x999c('0x2f')]['describe']()[_0x999c('0x2a')](respondWithResult(_0x5c066e,null))[_0x999c('0x44')](handleError(_0x5c066e,null));};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.model.js b/server/api/cdr/cdr.model.js
index fbce907..d4556c5 100644
--- a/server/api/cdr/cdr.model.js
+++ b/server/api/cdr/cdr.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9957=['dst','src','uniqueid','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./cdr.attributes','exports','define','Cdr','accountcode','calldate','disposition'];(function(_0x42c440,_0x28ee66){var _0x4a9172=function(_0x314cf7){while(--_0x314cf7){_0x42c440['push'](_0x42c440['shift']());}};_0x4a9172(++_0x28ee66);}(_0x9957,0x93));var _0x7995=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x9957[_0x3b380d];return _0x54502b;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var logger=require(_0x7995('0x2'))(_0x7995('0x3'));var moment=require('moment');var BPromise=require(_0x7995('0x4'));var rp=require(_0x7995('0x5'));var fs=require('fs');var path=require(_0x7995('0x6'));var rimraf=require(_0x7995('0x7'));var config=require('../../config/environment');var attributes=require(_0x7995('0x8'));module[_0x7995('0x9')]=function(_0x137b6b,_0x219534){return _0x137b6b[_0x7995('0xa')](_0x7995('0xb'),attributes,{'tableName':'cdr','paranoid':![],'indexes':[{'name':_0x7995('0xc'),'fields':[_0x7995('0xc')]},{'name':'calldate','fields':[_0x7995('0xd')]},{'name':_0x7995('0xe'),'fields':[_0x7995('0xe')]},{'name':_0x7995('0xf'),'fields':[_0x7995('0xf')]},{'name':_0x7995('0x10'),'fields':[_0x7995('0x10')]},{'name':'uniqueid','fields':[_0x7995('0x11')]}],'timestamps':![]});};
\ No newline at end of file
+var _0x9957=['dst','src','uniqueid','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./cdr.attributes','exports','define','Cdr','accountcode','calldate','disposition'];(function(_0x502211,_0x30c0e7){var _0x323391=function(_0x6ebdc0){while(--_0x6ebdc0){_0x502211['push'](_0x502211['shift']());}};_0x323391(++_0x30c0e7);}(_0x9957,0x93));var _0x7995=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0x9957[_0x1ac595];return _0x455fff;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var logger=require(_0x7995('0x2'))(_0x7995('0x3'));var moment=require('moment');var BPromise=require(_0x7995('0x4'));var rp=require(_0x7995('0x5'));var fs=require('fs');var path=require(_0x7995('0x6'));var rimraf=require(_0x7995('0x7'));var config=require('../../config/environment');var attributes=require(_0x7995('0x8'));module[_0x7995('0x9')]=function(_0x137b6b,_0x219534){return _0x137b6b[_0x7995('0xa')](_0x7995('0xb'),attributes,{'tableName':'cdr','paranoid':![],'indexes':[{'name':_0x7995('0xc'),'fields':[_0x7995('0xc')]},{'name':'calldate','fields':[_0x7995('0xd')]},{'name':_0x7995('0xe'),'fields':[_0x7995('0xe')]},{'name':_0x7995('0xf'),'fields':[_0x7995('0xf')]},{'name':_0x7995('0x10'),'fields':[_0x7995('0x10')]},{'name':'uniqueid','fields':[_0x7995('0x11')]}],'timestamps':![]});};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.rpc.js b/server/api/cdr/cdr.rpc.js
index 136082f..704039c 100644
--- a/server/api/cdr/cdr.rpc.js
+++ b/server/api/cdr/cdr.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5f61=['lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','request\x20sent','debug','Cdr,\x20%s,\x20%s,\x20%s','stringify','error','code','message','Cdr,\x20%s,\x20%s','info','result','catch'];(function(_0x4b4b04,_0x14d717){var _0x30bb5b=function(_0x514ded){while(--_0x514ded){_0x4b4b04['push'](_0x4b4b04['shift']());}};_0x30bb5b(++_0x14d717);}(_0x5f61,0x150));var _0x15f6=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x5f61[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x15f6('0x0'));var util=require(_0x15f6('0x1'));var moment=require(_0x15f6('0x2'));var BPromise=require(_0x15f6('0x3'));var rs=require(_0x15f6('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x15f6('0x5'));var logger=require(_0x15f6('0x6'))(_0x15f6('0x7'));var config=require(_0x15f6('0x8'));var jayson=require(_0x15f6('0x9'));var client=jayson[_0x15f6('0xa')][_0x15f6('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2be938,_0x57b7de,_0x544a93){return new BPromise(function(_0x4009cc,_0x2223f7){return client[_0x15f6('0xc')](_0x2be938,_0x544a93)['then'](function(_0x2a2396){logger['info']('Cdr,\x20%s,\x20%s',_0x57b7de,_0x15f6('0xd'));logger[_0x15f6('0xe')](_0x15f6('0xf'),_0x57b7de,_0x15f6('0xd'),JSON[_0x15f6('0x10')](_0x2a2396));if(_0x2a2396[_0x15f6('0x11')]){if(_0x2a2396[_0x15f6('0x11')][_0x15f6('0x12')]===0x1f4){logger['error']('Cdr,\x20%s,\x20%s',_0x57b7de,_0x2a2396[_0x15f6('0x11')][_0x15f6('0x13')]);return _0x2223f7(_0x2a2396[_0x15f6('0x11')][_0x15f6('0x13')]);}logger['error'](_0x15f6('0x14'),_0x57b7de,_0x2a2396[_0x15f6('0x11')][_0x15f6('0x13')]);return _0x4009cc(_0x2a2396[_0x15f6('0x11')][_0x15f6('0x13')]);}else{logger[_0x15f6('0x15')](_0x15f6('0x14'),_0x57b7de,_0x15f6('0xd'));_0x4009cc(_0x2a2396[_0x15f6('0x16')][_0x15f6('0x13')]);}})[_0x15f6('0x17')](function(_0x36fb43){logger[_0x15f6('0x11')](_0x15f6('0x14'),_0x57b7de,_0x36fb43);_0x2223f7(_0x36fb43);});});}
\ No newline at end of file
+var _0x2b86=['../../config/logger','jayson/promise','client','http','request','info','Cdr,\x20%s,\x20%s','request\x20sent','debug','Cdr,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x9eb13e,_0x5d5531){var _0x1d7286=function(_0x49369f){while(--_0x49369f){_0x9eb13e['push'](_0x9eb13e['shift']());}};_0x1d7286(++_0x5d5531);}(_0x2b86,0x196));var _0x62b8=function(_0x378739,_0x5c8a7a){_0x378739=_0x378739-0x0;var _0x24471f=_0x2b86[_0x378739];return _0x24471f;};'use strict';var _=require(_0x62b8('0x0'));var util=require(_0x62b8('0x1'));var moment=require(_0x62b8('0x2'));var BPromise=require(_0x62b8('0x3'));var rs=require(_0x62b8('0x4'));var fs=require('fs');var Redis=require(_0x62b8('0x5'));var db=require(_0x62b8('0x6'))['db'];var utils=require(_0x62b8('0x7'));var logger=require(_0x62b8('0x8'))('rpc');var config=require('../../config/environment');var jayson=require(_0x62b8('0x9'));var client=jayson[_0x62b8('0xa')][_0x62b8('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2d0d05,_0x1fdf78,_0x27a4f6){return new BPromise(function(_0x30b4e7,_0x28aac5){return client[_0x62b8('0xc')](_0x2d0d05,_0x27a4f6)['then'](function(_0x2ce483){logger[_0x62b8('0xd')](_0x62b8('0xe'),_0x1fdf78,_0x62b8('0xf'));logger[_0x62b8('0x10')](_0x62b8('0x11'),_0x1fdf78,_0x62b8('0xf'),JSON[_0x62b8('0x12')](_0x2ce483));if(_0x2ce483[_0x62b8('0x13')]){if(_0x2ce483['error']['code']===0x1f4){logger[_0x62b8('0x13')](_0x62b8('0xe'),_0x1fdf78,_0x2ce483['error'][_0x62b8('0x14')]);return _0x28aac5(_0x2ce483[_0x62b8('0x13')][_0x62b8('0x14')]);}logger[_0x62b8('0x13')](_0x62b8('0xe'),_0x1fdf78,_0x2ce483[_0x62b8('0x13')][_0x62b8('0x14')]);return _0x30b4e7(_0x2ce483[_0x62b8('0x13')][_0x62b8('0x14')]);}else{logger['info'](_0x62b8('0xe'),_0x1fdf78,_0x62b8('0xf'));_0x30b4e7(_0x2ce483[_0x62b8('0x15')][_0x62b8('0x14')]);}})[_0x62b8('0x16')](function(_0x70cf90){logger[_0x62b8('0x13')]('Cdr,\x20%s,\x20%s',_0x1fdf78,_0x70cf90);_0x28aac5(_0x70cf90);});});}
\ No newline at end of file
diff --git a/server/api/cdr/index.js b/server/api/cdr/index.js
index dcb494b..9a31613 100644
--- a/server/api/cdr/index.js
+++ b/server/api/cdr/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd8b0=['destroy','exports','multer','util','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','describe','/:id','show','post','create','put','update'];(function(_0x5a7d41,_0x4447e2){var _0x98d8fa=function(_0x2ce1cf){while(--_0x2ce1cf){_0x5a7d41['push'](_0x5a7d41['shift']());}};_0x98d8fa(++_0x4447e2);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var fs_extra=require(_0x0d8b('0x3'));var auth=require(_0x0d8b('0x4'));var interaction=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));var controller=require('./cdr.controller');router['get']('/',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x8')]);router[_0x0d8b('0x9')]('/describe',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xa')]);router['get'](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xc')]);router[_0x0d8b('0xd')]('/',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xe')]);router[_0x0d8b('0xf')](_0x0d8b('0xb'),auth['isAuthenticated'](),controller[_0x0d8b('0x10')]);router['delete'](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x11')]);module[_0x0d8b('0x12')]=router;
\ No newline at end of file
+var _0xd8b0=['destroy','exports','multer','util','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','describe','/:id','show','post','create','put','update'];(function(_0x2f6e47,_0x40ba6b){var _0x29c331=function(_0x18d873){while(--_0x18d873){_0x2f6e47['push'](_0x2f6e47['shift']());}};_0x29c331(++_0x40ba6b);}(_0xd8b0,0xad));var _0x0d8b=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xd8b0[_0xa464c9];return _0x3d73c4;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var fs_extra=require(_0x0d8b('0x3'));var auth=require(_0x0d8b('0x4'));var interaction=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));var controller=require('./cdr.controller');router['get']('/',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x8')]);router[_0x0d8b('0x9')]('/describe',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xa')]);router['get'](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xc')]);router[_0x0d8b('0xd')]('/',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xe')]);router[_0x0d8b('0xf')](_0x0d8b('0xb'),auth['isAuthenticated'](),controller[_0x0d8b('0x10')]);router['delete'](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x11')]);module[_0x0d8b('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.attributes.js b/server/api/chatApplication/chatApplication.attributes.js
index a49fa4c..4a95ecf 100644
--- a/server/api/chatApplication/chatApplication.attributes.js
+++ b/server/api/chatApplication/chatApplication.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4bfb=['*,*,*,*','STRING','noop','TEXT'];(function(_0x2ae3d8,_0x1d7954){var _0x278dd3=function(_0x50d820){while(--_0x50d820){_0x2ae3d8['push'](_0x2ae3d8['shift']());}};_0x278dd3(++_0x1d7954);}(_0x4bfb,0x1dd));var _0xb4bf=function(_0x217a6f,_0x3ecd8b){_0x217a6f=_0x217a6f-0x0;var _0x5553f3=_0x4bfb[_0x217a6f];return _0x5553f3;};'use strict';var Sequelize=require('sequelize');module['exports']={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0xb4bf('0x0')],'allowNull':![],'defaultValue':_0xb4bf('0x1')},'appdata':{'type':Sequelize[_0xb4bf('0x2')]()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize['STRING'],'defaultValue':_0xb4bf('0x3')}};
\ No newline at end of file
+var _0x82f0=['INTEGER','noop','STRING','*,*,*,*','sequelize','exports'];(function(_0x11ce46,_0x177a85){var _0x368a1e=function(_0x425454){while(--_0x425454){_0x11ce46['push'](_0x11ce46['shift']());}};_0x368a1e(++_0x177a85);}(_0x82f0,0x19c));var _0x082f=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0x82f0[_0x6131cd];return _0x47e916;};'use strict';var Sequelize=require(_0x082f('0x0'));module[_0x082f('0x1')]={'priority':{'type':Sequelize[_0x082f('0x2')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x082f('0x3')},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0x082f('0x4')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x082f('0x5')}};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.controller.js b/server/api/chatApplication/chatApplication.controller.js
index a7e99a4..e8a6105 100644
--- a/server/api/chatApplication/chatApplication.controller.js
+++ b/server/api/chatApplication/chatApplication.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcd60=['request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','error','stack','name','send','show','params','model','keys','ChatApplication','rawAttributes','query','filters','intersection','attributes','fields','length','includeAll','merge','options','then','body','find','catch','eml-format','rimraf','zip-dir','fast-json-patch'];(function(_0x469af4,_0x463713){var _0x180c10=function(_0x527aa7){while(--_0x527aa7){_0x469af4['push'](_0x469af4['shift']());}};_0x180c10(++_0x463713);}(_0xcd60,0xf0));var _0x0cd6=function(_0x270812,_0x222d57){_0x270812=_0x270812-0x0;var _0x3c00b2=_0xcd60[_0x270812];return _0x3c00b2;};'use strict';var emlformat=require(_0x0cd6('0x0'));var rimraf=require(_0x0cd6('0x1'));var zipdir=require(_0x0cd6('0x2'));var jsonpatch=require(_0x0cd6('0x3'));var rp=require(_0x0cd6('0x4'));var moment=require(_0x0cd6('0x5'));var BPromise=require(_0x0cd6('0x6'));var Mustache=require('mustache');var util=require(_0x0cd6('0x7'));var path=require(_0x0cd6('0x8'));var sox=require(_0x0cd6('0x9'));var csv=require(_0x0cd6('0xa'));var ejs=require(_0x0cd6('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x0cd6('0xc'));var squel=require(_0x0cd6('0xd'));var crypto=require('crypto');var jsforce=require(_0x0cd6('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x0cd6('0xa'));var querystring=require(_0x0cd6('0xf'));var Papa=require(_0x0cd6('0x10'));var Redis=require(_0x0cd6('0x11'));var authService=require(_0x0cd6('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x0cd6('0x13'));var hardwareService=require(_0x0cd6('0x14'));var logger=require(_0x0cd6('0x15'))(_0x0cd6('0x16'));var utils=require(_0x0cd6('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x0cd6('0x18'))['db'];function respondWithStatusCode(_0x327d41,_0x2750c9){_0x2750c9=_0x2750c9||0xcc;return function(_0x54c660){if(_0x54c660){return _0x327d41[_0x0cd6('0x19')](_0x2750c9);}return _0x327d41['status'](_0x2750c9)[_0x0cd6('0x1a')]();};}function respondWithResult(_0x259190,_0x134b64){_0x134b64=_0x134b64||0xc8;return function(_0x443290){if(_0x443290){return _0x259190[_0x0cd6('0x1b')](_0x134b64)[_0x0cd6('0x1c')](_0x443290);}};}function respondWithFilteredResult(_0xf6fdb3,_0x1efb4a){return function(_0x1727e5){if(_0x1727e5){var _0x364880=typeof _0x1efb4a[_0x0cd6('0x1d')]===_0x0cd6('0x1e')&&typeof _0x1efb4a[_0x0cd6('0x1f')]===_0x0cd6('0x1e');var _0x596a46=_0x1727e5[_0x0cd6('0x20')];var _0x202d73=_0x364880?0x0:_0x1efb4a['offset'];var _0x5c37ee=_0x364880?_0x1727e5['count']:_0x1efb4a[_0x0cd6('0x1d')]+_0x1efb4a['limit'];var _0x5bdd3f;if(_0x5c37ee>=_0x596a46){_0x5c37ee=_0x596a46;_0x5bdd3f=0xc8;}else{_0x5bdd3f=0xce;}_0xf6fdb3[_0x0cd6('0x1b')](_0x5bdd3f);return _0xf6fdb3['set'](_0x0cd6('0x21'),_0x202d73+'-'+_0x5c37ee+'/'+_0x596a46)[_0x0cd6('0x1c')](_0x1727e5);}return null;};}function patchUpdates(_0x1b29b1){return function(_0x1bb2d6){try{jsonpatch[_0x0cd6('0x22')](_0x1bb2d6,_0x1b29b1,!![]);}catch(_0x33b228){return BPromise[_0x0cd6('0x23')](_0x33b228);}return _0x1bb2d6[_0x0cd6('0x24')]();};}function saveUpdates(_0x5734a5,_0x643aa0){return function(_0x1488bf){if(_0x1488bf){return _0x1488bf[_0x0cd6('0x25')](_0x5734a5)['then'](function(_0x55f68f){return _0x55f68f;});}return null;};}function removeEntity(_0x5cacd5,_0x6689ab){return function(_0x5c8b8b){if(_0x5c8b8b){return _0x5c8b8b['destroy']()['then'](function(){_0x5cacd5['status'](0xcc)[_0x0cd6('0x1a')]();});}};}function handleEntityNotFound(_0x37ff86,_0x2a883a){return function(_0x304a09){if(!_0x304a09){_0x37ff86['sendStatus'](0x194);}return _0x304a09;};}function handleError(_0x55def9,_0x147d7e){_0x147d7e=_0x147d7e||0x1f4;return function(_0x47cd69){logger[_0x0cd6('0x26')](_0x47cd69[_0x0cd6('0x27')]);if(_0x47cd69[_0x0cd6('0x28')]){delete _0x47cd69[_0x0cd6('0x28')];}_0x55def9[_0x0cd6('0x1b')](_0x147d7e)[_0x0cd6('0x29')](_0x47cd69);};}exports[_0x0cd6('0x2a')]=function(_0x341cee,_0x90fa6d){var _0x72c358={'raw':!![],'where':{'id':_0x341cee[_0x0cd6('0x2b')]['id']}},_0x1cb053={};_0x1cb053[_0x0cd6('0x2c')]=_[_0x0cd6('0x2d')](db[_0x0cd6('0x2e')][_0x0cd6('0x2f')]);_0x1cb053['query']=_[_0x0cd6('0x2d')](_0x341cee[_0x0cd6('0x30')]);_0x1cb053[_0x0cd6('0x31')]=_[_0x0cd6('0x32')](_0x1cb053['model'],_0x1cb053[_0x0cd6('0x30')]);_0x72c358[_0x0cd6('0x33')]=_[_0x0cd6('0x32')](_0x1cb053[_0x0cd6('0x2c')],qs[_0x0cd6('0x34')](_0x341cee['query'][_0x0cd6('0x34')]));_0x72c358[_0x0cd6('0x33')]=_0x72c358[_0x0cd6('0x33')][_0x0cd6('0x35')]?_0x72c358[_0x0cd6('0x33')]:_0x1cb053['model'];if(_0x341cee[_0x0cd6('0x30')][_0x0cd6('0x36')]){_0x72c358['include']=[{'all':!![]}];}_0x72c358=_[_0x0cd6('0x37')]({},_0x72c358,_0x341cee[_0x0cd6('0x38')]);return db[_0x0cd6('0x2e')]['find'](_0x72c358)[_0x0cd6('0x39')](handleEntityNotFound(_0x90fa6d,null))[_0x0cd6('0x39')](respondWithResult(_0x90fa6d,null))['catch'](handleError(_0x90fa6d,null));};exports[_0x0cd6('0x25')]=function(_0x12bdb4,_0xf8ec39){if(_0x12bdb4['body']['id']){delete _0x12bdb4[_0x0cd6('0x3a')]['id'];}return db[_0x0cd6('0x2e')][_0x0cd6('0x3b')]({'where':{'id':_0x12bdb4['params']['id']}})[_0x0cd6('0x39')](handleEntityNotFound(_0xf8ec39,null))['then'](saveUpdates(_0x12bdb4[_0x0cd6('0x3a')],null))[_0x0cd6('0x39')](respondWithResult(_0xf8ec39,null))[_0x0cd6('0x3c')](handleError(_0xf8ec39,null));};exports['destroy']=function(_0x2ac6ab,_0x2ab84d){return db[_0x0cd6('0x2e')][_0x0cd6('0x3b')]({'where':{'id':_0x2ac6ab[_0x0cd6('0x2b')]['id']}})['then'](handleEntityNotFound(_0x2ab84d,null))['then'](removeEntity(_0x2ab84d,null))[_0x0cd6('0x3c')](handleError(_0x2ab84d,null));};
\ No newline at end of file
+var _0x1bb2=['../../config/environment','../../config/license/util','sendStatus','status','offset','undefined','limit','count','Content-Range','json','apply','reject','save','update','destroy','then','end','error','stack','name','send','show','model','keys','rawAttributes','query','filters','attributes','intersection','fields','length','include','merge','ChatApplication','find','catch','body','params','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils'];(function(_0x290a82,_0x37b7aa){var _0x4c9955=function(_0x288e31){while(--_0x288e31){_0x290a82['push'](_0x290a82['shift']());}};_0x4c9955(++_0x37b7aa);}(_0x1bb2,0x152));var _0x21bb=function(_0x3002a2,_0x514522){_0x3002a2=_0x3002a2-0x0;var _0x42524e=_0x1bb2[_0x3002a2];return _0x42524e;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x21bb('0x0'));var zipdir=require(_0x21bb('0x1'));var jsonpatch=require(_0x21bb('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x21bb('0x3'));var Mustache=require(_0x21bb('0x4'));var util=require(_0x21bb('0x5'));var path=require(_0x21bb('0x6'));var sox=require(_0x21bb('0x7'));var csv=require(_0x21bb('0x8'));var ejs=require(_0x21bb('0x9'));var fs=require('fs');var fs_extra=require(_0x21bb('0xa'));var _=require(_0x21bb('0xb'));var squel=require(_0x21bb('0xc'));var crypto=require(_0x21bb('0xd'));var jsforce=require(_0x21bb('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x21bb('0x8'));var querystring=require('querystring');var Papa=require(_0x21bb('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x21bb('0x10'));var as=require(_0x21bb('0x11'));var hardwareService=require(_0x21bb('0x12'));var logger=require(_0x21bb('0x13'))(_0x21bb('0x14'));var utils=require(_0x21bb('0x15'));var config=require(_0x21bb('0x16'));var licenseUtil=require(_0x21bb('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x231d5b,_0x3026eb){_0x3026eb=_0x3026eb||0xcc;return function(_0x516c76){if(_0x516c76){return _0x231d5b[_0x21bb('0x18')](_0x3026eb);}return _0x231d5b[_0x21bb('0x19')](_0x3026eb)['end']();};}function respondWithResult(_0x42ad54,_0xae34f3){_0xae34f3=_0xae34f3||0xc8;return function(_0x3444e1){if(_0x3444e1){return _0x42ad54[_0x21bb('0x19')](_0xae34f3)['json'](_0x3444e1);}};}function respondWithFilteredResult(_0x2eaa36,_0x589d0f){return function(_0x5eb3d2){if(_0x5eb3d2){var _0x18daa7=typeof _0x589d0f[_0x21bb('0x1a')]===_0x21bb('0x1b')&&typeof _0x589d0f[_0x21bb('0x1c')]===_0x21bb('0x1b');var _0x412d50=_0x5eb3d2[_0x21bb('0x1d')];var _0x15fc36=_0x18daa7?0x0:_0x589d0f[_0x21bb('0x1a')];var _0x17ee1d=_0x18daa7?_0x5eb3d2[_0x21bb('0x1d')]:_0x589d0f['offset']+_0x589d0f[_0x21bb('0x1c')];var _0x159ac6;if(_0x17ee1d>=_0x412d50){_0x17ee1d=_0x412d50;_0x159ac6=0xc8;}else{_0x159ac6=0xce;}_0x2eaa36[_0x21bb('0x19')](_0x159ac6);return _0x2eaa36['set'](_0x21bb('0x1e'),_0x15fc36+'-'+_0x17ee1d+'/'+_0x412d50)[_0x21bb('0x1f')](_0x5eb3d2);}return null;};}function patchUpdates(_0x271a9f){return function(_0x28899f){try{jsonpatch[_0x21bb('0x20')](_0x28899f,_0x271a9f,!![]);}catch(_0x44930d){return BPromise[_0x21bb('0x21')](_0x44930d);}return _0x28899f[_0x21bb('0x22')]();};}function saveUpdates(_0x169623,_0x3d4814){return function(_0x9f93a7){if(_0x9f93a7){return _0x9f93a7[_0x21bb('0x23')](_0x169623)['then'](function(_0x353019){return _0x353019;});}return null;};}function removeEntity(_0x2b2bc3,_0x358c1a){return function(_0x490266){if(_0x490266){return _0x490266[_0x21bb('0x24')]()[_0x21bb('0x25')](function(){_0x2b2bc3[_0x21bb('0x19')](0xcc)[_0x21bb('0x26')]();});}};}function handleEntityNotFound(_0x40d801,_0x3239e2){return function(_0x112412){if(!_0x112412){_0x40d801[_0x21bb('0x18')](0x194);}return _0x112412;};}function handleError(_0x4db3ad,_0x22a467){_0x22a467=_0x22a467||0x1f4;return function(_0xed3ab2){logger[_0x21bb('0x27')](_0xed3ab2[_0x21bb('0x28')]);if(_0xed3ab2['name']){delete _0xed3ab2[_0x21bb('0x29')];}_0x4db3ad[_0x21bb('0x19')](_0x22a467)[_0x21bb('0x2a')](_0xed3ab2);};}exports[_0x21bb('0x2b')]=function(_0xc6ae64,_0x2c09d6){var _0x20de34={'raw':!![],'where':{'id':_0xc6ae64['params']['id']}},_0x256974={};_0x256974[_0x21bb('0x2c')]=_[_0x21bb('0x2d')](db['ChatApplication'][_0x21bb('0x2e')]);_0x256974[_0x21bb('0x2f')]=_[_0x21bb('0x2d')](_0xc6ae64['query']);_0x256974[_0x21bb('0x30')]=_['intersection'](_0x256974[_0x21bb('0x2c')],_0x256974[_0x21bb('0x2f')]);_0x20de34[_0x21bb('0x31')]=_[_0x21bb('0x32')](_0x256974['model'],qs[_0x21bb('0x33')](_0xc6ae64[_0x21bb('0x2f')]['fields']));_0x20de34[_0x21bb('0x31')]=_0x20de34[_0x21bb('0x31')][_0x21bb('0x34')]?_0x20de34[_0x21bb('0x31')]:_0x256974[_0x21bb('0x2c')];if(_0xc6ae64[_0x21bb('0x2f')]['includeAll']){_0x20de34[_0x21bb('0x35')]=[{'all':!![]}];}_0x20de34=_[_0x21bb('0x36')]({},_0x20de34,_0xc6ae64['options']);return db[_0x21bb('0x37')][_0x21bb('0x38')](_0x20de34)['then'](handleEntityNotFound(_0x2c09d6,null))[_0x21bb('0x25')](respondWithResult(_0x2c09d6,null))[_0x21bb('0x39')](handleError(_0x2c09d6,null));};exports[_0x21bb('0x23')]=function(_0x3ac411,_0x58e25a){if(_0x3ac411['body']['id']){delete _0x3ac411[_0x21bb('0x3a')]['id'];}return db['ChatApplication'][_0x21bb('0x38')]({'where':{'id':_0x3ac411['params']['id']}})[_0x21bb('0x25')](handleEntityNotFound(_0x58e25a,null))[_0x21bb('0x25')](saveUpdates(_0x3ac411[_0x21bb('0x3a')],null))[_0x21bb('0x25')](respondWithResult(_0x58e25a,null))[_0x21bb('0x39')](handleError(_0x58e25a,null));};exports['destroy']=function(_0x50ad22,_0xee3a6b){return db[_0x21bb('0x37')][_0x21bb('0x38')]({'where':{'id':_0x50ad22[_0x21bb('0x3b')]['id']}})[_0x21bb('0x25')](handleEntityNotFound(_0xee3a6b,null))['then'](removeEntity(_0xee3a6b,null))['catch'](handleError(_0xee3a6b,null));};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.model.js b/server/api/chatApplication/chatApplication.model.js
index 9a81a4d..e805530 100644
--- a/server/api/chatApplication/chatApplication.model.js
+++ b/server/api/chatApplication/chatApplication.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5eb7=['define','chat_applications','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','bluebird','request-promise','path','./chatApplication.attributes','exports'];(function(_0x145307,_0x44360f){var _0x536970=function(_0x310060){while(--_0x310060){_0x145307['push'](_0x145307['shift']());}};_0x536970(++_0x44360f);}(_0x5eb7,0xa0));var _0x75eb=function(_0xee3051,_0xbe4f18){_0xee3051=_0xee3051-0x0;var _0x139e81=_0x5eb7[_0xee3051];return _0x139e81;};'use strict';var _=require(_0x75eb('0x0'));var util=require(_0x75eb('0x1'));var logger=require(_0x75eb('0x2'))('api');var moment=require('moment');var BPromise=require(_0x75eb('0x3'));var rp=require(_0x75eb('0x4'));var fs=require('fs');var path=require(_0x75eb('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x75eb('0x6'));module[_0x75eb('0x7')]=function(_0x14f91a,_0x2229f3){return _0x14f91a[_0x75eb('0x8')]('ChatApplication',attributes,{'tableName':_0x75eb('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x75eb('0xa'),'collate':_0x75eb('0xb')});};
\ No newline at end of file
+var _0x8811=['../../config/environment','./chatApplication.attributes','define','ChatApplication','utf8mb4_unicode_ci','lodash','util','../../config/logger','bluebird','path','rimraf'];(function(_0x513aa5,_0x1fba79){var _0x1a1a7c=function(_0x240e3f){while(--_0x240e3f){_0x513aa5['push'](_0x513aa5['shift']());}};_0x1a1a7c(++_0x1fba79);}(_0x8811,0x73));var _0x1881=function(_0x42edd9,_0x1e5ea1){_0x42edd9=_0x42edd9-0x0;var _0x5ef512=_0x8811[_0x42edd9];return _0x5ef512;};'use strict';var _=require(_0x1881('0x0'));var util=require(_0x1881('0x1'));var logger=require(_0x1881('0x2'))('api');var moment=require('moment');var BPromise=require(_0x1881('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x1881('0x4'));var rimraf=require(_0x1881('0x5'));var config=require(_0x1881('0x6'));var attributes=require(_0x1881('0x7'));module['exports']=function(_0x281294,_0x16bbdb){return _0x281294[_0x1881('0x8')](_0x1881('0x9'),attributes,{'tableName':'chat_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x1881('0xa')});};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.rpc.js b/server/api/chatApplication/chatApplication.rpc.js
index 7b39cdf..9735dd7 100644
--- a/server/api/chatApplication/chatApplication.rpc.js
+++ b/server/api/chatApplication/chatApplication.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc6fc=['client','http','request','then','info','request\x20sent','ChatApplication,\x20%s,\x20%s,\x20%s','error','ChatApplication,\x20%s,\x20%s','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x5902c1,_0x3adf56){var _0xa6084=function(_0x28b739){while(--_0x28b739){_0x5902c1['push'](_0x5902c1['shift']());}};_0xa6084(++_0x3adf56);}(_0xc6fc,0x17b));var _0xcc6f=function(_0x422b48,_0xf131fb){_0x422b48=_0x422b48-0x0;var _0x4a6f67=_0xc6fc[_0x422b48];return _0x4a6f67;};'use strict';var _=require(_0xcc6f('0x0'));var util=require(_0xcc6f('0x1'));var moment=require(_0xcc6f('0x2'));var BPromise=require(_0xcc6f('0x3'));var rs=require(_0xcc6f('0x4'));var fs=require('fs');var Redis=require(_0xcc6f('0x5'));var db=require(_0xcc6f('0x6'))['db'];var utils=require(_0xcc6f('0x7'));var logger=require(_0xcc6f('0x8'))(_0xcc6f('0x9'));var config=require(_0xcc6f('0xa'));var jayson=require(_0xcc6f('0xb'));var client=jayson[_0xcc6f('0xc')][_0xcc6f('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x3a59f4,_0x1dc938,_0x2f5778){return new BPromise(function(_0x3af2b1,_0x7e93f9){return client[_0xcc6f('0xe')](_0x3a59f4,_0x2f5778)[_0xcc6f('0xf')](function(_0x1cffc1){logger[_0xcc6f('0x10')]('ChatApplication,\x20%s,\x20%s',_0x1dc938,_0xcc6f('0x11'));logger['debug'](_0xcc6f('0x12'),_0x1dc938,'request\x20sent',JSON['stringify'](_0x1cffc1));if(_0x1cffc1[_0xcc6f('0x13')]){if(_0x1cffc1[_0xcc6f('0x13')]['code']===0x1f4){logger[_0xcc6f('0x13')](_0xcc6f('0x14'),_0x1dc938,_0x1cffc1[_0xcc6f('0x13')][_0xcc6f('0x15')]);return _0x7e93f9(_0x1cffc1['error']['message']);}logger[_0xcc6f('0x13')](_0xcc6f('0x14'),_0x1dc938,_0x1cffc1[_0xcc6f('0x13')][_0xcc6f('0x15')]);return _0x3af2b1(_0x1cffc1[_0xcc6f('0x13')][_0xcc6f('0x15')]);}else{logger[_0xcc6f('0x10')]('ChatApplication,\x20%s,\x20%s',_0x1dc938,_0xcc6f('0x11'));_0x3af2b1(_0x1cffc1['result'][_0xcc6f('0x15')]);}})[_0xcc6f('0x16')](function(_0x3a1e64){logger[_0xcc6f('0x13')](_0xcc6f('0x14'),_0x1dc938,_0x3a1e64);_0x7e93f9(_0x3a1e64);});});}
\ No newline at end of file
+var _0xd06f=['ChatApplication,\x20%s,\x20%s','request\x20sent','debug','ChatApplication,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','jayson/promise','client','info'];(function(_0x45bf86,_0x75586e){var _0x1f02b7=function(_0x1ea8a3){while(--_0x1ea8a3){_0x45bf86['push'](_0x45bf86['shift']());}};_0x1f02b7(++_0x75586e);}(_0xd06f,0x1a7));var _0xfd06=function(_0x1f0448,_0xa2865f){_0x1f0448=_0x1f0448-0x0;var _0x16fe78=_0xd06f[_0x1f0448];return _0x16fe78;};'use strict';var _=require('lodash');var util=require(_0xfd06('0x0'));var moment=require(_0xfd06('0x1'));var BPromise=require(_0xfd06('0x2'));var rs=require(_0xfd06('0x3'));var fs=require('fs');var Redis=require(_0xfd06('0x4'));var db=require(_0xfd06('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0xfd06('0x6'));var client=jayson[_0xfd06('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x495e4a,_0x48b73d,_0x36f177){return new BPromise(function(_0xdc0750,_0x5499ff){return client['request'](_0x495e4a,_0x36f177)['then'](function(_0x458b4a){logger[_0xfd06('0x8')](_0xfd06('0x9'),_0x48b73d,_0xfd06('0xa'));logger[_0xfd06('0xb')](_0xfd06('0xc'),_0x48b73d,'request\x20sent',JSON['stringify'](_0x458b4a));if(_0x458b4a[_0xfd06('0xd')]){if(_0x458b4a[_0xfd06('0xd')][_0xfd06('0xe')]===0x1f4){logger[_0xfd06('0xd')](_0xfd06('0x9'),_0x48b73d,_0x458b4a['error'][_0xfd06('0xf')]);return _0x5499ff(_0x458b4a[_0xfd06('0xd')][_0xfd06('0xf')]);}logger[_0xfd06('0xd')](_0xfd06('0x9'),_0x48b73d,_0x458b4a['error'][_0xfd06('0xf')]);return _0xdc0750(_0x458b4a[_0xfd06('0xd')][_0xfd06('0xf')]);}else{logger[_0xfd06('0x8')](_0xfd06('0x9'),_0x48b73d,_0xfd06('0xa'));_0xdc0750(_0x458b4a[_0xfd06('0x10')]['message']);}})[_0xfd06('0x11')](function(_0x191ac9){logger[_0xfd06('0xd')]('ChatApplication,\x20%s,\x20%s',_0x48b73d,_0x191ac9);_0x5499ff(_0x191ac9);});});}
\ No newline at end of file
diff --git a/server/api/chatApplication/index.js b/server/api/chatApplication/index.js
index 7d01e57..87b091d 100644
--- a/server/api/chatApplication/index.js
+++ b/server/api/chatApplication/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7d80=['update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','/:id','isAuthenticated','show','put'];(function(_0x31bab3,_0x44554f){var _0x4fd382=function(_0x42b336){while(--_0x42b336){_0x31bab3['push'](_0x31bab3['shift']());}};_0x4fd382(++_0x44554f);}(_0x7d80,0xa6));var _0x07d8=function(_0x6eecec,_0x5624a1){_0x6eecec=_0x6eecec-0x0;var _0x151d8d=_0x7d80[_0x6eecec];return _0x151d8d;};'use strict';var multer=require(_0x07d8('0x0'));var util=require(_0x07d8('0x1'));var path=require(_0x07d8('0x2'));var timeout=require(_0x07d8('0x3'));var express=require(_0x07d8('0x4'));var router=express[_0x07d8('0x5')]();var fs_extra=require(_0x07d8('0x6'));var auth=require(_0x07d8('0x7'));var interaction=require(_0x07d8('0x8'));var config=require(_0x07d8('0x9'));var controller=require('./chatApplication.controller');router['get'](_0x07d8('0xa'),auth[_0x07d8('0xb')](),controller[_0x07d8('0xc')]);router[_0x07d8('0xd')](_0x07d8('0xa'),auth[_0x07d8('0xb')](),controller[_0x07d8('0xe')]);router[_0x07d8('0xf')](_0x07d8('0xa'),auth['isAuthenticated'](),controller[_0x07d8('0x10')]);module[_0x07d8('0x11')]=router;
\ No newline at end of file
+var _0x2fe6=['../../components/auth/service','../../config/environment','get','/:id','isAuthenticated','put','update','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra'];(function(_0x18d916,_0x522ebd){var _0x21830e=function(_0x1ad5c2){while(--_0x1ad5c2){_0x18d916['push'](_0x18d916['shift']());}};_0x21830e(++_0x522ebd);}(_0x2fe6,0x1da));var _0x62fe=function(_0x58cb4f,_0x3fc4ee){_0x58cb4f=_0x58cb4f-0x0;var _0x4a52cc=_0x2fe6[_0x58cb4f];return _0x4a52cc;};'use strict';var multer=require('multer');var util=require(_0x62fe('0x0'));var path=require(_0x62fe('0x1'));var timeout=require(_0x62fe('0x2'));var express=require(_0x62fe('0x3'));var router=express[_0x62fe('0x4')]();var fs_extra=require(_0x62fe('0x5'));var auth=require(_0x62fe('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x62fe('0x7'));var controller=require('./chatApplication.controller');router[_0x62fe('0x8')](_0x62fe('0x9'),auth[_0x62fe('0xa')](),controller['show']);router[_0x62fe('0xb')](_0x62fe('0x9'),auth['isAuthenticated'](),controller[_0x62fe('0xc')]);router[_0x62fe('0xd')](_0x62fe('0x9'),auth[_0x62fe('0xa')](),controller[_0x62fe('0xe')]);module[_0x62fe('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.attributes.js b/server/api/chatGroup/chatGroup.attributes.js
index 12e98a5..fcaf9bd 100644
--- a/server/api/chatGroup/chatGroup.attributes.js
+++ b/server/api/chatGroup/chatGroup.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xcbe1=['exports','STRING','BOOLEAN','sequelize'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xcbe1,0xd7));var _0x1cbe=function(_0x2f57b2,_0xa8e91a){_0x2f57b2=_0x2f57b2-0x0;var _0x5ace77=_0xcbe1[_0x2f57b2];return _0x5ace77;};'use strict';var Sequelize=require(_0x1cbe('0x0'));module[_0x1cbe('0x1')]={'name':{'type':Sequelize[_0x1cbe('0x2')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'write':{'type':Sequelize[_0x1cbe('0x3')],'defaultValue':!![]}};
\ No newline at end of file
+var _0x9527=['STRING','exports'];(function(_0x143d26,_0x5dd1d6){var _0x130c43=function(_0x5323ec){while(--_0x5323ec){_0x143d26['push'](_0x143d26['shift']());}};_0x130c43(++_0x5dd1d6);}(_0x9527,0x135));var _0x7952=function(_0x823840,_0x27d075){_0x823840=_0x823840-0x0;var _0x547997=_0x9527[_0x823840];return _0x547997;};'use strict';var Sequelize=require('sequelize');module[_0x7952('0x0')]={'name':{'type':Sequelize[_0x7952('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x7952('0x1')]},'write':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}};
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.controller.js b/server/api/chatGroup/chatGroup.controller.js
index bb07580..b4eb556 100644
--- a/server/api/chatGroup/chatGroup.controller.js
+++ b/server/api/chatGroup/chatGroup.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x10bf=['../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','destroy','then','end','error','stack','name','send','index','map','ChatGroup','rawAttributes','fieldName','type','key','model','keys','query','attributes','intersection','fields','length','hasOwnProperty','sort','where','filters','pick','merge','VIRTUAL','filter','includeAll','catch','show','params','options','find','create','body','update','describe','getUnread','ChatInternalMessage','addMembers','ids','omit','getMembers','User','order','nolimit','removeMembers','addMessage','ChatGroupId','getMessages','findOne','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','fs-extra','lodash','squel','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/environment','../../config/license/util'];(function(_0x297c55,_0x34fa75){var _0x120389=function(_0x595108){while(--_0x595108){_0x297c55['push'](_0x297c55['shift']());}};_0x120389(++_0x34fa75);}(_0x10bf,0x171));var _0xf10b=function(_0x2442a8,_0x3e0d90){_0x2442a8=_0x2442a8-0x0;var _0x105340=_0x10bf[_0x2442a8];return _0x105340;};'use strict';var emlformat=require(_0xf10b('0x0'));var rimraf=require(_0xf10b('0x1'));var zipdir=require(_0xf10b('0x2'));var jsonpatch=require(_0xf10b('0x3'));var rp=require(_0xf10b('0x4'));var moment=require(_0xf10b('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xf10b('0x6'));var util=require(_0xf10b('0x7'));var path=require('path');var sox=require(_0xf10b('0x8'));var csv=require(_0xf10b('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xf10b('0xa'));var _=require(_0xf10b('0xb'));var squel=require(_0xf10b('0xc'));var crypto=require('crypto');var jsforce=require(_0xf10b('0xd'));var deskjs=require(_0xf10b('0xe'));var toCsv=require(_0xf10b('0x9'));var querystring=require(_0xf10b('0xf'));var Papa=require('papaparse');var Redis=require(_0xf10b('0x10'));var authService=require(_0xf10b('0x11'));var qs=require(_0xf10b('0x12'));var as=require(_0xf10b('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xf10b('0x14'))('api');var utils=require('../../config/utils');var config=require(_0xf10b('0x15'));var licenseUtil=require(_0xf10b('0x16'));var db=require(_0xf10b('0x17'))['db'];config[_0xf10b('0x18')]=_[_0xf10b('0x19')](config[_0xf10b('0x18')],{'host':_0xf10b('0x1a'),'port':0x18eb});var socket=require(_0xf10b('0x1b'))(new Redis(config['redis']));require('./chatGroup.socket')[_0xf10b('0x1c')](socket);function respondWithStatusCode(_0x6c41be,_0x412d8e){_0x412d8e=_0x412d8e||0xcc;return function(_0x269766){if(_0x269766){return _0x6c41be[_0xf10b('0x1d')](_0x412d8e);}return _0x6c41be['status'](_0x412d8e)['end']();};}function respondWithResult(_0x5241fc,_0x268c50){_0x268c50=_0x268c50||0xc8;return function(_0x4ff2d2){if(_0x4ff2d2){return _0x5241fc[_0xf10b('0x1e')](_0x268c50)[_0xf10b('0x1f')](_0x4ff2d2);}};}function respondWithFilteredResult(_0x2c2e38,_0x47b8e8){return function(_0x448169){if(_0x448169){var _0x56a00b=typeof _0x47b8e8[_0xf10b('0x20')]===_0xf10b('0x21')&&typeof _0x47b8e8['limit']===_0xf10b('0x21');var _0x139357=_0x448169[_0xf10b('0x22')];var _0x320bf0=_0x56a00b?0x0:_0x47b8e8[_0xf10b('0x20')];var _0x113e69=_0x56a00b?_0x448169[_0xf10b('0x22')]:_0x47b8e8[_0xf10b('0x20')]+_0x47b8e8[_0xf10b('0x23')];var _0x5d2778;if(_0x113e69>=_0x139357){_0x113e69=_0x139357;_0x5d2778=0xc8;}else{_0x5d2778=0xce;}_0x2c2e38['status'](_0x5d2778);return _0x2c2e38[_0xf10b('0x24')](_0xf10b('0x25'),_0x320bf0+'-'+_0x113e69+'/'+_0x139357)[_0xf10b('0x1f')](_0x448169);}return null;};}function patchUpdates(_0x5de37d){return function(_0x250e0d){try{jsonpatch[_0xf10b('0x26')](_0x250e0d,_0x5de37d,!![]);}catch(_0x1385f8){return BPromise[_0xf10b('0x27')](_0x1385f8);}return _0x250e0d[_0xf10b('0x28')]();};}function saveUpdates(_0x5b1885,_0x27edbe){return function(_0x3d26f1){if(_0x3d26f1){return _0x3d26f1['update'](_0x5b1885)['then'](function(_0x338a49){return _0x338a49;});}return null;};}function removeEntity(_0x2b0c4f,_0x505b6d){return function(_0x7644c0){if(_0x7644c0){return _0x7644c0[_0xf10b('0x29')]()[_0xf10b('0x2a')](function(){_0x2b0c4f[_0xf10b('0x1e')](0xcc)[_0xf10b('0x2b')]();});}};}function handleEntityNotFound(_0x197c5f,_0x521ee4){return function(_0xdf3146){if(!_0xdf3146){_0x197c5f[_0xf10b('0x1d')](0x194);}return _0xdf3146;};}function handleError(_0x3c1eac,_0x37a48d){_0x37a48d=_0x37a48d||0x1f4;return function(_0x570524){logger[_0xf10b('0x2c')](_0x570524[_0xf10b('0x2d')]);if(_0x570524['name']){delete _0x570524[_0xf10b('0x2e')];}_0x3c1eac['status'](_0x37a48d)[_0xf10b('0x2f')](_0x570524);};}exports[_0xf10b('0x30')]=function(_0x4068e9,_0x56616f){var _0xcf3016={},_0x1fef27={},_0x37dd86={'count':0x0,'rows':[]};var _0x79927f=_[_0xf10b('0x31')](db[_0xf10b('0x32')][_0xf10b('0x33')],function(_0x3a0ec3){return{'name':_0x3a0ec3[_0xf10b('0x34')],'type':_0x3a0ec3[_0xf10b('0x35')][_0xf10b('0x36')]};});_0x1fef27[_0xf10b('0x37')]=_[_0xf10b('0x31')](_0x79927f,_0xf10b('0x2e'));_0x1fef27['query']=_[_0xf10b('0x38')](_0x4068e9[_0xf10b('0x39')]);_0x1fef27['filters']=_['intersection'](_0x1fef27[_0xf10b('0x37')],_0x1fef27['query']);_0xcf3016[_0xf10b('0x3a')]=_[_0xf10b('0x3b')](_0x1fef27[_0xf10b('0x37')],qs['fields'](_0x4068e9[_0xf10b('0x39')][_0xf10b('0x3c')]));_0xcf3016[_0xf10b('0x3a')]=_0xcf3016[_0xf10b('0x3a')][_0xf10b('0x3d')]?_0xcf3016[_0xf10b('0x3a')]:_0x1fef27[_0xf10b('0x37')];if(!_0x4068e9[_0xf10b('0x39')][_0xf10b('0x3e')]('nolimit')){_0xcf3016['limit']=qs[_0xf10b('0x23')](_0x4068e9['query'][_0xf10b('0x23')]);_0xcf3016['offset']=qs[_0xf10b('0x20')](_0x4068e9[_0xf10b('0x39')]['offset']);}_0xcf3016['order']=qs[_0xf10b('0x3f')](_0x4068e9[_0xf10b('0x39')][_0xf10b('0x3f')]);_0xcf3016[_0xf10b('0x40')]=qs[_0xf10b('0x41')](_[_0xf10b('0x42')](_0x4068e9[_0xf10b('0x39')],_0x1fef27[_0xf10b('0x41')]),_0x79927f);if(_0x4068e9[_0xf10b('0x39')]['filter']){_0xcf3016[_0xf10b('0x40')]=_[_0xf10b('0x43')](_0xcf3016['where'],{'$or':_['map'](_0x79927f,function(_0x440de5){if(_0x440de5[_0xf10b('0x35')]!==_0xf10b('0x44')){var _0x1b67e0={};_0x1b67e0[_0x440de5[_0xf10b('0x2e')]]={'$like':'%'+_0x4068e9[_0xf10b('0x39')][_0xf10b('0x45')]+'%'};return _0x1b67e0;}})});}_0xcf3016=_[_0xf10b('0x43')]({},_0xcf3016,_0x4068e9['options']);var _0x3c6b44={'where':_0xcf3016[_0xf10b('0x40')]};return db[_0xf10b('0x32')]['count'](_0x3c6b44)['then'](function(_0x45065f){_0x37dd86['count']=_0x45065f;if(_0x4068e9[_0xf10b('0x39')][_0xf10b('0x46')]){_0xcf3016['include']=[{'all':!![]}];}return db['ChatGroup']['findAll'](_0xcf3016);})[_0xf10b('0x2a')](function(_0x1ba4cf){_0x37dd86['rows']=_0x1ba4cf;return _0x37dd86;})['then'](respondWithFilteredResult(_0x56616f,_0xcf3016))[_0xf10b('0x47')](handleError(_0x56616f,null));};exports[_0xf10b('0x48')]=function(_0x7b2ccf,_0x5cafd3){var _0x4dc548={'raw':!![],'where':{'id':_0x7b2ccf[_0xf10b('0x49')]['id']}},_0x383903={};_0x383903['model']=_['keys'](db[_0xf10b('0x32')][_0xf10b('0x33')]);_0x383903[_0xf10b('0x39')]=_[_0xf10b('0x38')](_0x7b2ccf[_0xf10b('0x39')]);_0x383903[_0xf10b('0x41')]=_[_0xf10b('0x3b')](_0x383903['model'],_0x383903[_0xf10b('0x39')]);_0x4dc548[_0xf10b('0x3a')]=_[_0xf10b('0x3b')](_0x383903[_0xf10b('0x37')],qs[_0xf10b('0x3c')](_0x7b2ccf[_0xf10b('0x39')][_0xf10b('0x3c')]));_0x4dc548['attributes']=_0x4dc548[_0xf10b('0x3a')][_0xf10b('0x3d')]?_0x4dc548[_0xf10b('0x3a')]:_0x383903[_0xf10b('0x37')];if(_0x7b2ccf[_0xf10b('0x39')][_0xf10b('0x46')]){_0x4dc548['include']=[{'all':!![]}];}_0x4dc548=_['merge']({},_0x4dc548,_0x7b2ccf[_0xf10b('0x4a')]);return db['ChatGroup'][_0xf10b('0x4b')](_0x4dc548)[_0xf10b('0x2a')](handleEntityNotFound(_0x5cafd3,null))[_0xf10b('0x2a')](respondWithResult(_0x5cafd3,null))[_0xf10b('0x47')](handleError(_0x5cafd3,null));};exports[_0xf10b('0x4c')]=function(_0xc64a79,_0x3f9049){return db[_0xf10b('0x32')][_0xf10b('0x4c')](_0xc64a79[_0xf10b('0x4d')],{})['then'](respondWithResult(_0x3f9049,0xc9))['catch'](handleError(_0x3f9049,null));};exports[_0xf10b('0x4e')]=function(_0x29ff9b,_0x56fd22){if(_0x29ff9b[_0xf10b('0x4d')]['id']){delete _0x29ff9b[_0xf10b('0x4d')]['id'];}return db[_0xf10b('0x32')][_0xf10b('0x4b')]({'where':{'id':_0x29ff9b[_0xf10b('0x49')]['id']}})[_0xf10b('0x2a')](handleEntityNotFound(_0x56fd22,null))[_0xf10b('0x2a')](saveUpdates(_0x29ff9b[_0xf10b('0x4d')],null))[_0xf10b('0x2a')](respondWithResult(_0x56fd22,null))[_0xf10b('0x47')](handleError(_0x56fd22,null));};exports[_0xf10b('0x29')]=function(_0x36608f,_0x5a387a){return db[_0xf10b('0x32')][_0xf10b('0x4b')]({'where':{'id':_0x36608f[_0xf10b('0x49')]['id']}})[_0xf10b('0x2a')](handleEntityNotFound(_0x5a387a,null))[_0xf10b('0x2a')](removeEntity(_0x5a387a,null))['catch'](handleError(_0x5a387a,null));};exports[_0xf10b('0x4f')]=function(_0x17fdd8,_0x4931e5){return db[_0xf10b('0x32')][_0xf10b('0x4f')]()[_0xf10b('0x2a')](respondWithResult(_0x4931e5,null))[_0xf10b('0x47')](handleError(_0x4931e5,null));};exports[_0xf10b('0x50')]=function(_0x159f7b,_0x386066,_0x23e3fc){return db[_0xf10b('0x51')][_0xf10b('0x22')]({'where':{'ChatGroupId':_0x159f7b[_0xf10b('0x49')]['id'],'ToId':_0x159f7b['user']['id'],'read':![]}})[_0xf10b('0x2a')](function(_0xf28ac5){return{'id':_['toInteger'](_0x159f7b[_0xf10b('0x49')]['id']),'count':_0xf28ac5};})[_0xf10b('0x2a')](respondWithResult(_0x386066,null))[_0xf10b('0x47')](handleError(_0x386066,null));};exports[_0xf10b('0x52')]=function(_0x560b24,_0x309fd7,_0x31538e){return db[_0xf10b('0x32')]['find']({'where':{'id':_0x560b24[_0xf10b('0x49')]['id']}})[_0xf10b('0x2a')](handleEntityNotFound(_0x309fd7,null))[_0xf10b('0x2a')](function(_0x330e7f){if(_0x330e7f){return _0x330e7f[_0xf10b('0x52')](_0x560b24['body'][_0xf10b('0x53')],_[_0xf10b('0x54')](_0x560b24['body'],[_0xf10b('0x53'),'id'])||{});}})[_0xf10b('0x2a')](respondWithResult(_0x309fd7,null))['catch'](handleError(_0x309fd7,null));};exports[_0xf10b('0x55')]=function(_0x55bed7,_0x3822a4,_0x3fed7d){var _0x40226e={};var _0x24cd90={};var _0x3dc34c;var _0x416e59;return db[_0xf10b('0x32')]['findOne']({'where':{'id':_0x55bed7[_0xf10b('0x49')]['id']}})['then'](handleEntityNotFound(_0x3822a4,null))[_0xf10b('0x2a')](function(_0x11b583){if(_0x11b583){_0x3dc34c=_0x11b583;_0x24cd90['model']=_[_0xf10b('0x38')](db[_0xf10b('0x56')][_0xf10b('0x33')]);_0x24cd90['query']=_['keys'](_0x55bed7[_0xf10b('0x39')]);_0x24cd90['filters']=_['intersection'](_0x24cd90[_0xf10b('0x37')],_0x24cd90['query']);_0x40226e[_0xf10b('0x3a')]=_[_0xf10b('0x3b')](_0x24cd90['model'],qs['fields'](_0x55bed7['query'][_0xf10b('0x3c')]));_0x40226e[_0xf10b('0x3a')]=_0x40226e[_0xf10b('0x3a')]['length']?_0x40226e[_0xf10b('0x3a')]:_0x24cd90[_0xf10b('0x37')];_0x40226e[_0xf10b('0x57')]=qs[_0xf10b('0x3f')](_0x55bed7[_0xf10b('0x39')]['sort']);_0x40226e[_0xf10b('0x40')]=qs['filters'](_['pick'](_0x55bed7[_0xf10b('0x39')],_0x24cd90[_0xf10b('0x41')]));if(_0x55bed7['query'][_0xf10b('0x45')]){_0x40226e[_0xf10b('0x40')]=_[_0xf10b('0x43')](_0x40226e[_0xf10b('0x40')],{'$or':_[_0xf10b('0x31')](_0x40226e[_0xf10b('0x3a')],function(_0x306edf){var _0x3d8eea={};_0x3d8eea[_0x306edf]={'$like':'%'+_0x55bed7['query'][_0xf10b('0x45')]+'%'};return _0x3d8eea;})});}_0x40226e=_['merge']({},_0x40226e,_0x55bed7['options']);return _0x3dc34c[_0xf10b('0x55')](_0x40226e);}})[_0xf10b('0x2a')](function(_0x42e262){if(_0x42e262){_0x416e59=_0x42e262[_0xf10b('0x3d')];if(!_0x55bed7[_0xf10b('0x39')]['hasOwnProperty'](_0xf10b('0x58'))){_0x40226e[_0xf10b('0x23')]=qs[_0xf10b('0x23')](_0x55bed7['query'][_0xf10b('0x23')]);_0x40226e[_0xf10b('0x20')]=qs[_0xf10b('0x20')](_0x55bed7[_0xf10b('0x39')][_0xf10b('0x20')]);}return _0x3dc34c[_0xf10b('0x55')](_0x40226e);}})[_0xf10b('0x2a')](function(_0x4218b1){if(_0x4218b1){return _0x4218b1?{'count':_0x416e59,'rows':_0x4218b1}:null;}})[_0xf10b('0x2a')](respondWithResult(_0x3822a4,null))[_0xf10b('0x47')](handleError(_0x3822a4,null));};exports[_0xf10b('0x59')]=function(_0x7cc9c9,_0x2cf80a,_0x580671){return db['ChatGroup'][_0xf10b('0x4b')]({'where':{'id':_0x7cc9c9['params']['id']}})[_0xf10b('0x2a')](handleEntityNotFound(_0x2cf80a,null))[_0xf10b('0x2a')](function(_0x14a3c8){if(_0x14a3c8){return _0x14a3c8[_0xf10b('0x59')](_0x7cc9c9[_0xf10b('0x39')][_0xf10b('0x53')]);}})[_0xf10b('0x2a')](respondWithStatusCode(_0x2cf80a,null))['catch'](handleError(_0x2cf80a,null));};exports[_0xf10b('0x5a')]=function(_0x46d1c8,_0x1534d8,_0x7e1fc8){if(_0x46d1c8[_0xf10b('0x4d')]['id']){delete _0x46d1c8[_0xf10b('0x4d')]['id'];}return db['ChatGroup'][_0xf10b('0x4b')]({'where':{'id':_0x46d1c8['params']['id']}})[_0xf10b('0x2a')](handleEntityNotFound(_0x1534d8,null))[_0xf10b('0x2a')](function(_0x30f4b4){if(_0x30f4b4){_0x46d1c8[_0xf10b('0x4d')][_0xf10b('0x5b')]=_0x30f4b4['id'];return db[_0xf10b('0x51')][_0xf10b('0x4c')](_0x46d1c8['body']);}})[_0xf10b('0x2a')](respondWithResult(_0x1534d8,null))[_0xf10b('0x47')](handleError(_0x1534d8,null));};exports[_0xf10b('0x5c')]=function(_0x29112e,_0x43a4ff,_0x5ee753){var _0x436cd7={};var _0x46fb8b={};var _0x59cd56;var _0x177995;return db['ChatGroup'][_0xf10b('0x5d')]({'where':{'id':_0x29112e[_0xf10b('0x49')]['id']}})['then'](handleEntityNotFound(_0x43a4ff,null))[_0xf10b('0x2a')](function(_0x3cb08c){if(_0x3cb08c){_0x59cd56=_0x3cb08c;_0x46fb8b['model']=_[_0xf10b('0x38')](db['ChatInternalMessage'][_0xf10b('0x33')]);_0x46fb8b[_0xf10b('0x39')]=_[_0xf10b('0x38')](_0x29112e[_0xf10b('0x39')]);_0x46fb8b[_0xf10b('0x41')]=_[_0xf10b('0x3b')](_0x46fb8b[_0xf10b('0x37')],_0x46fb8b[_0xf10b('0x39')]);_0x436cd7[_0xf10b('0x3a')]=_[_0xf10b('0x3b')](_0x46fb8b['model'],qs[_0xf10b('0x3c')](_0x29112e['query']['fields']));_0x436cd7[_0xf10b('0x3a')]=_0x436cd7[_0xf10b('0x3a')]['length']?_0x436cd7[_0xf10b('0x3a')]:_0x46fb8b['model'];_0x436cd7[_0xf10b('0x57')]=qs[_0xf10b('0x3f')](_0x29112e[_0xf10b('0x39')][_0xf10b('0x3f')]);_0x436cd7[_0xf10b('0x40')]=qs[_0xf10b('0x41')](_['pick'](_0x29112e[_0xf10b('0x39')],_0x46fb8b['filters']));if(_0x29112e[_0xf10b('0x39')][_0xf10b('0x45')]){_0x436cd7[_0xf10b('0x40')]=_['merge'](_0x436cd7[_0xf10b('0x40')],{'$or':_[_0xf10b('0x31')](_0x436cd7[_0xf10b('0x3a')],function(_0x21096a){var _0x55af28={};_0x55af28[_0x21096a]={'$like':'%'+_0x29112e['query']['filter']+'%'};return _0x55af28;})});}if(_0x29112e['query']['$gte']){var _0x3fa761=_0x29112e[_0xf10b('0x39')][_0xf10b('0x5e')][_0xf10b('0x5f')](',');var _0x3011e0={};_0x3011e0[_0x3fa761[0x0]]={'$gte':moment(_0x3fa761[0x1])[_0xf10b('0x60')](_0xf10b('0x61'))};_0x436cd7[_0xf10b('0x40')]=_['merge'](_0x436cd7[_0xf10b('0x40')],_0x3011e0);}_0x436cd7=_['merge']({},_0x436cd7,_0x29112e[_0xf10b('0x4a')]);return _0x59cd56['getMessages'](_0x436cd7);}})[_0xf10b('0x2a')](function(_0x524e3a){if(_0x524e3a){_0x177995=_0x524e3a[_0xf10b('0x3d')];if(!_0x29112e['query'][_0xf10b('0x3e')]('nolimit')){_0x436cd7[_0xf10b('0x23')]=qs[_0xf10b('0x23')](_0x29112e[_0xf10b('0x39')][_0xf10b('0x23')]);_0x436cd7['offset']=qs[_0xf10b('0x20')](_0x29112e['query'][_0xf10b('0x20')]);}return _0x59cd56[_0xf10b('0x5c')](_0x436cd7);}})[_0xf10b('0x2a')](function(_0x18ce74){if(_0x18ce74){return _0x18ce74?{'count':_0x177995,'rows':_0x18ce74}:null;}})[_0xf10b('0x2a')](respondWithResult(_0x43a4ff,null))['catch'](handleError(_0x43a4ff,null));};
\ No newline at end of file
+var _0xcd6c=['findAll','rows','catch','show','params','find','create','body','describe','getUnread','user','toInteger','addMembers','ids','omit','User','hasOwnProperty','getMembers','removeMembers','addMessage','ChatGroupId','ChatInternalMessage','getMessages','findOne','$gte','format','YYYY-MM-DD\x20HH:mm:ss','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','redis','defaults','localhost','socket.io-emitter','register','end','offset','undefined','count','limit','status','set','json','apply','reject','update','then','destroy','sendStatus','error','name','send','index','map','ChatGroup','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include'];(function(_0x1c83c9,_0x2a0efc){var _0x49c840=function(_0x2945e2){while(--_0x2945e2){_0x1c83c9['push'](_0x1c83c9['shift']());}};_0x49c840(++_0x2a0efc);}(_0xcd6c,0x1a3));var _0xccd6=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xcd6c[_0x321bb2];return _0x9c12ed;};'use strict';var emlformat=require(_0xccd6('0x0'));var rimraf=require(_0xccd6('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xccd6('0x2'));var rp=require(_0xccd6('0x3'));var moment=require(_0xccd6('0x4'));var BPromise=require(_0xccd6('0x5'));var Mustache=require('mustache');var util=require(_0xccd6('0x6'));var path=require('path');var sox=require(_0xccd6('0x7'));var csv=require(_0xccd6('0x8'));var ejs=require(_0xccd6('0x9'));var fs=require('fs');var fs_extra=require(_0xccd6('0xa'));var _=require(_0xccd6('0xb'));var squel=require(_0xccd6('0xc'));var crypto=require(_0xccd6('0xd'));var jsforce=require('jsforce');var deskjs=require(_0xccd6('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xccd6('0xf'));var Redis=require(_0xccd6('0x10'));var authService=require(_0xccd6('0x11'));var qs=require(_0xccd6('0x12'));var as=require(_0xccd6('0x13'));var hardwareService=require(_0xccd6('0x14'));var logger=require(_0xccd6('0x15'))('api');var utils=require(_0xccd6('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0xccd6('0x17'));var db=require('../../mysqldb')['db'];config[_0xccd6('0x18')]=_[_0xccd6('0x19')](config[_0xccd6('0x18')],{'host':_0xccd6('0x1a'),'port':0x18eb});var socket=require(_0xccd6('0x1b'))(new Redis(config[_0xccd6('0x18')]));require('./chatGroup.socket')[_0xccd6('0x1c')](socket);function respondWithStatusCode(_0xcc0481,_0x1ae6c9){_0x1ae6c9=_0x1ae6c9||0xcc;return function(_0xd97318){if(_0xd97318){return _0xcc0481['sendStatus'](_0x1ae6c9);}return _0xcc0481['status'](_0x1ae6c9)[_0xccd6('0x1d')]();};}function respondWithResult(_0x4b6ef3,_0x301fcc){_0x301fcc=_0x301fcc||0xc8;return function(_0x1be952){if(_0x1be952){return _0x4b6ef3['status'](_0x301fcc)['json'](_0x1be952);}};}function respondWithFilteredResult(_0x70cbd9,_0x461ef9){return function(_0x2be871){if(_0x2be871){var _0x2d90a9=typeof _0x461ef9[_0xccd6('0x1e')]===_0xccd6('0x1f')&&typeof _0x461ef9['limit']===_0xccd6('0x1f');var _0x873b40=_0x2be871[_0xccd6('0x20')];var _0x37b1fd=_0x2d90a9?0x0:_0x461ef9[_0xccd6('0x1e')];var _0x323739=_0x2d90a9?_0x2be871[_0xccd6('0x20')]:_0x461ef9[_0xccd6('0x1e')]+_0x461ef9[_0xccd6('0x21')];var _0x41c028;if(_0x323739>=_0x873b40){_0x323739=_0x873b40;_0x41c028=0xc8;}else{_0x41c028=0xce;}_0x70cbd9[_0xccd6('0x22')](_0x41c028);return _0x70cbd9[_0xccd6('0x23')]('Content-Range',_0x37b1fd+'-'+_0x323739+'/'+_0x873b40)[_0xccd6('0x24')](_0x2be871);}return null;};}function patchUpdates(_0x2becee){return function(_0x51fe96){try{jsonpatch[_0xccd6('0x25')](_0x51fe96,_0x2becee,!![]);}catch(_0x371c60){return BPromise[_0xccd6('0x26')](_0x371c60);}return _0x51fe96['save']();};}function saveUpdates(_0x52a31d,_0x50a050){return function(_0x586e29){if(_0x586e29){return _0x586e29[_0xccd6('0x27')](_0x52a31d)[_0xccd6('0x28')](function(_0x476e92){return _0x476e92;});}return null;};}function removeEntity(_0x11b65d,_0x19e94b){return function(_0x5d4756){if(_0x5d4756){return _0x5d4756[_0xccd6('0x29')]()[_0xccd6('0x28')](function(){_0x11b65d['status'](0xcc)[_0xccd6('0x1d')]();});}};}function handleEntityNotFound(_0x2b08bd,_0x4d337c){return function(_0xbbb75f){if(!_0xbbb75f){_0x2b08bd[_0xccd6('0x2a')](0x194);}return _0xbbb75f;};}function handleError(_0x13f690,_0x10e5ae){_0x10e5ae=_0x10e5ae||0x1f4;return function(_0x2f558e){logger[_0xccd6('0x2b')](_0x2f558e['stack']);if(_0x2f558e['name']){delete _0x2f558e[_0xccd6('0x2c')];}_0x13f690[_0xccd6('0x22')](_0x10e5ae)[_0xccd6('0x2d')](_0x2f558e);};}exports[_0xccd6('0x2e')]=function(_0x30c69a,_0x48d2a7){var _0x3b4dcb={},_0x3b4905={},_0x25c249={'count':0x0,'rows':[]};var _0x18e0ea=_[_0xccd6('0x2f')](db[_0xccd6('0x30')][_0xccd6('0x31')],function(_0x3a2518){return{'name':_0x3a2518[_0xccd6('0x32')],'type':_0x3a2518[_0xccd6('0x33')][_0xccd6('0x34')]};});_0x3b4905[_0xccd6('0x35')]=_[_0xccd6('0x2f')](_0x18e0ea,_0xccd6('0x2c'));_0x3b4905[_0xccd6('0x36')]=_[_0xccd6('0x37')](_0x30c69a[_0xccd6('0x36')]);_0x3b4905[_0xccd6('0x38')]=_[_0xccd6('0x39')](_0x3b4905['model'],_0x3b4905[_0xccd6('0x36')]);_0x3b4dcb[_0xccd6('0x3a')]=_[_0xccd6('0x39')](_0x3b4905[_0xccd6('0x35')],qs[_0xccd6('0x3b')](_0x30c69a[_0xccd6('0x36')][_0xccd6('0x3b')]));_0x3b4dcb[_0xccd6('0x3a')]=_0x3b4dcb['attributes'][_0xccd6('0x3c')]?_0x3b4dcb[_0xccd6('0x3a')]:_0x3b4905['model'];if(!_0x30c69a[_0xccd6('0x36')]['hasOwnProperty'](_0xccd6('0x3d'))){_0x3b4dcb[_0xccd6('0x21')]=qs[_0xccd6('0x21')](_0x30c69a[_0xccd6('0x36')]['limit']);_0x3b4dcb[_0xccd6('0x1e')]=qs[_0xccd6('0x1e')](_0x30c69a[_0xccd6('0x36')][_0xccd6('0x1e')]);}_0x3b4dcb['order']=qs[_0xccd6('0x3e')](_0x30c69a[_0xccd6('0x36')]['sort']);_0x3b4dcb[_0xccd6('0x3f')]=qs[_0xccd6('0x38')](_[_0xccd6('0x40')](_0x30c69a['query'],_0x3b4905[_0xccd6('0x38')]),_0x18e0ea);if(_0x30c69a[_0xccd6('0x36')][_0xccd6('0x41')]){_0x3b4dcb[_0xccd6('0x3f')]=_[_0xccd6('0x42')](_0x3b4dcb['where'],{'$or':_[_0xccd6('0x2f')](_0x18e0ea,function(_0x4f1a1b){if(_0x4f1a1b[_0xccd6('0x33')]!==_0xccd6('0x43')){var _0x22fbd1={};_0x22fbd1[_0x4f1a1b['name']]={'$like':'%'+_0x30c69a['query'][_0xccd6('0x41')]+'%'};return _0x22fbd1;}})});}_0x3b4dcb=_[_0xccd6('0x42')]({},_0x3b4dcb,_0x30c69a[_0xccd6('0x44')]);var _0x4da0d1={'where':_0x3b4dcb[_0xccd6('0x3f')]};return db[_0xccd6('0x30')][_0xccd6('0x20')](_0x4da0d1)['then'](function(_0x14f5d7){_0x25c249[_0xccd6('0x20')]=_0x14f5d7;if(_0x30c69a['query'][_0xccd6('0x45')]){_0x3b4dcb[_0xccd6('0x46')]=[{'all':!![]}];}return db[_0xccd6('0x30')][_0xccd6('0x47')](_0x3b4dcb);})[_0xccd6('0x28')](function(_0x153a38){_0x25c249[_0xccd6('0x48')]=_0x153a38;return _0x25c249;})[_0xccd6('0x28')](respondWithFilteredResult(_0x48d2a7,_0x3b4dcb))[_0xccd6('0x49')](handleError(_0x48d2a7,null));};exports[_0xccd6('0x4a')]=function(_0x2d28cd,_0x4fa307){var _0x175a20={'raw':!![],'where':{'id':_0x2d28cd[_0xccd6('0x4b')]['id']}},_0xe7717e={};_0xe7717e[_0xccd6('0x35')]=_[_0xccd6('0x37')](db[_0xccd6('0x30')]['rawAttributes']);_0xe7717e['query']=_[_0xccd6('0x37')](_0x2d28cd[_0xccd6('0x36')]);_0xe7717e['filters']=_[_0xccd6('0x39')](_0xe7717e['model'],_0xe7717e[_0xccd6('0x36')]);_0x175a20['attributes']=_['intersection'](_0xe7717e[_0xccd6('0x35')],qs['fields'](_0x2d28cd[_0xccd6('0x36')][_0xccd6('0x3b')]));_0x175a20['attributes']=_0x175a20['attributes'][_0xccd6('0x3c')]?_0x175a20[_0xccd6('0x3a')]:_0xe7717e[_0xccd6('0x35')];if(_0x2d28cd['query'][_0xccd6('0x45')]){_0x175a20[_0xccd6('0x46')]=[{'all':!![]}];}_0x175a20=_[_0xccd6('0x42')]({},_0x175a20,_0x2d28cd[_0xccd6('0x44')]);return db[_0xccd6('0x30')][_0xccd6('0x4c')](_0x175a20)[_0xccd6('0x28')](handleEntityNotFound(_0x4fa307,null))[_0xccd6('0x28')](respondWithResult(_0x4fa307,null))[_0xccd6('0x49')](handleError(_0x4fa307,null));};exports[_0xccd6('0x4d')]=function(_0x2c34d5,_0x5312c5){return db['ChatGroup'][_0xccd6('0x4d')](_0x2c34d5[_0xccd6('0x4e')],{})['then'](respondWithResult(_0x5312c5,0xc9))[_0xccd6('0x49')](handleError(_0x5312c5,null));};exports[_0xccd6('0x27')]=function(_0x549ce4,_0x344baa){if(_0x549ce4[_0xccd6('0x4e')]['id']){delete _0x549ce4[_0xccd6('0x4e')]['id'];}return db[_0xccd6('0x30')][_0xccd6('0x4c')]({'where':{'id':_0x549ce4[_0xccd6('0x4b')]['id']}})['then'](handleEntityNotFound(_0x344baa,null))[_0xccd6('0x28')](saveUpdates(_0x549ce4[_0xccd6('0x4e')],null))[_0xccd6('0x28')](respondWithResult(_0x344baa,null))[_0xccd6('0x49')](handleError(_0x344baa,null));};exports[_0xccd6('0x29')]=function(_0x85bb6b,_0x145ebb){return db[_0xccd6('0x30')][_0xccd6('0x4c')]({'where':{'id':_0x85bb6b[_0xccd6('0x4b')]['id']}})[_0xccd6('0x28')](handleEntityNotFound(_0x145ebb,null))[_0xccd6('0x28')](removeEntity(_0x145ebb,null))[_0xccd6('0x49')](handleError(_0x145ebb,null));};exports[_0xccd6('0x4f')]=function(_0x607cff,_0x5b0d09){return db[_0xccd6('0x30')][_0xccd6('0x4f')]()['then'](respondWithResult(_0x5b0d09,null))[_0xccd6('0x49')](handleError(_0x5b0d09,null));};exports[_0xccd6('0x50')]=function(_0x456dbd,_0x42ce86,_0x299c8b){return db['ChatInternalMessage'][_0xccd6('0x20')]({'where':{'ChatGroupId':_0x456dbd['params']['id'],'ToId':_0x456dbd[_0xccd6('0x51')]['id'],'read':![]}})[_0xccd6('0x28')](function(_0x4af618){return{'id':_[_0xccd6('0x52')](_0x456dbd[_0xccd6('0x4b')]['id']),'count':_0x4af618};})[_0xccd6('0x28')](respondWithResult(_0x42ce86,null))[_0xccd6('0x49')](handleError(_0x42ce86,null));};exports[_0xccd6('0x53')]=function(_0x32624e,_0x2983af,_0xb4c245){return db[_0xccd6('0x30')][_0xccd6('0x4c')]({'where':{'id':_0x32624e[_0xccd6('0x4b')]['id']}})[_0xccd6('0x28')](handleEntityNotFound(_0x2983af,null))[_0xccd6('0x28')](function(_0x3819b0){if(_0x3819b0){return _0x3819b0[_0xccd6('0x53')](_0x32624e[_0xccd6('0x4e')][_0xccd6('0x54')],_[_0xccd6('0x55')](_0x32624e[_0xccd6('0x4e')],['ids','id'])||{});}})[_0xccd6('0x28')](respondWithResult(_0x2983af,null))['catch'](handleError(_0x2983af,null));};exports['getMembers']=function(_0x25e482,_0x13bacb,_0x4074a4){var _0x3f2d1d={};var _0x12fe45={};var _0xeb4141;var _0x4f5712;return db[_0xccd6('0x30')]['findOne']({'where':{'id':_0x25e482[_0xccd6('0x4b')]['id']}})[_0xccd6('0x28')](handleEntityNotFound(_0x13bacb,null))[_0xccd6('0x28')](function(_0x8ca994){if(_0x8ca994){_0xeb4141=_0x8ca994;_0x12fe45['model']=_[_0xccd6('0x37')](db[_0xccd6('0x56')][_0xccd6('0x31')]);_0x12fe45[_0xccd6('0x36')]=_['keys'](_0x25e482[_0xccd6('0x36')]);_0x12fe45['filters']=_[_0xccd6('0x39')](_0x12fe45['model'],_0x12fe45[_0xccd6('0x36')]);_0x3f2d1d[_0xccd6('0x3a')]=_[_0xccd6('0x39')](_0x12fe45[_0xccd6('0x35')],qs['fields'](_0x25e482[_0xccd6('0x36')]['fields']));_0x3f2d1d[_0xccd6('0x3a')]=_0x3f2d1d['attributes']['length']?_0x3f2d1d[_0xccd6('0x3a')]:_0x12fe45[_0xccd6('0x35')];_0x3f2d1d['order']=qs[_0xccd6('0x3e')](_0x25e482[_0xccd6('0x36')][_0xccd6('0x3e')]);_0x3f2d1d[_0xccd6('0x3f')]=qs[_0xccd6('0x38')](_[_0xccd6('0x40')](_0x25e482[_0xccd6('0x36')],_0x12fe45[_0xccd6('0x38')]));if(_0x25e482['query'][_0xccd6('0x41')]){_0x3f2d1d['where']=_[_0xccd6('0x42')](_0x3f2d1d[_0xccd6('0x3f')],{'$or':_[_0xccd6('0x2f')](_0x3f2d1d['attributes'],function(_0x16096f){var _0x1b9bb6={};_0x1b9bb6[_0x16096f]={'$like':'%'+_0x25e482[_0xccd6('0x36')][_0xccd6('0x41')]+'%'};return _0x1b9bb6;})});}_0x3f2d1d=_[_0xccd6('0x42')]({},_0x3f2d1d,_0x25e482['options']);return _0xeb4141['getMembers'](_0x3f2d1d);}})[_0xccd6('0x28')](function(_0x40121c){if(_0x40121c){_0x4f5712=_0x40121c[_0xccd6('0x3c')];if(!_0x25e482[_0xccd6('0x36')][_0xccd6('0x57')](_0xccd6('0x3d'))){_0x3f2d1d[_0xccd6('0x21')]=qs[_0xccd6('0x21')](_0x25e482[_0xccd6('0x36')]['limit']);_0x3f2d1d[_0xccd6('0x1e')]=qs[_0xccd6('0x1e')](_0x25e482[_0xccd6('0x36')]['offset']);}return _0xeb4141[_0xccd6('0x58')](_0x3f2d1d);}})[_0xccd6('0x28')](function(_0x34ed7f){if(_0x34ed7f){return _0x34ed7f?{'count':_0x4f5712,'rows':_0x34ed7f}:null;}})['then'](respondWithResult(_0x13bacb,null))[_0xccd6('0x49')](handleError(_0x13bacb,null));};exports[_0xccd6('0x59')]=function(_0x59cebb,_0x3dc14a,_0x24f2fb){return db['ChatGroup']['find']({'where':{'id':_0x59cebb[_0xccd6('0x4b')]['id']}})[_0xccd6('0x28')](handleEntityNotFound(_0x3dc14a,null))[_0xccd6('0x28')](function(_0x126cca){if(_0x126cca){return _0x126cca[_0xccd6('0x59')](_0x59cebb[_0xccd6('0x36')][_0xccd6('0x54')]);}})[_0xccd6('0x28')](respondWithStatusCode(_0x3dc14a,null))[_0xccd6('0x49')](handleError(_0x3dc14a,null));};exports[_0xccd6('0x5a')]=function(_0x2a0890,_0xb5cafe,_0xa2e4ef){if(_0x2a0890['body']['id']){delete _0x2a0890[_0xccd6('0x4e')]['id'];}return db[_0xccd6('0x30')][_0xccd6('0x4c')]({'where':{'id':_0x2a0890[_0xccd6('0x4b')]['id']}})[_0xccd6('0x28')](handleEntityNotFound(_0xb5cafe,null))['then'](function(_0x5f5adc){if(_0x5f5adc){_0x2a0890[_0xccd6('0x4e')][_0xccd6('0x5b')]=_0x5f5adc['id'];return db[_0xccd6('0x5c')]['create'](_0x2a0890['body']);}})[_0xccd6('0x28')](respondWithResult(_0xb5cafe,null))[_0xccd6('0x49')](handleError(_0xb5cafe,null));};exports[_0xccd6('0x5d')]=function(_0x4d1175,_0x58523d,_0x4cd571){var _0x2646e4={};var _0x2d131e={};var _0x4a999c;var _0x5373ac;return db[_0xccd6('0x30')][_0xccd6('0x5e')]({'where':{'id':_0x4d1175[_0xccd6('0x4b')]['id']}})['then'](handleEntityNotFound(_0x58523d,null))['then'](function(_0x43a525){if(_0x43a525){_0x4a999c=_0x43a525;_0x2d131e[_0xccd6('0x35')]=_['keys'](db[_0xccd6('0x5c')][_0xccd6('0x31')]);_0x2d131e[_0xccd6('0x36')]=_[_0xccd6('0x37')](_0x4d1175[_0xccd6('0x36')]);_0x2d131e[_0xccd6('0x38')]=_['intersection'](_0x2d131e[_0xccd6('0x35')],_0x2d131e[_0xccd6('0x36')]);_0x2646e4['attributes']=_[_0xccd6('0x39')](_0x2d131e[_0xccd6('0x35')],qs[_0xccd6('0x3b')](_0x4d1175[_0xccd6('0x36')]['fields']));_0x2646e4[_0xccd6('0x3a')]=_0x2646e4[_0xccd6('0x3a')][_0xccd6('0x3c')]?_0x2646e4['attributes']:_0x2d131e[_0xccd6('0x35')];_0x2646e4['order']=qs[_0xccd6('0x3e')](_0x4d1175[_0xccd6('0x36')]['sort']);_0x2646e4[_0xccd6('0x3f')]=qs[_0xccd6('0x38')](_[_0xccd6('0x40')](_0x4d1175['query'],_0x2d131e[_0xccd6('0x38')]));if(_0x4d1175[_0xccd6('0x36')][_0xccd6('0x41')]){_0x2646e4[_0xccd6('0x3f')]=_['merge'](_0x2646e4['where'],{'$or':_[_0xccd6('0x2f')](_0x2646e4[_0xccd6('0x3a')],function(_0x2e37da){var _0x531318={};_0x531318[_0x2e37da]={'$like':'%'+_0x4d1175['query'][_0xccd6('0x41')]+'%'};return _0x531318;})});}if(_0x4d1175[_0xccd6('0x36')][_0xccd6('0x5f')]){var _0x3a3889=_0x4d1175[_0xccd6('0x36')]['$gte']['split'](',');var _0x57be95={};_0x57be95[_0x3a3889[0x0]]={'$gte':moment(_0x3a3889[0x1])[_0xccd6('0x60')](_0xccd6('0x61'))};_0x2646e4[_0xccd6('0x3f')]=_[_0xccd6('0x42')](_0x2646e4[_0xccd6('0x3f')],_0x57be95);}_0x2646e4=_[_0xccd6('0x42')]({},_0x2646e4,_0x4d1175[_0xccd6('0x44')]);return _0x4a999c[_0xccd6('0x5d')](_0x2646e4);}})['then'](function(_0x43fdec){if(_0x43fdec){_0x5373ac=_0x43fdec['length'];if(!_0x4d1175['query'][_0xccd6('0x57')]('nolimit')){_0x2646e4[_0xccd6('0x21')]=qs['limit'](_0x4d1175[_0xccd6('0x36')][_0xccd6('0x21')]);_0x2646e4['offset']=qs[_0xccd6('0x1e')](_0x4d1175[_0xccd6('0x36')][_0xccd6('0x1e')]);}return _0x4a999c[_0xccd6('0x5d')](_0x2646e4);}})[_0xccd6('0x28')](function(_0x3cd44f){if(_0x3cd44f){return _0x3cd44f?{'count':_0x5373ac,'rows':_0x3cd44f}:null;}})[_0xccd6('0x28')](respondWithResult(_0x58523d,null))[_0xccd6('0x49')](handleError(_0x58523d,null));};
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.events.js b/server/api/chatGroup/chatGroup.events.js
index 71c554b..c2fd793 100644
--- a/server/api/chatGroup/chatGroup.events.js
+++ b/server/api/chatGroup/chatGroup.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd758=['exports','events','../../mysqldb','ChatGroup','setMaxListeners','save','emit','hasOwnProperty','hook'];(function(_0x4953da,_0x5adaca){var _0x2d3780=function(_0x458f36){while(--_0x458f36){_0x4953da['push'](_0x4953da['shift']());}};_0x2d3780(++_0x5adaca);}(_0xd758,0x172));var _0x8d75=function(_0x2bc024,_0xf121dc){_0x2bc024=_0x2bc024-0x0;var _0x56f871=_0xd758[_0x2bc024];return _0x56f871;};'use strict';var EventEmitter=require(_0x8d75('0x0'));var ChatGroup=require(_0x8d75('0x1'))['db'][_0x8d75('0x2')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0x8d75('0x3')](0x0);var events={'afterCreate':_0x8d75('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0xff80b0){return function(_0x52f1fc,_0x2b06a7,_0x50247f){ChatGroupEvents[_0x8d75('0x5')](_0xff80b0+':'+_0x52f1fc['id'],_0x52f1fc);ChatGroupEvents[_0x8d75('0x5')](_0xff80b0,_0x52f1fc);_0x50247f(null);};}for(var e in events){if(events[_0x8d75('0x6')](e)){var event=events[e];ChatGroup[_0x8d75('0x7')](e,emitEvent(event));}}module[_0x8d75('0x8')]=ChatGroupEvents;
\ No newline at end of file
+var _0x3823=['../../mysqldb','ChatGroup','setMaxListeners','update','emit','hasOwnProperty','hook','exports'];(function(_0x3da241,_0xeba26a){var _0x43e156=function(_0x41ced1){while(--_0x41ced1){_0x3da241['push'](_0x3da241['shift']());}};_0x43e156(++_0xeba26a);}(_0x3823,0xb0));var _0x3382=function(_0x92ec1b,_0x882d2b){_0x92ec1b=_0x92ec1b-0x0;var _0x541de8=_0x3823[_0x92ec1b];return _0x541de8;};'use strict';var EventEmitter=require('events');var ChatGroup=require(_0x3382('0x0'))['db'][_0x3382('0x1')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0x3382('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x3382('0x3'),'afterDestroy':'remove'};function emitEvent(_0x3c7f37){return function(_0x834bba,_0x420a9a,_0x19d80e){ChatGroupEvents['emit'](_0x3c7f37+':'+_0x834bba['id'],_0x834bba);ChatGroupEvents[_0x3382('0x4')](_0x3c7f37,_0x834bba);_0x19d80e(null);};}for(var e in events){if(events[_0x3382('0x5')](e)){var event=events[e];ChatGroup[_0x3382('0x6')](e,emitEvent(event));}}module[_0x3382('0x7')]=ChatGroupEvents;
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.model.js b/server/api/chatGroup/chatGroup.model.js
index ab15717..5ae9e0a 100644
--- a/server/api/chatGroup/chatGroup.model.js
+++ b/server/api/chatGroup/chatGroup.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3489=['bluebird','request-promise','path','define','ChatGroup','lodash','../../config/logger','api','moment'];(function(_0x6c993a,_0x5ea3ab){var _0x27f547=function(_0x22df20){while(--_0x22df20){_0x6c993a['push'](_0x6c993a['shift']());}};_0x27f547(++_0x5ea3ab);}(_0x3489,0x1c7));var _0x9348=function(_0x50fb8c,_0x301924){_0x50fb8c=_0x50fb8c-0x0;var _0x3e25b1=_0x3489[_0x50fb8c];return _0x3e25b1;};'use strict';var _=require(_0x9348('0x0'));var util=require('util');var logger=require(_0x9348('0x1'))(_0x9348('0x2'));var moment=require(_0x9348('0x3'));var BPromise=require(_0x9348('0x4'));var rp=require(_0x9348('0x5'));var fs=require('fs');var path=require(_0x9348('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./chatGroup.attributes');module['exports']=function(_0x1cdd25,_0x13a01c){return _0x1cdd25[_0x9348('0x7')](_0x9348('0x8'),attributes,{'tableName':'chat_groups','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xd42b=['rimraf','../../config/environment','define','chat_groups','util','../../config/logger','api','moment','path'];(function(_0x2719d3,_0x30c25f){var _0x4cc222=function(_0x5bed61){while(--_0x5bed61){_0x2719d3['push'](_0x2719d3['shift']());}};_0x4cc222(++_0x30c25f);}(_0xd42b,0x1f3));var _0xbd42=function(_0x40d8d7,_0x30dd5e){_0x40d8d7=_0x40d8d7-0x0;var _0x3454cc=_0xd42b[_0x40d8d7];return _0x3454cc;};'use strict';var _=require('lodash');var util=require(_0xbd42('0x0'));var logger=require(_0xbd42('0x1'))(_0xbd42('0x2'));var moment=require(_0xbd42('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xbd42('0x4'));var rimraf=require(_0xbd42('0x5'));var config=require(_0xbd42('0x6'));var attributes=require('./chatGroup.attributes');module['exports']=function(_0x803ddf,_0x8512db){return _0x803ddf[_0xbd42('0x7')]('ChatGroup',attributes,{'tableName':_0xbd42('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.rpc.js b/server/api/chatGroup/chatGroup.rpc.js
index de7e496..9357378 100644
--- a/server/api/chatGroup/chatGroup.rpc.js
+++ b/server/api/chatGroup/chatGroup.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2383=['ioredis','../../mysqldb','../../config/utils','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','./chatGroup.socket','register','request','then','ChatGroup,\x20%s,\x20%s','ChatGroup,\x20%s,\x20%s,\x20%s','error','code','message','info','request\x20sent','result','catch','lodash','util','bluebird','randomstring'];(function(_0x2da971,_0x2d06fa){var _0x125f81=function(_0x40d31e){while(--_0x40d31e){_0x2da971['push'](_0x2da971['shift']());}};_0x125f81(++_0x2d06fa);}(_0x2383,0xb2));var _0x3238=function(_0x142cce,_0x1e8de2){_0x142cce=_0x142cce-0x0;var _0x492245=_0x2383[_0x142cce];return _0x492245;};'use strict';var _=require(_0x3238('0x0'));var util=require(_0x3238('0x1'));var moment=require('moment');var BPromise=require(_0x3238('0x2'));var rs=require(_0x3238('0x3'));var fs=require('fs');var Redis=require(_0x3238('0x4'));var db=require(_0x3238('0x5'))['db'];var utils=require(_0x3238('0x6'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0x3238('0x7'));var client=jayson[_0x3238('0x8')]['http']({'port':0x232a});config[_0x3238('0x9')]=_[_0x3238('0xa')](config[_0x3238('0x9')],{'host':_0x3238('0xb'),'port':0x18eb});var socket=require(_0x3238('0xc'))(new Redis(config['redis']));require(_0x3238('0xd'))[_0x3238('0xe')](socket);function respondWithRpcPromise(_0x33aec1,_0x423651,_0x200aeb){return new BPromise(function(_0xaf0019,_0x51543f){return client[_0x3238('0xf')](_0x33aec1,_0x200aeb)[_0x3238('0x10')](function(_0x4a12ff){logger['info'](_0x3238('0x11'),_0x423651,'request\x20sent');logger['debug'](_0x3238('0x12'),_0x423651,'request\x20sent',JSON['stringify'](_0x4a12ff));if(_0x4a12ff[_0x3238('0x13')]){if(_0x4a12ff[_0x3238('0x13')][_0x3238('0x14')]===0x1f4){logger['error']('ChatGroup,\x20%s,\x20%s',_0x423651,_0x4a12ff['error'][_0x3238('0x15')]);return _0x51543f(_0x4a12ff[_0x3238('0x13')]['message']);}logger[_0x3238('0x13')](_0x3238('0x11'),_0x423651,_0x4a12ff['error']['message']);return _0xaf0019(_0x4a12ff[_0x3238('0x13')][_0x3238('0x15')]);}else{logger[_0x3238('0x16')](_0x3238('0x11'),_0x423651,_0x3238('0x17'));_0xaf0019(_0x4a12ff[_0x3238('0x18')]['message']);}})[_0x3238('0x19')](function(_0x29237e){logger[_0x3238('0x13')](_0x3238('0x11'),_0x423651,_0x29237e);_0x51543f(_0x29237e);});});}
\ No newline at end of file
+var _0xdbd0=['jayson/promise','client','http','redis','localhost','socket.io-emitter','./chatGroup.socket','register','request','then','info','ChatGroup,\x20%s,\x20%s','debug','ChatGroup,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment'];(function(_0x250b10,_0x52defa){var _0x20a519=function(_0xa83c93){while(--_0xa83c93){_0x250b10['push'](_0x250b10['shift']());}};_0x20a519(++_0x52defa);}(_0xdbd0,0x88));var _0x0dbd=function(_0x3ee09e,_0x1d0818){_0x3ee09e=_0x3ee09e-0x0;var _0x204f02=_0xdbd0[_0x3ee09e];return _0x204f02;};'use strict';var _=require(_0x0dbd('0x0'));var util=require(_0x0dbd('0x1'));var moment=require(_0x0dbd('0x2'));var BPromise=require(_0x0dbd('0x3'));var rs=require(_0x0dbd('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0dbd('0x5'))['db'];var utils=require(_0x0dbd('0x6'));var logger=require(_0x0dbd('0x7'))('rpc');var config=require(_0x0dbd('0x8'));var jayson=require(_0x0dbd('0x9'));var client=jayson[_0x0dbd('0xa')][_0x0dbd('0xb')]({'port':0x232a});config['redis']=_['defaults'](config[_0x0dbd('0xc')],{'host':_0x0dbd('0xd'),'port':0x18eb});var socket=require(_0x0dbd('0xe'))(new Redis(config[_0x0dbd('0xc')]));require(_0x0dbd('0xf'))[_0x0dbd('0x10')](socket);function respondWithRpcPromise(_0x5329e7,_0x55f318,_0x1a5e84){return new BPromise(function(_0x1e0d57,_0x86fd0){return client[_0x0dbd('0x11')](_0x5329e7,_0x1a5e84)[_0x0dbd('0x12')](function(_0x18e73c){logger[_0x0dbd('0x13')](_0x0dbd('0x14'),_0x55f318,'request\x20sent');logger[_0x0dbd('0x15')](_0x0dbd('0x16'),_0x55f318,_0x0dbd('0x17'),JSON['stringify'](_0x18e73c));if(_0x18e73c[_0x0dbd('0x18')]){if(_0x18e73c[_0x0dbd('0x18')][_0x0dbd('0x19')]===0x1f4){logger[_0x0dbd('0x18')](_0x0dbd('0x14'),_0x55f318,_0x18e73c[_0x0dbd('0x18')][_0x0dbd('0x1a')]);return _0x86fd0(_0x18e73c[_0x0dbd('0x18')][_0x0dbd('0x1a')]);}logger['error']('ChatGroup,\x20%s,\x20%s',_0x55f318,_0x18e73c[_0x0dbd('0x18')][_0x0dbd('0x1a')]);return _0x1e0d57(_0x18e73c['error'][_0x0dbd('0x1a')]);}else{logger[_0x0dbd('0x13')]('ChatGroup,\x20%s,\x20%s',_0x55f318,'request\x20sent');_0x1e0d57(_0x18e73c[_0x0dbd('0x1b')][_0x0dbd('0x1a')]);}})[_0x0dbd('0x1c')](function(_0x5087d3){logger[_0x0dbd('0x18')](_0x0dbd('0x14'),_0x55f318,_0x5087d3);_0x86fd0(_0x5087d3);});});}
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.socket.js b/server/api/chatGroup/chatGroup.socket.js
index 9adba34..f1ae635 100644
--- a/server/api/chatGroup/chatGroup.socket.js
+++ b/server/api/chatGroup/chatGroup.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7f0a=['update','emit','removeListener','register','length','chatGroup:','save','remove'];(function(_0x43613c,_0x4e380f){var _0x2a0ce2=function(_0x1b2fc6){while(--_0x1b2fc6){_0x43613c['push'](_0x43613c['shift']());}};_0x2a0ce2(++_0x4e380f);}(_0x7f0a,0x1c6));var _0xa7f0=function(_0x4fde08,_0x463a36){_0x4fde08=_0x4fde08-0x0;var _0x12e725=_0x7f0a[_0x4fde08];return _0x12e725;};'use strict';var ChatGroupEvents=require('./chatGroup.events');var events=[_0xa7f0('0x0'),_0xa7f0('0x1'),_0xa7f0('0x2')];function createListener(_0x3866be,_0x218948){return function(_0x2d0382){_0x218948[_0xa7f0('0x3')](_0x3866be,_0x2d0382);};}function removeListener(_0x264d8c,_0x1a7f73){return function(){ChatGroupEvents[_0xa7f0('0x4')](_0x264d8c,_0x1a7f73);};}exports[_0xa7f0('0x5')]=function(_0x89988b){for(var _0x32c37c=0x0,_0x28e05a=events[_0xa7f0('0x6')];_0x32c37c<_0x28e05a;_0x32c37c++){var _0x41d3be=events[_0x32c37c];var _0x30a299=createListener(_0xa7f0('0x7')+_0x41d3be,_0x89988b);ChatGroupEvents['on'](_0x41d3be,_0x30a299);}};
\ No newline at end of file
+var _0x20fd=['register','length','./chatGroup.events','update','emit','removeListener'];(function(_0x3caf9f,_0xec59b8){var _0x203e82=function(_0x33a58e){while(--_0x33a58e){_0x3caf9f['push'](_0x3caf9f['shift']());}};_0x203e82(++_0xec59b8);}(_0x20fd,0x1a0));var _0xd20f=function(_0x3bbb74,_0x2dc0ef){_0x3bbb74=_0x3bbb74-0x0;var _0xc5dcbc=_0x20fd[_0x3bbb74];return _0xc5dcbc;};'use strict';var ChatGroupEvents=require(_0xd20f('0x0'));var events=['save','remove',_0xd20f('0x1')];function createListener(_0x44997e,_0x76554a){return function(_0xb11b25){_0x76554a[_0xd20f('0x2')](_0x44997e,_0xb11b25);};}function removeListener(_0x1e4d07,_0x262a8a){return function(){ChatGroupEvents[_0xd20f('0x3')](_0x1e4d07,_0x262a8a);};}exports[_0xd20f('0x4')]=function(_0x588bd9){for(var _0x52a9d3=0x0,_0x2056ce=events[_0xd20f('0x5')];_0x52a9d3<_0x2056ce;_0x52a9d3++){var _0x36cffb=events[_0x52a9d3];var _0x4adab9=createListener('chatGroup:'+_0x36cffb,_0x588bd9);ChatGroupEvents['on'](_0x36cffb,_0x4adab9);}};
\ No newline at end of file
diff --git a/server/api/chatGroup/index.js b/server/api/chatGroup/index.js
index 64ed8e5..9d53991 100644
--- a/server/api/chatGroup/index.js
+++ b/server/api/chatGroup/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x965f=['/:id','show','/:id/unread','getUnread','getMembers','getMessages','post','create','put','update','delete','destroy','/:id/members','removeMembers','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','./chatGroup.controller','isAuthenticated','index','get','/describe','describe'];(function(_0x5856a1,_0x4927f6){var _0x9967df=function(_0x474306){while(--_0x474306){_0x5856a1['push'](_0x5856a1['shift']());}};_0x9967df(++_0x4927f6);}(_0x965f,0x17a));var _0xf965=function(_0x24fa2,_0x17e55d){_0x24fa2=_0x24fa2-0x0;var _0x4cc9f9=_0x965f[_0x24fa2];return _0x4cc9f9;};'use strict';var multer=require(_0xf965('0x0'));var util=require(_0xf965('0x1'));var path=require(_0xf965('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xf965('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xf965('0x4'));var interaction=require(_0xf965('0x5'));var config=require('../../config/environment');var controller=require(_0xf965('0x6'));router['get']('/',auth[_0xf965('0x7')](),controller[_0xf965('0x8')]);router[_0xf965('0x9')](_0xf965('0xa'),auth['isAuthenticated'](),controller[_0xf965('0xb')]);router[_0xf965('0x9')](_0xf965('0xc'),auth[_0xf965('0x7')](),controller[_0xf965('0xd')]);router[_0xf965('0x9')](_0xf965('0xe'),auth['isAuthenticated'](),controller[_0xf965('0xf')]);router[_0xf965('0x9')]('/:id/members',auth[_0xf965('0x7')](),controller[_0xf965('0x10')]);router['get']('/:id/messages',auth[_0xf965('0x7')](),controller[_0xf965('0x11')]);router[_0xf965('0x12')]('/',auth[_0xf965('0x7')](),controller[_0xf965('0x13')]);router['post']('/:id/members',auth[_0xf965('0x7')](),controller['addMembers']);router['post']('/:id/messages',auth[_0xf965('0x7')](),controller['addMessage']);router[_0xf965('0x14')](_0xf965('0xc'),auth[_0xf965('0x7')](),controller[_0xf965('0x15')]);router[_0xf965('0x16')](_0xf965('0xc'),auth[_0xf965('0x7')](),controller[_0xf965('0x17')]);router[_0xf965('0x16')](_0xf965('0x18'),auth[_0xf965('0x7')](),controller[_0xf965('0x19')]);module['exports']=router;
\ No newline at end of file
+var _0x5efb=['multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/:id','/:id/unread','getUnread','/:id/members','getMembers','getMessages','post','addMembers','addMessage','put','delete','removeMembers','exports'];(function(_0x5c2a2b,_0x22c94e){var _0x19921f=function(_0x3fb937){while(--_0x3fb937){_0x5c2a2b['push'](_0x5c2a2b['shift']());}};_0x19921f(++_0x22c94e);}(_0x5efb,0xa1));var _0xb5ef=function(_0x5259f7,_0xdcdc61){_0x5259f7=_0x5259f7-0x0;var _0x11e597=_0x5efb[_0x5259f7];return _0x11e597;};'use strict';var multer=require(_0xb5ef('0x0'));var util=require(_0xb5ef('0x1'));var path=require(_0xb5ef('0x2'));var timeout=require(_0xb5ef('0x3'));var express=require('express');var router=express[_0xb5ef('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xb5ef('0x5'));var interaction=require(_0xb5ef('0x6'));var config=require(_0xb5ef('0x7'));var controller=require('./chatGroup.controller');router[_0xb5ef('0x8')]('/',auth[_0xb5ef('0x9')](),controller['index']);router[_0xb5ef('0x8')]('/describe',auth[_0xb5ef('0x9')](),controller['describe']);router[_0xb5ef('0x8')](_0xb5ef('0xa'),auth[_0xb5ef('0x9')](),controller['show']);router['get'](_0xb5ef('0xb'),auth[_0xb5ef('0x9')](),controller[_0xb5ef('0xc')]);router['get'](_0xb5ef('0xd'),auth[_0xb5ef('0x9')](),controller[_0xb5ef('0xe')]);router[_0xb5ef('0x8')]('/:id/messages',auth[_0xb5ef('0x9')](),controller[_0xb5ef('0xf')]);router[_0xb5ef('0x10')]('/',auth[_0xb5ef('0x9')](),controller['create']);router[_0xb5ef('0x10')]('/:id/members',auth[_0xb5ef('0x9')](),controller[_0xb5ef('0x11')]);router['post']('/:id/messages',auth[_0xb5ef('0x9')](),controller[_0xb5ef('0x12')]);router[_0xb5ef('0x13')](_0xb5ef('0xa'),auth[_0xb5ef('0x9')](),controller['update']);router[_0xb5ef('0x14')](_0xb5ef('0xa'),auth['isAuthenticated'](),controller['destroy']);router[_0xb5ef('0x14')](_0xb5ef('0xd'),auth[_0xb5ef('0x9')](),controller[_0xb5ef('0x15')]);module[_0xb5ef('0x16')]=router;
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.attributes.js b/server/api/chatInteraction/chatInteraction.attributes.js
index cf4648f..7b8e491 100644
--- a/server/api/chatInteraction/chatInteraction.attributes.js
+++ b/server/api/chatInteraction/chatInteraction.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8e13=['out','BOOLEAN','sequelize','exports','INTEGER','star','thumb','TEXT','DATE','STRING','ENUM'];(function(_0x5f2a81,_0x3f90d4){var _0x5be519=function(_0x2c98af){while(--_0x2c98af){_0x5f2a81['push'](_0x5f2a81['shift']());}};_0x5be519(++_0x3f90d4);}(_0x8e13,0x1ba));var _0x38e1=function(_0x46a41b,_0x1f9c73){_0x46a41b=_0x46a41b-0x0;var _0x5a53fd=_0x8e13[_0x46a41b];return _0x5a53fd;};'use strict';var Sequelize=require(_0x38e1('0x0'));module[_0x38e1('0x1')]={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'ratingValue':{'type':Sequelize[_0x38e1('0x2')]},'ratingType':{'type':Sequelize['ENUM'](_0x38e1('0x3'),_0x38e1('0x4')),'defaultValue':_0x38e1('0x3')},'ratingMessage':{'type':Sequelize[_0x38e1('0x5')]},'pathTranscript':{'type':Sequelize['TEXT']},'mailTranscript':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize[_0x38e1('0x6')]},'disposition':{'type':Sequelize[_0x38e1('0x7')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0x38e1('0x7')]},'note':{'type':Sequelize[_0x38e1('0x7')]},'browserName':{'type':Sequelize[_0x38e1('0x7')]},'browserVersion':{'type':Sequelize[_0x38e1('0x7')]},'osName':{'type':Sequelize['STRING']},'osVersion':{'type':Sequelize[_0x38e1('0x7')]},'deviceModel':{'type':Sequelize['STRING']},'deviceVendor':{'type':Sequelize[_0x38e1('0x7')]},'deviceType':{'type':Sequelize['STRING']},'referer':{'type':Sequelize[_0x38e1('0x5')]},'customerIp':{'type':Sequelize[_0x38e1('0x7')]},'formData':{'type':Sequelize['TEXT']('long')},'read1stAt':{'type':Sequelize[_0x38e1('0x6')]},'lastMsgAt':{'type':Sequelize[_0x38e1('0x6')]},'lastMsgDirection':{'type':Sequelize[_0x38e1('0x8')]('in',_0x38e1('0x9')),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize[_0x38e1('0x7')]},'customerPort':{'type':Sequelize[_0x38e1('0x7')]},'vidaooSessionId':{'type':Sequelize[_0x38e1('0x5')]},'autoreplyExecuted':{'type':Sequelize[_0x38e1('0xa')],'defaultValue':![]},'queueId':{'type':Sequelize[_0x38e1('0x2')]}};
\ No newline at end of file
+var _0x337f=['ENUM','star','thumb','TEXT','STRING','DATE','long','sequelize','exports','BOOLEAN'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0x337f,0x11f));var _0xf337=function(_0x553d0e,_0x159bb5){_0x553d0e=_0x553d0e-0x0;var _0x22c5f6=_0x337f[_0x553d0e];return _0x22c5f6;};'use strict';var Sequelize=require(_0xf337('0x0'));module[_0xf337('0x1')]={'closed':{'type':Sequelize[_0xf337('0x2')],'defaultValue':![]},'ratingValue':{'type':Sequelize['INTEGER']},'ratingType':{'type':Sequelize[_0xf337('0x3')](_0xf337('0x4'),_0xf337('0x5')),'defaultValue':_0xf337('0x4')},'ratingMessage':{'type':Sequelize[_0xf337('0x6')]},'pathTranscript':{'type':Sequelize[_0xf337('0x6')]},'mailTranscript':{'type':Sequelize[_0xf337('0x7')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize[_0xf337('0x8')]},'disposition':{'type':Sequelize[_0xf337('0x7')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0xf337('0x7')]},'note':{'type':Sequelize[_0xf337('0x7')]},'browserName':{'type':Sequelize['STRING']},'browserVersion':{'type':Sequelize['STRING']},'osName':{'type':Sequelize[_0xf337('0x7')]},'osVersion':{'type':Sequelize[_0xf337('0x7')]},'deviceModel':{'type':Sequelize['STRING']},'deviceVendor':{'type':Sequelize[_0xf337('0x7')]},'deviceType':{'type':Sequelize[_0xf337('0x7')]},'referer':{'type':Sequelize[_0xf337('0x6')]},'customerIp':{'type':Sequelize[_0xf337('0x7')]},'formData':{'type':Sequelize[_0xf337('0x6')](_0xf337('0x9'))},'read1stAt':{'type':Sequelize['DATE']},'lastMsgAt':{'type':Sequelize['DATE']},'lastMsgDirection':{'type':Sequelize[_0xf337('0x3')]('in','out'),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize[_0xf337('0x7')]},'customerPort':{'type':Sequelize[_0xf337('0x7')]},'vidaooSessionId':{'type':Sequelize[_0xf337('0x6')]},'autoreplyExecuted':{'type':Sequelize[_0xf337('0x2')],'defaultValue':![]},'queueId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.controller.js b/server/api/chatInteraction/chatInteraction.controller.js
index 8c15207..e06c446 100644
--- a/server/api/chatInteraction/chatInteraction.controller.js
+++ b/server/api/chatInteraction/chatInteraction.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x825c=['merge','where','filter','$gte','split','YYYY-MM-DD\x20HH:mm:ss','includeAll','include','getMyMessages','secret','push','rows','addTags','spread','Tag','findAll','color','emit','chatInteractionTags:save','removeTags','unix','server','files','tmp','attachments','Contact','firstName','lastName','direction','read','Account','get','mkdirSync','Chat','Owner','N.A.','closedAt','toString','disposition','browserName','customerIp','customerPort','tail','existsSync','createReadStream','pipe','createWriteStream','value','renderFile','views','downloadInteraction.ejs','zip-dir','request-promise','moment','bluebird','mustache','util','path','ejs','lodash','ioredis','../../config/logger','../../mysqldb','defaults','redis','localhost','./chatInteraction.socket','register','jayson/promise','http','client','request','then','info','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','ChatInteraction,\x20%s,\x20%s','message','catch','sendStatus','end','status','offset','undefined','limit','count','set','json','destroy','name','send','render','body','contact','agent','account','map','ChatInteraction','rawAttributes','fieldName','getOptions','chat','query','user','params','keys','filters','intersection','model','attributes','fields','length','options','create','update','find','describe','createVidaooSession','ChatWebsite','findOne','ChatWebsiteId','vidaooApiKey','vidaooEscalation','vidaooNote','email','POST','https://api-vidaoo.xcally.com/api/v1/meetings','vidaooTopic','isNull','vidaooMetadata','metadata','ValidationError','Sequelize','Error\x20in\x20Vidaoo\x20configuration','join_url','out','ChatMessage','Unable\x20to\x20create\x20Vidaoo\x20session','updateAttributes','customUpdate','CmContact','abandon','abandonInteraction,\x20%s,\x20%s,\x20%s','entity\x20not\x20found','Interaction\x20already\x20assigned','closed','AbandonInteraction','attachmentUpload','file','originalname','basename','type','mimetype','attachmentDownload','Attachment','attachId','join','server/files/attachments/','offline-chat/','download','close','mailTranscript','root','format','transcript-%s.txt','pathTranscript','Messages','User','ContactId','%s%d','agentAlias','UserId','System','customer','agentIdentifier','agent_alias','alias','fullname','agent_fullname','[%s]\x20%s:\x20%s\x0a','createdAt','MM/DD/YYYY\x20HH:mm:ss','appendFileSync','MailAccount','MailServerOut','Smtp','CloudProvider','getSmtpOptions','SendMail','sendMail','\x22%s\x22\x20<%s>','Mail\x20Transcript','Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a','addMessage','ids','omit','hasOwnProperty','nolimit','order','sort','ChatInteractionId'];(function(_0x9c6e38,_0x1fc24e){var _0x148e08=function(_0x415b66){while(--_0x415b66){_0x9c6e38['push'](_0x9c6e38['shift']());}};_0x148e08(++_0x1fc24e);}(_0x825c,0x1cb));var _0xc825=function(_0x307d86,_0x9264f2){_0x307d86=_0x307d86-0x0;var _0x361745=_0x825c[_0x307d86];return _0x361745;};'use strict';var rimraf=require('rimraf');var zipdir=require(_0xc825('0x0'));var rp=require(_0xc825('0x1'));var moment=require(_0xc825('0x2'));var BPromise=require(_0xc825('0x3'));var Mustache=require(_0xc825('0x4'));var util=require(_0xc825('0x5'));var path=require(_0xc825('0x6'));var ejs=require(_0xc825('0x7'));var fs=require('fs');var _=require(_0xc825('0x8'));var Redis=require(_0xc825('0x9'));var interaction=require('../../components/interaction/service');var qs=require('../../components/parsers/qs');var pdf=require('../../components/export/pdf');var logger=require(_0xc825('0xa'))('api');var config=require('../../config/environment');var db=require(_0xc825('0xb'))['db'];config['redis']=_[_0xc825('0xc')](config[_0xc825('0xd')],{'host':_0xc825('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xc825('0xd')]));require(_0xc825('0xf'))[_0xc825('0x10')](socket);var jayson=require(_0xc825('0x11'));var client=jayson['client'][_0xc825('0x12')]({'port':0x232b});var client9004=jayson[_0xc825('0x13')]['http']({'port':0x232c});function respondWithRpcPromise(_0x4d4795,_0x241fd3,_0x46c884,_0x188ce2){return new BPromise(function(_0x5c5a02,_0x1626c6){var _0x266cbe=_0x188ce2||client;return _0x266cbe[_0xc825('0x14')](_0x4d4795,_0x46c884)[_0xc825('0x15')](function(_0x5b7ac8){logger[_0xc825('0x16')]('ChatInteraction,\x20%s,\x20%s',_0x241fd3,'request\x20sent');logger[_0xc825('0x17')](_0xc825('0x18'),_0x241fd3,_0xc825('0x19'),JSON[_0xc825('0x1a')](_0x5b7ac8));if(_0x5b7ac8[_0xc825('0x1b')]){if(_0x5b7ac8[_0xc825('0x1b')]['code']===0x1f4){logger[_0xc825('0x1b')](_0xc825('0x1c'),_0x241fd3,_0x5b7ac8[_0xc825('0x1b')][_0xc825('0x1d')]);return _0x1626c6(_0x5b7ac8['error'][_0xc825('0x1d')]);}logger[_0xc825('0x1b')](_0xc825('0x1c'),_0x241fd3,_0x5b7ac8[_0xc825('0x1b')][_0xc825('0x1d')]);return _0x5c5a02(_0x5b7ac8[_0xc825('0x1b')][_0xc825('0x1d')]);}else{logger[_0xc825('0x16')](_0xc825('0x1c'),_0x241fd3,_0xc825('0x19'));_0x5c5a02(_0x5b7ac8['result'][_0xc825('0x1d')]);}})[_0xc825('0x1e')](function(_0x53528d){logger['error'](_0xc825('0x1c'),_0x241fd3,_0x53528d);_0x1626c6(_0x53528d);});});}function respondWithStatusCode(_0x3c7e6f,_0x26e09f){_0x26e09f=_0x26e09f||0xcc;return function(_0x197598){if(_0x197598){return _0x3c7e6f[_0xc825('0x1f')](_0x26e09f);}return _0x3c7e6f['status'](_0x26e09f)[_0xc825('0x20')]();};}function respondWithResult(_0x4147a3,_0x2466c6){_0x2466c6=_0x2466c6||0xc8;return function(_0x26c88b){if(_0x26c88b){return _0x4147a3[_0xc825('0x21')](_0x2466c6)['json'](_0x26c88b);}};}function respondWithFilteredResult(_0x79c632,_0x32330e){return function(_0x12d206){if(_0x12d206){var _0x12d538=typeof _0x32330e[_0xc825('0x22')]===_0xc825('0x23')&&typeof _0x32330e[_0xc825('0x24')]===_0xc825('0x23');var _0x150919=_0x12d206[_0xc825('0x25')];var _0xcaaec5=_0x12d538?0x0:_0x32330e['offset'];var _0x799a87=_0x12d538?_0x12d206['count']:_0x32330e[_0xc825('0x22')]+_0x32330e[_0xc825('0x24')];var _0x27a73e;if(_0x799a87>=_0x150919){_0x799a87=_0x150919;_0x27a73e=0xc8;}else{_0x27a73e=0xce;}_0x79c632[_0xc825('0x21')](_0x27a73e);return _0x79c632[_0xc825('0x26')]('Content-Range',_0xcaaec5+'-'+_0x799a87+'/'+_0x150919)[_0xc825('0x27')](_0x12d206);}return null;};}function saveUpdates(_0xd36abd){return function(_0x57c3f0){if(_0x57c3f0){return _0x57c3f0['update'](_0xd36abd)[_0xc825('0x15')](function(_0x205305){return _0x205305;});}return null;};}function removeEntity(_0x3e63dc){return function(_0x392db4){if(_0x392db4){return _0x392db4[_0xc825('0x28')]()[_0xc825('0x15')](function(){_0x3e63dc['status'](0xcc)[_0xc825('0x20')]();});}};}function handleEntityNotFound(_0x3a7ed5){return function(_0x585337){if(!_0x585337){_0x3a7ed5[_0xc825('0x1f')](0x194);}return _0x585337;};}function handleError(_0x3acab7,_0x2dc6cf){_0x2dc6cf=_0x2dc6cf||0x1f4;return function(_0x403ad0){logger['error'](_0x403ad0['stack']);if(_0x403ad0[_0xc825('0x29')]){delete _0x403ad0[_0xc825('0x29')];}_0x3acab7['status'](_0x2dc6cf)[_0xc825('0x2a')](_0x403ad0);};}function getMustacheRender(_0x1b2660,_0x44135e){return Mustache[_0xc825('0x2b')](_0x1b2660,_['merge'](_0x44135e[_0xc825('0x2c')],{'contact':_0x44135e[_0xc825('0x2d')],'message':_0x44135e[_0xc825('0x1d')],'agent':_0x44135e[_0xc825('0x2e')],'interaction':_0x44135e['interaction'],'account':_0x44135e[_0xc825('0x2f')]}))||'';}exports['index']=function(_0x30db7e,_0x1b3563){var _0x2d3f65={};var _0x40834d=_[_0xc825('0x30')](db[_0xc825('0x31')][_0xc825('0x32')],function(_0x1de89d){return{'name':_0x1de89d[_0xc825('0x33')],'type':_0x1de89d['type']['key']};});_0x2d3f65=qs[_0xc825('0x34')](_0x40834d,_0x30db7e);return interaction['findAll'](_0xc825('0x35'),_0x30db7e[_0xc825('0x36')],_0x30db7e[_0xc825('0x37')],_0x2d3f65,_0x40834d)[_0xc825('0x15')](respondWithFilteredResult(_0x1b3563,_0x2d3f65))['catch'](handleError(_0x1b3563,null));};exports['show']=function(_0x17ad46,_0xe942f9){var _0x25d013={'raw':![],'where':{'id':_0x17ad46[_0xc825('0x38')]['id']}},_0x1cca8a={};_0x1cca8a['model']=_[_0xc825('0x39')](db[_0xc825('0x31')][_0xc825('0x32')]);_0x1cca8a['query']=_[_0xc825('0x39')](_0x17ad46[_0xc825('0x36')]);_0x1cca8a[_0xc825('0x3a')]=_[_0xc825('0x3b')](_0x1cca8a[_0xc825('0x3c')],_0x1cca8a[_0xc825('0x36')]);_0x25d013[_0xc825('0x3d')]=_[_0xc825('0x3b')](_0x1cca8a[_0xc825('0x3c')],qs[_0xc825('0x3e')](_0x17ad46['query'][_0xc825('0x3e')]));_0x25d013[_0xc825('0x3d')]=_0x25d013['attributes'][_0xc825('0x3f')]?_0x25d013['attributes']:_0x1cca8a['model'];if(_0x17ad46[_0xc825('0x36')]['includeAll']){_0x25d013['include']=[{'all':!![]}];}_0x25d013=_['merge']({},_0x25d013,_0x17ad46[_0xc825('0x40')]);return db['ChatInteraction']['find'](_0x25d013)[_0xc825('0x15')](handleEntityNotFound(_0xe942f9,null))[_0xc825('0x15')](respondWithResult(_0xe942f9,null))[_0xc825('0x1e')](handleError(_0xe942f9,null));};exports[_0xc825('0x41')]=function(_0x2c15e2,_0x1e5193){return db[_0xc825('0x31')][_0xc825('0x41')](_0x2c15e2[_0xc825('0x2c')],{})[_0xc825('0x15')](respondWithResult(_0x1e5193,0xc9))[_0xc825('0x1e')](handleError(_0x1e5193,null));};exports[_0xc825('0x42')]=function(_0x4be5de,_0x5acd78){if(_0x4be5de[_0xc825('0x2c')]['id']){delete _0x4be5de[_0xc825('0x2c')]['id'];}return db[_0xc825('0x31')][_0xc825('0x43')]({'where':{'id':_0x4be5de['params']['id']}})[_0xc825('0x15')](handleEntityNotFound(_0x5acd78,null))['then'](saveUpdates(_0x4be5de['body'],null))['then'](respondWithResult(_0x5acd78,null))[_0xc825('0x1e')](handleError(_0x5acd78,null));};exports[_0xc825('0x28')]=function(_0x1e2bed,_0x5b6d54){return db[_0xc825('0x31')][_0xc825('0x43')]({'where':{'id':_0x1e2bed[_0xc825('0x38')]['id']}})[_0xc825('0x15')](handleEntityNotFound(_0x5b6d54,null))[_0xc825('0x15')](removeEntity(_0x5b6d54,null))[_0xc825('0x1e')](handleError(_0x5b6d54,null));};exports[_0xc825('0x44')]=function(_0x3d955d,_0x4b5bcf){return db[_0xc825('0x31')][_0xc825('0x44')]()[_0xc825('0x15')](respondWithResult(_0x4b5bcf,null))[_0xc825('0x1e')](handleError(_0x4b5bcf,null));};exports[_0xc825('0x45')]=function(_0xc05397,_0x46412e){var _0x501be2=_0xc05397[_0xc825('0x38')]['id'];var _0x527f1f;var _0x109451;var _0x49110b;return db[_0xc825('0x31')]['findOne']({'where':{'id':_0x501be2}})['then'](function(_0x1c29ed){_0x527f1f=_0x1c29ed;return db[_0xc825('0x46')][_0xc825('0x47')]({'where':{'id':_0x1c29ed[_0xc825('0x48')]},'attributes':['id',_0xc825('0x49'),_0xc825('0x4a'),'vidaooTopic',_0xc825('0x4b'),'vidaooMetadata'],'raw':!![]});})['then'](function(_0x248fe0){if(_0x248fe0&&_0x248fe0['vidaooApiKey']&&_0x248fe0[_0xc825('0x4a')]){_0x109451=_0x248fe0;var _0x19a552={'interaction':{'id':_0x501be2},'agent':{'id':_0xc05397[_0xc825('0x37')]['id'],'name':_0xc05397[_0xc825('0x37')][_0xc825('0x29')],'fullname':_0xc05397[_0xc825('0x37')]['fullname'],'email':_0xc05397[_0xc825('0x37')][_0xc825('0x4c')]},'contact':_0xc05397[_0xc825('0x2c')][_0xc825('0x2d')],'account':_0xc05397[_0xc825('0x2c')][_0xc825('0x2f')]};var _0x4cfd0e={'rejectUnauthorized':![],'method':_0xc825('0x4d'),'url':_0xc825('0x4e'),'headers':{'X-APIKEY':_0x248fe0[_0xc825('0x49')]},'body':{'duration':null,'scheduledAt':null,'participants':[_0xc05397['user'][_0xc825('0x4c')]],'buttons':null,'topic':_0x109451[_0xc825('0x4f')],'note':_[_0xc825('0x50')](_0x109451[_0xc825('0x4b')])?null:getMustacheRender(_0x109451[_0xc825('0x4b')],_0x19a552),'metadata':null},'redirect':'follow','json':!![]};try{if(!_[_0xc825('0x50')](_0x109451[_0xc825('0x51')])){var _0xe38a47=getMustacheRender(_0x109451[_0xc825('0x51')],_0x19a552);var _0xb6dfe0=JSON['parse'](_0xe38a47);_0x4cfd0e['body'][_0xc825('0x52')]=_0xb6dfe0;}}catch(_0x3cc4fd){throw new db['Sequelize'][(_0xc825('0x53'))]('Error\x20in\x20conversion\x20vidaooMetadata');}return rp(_0x4cfd0e);}else{throw new db[(_0xc825('0x54'))]['ValidationError'](_0xc825('0x55'));}})[_0xc825('0x15')](function(_0x274bbe){_0x49110b=_0x274bbe;if(_0x49110b['id']){var _0x55f378={'body':_0x49110b[_0xc825('0x56')],'ChatWebsiteId':_0x109451['id'],'ChatInteractionId':_0x527f1f['id'],'direction':_0xc825('0x57'),'UserId':_0xc05397[_0xc825('0x37')]['id']};return db[_0xc825('0x58')]['create'](_0x55f378,{});}else{throw new db['Sequelize'][(_0xc825('0x53'))](_0xc825('0x59'));}})[_0xc825('0x15')](function(){return _0x527f1f[_0xc825('0x5a')]({'vidaooSessionId':_0x49110b['id']});})[_0xc825('0x15')](respondWithResult(_0x46412e,null))[_0xc825('0x1e')](handleError(_0x46412e,null));};exports[_0xc825('0x5b')]=function(_0x5a5d69,_0x124744){if(_0x5a5d69[_0xc825('0x2c')]['id']){delete _0x5a5d69[_0xc825('0x2c')]['id'];}return db['ChatInteraction'][_0xc825('0x43')]({'where':{'id':_0x5a5d69[_0xc825('0x38')]['id']},'include':[{'model':db[_0xc825('0x5c')],'as':'Contact'}]})['then'](handleEntityNotFound(_0x124744,null))[_0xc825('0x15')](saveUpdates(_0x5a5d69['body'],null))[_0xc825('0x15')](respondWithResult(_0x124744,null))[_0xc825('0x1e')](handleError(_0x124744,null));};exports[_0xc825('0x5d')]=function(_0x294275,_0x4d40c7){if(_0x294275['body']['id']){delete _0x294275[_0xc825('0x2c')]['id'];}return db['ChatInteraction']['find']({'where':{'id':_0x294275[_0xc825('0x38')]['id']}})['then'](function(_0x4123a7){if(!_0x4123a7){logger[_0xc825('0x1b')](_0xc825('0x5e'),_0xc825('0x5d'),0x194,_0xc825('0x5f'));_0x4d40c7[_0xc825('0x1f')](0x194);}else{if(_0x4123a7['UserId']){throw new db[(_0xc825('0x54'))]['ValidationError'](_0xc825('0x60'));}}return _0x4123a7;})[_0xc825('0x15')](function(_0x9d29d5){if(_0x9d29d5){return _0x9d29d5[_0xc825('0x42')]({'closed':_0x294275[_0xc825('0x2c')][_0xc825('0x61')],'disposition':_0x294275[_0xc825('0x2c')]['disposition']})[_0xc825('0x15')](function(_0x55c155){return _0x55c155;});}})[_0xc825('0x15')](function(){return respondWithRpcPromise(_0xc825('0x62'),_0xc825('0x5d'),_0x294275[_0xc825('0x2c')],client9004);})['then'](respondWithResult(_0x4d40c7,null))['catch'](handleError(_0x4d40c7,null));};exports[_0xc825('0x63')]=function(_0x3a5c8d,_0x167010){_0x3a5c8d['body'][_0xc825('0x29')]=_0x3a5c8d[_0xc825('0x64')][_0xc825('0x65')];_0x3a5c8d[_0xc825('0x2c')][_0xc825('0x66')]=_0x3a5c8d[_0xc825('0x64')]['filename'];_0x3a5c8d['body'][_0xc825('0x67')]=_0x3a5c8d[_0xc825('0x64')][_0xc825('0x68')];return db['Attachment'][_0xc825('0x41')](_0x3a5c8d[_0xc825('0x2c')])['then'](respondWithResult(_0x167010,0xc9))[_0xc825('0x1e')](handleError(_0x167010,null));};exports[_0xc825('0x69')]=function(_0x2e5c0b,_0x6172f7){return db['ChatInteraction'][_0xc825('0x47')]({'where':{'id':_0x2e5c0b[_0xc825('0x38')]['id']},'raw':!![]})[_0xc825('0x15')](handleEntityNotFound(_0x6172f7,null))['then'](function(_0x2f92a0){if(_0x2f92a0){if(_0x2f92a0['closed']){return _0x6172f7[_0xc825('0x21')](0x193)['json']({'status':0x193,'message':'Unauthorized'});}return db[_0xc825('0x6a')][_0xc825('0x47')]({'where':{'id':_0x2e5c0b[_0xc825('0x36')][_0xc825('0x6b')]},'raw':!![]})[_0xc825('0x15')](handleEntityNotFound(_0x6172f7,null));}})[_0xc825('0x15')](function(_0x41193e){if(_0x41193e){var _0xed05e1=_0x41193e['ChatOfflineMessageId']!==null;var _0x496de2=path[_0xc825('0x6c')](config['root'],_0xc825('0x6d'));if(_0xed05e1){_0x496de2=path[_0xc825('0x6c')](_0x496de2,_0xc825('0x6e'));}var _0x2ca9ac=path[_0xc825('0x6c')](_0x496de2,_0x41193e[_0xc825('0x66')]);return _0x6172f7[_0xc825('0x6f')](_0x2ca9ac);}})[_0xc825('0x1e')](handleError(_0x6172f7,null));};exports[_0xc825('0x70')]=function(_0x1a134f,_0xe2bc58){var _0x18cecc=null;var _0x5b656e=null;var _0x5e0ace=null;if(_0x1a134f[_0xc825('0x2c')]['id']){delete _0x1a134f[_0xc825('0x2c')]['id'];}if(_0x1a134f[_0xc825('0x2c')][_0xc825('0x71')]){_0x5e0ace=path[_0xc825('0x6c')](config[_0xc825('0x72')],'server/files/chat/upload/',util[_0xc825('0x73')](_0xc825('0x74'),Date['now']()));_0x1a134f[_0xc825('0x2c')][_0xc825('0x75')]=_0x5e0ace;}return db[_0xc825('0x31')][_0xc825('0x43')]({'where':{'id':_0x1a134f[_0xc825('0x38')]['id']},'include':[{'model':db[_0xc825('0x58')],'as':_0xc825('0x76'),'include':[{'model':db[_0xc825('0x77')],'as':'User'}]}]})['then'](handleEntityNotFound(_0xe2bc58,null))[_0xc825('0x15')](saveUpdates(_0x1a134f['body'],null))[_0xc825('0x15')](function(_0x977732){if(_0x977732){_0x18cecc=_0x977732;return db[_0xc825('0x46')][_0xc825('0x43')]({'where':{'id':_0x18cecc[_0xc825('0x48')]}});}})['then'](function(_0x589c49){if(_0x589c49){_0x5b656e=_0x589c49;return db[_0xc825('0x5c')]['find']({'where':{'id':_0x18cecc[_0xc825('0x78')]}});}})['then'](function(_0x595c05){if(_0x595c05){if(_0x5e0ace){var _0x219f71=null;for(var _0x830ee0=0x1;_0x830ee0<_0x18cecc[_0xc825('0x76')][_0xc825('0x3f')];++_0x830ee0){_0x219f71=_0x18cecc[_0xc825('0x76')][_0x830ee0];var _0x4e74c8=_0x219f71['UserId']?util['format'](_0xc825('0x79'),_0x5b656e[_0xc825('0x7a')],_0x219f71[_0xc825('0x7b')]):_0xc825('0x7c');var _0x56a94e=_0x1a134f[_0xc825('0x2c')][_0xc825('0x7d')]||util[_0xc825('0x73')](_0xc825('0x79'),'Visitor',_0x219f71[_0xc825('0x78')]);switch(_0x5b656e[_0xc825('0x7e')]){case'website_alias':_0x4e74c8=_0x219f71[_0xc825('0x7b')]?util['format'](_0xc825('0x79'),_0x5b656e[_0xc825('0x7a')],_0x219f71[_0xc825('0x7b')]):_0xc825('0x7c');break;case _0xc825('0x7f'):_0x4e74c8=_0x219f71[_0xc825('0x7b')]?_0x219f71[_0xc825('0x77')][_0xc825('0x80')]||_0x219f71[_0xc825('0x77')][_0xc825('0x81')]:_0xc825('0x7c');break;case _0xc825('0x82'):_0x4e74c8=_0x219f71['UserId']?_0x219f71['User']['fullname']:'System';break;default:_0x4e74c8=_0x219f71[_0xc825('0x7b')]?util[_0xc825('0x73')](_0xc825('0x79'),_0x5b656e[_0xc825('0x7a')],_0x219f71[_0xc825('0x7b')]):_0xc825('0x7c');}var _0x30f1f5=util[_0xc825('0x73')](_0xc825('0x83'),moment(_0x219f71[_0xc825('0x84')])['format'](_0xc825('0x85')),_0x219f71['direction']==='in'?_0x56a94e:_0x4e74c8,_0x219f71[_0xc825('0x2c')]);if(!_0x219f71['secret']){fs[_0xc825('0x86')](_0x5e0ace,_0x30f1f5);}}return db[_0xc825('0x87')][_0xc825('0x47')]({'where':{'service':!![]},'include':[{'model':db[_0xc825('0x88')],'as':_0xc825('0x89'),'raw':!![],'include':[{'model':db[_0xc825('0x8a')],'as':'CloudProvider','raw':!![]}]}]});}}})['then'](function(_0x2bc3fd){if(!_0x2bc3fd||!_0x2bc3fd[_0xc825('0x89')]||!_0x1a134f[_0xc825('0x2c')])return _0x18cecc;var _0x591e15=_0x2bc3fd[_0xc825('0x8b')]();return respondWithRpcPromise(_0xc825('0x8c'),_0xc825('0x8d'),{'account':_0x591e15,'message':{'from':util[_0xc825('0x73')](_0xc825('0x8e'),_0x2bc3fd[_0xc825('0x29')],_0x2bc3fd[_0xc825('0x4c')]||_0x2bc3fd[_0xc825('0x89')]['user']),'to':_0x1a134f['body']['mailTranscript'],'subject':_0xc825('0x8f'),'text':util['format'](_0xc825('0x90'),_0x1a134f[_0xc825('0x2c')][_0xc825('0x71')]),'attachments':[{'path':_0x5e0ace}]}})['then'](function(){return _0x18cecc;})[_0xc825('0x1e')](function(_0x4c2d66){logger['error'](_0x4c2d66);});})[_0xc825('0x15')](respondWithStatusCode(_0xe2bc58,0xc8))[_0xc825('0x1e')](handleError(_0xe2bc58,null));};exports[_0xc825('0x91')]=function(_0x326654,_0x38444c){return db[_0xc825('0x58')][_0xc825('0x43')]({'where':{'id':_0x326654['params']['id']}})[_0xc825('0x15')](handleEntityNotFound(_0x38444c,null))[_0xc825('0x15')](function(_0x51aba5){if(_0x51aba5){return _0x51aba5['addMessage'](_0x326654[_0xc825('0x2c')][_0xc825('0x92')],_[_0xc825('0x93')](_0x326654[_0xc825('0x2c')],[_0xc825('0x92'),'id'])||{});}})['then'](respondWithResult(_0x38444c,null))['catch'](handleError(_0x38444c,null));};exports['getMessages']=function(_0x3f64ac,_0x4e63f7){var _0xd7271={'raw':![],'where':{}};var _0x4ff10c={};var _0x54238f={'count':0x0,'rows':[]};return db['ChatInteraction'][_0xc825('0x47')]({'where':{'id':_0x3f64ac[_0xc825('0x38')]['id']}})['then'](handleEntityNotFound(_0x4e63f7,null))[_0xc825('0x15')](function(_0x33c701){if(_0x33c701){_0x4ff10c['model']=_[_0xc825('0x39')](db[_0xc825('0x58')][_0xc825('0x32')]);_0x4ff10c[_0xc825('0x36')]=_[_0xc825('0x39')](_0x3f64ac[_0xc825('0x36')]);_0x4ff10c[_0xc825('0x3a')]=_[_0xc825('0x3b')](_0x4ff10c['model'],_0x4ff10c['query']);_0xd7271[_0xc825('0x3d')]=_[_0xc825('0x3b')](_0x4ff10c[_0xc825('0x3c')],qs[_0xc825('0x3e')](_0x3f64ac[_0xc825('0x36')][_0xc825('0x3e')]));_0xd7271['attributes']=_0xd7271[_0xc825('0x3d')][_0xc825('0x3f')]?_0xd7271[_0xc825('0x3d')]:_0x4ff10c['model'];if(!_0x3f64ac['query'][_0xc825('0x94')](_0xc825('0x95'))){_0xd7271[_0xc825('0x24')]=qs[_0xc825('0x24')](_0x3f64ac[_0xc825('0x36')]['limit']);_0xd7271[_0xc825('0x22')]=qs[_0xc825('0x22')](_0x3f64ac[_0xc825('0x36')][_0xc825('0x22')]);}_0xd7271[_0xc825('0x96')]=qs[_0xc825('0x97')](_0x3f64ac[_0xc825('0x36')][_0xc825('0x97')]);_0xd7271['where']=qs[_0xc825('0x3a')](_['pick'](_0x3f64ac['query'],_0x4ff10c['filters']));_0xd7271['where'][_0xc825('0x98')]=_0x33c701['id'];if(_0x3f64ac[_0xc825('0x36')]['filter']){_0xd7271['where']=_[_0xc825('0x99')](_0xd7271[_0xc825('0x9a')],{'$or':_[_0xc825('0x30')](_0xd7271[_0xc825('0x3d')],function(_0x362e80){var _0x2f05d3={};_0x2f05d3[_0x362e80]={'$like':'%'+_0x3f64ac['query'][_0xc825('0x9b')]+'%'};return _0x2f05d3;})});}if(_0x3f64ac[_0xc825('0x36')][_0xc825('0x9c')]){var _0x389f78=_0x3f64ac[_0xc825('0x36')][_0xc825('0x9c')][_0xc825('0x9d')](',');var _0x474b9e={};_0x474b9e[_0x389f78[0x0]]={'$gte':moment(_0x389f78[0x1])[_0xc825('0x73')](_0xc825('0x9e'))};_0xd7271[_0xc825('0x9a')]=_[_0xc825('0x99')](_0xd7271[_0xc825('0x9a')],_0x474b9e);}_0xd7271=_[_0xc825('0x99')]({},_0xd7271,_0x3f64ac[_0xc825('0x40')]);return db['ChatMessage']['count']({'where':_0xd7271[_0xc825('0x9a')]})[_0xc825('0x15')](function(_0x44d34e){_0x54238f[_0xc825('0x25')]=_0x44d34e;if(_0x3f64ac[_0xc825('0x36')][_0xc825('0x9f')]){_0xd7271[_0xc825('0xa0')]=[{'all':!![]}];}return db[_0xc825('0x58')]['findAll'](_0xd7271);})[_0xc825('0x15')](function(_0x1ece62){_0x54238f['rows']=_0x1ece62;return _0x54238f;});}})[_0xc825('0x15')](respondWithFilteredResult(_0x4e63f7,_0xd7271))[_0xc825('0x1e')](handleError(_0x4e63f7,null));};exports[_0xc825('0xa1')]=function(_0x8ad242,_0x5e34b0){var _0x24a704={'where':{}},_0x44b7ca={},_0x5e3ce3={'count':0x0,'rows':[]};return db[_0xc825('0x31')][_0xc825('0x47')]({'where':{'id':_0x8ad242[_0xc825('0x38')]['id']}})['then'](handleEntityNotFound(_0x5e34b0,null))[_0xc825('0x15')](function(_0x61eda1){if(_0x61eda1){_0x44b7ca[_0xc825('0x3c')]=_[_0xc825('0x39')](db[_0xc825('0x58')][_0xc825('0x32')]);_0x44b7ca[_0xc825('0x36')]=_[_0xc825('0x39')](_0x8ad242[_0xc825('0x36')]);_0x44b7ca['filters']=_[_0xc825('0x3b')](_0x44b7ca['model'],_0x44b7ca[_0xc825('0x36')]);_0x24a704[_0xc825('0x3d')]=_[_0xc825('0x3b')](_0x44b7ca['model'],qs[_0xc825('0x3e')](_0x8ad242['query'][_0xc825('0x3e')]));_0x24a704['attributes']=_0x24a704['attributes'][_0xc825('0x3f')]?_0x24a704[_0xc825('0x3d')]:_0x44b7ca[_0xc825('0x3c')];if(!_0x8ad242[_0xc825('0x36')][_0xc825('0x94')](_0xc825('0x95'))){_0x24a704[_0xc825('0x24')]=qs[_0xc825('0x24')](_0x8ad242[_0xc825('0x36')][_0xc825('0x24')]);_0x24a704['offset']=qs[_0xc825('0x22')](_0x8ad242[_0xc825('0x36')][_0xc825('0x22')]);}_0x24a704[_0xc825('0x96')]=qs[_0xc825('0x97')](_0x8ad242[_0xc825('0x36')][_0xc825('0x97')]);_0x24a704[_0xc825('0x9a')]=qs[_0xc825('0x3a')](_['pick'](_0x8ad242[_0xc825('0x36')],_0x44b7ca[_0xc825('0x3a')]));_0x24a704[_0xc825('0x9a')][_0xc825('0x98')]=_0x61eda1['id'];if(_0x8ad242[_0xc825('0x36')]['filter']){_0x24a704[_0xc825('0x9a')]=_['merge'](_0x24a704[_0xc825('0x9a')],{'$or':_[_0xc825('0x30')](_0x24a704['attributes'],function(_0x341498){var _0xe26688={};_0xe26688[_0x341498]={'$like':'%'+_0x8ad242[_0xc825('0x36')][_0xc825('0x9b')]+'%'};return _0xe26688;})});}_0x24a704[_0xc825('0x9a')][_0xc825('0xa2')]=![];if(_0x8ad242['query']['id']){_0x24a704[_0xc825('0x9a')]['id']={'$gt':_0x8ad242[_0xc825('0x36')]['id']};}_0x24a704=_['merge']({},_0x24a704,_0x8ad242[_0xc825('0x40')]);return db[_0xc825('0x58')][_0xc825('0x25')]({'where':_0x24a704[_0xc825('0x9a')]})[_0xc825('0x15')](function(_0x13ffb1){_0x5e3ce3['count']=_0x13ffb1;_0x24a704[_0xc825('0xa0')]=[];if(_0x8ad242['query']['includeAgent']){_0x24a704['include'][_0xc825('0xa3')]({'model':db['User'],'as':_0xc825('0x77'),'attributes':['id','fullname','alias']});}if(_0x8ad242[_0xc825('0x36')]['includeAll']){_0x24a704[_0xc825('0xa0')]=[{'all':!![]}];}return db[_0xc825('0x58')]['findAll'](_0x24a704);})['then'](function(_0x4a1edf){_0x5e3ce3[_0xc825('0xa4')]=_0x4a1edf;return _0x5e3ce3;});}})['then'](respondWithFilteredResult(_0x5e34b0,_0x24a704))[_0xc825('0x1e')](handleError(_0x5e34b0,null));};exports[_0xc825('0xa5')]=function(_0xe84429,_0x35a2f7){return db[_0xc825('0x31')][_0xc825('0x43')]({'where':{'id':_0xe84429['params']['id']}})[_0xc825('0x15')](handleEntityNotFound(_0x35a2f7,null))[_0xc825('0x15')](function(_0x29ff19){if(_0x29ff19){return _0x29ff19['setTags'](_0xe84429['body'][_0xc825('0x92')],_[_0xc825('0x93')](_0xe84429[_0xc825('0x2c')],[_0xc825('0x92'),'id'])||{})[_0xc825('0xa6')](function(){return db[_0xc825('0xa7')][_0xc825('0xa8')]({'attributes':['id','name',_0xc825('0xa9')],'where':{'id':_0xe84429[_0xc825('0x2c')][_0xc825('0x92')]}});})[_0xc825('0x15')](function(_0x162bc){socket[_0xc825('0xaa')](_0xc825('0xab'),{'id':Number(_0xe84429['params']['id']),'tags':_0x162bc||[]});return{'id':Number(_0xe84429[_0xc825('0x38')]['id']),'tags':_0x162bc||[]};});}})[_0xc825('0x15')](respondWithResult(_0x35a2f7,null))[_0xc825('0x1e')](handleError(_0x35a2f7,null));};exports[_0xc825('0xac')]=function(_0x5c50c7,_0x135eed){return db[_0xc825('0x31')][_0xc825('0x43')]({'where':{'id':_0x5c50c7['params']['id']}})[_0xc825('0x15')](handleEntityNotFound(_0x135eed,null))[_0xc825('0x15')](function(_0x39db3d){if(_0x39db3d){return _0x39db3d[_0xc825('0xac')](_0x5c50c7[_0xc825('0x36')][_0xc825('0x92')]);}})['then'](respondWithStatusCode(_0x135eed,null))[_0xc825('0x1e')](handleError(_0x135eed,null));};exports[_0xc825('0x6f')]=function(_0x10e9b6,_0x24c15f){var _0x2a77ea=moment()[_0xc825('0xad')]()['toString']();var _0x30cfa8=path[_0xc825('0x6c')](config[_0xc825('0x72')],_0xc825('0xae'),_0xc825('0xaf'),_0xc825('0xb0'));var _0x33eb07=path[_0xc825('0x6c')](config[_0xc825('0x72')],_0xc825('0xae'),_0xc825('0xaf'),_0xc825('0xb1'));var _0x594909=path[_0xc825('0x6c')](_0x30cfa8,_0x2a77ea);var _0x31c766=util[_0xc825('0x73')]('transcript-%d-%s.zip',_0x10e9b6[_0xc825('0x38')]['id'],_0x2a77ea);var _0x38b22d=path[_0xc825('0x6c')](_0x30cfa8,_0x31c766);var _0x5ebef4=[];_0x5ebef4[_0xc825('0xa3')]({'model':db[_0xc825('0x77')],'as':_0xc825('0x77'),'attributes':['id',_0xc825('0x81')],'raw':!![]});_0x5ebef4[_0xc825('0xa3')]({'model':db[_0xc825('0x5c')],'as':_0xc825('0xb2'),'attributes':['id',_0xc825('0xb3'),_0xc825('0xb4')],'raw':!![]});if(_0x10e9b6[_0xc825('0x36')][_0xc825('0xb1')]){_0x5ebef4[_0xc825('0xa3')]({'model':db[_0xc825('0x6a')],'as':'Attachment','raw':!![]});}var _0x12db94=[{'model':db[_0xc825('0x58')],'as':_0xc825('0x76'),'attributes':['id',_0xc825('0x2c'),_0xc825('0x84'),_0xc825('0xb5'),_0xc825('0xa2'),_0xc825('0xb6')],'include':_0x5ebef4}];_0x12db94[_0xc825('0xa3')]({'model':db['ChatWebsite'],'as':_0xc825('0xb7'),'attributes':['id',_0xc825('0x29')]});_0x12db94['push']({'model':db[_0xc825('0x77')],'as':'Owner','attributes':['id',_0xc825('0x81')]});return db[_0xc825('0x31')][_0xc825('0x43')]({'where':{'id':_0x10e9b6['params']['id']},'include':_0x12db94})[_0xc825('0x15')](handleEntityNotFound(_0x24c15f,null))[_0xc825('0x15')](function(_0x4aa07f){if(_0x4aa07f){var _0x27ebf4=_0x4aa07f[_0xc825('0xb8')]({'plain':!![]});fs[_0xc825('0xb9')](_0x594909);var _0x512ea8={'channel':_0xc825('0xba'),'account':_0x27ebf4[_0xc825('0xb7')][_0xc825('0x29')],'agent':_0x27ebf4[_0xc825('0xbb')]?_0x27ebf4[_0xc825('0xbb')][_0xc825('0x81')]:_0xc825('0xbc'),'createdAt':moment(_0x27ebf4[_0xc825('0x84')])[_0xc825('0x73')]('YYYY-MM-DD\x20HH:mm:ss')['toString'](),'closedAt':_0x27ebf4[_0xc825('0x61')]?moment(_0x27ebf4[_0xc825('0xbd')])[_0xc825('0x73')](_0xc825('0x9e'))[_0xc825('0xbe')]():'','disposition':_0x27ebf4[_0xc825('0xbf')],'chatInfo':{'browser':_0x27ebf4[_0xc825('0xc0')],'os':_0x27ebf4['osName'],'referer':_0x27ebf4['referer'],'customerIp':_0x27ebf4[_0xc825('0xc1')],'customerPort':_0x27ebf4['customerPort']?_0x27ebf4[_0xc825('0xc2')]:_0xc825('0xbc')},'messages':_(_0x27ebf4['Messages'])[_0xc825('0xc3')]()[_0xc825('0x9b')]({'secret':![]})['map'](function(_0x1570e0){if(_0x1570e0[_0xc825('0x6a')]){var _0x2d6b4d=path[_0xc825('0x6c')](_0x33eb07,_0x1570e0['Attachment'][_0xc825('0x66')]);if(fs[_0xc825('0xc4')](_0x2d6b4d)){fs[_0xc825('0xc5')](_0x2d6b4d)[_0xc825('0xc6')](fs[_0xc825('0xc7')](path[_0xc825('0x6c')](_0x594909,_0x1570e0['Attachment'][_0xc825('0x66')])));}}return{'date':moment(_0x1570e0[_0xc825('0x84')])['format']('YYYY-MM-DD\x20HH:mm:ss')['toString'](),'sender':_0x1570e0[_0xc825('0xb5')]==='out'?_0x1570e0[_0xc825('0x77')]?_0x1570e0[_0xc825('0x77')][_0xc825('0x81')]:_0xc825('0x7c'):_0x1570e0[_0xc825('0xb2')][_0xc825('0xb3')]+(_0x1570e0[_0xc825('0xb2')][_0xc825('0xb4')]?'\x20'+_0x1570e0['Contact'][_0xc825('0xb4')]:''),'body':_0x1570e0[_0xc825('0x6a')]?_0x1570e0[_0xc825('0x6a')][_0xc825('0x66')]:_0x1570e0[_0xc825('0x2c')],'direction':_0x1570e0[_0xc825('0xb5')]==='out'?'A':'C','secret':_0x1570e0[_0xc825('0xa2')],'read':_0x1570e0['read'],'attachment':_0x1570e0[_0xc825('0x6a')]};})[_0xc825('0xc8')]()};return ejs[_0xc825('0xc9')](path[_0xc825('0x6c')](config[_0xc825('0x72')],_0xc825('0xae'),_0xc825('0xca'),_0xc825('0xcb')),{'interaction':_0x512ea8})[_0xc825('0x15')](function(_0xad356e){var _0x8478a3=path[_0xc825('0x6c')](_0x594909,'transcript-'+_0x27ebf4['id']+'-'+_0x2a77ea+'.pdf');var _0x5cf6a0={'path':_0x8478a3,'channel':_0xc825('0xba'),'interactionId':_0x27ebf4['id']};return pdf['createPdfFromHTML'](_0xad356e,_0x5cf6a0);})[_0xc825('0x15')](function(){return new Promise(function(_0x38b80c,_0x1298bc){zipdir(_0x594909,{'saveTo':_0x38b22d},function(_0x7f22bf,_0x38123d){if(_0x7f22bf)return _0x1298bc(_0x7f22bf);return _0x38b80c(_0x38123d);});})[_0xc825('0x15')](function(){return new BPromise(function(_0x1c8cf4,_0x3d1db6){rimraf(_0x594909,function(_0x4ad09f){if(_0x4ad09f)_0x3d1db6(_0x4ad09f);return _0x1c8cf4();});});})['then'](function(){return _0x24c15f[_0xc825('0x6f')](_0x38b22d,_0x31c766,function(_0x243f23){if(_0x243f23){logger[_0xc825('0x1b')]('err',_0x243f23);}else{fs['unlinkSync'](_0x38b22d);}});});});}else{return _0x24c15f[_0xc825('0x1f')](0xc8);}})[_0xc825('0x1e')](handleError(_0x24c15f,null));};
\ No newline at end of file
+var _0xf163=['originalname','file','filename','mimetype','findOne','Unauthorized','Attachment','attachId','join','root','server/files/attachments/','offline-chat/','basename','download','close','mailTranscript','server/files/chat/upload/','format','transcript-%s.txt','now','User','ContactId','Messages','UserId','agentAlias','customer','%s%d','Visitor','agentIdentifier','website_alias','System','agent_alias','alias','agent_fullname','fullname','MM/DD/YYYY\x20HH:mm:ss','secret','MailServerOut','Smtp','CloudProvider','getSmtpOptions','sendMail','\x22%s\x22\x20<%s>','Mail\x20Transcript','addMessage','ChatMessage','ids','omit','filters','hasOwnProperty','sort','ChatInteractionId','filter','where','$gte','YYYY-MM-DD\x20HH:mm:ss','include','rows','nolimit','pick','includeAgent','push','addTags','setTags','Tag','emit','chatInteractionTags:save','removeTags','unix','toString','server','files','tmp','firstName','attachments','createdAt','direction','Owner','get','mkdirSync','Chat','N.A.','browserName','referer','customerIp','customerPort','createReadStream','out','lastName','read','renderFile','views','downloadInteraction.ejs','createPdfFromHTML','err','unlinkSync','zip-dir','request-promise','bluebird','mustache','util','ejs','lodash','ioredis','../../components/interaction/service','../../components/parsers/qs','../../components/export/pdf','api','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','client','http','request','info','ChatInteraction,\x20%s,\x20%s','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','update','destroy','stack','name','send','render','merge','contact','agent','interaction','index','map','ChatInteraction','fieldName','type','getOptions','findAll','chat','query','then','params','model','rawAttributes','keys','intersection','attributes','fields','length','includeAll','options','find','create','body','describe','createVidaooSession','ChatWebsite','ChatWebsiteId','vidaooApiKey','vidaooEscalation','vidaooMetadata','user','email','POST','https://api-vidaoo.xcally.com/api/v1/meetings','isNull','vidaooNote','parse','metadata','Sequelize','ValidationError','Error\x20in\x20conversion\x20vidaooMetadata','Unable\x20to\x20create\x20Vidaoo\x20session','updateAttributes','customUpdate','CmContact','Contact','abandon','abandonInteraction,\x20%s,\x20%s,\x20%s','Interaction\x20already\x20assigned','closed','disposition','attachmentUpload'];(function(_0x12f4d2,_0x3a416e){var _0x488e5e=function(_0x43fe1e){while(--_0x43fe1e){_0x12f4d2['push'](_0x12f4d2['shift']());}};_0x488e5e(++_0x3a416e);}(_0xf163,0x1ec));var _0x3f16=function(_0x4eaa4c,_0x2f7422){_0x4eaa4c=_0x4eaa4c-0x0;var _0x15aec6=_0xf163[_0x4eaa4c];return _0x15aec6;};'use strict';var rimraf=require('rimraf');var zipdir=require(_0x3f16('0x0'));var rp=require(_0x3f16('0x1'));var moment=require('moment');var BPromise=require(_0x3f16('0x2'));var Mustache=require(_0x3f16('0x3'));var util=require(_0x3f16('0x4'));var path=require('path');var ejs=require(_0x3f16('0x5'));var fs=require('fs');var _=require(_0x3f16('0x6'));var Redis=require(_0x3f16('0x7'));var interaction=require(_0x3f16('0x8'));var qs=require(_0x3f16('0x9'));var pdf=require(_0x3f16('0xa'));var logger=require('../../config/logger')(_0x3f16('0xb'));var config=require(_0x3f16('0xc'));var db=require(_0x3f16('0xd'))['db'];config[_0x3f16('0xe')]=_['defaults'](config[_0x3f16('0xe')],{'host':_0x3f16('0xf'),'port':0x18eb});var socket=require(_0x3f16('0x10'))(new Redis(config['redis']));require('./chatInteraction.socket')['register'](socket);var jayson=require('jayson/promise');var client=jayson[_0x3f16('0x11')][_0x3f16('0x12')]({'port':0x232b});var client9004=jayson[_0x3f16('0x11')][_0x3f16('0x12')]({'port':0x232c});function respondWithRpcPromise(_0x3bdbb2,_0x15237c,_0x2d7781,_0x101dca){return new BPromise(function(_0x265e43,_0x592eaf){var _0x3fb33d=_0x101dca||client;return _0x3fb33d[_0x3f16('0x13')](_0x3bdbb2,_0x2d7781)['then'](function(_0x4d5eb5){logger[_0x3f16('0x14')](_0x3f16('0x15'),_0x15237c,_0x3f16('0x16'));logger[_0x3f16('0x17')](_0x3f16('0x18'),_0x15237c,'request\x20sent',JSON[_0x3f16('0x19')](_0x4d5eb5));if(_0x4d5eb5['error']){if(_0x4d5eb5[_0x3f16('0x1a')]['code']===0x1f4){logger['error'](_0x3f16('0x15'),_0x15237c,_0x4d5eb5[_0x3f16('0x1a')]['message']);return _0x592eaf(_0x4d5eb5['error'][_0x3f16('0x1b')]);}logger[_0x3f16('0x1a')](_0x3f16('0x15'),_0x15237c,_0x4d5eb5[_0x3f16('0x1a')][_0x3f16('0x1b')]);return _0x265e43(_0x4d5eb5[_0x3f16('0x1a')][_0x3f16('0x1b')]);}else{logger[_0x3f16('0x14')](_0x3f16('0x15'),_0x15237c,'request\x20sent');_0x265e43(_0x4d5eb5[_0x3f16('0x1c')][_0x3f16('0x1b')]);}})[_0x3f16('0x1d')](function(_0x2660d8){logger[_0x3f16('0x1a')](_0x3f16('0x15'),_0x15237c,_0x2660d8);_0x592eaf(_0x2660d8);});});}function respondWithStatusCode(_0x228c29,_0x31614a){_0x31614a=_0x31614a||0xcc;return function(_0x2a481c){if(_0x2a481c){return _0x228c29[_0x3f16('0x1e')](_0x31614a);}return _0x228c29['status'](_0x31614a)[_0x3f16('0x1f')]();};}function respondWithResult(_0x35f270,_0x3986e4){_0x3986e4=_0x3986e4||0xc8;return function(_0x2f55f7){if(_0x2f55f7){return _0x35f270[_0x3f16('0x20')](_0x3986e4)[_0x3f16('0x21')](_0x2f55f7);}};}function respondWithFilteredResult(_0x3b8155,_0x35b044){return function(_0x1b22c9){if(_0x1b22c9){var _0x478d7d=typeof _0x35b044[_0x3f16('0x22')]===_0x3f16('0x23')&&typeof _0x35b044[_0x3f16('0x24')]==='undefined';var _0x4ef0c2=_0x1b22c9[_0x3f16('0x25')];var _0x4a7c2b=_0x478d7d?0x0:_0x35b044[_0x3f16('0x22')];var _0x53c3ea=_0x478d7d?_0x1b22c9[_0x3f16('0x25')]:_0x35b044['offset']+_0x35b044['limit'];var _0xfdf9c;if(_0x53c3ea>=_0x4ef0c2){_0x53c3ea=_0x4ef0c2;_0xfdf9c=0xc8;}else{_0xfdf9c=0xce;}_0x3b8155['status'](_0xfdf9c);return _0x3b8155[_0x3f16('0x26')](_0x3f16('0x27'),_0x4a7c2b+'-'+_0x53c3ea+'/'+_0x4ef0c2)[_0x3f16('0x21')](_0x1b22c9);}return null;};}function saveUpdates(_0x44eba9){return function(_0x57d2f2){if(_0x57d2f2){return _0x57d2f2[_0x3f16('0x28')](_0x44eba9)['then'](function(_0x14aeb9){return _0x14aeb9;});}return null;};}function removeEntity(_0x480143){return function(_0x53f49f){if(_0x53f49f){return _0x53f49f[_0x3f16('0x29')]()['then'](function(){_0x480143[_0x3f16('0x20')](0xcc)[_0x3f16('0x1f')]();});}};}function handleEntityNotFound(_0x1050f9){return function(_0x2440d1){if(!_0x2440d1){_0x1050f9[_0x3f16('0x1e')](0x194);}return _0x2440d1;};}function handleError(_0x3bd86b,_0x1de7d3){_0x1de7d3=_0x1de7d3||0x1f4;return function(_0x11239a){logger['error'](_0x11239a[_0x3f16('0x2a')]);if(_0x11239a[_0x3f16('0x2b')]){delete _0x11239a[_0x3f16('0x2b')];}_0x3bd86b[_0x3f16('0x20')](_0x1de7d3)[_0x3f16('0x2c')](_0x11239a);};}function getMustacheRender(_0x24a4ba,_0x4d13ef){return Mustache[_0x3f16('0x2d')](_0x24a4ba,_[_0x3f16('0x2e')](_0x4d13ef['body'],{'contact':_0x4d13ef[_0x3f16('0x2f')],'message':_0x4d13ef['message'],'agent':_0x4d13ef[_0x3f16('0x30')],'interaction':_0x4d13ef[_0x3f16('0x31')],'account':_0x4d13ef['account']}))||'';}exports[_0x3f16('0x32')]=function(_0x110426,_0x3bf5ef){var _0x3fa6e6={};var _0x491885=_[_0x3f16('0x33')](db[_0x3f16('0x34')]['rawAttributes'],function(_0x383493){return{'name':_0x383493[_0x3f16('0x35')],'type':_0x383493[_0x3f16('0x36')]['key']};});_0x3fa6e6=qs[_0x3f16('0x37')](_0x491885,_0x110426);return interaction[_0x3f16('0x38')](_0x3f16('0x39'),_0x110426[_0x3f16('0x3a')],_0x110426['user'],_0x3fa6e6,_0x491885)[_0x3f16('0x3b')](respondWithFilteredResult(_0x3bf5ef,_0x3fa6e6))[_0x3f16('0x1d')](handleError(_0x3bf5ef,null));};exports['show']=function(_0xd98e09,_0x510376){var _0x33052d={'raw':![],'where':{'id':_0xd98e09[_0x3f16('0x3c')]['id']}},_0x2bf687={};_0x2bf687[_0x3f16('0x3d')]=_['keys'](db[_0x3f16('0x34')][_0x3f16('0x3e')]);_0x2bf687[_0x3f16('0x3a')]=_[_0x3f16('0x3f')](_0xd98e09[_0x3f16('0x3a')]);_0x2bf687['filters']=_[_0x3f16('0x40')](_0x2bf687['model'],_0x2bf687['query']);_0x33052d[_0x3f16('0x41')]=_['intersection'](_0x2bf687['model'],qs['fields'](_0xd98e09[_0x3f16('0x3a')][_0x3f16('0x42')]));_0x33052d['attributes']=_0x33052d[_0x3f16('0x41')][_0x3f16('0x43')]?_0x33052d[_0x3f16('0x41')]:_0x2bf687[_0x3f16('0x3d')];if(_0xd98e09['query'][_0x3f16('0x44')]){_0x33052d['include']=[{'all':!![]}];}_0x33052d=_[_0x3f16('0x2e')]({},_0x33052d,_0xd98e09[_0x3f16('0x45')]);return db['ChatInteraction'][_0x3f16('0x46')](_0x33052d)[_0x3f16('0x3b')](handleEntityNotFound(_0x510376,null))[_0x3f16('0x3b')](respondWithResult(_0x510376,null))['catch'](handleError(_0x510376,null));};exports['create']=function(_0x320468,_0x3b0397){return db['ChatInteraction'][_0x3f16('0x47')](_0x320468[_0x3f16('0x48')],{})[_0x3f16('0x3b')](respondWithResult(_0x3b0397,0xc9))[_0x3f16('0x1d')](handleError(_0x3b0397,null));};exports[_0x3f16('0x28')]=function(_0x1efd30,_0x34ab9f){if(_0x1efd30[_0x3f16('0x48')]['id']){delete _0x1efd30[_0x3f16('0x48')]['id'];}return db[_0x3f16('0x34')][_0x3f16('0x46')]({'where':{'id':_0x1efd30['params']['id']}})[_0x3f16('0x3b')](handleEntityNotFound(_0x34ab9f,null))[_0x3f16('0x3b')](saveUpdates(_0x1efd30['body'],null))[_0x3f16('0x3b')](respondWithResult(_0x34ab9f,null))[_0x3f16('0x1d')](handleError(_0x34ab9f,null));};exports[_0x3f16('0x29')]=function(_0xa27c5b,_0x127bb7){return db[_0x3f16('0x34')][_0x3f16('0x46')]({'where':{'id':_0xa27c5b[_0x3f16('0x3c')]['id']}})[_0x3f16('0x3b')](handleEntityNotFound(_0x127bb7,null))[_0x3f16('0x3b')](removeEntity(_0x127bb7,null))[_0x3f16('0x1d')](handleError(_0x127bb7,null));};exports[_0x3f16('0x49')]=function(_0xdd2169,_0x496bdd){return db[_0x3f16('0x34')][_0x3f16('0x49')]()[_0x3f16('0x3b')](respondWithResult(_0x496bdd,null))[_0x3f16('0x1d')](handleError(_0x496bdd,null));};exports[_0x3f16('0x4a')]=function(_0x3b3dc7,_0x2fd38d){var _0x16793c=_0x3b3dc7[_0x3f16('0x3c')]['id'];var _0xeb1272;var _0x28596a;var _0x3db6b4;return db[_0x3f16('0x34')]['findOne']({'where':{'id':_0x16793c}})[_0x3f16('0x3b')](function(_0x95ff0e){_0xeb1272=_0x95ff0e;return db[_0x3f16('0x4b')]['findOne']({'where':{'id':_0x95ff0e[_0x3f16('0x4c')]},'attributes':['id',_0x3f16('0x4d'),_0x3f16('0x4e'),'vidaooTopic','vidaooNote',_0x3f16('0x4f')],'raw':!![]});})[_0x3f16('0x3b')](function(_0x57314d){if(_0x57314d&&_0x57314d[_0x3f16('0x4d')]&&_0x57314d['vidaooEscalation']){_0x28596a=_0x57314d;var _0x644070={'interaction':{'id':_0x16793c},'agent':{'id':_0x3b3dc7[_0x3f16('0x50')]['id'],'name':_0x3b3dc7[_0x3f16('0x50')][_0x3f16('0x2b')],'fullname':_0x3b3dc7[_0x3f16('0x50')]['fullname'],'email':_0x3b3dc7[_0x3f16('0x50')][_0x3f16('0x51')]},'contact':_0x3b3dc7[_0x3f16('0x48')][_0x3f16('0x2f')],'account':_0x3b3dc7['body']['account']};var _0x4c6678={'rejectUnauthorized':![],'method':_0x3f16('0x52'),'url':_0x3f16('0x53'),'headers':{'X-APIKEY':_0x57314d[_0x3f16('0x4d')]},'body':{'duration':null,'scheduledAt':null,'participants':[_0x3b3dc7['user'][_0x3f16('0x51')]],'buttons':null,'topic':_0x28596a['vidaooTopic'],'note':_[_0x3f16('0x54')](_0x28596a[_0x3f16('0x55')])?null:getMustacheRender(_0x28596a[_0x3f16('0x55')],_0x644070),'metadata':null},'redirect':'follow','json':!![]};try{if(!_[_0x3f16('0x54')](_0x28596a[_0x3f16('0x4f')])){var _0x440ff4=getMustacheRender(_0x28596a[_0x3f16('0x4f')],_0x644070);var _0x40f8f0=JSON[_0x3f16('0x56')](_0x440ff4);_0x4c6678[_0x3f16('0x48')][_0x3f16('0x57')]=_0x40f8f0;}}catch(_0x5892fc){throw new db[(_0x3f16('0x58'))][(_0x3f16('0x59'))](_0x3f16('0x5a'));}return rp(_0x4c6678);}else{throw new db[(_0x3f16('0x58'))]['ValidationError']('Error\x20in\x20Vidaoo\x20configuration');}})[_0x3f16('0x3b')](function(_0x132472){_0x3db6b4=_0x132472;if(_0x3db6b4['id']){var _0x111dde={'body':_0x3db6b4['join_url'],'ChatWebsiteId':_0x28596a['id'],'ChatInteractionId':_0xeb1272['id'],'direction':'out','UserId':_0x3b3dc7['user']['id']};return db['ChatMessage'][_0x3f16('0x47')](_0x111dde,{});}else{throw new db[(_0x3f16('0x58'))][(_0x3f16('0x59'))](_0x3f16('0x5b'));}})[_0x3f16('0x3b')](function(){return _0xeb1272[_0x3f16('0x5c')]({'vidaooSessionId':_0x3db6b4['id']});})[_0x3f16('0x3b')](respondWithResult(_0x2fd38d,null))[_0x3f16('0x1d')](handleError(_0x2fd38d,null));};exports[_0x3f16('0x5d')]=function(_0x1a79f7,_0x47885b){if(_0x1a79f7[_0x3f16('0x48')]['id']){delete _0x1a79f7['body']['id'];}return db[_0x3f16('0x34')][_0x3f16('0x46')]({'where':{'id':_0x1a79f7[_0x3f16('0x3c')]['id']},'include':[{'model':db[_0x3f16('0x5e')],'as':_0x3f16('0x5f')}]})['then'](handleEntityNotFound(_0x47885b,null))[_0x3f16('0x3b')](saveUpdates(_0x1a79f7['body'],null))['then'](respondWithResult(_0x47885b,null))['catch'](handleError(_0x47885b,null));};exports[_0x3f16('0x60')]=function(_0x1c07ba,_0xf3025b){if(_0x1c07ba[_0x3f16('0x48')]['id']){delete _0x1c07ba[_0x3f16('0x48')]['id'];}return db[_0x3f16('0x34')][_0x3f16('0x46')]({'where':{'id':_0x1c07ba[_0x3f16('0x3c')]['id']}})[_0x3f16('0x3b')](function(_0x18d74a){if(!_0x18d74a){logger['error'](_0x3f16('0x61'),_0x3f16('0x60'),0x194,'entity\x20not\x20found');_0xf3025b[_0x3f16('0x1e')](0x194);}else{if(_0x18d74a['UserId']){throw new db[(_0x3f16('0x58'))]['ValidationError'](_0x3f16('0x62'));}}return _0x18d74a;})[_0x3f16('0x3b')](function(_0x55cff2){if(_0x55cff2){return _0x55cff2[_0x3f16('0x28')]({'closed':_0x1c07ba['body'][_0x3f16('0x63')],'disposition':_0x1c07ba[_0x3f16('0x48')][_0x3f16('0x64')]})[_0x3f16('0x3b')](function(_0x87c5b){return _0x87c5b;});}})[_0x3f16('0x3b')](function(){return respondWithRpcPromise('AbandonInteraction',_0x3f16('0x60'),_0x1c07ba[_0x3f16('0x48')],client9004);})[_0x3f16('0x3b')](respondWithResult(_0xf3025b,null))['catch'](handleError(_0xf3025b,null));};exports[_0x3f16('0x65')]=function(_0x31691d,_0x3db514){_0x31691d['body']['name']=_0x31691d['file'][_0x3f16('0x66')];_0x31691d['body']['basename']=_0x31691d[_0x3f16('0x67')][_0x3f16('0x68')];_0x31691d[_0x3f16('0x48')]['type']=_0x31691d[_0x3f16('0x67')][_0x3f16('0x69')];return db['Attachment'][_0x3f16('0x47')](_0x31691d[_0x3f16('0x48')])[_0x3f16('0x3b')](respondWithResult(_0x3db514,0xc9))[_0x3f16('0x1d')](handleError(_0x3db514,null));};exports['attachmentDownload']=function(_0x537fee,_0x162dd4){return db['ChatInteraction'][_0x3f16('0x6a')]({'where':{'id':_0x537fee[_0x3f16('0x3c')]['id']},'raw':!![]})[_0x3f16('0x3b')](handleEntityNotFound(_0x162dd4,null))[_0x3f16('0x3b')](function(_0x467609){if(_0x467609){if(_0x467609['closed']){return _0x162dd4[_0x3f16('0x20')](0x193)[_0x3f16('0x21')]({'status':0x193,'message':_0x3f16('0x6b')});}return db[_0x3f16('0x6c')][_0x3f16('0x6a')]({'where':{'id':_0x537fee['query'][_0x3f16('0x6d')]},'raw':!![]})['then'](handleEntityNotFound(_0x162dd4,null));}})[_0x3f16('0x3b')](function(_0x55c39b){if(_0x55c39b){var _0x5191cb=_0x55c39b['ChatOfflineMessageId']!==null;var _0x5ac499=path[_0x3f16('0x6e')](config[_0x3f16('0x6f')],_0x3f16('0x70'));if(_0x5191cb){_0x5ac499=path[_0x3f16('0x6e')](_0x5ac499,_0x3f16('0x71'));}var _0xaec424=path[_0x3f16('0x6e')](_0x5ac499,_0x55c39b[_0x3f16('0x72')]);return _0x162dd4[_0x3f16('0x73')](_0xaec424);}})[_0x3f16('0x1d')](handleError(_0x162dd4,null));};exports[_0x3f16('0x74')]=function(_0x59221a,_0x135a31){var _0x545cc7=null;var _0x4b5ebb=null;var _0x70501=null;if(_0x59221a[_0x3f16('0x48')]['id']){delete _0x59221a[_0x3f16('0x48')]['id'];}if(_0x59221a[_0x3f16('0x48')][_0x3f16('0x75')]){_0x70501=path[_0x3f16('0x6e')](config[_0x3f16('0x6f')],_0x3f16('0x76'),util[_0x3f16('0x77')](_0x3f16('0x78'),Date[_0x3f16('0x79')]()));_0x59221a[_0x3f16('0x48')]['pathTranscript']=_0x70501;}return db[_0x3f16('0x34')]['find']({'where':{'id':_0x59221a[_0x3f16('0x3c')]['id']},'include':[{'model':db['ChatMessage'],'as':'Messages','include':[{'model':db[_0x3f16('0x7a')],'as':_0x3f16('0x7a')}]}]})[_0x3f16('0x3b')](handleEntityNotFound(_0x135a31,null))['then'](saveUpdates(_0x59221a[_0x3f16('0x48')],null))[_0x3f16('0x3b')](function(_0x698381){if(_0x698381){_0x545cc7=_0x698381;return db[_0x3f16('0x4b')]['find']({'where':{'id':_0x545cc7['ChatWebsiteId']}});}})[_0x3f16('0x3b')](function(_0x43fdc2){if(_0x43fdc2){_0x4b5ebb=_0x43fdc2;return db[_0x3f16('0x5e')][_0x3f16('0x46')]({'where':{'id':_0x545cc7[_0x3f16('0x7b')]}});}})[_0x3f16('0x3b')](function(_0x98ad04){if(_0x98ad04){if(_0x70501){var _0x1f308b=null;for(var _0x281285=0x1;_0x281285<_0x545cc7[_0x3f16('0x7c')][_0x3f16('0x43')];++_0x281285){_0x1f308b=_0x545cc7['Messages'][_0x281285];var _0x3ba3e0=_0x1f308b[_0x3f16('0x7d')]?util['format']('%s%d',_0x4b5ebb[_0x3f16('0x7e')],_0x1f308b[_0x3f16('0x7d')]):'System';var _0x38292e=_0x59221a[_0x3f16('0x48')][_0x3f16('0x7f')]||util[_0x3f16('0x77')](_0x3f16('0x80'),_0x3f16('0x81'),_0x1f308b[_0x3f16('0x7b')]);switch(_0x4b5ebb[_0x3f16('0x82')]){case _0x3f16('0x83'):_0x3ba3e0=_0x1f308b[_0x3f16('0x7d')]?util[_0x3f16('0x77')](_0x3f16('0x80'),_0x4b5ebb[_0x3f16('0x7e')],_0x1f308b[_0x3f16('0x7d')]):_0x3f16('0x84');break;case _0x3f16('0x85'):_0x3ba3e0=_0x1f308b[_0x3f16('0x7d')]?_0x1f308b[_0x3f16('0x7a')][_0x3f16('0x86')]||_0x1f308b[_0x3f16('0x7a')]['fullname']:_0x3f16('0x84');break;case _0x3f16('0x87'):_0x3ba3e0=_0x1f308b[_0x3f16('0x7d')]?_0x1f308b['User'][_0x3f16('0x88')]:_0x3f16('0x84');break;default:_0x3ba3e0=_0x1f308b['UserId']?util[_0x3f16('0x77')](_0x3f16('0x80'),_0x4b5ebb['agentAlias'],_0x1f308b[_0x3f16('0x7d')]):'System';}var _0x2ef482=util['format']('[%s]\x20%s:\x20%s\x0a',moment(_0x1f308b['createdAt'])['format'](_0x3f16('0x89')),_0x1f308b['direction']==='in'?_0x38292e:_0x3ba3e0,_0x1f308b[_0x3f16('0x48')]);if(!_0x1f308b[_0x3f16('0x8a')]){fs['appendFileSync'](_0x70501,_0x2ef482);}}return db['MailAccount'][_0x3f16('0x6a')]({'where':{'service':!![]},'include':[{'model':db[_0x3f16('0x8b')],'as':_0x3f16('0x8c'),'raw':!![],'include':[{'model':db[_0x3f16('0x8d')],'as':_0x3f16('0x8d'),'raw':!![]}]}]});}}})[_0x3f16('0x3b')](function(_0x3439e2){if(!_0x3439e2||!_0x3439e2['Smtp']||!_0x59221a['body'])return _0x545cc7;var _0x3c6a09=_0x3439e2[_0x3f16('0x8e')]();return respondWithRpcPromise('SendMail',_0x3f16('0x8f'),{'account':_0x3c6a09,'message':{'from':util[_0x3f16('0x77')](_0x3f16('0x90'),_0x3439e2[_0x3f16('0x2b')],_0x3439e2[_0x3f16('0x51')]||_0x3439e2[_0x3f16('0x8c')]['user']),'to':_0x59221a[_0x3f16('0x48')]['mailTranscript'],'subject':_0x3f16('0x91'),'text':util['format']('Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a',_0x59221a[_0x3f16('0x48')][_0x3f16('0x75')]),'attachments':[{'path':_0x70501}]}})[_0x3f16('0x3b')](function(){return _0x545cc7;})[_0x3f16('0x1d')](function(_0x588e5c){logger[_0x3f16('0x1a')](_0x588e5c);});})[_0x3f16('0x3b')](respondWithStatusCode(_0x135a31,0xc8))[_0x3f16('0x1d')](handleError(_0x135a31,null));};exports[_0x3f16('0x92')]=function(_0x24071b,_0x2ade5e){return db[_0x3f16('0x93')][_0x3f16('0x46')]({'where':{'id':_0x24071b[_0x3f16('0x3c')]['id']}})[_0x3f16('0x3b')](handleEntityNotFound(_0x2ade5e,null))[_0x3f16('0x3b')](function(_0x454930){if(_0x454930){return _0x454930[_0x3f16('0x92')](_0x24071b[_0x3f16('0x48')][_0x3f16('0x94')],_[_0x3f16('0x95')](_0x24071b[_0x3f16('0x48')],[_0x3f16('0x94'),'id'])||{});}})[_0x3f16('0x3b')](respondWithResult(_0x2ade5e,null))[_0x3f16('0x1d')](handleError(_0x2ade5e,null));};exports['getMessages']=function(_0x42d76e,_0xa99d2d){var _0x3a33d6={'raw':![],'where':{}};var _0x4c71d9={};var _0x34e37c={'count':0x0,'rows':[]};return db['ChatInteraction'][_0x3f16('0x6a')]({'where':{'id':_0x42d76e['params']['id']}})[_0x3f16('0x3b')](handleEntityNotFound(_0xa99d2d,null))[_0x3f16('0x3b')](function(_0x3e87fc){if(_0x3e87fc){_0x4c71d9[_0x3f16('0x3d')]=_[_0x3f16('0x3f')](db[_0x3f16('0x93')][_0x3f16('0x3e')]);_0x4c71d9[_0x3f16('0x3a')]=_[_0x3f16('0x3f')](_0x42d76e[_0x3f16('0x3a')]);_0x4c71d9[_0x3f16('0x96')]=_[_0x3f16('0x40')](_0x4c71d9[_0x3f16('0x3d')],_0x4c71d9[_0x3f16('0x3a')]);_0x3a33d6[_0x3f16('0x41')]=_['intersection'](_0x4c71d9[_0x3f16('0x3d')],qs[_0x3f16('0x42')](_0x42d76e[_0x3f16('0x3a')][_0x3f16('0x42')]));_0x3a33d6[_0x3f16('0x41')]=_0x3a33d6['attributes'][_0x3f16('0x43')]?_0x3a33d6[_0x3f16('0x41')]:_0x4c71d9[_0x3f16('0x3d')];if(!_0x42d76e[_0x3f16('0x3a')][_0x3f16('0x97')]('nolimit')){_0x3a33d6[_0x3f16('0x24')]=qs[_0x3f16('0x24')](_0x42d76e[_0x3f16('0x3a')]['limit']);_0x3a33d6['offset']=qs[_0x3f16('0x22')](_0x42d76e[_0x3f16('0x3a')][_0x3f16('0x22')]);}_0x3a33d6['order']=qs['sort'](_0x42d76e[_0x3f16('0x3a')][_0x3f16('0x98')]);_0x3a33d6['where']=qs[_0x3f16('0x96')](_['pick'](_0x42d76e[_0x3f16('0x3a')],_0x4c71d9['filters']));_0x3a33d6['where'][_0x3f16('0x99')]=_0x3e87fc['id'];if(_0x42d76e['query'][_0x3f16('0x9a')]){_0x3a33d6[_0x3f16('0x9b')]=_[_0x3f16('0x2e')](_0x3a33d6[_0x3f16('0x9b')],{'$or':_[_0x3f16('0x33')](_0x3a33d6[_0x3f16('0x41')],function(_0x5e1801){var _0x23033e={};_0x23033e[_0x5e1801]={'$like':'%'+_0x42d76e[_0x3f16('0x3a')][_0x3f16('0x9a')]+'%'};return _0x23033e;})});}if(_0x42d76e[_0x3f16('0x3a')][_0x3f16('0x9c')]){var _0x52d639=_0x42d76e[_0x3f16('0x3a')][_0x3f16('0x9c')]['split'](',');var _0xebdc77={};_0xebdc77[_0x52d639[0x0]]={'$gte':moment(_0x52d639[0x1])[_0x3f16('0x77')](_0x3f16('0x9d'))};_0x3a33d6['where']=_[_0x3f16('0x2e')](_0x3a33d6[_0x3f16('0x9b')],_0xebdc77);}_0x3a33d6=_[_0x3f16('0x2e')]({},_0x3a33d6,_0x42d76e[_0x3f16('0x45')]);return db[_0x3f16('0x93')]['count']({'where':_0x3a33d6[_0x3f16('0x9b')]})[_0x3f16('0x3b')](function(_0x54d5f1){_0x34e37c['count']=_0x54d5f1;if(_0x42d76e[_0x3f16('0x3a')][_0x3f16('0x44')]){_0x3a33d6[_0x3f16('0x9e')]=[{'all':!![]}];}return db['ChatMessage']['findAll'](_0x3a33d6);})[_0x3f16('0x3b')](function(_0x2eb5b1){_0x34e37c[_0x3f16('0x9f')]=_0x2eb5b1;return _0x34e37c;});}})['then'](respondWithFilteredResult(_0xa99d2d,_0x3a33d6))[_0x3f16('0x1d')](handleError(_0xa99d2d,null));};exports['getMyMessages']=function(_0x5e28c3,_0x420a5a){var _0x120148={'where':{}},_0x58a71c={},_0x524be1={'count':0x0,'rows':[]};return db[_0x3f16('0x34')][_0x3f16('0x6a')]({'where':{'id':_0x5e28c3[_0x3f16('0x3c')]['id']}})['then'](handleEntityNotFound(_0x420a5a,null))[_0x3f16('0x3b')](function(_0x513eea){if(_0x513eea){_0x58a71c[_0x3f16('0x3d')]=_['keys'](db['ChatMessage'][_0x3f16('0x3e')]);_0x58a71c[_0x3f16('0x3a')]=_[_0x3f16('0x3f')](_0x5e28c3['query']);_0x58a71c[_0x3f16('0x96')]=_['intersection'](_0x58a71c[_0x3f16('0x3d')],_0x58a71c['query']);_0x120148[_0x3f16('0x41')]=_[_0x3f16('0x40')](_0x58a71c[_0x3f16('0x3d')],qs[_0x3f16('0x42')](_0x5e28c3[_0x3f16('0x3a')][_0x3f16('0x42')]));_0x120148[_0x3f16('0x41')]=_0x120148[_0x3f16('0x41')][_0x3f16('0x43')]?_0x120148[_0x3f16('0x41')]:_0x58a71c[_0x3f16('0x3d')];if(!_0x5e28c3[_0x3f16('0x3a')]['hasOwnProperty'](_0x3f16('0xa0'))){_0x120148[_0x3f16('0x24')]=qs[_0x3f16('0x24')](_0x5e28c3['query']['limit']);_0x120148['offset']=qs[_0x3f16('0x22')](_0x5e28c3[_0x3f16('0x3a')][_0x3f16('0x22')]);}_0x120148['order']=qs[_0x3f16('0x98')](_0x5e28c3[_0x3f16('0x3a')][_0x3f16('0x98')]);_0x120148['where']=qs[_0x3f16('0x96')](_[_0x3f16('0xa1')](_0x5e28c3[_0x3f16('0x3a')],_0x58a71c['filters']));_0x120148['where'][_0x3f16('0x99')]=_0x513eea['id'];if(_0x5e28c3['query'][_0x3f16('0x9a')]){_0x120148[_0x3f16('0x9b')]=_[_0x3f16('0x2e')](_0x120148[_0x3f16('0x9b')],{'$or':_[_0x3f16('0x33')](_0x120148[_0x3f16('0x41')],function(_0x325d66){var _0x2a68d1={};_0x2a68d1[_0x325d66]={'$like':'%'+_0x5e28c3[_0x3f16('0x3a')][_0x3f16('0x9a')]+'%'};return _0x2a68d1;})});}_0x120148[_0x3f16('0x9b')][_0x3f16('0x8a')]=![];if(_0x5e28c3[_0x3f16('0x3a')]['id']){_0x120148[_0x3f16('0x9b')]['id']={'$gt':_0x5e28c3['query']['id']};}_0x120148=_['merge']({},_0x120148,_0x5e28c3[_0x3f16('0x45')]);return db[_0x3f16('0x93')][_0x3f16('0x25')]({'where':_0x120148[_0x3f16('0x9b')]})[_0x3f16('0x3b')](function(_0x2af2b4){_0x524be1[_0x3f16('0x25')]=_0x2af2b4;_0x120148[_0x3f16('0x9e')]=[];if(_0x5e28c3['query'][_0x3f16('0xa2')]){_0x120148[_0x3f16('0x9e')][_0x3f16('0xa3')]({'model':db[_0x3f16('0x7a')],'as':'User','attributes':['id','fullname',_0x3f16('0x86')]});}if(_0x5e28c3['query'][_0x3f16('0x44')]){_0x120148['include']=[{'all':!![]}];}return db['ChatMessage'][_0x3f16('0x38')](_0x120148);})[_0x3f16('0x3b')](function(_0x5ada33){_0x524be1['rows']=_0x5ada33;return _0x524be1;});}})[_0x3f16('0x3b')](respondWithFilteredResult(_0x420a5a,_0x120148))[_0x3f16('0x1d')](handleError(_0x420a5a,null));};exports[_0x3f16('0xa4')]=function(_0x2d1313,_0x5036eb){return db[_0x3f16('0x34')]['find']({'where':{'id':_0x2d1313[_0x3f16('0x3c')]['id']}})[_0x3f16('0x3b')](handleEntityNotFound(_0x5036eb,null))[_0x3f16('0x3b')](function(_0x333055){if(_0x333055){return _0x333055[_0x3f16('0xa5')](_0x2d1313['body']['ids'],_['omit'](_0x2d1313[_0x3f16('0x48')],['ids','id'])||{})['spread'](function(){return db[_0x3f16('0xa6')][_0x3f16('0x38')]({'attributes':['id',_0x3f16('0x2b'),'color'],'where':{'id':_0x2d1313['body'][_0x3f16('0x94')]}});})[_0x3f16('0x3b')](function(_0x32abd3){socket[_0x3f16('0xa7')](_0x3f16('0xa8'),{'id':Number(_0x2d1313['params']['id']),'tags':_0x32abd3||[]});return{'id':Number(_0x2d1313[_0x3f16('0x3c')]['id']),'tags':_0x32abd3||[]};});}})[_0x3f16('0x3b')](respondWithResult(_0x5036eb,null))[_0x3f16('0x1d')](handleError(_0x5036eb,null));};exports[_0x3f16('0xa9')]=function(_0x4bf03a,_0x14b10a){return db[_0x3f16('0x34')][_0x3f16('0x46')]({'where':{'id':_0x4bf03a[_0x3f16('0x3c')]['id']}})[_0x3f16('0x3b')](handleEntityNotFound(_0x14b10a,null))[_0x3f16('0x3b')](function(_0x4f7df3){if(_0x4f7df3){return _0x4f7df3['removeTags'](_0x4bf03a['query'][_0x3f16('0x94')]);}})['then'](respondWithStatusCode(_0x14b10a,null))[_0x3f16('0x1d')](handleError(_0x14b10a,null));};exports['download']=function(_0x490b16,_0x556ff6){var _0x124d7a=moment()[_0x3f16('0xaa')]()[_0x3f16('0xab')]();var _0x47e930=path[_0x3f16('0x6e')](config['root'],_0x3f16('0xac'),_0x3f16('0xad'),_0x3f16('0xae'));var _0x2d6d6c=path[_0x3f16('0x6e')](config[_0x3f16('0x6f')],_0x3f16('0xac'),_0x3f16('0xad'),'attachments');var _0x3f6a12=path[_0x3f16('0x6e')](_0x47e930,_0x124d7a);var _0x25aa11=util[_0x3f16('0x77')]('transcript-%d-%s.zip',_0x490b16[_0x3f16('0x3c')]['id'],_0x124d7a);var _0x3ddb46=path[_0x3f16('0x6e')](_0x47e930,_0x25aa11);var _0x3861a5=[];_0x3861a5[_0x3f16('0xa3')]({'model':db['User'],'as':_0x3f16('0x7a'),'attributes':['id','fullname'],'raw':!![]});_0x3861a5[_0x3f16('0xa3')]({'model':db[_0x3f16('0x5e')],'as':_0x3f16('0x5f'),'attributes':['id',_0x3f16('0xaf'),'lastName'],'raw':!![]});if(_0x490b16['query'][_0x3f16('0xb0')]){_0x3861a5[_0x3f16('0xa3')]({'model':db[_0x3f16('0x6c')],'as':_0x3f16('0x6c'),'raw':!![]});}var _0x3d2597=[{'model':db[_0x3f16('0x93')],'as':'Messages','attributes':['id','body',_0x3f16('0xb1'),_0x3f16('0xb2'),_0x3f16('0x8a'),'read'],'include':_0x3861a5}];_0x3d2597[_0x3f16('0xa3')]({'model':db[_0x3f16('0x4b')],'as':'Account','attributes':['id',_0x3f16('0x2b')]});_0x3d2597[_0x3f16('0xa3')]({'model':db[_0x3f16('0x7a')],'as':_0x3f16('0xb3'),'attributes':['id',_0x3f16('0x88')]});return db[_0x3f16('0x34')][_0x3f16('0x46')]({'where':{'id':_0x490b16[_0x3f16('0x3c')]['id']},'include':_0x3d2597})[_0x3f16('0x3b')](handleEntityNotFound(_0x556ff6,null))['then'](function(_0x3e93bb){if(_0x3e93bb){var _0x3862d3=_0x3e93bb[_0x3f16('0xb4')]({'plain':!![]});fs[_0x3f16('0xb5')](_0x3f6a12);var _0x59e64b={'channel':_0x3f16('0xb6'),'account':_0x3862d3['Account']['name'],'agent':_0x3862d3[_0x3f16('0xb3')]?_0x3862d3[_0x3f16('0xb3')][_0x3f16('0x88')]:_0x3f16('0xb7'),'createdAt':moment(_0x3862d3[_0x3f16('0xb1')])[_0x3f16('0x77')]('YYYY-MM-DD\x20HH:mm:ss')['toString'](),'closedAt':_0x3862d3[_0x3f16('0x63')]?moment(_0x3862d3['closedAt'])[_0x3f16('0x77')](_0x3f16('0x9d'))[_0x3f16('0xab')]():'','disposition':_0x3862d3['disposition'],'chatInfo':{'browser':_0x3862d3[_0x3f16('0xb8')],'os':_0x3862d3['osName'],'referer':_0x3862d3[_0x3f16('0xb9')],'customerIp':_0x3862d3[_0x3f16('0xba')],'customerPort':_0x3862d3[_0x3f16('0xbb')]?_0x3862d3[_0x3f16('0xbb')]:_0x3f16('0xb7')},'messages':_(_0x3862d3[_0x3f16('0x7c')])['tail']()[_0x3f16('0x9a')]({'secret':![]})[_0x3f16('0x33')](function(_0x325dce){if(_0x325dce[_0x3f16('0x6c')]){var _0x39906c=path['join'](_0x2d6d6c,_0x325dce[_0x3f16('0x6c')][_0x3f16('0x72')]);if(fs['existsSync'](_0x39906c)){fs[_0x3f16('0xbc')](_0x39906c)['pipe'](fs['createWriteStream'](path[_0x3f16('0x6e')](_0x3f6a12,_0x325dce['Attachment'][_0x3f16('0x72')])));}}return{'date':moment(_0x325dce['createdAt'])[_0x3f16('0x77')](_0x3f16('0x9d'))[_0x3f16('0xab')](),'sender':_0x325dce[_0x3f16('0xb2')]===_0x3f16('0xbd')?_0x325dce[_0x3f16('0x7a')]?_0x325dce[_0x3f16('0x7a')][_0x3f16('0x88')]:_0x3f16('0x84'):_0x325dce[_0x3f16('0x5f')]['firstName']+(_0x325dce[_0x3f16('0x5f')]['lastName']?'\x20'+_0x325dce[_0x3f16('0x5f')][_0x3f16('0xbe')]:''),'body':_0x325dce[_0x3f16('0x6c')]?_0x325dce[_0x3f16('0x6c')][_0x3f16('0x72')]:_0x325dce[_0x3f16('0x48')],'direction':_0x325dce[_0x3f16('0xb2')]===_0x3f16('0xbd')?'A':'C','secret':_0x325dce[_0x3f16('0x8a')],'read':_0x325dce[_0x3f16('0xbf')],'attachment':_0x325dce[_0x3f16('0x6c')]};})['value']()};return ejs[_0x3f16('0xc0')](path[_0x3f16('0x6e')](config[_0x3f16('0x6f')],_0x3f16('0xac'),_0x3f16('0xc1'),_0x3f16('0xc2')),{'interaction':_0x59e64b})[_0x3f16('0x3b')](function(_0x1e2765){var _0x43e508=path['join'](_0x3f6a12,'transcript-'+_0x3862d3['id']+'-'+_0x124d7a+'.pdf');var _0xa17db3={'path':_0x43e508,'channel':'Chat','interactionId':_0x3862d3['id']};return pdf[_0x3f16('0xc3')](_0x1e2765,_0xa17db3);})[_0x3f16('0x3b')](function(){return new Promise(function(_0x55f6a7,_0x468917){zipdir(_0x3f6a12,{'saveTo':_0x3ddb46},function(_0x3365bb,_0x57878e){if(_0x3365bb)return _0x468917(_0x3365bb);return _0x55f6a7(_0x57878e);});})[_0x3f16('0x3b')](function(){return new BPromise(function(_0x4f8376,_0x51dc9c){rimraf(_0x3f6a12,function(_0x3ac378){if(_0x3ac378)_0x51dc9c(_0x3ac378);return _0x4f8376();});});})[_0x3f16('0x3b')](function(){return _0x556ff6[_0x3f16('0x73')](_0x3ddb46,_0x25aa11,function(_0xa0a84a){if(_0xa0a84a){logger['error'](_0x3f16('0xc4'),_0xa0a84a);}else{fs[_0x3f16('0xc5')](_0x3ddb46);}});});});}else{return _0x556ff6[_0x3f16('0x1e')](0xc8);}})[_0x3f16('0x1d')](handleError(_0x556ff6,null));};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.events.js b/server/api/chatInteraction/chatInteraction.events.js
index fcd3597..d586d3a 100644
--- a/server/api/chatInteraction/chatInteraction.events.js
+++ b/server/api/chatInteraction/chatInteraction.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x423f=['findAll','unreadMessages','length','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','ChatMessage','setMaxListeners','save','update','remove','getUsers','then','setDataValue','map'];(function(_0x53d172,_0x46611b){var _0x1bd0a2=function(_0x19fb52){while(--_0x19fb52){_0x53d172['push'](_0x53d172['shift']());}};_0x1bd0a2(++_0x46611b);}(_0x423f,0x1bd));var _0xf423=function(_0xe7641a,_0x1d152d){_0xe7641a=_0xe7641a-0x0;var _0x50c566=_0x423f[_0xe7641a];return _0x50c566;};'use strict';var EventEmitter=require(_0xf423('0x0'));var ChatInteraction=require(_0xf423('0x1'))['db']['ChatInteraction'];var ChatMessage=require(_0xf423('0x1'))['db'][_0xf423('0x2')];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents[_0xf423('0x3')](0x0);var events={'afterCreate':_0xf423('0x4'),'afterUpdate':_0xf423('0x5'),'afterDestroy':_0xf423('0x6')};function emitEvent(_0x14b7cf){return function(_0x3f51bb,_0x6b4865,_0x3e62bc){_0x3f51bb[_0xf423('0x7')]({'attributes':['id'],'raw':!![]})[_0xf423('0x8')](function(_0x389794){_0x3f51bb[_0xf423('0x9')]('Users',_0x389794[_0xf423('0xa')](function(_0x4b794d){return{'id':_0x4b794d['id']};}));return ChatMessage[_0xf423('0xb')]({'where':{'ChatInteractionId':_0x3f51bb['id'],'direction':'in','read':![]},'raw':!![]});})[_0xf423('0x8')](function(_0x47270c){_0x3f51bb[_0xf423('0x9')](_0xf423('0xc'),_0x47270c[_0xf423('0xd')]);ChatInteractionEvents[_0xf423('0xe')](_0x14b7cf+':'+_0x3f51bb['id'],_0x3f51bb);ChatInteractionEvents['emit'](_0x14b7cf,_0x3f51bb);_0x3e62bc(null);})[_0xf423('0xf')](_0x3e62bc(null));};}for(var e in events){if(events[_0xf423('0x10')](e)){var event=events[e];ChatInteraction[_0xf423('0x11')](e,emitEvent(event));}}module[_0xf423('0x12')]=ChatInteractionEvents;
\ No newline at end of file
+var _0xb686=['then','unreadMessages','emit','catch','hasOwnProperty','hook','events','../../mysqldb','ChatInteraction','ChatMessage','setMaxListeners','update','remove','getUsers','setDataValue','Users','map','findAll'];(function(_0x597f7b,_0x511d3c){var _0x41ef72=function(_0x5657cf){while(--_0x5657cf){_0x597f7b['push'](_0x597f7b['shift']());}};_0x41ef72(++_0x511d3c);}(_0xb686,0xa8));var _0x6b68=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0xb686[_0x5ddb1c];return _0x354adc;};'use strict';var EventEmitter=require(_0x6b68('0x0'));var ChatInteraction=require(_0x6b68('0x1'))['db'][_0x6b68('0x2')];var ChatMessage=require(_0x6b68('0x1'))['db'][_0x6b68('0x3')];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents[_0x6b68('0x4')](0x0);var events={'afterCreate':'save','afterUpdate':_0x6b68('0x5'),'afterDestroy':_0x6b68('0x6')};function emitEvent(_0x48ceda){return function(_0x213410,_0x37c231,_0x32282f){_0x213410[_0x6b68('0x7')]({'attributes':['id'],'raw':!![]})['then'](function(_0x36bf7f){_0x213410[_0x6b68('0x8')](_0x6b68('0x9'),_0x36bf7f[_0x6b68('0xa')](function(_0x295df5){return{'id':_0x295df5['id']};}));return ChatMessage[_0x6b68('0xb')]({'where':{'ChatInteractionId':_0x213410['id'],'direction':'in','read':![]},'raw':!![]});})[_0x6b68('0xc')](function(_0xa2336e){_0x213410[_0x6b68('0x8')](_0x6b68('0xd'),_0xa2336e['length']);ChatInteractionEvents[_0x6b68('0xe')](_0x48ceda+':'+_0x213410['id'],_0x213410);ChatInteractionEvents[_0x6b68('0xe')](_0x48ceda,_0x213410);_0x32282f(null);})[_0x6b68('0xf')](_0x32282f(null));};}for(var e in events){if(events[_0x6b68('0x10')](e)){var event=events[e];ChatInteraction[_0x6b68('0x11')](e,emitEvent(event));}}module['exports']=ChatInteractionEvents;
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.model.js b/server/api/chatInteraction/chatInteraction.model.js
index 862f13d..0d2a977 100644
--- a/server/api/chatInteraction/chatInteraction.model.js
+++ b/server/api/chatInteraction/chatInteraction.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbf7d=['format','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','./chatInteraction.attributes','exports','define','ChatInteraction','chat_interactions','changed','closedAt'];(function(_0x51b0dc,_0x5307b7){var _0x13fa89=function(_0x2c880f){while(--_0x2c880f){_0x51b0dc['push'](_0x51b0dc['shift']());}};_0x13fa89(++_0x5307b7);}(_0xbf7d,0xb7));var _0xdbf7=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xbf7d[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xdbf7('0x0'));var util=require(_0xdbf7('0x1'));var logger=require(_0xdbf7('0x2'))(_0xdbf7('0x3'));var moment=require(_0xdbf7('0x4'));var BPromise=require('bluebird');var rp=require(_0xdbf7('0x5'));var fs=require('fs');var path=require(_0xdbf7('0x6'));var rimraf=require(_0xdbf7('0x7'));var config=require('../../config/environment');var attributes=require(_0xdbf7('0x8'));module[_0xdbf7('0x9')]=function(_0x19ca8d,_0x3078d6){return _0x19ca8d[_0xdbf7('0xa')](_0xdbf7('0xb'),attributes,{'tableName':_0xdbf7('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x2293fe,_0x42a4f8,_0x4ce7d2){if(_0x2293fe[_0xdbf7('0xd')]('closed')){_0x2293fe[_0xdbf7('0xe')]=moment()[_0xdbf7('0xf')]('YYYY-MM-DD\x20HH:mm:ss');}_0x4ce7d2(null,_0x2293fe);}},'charset':_0xdbf7('0x10'),'collate':_0xdbf7('0x11')});};
\ No newline at end of file
+var _0x15c9=['../../config/environment','./chatInteraction.attributes','exports','ChatInteraction','chat_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','utf8mb4','utf8mb4_unicode_ci','lodash','util','moment','request-promise','path','rimraf'];(function(_0x43ddfc,_0x4c02bb){var _0x2f0b82=function(_0x1eb5ef){while(--_0x1eb5ef){_0x43ddfc['push'](_0x43ddfc['shift']());}};_0x2f0b82(++_0x4c02bb);}(_0x15c9,0xd2));var _0x915c=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x15c9[_0x2641f9];return _0x585741;};'use strict';var _=require(_0x915c('0x0'));var util=require(_0x915c('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x915c('0x2'));var BPromise=require('bluebird');var rp=require(_0x915c('0x3'));var fs=require('fs');var path=require(_0x915c('0x4'));var rimraf=require(_0x915c('0x5'));var config=require(_0x915c('0x6'));var attributes=require(_0x915c('0x7'));module[_0x915c('0x8')]=function(_0x58658e,_0xdcf7d7){return _0x58658e['define'](_0x915c('0x9'),attributes,{'tableName':_0x915c('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x2ff29a,_0x490ee9,_0x4d8ded){if(_0x2ff29a[_0x915c('0xb')](_0x915c('0xc'))){_0x2ff29a[_0x915c('0xd')]=moment()[_0x915c('0xe')](_0x915c('0xf'));}_0x4d8ded(null,_0x2ff29a);}},'charset':_0x915c('0x10'),'collate':_0x915c('0x11')});};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.rpc.js b/server/api/chatInteraction/chatInteraction.rpc.js
index 25ff719..e164532 100644
--- a/server/api/chatInteraction/chatInteraction.rpc.js
+++ b/server/api/chatInteraction/chatInteraction.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x83f9=['body','options','raw','where','attributes','limit','UpdateChatInteraction','stringify','AddTagsToChatInteraction','ChatInteraction','addTags','omit','ids','spread','AddTags','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','./chatInteraction.socket','register','request','then','info','request\x20sent','debug','error','ChatInteraction,\x20%s,\x20%s','message','result','catch','update'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x83f9,0x10b));var _0x983f=function(_0x4bdbee,_0x324bed){_0x4bdbee=_0x4bdbee-0x0;var _0x26bb41=_0x83f9[_0x4bdbee];return _0x26bb41;};'use strict';var _=require('lodash');var util=require(_0x983f('0x0'));var moment=require(_0x983f('0x1'));var BPromise=require(_0x983f('0x2'));var rs=require(_0x983f('0x3'));var fs=require('fs');var Redis=require(_0x983f('0x4'));var db=require(_0x983f('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x983f('0x6'))(_0x983f('0x7'));var config=require(_0x983f('0x8'));var jayson=require(_0x983f('0x9'));var client=jayson[_0x983f('0xa')][_0x983f('0xb')]({'port':0x232a});config[_0x983f('0xc')]=_['defaults'](config[_0x983f('0xc')],{'host':_0x983f('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x983f('0xc')]));require(_0x983f('0xe'))[_0x983f('0xf')](socket);function respondWithRpcPromise(_0x5dcd0b,_0x214dbe,_0x48e09f){return new BPromise(function(_0x2ba793,_0x117668){return client[_0x983f('0x10')](_0x5dcd0b,_0x48e09f)[_0x983f('0x11')](function(_0x3ccaf9){logger[_0x983f('0x12')]('ChatInteraction,\x20%s,\x20%s',_0x214dbe,_0x983f('0x13'));logger[_0x983f('0x14')]('ChatInteraction,\x20%s,\x20%s,\x20%s',_0x214dbe,'request\x20sent',JSON['stringify'](_0x3ccaf9));if(_0x3ccaf9['error']){if(_0x3ccaf9[_0x983f('0x15')]['code']===0x1f4){logger[_0x983f('0x15')](_0x983f('0x16'),_0x214dbe,_0x3ccaf9['error'][_0x983f('0x17')]);return _0x117668(_0x3ccaf9[_0x983f('0x15')][_0x983f('0x17')]);}logger[_0x983f('0x15')](_0x983f('0x16'),_0x214dbe,_0x3ccaf9[_0x983f('0x15')][_0x983f('0x17')]);return _0x2ba793(_0x3ccaf9[_0x983f('0x15')][_0x983f('0x17')]);}else{logger[_0x983f('0x12')](_0x983f('0x16'),_0x214dbe,_0x983f('0x13'));_0x2ba793(_0x3ccaf9[_0x983f('0x18')]['message']);}})[_0x983f('0x19')](function(_0x443f52){logger[_0x983f('0x15')](_0x983f('0x16'),_0x214dbe,_0x443f52);_0x117668(_0x443f52);});});}exports['UpdateChatInteraction']=function(_0x3c84b6){var _0x110d71=this;return new Promise(function(_0x2a43d1,_0x39b27b){return db['ChatInteraction'][_0x983f('0x1a')](_0x3c84b6[_0x983f('0x1b')],{'raw':_0x3c84b6[_0x983f('0x1c')]?_0x3c84b6[_0x983f('0x1c')][_0x983f('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3c84b6[_0x983f('0x1c')]?_0x3c84b6['options'][_0x983f('0x1e')]||null:null,'attributes':_0x3c84b6[_0x983f('0x1c')]?_0x3c84b6[_0x983f('0x1c')][_0x983f('0x1f')]||null:null,'limit':_0x3c84b6['options']?_0x3c84b6[_0x983f('0x1c')][_0x983f('0x20')]||null:null})[_0x983f('0x11')](function(_0x41c5f0){logger[_0x983f('0x12')](_0x983f('0x21'),_0x3c84b6);logger[_0x983f('0x14')](_0x983f('0x21'),_0x3c84b6,JSON[_0x983f('0x22')](_0x41c5f0));_0x2a43d1(_0x41c5f0);})[_0x983f('0x19')](function(_0x5e8e81){logger[_0x983f('0x15')](_0x983f('0x21'),_0x5e8e81['message'],_0x3c84b6);_0x39b27b(_0x110d71[_0x983f('0x15')](0x1f4,_0x5e8e81['message']));});});};exports[_0x983f('0x23')]=function(_0x15b326){return new Promise(function(_0x1558ba,_0x120796){return db[_0x983f('0x24')]['find']({'where':_0x15b326[_0x983f('0x1c')]?_0x15b326[_0x983f('0x1c')][_0x983f('0x1e')]||null:null})[_0x983f('0x11')](function(_0x2b48cb){if(_0x2b48cb){return _0x2b48cb[_0x983f('0x25')](_0x15b326['body']['ids'],_[_0x983f('0x26')](_0x15b326[_0x983f('0x1b')],[_0x983f('0x27'),'id'])||{});}})[_0x983f('0x28')](function(_0x375926){logger[_0x983f('0x12')]('AddTags',_0x15b326);logger[_0x983f('0x14')](_0x983f('0x29'),_0x15b326,JSON[_0x983f('0x22')](_0x375926));_0x1558ba(_0x375926);})['catch'](function(_0x10a5ea){logger['error'](_0x983f('0x29'),_0x10a5ea[_0x983f('0x17')],_0x15b326);_0x120796(_this[_0x983f('0x15')](0x1f4,_0x10a5ea[_0x983f('0x17')]));});});};
\ No newline at end of file
+var _0xdb07=['request\x20sent','catch','UpdateChatInteraction','update','options','raw','where','attributes','debug','AddTagsToChatInteraction','find','addTags','body','omit','ids','AddTags','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','register','request','then','info','stringify','error','ChatInteraction,\x20%s,\x20%s','message'];(function(_0x36531f,_0x4ba624){var _0x2ee6b0=function(_0x45bad0){while(--_0x45bad0){_0x36531f['push'](_0x36531f['shift']());}};_0x2ee6b0(++_0x4ba624);}(_0xdb07,0x85));var _0x7db0=function(_0x35ebae,_0x4f86c4){_0x35ebae=_0x35ebae-0x0;var _0x1924cf=_0xdb07[_0x35ebae];return _0x1924cf;};'use strict';var _=require('lodash');var util=require(_0x7db0('0x0'));var moment=require(_0x7db0('0x1'));var BPromise=require(_0x7db0('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7db0('0x3'));var db=require(_0x7db0('0x4'))['db'];var utils=require(_0x7db0('0x5'));var logger=require(_0x7db0('0x6'))(_0x7db0('0x7'));var config=require('../../config/environment');var jayson=require(_0x7db0('0x8'));var client=jayson[_0x7db0('0x9')][_0x7db0('0xa')]({'port':0x232a});config['redis']=_[_0x7db0('0xb')](config[_0x7db0('0xc')],{'host':_0x7db0('0xd'),'port':0x18eb});var socket=require(_0x7db0('0xe'))(new Redis(config[_0x7db0('0xc')]));require('./chatInteraction.socket')[_0x7db0('0xf')](socket);function respondWithRpcPromise(_0x40af10,_0x23fb5a,_0x7b2323){return new BPromise(function(_0x4f57ee,_0x2ff6d8){return client[_0x7db0('0x10')](_0x40af10,_0x7b2323)[_0x7db0('0x11')](function(_0x35a886){logger[_0x7db0('0x12')]('ChatInteraction,\x20%s,\x20%s',_0x23fb5a,'request\x20sent');logger['debug']('ChatInteraction,\x20%s,\x20%s,\x20%s',_0x23fb5a,'request\x20sent',JSON[_0x7db0('0x13')](_0x35a886));if(_0x35a886[_0x7db0('0x14')]){if(_0x35a886[_0x7db0('0x14')]['code']===0x1f4){logger[_0x7db0('0x14')](_0x7db0('0x15'),_0x23fb5a,_0x35a886['error'][_0x7db0('0x16')]);return _0x2ff6d8(_0x35a886[_0x7db0('0x14')]['message']);}logger[_0x7db0('0x14')](_0x7db0('0x15'),_0x23fb5a,_0x35a886[_0x7db0('0x14')][_0x7db0('0x16')]);return _0x4f57ee(_0x35a886[_0x7db0('0x14')][_0x7db0('0x16')]);}else{logger[_0x7db0('0x12')](_0x7db0('0x15'),_0x23fb5a,_0x7db0('0x17'));_0x4f57ee(_0x35a886['result'][_0x7db0('0x16')]);}})[_0x7db0('0x18')](function(_0x4f0a38){logger['error']('ChatInteraction,\x20%s,\x20%s',_0x23fb5a,_0x4f0a38);_0x2ff6d8(_0x4f0a38);});});}exports[_0x7db0('0x19')]=function(_0x443706){var _0x3dc3aa=this;return new Promise(function(_0x50be04,_0x1b4af1){return db['ChatInteraction'][_0x7db0('0x1a')](_0x443706['body'],{'raw':_0x443706[_0x7db0('0x1b')]?_0x443706[_0x7db0('0x1b')][_0x7db0('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x443706[_0x7db0('0x1b')]?_0x443706[_0x7db0('0x1b')][_0x7db0('0x1d')]||null:null,'attributes':_0x443706[_0x7db0('0x1b')]?_0x443706[_0x7db0('0x1b')][_0x7db0('0x1e')]||null:null,'limit':_0x443706['options']?_0x443706[_0x7db0('0x1b')]['limit']||null:null})[_0x7db0('0x11')](function(_0x527a68){logger['info'](_0x7db0('0x19'),_0x443706);logger[_0x7db0('0x1f')](_0x7db0('0x19'),_0x443706,JSON[_0x7db0('0x13')](_0x527a68));_0x50be04(_0x527a68);})['catch'](function(_0x228ef7){logger['error'](_0x7db0('0x19'),_0x228ef7[_0x7db0('0x16')],_0x443706);_0x1b4af1(_0x3dc3aa[_0x7db0('0x14')](0x1f4,_0x228ef7[_0x7db0('0x16')]));});});};exports[_0x7db0('0x20')]=function(_0x43bc94){return new Promise(function(_0x5a7e20,_0x15aa40){return db['ChatInteraction'][_0x7db0('0x21')]({'where':_0x43bc94[_0x7db0('0x1b')]?_0x43bc94['options'][_0x7db0('0x1d')]||null:null})[_0x7db0('0x11')](function(_0x1b8e9e){if(_0x1b8e9e){return _0x1b8e9e[_0x7db0('0x22')](_0x43bc94[_0x7db0('0x23')]['ids'],_[_0x7db0('0x24')](_0x43bc94[_0x7db0('0x23')],[_0x7db0('0x25'),'id'])||{});}})['spread'](function(_0x42c70a){logger['info']('AddTags',_0x43bc94);logger[_0x7db0('0x1f')](_0x7db0('0x26'),_0x43bc94,JSON['stringify'](_0x42c70a));_0x5a7e20(_0x42c70a);})['catch'](function(_0x3f0237){logger['error'](_0x7db0('0x26'),_0x3f0237[_0x7db0('0x16')],_0x43bc94);_0x15aa40(_this[_0x7db0('0x14')](0x1f4,_0x3f0237['message']));});});};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.socket.js b/server/api/chatInteraction/chatInteraction.socket.js
index 1312da2..2f5216f 100644
--- a/server/api/chatInteraction/chatInteraction.socket.js
+++ b/server/api/chatInteraction/chatInteraction.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5923=['update','removeListener','register','length','chatInteraction:','./chatInteraction.events','save','remove'];(function(_0x1f5266,_0x559eb4){var _0x16fd54=function(_0x1316b6){while(--_0x1316b6){_0x1f5266['push'](_0x1f5266['shift']());}};_0x16fd54(++_0x559eb4);}(_0x5923,0x185));var _0x3592=function(_0x49cefe,_0x31f709){_0x49cefe=_0x49cefe-0x0;var _0x4da46e=_0x5923[_0x49cefe];return _0x4da46e;};'use strict';var ChatInteractionEvents=require(_0x3592('0x0'));var events=[_0x3592('0x1'),_0x3592('0x2'),_0x3592('0x3')];function createListener(_0x3fa67c,_0x253aa8){return function(_0x7b5697){_0x253aa8['emit'](_0x3fa67c,_0x7b5697);};}function removeListener(_0xe304f4,_0x1e6d33){return function(){ChatInteractionEvents[_0x3592('0x4')](_0xe304f4,_0x1e6d33);};}exports[_0x3592('0x5')]=function(_0x37570b){for(var _0x298e7b=0x0,_0x4d2b4f=events[_0x3592('0x6')];_0x298e7b<_0x4d2b4f;_0x298e7b++){var _0x4f2276=events[_0x298e7b];var _0x552825=createListener(_0x3592('0x7')+_0x4f2276,_0x37570b);ChatInteractionEvents['on'](_0x4f2276,_0x552825);}};
\ No newline at end of file
+var _0xb079=['register','save','remove','update','emit','removeListener'];(function(_0x1a0404,_0x364e3d){var _0x243c1b=function(_0x102e16){while(--_0x102e16){_0x1a0404['push'](_0x1a0404['shift']());}};_0x243c1b(++_0x364e3d);}(_0xb079,0x1c9));var _0x9b07=function(_0x26f5e8,_0x41e832){_0x26f5e8=_0x26f5e8-0x0;var _0x3acdfd=_0xb079[_0x26f5e8];return _0x3acdfd;};'use strict';var ChatInteractionEvents=require('./chatInteraction.events');var events=[_0x9b07('0x0'),_0x9b07('0x1'),_0x9b07('0x2')];function createListener(_0x158a14,_0x22f945){return function(_0x3c199c){_0x22f945[_0x9b07('0x3')](_0x158a14,_0x3c199c);};}function removeListener(_0x14a884,_0x3bf703){return function(){ChatInteractionEvents[_0x9b07('0x4')](_0x14a884,_0x3bf703);};}exports[_0x9b07('0x5')]=function(_0x4a6f57){for(var _0x1ebf90=0x0,_0x2be1ef=events['length'];_0x1ebf90<_0x2be1ef;_0x1ebf90++){var _0x17a4bc=events[_0x1ebf90];var _0x5a0395=createListener('chatInteraction:'+_0x17a4bc,_0x4a6f57);ChatInteractionEvents['on'](_0x17a4bc,_0x5a0395);}};
\ No newline at end of file
diff --git a/server/api/chatInteraction/index.js b/server/api/chatInteraction/index.js
index 7a649eb..801e632 100644
--- a/server/api/chatInteraction/index.js
+++ b/server/api/chatInteraction/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe83a=['path','connect-timeout','express','Router','../../components/interaction/service','./chatInteraction.controller','get','isAuthenticated','index','/describe','describe','/:id','isChatInteractionAuthorized','attachmentDownload','/:id/messages','getMessages','/:id/my_messages','/:id/download','download','post','create','createVidaooSession','join','server/files/attachments/','format','now','originalname','replace','/:id/attachment_upload','single','attachmentUpload','addMessage','/:id/tags','tracked','chat','chatinteraction:addtags','addTags','put','/:id/custom_update','customUpdate','/:id/abandon','/:id/close','close','delete','chatinteraction:destroy','removeTags','multer','util'];(function(_0x1208e4,_0x37baad){var _0x2f401e=function(_0xfaa445){while(--_0xfaa445){_0x1208e4['push'](_0x1208e4['shift']());}};_0x2f401e(++_0x37baad);}(_0xe83a,0x8e));var _0xae83=function(_0x498b80,_0x4a207c){_0x498b80=_0x498b80-0x0;var _0x368941=_0xe83a[_0x498b80];return _0x368941;};'use strict';var multer=require(_0xae83('0x0'));var util=require(_0xae83('0x1'));var path=require(_0xae83('0x2'));var timeout=require(_0xae83('0x3'));var express=require(_0xae83('0x4'));var router=express[_0xae83('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xae83('0x6'));var config=require('../../config/environment');var controller=require(_0xae83('0x7'));router[_0xae83('0x8')]('/',auth[_0xae83('0x9')](),controller[_0xae83('0xa')]);router[_0xae83('0x8')](_0xae83('0xb'),auth[_0xae83('0x9')](),controller[_0xae83('0xc')]);router[_0xae83('0x8')](_0xae83('0xd'),auth[_0xae83('0xe')](),controller['show']);router[_0xae83('0x8')]('/:id/attachment_download',auth['isChatInteractionAuthorized'](),controller[_0xae83('0xf')]);router['get'](_0xae83('0x10'),auth[_0xae83('0x9')](),controller[_0xae83('0x11')]);router[_0xae83('0x8')](_0xae83('0x12'),auth[_0xae83('0xe')](),controller['getMyMessages']);router[_0xae83('0x8')](_0xae83('0x13'),auth[_0xae83('0x9')](),controller[_0xae83('0x14')]);router[_0xae83('0x15')]('/',auth[_0xae83('0x9')](),controller[_0xae83('0x16')]);router[_0xae83('0x15')]('/:id/vidaoo',auth[_0xae83('0x9')](),controller[_0xae83('0x17')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x5bb423,_0x1311a2,_0x249cab){_0x249cab(null,path[_0xae83('0x18')](config['root'],_0xae83('0x19')));},'filename':function(_0x50995e,_0x1ec273,_0x9852fa){_0x9852fa(null,util[_0xae83('0x1a')]('%s-%s',Date[_0xae83('0x1b')](),_0x1ec273[_0xae83('0x1c')][_0xae83('0x1d')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xae83('0x15')](_0xae83('0x1e'),upload[_0xae83('0x1f')]('file'),controller[_0xae83('0x20')]);router['post'](_0xae83('0x10'),auth[_0xae83('0xe')](),controller[_0xae83('0x21')]);router[_0xae83('0x15')](_0xae83('0x22'),auth[_0xae83('0x9')](),interaction[_0xae83('0x23')](_0xae83('0x24'),_0xae83('0x25')),controller[_0xae83('0x26')]);router[_0xae83('0x27')]('/:id',auth['isAuthenticated'](),interaction[_0xae83('0x23')](_0xae83('0x24'),'chatinteraction:update'),controller['update']);router[_0xae83('0x27')](_0xae83('0x28'),controller[_0xae83('0x29')]);router[_0xae83('0x27')](_0xae83('0x2a'),auth['isChatInteractionAuthorized'](),controller['abandon']);router[_0xae83('0x27')](_0xae83('0x2b'),controller[_0xae83('0x2c')]);router[_0xae83('0x2d')](_0xae83('0xd'),auth[_0xae83('0x9')](),interaction[_0xae83('0x23')](_0xae83('0x24'),_0xae83('0x2e')),controller['destroy']);router[_0xae83('0x2d')](_0xae83('0x22'),auth[_0xae83('0x9')](),controller[_0xae83('0x2f')]);module['exports']=router;
\ No newline at end of file
+var _0xf839=['root','server/files/attachments/','format','replace','/:id/attachment_upload','single','file','addMessage','/:id/tags','tracked','chat','chatinteraction:addtags','addTags','put','chatinteraction:update','update','/:id/custom_update','customUpdate','abandon','/:id/close','close','delete','chatinteraction:destroy','removeTags','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./chatInteraction.controller','get','isAuthenticated','index','/describe','describe','/:id','isChatInteractionAuthorized','/:id/attachment_download','attachmentDownload','/:id/messages','getMessages','/:id/my_messages','getMyMessages','download','post','/:id/vidaoo','join'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0xf839,0x1da));var _0x9f83=function(_0x331152,_0x25c1a8){_0x331152=_0x331152-0x0;var _0x2da184=_0xf839[_0x331152];return _0x2da184;};'use strict';var multer=require(_0x9f83('0x0'));var util=require('util');var path=require(_0x9f83('0x1'));var timeout=require(_0x9f83('0x2'));var express=require(_0x9f83('0x3'));var router=express[_0x9f83('0x4')]();var fs_extra=require(_0x9f83('0x5'));var auth=require(_0x9f83('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x9f83('0x7'));var controller=require(_0x9f83('0x8'));router[_0x9f83('0x9')]('/',auth[_0x9f83('0xa')](),controller[_0x9f83('0xb')]);router[_0x9f83('0x9')](_0x9f83('0xc'),auth['isAuthenticated'](),controller[_0x9f83('0xd')]);router[_0x9f83('0x9')](_0x9f83('0xe'),auth[_0x9f83('0xf')](),controller['show']);router['get'](_0x9f83('0x10'),auth[_0x9f83('0xf')](),controller[_0x9f83('0x11')]);router[_0x9f83('0x9')](_0x9f83('0x12'),auth['isAuthenticated'](),controller[_0x9f83('0x13')]);router['get'](_0x9f83('0x14'),auth[_0x9f83('0xf')](),controller[_0x9f83('0x15')]);router['get']('/:id/download',auth['isAuthenticated'](),controller[_0x9f83('0x16')]);router[_0x9f83('0x17')]('/',auth['isAuthenticated'](),controller['create']);router[_0x9f83('0x17')](_0x9f83('0x18'),auth[_0x9f83('0xa')](),controller['createVidaooSession']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x53a4b5,_0x488b11,_0x4ac108){_0x4ac108(null,path[_0x9f83('0x19')](config[_0x9f83('0x1a')],_0x9f83('0x1b')));},'filename':function(_0x22cb30,_0x134adb,_0xb4f4cc){_0xb4f4cc(null,util[_0x9f83('0x1c')]('%s-%s',Date['now'](),_0x134adb['originalname'][_0x9f83('0x1d')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x9f83('0x17')](_0x9f83('0x1e'),upload[_0x9f83('0x1f')](_0x9f83('0x20')),controller['attachmentUpload']);router[_0x9f83('0x17')](_0x9f83('0x12'),auth['isChatInteractionAuthorized'](),controller[_0x9f83('0x21')]);router['post'](_0x9f83('0x22'),auth['isAuthenticated'](),interaction[_0x9f83('0x23')](_0x9f83('0x24'),_0x9f83('0x25')),controller[_0x9f83('0x26')]);router[_0x9f83('0x27')](_0x9f83('0xe'),auth[_0x9f83('0xa')](),interaction[_0x9f83('0x23')](_0x9f83('0x24'),_0x9f83('0x28')),controller[_0x9f83('0x29')]);router[_0x9f83('0x27')](_0x9f83('0x2a'),controller[_0x9f83('0x2b')]);router[_0x9f83('0x27')]('/:id/abandon',auth[_0x9f83('0xf')](),controller[_0x9f83('0x2c')]);router[_0x9f83('0x27')](_0x9f83('0x2d'),controller[_0x9f83('0x2e')]);router[_0x9f83('0x2f')](_0x9f83('0xe'),auth[_0x9f83('0xa')](),interaction['tracked'](_0x9f83('0x24'),_0x9f83('0x30')),controller['destroy']);router[_0x9f83('0x2f')](_0x9f83('0x22'),auth[_0x9f83('0xa')](),controller[_0x9f83('0x31')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.attributes.js b/server/api/chatInternalMessage/chatInternalMessage.attributes.js
index 7ebf841..a8d45d5 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.attributes.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9a39=['sequelize','exports','BOOLEAN','INTEGER'];(function(_0x1be07e,_0x8e9930){var _0x52b7e5=function(_0x48289d){while(--_0x48289d){_0x1be07e['push'](_0x1be07e['shift']());}};_0x52b7e5(++_0x8e9930);}(_0x9a39,0x104));var _0x99a3=function(_0x5b772f,_0x28043f){_0x5b772f=_0x5b772f-0x0;var _0x3ff5c8=_0x9a39[_0x5b772f];return _0x3ff5c8;};'use strict';var Sequelize=require(_0x99a3('0x0'));module[_0x99a3('0x1')]={'body':{'type':Sequelize['TEXT']('medium'),'allowNull':![]},'read':{'type':Sequelize[_0x99a3('0x2')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0x99a3('0x3')]}};
\ No newline at end of file
+var _0x67d3=['sequelize','exports','TEXT','medium','INTEGER'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x67d3,0x1a9));var _0x367d=function(_0x18d479,_0x5ee508){_0x18d479=_0x18d479-0x0;var _0x2cf821=_0x67d3[_0x18d479];return _0x2cf821;};'use strict';var Sequelize=require(_0x367d('0x0'));module[_0x367d('0x1')]={'body':{'type':Sequelize[_0x367d('0x2')](_0x367d('0x3')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0x367d('0x4')]}};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.controller.js b/server/api/chatInternalMessage/chatInternalMessage.controller.js
index 0d77f74..c393ded 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.controller.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf91e=['findAll','rows','catch','show','params','keys','find','update','body','destroy','describe','messages','lastMessageAt','createdAt','lastMessage','format','YYYY-MM-DD\x20HH:mm:ss','User','agent','admin','user','role','userpic','internal','online','lastLoginAt','showWebBar','-online','VoiceQueue','VoiceQueues','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','UserProfileResource','isEmpty','resourceId','push','FromId','ToId','read','-createdAt','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','ejs','fs-extra','squel','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatInternalMessage.socket','register','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','then','error','stack','send','map','ChatInternalMessage','rawAttributes','fieldName','type','key','name','query','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','filters','pick','filter','merge','VIRTUAL','options','where','includeAll','include'];(function(_0x1fa0e7,_0x4aa291){var _0x4b8d19=function(_0x572c1e){while(--_0x572c1e){_0x1fa0e7['push'](_0x1fa0e7['shift']());}};_0x4b8d19(++_0x4aa291);}(_0xf91e,0x176));var _0xef91=function(_0xfaecee,_0x2b764c){_0xfaecee=_0xfaecee-0x0;var _0x306c65=_0xf91e[_0xfaecee];return _0x306c65;};'use strict';var emlformat=require(_0xef91('0x0'));var rimraf=require(_0xef91('0x1'));var zipdir=require(_0xef91('0x2'));var jsonpatch=require(_0xef91('0x3'));var rp=require(_0xef91('0x4'));var moment=require(_0xef91('0x5'));var BPromise=require(_0xef91('0x6'));var Mustache=require(_0xef91('0x7'));var util=require(_0xef91('0x8'));var path=require('path');var sox=require(_0xef91('0x9'));var csv=require('to-csv');var ejs=require(_0xef91('0xa'));var fs=require('fs');var fs_extra=require(_0xef91('0xb'));var _=require('lodash');var squel=require(_0xef91('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xef91('0xd'));var toCsv=require('to-csv');var querystring=require(_0xef91('0xe'));var Papa=require('papaparse');var Redis=require(_0xef91('0xf'));var authService=require(_0xef91('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0xef91('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xef91('0x12'))('api');var utils=require(_0xef91('0x13'));var config=require(_0xef91('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0xef91('0x15'))['db'];config[_0xef91('0x16')]=_[_0xef91('0x17')](config[_0xef91('0x16')],{'host':_0xef91('0x18'),'port':0x18eb});var socket=require(_0xef91('0x19'))(new Redis(config[_0xef91('0x16')]));require(_0xef91('0x1a'))[_0xef91('0x1b')](socket);function respondWithStatusCode(_0x58be23,_0x57a8e9){_0x57a8e9=_0x57a8e9||0xcc;return function(_0x3bec80){if(_0x3bec80){return _0x58be23[_0xef91('0x1c')](_0x57a8e9);}return _0x58be23[_0xef91('0x1d')](_0x57a8e9)[_0xef91('0x1e')]();};}function respondWithResult(_0x21ba3e,_0x369575){_0x369575=_0x369575||0xc8;return function(_0x183a8f){if(_0x183a8f){return _0x21ba3e[_0xef91('0x1d')](_0x369575)[_0xef91('0x1f')](_0x183a8f);}};}function respondWithFilteredResult(_0x2c364a,_0x16de23){return function(_0x384ea0){if(_0x384ea0){var _0x10b208=typeof _0x16de23[_0xef91('0x20')]==='undefined'&&typeof _0x16de23[_0xef91('0x21')]===_0xef91('0x22');var _0x7a2754=_0x384ea0[_0xef91('0x23')];var _0xf2af0=_0x10b208?0x0:_0x16de23[_0xef91('0x20')];var _0x3d7196=_0x10b208?_0x384ea0[_0xef91('0x23')]:_0x16de23[_0xef91('0x20')]+_0x16de23[_0xef91('0x21')];var _0x1be159;if(_0x3d7196>=_0x7a2754){_0x3d7196=_0x7a2754;_0x1be159=0xc8;}else{_0x1be159=0xce;}_0x2c364a[_0xef91('0x1d')](_0x1be159);return _0x2c364a[_0xef91('0x24')](_0xef91('0x25'),_0xf2af0+'-'+_0x3d7196+'/'+_0x7a2754)[_0xef91('0x1f')](_0x384ea0);}return null;};}function patchUpdates(_0x408c73){return function(_0x328331){try{jsonpatch[_0xef91('0x26')](_0x328331,_0x408c73,!![]);}catch(_0x4dbdb1){return BPromise[_0xef91('0x27')](_0x4dbdb1);}return _0x328331[_0xef91('0x28')]();};}function saveUpdates(_0x528c96,_0x26a03b){return function(_0x3f0978){if(_0x3f0978){return _0x3f0978['update'](_0x528c96)[_0xef91('0x29')](function(_0x4802ca){return _0x4802ca;});}return null;};}function removeEntity(_0x1205d8,_0x286549){return function(_0x2823a2){if(_0x2823a2){return _0x2823a2['destroy']()[_0xef91('0x29')](function(){_0x1205d8[_0xef91('0x1d')](0xcc)[_0xef91('0x1e')]();});}};}function handleEntityNotFound(_0x30d3ff,_0x2b54cb){return function(_0x3fcb6f){if(!_0x3fcb6f){_0x30d3ff[_0xef91('0x1c')](0x194);}return _0x3fcb6f;};}function handleError(_0x22d2bd,_0x54214a){_0x54214a=_0x54214a||0x1f4;return function(_0xcbdde0){logger[_0xef91('0x2a')](_0xcbdde0[_0xef91('0x2b')]);if(_0xcbdde0['name']){delete _0xcbdde0['name'];}_0x22d2bd[_0xef91('0x1d')](_0x54214a)[_0xef91('0x2c')](_0xcbdde0);};}exports['index']=function(_0x7f4576,_0x5775f6){var _0x15a876={},_0x56cad0={},_0x4a34db={'count':0x0,'rows':[]};var _0x306e80=_[_0xef91('0x2d')](db[_0xef91('0x2e')][_0xef91('0x2f')],function(_0x35dd72){return{'name':_0x35dd72[_0xef91('0x30')],'type':_0x35dd72[_0xef91('0x31')][_0xef91('0x32')]};});_0x56cad0['model']=_['map'](_0x306e80,_0xef91('0x33'));_0x56cad0[_0xef91('0x34')]=_['keys'](_0x7f4576[_0xef91('0x34')]);_0x56cad0['filters']=_[_0xef91('0x35')](_0x56cad0[_0xef91('0x36')],_0x56cad0[_0xef91('0x34')]);_0x15a876[_0xef91('0x37')]=_[_0xef91('0x35')](_0x56cad0[_0xef91('0x36')],qs[_0xef91('0x38')](_0x7f4576[_0xef91('0x34')][_0xef91('0x38')]));_0x15a876[_0xef91('0x37')]=_0x15a876[_0xef91('0x37')][_0xef91('0x39')]?_0x15a876['attributes']:_0x56cad0['model'];if(!_0x7f4576[_0xef91('0x34')][_0xef91('0x3a')]('nolimit')){_0x15a876[_0xef91('0x21')]=qs[_0xef91('0x21')](_0x7f4576['query'][_0xef91('0x21')]);_0x15a876[_0xef91('0x20')]=qs['offset'](_0x7f4576[_0xef91('0x34')][_0xef91('0x20')]);}_0x15a876[_0xef91('0x3b')]=qs[_0xef91('0x3c')](_0x7f4576[_0xef91('0x34')]['sort']);_0x15a876['where']=qs[_0xef91('0x3d')](_[_0xef91('0x3e')](_0x7f4576['query'],_0x56cad0['filters']),_0x306e80);if(_0x7f4576['query'][_0xef91('0x3f')]){_0x15a876['where']=_[_0xef91('0x40')](_0x15a876['where'],{'$or':_[_0xef91('0x2d')](_0x306e80,function(_0x25c342){if(_0x25c342[_0xef91('0x31')]!==_0xef91('0x41')){var _0x318ed7={};_0x318ed7[_0x25c342[_0xef91('0x33')]]={'$like':'%'+_0x7f4576[_0xef91('0x34')]['filter']+'%'};return _0x318ed7;}})});}_0x15a876=_[_0xef91('0x40')]({},_0x15a876,_0x7f4576[_0xef91('0x42')]);var _0x5369ad={'where':_0x15a876[_0xef91('0x43')]};return db[_0xef91('0x2e')][_0xef91('0x23')](_0x5369ad)[_0xef91('0x29')](function(_0x5e70e0){_0x4a34db[_0xef91('0x23')]=_0x5e70e0;if(_0x7f4576[_0xef91('0x34')][_0xef91('0x44')]){_0x15a876[_0xef91('0x45')]=[{'all':!![]}];}return db[_0xef91('0x2e')][_0xef91('0x46')](_0x15a876);})['then'](function(_0x258918){_0x4a34db[_0xef91('0x47')]=_0x258918;return _0x4a34db;})[_0xef91('0x29')](respondWithFilteredResult(_0x5775f6,_0x15a876))[_0xef91('0x48')](handleError(_0x5775f6,null));};exports[_0xef91('0x49')]=function(_0x236fe3,_0x5e3117){var _0x2e12bc={'raw':!![],'where':{'id':_0x236fe3[_0xef91('0x4a')]['id']}},_0x3c047f={};_0x3c047f['model']=_[_0xef91('0x4b')](db['ChatInternalMessage'][_0xef91('0x2f')]);_0x3c047f[_0xef91('0x34')]=_[_0xef91('0x4b')](_0x236fe3[_0xef91('0x34')]);_0x3c047f[_0xef91('0x3d')]=_[_0xef91('0x35')](_0x3c047f[_0xef91('0x36')],_0x3c047f['query']);_0x2e12bc['attributes']=_[_0xef91('0x35')](_0x3c047f[_0xef91('0x36')],qs['fields'](_0x236fe3[_0xef91('0x34')][_0xef91('0x38')]));_0x2e12bc['attributes']=_0x2e12bc[_0xef91('0x37')]['length']?_0x2e12bc[_0xef91('0x37')]:_0x3c047f['model'];if(_0x236fe3['query']['includeAll']){_0x2e12bc[_0xef91('0x45')]=[{'all':!![]}];}_0x2e12bc=_[_0xef91('0x40')]({},_0x2e12bc,_0x236fe3['options']);return db[_0xef91('0x2e')][_0xef91('0x4c')](_0x2e12bc)[_0xef91('0x29')](handleEntityNotFound(_0x5e3117,null))[_0xef91('0x29')](respondWithResult(_0x5e3117,null))['catch'](handleError(_0x5e3117,null));};exports['create']=function(_0x46b195,_0x5704d9){return db['ChatInternalMessage']['create'](_0x46b195['body'],{})[_0xef91('0x29')](respondWithResult(_0x5704d9,0xc9))[_0xef91('0x48')](handleError(_0x5704d9,null));};exports[_0xef91('0x4d')]=function(_0x22629d,_0x330eb2){if(_0x22629d[_0xef91('0x4e')]['id']){delete _0x22629d[_0xef91('0x4e')]['id'];}return db[_0xef91('0x2e')][_0xef91('0x4c')]({'where':{'id':_0x22629d[_0xef91('0x4a')]['id']}})[_0xef91('0x29')](handleEntityNotFound(_0x330eb2,null))[_0xef91('0x29')](saveUpdates(_0x22629d[_0xef91('0x4e')],null))[_0xef91('0x29')](respondWithResult(_0x330eb2,null))['catch'](handleError(_0x330eb2,null));};exports[_0xef91('0x4f')]=function(_0x14ab48,_0x502248){return db[_0xef91('0x2e')][_0xef91('0x4c')]({'where':{'id':_0x14ab48[_0xef91('0x4a')]['id']}})[_0xef91('0x29')](handleEntityNotFound(_0x502248,null))[_0xef91('0x29')](removeEntity(_0x502248,null))[_0xef91('0x48')](handleError(_0x502248,null));};exports[_0xef91('0x50')]=function(_0x113853,_0x4477c5){return db['ChatInternalMessage']['describe']()[_0xef91('0x29')](respondWithResult(_0x4477c5,null))[_0xef91('0x48')](handleError(_0x4477c5,null));};function wrapUser(_0x1a2882){return function(_0x38ce40){var _0xd4745=_0x1a2882['get']({'plain':!![]});_0xd4745[_0xef91('0x51')]=[];if(_0x38ce40){_0xd4745[_0xef91('0x52')]=_0x38ce40[_0xef91('0x53')];_0xd4745[_0xef91('0x54')]=_0x38ce40;}else{_0xd4745[_0xef91('0x52')]=moment(0x0)[_0xef91('0x55')](_0xef91('0x56'));_0xd4745[_0xef91('0x54')]={};}return _0xd4745;};}exports['getUsers']=function(_0xfade99,_0x52d4d6,_0x58a52d){var _0x23335f=[];return db[_0xef91('0x57')][_0xef91('0x46')]({'where':{'role':[_0xef91('0x58'),_0xef91('0x59'),_0xef91('0x5a')]},'attributes':['id','fullname','name',_0xef91('0x5b'),_0xef91('0x5c'),_0xef91('0x5d'),_0xef91('0x5e'),_0xef91('0x5f'),'allowmessenger',_0xef91('0x60')],'order':qs['sort'](_0xef91('0x61')),'include':[{'model':db[_0xef91('0x62')],'as':_0xef91('0x63'),'attributes':['id',_0xef91('0x33'),_0xef91('0x31')],'through':{'attributes':[]}}]})[_0xef91('0x29')](function(_0x361282){if(_0x361282){var _0x11aec5=_0xfade99[_0xef91('0x5a')]['get']({'plain':!![]});if(!_0x11aec5)throw new Error(_0xef91('0x64'));if(_0x11aec5['role']===_0xef91('0x5a')){return db[_0xef91('0x65')][_0xef91('0x4c')]({'where':{'name':'Agents','userProfileId':_0x11aec5[_0xef91('0x66')]},'raw':!![]})['then'](function(_0x34cbbd){if(_0x34cbbd){if(_0x34cbbd['autoAssociation']===0x0){return db[_0xef91('0x67')][_0xef91('0x46')]({'where':{'sectionId':_0x34cbbd['id']},'raw':!![]})[_0xef91('0x29')](function(_0x2ab10e){var _0x500411=[];if(_[_0xef91('0x68')](_0x2ab10e)){_0x500411=_[_0xef91('0x3f')](_0x361282,function(_0x4876f6){if(_0x4876f6[_0xef91('0x5b')]!=='agent'){return _0x4876f6;}});return _0x500411;}else{for(var _0x2b122d=0x0;_0x2b122d<_0x361282['length'];_0x2b122d++){var _0x53e16d=_0x361282[_0x2b122d];if(_0x53e16d[_0xef91('0x5b')]==='agent'){var _0x539ecf=_[_0xef91('0x4c')](_0x2ab10e,function(_0x20da17){return _0x20da17[_0xef91('0x69')]===_0x53e16d['id'];});if(_0x539ecf)_0x500411[_0xef91('0x6a')](_0x53e16d);}else{_0x500411['push'](_0x53e16d);}}return _0x500411;}});}else{return _0x361282;}}else{var _0x950a7c=_[_0xef91('0x3f')](_0x361282,function(_0x683395){if(_0x683395[_0xef91('0x5b')]!==_0xef91('0x58')){return _0x683395;}});return _0x950a7c;}});}else{return _0x361282;}}})['then'](function(_0x38d9d8){var _0x879c=[];if(_0x38d9d8){_0x23335f=_0x38d9d8;for(var _0x44442d=0x0;_0x44442d<_0x38d9d8[_0xef91('0x39')];_0x44442d+=0x1){_0x23335f[_0x44442d][_0xef91('0x51')]=[];_0x879c['push'](db[_0xef91('0x2e')]['find']({'where':{'FromId':[_0xfade99['user']['id'],_0x38d9d8[_0x44442d]['id']],'ToId':[_0xfade99[_0xef91('0x5a')]['id'],_0x38d9d8[_0x44442d]['id']],'ChatGroupId':null},'attributes':['id',_0xef91('0x53'),_0xef91('0x6b'),_0xef91('0x6c'),_0xef91('0x6d'),_0xef91('0x4e')],'order':qs[_0xef91('0x3c')](_0xef91('0x6e')),'limit':0x1,'offset':0x0,'raw':!![]})[_0xef91('0x29')](wrapUser(_0x38d9d8[_0x44442d])));}return BPromise['all'](_0x879c);}return[];})[_0xef91('0x29')](function(_0x1cf789){return{'rows':_0x1cf789,'count':_0x1cf789[_0xef91('0x39')]};})[_0xef91('0x29')](respondWithResult(_0x52d4d6,null))[_0xef91('0x48')](handleError(_0x52d4d6,null));};
\ No newline at end of file
+var _0x8698=['map','ChatInternalMessage','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','destroy','describe','messages','lastMessageAt','createdAt','lastMessage','format','YYYY-MM-DD\x20HH:mm:ss','admin','userpic','internal','online','lastLoginAt','allowmessenger','showWebBar','VoiceQueues','user','get','role','UserProfileSection','Agents','autoAssociation','UserProfileResource','isEmpty','agent','resourceId','push','ToId','read','all','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','redis','defaults','localhost','socket.io-emitter','./chatInternalMessage.socket','register','sendStatus','undefined','limit','count','offset','set','Content-Range','json','reject','update','then','end','error','name','status','send'];(function(_0x2e9187,_0x3763f6){var _0x1fc3a8=function(_0xb30d96){while(--_0xb30d96){_0x2e9187['push'](_0x2e9187['shift']());}};_0x1fc3a8(++_0x3763f6);}(_0x8698,0xa9));var _0x8869=function(_0x220fd2,_0x3acd91){_0x220fd2=_0x220fd2-0x0;var _0x1e4faf=_0x8698[_0x220fd2];return _0x1e4faf;};'use strict';var emlformat=require(_0x8869('0x0'));var rimraf=require(_0x8869('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x8869('0x2'));var rp=require(_0x8869('0x3'));var moment=require('moment');var BPromise=require(_0x8869('0x4'));var Mustache=require(_0x8869('0x5'));var util=require(_0x8869('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0x8869('0x7'));var ejs=require(_0x8869('0x8'));var fs=require('fs');var fs_extra=require(_0x8869('0x9'));var _=require(_0x8869('0xa'));var squel=require(_0x8869('0xb'));var crypto=require(_0x8869('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x8869('0xd'));var toCsv=require(_0x8869('0x7'));var querystring=require(_0x8869('0xe'));var Papa=require(_0x8869('0xf'));var Redis=require('ioredis');var authService=require(_0x8869('0x10'));var qs=require(_0x8869('0x11'));var as=require(_0x8869('0x12'));var hardwareService=require(_0x8869('0x13'));var logger=require(_0x8869('0x14'))('api');var utils=require(_0x8869('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x8869('0x16'));var db=require('../../mysqldb')['db'];config[_0x8869('0x17')]=_[_0x8869('0x18')](config[_0x8869('0x17')],{'host':_0x8869('0x19'),'port':0x18eb});var socket=require(_0x8869('0x1a'))(new Redis(config[_0x8869('0x17')]));require(_0x8869('0x1b'))[_0x8869('0x1c')](socket);function respondWithStatusCode(_0x1ecc54,_0x45414a){_0x45414a=_0x45414a||0xcc;return function(_0x32cfcc){if(_0x32cfcc){return _0x1ecc54[_0x8869('0x1d')](_0x45414a);}return _0x1ecc54['status'](_0x45414a)['end']();};}function respondWithResult(_0x514e27,_0x161c24){_0x161c24=_0x161c24||0xc8;return function(_0x5a74fd){if(_0x5a74fd){return _0x514e27['status'](_0x161c24)['json'](_0x5a74fd);}};}function respondWithFilteredResult(_0x6393f5,_0x483af8){return function(_0x580a6b){if(_0x580a6b){var _0x3eb117=typeof _0x483af8['offset']===_0x8869('0x1e')&&typeof _0x483af8[_0x8869('0x1f')]===_0x8869('0x1e');var _0x4d1079=_0x580a6b[_0x8869('0x20')];var _0x233c15=_0x3eb117?0x0:_0x483af8[_0x8869('0x21')];var _0x343f22=_0x3eb117?_0x580a6b[_0x8869('0x20')]:_0x483af8[_0x8869('0x21')]+_0x483af8['limit'];var _0x519c47;if(_0x343f22>=_0x4d1079){_0x343f22=_0x4d1079;_0x519c47=0xc8;}else{_0x519c47=0xce;}_0x6393f5['status'](_0x519c47);return _0x6393f5[_0x8869('0x22')](_0x8869('0x23'),_0x233c15+'-'+_0x343f22+'/'+_0x4d1079)[_0x8869('0x24')](_0x580a6b);}return null;};}function patchUpdates(_0x582e2e){return function(_0x3f53a3){try{jsonpatch['apply'](_0x3f53a3,_0x582e2e,!![]);}catch(_0x3b009f){return BPromise[_0x8869('0x25')](_0x3b009f);}return _0x3f53a3['save']();};}function saveUpdates(_0x3aa6a8,_0x51c422){return function(_0x47d32a){if(_0x47d32a){return _0x47d32a[_0x8869('0x26')](_0x3aa6a8)[_0x8869('0x27')](function(_0x526094){return _0x526094;});}return null;};}function removeEntity(_0x15d577,_0x3382d1){return function(_0xe640b9){if(_0xe640b9){return _0xe640b9['destroy']()[_0x8869('0x27')](function(){_0x15d577['status'](0xcc)[_0x8869('0x28')]();});}};}function handleEntityNotFound(_0x3d63ef,_0xe5cbc4){return function(_0x1d8d9a){if(!_0x1d8d9a){_0x3d63ef[_0x8869('0x1d')](0x194);}return _0x1d8d9a;};}function handleError(_0x5b62b0,_0x1dec1b){_0x1dec1b=_0x1dec1b||0x1f4;return function(_0x4d6488){logger[_0x8869('0x29')](_0x4d6488['stack']);if(_0x4d6488[_0x8869('0x2a')]){delete _0x4d6488[_0x8869('0x2a')];}_0x5b62b0[_0x8869('0x2b')](_0x1dec1b)[_0x8869('0x2c')](_0x4d6488);};}exports['index']=function(_0x13df95,_0x5efa97){var _0x36ca21={},_0x53d2e4={},_0x2596b6={'count':0x0,'rows':[]};var _0x51ea45=_[_0x8869('0x2d')](db[_0x8869('0x2e')][_0x8869('0x2f')],function(_0x247912){return{'name':_0x247912['fieldName'],'type':_0x247912[_0x8869('0x30')][_0x8869('0x31')]};});_0x53d2e4[_0x8869('0x32')]=_[_0x8869('0x2d')](_0x51ea45,'name');_0x53d2e4[_0x8869('0x33')]=_[_0x8869('0x34')](_0x13df95[_0x8869('0x33')]);_0x53d2e4[_0x8869('0x35')]=_[_0x8869('0x36')](_0x53d2e4['model'],_0x53d2e4[_0x8869('0x33')]);_0x36ca21[_0x8869('0x37')]=_[_0x8869('0x36')](_0x53d2e4[_0x8869('0x32')],qs[_0x8869('0x38')](_0x13df95['query'][_0x8869('0x38')]));_0x36ca21['attributes']=_0x36ca21[_0x8869('0x37')][_0x8869('0x39')]?_0x36ca21['attributes']:_0x53d2e4[_0x8869('0x32')];if(!_0x13df95[_0x8869('0x33')][_0x8869('0x3a')](_0x8869('0x3b'))){_0x36ca21[_0x8869('0x1f')]=qs[_0x8869('0x1f')](_0x13df95['query'][_0x8869('0x1f')]);_0x36ca21[_0x8869('0x21')]=qs[_0x8869('0x21')](_0x13df95[_0x8869('0x33')][_0x8869('0x21')]);}_0x36ca21[_0x8869('0x3c')]=qs['sort'](_0x13df95[_0x8869('0x33')][_0x8869('0x3d')]);_0x36ca21[_0x8869('0x3e')]=qs['filters'](_[_0x8869('0x3f')](_0x13df95[_0x8869('0x33')],_0x53d2e4[_0x8869('0x35')]),_0x51ea45);if(_0x13df95[_0x8869('0x33')][_0x8869('0x40')]){_0x36ca21[_0x8869('0x3e')]=_[_0x8869('0x41')](_0x36ca21[_0x8869('0x3e')],{'$or':_[_0x8869('0x2d')](_0x51ea45,function(_0x29c118){if(_0x29c118[_0x8869('0x30')]!=='VIRTUAL'){var _0x30dc8f={};_0x30dc8f[_0x29c118[_0x8869('0x2a')]]={'$like':'%'+_0x13df95[_0x8869('0x33')][_0x8869('0x40')]+'%'};return _0x30dc8f;}})});}_0x36ca21=_[_0x8869('0x41')]({},_0x36ca21,_0x13df95[_0x8869('0x42')]);var _0x40b824={'where':_0x36ca21[_0x8869('0x3e')]};return db['ChatInternalMessage'][_0x8869('0x20')](_0x40b824)[_0x8869('0x27')](function(_0x39367d){_0x2596b6[_0x8869('0x20')]=_0x39367d;if(_0x13df95[_0x8869('0x33')][_0x8869('0x43')]){_0x36ca21[_0x8869('0x44')]=[{'all':!![]}];}return db[_0x8869('0x2e')][_0x8869('0x45')](_0x36ca21);})['then'](function(_0x33a6f8){_0x2596b6[_0x8869('0x46')]=_0x33a6f8;return _0x2596b6;})[_0x8869('0x27')](respondWithFilteredResult(_0x5efa97,_0x36ca21))[_0x8869('0x47')](handleError(_0x5efa97,null));};exports[_0x8869('0x48')]=function(_0x4708cf,_0x111541){var _0x14a87d={'raw':!![],'where':{'id':_0x4708cf[_0x8869('0x49')]['id']}},_0x153d30={};_0x153d30[_0x8869('0x32')]=_['keys'](db[_0x8869('0x2e')][_0x8869('0x2f')]);_0x153d30[_0x8869('0x33')]=_[_0x8869('0x34')](_0x4708cf[_0x8869('0x33')]);_0x153d30['filters']=_[_0x8869('0x36')](_0x153d30[_0x8869('0x32')],_0x153d30[_0x8869('0x33')]);_0x14a87d[_0x8869('0x37')]=_[_0x8869('0x36')](_0x153d30['model'],qs[_0x8869('0x38')](_0x4708cf[_0x8869('0x33')][_0x8869('0x38')]));_0x14a87d[_0x8869('0x37')]=_0x14a87d['attributes'][_0x8869('0x39')]?_0x14a87d[_0x8869('0x37')]:_0x153d30['model'];if(_0x4708cf[_0x8869('0x33')][_0x8869('0x43')]){_0x14a87d[_0x8869('0x44')]=[{'all':!![]}];}_0x14a87d=_['merge']({},_0x14a87d,_0x4708cf[_0x8869('0x42')]);return db[_0x8869('0x2e')][_0x8869('0x4a')](_0x14a87d)[_0x8869('0x27')](handleEntityNotFound(_0x111541,null))[_0x8869('0x27')](respondWithResult(_0x111541,null))['catch'](handleError(_0x111541,null));};exports[_0x8869('0x4b')]=function(_0x54d3ba,_0xeb3b8c){return db[_0x8869('0x2e')][_0x8869('0x4b')](_0x54d3ba[_0x8869('0x4c')],{})['then'](respondWithResult(_0xeb3b8c,0xc9))[_0x8869('0x47')](handleError(_0xeb3b8c,null));};exports[_0x8869('0x26')]=function(_0x5d1788,_0x749edb){if(_0x5d1788[_0x8869('0x4c')]['id']){delete _0x5d1788[_0x8869('0x4c')]['id'];}return db[_0x8869('0x2e')][_0x8869('0x4a')]({'where':{'id':_0x5d1788[_0x8869('0x49')]['id']}})[_0x8869('0x27')](handleEntityNotFound(_0x749edb,null))[_0x8869('0x27')](saveUpdates(_0x5d1788['body'],null))[_0x8869('0x27')](respondWithResult(_0x749edb,null))[_0x8869('0x47')](handleError(_0x749edb,null));};exports[_0x8869('0x4d')]=function(_0xfe070a,_0x414e5b){return db[_0x8869('0x2e')][_0x8869('0x4a')]({'where':{'id':_0xfe070a[_0x8869('0x49')]['id']}})[_0x8869('0x27')](handleEntityNotFound(_0x414e5b,null))[_0x8869('0x27')](removeEntity(_0x414e5b,null))[_0x8869('0x47')](handleError(_0x414e5b,null));};exports[_0x8869('0x4e')]=function(_0x140526,_0x53f3e4){return db[_0x8869('0x2e')][_0x8869('0x4e')]()['then'](respondWithResult(_0x53f3e4,null))['catch'](handleError(_0x53f3e4,null));};function wrapUser(_0x237f8f){return function(_0x45b065){var _0x2316b0=_0x237f8f['get']({'plain':!![]});_0x2316b0[_0x8869('0x4f')]=[];if(_0x45b065){_0x2316b0[_0x8869('0x50')]=_0x45b065[_0x8869('0x51')];_0x2316b0[_0x8869('0x52')]=_0x45b065;}else{_0x2316b0[_0x8869('0x50')]=moment(0x0)[_0x8869('0x53')](_0x8869('0x54'));_0x2316b0['lastMessage']={};}return _0x2316b0;};}exports['getUsers']=function(_0x3934c7,_0x15b48d,_0x47da51){var _0x1335ce=[];return db['User'][_0x8869('0x45')]({'where':{'role':['agent',_0x8869('0x55'),'user']},'attributes':['id','fullname',_0x8869('0x2a'),'role',_0x8869('0x56'),_0x8869('0x57'),_0x8869('0x58'),_0x8869('0x59'),_0x8869('0x5a'),_0x8869('0x5b')],'order':qs[_0x8869('0x3d')]('-online'),'include':[{'model':db['VoiceQueue'],'as':_0x8869('0x5c'),'attributes':['id',_0x8869('0x2a'),'type'],'through':{'attributes':[]}}]})[_0x8869('0x27')](function(_0x2e6947){if(_0x2e6947){var _0x261117=_0x3934c7[_0x8869('0x5d')][_0x8869('0x5e')]({'plain':!![]});if(!_0x261117)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x261117[_0x8869('0x5f')]===_0x8869('0x5d')){return db[_0x8869('0x60')][_0x8869('0x4a')]({'where':{'name':_0x8869('0x61'),'userProfileId':_0x261117['userProfileId']},'raw':!![]})['then'](function(_0x35ba9f){if(_0x35ba9f){if(_0x35ba9f[_0x8869('0x62')]===0x0){return db[_0x8869('0x63')][_0x8869('0x45')]({'where':{'sectionId':_0x35ba9f['id']},'raw':!![]})[_0x8869('0x27')](function(_0x3e7b50){var _0xcde4a7=[];if(_[_0x8869('0x64')](_0x3e7b50)){_0xcde4a7=_[_0x8869('0x40')](_0x2e6947,function(_0x3d4884){if(_0x3d4884['role']!==_0x8869('0x65')){return _0x3d4884;}});return _0xcde4a7;}else{for(var _0x151c73=0x0;_0x151c73<_0x2e6947[_0x8869('0x39')];_0x151c73++){var _0x3fb6df=_0x2e6947[_0x151c73];if(_0x3fb6df[_0x8869('0x5f')]===_0x8869('0x65')){var _0xf57140=_[_0x8869('0x4a')](_0x3e7b50,function(_0x350815){return _0x350815[_0x8869('0x66')]===_0x3fb6df['id'];});if(_0xf57140)_0xcde4a7[_0x8869('0x67')](_0x3fb6df);}else{_0xcde4a7[_0x8869('0x67')](_0x3fb6df);}}return _0xcde4a7;}});}else{return _0x2e6947;}}else{var _0x4ddeb7=_[_0x8869('0x40')](_0x2e6947,function(_0x3a6842){if(_0x3a6842[_0x8869('0x5f')]!==_0x8869('0x65')){return _0x3a6842;}});return _0x4ddeb7;}});}else{return _0x2e6947;}}})[_0x8869('0x27')](function(_0x4425b7){var _0xac1b46=[];if(_0x4425b7){_0x1335ce=_0x4425b7;for(var _0x31e65c=0x0;_0x31e65c<_0x4425b7[_0x8869('0x39')];_0x31e65c+=0x1){_0x1335ce[_0x31e65c][_0x8869('0x4f')]=[];_0xac1b46[_0x8869('0x67')](db['ChatInternalMessage'][_0x8869('0x4a')]({'where':{'FromId':[_0x3934c7[_0x8869('0x5d')]['id'],_0x4425b7[_0x31e65c]['id']],'ToId':[_0x3934c7['user']['id'],_0x4425b7[_0x31e65c]['id']],'ChatGroupId':null},'attributes':['id',_0x8869('0x51'),'FromId',_0x8869('0x68'),_0x8869('0x69'),'body'],'order':qs[_0x8869('0x3d')]('-createdAt'),'limit':0x1,'offset':0x0,'raw':!![]})[_0x8869('0x27')](wrapUser(_0x4425b7[_0x31e65c])));}return BPromise[_0x8869('0x6a')](_0xac1b46);}return[];})['then'](function(_0x25cbf3){return{'rows':_0x25cbf3,'count':_0x25cbf3[_0x8869('0x39')]};})[_0x8869('0x27')](respondWithResult(_0x15b48d,null))['catch'](handleError(_0x15b48d,null));};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.events.js b/server/api/chatInternalMessage/chatInternalMessage.events.js
index 11cb76c..036a256 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.events.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb1a6=['emit','hasOwnProperty','hook','events','../../mysqldb','ChatInternalMessage','save','update'];(function(_0x4fb1b8,_0x32d98d){var _0x146c71=function(_0x4bb74e){while(--_0x4bb74e){_0x4fb1b8['push'](_0x4fb1b8['shift']());}};_0x146c71(++_0x32d98d);}(_0xb1a6,0x143));var _0x6b1a=function(_0x5e8efc,_0x2e71eb){_0x5e8efc=_0x5e8efc-0x0;var _0x33dd03=_0xb1a6[_0x5e8efc];return _0x33dd03;};'use strict';var EventEmitter=require(_0x6b1a('0x0'));var ChatInternalMessage=require(_0x6b1a('0x1'))['db'][_0x6b1a('0x2')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x6b1a('0x3'),'afterUpdate':_0x6b1a('0x4'),'afterDestroy':'remove'};function emitEvent(_0x25c003){return function(_0xb2058d,_0x17a3d9,_0x157bdd){ChatInternalMessageEvents['emit'](_0x25c003+':'+_0xb2058d['id'],_0xb2058d);ChatInternalMessageEvents[_0x6b1a('0x5')](_0x25c003,_0xb2058d);_0x157bdd(null);};}for(var e in events){if(events[_0x6b1a('0x6')](e)){var event=events[e];ChatInternalMessage[_0x6b1a('0x7')](e,emitEvent(event));}}module['exports']=ChatInternalMessageEvents;
\ No newline at end of file
+var _0xf873=['events','ChatInternalMessage','setMaxListeners','save','remove','emit','hasOwnProperty','exports'];(function(_0x456ce1,_0x5bef34){var _0x5b3a7f=function(_0x118465){while(--_0x118465){_0x456ce1['push'](_0x456ce1['shift']());}};_0x5b3a7f(++_0x5bef34);}(_0xf873,0x178));var _0x3f87=function(_0x592b9e,_0x2d882a){_0x592b9e=_0x592b9e-0x0;var _0x3ec6ac=_0xf873[_0x592b9e];return _0x3ec6ac;};'use strict';var EventEmitter=require(_0x3f87('0x0'));var ChatInternalMessage=require('../../mysqldb')['db'][_0x3f87('0x1')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents[_0x3f87('0x2')](0x0);var events={'afterCreate':_0x3f87('0x3'),'afterUpdate':'update','afterDestroy':_0x3f87('0x4')};function emitEvent(_0x1324a7){return function(_0x44b3c3,_0x32e82d,_0x394849){ChatInternalMessageEvents[_0x3f87('0x5')](_0x1324a7+':'+_0x44b3c3['id'],_0x44b3c3);ChatInternalMessageEvents['emit'](_0x1324a7,_0x44b3c3);_0x394849(null);};}for(var e in events){if(events[_0x3f87('0x6')](e)){var event=events[e];ChatInternalMessage['hook'](e,emitEvent(event));}}module[_0x3f87('0x7')]=ChatInternalMessageEvents;
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.model.js b/server/api/chatInternalMessage/chatInternalMessage.model.js
index ec4fac4..fb97c8e 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.model.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf453=['path','rimraf','exports','define','ChatInternalMessage','chat_internal_messages','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','bluebird'];(function(_0x5d2f39,_0x11e2f4){var _0x3df8f6=function(_0x50eeaf){while(--_0x50eeaf){_0x5d2f39['push'](_0x5d2f39['shift']());}};_0x3df8f6(++_0x11e2f4);}(_0xf453,0xbc));var _0x3f45=function(_0x689841,_0x2718e4){_0x689841=_0x689841-0x0;var _0x283fdf=_0xf453[_0x689841];return _0x283fdf;};'use strict';var _=require(_0x3f45('0x0'));var util=require(_0x3f45('0x1'));var logger=require(_0x3f45('0x2'))('api');var moment=require('moment');var BPromise=require(_0x3f45('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x3f45('0x4'));var rimraf=require(_0x3f45('0x5'));var config=require('../../config/environment');var attributes=require('./chatInternalMessage.attributes');module[_0x3f45('0x6')]=function(_0x205f0a,_0x2e1068){return _0x205f0a[_0x3f45('0x7')](_0x3f45('0x8'),attributes,{'tableName':_0x3f45('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x3f45('0xa'),'collate':_0x3f45('0xb')});};
\ No newline at end of file
+var _0x7dab=['../../config/logger','api','bluebird','request-promise','../../config/environment','./chatInternalMessage.attributes','exports','define','ChatInternalMessage','utf8mb4','utf8mb4_unicode_ci','lodash','util'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x7dab,0x102));var _0xb7da=function(_0x2c9eea,_0x5abda0){_0x2c9eea=_0x2c9eea-0x0;var _0x309090=_0x7dab[_0x2c9eea];return _0x309090;};'use strict';var _=require(_0xb7da('0x0'));var util=require(_0xb7da('0x1'));var logger=require(_0xb7da('0x2'))(_0xb7da('0x3'));var moment=require('moment');var BPromise=require(_0xb7da('0x4'));var rp=require(_0xb7da('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xb7da('0x6'));var attributes=require(_0xb7da('0x7'));module[_0xb7da('0x8')]=function(_0x36f359,_0x5e8cc5){return _0x36f359[_0xb7da('0x9')](_0xb7da('0xa'),attributes,{'tableName':'chat_internal_messages','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xb7da('0xb'),'collate':_0xb7da('0xc')});};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.rpc.js b/server/api/chatInternalMessage/chatInternalMessage.rpc.js
index 8c8b367..3e775f2 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.rpc.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x49c2=['util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','redis','localhost','socket.io-emitter','./chatInternalMessage.socket','register','request','then','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','lodash'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0x49c2,0x176));var _0x249c=function(_0xae1a83,_0x1980d4){_0xae1a83=_0xae1a83-0x0;var _0xdb9da8=_0x49c2[_0xae1a83];return _0xdb9da8;};'use strict';var _=require(_0x249c('0x0'));var util=require(_0x249c('0x1'));var moment=require(_0x249c('0x2'));var BPromise=require(_0x249c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x249c('0x4'));var db=require(_0x249c('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x249c('0x6'))(_0x249c('0x7'));var config=require('../../config/environment');var jayson=require(_0x249c('0x8'));var client=jayson['client']['http']({'port':0x232a});config['redis']=_['defaults'](config[_0x249c('0x9')],{'host':_0x249c('0xa'),'port':0x18eb});var socket=require(_0x249c('0xb'))(new Redis(config[_0x249c('0x9')]));require(_0x249c('0xc'))[_0x249c('0xd')](socket);function respondWithRpcPromise(_0x2216eb,_0x35a42b,_0x7a5971){return new BPromise(function(_0x422d7b,_0x4b18fe){return client[_0x249c('0xe')](_0x2216eb,_0x7a5971)[_0x249c('0xf')](function(_0x4a0d30){logger['info'](_0x249c('0x10'),_0x35a42b,_0x249c('0x11'));logger[_0x249c('0x12')](_0x249c('0x13'),_0x35a42b,_0x249c('0x11'),JSON[_0x249c('0x14')](_0x4a0d30));if(_0x4a0d30[_0x249c('0x15')]){if(_0x4a0d30[_0x249c('0x15')]['code']===0x1f4){logger[_0x249c('0x15')](_0x249c('0x10'),_0x35a42b,_0x4a0d30[_0x249c('0x15')][_0x249c('0x16')]);return _0x4b18fe(_0x4a0d30['error']['message']);}logger[_0x249c('0x15')](_0x249c('0x10'),_0x35a42b,_0x4a0d30[_0x249c('0x15')][_0x249c('0x16')]);return _0x422d7b(_0x4a0d30[_0x249c('0x15')][_0x249c('0x16')]);}else{logger[_0x249c('0x17')](_0x249c('0x10'),_0x35a42b,_0x249c('0x11'));_0x422d7b(_0x4a0d30[_0x249c('0x18')]['message']);}})['catch'](function(_0xeb289a){logger[_0x249c('0x15')]('ChatInternalMessage,\x20%s,\x20%s',_0x35a42b,_0xeb289a);_0x4b18fe(_0xeb289a);});});}
\ No newline at end of file
+var _0x2aef=['../../config/logger','../../config/environment','client','http','defaults','redis','socket.io-emitter','info','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','error','ChatInternalMessage,\x20%s,\x20%s','message','result','catch','bluebird','randomstring','ioredis','../../config/utils'];(function(_0x2c8b50,_0x23a0d2){var _0x342eb2=function(_0x27df6e){while(--_0x27df6e){_0x2c8b50['push'](_0x2c8b50['shift']());}};_0x342eb2(++_0x23a0d2);}(_0x2aef,0x122));var _0xf2ae=function(_0x227dd3,_0x3f3428){_0x227dd3=_0x227dd3-0x0;var _0x4a595e=_0x2aef[_0x227dd3];return _0x4a595e;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xf2ae('0x0'));var rs=require(_0xf2ae('0x1'));var fs=require('fs');var Redis=require(_0xf2ae('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0xf2ae('0x3'));var logger=require(_0xf2ae('0x4'))('rpc');var config=require(_0xf2ae('0x5'));var jayson=require('jayson/promise');var client=jayson[_0xf2ae('0x6')][_0xf2ae('0x7')]({'port':0x232a});config['redis']=_[_0xf2ae('0x8')](config[_0xf2ae('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0xf2ae('0xa'))(new Redis(config['redis']));require('./chatInternalMessage.socket')['register'](socket);function respondWithRpcPromise(_0x257c86,_0x143a8c,_0x401f26){return new BPromise(function(_0x50f544,_0xdcaf7a){return client['request'](_0x257c86,_0x401f26)['then'](function(_0x79e05e){logger[_0xf2ae('0xb')]('ChatInternalMessage,\x20%s,\x20%s',_0x143a8c,_0xf2ae('0xc'));logger[_0xf2ae('0xd')](_0xf2ae('0xe'),_0x143a8c,_0xf2ae('0xc'),JSON[_0xf2ae('0xf')](_0x79e05e));if(_0x79e05e['error']){if(_0x79e05e['error']['code']===0x1f4){logger[_0xf2ae('0x10')](_0xf2ae('0x11'),_0x143a8c,_0x79e05e[_0xf2ae('0x10')][_0xf2ae('0x12')]);return _0xdcaf7a(_0x79e05e[_0xf2ae('0x10')][_0xf2ae('0x12')]);}logger[_0xf2ae('0x10')](_0xf2ae('0x11'),_0x143a8c,_0x79e05e['error'][_0xf2ae('0x12')]);return _0x50f544(_0x79e05e[_0xf2ae('0x10')][_0xf2ae('0x12')]);}else{logger['info'](_0xf2ae('0x11'),_0x143a8c,'request\x20sent');_0x50f544(_0x79e05e[_0xf2ae('0x13')]['message']);}})[_0xf2ae('0x14')](function(_0x39d561){logger[_0xf2ae('0x10')](_0xf2ae('0x11'),_0x143a8c,_0x39d561);_0xdcaf7a(_0x39d561);});});}
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.socket.js b/server/api/chatInternalMessage/chatInternalMessage.socket.js
index 0e94e90..8593606 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.socket.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2cb1=['save','remove','emit','removeListener','register','length','chatInternalMessage:','./chatInternalMessage.events'];(function(_0x166d93,_0x301f09){var _0xba708=function(_0x349bf7){while(--_0x349bf7){_0x166d93['push'](_0x166d93['shift']());}};_0xba708(++_0x301f09);}(_0x2cb1,0x177));var _0x12cb=function(_0x12eb99,_0x4cec49){_0x12eb99=_0x12eb99-0x0;var _0x133fc8=_0x2cb1[_0x12eb99];return _0x133fc8;};'use strict';var ChatInternalMessageEvents=require(_0x12cb('0x0'));var events=[_0x12cb('0x1'),_0x12cb('0x2'),'update'];function createListener(_0x4dbe18,_0x54a050){return function(_0x53e133){_0x54a050[_0x12cb('0x3')](_0x4dbe18,_0x53e133);};}function removeListener(_0x29bca8,_0x5e5764){return function(){ChatInternalMessageEvents[_0x12cb('0x4')](_0x29bca8,_0x5e5764);};}exports[_0x12cb('0x5')]=function(_0xc23888){for(var _0x1f1524=0x0,_0x5af47b=events[_0x12cb('0x6')];_0x1f1524<_0x5af47b;_0x1f1524++){var _0x32b836=events[_0x1f1524];var _0x24ed18=createListener(_0x12cb('0x7')+_0x32b836,_0xc23888);ChatInternalMessageEvents['on'](_0x32b836,_0x24ed18);}};
\ No newline at end of file
+var _0xfa50=['register','chatInternalMessage:','./chatInternalMessage.events','remove','update','emit','removeListener'];(function(_0x4cbc20,_0x115dc6){var _0x3f83f7=function(_0x133b98){while(--_0x133b98){_0x4cbc20['push'](_0x4cbc20['shift']());}};_0x3f83f7(++_0x115dc6);}(_0xfa50,0x1d7));var _0x0fa5=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xfa50[_0x321bb2];return _0x9c12ed;};'use strict';var ChatInternalMessageEvents=require(_0x0fa5('0x0'));var events=['save',_0x0fa5('0x1'),_0x0fa5('0x2')];function createListener(_0xcdfb05,_0x5a117e){return function(_0xb5ff0b){_0x5a117e[_0x0fa5('0x3')](_0xcdfb05,_0xb5ff0b);};}function removeListener(_0x4c4d4f,_0x364b1e){return function(){ChatInternalMessageEvents[_0x0fa5('0x4')](_0x4c4d4f,_0x364b1e);};}exports[_0x0fa5('0x5')]=function(_0x194313){for(var _0x3e4bbe=0x0,_0x44cf6a=events['length'];_0x3e4bbe<_0x44cf6a;_0x3e4bbe++){var _0x2e8e26=events[_0x3e4bbe];var _0x56b6ea=createListener(_0x0fa5('0x6')+_0x2e8e26,_0x194313);ChatInternalMessageEvents['on'](_0x2e8e26,_0x56b6ea);}};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/index.js b/server/api/chatInternalMessage/index.js
index a1705b0..c9d9963 100644
--- a/server/api/chatInternalMessage/index.js
+++ b/server/api/chatInternalMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8e9a=['show','create','put','delete','destroy','exports','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatInternalMessage.controller','get','isAuthenticated','index','describe','/users','/:id'];(function(_0x6c993a,_0x5ea3ab){var _0x27f547=function(_0x22df20){while(--_0x22df20){_0x6c993a['push'](_0x6c993a['shift']());}};_0x27f547(++_0x5ea3ab);}(_0x8e9a,0xf6));var _0xa8e9=function(_0x132d06,_0x314aad){_0x132d06=_0x132d06-0x0;var _0x3490a4=_0x8e9a[_0x132d06];return _0x3490a4;};'use strict';var multer=require('multer');var util=require(_0xa8e9('0x0'));var path=require(_0xa8e9('0x1'));var timeout=require(_0xa8e9('0x2'));var express=require(_0xa8e9('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xa8e9('0x4'));var interaction=require(_0xa8e9('0x5'));var config=require(_0xa8e9('0x6'));var controller=require(_0xa8e9('0x7'));router[_0xa8e9('0x8')]('/',auth[_0xa8e9('0x9')](),controller[_0xa8e9('0xa')]);router[_0xa8e9('0x8')]('/describe',auth[_0xa8e9('0x9')](),controller[_0xa8e9('0xb')]);router[_0xa8e9('0x8')](_0xa8e9('0xc'),auth[_0xa8e9('0x9')](),controller['getUsers']);router[_0xa8e9('0x8')](_0xa8e9('0xd'),auth[_0xa8e9('0x9')](),controller[_0xa8e9('0xe')]);router['post']('/',auth['isAuthenticated'](),controller[_0xa8e9('0xf')]);router[_0xa8e9('0x10')](_0xa8e9('0xd'),controller['update']);router[_0xa8e9('0x11')](_0xa8e9('0xd'),auth[_0xa8e9('0x9')](),controller[_0xa8e9('0x12')]);module[_0xa8e9('0x13')]=router;
\ No newline at end of file
+var _0xec57=['getUsers','/:id','show','post','create','put','update','delete','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','./chatInternalMessage.controller','get','isAuthenticated','index','/describe','describe','/users'];(function(_0x150355,_0x1ef719){var _0x42887b=function(_0xfd9450){while(--_0xfd9450){_0x150355['push'](_0x150355['shift']());}};_0x42887b(++_0x1ef719);}(_0xec57,0x87));var _0x7ec5=function(_0x340380,_0x4bd2a8){_0x340380=_0x340380-0x0;var _0x49ce1c=_0xec57[_0x340380];return _0x49ce1c;};'use strict';var multer=require(_0x7ec5('0x0'));var util=require(_0x7ec5('0x1'));var path=require(_0x7ec5('0x2'));var timeout=require('connect-timeout');var express=require(_0x7ec5('0x3'));var router=express[_0x7ec5('0x4')]();var fs_extra=require(_0x7ec5('0x5'));var auth=require(_0x7ec5('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x7ec5('0x7'));var controller=require(_0x7ec5('0x8'));router[_0x7ec5('0x9')]('/',auth[_0x7ec5('0xa')](),controller[_0x7ec5('0xb')]);router['get'](_0x7ec5('0xc'),auth[_0x7ec5('0xa')](),controller[_0x7ec5('0xd')]);router[_0x7ec5('0x9')](_0x7ec5('0xe'),auth[_0x7ec5('0xa')](),controller[_0x7ec5('0xf')]);router[_0x7ec5('0x9')](_0x7ec5('0x10'),auth[_0x7ec5('0xa')](),controller[_0x7ec5('0x11')]);router[_0x7ec5('0x12')]('/',auth['isAuthenticated'](),controller[_0x7ec5('0x13')]);router[_0x7ec5('0x14')]('/:id',controller[_0x7ec5('0x15')]);router[_0x7ec5('0x16')](_0x7ec5('0x10'),auth[_0x7ec5('0xa')](),controller[_0x7ec5('0x17')]);module[_0x7ec5('0x18')]=router;
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.attributes.js b/server/api/chatMessage/chatMessage.attributes.js
index f197191..70a2664 100644
--- a/server/api/chatMessage/chatMessage.attributes.js
+++ b/server/api/chatMessage/chatMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x63c6=['DATE','STRING','TEXT','sequelize','exports','BOOLEAN','ENUM','out'];(function(_0xf78d2e,_0x3b3dff){var _0xbd54c1=function(_0x5e9ca1){while(--_0x5e9ca1){_0xf78d2e['push'](_0xf78d2e['shift']());}};_0xbd54c1(++_0x3b3dff);}(_0x63c6,0xbb));var _0x663c=function(_0x5cf30b,_0x41598f){_0x5cf30b=_0x5cf30b-0x0;var _0xe6f60=_0x63c6[_0x5cf30b];return _0xe6f60;};'use strict';var Sequelize=require(_0x663c('0x0'));module[_0x663c('0x1')]={'body':{'type':Sequelize['TEXT']('medium'),'allowNull':![]},'read':{'type':Sequelize[_0x663c('0x2')],'defaultValue':![]},'secret':{'type':Sequelize[_0x663c('0x2')],'defaultValue':![]},'direction':{'type':Sequelize[_0x663c('0x3')]('in',_0x663c('0x4')),'defaultValue':_0x663c('0x4'),'allowNull':![]},'readAt':{'type':Sequelize[_0x663c('0x5')]},'providerName':{'type':Sequelize[_0x663c('0x6')]},'providerResponse':{'type':Sequelize[_0x663c('0x7')]}};
\ No newline at end of file
+var _0x117c=['ENUM','out','DATE','STRING','TEXT','medium'];(function(_0x5f1391,_0x19c132){var _0x50ebe3=function(_0x3d00a3){while(--_0x3d00a3){_0x5f1391['push'](_0x5f1391['shift']());}};_0x50ebe3(++_0x19c132);}(_0x117c,0x71));var _0xc117=function(_0x33481a,_0x5d4316){_0x33481a=_0x33481a-0x0;var _0x408ab9=_0x117c[_0x33481a];return _0x408ab9;};'use strict';var Sequelize=require('sequelize');module['exports']={'body':{'type':Sequelize['TEXT'](_0xc117('0x0')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize[_0xc117('0x1')]('in',_0xc117('0x2')),'defaultValue':_0xc117('0x2'),'allowNull':![]},'readAt':{'type':Sequelize[_0xc117('0x3')]},'providerName':{'type':Sequelize[_0xc117('0x4')]},'providerResponse':{'type':Sequelize[_0xc117('0x5')]}};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.controller.js b/server/api/chatMessage/chatMessage.controller.js
index 5047e00..c1e144d 100644
--- a/server/api/chatMessage/chatMessage.controller.js
+++ b/server/api/chatMessage/chatMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd1d3=['fieldName','type','query','keys','filters','intersection','model','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','VIRTUAL','filter','merge','options','includeAll','findAll','fields','include','catch','create','body','find','params','describe','chat','reject','UserId','get','ChatInteraction','ChatInteractionId','[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','user','name','role','interaction','rejectMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','QueryTypes','SELECT','contact','User','agent','fullname','email','interface','format','SIP/%s','channel','motionChannel','event','EventManager','formData','lodash','ioredis','../../components/interaction/service','../../components/parsers/qs','../../config/logger','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatMessage.socket','register','client','http','then','info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug','ChatMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','offset','undefined','limit','count','status','set','Content-Range','update','destroy','end','sendStatus','stack','send','map','ChatMessage','rawAttributes'];(function(_0x245b3f,_0x165efe){var _0x2f6657=function(_0x3649d9){while(--_0x3649d9){_0x245b3f['push'](_0x245b3f['shift']());}};_0x2f6657(++_0x165efe);}(_0xd1d3,0xa1));var _0x3d1d=function(_0x4a43c8,_0x1d873f){_0x4a43c8=_0x4a43c8-0x0;var _0xd47631=_0xd1d3[_0x4a43c8];return _0xd47631;};'use strict';var util=require('util');var _=require(_0x3d1d('0x0'));var Redis=require(_0x3d1d('0x1'));var interactionService=require(_0x3d1d('0x2'));var qs=require(_0x3d1d('0x3'));var logger=require(_0x3d1d('0x4'))('api');var config=require(_0x3d1d('0x5'));var db=require(_0x3d1d('0x6'))['db'];config[_0x3d1d('0x7')]=_[_0x3d1d('0x8')](config[_0x3d1d('0x7')],{'host':_0x3d1d('0x9'),'port':0x18eb});var socket=require(_0x3d1d('0xa'))(new Redis(config[_0x3d1d('0x7')]));require(_0x3d1d('0xb'))[_0x3d1d('0xc')](socket);var jayson=require('jayson/promise');var client=jayson[_0x3d1d('0xd')][_0x3d1d('0xe')]({'port':0x232c});var client9002=jayson[_0x3d1d('0xd')][_0x3d1d('0xe')]({'port':0x232a});var interaction_log=require('../../config/logger')('chat-interactions');function respondWithRpcPromise(_0x4bcc00,_0x32bfe5,_0x22ec53,_0x3a75ca){return new Promise(function(_0x1f43a1,_0x271f5e){var _0x2d7d4d=_0x3a75ca||client;return _0x2d7d4d['request'](_0x4bcc00,_0x22ec53)[_0x3d1d('0xf')](function(_0x2bf063){logger[_0x3d1d('0x10')](_0x3d1d('0x11'),_0x32bfe5,_0x3d1d('0x12'));logger[_0x3d1d('0x13')](_0x3d1d('0x14'),_0x32bfe5,'request\x20sent',JSON[_0x3d1d('0x15')](_0x2bf063));if(_0x2bf063[_0x3d1d('0x16')]){if(_0x2bf063[_0x3d1d('0x16')][_0x3d1d('0x17')]===0x1f4){logger[_0x3d1d('0x16')](_0x3d1d('0x11'),_0x32bfe5,_0x2bf063[_0x3d1d('0x16')][_0x3d1d('0x18')]);return _0x271f5e(_0x2bf063[_0x3d1d('0x16')][_0x3d1d('0x18')]);}logger[_0x3d1d('0x16')](_0x3d1d('0x11'),_0x32bfe5,_0x2bf063[_0x3d1d('0x16')][_0x3d1d('0x18')]);return _0x1f43a1(_0x2bf063[_0x3d1d('0x16')][_0x3d1d('0x18')]);}else{logger[_0x3d1d('0x10')]('ChatMessage,\x20%s,\x20%s',_0x32bfe5,_0x3d1d('0x12'));_0x1f43a1(_0x2bf063['result'][_0x3d1d('0x18')]);}})['catch'](function(_0x479e73){logger[_0x3d1d('0x16')](_0x3d1d('0x11'),_0x32bfe5,_0x479e73);_0x271f5e(_0x479e73);});});}function respondWithResult(_0x51f506,_0x1fb7aa){_0x1fb7aa=_0x1fb7aa||0xc8;return function(_0x3da8fe){if(_0x3da8fe){return _0x51f506['status'](_0x1fb7aa)['json'](_0x3da8fe);}};}function respondWithFilteredResult(_0x22f32f,_0x594a35){return function(_0x2ea1e2){if(_0x2ea1e2){var _0x1c0553=typeof _0x594a35[_0x3d1d('0x19')]===_0x3d1d('0x1a')&&typeof _0x594a35[_0x3d1d('0x1b')]==='undefined';var _0x54ce10=_0x2ea1e2['count'];var _0x1cebbb=_0x1c0553?0x0:_0x594a35[_0x3d1d('0x19')];var _0x4d77e6=_0x1c0553?_0x2ea1e2[_0x3d1d('0x1c')]:_0x594a35[_0x3d1d('0x19')]+_0x594a35[_0x3d1d('0x1b')];var _0x301734;if(_0x4d77e6>=_0x54ce10){_0x4d77e6=_0x54ce10;_0x301734=0xc8;}else{_0x301734=0xce;}_0x22f32f[_0x3d1d('0x1d')](_0x301734);return _0x22f32f[_0x3d1d('0x1e')](_0x3d1d('0x1f'),_0x1cebbb+'-'+_0x4d77e6+'/'+_0x54ce10)['json'](_0x2ea1e2);}return null;};}function saveUpdates(_0x4c49a3){return function(_0x3ca923){if(_0x3ca923){return _0x3ca923[_0x3d1d('0x20')](_0x4c49a3)['then'](function(_0x2cdde6){return _0x2cdde6;});}return null;};}function removeEntity(_0x4f2322){return function(_0x39ebc3){if(_0x39ebc3){return _0x39ebc3[_0x3d1d('0x21')]()['then'](function(){_0x4f2322[_0x3d1d('0x1d')](0xcc)[_0x3d1d('0x22')]();});}};}function handleEntityNotFound(_0x763ff8){return function(_0x2c3b8e){if(!_0x2c3b8e){_0x763ff8[_0x3d1d('0x23')](0x194);}return _0x2c3b8e;};}function handleError(_0x428500,_0x3eabbe){_0x3eabbe=_0x3eabbe||0x1f4;return function(_0x48dccb){logger[_0x3d1d('0x16')](_0x48dccb[_0x3d1d('0x24')]);if(_0x48dccb['name']){delete _0x48dccb['name'];}_0x428500[_0x3d1d('0x1d')](_0x3eabbe)[_0x3d1d('0x25')](_0x48dccb);};}exports['index']=function(_0x35571e,_0x23ba22){var _0xa43d91={},_0x27e1ce={},_0x3bcd56={'count':0x0,'rows':[]};var _0xde4672=_[_0x3d1d('0x26')](db[_0x3d1d('0x27')][_0x3d1d('0x28')],function(_0x46784a){return{'name':_0x46784a[_0x3d1d('0x29')],'type':_0x46784a[_0x3d1d('0x2a')]['key']};});_0x27e1ce['model']=_[_0x3d1d('0x26')](_0xde4672,'name');_0x27e1ce[_0x3d1d('0x2b')]=_[_0x3d1d('0x2c')](_0x35571e[_0x3d1d('0x2b')]);_0x27e1ce[_0x3d1d('0x2d')]=_[_0x3d1d('0x2e')](_0x27e1ce[_0x3d1d('0x2f')],_0x27e1ce[_0x3d1d('0x2b')]);_0xa43d91[_0x3d1d('0x30')]=_[_0x3d1d('0x2e')](_0x27e1ce['model'],qs['fields'](_0x35571e[_0x3d1d('0x2b')]['fields']));_0xa43d91['attributes']=_0xa43d91['attributes'][_0x3d1d('0x31')]?_0xa43d91[_0x3d1d('0x30')]:_0x27e1ce[_0x3d1d('0x2f')];if(!_0x35571e[_0x3d1d('0x2b')][_0x3d1d('0x32')](_0x3d1d('0x33'))){_0xa43d91[_0x3d1d('0x1b')]=qs[_0x3d1d('0x1b')](_0x35571e[_0x3d1d('0x2b')]['limit']);_0xa43d91[_0x3d1d('0x19')]=qs[_0x3d1d('0x19')](_0x35571e['query'][_0x3d1d('0x19')]);}_0xa43d91[_0x3d1d('0x34')]=qs[_0x3d1d('0x35')](_0x35571e['query'][_0x3d1d('0x35')]);_0xa43d91[_0x3d1d('0x36')]=qs[_0x3d1d('0x2d')](_[_0x3d1d('0x37')](_0x35571e['query'],_0x27e1ce[_0x3d1d('0x2d')]),_0xde4672);if(_0x35571e[_0x3d1d('0x2b')]['filter']){_0xa43d91[_0x3d1d('0x36')]=_['merge'](_0xa43d91[_0x3d1d('0x36')],{'$or':_[_0x3d1d('0x26')](_0xde4672,function(_0x57b1a6){if(_0x57b1a6['type']!==_0x3d1d('0x38')){var _0x9ab4a={};_0x9ab4a[_0x57b1a6['name']]={'$like':'%'+_0x35571e['query'][_0x3d1d('0x39')]+'%'};return _0x9ab4a;}})});}_0xa43d91=_[_0x3d1d('0x3a')]({},_0xa43d91,_0x35571e[_0x3d1d('0x3b')]);var _0x33e8e8={'where':_0xa43d91[_0x3d1d('0x36')]};return db[_0x3d1d('0x27')]['count'](_0x33e8e8)['then'](function(_0x32dfd9){_0x3bcd56[_0x3d1d('0x1c')]=_0x32dfd9;if(_0x35571e[_0x3d1d('0x2b')][_0x3d1d('0x3c')]){_0xa43d91['include']=[{'all':!![]}];}return db[_0x3d1d('0x27')][_0x3d1d('0x3d')](_0xa43d91);})['then'](function(_0x50b645){_0x3bcd56['rows']=_0x50b645;return _0x3bcd56;})[_0x3d1d('0xf')](respondWithFilteredResult(_0x23ba22,_0xa43d91))['catch'](handleError(_0x23ba22,null));};exports['show']=function(_0x7ebbcd,_0x42d171){var _0x15b373={'raw':!![],'where':{'id':_0x7ebbcd['params']['id']}},_0x5d83a3={};_0x5d83a3[_0x3d1d('0x2f')]=_[_0x3d1d('0x2c')](db[_0x3d1d('0x27')][_0x3d1d('0x28')]);_0x5d83a3['query']=_[_0x3d1d('0x2c')](_0x7ebbcd['query']);_0x5d83a3['filters']=_[_0x3d1d('0x2e')](_0x5d83a3[_0x3d1d('0x2f')],_0x5d83a3[_0x3d1d('0x2b')]);_0x15b373[_0x3d1d('0x30')]=_[_0x3d1d('0x2e')](_0x5d83a3[_0x3d1d('0x2f')],qs[_0x3d1d('0x3e')](_0x7ebbcd['query']['fields']));_0x15b373[_0x3d1d('0x30')]=_0x15b373[_0x3d1d('0x30')][_0x3d1d('0x31')]?_0x15b373[_0x3d1d('0x30')]:_0x5d83a3['model'];if(_0x7ebbcd[_0x3d1d('0x2b')][_0x3d1d('0x3c')]){_0x15b373[_0x3d1d('0x3f')]=[{'all':!![]}];}_0x15b373=_[_0x3d1d('0x3a')]({},_0x15b373,_0x7ebbcd['options']);return db[_0x3d1d('0x27')]['find'](_0x15b373)[_0x3d1d('0xf')](handleEntityNotFound(_0x42d171,null))[_0x3d1d('0xf')](respondWithResult(_0x42d171,null))[_0x3d1d('0x40')](handleError(_0x42d171,null));};exports['create']=function(_0x2d5755,_0x556706){return db[_0x3d1d('0x27')][_0x3d1d('0x41')](_0x2d5755['body'],{})['then'](respondWithResult(_0x556706,0xc9))[_0x3d1d('0x40')](handleError(_0x556706,null));};exports['update']=function(_0x2b1259,_0x5ac3cb){if(_0x2b1259[_0x3d1d('0x42')]['id']){delete _0x2b1259[_0x3d1d('0x42')]['id'];}return db[_0x3d1d('0x27')][_0x3d1d('0x43')]({'where':{'id':_0x2b1259[_0x3d1d('0x44')]['id']}})[_0x3d1d('0xf')](handleEntityNotFound(_0x5ac3cb,null))[_0x3d1d('0xf')](saveUpdates(_0x2b1259[_0x3d1d('0x42')],null))[_0x3d1d('0xf')](respondWithResult(_0x5ac3cb,null))[_0x3d1d('0x40')](handleError(_0x5ac3cb,null));};exports[_0x3d1d('0x21')]=function(_0x4a5f7d,_0x415b2c){return db['ChatMessage']['find']({'where':{'id':_0x4a5f7d['params']['id']}})['then'](handleEntityNotFound(_0x415b2c,null))[_0x3d1d('0xf')](removeEntity(_0x415b2c,null))[_0x3d1d('0x40')](handleError(_0x415b2c,null));};exports[_0x3d1d('0x45')]=function(_0xc9e133,_0x12b8fb){return db[_0x3d1d('0x27')][_0x3d1d('0x45')]()[_0x3d1d('0xf')](respondWithResult(_0x12b8fb,null))[_0x3d1d('0x40')](handleError(_0x12b8fb,null));};exports['accept']=function(_0x43e21b,_0x515b53){var _0x77a564=_0x3d1d('0x46');return interactionService['acceptMessage'](_0x43e21b,_0x77a564)['then'](respondWithResult(_0x515b53,null))[_0x3d1d('0x40')](handleError(_0x515b53,null));};exports[_0x3d1d('0x47')]=function(_0x870fb9,_0x1ef90e){var _0x1c036d={'agent':{},'channel':_0x3d1d('0x46')};if(_0x870fb9[_0x3d1d('0x42')]['id']){delete _0x870fb9[_0x3d1d('0x42')]['id'];}_0x870fb9[_0x3d1d('0x42')][_0x3d1d('0x48')]=_0x870fb9[_0x3d1d('0x42')][_0x3d1d('0x48')]||_0x870fb9['user']['id'];_0x1c036d['agent']['id']=_0x870fb9[_0x3d1d('0x42')][_0x3d1d('0x48')];return db[_0x3d1d('0x27')][_0x3d1d('0x43')]({'where':{'id':_0x870fb9[_0x3d1d('0x44')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x1ef90e,null))['then'](function(_0x277fa1){if(_0x277fa1){_0x1c036d[_0x3d1d('0x18')]=_0x277fa1[_0x3d1d('0x49')]({'plain':!![]});return db[_0x3d1d('0x4a')]['find']({'where':{'id':_0x277fa1[_0x3d1d('0x4b')]}});}return null;})[_0x3d1d('0xf')](handleEntityNotFound(_0x1ef90e,null))[_0x3d1d('0xf')](function(_0x40d387){if(_0x40d387){_0x1c036d['interaction']=_0x40d387[_0x3d1d('0x49')]({'plain':!![]});interaction_log[_0x3d1d('0x10')](_0x3d1d('0x4c'),_0x870fb9[_0x3d1d('0x4d')]['id'],_0x870fb9['user'][_0x3d1d('0x4e')],_0x870fb9[_0x3d1d('0x4d')][_0x3d1d('0x4f')],_0x1c036d[_0x3d1d('0x50')]['id'],_0x870fb9['body']?JSON[_0x3d1d('0x15')](_0x870fb9[_0x3d1d('0x42')]):'null');return respondWithRpcPromise('RejectMessage',_0x3d1d('0x51'),_0x1c036d);}return null;})[_0x3d1d('0xf')](function(_0x5d7ae0){var _0x16c6d3=_0x3d1d('0x52')+_0x5d7ae0['message'][_0x3d1d('0x53')];return db[_0x3d1d('0x54')]['query'](_0x16c6d3,{'type':db[_0x3d1d('0x55')][_0x3d1d('0x56')][_0x3d1d('0x57')],'raw':!![]})[_0x3d1d('0xf')](function(_0x450a01){return _0x450a01;});})['then'](function(_0x52ca4d){if(_0x52ca4d){_0x1c036d[_0x3d1d('0x18')][_0x3d1d('0x58')]=_0x52ca4d[0x0];if(!_0x870fb9[_0x3d1d('0x42')][_0x3d1d('0x48')])return;return db[_0x3d1d('0x59')]['find']({'where':{'id':_0x870fb9[_0x3d1d('0x42')][_0x3d1d('0x48')],'role':_0x3d1d('0x5a')},'attributes':['id','name',_0x3d1d('0x5b'),_0x3d1d('0x5c'),'internal'],'raw':!![]});}return null;})[_0x3d1d('0xf')](function(_0x359a79){if(!_0x359a79)return null;_0x1c036d['message'][_0x3d1d('0x5a')]=_0x359a79;return _0x1c036d;})['then'](function(_0x149b63){if(_0x149b63){_0x149b63[_0x3d1d('0x18')][_0x3d1d('0x5d')]=util[_0x3d1d('0x5e')](_0x3d1d('0x5f'),_0x870fb9['user'][_0x3d1d('0x4e')]);_0x149b63['message']['channel']=_0x1c036d[_0x3d1d('0x60')];_0x149b63[_0x3d1d('0x18')][_0x3d1d('0x61')]=_0x1c036d[_0x3d1d('0x60')];_0x149b63[_0x3d1d('0x18')][_0x3d1d('0x62')]='reject';respondWithRpcPromise(_0x3d1d('0x63'),'EventManager',{'event':'rejectmessage','message':_['merge'](_0x1c036d[_0x3d1d('0x18')],JSON['parse'](_0x1c036d[_0x3d1d('0x50')][_0x3d1d('0x64')]))},client9002);return _0x1c036d;}return null;})['then'](respondWithResult(_0x1ef90e,null))[_0x3d1d('0x40')](handleError(_0x1ef90e,null));};
\ No newline at end of file
+var _0x862b=['intersection','attributes','fields','hasOwnProperty','limit','order','sort','where','filters','pick','filter','map','VIRTUAL','merge','options','include','rows','show','length','body','find','params','describe','accept','acceptMessage','chat','user','UserId','get','ChatInteraction','ChatInteractionId','[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','interaction','null','RejectMessage','rejectMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','Sequelize','SELECT','contact','User','agent','fullname','email','interface','format','channel','motionChannel','event','EventManager','rejectmessage','parse','formData','util','lodash','ioredis','../../components/interaction/service','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','redis','socket.io-emitter','jayson/promise','client','http','request','info','request\x20sent','debug','stringify','error','code','ChatMessage,\x20%s,\x20%s','message','result','catch','status','json','offset','undefined','count','set','Content-Range','update','then','destroy','end','sendStatus','send','index','ChatMessage','rawAttributes','key','model','name','query','keys'];(function(_0x2ccc71,_0x6b0352){var _0xb9fff2=function(_0xf6f69c){while(--_0xf6f69c){_0x2ccc71['push'](_0x2ccc71['shift']());}};_0xb9fff2(++_0x6b0352);}(_0x862b,0x9a));var _0xb862=function(_0xbe22c,_0x486191){_0xbe22c=_0xbe22c-0x0;var _0x31b9ee=_0x862b[_0xbe22c];return _0x31b9ee;};'use strict';var util=require(_0xb862('0x0'));var _=require(_0xb862('0x1'));var Redis=require(_0xb862('0x2'));var interactionService=require(_0xb862('0x3'));var qs=require(_0xb862('0x4'));var logger=require(_0xb862('0x5'))(_0xb862('0x6'));var config=require(_0xb862('0x7'));var db=require(_0xb862('0x8'))['db'];config[_0xb862('0x9')]=_['defaults'](config[_0xb862('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0xb862('0xa'))(new Redis(config[_0xb862('0x9')]));require('./chatMessage.socket')['register'](socket);var jayson=require(_0xb862('0xb'));var client=jayson['client']['http']({'port':0x232c});var client9002=jayson[_0xb862('0xc')][_0xb862('0xd')]({'port':0x232a});var interaction_log=require(_0xb862('0x5'))('chat-interactions');function respondWithRpcPromise(_0x4d97dd,_0x5c31dd,_0x4a0785,_0x2366cb){return new Promise(function(_0x36c3dd,_0x10e950){var _0x534d5a=_0x2366cb||client;return _0x534d5a[_0xb862('0xe')](_0x4d97dd,_0x4a0785)['then'](function(_0x1809af){logger[_0xb862('0xf')]('ChatMessage,\x20%s,\x20%s',_0x5c31dd,_0xb862('0x10'));logger[_0xb862('0x11')]('ChatMessage,\x20%s,\x20%s,\x20%s',_0x5c31dd,_0xb862('0x10'),JSON[_0xb862('0x12')](_0x1809af));if(_0x1809af['error']){if(_0x1809af[_0xb862('0x13')][_0xb862('0x14')]===0x1f4){logger[_0xb862('0x13')](_0xb862('0x15'),_0x5c31dd,_0x1809af[_0xb862('0x13')]['message']);return _0x10e950(_0x1809af[_0xb862('0x13')][_0xb862('0x16')]);}logger['error'](_0xb862('0x15'),_0x5c31dd,_0x1809af['error'][_0xb862('0x16')]);return _0x36c3dd(_0x1809af['error'][_0xb862('0x16')]);}else{logger[_0xb862('0xf')](_0xb862('0x15'),_0x5c31dd,_0xb862('0x10'));_0x36c3dd(_0x1809af[_0xb862('0x17')][_0xb862('0x16')]);}})[_0xb862('0x18')](function(_0x1c921c){logger[_0xb862('0x13')]('ChatMessage,\x20%s,\x20%s',_0x5c31dd,_0x1c921c);_0x10e950(_0x1c921c);});});}function respondWithResult(_0x433cd3,_0x418da5){_0x418da5=_0x418da5||0xc8;return function(_0x224035){if(_0x224035){return _0x433cd3[_0xb862('0x19')](_0x418da5)[_0xb862('0x1a')](_0x224035);}};}function respondWithFilteredResult(_0x384ff5,_0x506356){return function(_0xe07bc3){if(_0xe07bc3){var _0x5e1400=typeof _0x506356[_0xb862('0x1b')]===_0xb862('0x1c')&&typeof _0x506356['limit']===_0xb862('0x1c');var _0x52643c=_0xe07bc3[_0xb862('0x1d')];var _0x2b5401=_0x5e1400?0x0:_0x506356['offset'];var _0x451050=_0x5e1400?_0xe07bc3['count']:_0x506356[_0xb862('0x1b')]+_0x506356['limit'];var _0x3dbac7;if(_0x451050>=_0x52643c){_0x451050=_0x52643c;_0x3dbac7=0xc8;}else{_0x3dbac7=0xce;}_0x384ff5['status'](_0x3dbac7);return _0x384ff5[_0xb862('0x1e')](_0xb862('0x1f'),_0x2b5401+'-'+_0x451050+'/'+_0x52643c)[_0xb862('0x1a')](_0xe07bc3);}return null;};}function saveUpdates(_0x2bd1c6){return function(_0x51de20){if(_0x51de20){return _0x51de20[_0xb862('0x20')](_0x2bd1c6)[_0xb862('0x21')](function(_0x26bdfb){return _0x26bdfb;});}return null;};}function removeEntity(_0x564eae){return function(_0x29c354){if(_0x29c354){return _0x29c354[_0xb862('0x22')]()[_0xb862('0x21')](function(){_0x564eae['status'](0xcc)[_0xb862('0x23')]();});}};}function handleEntityNotFound(_0x1224a5){return function(_0x433e6e){if(!_0x433e6e){_0x1224a5[_0xb862('0x24')](0x194);}return _0x433e6e;};}function handleError(_0x444c24,_0x551c7b){_0x551c7b=_0x551c7b||0x1f4;return function(_0x5c4401){logger[_0xb862('0x13')](_0x5c4401['stack']);if(_0x5c4401['name']){delete _0x5c4401['name'];}_0x444c24[_0xb862('0x19')](_0x551c7b)[_0xb862('0x25')](_0x5c4401);};}exports[_0xb862('0x26')]=function(_0x188973,_0x1cb98d){var _0x1eef3d={},_0x2699ef={},_0x36a2e1={'count':0x0,'rows':[]};var _0x5a2644=_['map'](db[_0xb862('0x27')][_0xb862('0x28')],function(_0x1ddf2c){return{'name':_0x1ddf2c['fieldName'],'type':_0x1ddf2c['type'][_0xb862('0x29')]};});_0x2699ef[_0xb862('0x2a')]=_['map'](_0x5a2644,_0xb862('0x2b'));_0x2699ef[_0xb862('0x2c')]=_[_0xb862('0x2d')](_0x188973[_0xb862('0x2c')]);_0x2699ef['filters']=_[_0xb862('0x2e')](_0x2699ef[_0xb862('0x2a')],_0x2699ef[_0xb862('0x2c')]);_0x1eef3d[_0xb862('0x2f')]=_['intersection'](_0x2699ef['model'],qs[_0xb862('0x30')](_0x188973[_0xb862('0x2c')][_0xb862('0x30')]));_0x1eef3d[_0xb862('0x2f')]=_0x1eef3d[_0xb862('0x2f')]['length']?_0x1eef3d[_0xb862('0x2f')]:_0x2699ef[_0xb862('0x2a')];if(!_0x188973[_0xb862('0x2c')][_0xb862('0x31')]('nolimit')){_0x1eef3d[_0xb862('0x32')]=qs[_0xb862('0x32')](_0x188973['query'][_0xb862('0x32')]);_0x1eef3d[_0xb862('0x1b')]=qs[_0xb862('0x1b')](_0x188973[_0xb862('0x2c')]['offset']);}_0x1eef3d[_0xb862('0x33')]=qs[_0xb862('0x34')](_0x188973['query']['sort']);_0x1eef3d[_0xb862('0x35')]=qs[_0xb862('0x36')](_[_0xb862('0x37')](_0x188973[_0xb862('0x2c')],_0x2699ef[_0xb862('0x36')]),_0x5a2644);if(_0x188973[_0xb862('0x2c')][_0xb862('0x38')]){_0x1eef3d[_0xb862('0x35')]=_['merge'](_0x1eef3d['where'],{'$or':_[_0xb862('0x39')](_0x5a2644,function(_0x18f3e0){if(_0x18f3e0['type']!==_0xb862('0x3a')){var _0x41f6a5={};_0x41f6a5[_0x18f3e0[_0xb862('0x2b')]]={'$like':'%'+_0x188973[_0xb862('0x2c')][_0xb862('0x38')]+'%'};return _0x41f6a5;}})});}_0x1eef3d=_[_0xb862('0x3b')]({},_0x1eef3d,_0x188973[_0xb862('0x3c')]);var _0x2724b1={'where':_0x1eef3d[_0xb862('0x35')]};return db[_0xb862('0x27')]['count'](_0x2724b1)[_0xb862('0x21')](function(_0x2e0a30){_0x36a2e1[_0xb862('0x1d')]=_0x2e0a30;if(_0x188973[_0xb862('0x2c')]['includeAll']){_0x1eef3d[_0xb862('0x3d')]=[{'all':!![]}];}return db['ChatMessage']['findAll'](_0x1eef3d);})['then'](function(_0x8954f9){_0x36a2e1[_0xb862('0x3e')]=_0x8954f9;return _0x36a2e1;})[_0xb862('0x21')](respondWithFilteredResult(_0x1cb98d,_0x1eef3d))[_0xb862('0x18')](handleError(_0x1cb98d,null));};exports[_0xb862('0x3f')]=function(_0x505f42,_0x57e6bd){var _0x202339={'raw':!![],'where':{'id':_0x505f42['params']['id']}},_0x2b966f={};_0x2b966f['model']=_[_0xb862('0x2d')](db[_0xb862('0x27')][_0xb862('0x28')]);_0x2b966f[_0xb862('0x2c')]=_[_0xb862('0x2d')](_0x505f42[_0xb862('0x2c')]);_0x2b966f[_0xb862('0x36')]=_[_0xb862('0x2e')](_0x2b966f[_0xb862('0x2a')],_0x2b966f[_0xb862('0x2c')]);_0x202339[_0xb862('0x2f')]=_[_0xb862('0x2e')](_0x2b966f[_0xb862('0x2a')],qs[_0xb862('0x30')](_0x505f42['query'][_0xb862('0x30')]));_0x202339['attributes']=_0x202339[_0xb862('0x2f')][_0xb862('0x40')]?_0x202339[_0xb862('0x2f')]:_0x2b966f[_0xb862('0x2a')];if(_0x505f42['query']['includeAll']){_0x202339[_0xb862('0x3d')]=[{'all':!![]}];}_0x202339=_['merge']({},_0x202339,_0x505f42[_0xb862('0x3c')]);return db[_0xb862('0x27')]['find'](_0x202339)['then'](handleEntityNotFound(_0x57e6bd,null))[_0xb862('0x21')](respondWithResult(_0x57e6bd,null))[_0xb862('0x18')](handleError(_0x57e6bd,null));};exports['create']=function(_0x49acce,_0x1cad79){return db[_0xb862('0x27')]['create'](_0x49acce[_0xb862('0x41')],{})[_0xb862('0x21')](respondWithResult(_0x1cad79,0xc9))[_0xb862('0x18')](handleError(_0x1cad79,null));};exports[_0xb862('0x20')]=function(_0x19e199,_0x147c79){if(_0x19e199[_0xb862('0x41')]['id']){delete _0x19e199['body']['id'];}return db['ChatMessage'][_0xb862('0x42')]({'where':{'id':_0x19e199['params']['id']}})['then'](handleEntityNotFound(_0x147c79,null))[_0xb862('0x21')](saveUpdates(_0x19e199[_0xb862('0x41')],null))['then'](respondWithResult(_0x147c79,null))[_0xb862('0x18')](handleError(_0x147c79,null));};exports[_0xb862('0x22')]=function(_0x53e67a,_0x5af744){return db['ChatMessage'][_0xb862('0x42')]({'where':{'id':_0x53e67a[_0xb862('0x43')]['id']}})[_0xb862('0x21')](handleEntityNotFound(_0x5af744,null))[_0xb862('0x21')](removeEntity(_0x5af744,null))[_0xb862('0x18')](handleError(_0x5af744,null));};exports['describe']=function(_0x4e2160,_0x59da84){return db['ChatMessage'][_0xb862('0x44')]()['then'](respondWithResult(_0x59da84,null))[_0xb862('0x18')](handleError(_0x59da84,null));};exports[_0xb862('0x45')]=function(_0x2c17ef,_0x2327b0){var _0x1d0a8c='chat';return interactionService[_0xb862('0x46')](_0x2c17ef,_0x1d0a8c)[_0xb862('0x21')](respondWithResult(_0x2327b0,null))[_0xb862('0x18')](handleError(_0x2327b0,null));};exports['reject']=function(_0x53b0a7,_0x554736){var _0x17c5e9={'agent':{},'channel':_0xb862('0x47')};if(_0x53b0a7[_0xb862('0x41')]['id']){delete _0x53b0a7[_0xb862('0x41')]['id'];}_0x53b0a7['body']['UserId']=_0x53b0a7[_0xb862('0x41')]['UserId']||_0x53b0a7[_0xb862('0x48')]['id'];_0x17c5e9['agent']['id']=_0x53b0a7[_0xb862('0x41')][_0xb862('0x49')];return db['ChatMessage']['find']({'where':{'id':_0x53b0a7['params']['id'],'UserId':null}})[_0xb862('0x21')](handleEntityNotFound(_0x554736,null))['then'](function(_0x3831c3){if(_0x3831c3){_0x17c5e9[_0xb862('0x16')]=_0x3831c3[_0xb862('0x4a')]({'plain':!![]});return db[_0xb862('0x4b')]['find']({'where':{'id':_0x3831c3[_0xb862('0x4c')]}});}return null;})['then'](handleEntityNotFound(_0x554736,null))[_0xb862('0x21')](function(_0x26713f){if(_0x26713f){_0x17c5e9['interaction']=_0x26713f[_0xb862('0x4a')]({'plain':!![]});interaction_log['info'](_0xb862('0x4d'),_0x53b0a7[_0xb862('0x48')]['id'],_0x53b0a7[_0xb862('0x48')][_0xb862('0x2b')],_0x53b0a7[_0xb862('0x48')]['role'],_0x17c5e9[_0xb862('0x4e')]['id'],_0x53b0a7['body']?JSON[_0xb862('0x12')](_0x53b0a7[_0xb862('0x41')]):_0xb862('0x4f'));return respondWithRpcPromise(_0xb862('0x50'),_0xb862('0x51'),_0x17c5e9);}return null;})[_0xb862('0x21')](function(_0x140811){var _0x3d400b=_0xb862('0x52')+_0x140811[_0xb862('0x16')][_0xb862('0x53')];return db['sequelize'][_0xb862('0x2c')](_0x3d400b,{'type':db[_0xb862('0x54')]['QueryTypes'][_0xb862('0x55')],'raw':!![]})[_0xb862('0x21')](function(_0x1bd2a2){return _0x1bd2a2;});})['then'](function(_0xf00d37){if(_0xf00d37){_0x17c5e9[_0xb862('0x16')][_0xb862('0x56')]=_0xf00d37[0x0];if(!_0x53b0a7[_0xb862('0x41')][_0xb862('0x49')])return;return db[_0xb862('0x57')][_0xb862('0x42')]({'where':{'id':_0x53b0a7['body'][_0xb862('0x49')],'role':_0xb862('0x58')},'attributes':['id','name',_0xb862('0x59'),_0xb862('0x5a'),'internal'],'raw':!![]});}return null;})[_0xb862('0x21')](function(_0x524d50){if(!_0x524d50)return null;_0x17c5e9[_0xb862('0x16')][_0xb862('0x58')]=_0x524d50;return _0x17c5e9;})[_0xb862('0x21')](function(_0x547859){if(_0x547859){_0x547859['message'][_0xb862('0x5b')]=util[_0xb862('0x5c')]('SIP/%s',_0x53b0a7[_0xb862('0x48')][_0xb862('0x2b')]);_0x547859['message'][_0xb862('0x5d')]=_0x17c5e9['channel'];_0x547859[_0xb862('0x16')][_0xb862('0x5e')]=_0x17c5e9[_0xb862('0x5d')];_0x547859[_0xb862('0x16')][_0xb862('0x5f')]='reject';respondWithRpcPromise('EventManager',_0xb862('0x60'),{'event':_0xb862('0x61'),'message':_['merge'](_0x17c5e9[_0xb862('0x16')],JSON[_0xb862('0x62')](_0x17c5e9[_0xb862('0x4e')][_0xb862('0x63')]))},client9002);return _0x17c5e9;}return null;})['then'](respondWithResult(_0x554736,null))[_0xb862('0x18')](handleError(_0x554736,null));};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.events.js b/server/api/chatMessage/chatMessage.events.js
index efdaf63..738e15b 100644
--- a/server/api/chatMessage/chatMessage.events.js
+++ b/server/api/chatMessage/chatMessage.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9a23=['hook','exports','events','setMaxListeners','emit','hasOwnProperty'];(function(_0x39b9ee,_0xa7e997){var _0x1b3cf=function(_0x177645){while(--_0x177645){_0x39b9ee['push'](_0x39b9ee['shift']());}};_0x1b3cf(++_0xa7e997);}(_0x9a23,0xe6));var _0x39a2=function(_0x82129b,_0x484ae9){_0x82129b=_0x82129b-0x0;var _0x2ae5dc=_0x9a23[_0x82129b];return _0x2ae5dc;};'use strict';var EventEmitter=require(_0x39a2('0x0'));var ChatMessage=require('../../mysqldb')['db']['ChatMessage'];var ChatMessageEvents=new EventEmitter();ChatMessageEvents[_0x39a2('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x1b26cc){return function(_0x325067,_0x57bf4f,_0xeeb0e4){ChatMessageEvents[_0x39a2('0x2')](_0x1b26cc+':'+_0x325067['id'],_0x325067);ChatMessageEvents['emit'](_0x1b26cc,_0x325067);_0xeeb0e4(null);};}for(var e in events){if(events[_0x39a2('0x3')](e)){var event=events[e];ChatMessage[_0x39a2('0x4')](e,emitEvent(event));}}module[_0x39a2('0x5')]=ChatMessageEvents;
\ No newline at end of file
+var _0x6bab=['events','../../mysqldb','save','remove','emit','hasOwnProperty','exports'];(function(_0x597f0d,_0x49508b){var _0x4b66ef=function(_0xbc756c){while(--_0xbc756c){_0x597f0d['push'](_0x597f0d['shift']());}};_0x4b66ef(++_0x49508b);}(_0x6bab,0x1e3));var _0xb6ba=function(_0x2390bd,_0x212fbd){_0x2390bd=_0x2390bd-0x0;var _0x3a969d=_0x6bab[_0x2390bd];return _0x3a969d;};'use strict';var EventEmitter=require(_0xb6ba('0x0'));var ChatMessage=require(_0xb6ba('0x1'))['db']['ChatMessage'];var ChatMessageEvents=new EventEmitter();ChatMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xb6ba('0x2'),'afterUpdate':'update','afterDestroy':_0xb6ba('0x3')};function emitEvent(_0x37e2c9){return function(_0x3db3eb,_0x43c284,_0x15c200){ChatMessageEvents[_0xb6ba('0x4')](_0x37e2c9+':'+_0x3db3eb['id'],_0x3db3eb);ChatMessageEvents[_0xb6ba('0x4')](_0x37e2c9,_0x3db3eb);_0x15c200(null);};}for(var e in events){if(events[_0xb6ba('0x5')](e)){var event=events[e];ChatMessage['hook'](e,emitEvent(event));}}module[_0xb6ba('0x6')]=ChatMessageEvents;
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.model.js b/server/api/chatMessage/chatMessage.model.js
index a2051e9..b152bb9 100644
--- a/server/api/chatMessage/chatMessage.model.js
+++ b/server/api/chatMessage/chatMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x99b3=['util','../../config/logger','moment','request-promise','rimraf','../../config/environment','exports','define','ChatMessage','chat_messages','fti_chat_messages','models','get','direction','toLowerCase','out','secret','UserId','ChatInteraction','findOne','ChatInteractionId','then','update','createdAt','catch','error','utf8mb4_unicode_ci','lodash'];(function(_0x19ca86,_0x80c6a3){var _0x296609=function(_0x4e7d9e){while(--_0x4e7d9e){_0x19ca86['push'](_0x19ca86['shift']());}};_0x296609(++_0x80c6a3);}(_0x99b3,0x1db));var _0x399b=function(_0x32b9c9,_0x5881e6){_0x32b9c9=_0x32b9c9-0x0;var _0x1a837f=_0x99b3[_0x32b9c9];return _0x1a837f;};'use strict';var _=require(_0x399b('0x0'));var util=require(_0x399b('0x1'));var logger=require(_0x399b('0x2'))('api');var moment=require(_0x399b('0x3'));var BPromise=require('bluebird');var rp=require(_0x399b('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x399b('0x5'));var config=require(_0x399b('0x6'));var attributes=require('./chatMessage.attributes');module[_0x399b('0x7')]=function(_0x212d5f,_0x5c1e79){return _0x212d5f[_0x399b('0x8')](_0x399b('0x9'),attributes,{'tableName':_0x399b('0xa'),'paranoid':![],'indexes':[{'name':_0x399b('0xb'),'fields':['body'],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0x50d8b0,_0x17535b,_0x2d593d){var _0x3226a9=_0x212d5f[_0x399b('0xc')];var _0x49d3d2=_0x50d8b0[_0x399b('0xd')]({'plain':!![]});if(_0x49d3d2[_0x399b('0xe')]['toLowerCase']()==='in'||_0x49d3d2['direction'][_0x399b('0xf')]()===_0x399b('0x10')&&!_0x49d3d2[_0x399b('0x11')]&&!_['isNil'](_0x49d3d2[_0x399b('0x12')])){_0x3226a9[_0x399b('0x13')][_0x399b('0x14')]({'where':{'id':_0x49d3d2[_0x399b('0x15')]}})[_0x399b('0x16')](function(_0x3b45b9){if(_0x3b45b9){_0x3b45b9[_0x399b('0x17')]({'lastMsgAt':_0x49d3d2[_0x399b('0x18')],'lastMsgDirection':_0x49d3d2[_0x399b('0xe')][_0x399b('0xf')]()});}})[_0x399b('0x19')](function(_0x170280){console[_0x399b('0x1a')](_0x170280);});}_0x2d593d();}},'charset':'utf8mb4','collate':_0x399b('0x1b')});};
\ No newline at end of file
+var _0xc0bc=['moment','request-promise','path','rimraf','./chatMessage.attributes','exports','define','ChatMessage','chat_messages','fti_chat_messages','body','FULLTEXT','get','direction','toLowerCase','secret','isNil','UserId','findOne','ChatInteractionId','then','createdAt','catch','error','utf8mb4','utf8mb4_unicode_ci','util','../../config/logger','api'];(function(_0x3764b3,_0x23d114){var _0x48f40c=function(_0xdecee1){while(--_0xdecee1){_0x3764b3['push'](_0x3764b3['shift']());}};_0x48f40c(++_0x23d114);}(_0xc0bc,0x176));var _0xcc0b=function(_0x35b0ec,_0x28ff81){_0x35b0ec=_0x35b0ec-0x0;var _0x2dd601=_0xc0bc[_0x35b0ec];return _0x2dd601;};'use strict';var _=require('lodash');var util=require(_0xcc0b('0x0'));var logger=require(_0xcc0b('0x1'))(_0xcc0b('0x2'));var moment=require(_0xcc0b('0x3'));var BPromise=require('bluebird');var rp=require(_0xcc0b('0x4'));var fs=require('fs');var path=require(_0xcc0b('0x5'));var rimraf=require(_0xcc0b('0x6'));var config=require('../../config/environment');var attributes=require(_0xcc0b('0x7'));module[_0xcc0b('0x8')]=function(_0x526a0d,_0x5b427c){return _0x526a0d[_0xcc0b('0x9')](_0xcc0b('0xa'),attributes,{'tableName':_0xcc0b('0xb'),'paranoid':![],'indexes':[{'name':_0xcc0b('0xc'),'fields':[_0xcc0b('0xd')],'type':_0xcc0b('0xe')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x53c0e7,_0x235b6c,_0x58c6a7){var _0x44c706=_0x526a0d['models'];var _0x822723=_0x53c0e7[_0xcc0b('0xf')]({'plain':!![]});if(_0x822723[_0xcc0b('0x10')][_0xcc0b('0x11')]()==='in'||_0x822723['direction'][_0xcc0b('0x11')]()==='out'&&!_0x822723[_0xcc0b('0x12')]&&!_[_0xcc0b('0x13')](_0x822723[_0xcc0b('0x14')])){_0x44c706['ChatInteraction'][_0xcc0b('0x15')]({'where':{'id':_0x822723[_0xcc0b('0x16')]}})[_0xcc0b('0x17')](function(_0xd77f39){if(_0xd77f39){_0xd77f39['update']({'lastMsgAt':_0x822723[_0xcc0b('0x18')],'lastMsgDirection':_0x822723[_0xcc0b('0x10')][_0xcc0b('0x11')]()});}})[_0xcc0b('0x19')](function(_0x43835a){console[_0xcc0b('0x1a')](_0x43835a);});}_0x58c6a7();}},'charset':_0xcc0b('0x1b'),'collate':_0xcc0b('0x1c')});};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.rpc.js b/server/api/chatMessage/chatMessage.rpc.js
index afc0d21..22fd5c9 100644
--- a/server/api/chatMessage/chatMessage.rpc.js
+++ b/server/api/chatMessage/chatMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdb6b=['socket.io-emitter','./chatMessage.socket','register','request','then','info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','code','error','message','result','catch','CreateChatMessage','ChatMessage','create','options','raw','lodash','util','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','defaults'];(function(_0x4a53d,_0x58a95e){var _0x27410e=function(_0x38fc90){while(--_0x38fc90){_0x4a53d['push'](_0x4a53d['shift']());}};_0x27410e(++_0x58a95e);}(_0xdb6b,0x1b4));var _0xbdb6=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xdb6b[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0xbdb6('0x0'));var util=require(_0xbdb6('0x1'));var moment=require('moment');var BPromise=require(_0xbdb6('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbdb6('0x3'))['db'];var utils=require(_0xbdb6('0x4'));var logger=require(_0xbdb6('0x5'))(_0xbdb6('0x6'));var config=require('../../config/environment');var jayson=require(_0xbdb6('0x7'));var client=jayson[_0xbdb6('0x8')][_0xbdb6('0x9')]({'port':0x232a});config[_0xbdb6('0xa')]=_[_0xbdb6('0xb')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xbdb6('0xc'))(new Redis(config['redis']));require(_0xbdb6('0xd'))[_0xbdb6('0xe')](socket);function respondWithRpcPromise(_0x4a6da6,_0x2b5793,_0x19a9a5){return new BPromise(function(_0x24fc33,_0x370abd){return client[_0xbdb6('0xf')](_0x4a6da6,_0x19a9a5)[_0xbdb6('0x10')](function(_0x3a352b){logger[_0xbdb6('0x11')](_0xbdb6('0x12'),_0x2b5793,_0xbdb6('0x13'));logger[_0xbdb6('0x14')]('ChatMessage,\x20%s,\x20%s,\x20%s',_0x2b5793,_0xbdb6('0x13'),JSON[_0xbdb6('0x15')](_0x3a352b));if(_0x3a352b['error']){if(_0x3a352b['error'][_0xbdb6('0x16')]===0x1f4){logger[_0xbdb6('0x17')]('ChatMessage,\x20%s,\x20%s',_0x2b5793,_0x3a352b[_0xbdb6('0x17')][_0xbdb6('0x18')]);return _0x370abd(_0x3a352b[_0xbdb6('0x17')][_0xbdb6('0x18')]);}logger[_0xbdb6('0x17')](_0xbdb6('0x12'),_0x2b5793,_0x3a352b[_0xbdb6('0x17')]['message']);return _0x24fc33(_0x3a352b['error'][_0xbdb6('0x18')]);}else{logger[_0xbdb6('0x11')](_0xbdb6('0x12'),_0x2b5793,'request\x20sent');_0x24fc33(_0x3a352b[_0xbdb6('0x19')][_0xbdb6('0x18')]);}})[_0xbdb6('0x1a')](function(_0x2ece53){logger[_0xbdb6('0x17')](_0xbdb6('0x12'),_0x2b5793,_0x2ece53);_0x370abd(_0x2ece53);});});}exports[_0xbdb6('0x1b')]=function(_0x96734e){var _0xe5e5b4=this;return new Promise(function(_0x3b7a23,_0x58e0b1){return db[_0xbdb6('0x1c')][_0xbdb6('0x1d')](_0x96734e['body'],{'raw':_0x96734e[_0xbdb6('0x1e')]?_0x96734e[_0xbdb6('0x1e')][_0xbdb6('0x1f')]===undefined?!![]:![]:!![]})[_0xbdb6('0x10')](function(_0x21334a){logger['info'](_0xbdb6('0x1b'),_0x96734e);logger[_0xbdb6('0x14')](_0xbdb6('0x1b'),_0x96734e,JSON['stringify'](_0x21334a));_0x3b7a23(_0x21334a);})[_0xbdb6('0x1a')](function(_0x5d21a0){logger[_0xbdb6('0x17')]('CreateChatMessage',_0x5d21a0['message'],_0x96734e);_0x58e0b1(_0xe5e5b4[_0xbdb6('0x17')](0x1f4,_0x5d21a0[_0xbdb6('0x18')]));});});};
\ No newline at end of file
+var _0xbf3e=['ioredis','../../config/logger','rpc','client','http','redis','defaults','localhost','./chatMessage.socket','register','then','info','request\x20sent','debug','ChatMessage,\x20%s,\x20%s,\x20%s','error','code','ChatMessage,\x20%s,\x20%s','message','result','catch','CreateChatMessage','create','body','options','lodash','util','bluebird','randomstring'];(function(_0x3e5086,_0x48f4a2){var _0xfeb102=function(_0x5a945f){while(--_0x5a945f){_0x3e5086['push'](_0x3e5086['shift']());}};_0xfeb102(++_0x48f4a2);}(_0xbf3e,0x1e9));var _0xebf3=function(_0x469afd,_0x3b6353){_0x469afd=_0x469afd-0x0;var _0x10b8e5=_0xbf3e[_0x469afd];return _0x10b8e5;};'use strict';var _=require(_0xebf3('0x0'));var util=require(_0xebf3('0x1'));var moment=require('moment');var BPromise=require(_0xebf3('0x2'));var rs=require(_0xebf3('0x3'));var fs=require('fs');var Redis=require(_0xebf3('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xebf3('0x5'))(_0xebf3('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xebf3('0x7')][_0xebf3('0x8')]({'port':0x232a});config[_0xebf3('0x9')]=_[_0xebf3('0xa')](config['redis'],{'host':_0xebf3('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xebf3('0x9')]));require(_0xebf3('0xc'))[_0xebf3('0xd')](socket);function respondWithRpcPromise(_0x2ad341,_0x51b31e,_0x587f34){return new BPromise(function(_0x449e96,_0x525315){return client['request'](_0x2ad341,_0x587f34)[_0xebf3('0xe')](function(_0x2ecdce){logger[_0xebf3('0xf')]('ChatMessage,\x20%s,\x20%s',_0x51b31e,_0xebf3('0x10'));logger[_0xebf3('0x11')](_0xebf3('0x12'),_0x51b31e,'request\x20sent',JSON['stringify'](_0x2ecdce));if(_0x2ecdce[_0xebf3('0x13')]){if(_0x2ecdce['error'][_0xebf3('0x14')]===0x1f4){logger[_0xebf3('0x13')](_0xebf3('0x15'),_0x51b31e,_0x2ecdce['error'][_0xebf3('0x16')]);return _0x525315(_0x2ecdce[_0xebf3('0x13')][_0xebf3('0x16')]);}logger[_0xebf3('0x13')](_0xebf3('0x15'),_0x51b31e,_0x2ecdce['error']['message']);return _0x449e96(_0x2ecdce[_0xebf3('0x13')][_0xebf3('0x16')]);}else{logger[_0xebf3('0xf')](_0xebf3('0x15'),_0x51b31e,_0xebf3('0x10'));_0x449e96(_0x2ecdce[_0xebf3('0x17')][_0xebf3('0x16')]);}})[_0xebf3('0x18')](function(_0x44f18e){logger[_0xebf3('0x13')](_0xebf3('0x15'),_0x51b31e,_0x44f18e);_0x525315(_0x44f18e);});});}exports[_0xebf3('0x19')]=function(_0x3cc01a){var _0x147aaf=this;return new Promise(function(_0x17a26c,_0x1a30cc){return db['ChatMessage'][_0xebf3('0x1a')](_0x3cc01a[_0xebf3('0x1b')],{'raw':_0x3cc01a[_0xebf3('0x1c')]?_0x3cc01a['options']['raw']===undefined?!![]:![]:!![]})['then'](function(_0x2efe43){logger[_0xebf3('0xf')](_0xebf3('0x19'),_0x3cc01a);logger['debug'](_0xebf3('0x19'),_0x3cc01a,JSON['stringify'](_0x2efe43));_0x17a26c(_0x2efe43);})[_0xebf3('0x18')](function(_0x5ef606){logger[_0xebf3('0x13')](_0xebf3('0x19'),_0x5ef606[_0xebf3('0x16')],_0x3cc01a);_0x1a30cc(_0x147aaf[_0xebf3('0x13')](0x1f4,_0x5ef606[_0xebf3('0x16')]));});});};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.socket.js b/server/api/chatMessage/chatMessage.socket.js
index e05ba99..16d5df2 100644
--- a/server/api/chatMessage/chatMessage.socket.js
+++ b/server/api/chatMessage/chatMessage.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3595=['emit','length','chatMessage:','./chatMessage.events','save','remove'];(function(_0x12f28d,_0xa13732){var _0x252592=function(_0x14c9d2){while(--_0x14c9d2){_0x12f28d['push'](_0x12f28d['shift']());}};_0x252592(++_0xa13732);}(_0x3595,0x147));var _0x5359=function(_0x197e40,_0x1babb7){_0x197e40=_0x197e40-0x0;var _0x2f4388=_0x3595[_0x197e40];return _0x2f4388;};'use strict';var ChatMessageEvents=require(_0x5359('0x0'));var events=[_0x5359('0x1'),_0x5359('0x2'),'update'];function createListener(_0x18677f,_0x398ac6){return function(_0xcb2beb){_0x398ac6[_0x5359('0x3')](_0x18677f,_0xcb2beb);};}function removeListener(_0x1fa814,_0x125c76){return function(){ChatMessageEvents['removeListener'](_0x1fa814,_0x125c76);};}exports['register']=function(_0x1cb891){for(var _0x24545a=0x0,_0x1b6f48=events[_0x5359('0x4')];_0x24545a<_0x1b6f48;_0x24545a++){var _0x39fcd8=events[_0x24545a];var _0x51b2fb=createListener(_0x5359('0x5')+_0x39fcd8,_0x1cb891);ChatMessageEvents['on'](_0x39fcd8,_0x51b2fb);}};
\ No newline at end of file
+var _0x46fc=['register','length','chatMessage:','./chatMessage.events','save','remove','update','emit'];(function(_0x2777ef,_0x1f7721){var _0xd4b76a=function(_0x48518b){while(--_0x48518b){_0x2777ef['push'](_0x2777ef['shift']());}};_0xd4b76a(++_0x1f7721);}(_0x46fc,0x103));var _0xc46f=function(_0x1a50e5,_0x14accb){_0x1a50e5=_0x1a50e5-0x0;var _0x53b463=_0x46fc[_0x1a50e5];return _0x53b463;};'use strict';var ChatMessageEvents=require(_0xc46f('0x0'));var events=[_0xc46f('0x1'),_0xc46f('0x2'),_0xc46f('0x3')];function createListener(_0x865c60,_0x9460ea){return function(_0x2bf9ee){_0x9460ea[_0xc46f('0x4')](_0x865c60,_0x2bf9ee);};}function removeListener(_0x3a56db,_0x5b0483){return function(){ChatMessageEvents['removeListener'](_0x3a56db,_0x5b0483);};}exports[_0xc46f('0x5')]=function(_0x176c6f){for(var _0x30ca8d=0x0,_0x15904c=events[_0xc46f('0x6')];_0x30ca8d<_0x15904c;_0x30ca8d++){var _0x312101=events[_0x30ca8d];var _0x155a10=createListener(_0xc46f('0x7')+_0x312101,_0x176c6f);ChatMessageEvents['on'](_0x312101,_0x155a10);}};
\ No newline at end of file
diff --git a/server/api/chatMessage/index.js b/server/api/chatMessage/index.js
index 1db0c7d..4167120 100644
--- a/server/api/chatMessage/index.js
+++ b/server/api/chatMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbd39=['/describe','isAuthenticated','describe','/:id','show','post','tracked','create','put','update','accept','/:id/reject','reject','delete','destroy','exports','multer','connect-timeout','Router','fs-extra','../../components/auth/service','../../config/environment','./chatMessage.controller','index','get'];(function(_0x2f9e62,_0x233b61){var _0x276576=function(_0x26d1eb){while(--_0x26d1eb){_0x2f9e62['push'](_0x2f9e62['shift']());}};_0x276576(++_0x233b61);}(_0xbd39,0x1d2));var _0x9bd3=function(_0x6cf19c,_0x2f3f02){_0x6cf19c=_0x6cf19c-0x0;var _0xce14f3=_0xbd39[_0x6cf19c];return _0xce14f3;};'use strict';var multer=require(_0x9bd3('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x9bd3('0x1'));var express=require('express');var router=express[_0x9bd3('0x2')]();var fs_extra=require(_0x9bd3('0x3'));var auth=require(_0x9bd3('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x9bd3('0x5'));var controller=require(_0x9bd3('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0x9bd3('0x7')]);router[_0x9bd3('0x8')](_0x9bd3('0x9'),auth[_0x9bd3('0xa')](),controller[_0x9bd3('0xb')]);router[_0x9bd3('0x8')](_0x9bd3('0xc'),auth[_0x9bd3('0xa')](),controller[_0x9bd3('0xd')]);router[_0x9bd3('0xe')]('/',auth[_0x9bd3('0xa')](),interaction[_0x9bd3('0xf')]('chat','chatmessage:create'),controller[_0x9bd3('0x10')]);router[_0x9bd3('0x11')](_0x9bd3('0xc'),controller[_0x9bd3('0x12')]);router[_0x9bd3('0x11')]('/:id/accept',auth['isAuthenticated'](),controller[_0x9bd3('0x13')]);router[_0x9bd3('0x11')](_0x9bd3('0x14'),auth[_0x9bd3('0xa')](),controller[_0x9bd3('0x15')]);router[_0x9bd3('0x16')](_0x9bd3('0xc'),auth[_0x9bd3('0xa')](),controller[_0x9bd3('0x17')]);module[_0x9bd3('0x18')]=router;
\ No newline at end of file
+var _0x2ba8=['multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','get','/:id','show','chat','chatmessage:create','create','put','accept','/:id/reject','reject','delete','destroy'];(function(_0x5ce3c8,_0x2503bd){var _0xa76867=function(_0x52815e){while(--_0x52815e){_0x5ce3c8['push'](_0x5ce3c8['shift']());}};_0xa76867(++_0x2503bd);}(_0x2ba8,0x6e));var _0x82ba=function(_0x158241,_0x236288){_0x158241=_0x158241-0x0;var _0x1dd068=_0x2ba8[_0x158241];return _0x1dd068;};'use strict';var multer=require(_0x82ba('0x0'));var util=require('util');var path=require(_0x82ba('0x1'));var timeout=require(_0x82ba('0x2'));var express=require(_0x82ba('0x3'));var router=express[_0x82ba('0x4')]();var fs_extra=require(_0x82ba('0x5'));var auth=require(_0x82ba('0x6'));var interaction=require(_0x82ba('0x7'));var config=require(_0x82ba('0x8'));var controller=require('./chatMessage.controller');router['get']('/',auth[_0x82ba('0x9')](),controller['index']);router[_0x82ba('0xa')]('/describe',auth['isAuthenticated'](),controller['describe']);router[_0x82ba('0xa')](_0x82ba('0xb'),auth[_0x82ba('0x9')](),controller[_0x82ba('0xc')]);router['post']('/',auth['isAuthenticated'](),interaction['tracked'](_0x82ba('0xd'),_0x82ba('0xe')),controller[_0x82ba('0xf')]);router[_0x82ba('0x10')](_0x82ba('0xb'),controller['update']);router['put']('/:id/accept',auth[_0x82ba('0x9')](),controller[_0x82ba('0x11')]);router[_0x82ba('0x10')](_0x82ba('0x12'),auth[_0x82ba('0x9')](),controller[_0x82ba('0x13')]);router[_0x82ba('0x14')](_0x82ba('0xb'),auth['isAuthenticated'](),controller[_0x82ba('0x15')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js b/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js
index 8beb938..e39475c 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2032=['medium','exports','TEXT'];(function(_0x216b9b,_0x1bf025){var _0x51ba89=function(_0x5bab61){while(--_0x5bab61){_0x216b9b['push'](_0x216b9b['shift']());}};_0x51ba89(++_0x1bf025);}(_0x2032,0xd9));var _0x2203=function(_0xc90105,_0x5140f3){_0xc90105=_0xc90105-0x0;var _0x5d645d=_0x2032[_0xc90105];return _0x5d645d;};'use strict';var Sequelize=require('sequelize');module[_0x2203('0x0')]={'body':{'type':Sequelize[_0x2203('0x1')](_0x2203('0x2')),'allowNull':![]},'plainBody':{'type':Sequelize['TEXT'](_0x2203('0x2')),'allowNull':![]}};
\ No newline at end of file
+var _0x757a=['exports','TEXT'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x757a,0xde));var _0xa757=function(_0xd51ae0,_0x197b10){_0xd51ae0=_0xd51ae0-0x0;var _0x204c3a=_0x757a[_0xd51ae0];return _0x204c3a;};'use strict';var Sequelize=require('sequelize');module[_0xa757('0x0')]={'body':{'type':Sequelize[_0xa757('0x1')]('medium'),'allowNull':![]},'plainBody':{'type':Sequelize['TEXT']('medium'),'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.controller.js b/server/api/chatOfflineMessage/chatOfflineMessage.controller.js
index f8fd191..cf307f1 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.controller.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7a54=['filter','VIRTUAL','includeAll','include','findAll','rows','show','params','length','merge','options','find','catch','body','Attachment','join','server','attachments','offline-chat','basename','remove','describe','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','desk.js','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','reject','save','update','then','destroy','error','stack','name','send','index','ChatOfflineMessage','fieldName','type','model','map','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick'];(function(_0x3c4737,_0x2329ec){var _0x2bb926=function(_0x3b9605){while(--_0x3b9605){_0x3c4737['push'](_0x3c4737['shift']());}};_0x2bb926(++_0x2329ec);}(_0x7a54,0x106));var _0x47a5=function(_0x1ca49e,_0x3da9d5){_0x1ca49e=_0x1ca49e-0x0;var _0x22b8ea=_0x7a54[_0x1ca49e];return _0x22b8ea;};'use strict';var emlformat=require(_0x47a5('0x0'));var rimraf=require(_0x47a5('0x1'));var zipdir=require(_0x47a5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x47a5('0x3'));var moment=require(_0x47a5('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x47a5('0x5'));var util=require(_0x47a5('0x6'));var path=require(_0x47a5('0x7'));var sox=require(_0x47a5('0x8'));var csv=require(_0x47a5('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x47a5('0xa'));var _=require('lodash');var squel=require(_0x47a5('0xb'));var crypto=require(_0x47a5('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x47a5('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x47a5('0xe'));var authService=require(_0x47a5('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x47a5('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x47a5('0x11'));var utils=require(_0x47a5('0x12'));var config=require(_0x47a5('0x13'));var licenseUtil=require(_0x47a5('0x14'));var db=require(_0x47a5('0x15'))['db'];function respondWithStatusCode(_0xd308b8,_0x1eae59){_0x1eae59=_0x1eae59||0xcc;return function(_0x5beb89){if(_0x5beb89){return _0xd308b8[_0x47a5('0x16')](_0x1eae59);}return _0xd308b8[_0x47a5('0x17')](_0x1eae59)[_0x47a5('0x18')]();};}function respondWithResult(_0x711793,_0x139f25){_0x139f25=_0x139f25||0xc8;return function(_0x620ee9){if(_0x620ee9){return _0x711793[_0x47a5('0x17')](_0x139f25)[_0x47a5('0x19')](_0x620ee9);}};}function respondWithFilteredResult(_0x4e99a8,_0x362359){return function(_0x11faf5){if(_0x11faf5){var _0x3b001e=typeof _0x362359[_0x47a5('0x1a')]===_0x47a5('0x1b')&&typeof _0x362359['limit']==='undefined';var _0x138bc0=_0x11faf5['count'];var _0x5247fd=_0x3b001e?0x0:_0x362359[_0x47a5('0x1a')];var _0xaf70a6=_0x3b001e?_0x11faf5[_0x47a5('0x1c')]:_0x362359[_0x47a5('0x1a')]+_0x362359[_0x47a5('0x1d')];var _0x12b98e;if(_0xaf70a6>=_0x138bc0){_0xaf70a6=_0x138bc0;_0x12b98e=0xc8;}else{_0x12b98e=0xce;}_0x4e99a8[_0x47a5('0x17')](_0x12b98e);return _0x4e99a8[_0x47a5('0x1e')](_0x47a5('0x1f'),_0x5247fd+'-'+_0xaf70a6+'/'+_0x138bc0)['json'](_0x11faf5);}return null;};}function patchUpdates(_0x1570bc){return function(_0xf160ba){try{jsonpatch['apply'](_0xf160ba,_0x1570bc,!![]);}catch(_0x2b0360){return BPromise[_0x47a5('0x20')](_0x2b0360);}return _0xf160ba[_0x47a5('0x21')]();};}function saveUpdates(_0x4c5910,_0xb8ae6c){return function(_0x2f142b){if(_0x2f142b){return _0x2f142b[_0x47a5('0x22')](_0x4c5910)[_0x47a5('0x23')](function(_0x5ef1b1){return _0x5ef1b1;});}return null;};}function removeEntity(_0xe2dea9,_0x385687){return function(_0x513981){if(_0x513981){return _0x513981[_0x47a5('0x24')]()[_0x47a5('0x23')](function(){_0xe2dea9[_0x47a5('0x17')](0xcc)[_0x47a5('0x18')]();});}};}function handleEntityNotFound(_0x3abd6a,_0x50bf17){return function(_0x53078a){if(!_0x53078a){_0x3abd6a[_0x47a5('0x16')](0x194);}return _0x53078a;};}function handleError(_0x5686db,_0x1ea9c8){_0x1ea9c8=_0x1ea9c8||0x1f4;return function(_0x5b6c4e){logger[_0x47a5('0x25')](_0x5b6c4e[_0x47a5('0x26')]);if(_0x5b6c4e[_0x47a5('0x27')]){delete _0x5b6c4e[_0x47a5('0x27')];}_0x5686db[_0x47a5('0x17')](_0x1ea9c8)[_0x47a5('0x28')](_0x5b6c4e);};}exports[_0x47a5('0x29')]=function(_0x136b14,_0x16631f){var _0x361bfa={},_0x1127f8={},_0x11a4fa={'count':0x0,'rows':[]};var _0x3ad507=_['map'](db[_0x47a5('0x2a')]['rawAttributes'],function(_0x2ef875){return{'name':_0x2ef875[_0x47a5('0x2b')],'type':_0x2ef875[_0x47a5('0x2c')]['key']};});_0x1127f8[_0x47a5('0x2d')]=_[_0x47a5('0x2e')](_0x3ad507,_0x47a5('0x27'));_0x1127f8[_0x47a5('0x2f')]=_['keys'](_0x136b14['query']);_0x1127f8[_0x47a5('0x30')]=_[_0x47a5('0x31')](_0x1127f8['model'],_0x1127f8['query']);_0x361bfa[_0x47a5('0x32')]=_[_0x47a5('0x31')](_0x1127f8['model'],qs[_0x47a5('0x33')](_0x136b14['query'][_0x47a5('0x33')]));_0x361bfa[_0x47a5('0x32')]=_0x361bfa['attributes']['length']?_0x361bfa[_0x47a5('0x32')]:_0x1127f8['model'];if(!_0x136b14[_0x47a5('0x2f')][_0x47a5('0x34')](_0x47a5('0x35'))){_0x361bfa['limit']=qs[_0x47a5('0x1d')](_0x136b14['query']['limit']);_0x361bfa[_0x47a5('0x1a')]=qs['offset'](_0x136b14[_0x47a5('0x2f')]['offset']);}_0x361bfa[_0x47a5('0x36')]=qs[_0x47a5('0x37')](_0x136b14[_0x47a5('0x2f')][_0x47a5('0x37')]);_0x361bfa[_0x47a5('0x38')]=qs[_0x47a5('0x30')](_[_0x47a5('0x39')](_0x136b14[_0x47a5('0x2f')],_0x1127f8[_0x47a5('0x30')]),_0x3ad507);if(_0x136b14['query'][_0x47a5('0x3a')]){_0x361bfa[_0x47a5('0x38')]=_['merge'](_0x361bfa[_0x47a5('0x38')],{'$or':_[_0x47a5('0x2e')](_0x3ad507,function(_0x1d4348){if(_0x1d4348['type']!==_0x47a5('0x3b')){var _0x10f660={};_0x10f660[_0x1d4348['name']]={'$like':'%'+_0x136b14[_0x47a5('0x2f')][_0x47a5('0x3a')]+'%'};return _0x10f660;}})});}_0x361bfa=_['merge']({},_0x361bfa,_0x136b14['options']);var _0x5ebd8c={'where':_0x361bfa[_0x47a5('0x38')]};return db['ChatOfflineMessage'][_0x47a5('0x1c')](_0x5ebd8c)[_0x47a5('0x23')](function(_0x301a85){_0x11a4fa[_0x47a5('0x1c')]=_0x301a85;if(_0x136b14[_0x47a5('0x2f')][_0x47a5('0x3c')]){_0x361bfa[_0x47a5('0x3d')]=[{'all':!![]}];}return db[_0x47a5('0x2a')][_0x47a5('0x3e')](_0x361bfa);})[_0x47a5('0x23')](function(_0x280500){_0x11a4fa[_0x47a5('0x3f')]=_0x280500;return _0x11a4fa;})[_0x47a5('0x23')](respondWithFilteredResult(_0x16631f,_0x361bfa))['catch'](handleError(_0x16631f,null));};exports[_0x47a5('0x40')]=function(_0x1c36fa,_0x331474){var _0x23bd8d={'raw':!![],'where':{'id':_0x1c36fa[_0x47a5('0x41')]['id']}},_0x586f4f={};_0x586f4f['model']=_['keys'](db['ChatOfflineMessage']['rawAttributes']);_0x586f4f[_0x47a5('0x2f')]=_['keys'](_0x1c36fa[_0x47a5('0x2f')]);_0x586f4f[_0x47a5('0x30')]=_[_0x47a5('0x31')](_0x586f4f['model'],_0x586f4f[_0x47a5('0x2f')]);_0x23bd8d[_0x47a5('0x32')]=_['intersection'](_0x586f4f['model'],qs[_0x47a5('0x33')](_0x1c36fa['query'][_0x47a5('0x33')]));_0x23bd8d[_0x47a5('0x32')]=_0x23bd8d[_0x47a5('0x32')][_0x47a5('0x42')]?_0x23bd8d[_0x47a5('0x32')]:_0x586f4f[_0x47a5('0x2d')];if(_0x1c36fa[_0x47a5('0x2f')][_0x47a5('0x3c')]){_0x23bd8d[_0x47a5('0x3d')]=[{'all':!![]}];}_0x23bd8d=_[_0x47a5('0x43')]({},_0x23bd8d,_0x1c36fa[_0x47a5('0x44')]);return db[_0x47a5('0x2a')][_0x47a5('0x45')](_0x23bd8d)[_0x47a5('0x23')](handleEntityNotFound(_0x331474,null))[_0x47a5('0x23')](respondWithResult(_0x331474,null))[_0x47a5('0x46')](handleError(_0x331474,null));};exports['create']=function(_0x2d38de,_0x23bb04){return db['ChatOfflineMessage']['create'](_0x2d38de[_0x47a5('0x47')],{})['then'](respondWithResult(_0x23bb04,0xc9))[_0x47a5('0x46')](handleError(_0x23bb04,null));};exports[_0x47a5('0x22')]=function(_0x54c35f,_0x4f62d3){if(_0x54c35f[_0x47a5('0x47')]['id']){delete _0x54c35f['body']['id'];}return db[_0x47a5('0x2a')][_0x47a5('0x45')]({'where':{'id':_0x54c35f[_0x47a5('0x41')]['id']}})[_0x47a5('0x23')](handleEntityNotFound(_0x4f62d3,null))[_0x47a5('0x23')](saveUpdates(_0x54c35f[_0x47a5('0x47')],null))[_0x47a5('0x23')](respondWithResult(_0x4f62d3,null))['catch'](handleError(_0x4f62d3,null));};exports['destroy']=function(_0x2dd1db,_0x411230){return db[_0x47a5('0x48')][_0x47a5('0x3e')]({'where':{'ChatOfflineMessageId':_0x2dd1db[_0x47a5('0x41')]['id']},'raw':!![]})[_0x47a5('0x23')](function(_0x249de5){_0x249de5['forEach'](function(_0x45cca5){var _0x1c9a62=path[_0x47a5('0x49')](config['root'],_0x47a5('0x4a'),'files',_0x47a5('0x4b'),_0x47a5('0x4c'),_0x45cca5[_0x47a5('0x4d')]);var _0xf03bd5=fs['existsSync'](_0x1c9a62);if(_0xf03bd5)fs_extra[_0x47a5('0x4e')](_0x1c9a62);});})[_0x47a5('0x23')](function(){return db[_0x47a5('0x2a')][_0x47a5('0x45')]({'where':{'id':_0x2dd1db[_0x47a5('0x41')]['id']},'individualHooks':!![]});})[_0x47a5('0x23')](handleEntityNotFound(_0x411230,null))[_0x47a5('0x23')](removeEntity(_0x411230,null))['catch'](handleError(_0x411230,null));};exports[_0x47a5('0x4f')]=function(_0x43721b,_0x187d7e){return db[_0x47a5('0x2a')][_0x47a5('0x4f')]()[_0x47a5('0x23')](respondWithResult(_0x187d7e,null))['catch'](handleError(_0x187d7e,null));};
\ No newline at end of file
+var _0x9957=['sendStatus','status','json','undefined','count','offset','limit','set','Content-Range','reject','save','then','destroy','error','name','send','index','fieldName','type','key','model','map','keys','filters','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filter','merge','VIRTUAL','options','ChatOfflineMessage','findAll','rows','show','rawAttributes','includeAll','include','find','create','catch','body','params','Attachment','forEach','join','root','server','files','attachments','basename','existsSync','remove','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb'];(function(_0x4aa3b4,_0x53970e){var _0x5447e1=function(_0x54df7d){while(--_0x54df7d){_0x4aa3b4['push'](_0x4aa3b4['shift']());}};_0x5447e1(++_0x53970e);}(_0x9957,0x93));var _0x7995=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0x9957[_0x5ddb1c];return _0x354adc;};'use strict';var emlformat=require(_0x7995('0x0'));var rimraf=require(_0x7995('0x1'));var zipdir=require(_0x7995('0x2'));var jsonpatch=require(_0x7995('0x3'));var rp=require('request-promise');var moment=require(_0x7995('0x4'));var BPromise=require(_0x7995('0x5'));var Mustache=require(_0x7995('0x6'));var util=require(_0x7995('0x7'));var path=require('path');var sox=require(_0x7995('0x8'));var csv=require(_0x7995('0x9'));var ejs=require(_0x7995('0xa'));var fs=require('fs');var fs_extra=require(_0x7995('0xb'));var _=require(_0x7995('0xc'));var squel=require(_0x7995('0xd'));var crypto=require('crypto');var jsforce=require(_0x7995('0xe'));var deskjs=require(_0x7995('0xf'));var toCsv=require('to-csv');var querystring=require(_0x7995('0x10'));var Papa=require(_0x7995('0x11'));var Redis=require(_0x7995('0x12'));var authService=require(_0x7995('0x13'));var qs=require(_0x7995('0x14'));var as=require(_0x7995('0x15'));var hardwareService=require(_0x7995('0x16'));var logger=require('../../config/logger')(_0x7995('0x17'));var utils=require(_0x7995('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0x7995('0x19'));var db=require(_0x7995('0x1a'))['db'];function respondWithStatusCode(_0x19a27e,_0x385f00){_0x385f00=_0x385f00||0xcc;return function(_0x281576){if(_0x281576){return _0x19a27e[_0x7995('0x1b')](_0x385f00);}return _0x19a27e[_0x7995('0x1c')](_0x385f00)['end']();};}function respondWithResult(_0x58f5ad,_0x2b4e94){_0x2b4e94=_0x2b4e94||0xc8;return function(_0x2233dd){if(_0x2233dd){return _0x58f5ad[_0x7995('0x1c')](_0x2b4e94)[_0x7995('0x1d')](_0x2233dd);}};}function respondWithFilteredResult(_0x3f1d3e,_0x1a5310){return function(_0x2202ce){if(_0x2202ce){var _0x41cbf0=typeof _0x1a5310['offset']===_0x7995('0x1e')&&typeof _0x1a5310['limit']===_0x7995('0x1e');var _0x37f297=_0x2202ce[_0x7995('0x1f')];var _0x291317=_0x41cbf0?0x0:_0x1a5310[_0x7995('0x20')];var _0x37a7d4=_0x41cbf0?_0x2202ce['count']:_0x1a5310['offset']+_0x1a5310[_0x7995('0x21')];var _0x5e6f90;if(_0x37a7d4>=_0x37f297){_0x37a7d4=_0x37f297;_0x5e6f90=0xc8;}else{_0x5e6f90=0xce;}_0x3f1d3e['status'](_0x5e6f90);return _0x3f1d3e[_0x7995('0x22')](_0x7995('0x23'),_0x291317+'-'+_0x37a7d4+'/'+_0x37f297)['json'](_0x2202ce);}return null;};}function patchUpdates(_0x3a9b54){return function(_0x51f276){try{jsonpatch['apply'](_0x51f276,_0x3a9b54,!![]);}catch(_0x3e4c54){return BPromise[_0x7995('0x24')](_0x3e4c54);}return _0x51f276[_0x7995('0x25')]();};}function saveUpdates(_0x1a8568,_0x460924){return function(_0x1c278a){if(_0x1c278a){return _0x1c278a['update'](_0x1a8568)[_0x7995('0x26')](function(_0x46ee4b){return _0x46ee4b;});}return null;};}function removeEntity(_0x204507,_0x285437){return function(_0x563799){if(_0x563799){return _0x563799[_0x7995('0x27')]()[_0x7995('0x26')](function(){_0x204507[_0x7995('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x39df42,_0x34e70c){return function(_0x401dc3){if(!_0x401dc3){_0x39df42[_0x7995('0x1b')](0x194);}return _0x401dc3;};}function handleError(_0x3a3fcf,_0x2a307e){_0x2a307e=_0x2a307e||0x1f4;return function(_0x56691a){logger[_0x7995('0x28')](_0x56691a['stack']);if(_0x56691a[_0x7995('0x29')]){delete _0x56691a[_0x7995('0x29')];}_0x3a3fcf[_0x7995('0x1c')](_0x2a307e)[_0x7995('0x2a')](_0x56691a);};}exports[_0x7995('0x2b')]=function(_0x4b6f99,_0x9b2a15){var _0x514445={},_0x456a28={},_0x3250e0={'count':0x0,'rows':[]};var _0x4253e5=_['map'](db['ChatOfflineMessage']['rawAttributes'],function(_0x3573be){return{'name':_0x3573be[_0x7995('0x2c')],'type':_0x3573be[_0x7995('0x2d')][_0x7995('0x2e')]};});_0x456a28[_0x7995('0x2f')]=_[_0x7995('0x30')](_0x4253e5,'name');_0x456a28['query']=_[_0x7995('0x31')](_0x4b6f99['query']);_0x456a28[_0x7995('0x32')]=_[_0x7995('0x33')](_0x456a28[_0x7995('0x2f')],_0x456a28[_0x7995('0x34')]);_0x514445[_0x7995('0x35')]=_['intersection'](_0x456a28[_0x7995('0x2f')],qs[_0x7995('0x36')](_0x4b6f99['query']['fields']));_0x514445['attributes']=_0x514445[_0x7995('0x35')][_0x7995('0x37')]?_0x514445['attributes']:_0x456a28[_0x7995('0x2f')];if(!_0x4b6f99['query'][_0x7995('0x38')](_0x7995('0x39'))){_0x514445[_0x7995('0x21')]=qs['limit'](_0x4b6f99['query'][_0x7995('0x21')]);_0x514445['offset']=qs['offset'](_0x4b6f99[_0x7995('0x34')][_0x7995('0x20')]);}_0x514445['order']=qs[_0x7995('0x3a')](_0x4b6f99[_0x7995('0x34')][_0x7995('0x3a')]);_0x514445[_0x7995('0x3b')]=qs[_0x7995('0x32')](_['pick'](_0x4b6f99[_0x7995('0x34')],_0x456a28[_0x7995('0x32')]),_0x4253e5);if(_0x4b6f99[_0x7995('0x34')][_0x7995('0x3c')]){_0x514445['where']=_[_0x7995('0x3d')](_0x514445[_0x7995('0x3b')],{'$or':_[_0x7995('0x30')](_0x4253e5,function(_0xe5ea43){if(_0xe5ea43[_0x7995('0x2d')]!==_0x7995('0x3e')){var _0x5688a1={};_0x5688a1[_0xe5ea43[_0x7995('0x29')]]={'$like':'%'+_0x4b6f99[_0x7995('0x34')][_0x7995('0x3c')]+'%'};return _0x5688a1;}})});}_0x514445=_[_0x7995('0x3d')]({},_0x514445,_0x4b6f99[_0x7995('0x3f')]);var _0x298fc2={'where':_0x514445[_0x7995('0x3b')]};return db[_0x7995('0x40')][_0x7995('0x1f')](_0x298fc2)[_0x7995('0x26')](function(_0x6fe77b){_0x3250e0[_0x7995('0x1f')]=_0x6fe77b;if(_0x4b6f99[_0x7995('0x34')]['includeAll']){_0x514445['include']=[{'all':!![]}];}return db[_0x7995('0x40')][_0x7995('0x41')](_0x514445);})['then'](function(_0x4b0855){_0x3250e0[_0x7995('0x42')]=_0x4b0855;return _0x3250e0;})['then'](respondWithFilteredResult(_0x9b2a15,_0x514445))['catch'](handleError(_0x9b2a15,null));};exports[_0x7995('0x43')]=function(_0x36e28b,_0x35c8ff){var _0x576b96={'raw':!![],'where':{'id':_0x36e28b['params']['id']}},_0x46ac4f={};_0x46ac4f[_0x7995('0x2f')]=_['keys'](db['ChatOfflineMessage'][_0x7995('0x44')]);_0x46ac4f[_0x7995('0x34')]=_[_0x7995('0x31')](_0x36e28b[_0x7995('0x34')]);_0x46ac4f['filters']=_[_0x7995('0x33')](_0x46ac4f[_0x7995('0x2f')],_0x46ac4f[_0x7995('0x34')]);_0x576b96[_0x7995('0x35')]=_['intersection'](_0x46ac4f['model'],qs[_0x7995('0x36')](_0x36e28b['query'][_0x7995('0x36')]));_0x576b96['attributes']=_0x576b96[_0x7995('0x35')]['length']?_0x576b96[_0x7995('0x35')]:_0x46ac4f[_0x7995('0x2f')];if(_0x36e28b['query'][_0x7995('0x45')]){_0x576b96[_0x7995('0x46')]=[{'all':!![]}];}_0x576b96=_[_0x7995('0x3d')]({},_0x576b96,_0x36e28b[_0x7995('0x3f')]);return db['ChatOfflineMessage'][_0x7995('0x47')](_0x576b96)[_0x7995('0x26')](handleEntityNotFound(_0x35c8ff,null))[_0x7995('0x26')](respondWithResult(_0x35c8ff,null))['catch'](handleError(_0x35c8ff,null));};exports[_0x7995('0x48')]=function(_0x44f516,_0x511567){return db[_0x7995('0x40')][_0x7995('0x48')](_0x44f516['body'],{})[_0x7995('0x26')](respondWithResult(_0x511567,0xc9))[_0x7995('0x49')](handleError(_0x511567,null));};exports['update']=function(_0x3d1dbb,_0x5843ba){if(_0x3d1dbb[_0x7995('0x4a')]['id']){delete _0x3d1dbb[_0x7995('0x4a')]['id'];}return db[_0x7995('0x40')][_0x7995('0x47')]({'where':{'id':_0x3d1dbb[_0x7995('0x4b')]['id']}})[_0x7995('0x26')](handleEntityNotFound(_0x5843ba,null))[_0x7995('0x26')](saveUpdates(_0x3d1dbb['body'],null))[_0x7995('0x26')](respondWithResult(_0x5843ba,null))[_0x7995('0x49')](handleError(_0x5843ba,null));};exports[_0x7995('0x27')]=function(_0x4ffc8a,_0x19da63){return db[_0x7995('0x4c')][_0x7995('0x41')]({'where':{'ChatOfflineMessageId':_0x4ffc8a['params']['id']},'raw':!![]})['then'](function(_0x5a592e){_0x5a592e[_0x7995('0x4d')](function(_0x1fd1ca){var _0x4cf5db=path[_0x7995('0x4e')](config[_0x7995('0x4f')],_0x7995('0x50'),_0x7995('0x51'),_0x7995('0x52'),'offline-chat',_0x1fd1ca[_0x7995('0x53')]);var _0x4ab09f=fs[_0x7995('0x54')](_0x4cf5db);if(_0x4ab09f)fs_extra[_0x7995('0x55')](_0x4cf5db);});})[_0x7995('0x26')](function(){return db['ChatOfflineMessage']['find']({'where':{'id':_0x4ffc8a['params']['id']},'individualHooks':!![]});})['then'](handleEntityNotFound(_0x19da63,null))[_0x7995('0x26')](removeEntity(_0x19da63,null))[_0x7995('0x49')](handleError(_0x19da63,null));};exports[_0x7995('0x56')]=function(_0x150261,_0x1d957e){return db[_0x7995('0x40')][_0x7995('0x56')]()[_0x7995('0x26')](respondWithResult(_0x1d957e,null))[_0x7995('0x49')](handleError(_0x1d957e,null));};
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.events.js b/server/api/chatOfflineMessage/chatOfflineMessage.events.js
index 07f5d8d..09b136b 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.events.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7ca0=['save','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','ChatOfflineMessage','setMaxListeners'];(function(_0x1882b5,_0x34314d){var _0x3286b8=function(_0x1503ed){while(--_0x1503ed){_0x1882b5['push'](_0x1882b5['shift']());}};_0x3286b8(++_0x34314d);}(_0x7ca0,0xe2));var _0x07ca=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7ca0[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0x07ca('0x0'));var ChatOfflineMessage=require(_0x07ca('0x1'))['db'][_0x07ca('0x2')];var ChatOfflineMessageEvents=new EventEmitter();ChatOfflineMessageEvents[_0x07ca('0x3')](0x0);var events={'afterCreate':_0x07ca('0x4'),'afterUpdate':'update','afterDestroy':_0x07ca('0x5')};function emitEvent(_0xcc4c90){return function(_0x5a82f8,_0x26e58d,_0x52ba7a){ChatOfflineMessageEvents[_0x07ca('0x6')](_0xcc4c90+':'+_0x5a82f8['id'],_0x5a82f8);ChatOfflineMessageEvents[_0x07ca('0x6')](_0xcc4c90,_0x5a82f8);_0x52ba7a(null);};}for(var e in events){if(events[_0x07ca('0x7')](e)){var event=events[e];ChatOfflineMessage[_0x07ca('0x8')](e,emitEvent(event));}}module[_0x07ca('0x9')]=ChatOfflineMessageEvents;
\ No newline at end of file
+var _0xbc9b=['ChatOfflineMessage','setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x3193f1,_0x3503b9){var _0x3c7c76=function(_0x386007){while(--_0x386007){_0x3193f1['push'](_0x3193f1['shift']());}};_0x3c7c76(++_0x3503b9);}(_0xbc9b,0x9e));var _0xbbc9=function(_0x2b8ff6,_0x54639b){_0x2b8ff6=_0x2b8ff6-0x0;var _0xe6d789=_0xbc9b[_0x2b8ff6];return _0xe6d789;};'use strict';var EventEmitter=require(_0xbbc9('0x0'));var ChatOfflineMessage=require(_0xbbc9('0x1'))['db'][_0xbbc9('0x2')];var ChatOfflineMessageEvents=new EventEmitter();ChatOfflineMessageEvents[_0xbbc9('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xbbc9('0x4'),'afterDestroy':_0xbbc9('0x5')};function emitEvent(_0x2dd792){return function(_0x8d64d8,_0x3ffa65,_0x5ed1a4){ChatOfflineMessageEvents[_0xbbc9('0x6')](_0x2dd792+':'+_0x8d64d8['id'],_0x8d64d8);ChatOfflineMessageEvents['emit'](_0x2dd792,_0x8d64d8);_0x5ed1a4(null);};}for(var e in events){if(events[_0xbbc9('0x7')](e)){var event=events[e];ChatOfflineMessage[_0xbbc9('0x8')](e,emitEvent(event));}}module[_0xbbc9('0x9')]=ChatOfflineMessageEvents;
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.model.js b/server/api/chatOfflineMessage/chatOfflineMessage.model.js
index 46c9778..bea86bb 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.model.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5c1f=['exports','define','ChatOfflineMessage','chat_offline_messages','utf8mb4_unicode_ci'];(function(_0x20172d,_0x3ca859){var _0x305c17=function(_0x3020e9){while(--_0x3020e9){_0x20172d['push'](_0x20172d['shift']());}};_0x305c17(++_0x3ca859);}(_0x5c1f,0x1b3));var _0xf5c1=function(_0x338f73,_0x1945c8){_0x338f73=_0x338f73-0x0;var _0x163fdf=_0x5c1f[_0x338f73];return _0x163fdf;};'use strict';var attributes=require('./chatOfflineMessage.attributes');module[_0xf5c1('0x0')]=function(_0x2cf2a5){return _0x2cf2a5[_0xf5c1('0x1')](_0xf5c1('0x2'),attributes,{'tableName':_0xf5c1('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0xf5c1('0x4')});};
\ No newline at end of file
+var _0xc29b=['ChatOfflineMessage','chat_offline_messages','utf8mb4_unicode_ci','./chatOfflineMessage.attributes','define'];(function(_0x240096,_0x4a8c21){var _0x59a87b=function(_0x2f68c3){while(--_0x2f68c3){_0x240096['push'](_0x240096['shift']());}};_0x59a87b(++_0x4a8c21);}(_0xc29b,0x1d9));var _0xbc29=function(_0x3b55e1,_0x3da326){_0x3b55e1=_0x3b55e1-0x0;var _0x2f1a16=_0xc29b[_0x3b55e1];return _0x2f1a16;};'use strict';var attributes=require(_0xbc29('0x0'));module['exports']=function(_0x3074a4){return _0x3074a4[_0xbc29('0x1')](_0xbc29('0x2'),attributes,{'tableName':_0xbc29('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0xbc29('0x4')});};
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js b/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js
index eefdce9..efadef4 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf128=['rpc','../../config/environment','jayson/promise','client','request','then','ChatOfflineMessage,\x20%s,\x20%s','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','info','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x416959,_0x1f34e2){var _0x3c849a=function(_0x5ef736){while(--_0x5ef736){_0x416959['push'](_0x416959['shift']());}};_0x3c849a(++_0x1f34e2);}(_0xf128,0x109));var _0x8f12=function(_0x42fb0e,_0x55fc22){_0x42fb0e=_0x42fb0e-0x0;var _0x595566=_0xf128[_0x42fb0e];return _0x595566;};'use strict';var _=require(_0x8f12('0x0'));var util=require(_0x8f12('0x1'));var moment=require(_0x8f12('0x2'));var BPromise=require(_0x8f12('0x3'));var rs=require(_0x8f12('0x4'));var fs=require('fs');var Redis=require(_0x8f12('0x5'));var db=require(_0x8f12('0x6'))['db'];var utils=require(_0x8f12('0x7'));var logger=require('../../config/logger')(_0x8f12('0x8'));var config=require(_0x8f12('0x9'));var jayson=require(_0x8f12('0xa'));var client=jayson[_0x8f12('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x297aef,_0x3a563d,_0x2ff8d3){return new BPromise(function(_0x5087e6,_0x30db87){return client[_0x8f12('0xc')](_0x297aef,_0x2ff8d3)[_0x8f12('0xd')](function(_0x186c89){logger['info'](_0x8f12('0xe'),_0x3a563d,'request\x20sent');logger['debug'](_0x8f12('0xf'),_0x3a563d,_0x8f12('0x10'),JSON['stringify'](_0x186c89));if(_0x186c89[_0x8f12('0x11')]){if(_0x186c89['error']['code']===0x1f4){logger[_0x8f12('0x11')]('ChatOfflineMessage,\x20%s,\x20%s',_0x3a563d,_0x186c89[_0x8f12('0x11')][_0x8f12('0x12')]);return _0x30db87(_0x186c89[_0x8f12('0x11')][_0x8f12('0x12')]);}logger[_0x8f12('0x11')](_0x8f12('0xe'),_0x3a563d,_0x186c89[_0x8f12('0x11')]['message']);return _0x5087e6(_0x186c89[_0x8f12('0x11')][_0x8f12('0x12')]);}else{logger[_0x8f12('0x13')](_0x8f12('0xe'),_0x3a563d,_0x8f12('0x10'));_0x5087e6(_0x186c89[_0x8f12('0x14')][_0x8f12('0x12')]);}})['catch'](function(_0x52bf35){logger[_0x8f12('0x11')](_0x8f12('0xe'),_0x3a563d,_0x52bf35);_0x30db87(_0x52bf35);});});}
\ No newline at end of file
+var _0xc1b6=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','info','request\x20sent','debug','stringify','error','code','message','ChatOfflineMessage,\x20%s,\x20%s','result','catch','lodash','util'];(function(_0x2e2616,_0x15afe2){var _0x572c57=function(_0x1243b8){while(--_0x1243b8){_0x2e2616['push'](_0x2e2616['shift']());}};_0x572c57(++_0x15afe2);}(_0xc1b6,0xfb));var _0x6c1b=function(_0x820d7b,_0xa5564c){_0x820d7b=_0x820d7b-0x0;var _0x249af0=_0xc1b6[_0x820d7b];return _0x249af0;};'use strict';var _=require(_0x6c1b('0x0'));var util=require(_0x6c1b('0x1'));var moment=require(_0x6c1b('0x2'));var BPromise=require(_0x6c1b('0x3'));var rs=require(_0x6c1b('0x4'));var fs=require('fs');var Redis=require(_0x6c1b('0x5'));var db=require(_0x6c1b('0x6'))['db'];var utils=require(_0x6c1b('0x7'));var logger=require(_0x6c1b('0x8'))(_0x6c1b('0x9'));var config=require('../../config/environment');var jayson=require(_0x6c1b('0xa'));var client=jayson[_0x6c1b('0xb')][_0x6c1b('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x3c82c0,_0x14aedf,_0xccd626){return new BPromise(function(_0x1edcc2,_0x3cac92){return client['request'](_0x3c82c0,_0xccd626)['then'](function(_0x1614c2){logger[_0x6c1b('0xd')]('ChatOfflineMessage,\x20%s,\x20%s',_0x14aedf,_0x6c1b('0xe'));logger[_0x6c1b('0xf')]('ChatOfflineMessage,\x20%s,\x20%s,\x20%s',_0x14aedf,'request\x20sent',JSON[_0x6c1b('0x10')](_0x1614c2));if(_0x1614c2[_0x6c1b('0x11')]){if(_0x1614c2[_0x6c1b('0x11')][_0x6c1b('0x12')]===0x1f4){logger[_0x6c1b('0x11')]('ChatOfflineMessage,\x20%s,\x20%s',_0x14aedf,_0x1614c2[_0x6c1b('0x11')]['message']);return _0x3cac92(_0x1614c2[_0x6c1b('0x11')]['message']);}logger[_0x6c1b('0x11')]('ChatOfflineMessage,\x20%s,\x20%s',_0x14aedf,_0x1614c2[_0x6c1b('0x11')][_0x6c1b('0x13')]);return _0x1edcc2(_0x1614c2['error'][_0x6c1b('0x13')]);}else{logger[_0x6c1b('0xd')](_0x6c1b('0x14'),_0x14aedf,_0x6c1b('0xe'));_0x1edcc2(_0x1614c2[_0x6c1b('0x15')][_0x6c1b('0x13')]);}})[_0x6c1b('0x16')](function(_0x68258b){logger[_0x6c1b('0x11')](_0x6c1b('0x14'),_0x14aedf,_0x68258b);_0x3cac92(_0x68258b);});});}
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/index.js b/server/api/chatOfflineMessage/index.js
index 85960dd..54ecc0d 100644
--- a/server/api/chatOfflineMessage/index.js
+++ b/server/api/chatOfflineMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x110e=['connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatOfflineMessage.controller','get','index','isAuthenticated','describe','show','post','create','/:id','update','exports','multer','util','path'];(function(_0x1fc122,_0x5e2c17){var _0xa2cb13=function(_0x263b13){while(--_0x263b13){_0x1fc122['push'](_0x1fc122['shift']());}};_0xa2cb13(++_0x5e2c17);}(_0x110e,0x1c9));var _0xe110=function(_0x4e676e,_0x2a7c6d){_0x4e676e=_0x4e676e-0x0;var _0x336a3c=_0x110e[_0x4e676e];return _0x336a3c;};'use strict';var multer=require(_0xe110('0x0'));var util=require(_0xe110('0x1'));var path=require(_0xe110('0x2'));var timeout=require(_0xe110('0x3'));var express=require(_0xe110('0x4'));var router=express[_0xe110('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xe110('0x6'));var interaction=require(_0xe110('0x7'));var config=require(_0xe110('0x8'));var controller=require(_0xe110('0x9'));router[_0xe110('0xa')]('/',auth['isAuthenticated'](),controller[_0xe110('0xb')]);router[_0xe110('0xa')]('/describe',auth[_0xe110('0xc')](),controller[_0xe110('0xd')]);router[_0xe110('0xa')]('/:id',auth[_0xe110('0xc')](),controller[_0xe110('0xe')]);router[_0xe110('0xf')]('/',auth['isAuthenticated'](),controller[_0xe110('0x10')]);router['put'](_0xe110('0x11'),auth['isAuthenticated'](),controller[_0xe110('0x12')]);router['delete']('/:id',auth['isAuthenticated'](),controller['destroy']);module[_0xe110('0x13')]=router;
\ No newline at end of file
+var _0xb1ef=['post','isAuthenticated','create','put','update','delete','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatOfflineMessage.controller','get','describe','/:id','show'];(function(_0x8c43de,_0x90ff31){var _0xa6591b=function(_0x469716){while(--_0x469716){_0x8c43de['push'](_0x8c43de['shift']());}};_0xa6591b(++_0x90ff31);}(_0xb1ef,0x168));var _0xfb1e=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xb1ef[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0xfb1e('0x0'));var util=require(_0xfb1e('0x1'));var path=require(_0xfb1e('0x2'));var timeout=require('connect-timeout');var express=require(_0xfb1e('0x3'));var router=express[_0xfb1e('0x4')]();var fs_extra=require(_0xfb1e('0x5'));var auth=require(_0xfb1e('0x6'));var interaction=require(_0xfb1e('0x7'));var config=require(_0xfb1e('0x8'));var controller=require(_0xfb1e('0x9'));router[_0xfb1e('0xa')]('/',auth['isAuthenticated'](),controller['index']);router[_0xfb1e('0xa')]('/describe',auth['isAuthenticated'](),controller[_0xfb1e('0xb')]);router[_0xfb1e('0xa')](_0xfb1e('0xc'),auth['isAuthenticated'](),controller[_0xfb1e('0xd')]);router[_0xfb1e('0xe')]('/',auth[_0xfb1e('0xf')](),controller[_0xfb1e('0x10')]);router[_0xfb1e('0x11')](_0xfb1e('0xc'),auth[_0xfb1e('0xf')](),controller[_0xfb1e('0x12')]);router[_0xfb1e('0x13')](_0xfb1e('0xc'),auth[_0xfb1e('0xf')](),controller[_0xfb1e('0x14')]);module[_0xfb1e('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.attributes.js b/server/api/chatProactiveAction/chatProactiveAction.attributes.js
index 1da29b5..69899be 100644
--- a/server/api/chatProactiveAction/chatProactiveAction.attributes.js
+++ b/server/api/chatProactiveAction/chatProactiveAction.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb307=['mouseOver','sequelize','exports','STRING','ENUM','timeout'];(function(_0x10b317,_0x2adf32){var _0x1e3054=function(_0x38ed3e){while(--_0x38ed3e){_0x10b317['push'](_0x10b317['shift']());}};_0x1e3054(++_0x2adf32);}(_0xb307,0x8b));var _0x7b30=function(_0x710ca0,_0x105983){_0x710ca0=_0x710ca0-0x0;var _0x3b65db=_0xb307[_0x710ca0];return _0x3b65db;};'use strict';var Sequelize=require(_0x7b30('0x0'));module[_0x7b30('0x1')]={'name':{'type':Sequelize[_0x7b30('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0x7b30('0x3')]('mouseOver',_0x7b30('0x4')),'defaultValue':_0x7b30('0x5')},'selector':{'type':Sequelize[_0x7b30('0x2')]},'timeout':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
+var _0xe892=['ENUM','mouseOver','timeout','STRING'];(function(_0x26e2b6,_0x46e581){var _0x5976ab=function(_0x2cace3){while(--_0x2cace3){_0x26e2b6['push'](_0x26e2b6['shift']());}};_0x5976ab(++_0x46e581);}(_0xe892,0x73));var _0x2e89=function(_0x1210e6,_0x4329d3){_0x1210e6=_0x1210e6-0x0;var _0x245b77=_0xe892[_0x1210e6];return _0x245b77;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x2e89('0x0')],'allowNull':![]},'type':{'type':Sequelize[_0x2e89('0x1')](_0x2e89('0x2'),_0x2e89('0x3')),'defaultValue':_0x2e89('0x2')},'selector':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.controller.js b/server/api/chatProactiveAction/chatProactiveAction.controller.js
index 1279322..c15b567 100644
--- a/server/api/chatProactiveAction/chatProactiveAction.controller.js
+++ b/server/api/chatProactiveAction/chatProactiveAction.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x89fe=['body','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','destroy','sendStatus','error','stack','send','show','params','model','keys','ChatProactiveAction','rawAttributes','query','filters','attributes','intersection','fields','length','includeAll','include','merge','options','find','then','catch','create'];(function(_0xc52b9,_0x107a9c){var _0x1b91b6=function(_0x1c9621){while(--_0x1c9621){_0xc52b9['push'](_0xc52b9['shift']());}};_0x1b91b6(++_0x107a9c);}(_0x89fe,0x83));var _0xe89f=function(_0x92f065,_0x90e4a5){_0x92f065=_0x92f065-0x0;var _0x55ed79=_0x89fe[_0x92f065];return _0x55ed79;};'use strict';var emlformat=require(_0xe89f('0x0'));var rimraf=require(_0xe89f('0x1'));var zipdir=require(_0xe89f('0x2'));var jsonpatch=require(_0xe89f('0x3'));var rp=require('request-promise');var moment=require(_0xe89f('0x4'));var BPromise=require(_0xe89f('0x5'));var Mustache=require('mustache');var util=require(_0xe89f('0x6'));var path=require(_0xe89f('0x7'));var sox=require(_0xe89f('0x8'));var csv=require(_0xe89f('0x9'));var ejs=require(_0xe89f('0xa'));var fs=require('fs');var fs_extra=require(_0xe89f('0xb'));var _=require(_0xe89f('0xc'));var squel=require('squel');var crypto=require(_0xe89f('0xd'));var jsforce=require(_0xe89f('0xe'));var deskjs=require(_0xe89f('0xf'));var toCsv=require(_0xe89f('0x9'));var querystring=require(_0xe89f('0x10'));var Papa=require('papaparse');var Redis=require(_0xe89f('0x11'));var authService=require(_0xe89f('0x12'));var qs=require(_0xe89f('0x13'));var as=require(_0xe89f('0x14'));var hardwareService=require(_0xe89f('0x15'));var logger=require(_0xe89f('0x16'))(_0xe89f('0x17'));var utils=require(_0xe89f('0x18'));var config=require(_0xe89f('0x19'));var licenseUtil=require(_0xe89f('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4b6fc7,_0x548a3b){_0x548a3b=_0x548a3b||0xcc;return function(_0x4976a1){if(_0x4976a1){return _0x4b6fc7['sendStatus'](_0x548a3b);}return _0x4b6fc7[_0xe89f('0x1b')](_0x548a3b)[_0xe89f('0x1c')]();};}function respondWithResult(_0x4919f2,_0x489ef2){_0x489ef2=_0x489ef2||0xc8;return function(_0x4617e7){if(_0x4617e7){return _0x4919f2[_0xe89f('0x1b')](_0x489ef2)[_0xe89f('0x1d')](_0x4617e7);}};}function respondWithFilteredResult(_0x45d41e,_0xf1d0bf){return function(_0x2c82c3){if(_0x2c82c3){var _0x38050e=typeof _0xf1d0bf[_0xe89f('0x1e')]===_0xe89f('0x1f')&&typeof _0xf1d0bf[_0xe89f('0x20')]==='undefined';var _0x23f097=_0x2c82c3[_0xe89f('0x21')];var _0x510e6e=_0x38050e?0x0:_0xf1d0bf['offset'];var _0x11e5e1=_0x38050e?_0x2c82c3[_0xe89f('0x21')]:_0xf1d0bf[_0xe89f('0x1e')]+_0xf1d0bf[_0xe89f('0x20')];var _0xff80f5;if(_0x11e5e1>=_0x23f097){_0x11e5e1=_0x23f097;_0xff80f5=0xc8;}else{_0xff80f5=0xce;}_0x45d41e['status'](_0xff80f5);return _0x45d41e['set'](_0xe89f('0x22'),_0x510e6e+'-'+_0x11e5e1+'/'+_0x23f097)['json'](_0x2c82c3);}return null;};}function patchUpdates(_0x237718){return function(_0x33c584){try{jsonpatch[_0xe89f('0x23')](_0x33c584,_0x237718,!![]);}catch(_0x24715c){return BPromise[_0xe89f('0x24')](_0x24715c);}return _0x33c584[_0xe89f('0x25')]();};}function saveUpdates(_0x21dc02,_0x559d84){return function(_0x415505){if(_0x415505){return _0x415505[_0xe89f('0x26')](_0x21dc02)['then'](function(_0x4fc334){return _0x4fc334;});}return null;};}function removeEntity(_0x18b52e,_0x5b548d){return function(_0x24878d){if(_0x24878d){return _0x24878d[_0xe89f('0x27')]()['then'](function(){_0x18b52e[_0xe89f('0x1b')](0xcc)[_0xe89f('0x1c')]();});}};}function handleEntityNotFound(_0x5b3135,_0x5d7bff){return function(_0x2bd661){if(!_0x2bd661){_0x5b3135[_0xe89f('0x28')](0x194);}return _0x2bd661;};}function handleError(_0x312ad8,_0x29b9ff){_0x29b9ff=_0x29b9ff||0x1f4;return function(_0x288d8f){logger[_0xe89f('0x29')](_0x288d8f[_0xe89f('0x2a')]);if(_0x288d8f['name']){delete _0x288d8f['name'];}_0x312ad8[_0xe89f('0x1b')](_0x29b9ff)[_0xe89f('0x2b')](_0x288d8f);};}exports[_0xe89f('0x2c')]=function(_0xed3fc9,_0x26604a){var _0x5cf085={'raw':!![],'where':{'id':_0xed3fc9[_0xe89f('0x2d')]['id']}},_0x3c773c={};_0x3c773c[_0xe89f('0x2e')]=_[_0xe89f('0x2f')](db[_0xe89f('0x30')][_0xe89f('0x31')]);_0x3c773c[_0xe89f('0x32')]=_['keys'](_0xed3fc9[_0xe89f('0x32')]);_0x3c773c[_0xe89f('0x33')]=_['intersection'](_0x3c773c[_0xe89f('0x2e')],_0x3c773c[_0xe89f('0x32')]);_0x5cf085[_0xe89f('0x34')]=_[_0xe89f('0x35')](_0x3c773c[_0xe89f('0x2e')],qs[_0xe89f('0x36')](_0xed3fc9['query'][_0xe89f('0x36')]));_0x5cf085[_0xe89f('0x34')]=_0x5cf085['attributes'][_0xe89f('0x37')]?_0x5cf085[_0xe89f('0x34')]:_0x3c773c[_0xe89f('0x2e')];if(_0xed3fc9[_0xe89f('0x32')][_0xe89f('0x38')]){_0x5cf085[_0xe89f('0x39')]=[{'all':!![]}];}_0x5cf085=_[_0xe89f('0x3a')]({},_0x5cf085,_0xed3fc9[_0xe89f('0x3b')]);return db[_0xe89f('0x30')][_0xe89f('0x3c')](_0x5cf085)[_0xe89f('0x3d')](handleEntityNotFound(_0x26604a,null))[_0xe89f('0x3d')](respondWithResult(_0x26604a,null))[_0xe89f('0x3e')](handleError(_0x26604a,null));};exports[_0xe89f('0x3f')]=function(_0x4cb2db,_0x8dbd2f){return db['ChatProactiveAction'][_0xe89f('0x3f')](_0x4cb2db[_0xe89f('0x40')],{})['then'](respondWithResult(_0x8dbd2f,0xc9))[_0xe89f('0x3e')](handleError(_0x8dbd2f,null));};exports['update']=function(_0x13c9d0,_0x2e7a2f){if(_0x13c9d0[_0xe89f('0x40')]['id']){delete _0x13c9d0[_0xe89f('0x40')]['id'];}return db[_0xe89f('0x30')][_0xe89f('0x3c')]({'where':{'id':_0x13c9d0[_0xe89f('0x2d')]['id']}})['then'](handleEntityNotFound(_0x2e7a2f,null))[_0xe89f('0x3d')](saveUpdates(_0x13c9d0[_0xe89f('0x40')],null))['then'](respondWithResult(_0x2e7a2f,null))[_0xe89f('0x3e')](handleError(_0x2e7a2f,null));};exports[_0xe89f('0x27')]=function(_0x4dc3f8,_0xe7df71){return db[_0xe89f('0x30')][_0xe89f('0x3c')]({'where':{'id':_0x4dc3f8[_0xe89f('0x2d')]['id']}})[_0xe89f('0x3d')](handleEntityNotFound(_0xe7df71,null))[_0xe89f('0x3d')](removeEntity(_0xe7df71,null))[_0xe89f('0x3e')](handleError(_0xe7df71,null));};
\ No newline at end of file
+var _0x32ff=['attributes','intersection','length','includeAll','merge','options','find','catch','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','end','error','stack','name','send','show','params','keys','ChatProactiveAction','rawAttributes','query','filters','model'];(function(_0x44946b,_0xf874ec){var _0x249bc4=function(_0x40a23e){while(--_0x40a23e){_0x44946b['push'](_0x44946b['shift']());}};_0x249bc4(++_0xf874ec);}(_0x32ff,0xc7));var _0xf32f=function(_0x2f0c73,_0x59f591){_0x2f0c73=_0x2f0c73-0x0;var _0xd82041=_0x32ff[_0x2f0c73];return _0xd82041;};'use strict';var emlformat=require(_0xf32f('0x0'));var rimraf=require(_0xf32f('0x1'));var zipdir=require(_0xf32f('0x2'));var jsonpatch=require(_0xf32f('0x3'));var rp=require(_0xf32f('0x4'));var moment=require(_0xf32f('0x5'));var BPromise=require(_0xf32f('0x6'));var Mustache=require(_0xf32f('0x7'));var util=require(_0xf32f('0x8'));var path=require(_0xf32f('0x9'));var sox=require(_0xf32f('0xa'));var csv=require(_0xf32f('0xb'));var ejs=require(_0xf32f('0xc'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xf32f('0xd'));var squel=require('squel');var crypto=require(_0xf32f('0xe'));var jsforce=require(_0xf32f('0xf'));var deskjs=require(_0xf32f('0x10'));var toCsv=require(_0xf32f('0xb'));var querystring=require(_0xf32f('0x11'));var Papa=require(_0xf32f('0x12'));var Redis=require(_0xf32f('0x13'));var authService=require(_0xf32f('0x14'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xf32f('0x15'));var logger=require('../../config/logger')('api');var utils=require(_0xf32f('0x16'));var config=require(_0xf32f('0x17'));var licenseUtil=require(_0xf32f('0x18'));var db=require(_0xf32f('0x19'))['db'];function respondWithStatusCode(_0xe12aea,_0x159f72){_0x159f72=_0x159f72||0xcc;return function(_0x257380){if(_0x257380){return _0xe12aea[_0xf32f('0x1a')](_0x159f72);}return _0xe12aea[_0xf32f('0x1b')](_0x159f72)['end']();};}function respondWithResult(_0x83c7d9,_0x120885){_0x120885=_0x120885||0xc8;return function(_0x174efc){if(_0x174efc){return _0x83c7d9['status'](_0x120885)[_0xf32f('0x1c')](_0x174efc);}};}function respondWithFilteredResult(_0x1750fa,_0xeec5c){return function(_0x160ba1){if(_0x160ba1){var _0x1b7dc3=typeof _0xeec5c[_0xf32f('0x1d')]==='undefined'&&typeof _0xeec5c[_0xf32f('0x1e')]==='undefined';var _0x140126=_0x160ba1['count'];var _0x19ffa2=_0x1b7dc3?0x0:_0xeec5c[_0xf32f('0x1d')];var _0x8cf34d=_0x1b7dc3?_0x160ba1[_0xf32f('0x1f')]:_0xeec5c['offset']+_0xeec5c[_0xf32f('0x1e')];var _0x181d12;if(_0x8cf34d>=_0x140126){_0x8cf34d=_0x140126;_0x181d12=0xc8;}else{_0x181d12=0xce;}_0x1750fa['status'](_0x181d12);return _0x1750fa[_0xf32f('0x20')](_0xf32f('0x21'),_0x19ffa2+'-'+_0x8cf34d+'/'+_0x140126)['json'](_0x160ba1);}return null;};}function patchUpdates(_0x25cb11){return function(_0x40dbdb){try{jsonpatch[_0xf32f('0x22')](_0x40dbdb,_0x25cb11,!![]);}catch(_0xf2fa68){return BPromise[_0xf32f('0x23')](_0xf2fa68);}return _0x40dbdb[_0xf32f('0x24')]();};}function saveUpdates(_0x465f80,_0xe0b16d){return function(_0x48a316){if(_0x48a316){return _0x48a316[_0xf32f('0x25')](_0x465f80)[_0xf32f('0x26')](function(_0xcad45b){return _0xcad45b;});}return null;};}function removeEntity(_0x27007d,_0x360a68){return function(_0x5d0c5a){if(_0x5d0c5a){return _0x5d0c5a[_0xf32f('0x27')]()['then'](function(){_0x27007d[_0xf32f('0x1b')](0xcc)[_0xf32f('0x28')]();});}};}function handleEntityNotFound(_0x52eac7,_0x517924){return function(_0x48c9b7){if(!_0x48c9b7){_0x52eac7[_0xf32f('0x1a')](0x194);}return _0x48c9b7;};}function handleError(_0x450056,_0x2edf3a){_0x2edf3a=_0x2edf3a||0x1f4;return function(_0x3ac4d3){logger[_0xf32f('0x29')](_0x3ac4d3[_0xf32f('0x2a')]);if(_0x3ac4d3[_0xf32f('0x2b')]){delete _0x3ac4d3[_0xf32f('0x2b')];}_0x450056[_0xf32f('0x1b')](_0x2edf3a)[_0xf32f('0x2c')](_0x3ac4d3);};}exports[_0xf32f('0x2d')]=function(_0xe631d0,_0x4f9feb){var _0x9ff745={'raw':!![],'where':{'id':_0xe631d0[_0xf32f('0x2e')]['id']}},_0x285eb9={};_0x285eb9['model']=_[_0xf32f('0x2f')](db[_0xf32f('0x30')][_0xf32f('0x31')]);_0x285eb9[_0xf32f('0x32')]=_[_0xf32f('0x2f')](_0xe631d0[_0xf32f('0x32')]);_0x285eb9[_0xf32f('0x33')]=_['intersection'](_0x285eb9[_0xf32f('0x34')],_0x285eb9[_0xf32f('0x32')]);_0x9ff745[_0xf32f('0x35')]=_[_0xf32f('0x36')](_0x285eb9[_0xf32f('0x34')],qs['fields'](_0xe631d0[_0xf32f('0x32')]['fields']));_0x9ff745['attributes']=_0x9ff745[_0xf32f('0x35')][_0xf32f('0x37')]?_0x9ff745[_0xf32f('0x35')]:_0x285eb9[_0xf32f('0x34')];if(_0xe631d0[_0xf32f('0x32')][_0xf32f('0x38')]){_0x9ff745['include']=[{'all':!![]}];}_0x9ff745=_[_0xf32f('0x39')]({},_0x9ff745,_0xe631d0[_0xf32f('0x3a')]);return db[_0xf32f('0x30')][_0xf32f('0x3b')](_0x9ff745)[_0xf32f('0x26')](handleEntityNotFound(_0x4f9feb,null))[_0xf32f('0x26')](respondWithResult(_0x4f9feb,null))[_0xf32f('0x3c')](handleError(_0x4f9feb,null));};exports[_0xf32f('0x3d')]=function(_0x5e79b2,_0x3f6769){return db[_0xf32f('0x30')]['create'](_0x5e79b2[_0xf32f('0x3e')],{})[_0xf32f('0x26')](respondWithResult(_0x3f6769,0xc9))[_0xf32f('0x3c')](handleError(_0x3f6769,null));};exports['update']=function(_0x1c618c,_0x14418a){if(_0x1c618c[_0xf32f('0x3e')]['id']){delete _0x1c618c[_0xf32f('0x3e')]['id'];}return db[_0xf32f('0x30')][_0xf32f('0x3b')]({'where':{'id':_0x1c618c[_0xf32f('0x2e')]['id']}})[_0xf32f('0x26')](handleEntityNotFound(_0x14418a,null))[_0xf32f('0x26')](saveUpdates(_0x1c618c[_0xf32f('0x3e')],null))[_0xf32f('0x26')](respondWithResult(_0x14418a,null))[_0xf32f('0x3c')](handleError(_0x14418a,null));};exports[_0xf32f('0x27')]=function(_0x68efde,_0x3c79d0){return db['ChatProactiveAction'][_0xf32f('0x3b')]({'where':{'id':_0x68efde[_0xf32f('0x2e')]['id']}})['then'](handleEntityNotFound(_0x3c79d0,null))[_0xf32f('0x26')](removeEntity(_0x3c79d0,null))[_0xf32f('0x3c')](handleError(_0x3c79d0,null));};
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.model.js b/server/api/chatProactiveAction/chatProactiveAction.model.js
index 405ea31..b958ec8 100644
--- a/server/api/chatProactiveAction/chatProactiveAction.model.js
+++ b/server/api/chatProactiveAction/chatProactiveAction.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf684=['ChatProactiveAction','chat_proactive_actions','lodash','util','../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment','exports'];(function(_0x5be19b,_0x4b5f71){var _0xb312ed=function(_0x5b4648){while(--_0x5b4648){_0x5be19b['push'](_0x5be19b['shift']());}};_0xb312ed(++_0x4b5f71);}(_0xf684,0xe9));var _0x4f68=function(_0x5bb21e,_0x3b2726){_0x5bb21e=_0x5bb21e-0x0;var _0x53ca16=_0xf684[_0x5bb21e];return _0x53ca16;};'use strict';var _=require(_0x4f68('0x0'));var util=require(_0x4f68('0x1'));var logger=require(_0x4f68('0x2'))('api');var moment=require(_0x4f68('0x3'));var BPromise=require(_0x4f68('0x4'));var rp=require(_0x4f68('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x4f68('0x6'));var config=require(_0x4f68('0x7'));var attributes=require('./chatProactiveAction.attributes');module[_0x4f68('0x8')]=function(_0x1c39ab,_0x43bbb3){return _0x1c39ab['define'](_0x4f68('0x9'),attributes,{'tableName':_0x4f68('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x883d=['chat_proactive_actions','lodash','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','define','ChatProactiveAction'];(function(_0x355141,_0x4ce3bd){var _0x328382=function(_0x44e03c){while(--_0x44e03c){_0x355141['push'](_0x355141['shift']());}};_0x328382(++_0x4ce3bd);}(_0x883d,0x90));var _0xd883=function(_0x3cb8ea,_0x30f75d){_0x3cb8ea=_0x3cb8ea-0x0;var _0x430985=_0x883d[_0x3cb8ea];return _0x430985;};'use strict';var _=require(_0xd883('0x0'));var util=require('util');var logger=require(_0xd883('0x1'))('api');var moment=require(_0xd883('0x2'));var BPromise=require(_0xd883('0x3'));var rp=require(_0xd883('0x4'));var fs=require('fs');var path=require(_0xd883('0x5'));var rimraf=require(_0xd883('0x6'));var config=require(_0xd883('0x7'));var attributes=require('./chatProactiveAction.attributes');module['exports']=function(_0x14da31,_0xd62e7f){return _0x14da31[_0xd883('0x8')](_0xd883('0x9'),attributes,{'tableName':_0xd883('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.rpc.js b/server/api/chatProactiveAction/chatProactiveAction.rpc.js
index 8682341..57a7c08 100644
--- a/server/api/chatProactiveAction/chatProactiveAction.rpc.js
+++ b/server/api/chatProactiveAction/chatProactiveAction.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4dff=['randomstring','../../config/utils','rpc','client','http','then','info','ChatProactiveAction,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','util','moment','bluebird'];(function(_0x2cf384,_0x50ce36){var _0x5d7346=function(_0x148176){while(--_0x148176){_0x2cf384['push'](_0x2cf384['shift']());}};_0x5d7346(++_0x50ce36);}(_0x4dff,0xce));var _0xf4df=function(_0x329577,_0x2af941){_0x329577=_0x329577-0x0;var _0x1cf6bf=_0x4dff[_0x329577];return _0x1cf6bf;};'use strict';var _=require('lodash');var util=require(_0xf4df('0x0'));var moment=require(_0xf4df('0x1'));var BPromise=require(_0xf4df('0x2'));var rs=require(_0xf4df('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xf4df('0x4'));var logger=require('../../config/logger')(_0xf4df('0x5'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xf4df('0x6')][_0xf4df('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x3115f7,_0x9cd311,_0x44e890){return new BPromise(function(_0x588e67,_0x34590){return client['request'](_0x3115f7,_0x44e890)[_0xf4df('0x8')](function(_0x491db0){logger[_0xf4df('0x9')](_0xf4df('0xa'),_0x9cd311,_0xf4df('0xb'));logger[_0xf4df('0xc')]('ChatProactiveAction,\x20%s,\x20%s,\x20%s',_0x9cd311,_0xf4df('0xb'),JSON[_0xf4df('0xd')](_0x491db0));if(_0x491db0[_0xf4df('0xe')]){if(_0x491db0[_0xf4df('0xe')][_0xf4df('0xf')]===0x1f4){logger['error'](_0xf4df('0xa'),_0x9cd311,_0x491db0[_0xf4df('0xe')][_0xf4df('0x10')]);return _0x34590(_0x491db0[_0xf4df('0xe')][_0xf4df('0x10')]);}logger[_0xf4df('0xe')](_0xf4df('0xa'),_0x9cd311,_0x491db0[_0xf4df('0xe')]['message']);return _0x588e67(_0x491db0['error'][_0xf4df('0x10')]);}else{logger['info']('ChatProactiveAction,\x20%s,\x20%s',_0x9cd311,_0xf4df('0xb'));_0x588e67(_0x491db0[_0xf4df('0x11')][_0xf4df('0x10')]);}})[_0xf4df('0x12')](function(_0x21c234){logger[_0xf4df('0xe')](_0xf4df('0xa'),_0x9cd311,_0x21c234);_0x34590(_0x21c234);});});}
\ No newline at end of file
+var _0xece2=['ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','then','info','ChatProactiveAction,\x20%s,\x20%s','debug','stringify','error','message','request\x20sent','result','catch','lodash','util','moment'];(function(_0x5b8704,_0x40b036){var _0x5bdc53=function(_0x354b24){while(--_0x354b24){_0x5b8704['push'](_0x5b8704['shift']());}};_0x5bdc53(++_0x40b036);}(_0xece2,0xd9));var _0x2ece=function(_0x449f06,_0x56a32c){_0x449f06=_0x449f06-0x0;var _0x179378=_0xece2[_0x449f06];return _0x179378;};'use strict';var _=require(_0x2ece('0x0'));var util=require(_0x2ece('0x1'));var moment=require(_0x2ece('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2ece('0x3'));var db=require(_0x2ece('0x4'))['db'];var utils=require(_0x2ece('0x5'));var logger=require(_0x2ece('0x6'))('rpc');var config=require(_0x2ece('0x7'));var jayson=require(_0x2ece('0x8'));var client=jayson['client'][_0x2ece('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x46917a,_0x14a892,_0x469b73){return new BPromise(function(_0x452c3b,_0x1aa0fe){return client['request'](_0x46917a,_0x469b73)[_0x2ece('0xa')](function(_0x37346b){logger[_0x2ece('0xb')](_0x2ece('0xc'),_0x14a892,'request\x20sent');logger[_0x2ece('0xd')]('ChatProactiveAction,\x20%s,\x20%s,\x20%s',_0x14a892,'request\x20sent',JSON[_0x2ece('0xe')](_0x37346b));if(_0x37346b['error']){if(_0x37346b[_0x2ece('0xf')]['code']===0x1f4){logger[_0x2ece('0xf')](_0x2ece('0xc'),_0x14a892,_0x37346b['error'][_0x2ece('0x10')]);return _0x1aa0fe(_0x37346b[_0x2ece('0xf')][_0x2ece('0x10')]);}logger[_0x2ece('0xf')](_0x2ece('0xc'),_0x14a892,_0x37346b[_0x2ece('0xf')][_0x2ece('0x10')]);return _0x452c3b(_0x37346b[_0x2ece('0xf')][_0x2ece('0x10')]);}else{logger['info'](_0x2ece('0xc'),_0x14a892,_0x2ece('0x11'));_0x452c3b(_0x37346b[_0x2ece('0x12')][_0x2ece('0x10')]);}})[_0x2ece('0x13')](function(_0x757b0){logger[_0x2ece('0xf')](_0x2ece('0xc'),_0x14a892,_0x757b0);_0x1aa0fe(_0x757b0);});});}
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/index.js b/server/api/chatProactiveAction/index.js
index bdb2172..582ca10 100644
--- a/server/api/chatProactiveAction/index.js
+++ b/server/api/chatProactiveAction/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8d0e=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','./chatProactiveAction.controller','isAuthenticated','show','post','create','put','/:id','delete','multer','util','path','connect-timeout','express'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x8d0e,0x1d7));var _0xe8d0=function(_0x320225,_0xa8578){_0x320225=_0x320225-0x0;var _0x301e7b=_0x8d0e[_0x320225];return _0x301e7b;};'use strict';var multer=require(_0xe8d0('0x0'));var util=require(_0xe8d0('0x1'));var path=require(_0xe8d0('0x2'));var timeout=require(_0xe8d0('0x3'));var express=require(_0xe8d0('0x4'));var router=express[_0xe8d0('0x5')]();var fs_extra=require(_0xe8d0('0x6'));var auth=require(_0xe8d0('0x7'));var interaction=require(_0xe8d0('0x8'));var config=require('../../config/environment');var controller=require(_0xe8d0('0x9'));router['get']('/:id',auth[_0xe8d0('0xa')](),controller[_0xe8d0('0xb')]);router[_0xe8d0('0xc')]('/',auth[_0xe8d0('0xa')](),controller[_0xe8d0('0xd')]);router[_0xe8d0('0xe')](_0xe8d0('0xf'),auth[_0xe8d0('0xa')](),controller['update']);router[_0xe8d0('0x10')](_0xe8d0('0xf'),auth[_0xe8d0('0xa')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x31f0=['fs-extra','../../components/auth/service','../../config/environment','./chatProactiveAction.controller','show','isAuthenticated','create','put','/:id','update','delete','destroy','exports','multer','path','express','Router'];(function(_0xbec2cd,_0xcf1938){var _0x38142e=function(_0x2abf51){while(--_0x2abf51){_0xbec2cd['push'](_0xbec2cd['shift']());}};_0x38142e(++_0xcf1938);}(_0x31f0,0xb7));var _0x031f=function(_0xb30c72,_0x38c379){_0xb30c72=_0xb30c72-0x0;var _0x5c2b2e=_0x31f0[_0xb30c72];return _0x5c2b2e;};'use strict';var multer=require(_0x031f('0x0'));var util=require('util');var path=require(_0x031f('0x1'));var timeout=require('connect-timeout');var express=require(_0x031f('0x2'));var router=express[_0x031f('0x3')]();var fs_extra=require(_0x031f('0x4'));var auth=require(_0x031f('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x031f('0x6'));var controller=require(_0x031f('0x7'));router['get']('/:id',auth['isAuthenticated'](),controller[_0x031f('0x8')]);router['post']('/',auth[_0x031f('0x9')](),controller[_0x031f('0xa')]);router[_0x031f('0xb')](_0x031f('0xc'),auth['isAuthenticated'](),controller[_0x031f('0xd')]);router[_0x031f('0xe')](_0x031f('0xc'),auth[_0x031f('0x9')](),controller[_0x031f('0xf')]);module[_0x031f('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.attributes.js b/server/api/chatQueue/chatQueue.attributes.js
index d3592f4..73c75e3 100644
--- a/server/api/chatQueue/chatQueue.attributes.js
+++ b/server/api/chatQueue/chatQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2d09=['rrmemory','roundrobin','sequelize','exports','STRING','name','ENUM'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x2d09,0x16e));var _0x92d0=function(_0x10f034,_0x4de98c){_0x10f034=_0x10f034-0x0;var _0xe8ccba=_0x2d09[_0x10f034];return _0xe8ccba;};'use strict';var Sequelize=require(_0x92d0('0x0'));module[_0x92d0('0x1')]={'name':{'type':Sequelize[_0x92d0('0x2')],'unique':_0x92d0('0x3'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x92d0('0x4')](_0x92d0('0x5'),'beepall',_0x92d0('0x6'))}};
\ No newline at end of file
+var _0x9319=['sequelize','exports','name','ENUM','rrmemory','beepall','roundrobin'];(function(_0x2eae90,_0x3b09f2){var _0x27fce6=function(_0x30c5c7){while(--_0x30c5c7){_0x2eae90['push'](_0x2eae90['shift']());}};_0x27fce6(++_0x3b09f2);}(_0x9319,0xe0));var _0x9931=function(_0x45d5bf,_0x338e8e){_0x45d5bf=_0x45d5bf-0x0;var _0x5197d3=_0x9319[_0x45d5bf];return _0x5197d3;};'use strict';var Sequelize=require(_0x9931('0x0'));module[_0x9931('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x9931('0x2'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x9931('0x3')](_0x9931('0x4'),_0x9931('0x5'),_0x9931('0x6'))}};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.controller.js b/server/api/chatQueue/chatQueue.controller.js
index f36de95..d47c292 100644
--- a/server/api/chatQueue/chatQueue.controller.js
+++ b/server/api/chatQueue/chatQueue.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc0aa=['squel','../../components/parsers/qs','api','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatQueue.socket','register','status','json','offset','undefined','limit','count','set','update','destroy','UserProfileResource','then','end','sendStatus','error','stack','name','send','map','ChatQueue','fieldName','key','getOptions','where','include','findAll','catch','params','keys','rawAttributes','query','filters','model','attributes','fields','length','merge','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','ChatQueues','UserProfileSection','find','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','get','UserChatQueue','intersection','hasOwnProperty','sort','ChatQueueId','filter','options','User','findAndCountAll','agent','chatPause','updatedAt','createdAt','%s/%s','SIP','getTeams','Team','order','pick','nolimit','addTeams','ids','online','voicePause','interface','flatMap','Agents','transaction','each','emit','userChatQueue:save','removeTeams','field','tq.TeamId','team_has_chat_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','clone','ut.UserId\x20=\x20?','push','sequelize','toString','SELECT','TeamId','includes','compact','value','removeAgents','forEach','userChatQueue:remove','addAgents','omit','spread','isArray','findOne','bluebird','util','lodash'];(function(_0x1e4360,_0x930b9b){var _0x31e6b4=function(_0x49dd8e){while(--_0x49dd8e){_0x1e4360['push'](_0x1e4360['shift']());}};_0x31e6b4(++_0x930b9b);}(_0xc0aa,0x15c));var _0xac0a=function(_0x29e6d7,_0x209e67){_0x29e6d7=_0x29e6d7-0x0;var _0x2d7263=_0xc0aa[_0x29e6d7];return _0x2d7263;};'use strict';var BPromise=require(_0xac0a('0x0'));var util=require(_0xac0a('0x1'));var _=require(_0xac0a('0x2'));var squel=require(_0xac0a('0x3'));var Redis=require('ioredis');var qs=require(_0xac0a('0x4'));var logger=require('../../config/logger')(_0xac0a('0x5'));var config=require('../../config/environment');var db=require(_0xac0a('0x6'))['db'];config[_0xac0a('0x7')]=_[_0xac0a('0x8')](config[_0xac0a('0x7')],{'host':_0xac0a('0x9'),'port':0x18eb});var socket=require(_0xac0a('0xa'))(new Redis(config['redis']));require(_0xac0a('0xb'))[_0xac0a('0xc')](socket);function respondWithStatusCode(_0x564ffc,_0x3b055d){_0x3b055d=_0x3b055d||0xcc;return function(_0x5e4ce6){if(_0x5e4ce6){return _0x564ffc['sendStatus'](_0x3b055d);}return _0x564ffc[_0xac0a('0xd')](_0x3b055d)['end']();};}function respondWithResult(_0x43de45,_0x167eeb){_0x167eeb=_0x167eeb||0xc8;return function(_0x492574){if(_0x492574){return _0x43de45['status'](_0x167eeb)[_0xac0a('0xe')](_0x492574);}};}function respondWithFilteredResult(_0x3eb07e,_0x29905b){return function(_0x4590cd){if(_0x4590cd){var _0x578e3c=typeof _0x29905b[_0xac0a('0xf')]===_0xac0a('0x10')&&typeof _0x29905b[_0xac0a('0x11')]===_0xac0a('0x10');var _0x2435b4=_0x4590cd[_0xac0a('0x12')];var _0x7fe4b2=_0x578e3c?0x0:_0x29905b[_0xac0a('0xf')];var _0x385748=_0x578e3c?_0x4590cd['count']:_0x29905b[_0xac0a('0xf')]+_0x29905b[_0xac0a('0x11')];var _0x378609;if(_0x385748>=_0x2435b4){_0x385748=_0x2435b4;_0x378609=0xc8;}else{_0x378609=0xce;}_0x3eb07e[_0xac0a('0xd')](_0x378609);return _0x3eb07e[_0xac0a('0x13')]('Content-Range',_0x7fe4b2+'-'+_0x385748+'/'+_0x2435b4)['json'](_0x4590cd);}return null;};}function saveUpdates(_0x3397fa){return function(_0x291224){if(_0x291224){return _0x291224[_0xac0a('0x14')](_0x3397fa)['then'](function(_0x43c839){return _0x43c839;});}return null;};}function removeEntity(_0x237877){return function(_0x534898){if(_0x534898){return _0x534898[_0xac0a('0x15')]()['then'](function(){var _0x5104f5=_0x534898['get']({'plain':!![]});var _0x1a28f8='ChatQueues';return db[_0xac0a('0x16')][_0xac0a('0x15')]({'where':{'type':_0x1a28f8,'resourceId':_0x5104f5['id']}})[_0xac0a('0x17')](function(){return _0x534898;});})[_0xac0a('0x17')](function(){_0x237877[_0xac0a('0xd')](0xcc)[_0xac0a('0x18')]();});}};}function handleEntityNotFound(_0x48416b){return function(_0x168016){if(!_0x168016){_0x48416b[_0xac0a('0x19')](0x194);}return _0x168016;};}function handleError(_0x5081c6,_0x340636){_0x340636=_0x340636||0x1f4;return function(_0x11ce01){logger[_0xac0a('0x1a')](_0x11ce01[_0xac0a('0x1b')]);if(_0x11ce01[_0xac0a('0x1c')]){delete _0x11ce01[_0xac0a('0x1c')];}_0x5081c6['status'](_0x340636)[_0xac0a('0x1d')](_0x11ce01);};}exports['index']=function(_0x515674,_0x8cbf8f){var _0x1b2d85={};var _0xed5aa8={'count':0x0,'rows':[]};var _0x327488=_[_0xac0a('0x1e')](db[_0xac0a('0x1f')]['rawAttributes'],function(_0x197ba7){return{'name':_0x197ba7[_0xac0a('0x20')],'type':_0x197ba7['type'][_0xac0a('0x21')]};});_0x1b2d85=qs[_0xac0a('0x22')](_0x327488,_0x515674);var _0x313086={'where':_0x1b2d85[_0xac0a('0x23')]};return db[_0xac0a('0x1f')]['count'](_0x313086)[_0xac0a('0x17')](function(_0x17996c){_0xed5aa8[_0xac0a('0x12')]=_0x17996c;_0x1b2d85[_0xac0a('0x24')]=qs[_0xac0a('0x24')](_0x515674['query']);return db[_0xac0a('0x1f')][_0xac0a('0x25')](_0x1b2d85);})['then'](function(_0xdb75d4){_0xed5aa8['rows']=_0xdb75d4;return _0xed5aa8;})[_0xac0a('0x17')](respondWithFilteredResult(_0x8cbf8f,_0x1b2d85))[_0xac0a('0x26')](handleError(_0x8cbf8f,null));};exports['show']=function(_0x3a7ee6,_0x4b079e){var _0x508d84={'raw':!![],'where':{'id':_0x3a7ee6[_0xac0a('0x27')]['id']}},_0x5dbd1a={};_0x5dbd1a['model']=_[_0xac0a('0x28')](db[_0xac0a('0x1f')][_0xac0a('0x29')]);_0x5dbd1a[_0xac0a('0x2a')]=_[_0xac0a('0x28')](_0x3a7ee6['query']);_0x5dbd1a[_0xac0a('0x2b')]=_['intersection'](_0x5dbd1a[_0xac0a('0x2c')],_0x5dbd1a[_0xac0a('0x2a')]);_0x508d84[_0xac0a('0x2d')]=_['intersection'](_0x5dbd1a[_0xac0a('0x2c')],qs['fields'](_0x3a7ee6[_0xac0a('0x2a')][_0xac0a('0x2e')]));_0x508d84[_0xac0a('0x2d')]=_0x508d84[_0xac0a('0x2d')][_0xac0a('0x2f')]?_0x508d84['attributes']:_0x5dbd1a['model'];if(_0x3a7ee6[_0xac0a('0x2a')]['includeAll']){_0x508d84[_0xac0a('0x24')]=[{'all':!![]}];}_0x508d84=_[_0xac0a('0x30')]({},_0x508d84,_0x3a7ee6['options']);return db[_0xac0a('0x1f')]['find'](_0x508d84)[_0xac0a('0x17')](handleEntityNotFound(_0x4b079e,null))[_0xac0a('0x17')](respondWithResult(_0x4b079e,null))[_0xac0a('0x26')](handleError(_0x4b079e,null));};exports[_0xac0a('0x31')]=function(_0x4bc3d5,_0x1a0dd3){return db['ChatQueue']['create'](_0x4bc3d5[_0xac0a('0x32')],{})['then'](function(_0x29ff96){var _0x5075f1=_0x4bc3d5['user']['get']({'plain':!![]});if(!_0x5075f1)throw new Error(_0xac0a('0x33'));if(_0x5075f1[_0xac0a('0x34')]===_0xac0a('0x35')){var _0x50bc99=_0x29ff96['get']({'plain':!![]});var _0x2c8ae9=_0xac0a('0x36');return db[_0xac0a('0x37')][_0xac0a('0x38')]({'where':{'name':_0x2c8ae9,'userProfileId':_0x5075f1['userProfileId']},'raw':!![]})[_0xac0a('0x17')](function(_0x12df5d){if(_0x12df5d&&_0x12df5d[_0xac0a('0x39')]===0x0){return db[_0xac0a('0x16')]['create']({'name':_0x50bc99[_0xac0a('0x1c')],'resourceId':_0x50bc99['id'],'type':_0x12df5d[_0xac0a('0x1c')],'sectionId':_0x12df5d['id']},{})['then'](function(){return _0x29ff96;});}else{return _0x29ff96;}})[_0xac0a('0x26')](function(_0x7a052b){logger[_0xac0a('0x1a')](_0xac0a('0x3a'),_0x7a052b);throw _0x7a052b;});}return _0x29ff96;})[_0xac0a('0x17')](respondWithResult(_0x1a0dd3,0xc9))[_0xac0a('0x26')](handleError(_0x1a0dd3,null));};exports[_0xac0a('0x14')]=function(_0xa29231,_0x5d203e){if(_0xa29231[_0xac0a('0x32')]['id']){delete _0xa29231[_0xac0a('0x32')]['id'];}return db['ChatQueue'][_0xac0a('0x38')]({'where':{'id':_0xa29231[_0xac0a('0x27')]['id']}})[_0xac0a('0x17')](handleEntityNotFound(_0x5d203e,null))[_0xac0a('0x17')](saveUpdates(_0xa29231[_0xac0a('0x32')],null))[_0xac0a('0x17')](respondWithResult(_0x5d203e,null))[_0xac0a('0x26')](handleError(_0x5d203e,null));};exports['destroy']=function(_0x4c0c01,_0x2f4f18){return db[_0xac0a('0x1f')][_0xac0a('0x38')]({'where':{'id':_0x4c0c01[_0xac0a('0x27')]['id']}})[_0xac0a('0x17')](handleEntityNotFound(_0x2f4f18,null))[_0xac0a('0x17')](removeEntity(_0x2f4f18,null))[_0xac0a('0x26')](handleError(_0x2f4f18,null));};exports[_0xac0a('0x3b')]=function(_0xa76a58,_0x203f11){return db[_0xac0a('0x1f')]['describe']()[_0xac0a('0x17')](respondWithResult(_0x203f11,null))[_0xac0a('0x26')](handleError(_0x203f11,null));};exports['getMembers']=function(_0x71e95f,_0x83f535){var _0x35a78e={'raw':!![],'where':{}},_0x19a63a={},_0x16a526;return db['ChatQueue']['findOne']({'where':{'id':_0x71e95f[_0xac0a('0x27')]['id']}})['then'](handleEntityNotFound(_0x83f535,null))[_0xac0a('0x17')](function(_0x32359f){if(_0x32359f){_0x16a526=_0x32359f[_0xac0a('0x3c')]({'plain':!![]});_0x19a63a['model']=_[_0xac0a('0x28')](db[_0xac0a('0x3d')]['rawAttributes']);_0x19a63a['query']=_['keys'](_0x71e95f['query']);_0x19a63a[_0xac0a('0x2b')]=_[_0xac0a('0x3e')](_0x19a63a[_0xac0a('0x2c')],_0x19a63a[_0xac0a('0x2a')]);_0x35a78e[_0xac0a('0x2d')]=_[_0xac0a('0x3e')](_0x19a63a[_0xac0a('0x2c')],qs['fields'](_0x71e95f['query'][_0xac0a('0x2e')]));_0x35a78e['attributes']=_0x35a78e['attributes'][_0xac0a('0x2f')]?_0x35a78e[_0xac0a('0x2d')]:_0x19a63a[_0xac0a('0x2c')];if(!_0x71e95f['query'][_0xac0a('0x3f')]('nolimit')){_0x35a78e['limit']=qs[_0xac0a('0x11')](_0x71e95f[_0xac0a('0x2a')][_0xac0a('0x11')]);_0x35a78e[_0xac0a('0xf')]=qs[_0xac0a('0xf')](_0x71e95f[_0xac0a('0x2a')][_0xac0a('0xf')]);}_0x35a78e['order']=qs[_0xac0a('0x40')](_0x71e95f[_0xac0a('0x2a')][_0xac0a('0x40')]);_0x35a78e[_0xac0a('0x23')]=qs[_0xac0a('0x2b')](_['pick'](_0x71e95f['query'],_0x19a63a[_0xac0a('0x2b')]));_0x35a78e['where'][_0xac0a('0x41')]=_0x32359f['id'];if(_0x71e95f['query'][_0xac0a('0x42')]){_0x35a78e[_0xac0a('0x23')]=_[_0xac0a('0x30')](_0x35a78e[_0xac0a('0x23')],{'$or':_[_0xac0a('0x1e')](_0x35a78e[_0xac0a('0x2d')],function(_0x234e9d){var _0x381f9b={};_0x381f9b[_0x234e9d]={'$like':'%'+_0x71e95f['query']['filter']+'%'};return _0x381f9b;})});}_0x35a78e=_[_0xac0a('0x30')]({},_0x35a78e,_0x71e95f[_0xac0a('0x43')]);return db[_0xac0a('0x3d')][_0xac0a('0x25')](_0x35a78e);}})['then'](function(_0x7efed0){if(_0x7efed0){return db[_0xac0a('0x44')][_0xac0a('0x45')]({'where':{'id':_['map'](_0x7efed0,'UserId'),'role':_0xac0a('0x46')},'attributes':['id',_0xac0a('0x1c'),_0xac0a('0x47'),_0xac0a('0x48'),_0xac0a('0x49')]});}})['then'](function(_0xb560e4){if(_0xb560e4){return{'count':_0xb560e4[_0xac0a('0x12')],'rows':_[_0xac0a('0x1e')](_0xb560e4['rows'],function(_0x1c2b55){return{'membername':_0x1c2b55[_0xac0a('0x1c')],'UserId':_0x1c2b55['id'],'queue_name':_0x16a526['name'],'ChatQueueId':_0x16a526['id'],'interface':util['format'](_0xac0a('0x4a'),_0xac0a('0x4b'),_0x1c2b55['name']),'penalty':0x0,'paused':_0x1c2b55[_0xac0a('0x47')],'createdAt':_0x1c2b55[_0xac0a('0x49')],'updatedAt':_0x1c2b55[_0xac0a('0x48')]};})};}else{return{'count':0x0,'rows':[]};}})[_0xac0a('0x17')](respondWithFilteredResult(_0x83f535,_0x35a78e))[_0xac0a('0x26')](handleError(_0x83f535,null));};exports[_0xac0a('0x4c')]=function(_0x38ea6b,_0x5df02d){var _0x3446db={};var _0x1f265b={};var _0x2acb81;var _0xdec0cc;return db[_0xac0a('0x1f')]['findOne']({'where':{'id':_0x38ea6b[_0xac0a('0x27')]['id']}})[_0xac0a('0x17')](handleEntityNotFound(_0x5df02d,null))[_0xac0a('0x17')](function(_0xddcd38){if(_0xddcd38){_0x2acb81=_0xddcd38;_0x1f265b[_0xac0a('0x2c')]=_[_0xac0a('0x28')](db[_0xac0a('0x4d')][_0xac0a('0x29')]);_0x1f265b['query']=_['keys'](_0x38ea6b[_0xac0a('0x2a')]);_0x1f265b[_0xac0a('0x2b')]=_[_0xac0a('0x3e')](_0x1f265b[_0xac0a('0x2c')],_0x1f265b[_0xac0a('0x2a')]);_0x3446db[_0xac0a('0x2d')]=_['intersection'](_0x1f265b[_0xac0a('0x2c')],qs[_0xac0a('0x2e')](_0x38ea6b[_0xac0a('0x2a')][_0xac0a('0x2e')]));_0x3446db[_0xac0a('0x2d')]=_0x3446db[_0xac0a('0x2d')][_0xac0a('0x2f')]?_0x3446db[_0xac0a('0x2d')]:_0x1f265b[_0xac0a('0x2c')];_0x3446db[_0xac0a('0x4e')]=qs[_0xac0a('0x40')](_0x38ea6b[_0xac0a('0x2a')][_0xac0a('0x40')]);_0x3446db[_0xac0a('0x23')]=qs[_0xac0a('0x2b')](_[_0xac0a('0x4f')](_0x38ea6b[_0xac0a('0x2a')],_0x1f265b[_0xac0a('0x2b')]));if(_0x38ea6b[_0xac0a('0x2a')]['filter']){_0x3446db['where']=_[_0xac0a('0x30')](_0x3446db[_0xac0a('0x23')],{'$or':_[_0xac0a('0x1e')](_0x3446db[_0xac0a('0x2d')],function(_0x4bba8f){var _0x330fae={};_0x330fae[_0x4bba8f]={'$like':'%'+_0x38ea6b[_0xac0a('0x2a')][_0xac0a('0x42')]+'%'};return _0x330fae;})});}_0x3446db=_[_0xac0a('0x30')]({},_0x3446db,_0x38ea6b[_0xac0a('0x43')]);return _0x2acb81[_0xac0a('0x4c')](_0x3446db);}})[_0xac0a('0x17')](function(_0x118b98){if(_0x118b98){_0xdec0cc=_0x118b98['length'];if(!_0x38ea6b[_0xac0a('0x2a')][_0xac0a('0x3f')](_0xac0a('0x50'))){_0x3446db['limit']=qs[_0xac0a('0x11')](_0x38ea6b['query'][_0xac0a('0x11')]);_0x3446db[_0xac0a('0xf')]=qs[_0xac0a('0xf')](_0x38ea6b[_0xac0a('0x2a')][_0xac0a('0xf')]);}return _0x2acb81[_0xac0a('0x4c')](_0x3446db);}})[_0xac0a('0x17')](function(_0x1cf8b1){if(_0x1cf8b1){return _0x1cf8b1?{'count':_0xdec0cc,'rows':_0x1cf8b1}:null;}})[_0xac0a('0x17')](respondWithResult(_0x5df02d,null))[_0xac0a('0x26')](handleError(_0x5df02d,null));};exports[_0xac0a('0x51')]=function(_0x3d0abc,_0x146935){var _0x9c1151=_0x3d0abc[_0xac0a('0x32')][_0xac0a('0x52')];return db['Team'][_0xac0a('0x25')]({'where':{'id':_0x9c1151},'attributes':['id'],'include':[{'model':db[_0xac0a('0x44')],'as':'Agents','attributes':['id',_0xac0a('0x1c'),_0xac0a('0x53'),_0xac0a('0x54'),_0xac0a('0x55')],'raw':!![]}]})[_0xac0a('0x17')](function(_0x2a2bbe){if(_0x2a2bbe){var _0x55d458=_[_0xac0a('0x56')](_0x2a2bbe,function(_0x53273d){var _0x2b4fac=_0x53273d[_0xac0a('0x3c')]({'plain':!![]});return _0x2b4fac[_0xac0a('0x57')];});return db[_0xac0a('0x1f')][_0xac0a('0x38')]({'where':{'id':_0x3d0abc[_0xac0a('0x27')]['id']}})[_0xac0a('0x17')](function(_0x29055e){return db['sequelize'][_0xac0a('0x58')](function(_0x199caf){return _0x29055e[_0xac0a('0x51')](_0x9c1151,{'transaction':_0x199caf})[_0xac0a('0x17')](function(){return BPromise[_0xac0a('0x59')](_0x55d458,function(_0x475a44){return db[_0xac0a('0x3d')]['findOrCreate']({'where':{'UserId':_0x475a44['id'],'ChatQueueId':_0x3d0abc[_0xac0a('0x27')]['id']},'transaction':_0x199caf});});})[_0xac0a('0x17')](function(){_0x55d458['forEach'](function(_0x48f79f){socket[_0xac0a('0x5a')](_0xac0a('0x5b'),{'UserId':_0x48f79f['id'],'ChatQueueId':_0x29055e['id']});});});});});}})[_0xac0a('0x17')](respondWithStatusCode(_0x146935,null))[_0xac0a('0x26')](handleError(_0x146935,null));};exports[_0xac0a('0x5c')]=function(_0x257ed2,_0x2c4478){return db['Team']['findAll']({'where':{'id':_0x257ed2['query']['ids']},'attributes':['id'],'include':[{'model':db[_0xac0a('0x44')],'as':_0xac0a('0x57'),'attributes':['id'],'raw':!![]}]})[_0xac0a('0x17')](handleEntityNotFound(_0x2c4478,null))[_0xac0a('0x17')](function(_0x24e538){var _0x5d0dec=_[_0xac0a('0x1e')](_0x24e538,'id');var _0x4160a5=[];var _0x4cc431=[];var _0x582b73=squel['select']();_0x582b73[_0xac0a('0x5d')](_0xac0a('0x5e'))['from'](_0xac0a('0x5f'),'tq')[_0xac0a('0x60')](_0xac0a('0x61'),'ut',_0xac0a('0x62'))[_0xac0a('0x23')]('ChatQueueId\x20=\x20?',_0x257ed2[_0xac0a('0x27')]['id']);for(var _0x23875f=0x0;_0x23875f<_0x24e538[_0xac0a('0x2f')];_0x23875f+=0x1){let _0x5a7cbe=_0x24e538[_0x23875f];for(var _0xb7e715=0x0;_0xb7e715<_0x5a7cbe[_0xac0a('0x57')][_0xac0a('0x2f')];_0xb7e715+=0x1){let _0x195c4e=_0x5a7cbe[_0xac0a('0x57')][_0xb7e715];var _0xf5982=_0x582b73[_0xac0a('0x63')]();_0xf5982['where'](_0xac0a('0x64'),_0x195c4e['id']);_0x4cc431[_0xac0a('0x65')](db[_0xac0a('0x66')][_0xac0a('0x2a')](_0xf5982[_0xac0a('0x67')](),{'type':db[_0xac0a('0x66')]['QueryTypes'][_0xac0a('0x68')]})['then'](function(_0x18080d){if(_0x18080d[_0xac0a('0x2f')]===0x1){return _0x195c4e['id'];}else{var _0x571681=_['every'](_[_0xac0a('0x1e')](_0x18080d,_0xac0a('0x69')),function(_0x159823){return _[_0xac0a('0x6a')](_0x5d0dec,_0x159823);});if(_0x571681){return _0x195c4e['id'];}}}));}}return BPromise['all'](_0x4cc431)[_0xac0a('0x17')](function(_0xfaf3e0){_0x4160a5=_(_0x4160a5)['union'](_0xfaf3e0)[_0xac0a('0x6b')]()[_0xac0a('0x6c')]();return db[_0xac0a('0x1f')][_0xac0a('0x38')]({'where':{'id':_0x257ed2[_0xac0a('0x27')]['id']}})[_0xac0a('0x17')](function(_0x4f21d5){return db[_0xac0a('0x66')][_0xac0a('0x58')](function(_0x521acd){return _0x4f21d5[_0xac0a('0x5c')](_0x257ed2['query'][_0xac0a('0x52')],{'transaction':_0x521acd})[_0xac0a('0x17')](function(){if(!_['isEmpty'](_0x4160a5)){return _0x4f21d5[_0xac0a('0x6d')](_0x4160a5,{'transaction':_0x521acd});}})[_0xac0a('0x17')](function(){_0x4160a5[_0xac0a('0x6e')](function(_0x37e312){socket[_0xac0a('0x5a')](_0xac0a('0x6f'),{'UserId':_0x37e312,'ChatQueueId':_0x4f21d5['id']});});});});});});})[_0xac0a('0x17')](respondWithStatusCode(_0x2c4478,null))[_0xac0a('0x26')](handleError(_0x2c4478,null));};exports[_0xac0a('0x70')]=function(_0x1a1b06,_0x24796d){return db['ChatQueue']['find']({'where':{'id':_0x1a1b06[_0xac0a('0x27')]['id']}})[_0xac0a('0x17')](handleEntityNotFound(_0x24796d,null))['then'](function(_0x242ae0){if(_0x242ae0){return _0x242ae0[_0xac0a('0x70')](_0x1a1b06[_0xac0a('0x32')][_0xac0a('0x52')],_[_0xac0a('0x71')](_0x1a1b06[_0xac0a('0x32')],[_0xac0a('0x52'),'id'])||{})[_0xac0a('0x72')](function(_0x341b4f){for(var _0x3227c6=0x0;_0x3227c6<_0x1a1b06[_0xac0a('0x32')]['ids'][_0xac0a('0x2f')];_0x3227c6+=0x1){socket[_0xac0a('0x5a')](_0xac0a('0x5b'),{'UserId':Number(_0x1a1b06['body'][_0xac0a('0x52')][_0x3227c6]),'ChatQueueId':Number(_0x1a1b06[_0xac0a('0x27')]['id'])});}return _0x341b4f;});}})['then'](respondWithResult(_0x24796d,null))[_0xac0a('0x26')](handleError(_0x24796d,null));};exports['removeAgents']=function(_0x1a961e,_0xb00df5){return db[_0xac0a('0x1f')][_0xac0a('0x38')]({'where':{'id':_0x1a961e['params']['id']}})['then'](handleEntityNotFound(_0xb00df5,null))[_0xac0a('0x17')](function(_0x1bfd2a){if(_0x1bfd2a){return _0x1bfd2a[_0xac0a('0x6d')](_0x1a961e[_0xac0a('0x2a')][_0xac0a('0x52')])[_0xac0a('0x17')](function(){if(_[_0xac0a('0x73')](_0x1a961e[_0xac0a('0x2a')][_0xac0a('0x52')])){for(var _0x24cd1d=0x0;_0x24cd1d<_0x1a961e[_0xac0a('0x2a')][_0xac0a('0x52')][_0xac0a('0x2f')];_0x24cd1d+=0x1){socket[_0xac0a('0x5a')](_0xac0a('0x6f'),{'UserId':Number(_0x1a961e[_0xac0a('0x2a')][_0xac0a('0x52')][_0x24cd1d]),'ChatQueueId':Number(_0x1a961e[_0xac0a('0x27')]['id'])});}}else{socket['emit'](_0xac0a('0x6f'),{'UserId':Number(_0x1a961e[_0xac0a('0x2a')][_0xac0a('0x52')]),'ChatQueueId':Number(_0x1a961e['params']['id'])});}});}})[_0xac0a('0x17')](respondWithStatusCode(_0xb00df5,null))[_0xac0a('0x26')](handleError(_0xb00df5,null));};exports['getAgents']=function(_0x645684,_0x542bbc){var _0x2ca172={};var _0x392bfc={};var _0x31ef9f;var _0x4fb7ae;return db[_0xac0a('0x1f')][_0xac0a('0x74')]({'where':{'id':_0x645684[_0xac0a('0x27')]['id']}})[_0xac0a('0x17')](handleEntityNotFound(_0x542bbc,null))['then'](function(_0x1548f0){if(_0x1548f0){_0x31ef9f=_0x1548f0;_0x392bfc[_0xac0a('0x2c')]=_[_0xac0a('0x28')](db[_0xac0a('0x44')][_0xac0a('0x29')]);_0x392bfc[_0xac0a('0x2a')]=_[_0xac0a('0x28')](_0x645684[_0xac0a('0x2a')]);_0x392bfc[_0xac0a('0x2b')]=_[_0xac0a('0x3e')](_0x392bfc[_0xac0a('0x2c')],_0x392bfc['query']);_0x2ca172[_0xac0a('0x2d')]=_['intersection'](_0x392bfc[_0xac0a('0x2c')],qs[_0xac0a('0x2e')](_0x645684[_0xac0a('0x2a')][_0xac0a('0x2e')]));_0x2ca172['attributes']=_0x2ca172['attributes']['length']?_0x2ca172[_0xac0a('0x2d')]:_0x392bfc[_0xac0a('0x2c')];_0x2ca172[_0xac0a('0x4e')]=qs['sort'](_0x645684[_0xac0a('0x2a')][_0xac0a('0x40')]);_0x2ca172[_0xac0a('0x23')]=qs[_0xac0a('0x2b')](_[_0xac0a('0x4f')](_0x645684[_0xac0a('0x2a')],_0x392bfc[_0xac0a('0x2b')]));if(_0x645684[_0xac0a('0x2a')][_0xac0a('0x42')]){_0x2ca172['where']=_[_0xac0a('0x30')](_0x2ca172[_0xac0a('0x23')],{'$or':_[_0xac0a('0x1e')](_0x2ca172[_0xac0a('0x2d')],function(_0x4ce239){var _0x46c824={};_0x46c824[_0x4ce239]={'$like':'%'+_0x645684[_0xac0a('0x2a')][_0xac0a('0x42')]+'%'};return _0x46c824;})});}_0x2ca172=_[_0xac0a('0x30')]({},_0x2ca172,_0x645684[_0xac0a('0x43')]);return _0x31ef9f['getAgents'](_0x2ca172);}})[_0xac0a('0x17')](function(_0x37df48){if(_0x37df48){_0x4fb7ae=_0x37df48['length'];if(!_0x645684['query'][_0xac0a('0x3f')](_0xac0a('0x50'))){_0x2ca172['limit']=qs[_0xac0a('0x11')](_0x645684[_0xac0a('0x2a')][_0xac0a('0x11')]);_0x2ca172[_0xac0a('0xf')]=qs[_0xac0a('0xf')](_0x645684[_0xac0a('0x2a')][_0xac0a('0xf')]);}return _0x31ef9f['getAgents'](_0x2ca172);}})[_0xac0a('0x17')](function(_0x1fffa5){if(_0x1fffa5){return _0x1fffa5?{'count':_0x4fb7ae,'rows':_0x1fffa5}:null;}})[_0xac0a('0x17')](respondWithResult(_0x542bbc,null))[_0xac0a('0x26')](handleError(_0x542bbc,null));};
\ No newline at end of file
+var _0x6450=['include','query','findAll','catch','show','params','model','keys','filters','intersection','attributes','fields','length','includeAll','merge','options','find','create','body','user','role','UserProfileSection','userProfileId','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','findOne','UserChatQueue','nolimit','order','sort','pick','ChatQueueId','filter','map','User','findAndCountAll','agent','chatPause','updatedAt','format','%s/%s','SIP','createdAt','getTeams','Team','hasOwnProperty','addTeams','ids','online','interface','flatMap','sequelize','transaction','each','forEach','userChatQueue:save','removeTeams','Agents','select','field','team_has_chat_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','ChatQueueId\x20=\x20?','ut.UserId\x20=\x20?','QueryTypes','SELECT','every','includes','all','union','compact','isEmpty','removeAgents','emit','userChatQueue:remove','addAgents','omit','spread','isArray','getAgents','lodash','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./chatQueue.socket','sendStatus','status','end','json','undefined','limit','count','offset','Content-Range','update','then','destroy','get','ChatQueues','error','name','send','ChatQueue','rawAttributes','fieldName','type','key','getOptions','where'];(function(_0x1ee73f,_0x3b0729){var _0x5954f9=function(_0x2cf6b5){while(--_0x2cf6b5){_0x1ee73f['push'](_0x1ee73f['shift']());}};_0x5954f9(++_0x3b0729);}(_0x6450,0x1b4));var _0x0645=function(_0x33b9d8,_0x3b087c){_0x33b9d8=_0x33b9d8-0x0;var _0x1cffc7=_0x6450[_0x33b9d8];return _0x1cffc7;};'use strict';var BPromise=require('bluebird');var util=require('util');var _=require(_0x0645('0x0'));var squel=require('squel');var Redis=require(_0x0645('0x1'));var qs=require(_0x0645('0x2'));var logger=require(_0x0645('0x3'))(_0x0645('0x4'));var config=require(_0x0645('0x5'));var db=require(_0x0645('0x6'))['db'];config['redis']=_[_0x0645('0x7')](config[_0x0645('0x8')],{'host':_0x0645('0x9'),'port':0x18eb});var socket=require(_0x0645('0xa'))(new Redis(config['redis']));require(_0x0645('0xb'))['register'](socket);function respondWithStatusCode(_0x3946d9,_0xda538b){_0xda538b=_0xda538b||0xcc;return function(_0xb3febe){if(_0xb3febe){return _0x3946d9[_0x0645('0xc')](_0xda538b);}return _0x3946d9[_0x0645('0xd')](_0xda538b)[_0x0645('0xe')]();};}function respondWithResult(_0x40bf96,_0xab72b4){_0xab72b4=_0xab72b4||0xc8;return function(_0x32f9d4){if(_0x32f9d4){return _0x40bf96[_0x0645('0xd')](_0xab72b4)[_0x0645('0xf')](_0x32f9d4);}};}function respondWithFilteredResult(_0x328d0d,_0x3e15b8){return function(_0x3b7da4){if(_0x3b7da4){var _0x48f428=typeof _0x3e15b8['offset']===_0x0645('0x10')&&typeof _0x3e15b8[_0x0645('0x11')]===_0x0645('0x10');var _0x330773=_0x3b7da4[_0x0645('0x12')];var _0x5d32af=_0x48f428?0x0:_0x3e15b8[_0x0645('0x13')];var _0x3858fb=_0x48f428?_0x3b7da4['count']:_0x3e15b8[_0x0645('0x13')]+_0x3e15b8['limit'];var _0x51bdab;if(_0x3858fb>=_0x330773){_0x3858fb=_0x330773;_0x51bdab=0xc8;}else{_0x51bdab=0xce;}_0x328d0d[_0x0645('0xd')](_0x51bdab);return _0x328d0d['set'](_0x0645('0x14'),_0x5d32af+'-'+_0x3858fb+'/'+_0x330773)['json'](_0x3b7da4);}return null;};}function saveUpdates(_0x3273c1){return function(_0x173109){if(_0x173109){return _0x173109[_0x0645('0x15')](_0x3273c1)[_0x0645('0x16')](function(_0x451a79){return _0x451a79;});}return null;};}function removeEntity(_0x2b54b4){return function(_0x50a3cb){if(_0x50a3cb){return _0x50a3cb[_0x0645('0x17')]()['then'](function(){var _0x1da23b=_0x50a3cb[_0x0645('0x18')]({'plain':!![]});var _0x542f42=_0x0645('0x19');return db['UserProfileResource']['destroy']({'where':{'type':_0x542f42,'resourceId':_0x1da23b['id']}})[_0x0645('0x16')](function(){return _0x50a3cb;});})[_0x0645('0x16')](function(){_0x2b54b4[_0x0645('0xd')](0xcc)['end']();});}};}function handleEntityNotFound(_0x37d765){return function(_0x54dbd4){if(!_0x54dbd4){_0x37d765[_0x0645('0xc')](0x194);}return _0x54dbd4;};}function handleError(_0x54ee29,_0xe6e56d){_0xe6e56d=_0xe6e56d||0x1f4;return function(_0x497ff7){logger[_0x0645('0x1a')](_0x497ff7['stack']);if(_0x497ff7['name']){delete _0x497ff7[_0x0645('0x1b')];}_0x54ee29['status'](_0xe6e56d)[_0x0645('0x1c')](_0x497ff7);};}exports['index']=function(_0x52e6e2,_0x329e07){var _0x5098ec={};var _0x217666={'count':0x0,'rows':[]};var _0x586e09=_['map'](db[_0x0645('0x1d')][_0x0645('0x1e')],function(_0x1c89ae){return{'name':_0x1c89ae[_0x0645('0x1f')],'type':_0x1c89ae[_0x0645('0x20')][_0x0645('0x21')]};});_0x5098ec=qs[_0x0645('0x22')](_0x586e09,_0x52e6e2);var _0x16ce72={'where':_0x5098ec[_0x0645('0x23')]};return db[_0x0645('0x1d')][_0x0645('0x12')](_0x16ce72)[_0x0645('0x16')](function(_0x562909){_0x217666[_0x0645('0x12')]=_0x562909;_0x5098ec['include']=qs[_0x0645('0x24')](_0x52e6e2[_0x0645('0x25')]);return db[_0x0645('0x1d')][_0x0645('0x26')](_0x5098ec);})[_0x0645('0x16')](function(_0x1563d6){_0x217666['rows']=_0x1563d6;return _0x217666;})['then'](respondWithFilteredResult(_0x329e07,_0x5098ec))[_0x0645('0x27')](handleError(_0x329e07,null));};exports[_0x0645('0x28')]=function(_0xf2f38d,_0x27da7d){var _0x4b5d38={'raw':!![],'where':{'id':_0xf2f38d[_0x0645('0x29')]['id']}},_0x572d63={};_0x572d63[_0x0645('0x2a')]=_[_0x0645('0x2b')](db[_0x0645('0x1d')][_0x0645('0x1e')]);_0x572d63['query']=_[_0x0645('0x2b')](_0xf2f38d['query']);_0x572d63[_0x0645('0x2c')]=_[_0x0645('0x2d')](_0x572d63[_0x0645('0x2a')],_0x572d63[_0x0645('0x25')]);_0x4b5d38[_0x0645('0x2e')]=_['intersection'](_0x572d63[_0x0645('0x2a')],qs[_0x0645('0x2f')](_0xf2f38d[_0x0645('0x25')]['fields']));_0x4b5d38[_0x0645('0x2e')]=_0x4b5d38['attributes'][_0x0645('0x30')]?_0x4b5d38[_0x0645('0x2e')]:_0x572d63[_0x0645('0x2a')];if(_0xf2f38d[_0x0645('0x25')][_0x0645('0x31')]){_0x4b5d38[_0x0645('0x24')]=[{'all':!![]}];}_0x4b5d38=_[_0x0645('0x32')]({},_0x4b5d38,_0xf2f38d[_0x0645('0x33')]);return db[_0x0645('0x1d')][_0x0645('0x34')](_0x4b5d38)[_0x0645('0x16')](handleEntityNotFound(_0x27da7d,null))[_0x0645('0x16')](respondWithResult(_0x27da7d,null))[_0x0645('0x27')](handleError(_0x27da7d,null));};exports['create']=function(_0x22a0e1,_0x48e7dc){return db[_0x0645('0x1d')][_0x0645('0x35')](_0x22a0e1[_0x0645('0x36')],{})[_0x0645('0x16')](function(_0x749940){var _0x919ccb=_0x22a0e1[_0x0645('0x37')][_0x0645('0x18')]({'plain':!![]});if(!_0x919ccb)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x919ccb[_0x0645('0x38')]===_0x0645('0x37')){var _0x5000fb=_0x749940[_0x0645('0x18')]({'plain':!![]});var _0x233060='ChatQueues';return db[_0x0645('0x39')][_0x0645('0x34')]({'where':{'name':_0x233060,'userProfileId':_0x919ccb[_0x0645('0x3a')]},'raw':!![]})[_0x0645('0x16')](function(_0x1dc0b1){if(_0x1dc0b1&&_0x1dc0b1['autoAssociation']===0x0){return db[_0x0645('0x3b')]['create']({'name':_0x5000fb[_0x0645('0x1b')],'resourceId':_0x5000fb['id'],'type':_0x1dc0b1[_0x0645('0x1b')],'sectionId':_0x1dc0b1['id']},{})[_0x0645('0x16')](function(){return _0x749940;});}else{return _0x749940;}})[_0x0645('0x27')](function(_0x271176){logger[_0x0645('0x1a')](_0x0645('0x3c'),_0x271176);throw _0x271176;});}return _0x749940;})[_0x0645('0x16')](respondWithResult(_0x48e7dc,0xc9))['catch'](handleError(_0x48e7dc,null));};exports['update']=function(_0x5b793b,_0x50ff6a){if(_0x5b793b['body']['id']){delete _0x5b793b[_0x0645('0x36')]['id'];}return db[_0x0645('0x1d')][_0x0645('0x34')]({'where':{'id':_0x5b793b['params']['id']}})['then'](handleEntityNotFound(_0x50ff6a,null))[_0x0645('0x16')](saveUpdates(_0x5b793b[_0x0645('0x36')],null))[_0x0645('0x16')](respondWithResult(_0x50ff6a,null))[_0x0645('0x27')](handleError(_0x50ff6a,null));};exports['destroy']=function(_0x502284,_0xa135e8){return db['ChatQueue']['find']({'where':{'id':_0x502284[_0x0645('0x29')]['id']}})[_0x0645('0x16')](handleEntityNotFound(_0xa135e8,null))[_0x0645('0x16')](removeEntity(_0xa135e8,null))[_0x0645('0x27')](handleError(_0xa135e8,null));};exports['describe']=function(_0x1cd039,_0x2ebbb6){return db[_0x0645('0x1d')]['describe']()['then'](respondWithResult(_0x2ebbb6,null))[_0x0645('0x27')](handleError(_0x2ebbb6,null));};exports['getMembers']=function(_0x19f805,_0x5ddb73){var _0x5a7aa3={'raw':!![],'where':{}},_0x3d54a0={},_0x439adf;return db[_0x0645('0x1d')][_0x0645('0x3d')]({'where':{'id':_0x19f805[_0x0645('0x29')]['id']}})[_0x0645('0x16')](handleEntityNotFound(_0x5ddb73,null))[_0x0645('0x16')](function(_0x487961){if(_0x487961){_0x439adf=_0x487961[_0x0645('0x18')]({'plain':!![]});_0x3d54a0[_0x0645('0x2a')]=_['keys'](db[_0x0645('0x3e')]['rawAttributes']);_0x3d54a0[_0x0645('0x25')]=_['keys'](_0x19f805[_0x0645('0x25')]);_0x3d54a0['filters']=_[_0x0645('0x2d')](_0x3d54a0[_0x0645('0x2a')],_0x3d54a0[_0x0645('0x25')]);_0x5a7aa3[_0x0645('0x2e')]=_[_0x0645('0x2d')](_0x3d54a0['model'],qs[_0x0645('0x2f')](_0x19f805[_0x0645('0x25')]['fields']));_0x5a7aa3[_0x0645('0x2e')]=_0x5a7aa3['attributes']['length']?_0x5a7aa3[_0x0645('0x2e')]:_0x3d54a0[_0x0645('0x2a')];if(!_0x19f805[_0x0645('0x25')]['hasOwnProperty'](_0x0645('0x3f'))){_0x5a7aa3[_0x0645('0x11')]=qs[_0x0645('0x11')](_0x19f805[_0x0645('0x25')][_0x0645('0x11')]);_0x5a7aa3[_0x0645('0x13')]=qs[_0x0645('0x13')](_0x19f805[_0x0645('0x25')]['offset']);}_0x5a7aa3[_0x0645('0x40')]=qs[_0x0645('0x41')](_0x19f805[_0x0645('0x25')]['sort']);_0x5a7aa3['where']=qs[_0x0645('0x2c')](_[_0x0645('0x42')](_0x19f805[_0x0645('0x25')],_0x3d54a0[_0x0645('0x2c')]));_0x5a7aa3['where'][_0x0645('0x43')]=_0x487961['id'];if(_0x19f805[_0x0645('0x25')][_0x0645('0x44')]){_0x5a7aa3['where']=_[_0x0645('0x32')](_0x5a7aa3[_0x0645('0x23')],{'$or':_[_0x0645('0x45')](_0x5a7aa3[_0x0645('0x2e')],function(_0x15b6e2){var _0xf79eaa={};_0xf79eaa[_0x15b6e2]={'$like':'%'+_0x19f805[_0x0645('0x25')][_0x0645('0x44')]+'%'};return _0xf79eaa;})});}_0x5a7aa3=_[_0x0645('0x32')]({},_0x5a7aa3,_0x19f805[_0x0645('0x33')]);return db['UserChatQueue']['findAll'](_0x5a7aa3);}})[_0x0645('0x16')](function(_0x4b9763){if(_0x4b9763){return db[_0x0645('0x46')][_0x0645('0x47')]({'where':{'id':_['map'](_0x4b9763,'UserId'),'role':_0x0645('0x48')},'attributes':['id','name',_0x0645('0x49'),_0x0645('0x4a'),'createdAt']});}})[_0x0645('0x16')](function(_0x12ea49){if(_0x12ea49){return{'count':_0x12ea49['count'],'rows':_[_0x0645('0x45')](_0x12ea49['rows'],function(_0x6590fe){return{'membername':_0x6590fe[_0x0645('0x1b')],'UserId':_0x6590fe['id'],'queue_name':_0x439adf[_0x0645('0x1b')],'ChatQueueId':_0x439adf['id'],'interface':util[_0x0645('0x4b')](_0x0645('0x4c'),_0x0645('0x4d'),_0x6590fe[_0x0645('0x1b')]),'penalty':0x0,'paused':_0x6590fe[_0x0645('0x49')],'createdAt':_0x6590fe[_0x0645('0x4e')],'updatedAt':_0x6590fe[_0x0645('0x4a')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x0645('0x16')](respondWithFilteredResult(_0x5ddb73,_0x5a7aa3))[_0x0645('0x27')](handleError(_0x5ddb73,null));};exports[_0x0645('0x4f')]=function(_0x1f1bc8,_0x1125b8){var _0x58b607={};var _0x2138ac={};var _0x5bfbcb;var _0x1b7774;return db['ChatQueue']['findOne']({'where':{'id':_0x1f1bc8[_0x0645('0x29')]['id']}})[_0x0645('0x16')](handleEntityNotFound(_0x1125b8,null))[_0x0645('0x16')](function(_0x22af0a){if(_0x22af0a){_0x5bfbcb=_0x22af0a;_0x2138ac['model']=_[_0x0645('0x2b')](db[_0x0645('0x50')][_0x0645('0x1e')]);_0x2138ac[_0x0645('0x25')]=_[_0x0645('0x2b')](_0x1f1bc8[_0x0645('0x25')]);_0x2138ac['filters']=_['intersection'](_0x2138ac['model'],_0x2138ac[_0x0645('0x25')]);_0x58b607['attributes']=_[_0x0645('0x2d')](_0x2138ac['model'],qs[_0x0645('0x2f')](_0x1f1bc8[_0x0645('0x25')][_0x0645('0x2f')]));_0x58b607[_0x0645('0x2e')]=_0x58b607[_0x0645('0x2e')][_0x0645('0x30')]?_0x58b607[_0x0645('0x2e')]:_0x2138ac[_0x0645('0x2a')];_0x58b607[_0x0645('0x40')]=qs[_0x0645('0x41')](_0x1f1bc8[_0x0645('0x25')][_0x0645('0x41')]);_0x58b607[_0x0645('0x23')]=qs['filters'](_[_0x0645('0x42')](_0x1f1bc8[_0x0645('0x25')],_0x2138ac[_0x0645('0x2c')]));if(_0x1f1bc8[_0x0645('0x25')][_0x0645('0x44')]){_0x58b607[_0x0645('0x23')]=_['merge'](_0x58b607[_0x0645('0x23')],{'$or':_[_0x0645('0x45')](_0x58b607[_0x0645('0x2e')],function(_0x24ed2b){var _0x323529={};_0x323529[_0x24ed2b]={'$like':'%'+_0x1f1bc8['query'][_0x0645('0x44')]+'%'};return _0x323529;})});}_0x58b607=_[_0x0645('0x32')]({},_0x58b607,_0x1f1bc8[_0x0645('0x33')]);return _0x5bfbcb['getTeams'](_0x58b607);}})[_0x0645('0x16')](function(_0x23a3b8){if(_0x23a3b8){_0x1b7774=_0x23a3b8[_0x0645('0x30')];if(!_0x1f1bc8[_0x0645('0x25')][_0x0645('0x51')](_0x0645('0x3f'))){_0x58b607[_0x0645('0x11')]=qs['limit'](_0x1f1bc8[_0x0645('0x25')]['limit']);_0x58b607[_0x0645('0x13')]=qs['offset'](_0x1f1bc8['query'][_0x0645('0x13')]);}return _0x5bfbcb[_0x0645('0x4f')](_0x58b607);}})[_0x0645('0x16')](function(_0x32162a){if(_0x32162a){return _0x32162a?{'count':_0x1b7774,'rows':_0x32162a}:null;}})[_0x0645('0x16')](respondWithResult(_0x1125b8,null))[_0x0645('0x27')](handleError(_0x1125b8,null));};exports[_0x0645('0x52')]=function(_0x270592,_0x3816ed){var _0x83e7ad=_0x270592[_0x0645('0x36')][_0x0645('0x53')];return db[_0x0645('0x50')][_0x0645('0x26')]({'where':{'id':_0x83e7ad},'attributes':['id'],'include':[{'model':db[_0x0645('0x46')],'as':'Agents','attributes':['id',_0x0645('0x1b'),_0x0645('0x54'),'voicePause',_0x0645('0x55')],'raw':!![]}]})[_0x0645('0x16')](function(_0x107168){if(_0x107168){var _0x2ed370=_[_0x0645('0x56')](_0x107168,function(_0x45c28f){var _0x5709f9=_0x45c28f[_0x0645('0x18')]({'plain':!![]});return _0x5709f9['Agents'];});return db[_0x0645('0x1d')][_0x0645('0x34')]({'where':{'id':_0x270592[_0x0645('0x29')]['id']}})['then'](function(_0x244d3f){return db[_0x0645('0x57')][_0x0645('0x58')](function(_0x45a8ba){return _0x244d3f[_0x0645('0x52')](_0x83e7ad,{'transaction':_0x45a8ba})['then'](function(){return BPromise[_0x0645('0x59')](_0x2ed370,function(_0x5984b5){return db['UserChatQueue']['findOrCreate']({'where':{'UserId':_0x5984b5['id'],'ChatQueueId':_0x270592[_0x0645('0x29')]['id']},'transaction':_0x45a8ba});});})[_0x0645('0x16')](function(){_0x2ed370[_0x0645('0x5a')](function(_0x1bf736){socket['emit'](_0x0645('0x5b'),{'UserId':_0x1bf736['id'],'ChatQueueId':_0x244d3f['id']});});});});});}})[_0x0645('0x16')](respondWithStatusCode(_0x3816ed,null))[_0x0645('0x27')](handleError(_0x3816ed,null));};exports[_0x0645('0x5c')]=function(_0x5e3438,_0x1e7a45){return db['Team']['findAll']({'where':{'id':_0x5e3438[_0x0645('0x25')][_0x0645('0x53')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0x0645('0x5d'),'attributes':['id'],'raw':!![]}]})[_0x0645('0x16')](handleEntityNotFound(_0x1e7a45,null))[_0x0645('0x16')](function(_0x52de67){var _0x274287=_[_0x0645('0x45')](_0x52de67,'id');var _0x4d7ab7=[];var _0xe75ff9=[];var _0x3d97fb=squel[_0x0645('0x5e')]();_0x3d97fb[_0x0645('0x5f')]('tq.TeamId')['from'](_0x0645('0x60'),'tq')[_0x0645('0x61')](_0x0645('0x62'),'ut',_0x0645('0x63'))[_0x0645('0x23')](_0x0645('0x64'),_0x5e3438[_0x0645('0x29')]['id']);for(var _0x16e187=0x0;_0x16e187<_0x52de67[_0x0645('0x30')];_0x16e187+=0x1){let _0x25579d=_0x52de67[_0x16e187];for(var _0x48ab9d=0x0;_0x48ab9d<_0x25579d[_0x0645('0x5d')]['length'];_0x48ab9d+=0x1){let _0x10bcfc=_0x25579d[_0x0645('0x5d')][_0x48ab9d];var _0x87dfe2=_0x3d97fb['clone']();_0x87dfe2[_0x0645('0x23')](_0x0645('0x65'),_0x10bcfc['id']);_0xe75ff9['push'](db[_0x0645('0x57')][_0x0645('0x25')](_0x87dfe2['toString'](),{'type':db['sequelize'][_0x0645('0x66')][_0x0645('0x67')]})[_0x0645('0x16')](function(_0x3670ea){if(_0x3670ea[_0x0645('0x30')]===0x1){return _0x10bcfc['id'];}else{var _0x371ad0=_[_0x0645('0x68')](_[_0x0645('0x45')](_0x3670ea,'TeamId'),function(_0x257850){return _[_0x0645('0x69')](_0x274287,_0x257850);});if(_0x371ad0){return _0x10bcfc['id'];}}}));}}return BPromise[_0x0645('0x6a')](_0xe75ff9)['then'](function(_0x21138b){_0x4d7ab7=_(_0x4d7ab7)[_0x0645('0x6b')](_0x21138b)[_0x0645('0x6c')]()['value']();return db[_0x0645('0x1d')]['find']({'where':{'id':_0x5e3438['params']['id']}})['then'](function(_0x468d28){return db[_0x0645('0x57')][_0x0645('0x58')](function(_0x3a5210){return _0x468d28[_0x0645('0x5c')](_0x5e3438['query'][_0x0645('0x53')],{'transaction':_0x3a5210})[_0x0645('0x16')](function(){if(!_[_0x0645('0x6d')](_0x4d7ab7)){return _0x468d28[_0x0645('0x6e')](_0x4d7ab7,{'transaction':_0x3a5210});}})[_0x0645('0x16')](function(){_0x4d7ab7[_0x0645('0x5a')](function(_0x3dbb41){socket[_0x0645('0x6f')](_0x0645('0x70'),{'UserId':_0x3dbb41,'ChatQueueId':_0x468d28['id']});});});});});});})['then'](respondWithStatusCode(_0x1e7a45,null))[_0x0645('0x27')](handleError(_0x1e7a45,null));};exports[_0x0645('0x71')]=function(_0x37f929,_0xccc21a){return db[_0x0645('0x1d')][_0x0645('0x34')]({'where':{'id':_0x37f929[_0x0645('0x29')]['id']}})[_0x0645('0x16')](handleEntityNotFound(_0xccc21a,null))[_0x0645('0x16')](function(_0x4cea7d){if(_0x4cea7d){return _0x4cea7d[_0x0645('0x71')](_0x37f929[_0x0645('0x36')]['ids'],_[_0x0645('0x72')](_0x37f929[_0x0645('0x36')],[_0x0645('0x53'),'id'])||{})[_0x0645('0x73')](function(_0x145c9c){for(var _0x5cb51d=0x0;_0x5cb51d<_0x37f929[_0x0645('0x36')][_0x0645('0x53')]['length'];_0x5cb51d+=0x1){socket[_0x0645('0x6f')]('userChatQueue:save',{'UserId':Number(_0x37f929[_0x0645('0x36')]['ids'][_0x5cb51d]),'ChatQueueId':Number(_0x37f929[_0x0645('0x29')]['id'])});}return _0x145c9c;});}})[_0x0645('0x16')](respondWithResult(_0xccc21a,null))[_0x0645('0x27')](handleError(_0xccc21a,null));};exports['removeAgents']=function(_0x211d62,_0x4f5c6c){return db[_0x0645('0x1d')]['find']({'where':{'id':_0x211d62[_0x0645('0x29')]['id']}})[_0x0645('0x16')](handleEntityNotFound(_0x4f5c6c,null))[_0x0645('0x16')](function(_0x2117f6){if(_0x2117f6){return _0x2117f6[_0x0645('0x6e')](_0x211d62[_0x0645('0x25')][_0x0645('0x53')])[_0x0645('0x16')](function(){if(_[_0x0645('0x74')](_0x211d62[_0x0645('0x25')][_0x0645('0x53')])){for(var _0x2ae2a0=0x0;_0x2ae2a0<_0x211d62[_0x0645('0x25')][_0x0645('0x53')]['length'];_0x2ae2a0+=0x1){socket[_0x0645('0x6f')](_0x0645('0x70'),{'UserId':Number(_0x211d62['query'][_0x0645('0x53')][_0x2ae2a0]),'ChatQueueId':Number(_0x211d62[_0x0645('0x29')]['id'])});}}else{socket['emit'](_0x0645('0x70'),{'UserId':Number(_0x211d62[_0x0645('0x25')]['ids']),'ChatQueueId':Number(_0x211d62[_0x0645('0x29')]['id'])});}});}})['then'](respondWithStatusCode(_0x4f5c6c,null))[_0x0645('0x27')](handleError(_0x4f5c6c,null));};exports['getAgents']=function(_0x4435ba,_0x3f2e14){var _0x4cc9ab={};var _0x1aa631={};var _0x398f77;var _0x256dde;return db[_0x0645('0x1d')]['findOne']({'where':{'id':_0x4435ba[_0x0645('0x29')]['id']}})[_0x0645('0x16')](handleEntityNotFound(_0x3f2e14,null))[_0x0645('0x16')](function(_0x5e2d61){if(_0x5e2d61){_0x398f77=_0x5e2d61;_0x1aa631['model']=_['keys'](db[_0x0645('0x46')][_0x0645('0x1e')]);_0x1aa631[_0x0645('0x25')]=_[_0x0645('0x2b')](_0x4435ba[_0x0645('0x25')]);_0x1aa631[_0x0645('0x2c')]=_[_0x0645('0x2d')](_0x1aa631[_0x0645('0x2a')],_0x1aa631[_0x0645('0x25')]);_0x4cc9ab[_0x0645('0x2e')]=_['intersection'](_0x1aa631[_0x0645('0x2a')],qs[_0x0645('0x2f')](_0x4435ba[_0x0645('0x25')]['fields']));_0x4cc9ab[_0x0645('0x2e')]=_0x4cc9ab[_0x0645('0x2e')][_0x0645('0x30')]?_0x4cc9ab[_0x0645('0x2e')]:_0x1aa631[_0x0645('0x2a')];_0x4cc9ab[_0x0645('0x40')]=qs[_0x0645('0x41')](_0x4435ba['query'][_0x0645('0x41')]);_0x4cc9ab[_0x0645('0x23')]=qs[_0x0645('0x2c')](_[_0x0645('0x42')](_0x4435ba[_0x0645('0x25')],_0x1aa631[_0x0645('0x2c')]));if(_0x4435ba[_0x0645('0x25')][_0x0645('0x44')]){_0x4cc9ab[_0x0645('0x23')]=_[_0x0645('0x32')](_0x4cc9ab[_0x0645('0x23')],{'$or':_[_0x0645('0x45')](_0x4cc9ab[_0x0645('0x2e')],function(_0x15e4e7){var _0x31724b={};_0x31724b[_0x15e4e7]={'$like':'%'+_0x4435ba[_0x0645('0x25')][_0x0645('0x44')]+'%'};return _0x31724b;})});}_0x4cc9ab=_[_0x0645('0x32')]({},_0x4cc9ab,_0x4435ba[_0x0645('0x33')]);return _0x398f77[_0x0645('0x75')](_0x4cc9ab);}})[_0x0645('0x16')](function(_0x6920f8){if(_0x6920f8){_0x256dde=_0x6920f8[_0x0645('0x30')];if(!_0x4435ba['query'][_0x0645('0x51')]('nolimit')){_0x4cc9ab[_0x0645('0x11')]=qs[_0x0645('0x11')](_0x4435ba[_0x0645('0x25')][_0x0645('0x11')]);_0x4cc9ab[_0x0645('0x13')]=qs['offset'](_0x4435ba[_0x0645('0x25')][_0x0645('0x13')]);}return _0x398f77['getAgents'](_0x4cc9ab);}})[_0x0645('0x16')](function(_0x1abb9f){if(_0x1abb9f){return _0x1abb9f?{'count':_0x256dde,'rows':_0x1abb9f}:null;}})['then'](respondWithResult(_0x3f2e14,null))[_0x0645('0x27')](handleError(_0x3f2e14,null));};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.events.js b/server/api/chatQueue/chatQueue.events.js
index 2303179..10f71a7 100644
--- a/server/api/chatQueue/chatQueue.events.js
+++ b/server/api/chatQueue/chatQueue.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9c44=['events','../../mysqldb','update','emit','hook','exports'];(function(_0x540e54,_0x20f35e){var _0x1a4ed3=function(_0x36e100){while(--_0x36e100){_0x540e54['push'](_0x540e54['shift']());}};_0x1a4ed3(++_0x20f35e);}(_0x9c44,0x84));var _0x49c4=function(_0x50a0c2,_0x4befab){_0x50a0c2=_0x50a0c2-0x0;var _0x5ebadd=_0x9c44[_0x50a0c2];return _0x5ebadd;};'use strict';var EventEmitter=require(_0x49c4('0x0'));var ChatQueue=require(_0x49c4('0x1'))['db']['ChatQueue'];var ChatQueueEvents=new EventEmitter();ChatQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x49c4('0x2'),'afterDestroy':'remove'};function emitEvent(_0x45ae73){return function(_0x5e8b43,_0x15b775,_0x21f94c){ChatQueueEvents[_0x49c4('0x3')](_0x45ae73+':'+_0x5e8b43['id'],_0x5e8b43);ChatQueueEvents[_0x49c4('0x3')](_0x45ae73,_0x5e8b43);_0x21f94c(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatQueue[_0x49c4('0x4')](e,emitEvent(event));}}module[_0x49c4('0x5')]=ChatQueueEvents;
\ No newline at end of file
+var _0x8954=['hook','exports','events','ChatQueue','setMaxListeners','emit','hasOwnProperty'];(function(_0x117260,_0x14e08f){var _0x4d32f7=function(_0x1c5446){while(--_0x1c5446){_0x117260['push'](_0x117260['shift']());}};_0x4d32f7(++_0x14e08f);}(_0x8954,0x136));var _0x4895=function(_0x2e3dcd,_0x1d883d){_0x2e3dcd=_0x2e3dcd-0x0;var _0x3cb872=_0x8954[_0x2e3dcd];return _0x3cb872;};'use strict';var EventEmitter=require(_0x4895('0x0'));var ChatQueue=require('../../mysqldb')['db'][_0x4895('0x1')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents[_0x4895('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x39e68b){return function(_0x469496,_0x175e0c,_0x23b837){ChatQueueEvents[_0x4895('0x3')](_0x39e68b+':'+_0x469496['id'],_0x469496);ChatQueueEvents['emit'](_0x39e68b,_0x469496);_0x23b837(null);};}for(var e in events){if(events[_0x4895('0x4')](e)){var event=events[e];ChatQueue[_0x4895('0x5')](e,emitEvent(event));}}module[_0x4895('0x6')]=ChatQueueEvents;
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.model.js b/server/api/chatQueue/chatQueue.model.js
index 4f36585..de7cc01 100644
--- a/server/api/chatQueue/chatQueue.model.js
+++ b/server/api/chatQueue/chatQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0c4a=['request-promise','./chatQueue.attributes','exports','define','ChatQueue','chat_queues','lodash','util','../../config/logger','api','moment'];(function(_0x475f1f,_0x16af02){var _0x2b4d83=function(_0x1b6510){while(--_0x1b6510){_0x475f1f['push'](_0x475f1f['shift']());}};_0x2b4d83(++_0x16af02);}(_0x0c4a,0x74));var _0xa0c4=function(_0x135b19,_0x296771){_0x135b19=_0x135b19-0x0;var _0x31c7ac=_0x0c4a[_0x135b19];return _0x31c7ac;};'use strict';var _=require(_0xa0c4('0x0'));var util=require(_0xa0c4('0x1'));var logger=require(_0xa0c4('0x2'))(_0xa0c4('0x3'));var moment=require(_0xa0c4('0x4'));var BPromise=require('bluebird');var rp=require(_0xa0c4('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xa0c4('0x6'));module[_0xa0c4('0x7')]=function(_0x1acc28,_0x554924){return _0x1acc28[_0xa0c4('0x8')](_0xa0c4('0x9'),attributes,{'tableName':_0xa0c4('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xd9c8=['define','ChatQueue','chat_queues','lodash','util','moment','bluebird','path','rimraf','../../config/environment','exports'];(function(_0x1ec1b8,_0x4e3651){var _0x4d0f2c=function(_0x502766){while(--_0x502766){_0x1ec1b8['push'](_0x1ec1b8['shift']());}};_0x4d0f2c(++_0x4e3651);}(_0xd9c8,0x66));var _0x8d9c=function(_0x164eca,_0x555e28){_0x164eca=_0x164eca-0x0;var _0x2ce562=_0xd9c8[_0x164eca];return _0x2ce562;};'use strict';var _=require(_0x8d9c('0x0'));var util=require(_0x8d9c('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x8d9c('0x2'));var BPromise=require(_0x8d9c('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x8d9c('0x4'));var rimraf=require(_0x8d9c('0x5'));var config=require(_0x8d9c('0x6'));var attributes=require('./chatQueue.attributes');module[_0x8d9c('0x7')]=function(_0x368ea6,_0x203291){return _0x368ea6[_0x8d9c('0x8')](_0x8d9c('0x9'),attributes,{'tableName':_0x8d9c('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.rpc.js b/server/api/chatQueue/chatQueue.rpc.js
index ef061ea..708b6ff 100644
--- a/server/api/chatQueue/chatQueue.rpc.js
+++ b/server/api/chatQueue/chatQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xda20=['then','GetChatQueue','stringify','ShowChatQueue','find','lodash','moment','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./chatQueue.socket','register','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','error','message','catch','ChatQueue','raw','options','where','attributes','limit','include','map','model'];(function(_0x478c8a,_0x9afc92){var _0x3b6b3e=function(_0x37634e){while(--_0x37634e){_0x478c8a['push'](_0x478c8a['shift']());}};_0x3b6b3e(++_0x9afc92);}(_0xda20,0x1d9));var _0x0da2=function(_0x6febcb,_0x105519){_0x6febcb=_0x6febcb-0x0;var _0x3dd2fa=_0xda20[_0x6febcb];return _0x3dd2fa;};'use strict';var _=require(_0x0da2('0x0'));var util=require('util');var moment=require(_0x0da2('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0da2('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0x0da2('0x3'));var logger=require(_0x0da2('0x4'))('rpc');var config=require(_0x0da2('0x5'));var jayson=require(_0x0da2('0x6'));var client=jayson['client'][_0x0da2('0x7')]({'port':0x232a});config[_0x0da2('0x8')]=_[_0x0da2('0x9')](config[_0x0da2('0x8')],{'host':_0x0da2('0xa'),'port':0x18eb});var socket=require(_0x0da2('0xb'))(new Redis(config[_0x0da2('0x8')]));require(_0x0da2('0xc'))[_0x0da2('0xd')](socket);function respondWithRpcPromise(_0x4e491f,_0x127bed,_0xe9b4a8){return new BPromise(function(_0x18ff2b,_0x13fe84){return client['request'](_0x4e491f,_0xe9b4a8)['then'](function(_0x286402){logger[_0x0da2('0xe')](_0x0da2('0xf'),_0x127bed,_0x0da2('0x10'));logger[_0x0da2('0x11')](_0x0da2('0x12'),_0x127bed,_0x0da2('0x10'),JSON['stringify'](_0x286402));if(_0x286402[_0x0da2('0x13')]){if(_0x286402['error']['code']===0x1f4){logger['error'](_0x0da2('0xf'),_0x127bed,_0x286402['error'][_0x0da2('0x14')]);return _0x13fe84(_0x286402[_0x0da2('0x13')]['message']);}logger[_0x0da2('0x13')](_0x0da2('0xf'),_0x127bed,_0x286402['error'][_0x0da2('0x14')]);return _0x18ff2b(_0x286402[_0x0da2('0x13')][_0x0da2('0x14')]);}else{logger['info'](_0x0da2('0xf'),_0x127bed,_0x0da2('0x10'));_0x18ff2b(_0x286402['result']['message']);}})[_0x0da2('0x15')](function(_0x500bf4){logger[_0x0da2('0x13')]('ChatQueue,\x20%s,\x20%s',_0x127bed,_0x500bf4);_0x13fe84(_0x500bf4);});});}exports['GetChatQueue']=function(_0x495311){var _0x5cf40a=this;return new Promise(function(_0x109645,_0x1d685c){return db[_0x0da2('0x16')]['findAll']({'raw':_0x495311['options']?_0x495311['options'][_0x0da2('0x17')]===undefined?!![]:![]:!![],'where':_0x495311[_0x0da2('0x18')]?_0x495311[_0x0da2('0x18')][_0x0da2('0x19')]||null:null,'attributes':_0x495311[_0x0da2('0x18')]?_0x495311['options'][_0x0da2('0x1a')]||null:null,'limit':_0x495311[_0x0da2('0x18')]?_0x495311[_0x0da2('0x18')][_0x0da2('0x1b')]||null:null,'include':_0x495311[_0x0da2('0x18')]?_0x495311[_0x0da2('0x18')][_0x0da2('0x1c')]?_[_0x0da2('0x1d')](_0x495311[_0x0da2('0x18')]['include'],function(_0x43966a){return{'model':db[_0x43966a['model']],'as':_0x43966a['as'],'attributes':_0x43966a[_0x0da2('0x1a')],'include':_0x43966a[_0x0da2('0x1c')]?_[_0x0da2('0x1d')](_0x43966a[_0x0da2('0x1c')],function(_0x4b9333){return{'model':db[_0x4b9333[_0x0da2('0x1e')]],'as':_0x4b9333['as'],'attributes':_0x4b9333[_0x0da2('0x1a')],'include':_0x4b9333[_0x0da2('0x1c')]?_[_0x0da2('0x1d')](_0x4b9333[_0x0da2('0x1c')],function(_0x5083e0){return{'model':db[_0x5083e0[_0x0da2('0x1e')]],'as':_0x5083e0['as'],'attributes':_0x5083e0['attributes']};}):[]};}):[]};}):[]:[]})[_0x0da2('0x1f')](function(_0xb1ba88){logger[_0x0da2('0xe')](_0x0da2('0x20'),_0x495311);logger[_0x0da2('0x11')](_0x0da2('0x20'),_0x495311,JSON[_0x0da2('0x21')](_0xb1ba88));_0x109645(_0xb1ba88);})[_0x0da2('0x15')](function(_0x1f2b6f){logger[_0x0da2('0x13')](_0x0da2('0x20'),_0x1f2b6f['message'],_0x495311);_0x1d685c(_0x5cf40a['error'](0x1f4,_0x1f2b6f['message']));});});};exports[_0x0da2('0x22')]=function(_0x45d53d){var _0x54eda5=this;return new Promise(function(_0x52f248,_0x1c4ea4){return db[_0x0da2('0x16')][_0x0da2('0x23')]({'raw':_0x45d53d[_0x0da2('0x18')]?_0x45d53d['options'][_0x0da2('0x17')]===undefined?!![]:![]:!![],'where':_0x45d53d['options']?_0x45d53d[_0x0da2('0x18')][_0x0da2('0x19')]||null:null,'attributes':_0x45d53d[_0x0da2('0x18')]?_0x45d53d[_0x0da2('0x18')][_0x0da2('0x1a')]||null:null,'include':_0x45d53d[_0x0da2('0x18')]?_0x45d53d[_0x0da2('0x18')]['include']?_[_0x0da2('0x1d')](_0x45d53d[_0x0da2('0x18')][_0x0da2('0x1c')],function(_0xbef5da){return{'model':db[_0xbef5da[_0x0da2('0x1e')]],'as':_0xbef5da['as'],'attributes':_0xbef5da[_0x0da2('0x1a')],'include':_0xbef5da['include']?_[_0x0da2('0x1d')](_0xbef5da[_0x0da2('0x1c')],function(_0x314ea2){return{'model':db[_0x314ea2[_0x0da2('0x1e')]],'as':_0x314ea2['as'],'attributes':_0x314ea2['attributes'],'include':_0x314ea2['include']?_[_0x0da2('0x1d')](_0x314ea2[_0x0da2('0x1c')],function(_0x300010){return{'model':db[_0x300010[_0x0da2('0x1e')]],'as':_0x300010['as'],'attributes':_0x300010[_0x0da2('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x0da2('0x1f')](function(_0xe4bf41){logger[_0x0da2('0xe')](_0x0da2('0x22'),_0x45d53d);logger['debug'](_0x0da2('0x22'),_0x45d53d,JSON[_0x0da2('0x21')](_0xe4bf41));_0x52f248(_0xe4bf41);})[_0x0da2('0x15')](function(_0x41a55e){logger[_0x0da2('0x13')](_0x0da2('0x22'),_0x41a55e[_0x0da2('0x14')],_0x45d53d);_0x1c4ea4(_0x54eda5[_0x0da2('0x13')](0x1f4,_0x41a55e['message']));});});};
\ No newline at end of file
+var _0x7582=['map','include','model','GetChatQueue','debug','ShowChatQueue','ChatQueue','find','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','defaults','redis','socket.io-emitter','./chatQueue.socket','request','then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','findAll','options','raw','where','attributes','limit'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x7582,0x167));var _0x2758=function(_0xdeac17,_0x19ad66){_0xdeac17=_0xdeac17-0x0;var _0x33aabd=_0x7582[_0xdeac17];return _0x33aabd;};'use strict';var _=require('lodash');var util=require(_0x2758('0x0'));var moment=require(_0x2758('0x1'));var BPromise=require(_0x2758('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2758('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x2758('0x4'));var logger=require(_0x2758('0x5'))(_0x2758('0x6'));var config=require(_0x2758('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x2758('0x8')][_0x2758('0x9')]({'port':0x232a});config['redis']=_[_0x2758('0xa')](config[_0x2758('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0x2758('0xc'))(new Redis(config[_0x2758('0xb')]));require(_0x2758('0xd'))['register'](socket);function respondWithRpcPromise(_0x39afde,_0x1bb787,_0x5816fe){return new BPromise(function(_0x51fd3c,_0x32cf1a){return client[_0x2758('0xe')](_0x39afde,_0x5816fe)[_0x2758('0xf')](function(_0x27df52){logger[_0x2758('0x10')](_0x2758('0x11'),_0x1bb787,'request\x20sent');logger['debug']('ChatQueue,\x20%s,\x20%s,\x20%s',_0x1bb787,_0x2758('0x12'),JSON[_0x2758('0x13')](_0x27df52));if(_0x27df52[_0x2758('0x14')]){if(_0x27df52[_0x2758('0x14')][_0x2758('0x15')]===0x1f4){logger[_0x2758('0x14')](_0x2758('0x11'),_0x1bb787,_0x27df52[_0x2758('0x14')][_0x2758('0x16')]);return _0x32cf1a(_0x27df52[_0x2758('0x14')][_0x2758('0x16')]);}logger[_0x2758('0x14')](_0x2758('0x11'),_0x1bb787,_0x27df52[_0x2758('0x14')]['message']);return _0x51fd3c(_0x27df52['error']['message']);}else{logger[_0x2758('0x10')](_0x2758('0x11'),_0x1bb787,_0x2758('0x12'));_0x51fd3c(_0x27df52[_0x2758('0x17')][_0x2758('0x16')]);}})[_0x2758('0x18')](function(_0x594575){logger[_0x2758('0x14')](_0x2758('0x11'),_0x1bb787,_0x594575);_0x32cf1a(_0x594575);});});}exports['GetChatQueue']=function(_0x30b3d9){var _0x1cdc63=this;return new Promise(function(_0x8cfe47,_0x4100a0){return db['ChatQueue'][_0x2758('0x19')]({'raw':_0x30b3d9['options']?_0x30b3d9[_0x2758('0x1a')][_0x2758('0x1b')]===undefined?!![]:![]:!![],'where':_0x30b3d9[_0x2758('0x1a')]?_0x30b3d9[_0x2758('0x1a')][_0x2758('0x1c')]||null:null,'attributes':_0x30b3d9[_0x2758('0x1a')]?_0x30b3d9[_0x2758('0x1a')][_0x2758('0x1d')]||null:null,'limit':_0x30b3d9[_0x2758('0x1a')]?_0x30b3d9[_0x2758('0x1a')][_0x2758('0x1e')]||null:null,'include':_0x30b3d9[_0x2758('0x1a')]?_0x30b3d9['options']['include']?_[_0x2758('0x1f')](_0x30b3d9[_0x2758('0x1a')][_0x2758('0x20')],function(_0x2209fc){return{'model':db[_0x2209fc[_0x2758('0x21')]],'as':_0x2209fc['as'],'attributes':_0x2209fc[_0x2758('0x1d')],'include':_0x2209fc['include']?_['map'](_0x2209fc[_0x2758('0x20')],function(_0x28c1f2){return{'model':db[_0x28c1f2[_0x2758('0x21')]],'as':_0x28c1f2['as'],'attributes':_0x28c1f2[_0x2758('0x1d')],'include':_0x28c1f2['include']?_['map'](_0x28c1f2[_0x2758('0x20')],function(_0x230f28){return{'model':db[_0x230f28[_0x2758('0x21')]],'as':_0x230f28['as'],'attributes':_0x230f28['attributes']};}):[]};}):[]};}):[]:[]})[_0x2758('0xf')](function(_0x4b20ee){logger[_0x2758('0x10')](_0x2758('0x22'),_0x30b3d9);logger[_0x2758('0x23')](_0x2758('0x22'),_0x30b3d9,JSON[_0x2758('0x13')](_0x4b20ee));_0x8cfe47(_0x4b20ee);})[_0x2758('0x18')](function(_0x2d44e4){logger[_0x2758('0x14')](_0x2758('0x22'),_0x2d44e4[_0x2758('0x16')],_0x30b3d9);_0x4100a0(_0x1cdc63['error'](0x1f4,_0x2d44e4[_0x2758('0x16')]));});});};exports[_0x2758('0x24')]=function(_0x819909){var _0x2f7f7b=this;return new Promise(function(_0x51b7db,_0x5f105f){return db[_0x2758('0x25')][_0x2758('0x26')]({'raw':_0x819909['options']?_0x819909[_0x2758('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x819909[_0x2758('0x1a')]?_0x819909['options'][_0x2758('0x1c')]||null:null,'attributes':_0x819909[_0x2758('0x1a')]?_0x819909['options'][_0x2758('0x1d')]||null:null,'include':_0x819909[_0x2758('0x1a')]?_0x819909[_0x2758('0x1a')][_0x2758('0x20')]?_[_0x2758('0x1f')](_0x819909[_0x2758('0x1a')][_0x2758('0x20')],function(_0x4453a8){return{'model':db[_0x4453a8['model']],'as':_0x4453a8['as'],'attributes':_0x4453a8[_0x2758('0x1d')],'include':_0x4453a8[_0x2758('0x20')]?_[_0x2758('0x1f')](_0x4453a8[_0x2758('0x20')],function(_0x4030c5){return{'model':db[_0x4030c5[_0x2758('0x21')]],'as':_0x4030c5['as'],'attributes':_0x4030c5[_0x2758('0x1d')],'include':_0x4030c5[_0x2758('0x20')]?_[_0x2758('0x1f')](_0x4030c5['include'],function(_0x4ba64a){return{'model':db[_0x4ba64a[_0x2758('0x21')]],'as':_0x4ba64a['as'],'attributes':_0x4ba64a[_0x2758('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x2758('0xf')](function(_0x2c3aab){logger[_0x2758('0x10')](_0x2758('0x24'),_0x819909);logger['debug'](_0x2758('0x24'),_0x819909,JSON[_0x2758('0x13')](_0x2c3aab));_0x51b7db(_0x2c3aab);})['catch'](function(_0x57908c){logger['error'](_0x2758('0x24'),_0x57908c[_0x2758('0x16')],_0x819909);_0x5f105f(_0x2f7f7b[_0x2758('0x14')](0x1f4,_0x57908c[_0x2758('0x16')]));});});};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.socket.js b/server/api/chatQueue/chatQueue.socket.js
index 44b77d9..e9b0bbe 100644
--- a/server/api/chatQueue/chatQueue.socket.js
+++ b/server/api/chatQueue/chatQueue.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5089=['length','chatQueue:','./chatQueue.events','save','update','emit','register'];(function(_0x2526ed,_0x378c1f){var _0x1c4184=function(_0x15ae9d){while(--_0x15ae9d){_0x2526ed['push'](_0x2526ed['shift']());}};_0x1c4184(++_0x378c1f);}(_0x5089,0x1bb));var _0x9508=function(_0x29a08d,_0x551eca){_0x29a08d=_0x29a08d-0x0;var _0x10fc1a=_0x5089[_0x29a08d];return _0x10fc1a;};'use strict';var ChatQueueEvents=require(_0x9508('0x0'));var events=[_0x9508('0x1'),'remove',_0x9508('0x2')];function createListener(_0x35878a,_0x7dd13d){return function(_0x100d7e){_0x7dd13d[_0x9508('0x3')](_0x35878a,_0x100d7e);};}function removeListener(_0x59d3ee,_0x86540d){return function(){ChatQueueEvents['removeListener'](_0x59d3ee,_0x86540d);};}exports[_0x9508('0x4')]=function(_0x4538dd){for(var _0x257318=0x0,_0x4ab3c6=events[_0x9508('0x5')];_0x257318<_0x4ab3c6;_0x257318++){var _0x42d13a=events[_0x257318];var _0x55a5de=createListener(_0x9508('0x6')+_0x42d13a,_0x4538dd);ChatQueueEvents['on'](_0x42d13a,_0x55a5de);}};
\ No newline at end of file
+var _0x6aa7=['update','emit','length','chatQueue:','./chatQueue.events','remove'];(function(_0x4d216c,_0x363a80){var _0x36fe74=function(_0x460e09){while(--_0x460e09){_0x4d216c['push'](_0x4d216c['shift']());}};_0x36fe74(++_0x363a80);}(_0x6aa7,0x178));var _0x76aa=function(_0x3ad2a0,_0x222027){_0x3ad2a0=_0x3ad2a0-0x0;var _0x5729d8=_0x6aa7[_0x3ad2a0];return _0x5729d8;};'use strict';var ChatQueueEvents=require(_0x76aa('0x0'));var events=['save',_0x76aa('0x1'),_0x76aa('0x2')];function createListener(_0x25c818,_0x2db4fe){return function(_0x4f007e){_0x2db4fe[_0x76aa('0x3')](_0x25c818,_0x4f007e);};}function removeListener(_0xef15ef,_0x1d6e04){return function(){ChatQueueEvents['removeListener'](_0xef15ef,_0x1d6e04);};}exports['register']=function(_0x1aceaa){for(var _0x4d53f6=0x0,_0x32dee5=events[_0x76aa('0x4')];_0x4d53f6<_0x32dee5;_0x4d53f6++){var _0xa9b695=events[_0x4d53f6];var _0x56d6bc=createListener(_0x76aa('0x5')+_0xa9b695,_0x1aceaa);ChatQueueEvents['on'](_0xa9b695,_0x56d6bc);}};
\ No newline at end of file
diff --git a/server/api/chatQueue/index.js b/server/api/chatQueue/index.js
index 6bdbc9b..24e47dd 100644
--- a/server/api/chatQueue/index.js
+++ b/server/api/chatQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x55ca=['post','addAgents','update','delete','destroy','removeTeams','removeAgents','exports','multer','util','Router','fs-extra','../../components/interaction/service','../../config/environment','./chatQueue.controller','get','isAuthenticated','index','describe','/:id','/:id/members','getMembers','/:id/teams','getTeams','/:id/users','addTeams'];(function(_0x4bef2c,_0x24b163){var _0x451c0f=function(_0x60ec06){while(--_0x60ec06){_0x4bef2c['push'](_0x4bef2c['shift']());}};_0x451c0f(++_0x24b163);}(_0x55ca,0x126));var _0xa55c=function(_0x1194d1,_0x71821b){_0x1194d1=_0x1194d1-0x0;var _0x24c777=_0x55ca[_0x1194d1];return _0x24c777;};'use strict';var multer=require(_0xa55c('0x0'));var util=require(_0xa55c('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0xa55c('0x2')]();var fs_extra=require(_0xa55c('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0xa55c('0x4'));var config=require(_0xa55c('0x5'));var controller=require(_0xa55c('0x6'));router[_0xa55c('0x7')]('/',auth[_0xa55c('0x8')](),controller[_0xa55c('0x9')]);router[_0xa55c('0x7')]('/describe',auth[_0xa55c('0x8')](),controller[_0xa55c('0xa')]);router['get'](_0xa55c('0xb'),auth[_0xa55c('0x8')](),controller['show']);router['get'](_0xa55c('0xc'),auth[_0xa55c('0x8')](),controller[_0xa55c('0xd')]);router[_0xa55c('0x7')](_0xa55c('0xe'),auth[_0xa55c('0x8')](),controller[_0xa55c('0xf')]);router[_0xa55c('0x7')](_0xa55c('0x10'),auth[_0xa55c('0x8')](),controller['getAgents']);router['post']('/',auth[_0xa55c('0x8')](),controller['create']);router['post']('/:id/teams',auth[_0xa55c('0x8')](),controller[_0xa55c('0x11')]);router[_0xa55c('0x12')](_0xa55c('0x10'),auth[_0xa55c('0x8')](),controller[_0xa55c('0x13')]);router['put'](_0xa55c('0xb'),auth[_0xa55c('0x8')](),controller[_0xa55c('0x14')]);router[_0xa55c('0x15')](_0xa55c('0xb'),auth[_0xa55c('0x8')](),controller[_0xa55c('0x16')]);router[_0xa55c('0x15')](_0xa55c('0xe'),auth['isAuthenticated'](),controller[_0xa55c('0x17')]);router[_0xa55c('0x15')](_0xa55c('0x10'),auth[_0xa55c('0x8')](),controller[_0xa55c('0x18')]);module[_0xa55c('0x19')]=router;
\ No newline at end of file
+var _0x3e74=['../../config/environment','./chatQueue.controller','get','isAuthenticated','index','/describe','describe','/:id','show','getMembers','/:id/teams','getTeams','getAgents','post','addTeams','addAgents','put','delete','removeTeams','/:id/users','removeAgents','exports','multer','path','connect-timeout','express','../../components/auth/service'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x3e74,0x175));var _0x43e7=function(_0x7cc618,_0x3da493){_0x7cc618=_0x7cc618-0x0;var _0x5b62b2=_0x3e74[_0x7cc618];return _0x5b62b2;};'use strict';var multer=require(_0x43e7('0x0'));var util=require('util');var path=require(_0x43e7('0x1'));var timeout=require(_0x43e7('0x2'));var express=require(_0x43e7('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x43e7('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x43e7('0x5'));var controller=require(_0x43e7('0x6'));router[_0x43e7('0x7')]('/',auth[_0x43e7('0x8')](),controller[_0x43e7('0x9')]);router['get'](_0x43e7('0xa'),auth[_0x43e7('0x8')](),controller[_0x43e7('0xb')]);router[_0x43e7('0x7')](_0x43e7('0xc'),auth['isAuthenticated'](),controller[_0x43e7('0xd')]);router['get']('/:id/members',auth[_0x43e7('0x8')](),controller[_0x43e7('0xe')]);router['get'](_0x43e7('0xf'),auth['isAuthenticated'](),controller[_0x43e7('0x10')]);router[_0x43e7('0x7')]('/:id/users',auth[_0x43e7('0x8')](),controller[_0x43e7('0x11')]);router[_0x43e7('0x12')]('/',auth[_0x43e7('0x8')](),controller['create']);router['post'](_0x43e7('0xf'),auth[_0x43e7('0x8')](),controller[_0x43e7('0x13')]);router['post']('/:id/users',auth[_0x43e7('0x8')](),controller[_0x43e7('0x14')]);router[_0x43e7('0x15')](_0x43e7('0xc'),auth['isAuthenticated'](),controller['update']);router[_0x43e7('0x16')](_0x43e7('0xc'),auth[_0x43e7('0x8')](),controller['destroy']);router['delete'](_0x43e7('0xf'),auth[_0x43e7('0x8')](),controller[_0x43e7('0x17')]);router[_0x43e7('0x16')](_0x43e7('0x18'),auth[_0x43e7('0x8')](),controller[_0x43e7('0x19')]);module[_0x43e7('0x1a')]=router;
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.attributes.js b/server/api/chatQueueReport/chatQueueReport.attributes.js
index 176d363..b4eb8ac 100644
--- a/server/api/chatQueueReport/chatQueueReport.attributes.js
+++ b/server/api/chatQueueReport/chatQueueReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6927=['STRING','DATE','exports'];(function(_0x14748b,_0x439b91){var _0x1c93c2=function(_0x16a00){while(--_0x16a00){_0x14748b['push'](_0x14748b['shift']());}};_0x1c93c2(++_0x439b91);}(_0x6927,0x11c));var _0x7692=function(_0x2fa981,_0xfbf900){_0x2fa981=_0x2fa981-0x0;var _0x331b7b=_0x6927[_0x2fa981];return _0x331b7b;};'use strict';var moment=require('moment');var Sequelize=require('sequelize');module[_0x7692('0x0')]={'uniqueid':{'type':Sequelize[_0x7692('0x1')],'allowNull':![]},'from':{'type':Sequelize[_0x7692('0x1')]},'joinAt':{'type':Sequelize[_0x7692('0x2')]},'leaveAt':{'type':Sequelize[_0x7692('0x2')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize[_0x7692('0x1')]}};
\ No newline at end of file
+var _0xb7a5=['sequelize','exports','STRING','DATE'];(function(_0x3f8743,_0x33973f){var _0x1f844c=function(_0x568841){while(--_0x568841){_0x3f8743['push'](_0x3f8743['shift']());}};_0x1f844c(++_0x33973f);}(_0xb7a5,0x13c));var _0x5b7a=function(_0x4792f8,_0x5dad13){_0x4792f8=_0x4792f8-0x0;var _0x50efe9=_0xb7a5[_0x4792f8];return _0x50efe9;};'use strict';var moment=require('moment');var Sequelize=require(_0x5b7a('0x0'));module[_0x5b7a('0x1')]={'uniqueid':{'type':Sequelize[_0x5b7a('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0x5b7a('0x2')]},'joinAt':{'type':Sequelize[_0x5b7a('0x3')]},'leaveAt':{'type':Sequelize[_0x5b7a('0x3')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x5b7a('0x3')]},'reason':{'type':Sequelize[_0x5b7a('0x2')]}};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.controller.js b/server/api/chatQueueReport/chatQueueReport.controller.js
index 049f617..ee7d012 100644
--- a/server/api/chatQueueReport/chatQueueReport.controller.js
+++ b/server/api/chatQueueReport/chatQueueReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x39e6=['params','keys','find','create','update','body','destroy','describe','eml-format','zip-dir','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','undefined','count','offset','limit','Content-Range','json','apply','reject','save','then','sendStatus','stack','name','send','map','ChatQueueReport','rawAttributes','fieldName','type','query','intersection','model','fields','attributes','length','nolimit','order','sort','where','pick','filters','filter','merge','options','includeAll','include','findAll','catch','show'];(function(_0x2f4345,_0x14c406){var _0x59f2e4=function(_0x4ba093){while(--_0x4ba093){_0x2f4345['push'](_0x2f4345['shift']());}};_0x59f2e4(++_0x14c406);}(_0x39e6,0x9e));var _0x639e=function(_0x3c7f57,_0x570433){_0x3c7f57=_0x3c7f57-0x0;var _0x30ed7b=_0x39e6[_0x3c7f57];return _0x30ed7b;};'use strict';var emlformat=require(_0x639e('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x639e('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x639e('0x2'));var BPromise=require(_0x639e('0x3'));var Mustache=require('mustache');var util=require(_0x639e('0x4'));var path=require(_0x639e('0x5'));var sox=require(_0x639e('0x6'));var csv=require(_0x639e('0x7'));var ejs=require(_0x639e('0x8'));var fs=require('fs');var fs_extra=require(_0x639e('0x9'));var _=require(_0x639e('0xa'));var squel=require(_0x639e('0xb'));var crypto=require(_0x639e('0xc'));var jsforce=require(_0x639e('0xd'));var deskjs=require(_0x639e('0xe'));var toCsv=require(_0x639e('0x7'));var querystring=require(_0x639e('0xf'));var Papa=require(_0x639e('0x10'));var Redis=require(_0x639e('0x11'));var authService=require(_0x639e('0x12'));var qs=require(_0x639e('0x13'));var as=require(_0x639e('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x639e('0x15'));var utils=require(_0x639e('0x16'));var config=require(_0x639e('0x17'));var licenseUtil=require(_0x639e('0x18'));var db=require(_0x639e('0x19'))['db'];function respondWithStatusCode(_0x16117b,_0x30b490){_0x30b490=_0x30b490||0xcc;return function(_0x4f3d38){if(_0x4f3d38){return _0x16117b['sendStatus'](_0x30b490);}return _0x16117b[_0x639e('0x1a')](_0x30b490)[_0x639e('0x1b')]();};}function respondWithResult(_0x89302c,_0x199fb5){_0x199fb5=_0x199fb5||0xc8;return function(_0x37b8e2){if(_0x37b8e2){return _0x89302c[_0x639e('0x1a')](_0x199fb5)['json'](_0x37b8e2);}};}function respondWithFilteredResult(_0x31826a,_0x20bfbb){return function(_0x23f0f9){if(_0x23f0f9){var _0x4077c5=typeof _0x20bfbb['offset']===_0x639e('0x1c')&&typeof _0x20bfbb['limit']===_0x639e('0x1c');var _0x3932a8=_0x23f0f9[_0x639e('0x1d')];var _0x20b76f=_0x4077c5?0x0:_0x20bfbb[_0x639e('0x1e')];var _0x1c023e=_0x4077c5?_0x23f0f9['count']:_0x20bfbb[_0x639e('0x1e')]+_0x20bfbb[_0x639e('0x1f')];var _0x36f71d;if(_0x1c023e>=_0x3932a8){_0x1c023e=_0x3932a8;_0x36f71d=0xc8;}else{_0x36f71d=0xce;}_0x31826a[_0x639e('0x1a')](_0x36f71d);return _0x31826a['set'](_0x639e('0x20'),_0x20b76f+'-'+_0x1c023e+'/'+_0x3932a8)[_0x639e('0x21')](_0x23f0f9);}return null;};}function patchUpdates(_0x44dd33){return function(_0x149472){try{jsonpatch[_0x639e('0x22')](_0x149472,_0x44dd33,!![]);}catch(_0x50de77){return BPromise[_0x639e('0x23')](_0x50de77);}return _0x149472[_0x639e('0x24')]();};}function saveUpdates(_0x4f4421,_0x25ead8){return function(_0x48dce7){if(_0x48dce7){return _0x48dce7['update'](_0x4f4421)[_0x639e('0x25')](function(_0x3813f6){return _0x3813f6;});}return null;};}function removeEntity(_0x3ab673,_0x24e1ad){return function(_0x211fcb){if(_0x211fcb){return _0x211fcb['destroy']()[_0x639e('0x25')](function(){_0x3ab673[_0x639e('0x1a')](0xcc)[_0x639e('0x1b')]();});}};}function handleEntityNotFound(_0x2da264,_0x2df4d1){return function(_0x5f27f6){if(!_0x5f27f6){_0x2da264[_0x639e('0x26')](0x194);}return _0x5f27f6;};}function handleError(_0x97665a,_0x3a4fe3){_0x3a4fe3=_0x3a4fe3||0x1f4;return function(_0x10abb0){logger['error'](_0x10abb0[_0x639e('0x27')]);if(_0x10abb0[_0x639e('0x28')]){delete _0x10abb0[_0x639e('0x28')];}_0x97665a['status'](_0x3a4fe3)[_0x639e('0x29')](_0x10abb0);};}exports['index']=function(_0x38ce3a,_0x4da5f4){var _0x525a1f={},_0x2c8e3a={},_0x2a3f56={'count':0x0,'rows':[]};var _0x3f7b0f=_[_0x639e('0x2a')](db[_0x639e('0x2b')][_0x639e('0x2c')],function(_0x5797da){return{'name':_0x5797da[_0x639e('0x2d')],'type':_0x5797da[_0x639e('0x2e')]['key']};});_0x2c8e3a['model']=_[_0x639e('0x2a')](_0x3f7b0f,_0x639e('0x28'));_0x2c8e3a[_0x639e('0x2f')]=_['keys'](_0x38ce3a[_0x639e('0x2f')]);_0x2c8e3a['filters']=_[_0x639e('0x30')](_0x2c8e3a[_0x639e('0x31')],_0x2c8e3a[_0x639e('0x2f')]);_0x525a1f['attributes']=_[_0x639e('0x30')](_0x2c8e3a['model'],qs[_0x639e('0x32')](_0x38ce3a[_0x639e('0x2f')][_0x639e('0x32')]));_0x525a1f['attributes']=_0x525a1f[_0x639e('0x33')][_0x639e('0x34')]?_0x525a1f[_0x639e('0x33')]:_0x2c8e3a['model'];if(!_0x38ce3a[_0x639e('0x2f')]['hasOwnProperty'](_0x639e('0x35'))){_0x525a1f[_0x639e('0x1f')]=qs[_0x639e('0x1f')](_0x38ce3a[_0x639e('0x2f')][_0x639e('0x1f')]);_0x525a1f['offset']=qs[_0x639e('0x1e')](_0x38ce3a[_0x639e('0x2f')][_0x639e('0x1e')]);}_0x525a1f[_0x639e('0x36')]=qs['sort'](_0x38ce3a[_0x639e('0x2f')][_0x639e('0x37')]);_0x525a1f[_0x639e('0x38')]=qs['filters'](_[_0x639e('0x39')](_0x38ce3a['query'],_0x2c8e3a[_0x639e('0x3a')]),_0x3f7b0f);if(_0x38ce3a[_0x639e('0x2f')][_0x639e('0x3b')]){_0x525a1f[_0x639e('0x38')]=_[_0x639e('0x3c')](_0x525a1f[_0x639e('0x38')],{'$or':_['map'](_0x3f7b0f,function(_0xebceb5){if(_0xebceb5[_0x639e('0x2e')]!=='VIRTUAL'){var _0x26e637={};_0x26e637[_0xebceb5['name']]={'$like':'%'+_0x38ce3a[_0x639e('0x2f')][_0x639e('0x3b')]+'%'};return _0x26e637;}})});}_0x525a1f=_[_0x639e('0x3c')]({},_0x525a1f,_0x38ce3a[_0x639e('0x3d')]);var _0x35878c={'where':_0x525a1f[_0x639e('0x38')]};return db[_0x639e('0x2b')][_0x639e('0x1d')](_0x35878c)['then'](function(_0x485359){_0x2a3f56['count']=_0x485359;if(_0x38ce3a['query'][_0x639e('0x3e')]){_0x525a1f[_0x639e('0x3f')]=[{'all':!![]}];}return db['ChatQueueReport'][_0x639e('0x40')](_0x525a1f);})[_0x639e('0x25')](function(_0x16a792){_0x2a3f56['rows']=_0x16a792;return _0x2a3f56;})[_0x639e('0x25')](respondWithFilteredResult(_0x4da5f4,_0x525a1f))[_0x639e('0x41')](handleError(_0x4da5f4,null));};exports[_0x639e('0x42')]=function(_0x3c7d42,_0xb9ef6c){var _0x1bede6={'raw':!![],'where':{'id':_0x3c7d42[_0x639e('0x43')]['id']}},_0x21b62d={};_0x21b62d[_0x639e('0x31')]=_['keys'](db[_0x639e('0x2b')][_0x639e('0x2c')]);_0x21b62d[_0x639e('0x2f')]=_[_0x639e('0x44')](_0x3c7d42[_0x639e('0x2f')]);_0x21b62d[_0x639e('0x3a')]=_['intersection'](_0x21b62d[_0x639e('0x31')],_0x21b62d[_0x639e('0x2f')]);_0x1bede6[_0x639e('0x33')]=_[_0x639e('0x30')](_0x21b62d[_0x639e('0x31')],qs[_0x639e('0x32')](_0x3c7d42[_0x639e('0x2f')][_0x639e('0x32')]));_0x1bede6[_0x639e('0x33')]=_0x1bede6[_0x639e('0x33')][_0x639e('0x34')]?_0x1bede6[_0x639e('0x33')]:_0x21b62d['model'];if(_0x3c7d42[_0x639e('0x2f')]['includeAll']){_0x1bede6['include']=[{'all':!![]}];}_0x1bede6=_[_0x639e('0x3c')]({},_0x1bede6,_0x3c7d42[_0x639e('0x3d')]);return db[_0x639e('0x2b')][_0x639e('0x45')](_0x1bede6)[_0x639e('0x25')](handleEntityNotFound(_0xb9ef6c,null))['then'](respondWithResult(_0xb9ef6c,null))[_0x639e('0x41')](handleError(_0xb9ef6c,null));};exports[_0x639e('0x46')]=function(_0x56ecea,_0x32000e){return db[_0x639e('0x2b')][_0x639e('0x46')](_0x56ecea['body'],{})[_0x639e('0x25')](respondWithResult(_0x32000e,0xc9))[_0x639e('0x41')](handleError(_0x32000e,null));};exports[_0x639e('0x47')]=function(_0x39c352,_0x4d0d3b){if(_0x39c352[_0x639e('0x48')]['id']){delete _0x39c352['body']['id'];}return db[_0x639e('0x2b')]['find']({'where':{'id':_0x39c352[_0x639e('0x43')]['id']}})[_0x639e('0x25')](handleEntityNotFound(_0x4d0d3b,null))[_0x639e('0x25')](saveUpdates(_0x39c352[_0x639e('0x48')],null))[_0x639e('0x25')](respondWithResult(_0x4d0d3b,null))['catch'](handleError(_0x4d0d3b,null));};exports[_0x639e('0x49')]=function(_0x1d3ace,_0x20a122){return db['ChatQueueReport'][_0x639e('0x45')]({'where':{'id':_0x1d3ace[_0x639e('0x43')]['id']}})[_0x639e('0x25')](handleEntityNotFound(_0x20a122,null))[_0x639e('0x25')](removeEntity(_0x20a122,null))['catch'](handleError(_0x20a122,null));};exports[_0x639e('0x4a')]=function(_0x5915ed,_0x9f62aa){return db[_0x639e('0x2b')][_0x639e('0x4a')]()[_0x639e('0x25')](respondWithResult(_0x9f62aa,null))['catch'](handleError(_0x9f62aa,null));};
\ No newline at end of file
+var _0x0958=['../../config/license/util','sendStatus','status','end','offset','limit','undefined','count','set','json','save','update','then','destroy','error','stack','name','send','index','ChatQueueReport','rawAttributes','fieldName','type','key','model','keys','filters','intersection','query','attributes','fields','length','nolimit','order','sort','where','filter','merge','map','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','create','body','find','params','describe','eml-format','rimraf','zip-dir','request-promise','moment','util','path','ejs','fs-extra','lodash','squel','crypto','to-csv','querystring','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils'];(function(_0x3220a2,_0x16f7b2){var _0x2307ce=function(_0x1e087d){while(--_0x1e087d){_0x3220a2['push'](_0x3220a2['shift']());}};_0x2307ce(++_0x16f7b2);}(_0x0958,0x7c));var _0x8095=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x0958[_0x122ef9];return _0x42fba0;};'use strict';var emlformat=require(_0x8095('0x0'));var rimraf=require(_0x8095('0x1'));var zipdir=require(_0x8095('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x8095('0x3'));var moment=require(_0x8095('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x8095('0x5'));var path=require(_0x8095('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x8095('0x7'));var fs=require('fs');var fs_extra=require(_0x8095('0x8'));var _=require(_0x8095('0x9'));var squel=require(_0x8095('0xa'));var crypto=require(_0x8095('0xb'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x8095('0xc'));var querystring=require(_0x8095('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x8095('0xe'));var qs=require('../../components/parsers/qs');var as=require(_0x8095('0xf'));var hardwareService=require(_0x8095('0x10'));var logger=require(_0x8095('0x11'))(_0x8095('0x12'));var utils=require(_0x8095('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0x8095('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2acacf,_0x4cf53f){_0x4cf53f=_0x4cf53f||0xcc;return function(_0x31803a){if(_0x31803a){return _0x2acacf[_0x8095('0x15')](_0x4cf53f);}return _0x2acacf[_0x8095('0x16')](_0x4cf53f)[_0x8095('0x17')]();};}function respondWithResult(_0x5cfc5f,_0x8f6b26){_0x8f6b26=_0x8f6b26||0xc8;return function(_0x2f75a4){if(_0x2f75a4){return _0x5cfc5f[_0x8095('0x16')](_0x8f6b26)['json'](_0x2f75a4);}};}function respondWithFilteredResult(_0x5c1299,_0x3f446f){return function(_0x42a59a){if(_0x42a59a){var _0xb7c487=typeof _0x3f446f[_0x8095('0x18')]==='undefined'&&typeof _0x3f446f[_0x8095('0x19')]===_0x8095('0x1a');var _0x4a1d27=_0x42a59a['count'];var _0x13ff41=_0xb7c487?0x0:_0x3f446f['offset'];var _0x3e4fde=_0xb7c487?_0x42a59a[_0x8095('0x1b')]:_0x3f446f[_0x8095('0x18')]+_0x3f446f['limit'];var _0x2e5b38;if(_0x3e4fde>=_0x4a1d27){_0x3e4fde=_0x4a1d27;_0x2e5b38=0xc8;}else{_0x2e5b38=0xce;}_0x5c1299[_0x8095('0x16')](_0x2e5b38);return _0x5c1299[_0x8095('0x1c')]('Content-Range',_0x13ff41+'-'+_0x3e4fde+'/'+_0x4a1d27)[_0x8095('0x1d')](_0x42a59a);}return null;};}function patchUpdates(_0x104cc4){return function(_0xb0a513){try{jsonpatch['apply'](_0xb0a513,_0x104cc4,!![]);}catch(_0x176ba9){return BPromise['reject'](_0x176ba9);}return _0xb0a513[_0x8095('0x1e')]();};}function saveUpdates(_0x3f4b29,_0x421792){return function(_0x1c97c4){if(_0x1c97c4){return _0x1c97c4[_0x8095('0x1f')](_0x3f4b29)[_0x8095('0x20')](function(_0x2a7bb6){return _0x2a7bb6;});}return null;};}function removeEntity(_0x138b65,_0x23ece3){return function(_0x441fbf){if(_0x441fbf){return _0x441fbf[_0x8095('0x21')]()[_0x8095('0x20')](function(){_0x138b65[_0x8095('0x16')](0xcc)[_0x8095('0x17')]();});}};}function handleEntityNotFound(_0x5896f4,_0x499138){return function(_0x1b2939){if(!_0x1b2939){_0x5896f4[_0x8095('0x15')](0x194);}return _0x1b2939;};}function handleError(_0x2552b9,_0x39cde9){_0x39cde9=_0x39cde9||0x1f4;return function(_0x3bf5ce){logger[_0x8095('0x22')](_0x3bf5ce[_0x8095('0x23')]);if(_0x3bf5ce[_0x8095('0x24')]){delete _0x3bf5ce[_0x8095('0x24')];}_0x2552b9[_0x8095('0x16')](_0x39cde9)[_0x8095('0x25')](_0x3bf5ce);};}exports[_0x8095('0x26')]=function(_0x223ade,_0x38d932){var _0xd4ff7d={},_0x22fc6c={},_0x38d69e={'count':0x0,'rows':[]};var _0x575801=_['map'](db[_0x8095('0x27')][_0x8095('0x28')],function(_0x45843c){return{'name':_0x45843c[_0x8095('0x29')],'type':_0x45843c[_0x8095('0x2a')][_0x8095('0x2b')]};});_0x22fc6c[_0x8095('0x2c')]=_['map'](_0x575801,'name');_0x22fc6c['query']=_[_0x8095('0x2d')](_0x223ade['query']);_0x22fc6c[_0x8095('0x2e')]=_[_0x8095('0x2f')](_0x22fc6c[_0x8095('0x2c')],_0x22fc6c[_0x8095('0x30')]);_0xd4ff7d[_0x8095('0x31')]=_['intersection'](_0x22fc6c['model'],qs['fields'](_0x223ade[_0x8095('0x30')][_0x8095('0x32')]));_0xd4ff7d[_0x8095('0x31')]=_0xd4ff7d[_0x8095('0x31')][_0x8095('0x33')]?_0xd4ff7d['attributes']:_0x22fc6c[_0x8095('0x2c')];if(!_0x223ade[_0x8095('0x30')]['hasOwnProperty'](_0x8095('0x34'))){_0xd4ff7d[_0x8095('0x19')]=qs['limit'](_0x223ade[_0x8095('0x30')][_0x8095('0x19')]);_0xd4ff7d[_0x8095('0x18')]=qs[_0x8095('0x18')](_0x223ade['query'][_0x8095('0x18')]);}_0xd4ff7d[_0x8095('0x35')]=qs[_0x8095('0x36')](_0x223ade[_0x8095('0x30')][_0x8095('0x36')]);_0xd4ff7d[_0x8095('0x37')]=qs[_0x8095('0x2e')](_['pick'](_0x223ade[_0x8095('0x30')],_0x22fc6c[_0x8095('0x2e')]),_0x575801);if(_0x223ade['query'][_0x8095('0x38')]){_0xd4ff7d[_0x8095('0x37')]=_[_0x8095('0x39')](_0xd4ff7d['where'],{'$or':_[_0x8095('0x3a')](_0x575801,function(_0x44ef7d){if(_0x44ef7d['type']!==_0x8095('0x3b')){var _0x1b12fe={};_0x1b12fe[_0x44ef7d[_0x8095('0x24')]]={'$like':'%'+_0x223ade[_0x8095('0x30')]['filter']+'%'};return _0x1b12fe;}})});}_0xd4ff7d=_[_0x8095('0x39')]({},_0xd4ff7d,_0x223ade[_0x8095('0x3c')]);var _0x42827b={'where':_0xd4ff7d[_0x8095('0x37')]};return db[_0x8095('0x27')][_0x8095('0x1b')](_0x42827b)[_0x8095('0x20')](function(_0x482427){_0x38d69e[_0x8095('0x1b')]=_0x482427;if(_0x223ade[_0x8095('0x30')][_0x8095('0x3d')]){_0xd4ff7d[_0x8095('0x3e')]=[{'all':!![]}];}return db['ChatQueueReport'][_0x8095('0x3f')](_0xd4ff7d);})[_0x8095('0x20')](function(_0x5484d5){_0x38d69e[_0x8095('0x40')]=_0x5484d5;return _0x38d69e;})['then'](respondWithFilteredResult(_0x38d932,_0xd4ff7d))[_0x8095('0x41')](handleError(_0x38d932,null));};exports[_0x8095('0x42')]=function(_0x306fb4,_0x594309){var _0x15bcde={'raw':!![],'where':{'id':_0x306fb4['params']['id']}},_0x488e2e={};_0x488e2e['model']=_[_0x8095('0x2d')](db[_0x8095('0x27')][_0x8095('0x28')]);_0x488e2e[_0x8095('0x30')]=_[_0x8095('0x2d')](_0x306fb4[_0x8095('0x30')]);_0x488e2e[_0x8095('0x2e')]=_[_0x8095('0x2f')](_0x488e2e[_0x8095('0x2c')],_0x488e2e[_0x8095('0x30')]);_0x15bcde[_0x8095('0x31')]=_[_0x8095('0x2f')](_0x488e2e[_0x8095('0x2c')],qs['fields'](_0x306fb4[_0x8095('0x30')][_0x8095('0x32')]));_0x15bcde['attributes']=_0x15bcde[_0x8095('0x31')]['length']?_0x15bcde[_0x8095('0x31')]:_0x488e2e[_0x8095('0x2c')];if(_0x306fb4[_0x8095('0x30')][_0x8095('0x3d')]){_0x15bcde[_0x8095('0x3e')]=[{'all':!![]}];}_0x15bcde=_[_0x8095('0x39')]({},_0x15bcde,_0x306fb4[_0x8095('0x3c')]);return db[_0x8095('0x27')]['find'](_0x15bcde)[_0x8095('0x20')](handleEntityNotFound(_0x594309,null))[_0x8095('0x20')](respondWithResult(_0x594309,null))[_0x8095('0x41')](handleError(_0x594309,null));};exports[_0x8095('0x43')]=function(_0xa78ed7,_0x14fd11){return db[_0x8095('0x27')][_0x8095('0x43')](_0xa78ed7[_0x8095('0x44')],{})[_0x8095('0x20')](respondWithResult(_0x14fd11,0xc9))[_0x8095('0x41')](handleError(_0x14fd11,null));};exports[_0x8095('0x1f')]=function(_0x5961c8,_0x2209b6){if(_0x5961c8['body']['id']){delete _0x5961c8['body']['id'];}return db[_0x8095('0x27')][_0x8095('0x45')]({'where':{'id':_0x5961c8['params']['id']}})['then'](handleEntityNotFound(_0x2209b6,null))[_0x8095('0x20')](saveUpdates(_0x5961c8[_0x8095('0x44')],null))['then'](respondWithResult(_0x2209b6,null))[_0x8095('0x41')](handleError(_0x2209b6,null));};exports[_0x8095('0x21')]=function(_0x1bef5e,_0x1aa669){return db[_0x8095('0x27')][_0x8095('0x45')]({'where':{'id':_0x1bef5e[_0x8095('0x46')]['id']}})['then'](handleEntityNotFound(_0x1aa669,null))['then'](removeEntity(_0x1aa669,null))[_0x8095('0x41')](handleError(_0x1aa669,null));};exports['describe']=function(_0x4782d8,_0x49246c){return db[_0x8095('0x27')][_0x8095('0x47')]()['then'](respondWithResult(_0x49246c,null))[_0x8095('0x41')](handleError(_0x49246c,null));};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.model.js b/server/api/chatQueueReport/chatQueueReport.model.js
index 1aa8e69..0b85c85 100644
--- a/server/api/chatQueueReport/chatQueueReport.model.js
+++ b/server/api/chatQueueReport/chatQueueReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb7e7=['../../config/logger','moment','request-promise','rimraf','../../config/environment','./chatQueueReport.attributes','define','ChatQueueReport','uniqueid','lodash'];(function(_0xfb8251,_0x22867e){var _0x2fcd5f=function(_0x2d47c0){while(--_0x2d47c0){_0xfb8251['push'](_0xfb8251['shift']());}};_0x2fcd5f(++_0x22867e);}(_0xb7e7,0x121));var _0x7b7e=function(_0x1fc122,_0x5e2c17){_0x1fc122=_0x1fc122-0x0;var _0xa2cb13=_0xb7e7[_0x1fc122];return _0xa2cb13;};'use strict';var _=require(_0x7b7e('0x0'));var util=require('util');var logger=require(_0x7b7e('0x1'))('api');var moment=require(_0x7b7e('0x2'));var BPromise=require('bluebird');var rp=require(_0x7b7e('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x7b7e('0x4'));var config=require(_0x7b7e('0x5'));var attributes=require(_0x7b7e('0x6'));module['exports']=function(_0x53ed64,_0x333fa4){return _0x53ed64[_0x7b7e('0x7')](_0x7b7e('0x8'),attributes,{'tableName':'report_chat_queue','paranoid':![],'indexes':[{'name':_0x7b7e('0x9'),'fields':[_0x7b7e('0x9')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xbaf0=['define','ChatQueueReport','report_chat_queue','uniqueid','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./chatQueueReport.attributes','exports'];(function(_0x14df1a,_0x5b627d){var _0x5a7379=function(_0x30ba7b){while(--_0x30ba7b){_0x14df1a['push'](_0x14df1a['shift']());}};_0x5a7379(++_0x5b627d);}(_0xbaf0,0x12a));var _0x0baf=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xbaf0[_0xa464c9];return _0x3d73c4;};'use strict';var _=require('lodash');var util=require(_0x0baf('0x0'));var logger=require(_0x0baf('0x1'))(_0x0baf('0x2'));var moment=require(_0x0baf('0x3'));var BPromise=require(_0x0baf('0x4'));var rp=require(_0x0baf('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x0baf('0x6'));var config=require(_0x0baf('0x7'));var attributes=require(_0x0baf('0x8'));module[_0x0baf('0x9')]=function(_0xe4c3c4,_0x335e24){return _0xe4c3c4[_0x0baf('0xa')](_0x0baf('0xb'),attributes,{'tableName':_0x0baf('0xc'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0x0baf('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.rpc.js b/server/api/chatQueueReport/chatQueueReport.rpc.js
index f183033..8edb67d 100644
--- a/server/api/chatQueueReport/chatQueueReport.rpc.js
+++ b/server/api/chatQueueReport/chatQueueReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb240=['../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request\x20sent','debug','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatQueueReport,\x20%s,\x20%s','message','info','catch','CreateChatQueueReport','ChatQueueReport','options','raw','update','where','attributes','limit','then','UpdateChatQueueReport','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x2f5ac5,_0x1ee939){var _0x37c9a8=function(_0x15031f){while(--_0x15031f){_0x2f5ac5['push'](_0x2f5ac5['shift']());}};_0x37c9a8(++_0x1ee939);}(_0xb240,0x7e));var _0x0b24=function(_0x24bdc3,_0x4e7ce7){_0x24bdc3=_0x24bdc3-0x0;var _0xc43c1a=_0xb240[_0x24bdc3];return _0xc43c1a;};'use strict';var _=require(_0x0b24('0x0'));var util=require(_0x0b24('0x1'));var moment=require(_0x0b24('0x2'));var BPromise=require(_0x0b24('0x3'));var rs=require(_0x0b24('0x4'));var fs=require('fs');var Redis=require(_0x0b24('0x5'));var db=require(_0x0b24('0x6'))['db'];var utils=require(_0x0b24('0x7'));var logger=require(_0x0b24('0x8'))('rpc');var config=require(_0x0b24('0x9'));var jayson=require(_0x0b24('0xa'));var client=jayson[_0x0b24('0xb')][_0x0b24('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x162a50,_0x53526b,_0x238a19){return new BPromise(function(_0x34be24,_0x41b7b9){return client['request'](_0x162a50,_0x238a19)['then'](function(_0x2679d5){logger['info']('ChatQueueReport,\x20%s,\x20%s',_0x53526b,_0x0b24('0xd'));logger[_0x0b24('0xe')](_0x0b24('0xf'),_0x53526b,_0x0b24('0xd'),JSON[_0x0b24('0x10')](_0x2679d5));if(_0x2679d5[_0x0b24('0x11')]){if(_0x2679d5[_0x0b24('0x11')][_0x0b24('0x12')]===0x1f4){logger['error'](_0x0b24('0x13'),_0x53526b,_0x2679d5[_0x0b24('0x11')]['message']);return _0x41b7b9(_0x2679d5[_0x0b24('0x11')][_0x0b24('0x14')]);}logger[_0x0b24('0x11')](_0x0b24('0x13'),_0x53526b,_0x2679d5['error']['message']);return _0x34be24(_0x2679d5['error']['message']);}else{logger[_0x0b24('0x15')](_0x0b24('0x13'),_0x53526b,_0x0b24('0xd'));_0x34be24(_0x2679d5['result'][_0x0b24('0x14')]);}})[_0x0b24('0x16')](function(_0x1fd966){logger[_0x0b24('0x11')](_0x0b24('0x13'),_0x53526b,_0x1fd966);_0x41b7b9(_0x1fd966);});});}exports[_0x0b24('0x17')]=function(_0x5518a5){var _0x377fd5=this;return new Promise(function(_0x1d619f,_0x4a1218){return db[_0x0b24('0x18')]['create'](_0x5518a5['body'],{'raw':_0x5518a5[_0x0b24('0x19')]?_0x5518a5[_0x0b24('0x19')][_0x0b24('0x1a')]===undefined?!![]:![]:!![]})['then'](function(_0x2fec2b){logger[_0x0b24('0x15')]('CreateChatQueueReport',_0x5518a5);logger[_0x0b24('0xe')](_0x0b24('0x17'),_0x5518a5,JSON[_0x0b24('0x10')](_0x2fec2b));_0x1d619f(_0x2fec2b);})[_0x0b24('0x16')](function(_0x46124d){logger[_0x0b24('0x11')](_0x0b24('0x17'),_0x46124d[_0x0b24('0x14')],_0x5518a5);_0x4a1218(_0x377fd5[_0x0b24('0x11')](0x1f4,_0x46124d['message']));});});};exports['UpdateChatQueueReport']=function(_0x1f88cf){var _0x3f92ac=this;return new Promise(function(_0x15c95d,_0xc93a22){return db['ChatQueueReport'][_0x0b24('0x1b')](_0x1f88cf['body'],{'raw':_0x1f88cf[_0x0b24('0x19')]?_0x1f88cf[_0x0b24('0x19')][_0x0b24('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1f88cf[_0x0b24('0x19')]?_0x1f88cf[_0x0b24('0x19')][_0x0b24('0x1c')]||null:null,'attributes':_0x1f88cf[_0x0b24('0x19')]?_0x1f88cf[_0x0b24('0x19')][_0x0b24('0x1d')]||null:null,'limit':_0x1f88cf[_0x0b24('0x19')]?_0x1f88cf[_0x0b24('0x19')][_0x0b24('0x1e')]||null:null})[_0x0b24('0x1f')](function(_0x408511){logger[_0x0b24('0x15')](_0x0b24('0x20'),_0x1f88cf);logger[_0x0b24('0xe')](_0x0b24('0x20'),_0x1f88cf,JSON[_0x0b24('0x10')](_0x408511));_0x15c95d(_0x408511);})[_0x0b24('0x16')](function(_0x4a5b53){logger[_0x0b24('0x11')]('UpdateChatQueueReport',_0x4a5b53[_0x0b24('0x14')],_0x1f88cf);_0xc93a22(_0x3f92ac[_0x0b24('0x11')](0x1f4,_0x4a5b53['message']));});});};
\ No newline at end of file
+var _0x017c=['ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','ChatQueueReport,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','CreateChatQueueReport','ChatQueueReport','create','body','options','debug','UpdateChatQueueReport','where','attributes','limit','lodash','util','moment','bluebird'];(function(_0x150d8a,_0x3123cc){var _0xf67128=function(_0x242fb9){while(--_0x242fb9){_0x150d8a['push'](_0x150d8a['shift']());}};_0xf67128(++_0x3123cc);}(_0x017c,0xb6));var _0xc017=function(_0x43a1b8,_0x1c90c8){_0x43a1b8=_0x43a1b8-0x0;var _0x324ecc=_0x017c[_0x43a1b8];return _0x324ecc;};'use strict';var _=require(_0xc017('0x0'));var util=require(_0xc017('0x1'));var moment=require(_0xc017('0x2'));var BPromise=require(_0xc017('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc017('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xc017('0x5'));var logger=require(_0xc017('0x6'))(_0xc017('0x7'));var config=require(_0xc017('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xc017('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x17930e,_0x205f9f,_0x57d0d9){return new BPromise(function(_0x141177,_0x71792){return client[_0xc017('0xa')](_0x17930e,_0x57d0d9)[_0xc017('0xb')](function(_0x2feedf){logger['info'](_0xc017('0xc'),_0x205f9f,'request\x20sent');logger['debug']('ChatQueueReport,\x20%s,\x20%s,\x20%s',_0x205f9f,_0xc017('0xd'),JSON[_0xc017('0xe')](_0x2feedf));if(_0x2feedf[_0xc017('0xf')]){if(_0x2feedf[_0xc017('0xf')][_0xc017('0x10')]===0x1f4){logger['error']('ChatQueueReport,\x20%s,\x20%s',_0x205f9f,_0x2feedf[_0xc017('0xf')][_0xc017('0x11')]);return _0x71792(_0x2feedf[_0xc017('0xf')][_0xc017('0x11')]);}logger['error'](_0xc017('0xc'),_0x205f9f,_0x2feedf[_0xc017('0xf')][_0xc017('0x11')]);return _0x141177(_0x2feedf['error']['message']);}else{logger[_0xc017('0x12')]('ChatQueueReport,\x20%s,\x20%s',_0x205f9f,_0xc017('0xd'));_0x141177(_0x2feedf[_0xc017('0x13')][_0xc017('0x11')]);}})[_0xc017('0x14')](function(_0x1e10c3){logger[_0xc017('0xf')](_0xc017('0xc'),_0x205f9f,_0x1e10c3);_0x71792(_0x1e10c3);});});}exports[_0xc017('0x15')]=function(_0x48bf8e){var _0x2febe1=this;return new Promise(function(_0x1c622a,_0x4943d5){return db[_0xc017('0x16')][_0xc017('0x17')](_0x48bf8e[_0xc017('0x18')],{'raw':_0x48bf8e[_0xc017('0x19')]?_0x48bf8e['options']['raw']===undefined?!![]:![]:!![]})[_0xc017('0xb')](function(_0xfdc7d3){logger[_0xc017('0x12')](_0xc017('0x15'),_0x48bf8e);logger[_0xc017('0x1a')](_0xc017('0x15'),_0x48bf8e,JSON['stringify'](_0xfdc7d3));_0x1c622a(_0xfdc7d3);})['catch'](function(_0x3dbe06){logger[_0xc017('0xf')](_0xc017('0x15'),_0x3dbe06[_0xc017('0x11')],_0x48bf8e);_0x4943d5(_0x2febe1[_0xc017('0xf')](0x1f4,_0x3dbe06['message']));});});};exports[_0xc017('0x1b')]=function(_0xf6c2cd){var _0x2df6ea=this;return new Promise(function(_0x1aae47,_0xd8d956){return db[_0xc017('0x16')]['update'](_0xf6c2cd[_0xc017('0x18')],{'raw':_0xf6c2cd[_0xc017('0x19')]?_0xf6c2cd['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xf6c2cd[_0xc017('0x19')]?_0xf6c2cd['options'][_0xc017('0x1c')]||null:null,'attributes':_0xf6c2cd[_0xc017('0x19')]?_0xf6c2cd[_0xc017('0x19')][_0xc017('0x1d')]||null:null,'limit':_0xf6c2cd[_0xc017('0x19')]?_0xf6c2cd['options'][_0xc017('0x1e')]||null:null})[_0xc017('0xb')](function(_0x5e164e){logger[_0xc017('0x12')](_0xc017('0x1b'),_0xf6c2cd);logger[_0xc017('0x1a')](_0xc017('0x1b'),_0xf6c2cd,JSON['stringify'](_0x5e164e));_0x1aae47(_0x5e164e);})[_0xc017('0x14')](function(_0x342f28){logger['error'](_0xc017('0x1b'),_0x342f28[_0xc017('0x11')],_0xf6c2cd);_0xd8d956(_0x2df6ea['error'](0x1f4,_0x342f28[_0xc017('0x11')]));});});};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/index.js b/server/api/chatQueueReport/index.js
index 51e6624..2b047f9 100644
--- a/server/api/chatQueueReport/index.js
+++ b/server/api/chatQueueReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8fd5=['/:id','post','create','put','update','destroy','exports','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./chatQueueReport.controller','get','isAuthenticated','index','/describe'];(function(_0x24380a,_0x139674){var _0x514298=function(_0x5939c6){while(--_0x5939c6){_0x24380a['push'](_0x24380a['shift']());}};_0x514298(++_0x139674);}(_0x8fd5,0x1e2));var _0x58fd=function(_0x3e4f74,_0x26ce71){_0x3e4f74=_0x3e4f74-0x0;var _0xd07d99=_0x8fd5[_0x3e4f74];return _0xd07d99;};'use strict';var multer=require('multer');var util=require(_0x58fd('0x0'));var path=require(_0x58fd('0x1'));var timeout=require(_0x58fd('0x2'));var express=require(_0x58fd('0x3'));var router=express[_0x58fd('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x58fd('0x5'));var config=require(_0x58fd('0x6'));var controller=require(_0x58fd('0x7'));router[_0x58fd('0x8')]('/',auth[_0x58fd('0x9')](),controller[_0x58fd('0xa')]);router[_0x58fd('0x8')](_0x58fd('0xb'),auth[_0x58fd('0x9')](),controller['describe']);router['get'](_0x58fd('0xc'),auth[_0x58fd('0x9')](),controller['show']);router[_0x58fd('0xd')]('/',auth[_0x58fd('0x9')](),controller[_0x58fd('0xe')]);router[_0x58fd('0xf')](_0x58fd('0xc'),auth['isAuthenticated'](),controller[_0x58fd('0x10')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x58fd('0x11')]);module[_0x58fd('0x12')]=router;
\ No newline at end of file
+var _0x710a=['describe','/:id','post','create','update','destroy','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatQueueReport.controller','isAuthenticated','index','get','/describe'];(function(_0x1a37b2,_0x584b3b){var _0x130c75=function(_0x268407){while(--_0x268407){_0x1a37b2['push'](_0x1a37b2['shift']());}};_0x130c75(++_0x584b3b);}(_0x710a,0xb1));var _0xa710=function(_0x20eb36,_0x41efeb){_0x20eb36=_0x20eb36-0x0;var _0x6abe87=_0x710a[_0x20eb36];return _0x6abe87;};'use strict';var multer=require(_0xa710('0x0'));var util=require(_0xa710('0x1'));var path=require('path');var timeout=require(_0xa710('0x2'));var express=require(_0xa710('0x3'));var router=express[_0xa710('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xa710('0x5'));var interaction=require(_0xa710('0x6'));var config=require(_0xa710('0x7'));var controller=require(_0xa710('0x8'));router['get']('/',auth[_0xa710('0x9')](),controller[_0xa710('0xa')]);router[_0xa710('0xb')](_0xa710('0xc'),auth['isAuthenticated'](),controller[_0xa710('0xd')]);router[_0xa710('0xb')](_0xa710('0xe'),auth[_0xa710('0x9')](),controller['show']);router[_0xa710('0xf')]('/',auth['isAuthenticated'](),controller[_0xa710('0x10')]);router['put'](_0xa710('0xe'),auth[_0xa710('0x9')](),controller[_0xa710('0x11')]);router['delete'](_0xa710('0xe'),auth[_0xa710('0x9')](),controller[_0xa710('0x12')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.attributes.js b/server/api/chatTransferReport/chatTransferReport.attributes.js
index 61314c2..b70dac7 100644
--- a/server/api/chatTransferReport/chatTransferReport.attributes.js
+++ b/server/api/chatTransferReport/chatTransferReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf3cd=['exports','STRING','ENUM','account','queue','DATE','moment','sequelize'];(function(_0x52abb5,_0x7d9937){var _0x1f307c=function(_0x107b7b){while(--_0x107b7b){_0x52abb5['push'](_0x52abb5['shift']());}};_0x1f307c(++_0x7d9937);}(_0xf3cd,0xfe));var _0xdf3c=function(_0x352713,_0x737610){_0x352713=_0x352713-0x0;var _0x46a4ea=_0xf3cd[_0x352713];return _0x46a4ea;};'use strict';var moment=require(_0xdf3c('0x0'));var Sequelize=require(_0xdf3c('0x1'));module[_0xdf3c('0x2')]={'uniqueid':{'type':Sequelize[_0xdf3c('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0xdf3c('0x4')](_0xdf3c('0x5'),'agent',_0xdf3c('0x6')),'allowNull':![],'defaultValue':_0xdf3c('0x6')},'transferredAt':{'type':Sequelize[_0xdf3c('0x7')],'allowNull':![],'defaultValue':Sequelize['NOW']}};
\ No newline at end of file
+var _0xaa88=['account','agent','queue','DATE','NOW','moment','sequelize','exports','STRING'];(function(_0x41c1ae,_0x2f1102){var _0x11e6c9=function(_0x556e04){while(--_0x556e04){_0x41c1ae['push'](_0x41c1ae['shift']());}};_0x11e6c9(++_0x2f1102);}(_0xaa88,0x137));var _0x8aa8=function(_0x5216e0,_0x4f8cb9){_0x5216e0=_0x5216e0-0x0;var _0x5b3f40=_0xaa88[_0x5216e0];return _0x5b3f40;};'use strict';var moment=require(_0x8aa8('0x0'));var Sequelize=require(_0x8aa8('0x1'));module[_0x8aa8('0x2')]={'uniqueid':{'type':Sequelize[_0x8aa8('0x3')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x8aa8('0x4'),_0x8aa8('0x5'),_0x8aa8('0x6')),'allowNull':![],'defaultValue':_0x8aa8('0x6')},'transferredAt':{'type':Sequelize[_0x8aa8('0x7')],'allowNull':![],'defaultValue':Sequelize[_0x8aa8('0x8')]}};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.controller.js b/server/api/chatTransferReport/chatTransferReport.controller.js
index d8572f2..00270c0 100644
--- a/server/api/chatTransferReport/chatTransferReport.controller.js
+++ b/server/api/chatTransferReport/chatTransferReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8091=['sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','Content-Range','reject','save','update','destroy','then','end','error','name','send','index','map','ChatTransferReport','fieldName','type','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','where','filter','merge','options','includeAll','include','findAll','show','catch','create','body','find','params','describe','eml-format','rimraf','zip-dir','moment','bluebird','mustache','util','path'];(function(_0x3b450c,_0x6ec533){var _0x169742=function(_0x33e08b){while(--_0x33e08b){_0x3b450c['push'](_0x3b450c['shift']());}};_0x169742(++_0x6ec533);}(_0x8091,0x124));var _0x1809=function(_0x244431,_0x5eab55){_0x244431=_0x244431-0x0;var _0x55f978=_0x8091[_0x244431];return _0x55f978;};'use strict';var emlformat=require(_0x1809('0x0'));var rimraf=require(_0x1809('0x1'));var zipdir=require(_0x1809('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x1809('0x3'));var BPromise=require(_0x1809('0x4'));var Mustache=require(_0x1809('0x5'));var util=require(_0x1809('0x6'));var path=require(_0x1809('0x7'));var sox=require(_0x1809('0x8'));var csv=require('to-csv');var ejs=require(_0x1809('0x9'));var fs=require('fs');var fs_extra=require(_0x1809('0xa'));var _=require(_0x1809('0xb'));var squel=require(_0x1809('0xc'));var crypto=require(_0x1809('0xd'));var jsforce=require(_0x1809('0xe'));var deskjs=require(_0x1809('0xf'));var toCsv=require(_0x1809('0x10'));var querystring=require('querystring');var Papa=require(_0x1809('0x11'));var Redis=require(_0x1809('0x12'));var authService=require(_0x1809('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x1809('0x14'));var hardwareService=require(_0x1809('0x15'));var logger=require(_0x1809('0x16'))(_0x1809('0x17'));var utils=require(_0x1809('0x18'));var config=require(_0x1809('0x19'));var licenseUtil=require(_0x1809('0x1a'));var db=require(_0x1809('0x1b'))['db'];function respondWithStatusCode(_0x33dc31,_0x4a50ec){_0x4a50ec=_0x4a50ec||0xcc;return function(_0x142b90){if(_0x142b90){return _0x33dc31[_0x1809('0x1c')](_0x4a50ec);}return _0x33dc31[_0x1809('0x1d')](_0x4a50ec)['end']();};}function respondWithResult(_0x558563,_0x4f5adb){_0x4f5adb=_0x4f5adb||0xc8;return function(_0x2d67ac){if(_0x2d67ac){return _0x558563['status'](_0x4f5adb)[_0x1809('0x1e')](_0x2d67ac);}};}function respondWithFilteredResult(_0x5a32f3,_0x506402){return function(_0x13df4a){if(_0x13df4a){var _0x19aae6=typeof _0x506402[_0x1809('0x1f')]===_0x1809('0x20')&&typeof _0x506402[_0x1809('0x21')]===_0x1809('0x20');var _0x48e665=_0x13df4a['count'];var _0x8a8a41=_0x19aae6?0x0:_0x506402['offset'];var _0x5ceef8=_0x19aae6?_0x13df4a[_0x1809('0x22')]:_0x506402[_0x1809('0x1f')]+_0x506402[_0x1809('0x21')];var _0x496228;if(_0x5ceef8>=_0x48e665){_0x5ceef8=_0x48e665;_0x496228=0xc8;}else{_0x496228=0xce;}_0x5a32f3['status'](_0x496228);return _0x5a32f3['set'](_0x1809('0x23'),_0x8a8a41+'-'+_0x5ceef8+'/'+_0x48e665)[_0x1809('0x1e')](_0x13df4a);}return null;};}function patchUpdates(_0x13a7f){return function(_0x47a52a){try{jsonpatch['apply'](_0x47a52a,_0x13a7f,!![]);}catch(_0x32dfb9){return BPromise[_0x1809('0x24')](_0x32dfb9);}return _0x47a52a[_0x1809('0x25')]();};}function saveUpdates(_0x3481cd,_0x2a2b8f){return function(_0x317abb){if(_0x317abb){return _0x317abb[_0x1809('0x26')](_0x3481cd)['then'](function(_0x428185){return _0x428185;});}return null;};}function removeEntity(_0x2d2979,_0xde93c3){return function(_0x47c032){if(_0x47c032){return _0x47c032[_0x1809('0x27')]()[_0x1809('0x28')](function(){_0x2d2979[_0x1809('0x1d')](0xcc)[_0x1809('0x29')]();});}};}function handleEntityNotFound(_0x81b24d,_0x45594c){return function(_0x6c44fb){if(!_0x6c44fb){_0x81b24d[_0x1809('0x1c')](0x194);}return _0x6c44fb;};}function handleError(_0x25b279,_0x509b14){_0x509b14=_0x509b14||0x1f4;return function(_0x5c3be0){logger[_0x1809('0x2a')](_0x5c3be0['stack']);if(_0x5c3be0['name']){delete _0x5c3be0[_0x1809('0x2b')];}_0x25b279[_0x1809('0x1d')](_0x509b14)[_0x1809('0x2c')](_0x5c3be0);};}exports[_0x1809('0x2d')]=function(_0x599f7c,_0x5a609e){var _0x38b86c={},_0x36e1a4={},_0x493e32={'count':0x0,'rows':[]};var _0x5129a9=_[_0x1809('0x2e')](db[_0x1809('0x2f')]['rawAttributes'],function(_0x5bde61){return{'name':_0x5bde61[_0x1809('0x30')],'type':_0x5bde61[_0x1809('0x31')]['key']};});_0x36e1a4[_0x1809('0x32')]=_['map'](_0x5129a9,_0x1809('0x2b'));_0x36e1a4[_0x1809('0x33')]=_[_0x1809('0x34')](_0x599f7c[_0x1809('0x33')]);_0x36e1a4[_0x1809('0x35')]=_[_0x1809('0x36')](_0x36e1a4[_0x1809('0x32')],_0x36e1a4[_0x1809('0x33')]);_0x38b86c[_0x1809('0x37')]=_[_0x1809('0x36')](_0x36e1a4[_0x1809('0x32')],qs[_0x1809('0x38')](_0x599f7c[_0x1809('0x33')][_0x1809('0x38')]));_0x38b86c['attributes']=_0x38b86c[_0x1809('0x37')][_0x1809('0x39')]?_0x38b86c[_0x1809('0x37')]:_0x36e1a4[_0x1809('0x32')];if(!_0x599f7c['query']['hasOwnProperty'](_0x1809('0x3a'))){_0x38b86c['limit']=qs[_0x1809('0x21')](_0x599f7c['query'][_0x1809('0x21')]);_0x38b86c[_0x1809('0x1f')]=qs[_0x1809('0x1f')](_0x599f7c[_0x1809('0x33')]['offset']);}_0x38b86c[_0x1809('0x3b')]=qs[_0x1809('0x3c')](_0x599f7c[_0x1809('0x33')][_0x1809('0x3c')]);_0x38b86c[_0x1809('0x3d')]=qs['filters'](_['pick'](_0x599f7c['query'],_0x36e1a4['filters']),_0x5129a9);if(_0x599f7c[_0x1809('0x33')][_0x1809('0x3e')]){_0x38b86c[_0x1809('0x3d')]=_[_0x1809('0x3f')](_0x38b86c[_0x1809('0x3d')],{'$or':_['map'](_0x5129a9,function(_0x1ba9f4){if(_0x1ba9f4[_0x1809('0x31')]!=='VIRTUAL'){var _0x28ab8e={};_0x28ab8e[_0x1ba9f4[_0x1809('0x2b')]]={'$like':'%'+_0x599f7c[_0x1809('0x33')]['filter']+'%'};return _0x28ab8e;}})});}_0x38b86c=_['merge']({},_0x38b86c,_0x599f7c[_0x1809('0x40')]);var _0x34acef={'where':_0x38b86c['where']};return db[_0x1809('0x2f')][_0x1809('0x22')](_0x34acef)[_0x1809('0x28')](function(_0xe66fd){_0x493e32[_0x1809('0x22')]=_0xe66fd;if(_0x599f7c[_0x1809('0x33')][_0x1809('0x41')]){_0x38b86c[_0x1809('0x42')]=[{'all':!![]}];}return db[_0x1809('0x2f')][_0x1809('0x43')](_0x38b86c);})[_0x1809('0x28')](function(_0x2d2e1e){_0x493e32['rows']=_0x2d2e1e;return _0x493e32;})[_0x1809('0x28')](respondWithFilteredResult(_0x5a609e,_0x38b86c))['catch'](handleError(_0x5a609e,null));};exports[_0x1809('0x44')]=function(_0xdb15f6,_0x4e5e97){var _0xefbf57={'raw':!![],'where':{'id':_0xdb15f6['params']['id']}},_0x4faec5={};_0x4faec5[_0x1809('0x32')]=_[_0x1809('0x34')](db['ChatTransferReport']['rawAttributes']);_0x4faec5[_0x1809('0x33')]=_[_0x1809('0x34')](_0xdb15f6[_0x1809('0x33')]);_0x4faec5[_0x1809('0x35')]=_[_0x1809('0x36')](_0x4faec5[_0x1809('0x32')],_0x4faec5[_0x1809('0x33')]);_0xefbf57[_0x1809('0x37')]=_['intersection'](_0x4faec5['model'],qs[_0x1809('0x38')](_0xdb15f6[_0x1809('0x33')][_0x1809('0x38')]));_0xefbf57['attributes']=_0xefbf57[_0x1809('0x37')][_0x1809('0x39')]?_0xefbf57['attributes']:_0x4faec5[_0x1809('0x32')];if(_0xdb15f6[_0x1809('0x33')][_0x1809('0x41')]){_0xefbf57[_0x1809('0x42')]=[{'all':!![]}];}_0xefbf57=_[_0x1809('0x3f')]({},_0xefbf57,_0xdb15f6[_0x1809('0x40')]);return db[_0x1809('0x2f')]['find'](_0xefbf57)[_0x1809('0x28')](handleEntityNotFound(_0x4e5e97,null))[_0x1809('0x28')](respondWithResult(_0x4e5e97,null))[_0x1809('0x45')](handleError(_0x4e5e97,null));};exports[_0x1809('0x46')]=function(_0x58de8f,_0x360858){return db[_0x1809('0x2f')][_0x1809('0x46')](_0x58de8f[_0x1809('0x47')],{})[_0x1809('0x28')](respondWithResult(_0x360858,0xc9))[_0x1809('0x45')](handleError(_0x360858,null));};exports[_0x1809('0x26')]=function(_0x5d99e9,_0x212786){if(_0x5d99e9['body']['id']){delete _0x5d99e9['body']['id'];}return db[_0x1809('0x2f')][_0x1809('0x48')]({'where':{'id':_0x5d99e9[_0x1809('0x49')]['id']}})['then'](handleEntityNotFound(_0x212786,null))['then'](saveUpdates(_0x5d99e9[_0x1809('0x47')],null))[_0x1809('0x28')](respondWithResult(_0x212786,null))[_0x1809('0x45')](handleError(_0x212786,null));};exports[_0x1809('0x27')]=function(_0x238dff,_0x244142){return db['ChatTransferReport'][_0x1809('0x48')]({'where':{'id':_0x238dff[_0x1809('0x49')]['id']}})[_0x1809('0x28')](handleEntityNotFound(_0x244142,null))[_0x1809('0x28')](removeEntity(_0x244142,null))[_0x1809('0x45')](handleError(_0x244142,null));};exports[_0x1809('0x4a')]=function(_0x528388,_0x159572){return db[_0x1809('0x2f')][_0x1809('0x4a')]()[_0x1809('0x28')](respondWithResult(_0x159572,null))[_0x1809('0x45')](handleError(_0x159572,null));};
\ No newline at end of file
+var _0x085c=['where','filters','pick','filter','VIRTUAL','merge','then','includeAll','include','findAll','rows','catch','show','params','options','create','body','find','describe','eml-format','fast-json-patch','request-promise','moment','bluebird','util','path','to-csv','ejs','fs-extra','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','json','offset','limit','undefined','count','status','set','Content-Range','apply','reject','update','destroy','error','stack','name','send','index','map','ChatTransferReport','rawAttributes','fieldName','type','key','model','query','keys','attributes','intersection','fields','length','hasOwnProperty','order','sort'];(function(_0x8dc01d,_0x4e8f22){var _0x3ab917=function(_0x17d5ce){while(--_0x17d5ce){_0x8dc01d['push'](_0x8dc01d['shift']());}};_0x3ab917(++_0x4e8f22);}(_0x085c,0xf4));var _0xc085=function(_0x57fa33,_0x2b8222){_0x57fa33=_0x57fa33-0x0;var _0x12e724=_0x085c[_0x57fa33];return _0x12e724;};'use strict';var emlformat=require(_0xc085('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xc085('0x1'));var rp=require(_0xc085('0x2'));var moment=require(_0xc085('0x3'));var BPromise=require(_0xc085('0x4'));var Mustache=require('mustache');var util=require(_0xc085('0x5'));var path=require(_0xc085('0x6'));var sox=require('sox');var csv=require(_0xc085('0x7'));var ejs=require(_0xc085('0x8'));var fs=require('fs');var fs_extra=require(_0xc085('0x9'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xc085('0xa'));var jsforce=require(_0xc085('0xb'));var deskjs=require('desk.js');var toCsv=require(_0xc085('0x7'));var querystring=require(_0xc085('0xc'));var Papa=require(_0xc085('0xd'));var Redis=require('ioredis');var authService=require(_0xc085('0xe'));var qs=require(_0xc085('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc085('0x10'));var logger=require(_0xc085('0x11'))('api');var utils=require(_0xc085('0x12'));var config=require(_0xc085('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0xc085('0x14'))['db'];function respondWithStatusCode(_0x58c8fd,_0x2b90b6){_0x2b90b6=_0x2b90b6||0xcc;return function(_0x4af916){if(_0x4af916){return _0x58c8fd[_0xc085('0x15')](_0x2b90b6);}return _0x58c8fd['status'](_0x2b90b6)[_0xc085('0x16')]();};}function respondWithResult(_0x11f8fb,_0x2bab59){_0x2bab59=_0x2bab59||0xc8;return function(_0xf8ebf5){if(_0xf8ebf5){return _0x11f8fb['status'](_0x2bab59)[_0xc085('0x17')](_0xf8ebf5);}};}function respondWithFilteredResult(_0x1992da,_0x1278e7){return function(_0x2aeabf){if(_0x2aeabf){var _0x3d807f=typeof _0x1278e7[_0xc085('0x18')]==='undefined'&&typeof _0x1278e7[_0xc085('0x19')]===_0xc085('0x1a');var _0x473e2a=_0x2aeabf[_0xc085('0x1b')];var _0x848a72=_0x3d807f?0x0:_0x1278e7[_0xc085('0x18')];var _0x228c66=_0x3d807f?_0x2aeabf['count']:_0x1278e7['offset']+_0x1278e7[_0xc085('0x19')];var _0x1939ce;if(_0x228c66>=_0x473e2a){_0x228c66=_0x473e2a;_0x1939ce=0xc8;}else{_0x1939ce=0xce;}_0x1992da[_0xc085('0x1c')](_0x1939ce);return _0x1992da[_0xc085('0x1d')](_0xc085('0x1e'),_0x848a72+'-'+_0x228c66+'/'+_0x473e2a)['json'](_0x2aeabf);}return null;};}function patchUpdates(_0x575ab0){return function(_0x3f03e8){try{jsonpatch[_0xc085('0x1f')](_0x3f03e8,_0x575ab0,!![]);}catch(_0x429fc8){return BPromise[_0xc085('0x20')](_0x429fc8);}return _0x3f03e8['save']();};}function saveUpdates(_0x262e38,_0x414a2a){return function(_0x424009){if(_0x424009){return _0x424009[_0xc085('0x21')](_0x262e38)['then'](function(_0x5c9f54){return _0x5c9f54;});}return null;};}function removeEntity(_0x225d21,_0x373c6f){return function(_0x2b0107){if(_0x2b0107){return _0x2b0107[_0xc085('0x22')]()['then'](function(){_0x225d21[_0xc085('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x23d02f,_0x2ea9a3){return function(_0x12fa5e){if(!_0x12fa5e){_0x23d02f[_0xc085('0x15')](0x194);}return _0x12fa5e;};}function handleError(_0x23072f,_0x195348){_0x195348=_0x195348||0x1f4;return function(_0x21bd13){logger[_0xc085('0x23')](_0x21bd13[_0xc085('0x24')]);if(_0x21bd13['name']){delete _0x21bd13[_0xc085('0x25')];}_0x23072f[_0xc085('0x1c')](_0x195348)[_0xc085('0x26')](_0x21bd13);};}exports[_0xc085('0x27')]=function(_0x16a555,_0x5af81c){var _0x439213={},_0x5109ce={},_0x4936cf={'count':0x0,'rows':[]};var _0x29fbf7=_[_0xc085('0x28')](db[_0xc085('0x29')][_0xc085('0x2a')],function(_0x1b19f2){return{'name':_0x1b19f2[_0xc085('0x2b')],'type':_0x1b19f2[_0xc085('0x2c')][_0xc085('0x2d')]};});_0x5109ce[_0xc085('0x2e')]=_[_0xc085('0x28')](_0x29fbf7,_0xc085('0x25'));_0x5109ce[_0xc085('0x2f')]=_[_0xc085('0x30')](_0x16a555[_0xc085('0x2f')]);_0x5109ce['filters']=_['intersection'](_0x5109ce[_0xc085('0x2e')],_0x5109ce[_0xc085('0x2f')]);_0x439213[_0xc085('0x31')]=_[_0xc085('0x32')](_0x5109ce['model'],qs[_0xc085('0x33')](_0x16a555[_0xc085('0x2f')][_0xc085('0x33')]));_0x439213['attributes']=_0x439213[_0xc085('0x31')][_0xc085('0x34')]?_0x439213[_0xc085('0x31')]:_0x5109ce['model'];if(!_0x16a555[_0xc085('0x2f')][_0xc085('0x35')]('nolimit')){_0x439213['limit']=qs[_0xc085('0x19')](_0x16a555[_0xc085('0x2f')][_0xc085('0x19')]);_0x439213[_0xc085('0x18')]=qs['offset'](_0x16a555['query'][_0xc085('0x18')]);}_0x439213[_0xc085('0x36')]=qs['sort'](_0x16a555[_0xc085('0x2f')][_0xc085('0x37')]);_0x439213[_0xc085('0x38')]=qs[_0xc085('0x39')](_[_0xc085('0x3a')](_0x16a555['query'],_0x5109ce[_0xc085('0x39')]),_0x29fbf7);if(_0x16a555[_0xc085('0x2f')][_0xc085('0x3b')]){_0x439213[_0xc085('0x38')]=_['merge'](_0x439213[_0xc085('0x38')],{'$or':_[_0xc085('0x28')](_0x29fbf7,function(_0x394b5f){if(_0x394b5f[_0xc085('0x2c')]!==_0xc085('0x3c')){var _0x53b4ac={};_0x53b4ac[_0x394b5f[_0xc085('0x25')]]={'$like':'%'+_0x16a555[_0xc085('0x2f')][_0xc085('0x3b')]+'%'};return _0x53b4ac;}})});}_0x439213=_[_0xc085('0x3d')]({},_0x439213,_0x16a555['options']);var _0x394e61={'where':_0x439213['where']};return db['ChatTransferReport']['count'](_0x394e61)[_0xc085('0x3e')](function(_0x10e5e6){_0x4936cf[_0xc085('0x1b')]=_0x10e5e6;if(_0x16a555[_0xc085('0x2f')][_0xc085('0x3f')]){_0x439213[_0xc085('0x40')]=[{'all':!![]}];}return db['ChatTransferReport'][_0xc085('0x41')](_0x439213);})[_0xc085('0x3e')](function(_0x5efeaf){_0x4936cf[_0xc085('0x42')]=_0x5efeaf;return _0x4936cf;})[_0xc085('0x3e')](respondWithFilteredResult(_0x5af81c,_0x439213))[_0xc085('0x43')](handleError(_0x5af81c,null));};exports[_0xc085('0x44')]=function(_0x5a1b76,_0x1de039){var _0x35b4f1={'raw':!![],'where':{'id':_0x5a1b76[_0xc085('0x45')]['id']}},_0x2d2371={};_0x2d2371[_0xc085('0x2e')]=_['keys'](db[_0xc085('0x29')]['rawAttributes']);_0x2d2371[_0xc085('0x2f')]=_[_0xc085('0x30')](_0x5a1b76[_0xc085('0x2f')]);_0x2d2371['filters']=_[_0xc085('0x32')](_0x2d2371['model'],_0x2d2371[_0xc085('0x2f')]);_0x35b4f1['attributes']=_[_0xc085('0x32')](_0x2d2371['model'],qs['fields'](_0x5a1b76[_0xc085('0x2f')][_0xc085('0x33')]));_0x35b4f1[_0xc085('0x31')]=_0x35b4f1['attributes'][_0xc085('0x34')]?_0x35b4f1[_0xc085('0x31')]:_0x2d2371[_0xc085('0x2e')];if(_0x5a1b76[_0xc085('0x2f')][_0xc085('0x3f')]){_0x35b4f1[_0xc085('0x40')]=[{'all':!![]}];}_0x35b4f1=_[_0xc085('0x3d')]({},_0x35b4f1,_0x5a1b76[_0xc085('0x46')]);return db['ChatTransferReport']['find'](_0x35b4f1)[_0xc085('0x3e')](handleEntityNotFound(_0x1de039,null))[_0xc085('0x3e')](respondWithResult(_0x1de039,null))[_0xc085('0x43')](handleError(_0x1de039,null));};exports['create']=function(_0x3a93bf,_0x1b08db){return db['ChatTransferReport'][_0xc085('0x47')](_0x3a93bf['body'],{})[_0xc085('0x3e')](respondWithResult(_0x1b08db,0xc9))[_0xc085('0x43')](handleError(_0x1b08db,null));};exports[_0xc085('0x21')]=function(_0x5e58df,_0x3db3ae){if(_0x5e58df['body']['id']){delete _0x5e58df[_0xc085('0x48')]['id'];}return db[_0xc085('0x29')]['find']({'where':{'id':_0x5e58df['params']['id']}})[_0xc085('0x3e')](handleEntityNotFound(_0x3db3ae,null))[_0xc085('0x3e')](saveUpdates(_0x5e58df['body'],null))['then'](respondWithResult(_0x3db3ae,null))[_0xc085('0x43')](handleError(_0x3db3ae,null));};exports[_0xc085('0x22')]=function(_0x4735d4,_0x59b1a0){return db[_0xc085('0x29')][_0xc085('0x49')]({'where':{'id':_0x4735d4[_0xc085('0x45')]['id']}})[_0xc085('0x3e')](handleEntityNotFound(_0x59b1a0,null))[_0xc085('0x3e')](removeEntity(_0x59b1a0,null))[_0xc085('0x43')](handleError(_0x59b1a0,null));};exports['describe']=function(_0x2342e5,_0x5c1803){return db[_0xc085('0x29')][_0xc085('0x4a')]()[_0xc085('0x3e')](respondWithResult(_0x5c1803,null))[_0xc085('0x43')](handleError(_0x5c1803,null));};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.model.js b/server/api/chatTransferReport/chatTransferReport.model.js
index f1e307e..0c1fd11 100644
--- a/server/api/chatTransferReport/chatTransferReport.model.js
+++ b/server/api/chatTransferReport/chatTransferReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x50e0=['bluebird','request-promise','path','rimraf','../../config/environment','./chatTransferReport.attributes','define','ChatTransferReport','report_chat_transfer','uniqueid','util','../../config/logger','api','moment'];(function(_0xadd417,_0x207028){var _0x5c79e7=function(_0xa07df0){while(--_0xa07df0){_0xadd417['push'](_0xadd417['shift']());}};_0x5c79e7(++_0x207028);}(_0x50e0,0x184));var _0x050e=function(_0x13712c,_0x573099){_0x13712c=_0x13712c-0x0;var _0x50e135=_0x50e0[_0x13712c];return _0x50e135;};'use strict';var _=require('lodash');var util=require(_0x050e('0x0'));var logger=require(_0x050e('0x1'))(_0x050e('0x2'));var moment=require(_0x050e('0x3'));var BPromise=require(_0x050e('0x4'));var rp=require(_0x050e('0x5'));var fs=require('fs');var path=require(_0x050e('0x6'));var rimraf=require(_0x050e('0x7'));var config=require(_0x050e('0x8'));var attributes=require(_0x050e('0x9'));module['exports']=function(_0x1c7981,_0x103a41){return _0x1c7981[_0x050e('0xa')](_0x050e('0xb'),attributes,{'tableName':_0x050e('0xc'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0x050e('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xc1c1=['util','../../config/logger','api','bluebird','request-promise','path','rimraf','ChatTransferReport','report_chat_transfer','uniqueid','lodash'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xc1c1,0x154));var _0x1c1c=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0xc1c1[_0x42cae2];return _0x5f256f;};'use strict';var _=require(_0x1c1c('0x0'));var util=require(_0x1c1c('0x1'));var logger=require(_0x1c1c('0x2'))(_0x1c1c('0x3'));var moment=require('moment');var BPromise=require(_0x1c1c('0x4'));var rp=require(_0x1c1c('0x5'));var fs=require('fs');var path=require(_0x1c1c('0x6'));var rimraf=require(_0x1c1c('0x7'));var config=require('../../config/environment');var attributes=require('./chatTransferReport.attributes');module['exports']=function(_0x502599,_0x1886f0){return _0x502599['define'](_0x1c1c('0x8'),attributes,{'tableName':_0x1c1c('0x9'),'paranoid':![],'indexes':[{'name':_0x1c1c('0xa'),'fields':[_0x1c1c('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.rpc.js b/server/api/chatTransferReport/chatTransferReport.rpc.js
index 0d943bb..6a66305 100644
--- a/server/api/chatTransferReport/chatTransferReport.rpc.js
+++ b/server/api/chatTransferReport/chatTransferReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x61be=['error','code','message','info','result','catch','lodash','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','ChatTransferReport,\x20%s,\x20%s','request\x20sent','debug','ChatTransferReport,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x15e983,_0x5824c8){var _0x3a1ec0=function(_0x8d5a32){while(--_0x8d5a32){_0x15e983['push'](_0x15e983['shift']());}};_0x3a1ec0(++_0x5824c8);}(_0x61be,0xae));var _0xe61b=function(_0x3849ff,_0x4ae25e){_0x3849ff=_0x3849ff-0x0;var _0x3ab676=_0x61be[_0x3849ff];return _0x3ab676;};'use strict';var _=require(_0xe61b('0x0'));var util=require('util');var moment=require(_0xe61b('0x1'));var BPromise=require(_0xe61b('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe61b('0x3'))['db'];var utils=require(_0xe61b('0x4'));var logger=require(_0xe61b('0x5'))(_0xe61b('0x6'));var config=require(_0xe61b('0x7'));var jayson=require(_0xe61b('0x8'));var client=jayson[_0xe61b('0x9')][_0xe61b('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3317db,_0x2d2bef,_0x55bcd8){return new BPromise(function(_0x3f4197,_0x1c3f6e){return client[_0xe61b('0xb')](_0x3317db,_0x55bcd8)[_0xe61b('0xc')](function(_0x40ed7e){logger['info'](_0xe61b('0xd'),_0x2d2bef,_0xe61b('0xe'));logger[_0xe61b('0xf')](_0xe61b('0x10'),_0x2d2bef,'request\x20sent',JSON[_0xe61b('0x11')](_0x40ed7e));if(_0x40ed7e[_0xe61b('0x12')]){if(_0x40ed7e[_0xe61b('0x12')][_0xe61b('0x13')]===0x1f4){logger[_0xe61b('0x12')](_0xe61b('0xd'),_0x2d2bef,_0x40ed7e[_0xe61b('0x12')][_0xe61b('0x14')]);return _0x1c3f6e(_0x40ed7e[_0xe61b('0x12')][_0xe61b('0x14')]);}logger[_0xe61b('0x12')](_0xe61b('0xd'),_0x2d2bef,_0x40ed7e['error']['message']);return _0x3f4197(_0x40ed7e['error']['message']);}else{logger[_0xe61b('0x15')]('ChatTransferReport,\x20%s,\x20%s',_0x2d2bef,'request\x20sent');_0x3f4197(_0x40ed7e[_0xe61b('0x16')][_0xe61b('0x14')]);}})[_0xe61b('0x17')](function(_0x21bb9e){logger[_0xe61b('0x12')]('ChatTransferReport,\x20%s,\x20%s',_0x2d2bef,_0x21bb9e);_0x1c3f6e(_0x21bb9e);});});}
\ No newline at end of file
+var _0x5fe2=['../../config/logger','rpc','../../config/environment','client','http','request','ChatTransferReport,\x20%s,\x20%s','request\x20sent','ChatTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','moment','../../mysqldb','../../config/utils'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x5fe2,0x8e));var _0x25fe=function(_0x1d8990,_0x4382b5){_0x1d8990=_0x1d8990-0x0;var _0x5ce380=_0x5fe2[_0x1d8990];return _0x5ce380;};'use strict';var _=require(_0x25fe('0x0'));var util=require(_0x25fe('0x1'));var moment=require(_0x25fe('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x25fe('0x3'))['db'];var utils=require(_0x25fe('0x4'));var logger=require(_0x25fe('0x5'))(_0x25fe('0x6'));var config=require(_0x25fe('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x25fe('0x8')][_0x25fe('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1b35b7,_0x1c0002,_0x268980){return new BPromise(function(_0x32bb63,_0x454e78){return client[_0x25fe('0xa')](_0x1b35b7,_0x268980)['then'](function(_0x2e850e){logger['info'](_0x25fe('0xb'),_0x1c0002,_0x25fe('0xc'));logger['debug'](_0x25fe('0xd'),_0x1c0002,_0x25fe('0xc'),JSON[_0x25fe('0xe')](_0x2e850e));if(_0x2e850e[_0x25fe('0xf')]){if(_0x2e850e[_0x25fe('0xf')][_0x25fe('0x10')]===0x1f4){logger[_0x25fe('0xf')](_0x25fe('0xb'),_0x1c0002,_0x2e850e[_0x25fe('0xf')][_0x25fe('0x11')]);return _0x454e78(_0x2e850e[_0x25fe('0xf')]['message']);}logger[_0x25fe('0xf')](_0x25fe('0xb'),_0x1c0002,_0x2e850e[_0x25fe('0xf')]['message']);return _0x32bb63(_0x2e850e[_0x25fe('0xf')]['message']);}else{logger[_0x25fe('0x12')](_0x25fe('0xb'),_0x1c0002,'request\x20sent');_0x32bb63(_0x2e850e[_0x25fe('0x13')]['message']);}})[_0x25fe('0x14')](function(_0x550cf0){logger[_0x25fe('0xf')](_0x25fe('0xb'),_0x1c0002,_0x550cf0);_0x454e78(_0x550cf0);});});}
\ No newline at end of file
diff --git a/server/api/chatTransferReport/index.js b/server/api/chatTransferReport/index.js
index 2b20a33..b3c19e8 100644
--- a/server/api/chatTransferReport/index.js
+++ b/server/api/chatTransferReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x658e=['/describe','describe','/:id','post','create','update','delete','destroy','exports','multer','connect-timeout','express','Router','./chatTransferReport.controller','get','isAuthenticated','index'];(function(_0x2fef75,_0x2a4b1b){var _0x46bcd8=function(_0x534900){while(--_0x534900){_0x2fef75['push'](_0x2fef75['shift']());}};_0x46bcd8(++_0x2a4b1b);}(_0x658e,0x12a));var _0xe658=function(_0x50e4ef,_0x4f6739){_0x50e4ef=_0x50e4ef-0x0;var _0xd9168e=_0x658e[_0x50e4ef];return _0xd9168e;};'use strict';var multer=require(_0xe658('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xe658('0x1'));var express=require(_0xe658('0x2'));var router=express[_0xe658('0x3')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xe658('0x4'));router[_0xe658('0x5')]('/',auth[_0xe658('0x6')](),controller[_0xe658('0x7')]);router[_0xe658('0x5')](_0xe658('0x8'),auth[_0xe658('0x6')](),controller[_0xe658('0x9')]);router[_0xe658('0x5')](_0xe658('0xa'),auth[_0xe658('0x6')](),controller['show']);router[_0xe658('0xb')]('/',auth[_0xe658('0x6')](),controller[_0xe658('0xc')]);router['put'](_0xe658('0xa'),auth[_0xe658('0x6')](),controller[_0xe658('0xd')]);router[_0xe658('0xe')](_0xe658('0xa'),auth[_0xe658('0x6')](),controller[_0xe658('0xf')]);module[_0xe658('0x10')]=router;
\ No newline at end of file
+var _0x2b4d=['update','delete','exports','util','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./chatTransferReport.controller','isAuthenticated','index','get','/:id','show','create'];(function(_0x4b43c0,_0x3a8091){var _0x574c13=function(_0x39eaf4){while(--_0x39eaf4){_0x4b43c0['push'](_0x4b43c0['shift']());}};_0x574c13(++_0x3a8091);}(_0x2b4d,0xb3));var _0xd2b4=function(_0x5d30b4,_0x199248){_0x5d30b4=_0x5d30b4-0x0;var _0x1acfb8=_0x2b4d[_0x5d30b4];return _0x1acfb8;};'use strict';var multer=require('multer');var util=require(_0xd2b4('0x0'));var path=require('path');var timeout=require(_0xd2b4('0x1'));var express=require(_0xd2b4('0x2'));var router=express[_0xd2b4('0x3')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xd2b4('0x4'));var config=require(_0xd2b4('0x5'));var controller=require(_0xd2b4('0x6'));router['get']('/',auth[_0xd2b4('0x7')](),controller[_0xd2b4('0x8')]);router[_0xd2b4('0x9')]('/describe',auth['isAuthenticated'](),controller['describe']);router['get'](_0xd2b4('0xa'),auth['isAuthenticated'](),controller[_0xd2b4('0xb')]);router['post']('/',auth['isAuthenticated'](),controller[_0xd2b4('0xc')]);router['put'](_0xd2b4('0xa'),auth[_0xd2b4('0x7')](),controller[_0xd2b4('0xd')]);router[_0xd2b4('0xe')]('/:id',auth[_0xd2b4('0x7')](),controller['destroy']);module[_0xd2b4('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.attributes.js b/server/api/chatWebsite/chatWebsite.attributes.js
index b25fd19..1d93f14 100644
--- a/server/api/chatWebsite/chatWebsite.attributes.js
+++ b/server/api/chatWebsite/chatWebsite.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9456=['New\x20offline\x20message\x20from\x20websiteName','Your\x20request\x20has\x20not\x20been\x20processed.','Skip','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','website_alias','bottom_right','CHAT','alternate','#fafafa','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDisposition','Generated\x20by\x20XCALLY\x20Motion','Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}','sequelize','randomstring','exports','STRING','address','Agent','#011F6A','#ffffff','INTEGER','BOOLEAN','rounded','We\x20are\x20here!','Chat','Send','TEXT','Do\x20you\x20want\x20to\x20close\x20the\x20interaction?','Form\x20properly\x20submitted','Note','Type\x20a\x20message','Feedback','ENUM','star','thumb','input','name','text','email','getDataValue','parse','onlineForm','setDataValue','stringify','textarea','Comments','Leave\x20your\x20comments','offlineForm','generate','All\x20of\x20our\x20agents\x20are\x20busy\x20at\x20this\x20time.\x20Your\x20chat\x20is\x20very\x20important\x20to\x20us.','Please\x20hold\x20and\x20we\x20will\x20answer\x20your\x20request\x20as\x20soon\x20as\x20possible.'];(function(_0x4e4430,_0x550c2a){var _0x56c5e5=function(_0x14c1c7){while(--_0x14c1c7){_0x4e4430['push'](_0x4e4430['shift']());}};_0x56c5e5(++_0x550c2a);}(_0x9456,0xa9));var _0x6945=function(_0x2e2420,_0x53b1d0){_0x2e2420=_0x2e2420-0x0;var _0x1c6a09=_0x9456[_0x2e2420];return _0x1c6a09;};'use strict';var Sequelize=require(_0x6945('0x0'));var rs=require(_0x6945('0x1'));module[_0x6945('0x2')]={'name':{'type':Sequelize[_0x6945('0x3')],'allowNull':![]},'address':{'type':Sequelize[_0x6945('0x3')],'allowNull':![],'unique':_0x6945('0x4')},'description':{'type':Sequelize[_0x6945('0x3')]},'mapKey':{'type':Sequelize[_0x6945('0x3')],'defaultValue':'email'},'mapKeyOffline':{'type':Sequelize[_0x6945('0x3')],'defaultValue':'email'},'key':{'type':Sequelize[_0x6945('0x3')],'allowNull':![]},'agentAlias':{'type':Sequelize[_0x6945('0x3')],'defaultValue':_0x6945('0x5')},'customerAlias':{'type':Sequelize['STRING'],'defaultValue':'Me'},'color':{'type':Sequelize[_0x6945('0x3')],'allowNull':![],'defaultValue':_0x6945('0x6'),'validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0x6945('0x3')],'allowNull':![],'defaultValue':'#011F6A','validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize[_0x6945('0x3')],'allowNull':![],'defaultValue':_0x6945('0x7'),'validate':{'notEmpty':!![]}},'textButtonColor':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x6945('0x7'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0x6945('0x8')],'defaultValue':0xf},'remote':{'type':Sequelize['STRING']},'animation':{'type':Sequelize[_0x6945('0x9')],'defaultValue':!![]},'header_shape':{'type':Sequelize['ENUM'](_0x6945('0xa'),'squared'),'defaultValue':_0x6945('0xa')},'header_online':{'type':Sequelize[_0x6945('0x3')],'defaultValue':_0x6945('0xb')},'start_chat_button':{'type':Sequelize['STRING'],'defaultValue':_0x6945('0xc')},'offline_chat_button':{'type':Sequelize['STRING'],'defaultValue':_0x6945('0xd')},'header_offline':{'type':Sequelize[_0x6945('0x3')],'defaultValue':'Contact\x20us'},'download_transcript':{'type':Sequelize[_0x6945('0x9')],'defaultValue':!![]},'timeout':{'type':Sequelize[_0x6945('0x8')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize[_0x6945('0x3')],'defaultValue':'Powered\x20by\x20xCALLY'},'defaultWhiteLabel':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0x6945('0xe')]},'closingQuestion':{'type':Sequelize[_0x6945('0x3')],'defaultValue':_0x6945('0xf')},'formSubmitSuccessMessage':{'type':Sequelize['STRING'],'defaultValue':_0x6945('0x10')},'formSubmitFailureMessage':{'type':Sequelize[_0x6945('0x3')],'defaultValue':'Form\x20submission\x20error'},'noteTitle':{'type':Sequelize['STRING'],'defaultValue':_0x6945('0x11')},'placeholderMessage':{'type':Sequelize['STRING'],'defaultValue':_0x6945('0x12')},'closingMessage':{'type':Sequelize[_0x6945('0x3')],'defaultValue':'Thanks\x20you\x20for\x20your\x20time!'},'closingMessageButton':{'type':Sequelize[_0x6945('0x3')],'defaultValue':_0x6945('0xd')},'skipMessageButton':{'type':Sequelize[_0x6945('0x3')],'defaultValue':'Skip'},'conditionAgreement':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableRating':{'type':Sequelize[_0x6945('0x9')],'defaultValue':![]},'enableFeedback':{'type':Sequelize[_0x6945('0x9')],'defaultValue':![]},'enableSendButton':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'feedbackTitle':{'type':Sequelize[_0x6945('0x3')],'defaultValue':_0x6945('0x13')},'ratingType':{'type':Sequelize[_0x6945('0x14')](_0x6945('0x15'),_0x6945('0x16')),'defaultValue':_0x6945('0x15')},'ratingStarsNumber':{'type':Sequelize['INTEGER'],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0x6945('0xe')],'defaultValue':function(){return JSON['stringify']({'items':[{'type':_0x6945('0x17'),'variable':null,'config':{'placeholder':_0x6945('0x18'),'type':_0x6945('0x19'),'required':!![]},'props':{'title':_0x6945('0x18'),'helpText':''}},{'type':_0x6945('0x17'),'props':{'title':_0x6945('0x1a'),'helpText':''},'config':{'required':!![],'placeholder':'email','type':_0x6945('0x1a')},'variable':null}],'fromKey':0x1});},'get':function(){return this[_0x6945('0x1b')]('onlineForm')?JSON[_0x6945('0x1c')](this[_0x6945('0x1b')](_0x6945('0x1d'))):{};},'set':function(_0x24fce9){return this[_0x6945('0x1e')](_0x6945('0x1d'),JSON[_0x6945('0x1f')](_0x24fce9));}},'offlineForm':{'type':Sequelize[_0x6945('0xe')],'defaultValue':function(){return JSON[_0x6945('0x1f')]({'items':[{'type':_0x6945('0x17'),'props':{'title':_0x6945('0x1a'),'helpText':''},'config':{'required':!![],'placeholder':_0x6945('0x1a'),'type':_0x6945('0x1a')},'variable':null},{'type':_0x6945('0x20'),'config':{'placeholder':_0x6945('0x21')},'props':{'title':_0x6945('0x21'),'helpText':_0x6945('0x22')}}],'fromKey':0x0});},'get':function(){return this[_0x6945('0x1b')](_0x6945('0x23'))?JSON['parse'](this[_0x6945('0x1b')](_0x6945('0x23'))):{};},'set':function(_0x488f8d){return this[_0x6945('0x1e')](_0x6945('0x23'),JSON[_0x6945('0x1f')](_0x488f8d));}},'token':{'type':Sequelize[_0x6945('0x3')],'defaultValue':function(){return rs[_0x6945('0x24')]();}},'autoclose':{'type':Sequelize[_0x6945('0x9')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0x6945('0x9')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize[_0x6945('0x9')],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize['STRING']},'forwardOffline':{'type':Sequelize[_0x6945('0x9')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize[_0x6945('0x3')]},'waitingTitle':{'type':Sequelize[_0x6945('0x3')],'defaultValue':_0x6945('0x25')},'waitingMessage':{'type':Sequelize[_0x6945('0x3')],'defaultValue':_0x6945('0x26')},'offlineMessageSubject':{'type':Sequelize[_0x6945('0x3')],'defaultValue':_0x6945('0x27')},'offlineMessageBody':{'type':Sequelize[_0x6945('0x3')],'defaultValue':'You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:'},'enableUnmanagedNote':{'type':Sequelize[_0x6945('0x9')],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize[_0x6945('0x3')],'defaultValue':_0x6945('0x28')},'skipUnmanaged':{'type':Sequelize[_0x6945('0x3')],'defaultValue':_0x6945('0x29')},'sendUnmanaged':{'type':Sequelize[_0x6945('0x3')],'defaultValue':_0x6945('0xd')},'enableCustomerAttachment':{'type':Sequelize[_0x6945('0x9')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize[_0x6945('0x9')],'defaultValue':![]},'agentAvatar':{'type':Sequelize[_0x6945('0xe')]},'showAgentAvatar':{'type':Sequelize[_0x6945('0x9')],'defaultValue':![]},'timezone':{'type':Sequelize[_0x6945('0x3')]},'notificationTemplate':{'type':Sequelize[_0x6945('0xe')],'defaultValue':function(){return _0x6945('0x2a');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x6945('0x9')],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentIdentifier':{'type':Sequelize['STRING'],'defaultValue':_0x6945('0x2b')},'waitForTheAssignedAgent':{'type':Sequelize[_0x6945('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x6945('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0x6945('0x3')],'defaultValue':_0x6945('0x2c')},'verticalAlignment':{'type':Sequelize['INTEGER'],'defaultValue':0x1e},'labelText':{'type':Sequelize['STRING'],'defaultValue':_0x6945('0x2d')},'messagesAlignment':{'type':Sequelize[_0x6945('0x3')],'defaultValue':_0x6945('0x2e')},'defaultTitle':{'type':Sequelize['STRING']},'customerAvatar':{'type':Sequelize['TEXT']},'showCustomerAvatar':{'type':Sequelize[_0x6945('0x9')],'defaultValue':![]},'messageFontSize':{'type':Sequelize[_0x6945('0x8')],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0x6945('0x3')],'allowNull':![],'defaultValue':_0x6945('0x2f'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize[_0x6945('0x9')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x6945('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x6945('0x9')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x6945('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize['STRING'],'defaultValue':'System'},'systemAvatar':{'type':Sequelize[_0x6945('0xe')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0x6945('0x8')],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0x6945('0x30'),'set':function(_0x3f3efa){if(!_0x3f3efa)this['setDataValue']('mandatoryDispositionPauseId',null);this['setDataValue'](_0x6945('0x31'),_0x3f3efa);}},'vidaooEscalation':{'type':Sequelize[_0x6945('0x9')],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize['STRING']},'vidaooTopic':{'type':Sequelize[_0x6945('0x3')],'allowNull':![],'defaultValue':_0x6945('0x32')},'vidaooNote':{'type':Sequelize[_0x6945('0x3')],'defaultValue':function(){return _0x6945('0x33');}},'vidaooMetadata':{'type':Sequelize[_0x6945('0xe')],'defaultValue':null},'openNewInteraction':{'type':Sequelize[_0x6945('0x9')],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize[_0x6945('0xe')]}};
\ No newline at end of file
+var _0x9f2b=['offlineForm','generate','All\x20of\x20our\x20agents\x20are\x20busy\x20at\x20this\x20time.\x20Your\x20chat\x20is\x20very\x20important\x20to\x20us.','Please\x20hold\x20and\x20we\x20will\x20answer\x20your\x20request\x20as\x20soon\x20as\x20possible.','New\x20offline\x20message\x20from\x20websiteName','You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:','Your\x20request\x20has\x20not\x20been\x20processed.','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','bottom_right','CHAT','#fafafa','System','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','mandatoryDispositionPauseId','mandatoryDisposition','Generated\x20by\x20XCALLY\x20Motion','Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}','sequelize','exports','STRING','address','email','#ffffff','BOOLEAN','rounded','We\x20are\x20here!','Chat','Contact\x20us','INTEGER','Powered\x20by\x20xCALLY','TEXT','Form\x20properly\x20submitted','Form\x20submission\x20error','Note','Type\x20a\x20message','Thanks\x20you\x20for\x20your\x20time!','Send','Skip','Feedback','ENUM','thumb','text','getDataValue','parse','setDataValue','stringify','input','textarea','Comments'];(function(_0x3dc68d,_0x1c1951){var _0xdf7f94=function(_0x339428){while(--_0x339428){_0x3dc68d['push'](_0x3dc68d['shift']());}};_0xdf7f94(++_0x1c1951);}(_0x9f2b,0x168));var _0xb9f2=function(_0x138ab8,_0x539ea0){_0x138ab8=_0x138ab8-0x0;var _0x3598de=_0x9f2b[_0x138ab8];return _0x3598de;};'use strict';var Sequelize=require(_0xb9f2('0x0'));var rs=require('randomstring');module[_0xb9f2('0x1')]={'name':{'type':Sequelize[_0xb9f2('0x2')],'allowNull':![]},'address':{'type':Sequelize[_0xb9f2('0x2')],'allowNull':![],'unique':_0xb9f2('0x3')},'description':{'type':Sequelize[_0xb9f2('0x2')]},'mapKey':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':'email'},'mapKeyOffline':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0x4')},'key':{'type':Sequelize['STRING'],'allowNull':![]},'agentAlias':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':'Agent'},'customerAlias':{'type':Sequelize['STRING'],'defaultValue':'Me'},'color':{'type':Sequelize[_0xb9f2('0x2')],'allowNull':![],'defaultValue':'#011F6A','validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0xb9f2('0x2')],'allowNull':![],'defaultValue':'#011F6A','validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize[_0xb9f2('0x2')],'allowNull':![],'defaultValue':_0xb9f2('0x5'),'validate':{'notEmpty':!![]}},'textButtonColor':{'type':Sequelize[_0xb9f2('0x2')],'allowNull':![],'defaultValue':_0xb9f2('0x5'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize['INTEGER'],'defaultValue':0xf},'remote':{'type':Sequelize['STRING']},'animation':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':!![]},'header_shape':{'type':Sequelize['ENUM']('rounded','squared'),'defaultValue':_0xb9f2('0x7')},'header_online':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0x8')},'start_chat_button':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0x9')},'offline_chat_button':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':'Send'},'header_offline':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0xa')},'download_transcript':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':!![]},'timeout':{'type':Sequelize[_0xb9f2('0xb')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0xc')},'defaultWhiteLabel':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0xb9f2('0xd')]},'closingQuestion':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':'Do\x20you\x20want\x20to\x20close\x20the\x20interaction?'},'formSubmitSuccessMessage':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0xe')},'formSubmitFailureMessage':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0xf')},'noteTitle':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0x10')},'placeholderMessage':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0x11')},'closingMessage':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0x12')},'closingMessageButton':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0x13')},'skipMessageButton':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0x14')},'conditionAgreement':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':![]},'enableRating':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':![]},'enableFeedback':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':![]},'enableSendButton':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':![]},'feedbackTitle':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0x15')},'ratingType':{'type':Sequelize[_0xb9f2('0x16')]('star',_0xb9f2('0x17')),'defaultValue':'star'},'ratingStarsNumber':{'type':Sequelize[_0xb9f2('0xb')],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0xb9f2('0xd')],'defaultValue':function(){return JSON['stringify']({'items':[{'type':'input','variable':null,'config':{'placeholder':'name','type':_0xb9f2('0x18'),'required':!![]},'props':{'title':'name','helpText':''}},{'type':'input','props':{'title':_0xb9f2('0x4'),'helpText':''},'config':{'required':!![],'placeholder':'email','type':'email'},'variable':null}],'fromKey':0x1});},'get':function(){return this[_0xb9f2('0x19')]('onlineForm')?JSON[_0xb9f2('0x1a')](this['getDataValue']('onlineForm')):{};},'set':function(_0x3adea3){return this[_0xb9f2('0x1b')]('onlineForm',JSON[_0xb9f2('0x1c')](_0x3adea3));}},'offlineForm':{'type':Sequelize[_0xb9f2('0xd')],'defaultValue':function(){return JSON['stringify']({'items':[{'type':_0xb9f2('0x1d'),'props':{'title':'email','helpText':''},'config':{'required':!![],'placeholder':_0xb9f2('0x4'),'type':_0xb9f2('0x4')},'variable':null},{'type':_0xb9f2('0x1e'),'config':{'placeholder':_0xb9f2('0x1f')},'props':{'title':'Comments','helpText':'Leave\x20your\x20comments'}}],'fromKey':0x0});},'get':function(){return this[_0xb9f2('0x19')]('offlineForm')?JSON[_0xb9f2('0x1a')](this[_0xb9f2('0x19')](_0xb9f2('0x20'))):{};},'set':function(_0xb61282){return this['setDataValue']('offlineForm',JSON[_0xb9f2('0x1c')](_0xb61282));}},'token':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':function(){return rs[_0xb9f2('0x21')]();}},'autoclose':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize['STRING']},'forwardOffline':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize[_0xb9f2('0x2')]},'waitingTitle':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0x22')},'waitingMessage':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0x23')},'offlineMessageSubject':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0x24')},'offlineMessageBody':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0x25')},'enableUnmanagedNote':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0x26')},'skipUnmanaged':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0x14')},'sendUnmanaged':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':'Send'},'enableCustomerAttachment':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':![]},'agentAvatar':{'type':Sequelize['TEXT']},'showAgentAvatar':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':![]},'timezone':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize[_0xb9f2('0xd')],'defaultValue':function(){return _0xb9f2('0x27');}},'notificationSound':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':'website_alias'},'waitForTheAssignedAgent':{'type':Sequelize[_0xb9f2('0xb')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':_0xb9f2('0x28')},'verticalAlignment':{'type':Sequelize[_0xb9f2('0xb')],'defaultValue':0x1e},'labelText':{'type':Sequelize['STRING'],'defaultValue':_0xb9f2('0x29')},'messagesAlignment':{'type':Sequelize['STRING'],'defaultValue':'alternate'},'defaultTitle':{'type':Sequelize[_0xb9f2('0x2')]},'customerAvatar':{'type':Sequelize[_0xb9f2('0xd')]},'showCustomerAvatar':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'messageFontSize':{'type':Sequelize[_0xb9f2('0xb')],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0xb9f2('0x2')],'allowNull':![],'defaultValue':_0xb9f2('0x2a'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0xb9f2('0xb')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize['STRING'],'defaultValue':_0xb9f2('0x2b')},'systemAvatar':{'type':Sequelize[_0xb9f2('0xd')]},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'comment':_0xb9f2('0x2c')},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0xa1b04f){if(!_0xa1b04f)this[_0xb9f2('0x1b')](_0xb9f2('0x2d'),null);this[_0xb9f2('0x1b')](_0xb9f2('0x2e'),_0xa1b04f);}},'vidaooEscalation':{'type':Sequelize[_0xb9f2('0x6')],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize[_0xb9f2('0x2')]},'vidaooTopic':{'type':Sequelize[_0xb9f2('0x2')],'allowNull':![],'defaultValue':_0xb9f2('0x2f')},'vidaooNote':{'type':Sequelize[_0xb9f2('0x2')],'defaultValue':function(){return _0xb9f2('0x30');}},'vidaooMetadata':{'type':Sequelize[_0xb9f2('0xd')],'defaultValue':null},'openNewInteraction':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize[_0xb9f2('0xd')]}};
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.controller.js b/server/api/chatWebsite/chatWebsite.controller.js
index 8a3c262..74c6534 100644
--- a/server/api/chatWebsite/chatWebsite.controller.js
+++ b/server/api/chatWebsite/chatWebsite.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6715=['forwardOfflineAddress','SendMail','sendMail','\x22%s\x22\x20<%s>','email','user','MailAccountId','subjectOffline','toPairsIn','mapValues','lastName','offlineMessageSubject','Chat','NotifyMailAccount','notifyMail','attachments','offline-chat','remove','Could\x20not\x20remove\x20attachment\x20file','addInteraction','Owner','fullname','internal','Tag','color','tag','getProactiveActions','increment','chatLicenseExceeded','server/files/chat/iframe.ejs','3.12.2','origin','headers','http://localhost:9000','testWebsiteWithWildcard','remote','connection','virtual','alignment','labelText','textColor','textButtonColor','color_button','backgroundColor','hideWhenOffline','IntervalId','addApplications','sequelize','Transaction','ISOLATION_LEVELS','READ_COMMITTED','bulkCreate','findAndCountAll','priority','finally','getApplications','addProactiveActions','omit','ChatProactiveAction','getFields','online','false','offlineForm','items','fromKey','getOfflineMessages','Contact','addAgents','emit','userChatWebsite:save','removeAgents','isArray','userChatWebsite:remove','getAgents','mustache','util','path','ejs','fs-extra','lodash','querystring','ioredis','../../components/parsers/qs','api','../../config/environment','../../errors/api','APIBadRequestError','APINotFoundError','APIOutOfIntervalError','url','URL','redis','localhost','socket.io-emitter','./chatWebsite.socket','client','http','request','request\x20sent','ChatWebsite,\x20%s,\x20%s,\x20%s','error','code','ChatWebsite,\x20%s,\x20%s','message','info','result','catch','status','end','json','limit','undefined','count','offset','set','Content-Range','update','then','destroy','ChatWebsites','sendStatus','stack','name','send','user-agent-parser','user-agent','getResult','cf-connecting-ip','x-forwarded-for','first','split','firstName','x-real-port','referer','browser','version','format','%s\x20%s','unknown','device','model','vendor','%s\x20%s\x20%s','stringify','index','Pause','mandatoryDispositionPause','map','ChatWebsite','rawAttributes','fieldName','type','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filters','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','find','body','address','forEach','trim','testWildcardValidity','\x22\x20is\x20not\x20a\x20valid\x20wildcard\x20expression','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','create','params','describe','Disposition','getDispositions','order','pick','ChatWebsiteId','removeDispositions','ids','addAnswer','findOne','CannedAnswer','removeAnswers','sitepic','file','filename','addAvatar','addCustomerAvatar','customerAvatar','getLogo','join','root','server/files/images/logos/default_logo.svg','../../config/license/util','getLicense','custom','existsSync','server/files/images/logos/','server/files/images/avatars/default_avatar.png','agentAvatar','isNil','download','server/files/images/avatars/customer_avatar.png','server/files/images/avatars/','showCustomerAvatar','server/files/images/avatars/system_avatar.png','systemAvatar','ifTime','from','From\x20is\x20mandatory','mapKey','MapKey\x20is\x20mandatory','isEmpty','customerIp','No\x20available\x20attributes','createdAt','updatedAt','includes','CompanyId','ListId','Invalid\x20MapKey\x20parameter.\x20Allowed\x20values:\x20','List','CmContact','DESC','ChatApplication','Applications','Interval','Intervals','interval','Chat\x20Website\x20with\x20id\x20%s\x20not\x20found','account','applications','list','Contacts','defaults','contact','threadId','ChatInteraction','closed','Writing\x20on\x20closed\x20interaction','externalUrl','ContactId','interaction','messageId','created','push','close','unmanaged','*,*,*,*','ChatMessage','AttachmentId','UserId','User','agent','waitForTheAssignedAgent','forcedOwnership','queueId','unshift','queue','waitForTheAssignedQueue','startRouting','EventManager','files','Sequelize','ValidationError','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','mapKeyOffline','mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','MailAccount','spread','readFileSync','server/files/templates/chatOfflineMessage.ejs','utf8','toPairs','ChatOfflineMessage','fromString','originalname','mimetype','server','basename','transaction','Attachment','MailServerOut','Smtp','CloudProvider'];(function(_0x5313c4,_0x2d2377){var _0xee704d=function(_0x53ef55){while(--_0x53ef55){_0x5313c4['push'](_0x5313c4['shift']());}};_0xee704d(++_0x2d2377);}(_0x6715,0x179));var _0x5671=function(_0x4639e7,_0x54f36f){_0x4639e7=_0x4639e7-0x0;var _0x555eb4=_0x6715[_0x4639e7];return _0x555eb4;};'use strict';var Mustache=require(_0x5671('0x0'));var util=require(_0x5671('0x1'));var path=require(_0x5671('0x2'));var ejs=require(_0x5671('0x3'));var fs=require('fs');var fs_extra=require(_0x5671('0x4'));var _=require(_0x5671('0x5'));var querystring=require(_0x5671('0x6'));var htmlToText=require('html-to-text');var Redis=require(_0x5671('0x7'));var jayson=require('jayson/promise');var qs=require(_0x5671('0x8'));var logger=require('../../config/logger')(_0x5671('0x9'));var config=require(_0x5671('0xa'));var APIBadRequestError=require(_0x5671('0xb'))[_0x5671('0xc')];var APINotFoundError=require(_0x5671('0xb'))[_0x5671('0xd')];var APIOutOfIntervalError=require(_0x5671('0xb'))[_0x5671('0xe')];var APIHandleError=require(_0x5671('0xb'))['handleError'];var APIConflictError=require(_0x5671('0xb'))['APIConflictError'];var wildcardUtils=require('./helpers/wildcard-expressions');var URL=require(_0x5671('0xf'))[_0x5671('0x10')];var db=require('../../mysqldb')['db'];config[_0x5671('0x11')]=_['defaults'](config['redis'],{'host':_0x5671('0x12'),'port':0x18eb});var socket=require(_0x5671('0x13'))(new Redis(config[_0x5671('0x11')]));require(_0x5671('0x14'))['register'](socket);var client=jayson[_0x5671('0x15')][_0x5671('0x16')]({'port':0x232c});var client9002=jayson[_0x5671('0x15')]['http']({'port':0x232a});var client9003=jayson['client'][_0x5671('0x16')]({'port':0x232b});var client9001=jayson[_0x5671('0x15')][_0x5671('0x16')]({'port':0x2329});function respondWithRpcPromise(_0x5bf1a7,_0x10a7c2,_0x3bc87c,_0x3ba2ac){return new Promise(function(_0x3e179b,_0xbae66d){var _0x351336=_0x3ba2ac||client;return _0x351336[_0x5671('0x17')](_0x5bf1a7,_0x3bc87c)['then'](function(_0x544e92){logger['info']('ChatWebsite,\x20%s,\x20%s',_0x10a7c2,_0x5671('0x18'));logger['debug'](_0x5671('0x19'),_0x10a7c2,_0x5671('0x18'),JSON['stringify'](_0x544e92));if(_0x544e92[_0x5671('0x1a')]){if(_0x544e92[_0x5671('0x1a')][_0x5671('0x1b')]===0x1f4){logger[_0x5671('0x1a')](_0x5671('0x1c'),_0x10a7c2,_0x544e92['error'][_0x5671('0x1d')]);return _0xbae66d(_0x544e92['error'][_0x5671('0x1d')]);}logger['error'](_0x5671('0x1c'),_0x10a7c2,_0x544e92[_0x5671('0x1a')][_0x5671('0x1d')]);return _0x3e179b(_0x544e92['error'][_0x5671('0x1d')]);}else{logger[_0x5671('0x1e')](_0x5671('0x1c'),_0x10a7c2,'request\x20sent');_0x3e179b(_0x544e92[_0x5671('0x1f')][_0x5671('0x1d')]);}})[_0x5671('0x20')](function(_0x3c15fa){logger[_0x5671('0x1a')](_0x5671('0x1c'),_0x10a7c2,_0x3c15fa);_0xbae66d(_0x3c15fa);});});}function respondWithStatusCode(_0x84162f,_0x5a9124){_0x5a9124=_0x5a9124||0xcc;return function(_0x176aa3){if(_0x176aa3){return _0x84162f['sendStatus'](_0x5a9124);}return _0x84162f[_0x5671('0x21')](_0x5a9124)[_0x5671('0x22')]();};}function respondWithResult(_0x3ed0ab,_0x446051){_0x446051=_0x446051||0xc8;return function(_0x3eb750){if(_0x3eb750){return _0x3ed0ab[_0x5671('0x21')](_0x446051)[_0x5671('0x23')](_0x3eb750);}};}function respondWithFilteredResult(_0x3a0152,_0x2756d5){return function(_0x5ed665){if(_0x5ed665){var _0xb455be=typeof _0x2756d5['offset']==='undefined'&&typeof _0x2756d5[_0x5671('0x24')]===_0x5671('0x25');var _0x4411dd=_0x5ed665[_0x5671('0x26')];var _0xb2107f=_0xb455be?0x0:_0x2756d5[_0x5671('0x27')];var _0x9d66b4=_0xb455be?_0x5ed665['count']:_0x2756d5['offset']+_0x2756d5['limit'];var _0x4661e1;if(_0x9d66b4>=_0x4411dd){_0x9d66b4=_0x4411dd;_0x4661e1=0xc8;}else{_0x4661e1=0xce;}_0x3a0152['status'](_0x4661e1);return _0x3a0152[_0x5671('0x28')](_0x5671('0x29'),_0xb2107f+'-'+_0x9d66b4+'/'+_0x4411dd)['json'](_0x5ed665);}return null;};}function saveUpdates(_0x3d7f91){return function(_0x4c54b7){if(_0x4c54b7){return _0x4c54b7[_0x5671('0x2a')](_0x3d7f91)[_0x5671('0x2b')](function(_0x317c73){return _0x317c73;});}return null;};}function removeEntity(_0x16a92d){return function(_0x57afe0){if(_0x57afe0){return _0x57afe0[_0x5671('0x2c')]()[_0x5671('0x2b')](function(){var _0x54fc76=_0x57afe0['get']({'plain':!![]});var _0x2d33de=_0x5671('0x2d');return db['UserProfileResource'][_0x5671('0x2c')]({'where':{'type':_0x2d33de,'resourceId':_0x54fc76['id']}})[_0x5671('0x2b')](function(){return _0x57afe0;});})[_0x5671('0x2b')](function(){_0x16a92d[_0x5671('0x21')](0xcc)[_0x5671('0x22')]();});}};}function handleEntityNotFound(_0x55da73){return function(_0x94c4a6){if(!_0x94c4a6){_0x55da73[_0x5671('0x2e')](0x194);}return _0x94c4a6;};}function handleError(_0x22f4e1,_0x56aeea){_0x56aeea=_0x56aeea||0x1f4;return function(_0x558c3f){logger[_0x5671('0x1a')](_0x558c3f[_0x5671('0x2f')]);if(_0x558c3f[_0x5671('0x30')]){delete _0x558c3f[_0x5671('0x30')];}_0x22f4e1[_0x5671('0x21')](_0x56aeea)[_0x5671('0x31')](_0x558c3f);};}function createInteractionObject(_0x5ddcb0,_0x36b507,_0xc74181,_0x1df606){var _0x3bd0e2=require(_0x5671('0x32'));var _0x1a05f7=new _0x3bd0e2();var _0x74b1f3=_0x1a05f7['setUA'](_0xc74181[_0x5671('0x33')])[_0x5671('0x34')]();var _0x63fc1=_0x36b507['customerIp'];if(_0xc74181[_0x5671('0x35')]){_0x63fc1=_0xc74181[_0x5671('0x35')];}else if(_0xc74181[_0x5671('0x36')]){_0x63fc1=_[_0x5671('0x37')](_0xc74181[_0x5671('0x36')][_0x5671('0x38')](','));}return{'ContactId':_0x1df606['id'],'ChatWebsiteId':_0x5ddcb0,'from':(_0x1df606[_0x5671('0x39')]||'')+'\x20'+(_0x1df606['lastName']||''),'customerIp':_0x63fc1,'customerPort':_0xc74181[_0x5671('0x3a')]?_0xc74181[_0x5671('0x3a')]:null,'referer':_0x36b507[_0x5671('0x3b')],'browserName':_0x74b1f3[_0x5671('0x3c')][_0x5671('0x30')]&&_0x74b1f3['browser'][_0x5671('0x3d')]?util[_0x5671('0x3e')](_0x5671('0x3f'),_0x74b1f3[_0x5671('0x3c')][_0x5671('0x30')],_0x74b1f3[_0x5671('0x3c')][_0x5671('0x3d')]):_0x5671('0x40'),'browserVersion':_0x74b1f3[_0x5671('0x3c')][_0x5671('0x3d')]||_0x5671('0x40'),'osName':util[_0x5671('0x3e')](_0x5671('0x3f'),_0x74b1f3['os']['name'],_0x74b1f3['os'][_0x5671('0x3d')]),'osVersion':_0x74b1f3['os']['version'],'deviceModel':_0x74b1f3[_0x5671('0x41')][_0x5671('0x42')]&&_0x74b1f3[_0x5671('0x41')][_0x5671('0x43')]?util[_0x5671('0x3e')](_0x5671('0x44'),_0x74b1f3[_0x5671('0x41')][_0x5671('0x42')],_0x74b1f3[_0x5671('0x41')][_0x5671('0x43')],_0x74b1f3[_0x5671('0x41')]['type']):null,'deviceVendor':_0x74b1f3[_0x5671('0x41')]['vendor'],'deviceType':_0x74b1f3['device']['type'],'formData':JSON[_0x5671('0x45')](_0x36b507)};}exports[_0x5671('0x46')]=function(_0x1bf367,_0x1faca2){var _0x3fa4db={'include':[{'model':db[_0x5671('0x47')],'as':_0x5671('0x48')}]},_0x4dbb4f={},_0x47d23b={'count':0x0,'rows':[]};var _0x323408=_[_0x5671('0x49')](db[_0x5671('0x4a')][_0x5671('0x4b')],function(_0x3be19e){return{'name':_0x3be19e[_0x5671('0x4c')],'type':_0x3be19e[_0x5671('0x4d')]['key']};});_0x4dbb4f[_0x5671('0x42')]=_[_0x5671('0x49')](_0x323408,'name');_0x4dbb4f[_0x5671('0x4e')]=_[_0x5671('0x4f')](_0x1bf367['query']);_0x4dbb4f['filters']=_[_0x5671('0x50')](_0x4dbb4f[_0x5671('0x42')],_0x4dbb4f[_0x5671('0x4e')]);_0x3fa4db[_0x5671('0x51')]=_['intersection'](_0x4dbb4f[_0x5671('0x42')],qs[_0x5671('0x52')](_0x1bf367[_0x5671('0x4e')]['fields']));_0x3fa4db[_0x5671('0x51')]=_0x3fa4db[_0x5671('0x51')][_0x5671('0x53')]?_0x3fa4db[_0x5671('0x51')]:_0x4dbb4f[_0x5671('0x42')];if(!_0x1bf367[_0x5671('0x4e')][_0x5671('0x54')](_0x5671('0x55'))){_0x3fa4db[_0x5671('0x24')]=qs[_0x5671('0x24')](_0x1bf367[_0x5671('0x4e')][_0x5671('0x24')]);_0x3fa4db[_0x5671('0x27')]=qs['offset'](_0x1bf367['query'][_0x5671('0x27')]);}_0x3fa4db['order']=qs[_0x5671('0x56')](_0x1bf367['query'][_0x5671('0x56')]);_0x3fa4db[_0x5671('0x57')]=qs[_0x5671('0x58')](_['pick'](_0x1bf367[_0x5671('0x4e')],_0x4dbb4f['filters']),_0x323408);if(_0x1bf367[_0x5671('0x4e')][_0x5671('0x59')]){_0x3fa4db[_0x5671('0x57')]=_[_0x5671('0x5a')](_0x3fa4db[_0x5671('0x57')],{'$or':_['map'](_0x323408,function(_0x529a12){if(_0x529a12[_0x5671('0x4d')]!==_0x5671('0x5b')){var _0x5c23cf={};_0x5c23cf[_0x529a12['name']]={'$like':'%'+_0x1bf367[_0x5671('0x4e')][_0x5671('0x59')]+'%'};return _0x5c23cf;}})});}_0x3fa4db=_['merge']({},_0x3fa4db,_0x1bf367[_0x5671('0x5c')]);var _0x1406d4={'where':_0x3fa4db[_0x5671('0x57')]};return db[_0x5671('0x4a')][_0x5671('0x26')](_0x1406d4)[_0x5671('0x2b')](function(_0x286757){_0x47d23b['count']=_0x286757;if(_0x1bf367[_0x5671('0x4e')][_0x5671('0x5d')]){_0x3fa4db[_0x5671('0x5e')]=[{'all':!![]}];}return db[_0x5671('0x4a')][_0x5671('0x5f')](_0x3fa4db);})[_0x5671('0x2b')](function(_0x121112){_0x47d23b[_0x5671('0x60')]=_0x121112;return _0x47d23b;})[_0x5671('0x2b')](respondWithFilteredResult(_0x1faca2,_0x3fa4db))[_0x5671('0x20')](handleError(_0x1faca2,null));};exports['show']=function(_0x163423,_0x410569){var _0x5cf71d={'raw':![],'where':{'id':_0x163423['params']['id']},'include':[{'model':db[_0x5671('0x47')],'as':_0x5671('0x48')}]},_0x2febe0={};_0x2febe0[_0x5671('0x42')]=_[_0x5671('0x4f')](db[_0x5671('0x4a')]['rawAttributes']);_0x2febe0[_0x5671('0x4e')]=_[_0x5671('0x4f')](_0x163423[_0x5671('0x4e')]);_0x2febe0['filters']=_[_0x5671('0x50')](_0x2febe0[_0x5671('0x42')],_0x2febe0[_0x5671('0x4e')]);_0x5cf71d['attributes']=_[_0x5671('0x50')](_0x2febe0[_0x5671('0x42')],qs['fields'](_0x163423[_0x5671('0x4e')][_0x5671('0x52')]));_0x5cf71d[_0x5671('0x51')]=_0x5cf71d[_0x5671('0x51')][_0x5671('0x53')]?_0x5cf71d['attributes']:_0x2febe0[_0x5671('0x42')];if(_0x163423['query'][_0x5671('0x5d')]){_0x5cf71d[_0x5671('0x5e')]=[{'all':!![]}];}_0x5cf71d=_[_0x5671('0x5a')]({},_0x5cf71d,_0x163423['options']);return db['ChatWebsite'][_0x5671('0x61')](_0x5cf71d)['then'](handleEntityNotFound(_0x410569,null))['then'](respondWithResult(_0x410569,null))['catch'](handleError(_0x410569,null));};exports['create']=function(_0x2d899b,_0x169f17){var _0x2ef081=null;_0x2d899b[_0x5671('0x62')][_0x5671('0x63')]['split'](',')[_0x5671('0x64')](_0x2f0c5b=>{if(_0x2f0c5b[_0x5671('0x65')]()!==''&&!wildcardUtils[_0x5671('0x66')](_0x2f0c5b['trim']())){_0x2ef081=new APIBadRequestError('\x22'+_0x2f0c5b[_0x5671('0x65')]()+_0x5671('0x67'));}});if(_0x2ef081){return handleError(_0x169f17,null)(_0x2ef081);}return db[_0x5671('0x4a')]['create'](_0x2d899b[_0x5671('0x62')],{})['then'](function(_0x5b6885){var _0xc21ee3=_0x2d899b['user'][_0x5671('0x68')]({'plain':!![]});if(!_0xc21ee3)throw new Error(_0x5671('0x69'));if(_0xc21ee3[_0x5671('0x6a')]==='user'){var _0x122985=_0x5b6885['get']({'plain':!![]});var _0x2a2c16=_0x5671('0x2d');return db[_0x5671('0x6b')][_0x5671('0x61')]({'where':{'name':_0x2a2c16,'userProfileId':_0xc21ee3[_0x5671('0x6c')]},'raw':!![]})['then'](function(_0x3e9af1){if(_0x3e9af1&&_0x3e9af1[_0x5671('0x6d')]===0x0){return db[_0x5671('0x6e')][_0x5671('0x6f')]({'name':_0x122985[_0x5671('0x30')],'resourceId':_0x122985['id'],'type':_0x3e9af1[_0x5671('0x30')],'sectionId':_0x3e9af1['id']},{})[_0x5671('0x2b')](function(){return _0x5b6885;});}else{return _0x5b6885;}})[_0x5671('0x20')](function(_0x2ae18d){logger[_0x5671('0x1a')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2ae18d);throw _0x2ae18d;});}return _0x5b6885;})['then'](respondWithResult(_0x169f17,0xc9))[_0x5671('0x20')](handleError(_0x169f17,null));};exports[_0x5671('0x2a')]=function(_0x13763a,_0x263436){var _0x4fd65d=null;_0x13763a[_0x5671('0x62')][_0x5671('0x63')][_0x5671('0x38')](',')[_0x5671('0x64')](_0x5311a7=>{if(_0x5311a7['trim']()!==''&&!wildcardUtils['testWildcardValidity'](_0x5311a7['trim']())){_0x4fd65d=new APIBadRequestError('\x22'+_0x5311a7[_0x5671('0x65')]()+_0x5671('0x67'));}});if(_0x4fd65d){return handleError(_0x263436,null)(_0x4fd65d);}if(_0x13763a['body']['id']){delete _0x13763a[_0x5671('0x62')]['id'];}return db[_0x5671('0x4a')][_0x5671('0x61')]({'where':{'id':_0x13763a[_0x5671('0x70')]['id']},'include':[{'model':db[_0x5671('0x47')],'as':_0x5671('0x48')}]})['then'](handleEntityNotFound(_0x263436,null))[_0x5671('0x2b')](saveUpdates(_0x13763a[_0x5671('0x62')],null))['then'](respondWithResult(_0x263436,null))['catch'](handleError(_0x263436,null));};exports[_0x5671('0x2c')]=function(_0x124e80,_0x4db4cc){return db[_0x5671('0x4a')][_0x5671('0x61')]({'where':{'id':_0x124e80[_0x5671('0x70')]['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0x4db4cc,null))[_0x5671('0x2b')](removeEntity(_0x4db4cc,null))[_0x5671('0x20')](handleError(_0x4db4cc,null));};exports[_0x5671('0x71')]=function(_0x414b14,_0x169296){return db['ChatWebsite'][_0x5671('0x71')]()[_0x5671('0x2b')](respondWithResult(_0x169296,null))[_0x5671('0x20')](handleError(_0x169296,null));};exports['addDisposition']=function(_0x16be0a,_0x4dfd11){if(_0x16be0a['body']['id']){delete _0x16be0a[_0x5671('0x62')]['id'];}return db[_0x5671('0x4a')][_0x5671('0x61')]({'where':{'id':_0x16be0a[_0x5671('0x70')]['id']}})['then'](handleEntityNotFound(_0x4dfd11,null))[_0x5671('0x2b')](function(_0x2e13fe){if(_0x2e13fe){_0x16be0a[_0x5671('0x62')]['ChatWebsiteId']=_0x2e13fe['id'];return db[_0x5671('0x72')][_0x5671('0x6f')](_0x16be0a[_0x5671('0x62')]);}})[_0x5671('0x2b')](respondWithResult(_0x4dfd11,null))['catch'](handleError(_0x4dfd11,null));};exports[_0x5671('0x73')]=function(_0x53d253,_0x508531){var _0x4c93c8={'raw':![],'where':{}};var _0x5568ad={};var _0x8f92e0={'count':0x0,'rows':[]};return db[_0x5671('0x4a')]['findOne']({'where':{'id':_0x53d253[_0x5671('0x70')]['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0x508531,null))[_0x5671('0x2b')](function(_0x2eb578){if(_0x2eb578){_0x5568ad[_0x5671('0x42')]=_[_0x5671('0x4f')](db[_0x5671('0x72')]['rawAttributes']);_0x5568ad[_0x5671('0x4e')]=_[_0x5671('0x4f')](_0x53d253[_0x5671('0x4e')]);_0x5568ad[_0x5671('0x58')]=_[_0x5671('0x50')](_0x5568ad['model'],_0x5568ad[_0x5671('0x4e')]);_0x4c93c8[_0x5671('0x51')]=_[_0x5671('0x50')](_0x5568ad[_0x5671('0x42')],qs[_0x5671('0x52')](_0x53d253['query'][_0x5671('0x52')]));_0x4c93c8['attributes']=_0x4c93c8[_0x5671('0x51')][_0x5671('0x53')]?_0x4c93c8['attributes']:_0x5568ad[_0x5671('0x42')];if(!_0x53d253[_0x5671('0x4e')][_0x5671('0x54')](_0x5671('0x55'))){_0x4c93c8[_0x5671('0x24')]=qs[_0x5671('0x24')](_0x53d253['query']['limit']);_0x4c93c8[_0x5671('0x27')]=qs[_0x5671('0x27')](_0x53d253[_0x5671('0x4e')][_0x5671('0x27')]);}_0x4c93c8[_0x5671('0x74')]=qs[_0x5671('0x56')](_0x53d253[_0x5671('0x4e')][_0x5671('0x56')]);_0x4c93c8[_0x5671('0x57')]=qs['filters'](_[_0x5671('0x75')](_0x53d253[_0x5671('0x4e')],_0x5568ad[_0x5671('0x58')]));_0x4c93c8[_0x5671('0x57')][_0x5671('0x76')]=_0x2eb578['id'];if(_0x53d253[_0x5671('0x4e')][_0x5671('0x59')]){_0x4c93c8['where']=_[_0x5671('0x5a')](_0x4c93c8[_0x5671('0x57')],{'$or':_[_0x5671('0x49')](_0x4c93c8[_0x5671('0x51')],function(_0x29192c){var _0x16cabb={};_0x16cabb[_0x29192c]={'$like':'%'+_0x53d253[_0x5671('0x4e')]['filter']+'%'};return _0x16cabb;})});}_0x4c93c8=_[_0x5671('0x5a')]({},_0x4c93c8,_0x53d253[_0x5671('0x5c')]);return db[_0x5671('0x72')][_0x5671('0x26')]({'where':_0x4c93c8[_0x5671('0x57')]})['then'](function(_0x1a67da){_0x8f92e0['count']=_0x1a67da;if(_0x53d253[_0x5671('0x4e')][_0x5671('0x5d')]){_0x4c93c8[_0x5671('0x5e')]=[{'all':!![]}];}return db[_0x5671('0x72')][_0x5671('0x5f')](_0x4c93c8);})[_0x5671('0x2b')](function(_0x473afc){_0x8f92e0['rows']=_0x473afc;return _0x8f92e0;});}})[_0x5671('0x2b')](respondWithFilteredResult(_0x508531,_0x4c93c8))[_0x5671('0x20')](handleError(_0x508531,null));};exports[_0x5671('0x77')]=function(_0x41ca14,_0x58db89){return db[_0x5671('0x4a')]['find']({'where':{'id':_0x41ca14[_0x5671('0x70')]['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0x58db89,null))[_0x5671('0x2b')](function(_0x4344c0){if(_0x4344c0){return _0x4344c0[_0x5671('0x77')](_0x41ca14['query'][_0x5671('0x78')]);}})['then'](respondWithStatusCode(_0x58db89,null))[_0x5671('0x20')](handleError(_0x58db89,null));};exports[_0x5671('0x79')]=function(_0x1c3d2a,_0x1ab2bb){if(_0x1c3d2a['body']['id']){delete _0x1c3d2a[_0x5671('0x62')]['id'];}return db[_0x5671('0x4a')][_0x5671('0x61')]({'where':{'id':_0x1c3d2a[_0x5671('0x70')]['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0x1ab2bb,null))[_0x5671('0x2b')](function(_0x12e2fe){if(_0x12e2fe){_0x1c3d2a[_0x5671('0x62')]['ChatWebsiteId']=_0x12e2fe['id'];return db['CannedAnswer'][_0x5671('0x6f')](_0x1c3d2a[_0x5671('0x62')]);}})[_0x5671('0x2b')](respondWithResult(_0x1ab2bb,null))['catch'](handleError(_0x1ab2bb,null));};exports['getAnswers']=function(_0x4067b0,_0x2eab6d){var _0x1b9676={'raw':![],'where':{}};var _0x1c0415={};var _0x3b9d1e={'count':0x0,'rows':[]};return db[_0x5671('0x4a')][_0x5671('0x7a')]({'where':{'id':_0x4067b0['params']['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0x2eab6d,null))['then'](function(_0x34f7c3){if(_0x34f7c3){_0x1c0415['model']=_[_0x5671('0x4f')](db[_0x5671('0x7b')][_0x5671('0x4b')]);_0x1c0415[_0x5671('0x4e')]=_[_0x5671('0x4f')](_0x4067b0[_0x5671('0x4e')]);_0x1c0415['filters']=_[_0x5671('0x50')](_0x1c0415['model'],_0x1c0415[_0x5671('0x4e')]);_0x1b9676[_0x5671('0x51')]=_[_0x5671('0x50')](_0x1c0415[_0x5671('0x42')],qs[_0x5671('0x52')](_0x4067b0[_0x5671('0x4e')][_0x5671('0x52')]));_0x1b9676['attributes']=_0x1b9676[_0x5671('0x51')]['length']?_0x1b9676[_0x5671('0x51')]:_0x1c0415[_0x5671('0x42')];if(!_0x4067b0['query'][_0x5671('0x54')]('nolimit')){_0x1b9676['limit']=qs[_0x5671('0x24')](_0x4067b0['query'][_0x5671('0x24')]);_0x1b9676[_0x5671('0x27')]=qs[_0x5671('0x27')](_0x4067b0['query'][_0x5671('0x27')]);}_0x1b9676['order']=qs[_0x5671('0x56')](_0x4067b0[_0x5671('0x4e')]['sort']);_0x1b9676['where']=qs[_0x5671('0x58')](_[_0x5671('0x75')](_0x4067b0[_0x5671('0x4e')],_0x1c0415[_0x5671('0x58')]));_0x1b9676['where']['ChatWebsiteId']=_0x34f7c3['id'];if(_0x4067b0[_0x5671('0x4e')][_0x5671('0x59')]){_0x1b9676[_0x5671('0x57')]=_[_0x5671('0x5a')](_0x1b9676[_0x5671('0x57')],{'$or':_[_0x5671('0x49')](_0x1b9676['attributes'],function(_0x3629b6){var _0x1942cb={};_0x1942cb[_0x3629b6]={'$like':'%'+_0x4067b0[_0x5671('0x4e')][_0x5671('0x59')]+'%'};return _0x1942cb;})});}_0x1b9676=_[_0x5671('0x5a')]({},_0x1b9676,_0x4067b0[_0x5671('0x5c')]);return db[_0x5671('0x7b')][_0x5671('0x26')]({'where':_0x1b9676['where']})['then'](function(_0x24899f){_0x3b9d1e[_0x5671('0x26')]=_0x24899f;if(_0x4067b0[_0x5671('0x4e')][_0x5671('0x5d')]){_0x1b9676[_0x5671('0x5e')]=[{'all':!![]}];}return db['CannedAnswer']['findAll'](_0x1b9676);})[_0x5671('0x2b')](function(_0x10fc7f){_0x3b9d1e[_0x5671('0x60')]=_0x10fc7f;return _0x3b9d1e;});}})['then'](respondWithFilteredResult(_0x2eab6d,_0x1b9676))[_0x5671('0x20')](handleError(_0x2eab6d,null));};exports[_0x5671('0x7c')]=function(_0x513de5,_0xd32f95){return db[_0x5671('0x4a')][_0x5671('0x61')]({'where':{'id':_0x513de5['params']['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0xd32f95,null))[_0x5671('0x2b')](function(_0x459047){if(_0x459047){return _0x459047[_0x5671('0x7c')](_0x513de5[_0x5671('0x4e')]['ids']);}})[_0x5671('0x2b')](respondWithStatusCode(_0xd32f95,null))['catch'](handleError(_0xd32f95,null));};exports['addLogo']=function(_0x2af70e,_0x5ac74a){_0x2af70e[_0x5671('0x62')][_0x5671('0x7d')]=_0x2af70e[_0x5671('0x7e')][_0x5671('0x7f')];return db['ChatWebsite'][_0x5671('0x61')]({'where':{'id':_0x2af70e[_0x5671('0x70')]['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0x5ac74a,null))[_0x5671('0x2b')](saveUpdates(_0x2af70e[_0x5671('0x62')],null))[_0x5671('0x2b')](respondWithResult(_0x5ac74a,null))[_0x5671('0x20')](handleError(_0x5ac74a,null));};exports[_0x5671('0x80')]=function(_0x1e8bd5,_0x1bbdaf){_0x1e8bd5['body']['agentAvatar']=_0x1e8bd5[_0x5671('0x7e')]['filename'];return db[_0x5671('0x4a')][_0x5671('0x61')]({'where':{'id':_0x1e8bd5[_0x5671('0x70')]['id']}})['then'](handleEntityNotFound(_0x1bbdaf,null))[_0x5671('0x2b')](saveUpdates(_0x1e8bd5['body'],null))[_0x5671('0x2b')](respondWithResult(_0x1bbdaf,null))[_0x5671('0x20')](handleError(_0x1bbdaf,null));};exports[_0x5671('0x81')]=function(_0x7b4c92,_0x48b2fd){_0x7b4c92[_0x5671('0x62')][_0x5671('0x82')]=_0x7b4c92[_0x5671('0x7e')][_0x5671('0x7f')];return db['ChatWebsite'][_0x5671('0x61')]({'where':{'id':_0x7b4c92['params']['id']}})['then'](handleEntityNotFound(_0x48b2fd,null))[_0x5671('0x2b')](saveUpdates(_0x7b4c92[_0x5671('0x62')],null))['then'](respondWithResult(_0x48b2fd,null))['catch'](handleError(_0x48b2fd,null));};exports['addSystemAvatar']=function(_0x8d2639,_0xe3994a){_0x8d2639[_0x5671('0x62')]['systemAvatar']=_0x8d2639[_0x5671('0x7e')][_0x5671('0x7f')];return db[_0x5671('0x4a')]['find']({'where':{'id':_0x8d2639[_0x5671('0x70')]['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0xe3994a,null))[_0x5671('0x2b')](saveUpdates(_0x8d2639[_0x5671('0x62')],null))[_0x5671('0x2b')](respondWithResult(_0xe3994a,null))[_0x5671('0x20')](handleError(_0xe3994a,null));};exports[_0x5671('0x83')]=function(_0x17c08e,_0x38e471){var _0x1a976e=path[_0x5671('0x84')](config[_0x5671('0x85')],_0x5671('0x86'));var _0x1a7eae={'where':{'id':_0x17c08e['params']['id']},'attributes':['id',_0x5671('0x7d')],'raw':!![]};var _0x8ab2f6=![];return require(_0x5671('0x87'))[_0x5671('0x88')]()[_0x5671('0x2b')](function(_0x4a3605){if(_0x4a3605){_0x8ab2f6=_0x4a3605[_0x5671('0x89')];}})['then'](function(){return db[_0x5671('0x4a')][_0x5671('0x61')](_0x1a7eae);})['then'](handleEntityNotFound(_0x38e471,null))[_0x5671('0x2b')](function(_0x55572c){if(_0x55572c){if(!_['isNil'](_0x55572c[_0x5671('0x7d')])){if(fs[_0x5671('0x8a')](path[_0x5671('0x84')](config[_0x5671('0x85')],_0x5671('0x8b'),_0x55572c['sitepic']))&&_0x8ab2f6){_0x1a976e=path[_0x5671('0x84')](config[_0x5671('0x85')],_0x5671('0x8b'),_0x55572c[_0x5671('0x7d')]);}}return _0x38e471['download'](_0x1a976e);}})[_0x5671('0x20')](handleError(_0x38e471,null));};exports['getAvatar']=function(_0x374a9b,_0x41d357){var _0x9515fe=path[_0x5671('0x84')](config[_0x5671('0x85')],_0x5671('0x8c'));var _0x344794={'where':{'id':_0x374a9b[_0x5671('0x70')]['id']},'attributes':['id',_0x5671('0x8d')],'raw':!![]};return db[_0x5671('0x4a')]['find'](_0x344794)['then'](handleEntityNotFound(_0x41d357,null))[_0x5671('0x2b')](function(_0x47685f){if(_0x47685f){if(!_[_0x5671('0x8e')](_0x47685f[_0x5671('0x8d')])){if(fs[_0x5671('0x8a')](path[_0x5671('0x84')](config[_0x5671('0x85')],'server/files/images/avatars/',_0x47685f[_0x5671('0x8d')]))){_0x9515fe=path[_0x5671('0x84')](config[_0x5671('0x85')],'server/files/images/avatars/',_0x47685f[_0x5671('0x8d')]);}}return _0x41d357[_0x5671('0x8f')](_0x9515fe);}})[_0x5671('0x20')](handleError(_0x41d357,null));};exports['getCustomerAvatar']=function(_0x10703a,_0xbf7a54){var _0x26550a=path[_0x5671('0x84')](config['root'],_0x5671('0x90'));var _0x2bcfda={'where':{'id':_0x10703a[_0x5671('0x70')]['id']},'attributes':['id',_0x5671('0x82'),'showCustomerAvatar'],'raw':!![]};return db['ChatWebsite']['find'](_0x2bcfda)[_0x5671('0x2b')](handleEntityNotFound(_0xbf7a54,null))[_0x5671('0x2b')](function(_0x411150){if(_0x411150){if(!_[_0x5671('0x8e')](_0x411150[_0x5671('0x82')])){if(fs[_0x5671('0x8a')](path[_0x5671('0x84')](config[_0x5671('0x85')],_0x5671('0x91'),_0x411150['customerAvatar']))&&_0x411150[_0x5671('0x92')]){_0x26550a=path[_0x5671('0x84')](config[_0x5671('0x85')],_0x5671('0x91'),_0x411150[_0x5671('0x82')]);}}return _0xbf7a54[_0x5671('0x8f')](_0x26550a);}})[_0x5671('0x20')](handleError(_0xbf7a54,null));};exports['getSystemAvatar']=function(_0x163733,_0xb41f1c){var _0x53bc08=path[_0x5671('0x84')](config[_0x5671('0x85')],_0x5671('0x93'));var _0x23dba2={'where':{'id':_0x163733[_0x5671('0x70')]['id']},'attributes':['id',_0x5671('0x94')],'raw':!![]};return db[_0x5671('0x4a')][_0x5671('0x61')](_0x23dba2)[_0x5671('0x2b')](handleEntityNotFound(_0xb41f1c,null))[_0x5671('0x2b')](function(_0xc6d797){if(_0xc6d797){if(!_[_0x5671('0x8e')](_0xc6d797[_0x5671('0x94')])){if(fs[_0x5671('0x8a')](path[_0x5671('0x84')](config['root'],_0x5671('0x91'),_0xc6d797[_0x5671('0x94')]))){_0x53bc08=path['join'](config[_0x5671('0x85')],'server/files/images/avatars/',_0xc6d797[_0x5671('0x94')]);}}return _0xb41f1c[_0x5671('0x8f')](_0x53bc08);}})[_0x5671('0x20')](handleError(_0xb41f1c,null));};function checkWebsiteInterval(_0x33bec9){var _0x24fe9e=_0x33bec9['Interval'];if(!_0x24fe9e){return Promise['resolve'](_0x33bec9);}var _0x3058cc=_0x33bec9['timezone']||undefined;return _0x24fe9e[_0x5671('0x95')](_0x3058cc)['then'](function(_0x35821a){if(!_0x35821a){throw new APIOutOfIntervalError();}return _0x33bec9;});}exports['notify']=function(_0x161b78,_0x22d316){var _0x15c57e={'body':_0x161b78[_0x5671('0x62')],'channel':'chat'};var _0x166721=[];var _0x288224=[];var _0x31725c={};var _0x127edc=![];if(_0x161b78[_0x5671('0x62')]['id']){delete _0x161b78['body']['id'];}if(_['isNil'](_0x161b78[_0x5671('0x62')][_0x5671('0x96')])){throw new APIBadRequestError(_0x5671('0x97'));}if(_[_0x5671('0x8e')](_0x161b78['body'][_0x5671('0x98')])){throw new APIBadRequestError(_0x5671('0x99'));}if(_[_0x5671('0x9a')](_0x161b78[_0x5671('0x62')]['body'])){throw new APIBadRequestError('Body\x20is\x20mandatory');}var _0x4732b2=_0x161b78['body'][_0x5671('0x9b')]&&_0x161b78[_0x5671('0x62')][_0x5671('0x3b')];return db['CmContact'][_0x5671('0x71')]()[_0x5671('0x2b')](function(_0x30bba7){if(!_0x30bba7){throw new Error(_0x5671('0x9c'));}_0x166721=Object[_0x5671('0x4f')](_0x30bba7)[_0x5671('0x59')](function(_0x5155db){return![_0x5671('0x9d'),_0x5671('0x9e')][_0x5671('0x9f')](_0x5155db);});_0x288224=Object['keys'](_0x30bba7)['filter'](function(_0x309fa3){return!['createdAt',_0x5671('0x9e'),_0x5671('0xa0'),_0x5671('0xa1')][_0x5671('0x9f')](_0x309fa3);});if(!_[_0x5671('0x9f')](_0x288224,_0x161b78[_0x5671('0x62')][_0x5671('0x98')])){throw new APIBadRequestError(_0x5671('0xa2')+_0x288224[_0x5671('0x84')](',\x20'));}_0x31725c[_0x161b78['body']['mapKey']]=_0x161b78[_0x5671('0x62')][_0x5671('0x96')];})[_0x5671('0x2b')](function(){return db['ChatWebsite']['find']({'where':{'id':_0x161b78[_0x5671('0x70')]['id']},'include':[{'model':db['CmList'],'as':_0x5671('0xa3'),'include':[{'model':db[_0x5671('0xa4')],'as':'Contacts','where':_0x31725c,'limit':0x1,'order':[[_0x5671('0x9e'),_0x5671('0xa5')]]}]},{'model':db[_0x5671('0xa6')],'as':_0x5671('0xa7')},{'model':db['Interval'],'as':_0x5671('0xa8'),'include':[{'model':db[_0x5671('0xa8')],'as':_0x5671('0xa9'),'attributes':['id',_0x5671('0xaa')],'raw':!![]}]}]});})[_0x5671('0x2b')](function(_0x30710d){if(!_0x30710d){throw new APINotFoundError(util[_0x5671('0x3e')](_0x5671('0xab'),_0x161b78[_0x5671('0x70')]['id']));}if(_0x4732b2){return checkWebsiteInterval(_0x30710d);}return _0x30710d;})['then'](function(_0x2e755c){_0x15c57e[_0x5671('0xac')]=_0x2e755c;_0x15c57e[_0x5671('0xad')]=_['orderBy'](_0x2e755c[_0x5671('0xa7')],['priority'],['asc']);if(_0x15c57e[_0x5671('0xac')]['Applications']){delete _0x15c57e['account']['Applications'];}_0x15c57e['list']=_0x2e755c[_0x5671('0xa3')]||{'id':_0x2e755c[_0x5671('0xa1')]};if(_0x15c57e[_0x5671('0xae')]&&_0x15c57e['list'][_0x5671('0xaf')]['length']){return _0x15c57e[_0x5671('0xae')][_0x5671('0xaf')][0x0];}var _0x46ccf7=_[_0x5671('0xb0')](_0x161b78[_0x5671('0x62')],{'firstName':_0x161b78['body'][_0x5671('0x96')],'ListId':_0x2e755c[_0x5671('0xa1')]});_0x46ccf7[_0x161b78['body'][_0x5671('0x98')]]=_0x161b78[_0x5671('0x62')][_0x5671('0x96')];return db[_0x5671('0xa4')][_0x5671('0x6f')](_0x46ccf7,{'fields':_0x166721,'raw':!![]});})[_0x5671('0x2b')](function(_0x461f8e){_0x15c57e[_0x5671('0xb1')]=_0x461f8e;var _0x915e77=createInteractionObject(_0x161b78['params']['id'],_0x161b78['body'],_0x161b78['headers'],_0x461f8e);var _0x1f7058={'ChatWebsiteId':_0x161b78[_0x5671('0x70')]['id']};if(_0x161b78[_0x5671('0x62')][_0x5671('0xb2')]){_0x1f7058[_0x5671('0xb2')]=_0x161b78[_0x5671('0x62')][_0x5671('0xb2')];_0x1f7058['closed']=![];return db[_0x5671('0xb3')][_0x5671('0x61')]({'where':_0x1f7058})[_0x5671('0x2b')](function(_0x11fe91){var _0x1f20e4=_0x161b78[_0x5671('0x62')][_0x5671('0x9b')]&&_0x161b78['body'][_0x5671('0x3b')];if(_0x11fe91){_0x127edc=!![];return _0x11fe91;}else if(!_0x1f20e4&&_0x11fe91&&_0x11fe91[_0x5671('0xb4')]){throw new APIConflictError(_0x5671('0xb5'));}_0x915e77[_0x5671('0xb2')]=_0x161b78['body'][_0x5671('0xb2')];_0x915e77[_0x5671('0xb6')]=_0x161b78[_0x5671('0x62')][_0x5671('0xb6')];return db[_0x5671('0xb3')][_0x5671('0x6f')](_0x915e77);});}_0x1f7058[_0x5671('0xb7')]=_0x461f8e['id'];if(_0x161b78['body'][_0x5671('0xb8')]&&_0x161b78[_0x5671('0x62')][_0x5671('0xb8')]['id']){_0x1f7058['id']=_0x161b78[_0x5671('0x62')][_0x5671('0xb8')]['id'];return db[_0x5671('0xb3')][_0x5671('0x61')]({'where':_0x1f7058})['then'](function(_0x4ce4cb){var _0xe9e3bb=_0x161b78['body'][_0x5671('0x9b')]&&_0x161b78[_0x5671('0x62')]['referer'];if(!_0xe9e3bb&&_0x4ce4cb&&_0x4ce4cb[_0x5671('0xb4')]){throw new APIConflictError('Writing\x20on\x20closed\x20interaction');}else if(_0x4ce4cb){_0x127edc=!![];return _0x4ce4cb;}else{return db[_0x5671('0xb3')][_0x5671('0x6f')](_0x915e77);}});}return db[_0x5671('0xb3')][_0x5671('0x6f')](_0x915e77);})[_0x5671('0x2b')](function(_0x34860a){if(!_0x127edc){return _0x34860a;}var _0x491d94={'from':(_0x15c57e['contact'][_0x5671('0x39')]||'')+'\x20'+(_0x15c57e[_0x5671('0xb1')]['lastName']||'')};if(_0x161b78['body']['threadId']&&_0x161b78[_0x5671('0x62')][_0x5671('0xb9')]&&_0x161b78['body'][_0x5671('0xb2')]!=_0x161b78[_0x5671('0x62')]['messageId']){_0x491d94[_0x5671('0xb2')]=_0x161b78[_0x5671('0x62')][_0x5671('0xb9')];}return _0x34860a[_0x5671('0x2a')](_0x491d94);})[_0x5671('0x2b')](function(_0x364a16){_0x15c57e[_0x5671('0xb8')]=_0x364a16[_0x5671('0x68')]({'plain':!![]});_0x15c57e['interaction'][_0x5671('0xba')]=!_0x127edc;if(_0x15c57e[_0x5671('0xb8')]['created']){if(_0x15c57e['account']['autoclose']){_0x15c57e[_0x5671('0xad')][_0x5671('0xbb')]({'id':0x0,'priority':_0x15c57e[_0x5671('0xad')]['length']+0x1,'app':_0x5671('0xbc'),'appdata':_0x5671('0xbd'),'interval':_0x5671('0xbe')});}}return db[_0x5671('0xbf')]['create']({'body':_0x161b78[_0x5671('0x62')][_0x5671('0x62')],'ChatWebsiteId':_0x161b78[_0x5671('0x70')]['id'],'ChatInteractionId':_0x364a16['id'],'direction':'in','ContactId':_0x15c57e[_0x5671('0xb1')]['id'],'AttachmentId':_0x161b78[_0x5671('0x62')][_0x5671('0xc0')]});})[_0x5671('0x2b')](function(_0x3889a0){_0x15c57e[_0x5671('0x1d')]=_0x3889a0;if(!_0x15c57e[_0x5671('0xb8')][_0x5671('0xc1')]){return;}return db[_0x5671('0xc2')][_0x5671('0x61')]({'attributes':['id',_0x5671('0x30')],'where':{'id':_0x15c57e['interaction'][_0x5671('0xc1')]}});})['then'](function(_0x1f0fe3){if(_0x1f0fe3){_0x15c57e[_0x5671('0xad')]['unshift']({'id':0x0,'priority':0x0,'app':_0x5671('0xc3'),'appdata':_0x1f0fe3[_0x5671('0x30')]+','+(_0x15c57e[_0x5671('0xac')][_0x5671('0xc4')]||0xa),'interval':'*,*,*,*'});_0x15c57e[_0x5671('0xc5')]=!![];}if(!_0x15c57e[_0x5671('0xb8')][_0x5671('0xc6')]){return;}return db['ChatQueue']['find']({'attributes':['id',_0x5671('0x30')],'where':{'id':_0x15c57e['interaction']['queueId']}});})[_0x5671('0x2b')](function(_0x5b0eb8){if(_0x5b0eb8){_0x15c57e[_0x5671('0xad')][_0x5671('0xc7')]({'id':0x0,'priority':0x1,'app':_0x5671('0xc8'),'appdata':_0x5b0eb8[_0x5671('0x30')]+','+(_0x15c57e[_0x5671('0xac')][_0x5671('0xc9')]||0x12c),'interval':_0x5671('0xbe')});}return respondWithRpcPromise('Start',_0x5671('0xca'),_0x15c57e);})[_0x5671('0x2b')](function(_0x3afcdc){respondWithRpcPromise(_0x5671('0xcb'),'EventManager',{'event':'notify','message':_0x3afcdc},client9002);return _0x3afcdc;})[_0x5671('0x2b')](respondWithResult(_0x22d316,null))['catch'](APIHandleError(_0x22d316));};exports['offline']=function(_0x2ecc32,_0x5bcebf){var _0x2e465a,_0x1892f6,_0x187afc;var _0x18fae1=[];var _0x356227={};var _0x27c30f=_0x2ecc32[_0x5671('0xcc')]||[];var _0x228503=[];var _0x1e2980;return db[_0x5671('0xa4')][_0x5671('0x71')]()[_0x5671('0x2b')](function(_0x4fef8d){if(!_0x4fef8d){throw new db[(_0x5671('0xcd'))][(_0x5671('0xce'))]('no\x20available\x20attributes');}_0x18fae1=_['difference'](_[_0x5671('0x4f')](_0x4fef8d),[_0x5671('0x9d'),_0x5671('0x9e'),'CompanyId',_0x5671('0xa1')]);if(_0x2ecc32[_0x5671('0x62')]['id']){delete _0x2ecc32['body']['id'];}if(_[_0x5671('0x8e')](_0x2ecc32['body'][_0x5671('0x96')])){throw _0x5bcebf[_0x5671('0x21')](0x1f4)[_0x5671('0x31')](new db[(_0x5671('0xcd'))][(_0x5671('0xce'))](_0x5671('0xcf')));}if(_[_0x5671('0x8e')](_0x2ecc32['body'][_0x5671('0x62')])||_0x2ecc32[_0x5671('0x62')][_0x5671('0x62')]===''){throw _0x5bcebf[_0x5671('0x21')](0x1f4)[_0x5671('0x31')](new db['Sequelize'][(_0x5671('0xce'))](_0x5671('0xd0')));}if(_[_0x5671('0x8e')](_0x2ecc32['body']['mapKeyOffline'])){throw _0x5bcebf[_0x5671('0x21')](0x1f4)[_0x5671('0x31')](new db[(_0x5671('0xcd'))][(_0x5671('0xce'))](_0x5671('0xd1')+_0x18fae1));}if(!_[_0x5671('0x9f')](_0x18fae1,_0x2ecc32[_0x5671('0x62')][_0x5671('0xd2')])){throw _0x5bcebf[_0x5671('0x21')](0x1f4)[_0x5671('0x31')](new db['Sequelize'][(_0x5671('0xce'))](_0x5671('0xd3')+_0x18fae1));}_0x356227[_0x2ecc32[_0x5671('0x62')][_0x5671('0xd2')]]=_0x2ecc32['body'][_0x5671('0x96')];})[_0x5671('0x2b')](function(){return db[_0x5671('0x4a')]['find']({'where':{'id':_0x2ecc32[_0x5671('0x70')]['id']},'include':[{'model':db['CmList'],'as':_0x5671('0xa3')},{'model':db[_0x5671('0xd4')],'as':_0x5671('0xd4')}]});})[_0x5671('0x2b')](handleEntityNotFound(_0x5bcebf,null))[_0x5671('0x2b')](function(_0x36e9d){if(_0x36e9d&&_0x36e9d[_0x5671('0xa3')]){_0x1892f6=_0x36e9d;var _0x13b893=_['defaults'](_0x2ecc32[_0x5671('0x62')],{'firstName':_0x2ecc32[_0x5671('0x62')][_0x5671('0x96')],'phone':_0x2ecc32[_0x5671('0x62')][_0x5671('0x96')],'ListId':_0x36e9d[_0x5671('0xa1')]});_0x13b893[_0x2ecc32[_0x5671('0x62')]['mapKeyOffline']]=_0x2ecc32[_0x5671('0x62')][_0x5671('0x96')];return db[_0x5671('0xa4')]['findOrCreate']({'where':_0x356227,'defaults':_0x13b893});}})[_0x5671('0xd5')](function(_0x307894){if(_0x307894){_0x187afc=_0x307894;var _0x338e34=fs[_0x5671('0xd6')](path[_0x5671('0x84')](config[_0x5671('0x85')],_0x5671('0xd7')),_0x5671('0xd8'));var _0x40b709=ejs['render'](_0x338e34,{'body':_[_0x5671('0xd9')](_0x2ecc32[_0x5671('0x62')][_0x5671('0x62')]),'bodyTitle':_0x1892f6['offlineMessageBody']});return db[_0x5671('0xda')][_0x5671('0x6f')]({'body':_0x40b709,'plainBody':htmlToText[_0x5671('0xdb')](_0x40b709),'ContactId':_0x307894['id'],'ChatWebsiteId':_0x1892f6['id']});}})[_0x5671('0x2b')](function(_0x41e688){_0x1e2980=_0x41e688;if(_0x27c30f['length']){var _0x3175d6=_0x27c30f[_0x5671('0x49')](function(_0x306396){return{'name':_0x306396[_0x5671('0xdc')],'basename':_0x306396['filename'],'type':_0x306396[_0x5671('0xdd')],'ChatOfflineMessageId':_0x41e688['id']};});_0x228503=_0x3175d6[_0x5671('0x49')](_0x2d7da5=>{var _0x505a91={'filename':_0x2d7da5['name'],'path':path[_0x5671('0x84')](config[_0x5671('0x85')],_0x5671('0xde'),'files','attachments','offline-chat',_0x2d7da5[_0x5671('0xdf')])};return _0x505a91;});if(!_0x1892f6['openNewInteraction']){return db['sequelize'][_0x5671('0xe0')](function(_0x5ade4d){return db[_0x5671('0xe1')]['bulkCreate'](_0x3175d6,{'transaction':_0x5ade4d});});}}})[_0x5671('0x2b')](function(){if(_0x1e2980){_0x2e465a=_0x1e2980;return db['MailAccount'][_0x5671('0x7a')]({'where':{'service':!![]},'include':[{'model':db[_0x5671('0xe2')],'as':_0x5671('0xe3'),'raw':!![],'include':[{'model':db[_0x5671('0xe4')],'as':_0x5671('0xe4'),'raw':!![]}]}]});}})[_0x5671('0x2b')](function(_0xc88b24){if(_0xc88b24&&_0xc88b24['Smtp']&&_0x1892f6['forwardOffline']&&_0x1892f6[_0x5671('0xe5')]){var _0x2d9b9e=_0xc88b24['getSmtpOptions']();return respondWithRpcPromise(_0x5671('0xe6'),_0x5671('0xe7'),{'account':_0x2d9b9e,'message':{'from':util['format'](_0x5671('0xe8'),_0xc88b24[_0x5671('0x30')],_0xc88b24[_0x5671('0xe9')]||_0xc88b24['Smtp'][_0x5671('0xea')]),'to':_0x1892f6[_0x5671('0xe5')],'subject':_0x1892f6['offlineMessageSubject'],'html':_0x2e465a[_0x5671('0x62')],'attachments':_0x228503}},client9003)[_0x5671('0x2b')](function(){return _0x2e465a;})[_0x5671('0x20')](function(_0x365d6c){logger[_0x5671('0x1a')](_0x365d6c);});}})[_0x5671('0x2b')](function(){if(_0x1892f6&&_0x1892f6['openNewInteraction']&&_0x1892f6[_0x5671('0xeb')]){var _0x11cc51=[];if(_0x27c30f['length']){_0x11cc51=_0x27c30f[_0x5671('0x49')](function(_0x595ccd){return{'name':_0x595ccd['originalname'],'basename':_0x595ccd[_0x5671('0x7f')],'type':_0x595ccd[_0x5671('0xdd')],'ChatOfflineMessageId':_0x1e2980['id']};});}var _0x1d6c7a;if(!_[_0x5671('0x8e')](_0x1892f6[_0x5671('0xec')])){var _0x2eeafb=_[_0x5671('0x49')](_0x2ecc32[_0x5671('0x62')],function(_0x29e486){return _0x29e486;});var _0x25ef1e=_[_0x5671('0xed')](_0x2eeafb)[0x0];var _0x1751bc=_[_0x5671('0xee')](_0x25ef1e,function(_0x4a657a){return _0x4a657a;});_0x1d6c7a=_0x1751bc[0x1][_0x1892f6['subjectOffline']];}var _0x4ee8e4={'from':_0x187afc[_0x5671('0xe9')],'firstName':_0x187afc['firstName'],'lastName':_0x187afc[_0x5671('0xef')],'mapKey':_0x5671('0xe9'),'message':{'from':_0x187afc['email'],'to':_0x1892f6['MailAccount'][_0x5671('0xe9')],'cc':'','subject':_['isNil'](_0x1d6c7a)?_0x1892f6[_0x5671('0xf0')]:_0x1d6c7a,'messageId':'','sentAt':new Date(),'attach':_0x11cc51['length'],'attachments':_0x11cc51,'originChannel':_0x5671('0xf1'),'ChatWebsiteId':_0x1892f6['id'],'ChatOfflineMessageId':_0x2e465a['id'],'originTo':_0x1892f6[_0x5671('0xd4')][_0x5671('0xe9')]},'body':_0x2e465a[_0x5671('0x62')]};var _0x2c0172={'account':{'id':_0x1892f6['MailAccountId']},'body':_0x4ee8e4,'log':'NotifyMailAccount'};return respondWithRpcPromise(_0x5671('0xf2'),_0x5671('0xf3'),_0x2c0172,client9001)[_0x5671('0x2b')](function(){return _0x2e465a;})['catch'](function(_0x31da1e){logger['error'](_0x31da1e);});}return;})[_0x5671('0x2b')](function(){if(_0x2e465a){return _0x2e465a;}})[_0x5671('0x2b')](respondWithResult(_0x5bcebf,null))['catch'](function(){for(var _0x461a1b of _0x27c30f){var _0x2c107a=path[_0x5671('0x84')](config[_0x5671('0x85')],_0x5671('0xde'),_0x5671('0xcc'),_0x5671('0xf4'),_0x5671('0xf5'),_0x461a1b[_0x5671('0x7f')]);fs_extra[_0x5671('0xf6')](_0x2c107a)[_0x5671('0x20')](function(_0x21ed8a){logger[_0x5671('0x1a')](_0x5671('0xf7'),_0x2c107a,_0x21ed8a);});}});};exports[_0x5671('0xf8')]=function(_0x226cbd,_0x14961a){return db[_0x5671('0xb3')]['find']({'where':{'id':_0x226cbd['params']['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0x14961a,null))['then'](function(_0x527285){if(_0x527285){return _0x527285[_0x5671('0xf8')](_0x226cbd[_0x5671('0x62')]['ids'],_['omit'](_0x226cbd[_0x5671('0x62')],[_0x5671('0x78'),'id'])||{});}})[_0x5671('0x2b')](respondWithResult(_0x14961a,null))[_0x5671('0x20')](handleError(_0x14961a,null));};exports['getInteractions']=function(_0x1e4301,_0x29753f){var _0x257d5a={'raw':![],'where':{}};var _0x4d1744={};var _0x380497={'count':0x0,'rows':[]};return db[_0x5671('0x4a')]['findOne']({'where':{'id':_0x1e4301[_0x5671('0x70')]['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0x29753f,null))[_0x5671('0x2b')](function(_0x4aee8c){if(_0x4aee8c){_0x4d1744[_0x5671('0x42')]=_[_0x5671('0x4f')](db[_0x5671('0xb3')]['rawAttributes']);_0x4d1744[_0x5671('0x4e')]=_[_0x5671('0x4f')](_0x1e4301['query']);_0x4d1744[_0x5671('0x58')]=_[_0x5671('0x50')](_0x4d1744[_0x5671('0x42')],_0x4d1744[_0x5671('0x4e')]);_0x257d5a[_0x5671('0x51')]=_[_0x5671('0x50')](_0x4d1744[_0x5671('0x42')],qs[_0x5671('0x52')](_0x1e4301['query'][_0x5671('0x52')]));_0x257d5a[_0x5671('0x51')]=_0x257d5a[_0x5671('0x51')]['length']?_0x257d5a['attributes']:_0x4d1744[_0x5671('0x42')];if(!_0x1e4301[_0x5671('0x4e')][_0x5671('0x54')](_0x5671('0x55'))){_0x257d5a['limit']=qs[_0x5671('0x24')](_0x1e4301[_0x5671('0x4e')]['limit']);_0x257d5a[_0x5671('0x27')]=qs[_0x5671('0x27')](_0x1e4301[_0x5671('0x4e')]['offset']);}_0x257d5a[_0x5671('0x74')]=qs[_0x5671('0x56')](_0x1e4301[_0x5671('0x4e')][_0x5671('0x56')]);_0x257d5a[_0x5671('0x57')]=qs[_0x5671('0x58')](_[_0x5671('0x75')](_0x1e4301[_0x5671('0x4e')],_0x4d1744[_0x5671('0x58')]));_0x257d5a['where'][_0x5671('0x76')]=_0x4aee8c['id'];if(_0x1e4301['query'][_0x5671('0x59')]){_0x257d5a[_0x5671('0x57')]=_[_0x5671('0x5a')](_0x257d5a[_0x5671('0x57')],{'$or':_[_0x5671('0x49')](_0x257d5a[_0x5671('0x51')],function(_0x122b9b){var _0x20459e={};_0x20459e[_0x122b9b]={'$like':'%'+_0x1e4301[_0x5671('0x4e')][_0x5671('0x59')]+'%'};return _0x20459e;})});}_0x257d5a=_['merge']({},_0x257d5a,_0x1e4301[_0x5671('0x5c')]);return db['ChatInteraction'][_0x5671('0x26')]({'where':_0x257d5a[_0x5671('0x57')]})[_0x5671('0x2b')](function(_0x3b9279){_0x380497[_0x5671('0x26')]=_0x3b9279;if(_0x1e4301['query'][_0x5671('0x5d')]){_0x257d5a[_0x5671('0x5e')]=[{'model':db[_0x5671('0xa4')],'as':'Contact','required':![]},{'model':db[_0x5671('0xc2')],'as':_0x5671('0xf9'),'attributes':[_0x5671('0x30'),_0x5671('0xfa'),_0x5671('0xfb')],'required':![]},{'model':db[_0x5671('0xfc')],'as':'Tags','attributes':['id',_0x5671('0x30'),_0x5671('0xfd')],'where':_0x1e4301[_0x5671('0x4e')][_0x5671('0xfe')]?{'id':_0x1e4301['query'][_0x5671('0xfe')]}:undefined,'required':_0x1e4301[_0x5671('0x4e')][_0x5671('0xfe')]?!![]:![]}];}return db[_0x5671('0xb3')][_0x5671('0x5f')](_0x257d5a);})[_0x5671('0x2b')](function(_0x2f56ef){_0x380497[_0x5671('0x60')]=_0x2f56ef;return _0x380497;});}})[_0x5671('0x2b')](respondWithFilteredResult(_0x29753f,_0x257d5a))['catch'](handleError(_0x29753f,null));};exports['getSnippet']=function(_0x517feb,_0x49e5e0){var _0x443ac6=0x0;var _0x2ed6f9=0x0;var _0x2da02f=![];var _0x915c81;var _0x51f6f7;return db[_0x5671('0x4a')][_0x5671('0x61')]({'where':{'id':_0x517feb[_0x5671('0x70')]['id']},'include':[{'model':db[_0x5671('0xa8')],'as':_0x5671('0xa8'),'include':[{'model':db[_0x5671('0xa8')],'as':_0x5671('0xa9'),'attributes':['id',_0x5671('0xaa')]}]}]})[_0x5671('0x2b')](handleEntityNotFound(_0x49e5e0,null))['then'](function(_0x5e0bda){if(_0x5e0bda){_0x915c81=_0x5e0bda;return _0x5e0bda[_0x5671('0xff')]({'raw':!![]});}})[_0x5671('0x2b')](function(_0x5336b0){if(_0x915c81){if(_0x5336b0){_0x51f6f7=_0x5336b0;}}return require(_0x5671('0x87'))[_0x5671('0x88')]();})[_0x5671('0x2b')](function(_0x1bdbb2){if(_0x1bdbb2){_0x2ed6f9=_0x1bdbb2['virtual'];_0x2da02f=_0x1bdbb2[_0x5671('0x89')];}})[_0x5671('0x2b')](function(){return db['ChatInteraction']['count']({'where':{'closed':![]}});})[_0x5671('0x2b')](function(_0x5971a1){_0x443ac6=_0x5971a1;if(_0x2ed6f9&&_0x5971a1>_0x2ed6f9){return db['License'][_0x5671('0x7a')]({'where':{'id':0x1}})[_0x5671('0x2b')](function(_0x243f97){if(_0x243f97){_0x243f97[_0x5671('0x100')](_0x5671('0x101'));}});}})[_0x5671('0x2b')](function(){var _0x48eb12=_0x915c81[_0x5671('0xa8')];var _0x21f698=_0x915c81['timezone']||undefined;return _0x48eb12?_0x48eb12[_0x5671('0x95')](_0x21f698):!![];})[_0x5671('0x2b')](function(_0x487d83){var _0x32f1fe=fs[_0x5671('0xd6')](path['join'](config[_0x5671('0x85')],_0x5671('0x102')),_0x5671('0xd8'));var _0x3920db=_0x5671('0x103');var _0x4fab68=![];var _0x4ab7d7,_0x206d54;if(_0x517feb['headers'][_0x5671('0x3b')]){_0x4ab7d7=new URL(_0x517feb['headers']['referer'])[_0x5671('0x104')];}else if(_0x517feb[_0x5671('0x105')][_0x5671('0x104')]){_0x4ab7d7=new URL(_0x517feb[_0x5671('0x105')]['origin'])[_0x5671('0x104')];}else{_0x4ab7d7=_0x5671('0x106');}_0x206d54=typeof _0x915c81['address'][_0x5671('0x38')](',')['find'](function(_0x398523){return wildcardUtils[_0x5671('0x107')](_0x398523,_0x4ab7d7);})!==_0x5671('0x25');var _0x3d5294={'chatVersion':_0x3920db,'chatWebsiteAddressOrigin':_0x206d54?_0x4ab7d7:_0x915c81[_0x5671('0x63')],'remote':_0x915c81[_0x5671('0x108')],'query':querystring[_0x5671('0x45')](_[_0x5671('0x5a')](_0x915c81['get']({'plain':!![]}),{'customerIp':_0x517feb['headers']['x-forwarded-for']||_0x517feb['headers']['x-real-ip']||_0x517feb[_0x5671('0x109')]['remoteAddress']||_0x517feb['ip'],'referer':_0x517feb['headers'][_0x5671('0x3b')],'openedInteractions':_0x443ac6,'maxInteractions':_0x2ed6f9,'virtual':_0x2da02f[_0x5671('0x10a')],'online':_0x487d83,'custom':_0x2da02f,'address':_0x206d54?_0x4ab7d7:null}))['replace'](/'/g,'\x5c\x27')};_0x49e5e0[_0x5671('0x31')](ejs['render'](Mustache['render'](_0x32f1fe,_0x3d5294),{'proactiveActions':_0x51f6f7,'alignment':_0x915c81[_0x5671('0x10b')],'verticalAlignment':_0x915c81['verticalAlignment'],'div_color':_0x915c81[_0x5671('0xfd')],'labelText':_0x915c81[_0x5671('0x10c')],'text_color':_0x915c81[_0x5671('0x10d')],'text_button_color':_0x915c81[_0x5671('0x10e')],'button_color':_0x915c81[_0x5671('0x10f')],'background_color':_0x915c81[_0x5671('0x110')],'hideWhenOffline':_0x915c81[_0x5671('0x111')],'intervalId':_0x915c81[_0x5671('0x112')],'isDevelopment':_0x4fab68,'chatVersion':_0x3920db}));})[_0x5671('0x20')](handleError(_0x49e5e0,null));};exports[_0x5671('0x113')]=function(_0x5cdb6c,_0x1ca7bd){var _0xfd0569=_0x5cdb6c[_0x5671('0x70')]['id'];var _0x528566=_0x5cdb6c['body'];var _0x2021eb=0xc8;var _0x2b3ba5=null;return db[_0x5671('0x114')][_0x5671('0xe0')]({'isolationLevel':db[_0x5671('0x114')][_0x5671('0x115')][_0x5671('0x116')][_0x5671('0x117')]},function(_0x59f80c){return db[_0x5671('0x4a')][_0x5671('0x7a')]({'where':{'id':_0xfd0569},'transaction':_0x59f80c})[_0x5671('0x2b')](function(_0x512315){if(_0x512315){return db[_0x5671('0xa6')][_0x5671('0x2c')]({'where':{'ChatWebsiteId':_0xfd0569},'transaction':_0x59f80c})[_0x5671('0x2b')](function(){var _0xb1d956=_[_0x5671('0x49')](_0x528566,function(_0x1e05da){_0x1e05da['ChatWebsiteId']=_0xfd0569;return _0x1e05da;});return db[_0x5671('0xa6')][_0x5671('0x118')](_0xb1d956,{'transaction':_0x59f80c});});}else{_0x2021eb=0x194;_0x2b3ba5=[];}});})[_0x5671('0x2b')](function(){if(_0x2021eb!==0x194){return db[_0x5671('0xa6')][_0x5671('0x119')]({'where':{'ChatWebsiteId':_0xfd0569},'order':_0x5671('0x11a')})[_0x5671('0x2b')](function(_0x3cc5e5){_0x2b3ba5=_0x3cc5e5;});}})[_0x5671('0x20')](function(_0x311c4d){_0x2021eb=0x1f4;logger[_0x5671('0x1a')](_0x311c4d[_0x5671('0x2f')]);if(_0x311c4d[_0x5671('0x30')]){delete _0x311c4d[_0x5671('0x30')];}_0x2b3ba5=_0x311c4d;})[_0x5671('0x11b')](function(){if(_0x2b3ba5===null){_0x1ca7bd['sendStatus'](_0x2021eb);}else{if(_0x2021eb===0x1f4){_0x1ca7bd[_0x5671('0x21')](_0x2021eb)[_0x5671('0x31')](_0x2b3ba5);}else{_0x1ca7bd['status'](_0x2021eb)['json'](_0x2b3ba5);}}});};exports[_0x5671('0x11c')]=function(_0x2e2f5b,_0x36ab82){var _0x5cba22={};var _0xe62cc9={};var _0x37cb01;var _0x291064;return db[_0x5671('0x4a')][_0x5671('0x7a')]({'where':{'id':_0x2e2f5b[_0x5671('0x70')]['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0x36ab82,null))[_0x5671('0x2b')](function(_0x13ead7){if(_0x13ead7){_0x37cb01=_0x13ead7;_0xe62cc9[_0x5671('0x42')]=_[_0x5671('0x4f')](db['ChatApplication'][_0x5671('0x4b')]);_0xe62cc9[_0x5671('0x4e')]=_[_0x5671('0x4f')](_0x2e2f5b[_0x5671('0x4e')]);_0xe62cc9['filters']=_['intersection'](_0xe62cc9[_0x5671('0x42')],_0xe62cc9[_0x5671('0x4e')]);_0x5cba22[_0x5671('0x51')]=_[_0x5671('0x50')](_0xe62cc9['model'],qs[_0x5671('0x52')](_0x2e2f5b[_0x5671('0x4e')][_0x5671('0x52')]));_0x5cba22[_0x5671('0x51')]=_0x5cba22[_0x5671('0x51')]['length']?_0x5cba22['attributes']:_0xe62cc9[_0x5671('0x42')];_0x5cba22['order']=qs['sort'](_0x2e2f5b[_0x5671('0x4e')][_0x5671('0x56')]);_0x5cba22['where']=qs[_0x5671('0x58')](_[_0x5671('0x75')](_0x2e2f5b[_0x5671('0x4e')],_0xe62cc9[_0x5671('0x58')]));if(_0x2e2f5b[_0x5671('0x4e')][_0x5671('0x59')]){_0x5cba22[_0x5671('0x57')]=_[_0x5671('0x5a')](_0x5cba22[_0x5671('0x57')],{'$or':_['map'](_0x5cba22[_0x5671('0x51')],function(_0x483647){var _0x3fa7bd={};_0x3fa7bd[_0x483647]={'$like':'%'+_0x2e2f5b[_0x5671('0x4e')][_0x5671('0x59')]+'%'};return _0x3fa7bd;})});}_0x5cba22=_[_0x5671('0x5a')]({},_0x5cba22,_0x2e2f5b[_0x5671('0x5c')]);return _0x37cb01[_0x5671('0x11c')](_0x5cba22);}})[_0x5671('0x2b')](function(_0x6a6f5){if(_0x6a6f5){_0x291064=_0x6a6f5[_0x5671('0x53')];if(!_0x2e2f5b[_0x5671('0x4e')][_0x5671('0x54')](_0x5671('0x55'))){_0x5cba22['limit']=qs[_0x5671('0x24')](_0x2e2f5b[_0x5671('0x4e')][_0x5671('0x24')]);_0x5cba22['offset']=qs[_0x5671('0x27')](_0x2e2f5b[_0x5671('0x4e')]['offset']);}return _0x37cb01[_0x5671('0x11c')](_0x5cba22);}})['then'](function(_0x5e54ba){if(_0x5e54ba){return _0x5e54ba?{'count':_0x291064,'rows':_0x5e54ba}:null;}})[_0x5671('0x2b')](respondWithResult(_0x36ab82,null))[_0x5671('0x20')](handleError(_0x36ab82,null));};exports[_0x5671('0x11d')]=function(_0xd1b45a,_0x4b1c53){return db['chatProactiveAction'][_0x5671('0x61')]({'where':{'id':_0xd1b45a[_0x5671('0x70')]['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0x4b1c53,null))['then'](function(_0x3af37b){if(_0x3af37b){return _0x3af37b['addProactiveActions'](_0xd1b45a[_0x5671('0x62')]['ids'],_[_0x5671('0x11e')](_0xd1b45a[_0x5671('0x62')],[_0x5671('0x78'),'id'])||{});}})[_0x5671('0x2b')](respondWithResult(_0x4b1c53,null))[_0x5671('0x20')](handleError(_0x4b1c53,null));};exports[_0x5671('0xff')]=function(_0x2e77f5,_0x75ea59){var _0x2abf7c={};var _0x1f2e50={};var _0x3c20d0;var _0x287328;return db[_0x5671('0x4a')][_0x5671('0x7a')]({'where':{'id':_0x2e77f5[_0x5671('0x70')]['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0x75ea59,null))[_0x5671('0x2b')](function(_0x3cd701){if(_0x3cd701){_0x3c20d0=_0x3cd701;_0x1f2e50[_0x5671('0x42')]=_[_0x5671('0x4f')](db[_0x5671('0x11f')]['rawAttributes']);_0x1f2e50['query']=_[_0x5671('0x4f')](_0x2e77f5[_0x5671('0x4e')]);_0x1f2e50['filters']=_[_0x5671('0x50')](_0x1f2e50[_0x5671('0x42')],_0x1f2e50[_0x5671('0x4e')]);_0x2abf7c['attributes']=_[_0x5671('0x50')](_0x1f2e50[_0x5671('0x42')],qs['fields'](_0x2e77f5[_0x5671('0x4e')][_0x5671('0x52')]));_0x2abf7c['attributes']=_0x2abf7c[_0x5671('0x51')][_0x5671('0x53')]?_0x2abf7c[_0x5671('0x51')]:_0x1f2e50[_0x5671('0x42')];_0x2abf7c['order']=qs[_0x5671('0x56')](_0x2e77f5[_0x5671('0x4e')][_0x5671('0x56')]);_0x2abf7c[_0x5671('0x57')]=qs[_0x5671('0x58')](_[_0x5671('0x75')](_0x2e77f5[_0x5671('0x4e')],_0x1f2e50[_0x5671('0x58')]));if(_0x2e77f5['query']['filter']){_0x2abf7c[_0x5671('0x57')]=_['merge'](_0x2abf7c[_0x5671('0x57')],{'$or':_[_0x5671('0x49')](_0x2abf7c[_0x5671('0x51')],function(_0x33442a){var _0x5c71ee={};_0x5c71ee[_0x33442a]={'$like':'%'+_0x2e77f5['query'][_0x5671('0x59')]+'%'};return _0x5c71ee;})});}_0x2abf7c=_[_0x5671('0x5a')]({},_0x2abf7c,_0x2e77f5[_0x5671('0x5c')]);return _0x3c20d0[_0x5671('0xff')](_0x2abf7c);}})[_0x5671('0x2b')](function(_0x4af61e){if(_0x4af61e){_0x287328=_0x4af61e[_0x5671('0x53')];if(!_0x2e77f5[_0x5671('0x4e')][_0x5671('0x54')]('nolimit')){_0x2abf7c[_0x5671('0x24')]=qs[_0x5671('0x24')](_0x2e77f5[_0x5671('0x4e')]['limit']);_0x2abf7c['offset']=qs['offset'](_0x2e77f5[_0x5671('0x4e')][_0x5671('0x27')]);}return _0x3c20d0[_0x5671('0xff')](_0x2abf7c);}})['then'](function(_0x29e20c){if(_0x29e20c){return _0x29e20c?{'count':_0x287328,'rows':_0x29e20c}:null;}})[_0x5671('0x2b')](respondWithResult(_0x75ea59,null))[_0x5671('0x20')](handleError(_0x75ea59,null));};exports[_0x5671('0x120')]=function(_0x3c95a9,_0x68010d){var _0x2fa723=_0x3c95a9[_0x5671('0x4e')][_0x5671('0x121')]===_0x5671('0x122')?_0x5671('0x123'):'onlineForm';return db[_0x5671('0x4a')][_0x5671('0x61')]({'attributes':['id',_0x2fa723],'where':{'id':_0x3c95a9['params']['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0x68010d,null))['then'](function(_0x4661d5){if(_0x4661d5){var _0x10ef69=_0x4661d5[_0x2fa723];var _0x15b953=_0x10ef69&&_0x10ef69[_0x5671('0x124')]?_0x10ef69[_0x5671('0x124')]:[];_0x68010d[_0x5671('0x31')]({'fromKey':_[_0x5671('0x8e')](_0x10ef69['fromKey'])?undefined:_0x10ef69[_0x5671('0x125')],'count':_0x15b953['length'],'rows':_0x15b953});}})[_0x5671('0x20')](handleError(_0x68010d,null));};exports[_0x5671('0x126')]=function(_0x3fcbf8,_0xc6f1cd){var _0x1a9283={'raw':![],'where':{}};var _0x2fd038={};var _0x10e7a3={'count':0x0,'rows':[]};return db[_0x5671('0x4a')][_0x5671('0x7a')]({'where':{'id':_0x3fcbf8[_0x5671('0x70')]['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0xc6f1cd,null))[_0x5671('0x2b')](function(_0x4b6176){if(_0x4b6176){_0x2fd038[_0x5671('0x42')]=_[_0x5671('0x4f')](db[_0x5671('0xda')][_0x5671('0x4b')]);_0x2fd038[_0x5671('0x4e')]=_[_0x5671('0x4f')](_0x3fcbf8[_0x5671('0x4e')]);_0x2fd038[_0x5671('0x58')]=_['intersection'](_0x2fd038[_0x5671('0x42')],_0x2fd038['query']);_0x1a9283[_0x5671('0x51')]=_[_0x5671('0x50')](_0x2fd038[_0x5671('0x42')],qs[_0x5671('0x52')](_0x3fcbf8[_0x5671('0x4e')][_0x5671('0x52')]));_0x1a9283[_0x5671('0x51')]=_0x1a9283[_0x5671('0x51')][_0x5671('0x53')]?_0x1a9283[_0x5671('0x51')]:_0x2fd038[_0x5671('0x42')];if(!_0x3fcbf8['query'][_0x5671('0x54')]('nolimit')){_0x1a9283[_0x5671('0x24')]=qs['limit'](_0x3fcbf8[_0x5671('0x4e')][_0x5671('0x24')]);_0x1a9283[_0x5671('0x27')]=qs['offset'](_0x3fcbf8[_0x5671('0x4e')][_0x5671('0x27')]);}_0x1a9283[_0x5671('0x74')]=qs[_0x5671('0x56')](_0x3fcbf8[_0x5671('0x4e')][_0x5671('0x56')]);_0x1a9283['where']=qs['filters'](_['pick'](_0x3fcbf8[_0x5671('0x4e')],_0x2fd038[_0x5671('0x58')]));_0x1a9283[_0x5671('0x57')][_0x5671('0x76')]=_0x4b6176['id'];if(_0x3fcbf8[_0x5671('0x4e')][_0x5671('0x59')]){_0x1a9283[_0x5671('0x57')]=_[_0x5671('0x5a')](_0x1a9283['where'],{'$or':_[_0x5671('0x49')](_0x1a9283[_0x5671('0x51')],function(_0x3a997a){var _0x486bc1={};_0x486bc1[_0x3a997a]={'$like':'%'+_0x3fcbf8[_0x5671('0x4e')][_0x5671('0x59')]+'%'};return _0x486bc1;})});}_0x1a9283=_[_0x5671('0x5a')]({},_0x1a9283,_0x3fcbf8['options']);return db['ChatOfflineMessage'][_0x5671('0x26')]({'where':_0x1a9283[_0x5671('0x57')]})[_0x5671('0x2b')](function(_0x314ea2){_0x10e7a3['count']=_0x314ea2;if(_0x3fcbf8[_0x5671('0x4e')][_0x5671('0x5d')]){_0x1a9283[_0x5671('0x5e')]=[{'all':!![]}];}else{_0x1a9283[_0x5671('0x5e')]=[{'model':db[_0x5671('0xa4')],'as':_0x5671('0x127'),'required':![]},{'model':db['Attachment'],'as':'Attachments','required':![]}];}return db[_0x5671('0xda')][_0x5671('0x5f')](_0x1a9283);})[_0x5671('0x2b')](function(_0x2b0985){_0x10e7a3[_0x5671('0x60')]=_0x2b0985;return _0x10e7a3;});}})['then'](respondWithFilteredResult(_0xc6f1cd,_0x1a9283))['catch'](handleError(_0xc6f1cd,null));};exports[_0x5671('0x128')]=function(_0x2ecaa0,_0x408279){return db[_0x5671('0x4a')]['find']({'where':{'id':_0x2ecaa0[_0x5671('0x70')]['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0x408279,null))['then'](function(_0x52ca45){if(_0x52ca45){return _0x52ca45['addAgents'](_0x2ecaa0[_0x5671('0x62')][_0x5671('0x78')],_[_0x5671('0x11e')](_0x2ecaa0[_0x5671('0x62')],[_0x5671('0x78'),'id'])||{})['spread'](function(_0x3eeaf4){for(var _0x1523ad=0x0;_0x1523ad<_0x2ecaa0[_0x5671('0x62')][_0x5671('0x78')][_0x5671('0x53')];_0x1523ad+=0x1){socket[_0x5671('0x129')](_0x5671('0x12a'),{'UserId':Number(_0x2ecaa0['body'][_0x5671('0x78')][_0x1523ad]),'ChatWebsiteId':Number(_0x2ecaa0[_0x5671('0x70')]['id'])});}return _0x3eeaf4;});}})[_0x5671('0x2b')](respondWithResult(_0x408279,null))['catch'](handleError(_0x408279,null));};exports[_0x5671('0x12b')]=function(_0x4876b0,_0x2509da){return db[_0x5671('0x4a')][_0x5671('0x61')]({'where':{'id':_0x4876b0['params']['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0x2509da,null))[_0x5671('0x2b')](function(_0x53924c){if(_0x53924c){return _0x53924c['removeAgents'](_0x4876b0['query']['ids'])['then'](function(){if(_[_0x5671('0x12c')](_0x4876b0['query'][_0x5671('0x78')])){for(var _0x15c1da=0x0;_0x15c1da<_0x4876b0['query']['ids'][_0x5671('0x53')];_0x15c1da+=0x1){socket[_0x5671('0x129')](_0x5671('0x12d'),{'UserId':Number(_0x4876b0[_0x5671('0x4e')]['ids'][_0x15c1da]),'ChatWebsiteId':Number(_0x4876b0['params']['id'])});}}else{socket['emit'](_0x5671('0x12d'),{'UserId':Number(_0x4876b0[_0x5671('0x4e')][_0x5671('0x78')]),'ChatWebsiteId':Number(_0x4876b0[_0x5671('0x70')]['id'])});}});}})['then'](respondWithStatusCode(_0x2509da,null))[_0x5671('0x20')](handleError(_0x2509da,null));};exports[_0x5671('0x12e')]=function(_0x4c1b74,_0x179c91){var _0x5cbac0={};var _0x228ff4={};var _0x41ce64;var _0x36df2d;return db['ChatWebsite']['findOne']({'where':{'id':_0x4c1b74[_0x5671('0x70')]['id']}})[_0x5671('0x2b')](handleEntityNotFound(_0x179c91,null))['then'](function(_0x48d278){if(_0x48d278){_0x41ce64=_0x48d278;_0x228ff4[_0x5671('0x42')]=_[_0x5671('0x4f')](db[_0x5671('0xc2')][_0x5671('0x4b')]);_0x228ff4[_0x5671('0x4e')]=_[_0x5671('0x4f')](_0x4c1b74[_0x5671('0x4e')]);_0x228ff4[_0x5671('0x58')]=_['intersection'](_0x228ff4[_0x5671('0x42')],_0x228ff4[_0x5671('0x4e')]);_0x5cbac0[_0x5671('0x51')]=_['intersection'](_0x228ff4[_0x5671('0x42')],qs[_0x5671('0x52')](_0x4c1b74[_0x5671('0x4e')][_0x5671('0x52')]));_0x5cbac0[_0x5671('0x51')]=_0x5cbac0[_0x5671('0x51')][_0x5671('0x53')]?_0x5cbac0[_0x5671('0x51')]:_0x228ff4[_0x5671('0x42')];_0x5cbac0[_0x5671('0x74')]=qs[_0x5671('0x56')](_0x4c1b74[_0x5671('0x4e')][_0x5671('0x56')]);_0x5cbac0[_0x5671('0x57')]=qs['filters'](_[_0x5671('0x75')](_0x4c1b74[_0x5671('0x4e')],_0x228ff4['filters']));if(_0x4c1b74[_0x5671('0x4e')][_0x5671('0x59')]){_0x5cbac0[_0x5671('0x57')]=_[_0x5671('0x5a')](_0x5cbac0[_0x5671('0x57')],{'$or':_[_0x5671('0x49')](_0x5cbac0[_0x5671('0x51')],function(_0x210cf3){var _0x5f27b9={};_0x5f27b9[_0x210cf3]={'$like':'%'+_0x4c1b74[_0x5671('0x4e')]['filter']+'%'};return _0x5f27b9;})});}_0x5cbac0=_[_0x5671('0x5a')]({},_0x5cbac0,_0x4c1b74[_0x5671('0x5c')]);return _0x41ce64[_0x5671('0x12e')](_0x5cbac0);}})[_0x5671('0x2b')](function(_0x32ca38){if(_0x32ca38){_0x36df2d=_0x32ca38[_0x5671('0x53')];if(!_0x4c1b74[_0x5671('0x4e')][_0x5671('0x54')](_0x5671('0x55'))){_0x5cbac0['limit']=qs['limit'](_0x4c1b74[_0x5671('0x4e')]['limit']);_0x5cbac0[_0x5671('0x27')]=qs[_0x5671('0x27')](_0x4c1b74[_0x5671('0x4e')]['offset']);}return _0x41ce64[_0x5671('0x12e')](_0x5cbac0);}})['then'](function(_0x5572e2){if(_0x5572e2){return _0x5572e2?{'count':_0x36df2d,'rows':_0x5572e2}:null;}})[_0x5671('0x2b')](respondWithResult(_0x179c91,null))[_0x5671('0x20')](handleError(_0x179c91,null));};
\ No newline at end of file
+var _0x0faf=['querystring','html-to-text','ioredis','jayson/promise','../../components/parsers/qs','api','../../config/environment','../../errors/api','APIBadRequestError','APIOutOfIntervalError','APIConflictError','./helpers/wildcard-expressions','url','URL','../../mysqldb','redis','defaults','localhost','register','client','http','request','then','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','sendStatus','status','end','json','offset','undefined','count','limit','set','destroy','get','ChatWebsites','UserProfileResource','name','send','getResult','customerIp','cf-connecting-ip','x-forwarded-for','first','firstName','lastName','x-real-port','referer','browser','format','%s\x20%s','version','unknown','device','model','vendor','%s\x20%s\x20%s','type','index','Pause','map','ChatWebsite','rawAttributes','fieldName','key','keys','query','filters','attributes','intersection','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','options','include','rows','show','mandatoryDispositionPause','fields','includeAll','find','create','body','address','split','forEach','testWildcardValidity','trim','\x22\x20is\x20not\x20a\x20valid\x20wildcard\x20expression','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','params','describe','ChatWebsiteId','getDispositions','findOne','Disposition','order','findAll','removeDispositions','getAnswers','CannedAnswer','ids','addLogo','file','addAvatar','filename','addCustomerAvatar','customerAvatar','addSystemAvatar','systemAvatar','getLogo','join','root','server/files/images/logos/default_logo.svg','sitepic','getLicense','custom','isNil','server/files/images/logos/','download','getAvatar','server/files/images/avatars/default_avatar.png','agentAvatar','server/files/images/avatars/','getCustomerAvatar','server/files/images/avatars/customer_avatar.png','showCustomerAvatar','existsSync','Interval','resolve','timezone','ifTime','notify','chat','from','mapKey','isEmpty','CmContact','No\x20available\x20attributes','createdAt','includes','updatedAt','CompanyId','ListId','Invalid\x20MapKey\x20parameter.\x20Allowed\x20values:\x20','CmList','List','Contacts','DESC','Applications','Intervals','interval','account','applications','orderBy','priority','asc','list','contact','headers','threadId','closed','ChatInteraction','Writing\x20on\x20closed\x20interaction','externalUrl','ContactId','interaction','messageId','created','autoclose','push','*,*,*,*','ChatMessage','AttachmentId','UserId','unshift','agent','waitForTheAssignedAgent','queueId','ChatQueue','queue','Start','EventManager','offline','Sequelize','no\x20available\x20attributes','ValidationError','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','mapKeyOffline','mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','MailAccount','findOrCreate','spread','server/files/templates/chatOfflineMessage.ejs','utf8','toPairs','offlineMessageBody','fromString','originalname','mimetype','server','files','attachments','offline-chat','basename','sequelize','Attachment','bulkCreate','MailServerOut','Smtp','CloudProvider','forwardOfflineAddress','getSmtpOptions','sendMail','\x22%s\x22\x20<%s>','email','openNewInteraction','MailAccountId','subjectOffline','mapValues','offlineMessageSubject','Chat','NotifyMailAccount','notifyMail','remove','Could\x20not\x20remove\x20attachment\x20file','addInteraction','omit','Contact','User','Owner','internal','Tag','Tags','tag','getSnippet','getProactiveActions','License','increment','chatLicenseExceeded','readFileSync','server/files/chat/iframe.ejs','origin','http://localhost:9000','testWebsiteWithWildcard','x-real-ip','connection','virtual','replace','verticalAlignment','color','labelText','textColor','textButtonColor','color_button','hideWhenOffline','IntervalId','addApplications','transaction','Transaction','ISOLATION_LEVELS','READ_COMMITTED','ChatApplication','findAndCountAll','stack','finally','getApplications','addProactiveActions','ChatProactiveAction','getFields','online','false','offlineForm','onlineForm','fromKey','getOfflineMessages','ChatOfflineMessage','Attachments','addAgents','emit','userChatWebsite:save','removeAgents','isArray','userChatWebsite:remove','getAgents','mustache','path','ejs','fs-extra','lodash'];(function(_0x26d0eb,_0x2017ec){var _0x29d250=function(_0x5f46f9){while(--_0x5f46f9){_0x26d0eb['push'](_0x26d0eb['shift']());}};_0x29d250(++_0x2017ec);}(_0x0faf,0x132));var _0xf0fa=function(_0x2c7780,_0x100f4a){_0x2c7780=_0x2c7780-0x0;var _0x580bc8=_0x0faf[_0x2c7780];return _0x580bc8;};'use strict';var Mustache=require(_0xf0fa('0x0'));var util=require('util');var path=require(_0xf0fa('0x1'));var ejs=require(_0xf0fa('0x2'));var fs=require('fs');var fs_extra=require(_0xf0fa('0x3'));var _=require(_0xf0fa('0x4'));var querystring=require(_0xf0fa('0x5'));var htmlToText=require(_0xf0fa('0x6'));var Redis=require(_0xf0fa('0x7'));var jayson=require(_0xf0fa('0x8'));var qs=require(_0xf0fa('0x9'));var logger=require('../../config/logger')(_0xf0fa('0xa'));var config=require(_0xf0fa('0xb'));var APIBadRequestError=require(_0xf0fa('0xc'))[_0xf0fa('0xd')];var APINotFoundError=require(_0xf0fa('0xc'))['APINotFoundError'];var APIOutOfIntervalError=require(_0xf0fa('0xc'))[_0xf0fa('0xe')];var APIHandleError=require('../../errors/api')['handleError'];var APIConflictError=require(_0xf0fa('0xc'))[_0xf0fa('0xf')];var wildcardUtils=require(_0xf0fa('0x10'));var URL=require(_0xf0fa('0x11'))[_0xf0fa('0x12')];var db=require(_0xf0fa('0x13'))['db'];config[_0xf0fa('0x14')]=_[_0xf0fa('0x15')](config['redis'],{'host':_0xf0fa('0x16'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xf0fa('0x14')]));require('./chatWebsite.socket')[_0xf0fa('0x17')](socket);var client=jayson[_0xf0fa('0x18')][_0xf0fa('0x19')]({'port':0x232c});var client9002=jayson['client']['http']({'port':0x232a});var client9003=jayson[_0xf0fa('0x18')]['http']({'port':0x232b});var client9001=jayson[_0xf0fa('0x18')][_0xf0fa('0x19')]({'port':0x2329});function respondWithRpcPromise(_0x10ce43,_0x3203ce,_0x467d5f,_0x33df80){return new Promise(function(_0x28bab8,_0x3f3bb7){var _0x497542=_0x33df80||client;return _0x497542[_0xf0fa('0x1a')](_0x10ce43,_0x467d5f)[_0xf0fa('0x1b')](function(_0x30ce17){logger[_0xf0fa('0x1c')](_0xf0fa('0x1d'),_0x3203ce,_0xf0fa('0x1e'));logger['debug']('ChatWebsite,\x20%s,\x20%s,\x20%s',_0x3203ce,_0xf0fa('0x1e'),JSON[_0xf0fa('0x1f')](_0x30ce17));if(_0x30ce17[_0xf0fa('0x20')]){if(_0x30ce17[_0xf0fa('0x20')][_0xf0fa('0x21')]===0x1f4){logger[_0xf0fa('0x20')](_0xf0fa('0x1d'),_0x3203ce,_0x30ce17[_0xf0fa('0x20')][_0xf0fa('0x22')]);return _0x3f3bb7(_0x30ce17[_0xf0fa('0x20')][_0xf0fa('0x22')]);}logger['error'](_0xf0fa('0x1d'),_0x3203ce,_0x30ce17[_0xf0fa('0x20')][_0xf0fa('0x22')]);return _0x28bab8(_0x30ce17[_0xf0fa('0x20')][_0xf0fa('0x22')]);}else{logger[_0xf0fa('0x1c')](_0xf0fa('0x1d'),_0x3203ce,_0xf0fa('0x1e'));_0x28bab8(_0x30ce17[_0xf0fa('0x23')]['message']);}})[_0xf0fa('0x24')](function(_0x19e392){logger['error'](_0xf0fa('0x1d'),_0x3203ce,_0x19e392);_0x3f3bb7(_0x19e392);});});}function respondWithStatusCode(_0x3703b5,_0x2efe88){_0x2efe88=_0x2efe88||0xcc;return function(_0x59e007){if(_0x59e007){return _0x3703b5[_0xf0fa('0x25')](_0x2efe88);}return _0x3703b5[_0xf0fa('0x26')](_0x2efe88)[_0xf0fa('0x27')]();};}function respondWithResult(_0xf631f6,_0x4e6eef){_0x4e6eef=_0x4e6eef||0xc8;return function(_0x4be235){if(_0x4be235){return _0xf631f6[_0xf0fa('0x26')](_0x4e6eef)[_0xf0fa('0x28')](_0x4be235);}};}function respondWithFilteredResult(_0x1679cf,_0x11085f){return function(_0x57b8e9){if(_0x57b8e9){var _0x4058d6=typeof _0x11085f[_0xf0fa('0x29')]===_0xf0fa('0x2a')&&typeof _0x11085f['limit']===_0xf0fa('0x2a');var _0x593697=_0x57b8e9[_0xf0fa('0x2b')];var _0x1e3875=_0x4058d6?0x0:_0x11085f[_0xf0fa('0x29')];var _0x519661=_0x4058d6?_0x57b8e9[_0xf0fa('0x2b')]:_0x11085f[_0xf0fa('0x29')]+_0x11085f[_0xf0fa('0x2c')];var _0x212986;if(_0x519661>=_0x593697){_0x519661=_0x593697;_0x212986=0xc8;}else{_0x212986=0xce;}_0x1679cf[_0xf0fa('0x26')](_0x212986);return _0x1679cf[_0xf0fa('0x2d')]('Content-Range',_0x1e3875+'-'+_0x519661+'/'+_0x593697)['json'](_0x57b8e9);}return null;};}function saveUpdates(_0x36173a){return function(_0x255f9d){if(_0x255f9d){return _0x255f9d['update'](_0x36173a)[_0xf0fa('0x1b')](function(_0x50e0bd){return _0x50e0bd;});}return null;};}function removeEntity(_0x5ca1b2){return function(_0x47dcbb){if(_0x47dcbb){return _0x47dcbb[_0xf0fa('0x2e')]()['then'](function(){var _0x2c0721=_0x47dcbb[_0xf0fa('0x2f')]({'plain':!![]});var _0x5e1d57=_0xf0fa('0x30');return db[_0xf0fa('0x31')][_0xf0fa('0x2e')]({'where':{'type':_0x5e1d57,'resourceId':_0x2c0721['id']}})[_0xf0fa('0x1b')](function(){return _0x47dcbb;});})[_0xf0fa('0x1b')](function(){_0x5ca1b2['status'](0xcc)[_0xf0fa('0x27')]();});}};}function handleEntityNotFound(_0x307aa8){return function(_0x36dd2b){if(!_0x36dd2b){_0x307aa8['sendStatus'](0x194);}return _0x36dd2b;};}function handleError(_0x2a6749,_0x114feb){_0x114feb=_0x114feb||0x1f4;return function(_0x19b137){logger[_0xf0fa('0x20')](_0x19b137['stack']);if(_0x19b137['name']){delete _0x19b137[_0xf0fa('0x32')];}_0x2a6749[_0xf0fa('0x26')](_0x114feb)[_0xf0fa('0x33')](_0x19b137);};}function createInteractionObject(_0x47486f,_0x3a238d,_0x5cd669,_0x571422){var _0x5a2be0=require('user-agent-parser');var _0x3cdc0e=new _0x5a2be0();var _0x778121=_0x3cdc0e['setUA'](_0x5cd669['user-agent'])[_0xf0fa('0x34')]();var _0x1b8fb8=_0x3a238d[_0xf0fa('0x35')];if(_0x5cd669[_0xf0fa('0x36')]){_0x1b8fb8=_0x5cd669[_0xf0fa('0x36')];}else if(_0x5cd669[_0xf0fa('0x37')]){_0x1b8fb8=_[_0xf0fa('0x38')](_0x5cd669['x-forwarded-for']['split'](','));}return{'ContactId':_0x571422['id'],'ChatWebsiteId':_0x47486f,'from':(_0x571422[_0xf0fa('0x39')]||'')+'\x20'+(_0x571422[_0xf0fa('0x3a')]||''),'customerIp':_0x1b8fb8,'customerPort':_0x5cd669[_0xf0fa('0x3b')]?_0x5cd669[_0xf0fa('0x3b')]:null,'referer':_0x3a238d[_0xf0fa('0x3c')],'browserName':_0x778121[_0xf0fa('0x3d')]['name']&&_0x778121[_0xf0fa('0x3d')]['version']?util[_0xf0fa('0x3e')](_0xf0fa('0x3f'),_0x778121[_0xf0fa('0x3d')][_0xf0fa('0x32')],_0x778121[_0xf0fa('0x3d')][_0xf0fa('0x40')]):_0xf0fa('0x41'),'browserVersion':_0x778121[_0xf0fa('0x3d')][_0xf0fa('0x40')]||'unknown','osName':util['format']('%s\x20%s',_0x778121['os'][_0xf0fa('0x32')],_0x778121['os'][_0xf0fa('0x40')]),'osVersion':_0x778121['os']['version'],'deviceModel':_0x778121[_0xf0fa('0x42')][_0xf0fa('0x43')]&&_0x778121[_0xf0fa('0x42')][_0xf0fa('0x44')]?util['format'](_0xf0fa('0x45'),_0x778121[_0xf0fa('0x42')][_0xf0fa('0x43')],_0x778121[_0xf0fa('0x42')][_0xf0fa('0x44')],_0x778121[_0xf0fa('0x42')][_0xf0fa('0x46')]):null,'deviceVendor':_0x778121[_0xf0fa('0x42')][_0xf0fa('0x44')],'deviceType':_0x778121['device'][_0xf0fa('0x46')],'formData':JSON[_0xf0fa('0x1f')](_0x3a238d)};}exports[_0xf0fa('0x47')]=function(_0x24ae12,_0x856c2e){var _0x2f8c74={'include':[{'model':db[_0xf0fa('0x48')],'as':'mandatoryDispositionPause'}]},_0x53b2a6={},_0xd86643={'count':0x0,'rows':[]};var _0x1e13f6=_[_0xf0fa('0x49')](db[_0xf0fa('0x4a')][_0xf0fa('0x4b')],function(_0x37aad0){return{'name':_0x37aad0[_0xf0fa('0x4c')],'type':_0x37aad0[_0xf0fa('0x46')][_0xf0fa('0x4d')]};});_0x53b2a6[_0xf0fa('0x43')]=_['map'](_0x1e13f6,_0xf0fa('0x32'));_0x53b2a6['query']=_[_0xf0fa('0x4e')](_0x24ae12[_0xf0fa('0x4f')]);_0x53b2a6[_0xf0fa('0x50')]=_['intersection'](_0x53b2a6[_0xf0fa('0x43')],_0x53b2a6[_0xf0fa('0x4f')]);_0x2f8c74[_0xf0fa('0x51')]=_[_0xf0fa('0x52')](_0x53b2a6[_0xf0fa('0x43')],qs['fields'](_0x24ae12[_0xf0fa('0x4f')]['fields']));_0x2f8c74[_0xf0fa('0x51')]=_0x2f8c74[_0xf0fa('0x51')][_0xf0fa('0x53')]?_0x2f8c74[_0xf0fa('0x51')]:_0x53b2a6[_0xf0fa('0x43')];if(!_0x24ae12['query'][_0xf0fa('0x54')](_0xf0fa('0x55'))){_0x2f8c74[_0xf0fa('0x2c')]=qs[_0xf0fa('0x2c')](_0x24ae12[_0xf0fa('0x4f')][_0xf0fa('0x2c')]);_0x2f8c74['offset']=qs[_0xf0fa('0x29')](_0x24ae12['query']['offset']);}_0x2f8c74['order']=qs[_0xf0fa('0x56')](_0x24ae12[_0xf0fa('0x4f')][_0xf0fa('0x56')]);_0x2f8c74[_0xf0fa('0x57')]=qs[_0xf0fa('0x50')](_[_0xf0fa('0x58')](_0x24ae12[_0xf0fa('0x4f')],_0x53b2a6[_0xf0fa('0x50')]),_0x1e13f6);if(_0x24ae12[_0xf0fa('0x4f')]['filter']){_0x2f8c74[_0xf0fa('0x57')]=_['merge'](_0x2f8c74[_0xf0fa('0x57')],{'$or':_[_0xf0fa('0x49')](_0x1e13f6,function(_0x1f95dc){if(_0x1f95dc[_0xf0fa('0x46')]!=='VIRTUAL'){var _0x36e343={};_0x36e343[_0x1f95dc['name']]={'$like':'%'+_0x24ae12[_0xf0fa('0x4f')][_0xf0fa('0x59')]+'%'};return _0x36e343;}})});}_0x2f8c74=_[_0xf0fa('0x5a')]({},_0x2f8c74,_0x24ae12[_0xf0fa('0x5b')]);var _0xa55804={'where':_0x2f8c74[_0xf0fa('0x57')]};return db['ChatWebsite'][_0xf0fa('0x2b')](_0xa55804)[_0xf0fa('0x1b')](function(_0x4a20f4){_0xd86643[_0xf0fa('0x2b')]=_0x4a20f4;if(_0x24ae12[_0xf0fa('0x4f')]['includeAll']){_0x2f8c74[_0xf0fa('0x5c')]=[{'all':!![]}];}return db[_0xf0fa('0x4a')]['findAll'](_0x2f8c74);})[_0xf0fa('0x1b')](function(_0x3c5014){_0xd86643[_0xf0fa('0x5d')]=_0x3c5014;return _0xd86643;})['then'](respondWithFilteredResult(_0x856c2e,_0x2f8c74))[_0xf0fa('0x24')](handleError(_0x856c2e,null));};exports[_0xf0fa('0x5e')]=function(_0x480dc0,_0x22ed85){var _0x34147c={'raw':![],'where':{'id':_0x480dc0['params']['id']},'include':[{'model':db[_0xf0fa('0x48')],'as':_0xf0fa('0x5f')}]},_0x3369e1={};_0x3369e1['model']=_[_0xf0fa('0x4e')](db[_0xf0fa('0x4a')][_0xf0fa('0x4b')]);_0x3369e1[_0xf0fa('0x4f')]=_[_0xf0fa('0x4e')](_0x480dc0[_0xf0fa('0x4f')]);_0x3369e1[_0xf0fa('0x50')]=_[_0xf0fa('0x52')](_0x3369e1[_0xf0fa('0x43')],_0x3369e1[_0xf0fa('0x4f')]);_0x34147c['attributes']=_[_0xf0fa('0x52')](_0x3369e1[_0xf0fa('0x43')],qs[_0xf0fa('0x60')](_0x480dc0[_0xf0fa('0x4f')][_0xf0fa('0x60')]));_0x34147c[_0xf0fa('0x51')]=_0x34147c[_0xf0fa('0x51')]['length']?_0x34147c[_0xf0fa('0x51')]:_0x3369e1[_0xf0fa('0x43')];if(_0x480dc0[_0xf0fa('0x4f')][_0xf0fa('0x61')]){_0x34147c[_0xf0fa('0x5c')]=[{'all':!![]}];}_0x34147c=_[_0xf0fa('0x5a')]({},_0x34147c,_0x480dc0[_0xf0fa('0x5b')]);return db['ChatWebsite'][_0xf0fa('0x62')](_0x34147c)[_0xf0fa('0x1b')](handleEntityNotFound(_0x22ed85,null))[_0xf0fa('0x1b')](respondWithResult(_0x22ed85,null))[_0xf0fa('0x24')](handleError(_0x22ed85,null));};exports[_0xf0fa('0x63')]=function(_0x5bf7f2,_0x5f023b){var _0x5a4e16=null;_0x5bf7f2[_0xf0fa('0x64')][_0xf0fa('0x65')][_0xf0fa('0x66')](',')[_0xf0fa('0x67')](_0x508df9=>{if(_0x508df9['trim']()!==''&&!wildcardUtils[_0xf0fa('0x68')](_0x508df9['trim']())){_0x5a4e16=new APIBadRequestError('\x22'+_0x508df9[_0xf0fa('0x69')]()+_0xf0fa('0x6a'));}});if(_0x5a4e16){return handleError(_0x5f023b,null)(_0x5a4e16);}return db[_0xf0fa('0x4a')][_0xf0fa('0x63')](_0x5bf7f2[_0xf0fa('0x64')],{})['then'](function(_0x130e56){var _0xdc09c7=_0x5bf7f2[_0xf0fa('0x6b')][_0xf0fa('0x2f')]({'plain':!![]});if(!_0xdc09c7)throw new Error(_0xf0fa('0x6c'));if(_0xdc09c7[_0xf0fa('0x6d')]===_0xf0fa('0x6b')){var _0x35e7e7=_0x130e56[_0xf0fa('0x2f')]({'plain':!![]});var _0x4c2fdd='ChatWebsites';return db[_0xf0fa('0x6e')]['find']({'where':{'name':_0x4c2fdd,'userProfileId':_0xdc09c7[_0xf0fa('0x6f')]},'raw':!![]})['then'](function(_0x4b3cb6){if(_0x4b3cb6&&_0x4b3cb6['autoAssociation']===0x0){return db[_0xf0fa('0x31')][_0xf0fa('0x63')]({'name':_0x35e7e7[_0xf0fa('0x32')],'resourceId':_0x35e7e7['id'],'type':_0x4b3cb6[_0xf0fa('0x32')],'sectionId':_0x4b3cb6['id']},{})[_0xf0fa('0x1b')](function(){return _0x130e56;});}else{return _0x130e56;}})[_0xf0fa('0x24')](function(_0x12a969){logger[_0xf0fa('0x20')](_0xf0fa('0x70'),_0x12a969);throw _0x12a969;});}return _0x130e56;})[_0xf0fa('0x1b')](respondWithResult(_0x5f023b,0xc9))['catch'](handleError(_0x5f023b,null));};exports[_0xf0fa('0x71')]=function(_0x5de588,_0x448851){var _0x56c701=null;_0x5de588[_0xf0fa('0x64')]['address'][_0xf0fa('0x66')](',')['forEach'](_0x15f4d5=>{if(_0x15f4d5[_0xf0fa('0x69')]()!==''&&!wildcardUtils[_0xf0fa('0x68')](_0x15f4d5[_0xf0fa('0x69')]())){_0x56c701=new APIBadRequestError('\x22'+_0x15f4d5[_0xf0fa('0x69')]()+'\x22\x20is\x20not\x20a\x20valid\x20wildcard\x20expression');}});if(_0x56c701){return handleError(_0x448851,null)(_0x56c701);}if(_0x5de588['body']['id']){delete _0x5de588[_0xf0fa('0x64')]['id'];}return db[_0xf0fa('0x4a')]['find']({'where':{'id':_0x5de588['params']['id']},'include':[{'model':db[_0xf0fa('0x48')],'as':_0xf0fa('0x5f')}]})[_0xf0fa('0x1b')](handleEntityNotFound(_0x448851,null))[_0xf0fa('0x1b')](saveUpdates(_0x5de588[_0xf0fa('0x64')],null))['then'](respondWithResult(_0x448851,null))[_0xf0fa('0x24')](handleError(_0x448851,null));};exports[_0xf0fa('0x2e')]=function(_0x16492b,_0x5ab304){return db['ChatWebsite'][_0xf0fa('0x62')]({'where':{'id':_0x16492b[_0xf0fa('0x72')]['id']}})['then'](handleEntityNotFound(_0x5ab304,null))['then'](removeEntity(_0x5ab304,null))[_0xf0fa('0x24')](handleError(_0x5ab304,null));};exports[_0xf0fa('0x73')]=function(_0x22cf95,_0x509891){return db['ChatWebsite']['describe']()[_0xf0fa('0x1b')](respondWithResult(_0x509891,null))['catch'](handleError(_0x509891,null));};exports['addDisposition']=function(_0xebbb68,_0xfb68fd){if(_0xebbb68[_0xf0fa('0x64')]['id']){delete _0xebbb68[_0xf0fa('0x64')]['id'];}return db[_0xf0fa('0x4a')][_0xf0fa('0x62')]({'where':{'id':_0xebbb68['params']['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0xfb68fd,null))[_0xf0fa('0x1b')](function(_0x15dda8){if(_0x15dda8){_0xebbb68['body'][_0xf0fa('0x74')]=_0x15dda8['id'];return db['Disposition']['create'](_0xebbb68[_0xf0fa('0x64')]);}})['then'](respondWithResult(_0xfb68fd,null))['catch'](handleError(_0xfb68fd,null));};exports[_0xf0fa('0x75')]=function(_0x418ee8,_0x83ea6d){var _0x581f37={'raw':![],'where':{}};var _0xe1b0ff={};var _0x168099={'count':0x0,'rows':[]};return db['ChatWebsite'][_0xf0fa('0x76')]({'where':{'id':_0x418ee8[_0xf0fa('0x72')]['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0x83ea6d,null))[_0xf0fa('0x1b')](function(_0x1461e1){if(_0x1461e1){_0xe1b0ff[_0xf0fa('0x43')]=_['keys'](db[_0xf0fa('0x77')]['rawAttributes']);_0xe1b0ff[_0xf0fa('0x4f')]=_[_0xf0fa('0x4e')](_0x418ee8[_0xf0fa('0x4f')]);_0xe1b0ff[_0xf0fa('0x50')]=_[_0xf0fa('0x52')](_0xe1b0ff[_0xf0fa('0x43')],_0xe1b0ff[_0xf0fa('0x4f')]);_0x581f37['attributes']=_['intersection'](_0xe1b0ff[_0xf0fa('0x43')],qs[_0xf0fa('0x60')](_0x418ee8['query'][_0xf0fa('0x60')]));_0x581f37['attributes']=_0x581f37['attributes'][_0xf0fa('0x53')]?_0x581f37[_0xf0fa('0x51')]:_0xe1b0ff['model'];if(!_0x418ee8['query'][_0xf0fa('0x54')](_0xf0fa('0x55'))){_0x581f37[_0xf0fa('0x2c')]=qs[_0xf0fa('0x2c')](_0x418ee8[_0xf0fa('0x4f')][_0xf0fa('0x2c')]);_0x581f37['offset']=qs[_0xf0fa('0x29')](_0x418ee8[_0xf0fa('0x4f')]['offset']);}_0x581f37[_0xf0fa('0x78')]=qs['sort'](_0x418ee8[_0xf0fa('0x4f')]['sort']);_0x581f37['where']=qs[_0xf0fa('0x50')](_['pick'](_0x418ee8['query'],_0xe1b0ff['filters']));_0x581f37['where'][_0xf0fa('0x74')]=_0x1461e1['id'];if(_0x418ee8['query'][_0xf0fa('0x59')]){_0x581f37[_0xf0fa('0x57')]=_['merge'](_0x581f37[_0xf0fa('0x57')],{'$or':_[_0xf0fa('0x49')](_0x581f37[_0xf0fa('0x51')],function(_0x2ef7ef){var _0x4e5a0e={};_0x4e5a0e[_0x2ef7ef]={'$like':'%'+_0x418ee8[_0xf0fa('0x4f')]['filter']+'%'};return _0x4e5a0e;})});}_0x581f37=_[_0xf0fa('0x5a')]({},_0x581f37,_0x418ee8['options']);return db[_0xf0fa('0x77')][_0xf0fa('0x2b')]({'where':_0x581f37[_0xf0fa('0x57')]})[_0xf0fa('0x1b')](function(_0x4c4fdd){_0x168099['count']=_0x4c4fdd;if(_0x418ee8[_0xf0fa('0x4f')]['includeAll']){_0x581f37[_0xf0fa('0x5c')]=[{'all':!![]}];}return db[_0xf0fa('0x77')][_0xf0fa('0x79')](_0x581f37);})['then'](function(_0x142f4f){_0x168099['rows']=_0x142f4f;return _0x168099;});}})[_0xf0fa('0x1b')](respondWithFilteredResult(_0x83ea6d,_0x581f37))[_0xf0fa('0x24')](handleError(_0x83ea6d,null));};exports[_0xf0fa('0x7a')]=function(_0x52cf85,_0x227fda){return db['ChatWebsite'][_0xf0fa('0x62')]({'where':{'id':_0x52cf85[_0xf0fa('0x72')]['id']}})['then'](handleEntityNotFound(_0x227fda,null))[_0xf0fa('0x1b')](function(_0x47317b){if(_0x47317b){return _0x47317b[_0xf0fa('0x7a')](_0x52cf85[_0xf0fa('0x4f')]['ids']);}})[_0xf0fa('0x1b')](respondWithStatusCode(_0x227fda,null))['catch'](handleError(_0x227fda,null));};exports['addAnswer']=function(_0x2ea054,_0x381b50){if(_0x2ea054['body']['id']){delete _0x2ea054['body']['id'];}return db[_0xf0fa('0x4a')][_0xf0fa('0x62')]({'where':{'id':_0x2ea054['params']['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0x381b50,null))['then'](function(_0x2815ca){if(_0x2815ca){_0x2ea054[_0xf0fa('0x64')]['ChatWebsiteId']=_0x2815ca['id'];return db['CannedAnswer'][_0xf0fa('0x63')](_0x2ea054['body']);}})[_0xf0fa('0x1b')](respondWithResult(_0x381b50,null))[_0xf0fa('0x24')](handleError(_0x381b50,null));};exports[_0xf0fa('0x7b')]=function(_0x530b41,_0x577ea1){var _0x174737={'raw':![],'where':{}};var _0x4eddc7={};var _0x24b4d7={'count':0x0,'rows':[]};return db[_0xf0fa('0x4a')]['findOne']({'where':{'id':_0x530b41[_0xf0fa('0x72')]['id']}})['then'](handleEntityNotFound(_0x577ea1,null))[_0xf0fa('0x1b')](function(_0x40ba70){if(_0x40ba70){_0x4eddc7[_0xf0fa('0x43')]=_[_0xf0fa('0x4e')](db['CannedAnswer']['rawAttributes']);_0x4eddc7[_0xf0fa('0x4f')]=_['keys'](_0x530b41[_0xf0fa('0x4f')]);_0x4eddc7['filters']=_['intersection'](_0x4eddc7[_0xf0fa('0x43')],_0x4eddc7['query']);_0x174737['attributes']=_[_0xf0fa('0x52')](_0x4eddc7['model'],qs['fields'](_0x530b41[_0xf0fa('0x4f')][_0xf0fa('0x60')]));_0x174737['attributes']=_0x174737[_0xf0fa('0x51')]['length']?_0x174737['attributes']:_0x4eddc7[_0xf0fa('0x43')];if(!_0x530b41['query']['hasOwnProperty'](_0xf0fa('0x55'))){_0x174737['limit']=qs[_0xf0fa('0x2c')](_0x530b41[_0xf0fa('0x4f')]['limit']);_0x174737[_0xf0fa('0x29')]=qs[_0xf0fa('0x29')](_0x530b41[_0xf0fa('0x4f')]['offset']);}_0x174737[_0xf0fa('0x78')]=qs[_0xf0fa('0x56')](_0x530b41['query']['sort']);_0x174737[_0xf0fa('0x57')]=qs['filters'](_['pick'](_0x530b41[_0xf0fa('0x4f')],_0x4eddc7['filters']));_0x174737['where'][_0xf0fa('0x74')]=_0x40ba70['id'];if(_0x530b41['query'][_0xf0fa('0x59')]){_0x174737[_0xf0fa('0x57')]=_[_0xf0fa('0x5a')](_0x174737[_0xf0fa('0x57')],{'$or':_[_0xf0fa('0x49')](_0x174737['attributes'],function(_0x201f77){var _0x2bd061={};_0x2bd061[_0x201f77]={'$like':'%'+_0x530b41[_0xf0fa('0x4f')][_0xf0fa('0x59')]+'%'};return _0x2bd061;})});}_0x174737=_[_0xf0fa('0x5a')]({},_0x174737,_0x530b41[_0xf0fa('0x5b')]);return db[_0xf0fa('0x7c')][_0xf0fa('0x2b')]({'where':_0x174737['where']})['then'](function(_0x397378){_0x24b4d7['count']=_0x397378;if(_0x530b41['query'][_0xf0fa('0x61')]){_0x174737[_0xf0fa('0x5c')]=[{'all':!![]}];}return db[_0xf0fa('0x7c')][_0xf0fa('0x79')](_0x174737);})[_0xf0fa('0x1b')](function(_0x188052){_0x24b4d7[_0xf0fa('0x5d')]=_0x188052;return _0x24b4d7;});}})[_0xf0fa('0x1b')](respondWithFilteredResult(_0x577ea1,_0x174737))['catch'](handleError(_0x577ea1,null));};exports['removeAnswers']=function(_0x5461cc,_0x50735f){return db[_0xf0fa('0x4a')][_0xf0fa('0x62')]({'where':{'id':_0x5461cc['params']['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0x50735f,null))[_0xf0fa('0x1b')](function(_0x18d4ce){if(_0x18d4ce){return _0x18d4ce['removeAnswers'](_0x5461cc['query'][_0xf0fa('0x7d')]);}})[_0xf0fa('0x1b')](respondWithStatusCode(_0x50735f,null))[_0xf0fa('0x24')](handleError(_0x50735f,null));};exports[_0xf0fa('0x7e')]=function(_0x44b3cf,_0x45b555){_0x44b3cf['body']['sitepic']=_0x44b3cf[_0xf0fa('0x7f')]['filename'];return db[_0xf0fa('0x4a')][_0xf0fa('0x62')]({'where':{'id':_0x44b3cf[_0xf0fa('0x72')]['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0x45b555,null))[_0xf0fa('0x1b')](saveUpdates(_0x44b3cf[_0xf0fa('0x64')],null))[_0xf0fa('0x1b')](respondWithResult(_0x45b555,null))[_0xf0fa('0x24')](handleError(_0x45b555,null));};exports[_0xf0fa('0x80')]=function(_0x4aa74c,_0x3d878b){_0x4aa74c['body']['agentAvatar']=_0x4aa74c[_0xf0fa('0x7f')][_0xf0fa('0x81')];return db['ChatWebsite'][_0xf0fa('0x62')]({'where':{'id':_0x4aa74c[_0xf0fa('0x72')]['id']}})['then'](handleEntityNotFound(_0x3d878b,null))[_0xf0fa('0x1b')](saveUpdates(_0x4aa74c[_0xf0fa('0x64')],null))[_0xf0fa('0x1b')](respondWithResult(_0x3d878b,null))['catch'](handleError(_0x3d878b,null));};exports[_0xf0fa('0x82')]=function(_0x2e30dd,_0x3edfe0){_0x2e30dd['body'][_0xf0fa('0x83')]=_0x2e30dd[_0xf0fa('0x7f')][_0xf0fa('0x81')];return db[_0xf0fa('0x4a')][_0xf0fa('0x62')]({'where':{'id':_0x2e30dd[_0xf0fa('0x72')]['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0x3edfe0,null))[_0xf0fa('0x1b')](saveUpdates(_0x2e30dd[_0xf0fa('0x64')],null))[_0xf0fa('0x1b')](respondWithResult(_0x3edfe0,null))[_0xf0fa('0x24')](handleError(_0x3edfe0,null));};exports[_0xf0fa('0x84')]=function(_0x17ca2b,_0x284e7d){_0x17ca2b[_0xf0fa('0x64')][_0xf0fa('0x85')]=_0x17ca2b[_0xf0fa('0x7f')][_0xf0fa('0x81')];return db[_0xf0fa('0x4a')][_0xf0fa('0x62')]({'where':{'id':_0x17ca2b[_0xf0fa('0x72')]['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0x284e7d,null))[_0xf0fa('0x1b')](saveUpdates(_0x17ca2b['body'],null))['then'](respondWithResult(_0x284e7d,null))[_0xf0fa('0x24')](handleError(_0x284e7d,null));};exports[_0xf0fa('0x86')]=function(_0x2a8217,_0x15291c){var _0x125713=path[_0xf0fa('0x87')](config[_0xf0fa('0x88')],_0xf0fa('0x89'));var _0x202759={'where':{'id':_0x2a8217[_0xf0fa('0x72')]['id']},'attributes':['id',_0xf0fa('0x8a')],'raw':!![]};var _0x2cd096=![];return require('../../config/license/util')[_0xf0fa('0x8b')]()['then'](function(_0x35fd94){if(_0x35fd94){_0x2cd096=_0x35fd94[_0xf0fa('0x8c')];}})['then'](function(){return db[_0xf0fa('0x4a')][_0xf0fa('0x62')](_0x202759);})[_0xf0fa('0x1b')](handleEntityNotFound(_0x15291c,null))[_0xf0fa('0x1b')](function(_0x16fdd7){if(_0x16fdd7){if(!_[_0xf0fa('0x8d')](_0x16fdd7[_0xf0fa('0x8a')])){if(fs['existsSync'](path['join'](config[_0xf0fa('0x88')],_0xf0fa('0x8e'),_0x16fdd7[_0xf0fa('0x8a')]))&&_0x2cd096){_0x125713=path['join'](config[_0xf0fa('0x88')],_0xf0fa('0x8e'),_0x16fdd7[_0xf0fa('0x8a')]);}}return _0x15291c[_0xf0fa('0x8f')](_0x125713);}})[_0xf0fa('0x24')](handleError(_0x15291c,null));};exports[_0xf0fa('0x90')]=function(_0x6b6050,_0x36c5e3){var _0x18fe3d=path[_0xf0fa('0x87')](config['root'],_0xf0fa('0x91'));var _0x522569={'where':{'id':_0x6b6050[_0xf0fa('0x72')]['id']},'attributes':['id',_0xf0fa('0x92')],'raw':!![]};return db[_0xf0fa('0x4a')][_0xf0fa('0x62')](_0x522569)[_0xf0fa('0x1b')](handleEntityNotFound(_0x36c5e3,null))[_0xf0fa('0x1b')](function(_0x32a10f){if(_0x32a10f){if(!_[_0xf0fa('0x8d')](_0x32a10f['agentAvatar'])){if(fs['existsSync'](path[_0xf0fa('0x87')](config[_0xf0fa('0x88')],_0xf0fa('0x93'),_0x32a10f[_0xf0fa('0x92')]))){_0x18fe3d=path[_0xf0fa('0x87')](config[_0xf0fa('0x88')],_0xf0fa('0x93'),_0x32a10f['agentAvatar']);}}return _0x36c5e3[_0xf0fa('0x8f')](_0x18fe3d);}})[_0xf0fa('0x24')](handleError(_0x36c5e3,null));};exports[_0xf0fa('0x94')]=function(_0x477425,_0x3f068f){var _0xc8e407=path[_0xf0fa('0x87')](config['root'],_0xf0fa('0x95'));var _0x3fc094={'where':{'id':_0x477425[_0xf0fa('0x72')]['id']},'attributes':['id',_0xf0fa('0x83'),_0xf0fa('0x96')],'raw':!![]};return db['ChatWebsite'][_0xf0fa('0x62')](_0x3fc094)['then'](handleEntityNotFound(_0x3f068f,null))[_0xf0fa('0x1b')](function(_0x350b8a){if(_0x350b8a){if(!_[_0xf0fa('0x8d')](_0x350b8a['customerAvatar'])){if(fs['existsSync'](path[_0xf0fa('0x87')](config[_0xf0fa('0x88')],_0xf0fa('0x93'),_0x350b8a[_0xf0fa('0x83')]))&&_0x350b8a['showCustomerAvatar']){_0xc8e407=path[_0xf0fa('0x87')](config[_0xf0fa('0x88')],_0xf0fa('0x93'),_0x350b8a[_0xf0fa('0x83')]);}}return _0x3f068f[_0xf0fa('0x8f')](_0xc8e407);}})[_0xf0fa('0x24')](handleError(_0x3f068f,null));};exports['getSystemAvatar']=function(_0x42c62c,_0x4f21e9){var _0x5252ba=path[_0xf0fa('0x87')](config[_0xf0fa('0x88')],'server/files/images/avatars/system_avatar.png');var _0x31f378={'where':{'id':_0x42c62c['params']['id']},'attributes':['id',_0xf0fa('0x85')],'raw':!![]};return db['ChatWebsite']['find'](_0x31f378)[_0xf0fa('0x1b')](handleEntityNotFound(_0x4f21e9,null))[_0xf0fa('0x1b')](function(_0x2ab565){if(_0x2ab565){if(!_[_0xf0fa('0x8d')](_0x2ab565[_0xf0fa('0x85')])){if(fs[_0xf0fa('0x97')](path['join'](config[_0xf0fa('0x88')],_0xf0fa('0x93'),_0x2ab565[_0xf0fa('0x85')]))){_0x5252ba=path[_0xf0fa('0x87')](config[_0xf0fa('0x88')],_0xf0fa('0x93'),_0x2ab565[_0xf0fa('0x85')]);}}return _0x4f21e9[_0xf0fa('0x8f')](_0x5252ba);}})['catch'](handleError(_0x4f21e9,null));};function checkWebsiteInterval(_0x32d4bf){var _0x2a895e=_0x32d4bf[_0xf0fa('0x98')];if(!_0x2a895e){return Promise[_0xf0fa('0x99')](_0x32d4bf);}var _0x117071=_0x32d4bf[_0xf0fa('0x9a')]||undefined;return _0x2a895e[_0xf0fa('0x9b')](_0x117071)[_0xf0fa('0x1b')](function(_0x114487){if(!_0x114487){throw new APIOutOfIntervalError();}return _0x32d4bf;});}exports[_0xf0fa('0x9c')]=function(_0x27c397,_0x49448a){var _0x29b1e9={'body':_0x27c397[_0xf0fa('0x64')],'channel':_0xf0fa('0x9d')};var _0x24c93c=[];var _0xb688a1=[];var _0x274f0d={};var _0x3daa6e=![];if(_0x27c397[_0xf0fa('0x64')]['id']){delete _0x27c397['body']['id'];}if(_[_0xf0fa('0x8d')](_0x27c397[_0xf0fa('0x64')][_0xf0fa('0x9e')])){throw new APIBadRequestError('From\x20is\x20mandatory');}if(_[_0xf0fa('0x8d')](_0x27c397[_0xf0fa('0x64')][_0xf0fa('0x9f')])){throw new APIBadRequestError('MapKey\x20is\x20mandatory');}if(_[_0xf0fa('0xa0')](_0x27c397[_0xf0fa('0x64')][_0xf0fa('0x64')])){throw new APIBadRequestError('Body\x20is\x20mandatory');}var _0x212b4a=_0x27c397[_0xf0fa('0x64')][_0xf0fa('0x35')]&&_0x27c397[_0xf0fa('0x64')][_0xf0fa('0x3c')];return db[_0xf0fa('0xa1')][_0xf0fa('0x73')]()['then'](function(_0x5421b7){if(!_0x5421b7){throw new Error(_0xf0fa('0xa2'));}_0x24c93c=Object['keys'](_0x5421b7)[_0xf0fa('0x59')](function(_0x4be965){return![_0xf0fa('0xa3'),'updatedAt'][_0xf0fa('0xa4')](_0x4be965);});_0xb688a1=Object[_0xf0fa('0x4e')](_0x5421b7)[_0xf0fa('0x59')](function(_0x51417a){return!['createdAt',_0xf0fa('0xa5'),_0xf0fa('0xa6'),_0xf0fa('0xa7')]['includes'](_0x51417a);});if(!_['includes'](_0xb688a1,_0x27c397['body']['mapKey'])){throw new APIBadRequestError(_0xf0fa('0xa8')+_0xb688a1['join'](',\x20'));}_0x274f0d[_0x27c397['body'][_0xf0fa('0x9f')]]=_0x27c397[_0xf0fa('0x64')][_0xf0fa('0x9e')];})[_0xf0fa('0x1b')](function(){return db[_0xf0fa('0x4a')][_0xf0fa('0x62')]({'where':{'id':_0x27c397['params']['id']},'include':[{'model':db[_0xf0fa('0xa9')],'as':_0xf0fa('0xaa'),'include':[{'model':db[_0xf0fa('0xa1')],'as':_0xf0fa('0xab'),'where':_0x274f0d,'limit':0x1,'order':[[_0xf0fa('0xa5'),_0xf0fa('0xac')]]}]},{'model':db['ChatApplication'],'as':_0xf0fa('0xad')},{'model':db['Interval'],'as':_0xf0fa('0x98'),'include':[{'model':db[_0xf0fa('0x98')],'as':_0xf0fa('0xae'),'attributes':['id',_0xf0fa('0xaf')],'raw':!![]}]}]});})[_0xf0fa('0x1b')](function(_0x1eec60){if(!_0x1eec60){throw new APINotFoundError(util[_0xf0fa('0x3e')]('Chat\x20Website\x20with\x20id\x20%s\x20not\x20found',_0x27c397[_0xf0fa('0x72')]['id']));}if(_0x212b4a){return checkWebsiteInterval(_0x1eec60);}return _0x1eec60;})[_0xf0fa('0x1b')](function(_0x4765f8){_0x29b1e9[_0xf0fa('0xb0')]=_0x4765f8;_0x29b1e9[_0xf0fa('0xb1')]=_[_0xf0fa('0xb2')](_0x4765f8['Applications'],[_0xf0fa('0xb3')],[_0xf0fa('0xb4')]);if(_0x29b1e9[_0xf0fa('0xb0')][_0xf0fa('0xad')]){delete _0x29b1e9[_0xf0fa('0xb0')][_0xf0fa('0xad')];}_0x29b1e9[_0xf0fa('0xb5')]=_0x4765f8[_0xf0fa('0xaa')]||{'id':_0x4765f8[_0xf0fa('0xa7')]};if(_0x29b1e9[_0xf0fa('0xb5')]&&_0x29b1e9[_0xf0fa('0xb5')][_0xf0fa('0xab')][_0xf0fa('0x53')]){return _0x29b1e9[_0xf0fa('0xb5')][_0xf0fa('0xab')][0x0];}var _0x322116=_['defaults'](_0x27c397[_0xf0fa('0x64')],{'firstName':_0x27c397['body'][_0xf0fa('0x9e')],'ListId':_0x4765f8[_0xf0fa('0xa7')]});_0x322116[_0x27c397[_0xf0fa('0x64')][_0xf0fa('0x9f')]]=_0x27c397[_0xf0fa('0x64')][_0xf0fa('0x9e')];return db[_0xf0fa('0xa1')][_0xf0fa('0x63')](_0x322116,{'fields':_0x24c93c,'raw':!![]});})[_0xf0fa('0x1b')](function(_0x4fb7e8){_0x29b1e9[_0xf0fa('0xb6')]=_0x4fb7e8;var _0x3ba4e3=createInteractionObject(_0x27c397[_0xf0fa('0x72')]['id'],_0x27c397[_0xf0fa('0x64')],_0x27c397[_0xf0fa('0xb7')],_0x4fb7e8);var _0x30ece0={'ChatWebsiteId':_0x27c397['params']['id']};if(_0x27c397[_0xf0fa('0x64')][_0xf0fa('0xb8')]){_0x30ece0[_0xf0fa('0xb8')]=_0x27c397[_0xf0fa('0x64')]['threadId'];_0x30ece0[_0xf0fa('0xb9')]=![];return db[_0xf0fa('0xba')][_0xf0fa('0x62')]({'where':_0x30ece0})['then'](function(_0x3b751e){var _0x20a66f=_0x27c397[_0xf0fa('0x64')][_0xf0fa('0x35')]&&_0x27c397[_0xf0fa('0x64')]['referer'];if(_0x3b751e){_0x3daa6e=!![];return _0x3b751e;}else if(!_0x20a66f&&_0x3b751e&&_0x3b751e[_0xf0fa('0xb9')]){throw new APIConflictError(_0xf0fa('0xbb'));}_0x3ba4e3[_0xf0fa('0xb8')]=_0x27c397[_0xf0fa('0x64')][_0xf0fa('0xb8')];_0x3ba4e3['externalUrl']=_0x27c397[_0xf0fa('0x64')][_0xf0fa('0xbc')];return db[_0xf0fa('0xba')][_0xf0fa('0x63')](_0x3ba4e3);});}_0x30ece0[_0xf0fa('0xbd')]=_0x4fb7e8['id'];if(_0x27c397[_0xf0fa('0x64')]['interaction']&&_0x27c397[_0xf0fa('0x64')]['interaction']['id']){_0x30ece0['id']=_0x27c397[_0xf0fa('0x64')][_0xf0fa('0xbe')]['id'];return db[_0xf0fa('0xba')][_0xf0fa('0x62')]({'where':_0x30ece0})[_0xf0fa('0x1b')](function(_0x3a9e84){var _0xf57911=_0x27c397['body'][_0xf0fa('0x35')]&&_0x27c397[_0xf0fa('0x64')][_0xf0fa('0x3c')];if(!_0xf57911&&_0x3a9e84&&_0x3a9e84['closed']){throw new APIConflictError(_0xf0fa('0xbb'));}else if(_0x3a9e84){_0x3daa6e=!![];return _0x3a9e84;}else{return db['ChatInteraction']['create'](_0x3ba4e3);}});}return db['ChatInteraction'][_0xf0fa('0x63')](_0x3ba4e3);})['then'](function(_0x3a6594){if(!_0x3daa6e){return _0x3a6594;}var _0x26524d={'from':(_0x29b1e9['contact']['firstName']||'')+'\x20'+(_0x29b1e9[_0xf0fa('0xb6')][_0xf0fa('0x3a')]||'')};if(_0x27c397['body'][_0xf0fa('0xb8')]&&_0x27c397['body']['messageId']&&_0x27c397[_0xf0fa('0x64')][_0xf0fa('0xb8')]!=_0x27c397[_0xf0fa('0x64')][_0xf0fa('0xbf')]){_0x26524d['threadId']=_0x27c397['body'][_0xf0fa('0xbf')];}return _0x3a6594[_0xf0fa('0x71')](_0x26524d);})[_0xf0fa('0x1b')](function(_0x22b9b6){_0x29b1e9[_0xf0fa('0xbe')]=_0x22b9b6['get']({'plain':!![]});_0x29b1e9[_0xf0fa('0xbe')][_0xf0fa('0xc0')]=!_0x3daa6e;if(_0x29b1e9[_0xf0fa('0xbe')][_0xf0fa('0xc0')]){if(_0x29b1e9[_0xf0fa('0xb0')][_0xf0fa('0xc1')]){_0x29b1e9[_0xf0fa('0xb1')][_0xf0fa('0xc2')]({'id':0x0,'priority':_0x29b1e9['applications'][_0xf0fa('0x53')]+0x1,'app':'close','appdata':'unmanaged','interval':_0xf0fa('0xc3')});}}return db[_0xf0fa('0xc4')][_0xf0fa('0x63')]({'body':_0x27c397[_0xf0fa('0x64')][_0xf0fa('0x64')],'ChatWebsiteId':_0x27c397[_0xf0fa('0x72')]['id'],'ChatInteractionId':_0x22b9b6['id'],'direction':'in','ContactId':_0x29b1e9['contact']['id'],'AttachmentId':_0x27c397[_0xf0fa('0x64')][_0xf0fa('0xc5')]});})[_0xf0fa('0x1b')](function(_0x1514a4){_0x29b1e9[_0xf0fa('0x22')]=_0x1514a4;if(!_0x29b1e9['interaction'][_0xf0fa('0xc6')]){return;}return db['User'][_0xf0fa('0x62')]({'attributes':['id','name'],'where':{'id':_0x29b1e9[_0xf0fa('0xbe')][_0xf0fa('0xc6')]}});})['then'](function(_0x25d33c){if(_0x25d33c){_0x29b1e9[_0xf0fa('0xb1')][_0xf0fa('0xc7')]({'id':0x0,'priority':0x0,'app':_0xf0fa('0xc8'),'appdata':_0x25d33c[_0xf0fa('0x32')]+','+(_0x29b1e9['account'][_0xf0fa('0xc9')]||0xa),'interval':_0xf0fa('0xc3')});_0x29b1e9['forcedOwnership']=!![];}if(!_0x29b1e9[_0xf0fa('0xbe')][_0xf0fa('0xca')]){return;}return db[_0xf0fa('0xcb')]['find']({'attributes':['id',_0xf0fa('0x32')],'where':{'id':_0x29b1e9[_0xf0fa('0xbe')]['queueId']}});})[_0xf0fa('0x1b')](function(_0x5453b6){if(_0x5453b6){_0x29b1e9[_0xf0fa('0xb1')][_0xf0fa('0xc7')]({'id':0x0,'priority':0x1,'app':_0xf0fa('0xcc'),'appdata':_0x5453b6[_0xf0fa('0x32')]+','+(_0x29b1e9[_0xf0fa('0xb0')]['waitForTheAssignedQueue']||0x12c),'interval':_0xf0fa('0xc3')});}return respondWithRpcPromise(_0xf0fa('0xcd'),'startRouting',_0x29b1e9);})['then'](function(_0x551b54){respondWithRpcPromise(_0xf0fa('0xce'),'EventManager',{'event':_0xf0fa('0x9c'),'message':_0x551b54},client9002);return _0x551b54;})['then'](respondWithResult(_0x49448a,null))['catch'](APIHandleError(_0x49448a));};exports[_0xf0fa('0xcf')]=function(_0x14f4d7,_0x46f6fd){var _0x58566d,_0x198210,_0x2ecf7d;var _0x78b0da=[];var _0x18be1d={};var _0x32e7ee=_0x14f4d7['files']||[];var _0x51ffae=[];var _0x4784e7;return db['CmContact'][_0xf0fa('0x73')]()[_0xf0fa('0x1b')](function(_0x2f0641){if(!_0x2f0641){throw new db[(_0xf0fa('0xd0'))]['ValidationError'](_0xf0fa('0xd1'));}_0x78b0da=_['difference'](_[_0xf0fa('0x4e')](_0x2f0641),['createdAt','updatedAt',_0xf0fa('0xa6'),_0xf0fa('0xa7')]);if(_0x14f4d7[_0xf0fa('0x64')]['id']){delete _0x14f4d7[_0xf0fa('0x64')]['id'];}if(_[_0xf0fa('0x8d')](_0x14f4d7['body'][_0xf0fa('0x9e')])){throw _0x46f6fd[_0xf0fa('0x26')](0x1f4)[_0xf0fa('0x33')](new db[(_0xf0fa('0xd0'))][(_0xf0fa('0xd2'))](_0xf0fa('0xd3')));}if(_['isNil'](_0x14f4d7[_0xf0fa('0x64')][_0xf0fa('0x64')])||_0x14f4d7[_0xf0fa('0x64')]['body']===''){throw _0x46f6fd['status'](0x1f4)['send'](new db[(_0xf0fa('0xd0'))][(_0xf0fa('0xd2'))](_0xf0fa('0xd4')));}if(_[_0xf0fa('0x8d')](_0x14f4d7[_0xf0fa('0x64')]['mapKeyOffline'])){throw _0x46f6fd['status'](0x1f4)[_0xf0fa('0x33')](new db[(_0xf0fa('0xd0'))]['ValidationError'](_0xf0fa('0xd5')+_0x78b0da));}if(!_[_0xf0fa('0xa4')](_0x78b0da,_0x14f4d7[_0xf0fa('0x64')][_0xf0fa('0xd6')])){throw _0x46f6fd[_0xf0fa('0x26')](0x1f4)[_0xf0fa('0x33')](new db[(_0xf0fa('0xd0'))][(_0xf0fa('0xd2'))](_0xf0fa('0xd7')+_0x78b0da));}_0x18be1d[_0x14f4d7[_0xf0fa('0x64')][_0xf0fa('0xd6')]]=_0x14f4d7['body'][_0xf0fa('0x9e')];})[_0xf0fa('0x1b')](function(){return db[_0xf0fa('0x4a')][_0xf0fa('0x62')]({'where':{'id':_0x14f4d7[_0xf0fa('0x72')]['id']},'include':[{'model':db[_0xf0fa('0xa9')],'as':'List'},{'model':db[_0xf0fa('0xd8')],'as':'MailAccount'}]});})['then'](handleEntityNotFound(_0x46f6fd,null))['then'](function(_0x4814bd){if(_0x4814bd&&_0x4814bd[_0xf0fa('0xaa')]){_0x198210=_0x4814bd;var _0x420256=_['defaults'](_0x14f4d7[_0xf0fa('0x64')],{'firstName':_0x14f4d7[_0xf0fa('0x64')]['from'],'phone':_0x14f4d7[_0xf0fa('0x64')]['from'],'ListId':_0x4814bd[_0xf0fa('0xa7')]});_0x420256[_0x14f4d7[_0xf0fa('0x64')][_0xf0fa('0xd6')]]=_0x14f4d7[_0xf0fa('0x64')]['from'];return db['CmContact'][_0xf0fa('0xd9')]({'where':_0x18be1d,'defaults':_0x420256});}})[_0xf0fa('0xda')](function(_0x13e5e2){if(_0x13e5e2){_0x2ecf7d=_0x13e5e2;var _0x424332=fs['readFileSync'](path[_0xf0fa('0x87')](config['root'],_0xf0fa('0xdb')),_0xf0fa('0xdc'));var _0x4238f0=ejs['render'](_0x424332,{'body':_[_0xf0fa('0xdd')](_0x14f4d7[_0xf0fa('0x64')]['body']),'bodyTitle':_0x198210[_0xf0fa('0xde')]});return db['ChatOfflineMessage'][_0xf0fa('0x63')]({'body':_0x4238f0,'plainBody':htmlToText[_0xf0fa('0xdf')](_0x4238f0),'ContactId':_0x13e5e2['id'],'ChatWebsiteId':_0x198210['id']});}})[_0xf0fa('0x1b')](function(_0x5ea55e){_0x4784e7=_0x5ea55e;if(_0x32e7ee[_0xf0fa('0x53')]){var _0xcf0df8=_0x32e7ee[_0xf0fa('0x49')](function(_0x117823){return{'name':_0x117823[_0xf0fa('0xe0')],'basename':_0x117823[_0xf0fa('0x81')],'type':_0x117823[_0xf0fa('0xe1')],'ChatOfflineMessageId':_0x5ea55e['id']};});_0x51ffae=_0xcf0df8[_0xf0fa('0x49')](_0x68a2d3=>{var _0x577ad2={'filename':_0x68a2d3[_0xf0fa('0x32')],'path':path[_0xf0fa('0x87')](config['root'],_0xf0fa('0xe2'),_0xf0fa('0xe3'),_0xf0fa('0xe4'),_0xf0fa('0xe5'),_0x68a2d3[_0xf0fa('0xe6')])};return _0x577ad2;});if(!_0x198210['openNewInteraction']){return db[_0xf0fa('0xe7')]['transaction'](function(_0x47d348){return db[_0xf0fa('0xe8')][_0xf0fa('0xe9')](_0xcf0df8,{'transaction':_0x47d348});});}}})['then'](function(){if(_0x4784e7){_0x58566d=_0x4784e7;return db[_0xf0fa('0xd8')]['findOne']({'where':{'service':!![]},'include':[{'model':db[_0xf0fa('0xea')],'as':_0xf0fa('0xeb'),'raw':!![],'include':[{'model':db[_0xf0fa('0xec')],'as':_0xf0fa('0xec'),'raw':!![]}]}]});}})[_0xf0fa('0x1b')](function(_0x4cdac1){if(_0x4cdac1&&_0x4cdac1[_0xf0fa('0xeb')]&&_0x198210['forwardOffline']&&_0x198210[_0xf0fa('0xed')]){var _0x273837=_0x4cdac1[_0xf0fa('0xee')]();return respondWithRpcPromise('SendMail',_0xf0fa('0xef'),{'account':_0x273837,'message':{'from':util['format'](_0xf0fa('0xf0'),_0x4cdac1[_0xf0fa('0x32')],_0x4cdac1[_0xf0fa('0xf1')]||_0x4cdac1[_0xf0fa('0xeb')]['user']),'to':_0x198210[_0xf0fa('0xed')],'subject':_0x198210['offlineMessageSubject'],'html':_0x58566d[_0xf0fa('0x64')],'attachments':_0x51ffae}},client9003)[_0xf0fa('0x1b')](function(){return _0x58566d;})[_0xf0fa('0x24')](function(_0x2e7035){logger[_0xf0fa('0x20')](_0x2e7035);});}})[_0xf0fa('0x1b')](function(){if(_0x198210&&_0x198210[_0xf0fa('0xf2')]&&_0x198210[_0xf0fa('0xf3')]){var _0x1b42b7=[];if(_0x32e7ee[_0xf0fa('0x53')]){_0x1b42b7=_0x32e7ee['map'](function(_0x5e0d64){return{'name':_0x5e0d64[_0xf0fa('0xe0')],'basename':_0x5e0d64[_0xf0fa('0x81')],'type':_0x5e0d64[_0xf0fa('0xe1')],'ChatOfflineMessageId':_0x4784e7['id']};});}var _0x1b7959;if(!_['isNil'](_0x198210[_0xf0fa('0xf4')])){var _0x19526b=_[_0xf0fa('0x49')](_0x14f4d7['body'],function(_0x1ea16c){return _0x1ea16c;});var _0x16af6e=_['toPairsIn'](_0x19526b)[0x0];var _0x2383ff=_[_0xf0fa('0xf5')](_0x16af6e,function(_0xc659b3){return _0xc659b3;});_0x1b7959=_0x2383ff[0x1][_0x198210[_0xf0fa('0xf4')]];}var _0x327677={'from':_0x2ecf7d[_0xf0fa('0xf1')],'firstName':_0x2ecf7d['firstName'],'lastName':_0x2ecf7d[_0xf0fa('0x3a')],'mapKey':'email','message':{'from':_0x2ecf7d[_0xf0fa('0xf1')],'to':_0x198210[_0xf0fa('0xd8')]['email'],'cc':'','subject':_[_0xf0fa('0x8d')](_0x1b7959)?_0x198210[_0xf0fa('0xf6')]:_0x1b7959,'messageId':'','sentAt':new Date(),'attach':_0x1b42b7[_0xf0fa('0x53')],'attachments':_0x1b42b7,'originChannel':_0xf0fa('0xf7'),'ChatWebsiteId':_0x198210['id'],'ChatOfflineMessageId':_0x58566d['id'],'originTo':_0x198210[_0xf0fa('0xd8')][_0xf0fa('0xf1')]},'body':_0x58566d['body']};var _0x45a8fa={'account':{'id':_0x198210['MailAccountId']},'body':_0x327677,'log':_0xf0fa('0xf8')};return respondWithRpcPromise(_0xf0fa('0xf8'),_0xf0fa('0xf9'),_0x45a8fa,client9001)['then'](function(){return _0x58566d;})['catch'](function(_0x5243f4){logger[_0xf0fa('0x20')](_0x5243f4);});}return;})['then'](function(){if(_0x58566d){return _0x58566d;}})[_0xf0fa('0x1b')](respondWithResult(_0x46f6fd,null))['catch'](function(){for(var _0x3724af of _0x32e7ee){var _0x4bdf4d=path[_0xf0fa('0x87')](config[_0xf0fa('0x88')],'server','files',_0xf0fa('0xe4'),_0xf0fa('0xe5'),_0x3724af['filename']);fs_extra[_0xf0fa('0xfa')](_0x4bdf4d)[_0xf0fa('0x24')](function(_0x1c51ea){logger[_0xf0fa('0x20')](_0xf0fa('0xfb'),_0x4bdf4d,_0x1c51ea);});}});};exports[_0xf0fa('0xfc')]=function(_0x400beb,_0x48f8db){return db[_0xf0fa('0xba')][_0xf0fa('0x62')]({'where':{'id':_0x400beb['params']['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0x48f8db,null))[_0xf0fa('0x1b')](function(_0x25d74d){if(_0x25d74d){return _0x25d74d[_0xf0fa('0xfc')](_0x400beb[_0xf0fa('0x64')][_0xf0fa('0x7d')],_[_0xf0fa('0xfd')](_0x400beb[_0xf0fa('0x64')],[_0xf0fa('0x7d'),'id'])||{});}})['then'](respondWithResult(_0x48f8db,null))[_0xf0fa('0x24')](handleError(_0x48f8db,null));};exports['getInteractions']=function(_0x302bfd,_0x12d88f){var _0x48eaa0={'raw':![],'where':{}};var _0x3d2806={};var _0x14afdf={'count':0x0,'rows':[]};return db[_0xf0fa('0x4a')][_0xf0fa('0x76')]({'where':{'id':_0x302bfd[_0xf0fa('0x72')]['id']}})['then'](handleEntityNotFound(_0x12d88f,null))[_0xf0fa('0x1b')](function(_0x5a92e5){if(_0x5a92e5){_0x3d2806[_0xf0fa('0x43')]=_[_0xf0fa('0x4e')](db[_0xf0fa('0xba')]['rawAttributes']);_0x3d2806[_0xf0fa('0x4f')]=_[_0xf0fa('0x4e')](_0x302bfd['query']);_0x3d2806['filters']=_[_0xf0fa('0x52')](_0x3d2806['model'],_0x3d2806[_0xf0fa('0x4f')]);_0x48eaa0[_0xf0fa('0x51')]=_['intersection'](_0x3d2806[_0xf0fa('0x43')],qs[_0xf0fa('0x60')](_0x302bfd['query'][_0xf0fa('0x60')]));_0x48eaa0['attributes']=_0x48eaa0[_0xf0fa('0x51')]['length']?_0x48eaa0[_0xf0fa('0x51')]:_0x3d2806[_0xf0fa('0x43')];if(!_0x302bfd[_0xf0fa('0x4f')]['hasOwnProperty'](_0xf0fa('0x55'))){_0x48eaa0['limit']=qs['limit'](_0x302bfd[_0xf0fa('0x4f')][_0xf0fa('0x2c')]);_0x48eaa0['offset']=qs[_0xf0fa('0x29')](_0x302bfd[_0xf0fa('0x4f')][_0xf0fa('0x29')]);}_0x48eaa0[_0xf0fa('0x78')]=qs[_0xf0fa('0x56')](_0x302bfd[_0xf0fa('0x4f')][_0xf0fa('0x56')]);_0x48eaa0[_0xf0fa('0x57')]=qs[_0xf0fa('0x50')](_[_0xf0fa('0x58')](_0x302bfd[_0xf0fa('0x4f')],_0x3d2806[_0xf0fa('0x50')]));_0x48eaa0[_0xf0fa('0x57')][_0xf0fa('0x74')]=_0x5a92e5['id'];if(_0x302bfd['query']['filter']){_0x48eaa0[_0xf0fa('0x57')]=_[_0xf0fa('0x5a')](_0x48eaa0[_0xf0fa('0x57')],{'$or':_['map'](_0x48eaa0['attributes'],function(_0x144f00){var _0x2c72ad={};_0x2c72ad[_0x144f00]={'$like':'%'+_0x302bfd[_0xf0fa('0x4f')]['filter']+'%'};return _0x2c72ad;})});}_0x48eaa0=_['merge']({},_0x48eaa0,_0x302bfd[_0xf0fa('0x5b')]);return db[_0xf0fa('0xba')][_0xf0fa('0x2b')]({'where':_0x48eaa0['where']})[_0xf0fa('0x1b')](function(_0x4dd350){_0x14afdf[_0xf0fa('0x2b')]=_0x4dd350;if(_0x302bfd['query'][_0xf0fa('0x61')]){_0x48eaa0[_0xf0fa('0x5c')]=[{'model':db['CmContact'],'as':_0xf0fa('0xfe'),'required':![]},{'model':db[_0xf0fa('0xff')],'as':_0xf0fa('0x100'),'attributes':[_0xf0fa('0x32'),'fullname',_0xf0fa('0x101')],'required':![]},{'model':db[_0xf0fa('0x102')],'as':_0xf0fa('0x103'),'attributes':['id',_0xf0fa('0x32'),'color'],'where':_0x302bfd[_0xf0fa('0x4f')][_0xf0fa('0x104')]?{'id':_0x302bfd[_0xf0fa('0x4f')][_0xf0fa('0x104')]}:undefined,'required':_0x302bfd[_0xf0fa('0x4f')][_0xf0fa('0x104')]?!![]:![]}];}return db['ChatInteraction'][_0xf0fa('0x79')](_0x48eaa0);})[_0xf0fa('0x1b')](function(_0x31b02c){_0x14afdf[_0xf0fa('0x5d')]=_0x31b02c;return _0x14afdf;});}})[_0xf0fa('0x1b')](respondWithFilteredResult(_0x12d88f,_0x48eaa0))[_0xf0fa('0x24')](handleError(_0x12d88f,null));};exports[_0xf0fa('0x105')]=function(_0x3a771a,_0xb2cec){var _0x2f48e5=0x0;var _0x24a65e=0x0;var _0x4a86b0=![];var _0x10f1e6;var _0x4af21c;return db['ChatWebsite'][_0xf0fa('0x62')]({'where':{'id':_0x3a771a['params']['id']},'include':[{'model':db[_0xf0fa('0x98')],'as':_0xf0fa('0x98'),'include':[{'model':db[_0xf0fa('0x98')],'as':_0xf0fa('0xae'),'attributes':['id',_0xf0fa('0xaf')]}]}]})['then'](handleEntityNotFound(_0xb2cec,null))['then'](function(_0x10182b){if(_0x10182b){_0x10f1e6=_0x10182b;return _0x10182b[_0xf0fa('0x106')]({'raw':!![]});}})['then'](function(_0x29b02a){if(_0x10f1e6){if(_0x29b02a){_0x4af21c=_0x29b02a;}}return require('../../config/license/util')['getLicense']();})[_0xf0fa('0x1b')](function(_0x37e3c9){if(_0x37e3c9){_0x24a65e=_0x37e3c9['virtual'];_0x4a86b0=_0x37e3c9[_0xf0fa('0x8c')];}})['then'](function(){return db['ChatInteraction']['count']({'where':{'closed':![]}});})[_0xf0fa('0x1b')](function(_0x454635){_0x2f48e5=_0x454635;if(_0x24a65e&&_0x454635>_0x24a65e){return db[_0xf0fa('0x107')]['findOne']({'where':{'id':0x1}})[_0xf0fa('0x1b')](function(_0x516b94){if(_0x516b94){_0x516b94[_0xf0fa('0x108')](_0xf0fa('0x109'));}});}})[_0xf0fa('0x1b')](function(){var _0x439d09=_0x10f1e6[_0xf0fa('0x98')];var _0x5bc810=_0x10f1e6[_0xf0fa('0x9a')]||undefined;return _0x439d09?_0x439d09[_0xf0fa('0x9b')](_0x5bc810):!![];})[_0xf0fa('0x1b')](function(_0x482924){var _0x1ee758=fs[_0xf0fa('0x10a')](path[_0xf0fa('0x87')](config[_0xf0fa('0x88')],_0xf0fa('0x10b')),_0xf0fa('0xdc'));var _0x3ec6e8='3.13.0';var _0x105c08=![];var _0x347180,_0x3c814b;if(_0x3a771a[_0xf0fa('0xb7')][_0xf0fa('0x3c')]){_0x347180=new URL(_0x3a771a[_0xf0fa('0xb7')][_0xf0fa('0x3c')])[_0xf0fa('0x10c')];}else if(_0x3a771a[_0xf0fa('0xb7')][_0xf0fa('0x10c')]){_0x347180=new URL(_0x3a771a['headers'][_0xf0fa('0x10c')])[_0xf0fa('0x10c')];}else{_0x347180=_0xf0fa('0x10d');}_0x3c814b=typeof _0x10f1e6[_0xf0fa('0x65')][_0xf0fa('0x66')](',')[_0xf0fa('0x62')](function(_0x960a4c){return wildcardUtils[_0xf0fa('0x10e')](_0x960a4c,_0x347180);})!=='undefined';var _0x5db875={'chatVersion':_0x3ec6e8,'chatWebsiteAddressOrigin':_0x3c814b?_0x347180:_0x10f1e6[_0xf0fa('0x65')],'remote':_0x10f1e6['remote'],'query':querystring[_0xf0fa('0x1f')](_[_0xf0fa('0x5a')](_0x10f1e6[_0xf0fa('0x2f')]({'plain':!![]}),{'customerIp':_0x3a771a['headers']['x-forwarded-for']||_0x3a771a[_0xf0fa('0xb7')][_0xf0fa('0x10f')]||_0x3a771a[_0xf0fa('0x110')]['remoteAddress']||_0x3a771a['ip'],'referer':_0x3a771a['headers'][_0xf0fa('0x3c')],'openedInteractions':_0x2f48e5,'maxInteractions':_0x24a65e,'virtual':_0x4a86b0[_0xf0fa('0x111')],'online':_0x482924,'custom':_0x4a86b0,'address':_0x3c814b?_0x347180:null}))[_0xf0fa('0x112')](/'/g,'\x5c\x27')};_0xb2cec[_0xf0fa('0x33')](ejs['render'](Mustache['render'](_0x1ee758,_0x5db875),{'proactiveActions':_0x4af21c,'alignment':_0x10f1e6['alignment'],'verticalAlignment':_0x10f1e6[_0xf0fa('0x113')],'div_color':_0x10f1e6[_0xf0fa('0x114')],'labelText':_0x10f1e6[_0xf0fa('0x115')],'text_color':_0x10f1e6[_0xf0fa('0x116')],'text_button_color':_0x10f1e6[_0xf0fa('0x117')],'button_color':_0x10f1e6[_0xf0fa('0x118')],'background_color':_0x10f1e6['backgroundColor'],'hideWhenOffline':_0x10f1e6[_0xf0fa('0x119')],'intervalId':_0x10f1e6[_0xf0fa('0x11a')],'isDevelopment':_0x105c08,'chatVersion':_0x3ec6e8}));})[_0xf0fa('0x24')](handleError(_0xb2cec,null));};exports[_0xf0fa('0x11b')]=function(_0x34d2f2,_0x3527eb){var _0x5672a5=_0x34d2f2['params']['id'];var _0x52e00b=_0x34d2f2[_0xf0fa('0x64')];var _0x90a29e=0xc8;var _0x257eec=null;return db['sequelize'][_0xf0fa('0x11c')]({'isolationLevel':db[_0xf0fa('0xe7')][_0xf0fa('0x11d')][_0xf0fa('0x11e')][_0xf0fa('0x11f')]},function(_0x4fb8ea){return db[_0xf0fa('0x4a')]['findOne']({'where':{'id':_0x5672a5},'transaction':_0x4fb8ea})[_0xf0fa('0x1b')](function(_0x2706f0){if(_0x2706f0){return db[_0xf0fa('0x120')][_0xf0fa('0x2e')]({'where':{'ChatWebsiteId':_0x5672a5},'transaction':_0x4fb8ea})[_0xf0fa('0x1b')](function(){var _0x46e8e3=_[_0xf0fa('0x49')](_0x52e00b,function(_0x35bce9){_0x35bce9[_0xf0fa('0x74')]=_0x5672a5;return _0x35bce9;});return db[_0xf0fa('0x120')][_0xf0fa('0xe9')](_0x46e8e3,{'transaction':_0x4fb8ea});});}else{_0x90a29e=0x194;_0x257eec=[];}});})['then'](function(){if(_0x90a29e!==0x194){return db[_0xf0fa('0x120')][_0xf0fa('0x121')]({'where':{'ChatWebsiteId':_0x5672a5},'order':_0xf0fa('0xb3')})[_0xf0fa('0x1b')](function(_0x46262c){_0x257eec=_0x46262c;});}})[_0xf0fa('0x24')](function(_0x1e90de){_0x90a29e=0x1f4;logger['error'](_0x1e90de[_0xf0fa('0x122')]);if(_0x1e90de[_0xf0fa('0x32')]){delete _0x1e90de[_0xf0fa('0x32')];}_0x257eec=_0x1e90de;})[_0xf0fa('0x123')](function(){if(_0x257eec===null){_0x3527eb[_0xf0fa('0x25')](_0x90a29e);}else{if(_0x90a29e===0x1f4){_0x3527eb[_0xf0fa('0x26')](_0x90a29e)[_0xf0fa('0x33')](_0x257eec);}else{_0x3527eb[_0xf0fa('0x26')](_0x90a29e)[_0xf0fa('0x28')](_0x257eec);}}});};exports[_0xf0fa('0x124')]=function(_0x4f94d1,_0x9fb94){var _0x23b783={};var _0x48bb9d={};var _0x597ee4;var _0x479d27;return db[_0xf0fa('0x4a')][_0xf0fa('0x76')]({'where':{'id':_0x4f94d1[_0xf0fa('0x72')]['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0x9fb94,null))['then'](function(_0x3f1558){if(_0x3f1558){_0x597ee4=_0x3f1558;_0x48bb9d[_0xf0fa('0x43')]=_[_0xf0fa('0x4e')](db[_0xf0fa('0x120')]['rawAttributes']);_0x48bb9d[_0xf0fa('0x4f')]=_['keys'](_0x4f94d1[_0xf0fa('0x4f')]);_0x48bb9d['filters']=_[_0xf0fa('0x52')](_0x48bb9d[_0xf0fa('0x43')],_0x48bb9d['query']);_0x23b783['attributes']=_['intersection'](_0x48bb9d[_0xf0fa('0x43')],qs['fields'](_0x4f94d1['query'][_0xf0fa('0x60')]));_0x23b783[_0xf0fa('0x51')]=_0x23b783[_0xf0fa('0x51')]['length']?_0x23b783['attributes']:_0x48bb9d[_0xf0fa('0x43')];_0x23b783[_0xf0fa('0x78')]=qs[_0xf0fa('0x56')](_0x4f94d1[_0xf0fa('0x4f')][_0xf0fa('0x56')]);_0x23b783[_0xf0fa('0x57')]=qs['filters'](_[_0xf0fa('0x58')](_0x4f94d1[_0xf0fa('0x4f')],_0x48bb9d[_0xf0fa('0x50')]));if(_0x4f94d1['query']['filter']){_0x23b783[_0xf0fa('0x57')]=_['merge'](_0x23b783[_0xf0fa('0x57')],{'$or':_['map'](_0x23b783['attributes'],function(_0x401c07){var _0x333812={};_0x333812[_0x401c07]={'$like':'%'+_0x4f94d1['query']['filter']+'%'};return _0x333812;})});}_0x23b783=_[_0xf0fa('0x5a')]({},_0x23b783,_0x4f94d1[_0xf0fa('0x5b')]);return _0x597ee4['getApplications'](_0x23b783);}})[_0xf0fa('0x1b')](function(_0x77eb11){if(_0x77eb11){_0x479d27=_0x77eb11[_0xf0fa('0x53')];if(!_0x4f94d1[_0xf0fa('0x4f')][_0xf0fa('0x54')](_0xf0fa('0x55'))){_0x23b783[_0xf0fa('0x2c')]=qs[_0xf0fa('0x2c')](_0x4f94d1['query'][_0xf0fa('0x2c')]);_0x23b783['offset']=qs[_0xf0fa('0x29')](_0x4f94d1[_0xf0fa('0x4f')]['offset']);}return _0x597ee4[_0xf0fa('0x124')](_0x23b783);}})[_0xf0fa('0x1b')](function(_0x400482){if(_0x400482){return _0x400482?{'count':_0x479d27,'rows':_0x400482}:null;}})[_0xf0fa('0x1b')](respondWithResult(_0x9fb94,null))[_0xf0fa('0x24')](handleError(_0x9fb94,null));};exports[_0xf0fa('0x125')]=function(_0x2f1287,_0x289f8e){return db['chatProactiveAction'][_0xf0fa('0x62')]({'where':{'id':_0x2f1287[_0xf0fa('0x72')]['id']}})['then'](handleEntityNotFound(_0x289f8e,null))[_0xf0fa('0x1b')](function(_0x3eaddd){if(_0x3eaddd){return _0x3eaddd['addProactiveActions'](_0x2f1287[_0xf0fa('0x64')][_0xf0fa('0x7d')],_['omit'](_0x2f1287[_0xf0fa('0x64')],[_0xf0fa('0x7d'),'id'])||{});}})[_0xf0fa('0x1b')](respondWithResult(_0x289f8e,null))[_0xf0fa('0x24')](handleError(_0x289f8e,null));};exports[_0xf0fa('0x106')]=function(_0x309c2e,_0x338f3f){var _0x4270f8={};var _0x50afc4={};var _0x7c3c08;var _0xac6798;return db[_0xf0fa('0x4a')][_0xf0fa('0x76')]({'where':{'id':_0x309c2e[_0xf0fa('0x72')]['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0x338f3f,null))[_0xf0fa('0x1b')](function(_0x1935f1){if(_0x1935f1){_0x7c3c08=_0x1935f1;_0x50afc4['model']=_['keys'](db[_0xf0fa('0x126')]['rawAttributes']);_0x50afc4['query']=_[_0xf0fa('0x4e')](_0x309c2e[_0xf0fa('0x4f')]);_0x50afc4['filters']=_[_0xf0fa('0x52')](_0x50afc4[_0xf0fa('0x43')],_0x50afc4['query']);_0x4270f8[_0xf0fa('0x51')]=_[_0xf0fa('0x52')](_0x50afc4[_0xf0fa('0x43')],qs[_0xf0fa('0x60')](_0x309c2e[_0xf0fa('0x4f')]['fields']));_0x4270f8[_0xf0fa('0x51')]=_0x4270f8[_0xf0fa('0x51')][_0xf0fa('0x53')]?_0x4270f8[_0xf0fa('0x51')]:_0x50afc4[_0xf0fa('0x43')];_0x4270f8[_0xf0fa('0x78')]=qs[_0xf0fa('0x56')](_0x309c2e[_0xf0fa('0x4f')][_0xf0fa('0x56')]);_0x4270f8['where']=qs['filters'](_[_0xf0fa('0x58')](_0x309c2e[_0xf0fa('0x4f')],_0x50afc4[_0xf0fa('0x50')]));if(_0x309c2e[_0xf0fa('0x4f')][_0xf0fa('0x59')]){_0x4270f8[_0xf0fa('0x57')]=_['merge'](_0x4270f8['where'],{'$or':_['map'](_0x4270f8[_0xf0fa('0x51')],function(_0x4d3309){var _0x4cd024={};_0x4cd024[_0x4d3309]={'$like':'%'+_0x309c2e[_0xf0fa('0x4f')]['filter']+'%'};return _0x4cd024;})});}_0x4270f8=_['merge']({},_0x4270f8,_0x309c2e[_0xf0fa('0x5b')]);return _0x7c3c08[_0xf0fa('0x106')](_0x4270f8);}})[_0xf0fa('0x1b')](function(_0x4b385b){if(_0x4b385b){_0xac6798=_0x4b385b[_0xf0fa('0x53')];if(!_0x309c2e['query'][_0xf0fa('0x54')](_0xf0fa('0x55'))){_0x4270f8['limit']=qs['limit'](_0x309c2e[_0xf0fa('0x4f')][_0xf0fa('0x2c')]);_0x4270f8[_0xf0fa('0x29')]=qs[_0xf0fa('0x29')](_0x309c2e[_0xf0fa('0x4f')][_0xf0fa('0x29')]);}return _0x7c3c08[_0xf0fa('0x106')](_0x4270f8);}})[_0xf0fa('0x1b')](function(_0x500e27){if(_0x500e27){return _0x500e27?{'count':_0xac6798,'rows':_0x500e27}:null;}})['then'](respondWithResult(_0x338f3f,null))[_0xf0fa('0x24')](handleError(_0x338f3f,null));};exports[_0xf0fa('0x127')]=function(_0x593571,_0x4dbd0b){var _0x170c1e=_0x593571[_0xf0fa('0x4f')][_0xf0fa('0x128')]===_0xf0fa('0x129')?_0xf0fa('0x12a'):_0xf0fa('0x12b');return db[_0xf0fa('0x4a')]['find']({'attributes':['id',_0x170c1e],'where':{'id':_0x593571[_0xf0fa('0x72')]['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0x4dbd0b,null))[_0xf0fa('0x1b')](function(_0x1eb934){if(_0x1eb934){var _0x19a5a6=_0x1eb934[_0x170c1e];var _0xc70a96=_0x19a5a6&&_0x19a5a6['items']?_0x19a5a6['items']:[];_0x4dbd0b['send']({'fromKey':_[_0xf0fa('0x8d')](_0x19a5a6[_0xf0fa('0x12c')])?undefined:_0x19a5a6[_0xf0fa('0x12c')],'count':_0xc70a96[_0xf0fa('0x53')],'rows':_0xc70a96});}})[_0xf0fa('0x24')](handleError(_0x4dbd0b,null));};exports[_0xf0fa('0x12d')]=function(_0x76f5e1,_0x2e15e1){var _0xf491a2={'raw':![],'where':{}};var _0x4c62fd={};var _0x551134={'count':0x0,'rows':[]};return db[_0xf0fa('0x4a')][_0xf0fa('0x76')]({'where':{'id':_0x76f5e1[_0xf0fa('0x72')]['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0x2e15e1,null))[_0xf0fa('0x1b')](function(_0x122141){if(_0x122141){_0x4c62fd[_0xf0fa('0x43')]=_[_0xf0fa('0x4e')](db[_0xf0fa('0x12e')][_0xf0fa('0x4b')]);_0x4c62fd['query']=_[_0xf0fa('0x4e')](_0x76f5e1[_0xf0fa('0x4f')]);_0x4c62fd[_0xf0fa('0x50')]=_[_0xf0fa('0x52')](_0x4c62fd[_0xf0fa('0x43')],_0x4c62fd['query']);_0xf491a2[_0xf0fa('0x51')]=_[_0xf0fa('0x52')](_0x4c62fd[_0xf0fa('0x43')],qs['fields'](_0x76f5e1[_0xf0fa('0x4f')][_0xf0fa('0x60')]));_0xf491a2[_0xf0fa('0x51')]=_0xf491a2['attributes']['length']?_0xf491a2[_0xf0fa('0x51')]:_0x4c62fd[_0xf0fa('0x43')];if(!_0x76f5e1[_0xf0fa('0x4f')]['hasOwnProperty'](_0xf0fa('0x55'))){_0xf491a2['limit']=qs[_0xf0fa('0x2c')](_0x76f5e1['query'][_0xf0fa('0x2c')]);_0xf491a2[_0xf0fa('0x29')]=qs[_0xf0fa('0x29')](_0x76f5e1[_0xf0fa('0x4f')]['offset']);}_0xf491a2[_0xf0fa('0x78')]=qs['sort'](_0x76f5e1[_0xf0fa('0x4f')][_0xf0fa('0x56')]);_0xf491a2[_0xf0fa('0x57')]=qs['filters'](_[_0xf0fa('0x58')](_0x76f5e1[_0xf0fa('0x4f')],_0x4c62fd['filters']));_0xf491a2[_0xf0fa('0x57')][_0xf0fa('0x74')]=_0x122141['id'];if(_0x76f5e1[_0xf0fa('0x4f')][_0xf0fa('0x59')]){_0xf491a2[_0xf0fa('0x57')]=_[_0xf0fa('0x5a')](_0xf491a2[_0xf0fa('0x57')],{'$or':_['map'](_0xf491a2['attributes'],function(_0x1308e0){var _0xd84d9f={};_0xd84d9f[_0x1308e0]={'$like':'%'+_0x76f5e1['query'][_0xf0fa('0x59')]+'%'};return _0xd84d9f;})});}_0xf491a2=_[_0xf0fa('0x5a')]({},_0xf491a2,_0x76f5e1[_0xf0fa('0x5b')]);return db[_0xf0fa('0x12e')]['count']({'where':_0xf491a2[_0xf0fa('0x57')]})['then'](function(_0x34b8bf){_0x551134['count']=_0x34b8bf;if(_0x76f5e1[_0xf0fa('0x4f')][_0xf0fa('0x61')]){_0xf491a2[_0xf0fa('0x5c')]=[{'all':!![]}];}else{_0xf491a2['include']=[{'model':db[_0xf0fa('0xa1')],'as':'Contact','required':![]},{'model':db[_0xf0fa('0xe8')],'as':_0xf0fa('0x12f'),'required':![]}];}return db[_0xf0fa('0x12e')][_0xf0fa('0x79')](_0xf491a2);})[_0xf0fa('0x1b')](function(_0x1791fa){_0x551134[_0xf0fa('0x5d')]=_0x1791fa;return _0x551134;});}})[_0xf0fa('0x1b')](respondWithFilteredResult(_0x2e15e1,_0xf491a2))['catch'](handleError(_0x2e15e1,null));};exports[_0xf0fa('0x130')]=function(_0x3e3672,_0x2ba0b7){return db[_0xf0fa('0x4a')][_0xf0fa('0x62')]({'where':{'id':_0x3e3672['params']['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0x2ba0b7,null))[_0xf0fa('0x1b')](function(_0x44e7f6){if(_0x44e7f6){return _0x44e7f6[_0xf0fa('0x130')](_0x3e3672['body']['ids'],_[_0xf0fa('0xfd')](_0x3e3672[_0xf0fa('0x64')],[_0xf0fa('0x7d'),'id'])||{})['spread'](function(_0x1c11d8){for(var _0x57878a=0x0;_0x57878a<_0x3e3672['body'][_0xf0fa('0x7d')][_0xf0fa('0x53')];_0x57878a+=0x1){socket[_0xf0fa('0x131')](_0xf0fa('0x132'),{'UserId':Number(_0x3e3672[_0xf0fa('0x64')][_0xf0fa('0x7d')][_0x57878a]),'ChatWebsiteId':Number(_0x3e3672[_0xf0fa('0x72')]['id'])});}return _0x1c11d8;});}})[_0xf0fa('0x1b')](respondWithResult(_0x2ba0b7,null))[_0xf0fa('0x24')](handleError(_0x2ba0b7,null));};exports[_0xf0fa('0x133')]=function(_0x3d47dd,_0x2cdf61){return db['ChatWebsite'][_0xf0fa('0x62')]({'where':{'id':_0x3d47dd[_0xf0fa('0x72')]['id']}})[_0xf0fa('0x1b')](handleEntityNotFound(_0x2cdf61,null))['then'](function(_0x160498){if(_0x160498){return _0x160498[_0xf0fa('0x133')](_0x3d47dd[_0xf0fa('0x4f')]['ids'])['then'](function(){if(_[_0xf0fa('0x134')](_0x3d47dd['query']['ids'])){for(var _0x14b1a8=0x0;_0x14b1a8<_0x3d47dd[_0xf0fa('0x4f')][_0xf0fa('0x7d')]['length'];_0x14b1a8+=0x1){socket[_0xf0fa('0x131')]('userChatWebsite:remove',{'UserId':Number(_0x3d47dd[_0xf0fa('0x4f')][_0xf0fa('0x7d')][_0x14b1a8]),'ChatWebsiteId':Number(_0x3d47dd[_0xf0fa('0x72')]['id'])});}}else{socket['emit'](_0xf0fa('0x135'),{'UserId':Number(_0x3d47dd[_0xf0fa('0x4f')]['ids']),'ChatWebsiteId':Number(_0x3d47dd[_0xf0fa('0x72')]['id'])});}});}})[_0xf0fa('0x1b')](respondWithStatusCode(_0x2cdf61,null))[_0xf0fa('0x24')](handleError(_0x2cdf61,null));};exports[_0xf0fa('0x136')]=function(_0x3bccb1,_0x5ba9b0){var _0x6ae366={};var _0x4e7525={};var _0x37c4f0;var _0x274673;return db[_0xf0fa('0x4a')][_0xf0fa('0x76')]({'where':{'id':_0x3bccb1[_0xf0fa('0x72')]['id']}})['then'](handleEntityNotFound(_0x5ba9b0,null))['then'](function(_0x466e06){if(_0x466e06){_0x37c4f0=_0x466e06;_0x4e7525['model']=_['keys'](db[_0xf0fa('0xff')][_0xf0fa('0x4b')]);_0x4e7525['query']=_['keys'](_0x3bccb1[_0xf0fa('0x4f')]);_0x4e7525[_0xf0fa('0x50')]=_['intersection'](_0x4e7525[_0xf0fa('0x43')],_0x4e7525['query']);_0x6ae366[_0xf0fa('0x51')]=_['intersection'](_0x4e7525['model'],qs[_0xf0fa('0x60')](_0x3bccb1[_0xf0fa('0x4f')][_0xf0fa('0x60')]));_0x6ae366[_0xf0fa('0x51')]=_0x6ae366[_0xf0fa('0x51')][_0xf0fa('0x53')]?_0x6ae366[_0xf0fa('0x51')]:_0x4e7525[_0xf0fa('0x43')];_0x6ae366['order']=qs[_0xf0fa('0x56')](_0x3bccb1['query'][_0xf0fa('0x56')]);_0x6ae366[_0xf0fa('0x57')]=qs[_0xf0fa('0x50')](_['pick'](_0x3bccb1['query'],_0x4e7525[_0xf0fa('0x50')]));if(_0x3bccb1[_0xf0fa('0x4f')]['filter']){_0x6ae366[_0xf0fa('0x57')]=_[_0xf0fa('0x5a')](_0x6ae366['where'],{'$or':_[_0xf0fa('0x49')](_0x6ae366[_0xf0fa('0x51')],function(_0x1ea500){var _0x1a0665={};_0x1a0665[_0x1ea500]={'$like':'%'+_0x3bccb1[_0xf0fa('0x4f')][_0xf0fa('0x59')]+'%'};return _0x1a0665;})});}_0x6ae366=_[_0xf0fa('0x5a')]({},_0x6ae366,_0x3bccb1['options']);return _0x37c4f0[_0xf0fa('0x136')](_0x6ae366);}})['then'](function(_0x4cae54){if(_0x4cae54){_0x274673=_0x4cae54[_0xf0fa('0x53')];if(!_0x3bccb1[_0xf0fa('0x4f')]['hasOwnProperty'](_0xf0fa('0x55'))){_0x6ae366['limit']=qs[_0xf0fa('0x2c')](_0x3bccb1[_0xf0fa('0x4f')][_0xf0fa('0x2c')]);_0x6ae366[_0xf0fa('0x29')]=qs[_0xf0fa('0x29')](_0x3bccb1[_0xf0fa('0x4f')][_0xf0fa('0x29')]);}return _0x37c4f0[_0xf0fa('0x136')](_0x6ae366);}})['then'](function(_0x112af9){if(_0x112af9){return _0x112af9?{'count':_0x274673,'rows':_0x112af9}:null;}})['then'](respondWithResult(_0x5ba9b0,null))['catch'](handleError(_0x5ba9b0,null));};
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.events.js b/server/api/chatWebsite/chatWebsite.events.js
index dd99e19..1f8f9b8 100644
--- a/server/api/chatWebsite/chatWebsite.events.js
+++ b/server/api/chatWebsite/chatWebsite.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe14b=['hasOwnProperty','hook','exports','events','../../mysqldb','save','update','emit'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0xe14b,0x93));var _0xbe14=function(_0x48371c,_0x20cbe6){_0x48371c=_0x48371c-0x0;var _0x1ba807=_0xe14b[_0x48371c];return _0x1ba807;};'use strict';var EventEmitter=require(_0xbe14('0x0'));var ChatWebsite=require(_0xbe14('0x1'))['db']['ChatWebsite'];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xbe14('0x2'),'afterUpdate':_0xbe14('0x3'),'afterDestroy':'remove'};function emitEvent(_0x7d3665){return function(_0x5ce8fb,_0x496c04,_0x1833e3){ChatWebsiteEvents[_0xbe14('0x4')](_0x7d3665+':'+_0x5ce8fb['id'],_0x5ce8fb);ChatWebsiteEvents[_0xbe14('0x4')](_0x7d3665,_0x5ce8fb);_0x1833e3(null);};}for(var e in events){if(events[_0xbe14('0x5')](e)){var event=events[e];ChatWebsite[_0xbe14('0x6')](e,emitEvent(event));}}module[_0xbe14('0x7')]=ChatWebsiteEvents;
\ No newline at end of file
+var _0x1af5=['emit','hasOwnProperty','hook','events','ChatWebsite','setMaxListeners','save','update','remove'];(function(_0xd04611,_0x6f7365){var _0x72e2db=function(_0x349948){while(--_0x349948){_0xd04611['push'](_0xd04611['shift']());}};_0x72e2db(++_0x6f7365);}(_0x1af5,0x17d));var _0x51af=function(_0x53199e,_0x58c424){_0x53199e=_0x53199e-0x0;var _0x2cb521=_0x1af5[_0x53199e];return _0x2cb521;};'use strict';var EventEmitter=require(_0x51af('0x0'));var ChatWebsite=require('../../mysqldb')['db'][_0x51af('0x1')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0x51af('0x2')](0x0);var events={'afterCreate':_0x51af('0x3'),'afterUpdate':_0x51af('0x4'),'afterDestroy':_0x51af('0x5')};function emitEvent(_0x3fa933){return function(_0x3e09ac,_0x1ef226,_0x115556){ChatWebsiteEvents[_0x51af('0x6')](_0x3fa933+':'+_0x3e09ac['id'],_0x3e09ac);ChatWebsiteEvents[_0x51af('0x6')](_0x3fa933,_0x3e09ac);_0x115556(null);};}for(var e in events){if(events[_0x51af('0x7')](e)){var event=events[e];ChatWebsite[_0x51af('0x8')](e,emitEvent(event));}}module['exports']=ChatWebsiteEvents;
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.model.js b/server/api/chatWebsite/chatWebsite.model.js
index be12546..01a53e8 100644
--- a/server/api/chatWebsite/chatWebsite.model.js
+++ b/server/api/chatWebsite/chatWebsite.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0836=['ChatWebsite','chat_websites','util','../../config/logger','api','bluebird','request-promise','path','../../config/environment','./chatWebsite.attributes','exports','define'];(function(_0x4e2636,_0x8d131){var _0x49b6c4=function(_0x10ba1a){while(--_0x10ba1a){_0x4e2636['push'](_0x4e2636['shift']());}};_0x49b6c4(++_0x8d131);}(_0x0836,0x182));var _0x6083=function(_0x34f8f3,_0x5377ce){_0x34f8f3=_0x34f8f3-0x0;var _0x2b2ec7=_0x0836[_0x34f8f3];return _0x2b2ec7;};'use strict';var _=require('lodash');var util=require(_0x6083('0x0'));var logger=require(_0x6083('0x1'))(_0x6083('0x2'));var moment=require('moment');var BPromise=require(_0x6083('0x3'));var rp=require(_0x6083('0x4'));var fs=require('fs');var path=require(_0x6083('0x5'));var rimraf=require('rimraf');var config=require(_0x6083('0x6'));var attributes=require(_0x6083('0x7'));module[_0x6083('0x8')]=function(_0x248a78,_0x88ca15){return _0x248a78[_0x6083('0x9')](_0x6083('0xa'),attributes,{'tableName':_0x6083('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xf7e2=['../../config/environment','./chatWebsite.attributes','define','ChatWebsite','chat_websites','lodash','util','../../config/logger','api','bluebird','request-promise','rimraf'];(function(_0x485038,_0x3e26e8){var _0xa87ace=function(_0x1cf247){while(--_0x1cf247){_0x485038['push'](_0x485038['shift']());}};_0xa87ace(++_0x3e26e8);}(_0xf7e2,0x119));var _0x2f7e=function(_0x3930a0,_0xf416c0){_0x3930a0=_0x3930a0-0x0;var _0x11c08f=_0xf7e2[_0x3930a0];return _0x11c08f;};'use strict';var _=require(_0x2f7e('0x0'));var util=require(_0x2f7e('0x1'));var logger=require(_0x2f7e('0x2'))(_0x2f7e('0x3'));var moment=require('moment');var BPromise=require(_0x2f7e('0x4'));var rp=require(_0x2f7e('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x2f7e('0x6'));var config=require(_0x2f7e('0x7'));var attributes=require(_0x2f7e('0x8'));module['exports']=function(_0x52b464,_0xdc7705){return _0x52b464[_0x2f7e('0x9')](_0x2f7e('0xa'),attributes,{'tableName':_0x2f7e('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.rpc.js b/server/api/chatWebsite/chatWebsite.rpc.js
index ad48f80..6f1c9c5 100644
--- a/server/api/chatWebsite/chatWebsite.rpc.js
+++ b/server/api/chatWebsite/chatWebsite.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x579c=['jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register','request','then','ChatWebsite,\x20%s,\x20%s','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','lodash','bluebird','randomstring','ioredis','../../config/utils','../../config/logger'];(function(_0x3e5086,_0x48f4a2){var _0xfeb102=function(_0x5a945f){while(--_0x5a945f){_0x3e5086['push'](_0x3e5086['shift']());}};_0xfeb102(++_0x48f4a2);}(_0x579c,0xfe));var _0xc579=function(_0x10dfad,_0x1a7fca){_0x10dfad=_0x10dfad-0x0;var _0x5b2e1b=_0x579c[_0x10dfad];return _0x5b2e1b;};'use strict';var _=require(_0xc579('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xc579('0x1'));var rs=require(_0xc579('0x2'));var fs=require('fs');var Redis=require(_0xc579('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xc579('0x4'));var logger=require(_0xc579('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0xc579('0x6'));var client=jayson[_0xc579('0x7')][_0xc579('0x8')]({'port':0x232a});config[_0xc579('0x9')]=_[_0xc579('0xa')](config[_0xc579('0x9')],{'host':_0xc579('0xb'),'port':0x18eb});var socket=require(_0xc579('0xc'))(new Redis(config[_0xc579('0x9')]));require('./chatWebsite.socket')[_0xc579('0xd')](socket);function respondWithRpcPromise(_0xe1d58c,_0x59c827,_0x5d168e){return new BPromise(function(_0x46d536,_0x46364a){return client[_0xc579('0xe')](_0xe1d58c,_0x5d168e)[_0xc579('0xf')](function(_0x5209d2){logger['info'](_0xc579('0x10'),_0x59c827,'request\x20sent');logger[_0xc579('0x11')](_0xc579('0x12'),_0x59c827,_0xc579('0x13'),JSON[_0xc579('0x14')](_0x5209d2));if(_0x5209d2[_0xc579('0x15')]){if(_0x5209d2[_0xc579('0x15')][_0xc579('0x16')]===0x1f4){logger['error'](_0xc579('0x10'),_0x59c827,_0x5209d2[_0xc579('0x15')][_0xc579('0x17')]);return _0x46364a(_0x5209d2[_0xc579('0x15')][_0xc579('0x17')]);}logger[_0xc579('0x15')]('ChatWebsite,\x20%s,\x20%s',_0x59c827,_0x5209d2[_0xc579('0x15')][_0xc579('0x17')]);return _0x46d536(_0x5209d2[_0xc579('0x15')][_0xc579('0x17')]);}else{logger[_0xc579('0x18')]('ChatWebsite,\x20%s,\x20%s',_0x59c827,_0xc579('0x13'));_0x46d536(_0x5209d2[_0xc579('0x19')][_0xc579('0x17')]);}})['catch'](function(_0x4cb52b){logger['error'](_0xc579('0x10'),_0x59c827,_0x4cb52b);_0x46364a(_0x4cb52b);});});}
\ No newline at end of file
+var _0xb931=['request','then','info','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','ChatWebsite,\x20%s,\x20%s','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','localhost','socket.io-emitter','./chatWebsite.socket','register'];(function(_0x2c044c,_0x217c40){var _0x2144a0=function(_0x3a4696){while(--_0x3a4696){_0x2c044c['push'](_0x2c044c['shift']());}};_0x2144a0(++_0x217c40);}(_0xb931,0x97));var _0x1b93=function(_0x2e706a,_0x49c551){_0x2e706a=_0x2e706a-0x0;var _0xfdc71c=_0xb931[_0x2e706a];return _0xfdc71c;};'use strict';var _=require(_0x1b93('0x0'));var util=require(_0x1b93('0x1'));var moment=require(_0x1b93('0x2'));var BPromise=require(_0x1b93('0x3'));var rs=require(_0x1b93('0x4'));var fs=require('fs');var Redis=require(_0x1b93('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x1b93('0x6'));var logger=require(_0x1b93('0x7'))(_0x1b93('0x8'));var config=require('../../config/environment');var jayson=require(_0x1b93('0x9'));var client=jayson[_0x1b93('0xa')][_0x1b93('0xb')]({'port':0x232a});config['redis']=_['defaults'](config[_0x1b93('0xc')],{'host':_0x1b93('0xd'),'port':0x18eb});var socket=require(_0x1b93('0xe'))(new Redis(config[_0x1b93('0xc')]));require(_0x1b93('0xf'))[_0x1b93('0x10')](socket);function respondWithRpcPromise(_0x430927,_0x3b7208,_0x38e3dc){return new BPromise(function(_0x3e5d4b,_0x42ebf2){return client[_0x1b93('0x11')](_0x430927,_0x38e3dc)[_0x1b93('0x12')](function(_0x16025f){logger[_0x1b93('0x13')]('ChatWebsite,\x20%s,\x20%s',_0x3b7208,_0x1b93('0x14'));logger[_0x1b93('0x15')](_0x1b93('0x16'),_0x3b7208,'request\x20sent',JSON[_0x1b93('0x17')](_0x16025f));if(_0x16025f[_0x1b93('0x18')]){if(_0x16025f[_0x1b93('0x18')]['code']===0x1f4){logger[_0x1b93('0x18')](_0x1b93('0x19'),_0x3b7208,_0x16025f['error'][_0x1b93('0x1a')]);return _0x42ebf2(_0x16025f['error'][_0x1b93('0x1a')]);}logger['error'](_0x1b93('0x19'),_0x3b7208,_0x16025f['error'][_0x1b93('0x1a')]);return _0x3e5d4b(_0x16025f['error'][_0x1b93('0x1a')]);}else{logger[_0x1b93('0x13')](_0x1b93('0x19'),_0x3b7208,_0x1b93('0x14'));_0x3e5d4b(_0x16025f['result'][_0x1b93('0x1a')]);}})[_0x1b93('0x1b')](function(_0x2c497d){logger[_0x1b93('0x18')](_0x1b93('0x19'),_0x3b7208,_0x2c497d);_0x42ebf2(_0x2c497d);});});}
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.socket.js b/server/api/chatWebsite/chatWebsite.socket.js
index cb8f48c..e057110 100644
--- a/server/api/chatWebsite/chatWebsite.socket.js
+++ b/server/api/chatWebsite/chatWebsite.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5dd5=['save','removeListener','register','length','chatWebsite:','./chatWebsite.events'];(function(_0x288b96,_0x53221f){var _0x1123d6=function(_0x3eb99e){while(--_0x3eb99e){_0x288b96['push'](_0x288b96['shift']());}};_0x1123d6(++_0x53221f);}(_0x5dd5,0xe9));var _0x55dd=function(_0x5b688e,_0x36b47c){_0x5b688e=_0x5b688e-0x0;var _0xf41e43=_0x5dd5[_0x5b688e];return _0xf41e43;};'use strict';var ChatWebsiteEvents=require(_0x55dd('0x0'));var events=[_0x55dd('0x1'),'remove','update'];function createListener(_0x45911f,_0x5a1eb1){return function(_0x405367){_0x5a1eb1['emit'](_0x45911f,_0x405367);};}function removeListener(_0x4c8e31,_0x390fd0){return function(){ChatWebsiteEvents[_0x55dd('0x2')](_0x4c8e31,_0x390fd0);};}exports[_0x55dd('0x3')]=function(_0x21f12d){for(var _0x47fa26=0x0,_0x442c55=events[_0x55dd('0x4')];_0x47fa26<_0x442c55;_0x47fa26++){var _0x126962=events[_0x47fa26];var _0x5e1319=createListener(_0x55dd('0x5')+_0x126962,_0x21f12d);ChatWebsiteEvents['on'](_0x126962,_0x5e1319);}};
\ No newline at end of file
+var _0x0bc3=['register','length','chatWebsite:','save','remove','update','removeListener'];(function(_0x4b0830,_0x2e3b0a){var _0x1f53a7=function(_0x4b5503){while(--_0x4b5503){_0x4b0830['push'](_0x4b0830['shift']());}};_0x1f53a7(++_0x2e3b0a);}(_0x0bc3,0x1b5));var _0x30bc=function(_0x2b0be8,_0x404bc5){_0x2b0be8=_0x2b0be8-0x0;var _0x423f1d=_0x0bc3[_0x2b0be8];return _0x423f1d;};'use strict';var ChatWebsiteEvents=require('./chatWebsite.events');var events=[_0x30bc('0x0'),_0x30bc('0x1'),_0x30bc('0x2')];function createListener(_0x3f2894,_0x53998e){return function(_0x5a0318){_0x53998e['emit'](_0x3f2894,_0x5a0318);};}function removeListener(_0x369b55,_0x5b0036){return function(){ChatWebsiteEvents[_0x30bc('0x3')](_0x369b55,_0x5b0036);};}exports[_0x30bc('0x4')]=function(_0x3ce35c){for(var _0x4c8074=0x0,_0xf762f=events[_0x30bc('0x5')];_0x4c8074<_0xf762f;_0x4c8074++){var _0x31bac9=events[_0x4c8074];var _0x5aacb5=createListener(_0x30bc('0x6')+_0x31bac9,_0x3ce35c);ChatWebsiteEvents['on'](_0x31bac9,_0x5aacb5);}};
\ No newline at end of file
diff --git a/server/api/chatWebsite/helpers/wildcard-expressions.js b/server/api/chatWebsite/helpers/wildcard-expressions.js
index b6a4973..62bfd6c 100644
--- a/server/api/chatWebsite/helpers/wildcard-expressions.js
+++ b/server/api/chatWebsite/helpers/wildcard-expressions.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x40f3=['url','test','trim','replace','localhost','exports','escapeRegExp'];(function(_0x5e3b04,_0xbb6795){var _0x1fc44d=function(_0x3472a1){while(--_0x3472a1){_0x5e3b04['push'](_0x5e3b04['shift']());}};_0x1fc44d(++_0xbb6795);}(_0x40f3,0x8b));var _0x340f=function(_0xd511d,_0x3546b9){_0xd511d=_0xd511d-0x0;var _0x3f148e=_0x40f3[_0xd511d];return _0x3f148e;};var escapeRegExp=require('../../../utils/misc')[_0x340f('0x0')];var URL=require(_0x340f('0x1'))['URL'];function testWildcardValidity(_0x1f3fab){var _0x208c37=!![];try{new URL(_0x1f3fab['replace']('*','localhost'));}catch(_0x42b102){_0x208c37=![];}return _0x208c37&&new RegExp(/(http(s)?):\/\/(\*|(((\*\.)+)?([a-zA-Z0-9\-_]+\.){0,}([a-zA-Z0-9\-_]+)))(:[\d]+)?\/?$/)[_0x340f('0x2')](_0x1f3fab);}function testWebsiteWithWildcard(_0x5b331a,_0x2b87e6){var _0x496502;var _0x48d1e8=escapeRegExp(_0x5b331a[_0x340f('0x3')]()[_0x340f('0x4')](/\/$/,''))[_0x340f('0x4')]('\x5c*','([\x5cw]+)');try{new URL(_0x5b331a['replace']('\x5c*',_0x340f('0x5')));_0x496502=new RegExp(_0x48d1e8)[_0x340f('0x2')](_0x2b87e6);}catch(_0x112b1f){_0x496502=![];}return _0x496502;}module[_0x340f('0x6')]={'testWebsiteWithWildcard':testWebsiteWithWildcard,'testWildcardValidity':testWildcardValidity};
\ No newline at end of file
+var _0xf108=['exports','../../../utils/misc','url','URL','test','trim','replace','([\x5cw]+)'];(function(_0x2dd25a,_0x473907){var _0x59f26c=function(_0x4d2253){while(--_0x4d2253){_0x2dd25a['push'](_0x2dd25a['shift']());}};_0x59f26c(++_0x473907);}(_0xf108,0x1d9));var _0x8f10=function(_0x558cd0,_0x333581){_0x558cd0=_0x558cd0-0x0;var _0x5ac038=_0xf108[_0x558cd0];return _0x5ac038;};var escapeRegExp=require(_0x8f10('0x0'))['escapeRegExp'];var URL=require(_0x8f10('0x1'))[_0x8f10('0x2')];function testWildcardValidity(_0x19096f){var _0x4d49e8=!![];try{new URL(_0x19096f['replace']('*','localhost'));}catch(_0x440ee7){_0x4d49e8=![];}return _0x4d49e8&&new RegExp(/(http(s)?):\/\/(\*|(((\*\.)+)?([a-zA-Z0-9\-_]+\.){0,}([a-zA-Z0-9\-_]+)))(:[\d]+)?\/?$/)[_0x8f10('0x3')](_0x19096f);}function testWebsiteWithWildcard(_0x511ab7,_0x30a472){var _0x2e3419;var _0x235737=escapeRegExp(_0x511ab7[_0x8f10('0x4')]()[_0x8f10('0x5')](/\/$/,''))[_0x8f10('0x5')]('\x5c*',_0x8f10('0x6'));try{new URL(_0x511ab7[_0x8f10('0x5')]('\x5c*','localhost'));_0x2e3419=new RegExp(_0x235737)[_0x8f10('0x3')](_0x30a472);}catch(_0x1787d2){_0x2e3419=![];}return _0x2e3419;}module[_0x8f10('0x7')]={'testWebsiteWithWildcard':testWebsiteWithWildcard,'testWildcardValidity':testWildcardValidity};
\ No newline at end of file
diff --git a/server/api/chatWebsite/index.js b/server/api/chatWebsite/index.js
index 89f3cd6..7047d09 100644
--- a/server/api/chatWebsite/index.js
+++ b/server/api/chatWebsite/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3b20=['server/files','attachments','ensureDir','replace','extname','/:id/offline','any','offline','/:id/interactions','addInteraction','addApplications','addProactiveActions','addAgents','put','update','delete','destroy','removeAgents','exports','util','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatWebsite.controller','isAuthenticated','index','get','describe','/:id','show','/:id/dispositions','getDispositions','/:id/canned_answers','/:id/logo','/:id/avatar','getAvatar','/:id/customer_avatar','getCustomerAvatar','/:id/system_avatar','getSystemAvatar','getInteractions','/:id/snippet','getSnippet','/:id/applications','/:id/proactive_actions','getProactiveActions','/:id/fields','getFields','getOfflineMessages','/:id/users','getAgents','create','post','addDisposition','addAnswer','join','root','server/files/images/logos/','format','%s-%s','now','originalname','single','file','addLogo','server/files/images/avatars/','diskStorage','addSystemAvatar','/:id/notify','notify'];(function(_0x1f1deb,_0x44266a){var _0x301baa=function(_0x91cf35){while(--_0x91cf35){_0x1f1deb['push'](_0x1f1deb['shift']());}};_0x301baa(++_0x44266a);}(_0x3b20,0xeb));var _0x03b2=function(_0x182408,_0x136a4b){_0x182408=_0x182408-0x0;var _0xfa1409=_0x3b20[_0x182408];return _0xfa1409;};'use strict';var multer=require('multer');var util=require(_0x03b2('0x0'));var path=require('path');var timeout=require(_0x03b2('0x1'));var express=require('express');var router=express[_0x03b2('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0x03b2('0x3'));var interaction=require(_0x03b2('0x4'));var config=require(_0x03b2('0x5'));var controller=require(_0x03b2('0x6'));router['get']('/',auth[_0x03b2('0x7')](),controller[_0x03b2('0x8')]);router[_0x03b2('0x9')]('/describe',auth[_0x03b2('0x7')](),controller[_0x03b2('0xa')]);router[_0x03b2('0x9')](_0x03b2('0xb'),auth[_0x03b2('0x7')](),controller[_0x03b2('0xc')]);router[_0x03b2('0x9')](_0x03b2('0xd'),auth[_0x03b2('0x7')](),controller[_0x03b2('0xe')]);router[_0x03b2('0x9')](_0x03b2('0xf'),auth['isAuthenticated'](),controller['getAnswers']);router[_0x03b2('0x9')](_0x03b2('0x10'),controller['getLogo']);router['get'](_0x03b2('0x11'),controller[_0x03b2('0x12')]);router[_0x03b2('0x9')](_0x03b2('0x13'),controller[_0x03b2('0x14')]);router['get'](_0x03b2('0x15'),controller[_0x03b2('0x16')]);router['get']('/:id/interactions',auth[_0x03b2('0x7')](),controller[_0x03b2('0x17')]);router[_0x03b2('0x9')](_0x03b2('0x18'),controller[_0x03b2('0x19')]);router[_0x03b2('0x9')](_0x03b2('0x1a'),auth[_0x03b2('0x7')](),controller['getApplications']);router[_0x03b2('0x9')](_0x03b2('0x1b'),auth[_0x03b2('0x7')](),controller[_0x03b2('0x1c')]);router[_0x03b2('0x9')](_0x03b2('0x1d'),controller[_0x03b2('0x1e')]);router['get']('/:id/offline_messages',auth[_0x03b2('0x7')](),controller[_0x03b2('0x1f')]);router[_0x03b2('0x9')](_0x03b2('0x20'),auth[_0x03b2('0x7')](),controller[_0x03b2('0x21')]);router['post']('/',auth[_0x03b2('0x7')](),controller[_0x03b2('0x22')]);router[_0x03b2('0x23')](_0x03b2('0xd'),auth[_0x03b2('0x7')](),controller[_0x03b2('0x24')]);router[_0x03b2('0x23')](_0x03b2('0xf'),auth[_0x03b2('0x7')](),controller[_0x03b2('0x25')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x27ef33,_0x41c613,_0x4fd49d){_0x4fd49d(null,path[_0x03b2('0x26')](config[_0x03b2('0x27')],_0x03b2('0x28')));},'filename':function(_0x2fbfc6,_0x4466d1,_0x14e960){_0x14e960(null,util[_0x03b2('0x29')](_0x03b2('0x2a'),Date[_0x03b2('0x2b')](),_0x4466d1[_0x03b2('0x2c')]));}})});router['post'](_0x03b2('0x10'),upload[_0x03b2('0x2d')](_0x03b2('0x2e')),controller[_0x03b2('0x2f')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x211dcc,_0x20ef37,_0xf58ad2){_0xf58ad2(null,path[_0x03b2('0x26')](config[_0x03b2('0x27')],_0x03b2('0x30')));},'filename':function(_0x3da9e3,_0x45ab41,_0x5c7a84){_0x5c7a84(null,util['format'](_0x03b2('0x2a'),Date[_0x03b2('0x2b')](),_0x45ab41[_0x03b2('0x2c')]));}})});router[_0x03b2('0x23')](_0x03b2('0x11'),upload[_0x03b2('0x2d')](_0x03b2('0x2e')),controller['addAvatar']);var upload=multer({'storage':multer[_0x03b2('0x31')]({'destination':function(_0x272168,_0x525354,_0x29cc40){_0x29cc40(null,path[_0x03b2('0x26')](config[_0x03b2('0x27')],_0x03b2('0x30')));},'filename':function(_0x14ec9e,_0x31b3a2,_0x1b57bb){_0x1b57bb(null,util[_0x03b2('0x29')]('%s-%s',Date[_0x03b2('0x2b')](),_0x31b3a2[_0x03b2('0x2c')]));}})});router['post'](_0x03b2('0x13'),upload[_0x03b2('0x2d')]('file'),controller['addCustomerAvatar']);var upload=multer({'storage':multer[_0x03b2('0x31')]({'destination':function(_0x41e120,_0x4ebcb4,_0x1a8505){_0x1a8505(null,path['join'](config[_0x03b2('0x27')],_0x03b2('0x30')));},'filename':function(_0x3c713c,_0x6d56f8,_0x2bd7f2){_0x2bd7f2(null,util['format'](_0x03b2('0x2a'),Date[_0x03b2('0x2b')](),_0x6d56f8[_0x03b2('0x2c')]));}})});router['post'](_0x03b2('0x15'),upload['single'](_0x03b2('0x2e')),controller[_0x03b2('0x32')]);router[_0x03b2('0x23')](_0x03b2('0x33'),controller[_0x03b2('0x34')]);const offlineUploadMulter=multer({'storage':multer[_0x03b2('0x31')]({'destination':function(_0x54127b,_0x8a5c05,_0x2a21f6){const _0x1702d1=path[_0x03b2('0x26')](config[_0x03b2('0x27')],_0x03b2('0x35'),_0x03b2('0x36'),'offline-chat');fs_extra[_0x03b2('0x37')](_0x1702d1,function(){_0x2a21f6(null,_0x1702d1);});},'filename':function(_0xe5dba6,_0x1b52a9,_0x2dff91){const _0x23a352=_0x1b52a9[_0x03b2('0x2c')][_0x03b2('0x38')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x2349bd=path[_0x03b2('0x39')](_0x23a352);const _0x351012=Date[_0x03b2('0x2b')]()+'-'+_0x23a352[_0x03b2('0x38')](_0x2349bd,'')+_0x2349bd;_0x2dff91(null,_0x351012);}})});router['post'](_0x03b2('0x3a'),offlineUploadMulter[_0x03b2('0x3b')](),controller[_0x03b2('0x3c')]);router[_0x03b2('0x23')](_0x03b2('0x3d'),auth['isAuthenticated'](),controller[_0x03b2('0x3e')]);router['post'](_0x03b2('0x1a'),auth['isAuthenticated'](),controller[_0x03b2('0x3f')]);router[_0x03b2('0x23')](_0x03b2('0x1b'),auth[_0x03b2('0x7')](),controller[_0x03b2('0x40')]);router[_0x03b2('0x23')]('/:id/users',auth[_0x03b2('0x7')](),controller[_0x03b2('0x41')]);router[_0x03b2('0x42')](_0x03b2('0xb'),auth[_0x03b2('0x7')](),controller[_0x03b2('0x43')]);router[_0x03b2('0x44')](_0x03b2('0xb'),auth[_0x03b2('0x7')](),controller[_0x03b2('0x45')]);router['delete'](_0x03b2('0xd'),auth[_0x03b2('0x7')](),controller['removeDispositions']);router[_0x03b2('0x44')](_0x03b2('0xf'),auth[_0x03b2('0x7')](),controller['removeAnswers']);router['delete'](_0x03b2('0x20'),auth[_0x03b2('0x7')](),controller[_0x03b2('0x46')]);module[_0x03b2('0x47')]=router;
\ No newline at end of file
+var _0x6520=['server/files/images/avatars/','%s-%s','/:id/avatar','addAvatar','single','addSystemAvatar','/:id/notify','notify','offline-chat','replace','offline','/:id/interactions','addInteraction','addProactiveActions','/:id/users','put','update','delete','removeDispositions','removeAgents','exports','multer','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatWebsite.controller','index','get','isAuthenticated','describe','/:id','show','getDispositions','getAnswers','/:id/customer_avatar','getCustomerAvatar','/:id/system_avatar','getInteractions','getSnippet','/:id/applications','getProactiveActions','getFields','/:id/offline_messages','getOfflineMessages','getAgents','create','post','/:id/dispositions','addDisposition','/:id/canned_answers','addAnswer','diskStorage','root','format','now','originalname','/:id/logo','file','join'];(function(_0x455ccb,_0x5fe7cd){var _0xbb3bb5=function(_0x41203e){while(--_0x41203e){_0x455ccb['push'](_0x455ccb['shift']());}};_0xbb3bb5(++_0x5fe7cd);}(_0x6520,0x189));var _0x0652=function(_0x33444b,_0xd30d56){_0x33444b=_0x33444b-0x0;var _0x38f918=_0x6520[_0x33444b];return _0x38f918;};'use strict';var multer=require(_0x0652('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x0652('0x1'));var express=require(_0x0652('0x2'));var router=express['Router']();var fs_extra=require(_0x0652('0x3'));var auth=require(_0x0652('0x4'));var interaction=require(_0x0652('0x5'));var config=require(_0x0652('0x6'));var controller=require(_0x0652('0x7'));router['get']('/',auth['isAuthenticated'](),controller[_0x0652('0x8')]);router[_0x0652('0x9')]('/describe',auth[_0x0652('0xa')](),controller[_0x0652('0xb')]);router[_0x0652('0x9')](_0x0652('0xc'),auth[_0x0652('0xa')](),controller[_0x0652('0xd')]);router[_0x0652('0x9')]('/:id/dispositions',auth[_0x0652('0xa')](),controller[_0x0652('0xe')]);router[_0x0652('0x9')]('/:id/canned_answers',auth[_0x0652('0xa')](),controller[_0x0652('0xf')]);router[_0x0652('0x9')]('/:id/logo',controller['getLogo']);router['get']('/:id/avatar',controller['getAvatar']);router[_0x0652('0x9')](_0x0652('0x10'),controller[_0x0652('0x11')]);router['get'](_0x0652('0x12'),controller['getSystemAvatar']);router['get']('/:id/interactions',auth[_0x0652('0xa')](),controller[_0x0652('0x13')]);router[_0x0652('0x9')]('/:id/snippet',controller[_0x0652('0x14')]);router[_0x0652('0x9')](_0x0652('0x15'),auth[_0x0652('0xa')](),controller['getApplications']);router[_0x0652('0x9')]('/:id/proactive_actions',auth[_0x0652('0xa')](),controller[_0x0652('0x16')]);router[_0x0652('0x9')]('/:id/fields',controller[_0x0652('0x17')]);router[_0x0652('0x9')](_0x0652('0x18'),auth[_0x0652('0xa')](),controller[_0x0652('0x19')]);router['get']('/:id/users',auth[_0x0652('0xa')](),controller[_0x0652('0x1a')]);router['post']('/',auth[_0x0652('0xa')](),controller[_0x0652('0x1b')]);router[_0x0652('0x1c')](_0x0652('0x1d'),auth[_0x0652('0xa')](),controller[_0x0652('0x1e')]);router[_0x0652('0x1c')](_0x0652('0x1f'),auth[_0x0652('0xa')](),controller[_0x0652('0x20')]);var upload=multer({'storage':multer[_0x0652('0x21')]({'destination':function(_0x516ec5,_0x452b6b,_0x49a314){_0x49a314(null,path['join'](config[_0x0652('0x22')],'server/files/images/logos/'));},'filename':function(_0x128991,_0x122ccf,_0x53a61e){_0x53a61e(null,util[_0x0652('0x23')]('%s-%s',Date[_0x0652('0x24')](),_0x122ccf[_0x0652('0x25')]));}})});router[_0x0652('0x1c')](_0x0652('0x26'),upload['single'](_0x0652('0x27')),controller['addLogo']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x3abe46,_0x595522,_0x350fdc){_0x350fdc(null,path[_0x0652('0x28')](config['root'],_0x0652('0x29')));},'filename':function(_0x4c9cc6,_0x4718c5,_0x5b38c0){_0x5b38c0(null,util[_0x0652('0x23')](_0x0652('0x2a'),Date[_0x0652('0x24')](),_0x4718c5[_0x0652('0x25')]));}})});router['post'](_0x0652('0x2b'),upload['single'](_0x0652('0x27')),controller[_0x0652('0x2c')]);var upload=multer({'storage':multer[_0x0652('0x21')]({'destination':function(_0x4b15c9,_0x8ada00,_0x2bc1de){_0x2bc1de(null,path[_0x0652('0x28')](config[_0x0652('0x22')],_0x0652('0x29')));},'filename':function(_0x26c790,_0x3aab99,_0x2b9957){_0x2b9957(null,util[_0x0652('0x23')](_0x0652('0x2a'),Date[_0x0652('0x24')](),_0x3aab99['originalname']));}})});router['post'](_0x0652('0x10'),upload[_0x0652('0x2d')](_0x0652('0x27')),controller['addCustomerAvatar']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x595210,_0x2d1800,_0x300019){_0x300019(null,path[_0x0652('0x28')](config[_0x0652('0x22')],'server/files/images/avatars/'));},'filename':function(_0x149f06,_0x49a7f0,_0x5aa1a6){_0x5aa1a6(null,util[_0x0652('0x23')](_0x0652('0x2a'),Date[_0x0652('0x24')](),_0x49a7f0[_0x0652('0x25')]));}})});router[_0x0652('0x1c')](_0x0652('0x12'),upload[_0x0652('0x2d')](_0x0652('0x27')),controller[_0x0652('0x2e')]);router[_0x0652('0x1c')](_0x0652('0x2f'),controller[_0x0652('0x30')]);const offlineUploadMulter=multer({'storage':multer['diskStorage']({'destination':function(_0x485b40,_0x4e543b,_0x56a26a){const _0x2dab92=path[_0x0652('0x28')](config[_0x0652('0x22')],'server/files','attachments',_0x0652('0x31'));fs_extra['ensureDir'](_0x2dab92,function(){_0x56a26a(null,_0x2dab92);});},'filename':function(_0x27ae47,_0x27d38a,_0x3a44ab){const _0x148ee3=_0x27d38a[_0x0652('0x25')][_0x0652('0x32')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x542a90=path['extname'](_0x148ee3);const _0x5f182c=Date['now']()+'-'+_0x148ee3[_0x0652('0x32')](_0x542a90,'')+_0x542a90;_0x3a44ab(null,_0x5f182c);}})});router[_0x0652('0x1c')]('/:id/offline',offlineUploadMulter['any'](),controller[_0x0652('0x33')]);router[_0x0652('0x1c')](_0x0652('0x34'),auth['isAuthenticated'](),controller[_0x0652('0x35')]);router['post'](_0x0652('0x15'),auth[_0x0652('0xa')](),controller['addApplications']);router[_0x0652('0x1c')]('/:id/proactive_actions',auth[_0x0652('0xa')](),controller[_0x0652('0x36')]);router[_0x0652('0x1c')](_0x0652('0x37'),auth[_0x0652('0xa')](),controller['addAgents']);router[_0x0652('0x38')](_0x0652('0xc'),auth['isAuthenticated'](),controller[_0x0652('0x39')]);router[_0x0652('0x3a')](_0x0652('0xc'),auth[_0x0652('0xa')](),controller['destroy']);router[_0x0652('0x3a')](_0x0652('0x1d'),auth[_0x0652('0xa')](),controller[_0x0652('0x3b')]);router[_0x0652('0x3a')](_0x0652('0x1f'),auth['isAuthenticated'](),controller['removeAnswers']);router[_0x0652('0x3a')](_0x0652('0x37'),auth[_0x0652('0xa')](),controller[_0x0652('0x3c')]);module[_0x0652('0x3d')]=router;
\ No newline at end of file
diff --git a/server/api/client-side-logs.js b/server/api/client-side-logs.js
index b3c0666..9b2df32 100644
--- a/server/api/client-side-logs.js
+++ b/server/api/client-side-logs.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9412=['use','isAuthenticated','exports','beaver-logger/server','express','../config/environment','Router','env','production','app','get','client-side-logger','Client-Side\x20logger\x20not\x20found!','expressEndpoint','/client-logs'];(function(_0x502c7d,_0x2f1285){var _0x30b7ed=function(_0x2d92f3){while(--_0x2d92f3){_0x502c7d['push'](_0x502c7d['shift']());}};_0x30b7ed(++_0x2f1285);}(_0x9412,0xc6));var _0x2941=function(_0x221230,_0x5ed5cc){_0x221230=_0x221230-0x0;var _0xbdf131=_0x9412[_0x221230];return _0xbdf131;};var beaverLogger=require(_0x2941('0x0'));var express=require(_0x2941('0x1'));var auth=require('../components/auth/service');var config=require(_0x2941('0x2'));var router=express[_0x2941('0x3')]();var isProduction=config[_0x2941('0x4')]===_0x2941('0x5')||![];function clientSideLogs(_0x39020e,_0x33280e,_0x37eff8){var _0x135ecb=_0x39020e[_0x2941('0x6')][_0x2941('0x7')](_0x2941('0x8'));if(!_0x135ecb){throw new Error(_0x2941('0x9'));}return beaverLogger[_0x2941('0xa')]({'uri':_0x2941('0xb'),'logger':_0x135ecb,'enableCors':!isProduction})(_0x39020e,_0x33280e,_0x37eff8);}router[_0x2941('0xc')](auth[_0x2941('0xd')](),clientSideLogs);module[_0x2941('0xe')]=router;
\ No newline at end of file
+var _0x6f76=['Router','env','production','app','get','client-side-logger','expressEndpoint','/client-logs','use','isAuthenticated','exports','beaver-logger/server','../config/environment'];(function(_0x5c1906,_0x42435a){var _0x2b340d=function(_0x59a039){while(--_0x59a039){_0x5c1906['push'](_0x5c1906['shift']());}};_0x2b340d(++_0x42435a);}(_0x6f76,0xf5));var _0x66f7=function(_0x293c4e,_0x4f80fb){_0x293c4e=_0x293c4e-0x0;var _0x4550e8=_0x6f76[_0x293c4e];return _0x4550e8;};var beaverLogger=require(_0x66f7('0x0'));var express=require('express');var auth=require('../components/auth/service');var config=require(_0x66f7('0x1'));var router=express[_0x66f7('0x2')]();var isProduction=config[_0x66f7('0x3')]===_0x66f7('0x4')||![];function clientSideLogs(_0x521725,_0x121bc6,_0x3cb73b){var _0x4d25aa=_0x521725[_0x66f7('0x5')][_0x66f7('0x6')](_0x66f7('0x7'));if(!_0x4d25aa){throw new Error('Client-Side\x20logger\x20not\x20found!');}return beaverLogger[_0x66f7('0x8')]({'uri':_0x66f7('0x9'),'logger':_0x4d25aa,'enableCors':!isProduction})(_0x521725,_0x121bc6,_0x3cb73b);}router[_0x66f7('0xa')](auth[_0x66f7('0xb')](),clientSideLogs);module[_0x66f7('0xc')]=router;
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.attributes.js b/server/api/cloudProvider/cloudProvider.attributes.js
index 2ac9e45..7b7f086 100644
--- a/server/api/cloudProvider/cloudProvider.attributes.js
+++ b/server/api/cloudProvider/cloudProvider.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc960=['MicrosoftAzure\x20=>\x20redirect_uri','TEXT','MicrosoftAzure\x20=>\x20refresh_token','MicrosoftAzure\x20=>\x20Dynamics365\x20=>\x20remote_uri','ENUM','AmazonAWS','Google','MicrosoftAzure','Outlook365','Dynamics365','STRING','MicrosoftAzure\x20=>\x20client_id'];(function(_0x35da42,_0x5c2610){var _0x370035=function(_0x546db5){while(--_0x546db5){_0x35da42['push'](_0x35da42['shift']());}};_0x370035(++_0x5c2610);}(_0xc960,0x16c));var _0x0c96=function(_0x30f8ba,_0x533118){_0x30f8ba=_0x30f8ba-0x0;var _0xce6c4c=_0xc960[_0x30f8ba];return _0xce6c4c;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize[_0x0c96('0x0')](_0x0c96('0x1'),_0x0c96('0x2'),_0x0c96('0x3')),'allowNull':![],'validate':{'notEmpty':!![]}},'type':{'type':Sequelize[_0x0c96('0x0')](_0x0c96('0x4'),_0x0c96('0x5'))},'data1':{'type':Sequelize[_0x0c96('0x6')],'comment':_0x0c96('0x7')},'data2':{'type':Sequelize[_0x0c96('0x6')],'comment':'MicrosoftAzure\x20=>\x20tenant'},'data3':{'type':Sequelize[_0x0c96('0x6')],'comment':'MicrosoftAzure\x20=>\x20client_secret'},'data4':{'type':Sequelize[_0x0c96('0x6')],'comment':_0x0c96('0x8')},'data5':{'type':Sequelize[_0x0c96('0x9')],'comment':'MicrosoftAzure\x20=>\x20access_token'},'data6':{'type':Sequelize[_0x0c96('0x9')],'comment':_0x0c96('0xa')},'data7':{'type':Sequelize[_0x0c96('0x9')],'comment':_0x0c96('0xb')}};
\ No newline at end of file
+var _0x8de3=['STRING','ENUM','Google','MicrosoftAzure','Outlook365','Dynamics365','MicrosoftAzure\x20=>\x20tenant','MicrosoftAzure\x20=>\x20client_secret','TEXT','MicrosoftAzure\x20=>\x20refresh_token','MicrosoftAzure\x20=>\x20Dynamics365\x20=>\x20remote_uri','sequelize','exports'];(function(_0x3eb2bc,_0x3d4dfe){var _0x1b4d2f=function(_0x5162cb){while(--_0x5162cb){_0x3eb2bc['push'](_0x3eb2bc['shift']());}};_0x1b4d2f(++_0x3d4dfe);}(_0x8de3,0x11c));var _0x38de=function(_0x59fc33,_0x2e182d){_0x59fc33=_0x59fc33-0x0;var _0x39066f=_0x8de3[_0x59fc33];return _0x39066f;};'use strict';var Sequelize=require(_0x38de('0x0'));module[_0x38de('0x1')]={'name':{'type':Sequelize[_0x38de('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize[_0x38de('0x3')]('AmazonAWS',_0x38de('0x4'),_0x38de('0x5')),'allowNull':![],'validate':{'notEmpty':!![]}},'type':{'type':Sequelize[_0x38de('0x3')](_0x38de('0x6'),_0x38de('0x7'))},'data1':{'type':Sequelize['STRING'],'comment':'MicrosoftAzure\x20=>\x20client_id'},'data2':{'type':Sequelize[_0x38de('0x2')],'comment':_0x38de('0x8')},'data3':{'type':Sequelize[_0x38de('0x2')],'comment':_0x38de('0x9')},'data4':{'type':Sequelize[_0x38de('0x2')],'comment':'MicrosoftAzure\x20=>\x20redirect_uri'},'data5':{'type':Sequelize[_0x38de('0xa')],'comment':'MicrosoftAzure\x20=>\x20access_token'},'data6':{'type':Sequelize[_0x38de('0xa')],'comment':_0x38de('0xb')},'data7':{'type':Sequelize[_0x38de('0xa')],'comment':_0x38de('0xc')}};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.controller.js b/server/api/cloudProvider/cloudProvider.controller.js
index a8aa061..fe85842 100644
--- a/server/api/cloudProvider/cloudProvider.controller.js
+++ b/server/api/cloudProvider/cloudProvider.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xac7f=['../../config/environment','../../config/logger','api','../../mysqldb','./cloudProvider.oauth','redis','localhost','socket.io-emitter','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','update','then','destroy','error','stack','name','send','padEnd','index','map','CloudProvider','rawAttributes','fieldName','type','key','query','keys','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','rows','service','MicrosoftAzure','decryptString','data3','catch','show','params','find','create','Name\x20parameter\x20not\x20specified','body','includes','join','encryptString','oauth2MicrosoftAuthorize','findOne','generateMicrosoftAuthorizationUrl','user','oauth2MicrosoftCallback','state','Invalid\x20state\x20parameter','parse','from','toString','id_token','oauth2Claims','code','data5','access_token','data6','refresh_token','startRefreshInterval','emit','microsoftAuthorization:success','message','Authentication\x20failed\x20for\x20cloud\x20provider\x20#%s,\x20err:%s','stringify','lodash','ioredis','../../components/parsers/qs','../../components/encryptor'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xac7f,0x178));var _0xfac7=function(_0x4154a6,_0x2c0b8e){_0x4154a6=_0x4154a6-0x0;var _0x3b2786=_0xac7f[_0x4154a6];return _0x3b2786;};'use strict';var _=require(_0xfac7('0x0'));var Redis=require(_0xfac7('0x1'));var qs=require(_0xfac7('0x2'));var encryptor=require(_0xfac7('0x3'));var config=require(_0xfac7('0x4'));var logger=require(_0xfac7('0x5'))(_0xfac7('0x6'));var db=require(_0xfac7('0x7'))['db'];var oauth=require(_0xfac7('0x8'));config[_0xfac7('0x9')]=_['defaults'](config[_0xfac7('0x9')],{'host':_0xfac7('0xa'),'port':0x18eb});var socket=require(_0xfac7('0xb'))(new Redis(config[_0xfac7('0x9')]));var redis=new Redis(config['redis']);function respondWithStatusCode(_0x11a3e5,_0x34fbc2){_0x34fbc2=_0x34fbc2||0xcc;return function(_0x4ae476){if(_0x4ae476){return _0x11a3e5[_0xfac7('0xc')](_0x34fbc2);}return _0x11a3e5[_0xfac7('0xd')](_0x34fbc2)[_0xfac7('0xe')]();};}function respondWithResult(_0x9f07d7,_0x2fc7d0){_0x2fc7d0=_0x2fc7d0||0xc8;return function(_0x2d16e3){if(_0x2d16e3){return _0x9f07d7[_0xfac7('0xd')](_0x2fc7d0)[_0xfac7('0xf')](_0x2d16e3);}};}function respondWithFilteredResult(_0x53d4df,_0xb50b26){return function(_0x5a6f06){if(_0x5a6f06){var _0x16fe90=typeof _0xb50b26[_0xfac7('0x10')]===_0xfac7('0x11')&&typeof _0xb50b26[_0xfac7('0x12')]===_0xfac7('0x11');var _0x5ea5b5=_0x5a6f06[_0xfac7('0x13')];var _0x1c2cdd=_0x16fe90?0x0:_0xb50b26['offset'];var _0x12dae3=_0x16fe90?_0x5a6f06[_0xfac7('0x13')]:_0xb50b26[_0xfac7('0x10')]+_0xb50b26[_0xfac7('0x12')];var _0x207faa;if(_0x12dae3>=_0x5ea5b5){_0x12dae3=_0x5ea5b5;_0x207faa=0xc8;}else{_0x207faa=0xce;}_0x53d4df[_0xfac7('0xd')](_0x207faa);return _0x53d4df[_0xfac7('0x14')](_0xfac7('0x15'),_0x1c2cdd+'-'+_0x12dae3+'/'+_0x5ea5b5)[_0xfac7('0xf')](_0x5a6f06);}return null;};}function saveUpdates(_0x4cc9b3){return function(_0x1be897){if(_0x1be897){return _0x1be897[_0xfac7('0x16')](_0x4cc9b3)[_0xfac7('0x17')](function(_0x6e16e){return _0x6e16e;});}return null;};}function removeEntity(_0x251746){return function(_0x5981da){if(_0x5981da){return _0x5981da[_0xfac7('0x18')]()[_0xfac7('0x17')](function(){_0x251746[_0xfac7('0xd')](0xcc)[_0xfac7('0xe')]();});}};}function handleEntityNotFound(_0x5ad289){return function(_0x10e2f5){if(!_0x10e2f5){_0x5ad289[_0xfac7('0xc')](0x194);}return _0x10e2f5;};}function handleError(_0x214f0b,_0x3a9372){_0x3a9372=_0x3a9372||0x1f4;return function(_0x1e5ddb){logger[_0xfac7('0x19')](_0x1e5ddb[_0xfac7('0x1a')]);if(_0x1e5ddb[_0xfac7('0x1b')]){delete _0x1e5ddb[_0xfac7('0x1b')];}_0x214f0b['status'](_0x3a9372)[_0xfac7('0x1c')](_0x1e5ddb);};}function maskClientSecret(_0x583070){return _[_0xfac7('0x1d')](_0x583070['slice'](0x0,0x3),0x14,'*');}exports[_0xfac7('0x1e')]=function(_0x3ecc08,_0x3c3b0c){var _0x4927f7={},_0x54e200={},_0x5346d2={'count':0x0,'rows':[]};var _0x8e8dcc=_[_0xfac7('0x1f')](db[_0xfac7('0x20')][_0xfac7('0x21')],function(_0xd1e4ea){return{'name':_0xd1e4ea[_0xfac7('0x22')],'type':_0xd1e4ea[_0xfac7('0x23')][_0xfac7('0x24')]};});_0x54e200['model']=_['map'](_0x8e8dcc,'name');_0x54e200[_0xfac7('0x25')]=_[_0xfac7('0x26')](_0x3ecc08[_0xfac7('0x25')]);_0x54e200[_0xfac7('0x27')]=_[_0xfac7('0x28')](_0x54e200['model'],_0x54e200[_0xfac7('0x25')]);_0x4927f7[_0xfac7('0x29')]=_[_0xfac7('0x28')](_0x54e200[_0xfac7('0x2a')],qs[_0xfac7('0x2b')](_0x3ecc08[_0xfac7('0x25')][_0xfac7('0x2b')]));_0x4927f7[_0xfac7('0x29')]=_0x4927f7[_0xfac7('0x29')][_0xfac7('0x2c')]?_0x4927f7[_0xfac7('0x29')]:_0x54e200[_0xfac7('0x2a')];if(!_0x3ecc08[_0xfac7('0x25')][_0xfac7('0x2d')](_0xfac7('0x2e'))){_0x4927f7[_0xfac7('0x12')]=qs[_0xfac7('0x12')](_0x3ecc08['query'][_0xfac7('0x12')]);_0x4927f7[_0xfac7('0x10')]=qs[_0xfac7('0x10')](_0x3ecc08[_0xfac7('0x25')][_0xfac7('0x10')]);}_0x4927f7[_0xfac7('0x2f')]=qs[_0xfac7('0x30')](_0x3ecc08[_0xfac7('0x25')][_0xfac7('0x30')]);_0x4927f7[_0xfac7('0x31')]=qs[_0xfac7('0x27')](_[_0xfac7('0x32')](_0x3ecc08[_0xfac7('0x25')],_0x54e200[_0xfac7('0x27')]),_0x8e8dcc);if(_0x3ecc08[_0xfac7('0x25')][_0xfac7('0x33')]){_0x4927f7[_0xfac7('0x31')]=_[_0xfac7('0x34')](_0x4927f7[_0xfac7('0x31')],{'$or':_[_0xfac7('0x1f')](_0x8e8dcc,function(_0x4c35dc){if(_0x4c35dc[_0xfac7('0x23')]!=='VIRTUAL'){var _0x3115ff={};_0x3115ff[_0x4c35dc[_0xfac7('0x1b')]]={'$like':'%'+_0x3ecc08[_0xfac7('0x25')][_0xfac7('0x33')]+'%'};return _0x3115ff;}})});}_0x4927f7=_[_0xfac7('0x34')]({},_0x4927f7,_0x3ecc08[_0xfac7('0x35')]);var _0x238150={'where':_0x4927f7[_0xfac7('0x31')]};return db[_0xfac7('0x20')][_0xfac7('0x13')](_0x238150)[_0xfac7('0x17')](function(_0x421d2d){_0x5346d2[_0xfac7('0x13')]=_0x421d2d;if(_0x3ecc08[_0xfac7('0x25')][_0xfac7('0x36')]){_0x4927f7[_0xfac7('0x37')]=[{'all':!![]}];}return db['CloudProvider'][_0xfac7('0x38')](_0x4927f7);})['then'](function(_0x554874){_0x5346d2[_0xfac7('0x39')]=_[_0xfac7('0x1f')](_0x554874,function(_0x2e11eb){if(_0x2e11eb[_0xfac7('0x3a')]===_0xfac7('0x3b')){var _0x5863d0=encryptor[_0xfac7('0x3c')](_0x2e11eb[_0xfac7('0x3d')]);_0x2e11eb[_0xfac7('0x3d')]=maskClientSecret(_0x5863d0);}return _0x2e11eb;});return _0x5346d2;})[_0xfac7('0x17')](respondWithFilteredResult(_0x3c3b0c,_0x4927f7))[_0xfac7('0x3e')](handleError(_0x3c3b0c,null));};exports[_0xfac7('0x3f')]=function(_0x3daf38,_0x119c18){var _0x14dc5c={'raw':!![],'where':{'id':_0x3daf38[_0xfac7('0x40')]['id']}},_0x6c08c={};_0x6c08c['model']=_[_0xfac7('0x26')](db[_0xfac7('0x20')][_0xfac7('0x21')]);_0x6c08c[_0xfac7('0x25')]=_[_0xfac7('0x26')](_0x3daf38[_0xfac7('0x25')]);_0x6c08c['filters']=_[_0xfac7('0x28')](_0x6c08c['model'],_0x6c08c[_0xfac7('0x25')]);_0x14dc5c['attributes']=_[_0xfac7('0x28')](_0x6c08c[_0xfac7('0x2a')],qs[_0xfac7('0x2b')](_0x3daf38[_0xfac7('0x25')][_0xfac7('0x2b')]));_0x14dc5c[_0xfac7('0x29')]=_0x14dc5c[_0xfac7('0x29')][_0xfac7('0x2c')]?_0x14dc5c['attributes']:_0x6c08c[_0xfac7('0x2a')];if(_0x3daf38[_0xfac7('0x25')][_0xfac7('0x36')]){_0x14dc5c[_0xfac7('0x37')]=[{'all':!![]}];}_0x14dc5c=_['merge']({},_0x14dc5c,_0x3daf38['options']);return db[_0xfac7('0x20')][_0xfac7('0x41')](_0x14dc5c)[_0xfac7('0x17')](handleEntityNotFound(_0x119c18,null))['then'](function(_0x2bd7c9){if(_0x2bd7c9[_0xfac7('0x3a')]==='MicrosoftAzure'){var _0x48e1e3=encryptor['decryptString'](_0x2bd7c9[_0xfac7('0x3d')]);_0x2bd7c9['data3']=maskClientSecret(_0x48e1e3);}return _0x2bd7c9;})[_0xfac7('0x17')](respondWithResult(_0x119c18,null))[_0xfac7('0x3e')](handleError(_0x119c18,null));};exports[_0xfac7('0x42')]=function(_0x1d3f42,_0x18e1d7){if(!_0x1d3f42['body']['name'])throw new Error(_0xfac7('0x43'));if(!_0x1d3f42[_0xfac7('0x44')][_0xfac7('0x3a')])throw new Error('Service\x20parameter\x20not\x20specified');var _0x4d59cd=db[_0xfac7('0x20')][_0xfac7('0x21')][_0xfac7('0x3a')]['values'];if(!_0x4d59cd[_0xfac7('0x45')](_0x1d3f42[_0xfac7('0x44')][_0xfac7('0x3a')]))throw new Error('Invalid\x20service\x20parameter.\x20Allowed\x20values:\x20'+_0x4d59cd[_0xfac7('0x46')](',\x20'));if(_0x1d3f42[_0xfac7('0x44')]['service']==='MicrosoftAzure'&&_0x1d3f42['body']['data3']){_0x1d3f42[_0xfac7('0x44')]['data3']=encryptor[_0xfac7('0x47')](_0x1d3f42['body']['data3']);}return db[_0xfac7('0x20')][_0xfac7('0x42')](_0x1d3f42[_0xfac7('0x44')],{})['then'](respondWithResult(_0x18e1d7,0xc9))['catch'](handleError(_0x18e1d7,null));};exports[_0xfac7('0x16')]=function(_0x381c07,_0x47e583){if(_0x381c07[_0xfac7('0x44')]['id']){delete _0x381c07[_0xfac7('0x44')]['id'];}return db[_0xfac7('0x20')][_0xfac7('0x41')]({'where':{'id':_0x381c07[_0xfac7('0x40')]['id']}})[_0xfac7('0x17')](handleEntityNotFound(_0x47e583,null))['then'](function(_0xbbf494){if(_0xbbf494[_0xfac7('0x3a')]==='MicrosoftAzure'&&_0x381c07['body']['data3']){_0x381c07[_0xfac7('0x44')][_0xfac7('0x3d')]=encryptor[_0xfac7('0x47')](_0x381c07[_0xfac7('0x44')][_0xfac7('0x3d')]);}return _0xbbf494;})[_0xfac7('0x17')](saveUpdates(_0x381c07[_0xfac7('0x44')],null))[_0xfac7('0x17')](respondWithResult(_0x47e583,null))['catch'](handleError(_0x47e583,null));};exports[_0xfac7('0x18')]=function(_0x369068,_0x59b29e){return db[_0xfac7('0x20')]['find']({'where':{'id':_0x369068['params']['id']}})[_0xfac7('0x17')](handleEntityNotFound(_0x59b29e,null))['then'](removeEntity(_0x59b29e,null))['catch'](handleError(_0x59b29e,null));};exports[_0xfac7('0x48')]=function(_0x1569c6,_0x240095){return db[_0xfac7('0x20')][_0xfac7('0x49')]({'where':{'id':_0x1569c6['params']['id']},'raw':!![]})[_0xfac7('0x17')](function(_0x284ead){if(!_0x284ead)return _0x240095[_0xfac7('0xc')](0x194);return{'url':oauth[_0xfac7('0x4a')](_0x284ead,_0x1569c6[_0xfac7('0x4b')]['id'])};})['then'](respondWithResult(_0x240095,null))[_0xfac7('0x3e')](handleError(_0x240095,null));};exports[_0xfac7('0x4c')]=function(_0x946057,_0x5cdb7f){var _0x4daa49=_0x946057[_0xfac7('0x44')];var _0x5315a8;var _0x4af104;if(_0x4daa49['error'])throw _0x4daa49;redis['get'](_0x4daa49[_0xfac7('0x4d')])[_0xfac7('0x17')](function(_0x5dd355){if(!_0x5dd355)throw new Error(_0xfac7('0x4e'));_0x5315a8=JSON[_0xfac7('0x4f')](_0x5dd355);var _0xf716c9=Buffer[_0xfac7('0x50')](_0x4daa49[_0xfac7('0x4d')],'base64')[_0xfac7('0x51')]('ascii');_0x4af104=JSON[_0xfac7('0x4f')](_0xf716c9);if(!oauth['isValidIdToken'](_0x4daa49[_0xfac7('0x52')],_0x5315a8[_0xfac7('0x53')]))throw new Error('Unable\x20to\x20validate\x20id_token');redis['del'](_0x4daa49[_0xfac7('0x4d')]);return oauth['getOauth2MicrosoftAccessToken'](_0x4daa49[_0xfac7('0x54')],_0x5315a8);})['then'](function(_0x6fac35){_0x5315a8[_0xfac7('0x55')]=_0x6fac35[_0xfac7('0x56')];_0x5315a8[_0xfac7('0x57')]=_0x6fac35[_0xfac7('0x58')];return db[_0xfac7('0x20')][_0xfac7('0x16')]({'data5':_0x5315a8[_0xfac7('0x55')],'data6':_0x5315a8['data6']},{'where':{'id':_0x5315a8['id']}});})[_0xfac7('0x17')](function(){oauth[_0xfac7('0x59')](_0x5315a8);socket[_0xfac7('0x5a')](_0xfac7('0x5b'),{'id':_0x4af104['id']});return;})[_0xfac7('0x17')](respondWithStatusCode(_0x5cdb7f,null))['catch'](function(_0x37163e){if(_0x4af104){socket[_0xfac7('0x5a')]('microsoftAuthorization:error',{'id':_0x4af104['id']});}if(!_0x5315a8){logger[_0xfac7('0x19')]('Invalid\x20authentication\x20state\x20parameter',_0x37163e);return _0x5cdb7f['status'](0x1f4)[_0xfac7('0x1c')](_0x37163e[_0xfac7('0x5c')]);}logger[_0xfac7('0x19')](_0xfac7('0x5d'),_0x5315a8['id'],JSON[_0xfac7('0x5e')](_0x37163e));});};
\ No newline at end of file
+var _0x3f64=['getOauth2MicrosoftAccessToken','code','data5','access_token','data6','startRefreshInterval','emit','Invalid\x20authentication\x20state\x20parameter','message','Authentication\x20failed\x20for\x20cloud\x20provider\x20#%s,\x20err:%s','stringify','lodash','ioredis','../../components/encryptor','../../config/environment','../../config/logger','../../mysqldb','./cloudProvider.oauth','redis','localhost','socket.io-emitter','sendStatus','status','json','limit','offset','count','set','Content-Range','update','then','destroy','error','stack','name','send','padEnd','slice','map','rawAttributes','fieldName','type','query','keys','filters','intersection','model','attributes','fields','length','nolimit','order','sort','pick','filter','where','merge','options','CloudProvider','includeAll','findAll','data3','catch','params','include','find','MicrosoftAzure','decryptString','create','body','service','includes','Invalid\x20service\x20parameter.\x20Allowed\x20values:\x20','join','encryptString','oauth2MicrosoftAuthorize','findOne','generateMicrosoftAuthorizationUrl','user','oauth2MicrosoftCallback','get','state','from','base64','ascii','parse','isValidIdToken','id_token','oauth2Claims'];(function(_0xcc0cda,_0x353d30){var _0x4988cd=function(_0x38a5cf){while(--_0x38a5cf){_0xcc0cda['push'](_0xcc0cda['shift']());}};_0x4988cd(++_0x353d30);}(_0x3f64,0xbd));var _0x43f6=function(_0x56dd44,_0x110177){_0x56dd44=_0x56dd44-0x0;var _0x24c3ec=_0x3f64[_0x56dd44];return _0x24c3ec;};'use strict';var _=require(_0x43f6('0x0'));var Redis=require(_0x43f6('0x1'));var qs=require('../../components/parsers/qs');var encryptor=require(_0x43f6('0x2'));var config=require(_0x43f6('0x3'));var logger=require(_0x43f6('0x4'))('api');var db=require(_0x43f6('0x5'))['db'];var oauth=require(_0x43f6('0x6'));config[_0x43f6('0x7')]=_['defaults'](config[_0x43f6('0x7')],{'host':_0x43f6('0x8'),'port':0x18eb});var socket=require(_0x43f6('0x9'))(new Redis(config[_0x43f6('0x7')]));var redis=new Redis(config[_0x43f6('0x7')]);function respondWithStatusCode(_0x405643,_0x4834b8){_0x4834b8=_0x4834b8||0xcc;return function(_0x480f24){if(_0x480f24){return _0x405643[_0x43f6('0xa')](_0x4834b8);}return _0x405643[_0x43f6('0xb')](_0x4834b8)['end']();};}function respondWithResult(_0x53b8db,_0x21de26){_0x21de26=_0x21de26||0xc8;return function(_0x41733e){if(_0x41733e){return _0x53b8db[_0x43f6('0xb')](_0x21de26)[_0x43f6('0xc')](_0x41733e);}};}function respondWithFilteredResult(_0x473799,_0x1317da){return function(_0x48d3bc){if(_0x48d3bc){var _0x3a45cf=typeof _0x1317da['offset']==='undefined'&&typeof _0x1317da[_0x43f6('0xd')]==='undefined';var _0x3cc58c=_0x48d3bc['count'];var _0x328029=_0x3a45cf?0x0:_0x1317da[_0x43f6('0xe')];var _0x285cf8=_0x3a45cf?_0x48d3bc[_0x43f6('0xf')]:_0x1317da['offset']+_0x1317da['limit'];var _0x2f9a5e;if(_0x285cf8>=_0x3cc58c){_0x285cf8=_0x3cc58c;_0x2f9a5e=0xc8;}else{_0x2f9a5e=0xce;}_0x473799[_0x43f6('0xb')](_0x2f9a5e);return _0x473799[_0x43f6('0x10')](_0x43f6('0x11'),_0x328029+'-'+_0x285cf8+'/'+_0x3cc58c)['json'](_0x48d3bc);}return null;};}function saveUpdates(_0x287333){return function(_0x3d1592){if(_0x3d1592){return _0x3d1592[_0x43f6('0x12')](_0x287333)[_0x43f6('0x13')](function(_0x5e7b9c){return _0x5e7b9c;});}return null;};}function removeEntity(_0x2657e0){return function(_0x467a92){if(_0x467a92){return _0x467a92[_0x43f6('0x14')]()[_0x43f6('0x13')](function(){_0x2657e0['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x28a64c){return function(_0x47eec3){if(!_0x47eec3){_0x28a64c[_0x43f6('0xa')](0x194);}return _0x47eec3;};}function handleError(_0x33f2bf,_0x5dc1c4){_0x5dc1c4=_0x5dc1c4||0x1f4;return function(_0x19f43c){logger[_0x43f6('0x15')](_0x19f43c[_0x43f6('0x16')]);if(_0x19f43c[_0x43f6('0x17')]){delete _0x19f43c['name'];}_0x33f2bf[_0x43f6('0xb')](_0x5dc1c4)[_0x43f6('0x18')](_0x19f43c);};}function maskClientSecret(_0x51efe1){return _[_0x43f6('0x19')](_0x51efe1[_0x43f6('0x1a')](0x0,0x3),0x14,'*');}exports['index']=function(_0xe70aca,_0x3dbaf1){var _0x80b0d3={},_0x488ab4={},_0x2f7c29={'count':0x0,'rows':[]};var _0x59a26e=_[_0x43f6('0x1b')](db['CloudProvider'][_0x43f6('0x1c')],function(_0x4f8b90){return{'name':_0x4f8b90[_0x43f6('0x1d')],'type':_0x4f8b90[_0x43f6('0x1e')]['key']};});_0x488ab4['model']=_[_0x43f6('0x1b')](_0x59a26e,_0x43f6('0x17'));_0x488ab4[_0x43f6('0x1f')]=_[_0x43f6('0x20')](_0xe70aca[_0x43f6('0x1f')]);_0x488ab4[_0x43f6('0x21')]=_[_0x43f6('0x22')](_0x488ab4[_0x43f6('0x23')],_0x488ab4['query']);_0x80b0d3[_0x43f6('0x24')]=_[_0x43f6('0x22')](_0x488ab4[_0x43f6('0x23')],qs[_0x43f6('0x25')](_0xe70aca['query']['fields']));_0x80b0d3[_0x43f6('0x24')]=_0x80b0d3['attributes'][_0x43f6('0x26')]?_0x80b0d3['attributes']:_0x488ab4[_0x43f6('0x23')];if(!_0xe70aca[_0x43f6('0x1f')]['hasOwnProperty'](_0x43f6('0x27'))){_0x80b0d3['limit']=qs['limit'](_0xe70aca[_0x43f6('0x1f')][_0x43f6('0xd')]);_0x80b0d3[_0x43f6('0xe')]=qs[_0x43f6('0xe')](_0xe70aca[_0x43f6('0x1f')][_0x43f6('0xe')]);}_0x80b0d3[_0x43f6('0x28')]=qs[_0x43f6('0x29')](_0xe70aca[_0x43f6('0x1f')]['sort']);_0x80b0d3['where']=qs[_0x43f6('0x21')](_[_0x43f6('0x2a')](_0xe70aca[_0x43f6('0x1f')],_0x488ab4[_0x43f6('0x21')]),_0x59a26e);if(_0xe70aca['query'][_0x43f6('0x2b')]){_0x80b0d3[_0x43f6('0x2c')]=_[_0x43f6('0x2d')](_0x80b0d3[_0x43f6('0x2c')],{'$or':_[_0x43f6('0x1b')](_0x59a26e,function(_0x60787){if(_0x60787[_0x43f6('0x1e')]!=='VIRTUAL'){var _0x29a3bc={};_0x29a3bc[_0x60787[_0x43f6('0x17')]]={'$like':'%'+_0xe70aca[_0x43f6('0x1f')]['filter']+'%'};return _0x29a3bc;}})});}_0x80b0d3=_[_0x43f6('0x2d')]({},_0x80b0d3,_0xe70aca[_0x43f6('0x2e')]);var _0x352157={'where':_0x80b0d3[_0x43f6('0x2c')]};return db[_0x43f6('0x2f')][_0x43f6('0xf')](_0x352157)['then'](function(_0x39a63d){_0x2f7c29['count']=_0x39a63d;if(_0xe70aca[_0x43f6('0x1f')][_0x43f6('0x30')]){_0x80b0d3['include']=[{'all':!![]}];}return db[_0x43f6('0x2f')][_0x43f6('0x31')](_0x80b0d3);})[_0x43f6('0x13')](function(_0x2cd58a){_0x2f7c29['rows']=_['map'](_0x2cd58a,function(_0x306cef){if(_0x306cef['service']==='MicrosoftAzure'){var _0x35d604=encryptor['decryptString'](_0x306cef[_0x43f6('0x32')]);_0x306cef[_0x43f6('0x32')]=maskClientSecret(_0x35d604);}return _0x306cef;});return _0x2f7c29;})[_0x43f6('0x13')](respondWithFilteredResult(_0x3dbaf1,_0x80b0d3))[_0x43f6('0x33')](handleError(_0x3dbaf1,null));};exports['show']=function(_0x35d8db,_0x32d675){var _0x230b7a={'raw':!![],'where':{'id':_0x35d8db[_0x43f6('0x34')]['id']}},_0xff6358={};_0xff6358[_0x43f6('0x23')]=_[_0x43f6('0x20')](db[_0x43f6('0x2f')][_0x43f6('0x1c')]);_0xff6358['query']=_['keys'](_0x35d8db[_0x43f6('0x1f')]);_0xff6358[_0x43f6('0x21')]=_[_0x43f6('0x22')](_0xff6358[_0x43f6('0x23')],_0xff6358[_0x43f6('0x1f')]);_0x230b7a[_0x43f6('0x24')]=_[_0x43f6('0x22')](_0xff6358[_0x43f6('0x23')],qs['fields'](_0x35d8db[_0x43f6('0x1f')][_0x43f6('0x25')]));_0x230b7a[_0x43f6('0x24')]=_0x230b7a[_0x43f6('0x24')][_0x43f6('0x26')]?_0x230b7a[_0x43f6('0x24')]:_0xff6358[_0x43f6('0x23')];if(_0x35d8db[_0x43f6('0x1f')]['includeAll']){_0x230b7a[_0x43f6('0x35')]=[{'all':!![]}];}_0x230b7a=_['merge']({},_0x230b7a,_0x35d8db[_0x43f6('0x2e')]);return db[_0x43f6('0x2f')][_0x43f6('0x36')](_0x230b7a)[_0x43f6('0x13')](handleEntityNotFound(_0x32d675,null))[_0x43f6('0x13')](function(_0xa19b29){if(_0xa19b29['service']===_0x43f6('0x37')){var _0x35d050=encryptor[_0x43f6('0x38')](_0xa19b29[_0x43f6('0x32')]);_0xa19b29[_0x43f6('0x32')]=maskClientSecret(_0x35d050);}return _0xa19b29;})[_0x43f6('0x13')](respondWithResult(_0x32d675,null))[_0x43f6('0x33')](handleError(_0x32d675,null));};exports[_0x43f6('0x39')]=function(_0x36dbdf,_0x509705){if(!_0x36dbdf[_0x43f6('0x3a')]['name'])throw new Error('Name\x20parameter\x20not\x20specified');if(!_0x36dbdf[_0x43f6('0x3a')]['service'])throw new Error('Service\x20parameter\x20not\x20specified');var _0x7a7584=db[_0x43f6('0x2f')][_0x43f6('0x1c')][_0x43f6('0x3b')]['values'];if(!_0x7a7584[_0x43f6('0x3c')](_0x36dbdf['body']['service']))throw new Error(_0x43f6('0x3d')+_0x7a7584[_0x43f6('0x3e')](',\x20'));if(_0x36dbdf[_0x43f6('0x3a')][_0x43f6('0x3b')]===_0x43f6('0x37')&&_0x36dbdf[_0x43f6('0x3a')][_0x43f6('0x32')]){_0x36dbdf[_0x43f6('0x3a')][_0x43f6('0x32')]=encryptor[_0x43f6('0x3f')](_0x36dbdf[_0x43f6('0x3a')][_0x43f6('0x32')]);}return db[_0x43f6('0x2f')][_0x43f6('0x39')](_0x36dbdf[_0x43f6('0x3a')],{})[_0x43f6('0x13')](respondWithResult(_0x509705,0xc9))[_0x43f6('0x33')](handleError(_0x509705,null));};exports[_0x43f6('0x12')]=function(_0x48b7eb,_0x152113){if(_0x48b7eb['body']['id']){delete _0x48b7eb[_0x43f6('0x3a')]['id'];}return db[_0x43f6('0x2f')][_0x43f6('0x36')]({'where':{'id':_0x48b7eb['params']['id']}})[_0x43f6('0x13')](handleEntityNotFound(_0x152113,null))['then'](function(_0x222a93){if(_0x222a93[_0x43f6('0x3b')]===_0x43f6('0x37')&&_0x48b7eb[_0x43f6('0x3a')]['data3']){_0x48b7eb[_0x43f6('0x3a')]['data3']=encryptor[_0x43f6('0x3f')](_0x48b7eb[_0x43f6('0x3a')][_0x43f6('0x32')]);}return _0x222a93;})[_0x43f6('0x13')](saveUpdates(_0x48b7eb[_0x43f6('0x3a')],null))[_0x43f6('0x13')](respondWithResult(_0x152113,null))[_0x43f6('0x33')](handleError(_0x152113,null));};exports[_0x43f6('0x14')]=function(_0x4b0b77,_0x41b459){return db[_0x43f6('0x2f')][_0x43f6('0x36')]({'where':{'id':_0x4b0b77[_0x43f6('0x34')]['id']}})['then'](handleEntityNotFound(_0x41b459,null))[_0x43f6('0x13')](removeEntity(_0x41b459,null))['catch'](handleError(_0x41b459,null));};exports[_0x43f6('0x40')]=function(_0x521ad7,_0x319f7b){return db[_0x43f6('0x2f')][_0x43f6('0x41')]({'where':{'id':_0x521ad7[_0x43f6('0x34')]['id']},'raw':!![]})[_0x43f6('0x13')](function(_0x338c5d){if(!_0x338c5d)return _0x319f7b[_0x43f6('0xa')](0x194);return{'url':oauth[_0x43f6('0x42')](_0x338c5d,_0x521ad7[_0x43f6('0x43')]['id'])};})[_0x43f6('0x13')](respondWithResult(_0x319f7b,null))['catch'](handleError(_0x319f7b,null));};exports[_0x43f6('0x44')]=function(_0x2dcfe1,_0x22a550){var _0x4c7ecd=_0x2dcfe1['body'];var _0x16175d;var _0x3360fa;if(_0x4c7ecd[_0x43f6('0x15')])throw _0x4c7ecd;redis[_0x43f6('0x45')](_0x4c7ecd[_0x43f6('0x46')])['then'](function(_0x5ab442){if(!_0x5ab442)throw new Error('Invalid\x20state\x20parameter');_0x16175d=JSON['parse'](_0x5ab442);var _0x4b6989=Buffer[_0x43f6('0x47')](_0x4c7ecd[_0x43f6('0x46')],_0x43f6('0x48'))['toString'](_0x43f6('0x49'));_0x3360fa=JSON[_0x43f6('0x4a')](_0x4b6989);if(!oauth[_0x43f6('0x4b')](_0x4c7ecd[_0x43f6('0x4c')],_0x16175d[_0x43f6('0x4d')]))throw new Error('Unable\x20to\x20validate\x20id_token');redis['del'](_0x4c7ecd[_0x43f6('0x46')]);return oauth[_0x43f6('0x4e')](_0x4c7ecd[_0x43f6('0x4f')],_0x16175d);})[_0x43f6('0x13')](function(_0xfa15db){_0x16175d[_0x43f6('0x50')]=_0xfa15db[_0x43f6('0x51')];_0x16175d['data6']=_0xfa15db['refresh_token'];return db[_0x43f6('0x2f')][_0x43f6('0x12')]({'data5':_0x16175d[_0x43f6('0x50')],'data6':_0x16175d[_0x43f6('0x52')]},{'where':{'id':_0x16175d['id']}});})['then'](function(){oauth[_0x43f6('0x53')](_0x16175d);socket[_0x43f6('0x54')]('microsoftAuthorization:success',{'id':_0x3360fa['id']});return;})[_0x43f6('0x13')](respondWithStatusCode(_0x22a550,null))[_0x43f6('0x33')](function(_0x137ed7){if(_0x3360fa){socket['emit']('microsoftAuthorization:error',{'id':_0x3360fa['id']});}if(!_0x16175d){logger[_0x43f6('0x15')](_0x43f6('0x55'),_0x137ed7);return _0x22a550[_0x43f6('0xb')](0x1f4)[_0x43f6('0x18')](_0x137ed7[_0x43f6('0x56')]);}logger[_0x43f6('0x15')](_0x43f6('0x57'),_0x16175d['id'],JSON[_0x43f6('0x58')](_0x137ed7));});};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.model.js b/server/api/cloudProvider/cloudProvider.model.js
index b8b9e95..7312bf6 100644
--- a/server/api/cloudProvider/cloudProvider.model.js
+++ b/server/api/cloudProvider/cloudProvider.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x95f5=['api','request-promise','path','../../config/environment','./cloudProvider.attributes','define','CloudProvider','cloud_providers','lodash','util','../../config/logger'];(function(_0x20c2d2,_0x2c31a0){var _0x10f4b3=function(_0x42314e){while(--_0x42314e){_0x20c2d2['push'](_0x20c2d2['shift']());}};_0x10f4b3(++_0x2c31a0);}(_0x95f5,0x1c0));var _0x595f=function(_0x4bf27a,_0x435cc2){_0x4bf27a=_0x4bf27a-0x0;var _0x22a0ba=_0x95f5[_0x4bf27a];return _0x22a0ba;};'use strict';var _=require(_0x595f('0x0'));var util=require(_0x595f('0x1'));var logger=require(_0x595f('0x2'))(_0x595f('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x595f('0x4'));var fs=require('fs');var path=require(_0x595f('0x5'));var rimraf=require('rimraf');var config=require(_0x595f('0x6'));var attributes=require(_0x595f('0x7'));module['exports']=function(_0x2a1d5c,_0x4f65d3){return _0x2a1d5c[_0x595f('0x8')](_0x595f('0x9'),attributes,{'tableName':_0x595f('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x5ee9=['cloud_providers','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./cloudProvider.attributes','exports'];(function(_0x38df93,_0x1745db){var _0x3b4abd=function(_0x3b2e22){while(--_0x3b2e22){_0x38df93['push'](_0x38df93['shift']());}};_0x3b4abd(++_0x1745db);}(_0x5ee9,0x187));var _0x95ee=function(_0x5f0089,_0x227e2c){_0x5f0089=_0x5f0089-0x0;var _0x193892=_0x5ee9[_0x5f0089];return _0x193892;};'use strict';var _=require(_0x95ee('0x0'));var util=require(_0x95ee('0x1'));var logger=require(_0x95ee('0x2'))(_0x95ee('0x3'));var moment=require(_0x95ee('0x4'));var BPromise=require(_0x95ee('0x5'));var rp=require(_0x95ee('0x6'));var fs=require('fs');var path=require(_0x95ee('0x7'));var rimraf=require(_0x95ee('0x8'));var config=require(_0x95ee('0x9'));var attributes=require(_0x95ee('0xa'));module[_0x95ee('0xb')]=function(_0x24065b,_0x1b833f){return _0x24065b['define']('CloudProvider',attributes,{'tableName':_0x95ee('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.oauth.js b/server/api/cloudProvider/cloudProvider.oauth.js
index 4e9b367..c53d8b6 100644
--- a/server/api/cloudProvider/cloudProvider.oauth.js
+++ b/server/api/cloudProvider/cloudProvider.oauth.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0919=['offline_access','https://outlook.office.com/POP.AccessAsUser.All','/token','type','Dynamics365','push','join','Outlook365','https://outlook.office365.com/IMAP.AccessAsUser.All','data7','/.default','{TENANT_ID}','data2','code','from','stringify','toString','base64','randomBytes','hex','client_id','data1','response_type','redirect_uri','data4','form_post','state','nonce','prompt','value','oauth2Claims','oauth2/','set','decode','payload','iss','issuer','audience','isAfter','unix','exp','then','CloudProvider','findOne','refresh_token','data6','decryptString','data3','replace','update','data5','error','Failed\x20to\x20refresh\x20access\x20token\x20for\x20cloud\x20provider\x20#%s,\x20-\x20err:%s','POST','intervals','map','all','catch','inspect','[CLOUD_PROVIDER]\x20Error\x20while\x20refreshing\x20the\x20tokens\x20after\x20service\x20restart\x20error:%s','exports','lodash','crypto','ioredis','request-promise','util','../../components/encryptor','../../config/environment','../../config/logger','api','defaults','redis','localhost','openid','profile','email'];(function(_0x522fb1,_0x2981c5){var _0x32972a=function(_0x3e26c8){while(--_0x3e26c8){_0x522fb1['push'](_0x522fb1['shift']());}};_0x32972a(++_0x2981c5);}(_0x0919,0x16d));var _0x9091=function(_0x39665a,_0xc729df){_0x39665a=_0x39665a-0x0;var _0x173185=_0x0919[_0x39665a];return _0x173185;};'use strict';var _=require(_0x9091('0x0'));var crypto=require(_0x9091('0x1'));var jwt=require('jsonwebtoken');var moment=require('moment');var Redis=require(_0x9091('0x2'));var rp=require(_0x9091('0x3'));var util=require(_0x9091('0x4'));var encryptor=require(_0x9091('0x5'));var config=require(_0x9091('0x6'));var logger=require(_0x9091('0x7'))(_0x9091('0x8'));var schedule=require('../../config/schedule/cloud-provider');var db=require('../../mysqldb')['db'];config['redis']=_[_0x9091('0x9')](config[_0x9091('0xa')],{'host':_0x9091('0xb'),'port':0x18eb});var redis=new Redis(config[_0x9091('0xa')]);var MICROSOFT_AUTH_URL='https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0';var AZURE_AUTH_SCOPES={'Outlook365':[_0x9091('0xc'),_0x9091('0xd'),_0x9091('0xe'),_0x9091('0xf'),'https://outlook.office365.com/IMAP.AccessAsUser.All',_0x9091('0x10'),'https://outlook.office.com/SMTP.Send'],'Dynamics365':[_0x9091('0xc'),_0x9091('0xf')]};var MICROSOFT_AUTH_ENDPOINT='/authorize';var MICROSOFT_TOKEN_ENDPOINT=_0x9091('0x11');var OAUTH_REFRESH_INTERVAL=0xfa;function getAuthorizationScopes(_0x108f9c){var _0x239680=_['map'](AZURE_AUTH_SCOPES[_0x108f9c[_0x9091('0x12')]]);if(_0x108f9c[_0x9091('0x12')]===_0x9091('0x13'))_0x239680[_0x9091('0x14')](_0x108f9c['data7']+'/.default');return _0x239680[_0x9091('0x15')]('\x20');}function getAccessTokenScope(_0x42ed78){if(_0x42ed78['type']===_0x9091('0x16'))return _0x9091('0x17');if(_0x42ed78[_0x9091('0x12')]===_0x9091('0x13'))return _0x42ed78[_0x9091('0x18')]+_0x9091('0x19');}function generateMicrosoftAuthorizationUrl(_0x7a1f6d,_0x534b07){var _0x3755d6=MICROSOFT_AUTH_URL['replace'](_0x9091('0x1a'),_0x7a1f6d[_0x9091('0x1b')]);var _0x5cec0e=[_0x9091('0x1c'),'id_token'];var _0x592f3a=Buffer[_0x9091('0x1d')](JSON[_0x9091('0x1e')]({'id':_0x534b07}))[_0x9091('0x1f')](_0x9091('0x20'));var _0x4c1c06=crypto[_0x9091('0x21')](0x10)[_0x9091('0x1f')](_0x9091('0x22'));var _0x223d57=getAuthorizationScopes(_0x7a1f6d);var _0x245e84=[{'key':_0x9091('0x23'),'value':_0x7a1f6d[_0x9091('0x24')]},{'key':_0x9091('0x25'),'value':encodeURIComponent(_0x5cec0e[_0x9091('0x15')]('\x20'))},{'key':_0x9091('0x26'),'value':_0x7a1f6d[_0x9091('0x27')]},{'key':'response_mode','value':_0x9091('0x28')},{'key':'scope','value':encodeURIComponent(_0x223d57)},{'key':_0x9091('0x29'),'value':_0x592f3a},{'key':_0x9091('0x2a'),'value':_0x4c1c06},{'key':_0x9091('0x2b'),'value':'login'}];var _0x36564c=_0x3755d6+MICROSOFT_AUTH_ENDPOINT+'?'+_['map'](_0x245e84,function(_0x24b90b){return _0x24b90b['key']+'='+_0x24b90b[_0x9091('0x2c')];})[_0x9091('0x15')]('&');_0x7a1f6d[_0x9091('0x2d')]={'issuer':_0x3755d6['replace'](_0x9091('0x2e'),''),'audience':_0x7a1f6d[_0x9091('0x24')],'state':_0x592f3a,'nonce':_0x4c1c06};redis[_0x9091('0x2f')](_0x592f3a,JSON['stringify'](_0x7a1f6d));return _0x36564c;}function isValidIdToken(_0x1efef3,_0x562979){try{var _0x5a4f06=jwt[_0x9091('0x30')](_0x1efef3,{'complete':!![]});var _0x9814=_0x5a4f06[_0x9091('0x31')];if(_0x9814[_0x9091('0x32')]!==_0x562979[_0x9091('0x33')])return![];if(_0x9814['aud']!==_0x562979[_0x9091('0x34')])return![];if(_0x9814['nonce']!==_0x562979[_0x9091('0x2a')])return![];if(moment()[_0x9091('0x35')](moment[_0x9091('0x36')](_0x9814[_0x9091('0x37')])))return![];return!![];}catch(_0x2923e4){throw _0x2923e4;}}function refreshOauth2MicrosoftAccessToken(_0x1e315f){return Promise['resolve']()[_0x9091('0x38')](function(){if(_0x1e315f['data3'])return _0x1e315f;return db[_0x9091('0x39')][_0x9091('0x3a')]({'where':{'id':_0x1e315f['id']},'raw':!![]});})[_0x9091('0x38')](function(_0x20b071){var _0x1d1c83={'grant_type':_0x9091('0x3b'),'refresh_token':_0x20b071[_0x9091('0x3c')],'scope':getAccessTokenScope(_0x20b071),'redirect_uri':_0x20b071[_0x9091('0x27')],'client_id':_0x20b071['data1'],'client_secret':encryptor[_0x9091('0x3d')](_0x20b071[_0x9091('0x3e')])};var _0x244f33={'method':'POST','uri':MICROSOFT_AUTH_URL[_0x9091('0x3f')](_0x9091('0x1a'),_0x20b071[_0x9091('0x1b')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x1d1c83,'json':!![]};return rp(_0x244f33);})[_0x9091('0x38')](function(_0x26d399){_0x1e315f['data5']=_0x26d399['access_token'];_0x1e315f['data6']=_0x26d399[_0x9091('0x3b')];return db[_0x9091('0x39')][_0x9091('0x40')]({'data5':_0x1e315f[_0x9091('0x41')],'data6':_0x1e315f[_0x9091('0x3c')]},{'where':{'id':_0x1e315f['id']}});})[_0x9091('0x38')](function(){return _0x1e315f;})['catch'](function(_0x2d9683){logger[_0x9091('0x42')](_0x9091('0x43'),_0x1e315f['id'],_0x2d9683);});}function getOauth2MicrosoftAccessToken(_0x1ce5cb,_0x64f828){var _0x48e510={'grant_type':'authorization_code','code':_0x1ce5cb,'scope':getAccessTokenScope(_0x64f828),'redirect_uri':_0x64f828[_0x9091('0x27')],'client_id':_0x64f828[_0x9091('0x24')],'client_secret':encryptor[_0x9091('0x3d')](_0x64f828[_0x9091('0x3e')])};var _0x573d2d={'method':_0x9091('0x44'),'uri':MICROSOFT_AUTH_URL['replace'](_0x9091('0x1a'),_0x64f828[_0x9091('0x1b')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x48e510,'json':!![]};return rp(_0x573d2d);}function startRefreshInterval(_0xe226fa){var _0x459834=schedule[_0x9091('0x45')];if(_0x459834[_0xe226fa['id']])clearInterval(_0x459834[_0xe226fa['id']]);_0x459834[_0xe226fa['id']]=setInterval(refreshOauth2MicrosoftAccessToken['bind'](this,{'id':_0xe226fa['id']}),OAUTH_REFRESH_INTERVAL*0x3e8);schedule['intervals']=_0x459834;}function startAllRefreshIntervals(){return db['CloudProvider']['findAll']({'where':{'data6':{'$ne':null}},'raw':!![]})[_0x9091('0x38')](function(_0x401862){var _0x4dbdba=_0x401862[_0x9091('0x46')](function(_0x154267){return refreshOauth2MicrosoftAccessToken(_0x154267)['then'](function(_0x4e070a){startRefreshInterval(_0x4e070a);});});return Promise[_0x9091('0x47')](_0x4dbdba);})[_0x9091('0x48')](function(_0x401733){var _0x58b5dd=_0x401733?util[_0x9091('0x49')](_0x401733,{'showHidden':![],'depth':null}):'';logger['error'](_0x9091('0x4a'),_0x58b5dd);});}module[_0x9091('0x4b')]={'generateMicrosoftAuthorizationUrl':generateMicrosoftAuthorizationUrl,'getOauth2MicrosoftAccessToken':getOauth2MicrosoftAccessToken,'isValidIdToken':isValidIdToken,'startAllRefreshIntervals':startAllRefreshIntervals,'refreshOauth2MicrosoftAccessToken':refreshOauth2MicrosoftAccessToken,'startRefreshInterval':startRefreshInterval};
\ No newline at end of file
+var _0xebf3=['oauth2Claims','oauth2/','set','payload','issuer','audience','isAfter','unix','exp','resolve','then','data3','CloudProvider','findOne','refresh_token','data6','decryptString','POST','data5','access_token','update','error','Failed\x20to\x20refresh\x20access\x20token\x20for\x20cloud\x20provider\x20#%s,\x20-\x20err:%s','authorization_code','intervals','bind','findAll','all','catch','inspect','exports','lodash','crypto','util','../../components/encryptor','../../config/environment','../../config/logger','../../config/schedule/cloud-provider','../../mysqldb','redis','defaults','openid','profile','email','offline_access','https://outlook.office.com/SMTP.Send','/token','map','type','Dynamics365','push','/.default','join','Outlook365','data7','replace','{TENANT_ID}','data2','code','id_token','stringify','randomBytes','toString','hex','client_id','data1','response_type','redirect_uri','data4','scope','state','nonce','login','key'];(function(_0x3e5c74,_0x95bce8){var _0x5a45ad=function(_0x18b939){while(--_0x18b939){_0x3e5c74['push'](_0x3e5c74['shift']());}};_0x5a45ad(++_0x95bce8);}(_0xebf3,0x147));var _0x3ebf=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xebf3[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x3ebf('0x0'));var crypto=require(_0x3ebf('0x1'));var jwt=require('jsonwebtoken');var moment=require('moment');var Redis=require('ioredis');var rp=require('request-promise');var util=require(_0x3ebf('0x2'));var encryptor=require(_0x3ebf('0x3'));var config=require(_0x3ebf('0x4'));var logger=require(_0x3ebf('0x5'))('api');var schedule=require(_0x3ebf('0x6'));var db=require(_0x3ebf('0x7'))['db'];config[_0x3ebf('0x8')]=_[_0x3ebf('0x9')](config[_0x3ebf('0x8')],{'host':'localhost','port':0x18eb});var redis=new Redis(config[_0x3ebf('0x8')]);var MICROSOFT_AUTH_URL='https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0';var AZURE_AUTH_SCOPES={'Outlook365':[_0x3ebf('0xa'),_0x3ebf('0xb'),_0x3ebf('0xc'),_0x3ebf('0xd'),'https://outlook.office365.com/IMAP.AccessAsUser.All','https://outlook.office.com/POP.AccessAsUser.All',_0x3ebf('0xe')],'Dynamics365':[_0x3ebf('0xa'),_0x3ebf('0xd')]};var MICROSOFT_AUTH_ENDPOINT='/authorize';var MICROSOFT_TOKEN_ENDPOINT=_0x3ebf('0xf');var OAUTH_REFRESH_INTERVAL=0xfa;function getAuthorizationScopes(_0x16b297){var _0x168eba=_[_0x3ebf('0x10')](AZURE_AUTH_SCOPES[_0x16b297[_0x3ebf('0x11')]]);if(_0x16b297[_0x3ebf('0x11')]===_0x3ebf('0x12'))_0x168eba[_0x3ebf('0x13')](_0x16b297['data7']+_0x3ebf('0x14'));return _0x168eba[_0x3ebf('0x15')]('\x20');}function getAccessTokenScope(_0x444ea1){if(_0x444ea1[_0x3ebf('0x11')]===_0x3ebf('0x16'))return'https://outlook.office365.com/IMAP.AccessAsUser.All';if(_0x444ea1[_0x3ebf('0x11')]==='Dynamics365')return _0x444ea1[_0x3ebf('0x17')]+_0x3ebf('0x14');}function generateMicrosoftAuthorizationUrl(_0x4b9530,_0x477e31){var _0x35fffd=MICROSOFT_AUTH_URL[_0x3ebf('0x18')](_0x3ebf('0x19'),_0x4b9530[_0x3ebf('0x1a')]);var _0xf1f3f1=[_0x3ebf('0x1b'),_0x3ebf('0x1c')];var _0x33f1b4=Buffer['from'](JSON[_0x3ebf('0x1d')]({'id':_0x477e31}))['toString']('base64');var _0x1cee42=crypto[_0x3ebf('0x1e')](0x10)[_0x3ebf('0x1f')](_0x3ebf('0x20'));var _0xaaf544=getAuthorizationScopes(_0x4b9530);var _0x352562=[{'key':_0x3ebf('0x21'),'value':_0x4b9530[_0x3ebf('0x22')]},{'key':_0x3ebf('0x23'),'value':encodeURIComponent(_0xf1f3f1[_0x3ebf('0x15')]('\x20'))},{'key':_0x3ebf('0x24'),'value':_0x4b9530[_0x3ebf('0x25')]},{'key':'response_mode','value':'form_post'},{'key':_0x3ebf('0x26'),'value':encodeURIComponent(_0xaaf544)},{'key':_0x3ebf('0x27'),'value':_0x33f1b4},{'key':_0x3ebf('0x28'),'value':_0x1cee42},{'key':'prompt','value':_0x3ebf('0x29')}];var _0x2d2244=_0x35fffd+MICROSOFT_AUTH_ENDPOINT+'?'+_[_0x3ebf('0x10')](_0x352562,function(_0x5491bd){return _0x5491bd[_0x3ebf('0x2a')]+'='+_0x5491bd['value'];})['join']('&');_0x4b9530[_0x3ebf('0x2b')]={'issuer':_0x35fffd[_0x3ebf('0x18')](_0x3ebf('0x2c'),''),'audience':_0x4b9530['data1'],'state':_0x33f1b4,'nonce':_0x1cee42};redis[_0x3ebf('0x2d')](_0x33f1b4,JSON[_0x3ebf('0x1d')](_0x4b9530));return _0x2d2244;}function isValidIdToken(_0x7b7a16,_0x3d79d4){try{var _0x4c2f99=jwt['decode'](_0x7b7a16,{'complete':!![]});var _0x358640=_0x4c2f99[_0x3ebf('0x2e')];if(_0x358640['iss']!==_0x3d79d4[_0x3ebf('0x2f')])return![];if(_0x358640['aud']!==_0x3d79d4[_0x3ebf('0x30')])return![];if(_0x358640[_0x3ebf('0x28')]!==_0x3d79d4['nonce'])return![];if(moment()[_0x3ebf('0x31')](moment[_0x3ebf('0x32')](_0x358640[_0x3ebf('0x33')])))return![];return!![];}catch(_0x43971e){throw _0x43971e;}}function refreshOauth2MicrosoftAccessToken(_0x217da5){return Promise[_0x3ebf('0x34')]()[_0x3ebf('0x35')](function(){if(_0x217da5[_0x3ebf('0x36')])return _0x217da5;return db[_0x3ebf('0x37')][_0x3ebf('0x38')]({'where':{'id':_0x217da5['id']},'raw':!![]});})[_0x3ebf('0x35')](function(_0x5180b0){var _0x29a90d={'grant_type':_0x3ebf('0x39'),'refresh_token':_0x5180b0[_0x3ebf('0x3a')],'scope':getAccessTokenScope(_0x5180b0),'redirect_uri':_0x5180b0[_0x3ebf('0x25')],'client_id':_0x5180b0[_0x3ebf('0x22')],'client_secret':encryptor[_0x3ebf('0x3b')](_0x5180b0['data3'])};var _0xd4bc19={'method':_0x3ebf('0x3c'),'uri':MICROSOFT_AUTH_URL['replace'](_0x3ebf('0x19'),_0x5180b0[_0x3ebf('0x1a')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x29a90d,'json':!![]};return rp(_0xd4bc19);})[_0x3ebf('0x35')](function(_0x31e1de){_0x217da5[_0x3ebf('0x3d')]=_0x31e1de[_0x3ebf('0x3e')];_0x217da5[_0x3ebf('0x3a')]=_0x31e1de[_0x3ebf('0x39')];return db['CloudProvider'][_0x3ebf('0x3f')]({'data5':_0x217da5[_0x3ebf('0x3d')],'data6':_0x217da5[_0x3ebf('0x3a')]},{'where':{'id':_0x217da5['id']}});})['then'](function(){return _0x217da5;})['catch'](function(_0x48cfdd){logger[_0x3ebf('0x40')](_0x3ebf('0x41'),_0x217da5['id'],_0x48cfdd);});}function getOauth2MicrosoftAccessToken(_0x4200b3,_0x504718){var _0x5d9bd6={'grant_type':_0x3ebf('0x42'),'code':_0x4200b3,'scope':getAccessTokenScope(_0x504718),'redirect_uri':_0x504718['data4'],'client_id':_0x504718[_0x3ebf('0x22')],'client_secret':encryptor[_0x3ebf('0x3b')](_0x504718['data3'])};var _0x31f9ef={'method':_0x3ebf('0x3c'),'uri':MICROSOFT_AUTH_URL['replace'](_0x3ebf('0x19'),_0x504718[_0x3ebf('0x1a')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x5d9bd6,'json':!![]};return rp(_0x31f9ef);}function startRefreshInterval(_0x43cb57){var _0x12efc4=schedule[_0x3ebf('0x43')];if(_0x12efc4[_0x43cb57['id']])clearInterval(_0x12efc4[_0x43cb57['id']]);_0x12efc4[_0x43cb57['id']]=setInterval(refreshOauth2MicrosoftAccessToken[_0x3ebf('0x44')](this,{'id':_0x43cb57['id']}),OAUTH_REFRESH_INTERVAL*0x3e8);schedule['intervals']=_0x12efc4;}function startAllRefreshIntervals(){return db['CloudProvider'][_0x3ebf('0x45')]({'where':{'data6':{'$ne':null}},'raw':!![]})[_0x3ebf('0x35')](function(_0x48221d){var _0x3991fc=_0x48221d[_0x3ebf('0x10')](function(_0x220880){return refreshOauth2MicrosoftAccessToken(_0x220880)['then'](function(_0x5358d1){startRefreshInterval(_0x5358d1);});});return Promise[_0x3ebf('0x46')](_0x3991fc);})[_0x3ebf('0x47')](function(_0x27a40d){var _0x452c4f=_0x27a40d?util[_0x3ebf('0x48')](_0x27a40d,{'showHidden':![],'depth':null}):'';logger[_0x3ebf('0x40')]('[CLOUD_PROVIDER]\x20Error\x20while\x20refreshing\x20the\x20tokens\x20after\x20service\x20restart\x20error:%s',_0x452c4f);});}module[_0x3ebf('0x49')]={'generateMicrosoftAuthorizationUrl':generateMicrosoftAuthorizationUrl,'getOauth2MicrosoftAccessToken':getOauth2MicrosoftAccessToken,'isValidIdToken':isValidIdToken,'startAllRefreshIntervals':startAllRefreshIntervals,'refreshOauth2MicrosoftAccessToken':refreshOauth2MicrosoftAccessToken,'startRefreshInterval':startRefreshInterval};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.rpc.js b/server/api/cloudProvider/cloudProvider.rpc.js
index a11154d..31e1178 100644
--- a/server/api/cloudProvider/cloudProvider.rpc.js
+++ b/server/api/cloudProvider/cloudProvider.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfe39=['../../config/environment','jayson/promise','client','http','request','then','info','CloudProvider,\x20%s,\x20%s','CloudProvider,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','lodash','util','bluebird','../../mysqldb','../../config/utils'];(function(_0x552c3d,_0x3ba8d1){var _0x107aa7=function(_0x134dcf){while(--_0x134dcf){_0x552c3d['push'](_0x552c3d['shift']());}};_0x107aa7(++_0x3ba8d1);}(_0xfe39,0x1b3));var _0x9fe3=function(_0x29d94e,_0xf386d6){_0x29d94e=_0x29d94e-0x0;var _0x106237=_0xfe39[_0x29d94e];return _0x106237;};'use strict';var _=require(_0x9fe3('0x0'));var util=require(_0x9fe3('0x1'));var moment=require('moment');var BPromise=require(_0x9fe3('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9fe3('0x3'))['db'];var utils=require(_0x9fe3('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0x9fe3('0x5'));var jayson=require(_0x9fe3('0x6'));var client=jayson[_0x9fe3('0x7')][_0x9fe3('0x8')]({'port':0x232a});function respondWithRpcPromise(_0xc469b7,_0x4183ce,_0x25868f){return new BPromise(function(_0x5a3bd6,_0x211eb2){return client[_0x9fe3('0x9')](_0xc469b7,_0x25868f)[_0x9fe3('0xa')](function(_0x35c391){logger[_0x9fe3('0xb')](_0x9fe3('0xc'),_0x4183ce,'request\x20sent');logger['debug'](_0x9fe3('0xd'),_0x4183ce,_0x9fe3('0xe'),JSON['stringify'](_0x35c391));if(_0x35c391[_0x9fe3('0xf')]){if(_0x35c391[_0x9fe3('0xf')][_0x9fe3('0x10')]===0x1f4){logger[_0x9fe3('0xf')]('CloudProvider,\x20%s,\x20%s',_0x4183ce,_0x35c391[_0x9fe3('0xf')][_0x9fe3('0x11')]);return _0x211eb2(_0x35c391[_0x9fe3('0xf')][_0x9fe3('0x11')]);}logger['error']('CloudProvider,\x20%s,\x20%s',_0x4183ce,_0x35c391[_0x9fe3('0xf')][_0x9fe3('0x11')]);return _0x5a3bd6(_0x35c391[_0x9fe3('0xf')][_0x9fe3('0x11')]);}else{logger[_0x9fe3('0xb')]('CloudProvider,\x20%s,\x20%s',_0x4183ce,'request\x20sent');_0x5a3bd6(_0x35c391[_0x9fe3('0x12')][_0x9fe3('0x11')]);}})[_0x9fe3('0x13')](function(_0x2d28d4){logger['error'](_0x9fe3('0xc'),_0x4183ce,_0x2d28d4);_0x211eb2(_0x2d28d4);});});}
\ No newline at end of file
+var _0x762e=['CloudProvider,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','bluebird','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','info','CloudProvider,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x33bf36,_0xfb40b6){var _0x1921a9=function(_0x1e1009){while(--_0x1e1009){_0x33bf36['push'](_0x33bf36['shift']());}};_0x1921a9(++_0xfb40b6);}(_0x762e,0xea));var _0xe762=function(_0x2caa50,_0x2c936c){_0x2caa50=_0x2caa50-0x0;var _0x47a23f=_0x762e[_0x2caa50];return _0x47a23f;};'use strict';var _=require(_0xe762('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xe762('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe762('0x2'))['db'];var utils=require(_0xe762('0x3'));var logger=require(_0xe762('0x4'))('rpc');var config=require(_0xe762('0x5'));var jayson=require(_0xe762('0x6'));var client=jayson[_0xe762('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1f4726,_0x7a1740,_0x2511ad){return new BPromise(function(_0xf20548,_0x26a4fc){return client[_0xe762('0x8')](_0x1f4726,_0x2511ad)['then'](function(_0x50dd96){logger[_0xe762('0x9')](_0xe762('0xa'),_0x7a1740,_0xe762('0xb'));logger[_0xe762('0xc')](_0xe762('0xd'),_0x7a1740,_0xe762('0xb'),JSON['stringify'](_0x50dd96));if(_0x50dd96[_0xe762('0xe')]){if(_0x50dd96[_0xe762('0xe')][_0xe762('0xf')]===0x1f4){logger['error'](_0xe762('0xa'),_0x7a1740,_0x50dd96['error'][_0xe762('0x10')]);return _0x26a4fc(_0x50dd96['error'][_0xe762('0x10')]);}logger[_0xe762('0xe')](_0xe762('0xa'),_0x7a1740,_0x50dd96['error']['message']);return _0xf20548(_0x50dd96[_0xe762('0xe')][_0xe762('0x10')]);}else{logger[_0xe762('0x9')](_0xe762('0xa'),_0x7a1740,_0xe762('0xb'));_0xf20548(_0x50dd96[_0xe762('0x11')][_0xe762('0x10')]);}})[_0xe762('0x12')](function(_0x531587){logger[_0xe762('0xe')](_0xe762('0xa'),_0x7a1740,_0x531587);_0x26a4fc(_0x531587);});});}
\ No newline at end of file
diff --git a/server/api/cloudProvider/index.js b/server/api/cloudProvider/index.js
index 9db5e31..6b884d6 100644
--- a/server/api/cloudProvider/index.js
+++ b/server/api/cloudProvider/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2ef3=['Router','../../components/auth/service','./cloudProvider.controller','get','isAuthenticated','/:id','show','post','put','update','delete','destroy','/:id/oauth2/microsoft/authorize/','/oauth2/microsoft/callback','oauth2MicrosoftCallback','exports','express'];(function(_0x3a34b8,_0x38f752){var _0x529b92=function(_0x2bcb1d){while(--_0x2bcb1d){_0x3a34b8['push'](_0x3a34b8['shift']());}};_0x529b92(++_0x38f752);}(_0x2ef3,0xba));var _0x32ef=function(_0x5e40af,_0x54b67d){_0x5e40af=_0x5e40af-0x0;var _0x45ae04=_0x2ef3[_0x5e40af];return _0x45ae04;};'use strict';var express=require(_0x32ef('0x0'));var router=express[_0x32ef('0x1')]();var auth=require(_0x32ef('0x2'));var controller=require(_0x32ef('0x3'));router[_0x32ef('0x4')]('/',auth[_0x32ef('0x5')](),controller['index']);router[_0x32ef('0x4')](_0x32ef('0x6'),auth['isAuthenticated'](),controller[_0x32ef('0x7')]);router[_0x32ef('0x8')]('/',auth['isAuthenticated'](),controller['create']);router[_0x32ef('0x9')](_0x32ef('0x6'),auth[_0x32ef('0x5')](),controller[_0x32ef('0xa')]);router[_0x32ef('0xb')](_0x32ef('0x6'),auth[_0x32ef('0x5')](),controller[_0x32ef('0xc')]);router[_0x32ef('0x4')](_0x32ef('0xd'),auth['isAuthenticated'](),controller['oauth2MicrosoftAuthorize']);router[_0x32ef('0x8')](_0x32ef('0xe'),controller[_0x32ef('0xf')]);module[_0x32ef('0x10')]=router;
\ No newline at end of file
+var _0xdb28=['delete','destroy','/:id/oauth2/microsoft/authorize/','oauth2MicrosoftAuthorize','/oauth2/microsoft/callback','oauth2MicrosoftCallback','express','Router','../../components/auth/service','./cloudProvider.controller','isAuthenticated','index','get','/:id','post','update'];(function(_0x27b563,_0x4ead98){var _0x22aae0=function(_0x22e04e){while(--_0x22e04e){_0x27b563['push'](_0x27b563['shift']());}};_0x22aae0(++_0x4ead98);}(_0xdb28,0x106));var _0x8db2=function(_0x5bb080,_0x3d6c47){_0x5bb080=_0x5bb080-0x0;var _0xb75fc2=_0xdb28[_0x5bb080];return _0xb75fc2;};'use strict';var express=require(_0x8db2('0x0'));var router=express[_0x8db2('0x1')]();var auth=require(_0x8db2('0x2'));var controller=require(_0x8db2('0x3'));router['get']('/',auth[_0x8db2('0x4')](),controller[_0x8db2('0x5')]);router[_0x8db2('0x6')](_0x8db2('0x7'),auth[_0x8db2('0x4')](),controller['show']);router[_0x8db2('0x8')]('/',auth[_0x8db2('0x4')](),controller['create']);router['put'](_0x8db2('0x7'),auth[_0x8db2('0x4')](),controller[_0x8db2('0x9')]);router[_0x8db2('0xa')](_0x8db2('0x7'),auth[_0x8db2('0x4')](),controller[_0x8db2('0xb')]);router['get'](_0x8db2('0xc'),auth[_0x8db2('0x4')](),controller[_0x8db2('0xd')]);router['post'](_0x8db2('0xe'),controller[_0x8db2('0xf')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.attributes.js b/server/api/cmCompany/cmCompany.attributes.js
index ee55857..82222f3 100644
--- a/server/api/cmCompany/cmCompany.attributes.js
+++ b/server/api/cmCompany/cmCompany.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfcbf=['STRING','name'];(function(_0x59012f,_0x899479){var _0x50086e=function(_0x2bdbbc){while(--_0x2bdbbc){_0x59012f['push'](_0x59012f['shift']());}};_0x50086e(++_0x899479);}(_0xfcbf,0x158));var _0xffcb=function(_0x590efc,_0x5d66a5){_0x590efc=_0x590efc-0x0;var _0x503a0a=_0xfcbf[_0x590efc];return _0x503a0a;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xffcb('0x0')],'unique':_0xffcb('0x1'),'allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize[_0xffcb('0x0')]},'companyId':{'type':Sequelize[_0xffcb('0x0')]},'website':{'type':Sequelize['STRING']},'phone':{'type':Sequelize[_0xffcb('0x0')]},'fax':{'type':Sequelize[_0xffcb('0x0')]},'type':{'type':Sequelize[_0xffcb('0x0')]},'street':{'type':Sequelize[_0xffcb('0x0')]},'postalCode':{'type':Sequelize[_0xffcb('0x0')]},'city':{'type':Sequelize[_0xffcb('0x0')]},'country':{'type':Sequelize[_0xffcb('0x0')]},'email':{'type':Sequelize[_0xffcb('0x0')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize[_0xffcb('0x0')]},'sStreet':{'type':Sequelize[_0xffcb('0x0')]},'sPostalCode':{'type':Sequelize['STRING']},'sCity':{'type':Sequelize[_0xffcb('0x0')]},'sCountry':{'type':Sequelize[_0xffcb('0x0')]},'description':{'type':Sequelize[_0xffcb('0x0')]}};
\ No newline at end of file
+var _0x1744=['STRING','name','sequelize'];(function(_0x4834c7,_0x320620){var _0x597940=function(_0x58ece4){while(--_0x58ece4){_0x4834c7['push'](_0x4834c7['shift']());}};_0x597940(++_0x320620);}(_0x1744,0xa1));var _0x4174=function(_0x5dfbe2,_0x23dd83){_0x5dfbe2=_0x5dfbe2-0x0;var _0x56f520=_0x1744[_0x5dfbe2];return _0x56f520;};'use strict';var Sequelize=require(_0x4174('0x0'));module['exports']={'name':{'type':Sequelize[_0x4174('0x1')],'unique':_0x4174('0x2'),'allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize[_0x4174('0x1')]},'companyId':{'type':Sequelize['STRING']},'website':{'type':Sequelize[_0x4174('0x1')]},'phone':{'type':Sequelize[_0x4174('0x1')]},'fax':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x4174('0x1')]},'street':{'type':Sequelize['STRING']},'postalCode':{'type':Sequelize['STRING']},'city':{'type':Sequelize[_0x4174('0x1')]},'country':{'type':Sequelize[_0x4174('0x1')]},'email':{'type':Sequelize[_0x4174('0x1')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize[_0x4174('0x1')]},'sStreet':{'type':Sequelize[_0x4174('0x1')]},'sPostalCode':{'type':Sequelize[_0x4174('0x1')]},'sCity':{'type':Sequelize[_0x4174('0x1')]},'sCountry':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x4174('0x1')]}};
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.controller.js b/server/api/cmCompany/cmCompany.controller.js
index df3e960..e088f77 100644
--- a/server/api/cmCompany/cmCompany.controller.js
+++ b/server/api/cmCompany/cmCompany.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x405e=['fields','length','options','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','autoAssociation','UserProfileResource','ids','omit','getContacts','findOne','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','ejs','fs-extra','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','status','json','offset','undefined','count','limit','Content-Range','apply','reject','update','destroy','get','Companies','then','sendStatus','error','name','send','CmCompany','describe','model','keys','query','intersection','attributes','hasOwnProperty','nolimit','order','sort','filters','pick','filter','merge','where','map','includeAll','include','findAll','catch','show','params'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x405e,0x15d));var _0xe405=function(_0x4da2e1,_0x357b75){_0x4da2e1=_0x4da2e1-0x0;var _0x933021=_0x405e[_0x4da2e1];return _0x933021;};'use strict';var emlformat=require(_0xe405('0x0'));var rimraf=require(_0xe405('0x1'));var zipdir=require(_0xe405('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe405('0x3'));var moment=require(_0xe405('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xe405('0x5'));var util=require(_0xe405('0x6'));var path=require(_0xe405('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xe405('0x8'));var fs=require('fs');var fs_extra=require(_0xe405('0x9'));var _=require(_0xe405('0xa'));var squel=require('squel');var crypto=require(_0xe405('0xb'));var jsforce=require(_0xe405('0xc'));var deskjs=require(_0xe405('0xd'));var toCsv=require(_0xe405('0xe'));var querystring=require(_0xe405('0xf'));var Papa=require(_0xe405('0x10'));var Redis=require(_0xe405('0x11'));var authService=require(_0xe405('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xe405('0x13'));var hardwareService=require(_0xe405('0x14'));var logger=require(_0xe405('0x15'))(_0xe405('0x16'));var utils=require(_0xe405('0x17'));var config=require(_0xe405('0x18'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x354505,_0xccda99){_0xccda99=_0xccda99||0xcc;return function(_0x16307f){if(_0x16307f){return _0x354505['sendStatus'](_0xccda99);}return _0x354505['status'](_0xccda99)['end']();};}function respondWithResult(_0x210ee3,_0x4a691d){_0x4a691d=_0x4a691d||0xc8;return function(_0x5e6efd){if(_0x5e6efd){return _0x210ee3[_0xe405('0x19')](_0x4a691d)[_0xe405('0x1a')](_0x5e6efd);}};}function respondWithFilteredResult(_0x3953f5,_0x5959e6){return function(_0x5663b3){if(_0x5663b3){var _0x890f95=typeof _0x5959e6[_0xe405('0x1b')]==='undefined'&&typeof _0x5959e6['limit']===_0xe405('0x1c');var _0x24628e=_0x5663b3['count'];var _0x5c0373=_0x890f95?0x0:_0x5959e6[_0xe405('0x1b')];var _0x55db19=_0x890f95?_0x5663b3[_0xe405('0x1d')]:_0x5959e6[_0xe405('0x1b')]+_0x5959e6[_0xe405('0x1e')];var _0x2d1dfd;if(_0x55db19>=_0x24628e){_0x55db19=_0x24628e;_0x2d1dfd=0xc8;}else{_0x2d1dfd=0xce;}_0x3953f5['status'](_0x2d1dfd);return _0x3953f5['set'](_0xe405('0x1f'),_0x5c0373+'-'+_0x55db19+'/'+_0x24628e)['json'](_0x5663b3);}return null;};}function patchUpdates(_0x2246a9){return function(_0x5009e2){try{jsonpatch[_0xe405('0x20')](_0x5009e2,_0x2246a9,!![]);}catch(_0x432833){return BPromise[_0xe405('0x21')](_0x432833);}return _0x5009e2['save']();};}function saveUpdates(_0x2460f5,_0x33a742){return function(_0x189596){if(_0x189596){return _0x189596[_0xe405('0x22')](_0x2460f5)['then'](function(_0x5a7e93){return _0x5a7e93;});}return null;};}function removeEntity(_0x505632,_0x37a80b){return function(_0xc4d223){if(_0xc4d223){return _0xc4d223[_0xe405('0x23')]()['then'](function(){var _0x455138=_0xc4d223[_0xe405('0x24')]({'plain':!![]});var _0x17132a=_0xe405('0x25');return db['UserProfileResource']['destroy']({'where':{'type':_0x17132a,'resourceId':_0x455138['id']}})[_0xe405('0x26')](function(){return _0xc4d223;});})['then'](function(){_0x505632[_0xe405('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4891c8,_0x49d5be){return function(_0xf033d){if(!_0xf033d){_0x4891c8[_0xe405('0x27')](0x194);}return _0xf033d;};}function handleError(_0x5e2796,_0x4d7bb6){_0x4d7bb6=_0x4d7bb6||0x1f4;return function(_0x3bd630){logger[_0xe405('0x28')](_0x3bd630['stack']);if(_0x3bd630[_0xe405('0x29')]){delete _0x3bd630[_0xe405('0x29')];}_0x5e2796[_0xe405('0x19')](_0x4d7bb6)[_0xe405('0x2a')](_0x3bd630);};}exports['index']=function(_0x32e07e,_0x46d70e){var _0x4262ce={},_0x2e19e9={},_0x2c8b10={'count':0x0,'rows':[]};return db[_0xe405('0x2b')][_0xe405('0x2c')]()[_0xe405('0x26')](function(_0x577945){_0x2e19e9[_0xe405('0x2d')]=_[_0xe405('0x2e')](_0x577945);_0x2e19e9[_0xe405('0x2f')]=_[_0xe405('0x2e')](_0x32e07e[_0xe405('0x2f')]);_0x2e19e9['filters']=_[_0xe405('0x30')](_0x2e19e9[_0xe405('0x2d')],_0x2e19e9[_0xe405('0x2f')]);_0x4262ce[_0xe405('0x31')]=_[_0xe405('0x30')](_0x2e19e9[_0xe405('0x2d')],qs['fields'](_0x32e07e[_0xe405('0x2f')]['fields']));_0x4262ce[_0xe405('0x31')]=_0x4262ce[_0xe405('0x31')]['length']?_0x4262ce[_0xe405('0x31')]:_0x2e19e9[_0xe405('0x2d')];if(!_0x32e07e[_0xe405('0x2f')][_0xe405('0x32')](_0xe405('0x33'))){_0x4262ce[_0xe405('0x1e')]=qs['limit'](_0x32e07e[_0xe405('0x2f')][_0xe405('0x1e')]);_0x4262ce[_0xe405('0x1b')]=qs[_0xe405('0x1b')](_0x32e07e['query'][_0xe405('0x1b')]);}_0x4262ce[_0xe405('0x34')]=qs[_0xe405('0x35')](_0x32e07e[_0xe405('0x2f')][_0xe405('0x35')]);_0x4262ce['where']=qs[_0xe405('0x36')](_[_0xe405('0x37')](_0x32e07e[_0xe405('0x2f')],_0x2e19e9[_0xe405('0x36')]),_0x577945);if(_0x32e07e[_0xe405('0x2f')][_0xe405('0x38')]){_0x4262ce['where']=_[_0xe405('0x39')](_0x4262ce[_0xe405('0x3a')],{'$or':_[_0xe405('0x3b')](_0x4262ce[_0xe405('0x31')],function(_0xef81f0){var _0x1dc8f1={};_0x1dc8f1[_0xef81f0]={'$like':'%'+_0x32e07e['query'][_0xe405('0x38')]+'%'};return _0x1dc8f1;})});}_0x4262ce=_[_0xe405('0x39')]({},_0x4262ce,_0x32e07e['options']);var _0x36c2c8={'where':_0x4262ce[_0xe405('0x3a')]};return db['CmCompany'][_0xe405('0x1d')](_0x36c2c8)[_0xe405('0x26')](function(_0x582ae8){_0x2c8b10[_0xe405('0x1d')]=_0x582ae8;if(_0x32e07e[_0xe405('0x2f')][_0xe405('0x3c')]){_0x4262ce[_0xe405('0x3d')]=[{'all':!![]}];}return db[_0xe405('0x2b')][_0xe405('0x3e')](_0x4262ce);})[_0xe405('0x26')](function(_0x5aae48){_0x2c8b10['rows']=_0x5aae48;return _0x2c8b10;})[_0xe405('0x26')](respondWithFilteredResult(_0x46d70e,_0x4262ce))[_0xe405('0x3f')](handleError(_0x46d70e,null));})[_0xe405('0x3f')](handleError(_0x46d70e,null));};exports[_0xe405('0x40')]=function(_0x411cf6,_0x2ed971){var _0x3a701f={'raw':![],'where':{'id':_0x411cf6[_0xe405('0x41')]['id']}},_0x268043={};_0x268043[_0xe405('0x2d')]=_[_0xe405('0x2e')](db['CmCompany']['rawAttributes']);_0x268043['query']=_['keys'](_0x411cf6[_0xe405('0x2f')]);_0x268043['filters']=_['intersection'](_0x268043['model'],_0x268043[_0xe405('0x2f')]);_0x3a701f[_0xe405('0x31')]=_[_0xe405('0x30')](_0x268043[_0xe405('0x2d')],qs[_0xe405('0x42')](_0x411cf6['query'][_0xe405('0x42')]));_0x3a701f[_0xe405('0x31')]=_0x3a701f[_0xe405('0x31')][_0xe405('0x43')]?_0x3a701f[_0xe405('0x31')]:_0x268043[_0xe405('0x2d')];if(_0x411cf6[_0xe405('0x2f')][_0xe405('0x3c')]){_0x3a701f['include']=[{'all':!![]}];}_0x3a701f=_['merge']({},_0x3a701f,_0x411cf6[_0xe405('0x44')]);return db[_0xe405('0x2b')]['find'](_0x3a701f)[_0xe405('0x26')](handleEntityNotFound(_0x2ed971,null))[_0xe405('0x26')](respondWithResult(_0x2ed971,null))[_0xe405('0x3f')](handleError(_0x2ed971,null));};exports[_0xe405('0x45')]=function(_0x3f691b,_0x514af5){return db[_0xe405('0x2b')][_0xe405('0x45')](_0x3f691b[_0xe405('0x46')],{})['then'](function(_0x25dd14){var _0x423088=_0x3f691b[_0xe405('0x47')]['get']({'plain':!![]});if(!_0x423088)throw new Error(_0xe405('0x48'));if(_0x423088[_0xe405('0x49')]==='user'){var _0x2256cd=_0x25dd14['get']({'plain':!![]});var _0x3c3cea=_0xe405('0x25');return db[_0xe405('0x4a')][_0xe405('0x4b')]({'where':{'name':_0x3c3cea,'userProfileId':_0x423088[_0xe405('0x4c')]},'raw':!![]})[_0xe405('0x26')](function(_0x455029){if(_0x455029&&_0x455029[_0xe405('0x4d')]===0x0){return db[_0xe405('0x4e')][_0xe405('0x45')]({'name':_0x2256cd['name'],'resourceId':_0x2256cd['id'],'type':_0x455029[_0xe405('0x29')],'sectionId':_0x455029['id']},{})['then'](function(){return _0x25dd14;});}else{return _0x25dd14;}})['catch'](function(_0x4ef51c){logger[_0xe405('0x28')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4ef51c);throw _0x4ef51c;});}return _0x25dd14;})[_0xe405('0x26')](respondWithResult(_0x514af5,0xc9))[_0xe405('0x3f')](handleError(_0x514af5,null));};exports[_0xe405('0x22')]=function(_0x125d76,_0xf39db0){if(_0x125d76['body']['id']){delete _0x125d76['body']['id'];}return db[_0xe405('0x2b')][_0xe405('0x4b')]({'where':{'id':_0x125d76['params']['id']}})[_0xe405('0x26')](handleEntityNotFound(_0xf39db0,null))['then'](saveUpdates(_0x125d76[_0xe405('0x46')],null))[_0xe405('0x26')](respondWithResult(_0xf39db0,null))['catch'](handleError(_0xf39db0,null));};exports['destroy']=function(_0x2ddbf4,_0xbeb719){return db['CmCompany'][_0xe405('0x4b')]({'where':{'id':_0x2ddbf4[_0xe405('0x41')]['id']}})[_0xe405('0x26')](handleEntityNotFound(_0xbeb719,null))[_0xe405('0x26')](removeEntity(_0xbeb719,null))[_0xe405('0x3f')](handleError(_0xbeb719,null));};exports['describe']=function(_0x599e2a,_0x482a41){return db[_0xe405('0x2b')][_0xe405('0x2c')]()[_0xe405('0x26')](respondWithResult(_0x482a41,null))[_0xe405('0x3f')](handleError(_0x482a41,null));};exports['addContacts']=function(_0x1fc1cf,_0xb1a69,_0x39034f){return db['CmContact'][_0xe405('0x4b')]({'where':{'id':_0x1fc1cf['params']['id']}})[_0xe405('0x26')](handleEntityNotFound(_0xb1a69,null))['then'](function(_0x559bf5){if(_0x559bf5){return _0x559bf5['addContacts'](_0x1fc1cf[_0xe405('0x46')][_0xe405('0x4f')],_[_0xe405('0x50')](_0x1fc1cf[_0xe405('0x46')],['ids','id'])||{});}})['then'](respondWithResult(_0xb1a69,null))[_0xe405('0x3f')](handleError(_0xb1a69,null));};exports[_0xe405('0x51')]=function(_0x3e0e6a,_0x2364f3,_0x165394){var _0x412c6e={};var _0x291c16={};var _0x5656d2;var _0x32ad12;return db['CmCompany'][_0xe405('0x52')]({'where':{'id':_0x3e0e6a[_0xe405('0x41')]['id']}})[_0xe405('0x26')](handleEntityNotFound(_0x2364f3,null))[_0xe405('0x26')](function(_0x401f4e){if(_0x401f4e){_0x5656d2=_0x401f4e;_0x291c16[_0xe405('0x2d')]=_['keys'](db['CmContact']['rawAttributes']);_0x291c16['query']=_[_0xe405('0x2e')](_0x3e0e6a[_0xe405('0x2f')]);_0x291c16['filters']=_[_0xe405('0x30')](_0x291c16['model'],_0x291c16[_0xe405('0x2f')]);_0x412c6e['attributes']=_['intersection'](_0x291c16[_0xe405('0x2d')],qs[_0xe405('0x42')](_0x3e0e6a['query'][_0xe405('0x42')]));_0x412c6e[_0xe405('0x31')]=_0x412c6e['attributes'][_0xe405('0x43')]?_0x412c6e['attributes']:_0x291c16[_0xe405('0x2d')];_0x412c6e['order']=qs[_0xe405('0x35')](_0x3e0e6a['query'][_0xe405('0x35')]);_0x412c6e['where']=qs[_0xe405('0x36')](_[_0xe405('0x37')](_0x3e0e6a[_0xe405('0x2f')],_0x291c16['filters']));if(_0x3e0e6a[_0xe405('0x2f')][_0xe405('0x38')]){_0x412c6e['where']=_[_0xe405('0x39')](_0x412c6e[_0xe405('0x3a')],{'$or':_[_0xe405('0x3b')](_0x412c6e[_0xe405('0x31')],function(_0x4340c2){var _0x38fd8c={};_0x38fd8c[_0x4340c2]={'$like':'%'+_0x3e0e6a[_0xe405('0x2f')][_0xe405('0x38')]+'%'};return _0x38fd8c;})});}_0x412c6e=_[_0xe405('0x39')]({},_0x412c6e,_0x3e0e6a['options']);return _0x5656d2[_0xe405('0x51')](_0x412c6e);}})[_0xe405('0x26')](function(_0x34843d){if(_0x34843d){_0x32ad12=_0x34843d[_0xe405('0x43')];if(!_0x3e0e6a['query']['hasOwnProperty'](_0xe405('0x33'))){_0x412c6e[_0xe405('0x1e')]=qs[_0xe405('0x1e')](_0x3e0e6a[_0xe405('0x2f')]['limit']);_0x412c6e[_0xe405('0x1b')]=qs[_0xe405('0x1b')](_0x3e0e6a[_0xe405('0x2f')][_0xe405('0x1b')]);}return _0x5656d2[_0xe405('0x51')](_0x412c6e);}})[_0xe405('0x26')](function(_0x4fa3b4){if(_0x4fa3b4){return _0x4fa3b4?{'count':_0x32ad12,'rows':_0x4fa3b4}:null;}})[_0xe405('0x26')](respondWithResult(_0x2364f3,null))[_0xe405('0x3f')](handleError(_0x2364f3,null));};
\ No newline at end of file
+var _0x8d26=['send','index','CmCompany','describe','model','keys','filters','intersection','query','attributes','fields','hasOwnProperty','nolimit','sort','where','pick','filter','merge','map','options','includeAll','include','findAll','catch','show','params','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','addContacts','CmContact','ids','findOne','rawAttributes','length','getContacts','eml-format','zip-dir','fast-json-patch','request-promise','moment','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','undefined','limit','count','offset','Content-Range','json','apply','save','update','then','destroy','get','Companies','UserProfileResource','error','stack','name'];(function(_0x578a6a,_0x3176b4){var _0x346e31=function(_0x201209){while(--_0x201209){_0x578a6a['push'](_0x578a6a['shift']());}};_0x346e31(++_0x3176b4);}(_0x8d26,0x1d8));var _0x68d2=function(_0x4346aa,_0x1e597e){_0x4346aa=_0x4346aa-0x0;var _0x31a809=_0x8d26[_0x4346aa];return _0x31a809;};'use strict';var emlformat=require(_0x68d2('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x68d2('0x1'));var jsonpatch=require(_0x68d2('0x2'));var rp=require(_0x68d2('0x3'));var moment=require(_0x68d2('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0x68d2('0x5'));var sox=require(_0x68d2('0x6'));var csv=require(_0x68d2('0x7'));var ejs=require(_0x68d2('0x8'));var fs=require('fs');var fs_extra=require(_0x68d2('0x9'));var _=require(_0x68d2('0xa'));var squel=require(_0x68d2('0xb'));var crypto=require(_0x68d2('0xc'));var jsforce=require(_0x68d2('0xd'));var deskjs=require(_0x68d2('0xe'));var toCsv=require(_0x68d2('0x7'));var querystring=require('querystring');var Papa=require(_0x68d2('0xf'));var Redis=require(_0x68d2('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x68d2('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x68d2('0x12'));var logger=require('../../config/logger')(_0x68d2('0x13'));var utils=require(_0x68d2('0x14'));var config=require(_0x68d2('0x15'));var licenseUtil=require(_0x68d2('0x16'));var db=require(_0x68d2('0x17'))['db'];function respondWithStatusCode(_0x2cfba1,_0x333767){_0x333767=_0x333767||0xcc;return function(_0x450284){if(_0x450284){return _0x2cfba1[_0x68d2('0x18')](_0x333767);}return _0x2cfba1['status'](_0x333767)[_0x68d2('0x19')]();};}function respondWithResult(_0x331ebe,_0x1a5a63){_0x1a5a63=_0x1a5a63||0xc8;return function(_0x359418){if(_0x359418){return _0x331ebe[_0x68d2('0x1a')](_0x1a5a63)['json'](_0x359418);}};}function respondWithFilteredResult(_0x460a4b,_0x3e02f1){return function(_0x56039d){if(_0x56039d){var _0x4c7989=typeof _0x3e02f1['offset']===_0x68d2('0x1b')&&typeof _0x3e02f1[_0x68d2('0x1c')]===_0x68d2('0x1b');var _0x35ca01=_0x56039d[_0x68d2('0x1d')];var _0x77d237=_0x4c7989?0x0:_0x3e02f1[_0x68d2('0x1e')];var _0x5e8b42=_0x4c7989?_0x56039d[_0x68d2('0x1d')]:_0x3e02f1[_0x68d2('0x1e')]+_0x3e02f1[_0x68d2('0x1c')];var _0x51b7f8;if(_0x5e8b42>=_0x35ca01){_0x5e8b42=_0x35ca01;_0x51b7f8=0xc8;}else{_0x51b7f8=0xce;}_0x460a4b[_0x68d2('0x1a')](_0x51b7f8);return _0x460a4b['set'](_0x68d2('0x1f'),_0x77d237+'-'+_0x5e8b42+'/'+_0x35ca01)[_0x68d2('0x20')](_0x56039d);}return null;};}function patchUpdates(_0x11c212){return function(_0x31a19b){try{jsonpatch[_0x68d2('0x21')](_0x31a19b,_0x11c212,!![]);}catch(_0x9eefa0){return BPromise['reject'](_0x9eefa0);}return _0x31a19b[_0x68d2('0x22')]();};}function saveUpdates(_0x20407e,_0xa443d8){return function(_0x49f53e){if(_0x49f53e){return _0x49f53e[_0x68d2('0x23')](_0x20407e)[_0x68d2('0x24')](function(_0x4e8e44){return _0x4e8e44;});}return null;};}function removeEntity(_0x17225e,_0x36d7bb){return function(_0x1bb65c){if(_0x1bb65c){return _0x1bb65c[_0x68d2('0x25')]()[_0x68d2('0x24')](function(){var _0x52f29c=_0x1bb65c[_0x68d2('0x26')]({'plain':!![]});var _0x1dabee=_0x68d2('0x27');return db[_0x68d2('0x28')][_0x68d2('0x25')]({'where':{'type':_0x1dabee,'resourceId':_0x52f29c['id']}})[_0x68d2('0x24')](function(){return _0x1bb65c;});})[_0x68d2('0x24')](function(){_0x17225e[_0x68d2('0x1a')](0xcc)[_0x68d2('0x19')]();});}};}function handleEntityNotFound(_0x4f6c4c,_0x5dd205){return function(_0x6bb765){if(!_0x6bb765){_0x4f6c4c[_0x68d2('0x18')](0x194);}return _0x6bb765;};}function handleError(_0x183333,_0x497787){_0x497787=_0x497787||0x1f4;return function(_0x3a474a){logger[_0x68d2('0x29')](_0x3a474a[_0x68d2('0x2a')]);if(_0x3a474a[_0x68d2('0x2b')]){delete _0x3a474a[_0x68d2('0x2b')];}_0x183333[_0x68d2('0x1a')](_0x497787)[_0x68d2('0x2c')](_0x3a474a);};}exports[_0x68d2('0x2d')]=function(_0x4a3031,_0x16e5ce){var _0x46b0fa={},_0x1e3bbb={},_0x2c6556={'count':0x0,'rows':[]};return db[_0x68d2('0x2e')][_0x68d2('0x2f')]()[_0x68d2('0x24')](function(_0x47603a){_0x1e3bbb[_0x68d2('0x30')]=_['keys'](_0x47603a);_0x1e3bbb['query']=_[_0x68d2('0x31')](_0x4a3031['query']);_0x1e3bbb[_0x68d2('0x32')]=_[_0x68d2('0x33')](_0x1e3bbb[_0x68d2('0x30')],_0x1e3bbb[_0x68d2('0x34')]);_0x46b0fa[_0x68d2('0x35')]=_[_0x68d2('0x33')](_0x1e3bbb[_0x68d2('0x30')],qs[_0x68d2('0x36')](_0x4a3031['query']['fields']));_0x46b0fa[_0x68d2('0x35')]=_0x46b0fa[_0x68d2('0x35')]['length']?_0x46b0fa[_0x68d2('0x35')]:_0x1e3bbb[_0x68d2('0x30')];if(!_0x4a3031[_0x68d2('0x34')][_0x68d2('0x37')](_0x68d2('0x38'))){_0x46b0fa[_0x68d2('0x1c')]=qs[_0x68d2('0x1c')](_0x4a3031['query']['limit']);_0x46b0fa[_0x68d2('0x1e')]=qs[_0x68d2('0x1e')](_0x4a3031[_0x68d2('0x34')][_0x68d2('0x1e')]);}_0x46b0fa['order']=qs[_0x68d2('0x39')](_0x4a3031['query'][_0x68d2('0x39')]);_0x46b0fa[_0x68d2('0x3a')]=qs[_0x68d2('0x32')](_[_0x68d2('0x3b')](_0x4a3031[_0x68d2('0x34')],_0x1e3bbb['filters']),_0x47603a);if(_0x4a3031[_0x68d2('0x34')][_0x68d2('0x3c')]){_0x46b0fa[_0x68d2('0x3a')]=_[_0x68d2('0x3d')](_0x46b0fa[_0x68d2('0x3a')],{'$or':_[_0x68d2('0x3e')](_0x46b0fa[_0x68d2('0x35')],function(_0x2910b0){var _0x591c62={};_0x591c62[_0x2910b0]={'$like':'%'+_0x4a3031[_0x68d2('0x34')][_0x68d2('0x3c')]+'%'};return _0x591c62;})});}_0x46b0fa=_[_0x68d2('0x3d')]({},_0x46b0fa,_0x4a3031[_0x68d2('0x3f')]);var _0x5c30a2={'where':_0x46b0fa[_0x68d2('0x3a')]};return db['CmCompany'][_0x68d2('0x1d')](_0x5c30a2)[_0x68d2('0x24')](function(_0x2449f7){_0x2c6556[_0x68d2('0x1d')]=_0x2449f7;if(_0x4a3031[_0x68d2('0x34')][_0x68d2('0x40')]){_0x46b0fa[_0x68d2('0x41')]=[{'all':!![]}];}return db['CmCompany'][_0x68d2('0x42')](_0x46b0fa);})['then'](function(_0x5031c1){_0x2c6556['rows']=_0x5031c1;return _0x2c6556;})[_0x68d2('0x24')](respondWithFilteredResult(_0x16e5ce,_0x46b0fa))['catch'](handleError(_0x16e5ce,null));})[_0x68d2('0x43')](handleError(_0x16e5ce,null));};exports[_0x68d2('0x44')]=function(_0x370631,_0x510fe7){var _0x181932={'raw':![],'where':{'id':_0x370631[_0x68d2('0x45')]['id']}},_0x353e48={};_0x353e48['model']=_[_0x68d2('0x31')](db[_0x68d2('0x2e')]['rawAttributes']);_0x353e48[_0x68d2('0x34')]=_[_0x68d2('0x31')](_0x370631[_0x68d2('0x34')]);_0x353e48[_0x68d2('0x32')]=_[_0x68d2('0x33')](_0x353e48[_0x68d2('0x30')],_0x353e48[_0x68d2('0x34')]);_0x181932['attributes']=_[_0x68d2('0x33')](_0x353e48[_0x68d2('0x30')],qs[_0x68d2('0x36')](_0x370631['query'][_0x68d2('0x36')]));_0x181932[_0x68d2('0x35')]=_0x181932[_0x68d2('0x35')]['length']?_0x181932[_0x68d2('0x35')]:_0x353e48[_0x68d2('0x30')];if(_0x370631[_0x68d2('0x34')][_0x68d2('0x40')]){_0x181932['include']=[{'all':!![]}];}_0x181932=_[_0x68d2('0x3d')]({},_0x181932,_0x370631[_0x68d2('0x3f')]);return db[_0x68d2('0x2e')]['find'](_0x181932)['then'](handleEntityNotFound(_0x510fe7,null))[_0x68d2('0x24')](respondWithResult(_0x510fe7,null))['catch'](handleError(_0x510fe7,null));};exports[_0x68d2('0x46')]=function(_0x1dad3c,_0x237a43){return db[_0x68d2('0x2e')][_0x68d2('0x46')](_0x1dad3c['body'],{})[_0x68d2('0x24')](function(_0x1f5782){var _0x135881=_0x1dad3c[_0x68d2('0x47')][_0x68d2('0x26')]({'plain':!![]});if(!_0x135881)throw new Error(_0x68d2('0x48'));if(_0x135881[_0x68d2('0x49')]===_0x68d2('0x47')){var _0x2474ac=_0x1f5782['get']({'plain':!![]});var _0x52fb8a=_0x68d2('0x27');return db['UserProfileSection'][_0x68d2('0x4a')]({'where':{'name':_0x52fb8a,'userProfileId':_0x135881[_0x68d2('0x4b')]},'raw':!![]})['then'](function(_0x32ab54){if(_0x32ab54&&_0x32ab54[_0x68d2('0x4c')]===0x0){return db['UserProfileResource']['create']({'name':_0x2474ac[_0x68d2('0x2b')],'resourceId':_0x2474ac['id'],'type':_0x32ab54[_0x68d2('0x2b')],'sectionId':_0x32ab54['id']},{})['then'](function(){return _0x1f5782;});}else{return _0x1f5782;}})[_0x68d2('0x43')](function(_0xc76dd9){logger['error'](_0x68d2('0x4d'),_0xc76dd9);throw _0xc76dd9;});}return _0x1f5782;})[_0x68d2('0x24')](respondWithResult(_0x237a43,0xc9))['catch'](handleError(_0x237a43,null));};exports[_0x68d2('0x23')]=function(_0x1e23ec,_0x51e889){if(_0x1e23ec['body']['id']){delete _0x1e23ec[_0x68d2('0x4e')]['id'];}return db['CmCompany']['find']({'where':{'id':_0x1e23ec['params']['id']}})[_0x68d2('0x24')](handleEntityNotFound(_0x51e889,null))['then'](saveUpdates(_0x1e23ec['body'],null))[_0x68d2('0x24')](respondWithResult(_0x51e889,null))[_0x68d2('0x43')](handleError(_0x51e889,null));};exports[_0x68d2('0x25')]=function(_0x425e50,_0x20f417){return db['CmCompany'][_0x68d2('0x4a')]({'where':{'id':_0x425e50[_0x68d2('0x45')]['id']}})[_0x68d2('0x24')](handleEntityNotFound(_0x20f417,null))[_0x68d2('0x24')](removeEntity(_0x20f417,null))[_0x68d2('0x43')](handleError(_0x20f417,null));};exports['describe']=function(_0x1163ed,_0x3c8021){return db[_0x68d2('0x2e')]['describe']()[_0x68d2('0x24')](respondWithResult(_0x3c8021,null))[_0x68d2('0x43')](handleError(_0x3c8021,null));};exports[_0x68d2('0x4f')]=function(_0x415cc0,_0x5e3882,_0x4a412f){return db[_0x68d2('0x50')][_0x68d2('0x4a')]({'where':{'id':_0x415cc0['params']['id']}})[_0x68d2('0x24')](handleEntityNotFound(_0x5e3882,null))[_0x68d2('0x24')](function(_0x23c6e6){if(_0x23c6e6){return _0x23c6e6[_0x68d2('0x4f')](_0x415cc0[_0x68d2('0x4e')][_0x68d2('0x51')],_['omit'](_0x415cc0[_0x68d2('0x4e')],['ids','id'])||{});}})[_0x68d2('0x24')](respondWithResult(_0x5e3882,null))[_0x68d2('0x43')](handleError(_0x5e3882,null));};exports['getContacts']=function(_0xaf790e,_0x1d009a,_0x4f1d3d){var _0x180063={};var _0x38e0f3={};var _0x1f7d12;var _0x3b9774;return db[_0x68d2('0x2e')][_0x68d2('0x52')]({'where':{'id':_0xaf790e['params']['id']}})[_0x68d2('0x24')](handleEntityNotFound(_0x1d009a,null))[_0x68d2('0x24')](function(_0x131f35){if(_0x131f35){_0x1f7d12=_0x131f35;_0x38e0f3[_0x68d2('0x30')]=_['keys'](db['CmContact'][_0x68d2('0x53')]);_0x38e0f3['query']=_['keys'](_0xaf790e[_0x68d2('0x34')]);_0x38e0f3[_0x68d2('0x32')]=_[_0x68d2('0x33')](_0x38e0f3['model'],_0x38e0f3[_0x68d2('0x34')]);_0x180063['attributes']=_[_0x68d2('0x33')](_0x38e0f3['model'],qs[_0x68d2('0x36')](_0xaf790e[_0x68d2('0x34')][_0x68d2('0x36')]));_0x180063[_0x68d2('0x35')]=_0x180063['attributes'][_0x68d2('0x54')]?_0x180063['attributes']:_0x38e0f3[_0x68d2('0x30')];_0x180063['order']=qs['sort'](_0xaf790e['query'][_0x68d2('0x39')]);_0x180063['where']=qs['filters'](_[_0x68d2('0x3b')](_0xaf790e[_0x68d2('0x34')],_0x38e0f3[_0x68d2('0x32')]));if(_0xaf790e[_0x68d2('0x34')][_0x68d2('0x3c')]){_0x180063[_0x68d2('0x3a')]=_['merge'](_0x180063['where'],{'$or':_['map'](_0x180063[_0x68d2('0x35')],function(_0x2af247){var _0xb8b5ad={};_0xb8b5ad[_0x2af247]={'$like':'%'+_0xaf790e['query']['filter']+'%'};return _0xb8b5ad;})});}_0x180063=_[_0x68d2('0x3d')]({},_0x180063,_0xaf790e[_0x68d2('0x3f')]);return _0x1f7d12[_0x68d2('0x55')](_0x180063);}})['then'](function(_0x238411){if(_0x238411){_0x3b9774=_0x238411[_0x68d2('0x54')];if(!_0xaf790e[_0x68d2('0x34')][_0x68d2('0x37')](_0x68d2('0x38'))){_0x180063['limit']=qs[_0x68d2('0x1c')](_0xaf790e['query'][_0x68d2('0x1c')]);_0x180063[_0x68d2('0x1e')]=qs[_0x68d2('0x1e')](_0xaf790e[_0x68d2('0x34')][_0x68d2('0x1e')]);}return _0x1f7d12[_0x68d2('0x55')](_0x180063);}})['then'](function(_0x378d6b){if(_0x378d6b){return _0x378d6b?{'count':_0x3b9774,'rows':_0x378d6b}:null;}})[_0x68d2('0x24')](respondWithResult(_0x1d009a,null))[_0x68d2('0x43')](handleError(_0x1d009a,null));};
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.model.js b/server/api/cmCompany/cmCompany.model.js
index 6870c4e..cc81d04 100644
--- a/server/api/cmCompany/cmCompany.model.js
+++ b/server/api/cmCompany/cmCompany.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x385d=['rimraf','./cmCompany.attributes','define','CmCompany','cm_companies','util','../../config/logger','moment','request-promise','path'];(function(_0x3abeb3,_0x170117){var _0x54b697=function(_0x3664a0){while(--_0x3664a0){_0x3abeb3['push'](_0x3abeb3['shift']());}};_0x54b697(++_0x170117);}(_0x385d,0x113));var _0xd385=function(_0x150b04,_0x1cae6a){_0x150b04=_0x150b04-0x0;var _0x3bbd28=_0x385d[_0x150b04];return _0x3bbd28;};'use strict';var _=require('lodash');var util=require(_0xd385('0x0'));var logger=require(_0xd385('0x1'))('api');var moment=require(_0xd385('0x2'));var BPromise=require('bluebird');var rp=require(_0xd385('0x3'));var fs=require('fs');var path=require(_0xd385('0x4'));var rimraf=require(_0xd385('0x5'));var config=require('../../config/environment');var attributes=require(_0xd385('0x6'));module['exports']=function(_0x28732a,_0x1297ac){return _0x28732a[_0xd385('0x7')](_0xd385('0x8'),attributes,{'tableName':_0xd385('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6178=['exports','lodash','util','api','moment','request-promise','path','rimraf','../../config/environment','./cmCompany.attributes'];(function(_0x24d711,_0x3cdb28){var _0x3491b4=function(_0xd5957e){while(--_0xd5957e){_0x24d711['push'](_0x24d711['shift']());}};_0x3491b4(++_0x3cdb28);}(_0x6178,0xf1));var _0x8617=function(_0x12ec65,_0x5bd7c9){_0x12ec65=_0x12ec65-0x0;var _0x28502f=_0x6178[_0x12ec65];return _0x28502f;};'use strict';var _=require(_0x8617('0x0'));var util=require(_0x8617('0x1'));var logger=require('../../config/logger')(_0x8617('0x2'));var moment=require(_0x8617('0x3'));var BPromise=require('bluebird');var rp=require(_0x8617('0x4'));var fs=require('fs');var path=require(_0x8617('0x5'));var rimraf=require(_0x8617('0x6'));var config=require(_0x8617('0x7'));var attributes=require(_0x8617('0x8'));module[_0x8617('0x9')]=function(_0x1ac47c,_0x491605){return _0x1ac47c['define']('CmCompany',attributes,{'tableName':'cm_companies','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.rpc.js b/server/api/cmCompany/cmCompany.rpc.js
index 30d4dac..ca3d0b2 100644
--- a/server/api/cmCompany/cmCompany.rpc.js
+++ b/server/api/cmCompany/cmCompany.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb814=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','CmCompany,\x20%s,\x20%s','request\x20sent','debug','CmCompany,\x20%s,\x20%s,\x20%s','error','message','result','catch','lodash','util','moment'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xb814,0x195));var _0x4b81=function(_0xdda64d,_0x444ab2){_0xdda64d=_0xdda64d-0x0;var _0x17f684=_0xb814[_0xdda64d];return _0x17f684;};'use strict';var _=require(_0x4b81('0x0'));var util=require(_0x4b81('0x1'));var moment=require(_0x4b81('0x2'));var BPromise=require(_0x4b81('0x3'));var rs=require(_0x4b81('0x4'));var fs=require('fs');var Redis=require(_0x4b81('0x5'));var db=require(_0x4b81('0x6'))['db'];var utils=require(_0x4b81('0x7'));var logger=require(_0x4b81('0x8'))(_0x4b81('0x9'));var config=require('../../config/environment');var jayson=require(_0x4b81('0xa'));var client=jayson[_0x4b81('0xb')][_0x4b81('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x23dd78,_0x4113ee,_0x46b9cb){return new BPromise(function(_0x2fa35a,_0x139634){return client[_0x4b81('0xd')](_0x23dd78,_0x46b9cb)[_0x4b81('0xe')](function(_0x4c7fb4){logger[_0x4b81('0xf')](_0x4b81('0x10'),_0x4113ee,_0x4b81('0x11'));logger[_0x4b81('0x12')](_0x4b81('0x13'),_0x4113ee,_0x4b81('0x11'),JSON['stringify'](_0x4c7fb4));if(_0x4c7fb4[_0x4b81('0x14')]){if(_0x4c7fb4[_0x4b81('0x14')]['code']===0x1f4){logger[_0x4b81('0x14')](_0x4b81('0x10'),_0x4113ee,_0x4c7fb4[_0x4b81('0x14')][_0x4b81('0x15')]);return _0x139634(_0x4c7fb4['error']['message']);}logger['error']('CmCompany,\x20%s,\x20%s',_0x4113ee,_0x4c7fb4[_0x4b81('0x14')][_0x4b81('0x15')]);return _0x2fa35a(_0x4c7fb4[_0x4b81('0x14')]['message']);}else{logger[_0x4b81('0xf')](_0x4b81('0x10'),_0x4113ee,_0x4b81('0x11'));_0x2fa35a(_0x4c7fb4[_0x4b81('0x16')][_0x4b81('0x15')]);}})[_0x4b81('0x17')](function(_0x307de7){logger[_0x4b81('0x14')](_0x4b81('0x10'),_0x4113ee,_0x307de7);_0x139634(_0x307de7);});});}
\ No newline at end of file
+var _0x269a=['util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','CmCompany,\x20%s,\x20%s','CmCompany,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch'];(function(_0x19ea51,_0x24be66){var _0xba11b=function(_0x2f796c){while(--_0x2f796c){_0x19ea51['push'](_0x19ea51['shift']());}};_0xba11b(++_0x24be66);}(_0x269a,0x14a));var _0xa269=function(_0x5608a3,_0x5b33c5){_0x5608a3=_0x5608a3-0x0;var _0x1ed50a=_0x269a[_0x5608a3];return _0x1ed50a;};'use strict';var _=require('lodash');var util=require(_0xa269('0x0'));var moment=require(_0xa269('0x1'));var BPromise=require(_0xa269('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa269('0x3'));var db=require(_0xa269('0x4'))['db'];var utils=require(_0xa269('0x5'));var logger=require(_0xa269('0x6'))('rpc');var config=require(_0xa269('0x7'));var jayson=require(_0xa269('0x8'));var client=jayson[_0xa269('0x9')][_0xa269('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x47b91f,_0x33249f,_0x44d510){return new BPromise(function(_0x48dd40,_0x430883){return client[_0xa269('0xb')](_0x47b91f,_0x44d510)[_0xa269('0xc')](function(_0x2a6527){logger['info'](_0xa269('0xd'),_0x33249f,'request\x20sent');logger['debug'](_0xa269('0xe'),_0x33249f,'request\x20sent',JSON[_0xa269('0xf')](_0x2a6527));if(_0x2a6527[_0xa269('0x10')]){if(_0x2a6527[_0xa269('0x10')][_0xa269('0x11')]===0x1f4){logger[_0xa269('0x10')](_0xa269('0xd'),_0x33249f,_0x2a6527[_0xa269('0x10')][_0xa269('0x12')]);return _0x430883(_0x2a6527[_0xa269('0x10')][_0xa269('0x12')]);}logger[_0xa269('0x10')](_0xa269('0xd'),_0x33249f,_0x2a6527[_0xa269('0x10')][_0xa269('0x12')]);return _0x48dd40(_0x2a6527[_0xa269('0x10')][_0xa269('0x12')]);}else{logger[_0xa269('0x13')](_0xa269('0xd'),_0x33249f,'request\x20sent');_0x48dd40(_0x2a6527[_0xa269('0x14')][_0xa269('0x12')]);}})[_0xa269('0x15')](function(_0x500853){logger['error'](_0xa269('0xd'),_0x33249f,_0x500853);_0x430883(_0x500853);});});}
\ No newline at end of file
diff --git a/server/api/cmCompany/index.js b/server/api/cmCompany/index.js
index afdaacf..54cefda 100644
--- a/server/api/cmCompany/index.js
+++ b/server/api/cmCompany/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa6bf=['isAuthenticated','index','/describe','describe','/:id','getContacts','create','post','/:id/contacts','addContacts','put','delete','destroy','exports','multer','util','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','get'];(function(_0xd6a1c9,_0x203324){var _0x51ea29=function(_0x165a30){while(--_0x165a30){_0xd6a1c9['push'](_0xd6a1c9['shift']());}};_0x51ea29(++_0x203324);}(_0xa6bf,0x184));var _0xfa6b=function(_0x256dfb,_0x2b4b6e){_0x256dfb=_0x256dfb-0x0;var _0x899957=_0xa6bf[_0x256dfb];return _0x899957;};'use strict';var multer=require(_0xfa6b('0x0'));var util=require(_0xfa6b('0x1'));var path=require('path');var timeout=require(_0xfa6b('0x2'));var express=require(_0xfa6b('0x3'));var router=express['Router']();var fs_extra=require(_0xfa6b('0x4'));var auth=require(_0xfa6b('0x5'));var interaction=require(_0xfa6b('0x6'));var config=require('../../config/environment');var controller=require('./cmCompany.controller');router[_0xfa6b('0x7')]('/',auth[_0xfa6b('0x8')](),controller[_0xfa6b('0x9')]);router[_0xfa6b('0x7')](_0xfa6b('0xa'),auth[_0xfa6b('0x8')](),controller[_0xfa6b('0xb')]);router[_0xfa6b('0x7')](_0xfa6b('0xc'),auth['isAuthenticated'](),controller['show']);router[_0xfa6b('0x7')]('/:id/contacts',auth[_0xfa6b('0x8')](),controller[_0xfa6b('0xd')]);router['post']('/',auth['isAuthenticated'](),controller[_0xfa6b('0xe')]);router[_0xfa6b('0xf')](_0xfa6b('0x10'),auth[_0xfa6b('0x8')](),controller[_0xfa6b('0x11')]);router[_0xfa6b('0x12')](_0xfa6b('0xc'),auth[_0xfa6b('0x8')](),controller['update']);router[_0xfa6b('0x13')](_0xfa6b('0xc'),auth[_0xfa6b('0x8')](),controller[_0xfa6b('0x14')]);module[_0xfa6b('0x15')]=router;
\ No newline at end of file
+var _0xab64=['describe','/:id','show','/:id/contacts','getContacts','create','delete','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../config/environment','./cmCompany.controller','isAuthenticated','index','get'];(function(_0x2e1da7,_0x4e26dc){var _0x151559=function(_0x1002b2){while(--_0x1002b2){_0x2e1da7['push'](_0x2e1da7['shift']());}};_0x151559(++_0x4e26dc);}(_0xab64,0xa0));var _0x4ab6=function(_0x4c85c5,_0x38bcf8){_0x4c85c5=_0x4c85c5-0x0;var _0x148b9b=_0xab64[_0x4c85c5];return _0x148b9b;};'use strict';var multer=require(_0x4ab6('0x0'));var util=require(_0x4ab6('0x1'));var path=require(_0x4ab6('0x2'));var timeout=require(_0x4ab6('0x3'));var express=require('express');var router=express[_0x4ab6('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x4ab6('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x4ab6('0x6'));var controller=require(_0x4ab6('0x7'));router['get']('/',auth[_0x4ab6('0x8')](),controller[_0x4ab6('0x9')]);router[_0x4ab6('0xa')]('/describe',auth[_0x4ab6('0x8')](),controller[_0x4ab6('0xb')]);router[_0x4ab6('0xa')](_0x4ab6('0xc'),auth[_0x4ab6('0x8')](),controller[_0x4ab6('0xd')]);router[_0x4ab6('0xa')](_0x4ab6('0xe'),auth[_0x4ab6('0x8')](),controller[_0x4ab6('0xf')]);router['post']('/',auth[_0x4ab6('0x8')](),controller[_0x4ab6('0x10')]);router['post']('/:id/contacts',auth[_0x4ab6('0x8')](),controller['addContacts']);router['put'](_0x4ab6('0xc'),auth[_0x4ab6('0x8')](),controller['update']);router[_0x4ab6('0x11')](_0x4ab6('0xc'),auth[_0x4ab6('0x8')](),controller['destroy']);module[_0x4ab6('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/cmContact/cmContact.attributes.js b/server/api/cmContact/cmContact.attributes.js
index 51eb1d9..2d2818f 100644
--- a/server/api/cmContact/cmContact.attributes.js
+++ b/server/api/cmContact/cmContact.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0df3=['UNSIGNED','NOW','lodash','sequelize','exports','STRING','TEXT','INTEGER'];(function(_0x273632,_0x279621){var _0x4262bf=function(_0x4cf841){while(--_0x4cf841){_0x273632['push'](_0x273632['shift']());}};_0x4262bf(++_0x279621);}(_0x0df3,0xa2));var _0x30df=function(_0x396466,_0xe9857b){_0x396466=_0x396466-0x0;var _0x5e9ab4=_0x0df3[_0x396466];return _0x5e9ab4;};'use strict';var _=require(_0x30df('0x0'));var Sequelize=require(_0x30df('0x1'));module[_0x30df('0x2')]={'firstName':{'type':Sequelize[_0x30df('0x3')],'allowNull':![]},'lastName':{'type':Sequelize[_0x30df('0x3')]},'street':{'type':Sequelize[_0x30df('0x3')]},'postalCode':{'type':Sequelize[_0x30df('0x3')]},'city':{'type':Sequelize[_0x30df('0x3')]},'country':{'type':Sequelize[_0x30df('0x3')]},'dateOfBirth':{'type':Sequelize[_0x30df('0x3')]},'description':{'type':Sequelize[_0x30df('0x4')]},'phone':{'type':Sequelize[_0x30df('0x3')]},'mobile':{'type':Sequelize[_0x30df('0x3')]},'fax':{'type':Sequelize['STRING']},'email':{'type':Sequelize[_0x30df('0x3')]},'url':{'type':Sequelize[_0x30df('0x3')]},'facebook':{'type':Sequelize['STRING']},'fb_data':{'type':Sequelize['STRING']},'twitter':{'type':Sequelize['STRING']},'skype':{'type':Sequelize[_0x30df('0x3')]},'teams':{'type':Sequelize[_0x30df('0x3')]},'viber':{'type':Sequelize['STRING']},'line':{'type':Sequelize[_0x30df('0x3')]},'wechat':{'type':Sequelize['STRING']},'telegram':{'type':Sequelize[_0x30df('0x3')]},'UserId':{'type':Sequelize[_0x30df('0x5')]},'AdditionalPhones':{'type':Sequelize[_0x30df('0x3')]},'priority':{'type':Sequelize['INTEGER'](0x2)[_0x30df('0x6')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize['DATE'],'defaultValue':Sequelize[_0x30df('0x7')]},'dialTimezone':{'type':Sequelize[_0x30df('0x3')]},'utcOffset':{'type':Sequelize[_0x30df('0x5')]}};
\ No newline at end of file
+var _0xb0c1=['NOW','lodash','exports','STRING','TEXT','INTEGER','UNSIGNED','DATE'];(function(_0x403fb1,_0x5eb616){var _0x45ce2c=function(_0x5114ed){while(--_0x5114ed){_0x403fb1['push'](_0x403fb1['shift']());}};_0x45ce2c(++_0x5eb616);}(_0xb0c1,0xb1));var _0x1b0c=function(_0x2654eb,_0x25fd2a){_0x2654eb=_0x2654eb-0x0;var _0x4faa95=_0xb0c1[_0x2654eb];return _0x4faa95;};'use strict';var _=require(_0x1b0c('0x0'));var Sequelize=require('sequelize');module[_0x1b0c('0x1')]={'firstName':{'type':Sequelize[_0x1b0c('0x2')],'allowNull':![]},'lastName':{'type':Sequelize[_0x1b0c('0x2')]},'street':{'type':Sequelize[_0x1b0c('0x2')]},'postalCode':{'type':Sequelize[_0x1b0c('0x2')]},'city':{'type':Sequelize[_0x1b0c('0x2')]},'country':{'type':Sequelize[_0x1b0c('0x2')]},'dateOfBirth':{'type':Sequelize[_0x1b0c('0x2')]},'description':{'type':Sequelize[_0x1b0c('0x3')]},'phone':{'type':Sequelize[_0x1b0c('0x2')]},'mobile':{'type':Sequelize[_0x1b0c('0x2')]},'fax':{'type':Sequelize[_0x1b0c('0x2')]},'email':{'type':Sequelize[_0x1b0c('0x2')]},'url':{'type':Sequelize['STRING']},'facebook':{'type':Sequelize[_0x1b0c('0x2')]},'fb_data':{'type':Sequelize[_0x1b0c('0x2')]},'twitter':{'type':Sequelize[_0x1b0c('0x2')]},'skype':{'type':Sequelize['STRING']},'teams':{'type':Sequelize[_0x1b0c('0x2')]},'viber':{'type':Sequelize[_0x1b0c('0x2')]},'line':{'type':Sequelize[_0x1b0c('0x2')]},'wechat':{'type':Sequelize[_0x1b0c('0x2')]},'telegram':{'type':Sequelize['STRING']},'UserId':{'type':Sequelize[_0x1b0c('0x4')]},'AdditionalPhones':{'type':Sequelize['STRING']},'priority':{'type':Sequelize['INTEGER'](0x2)[_0x1b0c('0x5')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0x1b0c('0x6')],'defaultValue':Sequelize[_0x1b0c('0x7')]},'dialTimezone':{'type':Sequelize[_0x1b0c('0x2')]},'utcOffset':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
diff --git a/server/api/cmContact/cmContact.controller.js b/server/api/cmContact/cmContact.controller.js
index 6482a6a..1b95668 100644
--- a/server/api/cmContact/cmContact.controller.js
+++ b/server/api/cmContact/cmContact.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x576d=['util','path','lodash','squel','papaparse','ioredis','../../components/contacts','../../components/parsers/qs','api','../../config/environment/shared','../../mysqldb','redis','localhost','socket.io-emitter','./cmContact.socket','register','status','json','undefined','limit','count','offset','Content-Range','update','then','destroy','end','error','stack','name','index','getOptions','findAll','catch','CmContact','find','params','describe','tags','keys','startsWith','cf_','columnName','displayName','query','CmCustomField','length','alias','custom','type','info','Custom\x20field\x20%s\x20not\x20found\x20on\x20cm_contacts\x20table','forEach','hasOwnProperty','merge','body','from','get','mergeWith','isArray','join','[CmContact][merge]\x20to\x20%s\x20from\x20%s','CmHopper','[CmContact][merge][destroy][CmHopper],\x20%s','CmHopperBlack','[CmContact][merge][destroy][CmHopperBlack],\x20%s','create','ChatInteraction','ChatOfflineMessage','MailInteraction','MailMessage','SmsInteraction','FaxInteraction','FaxMessage','OpenchannelInteraction','CmContactHasItem','CmHopperFinal','CmHopperHistory','VoiceCallReport','ChatQueueReport','FaxQueueReport','OpenchannelQueueReport','SmsQueueReport','JscriptySessionReport','WhatsappMessage','WhatsappQueueReport','isNil','timezones','additionalPhones','bulkCreate','each','duplicates','where','$or','ListId','findOrCreate','push','contact','all','show','Tag','Tags','color','Phones','ContactItemType','ItemType','sequelize','literal','Phones.OrderBy','$and','omit','format','dialTimezone','utcOffset','table','cm_contacts','setFields','toParam','values','phone','getTags','findOne','model','rawAttributes','intersection','attributes','order','sort','filters','pick','filter','map','setTags','setAdditionalPhones','OrderBy','items','item_types','ItemTypeId','description','contact\x20phone\x20exists','CmHopperAdditionalPhone','item','PHONE','ItemType.OrderBy','getAdditionalPhones','duplicateAdditionalPhones','fromContactId','CmContactId','toContactId','getHoppers','fields','nolimit','ContactId','options','rows','includeAll','include','getHopperFinals','getJscriptySessions','uploadCsv','No\x20ListId\x20specified','binding_values','No\x20association\x20values\x20specified!','socket_timestamp','Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed','binding_keys','split','Incorrect\x20binding\x20parameters\x20passed!','firstName','No\x20firstName\x20column\x20specified','root','server/files/tmp','file','filename','chmodSync','0777','child_process','fork','../../components/import/cm/csv','CompanyId','File\x20uploaded\x20correctly!','send','upload','createReadStream','import','agent','binding','No\x20phone\x20column\x20specified','../../components/import/cm/csv2','stringify','message','start\x20child\x20process\x20correctly!','pid','exit','importUpdates','../../components/import/cm/csvUpdates','error\x20child\x20process','getJourney','mail','fax','whatsapp','-createdAt','resolve','channel','toLowerCase','Invalid\x20channel','range','parse','isValid','Invalid\x20date\x20for\x20range\x20from\x20filter','Invalid\x20date\x20for\x20range\x20to\x20filter','Invalid\x20createdAt\x20filter','voice','uniqueid','source','callerid','endtime','duration','note','createdAt','userDisposition','userSecondDisposition','userThirdDisposition','UserId','User','fullname','DESC','findAndCountAll','chat','Website','Account','closed','closedAt','key','Owner','browserName','customerPort','osName','ratingMessage','ratingType','ratingValue','referer','subject','openchannel','externalUrl','threadId','startCase','Interaction','flatten','sortBy','reverse','value','slice','moment','bluebird'];(function(_0x702a59,_0x2e8ec8){var _0x542e9c=function(_0x4e3149){while(--_0x4e3149){_0x702a59['push'](_0x702a59['shift']());}};_0x542e9c(++_0x2e8ec8);}(_0x576d,0xfd));var _0xd576=function(_0x41d5e0,_0x4661a4){_0x41d5e0=_0x41d5e0-0x0;var _0x385243=_0x576d[_0x41d5e0];return _0x385243;};'use strict';var moment=require(_0xd576('0x0'));var BPromise=require(_0xd576('0x1'));var util=require(_0xd576('0x2'));var path=require(_0xd576('0x3'));var fs=require('fs');var _=require(_0xd576('0x4'));var squel=require(_0xd576('0x5'));var Papa=require(_0xd576('0x6'));var Redis=require(_0xd576('0x7'));var contacts=require(_0xd576('0x8'));var qs=require(_0xd576('0x9'));var logger=require('../../config/logger')(_0xd576('0xa'));var config=require('../../config/environment');var shared=require(_0xd576('0xb'));var db=require(_0xd576('0xc'))['db'];config[_0xd576('0xd')]=_['defaults'](config['redis'],{'host':_0xd576('0xe'),'port':0x18eb});var socket=require(_0xd576('0xf'))(new Redis(config[_0xd576('0xd')]));require(_0xd576('0x10'))[_0xd576('0x11')](socket);function respondWithResult(_0xf87256,_0x307627){_0x307627=_0x307627||0xc8;return function(_0x5d2887){if(_0x5d2887){return _0xf87256[_0xd576('0x12')](_0x307627)[_0xd576('0x13')](_0x5d2887);}};}function respondWithFilteredResult(_0x36572c,_0x100caf){return function(_0x53b5e3){if(_0x53b5e3){var _0x294584=typeof _0x100caf['offset']===_0xd576('0x14')&&typeof _0x100caf[_0xd576('0x15')]==='undefined';var _0x323269=_0x53b5e3[_0xd576('0x16')];var _0x5eaaa3=_0x294584?0x0:_0x100caf[_0xd576('0x17')];var _0x98d3a3=_0x294584?_0x53b5e3['count']:_0x100caf[_0xd576('0x17')]+_0x100caf[_0xd576('0x15')];var _0x2b2ac5;if(_0x98d3a3>=_0x323269){_0x98d3a3=_0x323269;_0x2b2ac5=0xc8;}else{_0x2b2ac5=0xce;}_0x36572c[_0xd576('0x12')](_0x2b2ac5);return _0x36572c['set'](_0xd576('0x18'),_0x5eaaa3+'-'+_0x98d3a3+'/'+_0x323269)[_0xd576('0x13')](_0x53b5e3);}return null;};}function saveUpdates(_0x58025c){return function(_0x393602){if(_0x393602){return _0x393602[_0xd576('0x19')](_0x58025c)[_0xd576('0x1a')](function(_0x31a0f0){return _0x31a0f0;});}return null;};}function removeEntity(_0x5e9c45){return function(_0x417729){if(_0x417729){return _0x417729[_0xd576('0x1b')]()[_0xd576('0x1a')](function(){_0x5e9c45['status'](0xcc)[_0xd576('0x1c')]();});}};}function handleEntityNotFound(_0x5685b2){return function(_0x118159){if(!_0x118159){_0x5685b2['sendStatus'](0x194);}return _0x118159;};}function handleError(_0x3cab93,_0x16651b){_0x16651b=_0x16651b||0x1f4;return function(_0x5d0372){logger[_0xd576('0x1d')](_0x5d0372[_0xd576('0x1e')]);if(_0x5d0372[_0xd576('0x1f')]){delete _0x5d0372[_0xd576('0x1f')];}_0x3cab93[_0xd576('0x12')](_0x16651b)['send'](_0x5d0372);};}exports[_0xd576('0x20')]=function(_0x47dda8,_0x534ab4){var _0x1a4972={};return contacts['describe']()['then'](function(_0x1f6b7c){_0x1a4972=qs[_0xd576('0x21')](_0x1f6b7c,_0x47dda8);return contacts[_0xd576('0x22')](_0x47dda8['query'],_0x47dda8['user'],_0x1a4972,_0x1f6b7c);})[_0xd576('0x1a')](respondWithFilteredResult(_0x534ab4,_0x1a4972))[_0xd576('0x23')](handleError(_0x534ab4,null));};exports[_0xd576('0x1b')]=function(_0xc22964,_0x12e5a4){return db[_0xd576('0x24')][_0xd576('0x25')]({'where':{'id':_0xc22964[_0xd576('0x26')]['id']}})[_0xd576('0x1a')](handleEntityNotFound(_0x12e5a4,null))[_0xd576('0x1a')](removeEntity(_0x12e5a4,null))['catch'](handleError(_0x12e5a4,null));};exports[_0xd576('0x27')]=function(_0x1ea37f,_0xb1fa32){return db[_0xd576('0x24')]['describe']()[_0xd576('0x1a')](function(_0x2626d4){delete _0x2626d4[_0xd576('0x28')];for(var _0x4e69d3=0x0;_0x4e69d3
','generateXOAuth2Token','user=','auth=Bearer\x20','toString','base64','lodash','moment','path','node-tnef','../../../config/logger','../../../config/environment','head','value','address','anonymous','generate','@xcally.com','name','substring','indexOf','split','length','slice','join','Anonymous','pop','isEmpty','html','test','includes','0x1?_0xd5daa7[_0xed46('0x11')](0x0,-0x1)[_0xed46('0x12')]('\x20'):_0x5f2fb7[_0xed46('0xc')];}return _0xed46('0x13');}function getLastName(_0x2c9163){var _0x4402d0=_[_0xed46('0x6')](_0x2c9163[_0xed46('0x7')]);if(_0x4402d0&&_0x4402d0[_0xed46('0xc')]){var _0x30a89f=_0x4402d0[_0xed46('0xc')][_0xed46('0xf')](/\s+/);return _0x30a89f['length']>0x1?_0x30a89f[_0xed46('0x14')]():'';}return'';}function getMails(_0x2b87eb,_0x5e91b6){var _0x55fbf2='';for(var _0x4d8e9f=0x0;_0x4d8e9f<_0x5e91b6[_0xed46('0x7')][_0xed46('0x10')];_0x4d8e9f+=0x1){if(_0x5e91b6[_0xed46('0x7')][_0x4d8e9f]['address']!==_0x2b87eb){if(!_[_0xed46('0x15')](_0x55fbf2)){_0x55fbf2+=',';}_0x55fbf2+=_0x5e91b6['value'][_0x4d8e9f]['name']||_0x5e91b6[_0xed46('0x7')][_0x4d8e9f][_0xed46('0x8')]||'';_0x55fbf2+='\x20<';_0x55fbf2+=_0x5e91b6[_0xed46('0x7')][_0x4d8e9f][_0xed46('0x8')]?_0x5e91b6[_0xed46('0x7')][_0x4d8e9f][_0xed46('0x8')]:_0xed46('0x9')+random[_0xed46('0xa')](0x6)+_0xed46('0xb');_0x55fbf2+='>';}}return _0x55fbf2;}function parseEmail(_0x1052e2,_0x25fc7e,_0x292b82){if(_0x25fc7e[_0xed46('0x16')]){var _0x1a8e42=/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-