From 613f31d4ad2833d12ec05fac8f60a87fd8671311 Mon Sep 17 00:00:00 2001
From: support
Date: Wed, 15 Jun 2022 12:08:32 +0000
Subject: [PATCH] Built motion from commit d1c16722.|2.6.11
---
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 +-
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/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/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/safe-template.js | 2 +-
1202 files changed, 1202 insertions(+), 1202 deletions(-)
diff --git a/apidoc/api_project.js b/apidoc/api_project.js
index 9a6746d..301729d 100644
--- a/apidoc/api_project.js
+++ b/apidoc/api_project.js
@@ -17,7 +17,7 @@ define({
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
- "time": "2022-06-15T10:35:22.368Z",
+ "time": "2022-06-15T12:00:34.431Z",
"url": "http://apidocjs.com",
"version": "0.24.0"
}
diff --git a/apidoc/api_project.json b/apidoc/api_project.json
index ba31ad1..68170c1 100644
--- a/apidoc/api_project.json
+++ b/apidoc/api_project.json
@@ -17,7 +17,7 @@
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
- "time": "2022-06-15T10:35:22.368Z",
+ "time": "2022-06-15T12:00:34.431Z",
"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 0d426ae..0b7ddc8 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 _0x74bb=['getDataValue','action','STRING','contactManager','motionbar','jscripty','urlForward','script','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]','urlForward[headers],\x20browser[wsindowHeight]','urlForward[body]','sequelize','VIRTUAL'];(function(_0x13d423,_0x2f1969){var _0xf18f30=function(_0xbadbab){while(--_0xbadbab){_0x13d423['push'](_0x13d423['shift']());}};_0xf18f30(++_0x2f1969);}(_0x74bb,0x1de));var _0xb74b=function(_0x388ee3,_0xeb2f22){_0x388ee3=_0x388ee3-0x0;var _0x1b314=_0x74bb[_0x388ee3];return _0x1b314;};'use strict';var Sequelize=require(_0xb74b('0x0'));module['exports']={'name':{'type':Sequelize[_0xb74b('0x1')],'get':function(_0x450214){return this[_0xb74b('0x2')](_0xb74b('0x3'));}},'action':{'type':Sequelize[_0xb74b('0x4')],'allowNull':![],'validate':{'isIn':{'args':[[_0xb74b('0x5'),'integration',_0xb74b('0x6'),_0xb74b('0x7'),_0xb74b('0x8'),'browser','bot',_0xb74b('0x9')]],'msg':_0xb74b('0xa')}},'comment':_0xb74b('0xa')},'data1':{'type':Sequelize[_0xb74b('0x4')](0x1000),'comment':_0xb74b('0xb')},'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[_0xb74b('0x4')](0x1000),'comment':_0xb74b('0xc')},'data4':{'type':Sequelize[_0xb74b('0x4')](0x1000),'comments':_0xb74b('0xd')},'data5':{'type':Sequelize[_0xb74b('0x4')](0x1000),'comments':'urlForward[timeout],\x20browser[windowWidth],\x20contactManager[ignoreDialerContactId]'},'data6':{'type':Sequelize[_0xb74b('0x4')],'comments':_0xb74b('0xe')},'data7':{'type':Sequelize['TEXT'],'comments':_0xb74b('0xf')}};
\ No newline at end of file
+var _0x58c0=['urlForward[timeout],\x20browser[windowWidth],\x20contactManager[ignoreDialerContactId]','TEXT','urlForward[body]','exports','VIRTUAL','getDataValue','action','STRING','contactManager','motionbar','jscripty','urlForward','browser','bot','script','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[autoCreate(0=No,1=Yes)],\x20urlForward[URL],\x20script[type],\x20integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20browser[TemplateId,URL]','browser[location(0=NewTab,1=NewWindow,2=MotionTab)],\x20contactManager[autoCreateField]'];(function(_0x44b9e5,_0x4e0988){var _0x157cd0=function(_0x5c6a6c){while(--_0x5c6a6c){_0x44b9e5['push'](_0x44b9e5['shift']());}};_0x157cd0(++_0x4e0988);}(_0x58c0,0x1de));var _0x058c=function(_0x1ae4a9,_0x4c0ed9){_0x1ae4a9=_0x1ae4a9-0x0;var _0x54d0b0=_0x58c0[_0x1ae4a9];return _0x54d0b0;};'use strict';var Sequelize=require('sequelize');module[_0x058c('0x0')]={'name':{'type':Sequelize[_0x058c('0x1')],'get':function(_0x3b79fc){return this[_0x058c('0x2')](_0x058c('0x3'));}},'action':{'type':Sequelize[_0x058c('0x4')],'allowNull':![],'validate':{'isIn':{'args':[[_0x058c('0x5'),'integration',_0x058c('0x6'),_0x058c('0x7'),_0x058c('0x8'),_0x058c('0x9'),_0x058c('0xa'),_0x058c('0xb')]],'msg':'Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script'}},'comment':_0x058c('0xc')},'data1':{'type':Sequelize[_0x058c('0x4')](0x1000),'comment':_0x058c('0xd')},'data2':{'type':Sequelize['STRING'](0x1000),'comment':_0x058c('0xe')},'data3':{'type':Sequelize[_0x058c('0x4')](0x1000),'comment':'contactManager[searchFields],\x20script[script],\x20integration[ConfigurationId],\x20motionbar[NULL,eventVariables(0=No,1=Yes),WinAppArguments],\x20browser[NULL,eventVariables(0=No,1=Yes)]'},'data4':{'type':Sequelize[_0x058c('0x4')](0x1000),'comments':_0x058c('0xf')},'data5':{'type':Sequelize[_0x058c('0x4')](0x1000),'comments':_0x058c('0x10')},'data6':{'type':Sequelize[_0x058c('0x4')],'comments':'urlForward[headers],\x20browser[wsindowHeight]'},'data7':{'type':Sequelize[_0x058c('0x11')],'comments':_0x058c('0x12')}};
\ No newline at end of file
diff --git a/server/api/action/action.controller.js b/server/api/action/action.controller.js
index 5f22058..0c26710 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 _0x1e89=['undefined','limit','count','Content-Range','save','update','then','end','stack','name','body','find','params','catch','destroy','Action','eml-format','zip-dir','fast-json-patch','request-promise','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','json','offset'];(function(_0xd70344,_0x304eac){var _0x338d4b=function(_0x4d42a8){while(--_0x4d42a8){_0xd70344['push'](_0xd70344['shift']());}};_0x338d4b(++_0x304eac);}(_0x1e89,0x118));var _0x91e8=function(_0x23909e,_0x270bf4){_0x23909e=_0x23909e-0x0;var _0x218b62=_0x1e89[_0x23909e];return _0x218b62;};'use strict';var emlformat=require(_0x91e8('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x91e8('0x1'));var jsonpatch=require(_0x91e8('0x2'));var rp=require(_0x91e8('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x91e8('0x4'));var util=require(_0x91e8('0x5'));var path=require(_0x91e8('0x6'));var sox=require(_0x91e8('0x7'));var csv=require(_0x91e8('0x8'));var ejs=require(_0x91e8('0x9'));var fs=require('fs');var fs_extra=require(_0x91e8('0xa'));var _=require(_0x91e8('0xb'));var squel=require('squel');var crypto=require(_0x91e8('0xc'));var jsforce=require(_0x91e8('0xd'));var deskjs=require(_0x91e8('0xe'));var toCsv=require(_0x91e8('0x8'));var querystring=require(_0x91e8('0xf'));var Papa=require(_0x91e8('0x10'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x91e8('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x91e8('0x12'));var logger=require(_0x91e8('0x13'))(_0x91e8('0x14'));var utils=require(_0x91e8('0x15'));var config=require(_0x91e8('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x91e8('0x17'))['db'];function respondWithStatusCode(_0x34cfe3,_0x147d95){_0x147d95=_0x147d95||0xcc;return function(_0x553f12){if(_0x553f12){return _0x34cfe3[_0x91e8('0x18')](_0x147d95);}return _0x34cfe3['status'](_0x147d95)['end']();};}function respondWithResult(_0x34c353,_0x5badf6){_0x5badf6=_0x5badf6||0xc8;return function(_0x52f782){if(_0x52f782){return _0x34c353[_0x91e8('0x19')](_0x5badf6)[_0x91e8('0x1a')](_0x52f782);}};}function respondWithFilteredResult(_0xbcd0fb,_0x169d77){return function(_0x43a99b){if(_0x43a99b){var _0x3986cd=typeof _0x169d77[_0x91e8('0x1b')]===_0x91e8('0x1c')&&typeof _0x169d77[_0x91e8('0x1d')]===_0x91e8('0x1c');var _0x5e178a=_0x43a99b[_0x91e8('0x1e')];var _0x55b43f=_0x3986cd?0x0:_0x169d77['offset'];var _0x41b767=_0x3986cd?_0x43a99b[_0x91e8('0x1e')]:_0x169d77[_0x91e8('0x1b')]+_0x169d77[_0x91e8('0x1d')];var _0x197d80;if(_0x41b767>=_0x5e178a){_0x41b767=_0x5e178a;_0x197d80=0xc8;}else{_0x197d80=0xce;}_0xbcd0fb[_0x91e8('0x19')](_0x197d80);return _0xbcd0fb['set'](_0x91e8('0x1f'),_0x55b43f+'-'+_0x41b767+'/'+_0x5e178a)[_0x91e8('0x1a')](_0x43a99b);}return null;};}function patchUpdates(_0x2b13a4){return function(_0x42f23b){try{jsonpatch['apply'](_0x42f23b,_0x2b13a4,!![]);}catch(_0x1abd44){return BPromise['reject'](_0x1abd44);}return _0x42f23b[_0x91e8('0x20')]();};}function saveUpdates(_0x1afdbd,_0x5c2208){return function(_0x3c595d){if(_0x3c595d){return _0x3c595d[_0x91e8('0x21')](_0x1afdbd)['then'](function(_0x4f29dd){return _0x4f29dd;});}return null;};}function removeEntity(_0x14a3d4,_0x30f609){return function(_0x23eecb){if(_0x23eecb){return _0x23eecb['destroy']()[_0x91e8('0x22')](function(){_0x14a3d4['status'](0xcc)[_0x91e8('0x23')]();});}};}function handleEntityNotFound(_0x2331d4,_0x26c203){return function(_0x4d264d){if(!_0x4d264d){_0x2331d4['sendStatus'](0x194);}return _0x4d264d;};}function handleError(_0x339d13,_0x4611f0){_0x4611f0=_0x4611f0||0x1f4;return function(_0xe3c8ba){logger['error'](_0xe3c8ba[_0x91e8('0x24')]);if(_0xe3c8ba[_0x91e8('0x25')]){delete _0xe3c8ba[_0x91e8('0x25')];}_0x339d13[_0x91e8('0x19')](_0x4611f0)['send'](_0xe3c8ba);};}exports[_0x91e8('0x21')]=function(_0x37c59e,_0x45fb43){if(_0x37c59e['body']['id']){delete _0x37c59e[_0x91e8('0x26')]['id'];}return db['Action'][_0x91e8('0x27')]({'where':{'id':_0x37c59e[_0x91e8('0x28')]['id']}})['then'](handleEntityNotFound(_0x45fb43,null))['then'](saveUpdates(_0x37c59e[_0x91e8('0x26')],null))[_0x91e8('0x22')](respondWithResult(_0x45fb43,null))[_0x91e8('0x29')](handleError(_0x45fb43,null));};exports[_0x91e8('0x2a')]=function(_0x443f32,_0x41f4f9){return db[_0x91e8('0x2b')][_0x91e8('0x27')]({'where':{'id':_0x443f32[_0x91e8('0x28')]['id']}})[_0x91e8('0x22')](handleEntityNotFound(_0x41f4f9,null))[_0x91e8('0x22')](removeEntity(_0x41f4f9,null))[_0x91e8('0x29')](handleError(_0x41f4f9,null));};
\ No newline at end of file
+var _0xdfca=['sendStatus','status','end','offset','undefined','limit','count','json','apply','reject','save','update','destroy','then','error','name','send','body','Action','find','catch','params','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','to-csv','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils'];(function(_0x5e115f,_0x4eebf1){var _0x36d700=function(_0x1af0b1){while(--_0x1af0b1){_0x5e115f['push'](_0x5e115f['shift']());}};_0x36d700(++_0x4eebf1);}(_0xdfca,0xfc));var _0xadfc=function(_0x26766a,_0x704cdd){_0x26766a=_0x26766a-0x0;var _0x196a52=_0xdfca[_0x26766a];return _0x196a52;};'use strict';var emlformat=require(_0xadfc('0x0'));var rimraf=require(_0xadfc('0x1'));var zipdir=require(_0xadfc('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xadfc('0x3'));var moment=require(_0xadfc('0x4'));var BPromise=require(_0xadfc('0x5'));var Mustache=require(_0xadfc('0x6'));var util=require(_0xadfc('0x7'));var path=require(_0xadfc('0x8'));var sox=require('sox');var csv=require(_0xadfc('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xadfc('0xa'));var _=require(_0xadfc('0xb'));var squel=require(_0xadfc('0xc'));var crypto=require(_0xadfc('0xd'));var jsforce=require('jsforce');var deskjs=require(_0xadfc('0xe'));var toCsv=require(_0xadfc('0x9'));var querystring=require(_0xadfc('0xf'));var Papa=require(_0xadfc('0x10'));var Redis=require(_0xadfc('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xadfc('0x12'));var as=require(_0xadfc('0x13'));var hardwareService=require(_0xadfc('0x14'));var logger=require(_0xadfc('0x15'))(_0xadfc('0x16'));var utils=require(_0xadfc('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x164c5e,_0x4bf00d){_0x4bf00d=_0x4bf00d||0xcc;return function(_0x3d728e){if(_0x3d728e){return _0x164c5e[_0xadfc('0x18')](_0x4bf00d);}return _0x164c5e[_0xadfc('0x19')](_0x4bf00d)[_0xadfc('0x1a')]();};}function respondWithResult(_0x53f293,_0x4ce48c){_0x4ce48c=_0x4ce48c||0xc8;return function(_0x218028){if(_0x218028){return _0x53f293[_0xadfc('0x19')](_0x4ce48c)['json'](_0x218028);}};}function respondWithFilteredResult(_0x142ee1,_0xcb274){return function(_0x28938d){if(_0x28938d){var _0x3ce36e=typeof _0xcb274[_0xadfc('0x1b')]===_0xadfc('0x1c')&&typeof _0xcb274[_0xadfc('0x1d')]===_0xadfc('0x1c');var _0x1de6c8=_0x28938d[_0xadfc('0x1e')];var _0x3b3e8e=_0x3ce36e?0x0:_0xcb274[_0xadfc('0x1b')];var _0x45e0c3=_0x3ce36e?_0x28938d['count']:_0xcb274[_0xadfc('0x1b')]+_0xcb274[_0xadfc('0x1d')];var _0x17b305;if(_0x45e0c3>=_0x1de6c8){_0x45e0c3=_0x1de6c8;_0x17b305=0xc8;}else{_0x17b305=0xce;}_0x142ee1['status'](_0x17b305);return _0x142ee1['set']('Content-Range',_0x3b3e8e+'-'+_0x45e0c3+'/'+_0x1de6c8)[_0xadfc('0x1f')](_0x28938d);}return null;};}function patchUpdates(_0x499c1d){return function(_0x335c67){try{jsonpatch[_0xadfc('0x20')](_0x335c67,_0x499c1d,!![]);}catch(_0x4f5b0f){return BPromise[_0xadfc('0x21')](_0x4f5b0f);}return _0x335c67[_0xadfc('0x22')]();};}function saveUpdates(_0x5f26dc,_0x127329){return function(_0x3152a3){if(_0x3152a3){return _0x3152a3[_0xadfc('0x23')](_0x5f26dc)['then'](function(_0x2e2993){return _0x2e2993;});}return null;};}function removeEntity(_0x311189,_0x26c408){return function(_0x1048aa){if(_0x1048aa){return _0x1048aa[_0xadfc('0x24')]()[_0xadfc('0x25')](function(){_0x311189[_0xadfc('0x19')](0xcc)[_0xadfc('0x1a')]();});}};}function handleEntityNotFound(_0x27e978,_0x539571){return function(_0x2d4f99){if(!_0x2d4f99){_0x27e978[_0xadfc('0x18')](0x194);}return _0x2d4f99;};}function handleError(_0x58199a,_0x961aae){_0x961aae=_0x961aae||0x1f4;return function(_0x1e1e89){logger[_0xadfc('0x26')](_0x1e1e89['stack']);if(_0x1e1e89['name']){delete _0x1e1e89[_0xadfc('0x27')];}_0x58199a[_0xadfc('0x19')](_0x961aae)[_0xadfc('0x28')](_0x1e1e89);};}exports[_0xadfc('0x23')]=function(_0x329fcc,_0x1ce3ce){if(_0x329fcc[_0xadfc('0x29')]['id']){delete _0x329fcc['body']['id'];}return db[_0xadfc('0x2a')][_0xadfc('0x2b')]({'where':{'id':_0x329fcc['params']['id']}})[_0xadfc('0x25')](handleEntityNotFound(_0x1ce3ce,null))[_0xadfc('0x25')](saveUpdates(_0x329fcc[_0xadfc('0x29')],null))[_0xadfc('0x25')](respondWithResult(_0x1ce3ce,null))[_0xadfc('0x2c')](handleError(_0x1ce3ce,null));};exports[_0xadfc('0x24')]=function(_0x561904,_0x5cb5c3){return db[_0xadfc('0x2a')][_0xadfc('0x2b')]({'where':{'id':_0x561904[_0xadfc('0x2d')]['id']}})[_0xadfc('0x25')](handleEntityNotFound(_0x5cb5c3,null))[_0xadfc('0x25')](removeEntity(_0x5cb5c3,null))[_0xadfc('0x2c')](handleError(_0x5cb5c3,null));};
\ No newline at end of file
diff --git a/server/api/action/action.model.js b/server/api/action/action.model.js
index 3d42b8b..fc78f82 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 _0xe171=['../../config/environment','./action.attributes','define','Action','lodash','../../config/logger','api','moment','request-promise','path','rimraf'];(function(_0x5627e1,_0x1b2dbf){var _0x2f013f=function(_0x142015){while(--_0x142015){_0x5627e1['push'](_0x5627e1['shift']());}};_0x2f013f(++_0x1b2dbf);}(_0xe171,0xeb));var _0x1e17=function(_0x675a2b,_0x2b12c0){_0x675a2b=_0x675a2b-0x0;var _0x449c09=_0xe171[_0x675a2b];return _0x449c09;};'use strict';var _=require(_0x1e17('0x0'));var util=require('util');var logger=require(_0x1e17('0x1'))(_0x1e17('0x2'));var moment=require(_0x1e17('0x3'));var BPromise=require('bluebird');var rp=require(_0x1e17('0x4'));var fs=require('fs');var path=require(_0x1e17('0x5'));var rimraf=require(_0x1e17('0x6'));var config=require(_0x1e17('0x7'));var attributes=require(_0x1e17('0x8'));module['exports']=function(_0x364dae,_0x5b14ad){return _0x364dae[_0x1e17('0x9')](_0x1e17('0xa'),attributes,{'tableName':'tools_actions','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xcbed=['../../config/environment','./action.attributes','exports','define','Action','tools_actions','lodash','util','../../config/logger','moment','bluebird','path','rimraf'];(function(_0x34e337,_0x3f5675){var _0x1b43d5=function(_0x40f444){while(--_0x40f444){_0x34e337['push'](_0x34e337['shift']());}};_0x1b43d5(++_0x3f5675);}(_0xcbed,0x17f));var _0xdcbe=function(_0x2438cd,_0x42315f){_0x2438cd=_0x2438cd-0x0;var _0xce4cc4=_0xcbed[_0x2438cd];return _0xce4cc4;};'use strict';var _=require(_0xdcbe('0x0'));var util=require(_0xdcbe('0x1'));var logger=require(_0xdcbe('0x2'))('api');var moment=require(_0xdcbe('0x3'));var BPromise=require(_0xdcbe('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xdcbe('0x5'));var rimraf=require(_0xdcbe('0x6'));var config=require(_0xdcbe('0x7'));var attributes=require(_0xdcbe('0x8'));module[_0xdcbe('0x9')]=function(_0x11ea3d,_0x1aff03){return _0x11ea3d[_0xdcbe('0xa')](_0xdcbe('0xb'),attributes,{'tableName':_0xdcbe('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 4f54fcb..63251c7 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 _0x5fc3=['../../config/environment','jayson/promise','request','then','info','request\x20sent','debug','stringify','error','code','message','Action,\x20%s,\x20%s','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc'];(function(_0x484b3a,_0xaf92a9){var _0x589b4c=function(_0x4f9145){while(--_0x4f9145){_0x484b3a['push'](_0x484b3a['shift']());}};_0x589b4c(++_0xaf92a9);}(_0x5fc3,0xa8));var _0x35fc=function(_0x58c851,_0x1f3d96){_0x58c851=_0x58c851-0x0;var _0x534d8a=_0x5fc3[_0x58c851];return _0x534d8a;};'use strict';var _=require(_0x35fc('0x0'));var util=require(_0x35fc('0x1'));var moment=require('moment');var BPromise=require(_0x35fc('0x2'));var rs=require(_0x35fc('0x3'));var fs=require('fs');var Redis=require(_0x35fc('0x4'));var db=require(_0x35fc('0x5'))['db'];var utils=require(_0x35fc('0x6'));var logger=require('../../config/logger')(_0x35fc('0x7'));var config=require(_0x35fc('0x8'));var jayson=require(_0x35fc('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x19a0d1,_0x508b32,_0x16e153){return new BPromise(function(_0x27524f,_0xc72d93){return client[_0x35fc('0xa')](_0x19a0d1,_0x16e153)[_0x35fc('0xb')](function(_0xf9d3a6){logger[_0x35fc('0xc')]('Action,\x20%s,\x20%s',_0x508b32,_0x35fc('0xd'));logger[_0x35fc('0xe')]('Action,\x20%s,\x20%s,\x20%s',_0x508b32,_0x35fc('0xd'),JSON[_0x35fc('0xf')](_0xf9d3a6));if(_0xf9d3a6['error']){if(_0xf9d3a6[_0x35fc('0x10')][_0x35fc('0x11')]===0x1f4){logger['error']('Action,\x20%s,\x20%s',_0x508b32,_0xf9d3a6[_0x35fc('0x10')]['message']);return _0xc72d93(_0xf9d3a6[_0x35fc('0x10')][_0x35fc('0x12')]);}logger[_0x35fc('0x10')](_0x35fc('0x13'),_0x508b32,_0xf9d3a6[_0x35fc('0x10')]['message']);return _0x27524f(_0xf9d3a6['error']['message']);}else{logger['info'](_0x35fc('0x13'),_0x508b32,_0x35fc('0xd'));_0x27524f(_0xf9d3a6[_0x35fc('0x14')][_0x35fc('0x12')]);}})[_0x35fc('0x15')](function(_0x1121fa){logger['error'](_0x35fc('0x13'),_0x508b32,_0x1121fa);_0xc72d93(_0x1121fa);});});}
\ No newline at end of file
+var _0x8ef6=['result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info','Action,\x20%s,\x20%s','request\x20sent','debug','Action,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x503d83,_0x8ba1fd){var _0x5b4023=function(_0x49ab80){while(--_0x49ab80){_0x503d83['push'](_0x503d83['shift']());}};_0x5b4023(++_0x8ba1fd);}(_0x8ef6,0xf2));var _0x68ef=function(_0x4a1423,_0x5b4611){_0x4a1423=_0x4a1423-0x0;var _0x20d862=_0x8ef6[_0x4a1423];return _0x20d862;};'use strict';var _=require(_0x68ef('0x0'));var util=require(_0x68ef('0x1'));var moment=require(_0x68ef('0x2'));var BPromise=require(_0x68ef('0x3'));var rs=require(_0x68ef('0x4'));var fs=require('fs');var Redis=require(_0x68ef('0x5'));var db=require(_0x68ef('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x68ef('0x7'))(_0x68ef('0x8'));var config=require(_0x68ef('0x9'));var jayson=require(_0x68ef('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3c2ff3,_0x4740e8,_0x2de776){return new BPromise(function(_0x4eb5eb,_0x228967){return client[_0x68ef('0xb')](_0x3c2ff3,_0x2de776)[_0x68ef('0xc')](function(_0x22ae26){logger[_0x68ef('0xd')](_0x68ef('0xe'),_0x4740e8,_0x68ef('0xf'));logger[_0x68ef('0x10')](_0x68ef('0x11'),_0x4740e8,_0x68ef('0xf'),JSON[_0x68ef('0x12')](_0x22ae26));if(_0x22ae26[_0x68ef('0x13')]){if(_0x22ae26['error'][_0x68ef('0x14')]===0x1f4){logger[_0x68ef('0x13')](_0x68ef('0xe'),_0x4740e8,_0x22ae26[_0x68ef('0x13')][_0x68ef('0x15')]);return _0x228967(_0x22ae26[_0x68ef('0x13')]['message']);}logger[_0x68ef('0x13')](_0x68ef('0xe'),_0x4740e8,_0x22ae26[_0x68ef('0x13')]['message']);return _0x4eb5eb(_0x22ae26[_0x68ef('0x13')][_0x68ef('0x15')]);}else{logger[_0x68ef('0xd')]('Action,\x20%s,\x20%s',_0x4740e8,_0x68ef('0xf'));_0x4eb5eb(_0x22ae26[_0x68ef('0x16')][_0x68ef('0x15')]);}})[_0x68ef('0x17')](function(_0x5c4456){logger[_0x68ef('0x13')]('Action,\x20%s,\x20%s',_0x4740e8,_0x5c4456);_0x228967(_0x5c4456);});});}
\ No newline at end of file
diff --git a/server/api/action/index.js b/server/api/action/index.js
index b54cffc..4c36d49 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 _0x6b78=['./action.controller','put','/:id','update','delete','isAuthenticated','exports','multer','util','path','express','Router','fs-extra','../../components/interaction/service','../../config/environment'];(function(_0x6ec9ef,_0x554295){var _0x43bc06=function(_0x5eba8d){while(--_0x5eba8d){_0x6ec9ef['push'](_0x6ec9ef['shift']());}};_0x43bc06(++_0x554295);}(_0x6b78,0xd9));var _0x86b7=function(_0x484a6e,_0x2c5949){_0x484a6e=_0x484a6e-0x0;var _0x571693=_0x6b78[_0x484a6e];return _0x571693;};'use strict';var multer=require(_0x86b7('0x0'));var util=require(_0x86b7('0x1'));var path=require(_0x86b7('0x2'));var timeout=require('connect-timeout');var express=require(_0x86b7('0x3'));var router=express[_0x86b7('0x4')]();var fs_extra=require(_0x86b7('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x86b7('0x6'));var config=require(_0x86b7('0x7'));var controller=require(_0x86b7('0x8'));router[_0x86b7('0x9')](_0x86b7('0xa'),auth['isAuthenticated'](),controller[_0x86b7('0xb')]);router[_0x86b7('0xc')](_0x86b7('0xa'),auth[_0x86b7('0xd')](),controller['destroy']);module[_0x86b7('0xe')]=router;
\ No newline at end of file
+var _0x0a15=['delete','/:id','exports','multer','util','path','connect-timeout','Router','./action.controller','put','isAuthenticated','update'];(function(_0x4a82ac,_0x1fb931){var _0x58ee97=function(_0xc7050a){while(--_0xc7050a){_0x4a82ac['push'](_0x4a82ac['shift']());}};_0x58ee97(++_0x1fb931);}(_0x0a15,0xb7));var _0x50a1=function(_0x32b542,_0x4512fa){_0x32b542=_0x32b542-0x0;var _0x554d54=_0x0a15[_0x32b542];return _0x554d54;};'use strict';var multer=require(_0x50a1('0x0'));var util=require(_0x50a1('0x1'));var path=require(_0x50a1('0x2'));var timeout=require(_0x50a1('0x3'));var express=require('express');var router=express[_0x50a1('0x4')]();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(_0x50a1('0x5'));router[_0x50a1('0x6')]('/:id',auth[_0x50a1('0x7')](),controller[_0x50a1('0x8')]);router[_0x50a1('0x9')](_0x50a1('0xa'),auth[_0x50a1('0x7')](),controller['destroy']);module[_0x50a1('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 aa0c0b1..9d720c1 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 _0xda19=['exports','STRING','TEXT'];(function(_0x20d161,_0x487655){var _0x35d9e9=function(_0x1ed96a){while(--_0x1ed96a){_0x20d161['push'](_0x20d161['shift']());}};_0x35d9e9(++_0x487655);}(_0xda19,0xd5));var _0x9da1=function(_0x18079d,_0x73a61c){_0x18079d=_0x18079d-0x0;var _0x698079=_0xda19[_0x18079d];return _0x698079;};'use strict';var Sequelize=require('sequelize');module[_0x9da1('0x0')]={'name':{'type':Sequelize[_0x9da1('0x1')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'parent':{'type':Sequelize[_0x9da1('0x1')]},'table':{'type':Sequelize['STRING']},'conditions':{'type':Sequelize[_0x9da1('0x2')]},'joins':{'type':Sequelize['TEXT']}};
\ No newline at end of file
+var _0x3eea=['STRING','TEXT','sequelize'];(function(_0x1881ac,_0x57ecf4){var _0x3b966e=function(_0x134036){while(--_0x134036){_0x1881ac['push'](_0x1881ac['shift']());}};_0x3b966e(++_0x57ecf4);}(_0x3eea,0x1ca));var _0xa3ee=function(_0x5101f1,_0x1868d5){_0x5101f1=_0x5101f1-0x0;var _0x2d8b7e=_0x3eea[_0x5101f1];return _0x2d8b7e;};'use strict';var Sequelize=require(_0xa3ee('0x0'));module['exports']={'name':{'type':Sequelize[_0xa3ee('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0xa3ee('0x1')]},'parent':{'type':Sequelize[_0xa3ee('0x1')]},'table':{'type':Sequelize[_0xa3ee('0x1')]},'conditions':{'type':Sequelize[_0xa3ee('0x2')]},'joins':{'type':Sequelize[_0xa3ee('0x2')]}};
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.controller.js b/server/api/analyticCustomReport/analyticCustomReport.controller.js
index 2ceab26..b0bcdd0 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 _0xd7b1=['options','includeAll','include','findAll','rows','catch','show','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Reports','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','join','left_join','right_join','SUM(%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)','UNIX_TIMESTAMP(%s)','includes','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','group','field','condition','value','getFields','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','keyBy','select','from','table','MetricId','function','replace','format','orderBy','order','DESC','alias','joins','parse','parentKey','%s.%s\x20=\x20%s.%s','foreignTable','foreignKey','conditions','Limited\x20Query:','toString','sequelize','QueryTypes','SELECT','cross_join','COUNT(DISTINCT\x20%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','ROUND(%s)','IS\x20NULL','Sequelize','groupBy','clone','web','fullPath','randomstring','generate','output','custom','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','startDate','info','Run\x20Query:','fork','savename','countTable','run','runReport','operator','ValidationErrorItem','metric','debug','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','get','CustomReports','UserProfileResource','error','name','send','map','AnalyticCustomReport','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','filter','where','merge','VIRTUAL'];(function(_0x57dfc8,_0x5f35b8){var _0x4213aa=function(_0x3266ab){while(--_0x3266ab){_0x57dfc8['push'](_0x57dfc8['shift']());}};_0x4213aa(++_0x5f35b8);}(_0xd7b1,0x1ab));var _0x1d7b=function(_0x1bf828,_0xd3919d){_0x1bf828=_0x1bf828-0x0;var _0x5deba2=_0xd7b1[_0x1bf828];return _0x5deba2;};'use strict';var emlformat=require(_0x1d7b('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x1d7b('0x1'));var jsonpatch=require(_0x1d7b('0x2'));var rp=require(_0x1d7b('0x3'));var moment=require(_0x1d7b('0x4'));var BPromise=require(_0x1d7b('0x5'));var Mustache=require(_0x1d7b('0x6'));var util=require(_0x1d7b('0x7'));var path=require(_0x1d7b('0x8'));var sox=require(_0x1d7b('0x9'));var csv=require(_0x1d7b('0xa'));var ejs=require(_0x1d7b('0xb'));var fs=require('fs');var fs_extra=require(_0x1d7b('0xc'));var _=require('lodash');var squel=require(_0x1d7b('0xd'));var crypto=require(_0x1d7b('0xe'));var jsforce=require(_0x1d7b('0xf'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x1d7b('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x1d7b('0x11'));var as=require(_0x1d7b('0x12'));var hardwareService=require(_0x1d7b('0x13'));var logger=require(_0x1d7b('0x14'))(_0x1d7b('0x15'));var utils=require(_0x1d7b('0x16'));var config=require(_0x1d7b('0x17'));var licenseUtil=require(_0x1d7b('0x18'));var db=require(_0x1d7b('0x19'))['db'];var dbH=require(_0x1d7b('0x19'))['dbH'];function respondWithStatusCode(_0x592204,_0xbbb68f){_0xbbb68f=_0xbbb68f||0xcc;return function(_0x58ee0f){if(_0x58ee0f){return _0x592204[_0x1d7b('0x1a')](_0xbbb68f);}return _0x592204['status'](_0xbbb68f)[_0x1d7b('0x1b')]();};}function respondWithResult(_0x46e964,_0x5189a9){_0x5189a9=_0x5189a9||0xc8;return function(_0x35597){if(_0x35597){return _0x46e964[_0x1d7b('0x1c')](_0x5189a9)[_0x1d7b('0x1d')](_0x35597);}};}function respondWithFilteredResult(_0x7de54f,_0x924d9b){return function(_0x239bad){if(_0x239bad){var _0x3c914b=typeof _0x924d9b[_0x1d7b('0x1e')]===_0x1d7b('0x1f')&&typeof _0x924d9b[_0x1d7b('0x20')]===_0x1d7b('0x1f');var _0x13bf43=_0x239bad[_0x1d7b('0x21')];var _0x3085c7=_0x3c914b?0x0:_0x924d9b[_0x1d7b('0x1e')];var _0x4ea19f=_0x3c914b?_0x239bad['count']:_0x924d9b['offset']+_0x924d9b[_0x1d7b('0x20')];var _0x44b4d5;if(_0x4ea19f>=_0x13bf43){_0x4ea19f=_0x13bf43;_0x44b4d5=0xc8;}else{_0x44b4d5=0xce;}_0x7de54f[_0x1d7b('0x1c')](_0x44b4d5);return _0x7de54f[_0x1d7b('0x22')](_0x1d7b('0x23'),_0x3085c7+'-'+_0x4ea19f+'/'+_0x13bf43)[_0x1d7b('0x1d')](_0x239bad);}return null;};}function patchUpdates(_0x3eb36c){return function(_0x98b4ad){try{jsonpatch[_0x1d7b('0x24')](_0x98b4ad,_0x3eb36c,!![]);}catch(_0x37ee16){return BPromise[_0x1d7b('0x25')](_0x37ee16);}return _0x98b4ad[_0x1d7b('0x26')]();};}function saveUpdates(_0x1becdc,_0x3a15bf){return function(_0x3abec3){if(_0x3abec3){return _0x3abec3[_0x1d7b('0x27')](_0x1becdc)[_0x1d7b('0x28')](function(_0x1aac9){return _0x1aac9;});}return null;};}function removeEntity(_0x23d537,_0x53a94b){return function(_0x323575){if(_0x323575){return _0x323575[_0x1d7b('0x29')]()['then'](function(){var _0x17ea1c=_0x323575[_0x1d7b('0x2a')]({'plain':!![]});var _0x1209c5=_0x1d7b('0x2b');return db[_0x1d7b('0x2c')][_0x1d7b('0x29')]({'where':{'type':_0x1209c5,'resourceId':_0x17ea1c['id']}})[_0x1d7b('0x28')](function(){return _0x323575;});})[_0x1d7b('0x28')](function(){_0x23d537[_0x1d7b('0x1c')](0xcc)[_0x1d7b('0x1b')]();});}};}function handleEntityNotFound(_0x481e96,_0x6dd12e){return function(_0x3764b0){if(!_0x3764b0){_0x481e96[_0x1d7b('0x1a')](0x194);}return _0x3764b0;};}function handleError(_0x1ad048,_0x51ac00){_0x51ac00=_0x51ac00||0x1f4;return function(_0x7a6bc3){logger[_0x1d7b('0x2d')](_0x7a6bc3['stack']);if(_0x7a6bc3['name']){delete _0x7a6bc3[_0x1d7b('0x2e')];}_0x1ad048['status'](_0x51ac00)[_0x1d7b('0x2f')](_0x7a6bc3);};}exports['index']=function(_0x182b95,_0x233b52){var _0x2b4da5={},_0x3d427d={},_0x29f18e={'count':0x0,'rows':[]};var _0x18e4e4=_[_0x1d7b('0x30')](db[_0x1d7b('0x31')][_0x1d7b('0x32')],function(_0x3efcba){return{'name':_0x3efcba['fieldName'],'type':_0x3efcba[_0x1d7b('0x33')][_0x1d7b('0x34')]};});_0x3d427d[_0x1d7b('0x35')]=_[_0x1d7b('0x30')](_0x18e4e4,_0x1d7b('0x2e'));_0x3d427d[_0x1d7b('0x36')]=_[_0x1d7b('0x37')](_0x182b95['query']);_0x3d427d[_0x1d7b('0x38')]=_[_0x1d7b('0x39')](_0x3d427d[_0x1d7b('0x35')],_0x3d427d[_0x1d7b('0x36')]);_0x2b4da5[_0x1d7b('0x3a')]=_['intersection'](_0x3d427d['model'],qs[_0x1d7b('0x3b')](_0x182b95[_0x1d7b('0x36')][_0x1d7b('0x3b')]));_0x2b4da5[_0x1d7b('0x3a')]=_0x2b4da5['attributes'][_0x1d7b('0x3c')]?_0x2b4da5[_0x1d7b('0x3a')]:_0x3d427d[_0x1d7b('0x35')];if(!_0x182b95['query'][_0x1d7b('0x3d')](_0x1d7b('0x3e'))){_0x2b4da5[_0x1d7b('0x20')]=qs[_0x1d7b('0x20')](_0x182b95['query']['limit']);_0x2b4da5[_0x1d7b('0x1e')]=qs[_0x1d7b('0x1e')](_0x182b95['query'][_0x1d7b('0x1e')]);}_0x2b4da5['order']=qs[_0x1d7b('0x3f')](_0x182b95['query']['sort']);_0x2b4da5['where']=qs['filters'](_['pick'](_0x182b95[_0x1d7b('0x36')],_0x3d427d[_0x1d7b('0x38')]),_0x18e4e4);if(_0x182b95[_0x1d7b('0x36')][_0x1d7b('0x40')]){_0x2b4da5[_0x1d7b('0x41')]=_[_0x1d7b('0x42')](_0x2b4da5[_0x1d7b('0x41')],{'$or':_[_0x1d7b('0x30')](_0x18e4e4,function(_0x4af89b){if(_0x4af89b['type']!==_0x1d7b('0x43')){var _0x565baf={};_0x565baf[_0x4af89b[_0x1d7b('0x2e')]]={'$like':'%'+_0x182b95[_0x1d7b('0x36')][_0x1d7b('0x40')]+'%'};return _0x565baf;}})});}_0x2b4da5=_[_0x1d7b('0x42')]({},_0x2b4da5,_0x182b95[_0x1d7b('0x44')]);var _0x4d08d6={'where':_0x2b4da5[_0x1d7b('0x41')]};return db['AnalyticCustomReport']['count'](_0x4d08d6)[_0x1d7b('0x28')](function(_0x4e4ed7){_0x29f18e['count']=_0x4e4ed7;if(_0x182b95[_0x1d7b('0x36')][_0x1d7b('0x45')]){_0x2b4da5[_0x1d7b('0x46')]=[{'all':!![]}];}return db['AnalyticCustomReport'][_0x1d7b('0x47')](_0x2b4da5);})[_0x1d7b('0x28')](function(_0x428548){_0x29f18e[_0x1d7b('0x48')]=_0x428548;return _0x29f18e;})[_0x1d7b('0x28')](respondWithFilteredResult(_0x233b52,_0x2b4da5))[_0x1d7b('0x49')](handleError(_0x233b52,null));};exports[_0x1d7b('0x4a')]=function(_0x43ec1c,_0x28a7a0){var _0x186f77={'raw':![],'where':{'id':_0x43ec1c['params']['id']}},_0x381361={};_0x381361[_0x1d7b('0x35')]=_['keys'](db[_0x1d7b('0x31')]['rawAttributes']);_0x381361[_0x1d7b('0x36')]=_['keys'](_0x43ec1c[_0x1d7b('0x36')]);_0x381361['filters']=_['intersection'](_0x381361[_0x1d7b('0x35')],_0x381361['query']);_0x186f77['attributes']=_[_0x1d7b('0x39')](_0x381361[_0x1d7b('0x35')],qs[_0x1d7b('0x3b')](_0x43ec1c[_0x1d7b('0x36')][_0x1d7b('0x3b')]));_0x186f77['attributes']=_0x186f77[_0x1d7b('0x3a')][_0x1d7b('0x3c')]?_0x186f77[_0x1d7b('0x3a')]:_0x381361[_0x1d7b('0x35')];if(_0x43ec1c[_0x1d7b('0x36')][_0x1d7b('0x45')]){_0x186f77['include']=[{'all':!![]}];}_0x186f77=_[_0x1d7b('0x42')]({},_0x186f77,_0x43ec1c[_0x1d7b('0x44')]);return db[_0x1d7b('0x31')][_0x1d7b('0x4b')](_0x186f77)[_0x1d7b('0x28')](handleEntityNotFound(_0x28a7a0,null))['then'](respondWithResult(_0x28a7a0,null))[_0x1d7b('0x49')](handleError(_0x28a7a0,null));};exports[_0x1d7b('0x4c')]=function(_0x4d5b4e,_0x1b46a5){return db[_0x1d7b('0x31')][_0x1d7b('0x4c')](_0x4d5b4e[_0x1d7b('0x4d')],{})[_0x1d7b('0x28')](function(_0x266144){var _0x285b80=_0x4d5b4e[_0x1d7b('0x4e')][_0x1d7b('0x2a')]({'plain':!![]});if(!_0x285b80)throw new Error(_0x1d7b('0x4f'));if(_0x285b80[_0x1d7b('0x50')]==='user'){var _0x1ea7b8=_0x266144[_0x1d7b('0x2a')]({'plain':!![]});var _0x4a04c9=_0x1d7b('0x51');return db[_0x1d7b('0x52')][_0x1d7b('0x4b')]({'where':{'name':_0x4a04c9,'userProfileId':_0x285b80[_0x1d7b('0x53')]},'raw':!![]})[_0x1d7b('0x28')](function(_0x5b4e82){if(_0x5b4e82&&_0x5b4e82[_0x1d7b('0x54')]===0x0){return db[_0x1d7b('0x2c')][_0x1d7b('0x4c')]({'name':_0x1ea7b8[_0x1d7b('0x2e')],'resourceId':_0x1ea7b8['id'],'type':'CustomReports','sectionId':_0x5b4e82['id']},{})[_0x1d7b('0x28')](function(){return _0x266144;});}else{return _0x266144;}})['catch'](function(_0x952c54){logger[_0x1d7b('0x2d')](_0x1d7b('0x55'),_0x952c54);throw _0x952c54;});}return _0x266144;})[_0x1d7b('0x28')](respondWithResult(_0x1b46a5,0xc9))[_0x1d7b('0x49')](handleError(_0x1b46a5,null));};exports[_0x1d7b('0x27')]=function(_0x260392,_0xcc0c50){if(_0x260392[_0x1d7b('0x4d')]['id']){delete _0x260392[_0x1d7b('0x4d')]['id'];}return db[_0x1d7b('0x31')][_0x1d7b('0x4b')]({'where':{'id':_0x260392['params']['id']}})[_0x1d7b('0x28')](handleEntityNotFound(_0xcc0c50,null))[_0x1d7b('0x28')](saveUpdates(_0x260392['body'],null))['then'](respondWithResult(_0xcc0c50,null))[_0x1d7b('0x49')](handleError(_0xcc0c50,null));};exports[_0x1d7b('0x29')]=function(_0x4e74d7,_0x3e47bc){return db['AnalyticCustomReport'][_0x1d7b('0x4b')]({'where':{'id':_0x4e74d7[_0x1d7b('0x56')]['id']}})[_0x1d7b('0x28')](handleEntityNotFound(_0x3e47bc,null))['then'](removeEntity(_0x3e47bc,null))[_0x1d7b('0x49')](handleError(_0x3e47bc,null));};exports['preview']=function(_0x4a550a,_0x445798){var _0x184cc5=0xa;var _0xc2af=[_0x1d7b('0x57'),_0x1d7b('0x58'),_0x1d7b('0x59'),'cross_join'];var _0x351d5b={'SUM':_0x1d7b('0x5a'),'COUNT':'COUNT(%s)','COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0x1d7b('0x5b'),'MIN':_0x1d7b('0x5c'),'AVG':_0x1d7b('0x5d'),'GROUP_CONCAT':_0x1d7b('0x5e'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0x1d7b('0x5f')};var _0x3fb99a={'SEC_TO_TIME':_0x1d7b('0x60'),'DATE':_0x1d7b('0x61'),'HOUR':_0x1d7b('0x62'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':_0x1d7b('0x63')};var _0x1bf231=function(_0x406ff2){return!_[_0x1d7b('0x64')](['IS\x20NULL','IS\x20NOT\x20NULL',_0x1d7b('0x65'),_0x1d7b('0x66')],_0x406ff2);};var _0x2da1fe=function(_0x5b04dc){if(!_0x5b04dc||!_0x5b04dc[_0x1d7b('0x67')][_0x1d7b('0x3c')]){return'';}for(var _0x55a81e='(',_0x5d8277=0x0;_0x5d8277<_0x5b04dc[_0x1d7b('0x67')][_0x1d7b('0x3c')];_0x5d8277+=0x1){_0x5d8277>0x0&&(_0x55a81e+='\x20'+_0x5b04dc['operator']+'\x20');_0x55a81e+=_0x5b04dc[_0x1d7b('0x67')][_0x5d8277][_0x1d7b('0x68')]?_0x2da1fe(_0x5b04dc[_0x1d7b('0x67')][_0x5d8277][_0x1d7b('0x68')]):_0x5b04dc['rules'][_0x5d8277][_0x1d7b('0x69')]+'\x20'+_0x5b04dc[_0x1d7b('0x67')][_0x5d8277][_0x1d7b('0x6a')]+(_0x1bf231(_0x5b04dc[_0x1d7b('0x67')][_0x5d8277][_0x1d7b('0x6a')])?'\x20'+_0x5b04dc['rules'][_0x5d8277][_0x1d7b('0x6b')]:'');}return _0x55a81e+')';};var _0x2d110c={'where':{'id':_0x4a550a['params']['id']}},_0x3ac628,_0x110781,_0x2d59a5,_0x1ebb8c,_0x25e7fb;_0x2d110c=_[_0x1d7b('0x42')]({},_0x2d110c,_0x4a550a[_0x1d7b('0x44')]);return db[_0x1d7b('0x31')][_0x1d7b('0x4b')](_0x2d110c)['then'](function(_0x192ba5){if(_0x192ba5){_0x3ac628=_0x192ba5;return _0x192ba5[_0x1d7b('0x6c')]();}return null;})[_0x1d7b('0x28')](function(_0x5ef1dd){if(_0x5ef1dd){if(!_0x5ef1dd[_0x1d7b('0x3c')]){throw new db['Sequelize']['ValidationErrorItem'](_0x1d7b('0x6d'),0x193);}_0x110781=_0x5ef1dd;return db[_0x1d7b('0x6e')][_0x1d7b('0x47')]({'raw':!![]});}return null;})['then'](function(_0x3b3a4b){if(_0x3b3a4b){_0x2d59a5=_[_0x1d7b('0x6f')](_0x3b3a4b,'id');var _0x2a66c1;var _0x3dc199=squel[_0x1d7b('0x70')]();_0x3dc199[_0x1d7b('0x71')](_0x3ac628[_0x1d7b('0x72')]);for(var _0x56b5c0=0x0;_0x56b5c0<_0x110781[_0x1d7b('0x3c')];_0x56b5c0+=0x1){_0x2a66c1=_0x110781[_0x56b5c0][_0x1d7b('0x73')]?_0x2d59a5[_0x110781[_0x56b5c0]['MetricId']]['metric']:_0x110781[_0x56b5c0][_0x1d7b('0x69')];_0x2a66c1=_0x110781[_0x56b5c0][_0x1d7b('0x74')]?_[_0x1d7b('0x75')](_0x351d5b[_0x110781[_0x56b5c0][_0x1d7b('0x74')]],'%s',_0x2a66c1):_0x2a66c1;_0x2a66c1=_0x110781[_0x56b5c0][_0x1d7b('0x76')]?_[_0x1d7b('0x75')](_0x3fb99a[_0x110781[_0x56b5c0]['format']],'%s',_0x2a66c1):_0x2a66c1;if(_0x110781[_0x56b5c0]['groupBy']){_0x3dc199[_0x1d7b('0x68')](_0x2a66c1);}_0x110781[_0x56b5c0][_0x1d7b('0x77')]&&_0x3dc199[_0x1d7b('0x78')](_0x2a66c1,_0x110781[_0x56b5c0]['orderBy']===_0x1d7b('0x79')?![]:!![]);_0x3dc199['field'](_0x2a66c1,_0x110781[_0x56b5c0][_0x1d7b('0x7a')]||_0x2a66c1);}if(_0x3ac628['joins']){_0x3ac628[_0x1d7b('0x7b')]=JSON[_0x1d7b('0x7c')](_0x3ac628['joins']);for(var _0x482297=0x0;_0x482297<_0x3ac628[_0x1d7b('0x7b')][_0x1d7b('0x3c')];_0x482297+=0x1){if(_0x3ac628[_0x1d7b('0x7b')][_0x482297][_0x1d7b('0x33')]&&_[_0x1d7b('0x64')](_0xc2af,_0x3ac628[_0x1d7b('0x7b')][_0x482297][_0x1d7b('0x33')])&&_0x3ac628['joins'][_0x482297][_0x1d7b('0x7d')]&&_0x3ac628[_0x1d7b('0x7b')][_0x482297]['foreignTable']&&_0x3ac628[_0x1d7b('0x7b')][_0x482297]['foreignKey']){_0x3dc199[_0x3ac628['joins'][_0x482297]['type']](_0x3ac628[_0x1d7b('0x7b')][_0x482297]['foreignTable'],null,util['format'](_0x1d7b('0x7e'),_0x3ac628['table'],_0x3ac628[_0x1d7b('0x7b')][_0x482297]['parentKey'],_0x3ac628[_0x1d7b('0x7b')][_0x482297][_0x1d7b('0x7f')],_0x3ac628[_0x1d7b('0x7b')][_0x482297][_0x1d7b('0x80')]));}}}if(_0x3ac628['conditions']){_0x3ac628[_0x1d7b('0x81')]=JSON['parse'](_0x3ac628[_0x1d7b('0x81')]);_0x3dc199[_0x1d7b('0x41')](_0x2da1fe(_0x3ac628[_0x1d7b('0x81')][_0x1d7b('0x68')]));}_0x25e7fb=_0x3dc199['clone']();_0x3dc199[_0x1d7b('0x20')](_0x184cc5);_0x3dc199['offset'](0x0);logger['debug'](_0x1d7b('0x82'),_0x3dc199[_0x1d7b('0x83')]());return dbH['sequelize']['query'](_0x3dc199['toString'](),{'type':dbH[_0x1d7b('0x84')][_0x1d7b('0x85')][_0x1d7b('0x86')]});}})[_0x1d7b('0x28')](respondWithResult(_0x445798,null))[_0x1d7b('0x49')](handleError(_0x445798,null));};function runReport(_0xe18960,_0x204703,_0x5cd5eb){var _0x3bc633=_0x204703[_0x1d7b('0x2e')];var _0x44ac92=0xa;var _0x1a6350=['join',_0x1d7b('0x58'),_0x1d7b('0x59'),_0x1d7b('0x87')];var _0x572358={'SUM':_0x1d7b('0x5a'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0x1d7b('0x88'),'MAX':'MAX(%s)','MIN':_0x1d7b('0x5c'),'AVG':_0x1d7b('0x5d'),'GROUP_CONCAT':_0x1d7b('0x5e'),'GROUP_CONCAT ASC':_0x1d7b('0x89'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x581ba7={'SEC_TO_TIME':_0x1d7b('0x60'),'DATE':_0x1d7b('0x61'),'HOUR':_0x1d7b('0x62'),'ROUND':_0x1d7b('0x8a'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x35a702=function(_0x1f48b8){return!_[_0x1d7b('0x64')]([_0x1d7b('0x8b'),'IS\x20NOT\x20NULL',_0x1d7b('0x65'),'IS\x20NOT\x20EMPTY'],_0x1f48b8);};var _0x32eea6=function(_0x1c4665){if(!_0x1c4665||!_0x1c4665[_0x1d7b('0x67')]['length']){return'';}for(var _0x439082='(',_0x103b16=0x0;_0x103b16<_0x1c4665[_0x1d7b('0x67')]['length'];_0x103b16+=0x1){_0x103b16>0x0&&(_0x439082+='\x20'+_0x1c4665['operator']+'\x20');_0x439082+=_0x1c4665[_0x1d7b('0x67')][_0x103b16]['group']?_0x32eea6(_0x1c4665[_0x1d7b('0x67')][_0x103b16]['group']):_0x1c4665[_0x1d7b('0x67')][_0x103b16][_0x1d7b('0x69')]+'\x20'+_0x1c4665[_0x1d7b('0x67')][_0x103b16]['condition']+(_0x35a702(_0x1c4665[_0x1d7b('0x67')][_0x103b16][_0x1d7b('0x6a')])?'\x20'+_0x1c4665[_0x1d7b('0x67')][_0x103b16][_0x1d7b('0x6b')]:'');}return _0x439082+')';};var _0xd7ea4={'where':{'id':_0xe18960['id']}},_0x32bf05,_0x1d00d3,_0x233018,_0x572a70,_0x5e2924;_0xd7ea4=_[_0x1d7b('0x42')]({},_0xd7ea4,_0x5cd5eb);return db[_0x1d7b('0x31')][_0x1d7b('0x4b')](_0xd7ea4)['then'](function(_0x4079da){if(_0x4079da){_0x32bf05=_0x4079da;return _0x4079da['getFields']();}return null;})[_0x1d7b('0x28')](function(_0x459791){if(_0x459791){if(!_0x459791[_0x1d7b('0x3c')]){throw new db[(_0x1d7b('0x8c'))]['ValidationErrorItem'](_0x1d7b('0x6d'),0x193);}_0x1d00d3=_0x459791;return db[_0x1d7b('0x6e')]['findAll']({'raw':!![]});}return null;})['then'](function(_0x30912e){if(_0x30912e){_0x233018=_['keyBy'](_0x30912e,'id');var _0x9e23f;var _0x4cad20=squel[_0x1d7b('0x70')]();_0x4cad20['from'](_0x32bf05['table']);for(var _0x51c0f1=0x0;_0x51c0f1<_0x1d00d3[_0x1d7b('0x3c')];_0x51c0f1+=0x1){_0x9e23f=_0x1d00d3[_0x51c0f1][_0x1d7b('0x73')]?_0x233018[_0x1d00d3[_0x51c0f1][_0x1d7b('0x73')]]['metric']:_0x1d00d3[_0x51c0f1][_0x1d7b('0x69')];_0x9e23f=_0x1d00d3[_0x51c0f1][_0x1d7b('0x74')]?_['replace'](_0x572358[_0x1d00d3[_0x51c0f1][_0x1d7b('0x74')]],'%s',_0x9e23f):_0x9e23f;_0x9e23f=_0x1d00d3[_0x51c0f1][_0x1d7b('0x76')]?_[_0x1d7b('0x75')](_0x581ba7[_0x1d00d3[_0x51c0f1][_0x1d7b('0x76')]],'%s',_0x9e23f):_0x9e23f;if(_0x1d00d3[_0x51c0f1][_0x1d7b('0x8d')]){_0x4cad20[_0x1d7b('0x68')](_0x9e23f);}_0x1d00d3[_0x51c0f1][_0x1d7b('0x77')]&&_0x4cad20[_0x1d7b('0x78')](_0x9e23f,_0x1d00d3[_0x51c0f1][_0x1d7b('0x77')]===_0x1d7b('0x79')?![]:!![]);_0x4cad20[_0x1d7b('0x69')](_0x9e23f,_0x1d00d3[_0x51c0f1][_0x1d7b('0x7a')]||_0x9e23f);}if(_0x32bf05[_0x1d7b('0x7b')]){_0x32bf05[_0x1d7b('0x7b')]=JSON[_0x1d7b('0x7c')](_0x32bf05[_0x1d7b('0x7b')]);for(var _0x1d31e0=0x0;_0x1d31e0<_0x32bf05['joins'][_0x1d7b('0x3c')];_0x1d31e0+=0x1){if(_0x32bf05[_0x1d7b('0x7b')][_0x1d31e0][_0x1d7b('0x33')]&&_[_0x1d7b('0x64')](_0x1a6350,_0x32bf05['joins'][_0x1d31e0][_0x1d7b('0x33')])&&_0x32bf05[_0x1d7b('0x7b')][_0x1d31e0][_0x1d7b('0x7d')]&&_0x32bf05['joins'][_0x1d31e0]['foreignTable']&&_0x32bf05[_0x1d7b('0x7b')][_0x1d31e0][_0x1d7b('0x80')]){_0x4cad20[_0x32bf05['joins'][_0x1d31e0]['type']](_0x32bf05['joins'][_0x1d31e0][_0x1d7b('0x7f')],null,util['format']('%s.%s\x20=\x20%s.%s',_0x32bf05[_0x1d7b('0x72')],_0x32bf05[_0x1d7b('0x7b')][_0x1d31e0][_0x1d7b('0x7d')],_0x32bf05[_0x1d7b('0x7b')][_0x1d31e0][_0x1d7b('0x7f')],_0x32bf05[_0x1d7b('0x7b')][_0x1d31e0]['foreignKey']));}}}if(_0x32bf05[_0x1d7b('0x81')]){_0x32bf05[_0x1d7b('0x81')]=JSON[_0x1d7b('0x7c')](_0x32bf05[_0x1d7b('0x81')]);_0x4cad20[_0x1d7b('0x41')](_0x32eea6(_0x32bf05[_0x1d7b('0x81')][_0x1d7b('0x68')]));}_0x5e2924=_0x4cad20[_0x1d7b('0x8e')]();_0x4cad20[_0x1d7b('0x20')](_0x44ac92);_0x4cad20['offset'](0x0);return;}})['then'](function(){if(_0x204703['output']===_0x1d7b('0x8f')){return null;}var _0x59b8ee=_[_0x1d7b('0x42')](_0x204703,{'name':_0x204703[_0x1d7b('0x90')]||_0x204703[_0x1d7b('0x2e')]||_0x32bf05[_0x1d7b('0x2e')],'basename':_0x3bc633,'savename':util[_0x1d7b('0x76')]('%s-%s.%s',_0x204703[_0x1d7b('0x2e')]||_0x32bf05['name'],require(_0x1d7b('0x91'))[_0x1d7b('0x92')](0x4),_0x204703[_0x1d7b('0x93')]||'csv'),'reportId':_0x32bf05['id'],'reportType':_0x1d7b('0x94')});return db['AnalyticExtractedReport'][_0x1d7b('0x4c')](_0x59b8ee,{'raw':!![]});})[_0x1d7b('0x28')](function(_0x5061c0){if(_0x32bf05['table']===_0x1d7b('0x95')){_0x5e2924[_0x1d7b('0x41')](_0x32bf05['table']+_0x1d7b('0x96'),_0x204703['startDate'],_0x204703[_0x1d7b('0x97')]);}else{_0x5e2924['where'](_0x32bf05[_0x1d7b('0x72')]+_0x1d7b('0x98'),_0x204703[_0x1d7b('0x99')],_0x204703[_0x1d7b('0x97')]);}if(_0x5061c0){logger[_0x1d7b('0x9a')](_0x1d7b('0x9b'),_0x5e2924[_0x1d7b('0x83')]());require('child_process')[_0x1d7b('0x9c')](path[_0x1d7b('0x57')](__dirname,'../../components/export/',_0x5061c0[_0x1d7b('0x93')]),[_0x5061c0['id'],_0x5e2924['toString'](),path[_0x1d7b('0x57')](__dirname,'../../files/reports',_0x5061c0[_0x1d7b('0x9d')]),_0x3bc633]);return _0x5061c0;}else{var _0x395b16=squel[_0x1d7b('0x70')]();_0x395b16[_0x1d7b('0x71')]('('+_0x5e2924[_0x1d7b('0x83')]()+')',_0x1d7b('0x9e'));_0x395b16[_0x1d7b('0x69')]('COUNT(*)','count');_0x5e2924[_0x1d7b('0x20')](_0x204703[_0x1d7b('0x20')]||_0x44ac92);_0x5e2924[_0x1d7b('0x1e')](_0x204703[_0x1d7b('0x1e')]||0x0);return dbH['sequelize'][_0x1d7b('0x36')](_0x395b16[_0x1d7b('0x83')](),{'type':dbH[_0x1d7b('0x84')]['QueryTypes']['SELECT']})['then'](function(_0x342482){if(!_0x342482[_0x1d7b('0x3c')]){_0x572a70=0x0;}else{_0x572a70=_0x342482[0x0][_0x1d7b('0x21')]||0x0;}return dbH[_0x1d7b('0x84')]['query'](_0x5e2924[_0x1d7b('0x83')](),{'type':dbH['sequelize'][_0x1d7b('0x85')][_0x1d7b('0x86')]});})['then'](function(_0x307a79){return{'rows':_0x307a79||[],'count':_0x572a70};});}});}exports[_0x1d7b('0x9f')]=function(_0x3d64b7,_0x5024c4){return runReport(_0x3d64b7[_0x1d7b('0x56')],_0x3d64b7[_0x1d7b('0x36')],_0x3d64b7['options'])[_0x1d7b('0x28')](respondWithResult(_0x5024c4,null))[_0x1d7b('0x49')](handleError(_0x5024c4,null));};exports[_0x1d7b('0xa0')]=runReport;exports[_0x1d7b('0x36')]=function(_0x3009c2,_0x21804b){var _0x445380=0xa;var _0x122701=[_0x1d7b('0x57'),_0x1d7b('0x58'),'right_join',_0x1d7b('0x87')];var _0x5e4ec9={'SUM':_0x1d7b('0x5a'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0x1d7b('0x88'),'MAX':_0x1d7b('0x5b'),'MIN':_0x1d7b('0x5c'),'AVG':'AVG(%s)','GROUP_CONCAT':_0x1d7b('0x5e'),'GROUP_CONCAT ASC':_0x1d7b('0x89'),'GROUP_CONCAT DESC':_0x1d7b('0x5f')};var _0x171aa6={'SEC_TO_TIME':_0x1d7b('0x60'),'DATE':_0x1d7b('0x61'),'HOUR':'HOUR(%s)','ROUND':_0x1d7b('0x8a'),'UNIX_TIMESTAMP':_0x1d7b('0x63')};var _0x22d4a2=function(_0x31c2c3){return!_[_0x1d7b('0x64')]([_0x1d7b('0x8b'),'IS\x20NOT\x20NULL',_0x1d7b('0x65'),'IS\x20NOT\x20EMPTY'],_0x31c2c3);};var _0x13f066=function(_0x1679b4){if(!_0x1679b4||!_0x1679b4[_0x1d7b('0x67')]['length']){return'';}for(var _0x17c099='(',_0x1ac92f=0x0;_0x1ac92f<_0x1679b4[_0x1d7b('0x67')]['length'];_0x1ac92f+=0x1){_0x1ac92f>0x0&&(_0x17c099+='\x20'+_0x1679b4[_0x1d7b('0xa1')]+'\x20');_0x17c099+=_0x1679b4[_0x1d7b('0x67')][_0x1ac92f][_0x1d7b('0x68')]?_0x13f066(_0x1679b4[_0x1d7b('0x67')][_0x1ac92f]['group']):_0x1679b4[_0x1d7b('0x67')][_0x1ac92f][_0x1d7b('0x69')]+'\x20'+_0x1679b4[_0x1d7b('0x67')][_0x1ac92f][_0x1d7b('0x6a')]+(_0x22d4a2(_0x1679b4[_0x1d7b('0x67')][_0x1ac92f][_0x1d7b('0x6a')])?'\x20'+_0x1679b4[_0x1d7b('0x67')][_0x1ac92f][_0x1d7b('0x6b')]:'');}return _0x17c099+')';};var _0x53935d={'where':{'id':_0x3009c2[_0x1d7b('0x56')]['id']}},_0x38a89f,_0x37797b,_0xf7b486,_0x31cd71,_0xdbd38b;_0x53935d=_['merge']({},_0x53935d,_0x3009c2['options']);return db[_0x1d7b('0x31')][_0x1d7b('0x4b')](_0x53935d)['then'](function(_0x48267b){if(_0x48267b){_0x38a89f=_0x48267b;return _0x48267b['getFields']();}return null;})['then'](function(_0x425d86){if(_0x425d86){if(!_0x425d86[_0x1d7b('0x3c')]){throw new db[(_0x1d7b('0x8c'))][(_0x1d7b('0xa2'))](_0x1d7b('0x6d'),0x193);}_0x37797b=_0x425d86;return db[_0x1d7b('0x6e')]['findAll']({'raw':!![]});}return null;})[_0x1d7b('0x28')](function(_0x3f0254){if(_0x3f0254){_0xf7b486=_[_0x1d7b('0x6f')](_0x3f0254,'id');var _0x56ceea;var _0x39776a=squel[_0x1d7b('0x70')]();_0x39776a['from'](_0x38a89f[_0x1d7b('0x72')]);for(var _0x6d5e8c=0x0;_0x6d5e8c<_0x37797b[_0x1d7b('0x3c')];_0x6d5e8c+=0x1){_0x56ceea=_0x37797b[_0x6d5e8c][_0x1d7b('0x73')]?_0xf7b486[_0x37797b[_0x6d5e8c]['MetricId']][_0x1d7b('0xa3')]:_0x37797b[_0x6d5e8c][_0x1d7b('0x69')];_0x56ceea=_0x37797b[_0x6d5e8c][_0x1d7b('0x74')]?_[_0x1d7b('0x75')](_0x5e4ec9[_0x37797b[_0x6d5e8c]['function']],'%s',_0x56ceea):_0x56ceea;_0x56ceea=_0x37797b[_0x6d5e8c]['format']?_[_0x1d7b('0x75')](_0x171aa6[_0x37797b[_0x6d5e8c][_0x1d7b('0x76')]],'%s',_0x56ceea):_0x56ceea;if(_0x37797b[_0x6d5e8c][_0x1d7b('0x8d')]){_0x39776a['group'](_0x56ceea);}_0x37797b[_0x6d5e8c][_0x1d7b('0x77')]&&_0x39776a['order'](_0x56ceea,_0x37797b[_0x6d5e8c][_0x1d7b('0x77')]==='DESC'?![]:!![]);_0x39776a[_0x1d7b('0x69')](_0x56ceea,_0x37797b[_0x6d5e8c][_0x1d7b('0x7a')]||_0x56ceea);}if(_0x38a89f[_0x1d7b('0x7b')]){_0x38a89f[_0x1d7b('0x7b')]=JSON[_0x1d7b('0x7c')](_0x38a89f[_0x1d7b('0x7b')]);for(var _0x52a8a4=0x0;_0x52a8a4<_0x38a89f['joins'][_0x1d7b('0x3c')];_0x52a8a4+=0x1){if(_0x38a89f[_0x1d7b('0x7b')][_0x52a8a4][_0x1d7b('0x33')]&&_[_0x1d7b('0x64')](_0x122701,_0x38a89f['joins'][_0x52a8a4]['type'])&&_0x38a89f[_0x1d7b('0x7b')][_0x52a8a4]['parentKey']&&_0x38a89f[_0x1d7b('0x7b')][_0x52a8a4][_0x1d7b('0x7f')]&&_0x38a89f[_0x1d7b('0x7b')][_0x52a8a4][_0x1d7b('0x80')]){_0x39776a[_0x38a89f[_0x1d7b('0x7b')][_0x52a8a4][_0x1d7b('0x33')]](_0x38a89f['joins'][_0x52a8a4][_0x1d7b('0x7f')],null,util[_0x1d7b('0x76')](_0x1d7b('0x7e'),_0x38a89f[_0x1d7b('0x72')],_0x38a89f['joins'][_0x52a8a4][_0x1d7b('0x7d')],_0x38a89f['joins'][_0x52a8a4][_0x1d7b('0x7f')],_0x38a89f[_0x1d7b('0x7b')][_0x52a8a4]['foreignKey']));}}}if(_0x38a89f[_0x1d7b('0x81')]){_0x38a89f['conditions']=JSON[_0x1d7b('0x7c')](_0x38a89f[_0x1d7b('0x81')]);_0x39776a[_0x1d7b('0x41')](_0x13f066(_0x38a89f[_0x1d7b('0x81')]['group']));}_0xdbd38b=_0x39776a[_0x1d7b('0x8e')]();_0x39776a[_0x1d7b('0x20')](_0x445380);_0x39776a[_0x1d7b('0x1e')](0x0);logger[_0x1d7b('0xa4')](_0x1d7b('0x82'),_0x39776a[_0x1d7b('0x83')]());return dbH[_0x1d7b('0x84')][_0x1d7b('0x36')](_0x39776a[_0x1d7b('0x83')](),{'type':dbH['sequelize'][_0x1d7b('0x85')][_0x1d7b('0x86')]});}})[_0x1d7b('0x28')](function(){return{'sql':_0xdbd38b[_0x1d7b('0x83')]()};})[_0x1d7b('0x28')](respondWithResult(_0x21804b,null))[_0x1d7b('0x49')](handleError(_0x21804b,null));};
\ No newline at end of file
+var _0xae5f=['rows','show','params','keys','options','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','Reports','userProfileId','autoAssociation','CustomReports','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','catch','preview','join','cross_join','MAX(%s)','MIN(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','operator','group','field','condition','value','getFields','Sequelize','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','select','from','table','MetricId','metric','function','replace','format','groupBy','orderBy','DESC','alias','joins','foreignTable','parentKey','foreignKey','conditions','clone','debug','Limited\x20Query:','toString','sequelize','QueryTypes','SELECT','left_join','right_join','COUNT(%s)','COUNT(DISTINCT\x20%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','HOUR(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','parse','%s.%s\x20=\x20%s.%s','output','web','fullPath','%s-%s.%s','generate','csv','custom','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','Run\x20Query:','fork','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','run','runReport','DATE(%s)','keyBy','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','dbH','end','status','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','then','get','UserProfileResource','sendStatus','error','stack','name','send','index','AnalyticCustomReport','fieldName','key','model','query','filters','attributes','intersection','fields','length','hasOwnProperty','order','sort','where','pick','filter','map','type','VIRTUAL','merge','includeAll','include','findAll'];(function(_0x283ed4,_0x2d393a){var _0x11d2af=function(_0x21a001){while(--_0x21a001){_0x283ed4['push'](_0x283ed4['shift']());}};_0x11d2af(++_0x2d393a);}(_0xae5f,0x10e));var _0xfae5=function(_0x4f9f82,_0x121ff1){_0x4f9f82=_0x4f9f82-0x0;var _0x12877f=_0xae5f[_0x4f9f82];return _0x12877f;};'use strict';var emlformat=require(_0xfae5('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xfae5('0x1'));var jsonpatch=require(_0xfae5('0x2'));var rp=require(_0xfae5('0x3'));var moment=require('moment');var BPromise=require(_0xfae5('0x4'));var Mustache=require(_0xfae5('0x5'));var util=require(_0xfae5('0x6'));var path=require('path');var sox=require(_0xfae5('0x7'));var csv=require('to-csv');var ejs=require(_0xfae5('0x8'));var fs=require('fs');var fs_extra=require(_0xfae5('0x9'));var _=require(_0xfae5('0xa'));var squel=require(_0xfae5('0xb'));var crypto=require(_0xfae5('0xc'));var jsforce=require(_0xfae5('0xd'));var deskjs=require(_0xfae5('0xe'));var toCsv=require('to-csv');var querystring=require(_0xfae5('0xf'));var Papa=require(_0xfae5('0x10'));var Redis=require('ioredis');var authService=require(_0xfae5('0x11'));var qs=require(_0xfae5('0x12'));var as=require(_0xfae5('0x13'));var hardwareService=require(_0xfae5('0x14'));var logger=require('../../config/logger')(_0xfae5('0x15'));var utils=require(_0xfae5('0x16'));var config=require(_0xfae5('0x17'));var licenseUtil=require(_0xfae5('0x18'));var db=require(_0xfae5('0x19'))['db'];var dbH=require(_0xfae5('0x19'))[_0xfae5('0x1a')];function respondWithStatusCode(_0x40e8fa,_0x1f9329){_0x1f9329=_0x1f9329||0xcc;return function(_0x10fe79){if(_0x10fe79){return _0x40e8fa['sendStatus'](_0x1f9329);}return _0x40e8fa['status'](_0x1f9329)[_0xfae5('0x1b')]();};}function respondWithResult(_0x4638f2,_0x5e493c){_0x5e493c=_0x5e493c||0xc8;return function(_0x2a4a05){if(_0x2a4a05){return _0x4638f2[_0xfae5('0x1c')](_0x5e493c)['json'](_0x2a4a05);}};}function respondWithFilteredResult(_0x390f06,_0x1a0b55){return function(_0x3ab9fa){if(_0x3ab9fa){var _0x27c6fe=typeof _0x1a0b55[_0xfae5('0x1d')]===_0xfae5('0x1e')&&typeof _0x1a0b55[_0xfae5('0x1f')]===_0xfae5('0x1e');var _0x378fe8=_0x3ab9fa[_0xfae5('0x20')];var _0x3d3590=_0x27c6fe?0x0:_0x1a0b55['offset'];var _0x2d7386=_0x27c6fe?_0x3ab9fa[_0xfae5('0x20')]:_0x1a0b55[_0xfae5('0x1d')]+_0x1a0b55[_0xfae5('0x1f')];var _0x246374;if(_0x2d7386>=_0x378fe8){_0x2d7386=_0x378fe8;_0x246374=0xc8;}else{_0x246374=0xce;}_0x390f06[_0xfae5('0x1c')](_0x246374);return _0x390f06[_0xfae5('0x21')](_0xfae5('0x22'),_0x3d3590+'-'+_0x2d7386+'/'+_0x378fe8)[_0xfae5('0x23')](_0x3ab9fa);}return null;};}function patchUpdates(_0xd4fce8){return function(_0x36fa43){try{jsonpatch[_0xfae5('0x24')](_0x36fa43,_0xd4fce8,!![]);}catch(_0x14aa19){return BPromise[_0xfae5('0x25')](_0x14aa19);}return _0x36fa43[_0xfae5('0x26')]();};}function saveUpdates(_0x1fa62e,_0x35671d){return function(_0x140e39){if(_0x140e39){return _0x140e39[_0xfae5('0x27')](_0x1fa62e)[_0xfae5('0x28')](function(_0x25e7cb){return _0x25e7cb;});}return null;};}function removeEntity(_0x2656a8,_0x2a39bf){return function(_0x551507){if(_0x551507){return _0x551507['destroy']()[_0xfae5('0x28')](function(){var _0x7d7333=_0x551507[_0xfae5('0x29')]({'plain':!![]});var _0x1770a7='CustomReports';return db[_0xfae5('0x2a')]['destroy']({'where':{'type':_0x1770a7,'resourceId':_0x7d7333['id']}})[_0xfae5('0x28')](function(){return _0x551507;});})[_0xfae5('0x28')](function(){_0x2656a8[_0xfae5('0x1c')](0xcc)[_0xfae5('0x1b')]();});}};}function handleEntityNotFound(_0x2817de,_0x1be20b){return function(_0x1518be){if(!_0x1518be){_0x2817de[_0xfae5('0x2b')](0x194);}return _0x1518be;};}function handleError(_0x43a8a7,_0x421fe1){_0x421fe1=_0x421fe1||0x1f4;return function(_0x5d0801){logger[_0xfae5('0x2c')](_0x5d0801[_0xfae5('0x2d')]);if(_0x5d0801[_0xfae5('0x2e')]){delete _0x5d0801[_0xfae5('0x2e')];}_0x43a8a7[_0xfae5('0x1c')](_0x421fe1)[_0xfae5('0x2f')](_0x5d0801);};}exports[_0xfae5('0x30')]=function(_0x224d65,_0x3e3a69){var _0x2d25eb={},_0x5ccbf6={},_0x321d0e={'count':0x0,'rows':[]};var _0x3f079d=_['map'](db[_0xfae5('0x31')]['rawAttributes'],function(_0x3aed2a){return{'name':_0x3aed2a[_0xfae5('0x32')],'type':_0x3aed2a['type'][_0xfae5('0x33')]};});_0x5ccbf6[_0xfae5('0x34')]=_['map'](_0x3f079d,_0xfae5('0x2e'));_0x5ccbf6['query']=_['keys'](_0x224d65[_0xfae5('0x35')]);_0x5ccbf6[_0xfae5('0x36')]=_['intersection'](_0x5ccbf6[_0xfae5('0x34')],_0x5ccbf6[_0xfae5('0x35')]);_0x2d25eb[_0xfae5('0x37')]=_[_0xfae5('0x38')](_0x5ccbf6['model'],qs['fields'](_0x224d65['query'][_0xfae5('0x39')]));_0x2d25eb[_0xfae5('0x37')]=_0x2d25eb['attributes'][_0xfae5('0x3a')]?_0x2d25eb['attributes']:_0x5ccbf6['model'];if(!_0x224d65[_0xfae5('0x35')][_0xfae5('0x3b')]('nolimit')){_0x2d25eb[_0xfae5('0x1f')]=qs[_0xfae5('0x1f')](_0x224d65[_0xfae5('0x35')][_0xfae5('0x1f')]);_0x2d25eb[_0xfae5('0x1d')]=qs[_0xfae5('0x1d')](_0x224d65['query'][_0xfae5('0x1d')]);}_0x2d25eb[_0xfae5('0x3c')]=qs[_0xfae5('0x3d')](_0x224d65[_0xfae5('0x35')]['sort']);_0x2d25eb[_0xfae5('0x3e')]=qs[_0xfae5('0x36')](_[_0xfae5('0x3f')](_0x224d65[_0xfae5('0x35')],_0x5ccbf6[_0xfae5('0x36')]),_0x3f079d);if(_0x224d65[_0xfae5('0x35')][_0xfae5('0x40')]){_0x2d25eb['where']=_['merge'](_0x2d25eb[_0xfae5('0x3e')],{'$or':_[_0xfae5('0x41')](_0x3f079d,function(_0x4835b7){if(_0x4835b7[_0xfae5('0x42')]!==_0xfae5('0x43')){var _0x3e389d={};_0x3e389d[_0x4835b7[_0xfae5('0x2e')]]={'$like':'%'+_0x224d65['query']['filter']+'%'};return _0x3e389d;}})});}_0x2d25eb=_[_0xfae5('0x44')]({},_0x2d25eb,_0x224d65['options']);var _0x59dbff={'where':_0x2d25eb['where']};return db[_0xfae5('0x31')]['count'](_0x59dbff)[_0xfae5('0x28')](function(_0x41e4ad){_0x321d0e[_0xfae5('0x20')]=_0x41e4ad;if(_0x224d65['query'][_0xfae5('0x45')]){_0x2d25eb[_0xfae5('0x46')]=[{'all':!![]}];}return db['AnalyticCustomReport'][_0xfae5('0x47')](_0x2d25eb);})['then'](function(_0x185006){_0x321d0e[_0xfae5('0x48')]=_0x185006;return _0x321d0e;})['then'](respondWithFilteredResult(_0x3e3a69,_0x2d25eb))['catch'](handleError(_0x3e3a69,null));};exports[_0xfae5('0x49')]=function(_0x3b1711,_0x292f99){var _0x1692c8={'raw':![],'where':{'id':_0x3b1711[_0xfae5('0x4a')]['id']}},_0x5d6505={};_0x5d6505['model']=_['keys'](db[_0xfae5('0x31')]['rawAttributes']);_0x5d6505[_0xfae5('0x35')]=_[_0xfae5('0x4b')](_0x3b1711[_0xfae5('0x35')]);_0x5d6505['filters']=_[_0xfae5('0x38')](_0x5d6505[_0xfae5('0x34')],_0x5d6505[_0xfae5('0x35')]);_0x1692c8['attributes']=_[_0xfae5('0x38')](_0x5d6505['model'],qs[_0xfae5('0x39')](_0x3b1711[_0xfae5('0x35')]['fields']));_0x1692c8[_0xfae5('0x37')]=_0x1692c8[_0xfae5('0x37')][_0xfae5('0x3a')]?_0x1692c8[_0xfae5('0x37')]:_0x5d6505['model'];if(_0x3b1711['query'][_0xfae5('0x45')]){_0x1692c8[_0xfae5('0x46')]=[{'all':!![]}];}_0x1692c8=_['merge']({},_0x1692c8,_0x3b1711[_0xfae5('0x4c')]);return db[_0xfae5('0x31')][_0xfae5('0x4d')](_0x1692c8)[_0xfae5('0x28')](handleEntityNotFound(_0x292f99,null))['then'](respondWithResult(_0x292f99,null))['catch'](handleError(_0x292f99,null));};exports[_0xfae5('0x4e')]=function(_0x5b1480,_0x696bfc){return db['AnalyticCustomReport'][_0xfae5('0x4e')](_0x5b1480[_0xfae5('0x4f')],{})[_0xfae5('0x28')](function(_0x415a2f){var _0x11b07d=_0x5b1480[_0xfae5('0x50')][_0xfae5('0x29')]({'plain':!![]});if(!_0x11b07d)throw new Error(_0xfae5('0x51'));if(_0x11b07d['role']==='user'){var _0x483dd8=_0x415a2f[_0xfae5('0x29')]({'plain':!![]});var _0x5be195=_0xfae5('0x52');return db['UserProfileSection'][_0xfae5('0x4d')]({'where':{'name':_0x5be195,'userProfileId':_0x11b07d[_0xfae5('0x53')]},'raw':!![]})[_0xfae5('0x28')](function(_0x2a435b){if(_0x2a435b&&_0x2a435b[_0xfae5('0x54')]===0x0){return db[_0xfae5('0x2a')][_0xfae5('0x4e')]({'name':_0x483dd8[_0xfae5('0x2e')],'resourceId':_0x483dd8['id'],'type':_0xfae5('0x55'),'sectionId':_0x2a435b['id']},{})[_0xfae5('0x28')](function(){return _0x415a2f;});}else{return _0x415a2f;}})['catch'](function(_0x92d9ba){logger['error'](_0xfae5('0x56'),_0x92d9ba);throw _0x92d9ba;});}return _0x415a2f;})[_0xfae5('0x28')](respondWithResult(_0x696bfc,0xc9))[_0xfae5('0x57')](handleError(_0x696bfc,null));};exports[_0xfae5('0x27')]=function(_0x48b013,_0x8e3aa3){if(_0x48b013[_0xfae5('0x4f')]['id']){delete _0x48b013[_0xfae5('0x4f')]['id'];}return db[_0xfae5('0x31')][_0xfae5('0x4d')]({'where':{'id':_0x48b013[_0xfae5('0x4a')]['id']}})[_0xfae5('0x28')](handleEntityNotFound(_0x8e3aa3,null))[_0xfae5('0x28')](saveUpdates(_0x48b013[_0xfae5('0x4f')],null))[_0xfae5('0x28')](respondWithResult(_0x8e3aa3,null))[_0xfae5('0x57')](handleError(_0x8e3aa3,null));};exports['destroy']=function(_0x84b196,_0x1f88f4){return db[_0xfae5('0x31')]['find']({'where':{'id':_0x84b196[_0xfae5('0x4a')]['id']}})[_0xfae5('0x28')](handleEntityNotFound(_0x1f88f4,null))['then'](removeEntity(_0x1f88f4,null))[_0xfae5('0x57')](handleError(_0x1f88f4,null));};exports[_0xfae5('0x58')]=function(_0x2fd757,_0x28b758){var _0x52dc1e=0xa;var _0x359e10=[_0xfae5('0x59'),'left_join','right_join',_0xfae5('0x5a')];var _0x46316d={'SUM':'SUM(%s)','COUNT':'COUNT(%s)','COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0xfae5('0x5b'),'MIN':_0xfae5('0x5c'),'AVG':'AVG(%s)','GROUP_CONCAT':_0xfae5('0x5d'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0xfae5('0x5e')};var _0x2af6a9={'SEC_TO_TIME':_0xfae5('0x5f'),'DATE':'DATE(%s)','HOUR':'HOUR(%s)','ROUND':'ROUND(%s)','UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x19bc32=function(_0x3957d5){return!_[_0xfae5('0x60')]([_0xfae5('0x61'),_0xfae5('0x62'),_0xfae5('0x63'),_0xfae5('0x64')],_0x3957d5);};var _0x2604db=function(_0x3f4cff){if(!_0x3f4cff||!_0x3f4cff[_0xfae5('0x65')][_0xfae5('0x3a')]){return'';}for(var _0x37b848='(',_0x428898=0x0;_0x428898<_0x3f4cff[_0xfae5('0x65')][_0xfae5('0x3a')];_0x428898+=0x1){_0x428898>0x0&&(_0x37b848+='\x20'+_0x3f4cff[_0xfae5('0x66')]+'\x20');_0x37b848+=_0x3f4cff[_0xfae5('0x65')][_0x428898][_0xfae5('0x67')]?_0x2604db(_0x3f4cff['rules'][_0x428898][_0xfae5('0x67')]):_0x3f4cff[_0xfae5('0x65')][_0x428898][_0xfae5('0x68')]+'\x20'+_0x3f4cff[_0xfae5('0x65')][_0x428898][_0xfae5('0x69')]+(_0x19bc32(_0x3f4cff['rules'][_0x428898][_0xfae5('0x69')])?'\x20'+_0x3f4cff[_0xfae5('0x65')][_0x428898][_0xfae5('0x6a')]:'');}return _0x37b848+')';};var _0x179ed8={'where':{'id':_0x2fd757[_0xfae5('0x4a')]['id']}},_0x53c43f,_0x1d94b4,_0x20946d,_0x37ec36,_0x3a478b;_0x179ed8=_[_0xfae5('0x44')]({},_0x179ed8,_0x2fd757[_0xfae5('0x4c')]);return db[_0xfae5('0x31')]['find'](_0x179ed8)[_0xfae5('0x28')](function(_0x516be8){if(_0x516be8){_0x53c43f=_0x516be8;return _0x516be8[_0xfae5('0x6b')]();}return null;})['then'](function(_0x34eb25){if(_0x34eb25){if(!_0x34eb25[_0xfae5('0x3a')]){throw new db[(_0xfae5('0x6c'))][(_0xfae5('0x6d'))](_0xfae5('0x6e'),0x193);}_0x1d94b4=_0x34eb25;return db[_0xfae5('0x6f')][_0xfae5('0x47')]({'raw':!![]});}return null;})[_0xfae5('0x28')](function(_0x2e8e1f){if(_0x2e8e1f){_0x20946d=_['keyBy'](_0x2e8e1f,'id');var _0x3383e3;var _0x7a68ac=squel[_0xfae5('0x70')]();_0x7a68ac[_0xfae5('0x71')](_0x53c43f[_0xfae5('0x72')]);for(var _0x59a8ce=0x0;_0x59a8ce<_0x1d94b4[_0xfae5('0x3a')];_0x59a8ce+=0x1){_0x3383e3=_0x1d94b4[_0x59a8ce]['MetricId']?_0x20946d[_0x1d94b4[_0x59a8ce][_0xfae5('0x73')]][_0xfae5('0x74')]:_0x1d94b4[_0x59a8ce][_0xfae5('0x68')];_0x3383e3=_0x1d94b4[_0x59a8ce][_0xfae5('0x75')]?_[_0xfae5('0x76')](_0x46316d[_0x1d94b4[_0x59a8ce][_0xfae5('0x75')]],'%s',_0x3383e3):_0x3383e3;_0x3383e3=_0x1d94b4[_0x59a8ce]['format']?_[_0xfae5('0x76')](_0x2af6a9[_0x1d94b4[_0x59a8ce][_0xfae5('0x77')]],'%s',_0x3383e3):_0x3383e3;if(_0x1d94b4[_0x59a8ce][_0xfae5('0x78')]){_0x7a68ac['group'](_0x3383e3);}_0x1d94b4[_0x59a8ce][_0xfae5('0x79')]&&_0x7a68ac[_0xfae5('0x3c')](_0x3383e3,_0x1d94b4[_0x59a8ce]['orderBy']===_0xfae5('0x7a')?![]:!![]);_0x7a68ac[_0xfae5('0x68')](_0x3383e3,_0x1d94b4[_0x59a8ce][_0xfae5('0x7b')]||_0x3383e3);}if(_0x53c43f['joins']){_0x53c43f[_0xfae5('0x7c')]=JSON['parse'](_0x53c43f[_0xfae5('0x7c')]);for(var _0x2b889c=0x0;_0x2b889c<_0x53c43f[_0xfae5('0x7c')]['length'];_0x2b889c+=0x1){if(_0x53c43f[_0xfae5('0x7c')][_0x2b889c][_0xfae5('0x42')]&&_[_0xfae5('0x60')](_0x359e10,_0x53c43f['joins'][_0x2b889c][_0xfae5('0x42')])&&_0x53c43f[_0xfae5('0x7c')][_0x2b889c]['parentKey']&&_0x53c43f[_0xfae5('0x7c')][_0x2b889c][_0xfae5('0x7d')]&&_0x53c43f[_0xfae5('0x7c')][_0x2b889c]['foreignKey']){_0x7a68ac[_0x53c43f['joins'][_0x2b889c][_0xfae5('0x42')]](_0x53c43f[_0xfae5('0x7c')][_0x2b889c][_0xfae5('0x7d')],null,util['format']('%s.%s\x20=\x20%s.%s',_0x53c43f[_0xfae5('0x72')],_0x53c43f['joins'][_0x2b889c][_0xfae5('0x7e')],_0x53c43f[_0xfae5('0x7c')][_0x2b889c][_0xfae5('0x7d')],_0x53c43f[_0xfae5('0x7c')][_0x2b889c][_0xfae5('0x7f')]));}}}if(_0x53c43f[_0xfae5('0x80')]){_0x53c43f['conditions']=JSON['parse'](_0x53c43f[_0xfae5('0x80')]);_0x7a68ac[_0xfae5('0x3e')](_0x2604db(_0x53c43f['conditions']['group']));}_0x3a478b=_0x7a68ac[_0xfae5('0x81')]();_0x7a68ac['limit'](_0x52dc1e);_0x7a68ac[_0xfae5('0x1d')](0x0);logger[_0xfae5('0x82')](_0xfae5('0x83'),_0x7a68ac[_0xfae5('0x84')]());return dbH[_0xfae5('0x85')][_0xfae5('0x35')](_0x7a68ac[_0xfae5('0x84')](),{'type':dbH[_0xfae5('0x85')][_0xfae5('0x86')][_0xfae5('0x87')]});}})[_0xfae5('0x28')](respondWithResult(_0x28b758,null))[_0xfae5('0x57')](handleError(_0x28b758,null));};function runReport(_0x4627b8,_0x10436e,_0x1a2e5f){var _0x4bbec1=_0x10436e[_0xfae5('0x2e')];var _0x3ba369=0xa;var _0x3e1487=[_0xfae5('0x59'),_0xfae5('0x88'),_0xfae5('0x89'),'cross_join'];var _0x3d121f={'SUM':'SUM(%s)','COUNT':_0xfae5('0x8a'),'COUNT DISTINCT':_0xfae5('0x8b'),'MAX':_0xfae5('0x5b'),'MIN':_0xfae5('0x5c'),'AVG':'AVG(%s)','GROUP_CONCAT':_0xfae5('0x5d'),'GROUP_CONCAT ASC':_0xfae5('0x8c'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x4a055a={'SEC_TO_TIME':_0xfae5('0x5f'),'DATE':'DATE(%s)','HOUR':_0xfae5('0x8d'),'ROUND':_0xfae5('0x8e'),'UNIX_TIMESTAMP':_0xfae5('0x8f')};var _0x107023=function(_0x13c270){return!_['includes']([_0xfae5('0x61'),_0xfae5('0x62'),_0xfae5('0x63'),_0xfae5('0x64')],_0x13c270);};var _0x587ca9=function(_0x564ac1){if(!_0x564ac1||!_0x564ac1[_0xfae5('0x65')]['length']){return'';}for(var _0x51932a='(',_0x46f46e=0x0;_0x46f46e<_0x564ac1['rules'][_0xfae5('0x3a')];_0x46f46e+=0x1){_0x46f46e>0x0&&(_0x51932a+='\x20'+_0x564ac1[_0xfae5('0x66')]+'\x20');_0x51932a+=_0x564ac1[_0xfae5('0x65')][_0x46f46e]['group']?_0x587ca9(_0x564ac1['rules'][_0x46f46e][_0xfae5('0x67')]):_0x564ac1[_0xfae5('0x65')][_0x46f46e][_0xfae5('0x68')]+'\x20'+_0x564ac1[_0xfae5('0x65')][_0x46f46e]['condition']+(_0x107023(_0x564ac1[_0xfae5('0x65')][_0x46f46e][_0xfae5('0x69')])?'\x20'+_0x564ac1[_0xfae5('0x65')][_0x46f46e][_0xfae5('0x6a')]:'');}return _0x51932a+')';};var _0x4b1dfc={'where':{'id':_0x4627b8['id']}},_0x461ab7,_0x295c58,_0x10959d,_0x353fbc,_0x2410f6;_0x4b1dfc=_['merge']({},_0x4b1dfc,_0x1a2e5f);return db['AnalyticCustomReport'][_0xfae5('0x4d')](_0x4b1dfc)[_0xfae5('0x28')](function(_0x3aa772){if(_0x3aa772){_0x461ab7=_0x3aa772;return _0x3aa772[_0xfae5('0x6b')]();}return null;})[_0xfae5('0x28')](function(_0x1dac43){if(_0x1dac43){if(!_0x1dac43['length']){throw new db[(_0xfae5('0x6c'))][(_0xfae5('0x6d'))](_0xfae5('0x6e'),0x193);}_0x295c58=_0x1dac43;return db[_0xfae5('0x6f')][_0xfae5('0x47')]({'raw':!![]});}return null;})[_0xfae5('0x28')](function(_0x378e36){if(_0x378e36){_0x10959d=_['keyBy'](_0x378e36,'id');var _0x545d2d;var _0x3c8b23=squel['select']();_0x3c8b23[_0xfae5('0x71')](_0x461ab7['table']);for(var _0x19466e=0x0;_0x19466e<_0x295c58[_0xfae5('0x3a')];_0x19466e+=0x1){_0x545d2d=_0x295c58[_0x19466e][_0xfae5('0x73')]?_0x10959d[_0x295c58[_0x19466e][_0xfae5('0x73')]][_0xfae5('0x74')]:_0x295c58[_0x19466e][_0xfae5('0x68')];_0x545d2d=_0x295c58[_0x19466e][_0xfae5('0x75')]?_[_0xfae5('0x76')](_0x3d121f[_0x295c58[_0x19466e][_0xfae5('0x75')]],'%s',_0x545d2d):_0x545d2d;_0x545d2d=_0x295c58[_0x19466e][_0xfae5('0x77')]?_[_0xfae5('0x76')](_0x4a055a[_0x295c58[_0x19466e][_0xfae5('0x77')]],'%s',_0x545d2d):_0x545d2d;if(_0x295c58[_0x19466e]['groupBy']){_0x3c8b23['group'](_0x545d2d);}_0x295c58[_0x19466e][_0xfae5('0x79')]&&_0x3c8b23['order'](_0x545d2d,_0x295c58[_0x19466e][_0xfae5('0x79')]===_0xfae5('0x7a')?![]:!![]);_0x3c8b23[_0xfae5('0x68')](_0x545d2d,_0x295c58[_0x19466e][_0xfae5('0x7b')]||_0x545d2d);}if(_0x461ab7[_0xfae5('0x7c')]){_0x461ab7[_0xfae5('0x7c')]=JSON[_0xfae5('0x90')](_0x461ab7[_0xfae5('0x7c')]);for(var _0x36e2ec=0x0;_0x36e2ec<_0x461ab7[_0xfae5('0x7c')][_0xfae5('0x3a')];_0x36e2ec+=0x1){if(_0x461ab7[_0xfae5('0x7c')][_0x36e2ec][_0xfae5('0x42')]&&_[_0xfae5('0x60')](_0x3e1487,_0x461ab7['joins'][_0x36e2ec][_0xfae5('0x42')])&&_0x461ab7[_0xfae5('0x7c')][_0x36e2ec][_0xfae5('0x7e')]&&_0x461ab7[_0xfae5('0x7c')][_0x36e2ec][_0xfae5('0x7d')]&&_0x461ab7[_0xfae5('0x7c')][_0x36e2ec][_0xfae5('0x7f')]){_0x3c8b23[_0x461ab7[_0xfae5('0x7c')][_0x36e2ec][_0xfae5('0x42')]](_0x461ab7[_0xfae5('0x7c')][_0x36e2ec][_0xfae5('0x7d')],null,util[_0xfae5('0x77')](_0xfae5('0x91'),_0x461ab7[_0xfae5('0x72')],_0x461ab7['joins'][_0x36e2ec][_0xfae5('0x7e')],_0x461ab7[_0xfae5('0x7c')][_0x36e2ec][_0xfae5('0x7d')],_0x461ab7[_0xfae5('0x7c')][_0x36e2ec]['foreignKey']));}}}if(_0x461ab7[_0xfae5('0x80')]){_0x461ab7[_0xfae5('0x80')]=JSON[_0xfae5('0x90')](_0x461ab7['conditions']);_0x3c8b23[_0xfae5('0x3e')](_0x587ca9(_0x461ab7[_0xfae5('0x80')][_0xfae5('0x67')]));}_0x2410f6=_0x3c8b23[_0xfae5('0x81')]();_0x3c8b23[_0xfae5('0x1f')](_0x3ba369);_0x3c8b23['offset'](0x0);return;}})[_0xfae5('0x28')](function(){if(_0x10436e[_0xfae5('0x92')]===_0xfae5('0x93')){return null;}var _0x44578a=_[_0xfae5('0x44')](_0x10436e,{'name':_0x10436e[_0xfae5('0x94')]||_0x10436e[_0xfae5('0x2e')]||_0x461ab7[_0xfae5('0x2e')],'basename':_0x4bbec1,'savename':util['format'](_0xfae5('0x95'),_0x10436e[_0xfae5('0x2e')]||_0x461ab7[_0xfae5('0x2e')],require('randomstring')[_0xfae5('0x96')](0x4),_0x10436e[_0xfae5('0x92')]||_0xfae5('0x97')),'reportId':_0x461ab7['id'],'reportType':_0xfae5('0x98')});return db[_0xfae5('0x99')][_0xfae5('0x4e')](_0x44578a,{'raw':!![]});})[_0xfae5('0x28')](function(_0x57d104){if(_0x461ab7[_0xfae5('0x72')]===_0xfae5('0x9a')){_0x2410f6['where'](_0x461ab7['table']+_0xfae5('0x9b'),_0x10436e[_0xfae5('0x9c')],_0x10436e[_0xfae5('0x9d')]);}else{_0x2410f6[_0xfae5('0x3e')](_0x461ab7['table']+_0xfae5('0x9e'),_0x10436e['startDate'],_0x10436e['endDate']);}if(_0x57d104){logger[_0xfae5('0x9f')](_0xfae5('0xa0'),_0x2410f6[_0xfae5('0x84')]());require('child_process')[_0xfae5('0xa1')](path[_0xfae5('0x59')](__dirname,_0xfae5('0xa2'),_0x57d104[_0xfae5('0x92')]),[_0x57d104['id'],_0x2410f6['toString'](),path[_0xfae5('0x59')](__dirname,_0xfae5('0xa3'),_0x57d104[_0xfae5('0xa4')]),_0x4bbec1]);return _0x57d104;}else{var _0x52d45b=squel[_0xfae5('0x70')]();_0x52d45b[_0xfae5('0x71')]('('+_0x2410f6[_0xfae5('0x84')]()+')',_0xfae5('0xa5'));_0x52d45b['field'](_0xfae5('0xa6'),_0xfae5('0x20'));_0x2410f6['limit'](_0x10436e[_0xfae5('0x1f')]||_0x3ba369);_0x2410f6[_0xfae5('0x1d')](_0x10436e['offset']||0x0);return dbH[_0xfae5('0x85')]['query'](_0x52d45b['toString'](),{'type':dbH[_0xfae5('0x85')]['QueryTypes'][_0xfae5('0x87')]})[_0xfae5('0x28')](function(_0x201ff4){if(!_0x201ff4[_0xfae5('0x3a')]){_0x353fbc=0x0;}else{_0x353fbc=_0x201ff4[0x0][_0xfae5('0x20')]||0x0;}return dbH[_0xfae5('0x85')]['query'](_0x2410f6[_0xfae5('0x84')](),{'type':dbH[_0xfae5('0x85')][_0xfae5('0x86')][_0xfae5('0x87')]});})[_0xfae5('0x28')](function(_0x72acf3){return{'rows':_0x72acf3||[],'count':_0x353fbc};});}});}exports[_0xfae5('0xa7')]=function(_0xef79c3,_0x51d166){return runReport(_0xef79c3['params'],_0xef79c3[_0xfae5('0x35')],_0xef79c3['options'])[_0xfae5('0x28')](respondWithResult(_0x51d166,null))[_0xfae5('0x57')](handleError(_0x51d166,null));};exports[_0xfae5('0xa8')]=runReport;exports['query']=function(_0x326065,_0xab1301){var _0x151d42=0xa;var _0x5efc80=[_0xfae5('0x59'),_0xfae5('0x88'),_0xfae5('0x89'),_0xfae5('0x5a')];var _0x45f2fd={'SUM':'SUM(%s)','COUNT':'COUNT(%s)','COUNT DISTINCT':_0xfae5('0x8b'),'MAX':_0xfae5('0x5b'),'MIN':'MIN(%s)','AVG':'AVG(%s)','GROUP_CONCAT':_0xfae5('0x5d'),'GROUP_CONCAT ASC':_0xfae5('0x8c'),'GROUP_CONCAT DESC':_0xfae5('0x5e')};var _0x4bdaa6={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0xfae5('0xa9'),'HOUR':'HOUR(%s)','ROUND':_0xfae5('0x8e'),'UNIX_TIMESTAMP':_0xfae5('0x8f')};var _0xd84484=function(_0x22b4f6){return!_['includes']([_0xfae5('0x61'),_0xfae5('0x62'),_0xfae5('0x63'),_0xfae5('0x64')],_0x22b4f6);};var _0x4ef65a=function(_0x2ad9ec){if(!_0x2ad9ec||!_0x2ad9ec[_0xfae5('0x65')][_0xfae5('0x3a')]){return'';}for(var _0x55a144='(',_0x2d5908=0x0;_0x2d5908<_0x2ad9ec[_0xfae5('0x65')][_0xfae5('0x3a')];_0x2d5908+=0x1){_0x2d5908>0x0&&(_0x55a144+='\x20'+_0x2ad9ec[_0xfae5('0x66')]+'\x20');_0x55a144+=_0x2ad9ec[_0xfae5('0x65')][_0x2d5908][_0xfae5('0x67')]?_0x4ef65a(_0x2ad9ec[_0xfae5('0x65')][_0x2d5908][_0xfae5('0x67')]):_0x2ad9ec[_0xfae5('0x65')][_0x2d5908][_0xfae5('0x68')]+'\x20'+_0x2ad9ec[_0xfae5('0x65')][_0x2d5908]['condition']+(_0xd84484(_0x2ad9ec[_0xfae5('0x65')][_0x2d5908][_0xfae5('0x69')])?'\x20'+_0x2ad9ec[_0xfae5('0x65')][_0x2d5908][_0xfae5('0x6a')]:'');}return _0x55a144+')';};var _0x427642={'where':{'id':_0x326065[_0xfae5('0x4a')]['id']}},_0x19fb49,_0x59bd95,_0x1f9fdc,_0x240640,_0x25461e;_0x427642=_['merge']({},_0x427642,_0x326065[_0xfae5('0x4c')]);return db[_0xfae5('0x31')][_0xfae5('0x4d')](_0x427642)[_0xfae5('0x28')](function(_0x1a9165){if(_0x1a9165){_0x19fb49=_0x1a9165;return _0x1a9165['getFields']();}return null;})[_0xfae5('0x28')](function(_0x5c9e52){if(_0x5c9e52){if(!_0x5c9e52['length']){throw new db[(_0xfae5('0x6c'))][(_0xfae5('0x6d'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x59bd95=_0x5c9e52;return db['AnalyticMetric']['findAll']({'raw':!![]});}return null;})[_0xfae5('0x28')](function(_0x591ef0){if(_0x591ef0){_0x1f9fdc=_[_0xfae5('0xaa')](_0x591ef0,'id');var _0x3dc9b0;var _0xf0f17f=squel[_0xfae5('0x70')]();_0xf0f17f['from'](_0x19fb49[_0xfae5('0x72')]);for(var _0xbdf74c=0x0;_0xbdf74c<_0x59bd95[_0xfae5('0x3a')];_0xbdf74c+=0x1){_0x3dc9b0=_0x59bd95[_0xbdf74c]['MetricId']?_0x1f9fdc[_0x59bd95[_0xbdf74c][_0xfae5('0x73')]][_0xfae5('0x74')]:_0x59bd95[_0xbdf74c][_0xfae5('0x68')];_0x3dc9b0=_0x59bd95[_0xbdf74c][_0xfae5('0x75')]?_[_0xfae5('0x76')](_0x45f2fd[_0x59bd95[_0xbdf74c][_0xfae5('0x75')]],'%s',_0x3dc9b0):_0x3dc9b0;_0x3dc9b0=_0x59bd95[_0xbdf74c][_0xfae5('0x77')]?_[_0xfae5('0x76')](_0x4bdaa6[_0x59bd95[_0xbdf74c]['format']],'%s',_0x3dc9b0):_0x3dc9b0;if(_0x59bd95[_0xbdf74c][_0xfae5('0x78')]){_0xf0f17f[_0xfae5('0x67')](_0x3dc9b0);}_0x59bd95[_0xbdf74c][_0xfae5('0x79')]&&_0xf0f17f[_0xfae5('0x3c')](_0x3dc9b0,_0x59bd95[_0xbdf74c][_0xfae5('0x79')]===_0xfae5('0x7a')?![]:!![]);_0xf0f17f['field'](_0x3dc9b0,_0x59bd95[_0xbdf74c][_0xfae5('0x7b')]||_0x3dc9b0);}if(_0x19fb49[_0xfae5('0x7c')]){_0x19fb49[_0xfae5('0x7c')]=JSON['parse'](_0x19fb49[_0xfae5('0x7c')]);for(var _0x4589c1=0x0;_0x4589c1<_0x19fb49[_0xfae5('0x7c')]['length'];_0x4589c1+=0x1){if(_0x19fb49['joins'][_0x4589c1][_0xfae5('0x42')]&&_['includes'](_0x5efc80,_0x19fb49[_0xfae5('0x7c')][_0x4589c1][_0xfae5('0x42')])&&_0x19fb49[_0xfae5('0x7c')][_0x4589c1][_0xfae5('0x7e')]&&_0x19fb49[_0xfae5('0x7c')][_0x4589c1][_0xfae5('0x7d')]&&_0x19fb49['joins'][_0x4589c1][_0xfae5('0x7f')]){_0xf0f17f[_0x19fb49[_0xfae5('0x7c')][_0x4589c1]['type']](_0x19fb49[_0xfae5('0x7c')][_0x4589c1][_0xfae5('0x7d')],null,util['format'](_0xfae5('0x91'),_0x19fb49['table'],_0x19fb49[_0xfae5('0x7c')][_0x4589c1][_0xfae5('0x7e')],_0x19fb49[_0xfae5('0x7c')][_0x4589c1][_0xfae5('0x7d')],_0x19fb49[_0xfae5('0x7c')][_0x4589c1][_0xfae5('0x7f')]));}}}if(_0x19fb49[_0xfae5('0x80')]){_0x19fb49[_0xfae5('0x80')]=JSON[_0xfae5('0x90')](_0x19fb49[_0xfae5('0x80')]);_0xf0f17f[_0xfae5('0x3e')](_0x4ef65a(_0x19fb49['conditions']['group']));}_0x25461e=_0xf0f17f[_0xfae5('0x81')]();_0xf0f17f[_0xfae5('0x1f')](_0x151d42);_0xf0f17f[_0xfae5('0x1d')](0x0);logger[_0xfae5('0x82')](_0xfae5('0x83'),_0xf0f17f[_0xfae5('0x84')]());return dbH[_0xfae5('0x85')][_0xfae5('0x35')](_0xf0f17f[_0xfae5('0x84')](),{'type':dbH[_0xfae5('0x85')]['QueryTypes'][_0xfae5('0x87')]});}})['then'](function(){return{'sql':_0x25461e['toString']()};})[_0xfae5('0x28')](respondWithResult(_0xab1301,null))[_0xfae5('0x57')](handleError(_0xab1301,null));};
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.model.js b/server/api/analyticCustomReport/analyticCustomReport.model.js
index a0eb980..1ee8d96 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 _0xbe91=['moment','bluebird','request-promise','../../config/environment','./analyticCustomReport.attributes','exports','AnalyticCustomReport','analytics_custom_reports','../../config/logger','api'];(function(_0x22ee1e,_0x3eff80){var _0x49a5c9=function(_0x373480){while(--_0x373480){_0x22ee1e['push'](_0x22ee1e['shift']());}};_0x49a5c9(++_0x3eff80);}(_0xbe91,0xe4));var _0x1be9=function(_0x22c415,_0x273b84){_0x22c415=_0x22c415-0x0;var _0x3ef055=_0xbe91[_0x22c415];return _0x3ef055;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x1be9('0x0'))(_0x1be9('0x1'));var moment=require(_0x1be9('0x2'));var BPromise=require(_0x1be9('0x3'));var rp=require(_0x1be9('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x1be9('0x5'));var attributes=require(_0x1be9('0x6'));module[_0x1be9('0x7')]=function(_0x19262c,_0x20eb7d){return _0x19262c['define'](_0x1be9('0x8'),attributes,{'tableName':_0x1be9('0x9'),'paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xec06=['api','moment','bluebird','rimraf','../../config/environment','./analyticCustomReport.attributes','define','AnalyticCustomReport','util','../../config/logger'];(function(_0x499662,_0x5b2d6d){var _0x3458e5=function(_0x3279d1){while(--_0x3279d1){_0x499662['push'](_0x499662['shift']());}};_0x3458e5(++_0x5b2d6d);}(_0xec06,0x15c));var _0x6ec0=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xec06[_0x122ef9];return _0x42fba0;};'use strict';var _=require('lodash');var util=require(_0x6ec0('0x0'));var logger=require(_0x6ec0('0x1'))(_0x6ec0('0x2'));var moment=require(_0x6ec0('0x3'));var BPromise=require(_0x6ec0('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x6ec0('0x5'));var config=require(_0x6ec0('0x6'));var attributes=require(_0x6ec0('0x7'));module['exports']=function(_0x11411c,_0x2156e4){return _0x11411c[_0x6ec0('0x8')](_0x6ec0('0x9'),attributes,{'tableName':'analytics_custom_reports','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 f8a9e1b..12d6016 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 _0x5692=['then','info','request\x20sent','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','error','message','AnalyticCustomReport,\x20%s,\x20%s','result','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','request'];(function(_0x3081ec,_0x19ced4){var _0x3cb142=function(_0x483dd6){while(--_0x483dd6){_0x3081ec['push'](_0x3081ec['shift']());}};_0x3cb142(++_0x19ced4);}(_0x5692,0x135));var _0x2569=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x5692[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x2569('0x0'));var util=require(_0x2569('0x1'));var moment=require(_0x2569('0x2'));var BPromise=require(_0x2569('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2569('0x4'))['db'];var utils=require(_0x2569('0x5'));var logger=require('../../config/logger')(_0x2569('0x6'));var config=require(_0x2569('0x7'));var jayson=require(_0x2569('0x8'));var client=jayson[_0x2569('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x26f9d4,_0x4b5712,_0x4624eb){return new BPromise(function(_0x530ebd,_0x4004f7){return client[_0x2569('0xa')](_0x26f9d4,_0x4624eb)[_0x2569('0xb')](function(_0x7861c8){logger[_0x2569('0xc')]('AnalyticCustomReport,\x20%s,\x20%s',_0x4b5712,_0x2569('0xd'));logger[_0x2569('0xe')](_0x2569('0xf'),_0x4b5712,_0x2569('0xd'),JSON['stringify'](_0x7861c8));if(_0x7861c8[_0x2569('0x10')]){if(_0x7861c8['error']['code']===0x1f4){logger[_0x2569('0x10')]('AnalyticCustomReport,\x20%s,\x20%s',_0x4b5712,_0x7861c8[_0x2569('0x10')][_0x2569('0x11')]);return _0x4004f7(_0x7861c8['error'][_0x2569('0x11')]);}logger['error']('AnalyticCustomReport,\x20%s,\x20%s',_0x4b5712,_0x7861c8[_0x2569('0x10')][_0x2569('0x11')]);return _0x530ebd(_0x7861c8['error'][_0x2569('0x11')]);}else{logger[_0x2569('0xc')](_0x2569('0x12'),_0x4b5712,'request\x20sent');_0x530ebd(_0x7861c8[_0x2569('0x13')][_0x2569('0x11')]);}})['catch'](function(_0x1207b7){logger[_0x2569('0x10')](_0x2569('0x12'),_0x4b5712,_0x1207b7);_0x4004f7(_0x1207b7);});});}
\ No newline at end of file
+var _0xbec6=['request\x20sent','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','error','message','info','result','catch','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','then','AnalyticCustomReport,\x20%s,\x20%s'];(function(_0x432d64,_0x5e7490){var _0x190b73=function(_0xa1d1ce){while(--_0xa1d1ce){_0x432d64['push'](_0x432d64['shift']());}};_0x190b73(++_0x5e7490);}(_0xbec6,0x182));var _0x6bec=function(_0x25fc41,_0x250864){_0x25fc41=_0x25fc41-0x0;var _0x1371d1=_0xbec6[_0x25fc41];return _0x1371d1;};'use strict';var _=require(_0x6bec('0x0'));var util=require(_0x6bec('0x1'));var moment=require('moment');var BPromise=require(_0x6bec('0x2'));var rs=require(_0x6bec('0x3'));var fs=require('fs');var Redis=require(_0x6bec('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x6bec('0x5'));var logger=require(_0x6bec('0x6'))(_0x6bec('0x7'));var config=require(_0x6bec('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0x6bec('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4d5da1,_0x17e552,_0x2e4938){return new BPromise(function(_0x1d6b45,_0x11e011){return client[_0x6bec('0xa')](_0x4d5da1,_0x2e4938)[_0x6bec('0xb')](function(_0x444087){logger['info'](_0x6bec('0xc'),_0x17e552,_0x6bec('0xd'));logger[_0x6bec('0xe')](_0x6bec('0xf'),_0x17e552,_0x6bec('0xd'),JSON['stringify'](_0x444087));if(_0x444087['error']){if(_0x444087['error']['code']===0x1f4){logger[_0x6bec('0x10')]('AnalyticCustomReport,\x20%s,\x20%s',_0x17e552,_0x444087['error'][_0x6bec('0x11')]);return _0x11e011(_0x444087[_0x6bec('0x10')]['message']);}logger[_0x6bec('0x10')](_0x6bec('0xc'),_0x17e552,_0x444087[_0x6bec('0x10')][_0x6bec('0x11')]);return _0x1d6b45(_0x444087['error'][_0x6bec('0x11')]);}else{logger[_0x6bec('0x12')](_0x6bec('0xc'),_0x17e552,_0x6bec('0xd'));_0x1d6b45(_0x444087[_0x6bec('0x13')][_0x6bec('0x11')]);}})[_0x6bec('0x14')](function(_0x4fd024){logger[_0x6bec('0x10')](_0x6bec('0xc'),_0x17e552,_0x4fd024);_0x11e011(_0x4fd024);});});}
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/index.js b/server/api/analyticCustomReport/index.js
index 40e23ff..0bf3476 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 _0x9b4b=['Router','fs-extra','../../components/auth/service','index','get','isAuthenticated','/:id/preview','preview','/:id/run','run','query','post','create','put','/:id','update','destroy','exports','util','path','connect-timeout','express'];(function(_0x5661b5,_0x4cb990){var _0x50d57a=function(_0x2a2e08){while(--_0x2a2e08){_0x5661b5['push'](_0x5661b5['shift']());}};_0x50d57a(++_0x4cb990);}(_0x9b4b,0x11a));var _0xb9b4=function(_0x44784c,_0x4498c1){_0x44784c=_0x44784c-0x0;var _0x4bbfb1=_0x9b4b[_0x44784c];return _0x4bbfb1;};'use strict';var multer=require('multer');var util=require(_0xb9b4('0x0'));var path=require(_0xb9b4('0x1'));var timeout=require(_0xb9b4('0x2'));var express=require(_0xb9b4('0x3'));var router=express[_0xb9b4('0x4')]();var fs_extra=require(_0xb9b4('0x5'));var auth=require(_0xb9b4('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./analyticCustomReport.controller');router['get']('/',auth['isAuthenticated'](),controller[_0xb9b4('0x7')]);router[_0xb9b4('0x8')]('/:id',auth[_0xb9b4('0x9')](),controller['show']);router[_0xb9b4('0x8')](_0xb9b4('0xa'),auth[_0xb9b4('0x9')](),controller[_0xb9b4('0xb')]);router[_0xb9b4('0x8')](_0xb9b4('0xc'),auth[_0xb9b4('0x9')](),controller[_0xb9b4('0xd')]);router[_0xb9b4('0x8')]('/:id/query',auth['isAuthenticated'](),controller[_0xb9b4('0xe')]);router[_0xb9b4('0xf')]('/',auth[_0xb9b4('0x9')](),controller[_0xb9b4('0x10')]);router[_0xb9b4('0x11')](_0xb9b4('0x12'),auth[_0xb9b4('0x9')](),controller[_0xb9b4('0x13')]);router['delete'](_0xb9b4('0x12'),auth[_0xb9b4('0x9')](),controller[_0xb9b4('0x14')]);module[_0xb9b4('0x15')]=router;
\ No newline at end of file
+var _0x9d99=['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','query','post','create','update','destroy'];(function(_0x192660,_0x215c6d){var _0xf96c40=function(_0x4f784f){while(--_0x4f784f){_0x192660['push'](_0x192660['shift']());}};_0xf96c40(++_0x215c6d);}(_0x9d99,0xe6));var _0x99d9=function(_0x368fb9,_0x1a9895){_0x368fb9=_0x368fb9-0x0;var _0x4892fb=_0x9d99[_0x368fb9];return _0x4892fb;};'use strict';var multer=require(_0x99d9('0x0'));var util=require(_0x99d9('0x1'));var path=require(_0x99d9('0x2'));var timeout=require('connect-timeout');var express=require(_0x99d9('0x3'));var router=express[_0x99d9('0x4')]();var fs_extra=require(_0x99d9('0x5'));var auth=require(_0x99d9('0x6'));var interaction=require(_0x99d9('0x7'));var config=require(_0x99d9('0x8'));var controller=require(_0x99d9('0x9'));router[_0x99d9('0xa')]('/',auth[_0x99d9('0xb')](),controller[_0x99d9('0xc')]);router[_0x99d9('0xa')](_0x99d9('0xd'),auth[_0x99d9('0xb')](),controller[_0x99d9('0xe')]);router[_0x99d9('0xa')](_0x99d9('0xf'),auth['isAuthenticated'](),controller[_0x99d9('0x10')]);router[_0x99d9('0xa')](_0x99d9('0x11'),auth[_0x99d9('0xb')](),controller['run']);router[_0x99d9('0xa')]('/:id/query',auth[_0x99d9('0xb')](),controller[_0x99d9('0x12')]);router[_0x99d9('0x13')]('/',auth[_0x99d9('0xb')](),controller[_0x99d9('0x14')]);router['put'](_0x99d9('0xd'),auth[_0x99d9('0xb')](),controller[_0x99d9('0x15')]);router['delete'](_0x99d9('0xd'),auth['isAuthenticated'](),controller[_0x99d9('0x16')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js b/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js
index 11672cd..961e54a 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 _0xeda8=['sequelize','exports','STRING','TEXT'];(function(_0x1d3263,_0x4211b6){var _0x54bd9f=function(_0x5b68a2){while(--_0x5b68a2){_0x1d3263['push'](_0x1d3263['shift']());}};_0x54bd9f(++_0x4211b6);}(_0xeda8,0x104));var _0x8eda=function(_0x7dc0bb,_0x360abf){_0x7dc0bb=_0x7dc0bb-0x0;var _0x37d0d3=_0xeda8[_0x7dc0bb];return _0x37d0d3;};'use strict';var Sequelize=require(_0x8eda('0x0'));module[_0x8eda('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize[_0x8eda('0x2')]},'parent':{'type':Sequelize[_0x8eda('0x2')]},'table':{'type':Sequelize[_0x8eda('0x2')]},'conditions':{'type':Sequelize[_0x8eda('0x3')]},'joins':{'type':Sequelize[_0x8eda('0x3')]}};
\ No newline at end of file
+var _0x2eb2=['TEXT','exports','STRING'];(function(_0x247b2c,_0x52354c){var _0x14986e=function(_0xe60b3d){while(--_0xe60b3d){_0x247b2c['push'](_0x247b2c['shift']());}};_0x14986e(++_0x52354c);}(_0x2eb2,0x19f));var _0x22eb=function(_0x3a6efd,_0x2a5102){_0x3a6efd=_0x3a6efd-0x0;var _0x487b9a=_0x2eb2[_0x3a6efd];return _0x487b9a;};'use strict';var Sequelize=require('sequelize');module[_0x22eb('0x0')]={'name':{'type':Sequelize[_0x22eb('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x22eb('0x1')]},'parent':{'type':Sequelize[_0x22eb('0x1')]},'table':{'type':Sequelize[_0x22eb('0x1')]},'conditions':{'type':Sequelize[_0x22eb('0x2')]},'joins':{'type':Sequelize['TEXT']}};
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.controller.js b/server/api/analyticDefaultReport/analyticDefaultReport.controller.js
index d097b31..52fdc29 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 _0x687b=['util','path','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','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','limit','undefined','count','set','Content-Range','reject','save','update','then','get','DefaultReports','UserProfileResource','destroy','sendStatus','error','name','send','index','map','AnalyticDefaultReport','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','fields','length','hasOwnProperty','order','sort','where','pick','VIRTUAL','filter','options','findAll','catch','params','intersection','includeAll','include','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','Reports','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','join','left_join','right_join','COUNT(%s)','COUNT(DISTINCT\x20%s)','MAX(%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','ROUND(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','operator','group','field','condition','value','merge','getFields','Sequelize','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','keyBy','select','from','table','MetricId','metric','function','replace','format','groupBy','orderBy','alias','joins','parse','foreignTable','foreignKey','conditions','clone','debug','Limited\x20Query:','toString','sequelize','QueryTypes','SUM(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','SEC_TO_TIME(%s)','DATE(%s)','HOUR(%s)','ValidationErrorItem','DESC','parentKey','web','fullPath','%s-%s.%s','output','csv','default','AnalyticExtractedReport','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','Run\x20Query:','fork','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','SELECT','run','runReport','cross_join','%s.%s\x20=\x20%s.%s','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','mustache'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x687b,0x14a));var _0xb687=function(_0x15833e,_0x58a046){_0x15833e=_0x15833e-0x0;var _0x5c4745=_0x687b[_0x15833e];return _0x5c4745;};'use strict';var emlformat=require(_0xb687('0x0'));var rimraf=require(_0xb687('0x1'));var zipdir=require(_0xb687('0x2'));var jsonpatch=require(_0xb687('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xb687('0x4'));var Mustache=require(_0xb687('0x5'));var util=require(_0xb687('0x6'));var path=require(_0xb687('0x7'));var sox=require(_0xb687('0x8'));var csv=require(_0xb687('0x9'));var ejs=require(_0xb687('0xa'));var fs=require('fs');var fs_extra=require(_0xb687('0xb'));var _=require(_0xb687('0xc'));var squel=require(_0xb687('0xd'));var crypto=require('crypto');var jsforce=require(_0xb687('0xe'));var deskjs=require(_0xb687('0xf'));var toCsv=require('to-csv');var querystring=require(_0xb687('0x10'));var Papa=require(_0xb687('0x11'));var Redis=require(_0xb687('0x12'));var authService=require(_0xb687('0x13'));var qs=require(_0xb687('0x14'));var as=require(_0xb687('0x15'));var hardwareService=require(_0xb687('0x16'));var logger=require(_0xb687('0x17'))(_0xb687('0x18'));var utils=require('../../config/utils');var config=require(_0xb687('0x19'));var licenseUtil=require(_0xb687('0x1a'));var db=require(_0xb687('0x1b'))['db'];var dbH=require(_0xb687('0x1b'))['dbH'];function respondWithStatusCode(_0x4c97ed,_0x3e85b3){_0x3e85b3=_0x3e85b3||0xcc;return function(_0x155ebe){if(_0x155ebe){return _0x4c97ed['sendStatus'](_0x3e85b3);}return _0x4c97ed[_0xb687('0x1c')](_0x3e85b3)[_0xb687('0x1d')]();};}function respondWithResult(_0x1f1f35,_0x30d502){_0x30d502=_0x30d502||0xc8;return function(_0x838dd4){if(_0x838dd4){return _0x1f1f35[_0xb687('0x1c')](_0x30d502)[_0xb687('0x1e')](_0x838dd4);}};}function respondWithFilteredResult(_0x141375,_0x263085){return function(_0x2c7a18){if(_0x2c7a18){var _0x25124a=typeof _0x263085[_0xb687('0x1f')]==='undefined'&&typeof _0x263085[_0xb687('0x20')]===_0xb687('0x21');var _0x30d370=_0x2c7a18['count'];var _0x48958d=_0x25124a?0x0:_0x263085[_0xb687('0x1f')];var _0x3a10ef=_0x25124a?_0x2c7a18[_0xb687('0x22')]:_0x263085['offset']+_0x263085[_0xb687('0x20')];var _0x481f1d;if(_0x3a10ef>=_0x30d370){_0x3a10ef=_0x30d370;_0x481f1d=0xc8;}else{_0x481f1d=0xce;}_0x141375[_0xb687('0x1c')](_0x481f1d);return _0x141375[_0xb687('0x23')](_0xb687('0x24'),_0x48958d+'-'+_0x3a10ef+'/'+_0x30d370)[_0xb687('0x1e')](_0x2c7a18);}return null;};}function patchUpdates(_0x49d5a1){return function(_0x3a73d5){try{jsonpatch['apply'](_0x3a73d5,_0x49d5a1,!![]);}catch(_0x335541){return BPromise[_0xb687('0x25')](_0x335541);}return _0x3a73d5[_0xb687('0x26')]();};}function saveUpdates(_0x546fde,_0x1dc06b){return function(_0x491623){if(_0x491623){return _0x491623[_0xb687('0x27')](_0x546fde)[_0xb687('0x28')](function(_0xbf6c58){return _0xbf6c58;});}return null;};}function removeEntity(_0x38866c,_0xf48ba4){return function(_0x2f0a0a){if(_0x2f0a0a){return _0x2f0a0a['destroy']()[_0xb687('0x28')](function(){var _0x129347=_0x2f0a0a[_0xb687('0x29')]({'plain':!![]});var _0x1a0261=_0xb687('0x2a');return db[_0xb687('0x2b')][_0xb687('0x2c')]({'where':{'type':_0x1a0261,'resourceId':_0x129347['id']}})[_0xb687('0x28')](function(){return _0x2f0a0a;});})[_0xb687('0x28')](function(){_0x38866c[_0xb687('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3712cf,_0x192966){return function(_0x392721){if(!_0x392721){_0x3712cf[_0xb687('0x2d')](0x194);}return _0x392721;};}function handleError(_0x2e5c8d,_0x173c58){_0x173c58=_0x173c58||0x1f4;return function(_0x4e9a06){logger[_0xb687('0x2e')](_0x4e9a06['stack']);if(_0x4e9a06[_0xb687('0x2f')]){delete _0x4e9a06[_0xb687('0x2f')];}_0x2e5c8d[_0xb687('0x1c')](_0x173c58)[_0xb687('0x30')](_0x4e9a06);};}exports[_0xb687('0x31')]=function(_0x43d20d,_0xf1f0dd){var _0x556815={},_0x3da2be={},_0xe3428f={'count':0x0,'rows':[]};var _0x3c08ab=_[_0xb687('0x32')](db[_0xb687('0x33')][_0xb687('0x34')],function(_0x44be88){return{'name':_0x44be88[_0xb687('0x35')],'type':_0x44be88[_0xb687('0x36')][_0xb687('0x37')]};});_0x3da2be[_0xb687('0x38')]=_['map'](_0x3c08ab,'name');_0x3da2be[_0xb687('0x39')]=_[_0xb687('0x3a')](_0x43d20d[_0xb687('0x39')]);_0x3da2be[_0xb687('0x3b')]=_['intersection'](_0x3da2be['model'],_0x3da2be[_0xb687('0x39')]);_0x556815[_0xb687('0x3c')]=_['intersection'](_0x3da2be[_0xb687('0x38')],qs[_0xb687('0x3d')](_0x43d20d['query'][_0xb687('0x3d')]));_0x556815['attributes']=_0x556815[_0xb687('0x3c')][_0xb687('0x3e')]?_0x556815[_0xb687('0x3c')]:_0x3da2be[_0xb687('0x38')];if(!_0x43d20d[_0xb687('0x39')][_0xb687('0x3f')]('nolimit')){_0x556815[_0xb687('0x20')]=qs[_0xb687('0x20')](_0x43d20d[_0xb687('0x39')][_0xb687('0x20')]);_0x556815['offset']=qs[_0xb687('0x1f')](_0x43d20d[_0xb687('0x39')][_0xb687('0x1f')]);}_0x556815[_0xb687('0x40')]=qs[_0xb687('0x41')](_0x43d20d['query'][_0xb687('0x41')]);_0x556815[_0xb687('0x42')]=qs[_0xb687('0x3b')](_[_0xb687('0x43')](_0x43d20d[_0xb687('0x39')],_0x3da2be[_0xb687('0x3b')]),_0x3c08ab);if(_0x43d20d['query']['filter']){_0x556815[_0xb687('0x42')]=_['merge'](_0x556815[_0xb687('0x42')],{'$or':_[_0xb687('0x32')](_0x3c08ab,function(_0x48d3b1){if(_0x48d3b1[_0xb687('0x36')]!==_0xb687('0x44')){var _0x57776b={};_0x57776b[_0x48d3b1[_0xb687('0x2f')]]={'$like':'%'+_0x43d20d[_0xb687('0x39')][_0xb687('0x45')]+'%'};return _0x57776b;}})});}_0x556815=_['merge']({},_0x556815,_0x43d20d[_0xb687('0x46')]);var _0x9cffb2={'where':_0x556815[_0xb687('0x42')]};return db[_0xb687('0x33')][_0xb687('0x22')](_0x9cffb2)[_0xb687('0x28')](function(_0x21b9ef){_0xe3428f['count']=_0x21b9ef;if(_0x43d20d[_0xb687('0x39')]['includeAll']){_0x556815['include']=[{'all':!![]}];}return db[_0xb687('0x33')][_0xb687('0x47')](_0x556815);})['then'](function(_0x19a21c){_0xe3428f['rows']=_0x19a21c;return _0xe3428f;})[_0xb687('0x28')](respondWithFilteredResult(_0xf1f0dd,_0x556815))[_0xb687('0x48')](handleError(_0xf1f0dd,null));};exports['show']=function(_0x4cb7a0,_0x3a8509){var _0x5d9cb0={'raw':!![],'where':{'id':_0x4cb7a0[_0xb687('0x49')]['id']}},_0x247c67={};_0x247c67[_0xb687('0x38')]=_[_0xb687('0x3a')](db[_0xb687('0x33')][_0xb687('0x34')]);_0x247c67[_0xb687('0x39')]=_[_0xb687('0x3a')](_0x4cb7a0[_0xb687('0x39')]);_0x247c67[_0xb687('0x3b')]=_[_0xb687('0x4a')](_0x247c67[_0xb687('0x38')],_0x247c67['query']);_0x5d9cb0[_0xb687('0x3c')]=_['intersection'](_0x247c67[_0xb687('0x38')],qs[_0xb687('0x3d')](_0x4cb7a0[_0xb687('0x39')][_0xb687('0x3d')]));_0x5d9cb0[_0xb687('0x3c')]=_0x5d9cb0[_0xb687('0x3c')]['length']?_0x5d9cb0['attributes']:_0x247c67[_0xb687('0x38')];if(_0x4cb7a0[_0xb687('0x39')][_0xb687('0x4b')]){_0x5d9cb0[_0xb687('0x4c')]=[{'all':!![]}];}_0x5d9cb0=_['merge']({},_0x5d9cb0,_0x4cb7a0[_0xb687('0x46')]);return db[_0xb687('0x33')][_0xb687('0x4d')](_0x5d9cb0)[_0xb687('0x28')](handleEntityNotFound(_0x3a8509,null))['then'](respondWithResult(_0x3a8509,null))[_0xb687('0x48')](handleError(_0x3a8509,null));};exports[_0xb687('0x4e')]=function(_0x162b19,_0x401b99){return db['AnalyticDefaultReport']['create'](_0x162b19[_0xb687('0x4f')],{})[_0xb687('0x28')](function(_0x42b61a){var _0x508862=_0x162b19['user'][_0xb687('0x29')]({'plain':!![]});if(!_0x508862)throw new Error(_0xb687('0x50'));if(_0x508862[_0xb687('0x51')]===_0xb687('0x52')){var _0x34205d=_0x42b61a[_0xb687('0x29')]({'plain':!![]});var _0x602864=_0xb687('0x53');return db['UserProfileSection'][_0xb687('0x4d')]({'where':{'name':_0x602864,'userProfileId':_0x508862[_0xb687('0x54')]},'raw':!![]})[_0xb687('0x28')](function(_0x4f5784){if(_0x4f5784&&_0x4f5784['autoAssociation']===0x0){return db['UserProfileResource']['create']({'name':_0x34205d[_0xb687('0x2f')],'resourceId':_0x34205d['id'],'type':_0xb687('0x2a'),'sectionId':_0x4f5784['id']},{})[_0xb687('0x28')](function(){return _0x42b61a;});}else{return _0x42b61a;}})[_0xb687('0x48')](function(_0x1ddfd4){logger[_0xb687('0x2e')](_0xb687('0x55'),_0x1ddfd4);throw _0x1ddfd4;});}return _0x42b61a;})[_0xb687('0x28')](respondWithResult(_0x401b99,0xc9))[_0xb687('0x48')](handleError(_0x401b99,null));};exports[_0xb687('0x27')]=function(_0x128264,_0x166900){if(_0x128264[_0xb687('0x4f')]['id']){delete _0x128264[_0xb687('0x4f')]['id'];}return db[_0xb687('0x33')][_0xb687('0x4d')]({'where':{'id':_0x128264[_0xb687('0x49')]['id']}})['then'](handleEntityNotFound(_0x166900,null))['then'](saveUpdates(_0x128264[_0xb687('0x4f')],null))[_0xb687('0x28')](respondWithResult(_0x166900,null))[_0xb687('0x48')](handleError(_0x166900,null));};exports[_0xb687('0x2c')]=function(_0x4e5642,_0xfa8790){return db[_0xb687('0x33')]['find']({'where':{'id':_0x4e5642[_0xb687('0x49')]['id']}})['then'](handleEntityNotFound(_0xfa8790,null))[_0xb687('0x28')](removeEntity(_0xfa8790,null))[_0xb687('0x48')](handleError(_0xfa8790,null));};exports['preview']=function(_0x4fb188,_0x13ad6a){var _0x4ab9c5=0xa;var _0x5ea8fd=[_0xb687('0x56'),_0xb687('0x57'),_0xb687('0x58'),'cross_join'];var _0x25e140={'SUM':'SUM(%s)','COUNT':_0xb687('0x59'),'COUNT DISTINCT':_0xb687('0x5a'),'MAX':_0xb687('0x5b'),'MIN':_0xb687('0x5c'),'AVG':_0xb687('0x5d'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0xb687('0x5e')};var _0x58ec8b={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':'DATE(%s)','HOUR':'HOUR(%s)','ROUND':_0xb687('0x5f'),'UNIX_TIMESTAMP':_0xb687('0x60')};var _0xbc3a94=function(_0x4bc18f){return!_[_0xb687('0x61')]([_0xb687('0x62'),_0xb687('0x63'),_0xb687('0x64'),_0xb687('0x65')],_0x4bc18f);};var _0x17505c=function(_0x132e3a){if(!_0x132e3a||!_0x132e3a['rules']['length']){return'';}for(var _0x2714c6='(',_0x4906df=0x0;_0x4906df<_0x132e3a[_0xb687('0x66')][_0xb687('0x3e')];_0x4906df+=0x1){_0x4906df>0x0&&(_0x2714c6+='\x20'+_0x132e3a[_0xb687('0x67')]+'\x20');_0x2714c6+=_0x132e3a[_0xb687('0x66')][_0x4906df][_0xb687('0x68')]?_0x17505c(_0x132e3a['rules'][_0x4906df][_0xb687('0x68')]):_0x132e3a['rules'][_0x4906df][_0xb687('0x69')]+'\x20'+_0x132e3a[_0xb687('0x66')][_0x4906df][_0xb687('0x6a')]+(_0xbc3a94(_0x132e3a[_0xb687('0x66')][_0x4906df][_0xb687('0x6a')])?'\x20'+_0x132e3a[_0xb687('0x66')][_0x4906df][_0xb687('0x6b')]:'');}return _0x2714c6+')';};var _0x5deb7a={'where':{'id':_0x4fb188['params']['id']}},_0x28a6aa,_0x31ed20,_0x8942b7,_0x36bb4b,_0x258caf;_0x5deb7a=_[_0xb687('0x6c')]({},_0x5deb7a,_0x4fb188[_0xb687('0x46')]);return db[_0xb687('0x33')][_0xb687('0x4d')](_0x5deb7a)[_0xb687('0x28')](function(_0x15ef44){if(_0x15ef44){_0x28a6aa=_0x15ef44;return _0x15ef44[_0xb687('0x6d')]();}return null;})[_0xb687('0x28')](function(_0x177ea4){if(_0x177ea4){if(!_0x177ea4[_0xb687('0x3e')]){throw new db[(_0xb687('0x6e'))]['ValidationErrorItem'](_0xb687('0x6f'),0x193);}_0x31ed20=_0x177ea4;return db[_0xb687('0x70')][_0xb687('0x47')]({'raw':!![]});}return null;})[_0xb687('0x28')](function(_0x505f7a){if(_0x505f7a){_0x8942b7=_[_0xb687('0x71')](_0x505f7a,'id');var _0x1a6075;var _0x53b00a=squel[_0xb687('0x72')]();_0x53b00a[_0xb687('0x73')](_0x28a6aa[_0xb687('0x74')]);for(var _0x5eeb75=0x0;_0x5eeb75<_0x31ed20[_0xb687('0x3e')];_0x5eeb75+=0x1){_0x1a6075=_0x31ed20[_0x5eeb75][_0xb687('0x75')]?_0x8942b7[_0x31ed20[_0x5eeb75]['MetricId']][_0xb687('0x76')]:_0x31ed20[_0x5eeb75][_0xb687('0x69')];_0x1a6075=_0x31ed20[_0x5eeb75][_0xb687('0x77')]?_[_0xb687('0x78')](_0x25e140[_0x31ed20[_0x5eeb75]['function']],'%s',_0x1a6075):_0x1a6075;_0x1a6075=_0x31ed20[_0x5eeb75][_0xb687('0x79')]?_[_0xb687('0x78')](_0x58ec8b[_0x31ed20[_0x5eeb75]['format']],'%s',_0x1a6075):_0x1a6075;if(_0x31ed20[_0x5eeb75][_0xb687('0x7a')]){_0x53b00a[_0xb687('0x68')](_0x1a6075);}_0x31ed20[_0x5eeb75]['orderBy']&&_0x53b00a['order'](_0x1a6075,_0x31ed20[_0x5eeb75][_0xb687('0x7b')]==='DESC'?![]:!![]);_0x53b00a[_0xb687('0x69')](_0x1a6075,_0x31ed20[_0x5eeb75][_0xb687('0x7c')]||_0x1a6075);}if(_0x28a6aa[_0xb687('0x7d')]){_0x28a6aa[_0xb687('0x7d')]=JSON[_0xb687('0x7e')](_0x28a6aa[_0xb687('0x7d')]);for(var _0x229bc4=0x0;_0x229bc4<_0x28a6aa[_0xb687('0x7d')]['length'];_0x229bc4+=0x1){if(_0x28a6aa[_0xb687('0x7d')][_0x229bc4][_0xb687('0x36')]&&_[_0xb687('0x61')](_0x5ea8fd,_0x28a6aa[_0xb687('0x7d')][_0x229bc4][_0xb687('0x36')])&&_0x28a6aa[_0xb687('0x7d')][_0x229bc4]['parentKey']&&_0x28a6aa[_0xb687('0x7d')][_0x229bc4][_0xb687('0x7f')]&&_0x28a6aa['joins'][_0x229bc4][_0xb687('0x80')]){_0x53b00a[_0x28a6aa[_0xb687('0x7d')][_0x229bc4][_0xb687('0x36')]](_0x28a6aa[_0xb687('0x7d')][_0x229bc4]['foreignTable'],null,util[_0xb687('0x79')]('%s.%s\x20=\x20%s.%s',_0x28a6aa['table'],_0x28a6aa[_0xb687('0x7d')][_0x229bc4]['parentKey'],_0x28a6aa['joins'][_0x229bc4][_0xb687('0x7f')],_0x28a6aa['joins'][_0x229bc4][_0xb687('0x80')]));}}}if(_0x28a6aa[_0xb687('0x81')]){_0x28a6aa['conditions']=JSON[_0xb687('0x7e')](_0x28a6aa[_0xb687('0x81')]);_0x53b00a['where'](_0x17505c(_0x28a6aa[_0xb687('0x81')][_0xb687('0x68')]));}_0x258caf=_0x53b00a[_0xb687('0x82')]();_0x53b00a[_0xb687('0x20')](_0x4ab9c5);_0x53b00a[_0xb687('0x1f')](0x0);logger[_0xb687('0x83')](_0xb687('0x84'),_0x53b00a[_0xb687('0x85')]());return dbH[_0xb687('0x86')][_0xb687('0x39')](_0x53b00a[_0xb687('0x85')](),{'type':dbH['sequelize'][_0xb687('0x87')]['SELECT']});}})['then'](respondWithResult(_0x13ad6a,null))[_0xb687('0x48')](handleError(_0x13ad6a,null));};function runReport(_0x29e830,_0x22ebca,_0xfecb8d){var _0x3a7339=_0x22ebca['name'];var _0x59c94b=0xa;var _0x29e27e=[_0xb687('0x56'),_0xb687('0x57'),_0xb687('0x58'),'cross_join'];var _0x448d59={'SUM':_0xb687('0x88'),'COUNT':_0xb687('0x59'),'COUNT DISTINCT':_0xb687('0x5a'),'MAX':_0xb687('0x5b'),'MIN':_0xb687('0x5c'),'AVG':_0xb687('0x5d'),'GROUP_CONCAT':_0xb687('0x89'),'GROUP_CONCAT ASC':_0xb687('0x8a'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x25f5c3={'SEC_TO_TIME':_0xb687('0x8b'),'DATE':_0xb687('0x8c'),'HOUR':_0xb687('0x8d'),'ROUND':_0xb687('0x5f'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x1037b1=function(_0x3bf480){return!_['includes']([_0xb687('0x62'),'IS\x20NOT\x20NULL',_0xb687('0x64'),_0xb687('0x65')],_0x3bf480);};var _0x5ec5f6=function(_0x1c683e){if(!_0x1c683e||!_0x1c683e[_0xb687('0x66')]['length']){return'';}for(var _0x231caa='(',_0x3479c5=0x0;_0x3479c5<_0x1c683e[_0xb687('0x66')][_0xb687('0x3e')];_0x3479c5+=0x1){_0x3479c5>0x0&&(_0x231caa+='\x20'+_0x1c683e[_0xb687('0x67')]+'\x20');_0x231caa+=_0x1c683e[_0xb687('0x66')][_0x3479c5]['group']?_0x5ec5f6(_0x1c683e[_0xb687('0x66')][_0x3479c5][_0xb687('0x68')]):_0x1c683e[_0xb687('0x66')][_0x3479c5][_0xb687('0x69')]+'\x20'+_0x1c683e[_0xb687('0x66')][_0x3479c5][_0xb687('0x6a')]+(_0x1037b1(_0x1c683e[_0xb687('0x66')][_0x3479c5][_0xb687('0x6a')])?'\x20'+_0x1c683e[_0xb687('0x66')][_0x3479c5][_0xb687('0x6b')]:'');}return _0x231caa+')';};var _0x290ddf={'where':{'id':_0x29e830['id']}},_0x5ee585,_0x10fb0,_0x5be566,_0x3d98e2,_0x3aa1c8;_0x290ddf=_['merge']({},_0x290ddf,_0xfecb8d);return db['AnalyticDefaultReport'][_0xb687('0x4d')](_0x290ddf)[_0xb687('0x28')](function(_0x3b4acf){if(_0x3b4acf){_0x5ee585=_0x3b4acf;return _0x3b4acf[_0xb687('0x6d')]();}return null;})[_0xb687('0x28')](function(_0x1c3de0){if(_0x1c3de0){if(!_0x1c3de0[_0xb687('0x3e')]){throw new db[(_0xb687('0x6e'))][(_0xb687('0x8e'))](_0xb687('0x6f'),0x193);}_0x10fb0=_0x1c3de0;return db[_0xb687('0x70')][_0xb687('0x47')]({'raw':!![]});}return null;})[_0xb687('0x28')](function(_0x1ea6fd){if(_0x1ea6fd){_0x5be566=_[_0xb687('0x71')](_0x1ea6fd,'id');var _0x3f45b7;var _0x508550=squel['select']();_0x508550[_0xb687('0x73')](_0x5ee585['table']);for(var _0x5f2557=0x0;_0x5f2557<_0x10fb0[_0xb687('0x3e')];_0x5f2557+=0x1){_0x3f45b7=_0x10fb0[_0x5f2557][_0xb687('0x75')]?_0x5be566[_0x10fb0[_0x5f2557]['MetricId']][_0xb687('0x76')]:_0x10fb0[_0x5f2557][_0xb687('0x69')];_0x3f45b7=_0x10fb0[_0x5f2557]['function']?_[_0xb687('0x78')](_0x448d59[_0x10fb0[_0x5f2557][_0xb687('0x77')]],'%s',_0x3f45b7):_0x3f45b7;_0x3f45b7=_0x10fb0[_0x5f2557][_0xb687('0x79')]?_[_0xb687('0x78')](_0x25f5c3[_0x10fb0[_0x5f2557][_0xb687('0x79')]],'%s',_0x3f45b7):_0x3f45b7;if(_0x10fb0[_0x5f2557][_0xb687('0x7a')]){_0x508550[_0xb687('0x68')](_0x3f45b7);}_0x10fb0[_0x5f2557][_0xb687('0x7b')]&&_0x508550[_0xb687('0x40')](_0x3f45b7,_0x10fb0[_0x5f2557]['orderBy']===_0xb687('0x8f')?![]:!![]);_0x508550[_0xb687('0x69')](_0x3f45b7,_0x10fb0[_0x5f2557]['alias']||_0x3f45b7);}if(_0x5ee585[_0xb687('0x7d')]){_0x5ee585['joins']=JSON[_0xb687('0x7e')](_0x5ee585[_0xb687('0x7d')]);for(var _0x59166c=0x0;_0x59166c<_0x5ee585[_0xb687('0x7d')][_0xb687('0x3e')];_0x59166c+=0x1){if(_0x5ee585[_0xb687('0x7d')][_0x59166c][_0xb687('0x36')]&&_[_0xb687('0x61')](_0x29e27e,_0x5ee585[_0xb687('0x7d')][_0x59166c][_0xb687('0x36')])&&_0x5ee585['joins'][_0x59166c]['parentKey']&&_0x5ee585[_0xb687('0x7d')][_0x59166c]['foreignTable']&&_0x5ee585[_0xb687('0x7d')][_0x59166c][_0xb687('0x80')]){_0x508550[_0x5ee585[_0xb687('0x7d')][_0x59166c][_0xb687('0x36')]](_0x5ee585['joins'][_0x59166c][_0xb687('0x7f')],null,util[_0xb687('0x79')]('%s.%s\x20=\x20%s.%s',_0x5ee585[_0xb687('0x74')],_0x5ee585[_0xb687('0x7d')][_0x59166c][_0xb687('0x90')],_0x5ee585[_0xb687('0x7d')][_0x59166c][_0xb687('0x7f')],_0x5ee585[_0xb687('0x7d')][_0x59166c]['foreignKey']));}}}if(_0x5ee585[_0xb687('0x81')]){_0x5ee585[_0xb687('0x81')]=JSON[_0xb687('0x7e')](_0x5ee585[_0xb687('0x81')]);_0x508550[_0xb687('0x42')](_0x5ec5f6(_0x5ee585[_0xb687('0x81')][_0xb687('0x68')]));}_0x3aa1c8=_0x508550[_0xb687('0x82')]();_0x508550[_0xb687('0x20')](_0x59c94b);_0x508550[_0xb687('0x1f')](0x0);return;}})['then'](function(){if(_0x22ebca['output']===_0xb687('0x91')){return null;}var _0x1a7cd8=_[_0xb687('0x6c')](_0x22ebca,{'name':_0x22ebca[_0xb687('0x92')]||_0x22ebca[_0xb687('0x2f')]||_0x5ee585[_0xb687('0x2f')],'basename':_0x3a7339,'savename':util[_0xb687('0x79')](_0xb687('0x93'),_0x22ebca[_0xb687('0x2f')]||_0x5ee585['name'],require('randomstring')['generate'](0x4),_0x22ebca[_0xb687('0x94')]||_0xb687('0x95')),'reportId':_0x5ee585['id'],'reportType':_0xb687('0x96')});return db[_0xb687('0x97')][_0xb687('0x4e')](_0x1a7cd8,{'raw':!![]});})[_0xb687('0x28')](function(_0x473130){if(_0x5ee585[_0xb687('0x74')]==='cdr'){_0x3aa1c8[_0xb687('0x42')](_0x5ee585[_0xb687('0x74')]+_0xb687('0x98'),_0x22ebca[_0xb687('0x99')],_0x22ebca[_0xb687('0x9a')]);}else{_0x3aa1c8[_0xb687('0x42')](_0x5ee585[_0xb687('0x74')]+_0xb687('0x9b'),_0x22ebca['startDate'],_0x22ebca[_0xb687('0x9a')]);}if(_0x473130){logger['info'](_0xb687('0x9c'),_0x3aa1c8[_0xb687('0x85')]());require('child_process')[_0xb687('0x9d')](path[_0xb687('0x56')](__dirname,_0xb687('0x9e'),_0x473130['output']),[_0x473130['id'],_0x3aa1c8[_0xb687('0x85')](),path[_0xb687('0x56')](__dirname,_0xb687('0x9f'),_0x473130[_0xb687('0xa0')]),_0x3a7339]);return _0x473130;}else{var _0x3d4596=squel[_0xb687('0x72')]();_0x3d4596[_0xb687('0x73')]('('+_0x3aa1c8['toString']()+')',_0xb687('0xa1'));_0x3d4596[_0xb687('0x69')](_0xb687('0xa2'),_0xb687('0x22'));_0x3aa1c8[_0xb687('0x20')](_0x22ebca['limit']||_0x59c94b);_0x3aa1c8[_0xb687('0x1f')](_0x22ebca[_0xb687('0x1f')]||0x0);return dbH[_0xb687('0x86')]['query'](_0x3d4596[_0xb687('0x85')](),{'type':dbH['sequelize'][_0xb687('0x87')][_0xb687('0xa3')]})['then'](function(_0x3dbbd6){if(!_0x3dbbd6[_0xb687('0x3e')]){_0x3d98e2=0x0;}else{_0x3d98e2=_0x3dbbd6[0x0][_0xb687('0x22')]||0x0;}return dbH['sequelize'][_0xb687('0x39')](_0x3aa1c8[_0xb687('0x85')](),{'type':dbH[_0xb687('0x86')][_0xb687('0x87')][_0xb687('0xa3')]});})[_0xb687('0x28')](function(_0x15e599){return{'rows':_0x15e599||[],'count':_0x3d98e2};});}});}exports[_0xb687('0xa4')]=function(_0x8f6ba0,_0x568aca){return runReport(_0x8f6ba0[_0xb687('0x49')],_0x8f6ba0[_0xb687('0x39')],_0x8f6ba0[_0xb687('0x46')])['then'](respondWithResult(_0x568aca,null))['catch'](handleError(_0x568aca,null));};exports[_0xb687('0xa5')]=runReport;exports['query']=function(_0x187810,_0x1d21ef){var _0x386d12=0xa;var _0x4dd8f4=['join',_0xb687('0x57'),_0xb687('0x58'),_0xb687('0xa6')];var _0x295795={'SUM':_0xb687('0x88'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0xb687('0x5a'),'MAX':_0xb687('0x5b'),'MIN':'MIN(%s)','AVG':_0xb687('0x5d'),'GROUP_CONCAT':_0xb687('0x89'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0xb687('0x5e')};var _0xe7056c={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0xb687('0x8c'),'HOUR':_0xb687('0x8d'),'ROUND':_0xb687('0x5f'),'UNIX_TIMESTAMP':_0xb687('0x60')};var _0x1b1cf5=function(_0x46283c){return!_[_0xb687('0x61')](['IS\x20NULL',_0xb687('0x63'),'IS\x20EMPTY',_0xb687('0x65')],_0x46283c);};var _0x394ed6=function(_0x875169){if(!_0x875169||!_0x875169[_0xb687('0x66')]['length']){return'';}for(var _0x1ec485='(',_0x55a919=0x0;_0x55a919<_0x875169['rules'][_0xb687('0x3e')];_0x55a919+=0x1){_0x55a919>0x0&&(_0x1ec485+='\x20'+_0x875169[_0xb687('0x67')]+'\x20');_0x1ec485+=_0x875169[_0xb687('0x66')][_0x55a919]['group']?_0x394ed6(_0x875169[_0xb687('0x66')][_0x55a919][_0xb687('0x68')]):_0x875169['rules'][_0x55a919][_0xb687('0x69')]+'\x20'+_0x875169['rules'][_0x55a919][_0xb687('0x6a')]+(_0x1b1cf5(_0x875169[_0xb687('0x66')][_0x55a919]['condition'])?'\x20'+_0x875169[_0xb687('0x66')][_0x55a919]['value']:'');}return _0x1ec485+')';};var _0x2aecd5={'where':{'id':_0x187810[_0xb687('0x49')]['id']}},_0x58955e,_0x488a2a,_0x303738,_0x3904a3,_0x581338;_0x2aecd5=_['merge']({},_0x2aecd5,_0x187810[_0xb687('0x46')]);return db[_0xb687('0x33')][_0xb687('0x4d')](_0x2aecd5)['then'](function(_0xc29834){if(_0xc29834){_0x58955e=_0xc29834;return _0xc29834[_0xb687('0x6d')]();}return null;})[_0xb687('0x28')](function(_0x1f2f2b){if(_0x1f2f2b){if(!_0x1f2f2b[_0xb687('0x3e')]){throw new db[(_0xb687('0x6e'))]['ValidationErrorItem'](_0xb687('0x6f'),0x193);}_0x488a2a=_0x1f2f2b;return db[_0xb687('0x70')][_0xb687('0x47')]({'raw':!![]});}return null;})[_0xb687('0x28')](function(_0x3591e2){if(_0x3591e2){_0x303738=_['keyBy'](_0x3591e2,'id');var _0x4d0c14;var _0x200b55=squel[_0xb687('0x72')]();_0x200b55[_0xb687('0x73')](_0x58955e[_0xb687('0x74')]);for(var _0x33f4de=0x0;_0x33f4de<_0x488a2a[_0xb687('0x3e')];_0x33f4de+=0x1){_0x4d0c14=_0x488a2a[_0x33f4de][_0xb687('0x75')]?_0x303738[_0x488a2a[_0x33f4de]['MetricId']][_0xb687('0x76')]:_0x488a2a[_0x33f4de][_0xb687('0x69')];_0x4d0c14=_0x488a2a[_0x33f4de][_0xb687('0x77')]?_['replace'](_0x295795[_0x488a2a[_0x33f4de][_0xb687('0x77')]],'%s',_0x4d0c14):_0x4d0c14;_0x4d0c14=_0x488a2a[_0x33f4de][_0xb687('0x79')]?_[_0xb687('0x78')](_0xe7056c[_0x488a2a[_0x33f4de]['format']],'%s',_0x4d0c14):_0x4d0c14;if(_0x488a2a[_0x33f4de][_0xb687('0x7a')]){_0x200b55[_0xb687('0x68')](_0x4d0c14);}_0x488a2a[_0x33f4de]['orderBy']&&_0x200b55[_0xb687('0x40')](_0x4d0c14,_0x488a2a[_0x33f4de][_0xb687('0x7b')]===_0xb687('0x8f')?![]:!![]);_0x200b55[_0xb687('0x69')](_0x4d0c14,_0x488a2a[_0x33f4de]['alias']||_0x4d0c14);}if(_0x58955e[_0xb687('0x7d')]){_0x58955e[_0xb687('0x7d')]=JSON[_0xb687('0x7e')](_0x58955e[_0xb687('0x7d')]);for(var _0xcff220=0x0;_0xcff220<_0x58955e['joins'][_0xb687('0x3e')];_0xcff220+=0x1){if(_0x58955e[_0xb687('0x7d')][_0xcff220]['type']&&_[_0xb687('0x61')](_0x4dd8f4,_0x58955e[_0xb687('0x7d')][_0xcff220]['type'])&&_0x58955e[_0xb687('0x7d')][_0xcff220][_0xb687('0x90')]&&_0x58955e[_0xb687('0x7d')][_0xcff220]['foreignTable']&&_0x58955e[_0xb687('0x7d')][_0xcff220][_0xb687('0x80')]){_0x200b55[_0x58955e['joins'][_0xcff220]['type']](_0x58955e['joins'][_0xcff220][_0xb687('0x7f')],null,util['format'](_0xb687('0xa7'),_0x58955e[_0xb687('0x74')],_0x58955e[_0xb687('0x7d')][_0xcff220][_0xb687('0x90')],_0x58955e[_0xb687('0x7d')][_0xcff220]['foreignTable'],_0x58955e['joins'][_0xcff220][_0xb687('0x80')]));}}}if(_0x58955e[_0xb687('0x81')]){_0x58955e[_0xb687('0x81')]=JSON[_0xb687('0x7e')](_0x58955e[_0xb687('0x81')]);_0x200b55[_0xb687('0x42')](_0x394ed6(_0x58955e[_0xb687('0x81')]['group']));}_0x581338=_0x200b55['clone']();_0x200b55['limit'](_0x386d12);_0x200b55[_0xb687('0x1f')](0x0);logger[_0xb687('0x83')](_0xb687('0x84'),_0x200b55['toString']());return dbH['sequelize']['query'](_0x200b55[_0xb687('0x85')](),{'type':dbH['sequelize'][_0xb687('0x87')][_0xb687('0xa3')]});}})[_0xb687('0x28')](function(){return{'sql':_0x581338[_0xb687('0x85')]()};})[_0xb687('0x28')](respondWithResult(_0x1d21ef,null))[_0xb687('0x48')](handleError(_0x1d21ef,null));};
\ No newline at end of file
+var _0xf494=['name','send','index','map','AnalyticDefaultReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','catch','show','includeAll','find','create','body','user','Reports','UserProfileSection','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','join','left_join','cross_join','COUNT(DISTINCT\x20%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)','UNIX_TIMESTAMP(%s)','includes','IS\x20NOT\x20NULL','IS\x20EMPTY','rules','group','field','value','Sequelize','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','keyBy','select','from','table','MetricId','metric','function','replace','format','orderBy','DESC','alias','joins','parse','foreignTable','%s.%s\x20=\x20%s.%s','parentKey','foreignKey','conditions','debug','Limited\x20Query:','sequelize','toString','QueryTypes','right_join','SUM(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','ROUND(%s)','IS\x20NULL','operator','condition','getFields','groupBy','clone','output','fullPath','%s-%s.%s','generate','csv','default','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','info','child_process','fork','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','SELECT','run','runReport','IS\x20NOT\x20EMPTY','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','reject','save','update','then','destroy','get','DefaultReports','error','stack'];(function(_0x490027,_0x468fbb){var _0x207502=function(_0x5065ed){while(--_0x5065ed){_0x490027['push'](_0x490027['shift']());}};_0x207502(++_0x468fbb);}(_0xf494,0x1c6));var _0x4f49=function(_0x5f3e72,_0x3ff8e0){_0x5f3e72=_0x5f3e72-0x0;var _0x4bc542=_0xf494[_0x5f3e72];return _0x4bc542;};'use strict';var emlformat=require(_0x4f49('0x0'));var rimraf=require(_0x4f49('0x1'));var zipdir=require(_0x4f49('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4f49('0x3'));var moment=require(_0x4f49('0x4'));var BPromise=require(_0x4f49('0x5'));var Mustache=require(_0x4f49('0x6'));var util=require(_0x4f49('0x7'));var path=require(_0x4f49('0x8'));var sox=require(_0x4f49('0x9'));var csv=require(_0x4f49('0xa'));var ejs=require(_0x4f49('0xb'));var fs=require('fs');var fs_extra=require(_0x4f49('0xc'));var _=require(_0x4f49('0xd'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x4f49('0xe'));var deskjs=require(_0x4f49('0xf'));var toCsv=require(_0x4f49('0xa'));var querystring=require(_0x4f49('0x10'));var Papa=require(_0x4f49('0x11'));var Redis=require(_0x4f49('0x12'));var authService=require(_0x4f49('0x13'));var qs=require(_0x4f49('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4f49('0x15'));var logger=require(_0x4f49('0x16'))('api');var utils=require(_0x4f49('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x4f49('0x18'))['db'];var dbH=require(_0x4f49('0x18'))['dbH'];function respondWithStatusCode(_0x1e1c37,_0x111a8b){_0x111a8b=_0x111a8b||0xcc;return function(_0x1b9145){if(_0x1b9145){return _0x1e1c37[_0x4f49('0x19')](_0x111a8b);}return _0x1e1c37[_0x4f49('0x1a')](_0x111a8b)[_0x4f49('0x1b')]();};}function respondWithResult(_0xfdb477,_0x5c373e){_0x5c373e=_0x5c373e||0xc8;return function(_0x515ace){if(_0x515ace){return _0xfdb477[_0x4f49('0x1a')](_0x5c373e)[_0x4f49('0x1c')](_0x515ace);}};}function respondWithFilteredResult(_0x5878f4,_0x5bdfaf){return function(_0x2f0a0d){if(_0x2f0a0d){var _0x2ecaaa=typeof _0x5bdfaf[_0x4f49('0x1d')]==='undefined'&&typeof _0x5bdfaf[_0x4f49('0x1e')]===_0x4f49('0x1f');var _0x4e85df=_0x2f0a0d['count'];var _0x5bb23b=_0x2ecaaa?0x0:_0x5bdfaf['offset'];var _0x47f1e8=_0x2ecaaa?_0x2f0a0d[_0x4f49('0x20')]:_0x5bdfaf[_0x4f49('0x1d')]+_0x5bdfaf[_0x4f49('0x1e')];var _0x407042;if(_0x47f1e8>=_0x4e85df){_0x47f1e8=_0x4e85df;_0x407042=0xc8;}else{_0x407042=0xce;}_0x5878f4['status'](_0x407042);return _0x5878f4[_0x4f49('0x21')](_0x4f49('0x22'),_0x5bb23b+'-'+_0x47f1e8+'/'+_0x4e85df)[_0x4f49('0x1c')](_0x2f0a0d);}return null;};}function patchUpdates(_0xaab5e7){return function(_0xea82f8){try{jsonpatch['apply'](_0xea82f8,_0xaab5e7,!![]);}catch(_0x3e7e28){return BPromise[_0x4f49('0x23')](_0x3e7e28);}return _0xea82f8[_0x4f49('0x24')]();};}function saveUpdates(_0x53b57d,_0x40755e){return function(_0x1d70a7){if(_0x1d70a7){return _0x1d70a7[_0x4f49('0x25')](_0x53b57d)[_0x4f49('0x26')](function(_0x9d30aa){return _0x9d30aa;});}return null;};}function removeEntity(_0x36187b,_0x559d98){return function(_0x4e9041){if(_0x4e9041){return _0x4e9041[_0x4f49('0x27')]()[_0x4f49('0x26')](function(){var _0x4fedbb=_0x4e9041[_0x4f49('0x28')]({'plain':!![]});var _0x2c1519=_0x4f49('0x29');return db['UserProfileResource'][_0x4f49('0x27')]({'where':{'type':_0x2c1519,'resourceId':_0x4fedbb['id']}})[_0x4f49('0x26')](function(){return _0x4e9041;});})[_0x4f49('0x26')](function(){_0x36187b[_0x4f49('0x1a')](0xcc)[_0x4f49('0x1b')]();});}};}function handleEntityNotFound(_0x122404,_0x4915af){return function(_0x50c571){if(!_0x50c571){_0x122404[_0x4f49('0x19')](0x194);}return _0x50c571;};}function handleError(_0x2c00ee,_0x605c91){_0x605c91=_0x605c91||0x1f4;return function(_0x560050){logger[_0x4f49('0x2a')](_0x560050[_0x4f49('0x2b')]);if(_0x560050[_0x4f49('0x2c')]){delete _0x560050['name'];}_0x2c00ee['status'](_0x605c91)[_0x4f49('0x2d')](_0x560050);};}exports[_0x4f49('0x2e')]=function(_0x7a6ea0,_0x5e7076){var _0x1eaac6={},_0x35aa33={},_0x173657={'count':0x0,'rows':[]};var _0x2ceda4=_[_0x4f49('0x2f')](db[_0x4f49('0x30')][_0x4f49('0x31')],function(_0x45ae19){return{'name':_0x45ae19[_0x4f49('0x32')],'type':_0x45ae19[_0x4f49('0x33')][_0x4f49('0x34')]};});_0x35aa33[_0x4f49('0x35')]=_[_0x4f49('0x2f')](_0x2ceda4,_0x4f49('0x2c'));_0x35aa33[_0x4f49('0x36')]=_[_0x4f49('0x37')](_0x7a6ea0[_0x4f49('0x36')]);_0x35aa33[_0x4f49('0x38')]=_[_0x4f49('0x39')](_0x35aa33['model'],_0x35aa33[_0x4f49('0x36')]);_0x1eaac6[_0x4f49('0x3a')]=_[_0x4f49('0x39')](_0x35aa33[_0x4f49('0x35')],qs[_0x4f49('0x3b')](_0x7a6ea0[_0x4f49('0x36')][_0x4f49('0x3b')]));_0x1eaac6[_0x4f49('0x3a')]=_0x1eaac6[_0x4f49('0x3a')][_0x4f49('0x3c')]?_0x1eaac6[_0x4f49('0x3a')]:_0x35aa33[_0x4f49('0x35')];if(!_0x7a6ea0[_0x4f49('0x36')]['hasOwnProperty'](_0x4f49('0x3d'))){_0x1eaac6[_0x4f49('0x1e')]=qs[_0x4f49('0x1e')](_0x7a6ea0[_0x4f49('0x36')][_0x4f49('0x1e')]);_0x1eaac6[_0x4f49('0x1d')]=qs[_0x4f49('0x1d')](_0x7a6ea0[_0x4f49('0x36')][_0x4f49('0x1d')]);}_0x1eaac6[_0x4f49('0x3e')]=qs[_0x4f49('0x3f')](_0x7a6ea0[_0x4f49('0x36')][_0x4f49('0x3f')]);_0x1eaac6[_0x4f49('0x40')]=qs['filters'](_[_0x4f49('0x41')](_0x7a6ea0[_0x4f49('0x36')],_0x35aa33['filters']),_0x2ceda4);if(_0x7a6ea0[_0x4f49('0x36')][_0x4f49('0x42')]){_0x1eaac6['where']=_[_0x4f49('0x43')](_0x1eaac6[_0x4f49('0x40')],{'$or':_[_0x4f49('0x2f')](_0x2ceda4,function(_0x200b1d){if(_0x200b1d[_0x4f49('0x33')]!==_0x4f49('0x44')){var _0x29e910={};_0x29e910[_0x200b1d['name']]={'$like':'%'+_0x7a6ea0['query']['filter']+'%'};return _0x29e910;}})});}_0x1eaac6=_[_0x4f49('0x43')]({},_0x1eaac6,_0x7a6ea0[_0x4f49('0x45')]);var _0x2e4355={'where':_0x1eaac6[_0x4f49('0x40')]};return db[_0x4f49('0x30')][_0x4f49('0x20')](_0x2e4355)[_0x4f49('0x26')](function(_0x23720a){_0x173657[_0x4f49('0x20')]=_0x23720a;if(_0x7a6ea0['query']['includeAll']){_0x1eaac6[_0x4f49('0x46')]=[{'all':!![]}];}return db[_0x4f49('0x30')][_0x4f49('0x47')](_0x1eaac6);})['then'](function(_0x2d6b56){_0x173657['rows']=_0x2d6b56;return _0x173657;})['then'](respondWithFilteredResult(_0x5e7076,_0x1eaac6))[_0x4f49('0x48')](handleError(_0x5e7076,null));};exports[_0x4f49('0x49')]=function(_0x40eadc,_0x497cb8){var _0x287781={'raw':!![],'where':{'id':_0x40eadc['params']['id']}},_0x11b4df={};_0x11b4df[_0x4f49('0x35')]=_['keys'](db[_0x4f49('0x30')][_0x4f49('0x31')]);_0x11b4df[_0x4f49('0x36')]=_['keys'](_0x40eadc[_0x4f49('0x36')]);_0x11b4df[_0x4f49('0x38')]=_[_0x4f49('0x39')](_0x11b4df[_0x4f49('0x35')],_0x11b4df[_0x4f49('0x36')]);_0x287781[_0x4f49('0x3a')]=_[_0x4f49('0x39')](_0x11b4df[_0x4f49('0x35')],qs[_0x4f49('0x3b')](_0x40eadc[_0x4f49('0x36')]['fields']));_0x287781[_0x4f49('0x3a')]=_0x287781[_0x4f49('0x3a')]['length']?_0x287781[_0x4f49('0x3a')]:_0x11b4df['model'];if(_0x40eadc[_0x4f49('0x36')][_0x4f49('0x4a')]){_0x287781[_0x4f49('0x46')]=[{'all':!![]}];}_0x287781=_[_0x4f49('0x43')]({},_0x287781,_0x40eadc['options']);return db[_0x4f49('0x30')][_0x4f49('0x4b')](_0x287781)[_0x4f49('0x26')](handleEntityNotFound(_0x497cb8,null))[_0x4f49('0x26')](respondWithResult(_0x497cb8,null))[_0x4f49('0x48')](handleError(_0x497cb8,null));};exports[_0x4f49('0x4c')]=function(_0x37fdb7,_0xd282c){return db[_0x4f49('0x30')][_0x4f49('0x4c')](_0x37fdb7[_0x4f49('0x4d')],{})[_0x4f49('0x26')](function(_0x148031){var _0x2104d0=_0x37fdb7[_0x4f49('0x4e')][_0x4f49('0x28')]({'plain':!![]});if(!_0x2104d0)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2104d0['role']===_0x4f49('0x4e')){var _0x197670=_0x148031[_0x4f49('0x28')]({'plain':!![]});var _0xe46c90=_0x4f49('0x4f');return db[_0x4f49('0x50')][_0x4f49('0x4b')]({'where':{'name':_0xe46c90,'userProfileId':_0x2104d0['userProfileId']},'raw':!![]})[_0x4f49('0x26')](function(_0x4ff0a2){if(_0x4ff0a2&&_0x4ff0a2[_0x4f49('0x51')]===0x0){return db[_0x4f49('0x52')][_0x4f49('0x4c')]({'name':_0x197670[_0x4f49('0x2c')],'resourceId':_0x197670['id'],'type':'DefaultReports','sectionId':_0x4ff0a2['id']},{})[_0x4f49('0x26')](function(){return _0x148031;});}else{return _0x148031;}})['catch'](function(_0x52d18c){logger[_0x4f49('0x2a')](_0x4f49('0x53'),_0x52d18c);throw _0x52d18c;});}return _0x148031;})[_0x4f49('0x26')](respondWithResult(_0xd282c,0xc9))[_0x4f49('0x48')](handleError(_0xd282c,null));};exports['update']=function(_0x599c51,_0xd7f47b){if(_0x599c51[_0x4f49('0x4d')]['id']){delete _0x599c51['body']['id'];}return db[_0x4f49('0x30')]['find']({'where':{'id':_0x599c51['params']['id']}})[_0x4f49('0x26')](handleEntityNotFound(_0xd7f47b,null))['then'](saveUpdates(_0x599c51[_0x4f49('0x4d')],null))['then'](respondWithResult(_0xd7f47b,null))[_0x4f49('0x48')](handleError(_0xd7f47b,null));};exports[_0x4f49('0x27')]=function(_0x2472c9,_0x883408){return db[_0x4f49('0x30')][_0x4f49('0x4b')]({'where':{'id':_0x2472c9[_0x4f49('0x54')]['id']}})[_0x4f49('0x26')](handleEntityNotFound(_0x883408,null))['then'](removeEntity(_0x883408,null))[_0x4f49('0x48')](handleError(_0x883408,null));};exports['preview']=function(_0x213608,_0x1f640d){var _0xc4fc6b=0xa;var _0x467f12=[_0x4f49('0x55'),_0x4f49('0x56'),'right_join',_0x4f49('0x57')];var _0xd3689c={'SUM':'SUM(%s)','COUNT':'COUNT(%s)','COUNT DISTINCT':_0x4f49('0x58'),'MAX':_0x4f49('0x59'),'MIN':_0x4f49('0x5a'),'AVG':_0x4f49('0x5b'),'GROUP_CONCAT':_0x4f49('0x5c'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0x4f49('0x5d')};var _0x564bf5={'SEC_TO_TIME':_0x4f49('0x5e'),'DATE':_0x4f49('0x5f'),'HOUR':_0x4f49('0x60'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':_0x4f49('0x61')};var _0x21807e=function(_0x265988){return!_[_0x4f49('0x62')](['IS\x20NULL',_0x4f49('0x63'),_0x4f49('0x64'),'IS\x20NOT\x20EMPTY'],_0x265988);};var _0x293839=function(_0x17b15){if(!_0x17b15||!_0x17b15[_0x4f49('0x65')][_0x4f49('0x3c')]){return'';}for(var _0x28ea73='(',_0x1b80f2=0x0;_0x1b80f2<_0x17b15[_0x4f49('0x65')][_0x4f49('0x3c')];_0x1b80f2+=0x1){_0x1b80f2>0x0&&(_0x28ea73+='\x20'+_0x17b15['operator']+'\x20');_0x28ea73+=_0x17b15[_0x4f49('0x65')][_0x1b80f2][_0x4f49('0x66')]?_0x293839(_0x17b15[_0x4f49('0x65')][_0x1b80f2][_0x4f49('0x66')]):_0x17b15[_0x4f49('0x65')][_0x1b80f2][_0x4f49('0x67')]+'\x20'+_0x17b15[_0x4f49('0x65')][_0x1b80f2]['condition']+(_0x21807e(_0x17b15[_0x4f49('0x65')][_0x1b80f2]['condition'])?'\x20'+_0x17b15[_0x4f49('0x65')][_0x1b80f2][_0x4f49('0x68')]:'');}return _0x28ea73+')';};var _0x4714c7={'where':{'id':_0x213608[_0x4f49('0x54')]['id']}},_0xf29378,_0xc7743e,_0x3f2f3f,_0x61a565,_0x297698;_0x4714c7=_[_0x4f49('0x43')]({},_0x4714c7,_0x213608['options']);return db[_0x4f49('0x30')][_0x4f49('0x4b')](_0x4714c7)[_0x4f49('0x26')](function(_0x2cdaa4){if(_0x2cdaa4){_0xf29378=_0x2cdaa4;return _0x2cdaa4['getFields']();}return null;})['then'](function(_0x28e8ae){if(_0x28e8ae){if(!_0x28e8ae['length']){throw new db[(_0x4f49('0x69'))][(_0x4f49('0x6a'))](_0x4f49('0x6b'),0x193);}_0xc7743e=_0x28e8ae;return db[_0x4f49('0x6c')][_0x4f49('0x47')]({'raw':!![]});}return null;})[_0x4f49('0x26')](function(_0x179431){if(_0x179431){_0x3f2f3f=_[_0x4f49('0x6d')](_0x179431,'id');var _0x3823f0;var _0x3e9b47=squel[_0x4f49('0x6e')]();_0x3e9b47[_0x4f49('0x6f')](_0xf29378[_0x4f49('0x70')]);for(var _0xd53de8=0x0;_0xd53de8<_0xc7743e[_0x4f49('0x3c')];_0xd53de8+=0x1){_0x3823f0=_0xc7743e[_0xd53de8][_0x4f49('0x71')]?_0x3f2f3f[_0xc7743e[_0xd53de8][_0x4f49('0x71')]][_0x4f49('0x72')]:_0xc7743e[_0xd53de8][_0x4f49('0x67')];_0x3823f0=_0xc7743e[_0xd53de8][_0x4f49('0x73')]?_[_0x4f49('0x74')](_0xd3689c[_0xc7743e[_0xd53de8][_0x4f49('0x73')]],'%s',_0x3823f0):_0x3823f0;_0x3823f0=_0xc7743e[_0xd53de8][_0x4f49('0x75')]?_[_0x4f49('0x74')](_0x564bf5[_0xc7743e[_0xd53de8][_0x4f49('0x75')]],'%s',_0x3823f0):_0x3823f0;if(_0xc7743e[_0xd53de8]['groupBy']){_0x3e9b47[_0x4f49('0x66')](_0x3823f0);}_0xc7743e[_0xd53de8]['orderBy']&&_0x3e9b47[_0x4f49('0x3e')](_0x3823f0,_0xc7743e[_0xd53de8][_0x4f49('0x76')]===_0x4f49('0x77')?![]:!![]);_0x3e9b47[_0x4f49('0x67')](_0x3823f0,_0xc7743e[_0xd53de8][_0x4f49('0x78')]||_0x3823f0);}if(_0xf29378[_0x4f49('0x79')]){_0xf29378[_0x4f49('0x79')]=JSON[_0x4f49('0x7a')](_0xf29378[_0x4f49('0x79')]);for(var _0x541ac6=0x0;_0x541ac6<_0xf29378['joins'][_0x4f49('0x3c')];_0x541ac6+=0x1){if(_0xf29378['joins'][_0x541ac6][_0x4f49('0x33')]&&_[_0x4f49('0x62')](_0x467f12,_0xf29378[_0x4f49('0x79')][_0x541ac6][_0x4f49('0x33')])&&_0xf29378[_0x4f49('0x79')][_0x541ac6]['parentKey']&&_0xf29378['joins'][_0x541ac6][_0x4f49('0x7b')]&&_0xf29378[_0x4f49('0x79')][_0x541ac6]['foreignKey']){_0x3e9b47[_0xf29378[_0x4f49('0x79')][_0x541ac6][_0x4f49('0x33')]](_0xf29378['joins'][_0x541ac6][_0x4f49('0x7b')],null,util['format'](_0x4f49('0x7c'),_0xf29378[_0x4f49('0x70')],_0xf29378['joins'][_0x541ac6][_0x4f49('0x7d')],_0xf29378[_0x4f49('0x79')][_0x541ac6][_0x4f49('0x7b')],_0xf29378[_0x4f49('0x79')][_0x541ac6][_0x4f49('0x7e')]));}}}if(_0xf29378[_0x4f49('0x7f')]){_0xf29378['conditions']=JSON[_0x4f49('0x7a')](_0xf29378['conditions']);_0x3e9b47[_0x4f49('0x40')](_0x293839(_0xf29378['conditions'][_0x4f49('0x66')]));}_0x297698=_0x3e9b47['clone']();_0x3e9b47[_0x4f49('0x1e')](_0xc4fc6b);_0x3e9b47[_0x4f49('0x1d')](0x0);logger[_0x4f49('0x80')](_0x4f49('0x81'),_0x3e9b47['toString']());return dbH[_0x4f49('0x82')]['query'](_0x3e9b47[_0x4f49('0x83')](),{'type':dbH['sequelize'][_0x4f49('0x84')]['SELECT']});}})['then'](respondWithResult(_0x1f640d,null))[_0x4f49('0x48')](handleError(_0x1f640d,null));};function runReport(_0x20b2be,_0x16cb4d,_0x4c0e7a){var _0x289810=_0x16cb4d[_0x4f49('0x2c')];var _0x5c33c9=0xa;var _0x5d52ae=['join',_0x4f49('0x56'),_0x4f49('0x85'),_0x4f49('0x57')];var _0x87439={'SUM':_0x4f49('0x86'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0x4f49('0x58'),'MAX':_0x4f49('0x59'),'MIN':_0x4f49('0x5a'),'AVG':'AVG(%s)','GROUP_CONCAT':_0x4f49('0x5c'),'GROUP_CONCAT ASC':_0x4f49('0x87'),'GROUP_CONCAT DESC':_0x4f49('0x5d')};var _0x2902a1={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0x4f49('0x5f'),'HOUR':_0x4f49('0x60'),'ROUND':_0x4f49('0x88'),'UNIX_TIMESTAMP':_0x4f49('0x61')};var _0x389679=function(_0x5304c3){return!_[_0x4f49('0x62')]([_0x4f49('0x89'),'IS\x20NOT\x20NULL',_0x4f49('0x64'),'IS\x20NOT\x20EMPTY'],_0x5304c3);};var _0x351a33=function(_0x4d72a0){if(!_0x4d72a0||!_0x4d72a0[_0x4f49('0x65')][_0x4f49('0x3c')]){return'';}for(var _0x2ef19e='(',_0x6ad599=0x0;_0x6ad599<_0x4d72a0[_0x4f49('0x65')]['length'];_0x6ad599+=0x1){_0x6ad599>0x0&&(_0x2ef19e+='\x20'+_0x4d72a0[_0x4f49('0x8a')]+'\x20');_0x2ef19e+=_0x4d72a0[_0x4f49('0x65')][_0x6ad599][_0x4f49('0x66')]?_0x351a33(_0x4d72a0[_0x4f49('0x65')][_0x6ad599]['group']):_0x4d72a0[_0x4f49('0x65')][_0x6ad599]['field']+'\x20'+_0x4d72a0[_0x4f49('0x65')][_0x6ad599]['condition']+(_0x389679(_0x4d72a0[_0x4f49('0x65')][_0x6ad599][_0x4f49('0x8b')])?'\x20'+_0x4d72a0[_0x4f49('0x65')][_0x6ad599][_0x4f49('0x68')]:'');}return _0x2ef19e+')';};var _0x111e90={'where':{'id':_0x20b2be['id']}},_0xd253ed,_0x323a3a,_0xe0adc3,_0x3a26ff,_0x64f0ee;_0x111e90=_['merge']({},_0x111e90,_0x4c0e7a);return db[_0x4f49('0x30')][_0x4f49('0x4b')](_0x111e90)[_0x4f49('0x26')](function(_0x299849){if(_0x299849){_0xd253ed=_0x299849;return _0x299849[_0x4f49('0x8c')]();}return null;})[_0x4f49('0x26')](function(_0x55b28b){if(_0x55b28b){if(!_0x55b28b[_0x4f49('0x3c')]){throw new db[(_0x4f49('0x69'))][(_0x4f49('0x6a'))](_0x4f49('0x6b'),0x193);}_0x323a3a=_0x55b28b;return db['AnalyticMetric'][_0x4f49('0x47')]({'raw':!![]});}return null;})['then'](function(_0x3c4e88){if(_0x3c4e88){_0xe0adc3=_[_0x4f49('0x6d')](_0x3c4e88,'id');var _0x5c5d2;var _0xa880a2=squel['select']();_0xa880a2[_0x4f49('0x6f')](_0xd253ed[_0x4f49('0x70')]);for(var _0x11c0a0=0x0;_0x11c0a0<_0x323a3a[_0x4f49('0x3c')];_0x11c0a0+=0x1){_0x5c5d2=_0x323a3a[_0x11c0a0][_0x4f49('0x71')]?_0xe0adc3[_0x323a3a[_0x11c0a0][_0x4f49('0x71')]][_0x4f49('0x72')]:_0x323a3a[_0x11c0a0][_0x4f49('0x67')];_0x5c5d2=_0x323a3a[_0x11c0a0][_0x4f49('0x73')]?_[_0x4f49('0x74')](_0x87439[_0x323a3a[_0x11c0a0][_0x4f49('0x73')]],'%s',_0x5c5d2):_0x5c5d2;_0x5c5d2=_0x323a3a[_0x11c0a0][_0x4f49('0x75')]?_[_0x4f49('0x74')](_0x2902a1[_0x323a3a[_0x11c0a0][_0x4f49('0x75')]],'%s',_0x5c5d2):_0x5c5d2;if(_0x323a3a[_0x11c0a0][_0x4f49('0x8d')]){_0xa880a2[_0x4f49('0x66')](_0x5c5d2);}_0x323a3a[_0x11c0a0][_0x4f49('0x76')]&&_0xa880a2[_0x4f49('0x3e')](_0x5c5d2,_0x323a3a[_0x11c0a0]['orderBy']===_0x4f49('0x77')?![]:!![]);_0xa880a2[_0x4f49('0x67')](_0x5c5d2,_0x323a3a[_0x11c0a0][_0x4f49('0x78')]||_0x5c5d2);}if(_0xd253ed[_0x4f49('0x79')]){_0xd253ed['joins']=JSON[_0x4f49('0x7a')](_0xd253ed[_0x4f49('0x79')]);for(var _0x594460=0x0;_0x594460<_0xd253ed[_0x4f49('0x79')]['length'];_0x594460+=0x1){if(_0xd253ed[_0x4f49('0x79')][_0x594460][_0x4f49('0x33')]&&_[_0x4f49('0x62')](_0x5d52ae,_0xd253ed[_0x4f49('0x79')][_0x594460][_0x4f49('0x33')])&&_0xd253ed[_0x4f49('0x79')][_0x594460][_0x4f49('0x7d')]&&_0xd253ed[_0x4f49('0x79')][_0x594460][_0x4f49('0x7b')]&&_0xd253ed[_0x4f49('0x79')][_0x594460]['foreignKey']){_0xa880a2[_0xd253ed['joins'][_0x594460][_0x4f49('0x33')]](_0xd253ed['joins'][_0x594460][_0x4f49('0x7b')],null,util[_0x4f49('0x75')]('%s.%s\x20=\x20%s.%s',_0xd253ed['table'],_0xd253ed[_0x4f49('0x79')][_0x594460]['parentKey'],_0xd253ed[_0x4f49('0x79')][_0x594460][_0x4f49('0x7b')],_0xd253ed[_0x4f49('0x79')][_0x594460]['foreignKey']));}}}if(_0xd253ed[_0x4f49('0x7f')]){_0xd253ed['conditions']=JSON[_0x4f49('0x7a')](_0xd253ed[_0x4f49('0x7f')]);_0xa880a2[_0x4f49('0x40')](_0x351a33(_0xd253ed['conditions'][_0x4f49('0x66')]));}_0x64f0ee=_0xa880a2[_0x4f49('0x8e')]();_0xa880a2[_0x4f49('0x1e')](_0x5c33c9);_0xa880a2['offset'](0x0);return;}})['then'](function(){if(_0x16cb4d[_0x4f49('0x8f')]==='web'){return null;}var _0x2bc9df=_[_0x4f49('0x43')](_0x16cb4d,{'name':_0x16cb4d[_0x4f49('0x90')]||_0x16cb4d['name']||_0xd253ed[_0x4f49('0x2c')],'basename':_0x289810,'savename':util['format'](_0x4f49('0x91'),_0x16cb4d[_0x4f49('0x2c')]||_0xd253ed[_0x4f49('0x2c')],require('randomstring')[_0x4f49('0x92')](0x4),_0x16cb4d[_0x4f49('0x8f')]||_0x4f49('0x93')),'reportId':_0xd253ed['id'],'reportType':_0x4f49('0x94')});return db[_0x4f49('0x95')][_0x4f49('0x4c')](_0x2bc9df,{'raw':!![]});})['then'](function(_0x5b6ac7){if(_0xd253ed[_0x4f49('0x70')]===_0x4f49('0x96')){_0x64f0ee[_0x4f49('0x40')](_0xd253ed[_0x4f49('0x70')]+_0x4f49('0x97'),_0x16cb4d[_0x4f49('0x98')],_0x16cb4d[_0x4f49('0x99')]);}else{_0x64f0ee[_0x4f49('0x40')](_0xd253ed[_0x4f49('0x70')]+'.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x16cb4d[_0x4f49('0x98')],_0x16cb4d[_0x4f49('0x99')]);}if(_0x5b6ac7){logger[_0x4f49('0x9a')]('Run\x20Query:',_0x64f0ee[_0x4f49('0x83')]());require(_0x4f49('0x9b'))[_0x4f49('0x9c')](path['join'](__dirname,_0x4f49('0x9d'),_0x5b6ac7[_0x4f49('0x8f')]),[_0x5b6ac7['id'],_0x64f0ee[_0x4f49('0x83')](),path['join'](__dirname,_0x4f49('0x9e'),_0x5b6ac7[_0x4f49('0x9f')]),_0x289810]);return _0x5b6ac7;}else{var _0x5efb11=squel['select']();_0x5efb11[_0x4f49('0x6f')]('('+_0x64f0ee[_0x4f49('0x83')]()+')',_0x4f49('0xa0'));_0x5efb11[_0x4f49('0x67')](_0x4f49('0xa1'),_0x4f49('0x20'));_0x64f0ee['limit'](_0x16cb4d['limit']||_0x5c33c9);_0x64f0ee['offset'](_0x16cb4d[_0x4f49('0x1d')]||0x0);return dbH[_0x4f49('0x82')]['query'](_0x5efb11[_0x4f49('0x83')](),{'type':dbH[_0x4f49('0x82')][_0x4f49('0x84')]['SELECT']})['then'](function(_0x3633b5){if(!_0x3633b5['length']){_0x3a26ff=0x0;}else{_0x3a26ff=_0x3633b5[0x0][_0x4f49('0x20')]||0x0;}return dbH[_0x4f49('0x82')][_0x4f49('0x36')](_0x64f0ee[_0x4f49('0x83')](),{'type':dbH[_0x4f49('0x82')]['QueryTypes'][_0x4f49('0xa2')]});})[_0x4f49('0x26')](function(_0x45c938){return{'rows':_0x45c938||[],'count':_0x3a26ff};});}});}exports[_0x4f49('0xa3')]=function(_0x4a4d75,_0x93e85d){return runReport(_0x4a4d75[_0x4f49('0x54')],_0x4a4d75['query'],_0x4a4d75[_0x4f49('0x45')])[_0x4f49('0x26')](respondWithResult(_0x93e85d,null))[_0x4f49('0x48')](handleError(_0x93e85d,null));};exports[_0x4f49('0xa4')]=runReport;exports[_0x4f49('0x36')]=function(_0x40991b,_0x56290f){var _0x4994b6=0xa;var _0x1c7d87=[_0x4f49('0x55'),_0x4f49('0x56'),_0x4f49('0x85'),_0x4f49('0x57')];var _0x5cd00a={'SUM':_0x4f49('0x86'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0x4f49('0x58'),'MAX':'MAX(%s)','MIN':'MIN(%s)','AVG':_0x4f49('0x5b'),'GROUP_CONCAT':_0x4f49('0x5c'),'GROUP_CONCAT ASC':_0x4f49('0x87'),'GROUP_CONCAT DESC':_0x4f49('0x5d')};var _0xd876f1={'SEC_TO_TIME':_0x4f49('0x5e'),'DATE':_0x4f49('0x5f'),'HOUR':'HOUR(%s)','ROUND':_0x4f49('0x88'),'UNIX_TIMESTAMP':_0x4f49('0x61')};var _0x1ae2c9=function(_0x566634){return!_[_0x4f49('0x62')]([_0x4f49('0x89'),_0x4f49('0x63'),'IS\x20EMPTY',_0x4f49('0xa5')],_0x566634);};var _0x541dc2=function(_0x4061bf){if(!_0x4061bf||!_0x4061bf[_0x4f49('0x65')][_0x4f49('0x3c')]){return'';}for(var _0x1bc18d='(',_0x5e6103=0x0;_0x5e6103<_0x4061bf[_0x4f49('0x65')][_0x4f49('0x3c')];_0x5e6103+=0x1){_0x5e6103>0x0&&(_0x1bc18d+='\x20'+_0x4061bf[_0x4f49('0x8a')]+'\x20');_0x1bc18d+=_0x4061bf[_0x4f49('0x65')][_0x5e6103][_0x4f49('0x66')]?_0x541dc2(_0x4061bf[_0x4f49('0x65')][_0x5e6103][_0x4f49('0x66')]):_0x4061bf[_0x4f49('0x65')][_0x5e6103]['field']+'\x20'+_0x4061bf['rules'][_0x5e6103][_0x4f49('0x8b')]+(_0x1ae2c9(_0x4061bf[_0x4f49('0x65')][_0x5e6103][_0x4f49('0x8b')])?'\x20'+_0x4061bf[_0x4f49('0x65')][_0x5e6103][_0x4f49('0x68')]:'');}return _0x1bc18d+')';};var _0x29dbab={'where':{'id':_0x40991b[_0x4f49('0x54')]['id']}},_0x5f459b,_0x1d090f,_0x37d2f4,_0x5bcb36,_0x3f04fa;_0x29dbab=_[_0x4f49('0x43')]({},_0x29dbab,_0x40991b['options']);return db['AnalyticDefaultReport'][_0x4f49('0x4b')](_0x29dbab)[_0x4f49('0x26')](function(_0x200848){if(_0x200848){_0x5f459b=_0x200848;return _0x200848['getFields']();}return null;})[_0x4f49('0x26')](function(_0x48f4bc){if(_0x48f4bc){if(!_0x48f4bc[_0x4f49('0x3c')]){throw new db['Sequelize'][(_0x4f49('0x6a'))](_0x4f49('0x6b'),0x193);}_0x1d090f=_0x48f4bc;return db['AnalyticMetric'][_0x4f49('0x47')]({'raw':!![]});}return null;})[_0x4f49('0x26')](function(_0x513bc9){if(_0x513bc9){_0x37d2f4=_[_0x4f49('0x6d')](_0x513bc9,'id');var _0x47567c;var _0x5f1538=squel[_0x4f49('0x6e')]();_0x5f1538[_0x4f49('0x6f')](_0x5f459b[_0x4f49('0x70')]);for(var _0xd91e48=0x0;_0xd91e48<_0x1d090f[_0x4f49('0x3c')];_0xd91e48+=0x1){_0x47567c=_0x1d090f[_0xd91e48][_0x4f49('0x71')]?_0x37d2f4[_0x1d090f[_0xd91e48]['MetricId']][_0x4f49('0x72')]:_0x1d090f[_0xd91e48][_0x4f49('0x67')];_0x47567c=_0x1d090f[_0xd91e48][_0x4f49('0x73')]?_['replace'](_0x5cd00a[_0x1d090f[_0xd91e48][_0x4f49('0x73')]],'%s',_0x47567c):_0x47567c;_0x47567c=_0x1d090f[_0xd91e48][_0x4f49('0x75')]?_[_0x4f49('0x74')](_0xd876f1[_0x1d090f[_0xd91e48][_0x4f49('0x75')]],'%s',_0x47567c):_0x47567c;if(_0x1d090f[_0xd91e48][_0x4f49('0x8d')]){_0x5f1538[_0x4f49('0x66')](_0x47567c);}_0x1d090f[_0xd91e48][_0x4f49('0x76')]&&_0x5f1538['order'](_0x47567c,_0x1d090f[_0xd91e48][_0x4f49('0x76')]==='DESC'?![]:!![]);_0x5f1538['field'](_0x47567c,_0x1d090f[_0xd91e48][_0x4f49('0x78')]||_0x47567c);}if(_0x5f459b['joins']){_0x5f459b[_0x4f49('0x79')]=JSON[_0x4f49('0x7a')](_0x5f459b[_0x4f49('0x79')]);for(var _0x85eb3f=0x0;_0x85eb3f<_0x5f459b[_0x4f49('0x79')][_0x4f49('0x3c')];_0x85eb3f+=0x1){if(_0x5f459b['joins'][_0x85eb3f][_0x4f49('0x33')]&&_[_0x4f49('0x62')](_0x1c7d87,_0x5f459b[_0x4f49('0x79')][_0x85eb3f][_0x4f49('0x33')])&&_0x5f459b[_0x4f49('0x79')][_0x85eb3f][_0x4f49('0x7d')]&&_0x5f459b[_0x4f49('0x79')][_0x85eb3f]['foreignTable']&&_0x5f459b[_0x4f49('0x79')][_0x85eb3f][_0x4f49('0x7e')]){_0x5f1538[_0x5f459b[_0x4f49('0x79')][_0x85eb3f][_0x4f49('0x33')]](_0x5f459b[_0x4f49('0x79')][_0x85eb3f][_0x4f49('0x7b')],null,util[_0x4f49('0x75')](_0x4f49('0x7c'),_0x5f459b[_0x4f49('0x70')],_0x5f459b[_0x4f49('0x79')][_0x85eb3f][_0x4f49('0x7d')],_0x5f459b[_0x4f49('0x79')][_0x85eb3f]['foreignTable'],_0x5f459b[_0x4f49('0x79')][_0x85eb3f][_0x4f49('0x7e')]));}}}if(_0x5f459b['conditions']){_0x5f459b[_0x4f49('0x7f')]=JSON[_0x4f49('0x7a')](_0x5f459b[_0x4f49('0x7f')]);_0x5f1538[_0x4f49('0x40')](_0x541dc2(_0x5f459b[_0x4f49('0x7f')][_0x4f49('0x66')]));}_0x3f04fa=_0x5f1538['clone']();_0x5f1538['limit'](_0x4994b6);_0x5f1538['offset'](0x0);logger['debug'](_0x4f49('0x81'),_0x5f1538['toString']());return dbH[_0x4f49('0x82')][_0x4f49('0x36')](_0x5f1538[_0x4f49('0x83')](),{'type':dbH[_0x4f49('0x82')][_0x4f49('0x84')][_0x4f49('0xa2')]});}})['then'](function(){return{'sql':_0x3f04fa[_0x4f49('0x83')]()};})['then'](respondWithResult(_0x56290f,null))[_0x4f49('0x48')](handleError(_0x56290f,null));};
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.model.js b/server/api/analyticDefaultReport/analyticDefaultReport.model.js
index 06696cd..412f2f5 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 _0xcaf0=['moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticDefaultReport.attributes','define','AnalyticDefaultReport','analytics_default_reports','lodash','../../config/logger','api'];(function(_0x2cbb74,_0x241c10){var _0xa6d18=function(_0x5a2940){while(--_0x5a2940){_0x2cbb74['push'](_0x2cbb74['shift']());}};_0xa6d18(++_0x241c10);}(_0xcaf0,0x65));var _0x0caf=function(_0x4a624e,_0x4c63b2){_0x4a624e=_0x4a624e-0x0;var _0x4d3bc0=_0xcaf0[_0x4a624e];return _0x4d3bc0;};'use strict';var _=require(_0x0caf('0x0'));var util=require('util');var logger=require(_0x0caf('0x1'))(_0x0caf('0x2'));var moment=require(_0x0caf('0x3'));var BPromise=require(_0x0caf('0x4'));var rp=require(_0x0caf('0x5'));var fs=require('fs');var path=require(_0x0caf('0x6'));var rimraf=require(_0x0caf('0x7'));var config=require(_0x0caf('0x8'));var attributes=require(_0x0caf('0x9'));module['exports']=function(_0x4a61da,_0x120fbf){return _0x4a61da[_0x0caf('0xa')](_0x0caf('0xb'),attributes,{'tableName':_0x0caf('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x816c=['lodash','util','../../config/logger','api','moment','bluebird','rimraf','../../config/environment','./analyticDefaultReport.attributes','define','AnalyticDefaultReport','analytics_default_reports'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x816c,0x6c));var _0xc816=function(_0x2c3f8f,_0x56f76e){_0x2c3f8f=_0x2c3f8f-0x0;var _0x3c07ce=_0x816c[_0x2c3f8f];return _0x3c07ce;};'use strict';var _=require(_0xc816('0x0'));var util=require(_0xc816('0x1'));var logger=require(_0xc816('0x2'))(_0xc816('0x3'));var moment=require(_0xc816('0x4'));var BPromise=require(_0xc816('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xc816('0x6'));var config=require(_0xc816('0x7'));var attributes=require(_0xc816('0x8'));module['exports']=function(_0x1ebc98,_0x4637fb){return _0x1ebc98[_0xc816('0x9')](_0xc816('0xa'),attributes,{'tableName':_0xc816('0xb'),'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 af1c61b..da2b298 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 _0x091e=['code','AnalyticDefaultReport,\x20%s,\x20%s','message','result','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info','debug','AnalyticDefaultReport,\x20%s,\x20%s,\x20%s','request\x20sent','error'];(function(_0x57bf5f,_0x22405e){var _0x139f6c=function(_0x25044b){while(--_0x25044b){_0x57bf5f['push'](_0x57bf5f['shift']());}};_0x139f6c(++_0x22405e);}(_0x091e,0x17e));var _0xe091=function(_0x2faddb,_0xc18b78){_0x2faddb=_0x2faddb-0x0;var _0x273c05=_0x091e[_0x2faddb];return _0x273c05;};'use strict';var _=require(_0xe091('0x0'));var util=require(_0xe091('0x1'));var moment=require('moment');var BPromise=require(_0xe091('0x2'));var rs=require(_0xe091('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe091('0x4'))['db'];var utils=require(_0xe091('0x5'));var logger=require(_0xe091('0x6'))(_0xe091('0x7'));var config=require(_0xe091('0x8'));var jayson=require(_0xe091('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x11ef28,_0x5736ae,_0x1ebfaa){return new BPromise(function(_0x2da76c,_0x2aa3c7){return client[_0xe091('0xa')](_0x11ef28,_0x1ebfaa)[_0xe091('0xb')](function(_0x22412d){logger[_0xe091('0xc')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x5736ae,'request\x20sent');logger[_0xe091('0xd')](_0xe091('0xe'),_0x5736ae,_0xe091('0xf'),JSON['stringify'](_0x22412d));if(_0x22412d[_0xe091('0x10')]){if(_0x22412d[_0xe091('0x10')][_0xe091('0x11')]===0x1f4){logger[_0xe091('0x10')](_0xe091('0x12'),_0x5736ae,_0x22412d['error'][_0xe091('0x13')]);return _0x2aa3c7(_0x22412d[_0xe091('0x10')][_0xe091('0x13')]);}logger[_0xe091('0x10')](_0xe091('0x12'),_0x5736ae,_0x22412d[_0xe091('0x10')][_0xe091('0x13')]);return _0x2da76c(_0x22412d[_0xe091('0x10')][_0xe091('0x13')]);}else{logger[_0xe091('0xc')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x5736ae,'request\x20sent');_0x2da76c(_0x22412d[_0xe091('0x14')][_0xe091('0x13')]);}})['catch'](function(_0x2319be){logger[_0xe091('0x10')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x5736ae,_0x2319be);_0x2aa3c7(_0x2319be);});});}
\ No newline at end of file
+var _0x2a10=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','request\x20sent','stringify','error','code','AnalyticDefaultReport,\x20%s,\x20%s','message','result','catch','util','moment','bluebird','randomstring'];(function(_0x57c749,_0x42cd9c){var _0x49af55=function(_0xa105b8){while(--_0xa105b8){_0x57c749['push'](_0x57c749['shift']());}};_0x49af55(++_0x42cd9c);}(_0x2a10,0xb4));var _0x02a1=function(_0xbd1aeb,_0x3f04b0){_0xbd1aeb=_0xbd1aeb-0x0;var _0x55b1be=_0x2a10[_0xbd1aeb];return _0x55b1be;};'use strict';var _=require('lodash');var util=require(_0x02a1('0x0'));var moment=require(_0x02a1('0x1'));var BPromise=require(_0x02a1('0x2'));var rs=require(_0x02a1('0x3'));var fs=require('fs');var Redis=require(_0x02a1('0x4'));var db=require(_0x02a1('0x5'))['db'];var utils=require(_0x02a1('0x6'));var logger=require(_0x02a1('0x7'))(_0x02a1('0x8'));var config=require(_0x02a1('0x9'));var jayson=require(_0x02a1('0xa'));var client=jayson[_0x02a1('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x595ff8,_0x53ce08,_0x31267e){return new BPromise(function(_0x373427,_0x5d40b9){return client[_0x02a1('0xc')](_0x595ff8,_0x31267e)[_0x02a1('0xd')](function(_0x346881){logger[_0x02a1('0xe')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x53ce08,_0x02a1('0xf'));logger['debug']('AnalyticDefaultReport,\x20%s,\x20%s,\x20%s',_0x53ce08,'request\x20sent',JSON[_0x02a1('0x10')](_0x346881));if(_0x346881[_0x02a1('0x11')]){if(_0x346881['error'][_0x02a1('0x12')]===0x1f4){logger[_0x02a1('0x11')](_0x02a1('0x13'),_0x53ce08,_0x346881[_0x02a1('0x11')][_0x02a1('0x14')]);return _0x5d40b9(_0x346881[_0x02a1('0x11')][_0x02a1('0x14')]);}logger['error'](_0x02a1('0x13'),_0x53ce08,_0x346881['error'][_0x02a1('0x14')]);return _0x373427(_0x346881[_0x02a1('0x11')]['message']);}else{logger[_0x02a1('0xe')](_0x02a1('0x13'),_0x53ce08,'request\x20sent');_0x373427(_0x346881[_0x02a1('0x15')][_0x02a1('0x14')]);}})[_0x02a1('0x16')](function(_0x34a6f1){logger[_0x02a1('0x11')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x53ce08,_0x34a6f1);_0x5d40b9(_0x34a6f1);});});}
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/index.js b/server/api/analyticDefaultReport/index.js
index 082c576..17c216c 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 _0x3f8b=['get','isAuthenticated','index','/:id','show','/:id/run','run','create','put','update','delete','exports','multer','util','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x11c221,_0x65c6a5){var _0x26deef=function(_0x2fa41a){while(--_0x2fa41a){_0x11c221['push'](_0x11c221['shift']());}};_0x26deef(++_0x65c6a5);}(_0x3f8b,0x1c4));var _0xb3f8=function(_0x11946c,_0x12152c){_0x11946c=_0x11946c-0x0;var _0x383935=_0x3f8b[_0x11946c];return _0x383935;};'use strict';var multer=require(_0xb3f8('0x0'));var util=require(_0xb3f8('0x1'));var path=require('path');var timeout=require(_0xb3f8('0x2'));var express=require(_0xb3f8('0x3'));var router=express['Router']();var fs_extra=require(_0xb3f8('0x4'));var auth=require(_0xb3f8('0x5'));var interaction=require(_0xb3f8('0x6'));var config=require(_0xb3f8('0x7'));var controller=require('./analyticDefaultReport.controller');router[_0xb3f8('0x8')]('/',auth[_0xb3f8('0x9')](),controller[_0xb3f8('0xa')]);router['get'](_0xb3f8('0xb'),auth['isAuthenticated'](),controller[_0xb3f8('0xc')]);router[_0xb3f8('0x8')]('/:id/preview',auth[_0xb3f8('0x9')](),controller['preview']);router[_0xb3f8('0x8')](_0xb3f8('0xd'),auth[_0xb3f8('0x9')](),controller[_0xb3f8('0xe')]);router[_0xb3f8('0x8')]('/:id/query',auth[_0xb3f8('0x9')](),controller['query']);router['post']('/',auth[_0xb3f8('0x9')](),controller[_0xb3f8('0xf')]);router[_0xb3f8('0x10')](_0xb3f8('0xb'),auth[_0xb3f8('0x9')](),controller[_0xb3f8('0x11')]);router[_0xb3f8('0x12')](_0xb3f8('0xb'),auth[_0xb3f8('0x9')](),controller['destroy']);module[_0xb3f8('0x13')]=router;
\ No newline at end of file
+var _0x6e06=['path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticDefaultReport.controller','index','/:id','isAuthenticated','show','get','/:id/preview','preview','/:id/run','/:id/query','query','post','create','put','update','delete','destroy','exports','multer','util'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x6e06,0x9a));var _0x66e0=function(_0x16d22f,_0x26c599){_0x16d22f=_0x16d22f-0x0;var _0x49272f=_0x6e06[_0x16d22f];return _0x49272f;};'use strict';var multer=require(_0x66e0('0x0'));var util=require(_0x66e0('0x1'));var path=require(_0x66e0('0x2'));var timeout=require(_0x66e0('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x66e0('0x4'));var auth=require(_0x66e0('0x5'));var interaction=require(_0x66e0('0x6'));var config=require(_0x66e0('0x7'));var controller=require(_0x66e0('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0x66e0('0x9')]);router['get'](_0x66e0('0xa'),auth[_0x66e0('0xb')](),controller[_0x66e0('0xc')]);router[_0x66e0('0xd')](_0x66e0('0xe'),auth['isAuthenticated'](),controller[_0x66e0('0xf')]);router[_0x66e0('0xd')](_0x66e0('0x10'),auth[_0x66e0('0xb')](),controller['run']);router['get'](_0x66e0('0x11'),auth['isAuthenticated'](),controller[_0x66e0('0x12')]);router[_0x66e0('0x13')]('/',auth[_0x66e0('0xb')](),controller[_0x66e0('0x14')]);router[_0x66e0('0x15')]('/:id',auth[_0x66e0('0xb')](),controller[_0x66e0('0x16')]);router[_0x66e0('0x17')](_0x66e0('0xa'),auth[_0x66e0('0xb')](),controller[_0x66e0('0x18')]);module[_0x66e0('0x19')]=router;
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js b/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js
index 2a5d07c..715eba5 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 _0xe0d0=['ENUM','pdf','csv','DATE','Loading','manual','scheduled','sequelize','moment','exports','STRING'];(function(_0x3a99c3,_0x4b254c){var _0x525117=function(_0x17e8bd){while(--_0x17e8bd){_0x3a99c3['push'](_0x3a99c3['shift']());}};_0x525117(++_0x4b254c);}(_0xe0d0,0x1e0));var _0x0e0d=function(_0x4325f8,_0xf8fee0){_0x4325f8=_0x4325f8-0x0;var _0x566582=_0xe0d0[_0x4325f8];return _0x566582;};'use strict';var Sequelize=require(_0x0e0d('0x0'));var moment=require(_0x0e0d('0x1'));module[_0x0e0d('0x2')]={'name':{'type':Sequelize[_0x0e0d('0x3')],'allowNull':![]},'basename':{'type':Sequelize[_0x0e0d('0x3')],'allowNull':![]},'output':{'type':Sequelize[_0x0e0d('0x4')]('csv',_0x0e0d('0x5'),'xlsx'),'allowNull':![],'defaultValue':_0x0e0d('0x6')},'savename':{'type':Sequelize['STRING'],'allowNull':![]},'startDate':{'type':Sequelize[_0x0e0d('0x7')]},'endDate':{'type':Sequelize[_0x0e0d('0x7')]},'status':{'type':Sequelize['STRING'],'defaultValue':_0x0e0d('0x8')},'type':{'type':Sequelize[_0x0e0d('0x4')](_0x0e0d('0x9'),_0x0e0d('0xa')),'allowNull':![],'defaultValue':_0x0e0d('0x9')},'reportId':{'type':Sequelize['INTEGER'](0xb)['UNSIGNED']},'reportType':{'type':Sequelize[_0x0e0d('0x3')]}};
\ No newline at end of file
+var _0xa964=['csv','pdf','DATE','Loading','manual','INTEGER','UNSIGNED','sequelize','exports','STRING','ENUM'];(function(_0x1b45e8,_0x2477f0){var _0x16f2bb=function(_0x1d70d8){while(--_0x1d70d8){_0x1b45e8['push'](_0x1b45e8['shift']());}};_0x16f2bb(++_0x2477f0);}(_0xa964,0xa1));var _0x4a96=function(_0x347471,_0x1c9a02){_0x347471=_0x347471-0x0;var _0x422b6a=_0xa964[_0x347471];return _0x422b6a;};'use strict';var Sequelize=require(_0x4a96('0x0'));var moment=require('moment');module[_0x4a96('0x1')]={'name':{'type':Sequelize[_0x4a96('0x2')],'allowNull':![]},'basename':{'type':Sequelize[_0x4a96('0x2')],'allowNull':![]},'output':{'type':Sequelize[_0x4a96('0x3')](_0x4a96('0x4'),_0x4a96('0x5'),'xlsx'),'allowNull':![],'defaultValue':_0x4a96('0x4')},'savename':{'type':Sequelize['STRING'],'allowNull':![]},'startDate':{'type':Sequelize[_0x4a96('0x6')]},'endDate':{'type':Sequelize['DATE']},'status':{'type':Sequelize['STRING'],'defaultValue':_0x4a96('0x7')},'type':{'type':Sequelize[_0x4a96('0x3')](_0x4a96('0x8'),'scheduled'),'allowNull':![],'defaultValue':_0x4a96('0x8')},'reportId':{'type':Sequelize[_0x4a96('0x9')](0xb)[_0x4a96('0xa')]},'reportType':{'type':Sequelize[_0x4a96('0x2')]}};
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.controller.js b/server/api/analyticExtractedReport/analyticExtractedReport.controller.js
index 22014cc..6aedcc4 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 _0x6a38=['type','VIRTUAL','merge','options','includeAll','include','findAll','rows','show','params','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','download','basename','output','existsSync','join','root','server/files/reports','Report\x20not\x20found\x20or\x20empty','exists','savename','%s.%s','toLowerCase','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','fs-extra','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','offset','count','set','Content-Range','reject','save','then','destroy','get','UserProfileResource','error','name','map','AnalyticExtractedReport','rawAttributes','fieldName','key','model','query','keys','filters','intersection','fields','attributes','length','sort','where','filter'];(function(_0x23a823,_0x4dbde0){var _0x5cbe93=function(_0x511fc9){while(--_0x511fc9){_0x23a823['push'](_0x23a823['shift']());}};_0x5cbe93(++_0x4dbde0);}(_0x6a38,0x189));var _0x86a3=function(_0xb204aa,_0x1809b2){_0xb204aa=_0xb204aa-0x0;var _0x2b2ee1=_0x6a38[_0xb204aa];return _0x2b2ee1;};'use strict';var emlformat=require(_0x86a3('0x0'));var rimraf=require(_0x86a3('0x1'));var zipdir=require(_0x86a3('0x2'));var jsonpatch=require(_0x86a3('0x3'));var rp=require('request-promise');var moment=require(_0x86a3('0x4'));var BPromise=require(_0x86a3('0x5'));var Mustache=require(_0x86a3('0x6'));var util=require(_0x86a3('0x7'));var path=require('path');var sox=require(_0x86a3('0x8'));var csv=require(_0x86a3('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x86a3('0xa'));var _=require('lodash');var squel=require(_0x86a3('0xb'));var crypto=require(_0x86a3('0xc'));var jsforce=require(_0x86a3('0xd'));var deskjs=require(_0x86a3('0xe'));var toCsv=require(_0x86a3('0x9'));var querystring=require('querystring');var Papa=require(_0x86a3('0xf'));var Redis=require(_0x86a3('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x86a3('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x86a3('0x12'));var logger=require(_0x86a3('0x13'))('api');var utils=require(_0x86a3('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0x86a3('0x15'));var db=require(_0x86a3('0x16'))['db'];function respondWithStatusCode(_0x34111e,_0x7f5c7a){_0x7f5c7a=_0x7f5c7a||0xcc;return function(_0x3a13a9){if(_0x3a13a9){return _0x34111e[_0x86a3('0x17')](_0x7f5c7a);}return _0x34111e[_0x86a3('0x18')](_0x7f5c7a)[_0x86a3('0x19')]();};}function respondWithResult(_0x23e247,_0x383a7d){_0x383a7d=_0x383a7d||0xc8;return function(_0x196fbe){if(_0x196fbe){return _0x23e247['status'](_0x383a7d)[_0x86a3('0x1a')](_0x196fbe);}};}function respondWithFilteredResult(_0x4c2b31,_0xc68a9f){return function(_0x28ebe7){if(_0x28ebe7){var _0x19591f=typeof _0xc68a9f['offset']===_0x86a3('0x1b')&&typeof _0xc68a9f[_0x86a3('0x1c')]===_0x86a3('0x1b');var _0xc7b4e0=_0x28ebe7['count'];var _0x4ac139=_0x19591f?0x0:_0xc68a9f[_0x86a3('0x1d')];var _0x126ecb=_0x19591f?_0x28ebe7[_0x86a3('0x1e')]:_0xc68a9f[_0x86a3('0x1d')]+_0xc68a9f[_0x86a3('0x1c')];var _0x4298df;if(_0x126ecb>=_0xc7b4e0){_0x126ecb=_0xc7b4e0;_0x4298df=0xc8;}else{_0x4298df=0xce;}_0x4c2b31[_0x86a3('0x18')](_0x4298df);return _0x4c2b31[_0x86a3('0x1f')](_0x86a3('0x20'),_0x4ac139+'-'+_0x126ecb+'/'+_0xc7b4e0)[_0x86a3('0x1a')](_0x28ebe7);}return null;};}function patchUpdates(_0x59fc3e){return function(_0x34ee32){try{jsonpatch['apply'](_0x34ee32,_0x59fc3e,!![]);}catch(_0x2c1fe2){return BPromise[_0x86a3('0x21')](_0x2c1fe2);}return _0x34ee32[_0x86a3('0x22')]();};}function saveUpdates(_0x9619ad,_0xf88977){return function(_0x198f7b){if(_0x198f7b){return _0x198f7b['update'](_0x9619ad)[_0x86a3('0x23')](function(_0xe5e0a9){return _0xe5e0a9;});}return null;};}function removeEntity(_0x855eb4,_0x2479ea){return function(_0x228476){if(_0x228476){return _0x228476[_0x86a3('0x24')]()['then'](function(){var _0x47e99c=_0x228476[_0x86a3('0x25')]({'plain':!![]});var _0x1c6036='ExtractedReports';return db[_0x86a3('0x26')][_0x86a3('0x24')]({'where':{'type':_0x1c6036,'resourceId':_0x47e99c['id']}})['then'](function(){return _0x228476;});})[_0x86a3('0x23')](function(){_0x855eb4[_0x86a3('0x18')](0xcc)[_0x86a3('0x19')]();});}};}function handleEntityNotFound(_0x41cbbd,_0x4d9d3d){return function(_0x2965d4){if(!_0x2965d4){_0x41cbbd[_0x86a3('0x17')](0x194);}return _0x2965d4;};}function handleError(_0x4bd969,_0x4ecbb6){_0x4ecbb6=_0x4ecbb6||0x1f4;return function(_0x48fed9){logger[_0x86a3('0x27')](_0x48fed9['stack']);if(_0x48fed9[_0x86a3('0x28')]){delete _0x48fed9[_0x86a3('0x28')];}_0x4bd969[_0x86a3('0x18')](_0x4ecbb6)['send'](_0x48fed9);};}exports['index']=function(_0x239928,_0x16116d){var _0x23e27d={},_0x3ad8ec={},_0x3b0d67={'count':0x0,'rows':[]};var _0x34b529=_[_0x86a3('0x29')](db[_0x86a3('0x2a')][_0x86a3('0x2b')],function(_0x49d1a8){return{'name':_0x49d1a8[_0x86a3('0x2c')],'type':_0x49d1a8['type'][_0x86a3('0x2d')]};});_0x3ad8ec[_0x86a3('0x2e')]=_[_0x86a3('0x29')](_0x34b529,_0x86a3('0x28'));_0x3ad8ec[_0x86a3('0x2f')]=_[_0x86a3('0x30')](_0x239928['query']);_0x3ad8ec[_0x86a3('0x31')]=_[_0x86a3('0x32')](_0x3ad8ec[_0x86a3('0x2e')],_0x3ad8ec[_0x86a3('0x2f')]);_0x23e27d['attributes']=_['intersection'](_0x3ad8ec[_0x86a3('0x2e')],qs[_0x86a3('0x33')](_0x239928[_0x86a3('0x2f')][_0x86a3('0x33')]));_0x23e27d['attributes']=_0x23e27d[_0x86a3('0x34')][_0x86a3('0x35')]?_0x23e27d['attributes']:_0x3ad8ec['model'];if(!_0x239928[_0x86a3('0x2f')]['hasOwnProperty']('nolimit')){_0x23e27d['limit']=qs[_0x86a3('0x1c')](_0x239928['query'][_0x86a3('0x1c')]);_0x23e27d[_0x86a3('0x1d')]=qs['offset'](_0x239928[_0x86a3('0x2f')][_0x86a3('0x1d')]);}_0x23e27d['order']=qs[_0x86a3('0x36')](_0x239928[_0x86a3('0x2f')][_0x86a3('0x36')]);_0x23e27d[_0x86a3('0x37')]=qs[_0x86a3('0x31')](_['pick'](_0x239928[_0x86a3('0x2f')],_0x3ad8ec[_0x86a3('0x31')]),_0x34b529);if(_0x239928['query'][_0x86a3('0x38')]){_0x23e27d[_0x86a3('0x37')]=_['merge'](_0x23e27d[_0x86a3('0x37')],{'$or':_[_0x86a3('0x29')](_0x34b529,function(_0x26e8a5){if(_0x26e8a5[_0x86a3('0x39')]!==_0x86a3('0x3a')){var _0x51ce42={};_0x51ce42[_0x26e8a5['name']]={'$like':'%'+_0x239928[_0x86a3('0x2f')][_0x86a3('0x38')]+'%'};return _0x51ce42;}})});}_0x23e27d=_[_0x86a3('0x3b')]({},_0x23e27d,_0x239928[_0x86a3('0x3c')]);var _0x1081d7={'where':_0x23e27d['where']};return db[_0x86a3('0x2a')][_0x86a3('0x1e')](_0x1081d7)[_0x86a3('0x23')](function(_0x2b8f7b){_0x3b0d67['count']=_0x2b8f7b;if(_0x239928[_0x86a3('0x2f')][_0x86a3('0x3d')]){_0x23e27d[_0x86a3('0x3e')]=[{'all':!![]}];}return db[_0x86a3('0x2a')][_0x86a3('0x3f')](_0x23e27d);})[_0x86a3('0x23')](function(_0x593f30){_0x3b0d67[_0x86a3('0x40')]=_0x593f30;return _0x3b0d67;})[_0x86a3('0x23')](respondWithFilteredResult(_0x16116d,_0x23e27d))['catch'](handleError(_0x16116d,null));};exports[_0x86a3('0x41')]=function(_0x53e571,_0xe497bb){var _0x3b0d1b={'raw':!![],'where':{'id':_0x53e571[_0x86a3('0x42')]['id']}},_0x4ae206={};_0x4ae206[_0x86a3('0x2e')]=_[_0x86a3('0x30')](db[_0x86a3('0x2a')][_0x86a3('0x2b')]);_0x4ae206[_0x86a3('0x2f')]=_['keys'](_0x53e571[_0x86a3('0x2f')]);_0x4ae206[_0x86a3('0x31')]=_[_0x86a3('0x32')](_0x4ae206[_0x86a3('0x2e')],_0x4ae206['query']);_0x3b0d1b[_0x86a3('0x34')]=_[_0x86a3('0x32')](_0x4ae206[_0x86a3('0x2e')],qs[_0x86a3('0x33')](_0x53e571['query'][_0x86a3('0x33')]));_0x3b0d1b[_0x86a3('0x34')]=_0x3b0d1b[_0x86a3('0x34')][_0x86a3('0x35')]?_0x3b0d1b[_0x86a3('0x34')]:_0x4ae206[_0x86a3('0x2e')];if(_0x53e571[_0x86a3('0x2f')][_0x86a3('0x3d')]){_0x3b0d1b[_0x86a3('0x3e')]=[{'all':!![]}];}_0x3b0d1b=_[_0x86a3('0x3b')]({},_0x3b0d1b,_0x53e571[_0x86a3('0x3c')]);return db[_0x86a3('0x2a')][_0x86a3('0x43')](_0x3b0d1b)[_0x86a3('0x23')](handleEntityNotFound(_0xe497bb,null))[_0x86a3('0x23')](respondWithResult(_0xe497bb,null))['catch'](handleError(_0xe497bb,null));};exports[_0x86a3('0x44')]=function(_0x5d4f6c,_0x2181ea){return db[_0x86a3('0x2a')][_0x86a3('0x44')](_0x5d4f6c[_0x86a3('0x45')],{})[_0x86a3('0x23')](function(_0x40af65){var _0x311e6a=_0x5d4f6c[_0x86a3('0x46')][_0x86a3('0x25')]({'plain':!![]});if(!_0x311e6a)throw new Error(_0x86a3('0x47'));if(_0x311e6a[_0x86a3('0x48')]===_0x86a3('0x46')){var _0x24b3a1=_0x40af65['get']({'plain':!![]});var _0x58af52='ExtractedReports';return db[_0x86a3('0x49')]['find']({'where':{'name':_0x58af52,'userProfileId':_0x311e6a[_0x86a3('0x4a')]},'raw':!![]})[_0x86a3('0x23')](function(_0x14e14b){if(_0x14e14b&&_0x14e14b[_0x86a3('0x4b')]===0x0){return db[_0x86a3('0x26')][_0x86a3('0x44')]({'name':_0x24b3a1['name'],'resourceId':_0x24b3a1['id'],'type':_0x14e14b[_0x86a3('0x28')],'sectionId':_0x14e14b['id']},{})[_0x86a3('0x23')](function(){return _0x40af65;});}else{return _0x40af65;}})[_0x86a3('0x4c')](function(_0xc1807f){logger['error'](_0x86a3('0x4d'),_0xc1807f);throw _0xc1807f;});}return _0x40af65;})[_0x86a3('0x23')](respondWithResult(_0x2181ea,0xc9))['catch'](handleError(_0x2181ea,null));};exports['update']=function(_0x2602ee,_0xfdccbf){if(_0x2602ee['body']['id']){delete _0x2602ee[_0x86a3('0x45')]['id'];}return db[_0x86a3('0x2a')]['find']({'where':{'id':_0x2602ee['params']['id']}})[_0x86a3('0x23')](handleEntityNotFound(_0xfdccbf,null))[_0x86a3('0x23')](saveUpdates(_0x2602ee[_0x86a3('0x45')],null))[_0x86a3('0x23')](respondWithResult(_0xfdccbf,null))[_0x86a3('0x4c')](handleError(_0xfdccbf,null));};exports[_0x86a3('0x24')]=function(_0x591785,_0x19b572){return db['AnalyticExtractedReport'][_0x86a3('0x43')]({'where':{'id':_0x591785['params']['id']}})['then'](handleEntityNotFound(_0x19b572,null))[_0x86a3('0x23')](removeEntity(_0x19b572,null))[_0x86a3('0x4c')](handleError(_0x19b572,null));};exports[_0x86a3('0x4e')]=function(_0x597153,_0x450e83,_0x483e64){return db['AnalyticExtractedReport']['find']({'where':{'id':_0x597153[_0x86a3('0x42')]['id']},'attributes':[_0x86a3('0x28'),_0x86a3('0x4f'),'savename',_0x86a3('0x50')],'raw':!![]})[_0x86a3('0x23')](handleEntityNotFound(_0x450e83,null))[_0x86a3('0x23')](function(_0x4b7c85){if(_0x4b7c85){if(!fs[_0x86a3('0x51')](path[_0x86a3('0x52')](config[_0x86a3('0x53')],_0x86a3('0x54'),_0x4b7c85['savename']))){throw new db['Sequelize']['ValidationError'](_0x86a3('0x55'));}if(_0x597153[_0x86a3('0x2f')][_0x86a3('0x56')]){return _0x450e83[_0x86a3('0x17')](0xc8);}return _0x450e83[_0x86a3('0x4e')](path[_0x86a3('0x52')](config['root'],_0x86a3('0x54'),_0x4b7c85[_0x86a3('0x57')]),util['format'](_0x86a3('0x58'),_0x4b7c85['basename']||_0x4b7c85[_0x86a3('0x28')],_0x4b7c85[_0x86a3('0x50')][_0x86a3('0x59')]()));}})[_0x86a3('0x4c')](handleError(_0x450e83,null));};
\ No newline at end of file
+var _0x4aa2=['VIRTUAL','filter','options','AnalyticExtractedReport','includeAll','include','findAll','rows','catch','show','params','length','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','download','savename','output','server/files/reports','ValidationError','Report\x20not\x20found\x20or\x20empty','exists','join','root','format','basename','toLowerCase','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','util','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','undefined','count','offset','limit','set','Content-Range','apply','reject','save','update','then','get','ExtractedReports','UserProfileResource','destroy','sendStatus','error','stack','name','send','index','rawAttributes','fieldName','type','model','map','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','sort','pick','where','merge'];(function(_0x67d9db,_0x269b5f){var _0x1c31d9=function(_0x5d706e){while(--_0x5d706e){_0x67d9db['push'](_0x67d9db['shift']());}};_0x1c31d9(++_0x269b5f);}(_0x4aa2,0x14d));var _0x24aa=function(_0x2bf65d,_0x4e60e5){_0x2bf65d=_0x2bf65d-0x0;var _0x15c520=_0x4aa2[_0x2bf65d];return _0x15c520;};'use strict';var emlformat=require(_0x24aa('0x0'));var rimraf=require(_0x24aa('0x1'));var zipdir=require(_0x24aa('0x2'));var jsonpatch=require(_0x24aa('0x3'));var rp=require(_0x24aa('0x4'));var moment=require(_0x24aa('0x5'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x24aa('0x6'));var path=require('path');var sox=require(_0x24aa('0x7'));var csv=require(_0x24aa('0x8'));var ejs=require(_0x24aa('0x9'));var fs=require('fs');var fs_extra=require(_0x24aa('0xa'));var _=require(_0x24aa('0xb'));var squel=require('squel');var crypto=require(_0x24aa('0xc'));var jsforce=require(_0x24aa('0xd'));var deskjs=require(_0x24aa('0xe'));var toCsv=require('to-csv');var querystring=require(_0x24aa('0xf'));var Papa=require('papaparse');var Redis=require(_0x24aa('0x10'));var authService=require(_0x24aa('0x11'));var qs=require(_0x24aa('0x12'));var as=require(_0x24aa('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x24aa('0x14'))(_0x24aa('0x15'));var utils=require(_0x24aa('0x16'));var config=require(_0x24aa('0x17'));var licenseUtil=require(_0x24aa('0x18'));var db=require(_0x24aa('0x19'))['db'];function respondWithStatusCode(_0x2c6ed2,_0x169ad8){_0x169ad8=_0x169ad8||0xcc;return function(_0x248bf9){if(_0x248bf9){return _0x2c6ed2['sendStatus'](_0x169ad8);}return _0x2c6ed2[_0x24aa('0x1a')](_0x169ad8)[_0x24aa('0x1b')]();};}function respondWithResult(_0x202a6c,_0x177713){_0x177713=_0x177713||0xc8;return function(_0x46e913){if(_0x46e913){return _0x202a6c['status'](_0x177713)[_0x24aa('0x1c')](_0x46e913);}};}function respondWithFilteredResult(_0x1ac9e2,_0x844681){return function(_0x75190a){if(_0x75190a){var _0x3867de=typeof _0x844681['offset']===_0x24aa('0x1d')&&typeof _0x844681['limit']==='undefined';var _0xe6413=_0x75190a[_0x24aa('0x1e')];var _0x5153e4=_0x3867de?0x0:_0x844681[_0x24aa('0x1f')];var _0xe13a38=_0x3867de?_0x75190a[_0x24aa('0x1e')]:_0x844681[_0x24aa('0x1f')]+_0x844681[_0x24aa('0x20')];var _0xaf137e;if(_0xe13a38>=_0xe6413){_0xe13a38=_0xe6413;_0xaf137e=0xc8;}else{_0xaf137e=0xce;}_0x1ac9e2['status'](_0xaf137e);return _0x1ac9e2[_0x24aa('0x21')](_0x24aa('0x22'),_0x5153e4+'-'+_0xe13a38+'/'+_0xe6413)[_0x24aa('0x1c')](_0x75190a);}return null;};}function patchUpdates(_0x111201){return function(_0x1c9feb){try{jsonpatch[_0x24aa('0x23')](_0x1c9feb,_0x111201,!![]);}catch(_0x1c8ed8){return BPromise[_0x24aa('0x24')](_0x1c8ed8);}return _0x1c9feb[_0x24aa('0x25')]();};}function saveUpdates(_0xacf0e7,_0x3f44ce){return function(_0x46350a){if(_0x46350a){return _0x46350a[_0x24aa('0x26')](_0xacf0e7)['then'](function(_0xaf975a){return _0xaf975a;});}return null;};}function removeEntity(_0x41f18a,_0x392460){return function(_0x22ae7e){if(_0x22ae7e){return _0x22ae7e['destroy']()[_0x24aa('0x27')](function(){var _0x59d430=_0x22ae7e[_0x24aa('0x28')]({'plain':!![]});var _0x524ed9=_0x24aa('0x29');return db[_0x24aa('0x2a')][_0x24aa('0x2b')]({'where':{'type':_0x524ed9,'resourceId':_0x59d430['id']}})[_0x24aa('0x27')](function(){return _0x22ae7e;});})[_0x24aa('0x27')](function(){_0x41f18a['status'](0xcc)[_0x24aa('0x1b')]();});}};}function handleEntityNotFound(_0x73428d,_0x3171f8){return function(_0x5dab9d){if(!_0x5dab9d){_0x73428d[_0x24aa('0x2c')](0x194);}return _0x5dab9d;};}function handleError(_0x5b742a,_0x16ce05){_0x16ce05=_0x16ce05||0x1f4;return function(_0x55da2f){logger[_0x24aa('0x2d')](_0x55da2f[_0x24aa('0x2e')]);if(_0x55da2f[_0x24aa('0x2f')]){delete _0x55da2f[_0x24aa('0x2f')];}_0x5b742a[_0x24aa('0x1a')](_0x16ce05)[_0x24aa('0x30')](_0x55da2f);};}exports[_0x24aa('0x31')]=function(_0x467e22,_0x36a6ee){var _0x5cdbc8={},_0x1b8c49={},_0x313592={'count':0x0,'rows':[]};var _0x270a09=_['map'](db['AnalyticExtractedReport'][_0x24aa('0x32')],function(_0x259b5b){return{'name':_0x259b5b[_0x24aa('0x33')],'type':_0x259b5b[_0x24aa('0x34')]['key']};});_0x1b8c49[_0x24aa('0x35')]=_[_0x24aa('0x36')](_0x270a09,_0x24aa('0x2f'));_0x1b8c49[_0x24aa('0x37')]=_[_0x24aa('0x38')](_0x467e22[_0x24aa('0x37')]);_0x1b8c49[_0x24aa('0x39')]=_[_0x24aa('0x3a')](_0x1b8c49[_0x24aa('0x35')],_0x1b8c49[_0x24aa('0x37')]);_0x5cdbc8[_0x24aa('0x3b')]=_['intersection'](_0x1b8c49[_0x24aa('0x35')],qs[_0x24aa('0x3c')](_0x467e22['query'][_0x24aa('0x3c')]));_0x5cdbc8['attributes']=_0x5cdbc8[_0x24aa('0x3b')]['length']?_0x5cdbc8[_0x24aa('0x3b')]:_0x1b8c49[_0x24aa('0x35')];if(!_0x467e22['query'][_0x24aa('0x3d')](_0x24aa('0x3e'))){_0x5cdbc8[_0x24aa('0x20')]=qs['limit'](_0x467e22['query'][_0x24aa('0x20')]);_0x5cdbc8[_0x24aa('0x1f')]=qs[_0x24aa('0x1f')](_0x467e22[_0x24aa('0x37')][_0x24aa('0x1f')]);}_0x5cdbc8['order']=qs[_0x24aa('0x3f')](_0x467e22[_0x24aa('0x37')][_0x24aa('0x3f')]);_0x5cdbc8['where']=qs['filters'](_[_0x24aa('0x40')](_0x467e22[_0x24aa('0x37')],_0x1b8c49[_0x24aa('0x39')]),_0x270a09);if(_0x467e22[_0x24aa('0x37')]['filter']){_0x5cdbc8[_0x24aa('0x41')]=_[_0x24aa('0x42')](_0x5cdbc8[_0x24aa('0x41')],{'$or':_[_0x24aa('0x36')](_0x270a09,function(_0x36cf2e){if(_0x36cf2e[_0x24aa('0x34')]!==_0x24aa('0x43')){var _0x17478e={};_0x17478e[_0x36cf2e[_0x24aa('0x2f')]]={'$like':'%'+_0x467e22[_0x24aa('0x37')][_0x24aa('0x44')]+'%'};return _0x17478e;}})});}_0x5cdbc8=_[_0x24aa('0x42')]({},_0x5cdbc8,_0x467e22[_0x24aa('0x45')]);var _0x3ff049={'where':_0x5cdbc8['where']};return db[_0x24aa('0x46')][_0x24aa('0x1e')](_0x3ff049)[_0x24aa('0x27')](function(_0x3e0fab){_0x313592[_0x24aa('0x1e')]=_0x3e0fab;if(_0x467e22['query'][_0x24aa('0x47')]){_0x5cdbc8[_0x24aa('0x48')]=[{'all':!![]}];}return db['AnalyticExtractedReport'][_0x24aa('0x49')](_0x5cdbc8);})[_0x24aa('0x27')](function(_0x1bac8e){_0x313592[_0x24aa('0x4a')]=_0x1bac8e;return _0x313592;})[_0x24aa('0x27')](respondWithFilteredResult(_0x36a6ee,_0x5cdbc8))[_0x24aa('0x4b')](handleError(_0x36a6ee,null));};exports[_0x24aa('0x4c')]=function(_0x536ccd,_0xf79581){var _0x227288={'raw':!![],'where':{'id':_0x536ccd[_0x24aa('0x4d')]['id']}},_0x1b38d8={};_0x1b38d8[_0x24aa('0x35')]=_[_0x24aa('0x38')](db[_0x24aa('0x46')]['rawAttributes']);_0x1b38d8[_0x24aa('0x37')]=_['keys'](_0x536ccd[_0x24aa('0x37')]);_0x1b38d8[_0x24aa('0x39')]=_[_0x24aa('0x3a')](_0x1b38d8[_0x24aa('0x35')],_0x1b38d8[_0x24aa('0x37')]);_0x227288['attributes']=_[_0x24aa('0x3a')](_0x1b38d8[_0x24aa('0x35')],qs['fields'](_0x536ccd[_0x24aa('0x37')][_0x24aa('0x3c')]));_0x227288[_0x24aa('0x3b')]=_0x227288['attributes'][_0x24aa('0x4e')]?_0x227288[_0x24aa('0x3b')]:_0x1b38d8['model'];if(_0x536ccd['query']['includeAll']){_0x227288[_0x24aa('0x48')]=[{'all':!![]}];}_0x227288=_[_0x24aa('0x42')]({},_0x227288,_0x536ccd['options']);return db[_0x24aa('0x46')][_0x24aa('0x4f')](_0x227288)[_0x24aa('0x27')](handleEntityNotFound(_0xf79581,null))['then'](respondWithResult(_0xf79581,null))[_0x24aa('0x4b')](handleError(_0xf79581,null));};exports[_0x24aa('0x50')]=function(_0x47d7c3,_0xceab26){return db[_0x24aa('0x46')][_0x24aa('0x50')](_0x47d7c3[_0x24aa('0x51')],{})[_0x24aa('0x27')](function(_0x4c3c25){var _0x21d4cb=_0x47d7c3[_0x24aa('0x52')][_0x24aa('0x28')]({'plain':!![]});if(!_0x21d4cb)throw new Error(_0x24aa('0x53'));if(_0x21d4cb[_0x24aa('0x54')]==='user'){var _0x3754eb=_0x4c3c25[_0x24aa('0x28')]({'plain':!![]});var _0x13047a='ExtractedReports';return db[_0x24aa('0x55')]['find']({'where':{'name':_0x13047a,'userProfileId':_0x21d4cb[_0x24aa('0x56')]},'raw':!![]})[_0x24aa('0x27')](function(_0xd0b16){if(_0xd0b16&&_0xd0b16[_0x24aa('0x57')]===0x0){return db[_0x24aa('0x2a')][_0x24aa('0x50')]({'name':_0x3754eb['name'],'resourceId':_0x3754eb['id'],'type':_0xd0b16['name'],'sectionId':_0xd0b16['id']},{})[_0x24aa('0x27')](function(){return _0x4c3c25;});}else{return _0x4c3c25;}})[_0x24aa('0x4b')](function(_0xa49096){logger[_0x24aa('0x2d')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0xa49096);throw _0xa49096;});}return _0x4c3c25;})[_0x24aa('0x27')](respondWithResult(_0xceab26,0xc9))[_0x24aa('0x4b')](handleError(_0xceab26,null));};exports['update']=function(_0xd618d8,_0x36fa8e){if(_0xd618d8[_0x24aa('0x51')]['id']){delete _0xd618d8[_0x24aa('0x51')]['id'];}return db[_0x24aa('0x46')][_0x24aa('0x4f')]({'where':{'id':_0xd618d8[_0x24aa('0x4d')]['id']}})[_0x24aa('0x27')](handleEntityNotFound(_0x36fa8e,null))['then'](saveUpdates(_0xd618d8[_0x24aa('0x51')],null))[_0x24aa('0x27')](respondWithResult(_0x36fa8e,null))[_0x24aa('0x4b')](handleError(_0x36fa8e,null));};exports[_0x24aa('0x2b')]=function(_0x3fc971,_0x4eac63){return db[_0x24aa('0x46')][_0x24aa('0x4f')]({'where':{'id':_0x3fc971['params']['id']}})[_0x24aa('0x27')](handleEntityNotFound(_0x4eac63,null))[_0x24aa('0x27')](removeEntity(_0x4eac63,null))[_0x24aa('0x4b')](handleError(_0x4eac63,null));};exports[_0x24aa('0x58')]=function(_0x19a213,_0x308283,_0x5d17e8){return db['AnalyticExtractedReport'][_0x24aa('0x4f')]({'where':{'id':_0x19a213[_0x24aa('0x4d')]['id']},'attributes':[_0x24aa('0x2f'),'basename',_0x24aa('0x59'),_0x24aa('0x5a')],'raw':!![]})['then'](handleEntityNotFound(_0x308283,null))[_0x24aa('0x27')](function(_0x487728){if(_0x487728){if(!fs['existsSync'](path['join'](config['root'],_0x24aa('0x5b'),_0x487728[_0x24aa('0x59')]))){throw new db['Sequelize'][(_0x24aa('0x5c'))](_0x24aa('0x5d'));}if(_0x19a213[_0x24aa('0x37')][_0x24aa('0x5e')]){return _0x308283[_0x24aa('0x2c')](0xc8);}return _0x308283[_0x24aa('0x58')](path[_0x24aa('0x5f')](config[_0x24aa('0x60')],_0x24aa('0x5b'),_0x487728['savename']),util[_0x24aa('0x61')]('%s.%s',_0x487728[_0x24aa('0x62')]||_0x487728[_0x24aa('0x2f')],_0x487728['output'][_0x24aa('0x63')]()));}})[_0x24aa('0x4b')](handleError(_0x308283,null));};
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.model.js b/server/api/analyticExtractedReport/analyticExtractedReport.model.js
index f92f39d..87d8185 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 _0xd314=['define','AnalyticExtractedReport','lodash','util','../../config/logger','api','bluebird','request-promise','path','../../config/environment','./analyticExtractedReport.attributes','exports'];(function(_0x3ea5e1,_0x17c486){var _0x1b81d7=function(_0x5af999){while(--_0x5af999){_0x3ea5e1['push'](_0x3ea5e1['shift']());}};_0x1b81d7(++_0x17c486);}(_0xd314,0x9e));var _0x4d31=function(_0x4daa9b,_0x4a0596){_0x4daa9b=_0x4daa9b-0x0;var _0x33b857=_0xd314[_0x4daa9b];return _0x33b857;};'use strict';var _=require(_0x4d31('0x0'));var util=require(_0x4d31('0x1'));var logger=require(_0x4d31('0x2'))(_0x4d31('0x3'));var moment=require('moment');var BPromise=require(_0x4d31('0x4'));var rp=require(_0x4d31('0x5'));var fs=require('fs');var path=require(_0x4d31('0x6'));var rimraf=require('rimraf');var config=require(_0x4d31('0x7'));var attributes=require(_0x4d31('0x8'));module[_0x4d31('0x9')]=function(_0x3508c4,_0x64e3ca){return _0x3508c4[_0x4d31('0xa')](_0x4d31('0xb'),attributes,{'tableName':'analytics_extracted_reports','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xcd0b=['moment','bluebird','path','./analyticExtractedReport.attributes','exports','define','analytics_extracted_reports','lodash','util','../../config/logger','api'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xcd0b,0x193));var _0xbcd0=function(_0x532f2a,_0x23560c){_0x532f2a=_0x532f2a-0x0;var _0x1b9649=_0xcd0b[_0x532f2a];return _0x1b9649;};'use strict';var _=require(_0xbcd0('0x0'));var util=require(_0xbcd0('0x1'));var logger=require(_0xbcd0('0x2'))(_0xbcd0('0x3'));var moment=require(_0xbcd0('0x4'));var BPromise=require(_0xbcd0('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xbcd0('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xbcd0('0x7'));module[_0xbcd0('0x8')]=function(_0x4017c7,_0x1b1ff5){return _0x4017c7[_0xbcd0('0x9')]('AnalyticExtractedReport',attributes,{'tableName':_0xbcd0('0xa'),'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 4356a48..46d7c4c 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 _0xd840=['error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','jayson/promise','http','request','then','AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x5d1d48,_0x342cf8){var _0x4abd7d=function(_0x262dae){while(--_0x262dae){_0x5d1d48['push'](_0x5d1d48['shift']());}};_0x4abd7d(++_0x342cf8);}(_0xd840,0xd7));var _0x0d84=function(_0x11cd06,_0x48a90a){_0x11cd06=_0x11cd06-0x0;var _0x16290f=_0xd840[_0x11cd06];return _0x16290f;};'use strict';var _=require(_0x0d84('0x0'));var util=require(_0x0d84('0x1'));var moment=require(_0x0d84('0x2'));var BPromise=require('bluebird');var rs=require(_0x0d84('0x3'));var fs=require('fs');var Redis=require(_0x0d84('0x4'));var db=require(_0x0d84('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x0d84('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x0d84('0x7'));var client=jayson['client'][_0x0d84('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5df0e9,_0x4edba8,_0x95403c){return new BPromise(function(_0x3147a1,_0x4e633e){return client[_0x0d84('0x9')](_0x5df0e9,_0x95403c)[_0x0d84('0xa')](function(_0x3b7164){logger['info'](_0x0d84('0xb'),_0x4edba8,_0x0d84('0xc'));logger[_0x0d84('0xd')](_0x0d84('0xe'),_0x4edba8,'request\x20sent',JSON[_0x0d84('0xf')](_0x3b7164));if(_0x3b7164[_0x0d84('0x10')]){if(_0x3b7164['error'][_0x0d84('0x11')]===0x1f4){logger['error'](_0x0d84('0xb'),_0x4edba8,_0x3b7164[_0x0d84('0x10')]['message']);return _0x4e633e(_0x3b7164[_0x0d84('0x10')][_0x0d84('0x12')]);}logger['error'](_0x0d84('0xb'),_0x4edba8,_0x3b7164[_0x0d84('0x10')]['message']);return _0x3147a1(_0x3b7164[_0x0d84('0x10')][_0x0d84('0x12')]);}else{logger['info'](_0x0d84('0xb'),_0x4edba8,'request\x20sent');_0x3147a1(_0x3b7164[_0x0d84('0x13')][_0x0d84('0x12')]);}})[_0x0d84('0x14')](function(_0x12e5c0){logger[_0x0d84('0x10')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x4edba8,_0x12e5c0);_0x4e633e(_0x12e5c0);});});}
\ No newline at end of file
+var _0xf609=['info','AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','then'];(function(_0x55b776,_0x4ad313){var _0x10a1c2=function(_0x5be11e){while(--_0x5be11e){_0x55b776['push'](_0x55b776['shift']());}};_0x10a1c2(++_0x4ad313);}(_0xf609,0x18b));var _0x9f60=function(_0x267086,_0x4103f8){_0x267086=_0x267086-0x0;var _0x1f29ce=_0xf609[_0x267086];return _0x1f29ce;};'use strict';var _=require('lodash');var util=require(_0x9f60('0x0'));var moment=require(_0x9f60('0x1'));var BPromise=require(_0x9f60('0x2'));var rs=require(_0x9f60('0x3'));var fs=require('fs');var Redis=require(_0x9f60('0x4'));var db=require(_0x9f60('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x9f60('0x6'));var config=require(_0x9f60('0x7'));var jayson=require(_0x9f60('0x8'));var client=jayson[_0x9f60('0x9')][_0x9f60('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xda67d0,_0x8fb51c,_0x12d850){return new BPromise(function(_0x169b6c,_0x21ee61){return client[_0x9f60('0xb')](_0xda67d0,_0x12d850)[_0x9f60('0xc')](function(_0x528963){logger[_0x9f60('0xd')](_0x9f60('0xe'),_0x8fb51c,_0x9f60('0xf'));logger[_0x9f60('0x10')](_0x9f60('0x11'),_0x8fb51c,'request\x20sent',JSON[_0x9f60('0x12')](_0x528963));if(_0x528963[_0x9f60('0x13')]){if(_0x528963[_0x9f60('0x13')][_0x9f60('0x14')]===0x1f4){logger['error']('AnalyticExtractedReport,\x20%s,\x20%s',_0x8fb51c,_0x528963['error'][_0x9f60('0x15')]);return _0x21ee61(_0x528963['error'][_0x9f60('0x15')]);}logger[_0x9f60('0x13')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x8fb51c,_0x528963[_0x9f60('0x13')][_0x9f60('0x15')]);return _0x169b6c(_0x528963[_0x9f60('0x13')]['message']);}else{logger[_0x9f60('0xd')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x8fb51c,_0x9f60('0xf'));_0x169b6c(_0x528963[_0x9f60('0x16')][_0x9f60('0x15')]);}})[_0x9f60('0x17')](function(_0x456c49){logger['error']('AnalyticExtractedReport,\x20%s,\x20%s',_0x8fb51c,_0x456c49);_0x21ee61(_0x456c49);});});}
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/index.js b/server/api/analyticExtractedReport/index.js
index 1c47b50..47c828f 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 _0xae03=['exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','./analyticExtractedReport.controller','get','index','/:id','isAuthenticated','show','/:id/download','post','create','put','update','destroy'];(function(_0xc7ed0c,_0x1d50c8){var _0x4f6662=function(_0x4c1108){while(--_0x4c1108){_0xc7ed0c['push'](_0xc7ed0c['shift']());}};_0x4f6662(++_0x1d50c8);}(_0xae03,0x1e4));var _0x3ae0=function(_0x192882,_0x76baac){_0x192882=_0x192882-0x0;var _0x3ccd45=_0xae03[_0x192882];return _0x3ccd45;};'use strict';var multer=require(_0x3ae0('0x0'));var util=require(_0x3ae0('0x1'));var path=require(_0x3ae0('0x2'));var timeout=require(_0x3ae0('0x3'));var express=require(_0x3ae0('0x4'));var router=express[_0x3ae0('0x5')]();var fs_extra=require(_0x3ae0('0x6'));var auth=require(_0x3ae0('0x7'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x3ae0('0x8'));router[_0x3ae0('0x9')]('/',auth['isAuthenticated'](),controller[_0x3ae0('0xa')]);router['get'](_0x3ae0('0xb'),auth[_0x3ae0('0xc')](),controller[_0x3ae0('0xd')]);router[_0x3ae0('0x9')](_0x3ae0('0xe'),auth[_0x3ae0('0xc')](),controller['download']);router[_0x3ae0('0xf')]('/',auth[_0x3ae0('0xc')](),controller[_0x3ae0('0x10')]);router[_0x3ae0('0x11')](_0x3ae0('0xb'),auth[_0x3ae0('0xc')](),controller[_0x3ae0('0x12')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x3ae0('0x13')]);module[_0x3ae0('0x14')]=router;
\ No newline at end of file
+var _0xfef4=['download','post','create','put','update','delete','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticExtractedReport.controller','get','isAuthenticated','index','/:id','show','/:id/download'];(function(_0x46a3ff,_0x470b9a){var _0x404bc2=function(_0x20f25f){while(--_0x20f25f){_0x46a3ff['push'](_0x46a3ff['shift']());}};_0x404bc2(++_0x470b9a);}(_0xfef4,0x1ea));var _0x4fef=function(_0x50a004,_0x193d84){_0x50a004=_0x50a004-0x0;var _0x5e9992=_0xfef4[_0x50a004];return _0x5e9992;};'use strict';var multer=require(_0x4fef('0x0'));var util=require('util');var path=require(_0x4fef('0x1'));var timeout=require(_0x4fef('0x2'));var express=require(_0x4fef('0x3'));var router=express[_0x4fef('0x4')]();var fs_extra=require(_0x4fef('0x5'));var auth=require(_0x4fef('0x6'));var interaction=require(_0x4fef('0x7'));var config=require(_0x4fef('0x8'));var controller=require(_0x4fef('0x9'));router[_0x4fef('0xa')]('/',auth[_0x4fef('0xb')](),controller[_0x4fef('0xc')]);router[_0x4fef('0xa')](_0x4fef('0xd'),auth['isAuthenticated'](),controller[_0x4fef('0xe')]);router[_0x4fef('0xa')](_0x4fef('0xf'),auth[_0x4fef('0xb')](),controller[_0x4fef('0x10')]);router[_0x4fef('0x11')]('/',auth[_0x4fef('0xb')](),controller[_0x4fef('0x12')]);router[_0x4fef('0x13')](_0x4fef('0xd'),auth[_0x4fef('0xb')](),controller[_0x4fef('0x14')]);router[_0x4fef('0x15')](_0x4fef('0xd'),auth['isAuthenticated'](),controller['destroy']);module[_0x4fef('0x16')]=router;
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.attributes.js b/server/api/analyticFieldReport/analyticFieldReport.attributes.js
index 594040f..88d5bd5 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 _0x63a7=['exports','STRING','BOOLEAN','sequelize'];(function(_0x267eeb,_0x58cefa){var _0x1dcd83=function(_0x3a7fb4){while(--_0x3a7fb4){_0x267eeb['push'](_0x267eeb['shift']());}};_0x1dcd83(++_0x58cefa);}(_0x63a7,0xd3));var _0x763a=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0x63a7[_0x2c91e9];return _0x13f0ff;};'use strict';var Sequelize=require(_0x763a('0x0'));module[_0x763a('0x1')]={'field':{'type':Sequelize['TEXT']},'alias':{'type':Sequelize['STRING']},'function':{'type':Sequelize[_0x763a('0x2')]},'format':{'type':Sequelize['STRING']},'groupBy':{'type':Sequelize[_0x763a('0x3')],'defaultValue':![]},'orderBy':{'type':Sequelize[_0x763a('0x2')]},'custom':{'type':Sequelize[_0x763a('0x3')],'defaultValue':![]}};
\ No newline at end of file
+var _0xa929=['BOOLEAN','exports','TEXT','STRING'];(function(_0x11cef4,_0x801d11){var _0x1b0649=function(_0x56ac4c){while(--_0x56ac4c){_0x11cef4['push'](_0x11cef4['shift']());}};_0x1b0649(++_0x801d11);}(_0xa929,0x7d));var _0x9a92=function(_0x5f5120,_0x3fec51){_0x5f5120=_0x5f5120-0x0;var _0x3f76e1=_0xa929[_0x5f5120];return _0x3f76e1;};'use strict';var Sequelize=require('sequelize');module[_0x9a92('0x0')]={'field':{'type':Sequelize[_0x9a92('0x1')]},'alias':{'type':Sequelize[_0x9a92('0x2')]},'function':{'type':Sequelize[_0x9a92('0x2')]},'format':{'type':Sequelize['STRING']},'groupBy':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'orderBy':{'type':Sequelize[_0x9a92('0x2')]},'custom':{'type':Sequelize[_0x9a92('0x3')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.controller.js b/server/api/analyticFieldReport/analyticFieldReport.controller.js
index 26a0cb4..8e57b06 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 _0x1633=['request-promise','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','to-csv','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','offset','undefined','limit','count','json','reject','save','update','then','sendStatus','error','stack','name','send','index','AnalyticFieldReport','rawAttributes','fieldName','key','map','keys','query','filters','intersection','model','attributes','fields','length','nolimit','order','sort','where','filter','merge','type','VIRTUAL','includeAll','findAll','rows','show','params','include','options','catch','create','bulkCreate','body','find','bulkDestroy','ids','addFields','AnalyticCustomReport','findOne','transaction','CustomReportId','eml-format','zip-dir'];(function(_0x20695e,_0x5929df){var _0x3746cf=function(_0x54f2a2){while(--_0x54f2a2){_0x20695e['push'](_0x20695e['shift']());}};_0x3746cf(++_0x5929df);}(_0x1633,0x19d));var _0x3163=function(_0x1f6a9f,_0x2b0a69){_0x1f6a9f=_0x1f6a9f-0x0;var _0x56842c=_0x1633[_0x1f6a9f];return _0x56842c;};'use strict';var emlformat=require(_0x3163('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x3163('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x3163('0x2'));var moment=require('moment');var BPromise=require(_0x3163('0x3'));var Mustache=require(_0x3163('0x4'));var util=require(_0x3163('0x5'));var path=require(_0x3163('0x6'));var sox=require(_0x3163('0x7'));var csv=require('to-csv');var ejs=require(_0x3163('0x8'));var fs=require('fs');var fs_extra=require(_0x3163('0x9'));var _=require(_0x3163('0xa'));var squel=require(_0x3163('0xb'));var crypto=require(_0x3163('0xc'));var jsforce=require(_0x3163('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x3163('0xe'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x3163('0xf'));var authService=require(_0x3163('0x10'));var qs=require(_0x3163('0x11'));var as=require(_0x3163('0x12'));var hardwareService=require(_0x3163('0x13'));var logger=require(_0x3163('0x14'))(_0x3163('0x15'));var utils=require(_0x3163('0x16'));var config=require(_0x3163('0x17'));var licenseUtil=require(_0x3163('0x18'));var db=require(_0x3163('0x19'))['db'];function respondWithStatusCode(_0x3f9d8d,_0x39f8d9){_0x39f8d9=_0x39f8d9||0xcc;return function(_0x38bc0e){if(_0x38bc0e){return _0x3f9d8d['sendStatus'](_0x39f8d9);}return _0x3f9d8d[_0x3163('0x1a')](_0x39f8d9)[_0x3163('0x1b')]();};}function respondWithResult(_0x1ab4d9,_0x4defb0){_0x4defb0=_0x4defb0||0xc8;return function(_0x5684d0){if(_0x5684d0){return _0x1ab4d9[_0x3163('0x1a')](_0x4defb0)['json'](_0x5684d0);}};}function respondWithFilteredResult(_0x131a86,_0x371231){return function(_0x576ee7){if(_0x576ee7){var _0x25f451=typeof _0x371231[_0x3163('0x1c')]===_0x3163('0x1d')&&typeof _0x371231[_0x3163('0x1e')]==='undefined';var _0x29629e=_0x576ee7['count'];var _0x539784=_0x25f451?0x0:_0x371231[_0x3163('0x1c')];var _0x16613a=_0x25f451?_0x576ee7[_0x3163('0x1f')]:_0x371231[_0x3163('0x1c')]+_0x371231[_0x3163('0x1e')];var _0x2218f8;if(_0x16613a>=_0x29629e){_0x16613a=_0x29629e;_0x2218f8=0xc8;}else{_0x2218f8=0xce;}_0x131a86['status'](_0x2218f8);return _0x131a86['set']('Content-Range',_0x539784+'-'+_0x16613a+'/'+_0x29629e)[_0x3163('0x20')](_0x576ee7);}return null;};}function patchUpdates(_0x5890a4){return function(_0x344a18){try{jsonpatch['apply'](_0x344a18,_0x5890a4,!![]);}catch(_0x2d6198){return BPromise[_0x3163('0x21')](_0x2d6198);}return _0x344a18[_0x3163('0x22')]();};}function saveUpdates(_0xc196db,_0x3694fc){return function(_0x3631cb){if(_0x3631cb){return _0x3631cb[_0x3163('0x23')](_0xc196db)[_0x3163('0x24')](function(_0x537087){return _0x537087;});}return null;};}function removeEntity(_0x504333,_0x8ca862){return function(_0x1f3bcd){if(_0x1f3bcd){return _0x1f3bcd['destroy']()['then'](function(){_0x504333[_0x3163('0x1a')](0xcc)[_0x3163('0x1b')]();});}};}function handleEntityNotFound(_0x59e921,_0x24f1f8){return function(_0x39009a){if(!_0x39009a){_0x59e921[_0x3163('0x25')](0x194);}return _0x39009a;};}function handleError(_0x424064,_0x125dca){_0x125dca=_0x125dca||0x1f4;return function(_0x4e472e){logger[_0x3163('0x26')](_0x4e472e[_0x3163('0x27')]);if(_0x4e472e['name']){delete _0x4e472e[_0x3163('0x28')];}_0x424064['status'](_0x125dca)[_0x3163('0x29')](_0x4e472e);};}exports[_0x3163('0x2a')]=function(_0x34b1d8,_0x406c79){var _0x14ab47={},_0x572d8a={},_0x6d7ad1={'count':0x0,'rows':[]};var _0x46395d=_['map'](db[_0x3163('0x2b')][_0x3163('0x2c')],function(_0x5787b5){return{'name':_0x5787b5[_0x3163('0x2d')],'type':_0x5787b5['type'][_0x3163('0x2e')]};});_0x572d8a['model']=_[_0x3163('0x2f')](_0x46395d,_0x3163('0x28'));_0x572d8a['query']=_[_0x3163('0x30')](_0x34b1d8[_0x3163('0x31')]);_0x572d8a[_0x3163('0x32')]=_[_0x3163('0x33')](_0x572d8a[_0x3163('0x34')],_0x572d8a[_0x3163('0x31')]);_0x14ab47[_0x3163('0x35')]=_[_0x3163('0x33')](_0x572d8a[_0x3163('0x34')],qs[_0x3163('0x36')](_0x34b1d8['query'][_0x3163('0x36')]));_0x14ab47[_0x3163('0x35')]=_0x14ab47[_0x3163('0x35')][_0x3163('0x37')]?_0x14ab47['attributes']:_0x572d8a[_0x3163('0x34')];if(!_0x34b1d8[_0x3163('0x31')]['hasOwnProperty'](_0x3163('0x38'))){_0x14ab47[_0x3163('0x1e')]=qs[_0x3163('0x1e')](_0x34b1d8[_0x3163('0x31')][_0x3163('0x1e')]);_0x14ab47['offset']=qs[_0x3163('0x1c')](_0x34b1d8[_0x3163('0x31')]['offset']);}_0x14ab47[_0x3163('0x39')]=qs[_0x3163('0x3a')](_0x34b1d8[_0x3163('0x31')]['sort']);_0x14ab47[_0x3163('0x3b')]=qs[_0x3163('0x32')](_['pick'](_0x34b1d8['query'],_0x572d8a[_0x3163('0x32')]),_0x46395d);if(_0x34b1d8[_0x3163('0x31')][_0x3163('0x3c')]){_0x14ab47[_0x3163('0x3b')]=_[_0x3163('0x3d')](_0x14ab47[_0x3163('0x3b')],{'$or':_[_0x3163('0x2f')](_0x46395d,function(_0x31876f){if(_0x31876f[_0x3163('0x3e')]!==_0x3163('0x3f')){var _0x5bf6da={};_0x5bf6da[_0x31876f[_0x3163('0x28')]]={'$like':'%'+_0x34b1d8[_0x3163('0x31')]['filter']+'%'};return _0x5bf6da;}})});}_0x14ab47=_[_0x3163('0x3d')]({},_0x14ab47,_0x34b1d8['options']);var _0x513aaf={'where':_0x14ab47[_0x3163('0x3b')]};return db[_0x3163('0x2b')][_0x3163('0x1f')](_0x513aaf)[_0x3163('0x24')](function(_0x20c9be){_0x6d7ad1[_0x3163('0x1f')]=_0x20c9be;if(_0x34b1d8[_0x3163('0x31')][_0x3163('0x40')]){_0x14ab47['include']=[{'all':!![]}];}return db['AnalyticFieldReport'][_0x3163('0x41')](_0x14ab47);})['then'](function(_0x438964){_0x6d7ad1[_0x3163('0x42')]=_0x438964;return _0x6d7ad1;})[_0x3163('0x24')](respondWithFilteredResult(_0x406c79,_0x14ab47))['catch'](handleError(_0x406c79,null));};exports[_0x3163('0x43')]=function(_0x261ad3,_0x3c34c2){var _0x5c38df={'raw':![],'where':{'id':_0x261ad3[_0x3163('0x44')]['id']}},_0x334fab={};_0x334fab[_0x3163('0x34')]=_[_0x3163('0x30')](db['AnalyticFieldReport'][_0x3163('0x2c')]);_0x334fab[_0x3163('0x31')]=_[_0x3163('0x30')](_0x261ad3[_0x3163('0x31')]);_0x334fab[_0x3163('0x32')]=_[_0x3163('0x33')](_0x334fab[_0x3163('0x34')],_0x334fab['query']);_0x5c38df['attributes']=_[_0x3163('0x33')](_0x334fab[_0x3163('0x34')],qs['fields'](_0x261ad3['query'][_0x3163('0x36')]));_0x5c38df['attributes']=_0x5c38df['attributes'][_0x3163('0x37')]?_0x5c38df[_0x3163('0x35')]:_0x334fab[_0x3163('0x34')];if(_0x261ad3[_0x3163('0x31')][_0x3163('0x40')]){_0x5c38df[_0x3163('0x45')]=[{'all':!![]}];}_0x5c38df=_[_0x3163('0x3d')]({},_0x5c38df,_0x261ad3[_0x3163('0x46')]);return db[_0x3163('0x2b')]['find'](_0x5c38df)[_0x3163('0x24')](handleEntityNotFound(_0x3c34c2,null))[_0x3163('0x24')](respondWithResult(_0x3c34c2,null))[_0x3163('0x47')](handleError(_0x3c34c2,null));};exports[_0x3163('0x48')]=function(_0x3bf0d7,_0x49e389){return db[_0x3163('0x2b')]['create'](_0x3bf0d7['body'],{})[_0x3163('0x24')](respondWithResult(_0x49e389,0xc9))[_0x3163('0x47')](handleError(_0x49e389,null));};exports[_0x3163('0x49')]=function(_0x12bd77,_0x9fbf4d){return db[_0x3163('0x2b')][_0x3163('0x49')](_0x12bd77['body'],{'raw':![],'individualHooks':!![]})['then'](respondWithResult(_0x9fbf4d,0xc9))[_0x3163('0x47')](handleError(_0x9fbf4d,null));};exports[_0x3163('0x23')]=function(_0x39e601,_0x5ad0bc){if(_0x39e601[_0x3163('0x4a')]['id']){delete _0x39e601[_0x3163('0x4a')]['id'];}return db[_0x3163('0x2b')][_0x3163('0x4b')]({'where':{'id':_0x39e601[_0x3163('0x44')]['id']}})['then'](handleEntityNotFound(_0x5ad0bc,null))[_0x3163('0x24')](saveUpdates(_0x39e601[_0x3163('0x4a')],null))['then'](respondWithResult(_0x5ad0bc,null))[_0x3163('0x47')](handleError(_0x5ad0bc,null));};exports['destroy']=function(_0x2d4383,_0x5820a7){return db['AnalyticFieldReport'][_0x3163('0x4b')]({'where':{'id':_0x2d4383[_0x3163('0x44')]['id']}})[_0x3163('0x24')](handleEntityNotFound(_0x5820a7,null))[_0x3163('0x24')](removeEntity(_0x5820a7,null))['catch'](handleError(_0x5820a7,null));};exports[_0x3163('0x4c')]=function(_0x17f9d3,_0x563556){return db[_0x3163('0x2b')]['destroy']({'where':{'id':_0x17f9d3['query'][_0x3163('0x4d')]||[]},'raw':![],'individualHooks':!![]})[_0x3163('0x24')](respondWithResult(_0x563556,0xcc))[_0x3163('0x47')](handleError(_0x563556,null));};exports[_0x3163('0x4e')]=function(_0x34c704,_0x5e7661,_0xf3cda1){return db[_0x3163('0x4f')][_0x3163('0x50')]({'where':{'id':_0x34c704[_0x3163('0x44')]['id']}})[_0x3163('0x24')](handleEntityNotFound(_0x5e7661,null))[_0x3163('0x24')](function(_0x490c77){if(_0x490c77){return db['sequelize'][_0x3163('0x51')](function(_0x3c96dd){return db[_0x3163('0x2b')]['destroy']({'where':{'CustomReportId':_0x34c704[_0x3163('0x44')]['id']},'transaction':_0x3c96dd})[_0x3163('0x24')](function(_0x436669){var _0x1d1a11=_[_0x3163('0x2f')](_0x34c704[_0x3163('0x4a')],function(_0x27d83b){delete _0x27d83b['id'];_0x27d83b[_0x3163('0x52')]=_0x34c704[_0x3163('0x44')]['id'];return _0x27d83b;});return db[_0x3163('0x2b')][_0x3163('0x49')](_0x1d1a11,{'transaction':_0x3c96dd});});})[_0x3163('0x24')](function(){return db[_0x3163('0x2b')][_0x3163('0x41')]({'where':{'CustomReportId':_0x34c704[_0x3163('0x44')]['id']}});});}})[_0x3163('0x24')](respondWithResult(_0x5e7661,null))['catch'](handleError(_0x5e7661,null));};
\ No newline at end of file
+var _0x3de0=['findAll','rows','catch','show','params','find','create','body','bulkCreate','bulkDestroy','addFields','AnalyticCustomReport','findOne','sequelize','CustomReportId','eml-format','zip-dir','fast-json-patch','moment','bluebird','util','path','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','sendStatus','status','offset','undefined','limit','count','set','Content-Range','json','reject','save','update','destroy','then','end','error','name','map','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','where','filter','merge','VIRTUAL','options','AnalyticFieldReport','includeAll','include'];(function(_0x33f31b,_0x550ae9){var _0x33514e=function(_0x266538){while(--_0x266538){_0x33f31b['push'](_0x33f31b['shift']());}};_0x33514e(++_0x550ae9);}(_0x3de0,0x143));var _0x03de=function(_0x38ad8e,_0x33ebc2){_0x38ad8e=_0x38ad8e-0x0;var _0xe17df5=_0x3de0[_0x38ad8e];return _0xe17df5;};'use strict';var emlformat=require(_0x03de('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x03de('0x1'));var jsonpatch=require(_0x03de('0x2'));var rp=require('request-promise');var moment=require(_0x03de('0x3'));var BPromise=require(_0x03de('0x4'));var Mustache=require('mustache');var util=require(_0x03de('0x5'));var path=require(_0x03de('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x03de('0x7'));var fs=require('fs');var fs_extra=require(_0x03de('0x8'));var _=require(_0x03de('0x9'));var squel=require(_0x03de('0xa'));var crypto=require(_0x03de('0xb'));var jsforce=require(_0x03de('0xc'));var deskjs=require(_0x03de('0xd'));var toCsv=require(_0x03de('0xe'));var querystring=require('querystring');var Papa=require(_0x03de('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x03de('0x10'));var as=require(_0x03de('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x03de('0x12'))(_0x03de('0x13'));var utils=require('../../config/utils');var config=require(_0x03de('0x14'));var licenseUtil=require(_0x03de('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3d6629,_0x10ab8b){_0x10ab8b=_0x10ab8b||0xcc;return function(_0x40dd5d){if(_0x40dd5d){return _0x3d6629[_0x03de('0x16')](_0x10ab8b);}return _0x3d6629[_0x03de('0x17')](_0x10ab8b)['end']();};}function respondWithResult(_0xf9553d,_0x1b467e){_0x1b467e=_0x1b467e||0xc8;return function(_0x14d19c){if(_0x14d19c){return _0xf9553d[_0x03de('0x17')](_0x1b467e)['json'](_0x14d19c);}};}function respondWithFilteredResult(_0x453564,_0xedbc6b){return function(_0x1aa88d){if(_0x1aa88d){var _0x45881e=typeof _0xedbc6b[_0x03de('0x18')]===_0x03de('0x19')&&typeof _0xedbc6b[_0x03de('0x1a')]===_0x03de('0x19');var _0x313a71=_0x1aa88d['count'];var _0x4835c0=_0x45881e?0x0:_0xedbc6b[_0x03de('0x18')];var _0x42962e=_0x45881e?_0x1aa88d[_0x03de('0x1b')]:_0xedbc6b['offset']+_0xedbc6b[_0x03de('0x1a')];var _0x5f6058;if(_0x42962e>=_0x313a71){_0x42962e=_0x313a71;_0x5f6058=0xc8;}else{_0x5f6058=0xce;}_0x453564[_0x03de('0x17')](_0x5f6058);return _0x453564[_0x03de('0x1c')](_0x03de('0x1d'),_0x4835c0+'-'+_0x42962e+'/'+_0x313a71)[_0x03de('0x1e')](_0x1aa88d);}return null;};}function patchUpdates(_0x3cb6ff){return function(_0x5cb66b){try{jsonpatch['apply'](_0x5cb66b,_0x3cb6ff,!![]);}catch(_0x528862){return BPromise[_0x03de('0x1f')](_0x528862);}return _0x5cb66b[_0x03de('0x20')]();};}function saveUpdates(_0x512d82,_0x12337f){return function(_0x4447d7){if(_0x4447d7){return _0x4447d7[_0x03de('0x21')](_0x512d82)['then'](function(_0x23e463){return _0x23e463;});}return null;};}function removeEntity(_0x396a57,_0x5f2317){return function(_0x13fb22){if(_0x13fb22){return _0x13fb22[_0x03de('0x22')]()[_0x03de('0x23')](function(){_0x396a57[_0x03de('0x17')](0xcc)[_0x03de('0x24')]();});}};}function handleEntityNotFound(_0x54b4fc,_0xf54687){return function(_0x13ab64){if(!_0x13ab64){_0x54b4fc[_0x03de('0x16')](0x194);}return _0x13ab64;};}function handleError(_0x1ed415,_0x5a9631){_0x5a9631=_0x5a9631||0x1f4;return function(_0x14e785){logger[_0x03de('0x25')](_0x14e785['stack']);if(_0x14e785['name']){delete _0x14e785[_0x03de('0x26')];}_0x1ed415[_0x03de('0x17')](_0x5a9631)['send'](_0x14e785);};}exports['index']=function(_0x261b19,_0x17463b){var _0x514232={},_0x405c25={},_0x270b75={'count':0x0,'rows':[]};var _0x25f7bf=_[_0x03de('0x27')](db['AnalyticFieldReport']['rawAttributes'],function(_0x191534){return{'name':_0x191534[_0x03de('0x28')],'type':_0x191534[_0x03de('0x29')][_0x03de('0x2a')]};});_0x405c25[_0x03de('0x2b')]=_[_0x03de('0x27')](_0x25f7bf,'name');_0x405c25[_0x03de('0x2c')]=_[_0x03de('0x2d')](_0x261b19[_0x03de('0x2c')]);_0x405c25[_0x03de('0x2e')]=_[_0x03de('0x2f')](_0x405c25[_0x03de('0x2b')],_0x405c25['query']);_0x514232[_0x03de('0x30')]=_[_0x03de('0x2f')](_0x405c25['model'],qs[_0x03de('0x31')](_0x261b19[_0x03de('0x2c')][_0x03de('0x31')]));_0x514232[_0x03de('0x30')]=_0x514232['attributes'][_0x03de('0x32')]?_0x514232[_0x03de('0x30')]:_0x405c25[_0x03de('0x2b')];if(!_0x261b19[_0x03de('0x2c')]['hasOwnProperty'](_0x03de('0x33'))){_0x514232[_0x03de('0x1a')]=qs[_0x03de('0x1a')](_0x261b19['query'][_0x03de('0x1a')]);_0x514232[_0x03de('0x18')]=qs[_0x03de('0x18')](_0x261b19[_0x03de('0x2c')][_0x03de('0x18')]);}_0x514232[_0x03de('0x34')]=qs[_0x03de('0x35')](_0x261b19['query'][_0x03de('0x35')]);_0x514232[_0x03de('0x36')]=qs['filters'](_['pick'](_0x261b19[_0x03de('0x2c')],_0x405c25[_0x03de('0x2e')]),_0x25f7bf);if(_0x261b19[_0x03de('0x2c')][_0x03de('0x37')]){_0x514232[_0x03de('0x36')]=_[_0x03de('0x38')](_0x514232[_0x03de('0x36')],{'$or':_[_0x03de('0x27')](_0x25f7bf,function(_0x294c92){if(_0x294c92[_0x03de('0x29')]!==_0x03de('0x39')){var _0x43b642={};_0x43b642[_0x294c92[_0x03de('0x26')]]={'$like':'%'+_0x261b19[_0x03de('0x2c')][_0x03de('0x37')]+'%'};return _0x43b642;}})});}_0x514232=_[_0x03de('0x38')]({},_0x514232,_0x261b19[_0x03de('0x3a')]);var _0x305187={'where':_0x514232[_0x03de('0x36')]};return db[_0x03de('0x3b')]['count'](_0x305187)[_0x03de('0x23')](function(_0x2b2dc3){_0x270b75['count']=_0x2b2dc3;if(_0x261b19[_0x03de('0x2c')][_0x03de('0x3c')]){_0x514232[_0x03de('0x3d')]=[{'all':!![]}];}return db[_0x03de('0x3b')][_0x03de('0x3e')](_0x514232);})[_0x03de('0x23')](function(_0x4053c1){_0x270b75[_0x03de('0x3f')]=_0x4053c1;return _0x270b75;})['then'](respondWithFilteredResult(_0x17463b,_0x514232))[_0x03de('0x40')](handleError(_0x17463b,null));};exports[_0x03de('0x41')]=function(_0x45615f,_0x1b62ee){var _0x373db0={'raw':![],'where':{'id':_0x45615f[_0x03de('0x42')]['id']}},_0x42dfd0={};_0x42dfd0[_0x03de('0x2b')]=_['keys'](db[_0x03de('0x3b')]['rawAttributes']);_0x42dfd0['query']=_[_0x03de('0x2d')](_0x45615f[_0x03de('0x2c')]);_0x42dfd0[_0x03de('0x2e')]=_['intersection'](_0x42dfd0['model'],_0x42dfd0[_0x03de('0x2c')]);_0x373db0[_0x03de('0x30')]=_[_0x03de('0x2f')](_0x42dfd0[_0x03de('0x2b')],qs['fields'](_0x45615f[_0x03de('0x2c')]['fields']));_0x373db0[_0x03de('0x30')]=_0x373db0[_0x03de('0x30')][_0x03de('0x32')]?_0x373db0[_0x03de('0x30')]:_0x42dfd0[_0x03de('0x2b')];if(_0x45615f[_0x03de('0x2c')]['includeAll']){_0x373db0[_0x03de('0x3d')]=[{'all':!![]}];}_0x373db0=_['merge']({},_0x373db0,_0x45615f[_0x03de('0x3a')]);return db['AnalyticFieldReport'][_0x03de('0x43')](_0x373db0)[_0x03de('0x23')](handleEntityNotFound(_0x1b62ee,null))[_0x03de('0x23')](respondWithResult(_0x1b62ee,null))['catch'](handleError(_0x1b62ee,null));};exports['create']=function(_0x393d69,_0x1bd748){return db[_0x03de('0x3b')][_0x03de('0x44')](_0x393d69[_0x03de('0x45')],{})[_0x03de('0x23')](respondWithResult(_0x1bd748,0xc9))[_0x03de('0x40')](handleError(_0x1bd748,null));};exports['bulkCreate']=function(_0x2ae2c6,_0x1b6c6e){return db['AnalyticFieldReport'][_0x03de('0x46')](_0x2ae2c6[_0x03de('0x45')],{'raw':![],'individualHooks':!![]})['then'](respondWithResult(_0x1b6c6e,0xc9))[_0x03de('0x40')](handleError(_0x1b6c6e,null));};exports[_0x03de('0x21')]=function(_0x4e4f13,_0x2eef5b){if(_0x4e4f13['body']['id']){delete _0x4e4f13['body']['id'];}return db[_0x03de('0x3b')][_0x03de('0x43')]({'where':{'id':_0x4e4f13[_0x03de('0x42')]['id']}})[_0x03de('0x23')](handleEntityNotFound(_0x2eef5b,null))[_0x03de('0x23')](saveUpdates(_0x4e4f13['body'],null))['then'](respondWithResult(_0x2eef5b,null))[_0x03de('0x40')](handleError(_0x2eef5b,null));};exports['destroy']=function(_0x4df110,_0x154cc6){return db['AnalyticFieldReport'][_0x03de('0x43')]({'where':{'id':_0x4df110[_0x03de('0x42')]['id']}})[_0x03de('0x23')](handleEntityNotFound(_0x154cc6,null))['then'](removeEntity(_0x154cc6,null))[_0x03de('0x40')](handleError(_0x154cc6,null));};exports[_0x03de('0x47')]=function(_0x4921f9,_0x2124e2){return db[_0x03de('0x3b')]['destroy']({'where':{'id':_0x4921f9[_0x03de('0x2c')]['ids']||[]},'raw':![],'individualHooks':!![]})[_0x03de('0x23')](respondWithResult(_0x2124e2,0xcc))[_0x03de('0x40')](handleError(_0x2124e2,null));};exports[_0x03de('0x48')]=function(_0x312c9a,_0x23fb43,_0x3cc009){return db[_0x03de('0x49')][_0x03de('0x4a')]({'where':{'id':_0x312c9a['params']['id']}})['then'](handleEntityNotFound(_0x23fb43,null))[_0x03de('0x23')](function(_0x33b7ea){if(_0x33b7ea){return db[_0x03de('0x4b')]['transaction'](function(_0x2dfed6){return db[_0x03de('0x3b')]['destroy']({'where':{'CustomReportId':_0x312c9a['params']['id']},'transaction':_0x2dfed6})[_0x03de('0x23')](function(_0x5d33fb){var _0x20f0c4=_[_0x03de('0x27')](_0x312c9a[_0x03de('0x45')],function(_0x48debe){delete _0x48debe['id'];_0x48debe[_0x03de('0x4c')]=_0x312c9a[_0x03de('0x42')]['id'];return _0x48debe;});return db['AnalyticFieldReport'][_0x03de('0x46')](_0x20f0c4,{'transaction':_0x2dfed6});});})[_0x03de('0x23')](function(){return db[_0x03de('0x3b')]['findAll']({'where':{'CustomReportId':_0x312c9a[_0x03de('0x42')]['id']}});});}})['then'](respondWithResult(_0x23fb43,null))[_0x03de('0x40')](handleError(_0x23fb43,null));};
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.model.js b/server/api/analyticFieldReport/analyticFieldReport.model.js
index 92cc198..8fa0d64 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 _0xf195=['api','request-promise','path','../../config/environment','./analyticFieldReport.attributes','define','AnalyticFieldReport','analytics_report_fields','lodash','../../config/logger'];(function(_0x30a2d6,_0x43201d){var _0x10bff2=function(_0x1eee56){while(--_0x1eee56){_0x30a2d6['push'](_0x30a2d6['shift']());}};_0x10bff2(++_0x43201d);}(_0xf195,0xd0));var _0x5f19=function(_0x48d6a3,_0x37c848){_0x48d6a3=_0x48d6a3-0x0;var _0x38bfa0=_0xf195[_0x48d6a3];return _0x38bfa0;};'use strict';var _=require(_0x5f19('0x0'));var util=require('util');var logger=require(_0x5f19('0x1'))(_0x5f19('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x5f19('0x3'));var fs=require('fs');var path=require(_0x5f19('0x4'));var rimraf=require('rimraf');var config=require(_0x5f19('0x5'));var attributes=require(_0x5f19('0x6'));module['exports']=function(_0x243370,_0xf554d5){return _0x243370[_0x5f19('0x7')](_0x5f19('0x8'),attributes,{'tableName':_0x5f19('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x0762=['request-promise','path','./analyticFieldReport.attributes','exports','define','AnalyticFieldReport','analytics_report_fields','lodash','util','api','bluebird'];(function(_0x33c637,_0x597c26){var _0x14aa20=function(_0x32a8b5){while(--_0x32a8b5){_0x33c637['push'](_0x33c637['shift']());}};_0x14aa20(++_0x597c26);}(_0x0762,0x8b));var _0x2076=function(_0x3ed02b,_0x54a618){_0x3ed02b=_0x3ed02b-0x0;var _0x54fccf=_0x0762[_0x3ed02b];return _0x54fccf;};'use strict';var _=require(_0x2076('0x0'));var util=require(_0x2076('0x1'));var logger=require('../../config/logger')(_0x2076('0x2'));var moment=require('moment');var BPromise=require(_0x2076('0x3'));var rp=require(_0x2076('0x4'));var fs=require('fs');var path=require(_0x2076('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x2076('0x6'));module[_0x2076('0x7')]=function(_0x525c3b,_0x232a80){return _0x525c3b[_0x2076('0x8')](_0x2076('0x9'),attributes,{'tableName':_0x2076('0xa'),'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 b9c7cbd..3cf0e15 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 _0x25d3=['moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','client','http','request','then','info','request\x20sent','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','error','code','AnalyticFieldReport,\x20%s,\x20%s','message','catch','lodash','util'];(function(_0x7058e5,_0x4304b8){var _0xcadefd=function(_0x105666){while(--_0x105666){_0x7058e5['push'](_0x7058e5['shift']());}};_0xcadefd(++_0x4304b8);}(_0x25d3,0x1b7));var _0x325d=function(_0x20365c,_0x25227d){_0x20365c=_0x20365c-0x0;var _0x5df8ba=_0x25d3[_0x20365c];return _0x5df8ba;};'use strict';var _=require(_0x325d('0x0'));var util=require(_0x325d('0x1'));var moment=require(_0x325d('0x2'));var BPromise=require(_0x325d('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x325d('0x4'));var db=require(_0x325d('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x325d('0x6'))(_0x325d('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x325d('0x8')][_0x325d('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x236ee2,_0x165a3c,_0x318b56){return new BPromise(function(_0x161acb,_0x3efc86){return client[_0x325d('0xa')](_0x236ee2,_0x318b56)[_0x325d('0xb')](function(_0x163c2b){logger[_0x325d('0xc')]('AnalyticFieldReport,\x20%s,\x20%s',_0x165a3c,_0x325d('0xd'));logger[_0x325d('0xe')](_0x325d('0xf'),_0x165a3c,_0x325d('0xd'),JSON['stringify'](_0x163c2b));if(_0x163c2b[_0x325d('0x10')]){if(_0x163c2b[_0x325d('0x10')][_0x325d('0x11')]===0x1f4){logger['error'](_0x325d('0x12'),_0x165a3c,_0x163c2b['error'][_0x325d('0x13')]);return _0x3efc86(_0x163c2b[_0x325d('0x10')][_0x325d('0x13')]);}logger['error'](_0x325d('0x12'),_0x165a3c,_0x163c2b[_0x325d('0x10')][_0x325d('0x13')]);return _0x161acb(_0x163c2b[_0x325d('0x10')][_0x325d('0x13')]);}else{logger[_0x325d('0xc')](_0x325d('0x12'),_0x165a3c,_0x325d('0xd'));_0x161acb(_0x163c2b['result'][_0x325d('0x13')]);}})[_0x325d('0x14')](function(_0x586194){logger['error'](_0x325d('0x12'),_0x165a3c,_0x586194);_0x3efc86(_0x586194);});});}
\ No newline at end of file
+var _0xe512=['bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','moment'];(function(_0x3c719c,_0x29afd9){var _0x160782=function(_0x317dc4){while(--_0x317dc4){_0x3c719c['push'](_0x3c719c['shift']());}};_0x160782(++_0x29afd9);}(_0xe512,0x17e));var _0x2e51=function(_0x4deb98,_0x29ebdd){_0x4deb98=_0x4deb98-0x0;var _0x2c5f93=_0xe512[_0x4deb98];return _0x2c5f93;};'use strict';var _=require(_0x2e51('0x0'));var util=require('util');var moment=require(_0x2e51('0x1'));var BPromise=require(_0x2e51('0x2'));var rs=require(_0x2e51('0x3'));var fs=require('fs');var Redis=require(_0x2e51('0x4'));var db=require(_0x2e51('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x2e51('0x6'))(_0x2e51('0x7'));var config=require(_0x2e51('0x8'));var jayson=require(_0x2e51('0x9'));var client=jayson[_0x2e51('0xa')][_0x2e51('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3ddd57,_0x4123a4,_0x77809){return new BPromise(function(_0x2758e4,_0x5d32f9){return client[_0x2e51('0xc')](_0x3ddd57,_0x77809)[_0x2e51('0xd')](function(_0x4863e7){logger['info'](_0x2e51('0xe'),_0x4123a4,_0x2e51('0xf'));logger['debug'](_0x2e51('0x10'),_0x4123a4,_0x2e51('0xf'),JSON[_0x2e51('0x11')](_0x4863e7));if(_0x4863e7[_0x2e51('0x12')]){if(_0x4863e7['error'][_0x2e51('0x13')]===0x1f4){logger[_0x2e51('0x12')](_0x2e51('0xe'),_0x4123a4,_0x4863e7[_0x2e51('0x12')]['message']);return _0x5d32f9(_0x4863e7['error'][_0x2e51('0x14')]);}logger['error'](_0x2e51('0xe'),_0x4123a4,_0x4863e7[_0x2e51('0x12')][_0x2e51('0x14')]);return _0x2758e4(_0x4863e7[_0x2e51('0x12')]['message']);}else{logger[_0x2e51('0x15')](_0x2e51('0xe'),_0x4123a4,_0x2e51('0xf'));_0x2758e4(_0x4863e7[_0x2e51('0x16')][_0x2e51('0x14')]);}})[_0x2e51('0x17')](function(_0x4f9643){logger[_0x2e51('0x12')]('AnalyticFieldReport,\x20%s,\x20%s',_0x4123a4,_0x4f9643);_0x5d32f9(_0x4f9643);});});}
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/index.js b/server/api/analyticFieldReport/index.js
index 1509918..c0a417c 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(_0xa059ea,_0x5cb91e){var _0x156a4c=function(_0x1b4717){while(--_0x1b4717){_0xa059ea['push'](_0xa059ea['shift']());}};_0x156a4c(++_0x5cb91e);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5b561d,_0x422b7c){_0x5b561d=_0x5b561d-0x0;var _0x431060=_0xa9e0[_0x5b561d];return _0x431060;};'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(_0x26ed80,_0x5b73b6){var _0x2175c6=function(_0x191fc3){while(--_0x191fc3){_0x26ed80['push'](_0x26ed80['shift']());}};_0x2175c6(++_0x5b73b6);}(_0xa9e0,0x123));var _0x0a9e=function(_0x484e36,_0x4482d8){_0x484e36=_0x484e36-0x0;var _0xafc85d=_0xa9e0[_0x484e36];return _0xafc85d;};'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 f19afc7..9d9b8eb 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 _0xbdb7=['name','TEXT','sequelize','exports','STRING'];(function(_0x270323,_0x72160){var _0x48a027=function(_0x4cb12e){while(--_0x4cb12e){_0x270323['push'](_0x270323['shift']());}};_0x48a027(++_0x72160);}(_0xbdb7,0x12e));var _0x7bdb=function(_0x37065a,_0xd1f059){_0x37065a=_0x37065a-0x0;var _0x293d11=_0xbdb7[_0x37065a];return _0x293d11;};'use strict';var Sequelize=require(_0x7bdb('0x0'));module[_0x7bdb('0x1')]={'name':{'type':Sequelize[_0x7bdb('0x2')],'allowNull':![],'unique':_0x7bdb('0x3')},'table':{'type':Sequelize[_0x7bdb('0x2')]},'metric':{'type':Sequelize[_0x7bdb('0x4')]},'description':{'type':Sequelize[_0x7bdb('0x2')]}};
\ No newline at end of file
+var _0x48bc=['STRING','TEXT','sequelize','exports'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x48bc,0x1b6));var _0xc48b=function(_0x27717f,_0x528231){_0x27717f=_0x27717f-0x0;var _0x999d8c=_0x48bc[_0x27717f];return _0x999d8c;};'use strict';var Sequelize=require(_0xc48b('0x0'));module[_0xc48b('0x1')]={'name':{'type':Sequelize[_0xc48b('0x2')],'allowNull':![],'unique':'name'},'table':{'type':Sequelize[_0xc48b('0x2')]},'metric':{'type':Sequelize[_0xc48b('0x3')]},'description':{'type':Sequelize[_0xc48b('0x2')]}};
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.controller.js b/server/api/analyticMetric/analyticMetric.controller.js
index bff8ca2..2b2909c 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 _0x7da7=['model','query','filters','attributes','intersection','fields','hasOwnProperty','nolimit','order','sort','pick','merge','options','where','AnalyticMetric','includeAll','include','findAll','rows','catch','params','keys','length','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','userProfileId','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','zip-dir','moment','bluebird','util','path','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','offset','undefined','count','limit','json','apply','reject','update','then','destroy','get','Metrics','UserProfileResource','end','name','send','index','map','rawAttributes','fieldName','type','key'];(function(_0x13e741,_0x5d3c24){var _0x3f8bb3=function(_0x4440a0){while(--_0x4440a0){_0x13e741['push'](_0x13e741['shift']());}};_0x3f8bb3(++_0x5d3c24);}(_0x7da7,0x10d));var _0x77da=function(_0x710815,_0x520da8){_0x710815=_0x710815-0x0;var _0x5b3b89=_0x7da7[_0x710815];return _0x5b3b89;};'use strict';var emlformat=require(_0x77da('0x0'));var rimraf=require(_0x77da('0x1'));var zipdir=require(_0x77da('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x77da('0x3'));var BPromise=require(_0x77da('0x4'));var Mustache=require('mustache');var util=require(_0x77da('0x5'));var path=require(_0x77da('0x6'));var sox=require('sox');var csv=require(_0x77da('0x7'));var ejs=require(_0x77da('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x77da('0x9'));var squel=require('squel');var crypto=require(_0x77da('0xa'));var jsforce=require(_0x77da('0xb'));var deskjs=require(_0x77da('0xc'));var toCsv=require(_0x77da('0x7'));var querystring=require(_0x77da('0xd'));var Papa=require('papaparse');var Redis=require(_0x77da('0xe'));var authService=require(_0x77da('0xf'));var qs=require(_0x77da('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x77da('0x11'));var logger=require(_0x77da('0x12'))(_0x77da('0x13'));var utils=require(_0x77da('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0x77da('0x15'));var db=require(_0x77da('0x16'))['db'];function respondWithStatusCode(_0x2acc65,_0x5d6e2f){_0x5d6e2f=_0x5d6e2f||0xcc;return function(_0x4a7748){if(_0x4a7748){return _0x2acc65[_0x77da('0x17')](_0x5d6e2f);}return _0x2acc65[_0x77da('0x18')](_0x5d6e2f)['end']();};}function respondWithResult(_0x3b0ff2,_0x369df0){_0x369df0=_0x369df0||0xc8;return function(_0x355719){if(_0x355719){return _0x3b0ff2[_0x77da('0x18')](_0x369df0)['json'](_0x355719);}};}function respondWithFilteredResult(_0x2172d0,_0x4e130c){return function(_0x29cd7b){if(_0x29cd7b){var _0x366443=typeof _0x4e130c[_0x77da('0x19')]===_0x77da('0x1a')&&typeof _0x4e130c['limit']==='undefined';var _0x514016=_0x29cd7b['count'];var _0x103e46=_0x366443?0x0:_0x4e130c[_0x77da('0x19')];var _0x289887=_0x366443?_0x29cd7b[_0x77da('0x1b')]:_0x4e130c[_0x77da('0x19')]+_0x4e130c[_0x77da('0x1c')];var _0x1d325c;if(_0x289887>=_0x514016){_0x289887=_0x514016;_0x1d325c=0xc8;}else{_0x1d325c=0xce;}_0x2172d0[_0x77da('0x18')](_0x1d325c);return _0x2172d0['set']('Content-Range',_0x103e46+'-'+_0x289887+'/'+_0x514016)[_0x77da('0x1d')](_0x29cd7b);}return null;};}function patchUpdates(_0x4d1512){return function(_0x507979){try{jsonpatch[_0x77da('0x1e')](_0x507979,_0x4d1512,!![]);}catch(_0x304a2b){return BPromise[_0x77da('0x1f')](_0x304a2b);}return _0x507979['save']();};}function saveUpdates(_0x58270c,_0x3e6cfe){return function(_0x58f6c1){if(_0x58f6c1){return _0x58f6c1[_0x77da('0x20')](_0x58270c)[_0x77da('0x21')](function(_0xc52f0e){return _0xc52f0e;});}return null;};}function removeEntity(_0x27b6c7,_0x10399a){return function(_0x270318){if(_0x270318){return _0x270318[_0x77da('0x22')]()['then'](function(){var _0x4885ec=_0x270318[_0x77da('0x23')]({'plain':!![]});var _0x2d009f=_0x77da('0x24');return db[_0x77da('0x25')]['destroy']({'where':{'type':_0x2d009f,'resourceId':_0x4885ec['id']}})[_0x77da('0x21')](function(){return _0x270318;});})[_0x77da('0x21')](function(){_0x27b6c7[_0x77da('0x18')](0xcc)[_0x77da('0x26')]();});}};}function handleEntityNotFound(_0x446ae7,_0x5997b6){return function(_0xce24b8){if(!_0xce24b8){_0x446ae7[_0x77da('0x17')](0x194);}return _0xce24b8;};}function handleError(_0x1f2279,_0x2913f7){_0x2913f7=_0x2913f7||0x1f4;return function(_0x496ecd){logger['error'](_0x496ecd['stack']);if(_0x496ecd[_0x77da('0x27')]){delete _0x496ecd[_0x77da('0x27')];}_0x1f2279[_0x77da('0x18')](_0x2913f7)[_0x77da('0x28')](_0x496ecd);};}exports[_0x77da('0x29')]=function(_0x4eeb99,_0x350b4e){var _0x26f5a0={},_0x356bfb={},_0x1d381b={'count':0x0,'rows':[]};var _0x1e7853=_[_0x77da('0x2a')](db['AnalyticMetric'][_0x77da('0x2b')],function(_0x228851){return{'name':_0x228851[_0x77da('0x2c')],'type':_0x228851[_0x77da('0x2d')][_0x77da('0x2e')]};});_0x356bfb[_0x77da('0x2f')]=_[_0x77da('0x2a')](_0x1e7853,_0x77da('0x27'));_0x356bfb['query']=_['keys'](_0x4eeb99[_0x77da('0x30')]);_0x356bfb[_0x77da('0x31')]=_['intersection'](_0x356bfb[_0x77da('0x2f')],_0x356bfb[_0x77da('0x30')]);_0x26f5a0[_0x77da('0x32')]=_[_0x77da('0x33')](_0x356bfb[_0x77da('0x2f')],qs[_0x77da('0x34')](_0x4eeb99[_0x77da('0x30')]['fields']));_0x26f5a0[_0x77da('0x32')]=_0x26f5a0['attributes']['length']?_0x26f5a0['attributes']:_0x356bfb[_0x77da('0x2f')];if(!_0x4eeb99['query'][_0x77da('0x35')](_0x77da('0x36'))){_0x26f5a0[_0x77da('0x1c')]=qs[_0x77da('0x1c')](_0x4eeb99[_0x77da('0x30')][_0x77da('0x1c')]);_0x26f5a0[_0x77da('0x19')]=qs['offset'](_0x4eeb99[_0x77da('0x30')][_0x77da('0x19')]);}_0x26f5a0[_0x77da('0x37')]=qs[_0x77da('0x38')](_0x4eeb99[_0x77da('0x30')][_0x77da('0x38')]);_0x26f5a0['where']=qs[_0x77da('0x31')](_[_0x77da('0x39')](_0x4eeb99[_0x77da('0x30')],_0x356bfb['filters']),_0x1e7853);if(_0x4eeb99[_0x77da('0x30')]['filter']){_0x26f5a0['where']=_['merge'](_0x26f5a0['where'],{'$or':_[_0x77da('0x2a')](_0x1e7853,function(_0x1adba5){if(_0x1adba5[_0x77da('0x2d')]!=='VIRTUAL'){var _0x21d337={};_0x21d337[_0x1adba5['name']]={'$like':'%'+_0x4eeb99[_0x77da('0x30')]['filter']+'%'};return _0x21d337;}})});}_0x26f5a0=_[_0x77da('0x3a')]({},_0x26f5a0,_0x4eeb99[_0x77da('0x3b')]);var _0x290667={'where':_0x26f5a0[_0x77da('0x3c')]};return db[_0x77da('0x3d')]['count'](_0x290667)[_0x77da('0x21')](function(_0x1f48bd){_0x1d381b[_0x77da('0x1b')]=_0x1f48bd;if(_0x4eeb99[_0x77da('0x30')][_0x77da('0x3e')]){_0x26f5a0[_0x77da('0x3f')]=[{'all':!![]}];}return db['AnalyticMetric'][_0x77da('0x40')](_0x26f5a0);})[_0x77da('0x21')](function(_0x21de41){_0x1d381b[_0x77da('0x41')]=_0x21de41;return _0x1d381b;})[_0x77da('0x21')](respondWithFilteredResult(_0x350b4e,_0x26f5a0))[_0x77da('0x42')](handleError(_0x350b4e,null));};exports['show']=function(_0x10957b,_0x5abcd9){var _0x1ae806={'raw':!![],'where':{'id':_0x10957b[_0x77da('0x43')]['id']}},_0x373fb2={};_0x373fb2['model']=_[_0x77da('0x44')](db[_0x77da('0x3d')][_0x77da('0x2b')]);_0x373fb2[_0x77da('0x30')]=_[_0x77da('0x44')](_0x10957b[_0x77da('0x30')]);_0x373fb2[_0x77da('0x31')]=_[_0x77da('0x33')](_0x373fb2[_0x77da('0x2f')],_0x373fb2['query']);_0x1ae806[_0x77da('0x32')]=_[_0x77da('0x33')](_0x373fb2[_0x77da('0x2f')],qs[_0x77da('0x34')](_0x10957b[_0x77da('0x30')][_0x77da('0x34')]));_0x1ae806['attributes']=_0x1ae806['attributes'][_0x77da('0x45')]?_0x1ae806[_0x77da('0x32')]:_0x373fb2[_0x77da('0x2f')];if(_0x10957b[_0x77da('0x30')][_0x77da('0x3e')]){_0x1ae806[_0x77da('0x3f')]=[{'all':!![]}];}_0x1ae806=_['merge']({},_0x1ae806,_0x10957b[_0x77da('0x3b')]);return db[_0x77da('0x3d')][_0x77da('0x46')](_0x1ae806)[_0x77da('0x21')](handleEntityNotFound(_0x5abcd9,null))['then'](respondWithResult(_0x5abcd9,null))[_0x77da('0x42')](handleError(_0x5abcd9,null));};exports['create']=function(_0x518fd5,_0x36263b){return db[_0x77da('0x3d')][_0x77da('0x47')](_0x518fd5[_0x77da('0x48')],{})['then'](function(_0x16bf4b){var _0x1e36ee=_0x518fd5['user'][_0x77da('0x23')]({'plain':!![]});if(!_0x1e36ee)throw new Error(_0x77da('0x49'));if(_0x1e36ee['role']===_0x77da('0x4a')){var _0x3aaf5b=_0x16bf4b[_0x77da('0x23')]({'plain':!![]});var _0xef2496=_0x77da('0x24');return db[_0x77da('0x4b')][_0x77da('0x46')]({'where':{'name':_0xef2496,'userProfileId':_0x1e36ee[_0x77da('0x4c')]},'raw':!![]})[_0x77da('0x21')](function(_0x3a34a8){if(_0x3a34a8&&_0x3a34a8['autoAssociation']===0x0){return db[_0x77da('0x25')]['create']({'name':_0x3aaf5b[_0x77da('0x27')],'resourceId':_0x3aaf5b['id'],'type':_0x3a34a8[_0x77da('0x27')],'sectionId':_0x3a34a8['id']},{})[_0x77da('0x21')](function(){return _0x16bf4b;});}else{return _0x16bf4b;}})[_0x77da('0x42')](function(_0x374179){logger[_0x77da('0x4d')](_0x77da('0x4e'),_0x374179);throw _0x374179;});}return _0x16bf4b;})['then'](respondWithResult(_0x36263b,0xc9))[_0x77da('0x42')](handleError(_0x36263b,null));};exports[_0x77da('0x20')]=function(_0x1a7115,_0x353be9){if(_0x1a7115['body']['id']){delete _0x1a7115[_0x77da('0x48')]['id'];}return db[_0x77da('0x3d')][_0x77da('0x46')]({'where':{'id':_0x1a7115['params']['id']}})['then'](handleEntityNotFound(_0x353be9,null))[_0x77da('0x21')](saveUpdates(_0x1a7115[_0x77da('0x48')],null))[_0x77da('0x21')](respondWithResult(_0x353be9,null))[_0x77da('0x42')](handleError(_0x353be9,null));};exports[_0x77da('0x22')]=function(_0x528a32,_0x50437b){return db[_0x77da('0x3d')][_0x77da('0x46')]({'where':{'id':_0x528a32['params']['id']}})[_0x77da('0x21')](handleEntityNotFound(_0x50437b,null))[_0x77da('0x21')](removeEntity(_0x50437b,null))[_0x77da('0x42')](handleError(_0x50437b,null));};
\ No newline at end of file
+var _0x55ca=['../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','undefined','limit','count','reject','update','then','get','Metrics','UserProfileResource','destroy','end','sendStatus','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','intersection','fields','attributes','length','nolimit','order','sort','where','pick','filter','merge','AnalyticMetric','findAll','catch','show','include','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','eml-format','rimraf','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware'];(function(_0x544ffc,_0x5d702a){var _0x1edd96=function(_0x476c4b){while(--_0x476c4b){_0x544ffc['push'](_0x544ffc['shift']());}};_0x1edd96(++_0x5d702a);}(_0x55ca,0x126));var _0xa55c=function(_0x11bc40,_0x537bbc){_0x11bc40=_0x11bc40-0x0;var _0x2b7a99=_0x55ca[_0x11bc40];return _0x2b7a99;};'use strict';var emlformat=require(_0xa55c('0x0'));var rimraf=require(_0xa55c('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xa55c('0x2'));var BPromise=require(_0xa55c('0x3'));var Mustache=require('mustache');var util=require(_0xa55c('0x4'));var path=require(_0xa55c('0x5'));var sox=require(_0xa55c('0x6'));var csv=require(_0xa55c('0x7'));var ejs=require(_0xa55c('0x8'));var fs=require('fs');var fs_extra=require(_0xa55c('0x9'));var _=require(_0xa55c('0xa'));var squel=require('squel');var crypto=require(_0xa55c('0xb'));var jsforce=require(_0xa55c('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xa55c('0x7'));var querystring=require(_0xa55c('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xa55c('0xe'));var qs=require(_0xa55c('0xf'));var as=require(_0xa55c('0x10'));var hardwareService=require(_0xa55c('0x11'));var logger=require(_0xa55c('0x12'))(_0xa55c('0x13'));var utils=require(_0xa55c('0x14'));var config=require(_0xa55c('0x15'));var licenseUtil=require(_0xa55c('0x16'));var db=require(_0xa55c('0x17'))['db'];function respondWithStatusCode(_0x5d47ff,_0x59d84a){_0x59d84a=_0x59d84a||0xcc;return function(_0x2a35be){if(_0x2a35be){return _0x5d47ff['sendStatus'](_0x59d84a);}return _0x5d47ff['status'](_0x59d84a)['end']();};}function respondWithResult(_0x18ee85,_0x3930e4){_0x3930e4=_0x3930e4||0xc8;return function(_0x462cd6){if(_0x462cd6){return _0x18ee85[_0xa55c('0x18')](_0x3930e4)[_0xa55c('0x19')](_0x462cd6);}};}function respondWithFilteredResult(_0x247e77,_0x4e0b2f){return function(_0x3ccf65){if(_0x3ccf65){var _0x3dcf4f=typeof _0x4e0b2f[_0xa55c('0x1a')]===_0xa55c('0x1b')&&typeof _0x4e0b2f[_0xa55c('0x1c')]===_0xa55c('0x1b');var _0x51590e=_0x3ccf65[_0xa55c('0x1d')];var _0x24783b=_0x3dcf4f?0x0:_0x4e0b2f['offset'];var _0x3d4c9e=_0x3dcf4f?_0x3ccf65[_0xa55c('0x1d')]:_0x4e0b2f[_0xa55c('0x1a')]+_0x4e0b2f[_0xa55c('0x1c')];var _0x23a1ae;if(_0x3d4c9e>=_0x51590e){_0x3d4c9e=_0x51590e;_0x23a1ae=0xc8;}else{_0x23a1ae=0xce;}_0x247e77[_0xa55c('0x18')](_0x23a1ae);return _0x247e77['set']('Content-Range',_0x24783b+'-'+_0x3d4c9e+'/'+_0x51590e)[_0xa55c('0x19')](_0x3ccf65);}return null;};}function patchUpdates(_0x3776ac){return function(_0xade4c4){try{jsonpatch['apply'](_0xade4c4,_0x3776ac,!![]);}catch(_0x383d92){return BPromise[_0xa55c('0x1e')](_0x383d92);}return _0xade4c4['save']();};}function saveUpdates(_0x187a87,_0x133096){return function(_0x940f28){if(_0x940f28){return _0x940f28[_0xa55c('0x1f')](_0x187a87)[_0xa55c('0x20')](function(_0x49ed04){return _0x49ed04;});}return null;};}function removeEntity(_0x1fc828,_0x504c24){return function(_0x5ba836){if(_0x5ba836){return _0x5ba836['destroy']()[_0xa55c('0x20')](function(){var _0x54b038=_0x5ba836[_0xa55c('0x21')]({'plain':!![]});var _0x190757=_0xa55c('0x22');return db[_0xa55c('0x23')][_0xa55c('0x24')]({'where':{'type':_0x190757,'resourceId':_0x54b038['id']}})[_0xa55c('0x20')](function(){return _0x5ba836;});})[_0xa55c('0x20')](function(){_0x1fc828[_0xa55c('0x18')](0xcc)[_0xa55c('0x25')]();});}};}function handleEntityNotFound(_0x3cd152,_0x1273d7){return function(_0x57f271){if(!_0x57f271){_0x3cd152[_0xa55c('0x26')](0x194);}return _0x57f271;};}function handleError(_0x28814f,_0x1c9f6b){_0x1c9f6b=_0x1c9f6b||0x1f4;return function(_0x906caa){logger['error'](_0x906caa[_0xa55c('0x27')]);if(_0x906caa[_0xa55c('0x28')]){delete _0x906caa[_0xa55c('0x28')];}_0x28814f[_0xa55c('0x18')](_0x1c9f6b)[_0xa55c('0x29')](_0x906caa);};}exports[_0xa55c('0x2a')]=function(_0x52d37f,_0x23e698){var _0x490b7d={},_0x35c9c2={},_0x1d730b={'count':0x0,'rows':[]};var _0x1cc53e=_[_0xa55c('0x2b')](db['AnalyticMetric'][_0xa55c('0x2c')],function(_0x2096ae){return{'name':_0x2096ae[_0xa55c('0x2d')],'type':_0x2096ae[_0xa55c('0x2e')][_0xa55c('0x2f')]};});_0x35c9c2[_0xa55c('0x30')]=_[_0xa55c('0x2b')](_0x1cc53e,_0xa55c('0x28'));_0x35c9c2[_0xa55c('0x31')]=_[_0xa55c('0x32')](_0x52d37f[_0xa55c('0x31')]);_0x35c9c2['filters']=_['intersection'](_0x35c9c2[_0xa55c('0x30')],_0x35c9c2[_0xa55c('0x31')]);_0x490b7d['attributes']=_[_0xa55c('0x33')](_0x35c9c2[_0xa55c('0x30')],qs[_0xa55c('0x34')](_0x52d37f[_0xa55c('0x31')][_0xa55c('0x34')]));_0x490b7d[_0xa55c('0x35')]=_0x490b7d[_0xa55c('0x35')][_0xa55c('0x36')]?_0x490b7d[_0xa55c('0x35')]:_0x35c9c2['model'];if(!_0x52d37f['query']['hasOwnProperty'](_0xa55c('0x37'))){_0x490b7d[_0xa55c('0x1c')]=qs[_0xa55c('0x1c')](_0x52d37f['query'][_0xa55c('0x1c')]);_0x490b7d['offset']=qs[_0xa55c('0x1a')](_0x52d37f['query'][_0xa55c('0x1a')]);}_0x490b7d[_0xa55c('0x38')]=qs[_0xa55c('0x39')](_0x52d37f['query'][_0xa55c('0x39')]);_0x490b7d[_0xa55c('0x3a')]=qs['filters'](_[_0xa55c('0x3b')](_0x52d37f[_0xa55c('0x31')],_0x35c9c2['filters']),_0x1cc53e);if(_0x52d37f['query'][_0xa55c('0x3c')]){_0x490b7d['where']=_[_0xa55c('0x3d')](_0x490b7d[_0xa55c('0x3a')],{'$or':_['map'](_0x1cc53e,function(_0x542d76){if(_0x542d76['type']!=='VIRTUAL'){var _0x3b3308={};_0x3b3308[_0x542d76[_0xa55c('0x28')]]={'$like':'%'+_0x52d37f[_0xa55c('0x31')][_0xa55c('0x3c')]+'%'};return _0x3b3308;}})});}_0x490b7d=_[_0xa55c('0x3d')]({},_0x490b7d,_0x52d37f['options']);var _0x3d52d8={'where':_0x490b7d[_0xa55c('0x3a')]};return db[_0xa55c('0x3e')][_0xa55c('0x1d')](_0x3d52d8)[_0xa55c('0x20')](function(_0x23cef5){_0x1d730b['count']=_0x23cef5;if(_0x52d37f[_0xa55c('0x31')]['includeAll']){_0x490b7d['include']=[{'all':!![]}];}return db[_0xa55c('0x3e')][_0xa55c('0x3f')](_0x490b7d);})['then'](function(_0x2bd98b){_0x1d730b['rows']=_0x2bd98b;return _0x1d730b;})['then'](respondWithFilteredResult(_0x23e698,_0x490b7d))[_0xa55c('0x40')](handleError(_0x23e698,null));};exports[_0xa55c('0x41')]=function(_0x1630ac,_0x540337){var _0x1b2708={'raw':!![],'where':{'id':_0x1630ac['params']['id']}},_0xd5a006={};_0xd5a006[_0xa55c('0x30')]=_['keys'](db[_0xa55c('0x3e')][_0xa55c('0x2c')]);_0xd5a006['query']=_[_0xa55c('0x32')](_0x1630ac[_0xa55c('0x31')]);_0xd5a006['filters']=_[_0xa55c('0x33')](_0xd5a006[_0xa55c('0x30')],_0xd5a006[_0xa55c('0x31')]);_0x1b2708['attributes']=_[_0xa55c('0x33')](_0xd5a006['model'],qs[_0xa55c('0x34')](_0x1630ac[_0xa55c('0x31')][_0xa55c('0x34')]));_0x1b2708['attributes']=_0x1b2708[_0xa55c('0x35')][_0xa55c('0x36')]?_0x1b2708['attributes']:_0xd5a006[_0xa55c('0x30')];if(_0x1630ac[_0xa55c('0x31')]['includeAll']){_0x1b2708[_0xa55c('0x42')]=[{'all':!![]}];}_0x1b2708=_[_0xa55c('0x3d')]({},_0x1b2708,_0x1630ac['options']);return db[_0xa55c('0x3e')][_0xa55c('0x43')](_0x1b2708)[_0xa55c('0x20')](handleEntityNotFound(_0x540337,null))[_0xa55c('0x20')](respondWithResult(_0x540337,null))['catch'](handleError(_0x540337,null));};exports[_0xa55c('0x44')]=function(_0x58a7ea,_0x2157d6){return db[_0xa55c('0x3e')][_0xa55c('0x44')](_0x58a7ea['body'],{})[_0xa55c('0x20')](function(_0x250b00){var _0x574fe9=_0x58a7ea[_0xa55c('0x45')][_0xa55c('0x21')]({'plain':!![]});if(!_0x574fe9)throw new Error(_0xa55c('0x46'));if(_0x574fe9[_0xa55c('0x47')]===_0xa55c('0x45')){var _0x1c84d9=_0x250b00[_0xa55c('0x21')]({'plain':!![]});var _0x129626=_0xa55c('0x22');return db[_0xa55c('0x48')]['find']({'where':{'name':_0x129626,'userProfileId':_0x574fe9[_0xa55c('0x49')]},'raw':!![]})[_0xa55c('0x20')](function(_0x216de8){if(_0x216de8&&_0x216de8['autoAssociation']===0x0){return db[_0xa55c('0x23')][_0xa55c('0x44')]({'name':_0x1c84d9['name'],'resourceId':_0x1c84d9['id'],'type':_0x216de8[_0xa55c('0x28')],'sectionId':_0x216de8['id']},{})['then'](function(){return _0x250b00;});}else{return _0x250b00;}})[_0xa55c('0x40')](function(_0x228df4){logger[_0xa55c('0x4a')](_0xa55c('0x4b'),_0x228df4);throw _0x228df4;});}return _0x250b00;})[_0xa55c('0x20')](respondWithResult(_0x2157d6,0xc9))['catch'](handleError(_0x2157d6,null));};exports[_0xa55c('0x1f')]=function(_0x4607ca,_0x4b85cc){if(_0x4607ca[_0xa55c('0x4c')]['id']){delete _0x4607ca[_0xa55c('0x4c')]['id'];}return db[_0xa55c('0x3e')][_0xa55c('0x43')]({'where':{'id':_0x4607ca['params']['id']}})['then'](handleEntityNotFound(_0x4b85cc,null))[_0xa55c('0x20')](saveUpdates(_0x4607ca[_0xa55c('0x4c')],null))[_0xa55c('0x20')](respondWithResult(_0x4b85cc,null))[_0xa55c('0x40')](handleError(_0x4b85cc,null));};exports['destroy']=function(_0x30c0c9,_0x5ce463){return db[_0xa55c('0x3e')][_0xa55c('0x43')]({'where':{'id':_0x30c0c9[_0xa55c('0x4d')]['id']}})[_0xa55c('0x20')](handleEntityNotFound(_0x5ce463,null))[_0xa55c('0x20')](removeEntity(_0x5ce463,null))['catch'](handleError(_0x5ce463,null));};
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.model.js b/server/api/analyticMetric/analyticMetric.model.js
index 831a411..89f0941 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 _0x6299=['analytics_metrics','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./analyticMetric.attributes','exports'];(function(_0x4c619b,_0x28457f){var _0x39e0fd=function(_0x6436fd){while(--_0x6436fd){_0x4c619b['push'](_0x4c619b['shift']());}};_0x39e0fd(++_0x28457f);}(_0x6299,0x169));var _0x9629=function(_0x2c5238,_0x15312b){_0x2c5238=_0x2c5238-0x0;var _0x392df2=_0x6299[_0x2c5238];return _0x392df2;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x9629('0x0'))(_0x9629('0x1'));var moment=require(_0x9629('0x2'));var BPromise=require(_0x9629('0x3'));var rp=require(_0x9629('0x4'));var fs=require('fs');var path=require(_0x9629('0x5'));var rimraf=require('rimraf');var config=require(_0x9629('0x6'));var attributes=require(_0x9629('0x7'));module[_0x9629('0x8')]=function(_0x1edc13,_0x1206bf){return _0x1edc13['define']('AnalyticMetric',attributes,{'tableName':_0x9629('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x297f=['analytics_metrics','lodash','util','moment','bluebird','request-promise','path','../../config/environment','exports'];(function(_0x189684,_0xcdee06){var _0x187830=function(_0x465763){while(--_0x465763){_0x189684['push'](_0x189684['shift']());}};_0x187830(++_0xcdee06);}(_0x297f,0x1f0));var _0xf297=function(_0x54cda1,_0x1fc425){_0x54cda1=_0x54cda1-0x0;var _0x3e0f18=_0x297f[_0x54cda1];return _0x3e0f18;};'use strict';var _=require(_0xf297('0x0'));var util=require(_0xf297('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xf297('0x2'));var BPromise=require(_0xf297('0x3'));var rp=require(_0xf297('0x4'));var fs=require('fs');var path=require(_0xf297('0x5'));var rimraf=require('rimraf');var config=require(_0xf297('0x6'));var attributes=require('./analyticMetric.attributes');module[_0xf297('0x7')]=function(_0x353e78,_0x2282eb){return _0x353e78['define']('AnalyticMetric',attributes,{'tableName':_0xf297('0x8'),'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 fdbc43c..b4ab8cb 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 _0xf118=['../../config/logger','rpc','../../config/environment','client','http','request','then','AnalyticMetric,\x20%s,\x20%s','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x5ebe76,_0x590dfc){var _0x2d0fdd=function(_0x5ef78e){while(--_0x5ef78e){_0x5ebe76['push'](_0x5ebe76['shift']());}};_0x2d0fdd(++_0x590dfc);}(_0xf118,0x116));var _0x8f11=function(_0xce3d93,_0x504f1c){_0xce3d93=_0xce3d93-0x0;var _0x16bcf8=_0xf118[_0xce3d93];return _0x16bcf8;};'use strict';var _=require(_0x8f11('0x0'));var util=require(_0x8f11('0x1'));var moment=require(_0x8f11('0x2'));var BPromise=require(_0x8f11('0x3'));var rs=require(_0x8f11('0x4'));var fs=require('fs');var Redis=require(_0x8f11('0x5'));var db=require(_0x8f11('0x6'))['db'];var utils=require(_0x8f11('0x7'));var logger=require(_0x8f11('0x8'))(_0x8f11('0x9'));var config=require(_0x8f11('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x8f11('0xb')][_0x8f11('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x542890,_0xc1041a,_0x312d7f){return new BPromise(function(_0x55de07,_0x21b42c){return client[_0x8f11('0xd')](_0x542890,_0x312d7f)[_0x8f11('0xe')](function(_0x3bec4d){logger['info'](_0x8f11('0xf'),_0xc1041a,_0x8f11('0x10'));logger[_0x8f11('0x11')](_0x8f11('0x12'),_0xc1041a,_0x8f11('0x10'),JSON[_0x8f11('0x13')](_0x3bec4d));if(_0x3bec4d[_0x8f11('0x14')]){if(_0x3bec4d['error'][_0x8f11('0x15')]===0x1f4){logger['error'](_0x8f11('0xf'),_0xc1041a,_0x3bec4d[_0x8f11('0x14')]['message']);return _0x21b42c(_0x3bec4d['error'][_0x8f11('0x16')]);}logger[_0x8f11('0x14')]('AnalyticMetric,\x20%s,\x20%s',_0xc1041a,_0x3bec4d[_0x8f11('0x14')][_0x8f11('0x16')]);return _0x55de07(_0x3bec4d[_0x8f11('0x14')]['message']);}else{logger[_0x8f11('0x17')](_0x8f11('0xf'),_0xc1041a,_0x8f11('0x10'));_0x55de07(_0x3bec4d[_0x8f11('0x18')][_0x8f11('0x16')]);}})[_0x8f11('0x19')](function(_0x183c98){logger[_0x8f11('0x14')](_0x8f11('0xf'),_0xc1041a,_0x183c98);_0x21b42c(_0x183c98);});});}
\ No newline at end of file
+var _0x4931=['error','code','AnalyticMetric,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','client','http','request','then','info','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x1b1e69,_0x2af64c){var _0x37f2ea=function(_0x20dc0e){while(--_0x20dc0e){_0x1b1e69['push'](_0x1b1e69['shift']());}};_0x37f2ea(++_0x2af64c);}(_0x4931,0x148));var _0x1493=function(_0x197d97,_0x3992ff){_0x197d97=_0x197d97-0x0;var _0x42ab81=_0x4931[_0x197d97];return _0x42ab81;};'use strict';var _=require(_0x1493('0x0'));var util=require(_0x1493('0x1'));var moment=require(_0x1493('0x2'));var BPromise=require(_0x1493('0x3'));var rs=require(_0x1493('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x1493('0x5'));var logger=require(_0x1493('0x6'))(_0x1493('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x1493('0x8')][_0x1493('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x57cb1d,_0x46b5a5,_0x5c0798){return new BPromise(function(_0x2b975b,_0xf46338){return client[_0x1493('0xa')](_0x57cb1d,_0x5c0798)[_0x1493('0xb')](function(_0x49a385){logger[_0x1493('0xc')]('AnalyticMetric,\x20%s,\x20%s',_0x46b5a5,_0x1493('0xd'));logger[_0x1493('0xe')](_0x1493('0xf'),_0x46b5a5,'request\x20sent',JSON[_0x1493('0x10')](_0x49a385));if(_0x49a385[_0x1493('0x11')]){if(_0x49a385[_0x1493('0x11')][_0x1493('0x12')]===0x1f4){logger['error'](_0x1493('0x13'),_0x46b5a5,_0x49a385['error']['message']);return _0xf46338(_0x49a385[_0x1493('0x11')][_0x1493('0x14')]);}logger['error'](_0x1493('0x13'),_0x46b5a5,_0x49a385[_0x1493('0x11')][_0x1493('0x14')]);return _0x2b975b(_0x49a385[_0x1493('0x11')][_0x1493('0x14')]);}else{logger['info'](_0x1493('0x13'),_0x46b5a5,'request\x20sent');_0x2b975b(_0x49a385[_0x1493('0x15')]['message']);}})[_0x1493('0x16')](function(_0x58231f){logger[_0x1493('0x11')](_0x1493('0x13'),_0x46b5a5,_0x58231f);_0xf46338(_0x58231f);});});}
\ No newline at end of file
diff --git a/server/api/analyticMetric/index.js b/server/api/analyticMetric/index.js
index 173ac63..06c0e02 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 _0xf52f=['fs-extra','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy','exports','multer','util','path','express','Router'];(function(_0x19e9fa,_0x512f17){var _0x4e7f68=function(_0x5b5e49){while(--_0x5b5e49){_0x19e9fa['push'](_0x19e9fa['shift']());}};_0x4e7f68(++_0x512f17);}(_0xf52f,0x113));var _0xff52=function(_0x365dbe,_0x4d3979){_0x365dbe=_0x365dbe-0x0;var _0xaa71bb=_0xf52f[_0x365dbe];return _0xaa71bb;};'use strict';var multer=require(_0xff52('0x0'));var util=require(_0xff52('0x1'));var path=require(_0xff52('0x2'));var timeout=require('connect-timeout');var express=require(_0xff52('0x3'));var router=express[_0xff52('0x4')]();var fs_extra=require(_0xff52('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xff52('0x6'));var config=require(_0xff52('0x7'));var controller=require('./analyticMetric.controller');router[_0xff52('0x8')]('/',auth[_0xff52('0x9')](),controller[_0xff52('0xa')]);router[_0xff52('0x8')](_0xff52('0xb'),auth[_0xff52('0x9')](),controller[_0xff52('0xc')]);router[_0xff52('0xd')]('/',auth[_0xff52('0x9')](),controller[_0xff52('0xe')]);router[_0xff52('0xf')](_0xff52('0xb'),auth[_0xff52('0x9')](),controller[_0xff52('0x10')]);router[_0xff52('0x11')](_0xff52('0xb'),auth[_0xff52('0x9')](),controller[_0xff52('0x12')]);module[_0xff52('0x13')]=router;
\ No newline at end of file
+var _0xe5e0=['post','create','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./analyticMetric.controller','get','isAuthenticated','/:id','show'];(function(_0x220dbb,_0x99328d){var _0x2b77de=function(_0x15e966){while(--_0x15e966){_0x220dbb['push'](_0x220dbb['shift']());}};_0x2b77de(++_0x99328d);}(_0xe5e0,0x1be));var _0x0e5e=function(_0x1d3ea0,_0x12025c){_0x1d3ea0=_0x1d3ea0-0x0;var _0x384cd7=_0xe5e0[_0x1d3ea0];return _0x384cd7;};'use strict';var multer=require(_0x0e5e('0x0'));var util=require(_0x0e5e('0x1'));var path=require(_0x0e5e('0x2'));var timeout=require(_0x0e5e('0x3'));var express=require(_0x0e5e('0x4'));var router=express[_0x0e5e('0x5')]();var fs_extra=require(_0x0e5e('0x6'));var auth=require(_0x0e5e('0x7'));var interaction=require(_0x0e5e('0x8'));var config=require('../../config/environment');var controller=require(_0x0e5e('0x9'));router[_0x0e5e('0xa')]('/',auth[_0x0e5e('0xb')](),controller['index']);router[_0x0e5e('0xa')](_0x0e5e('0xc'),auth[_0x0e5e('0xb')](),controller[_0x0e5e('0xd')]);router[_0x0e5e('0xe')]('/',auth[_0x0e5e('0xb')](),controller[_0x0e5e('0xf')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0x0e5e('0x10')]);router[_0x0e5e('0x11')]('/:id',auth['isAuthenticated'](),controller[_0x0e5e('0x12')]);module[_0x0e5e('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.attributes.js b/server/api/analyticTreeReport/analyticTreeReport.attributes.js
index 161bf94..31f81c8 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 _0xe6bb=['exports','sequelize'];(function(_0x143368,_0x5d0b64){var _0x44c10a=function(_0x30c90c){while(--_0x30c90c){_0x143368['push'](_0x143368['shift']());}};_0x44c10a(++_0x5d0b64);}(_0xe6bb,0x133));var _0xbe6b=function(_0x49a264,_0x3e2dd7){_0x49a264=_0x49a264-0x0;var _0x255927=_0xe6bb[_0x49a264];return _0x255927;};'use strict';var Sequelize=require(_0xbe6b('0x0'));module[_0xbe6b('0x1')]={'tree':{'type':Sequelize['TEXT'],'allowNull':![]}};
\ No newline at end of file
+var _0x0399=['sequelize','exports','TEXT'];(function(_0x59bcb1,_0x5a4b6c){var _0x4a737f=function(_0x546a49){while(--_0x546a49){_0x59bcb1['push'](_0x59bcb1['shift']());}};_0x4a737f(++_0x5a4b6c);}(_0x0399,0x180));var _0x9039=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0x0399[_0x57b54c];return _0x59cc19;};'use strict';var Sequelize=require(_0x9039('0x0'));module[_0x9039('0x1')]={'tree':{'type':Sequelize[_0x9039('0x2')],'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.controller.js b/server/api/analyticTreeReport/analyticTreeReport.controller.js
index 378cd0f..c037bef 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 _0x1aae=['limit','count','set','save','update','then','error','stack','name','send','AnalyticTreeReport','rawAttributes','type','key','model','map','query','keys','filters','intersection','attributes','length','hasOwnProperty','order','sort','where','pick','filter','VIRTUAL','merge','options','includeAll','findAll','rows','show','params','fields','catch','create','body','find','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','sendStatus','status','end','json','offset','undefined'];(function(_0x18bef8,_0x1a7772){var _0x146dcb=function(_0x27a7c8){while(--_0x27a7c8){_0x18bef8['push'](_0x18bef8['shift']());}};_0x146dcb(++_0x1a7772);}(_0x1aae,0xfb));var _0xe1aa=function(_0x48f8b2,_0x464731){_0x48f8b2=_0x48f8b2-0x0;var _0x47ebb4=_0x1aae[_0x48f8b2];return _0x47ebb4;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xe1aa('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe1aa('0x1'));var moment=require(_0xe1aa('0x2'));var BPromise=require('bluebird');var Mustache=require(_0xe1aa('0x3'));var util=require(_0xe1aa('0x4'));var path=require(_0xe1aa('0x5'));var sox=require(_0xe1aa('0x6'));var csv=require(_0xe1aa('0x7'));var ejs=require(_0xe1aa('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xe1aa('0x9'));var squel=require(_0xe1aa('0xa'));var crypto=require('crypto');var jsforce=require(_0xe1aa('0xb'));var deskjs=require(_0xe1aa('0xc'));var toCsv=require(_0xe1aa('0x7'));var querystring=require(_0xe1aa('0xd'));var Papa=require(_0xe1aa('0xe'));var Redis=require(_0xe1aa('0xf'));var authService=require(_0xe1aa('0x10'));var qs=require(_0xe1aa('0x11'));var as=require(_0xe1aa('0x12'));var hardwareService=require(_0xe1aa('0x13'));var logger=require(_0xe1aa('0x14'))(_0xe1aa('0x15'));var utils=require(_0xe1aa('0x16'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x34c561,_0x13d989){_0x13d989=_0x13d989||0xcc;return function(_0x12fcb9){if(_0x12fcb9){return _0x34c561[_0xe1aa('0x17')](_0x13d989);}return _0x34c561[_0xe1aa('0x18')](_0x13d989)[_0xe1aa('0x19')]();};}function respondWithResult(_0x128070,_0x29061d){_0x29061d=_0x29061d||0xc8;return function(_0x1f9cf6){if(_0x1f9cf6){return _0x128070[_0xe1aa('0x18')](_0x29061d)[_0xe1aa('0x1a')](_0x1f9cf6);}};}function respondWithFilteredResult(_0xfe1274,_0x3e4e42){return function(_0x1056c6){if(_0x1056c6){var _0x227fa0=typeof _0x3e4e42[_0xe1aa('0x1b')]===_0xe1aa('0x1c')&&typeof _0x3e4e42[_0xe1aa('0x1d')]===_0xe1aa('0x1c');var _0x2bb125=_0x1056c6[_0xe1aa('0x1e')];var _0xc19bf4=_0x227fa0?0x0:_0x3e4e42[_0xe1aa('0x1b')];var _0x33135b=_0x227fa0?_0x1056c6[_0xe1aa('0x1e')]:_0x3e4e42[_0xe1aa('0x1b')]+_0x3e4e42[_0xe1aa('0x1d')];var _0x5b2c16;if(_0x33135b>=_0x2bb125){_0x33135b=_0x2bb125;_0x5b2c16=0xc8;}else{_0x5b2c16=0xce;}_0xfe1274[_0xe1aa('0x18')](_0x5b2c16);return _0xfe1274[_0xe1aa('0x1f')]('Content-Range',_0xc19bf4+'-'+_0x33135b+'/'+_0x2bb125)['json'](_0x1056c6);}return null;};}function patchUpdates(_0x39d49f){return function(_0x57efca){try{jsonpatch['apply'](_0x57efca,_0x39d49f,!![]);}catch(_0x37b650){return BPromise['reject'](_0x37b650);}return _0x57efca[_0xe1aa('0x20')]();};}function saveUpdates(_0x3bda1e,_0x191649){return function(_0x56aa38){if(_0x56aa38){return _0x56aa38[_0xe1aa('0x21')](_0x3bda1e)[_0xe1aa('0x22')](function(_0x20024e){return _0x20024e;});}return null;};}function removeEntity(_0x4c5b92,_0x3c7103){return function(_0x107618){if(_0x107618){return _0x107618['destroy']()[_0xe1aa('0x22')](function(){_0x4c5b92[_0xe1aa('0x18')](0xcc)[_0xe1aa('0x19')]();});}};}function handleEntityNotFound(_0x1e6655,_0x400adb){return function(_0x3d69f8){if(!_0x3d69f8){_0x1e6655[_0xe1aa('0x17')](0x194);}return _0x3d69f8;};}function handleError(_0x2c11cd,_0x456147){_0x456147=_0x456147||0x1f4;return function(_0x183cab){logger[_0xe1aa('0x23')](_0x183cab[_0xe1aa('0x24')]);if(_0x183cab[_0xe1aa('0x25')]){delete _0x183cab['name'];}_0x2c11cd[_0xe1aa('0x18')](_0x456147)[_0xe1aa('0x26')](_0x183cab);};}exports['index']=function(_0x5b927e,_0x2481bf){var _0x327c2b={},_0x53bffc={},_0x1c7f6d={'count':0x0,'rows':[]};var _0x846e5a=_['map'](db[_0xe1aa('0x27')][_0xe1aa('0x28')],function(_0x58bb53){return{'name':_0x58bb53['fieldName'],'type':_0x58bb53[_0xe1aa('0x29')][_0xe1aa('0x2a')]};});_0x53bffc[_0xe1aa('0x2b')]=_[_0xe1aa('0x2c')](_0x846e5a,_0xe1aa('0x25'));_0x53bffc[_0xe1aa('0x2d')]=_[_0xe1aa('0x2e')](_0x5b927e['query']);_0x53bffc[_0xe1aa('0x2f')]=_[_0xe1aa('0x30')](_0x53bffc[_0xe1aa('0x2b')],_0x53bffc[_0xe1aa('0x2d')]);_0x327c2b['attributes']=_['intersection'](_0x53bffc[_0xe1aa('0x2b')],qs['fields'](_0x5b927e[_0xe1aa('0x2d')]['fields']));_0x327c2b[_0xe1aa('0x31')]=_0x327c2b['attributes'][_0xe1aa('0x32')]?_0x327c2b[_0xe1aa('0x31')]:_0x53bffc[_0xe1aa('0x2b')];if(!_0x5b927e['query'][_0xe1aa('0x33')]('nolimit')){_0x327c2b[_0xe1aa('0x1d')]=qs[_0xe1aa('0x1d')](_0x5b927e[_0xe1aa('0x2d')][_0xe1aa('0x1d')]);_0x327c2b[_0xe1aa('0x1b')]=qs[_0xe1aa('0x1b')](_0x5b927e['query'][_0xe1aa('0x1b')]);}_0x327c2b[_0xe1aa('0x34')]=qs[_0xe1aa('0x35')](_0x5b927e[_0xe1aa('0x2d')][_0xe1aa('0x35')]);_0x327c2b[_0xe1aa('0x36')]=qs['filters'](_[_0xe1aa('0x37')](_0x5b927e['query'],_0x53bffc['filters']),_0x846e5a);if(_0x5b927e[_0xe1aa('0x2d')][_0xe1aa('0x38')]){_0x327c2b[_0xe1aa('0x36')]=_['merge'](_0x327c2b[_0xe1aa('0x36')],{'$or':_[_0xe1aa('0x2c')](_0x846e5a,function(_0x135548){if(_0x135548[_0xe1aa('0x29')]!==_0xe1aa('0x39')){var _0x1324fb={};_0x1324fb[_0x135548[_0xe1aa('0x25')]]={'$like':'%'+_0x5b927e[_0xe1aa('0x2d')]['filter']+'%'};return _0x1324fb;}})});}_0x327c2b=_[_0xe1aa('0x3a')]({},_0x327c2b,_0x5b927e[_0xe1aa('0x3b')]);var _0x34a217={'where':_0x327c2b['where']};return db[_0xe1aa('0x27')][_0xe1aa('0x1e')](_0x34a217)[_0xe1aa('0x22')](function(_0x22b7ab){_0x1c7f6d[_0xe1aa('0x1e')]=_0x22b7ab;if(_0x5b927e['query'][_0xe1aa('0x3c')]){_0x327c2b['include']=[{'all':!![]}];}return db['AnalyticTreeReport'][_0xe1aa('0x3d')](_0x327c2b);})[_0xe1aa('0x22')](function(_0x56e979){_0x1c7f6d[_0xe1aa('0x3e')]=_0x56e979;return _0x1c7f6d;})[_0xe1aa('0x22')](respondWithFilteredResult(_0x2481bf,_0x327c2b))['catch'](handleError(_0x2481bf,null));};exports[_0xe1aa('0x3f')]=function(_0x3a23f7,_0x21727f){var _0x2159a5={'raw':!![],'where':{'id':_0x3a23f7[_0xe1aa('0x40')]['id']}},_0x233741={};_0x233741['model']=_[_0xe1aa('0x2e')](db['AnalyticTreeReport'][_0xe1aa('0x28')]);_0x233741[_0xe1aa('0x2d')]=_[_0xe1aa('0x2e')](_0x3a23f7['query']);_0x233741['filters']=_[_0xe1aa('0x30')](_0x233741[_0xe1aa('0x2b')],_0x233741['query']);_0x2159a5[_0xe1aa('0x31')]=_['intersection'](_0x233741[_0xe1aa('0x2b')],qs['fields'](_0x3a23f7[_0xe1aa('0x2d')][_0xe1aa('0x41')]));_0x2159a5[_0xe1aa('0x31')]=_0x2159a5[_0xe1aa('0x31')]['length']?_0x2159a5[_0xe1aa('0x31')]:_0x233741[_0xe1aa('0x2b')];if(_0x3a23f7[_0xe1aa('0x2d')][_0xe1aa('0x3c')]){_0x2159a5['include']=[{'all':!![]}];}_0x2159a5=_[_0xe1aa('0x3a')]({},_0x2159a5,_0x3a23f7[_0xe1aa('0x3b')]);return db[_0xe1aa('0x27')]['find'](_0x2159a5)[_0xe1aa('0x22')](handleEntityNotFound(_0x21727f,null))[_0xe1aa('0x22')](respondWithResult(_0x21727f,null))[_0xe1aa('0x42')](handleError(_0x21727f,null));};exports['create']=function(_0x30b771,_0x31b5a7){return db[_0xe1aa('0x27')][_0xe1aa('0x43')](_0x30b771[_0xe1aa('0x44')],{})['then'](respondWithResult(_0x31b5a7,0xc9))['catch'](handleError(_0x31b5a7,null));};exports[_0xe1aa('0x21')]=function(_0x43cf16,_0x49e952){if(_0x43cf16[_0xe1aa('0x44')]['id']){delete _0x43cf16['body']['id'];}return db['AnalyticTreeReport'][_0xe1aa('0x45')]({'where':{'id':_0x43cf16[_0xe1aa('0x40')]['id']}})[_0xe1aa('0x22')](handleEntityNotFound(_0x49e952,null))[_0xe1aa('0x22')](saveUpdates(_0x43cf16[_0xe1aa('0x44')],null))['then'](respondWithResult(_0x49e952,null))[_0xe1aa('0x42')](handleError(_0x49e952,null));};exports['destroy']=function(_0xefed73,_0x5f5b81){return db[_0xe1aa('0x27')][_0xe1aa('0x45')]({'where':{'id':_0xefed73[_0xe1aa('0x40')]['id']}})[_0xe1aa('0x22')](handleEntityNotFound(_0x5f5b81,null))['then'](removeEntity(_0x5f5b81,null))[_0xe1aa('0x42')](handleError(_0x5f5b81,null));};
\ No newline at end of file
+var _0xdf6c=['reject','save','destroy','then','error','stack','name','send','index','map','rawAttributes','fieldName','key','query','keys','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','filter','where','merge','type','VIRTUAL','AnalyticTreeReport','includeAll','catch','show','params','include','find','create','body','update','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','fs-extra','lodash','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/license/util','../../mysqldb','sendStatus','status','end','limit','undefined','count','offset','set','Content-Range','json','apply'];(function(_0x41ed37,_0xbcd1d4){var _0x13f7ea=function(_0x270235){while(--_0x270235){_0x41ed37['push'](_0x41ed37['shift']());}};_0x13f7ea(++_0xbcd1d4);}(_0xdf6c,0x71));var _0xcdf6=function(_0x2da833,_0x5f563d){_0x2da833=_0x2da833-0x0;var _0x3af752=_0xdf6c[_0x2da833];return _0x3af752;};'use strict';var emlformat=require(_0xcdf6('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xcdf6('0x1'));var jsonpatch=require(_0xcdf6('0x2'));var rp=require(_0xcdf6('0x3'));var moment=require(_0xcdf6('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xcdf6('0x5'));var util=require('util');var path=require(_0xcdf6('0x6'));var sox=require(_0xcdf6('0x7'));var csv=require(_0xcdf6('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xcdf6('0x9'));var _=require(_0xcdf6('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xcdf6('0xb'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xcdf6('0xc'));var Papa=require('papaparse');var Redis=require(_0xcdf6('0xd'));var authService=require(_0xcdf6('0xe'));var qs=require(_0xcdf6('0xf'));var as=require(_0xcdf6('0x10'));var hardwareService=require(_0xcdf6('0x11'));var logger=require(_0xcdf6('0x12'))(_0xcdf6('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xcdf6('0x14'));var db=require(_0xcdf6('0x15'))['db'];function respondWithStatusCode(_0x32ee7f,_0x56ae64){_0x56ae64=_0x56ae64||0xcc;return function(_0x3a1df7){if(_0x3a1df7){return _0x32ee7f[_0xcdf6('0x16')](_0x56ae64);}return _0x32ee7f[_0xcdf6('0x17')](_0x56ae64)[_0xcdf6('0x18')]();};}function respondWithResult(_0x42b278,_0x9376bc){_0x9376bc=_0x9376bc||0xc8;return function(_0x2075dd){if(_0x2075dd){return _0x42b278['status'](_0x9376bc)['json'](_0x2075dd);}};}function respondWithFilteredResult(_0x10155e,_0x5a8152){return function(_0x23dd3b){if(_0x23dd3b){var _0x27ffa7=typeof _0x5a8152['offset']==='undefined'&&typeof _0x5a8152[_0xcdf6('0x19')]===_0xcdf6('0x1a');var _0x4540b8=_0x23dd3b[_0xcdf6('0x1b')];var _0x207691=_0x27ffa7?0x0:_0x5a8152[_0xcdf6('0x1c')];var _0x8307cf=_0x27ffa7?_0x23dd3b[_0xcdf6('0x1b')]:_0x5a8152[_0xcdf6('0x1c')]+_0x5a8152[_0xcdf6('0x19')];var _0x18a42e;if(_0x8307cf>=_0x4540b8){_0x8307cf=_0x4540b8;_0x18a42e=0xc8;}else{_0x18a42e=0xce;}_0x10155e[_0xcdf6('0x17')](_0x18a42e);return _0x10155e[_0xcdf6('0x1d')](_0xcdf6('0x1e'),_0x207691+'-'+_0x8307cf+'/'+_0x4540b8)[_0xcdf6('0x1f')](_0x23dd3b);}return null;};}function patchUpdates(_0x13f08a){return function(_0x15bd55){try{jsonpatch[_0xcdf6('0x20')](_0x15bd55,_0x13f08a,!![]);}catch(_0x4b7a69){return BPromise[_0xcdf6('0x21')](_0x4b7a69);}return _0x15bd55[_0xcdf6('0x22')]();};}function saveUpdates(_0x53712d,_0xd965d7){return function(_0x371bd7){if(_0x371bd7){return _0x371bd7['update'](_0x53712d)['then'](function(_0x35fb76){return _0x35fb76;});}return null;};}function removeEntity(_0x351710,_0x10dcc3){return function(_0x54068b){if(_0x54068b){return _0x54068b[_0xcdf6('0x23')]()[_0xcdf6('0x24')](function(){_0x351710[_0xcdf6('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x264753,_0x25c5d7){return function(_0x5910fb){if(!_0x5910fb){_0x264753[_0xcdf6('0x16')](0x194);}return _0x5910fb;};}function handleError(_0x3f61db,_0x3e0737){_0x3e0737=_0x3e0737||0x1f4;return function(_0x29f42d){logger[_0xcdf6('0x25')](_0x29f42d[_0xcdf6('0x26')]);if(_0x29f42d[_0xcdf6('0x27')]){delete _0x29f42d[_0xcdf6('0x27')];}_0x3f61db['status'](_0x3e0737)[_0xcdf6('0x28')](_0x29f42d);};}exports[_0xcdf6('0x29')]=function(_0x11d615,_0x59c8b0){var _0x23b6a0={},_0x3b0157={},_0x2011d1={'count':0x0,'rows':[]};var _0x17ca85=_[_0xcdf6('0x2a')](db['AnalyticTreeReport'][_0xcdf6('0x2b')],function(_0x468f0d){return{'name':_0x468f0d[_0xcdf6('0x2c')],'type':_0x468f0d['type'][_0xcdf6('0x2d')]};});_0x3b0157['model']=_[_0xcdf6('0x2a')](_0x17ca85,_0xcdf6('0x27'));_0x3b0157[_0xcdf6('0x2e')]=_[_0xcdf6('0x2f')](_0x11d615[_0xcdf6('0x2e')]);_0x3b0157[_0xcdf6('0x30')]=_[_0xcdf6('0x31')](_0x3b0157['model'],_0x3b0157['query']);_0x23b6a0[_0xcdf6('0x32')]=_[_0xcdf6('0x31')](_0x3b0157[_0xcdf6('0x33')],qs[_0xcdf6('0x34')](_0x11d615[_0xcdf6('0x2e')][_0xcdf6('0x34')]));_0x23b6a0[_0xcdf6('0x32')]=_0x23b6a0[_0xcdf6('0x32')][_0xcdf6('0x35')]?_0x23b6a0[_0xcdf6('0x32')]:_0x3b0157['model'];if(!_0x11d615[_0xcdf6('0x2e')][_0xcdf6('0x36')](_0xcdf6('0x37'))){_0x23b6a0['limit']=qs[_0xcdf6('0x19')](_0x11d615[_0xcdf6('0x2e')][_0xcdf6('0x19')]);_0x23b6a0['offset']=qs[_0xcdf6('0x1c')](_0x11d615[_0xcdf6('0x2e')][_0xcdf6('0x1c')]);}_0x23b6a0[_0xcdf6('0x38')]=qs[_0xcdf6('0x39')](_0x11d615['query'][_0xcdf6('0x39')]);_0x23b6a0['where']=qs['filters'](_['pick'](_0x11d615[_0xcdf6('0x2e')],_0x3b0157['filters']),_0x17ca85);if(_0x11d615['query'][_0xcdf6('0x3a')]){_0x23b6a0[_0xcdf6('0x3b')]=_[_0xcdf6('0x3c')](_0x23b6a0['where'],{'$or':_[_0xcdf6('0x2a')](_0x17ca85,function(_0x2cff38){if(_0x2cff38[_0xcdf6('0x3d')]!==_0xcdf6('0x3e')){var _0x1d9b36={};_0x1d9b36[_0x2cff38[_0xcdf6('0x27')]]={'$like':'%'+_0x11d615[_0xcdf6('0x2e')][_0xcdf6('0x3a')]+'%'};return _0x1d9b36;}})});}_0x23b6a0=_[_0xcdf6('0x3c')]({},_0x23b6a0,_0x11d615['options']);var _0x24560f={'where':_0x23b6a0[_0xcdf6('0x3b')]};return db[_0xcdf6('0x3f')][_0xcdf6('0x1b')](_0x24560f)[_0xcdf6('0x24')](function(_0x23652d){_0x2011d1[_0xcdf6('0x1b')]=_0x23652d;if(_0x11d615[_0xcdf6('0x2e')][_0xcdf6('0x40')]){_0x23b6a0['include']=[{'all':!![]}];}return db[_0xcdf6('0x3f')]['findAll'](_0x23b6a0);})[_0xcdf6('0x24')](function(_0x12e9c8){_0x2011d1['rows']=_0x12e9c8;return _0x2011d1;})[_0xcdf6('0x24')](respondWithFilteredResult(_0x59c8b0,_0x23b6a0))[_0xcdf6('0x41')](handleError(_0x59c8b0,null));};exports[_0xcdf6('0x42')]=function(_0x5011e2,_0x111f2d){var _0x127dc4={'raw':!![],'where':{'id':_0x5011e2[_0xcdf6('0x43')]['id']}},_0x20eab9={};_0x20eab9[_0xcdf6('0x33')]=_[_0xcdf6('0x2f')](db['AnalyticTreeReport']['rawAttributes']);_0x20eab9[_0xcdf6('0x2e')]=_[_0xcdf6('0x2f')](_0x5011e2[_0xcdf6('0x2e')]);_0x20eab9[_0xcdf6('0x30')]=_[_0xcdf6('0x31')](_0x20eab9[_0xcdf6('0x33')],_0x20eab9['query']);_0x127dc4[_0xcdf6('0x32')]=_[_0xcdf6('0x31')](_0x20eab9['model'],qs[_0xcdf6('0x34')](_0x5011e2[_0xcdf6('0x2e')][_0xcdf6('0x34')]));_0x127dc4[_0xcdf6('0x32')]=_0x127dc4[_0xcdf6('0x32')][_0xcdf6('0x35')]?_0x127dc4['attributes']:_0x20eab9[_0xcdf6('0x33')];if(_0x5011e2['query'][_0xcdf6('0x40')]){_0x127dc4[_0xcdf6('0x44')]=[{'all':!![]}];}_0x127dc4=_[_0xcdf6('0x3c')]({},_0x127dc4,_0x5011e2['options']);return db['AnalyticTreeReport'][_0xcdf6('0x45')](_0x127dc4)[_0xcdf6('0x24')](handleEntityNotFound(_0x111f2d,null))['then'](respondWithResult(_0x111f2d,null))['catch'](handleError(_0x111f2d,null));};exports[_0xcdf6('0x46')]=function(_0x5a1fbc,_0x3b7858){return db[_0xcdf6('0x3f')][_0xcdf6('0x46')](_0x5a1fbc[_0xcdf6('0x47')],{})[_0xcdf6('0x24')](respondWithResult(_0x3b7858,0xc9))[_0xcdf6('0x41')](handleError(_0x3b7858,null));};exports[_0xcdf6('0x48')]=function(_0x558392,_0x40e898){if(_0x558392[_0xcdf6('0x47')]['id']){delete _0x558392[_0xcdf6('0x47')]['id'];}return db[_0xcdf6('0x3f')]['find']({'where':{'id':_0x558392[_0xcdf6('0x43')]['id']}})[_0xcdf6('0x24')](handleEntityNotFound(_0x40e898,null))[_0xcdf6('0x24')](saveUpdates(_0x558392['body'],null))['then'](respondWithResult(_0x40e898,null))[_0xcdf6('0x41')](handleError(_0x40e898,null));};exports[_0xcdf6('0x23')]=function(_0x408979,_0x3eaf5b){return db['AnalyticTreeReport'][_0xcdf6('0x45')]({'where':{'id':_0x408979[_0xcdf6('0x43')]['id']}})[_0xcdf6('0x24')](handleEntityNotFound(_0x3eaf5b,null))['then'](removeEntity(_0x3eaf5b,null))['catch'](handleError(_0x3eaf5b,null));};
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.model.js b/server/api/analyticTreeReport/analyticTreeReport.model.js
index e07a19b..e43fef0 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 _0xb69a=['rimraf','../../config/environment','./analyticTreeReport.attributes','exports','lodash','util','../../config/logger','api','moment','request-promise','path'];(function(_0x5f159a,_0x4d5a73){var _0x25349b=function(_0x107376){while(--_0x107376){_0x5f159a['push'](_0x5f159a['shift']());}};_0x25349b(++_0x4d5a73);}(_0xb69a,0x1f3));var _0xab69=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0xb69a[_0x2f5ac5];return _0x37c9a8;};'use strict';var _=require(_0xab69('0x0'));var util=require(_0xab69('0x1'));var logger=require(_0xab69('0x2'))(_0xab69('0x3'));var moment=require(_0xab69('0x4'));var BPromise=require('bluebird');var rp=require(_0xab69('0x5'));var fs=require('fs');var path=require(_0xab69('0x6'));var rimraf=require(_0xab69('0x7'));var config=require(_0xab69('0x8'));var attributes=require(_0xab69('0x9'));module[_0xab69('0xa')]=function(_0xb1bf8f,_0x57cd46){return _0xb1bf8f['define']('AnalyticTreeReport',attributes,{'tableName':'analytics_report_trees','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe6ba=['../../config/environment','./analyticTreeReport.attributes','define','AnalyticTreeReport','lodash','util','api','bluebird','path'];(function(_0x257041,_0x464937){var _0x3566cb=function(_0x2db896){while(--_0x2db896){_0x257041['push'](_0x257041['shift']());}};_0x3566cb(++_0x464937);}(_0xe6ba,0x163));var _0xae6b=function(_0x263936,_0x1228f8){_0x263936=_0x263936-0x0;var _0x3ff68a=_0xe6ba[_0x263936];return _0x3ff68a;};'use strict';var _=require(_0xae6b('0x0'));var util=require(_0xae6b('0x1'));var logger=require('../../config/logger')(_0xae6b('0x2'));var moment=require('moment');var BPromise=require(_0xae6b('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xae6b('0x4'));var rimraf=require('rimraf');var config=require(_0xae6b('0x5'));var attributes=require(_0xae6b('0x6'));module['exports']=function(_0x3941f9,_0x48a1ab){return _0x3941f9[_0xae6b('0x7')](_0xae6b('0x8'),attributes,{'tableName':'analytics_report_trees','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 f739da0..639a017 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 _0x5f66=['../../mysqldb','../../config/utils','rpc','jayson/promise','client','request','then','AnalyticTreeReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticTreeReport,\x20%s,\x20%s,\x20%s','stringify','code','message','error','info','catch','util','bluebird','randomstring','ioredis'];(function(_0x1dddf5,_0x5171a5){var _0x126fea=function(_0x500527){while(--_0x500527){_0x1dddf5['push'](_0x1dddf5['shift']());}};_0x126fea(++_0x5171a5);}(_0x5f66,0x1a0));var _0x65f6=function(_0x5d4607,_0x6b5e7b){_0x5d4607=_0x5d4607-0x0;var _0x5e4a86=_0x5f66[_0x5d4607];return _0x5e4a86;};'use strict';var _=require('lodash');var util=require(_0x65f6('0x0'));var moment=require('moment');var BPromise=require(_0x65f6('0x1'));var rs=require(_0x65f6('0x2'));var fs=require('fs');var Redis=require(_0x65f6('0x3'));var db=require(_0x65f6('0x4'))['db'];var utils=require(_0x65f6('0x5'));var logger=require('../../config/logger')(_0x65f6('0x6'));var config=require('../../config/environment');var jayson=require(_0x65f6('0x7'));var client=jayson[_0x65f6('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4ed98f,_0x1c0e12,_0x2c6571){return new BPromise(function(_0x112079,_0x8f6451){return client[_0x65f6('0x9')](_0x4ed98f,_0x2c6571)[_0x65f6('0xa')](function(_0x48d85c){logger['info'](_0x65f6('0xb'),_0x1c0e12,_0x65f6('0xc'));logger[_0x65f6('0xd')](_0x65f6('0xe'),_0x1c0e12,'request\x20sent',JSON[_0x65f6('0xf')](_0x48d85c));if(_0x48d85c['error']){if(_0x48d85c['error'][_0x65f6('0x10')]===0x1f4){logger['error'](_0x65f6('0xb'),_0x1c0e12,_0x48d85c['error'][_0x65f6('0x11')]);return _0x8f6451(_0x48d85c[_0x65f6('0x12')][_0x65f6('0x11')]);}logger[_0x65f6('0x12')](_0x65f6('0xb'),_0x1c0e12,_0x48d85c[_0x65f6('0x12')][_0x65f6('0x11')]);return _0x112079(_0x48d85c[_0x65f6('0x12')][_0x65f6('0x11')]);}else{logger[_0x65f6('0x13')]('AnalyticTreeReport,\x20%s,\x20%s',_0x1c0e12,_0x65f6('0xc'));_0x112079(_0x48d85c['result']['message']);}})[_0x65f6('0x14')](function(_0x5c69f8){logger[_0x65f6('0x12')](_0x65f6('0xb'),_0x1c0e12,_0x5c69f8);_0x8f6451(_0x5c69f8);});});}
\ No newline at end of file
+var _0x7a54=['info','AnalyticTreeReport,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0x7a54,0x106));var _0x47a5=function(_0x51fae0,_0x2de47c){_0x51fae0=_0x51fae0-0x0;var _0x4201e6=_0x7a54[_0x51fae0];return _0x4201e6;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var BPromise=require('bluebird');var rs=require(_0x47a5('0x3'));var fs=require('fs');var Redis=require(_0x47a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x47a5('0x5'));var logger=require(_0x47a5('0x6'))(_0x47a5('0x7'));var config=require(_0x47a5('0x8'));var jayson=require(_0x47a5('0x9'));var client=jayson['client'][_0x47a5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x59199c,_0x343372,_0x30e405){return new BPromise(function(_0x506eda,_0x194fb0){return client['request'](_0x59199c,_0x30e405)['then'](function(_0x582352){logger[_0x47a5('0xb')](_0x47a5('0xc'),_0x343372,'request\x20sent');logger[_0x47a5('0xd')]('AnalyticTreeReport,\x20%s,\x20%s,\x20%s',_0x343372,'request\x20sent',JSON[_0x47a5('0xe')](_0x582352));if(_0x582352[_0x47a5('0xf')]){if(_0x582352[_0x47a5('0xf')][_0x47a5('0x10')]===0x1f4){logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')]['message']);return _0x194fb0(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);return _0x506eda(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}else{logger['info'](_0x47a5('0xc'),_0x343372,_0x47a5('0x12'));_0x506eda(_0x582352[_0x47a5('0x13')][_0x47a5('0x11')]);}})[_0x47a5('0x14')](function(_0x574af6){logger['error'](_0x47a5('0xc'),_0x343372,_0x574af6);_0x194fb0(_0x574af6);});});}
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/index.js b/server/api/analyticTreeReport/index.js
index 31a08cc..6670832 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 _0xeaca=['connect-timeout','express','Router','../../components/interaction/service','./analyticTreeReport.controller','get','isAuthenticated','index','show','post','create','put','/:id','update','destroy','util','path'];(function(_0x3a9f98,_0x4f5a75){var _0x5cfc6d=function(_0x159532){while(--_0x159532){_0x3a9f98['push'](_0x3a9f98['shift']());}};_0x5cfc6d(++_0x4f5a75);}(_0xeaca,0x196));var _0xaeac=function(_0x301b70,_0x499177){_0x301b70=_0x301b70-0x0;var _0x1a2331=_0xeaca[_0x301b70];return _0x1a2331;};'use strict';var multer=require('multer');var util=require(_0xaeac('0x0'));var path=require(_0xaeac('0x1'));var timeout=require(_0xaeac('0x2'));var express=require(_0xaeac('0x3'));var router=express[_0xaeac('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xaeac('0x5'));var config=require('../../config/environment');var controller=require(_0xaeac('0x6'));router[_0xaeac('0x7')]('/',auth[_0xaeac('0x8')](),controller[_0xaeac('0x9')]);router[_0xaeac('0x7')]('/:id',auth[_0xaeac('0x8')](),controller[_0xaeac('0xa')]);router[_0xaeac('0xb')]('/',auth[_0xaeac('0x8')](),controller[_0xaeac('0xc')]);router[_0xaeac('0xd')](_0xaeac('0xe'),auth[_0xaeac('0x8')](),controller[_0xaeac('0xf')]);router['delete'](_0xaeac('0xe'),auth[_0xaeac('0x8')](),controller[_0xaeac('0x10')]);module['exports']=router;
\ No newline at end of file
+var _0x4f3f=['../../components/auth/service','./analyticTreeReport.controller','isAuthenticated','index','get','/:id','show','create','put','update','delete','destroy','util','path','Router','fs-extra'];(function(_0x30023d,_0x534f9a){var _0x2749d1=function(_0x24a6b8){while(--_0x24a6b8){_0x30023d['push'](_0x30023d['shift']());}};_0x2749d1(++_0x534f9a);}(_0x4f3f,0x1cc));var _0xf4f3=function(_0x42df7a,_0x33bc7a){_0x42df7a=_0x42df7a-0x0;var _0x516290=_0x4f3f[_0x42df7a];return _0x516290;};'use strict';var multer=require('multer');var util=require(_0xf4f3('0x0'));var path=require(_0xf4f3('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xf4f3('0x2')]();var fs_extra=require(_0xf4f3('0x3'));var auth=require(_0xf4f3('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xf4f3('0x5'));router['get']('/',auth[_0xf4f3('0x6')](),controller[_0xf4f3('0x7')]);router[_0xf4f3('0x8')](_0xf4f3('0x9'),auth[_0xf4f3('0x6')](),controller[_0xf4f3('0xa')]);router['post']('/',auth[_0xf4f3('0x6')](),controller[_0xf4f3('0xb')]);router[_0xf4f3('0xc')](_0xf4f3('0x9'),auth[_0xf4f3('0x6')](),controller[_0xf4f3('0xd')]);router[_0xf4f3('0xe')](_0xf4f3('0x9'),auth['isAuthenticated'](),controller[_0xf4f3('0xf')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/attachment/attachment.attributes.js b/server/api/attachment/attachment.attributes.js
index 1d03c4c..3779412 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 _0xf197=['STRING','sequelize','exports'];(function(_0x48b810,_0x173a5e){var _0x23c17d=function(_0x38531e){while(--_0x38531e){_0x48b810['push'](_0x48b810['shift']());}};_0x23c17d(++_0x173a5e);}(_0xf197,0x130));var _0x7f19=function(_0x26d4f9,_0x39fa0a){_0x26d4f9=_0x26d4f9-0x0;var _0x151fb6=_0xf197[_0x26d4f9];return _0x151fb6;};'use strict';var Sequelize=require(_0x7f19('0x0'));module[_0x7f19('0x1')]={'name':{'type':Sequelize[_0x7f19('0x2')]},'basename':{'type':Sequelize['STRING']},'type':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x1df5=['STRING','sequelize','exports'];(function(_0x2642cb,_0x4b917f){var _0xe6e41=function(_0x281676){while(--_0x281676){_0x2642cb['push'](_0x2642cb['shift']());}};_0xe6e41(++_0x4b917f);}(_0x1df5,0xfd));var _0x51df=function(_0x10c68b,_0x651f83){_0x10c68b=_0x10c68b-0x0;var _0x1c4515=_0x1df5[_0x10c68b];return _0x1c4515;};'use strict';var Sequelize=require(_0x51df('0x0'));module[_0x51df('0x1')]={'name':{'type':Sequelize[_0x51df('0x2')]},'basename':{'type':Sequelize[_0x51df('0x2')]},'type':{'type':Sequelize[_0x51df('0x2')]}};
\ No newline at end of file
diff --git a/server/api/attachment/attachment.controller.js b/server/api/attachment/attachment.controller.js
index c3c0390..7393130 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 _0xf0a5=['index','map','rawAttributes','fieldName','key','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','name','options','includeAll','Attachment','findAll','rows','include','find','catch','clone','params','length','get','omit','createdAt','updatedAt','body','create','originalname','file','mimetype','download','findOne','ChatOfflineMessageId','join','root','server/files/attachments/','offline-chat/','basename','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','offset','undefined','limit','count','set','reject','update','then','destroy','sendStatus','error','stack','send'];(function(_0x3f802e,_0x3ae1c7){var _0x2cbea2=function(_0x582642){while(--_0x582642){_0x3f802e['push'](_0x3f802e['shift']());}};_0x2cbea2(++_0x3ae1c7);}(_0xf0a5,0x8e));var _0x5f0a=function(_0x329cd9,_0x23a7e8){_0x329cd9=_0x329cd9-0x0;var _0x3fb7c3=_0xf0a5[_0x329cd9];return _0x3fb7c3;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x5f0a('0x0'));var zipdir=require(_0x5f0a('0x1'));var jsonpatch=require(_0x5f0a('0x2'));var rp=require(_0x5f0a('0x3'));var moment=require(_0x5f0a('0x4'));var BPromise=require(_0x5f0a('0x5'));var Mustache=require(_0x5f0a('0x6'));var util=require(_0x5f0a('0x7'));var path=require('path');var sox=require(_0x5f0a('0x8'));var csv=require(_0x5f0a('0x9'));var ejs=require(_0x5f0a('0xa'));var fs=require('fs');var fs_extra=require(_0x5f0a('0xb'));var _=require(_0x5f0a('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x5f0a('0xd'));var toCsv=require(_0x5f0a('0x9'));var querystring=require('querystring');var Papa=require(_0x5f0a('0xe'));var Redis=require('ioredis');var authService=require(_0x5f0a('0xf'));var qs=require(_0x5f0a('0x10'));var as=require(_0x5f0a('0x11'));var hardwareService=require(_0x5f0a('0x12'));var logger=require(_0x5f0a('0x13'))(_0x5f0a('0x14'));var utils=require(_0x5f0a('0x15'));var config=require(_0x5f0a('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x5f0a('0x17'))['db'];function respondWithStatusCode(_0x309155,_0x547872){_0x547872=_0x547872||0xcc;return function(_0x1148a4){if(_0x1148a4){return _0x309155['sendStatus'](_0x547872);}return _0x309155[_0x5f0a('0x18')](_0x547872)[_0x5f0a('0x19')]();};}function respondWithResult(_0x2a09c4,_0x42452a){_0x42452a=_0x42452a||0xc8;return function(_0x3a22f3){if(_0x3a22f3){return _0x2a09c4[_0x5f0a('0x18')](_0x42452a)[_0x5f0a('0x1a')](_0x3a22f3);}};}function respondWithFilteredResult(_0x2c0e25,_0x39ebb2){return function(_0x3f7257){if(_0x3f7257){var _0x2f4f7b=typeof _0x39ebb2[_0x5f0a('0x1b')]===_0x5f0a('0x1c')&&typeof _0x39ebb2[_0x5f0a('0x1d')]===_0x5f0a('0x1c');var _0x1fa5d0=_0x3f7257['count'];var _0x75bca8=_0x2f4f7b?0x0:_0x39ebb2[_0x5f0a('0x1b')];var _0x5927e2=_0x2f4f7b?_0x3f7257[_0x5f0a('0x1e')]:_0x39ebb2[_0x5f0a('0x1b')]+_0x39ebb2[_0x5f0a('0x1d')];var _0x541824;if(_0x5927e2>=_0x1fa5d0){_0x5927e2=_0x1fa5d0;_0x541824=0xc8;}else{_0x541824=0xce;}_0x2c0e25[_0x5f0a('0x18')](_0x541824);return _0x2c0e25[_0x5f0a('0x1f')]('Content-Range',_0x75bca8+'-'+_0x5927e2+'/'+_0x1fa5d0)[_0x5f0a('0x1a')](_0x3f7257);}return null;};}function patchUpdates(_0x5347cd){return function(_0x28b5f3){try{jsonpatch['apply'](_0x28b5f3,_0x5347cd,!![]);}catch(_0x3a78e1){return BPromise[_0x5f0a('0x20')](_0x3a78e1);}return _0x28b5f3['save']();};}function saveUpdates(_0x201ba1,_0xeedb82){return function(_0x108258){if(_0x108258){return _0x108258[_0x5f0a('0x21')](_0x201ba1)[_0x5f0a('0x22')](function(_0x2088cd){return _0x2088cd;});}return null;};}function removeEntity(_0xd734c1,_0x1564a6){return function(_0x1b1176){if(_0x1b1176){return _0x1b1176[_0x5f0a('0x23')]()[_0x5f0a('0x22')](function(){_0xd734c1[_0x5f0a('0x18')](0xcc)[_0x5f0a('0x19')]();});}};}function handleEntityNotFound(_0x3ac41b,_0x2d14b7){return function(_0x1fd400){if(!_0x1fd400){_0x3ac41b[_0x5f0a('0x24')](0x194);}return _0x1fd400;};}function handleError(_0x3d56cb,_0x14df7d){_0x14df7d=_0x14df7d||0x1f4;return function(_0x158c62){logger[_0x5f0a('0x25')](_0x158c62[_0x5f0a('0x26')]);if(_0x158c62['name']){delete _0x158c62['name'];}_0x3d56cb[_0x5f0a('0x18')](_0x14df7d)[_0x5f0a('0x27')](_0x158c62);};}exports[_0x5f0a('0x28')]=function(_0x446ccd,_0x22658e){var _0x4d2d86={},_0x2097c6={},_0x22a798={'count':0x0,'rows':[]};var _0x4e639c=_[_0x5f0a('0x29')](db['Attachment'][_0x5f0a('0x2a')],function(_0x2a26a1){return{'name':_0x2a26a1[_0x5f0a('0x2b')],'type':_0x2a26a1['type'][_0x5f0a('0x2c')]};});_0x2097c6[_0x5f0a('0x2d')]=_['map'](_0x4e639c,'name');_0x2097c6[_0x5f0a('0x2e')]=_[_0x5f0a('0x2f')](_0x446ccd['query']);_0x2097c6[_0x5f0a('0x30')]=_['intersection'](_0x2097c6[_0x5f0a('0x2d')],_0x2097c6[_0x5f0a('0x2e')]);_0x4d2d86['attributes']=_[_0x5f0a('0x31')](_0x2097c6[_0x5f0a('0x2d')],qs[_0x5f0a('0x32')](_0x446ccd[_0x5f0a('0x2e')][_0x5f0a('0x32')]));_0x4d2d86[_0x5f0a('0x33')]=_0x4d2d86[_0x5f0a('0x33')]['length']?_0x4d2d86['attributes']:_0x2097c6['model'];if(!_0x446ccd['query'][_0x5f0a('0x34')](_0x5f0a('0x35'))){_0x4d2d86[_0x5f0a('0x1d')]=qs[_0x5f0a('0x1d')](_0x446ccd[_0x5f0a('0x2e')][_0x5f0a('0x1d')]);_0x4d2d86[_0x5f0a('0x1b')]=qs['offset'](_0x446ccd[_0x5f0a('0x2e')][_0x5f0a('0x1b')]);}_0x4d2d86[_0x5f0a('0x36')]=qs[_0x5f0a('0x37')](_0x446ccd[_0x5f0a('0x2e')][_0x5f0a('0x37')]);_0x4d2d86[_0x5f0a('0x38')]=qs[_0x5f0a('0x30')](_[_0x5f0a('0x39')](_0x446ccd[_0x5f0a('0x2e')],_0x2097c6['filters']),_0x4e639c);if(_0x446ccd['query'][_0x5f0a('0x3a')]){_0x4d2d86[_0x5f0a('0x38')]=_[_0x5f0a('0x3b')](_0x4d2d86['where'],{'$or':_['map'](_0x4e639c,function(_0x380367){if(_0x380367[_0x5f0a('0x3c')]!==_0x5f0a('0x3d')){var _0x45dc34={};_0x45dc34[_0x380367[_0x5f0a('0x3e')]]={'$like':'%'+_0x446ccd[_0x5f0a('0x2e')]['filter']+'%'};return _0x45dc34;}})});}_0x4d2d86=_[_0x5f0a('0x3b')]({},_0x4d2d86,_0x446ccd[_0x5f0a('0x3f')]);var _0xc83c79={'where':_0x4d2d86[_0x5f0a('0x38')]};return db['Attachment'][_0x5f0a('0x1e')](_0xc83c79)[_0x5f0a('0x22')](function(_0x50912f){_0x22a798['count']=_0x50912f;if(_0x446ccd['query'][_0x5f0a('0x40')]){_0x4d2d86['include']=[{'all':!![]}];}return db[_0x5f0a('0x41')][_0x5f0a('0x42')](_0x4d2d86);})[_0x5f0a('0x22')](function(_0x365d7a){_0x22a798[_0x5f0a('0x43')]=_0x365d7a;return _0x22a798;})['then'](respondWithFilteredResult(_0x22658e,_0x4d2d86))['catch'](handleError(_0x22658e,null));};exports['show']=function(_0x1fb3a0,_0x49d2ee){var _0x3ba569={'raw':!![],'where':{'id':_0x1fb3a0['params']['id']}},_0x5aa0de={};_0x5aa0de[_0x5f0a('0x2d')]=_[_0x5f0a('0x2f')](db[_0x5f0a('0x41')][_0x5f0a('0x2a')]);_0x5aa0de['query']=_[_0x5f0a('0x2f')](_0x1fb3a0[_0x5f0a('0x2e')]);_0x5aa0de[_0x5f0a('0x30')]=_[_0x5f0a('0x31')](_0x5aa0de[_0x5f0a('0x2d')],_0x5aa0de[_0x5f0a('0x2e')]);_0x3ba569[_0x5f0a('0x33')]=_[_0x5f0a('0x31')](_0x5aa0de['model'],qs[_0x5f0a('0x32')](_0x1fb3a0[_0x5f0a('0x2e')]['fields']));_0x3ba569[_0x5f0a('0x33')]=_0x3ba569['attributes']['length']?_0x3ba569[_0x5f0a('0x33')]:_0x5aa0de['model'];if(_0x1fb3a0[_0x5f0a('0x2e')][_0x5f0a('0x40')]){_0x3ba569[_0x5f0a('0x44')]=[{'all':!![]}];}_0x3ba569=_['merge']({},_0x3ba569,_0x1fb3a0[_0x5f0a('0x3f')]);return db[_0x5f0a('0x41')][_0x5f0a('0x45')](_0x3ba569)['then'](handleEntityNotFound(_0x49d2ee,null))[_0x5f0a('0x22')](respondWithResult(_0x49d2ee,null))[_0x5f0a('0x46')](handleError(_0x49d2ee,null));};exports[_0x5f0a('0x47')]=function(_0x4dc091,_0x33ed4b){var _0x5734fc={'where':{'id':_0x4dc091[_0x5f0a('0x48')]['id']}},_0x46c6be={};_0x46c6be[_0x5f0a('0x2d')]=_[_0x5f0a('0x2f')](db['Attachment'][_0x5f0a('0x2a')]);_0x5734fc[_0x5f0a('0x33')]=_['intersection'](_0x46c6be[_0x5f0a('0x2d')],qs[_0x5f0a('0x32')](_0x4dc091['query'][_0x5f0a('0x32')]));_0x5734fc[_0x5f0a('0x33')]=_0x5734fc[_0x5f0a('0x33')][_0x5f0a('0x49')]?_0x5734fc['attributes']:_0x46c6be[_0x5f0a('0x2d')];if(_0x4dc091[_0x5f0a('0x2e')]['includeAll']){_0x5734fc[_0x5f0a('0x44')]=[{'all':!![]}];}_0x5734fc=_[_0x5f0a('0x3b')]({},_0x5734fc,_0x4dc091[_0x5f0a('0x3f')]);return db[_0x5f0a('0x41')][_0x5f0a('0x45')](_0x5734fc)['then'](handleEntityNotFound(_0x33ed4b,null))['then'](function(_0x3bd637){if(_0x3bd637){var _0x42e274=_0x3bd637[_0x5f0a('0x4a')]({'plain':!![]});_0x42e274=qs[_0x5f0a('0x4b')](_0x42e274,['id',_0x5f0a('0x4c'),_0x5f0a('0x4d')]);_0x4dc091[_0x5f0a('0x4e')]=_[_0x5f0a('0x4b')](_0x4dc091[_0x5f0a('0x4e')],['id',_0x5f0a('0x4c'),_0x5f0a('0x4d')]);return db['Attachment'][_0x5f0a('0x4f')](_[_0x5f0a('0x3b')](_0x42e274,_0x4dc091[_0x5f0a('0x4e')]),{'include':_0x4dc091['query'][_0x5f0a('0x40')]?[{'all':!![]}]:undefined});}})[_0x5f0a('0x22')](respondWithResult(_0x33ed4b,0xc9))[_0x5f0a('0x46')](handleError(_0x33ed4b,null));};exports[_0x5f0a('0x21')]=function(_0x271080,_0x1d83bf){if(_0x271080[_0x5f0a('0x4e')]['id']){delete _0x271080['body']['id'];}return db[_0x5f0a('0x41')][_0x5f0a('0x45')]({'where':{'id':_0x271080['params']['id']}})[_0x5f0a('0x22')](handleEntityNotFound(_0x1d83bf,null))[_0x5f0a('0x22')](saveUpdates(_0x271080[_0x5f0a('0x4e')],null))[_0x5f0a('0x22')](respondWithResult(_0x1d83bf,null))[_0x5f0a('0x46')](handleError(_0x1d83bf,null));};exports[_0x5f0a('0x23')]=function(_0x57ef3d,_0x3c2cbd){return db[_0x5f0a('0x41')][_0x5f0a('0x45')]({'where':{'id':_0x57ef3d[_0x5f0a('0x48')]['id']}})[_0x5f0a('0x22')](handleEntityNotFound(_0x3c2cbd,null))[_0x5f0a('0x22')](removeEntity(_0x3c2cbd,null))[_0x5f0a('0x46')](handleError(_0x3c2cbd,null));};exports[_0x5f0a('0x4f')]=function(_0x43504c,_0x4c6121,_0x35f15a){_0x43504c[_0x5f0a('0x4e')][_0x5f0a('0x3e')]=_0x43504c['file'][_0x5f0a('0x50')];_0x43504c[_0x5f0a('0x4e')]['basename']=_0x43504c[_0x5f0a('0x51')]['filename'];_0x43504c[_0x5f0a('0x4e')]['type']=_0x43504c[_0x5f0a('0x51')][_0x5f0a('0x52')];return db[_0x5f0a('0x41')]['create'](_0x43504c['body'])['then'](respondWithResult(_0x4c6121,0xc9))[_0x5f0a('0x46')](handleError(_0x4c6121,null));};exports[_0x5f0a('0x53')]=function(_0x50bbd9,_0x2faf92,_0x265200){return db[_0x5f0a('0x41')][_0x5f0a('0x54')]({'where':{'id':_0x50bbd9[_0x5f0a('0x48')]['id']},'raw':!![]})[_0x5f0a('0x22')](handleEntityNotFound(_0x2faf92,null))['then'](function(_0x511c3e){if(_0x511c3e){var _0x169bd6=_0x511c3e[_0x5f0a('0x55')]!==null;var _0x3856f9=path[_0x5f0a('0x56')](config[_0x5f0a('0x57')],_0x5f0a('0x58'));if(_0x169bd6){_0x3856f9=path[_0x5f0a('0x56')](_0x3856f9,_0x5f0a('0x59'));}var _0x3ec80b=path[_0x5f0a('0x56')](_0x3856f9,_0x511c3e[_0x5f0a('0x5a')]);return _0x2faf92[_0x5f0a('0x53')](_0x3ec80b);}})['catch'](handleError(_0x2faf92,null));};
\ No newline at end of file
+var _0x1252=['join','root','offline-chat/','eml-format','rimraf','fast-json-patch','request-promise','util','sox','to-csv','fs-extra','lodash','squel','jsforce','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','limit','set','Content-Range','apply','update','then','destroy','stack','name','send','index','map','Attachment','type','key','query','intersection','model','attributes','fields','hasOwnProperty','order','sort','where','filters','pick','merge','VIRTUAL','filter','options','includeAll','rows','catch','show','params','keys','rawAttributes','length','include','find','clone','get','createdAt','updatedAt','body','create','originalname','basename','file','filename','mimetype','download','ChatOfflineMessageId'];(function(_0x13404a,_0xd9ad06){var _0x161d49=function(_0x5b23fd){while(--_0x5b23fd){_0x13404a['push'](_0x13404a['shift']());}};_0x161d49(++_0xd9ad06);}(_0x1252,0xad));var _0x2125=function(_0x39274b,_0x12b5f2){_0x39274b=_0x39274b-0x0;var _0x3937e3=_0x1252[_0x39274b];return _0x3937e3;};'use strict';var emlformat=require(_0x2125('0x0'));var rimraf=require(_0x2125('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x2125('0x2'));var rp=require(_0x2125('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x2125('0x4'));var path=require('path');var sox=require(_0x2125('0x5'));var csv=require(_0x2125('0x6'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x2125('0x7'));var _=require(_0x2125('0x8'));var squel=require(_0x2125('0x9'));var crypto=require('crypto');var jsforce=require(_0x2125('0xa'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x2125('0xb'));var Papa=require(_0x2125('0xc'));var Redis=require(_0x2125('0xd'));var authService=require(_0x2125('0xe'));var qs=require(_0x2125('0xf'));var as=require(_0x2125('0x10'));var hardwareService=require(_0x2125('0x11'));var logger=require(_0x2125('0x12'))(_0x2125('0x13'));var utils=require(_0x2125('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0x2125('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x22644c,_0x5f0050){_0x5f0050=_0x5f0050||0xcc;return function(_0x276644){if(_0x276644){return _0x22644c[_0x2125('0x16')](_0x5f0050);}return _0x22644c[_0x2125('0x17')](_0x5f0050)[_0x2125('0x18')]();};}function respondWithResult(_0x51ed45,_0xa68514){_0xa68514=_0xa68514||0xc8;return function(_0x382cc7){if(_0x382cc7){return _0x51ed45[_0x2125('0x17')](_0xa68514)[_0x2125('0x19')](_0x382cc7);}};}function respondWithFilteredResult(_0x29ac6e,_0x15c402){return function(_0x1c9ca2){if(_0x1c9ca2){var _0x18cf3d=typeof _0x15c402[_0x2125('0x1a')]===_0x2125('0x1b')&&typeof _0x15c402['limit']===_0x2125('0x1b');var _0x10e451=_0x1c9ca2['count'];var _0x682f4f=_0x18cf3d?0x0:_0x15c402[_0x2125('0x1a')];var _0x11bead=_0x18cf3d?_0x1c9ca2[_0x2125('0x1c')]:_0x15c402[_0x2125('0x1a')]+_0x15c402[_0x2125('0x1d')];var _0x1a9950;if(_0x11bead>=_0x10e451){_0x11bead=_0x10e451;_0x1a9950=0xc8;}else{_0x1a9950=0xce;}_0x29ac6e['status'](_0x1a9950);return _0x29ac6e[_0x2125('0x1e')](_0x2125('0x1f'),_0x682f4f+'-'+_0x11bead+'/'+_0x10e451)[_0x2125('0x19')](_0x1c9ca2);}return null;};}function patchUpdates(_0x3c8485){return function(_0x3e8e3f){try{jsonpatch[_0x2125('0x20')](_0x3e8e3f,_0x3c8485,!![]);}catch(_0x536f15){return BPromise['reject'](_0x536f15);}return _0x3e8e3f['save']();};}function saveUpdates(_0x26a64e,_0x36ca27){return function(_0x426df7){if(_0x426df7){return _0x426df7[_0x2125('0x21')](_0x26a64e)[_0x2125('0x22')](function(_0x27ec44){return _0x27ec44;});}return null;};}function removeEntity(_0x180a13,_0x41eb26){return function(_0x3a34f5){if(_0x3a34f5){return _0x3a34f5[_0x2125('0x23')]()[_0x2125('0x22')](function(){_0x180a13[_0x2125('0x17')](0xcc)[_0x2125('0x18')]();});}};}function handleEntityNotFound(_0x38c1c7,_0x3bb106){return function(_0x1165d3){if(!_0x1165d3){_0x38c1c7[_0x2125('0x16')](0x194);}return _0x1165d3;};}function handleError(_0x1a3b86,_0x53fc43){_0x53fc43=_0x53fc43||0x1f4;return function(_0x1e13c7){logger['error'](_0x1e13c7[_0x2125('0x24')]);if(_0x1e13c7[_0x2125('0x25')]){delete _0x1e13c7['name'];}_0x1a3b86['status'](_0x53fc43)[_0x2125('0x26')](_0x1e13c7);};}exports[_0x2125('0x27')]=function(_0x4add28,_0xab52d3){var _0x16748a={},_0x4d0c45={},_0x50cc4b={'count':0x0,'rows':[]};var _0x74177b=_[_0x2125('0x28')](db[_0x2125('0x29')]['rawAttributes'],function(_0x35106f){return{'name':_0x35106f['fieldName'],'type':_0x35106f[_0x2125('0x2a')][_0x2125('0x2b')]};});_0x4d0c45['model']=_['map'](_0x74177b,_0x2125('0x25'));_0x4d0c45[_0x2125('0x2c')]=_['keys'](_0x4add28['query']);_0x4d0c45['filters']=_[_0x2125('0x2d')](_0x4d0c45[_0x2125('0x2e')],_0x4d0c45[_0x2125('0x2c')]);_0x16748a[_0x2125('0x2f')]=_['intersection'](_0x4d0c45['model'],qs[_0x2125('0x30')](_0x4add28[_0x2125('0x2c')][_0x2125('0x30')]));_0x16748a[_0x2125('0x2f')]=_0x16748a[_0x2125('0x2f')]['length']?_0x16748a['attributes']:_0x4d0c45[_0x2125('0x2e')];if(!_0x4add28[_0x2125('0x2c')][_0x2125('0x31')]('nolimit')){_0x16748a[_0x2125('0x1d')]=qs[_0x2125('0x1d')](_0x4add28['query'][_0x2125('0x1d')]);_0x16748a[_0x2125('0x1a')]=qs[_0x2125('0x1a')](_0x4add28[_0x2125('0x2c')][_0x2125('0x1a')]);}_0x16748a[_0x2125('0x32')]=qs[_0x2125('0x33')](_0x4add28[_0x2125('0x2c')][_0x2125('0x33')]);_0x16748a[_0x2125('0x34')]=qs[_0x2125('0x35')](_[_0x2125('0x36')](_0x4add28[_0x2125('0x2c')],_0x4d0c45[_0x2125('0x35')]),_0x74177b);if(_0x4add28['query']['filter']){_0x16748a[_0x2125('0x34')]=_[_0x2125('0x37')](_0x16748a[_0x2125('0x34')],{'$or':_[_0x2125('0x28')](_0x74177b,function(_0x330859){if(_0x330859['type']!==_0x2125('0x38')){var _0x55927e={};_0x55927e[_0x330859[_0x2125('0x25')]]={'$like':'%'+_0x4add28[_0x2125('0x2c')][_0x2125('0x39')]+'%'};return _0x55927e;}})});}_0x16748a=_[_0x2125('0x37')]({},_0x16748a,_0x4add28[_0x2125('0x3a')]);var _0x5620cc={'where':_0x16748a[_0x2125('0x34')]};return db['Attachment'][_0x2125('0x1c')](_0x5620cc)['then'](function(_0x2b8a9c){_0x50cc4b[_0x2125('0x1c')]=_0x2b8a9c;if(_0x4add28[_0x2125('0x2c')][_0x2125('0x3b')]){_0x16748a['include']=[{'all':!![]}];}return db[_0x2125('0x29')]['findAll'](_0x16748a);})['then'](function(_0x170c1e){_0x50cc4b[_0x2125('0x3c')]=_0x170c1e;return _0x50cc4b;})['then'](respondWithFilteredResult(_0xab52d3,_0x16748a))[_0x2125('0x3d')](handleError(_0xab52d3,null));};exports[_0x2125('0x3e')]=function(_0x38479b,_0x51985a){var _0x245657={'raw':!![],'where':{'id':_0x38479b[_0x2125('0x3f')]['id']}},_0x25017d={};_0x25017d['model']=_[_0x2125('0x40')](db[_0x2125('0x29')][_0x2125('0x41')]);_0x25017d[_0x2125('0x2c')]=_[_0x2125('0x40')](_0x38479b[_0x2125('0x2c')]);_0x25017d[_0x2125('0x35')]=_[_0x2125('0x2d')](_0x25017d[_0x2125('0x2e')],_0x25017d['query']);_0x245657[_0x2125('0x2f')]=_[_0x2125('0x2d')](_0x25017d[_0x2125('0x2e')],qs[_0x2125('0x30')](_0x38479b[_0x2125('0x2c')][_0x2125('0x30')]));_0x245657['attributes']=_0x245657['attributes'][_0x2125('0x42')]?_0x245657[_0x2125('0x2f')]:_0x25017d[_0x2125('0x2e')];if(_0x38479b[_0x2125('0x2c')][_0x2125('0x3b')]){_0x245657[_0x2125('0x43')]=[{'all':!![]}];}_0x245657=_['merge']({},_0x245657,_0x38479b[_0x2125('0x3a')]);return db[_0x2125('0x29')][_0x2125('0x44')](_0x245657)[_0x2125('0x22')](handleEntityNotFound(_0x51985a,null))[_0x2125('0x22')](respondWithResult(_0x51985a,null))[_0x2125('0x3d')](handleError(_0x51985a,null));};exports[_0x2125('0x45')]=function(_0x406b8d,_0x56f8e3){var _0xec678b={'where':{'id':_0x406b8d['params']['id']}},_0x29d66b={};_0x29d66b[_0x2125('0x2e')]=_[_0x2125('0x40')](db[_0x2125('0x29')]['rawAttributes']);_0xec678b[_0x2125('0x2f')]=_[_0x2125('0x2d')](_0x29d66b[_0x2125('0x2e')],qs[_0x2125('0x30')](_0x406b8d[_0x2125('0x2c')][_0x2125('0x30')]));_0xec678b[_0x2125('0x2f')]=_0xec678b['attributes']['length']?_0xec678b['attributes']:_0x29d66b[_0x2125('0x2e')];if(_0x406b8d['query']['includeAll']){_0xec678b[_0x2125('0x43')]=[{'all':!![]}];}_0xec678b=_[_0x2125('0x37')]({},_0xec678b,_0x406b8d[_0x2125('0x3a')]);return db['Attachment'][_0x2125('0x44')](_0xec678b)[_0x2125('0x22')](handleEntityNotFound(_0x56f8e3,null))[_0x2125('0x22')](function(_0x419a2a){if(_0x419a2a){var _0x1f4f27=_0x419a2a[_0x2125('0x46')]({'plain':!![]});_0x1f4f27=qs['omit'](_0x1f4f27,['id',_0x2125('0x47'),_0x2125('0x48')]);_0x406b8d[_0x2125('0x49')]=_['omit'](_0x406b8d[_0x2125('0x49')],['id','createdAt','updatedAt']);return db[_0x2125('0x29')]['create'](_[_0x2125('0x37')](_0x1f4f27,_0x406b8d[_0x2125('0x49')]),{'include':_0x406b8d['query'][_0x2125('0x3b')]?[{'all':!![]}]:undefined});}})[_0x2125('0x22')](respondWithResult(_0x56f8e3,0xc9))[_0x2125('0x3d')](handleError(_0x56f8e3,null));};exports['update']=function(_0x5c3e60,_0x58d50b){if(_0x5c3e60[_0x2125('0x49')]['id']){delete _0x5c3e60[_0x2125('0x49')]['id'];}return db[_0x2125('0x29')][_0x2125('0x44')]({'where':{'id':_0x5c3e60['params']['id']}})['then'](handleEntityNotFound(_0x58d50b,null))['then'](saveUpdates(_0x5c3e60[_0x2125('0x49')],null))['then'](respondWithResult(_0x58d50b,null))[_0x2125('0x3d')](handleError(_0x58d50b,null));};exports[_0x2125('0x23')]=function(_0x4c4937,_0x35bb50){return db[_0x2125('0x29')][_0x2125('0x44')]({'where':{'id':_0x4c4937[_0x2125('0x3f')]['id']}})[_0x2125('0x22')](handleEntityNotFound(_0x35bb50,null))[_0x2125('0x22')](removeEntity(_0x35bb50,null))[_0x2125('0x3d')](handleError(_0x35bb50,null));};exports[_0x2125('0x4a')]=function(_0x70a032,_0xeb16ed,_0x2ff664){_0x70a032['body'][_0x2125('0x25')]=_0x70a032['file'][_0x2125('0x4b')];_0x70a032[_0x2125('0x49')][_0x2125('0x4c')]=_0x70a032[_0x2125('0x4d')][_0x2125('0x4e')];_0x70a032['body']['type']=_0x70a032['file'][_0x2125('0x4f')];return db[_0x2125('0x29')]['create'](_0x70a032[_0x2125('0x49')])['then'](respondWithResult(_0xeb16ed,0xc9))['catch'](handleError(_0xeb16ed,null));};exports[_0x2125('0x50')]=function(_0x3491c8,_0x2ab006,_0x29e33b){return db[_0x2125('0x29')]['findOne']({'where':{'id':_0x3491c8[_0x2125('0x3f')]['id']},'raw':!![]})[_0x2125('0x22')](handleEntityNotFound(_0x2ab006,null))['then'](function(_0x4484ac){if(_0x4484ac){var _0x37e7ef=_0x4484ac[_0x2125('0x51')]!==null;var _0x7e03b4=path[_0x2125('0x52')](config[_0x2125('0x53')],'server/files/attachments/');if(_0x37e7ef){_0x7e03b4=path['join'](_0x7e03b4,_0x2125('0x54'));}var _0x5b15bf=path[_0x2125('0x52')](_0x7e03b4,_0x4484ac[_0x2125('0x4c')]);return _0x2ab006[_0x2125('0x50')](_0x5b15bf);}})[_0x2125('0x3d')](handleError(_0x2ab006,null));};
\ No newline at end of file
diff --git a/server/api/attachment/attachment.model.js b/server/api/attachment/attachment.model.js
index 513373e..ec05315 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 _0x22a2=['request-promise','rimraf','../../config/environment','./attachment.attributes','define','Attachment','attachments','lodash','util','../../config/logger','api'];(function(_0x4342a4,_0x364d50){var _0x290d36=function(_0x572a41){while(--_0x572a41){_0x4342a4['push'](_0x4342a4['shift']());}};_0x290d36(++_0x364d50);}(_0x22a2,0x13b));var _0x222a=function(_0x560638,_0x55cb9c){_0x560638=_0x560638-0x0;var _0x23b648=_0x22a2[_0x560638];return _0x23b648;};'use strict';var _=require(_0x222a('0x0'));var util=require(_0x222a('0x1'));var logger=require(_0x222a('0x2'))(_0x222a('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x222a('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x222a('0x5'));var config=require(_0x222a('0x6'));var attributes=require(_0x222a('0x7'));module['exports']=function(_0x53ae35,_0x301c80){return _0x53ae35[_0x222a('0x8')](_0x222a('0x9'),attributes,{'tableName':_0x222a('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x793a=['./attachment.attributes','define','request-promise','path','../../config/environment'];(function(_0x53bb41,_0x9c0c36){var _0x59ea07=function(_0x2db917){while(--_0x2db917){_0x53bb41['push'](_0x53bb41['shift']());}};_0x59ea07(++_0x9c0c36);}(_0x793a,0xf7));var _0xa793=function(_0xa91f3d,_0x438596){_0xa91f3d=_0xa91f3d-0x0;var _0x1b31c4=_0x793a[_0xa91f3d];return _0x1b31c4;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xa793('0x0'));var fs=require('fs');var path=require(_0xa793('0x1'));var rimraf=require('rimraf');var config=require(_0xa793('0x2'));var attributes=require(_0xa793('0x3'));module['exports']=function(_0x5b9aad,_0x31d194){return _0x5b9aad[_0xa793('0x4')]('Attachment',attributes,{'tableName':'attachments','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 dcddd76..55dc906 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 _0x26bc=['Attachment','create','body','options','raw','CreateAttachment','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','request','then','info','Attachment,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch'];(function(_0x134b7d,_0x4377fb){var _0x12d5e1=function(_0x5a4569){while(--_0x5a4569){_0x134b7d['push'](_0x134b7d['shift']());}};_0x12d5e1(++_0x4377fb);}(_0x26bc,0x162));var _0xc26b=function(_0x39843a,_0xf6ddc1){_0x39843a=_0x39843a-0x0;var _0x581f65=_0x26bc[_0x39843a];return _0x581f65;};'use strict';var _=require(_0xc26b('0x0'));var util=require(_0xc26b('0x1'));var moment=require(_0xc26b('0x2'));var BPromise=require(_0xc26b('0x3'));var rs=require(_0xc26b('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xc26b('0x5'))['db'];var utils=require(_0xc26b('0x6'));var logger=require(_0xc26b('0x7'))('rpc');var config=require(_0xc26b('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xc26b('0x9')][_0xc26b('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x13d90e,_0x5c2f6f,_0x11c6f5){return new BPromise(function(_0x453491,_0x465c89){return client[_0xc26b('0xb')](_0x13d90e,_0x11c6f5)[_0xc26b('0xc')](function(_0x1fb2b5){logger[_0xc26b('0xd')](_0xc26b('0xe'),_0x5c2f6f,_0xc26b('0xf'));logger[_0xc26b('0x10')]('Attachment,\x20%s,\x20%s,\x20%s',_0x5c2f6f,_0xc26b('0xf'),JSON[_0xc26b('0x11')](_0x1fb2b5));if(_0x1fb2b5[_0xc26b('0x12')]){if(_0x1fb2b5[_0xc26b('0x12')][_0xc26b('0x13')]===0x1f4){logger[_0xc26b('0x12')]('Attachment,\x20%s,\x20%s',_0x5c2f6f,_0x1fb2b5[_0xc26b('0x12')]['message']);return _0x465c89(_0x1fb2b5['error'][_0xc26b('0x14')]);}logger[_0xc26b('0x12')](_0xc26b('0xe'),_0x5c2f6f,_0x1fb2b5[_0xc26b('0x12')]['message']);return _0x453491(_0x1fb2b5[_0xc26b('0x12')][_0xc26b('0x14')]);}else{logger[_0xc26b('0xd')](_0xc26b('0xe'),_0x5c2f6f,_0xc26b('0xf'));_0x453491(_0x1fb2b5[_0xc26b('0x15')]['message']);}})[_0xc26b('0x16')](function(_0x2713f6){logger['error'](_0xc26b('0xe'),_0x5c2f6f,_0x2713f6);_0x465c89(_0x2713f6);});});}exports['CreateAttachment']=function(_0x4802c7){var _0x7e6ed0=this;return new Promise(function(_0x47e75b,_0x47104f){return db[_0xc26b('0x17')][_0xc26b('0x18')](_0x4802c7[_0xc26b('0x19')],{'raw':_0x4802c7['options']?_0x4802c7[_0xc26b('0x1a')][_0xc26b('0x1b')]===undefined?!![]:![]:!![]})[_0xc26b('0xc')](function(_0x8531d6){logger[_0xc26b('0xd')](_0xc26b('0x1c'),_0x4802c7);logger['debug'](_0xc26b('0x1c'),_0x4802c7,JSON['stringify'](_0x8531d6));_0x47e75b(_0x8531d6);})[_0xc26b('0x16')](function(_0x129080){logger[_0xc26b('0x12')](_0xc26b('0x1c'),_0x129080['message'],_0x4802c7);_0x47104f(_0x7e6ed0[_0xc26b('0x12')](0x1f4,_0x129080[_0xc26b('0x14')]));});});};
\ No newline at end of file
+var _0x430e=['stringify','error','message','catch','CreateAttachment','create','body','options','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','then','info','Attachment,\x20%s,\x20%s','request\x20sent','Attachment,\x20%s,\x20%s,\x20%s'];(function(_0x598d80,_0x32ff47){var _0x309a43=function(_0x2e5a6b){while(--_0x2e5a6b){_0x598d80['push'](_0x598d80['shift']());}};_0x309a43(++_0x32ff47);}(_0x430e,0x105));var _0xe430=function(_0x59f0ff,_0x2b9d67){_0x59f0ff=_0x59f0ff-0x0;var _0x28e782=_0x430e[_0x59f0ff];return _0x28e782;};'use strict';var _=require('lodash');var util=require(_0xe430('0x0'));var moment=require(_0xe430('0x1'));var BPromise=require('bluebird');var rs=require(_0xe430('0x2'));var fs=require('fs');var Redis=require(_0xe430('0x3'));var db=require(_0xe430('0x4'))['db'];var utils=require(_0xe430('0x5'));var logger=require('../../config/logger')(_0xe430('0x6'));var config=require(_0xe430('0x7'));var jayson=require(_0xe430('0x8'));var client=jayson[_0xe430('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1d2365,_0x310e0a,_0xf866f4){return new BPromise(function(_0x2bd109,_0xc558e2){return client['request'](_0x1d2365,_0xf866f4)[_0xe430('0xa')](function(_0x2068d8){logger[_0xe430('0xb')](_0xe430('0xc'),_0x310e0a,_0xe430('0xd'));logger['debug'](_0xe430('0xe'),_0x310e0a,_0xe430('0xd'),JSON[_0xe430('0xf')](_0x2068d8));if(_0x2068d8[_0xe430('0x10')]){if(_0x2068d8[_0xe430('0x10')]['code']===0x1f4){logger[_0xe430('0x10')]('Attachment,\x20%s,\x20%s',_0x310e0a,_0x2068d8['error'][_0xe430('0x11')]);return _0xc558e2(_0x2068d8[_0xe430('0x10')][_0xe430('0x11')]);}logger[_0xe430('0x10')](_0xe430('0xc'),_0x310e0a,_0x2068d8[_0xe430('0x10')][_0xe430('0x11')]);return _0x2bd109(_0x2068d8['error'][_0xe430('0x11')]);}else{logger[_0xe430('0xb')](_0xe430('0xc'),_0x310e0a,_0xe430('0xd'));_0x2bd109(_0x2068d8['result']['message']);}})[_0xe430('0x12')](function(_0x5ace8d){logger['error'](_0xe430('0xc'),_0x310e0a,_0x5ace8d);_0xc558e2(_0x5ace8d);});});}exports[_0xe430('0x13')]=function(_0x1e36f9){var _0x6e529b=this;return new Promise(function(_0x161575,_0x4c7b21){return db['Attachment'][_0xe430('0x14')](_0x1e36f9[_0xe430('0x15')],{'raw':_0x1e36f9[_0xe430('0x16')]?_0x1e36f9['options']['raw']===undefined?!![]:![]:!![]})['then'](function(_0x167c65){logger[_0xe430('0xb')](_0xe430('0x13'),_0x1e36f9);logger['debug'](_0xe430('0x13'),_0x1e36f9,JSON['stringify'](_0x167c65));_0x161575(_0x167c65);})['catch'](function(_0x2d7f76){logger[_0xe430('0x10')]('CreateAttachment',_0x2d7f76[_0xe430('0x11')],_0x1e36f9);_0x4c7b21(_0x6e529b['error'](0x1f4,_0x2d7f76['message']));});});};
\ No newline at end of file
diff --git a/server/api/attachment/index.js b/server/api/attachment/index.js
index 6b9e8bd..5e1a4f9 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 _0xdb28=['path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/:id','show','/:id/download','download','/:id/clone','clone','join','root','server/files/attachments/','%s-%s','now','originalname','replace','post','single','file','create','put','update','delete','destroy','exports','multer','util'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0xdb28,0x106));var _0x8db2=function(_0x4dbe30,_0x1451e1){_0x4dbe30=_0x4dbe30-0x0;var _0x53f0fa=_0xdb28[_0x4dbe30];return _0x53f0fa;};'use strict';var multer=require(_0x8db2('0x0'));var util=require(_0x8db2('0x1'));var path=require(_0x8db2('0x2'));var timeout=require(_0x8db2('0x3'));var express=require('express');var router=express[_0x8db2('0x4')]();var fs_extra=require(_0x8db2('0x5'));var auth=require(_0x8db2('0x6'));var interaction=require(_0x8db2('0x7'));var config=require(_0x8db2('0x8'));var controller=require('./attachment.controller');router[_0x8db2('0x9')]('/',auth[_0x8db2('0xa')](),controller['index']);router['get'](_0x8db2('0xb'),auth[_0x8db2('0xa')](),controller[_0x8db2('0xc')]);router[_0x8db2('0x9')](_0x8db2('0xd'),auth[_0x8db2('0xa')](),controller[_0x8db2('0xe')]);router['post'](_0x8db2('0xf'),auth[_0x8db2('0xa')](),controller[_0x8db2('0x10')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1d9371,_0x150942,_0x576475){_0x576475(null,path[_0x8db2('0x11')](config[_0x8db2('0x12')],_0x8db2('0x13')));},'filename':function(_0x204f49,_0x37d017,_0x559fb1){_0x559fb1(null,util['format'](_0x8db2('0x14'),Date[_0x8db2('0x15')](),_0x37d017[_0x8db2('0x16')][_0x8db2('0x17')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x8db2('0x18')]('/',upload[_0x8db2('0x19')](_0x8db2('0x1a')),controller[_0x8db2('0x1b')]);router[_0x8db2('0x1c')](_0x8db2('0xb'),auth['isAuthenticated'](),controller[_0x8db2('0x1d')]);router[_0x8db2('0x1e')]('/:id',auth[_0x8db2('0xa')](),controller[_0x8db2('0x1f')]);module[_0x8db2('0x20')]=router;
\ No newline at end of file
+var _0x2032=['./attachment.controller','get','isAuthenticated','index','/:id','show','download','/:id/clone','clone','root','server/files/attachments/','now','post','single','file','create','put','update','delete','destroy','exports','util','path','connect-timeout','Router','fs-extra','../../components/interaction/service','../../config/environment'];(function(_0x1ad710,_0x3dd4b1){var _0x2c3d41=function(_0x43be25){while(--_0x43be25){_0x1ad710['push'](_0x1ad710['shift']());}};_0x2c3d41(++_0x3dd4b1);}(_0x2032,0xd9));var _0x2203=function(_0x507ba1,_0x25be61){_0x507ba1=_0x507ba1-0x0;var _0x4fdf96=_0x2032[_0x507ba1];return _0x4fdf96;};'use strict';var multer=require('multer');var util=require(_0x2203('0x0'));var path=require(_0x2203('0x1'));var timeout=require(_0x2203('0x2'));var express=require('express');var router=express[_0x2203('0x3')]();var fs_extra=require(_0x2203('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x2203('0x5'));var config=require(_0x2203('0x6'));var controller=require(_0x2203('0x7'));router[_0x2203('0x8')]('/',auth[_0x2203('0x9')](),controller[_0x2203('0xa')]);router[_0x2203('0x8')](_0x2203('0xb'),auth[_0x2203('0x9')](),controller[_0x2203('0xc')]);router[_0x2203('0x8')]('/:id/download',auth['isAuthenticated'](),controller[_0x2203('0xd')]);router['post'](_0x2203('0xe'),auth[_0x2203('0x9')](),controller[_0x2203('0xf')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x849049,_0x4a6832,_0x3f690a){_0x3f690a(null,path['join'](config[_0x2203('0x10')],_0x2203('0x11')));},'filename':function(_0x4b9376,_0x583bc7,_0x585c76){_0x585c76(null,util['format']('%s-%s',Date[_0x2203('0x12')](),_0x583bc7['originalname']['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x2203('0x13')]('/',upload[_0x2203('0x14')](_0x2203('0x15')),controller[_0x2203('0x16')]);router[_0x2203('0x17')](_0x2203('0xb'),auth[_0x2203('0x9')](),controller[_0x2203('0x18')]);router[_0x2203('0x19')](_0x2203('0xb'),auth['isAuthenticated'](),controller[_0x2203('0x1a')]);module[_0x2203('0x1b')]=router;
\ No newline at end of file
diff --git a/server/api/authActiveDirectory/authActiveDirectory.controller.js b/server/api/authActiveDirectory/authActiveDirectory.controller.js
index ca2b5c0..175e4c2 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 _0x7de8=['blockDuration','then','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20enabled','findOne','name','password','role','blocked','online','user','agent','disabled','blockedAt','add','minutes','getLicense','catch','send','message','login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','json','ad-login','User','passport','passport-local','Strategy','moment','bluebird','util','../../components/auth/service','../../config/environment','../../config/logger','api','activedirectory','undefined','baseDN','domain','authenticate','Error\x20authenticate\x20%s:\x20%s','error','Error\x20authenticate\x20%s:\x20Wrong\x20credentials','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20configured','Setting','adSsoEnabled'];(function(_0x4f222e,_0x3cbb57){var _0x13afac=function(_0x215cad){while(--_0x215cad){_0x4f222e['push'](_0x4f222e['shift']());}};_0x13afac(++_0x3cbb57);}(_0x7de8,0x133));var _0x87de=function(_0x2b67b8,_0xb562d0){_0x2b67b8=_0x2b67b8-0x0;var _0x448d4c=_0x7de8[_0x2b67b8];return _0x448d4c;};'use strict';var passport=require(_0x87de('0x0'));var LocalStrategy=require(_0x87de('0x1'))[_0x87de('0x2')];var moment=require(_0x87de('0x3'));var ActiveDirectory=require('activedirectory2');var BPromise=require(_0x87de('0x4'));var util=require(_0x87de('0x5'));var db=require('../../mysqldb')['db'];var authService=require(_0x87de('0x6'));var utils=require('../../config/utils');var config=require(_0x87de('0x7'));var logger=require(_0x87de('0x8'))(_0x87de('0x9'));function isActiveDirectoryConfigured(_0x153f2c){var _0x1f38a9=![];if(typeof _0x153f2c[_0x87de('0xa')]!==_0x87de('0xb')){_0x1f38a9=_0x153f2c['activedirectory'][_0x87de('0xc')]&&_0x153f2c[_0x87de('0xa')]['url']&&_0x153f2c[_0x87de('0xa')][_0x87de('0xd')];}return _0x1f38a9;}function adAuthenticate(_0x3dc540,_0x2332e6,_0x8150dd){return new BPromise(function(_0x44f3bc,_0x127495){try{var _0xcca57d=new ActiveDirectory(_0x3dc540);_0xcca57d[_0x87de('0xe')](_0x2332e6,_0x8150dd,function(_0x9ff3a,_0x2773a8){if(_0x9ff3a){logger['error'](_0x87de('0xf'),_0x2332e6,util['inspect'](_0x9ff3a,{'showHidden':![],'depth':null}));_0x127495('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else if(!_0x2773a8){logger[_0x87de('0x10')](_0x87de('0x11'),_0x2332e6);_0x127495(_0x87de('0x12'));}else{_0x44f3bc(_0x2773a8);}});}catch(_0x1c1b02){_0x127495(_0x1c1b02);}});}function ActiveDirectoryAuthenticate(_0x4ed36d,_0x10cb0e,_0x347d3d,_0x5eb575){var _0x398935,_0x409da1;if(!isActiveDirectoryConfigured(config)){logger['error'](_0x87de('0x13'),_0x10cb0e);return _0x5eb575(null,![],{'message':_0x87de('0x12')});}return db[_0x87de('0x14')]['findOne']({'where':{'id':0x1},'attributes':[_0x87de('0x15'),_0x87de('0x16')],'raw':!![]})[_0x87de('0x17')](function(_0x11073a){_0x398935=_0x11073a;if(!_0x398935[_0x87de('0x15')]){logger[_0x87de('0x10')](_0x87de('0x18'),_0x10cb0e);throw new Error(_0x87de('0x12'));}return _0x4ed36d[_0x87de('0x19')]({'attributes':['id',_0x87de('0x1a'),_0x87de('0x1b'),'salt',_0x87de('0x1c'),'disabled',_0x87de('0x1d'),'blockedAt',_0x87de('0x1e')],'where':{'name':_0x10cb0e,'role':{'$or':['admin',_0x87de('0x1f'),_0x87de('0x20')]},'adSsoEnabled':!![]}});})['then'](function(_0x4a7456){if(!_0x4a7456||_0x4a7456&&_0x4a7456[_0x87de('0x1a')]!==_0x10cb0e){throw new Error(_0x87de('0x12'));}_0x409da1=_0x4a7456;var _0x158c1b=_0x409da1[_0x87de('0x1a')]+'@'+config[_0x87de('0xa')][_0x87de('0xd')];return adAuthenticate(config['activedirectory'],_0x158c1b,_0x347d3d);})[_0x87de('0x17')](function(_0x4405a5){if(_0x409da1[_0x87de('0x21')]){throw new Error(_0x87de('0x12'));}if(_0x398935[_0x87de('0x16')]>0x0){if(_0x409da1['blocked']){if(moment(_0x409da1[_0x87de('0x22')])[_0x87de('0x23')](_0x398935[_0x87de('0x16')],_0x87de('0x24'))>moment()){throw new Error(_0x87de('0x12'));}return utils['clearBlockUser'](_0x409da1,0x0,![],null)['then'](function(){return utils[_0x87de('0x25')](_0x409da1);})['then'](function(){return _0x5eb575(null,_0x409da1);});}else{return utils[_0x87de('0x25')](_0x409da1)[_0x87de('0x17')](function(){return _0x5eb575(null,_0x409da1);});}}else{return utils[_0x87de('0x25')](_0x409da1)['then'](function(){return _0x5eb575(null,_0x409da1);});}})[_0x87de('0x26')](function(_0x4c27aa){return _0x5eb575(null,![],_0x4c27aa);});}function handleError(_0x5b4062,_0x3ab69a,_0x488b79){return _0x5b4062['status'](_0x3ab69a||0x1f4)[_0x87de('0x27')]({'message':_0x488b79?_0x488b79[_0x87de('0x28')]||_0x488b79:''});}exports[_0x87de('0x29')]=function(_0x460569,_0x2340f4,_0x5d72e9){passport['authenticate']('ad-login',function(_0x22e8de,_0x15b9c1,_0x516c89){var _0x2a94c2=_0x22e8de||_0x516c89;if(_0x2a94c2){return handleError(_0x2340f4,0x191,_0x2a94c2);}if(!_0x15b9c1){return handleError(_0x2340f4,0x194,{'message':_0x87de('0x2a')});}else{var _0x103af3={'payload':{'id':_0x15b9c1['id'],'role':_0x15b9c1[_0x87de('0x1c')]},'options':{'expiresIn':0x15180}};return authService[_0x87de('0x2b')](_0x103af3)[_0x87de('0x17')](function(_0x59a4e8){_0x2340f4[_0x87de('0x2c')]({'id':_0x15b9c1['id'],'token':_0x59a4e8,'statusCall':'','isAlreadyLogged':_0x15b9c1[_0x87de('0x1e')]});});}})(_0x460569,_0x2340f4,_0x5d72e9);};passport['use'](_0x87de('0x2d'),new LocalStrategy({'usernameField':_0x87de('0x1a'),'passwordField':'password'},function(_0x4c00ce,_0xfa228,_0x5079b9){return ActiveDirectoryAuthenticate(db[_0x87de('0x2e')],_0x4c00ce,_0xfa228,_0x5079b9);}));
\ No newline at end of file
+var _0x0ef1=['api','undefined','activedirectory','baseDN','url','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','findOne','adSsoEnabled','blockDuration','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20enabled','name','password','salt','role','disabled','blockedAt','online','user','agent','then','domain','add','getLicense','status','send','message','login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','json','use','ad-login','User','passport','passport-local','Strategy','moment','activedirectory2','bluebird','util','../../components/auth/service','../../config/utils','../../config/environment','../../config/logger'];(function(_0x2d7f0e,_0x3e6fbd){var _0x110b07=function(_0x557b00){while(--_0x557b00){_0x2d7f0e['push'](_0x2d7f0e['shift']());}};_0x110b07(++_0x3e6fbd);}(_0x0ef1,0xea));var _0x10ef=function(_0x29bbf8,_0x59a34d){_0x29bbf8=_0x29bbf8-0x0;var _0x1185e7=_0x0ef1[_0x29bbf8];return _0x1185e7;};'use strict';var passport=require(_0x10ef('0x0'));var LocalStrategy=require(_0x10ef('0x1'))[_0x10ef('0x2')];var moment=require(_0x10ef('0x3'));var ActiveDirectory=require(_0x10ef('0x4'));var BPromise=require(_0x10ef('0x5'));var util=require(_0x10ef('0x6'));var db=require('../../mysqldb')['db'];var authService=require(_0x10ef('0x7'));var utils=require(_0x10ef('0x8'));var config=require(_0x10ef('0x9'));var logger=require(_0x10ef('0xa'))(_0x10ef('0xb'));function isActiveDirectoryConfigured(_0x6a5b9b){var _0x4fd1ae=![];if(typeof _0x6a5b9b['activedirectory']!==_0x10ef('0xc')){_0x4fd1ae=_0x6a5b9b[_0x10ef('0xd')][_0x10ef('0xe')]&&_0x6a5b9b[_0x10ef('0xd')][_0x10ef('0xf')]&&_0x6a5b9b['activedirectory']['domain'];}return _0x4fd1ae;}function adAuthenticate(_0x2358be,_0x4058a0,_0x4f8029){return new BPromise(function(_0x3f74cf,_0x28deeb){try{var _0x168823=new ActiveDirectory(_0x2358be);_0x168823[_0x10ef('0x10')](_0x4058a0,_0x4f8029,function(_0xc3de39,_0x56996c){if(_0xc3de39){logger[_0x10ef('0x11')](_0x10ef('0x12'),_0x4058a0,util[_0x10ef('0x13')](_0xc3de39,{'showHidden':![],'depth':null}));_0x28deeb(_0x10ef('0x14'));}else if(!_0x56996c){logger[_0x10ef('0x11')](_0x10ef('0x15'),_0x4058a0);_0x28deeb('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else{_0x3f74cf(_0x56996c);}});}catch(_0x319ed4){_0x28deeb(_0x319ed4);}});}function ActiveDirectoryAuthenticate(_0x4120c5,_0x6dc964,_0x46be3f,_0x456520){var _0x3c02a0,_0x25863e;if(!isActiveDirectoryConfigured(config)){logger[_0x10ef('0x11')]('Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20configured',_0x6dc964);return _0x456520(null,![],{'message':_0x10ef('0x14')});}return db['Setting'][_0x10ef('0x16')]({'where':{'id':0x1},'attributes':[_0x10ef('0x17'),_0x10ef('0x18')],'raw':!![]})['then'](function(_0x4b063c){_0x3c02a0=_0x4b063c;if(!_0x3c02a0[_0x10ef('0x17')]){logger['error'](_0x10ef('0x19'),_0x6dc964);throw new Error(_0x10ef('0x14'));}return _0x4120c5[_0x10ef('0x16')]({'attributes':['id',_0x10ef('0x1a'),_0x10ef('0x1b'),_0x10ef('0x1c'),_0x10ef('0x1d'),_0x10ef('0x1e'),'blocked',_0x10ef('0x1f'),_0x10ef('0x20')],'where':{'name':_0x6dc964,'role':{'$or':['admin',_0x10ef('0x21'),_0x10ef('0x22')]},'adSsoEnabled':!![]}});})[_0x10ef('0x23')](function(_0x879036){if(!_0x879036||_0x879036&&_0x879036[_0x10ef('0x1a')]!==_0x6dc964){throw new Error(_0x10ef('0x14'));}_0x25863e=_0x879036;var _0x23a4dd=_0x25863e[_0x10ef('0x1a')]+'@'+config[_0x10ef('0xd')][_0x10ef('0x24')];return adAuthenticate(config[_0x10ef('0xd')],_0x23a4dd,_0x46be3f);})[_0x10ef('0x23')](function(_0x2b7a20){if(_0x25863e['disabled']){throw new Error(_0x10ef('0x14'));}if(_0x3c02a0[_0x10ef('0x18')]>0x0){if(_0x25863e['blocked']){if(moment(_0x25863e['blockedAt'])[_0x10ef('0x25')](_0x3c02a0[_0x10ef('0x18')],'minutes')>moment()){throw new Error(_0x10ef('0x14'));}return utils['clearBlockUser'](_0x25863e,0x0,![],null)['then'](function(){return utils['getLicense'](_0x25863e);})[_0x10ef('0x23')](function(){return _0x456520(null,_0x25863e);});}else{return utils[_0x10ef('0x26')](_0x25863e)[_0x10ef('0x23')](function(){return _0x456520(null,_0x25863e);});}}else{return utils['getLicense'](_0x25863e)[_0x10ef('0x23')](function(){return _0x456520(null,_0x25863e);});}})['catch'](function(_0x17f2ae){return _0x456520(null,![],_0x17f2ae);});}function handleError(_0x7696c,_0x33d433,_0x5c527a){return _0x7696c[_0x10ef('0x27')](_0x33d433||0x1f4)[_0x10ef('0x28')]({'message':_0x5c527a?_0x5c527a[_0x10ef('0x29')]||_0x5c527a:''});}exports[_0x10ef('0x2a')]=function(_0x337c65,_0x2555d5,_0x45682d){passport[_0x10ef('0x10')]('ad-login',function(_0x4e7e81,_0x3d9398,_0x4265af){var _0x1f54fc=_0x4e7e81||_0x4265af;if(_0x1f54fc){return handleError(_0x2555d5,0x191,_0x1f54fc);}if(!_0x3d9398){return handleError(_0x2555d5,0x194,{'message':_0x10ef('0x2b')});}else{var _0x100a5b={'payload':{'id':_0x3d9398['id'],'role':_0x3d9398[_0x10ef('0x1d')]},'options':{'expiresIn':0x15180}};return authService[_0x10ef('0x2c')](_0x100a5b)[_0x10ef('0x23')](function(_0x4071ee){_0x2555d5[_0x10ef('0x2d')]({'id':_0x3d9398['id'],'token':_0x4071ee,'statusCall':'','isAlreadyLogged':_0x3d9398[_0x10ef('0x20')]});});}})(_0x337c65,_0x2555d5,_0x45682d);};passport[_0x10ef('0x2e')](_0x10ef('0x2f'),new LocalStrategy({'usernameField':_0x10ef('0x1a'),'passwordField':_0x10ef('0x1b')},function(_0x4eed0d,_0x23447f,_0x3c33e9){return ActiveDirectoryAuthenticate(db[_0x10ef('0x30')],_0x4eed0d,_0x23447f,_0x3c33e9);}));
\ No newline at end of file
diff --git a/server/api/authActiveDirectory/index.js b/server/api/authActiveDirectory/index.js
index 1805ce5..2ebca3e 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 _0xd2b8=['express','./authActiveDirectory.controller','login','exports'];(function(_0x2e0443,_0x7e5974){var _0x52d450=function(_0x3a9985){while(--_0x3a9985){_0x2e0443['push'](_0x2e0443['shift']());}};_0x52d450(++_0x7e5974);}(_0xd2b8,0xac));var _0x8d2b=function(_0x100a03,_0x50a8f7){_0x100a03=_0x100a03-0x0;var _0x118ce1=_0xd2b8[_0x100a03];return _0x118ce1;};'use strict';var express=require(_0x8d2b('0x0'));var router=express['Router']();var controller=require(_0x8d2b('0x1'));router['post']('/',controller[_0x8d2b('0x2')]);module[_0x8d2b('0x3')]=router;
\ No newline at end of file
+var _0xb31e=['./authActiveDirectory.controller','exports','express','Router'];(function(_0x19bf7f,_0x54e4cf){var _0xadae96=function(_0x49acb4){while(--_0x49acb4){_0x19bf7f['push'](_0x19bf7f['shift']());}};_0xadae96(++_0x54e4cf);}(_0xb31e,0x12a));var _0xeb31=function(_0x48ea41,_0x437e68){_0x48ea41=_0x48ea41-0x0;var _0xb589f4=_0xb31e[_0x48ea41];return _0xb589f4;};'use strict';var express=require(_0xeb31('0x0'));var router=express[_0xeb31('0x1')]();var controller=require(_0xeb31('0x2'));router['post']('/',controller['login']);module[_0xeb31('0x3')]=router;
\ No newline at end of file
diff --git a/server/api/authGoogle/authGoogle.controller.js b/server/api/authGoogle/authGoogle.controller.js
index c0eb008..8aa3e34 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 _0x7a54=['blockedAt','add','minutes','clearBlockUser','getLicense','catch','lodash','passport','passport-google-oauth20','moment','../../mysqldb','../../config/utils','login','authenticate','google','/login','email','use','secret','callbackURL','findOne','allowedLoginAttempts','blockDuration','then','User','find','map','value','admin','user','agent','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'];(function(_0x75f869,_0x3690d6){var _0x10af8b=function(_0x22d3ff){while(--_0x22d3ff){_0x75f869['push'](_0x75f869['shift']());}};_0x10af8b(++_0x3690d6);}(_0x7a54,0x106));var _0x47a5=function(_0x4796fc,_0x24556c){_0x4796fc=_0x4796fc-0x0;var _0x74360d=_0x7a54[_0x4796fc];return _0x74360d;};'use strict';var _=require(_0x47a5('0x0'));var passport=require(_0x47a5('0x1'));var GoogleStrategy=require(_0x47a5('0x2'))['Strategy'];var moment=require(_0x47a5('0x3'));var db=require(_0x47a5('0x4'))['db'];var config=require('../../config/environment');var utils=require(_0x47a5('0x5'));exports[_0x47a5('0x6')]=passport[_0x47a5('0x7')](_0x47a5('0x8'),{'failureRedirect':_0x47a5('0x9'),'scope':['profile',_0x47a5('0xa')],'session':![]});exports['callback']=passport[_0x47a5('0x7')](_0x47a5('0x8'),{'failureRedirect':'/login','session':![]});passport[_0x47a5('0xb')](new GoogleStrategy({'clientID':config['google']?config['google']['clientID']:'id','clientSecret':config[_0x47a5('0x8')]?config[_0x47a5('0x8')]['clientSecret']:_0x47a5('0xc'),'callbackURL':config['google']?config['google'][_0x47a5('0xd')]:''},function(_0x69e4d4,_0x2f399b,_0x250fad,_0xd612dd){var _0xd308b8,_0x1eae59;return db['Setting'][_0x47a5('0xe')]({'where':{'id':0x1},'attributes':[_0x47a5('0xf'),_0x47a5('0x10')],'raw':!![]})[_0x47a5('0x11')](function(_0x139f25){_0xd308b8=_0x139f25;return db[_0x47a5('0x12')][_0x47a5('0x13')]({'where':{'email':_[_0x47a5('0x14')](_0x250fad['emails'],_0x47a5('0x15')),'role':{'$or':[_0x47a5('0x16'),_0x47a5('0x17'),_0x47a5('0x18')]}}});})[_0x47a5('0x11')](function(_0x574af6){_0x1eae59=_0x574af6;if(_0x1eae59){if(_0x1eae59['disabled']){return _0xd612dd(_0x47a5('0x19'));}else if(_0xd308b8['blockDuration']>0x0){if(_0x1eae59['blocked']){if(moment(_0x1eae59[_0x47a5('0x1a')])[_0x47a5('0x1b')](_0xd308b8[_0x47a5('0x10')],_0x47a5('0x1c'))>moment()){return _0xd612dd(_0x47a5('0x19'));}else{return utils[_0x47a5('0x1d')](_0x1eae59,0x0,![],null)[_0x47a5('0x11')](function(){return utils[_0x47a5('0x1e')](_0x1eae59);})[_0x47a5('0x11')](function(){return _0xd612dd(null,_0x1eae59);});}}else{return utils['getLicense'](_0x1eae59)[_0x47a5('0x11')](function(){return _0xd612dd(null,_0x1eae59);});}}else{return utils[_0x47a5('0x1e')](_0x1eae59)['then'](function(){return _0xd612dd(null,_0x1eae59);});}}return _0xd612dd(_0x47a5('0x19'));})[_0x47a5('0x1f')](function(_0x36874d){_0xd612dd(_0x36874d);});}));
\ No newline at end of file
+var _0x7a54=['blockedAt','add','minutes','clearBlockUser','getLicense','catch','lodash','passport','passport-google-oauth20','moment','../../mysqldb','../../config/utils','login','authenticate','google','/login','email','use','secret','callbackURL','findOne','allowedLoginAttempts','blockDuration','then','User','find','map','value','admin','user','agent','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'];(function(_0x5834bc,_0x3d4801){var _0x3e183a=function(_0x18b023){while(--_0x18b023){_0x5834bc['push'](_0x5834bc['shift']());}};_0x3e183a(++_0x3d4801);}(_0x7a54,0x106));var _0x47a5=function(_0x134017,_0x257cfc){_0x134017=_0x134017-0x0;var _0x204354=_0x7a54[_0x134017];return _0x204354;};'use strict';var _=require(_0x47a5('0x0'));var passport=require(_0x47a5('0x1'));var GoogleStrategy=require(_0x47a5('0x2'))['Strategy'];var moment=require(_0x47a5('0x3'));var db=require(_0x47a5('0x4'))['db'];var config=require('../../config/environment');var utils=require(_0x47a5('0x5'));exports[_0x47a5('0x6')]=passport[_0x47a5('0x7')](_0x47a5('0x8'),{'failureRedirect':_0x47a5('0x9'),'scope':['profile',_0x47a5('0xa')],'session':![]});exports['callback']=passport[_0x47a5('0x7')](_0x47a5('0x8'),{'failureRedirect':'/login','session':![]});passport[_0x47a5('0xb')](new GoogleStrategy({'clientID':config['google']?config['google']['clientID']:'id','clientSecret':config[_0x47a5('0x8')]?config[_0x47a5('0x8')]['clientSecret']:_0x47a5('0xc'),'callbackURL':config['google']?config['google'][_0x47a5('0xd')]:''},function(_0x69e4d4,_0x2f399b,_0x250fad,_0xd612dd){var _0xd308b8,_0x1eae59;return db['Setting'][_0x47a5('0xe')]({'where':{'id':0x1},'attributes':[_0x47a5('0xf'),_0x47a5('0x10')],'raw':!![]})[_0x47a5('0x11')](function(_0x139f25){_0xd308b8=_0x139f25;return db[_0x47a5('0x12')][_0x47a5('0x13')]({'where':{'email':_[_0x47a5('0x14')](_0x250fad['emails'],_0x47a5('0x15')),'role':{'$or':[_0x47a5('0x16'),_0x47a5('0x17'),_0x47a5('0x18')]}}});})[_0x47a5('0x11')](function(_0x574af6){_0x1eae59=_0x574af6;if(_0x1eae59){if(_0x1eae59['disabled']){return _0xd612dd(_0x47a5('0x19'));}else if(_0xd308b8['blockDuration']>0x0){if(_0x1eae59['blocked']){if(moment(_0x1eae59[_0x47a5('0x1a')])[_0x47a5('0x1b')](_0xd308b8[_0x47a5('0x10')],_0x47a5('0x1c'))>moment()){return _0xd612dd(_0x47a5('0x19'));}else{return utils[_0x47a5('0x1d')](_0x1eae59,0x0,![],null)[_0x47a5('0x11')](function(){return utils[_0x47a5('0x1e')](_0x1eae59);})[_0x47a5('0x11')](function(){return _0xd612dd(null,_0x1eae59);});}}else{return utils['getLicense'](_0x1eae59)[_0x47a5('0x11')](function(){return _0xd612dd(null,_0x1eae59);});}}else{return utils[_0x47a5('0x1e')](_0x1eae59)['then'](function(){return _0xd612dd(null,_0x1eae59);});}}return _0xd612dd(_0x47a5('0x19'));})[_0x47a5('0x1f')](function(_0x36874d){_0xd612dd(_0x36874d);});}));
\ No newline at end of file
diff --git a/server/api/authGoogle/index.js b/server/api/authGoogle/index.js
index 09054c3..d3d4b62 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 _0x5231=['passport','Router','./authGoogle.controller','../user/user.controller.js','../../components/auth/service','get','login','/callback','callback','setTokenCookie','exports','express'];(function(_0x5d61b4,_0x4f7b91){var _0x183fc5=function(_0x5ecf92){while(--_0x5ecf92){_0x5d61b4['push'](_0x5d61b4['shift']());}};_0x183fc5(++_0x4f7b91);}(_0x5231,0x1af));var _0x1523=function(_0x56cacd,_0x10fb73){_0x56cacd=_0x56cacd-0x0;var _0x11ffdc=_0x5231[_0x56cacd];return _0x11ffdc;};'use strict';var express=require(_0x1523('0x0'));var passport=require(_0x1523('0x1'));var router=express[_0x1523('0x2')]();var controller=require(_0x1523('0x3'));var userController=require(_0x1523('0x4'));var authService=require(_0x1523('0x5'));router[_0x1523('0x6')]('/',controller[_0x1523('0x7')]);router[_0x1523('0x6')](_0x1523('0x8'),controller[_0x1523('0x9')],authService['isMiddleware'],userController[_0x1523('0x7')],authService[_0x1523('0xa')]);module[_0x1523('0xb')]=router;
\ No newline at end of file
+var _0x7def=['login','/callback','callback','isMiddleware','setTokenCookie','exports','express','Router','./authGoogle.controller','../../components/auth/service','get'];(function(_0x565c49,_0x54acd0){var _0x20ca34=function(_0x42f7e1){while(--_0x42f7e1){_0x565c49['push'](_0x565c49['shift']());}};_0x20ca34(++_0x54acd0);}(_0x7def,0x74));var _0xf7de=function(_0xdc37a1,_0x53ebb9){_0xdc37a1=_0xdc37a1-0x0;var _0x99b4fe=_0x7def[_0xdc37a1];return _0x99b4fe;};'use strict';var express=require(_0xf7de('0x0'));var passport=require('passport');var router=express[_0xf7de('0x1')]();var controller=require(_0xf7de('0x2'));var userController=require('../user/user.controller.js');var authService=require(_0xf7de('0x3'));router[_0xf7de('0x4')]('/',controller[_0xf7de('0x5')]);router[_0xf7de('0x4')](_0xf7de('0x6'),controller[_0xf7de('0x7')],authService[_0xf7de('0x8')],userController[_0xf7de('0x5')],authService[_0xf7de('0x9')]);module[_0xf7de('0xa')]=router;
\ No newline at end of file
diff --git a/server/api/authLocal/authLocal.controller.js b/server/api/authLocal/authLocal.controller.js
index 6ea0e8f..37d08e0 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 _0x858a=['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','If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a','status','Reset\x20Email\x20sent!','reset','params','securePassword','enforcePasswordHistory','passwordHistoryLimit','previousPasswords','validatePasswordHistory','resetPasswordToken','use','local-login','util','passport','passport-local','Strategy','lodash','../../mysqldb','../../components/auth/service','../../config/utils','http','Setting','allowedLoginAttempts','blockDuration','then','findOne','password','salt','role','disabled','blocked','loginAttempts','admin','user','name','authenticate','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','blockedAt','minutes','clearBlockUser','add','getLicense','catch','MailAccount','find','email','MailServerOut','Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!','getSmtpOptions','format','\x22%s\x22\x20<%s>','Smtp','request','SendMail','error','SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!','stringify','send','message','login','online','forgot','body','Email\x20parameter\x20is\x20missing','generate','trim','User','This\x20email\x20is\x20not\x20registered.','The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.','resetPasswordExpires','now','save','xCally\x20Motion\x20Password\x20Reset'];(function(_0x13d07a,_0x41efc3){var _0x5ee0ee=function(_0x4ca94a){while(--_0x4ca94a){_0x13d07a['push'](_0x13d07a['shift']());}};_0x5ee0ee(++_0x41efc3);}(_0x858a,0x191));var _0xa858=function(_0x18ab2a,_0x4debcd){_0x18ab2a=_0x18ab2a-0x0;var _0x16dcee=_0x858a[_0x18ab2a];return _0x16dcee;};'use strict';var util=require(_0xa858('0x0'));var passport=require(_0xa858('0x1'));var LocalStrategy=require(_0xa858('0x2'))[_0xa858('0x3')];var jayson=require('jayson/promise');var _=require(_0xa858('0x4'));var rs=require('randomstring');var moment=require('moment');var db=require(_0xa858('0x5'))['db'];var authService=require(_0xa858('0x6'));var utils=require(_0xa858('0x7'));var client=jayson['client'][_0xa858('0x8')]({'port':0x232b});function localAuthenticate(_0x574e0e,_0x1f42e2,_0x572f97,_0x6ae260){var _0x9380a8,_0x1b542c;return db[_0xa858('0x9')]['findOne']({'where':{'id':0x1},'attributes':[_0xa858('0xa'),_0xa858('0xb')],'raw':!![]})[_0xa858('0xc')](function(_0x296951){_0x9380a8=_0x296951;return _0x574e0e[_0xa858('0xd')]({'attributes':['id','name',_0xa858('0xe'),_0xa858('0xf'),_0xa858('0x10'),_0xa858('0x11'),_0xa858('0x12'),'blockedAt',_0xa858('0x13')],'where':{'name':_0x1f42e2,'role':{'$or':[_0xa858('0x14'),_0xa858('0x15'),'agent']}}});})[_0xa858('0xc')](function(_0x29bbdb){if(!_0x29bbdb||_0x29bbdb&&_0x29bbdb[_0xa858('0x16')]!==_0x1f42e2){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else{_0x1b542c=_0x29bbdb;return _0x1b542c;}})['then'](function(){_0x1b542c[_0xa858('0x17')](_0x572f97,function(_0x349867,_0x5cbc03){var _0x29a5fc=_0x1b542c['loginAttempts']+0x1;if(_0x349867){return _0x6ae260(_0x349867);}else if(!_0x5cbc03){if(_0x1b542c[_0xa858('0x11')]){return _0x6ae260(null,![],{'message':_0xa858('0x18')});}else if(_0x9380a8[_0xa858('0xa')]>0x0){if(_0x1b542c['blocked']){if(_0x9380a8[_0xa858('0xb')]>0x0){if(moment(_0x1b542c[_0xa858('0x19')])['add'](_0x9380a8[_0xa858('0xb')],_0xa858('0x1a'))>moment()){return _0x6ae260(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils['clearBlockUser'](_0x1b542c,_0x29a5fc,![],null)[_0xa858('0xc')](function(){return _0x6ae260(null,![],{'message':_0xa858('0x18')});});}}else{return _0x6ae260(null,![],{'message':_0xa858('0x18')});}}else{if(_0x29a5fc>=_0x9380a8[_0xa858('0xa')]){return utils['clearBlockUser'](_0x1b542c,0x0,!![],moment())[_0xa858('0xc')](function(){return _0x6ae260(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});});}else{return utils[_0xa858('0x1b')](_0x1b542c,_0x29a5fc,![],null)['then'](function(){return _0x6ae260(null,![],{'message':_0xa858('0x18')});});}}}else{return _0x6ae260(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{if(_0x1b542c[_0xa858('0x11')]){return _0x6ae260(null,![],{'message':_0xa858('0x18')});}else if(_0x9380a8[_0xa858('0xa')]>0x0){if(_0x1b542c[_0xa858('0x12')]){if(_0x9380a8['blockDuration']>0x0){if(moment(_0x1b542c[_0xa858('0x19')])[_0xa858('0x1c')](_0x9380a8[_0xa858('0xb')],'minutes')>moment()){return _0x6ae260(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils[_0xa858('0x1b')](_0x1b542c,0x0,![],null)['then'](function(){return utils['getLicense'](_0x1b542c);})[_0xa858('0xc')](function(){return _0x6ae260(null,_0x1b542c);});}}else{return _0x6ae260(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{return utils[_0xa858('0x1b')](_0x1b542c,0x0,![],null)[_0xa858('0xc')](function(){return utils[_0xa858('0x1d')](_0x1b542c);})[_0xa858('0xc')](function(){return _0x6ae260(null,_0x1b542c);})[_0xa858('0x1e')](function(_0x39a3ef){return _0x6ae260(null,![],_0x39a3ef);});}}else{if(_0x1b542c['blocked']){return _0x6ae260(null,![],{'message':_0xa858('0x18')});}else{return utils[_0xa858('0x1d')](_0x1b542c)[_0xa858('0xc')](function(){return _0x6ae260(null,_0x1b542c);});}}}});})[_0xa858('0x1e')](function(_0x4963f1){return _0x6ae260(null,![],_0x4963f1);});}function sendServiceMail(_0x6257f3){return db[_0xa858('0x1f')][_0xa858('0x20')]({'where':{'service':!![]},'attributes':['id','name',_0xa858('0x21')],'include':[{'model':db[_0xa858('0x22')],'as':'Smtp','include':[{'model':db['CloudProvider'],'as':'CloudProvider'}]}]})['then'](function(_0x5013f3){if(!_0x5013f3){throw new Error(_0xa858('0x23'));}var _0x118a0e=_0x5013f3[_0xa858('0x24')]();var _0x996c27={'account':_0x118a0e,'message':_['merge']({'from':util[_0xa858('0x25')](_0xa858('0x26'),_0x5013f3[_0xa858('0x16')],_0x5013f3[_0xa858('0x21')]||_0x5013f3[_0xa858('0x27')][_0xa858('0x15')])},_0x6257f3)};return client[_0xa858('0x28')](_0xa858('0x29'),_0x996c27);})['then'](function(_0x15b317){if(_0x15b317[_0xa858('0x2a')]){throw new Error(util[_0xa858('0x25')](_0xa858('0x2b'),_0x15b317[_0xa858('0x2a')]['message']||JSON[_0xa858('0x2c')](_0x15b317['error'])));}return!![];});}function handleError(_0x2a85d6,_0x797d59,_0x38d42f){return _0x2a85d6['status'](_0x797d59||0x1f4)[_0xa858('0x2d')]({'message':_0x38d42f?_0x38d42f[_0xa858('0x2e')]||_0x38d42f:''});}exports[_0xa858('0x2f')]=function(_0x1b78ef,_0x280cdf,_0x4da6d4){passport[_0xa858('0x17')]('local-login',function(_0x470c99,_0x2a76ba,_0x3c161e){var _0x185640=_0x470c99||_0x3c161e;if(_0x185640){return handleError(_0x280cdf,0x191,_0x185640);}if(!_0x2a76ba){return handleError(_0x280cdf,0x194,{'message':'Something\x20went\x20wrong,\x20please\x20try\x20again.'});}else{var _0x2dee6f={'payload':{'id':_0x2a76ba['id'],'role':_0x2a76ba[_0xa858('0x10')]},'options':{'expiresIn':0x15180}};return authService['signToken'](_0x2dee6f)[_0xa858('0xc')](function(_0x305928){_0x280cdf['json']({'id':_0x2a76ba['id'],'token':_0x305928,'statusCall':'','isAlreadyLogged':_0x2a76ba[_0xa858('0x30')]});});}})(_0x1b78ef,_0x280cdf,_0x4da6d4);};exports[_0xa858('0x31')]=function(_0x410fec,_0x517e0d){if(!_0x410fec[_0xa858('0x32')]['email']){return handleError(_0x517e0d,0x1f4,{'message':_0xa858('0x33')});}var _0x4191ac=rs[_0xa858('0x34')]();_0x410fec[_0xa858('0x32')][_0xa858('0x21')]=_0x410fec[_0xa858('0x32')][_0xa858('0x21')][_0xa858('0x35')]()['toLowerCase']();var _0x1c9694;return db['Setting']['findOne']({'where':{'id':0x1},'attributes':[_0xa858('0xa'),_0xa858('0xb')],'raw':!![]})[_0xa858('0xc')](function(_0x3c8969){_0x1c9694=_0x3c8969;return db[_0xa858('0x36')]['find']({'where':{'email':_0x410fec[_0xa858('0x32')][_0xa858('0x21')]}});})[_0xa858('0xc')](function(_0x193826){if(!_0x193826){throw new Error(_0xa858('0x37'));}if(_0x193826[_0xa858('0x11')]){throw new Error(_0xa858('0x38'));}if(_0x193826[_0xa858('0x12')]){if(moment(_0x193826['blockedAt'])['add'](_0x1c9694[_0xa858('0xb')],_0xa858('0x1a'))>moment()){throw new Error('The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.');}else{_0x193826[_0xa858('0x12')]=![];_0x193826[_0xa858('0x19')]=null;}}_0x193826['resetPasswordToken']=_0x4191ac;_0x193826[_0xa858('0x39')]=Date[_0xa858('0x3a')]()+0x36ee80;return _0x193826[_0xa858('0x3b')]();})[_0xa858('0xc')](function(){return sendServiceMail({'to':_0x410fec['body'][_0xa858('0x21')],'subject':_0xa858('0x3c'),'text':_0xa858('0x3d')+_0xa858('0x3e')+'https://'+_0x410fec[_0xa858('0x3f')]['host']+'/reset/'+_0x4191ac+'\x0a\x0a'+_0xa858('0x40')});})[_0xa858('0xc')](function(){_0x517e0d[_0xa858('0x41')](0xc8)[_0xa858('0x2d')]({'message':_0xa858('0x42')});})[_0xa858('0x1e')](function(_0x797675){return handleError(_0x517e0d,0x1f4,_0x797675);});};exports[_0xa858('0x43')]=function(_0x390a21,_0x2de2b2){return db[_0xa858('0x36')][_0xa858('0x20')]({'where':{'resetPasswordToken':_0x390a21[_0xa858('0x44')]['token'],'resetPasswordExpires':{'$gt':Date['now']()}}})[_0xa858('0xc')](function(_0x36f662){if(!_0x36f662){throw new Error('Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.');}return db[_0xa858('0x9')]['findOne']({'attributes':['id',_0xa858('0x45'),_0xa858('0x46'),_0xa858('0x47')]})['then'](function(_0x392a80){if(_0x392a80[_0xa858('0x45')])authService['validatePasswordPattern'](_0x390a21['body']['password']);if(!_0x392a80[_0xa858('0x46')]||!_0x36f662[_0xa858('0x48')])return _0x36f662;authService[_0xa858('0x49')](_0x390a21[_0xa858('0x32')][_0xa858('0xe')],_0x36f662['previousPasswords'],_0x392a80[_0xa858('0x47')]);return _0x36f662;})[_0xa858('0xc')](function(){_0x36f662['password']=_0x390a21[_0xa858('0x32')][_0xa858('0xe')];_0x36f662[_0xa858('0x4a')]=null;_0x36f662[_0xa858('0x39')]=null;return _0x36f662['save']();});})[_0xa858('0xc')](function(){_0x2de2b2[_0xa858('0x41')](0xc8)[_0xa858('0x2d')]({'message':'Password\x20reset!'});})['catch'](function(_0x389bd3){return handleError(_0x2de2b2,0x1f4,_0x389bd3);});};passport[_0xa858('0x4b')](_0xa858('0x4c'),new LocalStrategy({'usernameField':'name','passwordField':'password'},function(_0x22b280,_0x3bd78c,_0x42cab){return localAuthenticate(db[_0xa858('0x36')],_0x22b280,_0x3bd78c,_0x42cab);}));
\ No newline at end of file
+var _0xc2e6=['headers','/reset/','If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a','Reset\x20Email\x20sent!','params','token','Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.','enforcePasswordHistory','passwordHistoryLimit','securePassword','validatePasswordPattern','validatePasswordHistory','use','local-login','util','passport','Strategy','jayson/promise','lodash','randomstring','moment','../../mysqldb','../../components/auth/service','client','http','Setting','findOne','allowedLoginAttempts','blockDuration','then','name','password','salt','role','disabled','blocked','loginAttempts','admin','agent','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','authenticate','blockedAt','minutes','clearBlockUser','add','getLicense','catch','MailAccount','find','email','MailServerOut','CloudProvider','Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!','getSmtpOptions','merge','format','\x22%s\x22\x20<%s>','Smtp','user','request','SendMail','SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!','message','status','send','login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','json','online','forgot','body','Email\x20parameter\x20is\x20missing','trim','User','This\x20email\x20is\x20not\x20registered.','The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.','resetPasswordToken','now','save','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://'];(function(_0x41a642,_0x50a513){var _0x4491b0=function(_0xc81c89){while(--_0xc81c89){_0x41a642['push'](_0x41a642['shift']());}};_0x4491b0(++_0x50a513);}(_0xc2e6,0xb4));var _0x6c2e=function(_0x5714c8,_0x5f77fe){_0x5714c8=_0x5714c8-0x0;var _0x1c2adc=_0xc2e6[_0x5714c8];return _0x1c2adc;};'use strict';var util=require(_0x6c2e('0x0'));var passport=require(_0x6c2e('0x1'));var LocalStrategy=require('passport-local')[_0x6c2e('0x2')];var jayson=require(_0x6c2e('0x3'));var _=require(_0x6c2e('0x4'));var rs=require(_0x6c2e('0x5'));var moment=require(_0x6c2e('0x6'));var db=require(_0x6c2e('0x7'))['db'];var authService=require(_0x6c2e('0x8'));var utils=require('../../config/utils');var client=jayson[_0x6c2e('0x9')][_0x6c2e('0xa')]({'port':0x232b});function localAuthenticate(_0x3f1753,_0x2d390b,_0xbd051a,_0xd59b84){var _0x169c89,_0x139517;return db[_0x6c2e('0xb')][_0x6c2e('0xc')]({'where':{'id':0x1},'attributes':[_0x6c2e('0xd'),_0x6c2e('0xe')],'raw':!![]})[_0x6c2e('0xf')](function(_0x10158b){_0x169c89=_0x10158b;return _0x3f1753[_0x6c2e('0xc')]({'attributes':['id',_0x6c2e('0x10'),_0x6c2e('0x11'),_0x6c2e('0x12'),_0x6c2e('0x13'),_0x6c2e('0x14'),_0x6c2e('0x15'),'blockedAt',_0x6c2e('0x16')],'where':{'name':_0x2d390b,'role':{'$or':[_0x6c2e('0x17'),'user',_0x6c2e('0x18')]}}});})[_0x6c2e('0xf')](function(_0x41c2e4){if(!_0x41c2e4||_0x41c2e4&&_0x41c2e4['name']!==_0x2d390b){throw new Error(_0x6c2e('0x19'));}else{_0x139517=_0x41c2e4;return _0x139517;}})[_0x6c2e('0xf')](function(){_0x139517[_0x6c2e('0x1a')](_0xbd051a,function(_0x9fa765,_0x31d46e){var _0xb749f2=_0x139517['loginAttempts']+0x1;if(_0x9fa765){return _0xd59b84(_0x9fa765);}else if(!_0x31d46e){if(_0x139517[_0x6c2e('0x14')]){return _0xd59b84(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else if(_0x169c89[_0x6c2e('0xd')]>0x0){if(_0x139517[_0x6c2e('0x15')]){if(_0x169c89[_0x6c2e('0xe')]>0x0){if(moment(_0x139517[_0x6c2e('0x1b')])['add'](_0x169c89['blockDuration'],_0x6c2e('0x1c'))>moment()){return _0xd59b84(null,![],{'message':_0x6c2e('0x19')});}else{return utils[_0x6c2e('0x1d')](_0x139517,_0xb749f2,![],null)[_0x6c2e('0xf')](function(){return _0xd59b84(null,![],{'message':_0x6c2e('0x19')});});}}else{return _0xd59b84(null,![],{'message':_0x6c2e('0x19')});}}else{if(_0xb749f2>=_0x169c89[_0x6c2e('0xd')]){return utils[_0x6c2e('0x1d')](_0x139517,0x0,!![],moment())[_0x6c2e('0xf')](function(){return _0xd59b84(null,![],{'message':_0x6c2e('0x19')});});}else{return utils['clearBlockUser'](_0x139517,_0xb749f2,![],null)[_0x6c2e('0xf')](function(){return _0xd59b84(null,![],{'message':_0x6c2e('0x19')});});}}}else{return _0xd59b84(null,![],{'message':_0x6c2e('0x19')});}}else{if(_0x139517[_0x6c2e('0x14')]){return _0xd59b84(null,![],{'message':_0x6c2e('0x19')});}else if(_0x169c89[_0x6c2e('0xd')]>0x0){if(_0x139517[_0x6c2e('0x15')]){if(_0x169c89[_0x6c2e('0xe')]>0x0){if(moment(_0x139517[_0x6c2e('0x1b')])[_0x6c2e('0x1e')](_0x169c89[_0x6c2e('0xe')],_0x6c2e('0x1c'))>moment()){return _0xd59b84(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils[_0x6c2e('0x1d')](_0x139517,0x0,![],null)['then'](function(){return utils['getLicense'](_0x139517);})[_0x6c2e('0xf')](function(){return _0xd59b84(null,_0x139517);});}}else{return _0xd59b84(null,![],{'message':_0x6c2e('0x19')});}}else{return utils[_0x6c2e('0x1d')](_0x139517,0x0,![],null)[_0x6c2e('0xf')](function(){return utils[_0x6c2e('0x1f')](_0x139517);})['then'](function(){return _0xd59b84(null,_0x139517);})[_0x6c2e('0x20')](function(_0x3d7cbf){return _0xd59b84(null,![],_0x3d7cbf);});}}else{if(_0x139517[_0x6c2e('0x15')]){return _0xd59b84(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils[_0x6c2e('0x1f')](_0x139517)[_0x6c2e('0xf')](function(){return _0xd59b84(null,_0x139517);});}}}});})['catch'](function(_0x17fe80){return _0xd59b84(null,![],_0x17fe80);});}function sendServiceMail(_0x530766){return db[_0x6c2e('0x21')][_0x6c2e('0x22')]({'where':{'service':!![]},'attributes':['id',_0x6c2e('0x10'),_0x6c2e('0x23')],'include':[{'model':db[_0x6c2e('0x24')],'as':'Smtp','include':[{'model':db[_0x6c2e('0x25')],'as':_0x6c2e('0x25')}]}]})[_0x6c2e('0xf')](function(_0x545589){if(!_0x545589){throw new Error(_0x6c2e('0x26'));}var _0x465197=_0x545589[_0x6c2e('0x27')]();var _0x2baff6={'account':_0x465197,'message':_[_0x6c2e('0x28')]({'from':util[_0x6c2e('0x29')](_0x6c2e('0x2a'),_0x545589[_0x6c2e('0x10')],_0x545589[_0x6c2e('0x23')]||_0x545589[_0x6c2e('0x2b')][_0x6c2e('0x2c')])},_0x530766)};return client[_0x6c2e('0x2d')](_0x6c2e('0x2e'),_0x2baff6);})[_0x6c2e('0xf')](function(_0x49ebbb){if(_0x49ebbb['error']){throw new Error(util[_0x6c2e('0x29')](_0x6c2e('0x2f'),_0x49ebbb['error'][_0x6c2e('0x30')]||JSON['stringify'](_0x49ebbb['error'])));}return!![];});}function handleError(_0x32a1be,_0x2eafb4,_0x3ec7ff){return _0x32a1be[_0x6c2e('0x31')](_0x2eafb4||0x1f4)[_0x6c2e('0x32')]({'message':_0x3ec7ff?_0x3ec7ff[_0x6c2e('0x30')]||_0x3ec7ff:''});}exports[_0x6c2e('0x33')]=function(_0xc83d18,_0x3cb367,_0x56cdf3){passport[_0x6c2e('0x1a')]('local-login',function(_0x428b46,_0x4b40ef,_0x199d0f){var _0x19f07a=_0x428b46||_0x199d0f;if(_0x19f07a){return handleError(_0x3cb367,0x191,_0x19f07a);}if(!_0x4b40ef){return handleError(_0x3cb367,0x194,{'message':_0x6c2e('0x34')});}else{var _0x447792={'payload':{'id':_0x4b40ef['id'],'role':_0x4b40ef[_0x6c2e('0x13')]},'options':{'expiresIn':0x15180}};return authService[_0x6c2e('0x35')](_0x447792)['then'](function(_0x5916d8){_0x3cb367[_0x6c2e('0x36')]({'id':_0x4b40ef['id'],'token':_0x5916d8,'statusCall':'','isAlreadyLogged':_0x4b40ef[_0x6c2e('0x37')]});});}})(_0xc83d18,_0x3cb367,_0x56cdf3);};exports[_0x6c2e('0x38')]=function(_0x2a10bd,_0x464c56){if(!_0x2a10bd[_0x6c2e('0x39')][_0x6c2e('0x23')]){return handleError(_0x464c56,0x1f4,{'message':_0x6c2e('0x3a')});}var _0x3b6005=rs['generate']();_0x2a10bd[_0x6c2e('0x39')][_0x6c2e('0x23')]=_0x2a10bd[_0x6c2e('0x39')][_0x6c2e('0x23')][_0x6c2e('0x3b')]()['toLowerCase']();var _0x548f8f;return db['Setting'][_0x6c2e('0xc')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts',_0x6c2e('0xe')],'raw':!![]})['then'](function(_0x29b964){_0x548f8f=_0x29b964;return db[_0x6c2e('0x3c')][_0x6c2e('0x22')]({'where':{'email':_0x2a10bd['body'][_0x6c2e('0x23')]}});})[_0x6c2e('0xf')](function(_0x597ec8){if(!_0x597ec8){throw new Error(_0x6c2e('0x3d'));}if(_0x597ec8['disabled']){throw new Error(_0x6c2e('0x3e'));}if(_0x597ec8[_0x6c2e('0x15')]){if(moment(_0x597ec8['blockedAt'])[_0x6c2e('0x1e')](_0x548f8f[_0x6c2e('0xe')],_0x6c2e('0x1c'))>moment()){throw new Error('The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.');}else{_0x597ec8[_0x6c2e('0x15')]=![];_0x597ec8['blockedAt']=null;}}_0x597ec8[_0x6c2e('0x3f')]=_0x3b6005;_0x597ec8['resetPasswordExpires']=Date[_0x6c2e('0x40')]()+0x36ee80;return _0x597ec8[_0x6c2e('0x41')]();})[_0x6c2e('0xf')](function(){return sendServiceMail({'to':_0x2a10bd[_0x6c2e('0x39')]['email'],'subject':'xCally\x20Motion\x20Password\x20Reset','text':_0x6c2e('0x42')+_0x6c2e('0x43')+_0x6c2e('0x44')+_0x2a10bd[_0x6c2e('0x45')]['host']+_0x6c2e('0x46')+_0x3b6005+'\x0a\x0a'+_0x6c2e('0x47')});})[_0x6c2e('0xf')](function(){_0x464c56[_0x6c2e('0x31')](0xc8)[_0x6c2e('0x32')]({'message':_0x6c2e('0x48')});})[_0x6c2e('0x20')](function(_0x26f2d8){return handleError(_0x464c56,0x1f4,_0x26f2d8);});};exports['reset']=function(_0x4f792e,_0xdc76f9){return db[_0x6c2e('0x3c')]['find']({'where':{'resetPasswordToken':_0x4f792e[_0x6c2e('0x49')][_0x6c2e('0x4a')],'resetPasswordExpires':{'$gt':Date['now']()}}})[_0x6c2e('0xf')](function(_0x4cb955){if(!_0x4cb955){throw new Error(_0x6c2e('0x4b'));}return db[_0x6c2e('0xb')][_0x6c2e('0xc')]({'attributes':['id','securePassword',_0x6c2e('0x4c'),_0x6c2e('0x4d')]})[_0x6c2e('0xf')](function(_0xb45f67){if(_0xb45f67[_0x6c2e('0x4e')])authService[_0x6c2e('0x4f')](_0x4f792e[_0x6c2e('0x39')][_0x6c2e('0x11')]);if(!_0xb45f67[_0x6c2e('0x4c')]||!_0x4cb955['previousPasswords'])return _0x4cb955;authService[_0x6c2e('0x50')](_0x4f792e[_0x6c2e('0x39')][_0x6c2e('0x11')],_0x4cb955['previousPasswords'],_0xb45f67[_0x6c2e('0x4d')]);return _0x4cb955;})['then'](function(){_0x4cb955[_0x6c2e('0x11')]=_0x4f792e[_0x6c2e('0x39')][_0x6c2e('0x11')];_0x4cb955[_0x6c2e('0x3f')]=null;_0x4cb955['resetPasswordExpires']=null;return _0x4cb955['save']();});})[_0x6c2e('0xf')](function(){_0xdc76f9[_0x6c2e('0x31')](0xc8)[_0x6c2e('0x32')]({'message':'Password\x20reset!'});})[_0x6c2e('0x20')](function(_0x2d2070){return handleError(_0xdc76f9,0x1f4,_0x2d2070);});};passport[_0x6c2e('0x51')](_0x6c2e('0x52'),new LocalStrategy({'usernameField':_0x6c2e('0x10'),'passwordField':_0x6c2e('0x11')},function(_0xabbbc4,_0x521d94,_0x86881d){return localAuthenticate(db['User'],_0xabbbc4,_0x521d94,_0x86881d);}));
\ No newline at end of file
diff --git a/server/api/authLocal/index.js b/server/api/authLocal/index.js
index a6518cd..0f41f6b 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 _0x25a8=['express','./authLocal.controller','/forgot','forgot','post','/reset/:token','reset','exports'];(function(_0x3d1ae4,_0x2857b4){var _0x2a7dee=function(_0x4d178f){while(--_0x4d178f){_0x3d1ae4['push'](_0x3d1ae4['shift']());}};_0x2a7dee(++_0x2857b4);}(_0x25a8,0x1a8));var _0x825a=function(_0x3f3724,_0x4ddfe8){_0x3f3724=_0x3f3724-0x0;var _0x324c7f=_0x25a8[_0x3f3724];return _0x324c7f;};'use strict';var express=require(_0x825a('0x0'));var router=express['Router']();var controller=require(_0x825a('0x1'));router['post']('/',controller['login']);router['post'](_0x825a('0x2'),controller[_0x825a('0x3')]);router[_0x825a('0x4')](_0x825a('0x5'),controller[_0x825a('0x6')]);module[_0x825a('0x7')]=router;
\ No newline at end of file
+var _0x3f9a=['reset','exports','express','Router','./authLocal.controller','post','login','forgot','/reset/:token'];(function(_0x28947d,_0x4cc9c6){var _0x12d2ee=function(_0x3f38fc){while(--_0x3f38fc){_0x28947d['push'](_0x28947d['shift']());}};_0x12d2ee(++_0x4cc9c6);}(_0x3f9a,0xc8));var _0xa3f9=function(_0x23e6db,_0x30daad){_0x23e6db=_0x23e6db-0x0;var _0x5c7bba=_0x3f9a[_0x23e6db];return _0x5c7bba;};'use strict';var express=require(_0xa3f9('0x0'));var router=express[_0xa3f9('0x1')]();var controller=require(_0xa3f9('0x2'));router[_0xa3f9('0x3')]('/',controller[_0xa3f9('0x4')]);router[_0xa3f9('0x3')]('/forgot',controller[_0xa3f9('0x5')]);router[_0xa3f9('0x3')](_0xa3f9('0x6'),controller[_0xa3f9('0x7')]);module[_0xa3f9('0x8')]=router;
\ No newline at end of file
diff --git a/server/api/automation/automation.attributes.js b/server/api/automation/automation.attributes.js
index ca9def7..e78afa6 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 _0x06ed=['INTEGER','sequelize','exports','STRING','BOOLEAN'];(function(_0x92fb0c,_0x5446af){var _0x4204c4=function(_0x534325){while(--_0x534325){_0x92fb0c['push'](_0x92fb0c['shift']());}};_0x4204c4(++_0x5446af);}(_0x06ed,0x1cd));var _0xd06e=function(_0x268bfc,_0x230a15){_0x268bfc=_0x268bfc-0x0;var _0xf47822=_0x06ed[_0x268bfc];return _0xf47822;};'use strict';var Sequelize=require(_0xd06e('0x0'));module[_0xd06e('0x1')]={'name':{'type':Sequelize[_0xd06e('0x2')],'allowNull':![]},'channel':{'type':Sequelize[_0xd06e('0x2')]},'description':{'type':Sequelize['STRING']},'status':{'type':Sequelize[_0xd06e('0x3')],'defaultValue':![]},'timeout':{'type':Sequelize[_0xd06e('0x4')],'defaultValue':0xa}};
\ No newline at end of file
+var _0x476a=['STRING','BOOLEAN','INTEGER','sequelize','exports'];(function(_0x5743e3,_0x4a2aab){var _0x24d100=function(_0x10737c){while(--_0x10737c){_0x5743e3['push'](_0x5743e3['shift']());}};_0x24d100(++_0x4a2aab);}(_0x476a,0x1bb));var _0xa476=function(_0x172bb3,_0x38b59c){_0x172bb3=_0x172bb3-0x0;var _0x56c8ed=_0x476a[_0x172bb3];return _0x56c8ed;};'use strict';var Sequelize=require(_0xa476('0x0'));module[_0xa476('0x1')]={'name':{'type':Sequelize[_0xa476('0x2')],'allowNull':![]},'channel':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xa476('0x2')]},'status':{'type':Sequelize[_0xa476('0x3')],'defaultValue':![]},'timeout':{'type':Sequelize[_0xa476('0x4')],'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 5986fec..ca90cde 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 _0x5bf0=['../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','reject','save','update','then','destroy','error','stack','name','index','map','Automation','fieldName','type','key','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','VIRTUAL','merge','includeAll','include','rows','catch','show','params','rawAttributes','options','find','create','body','addConditions','ids','omit','getConditions','Condition','pick','addActions','Action','getActions','findOne','eml-format','rimraf','request-promise','moment','bluebird','mustache','path','sox','to-csv','fs-extra','lodash','squel','desk.js','querystring','ioredis','../../components/auth/service'];(function(_0x33032e,_0x31411a){var _0x13316b=function(_0x2fb049){while(--_0x2fb049){_0x33032e['push'](_0x33032e['shift']());}};_0x13316b(++_0x31411a);}(_0x5bf0,0x98));var _0x05bf=function(_0x1c8606,_0x3b75f9){_0x1c8606=_0x1c8606-0x0;var _0x58ff61=_0x5bf0[_0x1c8606];return _0x58ff61;};'use strict';var emlformat=require(_0x05bf('0x0'));var rimraf=require(_0x05bf('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x05bf('0x2'));var moment=require(_0x05bf('0x3'));var BPromise=require(_0x05bf('0x4'));var Mustache=require(_0x05bf('0x5'));var util=require('util');var path=require(_0x05bf('0x6'));var sox=require(_0x05bf('0x7'));var csv=require(_0x05bf('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x05bf('0x9'));var _=require(_0x05bf('0xa'));var squel=require(_0x05bf('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x05bf('0xc'));var toCsv=require(_0x05bf('0x8'));var querystring=require(_0x05bf('0xd'));var Papa=require('papaparse');var Redis=require(_0x05bf('0xe'));var authService=require(_0x05bf('0xf'));var qs=require(_0x05bf('0x10'));var as=require(_0x05bf('0x11'));var hardwareService=require(_0x05bf('0x12'));var logger=require(_0x05bf('0x13'))(_0x05bf('0x14'));var utils=require(_0x05bf('0x15'));var config=require(_0x05bf('0x16'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x55c98e,_0x145006){_0x145006=_0x145006||0xcc;return function(_0xfbaea8){if(_0xfbaea8){return _0x55c98e[_0x05bf('0x17')](_0x145006);}return _0x55c98e[_0x05bf('0x18')](_0x145006)[_0x05bf('0x19')]();};}function respondWithResult(_0x544791,_0x21ea0f){_0x21ea0f=_0x21ea0f||0xc8;return function(_0x95b719){if(_0x95b719){return _0x544791[_0x05bf('0x18')](_0x21ea0f)[_0x05bf('0x1a')](_0x95b719);}};}function respondWithFilteredResult(_0x5a1dd8,_0x65481f){return function(_0x3eb6cf){if(_0x3eb6cf){var _0x4a8886=typeof _0x65481f[_0x05bf('0x1b')]===_0x05bf('0x1c')&&typeof _0x65481f['limit']===_0x05bf('0x1c');var _0x1b300a=_0x3eb6cf[_0x05bf('0x1d')];var _0x409d0b=_0x4a8886?0x0:_0x65481f[_0x05bf('0x1b')];var _0x48cdb4=_0x4a8886?_0x3eb6cf[_0x05bf('0x1d')]:_0x65481f[_0x05bf('0x1b')]+_0x65481f[_0x05bf('0x1e')];var _0x234918;if(_0x48cdb4>=_0x1b300a){_0x48cdb4=_0x1b300a;_0x234918=0xc8;}else{_0x234918=0xce;}_0x5a1dd8[_0x05bf('0x18')](_0x234918);return _0x5a1dd8[_0x05bf('0x1f')](_0x05bf('0x20'),_0x409d0b+'-'+_0x48cdb4+'/'+_0x1b300a)['json'](_0x3eb6cf);}return null;};}function patchUpdates(_0x50afb8){return function(_0x8478ec){try{jsonpatch['apply'](_0x8478ec,_0x50afb8,!![]);}catch(_0x824e99){return BPromise[_0x05bf('0x21')](_0x824e99);}return _0x8478ec[_0x05bf('0x22')]();};}function saveUpdates(_0x394e2b,_0x24a484){return function(_0x59a816){if(_0x59a816){return _0x59a816[_0x05bf('0x23')](_0x394e2b)[_0x05bf('0x24')](function(_0x2e0bce){return _0x2e0bce;});}return null;};}function removeEntity(_0xaa91cc,_0x49a027){return function(_0x2654b1){if(_0x2654b1){return _0x2654b1[_0x05bf('0x25')]()[_0x05bf('0x24')](function(){_0xaa91cc['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x546b15,_0x1701b2){return function(_0x1a1984){if(!_0x1a1984){_0x546b15[_0x05bf('0x17')](0x194);}return _0x1a1984;};}function handleError(_0x889a4e,_0x1dcf49){_0x1dcf49=_0x1dcf49||0x1f4;return function(_0x40f00b){logger[_0x05bf('0x26')](_0x40f00b[_0x05bf('0x27')]);if(_0x40f00b[_0x05bf('0x28')]){delete _0x40f00b[_0x05bf('0x28')];}_0x889a4e[_0x05bf('0x18')](_0x1dcf49)['send'](_0x40f00b);};}exports[_0x05bf('0x29')]=function(_0x2152c1,_0x4f1861){var _0x13e38c={},_0xbbbdd1={},_0x11f5d8={'count':0x0,'rows':[]};var _0x2d98d6=_[_0x05bf('0x2a')](db[_0x05bf('0x2b')]['rawAttributes'],function(_0x1fc136){return{'name':_0x1fc136[_0x05bf('0x2c')],'type':_0x1fc136[_0x05bf('0x2d')][_0x05bf('0x2e')]};});_0xbbbdd1[_0x05bf('0x2f')]=_[_0x05bf('0x2a')](_0x2d98d6,_0x05bf('0x28'));_0xbbbdd1[_0x05bf('0x30')]=_[_0x05bf('0x31')](_0x2152c1['query']);_0xbbbdd1[_0x05bf('0x32')]=_['intersection'](_0xbbbdd1[_0x05bf('0x2f')],_0xbbbdd1[_0x05bf('0x30')]);_0x13e38c[_0x05bf('0x33')]=_[_0x05bf('0x34')](_0xbbbdd1['model'],qs[_0x05bf('0x35')](_0x2152c1[_0x05bf('0x30')]['fields']));_0x13e38c[_0x05bf('0x33')]=_0x13e38c['attributes'][_0x05bf('0x36')]?_0x13e38c[_0x05bf('0x33')]:_0xbbbdd1[_0x05bf('0x2f')];if(!_0x2152c1[_0x05bf('0x30')][_0x05bf('0x37')](_0x05bf('0x38'))){_0x13e38c[_0x05bf('0x1e')]=qs['limit'](_0x2152c1[_0x05bf('0x30')][_0x05bf('0x1e')]);_0x13e38c[_0x05bf('0x1b')]=qs[_0x05bf('0x1b')](_0x2152c1[_0x05bf('0x30')]['offset']);}_0x13e38c[_0x05bf('0x39')]=qs[_0x05bf('0x3a')](_0x2152c1[_0x05bf('0x30')][_0x05bf('0x3a')]);_0x13e38c[_0x05bf('0x3b')]=qs[_0x05bf('0x32')](_['pick'](_0x2152c1[_0x05bf('0x30')],_0xbbbdd1[_0x05bf('0x32')]),_0x2d98d6);if(_0x2152c1[_0x05bf('0x30')][_0x05bf('0x3c')]){_0x13e38c[_0x05bf('0x3b')]=_['merge'](_0x13e38c[_0x05bf('0x3b')],{'$or':_[_0x05bf('0x2a')](_0x2d98d6,function(_0x121dda){if(_0x121dda[_0x05bf('0x2d')]!==_0x05bf('0x3d')){var _0x104ebb={};_0x104ebb[_0x121dda[_0x05bf('0x28')]]={'$like':'%'+_0x2152c1[_0x05bf('0x30')][_0x05bf('0x3c')]+'%'};return _0x104ebb;}})});}_0x13e38c=_[_0x05bf('0x3e')]({},_0x13e38c,_0x2152c1['options']);var _0x3eb50a={'where':_0x13e38c[_0x05bf('0x3b')]};return db[_0x05bf('0x2b')][_0x05bf('0x1d')](_0x3eb50a)['then'](function(_0x19c180){_0x11f5d8['count']=_0x19c180;if(_0x2152c1[_0x05bf('0x30')][_0x05bf('0x3f')]){_0x13e38c[_0x05bf('0x40')]=[{'all':!![]}];}return db[_0x05bf('0x2b')]['findAll'](_0x13e38c);})[_0x05bf('0x24')](function(_0x45aa2f){_0x11f5d8[_0x05bf('0x41')]=_0x45aa2f;return _0x11f5d8;})[_0x05bf('0x24')](respondWithFilteredResult(_0x4f1861,_0x13e38c))[_0x05bf('0x42')](handleError(_0x4f1861,null));};exports[_0x05bf('0x43')]=function(_0x1d6550,_0x3f1464){var _0x191425={'raw':![],'where':{'id':_0x1d6550[_0x05bf('0x44')]['id']}},_0x564ec4={};_0x564ec4[_0x05bf('0x2f')]=_['keys'](db[_0x05bf('0x2b')][_0x05bf('0x45')]);_0x564ec4[_0x05bf('0x30')]=_[_0x05bf('0x31')](_0x1d6550['query']);_0x564ec4[_0x05bf('0x32')]=_[_0x05bf('0x34')](_0x564ec4['model'],_0x564ec4[_0x05bf('0x30')]);_0x191425[_0x05bf('0x33')]=_[_0x05bf('0x34')](_0x564ec4['model'],qs[_0x05bf('0x35')](_0x1d6550[_0x05bf('0x30')][_0x05bf('0x35')]));_0x191425['attributes']=_0x191425[_0x05bf('0x33')][_0x05bf('0x36')]?_0x191425[_0x05bf('0x33')]:_0x564ec4[_0x05bf('0x2f')];if(_0x1d6550[_0x05bf('0x30')][_0x05bf('0x3f')]){_0x191425['include']=[{'all':!![]}];}_0x191425=_[_0x05bf('0x3e')]({},_0x191425,_0x1d6550[_0x05bf('0x46')]);return db['Automation'][_0x05bf('0x47')](_0x191425)[_0x05bf('0x24')](handleEntityNotFound(_0x3f1464,null))[_0x05bf('0x24')](respondWithResult(_0x3f1464,null))[_0x05bf('0x42')](handleError(_0x3f1464,null));};exports[_0x05bf('0x48')]=function(_0x4253c5,_0x48544b){return db['Automation'][_0x05bf('0x48')](_0x4253c5[_0x05bf('0x49')],{})['then'](respondWithResult(_0x48544b,0xc9))[_0x05bf('0x42')](handleError(_0x48544b,null));};exports[_0x05bf('0x23')]=function(_0x474058,_0x1c34cf){if(_0x474058[_0x05bf('0x49')]['id']){delete _0x474058[_0x05bf('0x49')]['id'];}return db[_0x05bf('0x2b')][_0x05bf('0x47')]({'where':{'id':_0x474058[_0x05bf('0x44')]['id']}})[_0x05bf('0x24')](handleEntityNotFound(_0x1c34cf,null))[_0x05bf('0x24')](saveUpdates(_0x474058['body'],null))[_0x05bf('0x24')](respondWithResult(_0x1c34cf,null))[_0x05bf('0x42')](handleError(_0x1c34cf,null));};exports['destroy']=function(_0x47c52b,_0x21621d){return db[_0x05bf('0x2b')]['find']({'where':{'id':_0x47c52b[_0x05bf('0x44')]['id']}})['then'](handleEntityNotFound(_0x21621d,null))['then'](removeEntity(_0x21621d,null))[_0x05bf('0x42')](handleError(_0x21621d,null));};exports[_0x05bf('0x4a')]=function(_0x1d6885,_0x109387,_0xbfd6e0){return db['Condition'][_0x05bf('0x47')]({'where':{'id':_0x1d6885[_0x05bf('0x44')]['id']}})['then'](handleEntityNotFound(_0x109387,null))[_0x05bf('0x24')](function(_0x11b125){if(_0x11b125){return _0x11b125[_0x05bf('0x4a')](_0x1d6885[_0x05bf('0x49')][_0x05bf('0x4b')],_[_0x05bf('0x4c')](_0x1d6885[_0x05bf('0x49')],['ids','id'])||{});}})[_0x05bf('0x24')](respondWithResult(_0x109387,null))['catch'](handleError(_0x109387,null));};exports[_0x05bf('0x4d')]=function(_0x72156c,_0x5d99f5,_0x5daced){var _0x1133b9={};var _0x5730f2={};var _0xbe29cb;var _0x16088c;return db[_0x05bf('0x2b')]['findOne']({'where':{'id':_0x72156c[_0x05bf('0x44')]['id']}})[_0x05bf('0x24')](handleEntityNotFound(_0x5d99f5,null))[_0x05bf('0x24')](function(_0x14889d){if(_0x14889d){_0xbe29cb=_0x14889d;_0x5730f2[_0x05bf('0x2f')]=_[_0x05bf('0x31')](db[_0x05bf('0x4e')]['rawAttributes']);_0x5730f2['query']=_[_0x05bf('0x31')](_0x72156c[_0x05bf('0x30')]);_0x5730f2[_0x05bf('0x32')]=_[_0x05bf('0x34')](_0x5730f2['model'],_0x5730f2[_0x05bf('0x30')]);_0x1133b9[_0x05bf('0x33')]=_[_0x05bf('0x34')](_0x5730f2[_0x05bf('0x2f')],qs[_0x05bf('0x35')](_0x72156c[_0x05bf('0x30')][_0x05bf('0x35')]));_0x1133b9['attributes']=_0x1133b9[_0x05bf('0x33')]['length']?_0x1133b9[_0x05bf('0x33')]:_0x5730f2[_0x05bf('0x2f')];_0x1133b9[_0x05bf('0x39')]=qs[_0x05bf('0x3a')](_0x72156c[_0x05bf('0x30')][_0x05bf('0x3a')]);_0x1133b9['where']=qs[_0x05bf('0x32')](_[_0x05bf('0x4f')](_0x72156c[_0x05bf('0x30')],_0x5730f2[_0x05bf('0x32')]));if(_0x72156c[_0x05bf('0x30')]['filter']){_0x1133b9[_0x05bf('0x3b')]=_['merge'](_0x1133b9[_0x05bf('0x3b')],{'$or':_[_0x05bf('0x2a')](_0x1133b9[_0x05bf('0x33')],function(_0x5a1036){var _0x101806={};_0x101806[_0x5a1036]={'$like':'%'+_0x72156c[_0x05bf('0x30')]['filter']+'%'};return _0x101806;})});}_0x1133b9=_[_0x05bf('0x3e')]({},_0x1133b9,_0x72156c[_0x05bf('0x46')]);return _0xbe29cb['getConditions'](_0x1133b9);}})[_0x05bf('0x24')](function(_0x3b28e4){if(_0x3b28e4){_0x16088c=_0x3b28e4[_0x05bf('0x36')];if(!_0x72156c['query'][_0x05bf('0x37')](_0x05bf('0x38'))){_0x1133b9[_0x05bf('0x1e')]=qs[_0x05bf('0x1e')](_0x72156c[_0x05bf('0x30')][_0x05bf('0x1e')]);_0x1133b9[_0x05bf('0x1b')]=qs['offset'](_0x72156c[_0x05bf('0x30')][_0x05bf('0x1b')]);}return _0xbe29cb[_0x05bf('0x4d')](_0x1133b9);}})['then'](function(_0xf97bf7){if(_0xf97bf7){return _0xf97bf7?{'count':_0x16088c,'rows':_0xf97bf7}:null;}})[_0x05bf('0x24')](respondWithResult(_0x5d99f5,null))[_0x05bf('0x42')](handleError(_0x5d99f5,null));};exports[_0x05bf('0x50')]=function(_0x5c5737,_0x507e2a,_0x43e430){return db[_0x05bf('0x51')][_0x05bf('0x47')]({'where':{'id':_0x5c5737['params']['id']}})[_0x05bf('0x24')](handleEntityNotFound(_0x507e2a,null))[_0x05bf('0x24')](function(_0x1a4252){if(_0x1a4252){return _0x1a4252[_0x05bf('0x50')](_0x5c5737[_0x05bf('0x49')][_0x05bf('0x4b')],_['omit'](_0x5c5737[_0x05bf('0x49')],['ids','id'])||{});}})[_0x05bf('0x24')](respondWithResult(_0x507e2a,null))[_0x05bf('0x42')](handleError(_0x507e2a,null));};exports[_0x05bf('0x52')]=function(_0x56ba5f,_0x50cea7,_0x34edaf){var _0x5248db={};var _0x38a42d={};var _0x31df52;var _0x3b3a1f;return db[_0x05bf('0x2b')][_0x05bf('0x53')]({'where':{'id':_0x56ba5f[_0x05bf('0x44')]['id']}})[_0x05bf('0x24')](handleEntityNotFound(_0x50cea7,null))[_0x05bf('0x24')](function(_0x2ef8cb){if(_0x2ef8cb){_0x31df52=_0x2ef8cb;_0x38a42d['model']=_['keys'](db[_0x05bf('0x51')][_0x05bf('0x45')]);_0x38a42d['query']=_['keys'](_0x56ba5f[_0x05bf('0x30')]);_0x38a42d['filters']=_[_0x05bf('0x34')](_0x38a42d[_0x05bf('0x2f')],_0x38a42d[_0x05bf('0x30')]);_0x5248db[_0x05bf('0x33')]=_[_0x05bf('0x34')](_0x38a42d[_0x05bf('0x2f')],qs[_0x05bf('0x35')](_0x56ba5f[_0x05bf('0x30')][_0x05bf('0x35')]));_0x5248db[_0x05bf('0x33')]=_0x5248db[_0x05bf('0x33')][_0x05bf('0x36')]?_0x5248db[_0x05bf('0x33')]:_0x38a42d[_0x05bf('0x2f')];_0x5248db[_0x05bf('0x39')]=qs[_0x05bf('0x3a')](_0x56ba5f[_0x05bf('0x30')][_0x05bf('0x3a')]);_0x5248db[_0x05bf('0x3b')]=qs[_0x05bf('0x32')](_[_0x05bf('0x4f')](_0x56ba5f[_0x05bf('0x30')],_0x38a42d[_0x05bf('0x32')]));if(_0x56ba5f[_0x05bf('0x30')][_0x05bf('0x3c')]){_0x5248db[_0x05bf('0x3b')]=_[_0x05bf('0x3e')](_0x5248db[_0x05bf('0x3b')],{'$or':_[_0x05bf('0x2a')](_0x5248db[_0x05bf('0x33')],function(_0x3ae49f){var _0x26fd8b={};_0x26fd8b[_0x3ae49f]={'$like':'%'+_0x56ba5f[_0x05bf('0x30')]['filter']+'%'};return _0x26fd8b;})});}_0x5248db=_[_0x05bf('0x3e')]({},_0x5248db,_0x56ba5f[_0x05bf('0x46')]);return _0x31df52[_0x05bf('0x52')](_0x5248db);}})[_0x05bf('0x24')](function(_0x347ee9){if(_0x347ee9){_0x3b3a1f=_0x347ee9[_0x05bf('0x36')];if(!_0x56ba5f[_0x05bf('0x30')][_0x05bf('0x37')](_0x05bf('0x38'))){_0x5248db[_0x05bf('0x1e')]=qs[_0x05bf('0x1e')](_0x56ba5f[_0x05bf('0x30')][_0x05bf('0x1e')]);_0x5248db[_0x05bf('0x1b')]=qs['offset'](_0x56ba5f[_0x05bf('0x30')][_0x05bf('0x1b')]);}return _0x31df52[_0x05bf('0x52')](_0x5248db);}})['then'](function(_0x44a0db){if(_0x44a0db){return _0x44a0db?{'count':_0x3b3a1f,'rows':_0x44a0db}:null;}})[_0x05bf('0x24')](respondWithResult(_0x50cea7,null))[_0x05bf('0x42')](handleError(_0x50cea7,null));};
\ No newline at end of file
+var _0x8f31=['key','model','map','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','filters','pick','filter','where','VIRTUAL','options','Automation','includeAll','include','findAll','rows','show','params','keys','merge','find','catch','create','body','Condition','ids','omit','getConditions','order','addActions','getActions','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','path','fs-extra','lodash','squel','crypto','jsforce','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','save','update','then','error','name','send','index','rawAttributes','type'];(function(_0x5ad1d7,_0x2dd2cf){var _0xcf4632=function(_0x5f5d9e){while(--_0x5f5d9e){_0x5ad1d7['push'](_0x5ad1d7['shift']());}};_0xcf4632(++_0x2dd2cf);}(_0x8f31,0x112));var _0x18f3=function(_0x2af160,_0x765b1){_0x2af160=_0x2af160-0x0;var _0x439d67=_0x8f31[_0x2af160];return _0x439d67;};'use strict';var emlformat=require(_0x18f3('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x18f3('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x18f3('0x2'));var moment=require(_0x18f3('0x3'));var BPromise=require(_0x18f3('0x4'));var Mustache=require(_0x18f3('0x5'));var util=require(_0x18f3('0x6'));var path=require(_0x18f3('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x18f3('0x8'));var _=require(_0x18f3('0x9'));var squel=require(_0x18f3('0xa'));var crypto=require(_0x18f3('0xb'));var jsforce=require(_0x18f3('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x18f3('0xd'));var querystring=require(_0x18f3('0xe'));var Papa=require('papaparse');var Redis=require(_0x18f3('0xf'));var authService=require(_0x18f3('0x10'));var qs=require(_0x18f3('0x11'));var as=require(_0x18f3('0x12'));var hardwareService=require(_0x18f3('0x13'));var logger=require('../../config/logger')(_0x18f3('0x14'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x18f3('0x15'));var db=require(_0x18f3('0x16'))['db'];function respondWithStatusCode(_0x24e65e,_0x4c990a){_0x4c990a=_0x4c990a||0xcc;return function(_0x3d2265){if(_0x3d2265){return _0x24e65e[_0x18f3('0x17')](_0x4c990a);}return _0x24e65e[_0x18f3('0x18')](_0x4c990a)[_0x18f3('0x19')]();};}function respondWithResult(_0x3960b6,_0x46b99b){_0x46b99b=_0x46b99b||0xc8;return function(_0x1e64fc){if(_0x1e64fc){return _0x3960b6[_0x18f3('0x18')](_0x46b99b)[_0x18f3('0x1a')](_0x1e64fc);}};}function respondWithFilteredResult(_0x352474,_0x351bc3){return function(_0xa24fd9){if(_0xa24fd9){var _0x36f33a=typeof _0x351bc3[_0x18f3('0x1b')]===_0x18f3('0x1c')&&typeof _0x351bc3[_0x18f3('0x1d')]===_0x18f3('0x1c');var _0x190a45=_0xa24fd9[_0x18f3('0x1e')];var _0x2e23f8=_0x36f33a?0x0:_0x351bc3['offset'];var _0x4918e5=_0x36f33a?_0xa24fd9[_0x18f3('0x1e')]:_0x351bc3[_0x18f3('0x1b')]+_0x351bc3[_0x18f3('0x1d')];var _0x272cd0;if(_0x4918e5>=_0x190a45){_0x4918e5=_0x190a45;_0x272cd0=0xc8;}else{_0x272cd0=0xce;}_0x352474[_0x18f3('0x18')](_0x272cd0);return _0x352474['set'](_0x18f3('0x1f'),_0x2e23f8+'-'+_0x4918e5+'/'+_0x190a45)[_0x18f3('0x1a')](_0xa24fd9);}return null;};}function patchUpdates(_0x74b12d){return function(_0x21a303){try{jsonpatch[_0x18f3('0x20')](_0x21a303,_0x74b12d,!![]);}catch(_0x4fdfd2){return BPromise['reject'](_0x4fdfd2);}return _0x21a303[_0x18f3('0x21')]();};}function saveUpdates(_0x4e76ec,_0x2aeace){return function(_0x58d3cc){if(_0x58d3cc){return _0x58d3cc[_0x18f3('0x22')](_0x4e76ec)[_0x18f3('0x23')](function(_0x4f3753){return _0x4f3753;});}return null;};}function removeEntity(_0x9113e4,_0x4def63){return function(_0x2c8d23){if(_0x2c8d23){return _0x2c8d23['destroy']()[_0x18f3('0x23')](function(){_0x9113e4[_0x18f3('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x232e51,_0x266c3a){return function(_0x14ca15){if(!_0x14ca15){_0x232e51['sendStatus'](0x194);}return _0x14ca15;};}function handleError(_0x1a4849,_0x2ad6ea){_0x2ad6ea=_0x2ad6ea||0x1f4;return function(_0xff522b){logger[_0x18f3('0x24')](_0xff522b['stack']);if(_0xff522b[_0x18f3('0x25')]){delete _0xff522b[_0x18f3('0x25')];}_0x1a4849[_0x18f3('0x18')](_0x2ad6ea)[_0x18f3('0x26')](_0xff522b);};}exports[_0x18f3('0x27')]=function(_0x383f95,_0x1fe8e3){var _0x3f9107={},_0x1c3d92={},_0x2e7f91={'count':0x0,'rows':[]};var _0x49e414=_['map'](db['Automation'][_0x18f3('0x28')],function(_0x166d19){return{'name':_0x166d19['fieldName'],'type':_0x166d19[_0x18f3('0x29')][_0x18f3('0x2a')]};});_0x1c3d92[_0x18f3('0x2b')]=_[_0x18f3('0x2c')](_0x49e414,_0x18f3('0x25'));_0x1c3d92[_0x18f3('0x2d')]=_['keys'](_0x383f95[_0x18f3('0x2d')]);_0x1c3d92['filters']=_[_0x18f3('0x2e')](_0x1c3d92[_0x18f3('0x2b')],_0x1c3d92[_0x18f3('0x2d')]);_0x3f9107[_0x18f3('0x2f')]=_['intersection'](_0x1c3d92[_0x18f3('0x2b')],qs[_0x18f3('0x30')](_0x383f95['query'][_0x18f3('0x30')]));_0x3f9107['attributes']=_0x3f9107['attributes'][_0x18f3('0x31')]?_0x3f9107['attributes']:_0x1c3d92[_0x18f3('0x2b')];if(!_0x383f95[_0x18f3('0x2d')][_0x18f3('0x32')](_0x18f3('0x33'))){_0x3f9107[_0x18f3('0x1d')]=qs[_0x18f3('0x1d')](_0x383f95[_0x18f3('0x2d')]['limit']);_0x3f9107[_0x18f3('0x1b')]=qs['offset'](_0x383f95[_0x18f3('0x2d')]['offset']);}_0x3f9107['order']=qs['sort'](_0x383f95['query'][_0x18f3('0x34')]);_0x3f9107['where']=qs[_0x18f3('0x35')](_[_0x18f3('0x36')](_0x383f95[_0x18f3('0x2d')],_0x1c3d92['filters']),_0x49e414);if(_0x383f95[_0x18f3('0x2d')][_0x18f3('0x37')]){_0x3f9107[_0x18f3('0x38')]=_['merge'](_0x3f9107[_0x18f3('0x38')],{'$or':_['map'](_0x49e414,function(_0x21fae3){if(_0x21fae3[_0x18f3('0x29')]!==_0x18f3('0x39')){var _0x7ccd6f={};_0x7ccd6f[_0x21fae3['name']]={'$like':'%'+_0x383f95[_0x18f3('0x2d')]['filter']+'%'};return _0x7ccd6f;}})});}_0x3f9107=_['merge']({},_0x3f9107,_0x383f95[_0x18f3('0x3a')]);var _0xf28f3b={'where':_0x3f9107[_0x18f3('0x38')]};return db[_0x18f3('0x3b')][_0x18f3('0x1e')](_0xf28f3b)[_0x18f3('0x23')](function(_0x1a466a){_0x2e7f91[_0x18f3('0x1e')]=_0x1a466a;if(_0x383f95[_0x18f3('0x2d')][_0x18f3('0x3c')]){_0x3f9107[_0x18f3('0x3d')]=[{'all':!![]}];}return db['Automation'][_0x18f3('0x3e')](_0x3f9107);})[_0x18f3('0x23')](function(_0x1b1a0e){_0x2e7f91[_0x18f3('0x3f')]=_0x1b1a0e;return _0x2e7f91;})[_0x18f3('0x23')](respondWithFilteredResult(_0x1fe8e3,_0x3f9107))['catch'](handleError(_0x1fe8e3,null));};exports[_0x18f3('0x40')]=function(_0x2f0e96,_0x2ef998){var _0x15268d={'raw':![],'where':{'id':_0x2f0e96[_0x18f3('0x41')]['id']}},_0x592835={};_0x592835[_0x18f3('0x2b')]=_[_0x18f3('0x42')](db['Automation'][_0x18f3('0x28')]);_0x592835[_0x18f3('0x2d')]=_['keys'](_0x2f0e96[_0x18f3('0x2d')]);_0x592835[_0x18f3('0x35')]=_[_0x18f3('0x2e')](_0x592835[_0x18f3('0x2b')],_0x592835[_0x18f3('0x2d')]);_0x15268d[_0x18f3('0x2f')]=_['intersection'](_0x592835[_0x18f3('0x2b')],qs[_0x18f3('0x30')](_0x2f0e96[_0x18f3('0x2d')][_0x18f3('0x30')]));_0x15268d[_0x18f3('0x2f')]=_0x15268d[_0x18f3('0x2f')]['length']?_0x15268d[_0x18f3('0x2f')]:_0x592835[_0x18f3('0x2b')];if(_0x2f0e96[_0x18f3('0x2d')][_0x18f3('0x3c')]){_0x15268d['include']=[{'all':!![]}];}_0x15268d=_[_0x18f3('0x43')]({},_0x15268d,_0x2f0e96['options']);return db[_0x18f3('0x3b')][_0x18f3('0x44')](_0x15268d)[_0x18f3('0x23')](handleEntityNotFound(_0x2ef998,null))[_0x18f3('0x23')](respondWithResult(_0x2ef998,null))[_0x18f3('0x45')](handleError(_0x2ef998,null));};exports[_0x18f3('0x46')]=function(_0x135887,_0x418072){return db[_0x18f3('0x3b')][_0x18f3('0x46')](_0x135887[_0x18f3('0x47')],{})[_0x18f3('0x23')](respondWithResult(_0x418072,0xc9))['catch'](handleError(_0x418072,null));};exports[_0x18f3('0x22')]=function(_0x994bb7,_0x16c065){if(_0x994bb7['body']['id']){delete _0x994bb7[_0x18f3('0x47')]['id'];}return db['Automation'][_0x18f3('0x44')]({'where':{'id':_0x994bb7[_0x18f3('0x41')]['id']}})[_0x18f3('0x23')](handleEntityNotFound(_0x16c065,null))[_0x18f3('0x23')](saveUpdates(_0x994bb7['body'],null))[_0x18f3('0x23')](respondWithResult(_0x16c065,null))[_0x18f3('0x45')](handleError(_0x16c065,null));};exports['destroy']=function(_0x50f820,_0x4238cd){return db[_0x18f3('0x3b')][_0x18f3('0x44')]({'where':{'id':_0x50f820['params']['id']}})['then'](handleEntityNotFound(_0x4238cd,null))[_0x18f3('0x23')](removeEntity(_0x4238cd,null))[_0x18f3('0x45')](handleError(_0x4238cd,null));};exports['addConditions']=function(_0x4a7bcf,_0x2aec28,_0x102cbd){return db[_0x18f3('0x48')][_0x18f3('0x44')]({'where':{'id':_0x4a7bcf[_0x18f3('0x41')]['id']}})[_0x18f3('0x23')](handleEntityNotFound(_0x2aec28,null))[_0x18f3('0x23')](function(_0x5cdb69){if(_0x5cdb69){return _0x5cdb69['addConditions'](_0x4a7bcf['body'][_0x18f3('0x49')],_[_0x18f3('0x4a')](_0x4a7bcf[_0x18f3('0x47')],['ids','id'])||{});}})[_0x18f3('0x23')](respondWithResult(_0x2aec28,null))['catch'](handleError(_0x2aec28,null));};exports[_0x18f3('0x4b')]=function(_0x50035e,_0x213c3e,_0x380648){var _0x522212={};var _0x319fd8={};var _0x1b7ad7;var _0x263e4d;return db[_0x18f3('0x3b')]['findOne']({'where':{'id':_0x50035e[_0x18f3('0x41')]['id']}})[_0x18f3('0x23')](handleEntityNotFound(_0x213c3e,null))[_0x18f3('0x23')](function(_0x1f3b9c){if(_0x1f3b9c){_0x1b7ad7=_0x1f3b9c;_0x319fd8[_0x18f3('0x2b')]=_[_0x18f3('0x42')](db[_0x18f3('0x48')][_0x18f3('0x28')]);_0x319fd8[_0x18f3('0x2d')]=_[_0x18f3('0x42')](_0x50035e[_0x18f3('0x2d')]);_0x319fd8[_0x18f3('0x35')]=_['intersection'](_0x319fd8[_0x18f3('0x2b')],_0x319fd8[_0x18f3('0x2d')]);_0x522212[_0x18f3('0x2f')]=_['intersection'](_0x319fd8[_0x18f3('0x2b')],qs['fields'](_0x50035e[_0x18f3('0x2d')]['fields']));_0x522212[_0x18f3('0x2f')]=_0x522212[_0x18f3('0x2f')][_0x18f3('0x31')]?_0x522212[_0x18f3('0x2f')]:_0x319fd8[_0x18f3('0x2b')];_0x522212[_0x18f3('0x4c')]=qs[_0x18f3('0x34')](_0x50035e[_0x18f3('0x2d')][_0x18f3('0x34')]);_0x522212[_0x18f3('0x38')]=qs[_0x18f3('0x35')](_[_0x18f3('0x36')](_0x50035e[_0x18f3('0x2d')],_0x319fd8[_0x18f3('0x35')]));if(_0x50035e['query'][_0x18f3('0x37')]){_0x522212[_0x18f3('0x38')]=_[_0x18f3('0x43')](_0x522212[_0x18f3('0x38')],{'$or':_[_0x18f3('0x2c')](_0x522212[_0x18f3('0x2f')],function(_0x3e1bf1){var _0x4126aa={};_0x4126aa[_0x3e1bf1]={'$like':'%'+_0x50035e[_0x18f3('0x2d')][_0x18f3('0x37')]+'%'};return _0x4126aa;})});}_0x522212=_[_0x18f3('0x43')]({},_0x522212,_0x50035e[_0x18f3('0x3a')]);return _0x1b7ad7['getConditions'](_0x522212);}})[_0x18f3('0x23')](function(_0x34ad53){if(_0x34ad53){_0x263e4d=_0x34ad53[_0x18f3('0x31')];if(!_0x50035e[_0x18f3('0x2d')][_0x18f3('0x32')](_0x18f3('0x33'))){_0x522212[_0x18f3('0x1d')]=qs['limit'](_0x50035e[_0x18f3('0x2d')][_0x18f3('0x1d')]);_0x522212[_0x18f3('0x1b')]=qs[_0x18f3('0x1b')](_0x50035e[_0x18f3('0x2d')][_0x18f3('0x1b')]);}return _0x1b7ad7[_0x18f3('0x4b')](_0x522212);}})[_0x18f3('0x23')](function(_0x5af722){if(_0x5af722){return _0x5af722?{'count':_0x263e4d,'rows':_0x5af722}:null;}})[_0x18f3('0x23')](respondWithResult(_0x213c3e,null))[_0x18f3('0x45')](handleError(_0x213c3e,null));};exports[_0x18f3('0x4d')]=function(_0x3d813a,_0x1c8446,_0x56d1d7){return db['Action'][_0x18f3('0x44')]({'where':{'id':_0x3d813a[_0x18f3('0x41')]['id']}})[_0x18f3('0x23')](handleEntityNotFound(_0x1c8446,null))[_0x18f3('0x23')](function(_0x172ed6){if(_0x172ed6){return _0x172ed6[_0x18f3('0x4d')](_0x3d813a['body']['ids'],_[_0x18f3('0x4a')](_0x3d813a[_0x18f3('0x47')],[_0x18f3('0x49'),'id'])||{});}})['then'](respondWithResult(_0x1c8446,null))[_0x18f3('0x45')](handleError(_0x1c8446,null));};exports['getActions']=function(_0x56c16c,_0x1817ce,_0x278a65){var _0x4837d7={};var _0x3a071e={};var _0x20ae4f;var _0x3452b9;return db[_0x18f3('0x3b')]['findOne']({'where':{'id':_0x56c16c[_0x18f3('0x41')]['id']}})[_0x18f3('0x23')](handleEntityNotFound(_0x1817ce,null))[_0x18f3('0x23')](function(_0x3c4c7b){if(_0x3c4c7b){_0x20ae4f=_0x3c4c7b;_0x3a071e[_0x18f3('0x2b')]=_['keys'](db['Action']['rawAttributes']);_0x3a071e[_0x18f3('0x2d')]=_[_0x18f3('0x42')](_0x56c16c[_0x18f3('0x2d')]);_0x3a071e[_0x18f3('0x35')]=_[_0x18f3('0x2e')](_0x3a071e[_0x18f3('0x2b')],_0x3a071e[_0x18f3('0x2d')]);_0x4837d7[_0x18f3('0x2f')]=_[_0x18f3('0x2e')](_0x3a071e[_0x18f3('0x2b')],qs[_0x18f3('0x30')](_0x56c16c[_0x18f3('0x2d')][_0x18f3('0x30')]));_0x4837d7[_0x18f3('0x2f')]=_0x4837d7[_0x18f3('0x2f')][_0x18f3('0x31')]?_0x4837d7[_0x18f3('0x2f')]:_0x3a071e['model'];_0x4837d7[_0x18f3('0x4c')]=qs[_0x18f3('0x34')](_0x56c16c['query']['sort']);_0x4837d7[_0x18f3('0x38')]=qs[_0x18f3('0x35')](_[_0x18f3('0x36')](_0x56c16c['query'],_0x3a071e[_0x18f3('0x35')]));if(_0x56c16c['query'][_0x18f3('0x37')]){_0x4837d7[_0x18f3('0x38')]=_[_0x18f3('0x43')](_0x4837d7[_0x18f3('0x38')],{'$or':_['map'](_0x4837d7['attributes'],function(_0x5e57ef){var _0x42be39={};_0x42be39[_0x5e57ef]={'$like':'%'+_0x56c16c['query'][_0x18f3('0x37')]+'%'};return _0x42be39;})});}_0x4837d7=_['merge']({},_0x4837d7,_0x56c16c[_0x18f3('0x3a')]);return _0x20ae4f['getActions'](_0x4837d7);}})[_0x18f3('0x23')](function(_0x53c8e5){if(_0x53c8e5){_0x3452b9=_0x53c8e5[_0x18f3('0x31')];if(!_0x56c16c['query'][_0x18f3('0x32')]('nolimit')){_0x4837d7[_0x18f3('0x1d')]=qs[_0x18f3('0x1d')](_0x56c16c[_0x18f3('0x2d')][_0x18f3('0x1d')]);_0x4837d7[_0x18f3('0x1b')]=qs['offset'](_0x56c16c['query'][_0x18f3('0x1b')]);}return _0x20ae4f[_0x18f3('0x4e')](_0x4837d7);}})['then'](function(_0xb6b383){if(_0xb6b383){return _0xb6b383?{'count':_0x3452b9,'rows':_0xb6b383}:null;}})[_0x18f3('0x23')](respondWithResult(_0x1817ce,null))[_0x18f3('0x45')](handleError(_0x1817ce,null));};
\ No newline at end of file
diff --git a/server/api/automation/automation.model.js b/server/api/automation/automation.model.js
index d8935de..ace8033 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 _0x10bd=['exports','Automation','tools_automations','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./automation.attributes'];(function(_0x215d5b,_0xce342a){var _0x41466b=function(_0x52a8c8){while(--_0x52a8c8){_0x215d5b['push'](_0x215d5b['shift']());}};_0x41466b(++_0xce342a);}(_0x10bd,0x1ca));var _0xd10b=function(_0x1b3d60,_0x51583b){_0x1b3d60=_0x1b3d60-0x0;var _0x4abc3d=_0x10bd[_0x1b3d60];return _0x4abc3d;};'use strict';var _=require(_0xd10b('0x0'));var util=require(_0xd10b('0x1'));var logger=require(_0xd10b('0x2'))(_0xd10b('0x3'));var moment=require(_0xd10b('0x4'));var BPromise=require(_0xd10b('0x5'));var rp=require(_0xd10b('0x6'));var fs=require('fs');var path=require(_0xd10b('0x7'));var rimraf=require(_0xd10b('0x8'));var config=require('../../config/environment');var attributes=require(_0xd10b('0x9'));module[_0xd10b('0xa')]=function(_0x3cedda,_0xa2b51c){return _0x3cedda['define'](_0xd10b('0xb'),attributes,{'tableName':_0xd10b('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xd8de=['define','Automation','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./automation.attributes'];(function(_0x27031e,_0x1eb8cd){var _0xfd46b3=function(_0x9fdcf8){while(--_0x9fdcf8){_0x27031e['push'](_0x27031e['shift']());}};_0xfd46b3(++_0x1eb8cd);}(_0xd8de,0x86));var _0xed8d=function(_0x4640ac,_0x250a16){_0x4640ac=_0x4640ac-0x0;var _0x91b38c=_0xd8de[_0x4640ac];return _0x91b38c;};'use strict';var _=require(_0xed8d('0x0'));var util=require(_0xed8d('0x1'));var logger=require(_0xed8d('0x2'))(_0xed8d('0x3'));var moment=require(_0xed8d('0x4'));var BPromise=require(_0xed8d('0x5'));var rp=require(_0xed8d('0x6'));var fs=require('fs');var path=require(_0xed8d('0x7'));var rimraf=require(_0xed8d('0x8'));var config=require('../../config/environment');var attributes=require(_0xed8d('0x9'));module['exports']=function(_0x40338f,_0x1aada6){return _0x40338f[_0xed8d('0xa')](_0xed8d('0xb'),attributes,{'tableName':'tools_automations','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 54af947..2e490c4 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 _0x4910=['moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','Automation,\x20%s,\x20%s,\x20%s','stringify','error','code','Automation,\x20%s,\x20%s','message','result','catch','lodash','util'];(function(_0x5eecc0,_0x43ae17){var _0x1887ad=function(_0x32b1a4){while(--_0x32b1a4){_0x5eecc0['push'](_0x5eecc0['shift']());}};_0x1887ad(++_0x43ae17);}(_0x4910,0x1d9));var _0x0491=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0x4910[_0x4565bf];return _0x5610ba;};'use strict';var _=require(_0x0491('0x0'));var util=require(_0x0491('0x1'));var moment=require(_0x0491('0x2'));var BPromise=require('bluebird');var rs=require(_0x0491('0x3'));var fs=require('fs');var Redis=require(_0x0491('0x4'));var db=require(_0x0491('0x5'))['db'];var utils=require(_0x0491('0x6'));var logger=require(_0x0491('0x7'))('rpc');var config=require(_0x0491('0x8'));var jayson=require(_0x0491('0x9'));var client=jayson[_0x0491('0xa')][_0x0491('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x27e7d5,_0x4ba9e5,_0x3b7b10){return new BPromise(function(_0x29c0d0,_0xf50a53){return client[_0x0491('0xc')](_0x27e7d5,_0x3b7b10)[_0x0491('0xd')](function(_0x4822d5){logger[_0x0491('0xe')]('Automation,\x20%s,\x20%s',_0x4ba9e5,_0x0491('0xf'));logger[_0x0491('0x10')](_0x0491('0x11'),_0x4ba9e5,_0x0491('0xf'),JSON[_0x0491('0x12')](_0x4822d5));if(_0x4822d5[_0x0491('0x13')]){if(_0x4822d5[_0x0491('0x13')][_0x0491('0x14')]===0x1f4){logger[_0x0491('0x13')](_0x0491('0x15'),_0x4ba9e5,_0x4822d5['error'][_0x0491('0x16')]);return _0xf50a53(_0x4822d5['error'][_0x0491('0x16')]);}logger['error']('Automation,\x20%s,\x20%s',_0x4ba9e5,_0x4822d5[_0x0491('0x13')][_0x0491('0x16')]);return _0x29c0d0(_0x4822d5[_0x0491('0x13')][_0x0491('0x16')]);}else{logger[_0x0491('0xe')](_0x0491('0x15'),_0x4ba9e5,_0x0491('0xf'));_0x29c0d0(_0x4822d5[_0x0491('0x17')][_0x0491('0x16')]);}})[_0x0491('0x18')](function(_0x527415){logger[_0x0491('0x13')](_0x0491('0x15'),_0x4ba9e5,_0x527415);_0xf50a53(_0x527415);});});}
\ No newline at end of file
+var _0x757a=['request','then','info','Automation,\x20%s,\x20%s','request\x20sent','debug','Automation,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','util','moment','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http'];(function(_0x591da9,_0x404309){var _0x4fc0fd=function(_0x4611be){while(--_0x4611be){_0x591da9['push'](_0x591da9['shift']());}};_0x4fc0fd(++_0x404309);}(_0x757a,0xde));var _0xa757=function(_0x1cbb84,_0x570915){_0x1cbb84=_0x1cbb84-0x0;var _0x307b87=_0x757a[_0x1cbb84];return _0x307b87;};'use strict';var _=require('lodash');var util=require(_0xa757('0x0'));var moment=require(_0xa757('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa757('0x2'))['db'];var utils=require(_0xa757('0x3'));var logger=require(_0xa757('0x4'))(_0xa757('0x5'));var config=require(_0xa757('0x6'));var jayson=require(_0xa757('0x7'));var client=jayson['client'][_0xa757('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4343b6,_0x53be0e,_0x2930fa){return new BPromise(function(_0x2f7793,_0x447344){return client[_0xa757('0x9')](_0x4343b6,_0x2930fa)[_0xa757('0xa')](function(_0x5aef8a){logger[_0xa757('0xb')](_0xa757('0xc'),_0x53be0e,_0xa757('0xd'));logger[_0xa757('0xe')](_0xa757('0xf'),_0x53be0e,_0xa757('0xd'),JSON[_0xa757('0x10')](_0x5aef8a));if(_0x5aef8a['error']){if(_0x5aef8a['error']['code']===0x1f4){logger['error']('Automation,\x20%s,\x20%s',_0x53be0e,_0x5aef8a[_0xa757('0x11')]['message']);return _0x447344(_0x5aef8a['error'][_0xa757('0x12')]);}logger['error']('Automation,\x20%s,\x20%s',_0x53be0e,_0x5aef8a[_0xa757('0x11')][_0xa757('0x12')]);return _0x2f7793(_0x5aef8a[_0xa757('0x11')][_0xa757('0x12')]);}else{logger[_0xa757('0xb')](_0xa757('0xc'),_0x53be0e,_0xa757('0xd'));_0x2f7793(_0x5aef8a[_0xa757('0x13')][_0xa757('0x12')]);}})[_0xa757('0x14')](function(_0x50aac1){logger[_0xa757('0x11')](_0xa757('0xc'),_0x53be0e,_0x50aac1);_0x447344(_0x50aac1);});});}
\ No newline at end of file
diff --git a/server/api/automation/index.js b/server/api/automation/index.js
index 3af0e63..ee05a41 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 _0x7bbd=['show','/:id/conditions','getConditions','getActions','addConditions','post','/:id/actions','addActions','put','delete','destroy','exports','multer','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./automation.controller','get','/:id','isAuthenticated'];(function(_0x48a73e,_0x39f1ac){var _0x390c0b=function(_0x369beb){while(--_0x369beb){_0x48a73e['push'](_0x48a73e['shift']());}};_0x390c0b(++_0x39f1ac);}(_0x7bbd,0x12c));var _0xd7bb=function(_0x4ecf9d,_0x5e9b0){_0x4ecf9d=_0x4ecf9d-0x0;var _0x49c780=_0x7bbd[_0x4ecf9d];return _0x49c780;};'use strict';var multer=require(_0xd7bb('0x0'));var util=require('util');var path=require(_0xd7bb('0x1'));var timeout=require(_0xd7bb('0x2'));var express=require(_0xd7bb('0x3'));var router=express['Router']();var fs_extra=require(_0xd7bb('0x4'));var auth=require(_0xd7bb('0x5'));var interaction=require(_0xd7bb('0x6'));var config=require(_0xd7bb('0x7'));var controller=require(_0xd7bb('0x8'));router[_0xd7bb('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0xd7bb('0x9')](_0xd7bb('0xa'),auth[_0xd7bb('0xb')](),controller[_0xd7bb('0xc')]);router[_0xd7bb('0x9')](_0xd7bb('0xd'),auth['isAuthenticated'](),controller[_0xd7bb('0xe')]);router['get']('/:id/actions',auth[_0xd7bb('0xb')](),controller[_0xd7bb('0xf')]);router['post']('/',auth[_0xd7bb('0xb')](),controller['create']);router['post']('/:id/conditions',auth['isAuthenticated'](),controller[_0xd7bb('0x10')]);router[_0xd7bb('0x11')](_0xd7bb('0x12'),auth[_0xd7bb('0xb')](),controller[_0xd7bb('0x13')]);router[_0xd7bb('0x14')]('/:id',auth[_0xd7bb('0xb')](),controller['update']);router[_0xd7bb('0x15')](_0xd7bb('0xa'),auth[_0xd7bb('0xb')](),controller[_0xd7bb('0x16')]);module[_0xd7bb('0x17')]=router;
\ No newline at end of file
+var _0xfaec=['get','isAuthenticated','show','getConditions','/:id/actions','getActions','post','create','/:id/conditions','addActions','put','update','delete','/:id','exports','multer','util','path','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./automation.controller','index'];(function(_0x5ad2b3,_0x1d9ec4){var _0x32677d=function(_0x394a3d){while(--_0x394a3d){_0x5ad2b3['push'](_0x5ad2b3['shift']());}};_0x32677d(++_0x1d9ec4);}(_0xfaec,0x12f));var _0xcfae=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0xfaec[_0x397e5f];return _0x5302b8;};'use strict';var multer=require(_0xcfae('0x0'));var util=require(_0xcfae('0x1'));var path=require(_0xcfae('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0xcfae('0x3'));var auth=require(_0xcfae('0x4'));var interaction=require(_0xcfae('0x5'));var config=require(_0xcfae('0x6'));var controller=require(_0xcfae('0x7'));router['get']('/',auth['isAuthenticated'](),controller[_0xcfae('0x8')]);router[_0xcfae('0x9')]('/:id',auth[_0xcfae('0xa')](),controller[_0xcfae('0xb')]);router['get']('/:id/conditions',auth[_0xcfae('0xa')](),controller[_0xcfae('0xc')]);router[_0xcfae('0x9')](_0xcfae('0xd'),auth['isAuthenticated'](),controller[_0xcfae('0xe')]);router[_0xcfae('0xf')]('/',auth['isAuthenticated'](),controller[_0xcfae('0x10')]);router[_0xcfae('0xf')](_0xcfae('0x11'),auth[_0xcfae('0xa')](),controller['addConditions']);router[_0xcfae('0xf')]('/:id/actions',auth[_0xcfae('0xa')](),controller[_0xcfae('0x12')]);router[_0xcfae('0x13')]('/:id',auth[_0xcfae('0xa')](),controller[_0xcfae('0x14')]);router[_0xcfae('0x15')](_0xcfae('0x16'),auth[_0xcfae('0xa')](),controller['destroy']);module[_0xcfae('0x17')]=router;
\ No newline at end of file
diff --git a/server/api/campaign/campaign.attributes.js b/server/api/campaign/campaign.attributes.js
index 5e3d503..3001554 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 _0x9b30=['#AMD\x20Min\x20Word\x20Length','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Maximum\x20Word\x20Length','ASC','DESC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Drop\x20Retry\x20(min:1,\x20max:999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Machine\x20Retry\x20(min:1,\x20max:999)','Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','sequelize','exports','ivr','STRING','BOOLEAN','Active/Disactive\x20Campaign','Max\x20200\x20calls.','INTEGER','UNSIGNED','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Busy\x20Retry\x20(min:1,\x20max:999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','ENUM','always','never','onlyIfOpen','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time'];(function(_0x48ed45,_0x5d4828){var _0x31c7c5=function(_0x81bd45){while(--_0x81bd45){_0x48ed45['push'](_0x48ed45['shift']());}};_0x31c7c5(++_0x5d4828);}(_0x9b30,0x19b));var _0x09b3=function(_0x4a3898,_0x4c9853){_0x4a3898=_0x4a3898-0x0;var _0x25ceb0=_0x9b30[_0x4a3898];return _0x25ceb0;};'use strict';var Sequelize=require(_0x09b3('0x0'));module[_0x09b3('0x1')]={'name':{'type':Sequelize['STRING'],'unique':'name','allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize['ENUM'](_0x09b3('0x2')),'allowNull':![],'defaultValue':_0x09b3('0x2')},'description':{'type':Sequelize[_0x09b3('0x3')]},'active':{'type':Sequelize[_0x09b3('0x4')],'defaultValue':0x0,'comment':_0x09b3('0x5')},'limitCalls':{'type':Sequelize['INTEGER'](0x4)['UNSIGNED'],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0x09b3('0x6')},'dialOriginateCallerIdName':{'type':Sequelize[_0x09b3('0x3')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x09b3('0x3')]},'dialOriginateTimeout':{'type':Sequelize[_0x09b3('0x7')](0x3)[_0x09b3('0x8')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x09b3('0x9')},'dialCongestionMaxRetry':{'type':Sequelize[_0x09b3('0x7')](0x3)[_0x09b3('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Congestion\x20Retry\x20(min:1,\x20max:999)'},'dialCongestionRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x09b3('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x09b3('0xa')},'dialBusyMaxRetry':{'type':Sequelize[_0x09b3('0x7')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x09b3('0xb')},'dialBusyRetryFrequency':{'type':Sequelize[_0x09b3('0x7')](0x5)[_0x09b3('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x09b3('0x7')](0x3)[_0x09b3('0x8')],'defaultValue':0x3,'comment':_0x09b3('0xc')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x09b3('0x7')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialGlobalMaxRetry':{'type':Sequelize[_0x09b3('0x7')](0x3)['UNSIGNED'],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0x09b3('0xd')},'dialTimezone':{'type':Sequelize[_0x09b3('0x3')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x09b3('0x3')],'defaultValue':_0x09b3('0xe')},'dialCheckDuplicateType':{'type':Sequelize[_0x09b3('0xf')](_0x09b3('0x10'),_0x09b3('0x11'),_0x09b3('0x12')),'defaultValue':_0x09b3('0x10')},'dialAMDActive':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':'Active/Disactive\x20AMD'},'dialAMDInitialSilence':{'type':Sequelize[_0x09b3('0x7')](0x9)[_0x09b3('0x8')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':'#AMD\x20Initial\x20Silence'},'dialAMDGreeting':{'type':Sequelize['INTEGER'](0x9)['UNSIGNED'],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':'#AMD\x20Greeting'},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x09b3('0x7')](0x9)[_0x09b3('0x8')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x09b3('0x13')},'dialAMDTotalAnalysisTime':{'type':Sequelize['INTEGER'](0x9)[_0x09b3('0x8')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x09b3('0x14')},'dialAMDMinWordLength':{'type':Sequelize['INTEGER'](0x9)[_0x09b3('0x8')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x09b3('0x15')},'dialAMDBetweenWordsSilence':{'type':Sequelize['INTEGER'](0x9)[_0x09b3('0x8')],'defaultValue':0x32,'validate':{'min':0x0},'comment':'#AMD\x20Between\x20Words\x20Silence'},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x09b3('0x7')](0x9)[_0x09b3('0x8')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x09b3('0x16')},'dialAMDSilenceThreshold':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':'#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)'},'dialAMDMaximumWordLength':{'type':Sequelize['INTEGER'](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x09b3('0x17')},'dialOrderByScheduledAt':{'type':Sequelize[_0x09b3('0xf')]('DESC',_0x09b3('0x18')),'defaultValue':_0x09b3('0x19')},'dialPrefix':{'type':Sequelize['STRING'],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0x09b3('0x7')](0x3)[_0x09b3('0x8')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x09b3('0x1a')},'dialCutDigit':{'type':Sequelize['INTEGER'](0x3)[_0x09b3('0x8')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x09b3('0x1b')},'dialNoSuchNumberMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x09b3('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x09b3('0x1c')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x09b3('0x7')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x09b3('0x1d')},'dialDropMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x09b3('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x09b3('0x1e')},'dialDropRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x09b3('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x09b3('0x1f')},'dialAbandonedMaxRetry':{'type':Sequelize[_0x09b3('0x7')](0x3)[_0x09b3('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Abandoned\x20Retry\x20(min:1,\x20max:999)'},'dialAbandonedRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x09b3('0x20')},'dialMachineMaxRetry':{'type':Sequelize[_0x09b3('0x7')](0x3)[_0x09b3('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x09b3('0x21')},'dialMachineRetryFrequency':{'type':Sequelize[_0x09b3('0x7')](0x5)[_0x09b3('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x09b3('0x22')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0x09b3('0x7')](0x3)[_0x09b3('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#AgentReject\x20Retry\x20(min:1,\x20max:999)'},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0x09b3('0x7')](0x5)[_0x09b3('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x09b3('0x23')}};
\ No newline at end of file
+var _0xe4c0=['ENUM','ivr','BOOLEAN','INTEGER','UNSIGNED','Max\x20200\x20calls.','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','#Congestion\x20Retry\x20(min:1,\x20max:999)','Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','always','never','onlyIfOpen','#AMD\x20Initial\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Min\x20Word\x20Length','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Maximum\x20Word\x20Length','DESC','ASC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','#Drop\x20Retry\x20(min:1,\x20max:999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Abandoned\x20Retry\x20(min:1,\x20max:999)','#Machine\x20Retry\x20(min:1,\x20max:999)','Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','sequelize','exports','STRING','name'];(function(_0x3d0678,_0x10e9ae){var _0x7f9a43=function(_0x85d80f){while(--_0x85d80f){_0x3d0678['push'](_0x3d0678['shift']());}};_0x7f9a43(++_0x10e9ae);}(_0xe4c0,0x10c));var _0x0e4c=function(_0x4843f9,_0x4af459){_0x4843f9=_0x4843f9-0x0;var _0x193c6a=_0xe4c0[_0x4843f9];return _0x193c6a;};'use strict';var Sequelize=require(_0x0e4c('0x0'));module[_0x0e4c('0x1')]={'name':{'type':Sequelize[_0x0e4c('0x2')],'unique':_0x0e4c('0x3'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize[_0x0e4c('0x4')]('ivr'),'allowNull':![],'defaultValue':_0x0e4c('0x5')},'description':{'type':Sequelize['STRING']},'active':{'type':Sequelize[_0x0e4c('0x6')],'defaultValue':0x0,'comment':'Active/Disactive\x20Campaign'},'limitCalls':{'type':Sequelize[_0x0e4c('0x7')](0x4)[_0x0e4c('0x8')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0x0e4c('0x9')},'dialOriginateCallerIdName':{'type':Sequelize[_0x0e4c('0x2')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x0e4c('0x2')]},'dialOriginateTimeout':{'type':Sequelize[_0x0e4c('0x7')](0x3)[_0x0e4c('0x8')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0e4c('0xa')},'dialCongestionMaxRetry':{'type':Sequelize[_0x0e4c('0x7')](0x3)[_0x0e4c('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0e4c('0xb')},'dialCongestionRetryFrequency':{'type':Sequelize[_0x0e4c('0x7')](0x5)[_0x0e4c('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0e4c('0xc')},'dialBusyMaxRetry':{'type':Sequelize[_0x0e4c('0x7')](0x3)[_0x0e4c('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Busy\x20Retry\x20(min:1,\x20max:999)'},'dialBusyRetryFrequency':{'type':Sequelize[_0x0e4c('0x7')](0x5)[_0x0e4c('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0e4c('0xd')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x0e4c('0x7')](0x3)['UNSIGNED'],'defaultValue':0x3,'comment':'#NoAnswer\x20Retry\x20(min:1,\x20max:999)'},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x0e4c('0x7')](0x5)[_0x0e4c('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0e4c('0xe')},'dialGlobalMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x0e4c('0x8')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':'#Global\x20Max\x20Retry\x20(min:1,\x20max:999)'},'dialTimezone':{'type':Sequelize[_0x0e4c('0x2')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x0e4c('0x2')],'defaultValue':'07:00-22:00,*,*,*'},'dialCheckDuplicateType':{'type':Sequelize[_0x0e4c('0x4')](_0x0e4c('0xf'),_0x0e4c('0x10'),_0x0e4c('0x11')),'defaultValue':_0x0e4c('0xf')},'dialAMDActive':{'type':Sequelize[_0x0e4c('0x6')],'defaultValue':0x0,'comment':'Active/Disactive\x20AMD'},'dialAMDInitialSilence':{'type':Sequelize[_0x0e4c('0x7')](0x9)[_0x0e4c('0x8')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x0e4c('0x12')},'dialAMDGreeting':{'type':Sequelize[_0x0e4c('0x7')](0x9)[_0x0e4c('0x8')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':'#AMD\x20Greeting'},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x0e4c('0x7')](0x9)[_0x0e4c('0x8')],'defaultValue':0x320,'validate':{'min':0x0},'comment':'#AMD\x20After\x20Greeting\x20Silence'},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x0e4c('0x7')](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x0e4c('0x13')},'dialAMDMinWordLength':{'type':Sequelize[_0x0e4c('0x7')](0x9)[_0x0e4c('0x8')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x0e4c('0x14')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x0e4c('0x7')](0x9)[_0x0e4c('0x8')],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0x0e4c('0x15')},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x0e4c('0x7')](0x9)[_0x0e4c('0x8')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x0e4c('0x16')},'dialAMDSilenceThreshold':{'type':Sequelize[_0x0e4c('0x7')](0x5)[_0x0e4c('0x8')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':'#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)'},'dialAMDMaximumWordLength':{'type':Sequelize['INTEGER'](0x9)[_0x0e4c('0x8')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x0e4c('0x17')},'dialOrderByScheduledAt':{'type':Sequelize[_0x0e4c('0x4')](_0x0e4c('0x18'),_0x0e4c('0x19')),'defaultValue':_0x0e4c('0x18')},'dialPrefix':{'type':Sequelize[_0x0e4c('0x2')],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize['INTEGER'](0x3)[_0x0e4c('0x8')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x0e4c('0x1a')},'dialCutDigit':{'type':Sequelize[_0x0e4c('0x7')](0x3)['UNSIGNED'],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Cut\x20Digit\x20(min:1,\x20max:15)'},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0x0e4c('0x7')](0x3)[_0x0e4c('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0e4c('0x1b')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x0e4c('0x7')](0x5)[_0x0e4c('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialDropMaxRetry':{'type':Sequelize[_0x0e4c('0x7')](0x3)[_0x0e4c('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0e4c('0x1c')},'dialDropRetryFrequency':{'type':Sequelize[_0x0e4c('0x7')](0x5)[_0x0e4c('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0e4c('0x1d')},'dialAbandonedMaxRetry':{'type':Sequelize[_0x0e4c('0x7')](0x3)[_0x0e4c('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0e4c('0x1e')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0x0e4c('0x7')](0x5)[_0x0e4c('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialMachineMaxRetry':{'type':Sequelize[_0x0e4c('0x7')](0x3)[_0x0e4c('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0e4c('0x1f')},'dialMachineRetryFrequency':{'type':Sequelize[_0x0e4c('0x7')](0x5)[_0x0e4c('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0e4c('0x20')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0x0e4c('0x7')](0x3)[_0x0e4c('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#AgentReject\x20Retry\x20(min:1,\x20max:999)'},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0x0e4c('0x7')](0x5)[_0x0e4c('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0e4c('0x21')}};
\ No newline at end of file
diff --git a/server/api/campaign/campaign.controller.js b/server/api/campaign/campaign.controller.js
index e4bd7cd..cd218a7 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 _0x15f9=['rawAttributes','fieldName','key','model','keys','query','filters','intersection','attributes','fields','length','nolimit','sort','where','pick','merge','VIRTUAL','options','includeAll','include','rows','catch','show','params','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','clone','createdAt','omit','updatedAt','destroy','getHoppers','findOne','CmHopper','hasOwnProperty','order','CampaignId','filter','findAll','getHopperHistories','CmHopperHistory','CmHopperFinal','getHopperBlacks','CmHopperBlack','getLists','CmList','addLists','format','YYYY-MM-DD\x20HH:mm:ss','ids','spread','dialCheckDuplicateType','always','insert','into','fromQuery','phone','ContactId','ListId','field','NOW()','CmListId','toString','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20NOT\x20IN\x20(?)','select','from','cm_hopper_final','CampaignId\x20=\x20?','onlyIfOpen','cm_hopper','scheduledAt','phone\x20IS\x20NOT\x20NULL','cmHopperId','OrderBy','ci.OrderBY','join','h.ListId\x20=\x20?','h.createdAt\x20=\x20?','sequelize','push','all','removeLists','getBlackLists','addBlackLists','cm_hopper_black','removeBlackLists','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','offset','limit','undefined','count','set','Content-Range','json','apply','save','update','then','get','IvrCampaigns','UserProfileResource','sendStatus','stack','name','send','index','map','Campaign'];(function(_0x1cfd07,_0x42cdb5){var _0x3d7c1f=function(_0x5b4be1){while(--_0x5b4be1){_0x1cfd07['push'](_0x1cfd07['shift']());}};_0x3d7c1f(++_0x42cdb5);}(_0x15f9,0xf7));var _0x915f=function(_0x379ae3,_0x16a555){_0x379ae3=_0x379ae3-0x0;var _0x80c32e=_0x15f9[_0x379ae3];return _0x80c32e;};'use strict';var emlformat=require(_0x915f('0x0'));var rimraf=require(_0x915f('0x1'));var zipdir=require(_0x915f('0x2'));var jsonpatch=require(_0x915f('0x3'));var rp=require(_0x915f('0x4'));var moment=require(_0x915f('0x5'));var BPromise=require(_0x915f('0x6'));var Mustache=require(_0x915f('0x7'));var util=require(_0x915f('0x8'));var path=require('path');var sox=require(_0x915f('0x9'));var csv=require(_0x915f('0xa'));var ejs=require(_0x915f('0xb'));var fs=require('fs');var fs_extra=require(_0x915f('0xc'));var _=require('lodash');var squel=require(_0x915f('0xd'));var crypto=require(_0x915f('0xe'));var jsforce=require(_0x915f('0xf'));var deskjs=require(_0x915f('0x10'));var toCsv=require('to-csv');var querystring=require(_0x915f('0x11'));var Papa=require(_0x915f('0x12'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x915f('0x13'));var as=require(_0x915f('0x14'));var hardwareService=require(_0x915f('0x15'));var logger=require(_0x915f('0x16'))(_0x915f('0x17'));var utils=require(_0x915f('0x18'));var config=require(_0x915f('0x19'));var licenseUtil=require(_0x915f('0x1a'));var db=require(_0x915f('0x1b'))['db'];function respondWithStatusCode(_0x35b29f,_0x2a9a10){_0x2a9a10=_0x2a9a10||0xcc;return function(_0x5b9080){if(_0x5b9080){return _0x35b29f['sendStatus'](_0x2a9a10);}return _0x35b29f[_0x915f('0x1c')](_0x2a9a10)[_0x915f('0x1d')]();};}function respondWithResult(_0x25de94,_0x370a91){_0x370a91=_0x370a91||0xc8;return function(_0x53de49){if(_0x53de49){return _0x25de94[_0x915f('0x1c')](_0x370a91)['json'](_0x53de49);}};}function respondWithFilteredResult(_0x80a30f,_0x42c125){return function(_0x5a05cf){if(_0x5a05cf){var _0x1782b0=typeof _0x42c125[_0x915f('0x1e')]==='undefined'&&typeof _0x42c125[_0x915f('0x1f')]===_0x915f('0x20');var _0x28eca1=_0x5a05cf['count'];var _0x18a53b=_0x1782b0?0x0:_0x42c125['offset'];var _0x2d711d=_0x1782b0?_0x5a05cf[_0x915f('0x21')]:_0x42c125['offset']+_0x42c125[_0x915f('0x1f')];var _0x29f228;if(_0x2d711d>=_0x28eca1){_0x2d711d=_0x28eca1;_0x29f228=0xc8;}else{_0x29f228=0xce;}_0x80a30f[_0x915f('0x1c')](_0x29f228);return _0x80a30f[_0x915f('0x22')](_0x915f('0x23'),_0x18a53b+'-'+_0x2d711d+'/'+_0x28eca1)[_0x915f('0x24')](_0x5a05cf);}return null;};}function patchUpdates(_0x2ba00c){return function(_0x57a6b7){try{jsonpatch[_0x915f('0x25')](_0x57a6b7,_0x2ba00c,!![]);}catch(_0x1572ab){return BPromise['reject'](_0x1572ab);}return _0x57a6b7[_0x915f('0x26')]();};}function saveUpdates(_0x2c6db9,_0x16acd2){return function(_0x4f6d8d){if(_0x4f6d8d){return _0x4f6d8d[_0x915f('0x27')](_0x2c6db9)[_0x915f('0x28')](function(_0xed9c88){return _0xed9c88;});}return null;};}function removeEntity(_0x334e01,_0x31932c){return function(_0xfd479b){if(_0xfd479b){return _0xfd479b['destroy']()[_0x915f('0x28')](function(){var _0x1b2067=_0xfd479b[_0x915f('0x29')]({'plain':!![]});var _0x142482=_0x915f('0x2a');return db[_0x915f('0x2b')]['destroy']({'where':{'type':_0x142482,'resourceId':_0x1b2067['id']}})[_0x915f('0x28')](function(){return _0xfd479b;});})['then'](function(){_0x334e01['status'](0xcc)[_0x915f('0x1d')]();});}};}function handleEntityNotFound(_0x4ef141,_0x4c61e0){return function(_0x19e5fc){if(!_0x19e5fc){_0x4ef141[_0x915f('0x2c')](0x194);}return _0x19e5fc;};}function handleError(_0x28e6b9,_0xa4bda4){_0xa4bda4=_0xa4bda4||0x1f4;return function(_0x5a5ee2){logger['error'](_0x5a5ee2[_0x915f('0x2d')]);if(_0x5a5ee2[_0x915f('0x2e')]){delete _0x5a5ee2[_0x915f('0x2e')];}_0x28e6b9[_0x915f('0x1c')](_0xa4bda4)[_0x915f('0x2f')](_0x5a5ee2);};}exports[_0x915f('0x30')]=function(_0x5d3b3f,_0x19822f){var _0x5ed30e={},_0x3cc1e0={},_0x5de558={'count':0x0,'rows':[]};var _0x2df733=_[_0x915f('0x31')](db[_0x915f('0x32')][_0x915f('0x33')],function(_0x171267){return{'name':_0x171267[_0x915f('0x34')],'type':_0x171267['type'][_0x915f('0x35')]};});_0x3cc1e0[_0x915f('0x36')]=_['map'](_0x2df733,_0x915f('0x2e'));_0x3cc1e0['query']=_[_0x915f('0x37')](_0x5d3b3f[_0x915f('0x38')]);_0x3cc1e0[_0x915f('0x39')]=_[_0x915f('0x3a')](_0x3cc1e0[_0x915f('0x36')],_0x3cc1e0['query']);_0x5ed30e[_0x915f('0x3b')]=_[_0x915f('0x3a')](_0x3cc1e0[_0x915f('0x36')],qs['fields'](_0x5d3b3f[_0x915f('0x38')][_0x915f('0x3c')]));_0x5ed30e[_0x915f('0x3b')]=_0x5ed30e[_0x915f('0x3b')][_0x915f('0x3d')]?_0x5ed30e[_0x915f('0x3b')]:_0x3cc1e0['model'];if(!_0x5d3b3f[_0x915f('0x38')]['hasOwnProperty'](_0x915f('0x3e'))){_0x5ed30e['limit']=qs[_0x915f('0x1f')](_0x5d3b3f[_0x915f('0x38')][_0x915f('0x1f')]);_0x5ed30e['offset']=qs[_0x915f('0x1e')](_0x5d3b3f[_0x915f('0x38')][_0x915f('0x1e')]);}_0x5ed30e['order']=qs[_0x915f('0x3f')](_0x5d3b3f[_0x915f('0x38')]['sort']);_0x5ed30e[_0x915f('0x40')]=qs['filters'](_[_0x915f('0x41')](_0x5d3b3f[_0x915f('0x38')],_0x3cc1e0[_0x915f('0x39')]),_0x2df733);if(_0x5d3b3f[_0x915f('0x38')]['filter']){_0x5ed30e[_0x915f('0x40')]=_[_0x915f('0x42')](_0x5ed30e[_0x915f('0x40')],{'$or':_[_0x915f('0x31')](_0x2df733,function(_0x47a01b){if(_0x47a01b['type']!==_0x915f('0x43')){var _0x1a74de={};_0x1a74de[_0x47a01b[_0x915f('0x2e')]]={'$like':'%'+_0x5d3b3f[_0x915f('0x38')]['filter']+'%'};return _0x1a74de;}})});}_0x5ed30e=_[_0x915f('0x42')]({},_0x5ed30e,_0x5d3b3f[_0x915f('0x44')]);var _0x1462c9={'where':_0x5ed30e[_0x915f('0x40')]};return db[_0x915f('0x32')][_0x915f('0x21')](_0x1462c9)[_0x915f('0x28')](function(_0x384763){_0x5de558['count']=_0x384763;if(_0x5d3b3f[_0x915f('0x38')][_0x915f('0x45')]){_0x5ed30e[_0x915f('0x46')]=[{'all':!![]}];}return db[_0x915f('0x32')]['findAll'](_0x5ed30e);})[_0x915f('0x28')](function(_0x92f97d){_0x5de558[_0x915f('0x47')]=_0x92f97d;return _0x5de558;})[_0x915f('0x28')](respondWithFilteredResult(_0x19822f,_0x5ed30e))[_0x915f('0x48')](handleError(_0x19822f,null));};exports[_0x915f('0x49')]=function(_0x5e20ea,_0x283307){var _0x146680={'raw':![],'where':{'id':_0x5e20ea[_0x915f('0x4a')]['id']}},_0x12bfe8={};_0x12bfe8[_0x915f('0x36')]=_[_0x915f('0x37')](db['Campaign'][_0x915f('0x33')]);_0x12bfe8[_0x915f('0x38')]=_['keys'](_0x5e20ea[_0x915f('0x38')]);_0x12bfe8[_0x915f('0x39')]=_[_0x915f('0x3a')](_0x12bfe8[_0x915f('0x36')],_0x12bfe8[_0x915f('0x38')]);_0x146680[_0x915f('0x3b')]=_['intersection'](_0x12bfe8[_0x915f('0x36')],qs[_0x915f('0x3c')](_0x5e20ea['query'][_0x915f('0x3c')]));_0x146680[_0x915f('0x3b')]=_0x146680[_0x915f('0x3b')][_0x915f('0x3d')]?_0x146680['attributes']:_0x12bfe8['model'];if(_0x5e20ea['query'][_0x915f('0x45')]){_0x146680[_0x915f('0x46')]=[{'all':!![]}];}_0x146680=_[_0x915f('0x42')]({},_0x146680,_0x5e20ea[_0x915f('0x44')]);return db['Campaign'][_0x915f('0x4b')](_0x146680)[_0x915f('0x28')](handleEntityNotFound(_0x283307,null))['then'](respondWithResult(_0x283307,null))['catch'](handleError(_0x283307,null));};exports[_0x915f('0x4c')]=function(_0x288400,_0x3cd5d8){return db[_0x915f('0x32')][_0x915f('0x4c')](_0x288400[_0x915f('0x4d')],{})[_0x915f('0x28')](function(_0x5c7fc3){var _0x2d6743=_0x288400[_0x915f('0x4e')][_0x915f('0x29')]({'plain':!![]});if(!_0x2d6743)throw new Error(_0x915f('0x4f'));if(_0x2d6743[_0x915f('0x50')]===_0x915f('0x4e')){var _0x5a13f1=_0x5c7fc3[_0x915f('0x29')]({'plain':!![]});var _0x2d3da6=_0x915f('0x2a');return db[_0x915f('0x51')]['find']({'where':{'name':_0x2d3da6,'userProfileId':_0x2d6743[_0x915f('0x52')]},'raw':!![]})[_0x915f('0x28')](function(_0xc3d4f7){if(_0xc3d4f7&&_0xc3d4f7[_0x915f('0x53')]===0x0){return db['UserProfileResource'][_0x915f('0x4c')]({'name':_0x5a13f1[_0x915f('0x2e')],'resourceId':_0x5a13f1['id'],'type':_0xc3d4f7[_0x915f('0x2e')],'sectionId':_0xc3d4f7['id']},{})['then'](function(){return _0x5c7fc3;});}else{return _0x5c7fc3;}})[_0x915f('0x48')](function(_0x45219b){logger[_0x915f('0x54')](_0x915f('0x55'),_0x45219b);throw _0x45219b;});}return _0x5c7fc3;})[_0x915f('0x28')](respondWithResult(_0x3cd5d8,0xc9))[_0x915f('0x48')](handleError(_0x3cd5d8,null));};exports[_0x915f('0x56')]=function(_0x16d409,_0x47e1df){var _0x37455c={'where':{'id':_0x16d409[_0x915f('0x4a')]['id']}},_0x49664a={};_0x49664a[_0x915f('0x36')]=_[_0x915f('0x37')](db[_0x915f('0x32')]['rawAttributes']);_0x37455c[_0x915f('0x3b')]=_['intersection'](_0x49664a[_0x915f('0x36')],qs['fields'](_0x16d409['query']['fields']));_0x37455c[_0x915f('0x3b')]=_0x37455c[_0x915f('0x3b')][_0x915f('0x3d')]?_0x37455c[_0x915f('0x3b')]:_0x49664a[_0x915f('0x36')];if(_0x16d409['query'][_0x915f('0x45')]){_0x37455c['include']=[{'all':!![]}];}_0x37455c=_['merge']({},_0x37455c,_0x16d409['options']);return db[_0x915f('0x32')]['find'](_0x37455c)[_0x915f('0x28')](handleEntityNotFound(_0x47e1df,null))['then'](function(_0x431214){if(_0x431214){var _0x7c0119=_0x431214[_0x915f('0x29')]({'plain':!![]});_0x7c0119=qs['omit'](_0x7c0119,['id',_0x915f('0x57'),'updatedAt']);_0x16d409[_0x915f('0x4d')]=_[_0x915f('0x58')](_0x16d409[_0x915f('0x4d')],['id',_0x915f('0x57'),_0x915f('0x59')]);return db['Campaign'][_0x915f('0x4c')](_['merge'](_0x7c0119,_0x16d409[_0x915f('0x4d')]),{'include':_0x16d409[_0x915f('0x38')][_0x915f('0x45')]?[{'all':!![]}]:undefined})[_0x915f('0x28')](function(_0x21b68f){var _0x79840b=_0x16d409[_0x915f('0x4e')][_0x915f('0x29')]({'plain':!![]});if(!_0x79840b)throw new Error(_0x915f('0x4f'));if(_0x79840b['role']===_0x915f('0x4e')){var _0x1c02e3=_0x21b68f['get']({'plain':!![]});var _0xc44c40=_0x915f('0x2a');return db[_0x915f('0x51')][_0x915f('0x4b')]({'where':{'name':_0xc44c40,'userProfileId':_0x79840b[_0x915f('0x52')]},'raw':!![]})[_0x915f('0x28')](function(_0x5062a4){if(_0x5062a4&&_0x5062a4[_0x915f('0x53')]===0x0){return db[_0x915f('0x2b')][_0x915f('0x4c')]({'name':_0x1c02e3[_0x915f('0x2e')],'resourceId':_0x1c02e3['id'],'type':_0x5062a4[_0x915f('0x2e')],'sectionId':_0x5062a4['id']},{})[_0x915f('0x28')](function(){return _0x21b68f;});}else{return _0x21b68f;}})['catch'](function(_0x3ff040){logger[_0x915f('0x54')](_0x915f('0x55'),_0x3ff040);throw _0x3ff040;});}return _0x21b68f;});}})[_0x915f('0x28')](respondWithResult(_0x47e1df,0xc9))[_0x915f('0x48')](handleError(_0x47e1df,null));};exports['update']=function(_0x201001,_0x4270cb){if(_0x201001['body']['id']){delete _0x201001['body']['id'];}return db[_0x915f('0x32')][_0x915f('0x4b')]({'where':{'id':_0x201001['params']['id']}})['then'](handleEntityNotFound(_0x4270cb,null))['then'](saveUpdates(_0x201001[_0x915f('0x4d')],null))[_0x915f('0x28')](respondWithResult(_0x4270cb,null))[_0x915f('0x48')](handleError(_0x4270cb,null));};exports[_0x915f('0x5a')]=function(_0x1fc2e4,_0x59358f){return db[_0x915f('0x32')]['find']({'where':{'id':_0x1fc2e4[_0x915f('0x4a')]['id']}})[_0x915f('0x28')](handleEntityNotFound(_0x59358f,null))['then'](removeEntity(_0x59358f,null))[_0x915f('0x48')](handleError(_0x59358f,null));};exports[_0x915f('0x5b')]=function(_0x2eef84,_0x43da65,_0x273660){var _0xc56e7b={'raw':!![],'where':{}};var _0x5a7bd4={};var _0x1b9f25={'count':0x0,'rows':[]};return db['Campaign'][_0x915f('0x5c')]({'where':{'id':_0x2eef84[_0x915f('0x4a')]['id']}})['then'](handleEntityNotFound(_0x43da65,null))[_0x915f('0x28')](function(_0x1481e4){if(_0x1481e4){_0x5a7bd4['model']=_['keys'](db[_0x915f('0x5d')][_0x915f('0x33')]);_0x5a7bd4[_0x915f('0x38')]=_[_0x915f('0x37')](_0x2eef84[_0x915f('0x38')]);_0x5a7bd4[_0x915f('0x39')]=_['intersection'](_0x5a7bd4[_0x915f('0x36')],_0x5a7bd4[_0x915f('0x38')]);_0xc56e7b['attributes']=_['intersection'](_0x5a7bd4[_0x915f('0x36')],qs['fields'](_0x2eef84[_0x915f('0x38')][_0x915f('0x3c')]));_0xc56e7b[_0x915f('0x3b')]=_0xc56e7b[_0x915f('0x3b')][_0x915f('0x3d')]?_0xc56e7b[_0x915f('0x3b')]:_0x5a7bd4['model'];if(!_0x2eef84[_0x915f('0x38')][_0x915f('0x5e')](_0x915f('0x3e'))){_0xc56e7b[_0x915f('0x1f')]=qs['limit'](_0x2eef84[_0x915f('0x38')][_0x915f('0x1f')]);_0xc56e7b[_0x915f('0x1e')]=qs[_0x915f('0x1e')](_0x2eef84['query']['offset']);}_0xc56e7b[_0x915f('0x5f')]=qs[_0x915f('0x3f')](_0x2eef84[_0x915f('0x38')][_0x915f('0x3f')]);_0xc56e7b[_0x915f('0x40')]=qs[_0x915f('0x39')](_[_0x915f('0x41')](_0x2eef84['query'],_0x5a7bd4[_0x915f('0x39')]));_0xc56e7b[_0x915f('0x40')][_0x915f('0x60')]=_0x1481e4['id'];if(_0x2eef84[_0x915f('0x38')][_0x915f('0x61')]){_0xc56e7b[_0x915f('0x40')]=_[_0x915f('0x42')](_0xc56e7b[_0x915f('0x40')],{'$or':_[_0x915f('0x31')](_0xc56e7b[_0x915f('0x3b')],function(_0x31cf3e){var _0x217646={};_0x217646[_0x31cf3e]={'$like':'%'+_0x2eef84[_0x915f('0x38')]['filter']+'%'};return _0x217646;})});}_0xc56e7b=_[_0x915f('0x42')]({},_0xc56e7b,_0x2eef84[_0x915f('0x44')]);return db[_0x915f('0x5d')][_0x915f('0x21')]({'where':_0xc56e7b[_0x915f('0x40')]})[_0x915f('0x28')](function(_0x5a9c96){_0x1b9f25[_0x915f('0x21')]=_0x5a9c96;if(_0x2eef84[_0x915f('0x38')]['includeAll']){_0xc56e7b['include']=[{'all':!![]}];}return db[_0x915f('0x5d')][_0x915f('0x62')](_0xc56e7b);})[_0x915f('0x28')](function(_0x1f0093){_0x1b9f25['rows']=_0x1f0093;return _0x1b9f25;});}})['then'](respondWithFilteredResult(_0x43da65,_0xc56e7b))[_0x915f('0x48')](handleError(_0x43da65,null));};exports[_0x915f('0x63')]=function(_0x4749c4,_0x557169,_0xc3c58f){var _0x13c868={'raw':!![],'where':{}};var _0x3f200f={};var _0x403670={'count':0x0,'rows':[]};return db['Campaign'][_0x915f('0x5c')]({'where':{'id':_0x4749c4[_0x915f('0x4a')]['id']}})['then'](handleEntityNotFound(_0x557169,null))['then'](function(_0x4ab31d){if(_0x4ab31d){_0x3f200f[_0x915f('0x36')]=_[_0x915f('0x37')](db[_0x915f('0x64')][_0x915f('0x33')]);_0x3f200f['query']=_[_0x915f('0x37')](_0x4749c4[_0x915f('0x38')]);_0x3f200f[_0x915f('0x39')]=_['intersection'](_0x3f200f[_0x915f('0x36')],_0x3f200f['query']);_0x13c868[_0x915f('0x3b')]=_[_0x915f('0x3a')](_0x3f200f['model'],qs[_0x915f('0x3c')](_0x4749c4['query']['fields']));_0x13c868[_0x915f('0x3b')]=_0x13c868[_0x915f('0x3b')]['length']?_0x13c868[_0x915f('0x3b')]:_0x3f200f[_0x915f('0x36')];if(!_0x4749c4['query'][_0x915f('0x5e')](_0x915f('0x3e'))){_0x13c868[_0x915f('0x1f')]=qs[_0x915f('0x1f')](_0x4749c4[_0x915f('0x38')][_0x915f('0x1f')]);_0x13c868['offset']=qs[_0x915f('0x1e')](_0x4749c4[_0x915f('0x38')][_0x915f('0x1e')]);}_0x13c868[_0x915f('0x5f')]=qs['sort'](_0x4749c4['query'][_0x915f('0x3f')]);_0x13c868[_0x915f('0x40')]=qs[_0x915f('0x39')](_[_0x915f('0x41')](_0x4749c4[_0x915f('0x38')],_0x3f200f[_0x915f('0x39')]));_0x13c868[_0x915f('0x40')][_0x915f('0x60')]=_0x4ab31d['id'];if(_0x4749c4[_0x915f('0x38')]['filter']){_0x13c868[_0x915f('0x40')]=_[_0x915f('0x42')](_0x13c868[_0x915f('0x40')],{'$or':_[_0x915f('0x31')](_0x13c868[_0x915f('0x3b')],function(_0x193b1a){var _0x3ac1c0={};_0x3ac1c0[_0x193b1a]={'$like':'%'+_0x4749c4[_0x915f('0x38')]['filter']+'%'};return _0x3ac1c0;})});}_0x13c868=_['merge']({},_0x13c868,_0x4749c4['options']);return db[_0x915f('0x64')][_0x915f('0x21')]({'where':_0x13c868[_0x915f('0x40')]})['then'](function(_0x2829f9){_0x403670[_0x915f('0x21')]=_0x2829f9;if(_0x4749c4[_0x915f('0x38')][_0x915f('0x45')]){_0x13c868[_0x915f('0x46')]=[{'all':!![]}];}return db['CmHopperHistory']['findAll'](_0x13c868);})[_0x915f('0x28')](function(_0x54eaec){_0x403670[_0x915f('0x47')]=_0x54eaec;return _0x403670;});}})[_0x915f('0x28')](respondWithFilteredResult(_0x557169,_0x13c868))[_0x915f('0x48')](handleError(_0x557169,null));};exports['getHopperFinals']=function(_0x1bfbef,_0x58e793,_0x556207){var _0x55ce1d={'raw':!![],'where':{}};var _0x132c25={};var _0x55a329={'count':0x0,'rows':[]};return db['Campaign']['findOne']({'where':{'id':_0x1bfbef[_0x915f('0x4a')]['id']}})[_0x915f('0x28')](handleEntityNotFound(_0x58e793,null))[_0x915f('0x28')](function(_0x2d38e0){if(_0x2d38e0){_0x132c25[_0x915f('0x36')]=_[_0x915f('0x37')](db[_0x915f('0x65')][_0x915f('0x33')]);_0x132c25[_0x915f('0x38')]=_[_0x915f('0x37')](_0x1bfbef[_0x915f('0x38')]);_0x132c25[_0x915f('0x39')]=_['intersection'](_0x132c25[_0x915f('0x36')],_0x132c25[_0x915f('0x38')]);_0x55ce1d[_0x915f('0x3b')]=_[_0x915f('0x3a')](_0x132c25[_0x915f('0x36')],qs[_0x915f('0x3c')](_0x1bfbef['query'][_0x915f('0x3c')]));_0x55ce1d[_0x915f('0x3b')]=_0x55ce1d['attributes']['length']?_0x55ce1d[_0x915f('0x3b')]:_0x132c25[_0x915f('0x36')];if(!_0x1bfbef[_0x915f('0x38')]['hasOwnProperty'](_0x915f('0x3e'))){_0x55ce1d[_0x915f('0x1f')]=qs[_0x915f('0x1f')](_0x1bfbef[_0x915f('0x38')][_0x915f('0x1f')]);_0x55ce1d[_0x915f('0x1e')]=qs[_0x915f('0x1e')](_0x1bfbef[_0x915f('0x38')]['offset']);}_0x55ce1d[_0x915f('0x5f')]=qs['sort'](_0x1bfbef[_0x915f('0x38')]['sort']);_0x55ce1d[_0x915f('0x40')]=qs[_0x915f('0x39')](_[_0x915f('0x41')](_0x1bfbef[_0x915f('0x38')],_0x132c25['filters']));_0x55ce1d['where'][_0x915f('0x60')]=_0x2d38e0['id'];if(_0x1bfbef[_0x915f('0x38')]['filter']){_0x55ce1d[_0x915f('0x40')]=_['merge'](_0x55ce1d[_0x915f('0x40')],{'$or':_['map'](_0x55ce1d[_0x915f('0x3b')],function(_0x5f3d66){var _0x3c2e40={};_0x3c2e40[_0x5f3d66]={'$like':'%'+_0x1bfbef[_0x915f('0x38')][_0x915f('0x61')]+'%'};return _0x3c2e40;})});}_0x55ce1d=_[_0x915f('0x42')]({},_0x55ce1d,_0x1bfbef[_0x915f('0x44')]);return db['CmHopperFinal'][_0x915f('0x21')]({'where':_0x55ce1d[_0x915f('0x40')]})[_0x915f('0x28')](function(_0x56718a){_0x55a329[_0x915f('0x21')]=_0x56718a;if(_0x1bfbef['query']['includeAll']){_0x55ce1d[_0x915f('0x46')]=[{'all':!![]}];}return db[_0x915f('0x65')][_0x915f('0x62')](_0x55ce1d);})[_0x915f('0x28')](function(_0x245da2){_0x55a329[_0x915f('0x47')]=_0x245da2;return _0x55a329;});}})[_0x915f('0x28')](respondWithFilteredResult(_0x58e793,_0x55ce1d))['catch'](handleError(_0x58e793,null));};exports[_0x915f('0x66')]=function(_0x409c45,_0x2a210d,_0x1adbad){var _0x5df74e={'raw':!![],'where':{}};var _0x1e1dad={};var _0x5b678b={'count':0x0,'rows':[]};return db[_0x915f('0x32')][_0x915f('0x5c')]({'where':{'id':_0x409c45[_0x915f('0x4a')]['id']}})['then'](handleEntityNotFound(_0x2a210d,null))['then'](function(_0x2364d9){if(_0x2364d9){_0x1e1dad['model']=_[_0x915f('0x37')](db[_0x915f('0x67')][_0x915f('0x33')]);_0x1e1dad[_0x915f('0x38')]=_[_0x915f('0x37')](_0x409c45[_0x915f('0x38')]);_0x1e1dad[_0x915f('0x39')]=_[_0x915f('0x3a')](_0x1e1dad[_0x915f('0x36')],_0x1e1dad[_0x915f('0x38')]);_0x5df74e['attributes']=_['intersection'](_0x1e1dad['model'],qs['fields'](_0x409c45[_0x915f('0x38')]['fields']));_0x5df74e[_0x915f('0x3b')]=_0x5df74e[_0x915f('0x3b')][_0x915f('0x3d')]?_0x5df74e[_0x915f('0x3b')]:_0x1e1dad[_0x915f('0x36')];if(!_0x409c45[_0x915f('0x38')][_0x915f('0x5e')]('nolimit')){_0x5df74e[_0x915f('0x1f')]=qs[_0x915f('0x1f')](_0x409c45[_0x915f('0x38')][_0x915f('0x1f')]);_0x5df74e[_0x915f('0x1e')]=qs['offset'](_0x409c45[_0x915f('0x38')]['offset']);}_0x5df74e[_0x915f('0x5f')]=qs[_0x915f('0x3f')](_0x409c45['query'][_0x915f('0x3f')]);_0x5df74e[_0x915f('0x40')]=qs[_0x915f('0x39')](_[_0x915f('0x41')](_0x409c45['query'],_0x1e1dad[_0x915f('0x39')]));_0x5df74e[_0x915f('0x40')][_0x915f('0x60')]=_0x2364d9['id'];if(_0x409c45[_0x915f('0x38')]['filter']){_0x5df74e[_0x915f('0x40')]=_[_0x915f('0x42')](_0x5df74e['where'],{'$or':_['map'](_0x5df74e['attributes'],function(_0xd2f34f){var _0x132bc2={};_0x132bc2[_0xd2f34f]={'$like':'%'+_0x409c45[_0x915f('0x38')]['filter']+'%'};return _0x132bc2;})});}_0x5df74e=_[_0x915f('0x42')]({},_0x5df74e,_0x409c45[_0x915f('0x44')]);return db[_0x915f('0x67')][_0x915f('0x21')]({'where':_0x5df74e[_0x915f('0x40')]})[_0x915f('0x28')](function(_0x481e6d){_0x5b678b[_0x915f('0x21')]=_0x481e6d;if(_0x409c45[_0x915f('0x38')]['includeAll']){_0x5df74e[_0x915f('0x46')]=[{'all':!![]}];}return db['CmHopperBlack'][_0x915f('0x62')](_0x5df74e);})['then'](function(_0x1a4763){_0x5b678b[_0x915f('0x47')]=_0x1a4763;return _0x5b678b;});}})[_0x915f('0x28')](respondWithFilteredResult(_0x2a210d,_0x5df74e))['catch'](handleError(_0x2a210d,null));};exports[_0x915f('0x68')]=function(_0x2380b6,_0x2ffa64,_0x338262){var _0x4c08a6={};var _0x1c1906={};var _0xed7df2;var _0x2310aa;return db[_0x915f('0x32')][_0x915f('0x5c')]({'where':{'id':_0x2380b6['params']['id']}})[_0x915f('0x28')](handleEntityNotFound(_0x2ffa64,null))['then'](function(_0xd14085){if(_0xd14085){_0xed7df2=_0xd14085;_0x1c1906[_0x915f('0x36')]=_['keys'](db[_0x915f('0x69')][_0x915f('0x33')]);_0x1c1906[_0x915f('0x38')]=_[_0x915f('0x37')](_0x2380b6[_0x915f('0x38')]);_0x1c1906[_0x915f('0x39')]=_['intersection'](_0x1c1906[_0x915f('0x36')],_0x1c1906['query']);_0x4c08a6['attributes']=_[_0x915f('0x3a')](_0x1c1906['model'],qs[_0x915f('0x3c')](_0x2380b6[_0x915f('0x38')][_0x915f('0x3c')]));_0x4c08a6[_0x915f('0x3b')]=_0x4c08a6[_0x915f('0x3b')][_0x915f('0x3d')]?_0x4c08a6[_0x915f('0x3b')]:_0x1c1906['model'];_0x4c08a6['order']=qs['sort'](_0x2380b6['query']['sort']);_0x4c08a6['where']=qs[_0x915f('0x39')](_[_0x915f('0x41')](_0x2380b6[_0x915f('0x38')],_0x1c1906['filters']));if(_0x2380b6['query'][_0x915f('0x61')]){_0x4c08a6[_0x915f('0x40')]=_['merge'](_0x4c08a6[_0x915f('0x40')],{'$or':_[_0x915f('0x31')](_0x4c08a6[_0x915f('0x3b')],function(_0x29f063){var _0x21043e={};_0x21043e[_0x29f063]={'$like':'%'+_0x2380b6[_0x915f('0x38')][_0x915f('0x61')]+'%'};return _0x21043e;})});}_0x4c08a6=_[_0x915f('0x42')]({},_0x4c08a6,_0x2380b6[_0x915f('0x44')]);return _0xed7df2[_0x915f('0x68')](_0x4c08a6);}})[_0x915f('0x28')](function(_0x3aefb0){if(_0x3aefb0){_0x2310aa=_0x3aefb0[_0x915f('0x3d')];if(!_0x2380b6[_0x915f('0x38')][_0x915f('0x5e')]('nolimit')){_0x4c08a6[_0x915f('0x1f')]=qs[_0x915f('0x1f')](_0x2380b6[_0x915f('0x38')][_0x915f('0x1f')]);_0x4c08a6[_0x915f('0x1e')]=qs[_0x915f('0x1e')](_0x2380b6['query']['offset']);}return _0xed7df2[_0x915f('0x68')](_0x4c08a6);}})[_0x915f('0x28')](function(_0x2dda1a){if(_0x2dda1a){return _0x2dda1a?{'count':_0x2310aa,'rows':_0x2dda1a}:null;}})[_0x915f('0x28')](respondWithResult(_0x2ffa64,null))[_0x915f('0x48')](handleError(_0x2ffa64,null));};exports[_0x915f('0x6a')]=function(_0x4f85de,_0x932613,_0x45078b){var _0x5b7496,_0xee1403;var _0xdcb422=[];var _0x5aed6f=moment()[_0x915f('0x6b')](_0x915f('0x6c'));return db[_0x915f('0x32')]['find']({'where':{'id':_0x4f85de[_0x915f('0x4a')]['id']}})[_0x915f('0x28')](handleEntityNotFound(_0x932613,null))[_0x915f('0x28')](function(_0x37d698){if(_0x37d698){_0xee1403=_0x37d698;return _0x37d698[_0x915f('0x6a')](_0x4f85de['body'][_0x915f('0x6d')],_[_0x915f('0x58')](_0x4f85de[_0x915f('0x4d')],[_0x915f('0x6d'),'id'])||{});}return null;})[_0x915f('0x6e')](function(_0x4cb21b){var _0x4ef740;var _0x2b49fb;_0x5b7496=_0x4cb21b||[];var _0x55c5b1=[];if(_0x4cb21b){for(var _0x427957=0x0;_0x427957<_0x4cb21b[_0x915f('0x3d')];_0x427957+=0x1){var _0x5ce0c0=_0x4cb21b[_0x427957][_0x915f('0x29')]({'plain':!![]});_0xee1403[_0x915f('0x6f')]=_0x4f85de['body'][_0x915f('0x6f')]?_0x4f85de[_0x915f('0x4d')]['dialCheckDuplicateType']:_0xee1403[_0x915f('0x6f')];switch(_0xee1403['dialCheckDuplicateType']){case _0x915f('0x70'):_0x4ef740=squel[_0x915f('0x71')]()[_0x915f('0x72')]('cm_hopper')[_0x915f('0x73')]([_0x915f('0x74'),'scheduledAt',_0x915f('0x75'),_0x915f('0x76'),'CampaignId',_0x915f('0x57'),_0x915f('0x59')],squel['select']()[_0x915f('0x77')]('phone',_0x915f('0x74'))[_0x915f('0x77')](_0x915f('0x78'),'scheduledAt')['field']('id','ContactId')[_0x915f('0x77')](_0x5ce0c0[_0x915f('0x79')][_0x915f('0x7a')](),'ListId')[_0x915f('0x77')](_0x4f85de[_0x915f('0x4a')]['id'][_0x915f('0x7a')](),_0x915f('0x60'))[_0x915f('0x77')]('\x27'+_0x5aed6f+'\x27','createdAt')[_0x915f('0x77')]('\x27'+_0x5aed6f+'\x27',_0x915f('0x59'))['from'](_0x915f('0x7b'))[_0x915f('0x40')](_0x915f('0x7c'))[_0x915f('0x40')](_0x915f('0x7d'),_0x5ce0c0[_0x915f('0x79')][_0x915f('0x7a')]())[_0x915f('0x40')]('phone\x20IS\x20NOT\x20NULL')[_0x915f('0x40')](_0x915f('0x7e'),squel[_0x915f('0x7f')]()[_0x915f('0x77')]('COALESCE(calleridnum,\x27\x27)')[_0x915f('0x80')](_0x915f('0x81'))[_0x915f('0x40')](_0x915f('0x82'),_0x4f85de[_0x915f('0x4a')]['id'][_0x915f('0x7a')]()))[_0x915f('0x40')]('phone\x20NOT\x20IN\x20(?)',squel[_0x915f('0x7f')]()['field']('COALESCE(phone,\x27\x27)')[_0x915f('0x80')]('cm_hopper')['where'](_0x915f('0x82'),_0x4f85de[_0x915f('0x4a')]['id'][_0x915f('0x7a')]())))[_0x915f('0x7a')]();break;case _0x915f('0x83'):_0x4ef740=squel[_0x915f('0x71')]()[_0x915f('0x72')](_0x915f('0x84'))['fromQuery']([_0x915f('0x74'),_0x915f('0x85'),'ContactId',_0x915f('0x76'),_0x915f('0x60'),'createdAt','updatedAt'],squel[_0x915f('0x7f')]()[_0x915f('0x77')](_0x915f('0x74'),_0x915f('0x74'))[_0x915f('0x77')](_0x915f('0x78'),_0x915f('0x85'))[_0x915f('0x77')]('id',_0x915f('0x75'))[_0x915f('0x77')](_0x5ce0c0['CmListId'][_0x915f('0x7a')](),_0x915f('0x76'))[_0x915f('0x77')](_0x4f85de[_0x915f('0x4a')]['id']['toString'](),_0x915f('0x60'))['field']('\x27'+_0x5aed6f+'\x27',_0x915f('0x57'))[_0x915f('0x77')]('\x27'+_0x5aed6f+'\x27',_0x915f('0x59'))[_0x915f('0x80')](_0x915f('0x7b'))[_0x915f('0x40')]('deletedAt\x20IS\x20NULL')['where'](_0x915f('0x7d'),_0x5ce0c0[_0x915f('0x79')][_0x915f('0x7a')]())['where']('phone\x20IS\x20NOT\x20NULL')[_0x915f('0x40')](_0x915f('0x7e'),squel[_0x915f('0x7f')]()[_0x915f('0x77')]('COALESCE(phone,\x27\x27)')['from']('cm_hopper')[_0x915f('0x40')]('CampaignId\x20=\x20?',_0x4f85de[_0x915f('0x4a')]['id'][_0x915f('0x7a')]())))[_0x915f('0x7a')]();break;default:_0x4ef740=squel['insert']()[_0x915f('0x72')]('cm_hopper')[_0x915f('0x73')]([_0x915f('0x74'),'scheduledAt',_0x915f('0x75'),'ListId',_0x915f('0x60'),_0x915f('0x57'),'updatedAt'],squel[_0x915f('0x7f')]()[_0x915f('0x77')]('phone','phone')[_0x915f('0x77')](_0x915f('0x78'),'scheduledAt')[_0x915f('0x77')]('id',_0x915f('0x75'))[_0x915f('0x77')](_0x5ce0c0[_0x915f('0x79')]['toString'](),_0x915f('0x76'))[_0x915f('0x77')](_0x4f85de[_0x915f('0x4a')]['id'][_0x915f('0x7a')](),_0x915f('0x60'))[_0x915f('0x77')]('\x27'+_0x5aed6f+'\x27','createdAt')[_0x915f('0x77')]('\x27'+_0x5aed6f+'\x27',_0x915f('0x59'))[_0x915f('0x80')](_0x915f('0x7b'))[_0x915f('0x40')](_0x915f('0x7c'))['where'](_0x915f('0x7d'),_0x5ce0c0['CmListId'][_0x915f('0x7a')]())[_0x915f('0x40')](_0x915f('0x86')))['toString']();}_0x2b49fb=squel[_0x915f('0x71')]()[_0x915f('0x72')]('cm_hopper_additional_phones')[_0x915f('0x73')]([_0x915f('0x87'),_0x915f('0x85'),_0x915f('0x74'),_0x915f('0x88'),'createdAt',_0x915f('0x59')],squel[_0x915f('0x7f')]()[_0x915f('0x77')]('h.id','id')[_0x915f('0x77')](_0x915f('0x78'),_0x915f('0x85'))[_0x915f('0x77')]('ci.item',_0x915f('0x74'))[_0x915f('0x77')](_0x915f('0x89'),_0x915f('0x88'))[_0x915f('0x77')]('\x27'+_0x5aed6f+'\x27',_0x915f('0x57'))[_0x915f('0x77')]('\x27'+_0x5aed6f+'\x27','updatedAt')[_0x915f('0x80')]('cm_contact_has_items','ci')[_0x915f('0x8a')](_0x915f('0x84'),'h','h.ContactId\x20=\x20ci.CmContactId')[_0x915f('0x40')](_0x915f('0x8b'),_0x5ce0c0[_0x915f('0x79')][_0x915f('0x7a')]())[_0x915f('0x40')]('h.CampaignId=?',_0x4f85de[_0x915f('0x4a')]['id']['toString']())['where'](_0x915f('0x8c'),_0x5aed6f))[_0x915f('0x7a')]();_0x55c5b1['push'](db[_0x915f('0x8d')][_0x915f('0x38')](_0x4ef740));_0xdcb422[_0x915f('0x8e')](db[_0x915f('0x8d')][_0x915f('0x38')](_0x2b49fb));}return BPromise['all'](_0x55c5b1);}})[_0x915f('0x28')](function(){return BPromise[_0x915f('0x8f')](_0xdcb422);})[_0x915f('0x28')](function(){return _0x5b7496;})[_0x915f('0x28')](respondWithResult(_0x932613,null))[_0x915f('0x48')](handleError(_0x932613,null));};exports[_0x915f('0x90')]=function(_0x42939c,_0x446307,_0x2fb922){return db[_0x915f('0x32')]['find']({'where':{'id':_0x42939c[_0x915f('0x4a')]['id']}})[_0x915f('0x28')](handleEntityNotFound(_0x446307,null))[_0x915f('0x28')](function(_0x501154){if(_0x501154){return _0x501154[_0x915f('0x90')](_0x42939c[_0x915f('0x38')]['ids']);}})['then'](function(_0x3c2473){if(_0x3c2473){return db[_0x915f('0x5d')][_0x915f('0x5a')]({'where':{'ListId':_0x42939c[_0x915f('0x38')][_0x915f('0x6d')],'CampaignId':_0x42939c[_0x915f('0x4a')]['id']}})[_0x915f('0x28')](function(){return _0x3c2473;});}})[_0x915f('0x28')](respondWithStatusCode(_0x446307,null))[_0x915f('0x48')](handleError(_0x446307,null));};exports[_0x915f('0x91')]=function(_0x522828,_0x27fdbd,_0x519bf7){var _0xbdd9ec={};var _0xc5950c={};var _0x500829;var _0x36d61d;return db[_0x915f('0x32')][_0x915f('0x5c')]({'where':{'id':_0x522828[_0x915f('0x4a')]['id']}})[_0x915f('0x28')](handleEntityNotFound(_0x27fdbd,null))[_0x915f('0x28')](function(_0x1048b1){if(_0x1048b1){_0x500829=_0x1048b1;_0xc5950c[_0x915f('0x36')]=_[_0x915f('0x37')](db['CmList'][_0x915f('0x33')]);_0xc5950c[_0x915f('0x38')]=_[_0x915f('0x37')](_0x522828['query']);_0xc5950c[_0x915f('0x39')]=_[_0x915f('0x3a')](_0xc5950c[_0x915f('0x36')],_0xc5950c['query']);_0xbdd9ec[_0x915f('0x3b')]=_[_0x915f('0x3a')](_0xc5950c[_0x915f('0x36')],qs[_0x915f('0x3c')](_0x522828[_0x915f('0x38')][_0x915f('0x3c')]));_0xbdd9ec[_0x915f('0x3b')]=_0xbdd9ec['attributes']['length']?_0xbdd9ec[_0x915f('0x3b')]:_0xc5950c[_0x915f('0x36')];_0xbdd9ec[_0x915f('0x5f')]=qs[_0x915f('0x3f')](_0x522828['query'][_0x915f('0x3f')]);_0xbdd9ec[_0x915f('0x40')]=qs[_0x915f('0x39')](_[_0x915f('0x41')](_0x522828['query'],_0xc5950c[_0x915f('0x39')]));if(_0x522828['query'][_0x915f('0x61')]){_0xbdd9ec['where']=_[_0x915f('0x42')](_0xbdd9ec[_0x915f('0x40')],{'$or':_[_0x915f('0x31')](_0xbdd9ec[_0x915f('0x3b')],function(_0x44eeef){var _0x2527d8={};_0x2527d8[_0x44eeef]={'$like':'%'+_0x522828[_0x915f('0x38')][_0x915f('0x61')]+'%'};return _0x2527d8;})});}_0xbdd9ec=_[_0x915f('0x42')]({},_0xbdd9ec,_0x522828[_0x915f('0x44')]);return _0x500829[_0x915f('0x91')](_0xbdd9ec);}})[_0x915f('0x28')](function(_0x973ec9){if(_0x973ec9){_0x36d61d=_0x973ec9[_0x915f('0x3d')];if(!_0x522828['query']['hasOwnProperty']('nolimit')){_0xbdd9ec[_0x915f('0x1f')]=qs['limit'](_0x522828['query'][_0x915f('0x1f')]);_0xbdd9ec['offset']=qs[_0x915f('0x1e')](_0x522828[_0x915f('0x38')]['offset']);}return _0x500829[_0x915f('0x91')](_0xbdd9ec);}})[_0x915f('0x28')](function(_0x20928d){if(_0x20928d){return _0x20928d?{'count':_0x36d61d,'rows':_0x20928d}:null;}})[_0x915f('0x28')](respondWithResult(_0x27fdbd,null))[_0x915f('0x48')](handleError(_0x27fdbd,null));};exports[_0x915f('0x92')]=function(_0x791b5e,_0x3df3c2,_0x386017){var _0x155b6d,_0x4428e1;var _0x4acce3=[];var _0xb8c9ed=moment()[_0x915f('0x6b')]('YYYY-MM-DD\x20HH:mm:ss');return db['Campaign'][_0x915f('0x4b')]({'where':{'id':_0x791b5e[_0x915f('0x4a')]['id']}})['then'](handleEntityNotFound(_0x3df3c2,null))[_0x915f('0x28')](function(_0x2130ca){if(_0x2130ca){_0x4428e1=_0x2130ca;return _0x2130ca[_0x915f('0x92')](_0x791b5e[_0x915f('0x4d')][_0x915f('0x6d')],_[_0x915f('0x58')](_0x791b5e[_0x915f('0x4d')],[_0x915f('0x6d'),'id'])||{});}return null;})[_0x915f('0x6e')](function(_0x24ffb1){var _0x4733cf;var _0x14f3f3;_0x155b6d=_0x24ffb1||[];var _0xb9d645=[];if(_0x24ffb1){for(var _0x240753=0x0;_0x240753<_0x24ffb1[_0x915f('0x3d')];_0x240753+=0x1){var _0x21a228=_0x24ffb1[_0x240753]['get']({'plain':!![]});_0x4733cf=squel[_0x915f('0x71')]()[_0x915f('0x72')](_0x915f('0x93'))[_0x915f('0x73')]([_0x915f('0x74'),_0x915f('0x75'),'ListId','CampaignId',_0x915f('0x57'),'updatedAt'],squel[_0x915f('0x7f')]()['field']('phone',_0x915f('0x74'))[_0x915f('0x77')]('id',_0x915f('0x75'))['field'](_0x21a228['CmListId']['toString'](),_0x915f('0x76'))[_0x915f('0x77')](_0x791b5e[_0x915f('0x4a')]['id']['toString'](),_0x915f('0x60'))[_0x915f('0x77')](_0x915f('0x78'),'createdAt')[_0x915f('0x77')](_0x915f('0x78'),_0x915f('0x59'))[_0x915f('0x80')](_0x915f('0x7b'))[_0x915f('0x40')](_0x915f('0x7c'))[_0x915f('0x40')](_0x915f('0x7d'),_0x21a228[_0x915f('0x79')][_0x915f('0x7a')]())[_0x915f('0x40')](_0x915f('0x86')))[_0x915f('0x7a')]();_0xb9d645[_0x915f('0x8e')](db[_0x915f('0x8d')][_0x915f('0x38')](_0x4733cf));}return BPromise[_0x915f('0x8f')](_0xb9d645);}})[_0x915f('0x28')](function(){return _0x155b6d;})[_0x915f('0x28')](respondWithResult(_0x3df3c2,null))[_0x915f('0x48')](handleError(_0x3df3c2,null));};exports[_0x915f('0x94')]=function(_0x2b7129,_0x5c8333,_0x194c2c){return db['Campaign'][_0x915f('0x4b')]({'where':{'id':_0x2b7129[_0x915f('0x4a')]['id']}})[_0x915f('0x28')](handleEntityNotFound(_0x5c8333,null))['then'](function(_0x267a98){if(_0x267a98){return _0x267a98[_0x915f('0x94')](_0x2b7129[_0x915f('0x38')][_0x915f('0x6d')]);}})[_0x915f('0x28')](function(_0x1fcbf8){if(_0x1fcbf8){return db[_0x915f('0x67')][_0x915f('0x5a')]({'where':{'ListId':_0x2b7129[_0x915f('0x38')]['ids'],'CampaignId':_0x2b7129[_0x915f('0x4a')]['id']}})['then'](function(){return _0x1fcbf8;});}})[_0x915f('0x28')](respondWithStatusCode(_0x5c8333,null))[_0x915f('0x48')](handleError(_0x5c8333,null));};
\ No newline at end of file
+var _0xbac2=['format','YYYY-MM-DD\x20HH:mm:ss','addLists','ids','omit','spread','dialCheckDuplicateType','always','insert','cm_hopper','phone','scheduledAt','ListId','createdAt','updatedAt','select','field','NOW()','ContactId','toString','from','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','CmListId','phone\x20IS\x20NOT\x20NULL','cm_hopper_final','CampaignId\x20=\x20?','phone\x20NOT\x20IN\x20(?)','onlyIfOpen','fromQuery','COALESCE(phone,\x27\x27)','into','cm_hopper_additional_phones','ci.item','ci.OrderBY','OrderBy','cm_contact_has_items','h.ContactId\x20=\x20ci.CmContactId','h.ListId\x20=\x20?','h.CampaignId=?','h.createdAt\x20=\x20?','push','sequelize','all','getBlackLists','CmList','addBlackLists','cm_hopper_black','removeBlackLists','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','set','apply','save','update','then','get','UserProfileResource','destroy','error','stack','name','send','index','map','Campaign','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','pick','filter','where','merge','VIRTUAL','includeAll','findAll','rows','catch','show','params','include','options','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','rawAttributes','body','IvrCampaigns','userProfileId','getHoppers','findOne','CmHopper','order','CampaignId','getHopperHistories','CmHopperHistory','CmHopperFinal','getHopperBlacks','CmHopperBlack','getLists'];(function(_0x4fd75e,_0x219e4a){var _0x5b6338=function(_0xf2969c){while(--_0xf2969c){_0x4fd75e['push'](_0x4fd75e['shift']());}};_0x5b6338(++_0x219e4a);}(_0xbac2,0xc6));var _0x2bac=function(_0x2bf141,_0x31eac7){_0x2bf141=_0x2bf141-0x0;var _0x48277b=_0xbac2[_0x2bf141];return _0x48277b;};'use strict';var emlformat=require(_0x2bac('0x0'));var rimraf=require(_0x2bac('0x1'));var zipdir=require(_0x2bac('0x2'));var jsonpatch=require(_0x2bac('0x3'));var rp=require(_0x2bac('0x4'));var moment=require(_0x2bac('0x5'));var BPromise=require(_0x2bac('0x6'));var Mustache=require(_0x2bac('0x7'));var util=require('util');var path=require(_0x2bac('0x8'));var sox=require(_0x2bac('0x9'));var csv=require('to-csv');var ejs=require(_0x2bac('0xa'));var fs=require('fs');var fs_extra=require(_0x2bac('0xb'));var _=require(_0x2bac('0xc'));var squel=require(_0x2bac('0xd'));var crypto=require(_0x2bac('0xe'));var jsforce=require(_0x2bac('0xf'));var deskjs=require(_0x2bac('0x10'));var toCsv=require(_0x2bac('0x11'));var querystring=require(_0x2bac('0x12'));var Papa=require(_0x2bac('0x13'));var Redis=require(_0x2bac('0x14'));var authService=require(_0x2bac('0x15'));var qs=require(_0x2bac('0x16'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0x2bac('0x17'));var licenseUtil=require(_0x2bac('0x18'));var db=require(_0x2bac('0x19'))['db'];function respondWithStatusCode(_0x322ad2,_0x23f30c){_0x23f30c=_0x23f30c||0xcc;return function(_0x124a93){if(_0x124a93){return _0x322ad2[_0x2bac('0x1a')](_0x23f30c);}return _0x322ad2['status'](_0x23f30c)[_0x2bac('0x1b')]();};}function respondWithResult(_0x4b53f6,_0x3d3a48){_0x3d3a48=_0x3d3a48||0xc8;return function(_0x1ab2a0){if(_0x1ab2a0){return _0x4b53f6[_0x2bac('0x1c')](_0x3d3a48)[_0x2bac('0x1d')](_0x1ab2a0);}};}function respondWithFilteredResult(_0x399a94,_0x141525){return function(_0x4f2637){if(_0x4f2637){var _0x5beb7a=typeof _0x141525[_0x2bac('0x1e')]===_0x2bac('0x1f')&&typeof _0x141525[_0x2bac('0x20')]===_0x2bac('0x1f');var _0x4f04d7=_0x4f2637[_0x2bac('0x21')];var _0x511d81=_0x5beb7a?0x0:_0x141525[_0x2bac('0x1e')];var _0x121d3f=_0x5beb7a?_0x4f2637['count']:_0x141525[_0x2bac('0x1e')]+_0x141525[_0x2bac('0x20')];var _0x596a39;if(_0x121d3f>=_0x4f04d7){_0x121d3f=_0x4f04d7;_0x596a39=0xc8;}else{_0x596a39=0xce;}_0x399a94['status'](_0x596a39);return _0x399a94[_0x2bac('0x22')]('Content-Range',_0x511d81+'-'+_0x121d3f+'/'+_0x4f04d7)[_0x2bac('0x1d')](_0x4f2637);}return null;};}function patchUpdates(_0x97fed3){return function(_0x1710cb){try{jsonpatch[_0x2bac('0x23')](_0x1710cb,_0x97fed3,!![]);}catch(_0x488c51){return BPromise['reject'](_0x488c51);}return _0x1710cb[_0x2bac('0x24')]();};}function saveUpdates(_0x1b9aa5,_0x440e09){return function(_0xaba033){if(_0xaba033){return _0xaba033[_0x2bac('0x25')](_0x1b9aa5)['then'](function(_0x5717b3){return _0x5717b3;});}return null;};}function removeEntity(_0x31b074,_0x32b6c2){return function(_0x1315d3){if(_0x1315d3){return _0x1315d3['destroy']()[_0x2bac('0x26')](function(){var _0x419cde=_0x1315d3[_0x2bac('0x27')]({'plain':!![]});var _0x343106='IvrCampaigns';return db[_0x2bac('0x28')][_0x2bac('0x29')]({'where':{'type':_0x343106,'resourceId':_0x419cde['id']}})[_0x2bac('0x26')](function(){return _0x1315d3;});})[_0x2bac('0x26')](function(){_0x31b074[_0x2bac('0x1c')](0xcc)[_0x2bac('0x1b')]();});}};}function handleEntityNotFound(_0x346acb,_0x325483){return function(_0x11f7a2){if(!_0x11f7a2){_0x346acb[_0x2bac('0x1a')](0x194);}return _0x11f7a2;};}function handleError(_0x101b36,_0xd545f9){_0xd545f9=_0xd545f9||0x1f4;return function(_0x4c8d88){logger[_0x2bac('0x2a')](_0x4c8d88[_0x2bac('0x2b')]);if(_0x4c8d88[_0x2bac('0x2c')]){delete _0x4c8d88[_0x2bac('0x2c')];}_0x101b36['status'](_0xd545f9)[_0x2bac('0x2d')](_0x4c8d88);};}exports[_0x2bac('0x2e')]=function(_0x428922,_0x108ac9){var _0x10f2f6={},_0x11bb2a={},_0x1dcc17={'count':0x0,'rows':[]};var _0x4ef3f5=_[_0x2bac('0x2f')](db[_0x2bac('0x30')]['rawAttributes'],function(_0x10b984){return{'name':_0x10b984['fieldName'],'type':_0x10b984['type'][_0x2bac('0x31')]};});_0x11bb2a[_0x2bac('0x32')]=_[_0x2bac('0x2f')](_0x4ef3f5,'name');_0x11bb2a[_0x2bac('0x33')]=_[_0x2bac('0x34')](_0x428922[_0x2bac('0x33')]);_0x11bb2a[_0x2bac('0x35')]=_[_0x2bac('0x36')](_0x11bb2a[_0x2bac('0x32')],_0x11bb2a[_0x2bac('0x33')]);_0x10f2f6['attributes']=_['intersection'](_0x11bb2a['model'],qs['fields'](_0x428922[_0x2bac('0x33')][_0x2bac('0x37')]));_0x10f2f6[_0x2bac('0x38')]=_0x10f2f6['attributes'][_0x2bac('0x39')]?_0x10f2f6['attributes']:_0x11bb2a[_0x2bac('0x32')];if(!_0x428922[_0x2bac('0x33')][_0x2bac('0x3a')](_0x2bac('0x3b'))){_0x10f2f6[_0x2bac('0x20')]=qs[_0x2bac('0x20')](_0x428922[_0x2bac('0x33')]['limit']);_0x10f2f6[_0x2bac('0x1e')]=qs[_0x2bac('0x1e')](_0x428922['query'][_0x2bac('0x1e')]);}_0x10f2f6['order']=qs[_0x2bac('0x3c')](_0x428922[_0x2bac('0x33')]['sort']);_0x10f2f6['where']=qs[_0x2bac('0x35')](_[_0x2bac('0x3d')](_0x428922['query'],_0x11bb2a[_0x2bac('0x35')]),_0x4ef3f5);if(_0x428922['query'][_0x2bac('0x3e')]){_0x10f2f6[_0x2bac('0x3f')]=_[_0x2bac('0x40')](_0x10f2f6[_0x2bac('0x3f')],{'$or':_['map'](_0x4ef3f5,function(_0x548b16){if(_0x548b16['type']!==_0x2bac('0x41')){var _0x1d9036={};_0x1d9036[_0x548b16[_0x2bac('0x2c')]]={'$like':'%'+_0x428922[_0x2bac('0x33')]['filter']+'%'};return _0x1d9036;}})});}_0x10f2f6=_[_0x2bac('0x40')]({},_0x10f2f6,_0x428922['options']);var _0x561904={'where':_0x10f2f6[_0x2bac('0x3f')]};return db['Campaign'][_0x2bac('0x21')](_0x561904)[_0x2bac('0x26')](function(_0x28dd83){_0x1dcc17[_0x2bac('0x21')]=_0x28dd83;if(_0x428922[_0x2bac('0x33')][_0x2bac('0x42')]){_0x10f2f6['include']=[{'all':!![]}];}return db[_0x2bac('0x30')][_0x2bac('0x43')](_0x10f2f6);})[_0x2bac('0x26')](function(_0x441903){_0x1dcc17[_0x2bac('0x44')]=_0x441903;return _0x1dcc17;})[_0x2bac('0x26')](respondWithFilteredResult(_0x108ac9,_0x10f2f6))[_0x2bac('0x45')](handleError(_0x108ac9,null));};exports[_0x2bac('0x46')]=function(_0x32a764,_0x11fe65){var _0x25dd9a={'raw':![],'where':{'id':_0x32a764[_0x2bac('0x47')]['id']}},_0x3ea52f={};_0x3ea52f[_0x2bac('0x32')]=_[_0x2bac('0x34')](db[_0x2bac('0x30')]['rawAttributes']);_0x3ea52f[_0x2bac('0x33')]=_['keys'](_0x32a764['query']);_0x3ea52f['filters']=_['intersection'](_0x3ea52f[_0x2bac('0x32')],_0x3ea52f[_0x2bac('0x33')]);_0x25dd9a[_0x2bac('0x38')]=_[_0x2bac('0x36')](_0x3ea52f[_0x2bac('0x32')],qs[_0x2bac('0x37')](_0x32a764['query'][_0x2bac('0x37')]));_0x25dd9a[_0x2bac('0x38')]=_0x25dd9a[_0x2bac('0x38')][_0x2bac('0x39')]?_0x25dd9a[_0x2bac('0x38')]:_0x3ea52f[_0x2bac('0x32')];if(_0x32a764['query']['includeAll']){_0x25dd9a[_0x2bac('0x48')]=[{'all':!![]}];}_0x25dd9a=_[_0x2bac('0x40')]({},_0x25dd9a,_0x32a764[_0x2bac('0x49')]);return db[_0x2bac('0x30')]['find'](_0x25dd9a)[_0x2bac('0x26')](handleEntityNotFound(_0x11fe65,null))[_0x2bac('0x26')](respondWithResult(_0x11fe65,null))[_0x2bac('0x45')](handleError(_0x11fe65,null));};exports['create']=function(_0x23b40a,_0x1dfff2){return db[_0x2bac('0x30')][_0x2bac('0x4a')](_0x23b40a['body'],{})[_0x2bac('0x26')](function(_0x1cb6d4){var _0x48b695=_0x23b40a[_0x2bac('0x4b')][_0x2bac('0x27')]({'plain':!![]});if(!_0x48b695)throw new Error(_0x2bac('0x4c'));if(_0x48b695[_0x2bac('0x4d')]===_0x2bac('0x4b')){var _0x7057f3=_0x1cb6d4[_0x2bac('0x27')]({'plain':!![]});var _0x59a7b2='IvrCampaigns';return db[_0x2bac('0x4e')][_0x2bac('0x4f')]({'where':{'name':_0x59a7b2,'userProfileId':_0x48b695['userProfileId']},'raw':!![]})[_0x2bac('0x26')](function(_0x282484){if(_0x282484&&_0x282484[_0x2bac('0x50')]===0x0){return db[_0x2bac('0x28')]['create']({'name':_0x7057f3['name'],'resourceId':_0x7057f3['id'],'type':_0x282484['name'],'sectionId':_0x282484['id']},{})['then'](function(){return _0x1cb6d4;});}else{return _0x1cb6d4;}})[_0x2bac('0x45')](function(_0x2e3abe){logger[_0x2bac('0x2a')](_0x2bac('0x51'),_0x2e3abe);throw _0x2e3abe;});}return _0x1cb6d4;})[_0x2bac('0x26')](respondWithResult(_0x1dfff2,0xc9))[_0x2bac('0x45')](handleError(_0x1dfff2,null));};exports[_0x2bac('0x52')]=function(_0x25612a,_0x4b0990){var _0xa7ad9={'where':{'id':_0x25612a['params']['id']}},_0x571cbf={};_0x571cbf['model']=_[_0x2bac('0x34')](db[_0x2bac('0x30')][_0x2bac('0x53')]);_0xa7ad9[_0x2bac('0x38')]=_[_0x2bac('0x36')](_0x571cbf[_0x2bac('0x32')],qs[_0x2bac('0x37')](_0x25612a[_0x2bac('0x33')][_0x2bac('0x37')]));_0xa7ad9[_0x2bac('0x38')]=_0xa7ad9[_0x2bac('0x38')][_0x2bac('0x39')]?_0xa7ad9[_0x2bac('0x38')]:_0x571cbf['model'];if(_0x25612a['query']['includeAll']){_0xa7ad9[_0x2bac('0x48')]=[{'all':!![]}];}_0xa7ad9=_[_0x2bac('0x40')]({},_0xa7ad9,_0x25612a[_0x2bac('0x49')]);return db[_0x2bac('0x30')][_0x2bac('0x4f')](_0xa7ad9)['then'](handleEntityNotFound(_0x4b0990,null))[_0x2bac('0x26')](function(_0x2e4182){if(_0x2e4182){var _0x1d30ae=_0x2e4182[_0x2bac('0x27')]({'plain':!![]});_0x1d30ae=qs['omit'](_0x1d30ae,['id','createdAt','updatedAt']);_0x25612a[_0x2bac('0x54')]=_['omit'](_0x25612a[_0x2bac('0x54')],['id','createdAt','updatedAt']);return db[_0x2bac('0x30')][_0x2bac('0x4a')](_[_0x2bac('0x40')](_0x1d30ae,_0x25612a['body']),{'include':_0x25612a[_0x2bac('0x33')][_0x2bac('0x42')]?[{'all':!![]}]:undefined})[_0x2bac('0x26')](function(_0x4604fd){var _0x3711b6=_0x25612a[_0x2bac('0x4b')][_0x2bac('0x27')]({'plain':!![]});if(!_0x3711b6)throw new Error(_0x2bac('0x4c'));if(_0x3711b6[_0x2bac('0x4d')]===_0x2bac('0x4b')){var _0x4b4bc0=_0x4604fd[_0x2bac('0x27')]({'plain':!![]});var _0x32276b=_0x2bac('0x55');return db['UserProfileSection'][_0x2bac('0x4f')]({'where':{'name':_0x32276b,'userProfileId':_0x3711b6[_0x2bac('0x56')]},'raw':!![]})[_0x2bac('0x26')](function(_0x4fc65c){if(_0x4fc65c&&_0x4fc65c[_0x2bac('0x50')]===0x0){return db[_0x2bac('0x28')][_0x2bac('0x4a')]({'name':_0x4b4bc0[_0x2bac('0x2c')],'resourceId':_0x4b4bc0['id'],'type':_0x4fc65c[_0x2bac('0x2c')],'sectionId':_0x4fc65c['id']},{})['then'](function(){return _0x4604fd;});}else{return _0x4604fd;}})['catch'](function(_0x221dc5){logger['error'](_0x2bac('0x51'),_0x221dc5);throw _0x221dc5;});}return _0x4604fd;});}})['then'](respondWithResult(_0x4b0990,0xc9))[_0x2bac('0x45')](handleError(_0x4b0990,null));};exports[_0x2bac('0x25')]=function(_0x1fe075,_0x48deae){if(_0x1fe075['body']['id']){delete _0x1fe075['body']['id'];}return db['Campaign'][_0x2bac('0x4f')]({'where':{'id':_0x1fe075[_0x2bac('0x47')]['id']}})[_0x2bac('0x26')](handleEntityNotFound(_0x48deae,null))[_0x2bac('0x26')](saveUpdates(_0x1fe075[_0x2bac('0x54')],null))[_0x2bac('0x26')](respondWithResult(_0x48deae,null))[_0x2bac('0x45')](handleError(_0x48deae,null));};exports['destroy']=function(_0x302928,_0x38f386){return db['Campaign'][_0x2bac('0x4f')]({'where':{'id':_0x302928['params']['id']}})[_0x2bac('0x26')](handleEntityNotFound(_0x38f386,null))['then'](removeEntity(_0x38f386,null))['catch'](handleError(_0x38f386,null));};exports[_0x2bac('0x57')]=function(_0x24615a,_0x1f42ad,_0xe090ab){var _0x2dc7bf={'raw':!![],'where':{}};var _0x3d7342={};var _0x55d56d={'count':0x0,'rows':[]};return db[_0x2bac('0x30')][_0x2bac('0x58')]({'where':{'id':_0x24615a[_0x2bac('0x47')]['id']}})[_0x2bac('0x26')](handleEntityNotFound(_0x1f42ad,null))['then'](function(_0x4e74b9){if(_0x4e74b9){_0x3d7342[_0x2bac('0x32')]=_['keys'](db[_0x2bac('0x59')][_0x2bac('0x53')]);_0x3d7342[_0x2bac('0x33')]=_['keys'](_0x24615a[_0x2bac('0x33')]);_0x3d7342[_0x2bac('0x35')]=_['intersection'](_0x3d7342[_0x2bac('0x32')],_0x3d7342['query']);_0x2dc7bf[_0x2bac('0x38')]=_[_0x2bac('0x36')](_0x3d7342[_0x2bac('0x32')],qs['fields'](_0x24615a[_0x2bac('0x33')][_0x2bac('0x37')]));_0x2dc7bf[_0x2bac('0x38')]=_0x2dc7bf[_0x2bac('0x38')]['length']?_0x2dc7bf[_0x2bac('0x38')]:_0x3d7342[_0x2bac('0x32')];if(!_0x24615a[_0x2bac('0x33')][_0x2bac('0x3a')]('nolimit')){_0x2dc7bf[_0x2bac('0x20')]=qs[_0x2bac('0x20')](_0x24615a[_0x2bac('0x33')][_0x2bac('0x20')]);_0x2dc7bf[_0x2bac('0x1e')]=qs[_0x2bac('0x1e')](_0x24615a['query'][_0x2bac('0x1e')]);}_0x2dc7bf[_0x2bac('0x5a')]=qs[_0x2bac('0x3c')](_0x24615a[_0x2bac('0x33')][_0x2bac('0x3c')]);_0x2dc7bf[_0x2bac('0x3f')]=qs[_0x2bac('0x35')](_[_0x2bac('0x3d')](_0x24615a['query'],_0x3d7342[_0x2bac('0x35')]));_0x2dc7bf['where'][_0x2bac('0x5b')]=_0x4e74b9['id'];if(_0x24615a[_0x2bac('0x33')][_0x2bac('0x3e')]){_0x2dc7bf[_0x2bac('0x3f')]=_[_0x2bac('0x40')](_0x2dc7bf[_0x2bac('0x3f')],{'$or':_[_0x2bac('0x2f')](_0x2dc7bf[_0x2bac('0x38')],function(_0x2d41a1){var _0x5bd5dd={};_0x5bd5dd[_0x2d41a1]={'$like':'%'+_0x24615a['query'][_0x2bac('0x3e')]+'%'};return _0x5bd5dd;})});}_0x2dc7bf=_[_0x2bac('0x40')]({},_0x2dc7bf,_0x24615a[_0x2bac('0x49')]);return db[_0x2bac('0x59')][_0x2bac('0x21')]({'where':_0x2dc7bf['where']})[_0x2bac('0x26')](function(_0x1db281){_0x55d56d[_0x2bac('0x21')]=_0x1db281;if(_0x24615a[_0x2bac('0x33')][_0x2bac('0x42')]){_0x2dc7bf[_0x2bac('0x48')]=[{'all':!![]}];}return db[_0x2bac('0x59')][_0x2bac('0x43')](_0x2dc7bf);})[_0x2bac('0x26')](function(_0x27fd15){_0x55d56d['rows']=_0x27fd15;return _0x55d56d;});}})['then'](respondWithFilteredResult(_0x1f42ad,_0x2dc7bf))[_0x2bac('0x45')](handleError(_0x1f42ad,null));};exports[_0x2bac('0x5c')]=function(_0x461839,_0x320d42,_0xaf7e15){var _0x51dcf1={'raw':!![],'where':{}};var _0x2ebe60={};var _0x38a1e8={'count':0x0,'rows':[]};return db[_0x2bac('0x30')][_0x2bac('0x58')]({'where':{'id':_0x461839[_0x2bac('0x47')]['id']}})[_0x2bac('0x26')](handleEntityNotFound(_0x320d42,null))['then'](function(_0x5b1fc3){if(_0x5b1fc3){_0x2ebe60[_0x2bac('0x32')]=_[_0x2bac('0x34')](db[_0x2bac('0x5d')][_0x2bac('0x53')]);_0x2ebe60[_0x2bac('0x33')]=_['keys'](_0x461839[_0x2bac('0x33')]);_0x2ebe60[_0x2bac('0x35')]=_[_0x2bac('0x36')](_0x2ebe60['model'],_0x2ebe60[_0x2bac('0x33')]);_0x51dcf1[_0x2bac('0x38')]=_['intersection'](_0x2ebe60[_0x2bac('0x32')],qs[_0x2bac('0x37')](_0x461839['query']['fields']));_0x51dcf1['attributes']=_0x51dcf1[_0x2bac('0x38')][_0x2bac('0x39')]?_0x51dcf1[_0x2bac('0x38')]:_0x2ebe60[_0x2bac('0x32')];if(!_0x461839[_0x2bac('0x33')][_0x2bac('0x3a')](_0x2bac('0x3b'))){_0x51dcf1[_0x2bac('0x20')]=qs['limit'](_0x461839[_0x2bac('0x33')]['limit']);_0x51dcf1[_0x2bac('0x1e')]=qs[_0x2bac('0x1e')](_0x461839[_0x2bac('0x33')][_0x2bac('0x1e')]);}_0x51dcf1[_0x2bac('0x5a')]=qs[_0x2bac('0x3c')](_0x461839[_0x2bac('0x33')][_0x2bac('0x3c')]);_0x51dcf1[_0x2bac('0x3f')]=qs['filters'](_['pick'](_0x461839[_0x2bac('0x33')],_0x2ebe60[_0x2bac('0x35')]));_0x51dcf1['where'][_0x2bac('0x5b')]=_0x5b1fc3['id'];if(_0x461839[_0x2bac('0x33')][_0x2bac('0x3e')]){_0x51dcf1[_0x2bac('0x3f')]=_[_0x2bac('0x40')](_0x51dcf1[_0x2bac('0x3f')],{'$or':_['map'](_0x51dcf1[_0x2bac('0x38')],function(_0x160ada){var _0x44d7b0={};_0x44d7b0[_0x160ada]={'$like':'%'+_0x461839['query'][_0x2bac('0x3e')]+'%'};return _0x44d7b0;})});}_0x51dcf1=_[_0x2bac('0x40')]({},_0x51dcf1,_0x461839['options']);return db[_0x2bac('0x5d')][_0x2bac('0x21')]({'where':_0x51dcf1[_0x2bac('0x3f')]})['then'](function(_0x3013c6){_0x38a1e8[_0x2bac('0x21')]=_0x3013c6;if(_0x461839[_0x2bac('0x33')][_0x2bac('0x42')]){_0x51dcf1[_0x2bac('0x48')]=[{'all':!![]}];}return db[_0x2bac('0x5d')][_0x2bac('0x43')](_0x51dcf1);})[_0x2bac('0x26')](function(_0x1d4a50){_0x38a1e8[_0x2bac('0x44')]=_0x1d4a50;return _0x38a1e8;});}})[_0x2bac('0x26')](respondWithFilteredResult(_0x320d42,_0x51dcf1))[_0x2bac('0x45')](handleError(_0x320d42,null));};exports['getHopperFinals']=function(_0x11fcdb,_0x279b92,_0x164900){var _0x38267e={'raw':!![],'where':{}};var _0x213762={};var _0x99c497={'count':0x0,'rows':[]};return db['Campaign']['findOne']({'where':{'id':_0x11fcdb[_0x2bac('0x47')]['id']}})[_0x2bac('0x26')](handleEntityNotFound(_0x279b92,null))['then'](function(_0x123485){if(_0x123485){_0x213762[_0x2bac('0x32')]=_[_0x2bac('0x34')](db['CmHopperFinal'][_0x2bac('0x53')]);_0x213762[_0x2bac('0x33')]=_[_0x2bac('0x34')](_0x11fcdb[_0x2bac('0x33')]);_0x213762[_0x2bac('0x35')]=_['intersection'](_0x213762[_0x2bac('0x32')],_0x213762[_0x2bac('0x33')]);_0x38267e['attributes']=_[_0x2bac('0x36')](_0x213762[_0x2bac('0x32')],qs[_0x2bac('0x37')](_0x11fcdb[_0x2bac('0x33')]['fields']));_0x38267e[_0x2bac('0x38')]=_0x38267e[_0x2bac('0x38')][_0x2bac('0x39')]?_0x38267e['attributes']:_0x213762['model'];if(!_0x11fcdb[_0x2bac('0x33')]['hasOwnProperty'](_0x2bac('0x3b'))){_0x38267e[_0x2bac('0x20')]=qs[_0x2bac('0x20')](_0x11fcdb['query'][_0x2bac('0x20')]);_0x38267e[_0x2bac('0x1e')]=qs['offset'](_0x11fcdb[_0x2bac('0x33')][_0x2bac('0x1e')]);}_0x38267e[_0x2bac('0x5a')]=qs[_0x2bac('0x3c')](_0x11fcdb[_0x2bac('0x33')][_0x2bac('0x3c')]);_0x38267e[_0x2bac('0x3f')]=qs[_0x2bac('0x35')](_[_0x2bac('0x3d')](_0x11fcdb[_0x2bac('0x33')],_0x213762[_0x2bac('0x35')]));_0x38267e[_0x2bac('0x3f')][_0x2bac('0x5b')]=_0x123485['id'];if(_0x11fcdb['query'][_0x2bac('0x3e')]){_0x38267e[_0x2bac('0x3f')]=_[_0x2bac('0x40')](_0x38267e[_0x2bac('0x3f')],{'$or':_[_0x2bac('0x2f')](_0x38267e[_0x2bac('0x38')],function(_0x26d96d){var _0x2ef728={};_0x2ef728[_0x26d96d]={'$like':'%'+_0x11fcdb['query'][_0x2bac('0x3e')]+'%'};return _0x2ef728;})});}_0x38267e=_['merge']({},_0x38267e,_0x11fcdb[_0x2bac('0x49')]);return db['CmHopperFinal']['count']({'where':_0x38267e[_0x2bac('0x3f')]})['then'](function(_0x5ac437){_0x99c497[_0x2bac('0x21')]=_0x5ac437;if(_0x11fcdb['query']['includeAll']){_0x38267e[_0x2bac('0x48')]=[{'all':!![]}];}return db[_0x2bac('0x5e')][_0x2bac('0x43')](_0x38267e);})[_0x2bac('0x26')](function(_0x52675f){_0x99c497[_0x2bac('0x44')]=_0x52675f;return _0x99c497;});}})[_0x2bac('0x26')](respondWithFilteredResult(_0x279b92,_0x38267e))[_0x2bac('0x45')](handleError(_0x279b92,null));};exports[_0x2bac('0x5f')]=function(_0x3d7696,_0x1a0662,_0x5381bc){var _0x51085f={'raw':!![],'where':{}};var _0xd5377={};var _0x17c5ad={'count':0x0,'rows':[]};return db[_0x2bac('0x30')][_0x2bac('0x58')]({'where':{'id':_0x3d7696['params']['id']}})[_0x2bac('0x26')](handleEntityNotFound(_0x1a0662,null))[_0x2bac('0x26')](function(_0x3338bd){if(_0x3338bd){_0xd5377[_0x2bac('0x32')]=_[_0x2bac('0x34')](db[_0x2bac('0x60')][_0x2bac('0x53')]);_0xd5377['query']=_[_0x2bac('0x34')](_0x3d7696[_0x2bac('0x33')]);_0xd5377[_0x2bac('0x35')]=_[_0x2bac('0x36')](_0xd5377[_0x2bac('0x32')],_0xd5377[_0x2bac('0x33')]);_0x51085f['attributes']=_['intersection'](_0xd5377['model'],qs[_0x2bac('0x37')](_0x3d7696[_0x2bac('0x33')]['fields']));_0x51085f['attributes']=_0x51085f[_0x2bac('0x38')][_0x2bac('0x39')]?_0x51085f[_0x2bac('0x38')]:_0xd5377[_0x2bac('0x32')];if(!_0x3d7696['query']['hasOwnProperty'](_0x2bac('0x3b'))){_0x51085f[_0x2bac('0x20')]=qs['limit'](_0x3d7696['query']['limit']);_0x51085f[_0x2bac('0x1e')]=qs['offset'](_0x3d7696[_0x2bac('0x33')][_0x2bac('0x1e')]);}_0x51085f[_0x2bac('0x5a')]=qs['sort'](_0x3d7696[_0x2bac('0x33')][_0x2bac('0x3c')]);_0x51085f[_0x2bac('0x3f')]=qs[_0x2bac('0x35')](_[_0x2bac('0x3d')](_0x3d7696['query'],_0xd5377[_0x2bac('0x35')]));_0x51085f[_0x2bac('0x3f')][_0x2bac('0x5b')]=_0x3338bd['id'];if(_0x3d7696[_0x2bac('0x33')]['filter']){_0x51085f[_0x2bac('0x3f')]=_['merge'](_0x51085f[_0x2bac('0x3f')],{'$or':_[_0x2bac('0x2f')](_0x51085f[_0x2bac('0x38')],function(_0x6d31f5){var _0x5f4562={};_0x5f4562[_0x6d31f5]={'$like':'%'+_0x3d7696[_0x2bac('0x33')]['filter']+'%'};return _0x5f4562;})});}_0x51085f=_[_0x2bac('0x40')]({},_0x51085f,_0x3d7696['options']);return db[_0x2bac('0x60')][_0x2bac('0x21')]({'where':_0x51085f[_0x2bac('0x3f')]})[_0x2bac('0x26')](function(_0x970478){_0x17c5ad[_0x2bac('0x21')]=_0x970478;if(_0x3d7696[_0x2bac('0x33')][_0x2bac('0x42')]){_0x51085f['include']=[{'all':!![]}];}return db[_0x2bac('0x60')][_0x2bac('0x43')](_0x51085f);})[_0x2bac('0x26')](function(_0x540d73){_0x17c5ad['rows']=_0x540d73;return _0x17c5ad;});}})['then'](respondWithFilteredResult(_0x1a0662,_0x51085f))[_0x2bac('0x45')](handleError(_0x1a0662,null));};exports[_0x2bac('0x61')]=function(_0xbb10a6,_0x5d52ce,_0x44e8d6){var _0x37a191={};var _0x28c175={};var _0x29da06;var _0x3d73fc;return db['Campaign'][_0x2bac('0x58')]({'where':{'id':_0xbb10a6[_0x2bac('0x47')]['id']}})[_0x2bac('0x26')](handleEntityNotFound(_0x5d52ce,null))[_0x2bac('0x26')](function(_0x5bf269){if(_0x5bf269){_0x29da06=_0x5bf269;_0x28c175['model']=_[_0x2bac('0x34')](db['CmList']['rawAttributes']);_0x28c175[_0x2bac('0x33')]=_[_0x2bac('0x34')](_0xbb10a6[_0x2bac('0x33')]);_0x28c175[_0x2bac('0x35')]=_[_0x2bac('0x36')](_0x28c175['model'],_0x28c175[_0x2bac('0x33')]);_0x37a191[_0x2bac('0x38')]=_[_0x2bac('0x36')](_0x28c175[_0x2bac('0x32')],qs['fields'](_0xbb10a6[_0x2bac('0x33')][_0x2bac('0x37')]));_0x37a191[_0x2bac('0x38')]=_0x37a191['attributes'][_0x2bac('0x39')]?_0x37a191[_0x2bac('0x38')]:_0x28c175[_0x2bac('0x32')];_0x37a191[_0x2bac('0x5a')]=qs[_0x2bac('0x3c')](_0xbb10a6[_0x2bac('0x33')][_0x2bac('0x3c')]);_0x37a191[_0x2bac('0x3f')]=qs[_0x2bac('0x35')](_[_0x2bac('0x3d')](_0xbb10a6[_0x2bac('0x33')],_0x28c175[_0x2bac('0x35')]));if(_0xbb10a6['query'][_0x2bac('0x3e')]){_0x37a191[_0x2bac('0x3f')]=_[_0x2bac('0x40')](_0x37a191[_0x2bac('0x3f')],{'$or':_['map'](_0x37a191['attributes'],function(_0x3d5506){var _0x4201e8={};_0x4201e8[_0x3d5506]={'$like':'%'+_0xbb10a6[_0x2bac('0x33')][_0x2bac('0x3e')]+'%'};return _0x4201e8;})});}_0x37a191=_[_0x2bac('0x40')]({},_0x37a191,_0xbb10a6[_0x2bac('0x49')]);return _0x29da06[_0x2bac('0x61')](_0x37a191);}})[_0x2bac('0x26')](function(_0x288b7f){if(_0x288b7f){_0x3d73fc=_0x288b7f[_0x2bac('0x39')];if(!_0xbb10a6[_0x2bac('0x33')][_0x2bac('0x3a')](_0x2bac('0x3b'))){_0x37a191[_0x2bac('0x20')]=qs['limit'](_0xbb10a6[_0x2bac('0x33')][_0x2bac('0x20')]);_0x37a191[_0x2bac('0x1e')]=qs[_0x2bac('0x1e')](_0xbb10a6[_0x2bac('0x33')]['offset']);}return _0x29da06['getLists'](_0x37a191);}})[_0x2bac('0x26')](function(_0xaa8715){if(_0xaa8715){return _0xaa8715?{'count':_0x3d73fc,'rows':_0xaa8715}:null;}})[_0x2bac('0x26')](respondWithResult(_0x5d52ce,null))['catch'](handleError(_0x5d52ce,null));};exports['addLists']=function(_0x129c62,_0x2045c5,_0x4ad84f){var _0x4d348c,_0x1938cf;var _0x51bb80=[];var _0xa525d4=moment()[_0x2bac('0x62')](_0x2bac('0x63'));return db[_0x2bac('0x30')][_0x2bac('0x4f')]({'where':{'id':_0x129c62[_0x2bac('0x47')]['id']}})['then'](handleEntityNotFound(_0x2045c5,null))[_0x2bac('0x26')](function(_0x4e6947){if(_0x4e6947){_0x1938cf=_0x4e6947;return _0x4e6947[_0x2bac('0x64')](_0x129c62[_0x2bac('0x54')][_0x2bac('0x65')],_[_0x2bac('0x66')](_0x129c62[_0x2bac('0x54')],[_0x2bac('0x65'),'id'])||{});}return null;})[_0x2bac('0x67')](function(_0x388fc0){var _0xe28c39;var _0x189ba4;_0x4d348c=_0x388fc0||[];var _0x27454c=[];if(_0x388fc0){for(var _0x1d402b=0x0;_0x1d402b<_0x388fc0['length'];_0x1d402b+=0x1){var _0x48e329=_0x388fc0[_0x1d402b][_0x2bac('0x27')]({'plain':!![]});_0x1938cf['dialCheckDuplicateType']=_0x129c62['body'][_0x2bac('0x68')]?_0x129c62[_0x2bac('0x54')][_0x2bac('0x68')]:_0x1938cf[_0x2bac('0x68')];switch(_0x1938cf[_0x2bac('0x68')]){case _0x2bac('0x69'):_0xe28c39=squel[_0x2bac('0x6a')]()['into'](_0x2bac('0x6b'))['fromQuery']([_0x2bac('0x6c'),_0x2bac('0x6d'),'ContactId',_0x2bac('0x6e'),'CampaignId',_0x2bac('0x6f'),_0x2bac('0x70')],squel[_0x2bac('0x71')]()[_0x2bac('0x72')]('phone',_0x2bac('0x6c'))[_0x2bac('0x72')](_0x2bac('0x73'),_0x2bac('0x6d'))[_0x2bac('0x72')]('id',_0x2bac('0x74'))[_0x2bac('0x72')](_0x48e329['CmListId']['toString'](),'ListId')[_0x2bac('0x72')](_0x129c62[_0x2bac('0x47')]['id'][_0x2bac('0x75')](),_0x2bac('0x5b'))['field']('\x27'+_0xa525d4+'\x27','createdAt')['field']('\x27'+_0xa525d4+'\x27',_0x2bac('0x70'))[_0x2bac('0x76')](_0x2bac('0x77'))['where'](_0x2bac('0x78'))['where'](_0x2bac('0x79'),_0x48e329[_0x2bac('0x7a')][_0x2bac('0x75')]())[_0x2bac('0x3f')](_0x2bac('0x7b'))['where']('phone\x20NOT\x20IN\x20(?)',squel[_0x2bac('0x71')]()[_0x2bac('0x72')]('COALESCE(calleridnum,\x27\x27)')[_0x2bac('0x76')](_0x2bac('0x7c'))[_0x2bac('0x3f')](_0x2bac('0x7d'),_0x129c62['params']['id'][_0x2bac('0x75')]()))['where'](_0x2bac('0x7e'),squel[_0x2bac('0x71')]()['field']('COALESCE(phone,\x27\x27)')[_0x2bac('0x76')]('cm_hopper')[_0x2bac('0x3f')](_0x2bac('0x7d'),_0x129c62[_0x2bac('0x47')]['id'][_0x2bac('0x75')]())))[_0x2bac('0x75')]();break;case _0x2bac('0x7f'):_0xe28c39=squel[_0x2bac('0x6a')]()['into'](_0x2bac('0x6b'))[_0x2bac('0x80')]([_0x2bac('0x6c'),_0x2bac('0x6d'),_0x2bac('0x74'),'ListId','CampaignId',_0x2bac('0x6f'),_0x2bac('0x70')],squel['select']()[_0x2bac('0x72')]('phone',_0x2bac('0x6c'))[_0x2bac('0x72')]('NOW()',_0x2bac('0x6d'))[_0x2bac('0x72')]('id',_0x2bac('0x74'))[_0x2bac('0x72')](_0x48e329['CmListId']['toString'](),_0x2bac('0x6e'))[_0x2bac('0x72')](_0x129c62[_0x2bac('0x47')]['id'][_0x2bac('0x75')](),_0x2bac('0x5b'))[_0x2bac('0x72')]('\x27'+_0xa525d4+'\x27',_0x2bac('0x6f'))[_0x2bac('0x72')]('\x27'+_0xa525d4+'\x27',_0x2bac('0x70'))[_0x2bac('0x76')]('cm_contacts')[_0x2bac('0x3f')](_0x2bac('0x78'))[_0x2bac('0x3f')](_0x2bac('0x79'),_0x48e329['CmListId']['toString']())[_0x2bac('0x3f')](_0x2bac('0x7b'))[_0x2bac('0x3f')]('phone\x20NOT\x20IN\x20(?)',squel[_0x2bac('0x71')]()['field'](_0x2bac('0x81'))[_0x2bac('0x76')]('cm_hopper')[_0x2bac('0x3f')](_0x2bac('0x7d'),_0x129c62['params']['id'][_0x2bac('0x75')]())))['toString']();break;default:_0xe28c39=squel['insert']()[_0x2bac('0x82')](_0x2bac('0x6b'))[_0x2bac('0x80')](['phone','scheduledAt',_0x2bac('0x74'),'ListId',_0x2bac('0x5b'),_0x2bac('0x6f'),'updatedAt'],squel['select']()[_0x2bac('0x72')]('phone',_0x2bac('0x6c'))['field'](_0x2bac('0x73'),_0x2bac('0x6d'))[_0x2bac('0x72')]('id',_0x2bac('0x74'))[_0x2bac('0x72')](_0x48e329[_0x2bac('0x7a')][_0x2bac('0x75')](),'ListId')[_0x2bac('0x72')](_0x129c62['params']['id']['toString'](),_0x2bac('0x5b'))[_0x2bac('0x72')]('\x27'+_0xa525d4+'\x27',_0x2bac('0x6f'))[_0x2bac('0x72')]('\x27'+_0xa525d4+'\x27',_0x2bac('0x70'))['from'](_0x2bac('0x77'))['where'](_0x2bac('0x78'))[_0x2bac('0x3f')]('ListId\x20=\x20?',_0x48e329[_0x2bac('0x7a')]['toString']())[_0x2bac('0x3f')]('phone\x20IS\x20NOT\x20NULL'))[_0x2bac('0x75')]();}_0x189ba4=squel[_0x2bac('0x6a')]()[_0x2bac('0x82')](_0x2bac('0x83'))[_0x2bac('0x80')](['cmHopperId','scheduledAt','phone','OrderBy',_0x2bac('0x6f'),_0x2bac('0x70')],squel[_0x2bac('0x71')]()[_0x2bac('0x72')]('h.id','id')[_0x2bac('0x72')](_0x2bac('0x73'),_0x2bac('0x6d'))[_0x2bac('0x72')](_0x2bac('0x84'),_0x2bac('0x6c'))[_0x2bac('0x72')](_0x2bac('0x85'),_0x2bac('0x86'))['field']('\x27'+_0xa525d4+'\x27',_0x2bac('0x6f'))[_0x2bac('0x72')]('\x27'+_0xa525d4+'\x27',_0x2bac('0x70'))[_0x2bac('0x76')](_0x2bac('0x87'),'ci')['join']('cm_hopper','h',_0x2bac('0x88'))[_0x2bac('0x3f')](_0x2bac('0x89'),_0x48e329[_0x2bac('0x7a')][_0x2bac('0x75')]())[_0x2bac('0x3f')](_0x2bac('0x8a'),_0x129c62['params']['id'][_0x2bac('0x75')]())[_0x2bac('0x3f')](_0x2bac('0x8b'),_0xa525d4))['toString']();_0x27454c[_0x2bac('0x8c')](db[_0x2bac('0x8d')]['query'](_0xe28c39));_0x51bb80[_0x2bac('0x8c')](db[_0x2bac('0x8d')][_0x2bac('0x33')](_0x189ba4));}return BPromise[_0x2bac('0x8e')](_0x27454c);}})[_0x2bac('0x26')](function(){return BPromise['all'](_0x51bb80);})[_0x2bac('0x26')](function(){return _0x4d348c;})['then'](respondWithResult(_0x2045c5,null))['catch'](handleError(_0x2045c5,null));};exports['removeLists']=function(_0x440021,_0x50801d,_0xf26394){return db[_0x2bac('0x30')][_0x2bac('0x4f')]({'where':{'id':_0x440021[_0x2bac('0x47')]['id']}})[_0x2bac('0x26')](handleEntityNotFound(_0x50801d,null))[_0x2bac('0x26')](function(_0x124d83){if(_0x124d83){return _0x124d83['removeLists'](_0x440021[_0x2bac('0x33')]['ids']);}})[_0x2bac('0x26')](function(_0x139700){if(_0x139700){return db[_0x2bac('0x59')][_0x2bac('0x29')]({'where':{'ListId':_0x440021[_0x2bac('0x33')]['ids'],'CampaignId':_0x440021[_0x2bac('0x47')]['id']}})['then'](function(){return _0x139700;});}})[_0x2bac('0x26')](respondWithStatusCode(_0x50801d,null))[_0x2bac('0x45')](handleError(_0x50801d,null));};exports[_0x2bac('0x8f')]=function(_0x51a4c5,_0x309771,_0x3db263){var _0x232de8={};var _0x2d3e7f={};var _0x911518;var _0x1fcf59;return db[_0x2bac('0x30')][_0x2bac('0x58')]({'where':{'id':_0x51a4c5[_0x2bac('0x47')]['id']}})[_0x2bac('0x26')](handleEntityNotFound(_0x309771,null))[_0x2bac('0x26')](function(_0x1b3e9b){if(_0x1b3e9b){_0x911518=_0x1b3e9b;_0x2d3e7f[_0x2bac('0x32')]=_[_0x2bac('0x34')](db[_0x2bac('0x90')]['rawAttributes']);_0x2d3e7f[_0x2bac('0x33')]=_['keys'](_0x51a4c5[_0x2bac('0x33')]);_0x2d3e7f[_0x2bac('0x35')]=_[_0x2bac('0x36')](_0x2d3e7f[_0x2bac('0x32')],_0x2d3e7f[_0x2bac('0x33')]);_0x232de8[_0x2bac('0x38')]=_[_0x2bac('0x36')](_0x2d3e7f['model'],qs[_0x2bac('0x37')](_0x51a4c5['query'][_0x2bac('0x37')]));_0x232de8['attributes']=_0x232de8[_0x2bac('0x38')][_0x2bac('0x39')]?_0x232de8['attributes']:_0x2d3e7f[_0x2bac('0x32')];_0x232de8[_0x2bac('0x5a')]=qs[_0x2bac('0x3c')](_0x51a4c5[_0x2bac('0x33')][_0x2bac('0x3c')]);_0x232de8[_0x2bac('0x3f')]=qs[_0x2bac('0x35')](_[_0x2bac('0x3d')](_0x51a4c5[_0x2bac('0x33')],_0x2d3e7f[_0x2bac('0x35')]));if(_0x51a4c5['query'][_0x2bac('0x3e')]){_0x232de8[_0x2bac('0x3f')]=_[_0x2bac('0x40')](_0x232de8[_0x2bac('0x3f')],{'$or':_[_0x2bac('0x2f')](_0x232de8[_0x2bac('0x38')],function(_0xfc4f28){var _0x2dfb9a={};_0x2dfb9a[_0xfc4f28]={'$like':'%'+_0x51a4c5[_0x2bac('0x33')][_0x2bac('0x3e')]+'%'};return _0x2dfb9a;})});}_0x232de8=_[_0x2bac('0x40')]({},_0x232de8,_0x51a4c5['options']);return _0x911518[_0x2bac('0x8f')](_0x232de8);}})[_0x2bac('0x26')](function(_0x36ea81){if(_0x36ea81){_0x1fcf59=_0x36ea81['length'];if(!_0x51a4c5[_0x2bac('0x33')]['hasOwnProperty'](_0x2bac('0x3b'))){_0x232de8[_0x2bac('0x20')]=qs['limit'](_0x51a4c5[_0x2bac('0x33')][_0x2bac('0x20')]);_0x232de8['offset']=qs[_0x2bac('0x1e')](_0x51a4c5[_0x2bac('0x33')]['offset']);}return _0x911518[_0x2bac('0x8f')](_0x232de8);}})['then'](function(_0x4af0d9){if(_0x4af0d9){return _0x4af0d9?{'count':_0x1fcf59,'rows':_0x4af0d9}:null;}})[_0x2bac('0x26')](respondWithResult(_0x309771,null))[_0x2bac('0x45')](handleError(_0x309771,null));};exports[_0x2bac('0x91')]=function(_0xdc3647,_0x78bfbb,_0xf71a0c){var _0x1d07ca,_0x385db3;var _0x565523=[];var _0x4c2c45=moment()[_0x2bac('0x62')]('YYYY-MM-DD\x20HH:mm:ss');return db[_0x2bac('0x30')][_0x2bac('0x4f')]({'where':{'id':_0xdc3647[_0x2bac('0x47')]['id']}})[_0x2bac('0x26')](handleEntityNotFound(_0x78bfbb,null))[_0x2bac('0x26')](function(_0x88fd30){if(_0x88fd30){_0x385db3=_0x88fd30;return _0x88fd30[_0x2bac('0x91')](_0xdc3647[_0x2bac('0x54')][_0x2bac('0x65')],_['omit'](_0xdc3647['body'],[_0x2bac('0x65'),'id'])||{});}return null;})[_0x2bac('0x67')](function(_0x264fe1){var _0x2790a4;var _0x4a43ac;_0x1d07ca=_0x264fe1||[];var _0x4fb662=[];if(_0x264fe1){for(var _0x147711=0x0;_0x147711<_0x264fe1['length'];_0x147711+=0x1){var _0x44599b=_0x264fe1[_0x147711]['get']({'plain':!![]});_0x2790a4=squel[_0x2bac('0x6a')]()['into'](_0x2bac('0x92'))[_0x2bac('0x80')](['phone',_0x2bac('0x74'),_0x2bac('0x6e'),_0x2bac('0x5b'),_0x2bac('0x6f'),'updatedAt'],squel[_0x2bac('0x71')]()['field'](_0x2bac('0x6c'),_0x2bac('0x6c'))[_0x2bac('0x72')]('id','ContactId')[_0x2bac('0x72')](_0x44599b[_0x2bac('0x7a')][_0x2bac('0x75')](),_0x2bac('0x6e'))[_0x2bac('0x72')](_0xdc3647[_0x2bac('0x47')]['id'][_0x2bac('0x75')](),'CampaignId')[_0x2bac('0x72')](_0x2bac('0x73'),_0x2bac('0x6f'))[_0x2bac('0x72')]('NOW()',_0x2bac('0x70'))[_0x2bac('0x76')](_0x2bac('0x77'))[_0x2bac('0x3f')](_0x2bac('0x78'))[_0x2bac('0x3f')]('ListId\x20=\x20?',_0x44599b[_0x2bac('0x7a')][_0x2bac('0x75')]())['where'](_0x2bac('0x7b')))['toString']();_0x4fb662[_0x2bac('0x8c')](db[_0x2bac('0x8d')][_0x2bac('0x33')](_0x2790a4));}return BPromise[_0x2bac('0x8e')](_0x4fb662);}})[_0x2bac('0x26')](function(){return _0x1d07ca;})['then'](respondWithResult(_0x78bfbb,null))[_0x2bac('0x45')](handleError(_0x78bfbb,null));};exports[_0x2bac('0x93')]=function(_0x217113,_0x40d8d1,_0x35a1ac){return db[_0x2bac('0x30')][_0x2bac('0x4f')]({'where':{'id':_0x217113[_0x2bac('0x47')]['id']}})[_0x2bac('0x26')](handleEntityNotFound(_0x40d8d1,null))[_0x2bac('0x26')](function(_0x2fdc36){if(_0x2fdc36){return _0x2fdc36[_0x2bac('0x93')](_0x217113['query'][_0x2bac('0x65')]);}})['then'](function(_0x4e49f6){if(_0x4e49f6){return db[_0x2bac('0x60')][_0x2bac('0x29')]({'where':{'ListId':_0x217113[_0x2bac('0x33')][_0x2bac('0x65')],'CampaignId':_0x217113[_0x2bac('0x47')]['id']}})[_0x2bac('0x26')](function(){return _0x4e49f6;});}})[_0x2bac('0x26')](respondWithStatusCode(_0x40d8d1,null))[_0x2bac('0x45')](handleError(_0x40d8d1,null));};
\ No newline at end of file
diff --git a/server/api/campaign/campaign.model.js b/server/api/campaign/campaign.model.js
index cbbd169..24f7dad 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(_0x4ff09b,_0x53f67d){var _0x3f5c2e=function(_0x124592){while(--_0x124592){_0x4ff09b['push'](_0x4ff09b['shift']());}};_0x3f5c2e(++_0x53f67d);}(_0x9957,0x93));var _0x7995=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0x9957[_0x618414];return _0x21c19a;};'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(_0x44bcb0,_0x235aa9){var _0xfaf881=function(_0x25d81d){while(--_0x25d81d){_0x44bcb0['push'](_0x44bcb0['shift']());}};_0xfaf881(++_0x235aa9);}(_0x9957,0x93));var _0x7995=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x9957[_0x3947c9];return _0x2e7871;};'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 3be3c61..37e2cfa 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 _0x18a5=['../../config/utils','../../config/logger','rpc','../../config/environment','request','then','info','Campaign,\x20%s,\x20%s','request\x20sent','debug','Campaign,\x20%s,\x20%s,\x20%s','stringify','error','message','result','GetCampaign','Campaign','findAll','options','raw','attributes','limit','include','map','model','catch','lodash','util','randomstring','../../mysqldb'];(function(_0x2408d4,_0x137e4b){var _0x3fdac1=function(_0x32ea32){while(--_0x32ea32){_0x2408d4['push'](_0x2408d4['shift']());}};_0x3fdac1(++_0x137e4b);}(_0x18a5,0x164));var _0x518a=function(_0x3557ce,_0x6e74c9){_0x3557ce=_0x3557ce-0x0;var _0x3bcff7=_0x18a5[_0x3557ce];return _0x3bcff7;};'use strict';var _=require(_0x518a('0x0'));var util=require(_0x518a('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x518a('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x518a('0x3'))['db'];var utils=require(_0x518a('0x4'));var logger=require(_0x518a('0x5'))(_0x518a('0x6'));var config=require(_0x518a('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2ea311,_0x1d4199,_0x19a2df){return new BPromise(function(_0x2a5fa6,_0x8bd966){return client[_0x518a('0x8')](_0x2ea311,_0x19a2df)[_0x518a('0x9')](function(_0xb996c3){logger[_0x518a('0xa')](_0x518a('0xb'),_0x1d4199,_0x518a('0xc'));logger[_0x518a('0xd')](_0x518a('0xe'),_0x1d4199,_0x518a('0xc'),JSON[_0x518a('0xf')](_0xb996c3));if(_0xb996c3['error']){if(_0xb996c3[_0x518a('0x10')]['code']===0x1f4){logger[_0x518a('0x10')]('Campaign,\x20%s,\x20%s',_0x1d4199,_0xb996c3[_0x518a('0x10')][_0x518a('0x11')]);return _0x8bd966(_0xb996c3[_0x518a('0x10')][_0x518a('0x11')]);}logger[_0x518a('0x10')](_0x518a('0xb'),_0x1d4199,_0xb996c3[_0x518a('0x10')]['message']);return _0x2a5fa6(_0xb996c3[_0x518a('0x10')][_0x518a('0x11')]);}else{logger[_0x518a('0xa')]('Campaign,\x20%s,\x20%s',_0x1d4199,_0x518a('0xc'));_0x2a5fa6(_0xb996c3[_0x518a('0x12')]['message']);}})['catch'](function(_0x177882){logger['error'](_0x518a('0xb'),_0x1d4199,_0x177882);_0x8bd966(_0x177882);});});}exports[_0x518a('0x13')]=function(_0x244e66){var _0x336da8=this;return new Promise(function(_0xa5f6ac,_0x26330e){return db[_0x518a('0x14')][_0x518a('0x15')]({'raw':_0x244e66[_0x518a('0x16')]?_0x244e66[_0x518a('0x16')][_0x518a('0x17')]===undefined?!![]:![]:!![],'where':_0x244e66[_0x518a('0x16')]?_0x244e66[_0x518a('0x16')]['where']||null:null,'attributes':_0x244e66[_0x518a('0x16')]?_0x244e66['options'][_0x518a('0x18')]||null:null,'limit':_0x244e66['options']?_0x244e66[_0x518a('0x16')][_0x518a('0x19')]||null:null,'include':_0x244e66[_0x518a('0x16')]?_0x244e66[_0x518a('0x16')][_0x518a('0x1a')]?_[_0x518a('0x1b')](_0x244e66['options']['include'],function(_0x590fc2){return{'model':db[_0x590fc2[_0x518a('0x1c')]],'as':_0x590fc2['as'],'attributes':_0x590fc2['attributes'],'include':_0x590fc2[_0x518a('0x1a')]?_[_0x518a('0x1b')](_0x590fc2[_0x518a('0x1a')],function(_0x941f58){return{'model':db[_0x941f58[_0x518a('0x1c')]],'as':_0x941f58['as'],'attributes':_0x941f58[_0x518a('0x18')],'include':_0x941f58[_0x518a('0x1a')]?_[_0x518a('0x1b')](_0x941f58[_0x518a('0x1a')],function(_0x262260){return{'model':db[_0x262260[_0x518a('0x1c')]],'as':_0x262260['as'],'attributes':_0x262260[_0x518a('0x18')]};}):[]};}):[]};}):[]:[]})[_0x518a('0x9')](function(_0x3eadb2){logger['info']('GetCampaign',_0x244e66);logger['debug'](_0x518a('0x13'),_0x244e66,JSON[_0x518a('0xf')](_0x3eadb2));_0xa5f6ac(_0x3eadb2);})[_0x518a('0x1d')](function(_0x4cf043){logger['error'](_0x518a('0x13'),_0x4cf043['message'],_0x244e66);_0x26330e(_0x336da8['error'](0x1f4,_0x4cf043[_0x518a('0x11')]));});});};
\ No newline at end of file
+var _0x255f=['message','info','result','catch','GetCampaign','Campaign','findAll','options','raw','where','attributes','limit','include','map','model','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','Campaign,\x20%s,\x20%s','debug','Campaign,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0xe12aa8,_0xd52c23){var _0x3f663a=function(_0x4cd15c){while(--_0x4cd15c){_0xe12aa8['push'](_0xe12aa8['shift']());}};_0x3f663a(++_0xd52c23);}(_0x255f,0x185));var _0xf255=function(_0xf02b6c,_0x27fbdd){_0xf02b6c=_0xf02b6c-0x0;var _0x122898=_0x255f[_0xf02b6c];return _0x122898;};'use strict';var _=require(_0xf255('0x0'));var util=require('util');var moment=require(_0xf255('0x1'));var BPromise=require(_0xf255('0x2'));var rs=require(_0xf255('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf255('0x4'))['db'];var utils=require(_0xf255('0x5'));var logger=require(_0xf255('0x6'))(_0xf255('0x7'));var config=require(_0xf255('0x8'));var jayson=require(_0xf255('0x9'));var client=jayson[_0xf255('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1236fb,_0x4b98fa,_0x481d8c){return new BPromise(function(_0x4a533f,_0x3cc3fc){return client['request'](_0x1236fb,_0x481d8c)[_0xf255('0xb')](function(_0x2f6020){logger['info'](_0xf255('0xc'),_0x4b98fa,'request\x20sent');logger[_0xf255('0xd')](_0xf255('0xe'),_0x4b98fa,_0xf255('0xf'),JSON[_0xf255('0x10')](_0x2f6020));if(_0x2f6020[_0xf255('0x11')]){if(_0x2f6020['error'][_0xf255('0x12')]===0x1f4){logger[_0xf255('0x11')](_0xf255('0xc'),_0x4b98fa,_0x2f6020['error'][_0xf255('0x13')]);return _0x3cc3fc(_0x2f6020[_0xf255('0x11')]['message']);}logger[_0xf255('0x11')](_0xf255('0xc'),_0x4b98fa,_0x2f6020[_0xf255('0x11')]['message']);return _0x4a533f(_0x2f6020[_0xf255('0x11')][_0xf255('0x13')]);}else{logger[_0xf255('0x14')](_0xf255('0xc'),_0x4b98fa,_0xf255('0xf'));_0x4a533f(_0x2f6020[_0xf255('0x15')]['message']);}})[_0xf255('0x16')](function(_0x4ed7c0){logger[_0xf255('0x11')]('Campaign,\x20%s,\x20%s',_0x4b98fa,_0x4ed7c0);_0x3cc3fc(_0x4ed7c0);});});}exports[_0xf255('0x17')]=function(_0x426286){var _0x45b51b=this;return new Promise(function(_0x43902c,_0x186558){return db[_0xf255('0x18')][_0xf255('0x19')]({'raw':_0x426286[_0xf255('0x1a')]?_0x426286[_0xf255('0x1a')][_0xf255('0x1b')]===undefined?!![]:![]:!![],'where':_0x426286[_0xf255('0x1a')]?_0x426286['options'][_0xf255('0x1c')]||null:null,'attributes':_0x426286[_0xf255('0x1a')]?_0x426286[_0xf255('0x1a')][_0xf255('0x1d')]||null:null,'limit':_0x426286[_0xf255('0x1a')]?_0x426286[_0xf255('0x1a')][_0xf255('0x1e')]||null:null,'include':_0x426286['options']?_0x426286[_0xf255('0x1a')][_0xf255('0x1f')]?_[_0xf255('0x20')](_0x426286[_0xf255('0x1a')][_0xf255('0x1f')],function(_0x1b3b1a){return{'model':db[_0x1b3b1a[_0xf255('0x21')]],'as':_0x1b3b1a['as'],'attributes':_0x1b3b1a['attributes'],'include':_0x1b3b1a[_0xf255('0x1f')]?_['map'](_0x1b3b1a['include'],function(_0x3d64c5){return{'model':db[_0x3d64c5[_0xf255('0x21')]],'as':_0x3d64c5['as'],'attributes':_0x3d64c5[_0xf255('0x1d')],'include':_0x3d64c5[_0xf255('0x1f')]?_[_0xf255('0x20')](_0x3d64c5['include'],function(_0x1c3a8e){return{'model':db[_0x1c3a8e[_0xf255('0x21')]],'as':_0x1c3a8e['as'],'attributes':_0x1c3a8e[_0xf255('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1b1980){logger[_0xf255('0x14')](_0xf255('0x17'),_0x426286);logger['debug'](_0xf255('0x17'),_0x426286,JSON[_0xf255('0x10')](_0x1b1980));_0x43902c(_0x1b1980);})[_0xf255('0x16')](function(_0x39aac5){logger[_0xf255('0x11')](_0xf255('0x17'),_0x39aac5[_0xf255('0x13')],_0x426286);_0x186558(_0x45b51b[_0xf255('0x11')](0x1f4,_0x39aac5[_0xf255('0x13')]));});});};
\ No newline at end of file
diff --git a/server/api/campaign/index.js b/server/api/campaign/index.js
index 39d7504..4b54c43 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 _0x11db=['show','/:id/hoppers','getHoppers','/:id/hopper_histories','getHopperHistories','getHopperBlacks','/:id/lists','getLists','/:id/blacklists','getBlackLists','post','create','/:id/clone','clone','addLists','addBlackLists','update','delete','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./campaign.controller','get','isAuthenticated','index','/:id'];(function(_0x50a889,_0x2a32f9){var _0x3ff87f=function(_0x2de24b){while(--_0x2de24b){_0x50a889['push'](_0x50a889['shift']());}};_0x3ff87f(++_0x2a32f9);}(_0x11db,0x146));var _0xb11d=function(_0x12f688,_0x585c25){_0x12f688=_0x12f688-0x0;var _0x59c3de=_0x11db[_0x12f688];return _0x59c3de;};'use strict';var multer=require(_0xb11d('0x0'));var util=require(_0xb11d('0x1'));var path=require(_0xb11d('0x2'));var timeout=require(_0xb11d('0x3'));var express=require(_0xb11d('0x4'));var router=express['Router']();var fs_extra=require(_0xb11d('0x5'));var auth=require(_0xb11d('0x6'));var interaction=require(_0xb11d('0x7'));var config=require(_0xb11d('0x8'));var controller=require(_0xb11d('0x9'));router[_0xb11d('0xa')]('/',auth[_0xb11d('0xb')](),controller[_0xb11d('0xc')]);router[_0xb11d('0xa')](_0xb11d('0xd'),auth['isAuthenticated'](),controller[_0xb11d('0xe')]);router[_0xb11d('0xa')](_0xb11d('0xf'),auth['isAuthenticated'](),controller[_0xb11d('0x10')]);router[_0xb11d('0xa')](_0xb11d('0x11'),auth[_0xb11d('0xb')](),controller[_0xb11d('0x12')]);router[_0xb11d('0xa')]('/:id/hopper_finals',auth[_0xb11d('0xb')](),controller['getHopperFinals']);router[_0xb11d('0xa')]('/:id/hopper_black',auth[_0xb11d('0xb')](),controller[_0xb11d('0x13')]);router[_0xb11d('0xa')](_0xb11d('0x14'),auth['isAuthenticated'](),controller[_0xb11d('0x15')]);router[_0xb11d('0xa')](_0xb11d('0x16'),auth[_0xb11d('0xb')](),controller[_0xb11d('0x17')]);router[_0xb11d('0x18')]('/',auth[_0xb11d('0xb')](),controller[_0xb11d('0x19')]);router['post'](_0xb11d('0x1a'),auth['isAuthenticated'](),controller[_0xb11d('0x1b')]);router[_0xb11d('0x18')]('/:id/lists',auth[_0xb11d('0xb')](),controller[_0xb11d('0x1c')]);router[_0xb11d('0x18')](_0xb11d('0x16'),auth[_0xb11d('0xb')](),controller[_0xb11d('0x1d')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0xb11d('0x1e')]);router[_0xb11d('0x1f')](_0xb11d('0xd'),auth[_0xb11d('0xb')](),controller[_0xb11d('0x20')]);router[_0xb11d('0x1f')](_0xb11d('0x14'),auth[_0xb11d('0xb')](),controller['removeLists']);router['delete']('/:id/blacklists',auth[_0xb11d('0xb')](),controller['removeBlackLists']);module[_0xb11d('0x21')]=router;
\ No newline at end of file
+var _0x0b18=['/:id/lists','/:id/blacklists','getBlackLists','post','create','addLists','addBlackLists','put','delete','destroy','removeLists','removeBlackLists','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./campaign.controller','get','isAuthenticated','/:id','show','/:id/hoppers','getHoppers','/:id/hopper_histories','getHopperHistories','/:id/hopper_finals','getHopperBlacks'];(function(_0x13e741,_0x5d3c24){var _0x3f8bb3=function(_0x4440a0){while(--_0x4440a0){_0x13e741['push'](_0x13e741['shift']());}};_0x3f8bb3(++_0x5d3c24);}(_0x0b18,0x199));var _0x80b1=function(_0x121985,_0x252db3){_0x121985=_0x121985-0x0;var _0x20bc79=_0x0b18[_0x121985];return _0x20bc79;};'use strict';var multer=require(_0x80b1('0x0'));var util=require(_0x80b1('0x1'));var path=require(_0x80b1('0x2'));var timeout=require(_0x80b1('0x3'));var express=require(_0x80b1('0x4'));var router=express['Router']();var fs_extra=require(_0x80b1('0x5'));var auth=require(_0x80b1('0x6'));var interaction=require(_0x80b1('0x7'));var config=require(_0x80b1('0x8'));var controller=require(_0x80b1('0x9'));router[_0x80b1('0xa')]('/',auth[_0x80b1('0xb')](),controller['index']);router['get'](_0x80b1('0xc'),auth[_0x80b1('0xb')](),controller[_0x80b1('0xd')]);router['get'](_0x80b1('0xe'),auth[_0x80b1('0xb')](),controller[_0x80b1('0xf')]);router[_0x80b1('0xa')](_0x80b1('0x10'),auth[_0x80b1('0xb')](),controller[_0x80b1('0x11')]);router[_0x80b1('0xa')](_0x80b1('0x12'),auth[_0x80b1('0xb')](),controller['getHopperFinals']);router[_0x80b1('0xa')]('/:id/hopper_black',auth[_0x80b1('0xb')](),controller[_0x80b1('0x13')]);router[_0x80b1('0xa')](_0x80b1('0x14'),auth[_0x80b1('0xb')](),controller['getLists']);router[_0x80b1('0xa')](_0x80b1('0x15'),auth[_0x80b1('0xb')](),controller[_0x80b1('0x16')]);router[_0x80b1('0x17')]('/',auth[_0x80b1('0xb')](),controller[_0x80b1('0x18')]);router[_0x80b1('0x17')]('/:id/clone',auth[_0x80b1('0xb')](),controller['clone']);router[_0x80b1('0x17')](_0x80b1('0x14'),auth[_0x80b1('0xb')](),controller[_0x80b1('0x19')]);router[_0x80b1('0x17')](_0x80b1('0x15'),auth[_0x80b1('0xb')](),controller[_0x80b1('0x1a')]);router[_0x80b1('0x1b')]('/:id',auth[_0x80b1('0xb')](),controller['update']);router[_0x80b1('0x1c')](_0x80b1('0xc'),auth[_0x80b1('0xb')](),controller[_0x80b1('0x1d')]);router[_0x80b1('0x1c')](_0x80b1('0x14'),auth[_0x80b1('0xb')](),controller[_0x80b1('0x1e')]);router[_0x80b1('0x1c')](_0x80b1('0x15'),auth[_0x80b1('0xb')](),controller[_0x80b1('0x1f')]);module[_0x80b1('0x20')]=router;
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.attributes.js b/server/api/cannedAnswer/cannedAnswer.attributes.js
index e303ea6..f0b07ab 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 _0x0f12=['exports','STRING','TEXT','VIRTUAL','getDataValue','key','sequelize'];(function(_0x36c5b0,_0x5001da){var _0xf19333=function(_0x1e880a){while(--_0x1e880a){_0x36c5b0['push'](_0x36c5b0['shift']());}};_0xf19333(++_0x5001da);}(_0x0f12,0xd1));var _0x20f1=function(_0x53e85e,_0x3f9f42){_0x53e85e=_0x53e85e-0x0;var _0xf2f1e2=_0x0f12[_0x53e85e];return _0xf2f1e2;};'use strict';var Sequelize=require(_0x20f1('0x0'));module[_0x20f1('0x1')]={'key':{'type':Sequelize[_0x20f1('0x2')],'allowNull':![]},'value':{'type':Sequelize[_0x20f1('0x3')],'allowNull':![]},'description':{'type':Sequelize[_0x20f1('0x2')]},'name':{'type':Sequelize[_0x20f1('0x4')],'get':function(){return this[_0x20f1('0x5')](_0x20f1('0x6'));}}};
\ No newline at end of file
+var _0xb4e0=['sequelize','TEXT','getDataValue','key'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0xb4e0,0xf4));var _0x0b4e=function(_0x2aadfb,_0x489787){_0x2aadfb=_0x2aadfb-0x0;var _0xcd821e=_0xb4e0[_0x2aadfb];return _0xcd821e;};'use strict';var Sequelize=require(_0x0b4e('0x0'));module['exports']={'key':{'type':Sequelize['STRING'],'allowNull':![]},'value':{'type':Sequelize[_0x0b4e('0x1')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'name':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x0b4e('0x2')](_0x0b4e('0x3'));}}};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.controller.js b/server/api/cannedAnswer/cannedAnswer.controller.js
index 234796d..220aa2b 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 _0xcd0c=['../../mysqldb','status','end','json','undefined','limit','count','offset','set','Content-Range','reject','save','update','then','destroy','get','CannedAnswers','UserProfileResource','sendStatus','error','stack','name','send','index','map','fieldName','type','key','model','query','intersection','attributes','fields','length','nolimit','order','sort','where','filters','pick','filter','merge','options','CannedAnswer','includeAll','include','findAll','rows','catch','keys','rawAttributes','find','body','params','create','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','Sequelize','ValidationError','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','ejs','fs-extra','lodash','squel','jsforce','desk.js','to-csv','querystring','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment'];(function(_0x1c1804,_0x58de42){var _0x13df22=function(_0x427ee6){while(--_0x427ee6){_0x1c1804['push'](_0x1c1804['shift']());}};_0x13df22(++_0x58de42);}(_0xcd0c,0x1aa));var _0xccd0=function(_0xe9c8e4,_0x3aa2f6){_0xe9c8e4=_0xe9c8e4-0x0;var _0x2037fa=_0xcd0c[_0xe9c8e4];return _0x2037fa;};'use strict';var emlformat=require(_0xccd0('0x0'));var rimraf=require(_0xccd0('0x1'));var zipdir=require(_0xccd0('0x2'));var jsonpatch=require(_0xccd0('0x3'));var rp=require('request-promise');var moment=require(_0xccd0('0x4'));var BPromise=require(_0xccd0('0x5'));var Mustache=require(_0xccd0('0x6'));var util=require(_0xccd0('0x7'));var path=require('path');var sox=require(_0xccd0('0x8'));var csv=require('to-csv');var ejs=require(_0xccd0('0x9'));var fs=require('fs');var fs_extra=require(_0xccd0('0xa'));var _=require(_0xccd0('0xb'));var squel=require(_0xccd0('0xc'));var crypto=require('crypto');var jsforce=require(_0xccd0('0xd'));var deskjs=require(_0xccd0('0xe'));var toCsv=require(_0xccd0('0xf'));var querystring=require(_0xccd0('0x10'));var Papa=require('papaparse');var Redis=require(_0xccd0('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xccd0('0x12'));var hardwareService=require(_0xccd0('0x13'));var logger=require(_0xccd0('0x14'))(_0xccd0('0x15'));var utils=require(_0xccd0('0x16'));var config=require(_0xccd0('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0xccd0('0x18'))['db'];function respondWithStatusCode(_0x5861b6,_0x29644a){_0x29644a=_0x29644a||0xcc;return function(_0x268c84){if(_0x268c84){return _0x5861b6['sendStatus'](_0x29644a);}return _0x5861b6[_0xccd0('0x19')](_0x29644a)[_0xccd0('0x1a')]();};}function respondWithResult(_0x52af9f,_0x270856){_0x270856=_0x270856||0xc8;return function(_0x570e23){if(_0x570e23){return _0x52af9f[_0xccd0('0x19')](_0x270856)[_0xccd0('0x1b')](_0x570e23);}};}function respondWithFilteredResult(_0x4ea865,_0x3448aa){return function(_0x1b10f4){if(_0x1b10f4){var _0x5e1eda=typeof _0x3448aa['offset']===_0xccd0('0x1c')&&typeof _0x3448aa[_0xccd0('0x1d')]===_0xccd0('0x1c');var _0xaed907=_0x1b10f4[_0xccd0('0x1e')];var _0x4f5804=_0x5e1eda?0x0:_0x3448aa['offset'];var _0x3cc938=_0x5e1eda?_0x1b10f4['count']:_0x3448aa[_0xccd0('0x1f')]+_0x3448aa['limit'];var _0x443df5;if(_0x3cc938>=_0xaed907){_0x3cc938=_0xaed907;_0x443df5=0xc8;}else{_0x443df5=0xce;}_0x4ea865[_0xccd0('0x19')](_0x443df5);return _0x4ea865[_0xccd0('0x20')](_0xccd0('0x21'),_0x4f5804+'-'+_0x3cc938+'/'+_0xaed907)['json'](_0x1b10f4);}return null;};}function patchUpdates(_0x1f485b){return function(_0x22fb21){try{jsonpatch['apply'](_0x22fb21,_0x1f485b,!![]);}catch(_0x34f571){return BPromise[_0xccd0('0x22')](_0x34f571);}return _0x22fb21[_0xccd0('0x23')]();};}function saveUpdates(_0x53b40f,_0x47b524){return function(_0x379feb){if(_0x379feb){return _0x379feb[_0xccd0('0x24')](_0x53b40f)[_0xccd0('0x25')](function(_0x3b9194){return _0x3b9194;});}return null;};}function removeEntity(_0x41bc85,_0x225a5d){return function(_0x44ba85){if(_0x44ba85){return _0x44ba85[_0xccd0('0x26')]()[_0xccd0('0x25')](function(){var _0x9579=_0x44ba85[_0xccd0('0x27')]({'plain':!![]});var _0x4671de=_0xccd0('0x28');return db[_0xccd0('0x29')][_0xccd0('0x26')]({'where':{'type':_0x4671de,'resourceId':_0x9579['id']}})[_0xccd0('0x25')](function(){return _0x44ba85;});})['then'](function(){_0x41bc85[_0xccd0('0x19')](0xcc)[_0xccd0('0x1a')]();});}};}function handleEntityNotFound(_0x3fdf49,_0xba71f2){return function(_0x328523){if(!_0x328523){_0x3fdf49[_0xccd0('0x2a')](0x194);}return _0x328523;};}function handleError(_0x584efd,_0x5c40b1){_0x5c40b1=_0x5c40b1||0x1f4;return function(_0x36cde0){logger[_0xccd0('0x2b')](_0x36cde0[_0xccd0('0x2c')]);if(_0x36cde0[_0xccd0('0x2d')]){delete _0x36cde0[_0xccd0('0x2d')];}_0x584efd['status'](_0x5c40b1)[_0xccd0('0x2e')](_0x36cde0);};}exports[_0xccd0('0x2f')]=function(_0x200b83,_0x171294){var _0xf2c2b9={},_0x56282c={},_0x2cfce5={'count':0x0,'rows':[]};var _0x4c2cf8=_[_0xccd0('0x30')](db['CannedAnswer']['rawAttributes'],function(_0x59df45){return{'name':_0x59df45[_0xccd0('0x31')],'type':_0x59df45[_0xccd0('0x32')][_0xccd0('0x33')]};});_0x56282c[_0xccd0('0x34')]=_[_0xccd0('0x30')](_0x4c2cf8,_0xccd0('0x2d'));_0x56282c[_0xccd0('0x35')]=_['keys'](_0x200b83[_0xccd0('0x35')]);_0x56282c['filters']=_[_0xccd0('0x36')](_0x56282c[_0xccd0('0x34')],_0x56282c[_0xccd0('0x35')]);_0xf2c2b9[_0xccd0('0x37')]=_['intersection'](_0x56282c[_0xccd0('0x34')],qs['fields'](_0x200b83[_0xccd0('0x35')][_0xccd0('0x38')]));_0xf2c2b9[_0xccd0('0x37')]=_0xf2c2b9['attributes'][_0xccd0('0x39')]?_0xf2c2b9[_0xccd0('0x37')]:_0x56282c[_0xccd0('0x34')];if(!_0x200b83[_0xccd0('0x35')]['hasOwnProperty'](_0xccd0('0x3a'))){_0xf2c2b9['limit']=qs['limit'](_0x200b83['query'][_0xccd0('0x1d')]);_0xf2c2b9['offset']=qs[_0xccd0('0x1f')](_0x200b83[_0xccd0('0x35')][_0xccd0('0x1f')]);}_0xf2c2b9[_0xccd0('0x3b')]=qs[_0xccd0('0x3c')](_0x200b83[_0xccd0('0x35')][_0xccd0('0x3c')]);_0xf2c2b9[_0xccd0('0x3d')]=qs[_0xccd0('0x3e')](_[_0xccd0('0x3f')](_0x200b83[_0xccd0('0x35')],_0x56282c[_0xccd0('0x3e')]),_0x4c2cf8);if(_0x200b83[_0xccd0('0x35')][_0xccd0('0x40')]){_0xf2c2b9[_0xccd0('0x3d')]=_[_0xccd0('0x41')](_0xf2c2b9[_0xccd0('0x3d')],{'$or':[{'key':{'$like':'%'+_0x200b83[_0xccd0('0x35')][_0xccd0('0x40')]+'%'}},{'value':{'$like':'%'+_0x200b83[_0xccd0('0x35')]['filter']+'%'}}]});}_0xf2c2b9=_[_0xccd0('0x41')]({},_0xf2c2b9,_0x200b83[_0xccd0('0x42')]);var _0x128cc0={'where':_0xf2c2b9[_0xccd0('0x3d')]};return db[_0xccd0('0x43')][_0xccd0('0x1e')](_0x128cc0)['then'](function(_0x50f0d2){_0x2cfce5[_0xccd0('0x1e')]=_0x50f0d2;if(_0x200b83[_0xccd0('0x35')][_0xccd0('0x44')]){_0xf2c2b9[_0xccd0('0x45')]=[{'all':!![]}];}return db['CannedAnswer'][_0xccd0('0x46')](_0xf2c2b9);})['then'](function(_0x4768df){_0x2cfce5[_0xccd0('0x47')]=_0x4768df;return _0x2cfce5;})[_0xccd0('0x25')](respondWithFilteredResult(_0x171294,_0xf2c2b9))[_0xccd0('0x48')](handleError(_0x171294,null));};exports['show']=function(_0x4dde38,_0x1dc91c){var _0x1f6387={'raw':!![],'where':{'id':_0x4dde38['params']['id']}},_0x2a035f={};_0x2a035f[_0xccd0('0x34')]=_[_0xccd0('0x49')](db['CannedAnswer'][_0xccd0('0x4a')]);_0x2a035f[_0xccd0('0x35')]=_['keys'](_0x4dde38[_0xccd0('0x35')]);_0x2a035f[_0xccd0('0x3e')]=_[_0xccd0('0x36')](_0x2a035f[_0xccd0('0x34')],_0x2a035f[_0xccd0('0x35')]);_0x1f6387[_0xccd0('0x37')]=_['intersection'](_0x2a035f[_0xccd0('0x34')],qs['fields'](_0x4dde38[_0xccd0('0x35')]['fields']));_0x1f6387[_0xccd0('0x37')]=_0x1f6387[_0xccd0('0x37')][_0xccd0('0x39')]?_0x1f6387[_0xccd0('0x37')]:_0x2a035f[_0xccd0('0x34')];if(_0x4dde38[_0xccd0('0x35')][_0xccd0('0x44')]){_0x1f6387['include']=[{'all':!![]}];}_0x1f6387=_[_0xccd0('0x41')]({},_0x1f6387,_0x4dde38['options']);return db[_0xccd0('0x43')][_0xccd0('0x4b')](_0x1f6387)[_0xccd0('0x25')](handleEntityNotFound(_0x1dc91c,null))[_0xccd0('0x25')](respondWithResult(_0x1dc91c,null))[_0xccd0('0x48')](handleError(_0x1dc91c,null));};exports[_0xccd0('0x24')]=function(_0x2369c2,_0xbdeb45){if(_0x2369c2[_0xccd0('0x4c')]['id']){delete _0x2369c2[_0xccd0('0x4c')]['id'];}return db[_0xccd0('0x43')][_0xccd0('0x4b')]({'where':{'id':_0x2369c2[_0xccd0('0x4d')]['id']}})['then'](handleEntityNotFound(_0xbdeb45,null))[_0xccd0('0x25')](saveUpdates(_0x2369c2[_0xccd0('0x4c')],null))[_0xccd0('0x25')](respondWithResult(_0xbdeb45,null))[_0xccd0('0x48')](handleError(_0xbdeb45,null));};exports[_0xccd0('0x26')]=function(_0x2fa3f8,_0x56de5f){return db['CannedAnswer']['find']({'where':{'id':_0x2fa3f8[_0xccd0('0x4d')]['id']}})[_0xccd0('0x25')](handleEntityNotFound(_0x56de5f,null))[_0xccd0('0x25')](removeEntity(_0x56de5f,null))['catch'](handleError(_0x56de5f,null));};exports[_0xccd0('0x4e')]=function(_0x193b21,_0x2ffaf){var _0x23e644={'key':_0x193b21['body'][_0xccd0('0x33')]};if(_0x193b21[_0xccd0('0x4c')]['MailAccountId']){_0x23e644[_0xccd0('0x4f')]=_0x193b21[_0xccd0('0x4c')][_0xccd0('0x4f')];}else if(_0x193b21[_0xccd0('0x4c')][_0xccd0('0x50')]){_0x23e644[_0xccd0('0x50')]=_0x193b21['body'][_0xccd0('0x50')];}else if(_0x193b21[_0xccd0('0x4c')][_0xccd0('0x51')]){_0x23e644['OpenchannelAccountId']=_0x193b21[_0xccd0('0x4c')][_0xccd0('0x51')];}else if(_0x193b21['body'][_0xccd0('0x52')]){_0x23e644['ChatWebsiteId']=_0x193b21[_0xccd0('0x4c')]['ChatWebsiteId'];}return db[_0xccd0('0x43')][_0xccd0('0x4b')]({'where':_0x23e644})['then'](function(_0x2b0ebf){if(_0x2b0ebf){throw new db[(_0xccd0('0x53'))][(_0xccd0('0x54'))]('The\x20inserted\x20key\x20already\x20exists.');}return db[_0xccd0('0x43')][_0xccd0('0x4e')](_0x193b21[_0xccd0('0x4c')]);})[_0xccd0('0x25')](function(_0x43eb1c){var _0x495d8d=_0x193b21['user'][_0xccd0('0x27')]({'plain':!![]});if(!_0x495d8d)throw new Error(_0xccd0('0x55'));if(_0x495d8d[_0xccd0('0x56')]===_0xccd0('0x57')){var _0x998d26=_0x43eb1c[_0xccd0('0x27')]({'plain':!![]});return db[_0xccd0('0x58')]['find']({'where':{'name':'CannedAnswers','userProfileId':_0x495d8d[_0xccd0('0x59')]},'raw':!![]})[_0xccd0('0x25')](function(_0x42f0b7){if(_0x42f0b7&&_0x42f0b7['autoAssociation']===0x0){return db['UserProfileResource'][_0xccd0('0x4e')]({'name':_0x998d26[_0xccd0('0x2d')],'resourceId':_0x998d26['id'],'type':_0x42f0b7[_0xccd0('0x2d')],'sectionId':_0x42f0b7['id']},{})[_0xccd0('0x25')](function(){return _0x43eb1c;});}else{return _0x43eb1c;}})['catch'](function(_0x5405fc){logger[_0xccd0('0x2b')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5405fc);throw _0x5405fc;});}return _0x43eb1c;})[_0xccd0('0x25')](respondWithResult(_0x2ffaf,0xc9))[_0xccd0('0x48')](handleError(_0x2ffaf,null));};
\ No newline at end of file
+var _0xafa3=['request-promise','bluebird','mustache','sox','to-csv','ejs','lodash','squel','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','set','Content-Range','apply','save','update','then','destroy','get','stack','name','index','map','fieldName','key','keys','filters','query','intersection','model','attributes','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','CannedAnswer','include','findAll','rows','catch','show','rawAttributes','fields','includeAll','options','find','body','params','create','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','Sequelize','ValidationError','The\x20inserted\x20key\x20already\x20exists.','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','error','eml-format','rimraf','zip-dir','fast-json-patch'];(function(_0x9c2427,_0x17c865){var _0x51984f=function(_0x177af6){while(--_0x177af6){_0x9c2427['push'](_0x9c2427['shift']());}};_0x51984f(++_0x17c865);}(_0xafa3,0x104));var _0x3afa=function(_0x3546a5,_0xddb437){_0x3546a5=_0x3546a5-0x0;var _0x13d218=_0xafa3[_0x3546a5];return _0x13d218;};'use strict';var emlformat=require(_0x3afa('0x0'));var rimraf=require(_0x3afa('0x1'));var zipdir=require(_0x3afa('0x2'));var jsonpatch=require(_0x3afa('0x3'));var rp=require(_0x3afa('0x4'));var moment=require('moment');var BPromise=require(_0x3afa('0x5'));var Mustache=require(_0x3afa('0x6'));var util=require('util');var path=require('path');var sox=require(_0x3afa('0x7'));var csv=require(_0x3afa('0x8'));var ejs=require(_0x3afa('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x3afa('0xa'));var squel=require(_0x3afa('0xb'));var crypto=require('crypto');var jsforce=require(_0x3afa('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x3afa('0xd'));var Papa=require(_0x3afa('0xe'));var Redis=require('ioredis');var authService=require(_0x3afa('0xf'));var qs=require(_0x3afa('0x10'));var as=require(_0x3afa('0x11'));var hardwareService=require(_0x3afa('0x12'));var logger=require(_0x3afa('0x13'))(_0x3afa('0x14'));var utils=require(_0x3afa('0x15'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x3afa('0x16'))['db'];function respondWithStatusCode(_0xeaf9c3,_0x24e26e){_0x24e26e=_0x24e26e||0xcc;return function(_0x15d554){if(_0x15d554){return _0xeaf9c3[_0x3afa('0x17')](_0x24e26e);}return _0xeaf9c3[_0x3afa('0x18')](_0x24e26e)[_0x3afa('0x19')]();};}function respondWithResult(_0x4c93a5,_0x48d766){_0x48d766=_0x48d766||0xc8;return function(_0x58436b){if(_0x58436b){return _0x4c93a5['status'](_0x48d766)[_0x3afa('0x1a')](_0x58436b);}};}function respondWithFilteredResult(_0x595ff1,_0x4bcf00){return function(_0x3d3f43){if(_0x3d3f43){var _0x28736e=typeof _0x4bcf00[_0x3afa('0x1b')]===_0x3afa('0x1c')&&typeof _0x4bcf00['limit']==='undefined';var _0x5c4849=_0x3d3f43[_0x3afa('0x1d')];var _0x42762d=_0x28736e?0x0:_0x4bcf00[_0x3afa('0x1b')];var _0x416058=_0x28736e?_0x3d3f43[_0x3afa('0x1d')]:_0x4bcf00[_0x3afa('0x1b')]+_0x4bcf00['limit'];var _0x54859c;if(_0x416058>=_0x5c4849){_0x416058=_0x5c4849;_0x54859c=0xc8;}else{_0x54859c=0xce;}_0x595ff1[_0x3afa('0x18')](_0x54859c);return _0x595ff1[_0x3afa('0x1e')](_0x3afa('0x1f'),_0x42762d+'-'+_0x416058+'/'+_0x5c4849)[_0x3afa('0x1a')](_0x3d3f43);}return null;};}function patchUpdates(_0x5774ca){return function(_0x305c29){try{jsonpatch[_0x3afa('0x20')](_0x305c29,_0x5774ca,!![]);}catch(_0x521913){return BPromise['reject'](_0x521913);}return _0x305c29[_0x3afa('0x21')]();};}function saveUpdates(_0x4b162a,_0x38c246){return function(_0x479ee4){if(_0x479ee4){return _0x479ee4[_0x3afa('0x22')](_0x4b162a)[_0x3afa('0x23')](function(_0x4c821d){return _0x4c821d;});}return null;};}function removeEntity(_0x2fcba1,_0x565a28){return function(_0x5e00d5){if(_0x5e00d5){return _0x5e00d5[_0x3afa('0x24')]()[_0x3afa('0x23')](function(){var _0x522fc8=_0x5e00d5[_0x3afa('0x25')]({'plain':!![]});var _0x3347a2='CannedAnswers';return db['UserProfileResource'][_0x3afa('0x24')]({'where':{'type':_0x3347a2,'resourceId':_0x522fc8['id']}})['then'](function(){return _0x5e00d5;});})[_0x3afa('0x23')](function(){_0x2fcba1[_0x3afa('0x18')](0xcc)[_0x3afa('0x19')]();});}};}function handleEntityNotFound(_0x48bdae,_0x11dc26){return function(_0x1b8b70){if(!_0x1b8b70){_0x48bdae[_0x3afa('0x17')](0x194);}return _0x1b8b70;};}function handleError(_0xecc5d8,_0x429341){_0x429341=_0x429341||0x1f4;return function(_0x521813){logger['error'](_0x521813[_0x3afa('0x26')]);if(_0x521813['name']){delete _0x521813[_0x3afa('0x27')];}_0xecc5d8['status'](_0x429341)['send'](_0x521813);};}exports[_0x3afa('0x28')]=function(_0x311120,_0x2563e4){var _0x4a5002={},_0x23cdb5={},_0x356011={'count':0x0,'rows':[]};var _0x6771e3=_[_0x3afa('0x29')](db['CannedAnswer']['rawAttributes'],function(_0x12ce13){return{'name':_0x12ce13[_0x3afa('0x2a')],'type':_0x12ce13['type'][_0x3afa('0x2b')]};});_0x23cdb5['model']=_[_0x3afa('0x29')](_0x6771e3,_0x3afa('0x27'));_0x23cdb5['query']=_[_0x3afa('0x2c')](_0x311120['query']);_0x23cdb5[_0x3afa('0x2d')]=_['intersection'](_0x23cdb5['model'],_0x23cdb5[_0x3afa('0x2e')]);_0x4a5002['attributes']=_[_0x3afa('0x2f')](_0x23cdb5[_0x3afa('0x30')],qs['fields'](_0x311120[_0x3afa('0x2e')]['fields']));_0x4a5002['attributes']=_0x4a5002[_0x3afa('0x31')][_0x3afa('0x32')]?_0x4a5002[_0x3afa('0x31')]:_0x23cdb5[_0x3afa('0x30')];if(!_0x311120[_0x3afa('0x2e')][_0x3afa('0x33')](_0x3afa('0x34'))){_0x4a5002[_0x3afa('0x35')]=qs[_0x3afa('0x35')](_0x311120[_0x3afa('0x2e')][_0x3afa('0x35')]);_0x4a5002[_0x3afa('0x1b')]=qs[_0x3afa('0x1b')](_0x311120['query']['offset']);}_0x4a5002[_0x3afa('0x36')]=qs[_0x3afa('0x37')](_0x311120['query'][_0x3afa('0x37')]);_0x4a5002[_0x3afa('0x38')]=qs[_0x3afa('0x2d')](_[_0x3afa('0x39')](_0x311120['query'],_0x23cdb5['filters']),_0x6771e3);if(_0x311120[_0x3afa('0x2e')][_0x3afa('0x3a')]){_0x4a5002[_0x3afa('0x38')]=_['merge'](_0x4a5002['where'],{'$or':[{'key':{'$like':'%'+_0x311120[_0x3afa('0x2e')]['filter']+'%'}},{'value':{'$like':'%'+_0x311120[_0x3afa('0x2e')][_0x3afa('0x3a')]+'%'}}]});}_0x4a5002=_[_0x3afa('0x3b')]({},_0x4a5002,_0x311120['options']);var _0x2b60dc={'where':_0x4a5002[_0x3afa('0x38')]};return db[_0x3afa('0x3c')][_0x3afa('0x1d')](_0x2b60dc)[_0x3afa('0x23')](function(_0x768921){_0x356011[_0x3afa('0x1d')]=_0x768921;if(_0x311120[_0x3afa('0x2e')]['includeAll']){_0x4a5002[_0x3afa('0x3d')]=[{'all':!![]}];}return db['CannedAnswer'][_0x3afa('0x3e')](_0x4a5002);})['then'](function(_0xe7e05e){_0x356011[_0x3afa('0x3f')]=_0xe7e05e;return _0x356011;})[_0x3afa('0x23')](respondWithFilteredResult(_0x2563e4,_0x4a5002))[_0x3afa('0x40')](handleError(_0x2563e4,null));};exports[_0x3afa('0x41')]=function(_0x58b8b7,_0x31d483){var _0x3fa194={'raw':!![],'where':{'id':_0x58b8b7['params']['id']}},_0x211630={};_0x211630[_0x3afa('0x30')]=_['keys'](db[_0x3afa('0x3c')][_0x3afa('0x42')]);_0x211630['query']=_['keys'](_0x58b8b7[_0x3afa('0x2e')]);_0x211630[_0x3afa('0x2d')]=_[_0x3afa('0x2f')](_0x211630[_0x3afa('0x30')],_0x211630[_0x3afa('0x2e')]);_0x3fa194[_0x3afa('0x31')]=_['intersection'](_0x211630[_0x3afa('0x30')],qs[_0x3afa('0x43')](_0x58b8b7['query'][_0x3afa('0x43')]));_0x3fa194[_0x3afa('0x31')]=_0x3fa194[_0x3afa('0x31')][_0x3afa('0x32')]?_0x3fa194[_0x3afa('0x31')]:_0x211630[_0x3afa('0x30')];if(_0x58b8b7[_0x3afa('0x2e')][_0x3afa('0x44')]){_0x3fa194[_0x3afa('0x3d')]=[{'all':!![]}];}_0x3fa194=_['merge']({},_0x3fa194,_0x58b8b7[_0x3afa('0x45')]);return db[_0x3afa('0x3c')][_0x3afa('0x46')](_0x3fa194)[_0x3afa('0x23')](handleEntityNotFound(_0x31d483,null))[_0x3afa('0x23')](respondWithResult(_0x31d483,null))[_0x3afa('0x40')](handleError(_0x31d483,null));};exports[_0x3afa('0x22')]=function(_0x4516b0,_0x3f6430){if(_0x4516b0['body']['id']){delete _0x4516b0[_0x3afa('0x47')]['id'];}return db[_0x3afa('0x3c')][_0x3afa('0x46')]({'where':{'id':_0x4516b0[_0x3afa('0x48')]['id']}})['then'](handleEntityNotFound(_0x3f6430,null))[_0x3afa('0x23')](saveUpdates(_0x4516b0[_0x3afa('0x47')],null))[_0x3afa('0x23')](respondWithResult(_0x3f6430,null))[_0x3afa('0x40')](handleError(_0x3f6430,null));};exports[_0x3afa('0x24')]=function(_0x4f7eb5,_0x265b4b){return db[_0x3afa('0x3c')][_0x3afa('0x46')]({'where':{'id':_0x4f7eb5['params']['id']}})[_0x3afa('0x23')](handleEntityNotFound(_0x265b4b,null))[_0x3afa('0x23')](removeEntity(_0x265b4b,null))[_0x3afa('0x40')](handleError(_0x265b4b,null));};exports[_0x3afa('0x49')]=function(_0x3ba261,_0x145f33){var _0x1f27cb={'key':_0x3ba261[_0x3afa('0x47')]['key']};if(_0x3ba261[_0x3afa('0x47')]['MailAccountId']){_0x1f27cb[_0x3afa('0x4a')]=_0x3ba261[_0x3afa('0x47')][_0x3afa('0x4a')];}else if(_0x3ba261[_0x3afa('0x47')]['SmsAccountId']){_0x1f27cb[_0x3afa('0x4b')]=_0x3ba261['body']['SmsAccountId'];}else if(_0x3ba261[_0x3afa('0x47')][_0x3afa('0x4c')]){_0x1f27cb[_0x3afa('0x4c')]=_0x3ba261[_0x3afa('0x47')][_0x3afa('0x4c')];}else if(_0x3ba261[_0x3afa('0x47')]['ChatWebsiteId']){_0x1f27cb[_0x3afa('0x4d')]=_0x3ba261[_0x3afa('0x47')][_0x3afa('0x4d')];}return db[_0x3afa('0x3c')][_0x3afa('0x46')]({'where':_0x1f27cb})[_0x3afa('0x23')](function(_0x91b585){if(_0x91b585){throw new db[(_0x3afa('0x4e'))][(_0x3afa('0x4f'))](_0x3afa('0x50'));}return db[_0x3afa('0x3c')][_0x3afa('0x49')](_0x3ba261['body']);})[_0x3afa('0x23')](function(_0x52e300){var _0x473231=_0x3ba261[_0x3afa('0x51')][_0x3afa('0x25')]({'plain':!![]});if(!_0x473231)throw new Error(_0x3afa('0x52'));if(_0x473231[_0x3afa('0x53')]==='user'){var _0x160db9=_0x52e300[_0x3afa('0x25')]({'plain':!![]});return db[_0x3afa('0x54')][_0x3afa('0x46')]({'where':{'name':'CannedAnswers','userProfileId':_0x473231[_0x3afa('0x55')]},'raw':!![]})['then'](function(_0x5668be){if(_0x5668be&&_0x5668be[_0x3afa('0x56')]===0x0){return db['UserProfileResource'][_0x3afa('0x49')]({'name':_0x160db9[_0x3afa('0x27')],'resourceId':_0x160db9['id'],'type':_0x5668be[_0x3afa('0x27')],'sectionId':_0x5668be['id']},{})[_0x3afa('0x23')](function(){return _0x52e300;});}else{return _0x52e300;}})['catch'](function(_0x39f974){logger[_0x3afa('0x57')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x39f974);throw _0x39f974;});}return _0x52e300;})[_0x3afa('0x23')](respondWithResult(_0x145f33,0xc9))[_0x3afa('0x40')](handleError(_0x145f33,null));};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.model.js b/server/api/cannedAnswer/cannedAnswer.model.js
index c970a1f..3c2a541 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 _0x5423=['util','api','moment','request-promise','path','rimraf','../../config/environment','exports','define','CannedAnswer','utf8mb4_unicode_ci','lodash'];(function(_0x4f24d6,_0x3573bb){var _0x9a09a1=function(_0x3b48ff){while(--_0x3b48ff){_0x4f24d6['push'](_0x4f24d6['shift']());}};_0x9a09a1(++_0x3573bb);}(_0x5423,0xe3));var _0x3542=function(_0x4b7917,_0x55d679){_0x4b7917=_0x4b7917-0x0;var _0x28fc5b=_0x5423[_0x4b7917];return _0x28fc5b;};'use strict';var _=require(_0x3542('0x0'));var util=require(_0x3542('0x1'));var logger=require('../../config/logger')(_0x3542('0x2'));var moment=require(_0x3542('0x3'));var BPromise=require('bluebird');var rp=require(_0x3542('0x4'));var fs=require('fs');var path=require(_0x3542('0x5'));var rimraf=require(_0x3542('0x6'));var config=require(_0x3542('0x7'));var attributes=require('./cannedAnswer.attributes');module[_0x3542('0x8')]=function(_0x2d2ae9,_0x15ee3b){return _0x2d2ae9[_0x3542('0x9')](_0x3542('0xa'),attributes,{'tableName':'tools_canned_answers','paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x3542('0xb')});};
\ No newline at end of file
+var _0x7006=['request-promise','rimraf','../../config/environment','exports','define','tools_canned_answers','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x519a6f,_0x52cb04){var _0x221793=function(_0x2da616){while(--_0x2da616){_0x519a6f['push'](_0x519a6f['shift']());}};_0x221793(++_0x52cb04);}(_0x7006,0xe8));var _0x6700=function(_0x8af54b,_0x280be5){_0x8af54b=_0x8af54b-0x0;var _0x27d8f0=_0x7006[_0x8af54b];return _0x27d8f0;};'use strict';var _=require(_0x6700('0x0'));var util=require(_0x6700('0x1'));var logger=require(_0x6700('0x2'))(_0x6700('0x3'));var moment=require(_0x6700('0x4'));var BPromise=require(_0x6700('0x5'));var rp=require(_0x6700('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x6700('0x7'));var config=require(_0x6700('0x8'));var attributes=require('./cannedAnswer.attributes');module[_0x6700('0x9')]=function(_0x1032f8,_0xead547){return _0x1032f8[_0x6700('0xa')]('CannedAnswer',attributes,{'tableName':_0x6700('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x6700('0xc'),'collate':_0x6700('0xd')});};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.rpc.js b/server/api/cannedAnswer/cannedAnswer.rpc.js
index 09185f1..0f91831 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(_0x55a1c6,_0xd4e324){var _0x569af0=function(_0x260fa8){while(--_0x260fa8){_0x55a1c6['push'](_0x55a1c6['shift']());}};_0x569af0(++_0xd4e324);}(_0xa9e0,0x123));var _0x0a9e=function(_0x9aada2,_0xd2d349){_0x9aada2=_0x9aada2-0x0;var _0x196dff=_0xa9e0[_0x9aada2];return _0x196dff;};'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(_0x219dcb,_0x8bedd7){var _0x30d940=function(_0x1bf745){while(--_0x1bf745){_0x219dcb['push'](_0x219dcb['shift']());}};_0x30d940(++_0x8bedd7);}(_0xa9e0,0x123));var _0x0a9e=function(_0x47b58b,_0x41a189){_0x47b58b=_0x47b58b-0x0;var _0x46bebe=_0xa9e0[_0x47b58b];return _0x46bebe;};'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 fc8eb78..4c027f8 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 _0xff84=['util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cannedAnswer.controller','get','/:id','isAuthenticated','show','post','put','update','delete','multer'];(function(_0x36ee63,_0x54f46d){var _0x27e9bc=function(_0x5bf89b){while(--_0x5bf89b){_0x36ee63['push'](_0x36ee63['shift']());}};_0x27e9bc(++_0x54f46d);}(_0xff84,0x167));var _0x4ff8=function(_0x2be8c2,_0x14a4b5){_0x2be8c2=_0x2be8c2-0x0;var _0x97f531=_0xff84[_0x2be8c2];return _0x97f531;};'use strict';var multer=require(_0x4ff8('0x0'));var util=require(_0x4ff8('0x1'));var path=require(_0x4ff8('0x2'));var timeout=require('connect-timeout');var express=require(_0x4ff8('0x3'));var router=express[_0x4ff8('0x4')]();var fs_extra=require(_0x4ff8('0x5'));var auth=require(_0x4ff8('0x6'));var interaction=require(_0x4ff8('0x7'));var config=require(_0x4ff8('0x8'));var controller=require(_0x4ff8('0x9'));router[_0x4ff8('0xa')]('/',auth['isAuthenticated'](),controller['index']);router[_0x4ff8('0xa')](_0x4ff8('0xb'),auth[_0x4ff8('0xc')](),controller[_0x4ff8('0xd')]);router[_0x4ff8('0xe')]('/',auth[_0x4ff8('0xc')](),controller['create']);router[_0x4ff8('0xf')](_0x4ff8('0xb'),auth['isAuthenticated'](),controller[_0x4ff8('0x10')]);router[_0x4ff8('0x11')](_0x4ff8('0xb'),auth[_0x4ff8('0xc')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x4d80=['post','create','put','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get'];(function(_0x3c2a69,_0x4c8b41){var _0x596bc8=function(_0x1b4b7c){while(--_0x1b4b7c){_0x3c2a69['push'](_0x3c2a69['shift']());}};_0x596bc8(++_0x4c8b41);}(_0x4d80,0x171));var _0x04d8=function(_0x53ccf2,_0x13cb67){_0x53ccf2=_0x53ccf2-0x0;var _0x5a2964=_0x4d80[_0x53ccf2];return _0x5a2964;};'use strict';var multer=require(_0x04d8('0x0'));var util=require(_0x04d8('0x1'));var path=require(_0x04d8('0x2'));var timeout=require(_0x04d8('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x04d8('0x4'));var auth=require(_0x04d8('0x5'));var interaction=require(_0x04d8('0x6'));var config=require(_0x04d8('0x7'));var controller=require('./cannedAnswer.controller');router['get']('/',auth[_0x04d8('0x8')](),controller[_0x04d8('0x9')]);router[_0x04d8('0xa')]('/:id',auth[_0x04d8('0x8')](),controller['show']);router[_0x04d8('0xb')]('/',auth[_0x04d8('0x8')](),controller[_0x04d8('0xc')]);router[_0x04d8('0xd')](_0x04d8('0xe'),auth[_0x04d8('0x8')](),controller[_0x04d8('0xf')]);router[_0x04d8('0x10')](_0x04d8('0xe'),auth[_0x04d8('0x8')](),controller[_0x04d8('0x11')]);module[_0x04d8('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/cdr/cdr.attributes.js b/server/api/cdr/cdr.attributes.js
index 6ae4c05..7df9f4c 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 _0x6475=['STRING','INTEGER','sequelize','exports','DATE'];(function(_0x38037d,_0x414e99){var _0xc69f8=function(_0x50d820){while(--_0x50d820){_0x38037d['push'](_0x38037d['shift']());}};_0xc69f8(++_0x414e99);}(_0x6475,0x133));var _0x5647=function(_0x27e811,_0x1fad22){_0x27e811=_0x27e811-0x0;var _0x1bfe61=_0x6475[_0x27e811];return _0x1bfe61;};'use strict';var Sequelize=require(_0x5647('0x0'));module[_0x5647('0x1')]={'calldate':{'type':Sequelize[_0x5647('0x2')],'allowNull':![],'defaultValue':'1970-01-01\x2000:00:01'},'clid':{'type':Sequelize[_0x5647('0x3')]},'src':{'type':Sequelize[_0x5647('0x3')]},'dst':{'type':Sequelize[_0x5647('0x3')]},'dcontext':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0x5647('0x3')]},'dstchannel':{'type':Sequelize[_0x5647('0x3')]},'lastapp':{'type':Sequelize[_0x5647('0x3')]},'lastdata':{'type':Sequelize['STRING']},'duration':{'type':Sequelize[_0x5647('0x4')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize[_0x5647('0x4')],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize['STRING']},'amaflags':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize['STRING']},'userfield':{'type':Sequelize[_0x5647('0x3')]},'uniqueid':{'type':Sequelize[_0x5647('0x3')]},'linkedid':{'type':Sequelize[_0x5647('0x3')]},'sequence':{'type':Sequelize['STRING']},'peeraccount':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x5647('0x3')]},'tag':{'type':Sequelize[_0x5647('0x3')]}};
\ No newline at end of file
+var _0x0b25=['exports','DATE','1970-01-01\x2000:00:01','STRING','INTEGER','sequelize'];(function(_0xaa1b3e,_0x47d976){var _0x454d7d=function(_0x575b32){while(--_0x575b32){_0xaa1b3e['push'](_0xaa1b3e['shift']());}};_0x454d7d(++_0x47d976);}(_0x0b25,0x155));var _0x50b2=function(_0x3a04ab,_0x31b9fd){_0x3a04ab=_0x3a04ab-0x0;var _0x4bff6d=_0x0b25[_0x3a04ab];return _0x4bff6d;};'use strict';var Sequelize=require(_0x50b2('0x0'));module[_0x50b2('0x1')]={'calldate':{'type':Sequelize[_0x50b2('0x2')],'allowNull':![],'defaultValue':_0x50b2('0x3')},'clid':{'type':Sequelize[_0x50b2('0x4')]},'src':{'type':Sequelize[_0x50b2('0x4')]},'dst':{'type':Sequelize[_0x50b2('0x4')]},'dcontext':{'type':Sequelize['STRING']},'channel':{'type':Sequelize['STRING']},'dstchannel':{'type':Sequelize[_0x50b2('0x4')]},'lastapp':{'type':Sequelize['STRING']},'lastdata':{'type':Sequelize[_0x50b2('0x4')]},'duration':{'type':Sequelize[_0x50b2('0x5')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize[_0x50b2('0x5')],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize[_0x50b2('0x4')]},'amaflags':{'type':Sequelize[_0x50b2('0x5')],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize['STRING']},'userfield':{'type':Sequelize[_0x50b2('0x4')]},'uniqueid':{'type':Sequelize[_0x50b2('0x4')]},'linkedid':{'type':Sequelize[_0x50b2('0x4')]},'sequence':{'type':Sequelize[_0x50b2('0x4')]},'peeraccount':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x50b2('0x4')]},'tag':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.controller.js b/server/api/cdr/cdr.controller.js
index 4985908..6041938 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 _0xcb81=['save','then','destroy','error','stack','name','send','index','Cdr','rawAttributes','type','key','model','map','keys','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','find','create','body','update','params','describe','eml-format','rimraf','fast-json-patch','mustache','util','path','sox','to-csv','fs-extra','lodash','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','undefined','limit','count','offset','set','Content-Range','apply','reject'];(function(_0x4b6622,_0x141e17){var _0x357399=function(_0xf43376){while(--_0xf43376){_0x4b6622['push'](_0x4b6622['shift']());}};_0x357399(++_0x141e17);}(_0xcb81,0x154));var _0x1cb8=function(_0x4c2dfc,_0x4814c0){_0x4c2dfc=_0x4c2dfc-0x0;var _0xfd728d=_0xcb81[_0x4c2dfc];return _0xfd728d;};'use strict';var emlformat=require(_0x1cb8('0x0'));var rimraf=require(_0x1cb8('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x1cb8('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x1cb8('0x3'));var util=require(_0x1cb8('0x4'));var path=require(_0x1cb8('0x5'));var sox=require(_0x1cb8('0x6'));var csv=require(_0x1cb8('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x1cb8('0x8'));var _=require(_0x1cb8('0x9'));var squel=require('squel');var crypto=require(_0x1cb8('0xa'));var jsforce=require(_0x1cb8('0xb'));var deskjs=require(_0x1cb8('0xc'));var toCsv=require('to-csv');var querystring=require(_0x1cb8('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x1cb8('0xe'));var qs=require(_0x1cb8('0xf'));var as=require(_0x1cb8('0x10'));var hardwareService=require(_0x1cb8('0x11'));var logger=require(_0x1cb8('0x12'))(_0x1cb8('0x13'));var utils=require(_0x1cb8('0x14'));var config=require(_0x1cb8('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x1cb8('0x16'))['db'];function respondWithStatusCode(_0x1ffe94,_0x1938ee){_0x1938ee=_0x1938ee||0xcc;return function(_0x299eea){if(_0x299eea){return _0x1ffe94[_0x1cb8('0x17')](_0x1938ee);}return _0x1ffe94['status'](_0x1938ee)[_0x1cb8('0x18')]();};}function respondWithResult(_0x2c600,_0xcb6ad1){_0xcb6ad1=_0xcb6ad1||0xc8;return function(_0x14d84d){if(_0x14d84d){return _0x2c600[_0x1cb8('0x19')](_0xcb6ad1)[_0x1cb8('0x1a')](_0x14d84d);}};}function respondWithFilteredResult(_0x339ad0,_0x243930){return function(_0x5af4a3){if(_0x5af4a3){var _0x17a95d=typeof _0x243930['offset']===_0x1cb8('0x1b')&&typeof _0x243930[_0x1cb8('0x1c')]===_0x1cb8('0x1b');var _0x46abd0=_0x5af4a3[_0x1cb8('0x1d')];var _0x308088=_0x17a95d?0x0:_0x243930[_0x1cb8('0x1e')];var _0x9f0adb=_0x17a95d?_0x5af4a3[_0x1cb8('0x1d')]:_0x243930[_0x1cb8('0x1e')]+_0x243930[_0x1cb8('0x1c')];var _0x3cda27;if(_0x9f0adb>=_0x46abd0){_0x9f0adb=_0x46abd0;_0x3cda27=0xc8;}else{_0x3cda27=0xce;}_0x339ad0['status'](_0x3cda27);return _0x339ad0[_0x1cb8('0x1f')](_0x1cb8('0x20'),_0x308088+'-'+_0x9f0adb+'/'+_0x46abd0)[_0x1cb8('0x1a')](_0x5af4a3);}return null;};}function patchUpdates(_0x3d1682){return function(_0x4abf3a){try{jsonpatch[_0x1cb8('0x21')](_0x4abf3a,_0x3d1682,!![]);}catch(_0x4f9220){return BPromise[_0x1cb8('0x22')](_0x4f9220);}return _0x4abf3a[_0x1cb8('0x23')]();};}function saveUpdates(_0x40b914,_0x38ff3a){return function(_0x559916){if(_0x559916){return _0x559916['update'](_0x40b914)[_0x1cb8('0x24')](function(_0x4040be){return _0x4040be;});}return null;};}function removeEntity(_0x22dafe,_0x44a00d){return function(_0x2473b8){if(_0x2473b8){return _0x2473b8[_0x1cb8('0x25')]()[_0x1cb8('0x24')](function(){_0x22dafe['status'](0xcc)[_0x1cb8('0x18')]();});}};}function handleEntityNotFound(_0x4554d5,_0x35c890){return function(_0xeeb21d){if(!_0xeeb21d){_0x4554d5[_0x1cb8('0x17')](0x194);}return _0xeeb21d;};}function handleError(_0x41ab56,_0x4ca3be){_0x4ca3be=_0x4ca3be||0x1f4;return function(_0x1ec995){logger[_0x1cb8('0x26')](_0x1ec995[_0x1cb8('0x27')]);if(_0x1ec995[_0x1cb8('0x28')]){delete _0x1ec995[_0x1cb8('0x28')];}_0x41ab56['status'](_0x4ca3be)[_0x1cb8('0x29')](_0x1ec995);};}exports[_0x1cb8('0x2a')]=function(_0x3a8b53,_0x21c17a){var _0x4fda96={},_0x2a79e0={},_0x2ba8c8={'count':0x0,'rows':[]};var _0x3a6a67=_['map'](db[_0x1cb8('0x2b')][_0x1cb8('0x2c')],function(_0x17abe1){return{'name':_0x17abe1['fieldName'],'type':_0x17abe1[_0x1cb8('0x2d')][_0x1cb8('0x2e')]};});_0x2a79e0[_0x1cb8('0x2f')]=_[_0x1cb8('0x30')](_0x3a6a67,_0x1cb8('0x28'));_0x2a79e0['query']=_[_0x1cb8('0x31')](_0x3a8b53[_0x1cb8('0x32')]);_0x2a79e0[_0x1cb8('0x33')]=_[_0x1cb8('0x34')](_0x2a79e0[_0x1cb8('0x2f')],_0x2a79e0[_0x1cb8('0x32')]);_0x4fda96[_0x1cb8('0x35')]=_[_0x1cb8('0x34')](_0x2a79e0[_0x1cb8('0x2f')],qs['fields'](_0x3a8b53['query'][_0x1cb8('0x36')]));_0x4fda96[_0x1cb8('0x35')]=_0x4fda96[_0x1cb8('0x35')]['length']?_0x4fda96['attributes']:_0x2a79e0[_0x1cb8('0x2f')];if(!_0x3a8b53[_0x1cb8('0x32')][_0x1cb8('0x37')](_0x1cb8('0x38'))){_0x4fda96[_0x1cb8('0x1c')]=qs[_0x1cb8('0x1c')](_0x3a8b53[_0x1cb8('0x32')][_0x1cb8('0x1c')]);_0x4fda96['offset']=qs[_0x1cb8('0x1e')](_0x3a8b53[_0x1cb8('0x32')][_0x1cb8('0x1e')]);}_0x4fda96[_0x1cb8('0x39')]=qs[_0x1cb8('0x3a')](_0x3a8b53[_0x1cb8('0x32')][_0x1cb8('0x3a')]);_0x4fda96[_0x1cb8('0x3b')]=qs[_0x1cb8('0x33')](_['pick'](_0x3a8b53[_0x1cb8('0x32')],_0x2a79e0[_0x1cb8('0x33')]),_0x3a6a67);if(_0x3a8b53['query'][_0x1cb8('0x3c')]){_0x4fda96[_0x1cb8('0x3b')]=_[_0x1cb8('0x3d')](_0x4fda96[_0x1cb8('0x3b')],{'$or':_[_0x1cb8('0x30')](_0x3a6a67,function(_0x5dc4c0){if(_0x5dc4c0[_0x1cb8('0x2d')]!==_0x1cb8('0x3e')){var _0x2989c6={};_0x2989c6[_0x5dc4c0['name']]={'$like':'%'+_0x3a8b53['query']['filter']+'%'};return _0x2989c6;}})});}_0x4fda96=_[_0x1cb8('0x3d')]({},_0x4fda96,_0x3a8b53[_0x1cb8('0x3f')]);var _0x328f7e={'where':_0x4fda96[_0x1cb8('0x3b')]};return db['Cdr']['count'](_0x328f7e)[_0x1cb8('0x24')](function(_0x25f0a3){_0x2ba8c8[_0x1cb8('0x1d')]=_0x25f0a3;if(_0x3a8b53[_0x1cb8('0x32')][_0x1cb8('0x40')]){_0x4fda96[_0x1cb8('0x41')]=[{'all':!![]}];}return db[_0x1cb8('0x2b')][_0x1cb8('0x42')](_0x4fda96);})['then'](function(_0x2044d1){_0x2ba8c8[_0x1cb8('0x43')]=_0x2044d1;return _0x2ba8c8;})[_0x1cb8('0x24')](respondWithFilteredResult(_0x21c17a,_0x4fda96))[_0x1cb8('0x44')](handleError(_0x21c17a,null));};exports['show']=function(_0x156298,_0x47c18a){var _0x2060a6={'raw':!![],'where':{'id':_0x156298['params']['id']}},_0x37230e={};_0x37230e[_0x1cb8('0x2f')]=_[_0x1cb8('0x31')](db[_0x1cb8('0x2b')]['rawAttributes']);_0x37230e['query']=_[_0x1cb8('0x31')](_0x156298['query']);_0x37230e[_0x1cb8('0x33')]=_[_0x1cb8('0x34')](_0x37230e[_0x1cb8('0x2f')],_0x37230e[_0x1cb8('0x32')]);_0x2060a6[_0x1cb8('0x35')]=_[_0x1cb8('0x34')](_0x37230e[_0x1cb8('0x2f')],qs['fields'](_0x156298[_0x1cb8('0x32')][_0x1cb8('0x36')]));_0x2060a6[_0x1cb8('0x35')]=_0x2060a6[_0x1cb8('0x35')]['length']?_0x2060a6[_0x1cb8('0x35')]:_0x37230e[_0x1cb8('0x2f')];if(_0x156298[_0x1cb8('0x32')][_0x1cb8('0x40')]){_0x2060a6[_0x1cb8('0x41')]=[{'all':!![]}];}_0x2060a6=_['merge']({},_0x2060a6,_0x156298[_0x1cb8('0x3f')]);return db[_0x1cb8('0x2b')][_0x1cb8('0x45')](_0x2060a6)[_0x1cb8('0x24')](handleEntityNotFound(_0x47c18a,null))[_0x1cb8('0x24')](respondWithResult(_0x47c18a,null))['catch'](handleError(_0x47c18a,null));};exports[_0x1cb8('0x46')]=function(_0x3a4ec4,_0x5598b1){return db[_0x1cb8('0x2b')][_0x1cb8('0x46')](_0x3a4ec4[_0x1cb8('0x47')],{})[_0x1cb8('0x24')](respondWithResult(_0x5598b1,0xc9))[_0x1cb8('0x44')](handleError(_0x5598b1,null));};exports[_0x1cb8('0x48')]=function(_0x3b063c,_0x219541){if(_0x3b063c[_0x1cb8('0x47')]['id']){delete _0x3b063c[_0x1cb8('0x47')]['id'];}return db[_0x1cb8('0x2b')][_0x1cb8('0x45')]({'where':{'id':_0x3b063c[_0x1cb8('0x49')]['id']}})[_0x1cb8('0x24')](handleEntityNotFound(_0x219541,null))['then'](saveUpdates(_0x3b063c[_0x1cb8('0x47')],null))[_0x1cb8('0x24')](respondWithResult(_0x219541,null))[_0x1cb8('0x44')](handleError(_0x219541,null));};exports[_0x1cb8('0x25')]=function(_0x21aba7,_0x15f0ba){return db[_0x1cb8('0x2b')]['find']({'where':{'id':_0x21aba7[_0x1cb8('0x49')]['id']}})[_0x1cb8('0x24')](handleEntityNotFound(_0x15f0ba,null))[_0x1cb8('0x24')](removeEntity(_0x15f0ba,null))['catch'](handleError(_0x15f0ba,null));};exports['describe']=function(_0x1c12aa,_0x42cc81){return db[_0x1cb8('0x2b')][_0x1cb8('0x4a')]()[_0x1cb8('0x24')](respondWithResult(_0x42cc81,null))['catch'](handleError(_0x42cc81,null));};
\ No newline at end of file
+var _0x8958=['describe','rimraf','bluebird','util','path','sox','ejs','fs-extra','lodash','squel','crypto','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','apply','reject','save','update','then','error','name','send','index','map','fieldName','type','key','model','keys','filters','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','VIRTUAL','options','Cdr','includeAll','include','findAll','merge','find','catch','create','body','params'];(function(_0x43f506,_0xdaf2ec){var _0x1f0230=function(_0x51cdf9){while(--_0x51cdf9){_0x43f506['push'](_0x43f506['shift']());}};_0x1f0230(++_0xdaf2ec);}(_0x8958,0x93));var _0x8895=function(_0x5c80b7,_0x5c6250){_0x5c80b7=_0x5c80b7-0x0;var _0x4a20a7=_0x8958[_0x5c80b7];return _0x4a20a7;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x8895('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x8895('0x1'));var Mustache=require('mustache');var util=require(_0x8895('0x2'));var path=require(_0x8895('0x3'));var sox=require(_0x8895('0x4'));var csv=require('to-csv');var ejs=require(_0x8895('0x5'));var fs=require('fs');var fs_extra=require(_0x8895('0x6'));var _=require(_0x8895('0x7'));var squel=require(_0x8895('0x8'));var crypto=require(_0x8895('0x9'));var jsforce=require('jsforce');var deskjs=require(_0x8895('0xa'));var toCsv=require(_0x8895('0xb'));var querystring=require(_0x8895('0xc'));var Papa=require(_0x8895('0xd'));var Redis=require(_0x8895('0xe'));var authService=require(_0x8895('0xf'));var qs=require(_0x8895('0x10'));var as=require(_0x8895('0x11'));var hardwareService=require(_0x8895('0x12'));var logger=require(_0x8895('0x13'))('api');var utils=require(_0x8895('0x14'));var config=require(_0x8895('0x15'));var licenseUtil=require(_0x8895('0x16'));var db=require(_0x8895('0x17'))['db'];function respondWithStatusCode(_0x446e1a,_0xaf93bc){_0xaf93bc=_0xaf93bc||0xcc;return function(_0x5af0ef){if(_0x5af0ef){return _0x446e1a[_0x8895('0x18')](_0xaf93bc);}return _0x446e1a[_0x8895('0x19')](_0xaf93bc)[_0x8895('0x1a')]();};}function respondWithResult(_0x57d40a,_0x47b9fe){_0x47b9fe=_0x47b9fe||0xc8;return function(_0x9191b8){if(_0x9191b8){return _0x57d40a['status'](_0x47b9fe)[_0x8895('0x1b')](_0x9191b8);}};}function respondWithFilteredResult(_0x337101,_0x195789){return function(_0x3d7b59){if(_0x3d7b59){var _0x2c9d40=typeof _0x195789['offset']===_0x8895('0x1c')&&typeof _0x195789[_0x8895('0x1d')]===_0x8895('0x1c');var _0xcdd661=_0x3d7b59[_0x8895('0x1e')];var _0x1b5c82=_0x2c9d40?0x0:_0x195789[_0x8895('0x1f')];var _0x26cee0=_0x2c9d40?_0x3d7b59[_0x8895('0x1e')]:_0x195789[_0x8895('0x1f')]+_0x195789[_0x8895('0x1d')];var _0x6b8a16;if(_0x26cee0>=_0xcdd661){_0x26cee0=_0xcdd661;_0x6b8a16=0xc8;}else{_0x6b8a16=0xce;}_0x337101[_0x8895('0x19')](_0x6b8a16);return _0x337101['set']('Content-Range',_0x1b5c82+'-'+_0x26cee0+'/'+_0xcdd661)['json'](_0x3d7b59);}return null;};}function patchUpdates(_0x3daf43){return function(_0x456282){try{jsonpatch[_0x8895('0x20')](_0x456282,_0x3daf43,!![]);}catch(_0x29449a){return BPromise[_0x8895('0x21')](_0x29449a);}return _0x456282[_0x8895('0x22')]();};}function saveUpdates(_0x461346,_0xc1ce17){return function(_0x5219ca){if(_0x5219ca){return _0x5219ca[_0x8895('0x23')](_0x461346)[_0x8895('0x24')](function(_0x2a403){return _0x2a403;});}return null;};}function removeEntity(_0x1f71f3,_0x29223d){return function(_0x4d092d){if(_0x4d092d){return _0x4d092d['destroy']()[_0x8895('0x24')](function(){_0x1f71f3[_0x8895('0x19')](0xcc)[_0x8895('0x1a')]();});}};}function handleEntityNotFound(_0x24a376,_0x4fc150){return function(_0x25da11){if(!_0x25da11){_0x24a376[_0x8895('0x18')](0x194);}return _0x25da11;};}function handleError(_0x187a15,_0x5486a6){_0x5486a6=_0x5486a6||0x1f4;return function(_0x4aee03){logger[_0x8895('0x25')](_0x4aee03['stack']);if(_0x4aee03[_0x8895('0x26')]){delete _0x4aee03[_0x8895('0x26')];}_0x187a15[_0x8895('0x19')](_0x5486a6)[_0x8895('0x27')](_0x4aee03);};}exports[_0x8895('0x28')]=function(_0x5c03ea,_0x4d567a){var _0x6e449d={},_0x37ac3a={},_0x3fc4cc={'count':0x0,'rows':[]};var _0x16b65b=_[_0x8895('0x29')](db['Cdr']['rawAttributes'],function(_0x46ae32){return{'name':_0x46ae32[_0x8895('0x2a')],'type':_0x46ae32[_0x8895('0x2b')][_0x8895('0x2c')]};});_0x37ac3a[_0x8895('0x2d')]=_['map'](_0x16b65b,_0x8895('0x26'));_0x37ac3a['query']=_[_0x8895('0x2e')](_0x5c03ea['query']);_0x37ac3a[_0x8895('0x2f')]=_[_0x8895('0x30')](_0x37ac3a[_0x8895('0x2d')],_0x37ac3a[_0x8895('0x31')]);_0x6e449d[_0x8895('0x32')]=_['intersection'](_0x37ac3a[_0x8895('0x2d')],qs[_0x8895('0x33')](_0x5c03ea[_0x8895('0x31')][_0x8895('0x33')]));_0x6e449d[_0x8895('0x32')]=_0x6e449d['attributes'][_0x8895('0x34')]?_0x6e449d['attributes']:_0x37ac3a[_0x8895('0x2d')];if(!_0x5c03ea['query'][_0x8895('0x35')](_0x8895('0x36'))){_0x6e449d[_0x8895('0x1d')]=qs[_0x8895('0x1d')](_0x5c03ea[_0x8895('0x31')]['limit']);_0x6e449d[_0x8895('0x1f')]=qs['offset'](_0x5c03ea[_0x8895('0x31')][_0x8895('0x1f')]);}_0x6e449d[_0x8895('0x37')]=qs[_0x8895('0x38')](_0x5c03ea[_0x8895('0x31')][_0x8895('0x38')]);_0x6e449d['where']=qs[_0x8895('0x2f')](_[_0x8895('0x39')](_0x5c03ea['query'],_0x37ac3a[_0x8895('0x2f')]),_0x16b65b);if(_0x5c03ea['query'][_0x8895('0x3a')]){_0x6e449d[_0x8895('0x3b')]=_['merge'](_0x6e449d[_0x8895('0x3b')],{'$or':_[_0x8895('0x29')](_0x16b65b,function(_0x5b7204){if(_0x5b7204['type']!==_0x8895('0x3c')){var _0xf0b378={};_0xf0b378[_0x5b7204[_0x8895('0x26')]]={'$like':'%'+_0x5c03ea[_0x8895('0x31')][_0x8895('0x3a')]+'%'};return _0xf0b378;}})});}_0x6e449d=_['merge']({},_0x6e449d,_0x5c03ea[_0x8895('0x3d')]);var _0x25c854={'where':_0x6e449d[_0x8895('0x3b')]};return db[_0x8895('0x3e')][_0x8895('0x1e')](_0x25c854)[_0x8895('0x24')](function(_0x4a7e22){_0x3fc4cc[_0x8895('0x1e')]=_0x4a7e22;if(_0x5c03ea['query'][_0x8895('0x3f')]){_0x6e449d[_0x8895('0x40')]=[{'all':!![]}];}return db['Cdr'][_0x8895('0x41')](_0x6e449d);})['then'](function(_0x1e6395){_0x3fc4cc['rows']=_0x1e6395;return _0x3fc4cc;})['then'](respondWithFilteredResult(_0x4d567a,_0x6e449d))['catch'](handleError(_0x4d567a,null));};exports['show']=function(_0x4881d0,_0x47cf10){var _0x447ed6={'raw':!![],'where':{'id':_0x4881d0['params']['id']}},_0x206f57={};_0x206f57['model']=_[_0x8895('0x2e')](db[_0x8895('0x3e')]['rawAttributes']);_0x206f57[_0x8895('0x31')]=_[_0x8895('0x2e')](_0x4881d0[_0x8895('0x31')]);_0x206f57[_0x8895('0x2f')]=_[_0x8895('0x30')](_0x206f57['model'],_0x206f57['query']);_0x447ed6['attributes']=_[_0x8895('0x30')](_0x206f57['model'],qs[_0x8895('0x33')](_0x4881d0[_0x8895('0x31')][_0x8895('0x33')]));_0x447ed6[_0x8895('0x32')]=_0x447ed6['attributes'][_0x8895('0x34')]?_0x447ed6[_0x8895('0x32')]:_0x206f57[_0x8895('0x2d')];if(_0x4881d0[_0x8895('0x31')][_0x8895('0x3f')]){_0x447ed6[_0x8895('0x40')]=[{'all':!![]}];}_0x447ed6=_[_0x8895('0x42')]({},_0x447ed6,_0x4881d0[_0x8895('0x3d')]);return db['Cdr'][_0x8895('0x43')](_0x447ed6)[_0x8895('0x24')](handleEntityNotFound(_0x47cf10,null))['then'](respondWithResult(_0x47cf10,null))[_0x8895('0x44')](handleError(_0x47cf10,null));};exports['create']=function(_0x5829ec,_0x13546d){return db[_0x8895('0x3e')][_0x8895('0x45')](_0x5829ec['body'],{})[_0x8895('0x24')](respondWithResult(_0x13546d,0xc9))['catch'](handleError(_0x13546d,null));};exports[_0x8895('0x23')]=function(_0x152197,_0xb3ecd6){if(_0x152197[_0x8895('0x46')]['id']){delete _0x152197[_0x8895('0x46')]['id'];}return db[_0x8895('0x3e')][_0x8895('0x43')]({'where':{'id':_0x152197['params']['id']}})['then'](handleEntityNotFound(_0xb3ecd6,null))[_0x8895('0x24')](saveUpdates(_0x152197[_0x8895('0x46')],null))['then'](respondWithResult(_0xb3ecd6,null))[_0x8895('0x44')](handleError(_0xb3ecd6,null));};exports['destroy']=function(_0x4e8af3,_0x2daafe){return db['Cdr'][_0x8895('0x43')]({'where':{'id':_0x4e8af3[_0x8895('0x47')]['id']}})[_0x8895('0x24')](handleEntityNotFound(_0x2daafe,null))[_0x8895('0x24')](removeEntity(_0x2daafe,null))[_0x8895('0x44')](handleError(_0x2daafe,null));};exports[_0x8895('0x48')]=function(_0x306481,_0x38d6ae){return db['Cdr'][_0x8895('0x48')]()[_0x8895('0x24')](respondWithResult(_0x38d6ae,null))[_0x8895('0x44')](handleError(_0x38d6ae,null));};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.model.js b/server/api/cdr/cdr.model.js
index 021e9f3..cc0775a 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 _0x7a54=['Cdr','cdr','accountcode','disposition','dst','src','uniqueid','lodash','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./cdr.attributes','exports'];(function(_0x1cf525,_0x2285fe){var _0x185d92=function(_0x37be96){while(--_0x37be96){_0x1cf525['push'](_0x1cf525['shift']());}};_0x185d92(++_0x2285fe);}(_0x7a54,0x106));var _0x47a5=function(_0x5bb09b,_0x203a69){_0x5bb09b=_0x5bb09b-0x0;var _0x12c0bf=_0x7a54[_0x5bb09b];return _0x12c0bf;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var logger=require(_0x47a5('0x2'))('api');var moment=require(_0x47a5('0x3'));var BPromise=require(_0x47a5('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x47a5('0x5'));var rimraf=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var attributes=require(_0x47a5('0x8'));module[_0x47a5('0x9')]=function(_0x545a97,_0x3d5629){return _0x545a97['define'](_0x47a5('0xa'),attributes,{'tableName':_0x47a5('0xb'),'paranoid':![],'indexes':[{'name':'accountcode','fields':[_0x47a5('0xc')]},{'name':'calldate','fields':['calldate']},{'name':'disposition','fields':[_0x47a5('0xd')]},{'name':_0x47a5('0xe'),'fields':['dst']},{'name':_0x47a5('0xf'),'fields':['src']},{'name':'uniqueid','fields':[_0x47a5('0x10')]}],'timestamps':![]});};
\ No newline at end of file
+var _0x7a54=['Cdr','cdr','accountcode','disposition','dst','src','uniqueid','lodash','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./cdr.attributes','exports'];(function(_0x58f50c,_0x321e21){var _0x34017f=function(_0x57b116){while(--_0x57b116){_0x58f50c['push'](_0x58f50c['shift']());}};_0x34017f(++_0x321e21);}(_0x7a54,0x106));var _0x47a5=function(_0x1e0137,_0x44343b){_0x1e0137=_0x1e0137-0x0;var _0x4dbbe9=_0x7a54[_0x1e0137];return _0x4dbbe9;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var logger=require(_0x47a5('0x2'))('api');var moment=require(_0x47a5('0x3'));var BPromise=require(_0x47a5('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x47a5('0x5'));var rimraf=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var attributes=require(_0x47a5('0x8'));module[_0x47a5('0x9')]=function(_0x545a97,_0x3d5629){return _0x545a97['define'](_0x47a5('0xa'),attributes,{'tableName':_0x47a5('0xb'),'paranoid':![],'indexes':[{'name':'accountcode','fields':[_0x47a5('0xc')]},{'name':'calldate','fields':['calldate']},{'name':'disposition','fields':[_0x47a5('0xd')]},{'name':_0x47a5('0xe'),'fields':['dst']},{'name':_0x47a5('0xf'),'fields':['src']},{'name':'uniqueid','fields':[_0x47a5('0x10')]}],'timestamps':![]});};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.rpc.js b/server/api/cdr/cdr.rpc.js
index 298f264..6f2c7ff 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 _0xc5bf=['bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','Cdr,\x20%s,\x20%s','request\x20sent','Cdr,\x20%s,\x20%s,\x20%s','error','message','result','catch','util','moment'];(function(_0x564c35,_0x2399e6){var _0x3040b5=function(_0x4d1bb0){while(--_0x4d1bb0){_0x564c35['push'](_0x564c35['shift']());}};_0x3040b5(++_0x2399e6);}(_0xc5bf,0x1e1));var _0xfc5b=function(_0x10708c,_0x1a12d1){_0x10708c=_0x10708c-0x0;var _0x2254c4=_0xc5bf[_0x10708c];return _0x2254c4;};'use strict';var _=require('lodash');var util=require(_0xfc5b('0x0'));var moment=require(_0xfc5b('0x1'));var BPromise=require(_0xfc5b('0x2'));var rs=require(_0xfc5b('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xfc5b('0x4'))['db'];var utils=require(_0xfc5b('0x5'));var logger=require(_0xfc5b('0x6'))(_0xfc5b('0x7'));var config=require(_0xfc5b('0x8'));var jayson=require(_0xfc5b('0x9'));var client=jayson['client'][_0xfc5b('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2a9f3e,_0x4add52,_0x1fb0e2){return new BPromise(function(_0x5259c6,_0x715a70){return client[_0xfc5b('0xb')](_0x2a9f3e,_0x1fb0e2)[_0xfc5b('0xc')](function(_0x1d25cb){logger[_0xfc5b('0xd')](_0xfc5b('0xe'),_0x4add52,_0xfc5b('0xf'));logger['debug'](_0xfc5b('0x10'),_0x4add52,_0xfc5b('0xf'),JSON['stringify'](_0x1d25cb));if(_0x1d25cb[_0xfc5b('0x11')]){if(_0x1d25cb['error']['code']===0x1f4){logger[_0xfc5b('0x11')]('Cdr,\x20%s,\x20%s',_0x4add52,_0x1d25cb[_0xfc5b('0x11')][_0xfc5b('0x12')]);return _0x715a70(_0x1d25cb[_0xfc5b('0x11')][_0xfc5b('0x12')]);}logger[_0xfc5b('0x11')](_0xfc5b('0xe'),_0x4add52,_0x1d25cb[_0xfc5b('0x11')][_0xfc5b('0x12')]);return _0x5259c6(_0x1d25cb[_0xfc5b('0x11')]['message']);}else{logger[_0xfc5b('0xd')](_0xfc5b('0xe'),_0x4add52,'request\x20sent');_0x5259c6(_0x1d25cb[_0xfc5b('0x13')]['message']);}})[_0xfc5b('0x14')](function(_0xabbf29){logger[_0xfc5b('0x11')](_0xfc5b('0xe'),_0x4add52,_0xabbf29);_0x715a70(_0xabbf29);});});}
\ No newline at end of file
+var _0xd1de=['Cdr,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','result','catch','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','then'];(function(_0x32ac58,_0x27d770){var _0x499c72=function(_0x1575e4){while(--_0x1575e4){_0x32ac58['push'](_0x32ac58['shift']());}};_0x499c72(++_0x27d770);}(_0xd1de,0x7a));var _0xed1d=function(_0x2a4249,_0xae8e83){_0x2a4249=_0x2a4249-0x0;var _0x4242b7=_0xd1de[_0x2a4249];return _0x4242b7;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xed1d('0x0'));var BPromise=require('bluebird');var rs=require(_0xed1d('0x1'));var fs=require('fs');var Redis=require(_0xed1d('0x2'));var db=require(_0xed1d('0x3'))['db'];var utils=require(_0xed1d('0x4'));var logger=require(_0xed1d('0x5'))('rpc');var config=require(_0xed1d('0x6'));var jayson=require(_0xed1d('0x7'));var client=jayson[_0xed1d('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x32dbe9,_0x161f54,_0x3579f4){return new BPromise(function(_0x1dda6a,_0x21aeb8){return client[_0xed1d('0x9')](_0x32dbe9,_0x3579f4)[_0xed1d('0xa')](function(_0x452630){logger['info'](_0xed1d('0xb'),_0x161f54,_0xed1d('0xc'));logger['debug']('Cdr,\x20%s,\x20%s,\x20%s',_0x161f54,_0xed1d('0xc'),JSON[_0xed1d('0xd')](_0x452630));if(_0x452630['error']){if(_0x452630[_0xed1d('0xe')]['code']===0x1f4){logger['error'](_0xed1d('0xb'),_0x161f54,_0x452630[_0xed1d('0xe')][_0xed1d('0xf')]);return _0x21aeb8(_0x452630['error'][_0xed1d('0xf')]);}logger[_0xed1d('0xe')]('Cdr,\x20%s,\x20%s',_0x161f54,_0x452630[_0xed1d('0xe')][_0xed1d('0xf')]);return _0x1dda6a(_0x452630[_0xed1d('0xe')][_0xed1d('0xf')]);}else{logger[_0xed1d('0x10')](_0xed1d('0xb'),_0x161f54,_0xed1d('0xc'));_0x1dda6a(_0x452630[_0xed1d('0x11')][_0xed1d('0xf')]);}})[_0xed1d('0x12')](function(_0x444b2a){logger['error'](_0xed1d('0xb'),_0x161f54,_0x444b2a);_0x21aeb8(_0x444b2a);});});}
\ No newline at end of file
diff --git a/server/api/cdr/index.js b/server/api/cdr/index.js
index eedd9d4..0d7bd82 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(_0x26fc3b,_0x2b1be3){var _0x380e31=function(_0x391a02){while(--_0x391a02){_0x26fc3b['push'](_0x26fc3b['shift']());}};_0x380e31(++_0x2b1be3);}(_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(_0x4a7843,_0x24f6d1){var _0x2c57fe=function(_0x37fbc9){while(--_0x37fbc9){_0x4a7843['push'](_0x4a7843['shift']());}};_0x2c57fe(++_0x24f6d1);}(_0xd8b0,0xad));var _0x0d8b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xd8b0[_0x122ef9];return _0x42fba0;};'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 1e2e59a..d2704c4 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 _0xc822=['exports','INTEGER','STRING','noop','*,*,*,*','sequelize'];(function(_0x15f644,_0x1f0a82){var _0xd954a1=function(_0x4e0fd3){while(--_0x4e0fd3){_0x15f644['push'](_0x15f644['shift']());}};_0xd954a1(++_0x1f0a82);}(_0xc822,0xd7));var _0x2c82=function(_0x5a26db,_0x2c5ccd){_0x5a26db=_0x5a26db-0x0;var _0x4619dd=_0xc822[_0x5a26db];return _0x4619dd;};'use strict';var Sequelize=require(_0x2c82('0x0'));module[_0x2c82('0x1')]={'priority':{'type':Sequelize[_0x2c82('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x2c82('0x3')],'allowNull':![],'defaultValue':_0x2c82('0x4')},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0x2c82('0x3')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x2c82('0x5')}};
\ No newline at end of file
+var _0x99c1=['TEXT','*,*,*,*','sequelize','INTEGER','STRING','noop'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x99c1,0x16a));var _0x199c=function(_0x3383a9,_0x3dfafe){_0x3383a9=_0x3383a9-0x0;var _0x469d5b=_0x99c1[_0x3383a9];return _0x469d5b;};'use strict';var Sequelize=require(_0x199c('0x0'));module['exports']={'priority':{'type':Sequelize[_0x199c('0x1')],'allowNull':![]},'app':{'type':Sequelize[_0x199c('0x2')],'allowNull':![],'defaultValue':_0x199c('0x3')},'appdata':{'type':Sequelize[_0x199c('0x4')]()},'description':{'type':Sequelize[_0x199c('0x2')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x199c('0x5')}};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.controller.js b/server/api/chatApplication/chatApplication.controller.js
index 9aceb7f..99d68a6 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 _0x7b05=['ioredis','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','end','json','offset','undefined','limit','count','status','set','reject','save','update','then','sendStatus','error','stack','name','send','show','params','model','rawAttributes','keys','intersection','attributes','fields','query','length','ChatApplication','find','catch','body','destroy','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','papaparse'];(function(_0x40490a,_0x3b4813){var _0x5e4469=function(_0x366d3a){while(--_0x366d3a){_0x40490a['push'](_0x40490a['shift']());}};_0x5e4469(++_0x3b4813);}(_0x7b05,0x91));var _0x57b0=function(_0x3a16d4,_0x23ecda){_0x3a16d4=_0x3a16d4-0x0;var _0x31ea9c=_0x7b05[_0x3a16d4];return _0x31ea9c;};'use strict';var emlformat=require(_0x57b0('0x0'));var rimraf=require(_0x57b0('0x1'));var zipdir=require(_0x57b0('0x2'));var jsonpatch=require(_0x57b0('0x3'));var rp=require('request-promise');var moment=require(_0x57b0('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x57b0('0x5'));var util=require(_0x57b0('0x6'));var path=require(_0x57b0('0x7'));var sox=require(_0x57b0('0x8'));var csv=require(_0x57b0('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x57b0('0xa'));var _=require('lodash');var squel=require(_0x57b0('0xb'));var crypto=require(_0x57b0('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x57b0('0xd'));var Redis=require(_0x57b0('0xe'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x57b0('0xf'));var logger=require(_0x57b0('0x10'))(_0x57b0('0x11'));var utils=require(_0x57b0('0x12'));var config=require(_0x57b0('0x13'));var licenseUtil=require(_0x57b0('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x363096,_0x145eae){_0x145eae=_0x145eae||0xcc;return function(_0xee8335){if(_0xee8335){return _0x363096['sendStatus'](_0x145eae);}return _0x363096['status'](_0x145eae)[_0x57b0('0x15')]();};}function respondWithResult(_0x3f95e3,_0xc9044f){_0xc9044f=_0xc9044f||0xc8;return function(_0x3b48a3){if(_0x3b48a3){return _0x3f95e3['status'](_0xc9044f)[_0x57b0('0x16')](_0x3b48a3);}};}function respondWithFilteredResult(_0x5c46a5,_0x235d4a){return function(_0xa20423){if(_0xa20423){var _0x55fd9c=typeof _0x235d4a[_0x57b0('0x17')]===_0x57b0('0x18')&&typeof _0x235d4a[_0x57b0('0x19')]===_0x57b0('0x18');var _0x3eb198=_0xa20423['count'];var _0x37bd5d=_0x55fd9c?0x0:_0x235d4a['offset'];var _0x592b2d=_0x55fd9c?_0xa20423[_0x57b0('0x1a')]:_0x235d4a[_0x57b0('0x17')]+_0x235d4a[_0x57b0('0x19')];var _0x3e14f5;if(_0x592b2d>=_0x3eb198){_0x592b2d=_0x3eb198;_0x3e14f5=0xc8;}else{_0x3e14f5=0xce;}_0x5c46a5[_0x57b0('0x1b')](_0x3e14f5);return _0x5c46a5[_0x57b0('0x1c')]('Content-Range',_0x37bd5d+'-'+_0x592b2d+'/'+_0x3eb198)[_0x57b0('0x16')](_0xa20423);}return null;};}function patchUpdates(_0x1d81ff){return function(_0x35a457){try{jsonpatch['apply'](_0x35a457,_0x1d81ff,!![]);}catch(_0x12f2f6){return BPromise[_0x57b0('0x1d')](_0x12f2f6);}return _0x35a457[_0x57b0('0x1e')]();};}function saveUpdates(_0x149056,_0x2ffc0a){return function(_0x22b11e){if(_0x22b11e){return _0x22b11e[_0x57b0('0x1f')](_0x149056)[_0x57b0('0x20')](function(_0x3497e4){return _0x3497e4;});}return null;};}function removeEntity(_0x5c60b9,_0x55b870){return function(_0x40c279){if(_0x40c279){return _0x40c279['destroy']()[_0x57b0('0x20')](function(){_0x5c60b9[_0x57b0('0x1b')](0xcc)[_0x57b0('0x15')]();});}};}function handleEntityNotFound(_0x38e3a0,_0x3e75e8){return function(_0xbf54ac){if(!_0xbf54ac){_0x38e3a0[_0x57b0('0x21')](0x194);}return _0xbf54ac;};}function handleError(_0x1eb523,_0xacd07c){_0xacd07c=_0xacd07c||0x1f4;return function(_0x109678){logger[_0x57b0('0x22')](_0x109678[_0x57b0('0x23')]);if(_0x109678[_0x57b0('0x24')]){delete _0x109678['name'];}_0x1eb523[_0x57b0('0x1b')](_0xacd07c)[_0x57b0('0x25')](_0x109678);};}exports[_0x57b0('0x26')]=function(_0x228dfe,_0x5e046c){var _0x552f3e={'raw':!![],'where':{'id':_0x228dfe[_0x57b0('0x27')]['id']}},_0x325e39={};_0x325e39[_0x57b0('0x28')]=_['keys'](db['ChatApplication'][_0x57b0('0x29')]);_0x325e39['query']=_[_0x57b0('0x2a')](_0x228dfe['query']);_0x325e39['filters']=_[_0x57b0('0x2b')](_0x325e39[_0x57b0('0x28')],_0x325e39['query']);_0x552f3e[_0x57b0('0x2c')]=_[_0x57b0('0x2b')](_0x325e39['model'],qs[_0x57b0('0x2d')](_0x228dfe[_0x57b0('0x2e')][_0x57b0('0x2d')]));_0x552f3e['attributes']=_0x552f3e[_0x57b0('0x2c')][_0x57b0('0x2f')]?_0x552f3e[_0x57b0('0x2c')]:_0x325e39[_0x57b0('0x28')];if(_0x228dfe[_0x57b0('0x2e')]['includeAll']){_0x552f3e['include']=[{'all':!![]}];}_0x552f3e=_['merge']({},_0x552f3e,_0x228dfe['options']);return db[_0x57b0('0x30')][_0x57b0('0x31')](_0x552f3e)[_0x57b0('0x20')](handleEntityNotFound(_0x5e046c,null))[_0x57b0('0x20')](respondWithResult(_0x5e046c,null))[_0x57b0('0x32')](handleError(_0x5e046c,null));};exports['update']=function(_0x85fdfe,_0x879623){if(_0x85fdfe[_0x57b0('0x33')]['id']){delete _0x85fdfe[_0x57b0('0x33')]['id'];}return db['ChatApplication'][_0x57b0('0x31')]({'where':{'id':_0x85fdfe[_0x57b0('0x27')]['id']}})['then'](handleEntityNotFound(_0x879623,null))[_0x57b0('0x20')](saveUpdates(_0x85fdfe[_0x57b0('0x33')],null))['then'](respondWithResult(_0x879623,null))['catch'](handleError(_0x879623,null));};exports[_0x57b0('0x34')]=function(_0x1b1d95,_0x3acf43){return db[_0x57b0('0x30')][_0x57b0('0x31')]({'where':{'id':_0x1b1d95[_0x57b0('0x27')]['id']}})[_0x57b0('0x20')](handleEntityNotFound(_0x3acf43,null))[_0x57b0('0x20')](removeEntity(_0x3acf43,null))[_0x57b0('0x32')](handleError(_0x3acf43,null));};
\ No newline at end of file
+var _0xc686=['../../config/environment','../../mysqldb','status','end','json','undefined','limit','offset','set','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','stack','name','send','show','params','keys','ChatApplication','rawAttributes','query','filters','model','attributes','intersection','fields','length','includeAll','include','find','catch','body','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils'];(function(_0x2596c4,_0x388e98){var _0xb554c4=function(_0x40ae44){while(--_0x40ae44){_0x2596c4['push'](_0x2596c4['shift']());}};_0xb554c4(++_0x388e98);}(_0xc686,0x148));var _0x6c68=function(_0x2b10c6,_0x185590){_0x2b10c6=_0x2b10c6-0x0;var _0x3789d2=_0xc686[_0x2b10c6];return _0x3789d2;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x6c68('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0x6c68('0x1'));var moment=require('moment');var BPromise=require(_0x6c68('0x2'));var Mustache=require(_0x6c68('0x3'));var util=require(_0x6c68('0x4'));var path=require(_0x6c68('0x5'));var sox=require(_0x6c68('0x6'));var csv=require(_0x6c68('0x7'));var ejs=require(_0x6c68('0x8'));var fs=require('fs');var fs_extra=require(_0x6c68('0x9'));var _=require(_0x6c68('0xa'));var squel=require(_0x6c68('0xb'));var crypto=require(_0x6c68('0xc'));var jsforce=require(_0x6c68('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x6c68('0x7'));var querystring=require(_0x6c68('0xe'));var Papa=require('papaparse');var Redis=require(_0x6c68('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x6c68('0x10'));var as=require(_0x6c68('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x6c68('0x12'))('api');var utils=require(_0x6c68('0x13'));var config=require(_0x6c68('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0x6c68('0x15'))['db'];function respondWithStatusCode(_0x489c2f,_0x4f947a){_0x4f947a=_0x4f947a||0xcc;return function(_0x29e0a5){if(_0x29e0a5){return _0x489c2f['sendStatus'](_0x4f947a);}return _0x489c2f[_0x6c68('0x16')](_0x4f947a)[_0x6c68('0x17')]();};}function respondWithResult(_0x310431,_0x4c4f5d){_0x4c4f5d=_0x4c4f5d||0xc8;return function(_0x25a4dc){if(_0x25a4dc){return _0x310431[_0x6c68('0x16')](_0x4c4f5d)[_0x6c68('0x18')](_0x25a4dc);}};}function respondWithFilteredResult(_0x9393b,_0x2dc30b){return function(_0x494b6e){if(_0x494b6e){var _0x5a0a84=typeof _0x2dc30b['offset']===_0x6c68('0x19')&&typeof _0x2dc30b[_0x6c68('0x1a')]===_0x6c68('0x19');var _0x1422fa=_0x494b6e['count'];var _0x2cd5f6=_0x5a0a84?0x0:_0x2dc30b[_0x6c68('0x1b')];var _0x5045e3=_0x5a0a84?_0x494b6e['count']:_0x2dc30b[_0x6c68('0x1b')]+_0x2dc30b[_0x6c68('0x1a')];var _0x23d91d;if(_0x5045e3>=_0x1422fa){_0x5045e3=_0x1422fa;_0x23d91d=0xc8;}else{_0x23d91d=0xce;}_0x9393b['status'](_0x23d91d);return _0x9393b[_0x6c68('0x1c')](_0x6c68('0x1d'),_0x2cd5f6+'-'+_0x5045e3+'/'+_0x1422fa)[_0x6c68('0x18')](_0x494b6e);}return null;};}function patchUpdates(_0x29b74d){return function(_0x153edb){try{jsonpatch[_0x6c68('0x1e')](_0x153edb,_0x29b74d,!![]);}catch(_0x12dc3a){return BPromise[_0x6c68('0x1f')](_0x12dc3a);}return _0x153edb[_0x6c68('0x20')]();};}function saveUpdates(_0xb6635c,_0x5974e8){return function(_0x201d7d){if(_0x201d7d){return _0x201d7d[_0x6c68('0x21')](_0xb6635c)[_0x6c68('0x22')](function(_0x1d981c){return _0x1d981c;});}return null;};}function removeEntity(_0xb06428,_0x2a4aba){return function(_0x3e680a){if(_0x3e680a){return _0x3e680a[_0x6c68('0x23')]()[_0x6c68('0x22')](function(){_0xb06428[_0x6c68('0x16')](0xcc)[_0x6c68('0x17')]();});}};}function handleEntityNotFound(_0x2f4fd5,_0x1efc4e){return function(_0x3b105c){if(!_0x3b105c){_0x2f4fd5[_0x6c68('0x24')](0x194);}return _0x3b105c;};}function handleError(_0x223c7d,_0x69310b){_0x69310b=_0x69310b||0x1f4;return function(_0x5c9c19){logger[_0x6c68('0x25')](_0x5c9c19[_0x6c68('0x26')]);if(_0x5c9c19[_0x6c68('0x27')]){delete _0x5c9c19[_0x6c68('0x27')];}_0x223c7d[_0x6c68('0x16')](_0x69310b)[_0x6c68('0x28')](_0x5c9c19);};}exports[_0x6c68('0x29')]=function(_0x1d4566,_0x111723){var _0x4ec904={'raw':!![],'where':{'id':_0x1d4566[_0x6c68('0x2a')]['id']}},_0x1321d1={};_0x1321d1['model']=_[_0x6c68('0x2b')](db[_0x6c68('0x2c')][_0x6c68('0x2d')]);_0x1321d1['query']=_[_0x6c68('0x2b')](_0x1d4566[_0x6c68('0x2e')]);_0x1321d1[_0x6c68('0x2f')]=_['intersection'](_0x1321d1[_0x6c68('0x30')],_0x1321d1[_0x6c68('0x2e')]);_0x4ec904[_0x6c68('0x31')]=_[_0x6c68('0x32')](_0x1321d1[_0x6c68('0x30')],qs[_0x6c68('0x33')](_0x1d4566[_0x6c68('0x2e')][_0x6c68('0x33')]));_0x4ec904[_0x6c68('0x31')]=_0x4ec904[_0x6c68('0x31')][_0x6c68('0x34')]?_0x4ec904[_0x6c68('0x31')]:_0x1321d1[_0x6c68('0x30')];if(_0x1d4566[_0x6c68('0x2e')][_0x6c68('0x35')]){_0x4ec904[_0x6c68('0x36')]=[{'all':!![]}];}_0x4ec904=_['merge']({},_0x4ec904,_0x1d4566['options']);return db[_0x6c68('0x2c')][_0x6c68('0x37')](_0x4ec904)[_0x6c68('0x22')](handleEntityNotFound(_0x111723,null))[_0x6c68('0x22')](respondWithResult(_0x111723,null))[_0x6c68('0x38')](handleError(_0x111723,null));};exports['update']=function(_0x32bddd,_0x56d2c8){if(_0x32bddd[_0x6c68('0x39')]['id']){delete _0x32bddd[_0x6c68('0x39')]['id'];}return db[_0x6c68('0x2c')][_0x6c68('0x37')]({'where':{'id':_0x32bddd['params']['id']}})['then'](handleEntityNotFound(_0x56d2c8,null))[_0x6c68('0x22')](saveUpdates(_0x32bddd[_0x6c68('0x39')],null))['then'](respondWithResult(_0x56d2c8,null))['catch'](handleError(_0x56d2c8,null));};exports[_0x6c68('0x23')]=function(_0x4f782d,_0xa8ea89){return db[_0x6c68('0x2c')]['find']({'where':{'id':_0x4f782d[_0x6c68('0x2a')]['id']}})[_0x6c68('0x22')](handleEntityNotFound(_0xa8ea89,null))[_0x6c68('0x22')](removeEntity(_0xa8ea89,null))[_0x6c68('0x38')](handleError(_0xa8ea89,null));};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.model.js b/server/api/chatApplication/chatApplication.model.js
index 01a4147..82faf95 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 _0xadd2=['path','rimraf','../../config/environment','./chatApplication.attributes','exports','ChatApplication','chat_applications','utf8mb4','utf8mb4_unicode_ci','../../config/logger','moment','bluebird','request-promise'];(function(_0x41df41,_0x370874){var _0x3f4702=function(_0x5101cc){while(--_0x5101cc){_0x41df41['push'](_0x41df41['shift']());}};_0x3f4702(++_0x370874);}(_0xadd2,0xa5));var _0x2add=function(_0x1cc8fe,_0x105328){_0x1cc8fe=_0x1cc8fe-0x0;var _0x230054=_0xadd2[_0x1cc8fe];return _0x230054;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x2add('0x0'))('api');var moment=require(_0x2add('0x1'));var BPromise=require(_0x2add('0x2'));var rp=require(_0x2add('0x3'));var fs=require('fs');var path=require(_0x2add('0x4'));var rimraf=require(_0x2add('0x5'));var config=require(_0x2add('0x6'));var attributes=require(_0x2add('0x7'));module[_0x2add('0x8')]=function(_0x30d864,_0x53a89d){return _0x30d864['define'](_0x2add('0x9'),attributes,{'tableName':_0x2add('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x2add('0xb'),'collate':_0x2add('0xc')});};
\ No newline at end of file
+var _0x1fd2=['define','ChatApplication','utf8mb4','utf8mb4_unicode_ci','util','../../config/logger','moment','bluebird','request-promise','path','../../config/environment','./chatApplication.attributes'];(function(_0x3aeee7,_0x168e86){var _0x49ee12=function(_0xb330b3){while(--_0xb330b3){_0x3aeee7['push'](_0x3aeee7['shift']());}};_0x49ee12(++_0x168e86);}(_0x1fd2,0x184));var _0x21fd=function(_0x191dbb,_0x4aab6b){_0x191dbb=_0x191dbb-0x0;var _0x2dd105=_0x1fd2[_0x191dbb];return _0x2dd105;};'use strict';var _=require('lodash');var util=require(_0x21fd('0x0'));var logger=require(_0x21fd('0x1'))('api');var moment=require(_0x21fd('0x2'));var BPromise=require(_0x21fd('0x3'));var rp=require(_0x21fd('0x4'));var fs=require('fs');var path=require(_0x21fd('0x5'));var rimraf=require('rimraf');var config=require(_0x21fd('0x6'));var attributes=require(_0x21fd('0x7'));module['exports']=function(_0x48c369,_0x421e1f){return _0x48c369[_0x21fd('0x8')](_0x21fd('0x9'),attributes,{'tableName':'chat_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x21fd('0xa'),'collate':_0x21fd('0xb')});};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.rpc.js b/server/api/chatApplication/chatApplication.rpc.js
index f3a4f8d..7b8d8ec 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 _0x63c1=['rpc','http','request','info','ChatApplication,\x20%s,\x20%s','request\x20sent','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger'];(function(_0x1969a7,_0x5a133a){var _0x3d665f=function(_0x39c64b){while(--_0x39c64b){_0x1969a7['push'](_0x1969a7['shift']());}};_0x3d665f(++_0x5a133a);}(_0x63c1,0x1c1));var _0x163c=function(_0x10da7d,_0x437c3c){_0x10da7d=_0x10da7d-0x0;var _0x10b314=_0x63c1[_0x10da7d];return _0x10b314;};'use strict';var _=require(_0x163c('0x0'));var util=require(_0x163c('0x1'));var moment=require('moment');var BPromise=require(_0x163c('0x2'));var rs=require(_0x163c('0x3'));var fs=require('fs');var Redis=require(_0x163c('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x163c('0x5'));var logger=require(_0x163c('0x6'))(_0x163c('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x163c('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x289ae7,_0xa0efb,_0x4f5113){return new BPromise(function(_0x4d737f,_0x568328){return client[_0x163c('0x9')](_0x289ae7,_0x4f5113)['then'](function(_0xbf13be){logger[_0x163c('0xa')](_0x163c('0xb'),_0xa0efb,_0x163c('0xc'));logger['debug'](_0x163c('0xd'),_0xa0efb,_0x163c('0xc'),JSON[_0x163c('0xe')](_0xbf13be));if(_0xbf13be['error']){if(_0xbf13be[_0x163c('0xf')][_0x163c('0x10')]===0x1f4){logger[_0x163c('0xf')]('ChatApplication,\x20%s,\x20%s',_0xa0efb,_0xbf13be['error'][_0x163c('0x11')]);return _0x568328(_0xbf13be[_0x163c('0xf')][_0x163c('0x11')]);}logger[_0x163c('0xf')](_0x163c('0xb'),_0xa0efb,_0xbf13be[_0x163c('0xf')][_0x163c('0x11')]);return _0x4d737f(_0xbf13be['error'][_0x163c('0x11')]);}else{logger[_0x163c('0xa')](_0x163c('0xb'),_0xa0efb,_0x163c('0xc'));_0x4d737f(_0xbf13be['result'][_0x163c('0x11')]);}})[_0x163c('0x12')](function(_0x2a3c77){logger['error'](_0x163c('0xb'),_0xa0efb,_0x2a3c77);_0x568328(_0x2a3c77);});});}
\ No newline at end of file
+var _0xc637=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','ChatApplication,\x20%s,\x20%s','result','catch','util','bluebird','randomstring','../../mysqldb','../../config/utils'];(function(_0x53258a,_0x4d5e50){var _0x426572=function(_0x501571){while(--_0x501571){_0x53258a['push'](_0x53258a['shift']());}};_0x426572(++_0x4d5e50);}(_0xc637,0x8b));var _0x7c63=function(_0xc6cadf,_0x300b3d){_0xc6cadf=_0xc6cadf-0x0;var _0x445fe1=_0xc637[_0xc6cadf];return _0x445fe1;};'use strict';var _=require('lodash');var util=require(_0x7c63('0x0'));var moment=require('moment');var BPromise=require(_0x7c63('0x1'));var rs=require(_0x7c63('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7c63('0x3'))['db'];var utils=require(_0x7c63('0x4'));var logger=require(_0x7c63('0x5'))(_0x7c63('0x6'));var config=require(_0x7c63('0x7'));var jayson=require(_0x7c63('0x8'));var client=jayson[_0x7c63('0x9')][_0x7c63('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x45d8a0,_0x2c5524,_0xbb97e3){return new BPromise(function(_0x59c510,_0x202f4f){return client[_0x7c63('0xb')](_0x45d8a0,_0xbb97e3)[_0x7c63('0xc')](function(_0x56335e){logger[_0x7c63('0xd')]('ChatApplication,\x20%s,\x20%s',_0x2c5524,_0x7c63('0xe'));logger[_0x7c63('0xf')](_0x7c63('0x10'),_0x2c5524,_0x7c63('0xe'),JSON[_0x7c63('0x11')](_0x56335e));if(_0x56335e[_0x7c63('0x12')]){if(_0x56335e['error'][_0x7c63('0x13')]===0x1f4){logger['error']('ChatApplication,\x20%s,\x20%s',_0x2c5524,_0x56335e[_0x7c63('0x12')][_0x7c63('0x14')]);return _0x202f4f(_0x56335e[_0x7c63('0x12')][_0x7c63('0x14')]);}logger[_0x7c63('0x12')](_0x7c63('0x15'),_0x2c5524,_0x56335e[_0x7c63('0x12')][_0x7c63('0x14')]);return _0x59c510(_0x56335e['error'][_0x7c63('0x14')]);}else{logger[_0x7c63('0xd')]('ChatApplication,\x20%s,\x20%s',_0x2c5524,_0x7c63('0xe'));_0x59c510(_0x56335e[_0x7c63('0x16')][_0x7c63('0x14')]);}})[_0x7c63('0x17')](function(_0xcf70fb){logger[_0x7c63('0x12')](_0x7c63('0x15'),_0x2c5524,_0xcf70fb);_0x202f4f(_0xcf70fb);});});}
\ No newline at end of file
diff --git a/server/api/chatApplication/index.js b/server/api/chatApplication/index.js
index 9b60555..6dc2371 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 _0x522e=['multer','util','path','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatApplication.controller','get','/:id','show','isAuthenticated','delete','destroy','exports'];(function(_0x1b794,_0x2ba0b1){var _0x5949cd=function(_0x257f39){while(--_0x257f39){_0x1b794['push'](_0x1b794['shift']());}};_0x5949cd(++_0x2ba0b1);}(_0x522e,0x120));var _0xe522=function(_0x5c6a8e,_0x51f16d){_0x5c6a8e=_0x5c6a8e-0x0;var _0x6d27de=_0x522e[_0x5c6a8e];return _0x6d27de;};'use strict';var multer=require(_0xe522('0x0'));var util=require(_0xe522('0x1'));var path=require(_0xe522('0x2'));var timeout=require('connect-timeout');var express=require(_0xe522('0x3'));var router=express['Router']();var fs_extra=require(_0xe522('0x4'));var auth=require(_0xe522('0x5'));var interaction=require(_0xe522('0x6'));var config=require(_0xe522('0x7'));var controller=require(_0xe522('0x8'));router[_0xe522('0x9')](_0xe522('0xa'),auth['isAuthenticated'](),controller[_0xe522('0xb')]);router['put'](_0xe522('0xa'),auth[_0xe522('0xc')](),controller['update']);router[_0xe522('0xd')](_0xe522('0xa'),auth['isAuthenticated'](),controller[_0xe522('0xe')]);module[_0xe522('0xf')]=router;
\ No newline at end of file
+var _0xfd68=['/:id','isAuthenticated','show','update','delete','destroy','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatApplication.controller'];(function(_0x1dd683,_0xc9b214){var _0xecc20d=function(_0x401877){while(--_0x401877){_0x1dd683['push'](_0x1dd683['shift']());}};_0xecc20d(++_0xc9b214);}(_0xfd68,0xa0));var _0x8fd6=function(_0x2a09ed,_0x4f8a4e){_0x2a09ed=_0x2a09ed-0x0;var _0x7d74b=_0xfd68[_0x2a09ed];return _0x7d74b;};'use strict';var multer=require(_0x8fd6('0x0'));var util=require(_0x8fd6('0x1'));var path=require('path');var timeout=require(_0x8fd6('0x2'));var express=require(_0x8fd6('0x3'));var router=express[_0x8fd6('0x4')]();var fs_extra=require(_0x8fd6('0x5'));var auth=require(_0x8fd6('0x6'));var interaction=require(_0x8fd6('0x7'));var config=require(_0x8fd6('0x8'));var controller=require(_0x8fd6('0x9'));router['get'](_0x8fd6('0xa'),auth[_0x8fd6('0xb')](),controller[_0x8fd6('0xc')]);router['put'](_0x8fd6('0xa'),auth[_0x8fd6('0xb')](),controller[_0x8fd6('0xd')]);router[_0x8fd6('0xe')](_0x8fd6('0xa'),auth[_0x8fd6('0xb')](),controller[_0x8fd6('0xf')]);module[_0x8fd6('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.attributes.js b/server/api/chatGroup/chatGroup.attributes.js
index fe65214..42346bd 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 _0xc12c=['STRING','BOOLEAN','sequelize','exports'];(function(_0x2150b7,_0x1b7bbb){var _0x5bd131=function(_0x4be2de){while(--_0x4be2de){_0x2150b7['push'](_0x2150b7['shift']());}};_0x5bd131(++_0x1b7bbb);}(_0xc12c,0x1ae));var _0xcc12=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0xc12c[_0x6c993a];return _0x27f547;};'use strict';var Sequelize=require(_0xcc12('0x0'));module[_0xcc12('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize[_0xcc12('0x2')]},'write':{'type':Sequelize[_0xcc12('0x3')],'defaultValue':!![]}};
\ No newline at end of file
+var _0xdf43=['sequelize','STRING','BOOLEAN'];(function(_0x3bdb0a,_0x147559){var _0x2766d1=function(_0x2a193b){while(--_0x2a193b){_0x3bdb0a['push'](_0x3bdb0a['shift']());}};_0x2766d1(++_0x147559);}(_0xdf43,0x6c));var _0x3df4=function(_0x4c440b,_0x3ea627){_0x4c440b=_0x4c440b-0x0;var _0x2d48cf=_0xdf43[_0x4c440b];return _0x2d48cf;};'use strict';var Sequelize=require(_0x3df4('0x0'));module['exports']={'name':{'type':Sequelize[_0x3df4('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x3df4('0x1')]},'write':{'type':Sequelize[_0x3df4('0x2')],'defaultValue':!![]}};
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.controller.js b/server/api/chatGroup/chatGroup.controller.js
index 990a192..85c0ece 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 _0x6551=['../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatGroup.socket','register','sendStatus','status','end','json','offset','undefined','limit','set','apply','save','update','then','error','name','send','index','map','ChatGroup','key','model','query','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filters','merge','VIRTUAL','filter','options','count','includeAll','include','findAll','catch','show','params','rawAttributes','keys','find','create','body','destroy','describe','getUnread','user','toInteger','addMembers','omit','ids','getMembers','findOne','User','pick','nolimit','removeMembers','ChatGroupId','ChatInternalMessage','getMessages','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','eml-format','zip-dir','bluebird','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs'];(function(_0x37fb9e,_0x3ce746){var _0x38a526=function(_0x327a02){while(--_0x327a02){_0x37fb9e['push'](_0x37fb9e['shift']());}};_0x38a526(++_0x3ce746);}(_0x6551,0x1e1));var _0x1655=function(_0x12a961,_0x566902){_0x12a961=_0x12a961-0x0;var _0x596299=_0x6551[_0x12a961];return _0x596299;};'use strict';var emlformat=require(_0x1655('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x1655('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x1655('0x2'));var Mustache=require(_0x1655('0x3'));var util=require(_0x1655('0x4'));var path=require(_0x1655('0x5'));var sox=require(_0x1655('0x6'));var csv=require('to-csv');var ejs=require(_0x1655('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x1655('0x8'));var squel=require(_0x1655('0x9'));var crypto=require(_0x1655('0xa'));var jsforce=require(_0x1655('0xb'));var deskjs=require(_0x1655('0xc'));var toCsv=require(_0x1655('0xd'));var querystring=require(_0x1655('0xe'));var Papa=require(_0x1655('0xf'));var Redis=require(_0x1655('0x10'));var authService=require(_0x1655('0x11'));var qs=require(_0x1655('0x12'));var as=require(_0x1655('0x13'));var hardwareService=require(_0x1655('0x14'));var logger=require(_0x1655('0x15'))(_0x1655('0x16'));var utils=require(_0x1655('0x17'));var config=require(_0x1655('0x18'));var licenseUtil=require(_0x1655('0x19'));var db=require(_0x1655('0x1a'))['db'];config[_0x1655('0x1b')]=_[_0x1655('0x1c')](config[_0x1655('0x1b')],{'host':_0x1655('0x1d'),'port':0x18eb});var socket=require(_0x1655('0x1e'))(new Redis(config[_0x1655('0x1b')]));require(_0x1655('0x1f'))[_0x1655('0x20')](socket);function respondWithStatusCode(_0x121ca9,_0x33b8bf){_0x33b8bf=_0x33b8bf||0xcc;return function(_0x322be8){if(_0x322be8){return _0x121ca9[_0x1655('0x21')](_0x33b8bf);}return _0x121ca9[_0x1655('0x22')](_0x33b8bf)[_0x1655('0x23')]();};}function respondWithResult(_0x1c4299,_0x29c4e6){_0x29c4e6=_0x29c4e6||0xc8;return function(_0x33b4eb){if(_0x33b4eb){return _0x1c4299[_0x1655('0x22')](_0x29c4e6)[_0x1655('0x24')](_0x33b4eb);}};}function respondWithFilteredResult(_0x14bec6,_0x1f8e41){return function(_0x33bfca){if(_0x33bfca){var _0x307dec=typeof _0x1f8e41[_0x1655('0x25')]===_0x1655('0x26')&&typeof _0x1f8e41[_0x1655('0x27')]===_0x1655('0x26');var _0x51db32=_0x33bfca['count'];var _0x56be3b=_0x307dec?0x0:_0x1f8e41[_0x1655('0x25')];var _0x23856b=_0x307dec?_0x33bfca['count']:_0x1f8e41['offset']+_0x1f8e41[_0x1655('0x27')];var _0x3d9ffc;if(_0x23856b>=_0x51db32){_0x23856b=_0x51db32;_0x3d9ffc=0xc8;}else{_0x3d9ffc=0xce;}_0x14bec6[_0x1655('0x22')](_0x3d9ffc);return _0x14bec6[_0x1655('0x28')]('Content-Range',_0x56be3b+'-'+_0x23856b+'/'+_0x51db32)['json'](_0x33bfca);}return null;};}function patchUpdates(_0x59bb09){return function(_0x140fb2){try{jsonpatch[_0x1655('0x29')](_0x140fb2,_0x59bb09,!![]);}catch(_0x17474e){return BPromise['reject'](_0x17474e);}return _0x140fb2[_0x1655('0x2a')]();};}function saveUpdates(_0x577e93,_0x1439a6){return function(_0x4abf54){if(_0x4abf54){return _0x4abf54[_0x1655('0x2b')](_0x577e93)[_0x1655('0x2c')](function(_0x5cb753){return _0x5cb753;});}return null;};}function removeEntity(_0x4280a7,_0x2bc51e){return function(_0x408e60){if(_0x408e60){return _0x408e60['destroy']()[_0x1655('0x2c')](function(){_0x4280a7[_0x1655('0x22')](0xcc)[_0x1655('0x23')]();});}};}function handleEntityNotFound(_0xe11a36,_0x43fe3f){return function(_0x201109){if(!_0x201109){_0xe11a36[_0x1655('0x21')](0x194);}return _0x201109;};}function handleError(_0x2cdcda,_0x1093bf){_0x1093bf=_0x1093bf||0x1f4;return function(_0xce9980){logger[_0x1655('0x2d')](_0xce9980['stack']);if(_0xce9980[_0x1655('0x2e')]){delete _0xce9980['name'];}_0x2cdcda['status'](_0x1093bf)[_0x1655('0x2f')](_0xce9980);};}exports[_0x1655('0x30')]=function(_0x3dd4dc,_0x5293d1){var _0x42364f={},_0x4edfbf={},_0x200abe={'count':0x0,'rows':[]};var _0x35f7f1=_[_0x1655('0x31')](db[_0x1655('0x32')]['rawAttributes'],function(_0x2bb85f){return{'name':_0x2bb85f['fieldName'],'type':_0x2bb85f['type'][_0x1655('0x33')]};});_0x4edfbf[_0x1655('0x34')]=_[_0x1655('0x31')](_0x35f7f1,_0x1655('0x2e'));_0x4edfbf[_0x1655('0x35')]=_['keys'](_0x3dd4dc[_0x1655('0x35')]);_0x4edfbf['filters']=_[_0x1655('0x36')](_0x4edfbf['model'],_0x4edfbf[_0x1655('0x35')]);_0x42364f[_0x1655('0x37')]=_['intersection'](_0x4edfbf[_0x1655('0x34')],qs[_0x1655('0x38')](_0x3dd4dc['query'][_0x1655('0x38')]));_0x42364f['attributes']=_0x42364f[_0x1655('0x37')][_0x1655('0x39')]?_0x42364f['attributes']:_0x4edfbf['model'];if(!_0x3dd4dc[_0x1655('0x35')][_0x1655('0x3a')]('nolimit')){_0x42364f[_0x1655('0x27')]=qs[_0x1655('0x27')](_0x3dd4dc[_0x1655('0x35')][_0x1655('0x27')]);_0x42364f[_0x1655('0x25')]=qs['offset'](_0x3dd4dc[_0x1655('0x35')][_0x1655('0x25')]);}_0x42364f[_0x1655('0x3b')]=qs[_0x1655('0x3c')](_0x3dd4dc[_0x1655('0x35')]['sort']);_0x42364f[_0x1655('0x3d')]=qs[_0x1655('0x3e')](_['pick'](_0x3dd4dc['query'],_0x4edfbf[_0x1655('0x3e')]),_0x35f7f1);if(_0x3dd4dc[_0x1655('0x35')]['filter']){_0x42364f[_0x1655('0x3d')]=_[_0x1655('0x3f')](_0x42364f[_0x1655('0x3d')],{'$or':_['map'](_0x35f7f1,function(_0x183e5c){if(_0x183e5c['type']!==_0x1655('0x40')){var _0x82a045={};_0x82a045[_0x183e5c[_0x1655('0x2e')]]={'$like':'%'+_0x3dd4dc[_0x1655('0x35')][_0x1655('0x41')]+'%'};return _0x82a045;}})});}_0x42364f=_[_0x1655('0x3f')]({},_0x42364f,_0x3dd4dc[_0x1655('0x42')]);var _0x3270dd={'where':_0x42364f[_0x1655('0x3d')]};return db[_0x1655('0x32')][_0x1655('0x43')](_0x3270dd)[_0x1655('0x2c')](function(_0x3f1de6){_0x200abe[_0x1655('0x43')]=_0x3f1de6;if(_0x3dd4dc[_0x1655('0x35')][_0x1655('0x44')]){_0x42364f[_0x1655('0x45')]=[{'all':!![]}];}return db[_0x1655('0x32')][_0x1655('0x46')](_0x42364f);})[_0x1655('0x2c')](function(_0x3a4b0e){_0x200abe['rows']=_0x3a4b0e;return _0x200abe;})['then'](respondWithFilteredResult(_0x5293d1,_0x42364f))[_0x1655('0x47')](handleError(_0x5293d1,null));};exports[_0x1655('0x48')]=function(_0x3a0e70,_0x387c3a){var _0xe3285e={'raw':!![],'where':{'id':_0x3a0e70[_0x1655('0x49')]['id']}},_0x4ce777={};_0x4ce777['model']=_['keys'](db[_0x1655('0x32')][_0x1655('0x4a')]);_0x4ce777[_0x1655('0x35')]=_[_0x1655('0x4b')](_0x3a0e70[_0x1655('0x35')]);_0x4ce777[_0x1655('0x3e')]=_[_0x1655('0x36')](_0x4ce777[_0x1655('0x34')],_0x4ce777[_0x1655('0x35')]);_0xe3285e[_0x1655('0x37')]=_[_0x1655('0x36')](_0x4ce777[_0x1655('0x34')],qs[_0x1655('0x38')](_0x3a0e70[_0x1655('0x35')][_0x1655('0x38')]));_0xe3285e[_0x1655('0x37')]=_0xe3285e['attributes']['length']?_0xe3285e[_0x1655('0x37')]:_0x4ce777[_0x1655('0x34')];if(_0x3a0e70[_0x1655('0x35')][_0x1655('0x44')]){_0xe3285e[_0x1655('0x45')]=[{'all':!![]}];}_0xe3285e=_[_0x1655('0x3f')]({},_0xe3285e,_0x3a0e70[_0x1655('0x42')]);return db[_0x1655('0x32')][_0x1655('0x4c')](_0xe3285e)[_0x1655('0x2c')](handleEntityNotFound(_0x387c3a,null))[_0x1655('0x2c')](respondWithResult(_0x387c3a,null))[_0x1655('0x47')](handleError(_0x387c3a,null));};exports[_0x1655('0x4d')]=function(_0x41c18c,_0x4dcdcb){return db[_0x1655('0x32')][_0x1655('0x4d')](_0x41c18c[_0x1655('0x4e')],{})['then'](respondWithResult(_0x4dcdcb,0xc9))[_0x1655('0x47')](handleError(_0x4dcdcb,null));};exports[_0x1655('0x2b')]=function(_0x35daec,_0x54bf73){if(_0x35daec[_0x1655('0x4e')]['id']){delete _0x35daec['body']['id'];}return db[_0x1655('0x32')][_0x1655('0x4c')]({'where':{'id':_0x35daec['params']['id']}})[_0x1655('0x2c')](handleEntityNotFound(_0x54bf73,null))[_0x1655('0x2c')](saveUpdates(_0x35daec[_0x1655('0x4e')],null))['then'](respondWithResult(_0x54bf73,null))[_0x1655('0x47')](handleError(_0x54bf73,null));};exports[_0x1655('0x4f')]=function(_0x272792,_0x131b66){return db[_0x1655('0x32')]['find']({'where':{'id':_0x272792['params']['id']}})[_0x1655('0x2c')](handleEntityNotFound(_0x131b66,null))['then'](removeEntity(_0x131b66,null))[_0x1655('0x47')](handleError(_0x131b66,null));};exports['describe']=function(_0x1485f6,_0x1b0e31){return db[_0x1655('0x32')][_0x1655('0x50')]()[_0x1655('0x2c')](respondWithResult(_0x1b0e31,null))[_0x1655('0x47')](handleError(_0x1b0e31,null));};exports[_0x1655('0x51')]=function(_0x331606,_0x3f28ee,_0x3635ea){return db['ChatInternalMessage']['count']({'where':{'ChatGroupId':_0x331606[_0x1655('0x49')]['id'],'ToId':_0x331606[_0x1655('0x52')]['id'],'read':![]}})[_0x1655('0x2c')](function(_0x11178c){return{'id':_[_0x1655('0x53')](_0x331606[_0x1655('0x49')]['id']),'count':_0x11178c};})[_0x1655('0x2c')](respondWithResult(_0x3f28ee,null))[_0x1655('0x47')](handleError(_0x3f28ee,null));};exports['addMembers']=function(_0xe5b627,_0x5f1c10,_0x3ed3d6){return db[_0x1655('0x32')][_0x1655('0x4c')]({'where':{'id':_0xe5b627[_0x1655('0x49')]['id']}})[_0x1655('0x2c')](handleEntityNotFound(_0x5f1c10,null))[_0x1655('0x2c')](function(_0x4425e2){if(_0x4425e2){return _0x4425e2[_0x1655('0x54')](_0xe5b627[_0x1655('0x4e')]['ids'],_[_0x1655('0x55')](_0xe5b627[_0x1655('0x4e')],[_0x1655('0x56'),'id'])||{});}})[_0x1655('0x2c')](respondWithResult(_0x5f1c10,null))[_0x1655('0x47')](handleError(_0x5f1c10,null));};exports[_0x1655('0x57')]=function(_0xdf2242,_0x17b4df,_0x62b55c){var _0x278f37={};var _0x10c9aa={};var _0x199eef;var _0x600ace;return db[_0x1655('0x32')][_0x1655('0x58')]({'where':{'id':_0xdf2242[_0x1655('0x49')]['id']}})['then'](handleEntityNotFound(_0x17b4df,null))[_0x1655('0x2c')](function(_0x521912){if(_0x521912){_0x199eef=_0x521912;_0x10c9aa[_0x1655('0x34')]=_[_0x1655('0x4b')](db[_0x1655('0x59')][_0x1655('0x4a')]);_0x10c9aa['query']=_[_0x1655('0x4b')](_0xdf2242['query']);_0x10c9aa[_0x1655('0x3e')]=_[_0x1655('0x36')](_0x10c9aa[_0x1655('0x34')],_0x10c9aa[_0x1655('0x35')]);_0x278f37['attributes']=_[_0x1655('0x36')](_0x10c9aa['model'],qs[_0x1655('0x38')](_0xdf2242[_0x1655('0x35')][_0x1655('0x38')]));_0x278f37[_0x1655('0x37')]=_0x278f37[_0x1655('0x37')][_0x1655('0x39')]?_0x278f37[_0x1655('0x37')]:_0x10c9aa['model'];_0x278f37[_0x1655('0x3b')]=qs[_0x1655('0x3c')](_0xdf2242['query']['sort']);_0x278f37[_0x1655('0x3d')]=qs[_0x1655('0x3e')](_[_0x1655('0x5a')](_0xdf2242[_0x1655('0x35')],_0x10c9aa[_0x1655('0x3e')]));if(_0xdf2242[_0x1655('0x35')][_0x1655('0x41')]){_0x278f37['where']=_[_0x1655('0x3f')](_0x278f37[_0x1655('0x3d')],{'$or':_[_0x1655('0x31')](_0x278f37[_0x1655('0x37')],function(_0xe692d9){var _0x325a8e={};_0x325a8e[_0xe692d9]={'$like':'%'+_0xdf2242[_0x1655('0x35')][_0x1655('0x41')]+'%'};return _0x325a8e;})});}_0x278f37=_['merge']({},_0x278f37,_0xdf2242[_0x1655('0x42')]);return _0x199eef[_0x1655('0x57')](_0x278f37);}})[_0x1655('0x2c')](function(_0xc6978){if(_0xc6978){_0x600ace=_0xc6978[_0x1655('0x39')];if(!_0xdf2242['query']['hasOwnProperty'](_0x1655('0x5b'))){_0x278f37[_0x1655('0x27')]=qs['limit'](_0xdf2242[_0x1655('0x35')]['limit']);_0x278f37['offset']=qs['offset'](_0xdf2242[_0x1655('0x35')]['offset']);}return _0x199eef[_0x1655('0x57')](_0x278f37);}})['then'](function(_0x19df1f){if(_0x19df1f){return _0x19df1f?{'count':_0x600ace,'rows':_0x19df1f}:null;}})[_0x1655('0x2c')](respondWithResult(_0x17b4df,null))[_0x1655('0x47')](handleError(_0x17b4df,null));};exports[_0x1655('0x5c')]=function(_0x181eab,_0x777fad,_0x2ca49a){return db[_0x1655('0x32')][_0x1655('0x4c')]({'where':{'id':_0x181eab[_0x1655('0x49')]['id']}})['then'](handleEntityNotFound(_0x777fad,null))[_0x1655('0x2c')](function(_0x530ddb){if(_0x530ddb){return _0x530ddb[_0x1655('0x5c')](_0x181eab['query'][_0x1655('0x56')]);}})['then'](respondWithStatusCode(_0x777fad,null))[_0x1655('0x47')](handleError(_0x777fad,null));};exports['addMessage']=function(_0x2d6ad9,_0x5449e3,_0x3f960c){if(_0x2d6ad9[_0x1655('0x4e')]['id']){delete _0x2d6ad9[_0x1655('0x4e')]['id'];}return db[_0x1655('0x32')]['find']({'where':{'id':_0x2d6ad9[_0x1655('0x49')]['id']}})[_0x1655('0x2c')](handleEntityNotFound(_0x5449e3,null))[_0x1655('0x2c')](function(_0x1341d5){if(_0x1341d5){_0x2d6ad9[_0x1655('0x4e')][_0x1655('0x5d')]=_0x1341d5['id'];return db[_0x1655('0x5e')]['create'](_0x2d6ad9[_0x1655('0x4e')]);}})['then'](respondWithResult(_0x5449e3,null))[_0x1655('0x47')](handleError(_0x5449e3,null));};exports[_0x1655('0x5f')]=function(_0x5c4af6,_0x55b373,_0xf54a3d){var _0x220007={};var _0x35b0a9={};var _0x366288;var _0x2ff06a;return db[_0x1655('0x32')][_0x1655('0x58')]({'where':{'id':_0x5c4af6['params']['id']}})[_0x1655('0x2c')](handleEntityNotFound(_0x55b373,null))[_0x1655('0x2c')](function(_0x51422e){if(_0x51422e){_0x366288=_0x51422e;_0x35b0a9[_0x1655('0x34')]=_[_0x1655('0x4b')](db[_0x1655('0x5e')]['rawAttributes']);_0x35b0a9[_0x1655('0x35')]=_[_0x1655('0x4b')](_0x5c4af6[_0x1655('0x35')]);_0x35b0a9[_0x1655('0x3e')]=_[_0x1655('0x36')](_0x35b0a9[_0x1655('0x34')],_0x35b0a9[_0x1655('0x35')]);_0x220007[_0x1655('0x37')]=_[_0x1655('0x36')](_0x35b0a9[_0x1655('0x34')],qs['fields'](_0x5c4af6[_0x1655('0x35')][_0x1655('0x38')]));_0x220007['attributes']=_0x220007[_0x1655('0x37')][_0x1655('0x39')]?_0x220007[_0x1655('0x37')]:_0x35b0a9['model'];_0x220007[_0x1655('0x3b')]=qs['sort'](_0x5c4af6[_0x1655('0x35')][_0x1655('0x3c')]);_0x220007['where']=qs[_0x1655('0x3e')](_['pick'](_0x5c4af6['query'],_0x35b0a9[_0x1655('0x3e')]));if(_0x5c4af6[_0x1655('0x35')]['filter']){_0x220007['where']=_[_0x1655('0x3f')](_0x220007[_0x1655('0x3d')],{'$or':_[_0x1655('0x31')](_0x220007[_0x1655('0x37')],function(_0xa577f3){var _0x1ce8b3={};_0x1ce8b3[_0xa577f3]={'$like':'%'+_0x5c4af6['query']['filter']+'%'};return _0x1ce8b3;})});}if(_0x5c4af6[_0x1655('0x35')][_0x1655('0x60')]){var _0x2d8dd8=_0x5c4af6[_0x1655('0x35')]['$gte'][_0x1655('0x61')](',');var _0x1d5e6e={};_0x1d5e6e[_0x2d8dd8[0x0]]={'$gte':moment(_0x2d8dd8[0x1])[_0x1655('0x62')](_0x1655('0x63'))};_0x220007[_0x1655('0x3d')]=_['merge'](_0x220007[_0x1655('0x3d')],_0x1d5e6e);}_0x220007=_[_0x1655('0x3f')]({},_0x220007,_0x5c4af6[_0x1655('0x42')]);return _0x366288[_0x1655('0x5f')](_0x220007);}})[_0x1655('0x2c')](function(_0x583f65){if(_0x583f65){_0x2ff06a=_0x583f65[_0x1655('0x39')];if(!_0x5c4af6[_0x1655('0x35')][_0x1655('0x3a')](_0x1655('0x5b'))){_0x220007[_0x1655('0x27')]=qs[_0x1655('0x27')](_0x5c4af6[_0x1655('0x35')][_0x1655('0x27')]);_0x220007[_0x1655('0x25')]=qs['offset'](_0x5c4af6[_0x1655('0x35')][_0x1655('0x25')]);}return _0x366288[_0x1655('0x5f')](_0x220007);}})[_0x1655('0x2c')](function(_0x45aca6){if(_0x45aca6){return _0x45aca6?{'count':_0x2ff06a,'rows':_0x45aca6}:null;}})[_0x1655('0x2c')](respondWithResult(_0x55b373,null))[_0x1655('0x47')](handleError(_0x55b373,null));};
\ No newline at end of file
+var _0x11ed=['error','stack','name','send','index','map','ChatGroup','rawAttributes','fieldName','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','options','include','findAll','catch','show','params','find','create','body','destroy','describe','getUnread','ChatInternalMessage','toInteger','addMembers','ids','omit','findOne','getMembers','removeMembers','addMessage','ChatGroupId','getMessages','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','fs-extra','squel','crypto','jsforce','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','redis','defaults','socket.io-emitter','./chatGroup.socket','register','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','reject','save','update','then'];(function(_0x1ec55e,_0x14410a){var _0x3384a5=function(_0x23529c){while(--_0x23529c){_0x1ec55e['push'](_0x1ec55e['shift']());}};_0x3384a5(++_0x14410a);}(_0x11ed,0x1a2));var _0xd11e=function(_0x1a867e,_0x13c03d){_0x1a867e=_0x1a867e-0x0;var _0x782184=_0x11ed[_0x1a867e];return _0x782184;};'use strict';var emlformat=require(_0xd11e('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xd11e('0x1'));var jsonpatch=require(_0xd11e('0x2'));var rp=require(_0xd11e('0x3'));var moment=require(_0xd11e('0x4'));var BPromise=require(_0xd11e('0x5'));var Mustache=require(_0xd11e('0x6'));var util=require(_0xd11e('0x7'));var path=require('path');var sox=require(_0xd11e('0x8'));var csv=require(_0xd11e('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xd11e('0xa'));var _=require('lodash');var squel=require(_0xd11e('0xb'));var crypto=require(_0xd11e('0xc'));var jsforce=require(_0xd11e('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xd11e('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xd11e('0xe'))(_0xd11e('0xf'));var utils=require(_0xd11e('0x10'));var config=require(_0xd11e('0x11'));var licenseUtil=require(_0xd11e('0x12'));var db=require('../../mysqldb')['db'];config[_0xd11e('0x13')]=_[_0xd11e('0x14')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xd11e('0x15'))(new Redis(config['redis']));require(_0xd11e('0x16'))[_0xd11e('0x17')](socket);function respondWithStatusCode(_0x552163,_0x17e393){_0x17e393=_0x17e393||0xcc;return function(_0x4699e8){if(_0x4699e8){return _0x552163[_0xd11e('0x18')](_0x17e393);}return _0x552163[_0xd11e('0x19')](_0x17e393)['end']();};}function respondWithResult(_0x42e15e,_0x1eb491){_0x1eb491=_0x1eb491||0xc8;return function(_0x5d59d2){if(_0x5d59d2){return _0x42e15e['status'](_0x1eb491)[_0xd11e('0x1a')](_0x5d59d2);}};}function respondWithFilteredResult(_0x2ac91a,_0x4623d1){return function(_0x3676f9){if(_0x3676f9){var _0x4cd758=typeof _0x4623d1[_0xd11e('0x1b')]===_0xd11e('0x1c')&&typeof _0x4623d1[_0xd11e('0x1d')]===_0xd11e('0x1c');var _0xce2cbd=_0x3676f9['count'];var _0x1cc8b9=_0x4cd758?0x0:_0x4623d1[_0xd11e('0x1b')];var _0x59c0e8=_0x4cd758?_0x3676f9[_0xd11e('0x1e')]:_0x4623d1[_0xd11e('0x1b')]+_0x4623d1['limit'];var _0x2c6923;if(_0x59c0e8>=_0xce2cbd){_0x59c0e8=_0xce2cbd;_0x2c6923=0xc8;}else{_0x2c6923=0xce;}_0x2ac91a['status'](_0x2c6923);return _0x2ac91a[_0xd11e('0x1f')](_0xd11e('0x20'),_0x1cc8b9+'-'+_0x59c0e8+'/'+_0xce2cbd)[_0xd11e('0x1a')](_0x3676f9);}return null;};}function patchUpdates(_0x55c603){return function(_0x3cf461){try{jsonpatch['apply'](_0x3cf461,_0x55c603,!![]);}catch(_0x5d14c0){return BPromise[_0xd11e('0x21')](_0x5d14c0);}return _0x3cf461[_0xd11e('0x22')]();};}function saveUpdates(_0x184162,_0x431a76){return function(_0x118604){if(_0x118604){return _0x118604[_0xd11e('0x23')](_0x184162)[_0xd11e('0x24')](function(_0x4d5127){return _0x4d5127;});}return null;};}function removeEntity(_0xfd9c50,_0x441b41){return function(_0x2acec7){if(_0x2acec7){return _0x2acec7['destroy']()[_0xd11e('0x24')](function(){_0xfd9c50[_0xd11e('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3c950c,_0x5e050e){return function(_0xb95220){if(!_0xb95220){_0x3c950c[_0xd11e('0x18')](0x194);}return _0xb95220;};}function handleError(_0x2abf69,_0x1ffe7d){_0x1ffe7d=_0x1ffe7d||0x1f4;return function(_0x479bb9){logger[_0xd11e('0x25')](_0x479bb9[_0xd11e('0x26')]);if(_0x479bb9[_0xd11e('0x27')]){delete _0x479bb9[_0xd11e('0x27')];}_0x2abf69[_0xd11e('0x19')](_0x1ffe7d)[_0xd11e('0x28')](_0x479bb9);};}exports[_0xd11e('0x29')]=function(_0x1e5506,_0x34f3bb){var _0x395a58={},_0x361c47={},_0x2413a5={'count':0x0,'rows':[]};var _0x24d299=_[_0xd11e('0x2a')](db[_0xd11e('0x2b')][_0xd11e('0x2c')],function(_0x31b513){return{'name':_0x31b513[_0xd11e('0x2d')],'type':_0x31b513['type'][_0xd11e('0x2e')]};});_0x361c47[_0xd11e('0x2f')]=_['map'](_0x24d299,_0xd11e('0x27'));_0x361c47[_0xd11e('0x30')]=_[_0xd11e('0x31')](_0x1e5506['query']);_0x361c47[_0xd11e('0x32')]=_[_0xd11e('0x33')](_0x361c47['model'],_0x361c47['query']);_0x395a58['attributes']=_[_0xd11e('0x33')](_0x361c47['model'],qs[_0xd11e('0x34')](_0x1e5506[_0xd11e('0x30')]['fields']));_0x395a58[_0xd11e('0x35')]=_0x395a58[_0xd11e('0x35')][_0xd11e('0x36')]?_0x395a58[_0xd11e('0x35')]:_0x361c47[_0xd11e('0x2f')];if(!_0x1e5506[_0xd11e('0x30')][_0xd11e('0x37')](_0xd11e('0x38'))){_0x395a58[_0xd11e('0x1d')]=qs[_0xd11e('0x1d')](_0x1e5506['query'][_0xd11e('0x1d')]);_0x395a58[_0xd11e('0x1b')]=qs[_0xd11e('0x1b')](_0x1e5506['query']['offset']);}_0x395a58[_0xd11e('0x39')]=qs[_0xd11e('0x3a')](_0x1e5506[_0xd11e('0x30')][_0xd11e('0x3a')]);_0x395a58[_0xd11e('0x3b')]=qs['filters'](_[_0xd11e('0x3c')](_0x1e5506[_0xd11e('0x30')],_0x361c47['filters']),_0x24d299);if(_0x1e5506['query']['filter']){_0x395a58[_0xd11e('0x3b')]=_[_0xd11e('0x3d')](_0x395a58['where'],{'$or':_[_0xd11e('0x2a')](_0x24d299,function(_0x54c5f0){if(_0x54c5f0['type']!==_0xd11e('0x3e')){var _0x251b00={};_0x251b00[_0x54c5f0['name']]={'$like':'%'+_0x1e5506[_0xd11e('0x30')][_0xd11e('0x3f')]+'%'};return _0x251b00;}})});}_0x395a58=_['merge']({},_0x395a58,_0x1e5506[_0xd11e('0x40')]);var _0x5b3762={'where':_0x395a58[_0xd11e('0x3b')]};return db['ChatGroup'][_0xd11e('0x1e')](_0x5b3762)['then'](function(_0x1712ee){_0x2413a5[_0xd11e('0x1e')]=_0x1712ee;if(_0x1e5506[_0xd11e('0x30')]['includeAll']){_0x395a58[_0xd11e('0x41')]=[{'all':!![]}];}return db[_0xd11e('0x2b')][_0xd11e('0x42')](_0x395a58);})[_0xd11e('0x24')](function(_0x37cf1a){_0x2413a5['rows']=_0x37cf1a;return _0x2413a5;})[_0xd11e('0x24')](respondWithFilteredResult(_0x34f3bb,_0x395a58))[_0xd11e('0x43')](handleError(_0x34f3bb,null));};exports[_0xd11e('0x44')]=function(_0x1e4412,_0x5eba69){var _0x4249fc={'raw':!![],'where':{'id':_0x1e4412[_0xd11e('0x45')]['id']}},_0x1208dd={};_0x1208dd[_0xd11e('0x2f')]=_[_0xd11e('0x31')](db[_0xd11e('0x2b')][_0xd11e('0x2c')]);_0x1208dd['query']=_[_0xd11e('0x31')](_0x1e4412['query']);_0x1208dd['filters']=_[_0xd11e('0x33')](_0x1208dd[_0xd11e('0x2f')],_0x1208dd[_0xd11e('0x30')]);_0x4249fc[_0xd11e('0x35')]=_[_0xd11e('0x33')](_0x1208dd[_0xd11e('0x2f')],qs[_0xd11e('0x34')](_0x1e4412['query'][_0xd11e('0x34')]));_0x4249fc[_0xd11e('0x35')]=_0x4249fc[_0xd11e('0x35')][_0xd11e('0x36')]?_0x4249fc['attributes']:_0x1208dd[_0xd11e('0x2f')];if(_0x1e4412[_0xd11e('0x30')]['includeAll']){_0x4249fc[_0xd11e('0x41')]=[{'all':!![]}];}_0x4249fc=_[_0xd11e('0x3d')]({},_0x4249fc,_0x1e4412[_0xd11e('0x40')]);return db[_0xd11e('0x2b')][_0xd11e('0x46')](_0x4249fc)[_0xd11e('0x24')](handleEntityNotFound(_0x5eba69,null))['then'](respondWithResult(_0x5eba69,null))[_0xd11e('0x43')](handleError(_0x5eba69,null));};exports[_0xd11e('0x47')]=function(_0xb55735,_0xd412f3){return db[_0xd11e('0x2b')][_0xd11e('0x47')](_0xb55735['body'],{})[_0xd11e('0x24')](respondWithResult(_0xd412f3,0xc9))[_0xd11e('0x43')](handleError(_0xd412f3,null));};exports['update']=function(_0x114d37,_0x14c34e){if(_0x114d37[_0xd11e('0x48')]['id']){delete _0x114d37[_0xd11e('0x48')]['id'];}return db[_0xd11e('0x2b')][_0xd11e('0x46')]({'where':{'id':_0x114d37[_0xd11e('0x45')]['id']}})[_0xd11e('0x24')](handleEntityNotFound(_0x14c34e,null))[_0xd11e('0x24')](saveUpdates(_0x114d37[_0xd11e('0x48')],null))[_0xd11e('0x24')](respondWithResult(_0x14c34e,null))['catch'](handleError(_0x14c34e,null));};exports[_0xd11e('0x49')]=function(_0x57b6b2,_0x24264d){return db[_0xd11e('0x2b')][_0xd11e('0x46')]({'where':{'id':_0x57b6b2[_0xd11e('0x45')]['id']}})['then'](handleEntityNotFound(_0x24264d,null))[_0xd11e('0x24')](removeEntity(_0x24264d,null))[_0xd11e('0x43')](handleError(_0x24264d,null));};exports[_0xd11e('0x4a')]=function(_0x202944,_0x4ad9bc){return db[_0xd11e('0x2b')][_0xd11e('0x4a')]()[_0xd11e('0x24')](respondWithResult(_0x4ad9bc,null))[_0xd11e('0x43')](handleError(_0x4ad9bc,null));};exports[_0xd11e('0x4b')]=function(_0x4304c7,_0x1a45b3,_0x5650d9){return db[_0xd11e('0x4c')]['count']({'where':{'ChatGroupId':_0x4304c7[_0xd11e('0x45')]['id'],'ToId':_0x4304c7['user']['id'],'read':![]}})[_0xd11e('0x24')](function(_0x1d2b2b){return{'id':_[_0xd11e('0x4d')](_0x4304c7[_0xd11e('0x45')]['id']),'count':_0x1d2b2b};})[_0xd11e('0x24')](respondWithResult(_0x1a45b3,null))[_0xd11e('0x43')](handleError(_0x1a45b3,null));};exports[_0xd11e('0x4e')]=function(_0x5518cc,_0x5bd791,_0x57e168){return db['ChatGroup'][_0xd11e('0x46')]({'where':{'id':_0x5518cc[_0xd11e('0x45')]['id']}})[_0xd11e('0x24')](handleEntityNotFound(_0x5bd791,null))['then'](function(_0x521d){if(_0x521d){return _0x521d[_0xd11e('0x4e')](_0x5518cc[_0xd11e('0x48')][_0xd11e('0x4f')],_[_0xd11e('0x50')](_0x5518cc[_0xd11e('0x48')],[_0xd11e('0x4f'),'id'])||{});}})[_0xd11e('0x24')](respondWithResult(_0x5bd791,null))[_0xd11e('0x43')](handleError(_0x5bd791,null));};exports['getMembers']=function(_0x1c767a,_0x4cca57,_0x186f6f){var _0x5a5193={};var _0x502e8c={};var _0x37b98f;var _0x8f96e7;return db[_0xd11e('0x2b')][_0xd11e('0x51')]({'where':{'id':_0x1c767a[_0xd11e('0x45')]['id']}})[_0xd11e('0x24')](handleEntityNotFound(_0x4cca57,null))[_0xd11e('0x24')](function(_0x5f4cef){if(_0x5f4cef){_0x37b98f=_0x5f4cef;_0x502e8c[_0xd11e('0x2f')]=_[_0xd11e('0x31')](db['User'][_0xd11e('0x2c')]);_0x502e8c[_0xd11e('0x30')]=_[_0xd11e('0x31')](_0x1c767a[_0xd11e('0x30')]);_0x502e8c[_0xd11e('0x32')]=_['intersection'](_0x502e8c[_0xd11e('0x2f')],_0x502e8c['query']);_0x5a5193['attributes']=_[_0xd11e('0x33')](_0x502e8c['model'],qs[_0xd11e('0x34')](_0x1c767a['query'][_0xd11e('0x34')]));_0x5a5193[_0xd11e('0x35')]=_0x5a5193[_0xd11e('0x35')][_0xd11e('0x36')]?_0x5a5193[_0xd11e('0x35')]:_0x502e8c[_0xd11e('0x2f')];_0x5a5193['order']=qs['sort'](_0x1c767a[_0xd11e('0x30')][_0xd11e('0x3a')]);_0x5a5193[_0xd11e('0x3b')]=qs['filters'](_['pick'](_0x1c767a[_0xd11e('0x30')],_0x502e8c['filters']));if(_0x1c767a[_0xd11e('0x30')]['filter']){_0x5a5193['where']=_[_0xd11e('0x3d')](_0x5a5193[_0xd11e('0x3b')],{'$or':_['map'](_0x5a5193[_0xd11e('0x35')],function(_0x3cad6b){var _0x1c680b={};_0x1c680b[_0x3cad6b]={'$like':'%'+_0x1c767a[_0xd11e('0x30')][_0xd11e('0x3f')]+'%'};return _0x1c680b;})});}_0x5a5193=_[_0xd11e('0x3d')]({},_0x5a5193,_0x1c767a[_0xd11e('0x40')]);return _0x37b98f[_0xd11e('0x52')](_0x5a5193);}})['then'](function(_0x41e8ec){if(_0x41e8ec){_0x8f96e7=_0x41e8ec[_0xd11e('0x36')];if(!_0x1c767a[_0xd11e('0x30')]['hasOwnProperty'](_0xd11e('0x38'))){_0x5a5193['limit']=qs['limit'](_0x1c767a['query']['limit']);_0x5a5193[_0xd11e('0x1b')]=qs[_0xd11e('0x1b')](_0x1c767a[_0xd11e('0x30')][_0xd11e('0x1b')]);}return _0x37b98f[_0xd11e('0x52')](_0x5a5193);}})[_0xd11e('0x24')](function(_0x1ae67c){if(_0x1ae67c){return _0x1ae67c?{'count':_0x8f96e7,'rows':_0x1ae67c}:null;}})['then'](respondWithResult(_0x4cca57,null))['catch'](handleError(_0x4cca57,null));};exports[_0xd11e('0x53')]=function(_0x1bd505,_0x6429e9,_0x5b3f33){return db[_0xd11e('0x2b')][_0xd11e('0x46')]({'where':{'id':_0x1bd505['params']['id']}})[_0xd11e('0x24')](handleEntityNotFound(_0x6429e9,null))[_0xd11e('0x24')](function(_0x34f52f){if(_0x34f52f){return _0x34f52f[_0xd11e('0x53')](_0x1bd505[_0xd11e('0x30')]['ids']);}})[_0xd11e('0x24')](respondWithStatusCode(_0x6429e9,null))[_0xd11e('0x43')](handleError(_0x6429e9,null));};exports[_0xd11e('0x54')]=function(_0x1962d1,_0x7cbaf2,_0x1b69bb){if(_0x1962d1[_0xd11e('0x48')]['id']){delete _0x1962d1[_0xd11e('0x48')]['id'];}return db[_0xd11e('0x2b')]['find']({'where':{'id':_0x1962d1[_0xd11e('0x45')]['id']}})[_0xd11e('0x24')](handleEntityNotFound(_0x7cbaf2,null))['then'](function(_0x3438d0){if(_0x3438d0){_0x1962d1['body'][_0xd11e('0x55')]=_0x3438d0['id'];return db[_0xd11e('0x4c')][_0xd11e('0x47')](_0x1962d1[_0xd11e('0x48')]);}})['then'](respondWithResult(_0x7cbaf2,null))[_0xd11e('0x43')](handleError(_0x7cbaf2,null));};exports[_0xd11e('0x56')]=function(_0x38122e,_0xabe47f,_0x312495){var _0x3197ab={};var _0x19321e={};var _0x3bde31;var _0x1cb8b5;return db[_0xd11e('0x2b')][_0xd11e('0x51')]({'where':{'id':_0x38122e[_0xd11e('0x45')]['id']}})['then'](handleEntityNotFound(_0xabe47f,null))[_0xd11e('0x24')](function(_0x2c1d50){if(_0x2c1d50){_0x3bde31=_0x2c1d50;_0x19321e[_0xd11e('0x2f')]=_[_0xd11e('0x31')](db[_0xd11e('0x4c')][_0xd11e('0x2c')]);_0x19321e['query']=_[_0xd11e('0x31')](_0x38122e[_0xd11e('0x30')]);_0x19321e[_0xd11e('0x32')]=_[_0xd11e('0x33')](_0x19321e[_0xd11e('0x2f')],_0x19321e[_0xd11e('0x30')]);_0x3197ab[_0xd11e('0x35')]=_[_0xd11e('0x33')](_0x19321e[_0xd11e('0x2f')],qs[_0xd11e('0x34')](_0x38122e[_0xd11e('0x30')][_0xd11e('0x34')]));_0x3197ab[_0xd11e('0x35')]=_0x3197ab[_0xd11e('0x35')][_0xd11e('0x36')]?_0x3197ab[_0xd11e('0x35')]:_0x19321e[_0xd11e('0x2f')];_0x3197ab[_0xd11e('0x39')]=qs[_0xd11e('0x3a')](_0x38122e[_0xd11e('0x30')][_0xd11e('0x3a')]);_0x3197ab[_0xd11e('0x3b')]=qs[_0xd11e('0x32')](_[_0xd11e('0x3c')](_0x38122e[_0xd11e('0x30')],_0x19321e[_0xd11e('0x32')]));if(_0x38122e['query'][_0xd11e('0x3f')]){_0x3197ab[_0xd11e('0x3b')]=_[_0xd11e('0x3d')](_0x3197ab[_0xd11e('0x3b')],{'$or':_[_0xd11e('0x2a')](_0x3197ab[_0xd11e('0x35')],function(_0xd41faf){var _0x417665={};_0x417665[_0xd41faf]={'$like':'%'+_0x38122e[_0xd11e('0x30')]['filter']+'%'};return _0x417665;})});}if(_0x38122e[_0xd11e('0x30')]['$gte']){var _0x116cd5=_0x38122e[_0xd11e('0x30')][_0xd11e('0x57')][_0xd11e('0x58')](',');var _0x5a239f={};_0x5a239f[_0x116cd5[0x0]]={'$gte':moment(_0x116cd5[0x1])[_0xd11e('0x59')](_0xd11e('0x5a'))};_0x3197ab[_0xd11e('0x3b')]=_[_0xd11e('0x3d')](_0x3197ab[_0xd11e('0x3b')],_0x5a239f);}_0x3197ab=_['merge']({},_0x3197ab,_0x38122e[_0xd11e('0x40')]);return _0x3bde31[_0xd11e('0x56')](_0x3197ab);}})[_0xd11e('0x24')](function(_0x2a687e){if(_0x2a687e){_0x1cb8b5=_0x2a687e[_0xd11e('0x36')];if(!_0x38122e[_0xd11e('0x30')]['hasOwnProperty']('nolimit')){_0x3197ab[_0xd11e('0x1d')]=qs[_0xd11e('0x1d')](_0x38122e[_0xd11e('0x30')]['limit']);_0x3197ab[_0xd11e('0x1b')]=qs[_0xd11e('0x1b')](_0x38122e[_0xd11e('0x30')][_0xd11e('0x1b')]);}return _0x3bde31[_0xd11e('0x56')](_0x3197ab);}})['then'](function(_0x11bc4d){if(_0x11bc4d){return _0x11bc4d?{'count':_0x1cb8b5,'rows':_0x11bc4d}:null;}})['then'](respondWithResult(_0xabe47f,null))[_0xd11e('0x43')](handleError(_0xabe47f,null));};
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.events.js b/server/api/chatGroup/chatGroup.events.js
index cc8e231..b9ca5ec 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 _0x6239=['events','../../mysqldb','ChatGroup','save','update','remove','emit','hasOwnProperty','exports'];(function(_0x3263aa,_0xa9ae7b){var _0x2184a9=function(_0x4baca1){while(--_0x4baca1){_0x3263aa['push'](_0x3263aa['shift']());}};_0x2184a9(++_0xa9ae7b);}(_0x6239,0x144));var _0x9623=function(_0x230115,_0x522113){_0x230115=_0x230115-0x0;var _0x48de38=_0x6239[_0x230115];return _0x48de38;};'use strict';var EventEmitter=require(_0x9623('0x0'));var ChatGroup=require(_0x9623('0x1'))['db'][_0x9623('0x2')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x9623('0x3'),'afterUpdate':_0x9623('0x4'),'afterDestroy':_0x9623('0x5')};function emitEvent(_0x1a6015){return function(_0x1688cf,_0x24d85b,_0xd052a2){ChatGroupEvents[_0x9623('0x6')](_0x1a6015+':'+_0x1688cf['id'],_0x1688cf);ChatGroupEvents[_0x9623('0x6')](_0x1a6015,_0x1688cf);_0xd052a2(null);};}for(var e in events){if(events[_0x9623('0x7')](e)){var event=events[e];ChatGroup['hook'](e,emitEvent(event));}}module[_0x9623('0x8')]=ChatGroupEvents;
\ No newline at end of file
+var _0x4429=['../../mysqldb','ChatGroup','setMaxListeners','save','remove','hasOwnProperty','hook'];(function(_0x32b578,_0xb23d40){var _0x4e3ee0=function(_0x2d2694){while(--_0x2d2694){_0x32b578['push'](_0x32b578['shift']());}};_0x4e3ee0(++_0xb23d40);}(_0x4429,0x1ce));var _0x9442=function(_0x4709af,_0x46c90c){_0x4709af=_0x4709af-0x0;var _0x525764=_0x4429[_0x4709af];return _0x525764;};'use strict';var EventEmitter=require('events');var ChatGroup=require(_0x9442('0x0'))['db'][_0x9442('0x1')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0x9442('0x2')](0x0);var events={'afterCreate':_0x9442('0x3'),'afterUpdate':'update','afterDestroy':_0x9442('0x4')};function emitEvent(_0x3e7395){return function(_0x1205a4,_0x24a9f9,_0x58fae1){ChatGroupEvents['emit'](_0x3e7395+':'+_0x1205a4['id'],_0x1205a4);ChatGroupEvents['emit'](_0x3e7395,_0x1205a4);_0x58fae1(null);};}for(var e in events){if(events[_0x9442('0x5')](e)){var event=events[e];ChatGroup[_0x9442('0x6')](e,emitEvent(event));}}module['exports']=ChatGroupEvents;
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.model.js b/server/api/chatGroup/chatGroup.model.js
index c59a8dd..ffcd7f3 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 _0x3bca=['moment','request-promise','path','./chatGroup.attributes','exports','ChatGroup','chat_groups','lodash','util','../../config/logger'];(function(_0xd9ae5,_0x54cc57){var _0x5ece93=function(_0x115bea){while(--_0x115bea){_0xd9ae5['push'](_0xd9ae5['shift']());}};_0x5ece93(++_0x54cc57);}(_0x3bca,0x75));var _0xa3bc=function(_0x3a3b99,_0x13326f){_0x3a3b99=_0x3a3b99-0x0;var _0x27a8df=_0x3bca[_0x3a3b99];return _0x27a8df;};'use strict';var _=require(_0xa3bc('0x0'));var util=require(_0xa3bc('0x1'));var logger=require(_0xa3bc('0x2'))('api');var moment=require(_0xa3bc('0x3'));var BPromise=require('bluebird');var rp=require(_0xa3bc('0x4'));var fs=require('fs');var path=require(_0xa3bc('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xa3bc('0x6'));module[_0xa3bc('0x7')]=function(_0x5f469d,_0x10e21d){return _0x5f469d['define'](_0xa3bc('0x8'),attributes,{'tableName':_0xa3bc('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7b4a=['path','rimraf','./chatGroup.attributes','exports','define','ChatGroup','lodash','util','../../config/logger','api','moment','request-promise'];(function(_0x592736,_0x3bf7eb){var _0x23b40f=function(_0x5951f3){while(--_0x5951f3){_0x592736['push'](_0x592736['shift']());}};_0x23b40f(++_0x3bf7eb);}(_0x7b4a,0xc6));var _0xa7b4=function(_0x2a4c2b,_0x1ce4a3){_0x2a4c2b=_0x2a4c2b-0x0;var _0x5c5cd1=_0x7b4a[_0x2a4c2b];return _0x5c5cd1;};'use strict';var _=require(_0xa7b4('0x0'));var util=require(_0xa7b4('0x1'));var logger=require(_0xa7b4('0x2'))(_0xa7b4('0x3'));var moment=require(_0xa7b4('0x4'));var BPromise=require('bluebird');var rp=require(_0xa7b4('0x5'));var fs=require('fs');var path=require(_0xa7b4('0x6'));var rimraf=require(_0xa7b4('0x7'));var config=require('../../config/environment');var attributes=require(_0xa7b4('0x8'));module[_0xa7b4('0x9')]=function(_0x14d54a,_0x4eb248){return _0x14d54a[_0xa7b4('0xa')](_0xa7b4('0xb'),attributes,{'tableName':'chat_groups','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 1bdf90e..360c03b 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 _0x06cb=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','register','request','then','debug','request\x20sent','stringify','error','code','ChatGroup,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','../../mysqldb'];(function(_0x4f6069,_0x262b32){var _0x56d182=function(_0x19bc7e){while(--_0x19bc7e){_0x4f6069['push'](_0x4f6069['shift']());}};_0x56d182(++_0x262b32);}(_0x06cb,0x1c6));var _0xb06c=function(_0x26c935,_0x57a9a6){_0x26c935=_0x26c935-0x0;var _0x2d3ada=_0x06cb[_0x26c935];return _0x2d3ada;};'use strict';var _=require(_0xb06c('0x0'));var util=require(_0xb06c('0x1'));var moment=require(_0xb06c('0x2'));var BPromise=require(_0xb06c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb06c('0x4'))['db'];var utils=require(_0xb06c('0x5'));var logger=require(_0xb06c('0x6'))(_0xb06c('0x7'));var config=require(_0xb06c('0x8'));var jayson=require(_0xb06c('0x9'));var client=jayson['client'][_0xb06c('0xa')]({'port':0x232a});config[_0xb06c('0xb')]=_[_0xb06c('0xc')](config[_0xb06c('0xb')],{'host':_0xb06c('0xd'),'port':0x18eb});var socket=require(_0xb06c('0xe'))(new Redis(config['redis']));require('./chatGroup.socket')[_0xb06c('0xf')](socket);function respondWithRpcPromise(_0x1ccaf3,_0x358273,_0x4e5779){return new BPromise(function(_0x48b995,_0xbb656b){return client[_0xb06c('0x10')](_0x1ccaf3,_0x4e5779)[_0xb06c('0x11')](function(_0xf8893d){logger['info']('ChatGroup,\x20%s,\x20%s',_0x358273,'request\x20sent');logger[_0xb06c('0x12')]('ChatGroup,\x20%s,\x20%s,\x20%s',_0x358273,_0xb06c('0x13'),JSON[_0xb06c('0x14')](_0xf8893d));if(_0xf8893d[_0xb06c('0x15')]){if(_0xf8893d['error'][_0xb06c('0x16')]===0x1f4){logger['error'](_0xb06c('0x17'),_0x358273,_0xf8893d[_0xb06c('0x15')][_0xb06c('0x18')]);return _0xbb656b(_0xf8893d['error'][_0xb06c('0x18')]);}logger[_0xb06c('0x15')]('ChatGroup,\x20%s,\x20%s',_0x358273,_0xf8893d[_0xb06c('0x15')]['message']);return _0x48b995(_0xf8893d[_0xb06c('0x15')][_0xb06c('0x18')]);}else{logger['info'](_0xb06c('0x17'),_0x358273,_0xb06c('0x13'));_0x48b995(_0xf8893d[_0xb06c('0x19')]['message']);}})[_0xb06c('0x1a')](function(_0x33fdc2){logger['error'](_0xb06c('0x17'),_0x358273,_0x33fdc2);_0xbb656b(_0x33fdc2);});});}
\ No newline at end of file
+var _0xfcda=['message','result','catch','lodash','util','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','localhost','socket.io-emitter','redis','./chatGroup.socket','register','request','then','info','ChatGroup,\x20%s,\x20%s','request\x20sent','ChatGroup,\x20%s,\x20%s,\x20%s','error','code'];(function(_0x2c7fd0,_0x304226){var _0x217b3f=function(_0x5c9ec1){while(--_0x5c9ec1){_0x2c7fd0['push'](_0x2c7fd0['shift']());}};_0x217b3f(++_0x304226);}(_0xfcda,0x198));var _0xafcd=function(_0x176d6e,_0x5a2d05){_0x176d6e=_0x176d6e-0x0;var _0x650fe6=_0xfcda[_0x176d6e];return _0x650fe6;};'use strict';var _=require(_0xafcd('0x0'));var util=require(_0xafcd('0x1'));var moment=require('moment');var BPromise=require(_0xafcd('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xafcd('0x3'));var logger=require(_0xafcd('0x4'))(_0xafcd('0x5'));var config=require(_0xafcd('0x6'));var jayson=require(_0xafcd('0x7'));var client=jayson[_0xafcd('0x8')][_0xafcd('0x9')]({'port':0x232a});config['redis']=_[_0xafcd('0xa')](config['redis'],{'host':_0xafcd('0xb'),'port':0x18eb});var socket=require(_0xafcd('0xc'))(new Redis(config[_0xafcd('0xd')]));require(_0xafcd('0xe'))[_0xafcd('0xf')](socket);function respondWithRpcPromise(_0x33b666,_0x4911d6,_0x8fe535){return new BPromise(function(_0x358964,_0x3a0d5e){return client[_0xafcd('0x10')](_0x33b666,_0x8fe535)[_0xafcd('0x11')](function(_0x212159){logger[_0xafcd('0x12')](_0xafcd('0x13'),_0x4911d6,_0xafcd('0x14'));logger['debug'](_0xafcd('0x15'),_0x4911d6,_0xafcd('0x14'),JSON['stringify'](_0x212159));if(_0x212159[_0xafcd('0x16')]){if(_0x212159[_0xafcd('0x16')][_0xafcd('0x17')]===0x1f4){logger[_0xafcd('0x16')](_0xafcd('0x13'),_0x4911d6,_0x212159['error']['message']);return _0x3a0d5e(_0x212159['error'][_0xafcd('0x18')]);}logger[_0xafcd('0x16')](_0xafcd('0x13'),_0x4911d6,_0x212159['error'][_0xafcd('0x18')]);return _0x358964(_0x212159[_0xafcd('0x16')][_0xafcd('0x18')]);}else{logger[_0xafcd('0x12')](_0xafcd('0x13'),_0x4911d6,'request\x20sent');_0x358964(_0x212159[_0xafcd('0x19')]['message']);}})[_0xafcd('0x1a')](function(_0x3e6449){logger[_0xafcd('0x16')](_0xafcd('0x13'),_0x4911d6,_0x3e6449);_0x3a0d5e(_0x3e6449);});});}
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.socket.js b/server/api/chatGroup/chatGroup.socket.js
index 0eed7a4..422320f 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 _0x1fcf=['register','chatGroup:','./chatGroup.events','save','update','removeListener'];(function(_0x286706,_0x25669b){var _0x38d9dc=function(_0x53ab76){while(--_0x53ab76){_0x286706['push'](_0x286706['shift']());}};_0x38d9dc(++_0x25669b);}(_0x1fcf,0x92));var _0xf1fc=function(_0x5436c0,_0x45beac){_0x5436c0=_0x5436c0-0x0;var _0x51a455=_0x1fcf[_0x5436c0];return _0x51a455;};'use strict';var ChatGroupEvents=require(_0xf1fc('0x0'));var events=[_0xf1fc('0x1'),'remove',_0xf1fc('0x2')];function createListener(_0x3fee50,_0x40c7cd){return function(_0x1ca9f0){_0x40c7cd['emit'](_0x3fee50,_0x1ca9f0);};}function removeListener(_0x54c724,_0x1cbc09){return function(){ChatGroupEvents[_0xf1fc('0x3')](_0x54c724,_0x1cbc09);};}exports[_0xf1fc('0x4')]=function(_0x50153c){for(var _0x16ad11=0x0,_0x181215=events['length'];_0x16ad11<_0x181215;_0x16ad11++){var _0x2d281b=events[_0x16ad11];var _0x5a6db2=createListener(_0xf1fc('0x5')+_0x2d281b,_0x50153c);ChatGroupEvents['on'](_0x2d281b,_0x5a6db2);}};
\ No newline at end of file
+var _0x7938=['emit','removeListener','register','chatGroup:','./chatGroup.events','save','update'];(function(_0x1c0f41,_0x26d95d){var _0x369a9f=function(_0x251234){while(--_0x251234){_0x1c0f41['push'](_0x1c0f41['shift']());}};_0x369a9f(++_0x26d95d);}(_0x7938,0x185));var _0x8793=function(_0x53d1b1,_0x3f83c0){_0x53d1b1=_0x53d1b1-0x0;var _0x5b977b=_0x7938[_0x53d1b1];return _0x5b977b;};'use strict';var ChatGroupEvents=require(_0x8793('0x0'));var events=[_0x8793('0x1'),'remove',_0x8793('0x2')];function createListener(_0xe7fefe,_0x2cec3c){return function(_0x4a12c8){_0x2cec3c[_0x8793('0x3')](_0xe7fefe,_0x4a12c8);};}function removeListener(_0x518d4c,_0xe44fef){return function(){ChatGroupEvents[_0x8793('0x4')](_0x518d4c,_0xe44fef);};}exports[_0x8793('0x5')]=function(_0x5a37c5){for(var _0x3adf72=0x0,_0x513439=events['length'];_0x3adf72<_0x513439;_0x3adf72++){var _0x278a42=events[_0x3adf72];var _0x1a89d1=createListener(_0x8793('0x6')+_0x278a42,_0x5a37c5);ChatGroupEvents['on'](_0x278a42,_0x1a89d1);}};
\ No newline at end of file
diff --git a/server/api/chatGroup/index.js b/server/api/chatGroup/index.js
index 074d140..82c227c 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 _0xb3d7=['isAuthenticated','index','/describe','describe','show','/:id/unread','getUnread','/:id/members','getMembers','/:id/messages','getMessages','create','post','addMessage','put','/:id','update','delete','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatGroup.controller','get'];(function(_0x4de452,_0x53a80f){var _0x2a80ee=function(_0x10080e){while(--_0x10080e){_0x4de452['push'](_0x4de452['shift']());}};_0x2a80ee(++_0x53a80f);}(_0xb3d7,0xc1));var _0x7b3d=function(_0x5daaae,_0x44f0e1){_0x5daaae=_0x5daaae-0x0;var _0x35b780=_0xb3d7[_0x5daaae];return _0x35b780;};'use strict';var multer=require(_0x7b3d('0x0'));var util=require('util');var path=require(_0x7b3d('0x1'));var timeout=require(_0x7b3d('0x2'));var express=require(_0x7b3d('0x3'));var router=express[_0x7b3d('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x7b3d('0x5'));var interaction=require(_0x7b3d('0x6'));var config=require(_0x7b3d('0x7'));var controller=require(_0x7b3d('0x8'));router[_0x7b3d('0x9')]('/',auth[_0x7b3d('0xa')](),controller[_0x7b3d('0xb')]);router[_0x7b3d('0x9')](_0x7b3d('0xc'),auth[_0x7b3d('0xa')](),controller[_0x7b3d('0xd')]);router[_0x7b3d('0x9')]('/:id',auth['isAuthenticated'](),controller[_0x7b3d('0xe')]);router[_0x7b3d('0x9')](_0x7b3d('0xf'),auth['isAuthenticated'](),controller[_0x7b3d('0x10')]);router[_0x7b3d('0x9')](_0x7b3d('0x11'),auth[_0x7b3d('0xa')](),controller[_0x7b3d('0x12')]);router[_0x7b3d('0x9')](_0x7b3d('0x13'),auth['isAuthenticated'](),controller[_0x7b3d('0x14')]);router['post']('/',auth['isAuthenticated'](),controller[_0x7b3d('0x15')]);router['post']('/:id/members',auth[_0x7b3d('0xa')](),controller['addMembers']);router[_0x7b3d('0x16')](_0x7b3d('0x13'),auth[_0x7b3d('0xa')](),controller[_0x7b3d('0x17')]);router[_0x7b3d('0x18')](_0x7b3d('0x19'),auth[_0x7b3d('0xa')](),controller[_0x7b3d('0x1a')]);router['delete'](_0x7b3d('0x19'),auth[_0x7b3d('0xa')](),controller['destroy']);router[_0x7b3d('0x1b')](_0x7b3d('0x11'),auth[_0x7b3d('0xa')](),controller['removeMembers']);module[_0x7b3d('0x1c')]=router;
\ No newline at end of file
+var _0xf2fb=['../../components/auth/service','../../components/interaction/service','../../config/environment','./chatGroup.controller','get','isAuthenticated','/:id','/:id/unread','getUnread','/:id/members','getMembers','/:id/messages','getMessages','post','addMembers','addMessage','destroy','removeMembers','exports','multer','connect-timeout','express','fs-extra'];(function(_0x590b63,_0x14debb){var _0x3c9380=function(_0x58fc67){while(--_0x58fc67){_0x590b63['push'](_0x590b63['shift']());}};_0x3c9380(++_0x14debb);}(_0xf2fb,0x86));var _0xbf2f=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xf2fb[_0x122ef9];return _0x42fba0;};'use strict';var multer=require(_0xbf2f('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xbf2f('0x1'));var express=require(_0xbf2f('0x2'));var router=express['Router']();var fs_extra=require(_0xbf2f('0x3'));var auth=require(_0xbf2f('0x4'));var interaction=require(_0xbf2f('0x5'));var config=require(_0xbf2f('0x6'));var controller=require(_0xbf2f('0x7'));router[_0xbf2f('0x8')]('/',auth[_0xbf2f('0x9')](),controller['index']);router[_0xbf2f('0x8')]('/describe',auth[_0xbf2f('0x9')](),controller['describe']);router['get'](_0xbf2f('0xa'),auth['isAuthenticated'](),controller['show']);router['get'](_0xbf2f('0xb'),auth['isAuthenticated'](),controller[_0xbf2f('0xc')]);router[_0xbf2f('0x8')](_0xbf2f('0xd'),auth['isAuthenticated'](),controller[_0xbf2f('0xe')]);router[_0xbf2f('0x8')](_0xbf2f('0xf'),auth[_0xbf2f('0x9')](),controller[_0xbf2f('0x10')]);router[_0xbf2f('0x11')]('/',auth[_0xbf2f('0x9')](),controller['create']);router['post']('/:id/members',auth[_0xbf2f('0x9')](),controller[_0xbf2f('0x12')]);router[_0xbf2f('0x11')](_0xbf2f('0xf'),auth[_0xbf2f('0x9')](),controller[_0xbf2f('0x13')]);router['put']('/:id',auth['isAuthenticated'](),controller['update']);router['delete'](_0xbf2f('0xa'),auth['isAuthenticated'](),controller[_0xbf2f('0x14')]);router['delete']('/:id/members',auth[_0xbf2f('0x9')](),controller[_0xbf2f('0x15')]);module[_0xbf2f('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 e3735a9..434715f 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 _0xfff0=['STRING','long','DATE','ENUM','out','exports','BOOLEAN','INTEGER','star','thumb','TEXT'];(function(_0xd390d9,_0x5c122d){var _0x132919=function(_0x17765c){while(--_0x17765c){_0xd390d9['push'](_0xd390d9['shift']());}};_0x132919(++_0x5c122d);}(_0xfff0,0x139));var _0x0fff=function(_0x454bc0,_0x580a46){_0x454bc0=_0x454bc0-0x0;var _0x415eeb=_0xfff0[_0x454bc0];return _0x415eeb;};'use strict';var Sequelize=require('sequelize');module[_0x0fff('0x0')]={'closed':{'type':Sequelize[_0x0fff('0x1')],'defaultValue':![]},'ratingValue':{'type':Sequelize[_0x0fff('0x2')]},'ratingType':{'type':Sequelize['ENUM'](_0x0fff('0x3'),_0x0fff('0x4')),'defaultValue':_0x0fff('0x3')},'ratingMessage':{'type':Sequelize['TEXT']},'pathTranscript':{'type':Sequelize[_0x0fff('0x5')]},'mailTranscript':{'type':Sequelize[_0x0fff('0x6')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0x0fff('0x6')]},'secondDisposition':{'type':Sequelize[_0x0fff('0x6')]},'thirdDisposition':{'type':Sequelize[_0x0fff('0x6')]},'note':{'type':Sequelize['STRING']},'browserName':{'type':Sequelize[_0x0fff('0x6')]},'browserVersion':{'type':Sequelize['STRING']},'osName':{'type':Sequelize[_0x0fff('0x6')]},'osVersion':{'type':Sequelize['STRING']},'deviceModel':{'type':Sequelize[_0x0fff('0x6')]},'deviceVendor':{'type':Sequelize[_0x0fff('0x6')]},'deviceType':{'type':Sequelize['STRING']},'referer':{'type':Sequelize[_0x0fff('0x5')]},'customerIp':{'type':Sequelize[_0x0fff('0x6')]},'formData':{'type':Sequelize[_0x0fff('0x5')](_0x0fff('0x7'))},'read1stAt':{'type':Sequelize[_0x0fff('0x8')]},'lastMsgAt':{'type':Sequelize[_0x0fff('0x8')]},'lastMsgDirection':{'type':Sequelize[_0x0fff('0x9')]('in',_0x0fff('0xa')),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize[_0x0fff('0x6')]},'customerPort':{'type':Sequelize[_0x0fff('0x6')]},'vidaooSessionId':{'type':Sequelize[_0x0fff('0x5')]},'autoreplyExecuted':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}};
\ No newline at end of file
+var _0x3306=['exports','BOOLEAN','INTEGER','star','thumb','TEXT','DATE','STRING','long','ENUM','out','sequelize'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3306,0x107));var _0x6330=function(_0x3cfda0,_0x4e01ce){_0x3cfda0=_0x3cfda0-0x0;var _0x431c78=_0x3306[_0x3cfda0];return _0x431c78;};'use strict';var Sequelize=require(_0x6330('0x0'));module[_0x6330('0x1')]={'closed':{'type':Sequelize[_0x6330('0x2')],'defaultValue':![]},'ratingValue':{'type':Sequelize[_0x6330('0x3')]},'ratingType':{'type':Sequelize['ENUM'](_0x6330('0x4'),_0x6330('0x5')),'defaultValue':_0x6330('0x4')},'ratingMessage':{'type':Sequelize[_0x6330('0x6')]},'pathTranscript':{'type':Sequelize[_0x6330('0x6')]},'mailTranscript':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize[_0x6330('0x7')]},'disposition':{'type':Sequelize[_0x6330('0x8')]},'secondDisposition':{'type':Sequelize[_0x6330('0x8')]},'thirdDisposition':{'type':Sequelize[_0x6330('0x8')]},'note':{'type':Sequelize[_0x6330('0x8')]},'browserName':{'type':Sequelize[_0x6330('0x8')]},'browserVersion':{'type':Sequelize[_0x6330('0x8')]},'osName':{'type':Sequelize[_0x6330('0x8')]},'osVersion':{'type':Sequelize[_0x6330('0x8')]},'deviceModel':{'type':Sequelize[_0x6330('0x8')]},'deviceVendor':{'type':Sequelize['STRING']},'deviceType':{'type':Sequelize[_0x6330('0x8')]},'referer':{'type':Sequelize['TEXT']},'customerIp':{'type':Sequelize[_0x6330('0x8')]},'formData':{'type':Sequelize[_0x6330('0x6')](_0x6330('0x9'))},'read1stAt':{'type':Sequelize[_0x6330('0x7')]},'lastMsgAt':{'type':Sequelize[_0x6330('0x7')]},'lastMsgDirection':{'type':Sequelize[_0x6330('0xa')]('in',_0x6330('0xb')),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize[_0x6330('0x8')]},'customerPort':{'type':Sequelize['STRING']},'vidaooSessionId':{'type':Sequelize['TEXT']},'autoreplyExecuted':{'type':Sequelize[_0x6330('0x2')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.controller.js b/server/api/chatInteraction/chatInteraction.controller.js
index 5f8654e..cd3085d 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 _0xa1e9=['map','ChatInteraction','type','key','findAll','query','user','show','rawAttributes','keys','filters','model','attributes','fields','length','includeAll','options','find','create','update','params','describe','createVidaooSession','findOne','ChatWebsite','ChatWebsiteId','vidaooApiKey','vidaooNote','vidaooMetadata','vidaooEscalation','fullname','email','POST','https://api-vidaoo.xcally.com/api/v1/meetings','vidaooTopic','isNull','parse','metadata','Sequelize','ValidationError','Error\x20in\x20conversion\x20vidaooMetadata','Error\x20in\x20Vidaoo\x20configuration','join_url','out','ChatMessage','updateAttributes','customUpdate','Contact','abandon','entity\x20not\x20found','UserId','closed','disposition','AbandonInteraction','attachmentUpload','file','originalname','filename','mimetype','Attachment','attachmentDownload','ChatOfflineMessageId','join','root','offline-chat/','basename','close','mailTranscript','server/files/chat/upload/','format','transcript-%s.txt','now','pathTranscript','User','CmContact','Messages','%s%d','System','customer','ContactId','agentIdentifier','website_alias','agentAlias','alias','[%s]\x20%s:\x20%s\x0a','createdAt','MM/DD/YYYY\x20HH:mm:ss','secret','appendFileSync','MailAccount','MailServerOut','Smtp','\x22%s\x22\x20<%s>','Mail\x20Transcript','addMessage','ids','getMessages','intersection','hasOwnProperty','nolimit','order','sort','where','ChatInteractionId','filter','merge','$gte','split','include','rows','getMyMessages','pick','includeAgent','push','addTags','spread','Tag','color','emit','chatInteractionTags:save','removeTags','download','unix','toString','server','files','tmp','attachments','firstName','read','Account','Owner','mkdirSync','Chat','N.A.','YYYY-MM-DD\x20HH:mm:ss','browserName','osName','referer','customerPort','tail','existsSync','createReadStream','pipe','createWriteStream','direction','lastName','value','renderFile','transcript-','err','unlinkSync','rimraf','request-promise','mustache','util','path','ejs','lodash','../../components/interaction/service','../../components/export/pdf','../../config/logger','api','../../mysqldb','redis','localhost','socket.io-emitter','register','jayson/promise','client','http','request','info','ChatInteraction,\x20%s,\x20%s','request\x20sent','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','end','undefined','limit','count','offset','Content-Range','json','then','destroy','stack','name','send','body','contact','agent','interaction','account'];(function(_0x53eeac,_0x4f9fb8){var _0xba17bc=function(_0x4ea620){while(--_0x4ea620){_0x53eeac['push'](_0x53eeac['shift']());}};_0xba17bc(++_0x4f9fb8);}(_0xa1e9,0x161));var _0x9a1e=function(_0x5d7b04,_0x13dec9){_0x5d7b04=_0x5d7b04-0x0;var _0x24d8db=_0xa1e9[_0x5d7b04];return _0x24d8db;};'use strict';var rimraf=require(_0x9a1e('0x0'));var zipdir=require('zip-dir');var rp=require(_0x9a1e('0x1'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x9a1e('0x2'));var util=require(_0x9a1e('0x3'));var path=require(_0x9a1e('0x4'));var ejs=require(_0x9a1e('0x5'));var fs=require('fs');var _=require(_0x9a1e('0x6'));var Redis=require('ioredis');var interaction=require(_0x9a1e('0x7'));var qs=require('../../components/parsers/qs');var pdf=require(_0x9a1e('0x8'));var logger=require(_0x9a1e('0x9'))(_0x9a1e('0xa'));var config=require('../../config/environment');var db=require(_0x9a1e('0xb'))['db'];config[_0x9a1e('0xc')]=_['defaults'](config['redis'],{'host':_0x9a1e('0xd'),'port':0x18eb});var socket=require(_0x9a1e('0xe'))(new Redis(config[_0x9a1e('0xc')]));require('./chatInteraction.socket')[_0x9a1e('0xf')](socket);var jayson=require(_0x9a1e('0x10'));var client=jayson[_0x9a1e('0x11')][_0x9a1e('0x12')]({'port':0x232b});var client9004=jayson[_0x9a1e('0x11')]['http']({'port':0x232c});function respondWithRpcPromise(_0x5b7339,_0x25198c,_0x22e9cb,_0x579c00){return new BPromise(function(_0x5346c6,_0x4ba7fa){var _0x4a7c0f=_0x579c00||client;return _0x4a7c0f[_0x9a1e('0x13')](_0x5b7339,_0x22e9cb)['then'](function(_0x3956f9){logger[_0x9a1e('0x14')](_0x9a1e('0x15'),_0x25198c,_0x9a1e('0x16'));logger['debug'](_0x9a1e('0x17'),_0x25198c,_0x9a1e('0x16'),JSON[_0x9a1e('0x18')](_0x3956f9));if(_0x3956f9[_0x9a1e('0x19')]){if(_0x3956f9['error'][_0x9a1e('0x1a')]===0x1f4){logger['error'](_0x9a1e('0x15'),_0x25198c,_0x3956f9['error'][_0x9a1e('0x1b')]);return _0x4ba7fa(_0x3956f9[_0x9a1e('0x19')][_0x9a1e('0x1b')]);}logger[_0x9a1e('0x19')](_0x9a1e('0x15'),_0x25198c,_0x3956f9['error']['message']);return _0x5346c6(_0x3956f9[_0x9a1e('0x19')][_0x9a1e('0x1b')]);}else{logger[_0x9a1e('0x14')](_0x9a1e('0x15'),_0x25198c,'request\x20sent');_0x5346c6(_0x3956f9[_0x9a1e('0x1c')][_0x9a1e('0x1b')]);}})[_0x9a1e('0x1d')](function(_0x4f2af8){logger[_0x9a1e('0x19')]('ChatInteraction,\x20%s,\x20%s',_0x25198c,_0x4f2af8);_0x4ba7fa(_0x4f2af8);});});}function respondWithStatusCode(_0x3ff7be,_0x18e132){_0x18e132=_0x18e132||0xcc;return function(_0x29a9a9){if(_0x29a9a9){return _0x3ff7be[_0x9a1e('0x1e')](_0x18e132);}return _0x3ff7be[_0x9a1e('0x1f')](_0x18e132)[_0x9a1e('0x20')]();};}function respondWithResult(_0x48cec5,_0x435e60){_0x435e60=_0x435e60||0xc8;return function(_0x1f1544){if(_0x1f1544){return _0x48cec5[_0x9a1e('0x1f')](_0x435e60)['json'](_0x1f1544);}};}function respondWithFilteredResult(_0x9eb837,_0x5e3c8b){return function(_0x4fe985){if(_0x4fe985){var _0x1b24c6=typeof _0x5e3c8b['offset']===_0x9a1e('0x21')&&typeof _0x5e3c8b[_0x9a1e('0x22')]===_0x9a1e('0x21');var _0x2333aa=_0x4fe985[_0x9a1e('0x23')];var _0x55cacf=_0x1b24c6?0x0:_0x5e3c8b['offset'];var _0x56ae89=_0x1b24c6?_0x4fe985[_0x9a1e('0x23')]:_0x5e3c8b[_0x9a1e('0x24')]+_0x5e3c8b[_0x9a1e('0x22')];var _0x1c099c;if(_0x56ae89>=_0x2333aa){_0x56ae89=_0x2333aa;_0x1c099c=0xc8;}else{_0x1c099c=0xce;}_0x9eb837[_0x9a1e('0x1f')](_0x1c099c);return _0x9eb837['set'](_0x9a1e('0x25'),_0x55cacf+'-'+_0x56ae89+'/'+_0x2333aa)[_0x9a1e('0x26')](_0x4fe985);}return null;};}function saveUpdates(_0x4c4664){return function(_0x5266c6){if(_0x5266c6){return _0x5266c6['update'](_0x4c4664)[_0x9a1e('0x27')](function(_0x17704b){return _0x17704b;});}return null;};}function removeEntity(_0x448e14){return function(_0x4d08ab){if(_0x4d08ab){return _0x4d08ab[_0x9a1e('0x28')]()[_0x9a1e('0x27')](function(){_0x448e14['status'](0xcc)[_0x9a1e('0x20')]();});}};}function handleEntityNotFound(_0x51bd7c){return function(_0x579573){if(!_0x579573){_0x51bd7c[_0x9a1e('0x1e')](0x194);}return _0x579573;};}function handleError(_0x189454,_0x474414){_0x474414=_0x474414||0x1f4;return function(_0x3e51f8){logger[_0x9a1e('0x19')](_0x3e51f8[_0x9a1e('0x29')]);if(_0x3e51f8[_0x9a1e('0x2a')]){delete _0x3e51f8[_0x9a1e('0x2a')];}_0x189454[_0x9a1e('0x1f')](_0x474414)[_0x9a1e('0x2b')](_0x3e51f8);};}function getMustacheRender(_0x5226e0,_0x58e51a){return Mustache['render'](_0x5226e0,_['merge'](_0x58e51a[_0x9a1e('0x2c')],{'contact':_0x58e51a[_0x9a1e('0x2d')],'message':_0x58e51a[_0x9a1e('0x1b')],'agent':_0x58e51a[_0x9a1e('0x2e')],'interaction':_0x58e51a[_0x9a1e('0x2f')],'account':_0x58e51a[_0x9a1e('0x30')]}))||'';}exports['index']=function(_0x3bea3a,_0x1b8be3){var _0x2fb8a7={};var _0x35b91d=_[_0x9a1e('0x31')](db[_0x9a1e('0x32')]['rawAttributes'],function(_0x1e93ae){return{'name':_0x1e93ae['fieldName'],'type':_0x1e93ae[_0x9a1e('0x33')][_0x9a1e('0x34')]};});_0x2fb8a7=qs['getOptions'](_0x35b91d,_0x3bea3a);return interaction[_0x9a1e('0x35')]('chat',_0x3bea3a[_0x9a1e('0x36')],_0x3bea3a[_0x9a1e('0x37')],_0x2fb8a7,_0x35b91d)[_0x9a1e('0x27')](respondWithFilteredResult(_0x1b8be3,_0x2fb8a7))['catch'](handleError(_0x1b8be3,null));};exports[_0x9a1e('0x38')]=function(_0x5db8b4,_0x56c015){var _0x5bceac={'raw':![],'where':{'id':_0x5db8b4['params']['id']}},_0x18a585={};_0x18a585['model']=_['keys'](db[_0x9a1e('0x32')][_0x9a1e('0x39')]);_0x18a585[_0x9a1e('0x36')]=_[_0x9a1e('0x3a')](_0x5db8b4[_0x9a1e('0x36')]);_0x18a585[_0x9a1e('0x3b')]=_['intersection'](_0x18a585[_0x9a1e('0x3c')],_0x18a585[_0x9a1e('0x36')]);_0x5bceac[_0x9a1e('0x3d')]=_['intersection'](_0x18a585['model'],qs[_0x9a1e('0x3e')](_0x5db8b4[_0x9a1e('0x36')]['fields']));_0x5bceac[_0x9a1e('0x3d')]=_0x5bceac[_0x9a1e('0x3d')][_0x9a1e('0x3f')]?_0x5bceac[_0x9a1e('0x3d')]:_0x18a585['model'];if(_0x5db8b4['query'][_0x9a1e('0x40')]){_0x5bceac['include']=[{'all':!![]}];}_0x5bceac=_['merge']({},_0x5bceac,_0x5db8b4[_0x9a1e('0x41')]);return db['ChatInteraction'][_0x9a1e('0x42')](_0x5bceac)[_0x9a1e('0x27')](handleEntityNotFound(_0x56c015,null))['then'](respondWithResult(_0x56c015,null))[_0x9a1e('0x1d')](handleError(_0x56c015,null));};exports[_0x9a1e('0x43')]=function(_0x2c472d,_0x36e6e9){return db[_0x9a1e('0x32')]['create'](_0x2c472d[_0x9a1e('0x2c')],{})[_0x9a1e('0x27')](respondWithResult(_0x36e6e9,0xc9))['catch'](handleError(_0x36e6e9,null));};exports[_0x9a1e('0x44')]=function(_0x3c82d6,_0x54ad9a){if(_0x3c82d6['body']['id']){delete _0x3c82d6['body']['id'];}return db[_0x9a1e('0x32')][_0x9a1e('0x42')]({'where':{'id':_0x3c82d6[_0x9a1e('0x45')]['id']}})[_0x9a1e('0x27')](handleEntityNotFound(_0x54ad9a,null))[_0x9a1e('0x27')](saveUpdates(_0x3c82d6[_0x9a1e('0x2c')],null))[_0x9a1e('0x27')](respondWithResult(_0x54ad9a,null))[_0x9a1e('0x1d')](handleError(_0x54ad9a,null));};exports[_0x9a1e('0x28')]=function(_0x3ca0aa,_0x42cb43){return db[_0x9a1e('0x32')][_0x9a1e('0x42')]({'where':{'id':_0x3ca0aa['params']['id']}})[_0x9a1e('0x27')](handleEntityNotFound(_0x42cb43,null))[_0x9a1e('0x27')](removeEntity(_0x42cb43,null))['catch'](handleError(_0x42cb43,null));};exports[_0x9a1e('0x46')]=function(_0x592e38,_0x5e53b8){return db[_0x9a1e('0x32')][_0x9a1e('0x46')]()['then'](respondWithResult(_0x5e53b8,null))['catch'](handleError(_0x5e53b8,null));};exports[_0x9a1e('0x47')]=function(_0x1f8fcf,_0x264c49){var _0x16dc95=_0x1f8fcf[_0x9a1e('0x45')]['id'];var _0x45b717;var _0x57272b;var _0x311c57;return db[_0x9a1e('0x32')][_0x9a1e('0x48')]({'where':{'id':_0x16dc95}})[_0x9a1e('0x27')](function(_0x2910f7){_0x45b717=_0x2910f7;return db[_0x9a1e('0x49')]['findOne']({'where':{'id':_0x2910f7[_0x9a1e('0x4a')]},'attributes':['id',_0x9a1e('0x4b'),'vidaooEscalation','vidaooTopic',_0x9a1e('0x4c'),_0x9a1e('0x4d')],'raw':!![]});})['then'](function(_0x1a560c){if(_0x1a560c&&_0x1a560c[_0x9a1e('0x4b')]&&_0x1a560c[_0x9a1e('0x4e')]){_0x57272b=_0x1a560c;var _0x190b9d={'interaction':{'id':_0x16dc95},'agent':{'id':_0x1f8fcf[_0x9a1e('0x37')]['id'],'name':_0x1f8fcf[_0x9a1e('0x37')][_0x9a1e('0x2a')],'fullname':_0x1f8fcf[_0x9a1e('0x37')][_0x9a1e('0x4f')],'email':_0x1f8fcf[_0x9a1e('0x37')][_0x9a1e('0x50')]},'contact':_0x1f8fcf[_0x9a1e('0x2c')][_0x9a1e('0x2d')],'account':_0x1f8fcf['body']['account']};var _0x427038={'rejectUnauthorized':![],'method':_0x9a1e('0x51'),'url':_0x9a1e('0x52'),'headers':{'X-APIKEY':_0x1a560c['vidaooApiKey']},'body':{'duration':null,'scheduledAt':null,'participants':[_0x1f8fcf[_0x9a1e('0x37')][_0x9a1e('0x50')]],'buttons':null,'topic':_0x57272b[_0x9a1e('0x53')],'note':_[_0x9a1e('0x54')](_0x57272b['vidaooNote'])?null:getMustacheRender(_0x57272b[_0x9a1e('0x4c')],_0x190b9d),'metadata':null},'redirect':'follow','json':!![]};try{if(!_['isNull'](_0x57272b[_0x9a1e('0x4d')])){var _0x4752a7=getMustacheRender(_0x57272b[_0x9a1e('0x4d')],_0x190b9d);var _0x48b674=JSON[_0x9a1e('0x55')](_0x4752a7);_0x427038['body'][_0x9a1e('0x56')]=_0x48b674;}}catch(_0x50c9f4){throw new db[(_0x9a1e('0x57'))][(_0x9a1e('0x58'))](_0x9a1e('0x59'));}return rp(_0x427038);}else{throw new db['Sequelize'][(_0x9a1e('0x58'))](_0x9a1e('0x5a'));}})[_0x9a1e('0x27')](function(_0x5bf716){_0x311c57=_0x5bf716;if(_0x311c57['id']){var _0x40cc86={'body':_0x311c57[_0x9a1e('0x5b')],'ChatWebsiteId':_0x57272b['id'],'ChatInteractionId':_0x45b717['id'],'direction':_0x9a1e('0x5c'),'UserId':_0x1f8fcf[_0x9a1e('0x37')]['id']};return db[_0x9a1e('0x5d')][_0x9a1e('0x43')](_0x40cc86,{});}else{throw new db['Sequelize'][(_0x9a1e('0x58'))]('Unable\x20to\x20create\x20Vidaoo\x20session');}})[_0x9a1e('0x27')](function(){return _0x45b717[_0x9a1e('0x5e')]({'vidaooSessionId':_0x311c57['id']});})[_0x9a1e('0x27')](respondWithResult(_0x264c49,null))['catch'](handleError(_0x264c49,null));};exports[_0x9a1e('0x5f')]=function(_0x585022,_0x216abf){if(_0x585022[_0x9a1e('0x2c')]['id']){delete _0x585022[_0x9a1e('0x2c')]['id'];}return db['ChatInteraction'][_0x9a1e('0x42')]({'where':{'id':_0x585022[_0x9a1e('0x45')]['id']},'include':[{'model':db['CmContact'],'as':_0x9a1e('0x60')}]})[_0x9a1e('0x27')](handleEntityNotFound(_0x216abf,null))[_0x9a1e('0x27')](saveUpdates(_0x585022[_0x9a1e('0x2c')],null))['then'](respondWithResult(_0x216abf,null))[_0x9a1e('0x1d')](handleError(_0x216abf,null));};exports[_0x9a1e('0x61')]=function(_0x33c269,_0x262e91){if(_0x33c269[_0x9a1e('0x2c')]['id']){delete _0x33c269[_0x9a1e('0x2c')]['id'];}return db[_0x9a1e('0x32')][_0x9a1e('0x42')]({'where':{'id':_0x33c269[_0x9a1e('0x45')]['id']}})['then'](function(_0x2df7e5){if(!_0x2df7e5){logger[_0x9a1e('0x19')]('abandonInteraction,\x20%s,\x20%s,\x20%s',_0x9a1e('0x61'),0x194,_0x9a1e('0x62'));_0x262e91['sendStatus'](0x194);}else{if(_0x2df7e5[_0x9a1e('0x63')]){throw new db[(_0x9a1e('0x57'))][(_0x9a1e('0x58'))]('Interaction\x20already\x20assigned');}}return _0x2df7e5;})['then'](function(_0x13579f){if(_0x13579f){return _0x13579f[_0x9a1e('0x44')]({'closed':_0x33c269['body'][_0x9a1e('0x64')],'disposition':_0x33c269[_0x9a1e('0x2c')][_0x9a1e('0x65')]})[_0x9a1e('0x27')](function(_0x54448b){return _0x54448b;});}})[_0x9a1e('0x27')](function(){return respondWithRpcPromise(_0x9a1e('0x66'),'abandon',_0x33c269[_0x9a1e('0x2c')],client9004);})['then'](respondWithResult(_0x262e91,null))[_0x9a1e('0x1d')](handleError(_0x262e91,null));};exports[_0x9a1e('0x67')]=function(_0x3409d6,_0x432613){_0x3409d6[_0x9a1e('0x2c')][_0x9a1e('0x2a')]=_0x3409d6[_0x9a1e('0x68')][_0x9a1e('0x69')];_0x3409d6[_0x9a1e('0x2c')]['basename']=_0x3409d6['file'][_0x9a1e('0x6a')];_0x3409d6[_0x9a1e('0x2c')][_0x9a1e('0x33')]=_0x3409d6['file'][_0x9a1e('0x6b')];return db[_0x9a1e('0x6c')][_0x9a1e('0x43')](_0x3409d6[_0x9a1e('0x2c')])[_0x9a1e('0x27')](respondWithResult(_0x432613,0xc9))[_0x9a1e('0x1d')](handleError(_0x432613,null));};exports[_0x9a1e('0x6d')]=function(_0x6d93a1,_0x572a86){return db['ChatInteraction']['findOne']({'where':{'id':_0x6d93a1['params']['id']},'raw':!![]})[_0x9a1e('0x27')](handleEntityNotFound(_0x572a86,null))[_0x9a1e('0x27')](function(_0x5c23cc){if(_0x5c23cc){if(_0x5c23cc[_0x9a1e('0x64')]){return _0x572a86[_0x9a1e('0x1f')](0x193)[_0x9a1e('0x26')]({'status':0x193,'message':'Unauthorized'});}return db[_0x9a1e('0x6c')]['findOne']({'where':{'id':_0x6d93a1[_0x9a1e('0x36')]['attachId']},'raw':!![]})[_0x9a1e('0x27')](handleEntityNotFound(_0x572a86,null));}})[_0x9a1e('0x27')](function(_0x56c777){if(_0x56c777){var _0x3b3a41=_0x56c777[_0x9a1e('0x6e')]!==null;var _0x2773cf=path[_0x9a1e('0x6f')](config[_0x9a1e('0x70')],'server/files/attachments/');if(_0x3b3a41){_0x2773cf=path['join'](_0x2773cf,_0x9a1e('0x71'));}var _0x5b1cc6=path['join'](_0x2773cf,_0x56c777[_0x9a1e('0x72')]);return _0x572a86['download'](_0x5b1cc6);}})[_0x9a1e('0x1d')](handleError(_0x572a86,null));};exports[_0x9a1e('0x73')]=function(_0x556431,_0x294505){var _0x3a0ee5=null;var _0x41134a=null;var _0x130e6f=null;if(_0x556431['body']['id']){delete _0x556431[_0x9a1e('0x2c')]['id'];}if(_0x556431[_0x9a1e('0x2c')][_0x9a1e('0x74')]){_0x130e6f=path[_0x9a1e('0x6f')](config[_0x9a1e('0x70')],_0x9a1e('0x75'),util[_0x9a1e('0x76')](_0x9a1e('0x77'),Date[_0x9a1e('0x78')]()));_0x556431['body'][_0x9a1e('0x79')]=_0x130e6f;}return db['ChatInteraction'][_0x9a1e('0x42')]({'where':{'id':_0x556431[_0x9a1e('0x45')]['id']},'include':[{'model':db[_0x9a1e('0x5d')],'as':'Messages','include':[{'model':db[_0x9a1e('0x7a')],'as':'User'}]}]})['then'](handleEntityNotFound(_0x294505,null))[_0x9a1e('0x27')](saveUpdates(_0x556431[_0x9a1e('0x2c')],null))[_0x9a1e('0x27')](function(_0x4e069d){if(_0x4e069d){_0x3a0ee5=_0x4e069d;return db[_0x9a1e('0x49')][_0x9a1e('0x42')]({'where':{'id':_0x3a0ee5[_0x9a1e('0x4a')]}});}})[_0x9a1e('0x27')](function(_0x3f64c0){if(_0x3f64c0){_0x41134a=_0x3f64c0;return db[_0x9a1e('0x7b')][_0x9a1e('0x42')]({'where':{'id':_0x3a0ee5['ContactId']}});}})[_0x9a1e('0x27')](function(_0x1334da){if(_0x1334da){if(_0x130e6f){var _0x117be4=null;for(var _0x20788e=0x1;_0x20788e<_0x3a0ee5[_0x9a1e('0x7c')][_0x9a1e('0x3f')];++_0x20788e){_0x117be4=_0x3a0ee5[_0x9a1e('0x7c')][_0x20788e];var _0xdd5b59=_0x117be4['UserId']?util[_0x9a1e('0x76')](_0x9a1e('0x7d'),_0x41134a['agentAlias'],_0x117be4[_0x9a1e('0x63')]):_0x9a1e('0x7e');var _0x4bd341=_0x556431[_0x9a1e('0x2c')][_0x9a1e('0x7f')]||util['format'](_0x9a1e('0x7d'),'Visitor',_0x117be4[_0x9a1e('0x80')]);switch(_0x41134a[_0x9a1e('0x81')]){case _0x9a1e('0x82'):_0xdd5b59=_0x117be4[_0x9a1e('0x63')]?util[_0x9a1e('0x76')](_0x9a1e('0x7d'),_0x41134a[_0x9a1e('0x83')],_0x117be4[_0x9a1e('0x63')]):'System';break;case'agent_alias':_0xdd5b59=_0x117be4[_0x9a1e('0x63')]?_0x117be4[_0x9a1e('0x7a')][_0x9a1e('0x84')]||_0x117be4[_0x9a1e('0x7a')]['fullname']:_0x9a1e('0x7e');break;case'agent_fullname':_0xdd5b59=_0x117be4[_0x9a1e('0x63')]?_0x117be4[_0x9a1e('0x7a')][_0x9a1e('0x4f')]:_0x9a1e('0x7e');break;default:_0xdd5b59=_0x117be4['UserId']?util['format'](_0x9a1e('0x7d'),_0x41134a[_0x9a1e('0x83')],_0x117be4['UserId']):_0x9a1e('0x7e');}var _0x42ff58=util[_0x9a1e('0x76')](_0x9a1e('0x85'),moment(_0x117be4[_0x9a1e('0x86')])['format'](_0x9a1e('0x87')),_0x117be4['direction']==='in'?_0x4bd341:_0xdd5b59,_0x117be4[_0x9a1e('0x2c')]);if(!_0x117be4[_0x9a1e('0x88')]){fs[_0x9a1e('0x89')](_0x130e6f,_0x42ff58);}}return db[_0x9a1e('0x8a')][_0x9a1e('0x48')]({'where':{'service':!![]},'include':[{'model':db[_0x9a1e('0x8b')],'as':'Smtp','raw':!![],'include':[{'model':db['CloudProvider'],'as':'CloudProvider','raw':!![]}]}]});}}})['then'](function(_0x13cb74){if(!_0x13cb74||!_0x13cb74[_0x9a1e('0x8c')]||!_0x556431[_0x9a1e('0x2c')])return _0x3a0ee5;var _0x6ab296=_0x13cb74['getSmtpOptions']();return respondWithRpcPromise('SendMail','sendMail',{'account':_0x6ab296,'message':{'from':util[_0x9a1e('0x76')](_0x9a1e('0x8d'),_0x13cb74[_0x9a1e('0x2a')],_0x13cb74[_0x9a1e('0x50')]||_0x13cb74[_0x9a1e('0x8c')]['user']),'to':_0x556431['body'][_0x9a1e('0x74')],'subject':_0x9a1e('0x8e'),'text':util[_0x9a1e('0x76')]('Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a',_0x556431[_0x9a1e('0x2c')][_0x9a1e('0x74')]),'attachments':[{'path':_0x130e6f}]}})[_0x9a1e('0x27')](function(){return _0x3a0ee5;})['catch'](function(_0x3a8556){logger[_0x9a1e('0x19')](_0x3a8556);});})[_0x9a1e('0x27')](respondWithStatusCode(_0x294505,0xc8))[_0x9a1e('0x1d')](handleError(_0x294505,null));};exports[_0x9a1e('0x8f')]=function(_0x28a43a,_0x5e570b){return db[_0x9a1e('0x5d')][_0x9a1e('0x42')]({'where':{'id':_0x28a43a[_0x9a1e('0x45')]['id']}})[_0x9a1e('0x27')](handleEntityNotFound(_0x5e570b,null))[_0x9a1e('0x27')](function(_0x4d5bc0){if(_0x4d5bc0){return _0x4d5bc0['addMessage'](_0x28a43a['body'][_0x9a1e('0x90')],_['omit'](_0x28a43a['body'],[_0x9a1e('0x90'),'id'])||{});}})[_0x9a1e('0x27')](respondWithResult(_0x5e570b,null))[_0x9a1e('0x1d')](handleError(_0x5e570b,null));};exports[_0x9a1e('0x91')]=function(_0x2d367a,_0xd4b717){var _0x21e6ec={'raw':![],'where':{}};var _0x4a8fd8={};var _0x2f1253={'count':0x0,'rows':[]};return db['ChatInteraction'][_0x9a1e('0x48')]({'where':{'id':_0x2d367a[_0x9a1e('0x45')]['id']}})[_0x9a1e('0x27')](handleEntityNotFound(_0xd4b717,null))[_0x9a1e('0x27')](function(_0x5e76e0){if(_0x5e76e0){_0x4a8fd8[_0x9a1e('0x3c')]=_['keys'](db[_0x9a1e('0x5d')][_0x9a1e('0x39')]);_0x4a8fd8['query']=_[_0x9a1e('0x3a')](_0x2d367a[_0x9a1e('0x36')]);_0x4a8fd8[_0x9a1e('0x3b')]=_[_0x9a1e('0x92')](_0x4a8fd8[_0x9a1e('0x3c')],_0x4a8fd8[_0x9a1e('0x36')]);_0x21e6ec[_0x9a1e('0x3d')]=_[_0x9a1e('0x92')](_0x4a8fd8[_0x9a1e('0x3c')],qs[_0x9a1e('0x3e')](_0x2d367a['query'][_0x9a1e('0x3e')]));_0x21e6ec[_0x9a1e('0x3d')]=_0x21e6ec[_0x9a1e('0x3d')][_0x9a1e('0x3f')]?_0x21e6ec[_0x9a1e('0x3d')]:_0x4a8fd8[_0x9a1e('0x3c')];if(!_0x2d367a['query'][_0x9a1e('0x93')](_0x9a1e('0x94'))){_0x21e6ec['limit']=qs['limit'](_0x2d367a[_0x9a1e('0x36')][_0x9a1e('0x22')]);_0x21e6ec[_0x9a1e('0x24')]=qs[_0x9a1e('0x24')](_0x2d367a[_0x9a1e('0x36')][_0x9a1e('0x24')]);}_0x21e6ec[_0x9a1e('0x95')]=qs['sort'](_0x2d367a['query'][_0x9a1e('0x96')]);_0x21e6ec[_0x9a1e('0x97')]=qs[_0x9a1e('0x3b')](_['pick'](_0x2d367a[_0x9a1e('0x36')],_0x4a8fd8[_0x9a1e('0x3b')]));_0x21e6ec[_0x9a1e('0x97')][_0x9a1e('0x98')]=_0x5e76e0['id'];if(_0x2d367a[_0x9a1e('0x36')][_0x9a1e('0x99')]){_0x21e6ec[_0x9a1e('0x97')]=_[_0x9a1e('0x9a')](_0x21e6ec[_0x9a1e('0x97')],{'$or':_['map'](_0x21e6ec[_0x9a1e('0x3d')],function(_0x542ff8){var _0xb516e7={};_0xb516e7[_0x542ff8]={'$like':'%'+_0x2d367a[_0x9a1e('0x36')][_0x9a1e('0x99')]+'%'};return _0xb516e7;})});}if(_0x2d367a[_0x9a1e('0x36')][_0x9a1e('0x9b')]){var _0x257f76=_0x2d367a[_0x9a1e('0x36')][_0x9a1e('0x9b')][_0x9a1e('0x9c')](',');var _0x30e207={};_0x30e207[_0x257f76[0x0]]={'$gte':moment(_0x257f76[0x1])['format']('YYYY-MM-DD\x20HH:mm:ss')};_0x21e6ec[_0x9a1e('0x97')]=_[_0x9a1e('0x9a')](_0x21e6ec[_0x9a1e('0x97')],_0x30e207);}_0x21e6ec=_[_0x9a1e('0x9a')]({},_0x21e6ec,_0x2d367a['options']);return db[_0x9a1e('0x5d')][_0x9a1e('0x23')]({'where':_0x21e6ec[_0x9a1e('0x97')]})[_0x9a1e('0x27')](function(_0x3f0618){_0x2f1253[_0x9a1e('0x23')]=_0x3f0618;if(_0x2d367a['query'][_0x9a1e('0x40')]){_0x21e6ec[_0x9a1e('0x9d')]=[{'all':!![]}];}return db[_0x9a1e('0x5d')]['findAll'](_0x21e6ec);})[_0x9a1e('0x27')](function(_0x28e34d){_0x2f1253[_0x9a1e('0x9e')]=_0x28e34d;return _0x2f1253;});}})[_0x9a1e('0x27')](respondWithFilteredResult(_0xd4b717,_0x21e6ec))[_0x9a1e('0x1d')](handleError(_0xd4b717,null));};exports[_0x9a1e('0x9f')]=function(_0x3bb298,_0x1bd767){var _0x2918b5={'where':{}},_0x243493={},_0x17bfd9={'count':0x0,'rows':[]};return db[_0x9a1e('0x32')]['findOne']({'where':{'id':_0x3bb298[_0x9a1e('0x45')]['id']}})[_0x9a1e('0x27')](handleEntityNotFound(_0x1bd767,null))[_0x9a1e('0x27')](function(_0x18f857){if(_0x18f857){_0x243493[_0x9a1e('0x3c')]=_['keys'](db[_0x9a1e('0x5d')][_0x9a1e('0x39')]);_0x243493[_0x9a1e('0x36')]=_['keys'](_0x3bb298[_0x9a1e('0x36')]);_0x243493['filters']=_['intersection'](_0x243493[_0x9a1e('0x3c')],_0x243493[_0x9a1e('0x36')]);_0x2918b5[_0x9a1e('0x3d')]=_['intersection'](_0x243493[_0x9a1e('0x3c')],qs[_0x9a1e('0x3e')](_0x3bb298[_0x9a1e('0x36')][_0x9a1e('0x3e')]));_0x2918b5[_0x9a1e('0x3d')]=_0x2918b5[_0x9a1e('0x3d')][_0x9a1e('0x3f')]?_0x2918b5[_0x9a1e('0x3d')]:_0x243493[_0x9a1e('0x3c')];if(!_0x3bb298['query'][_0x9a1e('0x93')](_0x9a1e('0x94'))){_0x2918b5['limit']=qs[_0x9a1e('0x22')](_0x3bb298['query'][_0x9a1e('0x22')]);_0x2918b5[_0x9a1e('0x24')]=qs[_0x9a1e('0x24')](_0x3bb298[_0x9a1e('0x36')]['offset']);}_0x2918b5[_0x9a1e('0x95')]=qs[_0x9a1e('0x96')](_0x3bb298[_0x9a1e('0x36')][_0x9a1e('0x96')]);_0x2918b5['where']=qs[_0x9a1e('0x3b')](_[_0x9a1e('0xa0')](_0x3bb298[_0x9a1e('0x36')],_0x243493[_0x9a1e('0x3b')]));_0x2918b5['where'][_0x9a1e('0x98')]=_0x18f857['id'];if(_0x3bb298[_0x9a1e('0x36')][_0x9a1e('0x99')]){_0x2918b5[_0x9a1e('0x97')]=_['merge'](_0x2918b5[_0x9a1e('0x97')],{'$or':_['map'](_0x2918b5['attributes'],function(_0x5857ee){var _0x727fb5={};_0x727fb5[_0x5857ee]={'$like':'%'+_0x3bb298[_0x9a1e('0x36')]['filter']+'%'};return _0x727fb5;})});}_0x2918b5[_0x9a1e('0x97')]['secret']=![];if(_0x3bb298[_0x9a1e('0x36')]['id']){_0x2918b5[_0x9a1e('0x97')]['id']={'$gt':_0x3bb298[_0x9a1e('0x36')]['id']};}_0x2918b5=_[_0x9a1e('0x9a')]({},_0x2918b5,_0x3bb298[_0x9a1e('0x41')]);return db[_0x9a1e('0x5d')][_0x9a1e('0x23')]({'where':_0x2918b5[_0x9a1e('0x97')]})['then'](function(_0x2d5268){_0x17bfd9[_0x9a1e('0x23')]=_0x2d5268;_0x2918b5[_0x9a1e('0x9d')]=[];if(_0x3bb298['query'][_0x9a1e('0xa1')]){_0x2918b5[_0x9a1e('0x9d')][_0x9a1e('0xa2')]({'model':db['User'],'as':_0x9a1e('0x7a'),'attributes':['id','fullname',_0x9a1e('0x84')]});}if(_0x3bb298[_0x9a1e('0x36')][_0x9a1e('0x40')]){_0x2918b5[_0x9a1e('0x9d')]=[{'all':!![]}];}return db[_0x9a1e('0x5d')]['findAll'](_0x2918b5);})[_0x9a1e('0x27')](function(_0x3c890a){_0x17bfd9[_0x9a1e('0x9e')]=_0x3c890a;return _0x17bfd9;});}})[_0x9a1e('0x27')](respondWithFilteredResult(_0x1bd767,_0x2918b5))[_0x9a1e('0x1d')](handleError(_0x1bd767,null));};exports[_0x9a1e('0xa3')]=function(_0x512b4f,_0x4dc634){return db['ChatInteraction']['find']({'where':{'id':_0x512b4f[_0x9a1e('0x45')]['id']}})[_0x9a1e('0x27')](handleEntityNotFound(_0x4dc634,null))[_0x9a1e('0x27')](function(_0x3291cc){if(_0x3291cc){return _0x3291cc['setTags'](_0x512b4f[_0x9a1e('0x2c')]['ids'],_['omit'](_0x512b4f[_0x9a1e('0x2c')],['ids','id'])||{})[_0x9a1e('0xa4')](function(){return db[_0x9a1e('0xa5')]['findAll']({'attributes':['id','name',_0x9a1e('0xa6')],'where':{'id':_0x512b4f[_0x9a1e('0x2c')][_0x9a1e('0x90')]}});})[_0x9a1e('0x27')](function(_0x440c47){socket[_0x9a1e('0xa7')](_0x9a1e('0xa8'),{'id':Number(_0x512b4f[_0x9a1e('0x45')]['id']),'tags':_0x440c47||[]});return{'id':Number(_0x512b4f[_0x9a1e('0x45')]['id']),'tags':_0x440c47||[]};});}})[_0x9a1e('0x27')](respondWithResult(_0x4dc634,null))[_0x9a1e('0x1d')](handleError(_0x4dc634,null));};exports[_0x9a1e('0xa9')]=function(_0x24be31,_0x258e06){return db[_0x9a1e('0x32')][_0x9a1e('0x42')]({'where':{'id':_0x24be31['params']['id']}})[_0x9a1e('0x27')](handleEntityNotFound(_0x258e06,null))['then'](function(_0x470968){if(_0x470968){return _0x470968[_0x9a1e('0xa9')](_0x24be31[_0x9a1e('0x36')]['ids']);}})[_0x9a1e('0x27')](respondWithStatusCode(_0x258e06,null))[_0x9a1e('0x1d')](handleError(_0x258e06,null));};exports[_0x9a1e('0xaa')]=function(_0x2afad7,_0x5036b2){var _0x12268f=moment()[_0x9a1e('0xab')]()[_0x9a1e('0xac')]();var _0x60e9c2=path[_0x9a1e('0x6f')](config[_0x9a1e('0x70')],_0x9a1e('0xad'),_0x9a1e('0xae'),_0x9a1e('0xaf'));var _0x140635=path[_0x9a1e('0x6f')](config[_0x9a1e('0x70')],_0x9a1e('0xad'),'files',_0x9a1e('0xb0'));var _0x5dccbe=path[_0x9a1e('0x6f')](_0x60e9c2,_0x12268f);var _0x4ad083=util[_0x9a1e('0x76')]('transcript-%d-%s.zip',_0x2afad7[_0x9a1e('0x45')]['id'],_0x12268f);var _0x1b8771=path['join'](_0x60e9c2,_0x4ad083);var _0x152d65=[];_0x152d65['push']({'model':db['User'],'as':_0x9a1e('0x7a'),'attributes':['id',_0x9a1e('0x4f')],'raw':!![]});_0x152d65[_0x9a1e('0xa2')]({'model':db[_0x9a1e('0x7b')],'as':'Contact','attributes':['id',_0x9a1e('0xb1'),'lastName'],'raw':!![]});if(_0x2afad7['query']['attachments']){_0x152d65[_0x9a1e('0xa2')]({'model':db[_0x9a1e('0x6c')],'as':'Attachment','raw':!![]});}var _0x448847=[{'model':db['ChatMessage'],'as':_0x9a1e('0x7c'),'attributes':['id',_0x9a1e('0x2c'),_0x9a1e('0x86'),'direction',_0x9a1e('0x88'),_0x9a1e('0xb2')],'include':_0x152d65}];_0x448847[_0x9a1e('0xa2')]({'model':db[_0x9a1e('0x49')],'as':_0x9a1e('0xb3'),'attributes':['id',_0x9a1e('0x2a')]});_0x448847[_0x9a1e('0xa2')]({'model':db[_0x9a1e('0x7a')],'as':_0x9a1e('0xb4'),'attributes':['id',_0x9a1e('0x4f')]});return db[_0x9a1e('0x32')][_0x9a1e('0x42')]({'where':{'id':_0x2afad7[_0x9a1e('0x45')]['id']},'include':_0x448847})[_0x9a1e('0x27')](handleEntityNotFound(_0x5036b2,null))[_0x9a1e('0x27')](function(_0x57e8a8){if(_0x57e8a8){var _0x3d85c7=_0x57e8a8['get']({'plain':!![]});fs[_0x9a1e('0xb5')](_0x5dccbe);var _0x44bbe9={'channel':_0x9a1e('0xb6'),'account':_0x3d85c7[_0x9a1e('0xb3')][_0x9a1e('0x2a')],'agent':_0x3d85c7[_0x9a1e('0xb4')]?_0x3d85c7[_0x9a1e('0xb4')][_0x9a1e('0x4f')]:_0x9a1e('0xb7'),'createdAt':moment(_0x3d85c7[_0x9a1e('0x86')])['format']('YYYY-MM-DD\x20HH:mm:ss')[_0x9a1e('0xac')](),'closedAt':_0x3d85c7[_0x9a1e('0x64')]?moment(_0x3d85c7['closedAt'])[_0x9a1e('0x76')](_0x9a1e('0xb8'))[_0x9a1e('0xac')]():'','disposition':_0x3d85c7[_0x9a1e('0x65')],'chatInfo':{'browser':_0x3d85c7[_0x9a1e('0xb9')],'os':_0x3d85c7[_0x9a1e('0xba')],'referer':_0x3d85c7[_0x9a1e('0xbb')],'customerIp':_0x3d85c7['customerIp'],'customerPort':_0x3d85c7[_0x9a1e('0xbc')]?_0x3d85c7['customerPort']:_0x9a1e('0xb7')},'messages':_(_0x3d85c7['Messages'])[_0x9a1e('0xbd')]()[_0x9a1e('0x99')]({'secret':![]})[_0x9a1e('0x31')](function(_0x2b62ad){if(_0x2b62ad[_0x9a1e('0x6c')]){var _0x1ab696=path[_0x9a1e('0x6f')](_0x140635,_0x2b62ad['Attachment'][_0x9a1e('0x72')]);if(fs[_0x9a1e('0xbe')](_0x1ab696)){fs[_0x9a1e('0xbf')](_0x1ab696)[_0x9a1e('0xc0')](fs[_0x9a1e('0xc1')](path[_0x9a1e('0x6f')](_0x5dccbe,_0x2b62ad[_0x9a1e('0x6c')]['basename'])));}}return{'date':moment(_0x2b62ad[_0x9a1e('0x86')])['format'](_0x9a1e('0xb8'))[_0x9a1e('0xac')](),'sender':_0x2b62ad[_0x9a1e('0xc2')]===_0x9a1e('0x5c')?_0x2b62ad[_0x9a1e('0x7a')]?_0x2b62ad[_0x9a1e('0x7a')][_0x9a1e('0x4f')]:_0x9a1e('0x7e'):_0x2b62ad['Contact'][_0x9a1e('0xb1')]+(_0x2b62ad[_0x9a1e('0x60')]['lastName']?'\x20'+_0x2b62ad[_0x9a1e('0x60')][_0x9a1e('0xc3')]:''),'body':_0x2b62ad[_0x9a1e('0x6c')]?_0x2b62ad[_0x9a1e('0x6c')]['basename']:_0x2b62ad[_0x9a1e('0x2c')],'direction':_0x2b62ad[_0x9a1e('0xc2')]==='out'?'A':'C','secret':_0x2b62ad[_0x9a1e('0x88')],'read':_0x2b62ad['read'],'attachment':_0x2b62ad[_0x9a1e('0x6c')]};})[_0x9a1e('0xc4')]()};return ejs[_0x9a1e('0xc5')](path[_0x9a1e('0x6f')](config[_0x9a1e('0x70')],_0x9a1e('0xad'),'views','downloadInteraction.ejs'),{'interaction':_0x44bbe9})[_0x9a1e('0x27')](function(_0x456e04){var _0x250322=path['join'](_0x5dccbe,_0x9a1e('0xc6')+_0x3d85c7['id']+'-'+_0x12268f+'.pdf');var _0x21d1e2={'path':_0x250322,'channel':_0x9a1e('0xb6'),'interactionId':_0x3d85c7['id']};return pdf['createPdfFromHTML'](_0x456e04,_0x21d1e2);})[_0x9a1e('0x27')](function(){return new Promise(function(_0x183584,_0x11f3fe){zipdir(_0x5dccbe,{'saveTo':_0x1b8771},function(_0x923ce5,_0x2f0205){if(_0x923ce5)return _0x11f3fe(_0x923ce5);return _0x183584(_0x2f0205);});})[_0x9a1e('0x27')](function(){return new BPromise(function(_0x4a1aeb,_0x4b8b3a){rimraf(_0x5dccbe,function(_0x5789c0){if(_0x5789c0)_0x4b8b3a(_0x5789c0);return _0x4a1aeb();});});})[_0x9a1e('0x27')](function(){return _0x5036b2[_0x9a1e('0xaa')](_0x1b8771,_0x4ad083,function(_0x221752){if(_0x221752){logger[_0x9a1e('0x19')](_0x9a1e('0xc7'),_0x221752);}else{fs[_0x9a1e('0xc8')](_0x1b8771);}});});});}else{return _0x5036b2[_0x9a1e('0x1e')](0xc8);}})[_0x9a1e('0x1d')](handleError(_0x5036b2,null));};
\ No newline at end of file
+var _0x5c7b=['Sequelize','ValidationError','Error\x20in\x20conversion\x20vidaooMetadata','Error\x20in\x20Vidaoo\x20configuration','join_url','out','Unable\x20to\x20create\x20Vidaoo\x20session','updateAttributes','customUpdate','abandon','entity\x20not\x20found','Interaction\x20already\x20assigned','closed','disposition','attachmentUpload','file','originalname','basename','filename','mimetype','Attachment','Unauthorized','attachId','ChatOfflineMessageId','join','root','server/files/attachments/','format','transcript-%s.txt','now','ChatMessage','Messages','User','CmContact','ContactId','UserId','%s%d','agentAlias','customer','agentIdentifier','website_alias','System','agent_alias','alias','[%s]\x20%s:\x20%s\x0a','MM/DD/YYYY\x20HH:mm:ss','direction','appendFileSync','MailAccount','MailServerOut','Smtp','CloudProvider','getSmtpOptions','SendMail','sendMail','mailTranscript','Mail\x20Transcript','Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a','addMessage','omit','ids','hasOwnProperty','nolimit','order','sort','where','pick','filter','$gte','split','include','rows','getMyMessages','ChatInteractionId','secret','includeAgent','push','addTags','setTags','spread','Tag','emit','chatInteractionTags:save','removeTags','download','unix','toString','server','Contact','firstName','lastName','attachments','createdAt','read','Owner','Account','N.A.','YYYY-MM-DD\x20HH:mm:ss','closedAt','customerIp','customerPort','existsSync','createReadStream','createWriteStream','renderFile','downloadInteraction.ejs','transcript-','Chat','createPdfFromHTML','err','unlinkSync','rimraf','zip-dir','request-promise','moment','mustache','path','ejs','lodash','ioredis','../../components/interaction/service','../../components/parsers/qs','../../components/export/pdf','../../config/logger','../../config/environment','../../mysqldb','redis','defaults','localhost','./chatInteraction.socket','http','request','info','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatInteraction,\x20%s,\x20%s','message','result','catch','end','json','undefined','count','offset','limit','status','set','Content-Range','update','destroy','sendStatus','name','send','render','merge','contact','agent','index','map','rawAttributes','fieldName','type','getOptions','findAll','chat','query','then','show','params','model','keys','ChatInteraction','filters','attributes','intersection','fields','includeAll','options','create','body','find','describe','findOne','ChatWebsite','ChatWebsiteId','vidaooApiKey','vidaooEscalation','vidaooTopic','vidaooNote','user','fullname','email','account','POST','isNull','follow','vidaooMetadata','parse','metadata'];(function(_0x511ff0,_0x5f7232){var _0x5ddae4=function(_0x2bc913){while(--_0x2bc913){_0x511ff0['push'](_0x511ff0['shift']());}};_0x5ddae4(++_0x5f7232);}(_0x5c7b,0x6f));var _0xb5c7=function(_0x36eaaa,_0x326732){_0x36eaaa=_0x36eaaa-0x0;var _0x461349=_0x5c7b[_0x36eaaa];return _0x461349;};'use strict';var rimraf=require(_0xb5c7('0x0'));var zipdir=require(_0xb5c7('0x1'));var rp=require(_0xb5c7('0x2'));var moment=require(_0xb5c7('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xb5c7('0x4'));var util=require('util');var path=require(_0xb5c7('0x5'));var ejs=require(_0xb5c7('0x6'));var fs=require('fs');var _=require(_0xb5c7('0x7'));var Redis=require(_0xb5c7('0x8'));var interaction=require(_0xb5c7('0x9'));var qs=require(_0xb5c7('0xa'));var pdf=require(_0xb5c7('0xb'));var logger=require(_0xb5c7('0xc'))('api');var config=require(_0xb5c7('0xd'));var db=require(_0xb5c7('0xe'))['db'];config[_0xb5c7('0xf')]=_[_0xb5c7('0x10')](config[_0xb5c7('0xf')],{'host':_0xb5c7('0x11'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xb5c7('0xf')]));require(_0xb5c7('0x12'))['register'](socket);var jayson=require('jayson/promise');var client=jayson['client'][_0xb5c7('0x13')]({'port':0x232b});var client9004=jayson['client'][_0xb5c7('0x13')]({'port':0x232c});function respondWithRpcPromise(_0x56aa52,_0xdd0b8f,_0x474837,_0x43290a){return new BPromise(function(_0x20f4f0,_0x3c7198){var _0x5466c5=_0x43290a||client;return _0x5466c5[_0xb5c7('0x14')](_0x56aa52,_0x474837)['then'](function(_0x12308a){logger[_0xb5c7('0x15')]('ChatInteraction,\x20%s,\x20%s',_0xdd0b8f,_0xb5c7('0x16'));logger[_0xb5c7('0x17')](_0xb5c7('0x18'),_0xdd0b8f,_0xb5c7('0x16'),JSON[_0xb5c7('0x19')](_0x12308a));if(_0x12308a[_0xb5c7('0x1a')]){if(_0x12308a[_0xb5c7('0x1a')][_0xb5c7('0x1b')]===0x1f4){logger[_0xb5c7('0x1a')](_0xb5c7('0x1c'),_0xdd0b8f,_0x12308a[_0xb5c7('0x1a')][_0xb5c7('0x1d')]);return _0x3c7198(_0x12308a[_0xb5c7('0x1a')][_0xb5c7('0x1d')]);}logger[_0xb5c7('0x1a')](_0xb5c7('0x1c'),_0xdd0b8f,_0x12308a[_0xb5c7('0x1a')]['message']);return _0x20f4f0(_0x12308a['error'][_0xb5c7('0x1d')]);}else{logger[_0xb5c7('0x15')](_0xb5c7('0x1c'),_0xdd0b8f,_0xb5c7('0x16'));_0x20f4f0(_0x12308a[_0xb5c7('0x1e')][_0xb5c7('0x1d')]);}})[_0xb5c7('0x1f')](function(_0x445af0){logger['error'](_0xb5c7('0x1c'),_0xdd0b8f,_0x445af0);_0x3c7198(_0x445af0);});});}function respondWithStatusCode(_0x387156,_0x1e4848){_0x1e4848=_0x1e4848||0xcc;return function(_0x5d2d66){if(_0x5d2d66){return _0x387156['sendStatus'](_0x1e4848);}return _0x387156['status'](_0x1e4848)[_0xb5c7('0x20')]();};}function respondWithResult(_0x86f239,_0x1c3a42){_0x1c3a42=_0x1c3a42||0xc8;return function(_0x5a481b){if(_0x5a481b){return _0x86f239['status'](_0x1c3a42)[_0xb5c7('0x21')](_0x5a481b);}};}function respondWithFilteredResult(_0x17cd8e,_0x399bb2){return function(_0x5d26bf){if(_0x5d26bf){var _0x107e03=typeof _0x399bb2['offset']===_0xb5c7('0x22')&&typeof _0x399bb2['limit']===_0xb5c7('0x22');var _0x53be6b=_0x5d26bf[_0xb5c7('0x23')];var _0x1a873e=_0x107e03?0x0:_0x399bb2[_0xb5c7('0x24')];var _0x28271d=_0x107e03?_0x5d26bf[_0xb5c7('0x23')]:_0x399bb2['offset']+_0x399bb2[_0xb5c7('0x25')];var _0x14bc59;if(_0x28271d>=_0x53be6b){_0x28271d=_0x53be6b;_0x14bc59=0xc8;}else{_0x14bc59=0xce;}_0x17cd8e[_0xb5c7('0x26')](_0x14bc59);return _0x17cd8e[_0xb5c7('0x27')](_0xb5c7('0x28'),_0x1a873e+'-'+_0x28271d+'/'+_0x53be6b)[_0xb5c7('0x21')](_0x5d26bf);}return null;};}function saveUpdates(_0x1f20cf){return function(_0x315ee0){if(_0x315ee0){return _0x315ee0[_0xb5c7('0x29')](_0x1f20cf)['then'](function(_0x575120){return _0x575120;});}return null;};}function removeEntity(_0x5d8d79){return function(_0x5d7691){if(_0x5d7691){return _0x5d7691[_0xb5c7('0x2a')]()['then'](function(){_0x5d8d79[_0xb5c7('0x26')](0xcc)[_0xb5c7('0x20')]();});}};}function handleEntityNotFound(_0x5d06f7){return function(_0x251e70){if(!_0x251e70){_0x5d06f7[_0xb5c7('0x2b')](0x194);}return _0x251e70;};}function handleError(_0x106a9b,_0x4faca4){_0x4faca4=_0x4faca4||0x1f4;return function(_0x6f8f35){logger[_0xb5c7('0x1a')](_0x6f8f35['stack']);if(_0x6f8f35['name']){delete _0x6f8f35[_0xb5c7('0x2c')];}_0x106a9b[_0xb5c7('0x26')](_0x4faca4)[_0xb5c7('0x2d')](_0x6f8f35);};}function getMustacheRender(_0x52f0f5,_0x46f56f){return Mustache[_0xb5c7('0x2e')](_0x52f0f5,_[_0xb5c7('0x2f')](_0x46f56f['body'],{'contact':_0x46f56f[_0xb5c7('0x30')],'message':_0x46f56f[_0xb5c7('0x1d')],'agent':_0x46f56f[_0xb5c7('0x31')],'interaction':_0x46f56f['interaction'],'account':_0x46f56f['account']}))||'';}exports[_0xb5c7('0x32')]=function(_0x1d1cbe,_0x265a43){var _0xfeaa09={};var _0x1f622b=_[_0xb5c7('0x33')](db['ChatInteraction'][_0xb5c7('0x34')],function(_0x543c05){return{'name':_0x543c05[_0xb5c7('0x35')],'type':_0x543c05[_0xb5c7('0x36')]['key']};});_0xfeaa09=qs[_0xb5c7('0x37')](_0x1f622b,_0x1d1cbe);return interaction[_0xb5c7('0x38')](_0xb5c7('0x39'),_0x1d1cbe[_0xb5c7('0x3a')],_0x1d1cbe['user'],_0xfeaa09,_0x1f622b)[_0xb5c7('0x3b')](respondWithFilteredResult(_0x265a43,_0xfeaa09))[_0xb5c7('0x1f')](handleError(_0x265a43,null));};exports[_0xb5c7('0x3c')]=function(_0x18b656,_0x1e67be){var _0x2b14aa={'raw':![],'where':{'id':_0x18b656[_0xb5c7('0x3d')]['id']}},_0x1f32f6={};_0x1f32f6[_0xb5c7('0x3e')]=_[_0xb5c7('0x3f')](db[_0xb5c7('0x40')]['rawAttributes']);_0x1f32f6[_0xb5c7('0x3a')]=_[_0xb5c7('0x3f')](_0x18b656['query']);_0x1f32f6[_0xb5c7('0x41')]=_['intersection'](_0x1f32f6[_0xb5c7('0x3e')],_0x1f32f6['query']);_0x2b14aa[_0xb5c7('0x42')]=_[_0xb5c7('0x43')](_0x1f32f6['model'],qs[_0xb5c7('0x44')](_0x18b656[_0xb5c7('0x3a')][_0xb5c7('0x44')]));_0x2b14aa[_0xb5c7('0x42')]=_0x2b14aa[_0xb5c7('0x42')]['length']?_0x2b14aa[_0xb5c7('0x42')]:_0x1f32f6[_0xb5c7('0x3e')];if(_0x18b656[_0xb5c7('0x3a')][_0xb5c7('0x45')]){_0x2b14aa['include']=[{'all':!![]}];}_0x2b14aa=_[_0xb5c7('0x2f')]({},_0x2b14aa,_0x18b656[_0xb5c7('0x46')]);return db[_0xb5c7('0x40')]['find'](_0x2b14aa)[_0xb5c7('0x3b')](handleEntityNotFound(_0x1e67be,null))[_0xb5c7('0x3b')](respondWithResult(_0x1e67be,null))[_0xb5c7('0x1f')](handleError(_0x1e67be,null));};exports[_0xb5c7('0x47')]=function(_0x5f1161,_0xc22d8b){return db['ChatInteraction'][_0xb5c7('0x47')](_0x5f1161[_0xb5c7('0x48')],{})[_0xb5c7('0x3b')](respondWithResult(_0xc22d8b,0xc9))[_0xb5c7('0x1f')](handleError(_0xc22d8b,null));};exports[_0xb5c7('0x29')]=function(_0x528b36,_0x5a8eca){if(_0x528b36[_0xb5c7('0x48')]['id']){delete _0x528b36[_0xb5c7('0x48')]['id'];}return db[_0xb5c7('0x40')][_0xb5c7('0x49')]({'where':{'id':_0x528b36[_0xb5c7('0x3d')]['id']}})['then'](handleEntityNotFound(_0x5a8eca,null))['then'](saveUpdates(_0x528b36['body'],null))[_0xb5c7('0x3b')](respondWithResult(_0x5a8eca,null))[_0xb5c7('0x1f')](handleError(_0x5a8eca,null));};exports[_0xb5c7('0x2a')]=function(_0x205135,_0x5bbd49){return db[_0xb5c7('0x40')]['find']({'where':{'id':_0x205135['params']['id']}})['then'](handleEntityNotFound(_0x5bbd49,null))[_0xb5c7('0x3b')](removeEntity(_0x5bbd49,null))[_0xb5c7('0x1f')](handleError(_0x5bbd49,null));};exports[_0xb5c7('0x4a')]=function(_0x5d6a31,_0x5451cd){return db[_0xb5c7('0x40')][_0xb5c7('0x4a')]()[_0xb5c7('0x3b')](respondWithResult(_0x5451cd,null))[_0xb5c7('0x1f')](handleError(_0x5451cd,null));};exports['createVidaooSession']=function(_0x4e6c88,_0x2b761f){var _0xe4bb1=_0x4e6c88[_0xb5c7('0x3d')]['id'];var _0x116dcb;var _0x2472f4;var _0x2fdc26;return db['ChatInteraction'][_0xb5c7('0x4b')]({'where':{'id':_0xe4bb1}})[_0xb5c7('0x3b')](function(_0x7c99d1){_0x116dcb=_0x7c99d1;return db[_0xb5c7('0x4c')][_0xb5c7('0x4b')]({'where':{'id':_0x7c99d1[_0xb5c7('0x4d')]},'attributes':['id',_0xb5c7('0x4e'),_0xb5c7('0x4f'),_0xb5c7('0x50'),_0xb5c7('0x51'),'vidaooMetadata'],'raw':!![]});})[_0xb5c7('0x3b')](function(_0x14f75b){if(_0x14f75b&&_0x14f75b['vidaooApiKey']&&_0x14f75b[_0xb5c7('0x4f')]){_0x2472f4=_0x14f75b;var _0x45739f={'interaction':{'id':_0xe4bb1},'agent':{'id':_0x4e6c88[_0xb5c7('0x52')]['id'],'name':_0x4e6c88[_0xb5c7('0x52')]['name'],'fullname':_0x4e6c88[_0xb5c7('0x52')][_0xb5c7('0x53')],'email':_0x4e6c88[_0xb5c7('0x52')][_0xb5c7('0x54')]},'contact':_0x4e6c88['body'][_0xb5c7('0x30')],'account':_0x4e6c88[_0xb5c7('0x48')][_0xb5c7('0x55')]};var _0x1df48d={'rejectUnauthorized':![],'method':_0xb5c7('0x56'),'url':'https://api-vidaoo.xcally.com/api/v1/meetings','headers':{'X-APIKEY':_0x14f75b[_0xb5c7('0x4e')]},'body':{'duration':null,'scheduledAt':null,'participants':[_0x4e6c88[_0xb5c7('0x52')][_0xb5c7('0x54')]],'buttons':null,'topic':_0x2472f4['vidaooTopic'],'note':_[_0xb5c7('0x57')](_0x2472f4[_0xb5c7('0x51')])?null:getMustacheRender(_0x2472f4[_0xb5c7('0x51')],_0x45739f),'metadata':null},'redirect':_0xb5c7('0x58'),'json':!![]};try{if(!_[_0xb5c7('0x57')](_0x2472f4[_0xb5c7('0x59')])){var _0x23fc16=getMustacheRender(_0x2472f4['vidaooMetadata'],_0x45739f);var _0x2fb3a0=JSON[_0xb5c7('0x5a')](_0x23fc16);_0x1df48d['body'][_0xb5c7('0x5b')]=_0x2fb3a0;}}catch(_0x43f517){throw new db[(_0xb5c7('0x5c'))][(_0xb5c7('0x5d'))](_0xb5c7('0x5e'));}return rp(_0x1df48d);}else{throw new db[(_0xb5c7('0x5c'))][(_0xb5c7('0x5d'))](_0xb5c7('0x5f'));}})[_0xb5c7('0x3b')](function(_0x270cfc){_0x2fdc26=_0x270cfc;if(_0x2fdc26['id']){var _0xfc70be={'body':_0x2fdc26[_0xb5c7('0x60')],'ChatWebsiteId':_0x2472f4['id'],'ChatInteractionId':_0x116dcb['id'],'direction':_0xb5c7('0x61'),'UserId':_0x4e6c88[_0xb5c7('0x52')]['id']};return db['ChatMessage'][_0xb5c7('0x47')](_0xfc70be,{});}else{throw new db[(_0xb5c7('0x5c'))][(_0xb5c7('0x5d'))](_0xb5c7('0x62'));}})[_0xb5c7('0x3b')](function(){return _0x116dcb[_0xb5c7('0x63')]({'vidaooSessionId':_0x2fdc26['id']});})[_0xb5c7('0x3b')](respondWithResult(_0x2b761f,null))['catch'](handleError(_0x2b761f,null));};exports[_0xb5c7('0x64')]=function(_0x11a64d,_0x49fdac){if(_0x11a64d[_0xb5c7('0x48')]['id']){delete _0x11a64d[_0xb5c7('0x48')]['id'];}return db['ChatInteraction'][_0xb5c7('0x49')]({'where':{'id':_0x11a64d['params']['id']},'include':[{'model':db['CmContact'],'as':'Contact'}]})[_0xb5c7('0x3b')](handleEntityNotFound(_0x49fdac,null))[_0xb5c7('0x3b')](saveUpdates(_0x11a64d[_0xb5c7('0x48')],null))['then'](respondWithResult(_0x49fdac,null))['catch'](handleError(_0x49fdac,null));};exports['abandon']=function(_0x3eac01,_0x36c0ae){if(_0x3eac01[_0xb5c7('0x48')]['id']){delete _0x3eac01['body']['id'];}return db[_0xb5c7('0x40')][_0xb5c7('0x49')]({'where':{'id':_0x3eac01[_0xb5c7('0x3d')]['id']}})[_0xb5c7('0x3b')](function(_0x3b8427){if(!_0x3b8427){logger[_0xb5c7('0x1a')]('abandonInteraction,\x20%s,\x20%s,\x20%s',_0xb5c7('0x65'),0x194,_0xb5c7('0x66'));_0x36c0ae[_0xb5c7('0x2b')](0x194);}else{if(_0x3b8427['UserId']){throw new db[(_0xb5c7('0x5c'))][(_0xb5c7('0x5d'))](_0xb5c7('0x67'));}}return _0x3b8427;})[_0xb5c7('0x3b')](function(_0x123f1f){if(_0x123f1f){return _0x123f1f['update']({'closed':_0x3eac01[_0xb5c7('0x48')][_0xb5c7('0x68')],'disposition':_0x3eac01[_0xb5c7('0x48')][_0xb5c7('0x69')]})[_0xb5c7('0x3b')](function(_0x57c7a7){return _0x57c7a7;});}})[_0xb5c7('0x3b')](function(){return respondWithRpcPromise('AbandonInteraction','abandon',_0x3eac01[_0xb5c7('0x48')],client9004);})[_0xb5c7('0x3b')](respondWithResult(_0x36c0ae,null))['catch'](handleError(_0x36c0ae,null));};exports[_0xb5c7('0x6a')]=function(_0x305b9f,_0xa10ae9){_0x305b9f[_0xb5c7('0x48')][_0xb5c7('0x2c')]=_0x305b9f[_0xb5c7('0x6b')][_0xb5c7('0x6c')];_0x305b9f[_0xb5c7('0x48')][_0xb5c7('0x6d')]=_0x305b9f[_0xb5c7('0x6b')][_0xb5c7('0x6e')];_0x305b9f[_0xb5c7('0x48')][_0xb5c7('0x36')]=_0x305b9f['file'][_0xb5c7('0x6f')];return db[_0xb5c7('0x70')]['create'](_0x305b9f[_0xb5c7('0x48')])[_0xb5c7('0x3b')](respondWithResult(_0xa10ae9,0xc9))[_0xb5c7('0x1f')](handleError(_0xa10ae9,null));};exports['attachmentDownload']=function(_0x22c7fb,_0x522d74){return db[_0xb5c7('0x40')]['findOne']({'where':{'id':_0x22c7fb[_0xb5c7('0x3d')]['id']},'raw':!![]})[_0xb5c7('0x3b')](handleEntityNotFound(_0x522d74,null))[_0xb5c7('0x3b')](function(_0x2ac3e1){if(_0x2ac3e1){if(_0x2ac3e1['closed']){return _0x522d74[_0xb5c7('0x26')](0x193)[_0xb5c7('0x21')]({'status':0x193,'message':_0xb5c7('0x71')});}return db[_0xb5c7('0x70')][_0xb5c7('0x4b')]({'where':{'id':_0x22c7fb[_0xb5c7('0x3a')][_0xb5c7('0x72')]},'raw':!![]})[_0xb5c7('0x3b')](handleEntityNotFound(_0x522d74,null));}})[_0xb5c7('0x3b')](function(_0x3017fa){if(_0x3017fa){var _0x24e9bd=_0x3017fa[_0xb5c7('0x73')]!==null;var _0x12b67a=path[_0xb5c7('0x74')](config[_0xb5c7('0x75')],_0xb5c7('0x76'));if(_0x24e9bd){_0x12b67a=path['join'](_0x12b67a,'offline-chat/');}var _0x27d964=path['join'](_0x12b67a,_0x3017fa[_0xb5c7('0x6d')]);return _0x522d74['download'](_0x27d964);}})[_0xb5c7('0x1f')](handleError(_0x522d74,null));};exports['close']=function(_0x48e6f8,_0x50ac81){var _0x417f23=null;var _0x4ede1b=null;var _0x1d2c3d=null;if(_0x48e6f8['body']['id']){delete _0x48e6f8[_0xb5c7('0x48')]['id'];}if(_0x48e6f8['body']['mailTranscript']){_0x1d2c3d=path[_0xb5c7('0x74')](config[_0xb5c7('0x75')],'server/files/chat/upload/',util[_0xb5c7('0x77')](_0xb5c7('0x78'),Date[_0xb5c7('0x79')]()));_0x48e6f8[_0xb5c7('0x48')]['pathTranscript']=_0x1d2c3d;}return db[_0xb5c7('0x40')][_0xb5c7('0x49')]({'where':{'id':_0x48e6f8['params']['id']},'include':[{'model':db[_0xb5c7('0x7a')],'as':_0xb5c7('0x7b'),'include':[{'model':db[_0xb5c7('0x7c')],'as':'User'}]}]})[_0xb5c7('0x3b')](handleEntityNotFound(_0x50ac81,null))[_0xb5c7('0x3b')](saveUpdates(_0x48e6f8[_0xb5c7('0x48')],null))[_0xb5c7('0x3b')](function(_0x48a8f8){if(_0x48a8f8){_0x417f23=_0x48a8f8;return db[_0xb5c7('0x4c')][_0xb5c7('0x49')]({'where':{'id':_0x417f23['ChatWebsiteId']}});}})[_0xb5c7('0x3b')](function(_0xbb10d1){if(_0xbb10d1){_0x4ede1b=_0xbb10d1;return db[_0xb5c7('0x7d')][_0xb5c7('0x49')]({'where':{'id':_0x417f23[_0xb5c7('0x7e')]}});}})[_0xb5c7('0x3b')](function(_0x41b7d8){if(_0x41b7d8){if(_0x1d2c3d){var _0x1a774a=null;for(var _0x6a35c9=0x1;_0x6a35c9<_0x417f23[_0xb5c7('0x7b')]['length'];++_0x6a35c9){_0x1a774a=_0x417f23[_0xb5c7('0x7b')][_0x6a35c9];var _0x40fe95=_0x1a774a[_0xb5c7('0x7f')]?util[_0xb5c7('0x77')](_0xb5c7('0x80'),_0x4ede1b[_0xb5c7('0x81')],_0x1a774a['UserId']):'System';var _0x5d88c8=_0x48e6f8[_0xb5c7('0x48')][_0xb5c7('0x82')]||util[_0xb5c7('0x77')]('%s%d','Visitor',_0x1a774a['ContactId']);switch(_0x4ede1b[_0xb5c7('0x83')]){case _0xb5c7('0x84'):_0x40fe95=_0x1a774a[_0xb5c7('0x7f')]?util[_0xb5c7('0x77')](_0xb5c7('0x80'),_0x4ede1b[_0xb5c7('0x81')],_0x1a774a[_0xb5c7('0x7f')]):_0xb5c7('0x85');break;case _0xb5c7('0x86'):_0x40fe95=_0x1a774a['UserId']?_0x1a774a[_0xb5c7('0x7c')][_0xb5c7('0x87')]||_0x1a774a[_0xb5c7('0x7c')][_0xb5c7('0x53')]:'System';break;case'agent_fullname':_0x40fe95=_0x1a774a[_0xb5c7('0x7f')]?_0x1a774a['User'][_0xb5c7('0x53')]:'System';break;default:_0x40fe95=_0x1a774a[_0xb5c7('0x7f')]?util['format'](_0xb5c7('0x80'),_0x4ede1b['agentAlias'],_0x1a774a[_0xb5c7('0x7f')]):_0xb5c7('0x85');}var _0x32acfe=util[_0xb5c7('0x77')](_0xb5c7('0x88'),moment(_0x1a774a['createdAt'])['format'](_0xb5c7('0x89')),_0x1a774a[_0xb5c7('0x8a')]==='in'?_0x5d88c8:_0x40fe95,_0x1a774a['body']);if(!_0x1a774a['secret']){fs[_0xb5c7('0x8b')](_0x1d2c3d,_0x32acfe);}}return db[_0xb5c7('0x8c')][_0xb5c7('0x4b')]({'where':{'service':!![]},'include':[{'model':db[_0xb5c7('0x8d')],'as':_0xb5c7('0x8e'),'raw':!![],'include':[{'model':db[_0xb5c7('0x8f')],'as':'CloudProvider','raw':!![]}]}]});}}})[_0xb5c7('0x3b')](function(_0x504434){if(!_0x504434||!_0x504434[_0xb5c7('0x8e')]||!_0x48e6f8['body'])return _0x417f23;var _0x90b068=_0x504434[_0xb5c7('0x90')]();return respondWithRpcPromise(_0xb5c7('0x91'),_0xb5c7('0x92'),{'account':_0x90b068,'message':{'from':util[_0xb5c7('0x77')]('\x22%s\x22\x20<%s>',_0x504434[_0xb5c7('0x2c')],_0x504434[_0xb5c7('0x54')]||_0x504434['Smtp']['user']),'to':_0x48e6f8[_0xb5c7('0x48')][_0xb5c7('0x93')],'subject':_0xb5c7('0x94'),'text':util[_0xb5c7('0x77')](_0xb5c7('0x95'),_0x48e6f8[_0xb5c7('0x48')][_0xb5c7('0x93')]),'attachments':[{'path':_0x1d2c3d}]}})[_0xb5c7('0x3b')](function(){return _0x417f23;})['catch'](function(_0x24e8ed){logger[_0xb5c7('0x1a')](_0x24e8ed);});})[_0xb5c7('0x3b')](respondWithStatusCode(_0x50ac81,0xc8))['catch'](handleError(_0x50ac81,null));};exports[_0xb5c7('0x96')]=function(_0x33b31e,_0x5ae6c3){return db[_0xb5c7('0x7a')][_0xb5c7('0x49')]({'where':{'id':_0x33b31e[_0xb5c7('0x3d')]['id']}})[_0xb5c7('0x3b')](handleEntityNotFound(_0x5ae6c3,null))[_0xb5c7('0x3b')](function(_0x1cec37){if(_0x1cec37){return _0x1cec37['addMessage'](_0x33b31e['body']['ids'],_[_0xb5c7('0x97')](_0x33b31e[_0xb5c7('0x48')],[_0xb5c7('0x98'),'id'])||{});}})[_0xb5c7('0x3b')](respondWithResult(_0x5ae6c3,null))[_0xb5c7('0x1f')](handleError(_0x5ae6c3,null));};exports['getMessages']=function(_0x5d69e7,_0x4b57fc){var _0x1f6fd7={'raw':![],'where':{}};var _0x336743={};var _0x4c3357={'count':0x0,'rows':[]};return db[_0xb5c7('0x40')]['findOne']({'where':{'id':_0x5d69e7[_0xb5c7('0x3d')]['id']}})[_0xb5c7('0x3b')](handleEntityNotFound(_0x4b57fc,null))[_0xb5c7('0x3b')](function(_0xa42067){if(_0xa42067){_0x336743[_0xb5c7('0x3e')]=_[_0xb5c7('0x3f')](db['ChatMessage']['rawAttributes']);_0x336743['query']=_['keys'](_0x5d69e7[_0xb5c7('0x3a')]);_0x336743[_0xb5c7('0x41')]=_['intersection'](_0x336743['model'],_0x336743['query']);_0x1f6fd7['attributes']=_['intersection'](_0x336743['model'],qs[_0xb5c7('0x44')](_0x5d69e7[_0xb5c7('0x3a')][_0xb5c7('0x44')]));_0x1f6fd7[_0xb5c7('0x42')]=_0x1f6fd7[_0xb5c7('0x42')]['length']?_0x1f6fd7[_0xb5c7('0x42')]:_0x336743['model'];if(!_0x5d69e7['query'][_0xb5c7('0x99')](_0xb5c7('0x9a'))){_0x1f6fd7[_0xb5c7('0x25')]=qs['limit'](_0x5d69e7[_0xb5c7('0x3a')][_0xb5c7('0x25')]);_0x1f6fd7[_0xb5c7('0x24')]=qs[_0xb5c7('0x24')](_0x5d69e7[_0xb5c7('0x3a')][_0xb5c7('0x24')]);}_0x1f6fd7[_0xb5c7('0x9b')]=qs[_0xb5c7('0x9c')](_0x5d69e7[_0xb5c7('0x3a')][_0xb5c7('0x9c')]);_0x1f6fd7[_0xb5c7('0x9d')]=qs[_0xb5c7('0x41')](_[_0xb5c7('0x9e')](_0x5d69e7[_0xb5c7('0x3a')],_0x336743['filters']));_0x1f6fd7[_0xb5c7('0x9d')]['ChatInteractionId']=_0xa42067['id'];if(_0x5d69e7['query'][_0xb5c7('0x9f')]){_0x1f6fd7[_0xb5c7('0x9d')]=_[_0xb5c7('0x2f')](_0x1f6fd7[_0xb5c7('0x9d')],{'$or':_[_0xb5c7('0x33')](_0x1f6fd7['attributes'],function(_0x1bab13){var _0x19768c={};_0x19768c[_0x1bab13]={'$like':'%'+_0x5d69e7[_0xb5c7('0x3a')][_0xb5c7('0x9f')]+'%'};return _0x19768c;})});}if(_0x5d69e7[_0xb5c7('0x3a')][_0xb5c7('0xa0')]){var _0xcbeb26=_0x5d69e7[_0xb5c7('0x3a')][_0xb5c7('0xa0')][_0xb5c7('0xa1')](',');var _0x4b5825={};_0x4b5825[_0xcbeb26[0x0]]={'$gte':moment(_0xcbeb26[0x1])[_0xb5c7('0x77')]('YYYY-MM-DD\x20HH:mm:ss')};_0x1f6fd7[_0xb5c7('0x9d')]=_[_0xb5c7('0x2f')](_0x1f6fd7[_0xb5c7('0x9d')],_0x4b5825);}_0x1f6fd7=_['merge']({},_0x1f6fd7,_0x5d69e7[_0xb5c7('0x46')]);return db[_0xb5c7('0x7a')][_0xb5c7('0x23')]({'where':_0x1f6fd7[_0xb5c7('0x9d')]})['then'](function(_0x1bcee9){_0x4c3357[_0xb5c7('0x23')]=_0x1bcee9;if(_0x5d69e7[_0xb5c7('0x3a')][_0xb5c7('0x45')]){_0x1f6fd7[_0xb5c7('0xa2')]=[{'all':!![]}];}return db[_0xb5c7('0x7a')][_0xb5c7('0x38')](_0x1f6fd7);})[_0xb5c7('0x3b')](function(_0x40c914){_0x4c3357[_0xb5c7('0xa3')]=_0x40c914;return _0x4c3357;});}})[_0xb5c7('0x3b')](respondWithFilteredResult(_0x4b57fc,_0x1f6fd7))[_0xb5c7('0x1f')](handleError(_0x4b57fc,null));};exports[_0xb5c7('0xa4')]=function(_0x4b6ced,_0x5c7f83){var _0x2e4809={'where':{}},_0x2922e1={},_0xfdf573={'count':0x0,'rows':[]};return db[_0xb5c7('0x40')]['findOne']({'where':{'id':_0x4b6ced[_0xb5c7('0x3d')]['id']}})[_0xb5c7('0x3b')](handleEntityNotFound(_0x5c7f83,null))[_0xb5c7('0x3b')](function(_0x60a846){if(_0x60a846){_0x2922e1[_0xb5c7('0x3e')]=_[_0xb5c7('0x3f')](db[_0xb5c7('0x7a')]['rawAttributes']);_0x2922e1[_0xb5c7('0x3a')]=_[_0xb5c7('0x3f')](_0x4b6ced['query']);_0x2922e1['filters']=_[_0xb5c7('0x43')](_0x2922e1[_0xb5c7('0x3e')],_0x2922e1[_0xb5c7('0x3a')]);_0x2e4809[_0xb5c7('0x42')]=_['intersection'](_0x2922e1[_0xb5c7('0x3e')],qs[_0xb5c7('0x44')](_0x4b6ced[_0xb5c7('0x3a')][_0xb5c7('0x44')]));_0x2e4809[_0xb5c7('0x42')]=_0x2e4809[_0xb5c7('0x42')]['length']?_0x2e4809[_0xb5c7('0x42')]:_0x2922e1['model'];if(!_0x4b6ced[_0xb5c7('0x3a')][_0xb5c7('0x99')](_0xb5c7('0x9a'))){_0x2e4809[_0xb5c7('0x25')]=qs['limit'](_0x4b6ced[_0xb5c7('0x3a')][_0xb5c7('0x25')]);_0x2e4809['offset']=qs['offset'](_0x4b6ced['query']['offset']);}_0x2e4809[_0xb5c7('0x9b')]=qs[_0xb5c7('0x9c')](_0x4b6ced[_0xb5c7('0x3a')][_0xb5c7('0x9c')]);_0x2e4809[_0xb5c7('0x9d')]=qs[_0xb5c7('0x41')](_[_0xb5c7('0x9e')](_0x4b6ced[_0xb5c7('0x3a')],_0x2922e1['filters']));_0x2e4809[_0xb5c7('0x9d')][_0xb5c7('0xa5')]=_0x60a846['id'];if(_0x4b6ced['query']['filter']){_0x2e4809[_0xb5c7('0x9d')]=_[_0xb5c7('0x2f')](_0x2e4809[_0xb5c7('0x9d')],{'$or':_[_0xb5c7('0x33')](_0x2e4809['attributes'],function(_0x179d3c){var _0x28c03a={};_0x28c03a[_0x179d3c]={'$like':'%'+_0x4b6ced[_0xb5c7('0x3a')]['filter']+'%'};return _0x28c03a;})});}_0x2e4809['where'][_0xb5c7('0xa6')]=![];if(_0x4b6ced[_0xb5c7('0x3a')]['id']){_0x2e4809[_0xb5c7('0x9d')]['id']={'$gt':_0x4b6ced[_0xb5c7('0x3a')]['id']};}_0x2e4809=_[_0xb5c7('0x2f')]({},_0x2e4809,_0x4b6ced[_0xb5c7('0x46')]);return db['ChatMessage'][_0xb5c7('0x23')]({'where':_0x2e4809['where']})[_0xb5c7('0x3b')](function(_0x26a308){_0xfdf573['count']=_0x26a308;_0x2e4809[_0xb5c7('0xa2')]=[];if(_0x4b6ced['query'][_0xb5c7('0xa7')]){_0x2e4809[_0xb5c7('0xa2')][_0xb5c7('0xa8')]({'model':db[_0xb5c7('0x7c')],'as':_0xb5c7('0x7c'),'attributes':['id',_0xb5c7('0x53'),_0xb5c7('0x87')]});}if(_0x4b6ced['query'][_0xb5c7('0x45')]){_0x2e4809[_0xb5c7('0xa2')]=[{'all':!![]}];}return db['ChatMessage'][_0xb5c7('0x38')](_0x2e4809);})[_0xb5c7('0x3b')](function(_0xf80818){_0xfdf573[_0xb5c7('0xa3')]=_0xf80818;return _0xfdf573;});}})[_0xb5c7('0x3b')](respondWithFilteredResult(_0x5c7f83,_0x2e4809))['catch'](handleError(_0x5c7f83,null));};exports[_0xb5c7('0xa9')]=function(_0x28a56e,_0x4db850){return db[_0xb5c7('0x40')][_0xb5c7('0x49')]({'where':{'id':_0x28a56e['params']['id']}})[_0xb5c7('0x3b')](handleEntityNotFound(_0x4db850,null))[_0xb5c7('0x3b')](function(_0xc051b2){if(_0xc051b2){return _0xc051b2[_0xb5c7('0xaa')](_0x28a56e['body'][_0xb5c7('0x98')],_[_0xb5c7('0x97')](_0x28a56e[_0xb5c7('0x48')],[_0xb5c7('0x98'),'id'])||{})[_0xb5c7('0xab')](function(){return db[_0xb5c7('0xac')][_0xb5c7('0x38')]({'attributes':['id',_0xb5c7('0x2c'),'color'],'where':{'id':_0x28a56e['body'][_0xb5c7('0x98')]}});})['then'](function(_0x36682e){socket[_0xb5c7('0xad')](_0xb5c7('0xae'),{'id':Number(_0x28a56e[_0xb5c7('0x3d')]['id']),'tags':_0x36682e||[]});return{'id':Number(_0x28a56e[_0xb5c7('0x3d')]['id']),'tags':_0x36682e||[]};});}})[_0xb5c7('0x3b')](respondWithResult(_0x4db850,null))[_0xb5c7('0x1f')](handleError(_0x4db850,null));};exports[_0xb5c7('0xaf')]=function(_0x2808ed,_0x245fa0){return db[_0xb5c7('0x40')]['find']({'where':{'id':_0x2808ed['params']['id']}})[_0xb5c7('0x3b')](handleEntityNotFound(_0x245fa0,null))[_0xb5c7('0x3b')](function(_0x521faf){if(_0x521faf){return _0x521faf[_0xb5c7('0xaf')](_0x2808ed[_0xb5c7('0x3a')][_0xb5c7('0x98')]);}})[_0xb5c7('0x3b')](respondWithStatusCode(_0x245fa0,null))[_0xb5c7('0x1f')](handleError(_0x245fa0,null));};exports[_0xb5c7('0xb0')]=function(_0x45c97e,_0x1cf709){var _0x37508e=moment()[_0xb5c7('0xb1')]()[_0xb5c7('0xb2')]();var _0x2908d4=path['join'](config[_0xb5c7('0x75')],_0xb5c7('0xb3'),'files','tmp');var _0x18bc56=path[_0xb5c7('0x74')](config[_0xb5c7('0x75')],_0xb5c7('0xb3'),'files','attachments');var _0x288478=path[_0xb5c7('0x74')](_0x2908d4,_0x37508e);var _0x42a613=util[_0xb5c7('0x77')]('transcript-%d-%s.zip',_0x45c97e[_0xb5c7('0x3d')]['id'],_0x37508e);var _0x1746e1=path['join'](_0x2908d4,_0x42a613);var _0x1a1c60=[];_0x1a1c60['push']({'model':db['User'],'as':_0xb5c7('0x7c'),'attributes':['id',_0xb5c7('0x53')],'raw':!![]});_0x1a1c60[_0xb5c7('0xa8')]({'model':db['CmContact'],'as':_0xb5c7('0xb4'),'attributes':['id',_0xb5c7('0xb5'),_0xb5c7('0xb6')],'raw':!![]});if(_0x45c97e[_0xb5c7('0x3a')][_0xb5c7('0xb7')]){_0x1a1c60[_0xb5c7('0xa8')]({'model':db['Attachment'],'as':_0xb5c7('0x70'),'raw':!![]});}var _0x2f5648=[{'model':db['ChatMessage'],'as':'Messages','attributes':['id','body',_0xb5c7('0xb8'),_0xb5c7('0x8a'),'secret',_0xb5c7('0xb9')],'include':_0x1a1c60}];_0x2f5648[_0xb5c7('0xa8')]({'model':db[_0xb5c7('0x4c')],'as':'Account','attributes':['id','name']});_0x2f5648[_0xb5c7('0xa8')]({'model':db[_0xb5c7('0x7c')],'as':_0xb5c7('0xba'),'attributes':['id','fullname']});return db[_0xb5c7('0x40')][_0xb5c7('0x49')]({'where':{'id':_0x45c97e[_0xb5c7('0x3d')]['id']},'include':_0x2f5648})[_0xb5c7('0x3b')](handleEntityNotFound(_0x1cf709,null))['then'](function(_0x4e33cb){if(_0x4e33cb){var _0x1297a4=_0x4e33cb['get']({'plain':!![]});fs['mkdirSync'](_0x288478);var _0x34171c={'channel':'Chat','account':_0x1297a4[_0xb5c7('0xbb')][_0xb5c7('0x2c')],'agent':_0x1297a4[_0xb5c7('0xba')]?_0x1297a4[_0xb5c7('0xba')][_0xb5c7('0x53')]:_0xb5c7('0xbc'),'createdAt':moment(_0x1297a4[_0xb5c7('0xb8')])['format'](_0xb5c7('0xbd'))['toString'](),'closedAt':_0x1297a4[_0xb5c7('0x68')]?moment(_0x1297a4[_0xb5c7('0xbe')])[_0xb5c7('0x77')](_0xb5c7('0xbd'))['toString']():'','disposition':_0x1297a4[_0xb5c7('0x69')],'chatInfo':{'browser':_0x1297a4['browserName'],'os':_0x1297a4['osName'],'referer':_0x1297a4['referer'],'customerIp':_0x1297a4[_0xb5c7('0xbf')],'customerPort':_0x1297a4['customerPort']?_0x1297a4[_0xb5c7('0xc0')]:'N.A.'},'messages':_(_0x1297a4[_0xb5c7('0x7b')])['tail']()[_0xb5c7('0x9f')]({'secret':![]})[_0xb5c7('0x33')](function(_0x2fa8b1){if(_0x2fa8b1[_0xb5c7('0x70')]){var _0x3db17c=path[_0xb5c7('0x74')](_0x18bc56,_0x2fa8b1[_0xb5c7('0x70')][_0xb5c7('0x6d')]);if(fs[_0xb5c7('0xc1')](_0x3db17c)){fs[_0xb5c7('0xc2')](_0x3db17c)['pipe'](fs[_0xb5c7('0xc3')](path[_0xb5c7('0x74')](_0x288478,_0x2fa8b1[_0xb5c7('0x70')][_0xb5c7('0x6d')])));}}return{'date':moment(_0x2fa8b1[_0xb5c7('0xb8')])[_0xb5c7('0x77')](_0xb5c7('0xbd'))[_0xb5c7('0xb2')](),'sender':_0x2fa8b1[_0xb5c7('0x8a')]===_0xb5c7('0x61')?_0x2fa8b1[_0xb5c7('0x7c')]?_0x2fa8b1[_0xb5c7('0x7c')][_0xb5c7('0x53')]:'System':_0x2fa8b1[_0xb5c7('0xb4')]['firstName']+(_0x2fa8b1[_0xb5c7('0xb4')][_0xb5c7('0xb6')]?'\x20'+_0x2fa8b1[_0xb5c7('0xb4')][_0xb5c7('0xb6')]:''),'body':_0x2fa8b1[_0xb5c7('0x70')]?_0x2fa8b1[_0xb5c7('0x70')][_0xb5c7('0x6d')]:_0x2fa8b1[_0xb5c7('0x48')],'direction':_0x2fa8b1[_0xb5c7('0x8a')]===_0xb5c7('0x61')?'A':'C','secret':_0x2fa8b1[_0xb5c7('0xa6')],'read':_0x2fa8b1[_0xb5c7('0xb9')],'attachment':_0x2fa8b1[_0xb5c7('0x70')]};})['value']()};return ejs[_0xb5c7('0xc4')](path[_0xb5c7('0x74')](config[_0xb5c7('0x75')],'server','views',_0xb5c7('0xc5')),{'interaction':_0x34171c})[_0xb5c7('0x3b')](function(_0x107f02){var _0xa692e0=path[_0xb5c7('0x74')](_0x288478,_0xb5c7('0xc6')+_0x1297a4['id']+'-'+_0x37508e+'.pdf');var _0xf75de0={'path':_0xa692e0,'channel':_0xb5c7('0xc7'),'interactionId':_0x1297a4['id']};return pdf[_0xb5c7('0xc8')](_0x107f02,_0xf75de0);})['then'](function(){return new Promise(function(_0xb482ca,_0x1b04bd){zipdir(_0x288478,{'saveTo':_0x1746e1},function(_0xb60203,_0x5badee){if(_0xb60203)return _0x1b04bd(_0xb60203);return _0xb482ca(_0x5badee);});})[_0xb5c7('0x3b')](function(){return new BPromise(function(_0x510451,_0x34c8f1){rimraf(_0x288478,function(_0x57a4eb){if(_0x57a4eb)_0x34c8f1(_0x57a4eb);return _0x510451();});});})[_0xb5c7('0x3b')](function(){return _0x1cf709[_0xb5c7('0xb0')](_0x1746e1,_0x42a613,function(_0x5824eb){if(_0x5824eb){logger['error'](_0xb5c7('0xc9'),_0x5824eb);}else{fs[_0xb5c7('0xca')](_0x1746e1);}});});});}else{return _0x1cf709['sendStatus'](0xc8);}})[_0xb5c7('0x1f')](handleError(_0x1cf709,null));};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.events.js b/server/api/chatInteraction/chatInteraction.events.js
index 29d4f70..215ed23 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 _0x5d6f=['unreadMessages','length','emit','catch','hasOwnProperty','events','../../mysqldb','ChatInteraction','ChatMessage','setMaxListeners','save','update','remove','then','setDataValue','map','findAll'];(function(_0x4f0dd8,_0x5f3912){var _0x121c01=function(_0x4e59f9){while(--_0x4e59f9){_0x4f0dd8['push'](_0x4f0dd8['shift']());}};_0x121c01(++_0x5f3912);}(_0x5d6f,0x1e1));var _0xf5d6=function(_0x606fe8,_0x10b084){_0x606fe8=_0x606fe8-0x0;var _0x28b517=_0x5d6f[_0x606fe8];return _0x28b517;};'use strict';var EventEmitter=require(_0xf5d6('0x0'));var ChatInteraction=require(_0xf5d6('0x1'))['db'][_0xf5d6('0x2')];var ChatMessage=require('../../mysqldb')['db'][_0xf5d6('0x3')];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents[_0xf5d6('0x4')](0x0);var events={'afterCreate':_0xf5d6('0x5'),'afterUpdate':_0xf5d6('0x6'),'afterDestroy':_0xf5d6('0x7')};function emitEvent(_0x4f4043){return function(_0x224a69,_0x529c61,_0x451a7a){_0x224a69['getUsers']({'attributes':['id'],'raw':!![]})[_0xf5d6('0x8')](function(_0x1b8a99){_0x224a69[_0xf5d6('0x9')]('Users',_0x1b8a99[_0xf5d6('0xa')](function(_0x1da504){return{'id':_0x1da504['id']};}));return ChatMessage[_0xf5d6('0xb')]({'where':{'ChatInteractionId':_0x224a69['id'],'direction':'in','read':![]},'raw':!![]});})[_0xf5d6('0x8')](function(_0x11b91e){_0x224a69[_0xf5d6('0x9')](_0xf5d6('0xc'),_0x11b91e[_0xf5d6('0xd')]);ChatInteractionEvents[_0xf5d6('0xe')](_0x4f4043+':'+_0x224a69['id'],_0x224a69);ChatInteractionEvents[_0xf5d6('0xe')](_0x4f4043,_0x224a69);_0x451a7a(null);})[_0xf5d6('0xf')](_0x451a7a(null));};}for(var e in events){if(events[_0xf5d6('0x10')](e)){var event=events[e];ChatInteraction['hook'](e,emitEvent(event));}}module['exports']=ChatInteractionEvents;
\ No newline at end of file
+var _0x37a1=['update','getUsers','setDataValue','map','findAll','unreadMessages','length','emit','hasOwnProperty','hook','exports','events','../../mysqldb','ChatInteraction','ChatMessage','save'];(function(_0x56ddef,_0x595bac){var _0x13f1ab=function(_0x118caf){while(--_0x118caf){_0x56ddef['push'](_0x56ddef['shift']());}};_0x13f1ab(++_0x595bac);}(_0x37a1,0x12b));var _0x137a=function(_0x29cbb6,_0x3c0196){_0x29cbb6=_0x29cbb6-0x0;var _0x2674f4=_0x37a1[_0x29cbb6];return _0x2674f4;};'use strict';var EventEmitter=require(_0x137a('0x0'));var ChatInteraction=require(_0x137a('0x1'))['db'][_0x137a('0x2')];var ChatMessage=require('../../mysqldb')['db'][_0x137a('0x3')];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x137a('0x4'),'afterUpdate':_0x137a('0x5'),'afterDestroy':'remove'};function emitEvent(_0x3555b2){return function(_0x1ff7e3,_0x5ed784,_0x2991a3){_0x1ff7e3[_0x137a('0x6')]({'attributes':['id'],'raw':!![]})['then'](function(_0x4ca6a0){_0x1ff7e3[_0x137a('0x7')]('Users',_0x4ca6a0[_0x137a('0x8')](function(_0x109bb5){return{'id':_0x109bb5['id']};}));return ChatMessage[_0x137a('0x9')]({'where':{'ChatInteractionId':_0x1ff7e3['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x37ffce){_0x1ff7e3['setDataValue'](_0x137a('0xa'),_0x37ffce[_0x137a('0xb')]);ChatInteractionEvents[_0x137a('0xc')](_0x3555b2+':'+_0x1ff7e3['id'],_0x1ff7e3);ChatInteractionEvents[_0x137a('0xc')](_0x3555b2,_0x1ff7e3);_0x2991a3(null);})['catch'](_0x2991a3(null));};}for(var e in events){if(events[_0x137a('0xd')](e)){var event=events[e];ChatInteraction[_0x137a('0xe')](e,emitEvent(event));}}module[_0x137a('0xf')]=ChatInteractionEvents;
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.model.js b/server/api/chatInteraction/chatInteraction.model.js
index 6e1cbc9..a8ff40d 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 _0x9c6d=['request-promise','path','../../config/environment','exports','define','ChatInteraction','changed','closed','closedAt','format','utf8mb4','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x4a34e0,_0x29ff2f){var _0xb5ce1d=function(_0x225c39){while(--_0x225c39){_0x4a34e0['push'](_0x4a34e0['shift']());}};_0xb5ce1d(++_0x29ff2f);}(_0x9c6d,0x1d6));var _0xd9c6=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x9c6d[_0x2dafbe];return _0x58a45a;};'use strict';var _=require(_0xd9c6('0x0'));var util=require(_0xd9c6('0x1'));var logger=require(_0xd9c6('0x2'))(_0xd9c6('0x3'));var moment=require(_0xd9c6('0x4'));var BPromise=require(_0xd9c6('0x5'));var rp=require(_0xd9c6('0x6'));var fs=require('fs');var path=require(_0xd9c6('0x7'));var rimraf=require('rimraf');var config=require(_0xd9c6('0x8'));var attributes=require('./chatInteraction.attributes');module[_0xd9c6('0x9')]=function(_0x353206,_0x18def6){return _0x353206[_0xd9c6('0xa')](_0xd9c6('0xb'),attributes,{'tableName':'chat_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x5d95c6,_0x566046,_0x25ac30){if(_0x5d95c6[_0xd9c6('0xc')](_0xd9c6('0xd'))){_0x5d95c6[_0xd9c6('0xe')]=moment()[_0xd9c6('0xf')]('YYYY-MM-DD\x20HH:mm:ss');}_0x25ac30(null,_0x5d95c6);}},'charset':_0xd9c6('0x10'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x32f8=['../../config/logger','api','moment','request-promise','path','../../config/environment','./chatInteraction.attributes','exports','ChatInteraction','chat_interactions','changed','format','YYYY-MM-DD\x20HH:mm:ss','utf8mb4_unicode_ci'];(function(_0x3e5fde,_0x11c007){var _0x46b207=function(_0xb5ed62){while(--_0xb5ed62){_0x3e5fde['push'](_0x3e5fde['shift']());}};_0x46b207(++_0x11c007);}(_0x32f8,0x188));var _0x832f=function(_0x3c56b6,_0x453d68){_0x3c56b6=_0x3c56b6-0x0;var _0x101256=_0x32f8[_0x3c56b6];return _0x101256;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x832f('0x0'))(_0x832f('0x1'));var moment=require(_0x832f('0x2'));var BPromise=require('bluebird');var rp=require(_0x832f('0x3'));var fs=require('fs');var path=require(_0x832f('0x4'));var rimraf=require('rimraf');var config=require(_0x832f('0x5'));var attributes=require(_0x832f('0x6'));module[_0x832f('0x7')]=function(_0x1cdcde,_0x5056e2){return _0x1cdcde['define'](_0x832f('0x8'),attributes,{'tableName':_0x832f('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x249b9a,_0x3b9761,_0x2bde7e){if(_0x249b9a[_0x832f('0xa')]('closed')){_0x249b9a['closedAt']=moment()[_0x832f('0xb')](_0x832f('0xc'));}_0x2bde7e(null,_0x249b9a);}},'charset':'utf8mb4','collate':_0x832f('0xd')});};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.rpc.js b/server/api/chatInteraction/chatInteraction.rpc.js
index 0611b68..67f432c 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 _0x0160=['info','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','code','ChatInteraction,\x20%s,\x20%s','error','message','result','catch','ChatInteraction','body','options','raw','where','attributes','limit','UpdateChatInteraction','AddTagsToChatInteraction','find','ids','omit','AddTags','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./chatInteraction.socket','register','then'];(function(_0x4e6d39,_0x47c75d){var _0x4597b4=function(_0x2d4d07){while(--_0x2d4d07){_0x4e6d39['push'](_0x4e6d39['shift']());}};_0x4597b4(++_0x47c75d);}(_0x0160,0x90));var _0x0016=function(_0x10d34b,_0x4fef76){_0x10d34b=_0x10d34b-0x0;var _0x92b0bf=_0x0160[_0x10d34b];return _0x92b0bf;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x0016('0x0'));var fs=require('fs');var Redis=require(_0x0016('0x1'));var db=require(_0x0016('0x2'))['db'];var utils=require(_0x0016('0x3'));var logger=require(_0x0016('0x4'))(_0x0016('0x5'));var config=require(_0x0016('0x6'));var jayson=require(_0x0016('0x7'));var client=jayson['client'][_0x0016('0x8')]({'port':0x232a});config[_0x0016('0x9')]=_[_0x0016('0xa')](config[_0x0016('0x9')],{'host':_0x0016('0xb'),'port':0x18eb});var socket=require(_0x0016('0xc'))(new Redis(config['redis']));require(_0x0016('0xd'))[_0x0016('0xe')](socket);function respondWithRpcPromise(_0x551097,_0x12bda1,_0x381ffd){return new BPromise(function(_0x4eb06f,_0x1bbd18){return client['request'](_0x551097,_0x381ffd)[_0x0016('0xf')](function(_0x334274){logger[_0x0016('0x10')]('ChatInteraction,\x20%s,\x20%s',_0x12bda1,_0x0016('0x11'));logger[_0x0016('0x12')](_0x0016('0x13'),_0x12bda1,_0x0016('0x11'),JSON[_0x0016('0x14')](_0x334274));if(_0x334274['error']){if(_0x334274['error'][_0x0016('0x15')]===0x1f4){logger['error'](_0x0016('0x16'),_0x12bda1,_0x334274[_0x0016('0x17')]['message']);return _0x1bbd18(_0x334274[_0x0016('0x17')][_0x0016('0x18')]);}logger[_0x0016('0x17')]('ChatInteraction,\x20%s,\x20%s',_0x12bda1,_0x334274[_0x0016('0x17')][_0x0016('0x18')]);return _0x4eb06f(_0x334274['error'][_0x0016('0x18')]);}else{logger[_0x0016('0x10')](_0x0016('0x16'),_0x12bda1,_0x0016('0x11'));_0x4eb06f(_0x334274[_0x0016('0x19')][_0x0016('0x18')]);}})[_0x0016('0x1a')](function(_0x48e1a1){logger[_0x0016('0x17')](_0x0016('0x16'),_0x12bda1,_0x48e1a1);_0x1bbd18(_0x48e1a1);});});}exports['UpdateChatInteraction']=function(_0x9cafc3){var _0x55e62e=this;return new Promise(function(_0x14e4ad,_0x429894){return db[_0x0016('0x1b')]['update'](_0x9cafc3[_0x0016('0x1c')],{'raw':_0x9cafc3[_0x0016('0x1d')]?_0x9cafc3['options'][_0x0016('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x9cafc3['options']?_0x9cafc3['options'][_0x0016('0x1f')]||null:null,'attributes':_0x9cafc3['options']?_0x9cafc3[_0x0016('0x1d')][_0x0016('0x20')]||null:null,'limit':_0x9cafc3[_0x0016('0x1d')]?_0x9cafc3[_0x0016('0x1d')][_0x0016('0x21')]||null:null})[_0x0016('0xf')](function(_0x6c046a){logger[_0x0016('0x10')]('UpdateChatInteraction',_0x9cafc3);logger[_0x0016('0x12')](_0x0016('0x22'),_0x9cafc3,JSON[_0x0016('0x14')](_0x6c046a));_0x14e4ad(_0x6c046a);})['catch'](function(_0x5a99e0){logger[_0x0016('0x17')](_0x0016('0x22'),_0x5a99e0['message'],_0x9cafc3);_0x429894(_0x55e62e[_0x0016('0x17')](0x1f4,_0x5a99e0[_0x0016('0x18')]));});});};exports[_0x0016('0x23')]=function(_0xcad2c4){return new Promise(function(_0x3c845a,_0x23428b){return db['ChatInteraction'][_0x0016('0x24')]({'where':_0xcad2c4[_0x0016('0x1d')]?_0xcad2c4[_0x0016('0x1d')][_0x0016('0x1f')]||null:null})[_0x0016('0xf')](function(_0x2c039b){if(_0x2c039b){return _0x2c039b['addTags'](_0xcad2c4[_0x0016('0x1c')][_0x0016('0x25')],_[_0x0016('0x26')](_0xcad2c4['body'],[_0x0016('0x25'),'id'])||{});}})['spread'](function(_0x102376){logger[_0x0016('0x10')](_0x0016('0x27'),_0xcad2c4);logger[_0x0016('0x12')](_0x0016('0x27'),_0xcad2c4,JSON[_0x0016('0x14')](_0x102376));_0x3c845a(_0x102376);})[_0x0016('0x1a')](function(_0x4bcecf){logger[_0x0016('0x17')](_0x0016('0x27'),_0x4bcecf[_0x0016('0x18')],_0xcad2c4);_0x23428b(_this[_0x0016('0x17')](0x1f4,_0x4bcecf[_0x0016('0x18')]));});});};
\ No newline at end of file
+var _0x4499=['ChatInteraction,\x20%s,\x20%s','request\x20sent','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','UpdateChatInteraction','ChatInteraction','update','body','options','raw','attributes','limit','debug','AddTagsToChatInteraction','find','where','ids','omit','AddTags','util','moment','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./chatInteraction.socket','request','then','info'];(function(_0x5a7f64,_0x347d57){var _0x3d30f1=function(_0x4bd1d6){while(--_0x4bd1d6){_0x5a7f64['push'](_0x5a7f64['shift']());}};_0x3d30f1(++_0x347d57);}(_0x4499,0xc0));var _0x9449=function(_0x4a01a3,_0xa47ef6){_0x4a01a3=_0x4a01a3-0x0;var _0xd20294=_0x4499[_0x4a01a3];return _0xd20294;};'use strict';var _=require('lodash');var util=require(_0x9449('0x0'));var moment=require(_0x9449('0x1'));var BPromise=require('bluebird');var rs=require(_0x9449('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9449('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x9449('0x4'))(_0x9449('0x5'));var config=require(_0x9449('0x6'));var jayson=require(_0x9449('0x7'));var client=jayson[_0x9449('0x8')][_0x9449('0x9')]({'port':0x232a});config[_0x9449('0xa')]=_[_0x9449('0xb')](config[_0x9449('0xa')],{'host':_0x9449('0xc'),'port':0x18eb});var socket=require(_0x9449('0xd'))(new Redis(config[_0x9449('0xa')]));require(_0x9449('0xe'))['register'](socket);function respondWithRpcPromise(_0x2341a6,_0x163f19,_0x3f0f78){return new BPromise(function(_0x2716a1,_0x38d2e1){return client[_0x9449('0xf')](_0x2341a6,_0x3f0f78)[_0x9449('0x10')](function(_0x583665){logger[_0x9449('0x11')](_0x9449('0x12'),_0x163f19,_0x9449('0x13'));logger['debug'](_0x9449('0x14'),_0x163f19,_0x9449('0x13'),JSON[_0x9449('0x15')](_0x583665));if(_0x583665[_0x9449('0x16')]){if(_0x583665['error'][_0x9449('0x17')]===0x1f4){logger['error'](_0x9449('0x12'),_0x163f19,_0x583665[_0x9449('0x16')][_0x9449('0x18')]);return _0x38d2e1(_0x583665[_0x9449('0x16')][_0x9449('0x18')]);}logger[_0x9449('0x16')](_0x9449('0x12'),_0x163f19,_0x583665[_0x9449('0x16')][_0x9449('0x18')]);return _0x2716a1(_0x583665[_0x9449('0x16')]['message']);}else{logger['info']('ChatInteraction,\x20%s,\x20%s',_0x163f19,_0x9449('0x13'));_0x2716a1(_0x583665[_0x9449('0x19')][_0x9449('0x18')]);}})[_0x9449('0x1a')](function(_0x4ff06b){logger[_0x9449('0x16')]('ChatInteraction,\x20%s,\x20%s',_0x163f19,_0x4ff06b);_0x38d2e1(_0x4ff06b);});});}exports[_0x9449('0x1b')]=function(_0x257b7f){var _0x25e23c=this;return new Promise(function(_0x986ab9,_0x1f4615){return db[_0x9449('0x1c')][_0x9449('0x1d')](_0x257b7f[_0x9449('0x1e')],{'raw':_0x257b7f[_0x9449('0x1f')]?_0x257b7f['options'][_0x9449('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x257b7f[_0x9449('0x1f')]?_0x257b7f[_0x9449('0x1f')]['where']||null:null,'attributes':_0x257b7f['options']?_0x257b7f[_0x9449('0x1f')][_0x9449('0x21')]||null:null,'limit':_0x257b7f[_0x9449('0x1f')]?_0x257b7f['options'][_0x9449('0x22')]||null:null})[_0x9449('0x10')](function(_0x18d427){logger[_0x9449('0x11')](_0x9449('0x1b'),_0x257b7f);logger[_0x9449('0x23')](_0x9449('0x1b'),_0x257b7f,JSON['stringify'](_0x18d427));_0x986ab9(_0x18d427);})[_0x9449('0x1a')](function(_0x5b99b3){logger[_0x9449('0x16')](_0x9449('0x1b'),_0x5b99b3[_0x9449('0x18')],_0x257b7f);_0x1f4615(_0x25e23c[_0x9449('0x16')](0x1f4,_0x5b99b3[_0x9449('0x18')]));});});};exports[_0x9449('0x24')]=function(_0x52dcc3){return new Promise(function(_0xdbc0cd,_0x34ee45){return db[_0x9449('0x1c')][_0x9449('0x25')]({'where':_0x52dcc3[_0x9449('0x1f')]?_0x52dcc3[_0x9449('0x1f')][_0x9449('0x26')]||null:null})[_0x9449('0x10')](function(_0x294a4f){if(_0x294a4f){return _0x294a4f['addTags'](_0x52dcc3[_0x9449('0x1e')][_0x9449('0x27')],_[_0x9449('0x28')](_0x52dcc3[_0x9449('0x1e')],['ids','id'])||{});}})['spread'](function(_0x5cfba8){logger[_0x9449('0x11')](_0x9449('0x29'),_0x52dcc3);logger['debug'](_0x9449('0x29'),_0x52dcc3,JSON[_0x9449('0x15')](_0x5cfba8));_0xdbc0cd(_0x5cfba8);})['catch'](function(_0x4a8646){logger[_0x9449('0x16')](_0x9449('0x29'),_0x4a8646[_0x9449('0x18')],_0x52dcc3);_0x34ee45(_this['error'](0x1f4,_0x4a8646[_0x9449('0x18')]));});});};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.socket.js b/server/api/chatInteraction/chatInteraction.socket.js
index 7b3421a..e082384 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 _0xfdb1=['remove','update','emit','register','length','./chatInteraction.events','save'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xfdb1,0x1cc));var _0x1fdb=function(_0x20d99f,_0x1c7a6a){_0x20d99f=_0x20d99f-0x0;var _0x585f44=_0xfdb1[_0x20d99f];return _0x585f44;};'use strict';var ChatInteractionEvents=require(_0x1fdb('0x0'));var events=[_0x1fdb('0x1'),_0x1fdb('0x2'),_0x1fdb('0x3')];function createListener(_0x4ac9df,_0x76749f){return function(_0x181b70){_0x76749f[_0x1fdb('0x4')](_0x4ac9df,_0x181b70);};}function removeListener(_0x5d78a7,_0x51f353){return function(){ChatInteractionEvents['removeListener'](_0x5d78a7,_0x51f353);};}exports[_0x1fdb('0x5')]=function(_0x402bdb){for(var _0x358db2=0x0,_0xeb8854=events[_0x1fdb('0x6')];_0x358db2<_0xeb8854;_0x358db2++){var _0x46554d=events[_0x358db2];var _0x2cb800=createListener('chatInteraction:'+_0x46554d,_0x402bdb);ChatInteractionEvents['on'](_0x46554d,_0x2cb800);}};
\ No newline at end of file
+var _0xdfe8=['removeListener','register','length','chatInteraction:','./chatInteraction.events','save','remove','update'];(function(_0x27af45,_0x1b57aa){var _0x18df21=function(_0x4b7679){while(--_0x4b7679){_0x27af45['push'](_0x27af45['shift']());}};_0x18df21(++_0x1b57aa);}(_0xdfe8,0x12c));var _0x8dfe=function(_0x5f1617,_0x46277b){_0x5f1617=_0x5f1617-0x0;var _0x3af5da=_0xdfe8[_0x5f1617];return _0x3af5da;};'use strict';var ChatInteractionEvents=require(_0x8dfe('0x0'));var events=[_0x8dfe('0x1'),_0x8dfe('0x2'),_0x8dfe('0x3')];function createListener(_0x4c065d,_0x117e0a){return function(_0x3d41c1){_0x117e0a['emit'](_0x4c065d,_0x3d41c1);};}function removeListener(_0x1840f9,_0x54610e){return function(){ChatInteractionEvents[_0x8dfe('0x4')](_0x1840f9,_0x54610e);};}exports[_0x8dfe('0x5')]=function(_0xb4e83e){for(var _0x5e12bb=0x0,_0x46d075=events[_0x8dfe('0x6')];_0x5e12bb<_0x46d075;_0x5e12bb++){var _0x3580cb=events[_0x5e12bb];var _0x17e2ef=createListener(_0x8dfe('0x7')+_0x3580cb,_0xb4e83e);ChatInteractionEvents['on'](_0x3580cb,_0x17e2ef);}};
\ No newline at end of file
diff --git a/server/api/chatInteraction/index.js b/server/api/chatInteraction/index.js
index 2ce7c59..4d8fa4e 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 _0x323a=['Router','../../config/environment','isAuthenticated','index','get','/describe','describe','/:id','isChatInteractionAuthorized','show','/:id/messages','/:id/download','download','post','create','/:id/vidaoo','createVidaooSession','diskStorage','join','root','server/files/attachments/','format','%s-%s','originalname','replace','/:id/attachment_upload','single','attachmentUpload','addMessage','tracked','chat','chatinteraction:addtags','addTags','put','chatinteraction:update','/:id/custom_update','customUpdate','/:id/abandon','close','delete','chatinteraction:destroy','/:id/tags','removeTags','connect-timeout'];(function(_0xa74c63,_0x267bd1){var _0x5f4b45=function(_0xc94017){while(--_0xc94017){_0xa74c63['push'](_0xa74c63['shift']());}};_0x5f4b45(++_0x267bd1);}(_0x323a,0x133));var _0xa323=function(_0x25c106,_0x5b97a5){_0x25c106=_0x25c106-0x0;var _0x4ff2ce=_0x323a[_0x25c106];return _0x4ff2ce;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0xa323('0x0'));var express=require('express');var router=express[_0xa323('0x1')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xa323('0x2'));var controller=require('./chatInteraction.controller');router['get']('/',auth[_0xa323('0x3')](),controller[_0xa323('0x4')]);router[_0xa323('0x5')](_0xa323('0x6'),auth[_0xa323('0x3')](),controller[_0xa323('0x7')]);router[_0xa323('0x5')](_0xa323('0x8'),auth[_0xa323('0x9')](),controller[_0xa323('0xa')]);router[_0xa323('0x5')]('/:id/attachment_download',auth[_0xa323('0x9')](),controller['attachmentDownload']);router['get'](_0xa323('0xb'),auth[_0xa323('0x3')](),controller['getMessages']);router['get']('/:id/my_messages',auth[_0xa323('0x9')](),controller['getMyMessages']);router['get'](_0xa323('0xc'),auth[_0xa323('0x3')](),controller[_0xa323('0xd')]);router[_0xa323('0xe')]('/',auth[_0xa323('0x3')](),controller[_0xa323('0xf')]);router[_0xa323('0xe')](_0xa323('0x10'),auth[_0xa323('0x3')](),controller[_0xa323('0x11')]);var upload=multer({'storage':multer[_0xa323('0x12')]({'destination':function(_0x574058,_0x45f6c2,_0x538790){_0x538790(null,path[_0xa323('0x13')](config[_0xa323('0x14')],_0xa323('0x15')));},'filename':function(_0x491425,_0x26f4d1,_0x26bada){_0x26bada(null,util[_0xa323('0x16')](_0xa323('0x17'),Date['now'](),_0x26f4d1[_0xa323('0x18')][_0xa323('0x19')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router['post'](_0xa323('0x1a'),upload[_0xa323('0x1b')]('file'),controller[_0xa323('0x1c')]);router[_0xa323('0xe')](_0xa323('0xb'),auth['isChatInteractionAuthorized'](),controller[_0xa323('0x1d')]);router[_0xa323('0xe')]('/:id/tags',auth['isAuthenticated'](),interaction[_0xa323('0x1e')](_0xa323('0x1f'),_0xa323('0x20')),controller[_0xa323('0x21')]);router[_0xa323('0x22')](_0xa323('0x8'),auth['isAuthenticated'](),interaction[_0xa323('0x1e')]('chat',_0xa323('0x23')),controller['update']);router[_0xa323('0x22')](_0xa323('0x24'),controller[_0xa323('0x25')]);router[_0xa323('0x22')](_0xa323('0x26'),auth[_0xa323('0x9')](),controller['abandon']);router['put']('/:id/close',controller[_0xa323('0x27')]);router[_0xa323('0x28')](_0xa323('0x8'),auth[_0xa323('0x3')](),interaction['tracked']('chat',_0xa323('0x29')),controller['destroy']);router[_0xa323('0x28')](_0xa323('0x2a'),auth[_0xa323('0x3')](),controller[_0xa323('0x2b')]);module['exports']=router;
\ No newline at end of file
+var _0xe709=['describe','/:id','isChatInteractionAuthorized','show','/:id/attachment_download','attachmentDownload','getMessages','getMyMessages','download','create','post','createVidaooSession','join','root','server/files/attachments/','format','now','originalname','/:id/attachment_upload','attachmentUpload','/:id/messages','addMessage','/:id/tags','chat','addTags','tracked','chatinteraction:update','put','/:id/custom_update','/:id/abandon','/:id/close','chatinteraction:destroy','delete','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','get','index','/describe','isAuthenticated'];(function(_0x56756b,_0x3e8cc7){var _0xa3002=function(_0x5f1386){while(--_0x5f1386){_0x56756b['push'](_0x56756b['shift']());}};_0xa3002(++_0x3e8cc7);}(_0xe709,0x1b6));var _0x9e70=function(_0x4d2d37,_0x11657f){_0x4d2d37=_0x4d2d37-0x0;var _0x588b6c=_0xe709[_0x4d2d37];return _0x588b6c;};'use strict';var multer=require(_0x9e70('0x0'));var util=require(_0x9e70('0x1'));var path=require(_0x9e70('0x2'));var timeout=require(_0x9e70('0x3'));var express=require(_0x9e70('0x4'));var router=express[_0x9e70('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x9e70('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x9e70('0x7'));var controller=require('./chatInteraction.controller');router[_0x9e70('0x8')]('/',auth['isAuthenticated'](),controller[_0x9e70('0x9')]);router['get'](_0x9e70('0xa'),auth[_0x9e70('0xb')](),controller[_0x9e70('0xc')]);router[_0x9e70('0x8')](_0x9e70('0xd'),auth[_0x9e70('0xe')](),controller[_0x9e70('0xf')]);router[_0x9e70('0x8')](_0x9e70('0x10'),auth[_0x9e70('0xe')](),controller[_0x9e70('0x11')]);router[_0x9e70('0x8')]('/:id/messages',auth['isAuthenticated'](),controller[_0x9e70('0x12')]);router[_0x9e70('0x8')]('/:id/my_messages',auth[_0x9e70('0xe')](),controller[_0x9e70('0x13')]);router[_0x9e70('0x8')]('/:id/download',auth[_0x9e70('0xb')](),controller[_0x9e70('0x14')]);router['post']('/',auth[_0x9e70('0xb')](),controller[_0x9e70('0x15')]);router[_0x9e70('0x16')]('/:id/vidaoo',auth[_0x9e70('0xb')](),controller[_0x9e70('0x17')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x59efa8,_0x2a4280,_0x490477){_0x490477(null,path[_0x9e70('0x18')](config[_0x9e70('0x19')],_0x9e70('0x1a')));},'filename':function(_0x210a89,_0x6dda4f,_0x3879dc){_0x3879dc(null,util[_0x9e70('0x1b')]('%s-%s',Date[_0x9e70('0x1c')](),_0x6dda4f[_0x9e70('0x1d')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x9e70('0x16')](_0x9e70('0x1e'),upload['single']('file'),controller[_0x9e70('0x1f')]);router['post'](_0x9e70('0x20'),auth[_0x9e70('0xe')](),controller[_0x9e70('0x21')]);router['post'](_0x9e70('0x22'),auth[_0x9e70('0xb')](),interaction['tracked'](_0x9e70('0x23'),'chatinteraction:addtags'),controller[_0x9e70('0x24')]);router['put'](_0x9e70('0xd'),auth[_0x9e70('0xb')](),interaction[_0x9e70('0x25')]('chat',_0x9e70('0x26')),controller['update']);router[_0x9e70('0x27')](_0x9e70('0x28'),controller['customUpdate']);router['put'](_0x9e70('0x29'),auth[_0x9e70('0xe')](),controller['abandon']);router[_0x9e70('0x27')](_0x9e70('0x2a'),controller['close']);router['delete'](_0x9e70('0xd'),auth[_0x9e70('0xb')](),interaction['tracked'](_0x9e70('0x23'),_0x9e70('0x2b')),controller['destroy']);router[_0x9e70('0x2c')](_0x9e70('0x22'),auth[_0x9e70('0xb')](),controller['removeTags']);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 8509919..1fa8857 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 _0xdd75=['BOOLEAN','sequelize','TEXT','medium'];(function(_0x3e0601,_0x236850){var _0x5555f8=function(_0x5be70e){while(--_0x5be70e){_0x3e0601['push'](_0x3e0601['shift']());}};_0x5555f8(++_0x236850);}(_0xdd75,0x169));var _0x5dd7=function(_0x13c2cf,_0x568ba5){_0x13c2cf=_0x13c2cf-0x0;var _0x237785=_0xdd75[_0x13c2cf];return _0x237785;};'use strict';var Sequelize=require(_0x5dd7('0x0'));module['exports']={'body':{'type':Sequelize[_0x5dd7('0x1')](_0x5dd7('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x5dd7('0x3')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
+var _0xd7ac=['BOOLEAN','sequelize','exports','TEXT'];(function(_0x4496e1,_0x125154){var _0x36b160=function(_0x293e1f){while(--_0x293e1f){_0x4496e1['push'](_0x4496e1['shift']());}};_0x36b160(++_0x125154);}(_0xd7ac,0x91));var _0xcd7a=function(_0x3e5086,_0x48f4a2){_0x3e5086=_0x3e5086-0x0;var _0xfeb102=_0xd7ac[_0x3e5086];return _0xfeb102;};'use strict';var Sequelize=require(_0xcd7a('0x0'));module[_0xcd7a('0x1')]={'body':{'type':Sequelize[_0xcd7a('0x2')]('medium'),'allowNull':![]},'read':{'type':Sequelize[_0xcd7a('0x3')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.controller.js b/server/api/chatInternalMessage/chatInternalMessage.controller.js
index fec9fb0..296a74c 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 _0x57c9=['VoiceQueue','VoiceQueues','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','Agents','autoAssociation','isEmpty','resourceId','push','FromId','read','-createdAt','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','defaults','localhost','socket.io-emitter','redis','./chatInternalMessage.socket','register','end','offset','undefined','limit','count','status','set','json','reject','save','update','then','destroy','error','name','send','index','map','ChatInternalMessage','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','options','include','findAll','rows','catch','show','includeAll','find','create','body','params','describe','get','messages','lastMessageAt','lastMessage','YYYY-MM-DD\x20HH:mm:ss','getUsers','User','agent','admin','user','fullname','role','userpic','internal','online','lastLoginAt','allowmessenger','showWebBar'];(function(_0x26b063,_0x88df05){var _0x567dc2=function(_0x2e4d88){while(--_0x2e4d88){_0x26b063['push'](_0x26b063['shift']());}};_0x567dc2(++_0x88df05);}(_0x57c9,0x156));var _0x957c=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0x57c9[_0x618414];return _0x21c19a;};'use strict';var emlformat=require(_0x957c('0x0'));var rimraf=require(_0x957c('0x1'));var zipdir=require(_0x957c('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x957c('0x3'));var moment=require(_0x957c('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x957c('0x5'));var util=require(_0x957c('0x6'));var path=require(_0x957c('0x7'));var sox=require('sox');var csv=require(_0x957c('0x8'));var ejs=require(_0x957c('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x957c('0xa'));var squel=require('squel');var crypto=require(_0x957c('0xb'));var jsforce=require(_0x957c('0xc'));var deskjs=require(_0x957c('0xd'));var toCsv=require(_0x957c('0x8'));var querystring=require(_0x957c('0xe'));var Papa=require(_0x957c('0xf'));var Redis=require(_0x957c('0x10'));var authService=require(_0x957c('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x957c('0x12'));var hardwareService=require(_0x957c('0x13'));var logger=require(_0x957c('0x14'))(_0x957c('0x15'));var utils=require(_0x957c('0x16'));var config=require(_0x957c('0x17'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];config['redis']=_[_0x957c('0x18')](config['redis'],{'host':_0x957c('0x19'),'port':0x18eb});var socket=require(_0x957c('0x1a'))(new Redis(config[_0x957c('0x1b')]));require(_0x957c('0x1c'))[_0x957c('0x1d')](socket);function respondWithStatusCode(_0x1edb32,_0x495d0e){_0x495d0e=_0x495d0e||0xcc;return function(_0x247cf3){if(_0x247cf3){return _0x1edb32['sendStatus'](_0x495d0e);}return _0x1edb32['status'](_0x495d0e)[_0x957c('0x1e')]();};}function respondWithResult(_0x19366d,_0x31cbab){_0x31cbab=_0x31cbab||0xc8;return function(_0x481d24){if(_0x481d24){return _0x19366d['status'](_0x31cbab)['json'](_0x481d24);}};}function respondWithFilteredResult(_0x5b416e,_0x46f1fa){return function(_0x365399){if(_0x365399){var _0x2ea2cd=typeof _0x46f1fa[_0x957c('0x1f')]===_0x957c('0x20')&&typeof _0x46f1fa[_0x957c('0x21')]==='undefined';var _0x1a59d1=_0x365399[_0x957c('0x22')];var _0x2bfe9b=_0x2ea2cd?0x0:_0x46f1fa[_0x957c('0x1f')];var _0x3d3d68=_0x2ea2cd?_0x365399['count']:_0x46f1fa[_0x957c('0x1f')]+_0x46f1fa[_0x957c('0x21')];var _0x2ef411;if(_0x3d3d68>=_0x1a59d1){_0x3d3d68=_0x1a59d1;_0x2ef411=0xc8;}else{_0x2ef411=0xce;}_0x5b416e[_0x957c('0x23')](_0x2ef411);return _0x5b416e[_0x957c('0x24')]('Content-Range',_0x2bfe9b+'-'+_0x3d3d68+'/'+_0x1a59d1)[_0x957c('0x25')](_0x365399);}return null;};}function patchUpdates(_0x30facc){return function(_0x1add1e){try{jsonpatch['apply'](_0x1add1e,_0x30facc,!![]);}catch(_0x5c64c4){return BPromise[_0x957c('0x26')](_0x5c64c4);}return _0x1add1e[_0x957c('0x27')]();};}function saveUpdates(_0xb7a119,_0x16ca9d){return function(_0x2d4e9f){if(_0x2d4e9f){return _0x2d4e9f[_0x957c('0x28')](_0xb7a119)[_0x957c('0x29')](function(_0x414898){return _0x414898;});}return null;};}function removeEntity(_0x32d2aa,_0xa4a393){return function(_0x46c267){if(_0x46c267){return _0x46c267[_0x957c('0x2a')]()['then'](function(){_0x32d2aa[_0x957c('0x23')](0xcc)[_0x957c('0x1e')]();});}};}function handleEntityNotFound(_0x3df196,_0x576187){return function(_0x5afba9){if(!_0x5afba9){_0x3df196['sendStatus'](0x194);}return _0x5afba9;};}function handleError(_0x30b6fc,_0x5393ef){_0x5393ef=_0x5393ef||0x1f4;return function(_0x5d068d){logger[_0x957c('0x2b')](_0x5d068d['stack']);if(_0x5d068d[_0x957c('0x2c')]){delete _0x5d068d[_0x957c('0x2c')];}_0x30b6fc[_0x957c('0x23')](_0x5393ef)[_0x957c('0x2d')](_0x5d068d);};}exports[_0x957c('0x2e')]=function(_0x257c69,_0x2d6128){var _0x24fb19={},_0x4692d1={},_0x4849a3={'count':0x0,'rows':[]};var _0x1150df=_[_0x957c('0x2f')](db[_0x957c('0x30')][_0x957c('0x31')],function(_0x4967b8){return{'name':_0x4967b8[_0x957c('0x32')],'type':_0x4967b8[_0x957c('0x33')][_0x957c('0x34')]};});_0x4692d1[_0x957c('0x35')]=_[_0x957c('0x2f')](_0x1150df,'name');_0x4692d1[_0x957c('0x36')]=_[_0x957c('0x37')](_0x257c69[_0x957c('0x36')]);_0x4692d1[_0x957c('0x38')]=_[_0x957c('0x39')](_0x4692d1[_0x957c('0x35')],_0x4692d1['query']);_0x24fb19[_0x957c('0x3a')]=_[_0x957c('0x39')](_0x4692d1[_0x957c('0x35')],qs[_0x957c('0x3b')](_0x257c69[_0x957c('0x36')]['fields']));_0x24fb19[_0x957c('0x3a')]=_0x24fb19[_0x957c('0x3a')][_0x957c('0x3c')]?_0x24fb19[_0x957c('0x3a')]:_0x4692d1[_0x957c('0x35')];if(!_0x257c69['query'][_0x957c('0x3d')]('nolimit')){_0x24fb19[_0x957c('0x21')]=qs[_0x957c('0x21')](_0x257c69[_0x957c('0x36')]['limit']);_0x24fb19[_0x957c('0x1f')]=qs[_0x957c('0x1f')](_0x257c69['query'][_0x957c('0x1f')]);}_0x24fb19[_0x957c('0x3e')]=qs[_0x957c('0x3f')](_0x257c69['query']['sort']);_0x24fb19[_0x957c('0x40')]=qs[_0x957c('0x38')](_[_0x957c('0x41')](_0x257c69['query'],_0x4692d1['filters']),_0x1150df);if(_0x257c69[_0x957c('0x36')][_0x957c('0x42')]){_0x24fb19[_0x957c('0x40')]=_[_0x957c('0x43')](_0x24fb19[_0x957c('0x40')],{'$or':_['map'](_0x1150df,function(_0x46f0ce){if(_0x46f0ce[_0x957c('0x33')]!=='VIRTUAL'){var _0x94e1ad={};_0x94e1ad[_0x46f0ce[_0x957c('0x2c')]]={'$like':'%'+_0x257c69[_0x957c('0x36')]['filter']+'%'};return _0x94e1ad;}})});}_0x24fb19=_[_0x957c('0x43')]({},_0x24fb19,_0x257c69[_0x957c('0x44')]);var _0x146577={'where':_0x24fb19[_0x957c('0x40')]};return db[_0x957c('0x30')][_0x957c('0x22')](_0x146577)[_0x957c('0x29')](function(_0x2f9266){_0x4849a3[_0x957c('0x22')]=_0x2f9266;if(_0x257c69[_0x957c('0x36')]['includeAll']){_0x24fb19[_0x957c('0x45')]=[{'all':!![]}];}return db[_0x957c('0x30')][_0x957c('0x46')](_0x24fb19);})[_0x957c('0x29')](function(_0x2fa641){_0x4849a3[_0x957c('0x47')]=_0x2fa641;return _0x4849a3;})[_0x957c('0x29')](respondWithFilteredResult(_0x2d6128,_0x24fb19))[_0x957c('0x48')](handleError(_0x2d6128,null));};exports[_0x957c('0x49')]=function(_0x5c4721,_0x4e343c){var _0x230dad={'raw':!![],'where':{'id':_0x5c4721['params']['id']}},_0x124ef5={};_0x124ef5[_0x957c('0x35')]=_[_0x957c('0x37')](db[_0x957c('0x30')][_0x957c('0x31')]);_0x124ef5['query']=_[_0x957c('0x37')](_0x5c4721[_0x957c('0x36')]);_0x124ef5['filters']=_[_0x957c('0x39')](_0x124ef5[_0x957c('0x35')],_0x124ef5[_0x957c('0x36')]);_0x230dad[_0x957c('0x3a')]=_[_0x957c('0x39')](_0x124ef5[_0x957c('0x35')],qs[_0x957c('0x3b')](_0x5c4721[_0x957c('0x36')][_0x957c('0x3b')]));_0x230dad[_0x957c('0x3a')]=_0x230dad[_0x957c('0x3a')][_0x957c('0x3c')]?_0x230dad[_0x957c('0x3a')]:_0x124ef5['model'];if(_0x5c4721[_0x957c('0x36')][_0x957c('0x4a')]){_0x230dad[_0x957c('0x45')]=[{'all':!![]}];}_0x230dad=_['merge']({},_0x230dad,_0x5c4721[_0x957c('0x44')]);return db[_0x957c('0x30')][_0x957c('0x4b')](_0x230dad)[_0x957c('0x29')](handleEntityNotFound(_0x4e343c,null))['then'](respondWithResult(_0x4e343c,null))[_0x957c('0x48')](handleError(_0x4e343c,null));};exports[_0x957c('0x4c')]=function(_0x3e8499,_0x352e2c){return db[_0x957c('0x30')][_0x957c('0x4c')](_0x3e8499['body'],{})[_0x957c('0x29')](respondWithResult(_0x352e2c,0xc9))['catch'](handleError(_0x352e2c,null));};exports['update']=function(_0x36e07e,_0x5599cd){if(_0x36e07e[_0x957c('0x4d')]['id']){delete _0x36e07e[_0x957c('0x4d')]['id'];}return db[_0x957c('0x30')][_0x957c('0x4b')]({'where':{'id':_0x36e07e[_0x957c('0x4e')]['id']}})[_0x957c('0x29')](handleEntityNotFound(_0x5599cd,null))[_0x957c('0x29')](saveUpdates(_0x36e07e[_0x957c('0x4d')],null))[_0x957c('0x29')](respondWithResult(_0x5599cd,null))[_0x957c('0x48')](handleError(_0x5599cd,null));};exports['destroy']=function(_0x35fdfb,_0x2bfdea){return db[_0x957c('0x30')][_0x957c('0x4b')]({'where':{'id':_0x35fdfb['params']['id']}})[_0x957c('0x29')](handleEntityNotFound(_0x2bfdea,null))['then'](removeEntity(_0x2bfdea,null))[_0x957c('0x48')](handleError(_0x2bfdea,null));};exports[_0x957c('0x4f')]=function(_0x31e665,_0x28ed05){return db['ChatInternalMessage'][_0x957c('0x4f')]()[_0x957c('0x29')](respondWithResult(_0x28ed05,null))['catch'](handleError(_0x28ed05,null));};function wrapUser(_0x5ef1ad){return function(_0x3c079b){var _0xe75adb=_0x5ef1ad[_0x957c('0x50')]({'plain':!![]});_0xe75adb[_0x957c('0x51')]=[];if(_0x3c079b){_0xe75adb[_0x957c('0x52')]=_0x3c079b['createdAt'];_0xe75adb[_0x957c('0x53')]=_0x3c079b;}else{_0xe75adb[_0x957c('0x52')]=moment(0x0)['format'](_0x957c('0x54'));_0xe75adb['lastMessage']={};}return _0xe75adb;};}exports[_0x957c('0x55')]=function(_0x32af63,_0x239a3d,_0x28984a){var _0x3eb582=[];return db[_0x957c('0x56')][_0x957c('0x46')]({'where':{'role':[_0x957c('0x57'),_0x957c('0x58'),_0x957c('0x59')]},'attributes':['id',_0x957c('0x5a'),_0x957c('0x2c'),_0x957c('0x5b'),_0x957c('0x5c'),_0x957c('0x5d'),_0x957c('0x5e'),_0x957c('0x5f'),_0x957c('0x60'),_0x957c('0x61')],'order':qs[_0x957c('0x3f')]('-online'),'include':[{'model':db[_0x957c('0x62')],'as':_0x957c('0x63'),'attributes':['id',_0x957c('0x2c'),_0x957c('0x33')],'through':{'attributes':[]}}]})['then'](function(_0xb67093){if(_0xb67093){var _0x3c3f84=_0x32af63[_0x957c('0x59')][_0x957c('0x50')]({'plain':!![]});if(!_0x3c3f84)throw new Error(_0x957c('0x64'));if(_0x3c3f84[_0x957c('0x5b')]===_0x957c('0x59')){return db[_0x957c('0x65')][_0x957c('0x4b')]({'where':{'name':_0x957c('0x66'),'userProfileId':_0x3c3f84['userProfileId']},'raw':!![]})[_0x957c('0x29')](function(_0x2b5bce){if(_0x2b5bce){if(_0x2b5bce[_0x957c('0x67')]===0x0){return db['UserProfileResource'][_0x957c('0x46')]({'where':{'sectionId':_0x2b5bce['id']},'raw':!![]})[_0x957c('0x29')](function(_0x27f7c6){var _0x3b1b2f=[];if(_[_0x957c('0x68')](_0x27f7c6)){_0x3b1b2f=_[_0x957c('0x42')](_0xb67093,function(_0x13ed8b){if(_0x13ed8b[_0x957c('0x5b')]!==_0x957c('0x57')){return _0x13ed8b;}});return _0x3b1b2f;}else{for(var _0x11c0fe=0x0;_0x11c0fe<_0xb67093[_0x957c('0x3c')];_0x11c0fe++){var _0x52af90=_0xb67093[_0x11c0fe];if(_0x52af90[_0x957c('0x5b')]===_0x957c('0x57')){var _0x26eb54=_[_0x957c('0x4b')](_0x27f7c6,function(_0x376be4){return _0x376be4[_0x957c('0x69')]===_0x52af90['id'];});if(_0x26eb54)_0x3b1b2f[_0x957c('0x6a')](_0x52af90);}else{_0x3b1b2f[_0x957c('0x6a')](_0x52af90);}}return _0x3b1b2f;}});}else{return _0xb67093;}}else{var _0x183bd5=_[_0x957c('0x42')](_0xb67093,function(_0x1679ce){if(_0x1679ce[_0x957c('0x5b')]!=='agent'){return _0x1679ce;}});return _0x183bd5;}});}else{return _0xb67093;}}})[_0x957c('0x29')](function(_0x25a125){var _0x59fa19=[];if(_0x25a125){_0x3eb582=_0x25a125;for(var _0x116d51=0x0;_0x116d51<_0x25a125[_0x957c('0x3c')];_0x116d51+=0x1){_0x3eb582[_0x116d51][_0x957c('0x51')]=[];_0x59fa19['push'](db[_0x957c('0x30')][_0x957c('0x4b')]({'where':{'FromId':[_0x32af63[_0x957c('0x59')]['id'],_0x25a125[_0x116d51]['id']],'ToId':[_0x32af63[_0x957c('0x59')]['id'],_0x25a125[_0x116d51]['id']],'ChatGroupId':null},'attributes':['id','createdAt',_0x957c('0x6b'),'ToId',_0x957c('0x6c'),_0x957c('0x4d')],'order':qs[_0x957c('0x3f')](_0x957c('0x6d')),'limit':0x1,'offset':0x0,'raw':!![]})['then'](wrapUser(_0x25a125[_0x116d51])));}return BPromise['all'](_0x59fa19);}return[];})['then'](function(_0x1fef15){return{'rows':_0x1fef15,'count':_0x1fef15[_0x957c('0x3c')]};})[_0x957c('0x29')](respondWithResult(_0x239a3d,null))[_0x957c('0x48')](handleError(_0x239a3d,null));};
\ No newline at end of file
+var _0xce31=['hasOwnProperty','nolimit','order','sort','where','filter','type','VIRTUAL','merge','options','findAll','rows','catch','show','params','includeAll','include','find','create','body','describe','get','messages','createdAt','lastMessageAt','format','YYYY-MM-DD\x20HH:mm:ss','lastMessage','User','agent','admin','user','role','userpic','internal','online','lastLoginAt','allowmessenger','showWebBar','VoiceQueue','VoiceQueues','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','Agents','userProfileId','autoAssociation','UserProfileResource','isEmpty','resourceId','push','FromId','ToId','read','-createdAt','all','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','./chatInternalMessage.socket','register','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','update','then','send','index','map','ChatInternalMessage','rawAttributes','fieldName','key','model','name','query','keys','filters','intersection','attributes','fields','length'];(function(_0x394720,_0x4436e8){var _0x2761a4=function(_0x5ee134){while(--_0x5ee134){_0x394720['push'](_0x394720['shift']());}};_0x2761a4(++_0x4436e8);}(_0xce31,0x11b));var _0x1ce3=function(_0x400adb,_0x50120c){_0x400adb=_0x400adb-0x0;var _0x274bf2=_0xce31[_0x400adb];return _0x274bf2;};'use strict';var emlformat=require(_0x1ce3('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x1ce3('0x1'));var jsonpatch=require(_0x1ce3('0x2'));var rp=require(_0x1ce3('0x3'));var moment=require(_0x1ce3('0x4'));var BPromise=require(_0x1ce3('0x5'));var Mustache=require(_0x1ce3('0x6'));var util=require(_0x1ce3('0x7'));var path=require(_0x1ce3('0x8'));var sox=require(_0x1ce3('0x9'));var csv=require('to-csv');var ejs=require(_0x1ce3('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x1ce3('0xb'));var squel=require(_0x1ce3('0xc'));var crypto=require(_0x1ce3('0xd'));var jsforce=require(_0x1ce3('0xe'));var deskjs=require(_0x1ce3('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x1ce3('0x10'));var Redis=require(_0x1ce3('0x11'));var authService=require(_0x1ce3('0x12'));var qs=require(_0x1ce3('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x1ce3('0x14'));var logger=require(_0x1ce3('0x15'))(_0x1ce3('0x16'));var utils=require('../../config/utils');var config=require(_0x1ce3('0x17'));var licenseUtil=require(_0x1ce3('0x18'));var db=require(_0x1ce3('0x19'))['db'];config['redis']=_['defaults'](config[_0x1ce3('0x1a')],{'host':_0x1ce3('0x1b'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x1ce3('0x1c'))[_0x1ce3('0x1d')](socket);function respondWithStatusCode(_0x21f760,_0x1b23e4){_0x1b23e4=_0x1b23e4||0xcc;return function(_0x51ed46){if(_0x51ed46){return _0x21f760[_0x1ce3('0x1e')](_0x1b23e4);}return _0x21f760[_0x1ce3('0x1f')](_0x1b23e4)[_0x1ce3('0x20')]();};}function respondWithResult(_0x5793d4,_0x1137e4){_0x1137e4=_0x1137e4||0xc8;return function(_0x110476){if(_0x110476){return _0x5793d4[_0x1ce3('0x1f')](_0x1137e4)[_0x1ce3('0x21')](_0x110476);}};}function respondWithFilteredResult(_0x30da10,_0x3ea6b5){return function(_0x541495){if(_0x541495){var _0x2aa053=typeof _0x3ea6b5[_0x1ce3('0x22')]===_0x1ce3('0x23')&&typeof _0x3ea6b5[_0x1ce3('0x24')]===_0x1ce3('0x23');var _0x1c64c9=_0x541495[_0x1ce3('0x25')];var _0x4ec302=_0x2aa053?0x0:_0x3ea6b5[_0x1ce3('0x22')];var _0x43b5c2=_0x2aa053?_0x541495[_0x1ce3('0x25')]:_0x3ea6b5[_0x1ce3('0x22')]+_0x3ea6b5[_0x1ce3('0x24')];var _0x464441;if(_0x43b5c2>=_0x1c64c9){_0x43b5c2=_0x1c64c9;_0x464441=0xc8;}else{_0x464441=0xce;}_0x30da10[_0x1ce3('0x1f')](_0x464441);return _0x30da10[_0x1ce3('0x26')](_0x1ce3('0x27'),_0x4ec302+'-'+_0x43b5c2+'/'+_0x1c64c9)[_0x1ce3('0x21')](_0x541495);}return null;};}function patchUpdates(_0xeff8a4){return function(_0x1c0827){try{jsonpatch['apply'](_0x1c0827,_0xeff8a4,!![]);}catch(_0x50e1f2){return BPromise[_0x1ce3('0x28')](_0x50e1f2);}return _0x1c0827['save']();};}function saveUpdates(_0x495636,_0x346ef8){return function(_0x4e38f3){if(_0x4e38f3){return _0x4e38f3[_0x1ce3('0x29')](_0x495636)['then'](function(_0x32070b){return _0x32070b;});}return null;};}function removeEntity(_0x7b104b,_0x71a532){return function(_0x5567f2){if(_0x5567f2){return _0x5567f2['destroy']()[_0x1ce3('0x2a')](function(){_0x7b104b[_0x1ce3('0x1f')](0xcc)[_0x1ce3('0x20')]();});}};}function handleEntityNotFound(_0x46e01f,_0x3ddafa){return function(_0x33945f){if(!_0x33945f){_0x46e01f['sendStatus'](0x194);}return _0x33945f;};}function handleError(_0x1049b5,_0x157e49){_0x157e49=_0x157e49||0x1f4;return function(_0x2004ca){logger['error'](_0x2004ca['stack']);if(_0x2004ca['name']){delete _0x2004ca['name'];}_0x1049b5[_0x1ce3('0x1f')](_0x157e49)[_0x1ce3('0x2b')](_0x2004ca);};}exports[_0x1ce3('0x2c')]=function(_0x515eb5,_0x1bf898){var _0xddcfac={},_0x5f06d3={},_0x185656={'count':0x0,'rows':[]};var _0xa10ff4=_[_0x1ce3('0x2d')](db[_0x1ce3('0x2e')][_0x1ce3('0x2f')],function(_0x43bae6){return{'name':_0x43bae6[_0x1ce3('0x30')],'type':_0x43bae6['type'][_0x1ce3('0x31')]};});_0x5f06d3[_0x1ce3('0x32')]=_[_0x1ce3('0x2d')](_0xa10ff4,_0x1ce3('0x33'));_0x5f06d3[_0x1ce3('0x34')]=_[_0x1ce3('0x35')](_0x515eb5['query']);_0x5f06d3[_0x1ce3('0x36')]=_[_0x1ce3('0x37')](_0x5f06d3[_0x1ce3('0x32')],_0x5f06d3[_0x1ce3('0x34')]);_0xddcfac[_0x1ce3('0x38')]=_[_0x1ce3('0x37')](_0x5f06d3['model'],qs[_0x1ce3('0x39')](_0x515eb5[_0x1ce3('0x34')][_0x1ce3('0x39')]));_0xddcfac['attributes']=_0xddcfac['attributes'][_0x1ce3('0x3a')]?_0xddcfac['attributes']:_0x5f06d3[_0x1ce3('0x32')];if(!_0x515eb5[_0x1ce3('0x34')][_0x1ce3('0x3b')](_0x1ce3('0x3c'))){_0xddcfac['limit']=qs[_0x1ce3('0x24')](_0x515eb5['query']['limit']);_0xddcfac[_0x1ce3('0x22')]=qs['offset'](_0x515eb5[_0x1ce3('0x34')][_0x1ce3('0x22')]);}_0xddcfac[_0x1ce3('0x3d')]=qs[_0x1ce3('0x3e')](_0x515eb5[_0x1ce3('0x34')][_0x1ce3('0x3e')]);_0xddcfac[_0x1ce3('0x3f')]=qs[_0x1ce3('0x36')](_['pick'](_0x515eb5[_0x1ce3('0x34')],_0x5f06d3[_0x1ce3('0x36')]),_0xa10ff4);if(_0x515eb5['query'][_0x1ce3('0x40')]){_0xddcfac[_0x1ce3('0x3f')]=_['merge'](_0xddcfac['where'],{'$or':_[_0x1ce3('0x2d')](_0xa10ff4,function(_0x2332b3){if(_0x2332b3[_0x1ce3('0x41')]!==_0x1ce3('0x42')){var _0x3c1ccb={};_0x3c1ccb[_0x2332b3[_0x1ce3('0x33')]]={'$like':'%'+_0x515eb5[_0x1ce3('0x34')]['filter']+'%'};return _0x3c1ccb;}})});}_0xddcfac=_[_0x1ce3('0x43')]({},_0xddcfac,_0x515eb5[_0x1ce3('0x44')]);var _0x34d3b3={'where':_0xddcfac[_0x1ce3('0x3f')]};return db[_0x1ce3('0x2e')][_0x1ce3('0x25')](_0x34d3b3)['then'](function(_0x5f0c9f){_0x185656[_0x1ce3('0x25')]=_0x5f0c9f;if(_0x515eb5[_0x1ce3('0x34')]['includeAll']){_0xddcfac['include']=[{'all':!![]}];}return db[_0x1ce3('0x2e')][_0x1ce3('0x45')](_0xddcfac);})[_0x1ce3('0x2a')](function(_0x52f54c){_0x185656[_0x1ce3('0x46')]=_0x52f54c;return _0x185656;})['then'](respondWithFilteredResult(_0x1bf898,_0xddcfac))[_0x1ce3('0x47')](handleError(_0x1bf898,null));};exports[_0x1ce3('0x48')]=function(_0x3dff10,_0xaae211){var _0x1a47d8={'raw':!![],'where':{'id':_0x3dff10[_0x1ce3('0x49')]['id']}},_0x461413={};_0x461413[_0x1ce3('0x32')]=_[_0x1ce3('0x35')](db[_0x1ce3('0x2e')][_0x1ce3('0x2f')]);_0x461413['query']=_[_0x1ce3('0x35')](_0x3dff10[_0x1ce3('0x34')]);_0x461413[_0x1ce3('0x36')]=_[_0x1ce3('0x37')](_0x461413[_0x1ce3('0x32')],_0x461413[_0x1ce3('0x34')]);_0x1a47d8['attributes']=_['intersection'](_0x461413[_0x1ce3('0x32')],qs[_0x1ce3('0x39')](_0x3dff10[_0x1ce3('0x34')][_0x1ce3('0x39')]));_0x1a47d8['attributes']=_0x1a47d8['attributes']['length']?_0x1a47d8[_0x1ce3('0x38')]:_0x461413['model'];if(_0x3dff10[_0x1ce3('0x34')][_0x1ce3('0x4a')]){_0x1a47d8[_0x1ce3('0x4b')]=[{'all':!![]}];}_0x1a47d8=_[_0x1ce3('0x43')]({},_0x1a47d8,_0x3dff10[_0x1ce3('0x44')]);return db['ChatInternalMessage'][_0x1ce3('0x4c')](_0x1a47d8)[_0x1ce3('0x2a')](handleEntityNotFound(_0xaae211,null))[_0x1ce3('0x2a')](respondWithResult(_0xaae211,null))['catch'](handleError(_0xaae211,null));};exports[_0x1ce3('0x4d')]=function(_0x24c8ea,_0xac2c00){return db['ChatInternalMessage'][_0x1ce3('0x4d')](_0x24c8ea[_0x1ce3('0x4e')],{})[_0x1ce3('0x2a')](respondWithResult(_0xac2c00,0xc9))[_0x1ce3('0x47')](handleError(_0xac2c00,null));};exports[_0x1ce3('0x29')]=function(_0x201fa7,_0x471da6){if(_0x201fa7['body']['id']){delete _0x201fa7[_0x1ce3('0x4e')]['id'];}return db['ChatInternalMessage'][_0x1ce3('0x4c')]({'where':{'id':_0x201fa7['params']['id']}})[_0x1ce3('0x2a')](handleEntityNotFound(_0x471da6,null))['then'](saveUpdates(_0x201fa7[_0x1ce3('0x4e')],null))['then'](respondWithResult(_0x471da6,null))[_0x1ce3('0x47')](handleError(_0x471da6,null));};exports['destroy']=function(_0x1f401c,_0xd4366e){return db[_0x1ce3('0x2e')][_0x1ce3('0x4c')]({'where':{'id':_0x1f401c[_0x1ce3('0x49')]['id']}})[_0x1ce3('0x2a')](handleEntityNotFound(_0xd4366e,null))[_0x1ce3('0x2a')](removeEntity(_0xd4366e,null))[_0x1ce3('0x47')](handleError(_0xd4366e,null));};exports['describe']=function(_0x453ca3,_0x30981e){return db[_0x1ce3('0x2e')][_0x1ce3('0x4f')]()[_0x1ce3('0x2a')](respondWithResult(_0x30981e,null))[_0x1ce3('0x47')](handleError(_0x30981e,null));};function wrapUser(_0x2a41b6){return function(_0x48d83e){var _0x57a30a=_0x2a41b6[_0x1ce3('0x50')]({'plain':!![]});_0x57a30a[_0x1ce3('0x51')]=[];if(_0x48d83e){_0x57a30a['lastMessageAt']=_0x48d83e[_0x1ce3('0x52')];_0x57a30a['lastMessage']=_0x48d83e;}else{_0x57a30a[_0x1ce3('0x53')]=moment(0x0)[_0x1ce3('0x54')](_0x1ce3('0x55'));_0x57a30a[_0x1ce3('0x56')]={};}return _0x57a30a;};}exports['getUsers']=function(_0x4383f6,_0x36d5ab,_0x6413da){var _0x230d43=[];return db[_0x1ce3('0x57')][_0x1ce3('0x45')]({'where':{'role':[_0x1ce3('0x58'),_0x1ce3('0x59'),_0x1ce3('0x5a')]},'attributes':['id','fullname',_0x1ce3('0x33'),_0x1ce3('0x5b'),_0x1ce3('0x5c'),_0x1ce3('0x5d'),_0x1ce3('0x5e'),_0x1ce3('0x5f'),_0x1ce3('0x60'),_0x1ce3('0x61')],'order':qs['sort']('-online'),'include':[{'model':db[_0x1ce3('0x62')],'as':_0x1ce3('0x63'),'attributes':['id',_0x1ce3('0x33'),'type'],'through':{'attributes':[]}}]})[_0x1ce3('0x2a')](function(_0x13c096){if(_0x13c096){var _0x28af8e=_0x4383f6[_0x1ce3('0x5a')][_0x1ce3('0x50')]({'plain':!![]});if(!_0x28af8e)throw new Error(_0x1ce3('0x64'));if(_0x28af8e['role']===_0x1ce3('0x5a')){return db[_0x1ce3('0x65')][_0x1ce3('0x4c')]({'where':{'name':_0x1ce3('0x66'),'userProfileId':_0x28af8e[_0x1ce3('0x67')]},'raw':!![]})[_0x1ce3('0x2a')](function(_0x45b1fb){if(_0x45b1fb){if(_0x45b1fb[_0x1ce3('0x68')]===0x0){return db[_0x1ce3('0x69')]['findAll']({'where':{'sectionId':_0x45b1fb['id']},'raw':!![]})[_0x1ce3('0x2a')](function(_0x143540){var _0x37b790=[];if(_[_0x1ce3('0x6a')](_0x143540)){_0x37b790=_[_0x1ce3('0x40')](_0x13c096,function(_0x21c24d){if(_0x21c24d[_0x1ce3('0x5b')]!==_0x1ce3('0x58')){return _0x21c24d;}});return _0x37b790;}else{for(var _0x1e9b4d=0x0;_0x1e9b4d<_0x13c096[_0x1ce3('0x3a')];_0x1e9b4d++){var _0x3b09f9=_0x13c096[_0x1e9b4d];if(_0x3b09f9[_0x1ce3('0x5b')]===_0x1ce3('0x58')){var _0x38dc1b=_[_0x1ce3('0x4c')](_0x143540,function(_0x4cf383){return _0x4cf383[_0x1ce3('0x6b')]===_0x3b09f9['id'];});if(_0x38dc1b)_0x37b790[_0x1ce3('0x6c')](_0x3b09f9);}else{_0x37b790[_0x1ce3('0x6c')](_0x3b09f9);}}return _0x37b790;}});}else{return _0x13c096;}}else{var _0x57db1e=_[_0x1ce3('0x40')](_0x13c096,function(_0xd3e411){if(_0xd3e411[_0x1ce3('0x5b')]!==_0x1ce3('0x58')){return _0xd3e411;}});return _0x57db1e;}});}else{return _0x13c096;}}})[_0x1ce3('0x2a')](function(_0x133ec5){var _0x39a866=[];if(_0x133ec5){_0x230d43=_0x133ec5;for(var _0xc72041=0x0;_0xc72041<_0x133ec5[_0x1ce3('0x3a')];_0xc72041+=0x1){_0x230d43[_0xc72041]['messages']=[];_0x39a866['push'](db[_0x1ce3('0x2e')][_0x1ce3('0x4c')]({'where':{'FromId':[_0x4383f6['user']['id'],_0x133ec5[_0xc72041]['id']],'ToId':[_0x4383f6[_0x1ce3('0x5a')]['id'],_0x133ec5[_0xc72041]['id']],'ChatGroupId':null},'attributes':['id',_0x1ce3('0x52'),_0x1ce3('0x6d'),_0x1ce3('0x6e'),_0x1ce3('0x6f'),'body'],'order':qs['sort'](_0x1ce3('0x70')),'limit':0x1,'offset':0x0,'raw':!![]})[_0x1ce3('0x2a')](wrapUser(_0x133ec5[_0xc72041])));}return BPromise[_0x1ce3('0x71')](_0x39a866);}return[];})['then'](function(_0x4d231e){return{'rows':_0x4d231e,'count':_0x4d231e[_0x1ce3('0x3a')]};})['then'](respondWithResult(_0x36d5ab,null))[_0x1ce3('0x47')](handleError(_0x36d5ab,null));};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.events.js b/server/api/chatInternalMessage/chatInternalMessage.events.js
index 8c6e0fc..f10ba1d 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 _0x48cb=['../../mysqldb','ChatInternalMessage','setMaxListeners','update','remove','emit','exports','events'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x48cb,0x16f));var _0xb48c=function(_0x7855ae,_0x28e4e3){_0x7855ae=_0x7855ae-0x0;var _0x17c7d9=_0x48cb[_0x7855ae];return _0x17c7d9;};'use strict';var EventEmitter=require(_0xb48c('0x0'));var ChatInternalMessage=require(_0xb48c('0x1'))['db'][_0xb48c('0x2')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents[_0xb48c('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xb48c('0x4'),'afterDestroy':_0xb48c('0x5')};function emitEvent(_0x1beb71){return function(_0x447481,_0x852166,_0x1ce256){ChatInternalMessageEvents[_0xb48c('0x6')](_0x1beb71+':'+_0x447481['id'],_0x447481);ChatInternalMessageEvents[_0xb48c('0x6')](_0x1beb71,_0x447481);_0x1ce256(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInternalMessage['hook'](e,emitEvent(event));}}module[_0xb48c('0x7')]=ChatInternalMessageEvents;
\ No newline at end of file
+var _0xe5e9=['events','../../mysqldb','ChatInternalMessage','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0xebc9d,_0x3fa560){var _0x100e8d=function(_0x36957e){while(--_0x36957e){_0xebc9d['push'](_0xebc9d['shift']());}};_0x100e8d(++_0x3fa560);}(_0xe5e9,0x1e4));var _0x9e5e=function(_0x2782b1,_0x1f93f4){_0x2782b1=_0x2782b1-0x0;var _0x98e50a=_0xe5e9[_0x2782b1];return _0x98e50a;};'use strict';var EventEmitter=require(_0x9e5e('0x0'));var ChatInternalMessage=require(_0x9e5e('0x1'))['db'][_0x9e5e('0x2')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents[_0x9e5e('0x3')](0x0);var events={'afterCreate':_0x9e5e('0x4'),'afterUpdate':_0x9e5e('0x5'),'afterDestroy':_0x9e5e('0x6')};function emitEvent(_0x381582){return function(_0x1a7ae8,_0x19dfce,_0x375494){ChatInternalMessageEvents[_0x9e5e('0x7')](_0x381582+':'+_0x1a7ae8['id'],_0x1a7ae8);ChatInternalMessageEvents['emit'](_0x381582,_0x1a7ae8);_0x375494(null);};}for(var e in events){if(events[_0x9e5e('0x8')](e)){var event=events[e];ChatInternalMessage[_0x9e5e('0x9')](e,emitEvent(event));}}module[_0x9e5e('0xa')]=ChatInternalMessageEvents;
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.model.js b/server/api/chatInternalMessage/chatInternalMessage.model.js
index 39c28d6..6dd534c 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 _0x911b=['chat_internal_messages','utf8mb4','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./chatInternalMessage.attributes','exports','define'];(function(_0x212635,_0x473753){var _0x4f1f22=function(_0x4318b1){while(--_0x4318b1){_0x212635['push'](_0x212635['shift']());}};_0x4f1f22(++_0x473753);}(_0x911b,0x128));var _0xb911=function(_0x21381e,_0x2a491e){_0x21381e=_0x21381e-0x0;var _0x10bfe7=_0x911b[_0x21381e];return _0x10bfe7;};'use strict';var _=require(_0xb911('0x0'));var util=require(_0xb911('0x1'));var logger=require(_0xb911('0x2'))(_0xb911('0x3'));var moment=require('moment');var BPromise=require(_0xb911('0x4'));var rp=require(_0xb911('0x5'));var fs=require('fs');var path=require(_0xb911('0x6'));var rimraf=require(_0xb911('0x7'));var config=require(_0xb911('0x8'));var attributes=require(_0xb911('0x9'));module[_0xb911('0xa')]=function(_0xcecacd,_0x1127ef){return _0xcecacd[_0xb911('0xb')]('ChatInternalMessage',attributes,{'tableName':_0xb911('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xb911('0xd'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x492a=['chat_internal_messages','utf8mb4','utf8mb4_unicode_ci','util','../../config/logger','api','request-promise','rimraf','./chatInternalMessage.attributes','define','ChatInternalMessage'];(function(_0x1a21b3,_0x2938b3){var _0x1b2c69=function(_0x1883ba){while(--_0x1883ba){_0x1a21b3['push'](_0x1a21b3['shift']());}};_0x1b2c69(++_0x2938b3);}(_0x492a,0xea));var _0xa492=function(_0x2fc012,_0x503e5b){_0x2fc012=_0x2fc012-0x0;var _0x2891f9=_0x492a[_0x2fc012];return _0x2891f9;};'use strict';var _=require('lodash');var util=require(_0xa492('0x0'));var logger=require(_0xa492('0x1'))(_0xa492('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xa492('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xa492('0x4'));var config=require('../../config/environment');var attributes=require(_0xa492('0x5'));module['exports']=function(_0x1d7cd5,_0x26f357){return _0x1d7cd5[_0xa492('0x6')](_0xa492('0x7'),attributes,{'tableName':_0xa492('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xa492('0x9'),'collate':_0xa492('0xa')});};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.rpc.js b/server/api/chatInternalMessage/chatInternalMessage.rpc.js
index 4696f54..35ee15f 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 _0x45ae=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','defaults','localhost','./chatInternalMessage.socket','register','request','then','info','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','ChatInternalMessage,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring'];(function(_0x5c89e2,_0x416a81){var _0x2b9eea=function(_0x26cc1a){while(--_0x26cc1a){_0x5c89e2['push'](_0x5c89e2['shift']());}};_0x2b9eea(++_0x416a81);}(_0x45ae,0xc6));var _0xe45a=function(_0x2377e3,_0x2c0352){_0x2377e3=_0x2377e3-0x0;var _0x2a6d1b=_0x45ae[_0x2377e3];return _0x2a6d1b;};'use strict';var _=require(_0xe45a('0x0'));var util=require(_0xe45a('0x1'));var moment=require(_0xe45a('0x2'));var BPromise=require(_0xe45a('0x3'));var rs=require(_0xe45a('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe45a('0x5'))['db'];var utils=require(_0xe45a('0x6'));var logger=require(_0xe45a('0x7'))(_0xe45a('0x8'));var config=require(_0xe45a('0x9'));var jayson=require(_0xe45a('0xa'));var client=jayson[_0xe45a('0xb')]['http']({'port':0x232a});config[_0xe45a('0xc')]=_[_0xe45a('0xd')](config['redis'],{'host':_0xe45a('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xe45a('0xc')]));require(_0xe45a('0xf'))[_0xe45a('0x10')](socket);function respondWithRpcPromise(_0x20c418,_0x4f5695,_0x328b2b){return new BPromise(function(_0x188b07,_0x1b8913){return client[_0xe45a('0x11')](_0x20c418,_0x328b2b)[_0xe45a('0x12')](function(_0x19d359){logger[_0xe45a('0x13')]('ChatInternalMessage,\x20%s,\x20%s',_0x4f5695,'request\x20sent');logger[_0xe45a('0x14')](_0xe45a('0x15'),_0x4f5695,_0xe45a('0x16'),JSON['stringify'](_0x19d359));if(_0x19d359[_0xe45a('0x17')]){if(_0x19d359[_0xe45a('0x17')][_0xe45a('0x18')]===0x1f4){logger['error'](_0xe45a('0x19'),_0x4f5695,_0x19d359[_0xe45a('0x17')]['message']);return _0x1b8913(_0x19d359[_0xe45a('0x17')][_0xe45a('0x1a')]);}logger[_0xe45a('0x17')](_0xe45a('0x19'),_0x4f5695,_0x19d359[_0xe45a('0x17')][_0xe45a('0x1a')]);return _0x188b07(_0x19d359[_0xe45a('0x17')]['message']);}else{logger[_0xe45a('0x13')](_0xe45a('0x19'),_0x4f5695,'request\x20sent');_0x188b07(_0x19d359[_0xe45a('0x1b')][_0xe45a('0x1a')]);}})[_0xe45a('0x1c')](function(_0x211009){logger[_0xe45a('0x17')]('ChatInternalMessage,\x20%s,\x20%s',_0x4f5695,_0x211009);_0x1b8913(_0x211009);});});}
\ No newline at end of file
+var _0x3c85=['register','request','then','info','ChatInternalMessage,\x20%s,\x20%s','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','localhost','socket.io-emitter','./chatInternalMessage.socket'];(function(_0x3f4574,_0x137071){var _0x152bd6=function(_0x5a32){while(--_0x5a32){_0x3f4574['push'](_0x3f4574['shift']());}};_0x152bd6(++_0x137071);}(_0x3c85,0x113));var _0x53c8=function(_0x2c5e00,_0x526398){_0x2c5e00=_0x2c5e00-0x0;var _0xe588f6=_0x3c85[_0x2c5e00];return _0xe588f6;};'use strict';var _=require(_0x53c8('0x0'));var util=require(_0x53c8('0x1'));var moment=require(_0x53c8('0x2'));var BPromise=require(_0x53c8('0x3'));var rs=require(_0x53c8('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x53c8('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x53c8('0x6'))(_0x53c8('0x7'));var config=require(_0x53c8('0x8'));var jayson=require(_0x53c8('0x9'));var client=jayson[_0x53c8('0xa')]['http']({'port':0x232a});config[_0x53c8('0xb')]=_['defaults'](config[_0x53c8('0xb')],{'host':_0x53c8('0xc'),'port':0x18eb});var socket=require(_0x53c8('0xd'))(new Redis(config[_0x53c8('0xb')]));require(_0x53c8('0xe'))[_0x53c8('0xf')](socket);function respondWithRpcPromise(_0x4da929,_0x5091c1,_0x450e38){return new BPromise(function(_0x3170a9,_0x33155e){return client[_0x53c8('0x10')](_0x4da929,_0x450e38)[_0x53c8('0x11')](function(_0x3a68b5){logger[_0x53c8('0x12')](_0x53c8('0x13'),_0x5091c1,'request\x20sent');logger[_0x53c8('0x14')](_0x53c8('0x15'),_0x5091c1,_0x53c8('0x16'),JSON[_0x53c8('0x17')](_0x3a68b5));if(_0x3a68b5[_0x53c8('0x18')]){if(_0x3a68b5[_0x53c8('0x18')][_0x53c8('0x19')]===0x1f4){logger[_0x53c8('0x18')](_0x53c8('0x13'),_0x5091c1,_0x3a68b5['error'][_0x53c8('0x1a')]);return _0x33155e(_0x3a68b5['error'][_0x53c8('0x1a')]);}logger[_0x53c8('0x18')]('ChatInternalMessage,\x20%s,\x20%s',_0x5091c1,_0x3a68b5[_0x53c8('0x18')][_0x53c8('0x1a')]);return _0x3170a9(_0x3a68b5[_0x53c8('0x18')][_0x53c8('0x1a')]);}else{logger[_0x53c8('0x12')](_0x53c8('0x13'),_0x5091c1,'request\x20sent');_0x3170a9(_0x3a68b5[_0x53c8('0x1b')][_0x53c8('0x1a')]);}})[_0x53c8('0x1c')](function(_0x5a10f5){logger[_0x53c8('0x18')](_0x53c8('0x13'),_0x5091c1,_0x5a10f5);_0x33155e(_0x5a10f5);});});}
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.socket.js b/server/api/chatInternalMessage/chatInternalMessage.socket.js
index a840428..a2d08fd 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 _0x16a7=['save','remove','update','removeListener','register','length','chatInternalMessage:'];(function(_0x2f627d,_0x370a12){var _0x29c392=function(_0x3fe491){while(--_0x3fe491){_0x2f627d['push'](_0x2f627d['shift']());}};_0x29c392(++_0x370a12);}(_0x16a7,0xe7));var _0x716a=function(_0x359afb,_0x2670fe){_0x359afb=_0x359afb-0x0;var _0x2b68f3=_0x16a7[_0x359afb];return _0x2b68f3;};'use strict';var ChatInternalMessageEvents=require('./chatInternalMessage.events');var events=[_0x716a('0x0'),_0x716a('0x1'),_0x716a('0x2')];function createListener(_0xb1aa3a,_0x189c94){return function(_0x3a3836){_0x189c94['emit'](_0xb1aa3a,_0x3a3836);};}function removeListener(_0x3f0299,_0x1fe7e9){return function(){ChatInternalMessageEvents[_0x716a('0x3')](_0x3f0299,_0x1fe7e9);};}exports[_0x716a('0x4')]=function(_0x252ca7){for(var _0x1d510b=0x0,_0x159a70=events[_0x716a('0x5')];_0x1d510b<_0x159a70;_0x1d510b++){var _0x95fc84=events[_0x1d510b];var _0x1ee27e=createListener(_0x716a('0x6')+_0x95fc84,_0x252ca7);ChatInternalMessageEvents['on'](_0x95fc84,_0x1ee27e);}};
\ No newline at end of file
+var _0x7673=['length','save','remove','update','removeListener'];(function(_0x51e548,_0x596a53){var _0x554cfb=function(_0x1a9a21){while(--_0x1a9a21){_0x51e548['push'](_0x51e548['shift']());}};_0x554cfb(++_0x596a53);}(_0x7673,0x17d));var _0x3767=function(_0x17144e,_0x54b854){_0x17144e=_0x17144e-0x0;var _0x393e3e=_0x7673[_0x17144e];return _0x393e3e;};'use strict';var ChatInternalMessageEvents=require('./chatInternalMessage.events');var events=[_0x3767('0x0'),_0x3767('0x1'),_0x3767('0x2')];function createListener(_0x1bb905,_0x2d4cd4){return function(_0x2a91aa){_0x2d4cd4['emit'](_0x1bb905,_0x2a91aa);};}function removeListener(_0xddecbe,_0x200124){return function(){ChatInternalMessageEvents[_0x3767('0x3')](_0xddecbe,_0x200124);};}exports['register']=function(_0x2d46df){for(var _0x215034=0x0,_0x5ef870=events[_0x3767('0x4')];_0x215034<_0x5ef870;_0x215034++){var _0xe86f18=events[_0x215034];var _0x31fd71=createListener('chatInternalMessage:'+_0xe86f18,_0x2d46df);ChatInternalMessageEvents['on'](_0xe86f18,_0x31fd71);}};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/index.js b/server/api/chatInternalMessage/index.js
index e83e7b5..fdab1f9 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 _0x6880=['/describe','describe','/users','getUsers','/:id','show','post','create','put','update','destroy','multer','util','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatInternalMessage.controller','get','isAuthenticated','index'];(function(_0x2958c9,_0x3948fa){var _0x7ec3dc=function(_0x229dbd){while(--_0x229dbd){_0x2958c9['push'](_0x2958c9['shift']());}};_0x7ec3dc(++_0x3948fa);}(_0x6880,0x164));var _0x0688=function(_0x48ba11,_0x5c196f){_0x48ba11=_0x48ba11-0x0;var _0x9fbf41=_0x6880[_0x48ba11];return _0x9fbf41;};'use strict';var multer=require(_0x0688('0x0'));var util=require(_0x0688('0x1'));var path=require(_0x0688('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0688('0x3')]();var fs_extra=require(_0x0688('0x4'));var auth=require(_0x0688('0x5'));var interaction=require(_0x0688('0x6'));var config=require(_0x0688('0x7'));var controller=require(_0x0688('0x8'));router[_0x0688('0x9')]('/',auth[_0x0688('0xa')](),controller[_0x0688('0xb')]);router[_0x0688('0x9')](_0x0688('0xc'),auth[_0x0688('0xa')](),controller[_0x0688('0xd')]);router['get'](_0x0688('0xe'),auth[_0x0688('0xa')](),controller[_0x0688('0xf')]);router[_0x0688('0x9')](_0x0688('0x10'),auth[_0x0688('0xa')](),controller[_0x0688('0x11')]);router[_0x0688('0x12')]('/',auth[_0x0688('0xa')](),controller[_0x0688('0x13')]);router[_0x0688('0x14')]('/:id',controller[_0x0688('0x15')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x0688('0x16')]);module['exports']=router;
\ No newline at end of file
+var _0xacc8=['/:id','show','post','create','put','update','delete','destroy','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./chatInternalMessage.controller','get','index','isAuthenticated','getUsers'];(function(_0x589eb4,_0xaa2019){var _0xf50816=function(_0x572fc5){while(--_0x572fc5){_0x589eb4['push'](_0x589eb4['shift']());}};_0xf50816(++_0xaa2019);}(_0xacc8,0xc5));var _0x8acc=function(_0x2b85d5,_0x3115b7){_0x2b85d5=_0x2b85d5-0x0;var _0xe8c96f=_0xacc8[_0x2b85d5];return _0xe8c96f;};'use strict';var multer=require(_0x8acc('0x0'));var util=require('util');var path=require(_0x8acc('0x1'));var timeout=require(_0x8acc('0x2'));var express=require(_0x8acc('0x3'));var router=express[_0x8acc('0x4')]();var fs_extra=require(_0x8acc('0x5'));var auth=require(_0x8acc('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x8acc('0x7'));var controller=require(_0x8acc('0x8'));router[_0x8acc('0x9')]('/',auth['isAuthenticated'](),controller[_0x8acc('0xa')]);router['get']('/describe',auth[_0x8acc('0xb')](),controller['describe']);router[_0x8acc('0x9')]('/users',auth[_0x8acc('0xb')](),controller[_0x8acc('0xc')]);router['get'](_0x8acc('0xd'),auth[_0x8acc('0xb')](),controller[_0x8acc('0xe')]);router[_0x8acc('0xf')]('/',auth[_0x8acc('0xb')](),controller[_0x8acc('0x10')]);router[_0x8acc('0x11')](_0x8acc('0xd'),controller[_0x8acc('0x12')]);router[_0x8acc('0x13')](_0x8acc('0xd'),auth['isAuthenticated'](),controller[_0x8acc('0x14')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.attributes.js b/server/api/chatMessage/chatMessage.attributes.js
index 6509718..81ae2db 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 _0x659c=['medium','BOOLEAN','ENUM','out','STRING','TEXT','sequelize'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x659c,0x1aa));var _0xc659=function(_0x58910b,_0x540685){_0x58910b=_0x58910b-0x0;var _0xfe1259=_0x659c[_0x58910b];return _0xfe1259;};'use strict';var Sequelize=require(_0xc659('0x0'));module['exports']={'body':{'type':Sequelize['TEXT'](_0xc659('0x1')),'allowNull':![]},'read':{'type':Sequelize[_0xc659('0x2')],'defaultValue':![]},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize[_0xc659('0x3')]('in',_0xc659('0x4')),'defaultValue':'out','allowNull':![]},'readAt':{'type':Sequelize['DATE']},'providerName':{'type':Sequelize[_0xc659('0x5')]},'providerResponse':{'type':Sequelize[_0xc659('0x6')]}};
\ No newline at end of file
+var _0x2c91=['medium','BOOLEAN','out','DATE','exports'];(function(_0x2e8b8e,_0x3c2d36){var _0x1fcc33=function(_0x78895f){while(--_0x78895f){_0x2e8b8e['push'](_0x2e8b8e['shift']());}};_0x1fcc33(++_0x3c2d36);}(_0x2c91,0xe0));var _0x12c9=function(_0x59ea19,_0x28e3b6){_0x59ea19=_0x59ea19-0x0;var _0x45f421=_0x2c91[_0x59ea19];return _0x45f421;};'use strict';var Sequelize=require('sequelize');module[_0x12c9('0x0')]={'body':{'type':Sequelize['TEXT'](_0x12c9('0x1')),'allowNull':![]},'read':{'type':Sequelize[_0x12c9('0x2')],'defaultValue':![]},'secret':{'type':Sequelize[_0x12c9('0x2')],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in',_0x12c9('0x3')),'defaultValue':'out','allowNull':![]},'readAt':{'type':Sequelize[_0x12c9('0x4')]},'providerName':{'type':Sequelize['STRING']},'providerResponse':{'type':Sequelize['TEXT']}};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.controller.js b/server/api/chatMessage/chatMessage.controller.js
index 51bff8b..d5c07a4 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 _0x6419=['undefined','count','set','Content-Range','apply','reject','save','update','then','destroy','end','stack','name','send','index','map','ChatMessage','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','options','includeAll','findAll','rows','length','include','find','create','body','params','describe','../../config/logger','chat-interactions','accept','chat','read','readAt','UserId','ChatInteractionId','isNil','read1stAt','format','interaction','get','[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','user','stringify','null','AcceptMessage','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','SELECT','contact','User','agent','fullname','interface','channel','motionChannel','event','EventManager','acceptmessage','parse','formData','[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','RejectMessage','rejectMessage','QueryTypes','internal','rejectmessage','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','./chatMessage.socket','register','jayson/promise','client','http','request','info','ChatMessage,\x20%s,\x20%s','debug','ChatMessage,\x20%s,\x20%s,\x20%s','code','error','message','request\x20sent','catch','sendStatus','status','json','offset','limit'];(function(_0x216345,_0xfd9b72){var _0x313486=function(_0x2a60f5){while(--_0x2a60f5){_0x216345['push'](_0x216345['shift']());}};_0x313486(++_0xfd9b72);}(_0x6419,0xe2));var _0x9641=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6419[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x9641('0x0'));var zipdir=require(_0x9641('0x1'));var jsonpatch=require(_0x9641('0x2'));var rp=require(_0x9641('0x3'));var moment=require('moment');var BPromise=require(_0x9641('0x4'));var Mustache=require(_0x9641('0x5'));var util=require(_0x9641('0x6'));var path=require('path');var sox=require(_0x9641('0x7'));var csv=require(_0x9641('0x8'));var ejs=require(_0x9641('0x9'));var fs=require('fs');var fs_extra=require(_0x9641('0xa'));var _=require('lodash');var squel=require(_0x9641('0xb'));var crypto=require('crypto');var jsforce=require(_0x9641('0xc'));var deskjs=require(_0x9641('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x9641('0xe'));var Redis=require(_0x9641('0xf'));var authService=require(_0x9641('0x10'));var qs=require(_0x9641('0x11'));var as=require(_0x9641('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x9641('0x13'));var utils=require('../../config/utils');var config=require(_0x9641('0x14'));var licenseUtil=require(_0x9641('0x15'));var db=require(_0x9641('0x16'))['db'];config[_0x9641('0x17')]=_[_0x9641('0x18')](config[_0x9641('0x17')],{'host':_0x9641('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x9641('0x17')]));require(_0x9641('0x1a'))[_0x9641('0x1b')](socket);var jayson=require(_0x9641('0x1c'));var client=jayson[_0x9641('0x1d')][_0x9641('0x1e')]({'port':0x232c});var client9002=jayson[_0x9641('0x1d')]['http']({'port':0x232a});function respondWithRpcPromise(_0x49f684,_0x4e5f74,_0x26425e,_0xf67f45){return new BPromise(function(_0x3457ae,_0x4e8564){var _0x2bcdec=_0xf67f45||client;return _0x2bcdec[_0x9641('0x1f')](_0x49f684,_0x26425e)['then'](function(_0x5c962e){logger[_0x9641('0x20')](_0x9641('0x21'),_0x4e5f74,'request\x20sent');logger[_0x9641('0x22')](_0x9641('0x23'),_0x4e5f74,'request\x20sent',JSON['stringify'](_0x5c962e));if(_0x5c962e['error']){if(_0x5c962e['error'][_0x9641('0x24')]===0x1f4){logger[_0x9641('0x25')](_0x9641('0x21'),_0x4e5f74,_0x5c962e[_0x9641('0x25')]['message']);return _0x4e8564(_0x5c962e['error'][_0x9641('0x26')]);}logger['error'](_0x9641('0x21'),_0x4e5f74,_0x5c962e[_0x9641('0x25')][_0x9641('0x26')]);return _0x3457ae(_0x5c962e[_0x9641('0x25')][_0x9641('0x26')]);}else{logger[_0x9641('0x20')](_0x9641('0x21'),_0x4e5f74,_0x9641('0x27'));_0x3457ae(_0x5c962e['result'][_0x9641('0x26')]);}})[_0x9641('0x28')](function(_0x58594f){logger[_0x9641('0x25')](_0x9641('0x21'),_0x4e5f74,_0x58594f);_0x4e8564(_0x58594f);});});}function respondWithStatusCode(_0x46096a,_0x36e45b){_0x36e45b=_0x36e45b||0xcc;return function(_0x5ca1cb){if(_0x5ca1cb){return _0x46096a[_0x9641('0x29')](_0x36e45b);}return _0x46096a[_0x9641('0x2a')](_0x36e45b)['end']();};}function respondWithResult(_0x3de43a,_0x4c2c12){_0x4c2c12=_0x4c2c12||0xc8;return function(_0xe289ad){if(_0xe289ad){return _0x3de43a['status'](_0x4c2c12)[_0x9641('0x2b')](_0xe289ad);}};}function respondWithFilteredResult(_0x4009f2,_0x53b1de){return function(_0x978698){if(_0x978698){var _0x92768e=typeof _0x53b1de[_0x9641('0x2c')]==='undefined'&&typeof _0x53b1de[_0x9641('0x2d')]===_0x9641('0x2e');var _0x87dd5a=_0x978698[_0x9641('0x2f')];var _0x489c1c=_0x92768e?0x0:_0x53b1de[_0x9641('0x2c')];var _0x30008d=_0x92768e?_0x978698[_0x9641('0x2f')]:_0x53b1de[_0x9641('0x2c')]+_0x53b1de['limit'];var _0x3697e9;if(_0x30008d>=_0x87dd5a){_0x30008d=_0x87dd5a;_0x3697e9=0xc8;}else{_0x3697e9=0xce;}_0x4009f2[_0x9641('0x2a')](_0x3697e9);return _0x4009f2[_0x9641('0x30')](_0x9641('0x31'),_0x489c1c+'-'+_0x30008d+'/'+_0x87dd5a)[_0x9641('0x2b')](_0x978698);}return null;};}function patchUpdates(_0x38455d){return function(_0x50e532){try{jsonpatch[_0x9641('0x32')](_0x50e532,_0x38455d,!![]);}catch(_0x10cd1f){return BPromise[_0x9641('0x33')](_0x10cd1f);}return _0x50e532[_0x9641('0x34')]();};}function saveUpdates(_0x3cd896,_0x15b608){return function(_0x882b1d){if(_0x882b1d){return _0x882b1d[_0x9641('0x35')](_0x3cd896)[_0x9641('0x36')](function(_0x3b347c){return _0x3b347c;});}return null;};}function removeEntity(_0x2f5126,_0x549503){return function(_0x44baf8){if(_0x44baf8){return _0x44baf8[_0x9641('0x37')]()[_0x9641('0x36')](function(){_0x2f5126[_0x9641('0x2a')](0xcc)[_0x9641('0x38')]();});}};}function handleEntityNotFound(_0x3cf467,_0x1bd45b){return function(_0x47cb01){if(!_0x47cb01){_0x3cf467[_0x9641('0x29')](0x194);}return _0x47cb01;};}function handleError(_0x1467a0,_0x218aa5){_0x218aa5=_0x218aa5||0x1f4;return function(_0x3f659a){logger[_0x9641('0x25')](_0x3f659a[_0x9641('0x39')]);if(_0x3f659a[_0x9641('0x3a')]){delete _0x3f659a[_0x9641('0x3a')];}_0x1467a0[_0x9641('0x2a')](_0x218aa5)[_0x9641('0x3b')](_0x3f659a);};}exports[_0x9641('0x3c')]=function(_0x469311,_0x48052b){var _0x286add={},_0x539593={},_0x3f42b1={'count':0x0,'rows':[]};var _0x4ff8ee=_[_0x9641('0x3d')](db[_0x9641('0x3e')][_0x9641('0x3f')],function(_0x17061c){return{'name':_0x17061c[_0x9641('0x40')],'type':_0x17061c['type'][_0x9641('0x41')]};});_0x539593[_0x9641('0x42')]=_[_0x9641('0x3d')](_0x4ff8ee,_0x9641('0x3a'));_0x539593[_0x9641('0x43')]=_[_0x9641('0x44')](_0x469311[_0x9641('0x43')]);_0x539593[_0x9641('0x45')]=_[_0x9641('0x46')](_0x539593[_0x9641('0x42')],_0x539593[_0x9641('0x43')]);_0x286add[_0x9641('0x47')]=_[_0x9641('0x46')](_0x539593['model'],qs[_0x9641('0x48')](_0x469311[_0x9641('0x43')][_0x9641('0x48')]));_0x286add[_0x9641('0x47')]=_0x286add[_0x9641('0x47')]['length']?_0x286add['attributes']:_0x539593[_0x9641('0x42')];if(!_0x469311[_0x9641('0x43')][_0x9641('0x49')](_0x9641('0x4a'))){_0x286add[_0x9641('0x2d')]=qs[_0x9641('0x2d')](_0x469311[_0x9641('0x43')][_0x9641('0x2d')]);_0x286add[_0x9641('0x2c')]=qs[_0x9641('0x2c')](_0x469311[_0x9641('0x43')]['offset']);}_0x286add[_0x9641('0x4b')]=qs[_0x9641('0x4c')](_0x469311[_0x9641('0x43')]['sort']);_0x286add[_0x9641('0x4d')]=qs[_0x9641('0x45')](_[_0x9641('0x4e')](_0x469311[_0x9641('0x43')],_0x539593[_0x9641('0x45')]),_0x4ff8ee);if(_0x469311[_0x9641('0x43')][_0x9641('0x4f')]){_0x286add['where']=_[_0x9641('0x50')](_0x286add[_0x9641('0x4d')],{'$or':_['map'](_0x4ff8ee,function(_0x4e2d54){if(_0x4e2d54[_0x9641('0x51')]!=='VIRTUAL'){var _0x1d7953={};_0x1d7953[_0x4e2d54[_0x9641('0x3a')]]={'$like':'%'+_0x469311['query']['filter']+'%'};return _0x1d7953;}})});}_0x286add=_[_0x9641('0x50')]({},_0x286add,_0x469311[_0x9641('0x52')]);var _0x1f5131={'where':_0x286add[_0x9641('0x4d')]};return db[_0x9641('0x3e')][_0x9641('0x2f')](_0x1f5131)['then'](function(_0x2cbd0b){_0x3f42b1['count']=_0x2cbd0b;if(_0x469311['query'][_0x9641('0x53')]){_0x286add['include']=[{'all':!![]}];}return db[_0x9641('0x3e')][_0x9641('0x54')](_0x286add);})['then'](function(_0x57e3ce){_0x3f42b1[_0x9641('0x55')]=_0x57e3ce;return _0x3f42b1;})[_0x9641('0x36')](respondWithFilteredResult(_0x48052b,_0x286add))[_0x9641('0x28')](handleError(_0x48052b,null));};exports['show']=function(_0x2b53ac,_0xddb736){var _0x564408={'raw':!![],'where':{'id':_0x2b53ac['params']['id']}},_0x3eb3c8={};_0x3eb3c8[_0x9641('0x42')]=_[_0x9641('0x44')](db[_0x9641('0x3e')][_0x9641('0x3f')]);_0x3eb3c8[_0x9641('0x43')]=_[_0x9641('0x44')](_0x2b53ac[_0x9641('0x43')]);_0x3eb3c8['filters']=_[_0x9641('0x46')](_0x3eb3c8[_0x9641('0x42')],_0x3eb3c8[_0x9641('0x43')]);_0x564408[_0x9641('0x47')]=_[_0x9641('0x46')](_0x3eb3c8[_0x9641('0x42')],qs['fields'](_0x2b53ac['query']['fields']));_0x564408[_0x9641('0x47')]=_0x564408['attributes'][_0x9641('0x56')]?_0x564408[_0x9641('0x47')]:_0x3eb3c8[_0x9641('0x42')];if(_0x2b53ac['query'][_0x9641('0x53')]){_0x564408[_0x9641('0x57')]=[{'all':!![]}];}_0x564408=_[_0x9641('0x50')]({},_0x564408,_0x2b53ac[_0x9641('0x52')]);return db[_0x9641('0x3e')][_0x9641('0x58')](_0x564408)[_0x9641('0x36')](handleEntityNotFound(_0xddb736,null))['then'](respondWithResult(_0xddb736,null))[_0x9641('0x28')](handleError(_0xddb736,null));};exports[_0x9641('0x59')]=function(_0x44cce0,_0x1285c8){return db[_0x9641('0x3e')]['create'](_0x44cce0[_0x9641('0x5a')],{})['then'](respondWithResult(_0x1285c8,0xc9))[_0x9641('0x28')](handleError(_0x1285c8,null));};exports[_0x9641('0x35')]=function(_0x13e915,_0x585353){if(_0x13e915['body']['id']){delete _0x13e915[_0x9641('0x5a')]['id'];}return db['ChatMessage'][_0x9641('0x58')]({'where':{'id':_0x13e915[_0x9641('0x5b')]['id']}})[_0x9641('0x36')](handleEntityNotFound(_0x585353,null))[_0x9641('0x36')](saveUpdates(_0x13e915[_0x9641('0x5a')],null))[_0x9641('0x36')](respondWithResult(_0x585353,null))[_0x9641('0x28')](handleError(_0x585353,null));};exports[_0x9641('0x37')]=function(_0x24f404,_0x53e8a1){return db['ChatMessage'][_0x9641('0x58')]({'where':{'id':_0x24f404['params']['id']}})[_0x9641('0x36')](handleEntityNotFound(_0x53e8a1,null))['then'](removeEntity(_0x53e8a1,null))[_0x9641('0x28')](handleError(_0x53e8a1,null));};exports[_0x9641('0x5c')]=function(_0x206fb1,_0x34a40a){return db[_0x9641('0x3e')][_0x9641('0x5c')]()[_0x9641('0x36')](respondWithResult(_0x34a40a,null))[_0x9641('0x28')](handleError(_0x34a40a,null));};var interaction_log=require(_0x9641('0x5d'))(_0x9641('0x5e'));exports[_0x9641('0x5f')]=function(_0x299726,_0x15065b,_0x276cb4){var _0x3b02e2={'agent':{},'channel':_0x9641('0x60')};if(_0x299726[_0x9641('0x5a')]['id']){delete _0x299726['body']['id'];}_0x299726[_0x9641('0x5a')][_0x9641('0x61')]=!![];_0x299726[_0x9641('0x5a')][_0x9641('0x62')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x299726[_0x9641('0x5a')][_0x9641('0x63')]=_0x299726[_0x9641('0x5a')][_0x9641('0x63')]||_0x299726['user']['id'];_0x3b02e2['agent']['id']=_0x299726[_0x9641('0x5a')][_0x9641('0x63')];return db[_0x9641('0x3e')][_0x9641('0x58')]({'where':{'id':_0x299726['params']['id'],'UserId':null}})[_0x9641('0x36')](handleEntityNotFound(_0x15065b,null))[_0x9641('0x36')](saveUpdates(_0x299726[_0x9641('0x5a')],null))[_0x9641('0x36')](function(_0x5b7014){if(_0x5b7014){_0x3b02e2[_0x9641('0x26')]=_0x5b7014['get']({'plain':!![]});return db['ChatInteraction'][_0x9641('0x58')]({'where':{'id':_0x5b7014[_0x9641('0x64')]}});}return null;})[_0x9641('0x36')](handleEntityNotFound(_0x15065b,null))[_0x9641('0x36')](function(_0x5d61a7){if(_0x5d61a7){return _0x5d61a7[_0x9641('0x35')]({'UserId':_0x299726['body'][_0x9641('0x63')],'read1stAt':_[_0x9641('0x65')](_0x5d61a7[_0x9641('0x66')])?moment()[_0x9641('0x67')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0x9641('0x36')](function(_0x42bea1){if(_0x42bea1){_0x3b02e2[_0x9641('0x68')]=_0x42bea1[_0x9641('0x69')]({'plain':!![]});interaction_log[_0x9641('0x20')](_0x9641('0x6a'),_0x299726[_0x9641('0x6b')]['id'],_0x299726['user'][_0x9641('0x3a')],_0x299726[_0x9641('0x6b')]['role'],_0x3b02e2[_0x9641('0x68')]['id'],_0x299726[_0x9641('0x5a')]?JSON[_0x9641('0x6c')](_0x299726[_0x9641('0x5a')]):_0x9641('0x6d'));return respondWithRpcPromise(_0x9641('0x6e'),_0x9641('0x6f'),_0x3b02e2);}return null;})[_0x9641('0x36')](function(_0x3541ea){var _0x5979ab=_0x9641('0x70')+_0x3541ea[_0x9641('0x26')][_0x9641('0x71')];return db[_0x9641('0x72')]['query'](_0x5979ab,{'type':db[_0x9641('0x73')]['QueryTypes'][_0x9641('0x74')],'raw':!![]})[_0x9641('0x36')](function(_0x1db984){return _0x1db984;});})[_0x9641('0x36')](function(_0x3fa8bf){if(_0x3fa8bf){_0x3b02e2[_0x9641('0x26')][_0x9641('0x75')]=_0x3fa8bf[0x0];if(!_0x299726[_0x9641('0x5a')]['UserId'])return;return db[_0x9641('0x76')][_0x9641('0x58')]({'where':{'id':_0x299726[_0x9641('0x5a')][_0x9641('0x63')],'role':_0x9641('0x77')},'attributes':['id','name',_0x9641('0x78'),'email','internal'],'raw':!![]});}return null;})[_0x9641('0x36')](function(_0x57d670){if(!_0x57d670)return null;_0x3b02e2[_0x9641('0x26')][_0x9641('0x77')]=_0x57d670;return _0x3b02e2;})['then'](function(_0x4451a4){if(_0x4451a4){if(_0x299726[_0x9641('0x5a')]['manual']){_0x3b02e2[_0x9641('0x26')][_0x9641('0x79')]=util[_0x9641('0x67')]('SIP/%s',_0x299726[_0x9641('0x6b')][_0x9641('0x3a')]);_0x3b02e2[_0x9641('0x26')][_0x9641('0x7a')]=_0x3b02e2[_0x9641('0x7a')];_0x3b02e2[_0x9641('0x26')][_0x9641('0x7b')]=_0x3b02e2[_0x9641('0x7a')];_0x3b02e2['message'][_0x9641('0x7c')]=_0x9641('0x5f');return respondWithRpcPromise('EventManager',_0x9641('0x7d'),{'event':_0x9641('0x7e'),'message':_[_0x9641('0x50')](_0x3b02e2[_0x9641('0x26')],JSON[_0x9641('0x7f')](_0x3b02e2[_0x9641('0x68')][_0x9641('0x80')]))},client9002)[_0x9641('0x36')](function(){return _0x3b02e2;});}return _0x3b02e2;}return null;})[_0x9641('0x36')](respondWithResult(_0x15065b,null))[_0x9641('0x28')](handleError(_0x15065b,null));};var interaction_log=require(_0x9641('0x5d'))(_0x9641('0x5e'));exports[_0x9641('0x33')]=function(_0x4eef47,_0x81d884,_0x4e29af){var _0x4499c7={'agent':{},'channel':'chat'};if(_0x4eef47[_0x9641('0x5a')]['id']){delete _0x4eef47[_0x9641('0x5a')]['id'];}_0x4eef47[_0x9641('0x5a')][_0x9641('0x63')]=_0x4eef47[_0x9641('0x5a')][_0x9641('0x63')]||_0x4eef47[_0x9641('0x6b')]['id'];_0x4499c7['agent']['id']=_0x4eef47['body'][_0x9641('0x63')];return db[_0x9641('0x3e')][_0x9641('0x58')]({'where':{'id':_0x4eef47[_0x9641('0x5b')]['id'],'UserId':null}})[_0x9641('0x36')](handleEntityNotFound(_0x81d884,null))[_0x9641('0x36')](function(_0x10f014){if(_0x10f014){_0x4499c7['message']=_0x10f014['get']({'plain':!![]});return db['ChatInteraction'][_0x9641('0x58')]({'where':{'id':_0x10f014[_0x9641('0x64')]}});}return null;})[_0x9641('0x36')](handleEntityNotFound(_0x81d884,null))['then'](function(_0x35884f){if(_0x35884f){_0x4499c7['interaction']=_0x35884f[_0x9641('0x69')]({'plain':!![]});interaction_log[_0x9641('0x20')](_0x9641('0x81'),_0x4eef47['user']['id'],_0x4eef47[_0x9641('0x6b')][_0x9641('0x3a')],_0x4eef47[_0x9641('0x6b')][_0x9641('0x82')],_0x4499c7[_0x9641('0x68')]['id'],_0x4eef47[_0x9641('0x5a')]?JSON[_0x9641('0x6c')](_0x4eef47[_0x9641('0x5a')]):'null');return respondWithRpcPromise(_0x9641('0x83'),_0x9641('0x84'),_0x4499c7);}return null;})[_0x9641('0x36')](function(_0x11e700){var _0x3ba20f=_0x9641('0x70')+_0x11e700[_0x9641('0x26')][_0x9641('0x71')];return db['sequelize']['query'](_0x3ba20f,{'type':db[_0x9641('0x73')][_0x9641('0x85')][_0x9641('0x74')],'raw':!![]})['then'](function(_0x52a290){return _0x52a290;});})[_0x9641('0x36')](function(_0x30271b){if(_0x30271b){_0x4499c7['message'][_0x9641('0x75')]=_0x30271b[0x0];if(!_0x4eef47[_0x9641('0x5a')][_0x9641('0x63')])return;return db['User']['find']({'where':{'id':_0x4eef47[_0x9641('0x5a')][_0x9641('0x63')],'role':_0x9641('0x77')},'attributes':['id',_0x9641('0x3a'),_0x9641('0x78'),'email',_0x9641('0x86')],'raw':!![]});}return null;})['then'](function(_0x24829f){if(!_0x24829f)return null;_0x4499c7[_0x9641('0x26')]['agent']=_0x24829f;return _0x4499c7;})[_0x9641('0x36')](function(_0x561a63){if(_0x561a63){_0x561a63['message'][_0x9641('0x79')]=util[_0x9641('0x67')]('SIP/%s',_0x4eef47[_0x9641('0x6b')]['name']);_0x561a63['message'][_0x9641('0x7a')]=_0x4499c7['channel'];_0x561a63[_0x9641('0x26')][_0x9641('0x7b')]=_0x4499c7[_0x9641('0x7a')];_0x561a63['message']['event']=_0x9641('0x33');respondWithRpcPromise(_0x9641('0x7d'),_0x9641('0x7d'),{'event':_0x9641('0x87'),'message':_[_0x9641('0x50')](_0x4499c7[_0x9641('0x26')],JSON['parse'](_0x4499c7[_0x9641('0x68')][_0x9641('0x80')]))},client9002);return _0x4499c7;}return null;})[_0x9641('0x36')](respondWithResult(_0x81d884,null))[_0x9641('0x28')](handleError(_0x81d884,null));};
\ No newline at end of file
+var _0x19e3=['order','sort','pick','filter','where','merge','includeAll','findAll','rows','show','params','include','options','create','body','update','find','describe','chat-interactions','accept','chat','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','ChatInteraction','ChatInteractionId','isNil','read1stAt','get','null','AcceptMessage','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','Sequelize','QueryTypes','SELECT','User','fullname','email','internal','manual','interface','SIP/%s','channel','motionChannel','EventManager','acceptmessage','parse','formData','interaction','[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','sequelize','event','rejectmessage','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatMessage.socket','http','client','request','then','info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug','ChatMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','destroy','stack','name','index','ChatMessage','rawAttributes','fieldName','type','key','model','map','keys','filters','intersection','attributes','fields','length','query','hasOwnProperty','nolimit'];(function(_0x471aaa,_0x2610ea){var _0x473db5=function(_0x291234){while(--_0x291234){_0x471aaa['push'](_0x471aaa['shift']());}};_0x473db5(++_0x2610ea);}(_0x19e3,0x1d3));var _0x319e=function(_0x556ea1,_0x4a2822){_0x556ea1=_0x556ea1-0x0;var _0x24071e=_0x19e3[_0x556ea1];return _0x24071e;};'use strict';var emlformat=require(_0x319e('0x0'));var rimraf=require(_0x319e('0x1'));var zipdir=require(_0x319e('0x2'));var jsonpatch=require(_0x319e('0x3'));var rp=require(_0x319e('0x4'));var moment=require(_0x319e('0x5'));var BPromise=require(_0x319e('0x6'));var Mustache=require(_0x319e('0x7'));var util=require(_0x319e('0x8'));var path=require(_0x319e('0x9'));var sox=require(_0x319e('0xa'));var csv=require(_0x319e('0xb'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x319e('0xc'));var _=require(_0x319e('0xd'));var squel=require(_0x319e('0xe'));var crypto=require(_0x319e('0xf'));var jsforce=require(_0x319e('0x10'));var deskjs=require(_0x319e('0x11'));var toCsv=require('to-csv');var querystring=require(_0x319e('0x12'));var Papa=require('papaparse');var Redis=require(_0x319e('0x13'));var authService=require('../../components/auth/service');var qs=require(_0x319e('0x14'));var as=require(_0x319e('0x15'));var hardwareService=require(_0x319e('0x16'));var logger=require(_0x319e('0x17'))(_0x319e('0x18'));var utils=require(_0x319e('0x19'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x319e('0x1a'))['db'];config[_0x319e('0x1b')]=_[_0x319e('0x1c')](config['redis'],{'host':_0x319e('0x1d'),'port':0x18eb});var socket=require(_0x319e('0x1e'))(new Redis(config[_0x319e('0x1b')]));require(_0x319e('0x1f'))['register'](socket);var jayson=require('jayson/promise');var client=jayson['client'][_0x319e('0x20')]({'port':0x232c});var client9002=jayson[_0x319e('0x21')][_0x319e('0x20')]({'port':0x232a});function respondWithRpcPromise(_0x28f483,_0x51bf55,_0x126313,_0x1712ba){return new BPromise(function(_0x4f22b4,_0x5e8626){var _0x4a13c1=_0x1712ba||client;return _0x4a13c1[_0x319e('0x22')](_0x28f483,_0x126313)[_0x319e('0x23')](function(_0x10b86c){logger[_0x319e('0x24')](_0x319e('0x25'),_0x51bf55,_0x319e('0x26'));logger[_0x319e('0x27')](_0x319e('0x28'),_0x51bf55,_0x319e('0x26'),JSON[_0x319e('0x29')](_0x10b86c));if(_0x10b86c[_0x319e('0x2a')]){if(_0x10b86c['error']['code']===0x1f4){logger[_0x319e('0x2a')]('ChatMessage,\x20%s,\x20%s',_0x51bf55,_0x10b86c[_0x319e('0x2a')]['message']);return _0x5e8626(_0x10b86c[_0x319e('0x2a')][_0x319e('0x2b')]);}logger[_0x319e('0x2a')]('ChatMessage,\x20%s,\x20%s',_0x51bf55,_0x10b86c[_0x319e('0x2a')][_0x319e('0x2b')]);return _0x4f22b4(_0x10b86c[_0x319e('0x2a')][_0x319e('0x2b')]);}else{logger[_0x319e('0x24')](_0x319e('0x25'),_0x51bf55,'request\x20sent');_0x4f22b4(_0x10b86c[_0x319e('0x2c')][_0x319e('0x2b')]);}})[_0x319e('0x2d')](function(_0x338f5b){logger[_0x319e('0x2a')](_0x319e('0x25'),_0x51bf55,_0x338f5b);_0x5e8626(_0x338f5b);});});}function respondWithStatusCode(_0x53e148,_0x367715){_0x367715=_0x367715||0xcc;return function(_0x3b4a33){if(_0x3b4a33){return _0x53e148['sendStatus'](_0x367715);}return _0x53e148[_0x319e('0x2e')](_0x367715)[_0x319e('0x2f')]();};}function respondWithResult(_0x536b5b,_0x7608ec){_0x7608ec=_0x7608ec||0xc8;return function(_0x1af6a4){if(_0x1af6a4){return _0x536b5b[_0x319e('0x2e')](_0x7608ec)[_0x319e('0x30')](_0x1af6a4);}};}function respondWithFilteredResult(_0x2d1809,_0xdcadf0){return function(_0x29bfd5){if(_0x29bfd5){var _0xef5dfe=typeof _0xdcadf0[_0x319e('0x31')]===_0x319e('0x32')&&typeof _0xdcadf0[_0x319e('0x33')]===_0x319e('0x32');var _0x8fb55b=_0x29bfd5['count'];var _0x344c58=_0xef5dfe?0x0:_0xdcadf0['offset'];var _0x1971f8=_0xef5dfe?_0x29bfd5[_0x319e('0x34')]:_0xdcadf0[_0x319e('0x31')]+_0xdcadf0['limit'];var _0x556a26;if(_0x1971f8>=_0x8fb55b){_0x1971f8=_0x8fb55b;_0x556a26=0xc8;}else{_0x556a26=0xce;}_0x2d1809[_0x319e('0x2e')](_0x556a26);return _0x2d1809[_0x319e('0x35')](_0x319e('0x36'),_0x344c58+'-'+_0x1971f8+'/'+_0x8fb55b)['json'](_0x29bfd5);}return null;};}function patchUpdates(_0x4f4284){return function(_0x30bcd1){try{jsonpatch[_0x319e('0x37')](_0x30bcd1,_0x4f4284,!![]);}catch(_0x119032){return BPromise[_0x319e('0x38')](_0x119032);}return _0x30bcd1['save']();};}function saveUpdates(_0x31f597,_0x50391d){return function(_0x22529a){if(_0x22529a){return _0x22529a['update'](_0x31f597)['then'](function(_0x4413c7){return _0x4413c7;});}return null;};}function removeEntity(_0x3ccb42,_0x38e7db){return function(_0x409acb){if(_0x409acb){return _0x409acb[_0x319e('0x39')]()[_0x319e('0x23')](function(){_0x3ccb42[_0x319e('0x2e')](0xcc)['end']();});}};}function handleEntityNotFound(_0x52ac20,_0x4c541c){return function(_0x7dc266){if(!_0x7dc266){_0x52ac20['sendStatus'](0x194);}return _0x7dc266;};}function handleError(_0x327bf8,_0x120f43){_0x120f43=_0x120f43||0x1f4;return function(_0x262cc1){logger['error'](_0x262cc1[_0x319e('0x3a')]);if(_0x262cc1['name']){delete _0x262cc1[_0x319e('0x3b')];}_0x327bf8[_0x319e('0x2e')](_0x120f43)['send'](_0x262cc1);};}exports[_0x319e('0x3c')]=function(_0x45b38e,_0x5ba84c){var _0x16c6b4={},_0x21c659={},_0x1a6c94={'count':0x0,'rows':[]};var _0x4c89a8=_['map'](db[_0x319e('0x3d')][_0x319e('0x3e')],function(_0xeebfb4){return{'name':_0xeebfb4[_0x319e('0x3f')],'type':_0xeebfb4[_0x319e('0x40')][_0x319e('0x41')]};});_0x21c659[_0x319e('0x42')]=_[_0x319e('0x43')](_0x4c89a8,'name');_0x21c659['query']=_[_0x319e('0x44')](_0x45b38e['query']);_0x21c659[_0x319e('0x45')]=_[_0x319e('0x46')](_0x21c659[_0x319e('0x42')],_0x21c659['query']);_0x16c6b4[_0x319e('0x47')]=_['intersection'](_0x21c659['model'],qs['fields'](_0x45b38e['query'][_0x319e('0x48')]));_0x16c6b4['attributes']=_0x16c6b4[_0x319e('0x47')][_0x319e('0x49')]?_0x16c6b4['attributes']:_0x21c659[_0x319e('0x42')];if(!_0x45b38e[_0x319e('0x4a')][_0x319e('0x4b')](_0x319e('0x4c'))){_0x16c6b4['limit']=qs[_0x319e('0x33')](_0x45b38e[_0x319e('0x4a')][_0x319e('0x33')]);_0x16c6b4[_0x319e('0x31')]=qs[_0x319e('0x31')](_0x45b38e[_0x319e('0x4a')][_0x319e('0x31')]);}_0x16c6b4[_0x319e('0x4d')]=qs[_0x319e('0x4e')](_0x45b38e['query'][_0x319e('0x4e')]);_0x16c6b4['where']=qs[_0x319e('0x45')](_[_0x319e('0x4f')](_0x45b38e[_0x319e('0x4a')],_0x21c659[_0x319e('0x45')]),_0x4c89a8);if(_0x45b38e['query'][_0x319e('0x50')]){_0x16c6b4[_0x319e('0x51')]=_[_0x319e('0x52')](_0x16c6b4[_0x319e('0x51')],{'$or':_[_0x319e('0x43')](_0x4c89a8,function(_0x4a5f56){if(_0x4a5f56[_0x319e('0x40')]!=='VIRTUAL'){var _0xe99787={};_0xe99787[_0x4a5f56[_0x319e('0x3b')]]={'$like':'%'+_0x45b38e['query'][_0x319e('0x50')]+'%'};return _0xe99787;}})});}_0x16c6b4=_[_0x319e('0x52')]({},_0x16c6b4,_0x45b38e['options']);var _0x737008={'where':_0x16c6b4['where']};return db['ChatMessage'][_0x319e('0x34')](_0x737008)[_0x319e('0x23')](function(_0x3deca1){_0x1a6c94[_0x319e('0x34')]=_0x3deca1;if(_0x45b38e[_0x319e('0x4a')][_0x319e('0x53')]){_0x16c6b4['include']=[{'all':!![]}];}return db[_0x319e('0x3d')][_0x319e('0x54')](_0x16c6b4);})[_0x319e('0x23')](function(_0x434374){_0x1a6c94[_0x319e('0x55')]=_0x434374;return _0x1a6c94;})['then'](respondWithFilteredResult(_0x5ba84c,_0x16c6b4))['catch'](handleError(_0x5ba84c,null));};exports[_0x319e('0x56')]=function(_0x109d6e,_0x56a07a){var _0x12b3ae={'raw':!![],'where':{'id':_0x109d6e[_0x319e('0x57')]['id']}},_0x7faea8={};_0x7faea8[_0x319e('0x42')]=_[_0x319e('0x44')](db[_0x319e('0x3d')][_0x319e('0x3e')]);_0x7faea8[_0x319e('0x4a')]=_[_0x319e('0x44')](_0x109d6e['query']);_0x7faea8['filters']=_['intersection'](_0x7faea8['model'],_0x7faea8[_0x319e('0x4a')]);_0x12b3ae[_0x319e('0x47')]=_[_0x319e('0x46')](_0x7faea8['model'],qs['fields'](_0x109d6e[_0x319e('0x4a')][_0x319e('0x48')]));_0x12b3ae[_0x319e('0x47')]=_0x12b3ae[_0x319e('0x47')][_0x319e('0x49')]?_0x12b3ae[_0x319e('0x47')]:_0x7faea8[_0x319e('0x42')];if(_0x109d6e[_0x319e('0x4a')][_0x319e('0x53')]){_0x12b3ae[_0x319e('0x58')]=[{'all':!![]}];}_0x12b3ae=_['merge']({},_0x12b3ae,_0x109d6e[_0x319e('0x59')]);return db[_0x319e('0x3d')]['find'](_0x12b3ae)['then'](handleEntityNotFound(_0x56a07a,null))[_0x319e('0x23')](respondWithResult(_0x56a07a,null))[_0x319e('0x2d')](handleError(_0x56a07a,null));};exports[_0x319e('0x5a')]=function(_0x13eb5e,_0xa6f63b){return db[_0x319e('0x3d')]['create'](_0x13eb5e[_0x319e('0x5b')],{})[_0x319e('0x23')](respondWithResult(_0xa6f63b,0xc9))[_0x319e('0x2d')](handleError(_0xa6f63b,null));};exports[_0x319e('0x5c')]=function(_0xa5494d,_0x526463){if(_0xa5494d[_0x319e('0x5b')]['id']){delete _0xa5494d[_0x319e('0x5b')]['id'];}return db[_0x319e('0x3d')][_0x319e('0x5d')]({'where':{'id':_0xa5494d[_0x319e('0x57')]['id']}})[_0x319e('0x23')](handleEntityNotFound(_0x526463,null))[_0x319e('0x23')](saveUpdates(_0xa5494d[_0x319e('0x5b')],null))[_0x319e('0x23')](respondWithResult(_0x526463,null))[_0x319e('0x2d')](handleError(_0x526463,null));};exports[_0x319e('0x39')]=function(_0x3e41a2,_0x43d641){return db['ChatMessage']['find']({'where':{'id':_0x3e41a2['params']['id']}})['then'](handleEntityNotFound(_0x43d641,null))[_0x319e('0x23')](removeEntity(_0x43d641,null))['catch'](handleError(_0x43d641,null));};exports[_0x319e('0x5e')]=function(_0x21b423,_0x4719ab){return db[_0x319e('0x3d')]['describe']()[_0x319e('0x23')](respondWithResult(_0x4719ab,null))[_0x319e('0x2d')](handleError(_0x4719ab,null));};var interaction_log=require(_0x319e('0x17'))(_0x319e('0x5f'));exports[_0x319e('0x60')]=function(_0x548be0,_0x47bc62,_0x35501f){var _0x15907a={'agent':{},'channel':_0x319e('0x61')};if(_0x548be0[_0x319e('0x5b')]['id']){delete _0x548be0['body']['id'];}_0x548be0[_0x319e('0x5b')]['read']=!![];_0x548be0['body'][_0x319e('0x62')]=moment()[_0x319e('0x63')](_0x319e('0x64'));_0x548be0[_0x319e('0x5b')][_0x319e('0x65')]=_0x548be0[_0x319e('0x5b')]['UserId']||_0x548be0[_0x319e('0x66')]['id'];_0x15907a[_0x319e('0x67')]['id']=_0x548be0[_0x319e('0x5b')][_0x319e('0x65')];return db['ChatMessage'][_0x319e('0x5d')]({'where':{'id':_0x548be0['params']['id'],'UserId':null}})[_0x319e('0x23')](handleEntityNotFound(_0x47bc62,null))[_0x319e('0x23')](saveUpdates(_0x548be0[_0x319e('0x5b')],null))[_0x319e('0x23')](function(_0x13a173){if(_0x13a173){_0x15907a[_0x319e('0x2b')]=_0x13a173['get']({'plain':!![]});return db[_0x319e('0x68')]['find']({'where':{'id':_0x13a173[_0x319e('0x69')]}});}return null;})[_0x319e('0x23')](handleEntityNotFound(_0x47bc62,null))[_0x319e('0x23')](function(_0x4946fe){if(_0x4946fe){return _0x4946fe[_0x319e('0x5c')]({'UserId':_0x548be0[_0x319e('0x5b')][_0x319e('0x65')],'read1stAt':_[_0x319e('0x6a')](_0x4946fe[_0x319e('0x6b')])?moment()[_0x319e('0x63')](_0x319e('0x64')):undefined});}return null;})[_0x319e('0x23')](function(_0x153156){if(_0x153156){_0x15907a['interaction']=_0x153156[_0x319e('0x6c')]({'plain':!![]});interaction_log[_0x319e('0x24')]('[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x548be0[_0x319e('0x66')]['id'],_0x548be0[_0x319e('0x66')][_0x319e('0x3b')],_0x548be0[_0x319e('0x66')]['role'],_0x15907a['interaction']['id'],_0x548be0[_0x319e('0x5b')]?JSON['stringify'](_0x548be0[_0x319e('0x5b')]):_0x319e('0x6d'));return respondWithRpcPromise(_0x319e('0x6e'),_0x319e('0x6f'),_0x15907a);}return null;})['then'](function(_0x11500e){var _0xd22c9f=_0x319e('0x70')+_0x11500e[_0x319e('0x2b')][_0x319e('0x71')];return db['sequelize'][_0x319e('0x4a')](_0xd22c9f,{'type':db[_0x319e('0x72')][_0x319e('0x73')][_0x319e('0x74')],'raw':!![]})[_0x319e('0x23')](function(_0x1d2c5a){return _0x1d2c5a;});})[_0x319e('0x23')](function(_0x52f38d){if(_0x52f38d){_0x15907a[_0x319e('0x2b')]['contact']=_0x52f38d[0x0];if(!_0x548be0[_0x319e('0x5b')]['UserId'])return;return db[_0x319e('0x75')][_0x319e('0x5d')]({'where':{'id':_0x548be0[_0x319e('0x5b')][_0x319e('0x65')],'role':'agent'},'attributes':['id',_0x319e('0x3b'),_0x319e('0x76'),_0x319e('0x77'),_0x319e('0x78')],'raw':!![]});}return null;})[_0x319e('0x23')](function(_0x26346c){if(!_0x26346c)return null;_0x15907a[_0x319e('0x2b')][_0x319e('0x67')]=_0x26346c;return _0x15907a;})[_0x319e('0x23')](function(_0x4a6a85){if(_0x4a6a85){if(_0x548be0[_0x319e('0x5b')][_0x319e('0x79')]){_0x15907a[_0x319e('0x2b')][_0x319e('0x7a')]=util['format'](_0x319e('0x7b'),_0x548be0['user'][_0x319e('0x3b')]);_0x15907a[_0x319e('0x2b')][_0x319e('0x7c')]=_0x15907a[_0x319e('0x7c')];_0x15907a[_0x319e('0x2b')][_0x319e('0x7d')]=_0x15907a[_0x319e('0x7c')];_0x15907a['message']['event']='accept';return respondWithRpcPromise(_0x319e('0x7e'),_0x319e('0x7e'),{'event':_0x319e('0x7f'),'message':_[_0x319e('0x52')](_0x15907a[_0x319e('0x2b')],JSON[_0x319e('0x80')](_0x15907a['interaction'][_0x319e('0x81')]))},client9002)[_0x319e('0x23')](function(){return _0x15907a;});}return _0x15907a;}return null;})[_0x319e('0x23')](respondWithResult(_0x47bc62,null))[_0x319e('0x2d')](handleError(_0x47bc62,null));};var interaction_log=require(_0x319e('0x17'))(_0x319e('0x5f'));exports['reject']=function(_0x1b925b,_0x4f18da,_0x3118d5){var _0x709160={'agent':{},'channel':_0x319e('0x61')};if(_0x1b925b[_0x319e('0x5b')]['id']){delete _0x1b925b[_0x319e('0x5b')]['id'];}_0x1b925b['body'][_0x319e('0x65')]=_0x1b925b['body']['UserId']||_0x1b925b[_0x319e('0x66')]['id'];_0x709160['agent']['id']=_0x1b925b[_0x319e('0x5b')][_0x319e('0x65')];return db[_0x319e('0x3d')][_0x319e('0x5d')]({'where':{'id':_0x1b925b[_0x319e('0x57')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x4f18da,null))[_0x319e('0x23')](function(_0x38984a){if(_0x38984a){_0x709160[_0x319e('0x2b')]=_0x38984a[_0x319e('0x6c')]({'plain':!![]});return db[_0x319e('0x68')][_0x319e('0x5d')]({'where':{'id':_0x38984a[_0x319e('0x69')]}});}return null;})['then'](handleEntityNotFound(_0x4f18da,null))['then'](function(_0x20d3eb){if(_0x20d3eb){_0x709160[_0x319e('0x82')]=_0x20d3eb[_0x319e('0x6c')]({'plain':!![]});interaction_log[_0x319e('0x24')](_0x319e('0x83'),_0x1b925b[_0x319e('0x66')]['id'],_0x1b925b[_0x319e('0x66')][_0x319e('0x3b')],_0x1b925b['user']['role'],_0x709160[_0x319e('0x82')]['id'],_0x1b925b[_0x319e('0x5b')]?JSON['stringify'](_0x1b925b[_0x319e('0x5b')]):_0x319e('0x6d'));return respondWithRpcPromise(_0x319e('0x84'),'rejectMessage',_0x709160);}return null;})[_0x319e('0x23')](function(_0x19488e){var _0x5b1755=_0x319e('0x70')+_0x19488e[_0x319e('0x2b')]['ContactId'];return db[_0x319e('0x85')][_0x319e('0x4a')](_0x5b1755,{'type':db['Sequelize'][_0x319e('0x73')][_0x319e('0x74')],'raw':!![]})[_0x319e('0x23')](function(_0x173c75){return _0x173c75;});})[_0x319e('0x23')](function(_0x1dcb01){if(_0x1dcb01){_0x709160[_0x319e('0x2b')]['contact']=_0x1dcb01[0x0];if(!_0x1b925b[_0x319e('0x5b')][_0x319e('0x65')])return;return db['User'][_0x319e('0x5d')]({'where':{'id':_0x1b925b[_0x319e('0x5b')][_0x319e('0x65')],'role':_0x319e('0x67')},'attributes':['id',_0x319e('0x3b'),_0x319e('0x76'),_0x319e('0x77'),_0x319e('0x78')],'raw':!![]});}return null;})[_0x319e('0x23')](function(_0x1075d3){if(!_0x1075d3)return null;_0x709160['message'][_0x319e('0x67')]=_0x1075d3;return _0x709160;})[_0x319e('0x23')](function(_0x3c8aad){if(_0x3c8aad){_0x3c8aad[_0x319e('0x2b')]['interface']=util[_0x319e('0x63')](_0x319e('0x7b'),_0x1b925b[_0x319e('0x66')][_0x319e('0x3b')]);_0x3c8aad[_0x319e('0x2b')][_0x319e('0x7c')]=_0x709160[_0x319e('0x7c')];_0x3c8aad[_0x319e('0x2b')][_0x319e('0x7d')]=_0x709160[_0x319e('0x7c')];_0x3c8aad[_0x319e('0x2b')][_0x319e('0x86')]=_0x319e('0x38');respondWithRpcPromise(_0x319e('0x7e'),_0x319e('0x7e'),{'event':_0x319e('0x87'),'message':_[_0x319e('0x52')](_0x709160['message'],JSON[_0x319e('0x80')](_0x709160[_0x319e('0x82')][_0x319e('0x81')]))},client9002);return _0x709160;}return null;})[_0x319e('0x23')](respondWithResult(_0x4f18da,null))[_0x319e('0x2d')](handleError(_0x4f18da,null));};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.events.js b/server/api/chatMessage/chatMessage.events.js
index b7da3dd..920825e 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 _0x117f=['ChatMessage','save','update','remove','emit','hasOwnProperty','exports','events','../../mysqldb'];(function(_0x1241ba,_0x529e24){var _0x2f01df=function(_0x52463d){while(--_0x52463d){_0x1241ba['push'](_0x1241ba['shift']());}};_0x2f01df(++_0x529e24);}(_0x117f,0x1e4));var _0xf117=function(_0x135c72,_0x2fe069){_0x135c72=_0x135c72-0x0;var _0x52191b=_0x117f[_0x135c72];return _0x52191b;};'use strict';var EventEmitter=require(_0xf117('0x0'));var ChatMessage=require(_0xf117('0x1'))['db'][_0xf117('0x2')];var ChatMessageEvents=new EventEmitter();ChatMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xf117('0x3'),'afterUpdate':_0xf117('0x4'),'afterDestroy':_0xf117('0x5')};function emitEvent(_0x3fe2f6){return function(_0x5767f9,_0x3d943e,_0x391031){ChatMessageEvents['emit'](_0x3fe2f6+':'+_0x5767f9['id'],_0x5767f9);ChatMessageEvents[_0xf117('0x6')](_0x3fe2f6,_0x5767f9);_0x391031(null);};}for(var e in events){if(events[_0xf117('0x7')](e)){var event=events[e];ChatMessage['hook'](e,emitEvent(event));}}module[_0xf117('0x8')]=ChatMessageEvents;
\ No newline at end of file
+var _0x31bc=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','ChatMessage','save','update','remove'];(function(_0x55f8b4,_0x43f30d){var _0x2475f9=function(_0xdd6f4a){while(--_0xdd6f4a){_0x55f8b4['push'](_0x55f8b4['shift']());}};_0x2475f9(++_0x43f30d);}(_0x31bc,0xa4));var _0xc31b=function(_0x3b2369,_0x4c68b9){_0x3b2369=_0x3b2369-0x0;var _0x5a1367=_0x31bc[_0x3b2369];return _0x5a1367;};'use strict';var EventEmitter=require(_0xc31b('0x0'));var ChatMessage=require(_0xc31b('0x1'))['db'][_0xc31b('0x2')];var ChatMessageEvents=new EventEmitter();ChatMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xc31b('0x3'),'afterUpdate':_0xc31b('0x4'),'afterDestroy':_0xc31b('0x5')};function emitEvent(_0x2de83a){return function(_0x39af46,_0x2800f2,_0x2f02d7){ChatMessageEvents[_0xc31b('0x6')](_0x2de83a+':'+_0x39af46['id'],_0x39af46);ChatMessageEvents[_0xc31b('0x6')](_0x2de83a,_0x39af46);_0x2f02d7(null);};}for(var e in events){if(events[_0xc31b('0x7')](e)){var event=events[e];ChatMessage[_0xc31b('0x8')](e,emitEvent(event));}}module[_0xc31b('0x9')]=ChatMessageEvents;
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.model.js b/server/api/chatMessage/chatMessage.model.js
index 77df0a9..b5dac85 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 _0xa2e7=['path','../../config/environment','./chatMessage.attributes','exports','define','ChatMessage','chat_messages','fti_chat_messages','body','FULLTEXT','models','get','direction','toLowerCase','out','secret','isNil','UserId','findOne','then','update','createdAt','catch','error','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x167574,_0x288293){var _0x10e73f=function(_0x8ed259){while(--_0x8ed259){_0x167574['push'](_0x167574['shift']());}};_0x10e73f(++_0x288293);}(_0xa2e7,0x185));var _0x7a2e=function(_0x5d7dc8,_0x14a0fc){_0x5d7dc8=_0x5d7dc8-0x0;var _0x4b99bb=_0xa2e7[_0x5d7dc8];return _0x4b99bb;};'use strict';var _=require(_0x7a2e('0x0'));var util=require(_0x7a2e('0x1'));var logger=require(_0x7a2e('0x2'))(_0x7a2e('0x3'));var moment=require(_0x7a2e('0x4'));var BPromise=require(_0x7a2e('0x5'));var rp=require(_0x7a2e('0x6'));var fs=require('fs');var path=require(_0x7a2e('0x7'));var rimraf=require('rimraf');var config=require(_0x7a2e('0x8'));var attributes=require(_0x7a2e('0x9'));module[_0x7a2e('0xa')]=function(_0x4b942d,_0x253ae2){return _0x4b942d[_0x7a2e('0xb')](_0x7a2e('0xc'),attributes,{'tableName':_0x7a2e('0xd'),'paranoid':![],'indexes':[{'name':_0x7a2e('0xe'),'fields':[_0x7a2e('0xf')],'type':_0x7a2e('0x10')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x10ef14,_0x45f210,_0x2643bb){var _0x2c9454=_0x4b942d[_0x7a2e('0x11')];var _0x283eae=_0x10ef14[_0x7a2e('0x12')]({'plain':!![]});if(_0x283eae['direction']['toLowerCase']()==='in'||_0x283eae[_0x7a2e('0x13')][_0x7a2e('0x14')]()===_0x7a2e('0x15')&&!_0x283eae[_0x7a2e('0x16')]&&!_[_0x7a2e('0x17')](_0x283eae[_0x7a2e('0x18')])){_0x2c9454['ChatInteraction'][_0x7a2e('0x19')]({'where':{'id':_0x283eae['ChatInteractionId']}})[_0x7a2e('0x1a')](function(_0xf28220){if(_0xf28220){_0xf28220[_0x7a2e('0x1b')]({'lastMsgAt':_0x283eae[_0x7a2e('0x1c')],'lastMsgDirection':_0x283eae[_0x7a2e('0x13')][_0x7a2e('0x14')]()});}})[_0x7a2e('0x1d')](function(_0x5f53ea){console[_0x7a2e('0x1e')](_0x5f53ea);});}_0x2643bb();}},'charset':_0x7a2e('0x1f'),'collate':_0x7a2e('0x20')});};
\ No newline at end of file
+var _0xec96=['out','secret','UserId','ChatInteraction','ChatInteractionId','then','update','createdAt','catch','error','utf8mb4','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./chatMessage.attributes','define','ChatMessage','fti_chat_messages','body','FULLTEXT','models','get','direction','toLowerCase'];(function(_0x2a28be,_0xbc384d){var _0x547fa3=function(_0x1710ad){while(--_0x1710ad){_0x2a28be['push'](_0x2a28be['shift']());}};_0x547fa3(++_0xbc384d);}(_0xec96,0x119));var _0x6ec9=function(_0x53fd80,_0x72b68f){_0x53fd80=_0x53fd80-0x0;var _0xb45d81=_0xec96[_0x53fd80];return _0xb45d81;};'use strict';var _=require(_0x6ec9('0x0'));var util=require(_0x6ec9('0x1'));var logger=require(_0x6ec9('0x2'))(_0x6ec9('0x3'));var moment=require(_0x6ec9('0x4'));var BPromise=require(_0x6ec9('0x5'));var rp=require(_0x6ec9('0x6'));var fs=require('fs');var path=require(_0x6ec9('0x7'));var rimraf=require('rimraf');var config=require(_0x6ec9('0x8'));var attributes=require(_0x6ec9('0x9'));module['exports']=function(_0x2a37b6,_0x3ccc23){return _0x2a37b6[_0x6ec9('0xa')](_0x6ec9('0xb'),attributes,{'tableName':'chat_messages','paranoid':![],'indexes':[{'name':_0x6ec9('0xc'),'fields':[_0x6ec9('0xd')],'type':_0x6ec9('0xe')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x153d1e,_0x17e5c8,_0x534a95){var _0x583926=_0x2a37b6[_0x6ec9('0xf')];var _0x51af42=_0x153d1e[_0x6ec9('0x10')]({'plain':!![]});if(_0x51af42[_0x6ec9('0x11')]['toLowerCase']()==='in'||_0x51af42[_0x6ec9('0x11')][_0x6ec9('0x12')]()===_0x6ec9('0x13')&&!_0x51af42[_0x6ec9('0x14')]&&!_['isNil'](_0x51af42[_0x6ec9('0x15')])){_0x583926[_0x6ec9('0x16')]['findOne']({'where':{'id':_0x51af42[_0x6ec9('0x17')]}})[_0x6ec9('0x18')](function(_0x1acef4){if(_0x1acef4){_0x1acef4[_0x6ec9('0x19')]({'lastMsgAt':_0x51af42[_0x6ec9('0x1a')],'lastMsgDirection':_0x51af42[_0x6ec9('0x11')][_0x6ec9('0x12')]()});}})[_0x6ec9('0x1b')](function(_0x29120c){console[_0x6ec9('0x1c')](_0x29120c);});}_0x534a95();}},'charset':_0x6ec9('0x1d'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.rpc.js b/server/api/chatMessage/chatMessage.rpc.js
index 300e179..7a5b250 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 _0x31a2=['error','code','message','catch','CreateChatMessage','ChatMessage','body','options','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','defaults','redis','localhost','socket.io-emitter','./chatMessage.socket','register','request','then','info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug','stringify'];(function(_0x42868d,_0x165917){var _0xd29bb1=function(_0x252969){while(--_0x252969){_0x42868d['push'](_0x42868d['shift']());}};_0xd29bb1(++_0x165917);}(_0x31a2,0x116));var _0x231a=function(_0x4b1875,_0x1fae56){_0x4b1875=_0x4b1875-0x0;var _0x2c688b=_0x31a2[_0x4b1875];return _0x2c688b;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0x231a('0x0'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x231a('0x1'));var db=require(_0x231a('0x2'))['db'];var utils=require(_0x231a('0x3'));var logger=require(_0x231a('0x4'))(_0x231a('0x5'));var config=require(_0x231a('0x6'));var jayson=require(_0x231a('0x7'));var client=jayson['client'][_0x231a('0x8')]({'port':0x232a});config['redis']=_[_0x231a('0x9')](config[_0x231a('0xa')],{'host':_0x231a('0xb'),'port':0x18eb});var socket=require(_0x231a('0xc'))(new Redis(config[_0x231a('0xa')]));require(_0x231a('0xd'))[_0x231a('0xe')](socket);function respondWithRpcPromise(_0x2e754f,_0x16270b,_0x7f339){return new BPromise(function(_0xfb72e3,_0x4915ec){return client[_0x231a('0xf')](_0x2e754f,_0x7f339)[_0x231a('0x10')](function(_0x1e2bb7){logger[_0x231a('0x11')](_0x231a('0x12'),_0x16270b,_0x231a('0x13'));logger[_0x231a('0x14')]('ChatMessage,\x20%s,\x20%s,\x20%s',_0x16270b,_0x231a('0x13'),JSON[_0x231a('0x15')](_0x1e2bb7));if(_0x1e2bb7['error']){if(_0x1e2bb7[_0x231a('0x16')][_0x231a('0x17')]===0x1f4){logger[_0x231a('0x16')]('ChatMessage,\x20%s,\x20%s',_0x16270b,_0x1e2bb7['error']['message']);return _0x4915ec(_0x1e2bb7[_0x231a('0x16')][_0x231a('0x18')]);}logger[_0x231a('0x16')](_0x231a('0x12'),_0x16270b,_0x1e2bb7[_0x231a('0x16')][_0x231a('0x18')]);return _0xfb72e3(_0x1e2bb7[_0x231a('0x16')]['message']);}else{logger[_0x231a('0x11')]('ChatMessage,\x20%s,\x20%s',_0x16270b,_0x231a('0x13'));_0xfb72e3(_0x1e2bb7['result'][_0x231a('0x18')]);}})[_0x231a('0x19')](function(_0xe7eade){logger[_0x231a('0x16')](_0x231a('0x12'),_0x16270b,_0xe7eade);_0x4915ec(_0xe7eade);});});}exports[_0x231a('0x1a')]=function(_0x99c3c0){var _0x55529a=this;return new Promise(function(_0x2a4dcb,_0x84cde9){return db[_0x231a('0x1b')]['create'](_0x99c3c0[_0x231a('0x1c')],{'raw':_0x99c3c0['options']?_0x99c3c0[_0x231a('0x1d')]['raw']===undefined?!![]:![]:!![]})[_0x231a('0x10')](function(_0x485359){logger[_0x231a('0x11')](_0x231a('0x1a'),_0x99c3c0);logger[_0x231a('0x14')](_0x231a('0x1a'),_0x99c3c0,JSON[_0x231a('0x15')](_0x485359));_0x2a4dcb(_0x485359);})['catch'](function(_0x5bba16){logger[_0x231a('0x16')](_0x231a('0x1a'),_0x5bba16[_0x231a('0x18')],_0x99c3c0);_0x84cde9(_0x55529a[_0x231a('0x16')](0x1f4,_0x5bba16[_0x231a('0x18')]));});});};
\ No newline at end of file
+var _0xa5e1=['request\x20sent','debug','ChatMessage,\x20%s,\x20%s,\x20%s','error','ChatMessage,\x20%s,\x20%s','message','result','catch','ChatMessage','create','body','options','raw','CreateChatMessage','stringify','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','./chatMessage.socket','then','info'];(function(_0x442c92,_0x2d7ce5){var _0x62d31=function(_0x10d28c){while(--_0x10d28c){_0x442c92['push'](_0x442c92['shift']());}};_0x62d31(++_0x2d7ce5);}(_0xa5e1,0x1dd));var _0x1a5e=function(_0x1e62b8,_0x5eed4c){_0x1e62b8=_0x1e62b8-0x0;var _0x2ab271=_0xa5e1[_0x1e62b8];return _0x2ab271;};'use strict';var _=require('lodash');var util=require(_0x1a5e('0x0'));var moment=require(_0x1a5e('0x1'));var BPromise=require(_0x1a5e('0x2'));var rs=require(_0x1a5e('0x3'));var fs=require('fs');var Redis=require(_0x1a5e('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x1a5e('0x5'));var logger=require(_0x1a5e('0x6'))(_0x1a5e('0x7'));var config=require(_0x1a5e('0x8'));var jayson=require(_0x1a5e('0x9'));var client=jayson[_0x1a5e('0xa')][_0x1a5e('0xb')]({'port':0x232a});config[_0x1a5e('0xc')]=_[_0x1a5e('0xd')](config[_0x1a5e('0xc')],{'host':_0x1a5e('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x1a5e('0xc')]));require(_0x1a5e('0xf'))['register'](socket);function respondWithRpcPromise(_0x38dbc6,_0x67ced5,_0x3f098b){return new BPromise(function(_0x40c9fd,_0x4385da){return client['request'](_0x38dbc6,_0x3f098b)[_0x1a5e('0x10')](function(_0x37a49d){logger[_0x1a5e('0x11')]('ChatMessage,\x20%s,\x20%s',_0x67ced5,_0x1a5e('0x12'));logger[_0x1a5e('0x13')](_0x1a5e('0x14'),_0x67ced5,'request\x20sent',JSON['stringify'](_0x37a49d));if(_0x37a49d[_0x1a5e('0x15')]){if(_0x37a49d[_0x1a5e('0x15')]['code']===0x1f4){logger[_0x1a5e('0x15')](_0x1a5e('0x16'),_0x67ced5,_0x37a49d[_0x1a5e('0x15')][_0x1a5e('0x17')]);return _0x4385da(_0x37a49d[_0x1a5e('0x15')][_0x1a5e('0x17')]);}logger['error'](_0x1a5e('0x16'),_0x67ced5,_0x37a49d['error'][_0x1a5e('0x17')]);return _0x40c9fd(_0x37a49d['error'][_0x1a5e('0x17')]);}else{logger[_0x1a5e('0x11')](_0x1a5e('0x16'),_0x67ced5,_0x1a5e('0x12'));_0x40c9fd(_0x37a49d[_0x1a5e('0x18')][_0x1a5e('0x17')]);}})[_0x1a5e('0x19')](function(_0x71ccc7){logger[_0x1a5e('0x15')](_0x1a5e('0x16'),_0x67ced5,_0x71ccc7);_0x4385da(_0x71ccc7);});});}exports['CreateChatMessage']=function(_0x4ff6b7){var _0x1b74a9=this;return new Promise(function(_0x8abec8,_0x28181c){return db[_0x1a5e('0x1a')][_0x1a5e('0x1b')](_0x4ff6b7[_0x1a5e('0x1c')],{'raw':_0x4ff6b7[_0x1a5e('0x1d')]?_0x4ff6b7[_0x1a5e('0x1d')][_0x1a5e('0x1e')]===undefined?!![]:![]:!![]})['then'](function(_0x14291f){logger[_0x1a5e('0x11')]('CreateChatMessage',_0x4ff6b7);logger[_0x1a5e('0x13')](_0x1a5e('0x1f'),_0x4ff6b7,JSON[_0x1a5e('0x20')](_0x14291f));_0x8abec8(_0x14291f);})['catch'](function(_0x575be8){logger[_0x1a5e('0x15')]('CreateChatMessage',_0x575be8[_0x1a5e('0x17')],_0x4ff6b7);_0x28181c(_0x1b74a9[_0x1a5e('0x15')](0x1f4,_0x575be8[_0x1a5e('0x17')]));});});};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.socket.js b/server/api/chatMessage/chatMessage.socket.js
index 7839992..d85f461 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 _0x78d3=['removeListener','register','chatMessage:','./chatMessage.events','save','remove','update','emit'];(function(_0x16f869,_0x309f33){var _0x24906a=function(_0x49c2b3){while(--_0x49c2b3){_0x16f869['push'](_0x16f869['shift']());}};_0x24906a(++_0x309f33);}(_0x78d3,0x73));var _0x378d=function(_0x428e71,_0x192e72){_0x428e71=_0x428e71-0x0;var _0xa8fa25=_0x78d3[_0x428e71];return _0xa8fa25;};'use strict';var ChatMessageEvents=require(_0x378d('0x0'));var events=[_0x378d('0x1'),_0x378d('0x2'),_0x378d('0x3')];function createListener(_0x40323e,_0x1d87b8){return function(_0x367f93){_0x1d87b8[_0x378d('0x4')](_0x40323e,_0x367f93);};}function removeListener(_0x52f934,_0x32a62f){return function(){ChatMessageEvents[_0x378d('0x5')](_0x52f934,_0x32a62f);};}exports[_0x378d('0x6')]=function(_0xc18c0b){for(var _0x59117c=0x0,_0x47a99f=events['length'];_0x59117c<_0x47a99f;_0x59117c++){var _0x1c880e=events[_0x59117c];var _0x4b3ef5=createListener(_0x378d('0x7')+_0x1c880e,_0xc18c0b);ChatMessageEvents['on'](_0x1c880e,_0x4b3ef5);}};
\ No newline at end of file
+var _0x04de=['save','remove','update','emit','removeListener','length','chatMessage:','./chatMessage.events'];(function(_0x23e7c1,_0x35110c){var _0x1add43=function(_0x238918){while(--_0x238918){_0x23e7c1['push'](_0x23e7c1['shift']());}};_0x1add43(++_0x35110c);}(_0x04de,0x107));var _0xe04d=function(_0x247f3b,_0x37f587){_0x247f3b=_0x247f3b-0x0;var _0x490430=_0x04de[_0x247f3b];return _0x490430;};'use strict';var ChatMessageEvents=require(_0xe04d('0x0'));var events=[_0xe04d('0x1'),_0xe04d('0x2'),_0xe04d('0x3')];function createListener(_0x1e650d,_0x28f63f){return function(_0x1113af){_0x28f63f[_0xe04d('0x4')](_0x1e650d,_0x1113af);};}function removeListener(_0x2593a4,_0x70ead0){return function(){ChatMessageEvents[_0xe04d('0x5')](_0x2593a4,_0x70ead0);};}exports['register']=function(_0x4bb925){for(var _0x4f7637=0x0,_0x531688=events[_0xe04d('0x6')];_0x4f7637<_0x531688;_0x4f7637++){var _0x210e93=events[_0x4f7637];var _0x72b1ce=createListener(_0xe04d('0x7')+_0x210e93,_0x4bb925);ChatMessageEvents['on'](_0x210e93,_0x72b1ce);}};
\ No newline at end of file
diff --git a/server/api/chatMessage/index.js b/server/api/chatMessage/index.js
index 676d400..c31113b 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 _0xe6ee=['connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./chatMessage.controller','index','isAuthenticated','describe','get','show','post','tracked','chatmessage:create','create','put','/:id','update','/:id/accept','/:id/reject','reject','destroy','exports','multer','util','path'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0xe6ee,0x99));var _0xee6e=function(_0x36a346,_0x230a63){_0x36a346=_0x36a346-0x0;var _0x6109cf=_0xe6ee[_0x36a346];return _0x6109cf;};'use strict';var multer=require(_0xee6e('0x0'));var util=require(_0xee6e('0x1'));var path=require(_0xee6e('0x2'));var timeout=require(_0xee6e('0x3'));var express=require(_0xee6e('0x4'));var router=express['Router']();var fs_extra=require(_0xee6e('0x5'));var auth=require(_0xee6e('0x6'));var interaction=require(_0xee6e('0x7'));var config=require('../../config/environment');var controller=require(_0xee6e('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0xee6e('0x9')]);router['get']('/describe',auth[_0xee6e('0xa')](),controller[_0xee6e('0xb')]);router[_0xee6e('0xc')]('/:id',auth[_0xee6e('0xa')](),controller[_0xee6e('0xd')]);router[_0xee6e('0xe')]('/',auth[_0xee6e('0xa')](),interaction[_0xee6e('0xf')]('chat',_0xee6e('0x10')),controller[_0xee6e('0x11')]);router[_0xee6e('0x12')](_0xee6e('0x13'),controller[_0xee6e('0x14')]);router[_0xee6e('0x12')](_0xee6e('0x15'),auth[_0xee6e('0xa')](),controller['accept']);router[_0xee6e('0x12')](_0xee6e('0x16'),auth[_0xee6e('0xa')](),controller[_0xee6e('0x17')]);router['delete']('/:id',auth[_0xee6e('0xa')](),controller[_0xee6e('0x18')]);module[_0xee6e('0x19')]=router;
\ No newline at end of file
+var _0x8e2b=['put','update','/:id/accept','/:id/reject','reject','delete','exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','describe','/:id','show','post','tracked','chatmessage:create','create'];(function(_0x523870,_0x40e1c0){var _0x3beae0=function(_0x4b12c5){while(--_0x4b12c5){_0x523870['push'](_0x523870['shift']());}};_0x3beae0(++_0x40e1c0);}(_0x8e2b,0x13f));var _0xb8e2=function(_0x556ae1,_0x3455e0){_0x556ae1=_0x556ae1-0x0;var _0x14ff19=_0x8e2b[_0x556ae1];return _0x14ff19;};'use strict';var multer=require(_0xb8e2('0x0'));var util=require(_0xb8e2('0x1'));var path=require(_0xb8e2('0x2'));var timeout=require(_0xb8e2('0x3'));var express=require(_0xb8e2('0x4'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xb8e2('0x5'));var interaction=require(_0xb8e2('0x6'));var config=require(_0xb8e2('0x7'));var controller=require('./chatMessage.controller');router[_0xb8e2('0x8')]('/',auth[_0xb8e2('0x9')](),controller[_0xb8e2('0xa')]);router[_0xb8e2('0x8')](_0xb8e2('0xb'),auth[_0xb8e2('0x9')](),controller[_0xb8e2('0xc')]);router[_0xb8e2('0x8')](_0xb8e2('0xd'),auth[_0xb8e2('0x9')](),controller[_0xb8e2('0xe')]);router[_0xb8e2('0xf')]('/',auth[_0xb8e2('0x9')](),interaction[_0xb8e2('0x10')]('chat',_0xb8e2('0x11')),controller[_0xb8e2('0x12')]);router[_0xb8e2('0x13')]('/:id',controller[_0xb8e2('0x14')]);router[_0xb8e2('0x13')](_0xb8e2('0x15'),auth['isAuthenticated'](),controller['accept']);router[_0xb8e2('0x13')](_0xb8e2('0x16'),auth[_0xb8e2('0x9')](),controller[_0xb8e2('0x17')]);router[_0xb8e2('0x18')](_0xb8e2('0xd'),auth[_0xb8e2('0x9')](),controller['destroy']);module[_0xb8e2('0x19')]=router;
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js b/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js
index deca1a8..5990ff0 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 _0xdb28=['TEXT','medium','sequelize','exports'];(function(_0x44cdf9,_0x2fd3c3){var _0x3a2633=function(_0x338d5c){while(--_0x338d5c){_0x44cdf9['push'](_0x44cdf9['shift']());}};_0x3a2633(++_0x2fd3c3);}(_0xdb28,0x106));var _0x8db2=function(_0x3953f8,_0x40657d){_0x3953f8=_0x3953f8-0x0;var _0x3858e6=_0xdb28[_0x3953f8];return _0x3858e6;};'use strict';var Sequelize=require(_0x8db2('0x0'));module[_0x8db2('0x1')]={'body':{'type':Sequelize[_0x8db2('0x2')](_0x8db2('0x3')),'allowNull':![]},'plainBody':{'type':Sequelize['TEXT'](_0x8db2('0x3')),'allowNull':![]}};
\ No newline at end of file
+var _0xb10b=['medium','sequelize','TEXT'];(function(_0x4d2776,_0x3b6dbf){var _0x345398=function(_0x5c7d82){while(--_0x5c7d82){_0x4d2776['push'](_0x4d2776['shift']());}};_0x345398(++_0x3b6dbf);}(_0xb10b,0x12a));var _0xbb10=function(_0x1c5f32,_0x1ac260){_0x1c5f32=_0x1c5f32-0x0;var _0x3bd1e8=_0xb10b[_0x1c5f32];return _0x3bd1e8;};'use strict';var Sequelize=require(_0xbb10('0x0'));module['exports']={'body':{'type':Sequelize[_0xbb10('0x1')](_0xbb10('0x2')),'allowNull':![]},'plainBody':{'type':Sequelize[_0xbb10('0x1')]('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 bd80773..ceaed07 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(_0x12d033,_0x25fa2f){var _0x3b4e80=function(_0x46c1f4){while(--_0x46c1f4){_0x12d033['push'](_0x12d033['shift']());}};_0x3b4e80(++_0x25fa2f);}(_0x7a54,0x106));var _0x47a5=function(_0x24d917,_0x1cb597){_0x24d917=_0x24d917-0x0;var _0x20e3f4=_0x7a54[_0x24d917];return _0x20e3f4;};'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(_0x1918c0,_0x244dda){var _0x378462=function(_0x103e1b){while(--_0x103e1b){_0x1918c0['push'](_0x1918c0['shift']());}};_0x378462(++_0x244dda);}(_0x9957,0x93));var _0x7995=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x9957[_0x3b380d];return _0x54502b;};'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 a6831a0..b7417e6 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 _0x7c1a=['update','emit','hasOwnProperty','hook','exports','events','../../mysqldb','ChatOfflineMessage','setMaxListeners','save'];(function(_0x1d25df,_0x5ce190){var _0x3138f9=function(_0x227e34){while(--_0x227e34){_0x1d25df['push'](_0x1d25df['shift']());}};_0x3138f9(++_0x5ce190);}(_0x7c1a,0x159));var _0xa7c1=function(_0x238b61,_0xb94d00){_0x238b61=_0x238b61-0x0;var _0x519752=_0x7c1a[_0x238b61];return _0x519752;};'use strict';var EventEmitter=require(_0xa7c1('0x0'));var ChatOfflineMessage=require(_0xa7c1('0x1'))['db'][_0xa7c1('0x2')];var ChatOfflineMessageEvents=new EventEmitter();ChatOfflineMessageEvents[_0xa7c1('0x3')](0x0);var events={'afterCreate':_0xa7c1('0x4'),'afterUpdate':_0xa7c1('0x5'),'afterDestroy':'remove'};function emitEvent(_0xd434f){return function(_0x132b08,_0x506858,_0x135ae7){ChatOfflineMessageEvents['emit'](_0xd434f+':'+_0x132b08['id'],_0x132b08);ChatOfflineMessageEvents[_0xa7c1('0x6')](_0xd434f,_0x132b08);_0x135ae7(null);};}for(var e in events){if(events[_0xa7c1('0x7')](e)){var event=events[e];ChatOfflineMessage[_0xa7c1('0x8')](e,emitEvent(event));}}module[_0xa7c1('0x9')]=ChatOfflineMessageEvents;
\ No newline at end of file
+var _0x799b=['events','setMaxListeners','update','remove','emit','hook','exports'];(function(_0x1b5aea,_0x3f04b7){var _0x15cfc6=function(_0x204e92){while(--_0x204e92){_0x1b5aea['push'](_0x1b5aea['shift']());}};_0x15cfc6(++_0x3f04b7);}(_0x799b,0x8c));var _0xb799=function(_0x102213,_0x43c7ae){_0x102213=_0x102213-0x0;var _0x51e60a=_0x799b[_0x102213];return _0x51e60a;};'use strict';var EventEmitter=require(_0xb799('0x0'));var ChatOfflineMessage=require('../../mysqldb')['db']['ChatOfflineMessage'];var ChatOfflineMessageEvents=new EventEmitter();ChatOfflineMessageEvents[_0xb799('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0xb799('0x2'),'afterDestroy':_0xb799('0x3')};function emitEvent(_0x1808db){return function(_0x1dda29,_0x4fdc5b,_0x1c67fd){ChatOfflineMessageEvents['emit'](_0x1808db+':'+_0x1dda29['id'],_0x1dda29);ChatOfflineMessageEvents[_0xb799('0x4')](_0x1808db,_0x1dda29);_0x1c67fd(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatOfflineMessage[_0xb799('0x5')](e,emitEvent(event));}}module[_0xb799('0x6')]=ChatOfflineMessageEvents;
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.model.js b/server/api/chatOfflineMessage/chatOfflineMessage.model.js
index dabd444..fa26b39 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 _0xba7b=['utf8mb4_unicode_ci','./chatOfflineMessage.attributes','exports','define','ChatOfflineMessage','utf8mb4'];(function(_0x922971,_0xf97ffa){var _0x22bdd7=function(_0x4a44f7){while(--_0x4a44f7){_0x922971['push'](_0x922971['shift']());}};_0x22bdd7(++_0xf97ffa);}(_0xba7b,0x103));var _0xbba7=function(_0x24864a,_0x16c627){_0x24864a=_0x24864a-0x0;var _0x3f61be=_0xba7b[_0x24864a];return _0x3f61be;};'use strict';var attributes=require(_0xbba7('0x0'));module[_0xbba7('0x1')]=function(_0x1d298c){return _0x1d298c[_0xbba7('0x2')](_0xbba7('0x3'),attributes,{'tableName':'chat_offline_messages','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xbba7('0x4'),'collate':_0xbba7('0x5')});};
\ No newline at end of file
+var _0xcd1f=['utf8mb4','utf8mb4_unicode_ci','./chatOfflineMessage.attributes','exports','ChatOfflineMessage','chat_offline_messages'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xcd1f,0x134));var _0xfcd1=function(_0x203c92,_0xccc23e){_0x203c92=_0x203c92-0x0;var _0x9f567a=_0xcd1f[_0x203c92];return _0x9f567a;};'use strict';var attributes=require(_0xfcd1('0x0'));module[_0xfcd1('0x1')]=function(_0x56e859){return _0x56e859['define'](_0xfcd1('0x2'),attributes,{'tableName':_0xfcd1('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xfcd1('0x4'),'collate':_0xfcd1('0x5')});};
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js b/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js
index 8a47c62..4b2a727 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 _0xdc8c=['stringify','error','code','ChatOfflineMessage,\x20%s,\x20%s','message','result','catch','lodash','util','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','request','then','info','request\x20sent','debug'];(function(_0x2335bb,_0x4145eb){var _0x217c2b=function(_0x29578){while(--_0x29578){_0x2335bb['push'](_0x2335bb['shift']());}};_0x217c2b(++_0x4145eb);}(_0xdc8c,0xd9));var _0xcdc8=function(_0x18870a,_0x295a40){_0x18870a=_0x18870a-0x0;var _0x4ca1c1=_0xdc8c[_0x18870a];return _0x4ca1c1;};'use strict';var _=require(_0xcdc8('0x0'));var util=require(_0xcdc8('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xcdc8('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xcdc8('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xcdc8('0x4'))(_0xcdc8('0x5'));var config=require(_0xcdc8('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xcdc8('0x7')][_0xcdc8('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2feede,_0x2e7bd0,_0x1f6292){return new BPromise(function(_0x1830d2,_0x4394dc){return client[_0xcdc8('0x9')](_0x2feede,_0x1f6292)[_0xcdc8('0xa')](function(_0x15748e){logger[_0xcdc8('0xb')]('ChatOfflineMessage,\x20%s,\x20%s',_0x2e7bd0,_0xcdc8('0xc'));logger[_0xcdc8('0xd')]('ChatOfflineMessage,\x20%s,\x20%s,\x20%s',_0x2e7bd0,_0xcdc8('0xc'),JSON[_0xcdc8('0xe')](_0x15748e));if(_0x15748e[_0xcdc8('0xf')]){if(_0x15748e[_0xcdc8('0xf')][_0xcdc8('0x10')]===0x1f4){logger[_0xcdc8('0xf')](_0xcdc8('0x11'),_0x2e7bd0,_0x15748e[_0xcdc8('0xf')][_0xcdc8('0x12')]);return _0x4394dc(_0x15748e[_0xcdc8('0xf')][_0xcdc8('0x12')]);}logger[_0xcdc8('0xf')](_0xcdc8('0x11'),_0x2e7bd0,_0x15748e[_0xcdc8('0xf')]['message']);return _0x1830d2(_0x15748e[_0xcdc8('0xf')][_0xcdc8('0x12')]);}else{logger[_0xcdc8('0xb')](_0xcdc8('0x11'),_0x2e7bd0,_0xcdc8('0xc'));_0x1830d2(_0x15748e[_0xcdc8('0x13')][_0xcdc8('0x12')]);}})[_0xcdc8('0x14')](function(_0x7f0157){logger[_0xcdc8('0xf')]('ChatOfflineMessage,\x20%s,\x20%s',_0x2e7bd0,_0x7f0157);_0x4394dc(_0x7f0157);});});}
\ No newline at end of file
+var _0x744b=['then','info','ChatOfflineMessage,\x20%s,\x20%s','request\x20sent','debug','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request'];(function(_0x618414,_0x1a7a60){var _0x21c19a=function(_0x507b17){while(--_0x507b17){_0x618414['push'](_0x618414['shift']());}};_0x21c19a(++_0x1a7a60);}(_0x744b,0xed));var _0xb744=function(_0x47039a,_0x61a331){_0x47039a=_0x47039a-0x0;var _0x3a1a48=_0x744b[_0x47039a];return _0x3a1a48;};'use strict';var _=require(_0xb744('0x0'));var util=require(_0xb744('0x1'));var moment=require(_0xb744('0x2'));var BPromise=require(_0xb744('0x3'));var rs=require(_0xb744('0x4'));var fs=require('fs');var Redis=require(_0xb744('0x5'));var db=require(_0xb744('0x6'))['db'];var utils=require(_0xb744('0x7'));var logger=require(_0xb744('0x8'))(_0xb744('0x9'));var config=require(_0xb744('0xa'));var jayson=require('jayson/promise');var client=jayson['client'][_0xb744('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x59ac18,_0x3f993c,_0x55533a){return new BPromise(function(_0x57abd3,_0x26c604){return client[_0xb744('0xc')](_0x59ac18,_0x55533a)[_0xb744('0xd')](function(_0x3d5e4f){logger[_0xb744('0xe')](_0xb744('0xf'),_0x3f993c,_0xb744('0x10'));logger[_0xb744('0x11')](_0xb744('0x12'),_0x3f993c,_0xb744('0x10'),JSON[_0xb744('0x13')](_0x3d5e4f));if(_0x3d5e4f[_0xb744('0x14')]){if(_0x3d5e4f[_0xb744('0x14')][_0xb744('0x15')]===0x1f4){logger[_0xb744('0x14')]('ChatOfflineMessage,\x20%s,\x20%s',_0x3f993c,_0x3d5e4f[_0xb744('0x14')]['message']);return _0x26c604(_0x3d5e4f[_0xb744('0x14')][_0xb744('0x16')]);}logger[_0xb744('0x14')](_0xb744('0xf'),_0x3f993c,_0x3d5e4f[_0xb744('0x14')][_0xb744('0x16')]);return _0x57abd3(_0x3d5e4f[_0xb744('0x14')][_0xb744('0x16')]);}else{logger[_0xb744('0xe')]('ChatOfflineMessage,\x20%s,\x20%s',_0x3f993c,_0xb744('0x10'));_0x57abd3(_0x3d5e4f[_0xb744('0x17')][_0xb744('0x16')]);}})[_0xb744('0x18')](function(_0x387e7e){logger['error']('ChatOfflineMessage,\x20%s,\x20%s',_0x3f993c,_0x387e7e);_0x26c604(_0x387e7e);});});}
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/index.js b/server/api/chatOfflineMessage/index.js
index c141127..9c922e4 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 _0x7a32=['post','create','update','delete','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatOfflineMessage.controller','get','isAuthenticated','index','describe','show'];(function(_0x5d0607,_0x50c068){var _0x4f955b=function(_0x4e9b95){while(--_0x4e9b95){_0x5d0607['push'](_0x5d0607['shift']());}};_0x4f955b(++_0x50c068);}(_0x7a32,0xf5));var _0x27a3=function(_0x217889,_0x451611){_0x217889=_0x217889-0x0;var _0x34550e=_0x7a32[_0x217889];return _0x34550e;};'use strict';var multer=require(_0x27a3('0x0'));var util=require(_0x27a3('0x1'));var path=require(_0x27a3('0x2'));var timeout=require(_0x27a3('0x3'));var express=require('express');var router=express[_0x27a3('0x4')]();var fs_extra=require(_0x27a3('0x5'));var auth=require(_0x27a3('0x6'));var interaction=require(_0x27a3('0x7'));var config=require(_0x27a3('0x8'));var controller=require(_0x27a3('0x9'));router[_0x27a3('0xa')]('/',auth[_0x27a3('0xb')](),controller[_0x27a3('0xc')]);router['get']('/describe',auth[_0x27a3('0xb')](),controller[_0x27a3('0xd')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x27a3('0xe')]);router[_0x27a3('0xf')]('/',auth['isAuthenticated'](),controller[_0x27a3('0x10')]);router['put']('/:id',auth[_0x27a3('0xb')](),controller[_0x27a3('0x11')]);router[_0x27a3('0x12')]('/:id',auth[_0x27a3('0xb')](),controller['destroy']);module[_0x27a3('0x13')]=router;
\ No newline at end of file
+var _0xa54e=['isAuthenticated','/:id','post','put','delete','destroy','exports','util','path','express','../../components/interaction/service','./chatOfflineMessage.controller','get','index','/describe'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0xa54e,0x1ab));var _0xea54=function(_0x580cf8,_0x26751e){_0x580cf8=_0x580cf8-0x0;var _0xcc9a9e=_0xa54e[_0x580cf8];return _0xcc9a9e;};'use strict';var multer=require('multer');var util=require(_0xea54('0x0'));var path=require(_0xea54('0x1'));var timeout=require('connect-timeout');var express=require(_0xea54('0x2'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xea54('0x3'));var config=require('../../config/environment');var controller=require(_0xea54('0x4'));router[_0xea54('0x5')]('/',auth['isAuthenticated'](),controller[_0xea54('0x6')]);router[_0xea54('0x5')](_0xea54('0x7'),auth[_0xea54('0x8')](),controller['describe']);router[_0xea54('0x5')](_0xea54('0x9'),auth[_0xea54('0x8')](),controller['show']);router[_0xea54('0xa')]('/',auth[_0xea54('0x8')](),controller['create']);router[_0xea54('0xb')](_0xea54('0x9'),auth[_0xea54('0x8')](),controller['update']);router[_0xea54('0xc')](_0xea54('0x9'),auth[_0xea54('0x8')](),controller[_0xea54('0xd')]);module[_0xea54('0xe')]=router;
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.attributes.js b/server/api/chatProactiveAction/chatProactiveAction.attributes.js
index 666befa..7627366 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 _0x5e96=['STRING','ENUM','timeout','mouseOver'];(function(_0x1e4360,_0x930b9b){var _0x31e6b4=function(_0x49dd8e){while(--_0x49dd8e){_0x1e4360['push'](_0x1e4360['shift']());}};_0x31e6b4(++_0x930b9b);}(_0x5e96,0x1dd));var _0x65e9=function(_0x223bc9,_0x23332e){_0x223bc9=_0x223bc9-0x0;var _0xcd700b=_0x5e96[_0x223bc9];return _0xcd700b;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0x65e9('0x0')]('mouseOver',_0x65e9('0x1')),'defaultValue':_0x65e9('0x2')},'selector':{'type':Sequelize[_0x65e9('0x3')]},'timeout':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
+var _0x0dbb=['STRING','timeout','mouseOver','INTEGER','sequelize','exports'];(function(_0x40a4b5,_0x4d2d02){var _0x476c41=function(_0x220631){while(--_0x220631){_0x40a4b5['push'](_0x40a4b5['shift']());}};_0x476c41(++_0x4d2d02);}(_0x0dbb,0xca));var _0xb0db=function(_0x21dc2c,_0x12e4b6){_0x21dc2c=_0x21dc2c-0x0;var _0x25b9d4=_0x0dbb[_0x21dc2c];return _0x25b9d4;};'use strict';var Sequelize=require(_0xb0db('0x0'));module[_0xb0db('0x1')]={'name':{'type':Sequelize[_0xb0db('0x2')],'allowNull':![]},'type':{'type':Sequelize['ENUM']('mouseOver',_0xb0db('0x3')),'defaultValue':_0xb0db('0x4')},'selector':{'type':Sequelize[_0xb0db('0x2')]},'timeout':{'type':Sequelize[_0xb0db('0x5')]}};
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.controller.js b/server/api/chatProactiveAction/chatProactiveAction.controller.js
index bf15468..ea861f8 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 _0x4f5d=['then','destroy','sendStatus','stack','name','show','params','model','keys','ChatProactiveAction','filters','intersection','query','fields','attributes','length','includeAll','include','merge','options','catch','create','body','find','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../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','count','Content-Range','apply','save','update'];(function(_0x418bb2,_0x1d8b9e){var _0x58bfd5=function(_0x4dc3c2){while(--_0x4dc3c2){_0x418bb2['push'](_0x418bb2['shift']());}};_0x58bfd5(++_0x1d8b9e);}(_0x4f5d,0x1d1));var _0xd4f5=function(_0x5d2803,_0xf375bd){_0x5d2803=_0x5d2803-0x0;var _0xdcad2c=_0x4f5d[_0x5d2803];return _0xdcad2c;};'use strict';var emlformat=require(_0xd4f5('0x0'));var rimraf=require(_0xd4f5('0x1'));var zipdir=require(_0xd4f5('0x2'));var jsonpatch=require(_0xd4f5('0x3'));var rp=require(_0xd4f5('0x4'));var moment=require(_0xd4f5('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xd4f5('0x6'));var util=require(_0xd4f5('0x7'));var path=require(_0xd4f5('0x8'));var sox=require(_0xd4f5('0x9'));var csv=require(_0xd4f5('0xa'));var ejs=require(_0xd4f5('0xb'));var fs=require('fs');var fs_extra=require(_0xd4f5('0xc'));var _=require(_0xd4f5('0xd'));var squel=require(_0xd4f5('0xe'));var crypto=require(_0xd4f5('0xf'));var jsforce=require(_0xd4f5('0x10'));var deskjs=require(_0xd4f5('0x11'));var toCsv=require(_0xd4f5('0xa'));var querystring=require('querystring');var Papa=require(_0xd4f5('0x12'));var Redis=require(_0xd4f5('0x13'));var authService=require('../../components/auth/service');var qs=require(_0xd4f5('0x14'));var as=require(_0xd4f5('0x15'));var hardwareService=require(_0xd4f5('0x16'));var logger=require(_0xd4f5('0x17'))(_0xd4f5('0x18'));var utils=require(_0xd4f5('0x19'));var config=require(_0xd4f5('0x1a'));var licenseUtil=require(_0xd4f5('0x1b'));var db=require(_0xd4f5('0x1c'))['db'];function respondWithStatusCode(_0x5d5554,_0x445072){_0x445072=_0x445072||0xcc;return function(_0x21b2a2){if(_0x21b2a2){return _0x5d5554['sendStatus'](_0x445072);}return _0x5d5554[_0xd4f5('0x1d')](_0x445072)[_0xd4f5('0x1e')]();};}function respondWithResult(_0x28e1cf,_0x511fcf){_0x511fcf=_0x511fcf||0xc8;return function(_0x166d4d){if(_0x166d4d){return _0x28e1cf[_0xd4f5('0x1d')](_0x511fcf)[_0xd4f5('0x1f')](_0x166d4d);}};}function respondWithFilteredResult(_0x1a158f,_0x33f6dc){return function(_0x32f4b7){if(_0x32f4b7){var _0x23780a=typeof _0x33f6dc[_0xd4f5('0x20')]==='undefined'&&typeof _0x33f6dc[_0xd4f5('0x21')]==='undefined';var _0x45d043=_0x32f4b7['count'];var _0x220707=_0x23780a?0x0:_0x33f6dc[_0xd4f5('0x20')];var _0x271f53=_0x23780a?_0x32f4b7[_0xd4f5('0x22')]:_0x33f6dc[_0xd4f5('0x20')]+_0x33f6dc[_0xd4f5('0x21')];var _0x8c7e05;if(_0x271f53>=_0x45d043){_0x271f53=_0x45d043;_0x8c7e05=0xc8;}else{_0x8c7e05=0xce;}_0x1a158f[_0xd4f5('0x1d')](_0x8c7e05);return _0x1a158f['set'](_0xd4f5('0x23'),_0x220707+'-'+_0x271f53+'/'+_0x45d043)[_0xd4f5('0x1f')](_0x32f4b7);}return null;};}function patchUpdates(_0x57a16b){return function(_0x1aae04){try{jsonpatch[_0xd4f5('0x24')](_0x1aae04,_0x57a16b,!![]);}catch(_0x47f101){return BPromise['reject'](_0x47f101);}return _0x1aae04[_0xd4f5('0x25')]();};}function saveUpdates(_0x161443,_0x3cbe7b){return function(_0x3ae7af){if(_0x3ae7af){return _0x3ae7af[_0xd4f5('0x26')](_0x161443)[_0xd4f5('0x27')](function(_0x378af6){return _0x378af6;});}return null;};}function removeEntity(_0x527dd4,_0x578071){return function(_0x5ccc63){if(_0x5ccc63){return _0x5ccc63[_0xd4f5('0x28')]()[_0xd4f5('0x27')](function(){_0x527dd4[_0xd4f5('0x1d')](0xcc)[_0xd4f5('0x1e')]();});}};}function handleEntityNotFound(_0x5f3a5d,_0xb7ea1){return function(_0x49ad32){if(!_0x49ad32){_0x5f3a5d[_0xd4f5('0x29')](0x194);}return _0x49ad32;};}function handleError(_0x2fbee8,_0x5b519e){_0x5b519e=_0x5b519e||0x1f4;return function(_0x5ba979){logger['error'](_0x5ba979[_0xd4f5('0x2a')]);if(_0x5ba979[_0xd4f5('0x2b')]){delete _0x5ba979['name'];}_0x2fbee8[_0xd4f5('0x1d')](_0x5b519e)['send'](_0x5ba979);};}exports[_0xd4f5('0x2c')]=function(_0xb5dd60,_0x2134f2){var _0x2130e4={'raw':!![],'where':{'id':_0xb5dd60[_0xd4f5('0x2d')]['id']}},_0x32d067={};_0x32d067[_0xd4f5('0x2e')]=_[_0xd4f5('0x2f')](db[_0xd4f5('0x30')]['rawAttributes']);_0x32d067['query']=_['keys'](_0xb5dd60['query']);_0x32d067[_0xd4f5('0x31')]=_[_0xd4f5('0x32')](_0x32d067[_0xd4f5('0x2e')],_0x32d067[_0xd4f5('0x33')]);_0x2130e4['attributes']=_[_0xd4f5('0x32')](_0x32d067[_0xd4f5('0x2e')],qs[_0xd4f5('0x34')](_0xb5dd60[_0xd4f5('0x33')][_0xd4f5('0x34')]));_0x2130e4[_0xd4f5('0x35')]=_0x2130e4[_0xd4f5('0x35')][_0xd4f5('0x36')]?_0x2130e4[_0xd4f5('0x35')]:_0x32d067['model'];if(_0xb5dd60['query'][_0xd4f5('0x37')]){_0x2130e4[_0xd4f5('0x38')]=[{'all':!![]}];}_0x2130e4=_[_0xd4f5('0x39')]({},_0x2130e4,_0xb5dd60[_0xd4f5('0x3a')]);return db[_0xd4f5('0x30')]['find'](_0x2130e4)[_0xd4f5('0x27')](handleEntityNotFound(_0x2134f2,null))[_0xd4f5('0x27')](respondWithResult(_0x2134f2,null))[_0xd4f5('0x3b')](handleError(_0x2134f2,null));};exports['create']=function(_0x23b0af,_0x31b9e6){return db[_0xd4f5('0x30')][_0xd4f5('0x3c')](_0x23b0af[_0xd4f5('0x3d')],{})[_0xd4f5('0x27')](respondWithResult(_0x31b9e6,0xc9))['catch'](handleError(_0x31b9e6,null));};exports['update']=function(_0x5555b8,_0x29f348){if(_0x5555b8[_0xd4f5('0x3d')]['id']){delete _0x5555b8['body']['id'];}return db[_0xd4f5('0x30')][_0xd4f5('0x3e')]({'where':{'id':_0x5555b8['params']['id']}})[_0xd4f5('0x27')](handleEntityNotFound(_0x29f348,null))[_0xd4f5('0x27')](saveUpdates(_0x5555b8['body'],null))['then'](respondWithResult(_0x29f348,null))[_0xd4f5('0x3b')](handleError(_0x29f348,null));};exports['destroy']=function(_0x172294,_0x3070bb){return db[_0xd4f5('0x30')][_0xd4f5('0x3e')]({'where':{'id':_0x172294[_0xd4f5('0x2d')]['id']}})[_0xd4f5('0x27')](handleEntityNotFound(_0x3070bb,null))[_0xd4f5('0x27')](removeEntity(_0x3070bb,null))[_0xd4f5('0x3b')](handleError(_0x3070bb,null));};
\ No newline at end of file
+var _0xe06f=['../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','save','update','then','error','name','show','params','keys','ChatProactiveAction','rawAttributes','query','intersection','model','attributes','fields','length','includeAll','include','options','catch','create','body','find','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','sox','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis'];(function(_0x1e4ff5,_0x3944ed){var _0xf644b7=function(_0x46e6ff){while(--_0x46e6ff){_0x1e4ff5['push'](_0x1e4ff5['shift']());}};_0xf644b7(++_0x3944ed);}(_0xe06f,0x65));var _0xfe06=function(_0x3dae63,_0x370747){_0x3dae63=_0x3dae63-0x0;var _0x54a6df=_0xe06f[_0x3dae63];return _0x54a6df;};'use strict';var emlformat=require(_0xfe06('0x0'));var rimraf=require(_0xfe06('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xfe06('0x2'));var rp=require('request-promise');var moment=require(_0xfe06('0x3'));var BPromise=require(_0xfe06('0x4'));var Mustache=require(_0xfe06('0x5'));var util=require(_0xfe06('0x6'));var path=require(_0xfe06('0x7'));var sox=require(_0xfe06('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xfe06('0x9'));var squel=require(_0xfe06('0xa'));var crypto=require(_0xfe06('0xb'));var jsforce=require(_0xfe06('0xc'));var deskjs=require(_0xfe06('0xd'));var toCsv=require(_0xfe06('0xe'));var querystring=require('querystring');var Papa=require(_0xfe06('0xf'));var Redis=require(_0xfe06('0x10'));var authService=require(_0xfe06('0x11'));var qs=require(_0xfe06('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xfe06('0x13'));var logger=require(_0xfe06('0x14'))(_0xfe06('0x15'));var utils=require(_0xfe06('0x16'));var config=require(_0xfe06('0x17'));var licenseUtil=require(_0xfe06('0x18'));var db=require(_0xfe06('0x19'))['db'];function respondWithStatusCode(_0x2b44be,_0x576efe){_0x576efe=_0x576efe||0xcc;return function(_0xbb32db){if(_0xbb32db){return _0x2b44be[_0xfe06('0x1a')](_0x576efe);}return _0x2b44be[_0xfe06('0x1b')](_0x576efe)[_0xfe06('0x1c')]();};}function respondWithResult(_0x5e0ff5,_0x5a91b5){_0x5a91b5=_0x5a91b5||0xc8;return function(_0x3e44dd){if(_0x3e44dd){return _0x5e0ff5['status'](_0x5a91b5)[_0xfe06('0x1d')](_0x3e44dd);}};}function respondWithFilteredResult(_0x3a41ab,_0x4dd976){return function(_0x54dd69){if(_0x54dd69){var _0x7b243f=typeof _0x4dd976[_0xfe06('0x1e')]===_0xfe06('0x1f')&&typeof _0x4dd976[_0xfe06('0x20')]===_0xfe06('0x1f');var _0x48dd0d=_0x54dd69[_0xfe06('0x21')];var _0x4f45b0=_0x7b243f?0x0:_0x4dd976[_0xfe06('0x1e')];var _0x346ed9=_0x7b243f?_0x54dd69[_0xfe06('0x21')]:_0x4dd976[_0xfe06('0x1e')]+_0x4dd976[_0xfe06('0x20')];var _0x548d73;if(_0x346ed9>=_0x48dd0d){_0x346ed9=_0x48dd0d;_0x548d73=0xc8;}else{_0x548d73=0xce;}_0x3a41ab['status'](_0x548d73);return _0x3a41ab['set'](_0xfe06('0x22'),_0x4f45b0+'-'+_0x346ed9+'/'+_0x48dd0d)[_0xfe06('0x1d')](_0x54dd69);}return null;};}function patchUpdates(_0x166a86){return function(_0x4775b5){try{jsonpatch[_0xfe06('0x23')](_0x4775b5,_0x166a86,!![]);}catch(_0x594ad8){return BPromise['reject'](_0x594ad8);}return _0x4775b5[_0xfe06('0x24')]();};}function saveUpdates(_0xc30ab5,_0x4dd52d){return function(_0x37974d){if(_0x37974d){return _0x37974d[_0xfe06('0x25')](_0xc30ab5)[_0xfe06('0x26')](function(_0x1de458){return _0x1de458;});}return null;};}function removeEntity(_0x288487,_0x5b58e5){return function(_0x39468e){if(_0x39468e){return _0x39468e['destroy']()['then'](function(){_0x288487[_0xfe06('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2755ab,_0x27a507){return function(_0x470530){if(!_0x470530){_0x2755ab[_0xfe06('0x1a')](0x194);}return _0x470530;};}function handleError(_0x5703e2,_0x10c227){_0x10c227=_0x10c227||0x1f4;return function(_0x2c2146){logger[_0xfe06('0x27')](_0x2c2146['stack']);if(_0x2c2146[_0xfe06('0x28')]){delete _0x2c2146['name'];}_0x5703e2[_0xfe06('0x1b')](_0x10c227)['send'](_0x2c2146);};}exports[_0xfe06('0x29')]=function(_0x3272b8,_0x3f8536){var _0x353b3c={'raw':!![],'where':{'id':_0x3272b8[_0xfe06('0x2a')]['id']}},_0x12d6a5={};_0x12d6a5['model']=_[_0xfe06('0x2b')](db[_0xfe06('0x2c')][_0xfe06('0x2d')]);_0x12d6a5[_0xfe06('0x2e')]=_[_0xfe06('0x2b')](_0x3272b8['query']);_0x12d6a5['filters']=_[_0xfe06('0x2f')](_0x12d6a5[_0xfe06('0x30')],_0x12d6a5['query']);_0x353b3c[_0xfe06('0x31')]=_[_0xfe06('0x2f')](_0x12d6a5[_0xfe06('0x30')],qs['fields'](_0x3272b8[_0xfe06('0x2e')][_0xfe06('0x32')]));_0x353b3c[_0xfe06('0x31')]=_0x353b3c['attributes'][_0xfe06('0x33')]?_0x353b3c[_0xfe06('0x31')]:_0x12d6a5[_0xfe06('0x30')];if(_0x3272b8[_0xfe06('0x2e')][_0xfe06('0x34')]){_0x353b3c[_0xfe06('0x35')]=[{'all':!![]}];}_0x353b3c=_['merge']({},_0x353b3c,_0x3272b8[_0xfe06('0x36')]);return db[_0xfe06('0x2c')]['find'](_0x353b3c)[_0xfe06('0x26')](handleEntityNotFound(_0x3f8536,null))[_0xfe06('0x26')](respondWithResult(_0x3f8536,null))[_0xfe06('0x37')](handleError(_0x3f8536,null));};exports[_0xfe06('0x38')]=function(_0x25950f,_0x332511){return db[_0xfe06('0x2c')][_0xfe06('0x38')](_0x25950f['body'],{})['then'](respondWithResult(_0x332511,0xc9))[_0xfe06('0x37')](handleError(_0x332511,null));};exports[_0xfe06('0x25')]=function(_0x4013e8,_0x507812){if(_0x4013e8[_0xfe06('0x39')]['id']){delete _0x4013e8[_0xfe06('0x39')]['id'];}return db[_0xfe06('0x2c')]['find']({'where':{'id':_0x4013e8[_0xfe06('0x2a')]['id']}})[_0xfe06('0x26')](handleEntityNotFound(_0x507812,null))['then'](saveUpdates(_0x4013e8[_0xfe06('0x39')],null))[_0xfe06('0x26')](respondWithResult(_0x507812,null))[_0xfe06('0x37')](handleError(_0x507812,null));};exports['destroy']=function(_0xc2be21,_0x227aa0){return db[_0xfe06('0x2c')][_0xfe06('0x3a')]({'where':{'id':_0xc2be21[_0xfe06('0x2a')]['id']}})[_0xfe06('0x26')](handleEntityNotFound(_0x227aa0,null))[_0xfe06('0x26')](removeEntity(_0x227aa0,null))['catch'](handleError(_0x227aa0,null));};
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.model.js b/server/api/chatProactiveAction/chatProactiveAction.model.js
index 63621aa..13c447f 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 _0x279b=['./chatProactiveAction.attributes','define','ChatProactiveAction','chat_proactive_actions','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x209552,_0x15dcbb){var _0x4198ea=function(_0x2ea322){while(--_0x2ea322){_0x209552['push'](_0x209552['shift']());}};_0x4198ea(++_0x15dcbb);}(_0x279b,0x1e5));var _0xb279=function(_0x38bd6e,_0x9d3bd8){_0x38bd6e=_0x38bd6e-0x0;var _0x3378ef=_0x279b[_0x38bd6e];return _0x3378ef;};'use strict';var _=require('lodash');var util=require(_0xb279('0x0'));var logger=require(_0xb279('0x1'))(_0xb279('0x2'));var moment=require(_0xb279('0x3'));var BPromise=require(_0xb279('0x4'));var rp=require(_0xb279('0x5'));var fs=require('fs');var path=require(_0xb279('0x6'));var rimraf=require(_0xb279('0x7'));var config=require(_0xb279('0x8'));var attributes=require(_0xb279('0x9'));module['exports']=function(_0x3794da,_0x293f01){return _0x3794da[_0xb279('0xa')](_0xb279('0xb'),attributes,{'tableName':_0xb279('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x357f=['path','./chatProactiveAction.attributes','exports','define','ChatProactiveAction','chat_proactive_actions','lodash','../../config/logger','api','moment','bluebird','request-promise'];(function(_0xa0acd9,_0x16a60b){var _0x220de0=function(_0xc9e977){while(--_0xc9e977){_0xa0acd9['push'](_0xa0acd9['shift']());}};_0x220de0(++_0x16a60b);}(_0x357f,0x14a));var _0xf357=function(_0x5951eb,_0x1f2c25){_0x5951eb=_0x5951eb-0x0;var _0x4a0d9d=_0x357f[_0x5951eb];return _0x4a0d9d;};'use strict';var _=require(_0xf357('0x0'));var util=require('util');var logger=require(_0xf357('0x1'))(_0xf357('0x2'));var moment=require(_0xf357('0x3'));var BPromise=require(_0xf357('0x4'));var rp=require(_0xf357('0x5'));var fs=require('fs');var path=require(_0xf357('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xf357('0x7'));module[_0xf357('0x8')]=function(_0x5182ff,_0x5c3d1e){return _0x5182ff[_0xf357('0x9')](_0xf357('0xa'),attributes,{'tableName':_0xf357('0xb'),'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 ee1e806..a202da8 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 _0xbbbc=['debug','ChatProactiveAction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','ChatProactiveAction,\x20%s,\x20%s','request\x20sent'];(function(_0x46f17a,_0x4d72c8){var _0x580d30=function(_0x5e7781){while(--_0x5e7781){_0x46f17a['push'](_0x46f17a['shift']());}};_0x580d30(++_0x4d72c8);}(_0xbbbc,0xbe));var _0xcbbb=function(_0x125ca8,_0x2b9dc7){_0x125ca8=_0x125ca8-0x0;var _0x8c6d50=_0xbbbc[_0x125ca8];return _0x8c6d50;};'use strict';var _=require(_0xcbbb('0x0'));var util=require(_0xcbbb('0x1'));var moment=require(_0xcbbb('0x2'));var BPromise=require(_0xcbbb('0x3'));var rs=require(_0xcbbb('0x4'));var fs=require('fs');var Redis=require(_0xcbbb('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xcbbb('0x6'));var logger=require(_0xcbbb('0x7'))(_0xcbbb('0x8'));var config=require(_0xcbbb('0x9'));var jayson=require(_0xcbbb('0xa'));var client=jayson[_0xcbbb('0xb')][_0xcbbb('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x1a9c5c,_0x2db391,_0x387a7a){return new BPromise(function(_0x14f6f4,_0x445175){return client[_0xcbbb('0xd')](_0x1a9c5c,_0x387a7a)[_0xcbbb('0xe')](function(_0x45421){logger[_0xcbbb('0xf')](_0xcbbb('0x10'),_0x2db391,_0xcbbb('0x11'));logger[_0xcbbb('0x12')](_0xcbbb('0x13'),_0x2db391,_0xcbbb('0x11'),JSON[_0xcbbb('0x14')](_0x45421));if(_0x45421['error']){if(_0x45421[_0xcbbb('0x15')][_0xcbbb('0x16')]===0x1f4){logger[_0xcbbb('0x15')](_0xcbbb('0x10'),_0x2db391,_0x45421[_0xcbbb('0x15')][_0xcbbb('0x17')]);return _0x445175(_0x45421[_0xcbbb('0x15')]['message']);}logger[_0xcbbb('0x15')](_0xcbbb('0x10'),_0x2db391,_0x45421['error'][_0xcbbb('0x17')]);return _0x14f6f4(_0x45421[_0xcbbb('0x15')]['message']);}else{logger[_0xcbbb('0xf')](_0xcbbb('0x10'),_0x2db391,_0xcbbb('0x11'));_0x14f6f4(_0x45421[_0xcbbb('0x18')][_0xcbbb('0x17')]);}})[_0xcbbb('0x19')](function(_0x2230c3){logger[_0xcbbb('0x15')]('ChatProactiveAction,\x20%s,\x20%s',_0x2db391,_0x2230c3);_0x445175(_0x2230c3);});});}
\ No newline at end of file
+var _0x3b6b=['ChatProactiveAction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','ChatProactiveAction,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x26793a,_0x49cf51){var _0x575efb=function(_0x2f4db7){while(--_0x2f4db7){_0x26793a['push'](_0x26793a['shift']());}};_0x575efb(++_0x49cf51);}(_0x3b6b,0x194));var _0xb3b6=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x3b6b[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0xb3b6('0x0'));var util=require(_0xb3b6('0x1'));var moment=require('moment');var BPromise=require(_0xb3b6('0x2'));var rs=require(_0xb3b6('0x3'));var fs=require('fs');var Redis=require(_0xb3b6('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xb3b6('0x5'));var logger=require(_0xb3b6('0x6'))('rpc');var config=require(_0xb3b6('0x7'));var jayson=require(_0xb3b6('0x8'));var client=jayson[_0xb3b6('0x9')][_0xb3b6('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x25a47d,_0x2987cd,_0x1cb627){return new BPromise(function(_0x253e48,_0x54e95c){return client['request'](_0x25a47d,_0x1cb627)[_0xb3b6('0xb')](function(_0x4f5689){logger[_0xb3b6('0xc')](_0xb3b6('0xd'),_0x2987cd,_0xb3b6('0xe'));logger[_0xb3b6('0xf')](_0xb3b6('0x10'),_0x2987cd,_0xb3b6('0xe'),JSON[_0xb3b6('0x11')](_0x4f5689));if(_0x4f5689[_0xb3b6('0x12')]){if(_0x4f5689[_0xb3b6('0x12')][_0xb3b6('0x13')]===0x1f4){logger[_0xb3b6('0x12')](_0xb3b6('0xd'),_0x2987cd,_0x4f5689[_0xb3b6('0x12')][_0xb3b6('0x14')]);return _0x54e95c(_0x4f5689[_0xb3b6('0x12')][_0xb3b6('0x14')]);}logger['error']('ChatProactiveAction,\x20%s,\x20%s',_0x2987cd,_0x4f5689['error']['message']);return _0x253e48(_0x4f5689[_0xb3b6('0x12')][_0xb3b6('0x14')]);}else{logger['info'](_0xb3b6('0xd'),_0x2987cd,'request\x20sent');_0x253e48(_0x4f5689['result'][_0xb3b6('0x14')]);}})['catch'](function(_0x1ca845){logger[_0xb3b6('0x12')](_0xb3b6('0xd'),_0x2987cd,_0x1ca845);_0x54e95c(_0x1ca845);});});}
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/index.js b/server/api/chatProactiveAction/index.js
index 18911c0..034302d 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 _0x425d=['multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./chatProactiveAction.controller','get','/:id','isAuthenticated','show','post','create','put','update','delete','destroy','exports'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x425d,0x1e0));var _0xd425=function(_0x2051dd,_0x149c46){_0x2051dd=_0x2051dd-0x0;var _0x25770c=_0x425d[_0x2051dd];return _0x25770c;};'use strict';var multer=require(_0xd425('0x0'));var util=require('util');var path=require(_0xd425('0x1'));var timeout=require(_0xd425('0x2'));var express=require(_0xd425('0x3'));var router=express[_0xd425('0x4')]();var fs_extra=require(_0xd425('0x5'));var auth=require(_0xd425('0x6'));var interaction=require(_0xd425('0x7'));var config=require('../../config/environment');var controller=require(_0xd425('0x8'));router[_0xd425('0x9')](_0xd425('0xa'),auth[_0xd425('0xb')](),controller[_0xd425('0xc')]);router[_0xd425('0xd')]('/',auth['isAuthenticated'](),controller[_0xd425('0xe')]);router[_0xd425('0xf')](_0xd425('0xa'),auth[_0xd425('0xb')](),controller[_0xd425('0x10')]);router[_0xd425('0x11')](_0xd425('0xa'),auth[_0xd425('0xb')](),controller[_0xd425('0x12')]);module[_0xd425('0x13')]=router;
\ No newline at end of file
+var _0x038b=['isAuthenticated','/:id','exports','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','./chatProactiveAction.controller','get','show','post'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x038b,0x114));var _0xb038=function(_0x27fd32,_0xe8bd4d){_0x27fd32=_0x27fd32-0x0;var _0x2dc73a=_0x038b[_0x27fd32];return _0x2dc73a;};'use strict';var multer=require('multer');var util=require(_0xb038('0x0'));var path=require(_0xb038('0x1'));var timeout=require(_0xb038('0x2'));var express=require('express');var router=express[_0xb038('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xb038('0x4'));var interaction=require(_0xb038('0x5'));var config=require('../../config/environment');var controller=require(_0xb038('0x6'));router[_0xb038('0x7')]('/:id',auth['isAuthenticated'](),controller[_0xb038('0x8')]);router[_0xb038('0x9')]('/',auth[_0xb038('0xa')](),controller['create']);router['put'](_0xb038('0xb'),auth[_0xb038('0xa')](),controller['update']);router['delete'](_0xb038('0xb'),auth[_0xb038('0xa')](),controller['destroy']);module[_0xb038('0xc')]=router;
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.attributes.js b/server/api/chatQueue/chatQueue.attributes.js
index e350868..09518f5 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 _0x6c70=['INTEGER','roundrobin','sequelize','exports','STRING','name'];(function(_0x1ebe90,_0x5d29fc){var _0x447c82=function(_0x1c2646){while(--_0x1c2646){_0x1ebe90['push'](_0x1ebe90['shift']());}};_0x447c82(++_0x5d29fc);}(_0x6c70,0x1e2));var _0x06c7=function(_0x3c4737,_0x2329ec){_0x3c4737=_0x3c4737-0x0;var _0x2bb926=_0x6c70[_0x3c4737];return _0x2bb926;};'use strict';var Sequelize=require(_0x06c7('0x0'));module[_0x06c7('0x1')]={'name':{'type':Sequelize[_0x06c7('0x2')],'unique':_0x06c7('0x3'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x06c7('0x2')]},'timeout':{'type':Sequelize[_0x06c7('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize['ENUM']('rrmemory','beepall',_0x06c7('0x5'))}};
\ No newline at end of file
+var _0x859f=['ENUM','beepall','roundrobin','exports','STRING','name','INTEGER'];(function(_0x257017,_0x330627){var _0x38536d=function(_0xdf92e){while(--_0xdf92e){_0x257017['push'](_0x257017['shift']());}};_0x38536d(++_0x330627);}(_0x859f,0xc0));var _0xf859=function(_0x231d5c,_0x3029bc){_0x231d5c=_0x231d5c-0x0;var _0x52d257=_0x859f[_0x231d5c];return _0x52d257;};'use strict';var Sequelize=require('sequelize');module[_0xf859('0x0')]={'name':{'type':Sequelize[_0xf859('0x1')],'unique':_0xf859('0x2'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0xf859('0x1')]},'timeout':{'type':Sequelize[_0xf859('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xf859('0x4')]('rrmemory',_0xf859('0x5'),_0xf859('0x6'))}};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.controller.js b/server/api/chatQueue/chatQueue.controller.js
index 948bbe7..a622b66 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 _0xe366=['Content-Range','reject','then','destroy','get','ChatQueues','UserProfileResource','stack','name','index','map','rawAttributes','fieldName','type','key','query','keys','filters','intersection','model','attributes','length','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options','ChatQueue','findAll','show','params','fields','includeAll','include','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','getMembers','findOne','UserChatQueue','ChatQueueId','User','findAndCountAll','UserId','agent','updatedAt','createdAt','format','%s/%s','SIP','chatPause','Team','getTeams','addTeams','ids','Agents','online','voicePause','interface','transaction','each','findOrCreate','forEach','emit','userChatQueue:save','removeTeams','select','field','tq.TeamId','from','team_has_chat_queues','join','user_has_teams','ChatQueueId\x20=\x20?','ut.UserId\x20=\x20?','push','toString','sequelize','QueryTypes','SELECT','every','TeamId','includes','all','union','value','isEmpty','removeAgents','addAgents','omit','isArray','userChatQueue:remove','getAgents','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatQueue.socket','register','jayson/promise','http','request','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','error','message','result','catch','sendStatus','status','end','json','offset','limit','count','set'];(function(_0x3b182d,_0x578149){var _0x5c647b=function(_0x1770a5){while(--_0x1770a5){_0x3b182d['push'](_0x3b182d['shift']());}};_0x5c647b(++_0x578149);}(_0xe366,0x68));var _0x6e36=function(_0x387777,_0x356171){_0x387777=_0x387777-0x0;var _0x3f84c0=_0xe366[_0x387777];return _0x3f84c0;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x6e36('0x0'));var zipdir=require(_0x6e36('0x1'));var jsonpatch=require(_0x6e36('0x2'));var rp=require(_0x6e36('0x3'));var moment=require(_0x6e36('0x4'));var BPromise=require(_0x6e36('0x5'));var Mustache=require('mustache');var util=require(_0x6e36('0x6'));var path=require(_0x6e36('0x7'));var sox=require(_0x6e36('0x8'));var csv=require(_0x6e36('0x9'));var ejs=require(_0x6e36('0xa'));var fs=require('fs');var fs_extra=require(_0x6e36('0xb'));var _=require(_0x6e36('0xc'));var squel=require(_0x6e36('0xd'));var crypto=require(_0x6e36('0xe'));var jsforce=require(_0x6e36('0xf'));var deskjs=require(_0x6e36('0x10'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x6e36('0x11'));var Redis=require('ioredis');var authService=require(_0x6e36('0x12'));var qs=require(_0x6e36('0x13'));var as=require(_0x6e36('0x14'));var hardwareService=require(_0x6e36('0x15'));var logger=require(_0x6e36('0x16'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x6e36('0x17'));var db=require(_0x6e36('0x18'))['db'];config[_0x6e36('0x19')]=_[_0x6e36('0x1a')](config[_0x6e36('0x19')],{'host':_0x6e36('0x1b'),'port':0x18eb});var socket=require(_0x6e36('0x1c'))(new Redis(config[_0x6e36('0x19')]));require(_0x6e36('0x1d'))[_0x6e36('0x1e')](socket);var jayson=require(_0x6e36('0x1f'));var client=jayson['client'][_0x6e36('0x20')]({'port':0x232a});function respondWithRpcPromise(_0x400134,_0x2a0ba7,_0x2c9662,_0x3369f8){return new BPromise(function(_0x149a49,_0x3a280b){var _0xa02789=_0x3369f8||client;return _0xa02789[_0x6e36('0x21')](_0x400134,_0x2c9662)['then'](function(_0x254d33){logger[_0x6e36('0x22')](_0x6e36('0x23'),_0x2a0ba7,_0x6e36('0x24'));logger[_0x6e36('0x25')]('ChatQueue,\x20%s,\x20%s,\x20%s',_0x2a0ba7,_0x6e36('0x24'),JSON['stringify'](_0x254d33));if(_0x254d33[_0x6e36('0x26')]){if(_0x254d33[_0x6e36('0x26')]['code']===0x1f4){logger['error'](_0x6e36('0x23'),_0x2a0ba7,_0x254d33['error'][_0x6e36('0x27')]);return _0x3a280b(_0x254d33[_0x6e36('0x26')]['message']);}logger[_0x6e36('0x26')](_0x6e36('0x23'),_0x2a0ba7,_0x254d33[_0x6e36('0x26')]['message']);return _0x149a49(_0x254d33['error']['message']);}else{logger[_0x6e36('0x22')]('ChatQueue,\x20%s,\x20%s',_0x2a0ba7,_0x6e36('0x24'));_0x149a49(_0x254d33[_0x6e36('0x28')][_0x6e36('0x27')]);}})[_0x6e36('0x29')](function(_0x388f00){logger['error'](_0x6e36('0x23'),_0x2a0ba7,_0x388f00);_0x3a280b(_0x388f00);});});}function respondWithStatusCode(_0x4b4c83,_0x3c77ba){_0x3c77ba=_0x3c77ba||0xcc;return function(_0x5b7359){if(_0x5b7359){return _0x4b4c83[_0x6e36('0x2a')](_0x3c77ba);}return _0x4b4c83[_0x6e36('0x2b')](_0x3c77ba)[_0x6e36('0x2c')]();};}function respondWithResult(_0x3ad5d9,_0x5c1c74){_0x5c1c74=_0x5c1c74||0xc8;return function(_0xbe376b){if(_0xbe376b){return _0x3ad5d9[_0x6e36('0x2b')](_0x5c1c74)[_0x6e36('0x2d')](_0xbe376b);}};}function respondWithFilteredResult(_0x380f45,_0x5b1cc7){return function(_0x318a53){if(_0x318a53){var _0x292bb5=typeof _0x5b1cc7[_0x6e36('0x2e')]==='undefined'&&typeof _0x5b1cc7[_0x6e36('0x2f')]==='undefined';var _0x318745=_0x318a53[_0x6e36('0x30')];var _0x39b41c=_0x292bb5?0x0:_0x5b1cc7[_0x6e36('0x2e')];var _0x586809=_0x292bb5?_0x318a53[_0x6e36('0x30')]:_0x5b1cc7[_0x6e36('0x2e')]+_0x5b1cc7['limit'];var _0x36683a;if(_0x586809>=_0x318745){_0x586809=_0x318745;_0x36683a=0xc8;}else{_0x36683a=0xce;}_0x380f45[_0x6e36('0x2b')](_0x36683a);return _0x380f45[_0x6e36('0x31')](_0x6e36('0x32'),_0x39b41c+'-'+_0x586809+'/'+_0x318745)[_0x6e36('0x2d')](_0x318a53);}return null;};}function patchUpdates(_0x1004f9){return function(_0xfb4747){try{jsonpatch['apply'](_0xfb4747,_0x1004f9,!![]);}catch(_0xa23bf7){return BPromise[_0x6e36('0x33')](_0xa23bf7);}return _0xfb4747['save']();};}function saveUpdates(_0x817bbd,_0x1c888c){return function(_0xc70a8e){if(_0xc70a8e){return _0xc70a8e['update'](_0x817bbd)[_0x6e36('0x34')](function(_0x1a01c2){return _0x1a01c2;});}return null;};}function removeEntity(_0x294490,_0x43645f){return function(_0x1053f5){if(_0x1053f5){return _0x1053f5[_0x6e36('0x35')]()[_0x6e36('0x34')](function(){var _0x599a4a=_0x1053f5[_0x6e36('0x36')]({'plain':!![]});var _0x2b83c1=_0x6e36('0x37');return db[_0x6e36('0x38')][_0x6e36('0x35')]({'where':{'type':_0x2b83c1,'resourceId':_0x599a4a['id']}})[_0x6e36('0x34')](function(){return _0x1053f5;});})[_0x6e36('0x34')](function(){_0x294490[_0x6e36('0x2b')](0xcc)[_0x6e36('0x2c')]();});}};}function handleEntityNotFound(_0x410f20,_0x1b13a9){return function(_0x41a8f7){if(!_0x41a8f7){_0x410f20['sendStatus'](0x194);}return _0x41a8f7;};}function handleError(_0x47e389,_0x4462ba){_0x4462ba=_0x4462ba||0x1f4;return function(_0x15f66c){logger[_0x6e36('0x26')](_0x15f66c[_0x6e36('0x39')]);if(_0x15f66c[_0x6e36('0x3a')]){delete _0x15f66c[_0x6e36('0x3a')];}_0x47e389[_0x6e36('0x2b')](_0x4462ba)['send'](_0x15f66c);};}exports[_0x6e36('0x3b')]=function(_0x1313e9,_0x3790ef){var _0x37e19d={},_0x209cf1={},_0x410189={'count':0x0,'rows':[]};var _0x3139b9=_[_0x6e36('0x3c')](db['ChatQueue'][_0x6e36('0x3d')],function(_0x295eb5){return{'name':_0x295eb5[_0x6e36('0x3e')],'type':_0x295eb5[_0x6e36('0x3f')][_0x6e36('0x40')]};});_0x209cf1['model']=_['map'](_0x3139b9,'name');_0x209cf1[_0x6e36('0x41')]=_[_0x6e36('0x42')](_0x1313e9[_0x6e36('0x41')]);_0x209cf1[_0x6e36('0x43')]=_[_0x6e36('0x44')](_0x209cf1[_0x6e36('0x45')],_0x209cf1['query']);_0x37e19d[_0x6e36('0x46')]=_[_0x6e36('0x44')](_0x209cf1['model'],qs['fields'](_0x1313e9['query']['fields']));_0x37e19d[_0x6e36('0x46')]=_0x37e19d[_0x6e36('0x46')][_0x6e36('0x47')]?_0x37e19d[_0x6e36('0x46')]:_0x209cf1[_0x6e36('0x45')];if(!_0x1313e9['query']['hasOwnProperty'](_0x6e36('0x48'))){_0x37e19d['limit']=qs['limit'](_0x1313e9['query'][_0x6e36('0x2f')]);_0x37e19d[_0x6e36('0x2e')]=qs['offset'](_0x1313e9['query'][_0x6e36('0x2e')]);}_0x37e19d[_0x6e36('0x49')]=qs['sort'](_0x1313e9['query'][_0x6e36('0x4a')]);_0x37e19d[_0x6e36('0x4b')]=qs[_0x6e36('0x43')](_[_0x6e36('0x4c')](_0x1313e9[_0x6e36('0x41')],_0x209cf1['filters']),_0x3139b9);if(_0x1313e9[_0x6e36('0x41')][_0x6e36('0x4d')]){_0x37e19d[_0x6e36('0x4b')]=_['merge'](_0x37e19d[_0x6e36('0x4b')],{'$or':_[_0x6e36('0x3c')](_0x3139b9,function(_0xdf06f6){if(_0xdf06f6[_0x6e36('0x3f')]!==_0x6e36('0x4e')){var _0xa2b292={};_0xa2b292[_0xdf06f6['name']]={'$like':'%'+_0x1313e9['query'][_0x6e36('0x4d')]+'%'};return _0xa2b292;}})});}_0x37e19d=_[_0x6e36('0x4f')]({},_0x37e19d,_0x1313e9[_0x6e36('0x50')]);var _0x154589={'where':_0x37e19d['where']};return db['ChatQueue']['count'](_0x154589)[_0x6e36('0x34')](function(_0x3554cb){_0x410189[_0x6e36('0x30')]=_0x3554cb;if(_0x1313e9[_0x6e36('0x41')]['includeAll']){_0x37e19d['include']=[{'all':!![]}];}return db[_0x6e36('0x51')][_0x6e36('0x52')](_0x37e19d);})[_0x6e36('0x34')](function(_0x291686){_0x410189['rows']=_0x291686;return _0x410189;})['then'](respondWithFilteredResult(_0x3790ef,_0x37e19d))[_0x6e36('0x29')](handleError(_0x3790ef,null));};exports[_0x6e36('0x53')]=function(_0x3faac6,_0x4bb8ef){var _0x4268ea={'raw':!![],'where':{'id':_0x3faac6[_0x6e36('0x54')]['id']}},_0x389914={};_0x389914['model']=_[_0x6e36('0x42')](db[_0x6e36('0x51')][_0x6e36('0x3d')]);_0x389914['query']=_[_0x6e36('0x42')](_0x3faac6['query']);_0x389914[_0x6e36('0x43')]=_[_0x6e36('0x44')](_0x389914['model'],_0x389914[_0x6e36('0x41')]);_0x4268ea[_0x6e36('0x46')]=_[_0x6e36('0x44')](_0x389914['model'],qs[_0x6e36('0x55')](_0x3faac6['query']['fields']));_0x4268ea[_0x6e36('0x46')]=_0x4268ea[_0x6e36('0x46')][_0x6e36('0x47')]?_0x4268ea[_0x6e36('0x46')]:_0x389914[_0x6e36('0x45')];if(_0x3faac6['query'][_0x6e36('0x56')]){_0x4268ea[_0x6e36('0x57')]=[{'all':!![]}];}_0x4268ea=_[_0x6e36('0x4f')]({},_0x4268ea,_0x3faac6[_0x6e36('0x50')]);return db[_0x6e36('0x51')][_0x6e36('0x58')](_0x4268ea)['then'](handleEntityNotFound(_0x4bb8ef,null))[_0x6e36('0x34')](respondWithResult(_0x4bb8ef,null))[_0x6e36('0x29')](handleError(_0x4bb8ef,null));};exports['create']=function(_0x3e1577,_0x10d541){return db[_0x6e36('0x51')][_0x6e36('0x59')](_0x3e1577[_0x6e36('0x5a')],{})[_0x6e36('0x34')](function(_0x5d9933){var _0x363aa0=_0x3e1577[_0x6e36('0x5b')][_0x6e36('0x36')]({'plain':!![]});if(!_0x363aa0)throw new Error(_0x6e36('0x5c'));if(_0x363aa0[_0x6e36('0x5d')]==='user'){var _0x2e91ae=_0x5d9933[_0x6e36('0x36')]({'plain':!![]});var _0x208f37='ChatQueues';return db[_0x6e36('0x5e')][_0x6e36('0x58')]({'where':{'name':_0x208f37,'userProfileId':_0x363aa0['userProfileId']},'raw':!![]})[_0x6e36('0x34')](function(_0x55197b){if(_0x55197b&&_0x55197b[_0x6e36('0x5f')]===0x0){return db[_0x6e36('0x38')][_0x6e36('0x59')]({'name':_0x2e91ae[_0x6e36('0x3a')],'resourceId':_0x2e91ae['id'],'type':_0x55197b[_0x6e36('0x3a')],'sectionId':_0x55197b['id']},{})[_0x6e36('0x34')](function(){return _0x5d9933;});}else{return _0x5d9933;}})[_0x6e36('0x29')](function(_0x391580){logger['error'](_0x6e36('0x60'),_0x391580);throw _0x391580;});}return _0x5d9933;})[_0x6e36('0x34')](respondWithResult(_0x10d541,0xc9))[_0x6e36('0x29')](handleError(_0x10d541,null));};exports['update']=function(_0xecb530,_0x58a94b){if(_0xecb530[_0x6e36('0x5a')]['id']){delete _0xecb530[_0x6e36('0x5a')]['id'];}return db[_0x6e36('0x51')][_0x6e36('0x58')]({'where':{'id':_0xecb530[_0x6e36('0x54')]['id']}})['then'](handleEntityNotFound(_0x58a94b,null))[_0x6e36('0x34')](saveUpdates(_0xecb530['body'],null))[_0x6e36('0x34')](respondWithResult(_0x58a94b,null))['catch'](handleError(_0x58a94b,null));};exports['destroy']=function(_0x235e4f,_0x43dc54){return db[_0x6e36('0x51')][_0x6e36('0x58')]({'where':{'id':_0x235e4f[_0x6e36('0x54')]['id']}})[_0x6e36('0x34')](handleEntityNotFound(_0x43dc54,null))[_0x6e36('0x34')](removeEntity(_0x43dc54,null))[_0x6e36('0x29')](handleError(_0x43dc54,null));};exports[_0x6e36('0x61')]=function(_0x2c791a,_0x1c1b15){return db[_0x6e36('0x51')][_0x6e36('0x61')]()[_0x6e36('0x34')](respondWithResult(_0x1c1b15,null))[_0x6e36('0x29')](handleError(_0x1c1b15,null));};exports[_0x6e36('0x62')]=function(_0x4201cf,_0x36b5b1,_0x5bca92){var _0x16ab30={'raw':!![],'where':{}},_0xcfbb3b={},_0x33481d;return db[_0x6e36('0x51')][_0x6e36('0x63')]({'where':{'id':_0x4201cf[_0x6e36('0x54')]['id']}})[_0x6e36('0x34')](handleEntityNotFound(_0x36b5b1,null))[_0x6e36('0x34')](function(_0x35827c){if(_0x35827c){_0x33481d=_0x35827c[_0x6e36('0x36')]({'plain':!![]});_0xcfbb3b[_0x6e36('0x45')]=_[_0x6e36('0x42')](db[_0x6e36('0x64')][_0x6e36('0x3d')]);_0xcfbb3b[_0x6e36('0x41')]=_[_0x6e36('0x42')](_0x4201cf['query']);_0xcfbb3b[_0x6e36('0x43')]=_[_0x6e36('0x44')](_0xcfbb3b[_0x6e36('0x45')],_0xcfbb3b['query']);_0x16ab30[_0x6e36('0x46')]=_[_0x6e36('0x44')](_0xcfbb3b['model'],qs[_0x6e36('0x55')](_0x4201cf[_0x6e36('0x41')][_0x6e36('0x55')]));_0x16ab30['attributes']=_0x16ab30[_0x6e36('0x46')][_0x6e36('0x47')]?_0x16ab30['attributes']:_0xcfbb3b['model'];if(!_0x4201cf[_0x6e36('0x41')]['hasOwnProperty']('nolimit')){_0x16ab30[_0x6e36('0x2f')]=qs[_0x6e36('0x2f')](_0x4201cf['query'][_0x6e36('0x2f')]);_0x16ab30['offset']=qs[_0x6e36('0x2e')](_0x4201cf[_0x6e36('0x41')][_0x6e36('0x2e')]);}_0x16ab30['order']=qs[_0x6e36('0x4a')](_0x4201cf[_0x6e36('0x41')][_0x6e36('0x4a')]);_0x16ab30[_0x6e36('0x4b')]=qs['filters'](_[_0x6e36('0x4c')](_0x4201cf['query'],_0xcfbb3b['filters']));_0x16ab30[_0x6e36('0x4b')][_0x6e36('0x65')]=_0x35827c['id'];if(_0x4201cf[_0x6e36('0x41')][_0x6e36('0x4d')]){_0x16ab30[_0x6e36('0x4b')]=_[_0x6e36('0x4f')](_0x16ab30[_0x6e36('0x4b')],{'$or':_[_0x6e36('0x3c')](_0x16ab30['attributes'],function(_0x36b88b){var _0x5cb1c3={};_0x5cb1c3[_0x36b88b]={'$like':'%'+_0x4201cf[_0x6e36('0x41')][_0x6e36('0x4d')]+'%'};return _0x5cb1c3;})});}_0x16ab30=_[_0x6e36('0x4f')]({},_0x16ab30,_0x4201cf[_0x6e36('0x50')]);return db[_0x6e36('0x64')][_0x6e36('0x52')](_0x16ab30);}})['then'](function(_0x3882d0){if(_0x3882d0){return db[_0x6e36('0x66')][_0x6e36('0x67')]({'where':{'id':_[_0x6e36('0x3c')](_0x3882d0,_0x6e36('0x68')),'role':_0x6e36('0x69')},'attributes':['id',_0x6e36('0x3a'),'chatPause',_0x6e36('0x6a'),_0x6e36('0x6b')]});}})[_0x6e36('0x34')](function(_0x5b395d){if(_0x5b395d){return{'count':_0x5b395d[_0x6e36('0x30')],'rows':_[_0x6e36('0x3c')](_0x5b395d['rows'],function(_0x14c6f5){return{'membername':_0x14c6f5[_0x6e36('0x3a')],'UserId':_0x14c6f5['id'],'queue_name':_0x33481d[_0x6e36('0x3a')],'ChatQueueId':_0x33481d['id'],'interface':util[_0x6e36('0x6c')](_0x6e36('0x6d'),_0x6e36('0x6e'),_0x14c6f5[_0x6e36('0x3a')]),'penalty':0x0,'paused':_0x14c6f5[_0x6e36('0x6f')],'createdAt':_0x14c6f5[_0x6e36('0x6b')],'updatedAt':_0x14c6f5[_0x6e36('0x6a')]};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x36b5b1,_0x16ab30))[_0x6e36('0x29')](handleError(_0x36b5b1,null));};exports['getTeams']=function(_0x5d9f1a,_0x499102,_0x553508){var _0x3fd886={};var _0x2de2a0={};var _0x12334b;var _0x37c172;return db['ChatQueue']['findOne']({'where':{'id':_0x5d9f1a['params']['id']}})[_0x6e36('0x34')](handleEntityNotFound(_0x499102,null))['then'](function(_0x28add1){if(_0x28add1){_0x12334b=_0x28add1;_0x2de2a0[_0x6e36('0x45')]=_[_0x6e36('0x42')](db[_0x6e36('0x70')][_0x6e36('0x3d')]);_0x2de2a0[_0x6e36('0x41')]=_['keys'](_0x5d9f1a[_0x6e36('0x41')]);_0x2de2a0[_0x6e36('0x43')]=_[_0x6e36('0x44')](_0x2de2a0[_0x6e36('0x45')],_0x2de2a0[_0x6e36('0x41')]);_0x3fd886[_0x6e36('0x46')]=_['intersection'](_0x2de2a0[_0x6e36('0x45')],qs['fields'](_0x5d9f1a['query'][_0x6e36('0x55')]));_0x3fd886[_0x6e36('0x46')]=_0x3fd886[_0x6e36('0x46')][_0x6e36('0x47')]?_0x3fd886['attributes']:_0x2de2a0['model'];_0x3fd886['order']=qs[_0x6e36('0x4a')](_0x5d9f1a['query']['sort']);_0x3fd886['where']=qs[_0x6e36('0x43')](_[_0x6e36('0x4c')](_0x5d9f1a[_0x6e36('0x41')],_0x2de2a0[_0x6e36('0x43')]));if(_0x5d9f1a['query'][_0x6e36('0x4d')]){_0x3fd886[_0x6e36('0x4b')]=_[_0x6e36('0x4f')](_0x3fd886[_0x6e36('0x4b')],{'$or':_[_0x6e36('0x3c')](_0x3fd886[_0x6e36('0x46')],function(_0x36ca52){var _0x1cde4a={};_0x1cde4a[_0x36ca52]={'$like':'%'+_0x5d9f1a[_0x6e36('0x41')]['filter']+'%'};return _0x1cde4a;})});}_0x3fd886=_[_0x6e36('0x4f')]({},_0x3fd886,_0x5d9f1a[_0x6e36('0x50')]);return _0x12334b[_0x6e36('0x71')](_0x3fd886);}})['then'](function(_0x3dbc56){if(_0x3dbc56){_0x37c172=_0x3dbc56['length'];if(!_0x5d9f1a[_0x6e36('0x41')]['hasOwnProperty'](_0x6e36('0x48'))){_0x3fd886['limit']=qs[_0x6e36('0x2f')](_0x5d9f1a[_0x6e36('0x41')][_0x6e36('0x2f')]);_0x3fd886[_0x6e36('0x2e')]=qs[_0x6e36('0x2e')](_0x5d9f1a[_0x6e36('0x41')][_0x6e36('0x2e')]);}return _0x12334b[_0x6e36('0x71')](_0x3fd886);}})['then'](function(_0xec7d00){if(_0xec7d00){return _0xec7d00?{'count':_0x37c172,'rows':_0xec7d00}:null;}})[_0x6e36('0x34')](respondWithResult(_0x499102,null))[_0x6e36('0x29')](handleError(_0x499102,null));};exports[_0x6e36('0x72')]=function(_0x4b4e05,_0x2e7f49,_0x470550){var _0x2347d6=_0x4b4e05['body'][_0x6e36('0x73')];return db[_0x6e36('0x70')][_0x6e36('0x52')]({'where':{'id':_0x2347d6},'attributes':['id'],'include':[{'model':db[_0x6e36('0x66')],'as':_0x6e36('0x74'),'attributes':['id',_0x6e36('0x3a'),_0x6e36('0x75'),_0x6e36('0x76'),_0x6e36('0x77')],'raw':!![]}]})['then'](function(_0x2f7a83){if(_0x2f7a83){var _0x5a2ba6=_['flatMap'](_0x2f7a83,function(_0x1bf826){var _0x25efae=_0x1bf826[_0x6e36('0x36')]({'plain':!![]});return _0x25efae[_0x6e36('0x74')];});return db[_0x6e36('0x51')][_0x6e36('0x58')]({'where':{'id':_0x4b4e05['params']['id']}})[_0x6e36('0x34')](function(_0x1c613d){return db['sequelize'][_0x6e36('0x78')](function(_0x59468b){return _0x1c613d[_0x6e36('0x72')](_0x2347d6,{'transaction':_0x59468b})[_0x6e36('0x34')](function(){return BPromise[_0x6e36('0x79')](_0x5a2ba6,function(_0x1165c6){return db[_0x6e36('0x64')][_0x6e36('0x7a')]({'where':{'UserId':_0x1165c6['id'],'ChatQueueId':_0x4b4e05[_0x6e36('0x54')]['id']},'transaction':_0x59468b});});})[_0x6e36('0x34')](function(){_0x5a2ba6[_0x6e36('0x7b')](function(_0x23d1fc){socket[_0x6e36('0x7c')](_0x6e36('0x7d'),{'UserId':_0x23d1fc['id'],'ChatQueueId':_0x1c613d['id']});});});});});}})[_0x6e36('0x34')](respondWithStatusCode(_0x2e7f49,null))['catch'](handleError(_0x2e7f49,null));};exports[_0x6e36('0x7e')]=function(_0x2d81fc,_0x28357e,_0xaee47a){return db['Team'][_0x6e36('0x52')]({'where':{'id':_0x2d81fc[_0x6e36('0x41')][_0x6e36('0x73')]},'attributes':['id'],'include':[{'model':db[_0x6e36('0x66')],'as':'Agents','attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x28357e,null))[_0x6e36('0x34')](function(_0x3aa1d8){var _0x1a0a14=_[_0x6e36('0x3c')](_0x3aa1d8,'id');var _0x41f9a5=[];var _0x1b24e1=[];var _0x5d4287=squel[_0x6e36('0x7f')]();_0x5d4287[_0x6e36('0x80')](_0x6e36('0x81'))[_0x6e36('0x82')](_0x6e36('0x83'),'tq')[_0x6e36('0x84')](_0x6e36('0x85'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0x6e36('0x4b')](_0x6e36('0x86'),_0x2d81fc['params']['id']);for(var _0x103229=0x0;_0x103229<_0x3aa1d8[_0x6e36('0x47')];_0x103229+=0x1){let _0x2bcab4=_0x3aa1d8[_0x103229];for(var _0x55c68d=0x0;_0x55c68d<_0x2bcab4['Agents'][_0x6e36('0x47')];_0x55c68d+=0x1){let _0xc12364=_0x2bcab4[_0x6e36('0x74')][_0x55c68d];var _0x113f1e=_0x5d4287['clone']();_0x113f1e[_0x6e36('0x4b')](_0x6e36('0x87'),_0xc12364['id']);_0x1b24e1[_0x6e36('0x88')](db['sequelize'][_0x6e36('0x41')](_0x113f1e[_0x6e36('0x89')](),{'type':db[_0x6e36('0x8a')][_0x6e36('0x8b')][_0x6e36('0x8c')]})[_0x6e36('0x34')](function(_0x2e8274){if(_0x2e8274[_0x6e36('0x47')]===0x1){return _0xc12364['id'];}else{var _0x31c69a=_[_0x6e36('0x8d')](_[_0x6e36('0x3c')](_0x2e8274,_0x6e36('0x8e')),function(_0x3786fd){return _[_0x6e36('0x8f')](_0x1a0a14,_0x3786fd);});if(_0x31c69a){return _0xc12364['id'];}}}));}}return BPromise[_0x6e36('0x90')](_0x1b24e1)['then'](function(_0x418b60){_0x41f9a5=_(_0x41f9a5)[_0x6e36('0x91')](_0x418b60)['compact']()[_0x6e36('0x92')]();return db[_0x6e36('0x51')][_0x6e36('0x58')]({'where':{'id':_0x2d81fc['params']['id']}})[_0x6e36('0x34')](function(_0x160656){return db[_0x6e36('0x8a')]['transaction'](function(_0x2970bc){return _0x160656['removeTeams'](_0x2d81fc[_0x6e36('0x41')]['ids'],{'transaction':_0x2970bc})[_0x6e36('0x34')](function(){if(!_[_0x6e36('0x93')](_0x41f9a5)){return _0x160656[_0x6e36('0x94')](_0x41f9a5,{'transaction':_0x2970bc});}})[_0x6e36('0x34')](function(){_0x41f9a5[_0x6e36('0x7b')](function(_0x5c3160){socket[_0x6e36('0x7c')]('userChatQueue:remove',{'UserId':_0x5c3160,'ChatQueueId':_0x160656['id']});});});});});});})[_0x6e36('0x34')](respondWithStatusCode(_0x28357e,null))[_0x6e36('0x29')](handleError(_0x28357e,null));};exports[_0x6e36('0x95')]=function(_0x292903,_0x317983,_0x3ccbab){return db[_0x6e36('0x51')][_0x6e36('0x58')]({'where':{'id':_0x292903[_0x6e36('0x54')]['id']}})[_0x6e36('0x34')](handleEntityNotFound(_0x317983,null))[_0x6e36('0x34')](function(_0x39d371){if(_0x39d371){return _0x39d371['addAgents'](_0x292903['body'][_0x6e36('0x73')],_[_0x6e36('0x96')](_0x292903[_0x6e36('0x5a')],[_0x6e36('0x73'),'id'])||{})['spread'](function(_0x4e5a3f){for(var _0x579b9e=0x0;_0x579b9e<_0x292903[_0x6e36('0x5a')][_0x6e36('0x73')][_0x6e36('0x47')];_0x579b9e+=0x1){socket['emit']('userChatQueue:save',{'UserId':Number(_0x292903[_0x6e36('0x5a')]['ids'][_0x579b9e]),'ChatQueueId':Number(_0x292903[_0x6e36('0x54')]['id'])});}return _0x4e5a3f;});}})[_0x6e36('0x34')](respondWithResult(_0x317983,null))['catch'](handleError(_0x317983,null));};exports[_0x6e36('0x94')]=function(_0x3eb4b2,_0x148883,_0x19cd03){return db[_0x6e36('0x51')][_0x6e36('0x58')]({'where':{'id':_0x3eb4b2[_0x6e36('0x54')]['id']}})[_0x6e36('0x34')](handleEntityNotFound(_0x148883,null))[_0x6e36('0x34')](function(_0x34928d){if(_0x34928d){return _0x34928d[_0x6e36('0x94')](_0x3eb4b2['query'][_0x6e36('0x73')])[_0x6e36('0x34')](function(){if(_[_0x6e36('0x97')](_0x3eb4b2['query'][_0x6e36('0x73')])){for(var _0x51bad1=0x0;_0x51bad1<_0x3eb4b2['query'][_0x6e36('0x73')]['length'];_0x51bad1+=0x1){socket[_0x6e36('0x7c')](_0x6e36('0x98'),{'UserId':Number(_0x3eb4b2['query'][_0x6e36('0x73')][_0x51bad1]),'ChatQueueId':Number(_0x3eb4b2[_0x6e36('0x54')]['id'])});}}else{socket[_0x6e36('0x7c')](_0x6e36('0x98'),{'UserId':Number(_0x3eb4b2['query'][_0x6e36('0x73')]),'ChatQueueId':Number(_0x3eb4b2[_0x6e36('0x54')]['id'])});}});}})[_0x6e36('0x34')](respondWithStatusCode(_0x148883,null))[_0x6e36('0x29')](handleError(_0x148883,null));};exports[_0x6e36('0x99')]=function(_0x1dcec7,_0x5bc739,_0x6cb769){var _0x58208f={};var _0xe1b8c0={};var _0x2e9256;var _0x4c0de6;return db[_0x6e36('0x51')][_0x6e36('0x63')]({'where':{'id':_0x1dcec7['params']['id']}})[_0x6e36('0x34')](handleEntityNotFound(_0x5bc739,null))[_0x6e36('0x34')](function(_0x3a3824){if(_0x3a3824){_0x2e9256=_0x3a3824;_0xe1b8c0[_0x6e36('0x45')]=_[_0x6e36('0x42')](db['User'][_0x6e36('0x3d')]);_0xe1b8c0['query']=_[_0x6e36('0x42')](_0x1dcec7[_0x6e36('0x41')]);_0xe1b8c0['filters']=_[_0x6e36('0x44')](_0xe1b8c0['model'],_0xe1b8c0[_0x6e36('0x41')]);_0x58208f[_0x6e36('0x46')]=_[_0x6e36('0x44')](_0xe1b8c0[_0x6e36('0x45')],qs[_0x6e36('0x55')](_0x1dcec7[_0x6e36('0x41')][_0x6e36('0x55')]));_0x58208f[_0x6e36('0x46')]=_0x58208f[_0x6e36('0x46')][_0x6e36('0x47')]?_0x58208f[_0x6e36('0x46')]:_0xe1b8c0[_0x6e36('0x45')];_0x58208f['order']=qs['sort'](_0x1dcec7[_0x6e36('0x41')][_0x6e36('0x4a')]);_0x58208f[_0x6e36('0x4b')]=qs[_0x6e36('0x43')](_[_0x6e36('0x4c')](_0x1dcec7['query'],_0xe1b8c0[_0x6e36('0x43')]));if(_0x1dcec7[_0x6e36('0x41')][_0x6e36('0x4d')]){_0x58208f[_0x6e36('0x4b')]=_[_0x6e36('0x4f')](_0x58208f[_0x6e36('0x4b')],{'$or':_[_0x6e36('0x3c')](_0x58208f['attributes'],function(_0x31e6a6){var _0x52cce0={};_0x52cce0[_0x31e6a6]={'$like':'%'+_0x1dcec7[_0x6e36('0x41')][_0x6e36('0x4d')]+'%'};return _0x52cce0;})});}_0x58208f=_[_0x6e36('0x4f')]({},_0x58208f,_0x1dcec7[_0x6e36('0x50')]);return _0x2e9256['getAgents'](_0x58208f);}})[_0x6e36('0x34')](function(_0x44f481){if(_0x44f481){_0x4c0de6=_0x44f481[_0x6e36('0x47')];if(!_0x1dcec7[_0x6e36('0x41')]['hasOwnProperty'](_0x6e36('0x48'))){_0x58208f[_0x6e36('0x2f')]=qs[_0x6e36('0x2f')](_0x1dcec7[_0x6e36('0x41')][_0x6e36('0x2f')]);_0x58208f['offset']=qs[_0x6e36('0x2e')](_0x1dcec7['query']['offset']);}return _0x2e9256[_0x6e36('0x99')](_0x58208f);}})[_0x6e36('0x34')](function(_0x4c7252){if(_0x4c7252){return _0x4c7252?{'count':_0x4c0de6,'rows':_0x4c7252}:null;}})['then'](respondWithResult(_0x5bc739,null))['catch'](handleError(_0x5bc739,null));};
\ No newline at end of file
+var _0xc5cd=['fieldName','type','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','count','findAll','params','include','options','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','find','userProfileId','autoAssociation','update','describe','findOne','ChatQueueId','findAndCountAll','UserId','agent','updatedAt','createdAt','rows','format','%s/%s','getTeams','Team','addTeams','online','voicePause','interface','sequelize','each','UserChatQueue','findOrCreate','forEach','emit','removeTeams','ids','User','Agents','select','field','from','team_has_chat_queues','ChatQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','toString','QueryTypes','SELECT','TeamId','includes','all','union','compact','value','transaction','isEmpty','removeAgents','userChatQueue:remove','addAgents','omit','spread','userChatQueue:save','isArray','getAgents','zip-dir','fast-json-patch','request-promise','moment','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/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','register','client','http','request','then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','sendStatus','status','undefined','limit','offset','set','Content-Range','apply','reject','save','ChatQueues','UserProfileResource','destroy','end','stack','name','send','index','map','ChatQueue','rawAttributes'];(function(_0x21a0cb,_0x483abd){var _0x341412=function(_0x33e9cd){while(--_0x33e9cd){_0x21a0cb['push'](_0x21a0cb['shift']());}};_0x341412(++_0x483abd);}(_0xc5cd,0xf1));var _0xdc5c=function(_0x4bea50,_0x18ea16){_0x4bea50=_0x4bea50-0x0;var _0x500311=_0xc5cd[_0x4bea50];return _0x500311;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xdc5c('0x0'));var jsonpatch=require(_0xdc5c('0x1'));var rp=require(_0xdc5c('0x2'));var moment=require(_0xdc5c('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xdc5c('0x4'));var path=require(_0xdc5c('0x5'));var sox=require(_0xdc5c('0x6'));var csv=require(_0xdc5c('0x7'));var ejs=require(_0xdc5c('0x8'));var fs=require('fs');var fs_extra=require(_0xdc5c('0x9'));var _=require(_0xdc5c('0xa'));var squel=require(_0xdc5c('0xb'));var crypto=require(_0xdc5c('0xc'));var jsforce=require(_0xdc5c('0xd'));var deskjs=require(_0xdc5c('0xe'));var toCsv=require(_0xdc5c('0x7'));var querystring=require(_0xdc5c('0xf'));var Papa=require(_0xdc5c('0x10'));var Redis=require(_0xdc5c('0x11'));var authService=require(_0xdc5c('0x12'));var qs=require(_0xdc5c('0x13'));var as=require(_0xdc5c('0x14'));var hardwareService=require(_0xdc5c('0x15'));var logger=require(_0xdc5c('0x16'))('api');var utils=require('../../config/utils');var config=require(_0xdc5c('0x17'));var licenseUtil=require(_0xdc5c('0x18'));var db=require(_0xdc5c('0x19'))['db'];config[_0xdc5c('0x1a')]=_['defaults'](config[_0xdc5c('0x1a')],{'host':_0xdc5c('0x1b'),'port':0x18eb});var socket=require(_0xdc5c('0x1c'))(new Redis(config[_0xdc5c('0x1a')]));require('./chatQueue.socket')[_0xdc5c('0x1d')](socket);var jayson=require('jayson/promise');var client=jayson[_0xdc5c('0x1e')][_0xdc5c('0x1f')]({'port':0x232a});function respondWithRpcPromise(_0x32b576,_0x1c12ea,_0x574f4a,_0x1f8387){return new BPromise(function(_0x30974e,_0x4481b4){var _0x3a50c2=_0x1f8387||client;return _0x3a50c2[_0xdc5c('0x20')](_0x32b576,_0x574f4a)[_0xdc5c('0x21')](function(_0x5c9bfd){logger[_0xdc5c('0x22')](_0xdc5c('0x23'),_0x1c12ea,_0xdc5c('0x24'));logger[_0xdc5c('0x25')]('ChatQueue,\x20%s,\x20%s,\x20%s',_0x1c12ea,'request\x20sent',JSON[_0xdc5c('0x26')](_0x5c9bfd));if(_0x5c9bfd[_0xdc5c('0x27')]){if(_0x5c9bfd[_0xdc5c('0x27')][_0xdc5c('0x28')]===0x1f4){logger[_0xdc5c('0x27')](_0xdc5c('0x23'),_0x1c12ea,_0x5c9bfd[_0xdc5c('0x27')][_0xdc5c('0x29')]);return _0x4481b4(_0x5c9bfd[_0xdc5c('0x27')][_0xdc5c('0x29')]);}logger[_0xdc5c('0x27')]('ChatQueue,\x20%s,\x20%s',_0x1c12ea,_0x5c9bfd[_0xdc5c('0x27')][_0xdc5c('0x29')]);return _0x30974e(_0x5c9bfd[_0xdc5c('0x27')][_0xdc5c('0x29')]);}else{logger['info'](_0xdc5c('0x23'),_0x1c12ea,'request\x20sent');_0x30974e(_0x5c9bfd[_0xdc5c('0x2a')][_0xdc5c('0x29')]);}})[_0xdc5c('0x2b')](function(_0x545084){logger[_0xdc5c('0x27')](_0xdc5c('0x23'),_0x1c12ea,_0x545084);_0x4481b4(_0x545084);});});}function respondWithStatusCode(_0x284c8f,_0x30a38d){_0x30a38d=_0x30a38d||0xcc;return function(_0x3125f4){if(_0x3125f4){return _0x284c8f[_0xdc5c('0x2c')](_0x30a38d);}return _0x284c8f['status'](_0x30a38d)['end']();};}function respondWithResult(_0x56c12f,_0x338b58){_0x338b58=_0x338b58||0xc8;return function(_0x2de7b0){if(_0x2de7b0){return _0x56c12f[_0xdc5c('0x2d')](_0x338b58)['json'](_0x2de7b0);}};}function respondWithFilteredResult(_0x5a1872,_0x5c1356){return function(_0x4c1858){if(_0x4c1858){var _0x49cd2a=typeof _0x5c1356['offset']===_0xdc5c('0x2e')&&typeof _0x5c1356[_0xdc5c('0x2f')]==='undefined';var _0xed4b67=_0x4c1858['count'];var _0x170c74=_0x49cd2a?0x0:_0x5c1356['offset'];var _0x5ae735=_0x49cd2a?_0x4c1858['count']:_0x5c1356[_0xdc5c('0x30')]+_0x5c1356[_0xdc5c('0x2f')];var _0x5a9e87;if(_0x5ae735>=_0xed4b67){_0x5ae735=_0xed4b67;_0x5a9e87=0xc8;}else{_0x5a9e87=0xce;}_0x5a1872['status'](_0x5a9e87);return _0x5a1872[_0xdc5c('0x31')](_0xdc5c('0x32'),_0x170c74+'-'+_0x5ae735+'/'+_0xed4b67)['json'](_0x4c1858);}return null;};}function patchUpdates(_0x24c1be){return function(_0x406d63){try{jsonpatch[_0xdc5c('0x33')](_0x406d63,_0x24c1be,!![]);}catch(_0x17df80){return BPromise[_0xdc5c('0x34')](_0x17df80);}return _0x406d63[_0xdc5c('0x35')]();};}function saveUpdates(_0x4319e0,_0x367c0a){return function(_0x527d21){if(_0x527d21){return _0x527d21['update'](_0x4319e0)[_0xdc5c('0x21')](function(_0x1301d9){return _0x1301d9;});}return null;};}function removeEntity(_0x533fbc,_0x42bb0f){return function(_0x176c98){if(_0x176c98){return _0x176c98['destroy']()['then'](function(){var _0x1c2c32=_0x176c98['get']({'plain':!![]});var _0x5dc413=_0xdc5c('0x36');return db[_0xdc5c('0x37')][_0xdc5c('0x38')]({'where':{'type':_0x5dc413,'resourceId':_0x1c2c32['id']}})[_0xdc5c('0x21')](function(){return _0x176c98;});})['then'](function(){_0x533fbc[_0xdc5c('0x2d')](0xcc)[_0xdc5c('0x39')]();});}};}function handleEntityNotFound(_0x12136d,_0x44bc0a){return function(_0x7a7f94){if(!_0x7a7f94){_0x12136d[_0xdc5c('0x2c')](0x194);}return _0x7a7f94;};}function handleError(_0x4ea2c9,_0xd4ac4a){_0xd4ac4a=_0xd4ac4a||0x1f4;return function(_0x2edb82){logger['error'](_0x2edb82[_0xdc5c('0x3a')]);if(_0x2edb82[_0xdc5c('0x3b')]){delete _0x2edb82[_0xdc5c('0x3b')];}_0x4ea2c9[_0xdc5c('0x2d')](_0xd4ac4a)[_0xdc5c('0x3c')](_0x2edb82);};}exports[_0xdc5c('0x3d')]=function(_0x5df54f,_0x10266c){var _0x309666={},_0x391a4b={},_0x4c8dc3={'count':0x0,'rows':[]};var _0x16113e=_[_0xdc5c('0x3e')](db[_0xdc5c('0x3f')][_0xdc5c('0x40')],function(_0x457375){return{'name':_0x457375[_0xdc5c('0x41')],'type':_0x457375[_0xdc5c('0x42')]['key']};});_0x391a4b[_0xdc5c('0x43')]=_[_0xdc5c('0x3e')](_0x16113e,'name');_0x391a4b[_0xdc5c('0x44')]=_[_0xdc5c('0x45')](_0x5df54f['query']);_0x391a4b[_0xdc5c('0x46')]=_['intersection'](_0x391a4b['model'],_0x391a4b[_0xdc5c('0x44')]);_0x309666[_0xdc5c('0x47')]=_[_0xdc5c('0x48')](_0x391a4b[_0xdc5c('0x43')],qs[_0xdc5c('0x49')](_0x5df54f['query'][_0xdc5c('0x49')]));_0x309666[_0xdc5c('0x47')]=_0x309666['attributes'][_0xdc5c('0x4a')]?_0x309666[_0xdc5c('0x47')]:_0x391a4b[_0xdc5c('0x43')];if(!_0x5df54f[_0xdc5c('0x44')][_0xdc5c('0x4b')](_0xdc5c('0x4c'))){_0x309666['limit']=qs[_0xdc5c('0x2f')](_0x5df54f[_0xdc5c('0x44')][_0xdc5c('0x2f')]);_0x309666[_0xdc5c('0x30')]=qs[_0xdc5c('0x30')](_0x5df54f[_0xdc5c('0x44')]['offset']);}_0x309666[_0xdc5c('0x4d')]=qs[_0xdc5c('0x4e')](_0x5df54f[_0xdc5c('0x44')][_0xdc5c('0x4e')]);_0x309666[_0xdc5c('0x4f')]=qs['filters'](_[_0xdc5c('0x50')](_0x5df54f['query'],_0x391a4b[_0xdc5c('0x46')]),_0x16113e);if(_0x5df54f['query'][_0xdc5c('0x51')]){_0x309666[_0xdc5c('0x4f')]=_[_0xdc5c('0x52')](_0x309666['where'],{'$or':_[_0xdc5c('0x3e')](_0x16113e,function(_0x3ee418){if(_0x3ee418[_0xdc5c('0x42')]!==_0xdc5c('0x53')){var _0x33db63={};_0x33db63[_0x3ee418[_0xdc5c('0x3b')]]={'$like':'%'+_0x5df54f[_0xdc5c('0x44')][_0xdc5c('0x51')]+'%'};return _0x33db63;}})});}_0x309666=_[_0xdc5c('0x52')]({},_0x309666,_0x5df54f['options']);var _0x2d1e2b={'where':_0x309666[_0xdc5c('0x4f')]};return db['ChatQueue'][_0xdc5c('0x54')](_0x2d1e2b)[_0xdc5c('0x21')](function(_0x2cab6b){_0x4c8dc3[_0xdc5c('0x54')]=_0x2cab6b;if(_0x5df54f[_0xdc5c('0x44')]['includeAll']){_0x309666['include']=[{'all':!![]}];}return db[_0xdc5c('0x3f')][_0xdc5c('0x55')](_0x309666);})[_0xdc5c('0x21')](function(_0x592e8b){_0x4c8dc3['rows']=_0x592e8b;return _0x4c8dc3;})[_0xdc5c('0x21')](respondWithFilteredResult(_0x10266c,_0x309666))[_0xdc5c('0x2b')](handleError(_0x10266c,null));};exports['show']=function(_0xa7e684,_0x54e887){var _0xba9c25={'raw':!![],'where':{'id':_0xa7e684[_0xdc5c('0x56')]['id']}},_0xe0ebeb={};_0xe0ebeb[_0xdc5c('0x43')]=_[_0xdc5c('0x45')](db[_0xdc5c('0x3f')][_0xdc5c('0x40')]);_0xe0ebeb[_0xdc5c('0x44')]=_['keys'](_0xa7e684['query']);_0xe0ebeb[_0xdc5c('0x46')]=_[_0xdc5c('0x48')](_0xe0ebeb['model'],_0xe0ebeb[_0xdc5c('0x44')]);_0xba9c25[_0xdc5c('0x47')]=_['intersection'](_0xe0ebeb[_0xdc5c('0x43')],qs[_0xdc5c('0x49')](_0xa7e684[_0xdc5c('0x44')][_0xdc5c('0x49')]));_0xba9c25[_0xdc5c('0x47')]=_0xba9c25[_0xdc5c('0x47')]['length']?_0xba9c25[_0xdc5c('0x47')]:_0xe0ebeb['model'];if(_0xa7e684[_0xdc5c('0x44')]['includeAll']){_0xba9c25[_0xdc5c('0x57')]=[{'all':!![]}];}_0xba9c25=_['merge']({},_0xba9c25,_0xa7e684[_0xdc5c('0x58')]);return db[_0xdc5c('0x3f')]['find'](_0xba9c25)[_0xdc5c('0x21')](handleEntityNotFound(_0x54e887,null))[_0xdc5c('0x21')](respondWithResult(_0x54e887,null))[_0xdc5c('0x2b')](handleError(_0x54e887,null));};exports[_0xdc5c('0x59')]=function(_0x1ea56d,_0x5ac9c9){return db[_0xdc5c('0x3f')]['create'](_0x1ea56d[_0xdc5c('0x5a')],{})[_0xdc5c('0x21')](function(_0x554d5d){var _0x22c1c4=_0x1ea56d[_0xdc5c('0x5b')][_0xdc5c('0x5c')]({'plain':!![]});if(!_0x22c1c4)throw new Error(_0xdc5c('0x5d'));if(_0x22c1c4['role']==='user'){var _0x117019=_0x554d5d[_0xdc5c('0x5c')]({'plain':!![]});var _0x30f926=_0xdc5c('0x36');return db[_0xdc5c('0x5e')][_0xdc5c('0x5f')]({'where':{'name':_0x30f926,'userProfileId':_0x22c1c4[_0xdc5c('0x60')]},'raw':!![]})[_0xdc5c('0x21')](function(_0x3b9e73){if(_0x3b9e73&&_0x3b9e73[_0xdc5c('0x61')]===0x0){return db[_0xdc5c('0x37')]['create']({'name':_0x117019['name'],'resourceId':_0x117019['id'],'type':_0x3b9e73[_0xdc5c('0x3b')],'sectionId':_0x3b9e73['id']},{})[_0xdc5c('0x21')](function(){return _0x554d5d;});}else{return _0x554d5d;}})[_0xdc5c('0x2b')](function(_0x4779b3){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4779b3);throw _0x4779b3;});}return _0x554d5d;})[_0xdc5c('0x21')](respondWithResult(_0x5ac9c9,0xc9))[_0xdc5c('0x2b')](handleError(_0x5ac9c9,null));};exports[_0xdc5c('0x62')]=function(_0x17c144,_0x23d36e){if(_0x17c144[_0xdc5c('0x5a')]['id']){delete _0x17c144[_0xdc5c('0x5a')]['id'];}return db[_0xdc5c('0x3f')][_0xdc5c('0x5f')]({'where':{'id':_0x17c144['params']['id']}})[_0xdc5c('0x21')](handleEntityNotFound(_0x23d36e,null))[_0xdc5c('0x21')](saveUpdates(_0x17c144[_0xdc5c('0x5a')],null))['then'](respondWithResult(_0x23d36e,null))['catch'](handleError(_0x23d36e,null));};exports[_0xdc5c('0x38')]=function(_0x310d83,_0x2d4a35){return db[_0xdc5c('0x3f')][_0xdc5c('0x5f')]({'where':{'id':_0x310d83[_0xdc5c('0x56')]['id']}})[_0xdc5c('0x21')](handleEntityNotFound(_0x2d4a35,null))['then'](removeEntity(_0x2d4a35,null))[_0xdc5c('0x2b')](handleError(_0x2d4a35,null));};exports[_0xdc5c('0x63')]=function(_0x5b7cb9,_0x3520cb){return db[_0xdc5c('0x3f')][_0xdc5c('0x63')]()[_0xdc5c('0x21')](respondWithResult(_0x3520cb,null))['catch'](handleError(_0x3520cb,null));};exports['getMembers']=function(_0x1151cc,_0x24e043,_0x38339c){var _0x4ad4ff={'raw':!![],'where':{}},_0x35cc4d={},_0x5581c3;return db[_0xdc5c('0x3f')][_0xdc5c('0x64')]({'where':{'id':_0x1151cc['params']['id']}})['then'](handleEntityNotFound(_0x24e043,null))[_0xdc5c('0x21')](function(_0x24bd05){if(_0x24bd05){_0x5581c3=_0x24bd05[_0xdc5c('0x5c')]({'plain':!![]});_0x35cc4d[_0xdc5c('0x43')]=_['keys'](db['UserChatQueue'][_0xdc5c('0x40')]);_0x35cc4d[_0xdc5c('0x44')]=_['keys'](_0x1151cc[_0xdc5c('0x44')]);_0x35cc4d[_0xdc5c('0x46')]=_[_0xdc5c('0x48')](_0x35cc4d[_0xdc5c('0x43')],_0x35cc4d[_0xdc5c('0x44')]);_0x4ad4ff[_0xdc5c('0x47')]=_['intersection'](_0x35cc4d[_0xdc5c('0x43')],qs[_0xdc5c('0x49')](_0x1151cc[_0xdc5c('0x44')][_0xdc5c('0x49')]));_0x4ad4ff[_0xdc5c('0x47')]=_0x4ad4ff[_0xdc5c('0x47')]['length']?_0x4ad4ff['attributes']:_0x35cc4d['model'];if(!_0x1151cc['query'][_0xdc5c('0x4b')]('nolimit')){_0x4ad4ff['limit']=qs[_0xdc5c('0x2f')](_0x1151cc[_0xdc5c('0x44')]['limit']);_0x4ad4ff[_0xdc5c('0x30')]=qs[_0xdc5c('0x30')](_0x1151cc[_0xdc5c('0x44')][_0xdc5c('0x30')]);}_0x4ad4ff['order']=qs[_0xdc5c('0x4e')](_0x1151cc[_0xdc5c('0x44')][_0xdc5c('0x4e')]);_0x4ad4ff[_0xdc5c('0x4f')]=qs[_0xdc5c('0x46')](_['pick'](_0x1151cc['query'],_0x35cc4d[_0xdc5c('0x46')]));_0x4ad4ff['where'][_0xdc5c('0x65')]=_0x24bd05['id'];if(_0x1151cc[_0xdc5c('0x44')][_0xdc5c('0x51')]){_0x4ad4ff[_0xdc5c('0x4f')]=_[_0xdc5c('0x52')](_0x4ad4ff['where'],{'$or':_['map'](_0x4ad4ff[_0xdc5c('0x47')],function(_0x273797){var _0x1f42ed={};_0x1f42ed[_0x273797]={'$like':'%'+_0x1151cc[_0xdc5c('0x44')][_0xdc5c('0x51')]+'%'};return _0x1f42ed;})});}_0x4ad4ff=_[_0xdc5c('0x52')]({},_0x4ad4ff,_0x1151cc['options']);return db['UserChatQueue'][_0xdc5c('0x55')](_0x4ad4ff);}})[_0xdc5c('0x21')](function(_0x30d09f){if(_0x30d09f){return db['User'][_0xdc5c('0x66')]({'where':{'id':_[_0xdc5c('0x3e')](_0x30d09f,_0xdc5c('0x67')),'role':_0xdc5c('0x68')},'attributes':['id','name','chatPause',_0xdc5c('0x69'),_0xdc5c('0x6a')]});}})[_0xdc5c('0x21')](function(_0x4205d7){if(_0x4205d7){return{'count':_0x4205d7['count'],'rows':_['map'](_0x4205d7[_0xdc5c('0x6b')],function(_0x13be53){return{'membername':_0x13be53[_0xdc5c('0x3b')],'UserId':_0x13be53['id'],'queue_name':_0x5581c3[_0xdc5c('0x3b')],'ChatQueueId':_0x5581c3['id'],'interface':util[_0xdc5c('0x6c')](_0xdc5c('0x6d'),'SIP',_0x13be53['name']),'penalty':0x0,'paused':_0x13be53['chatPause'],'createdAt':_0x13be53[_0xdc5c('0x6a')],'updatedAt':_0x13be53['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x24e043,_0x4ad4ff))['catch'](handleError(_0x24e043,null));};exports[_0xdc5c('0x6e')]=function(_0x4cc92a,_0x5f6c7d,_0xa95dd3){var _0xb2562b={};var _0x2da36d={};var _0x5b4f71;var _0x14506f;return db[_0xdc5c('0x3f')][_0xdc5c('0x64')]({'where':{'id':_0x4cc92a[_0xdc5c('0x56')]['id']}})[_0xdc5c('0x21')](handleEntityNotFound(_0x5f6c7d,null))[_0xdc5c('0x21')](function(_0x19e5db){if(_0x19e5db){_0x5b4f71=_0x19e5db;_0x2da36d[_0xdc5c('0x43')]=_[_0xdc5c('0x45')](db[_0xdc5c('0x6f')][_0xdc5c('0x40')]);_0x2da36d['query']=_[_0xdc5c('0x45')](_0x4cc92a['query']);_0x2da36d[_0xdc5c('0x46')]=_[_0xdc5c('0x48')](_0x2da36d[_0xdc5c('0x43')],_0x2da36d[_0xdc5c('0x44')]);_0xb2562b[_0xdc5c('0x47')]=_['intersection'](_0x2da36d[_0xdc5c('0x43')],qs[_0xdc5c('0x49')](_0x4cc92a[_0xdc5c('0x44')][_0xdc5c('0x49')]));_0xb2562b[_0xdc5c('0x47')]=_0xb2562b[_0xdc5c('0x47')][_0xdc5c('0x4a')]?_0xb2562b[_0xdc5c('0x47')]:_0x2da36d[_0xdc5c('0x43')];_0xb2562b[_0xdc5c('0x4d')]=qs['sort'](_0x4cc92a['query']['sort']);_0xb2562b['where']=qs[_0xdc5c('0x46')](_[_0xdc5c('0x50')](_0x4cc92a['query'],_0x2da36d[_0xdc5c('0x46')]));if(_0x4cc92a[_0xdc5c('0x44')]['filter']){_0xb2562b[_0xdc5c('0x4f')]=_[_0xdc5c('0x52')](_0xb2562b[_0xdc5c('0x4f')],{'$or':_['map'](_0xb2562b[_0xdc5c('0x47')],function(_0xfeb5cc){var _0x434aaf={};_0x434aaf[_0xfeb5cc]={'$like':'%'+_0x4cc92a[_0xdc5c('0x44')][_0xdc5c('0x51')]+'%'};return _0x434aaf;})});}_0xb2562b=_['merge']({},_0xb2562b,_0x4cc92a[_0xdc5c('0x58')]);return _0x5b4f71[_0xdc5c('0x6e')](_0xb2562b);}})['then'](function(_0xf0da19){if(_0xf0da19){_0x14506f=_0xf0da19[_0xdc5c('0x4a')];if(!_0x4cc92a[_0xdc5c('0x44')]['hasOwnProperty'](_0xdc5c('0x4c'))){_0xb2562b[_0xdc5c('0x2f')]=qs['limit'](_0x4cc92a['query']['limit']);_0xb2562b['offset']=qs[_0xdc5c('0x30')](_0x4cc92a[_0xdc5c('0x44')]['offset']);}return _0x5b4f71[_0xdc5c('0x6e')](_0xb2562b);}})[_0xdc5c('0x21')](function(_0x1e2d7c){if(_0x1e2d7c){return _0x1e2d7c?{'count':_0x14506f,'rows':_0x1e2d7c}:null;}})[_0xdc5c('0x21')](respondWithResult(_0x5f6c7d,null))[_0xdc5c('0x2b')](handleError(_0x5f6c7d,null));};exports[_0xdc5c('0x70')]=function(_0x4da10a,_0x874044,_0x35d41f){var _0x5a28cf=_0x4da10a[_0xdc5c('0x5a')]['ids'];return db[_0xdc5c('0x6f')][_0xdc5c('0x55')]({'where':{'id':_0x5a28cf},'attributes':['id'],'include':[{'model':db['User'],'as':'Agents','attributes':['id',_0xdc5c('0x3b'),_0xdc5c('0x71'),_0xdc5c('0x72'),_0xdc5c('0x73')],'raw':!![]}]})[_0xdc5c('0x21')](function(_0x3a72c1){if(_0x3a72c1){var _0x4ecaa1=_['flatMap'](_0x3a72c1,function(_0x9da69e){var _0x22a8b0=_0x9da69e[_0xdc5c('0x5c')]({'plain':!![]});return _0x22a8b0['Agents'];});return db[_0xdc5c('0x3f')][_0xdc5c('0x5f')]({'where':{'id':_0x4da10a['params']['id']}})[_0xdc5c('0x21')](function(_0x5cf2fb){return db[_0xdc5c('0x74')]['transaction'](function(_0x4afea4){return _0x5cf2fb[_0xdc5c('0x70')](_0x5a28cf,{'transaction':_0x4afea4})[_0xdc5c('0x21')](function(){return BPromise[_0xdc5c('0x75')](_0x4ecaa1,function(_0x28680b){return db[_0xdc5c('0x76')][_0xdc5c('0x77')]({'where':{'UserId':_0x28680b['id'],'ChatQueueId':_0x4da10a[_0xdc5c('0x56')]['id']},'transaction':_0x4afea4});});})[_0xdc5c('0x21')](function(){_0x4ecaa1[_0xdc5c('0x78')](function(_0x5f02fc){socket[_0xdc5c('0x79')]('userChatQueue:save',{'UserId':_0x5f02fc['id'],'ChatQueueId':_0x5cf2fb['id']});});});});});}})['then'](respondWithStatusCode(_0x874044,null))[_0xdc5c('0x2b')](handleError(_0x874044,null));};exports[_0xdc5c('0x7a')]=function(_0x26c5d1,_0x24b22b,_0x2fb62b){return db[_0xdc5c('0x6f')][_0xdc5c('0x55')]({'where':{'id':_0x26c5d1[_0xdc5c('0x44')][_0xdc5c('0x7b')]},'attributes':['id'],'include':[{'model':db[_0xdc5c('0x7c')],'as':_0xdc5c('0x7d'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x24b22b,null))['then'](function(_0x2a21d4){var _0x5450ac=_[_0xdc5c('0x3e')](_0x2a21d4,'id');var _0x3fa753=[];var _0x5bbbfd=[];var _0x3cc8f6=squel[_0xdc5c('0x7e')]();_0x3cc8f6[_0xdc5c('0x7f')]('tq.TeamId')[_0xdc5c('0x80')](_0xdc5c('0x81'),'tq')['join']('user_has_teams','ut','ut.TeamId\x20=\x20tq.TeamId')[_0xdc5c('0x4f')](_0xdc5c('0x82'),_0x26c5d1['params']['id']);for(var _0x5380a6=0x0;_0x5380a6<_0x2a21d4['length'];_0x5380a6+=0x1){let _0x173981=_0x2a21d4[_0x5380a6];for(var _0x3f6e90=0x0;_0x3f6e90<_0x173981[_0xdc5c('0x7d')][_0xdc5c('0x4a')];_0x3f6e90+=0x1){let _0xb77d2d=_0x173981[_0xdc5c('0x7d')][_0x3f6e90];var _0x268c66=_0x3cc8f6[_0xdc5c('0x83')]();_0x268c66[_0xdc5c('0x4f')](_0xdc5c('0x84'),_0xb77d2d['id']);_0x5bbbfd[_0xdc5c('0x85')](db[_0xdc5c('0x74')][_0xdc5c('0x44')](_0x268c66[_0xdc5c('0x86')](),{'type':db[_0xdc5c('0x74')][_0xdc5c('0x87')][_0xdc5c('0x88')]})['then'](function(_0x1d2066){if(_0x1d2066['length']===0x1){return _0xb77d2d['id'];}else{var _0x42ea7e=_['every'](_['map'](_0x1d2066,_0xdc5c('0x89')),function(_0x26d360){return _[_0xdc5c('0x8a')](_0x5450ac,_0x26d360);});if(_0x42ea7e){return _0xb77d2d['id'];}}}));}}return BPromise[_0xdc5c('0x8b')](_0x5bbbfd)[_0xdc5c('0x21')](function(_0x4ac786){_0x3fa753=_(_0x3fa753)[_0xdc5c('0x8c')](_0x4ac786)[_0xdc5c('0x8d')]()[_0xdc5c('0x8e')]();return db[_0xdc5c('0x3f')][_0xdc5c('0x5f')]({'where':{'id':_0x26c5d1[_0xdc5c('0x56')]['id']}})[_0xdc5c('0x21')](function(_0x456906){return db[_0xdc5c('0x74')][_0xdc5c('0x8f')](function(_0x3096e8){return _0x456906['removeTeams'](_0x26c5d1['query'][_0xdc5c('0x7b')],{'transaction':_0x3096e8})[_0xdc5c('0x21')](function(){if(!_[_0xdc5c('0x90')](_0x3fa753)){return _0x456906[_0xdc5c('0x91')](_0x3fa753,{'transaction':_0x3096e8});}})[_0xdc5c('0x21')](function(){_0x3fa753['forEach'](function(_0x3461b5){socket['emit'](_0xdc5c('0x92'),{'UserId':_0x3461b5,'ChatQueueId':_0x456906['id']});});});});});});})[_0xdc5c('0x21')](respondWithStatusCode(_0x24b22b,null))[_0xdc5c('0x2b')](handleError(_0x24b22b,null));};exports['addAgents']=function(_0x574280,_0x41d498,_0x586181){return db['ChatQueue']['find']({'where':{'id':_0x574280[_0xdc5c('0x56')]['id']}})['then'](handleEntityNotFound(_0x41d498,null))[_0xdc5c('0x21')](function(_0xe4556e){if(_0xe4556e){return _0xe4556e[_0xdc5c('0x93')](_0x574280['body'][_0xdc5c('0x7b')],_[_0xdc5c('0x94')](_0x574280['body'],[_0xdc5c('0x7b'),'id'])||{})[_0xdc5c('0x95')](function(_0x3bcfad){for(var _0x22f562=0x0;_0x22f562<_0x574280[_0xdc5c('0x5a')][_0xdc5c('0x7b')][_0xdc5c('0x4a')];_0x22f562+=0x1){socket[_0xdc5c('0x79')](_0xdc5c('0x96'),{'UserId':Number(_0x574280[_0xdc5c('0x5a')][_0xdc5c('0x7b')][_0x22f562]),'ChatQueueId':Number(_0x574280['params']['id'])});}return _0x3bcfad;});}})[_0xdc5c('0x21')](respondWithResult(_0x41d498,null))[_0xdc5c('0x2b')](handleError(_0x41d498,null));};exports['removeAgents']=function(_0x428296,_0x148c25,_0x563cae){return db[_0xdc5c('0x3f')][_0xdc5c('0x5f')]({'where':{'id':_0x428296[_0xdc5c('0x56')]['id']}})[_0xdc5c('0x21')](handleEntityNotFound(_0x148c25,null))[_0xdc5c('0x21')](function(_0x55ee08){if(_0x55ee08){return _0x55ee08[_0xdc5c('0x91')](_0x428296[_0xdc5c('0x44')][_0xdc5c('0x7b')])[_0xdc5c('0x21')](function(){if(_[_0xdc5c('0x97')](_0x428296[_0xdc5c('0x44')][_0xdc5c('0x7b')])){for(var _0x5b3e97=0x0;_0x5b3e97<_0x428296[_0xdc5c('0x44')][_0xdc5c('0x7b')][_0xdc5c('0x4a')];_0x5b3e97+=0x1){socket[_0xdc5c('0x79')](_0xdc5c('0x92'),{'UserId':Number(_0x428296[_0xdc5c('0x44')][_0xdc5c('0x7b')][_0x5b3e97]),'ChatQueueId':Number(_0x428296[_0xdc5c('0x56')]['id'])});}}else{socket['emit'](_0xdc5c('0x92'),{'UserId':Number(_0x428296[_0xdc5c('0x44')][_0xdc5c('0x7b')]),'ChatQueueId':Number(_0x428296[_0xdc5c('0x56')]['id'])});}});}})[_0xdc5c('0x21')](respondWithStatusCode(_0x148c25,null))['catch'](handleError(_0x148c25,null));};exports[_0xdc5c('0x98')]=function(_0x209b63,_0x2421f3,_0x44ae01){var _0x275d6a={};var _0x1c8c8b={};var _0x10d611;var _0x2786d9;return db['ChatQueue']['findOne']({'where':{'id':_0x209b63[_0xdc5c('0x56')]['id']}})[_0xdc5c('0x21')](handleEntityNotFound(_0x2421f3,null))[_0xdc5c('0x21')](function(_0x98b1f){if(_0x98b1f){_0x10d611=_0x98b1f;_0x1c8c8b[_0xdc5c('0x43')]=_[_0xdc5c('0x45')](db[_0xdc5c('0x7c')][_0xdc5c('0x40')]);_0x1c8c8b[_0xdc5c('0x44')]=_[_0xdc5c('0x45')](_0x209b63['query']);_0x1c8c8b[_0xdc5c('0x46')]=_['intersection'](_0x1c8c8b['model'],_0x1c8c8b['query']);_0x275d6a[_0xdc5c('0x47')]=_[_0xdc5c('0x48')](_0x1c8c8b[_0xdc5c('0x43')],qs[_0xdc5c('0x49')](_0x209b63['query']['fields']));_0x275d6a[_0xdc5c('0x47')]=_0x275d6a['attributes'][_0xdc5c('0x4a')]?_0x275d6a[_0xdc5c('0x47')]:_0x1c8c8b[_0xdc5c('0x43')];_0x275d6a[_0xdc5c('0x4d')]=qs[_0xdc5c('0x4e')](_0x209b63[_0xdc5c('0x44')]['sort']);_0x275d6a[_0xdc5c('0x4f')]=qs[_0xdc5c('0x46')](_['pick'](_0x209b63[_0xdc5c('0x44')],_0x1c8c8b[_0xdc5c('0x46')]));if(_0x209b63[_0xdc5c('0x44')][_0xdc5c('0x51')]){_0x275d6a[_0xdc5c('0x4f')]=_[_0xdc5c('0x52')](_0x275d6a[_0xdc5c('0x4f')],{'$or':_[_0xdc5c('0x3e')](_0x275d6a['attributes'],function(_0x5060f6){var _0x3a3b4c={};_0x3a3b4c[_0x5060f6]={'$like':'%'+_0x209b63[_0xdc5c('0x44')][_0xdc5c('0x51')]+'%'};return _0x3a3b4c;})});}_0x275d6a=_['merge']({},_0x275d6a,_0x209b63[_0xdc5c('0x58')]);return _0x10d611['getAgents'](_0x275d6a);}})['then'](function(_0x333415){if(_0x333415){_0x2786d9=_0x333415['length'];if(!_0x209b63['query'][_0xdc5c('0x4b')](_0xdc5c('0x4c'))){_0x275d6a[_0xdc5c('0x2f')]=qs[_0xdc5c('0x2f')](_0x209b63[_0xdc5c('0x44')]['limit']);_0x275d6a['offset']=qs[_0xdc5c('0x30')](_0x209b63[_0xdc5c('0x44')][_0xdc5c('0x30')]);}return _0x10d611[_0xdc5c('0x98')](_0x275d6a);}})[_0xdc5c('0x21')](function(_0x3c0ece){if(_0x3c0ece){return _0x3c0ece?{'count':_0x2786d9,'rows':_0x3c0ece}:null;}})[_0xdc5c('0x21')](respondWithResult(_0x2421f3,null))[_0xdc5c('0x2b')](handleError(_0x2421f3,null));};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.events.js b/server/api/chatQueue/chatQueue.events.js
index 287d33c..2c50d71 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 _0xd1b3=['hasOwnProperty','exports','events','../../mysqldb','save','remove','emit'];(function(_0x4f4ab3,_0x4a8171){var _0x2852e0=function(_0x598141){while(--_0x598141){_0x4f4ab3['push'](_0x4f4ab3['shift']());}};_0x2852e0(++_0x4a8171);}(_0xd1b3,0x95));var _0x3d1b=function(_0x70f16e,_0xdb33ed){_0x70f16e=_0x70f16e-0x0;var _0x352cea=_0xd1b3[_0x70f16e];return _0x352cea;};'use strict';var EventEmitter=require(_0x3d1b('0x0'));var ChatQueue=require(_0x3d1b('0x1'))['db']['ChatQueue'];var ChatQueueEvents=new EventEmitter();ChatQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x3d1b('0x2'),'afterUpdate':'update','afterDestroy':_0x3d1b('0x3')};function emitEvent(_0x427299){return function(_0x5baecc,_0x3f2cd4,_0x409d4b){ChatQueueEvents[_0x3d1b('0x4')](_0x427299+':'+_0x5baecc['id'],_0x5baecc);ChatQueueEvents[_0x3d1b('0x4')](_0x427299,_0x5baecc);_0x409d4b(null);};}for(var e in events){if(events[_0x3d1b('0x5')](e)){var event=events[e];ChatQueue['hook'](e,emitEvent(event));}}module[_0x3d1b('0x6')]=ChatQueueEvents;
\ No newline at end of file
+var _0x2229=['events','../../mysqldb','save','remove','emit'];(function(_0x334473,_0x22608a){var _0xda025d=function(_0x38881f){while(--_0x38881f){_0x334473['push'](_0x334473['shift']());}};_0xda025d(++_0x22608a);}(_0x2229,0x163));var _0x9222=function(_0x4bb32f,_0x2217e){_0x4bb32f=_0x4bb32f-0x0;var _0x2dd6e6=_0x2229[_0x4bb32f];return _0x2dd6e6;};'use strict';var EventEmitter=require(_0x9222('0x0'));var ChatQueue=require(_0x9222('0x1'))['db']['ChatQueue'];var ChatQueueEvents=new EventEmitter();ChatQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x9222('0x2'),'afterUpdate':'update','afterDestroy':_0x9222('0x3')};function emitEvent(_0x20e18b){return function(_0x1c6b7c,_0x3a7953,_0x242651){ChatQueueEvents[_0x9222('0x4')](_0x20e18b+':'+_0x1c6b7c['id'],_0x1c6b7c);ChatQueueEvents[_0x9222('0x4')](_0x20e18b,_0x1c6b7c);_0x242651(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatQueue['hook'](e,emitEvent(event));}}module['exports']=ChatQueueEvents;
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.model.js b/server/api/chatQueue/chatQueue.model.js
index 9d2a360..97cf35c 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 _0x8258=['ChatQueue','chat_queues','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./chatQueue.attributes','exports','define'];(function(_0xc97e0,_0x5eb956){var _0x20ea86=function(_0x54e105){while(--_0x54e105){_0xc97e0['push'](_0xc97e0['shift']());}};_0x20ea86(++_0x5eb956);}(_0x8258,0x10c));var _0x8825=function(_0x41816b,_0x2ccd04){_0x41816b=_0x41816b-0x0;var _0x5537c2=_0x8258[_0x41816b];return _0x5537c2;};'use strict';var _=require(_0x8825('0x0'));var util=require(_0x8825('0x1'));var logger=require(_0x8825('0x2'))(_0x8825('0x3'));var moment=require(_0x8825('0x4'));var BPromise=require(_0x8825('0x5'));var rp=require(_0x8825('0x6'));var fs=require('fs');var path=require(_0x8825('0x7'));var rimraf=require(_0x8825('0x8'));var config=require('../../config/environment');var attributes=require(_0x8825('0x9'));module[_0x8825('0xa')]=function(_0xf8f6d3,_0x312d44){return _0xf8f6d3[_0x8825('0xb')](_0x8825('0xc'),attributes,{'tableName':_0x8825('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x916a=['ChatQueue','chat_queues','lodash','api','moment','request-promise','path','rimraf','./chatQueue.attributes','exports','define'];(function(_0xe8a22f,_0x254b5f){var _0x30e638=function(_0x55a446){while(--_0x55a446){_0xe8a22f['push'](_0xe8a22f['shift']());}};_0x30e638(++_0x254b5f);}(_0x916a,0x16d));var _0xa916=function(_0x1dd532,_0x36e81c){_0x1dd532=_0x1dd532-0x0;var _0x3732aa=_0x916a[_0x1dd532];return _0x3732aa;};'use strict';var _=require(_0xa916('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xa916('0x1'));var moment=require(_0xa916('0x2'));var BPromise=require('bluebird');var rp=require(_0xa916('0x3'));var fs=require('fs');var path=require(_0xa916('0x4'));var rimraf=require(_0xa916('0x5'));var config=require('../../config/environment');var attributes=require(_0xa916('0x6'));module[_0xa916('0x7')]=function(_0x45d6a3,_0x374e78){return _0x45d6a3[_0xa916('0x8')](_0xa916('0x9'),attributes,{'tableName':_0xa916('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 e40fcc9..e45286d 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 _0xb0ca=['info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ChatQueue','findAll','options','where','limit','include','model','attributes','map','GetChatQueue','ShowChatQueue','find','raw','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register','then'];(function(_0x62c958,_0x2bfdbc){var _0x57ec61=function(_0x5c0094){while(--_0x5c0094){_0x62c958['push'](_0x62c958['shift']());}};_0x57ec61(++_0x2bfdbc);}(_0xb0ca,0x1b2));var _0xab0c=function(_0xd0809d,_0x434817){_0xd0809d=_0xd0809d-0x0;var _0x2c8946=_0xb0ca[_0xd0809d];return _0x2c8946;};'use strict';var _=require('lodash');var util=require(_0xab0c('0x0'));var moment=require('moment');var BPromise=require(_0xab0c('0x1'));var rs=require(_0xab0c('0x2'));var fs=require('fs');var Redis=require(_0xab0c('0x3'));var db=require(_0xab0c('0x4'))['db'];var utils=require(_0xab0c('0x5'));var logger=require(_0xab0c('0x6'))(_0xab0c('0x7'));var config=require('../../config/environment');var jayson=require(_0xab0c('0x8'));var client=jayson[_0xab0c('0x9')][_0xab0c('0xa')]({'port':0x232a});config[_0xab0c('0xb')]=_[_0xab0c('0xc')](config[_0xab0c('0xb')],{'host':_0xab0c('0xd'),'port':0x18eb});var socket=require(_0xab0c('0xe'))(new Redis(config[_0xab0c('0xb')]));require('./chatQueue.socket')[_0xab0c('0xf')](socket);function respondWithRpcPromise(_0x15db71,_0x52df38,_0xb79b41){return new BPromise(function(_0x17bff7,_0x11a4ae){return client['request'](_0x15db71,_0xb79b41)[_0xab0c('0x10')](function(_0x53a944){logger[_0xab0c('0x11')](_0xab0c('0x12'),_0x52df38,_0xab0c('0x13'));logger[_0xab0c('0x14')](_0xab0c('0x15'),_0x52df38,_0xab0c('0x13'),JSON[_0xab0c('0x16')](_0x53a944));if(_0x53a944[_0xab0c('0x17')]){if(_0x53a944[_0xab0c('0x17')][_0xab0c('0x18')]===0x1f4){logger['error']('ChatQueue,\x20%s,\x20%s',_0x52df38,_0x53a944[_0xab0c('0x17')][_0xab0c('0x19')]);return _0x11a4ae(_0x53a944[_0xab0c('0x17')][_0xab0c('0x19')]);}logger[_0xab0c('0x17')](_0xab0c('0x12'),_0x52df38,_0x53a944[_0xab0c('0x17')][_0xab0c('0x19')]);return _0x17bff7(_0x53a944[_0xab0c('0x17')][_0xab0c('0x19')]);}else{logger[_0xab0c('0x11')](_0xab0c('0x12'),_0x52df38,_0xab0c('0x13'));_0x17bff7(_0x53a944[_0xab0c('0x1a')][_0xab0c('0x19')]);}})[_0xab0c('0x1b')](function(_0x44c6f4){logger[_0xab0c('0x17')](_0xab0c('0x12'),_0x52df38,_0x44c6f4);_0x11a4ae(_0x44c6f4);});});}exports['GetChatQueue']=function(_0x29b873){var _0x4ad10e=this;return new Promise(function(_0x36794d,_0x870902){return db[_0xab0c('0x1c')][_0xab0c('0x1d')]({'raw':_0x29b873[_0xab0c('0x1e')]?_0x29b873[_0xab0c('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x29b873[_0xab0c('0x1e')]?_0x29b873[_0xab0c('0x1e')][_0xab0c('0x1f')]||null:null,'attributes':_0x29b873['options']?_0x29b873[_0xab0c('0x1e')]['attributes']||null:null,'limit':_0x29b873[_0xab0c('0x1e')]?_0x29b873[_0xab0c('0x1e')][_0xab0c('0x20')]||null:null,'include':_0x29b873['options']?_0x29b873[_0xab0c('0x1e')][_0xab0c('0x21')]?_['map'](_0x29b873[_0xab0c('0x1e')][_0xab0c('0x21')],function(_0xfe7099){return{'model':db[_0xfe7099[_0xab0c('0x22')]],'as':_0xfe7099['as'],'attributes':_0xfe7099[_0xab0c('0x23')],'include':_0xfe7099[_0xab0c('0x21')]?_[_0xab0c('0x24')](_0xfe7099[_0xab0c('0x21')],function(_0x3ce281){return{'model':db[_0x3ce281[_0xab0c('0x22')]],'as':_0x3ce281['as'],'attributes':_0x3ce281[_0xab0c('0x23')],'include':_0x3ce281[_0xab0c('0x21')]?_[_0xab0c('0x24')](_0x3ce281['include'],function(_0x70f07f){return{'model':db[_0x70f07f[_0xab0c('0x22')]],'as':_0x70f07f['as'],'attributes':_0x70f07f[_0xab0c('0x23')]};}):[]};}):[]};}):[]:[]})[_0xab0c('0x10')](function(_0x47a239){logger['info']('GetChatQueue',_0x29b873);logger['debug'](_0xab0c('0x25'),_0x29b873,JSON[_0xab0c('0x16')](_0x47a239));_0x36794d(_0x47a239);})[_0xab0c('0x1b')](function(_0x3e6b6e){logger[_0xab0c('0x17')]('GetChatQueue',_0x3e6b6e['message'],_0x29b873);_0x870902(_0x4ad10e[_0xab0c('0x17')](0x1f4,_0x3e6b6e[_0xab0c('0x19')]));});});};exports[_0xab0c('0x26')]=function(_0xe36cea){var _0x2bccdb=this;return new Promise(function(_0x577c31,_0x582536){return db['ChatQueue'][_0xab0c('0x27')]({'raw':_0xe36cea[_0xab0c('0x1e')]?_0xe36cea[_0xab0c('0x1e')][_0xab0c('0x28')]===undefined?!![]:![]:!![],'where':_0xe36cea[_0xab0c('0x1e')]?_0xe36cea[_0xab0c('0x1e')][_0xab0c('0x1f')]||null:null,'attributes':_0xe36cea[_0xab0c('0x1e')]?_0xe36cea[_0xab0c('0x1e')][_0xab0c('0x23')]||null:null,'include':_0xe36cea[_0xab0c('0x1e')]?_0xe36cea[_0xab0c('0x1e')][_0xab0c('0x21')]?_['map'](_0xe36cea[_0xab0c('0x1e')][_0xab0c('0x21')],function(_0x366ade){return{'model':db[_0x366ade[_0xab0c('0x22')]],'as':_0x366ade['as'],'attributes':_0x366ade[_0xab0c('0x23')],'include':_0x366ade['include']?_['map'](_0x366ade['include'],function(_0x4c5f21){return{'model':db[_0x4c5f21[_0xab0c('0x22')]],'as':_0x4c5f21['as'],'attributes':_0x4c5f21['attributes'],'include':_0x4c5f21['include']?_[_0xab0c('0x24')](_0x4c5f21[_0xab0c('0x21')],function(_0xd1a5fb){return{'model':db[_0xd1a5fb[_0xab0c('0x22')]],'as':_0xd1a5fb['as'],'attributes':_0xd1a5fb['attributes']};}):[]};}):[]};}):[]:[]})[_0xab0c('0x10')](function(_0x16048c){logger[_0xab0c('0x11')](_0xab0c('0x26'),_0xe36cea);logger['debug'](_0xab0c('0x26'),_0xe36cea,JSON[_0xab0c('0x16')](_0x16048c));_0x577c31(_0x16048c);})[_0xab0c('0x1b')](function(_0x2dbd55){logger[_0xab0c('0x17')](_0xab0c('0x26'),_0x2dbd55[_0xab0c('0x19')],_0xe36cea);_0x582536(_0x2bccdb['error'](0x1f4,_0x2dbd55[_0xab0c('0x19')]));});});};
\ No newline at end of file
+var _0x9a43=['then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','GetChatQueue','ChatQueue','options','raw','where','limit','include','map','model','attributes','debug','catch','ShowChatQueue','util','moment','bluebird','randomstring','ioredis','rpc','../../config/environment','jayson/promise','http','redis','localhost','socket.io-emitter','./chatQueue.socket','register'];(function(_0x2af1e8,_0x54df0a){var _0x2a9cfa=function(_0x37fce5){while(--_0x37fce5){_0x2af1e8['push'](_0x2af1e8['shift']());}};_0x2a9cfa(++_0x54df0a);}(_0x9a43,0x15a));var _0x39a4=function(_0xaf25ae,_0x2001c1){_0xaf25ae=_0xaf25ae-0x0;var _0x49732d=_0x9a43[_0xaf25ae];return _0x49732d;};'use strict';var _=require('lodash');var util=require(_0x39a4('0x0'));var moment=require(_0x39a4('0x1'));var BPromise=require(_0x39a4('0x2'));var rs=require(_0x39a4('0x3'));var fs=require('fs');var Redis=require(_0x39a4('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x39a4('0x5'));var config=require(_0x39a4('0x6'));var jayson=require(_0x39a4('0x7'));var client=jayson['client'][_0x39a4('0x8')]({'port':0x232a});config[_0x39a4('0x9')]=_['defaults'](config[_0x39a4('0x9')],{'host':_0x39a4('0xa'),'port':0x18eb});var socket=require(_0x39a4('0xb'))(new Redis(config[_0x39a4('0x9')]));require(_0x39a4('0xc'))[_0x39a4('0xd')](socket);function respondWithRpcPromise(_0x3b3dfa,_0xb133de,_0x1cf357){return new BPromise(function(_0x507804,_0x37a2cb){return client['request'](_0x3b3dfa,_0x1cf357)[_0x39a4('0xe')](function(_0x597777){logger[_0x39a4('0xf')](_0x39a4('0x10'),_0xb133de,_0x39a4('0x11'));logger['debug'](_0x39a4('0x12'),_0xb133de,'request\x20sent',JSON[_0x39a4('0x13')](_0x597777));if(_0x597777[_0x39a4('0x14')]){if(_0x597777[_0x39a4('0x14')][_0x39a4('0x15')]===0x1f4){logger[_0x39a4('0x14')](_0x39a4('0x10'),_0xb133de,_0x597777[_0x39a4('0x14')]['message']);return _0x37a2cb(_0x597777[_0x39a4('0x14')]['message']);}logger[_0x39a4('0x14')](_0x39a4('0x10'),_0xb133de,_0x597777[_0x39a4('0x14')]['message']);return _0x507804(_0x597777[_0x39a4('0x14')][_0x39a4('0x16')]);}else{logger[_0x39a4('0xf')](_0x39a4('0x10'),_0xb133de,'request\x20sent');_0x507804(_0x597777['result'][_0x39a4('0x16')]);}})['catch'](function(_0x5d86db){logger[_0x39a4('0x14')](_0x39a4('0x10'),_0xb133de,_0x5d86db);_0x37a2cb(_0x5d86db);});});}exports[_0x39a4('0x17')]=function(_0x3c5b43){var _0x46ee2d=this;return new Promise(function(_0x160e9f,_0x285975){return db[_0x39a4('0x18')]['findAll']({'raw':_0x3c5b43[_0x39a4('0x19')]?_0x3c5b43[_0x39a4('0x19')][_0x39a4('0x1a')]===undefined?!![]:![]:!![],'where':_0x3c5b43[_0x39a4('0x19')]?_0x3c5b43[_0x39a4('0x19')][_0x39a4('0x1b')]||null:null,'attributes':_0x3c5b43[_0x39a4('0x19')]?_0x3c5b43[_0x39a4('0x19')]['attributes']||null:null,'limit':_0x3c5b43['options']?_0x3c5b43[_0x39a4('0x19')][_0x39a4('0x1c')]||null:null,'include':_0x3c5b43['options']?_0x3c5b43['options'][_0x39a4('0x1d')]?_[_0x39a4('0x1e')](_0x3c5b43['options'][_0x39a4('0x1d')],function(_0xbe757c){return{'model':db[_0xbe757c[_0x39a4('0x1f')]],'as':_0xbe757c['as'],'attributes':_0xbe757c['attributes'],'include':_0xbe757c[_0x39a4('0x1d')]?_['map'](_0xbe757c[_0x39a4('0x1d')],function(_0x5785b4){return{'model':db[_0x5785b4[_0x39a4('0x1f')]],'as':_0x5785b4['as'],'attributes':_0x5785b4[_0x39a4('0x20')],'include':_0x5785b4[_0x39a4('0x1d')]?_['map'](_0x5785b4[_0x39a4('0x1d')],function(_0x142dac){return{'model':db[_0x142dac[_0x39a4('0x1f')]],'as':_0x142dac['as'],'attributes':_0x142dac[_0x39a4('0x20')]};}):[]};}):[]};}):[]:[]})[_0x39a4('0xe')](function(_0x5d1eba){logger[_0x39a4('0xf')](_0x39a4('0x17'),_0x3c5b43);logger[_0x39a4('0x21')](_0x39a4('0x17'),_0x3c5b43,JSON[_0x39a4('0x13')](_0x5d1eba));_0x160e9f(_0x5d1eba);})[_0x39a4('0x22')](function(_0x53d500){logger[_0x39a4('0x14')](_0x39a4('0x17'),_0x53d500[_0x39a4('0x16')],_0x3c5b43);_0x285975(_0x46ee2d['error'](0x1f4,_0x53d500[_0x39a4('0x16')]));});});};exports[_0x39a4('0x23')]=function(_0x218646){var _0x25c9e0=this;return new Promise(function(_0x2d32d5,_0x3a1831){return db[_0x39a4('0x18')]['find']({'raw':_0x218646[_0x39a4('0x19')]?_0x218646[_0x39a4('0x19')][_0x39a4('0x1a')]===undefined?!![]:![]:!![],'where':_0x218646[_0x39a4('0x19')]?_0x218646['options'][_0x39a4('0x1b')]||null:null,'attributes':_0x218646[_0x39a4('0x19')]?_0x218646['options']['attributes']||null:null,'include':_0x218646[_0x39a4('0x19')]?_0x218646[_0x39a4('0x19')][_0x39a4('0x1d')]?_[_0x39a4('0x1e')](_0x218646['options'][_0x39a4('0x1d')],function(_0x1af1a1){return{'model':db[_0x1af1a1[_0x39a4('0x1f')]],'as':_0x1af1a1['as'],'attributes':_0x1af1a1[_0x39a4('0x20')],'include':_0x1af1a1['include']?_[_0x39a4('0x1e')](_0x1af1a1[_0x39a4('0x1d')],function(_0x4486dc){return{'model':db[_0x4486dc['model']],'as':_0x4486dc['as'],'attributes':_0x4486dc[_0x39a4('0x20')],'include':_0x4486dc[_0x39a4('0x1d')]?_[_0x39a4('0x1e')](_0x4486dc[_0x39a4('0x1d')],function(_0x4cb60a){return{'model':db[_0x4cb60a[_0x39a4('0x1f')]],'as':_0x4cb60a['as'],'attributes':_0x4cb60a[_0x39a4('0x20')]};}):[]};}):[]};}):[]:[]})[_0x39a4('0xe')](function(_0x85fae7){logger[_0x39a4('0xf')](_0x39a4('0x23'),_0x218646);logger[_0x39a4('0x21')](_0x39a4('0x23'),_0x218646,JSON[_0x39a4('0x13')](_0x85fae7));_0x2d32d5(_0x85fae7);})[_0x39a4('0x22')](function(_0x289240){logger['error'](_0x39a4('0x23'),_0x289240[_0x39a4('0x16')],_0x218646);_0x3a1831(_0x25c9e0['error'](0x1f4,_0x289240['message']));});});};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.socket.js b/server/api/chatQueue/chatQueue.socket.js
index 678432a..94a797c 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 _0x55ca=['removeListener','register','./chatQueue.events','save'];(function(_0x122096,_0x60c295){var _0x3d1966=function(_0x3d569e){while(--_0x3d569e){_0x122096['push'](_0x122096['shift']());}};_0x3d1966(++_0x60c295);}(_0x55ca,0x126));var _0xa55c=function(_0x3b4585,_0x16a9c2){_0x3b4585=_0x3b4585-0x0;var _0x551be9=_0x55ca[_0x3b4585];return _0x551be9;};'use strict';var ChatQueueEvents=require(_0xa55c('0x0'));var events=[_0xa55c('0x1'),'remove','update'];function createListener(_0x49875a,_0x1c6ec3){return function(_0x267ea0){_0x1c6ec3['emit'](_0x49875a,_0x267ea0);};}function removeListener(_0x3b478a,_0x2db02a){return function(){ChatQueueEvents[_0xa55c('0x2')](_0x3b478a,_0x2db02a);};}exports[_0xa55c('0x3')]=function(_0x3c97c8){for(var _0x279caa=0x0,_0x36b623=events['length'];_0x279caa<_0x36b623;_0x279caa++){var _0x2121fd=events[_0x279caa];var _0x2537f0=createListener('chatQueue:'+_0x2121fd,_0x3c97c8);ChatQueueEvents['on'](_0x2121fd,_0x2537f0);}};
\ No newline at end of file
+var _0xb458=['length','./chatQueue.events','save','remove','emit','removeListener'];(function(_0x1df83c,_0x4c0bc4){var _0x33f860=function(_0x270c6c){while(--_0x270c6c){_0x1df83c['push'](_0x1df83c['shift']());}};_0x33f860(++_0x4c0bc4);}(_0xb458,0x103));var _0x8b45=function(_0x1a3d50,_0x465249){_0x1a3d50=_0x1a3d50-0x0;var _0x135178=_0xb458[_0x1a3d50];return _0x135178;};'use strict';var ChatQueueEvents=require(_0x8b45('0x0'));var events=[_0x8b45('0x1'),_0x8b45('0x2'),'update'];function createListener(_0x58a508,_0xdf89d4){return function(_0x93d9cd){_0xdf89d4[_0x8b45('0x3')](_0x58a508,_0x93d9cd);};}function removeListener(_0x13a8c6,_0x5d51e4){return function(){ChatQueueEvents[_0x8b45('0x4')](_0x13a8c6,_0x5d51e4);};}exports['register']=function(_0x5cc2d5){for(var _0xe8d774=0x0,_0x12bd05=events[_0x8b45('0x5')];_0xe8d774<_0x12bd05;_0xe8d774++){var _0x3a8ccb=events[_0xe8d774];var _0x32342f=createListener('chatQueue:'+_0x3a8ccb,_0x5cc2d5);ChatQueueEvents['on'](_0x3a8ccb,_0x32342f);}};
\ No newline at end of file
diff --git a/server/api/chatQueue/index.js b/server/api/chatQueue/index.js
index f13ca1f..f394b4a 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 _0x9957=['connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./chatQueue.controller','get','isAuthenticated','index','/describe','describe','show','/:id/members','getMembers','getTeams','/:id/users','getAgents','post','create','addTeams','addAgents','put','/:id','delete','destroy','/:id/teams','removeTeams','multer','util','path'];(function(_0x510dcb,_0x309067){var _0x4e135d=function(_0x5385f4){while(--_0x5385f4){_0x510dcb['push'](_0x510dcb['shift']());}};_0x4e135d(++_0x309067);}(_0x9957,0x93));var _0x7995=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0x9957[_0x5ddb1c];return _0x354adc;};'use strict';var multer=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var path=require(_0x7995('0x2'));var timeout=require(_0x7995('0x3'));var express=require('express');var router=express[_0x7995('0x4')]();var fs_extra=require(_0x7995('0x5'));var auth=require(_0x7995('0x6'));var interaction=require(_0x7995('0x7'));var config=require('../../config/environment');var controller=require(_0x7995('0x8'));router[_0x7995('0x9')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0xb')]);router[_0x7995('0x9')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0xd')]);router[_0x7995('0x9')]('/:id',auth[_0x7995('0xa')](),controller[_0x7995('0xe')]);router[_0x7995('0x9')](_0x7995('0xf'),auth[_0x7995('0xa')](),controller[_0x7995('0x10')]);router[_0x7995('0x9')]('/:id/teams',auth[_0x7995('0xa')](),controller[_0x7995('0x11')]);router['get'](_0x7995('0x12'),auth[_0x7995('0xa')](),controller[_0x7995('0x13')]);router[_0x7995('0x14')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0x15')]);router[_0x7995('0x14')]('/:id/teams',auth['isAuthenticated'](),controller[_0x7995('0x16')]);router[_0x7995('0x14')](_0x7995('0x12'),auth[_0x7995('0xa')](),controller[_0x7995('0x17')]);router[_0x7995('0x18')](_0x7995('0x19'),auth[_0x7995('0xa')](),controller['update']);router[_0x7995('0x1a')]('/:id',auth[_0x7995('0xa')](),controller[_0x7995('0x1b')]);router[_0x7995('0x1a')](_0x7995('0x1c'),auth[_0x7995('0xa')](),controller[_0x7995('0x1d')]);router['delete']('/:id/users',auth[_0x7995('0xa')](),controller['removeAgents']);module['exports']=router;
\ No newline at end of file
+var _0x008c=['../../config/environment','./chatQueue.controller','get','isAuthenticated','index','show','/:id/teams','getTeams','/:id/users','getAgents','post','addTeams','addAgents','update','delete','/:id','removeTeams','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x3b2a4f,_0xb2c811){var _0x439bd8=function(_0xea9a05){while(--_0xea9a05){_0x3b2a4f['push'](_0x3b2a4f['shift']());}};_0x439bd8(++_0xb2c811);}(_0x008c,0x188));var _0xc008=function(_0x191ff0,_0x50515a){_0x191ff0=_0x191ff0-0x0;var _0x1003ac=_0x008c[_0x191ff0];return _0x1003ac;};'use strict';var multer=require(_0xc008('0x0'));var util=require(_0xc008('0x1'));var path=require(_0xc008('0x2'));var timeout=require(_0xc008('0x3'));var express=require(_0xc008('0x4'));var router=express['Router']();var fs_extra=require(_0xc008('0x5'));var auth=require(_0xc008('0x6'));var interaction=require(_0xc008('0x7'));var config=require(_0xc008('0x8'));var controller=require(_0xc008('0x9'));router[_0xc008('0xa')]('/',auth[_0xc008('0xb')](),controller[_0xc008('0xc')]);router[_0xc008('0xa')]('/describe',auth[_0xc008('0xb')](),controller['describe']);router[_0xc008('0xa')]('/:id',auth['isAuthenticated'](),controller[_0xc008('0xd')]);router[_0xc008('0xa')]('/:id/members',auth['isAuthenticated'](),controller['getMembers']);router[_0xc008('0xa')](_0xc008('0xe'),auth['isAuthenticated'](),controller[_0xc008('0xf')]);router[_0xc008('0xa')](_0xc008('0x10'),auth[_0xc008('0xb')](),controller[_0xc008('0x11')]);router[_0xc008('0x12')]('/',auth[_0xc008('0xb')](),controller['create']);router['post'](_0xc008('0xe'),auth['isAuthenticated'](),controller[_0xc008('0x13')]);router[_0xc008('0x12')](_0xc008('0x10'),auth[_0xc008('0xb')](),controller[_0xc008('0x14')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0xc008('0x15')]);router[_0xc008('0x16')](_0xc008('0x17'),auth[_0xc008('0xb')](),controller['destroy']);router['delete']('/:id/teams',auth['isAuthenticated'](),controller[_0xc008('0x18')]);router[_0xc008('0x16')]('/:id/users',auth[_0xc008('0xb')](),controller['removeAgents']);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.attributes.js b/server/api/chatQueueReport/chatQueueReport.attributes.js
index fe3e999..a7216d2 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 _0x3de2=['DATE','moment','exports','STRING'];(function(_0x2bda14,_0x4fab1b){var _0xb5dd49=function(_0x1da71e){while(--_0x1da71e){_0x2bda14['push'](_0x2bda14['shift']());}};_0xb5dd49(++_0x4fab1b);}(_0x3de2,0x79));var _0x23de=function(_0x16b9ed,_0x56517a){_0x16b9ed=_0x16b9ed-0x0;var _0x66b1f8=_0x3de2[_0x16b9ed];return _0x66b1f8;};'use strict';var moment=require(_0x23de('0x0'));var Sequelize=require('sequelize');module[_0x23de('0x1')]={'uniqueid':{'type':Sequelize[_0x23de('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0x23de('0x2')]},'joinAt':{'type':Sequelize[_0x23de('0x3')]},'leaveAt':{'type':Sequelize['DATE']},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x23de('0x3')]},'reason':{'type':Sequelize[_0x23de('0x2')]}};
\ No newline at end of file
+var _0xbdf3=['DATE','moment','sequelize','exports','STRING'];(function(_0x44f7c2,_0x205105){var _0x18aadf=function(_0x4812d8){while(--_0x4812d8){_0x44f7c2['push'](_0x44f7c2['shift']());}};_0x18aadf(++_0x205105);}(_0xbdf3,0x155));var _0x3bdf=function(_0x3c6b7d,_0x5f0d90){_0x3c6b7d=_0x3c6b7d-0x0;var _0x1d3ed2=_0xbdf3[_0x3c6b7d];return _0x1d3ed2;};'use strict';var moment=require(_0x3bdf('0x0'));var Sequelize=require(_0x3bdf('0x1'));module[_0x3bdf('0x2')]={'uniqueid':{'type':Sequelize[_0x3bdf('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0x3bdf('0x3')]},'joinAt':{'type':Sequelize[_0x3bdf('0x4')]},'leaveAt':{'type':Sequelize[_0x3bdf('0x4')]},'acceptAt':{'type':Sequelize[_0x3bdf('0x4')]},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize[_0x3bdf('0x3')]}};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.controller.js b/server/api/chatQueueReport/chatQueueReport.controller.js
index 382c480..0a1018c 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 _0x9120=['querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','count','offset','set','Content-Range','apply','save','update','then','destroy','error','stack','name','index','map','ChatQueueReport','rawAttributes','type','key','model','query','filters','intersection','attributes','fields','nolimit','limit','sort','where','pick','VIRTUAL','filter','options','includeAll','include','findAll','catch','show','params','keys','length','merge','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','jsforce','desk.js'];(function(_0x4b055c,_0x4b870b){var _0x4b62bb=function(_0x4884c2){while(--_0x4884c2){_0x4b055c['push'](_0x4b055c['shift']());}};_0x4b62bb(++_0x4b870b);}(_0x9120,0x1b3));var _0x0912=function(_0x1eae7f,_0xbae8fa){_0x1eae7f=_0x1eae7f-0x0;var _0x453d75=_0x9120[_0x1eae7f];return _0x453d75;};'use strict';var emlformat=require(_0x0912('0x0'));var rimraf=require(_0x0912('0x1'));var zipdir=require(_0x0912('0x2'));var jsonpatch=require(_0x0912('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x0912('0x4'));var Mustache=require(_0x0912('0x5'));var util=require(_0x0912('0x6'));var path=require(_0x0912('0x7'));var sox=require(_0x0912('0x8'));var csv=require(_0x0912('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0912('0xa'));var _=require(_0x0912('0xb'));var squel=require(_0x0912('0xc'));var crypto=require('crypto');var jsforce=require(_0x0912('0xd'));var deskjs=require(_0x0912('0xe'));var toCsv=require(_0x0912('0x9'));var querystring=require(_0x0912('0xf'));var Papa=require(_0x0912('0x10'));var Redis=require('ioredis');var authService=require(_0x0912('0x11'));var qs=require(_0x0912('0x12'));var as=require(_0x0912('0x13'));var hardwareService=require(_0x0912('0x14'));var logger=require('../../config/logger')(_0x0912('0x15'));var utils=require('../../config/utils');var config=require(_0x0912('0x16'));var licenseUtil=require(_0x0912('0x17'));var db=require(_0x0912('0x18'))['db'];function respondWithStatusCode(_0xc7af62,_0x22752b){_0x22752b=_0x22752b||0xcc;return function(_0x10faac){if(_0x10faac){return _0xc7af62[_0x0912('0x19')](_0x22752b);}return _0xc7af62[_0x0912('0x1a')](_0x22752b)[_0x0912('0x1b')]();};}function respondWithResult(_0x102468,_0x17f22d){_0x17f22d=_0x17f22d||0xc8;return function(_0x350d6b){if(_0x350d6b){return _0x102468[_0x0912('0x1a')](_0x17f22d)[_0x0912('0x1c')](_0x350d6b);}};}function respondWithFilteredResult(_0x247612,_0x5eb1c9){return function(_0x4d00fd){if(_0x4d00fd){var _0x1ed3e8=typeof _0x5eb1c9['offset']===_0x0912('0x1d')&&typeof _0x5eb1c9['limit']===_0x0912('0x1d');var _0x49b581=_0x4d00fd[_0x0912('0x1e')];var _0x5eace1=_0x1ed3e8?0x0:_0x5eb1c9[_0x0912('0x1f')];var _0x5357db=_0x1ed3e8?_0x4d00fd[_0x0912('0x1e')]:_0x5eb1c9['offset']+_0x5eb1c9['limit'];var _0x3377af;if(_0x5357db>=_0x49b581){_0x5357db=_0x49b581;_0x3377af=0xc8;}else{_0x3377af=0xce;}_0x247612['status'](_0x3377af);return _0x247612[_0x0912('0x20')](_0x0912('0x21'),_0x5eace1+'-'+_0x5357db+'/'+_0x49b581)['json'](_0x4d00fd);}return null;};}function patchUpdates(_0x106008){return function(_0xb1af32){try{jsonpatch[_0x0912('0x22')](_0xb1af32,_0x106008,!![]);}catch(_0x5927d2){return BPromise['reject'](_0x5927d2);}return _0xb1af32[_0x0912('0x23')]();};}function saveUpdates(_0x626428,_0x1f04a1){return function(_0x30b7cc){if(_0x30b7cc){return _0x30b7cc[_0x0912('0x24')](_0x626428)[_0x0912('0x25')](function(_0x6c4902){return _0x6c4902;});}return null;};}function removeEntity(_0x2a3e70,_0xca7f8b){return function(_0x572d12){if(_0x572d12){return _0x572d12[_0x0912('0x26')]()[_0x0912('0x25')](function(){_0x2a3e70[_0x0912('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4a938e,_0x21d65b){return function(_0x53d673){if(!_0x53d673){_0x4a938e['sendStatus'](0x194);}return _0x53d673;};}function handleError(_0x39462e,_0x39e96b){_0x39e96b=_0x39e96b||0x1f4;return function(_0x4d45d2){logger[_0x0912('0x27')](_0x4d45d2[_0x0912('0x28')]);if(_0x4d45d2[_0x0912('0x29')]){delete _0x4d45d2[_0x0912('0x29')];}_0x39462e[_0x0912('0x1a')](_0x39e96b)['send'](_0x4d45d2);};}exports[_0x0912('0x2a')]=function(_0x1d6c87,_0x4ac024){var _0x2b1653={},_0x3428a9={},_0x2ce714={'count':0x0,'rows':[]};var _0x5b3956=_[_0x0912('0x2b')](db[_0x0912('0x2c')][_0x0912('0x2d')],function(_0x176529){return{'name':_0x176529['fieldName'],'type':_0x176529[_0x0912('0x2e')][_0x0912('0x2f')]};});_0x3428a9[_0x0912('0x30')]=_[_0x0912('0x2b')](_0x5b3956,_0x0912('0x29'));_0x3428a9[_0x0912('0x31')]=_['keys'](_0x1d6c87['query']);_0x3428a9[_0x0912('0x32')]=_[_0x0912('0x33')](_0x3428a9['model'],_0x3428a9['query']);_0x2b1653[_0x0912('0x34')]=_[_0x0912('0x33')](_0x3428a9[_0x0912('0x30')],qs[_0x0912('0x35')](_0x1d6c87[_0x0912('0x31')][_0x0912('0x35')]));_0x2b1653[_0x0912('0x34')]=_0x2b1653[_0x0912('0x34')]['length']?_0x2b1653['attributes']:_0x3428a9[_0x0912('0x30')];if(!_0x1d6c87[_0x0912('0x31')]['hasOwnProperty'](_0x0912('0x36'))){_0x2b1653[_0x0912('0x37')]=qs[_0x0912('0x37')](_0x1d6c87[_0x0912('0x31')][_0x0912('0x37')]);_0x2b1653[_0x0912('0x1f')]=qs[_0x0912('0x1f')](_0x1d6c87[_0x0912('0x31')][_0x0912('0x1f')]);}_0x2b1653['order']=qs[_0x0912('0x38')](_0x1d6c87[_0x0912('0x31')][_0x0912('0x38')]);_0x2b1653[_0x0912('0x39')]=qs[_0x0912('0x32')](_[_0x0912('0x3a')](_0x1d6c87[_0x0912('0x31')],_0x3428a9['filters']),_0x5b3956);if(_0x1d6c87[_0x0912('0x31')]['filter']){_0x2b1653['where']=_['merge'](_0x2b1653[_0x0912('0x39')],{'$or':_[_0x0912('0x2b')](_0x5b3956,function(_0x5db5f9){if(_0x5db5f9[_0x0912('0x2e')]!==_0x0912('0x3b')){var _0xfdf81c={};_0xfdf81c[_0x5db5f9['name']]={'$like':'%'+_0x1d6c87[_0x0912('0x31')][_0x0912('0x3c')]+'%'};return _0xfdf81c;}})});}_0x2b1653=_['merge']({},_0x2b1653,_0x1d6c87[_0x0912('0x3d')]);var _0x40de57={'where':_0x2b1653[_0x0912('0x39')]};return db[_0x0912('0x2c')][_0x0912('0x1e')](_0x40de57)[_0x0912('0x25')](function(_0x4eb359){_0x2ce714[_0x0912('0x1e')]=_0x4eb359;if(_0x1d6c87[_0x0912('0x31')][_0x0912('0x3e')]){_0x2b1653[_0x0912('0x3f')]=[{'all':!![]}];}return db['ChatQueueReport'][_0x0912('0x40')](_0x2b1653);})[_0x0912('0x25')](function(_0x10040b){_0x2ce714['rows']=_0x10040b;return _0x2ce714;})[_0x0912('0x25')](respondWithFilteredResult(_0x4ac024,_0x2b1653))[_0x0912('0x41')](handleError(_0x4ac024,null));};exports[_0x0912('0x42')]=function(_0x19839e,_0x1c5158){var _0x320f98={'raw':!![],'where':{'id':_0x19839e[_0x0912('0x43')]['id']}},_0x15e23b={};_0x15e23b['model']=_[_0x0912('0x44')](db['ChatQueueReport'][_0x0912('0x2d')]);_0x15e23b[_0x0912('0x31')]=_[_0x0912('0x44')](_0x19839e[_0x0912('0x31')]);_0x15e23b[_0x0912('0x32')]=_[_0x0912('0x33')](_0x15e23b[_0x0912('0x30')],_0x15e23b[_0x0912('0x31')]);_0x320f98['attributes']=_[_0x0912('0x33')](_0x15e23b[_0x0912('0x30')],qs[_0x0912('0x35')](_0x19839e['query'][_0x0912('0x35')]));_0x320f98[_0x0912('0x34')]=_0x320f98[_0x0912('0x34')][_0x0912('0x45')]?_0x320f98[_0x0912('0x34')]:_0x15e23b[_0x0912('0x30')];if(_0x19839e[_0x0912('0x31')][_0x0912('0x3e')]){_0x320f98[_0x0912('0x3f')]=[{'all':!![]}];}_0x320f98=_[_0x0912('0x46')]({},_0x320f98,_0x19839e[_0x0912('0x3d')]);return db[_0x0912('0x2c')][_0x0912('0x47')](_0x320f98)[_0x0912('0x25')](handleEntityNotFound(_0x1c5158,null))[_0x0912('0x25')](respondWithResult(_0x1c5158,null))[_0x0912('0x41')](handleError(_0x1c5158,null));};exports[_0x0912('0x48')]=function(_0x255ee5,_0x3b0548){return db[_0x0912('0x2c')][_0x0912('0x48')](_0x255ee5[_0x0912('0x49')],{})[_0x0912('0x25')](respondWithResult(_0x3b0548,0xc9))['catch'](handleError(_0x3b0548,null));};exports[_0x0912('0x24')]=function(_0x3b94cc,_0x591c83){if(_0x3b94cc[_0x0912('0x49')]['id']){delete _0x3b94cc[_0x0912('0x49')]['id'];}return db[_0x0912('0x2c')][_0x0912('0x47')]({'where':{'id':_0x3b94cc[_0x0912('0x43')]['id']}})[_0x0912('0x25')](handleEntityNotFound(_0x591c83,null))['then'](saveUpdates(_0x3b94cc[_0x0912('0x49')],null))[_0x0912('0x25')](respondWithResult(_0x591c83,null))[_0x0912('0x41')](handleError(_0x591c83,null));};exports['destroy']=function(_0x11364e,_0x3ce4bf){return db[_0x0912('0x2c')][_0x0912('0x47')]({'where':{'id':_0x11364e[_0x0912('0x43')]['id']}})[_0x0912('0x25')](handleEntityNotFound(_0x3ce4bf,null))[_0x0912('0x25')](removeEntity(_0x3ce4bf,null))[_0x0912('0x41')](handleError(_0x3ce4bf,null));};exports['describe']=function(_0x91bb1a,_0x360313){return db[_0x0912('0x2c')][_0x0912('0x4a')]()[_0x0912('0x25')](respondWithResult(_0x360313,null))['catch'](handleError(_0x360313,null));};
\ No newline at end of file
+var _0x3f96=['rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','save','update','then','destroy','error','stack','name','send','index','map','ChatQueueReport','fieldName','type','key','model','query','keys','filters','attributes','intersection','length','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','findAll','rows','catch','show','rawAttributes','fields','includeAll','create','body','params','find','describe','eml-format'];(function(_0x2fef82,_0x19b8e8){var _0x52b8d5=function(_0x4ee388){while(--_0x4ee388){_0x2fef82['push'](_0x2fef82['shift']());}};_0x52b8d5(++_0x19b8e8);}(_0x3f96,0x1d3));var _0x63f9=function(_0x2b2c75,_0x49bdd1){_0x2b2c75=_0x2b2c75-0x0;var _0x15c1ea=_0x3f96[_0x2b2c75];return _0x15c1ea;};'use strict';var emlformat=require(_0x63f9('0x0'));var rimraf=require(_0x63f9('0x1'));var zipdir=require(_0x63f9('0x2'));var jsonpatch=require(_0x63f9('0x3'));var rp=require(_0x63f9('0x4'));var moment=require('moment');var BPromise=require(_0x63f9('0x5'));var Mustache=require(_0x63f9('0x6'));var util=require(_0x63f9('0x7'));var path=require(_0x63f9('0x8'));var sox=require(_0x63f9('0x9'));var csv=require('to-csv');var ejs=require(_0x63f9('0xa'));var fs=require('fs');var fs_extra=require(_0x63f9('0xb'));var _=require(_0x63f9('0xc'));var squel=require(_0x63f9('0xd'));var crypto=require('crypto');var jsforce=require(_0x63f9('0xe'));var deskjs=require(_0x63f9('0xf'));var toCsv=require(_0x63f9('0x10'));var querystring=require(_0x63f9('0x11'));var Papa=require(_0x63f9('0x12'));var Redis=require(_0x63f9('0x13'));var authService=require(_0x63f9('0x14'));var qs=require(_0x63f9('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x63f9('0x16'));var logger=require(_0x63f9('0x17'))('api');var utils=require(_0x63f9('0x18'));var config=require(_0x63f9('0x19'));var licenseUtil=require(_0x63f9('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x45881b,_0x376780){_0x376780=_0x376780||0xcc;return function(_0x7025cc){if(_0x7025cc){return _0x45881b[_0x63f9('0x1b')](_0x376780);}return _0x45881b[_0x63f9('0x1c')](_0x376780)[_0x63f9('0x1d')]();};}function respondWithResult(_0x31997c,_0x51ec79){_0x51ec79=_0x51ec79||0xc8;return function(_0x19b409){if(_0x19b409){return _0x31997c['status'](_0x51ec79)[_0x63f9('0x1e')](_0x19b409);}};}function respondWithFilteredResult(_0x52be5e,_0x47050b){return function(_0x1fa6dd){if(_0x1fa6dd){var _0x37fc43=typeof _0x47050b[_0x63f9('0x1f')]===_0x63f9('0x20')&&typeof _0x47050b[_0x63f9('0x21')]===_0x63f9('0x20');var _0x5e25ae=_0x1fa6dd[_0x63f9('0x22')];var _0x4475d9=_0x37fc43?0x0:_0x47050b[_0x63f9('0x1f')];var _0x41d3a3=_0x37fc43?_0x1fa6dd[_0x63f9('0x22')]:_0x47050b['offset']+_0x47050b[_0x63f9('0x21')];var _0x30aa4d;if(_0x41d3a3>=_0x5e25ae){_0x41d3a3=_0x5e25ae;_0x30aa4d=0xc8;}else{_0x30aa4d=0xce;}_0x52be5e[_0x63f9('0x1c')](_0x30aa4d);return _0x52be5e['set'](_0x63f9('0x23'),_0x4475d9+'-'+_0x41d3a3+'/'+_0x5e25ae)[_0x63f9('0x1e')](_0x1fa6dd);}return null;};}function patchUpdates(_0x170f4){return function(_0x262b43){try{jsonpatch[_0x63f9('0x24')](_0x262b43,_0x170f4,!![]);}catch(_0x537a11){return BPromise['reject'](_0x537a11);}return _0x262b43[_0x63f9('0x25')]();};}function saveUpdates(_0x3926a2,_0x3c0589){return function(_0x39c2d4){if(_0x39c2d4){return _0x39c2d4[_0x63f9('0x26')](_0x3926a2)[_0x63f9('0x27')](function(_0x3720c9){return _0x3720c9;});}return null;};}function removeEntity(_0x549454,_0x5994c1){return function(_0x33092b){if(_0x33092b){return _0x33092b[_0x63f9('0x28')]()[_0x63f9('0x27')](function(){_0x549454[_0x63f9('0x1c')](0xcc)[_0x63f9('0x1d')]();});}};}function handleEntityNotFound(_0x62c363,_0x3e3c14){return function(_0xbb9716){if(!_0xbb9716){_0x62c363['sendStatus'](0x194);}return _0xbb9716;};}function handleError(_0x4abbf2,_0x5cf43d){_0x5cf43d=_0x5cf43d||0x1f4;return function(_0x1fcb7c){logger[_0x63f9('0x29')](_0x1fcb7c[_0x63f9('0x2a')]);if(_0x1fcb7c['name']){delete _0x1fcb7c[_0x63f9('0x2b')];}_0x4abbf2['status'](_0x5cf43d)[_0x63f9('0x2c')](_0x1fcb7c);};}exports[_0x63f9('0x2d')]=function(_0x25f5f0,_0x51c84b){var _0x1b56bd={},_0x3e6728={},_0x271872={'count':0x0,'rows':[]};var _0x22a82a=_[_0x63f9('0x2e')](db[_0x63f9('0x2f')]['rawAttributes'],function(_0x32f2d5){return{'name':_0x32f2d5[_0x63f9('0x30')],'type':_0x32f2d5[_0x63f9('0x31')][_0x63f9('0x32')]};});_0x3e6728[_0x63f9('0x33')]=_[_0x63f9('0x2e')](_0x22a82a,_0x63f9('0x2b'));_0x3e6728[_0x63f9('0x34')]=_[_0x63f9('0x35')](_0x25f5f0['query']);_0x3e6728[_0x63f9('0x36')]=_['intersection'](_0x3e6728[_0x63f9('0x33')],_0x3e6728[_0x63f9('0x34')]);_0x1b56bd[_0x63f9('0x37')]=_[_0x63f9('0x38')](_0x3e6728[_0x63f9('0x33')],qs['fields'](_0x25f5f0[_0x63f9('0x34')]['fields']));_0x1b56bd['attributes']=_0x1b56bd[_0x63f9('0x37')][_0x63f9('0x39')]?_0x1b56bd[_0x63f9('0x37')]:_0x3e6728['model'];if(!_0x25f5f0[_0x63f9('0x34')]['hasOwnProperty'](_0x63f9('0x3a'))){_0x1b56bd[_0x63f9('0x21')]=qs[_0x63f9('0x21')](_0x25f5f0['query']['limit']);_0x1b56bd[_0x63f9('0x1f')]=qs[_0x63f9('0x1f')](_0x25f5f0[_0x63f9('0x34')][_0x63f9('0x1f')]);}_0x1b56bd['order']=qs[_0x63f9('0x3b')](_0x25f5f0[_0x63f9('0x34')][_0x63f9('0x3b')]);_0x1b56bd[_0x63f9('0x3c')]=qs['filters'](_[_0x63f9('0x3d')](_0x25f5f0[_0x63f9('0x34')],_0x3e6728[_0x63f9('0x36')]),_0x22a82a);if(_0x25f5f0[_0x63f9('0x34')][_0x63f9('0x3e')]){_0x1b56bd[_0x63f9('0x3c')]=_[_0x63f9('0x3f')](_0x1b56bd[_0x63f9('0x3c')],{'$or':_[_0x63f9('0x2e')](_0x22a82a,function(_0x54f4d0){if(_0x54f4d0[_0x63f9('0x31')]!==_0x63f9('0x40')){var _0x110aa1={};_0x110aa1[_0x54f4d0[_0x63f9('0x2b')]]={'$like':'%'+_0x25f5f0[_0x63f9('0x34')][_0x63f9('0x3e')]+'%'};return _0x110aa1;}})});}_0x1b56bd=_['merge']({},_0x1b56bd,_0x25f5f0[_0x63f9('0x41')]);var _0x2f1202={'where':_0x1b56bd[_0x63f9('0x3c')]};return db[_0x63f9('0x2f')][_0x63f9('0x22')](_0x2f1202)[_0x63f9('0x27')](function(_0x1d733a){_0x271872[_0x63f9('0x22')]=_0x1d733a;if(_0x25f5f0['query']['includeAll']){_0x1b56bd['include']=[{'all':!![]}];}return db['ChatQueueReport'][_0x63f9('0x42')](_0x1b56bd);})[_0x63f9('0x27')](function(_0x19a603){_0x271872[_0x63f9('0x43')]=_0x19a603;return _0x271872;})[_0x63f9('0x27')](respondWithFilteredResult(_0x51c84b,_0x1b56bd))[_0x63f9('0x44')](handleError(_0x51c84b,null));};exports[_0x63f9('0x45')]=function(_0x16a1f3,_0x388261){var _0x5f53ab={'raw':!![],'where':{'id':_0x16a1f3['params']['id']}},_0x23ee18={};_0x23ee18[_0x63f9('0x33')]=_['keys'](db[_0x63f9('0x2f')][_0x63f9('0x46')]);_0x23ee18[_0x63f9('0x34')]=_['keys'](_0x16a1f3[_0x63f9('0x34')]);_0x23ee18[_0x63f9('0x36')]=_[_0x63f9('0x38')](_0x23ee18['model'],_0x23ee18['query']);_0x5f53ab[_0x63f9('0x37')]=_[_0x63f9('0x38')](_0x23ee18[_0x63f9('0x33')],qs[_0x63f9('0x47')](_0x16a1f3[_0x63f9('0x34')][_0x63f9('0x47')]));_0x5f53ab['attributes']=_0x5f53ab[_0x63f9('0x37')][_0x63f9('0x39')]?_0x5f53ab['attributes']:_0x23ee18[_0x63f9('0x33')];if(_0x16a1f3[_0x63f9('0x34')][_0x63f9('0x48')]){_0x5f53ab['include']=[{'all':!![]}];}_0x5f53ab=_['merge']({},_0x5f53ab,_0x16a1f3[_0x63f9('0x41')]);return db[_0x63f9('0x2f')]['find'](_0x5f53ab)[_0x63f9('0x27')](handleEntityNotFound(_0x388261,null))[_0x63f9('0x27')](respondWithResult(_0x388261,null))[_0x63f9('0x44')](handleError(_0x388261,null));};exports[_0x63f9('0x49')]=function(_0x119b8e,_0x51d818){return db[_0x63f9('0x2f')][_0x63f9('0x49')](_0x119b8e[_0x63f9('0x4a')],{})['then'](respondWithResult(_0x51d818,0xc9))['catch'](handleError(_0x51d818,null));};exports['update']=function(_0x4e6466,_0x13803d){if(_0x4e6466[_0x63f9('0x4a')]['id']){delete _0x4e6466[_0x63f9('0x4a')]['id'];}return db['ChatQueueReport']['find']({'where':{'id':_0x4e6466[_0x63f9('0x4b')]['id']}})[_0x63f9('0x27')](handleEntityNotFound(_0x13803d,null))[_0x63f9('0x27')](saveUpdates(_0x4e6466[_0x63f9('0x4a')],null))[_0x63f9('0x27')](respondWithResult(_0x13803d,null))[_0x63f9('0x44')](handleError(_0x13803d,null));};exports[_0x63f9('0x28')]=function(_0x387aa5,_0x53f06f){return db[_0x63f9('0x2f')][_0x63f9('0x4c')]({'where':{'id':_0x387aa5['params']['id']}})[_0x63f9('0x27')](handleEntityNotFound(_0x53f06f,null))[_0x63f9('0x27')](removeEntity(_0x53f06f,null))['catch'](handleError(_0x53f06f,null));};exports[_0x63f9('0x4d')]=function(_0x4c1276,_0x19e137){return db[_0x63f9('0x2f')][_0x63f9('0x4d')]()[_0x63f9('0x27')](respondWithResult(_0x19e137,null))[_0x63f9('0x44')](handleError(_0x19e137,null));};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.model.js b/server/api/chatQueueReport/chatQueueReport.model.js
index ab2222c..e5cd761 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 _0x757a=['report_chat_queue','uniqueid','util','../../config/logger','request-promise','path','rimraf','../../config/environment','./chatQueueReport.attributes','exports','define'];(function(_0x492cdb,_0x37833d){var _0x26a4cb=function(_0x56a764){while(--_0x56a764){_0x492cdb['push'](_0x492cdb['shift']());}};_0x26a4cb(++_0x37833d);}(_0x757a,0xde));var _0xa757=function(_0x2866e2,_0x376809){_0x2866e2=_0x2866e2-0x0;var _0x2cd26e=_0x757a[_0x2866e2];return _0x2cd26e;};'use strict';var _=require('lodash');var util=require(_0xa757('0x0'));var logger=require(_0xa757('0x1'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xa757('0x2'));var fs=require('fs');var path=require(_0xa757('0x3'));var rimraf=require(_0xa757('0x4'));var config=require(_0xa757('0x5'));var attributes=require(_0xa757('0x6'));module[_0xa757('0x7')]=function(_0x5edca8,_0xae0e7c){return _0x5edca8[_0xa757('0x8')]('ChatQueueReport',attributes,{'tableName':_0xa757('0x9'),'paranoid':![],'indexes':[{'name':_0xa757('0xa'),'fields':[_0xa757('0xa')]}],'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(_0x5c0a14,_0xff95b1){var _0x1047bc=function(_0x113044){while(--_0x113044){_0x5c0a14['push'](_0x5c0a14['shift']());}};_0x1047bc(++_0xff95b1);}(_0xbaf0,0x12a));var _0x0baf=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0xbaf0[_0x2f5ac5];return _0x37c9a8;};'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 b75e5af..2a7c036 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 _0xd30a=['UpdateChatQueueReport','update','where','attributes','limit','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','ChatQueueReport,\x20%s,\x20%s','request\x20sent','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','CreateChatQueueReport','ChatQueueReport','body','options','raw','debug'];(function(_0x5289c8,_0x5a4cb8){var _0x1904ce=function(_0x2d13d9){while(--_0x2d13d9){_0x5289c8['push'](_0x5289c8['shift']());}};_0x1904ce(++_0x5a4cb8);}(_0xd30a,0x19d));var _0xad30=function(_0x481bf7,_0x437f69){_0x481bf7=_0x481bf7-0x0;var _0x461787=_0xd30a[_0x481bf7];return _0x461787;};'use strict';var _=require(_0xad30('0x0'));var util=require('util');var moment=require(_0xad30('0x1'));var BPromise=require(_0xad30('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xad30('0x3'));var db=require(_0xad30('0x4'))['db'];var utils=require(_0xad30('0x5'));var logger=require(_0xad30('0x6'))(_0xad30('0x7'));var config=require(_0xad30('0x8'));var jayson=require(_0xad30('0x9'));var client=jayson[_0xad30('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3dc0,_0x2e99d4,_0x1493da){return new BPromise(function(_0x20ac8b,_0x53e6fe){return client[_0xad30('0xb')](_0x3dc0,_0x1493da)[_0xad30('0xc')](function(_0x384583){logger['info'](_0xad30('0xd'),_0x2e99d4,_0xad30('0xe'));logger['debug'](_0xad30('0xf'),_0x2e99d4,_0xad30('0xe'),JSON[_0xad30('0x10')](_0x384583));if(_0x384583[_0xad30('0x11')]){if(_0x384583[_0xad30('0x11')][_0xad30('0x12')]===0x1f4){logger[_0xad30('0x11')](_0xad30('0xd'),_0x2e99d4,_0x384583[_0xad30('0x11')][_0xad30('0x13')]);return _0x53e6fe(_0x384583['error'][_0xad30('0x13')]);}logger[_0xad30('0x11')]('ChatQueueReport,\x20%s,\x20%s',_0x2e99d4,_0x384583[_0xad30('0x11')][_0xad30('0x13')]);return _0x20ac8b(_0x384583[_0xad30('0x11')]['message']);}else{logger[_0xad30('0x14')](_0xad30('0xd'),_0x2e99d4,_0xad30('0xe'));_0x20ac8b(_0x384583[_0xad30('0x15')][_0xad30('0x13')]);}})[_0xad30('0x16')](function(_0x2a6d9c){logger[_0xad30('0x11')](_0xad30('0xd'),_0x2e99d4,_0x2a6d9c);_0x53e6fe(_0x2a6d9c);});});}exports[_0xad30('0x17')]=function(_0x19a0cc){var _0x16cb53=this;return new Promise(function(_0x842841,_0x5068eb){return db[_0xad30('0x18')]['create'](_0x19a0cc[_0xad30('0x19')],{'raw':_0x19a0cc[_0xad30('0x1a')]?_0x19a0cc['options'][_0xad30('0x1b')]===undefined?!![]:![]:!![]})[_0xad30('0xc')](function(_0x312704){logger[_0xad30('0x14')]('CreateChatQueueReport',_0x19a0cc);logger[_0xad30('0x1c')](_0xad30('0x17'),_0x19a0cc,JSON[_0xad30('0x10')](_0x312704));_0x842841(_0x312704);})[_0xad30('0x16')](function(_0x12ec56){logger['error'](_0xad30('0x17'),_0x12ec56[_0xad30('0x13')],_0x19a0cc);_0x5068eb(_0x16cb53[_0xad30('0x11')](0x1f4,_0x12ec56[_0xad30('0x13')]));});});};exports[_0xad30('0x1d')]=function(_0x63c85d){var _0x4b395d=this;return new Promise(function(_0x4d11ae,_0x55207e){return db['ChatQueueReport'][_0xad30('0x1e')](_0x63c85d[_0xad30('0x19')],{'raw':_0x63c85d[_0xad30('0x1a')]?_0x63c85d[_0xad30('0x1a')][_0xad30('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x63c85d['options']?_0x63c85d[_0xad30('0x1a')][_0xad30('0x1f')]||null:null,'attributes':_0x63c85d['options']?_0x63c85d[_0xad30('0x1a')][_0xad30('0x20')]||null:null,'limit':_0x63c85d[_0xad30('0x1a')]?_0x63c85d[_0xad30('0x1a')][_0xad30('0x21')]||null:null})[_0xad30('0xc')](function(_0x59ba1f){logger['info'](_0xad30('0x1d'),_0x63c85d);logger['debug'](_0xad30('0x1d'),_0x63c85d,JSON[_0xad30('0x10')](_0x59ba1f));_0x4d11ae(_0x59ba1f);})[_0xad30('0x16')](function(_0x2ca5fe){logger[_0xad30('0x11')]('UpdateChatQueueReport',_0x2ca5fe[_0xad30('0x13')],_0x63c85d);_0x55207e(_0x4b395d[_0xad30('0x11')](0x1f4,_0x2ca5fe[_0xad30('0x13')]));});});};
\ No newline at end of file
+var _0xe238=['debug','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','ChatQueueReport,\x20%s,\x20%s','request\x20sent','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ChatQueueReport','create','options','raw','CreateChatQueueReport','update','where','attributes','UpdateChatQueueReport'];(function(_0x472e4f,_0x4cc294){var _0x29e574=function(_0x4546ac){while(--_0x4546ac){_0x472e4f['push'](_0x472e4f['shift']());}};_0x29e574(++_0x4cc294);}(_0xe238,0x18d));var _0x8e23=function(_0x46e363,_0x45d7e2){_0x46e363=_0x46e363-0x0;var _0x3fb059=_0xe238[_0x46e363];return _0x3fb059;};'use strict';var _=require(_0x8e23('0x0'));var util=require(_0x8e23('0x1'));var moment=require(_0x8e23('0x2'));var BPromise=require(_0x8e23('0x3'));var rs=require(_0x8e23('0x4'));var fs=require('fs');var Redis=require(_0x8e23('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x8e23('0x6'));var logger=require(_0x8e23('0x7'))('rpc');var config=require(_0x8e23('0x8'));var jayson=require(_0x8e23('0x9'));var client=jayson[_0x8e23('0xa')][_0x8e23('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x486415,_0x34d6c8,_0x5b11e8){return new BPromise(function(_0x51b0f5,_0x1de364){return client['request'](_0x486415,_0x5b11e8)[_0x8e23('0xc')](function(_0x43d795){logger[_0x8e23('0xd')](_0x8e23('0xe'),_0x34d6c8,_0x8e23('0xf'));logger['debug'](_0x8e23('0x10'),_0x34d6c8,_0x8e23('0xf'),JSON[_0x8e23('0x11')](_0x43d795));if(_0x43d795[_0x8e23('0x12')]){if(_0x43d795[_0x8e23('0x12')][_0x8e23('0x13')]===0x1f4){logger['error']('ChatQueueReport,\x20%s,\x20%s',_0x34d6c8,_0x43d795[_0x8e23('0x12')][_0x8e23('0x14')]);return _0x1de364(_0x43d795['error'][_0x8e23('0x14')]);}logger['error']('ChatQueueReport,\x20%s,\x20%s',_0x34d6c8,_0x43d795[_0x8e23('0x12')][_0x8e23('0x14')]);return _0x51b0f5(_0x43d795[_0x8e23('0x12')][_0x8e23('0x14')]);}else{logger[_0x8e23('0xd')]('ChatQueueReport,\x20%s,\x20%s',_0x34d6c8,_0x8e23('0xf'));_0x51b0f5(_0x43d795[_0x8e23('0x15')]['message']);}})[_0x8e23('0x16')](function(_0x346ec6){logger['error'](_0x8e23('0xe'),_0x34d6c8,_0x346ec6);_0x1de364(_0x346ec6);});});}exports['CreateChatQueueReport']=function(_0x458ee6){var _0x3cfedd=this;return new Promise(function(_0x2ab78c,_0x4d2b12){return db[_0x8e23('0x17')][_0x8e23('0x18')](_0x458ee6['body'],{'raw':_0x458ee6['options']?_0x458ee6[_0x8e23('0x19')][_0x8e23('0x1a')]===undefined?!![]:![]:!![]})[_0x8e23('0xc')](function(_0x2402f7){logger[_0x8e23('0xd')](_0x8e23('0x1b'),_0x458ee6);logger['debug']('CreateChatQueueReport',_0x458ee6,JSON['stringify'](_0x2402f7));_0x2ab78c(_0x2402f7);})[_0x8e23('0x16')](function(_0x5c7fc3){logger[_0x8e23('0x12')](_0x8e23('0x1b'),_0x5c7fc3[_0x8e23('0x14')],_0x458ee6);_0x4d2b12(_0x3cfedd[_0x8e23('0x12')](0x1f4,_0x5c7fc3[_0x8e23('0x14')]));});});};exports['UpdateChatQueueReport']=function(_0x3150cf){var _0x24b46e=this;return new Promise(function(_0x568edf,_0x470ac3){return db['ChatQueueReport'][_0x8e23('0x1c')](_0x3150cf['body'],{'raw':_0x3150cf[_0x8e23('0x19')]?_0x3150cf[_0x8e23('0x19')][_0x8e23('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3150cf[_0x8e23('0x19')]?_0x3150cf[_0x8e23('0x19')][_0x8e23('0x1d')]||null:null,'attributes':_0x3150cf[_0x8e23('0x19')]?_0x3150cf[_0x8e23('0x19')][_0x8e23('0x1e')]||null:null,'limit':_0x3150cf[_0x8e23('0x19')]?_0x3150cf['options']['limit']||null:null})[_0x8e23('0xc')](function(_0x213fa9){logger[_0x8e23('0xd')](_0x8e23('0x1f'),_0x3150cf);logger[_0x8e23('0x20')](_0x8e23('0x1f'),_0x3150cf,JSON[_0x8e23('0x11')](_0x213fa9));_0x568edf(_0x213fa9);})[_0x8e23('0x16')](function(_0x49d4b4){logger['error'](_0x8e23('0x1f'),_0x49d4b4[_0x8e23('0x14')],_0x3150cf);_0x470ac3(_0x24b46e['error'](0x1f4,_0x49d4b4['message']));});});};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/index.js b/server/api/chatQueueReport/index.js
index 0cbaa07..49619d7 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 _0x60a2=['../../components/auth/service','../../config/environment','./chatQueueReport.controller','isAuthenticated','get','/describe','/:id','create','put','update','destroy','exports','multer','util','connect-timeout','express','Router'];(function(_0x5193e3,_0x4e62b9){var _0x505b84=function(_0x74f2c7){while(--_0x74f2c7){_0x5193e3['push'](_0x5193e3['shift']());}};_0x505b84(++_0x4e62b9);}(_0x60a2,0x160));var _0x260a=function(_0xdf5c13,_0x2b638c){_0xdf5c13=_0xdf5c13-0x0;var _0x4723b6=_0x60a2[_0xdf5c13];return _0x4723b6;};'use strict';var multer=require(_0x260a('0x0'));var util=require(_0x260a('0x1'));var path=require('path');var timeout=require(_0x260a('0x2'));var express=require(_0x260a('0x3'));var router=express[_0x260a('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x260a('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x260a('0x6'));var controller=require(_0x260a('0x7'));router['get']('/',auth[_0x260a('0x8')](),controller['index']);router[_0x260a('0x9')](_0x260a('0xa'),auth[_0x260a('0x8')](),controller['describe']);router[_0x260a('0x9')](_0x260a('0xb'),auth[_0x260a('0x8')](),controller['show']);router['post']('/',auth[_0x260a('0x8')](),controller[_0x260a('0xc')]);router[_0x260a('0xd')](_0x260a('0xb'),auth[_0x260a('0x8')](),controller[_0x260a('0xe')]);router['delete'](_0x260a('0xb'),auth[_0x260a('0x8')](),controller[_0x260a('0xf')]);module[_0x260a('0x10')]=router;
\ No newline at end of file
+var _0xf171=['util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatQueueReport.controller','get','isAuthenticated','index','/describe','/:id','post','create','put','update','destroy','exports','multer'];(function(_0x5572c1,_0x4c6633){var _0x4bb9a3=function(_0x4e9dec){while(--_0x4e9dec){_0x5572c1['push'](_0x5572c1['shift']());}};_0x4bb9a3(++_0x4c6633);}(_0xf171,0x92));var _0x1f17=function(_0x5016c9,_0x57cdf0){_0x5016c9=_0x5016c9-0x0;var _0x5371ee=_0xf171[_0x5016c9];return _0x5371ee;};'use strict';var multer=require(_0x1f17('0x0'));var util=require(_0x1f17('0x1'));var path=require(_0x1f17('0x2'));var timeout=require(_0x1f17('0x3'));var express=require(_0x1f17('0x4'));var router=express['Router']();var fs_extra=require(_0x1f17('0x5'));var auth=require(_0x1f17('0x6'));var interaction=require(_0x1f17('0x7'));var config=require(_0x1f17('0x8'));var controller=require(_0x1f17('0x9'));router[_0x1f17('0xa')]('/',auth[_0x1f17('0xb')](),controller[_0x1f17('0xc')]);router[_0x1f17('0xa')](_0x1f17('0xd'),auth[_0x1f17('0xb')](),controller['describe']);router[_0x1f17('0xa')](_0x1f17('0xe'),auth['isAuthenticated'](),controller['show']);router[_0x1f17('0xf')]('/',auth['isAuthenticated'](),controller[_0x1f17('0x10')]);router[_0x1f17('0x11')](_0x1f17('0xe'),auth[_0x1f17('0xb')](),controller[_0x1f17('0x12')]);router['delete'](_0x1f17('0xe'),auth[_0x1f17('0xb')](),controller[_0x1f17('0x13')]);module[_0x1f17('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.attributes.js b/server/api/chatTransferReport/chatTransferReport.attributes.js
index 295e909..c75f331 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 _0xb43b=['DATE','NOW','moment','sequelize','STRING','ENUM','account','queue'];(function(_0x33a694,_0x9b6640){var _0x41ff01=function(_0x4c38b7){while(--_0x4c38b7){_0x33a694['push'](_0x33a694['shift']());}};_0x41ff01(++_0x9b6640);}(_0xb43b,0x1b2));var _0xbb43=function(_0x46965b,_0x51a74b){_0x46965b=_0x46965b-0x0;var _0x5318e5=_0xb43b[_0x46965b];return _0x5318e5;};'use strict';var moment=require(_0xbb43('0x0'));var Sequelize=require(_0xbb43('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0xbb43('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0xbb43('0x3')](_0xbb43('0x4'),'agent',_0xbb43('0x5')),'allowNull':![],'defaultValue':_0xbb43('0x5')},'transferredAt':{'type':Sequelize[_0xbb43('0x6')],'allowNull':![],'defaultValue':Sequelize[_0xbb43('0x7')]}};
\ No newline at end of file
+var _0xa9e0=['account','queue','DATE','NOW','moment','sequelize','exports'];(function(_0x32ec45,_0x3bb0cd){var _0x299a21=function(_0x1e9884){while(--_0x1e9884){_0x32ec45['push'](_0x32ec45['shift']());}};_0x299a21(++_0x3bb0cd);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4243a3,_0x447337){_0x4243a3=_0x4243a3-0x0;var _0x1b2a33=_0xa9e0[_0x4243a3];return _0x1b2a33;};'use strict';var moment=require(_0x0a9e('0x0'));var Sequelize=require(_0x0a9e('0x1'));module[_0x0a9e('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x0a9e('0x3'),'agent',_0x0a9e('0x4')),'allowNull':![],'defaultValue':_0x0a9e('0x4')},'transferredAt':{'type':Sequelize[_0x0a9e('0x5')],'allowNull':![],'defaultValue':Sequelize[_0x0a9e('0x6')]}};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.controller.js b/server/api/chatTransferReport/chatTransferReport.controller.js
index 08cf750..799e56f 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 _0xa042=['undefined','limit','count','Content-Range','apply','reject','save','then','destroy','error','stack','name','index','map','ChatTransferReport','fieldName','type','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','filter','includeAll','include','findAll','rows','catch','show','rawAttributes','options','find','create','body','update','params','describe','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset'];(function(_0x49b207,_0x408ade){var _0x2dc8fa=function(_0x150975){while(--_0x150975){_0x49b207['push'](_0x49b207['shift']());}};_0x2dc8fa(++_0x408ade);}(_0xa042,0x163));var _0x2a04=function(_0x365689,_0x354de6){_0x365689=_0x365689-0x0;var _0x229a70=_0xa042[_0x365689];return _0x229a70;};'use strict';var emlformat=require(_0x2a04('0x0'));var rimraf=require(_0x2a04('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x2a04('0x2'));var rp=require(_0x2a04('0x3'));var moment=require(_0x2a04('0x4'));var BPromise=require(_0x2a04('0x5'));var Mustache=require(_0x2a04('0x6'));var util=require('util');var path=require(_0x2a04('0x7'));var sox=require(_0x2a04('0x8'));var csv=require(_0x2a04('0x9'));var ejs=require(_0x2a04('0xa'));var fs=require('fs');var fs_extra=require(_0x2a04('0xb'));var _=require(_0x2a04('0xc'));var squel=require(_0x2a04('0xd'));var crypto=require(_0x2a04('0xe'));var jsforce=require(_0x2a04('0xf'));var deskjs=require(_0x2a04('0x10'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x2a04('0x11'));var Redis=require(_0x2a04('0x12'));var authService=require(_0x2a04('0x13'));var qs=require(_0x2a04('0x14'));var as=require(_0x2a04('0x15'));var hardwareService=require(_0x2a04('0x16'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x2a04('0x17'));var db=require(_0x2a04('0x18'))['db'];function respondWithStatusCode(_0x490e54,_0x34fb2f){_0x34fb2f=_0x34fb2f||0xcc;return function(_0xad19df){if(_0xad19df){return _0x490e54[_0x2a04('0x19')](_0x34fb2f);}return _0x490e54['status'](_0x34fb2f)[_0x2a04('0x1a')]();};}function respondWithResult(_0x201d17,_0x569655){_0x569655=_0x569655||0xc8;return function(_0x49d45f){if(_0x49d45f){return _0x201d17[_0x2a04('0x1b')](_0x569655)[_0x2a04('0x1c')](_0x49d45f);}};}function respondWithFilteredResult(_0x1819db,_0x43c7c7){return function(_0x182f49){if(_0x182f49){var _0x24baad=typeof _0x43c7c7[_0x2a04('0x1d')]===_0x2a04('0x1e')&&typeof _0x43c7c7[_0x2a04('0x1f')]===_0x2a04('0x1e');var _0x1bd88e=_0x182f49[_0x2a04('0x20')];var _0x17fb55=_0x24baad?0x0:_0x43c7c7[_0x2a04('0x1d')];var _0x5f1c4e=_0x24baad?_0x182f49[_0x2a04('0x20')]:_0x43c7c7[_0x2a04('0x1d')]+_0x43c7c7[_0x2a04('0x1f')];var _0x2f9f4d;if(_0x5f1c4e>=_0x1bd88e){_0x5f1c4e=_0x1bd88e;_0x2f9f4d=0xc8;}else{_0x2f9f4d=0xce;}_0x1819db['status'](_0x2f9f4d);return _0x1819db['set'](_0x2a04('0x21'),_0x17fb55+'-'+_0x5f1c4e+'/'+_0x1bd88e)[_0x2a04('0x1c')](_0x182f49);}return null;};}function patchUpdates(_0x1da682){return function(_0x169b4b){try{jsonpatch[_0x2a04('0x22')](_0x169b4b,_0x1da682,!![]);}catch(_0x407a00){return BPromise[_0x2a04('0x23')](_0x407a00);}return _0x169b4b[_0x2a04('0x24')]();};}function saveUpdates(_0x251c0d,_0x23045d){return function(_0x3ec99a){if(_0x3ec99a){return _0x3ec99a['update'](_0x251c0d)[_0x2a04('0x25')](function(_0xd6673){return _0xd6673;});}return null;};}function removeEntity(_0x3c0121,_0x11f914){return function(_0x4cdfd2){if(_0x4cdfd2){return _0x4cdfd2[_0x2a04('0x26')]()['then'](function(){_0x3c0121['status'](0xcc)[_0x2a04('0x1a')]();});}};}function handleEntityNotFound(_0x22a778,_0x482a85){return function(_0x22b98f){if(!_0x22b98f){_0x22a778[_0x2a04('0x19')](0x194);}return _0x22b98f;};}function handleError(_0x13d2a6,_0x29d0b1){_0x29d0b1=_0x29d0b1||0x1f4;return function(_0x1f96ef){logger[_0x2a04('0x27')](_0x1f96ef[_0x2a04('0x28')]);if(_0x1f96ef[_0x2a04('0x29')]){delete _0x1f96ef[_0x2a04('0x29')];}_0x13d2a6[_0x2a04('0x1b')](_0x29d0b1)['send'](_0x1f96ef);};}exports[_0x2a04('0x2a')]=function(_0x6801f6,_0x35a634){var _0x5d19bb={},_0xa6c482={},_0x2187a9={'count':0x0,'rows':[]};var _0x3393fc=_[_0x2a04('0x2b')](db[_0x2a04('0x2c')]['rawAttributes'],function(_0x49d565){return{'name':_0x49d565[_0x2a04('0x2d')],'type':_0x49d565[_0x2a04('0x2e')]['key']};});_0xa6c482[_0x2a04('0x2f')]=_['map'](_0x3393fc,_0x2a04('0x29'));_0xa6c482['query']=_[_0x2a04('0x30')](_0x6801f6[_0x2a04('0x31')]);_0xa6c482[_0x2a04('0x32')]=_[_0x2a04('0x33')](_0xa6c482['model'],_0xa6c482[_0x2a04('0x31')]);_0x5d19bb[_0x2a04('0x34')]=_[_0x2a04('0x33')](_0xa6c482[_0x2a04('0x2f')],qs[_0x2a04('0x35')](_0x6801f6[_0x2a04('0x31')][_0x2a04('0x35')]));_0x5d19bb[_0x2a04('0x34')]=_0x5d19bb['attributes'][_0x2a04('0x36')]?_0x5d19bb[_0x2a04('0x34')]:_0xa6c482[_0x2a04('0x2f')];if(!_0x6801f6[_0x2a04('0x31')][_0x2a04('0x37')](_0x2a04('0x38'))){_0x5d19bb['limit']=qs['limit'](_0x6801f6[_0x2a04('0x31')][_0x2a04('0x1f')]);_0x5d19bb[_0x2a04('0x1d')]=qs['offset'](_0x6801f6[_0x2a04('0x31')]['offset']);}_0x5d19bb[_0x2a04('0x39')]=qs[_0x2a04('0x3a')](_0x6801f6[_0x2a04('0x31')][_0x2a04('0x3a')]);_0x5d19bb[_0x2a04('0x3b')]=qs[_0x2a04('0x32')](_[_0x2a04('0x3c')](_0x6801f6['query'],_0xa6c482[_0x2a04('0x32')]),_0x3393fc);if(_0x6801f6['query']['filter']){_0x5d19bb[_0x2a04('0x3b')]=_[_0x2a04('0x3d')](_0x5d19bb['where'],{'$or':_[_0x2a04('0x2b')](_0x3393fc,function(_0x3e6934){if(_0x3e6934[_0x2a04('0x2e')]!=='VIRTUAL'){var _0x36f49b={};_0x36f49b[_0x3e6934['name']]={'$like':'%'+_0x6801f6[_0x2a04('0x31')][_0x2a04('0x3e')]+'%'};return _0x36f49b;}})});}_0x5d19bb=_['merge']({},_0x5d19bb,_0x6801f6['options']);var _0x5b6d31={'where':_0x5d19bb[_0x2a04('0x3b')]};return db[_0x2a04('0x2c')]['count'](_0x5b6d31)[_0x2a04('0x25')](function(_0x313c33){_0x2187a9['count']=_0x313c33;if(_0x6801f6['query'][_0x2a04('0x3f')]){_0x5d19bb[_0x2a04('0x40')]=[{'all':!![]}];}return db[_0x2a04('0x2c')][_0x2a04('0x41')](_0x5d19bb);})[_0x2a04('0x25')](function(_0x3a8352){_0x2187a9[_0x2a04('0x42')]=_0x3a8352;return _0x2187a9;})['then'](respondWithFilteredResult(_0x35a634,_0x5d19bb))[_0x2a04('0x43')](handleError(_0x35a634,null));};exports[_0x2a04('0x44')]=function(_0x4d8a77,_0x3d502d){var _0x51172d={'raw':!![],'where':{'id':_0x4d8a77['params']['id']}},_0x65e08b={};_0x65e08b['model']=_[_0x2a04('0x30')](db[_0x2a04('0x2c')][_0x2a04('0x45')]);_0x65e08b[_0x2a04('0x31')]=_[_0x2a04('0x30')](_0x4d8a77[_0x2a04('0x31')]);_0x65e08b[_0x2a04('0x32')]=_[_0x2a04('0x33')](_0x65e08b[_0x2a04('0x2f')],_0x65e08b[_0x2a04('0x31')]);_0x51172d[_0x2a04('0x34')]=_['intersection'](_0x65e08b[_0x2a04('0x2f')],qs['fields'](_0x4d8a77[_0x2a04('0x31')][_0x2a04('0x35')]));_0x51172d[_0x2a04('0x34')]=_0x51172d['attributes'][_0x2a04('0x36')]?_0x51172d[_0x2a04('0x34')]:_0x65e08b[_0x2a04('0x2f')];if(_0x4d8a77[_0x2a04('0x31')][_0x2a04('0x3f')]){_0x51172d[_0x2a04('0x40')]=[{'all':!![]}];}_0x51172d=_[_0x2a04('0x3d')]({},_0x51172d,_0x4d8a77[_0x2a04('0x46')]);return db[_0x2a04('0x2c')][_0x2a04('0x47')](_0x51172d)[_0x2a04('0x25')](handleEntityNotFound(_0x3d502d,null))[_0x2a04('0x25')](respondWithResult(_0x3d502d,null))[_0x2a04('0x43')](handleError(_0x3d502d,null));};exports[_0x2a04('0x48')]=function(_0x3a0464,_0x52258b){return db['ChatTransferReport'][_0x2a04('0x48')](_0x3a0464[_0x2a04('0x49')],{})[_0x2a04('0x25')](respondWithResult(_0x52258b,0xc9))[_0x2a04('0x43')](handleError(_0x52258b,null));};exports[_0x2a04('0x4a')]=function(_0x13a0ef,_0x597d7a){if(_0x13a0ef[_0x2a04('0x49')]['id']){delete _0x13a0ef[_0x2a04('0x49')]['id'];}return db[_0x2a04('0x2c')]['find']({'where':{'id':_0x13a0ef[_0x2a04('0x4b')]['id']}})[_0x2a04('0x25')](handleEntityNotFound(_0x597d7a,null))['then'](saveUpdates(_0x13a0ef[_0x2a04('0x49')],null))['then'](respondWithResult(_0x597d7a,null))['catch'](handleError(_0x597d7a,null));};exports[_0x2a04('0x26')]=function(_0x2cf70d,_0x2dd3a6){return db[_0x2a04('0x2c')][_0x2a04('0x47')]({'where':{'id':_0x2cf70d[_0x2a04('0x4b')]['id']}})[_0x2a04('0x25')](handleEntityNotFound(_0x2dd3a6,null))[_0x2a04('0x25')](removeEntity(_0x2dd3a6,null))[_0x2a04('0x43')](handleError(_0x2dd3a6,null));};exports['describe']=function(_0x44996c,_0xde46b5){return db[_0x2a04('0x2c')][_0x2a04('0x4c')]()[_0x2a04('0x25')](respondWithResult(_0xde46b5,null))[_0x2a04('0x43')](handleError(_0xde46b5,null));};
\ No newline at end of file
+var _0x5d87=['status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','map','ChatTransferReport','rawAttributes','fieldName','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','order','sort','pick','filter','where','merge','type','includeAll','include','findAll','catch','create','body','find','params','describe','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus'];(function(_0x1fa506,_0x25fc4e){var _0x39dee3=function(_0xecc93a){while(--_0xecc93a){_0x1fa506['push'](_0x1fa506['shift']());}};_0x39dee3(++_0x25fc4e);}(_0x5d87,0xcc));var _0x75d8=function(_0x1c0952,_0x146c95){_0x1c0952=_0x1c0952-0x0;var _0x2c19e3=_0x5d87[_0x1c0952];return _0x2c19e3;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x75d8('0x0'));var jsonpatch=require(_0x75d8('0x1'));var rp=require(_0x75d8('0x2'));var moment=require(_0x75d8('0x3'));var BPromise=require(_0x75d8('0x4'));var Mustache=require(_0x75d8('0x5'));var util=require(_0x75d8('0x6'));var path=require('path');var sox=require(_0x75d8('0x7'));var csv=require(_0x75d8('0x8'));var ejs=require(_0x75d8('0x9'));var fs=require('fs');var fs_extra=require(_0x75d8('0xa'));var _=require(_0x75d8('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x75d8('0xc'));var deskjs=require(_0x75d8('0xd'));var toCsv=require(_0x75d8('0x8'));var querystring=require(_0x75d8('0xe'));var Papa=require(_0x75d8('0xf'));var Redis=require('ioredis');var authService=require(_0x75d8('0x10'));var qs=require(_0x75d8('0x11'));var as=require(_0x75d8('0x12'));var hardwareService=require(_0x75d8('0x13'));var logger=require(_0x75d8('0x14'))(_0x75d8('0x15'));var utils=require(_0x75d8('0x16'));var config=require(_0x75d8('0x17'));var licenseUtil=require(_0x75d8('0x18'));var db=require(_0x75d8('0x19'))['db'];function respondWithStatusCode(_0x38c9c4,_0x3eb09a){_0x3eb09a=_0x3eb09a||0xcc;return function(_0x122bc5){if(_0x122bc5){return _0x38c9c4[_0x75d8('0x1a')](_0x3eb09a);}return _0x38c9c4[_0x75d8('0x1b')](_0x3eb09a)[_0x75d8('0x1c')]();};}function respondWithResult(_0x4aa9bc,_0x3b93bd){_0x3b93bd=_0x3b93bd||0xc8;return function(_0x38e5fe){if(_0x38e5fe){return _0x4aa9bc[_0x75d8('0x1b')](_0x3b93bd)[_0x75d8('0x1d')](_0x38e5fe);}};}function respondWithFilteredResult(_0x40dc2e,_0x535bf6){return function(_0x5ce20c){if(_0x5ce20c){var _0x4d3661=typeof _0x535bf6[_0x75d8('0x1e')]===_0x75d8('0x1f')&&typeof _0x535bf6[_0x75d8('0x20')]===_0x75d8('0x1f');var _0x2a7ca5=_0x5ce20c[_0x75d8('0x21')];var _0x2dfbde=_0x4d3661?0x0:_0x535bf6['offset'];var _0x4db53e=_0x4d3661?_0x5ce20c[_0x75d8('0x21')]:_0x535bf6[_0x75d8('0x1e')]+_0x535bf6['limit'];var _0x1f37f6;if(_0x4db53e>=_0x2a7ca5){_0x4db53e=_0x2a7ca5;_0x1f37f6=0xc8;}else{_0x1f37f6=0xce;}_0x40dc2e['status'](_0x1f37f6);return _0x40dc2e[_0x75d8('0x22')](_0x75d8('0x23'),_0x2dfbde+'-'+_0x4db53e+'/'+_0x2a7ca5)[_0x75d8('0x1d')](_0x5ce20c);}return null;};}function patchUpdates(_0x14262d){return function(_0x3c0fd9){try{jsonpatch[_0x75d8('0x24')](_0x3c0fd9,_0x14262d,!![]);}catch(_0xcac2a5){return BPromise[_0x75d8('0x25')](_0xcac2a5);}return _0x3c0fd9[_0x75d8('0x26')]();};}function saveUpdates(_0x1b1dc5,_0x2ff6d3){return function(_0x22d351){if(_0x22d351){return _0x22d351[_0x75d8('0x27')](_0x1b1dc5)[_0x75d8('0x28')](function(_0xc85162){return _0xc85162;});}return null;};}function removeEntity(_0x46b8ae,_0x362b33){return function(_0x2cf6c4){if(_0x2cf6c4){return _0x2cf6c4[_0x75d8('0x29')]()[_0x75d8('0x28')](function(){_0x46b8ae[_0x75d8('0x1b')](0xcc)[_0x75d8('0x1c')]();});}};}function handleEntityNotFound(_0x280c43,_0x3aa8fd){return function(_0x42359e){if(!_0x42359e){_0x280c43[_0x75d8('0x1a')](0x194);}return _0x42359e;};}function handleError(_0x55c802,_0x1a0022){_0x1a0022=_0x1a0022||0x1f4;return function(_0x59063d){logger[_0x75d8('0x2a')](_0x59063d[_0x75d8('0x2b')]);if(_0x59063d[_0x75d8('0x2c')]){delete _0x59063d[_0x75d8('0x2c')];}_0x55c802['status'](_0x1a0022)[_0x75d8('0x2d')](_0x59063d);};}exports[_0x75d8('0x2e')]=function(_0x24747d,_0x5092c8){var _0xf1d7fb={},_0x36590e={},_0x44c0fd={'count':0x0,'rows':[]};var _0x188ae1=_[_0x75d8('0x2f')](db[_0x75d8('0x30')][_0x75d8('0x31')],function(_0x4836cf){return{'name':_0x4836cf[_0x75d8('0x32')],'type':_0x4836cf['type'][_0x75d8('0x33')]};});_0x36590e[_0x75d8('0x34')]=_[_0x75d8('0x2f')](_0x188ae1,_0x75d8('0x2c'));_0x36590e[_0x75d8('0x35')]=_[_0x75d8('0x36')](_0x24747d[_0x75d8('0x35')]);_0x36590e[_0x75d8('0x37')]=_[_0x75d8('0x38')](_0x36590e['model'],_0x36590e[_0x75d8('0x35')]);_0xf1d7fb['attributes']=_[_0x75d8('0x38')](_0x36590e[_0x75d8('0x34')],qs[_0x75d8('0x39')](_0x24747d[_0x75d8('0x35')][_0x75d8('0x39')]));_0xf1d7fb['attributes']=_0xf1d7fb[_0x75d8('0x3a')][_0x75d8('0x3b')]?_0xf1d7fb[_0x75d8('0x3a')]:_0x36590e[_0x75d8('0x34')];if(!_0x24747d['query'][_0x75d8('0x3c')]('nolimit')){_0xf1d7fb[_0x75d8('0x20')]=qs[_0x75d8('0x20')](_0x24747d[_0x75d8('0x35')][_0x75d8('0x20')]);_0xf1d7fb[_0x75d8('0x1e')]=qs[_0x75d8('0x1e')](_0x24747d[_0x75d8('0x35')][_0x75d8('0x1e')]);}_0xf1d7fb[_0x75d8('0x3d')]=qs[_0x75d8('0x3e')](_0x24747d[_0x75d8('0x35')][_0x75d8('0x3e')]);_0xf1d7fb['where']=qs[_0x75d8('0x37')](_[_0x75d8('0x3f')](_0x24747d['query'],_0x36590e[_0x75d8('0x37')]),_0x188ae1);if(_0x24747d[_0x75d8('0x35')][_0x75d8('0x40')]){_0xf1d7fb[_0x75d8('0x41')]=_[_0x75d8('0x42')](_0xf1d7fb[_0x75d8('0x41')],{'$or':_[_0x75d8('0x2f')](_0x188ae1,function(_0x2fe949){if(_0x2fe949[_0x75d8('0x43')]!=='VIRTUAL'){var _0x256e27={};_0x256e27[_0x2fe949[_0x75d8('0x2c')]]={'$like':'%'+_0x24747d['query'][_0x75d8('0x40')]+'%'};return _0x256e27;}})});}_0xf1d7fb=_[_0x75d8('0x42')]({},_0xf1d7fb,_0x24747d['options']);var _0x4c7788={'where':_0xf1d7fb['where']};return db['ChatTransferReport'][_0x75d8('0x21')](_0x4c7788)[_0x75d8('0x28')](function(_0x19f35b){_0x44c0fd['count']=_0x19f35b;if(_0x24747d[_0x75d8('0x35')][_0x75d8('0x44')]){_0xf1d7fb[_0x75d8('0x45')]=[{'all':!![]}];}return db[_0x75d8('0x30')][_0x75d8('0x46')](_0xf1d7fb);})[_0x75d8('0x28')](function(_0x248b68){_0x44c0fd['rows']=_0x248b68;return _0x44c0fd;})[_0x75d8('0x28')](respondWithFilteredResult(_0x5092c8,_0xf1d7fb))[_0x75d8('0x47')](handleError(_0x5092c8,null));};exports['show']=function(_0x3cdc3d,_0x47fc37){var _0xd15396={'raw':!![],'where':{'id':_0x3cdc3d['params']['id']}},_0x49ef96={};_0x49ef96[_0x75d8('0x34')]=_[_0x75d8('0x36')](db[_0x75d8('0x30')]['rawAttributes']);_0x49ef96[_0x75d8('0x35')]=_[_0x75d8('0x36')](_0x3cdc3d[_0x75d8('0x35')]);_0x49ef96['filters']=_[_0x75d8('0x38')](_0x49ef96[_0x75d8('0x34')],_0x49ef96['query']);_0xd15396[_0x75d8('0x3a')]=_['intersection'](_0x49ef96[_0x75d8('0x34')],qs[_0x75d8('0x39')](_0x3cdc3d[_0x75d8('0x35')]['fields']));_0xd15396[_0x75d8('0x3a')]=_0xd15396['attributes'][_0x75d8('0x3b')]?_0xd15396[_0x75d8('0x3a')]:_0x49ef96[_0x75d8('0x34')];if(_0x3cdc3d[_0x75d8('0x35')][_0x75d8('0x44')]){_0xd15396[_0x75d8('0x45')]=[{'all':!![]}];}_0xd15396=_['merge']({},_0xd15396,_0x3cdc3d['options']);return db[_0x75d8('0x30')]['find'](_0xd15396)['then'](handleEntityNotFound(_0x47fc37,null))['then'](respondWithResult(_0x47fc37,null))[_0x75d8('0x47')](handleError(_0x47fc37,null));};exports[_0x75d8('0x48')]=function(_0x4e48fb,_0x42f00e){return db[_0x75d8('0x30')][_0x75d8('0x48')](_0x4e48fb[_0x75d8('0x49')],{})[_0x75d8('0x28')](respondWithResult(_0x42f00e,0xc9))[_0x75d8('0x47')](handleError(_0x42f00e,null));};exports[_0x75d8('0x27')]=function(_0x583b08,_0x9f3dde){if(_0x583b08['body']['id']){delete _0x583b08[_0x75d8('0x49')]['id'];}return db[_0x75d8('0x30')][_0x75d8('0x4a')]({'where':{'id':_0x583b08[_0x75d8('0x4b')]['id']}})[_0x75d8('0x28')](handleEntityNotFound(_0x9f3dde,null))[_0x75d8('0x28')](saveUpdates(_0x583b08['body'],null))[_0x75d8('0x28')](respondWithResult(_0x9f3dde,null))[_0x75d8('0x47')](handleError(_0x9f3dde,null));};exports['destroy']=function(_0x149979,_0x580432){return db[_0x75d8('0x30')][_0x75d8('0x4a')]({'where':{'id':_0x149979[_0x75d8('0x4b')]['id']}})[_0x75d8('0x28')](handleEntityNotFound(_0x580432,null))['then'](removeEntity(_0x580432,null))[_0x75d8('0x47')](handleError(_0x580432,null));};exports[_0x75d8('0x4c')]=function(_0x2e0a2b,_0x40fcfb){return db[_0x75d8('0x30')][_0x75d8('0x4c')]()[_0x75d8('0x28')](respondWithResult(_0x40fcfb,null))[_0x75d8('0x47')](handleError(_0x40fcfb,null));};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.model.js b/server/api/chatTransferReport/chatTransferReport.model.js
index 742c075..36dab45 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 _0xd5fb=['moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatTransferReport.attributes','exports','ChatTransferReport','report_chat_transfer','uniqueid','lodash','util','../../config/logger'];(function(_0x254081,_0x20731a){var _0x5d1e2a=function(_0x597854){while(--_0x597854){_0x254081['push'](_0x254081['shift']());}};_0x5d1e2a(++_0x20731a);}(_0xd5fb,0x6d));var _0xbd5f=function(_0x33a432,_0x1acced){_0x33a432=_0x33a432-0x0;var _0x45bd47=_0xd5fb[_0x33a432];return _0x45bd47;};'use strict';var _=require(_0xbd5f('0x0'));var util=require(_0xbd5f('0x1'));var logger=require(_0xbd5f('0x2'))('api');var moment=require(_0xbd5f('0x3'));var BPromise=require(_0xbd5f('0x4'));var rp=require(_0xbd5f('0x5'));var fs=require('fs');var path=require(_0xbd5f('0x6'));var rimraf=require(_0xbd5f('0x7'));var config=require(_0xbd5f('0x8'));var attributes=require(_0xbd5f('0x9'));module[_0xbd5f('0xa')]=function(_0x43c942,_0x5e592f){return _0x43c942['define'](_0xbd5f('0xb'),attributes,{'tableName':_0xbd5f('0xc'),'paranoid':![],'indexes':[{'name':_0xbd5f('0xd'),'fields':[_0xbd5f('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x4ee5=['./chatTransferReport.attributes','exports','define','uniqueid','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment'];(function(_0x2faddb,_0xc18b78){var _0x273c05=function(_0x1a3785){while(--_0x1a3785){_0x2faddb['push'](_0x2faddb['shift']());}};_0x273c05(++_0xc18b78);}(_0x4ee5,0x12d));var _0x54ee=function(_0x49dbe,_0x5906d7){_0x49dbe=_0x49dbe-0x0;var _0x3f541d=_0x4ee5[_0x49dbe];return _0x3f541d;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x54ee('0x0'))(_0x54ee('0x1'));var moment=require(_0x54ee('0x2'));var BPromise=require('bluebird');var rp=require(_0x54ee('0x3'));var fs=require('fs');var path=require(_0x54ee('0x4'));var rimraf=require(_0x54ee('0x5'));var config=require(_0x54ee('0x6'));var attributes=require(_0x54ee('0x7'));module[_0x54ee('0x8')]=function(_0x10297b,_0x3bc2bf){return _0x10297b[_0x54ee('0x9')]('ChatTransferReport',attributes,{'tableName':'report_chat_transfer','paranoid':![],'indexes':[{'name':_0x54ee('0xa'),'fields':[_0x54ee('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 618099a..0d0b698 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 _0x5172=['stringify','error','code','ChatTransferReport,\x20%s,\x20%s','message','result','catch','util','moment','randomstring','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','request','then','info','request\x20sent','debug'];(function(_0x10a160,_0x1d07ce){var _0x141ec9=function(_0x302d3a){while(--_0x302d3a){_0x10a160['push'](_0x10a160['shift']());}};_0x141ec9(++_0x1d07ce);}(_0x5172,0x16c));var _0x2517=function(_0x5586fe,_0x2edbe){_0x5586fe=_0x5586fe-0x0;var _0x114a56=_0x5172[_0x5586fe];return _0x114a56;};'use strict';var _=require('lodash');var util=require(_0x2517('0x0'));var moment=require(_0x2517('0x1'));var BPromise=require('bluebird');var rs=require(_0x2517('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2517('0x3'))['db'];var utils=require(_0x2517('0x4'));var logger=require('../../config/logger')(_0x2517('0x5'));var config=require('../../config/environment');var jayson=require(_0x2517('0x6'));var client=jayson[_0x2517('0x7')][_0x2517('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x465380,_0x261b39,_0x2a13f5){return new BPromise(function(_0x225346,_0x2e8ed4){return client[_0x2517('0x9')](_0x465380,_0x2a13f5)[_0x2517('0xa')](function(_0x38ac25){logger[_0x2517('0xb')]('ChatTransferReport,\x20%s,\x20%s',_0x261b39,_0x2517('0xc'));logger[_0x2517('0xd')]('ChatTransferReport,\x20%s,\x20%s,\x20%s',_0x261b39,'request\x20sent',JSON[_0x2517('0xe')](_0x38ac25));if(_0x38ac25[_0x2517('0xf')]){if(_0x38ac25['error'][_0x2517('0x10')]===0x1f4){logger['error'](_0x2517('0x11'),_0x261b39,_0x38ac25[_0x2517('0xf')][_0x2517('0x12')]);return _0x2e8ed4(_0x38ac25['error'][_0x2517('0x12')]);}logger[_0x2517('0xf')](_0x2517('0x11'),_0x261b39,_0x38ac25[_0x2517('0xf')]['message']);return _0x225346(_0x38ac25[_0x2517('0xf')]['message']);}else{logger[_0x2517('0xb')](_0x2517('0x11'),_0x261b39,_0x2517('0xc'));_0x225346(_0x38ac25[_0x2517('0x13')][_0x2517('0x12')]);}})[_0x2517('0x14')](function(_0x5b389b){logger[_0x2517('0xf')]('ChatTransferReport,\x20%s,\x20%s',_0x261b39,_0x5b389b);_0x2e8ed4(_0x5b389b);});});}
\ No newline at end of file
+var _0xd35d=['util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','request','then','ChatTransferReport,\x20%s,\x20%s','request\x20sent','debug','stringify','code','error','message','info','result','catch','lodash'];(function(_0x5caf7e,_0x52e1bc){var _0x5c3435=function(_0xb77e11){while(--_0xb77e11){_0x5caf7e['push'](_0x5caf7e['shift']());}};_0x5c3435(++_0x52e1bc);}(_0xd35d,0x1a1));var _0xdd35=function(_0x4f08dd,_0x3784ec){_0x4f08dd=_0x4f08dd-0x0;var _0x3017ee=_0xd35d[_0x4f08dd];return _0x3017ee;};'use strict';var _=require(_0xdd35('0x0'));var util=require(_0xdd35('0x1'));var moment=require(_0xdd35('0x2'));var BPromise=require(_0xdd35('0x3'));var rs=require(_0xdd35('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xdd35('0x5'))['db'];var utils=require(_0xdd35('0x6'));var logger=require(_0xdd35('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0xdd35('0x8'));var client=jayson[_0xdd35('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x520d6c,_0xafbb59,_0x3d1c74){return new BPromise(function(_0x3aa33a,_0x44754c){return client[_0xdd35('0xa')](_0x520d6c,_0x3d1c74)[_0xdd35('0xb')](function(_0x590240){logger['info'](_0xdd35('0xc'),_0xafbb59,_0xdd35('0xd'));logger[_0xdd35('0xe')]('ChatTransferReport,\x20%s,\x20%s,\x20%s',_0xafbb59,'request\x20sent',JSON[_0xdd35('0xf')](_0x590240));if(_0x590240['error']){if(_0x590240['error'][_0xdd35('0x10')]===0x1f4){logger['error']('ChatTransferReport,\x20%s,\x20%s',_0xafbb59,_0x590240[_0xdd35('0x11')][_0xdd35('0x12')]);return _0x44754c(_0x590240['error'][_0xdd35('0x12')]);}logger[_0xdd35('0x11')](_0xdd35('0xc'),_0xafbb59,_0x590240[_0xdd35('0x11')][_0xdd35('0x12')]);return _0x3aa33a(_0x590240[_0xdd35('0x11')][_0xdd35('0x12')]);}else{logger[_0xdd35('0x13')](_0xdd35('0xc'),_0xafbb59,_0xdd35('0xd'));_0x3aa33a(_0x590240[_0xdd35('0x14')][_0xdd35('0x12')]);}})[_0xdd35('0x15')](function(_0x4bafc8){logger['error'](_0xdd35('0xc'),_0xafbb59,_0x4bafc8);_0x44754c(_0x4bafc8);});});}
\ No newline at end of file
diff --git a/server/api/chatTransferReport/index.js b/server/api/chatTransferReport/index.js
index 95b7546..66c92e9 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 _0xa359=['update','destroy','exports','multer','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatTransferReport.controller','get','isAuthenticated','index','/describe','describe','/:id','post','put'];(function(_0x380d16,_0xdf0d31){var _0x5d5253=function(_0x7a25bc){while(--_0x7a25bc){_0x380d16['push'](_0x380d16['shift']());}};_0x5d5253(++_0xdf0d31);}(_0xa359,0x16c));var _0x9a35=function(_0x37358d,_0x2a91e7){_0x37358d=_0x37358d-0x0;var _0x379c7e=_0xa359[_0x37358d];return _0x379c7e;};'use strict';var multer=require(_0x9a35('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x9a35('0x1'));var express=require('express');var router=express[_0x9a35('0x2')]();var fs_extra=require(_0x9a35('0x3'));var auth=require(_0x9a35('0x4'));var interaction=require(_0x9a35('0x5'));var config=require(_0x9a35('0x6'));var controller=require(_0x9a35('0x7'));router[_0x9a35('0x8')]('/',auth[_0x9a35('0x9')](),controller[_0x9a35('0xa')]);router[_0x9a35('0x8')](_0x9a35('0xb'),auth[_0x9a35('0x9')](),controller[_0x9a35('0xc')]);router[_0x9a35('0x8')](_0x9a35('0xd'),auth['isAuthenticated'](),controller['show']);router[_0x9a35('0xe')]('/',auth['isAuthenticated'](),controller['create']);router[_0x9a35('0xf')]('/:id',auth[_0x9a35('0x9')](),controller[_0x9a35('0x10')]);router['delete'](_0x9a35('0xd'),auth[_0x9a35('0x9')](),controller[_0x9a35('0x11')]);module[_0x9a35('0x12')]=router;
\ No newline at end of file
+var _0x4a70=['/describe','describe','/:id','create','exports','multer','path','connect-timeout','../../components/interaction/service','./chatTransferReport.controller','get','isAuthenticated','index'];(function(_0x2714ec,_0x36daa4){var _0x2608e5=function(_0x408468){while(--_0x408468){_0x2714ec['push'](_0x2714ec['shift']());}};_0x2608e5(++_0x36daa4);}(_0x4a70,0x1f3));var _0x04a7=function(_0x104a84,_0x285970){_0x104a84=_0x104a84-0x0;var _0x4973ff=_0x4a70[_0x104a84];return _0x4973ff;};'use strict';var multer=require(_0x04a7('0x0'));var util=require('util');var path=require(_0x04a7('0x1'));var timeout=require(_0x04a7('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x04a7('0x3'));var config=require('../../config/environment');var controller=require(_0x04a7('0x4'));router[_0x04a7('0x5')]('/',auth[_0x04a7('0x6')](),controller[_0x04a7('0x7')]);router[_0x04a7('0x5')](_0x04a7('0x8'),auth[_0x04a7('0x6')](),controller[_0x04a7('0x9')]);router[_0x04a7('0x5')](_0x04a7('0xa'),auth[_0x04a7('0x6')](),controller['show']);router['post']('/',auth[_0x04a7('0x6')](),controller[_0x04a7('0xb')]);router['put'](_0x04a7('0xa'),auth[_0x04a7('0x6')](),controller['update']);router['delete'](_0x04a7('0xa'),auth[_0x04a7('0x6')](),controller['destroy']);module[_0x04a7('0xc')]=router;
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.attributes.js b/server/api/chatWebsite/chatWebsite.attributes.js
index 2c79891..fbeda16 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 _0x41bb=['Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}','sequelize','randomstring','STRING','address','email','#011F6A','#ffffff','INTEGER','BOOLEAN','rounded','We\x20are\x20here!','Chat','Send','Contact\x20us','TEXT','Do\x20you\x20want\x20to\x20close\x20the\x20interaction?','Form\x20properly\x20submitted','Form\x20submission\x20error','Note','Type\x20a\x20message','Thanks\x20you\x20for\x20your\x20time!','Skip','ENUM','star','thumb','name','text','getDataValue','onlineForm','setDataValue','stringify','textarea','Comments','Leave\x20your\x20comments','offlineForm','parse','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','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','website_alias','CHAT','alternate','#fafafa','System','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','mandatoryDispositionPauseId','Generated\x20by\x20XCALLY\x20Motion'];(function(_0x3476ef,_0x32ea5a){var _0x3fd996=function(_0x21abd8){while(--_0x21abd8){_0x3476ef['push'](_0x3476ef['shift']());}};_0x3fd996(++_0x32ea5a);}(_0x41bb,0xc5));var _0xb41b=function(_0x17bc0b,_0x6a110c){_0x17bc0b=_0x17bc0b-0x0;var _0x3c82a2=_0x41bb[_0x17bc0b];return _0x3c82a2;};'use strict';var Sequelize=require(_0xb41b('0x0'));var rs=require(_0xb41b('0x1'));module['exports']={'name':{'type':Sequelize[_0xb41b('0x2')],'allowNull':![]},'address':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0xb41b('0x3')},'description':{'type':Sequelize[_0xb41b('0x2')]},'mapKey':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0x4')},'mapKeyOffline':{'type':Sequelize['STRING'],'defaultValue':_0xb41b('0x4')},'key':{'type':Sequelize[_0xb41b('0x2')],'allowNull':![]},'agentAlias':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':'Agent'},'customerAlias':{'type':Sequelize['STRING'],'defaultValue':'Me'},'color':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xb41b('0x5'),'validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0xb41b('0x2')],'allowNull':![],'defaultValue':'#011F6A','validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize[_0xb41b('0x2')],'allowNull':![],'defaultValue':_0xb41b('0x6'),'validate':{'notEmpty':!![]}},'textButtonColor':{'type':Sequelize[_0xb41b('0x2')],'allowNull':![],'defaultValue':_0xb41b('0x6'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0xb41b('0x7')],'defaultValue':0xf},'remote':{'type':Sequelize[_0xb41b('0x2')]},'animation':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':!![]},'header_shape':{'type':Sequelize['ENUM'](_0xb41b('0x9'),'squared'),'defaultValue':_0xb41b('0x9')},'header_online':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0xa')},'start_chat_button':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0xb')},'offline_chat_button':{'type':Sequelize['STRING'],'defaultValue':_0xb41b('0xc')},'header_offline':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0xd')},'download_transcript':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':!![]},'timeout':{'type':Sequelize[_0xb41b('0x7')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize['STRING'],'defaultValue':'Powered\x20by\x20xCALLY'},'defaultWhiteLabel':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0xb41b('0xe')]},'closingQuestion':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0xf')},'formSubmitSuccessMessage':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0x10')},'formSubmitFailureMessage':{'type':Sequelize['STRING'],'defaultValue':_0xb41b('0x11')},'noteTitle':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0x12')},'placeholderMessage':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0x13')},'closingMessage':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0x14')},'closingMessageButton':{'type':Sequelize['STRING'],'defaultValue':'Send'},'skipMessageButton':{'type':Sequelize['STRING'],'defaultValue':_0xb41b('0x15')},'conditionAgreement':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableRating':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':![]},'enableFeedback':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':![]},'enableSendButton':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':![]},'feedbackTitle':{'type':Sequelize['STRING'],'defaultValue':'Feedback'},'ratingType':{'type':Sequelize[_0xb41b('0x16')](_0xb41b('0x17'),_0xb41b('0x18')),'defaultValue':_0xb41b('0x17')},'ratingStarsNumber':{'type':Sequelize[_0xb41b('0x7')],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0xb41b('0xe')],'defaultValue':function(){return JSON['stringify']({'items':[{'type':'input','variable':null,'config':{'placeholder':_0xb41b('0x19'),'type':_0xb41b('0x1a'),'required':!![]},'props':{'title':_0xb41b('0x19'),'helpText':''}},{'type':'input','props':{'title':_0xb41b('0x4'),'helpText':''},'config':{'required':!![],'placeholder':_0xb41b('0x4'),'type':'email'},'variable':null}],'fromKey':0x1});},'get':function(){return this[_0xb41b('0x1b')](_0xb41b('0x1c'))?JSON['parse'](this[_0xb41b('0x1b')]('onlineForm')):{};},'set':function(_0x2d0f27){return this[_0xb41b('0x1d')]('onlineForm',JSON[_0xb41b('0x1e')](_0x2d0f27));}},'offlineForm':{'type':Sequelize[_0xb41b('0xe')],'defaultValue':function(){return JSON['stringify']({'items':[{'type':'input','props':{'title':_0xb41b('0x4'),'helpText':''},'config':{'required':!![],'placeholder':_0xb41b('0x4'),'type':_0xb41b('0x4')},'variable':null},{'type':_0xb41b('0x1f'),'config':{'placeholder':_0xb41b('0x20')},'props':{'title':_0xb41b('0x20'),'helpText':_0xb41b('0x21')}}],'fromKey':0x0});},'get':function(){return this['getDataValue'](_0xb41b('0x22'))?JSON[_0xb41b('0x23')](this['getDataValue'](_0xb41b('0x22'))):{};},'set':function(_0x482764){return this[_0xb41b('0x1d')](_0xb41b('0x22'),JSON['stringify'](_0x482764));}},'token':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':function(){return rs['generate']();}},'autoclose':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0xb41b('0x2')]},'forwardOffline':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize[_0xb41b('0x2')]},'waitingTitle':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0x24')},'waitingMessage':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0x25')},'offlineMessageSubject':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0x26')},'offlineMessageBody':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':'You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:'},'enableUnmanagedNote':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize['STRING'],'defaultValue':'Your\x20request\x20has\x20not\x20been\x20processed.'},'skipUnmanaged':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0x15')},'sendUnmanaged':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0xc')},'enableCustomerAttachment':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':![]},'agentAvatar':{'type':Sequelize[_0xb41b('0xe')]},'showAgentAvatar':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':![]},'timezone':{'type':Sequelize[_0xb41b('0x2')]},'notificationTemplate':{'type':Sequelize[_0xb41b('0xe')],'defaultValue':function(){return _0xb41b('0x27');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0x28')},'waitForTheAssignedAgent':{'type':Sequelize[_0xb41b('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':'bottom_right'},'verticalAlignment':{'type':Sequelize['INTEGER'],'defaultValue':0x1e},'labelText':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0x29')},'messagesAlignment':{'type':Sequelize['STRING'],'defaultValue':_0xb41b('0x2a')},'defaultTitle':{'type':Sequelize[_0xb41b('0x2')]},'customerAvatar':{'type':Sequelize[_0xb41b('0xe')]},'showCustomerAvatar':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':![]},'messageFontSize':{'type':Sequelize[_0xb41b('0x7')],'defaultValue':0xc},'backgroundColor':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xb41b('0x2b'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0xb41b('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xb41b('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':_0xb41b('0x2c')},'systemAvatar':{'type':Sequelize[_0xb41b('0xe')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0xb41b('0x7')],'comment':_0xb41b('0x2d')},'mandatoryDisposition':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x49e8c4){if(!_0x49e8c4)this['setDataValue'](_0xb41b('0x2e'),null);this['setDataValue']('mandatoryDisposition',_0x49e8c4);}},'vidaooEscalation':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize['STRING']},'vidaooTopic':{'type':Sequelize[_0xb41b('0x2')],'allowNull':![],'defaultValue':_0xb41b('0x2f')},'vidaooNote':{'type':Sequelize[_0xb41b('0x2')],'defaultValue':function(){return _0xb41b('0x30');}},'vidaooMetadata':{'type':Sequelize[_0xb41b('0xe')],'defaultValue':null},'openNewInteraction':{'type':Sequelize[_0xb41b('0x8')],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize[_0xb41b('0xe')]}};
\ No newline at end of file
+var _0x3c81=['bottom_right','alternate','#fafafa','System','mandatoryDispositionPauseId','mandatoryDisposition','Generated\x20by\x20XCALLY\x20Motion','Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}','sequelize','randomstring','STRING','email','Agent','#ffffff','INTEGER','BOOLEAN','ENUM','rounded','squared','We\x20are\x20here!','Send','Contact\x20us','TEXT','Do\x20you\x20want\x20to\x20close\x20the\x20interaction?','Form\x20properly\x20submitted','Note','Type\x20a\x20message','Thanks\x20you\x20for\x20your\x20time!','Skip','Feedback','star','thumb','stringify','name','text','input','parse','getDataValue','setDataValue','onlineForm','textarea','Leave\x20your\x20comments','offlineForm','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}}','website_alias'];(function(_0x2c1c48,_0x5f29b6){var _0x37e11f=function(_0xa60dfc){while(--_0xa60dfc){_0x2c1c48['push'](_0x2c1c48['shift']());}};_0x37e11f(++_0x5f29b6);}(_0x3c81,0x102));var _0x13c8=function(_0x404257,_0x416f1c){_0x404257=_0x404257-0x0;var _0x2b8640=_0x3c81[_0x404257];return _0x2b8640;};'use strict';var Sequelize=require(_0x13c8('0x0'));var rs=require(_0x13c8('0x1'));module['exports']={'name':{'type':Sequelize[_0x13c8('0x2')],'allowNull':![]},'address':{'type':Sequelize[_0x13c8('0x2')],'allowNull':![],'unique':'address'},'description':{'type':Sequelize['STRING']},'mapKey':{'type':Sequelize['STRING'],'defaultValue':'email'},'mapKeyOffline':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0x3')},'key':{'type':Sequelize[_0x13c8('0x2')],'allowNull':![]},'agentAlias':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0x4')},'customerAlias':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':'Me'},'color':{'type':Sequelize[_0x13c8('0x2')],'allowNull':![],'defaultValue':'#011F6A','validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0x13c8('0x2')],'allowNull':![],'defaultValue':'#011F6A','validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize[_0x13c8('0x2')],'allowNull':![],'defaultValue':_0x13c8('0x5'),'validate':{'notEmpty':!![]}},'textButtonColor':{'type':Sequelize[_0x13c8('0x2')],'allowNull':![],'defaultValue':_0x13c8('0x5'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0x13c8('0x6')],'defaultValue':0xf},'remote':{'type':Sequelize[_0x13c8('0x2')]},'animation':{'type':Sequelize[_0x13c8('0x7')],'defaultValue':!![]},'header_shape':{'type':Sequelize[_0x13c8('0x8')](_0x13c8('0x9'),_0x13c8('0xa')),'defaultValue':_0x13c8('0x9')},'header_online':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0xb')},'start_chat_button':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':'Chat'},'offline_chat_button':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0xc')},'header_offline':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0xd')},'download_transcript':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'timeout':{'type':Sequelize[_0x13c8('0x6')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize['STRING'],'defaultValue':'Powered\x20by\x20xCALLY'},'defaultWhiteLabel':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0x13c8('0xe')]},'closingQuestion':{'type':Sequelize['STRING'],'defaultValue':_0x13c8('0xf')},'formSubmitSuccessMessage':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0x10')},'formSubmitFailureMessage':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':'Form\x20submission\x20error'},'noteTitle':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0x11')},'placeholderMessage':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0x12')},'closingMessage':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0x13')},'closingMessageButton':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0xc')},'skipMessageButton':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0x14')},'conditionAgreement':{'type':Sequelize[_0x13c8('0x7')],'defaultValue':![]},'enableRating':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableFeedback':{'type':Sequelize[_0x13c8('0x7')],'defaultValue':![]},'enableSendButton':{'type':Sequelize[_0x13c8('0x7')],'defaultValue':![]},'feedbackTitle':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0x15')},'ratingType':{'type':Sequelize['ENUM'](_0x13c8('0x16'),_0x13c8('0x17')),'defaultValue':_0x13c8('0x16')},'ratingStarsNumber':{'type':Sequelize[_0x13c8('0x6')],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0x13c8('0xe')],'defaultValue':function(){return JSON[_0x13c8('0x18')]({'items':[{'type':'input','variable':null,'config':{'placeholder':_0x13c8('0x19'),'type':_0x13c8('0x1a'),'required':!![]},'props':{'title':_0x13c8('0x19'),'helpText':''}},{'type':_0x13c8('0x1b'),'props':{'title':'email','helpText':''},'config':{'required':!![],'placeholder':_0x13c8('0x3'),'type':_0x13c8('0x3')},'variable':null}],'fromKey':0x1});},'get':function(){return this['getDataValue']('onlineForm')?JSON[_0x13c8('0x1c')](this[_0x13c8('0x1d')]('onlineForm')):{};},'set':function(_0x5ad0dc){return this[_0x13c8('0x1e')](_0x13c8('0x1f'),JSON['stringify'](_0x5ad0dc));}},'offlineForm':{'type':Sequelize['TEXT'],'defaultValue':function(){return JSON[_0x13c8('0x18')]({'items':[{'type':'input','props':{'title':'email','helpText':''},'config':{'required':!![],'placeholder':_0x13c8('0x3'),'type':_0x13c8('0x3')},'variable':null},{'type':_0x13c8('0x20'),'config':{'placeholder':'Comments'},'props':{'title':'Comments','helpText':_0x13c8('0x21')}}],'fromKey':0x0});},'get':function(){return this[_0x13c8('0x1d')](_0x13c8('0x22'))?JSON[_0x13c8('0x1c')](this[_0x13c8('0x1d')](_0x13c8('0x22'))):{};},'set':function(_0x343080){return this['setDataValue'](_0x13c8('0x22'),JSON[_0x13c8('0x18')](_0x343080));}},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs['generate']();}},'autoclose':{'type':Sequelize[_0x13c8('0x7')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0x13c8('0x7')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0x13c8('0x2')]},'forwardOffline':{'type':Sequelize[_0x13c8('0x7')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize['STRING']},'waitingTitle':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0x23')},'waitingMessage':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0x24')},'offlineMessageSubject':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0x25')},'offlineMessageBody':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0x26')},'enableUnmanagedNote':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize['STRING'],'defaultValue':_0x13c8('0x27')},'skipUnmanaged':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':'Skip'},'sendUnmanaged':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':'Send'},'enableCustomerAttachment':{'type':Sequelize[_0x13c8('0x7')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentAvatar':{'type':Sequelize[_0x13c8('0xe')]},'showAgentAvatar':{'type':Sequelize[_0x13c8('0x7')],'defaultValue':![]},'timezone':{'type':Sequelize[_0x13c8('0x2')]},'notificationTemplate':{'type':Sequelize[_0x13c8('0xe')],'defaultValue':function(){return _0x13c8('0x28');}},'notificationSound':{'type':Sequelize[_0x13c8('0x7')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x13c8('0x7')],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentIdentifier':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0x29')},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0x2a')},'verticalAlignment':{'type':Sequelize[_0x13c8('0x6')],'defaultValue':0x1e},'labelText':{'type':Sequelize['STRING'],'defaultValue':'CHAT'},'messagesAlignment':{'type':Sequelize['STRING'],'defaultValue':_0x13c8('0x2b')},'defaultTitle':{'type':Sequelize[_0x13c8('0x2')]},'customerAvatar':{'type':Sequelize[_0x13c8('0xe')]},'showCustomerAvatar':{'type':Sequelize[_0x13c8('0x7')],'defaultValue':![]},'messageFontSize':{'type':Sequelize[_0x13c8('0x6')],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0x13c8('0x2')],'allowNull':![],'defaultValue':_0x13c8('0x2c'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize[_0x13c8('0x7')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x13c8('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':_0x13c8('0x2d')},'systemAvatar':{'type':Sequelize[_0x13c8('0xe')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0x13c8('0x6')],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0x13c8('0x7')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x343dba){if(!_0x343dba)this[_0x13c8('0x1e')](_0x13c8('0x2e'),null);this[_0x13c8('0x1e')](_0x13c8('0x2f'),_0x343dba);}},'vidaooEscalation':{'type':Sequelize[_0x13c8('0x7')],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize[_0x13c8('0x2')]},'vidaooTopic':{'type':Sequelize[_0x13c8('0x2')],'allowNull':![],'defaultValue':_0x13c8('0x30')},'vidaooNote':{'type':Sequelize[_0x13c8('0x2')],'defaultValue':function(){return _0x13c8('0x31');}},'vidaooMetadata':{'type':Sequelize[_0x13c8('0xe')],'defaultValue':null},'openNewInteraction':{'type':Sequelize[_0x13c8('0x7')],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize[_0x13c8('0xe')]}};
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.controller.js b/server/api/chatWebsite/chatWebsite.controller.js
index 596a0bf..ddab955 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 _0x68db=['systemAvatar','getLogo','join','root','getLicense','custom','isNil','existsSync','server/files/images/logos/','download','getAvatar','server/files/images/avatars/default_avatar.png','server/files/images/avatars/','getCustomerAvatar','getSystemAvatar','server/files/images/avatars/system_avatar.png','notify','user-agent-parser','setUA','headers','user-agent','getResult','chat','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','difference','updatedAt','createdAt','CompanyId','ListId','from','from\x20is\x20mandatory','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','mapKey','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','List','DESC','ChatApplication','Applications','account','list','applications','orderBy','priority','asc','Contacts','defaults','customerIp','cf-connecting-ip','first','x-forwarded-for','split','firstName','browser','version','format','unknown','device','vendor','%s\x20%s\x20%s','threadId','ChatInteraction','externalUrl','ContactId','interaction','spread','contact','lastName','messageId','get','created','autoclose','close','unmanaged','*,*,*,*','ChatMessage','AttachmentId','UserId','User','waitForTheAssignedAgent','forcedOwnership','Start','EventManager','offline','files','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKeyOffline','mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','MailAccount','findOrCreate','server/files/templates/chatOfflineMessage.ejs','utf8','render','offlineMessageBody','ChatOfflineMessage','fromString','originalname','mimetype','server','attachments','offline-chat','openNewInteraction','sequelize','transaction','Attachment','bulkCreate','CloudProvider','Smtp','getSmtpOptions','SendMail','sendMail','\x22%s\x22\x20<%s>','email','offlineMessageSubject','MailAccountId','subjectOffline','toPairsIn','Chat','NotifyMailAccount','notifyMail','remove','addInteraction','ids','omit','getInteractions','Contact','fullname','internal','Tags','color','tag','iftime\x20%s,%s','timezone','iftime\x20%s','interval','[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)','ONLINE','OFFLINE','No\x20timezone','getSnippet','Interval','getProactiveActions','../../config/license/util','chatLicenseExceeded','Intervals','push','all','some','readFileSync','server/files/chat/iframe.ejs','URL','address','origin','3.1.0','remote','x-real-ip','connection','remoteAddress','referer','virtual','replace','alignment','verticalAlignment','labelText','textButtonColor','color_button','backgroundColor','hideWhenOffline','ISOLATION_LEVELS','READ_COMMITTED','findAndCountAll','finally','getApplications','addProactiveActions','ChatProactiveAction','getFields','online','false','offlineForm','items','fromKey','getOfflineMessages','Attachments','addAgents','userChatWebsite:save','removeAgents','isArray','emit','userChatWebsite:remove','getAgents','bluebird','mustache','fs-extra','querystring','ioredis','../../components/parsers/qs','api','../../config/environment','url','../../mysqldb','redis','localhost','./chatWebsite.socket','html-to-text','jayson/promise','client','http','then','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','sendStatus','status','end','json','offset','undefined','limit','set','destroy','ChatWebsites','UserProfileResource','stack','send','Pause','map','ChatWebsite','rawAttributes','fieldName','type','key','name','keys','intersection','model','attributes','fields','query','nolimit','order','sort','where','pick','filters','merge','options','count','includeAll','include','catch','show','params','mandatoryDispositionPause','length','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','describe','addDisposition','ChatWebsiteId','Disposition','hasOwnProperty','filter','findAll','removeDispositions','addAnswer','getAnswers','findOne','CannedAnswer','rows','removeAnswers','sitepic','filename','addAvatar','agentAvatar','addCustomerAvatar','customerAvatar','file','addSystemAvatar'];(function(_0x194ab1,_0x4f038c){var _0x34c079=function(_0x51e5bb){while(--_0x51e5bb){_0x194ab1['push'](_0x194ab1['shift']());}};_0x34c079(++_0x4f038c);}(_0x68db,0xc3));var _0xb68d=function(_0x215c2a,_0x52e74c){_0x215c2a=_0x215c2a-0x0;var _0x538f0d=_0x68db[_0x215c2a];return _0x538f0d;};'use strict';var BPromise=require(_0xb68d('0x0'));var Mustache=require(_0xb68d('0x1'));var util=require('util');var path=require('path');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xb68d('0x2'));var _=require('lodash');var querystring=require(_0xb68d('0x3'));var Redis=require(_0xb68d('0x4'));var qs=require(_0xb68d('0x5'));var logger=require('../../config/logger')(_0xb68d('0x6'));var config=require(_0xb68d('0x7'));var url=require(_0xb68d('0x8'));var db=require(_0xb68d('0x9'))['db'];config[_0xb68d('0xa')]=_['defaults'](config['redis'],{'host':_0xb68d('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xb68d('0xa')]));require(_0xb68d('0xc'))['register'](socket);var htmlToText=require(_0xb68d('0xd'));var jayson=require(_0xb68d('0xe'));var client=jayson[_0xb68d('0xf')]['http']({'port':0x232c});var client9002=jayson[_0xb68d('0xf')]['http']({'port':0x232a});var client9003=jayson[_0xb68d('0xf')][_0xb68d('0x10')]({'port':0x232b});var client9001=jayson['client']['http']({'port':0x2329});function respondWithRpcPromise(_0x534395,_0x135a55,_0x257272,_0x251ae8){return new BPromise(function(_0x15a9f0,_0x54c5b9){var _0x439048=_0x251ae8||client;return _0x439048['request'](_0x534395,_0x257272)[_0xb68d('0x11')](function(_0x4416e9){logger[_0xb68d('0x12')](_0xb68d('0x13'),_0x135a55,_0xb68d('0x14'));logger['debug'](_0xb68d('0x15'),_0x135a55,'request\x20sent',JSON[_0xb68d('0x16')](_0x4416e9));if(_0x4416e9[_0xb68d('0x17')]){if(_0x4416e9[_0xb68d('0x17')][_0xb68d('0x18')]===0x1f4){logger[_0xb68d('0x17')]('ChatWebsite,\x20%s,\x20%s',_0x135a55,_0x4416e9[_0xb68d('0x17')]['message']);return _0x54c5b9(_0x4416e9['error'][_0xb68d('0x19')]);}logger[_0xb68d('0x17')]('ChatWebsite,\x20%s,\x20%s',_0x135a55,_0x4416e9['error'][_0xb68d('0x19')]);return _0x15a9f0(_0x4416e9[_0xb68d('0x17')]['message']);}else{logger[_0xb68d('0x12')](_0xb68d('0x13'),_0x135a55,_0xb68d('0x14'));_0x15a9f0(_0x4416e9[_0xb68d('0x1a')][_0xb68d('0x19')]);}})['catch'](function(_0x44a318){logger[_0xb68d('0x17')](_0xb68d('0x13'),_0x135a55,_0x44a318);_0x54c5b9(_0x44a318);});});}function respondWithStatusCode(_0x3cf1ea,_0x2a9871){_0x2a9871=_0x2a9871||0xcc;return function(_0x3620f8){if(_0x3620f8){return _0x3cf1ea[_0xb68d('0x1b')](_0x2a9871);}return _0x3cf1ea[_0xb68d('0x1c')](_0x2a9871)[_0xb68d('0x1d')]();};}function respondWithResult(_0x31cd11,_0x39024e){_0x39024e=_0x39024e||0xc8;return function(_0x304131){if(_0x304131){return _0x31cd11[_0xb68d('0x1c')](_0x39024e)[_0xb68d('0x1e')](_0x304131);}};}function respondWithFilteredResult(_0x38f9d8,_0x32a933){return function(_0x4fb373){if(_0x4fb373){var _0x505750=typeof _0x32a933[_0xb68d('0x1f')]===_0xb68d('0x20')&&typeof _0x32a933[_0xb68d('0x21')]===_0xb68d('0x20');var _0x4af57b=_0x4fb373['count'];var _0x390a03=_0x505750?0x0:_0x32a933[_0xb68d('0x1f')];var _0x51e3ff=_0x505750?_0x4fb373['count']:_0x32a933[_0xb68d('0x1f')]+_0x32a933[_0xb68d('0x21')];var _0x430411;if(_0x51e3ff>=_0x4af57b){_0x51e3ff=_0x4af57b;_0x430411=0xc8;}else{_0x430411=0xce;}_0x38f9d8[_0xb68d('0x1c')](_0x430411);return _0x38f9d8[_0xb68d('0x22')]('Content-Range',_0x390a03+'-'+_0x51e3ff+'/'+_0x4af57b)['json'](_0x4fb373);}return null;};}function saveUpdates(_0x5e21a3){return function(_0x2b89e5){if(_0x2b89e5){return _0x2b89e5['update'](_0x5e21a3)['then'](function(_0x271d25){return _0x271d25;});}return null;};}function removeEntity(_0x139341){return function(_0x190400){if(_0x190400){return _0x190400[_0xb68d('0x23')]()['then'](function(){var _0x3934d5=_0x190400['get']({'plain':!![]});var _0x402665=_0xb68d('0x24');return db[_0xb68d('0x25')]['destroy']({'where':{'type':_0x402665,'resourceId':_0x3934d5['id']}})['then'](function(){return _0x190400;});})['then'](function(){_0x139341[_0xb68d('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x25c3dc){return function(_0x14e8ff){if(!_0x14e8ff){_0x25c3dc[_0xb68d('0x1b')](0x194);}return _0x14e8ff;};}function handleError(_0x39b675,_0x3a4f7c){_0x3a4f7c=_0x3a4f7c||0x1f4;return function(_0x12cd8d){logger['error'](_0x12cd8d[_0xb68d('0x26')]);if(_0x12cd8d['name']){delete _0x12cd8d['name'];}_0x39b675[_0xb68d('0x1c')](_0x3a4f7c)[_0xb68d('0x27')](_0x12cd8d);};}exports['index']=function(_0x2914f1,_0x5e417d){var _0x26baaa={'include':[{'model':db[_0xb68d('0x28')],'as':'mandatoryDispositionPause'}]},_0x38c561={},_0x4c1995={'count':0x0,'rows':[]};var _0x36b242=_[_0xb68d('0x29')](db[_0xb68d('0x2a')][_0xb68d('0x2b')],function(_0x4229c7){return{'name':_0x4229c7[_0xb68d('0x2c')],'type':_0x4229c7[_0xb68d('0x2d')][_0xb68d('0x2e')]};});_0x38c561['model']=_[_0xb68d('0x29')](_0x36b242,_0xb68d('0x2f'));_0x38c561['query']=_[_0xb68d('0x30')](_0x2914f1['query']);_0x38c561['filters']=_[_0xb68d('0x31')](_0x38c561[_0xb68d('0x32')],_0x38c561['query']);_0x26baaa[_0xb68d('0x33')]=_[_0xb68d('0x31')](_0x38c561['model'],qs[_0xb68d('0x34')](_0x2914f1[_0xb68d('0x35')][_0xb68d('0x34')]));_0x26baaa[_0xb68d('0x33')]=_0x26baaa[_0xb68d('0x33')]['length']?_0x26baaa[_0xb68d('0x33')]:_0x38c561[_0xb68d('0x32')];if(!_0x2914f1[_0xb68d('0x35')]['hasOwnProperty'](_0xb68d('0x36'))){_0x26baaa['limit']=qs[_0xb68d('0x21')](_0x2914f1[_0xb68d('0x35')][_0xb68d('0x21')]);_0x26baaa[_0xb68d('0x1f')]=qs['offset'](_0x2914f1['query']['offset']);}_0x26baaa[_0xb68d('0x37')]=qs[_0xb68d('0x38')](_0x2914f1[_0xb68d('0x35')][_0xb68d('0x38')]);_0x26baaa[_0xb68d('0x39')]=qs['filters'](_[_0xb68d('0x3a')](_0x2914f1[_0xb68d('0x35')],_0x38c561[_0xb68d('0x3b')]),_0x36b242);if(_0x2914f1[_0xb68d('0x35')]['filter']){_0x26baaa['where']=_[_0xb68d('0x3c')](_0x26baaa[_0xb68d('0x39')],{'$or':_['map'](_0x36b242,function(_0x25e71c){if(_0x25e71c['type']!=='VIRTUAL'){var _0x584d1f={};_0x584d1f[_0x25e71c[_0xb68d('0x2f')]]={'$like':'%'+_0x2914f1[_0xb68d('0x35')]['filter']+'%'};return _0x584d1f;}})});}_0x26baaa=_[_0xb68d('0x3c')]({},_0x26baaa,_0x2914f1[_0xb68d('0x3d')]);var _0x25e78e={'where':_0x26baaa[_0xb68d('0x39')]};return db[_0xb68d('0x2a')]['count'](_0x25e78e)['then'](function(_0x25146f){_0x4c1995[_0xb68d('0x3e')]=_0x25146f;if(_0x2914f1[_0xb68d('0x35')][_0xb68d('0x3f')]){_0x26baaa[_0xb68d('0x40')]=[{'all':!![]}];}return db[_0xb68d('0x2a')]['findAll'](_0x26baaa);})[_0xb68d('0x11')](function(_0x1c8daf){_0x4c1995['rows']=_0x1c8daf;return _0x4c1995;})[_0xb68d('0x11')](respondWithFilteredResult(_0x5e417d,_0x26baaa))[_0xb68d('0x41')](handleError(_0x5e417d,null));};exports[_0xb68d('0x42')]=function(_0x4377ff,_0x35bb77){var _0x18e645={'raw':![],'where':{'id':_0x4377ff[_0xb68d('0x43')]['id']},'include':[{'model':db['Pause'],'as':_0xb68d('0x44')}]},_0x5cb028={};_0x5cb028['model']=_[_0xb68d('0x30')](db['ChatWebsite'][_0xb68d('0x2b')]);_0x5cb028[_0xb68d('0x35')]=_[_0xb68d('0x30')](_0x4377ff[_0xb68d('0x35')]);_0x5cb028[_0xb68d('0x3b')]=_[_0xb68d('0x31')](_0x5cb028[_0xb68d('0x32')],_0x5cb028['query']);_0x18e645[_0xb68d('0x33')]=_[_0xb68d('0x31')](_0x5cb028['model'],qs[_0xb68d('0x34')](_0x4377ff['query']['fields']));_0x18e645[_0xb68d('0x33')]=_0x18e645['attributes'][_0xb68d('0x45')]?_0x18e645[_0xb68d('0x33')]:_0x5cb028['model'];if(_0x4377ff['query']['includeAll']){_0x18e645[_0xb68d('0x40')]=[{'all':!![]}];}_0x18e645=_[_0xb68d('0x3c')]({},_0x18e645,_0x4377ff[_0xb68d('0x3d')]);return db['ChatWebsite']['find'](_0x18e645)[_0xb68d('0x11')](handleEntityNotFound(_0x35bb77,null))[_0xb68d('0x11')](respondWithResult(_0x35bb77,null))[_0xb68d('0x41')](handleError(_0x35bb77,null));};exports['create']=function(_0x2e3f32,_0x4fde99){return db[_0xb68d('0x2a')][_0xb68d('0x46')](_0x2e3f32[_0xb68d('0x47')],{})[_0xb68d('0x11')](function(_0x316730){var _0x3c6509=_0x2e3f32[_0xb68d('0x48')]['get']({'plain':!![]});if(!_0x3c6509)throw new Error(_0xb68d('0x49'));if(_0x3c6509[_0xb68d('0x4a')]===_0xb68d('0x48')){var _0x552351=_0x316730['get']({'plain':!![]});var _0x58e0c7='ChatWebsites';return db[_0xb68d('0x4b')][_0xb68d('0x4c')]({'where':{'name':_0x58e0c7,'userProfileId':_0x3c6509[_0xb68d('0x4d')]},'raw':!![]})[_0xb68d('0x11')](function(_0x17d021){if(_0x17d021&&_0x17d021[_0xb68d('0x4e')]===0x0){return db[_0xb68d('0x25')][_0xb68d('0x46')]({'name':_0x552351[_0xb68d('0x2f')],'resourceId':_0x552351['id'],'type':_0x17d021['name'],'sectionId':_0x17d021['id']},{})['then'](function(){return _0x316730;});}else{return _0x316730;}})[_0xb68d('0x41')](function(_0x3769bd){logger[_0xb68d('0x17')](_0xb68d('0x4f'),_0x3769bd);throw _0x3769bd;});}return _0x316730;})[_0xb68d('0x11')](respondWithResult(_0x4fde99,0xc9))[_0xb68d('0x41')](handleError(_0x4fde99,null));};exports[_0xb68d('0x50')]=function(_0x5d47e4,_0x4877cf){if(_0x5d47e4[_0xb68d('0x47')]['id']){delete _0x5d47e4['body']['id'];}return db[_0xb68d('0x2a')]['find']({'where':{'id':_0x5d47e4['params']['id']},'include':[{'model':db[_0xb68d('0x28')],'as':'mandatoryDispositionPause'}]})[_0xb68d('0x11')](handleEntityNotFound(_0x4877cf,null))[_0xb68d('0x11')](saveUpdates(_0x5d47e4[_0xb68d('0x47')],null))[_0xb68d('0x11')](respondWithResult(_0x4877cf,null))['catch'](handleError(_0x4877cf,null));};exports[_0xb68d('0x23')]=function(_0x584a5d,_0x421203){return db[_0xb68d('0x2a')]['find']({'where':{'id':_0x584a5d['params']['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0x421203,null))[_0xb68d('0x11')](removeEntity(_0x421203,null))[_0xb68d('0x41')](handleError(_0x421203,null));};exports[_0xb68d('0x51')]=function(_0x478356,_0x2ec16a){return db['ChatWebsite'][_0xb68d('0x51')]()[_0xb68d('0x11')](respondWithResult(_0x2ec16a,null))[_0xb68d('0x41')](handleError(_0x2ec16a,null));};exports[_0xb68d('0x52')]=function(_0x14d8b9,_0x38773b){if(_0x14d8b9['body']['id']){delete _0x14d8b9[_0xb68d('0x47')]['id'];}return db[_0xb68d('0x2a')][_0xb68d('0x4c')]({'where':{'id':_0x14d8b9[_0xb68d('0x43')]['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0x38773b,null))[_0xb68d('0x11')](function(_0x2cadd6){if(_0x2cadd6){_0x14d8b9[_0xb68d('0x47')][_0xb68d('0x53')]=_0x2cadd6['id'];return db[_0xb68d('0x54')][_0xb68d('0x46')](_0x14d8b9[_0xb68d('0x47')]);}})[_0xb68d('0x11')](respondWithResult(_0x38773b,null))[_0xb68d('0x41')](handleError(_0x38773b,null));};exports['getDispositions']=function(_0x5cbcb5,_0x3ec8cc){var _0x27fd7c={'raw':![],'where':{}};var _0x24f739={};var _0x3e6cbc={'count':0x0,'rows':[]};return db['ChatWebsite']['findOne']({'where':{'id':_0x5cbcb5[_0xb68d('0x43')]['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0x3ec8cc,null))[_0xb68d('0x11')](function(_0x39ba9c){if(_0x39ba9c){_0x24f739[_0xb68d('0x32')]=_[_0xb68d('0x30')](db['Disposition']['rawAttributes']);_0x24f739['query']=_['keys'](_0x5cbcb5['query']);_0x24f739[_0xb68d('0x3b')]=_[_0xb68d('0x31')](_0x24f739[_0xb68d('0x32')],_0x24f739[_0xb68d('0x35')]);_0x27fd7c[_0xb68d('0x33')]=_[_0xb68d('0x31')](_0x24f739[_0xb68d('0x32')],qs[_0xb68d('0x34')](_0x5cbcb5['query']['fields']));_0x27fd7c[_0xb68d('0x33')]=_0x27fd7c['attributes'][_0xb68d('0x45')]?_0x27fd7c[_0xb68d('0x33')]:_0x24f739[_0xb68d('0x32')];if(!_0x5cbcb5[_0xb68d('0x35')][_0xb68d('0x55')](_0xb68d('0x36'))){_0x27fd7c[_0xb68d('0x21')]=qs['limit'](_0x5cbcb5['query'][_0xb68d('0x21')]);_0x27fd7c[_0xb68d('0x1f')]=qs['offset'](_0x5cbcb5[_0xb68d('0x35')][_0xb68d('0x1f')]);}_0x27fd7c[_0xb68d('0x37')]=qs[_0xb68d('0x38')](_0x5cbcb5[_0xb68d('0x35')][_0xb68d('0x38')]);_0x27fd7c['where']=qs[_0xb68d('0x3b')](_[_0xb68d('0x3a')](_0x5cbcb5['query'],_0x24f739[_0xb68d('0x3b')]));_0x27fd7c[_0xb68d('0x39')][_0xb68d('0x53')]=_0x39ba9c['id'];if(_0x5cbcb5[_0xb68d('0x35')][_0xb68d('0x56')]){_0x27fd7c['where']=_['merge'](_0x27fd7c[_0xb68d('0x39')],{'$or':_[_0xb68d('0x29')](_0x27fd7c[_0xb68d('0x33')],function(_0x4a7dc5){var _0x260dce={};_0x260dce[_0x4a7dc5]={'$like':'%'+_0x5cbcb5[_0xb68d('0x35')][_0xb68d('0x56')]+'%'};return _0x260dce;})});}_0x27fd7c=_['merge']({},_0x27fd7c,_0x5cbcb5[_0xb68d('0x3d')]);return db[_0xb68d('0x54')][_0xb68d('0x3e')]({'where':_0x27fd7c['where']})[_0xb68d('0x11')](function(_0x122d30){_0x3e6cbc['count']=_0x122d30;if(_0x5cbcb5['query']['includeAll']){_0x27fd7c[_0xb68d('0x40')]=[{'all':!![]}];}return db[_0xb68d('0x54')][_0xb68d('0x57')](_0x27fd7c);})[_0xb68d('0x11')](function(_0x29113a){_0x3e6cbc['rows']=_0x29113a;return _0x3e6cbc;});}})['then'](respondWithFilteredResult(_0x3ec8cc,_0x27fd7c))[_0xb68d('0x41')](handleError(_0x3ec8cc,null));};exports[_0xb68d('0x58')]=function(_0x51c995,_0x21d0e7){return db[_0xb68d('0x2a')][_0xb68d('0x4c')]({'where':{'id':_0x51c995[_0xb68d('0x43')]['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0x21d0e7,null))[_0xb68d('0x11')](function(_0x4734c1){if(_0x4734c1){return _0x4734c1[_0xb68d('0x58')](_0x51c995['query']['ids']);}})['then'](respondWithStatusCode(_0x21d0e7,null))[_0xb68d('0x41')](handleError(_0x21d0e7,null));};exports[_0xb68d('0x59')]=function(_0x54a01d,_0x10d385){if(_0x54a01d['body']['id']){delete _0x54a01d[_0xb68d('0x47')]['id'];}return db[_0xb68d('0x2a')][_0xb68d('0x4c')]({'where':{'id':_0x54a01d['params']['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0x10d385,null))[_0xb68d('0x11')](function(_0x276a7d){if(_0x276a7d){_0x54a01d[_0xb68d('0x47')][_0xb68d('0x53')]=_0x276a7d['id'];return db['CannedAnswer'][_0xb68d('0x46')](_0x54a01d['body']);}})[_0xb68d('0x11')](respondWithResult(_0x10d385,null))[_0xb68d('0x41')](handleError(_0x10d385,null));};exports[_0xb68d('0x5a')]=function(_0x418a48,_0x21d895){var _0x39888e={'raw':![],'where':{}};var _0x466415={};var _0x276c08={'count':0x0,'rows':[]};return db[_0xb68d('0x2a')][_0xb68d('0x5b')]({'where':{'id':_0x418a48[_0xb68d('0x43')]['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0x21d895,null))[_0xb68d('0x11')](function(_0x177b16){if(_0x177b16){_0x466415[_0xb68d('0x32')]=_[_0xb68d('0x30')](db[_0xb68d('0x5c')]['rawAttributes']);_0x466415['query']=_[_0xb68d('0x30')](_0x418a48[_0xb68d('0x35')]);_0x466415[_0xb68d('0x3b')]=_['intersection'](_0x466415[_0xb68d('0x32')],_0x466415[_0xb68d('0x35')]);_0x39888e[_0xb68d('0x33')]=_[_0xb68d('0x31')](_0x466415['model'],qs[_0xb68d('0x34')](_0x418a48['query'][_0xb68d('0x34')]));_0x39888e[_0xb68d('0x33')]=_0x39888e['attributes'][_0xb68d('0x45')]?_0x39888e[_0xb68d('0x33')]:_0x466415[_0xb68d('0x32')];if(!_0x418a48[_0xb68d('0x35')][_0xb68d('0x55')](_0xb68d('0x36'))){_0x39888e['limit']=qs[_0xb68d('0x21')](_0x418a48[_0xb68d('0x35')]['limit']);_0x39888e[_0xb68d('0x1f')]=qs[_0xb68d('0x1f')](_0x418a48[_0xb68d('0x35')][_0xb68d('0x1f')]);}_0x39888e[_0xb68d('0x37')]=qs[_0xb68d('0x38')](_0x418a48[_0xb68d('0x35')][_0xb68d('0x38')]);_0x39888e[_0xb68d('0x39')]=qs[_0xb68d('0x3b')](_[_0xb68d('0x3a')](_0x418a48['query'],_0x466415['filters']));_0x39888e[_0xb68d('0x39')][_0xb68d('0x53')]=_0x177b16['id'];if(_0x418a48[_0xb68d('0x35')][_0xb68d('0x56')]){_0x39888e[_0xb68d('0x39')]=_[_0xb68d('0x3c')](_0x39888e[_0xb68d('0x39')],{'$or':_[_0xb68d('0x29')](_0x39888e[_0xb68d('0x33')],function(_0x4e08be){var _0x19ec1f={};_0x19ec1f[_0x4e08be]={'$like':'%'+_0x418a48[_0xb68d('0x35')][_0xb68d('0x56')]+'%'};return _0x19ec1f;})});}_0x39888e=_['merge']({},_0x39888e,_0x418a48['options']);return db[_0xb68d('0x5c')]['count']({'where':_0x39888e[_0xb68d('0x39')]})[_0xb68d('0x11')](function(_0x4494eb){_0x276c08['count']=_0x4494eb;if(_0x418a48['query'][_0xb68d('0x3f')]){_0x39888e[_0xb68d('0x40')]=[{'all':!![]}];}return db['CannedAnswer'][_0xb68d('0x57')](_0x39888e);})[_0xb68d('0x11')](function(_0x44b455){_0x276c08[_0xb68d('0x5d')]=_0x44b455;return _0x276c08;});}})['then'](respondWithFilteredResult(_0x21d895,_0x39888e))[_0xb68d('0x41')](handleError(_0x21d895,null));};exports['removeAnswers']=function(_0x1afbfb,_0x2edffa){return db['ChatWebsite'][_0xb68d('0x4c')]({'where':{'id':_0x1afbfb[_0xb68d('0x43')]['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0x2edffa,null))['then'](function(_0x4217c5){if(_0x4217c5){return _0x4217c5[_0xb68d('0x5e')](_0x1afbfb[_0xb68d('0x35')]['ids']);}})[_0xb68d('0x11')](respondWithStatusCode(_0x2edffa,null))['catch'](handleError(_0x2edffa,null));};exports['addLogo']=function(_0x44a90d,_0xd73a71){_0x44a90d[_0xb68d('0x47')][_0xb68d('0x5f')]=_0x44a90d['file'][_0xb68d('0x60')];return db[_0xb68d('0x2a')][_0xb68d('0x4c')]({'where':{'id':_0x44a90d[_0xb68d('0x43')]['id']}})['then'](handleEntityNotFound(_0xd73a71,null))[_0xb68d('0x11')](saveUpdates(_0x44a90d[_0xb68d('0x47')],null))[_0xb68d('0x11')](respondWithResult(_0xd73a71,null))[_0xb68d('0x41')](handleError(_0xd73a71,null));};exports[_0xb68d('0x61')]=function(_0x2f7553,_0x41edab){_0x2f7553['body'][_0xb68d('0x62')]=_0x2f7553['file']['filename'];return db[_0xb68d('0x2a')][_0xb68d('0x4c')]({'where':{'id':_0x2f7553[_0xb68d('0x43')]['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0x41edab,null))['then'](saveUpdates(_0x2f7553[_0xb68d('0x47')],null))[_0xb68d('0x11')](respondWithResult(_0x41edab,null))[_0xb68d('0x41')](handleError(_0x41edab,null));};exports[_0xb68d('0x63')]=function(_0x32b322,_0x18d3ec){_0x32b322[_0xb68d('0x47')][_0xb68d('0x64')]=_0x32b322[_0xb68d('0x65')][_0xb68d('0x60')];return db[_0xb68d('0x2a')]['find']({'where':{'id':_0x32b322['params']['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0x18d3ec,null))[_0xb68d('0x11')](saveUpdates(_0x32b322[_0xb68d('0x47')],null))[_0xb68d('0x11')](respondWithResult(_0x18d3ec,null))['catch'](handleError(_0x18d3ec,null));};exports[_0xb68d('0x66')]=function(_0x163d6f,_0xdf988e){_0x163d6f[_0xb68d('0x47')][_0xb68d('0x67')]=_0x163d6f[_0xb68d('0x65')]['filename'];return db['ChatWebsite']['find']({'where':{'id':_0x163d6f['params']['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0xdf988e,null))[_0xb68d('0x11')](saveUpdates(_0x163d6f[_0xb68d('0x47')],null))['then'](respondWithResult(_0xdf988e,null))['catch'](handleError(_0xdf988e,null));};exports[_0xb68d('0x68')]=function(_0x344b15,_0xc765f3){var _0x27e6b1=path[_0xb68d('0x69')](config[_0xb68d('0x6a')],'server/files/images/logos/default_logo.svg');var _0x28e516={'where':{'id':_0x344b15['params']['id']},'attributes':['id','sitepic'],'raw':!![]};var _0x568c12=![];return require('../../config/license/util')[_0xb68d('0x6b')]()[_0xb68d('0x11')](function(_0x589675){if(_0x589675){_0x568c12=_0x589675[_0xb68d('0x6c')];}})[_0xb68d('0x11')](function(){return db[_0xb68d('0x2a')]['find'](_0x28e516);})['then'](handleEntityNotFound(_0xc765f3,null))[_0xb68d('0x11')](function(_0xe78575){if(_0xe78575){if(!_[_0xb68d('0x6d')](_0xe78575[_0xb68d('0x5f')])){if(fs[_0xb68d('0x6e')](path[_0xb68d('0x69')](config[_0xb68d('0x6a')],_0xb68d('0x6f'),_0xe78575[_0xb68d('0x5f')]))&&_0x568c12){_0x27e6b1=path[_0xb68d('0x69')](config['root'],_0xb68d('0x6f'),_0xe78575[_0xb68d('0x5f')]);}}return _0xc765f3[_0xb68d('0x70')](_0x27e6b1);}})[_0xb68d('0x41')](handleError(_0xc765f3,null));};exports[_0xb68d('0x71')]=function(_0x458790,_0x11b4a1){var _0x2570bf=path[_0xb68d('0x69')](config[_0xb68d('0x6a')],_0xb68d('0x72'));var _0x563077={'where':{'id':_0x458790[_0xb68d('0x43')]['id']},'attributes':['id',_0xb68d('0x62')],'raw':!![]};return db[_0xb68d('0x2a')][_0xb68d('0x4c')](_0x563077)[_0xb68d('0x11')](handleEntityNotFound(_0x11b4a1,null))['then'](function(_0xe4100d){if(_0xe4100d){if(!_[_0xb68d('0x6d')](_0xe4100d[_0xb68d('0x62')])){if(fs[_0xb68d('0x6e')](path[_0xb68d('0x69')](config['root'],_0xb68d('0x73'),_0xe4100d['agentAvatar']))){_0x2570bf=path[_0xb68d('0x69')](config[_0xb68d('0x6a')],'server/files/images/avatars/',_0xe4100d[_0xb68d('0x62')]);}}return _0x11b4a1[_0xb68d('0x70')](_0x2570bf);}})[_0xb68d('0x41')](handleError(_0x11b4a1,null));};exports[_0xb68d('0x74')]=function(_0x139069,_0x27c444){var _0x4244b5=path[_0xb68d('0x69')](config[_0xb68d('0x6a')],'server/files/images/avatars/customer_avatar.png');var _0x15777={'where':{'id':_0x139069[_0xb68d('0x43')]['id']},'attributes':['id','customerAvatar','showCustomerAvatar'],'raw':!![]};return db[_0xb68d('0x2a')][_0xb68d('0x4c')](_0x15777)[_0xb68d('0x11')](handleEntityNotFound(_0x27c444,null))[_0xb68d('0x11')](function(_0x4316d8){if(_0x4316d8){if(!_[_0xb68d('0x6d')](_0x4316d8[_0xb68d('0x64')])){if(fs[_0xb68d('0x6e')](path[_0xb68d('0x69')](config[_0xb68d('0x6a')],_0xb68d('0x73'),_0x4316d8['customerAvatar']))&&_0x4316d8['showCustomerAvatar']){_0x4244b5=path[_0xb68d('0x69')](config['root'],_0xb68d('0x73'),_0x4316d8[_0xb68d('0x64')]);}}return _0x27c444[_0xb68d('0x70')](_0x4244b5);}})['catch'](handleError(_0x27c444,null));};exports[_0xb68d('0x75')]=function(_0x506540,_0x2c377e){var _0xc47be6=path[_0xb68d('0x69')](config['root'],_0xb68d('0x76'));var _0x42104b={'where':{'id':_0x506540['params']['id']},'attributes':['id',_0xb68d('0x67')],'raw':!![]};return db[_0xb68d('0x2a')][_0xb68d('0x4c')](_0x42104b)[_0xb68d('0x11')](handleEntityNotFound(_0x2c377e,null))[_0xb68d('0x11')](function(_0xd88fa1){if(_0xd88fa1){if(!_[_0xb68d('0x6d')](_0xd88fa1[_0xb68d('0x67')])){if(fs[_0xb68d('0x6e')](path['join'](config[_0xb68d('0x6a')],_0xb68d('0x73'),_0xd88fa1[_0xb68d('0x67')]))){_0xc47be6=path[_0xb68d('0x69')](config[_0xb68d('0x6a')],_0xb68d('0x73'),_0xd88fa1[_0xb68d('0x67')]);}}return _0x2c377e[_0xb68d('0x70')](_0xc47be6);}})['catch'](handleError(_0x2c377e,null));};exports[_0xb68d('0x77')]=function(_0x48c786,_0x365b2b){var _0x3ea0fd=require(_0xb68d('0x78'));var _0x419997=new _0x3ea0fd();var _0x4fcf86=_0x419997[_0xb68d('0x79')](_0x48c786[_0xb68d('0x7a')][_0xb68d('0x7b')])[_0xb68d('0x7c')]();var _0x277800={'body':_0x48c786[_0xb68d('0x47')],'channel':_0xb68d('0x7d')};var _0x45a9e6=[];var _0x364047=[];var _0x43ea3a={};var _0x21a8a3=![];return db[_0xb68d('0x7e')]['describe']()[_0xb68d('0x11')](function(_0x252c54){if(!_0x252c54){throw new db[(_0xb68d('0x7f'))][(_0xb68d('0x80'))](_0xb68d('0x81'));}_0x45a9e6=_[_0xb68d('0x82')](_[_0xb68d('0x30')](_0x252c54),['createdAt',_0xb68d('0x83')]);_0x364047=_['difference'](_[_0xb68d('0x30')](_0x252c54),[_0xb68d('0x84'),'updatedAt',_0xb68d('0x85'),_0xb68d('0x86')]);if(_0x48c786['body']['id']){delete _0x48c786[_0xb68d('0x47')]['id'];}if(_[_0xb68d('0x6d')](_0x48c786['body'][_0xb68d('0x87')])){throw new db[(_0xb68d('0x7f'))]['ValidationError'](_0xb68d('0x88'));}if(_[_0xb68d('0x6d')](_0x48c786[_0xb68d('0x47')][_0xb68d('0x47')])||_0x48c786[_0xb68d('0x47')]['body']===''){throw new db['Sequelize'][(_0xb68d('0x80'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_['isNil'](_0x48c786[_0xb68d('0x47')]['mapKey'])){throw new db[(_0xb68d('0x7f'))][(_0xb68d('0x80'))](_0xb68d('0x89')+_0x364047);}if(!_['includes'](_0x364047,_0x48c786[_0xb68d('0x47')][_0xb68d('0x8a')])){throw new db[(_0xb68d('0x7f'))]['ValidationError'](_0xb68d('0x8b')+_0x364047);}_0x43ea3a[_0x48c786[_0xb68d('0x47')][_0xb68d('0x8a')]]=_0x48c786[_0xb68d('0x47')][_0xb68d('0x87')];})['then'](function(){return db['ChatWebsite'][_0xb68d('0x4c')]({'where':{'id':_0x48c786[_0xb68d('0x43')]['id']},'include':[{'model':db['CmList'],'as':_0xb68d('0x8c'),'include':[{'model':db[_0xb68d('0x7e')],'as':'Contacts','where':_0x43ea3a,'limit':0x1,'order':[[_0xb68d('0x83'),_0xb68d('0x8d')]]}]},{'model':db[_0xb68d('0x8e')],'as':_0xb68d('0x8f')}]});})[_0xb68d('0x11')](handleEntityNotFound(_0x365b2b,null))[_0xb68d('0x11')](function(_0x28c5b7){if(_0x28c5b7&&_0x28c5b7[_0xb68d('0x8c')]){_0x277800[_0xb68d('0x90')]=_0x28c5b7;_0x277800['applications']=_0x28c5b7[_0xb68d('0x8f')];_0x277800[_0xb68d('0x91')]=_0x28c5b7[_0xb68d('0x8c')];_0x277800[_0xb68d('0x92')]=_[_0xb68d('0x93')](_0x277800[_0xb68d('0x92')],[_0xb68d('0x94')],[_0xb68d('0x95')]);if(_0x277800[_0xb68d('0x90')]['Applications']){delete _0x277800[_0xb68d('0x90')][_0xb68d('0x8f')];}if(_0x277800[_0xb68d('0x90')][_0xb68d('0x8c')]&&_0x277800[_0xb68d('0x90')][_0xb68d('0x8c')][_0xb68d('0x96')][_0xb68d('0x45')]){return _0x277800['account'][_0xb68d('0x8c')][_0xb68d('0x96')][0x0];}var _0x272f1c=_[_0xb68d('0x97')](_0x48c786['body'],{'firstName':_0x48c786[_0xb68d('0x47')][_0xb68d('0x87')],'ListId':_0x28c5b7[_0xb68d('0x86')]});_0x272f1c[_0x48c786[_0xb68d('0x47')][_0xb68d('0x8a')]]=_0x48c786[_0xb68d('0x47')][_0xb68d('0x87')];return db['CmContact'][_0xb68d('0x46')](_0x272f1c,{'fields':_0x45a9e6,'raw':!![]});}})['then'](handleEntityNotFound(_0x365b2b,null))[_0xb68d('0x11')](function(_0x4b1d6b){_0x277800['contact']=_0x4b1d6b;var _0xc634a8=_0x48c786[_0xb68d('0x47')][_0xb68d('0x98')];if(_0x48c786[_0xb68d('0x7a')][_0xb68d('0x99')]){_0xc634a8=_0x48c786[_0xb68d('0x7a')][_0xb68d('0x99')];}else if(_0x48c786[_0xb68d('0x7a')]['x-forwarded-for']){_0xc634a8=_[_0xb68d('0x9a')](_0x48c786[_0xb68d('0x7a')][_0xb68d('0x9b')][_0xb68d('0x9c')](','));}if(_0x4b1d6b){var _0x471767={'ContactId':_0x4b1d6b['id'],'ChatWebsiteId':_0x48c786[_0xb68d('0x43')]['id'],'from':(_0x4b1d6b[_0xb68d('0x9d')]||'')+'\x20'+(_0x4b1d6b['lastName']||''),'customerIp':_0xc634a8,'customerPort':_0x48c786[_0xb68d('0x7a')]['x-real-port']?_0x48c786[_0xb68d('0x7a')]['x-real-port']:null,'referer':_0x48c786[_0xb68d('0x47')]['referer'],'browserName':_0x4fcf86[_0xb68d('0x9e')][_0xb68d('0x2f')]&&_0x4fcf86[_0xb68d('0x9e')][_0xb68d('0x9f')]?util[_0xb68d('0xa0')]('%s\x20%s',_0x4fcf86[_0xb68d('0x9e')][_0xb68d('0x2f')],_0x4fcf86[_0xb68d('0x9e')][_0xb68d('0x9f')]):_0xb68d('0xa1'),'browserVersion':_0x4fcf86[_0xb68d('0x9e')][_0xb68d('0x9f')]||_0xb68d('0xa1'),'osName':util[_0xb68d('0xa0')]('%s\x20%s',_0x4fcf86['os']['name'],_0x4fcf86['os']['version']),'osVersion':_0x4fcf86['os'][_0xb68d('0x9f')],'deviceModel':_0x4fcf86[_0xb68d('0xa2')][_0xb68d('0x32')]&&_0x4fcf86[_0xb68d('0xa2')][_0xb68d('0xa3')]?util['format'](_0xb68d('0xa4'),_0x4fcf86[_0xb68d('0xa2')][_0xb68d('0x32')],_0x4fcf86[_0xb68d('0xa2')]['vendor'],_0x4fcf86['device']['type']):null,'deviceVendor':_0x4fcf86['device'][_0xb68d('0xa3')],'deviceType':_0x4fcf86[_0xb68d('0xa2')][_0xb68d('0x2d')],'formData':JSON['stringify'](_0x48c786[_0xb68d('0x47')])};var _0x4bc7b3={'ChatWebsiteId':_0x48c786[_0xb68d('0x43')]['id'],'closed':![]};if(_0x48c786[_0xb68d('0x47')]['threadId']){_0x4bc7b3[_0xb68d('0xa5')]=_0x48c786['body'][_0xb68d('0xa5')];return db[_0xb68d('0xa6')][_0xb68d('0x4c')]({'where':_0x4bc7b3})[_0xb68d('0x11')](function(_0x1b203b){if(_0x1b203b){return[_0x1b203b,![]];}_0x471767[_0xb68d('0xa5')]=_0x48c786[_0xb68d('0x47')][_0xb68d('0xa5')];_0x471767[_0xb68d('0xa7')]=_0x48c786[_0xb68d('0x47')][_0xb68d('0xa7')];return db[_0xb68d('0xa6')]['create'](_0x471767)[_0xb68d('0x11')](function(_0x4b49ec){return[_0x4b49ec,!![]];});});}_0x4bc7b3[_0xb68d('0xa8')]=_0x4b1d6b['id'];if(_0x48c786[_0xb68d('0x47')][_0xb68d('0xa9')]&&_0x48c786[_0xb68d('0x47')]['interaction']['id']){_0x4bc7b3['id']=_0x48c786[_0xb68d('0x47')]['interaction']['id'];return db[_0xb68d('0xa6')][_0xb68d('0x4c')]({'where':_0x4bc7b3})[_0xb68d('0x11')](function(_0x52b5a4){if(_0x52b5a4){return[_0x52b5a4,![]];}return db[_0xb68d('0xa6')][_0xb68d('0x46')](_0x471767)[_0xb68d('0x11')](function(_0x410ab3){return[_0x410ab3,!![]];});});}return db[_0xb68d('0xa6')][_0xb68d('0x46')](_0x471767)[_0xb68d('0x11')](function(_0x4fe9ef){return[_0x4fe9ef,!![]];});}})[_0xb68d('0xaa')](function(_0x59b984,_0x1a8e85){if(_0x59b984){_0x21a8a3=_0x1a8e85;if(!_0x1a8e85){var _0x4d5409={'from':(_0x277800['contact'][_0xb68d('0x9d')]||'')+'\x20'+(_0x277800[_0xb68d('0xab')][_0xb68d('0xac')]||'')};if(_0x48c786['body'][_0xb68d('0xa5')]&&_0x48c786[_0xb68d('0x47')][_0xb68d('0xad')]&&_0x48c786[_0xb68d('0x47')][_0xb68d('0xa5')]!=_0x48c786[_0xb68d('0x47')][_0xb68d('0xad')]){_0x4d5409['threadId']=_0x48c786[_0xb68d('0x47')][_0xb68d('0xad')];}return _0x59b984['update'](_0x4d5409);}else{return _0x59b984;}}})[_0xb68d('0x11')](function(_0x5618d5){_0x277800[_0xb68d('0xa9')]=_0x5618d5[_0xb68d('0xae')]({'plain':!![]});_0x277800['interaction'][_0xb68d('0xaf')]=_0x21a8a3;if(_0x277800[_0xb68d('0xa9')]['created']){if(_0x277800[_0xb68d('0x90')][_0xb68d('0xb0')]){_0x277800['applications']['push']({'id':0x0,'priority':_0x277800[_0xb68d('0x92')][_0xb68d('0x45')]+0x1,'app':_0xb68d('0xb1'),'appdata':_0xb68d('0xb2'),'interval':_0xb68d('0xb3')});}}return db[_0xb68d('0xb4')][_0xb68d('0x46')]({'body':_0x48c786['body'][_0xb68d('0x47')],'ChatWebsiteId':_0x48c786['params']['id'],'ChatInteractionId':_0x5618d5['id'],'direction':'in','ContactId':_0x277800['contact']['id'],'AttachmentId':_0x48c786[_0xb68d('0x47')][_0xb68d('0xb5')]});})[_0xb68d('0x11')](function(_0x532f66){_0x277800['message']=_0x532f66;if(_0x277800['interaction'][_0xb68d('0xb6')]){return db[_0xb68d('0xb7')]['find']({'attributes':['id',_0xb68d('0x2f')],'where':{'id':_0x277800[_0xb68d('0xa9')]['UserId']}})[_0xb68d('0x11')](function(_0x5251ab){if(_0x5251ab){_0x277800['applications']['unshift']({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x5251ab[_0xb68d('0x2f')]+','+(_0x277800[_0xb68d('0x90')][_0xb68d('0xb8')]||0xa),'interval':'*,*,*,*'});_0x277800[_0xb68d('0xb9')]=!![];}return respondWithRpcPromise(_0xb68d('0xba'),'startRouting',_0x277800);});}return respondWithRpcPromise(_0xb68d('0xba'),'startRouting',_0x277800);})['then'](function(_0x322eaf){respondWithRpcPromise(_0xb68d('0xbb'),'EventManager',{'event':'notify','message':_0x322eaf},client9002);return _0x322eaf;})[_0xb68d('0x11')](respondWithResult(_0x365b2b,null))[_0xb68d('0x41')](handleError(_0x365b2b,null));};exports[_0xb68d('0xbc')]=function(_0x4cb164,_0x5ad478){var _0x5c3467,_0x2d2f6d,_0x5e8f21;var _0x5dd619=[];var _0x32e755={};var _0x75fe19=_0x4cb164[_0xb68d('0xbd')]||[];var _0x5c22af=[];var _0x5aced2;return db[_0xb68d('0x7e')][_0xb68d('0x51')]()[_0xb68d('0x11')](function(_0x3e5d77){if(!_0x3e5d77){throw new db[(_0xb68d('0x7f'))][(_0xb68d('0x80'))](_0xb68d('0x81'));}_0x5dd619=_['difference'](_[_0xb68d('0x30')](_0x3e5d77),[_0xb68d('0x84'),'updatedAt','CompanyId',_0xb68d('0x86')]);if(_0x4cb164[_0xb68d('0x47')]['id']){delete _0x4cb164['body']['id'];}if(_[_0xb68d('0x6d')](_0x4cb164['body']['from'])){throw _0x5ad478['status'](0x1f4)['send'](new db[(_0xb68d('0x7f'))]['ValidationError'](_0xb68d('0x88')));}if(_[_0xb68d('0x6d')](_0x4cb164[_0xb68d('0x47')][_0xb68d('0x47')])||_0x4cb164['body'][_0xb68d('0x47')]===''){throw _0x5ad478[_0xb68d('0x1c')](0x1f4)[_0xb68d('0x27')](new db[(_0xb68d('0x7f'))]['ValidationError'](_0xb68d('0xbe')));}if(_['isNil'](_0x4cb164[_0xb68d('0x47')][_0xb68d('0xbf')])){throw _0x5ad478[_0xb68d('0x1c')](0x1f4)['send'](new db[(_0xb68d('0x7f'))][(_0xb68d('0x80'))](_0xb68d('0xc0')+_0x5dd619));}if(!_[_0xb68d('0xc1')](_0x5dd619,_0x4cb164[_0xb68d('0x47')][_0xb68d('0xbf')])){throw _0x5ad478[_0xb68d('0x1c')](0x1f4)[_0xb68d('0x27')](new db[(_0xb68d('0x7f'))][(_0xb68d('0x80'))](_0xb68d('0xc2')+_0x5dd619));}_0x32e755[_0x4cb164[_0xb68d('0x47')][_0xb68d('0xbf')]]=_0x4cb164[_0xb68d('0x47')][_0xb68d('0x87')];})[_0xb68d('0x11')](function(){return db[_0xb68d('0x2a')][_0xb68d('0x4c')]({'where':{'id':_0x4cb164[_0xb68d('0x43')]['id']},'include':[{'model':db[_0xb68d('0xc3')],'as':_0xb68d('0x8c')},{'model':db['MailAccount'],'as':_0xb68d('0xc4')}]});})['then'](handleEntityNotFound(_0x5ad478,null))['then'](function(_0x5b8ef2){if(_0x5b8ef2&&_0x5b8ef2[_0xb68d('0x8c')]){_0x2d2f6d=_0x5b8ef2;var _0x4fbc87=_[_0xb68d('0x97')](_0x4cb164[_0xb68d('0x47')],{'firstName':_0x4cb164['body'][_0xb68d('0x87')],'phone':_0x4cb164[_0xb68d('0x47')][_0xb68d('0x87')],'ListId':_0x5b8ef2[_0xb68d('0x86')]});_0x4fbc87[_0x4cb164[_0xb68d('0x47')]['mapKeyOffline']]=_0x4cb164[_0xb68d('0x47')][_0xb68d('0x87')];return db[_0xb68d('0x7e')][_0xb68d('0xc5')]({'where':_0x32e755,'defaults':_0x4fbc87});}})[_0xb68d('0xaa')](function(_0x51bcef){if(_0x51bcef){_0x5e8f21=_0x51bcef;var _0x5e23fd=fs['readFileSync'](path[_0xb68d('0x69')](config['root'],_0xb68d('0xc6')),_0xb68d('0xc7'));var _0x25eafb=ejs[_0xb68d('0xc8')](_0x5e23fd,{'body':_['toPairs'](_0x4cb164[_0xb68d('0x47')][_0xb68d('0x47')]),'bodyTitle':_0x2d2f6d[_0xb68d('0xc9')]});return db[_0xb68d('0xca')][_0xb68d('0x46')]({'body':_0x25eafb,'plainBody':htmlToText[_0xb68d('0xcb')](_0x25eafb),'ContactId':_0x51bcef['id'],'ChatWebsiteId':_0x2d2f6d['id']});}})['then'](function(_0x42f902){_0x5aced2=_0x42f902;if(_0x75fe19[_0xb68d('0x45')]){var _0x1b70f4=_0x75fe19[_0xb68d('0x29')](function(_0x5d4028){return{'name':_0x5d4028[_0xb68d('0xcc')],'basename':_0x5d4028[_0xb68d('0x60')],'type':_0x5d4028[_0xb68d('0xcd')],'ChatOfflineMessageId':_0x42f902['id']};});_0x5c22af=_0x1b70f4[_0xb68d('0x29')](_0x43288a=>{var _0x5bbd1a={'filename':_0x43288a[_0xb68d('0x2f')],'path':path['join'](config[_0xb68d('0x6a')],_0xb68d('0xce'),_0xb68d('0xbd'),_0xb68d('0xcf'),_0xb68d('0xd0'),_0x43288a['basename'])};return _0x5bbd1a;});if(!_0x2d2f6d[_0xb68d('0xd1')]){return db[_0xb68d('0xd2')][_0xb68d('0xd3')](function(_0x1a4106){return db[_0xb68d('0xd4')][_0xb68d('0xd5')](_0x1b70f4,{'transaction':_0x1a4106});});}}})[_0xb68d('0x11')](function(){if(_0x5aced2){_0x5c3467=_0x5aced2;return db['MailAccount'][_0xb68d('0x5b')]({'where':{'service':!![]},'include':[{'model':db['MailServerOut'],'as':'Smtp','raw':!![],'include':[{'model':db[_0xb68d('0xd6')],'as':_0xb68d('0xd6'),'raw':!![]}]}]});}})['then'](function(_0x4cdfe0){if(_0x4cdfe0&&_0x4cdfe0[_0xb68d('0xd7')]&&_0x2d2f6d['forwardOffline']&&_0x2d2f6d['forwardOfflineAddress']){var _0x208eb8=_0x4cdfe0[_0xb68d('0xd8')]();return respondWithRpcPromise(_0xb68d('0xd9'),_0xb68d('0xda'),{'account':_0x208eb8,'message':{'from':util[_0xb68d('0xa0')](_0xb68d('0xdb'),_0x4cdfe0[_0xb68d('0x2f')],_0x4cdfe0[_0xb68d('0xdc')]||_0x4cdfe0['Smtp'][_0xb68d('0x48')]),'to':_0x2d2f6d['forwardOfflineAddress'],'subject':_0x2d2f6d[_0xb68d('0xdd')],'html':_0x5c3467[_0xb68d('0x47')],'attachments':_0x5c22af}},client9003)['then'](function(){return _0x5c3467;})[_0xb68d('0x41')](function(_0x4229a5){logger[_0xb68d('0x17')](_0x4229a5);});}})[_0xb68d('0x11')](function(){if(_0x2d2f6d&&_0x2d2f6d['openNewInteraction']&&_0x2d2f6d[_0xb68d('0xde')]){var _0x5784d4=[];if(_0x75fe19[_0xb68d('0x45')]){_0x5784d4=_0x75fe19[_0xb68d('0x29')](function(_0x48860c){return{'name':_0x48860c[_0xb68d('0xcc')],'basename':_0x48860c[_0xb68d('0x60')],'type':_0x48860c[_0xb68d('0xcd')],'ChatOfflineMessageId':_0x5aced2['id']};});}var _0x52147c;if(!_['isNil'](_0x2d2f6d[_0xb68d('0xdf')])){var _0x754c5b=_[_0xb68d('0x29')](_0x4cb164[_0xb68d('0x47')],function(_0x2ff05b){return _0x2ff05b;});var _0x27f7da=_[_0xb68d('0xe0')](_0x754c5b)[0x0];var _0x59c851=_['mapValues'](_0x27f7da,function(_0xcafd6d){return _0xcafd6d;});_0x52147c=_0x59c851[0x1][_0x2d2f6d[_0xb68d('0xdf')]];}var _0x56bbca={'from':_0x5e8f21[_0xb68d('0xdc')],'firstName':_0x5e8f21[_0xb68d('0x9d')],'lastName':_0x5e8f21[_0xb68d('0xac')],'mapKey':_0xb68d('0xdc'),'message':{'from':_0x5e8f21[_0xb68d('0xdc')],'to':_0x2d2f6d[_0xb68d('0xc4')][_0xb68d('0xdc')],'cc':'','subject':_['isNil'](_0x52147c)?_0x2d2f6d['offlineMessageSubject']:_0x52147c,'messageId':'','sentAt':new Date(),'attach':_0x5784d4[_0xb68d('0x45')],'attachments':_0x5784d4,'originChannel':_0xb68d('0xe1'),'ChatWebsiteId':_0x2d2f6d['id'],'ChatOfflineMessageId':_0x5c3467['id'],'originTo':_0x2d2f6d['MailAccount'][_0xb68d('0xdc')]},'body':_0x5c3467['body']};var _0x4bc9a3={'account':{'id':_0x2d2f6d[_0xb68d('0xde')]},'body':_0x56bbca,'log':'NotifyMailAccount'};return respondWithRpcPromise(_0xb68d('0xe2'),_0xb68d('0xe3'),_0x4bc9a3,client9001)[_0xb68d('0x11')](function(){return _0x5c3467;})[_0xb68d('0x41')](function(_0xede9d8){logger['error'](_0xede9d8);});}return;})[_0xb68d('0x11')](function(){if(_0x5c3467){return _0x5c3467;}})['then'](respondWithResult(_0x5ad478,null))[_0xb68d('0x41')](function(_0x378aec){logger[_0xb68d('0x17')](_0xb68d('0x41'),_0x378aec);for(var _0x4f41bc of _0x75fe19){var _0x463cf0=path[_0xb68d('0x69')](config[_0xb68d('0x6a')],_0xb68d('0xce'),_0xb68d('0xbd'),_0xb68d('0xcf'),_0xb68d('0xd0'),_0x4f41bc['filename']);fs_extra[_0xb68d('0xe4')](_0x463cf0)[_0xb68d('0x41')](function(_0x2423c2){logger['error']('Could\x20not\x20remove\x20attachment\x20file',_0x463cf0,_0x2423c2);});}});};exports[_0xb68d('0xe5')]=function(_0xed9930,_0x4ff86a){return db[_0xb68d('0xa6')][_0xb68d('0x4c')]({'where':{'id':_0xed9930[_0xb68d('0x43')]['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0x4ff86a,null))['then'](function(_0x730bee){if(_0x730bee){return _0x730bee[_0xb68d('0xe5')](_0xed9930[_0xb68d('0x47')][_0xb68d('0xe6')],_[_0xb68d('0xe7')](_0xed9930[_0xb68d('0x47')],['ids','id'])||{});}})[_0xb68d('0x11')](respondWithResult(_0x4ff86a,null))['catch'](handleError(_0x4ff86a,null));};exports[_0xb68d('0xe8')]=function(_0x420cb9,_0x504532){var _0x59cb42={'raw':![],'where':{}};var _0x4ae4c7={};var _0x4effa9={'count':0x0,'rows':[]};return db[_0xb68d('0x2a')]['findOne']({'where':{'id':_0x420cb9[_0xb68d('0x43')]['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0x504532,null))['then'](function(_0x9ba0fe){if(_0x9ba0fe){_0x4ae4c7[_0xb68d('0x32')]=_['keys'](db[_0xb68d('0xa6')][_0xb68d('0x2b')]);_0x4ae4c7[_0xb68d('0x35')]=_[_0xb68d('0x30')](_0x420cb9['query']);_0x4ae4c7[_0xb68d('0x3b')]=_[_0xb68d('0x31')](_0x4ae4c7[_0xb68d('0x32')],_0x4ae4c7['query']);_0x59cb42[_0xb68d('0x33')]=_[_0xb68d('0x31')](_0x4ae4c7['model'],qs[_0xb68d('0x34')](_0x420cb9[_0xb68d('0x35')][_0xb68d('0x34')]));_0x59cb42[_0xb68d('0x33')]=_0x59cb42['attributes']['length']?_0x59cb42[_0xb68d('0x33')]:_0x4ae4c7[_0xb68d('0x32')];if(!_0x420cb9[_0xb68d('0x35')][_0xb68d('0x55')](_0xb68d('0x36'))){_0x59cb42[_0xb68d('0x21')]=qs[_0xb68d('0x21')](_0x420cb9[_0xb68d('0x35')]['limit']);_0x59cb42[_0xb68d('0x1f')]=qs['offset'](_0x420cb9[_0xb68d('0x35')][_0xb68d('0x1f')]);}_0x59cb42['order']=qs[_0xb68d('0x38')](_0x420cb9[_0xb68d('0x35')][_0xb68d('0x38')]);_0x59cb42[_0xb68d('0x39')]=qs[_0xb68d('0x3b')](_[_0xb68d('0x3a')](_0x420cb9[_0xb68d('0x35')],_0x4ae4c7[_0xb68d('0x3b')]));_0x59cb42['where']['ChatWebsiteId']=_0x9ba0fe['id'];if(_0x420cb9[_0xb68d('0x35')][_0xb68d('0x56')]){_0x59cb42[_0xb68d('0x39')]=_['merge'](_0x59cb42[_0xb68d('0x39')],{'$or':_[_0xb68d('0x29')](_0x59cb42[_0xb68d('0x33')],function(_0x2a17f7){var _0x22b92b={};_0x22b92b[_0x2a17f7]={'$like':'%'+_0x420cb9['query'][_0xb68d('0x56')]+'%'};return _0x22b92b;})});}_0x59cb42=_['merge']({},_0x59cb42,_0x420cb9[_0xb68d('0x3d')]);return db['ChatInteraction'][_0xb68d('0x3e')]({'where':_0x59cb42[_0xb68d('0x39')]})[_0xb68d('0x11')](function(_0x4c5fa2){_0x4effa9[_0xb68d('0x3e')]=_0x4c5fa2;if(_0x420cb9['query'][_0xb68d('0x3f')]){_0x59cb42[_0xb68d('0x40')]=[{'model':db[_0xb68d('0x7e')],'as':_0xb68d('0xe9'),'required':![]},{'model':db[_0xb68d('0xb7')],'as':'Owner','attributes':[_0xb68d('0x2f'),_0xb68d('0xea'),_0xb68d('0xeb')],'required':![]},{'model':db['Tag'],'as':_0xb68d('0xec'),'attributes':['id',_0xb68d('0x2f'),_0xb68d('0xed')],'where':_0x420cb9[_0xb68d('0x35')][_0xb68d('0xee')]?{'id':_0x420cb9['query'][_0xb68d('0xee')]}:undefined,'required':_0x420cb9[_0xb68d('0x35')][_0xb68d('0xee')]?!![]:![]}];}return db[_0xb68d('0xa6')][_0xb68d('0x57')](_0x59cb42);})[_0xb68d('0x11')](function(_0x50dd59){_0x4effa9[_0xb68d('0x5d')]=_0x50dd59;return _0x4effa9;});}})['then'](respondWithFilteredResult(_0x504532,_0x59cb42))['catch'](handleError(_0x504532,null));};function iftimePromise(_0x329766,_0x149063){return respondWithRpcPromise('Command','getSnippet',{'command':_0x149063['timezone']?util['format'](_0xb68d('0xef'),_0x329766['interval'],_0x149063[_0xb68d('0xf0')]):util[_0xb68d('0xa0')](_0xb68d('0xf1'),_0x329766[_0xb68d('0xf2')])},client9002)[_0xb68d('0x11')](function(_0x12e25b){var _0x67863c=_0x12e25b&&_0x12e25b['indexOf']('true')>=0x0?!![]:![];logger[_0xb68d('0x12')](_0xb68d('0xf3'),_0x149063['id'],_0x329766['id'],_0x329766[_0xb68d('0xf2')],_0x67863c?_0xb68d('0xf4'):_0xb68d('0xf5'),_0x149063[_0xb68d('0xf0')]?_0x149063['timezone']:_0xb68d('0xf6'));return _0x67863c;})[_0xb68d('0x41')](function(_0x4fb9bd){logger[_0xb68d('0x17')](_0xb68d('0xf3'),_0x149063['id'],_0x329766['id'],_0x329766['interval'],util['inspect'](_0x4fb9bd,{'showHidden':![],'depth':null}),_0x149063[_0xb68d('0xf0')]?_0x149063['timezone']:_0xb68d('0xf6'));return![];});}exports[_0xb68d('0xf7')]=function(_0x44a1f6,_0x508ffd){var _0x248270=0x0;var _0x73c731=0x0;var _0x559739=![];var _0x203214;var _0x5c9ee4;return db[_0xb68d('0x2a')][_0xb68d('0x4c')]({'where':{'id':_0x44a1f6[_0xb68d('0x43')]['id']},'include':[{'model':db[_0xb68d('0xf8')],'as':_0xb68d('0xf8'),'include':[{'model':db[_0xb68d('0xf8')],'as':'Intervals','attributes':['id',_0xb68d('0xf2')],'raw':!![]}]}]})['then'](handleEntityNotFound(_0x508ffd,null))[_0xb68d('0x11')](function(_0x2dc280){if(_0x2dc280){_0x203214=_0x2dc280;return _0x2dc280[_0xb68d('0xf9')]({'raw':!![]});}})[_0xb68d('0x11')](function(_0x999f8){if(_0x203214){if(_0x999f8){_0x5c9ee4=_0x999f8;}}return require(_0xb68d('0xfa'))[_0xb68d('0x6b')]();})[_0xb68d('0x11')](function(_0x4dbaa){if(_0x4dbaa){_0x73c731=_0x4dbaa['virtual'];_0x559739=_0x4dbaa[_0xb68d('0x6c')];}})[_0xb68d('0x11')](function(){return db[_0xb68d('0xa6')][_0xb68d('0x3e')]({'where':{'closed':![]}});})[_0xb68d('0x11')](function(_0x4b271f){_0x248270=_0x4b271f;if(_0x73c731&&_0x4b271f>_0x73c731){return db['License'][_0xb68d('0x5b')]({'where':{'id':0x1}})[_0xb68d('0x11')](function(_0x51ae0c){if(_0x51ae0c){_0x51ae0c['increment'](_0xb68d('0xfb'));}});}})[_0xb68d('0x11')](function(){if(_0x203214[_0xb68d('0xf8')]&&_0x203214[_0xb68d('0xf8')][_0xb68d('0xfc')]){var _0x1e308a=[];for(var _0x3f2a84=0x0;_0x3f2a84<_0x203214[_0xb68d('0xf8')][_0xb68d('0xfc')]['length'];_0x3f2a84++){var _0x9683b2=_0x203214[_0xb68d('0xf8')]['Intervals'][_0x3f2a84][_0xb68d('0xae')]({'plain':!![]});_0x1e308a[_0xb68d('0xfd')](iftimePromise(_0x9683b2,_0x203214));}return BPromise[_0xb68d('0xfe')](_0x1e308a)[_0xb68d('0x11')](function(_0x50520d){return _[_0xb68d('0xff')](_0x50520d);});}else{return!![];}})[_0xb68d('0x11')](function(_0x506e0e){var _0x5e87eb=fs[_0xb68d('0x100')](path[_0xb68d('0x69')](config[_0xb68d('0x6a')],_0xb68d('0x101')),'utf8');var _0x4ae289=new url[(_0xb68d('0x102'))](_0x203214[_0xb68d('0x103')])[_0xb68d('0x104')];var _0xfdd95b=_0xb68d('0x105');var _0x2e95d6=![];var _0x4c0855={'chatVersion':_0xfdd95b,'chatWebsiteAddressOrigin':_0x4ae289,'remote':_0x203214[_0xb68d('0x106')],'query':querystring['stringify'](_[_0xb68d('0x3c')](_0x203214[_0xb68d('0xae')]({'plain':!![]}),{'customerIp':_0x44a1f6['headers'][_0xb68d('0x9b')]||_0x44a1f6[_0xb68d('0x7a')][_0xb68d('0x107')]||_0x44a1f6[_0xb68d('0x108')][_0xb68d('0x109')]||_0x44a1f6['ip'],'referer':_0x44a1f6['headers'][_0xb68d('0x10a')],'openedInteractions':_0x248270,'maxInteractions':_0x73c731,'virtual':_0x559739[_0xb68d('0x10b')],'online':_0x506e0e,'custom':_0x559739}))[_0xb68d('0x10c')](/'/g,'\x5c\x27')};_0x508ffd['send'](ejs[_0xb68d('0xc8')](Mustache[_0xb68d('0xc8')](_0x5e87eb,_0x4c0855),{'proactiveActions':_0x5c9ee4,'alignment':_0x203214[_0xb68d('0x10d')],'verticalAlignment':_0x203214[_0xb68d('0x10e')],'div_color':_0x203214[_0xb68d('0xed')],'labelText':_0x203214[_0xb68d('0x10f')],'text_color':_0x203214['textColor'],'text_button_color':_0x203214[_0xb68d('0x110')],'button_color':_0x203214[_0xb68d('0x111')],'background_color':_0x203214[_0xb68d('0x112')],'hideWhenOffline':_0x203214[_0xb68d('0x113')],'intervalId':_0x203214['IntervalId'],'isDevelopment':_0x2e95d6,'chatVersion':_0xfdd95b}));})[_0xb68d('0x41')](handleError(_0x508ffd,null));};exports['addApplications']=function(_0x27bbaa,_0x3bb59b){var _0x4b8664=_0x27bbaa[_0xb68d('0x43')]['id'];var _0x1be744=_0x27bbaa[_0xb68d('0x47')];var _0x32b110=0xc8;var _0xc5cf1a=null;return db[_0xb68d('0xd2')][_0xb68d('0xd3')]({'isolationLevel':db[_0xb68d('0xd2')]['Transaction'][_0xb68d('0x114')][_0xb68d('0x115')]},function(_0x592a72){return db[_0xb68d('0x2a')][_0xb68d('0x5b')]({'where':{'id':_0x4b8664},'transaction':_0x592a72})[_0xb68d('0x11')](function(_0x576b68){if(_0x576b68){return db['ChatApplication'][_0xb68d('0x23')]({'where':{'ChatWebsiteId':_0x4b8664},'transaction':_0x592a72})[_0xb68d('0x11')](function(){var _0x116242=_[_0xb68d('0x29')](_0x1be744,function(_0x363012){_0x363012[_0xb68d('0x53')]=_0x4b8664;return _0x363012;});return db[_0xb68d('0x8e')][_0xb68d('0xd5')](_0x116242,{'transaction':_0x592a72});});}else{_0x32b110=0x194;_0xc5cf1a=[];}});})['then'](function(){if(_0x32b110!==0x194){return db[_0xb68d('0x8e')][_0xb68d('0x116')]({'where':{'ChatWebsiteId':_0x4b8664},'order':_0xb68d('0x94')})[_0xb68d('0x11')](function(_0x5c3ef3){_0xc5cf1a=_0x5c3ef3;});}})[_0xb68d('0x41')](function(_0x19dbd6){_0x32b110=0x1f4;logger[_0xb68d('0x17')](_0x19dbd6[_0xb68d('0x26')]);if(_0x19dbd6[_0xb68d('0x2f')]){delete _0x19dbd6[_0xb68d('0x2f')];}_0xc5cf1a=_0x19dbd6;})[_0xb68d('0x117')](function(){if(_0xc5cf1a===null){_0x3bb59b[_0xb68d('0x1b')](_0x32b110);}else{if(_0x32b110===0x1f4){_0x3bb59b[_0xb68d('0x1c')](_0x32b110)[_0xb68d('0x27')](_0xc5cf1a);}else{_0x3bb59b['status'](_0x32b110)[_0xb68d('0x1e')](_0xc5cf1a);}}});};exports[_0xb68d('0x118')]=function(_0x147175,_0x38e5b0){var _0x5003cc={};var _0x3ef63e={};var _0x5680ea;var _0x347d14;return db[_0xb68d('0x2a')][_0xb68d('0x5b')]({'where':{'id':_0x147175[_0xb68d('0x43')]['id']}})['then'](handleEntityNotFound(_0x38e5b0,null))['then'](function(_0xbfa34a){if(_0xbfa34a){_0x5680ea=_0xbfa34a;_0x3ef63e[_0xb68d('0x32')]=_['keys'](db[_0xb68d('0x8e')][_0xb68d('0x2b')]);_0x3ef63e[_0xb68d('0x35')]=_['keys'](_0x147175['query']);_0x3ef63e[_0xb68d('0x3b')]=_[_0xb68d('0x31')](_0x3ef63e['model'],_0x3ef63e[_0xb68d('0x35')]);_0x5003cc[_0xb68d('0x33')]=_[_0xb68d('0x31')](_0x3ef63e['model'],qs['fields'](_0x147175['query']['fields']));_0x5003cc['attributes']=_0x5003cc['attributes']['length']?_0x5003cc[_0xb68d('0x33')]:_0x3ef63e[_0xb68d('0x32')];_0x5003cc[_0xb68d('0x37')]=qs[_0xb68d('0x38')](_0x147175['query'][_0xb68d('0x38')]);_0x5003cc[_0xb68d('0x39')]=qs[_0xb68d('0x3b')](_[_0xb68d('0x3a')](_0x147175[_0xb68d('0x35')],_0x3ef63e[_0xb68d('0x3b')]));if(_0x147175['query'][_0xb68d('0x56')]){_0x5003cc['where']=_['merge'](_0x5003cc[_0xb68d('0x39')],{'$or':_['map'](_0x5003cc['attributes'],function(_0x5d6225){var _0x4bfdf5={};_0x4bfdf5[_0x5d6225]={'$like':'%'+_0x147175['query'][_0xb68d('0x56')]+'%'};return _0x4bfdf5;})});}_0x5003cc=_['merge']({},_0x5003cc,_0x147175[_0xb68d('0x3d')]);return _0x5680ea[_0xb68d('0x118')](_0x5003cc);}})[_0xb68d('0x11')](function(_0x354e38){if(_0x354e38){_0x347d14=_0x354e38[_0xb68d('0x45')];if(!_0x147175[_0xb68d('0x35')][_0xb68d('0x55')](_0xb68d('0x36'))){_0x5003cc[_0xb68d('0x21')]=qs[_0xb68d('0x21')](_0x147175[_0xb68d('0x35')][_0xb68d('0x21')]);_0x5003cc[_0xb68d('0x1f')]=qs[_0xb68d('0x1f')](_0x147175[_0xb68d('0x35')][_0xb68d('0x1f')]);}return _0x5680ea[_0xb68d('0x118')](_0x5003cc);}})[_0xb68d('0x11')](function(_0x6b4b27){if(_0x6b4b27){return _0x6b4b27?{'count':_0x347d14,'rows':_0x6b4b27}:null;}})[_0xb68d('0x11')](respondWithResult(_0x38e5b0,null))['catch'](handleError(_0x38e5b0,null));};exports[_0xb68d('0x119')]=function(_0x4f1182,_0x4fdbe6){return db['chatProactiveAction'][_0xb68d('0x4c')]({'where':{'id':_0x4f1182['params']['id']}})['then'](handleEntityNotFound(_0x4fdbe6,null))[_0xb68d('0x11')](function(_0x88f24b){if(_0x88f24b){return _0x88f24b[_0xb68d('0x119')](_0x4f1182[_0xb68d('0x47')][_0xb68d('0xe6')],_[_0xb68d('0xe7')](_0x4f1182[_0xb68d('0x47')],[_0xb68d('0xe6'),'id'])||{});}})[_0xb68d('0x11')](respondWithResult(_0x4fdbe6,null))['catch'](handleError(_0x4fdbe6,null));};exports[_0xb68d('0xf9')]=function(_0xb317c1,_0x3f4a5e){var _0x52b2c1={};var _0x3d2755={};var _0x1b553a;var _0x5bbeb1;return db[_0xb68d('0x2a')][_0xb68d('0x5b')]({'where':{'id':_0xb317c1[_0xb68d('0x43')]['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0x3f4a5e,null))[_0xb68d('0x11')](function(_0x54f7ee){if(_0x54f7ee){_0x1b553a=_0x54f7ee;_0x3d2755[_0xb68d('0x32')]=_['keys'](db[_0xb68d('0x11a')][_0xb68d('0x2b')]);_0x3d2755[_0xb68d('0x35')]=_[_0xb68d('0x30')](_0xb317c1[_0xb68d('0x35')]);_0x3d2755['filters']=_[_0xb68d('0x31')](_0x3d2755[_0xb68d('0x32')],_0x3d2755['query']);_0x52b2c1[_0xb68d('0x33')]=_[_0xb68d('0x31')](_0x3d2755[_0xb68d('0x32')],qs[_0xb68d('0x34')](_0xb317c1['query'][_0xb68d('0x34')]));_0x52b2c1[_0xb68d('0x33')]=_0x52b2c1[_0xb68d('0x33')][_0xb68d('0x45')]?_0x52b2c1['attributes']:_0x3d2755[_0xb68d('0x32')];_0x52b2c1[_0xb68d('0x37')]=qs[_0xb68d('0x38')](_0xb317c1['query'][_0xb68d('0x38')]);_0x52b2c1[_0xb68d('0x39')]=qs['filters'](_[_0xb68d('0x3a')](_0xb317c1['query'],_0x3d2755[_0xb68d('0x3b')]));if(_0xb317c1[_0xb68d('0x35')]['filter']){_0x52b2c1[_0xb68d('0x39')]=_[_0xb68d('0x3c')](_0x52b2c1['where'],{'$or':_['map'](_0x52b2c1[_0xb68d('0x33')],function(_0x58c182){var _0x4c4da2={};_0x4c4da2[_0x58c182]={'$like':'%'+_0xb317c1[_0xb68d('0x35')][_0xb68d('0x56')]+'%'};return _0x4c4da2;})});}_0x52b2c1=_[_0xb68d('0x3c')]({},_0x52b2c1,_0xb317c1['options']);return _0x1b553a[_0xb68d('0xf9')](_0x52b2c1);}})[_0xb68d('0x11')](function(_0x3fccb1){if(_0x3fccb1){_0x5bbeb1=_0x3fccb1[_0xb68d('0x45')];if(!_0xb317c1['query'][_0xb68d('0x55')](_0xb68d('0x36'))){_0x52b2c1[_0xb68d('0x21')]=qs[_0xb68d('0x21')](_0xb317c1[_0xb68d('0x35')]['limit']);_0x52b2c1['offset']=qs[_0xb68d('0x1f')](_0xb317c1[_0xb68d('0x35')][_0xb68d('0x1f')]);}return _0x1b553a[_0xb68d('0xf9')](_0x52b2c1);}})['then'](function(_0x35ce2b){if(_0x35ce2b){return _0x35ce2b?{'count':_0x5bbeb1,'rows':_0x35ce2b}:null;}})[_0xb68d('0x11')](respondWithResult(_0x3f4a5e,null))[_0xb68d('0x41')](handleError(_0x3f4a5e,null));};exports[_0xb68d('0x11b')]=function(_0x392016,_0x577f0d){var _0x509b9c=_0x392016[_0xb68d('0x35')][_0xb68d('0x11c')]===_0xb68d('0x11d')?_0xb68d('0x11e'):'onlineForm';return db[_0xb68d('0x2a')][_0xb68d('0x4c')]({'attributes':['id',_0x509b9c],'where':{'id':_0x392016[_0xb68d('0x43')]['id']}})['then'](handleEntityNotFound(_0x577f0d,null))['then'](function(_0x148551){if(_0x148551){var _0xfd848=_0x148551[_0x509b9c];var _0x2d9499=_0xfd848&&_0xfd848[_0xb68d('0x11f')]?_0xfd848[_0xb68d('0x11f')]:[];_0x577f0d[_0xb68d('0x27')]({'fromKey':_[_0xb68d('0x6d')](_0xfd848[_0xb68d('0x120')])?undefined:_0xfd848[_0xb68d('0x120')],'count':_0x2d9499[_0xb68d('0x45')],'rows':_0x2d9499});}})['catch'](handleError(_0x577f0d,null));};exports[_0xb68d('0x121')]=function(_0x1cd25c,_0x479078){var _0x1c278a={'raw':![],'where':{}};var _0x8362f3={};var _0x54b116={'count':0x0,'rows':[]};return db['ChatWebsite'][_0xb68d('0x5b')]({'where':{'id':_0x1cd25c['params']['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0x479078,null))[_0xb68d('0x11')](function(_0x56ae25){if(_0x56ae25){_0x8362f3['model']=_[_0xb68d('0x30')](db[_0xb68d('0xca')][_0xb68d('0x2b')]);_0x8362f3[_0xb68d('0x35')]=_[_0xb68d('0x30')](_0x1cd25c['query']);_0x8362f3['filters']=_[_0xb68d('0x31')](_0x8362f3['model'],_0x8362f3['query']);_0x1c278a[_0xb68d('0x33')]=_[_0xb68d('0x31')](_0x8362f3['model'],qs[_0xb68d('0x34')](_0x1cd25c[_0xb68d('0x35')][_0xb68d('0x34')]));_0x1c278a[_0xb68d('0x33')]=_0x1c278a[_0xb68d('0x33')][_0xb68d('0x45')]?_0x1c278a[_0xb68d('0x33')]:_0x8362f3[_0xb68d('0x32')];if(!_0x1cd25c[_0xb68d('0x35')][_0xb68d('0x55')]('nolimit')){_0x1c278a['limit']=qs['limit'](_0x1cd25c[_0xb68d('0x35')][_0xb68d('0x21')]);_0x1c278a[_0xb68d('0x1f')]=qs[_0xb68d('0x1f')](_0x1cd25c[_0xb68d('0x35')][_0xb68d('0x1f')]);}_0x1c278a[_0xb68d('0x37')]=qs[_0xb68d('0x38')](_0x1cd25c[_0xb68d('0x35')][_0xb68d('0x38')]);_0x1c278a[_0xb68d('0x39')]=qs['filters'](_['pick'](_0x1cd25c[_0xb68d('0x35')],_0x8362f3['filters']));_0x1c278a[_0xb68d('0x39')][_0xb68d('0x53')]=_0x56ae25['id'];if(_0x1cd25c['query']['filter']){_0x1c278a[_0xb68d('0x39')]=_[_0xb68d('0x3c')](_0x1c278a['where'],{'$or':_[_0xb68d('0x29')](_0x1c278a[_0xb68d('0x33')],function(_0x423172){var _0x26cc59={};_0x26cc59[_0x423172]={'$like':'%'+_0x1cd25c['query'][_0xb68d('0x56')]+'%'};return _0x26cc59;})});}_0x1c278a=_[_0xb68d('0x3c')]({},_0x1c278a,_0x1cd25c[_0xb68d('0x3d')]);return db[_0xb68d('0xca')][_0xb68d('0x3e')]({'where':_0x1c278a['where']})[_0xb68d('0x11')](function(_0x3d06ed){_0x54b116[_0xb68d('0x3e')]=_0x3d06ed;if(_0x1cd25c[_0xb68d('0x35')][_0xb68d('0x3f')]){_0x1c278a[_0xb68d('0x40')]=[{'all':!![]}];}else{_0x1c278a['include']=[{'model':db[_0xb68d('0x7e')],'as':'Contact','required':![]},{'model':db['Attachment'],'as':_0xb68d('0x122'),'required':![]}];}return db[_0xb68d('0xca')]['findAll'](_0x1c278a);})['then'](function(_0x1c3498){_0x54b116['rows']=_0x1c3498;return _0x54b116;});}})['then'](respondWithFilteredResult(_0x479078,_0x1c278a))[_0xb68d('0x41')](handleError(_0x479078,null));};exports[_0xb68d('0x123')]=function(_0x5f0670,_0x415af3){return db[_0xb68d('0x2a')][_0xb68d('0x4c')]({'where':{'id':_0x5f0670[_0xb68d('0x43')]['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0x415af3,null))[_0xb68d('0x11')](function(_0x3a2b16){if(_0x3a2b16){return _0x3a2b16[_0xb68d('0x123')](_0x5f0670[_0xb68d('0x47')]['ids'],_[_0xb68d('0xe7')](_0x5f0670[_0xb68d('0x47')],[_0xb68d('0xe6'),'id'])||{})[_0xb68d('0xaa')](function(_0x547038){for(var _0x4c6e16=0x0;_0x4c6e16<_0x5f0670[_0xb68d('0x47')]['ids']['length'];_0x4c6e16+=0x1){socket['emit'](_0xb68d('0x124'),{'UserId':Number(_0x5f0670[_0xb68d('0x47')][_0xb68d('0xe6')][_0x4c6e16]),'ChatWebsiteId':Number(_0x5f0670[_0xb68d('0x43')]['id'])});}return _0x547038;});}})[_0xb68d('0x11')](respondWithResult(_0x415af3,null))[_0xb68d('0x41')](handleError(_0x415af3,null));};exports[_0xb68d('0x125')]=function(_0x22de4a,_0x527865){return db['ChatWebsite'][_0xb68d('0x4c')]({'where':{'id':_0x22de4a[_0xb68d('0x43')]['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0x527865,null))[_0xb68d('0x11')](function(_0x5d255f){if(_0x5d255f){return _0x5d255f['removeAgents'](_0x22de4a[_0xb68d('0x35')][_0xb68d('0xe6')])['then'](function(){if(_[_0xb68d('0x126')](_0x22de4a['query']['ids'])){for(var _0x41612c=0x0;_0x41612c<_0x22de4a[_0xb68d('0x35')][_0xb68d('0xe6')][_0xb68d('0x45')];_0x41612c+=0x1){socket[_0xb68d('0x127')](_0xb68d('0x128'),{'UserId':Number(_0x22de4a[_0xb68d('0x35')][_0xb68d('0xe6')][_0x41612c]),'ChatWebsiteId':Number(_0x22de4a[_0xb68d('0x43')]['id'])});}}else{socket[_0xb68d('0x127')](_0xb68d('0x128'),{'UserId':Number(_0x22de4a[_0xb68d('0x35')][_0xb68d('0xe6')]),'ChatWebsiteId':Number(_0x22de4a[_0xb68d('0x43')]['id'])});}});}})['then'](respondWithStatusCode(_0x527865,null))[_0xb68d('0x41')](handleError(_0x527865,null));};exports[_0xb68d('0x129')]=function(_0x203a8d,_0x52a83a){var _0x28c453={};var _0x17723d={};var _0xc85c0;var _0x7931eb;return db['ChatWebsite'][_0xb68d('0x5b')]({'where':{'id':_0x203a8d[_0xb68d('0x43')]['id']}})[_0xb68d('0x11')](handleEntityNotFound(_0x52a83a,null))['then'](function(_0x2287a5){if(_0x2287a5){_0xc85c0=_0x2287a5;_0x17723d['model']=_[_0xb68d('0x30')](db['User']['rawAttributes']);_0x17723d['query']=_['keys'](_0x203a8d[_0xb68d('0x35')]);_0x17723d[_0xb68d('0x3b')]=_[_0xb68d('0x31')](_0x17723d[_0xb68d('0x32')],_0x17723d[_0xb68d('0x35')]);_0x28c453['attributes']=_[_0xb68d('0x31')](_0x17723d[_0xb68d('0x32')],qs[_0xb68d('0x34')](_0x203a8d[_0xb68d('0x35')]['fields']));_0x28c453['attributes']=_0x28c453[_0xb68d('0x33')][_0xb68d('0x45')]?_0x28c453[_0xb68d('0x33')]:_0x17723d[_0xb68d('0x32')];_0x28c453[_0xb68d('0x37')]=qs[_0xb68d('0x38')](_0x203a8d[_0xb68d('0x35')][_0xb68d('0x38')]);_0x28c453[_0xb68d('0x39')]=qs['filters'](_[_0xb68d('0x3a')](_0x203a8d[_0xb68d('0x35')],_0x17723d[_0xb68d('0x3b')]));if(_0x203a8d['query'][_0xb68d('0x56')]){_0x28c453[_0xb68d('0x39')]=_['merge'](_0x28c453[_0xb68d('0x39')],{'$or':_[_0xb68d('0x29')](_0x28c453['attributes'],function(_0x136cc2){var _0x466454={};_0x466454[_0x136cc2]={'$like':'%'+_0x203a8d[_0xb68d('0x35')][_0xb68d('0x56')]+'%'};return _0x466454;})});}_0x28c453=_['merge']({},_0x28c453,_0x203a8d[_0xb68d('0x3d')]);return _0xc85c0['getAgents'](_0x28c453);}})[_0xb68d('0x11')](function(_0x4476da){if(_0x4476da){_0x7931eb=_0x4476da[_0xb68d('0x45')];if(!_0x203a8d[_0xb68d('0x35')]['hasOwnProperty'](_0xb68d('0x36'))){_0x28c453['limit']=qs['limit'](_0x203a8d[_0xb68d('0x35')][_0xb68d('0x21')]);_0x28c453[_0xb68d('0x1f')]=qs[_0xb68d('0x1f')](_0x203a8d[_0xb68d('0x35')]['offset']);}return _0xc85c0[_0xb68d('0x129')](_0x28c453);}})[_0xb68d('0x11')](function(_0x185892){if(_0x185892){return _0x185892?{'count':_0x7931eb,'rows':_0x185892}:null;}})['then'](respondWithResult(_0x52a83a,null))['catch'](handleError(_0x52a83a,null));};
\ No newline at end of file
+var _0xe25d=['options','include','findAll','rows','show','params','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','addDisposition','Disposition','getDispositions','findOne','fields','length','ChatWebsiteId','ids','addAnswer','CannedAnswer','getAnswers','removeAnswers','addLogo','file','filename','addAvatar','agentAvatar','addCustomerAvatar','customerAvatar','addSystemAvatar','systemAvatar','getLogo','join','root','server/files/images/logos/default_logo.svg','sitepic','getLicense','custom','isNil','existsSync','server/files/images/logos/','download','getAvatar','getCustomerAvatar','showCustomerAvatar','server/files/images/avatars/','getSystemAvatar','server/files/images/avatars/system_avatar.png','notify','user-agent-parser','setUA','headers','user-agent','chat','CmContact','describe','Sequelize','difference','updatedAt','createdAt','CompanyId','ListId','from','ValidationError','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','mapKey','CmList','List','Contacts','ChatApplication','Applications','account','applications','list','orderBy','priority','asc','defaults','contact','customerIp','cf-connecting-ip','first','x-forwarded-for','split','firstName','lastName','x-real-port','referer','browser','version','format','%s\x20%s','unknown','device','vendor','%s\x20%s\x20%s','threadId','externalUrl','ContactId','ChatInteraction','messageId','interaction','created','autoclose','push','*,*,*,*','ChatMessage','UserId','User','unshift','waitForTheAssignedAgent','forcedOwnership','Start','EventManager','no\x20available\x20attributes','mapKeyOffline','mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','send','MailAccount','findOrCreate','spread','server/files/templates/chatOfflineMessage.ejs','utf8','render','offlineMessageBody','originalname','mimetype','attachments','basename','openNewInteraction','transaction','Attachment','bulkCreate','Smtp','forwardOffline','getSmtpOptions','SendMail','email','forwardOfflineAddress','offlineMessageSubject','MailAccountId','subjectOffline','toPairsIn','mapValues','Chat','NotifyMailAccount','notifyMail','server','files','Could\x20not\x20remove\x20attachment\x20file','addInteraction','omit','getInteractions','includeAll','Contact','fullname','internal','Tag','Tags','color','tag','Command','timezone','iftime\x20%s,%s','iftime\x20%s','interval','ONLINE','OFFLINE','inspect','getSnippet','Interval','Intervals','License','increment','all','some','readFileSync','address','origin','3.1.0','x-real-ip','connection','remoteAddress','virtual','replace','alignment','verticalAlignment','labelText','textColor','textButtonColor','color_button','backgroundColor','hideWhenOffline','IntervalId','addApplications','sequelize','Transaction','READ_COMMITTED','findAndCountAll','stack','finally','json','getApplications','addProactiveActions','chatProactiveAction','getProactiveActions','online','offlineForm','onlineForm','items','fromKey','ChatOfflineMessage','Attachments','addAgents','emit','removeAgents','userChatWebsite:remove','getAgents','bluebird','mustache','util','path','ejs','fs-extra','lodash','../../components/parsers/qs','../../config/logger','../../config/environment','redis','socket.io-emitter','./chatWebsite.socket','html-to-text','jayson/promise','client','http','request','then','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','end','status','undefined','offset','count','set','Content-Range','destroy','get','ChatWebsites','UserProfileResource','name','index','Pause','mandatoryDispositionPause','map','ChatWebsite','rawAttributes','fieldName','type','key','query','keys','model','attributes','intersection','hasOwnProperty','nolimit','limit','order','sort','where','filters','pick','filter','merge'];(function(_0x273c39,_0x1052e6){var _0x46d6b5=function(_0x44f1fb){while(--_0x44f1fb){_0x273c39['push'](_0x273c39['shift']());}};_0x46d6b5(++_0x1052e6);}(_0xe25d,0xe3));var _0xde25=function(_0x2bd69a,_0x3af3e2){_0x2bd69a=_0x2bd69a-0x0;var _0x19b972=_0xe25d[_0x2bd69a];return _0x19b972;};'use strict';var BPromise=require(_0xde25('0x0'));var Mustache=require(_0xde25('0x1'));var util=require(_0xde25('0x2'));var path=require(_0xde25('0x3'));var ejs=require(_0xde25('0x4'));var fs=require('fs');var fs_extra=require(_0xde25('0x5'));var _=require(_0xde25('0x6'));var querystring=require('querystring');var Redis=require('ioredis');var qs=require(_0xde25('0x7'));var logger=require(_0xde25('0x8'))('api');var config=require(_0xde25('0x9'));var url=require('url');var db=require('../../mysqldb')['db'];config[_0xde25('0xa')]=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xde25('0xb'))(new Redis(config[_0xde25('0xa')]));require(_0xde25('0xc'))['register'](socket);var htmlToText=require(_0xde25('0xd'));var jayson=require(_0xde25('0xe'));var client=jayson[_0xde25('0xf')][_0xde25('0x10')]({'port':0x232c});var client9002=jayson[_0xde25('0xf')][_0xde25('0x10')]({'port':0x232a});var client9003=jayson[_0xde25('0xf')][_0xde25('0x10')]({'port':0x232b});var client9001=jayson[_0xde25('0xf')][_0xde25('0x10')]({'port':0x2329});function respondWithRpcPromise(_0x17f234,_0x3653fe,_0x592b75,_0x2cba7f){return new BPromise(function(_0xc873e5,_0x14c7a6){var _0x43a998=_0x2cba7f||client;return _0x43a998[_0xde25('0x11')](_0x17f234,_0x592b75)[_0xde25('0x12')](function(_0x5bdde7){logger[_0xde25('0x13')](_0xde25('0x14'),_0x3653fe,_0xde25('0x15'));logger[_0xde25('0x16')](_0xde25('0x17'),_0x3653fe,'request\x20sent',JSON[_0xde25('0x18')](_0x5bdde7));if(_0x5bdde7[_0xde25('0x19')]){if(_0x5bdde7[_0xde25('0x19')][_0xde25('0x1a')]===0x1f4){logger[_0xde25('0x19')](_0xde25('0x14'),_0x3653fe,_0x5bdde7[_0xde25('0x19')][_0xde25('0x1b')]);return _0x14c7a6(_0x5bdde7[_0xde25('0x19')][_0xde25('0x1b')]);}logger[_0xde25('0x19')](_0xde25('0x14'),_0x3653fe,_0x5bdde7['error']['message']);return _0xc873e5(_0x5bdde7['error'][_0xde25('0x1b')]);}else{logger['info']('ChatWebsite,\x20%s,\x20%s',_0x3653fe,_0xde25('0x15'));_0xc873e5(_0x5bdde7[_0xde25('0x1c')][_0xde25('0x1b')]);}})[_0xde25('0x1d')](function(_0x56a72c){logger['error']('ChatWebsite,\x20%s,\x20%s',_0x3653fe,_0x56a72c);_0x14c7a6(_0x56a72c);});});}function respondWithStatusCode(_0x1df506,_0x476bfa){_0x476bfa=_0x476bfa||0xcc;return function(_0x4346ce){if(_0x4346ce){return _0x1df506[_0xde25('0x1e')](_0x476bfa);}return _0x1df506['status'](_0x476bfa)[_0xde25('0x1f')]();};}function respondWithResult(_0x353f0b,_0x285fea){_0x285fea=_0x285fea||0xc8;return function(_0x40a58c){if(_0x40a58c){return _0x353f0b[_0xde25('0x20')](_0x285fea)['json'](_0x40a58c);}};}function respondWithFilteredResult(_0x38f262,_0x3a9a78){return function(_0x2d7da3){if(_0x2d7da3){var _0x5c65b3=typeof _0x3a9a78['offset']===_0xde25('0x21')&&typeof _0x3a9a78['limit']==='undefined';var _0x4df498=_0x2d7da3['count'];var _0x1e7711=_0x5c65b3?0x0:_0x3a9a78[_0xde25('0x22')];var _0x46c6a9=_0x5c65b3?_0x2d7da3[_0xde25('0x23')]:_0x3a9a78['offset']+_0x3a9a78['limit'];var _0x381a51;if(_0x46c6a9>=_0x4df498){_0x46c6a9=_0x4df498;_0x381a51=0xc8;}else{_0x381a51=0xce;}_0x38f262[_0xde25('0x20')](_0x381a51);return _0x38f262[_0xde25('0x24')](_0xde25('0x25'),_0x1e7711+'-'+_0x46c6a9+'/'+_0x4df498)['json'](_0x2d7da3);}return null;};}function saveUpdates(_0x481a9b){return function(_0x5b21bd){if(_0x5b21bd){return _0x5b21bd['update'](_0x481a9b)[_0xde25('0x12')](function(_0x3574cb){return _0x3574cb;});}return null;};}function removeEntity(_0x585624){return function(_0x5cb0e2){if(_0x5cb0e2){return _0x5cb0e2[_0xde25('0x26')]()[_0xde25('0x12')](function(){var _0xe8a0b9=_0x5cb0e2[_0xde25('0x27')]({'plain':!![]});var _0x355a8e=_0xde25('0x28');return db[_0xde25('0x29')][_0xde25('0x26')]({'where':{'type':_0x355a8e,'resourceId':_0xe8a0b9['id']}})[_0xde25('0x12')](function(){return _0x5cb0e2;});})[_0xde25('0x12')](function(){_0x585624[_0xde25('0x20')](0xcc)[_0xde25('0x1f')]();});}};}function handleEntityNotFound(_0xb0981){return function(_0x428def){if(!_0x428def){_0xb0981[_0xde25('0x1e')](0x194);}return _0x428def;};}function handleError(_0xad7886,_0x244632){_0x244632=_0x244632||0x1f4;return function(_0xaa84c8){logger[_0xde25('0x19')](_0xaa84c8['stack']);if(_0xaa84c8['name']){delete _0xaa84c8[_0xde25('0x2a')];}_0xad7886[_0xde25('0x20')](_0x244632)['send'](_0xaa84c8);};}exports[_0xde25('0x2b')]=function(_0x55ee5a,_0x5a7878){var _0x595528={'include':[{'model':db[_0xde25('0x2c')],'as':_0xde25('0x2d')}]},_0x2bb077={},_0x55b038={'count':0x0,'rows':[]};var _0x4e86f9=_[_0xde25('0x2e')](db[_0xde25('0x2f')][_0xde25('0x30')],function(_0x4f4068){return{'name':_0x4f4068[_0xde25('0x31')],'type':_0x4f4068[_0xde25('0x32')][_0xde25('0x33')]};});_0x2bb077['model']=_[_0xde25('0x2e')](_0x4e86f9,_0xde25('0x2a'));_0x2bb077[_0xde25('0x34')]=_[_0xde25('0x35')](_0x55ee5a[_0xde25('0x34')]);_0x2bb077['filters']=_['intersection'](_0x2bb077[_0xde25('0x36')],_0x2bb077[_0xde25('0x34')]);_0x595528[_0xde25('0x37')]=_[_0xde25('0x38')](_0x2bb077[_0xde25('0x36')],qs['fields'](_0x55ee5a['query']['fields']));_0x595528[_0xde25('0x37')]=_0x595528['attributes']['length']?_0x595528[_0xde25('0x37')]:_0x2bb077[_0xde25('0x36')];if(!_0x55ee5a[_0xde25('0x34')][_0xde25('0x39')](_0xde25('0x3a'))){_0x595528[_0xde25('0x3b')]=qs[_0xde25('0x3b')](_0x55ee5a[_0xde25('0x34')]['limit']);_0x595528[_0xde25('0x22')]=qs[_0xde25('0x22')](_0x55ee5a[_0xde25('0x34')][_0xde25('0x22')]);}_0x595528[_0xde25('0x3c')]=qs[_0xde25('0x3d')](_0x55ee5a['query'][_0xde25('0x3d')]);_0x595528[_0xde25('0x3e')]=qs[_0xde25('0x3f')](_[_0xde25('0x40')](_0x55ee5a['query'],_0x2bb077[_0xde25('0x3f')]),_0x4e86f9);if(_0x55ee5a[_0xde25('0x34')][_0xde25('0x41')]){_0x595528[_0xde25('0x3e')]=_[_0xde25('0x42')](_0x595528[_0xde25('0x3e')],{'$or':_[_0xde25('0x2e')](_0x4e86f9,function(_0x1c82e3){if(_0x1c82e3[_0xde25('0x32')]!=='VIRTUAL'){var _0x2d8716={};_0x2d8716[_0x1c82e3[_0xde25('0x2a')]]={'$like':'%'+_0x55ee5a[_0xde25('0x34')]['filter']+'%'};return _0x2d8716;}})});}_0x595528=_[_0xde25('0x42')]({},_0x595528,_0x55ee5a[_0xde25('0x43')]);var _0x11e32c={'where':_0x595528[_0xde25('0x3e')]};return db[_0xde25('0x2f')][_0xde25('0x23')](_0x11e32c)[_0xde25('0x12')](function(_0x17fd01){_0x55b038[_0xde25('0x23')]=_0x17fd01;if(_0x55ee5a['query']['includeAll']){_0x595528[_0xde25('0x44')]=[{'all':!![]}];}return db[_0xde25('0x2f')][_0xde25('0x45')](_0x595528);})[_0xde25('0x12')](function(_0x105880){_0x55b038[_0xde25('0x46')]=_0x105880;return _0x55b038;})[_0xde25('0x12')](respondWithFilteredResult(_0x5a7878,_0x595528))['catch'](handleError(_0x5a7878,null));};exports[_0xde25('0x47')]=function(_0x10addb,_0x4d8629){var _0x2086fa={'raw':![],'where':{'id':_0x10addb[_0xde25('0x48')]['id']},'include':[{'model':db[_0xde25('0x2c')],'as':_0xde25('0x2d')}]},_0x6cf8f5={};_0x6cf8f5[_0xde25('0x36')]=_[_0xde25('0x35')](db[_0xde25('0x2f')][_0xde25('0x30')]);_0x6cf8f5[_0xde25('0x34')]=_[_0xde25('0x35')](_0x10addb['query']);_0x6cf8f5[_0xde25('0x3f')]=_[_0xde25('0x38')](_0x6cf8f5['model'],_0x6cf8f5[_0xde25('0x34')]);_0x2086fa[_0xde25('0x37')]=_['intersection'](_0x6cf8f5['model'],qs['fields'](_0x10addb[_0xde25('0x34')]['fields']));_0x2086fa['attributes']=_0x2086fa['attributes']['length']?_0x2086fa['attributes']:_0x6cf8f5[_0xde25('0x36')];if(_0x10addb['query']['includeAll']){_0x2086fa[_0xde25('0x44')]=[{'all':!![]}];}_0x2086fa=_[_0xde25('0x42')]({},_0x2086fa,_0x10addb[_0xde25('0x43')]);return db[_0xde25('0x2f')][_0xde25('0x49')](_0x2086fa)[_0xde25('0x12')](handleEntityNotFound(_0x4d8629,null))[_0xde25('0x12')](respondWithResult(_0x4d8629,null))[_0xde25('0x1d')](handleError(_0x4d8629,null));};exports[_0xde25('0x4a')]=function(_0x6e8203,_0x2357b2){return db[_0xde25('0x2f')][_0xde25('0x4a')](_0x6e8203['body'],{})[_0xde25('0x12')](function(_0x849023){var _0x42f506=_0x6e8203[_0xde25('0x4b')][_0xde25('0x27')]({'plain':!![]});if(!_0x42f506)throw new Error(_0xde25('0x4c'));if(_0x42f506[_0xde25('0x4d')]===_0xde25('0x4b')){var _0x165460=_0x849023[_0xde25('0x27')]({'plain':!![]});var _0x2fff44=_0xde25('0x28');return db['UserProfileSection'][_0xde25('0x49')]({'where':{'name':_0x2fff44,'userProfileId':_0x42f506[_0xde25('0x4e')]},'raw':!![]})['then'](function(_0x398eb5){if(_0x398eb5&&_0x398eb5[_0xde25('0x4f')]===0x0){return db[_0xde25('0x29')][_0xde25('0x4a')]({'name':_0x165460[_0xde25('0x2a')],'resourceId':_0x165460['id'],'type':_0x398eb5[_0xde25('0x2a')],'sectionId':_0x398eb5['id']},{})[_0xde25('0x12')](function(){return _0x849023;});}else{return _0x849023;}})['catch'](function(_0x38af10){logger[_0xde25('0x19')](_0xde25('0x50'),_0x38af10);throw _0x38af10;});}return _0x849023;})[_0xde25('0x12')](respondWithResult(_0x2357b2,0xc9))[_0xde25('0x1d')](handleError(_0x2357b2,null));};exports[_0xde25('0x51')]=function(_0x20c14a,_0x14fe93){if(_0x20c14a['body']['id']){delete _0x20c14a[_0xde25('0x52')]['id'];}return db[_0xde25('0x2f')][_0xde25('0x49')]({'where':{'id':_0x20c14a[_0xde25('0x48')]['id']},'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]})['then'](handleEntityNotFound(_0x14fe93,null))[_0xde25('0x12')](saveUpdates(_0x20c14a['body'],null))[_0xde25('0x12')](respondWithResult(_0x14fe93,null))[_0xde25('0x1d')](handleError(_0x14fe93,null));};exports[_0xde25('0x26')]=function(_0x511690,_0x2f1ec8){return db[_0xde25('0x2f')][_0xde25('0x49')]({'where':{'id':_0x511690[_0xde25('0x48')]['id']}})[_0xde25('0x12')](handleEntityNotFound(_0x2f1ec8,null))[_0xde25('0x12')](removeEntity(_0x2f1ec8,null))[_0xde25('0x1d')](handleError(_0x2f1ec8,null));};exports['describe']=function(_0x12e6f0,_0x5721a7){return db['ChatWebsite']['describe']()['then'](respondWithResult(_0x5721a7,null))[_0xde25('0x1d')](handleError(_0x5721a7,null));};exports[_0xde25('0x53')]=function(_0x52a9f3,_0x2a1d88){if(_0x52a9f3[_0xde25('0x52')]['id']){delete _0x52a9f3[_0xde25('0x52')]['id'];}return db['ChatWebsite']['find']({'where':{'id':_0x52a9f3[_0xde25('0x48')]['id']}})[_0xde25('0x12')](handleEntityNotFound(_0x2a1d88,null))[_0xde25('0x12')](function(_0x3a05e8){if(_0x3a05e8){_0x52a9f3[_0xde25('0x52')]['ChatWebsiteId']=_0x3a05e8['id'];return db[_0xde25('0x54')]['create'](_0x52a9f3['body']);}})[_0xde25('0x12')](respondWithResult(_0x2a1d88,null))[_0xde25('0x1d')](handleError(_0x2a1d88,null));};exports[_0xde25('0x55')]=function(_0x267102,_0x58515d){var _0x5b4175={'raw':![],'where':{}};var _0xf563e1={};var _0x240933={'count':0x0,'rows':[]};return db[_0xde25('0x2f')][_0xde25('0x56')]({'where':{'id':_0x267102[_0xde25('0x48')]['id']}})[_0xde25('0x12')](handleEntityNotFound(_0x58515d,null))[_0xde25('0x12')](function(_0x1ed3e8){if(_0x1ed3e8){_0xf563e1['model']=_[_0xde25('0x35')](db[_0xde25('0x54')][_0xde25('0x30')]);_0xf563e1[_0xde25('0x34')]=_['keys'](_0x267102[_0xde25('0x34')]);_0xf563e1[_0xde25('0x3f')]=_[_0xde25('0x38')](_0xf563e1[_0xde25('0x36')],_0xf563e1['query']);_0x5b4175[_0xde25('0x37')]=_['intersection'](_0xf563e1[_0xde25('0x36')],qs[_0xde25('0x57')](_0x267102[_0xde25('0x34')][_0xde25('0x57')]));_0x5b4175['attributes']=_0x5b4175[_0xde25('0x37')][_0xde25('0x58')]?_0x5b4175[_0xde25('0x37')]:_0xf563e1[_0xde25('0x36')];if(!_0x267102[_0xde25('0x34')][_0xde25('0x39')]('nolimit')){_0x5b4175[_0xde25('0x3b')]=qs[_0xde25('0x3b')](_0x267102[_0xde25('0x34')][_0xde25('0x3b')]);_0x5b4175[_0xde25('0x22')]=qs[_0xde25('0x22')](_0x267102[_0xde25('0x34')][_0xde25('0x22')]);}_0x5b4175['order']=qs[_0xde25('0x3d')](_0x267102['query'][_0xde25('0x3d')]);_0x5b4175[_0xde25('0x3e')]=qs[_0xde25('0x3f')](_[_0xde25('0x40')](_0x267102[_0xde25('0x34')],_0xf563e1[_0xde25('0x3f')]));_0x5b4175[_0xde25('0x3e')][_0xde25('0x59')]=_0x1ed3e8['id'];if(_0x267102['query'][_0xde25('0x41')]){_0x5b4175[_0xde25('0x3e')]=_[_0xde25('0x42')](_0x5b4175[_0xde25('0x3e')],{'$or':_['map'](_0x5b4175[_0xde25('0x37')],function(_0x10ce56){var _0x2a1c95={};_0x2a1c95[_0x10ce56]={'$like':'%'+_0x267102[_0xde25('0x34')][_0xde25('0x41')]+'%'};return _0x2a1c95;})});}_0x5b4175=_['merge']({},_0x5b4175,_0x267102[_0xde25('0x43')]);return db['Disposition'][_0xde25('0x23')]({'where':_0x5b4175[_0xde25('0x3e')]})[_0xde25('0x12')](function(_0x205ce0){_0x240933['count']=_0x205ce0;if(_0x267102[_0xde25('0x34')]['includeAll']){_0x5b4175[_0xde25('0x44')]=[{'all':!![]}];}return db[_0xde25('0x54')][_0xde25('0x45')](_0x5b4175);})[_0xde25('0x12')](function(_0x3d2bfa){_0x240933[_0xde25('0x46')]=_0x3d2bfa;return _0x240933;});}})[_0xde25('0x12')](respondWithFilteredResult(_0x58515d,_0x5b4175))['catch'](handleError(_0x58515d,null));};exports['removeDispositions']=function(_0x4c9ec3,_0x33edf7){return db[_0xde25('0x2f')][_0xde25('0x49')]({'where':{'id':_0x4c9ec3['params']['id']}})[_0xde25('0x12')](handleEntityNotFound(_0x33edf7,null))[_0xde25('0x12')](function(_0x3a9767){if(_0x3a9767){return _0x3a9767['removeDispositions'](_0x4c9ec3[_0xde25('0x34')][_0xde25('0x5a')]);}})[_0xde25('0x12')](respondWithStatusCode(_0x33edf7,null))[_0xde25('0x1d')](handleError(_0x33edf7,null));};exports[_0xde25('0x5b')]=function(_0x4ff59c,_0x577a5e){if(_0x4ff59c['body']['id']){delete _0x4ff59c[_0xde25('0x52')]['id'];}return db[_0xde25('0x2f')][_0xde25('0x49')]({'where':{'id':_0x4ff59c[_0xde25('0x48')]['id']}})[_0xde25('0x12')](handleEntityNotFound(_0x577a5e,null))[_0xde25('0x12')](function(_0x540890){if(_0x540890){_0x4ff59c[_0xde25('0x52')][_0xde25('0x59')]=_0x540890['id'];return db[_0xde25('0x5c')]['create'](_0x4ff59c[_0xde25('0x52')]);}})['then'](respondWithResult(_0x577a5e,null))[_0xde25('0x1d')](handleError(_0x577a5e,null));};exports[_0xde25('0x5d')]=function(_0x188e93,_0x135541){var _0x4cf7ed={'raw':![],'where':{}};var _0x43e4ef={};var _0x1b74b5={'count':0x0,'rows':[]};return db['ChatWebsite']['findOne']({'where':{'id':_0x188e93[_0xde25('0x48')]['id']}})[_0xde25('0x12')](handleEntityNotFound(_0x135541,null))['then'](function(_0x1fc402){if(_0x1fc402){_0x43e4ef[_0xde25('0x36')]=_[_0xde25('0x35')](db['CannedAnswer'][_0xde25('0x30')]);_0x43e4ef[_0xde25('0x34')]=_[_0xde25('0x35')](_0x188e93[_0xde25('0x34')]);_0x43e4ef['filters']=_[_0xde25('0x38')](_0x43e4ef[_0xde25('0x36')],_0x43e4ef[_0xde25('0x34')]);_0x4cf7ed[_0xde25('0x37')]=_[_0xde25('0x38')](_0x43e4ef[_0xde25('0x36')],qs['fields'](_0x188e93['query'][_0xde25('0x57')]));_0x4cf7ed[_0xde25('0x37')]=_0x4cf7ed['attributes'][_0xde25('0x58')]?_0x4cf7ed['attributes']:_0x43e4ef['model'];if(!_0x188e93[_0xde25('0x34')][_0xde25('0x39')](_0xde25('0x3a'))){_0x4cf7ed[_0xde25('0x3b')]=qs[_0xde25('0x3b')](_0x188e93[_0xde25('0x34')][_0xde25('0x3b')]);_0x4cf7ed[_0xde25('0x22')]=qs[_0xde25('0x22')](_0x188e93[_0xde25('0x34')][_0xde25('0x22')]);}_0x4cf7ed[_0xde25('0x3c')]=qs[_0xde25('0x3d')](_0x188e93[_0xde25('0x34')][_0xde25('0x3d')]);_0x4cf7ed[_0xde25('0x3e')]=qs[_0xde25('0x3f')](_[_0xde25('0x40')](_0x188e93[_0xde25('0x34')],_0x43e4ef['filters']));_0x4cf7ed['where'][_0xde25('0x59')]=_0x1fc402['id'];if(_0x188e93[_0xde25('0x34')][_0xde25('0x41')]){_0x4cf7ed[_0xde25('0x3e')]=_[_0xde25('0x42')](_0x4cf7ed[_0xde25('0x3e')],{'$or':_[_0xde25('0x2e')](_0x4cf7ed[_0xde25('0x37')],function(_0x296624){var _0x4cf0f9={};_0x4cf0f9[_0x296624]={'$like':'%'+_0x188e93[_0xde25('0x34')]['filter']+'%'};return _0x4cf0f9;})});}_0x4cf7ed=_[_0xde25('0x42')]({},_0x4cf7ed,_0x188e93[_0xde25('0x43')]);return db['CannedAnswer'][_0xde25('0x23')]({'where':_0x4cf7ed[_0xde25('0x3e')]})[_0xde25('0x12')](function(_0x3020b4){_0x1b74b5[_0xde25('0x23')]=_0x3020b4;if(_0x188e93[_0xde25('0x34')]['includeAll']){_0x4cf7ed[_0xde25('0x44')]=[{'all':!![]}];}return db[_0xde25('0x5c')][_0xde25('0x45')](_0x4cf7ed);})[_0xde25('0x12')](function(_0x3a4cac){_0x1b74b5[_0xde25('0x46')]=_0x3a4cac;return _0x1b74b5;});}})['then'](respondWithFilteredResult(_0x135541,_0x4cf7ed))['catch'](handleError(_0x135541,null));};exports['removeAnswers']=function(_0x4cdf0c,_0x142132){return db[_0xde25('0x2f')][_0xde25('0x49')]({'where':{'id':_0x4cdf0c['params']['id']}})['then'](handleEntityNotFound(_0x142132,null))[_0xde25('0x12')](function(_0x1650e5){if(_0x1650e5){return _0x1650e5[_0xde25('0x5e')](_0x4cdf0c['query'][_0xde25('0x5a')]);}})[_0xde25('0x12')](respondWithStatusCode(_0x142132,null))['catch'](handleError(_0x142132,null));};exports[_0xde25('0x5f')]=function(_0x36cc35,_0x27f641){_0x36cc35[_0xde25('0x52')]['sitepic']=_0x36cc35[_0xde25('0x60')][_0xde25('0x61')];return db[_0xde25('0x2f')]['find']({'where':{'id':_0x36cc35['params']['id']}})['then'](handleEntityNotFound(_0x27f641,null))[_0xde25('0x12')](saveUpdates(_0x36cc35[_0xde25('0x52')],null))[_0xde25('0x12')](respondWithResult(_0x27f641,null))['catch'](handleError(_0x27f641,null));};exports[_0xde25('0x62')]=function(_0xa854c4,_0x173f62){_0xa854c4['body'][_0xde25('0x63')]=_0xa854c4[_0xde25('0x60')][_0xde25('0x61')];return db[_0xde25('0x2f')][_0xde25('0x49')]({'where':{'id':_0xa854c4['params']['id']}})[_0xde25('0x12')](handleEntityNotFound(_0x173f62,null))['then'](saveUpdates(_0xa854c4[_0xde25('0x52')],null))['then'](respondWithResult(_0x173f62,null))['catch'](handleError(_0x173f62,null));};exports[_0xde25('0x64')]=function(_0x5d99eb,_0x5d1ff0){_0x5d99eb[_0xde25('0x52')][_0xde25('0x65')]=_0x5d99eb[_0xde25('0x60')]['filename'];return db['ChatWebsite'][_0xde25('0x49')]({'where':{'id':_0x5d99eb[_0xde25('0x48')]['id']}})[_0xde25('0x12')](handleEntityNotFound(_0x5d1ff0,null))[_0xde25('0x12')](saveUpdates(_0x5d99eb['body'],null))[_0xde25('0x12')](respondWithResult(_0x5d1ff0,null))['catch'](handleError(_0x5d1ff0,null));};exports[_0xde25('0x66')]=function(_0x1ea339,_0x29c1ef){_0x1ea339[_0xde25('0x52')][_0xde25('0x67')]=_0x1ea339[_0xde25('0x60')][_0xde25('0x61')];return db[_0xde25('0x2f')][_0xde25('0x49')]({'where':{'id':_0x1ea339['params']['id']}})[_0xde25('0x12')](handleEntityNotFound(_0x29c1ef,null))[_0xde25('0x12')](saveUpdates(_0x1ea339[_0xde25('0x52')],null))[_0xde25('0x12')](respondWithResult(_0x29c1ef,null))[_0xde25('0x1d')](handleError(_0x29c1ef,null));};exports[_0xde25('0x68')]=function(_0x3a4beb,_0x1c1910){var _0x464586=path[_0xde25('0x69')](config[_0xde25('0x6a')],_0xde25('0x6b'));var _0x55313f={'where':{'id':_0x3a4beb['params']['id']},'attributes':['id',_0xde25('0x6c')],'raw':!![]};var _0x4487e3=![];return require('../../config/license/util')[_0xde25('0x6d')]()[_0xde25('0x12')](function(_0x5ab104){if(_0x5ab104){_0x4487e3=_0x5ab104[_0xde25('0x6e')];}})[_0xde25('0x12')](function(){return db['ChatWebsite'][_0xde25('0x49')](_0x55313f);})[_0xde25('0x12')](handleEntityNotFound(_0x1c1910,null))[_0xde25('0x12')](function(_0x21ba49){if(_0x21ba49){if(!_[_0xde25('0x6f')](_0x21ba49['sitepic'])){if(fs[_0xde25('0x70')](path[_0xde25('0x69')](config['root'],_0xde25('0x71'),_0x21ba49[_0xde25('0x6c')]))&&_0x4487e3){_0x464586=path['join'](config[_0xde25('0x6a')],_0xde25('0x71'),_0x21ba49[_0xde25('0x6c')]);}}return _0x1c1910[_0xde25('0x72')](_0x464586);}})[_0xde25('0x1d')](handleError(_0x1c1910,null));};exports[_0xde25('0x73')]=function(_0x24dec2,_0x23266e){var _0x267ca4=path['join'](config[_0xde25('0x6a')],'server/files/images/avatars/default_avatar.png');var _0x488069={'where':{'id':_0x24dec2[_0xde25('0x48')]['id']},'attributes':['id',_0xde25('0x63')],'raw':!![]};return db[_0xde25('0x2f')][_0xde25('0x49')](_0x488069)[_0xde25('0x12')](handleEntityNotFound(_0x23266e,null))['then'](function(_0x20487f){if(_0x20487f){if(!_[_0xde25('0x6f')](_0x20487f[_0xde25('0x63')])){if(fs['existsSync'](path[_0xde25('0x69')](config['root'],'server/files/images/avatars/',_0x20487f['agentAvatar']))){_0x267ca4=path[_0xde25('0x69')](config[_0xde25('0x6a')],'server/files/images/avatars/',_0x20487f[_0xde25('0x63')]);}}return _0x23266e[_0xde25('0x72')](_0x267ca4);}})[_0xde25('0x1d')](handleError(_0x23266e,null));};exports[_0xde25('0x74')]=function(_0x5c6d1a,_0x495e3e){var _0x41da2b=path[_0xde25('0x69')](config[_0xde25('0x6a')],'server/files/images/avatars/customer_avatar.png');var _0x48df44={'where':{'id':_0x5c6d1a[_0xde25('0x48')]['id']},'attributes':['id','customerAvatar',_0xde25('0x75')],'raw':!![]};return db[_0xde25('0x2f')][_0xde25('0x49')](_0x48df44)[_0xde25('0x12')](handleEntityNotFound(_0x495e3e,null))['then'](function(_0x46fd11){if(_0x46fd11){if(!_[_0xde25('0x6f')](_0x46fd11[_0xde25('0x65')])){if(fs[_0xde25('0x70')](path[_0xde25('0x69')](config[_0xde25('0x6a')],_0xde25('0x76'),_0x46fd11[_0xde25('0x65')]))&&_0x46fd11[_0xde25('0x75')]){_0x41da2b=path[_0xde25('0x69')](config[_0xde25('0x6a')],'server/files/images/avatars/',_0x46fd11['customerAvatar']);}}return _0x495e3e[_0xde25('0x72')](_0x41da2b);}})[_0xde25('0x1d')](handleError(_0x495e3e,null));};exports[_0xde25('0x77')]=function(_0x43e5f2,_0x52ae99){var _0x5acc64=path[_0xde25('0x69')](config['root'],_0xde25('0x78'));var _0x1de53d={'where':{'id':_0x43e5f2[_0xde25('0x48')]['id']},'attributes':['id',_0xde25('0x67')],'raw':!![]};return db[_0xde25('0x2f')][_0xde25('0x49')](_0x1de53d)[_0xde25('0x12')](handleEntityNotFound(_0x52ae99,null))[_0xde25('0x12')](function(_0x3a614c){if(_0x3a614c){if(!_[_0xde25('0x6f')](_0x3a614c[_0xde25('0x67')])){if(fs['existsSync'](path[_0xde25('0x69')](config[_0xde25('0x6a')],_0xde25('0x76'),_0x3a614c[_0xde25('0x67')]))){_0x5acc64=path[_0xde25('0x69')](config['root'],_0xde25('0x76'),_0x3a614c[_0xde25('0x67')]);}}return _0x52ae99['download'](_0x5acc64);}})[_0xde25('0x1d')](handleError(_0x52ae99,null));};exports[_0xde25('0x79')]=function(_0x1fcf60,_0x34b42a){var _0x25b12c=require(_0xde25('0x7a'));var _0xdcd61c=new _0x25b12c();var _0x2b9105=_0xdcd61c[_0xde25('0x7b')](_0x1fcf60[_0xde25('0x7c')][_0xde25('0x7d')])['getResult']();var _0x48c69c={'body':_0x1fcf60['body'],'channel':_0xde25('0x7e')};var _0x560d07=[];var _0x1e8b86=[];var _0x339763={};var _0x1d1d67=![];return db[_0xde25('0x7f')][_0xde25('0x80')]()[_0xde25('0x12')](function(_0x1e7a2f){if(!_0x1e7a2f){throw new db[(_0xde25('0x81'))]['ValidationError']('no\x20available\x20attributes');}_0x560d07=_[_0xde25('0x82')](_[_0xde25('0x35')](_0x1e7a2f),['createdAt',_0xde25('0x83')]);_0x1e8b86=_[_0xde25('0x82')](_[_0xde25('0x35')](_0x1e7a2f),[_0xde25('0x84'),_0xde25('0x83'),_0xde25('0x85'),_0xde25('0x86')]);if(_0x1fcf60[_0xde25('0x52')]['id']){delete _0x1fcf60[_0xde25('0x52')]['id'];}if(_[_0xde25('0x6f')](_0x1fcf60[_0xde25('0x52')][_0xde25('0x87')])){throw new db['Sequelize'][(_0xde25('0x88'))](_0xde25('0x89'));}if(_[_0xde25('0x6f')](_0x1fcf60['body'][_0xde25('0x52')])||_0x1fcf60[_0xde25('0x52')][_0xde25('0x52')]===''){throw new db['Sequelize'][(_0xde25('0x88'))](_0xde25('0x8a'));}if(_['isNil'](_0x1fcf60[_0xde25('0x52')]['mapKey'])){throw new db['Sequelize'][(_0xde25('0x88'))]('mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x1e8b86);}if(!_[_0xde25('0x8b')](_0x1e8b86,_0x1fcf60[_0xde25('0x52')]['mapKey'])){throw new db[(_0xde25('0x81'))][(_0xde25('0x88'))](_0xde25('0x8c')+_0x1e8b86);}_0x339763[_0x1fcf60[_0xde25('0x52')][_0xde25('0x8d')]]=_0x1fcf60['body']['from'];})['then'](function(){return db[_0xde25('0x2f')][_0xde25('0x49')]({'where':{'id':_0x1fcf60[_0xde25('0x48')]['id']},'include':[{'model':db[_0xde25('0x8e')],'as':_0xde25('0x8f'),'include':[{'model':db[_0xde25('0x7f')],'as':_0xde25('0x90'),'where':_0x339763,'limit':0x1,'order':[[_0xde25('0x83'),'DESC']]}]},{'model':db[_0xde25('0x91')],'as':_0xde25('0x92')}]});})['then'](handleEntityNotFound(_0x34b42a,null))[_0xde25('0x12')](function(_0x4c28bf){if(_0x4c28bf&&_0x4c28bf[_0xde25('0x8f')]){_0x48c69c[_0xde25('0x93')]=_0x4c28bf;_0x48c69c[_0xde25('0x94')]=_0x4c28bf['Applications'];_0x48c69c[_0xde25('0x95')]=_0x4c28bf['List'];_0x48c69c[_0xde25('0x94')]=_[_0xde25('0x96')](_0x48c69c[_0xde25('0x94')],[_0xde25('0x97')],[_0xde25('0x98')]);if(_0x48c69c[_0xde25('0x93')][_0xde25('0x92')]){delete _0x48c69c[_0xde25('0x93')][_0xde25('0x92')];}if(_0x48c69c['account'][_0xde25('0x8f')]&&_0x48c69c[_0xde25('0x93')][_0xde25('0x8f')][_0xde25('0x90')][_0xde25('0x58')]){return _0x48c69c[_0xde25('0x93')][_0xde25('0x8f')][_0xde25('0x90')][0x0];}var _0x32fb02=_[_0xde25('0x99')](_0x1fcf60[_0xde25('0x52')],{'firstName':_0x1fcf60['body'][_0xde25('0x87')],'ListId':_0x4c28bf[_0xde25('0x86')]});_0x32fb02[_0x1fcf60[_0xde25('0x52')][_0xde25('0x8d')]]=_0x1fcf60[_0xde25('0x52')][_0xde25('0x87')];return db[_0xde25('0x7f')]['create'](_0x32fb02,{'fields':_0x560d07,'raw':!![]});}})[_0xde25('0x12')](handleEntityNotFound(_0x34b42a,null))['then'](function(_0x3d7f10){_0x48c69c[_0xde25('0x9a')]=_0x3d7f10;var _0x525ed5=_0x1fcf60['body'][_0xde25('0x9b')];if(_0x1fcf60[_0xde25('0x7c')][_0xde25('0x9c')]){_0x525ed5=_0x1fcf60[_0xde25('0x7c')][_0xde25('0x9c')];}else if(_0x1fcf60[_0xde25('0x7c')]['x-forwarded-for']){_0x525ed5=_[_0xde25('0x9d')](_0x1fcf60[_0xde25('0x7c')][_0xde25('0x9e')][_0xde25('0x9f')](','));}if(_0x3d7f10){var _0x3290cc={'ContactId':_0x3d7f10['id'],'ChatWebsiteId':_0x1fcf60['params']['id'],'from':(_0x3d7f10[_0xde25('0xa0')]||'')+'\x20'+(_0x3d7f10[_0xde25('0xa1')]||''),'customerIp':_0x525ed5,'customerPort':_0x1fcf60[_0xde25('0x7c')][_0xde25('0xa2')]?_0x1fcf60[_0xde25('0x7c')]['x-real-port']:null,'referer':_0x1fcf60[_0xde25('0x52')][_0xde25('0xa3')],'browserName':_0x2b9105[_0xde25('0xa4')][_0xde25('0x2a')]&&_0x2b9105[_0xde25('0xa4')][_0xde25('0xa5')]?util[_0xde25('0xa6')](_0xde25('0xa7'),_0x2b9105[_0xde25('0xa4')]['name'],_0x2b9105[_0xde25('0xa4')][_0xde25('0xa5')]):_0xde25('0xa8'),'browserVersion':_0x2b9105[_0xde25('0xa4')][_0xde25('0xa5')]||_0xde25('0xa8'),'osName':util[_0xde25('0xa6')](_0xde25('0xa7'),_0x2b9105['os'][_0xde25('0x2a')],_0x2b9105['os'][_0xde25('0xa5')]),'osVersion':_0x2b9105['os'][_0xde25('0xa5')],'deviceModel':_0x2b9105[_0xde25('0xa9')][_0xde25('0x36')]&&_0x2b9105[_0xde25('0xa9')][_0xde25('0xaa')]?util[_0xde25('0xa6')](_0xde25('0xab'),_0x2b9105[_0xde25('0xa9')]['model'],_0x2b9105[_0xde25('0xa9')][_0xde25('0xaa')],_0x2b9105[_0xde25('0xa9')]['type']):null,'deviceVendor':_0x2b9105[_0xde25('0xa9')][_0xde25('0xaa')],'deviceType':_0x2b9105[_0xde25('0xa9')][_0xde25('0x32')],'formData':JSON[_0xde25('0x18')](_0x1fcf60[_0xde25('0x52')])};var _0x309dc8={'ChatWebsiteId':_0x1fcf60['params']['id'],'closed':![]};if(_0x1fcf60[_0xde25('0x52')][_0xde25('0xac')]){_0x309dc8['threadId']=_0x1fcf60['body'][_0xde25('0xac')];return db['ChatInteraction'][_0xde25('0x49')]({'where':_0x309dc8})['then'](function(_0x19edd4){if(_0x19edd4){return[_0x19edd4,![]];}_0x3290cc[_0xde25('0xac')]=_0x1fcf60[_0xde25('0x52')]['threadId'];_0x3290cc[_0xde25('0xad')]=_0x1fcf60[_0xde25('0x52')][_0xde25('0xad')];return db['ChatInteraction'][_0xde25('0x4a')](_0x3290cc)['then'](function(_0x259a19){return[_0x259a19,!![]];});});}_0x309dc8[_0xde25('0xae')]=_0x3d7f10['id'];if(_0x1fcf60[_0xde25('0x52')]['interaction']&&_0x1fcf60['body']['interaction']['id']){_0x309dc8['id']=_0x1fcf60['body']['interaction']['id'];return db[_0xde25('0xaf')]['find']({'where':_0x309dc8})['then'](function(_0x51b07d){if(_0x51b07d){return[_0x51b07d,![]];}return db['ChatInteraction']['create'](_0x3290cc)[_0xde25('0x12')](function(_0x10ed1e){return[_0x10ed1e,!![]];});});}return db[_0xde25('0xaf')]['create'](_0x3290cc)['then'](function(_0x3adbc3){return[_0x3adbc3,!![]];});}})['spread'](function(_0x1eca1a,_0x36a466){if(_0x1eca1a){_0x1d1d67=_0x36a466;if(!_0x36a466){var _0x504c49={'from':(_0x48c69c[_0xde25('0x9a')][_0xde25('0xa0')]||'')+'\x20'+(_0x48c69c[_0xde25('0x9a')]['lastName']||'')};if(_0x1fcf60[_0xde25('0x52')][_0xde25('0xac')]&&_0x1fcf60[_0xde25('0x52')][_0xde25('0xb0')]&&_0x1fcf60[_0xde25('0x52')]['threadId']!=_0x1fcf60[_0xde25('0x52')]['messageId']){_0x504c49[_0xde25('0xac')]=_0x1fcf60['body']['messageId'];}return _0x1eca1a[_0xde25('0x51')](_0x504c49);}else{return _0x1eca1a;}}})['then'](function(_0x5e804e){_0x48c69c[_0xde25('0xb1')]=_0x5e804e[_0xde25('0x27')]({'plain':!![]});_0x48c69c[_0xde25('0xb1')][_0xde25('0xb2')]=_0x1d1d67;if(_0x48c69c[_0xde25('0xb1')][_0xde25('0xb2')]){if(_0x48c69c[_0xde25('0x93')][_0xde25('0xb3')]){_0x48c69c[_0xde25('0x94')][_0xde25('0xb4')]({'id':0x0,'priority':_0x48c69c[_0xde25('0x94')][_0xde25('0x58')]+0x1,'app':'close','appdata':'unmanaged','interval':_0xde25('0xb5')});}}return db[_0xde25('0xb6')][_0xde25('0x4a')]({'body':_0x1fcf60[_0xde25('0x52')][_0xde25('0x52')],'ChatWebsiteId':_0x1fcf60[_0xde25('0x48')]['id'],'ChatInteractionId':_0x5e804e['id'],'direction':'in','ContactId':_0x48c69c[_0xde25('0x9a')]['id'],'AttachmentId':_0x1fcf60[_0xde25('0x52')]['AttachmentId']});})[_0xde25('0x12')](function(_0x46f443){_0x48c69c[_0xde25('0x1b')]=_0x46f443;if(_0x48c69c[_0xde25('0xb1')][_0xde25('0xb7')]){return db[_0xde25('0xb8')][_0xde25('0x49')]({'attributes':['id',_0xde25('0x2a')],'where':{'id':_0x48c69c[_0xde25('0xb1')][_0xde25('0xb7')]}})[_0xde25('0x12')](function(_0x53676d){if(_0x53676d){_0x48c69c['applications'][_0xde25('0xb9')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x53676d[_0xde25('0x2a')]+','+(_0x48c69c[_0xde25('0x93')][_0xde25('0xba')]||0xa),'interval':_0xde25('0xb5')});_0x48c69c[_0xde25('0xbb')]=!![];}return respondWithRpcPromise(_0xde25('0xbc'),'startRouting',_0x48c69c);});}return respondWithRpcPromise('Start','startRouting',_0x48c69c);})['then'](function(_0x22dc44){respondWithRpcPromise('EventManager',_0xde25('0xbd'),{'event':'notify','message':_0x22dc44},client9002);return _0x22dc44;})['then'](respondWithResult(_0x34b42a,null))[_0xde25('0x1d')](handleError(_0x34b42a,null));};exports['offline']=function(_0x52c0df,_0x1022ed){var _0x236665,_0x5db8f1,_0x2c0c1a;var _0x516433=[];var _0x2578f2={};var _0x58d39e=_0x52c0df['files']||[];var _0x1e0cd9=[];var _0x595ce5;return db[_0xde25('0x7f')][_0xde25('0x80')]()['then'](function(_0x24ac2f){if(!_0x24ac2f){throw new db['Sequelize'][(_0xde25('0x88'))](_0xde25('0xbe'));}_0x516433=_[_0xde25('0x82')](_[_0xde25('0x35')](_0x24ac2f),[_0xde25('0x84'),'updatedAt',_0xde25('0x85'),_0xde25('0x86')]);if(_0x52c0df[_0xde25('0x52')]['id']){delete _0x52c0df[_0xde25('0x52')]['id'];}if(_[_0xde25('0x6f')](_0x52c0df[_0xde25('0x52')][_0xde25('0x87')])){throw _0x1022ed[_0xde25('0x20')](0x1f4)['send'](new db[(_0xde25('0x81'))][(_0xde25('0x88'))](_0xde25('0x89')));}if(_[_0xde25('0x6f')](_0x52c0df['body']['body'])||_0x52c0df[_0xde25('0x52')]['body']===''){throw _0x1022ed['status'](0x1f4)['send'](new db[(_0xde25('0x81'))]['ValidationError'](_0xde25('0x8a')));}if(_[_0xde25('0x6f')](_0x52c0df[_0xde25('0x52')][_0xde25('0xbf')])){throw _0x1022ed['status'](0x1f4)['send'](new db[(_0xde25('0x81'))][(_0xde25('0x88'))](_0xde25('0xc0')+_0x516433));}if(!_[_0xde25('0x8b')](_0x516433,_0x52c0df[_0xde25('0x52')][_0xde25('0xbf')])){throw _0x1022ed['status'](0x1f4)[_0xde25('0xc1')](new db[(_0xde25('0x81'))][(_0xde25('0x88'))]('mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x516433));}_0x2578f2[_0x52c0df[_0xde25('0x52')][_0xde25('0xbf')]]=_0x52c0df[_0xde25('0x52')][_0xde25('0x87')];})[_0xde25('0x12')](function(){return db['ChatWebsite'][_0xde25('0x49')]({'where':{'id':_0x52c0df[_0xde25('0x48')]['id']},'include':[{'model':db[_0xde25('0x8e')],'as':_0xde25('0x8f')},{'model':db[_0xde25('0xc2')],'as':_0xde25('0xc2')}]});})[_0xde25('0x12')](handleEntityNotFound(_0x1022ed,null))['then'](function(_0x5a9ecd){if(_0x5a9ecd&&_0x5a9ecd[_0xde25('0x8f')]){_0x5db8f1=_0x5a9ecd;var _0x34b485=_[_0xde25('0x99')](_0x52c0df[_0xde25('0x52')],{'firstName':_0x52c0df[_0xde25('0x52')][_0xde25('0x87')],'phone':_0x52c0df['body']['from'],'ListId':_0x5a9ecd[_0xde25('0x86')]});_0x34b485[_0x52c0df[_0xde25('0x52')]['mapKeyOffline']]=_0x52c0df[_0xde25('0x52')]['from'];return db[_0xde25('0x7f')][_0xde25('0xc3')]({'where':_0x2578f2,'defaults':_0x34b485});}})[_0xde25('0xc4')](function(_0x5ab4c3){if(_0x5ab4c3){_0x2c0c1a=_0x5ab4c3;var _0x5dd056=fs['readFileSync'](path[_0xde25('0x69')](config[_0xde25('0x6a')],_0xde25('0xc5')),_0xde25('0xc6'));var _0x477f54=ejs[_0xde25('0xc7')](_0x5dd056,{'body':_['toPairs'](_0x52c0df['body'][_0xde25('0x52')]),'bodyTitle':_0x5db8f1[_0xde25('0xc8')]});return db['ChatOfflineMessage'][_0xde25('0x4a')]({'body':_0x477f54,'plainBody':htmlToText['fromString'](_0x477f54),'ContactId':_0x5ab4c3['id'],'ChatWebsiteId':_0x5db8f1['id']});}})[_0xde25('0x12')](function(_0x40fd2b){_0x595ce5=_0x40fd2b;if(_0x58d39e[_0xde25('0x58')]){var _0x23e7e3=_0x58d39e[_0xde25('0x2e')](function(_0x23661e){return{'name':_0x23661e[_0xde25('0xc9')],'basename':_0x23661e[_0xde25('0x61')],'type':_0x23661e[_0xde25('0xca')],'ChatOfflineMessageId':_0x40fd2b['id']};});_0x1e0cd9=_0x23e7e3[_0xde25('0x2e')](_0x26d479=>{var _0x2cf359={'filename':_0x26d479['name'],'path':path['join'](config[_0xde25('0x6a')],'server','files',_0xde25('0xcb'),'offline-chat',_0x26d479[_0xde25('0xcc')])};return _0x2cf359;});if(!_0x5db8f1[_0xde25('0xcd')]){return db['sequelize'][_0xde25('0xce')](function(_0x24aaa0){return db[_0xde25('0xcf')][_0xde25('0xd0')](_0x23e7e3,{'transaction':_0x24aaa0});});}}})['then'](function(){if(_0x595ce5){_0x236665=_0x595ce5;return db[_0xde25('0xc2')][_0xde25('0x56')]({'where':{'service':!![]},'include':[{'model':db['MailServerOut'],'as':_0xde25('0xd1'),'raw':!![],'include':[{'model':db['CloudProvider'],'as':'CloudProvider','raw':!![]}]}]});}})[_0xde25('0x12')](function(_0x4c75b6){if(_0x4c75b6&&_0x4c75b6[_0xde25('0xd1')]&&_0x5db8f1[_0xde25('0xd2')]&&_0x5db8f1['forwardOfflineAddress']){var _0x2066ca=_0x4c75b6[_0xde25('0xd3')]();return respondWithRpcPromise(_0xde25('0xd4'),'sendMail',{'account':_0x2066ca,'message':{'from':util['format']('\x22%s\x22\x20<%s>',_0x4c75b6['name'],_0x4c75b6[_0xde25('0xd5')]||_0x4c75b6[_0xde25('0xd1')]['user']),'to':_0x5db8f1[_0xde25('0xd6')],'subject':_0x5db8f1[_0xde25('0xd7')],'html':_0x236665[_0xde25('0x52')],'attachments':_0x1e0cd9}},client9003)[_0xde25('0x12')](function(){return _0x236665;})[_0xde25('0x1d')](function(_0x4a1983){logger[_0xde25('0x19')](_0x4a1983);});}})[_0xde25('0x12')](function(){if(_0x5db8f1&&_0x5db8f1['openNewInteraction']&&_0x5db8f1[_0xde25('0xd8')]){var _0x127f4b=[];if(_0x58d39e[_0xde25('0x58')]){_0x127f4b=_0x58d39e['map'](function(_0x54ffa6){return{'name':_0x54ffa6[_0xde25('0xc9')],'basename':_0x54ffa6[_0xde25('0x61')],'type':_0x54ffa6[_0xde25('0xca')],'ChatOfflineMessageId':_0x595ce5['id']};});}var _0x5f5c27;if(!_[_0xde25('0x6f')](_0x5db8f1[_0xde25('0xd9')])){var _0x3ae769=_[_0xde25('0x2e')](_0x52c0df[_0xde25('0x52')],function(_0x3f0d4e){return _0x3f0d4e;});var _0x91a8f4=_[_0xde25('0xda')](_0x3ae769)[0x0];var _0xa1017a=_[_0xde25('0xdb')](_0x91a8f4,function(_0x3eb9d1){return _0x3eb9d1;});_0x5f5c27=_0xa1017a[0x1][_0x5db8f1[_0xde25('0xd9')]];}var _0x17fcf6={'from':_0x2c0c1a[_0xde25('0xd5')],'firstName':_0x2c0c1a[_0xde25('0xa0')],'lastName':_0x2c0c1a[_0xde25('0xa1')],'mapKey':'email','message':{'from':_0x2c0c1a[_0xde25('0xd5')],'to':_0x5db8f1[_0xde25('0xc2')][_0xde25('0xd5')],'cc':'','subject':_[_0xde25('0x6f')](_0x5f5c27)?_0x5db8f1[_0xde25('0xd7')]:_0x5f5c27,'messageId':'','sentAt':new Date(),'attach':_0x127f4b['length'],'attachments':_0x127f4b,'originChannel':_0xde25('0xdc'),'ChatWebsiteId':_0x5db8f1['id'],'ChatOfflineMessageId':_0x236665['id'],'originTo':_0x5db8f1[_0xde25('0xc2')][_0xde25('0xd5')]},'body':_0x236665[_0xde25('0x52')]};var _0x1dd404={'account':{'id':_0x5db8f1['MailAccountId']},'body':_0x17fcf6,'log':_0xde25('0xdd')};return respondWithRpcPromise('NotifyMailAccount',_0xde25('0xde'),_0x1dd404,client9001)[_0xde25('0x12')](function(){return _0x236665;})[_0xde25('0x1d')](function(_0x457a3b){logger[_0xde25('0x19')](_0x457a3b);});}return;})[_0xde25('0x12')](function(){if(_0x236665){return _0x236665;}})[_0xde25('0x12')](respondWithResult(_0x1022ed,null))[_0xde25('0x1d')](function(_0xb05983){logger[_0xde25('0x19')]('catch',_0xb05983);for(var _0x27e80c of _0x58d39e){var _0x554365=path[_0xde25('0x69')](config[_0xde25('0x6a')],_0xde25('0xdf'),_0xde25('0xe0'),_0xde25('0xcb'),'offline-chat',_0x27e80c[_0xde25('0x61')]);fs_extra['remove'](_0x554365)[_0xde25('0x1d')](function(_0x51edc4){logger[_0xde25('0x19')](_0xde25('0xe1'),_0x554365,_0x51edc4);});}});};exports[_0xde25('0xe2')]=function(_0x35c164,_0x15015a){return db[_0xde25('0xaf')][_0xde25('0x49')]({'where':{'id':_0x35c164[_0xde25('0x48')]['id']}})[_0xde25('0x12')](handleEntityNotFound(_0x15015a,null))[_0xde25('0x12')](function(_0x2d990a){if(_0x2d990a){return _0x2d990a['addInteraction'](_0x35c164[_0xde25('0x52')][_0xde25('0x5a')],_[_0xde25('0xe3')](_0x35c164[_0xde25('0x52')],[_0xde25('0x5a'),'id'])||{});}})[_0xde25('0x12')](respondWithResult(_0x15015a,null))[_0xde25('0x1d')](handleError(_0x15015a,null));};exports[_0xde25('0xe4')]=function(_0x5fd4d4,_0x252d42){var _0x307ef4={'raw':![],'where':{}};var _0x587b2e={};var _0x5f2806={'count':0x0,'rows':[]};return db[_0xde25('0x2f')][_0xde25('0x56')]({'where':{'id':_0x5fd4d4[_0xde25('0x48')]['id']}})[_0xde25('0x12')](handleEntityNotFound(_0x252d42,null))[_0xde25('0x12')](function(_0x447a09){if(_0x447a09){_0x587b2e['model']=_[_0xde25('0x35')](db['ChatInteraction']['rawAttributes']);_0x587b2e[_0xde25('0x34')]=_[_0xde25('0x35')](_0x5fd4d4[_0xde25('0x34')]);_0x587b2e[_0xde25('0x3f')]=_[_0xde25('0x38')](_0x587b2e[_0xde25('0x36')],_0x587b2e[_0xde25('0x34')]);_0x307ef4[_0xde25('0x37')]=_[_0xde25('0x38')](_0x587b2e['model'],qs[_0xde25('0x57')](_0x5fd4d4[_0xde25('0x34')]['fields']));_0x307ef4[_0xde25('0x37')]=_0x307ef4[_0xde25('0x37')]['length']?_0x307ef4['attributes']:_0x587b2e[_0xde25('0x36')];if(!_0x5fd4d4[_0xde25('0x34')][_0xde25('0x39')]('nolimit')){_0x307ef4[_0xde25('0x3b')]=qs['limit'](_0x5fd4d4['query'][_0xde25('0x3b')]);_0x307ef4[_0xde25('0x22')]=qs[_0xde25('0x22')](_0x5fd4d4[_0xde25('0x34')][_0xde25('0x22')]);}_0x307ef4[_0xde25('0x3c')]=qs['sort'](_0x5fd4d4['query'][_0xde25('0x3d')]);_0x307ef4[_0xde25('0x3e')]=qs['filters'](_[_0xde25('0x40')](_0x5fd4d4[_0xde25('0x34')],_0x587b2e['filters']));_0x307ef4[_0xde25('0x3e')][_0xde25('0x59')]=_0x447a09['id'];if(_0x5fd4d4[_0xde25('0x34')][_0xde25('0x41')]){_0x307ef4['where']=_[_0xde25('0x42')](_0x307ef4[_0xde25('0x3e')],{'$or':_[_0xde25('0x2e')](_0x307ef4[_0xde25('0x37')],function(_0x3ba924){var _0x5d4643={};_0x5d4643[_0x3ba924]={'$like':'%'+_0x5fd4d4[_0xde25('0x34')][_0xde25('0x41')]+'%'};return _0x5d4643;})});}_0x307ef4=_[_0xde25('0x42')]({},_0x307ef4,_0x5fd4d4[_0xde25('0x43')]);return db['ChatInteraction'][_0xde25('0x23')]({'where':_0x307ef4[_0xde25('0x3e')]})[_0xde25('0x12')](function(_0x2bfe26){_0x5f2806[_0xde25('0x23')]=_0x2bfe26;if(_0x5fd4d4[_0xde25('0x34')][_0xde25('0xe5')]){_0x307ef4[_0xde25('0x44')]=[{'model':db[_0xde25('0x7f')],'as':_0xde25('0xe6'),'required':![]},{'model':db['User'],'as':'Owner','attributes':['name',_0xde25('0xe7'),_0xde25('0xe8')],'required':![]},{'model':db[_0xde25('0xe9')],'as':_0xde25('0xea'),'attributes':['id','name',_0xde25('0xeb')],'where':_0x5fd4d4['query']['tag']?{'id':_0x5fd4d4[_0xde25('0x34')][_0xde25('0xec')]}:undefined,'required':_0x5fd4d4[_0xde25('0x34')][_0xde25('0xec')]?!![]:![]}];}return db['ChatInteraction'][_0xde25('0x45')](_0x307ef4);})[_0xde25('0x12')](function(_0x5132a4){_0x5f2806['rows']=_0x5132a4;return _0x5f2806;});}})['then'](respondWithFilteredResult(_0x252d42,_0x307ef4))[_0xde25('0x1d')](handleError(_0x252d42,null));};function iftimePromise(_0x5b0980,_0x528649){return respondWithRpcPromise(_0xde25('0xed'),'getSnippet',{'command':_0x528649[_0xde25('0xee')]?util[_0xde25('0xa6')](_0xde25('0xef'),_0x5b0980['interval'],_0x528649[_0xde25('0xee')]):util[_0xde25('0xa6')](_0xde25('0xf0'),_0x5b0980['interval'])},client9002)[_0xde25('0x12')](function(_0x49d04a){var _0xf41b1c=_0x49d04a&&_0x49d04a['indexOf']('true')>=0x0?!![]:![];logger[_0xde25('0x13')]('[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)',_0x528649['id'],_0x5b0980['id'],_0x5b0980[_0xde25('0xf1')],_0xf41b1c?_0xde25('0xf2'):_0xde25('0xf3'),_0x528649[_0xde25('0xee')]?_0x528649[_0xde25('0xee')]:'No\x20timezone');return _0xf41b1c;})[_0xde25('0x1d')](function(_0x47ab58){logger[_0xde25('0x19')]('[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)',_0x528649['id'],_0x5b0980['id'],_0x5b0980['interval'],util[_0xde25('0xf4')](_0x47ab58,{'showHidden':![],'depth':null}),_0x528649['timezone']?_0x528649['timezone']:'No\x20timezone');return![];});}exports[_0xde25('0xf5')]=function(_0x5e4b39,_0x3f6e18){var _0x47775a=0x0;var _0x150105=0x0;var _0x3aec5=![];var _0x102e8c;var _0x209b4b;return db[_0xde25('0x2f')]['find']({'where':{'id':_0x5e4b39[_0xde25('0x48')]['id']},'include':[{'model':db['Interval'],'as':_0xde25('0xf6'),'include':[{'model':db[_0xde25('0xf6')],'as':_0xde25('0xf7'),'attributes':['id',_0xde25('0xf1')],'raw':!![]}]}]})[_0xde25('0x12')](handleEntityNotFound(_0x3f6e18,null))[_0xde25('0x12')](function(_0x17b322){if(_0x17b322){_0x102e8c=_0x17b322;return _0x17b322['getProactiveActions']({'raw':!![]});}})[_0xde25('0x12')](function(_0x129edc){if(_0x102e8c){if(_0x129edc){_0x209b4b=_0x129edc;}}return require('../../config/license/util')[_0xde25('0x6d')]();})[_0xde25('0x12')](function(_0x4d479c){if(_0x4d479c){_0x150105=_0x4d479c['virtual'];_0x3aec5=_0x4d479c[_0xde25('0x6e')];}})['then'](function(){return db[_0xde25('0xaf')][_0xde25('0x23')]({'where':{'closed':![]}});})[_0xde25('0x12')](function(_0x44c3c1){_0x47775a=_0x44c3c1;if(_0x150105&&_0x44c3c1>_0x150105){return db[_0xde25('0xf8')]['findOne']({'where':{'id':0x1}})[_0xde25('0x12')](function(_0x559cc9){if(_0x559cc9){_0x559cc9[_0xde25('0xf9')]('chatLicenseExceeded');}});}})[_0xde25('0x12')](function(){if(_0x102e8c[_0xde25('0xf6')]&&_0x102e8c[_0xde25('0xf6')][_0xde25('0xf7')]){var _0x506edc=[];for(var _0x528cd9=0x0;_0x528cd9<_0x102e8c[_0xde25('0xf6')][_0xde25('0xf7')]['length'];_0x528cd9++){var _0x4bc60f=_0x102e8c[_0xde25('0xf6')]['Intervals'][_0x528cd9][_0xde25('0x27')]({'plain':!![]});_0x506edc[_0xde25('0xb4')](iftimePromise(_0x4bc60f,_0x102e8c));}return BPromise[_0xde25('0xfa')](_0x506edc)[_0xde25('0x12')](function(_0x1b6e62){return _[_0xde25('0xfb')](_0x1b6e62);});}else{return!![];}})['then'](function(_0x4e888e){var _0x3c4196=fs[_0xde25('0xfc')](path[_0xde25('0x69')](config[_0xde25('0x6a')],'server/files/chat/iframe.ejs'),_0xde25('0xc6'));var _0x1b00d9=new url['URL'](_0x102e8c[_0xde25('0xfd')])[_0xde25('0xfe')];var _0x3968ea=_0xde25('0xff');var _0x3ce487=![];var _0x72d3c8={'chatVersion':_0x3968ea,'chatWebsiteAddressOrigin':_0x1b00d9,'remote':_0x102e8c['remote'],'query':querystring[_0xde25('0x18')](_['merge'](_0x102e8c[_0xde25('0x27')]({'plain':!![]}),{'customerIp':_0x5e4b39['headers'][_0xde25('0x9e')]||_0x5e4b39['headers'][_0xde25('0x100')]||_0x5e4b39[_0xde25('0x101')][_0xde25('0x102')]||_0x5e4b39['ip'],'referer':_0x5e4b39[_0xde25('0x7c')][_0xde25('0xa3')],'openedInteractions':_0x47775a,'maxInteractions':_0x150105,'virtual':_0x3aec5[_0xde25('0x103')],'online':_0x4e888e,'custom':_0x3aec5}))[_0xde25('0x104')](/'/g,'\x5c\x27')};_0x3f6e18[_0xde25('0xc1')](ejs[_0xde25('0xc7')](Mustache[_0xde25('0xc7')](_0x3c4196,_0x72d3c8),{'proactiveActions':_0x209b4b,'alignment':_0x102e8c[_0xde25('0x105')],'verticalAlignment':_0x102e8c[_0xde25('0x106')],'div_color':_0x102e8c[_0xde25('0xeb')],'labelText':_0x102e8c[_0xde25('0x107')],'text_color':_0x102e8c[_0xde25('0x108')],'text_button_color':_0x102e8c[_0xde25('0x109')],'button_color':_0x102e8c[_0xde25('0x10a')],'background_color':_0x102e8c[_0xde25('0x10b')],'hideWhenOffline':_0x102e8c[_0xde25('0x10c')],'intervalId':_0x102e8c[_0xde25('0x10d')],'isDevelopment':_0x3ce487,'chatVersion':_0x3968ea}));})[_0xde25('0x1d')](handleError(_0x3f6e18,null));};exports[_0xde25('0x10e')]=function(_0x13df05,_0x79b544){var _0x50e7a5=_0x13df05[_0xde25('0x48')]['id'];var _0x5966fc=_0x13df05[_0xde25('0x52')];var _0x52a227=0xc8;var _0x21c0db=null;return db[_0xde25('0x10f')][_0xde25('0xce')]({'isolationLevel':db[_0xde25('0x10f')][_0xde25('0x110')]['ISOLATION_LEVELS'][_0xde25('0x111')]},function(_0x5abdb8){return db[_0xde25('0x2f')]['findOne']({'where':{'id':_0x50e7a5},'transaction':_0x5abdb8})['then'](function(_0x577d23){if(_0x577d23){return db[_0xde25('0x91')][_0xde25('0x26')]({'where':{'ChatWebsiteId':_0x50e7a5},'transaction':_0x5abdb8})[_0xde25('0x12')](function(){var _0x322165=_[_0xde25('0x2e')](_0x5966fc,function(_0x5c9646){_0x5c9646[_0xde25('0x59')]=_0x50e7a5;return _0x5c9646;});return db[_0xde25('0x91')]['bulkCreate'](_0x322165,{'transaction':_0x5abdb8});});}else{_0x52a227=0x194;_0x21c0db=[];}});})['then'](function(){if(_0x52a227!==0x194){return db[_0xde25('0x91')][_0xde25('0x112')]({'where':{'ChatWebsiteId':_0x50e7a5},'order':_0xde25('0x97')})[_0xde25('0x12')](function(_0x23b047){_0x21c0db=_0x23b047;});}})[_0xde25('0x1d')](function(_0x2710ac){_0x52a227=0x1f4;logger[_0xde25('0x19')](_0x2710ac[_0xde25('0x113')]);if(_0x2710ac[_0xde25('0x2a')]){delete _0x2710ac['name'];}_0x21c0db=_0x2710ac;})[_0xde25('0x114')](function(){if(_0x21c0db===null){_0x79b544[_0xde25('0x1e')](_0x52a227);}else{if(_0x52a227===0x1f4){_0x79b544[_0xde25('0x20')](_0x52a227)[_0xde25('0xc1')](_0x21c0db);}else{_0x79b544[_0xde25('0x20')](_0x52a227)[_0xde25('0x115')](_0x21c0db);}}});};exports[_0xde25('0x116')]=function(_0x26457c,_0x54f4ce){var _0x5b6bb2={};var _0x2161ec={};var _0x5300a4;var _0x2a3d9e;return db[_0xde25('0x2f')][_0xde25('0x56')]({'where':{'id':_0x26457c[_0xde25('0x48')]['id']}})['then'](handleEntityNotFound(_0x54f4ce,null))[_0xde25('0x12')](function(_0x427112){if(_0x427112){_0x5300a4=_0x427112;_0x2161ec[_0xde25('0x36')]=_[_0xde25('0x35')](db['ChatApplication'][_0xde25('0x30')]);_0x2161ec[_0xde25('0x34')]=_['keys'](_0x26457c[_0xde25('0x34')]);_0x2161ec[_0xde25('0x3f')]=_['intersection'](_0x2161ec[_0xde25('0x36')],_0x2161ec[_0xde25('0x34')]);_0x5b6bb2[_0xde25('0x37')]=_[_0xde25('0x38')](_0x2161ec[_0xde25('0x36')],qs['fields'](_0x26457c[_0xde25('0x34')]['fields']));_0x5b6bb2[_0xde25('0x37')]=_0x5b6bb2[_0xde25('0x37')][_0xde25('0x58')]?_0x5b6bb2[_0xde25('0x37')]:_0x2161ec['model'];_0x5b6bb2[_0xde25('0x3c')]=qs[_0xde25('0x3d')](_0x26457c['query'][_0xde25('0x3d')]);_0x5b6bb2[_0xde25('0x3e')]=qs[_0xde25('0x3f')](_[_0xde25('0x40')](_0x26457c['query'],_0x2161ec[_0xde25('0x3f')]));if(_0x26457c[_0xde25('0x34')][_0xde25('0x41')]){_0x5b6bb2[_0xde25('0x3e')]=_[_0xde25('0x42')](_0x5b6bb2['where'],{'$or':_[_0xde25('0x2e')](_0x5b6bb2[_0xde25('0x37')],function(_0x3ec60b){var _0x160112={};_0x160112[_0x3ec60b]={'$like':'%'+_0x26457c['query'][_0xde25('0x41')]+'%'};return _0x160112;})});}_0x5b6bb2=_['merge']({},_0x5b6bb2,_0x26457c[_0xde25('0x43')]);return _0x5300a4[_0xde25('0x116')](_0x5b6bb2);}})['then'](function(_0x26da61){if(_0x26da61){_0x2a3d9e=_0x26da61[_0xde25('0x58')];if(!_0x26457c[_0xde25('0x34')][_0xde25('0x39')](_0xde25('0x3a'))){_0x5b6bb2[_0xde25('0x3b')]=qs[_0xde25('0x3b')](_0x26457c[_0xde25('0x34')][_0xde25('0x3b')]);_0x5b6bb2[_0xde25('0x22')]=qs[_0xde25('0x22')](_0x26457c[_0xde25('0x34')][_0xde25('0x22')]);}return _0x5300a4[_0xde25('0x116')](_0x5b6bb2);}})[_0xde25('0x12')](function(_0x16c1f6){if(_0x16c1f6){return _0x16c1f6?{'count':_0x2a3d9e,'rows':_0x16c1f6}:null;}})[_0xde25('0x12')](respondWithResult(_0x54f4ce,null))[_0xde25('0x1d')](handleError(_0x54f4ce,null));};exports[_0xde25('0x117')]=function(_0x1dc0e4,_0x31cd3d){return db[_0xde25('0x118')][_0xde25('0x49')]({'where':{'id':_0x1dc0e4[_0xde25('0x48')]['id']}})[_0xde25('0x12')](handleEntityNotFound(_0x31cd3d,null))[_0xde25('0x12')](function(_0x3824f5){if(_0x3824f5){return _0x3824f5['addProactiveActions'](_0x1dc0e4[_0xde25('0x52')][_0xde25('0x5a')],_['omit'](_0x1dc0e4[_0xde25('0x52')],['ids','id'])||{});}})[_0xde25('0x12')](respondWithResult(_0x31cd3d,null))[_0xde25('0x1d')](handleError(_0x31cd3d,null));};exports['getProactiveActions']=function(_0x574599,_0x1d5db0){var _0x494813={};var _0x4cfe07={};var _0x224633;var _0x4bab5c;return db[_0xde25('0x2f')][_0xde25('0x56')]({'where':{'id':_0x574599['params']['id']}})[_0xde25('0x12')](handleEntityNotFound(_0x1d5db0,null))[_0xde25('0x12')](function(_0x56b93f){if(_0x56b93f){_0x224633=_0x56b93f;_0x4cfe07[_0xde25('0x36')]=_[_0xde25('0x35')](db['ChatProactiveAction']['rawAttributes']);_0x4cfe07[_0xde25('0x34')]=_[_0xde25('0x35')](_0x574599['query']);_0x4cfe07['filters']=_['intersection'](_0x4cfe07[_0xde25('0x36')],_0x4cfe07[_0xde25('0x34')]);_0x494813[_0xde25('0x37')]=_['intersection'](_0x4cfe07[_0xde25('0x36')],qs[_0xde25('0x57')](_0x574599[_0xde25('0x34')][_0xde25('0x57')]));_0x494813[_0xde25('0x37')]=_0x494813[_0xde25('0x37')][_0xde25('0x58')]?_0x494813[_0xde25('0x37')]:_0x4cfe07[_0xde25('0x36')];_0x494813[_0xde25('0x3c')]=qs['sort'](_0x574599[_0xde25('0x34')]['sort']);_0x494813['where']=qs[_0xde25('0x3f')](_[_0xde25('0x40')](_0x574599['query'],_0x4cfe07['filters']));if(_0x574599[_0xde25('0x34')]['filter']){_0x494813[_0xde25('0x3e')]=_[_0xde25('0x42')](_0x494813[_0xde25('0x3e')],{'$or':_['map'](_0x494813[_0xde25('0x37')],function(_0x21f05e){var _0x1904f6={};_0x1904f6[_0x21f05e]={'$like':'%'+_0x574599[_0xde25('0x34')][_0xde25('0x41')]+'%'};return _0x1904f6;})});}_0x494813=_[_0xde25('0x42')]({},_0x494813,_0x574599[_0xde25('0x43')]);return _0x224633[_0xde25('0x119')](_0x494813);}})[_0xde25('0x12')](function(_0x3a975b){if(_0x3a975b){_0x4bab5c=_0x3a975b[_0xde25('0x58')];if(!_0x574599[_0xde25('0x34')]['hasOwnProperty'](_0xde25('0x3a'))){_0x494813['limit']=qs[_0xde25('0x3b')](_0x574599[_0xde25('0x34')][_0xde25('0x3b')]);_0x494813[_0xde25('0x22')]=qs[_0xde25('0x22')](_0x574599[_0xde25('0x34')]['offset']);}return _0x224633[_0xde25('0x119')](_0x494813);}})[_0xde25('0x12')](function(_0x53eca7){if(_0x53eca7){return _0x53eca7?{'count':_0x4bab5c,'rows':_0x53eca7}:null;}})[_0xde25('0x12')](respondWithResult(_0x1d5db0,null))[_0xde25('0x1d')](handleError(_0x1d5db0,null));};exports['getFields']=function(_0x186d3e,_0xbce9db){var _0x462a51=_0x186d3e[_0xde25('0x34')][_0xde25('0x11a')]==='false'?_0xde25('0x11b'):_0xde25('0x11c');return db[_0xde25('0x2f')][_0xde25('0x49')]({'attributes':['id',_0x462a51],'where':{'id':_0x186d3e['params']['id']}})[_0xde25('0x12')](handleEntityNotFound(_0xbce9db,null))[_0xde25('0x12')](function(_0x1d42f8){if(_0x1d42f8){var _0x1594c0=_0x1d42f8[_0x462a51];var _0x371012=_0x1594c0&&_0x1594c0['items']?_0x1594c0[_0xde25('0x11d')]:[];_0xbce9db[_0xde25('0xc1')]({'fromKey':_[_0xde25('0x6f')](_0x1594c0[_0xde25('0x11e')])?undefined:_0x1594c0[_0xde25('0x11e')],'count':_0x371012[_0xde25('0x58')],'rows':_0x371012});}})[_0xde25('0x1d')](handleError(_0xbce9db,null));};exports['getOfflineMessages']=function(_0x2df79f,_0x307c95){var _0x2d0f3e={'raw':![],'where':{}};var _0x174cd5={};var _0x42d41a={'count':0x0,'rows':[]};return db['ChatWebsite']['findOne']({'where':{'id':_0x2df79f['params']['id']}})[_0xde25('0x12')](handleEntityNotFound(_0x307c95,null))[_0xde25('0x12')](function(_0x1fdab5){if(_0x1fdab5){_0x174cd5['model']=_['keys'](db[_0xde25('0x11f')]['rawAttributes']);_0x174cd5[_0xde25('0x34')]=_[_0xde25('0x35')](_0x2df79f[_0xde25('0x34')]);_0x174cd5[_0xde25('0x3f')]=_[_0xde25('0x38')](_0x174cd5[_0xde25('0x36')],_0x174cd5[_0xde25('0x34')]);_0x2d0f3e[_0xde25('0x37')]=_['intersection'](_0x174cd5[_0xde25('0x36')],qs[_0xde25('0x57')](_0x2df79f[_0xde25('0x34')][_0xde25('0x57')]));_0x2d0f3e[_0xde25('0x37')]=_0x2d0f3e[_0xde25('0x37')][_0xde25('0x58')]?_0x2d0f3e[_0xde25('0x37')]:_0x174cd5[_0xde25('0x36')];if(!_0x2df79f[_0xde25('0x34')][_0xde25('0x39')](_0xde25('0x3a'))){_0x2d0f3e[_0xde25('0x3b')]=qs[_0xde25('0x3b')](_0x2df79f['query']['limit']);_0x2d0f3e['offset']=qs['offset'](_0x2df79f[_0xde25('0x34')]['offset']);}_0x2d0f3e['order']=qs[_0xde25('0x3d')](_0x2df79f[_0xde25('0x34')][_0xde25('0x3d')]);_0x2d0f3e[_0xde25('0x3e')]=qs['filters'](_[_0xde25('0x40')](_0x2df79f[_0xde25('0x34')],_0x174cd5['filters']));_0x2d0f3e[_0xde25('0x3e')][_0xde25('0x59')]=_0x1fdab5['id'];if(_0x2df79f[_0xde25('0x34')]['filter']){_0x2d0f3e['where']=_[_0xde25('0x42')](_0x2d0f3e[_0xde25('0x3e')],{'$or':_[_0xde25('0x2e')](_0x2d0f3e['attributes'],function(_0x307d97){var _0x39c242={};_0x39c242[_0x307d97]={'$like':'%'+_0x2df79f[_0xde25('0x34')]['filter']+'%'};return _0x39c242;})});}_0x2d0f3e=_[_0xde25('0x42')]({},_0x2d0f3e,_0x2df79f[_0xde25('0x43')]);return db['ChatOfflineMessage']['count']({'where':_0x2d0f3e[_0xde25('0x3e')]})['then'](function(_0x4d8295){_0x42d41a[_0xde25('0x23')]=_0x4d8295;if(_0x2df79f[_0xde25('0x34')][_0xde25('0xe5')]){_0x2d0f3e[_0xde25('0x44')]=[{'all':!![]}];}else{_0x2d0f3e[_0xde25('0x44')]=[{'model':db[_0xde25('0x7f')],'as':_0xde25('0xe6'),'required':![]},{'model':db[_0xde25('0xcf')],'as':_0xde25('0x120'),'required':![]}];}return db['ChatOfflineMessage'][_0xde25('0x45')](_0x2d0f3e);})[_0xde25('0x12')](function(_0x43dc91){_0x42d41a[_0xde25('0x46')]=_0x43dc91;return _0x42d41a;});}})['then'](respondWithFilteredResult(_0x307c95,_0x2d0f3e))[_0xde25('0x1d')](handleError(_0x307c95,null));};exports[_0xde25('0x121')]=function(_0x862996,_0x473749){return db['ChatWebsite']['find']({'where':{'id':_0x862996['params']['id']}})['then'](handleEntityNotFound(_0x473749,null))[_0xde25('0x12')](function(_0x1d9780){if(_0x1d9780){return _0x1d9780[_0xde25('0x121')](_0x862996['body'][_0xde25('0x5a')],_['omit'](_0x862996[_0xde25('0x52')],[_0xde25('0x5a'),'id'])||{})[_0xde25('0xc4')](function(_0xf6f369){for(var _0xcced0=0x0;_0xcced0<_0x862996[_0xde25('0x52')][_0xde25('0x5a')]['length'];_0xcced0+=0x1){socket[_0xde25('0x122')]('userChatWebsite:save',{'UserId':Number(_0x862996['body'][_0xde25('0x5a')][_0xcced0]),'ChatWebsiteId':Number(_0x862996[_0xde25('0x48')]['id'])});}return _0xf6f369;});}})[_0xde25('0x12')](respondWithResult(_0x473749,null))[_0xde25('0x1d')](handleError(_0x473749,null));};exports[_0xde25('0x123')]=function(_0x31e547,_0x357c21){return db[_0xde25('0x2f')][_0xde25('0x49')]({'where':{'id':_0x31e547['params']['id']}})[_0xde25('0x12')](handleEntityNotFound(_0x357c21,null))[_0xde25('0x12')](function(_0x512756){if(_0x512756){return _0x512756[_0xde25('0x123')](_0x31e547['query'][_0xde25('0x5a')])[_0xde25('0x12')](function(){if(_['isArray'](_0x31e547[_0xde25('0x34')][_0xde25('0x5a')])){for(var _0x1fb58e=0x0;_0x1fb58e<_0x31e547[_0xde25('0x34')][_0xde25('0x5a')][_0xde25('0x58')];_0x1fb58e+=0x1){socket[_0xde25('0x122')]('userChatWebsite:remove',{'UserId':Number(_0x31e547[_0xde25('0x34')]['ids'][_0x1fb58e]),'ChatWebsiteId':Number(_0x31e547['params']['id'])});}}else{socket[_0xde25('0x122')](_0xde25('0x124'),{'UserId':Number(_0x31e547[_0xde25('0x34')][_0xde25('0x5a')]),'ChatWebsiteId':Number(_0x31e547[_0xde25('0x48')]['id'])});}});}})[_0xde25('0x12')](respondWithStatusCode(_0x357c21,null))['catch'](handleError(_0x357c21,null));};exports['getAgents']=function(_0x3a50e3,_0x7d405d){var _0x57d325={};var _0x5b17b7={};var _0x21bfa7;var _0x133091;return db['ChatWebsite'][_0xde25('0x56')]({'where':{'id':_0x3a50e3[_0xde25('0x48')]['id']}})[_0xde25('0x12')](handleEntityNotFound(_0x7d405d,null))[_0xde25('0x12')](function(_0x581192){if(_0x581192){_0x21bfa7=_0x581192;_0x5b17b7[_0xde25('0x36')]=_[_0xde25('0x35')](db[_0xde25('0xb8')][_0xde25('0x30')]);_0x5b17b7[_0xde25('0x34')]=_[_0xde25('0x35')](_0x3a50e3['query']);_0x5b17b7[_0xde25('0x3f')]=_[_0xde25('0x38')](_0x5b17b7[_0xde25('0x36')],_0x5b17b7[_0xde25('0x34')]);_0x57d325[_0xde25('0x37')]=_[_0xde25('0x38')](_0x5b17b7[_0xde25('0x36')],qs[_0xde25('0x57')](_0x3a50e3['query'][_0xde25('0x57')]));_0x57d325[_0xde25('0x37')]=_0x57d325[_0xde25('0x37')]['length']?_0x57d325['attributes']:_0x5b17b7[_0xde25('0x36')];_0x57d325[_0xde25('0x3c')]=qs[_0xde25('0x3d')](_0x3a50e3[_0xde25('0x34')][_0xde25('0x3d')]);_0x57d325[_0xde25('0x3e')]=qs['filters'](_[_0xde25('0x40')](_0x3a50e3[_0xde25('0x34')],_0x5b17b7['filters']));if(_0x3a50e3[_0xde25('0x34')]['filter']){_0x57d325[_0xde25('0x3e')]=_[_0xde25('0x42')](_0x57d325[_0xde25('0x3e')],{'$or':_[_0xde25('0x2e')](_0x57d325[_0xde25('0x37')],function(_0x5cbb0b){var _0x182b7f={};_0x182b7f[_0x5cbb0b]={'$like':'%'+_0x3a50e3[_0xde25('0x34')][_0xde25('0x41')]+'%'};return _0x182b7f;})});}_0x57d325=_['merge']({},_0x57d325,_0x3a50e3['options']);return _0x21bfa7[_0xde25('0x125')](_0x57d325);}})[_0xde25('0x12')](function(_0x5bd211){if(_0x5bd211){_0x133091=_0x5bd211['length'];if(!_0x3a50e3[_0xde25('0x34')]['hasOwnProperty'](_0xde25('0x3a'))){_0x57d325[_0xde25('0x3b')]=qs['limit'](_0x3a50e3['query'][_0xde25('0x3b')]);_0x57d325[_0xde25('0x22')]=qs['offset'](_0x3a50e3['query'][_0xde25('0x22')]);}return _0x21bfa7['getAgents'](_0x57d325);}})[_0xde25('0x12')](function(_0x1564c3){if(_0x1564c3){return _0x1564c3?{'count':_0x133091,'rows':_0x1564c3}:null;}})[_0xde25('0x12')](respondWithResult(_0x7d405d,null))['catch'](handleError(_0x7d405d,null));};
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.events.js b/server/api/chatWebsite/chatWebsite.events.js
index a141631..869ca99 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 _0x54da=['hasOwnProperty','hook','events','ChatWebsite','update'];(function(_0x4595f1,_0x4e53d6){var _0x574302=function(_0x54144b){while(--_0x54144b){_0x4595f1['push'](_0x4595f1['shift']());}};_0x574302(++_0x4e53d6);}(_0x54da,0x9d));var _0xa54d=function(_0x5cd8c2,_0x4bc8ee){_0x5cd8c2=_0x5cd8c2-0x0;var _0x4d2440=_0x54da[_0x5cd8c2];return _0x4d2440;};'use strict';var EventEmitter=require(_0xa54d('0x0'));var ChatWebsite=require('../../mysqldb')['db'][_0xa54d('0x1')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xa54d('0x2'),'afterDestroy':'remove'};function emitEvent(_0x22184a){return function(_0x280f78,_0x936fe1,_0x34cb88){ChatWebsiteEvents['emit'](_0x22184a+':'+_0x280f78['id'],_0x280f78);ChatWebsiteEvents['emit'](_0x22184a,_0x280f78);_0x34cb88(null);};}for(var e in events){if(events[_0xa54d('0x3')](e)){var event=events[e];ChatWebsite[_0xa54d('0x4')](e,emitEvent(event));}}module['exports']=ChatWebsiteEvents;
\ No newline at end of file
+var _0x4b19=['save','remove','emit','hasOwnProperty','hook','events','ChatWebsite','setMaxListeners'];(function(_0x3b4b5e,_0x2a232d){var _0x40a83a=function(_0x1ffe23){while(--_0x1ffe23){_0x3b4b5e['push'](_0x3b4b5e['shift']());}};_0x40a83a(++_0x2a232d);}(_0x4b19,0x195));var _0x94b1=function(_0x2e257e,_0x1fb49){_0x2e257e=_0x2e257e-0x0;var _0xc250cd=_0x4b19[_0x2e257e];return _0xc250cd;};'use strict';var EventEmitter=require(_0x94b1('0x0'));var ChatWebsite=require('../../mysqldb')['db'][_0x94b1('0x1')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0x94b1('0x2')](0x0);var events={'afterCreate':_0x94b1('0x3'),'afterUpdate':'update','afterDestroy':_0x94b1('0x4')};function emitEvent(_0x3648ad){return function(_0x2240b9,_0x4f607f,_0x1310cd){ChatWebsiteEvents[_0x94b1('0x5')](_0x3648ad+':'+_0x2240b9['id'],_0x2240b9);ChatWebsiteEvents['emit'](_0x3648ad,_0x2240b9);_0x1310cd(null);};}for(var e in events){if(events[_0x94b1('0x6')](e)){var event=events[e];ChatWebsite[_0x94b1('0x7')](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 8b02da3..8ad4f7f 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 _0x291a=['lodash','api','bluebird','request-promise','path','rimraf','define','ChatWebsite','chat_websites'];(function(_0xfaf561,_0x31d66a){var _0x565997=function(_0x3999b5){while(--_0x3999b5){_0xfaf561['push'](_0xfaf561['shift']());}};_0x565997(++_0x31d66a);}(_0x291a,0xbd));var _0xa291=function(_0x2cd160,_0xce27af){_0x2cd160=_0x2cd160-0x0;var _0x20f054=_0x291a[_0x2cd160];return _0x20f054;};'use strict';var _=require(_0xa291('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xa291('0x1'));var moment=require('moment');var BPromise=require(_0xa291('0x2'));var rp=require(_0xa291('0x3'));var fs=require('fs');var path=require(_0xa291('0x4'));var rimraf=require(_0xa291('0x5'));var config=require('../../config/environment');var attributes=require('./chatWebsite.attributes');module['exports']=function(_0x10944f,_0x189738){return _0x10944f[_0xa291('0x6')](_0xa291('0x7'),attributes,{'tableName':_0xa291('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x5662=['../../config/environment','./chatWebsite.attributes','exports','ChatWebsite','../../config/logger','api','moment','bluebird','path','rimraf'];(function(_0x2b2504,_0x189fd1){var _0x2f08c7=function(_0x280cb3){while(--_0x280cb3){_0x2b2504['push'](_0x2b2504['shift']());}};_0x2f08c7(++_0x189fd1);}(_0x5662,0x18a));var _0x2566=function(_0x1f147a,_0x2dff14){_0x1f147a=_0x1f147a-0x0;var _0x59a9f2=_0x5662[_0x1f147a];return _0x59a9f2;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x2566('0x0'))(_0x2566('0x1'));var moment=require(_0x2566('0x2'));var BPromise=require(_0x2566('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2566('0x4'));var rimraf=require(_0x2566('0x5'));var config=require(_0x2566('0x6'));var attributes=require(_0x2566('0x7'));module[_0x2566('0x8')]=function(_0x2c45f8,_0x2a32ab){return _0x2c45f8['define'](_0x2566('0x9'),attributes,{'tableName':'chat_websites','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 a1ad996..be6b5d2 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 _0x513e=['error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','redis','defaults','localhost','./chatWebsite.socket','request','then','ChatWebsite,\x20%s,\x20%s','request\x20sent','debug','stringify'];(function(_0x17a789,_0x88e56e){var _0x291f50=function(_0xc9686e){while(--_0xc9686e){_0x17a789['push'](_0x17a789['shift']());}};_0x291f50(++_0x88e56e);}(_0x513e,0xd5));var _0xe513=function(_0x266618,_0x18f637){_0x266618=_0x266618-0x0;var _0x54dbf5=_0x513e[_0x266618];return _0x54dbf5;};'use strict';var _=require(_0xe513('0x0'));var util=require('util');var moment=require(_0xe513('0x1'));var BPromise=require(_0xe513('0x2'));var rs=require(_0xe513('0x3'));var fs=require('fs');var Redis=require(_0xe513('0x4'));var db=require(_0xe513('0x5'))['db'];var utils=require(_0xe513('0x6'));var logger=require(_0xe513('0x7'))(_0xe513('0x8'));var config=require(_0xe513('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xe513('0xa')]['http']({'port':0x232a});config[_0xe513('0xb')]=_[_0xe513('0xc')](config[_0xe513('0xb')],{'host':_0xe513('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xe513('0xb')]));require(_0xe513('0xe'))['register'](socket);function respondWithRpcPromise(_0x57f902,_0xc510ae,_0x3680c2){return new BPromise(function(_0x483073,_0x4c4ddb){return client[_0xe513('0xf')](_0x57f902,_0x3680c2)[_0xe513('0x10')](function(_0x1d26c9){logger['info'](_0xe513('0x11'),_0xc510ae,_0xe513('0x12'));logger[_0xe513('0x13')]('ChatWebsite,\x20%s,\x20%s,\x20%s',_0xc510ae,'request\x20sent',JSON[_0xe513('0x14')](_0x1d26c9));if(_0x1d26c9[_0xe513('0x15')]){if(_0x1d26c9[_0xe513('0x15')][_0xe513('0x16')]===0x1f4){logger['error'](_0xe513('0x11'),_0xc510ae,_0x1d26c9['error']['message']);return _0x4c4ddb(_0x1d26c9[_0xe513('0x15')]['message']);}logger[_0xe513('0x15')](_0xe513('0x11'),_0xc510ae,_0x1d26c9[_0xe513('0x15')]['message']);return _0x483073(_0x1d26c9[_0xe513('0x15')][_0xe513('0x17')]);}else{logger['info']('ChatWebsite,\x20%s,\x20%s',_0xc510ae,_0xe513('0x12'));_0x483073(_0x1d26c9[_0xe513('0x18')][_0xe513('0x17')]);}})[_0xe513('0x19')](function(_0x33ffcf){logger['error'](_0xe513('0x11'),_0xc510ae,_0x33ffcf);_0x4c4ddb(_0x33ffcf);});});}
\ No newline at end of file
+var _0x27cb=['./chatWebsite.socket','request','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','error','message','catch','lodash','util','moment','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter'];(function(_0x21960a,_0x18561d){var _0x10d47a=function(_0x5d787d){while(--_0x5d787d){_0x21960a['push'](_0x21960a['shift']());}};_0x10d47a(++_0x18561d);}(_0x27cb,0x1cc));var _0xb27c=function(_0x273a4f,_0x53b1a2){_0x273a4f=_0x273a4f-0x0;var _0x5b6d1b=_0x27cb[_0x273a4f];return _0x5b6d1b;};'use strict';var _=require(_0xb27c('0x0'));var util=require(_0xb27c('0x1'));var moment=require(_0xb27c('0x2'));var BPromise=require(_0xb27c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xb27c('0x4'));var logger=require(_0xb27c('0x5'))(_0xb27c('0x6'));var config=require(_0xb27c('0x7'));var jayson=require(_0xb27c('0x8'));var client=jayson[_0xb27c('0x9')][_0xb27c('0xa')]({'port':0x232a});config[_0xb27c('0xb')]=_[_0xb27c('0xc')](config[_0xb27c('0xb')],{'host':_0xb27c('0xd'),'port':0x18eb});var socket=require(_0xb27c('0xe'))(new Redis(config['redis']));require(_0xb27c('0xf'))['register'](socket);function respondWithRpcPromise(_0xe07d94,_0xc0acbb,_0x2f8eb7){return new BPromise(function(_0x1bed60,_0x52eb2d){return client[_0xb27c('0x10')](_0xe07d94,_0x2f8eb7)['then'](function(_0x4315b2){logger[_0xb27c('0x11')](_0xb27c('0x12'),_0xc0acbb,_0xb27c('0x13'));logger[_0xb27c('0x14')](_0xb27c('0x15'),_0xc0acbb,_0xb27c('0x13'),JSON['stringify'](_0x4315b2));if(_0x4315b2['error']){if(_0x4315b2['error']['code']===0x1f4){logger['error']('ChatWebsite,\x20%s,\x20%s',_0xc0acbb,_0x4315b2[_0xb27c('0x16')][_0xb27c('0x17')]);return _0x52eb2d(_0x4315b2[_0xb27c('0x16')][_0xb27c('0x17')]);}logger[_0xb27c('0x16')]('ChatWebsite,\x20%s,\x20%s',_0xc0acbb,_0x4315b2['error'][_0xb27c('0x17')]);return _0x1bed60(_0x4315b2[_0xb27c('0x16')]['message']);}else{logger[_0xb27c('0x11')](_0xb27c('0x12'),_0xc0acbb,'request\x20sent');_0x1bed60(_0x4315b2['result'][_0xb27c('0x17')]);}})[_0xb27c('0x18')](function(_0x5dc7b5){logger[_0xb27c('0x16')]('ChatWebsite,\x20%s,\x20%s',_0xc0acbb,_0x5dc7b5);_0x52eb2d(_0x5dc7b5);});});}
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.socket.js b/server/api/chatWebsite/chatWebsite.socket.js
index 7947a70..509a0d8 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 _0x38b7=['emit','removeListener','chatWebsite:','./chatWebsite.events','save','remove','update'];(function(_0x55a5e8,_0xc4b04f){var _0x31e1d9=function(_0x5d181b){while(--_0x5d181b){_0x55a5e8['push'](_0x55a5e8['shift']());}};_0x31e1d9(++_0xc4b04f);}(_0x38b7,0x11b));var _0x738b=function(_0x5284bb,_0x4303ee){_0x5284bb=_0x5284bb-0x0;var _0x3c6d49=_0x38b7[_0x5284bb];return _0x3c6d49;};'use strict';var ChatWebsiteEvents=require(_0x738b('0x0'));var events=[_0x738b('0x1'),_0x738b('0x2'),_0x738b('0x3')];function createListener(_0xa99fb8,_0x3e94ce){return function(_0x39d0c6){_0x3e94ce[_0x738b('0x4')](_0xa99fb8,_0x39d0c6);};}function removeListener(_0x550b58,_0x42d42e){return function(){ChatWebsiteEvents[_0x738b('0x5')](_0x550b58,_0x42d42e);};}exports['register']=function(_0x51ab60){for(var _0x24c8c5=0x0,_0x4adaec=events['length'];_0x24c8c5<_0x4adaec;_0x24c8c5++){var _0x3122e0=events[_0x24c8c5];var _0x500696=createListener(_0x738b('0x6')+_0x3122e0,_0x51ab60);ChatWebsiteEvents['on'](_0x3122e0,_0x500696);}};
\ No newline at end of file
+var _0xd027=['remove','update','removeListener','register','length','chatWebsite:','./chatWebsite.events','save'];(function(_0x59ed75,_0x4c50f1){var _0x323719=function(_0x39ae6c){while(--_0x39ae6c){_0x59ed75['push'](_0x59ed75['shift']());}};_0x323719(++_0x4c50f1);}(_0xd027,0x13e));var _0x7d02=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xd027[_0x14add3];return _0x4a174f;};'use strict';var ChatWebsiteEvents=require(_0x7d02('0x0'));var events=[_0x7d02('0x1'),_0x7d02('0x2'),_0x7d02('0x3')];function createListener(_0x31a84f,_0x11699c){return function(_0xed14b2){_0x11699c['emit'](_0x31a84f,_0xed14b2);};}function removeListener(_0x19c391,_0x4aa8e7){return function(){ChatWebsiteEvents[_0x7d02('0x4')](_0x19c391,_0x4aa8e7);};}exports[_0x7d02('0x5')]=function(_0x114b81){for(var _0x4d69a8=0x0,_0x4c2e28=events[_0x7d02('0x6')];_0x4d69a8<_0x4c2e28;_0x4d69a8++){var _0x410237=events[_0x4d69a8];var _0xbfbf73=createListener(_0x7d02('0x7')+_0x410237,_0x114b81);ChatWebsiteEvents['on'](_0x410237,_0xbfbf73);}};
\ No newline at end of file
diff --git a/server/api/chatWebsite/index.js b/server/api/chatWebsite/index.js
index bd22f2f..2463861 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 _0x6106=['/:id/logo','single','file','addLogo','diskStorage','server/files/images/avatars/','addAvatar','originalname','addCustomerAvatar','addSystemAvatar','/:id/notify','notify','server/files','offline-chat','ensureDir','extname','/:id/offline','any','offline','addInteraction','addApplications','addProactiveActions','/:id/users','addAgents','put','destroy','removeDispositions','delete','removeAnswers','removeAgents','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./chatWebsite.controller','get','isAuthenticated','index','describe','/:id','/:id/dispositions','/:id/canned_answers','getLogo','/:id/avatar','getAvatar','/:id/customer_avatar','/:id/system_avatar','/:id/interactions','getInteractions','/:id/applications','getApplications','/:id/proactive_actions','getProactiveActions','/:id/fields','getFields','/:id/offline_messages','getOfflineMessages','getAgents','create','post','addDisposition','join','root','server/files/images/logos/','format','now'];(function(_0x581e1d,_0x1ed7d4){var _0x39965b=function(_0x3cf384){while(--_0x3cf384){_0x581e1d['push'](_0x581e1d['shift']());}};_0x39965b(++_0x1ed7d4);}(_0x6106,0x1cf));var _0x6610=function(_0x1cc8fe,_0x105328){_0x1cc8fe=_0x1cc8fe-0x0;var _0x230054=_0x6106[_0x1cc8fe];return _0x230054;};'use strict';var multer=require(_0x6610('0x0'));var util=require(_0x6610('0x1'));var path=require(_0x6610('0x2'));var timeout=require(_0x6610('0x3'));var express=require(_0x6610('0x4'));var router=express[_0x6610('0x5')]();var fs_extra=require(_0x6610('0x6'));var auth=require(_0x6610('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0x6610('0x8'));var controller=require(_0x6610('0x9'));router[_0x6610('0xa')]('/',auth[_0x6610('0xb')](),controller[_0x6610('0xc')]);router[_0x6610('0xa')]('/describe',auth['isAuthenticated'](),controller[_0x6610('0xd')]);router[_0x6610('0xa')](_0x6610('0xe'),auth[_0x6610('0xb')](),controller['show']);router[_0x6610('0xa')](_0x6610('0xf'),auth[_0x6610('0xb')](),controller['getDispositions']);router['get'](_0x6610('0x10'),auth[_0x6610('0xb')](),controller['getAnswers']);router['get']('/:id/logo',controller[_0x6610('0x11')]);router[_0x6610('0xa')](_0x6610('0x12'),controller[_0x6610('0x13')]);router[_0x6610('0xa')](_0x6610('0x14'),controller['getCustomerAvatar']);router[_0x6610('0xa')](_0x6610('0x15'),controller['getSystemAvatar']);router[_0x6610('0xa')](_0x6610('0x16'),auth[_0x6610('0xb')](),controller[_0x6610('0x17')]);router[_0x6610('0xa')]('/:id/snippet',controller['getSnippet']);router['get'](_0x6610('0x18'),auth[_0x6610('0xb')](),controller[_0x6610('0x19')]);router['get'](_0x6610('0x1a'),auth[_0x6610('0xb')](),controller[_0x6610('0x1b')]);router[_0x6610('0xa')](_0x6610('0x1c'),controller[_0x6610('0x1d')]);router[_0x6610('0xa')](_0x6610('0x1e'),auth[_0x6610('0xb')](),controller[_0x6610('0x1f')]);router[_0x6610('0xa')]('/:id/users',auth[_0x6610('0xb')](),controller[_0x6610('0x20')]);router['post']('/',auth[_0x6610('0xb')](),controller[_0x6610('0x21')]);router[_0x6610('0x22')](_0x6610('0xf'),auth['isAuthenticated'](),controller[_0x6610('0x23')]);router[_0x6610('0x22')]('/:id/canned_answers',auth['isAuthenticated'](),controller['addAnswer']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x29248b,_0x1edb09,_0x331e1a){_0x331e1a(null,path[_0x6610('0x24')](config[_0x6610('0x25')],_0x6610('0x26')));},'filename':function(_0x56449f,_0x15d00a,_0x532642){_0x532642(null,util[_0x6610('0x27')]('%s-%s',Date[_0x6610('0x28')](),_0x15d00a['originalname']));}})});router[_0x6610('0x22')](_0x6610('0x29'),upload[_0x6610('0x2a')](_0x6610('0x2b')),controller[_0x6610('0x2c')]);var upload=multer({'storage':multer[_0x6610('0x2d')]({'destination':function(_0x127a3,_0x3a3d72,_0x40c09c){_0x40c09c(null,path[_0x6610('0x24')](config[_0x6610('0x25')],_0x6610('0x2e')));},'filename':function(_0x322d37,_0x2a0235,_0x811bd9){_0x811bd9(null,util[_0x6610('0x27')]('%s-%s',Date[_0x6610('0x28')](),_0x2a0235['originalname']));}})});router['post'](_0x6610('0x12'),upload[_0x6610('0x2a')](_0x6610('0x2b')),controller[_0x6610('0x2f')]);var upload=multer({'storage':multer[_0x6610('0x2d')]({'destination':function(_0x1c50b7,_0x9d9138,_0x47a46f){_0x47a46f(null,path[_0x6610('0x24')](config[_0x6610('0x25')],_0x6610('0x2e')));},'filename':function(_0x1c4fcb,_0x5e4699,_0x53f0f3){_0x53f0f3(null,util[_0x6610('0x27')]('%s-%s',Date[_0x6610('0x28')](),_0x5e4699[_0x6610('0x30')]));}})});router[_0x6610('0x22')](_0x6610('0x14'),upload[_0x6610('0x2a')](_0x6610('0x2b')),controller[_0x6610('0x31')]);var upload=multer({'storage':multer[_0x6610('0x2d')]({'destination':function(_0x496664,_0x2d6242,_0x5d7b99){_0x5d7b99(null,path[_0x6610('0x24')](config[_0x6610('0x25')],_0x6610('0x2e')));},'filename':function(_0x7e15f9,_0x3abdb3,_0x24133f){_0x24133f(null,util[_0x6610('0x27')]('%s-%s',Date[_0x6610('0x28')](),_0x3abdb3[_0x6610('0x30')]));}})});router['post'](_0x6610('0x15'),upload[_0x6610('0x2a')](_0x6610('0x2b')),controller[_0x6610('0x32')]);router[_0x6610('0x22')](_0x6610('0x33'),controller[_0x6610('0x34')]);const offlineUploadMulter=multer({'storage':multer['diskStorage']({'destination':function(_0x3cb609,_0x41f817,_0x307aeb){const _0x33f934=path[_0x6610('0x24')](config[_0x6610('0x25')],_0x6610('0x35'),'attachments',_0x6610('0x36'));fs_extra[_0x6610('0x37')](_0x33f934,function(){_0x307aeb(null,_0x33f934);});},'filename':function(_0x181c34,_0x5b3374,_0x24fe33){const _0x14f10f=_0x5b3374['originalname']['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x2a2ec3=path[_0x6610('0x38')](_0x14f10f);const _0x269293=Date[_0x6610('0x28')]()+'-'+_0x14f10f['replace'](_0x2a2ec3,'')+_0x2a2ec3;_0x24fe33(null,_0x269293);}})});router[_0x6610('0x22')](_0x6610('0x39'),offlineUploadMulter[_0x6610('0x3a')](),controller[_0x6610('0x3b')]);router['post']('/:id/interactions',auth['isAuthenticated'](),controller[_0x6610('0x3c')]);router['post'](_0x6610('0x18'),auth[_0x6610('0xb')](),controller[_0x6610('0x3d')]);router[_0x6610('0x22')](_0x6610('0x1a'),auth['isAuthenticated'](),controller[_0x6610('0x3e')]);router[_0x6610('0x22')](_0x6610('0x3f'),auth[_0x6610('0xb')](),controller[_0x6610('0x40')]);router[_0x6610('0x41')](_0x6610('0xe'),auth[_0x6610('0xb')](),controller['update']);router['delete'](_0x6610('0xe'),auth[_0x6610('0xb')](),controller[_0x6610('0x42')]);router['delete']('/:id/dispositions',auth[_0x6610('0xb')](),controller[_0x6610('0x43')]);router[_0x6610('0x44')](_0x6610('0x10'),auth[_0x6610('0xb')](),controller[_0x6610('0x45')]);router['delete'](_0x6610('0x3f'),auth[_0x6610('0xb')](),controller[_0x6610('0x46')]);module[_0x6610('0x47')]=router;
\ No newline at end of file
+var _0xe195=['/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','getLogo','/:id/avatar','getAvatar','getCustomerAvatar','/:id/system_avatar','/:id/interactions','getInteractions','/:id/snippet','getSnippet','/:id/applications','/:id/proactive_actions','/:id/fields','getFields','/:id/offline_messages','getOfflineMessages','/:id/users','getAgents','post','create','addAnswer','diskStorage','join','root','server/files/images/logos/','%s-%s','now','originalname','/:id/logo','file','addLogo','single','addAvatar','server/files/images/avatars/','format','/:id/customer_avatar','addSystemAvatar','/:id/notify','attachments','ensureDir','replace','extname','offline','addInteraction','addApplications','addProactiveActions','update','delete','removeDispositions','removeAnswers','removeAgents','connect-timeout','express','Router','fs-extra','get','index','/describe','isAuthenticated','describe','/:id'];(function(_0x14fad0,_0x278d75){var _0x5c665f=function(_0xe43a83){while(--_0xe43a83){_0x14fad0['push'](_0x14fad0['shift']());}};_0x5c665f(++_0x278d75);}(_0xe195,0xb6));var _0x5e19=function(_0x294da6,_0x344235){_0x294da6=_0x294da6-0x0;var _0x4da15f=_0xe195[_0x294da6];return _0x4da15f;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0x5e19('0x0'));var express=require(_0x5e19('0x1'));var router=express[_0x5e19('0x2')]();var fs_extra=require(_0x5e19('0x3'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./chatWebsite.controller');router[_0x5e19('0x4')]('/',auth['isAuthenticated'](),controller[_0x5e19('0x5')]);router['get'](_0x5e19('0x6'),auth[_0x5e19('0x7')](),controller[_0x5e19('0x8')]);router[_0x5e19('0x4')](_0x5e19('0x9'),auth[_0x5e19('0x7')](),controller['show']);router[_0x5e19('0x4')](_0x5e19('0xa'),auth[_0x5e19('0x7')](),controller[_0x5e19('0xb')]);router[_0x5e19('0x4')](_0x5e19('0xc'),auth[_0x5e19('0x7')](),controller[_0x5e19('0xd')]);router[_0x5e19('0x4')]('/:id/logo',controller[_0x5e19('0xe')]);router['get'](_0x5e19('0xf'),controller[_0x5e19('0x10')]);router[_0x5e19('0x4')]('/:id/customer_avatar',controller[_0x5e19('0x11')]);router[_0x5e19('0x4')](_0x5e19('0x12'),controller['getSystemAvatar']);router[_0x5e19('0x4')](_0x5e19('0x13'),auth['isAuthenticated'](),controller[_0x5e19('0x14')]);router[_0x5e19('0x4')](_0x5e19('0x15'),controller[_0x5e19('0x16')]);router[_0x5e19('0x4')](_0x5e19('0x17'),auth[_0x5e19('0x7')](),controller['getApplications']);router[_0x5e19('0x4')](_0x5e19('0x18'),auth[_0x5e19('0x7')](),controller['getProactiveActions']);router[_0x5e19('0x4')](_0x5e19('0x19'),controller[_0x5e19('0x1a')]);router[_0x5e19('0x4')](_0x5e19('0x1b'),auth[_0x5e19('0x7')](),controller[_0x5e19('0x1c')]);router[_0x5e19('0x4')](_0x5e19('0x1d'),auth['isAuthenticated'](),controller[_0x5e19('0x1e')]);router[_0x5e19('0x1f')]('/',auth['isAuthenticated'](),controller[_0x5e19('0x20')]);router[_0x5e19('0x1f')](_0x5e19('0xa'),auth[_0x5e19('0x7')](),controller['addDisposition']);router[_0x5e19('0x1f')](_0x5e19('0xc'),auth[_0x5e19('0x7')](),controller[_0x5e19('0x21')]);var upload=multer({'storage':multer[_0x5e19('0x22')]({'destination':function(_0x576960,_0x4764f4,_0x5ab32e){_0x5ab32e(null,path[_0x5e19('0x23')](config[_0x5e19('0x24')],_0x5e19('0x25')));},'filename':function(_0x2fe685,_0x2ce3e8,_0x42c7b5){_0x42c7b5(null,util['format'](_0x5e19('0x26'),Date[_0x5e19('0x27')](),_0x2ce3e8[_0x5e19('0x28')]));}})});router[_0x5e19('0x1f')](_0x5e19('0x29'),upload['single'](_0x5e19('0x2a')),controller[_0x5e19('0x2b')]);var upload=multer({'storage':multer[_0x5e19('0x22')]({'destination':function(_0x1ccd1e,_0x39e8f3,_0x5d8c7c){_0x5d8c7c(null,path['join'](config[_0x5e19('0x24')],'server/files/images/avatars/'));},'filename':function(_0x4a5a6f,_0x214211,_0x166d90){_0x166d90(null,util['format'](_0x5e19('0x26'),Date[_0x5e19('0x27')](),_0x214211['originalname']));}})});router[_0x5e19('0x1f')](_0x5e19('0xf'),upload[_0x5e19('0x2c')](_0x5e19('0x2a')),controller[_0x5e19('0x2d')]);var upload=multer({'storage':multer[_0x5e19('0x22')]({'destination':function(_0x52082d,_0xcfc63,_0x34e758){_0x34e758(null,path[_0x5e19('0x23')](config[_0x5e19('0x24')],_0x5e19('0x2e')));},'filename':function(_0x52b07f,_0x37843a,_0x1a62ec){_0x1a62ec(null,util[_0x5e19('0x2f')](_0x5e19('0x26'),Date[_0x5e19('0x27')](),_0x37843a[_0x5e19('0x28')]));}})});router[_0x5e19('0x1f')](_0x5e19('0x30'),upload['single'](_0x5e19('0x2a')),controller['addCustomerAvatar']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1dc384,_0x41a135,_0x38dd06){_0x38dd06(null,path[_0x5e19('0x23')](config[_0x5e19('0x24')],_0x5e19('0x2e')));},'filename':function(_0x1e3688,_0x134e1e,_0x305367){_0x305367(null,util[_0x5e19('0x2f')](_0x5e19('0x26'),Date[_0x5e19('0x27')](),_0x134e1e['originalname']));}})});router[_0x5e19('0x1f')](_0x5e19('0x12'),upload[_0x5e19('0x2c')](_0x5e19('0x2a')),controller[_0x5e19('0x31')]);router[_0x5e19('0x1f')](_0x5e19('0x32'),controller['notify']);const offlineUploadMulter=multer({'storage':multer[_0x5e19('0x22')]({'destination':function(_0x2dedeb,_0x169c55,_0x4f5b7b){const _0xe962ff=path['join'](config['root'],'server/files',_0x5e19('0x33'),'offline-chat');fs_extra[_0x5e19('0x34')](_0xe962ff,function(){_0x4f5b7b(null,_0xe962ff);});},'filename':function(_0x5f3929,_0x3ee29a,_0x5b57b7){const _0x13dda2=_0x3ee29a['originalname'][_0x5e19('0x35')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x412cbb=path[_0x5e19('0x36')](_0x13dda2);const _0x32ddde=Date['now']()+'-'+_0x13dda2[_0x5e19('0x35')](_0x412cbb,'')+_0x412cbb;_0x5b57b7(null,_0x32ddde);}})});router[_0x5e19('0x1f')]('/:id/offline',offlineUploadMulter['any'](),controller[_0x5e19('0x37')]);router['post']('/:id/interactions',auth[_0x5e19('0x7')](),controller[_0x5e19('0x38')]);router['post']('/:id/applications',auth['isAuthenticated'](),controller[_0x5e19('0x39')]);router[_0x5e19('0x1f')](_0x5e19('0x18'),auth[_0x5e19('0x7')](),controller[_0x5e19('0x3a')]);router[_0x5e19('0x1f')](_0x5e19('0x1d'),auth[_0x5e19('0x7')](),controller['addAgents']);router['put'](_0x5e19('0x9'),auth[_0x5e19('0x7')](),controller[_0x5e19('0x3b')]);router[_0x5e19('0x3c')](_0x5e19('0x9'),auth['isAuthenticated'](),controller['destroy']);router[_0x5e19('0x3c')](_0x5e19('0xa'),auth['isAuthenticated'](),controller[_0x5e19('0x3d')]);router[_0x5e19('0x3c')]('/:id/canned_answers',auth[_0x5e19('0x7')](),controller[_0x5e19('0x3e')]);router[_0x5e19('0x3c')](_0x5e19('0x1d'),auth[_0x5e19('0x7')](),controller[_0x5e19('0x3f')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/client-side-logs.js b/server/api/client-side-logs.js
index dad775b..73e4040 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 _0xaf28=['beaver-logger/server','express','../components/auth/service','../config/environment','Router','env','app','client-side-logger','Client-Side\x20logger\x20not\x20found!','isAuthenticated'];(function(_0xb2e868,_0x3b2184){var _0x172f42=function(_0x593f9c){while(--_0x593f9c){_0xb2e868['push'](_0xb2e868['shift']());}};_0x172f42(++_0x3b2184);}(_0xaf28,0x1b8));var _0x8af2=function(_0x4aff38,_0x532d4f){_0x4aff38=_0x4aff38-0x0;var _0x300a0b=_0xaf28[_0x4aff38];return _0x300a0b;};var beaverLogger=require(_0x8af2('0x0'));var express=require(_0x8af2('0x1'));var auth=require(_0x8af2('0x2'));var config=require(_0x8af2('0x3'));var router=express[_0x8af2('0x4')]();var isProduction=config[_0x8af2('0x5')]==='production'||![];function clientSideLogs(_0x219eb2,_0x1f5542,_0x1736a3){var _0x2ca223=_0x219eb2[_0x8af2('0x6')]['get'](_0x8af2('0x7'));if(!_0x2ca223){throw new Error(_0x8af2('0x8'));}return beaverLogger['expressEndpoint']({'uri':'/client-logs','logger':_0x2ca223,'enableCors':!isProduction})(_0x219eb2,_0x1f5542,_0x1736a3);}router['use'](auth[_0x8af2('0x9')](),clientSideLogs);module['exports']=router;
\ No newline at end of file
+var _0xe0c1=['app','client-side-logger','Client-Side\x20logger\x20not\x20found!','expressEndpoint','/client-logs','isAuthenticated','exports','beaver-logger/server','express','../components/auth/service','Router','env'];(function(_0x1589dd,_0x2b9d22){var _0x1bddd1=function(_0x3687f8){while(--_0x3687f8){_0x1589dd['push'](_0x1589dd['shift']());}};_0x1bddd1(++_0x2b9d22);}(_0xe0c1,0xa3));var _0x1e0c=function(_0x18b110,_0x27425c){_0x18b110=_0x18b110-0x0;var _0x150b6c=_0xe0c1[_0x18b110];return _0x150b6c;};var beaverLogger=require(_0x1e0c('0x0'));var express=require(_0x1e0c('0x1'));var auth=require(_0x1e0c('0x2'));var config=require('../config/environment');var router=express[_0x1e0c('0x3')]();var isProduction=config[_0x1e0c('0x4')]==='production'||![];function clientSideLogs(_0x5c1623,_0x1a0ccb,_0x357a97){var _0x264f9b=_0x5c1623[_0x1e0c('0x5')]['get'](_0x1e0c('0x6'));if(!_0x264f9b){throw new Error(_0x1e0c('0x7'));}return beaverLogger[_0x1e0c('0x8')]({'uri':_0x1e0c('0x9'),'logger':_0x264f9b,'enableCors':!isProduction})(_0x5c1623,_0x1a0ccb,_0x357a97);}router['use'](auth[_0x1e0c('0xa')](),clientSideLogs);module[_0x1e0c('0xb')]=router;
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.attributes.js b/server/api/cloudProvider/cloudProvider.attributes.js
index b34cf85..5704fbc 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 _0xea31=['MicrosoftAzure\x20=>\x20client_id','MicrosoftAzure\x20=>\x20tenant','MicrosoftAzure\x20=>\x20redirect_uri','MicrosoftAzure\x20=>\x20access_token','TEXT','MicrosoftAzure\x20=>\x20Dynamics365\x20=>\x20remote_uri','sequelize','exports','STRING','ENUM','AmazonAWS','Google','MicrosoftAzure','Outlook365','Dynamics365'];(function(_0x15c421,_0x6366f7){var _0x5e5ed5=function(_0x206e66){while(--_0x206e66){_0x15c421['push'](_0x15c421['shift']());}};_0x5e5ed5(++_0x6366f7);}(_0xea31,0xd8));var _0x1ea3=function(_0x1a850e,_0x3f5312){_0x1a850e=_0x1a850e-0x0;var _0x285c5a=_0xea31[_0x1a850e];return _0x285c5a;};'use strict';var Sequelize=require(_0x1ea3('0x0'));module[_0x1ea3('0x1')]={'name':{'type':Sequelize[_0x1ea3('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize[_0x1ea3('0x3')](_0x1ea3('0x4'),_0x1ea3('0x5'),_0x1ea3('0x6')),'allowNull':![],'validate':{'notEmpty':!![]}},'type':{'type':Sequelize[_0x1ea3('0x3')](_0x1ea3('0x7'),_0x1ea3('0x8'))},'data1':{'type':Sequelize[_0x1ea3('0x2')],'comment':_0x1ea3('0x9')},'data2':{'type':Sequelize['STRING'],'comment':_0x1ea3('0xa')},'data3':{'type':Sequelize['STRING'],'comment':'MicrosoftAzure\x20=>\x20client_secret'},'data4':{'type':Sequelize['STRING'],'comment':_0x1ea3('0xb')},'data5':{'type':Sequelize['TEXT'],'comment':_0x1ea3('0xc')},'data6':{'type':Sequelize[_0x1ea3('0xd')],'comment':'MicrosoftAzure\x20=>\x20refresh_token'},'data7':{'type':Sequelize['TEXT'],'comment':_0x1ea3('0xe')}};
\ No newline at end of file
+var _0xce00=['STRING','Google','MicrosoftAzure','Outlook365','MicrosoftAzure\x20=>\x20tenant','TEXT','MicrosoftAzure\x20=>\x20access_token','MicrosoftAzure\x20=>\x20refresh_token','MicrosoftAzure\x20=>\x20Dynamics365\x20=>\x20remote_uri','sequelize','exports'];(function(_0x5ea12c,_0x58685d){var _0x4e3711=function(_0x2aeb19){while(--_0x2aeb19){_0x5ea12c['push'](_0x5ea12c['shift']());}};_0x4e3711(++_0x58685d);}(_0xce00,0xfb));var _0x0ce0=function(_0x5c2e5e,_0x2bc00e){_0x5c2e5e=_0x5c2e5e-0x0;var _0x46a5da=_0xce00[_0x5c2e5e];return _0x46a5da;};'use strict';var Sequelize=require(_0x0ce0('0x0'));module[_0x0ce0('0x1')]={'name':{'type':Sequelize[_0x0ce0('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize['ENUM']('AmazonAWS',_0x0ce0('0x3'),_0x0ce0('0x4')),'allowNull':![],'validate':{'notEmpty':!![]}},'type':{'type':Sequelize['ENUM'](_0x0ce0('0x5'),'Dynamics365')},'data1':{'type':Sequelize[_0x0ce0('0x2')],'comment':'MicrosoftAzure\x20=>\x20client_id'},'data2':{'type':Sequelize['STRING'],'comment':_0x0ce0('0x6')},'data3':{'type':Sequelize[_0x0ce0('0x2')],'comment':'MicrosoftAzure\x20=>\x20client_secret'},'data4':{'type':Sequelize['STRING'],'comment':'MicrosoftAzure\x20=>\x20redirect_uri'},'data5':{'type':Sequelize[_0x0ce0('0x7')],'comment':_0x0ce0('0x8')},'data6':{'type':Sequelize[_0x0ce0('0x7')],'comment':_0x0ce0('0x9')},'data7':{'type':Sequelize[_0x0ce0('0x7')],'comment':_0x0ce0('0xa')}};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.controller.js b/server/api/cloudProvider/cloudProvider.controller.js
index 409faa8..9438fc2 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 _0x7f38=['send','padEnd','index','CloudProvider','fieldName','key','map','query','keys','filters','intersection','model','fields','attributes','length','hasOwnProperty','order','sort','where','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','service','MicrosoftAzure','decryptString','data3','catch','params','create','body','Name\x20parameter\x20not\x20specified','rawAttributes','values','includes','Invalid\x20service\x20parameter.\x20Allowed\x20values:\x20','join','encryptString','find','destroy','oauth2MicrosoftAuthorize','findOne','generateMicrosoftAuthorizationUrl','user','error','get','state','Invalid\x20state\x20parameter','parse','from','toString','ascii','oauth2Claims','Unable\x20to\x20validate\x20id_token','code','data5','access_token','data6','startRefreshInterval','emit','microsoftAuthorization:success','microsoftAuthorization:error','Invalid\x20authentication\x20state\x20parameter','message','Authentication\x20failed\x20for\x20cloud\x20provider\x20#%s,\x20err:%s','lodash','ioredis','../../components/parsers/qs','../../config/logger','api','../../mysqldb','./cloudProvider.oauth','redis','defaults','localhost','socket.io-emitter','sendStatus','json','undefined','limit','count','offset','status','Content-Range','update','then','end','stack','name'];(function(_0x207cf0,_0x450001){var _0x4e98a6=function(_0x25e7e1){while(--_0x25e7e1){_0x207cf0['push'](_0x207cf0['shift']());}};_0x4e98a6(++_0x450001);}(_0x7f38,0x102));var _0x87f3=function(_0x568bf2,_0x2258c4){_0x568bf2=_0x568bf2-0x0;var _0x294089=_0x7f38[_0x568bf2];return _0x294089;};'use strict';var _=require(_0x87f3('0x0'));var Redis=require(_0x87f3('0x1'));var qs=require(_0x87f3('0x2'));var encryptor=require('../../components/encryptor');var config=require('../../config/environment');var logger=require(_0x87f3('0x3'))(_0x87f3('0x4'));var db=require(_0x87f3('0x5'))['db'];var oauth=require(_0x87f3('0x6'));config[_0x87f3('0x7')]=_[_0x87f3('0x8')](config[_0x87f3('0x7')],{'host':_0x87f3('0x9'),'port':0x18eb});var socket=require(_0x87f3('0xa'))(new Redis(config['redis']));var redis=new Redis(config[_0x87f3('0x7')]);function respondWithStatusCode(_0x37eae3,_0x403718){_0x403718=_0x403718||0xcc;return function(_0x40eb7a){if(_0x40eb7a){return _0x37eae3[_0x87f3('0xb')](_0x403718);}return _0x37eae3['status'](_0x403718)['end']();};}function respondWithResult(_0x3c65d7,_0x108b08){_0x108b08=_0x108b08||0xc8;return function(_0x17ca7a){if(_0x17ca7a){return _0x3c65d7['status'](_0x108b08)[_0x87f3('0xc')](_0x17ca7a);}};}function respondWithFilteredResult(_0x31202a,_0x5769fa){return function(_0x4ad493){if(_0x4ad493){var _0x2b9505=typeof _0x5769fa['offset']===_0x87f3('0xd')&&typeof _0x5769fa[_0x87f3('0xe')]===_0x87f3('0xd');var _0x4d0e45=_0x4ad493[_0x87f3('0xf')];var _0x489add=_0x2b9505?0x0:_0x5769fa[_0x87f3('0x10')];var _0x260555=_0x2b9505?_0x4ad493[_0x87f3('0xf')]:_0x5769fa[_0x87f3('0x10')]+_0x5769fa[_0x87f3('0xe')];var _0x4f17fe;if(_0x260555>=_0x4d0e45){_0x260555=_0x4d0e45;_0x4f17fe=0xc8;}else{_0x4f17fe=0xce;}_0x31202a[_0x87f3('0x11')](_0x4f17fe);return _0x31202a['set'](_0x87f3('0x12'),_0x489add+'-'+_0x260555+'/'+_0x4d0e45)['json'](_0x4ad493);}return null;};}function saveUpdates(_0x2b4384){return function(_0x4a7866){if(_0x4a7866){return _0x4a7866[_0x87f3('0x13')](_0x2b4384)[_0x87f3('0x14')](function(_0x4b5a01){return _0x4b5a01;});}return null;};}function removeEntity(_0x116673){return function(_0x22a183){if(_0x22a183){return _0x22a183['destroy']()[_0x87f3('0x14')](function(){_0x116673[_0x87f3('0x11')](0xcc)[_0x87f3('0x15')]();});}};}function handleEntityNotFound(_0x623d07){return function(_0x509353){if(!_0x509353){_0x623d07[_0x87f3('0xb')](0x194);}return _0x509353;};}function handleError(_0x4a6ae9,_0x36221b){_0x36221b=_0x36221b||0x1f4;return function(_0x3370b0){logger['error'](_0x3370b0[_0x87f3('0x16')]);if(_0x3370b0[_0x87f3('0x17')]){delete _0x3370b0['name'];}_0x4a6ae9[_0x87f3('0x11')](_0x36221b)[_0x87f3('0x18')](_0x3370b0);};}function maskClientSecret(_0x36224f){return _[_0x87f3('0x19')](_0x36224f['slice'](0x0,0x3),0x14,'*');}exports[_0x87f3('0x1a')]=function(_0x17e105,_0x166495){var _0x542b83={},_0x2c43e7={},_0x1826ed={'count':0x0,'rows':[]};var _0x2c913e=_['map'](db[_0x87f3('0x1b')]['rawAttributes'],function(_0x3a4094){return{'name':_0x3a4094[_0x87f3('0x1c')],'type':_0x3a4094['type'][_0x87f3('0x1d')]};});_0x2c43e7['model']=_[_0x87f3('0x1e')](_0x2c913e,'name');_0x2c43e7[_0x87f3('0x1f')]=_[_0x87f3('0x20')](_0x17e105['query']);_0x2c43e7[_0x87f3('0x21')]=_[_0x87f3('0x22')](_0x2c43e7['model'],_0x2c43e7[_0x87f3('0x1f')]);_0x542b83['attributes']=_['intersection'](_0x2c43e7[_0x87f3('0x23')],qs[_0x87f3('0x24')](_0x17e105[_0x87f3('0x1f')]['fields']));_0x542b83['attributes']=_0x542b83[_0x87f3('0x25')][_0x87f3('0x26')]?_0x542b83[_0x87f3('0x25')]:_0x2c43e7[_0x87f3('0x23')];if(!_0x17e105[_0x87f3('0x1f')][_0x87f3('0x27')]('nolimit')){_0x542b83[_0x87f3('0xe')]=qs[_0x87f3('0xe')](_0x17e105[_0x87f3('0x1f')][_0x87f3('0xe')]);_0x542b83[_0x87f3('0x10')]=qs['offset'](_0x17e105[_0x87f3('0x1f')][_0x87f3('0x10')]);}_0x542b83[_0x87f3('0x28')]=qs[_0x87f3('0x29')](_0x17e105[_0x87f3('0x1f')][_0x87f3('0x29')]);_0x542b83[_0x87f3('0x2a')]=qs[_0x87f3('0x21')](_['pick'](_0x17e105[_0x87f3('0x1f')],_0x2c43e7[_0x87f3('0x21')]),_0x2c913e);if(_0x17e105[_0x87f3('0x1f')][_0x87f3('0x2b')]){_0x542b83[_0x87f3('0x2a')]=_[_0x87f3('0x2c')](_0x542b83[_0x87f3('0x2a')],{'$or':_[_0x87f3('0x1e')](_0x2c913e,function(_0x25eb94){if(_0x25eb94[_0x87f3('0x2d')]!==_0x87f3('0x2e')){var _0x43f405={};_0x43f405[_0x25eb94[_0x87f3('0x17')]]={'$like':'%'+_0x17e105[_0x87f3('0x1f')][_0x87f3('0x2b')]+'%'};return _0x43f405;}})});}_0x542b83=_['merge']({},_0x542b83,_0x17e105[_0x87f3('0x2f')]);var _0x52573c={'where':_0x542b83[_0x87f3('0x2a')]};return db['CloudProvider'][_0x87f3('0xf')](_0x52573c)[_0x87f3('0x14')](function(_0x3f293d){_0x1826ed[_0x87f3('0xf')]=_0x3f293d;if(_0x17e105[_0x87f3('0x1f')][_0x87f3('0x30')]){_0x542b83[_0x87f3('0x31')]=[{'all':!![]}];}return db[_0x87f3('0x1b')][_0x87f3('0x32')](_0x542b83);})[_0x87f3('0x14')](function(_0x534ff1){_0x1826ed[_0x87f3('0x33')]=_['map'](_0x534ff1,function(_0x5978cd){if(_0x5978cd[_0x87f3('0x34')]===_0x87f3('0x35')){var _0x4aa095=encryptor[_0x87f3('0x36')](_0x5978cd[_0x87f3('0x37')]);_0x5978cd[_0x87f3('0x37')]=maskClientSecret(_0x4aa095);}return _0x5978cd;});return _0x1826ed;})[_0x87f3('0x14')](respondWithFilteredResult(_0x166495,_0x542b83))[_0x87f3('0x38')](handleError(_0x166495,null));};exports['show']=function(_0x80e992,_0x231bba){var _0x413b65={'raw':!![],'where':{'id':_0x80e992[_0x87f3('0x39')]['id']}},_0x4ba6f8={};_0x4ba6f8[_0x87f3('0x23')]=_[_0x87f3('0x20')](db['CloudProvider']['rawAttributes']);_0x4ba6f8['query']=_[_0x87f3('0x20')](_0x80e992[_0x87f3('0x1f')]);_0x4ba6f8[_0x87f3('0x21')]=_['intersection'](_0x4ba6f8[_0x87f3('0x23')],_0x4ba6f8['query']);_0x413b65[_0x87f3('0x25')]=_[_0x87f3('0x22')](_0x4ba6f8[_0x87f3('0x23')],qs[_0x87f3('0x24')](_0x80e992[_0x87f3('0x1f')][_0x87f3('0x24')]));_0x413b65[_0x87f3('0x25')]=_0x413b65['attributes'][_0x87f3('0x26')]?_0x413b65[_0x87f3('0x25')]:_0x4ba6f8['model'];if(_0x80e992['query']['includeAll']){_0x413b65['include']=[{'all':!![]}];}_0x413b65=_['merge']({},_0x413b65,_0x80e992['options']);return db['CloudProvider']['find'](_0x413b65)['then'](handleEntityNotFound(_0x231bba,null))[_0x87f3('0x14')](function(_0x3266bc){if(_0x3266bc[_0x87f3('0x34')]===_0x87f3('0x35')){var _0x1fe05e=encryptor[_0x87f3('0x36')](_0x3266bc['data3']);_0x3266bc['data3']=maskClientSecret(_0x1fe05e);}return _0x3266bc;})[_0x87f3('0x14')](respondWithResult(_0x231bba,null))[_0x87f3('0x38')](handleError(_0x231bba,null));};exports[_0x87f3('0x3a')]=function(_0x3b6592,_0x34432b){if(!_0x3b6592[_0x87f3('0x3b')]['name'])throw new Error(_0x87f3('0x3c'));if(!_0x3b6592[_0x87f3('0x3b')][_0x87f3('0x34')])throw new Error('Service\x20parameter\x20not\x20specified');var _0x464715=db[_0x87f3('0x1b')][_0x87f3('0x3d')]['service'][_0x87f3('0x3e')];if(!_0x464715[_0x87f3('0x3f')](_0x3b6592[_0x87f3('0x3b')][_0x87f3('0x34')]))throw new Error(_0x87f3('0x40')+_0x464715[_0x87f3('0x41')](',\x20'));if(_0x3b6592[_0x87f3('0x3b')][_0x87f3('0x34')]===_0x87f3('0x35')&&_0x3b6592[_0x87f3('0x3b')][_0x87f3('0x37')]){_0x3b6592[_0x87f3('0x3b')][_0x87f3('0x37')]=encryptor[_0x87f3('0x42')](_0x3b6592['body']['data3']);}return db['CloudProvider'][_0x87f3('0x3a')](_0x3b6592[_0x87f3('0x3b')],{})['then'](respondWithResult(_0x34432b,0xc9))[_0x87f3('0x38')](handleError(_0x34432b,null));};exports[_0x87f3('0x13')]=function(_0x3c21f1,_0x1bd35a){if(_0x3c21f1[_0x87f3('0x3b')]['id']){delete _0x3c21f1[_0x87f3('0x3b')]['id'];}return db['CloudProvider'][_0x87f3('0x43')]({'where':{'id':_0x3c21f1[_0x87f3('0x39')]['id']}})[_0x87f3('0x14')](handleEntityNotFound(_0x1bd35a,null))['then'](function(_0x8f0ebd){if(_0x8f0ebd[_0x87f3('0x34')]===_0x87f3('0x35')&&_0x3c21f1['body'][_0x87f3('0x37')]){_0x3c21f1[_0x87f3('0x3b')][_0x87f3('0x37')]=encryptor[_0x87f3('0x42')](_0x3c21f1[_0x87f3('0x3b')][_0x87f3('0x37')]);}return _0x8f0ebd;})['then'](saveUpdates(_0x3c21f1[_0x87f3('0x3b')],null))[_0x87f3('0x14')](respondWithResult(_0x1bd35a,null))[_0x87f3('0x38')](handleError(_0x1bd35a,null));};exports[_0x87f3('0x44')]=function(_0x51b170,_0x1fb23e){return db[_0x87f3('0x1b')]['find']({'where':{'id':_0x51b170['params']['id']}})[_0x87f3('0x14')](handleEntityNotFound(_0x1fb23e,null))[_0x87f3('0x14')](removeEntity(_0x1fb23e,null))[_0x87f3('0x38')](handleError(_0x1fb23e,null));};exports[_0x87f3('0x45')]=function(_0x55ec03,_0xfb81e4){return db[_0x87f3('0x1b')][_0x87f3('0x46')]({'where':{'id':_0x55ec03[_0x87f3('0x39')]['id']},'raw':!![]})[_0x87f3('0x14')](function(_0x21104c){if(!_0x21104c)return _0xfb81e4[_0x87f3('0xb')](0x194);return{'url':oauth[_0x87f3('0x47')](_0x21104c,_0x55ec03[_0x87f3('0x48')]['id'])};})['then'](respondWithResult(_0xfb81e4,null))['catch'](handleError(_0xfb81e4,null));};exports['oauth2MicrosoftCallback']=function(_0x5a786f,_0x20989a){var _0x3cf231=_0x5a786f[_0x87f3('0x3b')];var _0x5cccb0;var _0x1570f4;if(_0x3cf231[_0x87f3('0x49')])throw _0x3cf231;redis[_0x87f3('0x4a')](_0x3cf231[_0x87f3('0x4b')])[_0x87f3('0x14')](function(_0x11f5d1){if(!_0x11f5d1)throw new Error(_0x87f3('0x4c'));_0x5cccb0=JSON[_0x87f3('0x4d')](_0x11f5d1);var _0x22dbae=Buffer[_0x87f3('0x4e')](_0x3cf231['state'],'base64')[_0x87f3('0x4f')](_0x87f3('0x50'));_0x1570f4=JSON['parse'](_0x22dbae);if(!oauth['isValidIdToken'](_0x3cf231['id_token'],_0x5cccb0[_0x87f3('0x51')]))throw new Error(_0x87f3('0x52'));redis['del'](_0x3cf231['state']);return oauth['getOauth2MicrosoftAccessToken'](_0x3cf231[_0x87f3('0x53')],_0x5cccb0);})[_0x87f3('0x14')](function(_0x37af1c){_0x5cccb0[_0x87f3('0x54')]=_0x37af1c[_0x87f3('0x55')];_0x5cccb0[_0x87f3('0x56')]=_0x37af1c['refresh_token'];return db[_0x87f3('0x1b')][_0x87f3('0x13')]({'data5':_0x5cccb0[_0x87f3('0x54')],'data6':_0x5cccb0[_0x87f3('0x56')]},{'where':{'id':_0x5cccb0['id']}});})[_0x87f3('0x14')](function(){oauth[_0x87f3('0x57')](_0x5cccb0);socket[_0x87f3('0x58')](_0x87f3('0x59'),{'id':_0x1570f4['id']});return;})[_0x87f3('0x14')](respondWithStatusCode(_0x20989a,null))[_0x87f3('0x38')](function(_0x2b1e14){if(_0x1570f4){socket[_0x87f3('0x58')](_0x87f3('0x5a'),{'id':_0x1570f4['id']});}if(!_0x5cccb0){logger[_0x87f3('0x49')](_0x87f3('0x5b'),_0x2b1e14);return _0x20989a[_0x87f3('0x11')](0x1f4)[_0x87f3('0x18')](_0x2b1e14[_0x87f3('0x5c')]);}logger['error'](_0x87f3('0x5d'),_0x5cccb0['id'],JSON['stringify'](_0x2b1e14));});};
\ No newline at end of file
+var _0xe42a=['emit','microsoftAuthorization:error','message','Authentication\x20failed\x20for\x20cloud\x20provider\x20#%s,\x20err:%s','stringify','lodash','ioredis','../../components/parsers/qs','../../components/encryptor','../../config/environment','api','../../mysqldb','./cloudProvider.oauth','redis','localhost','socket.io-emitter','sendStatus','status','json','offset','undefined','count','set','Content-Range','update','then','destroy','end','error','name','send','slice','map','rawAttributes','type','key','query','keys','filters','intersection','model','attributes','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','options','CloudProvider','includeAll','include','findAll','rows','service','MicrosoftAzure','decryptString','data3','catch','show','params','fields','length','merge','create','body','includes','Invalid\x20service\x20parameter.\x20Allowed\x20values:\x20','join','find','encryptString','oauth2MicrosoftAuthorize','findOne','user','get','state','Invalid\x20state\x20parameter','from','base64','parse','isValidIdToken','id_token','Unable\x20to\x20validate\x20id_token','del','getOauth2MicrosoftAccessToken','data5','access_token','data6','startRefreshInterval'];(function(_0xbf241a,_0x3dbf65){var _0x10e1b1=function(_0x2fd9db){while(--_0x2fd9db){_0xbf241a['push'](_0xbf241a['shift']());}};_0x10e1b1(++_0x3dbf65);}(_0xe42a,0x116));var _0xae42=function(_0x361c12,_0x3d0085){_0x361c12=_0x361c12-0x0;var _0x4529c1=_0xe42a[_0x361c12];return _0x4529c1;};'use strict';var _=require(_0xae42('0x0'));var Redis=require(_0xae42('0x1'));var qs=require(_0xae42('0x2'));var encryptor=require(_0xae42('0x3'));var config=require(_0xae42('0x4'));var logger=require('../../config/logger')(_0xae42('0x5'));var db=require(_0xae42('0x6'))['db'];var oauth=require(_0xae42('0x7'));config[_0xae42('0x8')]=_['defaults'](config['redis'],{'host':_0xae42('0x9'),'port':0x18eb});var socket=require(_0xae42('0xa'))(new Redis(config[_0xae42('0x8')]));var redis=new Redis(config[_0xae42('0x8')]);function respondWithStatusCode(_0x103fd9,_0x414245){_0x414245=_0x414245||0xcc;return function(_0x27486d){if(_0x27486d){return _0x103fd9[_0xae42('0xb')](_0x414245);}return _0x103fd9[_0xae42('0xc')](_0x414245)['end']();};}function respondWithResult(_0xa5de7a,_0x45fb9f){_0x45fb9f=_0x45fb9f||0xc8;return function(_0x436ef6){if(_0x436ef6){return _0xa5de7a['status'](_0x45fb9f)[_0xae42('0xd')](_0x436ef6);}};}function respondWithFilteredResult(_0x5b9b68,_0x1361e4){return function(_0x5f1960){if(_0x5f1960){var _0x561cba=typeof _0x1361e4[_0xae42('0xe')]===_0xae42('0xf')&&typeof _0x1361e4['limit']===_0xae42('0xf');var _0x5c1b5d=_0x5f1960[_0xae42('0x10')];var _0x4dea42=_0x561cba?0x0:_0x1361e4[_0xae42('0xe')];var _0x5afe25=_0x561cba?_0x5f1960[_0xae42('0x10')]:_0x1361e4[_0xae42('0xe')]+_0x1361e4['limit'];var _0x24bd50;if(_0x5afe25>=_0x5c1b5d){_0x5afe25=_0x5c1b5d;_0x24bd50=0xc8;}else{_0x24bd50=0xce;}_0x5b9b68[_0xae42('0xc')](_0x24bd50);return _0x5b9b68[_0xae42('0x11')](_0xae42('0x12'),_0x4dea42+'-'+_0x5afe25+'/'+_0x5c1b5d)['json'](_0x5f1960);}return null;};}function saveUpdates(_0x3f1d21){return function(_0x3534be){if(_0x3534be){return _0x3534be[_0xae42('0x13')](_0x3f1d21)[_0xae42('0x14')](function(_0x2b025e){return _0x2b025e;});}return null;};}function removeEntity(_0x3c81bb){return function(_0x423607){if(_0x423607){return _0x423607[_0xae42('0x15')]()[_0xae42('0x14')](function(){_0x3c81bb[_0xae42('0xc')](0xcc)[_0xae42('0x16')]();});}};}function handleEntityNotFound(_0x38ccca){return function(_0x3cbc35){if(!_0x3cbc35){_0x38ccca[_0xae42('0xb')](0x194);}return _0x3cbc35;};}function handleError(_0x3d1a10,_0x45993a){_0x45993a=_0x45993a||0x1f4;return function(_0x48ed86){logger[_0xae42('0x17')](_0x48ed86['stack']);if(_0x48ed86[_0xae42('0x18')]){delete _0x48ed86['name'];}_0x3d1a10[_0xae42('0xc')](_0x45993a)[_0xae42('0x19')](_0x48ed86);};}function maskClientSecret(_0x200cac){return _['padEnd'](_0x200cac[_0xae42('0x1a')](0x0,0x3),0x14,'*');}exports['index']=function(_0xd3f05a,_0xbde4b1){var _0x272f4c={},_0x5380e2={},_0x2bf416={'count':0x0,'rows':[]};var _0xb5f5b9=_[_0xae42('0x1b')](db['CloudProvider'][_0xae42('0x1c')],function(_0x2f595f){return{'name':_0x2f595f['fieldName'],'type':_0x2f595f[_0xae42('0x1d')][_0xae42('0x1e')]};});_0x5380e2['model']=_[_0xae42('0x1b')](_0xb5f5b9,_0xae42('0x18'));_0x5380e2[_0xae42('0x1f')]=_[_0xae42('0x20')](_0xd3f05a[_0xae42('0x1f')]);_0x5380e2[_0xae42('0x21')]=_[_0xae42('0x22')](_0x5380e2[_0xae42('0x23')],_0x5380e2[_0xae42('0x1f')]);_0x272f4c[_0xae42('0x24')]=_[_0xae42('0x22')](_0x5380e2[_0xae42('0x23')],qs['fields'](_0xd3f05a[_0xae42('0x1f')]['fields']));_0x272f4c[_0xae42('0x24')]=_0x272f4c[_0xae42('0x24')]['length']?_0x272f4c['attributes']:_0x5380e2[_0xae42('0x23')];if(!_0xd3f05a[_0xae42('0x1f')][_0xae42('0x25')](_0xae42('0x26'))){_0x272f4c[_0xae42('0x27')]=qs[_0xae42('0x27')](_0xd3f05a[_0xae42('0x1f')][_0xae42('0x27')]);_0x272f4c[_0xae42('0xe')]=qs['offset'](_0xd3f05a['query'][_0xae42('0xe')]);}_0x272f4c[_0xae42('0x28')]=qs['sort'](_0xd3f05a['query'][_0xae42('0x29')]);_0x272f4c[_0xae42('0x2a')]=qs['filters'](_[_0xae42('0x2b')](_0xd3f05a['query'],_0x5380e2['filters']),_0xb5f5b9);if(_0xd3f05a[_0xae42('0x1f')][_0xae42('0x2c')]){_0x272f4c[_0xae42('0x2a')]=_['merge'](_0x272f4c[_0xae42('0x2a')],{'$or':_[_0xae42('0x1b')](_0xb5f5b9,function(_0x3fad54){if(_0x3fad54[_0xae42('0x1d')]!=='VIRTUAL'){var _0x5e3077={};_0x5e3077[_0x3fad54[_0xae42('0x18')]]={'$like':'%'+_0xd3f05a[_0xae42('0x1f')][_0xae42('0x2c')]+'%'};return _0x5e3077;}})});}_0x272f4c=_['merge']({},_0x272f4c,_0xd3f05a[_0xae42('0x2d')]);var _0xccc8a={'where':_0x272f4c[_0xae42('0x2a')]};return db[_0xae42('0x2e')]['count'](_0xccc8a)[_0xae42('0x14')](function(_0x204b3b){_0x2bf416[_0xae42('0x10')]=_0x204b3b;if(_0xd3f05a[_0xae42('0x1f')][_0xae42('0x2f')]){_0x272f4c[_0xae42('0x30')]=[{'all':!![]}];}return db[_0xae42('0x2e')][_0xae42('0x31')](_0x272f4c);})[_0xae42('0x14')](function(_0xe76683){_0x2bf416[_0xae42('0x32')]=_[_0xae42('0x1b')](_0xe76683,function(_0x595284){if(_0x595284[_0xae42('0x33')]===_0xae42('0x34')){var _0x21f5ad=encryptor[_0xae42('0x35')](_0x595284['data3']);_0x595284[_0xae42('0x36')]=maskClientSecret(_0x21f5ad);}return _0x595284;});return _0x2bf416;})[_0xae42('0x14')](respondWithFilteredResult(_0xbde4b1,_0x272f4c))[_0xae42('0x37')](handleError(_0xbde4b1,null));};exports[_0xae42('0x38')]=function(_0x441037,_0xea6164){var _0xce3fff={'raw':!![],'where':{'id':_0x441037[_0xae42('0x39')]['id']}},_0x267af9={};_0x267af9['model']=_[_0xae42('0x20')](db['CloudProvider']['rawAttributes']);_0x267af9[_0xae42('0x1f')]=_[_0xae42('0x20')](_0x441037[_0xae42('0x1f')]);_0x267af9[_0xae42('0x21')]=_[_0xae42('0x22')](_0x267af9['model'],_0x267af9[_0xae42('0x1f')]);_0xce3fff[_0xae42('0x24')]=_[_0xae42('0x22')](_0x267af9['model'],qs['fields'](_0x441037[_0xae42('0x1f')][_0xae42('0x3a')]));_0xce3fff[_0xae42('0x24')]=_0xce3fff['attributes'][_0xae42('0x3b')]?_0xce3fff[_0xae42('0x24')]:_0x267af9[_0xae42('0x23')];if(_0x441037['query'][_0xae42('0x2f')]){_0xce3fff[_0xae42('0x30')]=[{'all':!![]}];}_0xce3fff=_[_0xae42('0x3c')]({},_0xce3fff,_0x441037[_0xae42('0x2d')]);return db[_0xae42('0x2e')]['find'](_0xce3fff)[_0xae42('0x14')](handleEntityNotFound(_0xea6164,null))[_0xae42('0x14')](function(_0x7a5941){if(_0x7a5941[_0xae42('0x33')]===_0xae42('0x34')){var _0x7747d3=encryptor[_0xae42('0x35')](_0x7a5941['data3']);_0x7a5941['data3']=maskClientSecret(_0x7747d3);}return _0x7a5941;})[_0xae42('0x14')](respondWithResult(_0xea6164,null))['catch'](handleError(_0xea6164,null));};exports[_0xae42('0x3d')]=function(_0x3fa027,_0x1d0c06){if(!_0x3fa027[_0xae42('0x3e')][_0xae42('0x18')])throw new Error('Name\x20parameter\x20not\x20specified');if(!_0x3fa027['body'][_0xae42('0x33')])throw new Error('Service\x20parameter\x20not\x20specified');var _0x18a221=db[_0xae42('0x2e')]['rawAttributes'][_0xae42('0x33')]['values'];if(!_0x18a221[_0xae42('0x3f')](_0x3fa027[_0xae42('0x3e')]['service']))throw new Error(_0xae42('0x40')+_0x18a221[_0xae42('0x41')](',\x20'));if(_0x3fa027['body']['service']===_0xae42('0x34')&&_0x3fa027[_0xae42('0x3e')]['data3']){_0x3fa027[_0xae42('0x3e')][_0xae42('0x36')]=encryptor['encryptString'](_0x3fa027['body']['data3']);}return db[_0xae42('0x2e')][_0xae42('0x3d')](_0x3fa027[_0xae42('0x3e')],{})[_0xae42('0x14')](respondWithResult(_0x1d0c06,0xc9))[_0xae42('0x37')](handleError(_0x1d0c06,null));};exports[_0xae42('0x13')]=function(_0x8773d4,_0x287c6c){if(_0x8773d4[_0xae42('0x3e')]['id']){delete _0x8773d4['body']['id'];}return db[_0xae42('0x2e')][_0xae42('0x42')]({'where':{'id':_0x8773d4[_0xae42('0x39')]['id']}})[_0xae42('0x14')](handleEntityNotFound(_0x287c6c,null))[_0xae42('0x14')](function(_0x2ed2ba){if(_0x2ed2ba[_0xae42('0x33')]===_0xae42('0x34')&&_0x8773d4['body'][_0xae42('0x36')]){_0x8773d4[_0xae42('0x3e')][_0xae42('0x36')]=encryptor[_0xae42('0x43')](_0x8773d4['body'][_0xae42('0x36')]);}return _0x2ed2ba;})['then'](saveUpdates(_0x8773d4[_0xae42('0x3e')],null))[_0xae42('0x14')](respondWithResult(_0x287c6c,null))[_0xae42('0x37')](handleError(_0x287c6c,null));};exports[_0xae42('0x15')]=function(_0x3ea2c4,_0x5480e1){return db[_0xae42('0x2e')][_0xae42('0x42')]({'where':{'id':_0x3ea2c4[_0xae42('0x39')]['id']}})[_0xae42('0x14')](handleEntityNotFound(_0x5480e1,null))[_0xae42('0x14')](removeEntity(_0x5480e1,null))[_0xae42('0x37')](handleError(_0x5480e1,null));};exports[_0xae42('0x44')]=function(_0x1afeca,_0x477bd1){return db[_0xae42('0x2e')][_0xae42('0x45')]({'where':{'id':_0x1afeca['params']['id']},'raw':!![]})['then'](function(_0x55411e){if(!_0x55411e)return _0x477bd1[_0xae42('0xb')](0x194);return{'url':oauth['generateMicrosoftAuthorizationUrl'](_0x55411e,_0x1afeca[_0xae42('0x46')]['id'])};})[_0xae42('0x14')](respondWithResult(_0x477bd1,null))[_0xae42('0x37')](handleError(_0x477bd1,null));};exports['oauth2MicrosoftCallback']=function(_0x4fee37,_0x444797){var _0x249adb=_0x4fee37[_0xae42('0x3e')];var _0x3ae68e;var _0x2dbfe0;if(_0x249adb[_0xae42('0x17')])throw _0x249adb;redis[_0xae42('0x47')](_0x249adb[_0xae42('0x48')])['then'](function(_0x27a056){if(!_0x27a056)throw new Error(_0xae42('0x49'));_0x3ae68e=JSON['parse'](_0x27a056);var _0xd60e3e=Buffer[_0xae42('0x4a')](_0x249adb['state'],_0xae42('0x4b'))['toString']('ascii');_0x2dbfe0=JSON[_0xae42('0x4c')](_0xd60e3e);if(!oauth[_0xae42('0x4d')](_0x249adb[_0xae42('0x4e')],_0x3ae68e['oauth2Claims']))throw new Error(_0xae42('0x4f'));redis[_0xae42('0x50')](_0x249adb[_0xae42('0x48')]);return oauth[_0xae42('0x51')](_0x249adb['code'],_0x3ae68e);})[_0xae42('0x14')](function(_0x51458c){_0x3ae68e[_0xae42('0x52')]=_0x51458c[_0xae42('0x53')];_0x3ae68e[_0xae42('0x54')]=_0x51458c['refresh_token'];return db[_0xae42('0x2e')][_0xae42('0x13')]({'data5':_0x3ae68e[_0xae42('0x52')],'data6':_0x3ae68e[_0xae42('0x54')]},{'where':{'id':_0x3ae68e['id']}});})[_0xae42('0x14')](function(){oauth[_0xae42('0x55')](_0x3ae68e);socket[_0xae42('0x56')]('microsoftAuthorization:success',{'id':_0x2dbfe0['id']});return;})['then'](respondWithStatusCode(_0x444797,null))[_0xae42('0x37')](function(_0x2973d6){if(_0x2dbfe0){socket[_0xae42('0x56')](_0xae42('0x57'),{'id':_0x2dbfe0['id']});}if(!_0x3ae68e){logger[_0xae42('0x17')]('Invalid\x20authentication\x20state\x20parameter',_0x2973d6);return _0x444797[_0xae42('0xc')](0x1f4)[_0xae42('0x19')](_0x2973d6[_0xae42('0x58')]);}logger[_0xae42('0x17')](_0xae42('0x59'),_0x3ae68e['id'],JSON[_0xae42('0x5a')](_0x2973d6));});};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.model.js b/server/api/cloudProvider/cloudProvider.model.js
index 296b1ac..c21a924 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 _0x158d=['request-promise','path','rimraf','../../config/environment','./cloudProvider.attributes','exports','define','cloud_providers','lodash','util','../../config/logger','moment','bluebird'];(function(_0x3d7a7a,_0x5ad2eb){var _0x422fea=function(_0x5ccf20){while(--_0x5ccf20){_0x3d7a7a['push'](_0x3d7a7a['shift']());}};_0x422fea(++_0x5ad2eb);}(_0x158d,0x1b5));var _0xd158=function(_0x30033a,_0x5ce4a6){_0x30033a=_0x30033a-0x0;var _0x5e3518=_0x158d[_0x30033a];return _0x5e3518;};'use strict';var _=require(_0xd158('0x0'));var util=require(_0xd158('0x1'));var logger=require(_0xd158('0x2'))('api');var moment=require(_0xd158('0x3'));var BPromise=require(_0xd158('0x4'));var rp=require(_0xd158('0x5'));var fs=require('fs');var path=require(_0xd158('0x6'));var rimraf=require(_0xd158('0x7'));var config=require(_0xd158('0x8'));var attributes=require(_0xd158('0x9'));module[_0xd158('0xa')]=function(_0x5dc9bf,_0x62cce8){return _0x5dc9bf[_0xd158('0xb')]('CloudProvider',attributes,{'tableName':_0xd158('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa95e=['CloudProvider','util','api','path','rimraf','exports','define'];(function(_0x28b9f2,_0x48467e){var _0x10222c=function(_0x2a901a){while(--_0x2a901a){_0x28b9f2['push'](_0x28b9f2['shift']());}};_0x10222c(++_0x48467e);}(_0xa95e,0x143));var _0xea95=function(_0x187e4a,_0x1ca401){_0x187e4a=_0x187e4a-0x0;var _0x45a51f=_0xa95e[_0x187e4a];return _0x45a51f;};'use strict';var _=require('lodash');var util=require(_0xea95('0x0'));var logger=require('../../config/logger')(_0xea95('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xea95('0x2'));var rimraf=require(_0xea95('0x3'));var config=require('../../config/environment');var attributes=require('./cloudProvider.attributes');module[_0xea95('0x4')]=function(_0x4dabae,_0x5e15f3){return _0x4dabae[_0xea95('0x5')](_0xea95('0x6'),attributes,{'tableName':'cloud_providers','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 88e6e88..4c09a0e 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 _0x9b13=['resolve','then','data3','CloudProvider','findOne','refresh_token','data4','data5','access_token','data6','update','error','Failed\x20to\x20refresh\x20access\x20token\x20for\x20cloud\x20provider\x20#%s,\x20-\x20err:%s','authorization_code','decryptString','intervals','bind','findAll','map','all','catch','inspect','[CLOUD_PROVIDER]\x20Error\x20while\x20refreshing\x20the\x20tokens\x20after\x20service\x20restart\x20error:%s','lodash','crypto','jsonwebtoken','ioredis','../../components/encryptor','../../config/environment','../../config/logger','api','../../config/schedule/cloud-provider','../../mysqldb','defaults','redis','openid','profile','email','https://outlook.office.com/POP.AccessAsUser.All','https://outlook.office.com/SMTP.Send','offline_access','/authorize','/token','type','Dynamics365','push','data7','/.default','join','replace','{TENANT_ID}','data2','code','from','stringify','base64','toString','hex','client_id','data1','response_type','redirect_uri','response_mode','state','nonce','login','key','value','oauth2Claims','set','payload','iss','issuer','aud','audience','unix'];(function(_0x2ea046,_0x5ab912){var _0x433e5a=function(_0x13202c){while(--_0x13202c){_0x2ea046['push'](_0x2ea046['shift']());}};_0x433e5a(++_0x5ab912);}(_0x9b13,0xfb));var _0x39b1=function(_0x2931b8,_0x1f5b3c){_0x2931b8=_0x2931b8-0x0;var _0xde7fac=_0x9b13[_0x2931b8];return _0xde7fac;};'use strict';var _=require(_0x39b1('0x0'));var crypto=require(_0x39b1('0x1'));var jwt=require(_0x39b1('0x2'));var moment=require('moment');var Redis=require(_0x39b1('0x3'));var rp=require('request-promise');var util=require('util');var encryptor=require(_0x39b1('0x4'));var config=require(_0x39b1('0x5'));var logger=require(_0x39b1('0x6'))(_0x39b1('0x7'));var schedule=require(_0x39b1('0x8'));var db=require(_0x39b1('0x9'))['db'];config['redis']=_[_0x39b1('0xa')](config['redis'],{'host':'localhost','port':0x18eb});var redis=new Redis(config[_0x39b1('0xb')]);var MICROSOFT_AUTH_URL='https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0';var AZURE_AUTH_SCOPES={'Outlook365':[_0x39b1('0xc'),_0x39b1('0xd'),_0x39b1('0xe'),'offline_access','https://outlook.office365.com/IMAP.AccessAsUser.All',_0x39b1('0xf'),_0x39b1('0x10')],'Dynamics365':[_0x39b1('0xc'),_0x39b1('0x11')]};var MICROSOFT_AUTH_ENDPOINT=_0x39b1('0x12');var MICROSOFT_TOKEN_ENDPOINT=_0x39b1('0x13');var OAUTH_REFRESH_INTERVAL=0xfa;function getAuthorizationScopes(_0x2c5886){var _0x39f0bf=_['map'](AZURE_AUTH_SCOPES[_0x2c5886[_0x39b1('0x14')]]);if(_0x2c5886[_0x39b1('0x14')]===_0x39b1('0x15'))_0x39f0bf[_0x39b1('0x16')](_0x2c5886[_0x39b1('0x17')]+_0x39b1('0x18'));return _0x39f0bf[_0x39b1('0x19')]('\x20');}function getAccessTokenScope(_0x35ae5c){if(_0x35ae5c[_0x39b1('0x14')]==='Outlook365')return'https://outlook.office365.com/IMAP.AccessAsUser.All';if(_0x35ae5c['type']==='Dynamics365')return _0x35ae5c[_0x39b1('0x17')]+'/.default';}function generateMicrosoftAuthorizationUrl(_0x1d90e6,_0x12dd6e){var _0x145437=MICROSOFT_AUTH_URL[_0x39b1('0x1a')](_0x39b1('0x1b'),_0x1d90e6[_0x39b1('0x1c')]);var _0x49429f=[_0x39b1('0x1d'),'id_token'];var _0x37f22a=Buffer[_0x39b1('0x1e')](JSON[_0x39b1('0x1f')]({'id':_0x12dd6e}))['toString'](_0x39b1('0x20'));var _0x24607d=crypto['randomBytes'](0x10)[_0x39b1('0x21')](_0x39b1('0x22'));var _0x1ee860=getAuthorizationScopes(_0x1d90e6);var _0x23c9bb=[{'key':_0x39b1('0x23'),'value':_0x1d90e6[_0x39b1('0x24')]},{'key':_0x39b1('0x25'),'value':encodeURIComponent(_0x49429f[_0x39b1('0x19')]('\x20'))},{'key':_0x39b1('0x26'),'value':_0x1d90e6['data4']},{'key':_0x39b1('0x27'),'value':'form_post'},{'key':'scope','value':encodeURIComponent(_0x1ee860)},{'key':_0x39b1('0x28'),'value':_0x37f22a},{'key':_0x39b1('0x29'),'value':_0x24607d},{'key':'prompt','value':_0x39b1('0x2a')}];var _0x25433b=_0x145437+MICROSOFT_AUTH_ENDPOINT+'?'+_['map'](_0x23c9bb,function(_0x2eb983){return _0x2eb983[_0x39b1('0x2b')]+'='+_0x2eb983[_0x39b1('0x2c')];})[_0x39b1('0x19')]('&');_0x1d90e6[_0x39b1('0x2d')]={'issuer':_0x145437[_0x39b1('0x1a')]('oauth2/',''),'audience':_0x1d90e6[_0x39b1('0x24')],'state':_0x37f22a,'nonce':_0x24607d};redis[_0x39b1('0x2e')](_0x37f22a,JSON[_0x39b1('0x1f')](_0x1d90e6));return _0x25433b;}function isValidIdToken(_0x21fbf9,_0x3924d3){try{var _0xb1b4b2=jwt['decode'](_0x21fbf9,{'complete':!![]});var _0x570673=_0xb1b4b2[_0x39b1('0x2f')];if(_0x570673[_0x39b1('0x30')]!==_0x3924d3[_0x39b1('0x31')])return![];if(_0x570673[_0x39b1('0x32')]!==_0x3924d3[_0x39b1('0x33')])return![];if(_0x570673[_0x39b1('0x29')]!==_0x3924d3[_0x39b1('0x29')])return![];if(moment()['isAfter'](moment[_0x39b1('0x34')](_0x570673['exp'])))return![];return!![];}catch(_0x2e64b8){throw _0x2e64b8;}}function refreshOauth2MicrosoftAccessToken(_0x23a800){return Promise[_0x39b1('0x35')]()[_0x39b1('0x36')](function(){if(_0x23a800[_0x39b1('0x37')])return _0x23a800;return db[_0x39b1('0x38')][_0x39b1('0x39')]({'where':{'id':_0x23a800['id']},'raw':!![]});})['then'](function(_0xd5bb24){var _0x239f8b={'grant_type':_0x39b1('0x3a'),'refresh_token':_0xd5bb24['data6'],'scope':getAccessTokenScope(_0xd5bb24),'redirect_uri':_0xd5bb24[_0x39b1('0x3b')],'client_id':_0xd5bb24[_0x39b1('0x24')],'client_secret':encryptor['decryptString'](_0xd5bb24[_0x39b1('0x37')])};var _0x1ea644={'method':'POST','uri':MICROSOFT_AUTH_URL[_0x39b1('0x1a')](_0x39b1('0x1b'),_0xd5bb24['data2'])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x239f8b,'json':!![]};return rp(_0x1ea644);})[_0x39b1('0x36')](function(_0x3126bf){_0x23a800[_0x39b1('0x3c')]=_0x3126bf[_0x39b1('0x3d')];_0x23a800[_0x39b1('0x3e')]=_0x3126bf[_0x39b1('0x3a')];return db['CloudProvider'][_0x39b1('0x3f')]({'data5':_0x23a800[_0x39b1('0x3c')],'data6':_0x23a800[_0x39b1('0x3e')]},{'where':{'id':_0x23a800['id']}});})[_0x39b1('0x36')](function(){return _0x23a800;})['catch'](function(_0x5e15f1){logger[_0x39b1('0x40')](_0x39b1('0x41'),_0x23a800['id'],_0x5e15f1);});}function getOauth2MicrosoftAccessToken(_0x10ca56,_0x49b140){var _0x39732e={'grant_type':_0x39b1('0x42'),'code':_0x10ca56,'scope':getAccessTokenScope(_0x49b140),'redirect_uri':_0x49b140['data4'],'client_id':_0x49b140[_0x39b1('0x24')],'client_secret':encryptor[_0x39b1('0x43')](_0x49b140[_0x39b1('0x37')])};var _0x4a5ca0={'method':'POST','uri':MICROSOFT_AUTH_URL[_0x39b1('0x1a')](_0x39b1('0x1b'),_0x49b140[_0x39b1('0x1c')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x39732e,'json':!![]};return rp(_0x4a5ca0);}function startRefreshInterval(_0x4fcfe1){var _0x2a2618=schedule[_0x39b1('0x44')];if(_0x2a2618[_0x4fcfe1['id']])clearInterval(_0x2a2618[_0x4fcfe1['id']]);_0x2a2618[_0x4fcfe1['id']]=setInterval(refreshOauth2MicrosoftAccessToken[_0x39b1('0x45')](this,{'id':_0x4fcfe1['id']}),OAUTH_REFRESH_INTERVAL*0x3e8);schedule[_0x39b1('0x44')]=_0x2a2618;}function startAllRefreshIntervals(){return db['CloudProvider'][_0x39b1('0x46')]({'where':{'data6':{'$ne':null}},'raw':!![]})[_0x39b1('0x36')](function(_0x248603){var _0xf4d998=_0x248603[_0x39b1('0x47')](function(_0x340e23){return refreshOauth2MicrosoftAccessToken(_0x340e23)[_0x39b1('0x36')](function(_0x4c5c7a){startRefreshInterval(_0x4c5c7a);});});return Promise[_0x39b1('0x48')](_0xf4d998);})[_0x39b1('0x49')](function(_0x7e50d9){var _0x4506c5=_0x7e50d9?util[_0x39b1('0x4a')](_0x7e50d9,{'showHidden':![],'depth':null}):'';logger['error'](_0x39b1('0x4b'),_0x4506c5);});}module['exports']={'generateMicrosoftAuthorizationUrl':generateMicrosoftAuthorizationUrl,'getOauth2MicrosoftAccessToken':getOauth2MicrosoftAccessToken,'isValidIdToken':isValidIdToken,'startAllRefreshIntervals':startAllRefreshIntervals,'refreshOauth2MicrosoftAccessToken':refreshOauth2MicrosoftAccessToken,'startRefreshInterval':startRefreshInterval};
\ No newline at end of file
+var _0x63fc=['client_id','response_type','redirect_uri','form_post','state','prompt','login','map','key','value','oauth2Claims','oauth2/','data1','set','decode','iss','aud','audience','nonce','isAfter','exp','resolve','then','CloudProvider','findOne','data6','data4','decryptString','POST','data5','access_token','refresh_token','catch','error','authorization_code','bind','all','inspect','exports','lodash','crypto','jsonwebtoken','moment','ioredis','request-promise','util','../../components/encryptor','../../config/environment','../../config/logger','../../config/schedule/cloud-provider','../../mysqldb','redis','https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0','email','offline_access','https://outlook.office.com/POP.AccessAsUser.All','https://outlook.office.com/SMTP.Send','openid','/token','type','push','data7','/.default','join','Outlook365','https://outlook.office365.com/IMAP.AccessAsUser.All','replace','{TENANT_ID}','data2','code','id_token','stringify','toString','randomBytes','hex'];(function(_0x177901,_0x4dd8a6){var _0x342e2a=function(_0x576ac0){while(--_0x576ac0){_0x177901['push'](_0x177901['shift']());}};_0x342e2a(++_0x4dd8a6);}(_0x63fc,0x72));var _0xc63f=function(_0x11c573,_0x9e7c6e){_0x11c573=_0x11c573-0x0;var _0x6b72de=_0x63fc[_0x11c573];return _0x6b72de;};'use strict';var _=require(_0xc63f('0x0'));var crypto=require(_0xc63f('0x1'));var jwt=require(_0xc63f('0x2'));var moment=require(_0xc63f('0x3'));var Redis=require(_0xc63f('0x4'));var rp=require(_0xc63f('0x5'));var util=require(_0xc63f('0x6'));var encryptor=require(_0xc63f('0x7'));var config=require(_0xc63f('0x8'));var logger=require(_0xc63f('0x9'))('api');var schedule=require(_0xc63f('0xa'));var db=require(_0xc63f('0xb'))['db'];config[_0xc63f('0xc')]=_['defaults'](config[_0xc63f('0xc')],{'host':'localhost','port':0x18eb});var redis=new Redis(config[_0xc63f('0xc')]);var MICROSOFT_AUTH_URL=_0xc63f('0xd');var AZURE_AUTH_SCOPES={'Outlook365':['openid','profile',_0xc63f('0xe'),_0xc63f('0xf'),'https://outlook.office365.com/IMAP.AccessAsUser.All',_0xc63f('0x10'),_0xc63f('0x11')],'Dynamics365':[_0xc63f('0x12'),_0xc63f('0xf')]};var MICROSOFT_AUTH_ENDPOINT='/authorize';var MICROSOFT_TOKEN_ENDPOINT=_0xc63f('0x13');var OAUTH_REFRESH_INTERVAL=0xfa;function getAuthorizationScopes(_0x4e7463){var _0x4a077c=_['map'](AZURE_AUTH_SCOPES[_0x4e7463['type']]);if(_0x4e7463[_0xc63f('0x14')]==='Dynamics365')_0x4a077c[_0xc63f('0x15')](_0x4e7463[_0xc63f('0x16')]+_0xc63f('0x17'));return _0x4a077c[_0xc63f('0x18')]('\x20');}function getAccessTokenScope(_0x45da17){if(_0x45da17[_0xc63f('0x14')]===_0xc63f('0x19'))return _0xc63f('0x1a');if(_0x45da17[_0xc63f('0x14')]==='Dynamics365')return _0x45da17['data7']+'/.default';}function generateMicrosoftAuthorizationUrl(_0x304845,_0x36a02a){var _0x3a2867=MICROSOFT_AUTH_URL[_0xc63f('0x1b')](_0xc63f('0x1c'),_0x304845[_0xc63f('0x1d')]);var _0x495974=[_0xc63f('0x1e'),_0xc63f('0x1f')];var _0x5cfb6e=Buffer['from'](JSON[_0xc63f('0x20')]({'id':_0x36a02a}))[_0xc63f('0x21')]('base64');var _0x3cf52e=crypto[_0xc63f('0x22')](0x10)[_0xc63f('0x21')](_0xc63f('0x23'));var _0x15eab9=getAuthorizationScopes(_0x304845);var _0x531f08=[{'key':_0xc63f('0x24'),'value':_0x304845['data1']},{'key':_0xc63f('0x25'),'value':encodeURIComponent(_0x495974[_0xc63f('0x18')]('\x20'))},{'key':_0xc63f('0x26'),'value':_0x304845['data4']},{'key':'response_mode','value':_0xc63f('0x27')},{'key':'scope','value':encodeURIComponent(_0x15eab9)},{'key':_0xc63f('0x28'),'value':_0x5cfb6e},{'key':'nonce','value':_0x3cf52e},{'key':_0xc63f('0x29'),'value':_0xc63f('0x2a')}];var _0x393e12=_0x3a2867+MICROSOFT_AUTH_ENDPOINT+'?'+_[_0xc63f('0x2b')](_0x531f08,function(_0x15e3d6){return _0x15e3d6[_0xc63f('0x2c')]+'='+_0x15e3d6[_0xc63f('0x2d')];})[_0xc63f('0x18')]('&');_0x304845[_0xc63f('0x2e')]={'issuer':_0x3a2867['replace'](_0xc63f('0x2f'),''),'audience':_0x304845[_0xc63f('0x30')],'state':_0x5cfb6e,'nonce':_0x3cf52e};redis[_0xc63f('0x31')](_0x5cfb6e,JSON[_0xc63f('0x20')](_0x304845));return _0x393e12;}function isValidIdToken(_0x4cf577,_0x3e4e8a){try{var _0x38b185=jwt[_0xc63f('0x32')](_0x4cf577,{'complete':!![]});var _0x392b28=_0x38b185['payload'];if(_0x392b28[_0xc63f('0x33')]!==_0x3e4e8a['issuer'])return![];if(_0x392b28[_0xc63f('0x34')]!==_0x3e4e8a[_0xc63f('0x35')])return![];if(_0x392b28[_0xc63f('0x36')]!==_0x3e4e8a[_0xc63f('0x36')])return![];if(moment()[_0xc63f('0x37')](moment['unix'](_0x392b28[_0xc63f('0x38')])))return![];return!![];}catch(_0x21df12){throw _0x21df12;}}function refreshOauth2MicrosoftAccessToken(_0x450182){return Promise[_0xc63f('0x39')]()[_0xc63f('0x3a')](function(){if(_0x450182['data3'])return _0x450182;return db[_0xc63f('0x3b')][_0xc63f('0x3c')]({'where':{'id':_0x450182['id']},'raw':!![]});})['then'](function(_0x4ef4d2){var _0x5006a9={'grant_type':'refresh_token','refresh_token':_0x4ef4d2[_0xc63f('0x3d')],'scope':getAccessTokenScope(_0x4ef4d2),'redirect_uri':_0x4ef4d2[_0xc63f('0x3e')],'client_id':_0x4ef4d2[_0xc63f('0x30')],'client_secret':encryptor[_0xc63f('0x3f')](_0x4ef4d2['data3'])};var _0x382422={'method':_0xc63f('0x40'),'uri':MICROSOFT_AUTH_URL[_0xc63f('0x1b')](_0xc63f('0x1c'),_0x4ef4d2['data2'])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x5006a9,'json':!![]};return rp(_0x382422);})[_0xc63f('0x3a')](function(_0x382779){_0x450182[_0xc63f('0x41')]=_0x382779[_0xc63f('0x42')];_0x450182[_0xc63f('0x3d')]=_0x382779[_0xc63f('0x43')];return db['CloudProvider']['update']({'data5':_0x450182[_0xc63f('0x41')],'data6':_0x450182['data6']},{'where':{'id':_0x450182['id']}});})[_0xc63f('0x3a')](function(){return _0x450182;})[_0xc63f('0x44')](function(_0xd609c2){logger[_0xc63f('0x45')]('Failed\x20to\x20refresh\x20access\x20token\x20for\x20cloud\x20provider\x20#%s,\x20-\x20err:%s',_0x450182['id'],_0xd609c2);});}function getOauth2MicrosoftAccessToken(_0x38d1ab,_0x7aebcc){var _0x5233f9={'grant_type':_0xc63f('0x46'),'code':_0x38d1ab,'scope':getAccessTokenScope(_0x7aebcc),'redirect_uri':_0x7aebcc[_0xc63f('0x3e')],'client_id':_0x7aebcc['data1'],'client_secret':encryptor[_0xc63f('0x3f')](_0x7aebcc['data3'])};var _0x455c5f={'method':'POST','uri':MICROSOFT_AUTH_URL[_0xc63f('0x1b')]('{TENANT_ID}',_0x7aebcc[_0xc63f('0x1d')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x5233f9,'json':!![]};return rp(_0x455c5f);}function startRefreshInterval(_0x140ffc){var _0x3178e7=schedule['intervals'];if(_0x3178e7[_0x140ffc['id']])clearInterval(_0x3178e7[_0x140ffc['id']]);_0x3178e7[_0x140ffc['id']]=setInterval(refreshOauth2MicrosoftAccessToken[_0xc63f('0x47')](this,{'id':_0x140ffc['id']}),OAUTH_REFRESH_INTERVAL*0x3e8);schedule['intervals']=_0x3178e7;}function startAllRefreshIntervals(){return db[_0xc63f('0x3b')]['findAll']({'where':{'data6':{'$ne':null}},'raw':!![]})[_0xc63f('0x3a')](function(_0x3635e2){var _0x412904=_0x3635e2[_0xc63f('0x2b')](function(_0x5a2e42){return refreshOauth2MicrosoftAccessToken(_0x5a2e42)['then'](function(_0xb28f95){startRefreshInterval(_0xb28f95);});});return Promise[_0xc63f('0x48')](_0x412904);})['catch'](function(_0x138156){var _0x138f02=_0x138156?util[_0xc63f('0x49')](_0x138156,{'showHidden':![],'depth':null}):'';logger[_0xc63f('0x45')]('[CLOUD_PROVIDER]\x20Error\x20while\x20refreshing\x20the\x20tokens\x20after\x20service\x20restart\x20error:%s',_0x138f02);});}module[_0xc63f('0x4a')]={'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 a0ba40f..d922240 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 _0xda2d=['bluebird','randomstring','ioredis','rpc','../../config/environment','jayson/promise','client','http','then','CloudProvider,\x20%s,\x20%s','request\x20sent','debug','CloudProvider,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','util','moment'];(function(_0x3f55de,_0x3ae98f){var _0x2698de=function(_0x48f021){while(--_0x48f021){_0x3f55de['push'](_0x3f55de['shift']());}};_0x2698de(++_0x3ae98f);}(_0xda2d,0x102));var _0xdda2=function(_0x261360,_0x30a73b){_0x261360=_0x261360-0x0;var _0x862dd5=_0xda2d[_0x261360];return _0x862dd5;};'use strict';var _=require('lodash');var util=require(_0xdda2('0x0'));var moment=require(_0xdda2('0x1'));var BPromise=require(_0xdda2('0x2'));var rs=require(_0xdda2('0x3'));var fs=require('fs');var Redis=require(_0xdda2('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xdda2('0x5'));var config=require(_0xdda2('0x6'));var jayson=require(_0xdda2('0x7'));var client=jayson[_0xdda2('0x8')][_0xdda2('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xf38e58,_0x2f55dc,_0x436676){return new BPromise(function(_0x2e2523,_0x341c7b){return client['request'](_0xf38e58,_0x436676)[_0xdda2('0xa')](function(_0x22c6e5){logger['info'](_0xdda2('0xb'),_0x2f55dc,_0xdda2('0xc'));logger[_0xdda2('0xd')](_0xdda2('0xe'),_0x2f55dc,_0xdda2('0xc'),JSON[_0xdda2('0xf')](_0x22c6e5));if(_0x22c6e5[_0xdda2('0x10')]){if(_0x22c6e5[_0xdda2('0x10')]['code']===0x1f4){logger['error']('CloudProvider,\x20%s,\x20%s',_0x2f55dc,_0x22c6e5[_0xdda2('0x10')][_0xdda2('0x11')]);return _0x341c7b(_0x22c6e5[_0xdda2('0x10')][_0xdda2('0x11')]);}logger[_0xdda2('0x10')](_0xdda2('0xb'),_0x2f55dc,_0x22c6e5[_0xdda2('0x10')]['message']);return _0x2e2523(_0x22c6e5[_0xdda2('0x10')]['message']);}else{logger[_0xdda2('0x12')](_0xdda2('0xb'),_0x2f55dc,_0xdda2('0xc'));_0x2e2523(_0x22c6e5[_0xdda2('0x13')][_0xdda2('0x11')]);}})['catch'](function(_0x55d674){logger[_0xdda2('0x10')]('CloudProvider,\x20%s,\x20%s',_0x2f55dc,_0x55d674);_0x341c7b(_0x55d674);});});}
\ No newline at end of file
+var _0xc3b7=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request','then','info','CloudProvider,\x20%s,\x20%s','request\x20sent','debug','CloudProvider,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','util','moment','bluebird','randomstring'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xc3b7,0xb4));var _0x7c3b=function(_0x503267,_0x1c1366){_0x503267=_0x503267-0x0;var _0x526bdd=_0xc3b7[_0x503267];return _0x526bdd;};'use strict';var _=require('lodash');var util=require(_0x7c3b('0x0'));var moment=require(_0x7c3b('0x1'));var BPromise=require(_0x7c3b('0x2'));var rs=require(_0x7c3b('0x3'));var fs=require('fs');var Redis=require(_0x7c3b('0x4'));var db=require(_0x7c3b('0x5'))['db'];var utils=require(_0x7c3b('0x6'));var logger=require(_0x7c3b('0x7'))(_0x7c3b('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x7c3b('0x9')][_0x7c3b('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x208213,_0x1bc2d8,_0x47d9a7){return new BPromise(function(_0x218be1,_0x1e03c0){return client[_0x7c3b('0xb')](_0x208213,_0x47d9a7)[_0x7c3b('0xc')](function(_0x1ddba3){logger[_0x7c3b('0xd')](_0x7c3b('0xe'),_0x1bc2d8,_0x7c3b('0xf'));logger[_0x7c3b('0x10')](_0x7c3b('0x11'),_0x1bc2d8,_0x7c3b('0xf'),JSON[_0x7c3b('0x12')](_0x1ddba3));if(_0x1ddba3[_0x7c3b('0x13')]){if(_0x1ddba3[_0x7c3b('0x13')]['code']===0x1f4){logger[_0x7c3b('0x13')](_0x7c3b('0xe'),_0x1bc2d8,_0x1ddba3['error'][_0x7c3b('0x14')]);return _0x1e03c0(_0x1ddba3[_0x7c3b('0x13')][_0x7c3b('0x14')]);}logger['error'](_0x7c3b('0xe'),_0x1bc2d8,_0x1ddba3[_0x7c3b('0x13')][_0x7c3b('0x14')]);return _0x218be1(_0x1ddba3[_0x7c3b('0x13')]['message']);}else{logger[_0x7c3b('0xd')](_0x7c3b('0xe'),_0x1bc2d8,'request\x20sent');_0x218be1(_0x1ddba3[_0x7c3b('0x15')][_0x7c3b('0x14')]);}})[_0x7c3b('0x16')](function(_0xd3991c){logger[_0x7c3b('0x13')](_0x7c3b('0xe'),_0x1bc2d8,_0xd3991c);_0x1e03c0(_0xd3991c);});});}
\ No newline at end of file
diff --git a/server/api/cloudProvider/index.js b/server/api/cloudProvider/index.js
index c957ec0..b88195c 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(_0x45eb4e,_0x109c0f){var _0x19b25e=function(_0x421359){while(--_0x421359){_0x45eb4e['push'](_0x45eb4e['shift']());}};_0x19b25e(++_0x109c0f);}(_0x2ef3,0xba));var _0x32ef=function(_0xca11d9,_0x3e208b){_0xca11d9=_0xca11d9-0x0;var _0x1e6cd9=_0x2ef3[_0xca11d9];return _0x1e6cd9;};'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 _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(_0x1b3f1c,_0x1ba632){var _0x3040d6=function(_0x4d60ef){while(--_0x4d60ef){_0x1b3f1c['push'](_0x1b3f1c['shift']());}};_0x3040d6(++_0x1ba632);}(_0x2ef3,0xba));var _0x32ef=function(_0x4e8e73,_0x12df51){_0x4e8e73=_0x4e8e73-0x0;var _0x4f8345=_0x2ef3[_0x4e8e73];return _0x4f8345;};'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
diff --git a/server/api/cmCompany/cmCompany.attributes.js b/server/api/cmCompany/cmCompany.attributes.js
index a089b16..47e3fd6 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 _0x3e68=['STRING','sequelize','name'];(function(_0x4fb789,_0x6b8092){var _0x49b5e4=function(_0x256537){while(--_0x256537){_0x4fb789['push'](_0x4fb789['shift']());}};_0x49b5e4(++_0x6b8092);}(_0x3e68,0x190));var _0x83e6=function(_0x29e07f,_0x3d5a07){_0x29e07f=_0x29e07f-0x0;var _0x425287=_0x3e68[_0x29e07f];return _0x425287;};'use strict';var Sequelize=require(_0x83e6('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'unique':_0x83e6('0x1'),'allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize['STRING']},'companyId':{'type':Sequelize[_0x83e6('0x2')]},'website':{'type':Sequelize[_0x83e6('0x2')]},'phone':{'type':Sequelize[_0x83e6('0x2')]},'fax':{'type':Sequelize[_0x83e6('0x2')]},'type':{'type':Sequelize[_0x83e6('0x2')]},'street':{'type':Sequelize[_0x83e6('0x2')]},'postalCode':{'type':Sequelize['STRING']},'city':{'type':Sequelize[_0x83e6('0x2')]},'country':{'type':Sequelize[_0x83e6('0x2')]},'email':{'type':Sequelize[_0x83e6('0x2')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize[_0x83e6('0x2')]},'sStreet':{'type':Sequelize[_0x83e6('0x2')]},'sPostalCode':{'type':Sequelize[_0x83e6('0x2')]},'sCity':{'type':Sequelize['STRING']},'sCountry':{'type':Sequelize[_0x83e6('0x2')]},'description':{'type':Sequelize[_0x83e6('0x2')]}};
\ No newline at end of file
+var _0x8905=['name','sequelize','STRING'];(function(_0x589d3e,_0x3095d4){var _0x1bc3cf=function(_0x4f6f01){while(--_0x4f6f01){_0x589d3e['push'](_0x589d3e['shift']());}};_0x1bc3cf(++_0x3095d4);}(_0x8905,0x9d));var _0x5890=function(_0x3da752,_0x235444){_0x3da752=_0x3da752-0x0;var _0x21dfd6=_0x8905[_0x3da752];return _0x21dfd6;};'use strict';var Sequelize=require(_0x5890('0x0'));module['exports']={'name':{'type':Sequelize[_0x5890('0x1')],'unique':_0x5890('0x2'),'allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize[_0x5890('0x1')]},'companyId':{'type':Sequelize[_0x5890('0x1')]},'website':{'type':Sequelize[_0x5890('0x1')]},'phone':{'type':Sequelize[_0x5890('0x1')]},'fax':{'type':Sequelize[_0x5890('0x1')]},'type':{'type':Sequelize[_0x5890('0x1')]},'street':{'type':Sequelize[_0x5890('0x1')]},'postalCode':{'type':Sequelize[_0x5890('0x1')]},'city':{'type':Sequelize[_0x5890('0x1')]},'country':{'type':Sequelize[_0x5890('0x1')]},'email':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize[_0x5890('0x1')]},'sStreet':{'type':Sequelize['STRING']},'sPostalCode':{'type':Sequelize[_0x5890('0x1')]},'sCity':{'type':Sequelize[_0x5890('0x1')]},'sCountry':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x5890('0x1')]}};
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.controller.js b/server/api/cmCompany/cmCompany.controller.js
index c42e5d7..ab869f2 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 _0xc8d1=['length','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addContacts','CmContact','ids','getContacts','hasOwnProperty','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','limit','undefined','count','set','Content-Range','json','apply','reject','save','update','then','destroy','get','Companies','UserProfileResource','error','name','send','index','model','keys','query','filters','intersection','attributes','fields','order','sort','where','pick','filter','merge','map','options','CmCompany','includeAll','findAll','rows','catch','show','params','rawAttributes'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0xc8d1,0x1be));var _0x1c8d=function(_0xd58823,_0x15c483){_0xd58823=_0xd58823-0x0;var _0x249c0a=_0xc8d1[_0xd58823];return _0x249c0a;};'use strict';var emlformat=require(_0x1c8d('0x0'));var rimraf=require(_0x1c8d('0x1'));var zipdir=require(_0x1c8d('0x2'));var jsonpatch=require(_0x1c8d('0x3'));var rp=require('request-promise');var moment=require(_0x1c8d('0x4'));var BPromise=require(_0x1c8d('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x1c8d('0x6'));var sox=require(_0x1c8d('0x7'));var csv=require(_0x1c8d('0x8'));var ejs=require(_0x1c8d('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x1c8d('0xa'));var squel=require(_0x1c8d('0xb'));var crypto=require(_0x1c8d('0xc'));var jsforce=require(_0x1c8d('0xd'));var deskjs=require(_0x1c8d('0xe'));var toCsv=require(_0x1c8d('0x8'));var querystring=require(_0x1c8d('0xf'));var Papa=require(_0x1c8d('0x10'));var Redis=require(_0x1c8d('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x1c8d('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x1c8d('0x13'));var logger=require(_0x1c8d('0x14'))('api');var utils=require(_0x1c8d('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x1c8d('0x16'));var db=require(_0x1c8d('0x17'))['db'];function respondWithStatusCode(_0x2d1896,_0x590ed9){_0x590ed9=_0x590ed9||0xcc;return function(_0x2e969f){if(_0x2e969f){return _0x2d1896[_0x1c8d('0x18')](_0x590ed9);}return _0x2d1896[_0x1c8d('0x19')](_0x590ed9)[_0x1c8d('0x1a')]();};}function respondWithResult(_0x2bd2e6,_0x18ff39){_0x18ff39=_0x18ff39||0xc8;return function(_0x39d3d2){if(_0x39d3d2){return _0x2bd2e6[_0x1c8d('0x19')](_0x18ff39)['json'](_0x39d3d2);}};}function respondWithFilteredResult(_0x57cea5,_0x26ba30){return function(_0x191a18){if(_0x191a18){var _0x22fb9e=typeof _0x26ba30[_0x1c8d('0x1b')]==='undefined'&&typeof _0x26ba30[_0x1c8d('0x1c')]===_0x1c8d('0x1d');var _0x2af311=_0x191a18[_0x1c8d('0x1e')];var _0x4ba9cc=_0x22fb9e?0x0:_0x26ba30[_0x1c8d('0x1b')];var _0x414f04=_0x22fb9e?_0x191a18[_0x1c8d('0x1e')]:_0x26ba30[_0x1c8d('0x1b')]+_0x26ba30[_0x1c8d('0x1c')];var _0x236b6a;if(_0x414f04>=_0x2af311){_0x414f04=_0x2af311;_0x236b6a=0xc8;}else{_0x236b6a=0xce;}_0x57cea5[_0x1c8d('0x19')](_0x236b6a);return _0x57cea5[_0x1c8d('0x1f')](_0x1c8d('0x20'),_0x4ba9cc+'-'+_0x414f04+'/'+_0x2af311)[_0x1c8d('0x21')](_0x191a18);}return null;};}function patchUpdates(_0xd4d598){return function(_0x1c27f2){try{jsonpatch[_0x1c8d('0x22')](_0x1c27f2,_0xd4d598,!![]);}catch(_0xf0ba27){return BPromise[_0x1c8d('0x23')](_0xf0ba27);}return _0x1c27f2[_0x1c8d('0x24')]();};}function saveUpdates(_0x139473,_0x57d0a6){return function(_0x2b25c9){if(_0x2b25c9){return _0x2b25c9[_0x1c8d('0x25')](_0x139473)[_0x1c8d('0x26')](function(_0x4d49ac){return _0x4d49ac;});}return null;};}function removeEntity(_0x1b270e,_0x4df04c){return function(_0xd20043){if(_0xd20043){return _0xd20043[_0x1c8d('0x27')]()[_0x1c8d('0x26')](function(){var _0x4b654e=_0xd20043[_0x1c8d('0x28')]({'plain':!![]});var _0x34a441=_0x1c8d('0x29');return db[_0x1c8d('0x2a')][_0x1c8d('0x27')]({'where':{'type':_0x34a441,'resourceId':_0x4b654e['id']}})[_0x1c8d('0x26')](function(){return _0xd20043;});})[_0x1c8d('0x26')](function(){_0x1b270e[_0x1c8d('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x55a492,_0x36d7e4){return function(_0x4c3f0c){if(!_0x4c3f0c){_0x55a492[_0x1c8d('0x18')](0x194);}return _0x4c3f0c;};}function handleError(_0x5e6cdc,_0x16b165){_0x16b165=_0x16b165||0x1f4;return function(_0x302e3c){logger[_0x1c8d('0x2b')](_0x302e3c['stack']);if(_0x302e3c[_0x1c8d('0x2c')]){delete _0x302e3c[_0x1c8d('0x2c')];}_0x5e6cdc[_0x1c8d('0x19')](_0x16b165)[_0x1c8d('0x2d')](_0x302e3c);};}exports[_0x1c8d('0x2e')]=function(_0x40500d,_0x15c4cf){var _0x3ae8f6={},_0x5cdcf4={},_0xcf3f32={'count':0x0,'rows':[]};return db['CmCompany']['describe']()[_0x1c8d('0x26')](function(_0x4a196c){_0x5cdcf4[_0x1c8d('0x2f')]=_[_0x1c8d('0x30')](_0x4a196c);_0x5cdcf4['query']=_['keys'](_0x40500d[_0x1c8d('0x31')]);_0x5cdcf4[_0x1c8d('0x32')]=_[_0x1c8d('0x33')](_0x5cdcf4[_0x1c8d('0x2f')],_0x5cdcf4[_0x1c8d('0x31')]);_0x3ae8f6[_0x1c8d('0x34')]=_['intersection'](_0x5cdcf4[_0x1c8d('0x2f')],qs[_0x1c8d('0x35')](_0x40500d[_0x1c8d('0x31')][_0x1c8d('0x35')]));_0x3ae8f6[_0x1c8d('0x34')]=_0x3ae8f6[_0x1c8d('0x34')]['length']?_0x3ae8f6[_0x1c8d('0x34')]:_0x5cdcf4[_0x1c8d('0x2f')];if(!_0x40500d[_0x1c8d('0x31')]['hasOwnProperty']('nolimit')){_0x3ae8f6[_0x1c8d('0x1c')]=qs[_0x1c8d('0x1c')](_0x40500d[_0x1c8d('0x31')][_0x1c8d('0x1c')]);_0x3ae8f6[_0x1c8d('0x1b')]=qs[_0x1c8d('0x1b')](_0x40500d[_0x1c8d('0x31')][_0x1c8d('0x1b')]);}_0x3ae8f6[_0x1c8d('0x36')]=qs['sort'](_0x40500d[_0x1c8d('0x31')][_0x1c8d('0x37')]);_0x3ae8f6[_0x1c8d('0x38')]=qs[_0x1c8d('0x32')](_[_0x1c8d('0x39')](_0x40500d[_0x1c8d('0x31')],_0x5cdcf4[_0x1c8d('0x32')]),_0x4a196c);if(_0x40500d['query'][_0x1c8d('0x3a')]){_0x3ae8f6[_0x1c8d('0x38')]=_[_0x1c8d('0x3b')](_0x3ae8f6[_0x1c8d('0x38')],{'$or':_[_0x1c8d('0x3c')](_0x3ae8f6[_0x1c8d('0x34')],function(_0x38432b){var _0x369bfd={};_0x369bfd[_0x38432b]={'$like':'%'+_0x40500d[_0x1c8d('0x31')][_0x1c8d('0x3a')]+'%'};return _0x369bfd;})});}_0x3ae8f6=_[_0x1c8d('0x3b')]({},_0x3ae8f6,_0x40500d[_0x1c8d('0x3d')]);var _0x5e8583={'where':_0x3ae8f6[_0x1c8d('0x38')]};return db[_0x1c8d('0x3e')]['count'](_0x5e8583)['then'](function(_0x36a2b5){_0xcf3f32[_0x1c8d('0x1e')]=_0x36a2b5;if(_0x40500d['query'][_0x1c8d('0x3f')]){_0x3ae8f6['include']=[{'all':!![]}];}return db[_0x1c8d('0x3e')][_0x1c8d('0x40')](_0x3ae8f6);})[_0x1c8d('0x26')](function(_0x1bf109){_0xcf3f32[_0x1c8d('0x41')]=_0x1bf109;return _0xcf3f32;})[_0x1c8d('0x26')](respondWithFilteredResult(_0x15c4cf,_0x3ae8f6))[_0x1c8d('0x42')](handleError(_0x15c4cf,null));})['catch'](handleError(_0x15c4cf,null));};exports[_0x1c8d('0x43')]=function(_0x2883da,_0x43b57e){var _0x60a647={'raw':![],'where':{'id':_0x2883da[_0x1c8d('0x44')]['id']}},_0x5d9ab1={};_0x5d9ab1[_0x1c8d('0x2f')]=_['keys'](db[_0x1c8d('0x3e')][_0x1c8d('0x45')]);_0x5d9ab1[_0x1c8d('0x31')]=_[_0x1c8d('0x30')](_0x2883da[_0x1c8d('0x31')]);_0x5d9ab1['filters']=_[_0x1c8d('0x33')](_0x5d9ab1['model'],_0x5d9ab1[_0x1c8d('0x31')]);_0x60a647[_0x1c8d('0x34')]=_[_0x1c8d('0x33')](_0x5d9ab1[_0x1c8d('0x2f')],qs['fields'](_0x2883da[_0x1c8d('0x31')]['fields']));_0x60a647[_0x1c8d('0x34')]=_0x60a647[_0x1c8d('0x34')][_0x1c8d('0x46')]?_0x60a647[_0x1c8d('0x34')]:_0x5d9ab1[_0x1c8d('0x2f')];if(_0x2883da[_0x1c8d('0x31')]['includeAll']){_0x60a647['include']=[{'all':!![]}];}_0x60a647=_['merge']({},_0x60a647,_0x2883da[_0x1c8d('0x3d')]);return db[_0x1c8d('0x3e')][_0x1c8d('0x47')](_0x60a647)[_0x1c8d('0x26')](handleEntityNotFound(_0x43b57e,null))[_0x1c8d('0x26')](respondWithResult(_0x43b57e,null))[_0x1c8d('0x42')](handleError(_0x43b57e,null));};exports[_0x1c8d('0x48')]=function(_0x297bb2,_0x448edf){return db['CmCompany'][_0x1c8d('0x48')](_0x297bb2[_0x1c8d('0x49')],{})[_0x1c8d('0x26')](function(_0x40d232){var _0x4b39c0=_0x297bb2['user'][_0x1c8d('0x28')]({'plain':!![]});if(!_0x4b39c0)throw new Error(_0x1c8d('0x4a'));if(_0x4b39c0[_0x1c8d('0x4b')]===_0x1c8d('0x4c')){var _0x532f96=_0x40d232['get']({'plain':!![]});var _0xc682ca=_0x1c8d('0x29');return db[_0x1c8d('0x4d')][_0x1c8d('0x47')]({'where':{'name':_0xc682ca,'userProfileId':_0x4b39c0['userProfileId']},'raw':!![]})[_0x1c8d('0x26')](function(_0x2b36db){if(_0x2b36db&&_0x2b36db[_0x1c8d('0x4e')]===0x0){return db[_0x1c8d('0x2a')]['create']({'name':_0x532f96['name'],'resourceId':_0x532f96['id'],'type':_0x2b36db[_0x1c8d('0x2c')],'sectionId':_0x2b36db['id']},{})['then'](function(){return _0x40d232;});}else{return _0x40d232;}})[_0x1c8d('0x42')](function(_0x4fd872){logger[_0x1c8d('0x2b')](_0x1c8d('0x4f'),_0x4fd872);throw _0x4fd872;});}return _0x40d232;})[_0x1c8d('0x26')](respondWithResult(_0x448edf,0xc9))[_0x1c8d('0x42')](handleError(_0x448edf,null));};exports[_0x1c8d('0x25')]=function(_0x559d56,_0x2bbb24){if(_0x559d56['body']['id']){delete _0x559d56[_0x1c8d('0x49')]['id'];}return db[_0x1c8d('0x3e')][_0x1c8d('0x47')]({'where':{'id':_0x559d56[_0x1c8d('0x44')]['id']}})[_0x1c8d('0x26')](handleEntityNotFound(_0x2bbb24,null))[_0x1c8d('0x26')](saveUpdates(_0x559d56['body'],null))['then'](respondWithResult(_0x2bbb24,null))[_0x1c8d('0x42')](handleError(_0x2bbb24,null));};exports['destroy']=function(_0x2fea6c,_0x3879bc){return db[_0x1c8d('0x3e')][_0x1c8d('0x47')]({'where':{'id':_0x2fea6c[_0x1c8d('0x44')]['id']}})[_0x1c8d('0x26')](handleEntityNotFound(_0x3879bc,null))['then'](removeEntity(_0x3879bc,null))[_0x1c8d('0x42')](handleError(_0x3879bc,null));};exports[_0x1c8d('0x50')]=function(_0xca8034,_0x1a36a6){return db[_0x1c8d('0x3e')][_0x1c8d('0x50')]()[_0x1c8d('0x26')](respondWithResult(_0x1a36a6,null))['catch'](handleError(_0x1a36a6,null));};exports[_0x1c8d('0x51')]=function(_0x41576c,_0x4f983c,_0x2d3eb9){return db[_0x1c8d('0x52')][_0x1c8d('0x47')]({'where':{'id':_0x41576c[_0x1c8d('0x44')]['id']}})['then'](handleEntityNotFound(_0x4f983c,null))['then'](function(_0x23f007){if(_0x23f007){return _0x23f007[_0x1c8d('0x51')](_0x41576c[_0x1c8d('0x49')][_0x1c8d('0x53')],_['omit'](_0x41576c[_0x1c8d('0x49')],[_0x1c8d('0x53'),'id'])||{});}})['then'](respondWithResult(_0x4f983c,null))[_0x1c8d('0x42')](handleError(_0x4f983c,null));};exports[_0x1c8d('0x54')]=function(_0x20d8e7,_0x5db5a8,_0x28a951){var _0x4c540b={};var _0x2a5903={};var _0x4903fc;var _0x23239a;return db[_0x1c8d('0x3e')]['findOne']({'where':{'id':_0x20d8e7[_0x1c8d('0x44')]['id']}})[_0x1c8d('0x26')](handleEntityNotFound(_0x5db5a8,null))[_0x1c8d('0x26')](function(_0x133f91){if(_0x133f91){_0x4903fc=_0x133f91;_0x2a5903[_0x1c8d('0x2f')]=_[_0x1c8d('0x30')](db[_0x1c8d('0x52')][_0x1c8d('0x45')]);_0x2a5903[_0x1c8d('0x31')]=_[_0x1c8d('0x30')](_0x20d8e7[_0x1c8d('0x31')]);_0x2a5903[_0x1c8d('0x32')]=_[_0x1c8d('0x33')](_0x2a5903[_0x1c8d('0x2f')],_0x2a5903[_0x1c8d('0x31')]);_0x4c540b[_0x1c8d('0x34')]=_[_0x1c8d('0x33')](_0x2a5903[_0x1c8d('0x2f')],qs['fields'](_0x20d8e7[_0x1c8d('0x31')]['fields']));_0x4c540b[_0x1c8d('0x34')]=_0x4c540b['attributes']['length']?_0x4c540b[_0x1c8d('0x34')]:_0x2a5903[_0x1c8d('0x2f')];_0x4c540b[_0x1c8d('0x36')]=qs[_0x1c8d('0x37')](_0x20d8e7[_0x1c8d('0x31')][_0x1c8d('0x37')]);_0x4c540b['where']=qs[_0x1c8d('0x32')](_[_0x1c8d('0x39')](_0x20d8e7['query'],_0x2a5903['filters']));if(_0x20d8e7['query']['filter']){_0x4c540b['where']=_['merge'](_0x4c540b[_0x1c8d('0x38')],{'$or':_[_0x1c8d('0x3c')](_0x4c540b[_0x1c8d('0x34')],function(_0x46c3a8){var _0x217348={};_0x217348[_0x46c3a8]={'$like':'%'+_0x20d8e7[_0x1c8d('0x31')][_0x1c8d('0x3a')]+'%'};return _0x217348;})});}_0x4c540b=_[_0x1c8d('0x3b')]({},_0x4c540b,_0x20d8e7[_0x1c8d('0x3d')]);return _0x4903fc[_0x1c8d('0x54')](_0x4c540b);}})[_0x1c8d('0x26')](function(_0x3ef960){if(_0x3ef960){_0x23239a=_0x3ef960[_0x1c8d('0x46')];if(!_0x20d8e7[_0x1c8d('0x31')][_0x1c8d('0x55')]('nolimit')){_0x4c540b[_0x1c8d('0x1c')]=qs['limit'](_0x20d8e7[_0x1c8d('0x31')][_0x1c8d('0x1c')]);_0x4c540b[_0x1c8d('0x1b')]=qs[_0x1c8d('0x1b')](_0x20d8e7[_0x1c8d('0x31')]['offset']);}return _0x4903fc[_0x1c8d('0x54')](_0x4c540b);}})[_0x1c8d('0x26')](function(_0x54bed2){if(_0x54bed2){return _0x54bed2?{'count':_0x23239a,'rows':_0x54bed2}:null;}})[_0x1c8d('0x26')](respondWithResult(_0x5db5a8,null))[_0x1c8d('0x42')](handleError(_0x5db5a8,null));};
\ No newline at end of file
+var _0xcac2=['destroy','get','Companies','end','sendStatus','error','name','send','index','CmCompany','model','keys','filters','intersection','fields','query','attributes','hasOwnProperty','nolimit','sort','where','filter','merge','map','options','includeAll','rows','catch','show','rawAttributes','include','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','params','describe','addContacts','CmContact','ids','omit','getContacts','length','order','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','status','offset','undefined','count','limit','set','json','apply','reject','save','update','then'];(function(_0xfee3d0,_0x3d6992){var _0x351785=function(_0x485a79){while(--_0x485a79){_0xfee3d0['push'](_0xfee3d0['shift']());}};_0x351785(++_0x3d6992);}(_0xcac2,0xda));var _0x2cac=function(_0x42a68f,_0x19b0be){_0x42a68f=_0x42a68f-0x0;var _0x54ffff=_0xcac2[_0x42a68f];return _0x54ffff;};'use strict';var emlformat=require(_0x2cac('0x0'));var rimraf=require(_0x2cac('0x1'));var zipdir=require(_0x2cac('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x2cac('0x3'));var moment=require(_0x2cac('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x2cac('0x5'));var util=require(_0x2cac('0x6'));var path=require(_0x2cac('0x7'));var sox=require(_0x2cac('0x8'));var csv=require(_0x2cac('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x2cac('0xa'));var crypto=require('crypto');var jsforce=require(_0x2cac('0xb'));var deskjs=require(_0x2cac('0xc'));var toCsv=require('to-csv');var querystring=require(_0x2cac('0xd'));var Papa=require(_0x2cac('0xe'));var Redis=require(_0x2cac('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x2cac('0x10'));var as=require(_0x2cac('0x11'));var hardwareService=require(_0x2cac('0x12'));var logger=require(_0x2cac('0x13'))(_0x2cac('0x14'));var utils=require('../../config/utils');var config=require(_0x2cac('0x15'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1c5516,_0x37cf4c){_0x37cf4c=_0x37cf4c||0xcc;return function(_0x23ed2a){if(_0x23ed2a){return _0x1c5516['sendStatus'](_0x37cf4c);}return _0x1c5516['status'](_0x37cf4c)['end']();};}function respondWithResult(_0x1f58be,_0x4dc71d){_0x4dc71d=_0x4dc71d||0xc8;return function(_0x58b0cc){if(_0x58b0cc){return _0x1f58be[_0x2cac('0x16')](_0x4dc71d)['json'](_0x58b0cc);}};}function respondWithFilteredResult(_0x2f2890,_0xa942d8){return function(_0x486738){if(_0x486738){var _0x1e435b=typeof _0xa942d8[_0x2cac('0x17')]===_0x2cac('0x18')&&typeof _0xa942d8['limit']===_0x2cac('0x18');var _0x18d4d5=_0x486738[_0x2cac('0x19')];var _0x3965ef=_0x1e435b?0x0:_0xa942d8[_0x2cac('0x17')];var _0x51b2a6=_0x1e435b?_0x486738[_0x2cac('0x19')]:_0xa942d8['offset']+_0xa942d8[_0x2cac('0x1a')];var _0x418265;if(_0x51b2a6>=_0x18d4d5){_0x51b2a6=_0x18d4d5;_0x418265=0xc8;}else{_0x418265=0xce;}_0x2f2890['status'](_0x418265);return _0x2f2890[_0x2cac('0x1b')]('Content-Range',_0x3965ef+'-'+_0x51b2a6+'/'+_0x18d4d5)[_0x2cac('0x1c')](_0x486738);}return null;};}function patchUpdates(_0x2d5f17){return function(_0x5b6086){try{jsonpatch[_0x2cac('0x1d')](_0x5b6086,_0x2d5f17,!![]);}catch(_0x8021fc){return BPromise[_0x2cac('0x1e')](_0x8021fc);}return _0x5b6086[_0x2cac('0x1f')]();};}function saveUpdates(_0x4f3c30,_0x25a05e){return function(_0x28c8ea){if(_0x28c8ea){return _0x28c8ea[_0x2cac('0x20')](_0x4f3c30)[_0x2cac('0x21')](function(_0x260432){return _0x260432;});}return null;};}function removeEntity(_0x5400ce,_0x1d945){return function(_0x2529d9){if(_0x2529d9){return _0x2529d9[_0x2cac('0x22')]()[_0x2cac('0x21')](function(){var _0x8ffc2d=_0x2529d9[_0x2cac('0x23')]({'plain':!![]});var _0x1451cf=_0x2cac('0x24');return db['UserProfileResource'][_0x2cac('0x22')]({'where':{'type':_0x1451cf,'resourceId':_0x8ffc2d['id']}})[_0x2cac('0x21')](function(){return _0x2529d9;});})[_0x2cac('0x21')](function(){_0x5400ce[_0x2cac('0x16')](0xcc)[_0x2cac('0x25')]();});}};}function handleEntityNotFound(_0x4f8389,_0x51d3d6){return function(_0x55b1fc){if(!_0x55b1fc){_0x4f8389[_0x2cac('0x26')](0x194);}return _0x55b1fc;};}function handleError(_0x1e00f6,_0x57e537){_0x57e537=_0x57e537||0x1f4;return function(_0x413c4c){logger[_0x2cac('0x27')](_0x413c4c['stack']);if(_0x413c4c['name']){delete _0x413c4c[_0x2cac('0x28')];}_0x1e00f6[_0x2cac('0x16')](_0x57e537)[_0x2cac('0x29')](_0x413c4c);};}exports[_0x2cac('0x2a')]=function(_0x185871,_0x2b5dbd){var _0xdd852d={},_0x514403={},_0xc92146={'count':0x0,'rows':[]};return db[_0x2cac('0x2b')]['describe']()[_0x2cac('0x21')](function(_0x1b378a){_0x514403[_0x2cac('0x2c')]=_[_0x2cac('0x2d')](_0x1b378a);_0x514403['query']=_[_0x2cac('0x2d')](_0x185871['query']);_0x514403[_0x2cac('0x2e')]=_['intersection'](_0x514403[_0x2cac('0x2c')],_0x514403['query']);_0xdd852d['attributes']=_[_0x2cac('0x2f')](_0x514403['model'],qs[_0x2cac('0x30')](_0x185871[_0x2cac('0x31')][_0x2cac('0x30')]));_0xdd852d[_0x2cac('0x32')]=_0xdd852d[_0x2cac('0x32')]['length']?_0xdd852d[_0x2cac('0x32')]:_0x514403[_0x2cac('0x2c')];if(!_0x185871['query'][_0x2cac('0x33')](_0x2cac('0x34'))){_0xdd852d[_0x2cac('0x1a')]=qs['limit'](_0x185871['query'][_0x2cac('0x1a')]);_0xdd852d[_0x2cac('0x17')]=qs[_0x2cac('0x17')](_0x185871[_0x2cac('0x31')]['offset']);}_0xdd852d['order']=qs[_0x2cac('0x35')](_0x185871[_0x2cac('0x31')]['sort']);_0xdd852d[_0x2cac('0x36')]=qs['filters'](_['pick'](_0x185871[_0x2cac('0x31')],_0x514403[_0x2cac('0x2e')]),_0x1b378a);if(_0x185871[_0x2cac('0x31')][_0x2cac('0x37')]){_0xdd852d['where']=_[_0x2cac('0x38')](_0xdd852d['where'],{'$or':_[_0x2cac('0x39')](_0xdd852d[_0x2cac('0x32')],function(_0x3e4443){var _0x1934d6={};_0x1934d6[_0x3e4443]={'$like':'%'+_0x185871[_0x2cac('0x31')][_0x2cac('0x37')]+'%'};return _0x1934d6;})});}_0xdd852d=_[_0x2cac('0x38')]({},_0xdd852d,_0x185871[_0x2cac('0x3a')]);var _0x3a213e={'where':_0xdd852d[_0x2cac('0x36')]};return db[_0x2cac('0x2b')][_0x2cac('0x19')](_0x3a213e)[_0x2cac('0x21')](function(_0x27f7e1){_0xc92146[_0x2cac('0x19')]=_0x27f7e1;if(_0x185871[_0x2cac('0x31')][_0x2cac('0x3b')]){_0xdd852d['include']=[{'all':!![]}];}return db[_0x2cac('0x2b')]['findAll'](_0xdd852d);})['then'](function(_0x434d28){_0xc92146[_0x2cac('0x3c')]=_0x434d28;return _0xc92146;})['then'](respondWithFilteredResult(_0x2b5dbd,_0xdd852d))['catch'](handleError(_0x2b5dbd,null));})[_0x2cac('0x3d')](handleError(_0x2b5dbd,null));};exports[_0x2cac('0x3e')]=function(_0x42e301,_0x44b77d){var _0xf00962={'raw':![],'where':{'id':_0x42e301['params']['id']}},_0x5f2bf9={};_0x5f2bf9['model']=_['keys'](db[_0x2cac('0x2b')][_0x2cac('0x3f')]);_0x5f2bf9['query']=_[_0x2cac('0x2d')](_0x42e301[_0x2cac('0x31')]);_0x5f2bf9[_0x2cac('0x2e')]=_[_0x2cac('0x2f')](_0x5f2bf9[_0x2cac('0x2c')],_0x5f2bf9[_0x2cac('0x31')]);_0xf00962[_0x2cac('0x32')]=_[_0x2cac('0x2f')](_0x5f2bf9[_0x2cac('0x2c')],qs[_0x2cac('0x30')](_0x42e301[_0x2cac('0x31')][_0x2cac('0x30')]));_0xf00962['attributes']=_0xf00962[_0x2cac('0x32')]['length']?_0xf00962[_0x2cac('0x32')]:_0x5f2bf9[_0x2cac('0x2c')];if(_0x42e301[_0x2cac('0x31')][_0x2cac('0x3b')]){_0xf00962[_0x2cac('0x40')]=[{'all':!![]}];}_0xf00962=_[_0x2cac('0x38')]({},_0xf00962,_0x42e301[_0x2cac('0x3a')]);return db[_0x2cac('0x2b')][_0x2cac('0x41')](_0xf00962)[_0x2cac('0x21')](handleEntityNotFound(_0x44b77d,null))[_0x2cac('0x21')](respondWithResult(_0x44b77d,null))[_0x2cac('0x3d')](handleError(_0x44b77d,null));};exports[_0x2cac('0x42')]=function(_0x3134dd,_0x4c76a0){return db['CmCompany'][_0x2cac('0x42')](_0x3134dd[_0x2cac('0x43')],{})[_0x2cac('0x21')](function(_0x52020b){var _0x2e87a8=_0x3134dd[_0x2cac('0x44')][_0x2cac('0x23')]({'plain':!![]});if(!_0x2e87a8)throw new Error(_0x2cac('0x45'));if(_0x2e87a8[_0x2cac('0x46')]===_0x2cac('0x44')){var _0x4497e8=_0x52020b['get']({'plain':!![]});var _0x413a89=_0x2cac('0x24');return db[_0x2cac('0x47')][_0x2cac('0x41')]({'where':{'name':_0x413a89,'userProfileId':_0x2e87a8[_0x2cac('0x48')]},'raw':!![]})[_0x2cac('0x21')](function(_0x23618e){if(_0x23618e&&_0x23618e[_0x2cac('0x49')]===0x0){return db[_0x2cac('0x4a')][_0x2cac('0x42')]({'name':_0x4497e8[_0x2cac('0x28')],'resourceId':_0x4497e8['id'],'type':_0x23618e[_0x2cac('0x28')],'sectionId':_0x23618e['id']},{})[_0x2cac('0x21')](function(){return _0x52020b;});}else{return _0x52020b;}})['catch'](function(_0x22e3aa){logger[_0x2cac('0x27')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x22e3aa);throw _0x22e3aa;});}return _0x52020b;})[_0x2cac('0x21')](respondWithResult(_0x4c76a0,0xc9))[_0x2cac('0x3d')](handleError(_0x4c76a0,null));};exports['update']=function(_0x32ae57,_0x23ad61){if(_0x32ae57[_0x2cac('0x43')]['id']){delete _0x32ae57[_0x2cac('0x43')]['id'];}return db[_0x2cac('0x2b')]['find']({'where':{'id':_0x32ae57[_0x2cac('0x4b')]['id']}})['then'](handleEntityNotFound(_0x23ad61,null))[_0x2cac('0x21')](saveUpdates(_0x32ae57['body'],null))[_0x2cac('0x21')](respondWithResult(_0x23ad61,null))[_0x2cac('0x3d')](handleError(_0x23ad61,null));};exports[_0x2cac('0x22')]=function(_0x77ec4c,_0x3a1b3c){return db[_0x2cac('0x2b')][_0x2cac('0x41')]({'where':{'id':_0x77ec4c[_0x2cac('0x4b')]['id']}})[_0x2cac('0x21')](handleEntityNotFound(_0x3a1b3c,null))['then'](removeEntity(_0x3a1b3c,null))[_0x2cac('0x3d')](handleError(_0x3a1b3c,null));};exports[_0x2cac('0x4c')]=function(_0x43b5cb,_0x25a0e9){return db[_0x2cac('0x2b')]['describe']()['then'](respondWithResult(_0x25a0e9,null))[_0x2cac('0x3d')](handleError(_0x25a0e9,null));};exports[_0x2cac('0x4d')]=function(_0x9cf56d,_0x83b977,_0x3b1b0f){return db[_0x2cac('0x4e')][_0x2cac('0x41')]({'where':{'id':_0x9cf56d[_0x2cac('0x4b')]['id']}})['then'](handleEntityNotFound(_0x83b977,null))[_0x2cac('0x21')](function(_0x2017f7){if(_0x2017f7){return _0x2017f7[_0x2cac('0x4d')](_0x9cf56d['body'][_0x2cac('0x4f')],_[_0x2cac('0x50')](_0x9cf56d[_0x2cac('0x43')],[_0x2cac('0x4f'),'id'])||{});}})[_0x2cac('0x21')](respondWithResult(_0x83b977,null))[_0x2cac('0x3d')](handleError(_0x83b977,null));};exports[_0x2cac('0x51')]=function(_0x375e4d,_0x473228,_0x3160c5){var _0x4aec53={};var _0x424ac9={};var _0x257bda;var _0x295d3a;return db[_0x2cac('0x2b')]['findOne']({'where':{'id':_0x375e4d[_0x2cac('0x4b')]['id']}})[_0x2cac('0x21')](handleEntityNotFound(_0x473228,null))[_0x2cac('0x21')](function(_0x5eed81){if(_0x5eed81){_0x257bda=_0x5eed81;_0x424ac9[_0x2cac('0x2c')]=_[_0x2cac('0x2d')](db[_0x2cac('0x4e')][_0x2cac('0x3f')]);_0x424ac9['query']=_[_0x2cac('0x2d')](_0x375e4d[_0x2cac('0x31')]);_0x424ac9['filters']=_[_0x2cac('0x2f')](_0x424ac9[_0x2cac('0x2c')],_0x424ac9['query']);_0x4aec53['attributes']=_['intersection'](_0x424ac9[_0x2cac('0x2c')],qs[_0x2cac('0x30')](_0x375e4d['query'][_0x2cac('0x30')]));_0x4aec53[_0x2cac('0x32')]=_0x4aec53[_0x2cac('0x32')][_0x2cac('0x52')]?_0x4aec53[_0x2cac('0x32')]:_0x424ac9[_0x2cac('0x2c')];_0x4aec53[_0x2cac('0x53')]=qs[_0x2cac('0x35')](_0x375e4d[_0x2cac('0x31')][_0x2cac('0x35')]);_0x4aec53['where']=qs['filters'](_['pick'](_0x375e4d[_0x2cac('0x31')],_0x424ac9[_0x2cac('0x2e')]));if(_0x375e4d['query'][_0x2cac('0x37')]){_0x4aec53[_0x2cac('0x36')]=_['merge'](_0x4aec53[_0x2cac('0x36')],{'$or':_[_0x2cac('0x39')](_0x4aec53[_0x2cac('0x32')],function(_0x55c771){var _0x188920={};_0x188920[_0x55c771]={'$like':'%'+_0x375e4d['query'][_0x2cac('0x37')]+'%'};return _0x188920;})});}_0x4aec53=_['merge']({},_0x4aec53,_0x375e4d[_0x2cac('0x3a')]);return _0x257bda[_0x2cac('0x51')](_0x4aec53);}})['then'](function(_0x184439){if(_0x184439){_0x295d3a=_0x184439['length'];if(!_0x375e4d['query'][_0x2cac('0x33')](_0x2cac('0x34'))){_0x4aec53[_0x2cac('0x1a')]=qs[_0x2cac('0x1a')](_0x375e4d['query'][_0x2cac('0x1a')]);_0x4aec53[_0x2cac('0x17')]=qs[_0x2cac('0x17')](_0x375e4d[_0x2cac('0x31')][_0x2cac('0x17')]);}return _0x257bda[_0x2cac('0x51')](_0x4aec53);}})[_0x2cac('0x21')](function(_0x306743){if(_0x306743){return _0x306743?{'count':_0x295d3a,'rows':_0x306743}:null;}})['then'](respondWithResult(_0x473228,null))[_0x2cac('0x3d')](handleError(_0x473228,null));};
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.model.js b/server/api/cmCompany/cmCompany.model.js
index 5a1ec55..826769b 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 _0xb8a3=['path','rimraf','../../config/environment','./cmCompany.attributes','define','CmCompany','cm_companies','lodash','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x5de532,_0x2941c4){var _0x4e9192=function(_0x548a81){while(--_0x548a81){_0x5de532['push'](_0x5de532['shift']());}};_0x4e9192(++_0x2941c4);}(_0xb8a3,0x125));var _0x3b8a=function(_0x876501,_0x2edd2d){_0x876501=_0x876501-0x0;var _0x1b9799=_0xb8a3[_0x876501];return _0x1b9799;};'use strict';var _=require(_0x3b8a('0x0'));var util=require('util');var logger=require(_0x3b8a('0x1'))(_0x3b8a('0x2'));var moment=require(_0x3b8a('0x3'));var BPromise=require(_0x3b8a('0x4'));var rp=require(_0x3b8a('0x5'));var fs=require('fs');var path=require(_0x3b8a('0x6'));var rimraf=require(_0x3b8a('0x7'));var config=require(_0x3b8a('0x8'));var attributes=require(_0x3b8a('0x9'));module['exports']=function(_0x13bbbe,_0xb1a42d){return _0x13bbbe[_0x3b8a('0xa')](_0x3b8a('0xb'),attributes,{'tableName':_0x3b8a('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x3be4=['exports','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./cmCompany.attributes'];(function(_0x302294,_0x218c81){var _0xe3eae4=function(_0x41780f){while(--_0x41780f){_0x302294['push'](_0x302294['shift']());}};_0xe3eae4(++_0x218c81);}(_0x3be4,0x1ae));var _0x43be=function(_0x342afb,_0x68c265){_0x342afb=_0x342afb-0x0;var _0x446112=_0x3be4[_0x342afb];return _0x446112;};'use strict';var _=require(_0x43be('0x0'));var util=require(_0x43be('0x1'));var logger=require(_0x43be('0x2'))(_0x43be('0x3'));var moment=require(_0x43be('0x4'));var BPromise=require(_0x43be('0x5'));var rp=require(_0x43be('0x6'));var fs=require('fs');var path=require(_0x43be('0x7'));var rimraf=require(_0x43be('0x8'));var config=require('../../config/environment');var attributes=require(_0x43be('0x9'));module[_0x43be('0xa')]=function(_0xf5865f,_0x132117){return _0xf5865f['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 a71cc8d..3ba4b83 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 _0x48a0=['jayson/promise','http','then','info','CmCompany,\x20%s,\x20%s','request\x20sent','CmCompany,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/environment'];(function(_0xbcd76,_0x1c1d1d){var _0x5d1109=function(_0x29102f){while(--_0x29102f){_0xbcd76['push'](_0xbcd76['shift']());}};_0x5d1109(++_0x1c1d1d);}(_0x48a0,0x189));var _0x048a=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x48a0[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x048a('0x0'));var util=require(_0x048a('0x1'));var moment=require(_0x048a('0x2'));var BPromise=require(_0x048a('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x048a('0x4'));var db=require(_0x048a('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x048a('0x6'));var jayson=require(_0x048a('0x7'));var client=jayson['client'][_0x048a('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x9759a4,_0x4938bc,_0x1952c4){return new BPromise(function(_0x3cad03,_0x35dc17){return client['request'](_0x9759a4,_0x1952c4)[_0x048a('0x9')](function(_0x89b13e){logger[_0x048a('0xa')](_0x048a('0xb'),_0x4938bc,_0x048a('0xc'));logger['debug'](_0x048a('0xd'),_0x4938bc,'request\x20sent',JSON[_0x048a('0xe')](_0x89b13e));if(_0x89b13e[_0x048a('0xf')]){if(_0x89b13e[_0x048a('0xf')][_0x048a('0x10')]===0x1f4){logger[_0x048a('0xf')]('CmCompany,\x20%s,\x20%s',_0x4938bc,_0x89b13e[_0x048a('0xf')]['message']);return _0x35dc17(_0x89b13e[_0x048a('0xf')][_0x048a('0x11')]);}logger[_0x048a('0xf')](_0x048a('0xb'),_0x4938bc,_0x89b13e['error'][_0x048a('0x11')]);return _0x3cad03(_0x89b13e['error'][_0x048a('0x11')]);}else{logger[_0x048a('0xa')](_0x048a('0xb'),_0x4938bc,_0x048a('0xc'));_0x3cad03(_0x89b13e[_0x048a('0x12')]['message']);}})[_0x048a('0x13')](function(_0x4a6963){logger[_0x048a('0xf')]('CmCompany,\x20%s,\x20%s',_0x4938bc,_0x4a6963);_0x35dc17(_0x4a6963);});});}
\ No newline at end of file
+var _0xc51e=['info','CmCompany,\x20%s,\x20%s','request\x20sent','debug','CmCompany,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then'];(function(_0x3421b1,_0xc7dc68){var _0x1d7bbb=function(_0x5b1249){while(--_0x5b1249){_0x3421b1['push'](_0x3421b1['shift']());}};_0x1d7bbb(++_0xc7dc68);}(_0xc51e,0x1ea));var _0xec51=function(_0x56ec52,_0x35e3c3){_0x56ec52=_0x56ec52-0x0;var _0x324eb2=_0xc51e[_0x56ec52];return _0x324eb2;};'use strict';var _=require(_0xec51('0x0'));var util=require(_0xec51('0x1'));var moment=require(_0xec51('0x2'));var BPromise=require(_0xec51('0x3'));var rs=require(_0xec51('0x4'));var fs=require('fs');var Redis=require(_0xec51('0x5'));var db=require(_0xec51('0x6'))['db'];var utils=require(_0xec51('0x7'));var logger=require(_0xec51('0x8'))('rpc');var config=require(_0xec51('0x9'));var jayson=require(_0xec51('0xa'));var client=jayson[_0xec51('0xb')][_0xec51('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x20a88b,_0x47048c,_0x50fbe0){return new BPromise(function(_0x4d7b92,_0x53c51b){return client['request'](_0x20a88b,_0x50fbe0)[_0xec51('0xd')](function(_0x28f63e){logger[_0xec51('0xe')](_0xec51('0xf'),_0x47048c,_0xec51('0x10'));logger[_0xec51('0x11')](_0xec51('0x12'),_0x47048c,_0xec51('0x10'),JSON[_0xec51('0x13')](_0x28f63e));if(_0x28f63e[_0xec51('0x14')]){if(_0x28f63e[_0xec51('0x14')]['code']===0x1f4){logger['error'](_0xec51('0xf'),_0x47048c,_0x28f63e[_0xec51('0x14')][_0xec51('0x15')]);return _0x53c51b(_0x28f63e[_0xec51('0x14')][_0xec51('0x15')]);}logger[_0xec51('0x14')](_0xec51('0xf'),_0x47048c,_0x28f63e[_0xec51('0x14')]['message']);return _0x4d7b92(_0x28f63e['error'][_0xec51('0x15')]);}else{logger['info']('CmCompany,\x20%s,\x20%s',_0x47048c,_0xec51('0x10'));_0x4d7b92(_0x28f63e[_0xec51('0x16')][_0xec51('0x15')]);}})[_0xec51('0x17')](function(_0x3e576d){logger[_0xec51('0x14')]('CmCompany,\x20%s,\x20%s',_0x47048c,_0x3e576d);_0x53c51b(_0x3e576d);});});}
\ No newline at end of file
diff --git a/server/api/cmCompany/index.js b/server/api/cmCompany/index.js
index 7dbcdf4..5832e57 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 _0xa4a4=['../../components/auth/service','../../components/interaction/service','../../config/environment','./cmCompany.controller','get','isAuthenticated','describe','/:id','show','/:id/contacts','post','create','put','update','delete','destroy','exports','multer','util','connect-timeout','express','Router'];(function(_0x20d152,_0x28c92f){var _0x5e9682=function(_0x1b4dd3){while(--_0x1b4dd3){_0x20d152['push'](_0x20d152['shift']());}};_0x5e9682(++_0x28c92f);}(_0xa4a4,0x1b3));var _0x4a4a=function(_0xeb26d1,_0x301de1){_0xeb26d1=_0xeb26d1-0x0;var _0x4a4e2e=_0xa4a4[_0xeb26d1];return _0x4a4e2e;};'use strict';var multer=require(_0x4a4a('0x0'));var util=require(_0x4a4a('0x1'));var path=require('path');var timeout=require(_0x4a4a('0x2'));var express=require(_0x4a4a('0x3'));var router=express[_0x4a4a('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x4a4a('0x5'));var interaction=require(_0x4a4a('0x6'));var config=require(_0x4a4a('0x7'));var controller=require(_0x4a4a('0x8'));router[_0x4a4a('0x9')]('/',auth[_0x4a4a('0xa')](),controller['index']);router[_0x4a4a('0x9')]('/describe',auth[_0x4a4a('0xa')](),controller[_0x4a4a('0xb')]);router[_0x4a4a('0x9')](_0x4a4a('0xc'),auth[_0x4a4a('0xa')](),controller[_0x4a4a('0xd')]);router['get'](_0x4a4a('0xe'),auth['isAuthenticated'](),controller['getContacts']);router[_0x4a4a('0xf')]('/',auth[_0x4a4a('0xa')](),controller[_0x4a4a('0x10')]);router[_0x4a4a('0xf')](_0x4a4a('0xe'),auth[_0x4a4a('0xa')](),controller['addContacts']);router[_0x4a4a('0x11')]('/:id',auth['isAuthenticated'](),controller[_0x4a4a('0x12')]);router[_0x4a4a('0x13')](_0x4a4a('0xc'),auth[_0x4a4a('0xa')](),controller[_0x4a4a('0x14')]);module[_0x4a4a('0x15')]=router;
\ No newline at end of file
+var _0x0f3d=['post','addContacts','put','update','delete','destroy','exports','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/contacts','getContacts'];(function(_0x2d7f0e,_0x3e6fbd){var _0x110b07=function(_0x557b00){while(--_0x557b00){_0x2d7f0e['push'](_0x2d7f0e['shift']());}};_0x110b07(++_0x3e6fbd);}(_0x0f3d,0x160));var _0xd0f3=function(_0x294070,_0xec72c9){_0x294070=_0x294070-0x0;var _0x484bda=_0x0f3d[_0x294070];return _0x484bda;};'use strict';var multer=require('multer');var util=require(_0xd0f3('0x0'));var path=require(_0xd0f3('0x1'));var timeout=require(_0xd0f3('0x2'));var express=require('express');var router=express[_0xd0f3('0x3')]();var fs_extra=require(_0xd0f3('0x4'));var auth=require(_0xd0f3('0x5'));var interaction=require(_0xd0f3('0x6'));var config=require('../../config/environment');var controller=require('./cmCompany.controller');router[_0xd0f3('0x7')]('/',auth[_0xd0f3('0x8')](),controller[_0xd0f3('0x9')]);router['get'](_0xd0f3('0xa'),auth[_0xd0f3('0x8')](),controller[_0xd0f3('0xb')]);router[_0xd0f3('0x7')](_0xd0f3('0xc'),auth[_0xd0f3('0x8')](),controller[_0xd0f3('0xd')]);router[_0xd0f3('0x7')](_0xd0f3('0xe'),auth[_0xd0f3('0x8')](),controller[_0xd0f3('0xf')]);router[_0xd0f3('0x10')]('/',auth[_0xd0f3('0x8')](),controller['create']);router[_0xd0f3('0x10')](_0xd0f3('0xe'),auth['isAuthenticated'](),controller[_0xd0f3('0x11')]);router[_0xd0f3('0x12')](_0xd0f3('0xc'),auth[_0xd0f3('0x8')](),controller[_0xd0f3('0x13')]);router[_0xd0f3('0x14')](_0xd0f3('0xc'),auth[_0xd0f3('0x8')](),controller[_0xd0f3('0x15')]);module[_0xd0f3('0x16')]=router;
\ No newline at end of file
diff --git a/server/api/cmContact/cmContact.attributes.js b/server/api/cmContact/cmContact.attributes.js
index ef5083e..0d9a97c 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 _0xc413=['INTEGER','DATE','NOW','sequelize','exports','STRING','TEXT'];(function(_0x25f277,_0x225b1d){var _0x5f4384=function(_0x1dbc08){while(--_0x1dbc08){_0x25f277['push'](_0x25f277['shift']());}};_0x5f4384(++_0x225b1d);}(_0xc413,0xe3));var _0x3c41=function(_0x56482c,_0x16118d){_0x56482c=_0x56482c-0x0;var _0x5aae7a=_0xc413[_0x56482c];return _0x5aae7a;};'use strict';var _=require('lodash');var Sequelize=require(_0x3c41('0x0'));module[_0x3c41('0x1')]={'firstName':{'type':Sequelize[_0x3c41('0x2')],'allowNull':![]},'lastName':{'type':Sequelize[_0x3c41('0x2')]},'street':{'type':Sequelize['STRING']},'postalCode':{'type':Sequelize[_0x3c41('0x2')]},'city':{'type':Sequelize[_0x3c41('0x2')]},'country':{'type':Sequelize['STRING']},'dateOfBirth':{'type':Sequelize[_0x3c41('0x2')]},'description':{'type':Sequelize[_0x3c41('0x3')]},'phone':{'type':Sequelize[_0x3c41('0x2')]},'mobile':{'type':Sequelize[_0x3c41('0x2')]},'fax':{'type':Sequelize[_0x3c41('0x2')]},'email':{'type':Sequelize[_0x3c41('0x2')]},'url':{'type':Sequelize['STRING']},'facebook':{'type':Sequelize[_0x3c41('0x2')]},'fb_data':{'type':Sequelize['STRING']},'twitter':{'type':Sequelize[_0x3c41('0x2')]},'skype':{'type':Sequelize[_0x3c41('0x2')]},'teams':{'type':Sequelize[_0x3c41('0x2')]},'viber':{'type':Sequelize[_0x3c41('0x2')]},'line':{'type':Sequelize[_0x3c41('0x2')]},'wechat':{'type':Sequelize[_0x3c41('0x2')]},'telegram':{'type':Sequelize['STRING']},'UserId':{'type':Sequelize['INTEGER']},'AdditionalPhones':{'type':Sequelize[_0x3c41('0x2')]},'priority':{'type':Sequelize[_0x3c41('0x4')](0x2)['UNSIGNED'],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0x3c41('0x5')],'defaultValue':Sequelize[_0x3c41('0x6')]},'dialTimezone':{'type':Sequelize[_0x3c41('0x2')]},'utcOffset':{'type':Sequelize[_0x3c41('0x4')]}};
\ No newline at end of file
+var _0xe469=['NOW','lodash','exports','STRING','INTEGER','DATE'];(function(_0x2892da,_0x191a40){var _0x28cff2=function(_0x57023d){while(--_0x57023d){_0x2892da['push'](_0x2892da['shift']());}};_0x28cff2(++_0x191a40);}(_0xe469,0x1b1));var _0x9e46=function(_0xa36c4d,_0x12d21c){_0xa36c4d=_0xa36c4d-0x0;var _0x405afc=_0xe469[_0xa36c4d];return _0x405afc;};'use strict';var _=require(_0x9e46('0x0'));var Sequelize=require('sequelize');module[_0x9e46('0x1')]={'firstName':{'type':Sequelize[_0x9e46('0x2')],'allowNull':![]},'lastName':{'type':Sequelize['STRING']},'street':{'type':Sequelize[_0x9e46('0x2')]},'postalCode':{'type':Sequelize['STRING']},'city':{'type':Sequelize[_0x9e46('0x2')]},'country':{'type':Sequelize['STRING']},'dateOfBirth':{'type':Sequelize[_0x9e46('0x2')]},'description':{'type':Sequelize['TEXT']},'phone':{'type':Sequelize['STRING']},'mobile':{'type':Sequelize[_0x9e46('0x2')]},'fax':{'type':Sequelize[_0x9e46('0x2')]},'email':{'type':Sequelize[_0x9e46('0x2')]},'url':{'type':Sequelize[_0x9e46('0x2')]},'facebook':{'type':Sequelize[_0x9e46('0x2')]},'fb_data':{'type':Sequelize[_0x9e46('0x2')]},'twitter':{'type':Sequelize[_0x9e46('0x2')]},'skype':{'type':Sequelize[_0x9e46('0x2')]},'teams':{'type':Sequelize['STRING']},'viber':{'type':Sequelize[_0x9e46('0x2')]},'line':{'type':Sequelize[_0x9e46('0x2')]},'wechat':{'type':Sequelize[_0x9e46('0x2')]},'telegram':{'type':Sequelize[_0x9e46('0x2')]},'UserId':{'type':Sequelize['INTEGER']},'AdditionalPhones':{'type':Sequelize[_0x9e46('0x2')]},'priority':{'type':Sequelize[_0x9e46('0x3')](0x2)['UNSIGNED'],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0x9e46('0x4')],'defaultValue':Sequelize[_0x9e46('0x5')]},'dialTimezone':{'type':Sequelize['STRING']},'utcOffset':{'type':Sequelize[_0x9e46('0x3')]}};
\ No newline at end of file
diff --git a/server/api/cmContact/cmContact.controller.js b/server/api/cmContact/cmContact.controller.js
index fcd2fc7..d4ecbae 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 _0xa9e0=['source','destination','endtime','duration','note','createdAt','userDisposition','userSecondDisposition','userThirdDisposition','UserId','fullname','alias','DESC','findAndCountAll','startCase','Website','Account','closedAt','disposition','secondDisposition','thirdDisposition','Owner','browserName','customerIp','osName','ratingType','subject','substatus','externalUrl','threadId','Interaction','flatten','reverse','value','slice','moment','bluebird','util','squel','ioredis','../../components/contacts','../../components/parsers/qs','../../config/logger','api','../../config/environment/shared','../../mysqldb','redis','localhost','./cmContact.socket','register','status','offset','undefined','limit','count','Content-Range','then','destroy','end','sendStatus','stack','name','describe','getOptions','findAll','query','user','catch','CmContact','find','params','tags','keys','startsWith','cf_','displayName','analytics','CmCustomField','length','columnName','custom','type','values','forEach','hasOwnProperty','body','from','get','isArray','join','info','[CmContact][merge]\x20to\x20%s\x20from\x20%s','CmHopper','[CmContact][merge][destroy][CmHopper],\x20%s','CmHopperBlack','[CmContact][merge][destroy][CmHopperBlack],\x20%s','create','ChatInteraction','update','ChatMessage','ChatOfflineMessage','MailInteraction','MailMessage','SmsInteraction','SmsMessage','FaxInteraction','FaxMessage','OpenchannelInteraction','OpenchannelMessage','CmContactHasItem','CmHopperFinal','ReportAgentPreview','VoiceCallReport','ChatQueueReport','MailQueueReport','OpenchannelQueueReport','SmsQueueReport','WhatsappInteraction','WhatsappMessage','WhatsappQueueReport','dialTimezone','isNil','timezones','utcOffset','additionalPhones','bulkCreate','duplicates','where','$or','push','ListId','findOrCreate','spread','all','show','Tag','color','tag','Phones','ContactItemType','ItemType','literal','Phones.OrderBy','$and','map','format','omit','cf_%d','isEmpty','cm_contacts','id\x20=\x20?','toParam','text','phone','getTags','model','rawAttributes','filters','intersection','attributes','fields','order','sort','pick','filter','merge','nolimit','setTags','findOne','ids','setAdditionalPhones','OrderBy','items','item_types','ItemTypeId','description','contact\x20phone\x20exists','CmHopperAdditionalPhone','item','sequelize','`ItemType`.OrderBy','CmHopperId','ItemType.OrderBy','getAdditionalPhones','PHONE','duplicateAdditionalPhones','CmContactId','toContactId','rescheduleAdditionalPhones','ContactId','options','includeAll','include','getHopperHistories','CmHopperHistory','rows','getJscriptySessions','JscriptySessionReport','uploadCsv','No\x20ListId\x20specified','binding_keys','No\x20association\x20keys\x20specified!','binding_values','No\x20association\x20values\x20specified!','socket_timestamp','Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed','split','Incorrect\x20binding\x20parameters\x20passed!','zipObject','No\x20phone\x20column\x20specified','firstName','No\x20firstName\x20column\x20specified','root','file','chmodSync','0777','child_process','fork','../../components/import/cm/csv','CompanyId','json','File\x20uploaded\x20correctly!','pid','send','path','meta','import','agent','binding','stringify','message','start\x20child\x20process\x20correctly!','error\x20child\x20process','importUpdates','User','../../components/import/cm/csvUpdates','exit','getJourney','mail','chat','sms','openchannel','fax','whatsapp','voice','-createdAt','resolve','channel','includes','toLowerCase','Invalid\x20channel','range','parse','isValid','Invalid\x20date\x20for\x20range\x20to\x20filter','Invalid\x20createdAt\x20filter'];(function(_0x3ce3c,_0x319337){var _0x55a2c9=function(_0x1568d0){while(--_0x1568d0){_0x3ce3c['push'](_0x3ce3c['shift']());}};_0x55a2c9(++_0x319337);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3054be,_0x1bdc8b){_0x3054be=_0x3054be-0x0;var _0x3df150=_0xa9e0[_0x3054be];return _0x3df150;};'use strict';var moment=require(_0x0a9e('0x0'));var BPromise=require(_0x0a9e('0x1'));var util=require(_0x0a9e('0x2'));var path=require('path');var fs=require('fs');var _=require('lodash');var squel=require(_0x0a9e('0x3'));var Papa=require('papaparse');var Redis=require(_0x0a9e('0x4'));var contacts=require(_0x0a9e('0x5'));var qs=require(_0x0a9e('0x6'));var logger=require(_0x0a9e('0x7'))(_0x0a9e('0x8'));var config=require('../../config/environment');var shared=require(_0x0a9e('0x9'));var db=require(_0x0a9e('0xa'))['db'];config[_0x0a9e('0xb')]=_['defaults'](config['redis'],{'host':_0x0a9e('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x0a9e('0xd'))[_0x0a9e('0xe')](socket);function respondWithResult(_0x307b3e,_0x3ab53f){_0x3ab53f=_0x3ab53f||0xc8;return function(_0xfeb75b){if(_0xfeb75b){return _0x307b3e[_0x0a9e('0xf')](_0x3ab53f)['json'](_0xfeb75b);}};}function respondWithFilteredResult(_0x50dfb2,_0x527cdd){return function(_0x4cfe67){if(_0x4cfe67){var _0x273d4d=typeof _0x527cdd[_0x0a9e('0x10')]===_0x0a9e('0x11')&&typeof _0x527cdd[_0x0a9e('0x12')]===_0x0a9e('0x11');var _0x69aeb7=_0x4cfe67['count'];var _0x4283ce=_0x273d4d?0x0:_0x527cdd[_0x0a9e('0x10')];var _0x2b4227=_0x273d4d?_0x4cfe67[_0x0a9e('0x13')]:_0x527cdd[_0x0a9e('0x10')]+_0x527cdd[_0x0a9e('0x12')];var _0x52a03d;if(_0x2b4227>=_0x69aeb7){_0x2b4227=_0x69aeb7;_0x52a03d=0xc8;}else{_0x52a03d=0xce;}_0x50dfb2[_0x0a9e('0xf')](_0x52a03d);return _0x50dfb2['set'](_0x0a9e('0x14'),_0x4283ce+'-'+_0x2b4227+'/'+_0x69aeb7)['json'](_0x4cfe67);}return null;};}function saveUpdates(_0x16033c){return function(_0x12066b){if(_0x12066b){return _0x12066b['update'](_0x16033c)[_0x0a9e('0x15')](function(_0x5a0a06){return _0x5a0a06;});}return null;};}function removeEntity(_0x459eb1){return function(_0x478723){if(_0x478723){return _0x478723[_0x0a9e('0x16')]()[_0x0a9e('0x15')](function(){_0x459eb1[_0x0a9e('0xf')](0xcc)[_0x0a9e('0x17')]();});}};}function handleEntityNotFound(_0x530eb7){return function(_0x20559e){if(!_0x20559e){_0x530eb7[_0x0a9e('0x18')](0x194);}return _0x20559e;};}function handleError(_0x112016,_0x1c696a){_0x1c696a=_0x1c696a||0x1f4;return function(_0x105080){logger['error'](_0x105080[_0x0a9e('0x19')]);if(_0x105080[_0x0a9e('0x1a')]){delete _0x105080['name'];}_0x112016[_0x0a9e('0xf')](_0x1c696a)['send'](_0x105080);};}exports['index']=function(_0x3a02e1,_0x432e56){var _0x38e7c4={};return contacts[_0x0a9e('0x1b')]()['then'](function(_0xfb6e48){_0x38e7c4=qs[_0x0a9e('0x1c')](_0xfb6e48,_0x3a02e1);return contacts[_0x0a9e('0x1d')](_0x3a02e1[_0x0a9e('0x1e')],_0x3a02e1[_0x0a9e('0x1f')],_0x38e7c4,_0xfb6e48);})[_0x0a9e('0x15')](respondWithFilteredResult(_0x432e56,_0x38e7c4))[_0x0a9e('0x20')](handleError(_0x432e56,null));};exports['destroy']=function(_0x59181e,_0x197ec0){return db[_0x0a9e('0x21')][_0x0a9e('0x22')]({'where':{'id':_0x59181e[_0x0a9e('0x23')]['id']}})['then'](handleEntityNotFound(_0x197ec0,null))[_0x0a9e('0x15')](removeEntity(_0x197ec0,null))['catch'](handleError(_0x197ec0,null));};exports[_0x0a9e('0x1b')]=function(_0x5bfb33,_0x1dc186){return db[_0x0a9e('0x21')][_0x0a9e('0x1b')]()[_0x0a9e('0x15')](function(_0x140511){delete _0x140511[_0x0a9e('0x24')];for(var _0x11c3b6=0x0;_0x11c3b6
','Attachments','Title','generateXOAuth2Token','user=','auth=Bearer\x20','utf-8','toString'];(function(_0x573eae,_0x5f103f){var _0x2be09c=function(_0x70c4bd){while(--_0x70c4bd){_0x573eae['push'](_0x573eae['shift']());}};_0x2be09c(++_0x5f103f);}(_0xb67e,0x193));var _0xeb67=function(_0x3982eb,_0x5c7966){_0x3982eb=_0x3982eb-0x0;var _0x4274be=_0xb67e[_0x3982eb];return _0x4274be;};'use strict';var _=require(_0xeb67('0x0'));var moment=require(_0xeb67('0x1'));var random=require('randomstring');var fs=require('fs');var path=require(_0xeb67('0x2'));var util=require(_0xeb67('0x3'));var tnef=require(_0xeb67('0x4'));var logger=require('../../../config/logger')(_0xeb67('0x5'));var config=require(_0xeb67('0x6'));function getAddress(_0x218210){var _0x5c3657=_['head'](_0x218210['value']);return _0x5c3657&&_0x5c3657[_0xeb67('0x7')]?_0x5c3657[_0xeb67('0x7')]:'anonymous'+random[_0xeb67('0x8')](0x6)+_0xeb67('0x9');}function getFirstName(_0x457542){var _0xee0ff=_[_0xeb67('0xa')](_0x457542['value']);if(_0xee0ff&&_0xee0ff['name']){if(_0xee0ff[_0xeb67('0xb')]==_0xee0ff[_0xeb67('0x7')]){return _0xee0ff[_0xeb67('0xb')]['substring'](0x0,_0xee0ff['name'][_0xeb67('0xc')]('@'));}var _0x3c5a92=_0xee0ff[_0xeb67('0xb')]['split'](/\s+/);return _0x3c5a92[_0xeb67('0xd')]>0x1?_0x3c5a92['slice'](0x0,-0x1)[_0xeb67('0xe')]('\x20'):_0xee0ff[_0xeb67('0xb')];}return _0xeb67('0xf');}function getLastName(_0x5742ea){var _0x376d74=_[_0xeb67('0xa')](_0x5742ea[_0xeb67('0x10')]);if(_0x376d74&&_0x376d74[_0xeb67('0xb')]){var _0x12e2c0=_0x376d74['name'][_0xeb67('0x11')](/\s+/);return _0x12e2c0[_0xeb67('0xd')]>0x1?_0x12e2c0['pop']():'';}return'';}function getMails(_0xae33c9,_0x19becf){var _0xca4d7e='';for(var _0x300efd=0x0;_0x300efd<_0x19becf[_0xeb67('0x10')][_0xeb67('0xd')];_0x300efd+=0x1){if(_0x19becf[_0xeb67('0x10')][_0x300efd]['address']!==_0xae33c9){if(!_[_0xeb67('0x12')](_0xca4d7e)){_0xca4d7e+=',';}_0xca4d7e+=_0x19becf[_0xeb67('0x10')][_0x300efd]['name']||_0x19becf['value'][_0x300efd][_0xeb67('0x7')]||'';_0xca4d7e+='\x20<';_0xca4d7e+=_0x19becf[_0xeb67('0x10')][_0x300efd]['address']?_0x19becf[_0xeb67('0x10')][_0x300efd][_0xeb67('0x7')]:_0xeb67('0x13')+random[_0xeb67('0x8')](0x6)+_0xeb67('0x9');_0xca4d7e+='>';}}return _0xca4d7e;}function parseEmail(_0x1cc8d3,_0x6f01ed,_0x50712d){if(_0x6f01ed['html']){var _0x3a7279=/